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,GAAI,EAAG,EAAG,GAAI,GAAI,EAAG,GAAI,EAAG,GAAI,EAAG,EAAG,EAAG,EAAG,GAAI,EAAG,GAAI,GACxK,GAAI,EAAG,GAAI,GAAI,GAAI,EAAG,GAAI,EAAG,EAAG,CACnC,EAEKC,EAAsB,CACxB,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GACA,GAEA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GACA,EACH,EAEKC,EAAe,CACjB,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EAEA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CACH,EAqCKC,EAAQ,IAAM,KACdC,EAAQ,IAAM,KACdC,EAAU,GAAK,KACfC,EAAU,GAAK,KAGfC,EAAkB,IAAM,KACxBC,EAAkB,GAAM,KAGxBC,EAAS,CACX,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CACH,EACKnuH,EAAU,CAAE,EACZ1zE,EAAY,CAAE,EACdkrF,EAAU,CAAE,EACZc,EAAM,CAAE,EACd,IAAI81G,GAAiB,EAErB,MAAMC,EAAkB,IAAI,MAAM,CAAC,EAC7BC,EAAiB,IAAI,MAAM,CAAC,EAClC,IAAIC,GACJ,IAAKA,GAAO,EAAGA,GAAO,EAAGA,KACrBF,EAAgBE,EAAI,EAAIhqJ,EAAQ,KAAM,EACtC+pJ,EAAeC,EAAI,EAAIprJ,GAAQ,KAAM,EAGzC,QAASosD,GAAO,EAAGA,GAAO,GAAIA,KAAQ,CAElC,IAAKg/F,GAAO,EAAGA,GAAO,EAAGA,KAAQ,CAE7B,MAAMC,GAAOd,EAAY,EA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ArpC,GAAA,IAACkJ,IAAiB,IACjBlJ,GAAA,IAAAyuB,IAAA,CACC,SAACzuB,OAAAtB,IAAA,EAAO,CACV,GACF,EACF,EACF,EACF","names":["l","n","p","q","r","t","u","v","w","x","y","z","A","a","B","D","b","e","F","G","H","I","J","K","L","M","d","c","k","h","g","f","m","N","O","escape","P","Q","R","S","T","U","V","W","X","react_production_min","reactModule","require$$0","reactJsxRuntime_production_min","jsxRuntimeModule","DEBUG_BUILD","GLOBAL_OBJ","SDK_VERSION","getMainCarrier","getSentryCarrier","carrier","__SENTRY__","getGlobalSingleton","name","creator","obj","PREFIX","CONSOLE_LEVELS","originalConsoleMethods","consoleSandbox","callback","console","wrappedFuncs","wrappedLevels","level","originalConsoleMethod","makeLogger","enabled","logger","args","STACKTRACE_FRAME_LIMIT","UNKNOWN_FUNCTION","WEBPACK_ERROR_REGEXP","STRIP_FRAME_REGEXP","createStackParser","parsers","sortedParsers","stack","skipFirstLines","framesToPop","frames","lines","i","line","cleanedLine","parser","frame","stripSentryFramesAndReverse","stackParserFromStackParserOptions","stackParser","localStack","getLastStackFrame","arr","defaultFunctionName","getFunctionName","fn","getFramesFromEvent","event","exception","value","handlers","instrumented","addHandler","type","handler","maybeInstrument","instrumentFn","triggerHandlers","data","typeHandlers","_oldOnErrorHandler","addGlobalErrorInstrumentationHandler","instrumentError","msg","url","column","error","_oldOnUnhandledRejectionHandler","addGlobalUnhandledRejectionInstrumentationHandler","instrumentUnhandledRejection","objectToString","isError","wat","isInstanceOf","isBuiltin","className","isErrorEvent","isDOMError","isDOMException","isString","isParameterizedString","isPrimitive","isPlainObject","isEvent","isElement","isRegExp","isThenable","isSyntheticEvent","base","isVueViewModel","WINDOW","DEFAULT_MAX_STRING_LENGTH","htmlTreeAsString","elem","options","currentElem","MAX_TRAVERSE_HEIGHT","out","height","len","separator","sepLength","nextStr","keyAttrs","maxStringLength","_htmlElementAsString","el","keyAttrPairs","keyAttr","keyAttrPair","classes","allowedAttrs","attr","getLocationHref","getComponentName","truncate","str","max","safeJoin","input","delimiter","output","isMatchingPattern","pattern","requireExactStringMatch","stringMatchesSomePattern","testString","patterns","fill","source","replacementFactory","original","wrapped","markFunctionWrapped","addNonEnumerableProperty","proto","getOriginalFunction","func","convertToPlainObject","getOwnProperties","newObj","serializeEventTarget","target","extractedProps","property","extractExceptionKeysForMessage","maxLength","keys","firstKey","includedKeys","serialized","dropUndefinedKeys","inputValue","_dropUndefinedKeys","memoizationMap","isPojo","memoVal","returnValue","key","item","ONE_SECOND_IN_MS","dateTimestampInSeconds","createUnixTimestampInSecondsFunc","performance","approxStartingTimeOrigin","timeOrigin","timestampInSeconds","cachedTimeOrigin","getBrowserTimeOrigin","threshold","performanceNow","dateNow","timeOriginDelta","timeOriginIsReliable","navigationStart","_a","navigationStartDelta","navigationStartIsReliable","browserPerformanceTimeOrigin","getCrypto","gbl","uuid4","crypto","getRandomByte","typedArray","getFirstException","_b","getEventDescription","message","eventId","firstException","addExceptionTypeValue","values","addExceptionMechanism","newMechanism","defaultMechanism","currentMechanism","mergedData","checkOrSetAlreadyCaught","isAlreadyCaptured","States","RESOLVED","REJECTED","resolvedSyncPromise","SyncPromise","resolve","rejectedSyncPromise","reason","_","reject","executor","onfulfilled","onrejected","result","val","onfinally","isRejected","cachedHandlers","setResult","state","makeSession","context","startingTime","session","sessionToJSON","updateSession","duration","closeSession","status","generateTraceId","generateSpanId","merge","initialObj","mergeObj","levels","SCOPE_SPAN_FIELD","_setSpanForScope","scope","span","_getSpanForScope","DEFAULT_MAX_BREADCRUMBS","Scope","newScope","client","lastEventId","user","tags","extras","extra","fingerprint","captureContext","scopeToMerge","scopeInstance","contexts","propagationContext","breadcrumb","maxBreadcrumbs","maxCrumbs","mergedBreadcrumb","attachment","newData","hint","syntheticException","getDefaultCurrentScope","getDefaultIsolationScope","AsyncContextStack","isolationScope","assignedScope","assignedIsolationScope","maybePromiseResult","res","getAsyncContextStack","registry","sentry","withScope","withSetScope","withIsolationScope","getStackAsyncContextStrategy","_isolationScope","getAsyncContextStrategy","getCurrentScope","getIsolationScope","getGlobalScope","rest","acs","getClient","getTraceContextFromScope","traceId","parentSpanId","propagationSpanId","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE","SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME","SEMANTIC_ATTRIBUTE_PROFILE_ID","SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME","SPAN_STATUS_UNSET","SPAN_STATUS_OK","SPAN_STATUS_ERROR","getSpanStatusFromHttpCode","httpStatus","setHttpStatus","spanStatus","SCOPE_ON_START_SPAN_FIELD","ISOLATION_SCOPE_ON_START_SPAN_FIELD","setCapturedScopesOnSpan","getCapturedScopesOnSpan","parseSampleRate","sampleRate","rate","SENTRY_BAGGAGE_KEY_PREFIX","SENTRY_BAGGAGE_KEY_PREFIX_REGEX","MAX_BAGGAGE_STRING_LENGTH","baggageHeaderToDynamicSamplingContext","baggageHeader","baggageObject","parseBaggageHeader","dynamicSamplingContext","acc","nonPrefixedKey","dynamicSamplingContextToSentryBaggageHeader","sentryPrefixedDSC","dscKey","dscValue","objectToBaggageHeader","curr","currBaggageObject","baggageHeaderToObject","baggageEntry","keyOrValue","object","objectKey","objectValue","currentIndex","newBaggageHeader","TRACEPARENT_REGEXP","extractTraceparentData","traceparent","matches","parentSampled","propagationContextFromHeaders","sentryTrace","baggage","traceparentData","sampleRand","getSampleRandFromTraceparentAndDsc","generateSentryTraceHeader","spanId","sampled","sampledString","dsc","parsedSampleRand","parsedSampleRate","TRACE_FLAG_NONE","TRACE_FLAG_SAMPLED","hasShownSpanDropWarning","spanToTransactionTraceContext","span_id","trace_id","op","parent_span_id","origin","links","spanToJSON","spanToTraceContext","isRemote","spanToTraceHeader","spanIsSampled","convertSpanLinksForEnvelope","traceFlags","restContext","attributes","spanTimeInputToSeconds","ensureTimestampInSeconds","timestamp","spanIsSentrySpan","spanIsOpenTelemetrySdkTraceBaseSpan","startTime","endTime","getStatusMessage","castSpan","CHILD_SPANS_FIELD","ROOT_SPAN_FIELD","addChildSpanToSpan","childSpan","rootSpan","removeChildSpanFromSpan","getSpanDescendants","resultSet","addSpanChildren","childSpans","getRootSpan","getActiveSpan","showSpanDropWarning","errorsInstrumented","registerSpanErrorInstrumentation","errorCallback","activeSpan","hasSpansEnabled","maybeOptions","DEFAULT_ENVIRONMENT","FROZEN_DSC_FIELD","freezeDscOnSpan","getDynamicSamplingContextFromClient","public_key","getDynamicSamplingContextFromScope","getDynamicSamplingContextFromSpan","rootSpanJson","rootSpanAttributes","traceState","rootSpanSampleRate","applyLocalSampleRateToDsc","frozenDsc","traceStateDsc","dscOnTraceState","SentryNonRecordingSpan","spanContext","_timestamp","_key","_value","_values","_status","_name","_attributesOrStartTime","_startTime","_link","_links","_exception","_time","logSpanStart","description","isRootSpan","header","infoParts","logSpanEnd","sampleSpan","samplingContext","localSampleRateWasApplied","fallbackSampleRate","shouldSample","DSN_REGEX","isValidProtocol","protocol","dsnToString","dsn","withPassword","host","path","pass","port","projectId","publicKey","dsnFromString","match","lastPath","split","projectMatch","dsnFromComponents","components","validateDsn","component","makeDsn","from","global","normalize","depth","maxProperties","visit","err","normalizeToSize","maxSize","normalized","jsonSize","memo","memoBuilder","memoize","unmemoize","stringified","stringifyValue","remainingDepth","valueWithToJSON","jsonValue","numAdded","visitable","visitKey","visitValue","objName","getConstructorName","prototype","utf8Length","inner","createEnvelope","headers","items","addItemToEnvelope","envelope","newItem","forEachEnvelopeItem","envelopeItems","envelopeItem","envelopeItemType","encodeUTF8","serializeEnvelope","envHeaders","parts","append","next","itemHeaders","payload","stringifiedPayload","concatBuffers","buffers","totalLength","buf","merged","offset","buffer","createSpanEnvelopeItem","spanJson","createAttachmentEnvelopeItem","ITEM_TYPE_TO_DATA_CATEGORY_MAP","envelopeItemTypeToDataCategory","getSdkMetadataForEnvelopeHeader","metadataOrEvent","version","createEventEnvelopeHeaders","sdkInfo","tunnel","enhanceEventWithSdkInfo","createSessionEnvelope","metadata","envelopeHeaders","createEventEnvelope","eventType","createSpanEnvelope","spans","dscHasRequiredProps","beforeSendSpan","convertToSpanJSON","processedSpan","setMeasurement","unit","timedEventsToMeasurements","events","measurements","MAX_SPAN_COUNT","SentrySpan","link","timeInput","endTimestamp","attributesOrStartTime","time","isSpanTimeInput","sendSpanEnvelope","transactionEvent","isFullFinishedSpan","capturedSpanScope","capturedSpanIsolationScope","isStandaloneSpan","transaction","spanItems","SUPPRESS_TRACING_KEY","startInactiveSpan","getAcs","spanArguments","parseSentrySpanArguments","forceTransaction","customParentSpan","withActiveSpan","parentSpan","getParentSpan","createChildOrRootSpan","_startChildSpan","_startRootSpan","initialCtx","ctx","currentPropagationContext","TRACING_DEFAULTS","FINISH_REASON_HEARTBEAT_FAILED","FINISH_REASON_IDLE_TIMEOUT","FINISH_REASON_FINAL_TIMEOUT","FINISH_REASON_EXTERNAL_FINISH","startIdleSpan","startSpanOptions","activities","_finished","_idleTimeoutID","_finishReason","_autoFinishAllowed","_cleanupHooks","idleTimeout","finalTimeout","childSpanTimeout","beforeSpanEnd","previousActiveSpan","_startIdleSpan","thisArg","definedEndTimestamp","spanEndTimestamp","child","onIdleSpanEnded","childEndTimestamps","latestSpanEndTimestamp","spanStartTimestamp","_cancelIdleTimeout","_restartIdleTimeout","_restartChildSpanTimeout","_pushActivity","_popActivity","cleanup","spanJSON","startTimestamp","discardedSpans","childSpanJSON","childEndTimestamp","childStartTimestamp","spanStartedBeforeIdleSpanEnd","timeoutWithMarginOfError","spanEndedBeforeFinalTimeout","stringifiedSpan","startedSpan","endedSpan","spanToAllowAutoFinish","notifyEventProcessors","processors","index","processor","final","parsedStackResults","lastKeysCount","cachedFilenameDebugIds","getFilenameToDebugIdMap","debugIdMap","debugIdKeys","stackKey","parsedStack","stackFrame","filename","debugId","applyScopeDataToEvent","breadcrumbs","sdkProcessingMetadata","applyDataToEvent","applySpanToEvent","applyFingerprintToEvent","applyBreadcrumbsToEvent","applySdkMetadataToEvent","mergeScopeData","mergeData","eventProcessors","attachments","transactionName","mergeAndOverwriteScopeData","prop","mergeVal","cleanedExtra","cleanedTags","cleanedUser","cleanedContexts","mergedBreadcrumbs","prepareEvent","normalizeDepth","normalizeMaxBreadth","prepared","integrations","applyClientOptions","applyIntegrationsMetadata","applyDebugIds","finalScope","getFinalScope","clientEventProcessors","isolationData","finalScopeData","evt","applyDebugMeta","normalizeEvent","environment","release","dist","maxValueLength","request","filenameDebugIdMap","images","debug_id","integrationNames","maxBreadth","parseEventHintOrCaptureContext","hintIsScopeOrFunction","hintIsScopeContext","captureContextKeys","captureException","captureMessage","captureEvent","setContext","setTag","setUser","isEnabled","addEventProcessor","startSession","currentScope","userAgent","currentSession","endSession","_sendSessionUpdate","captureSession","end","SENTRY_API_VERSION","getBaseApiEndpoint","_getIngestEndpoint","_encodedAuth","params","getEnvelopeEndpointWithUrlEncodedAuth","installedIntegrations","filterDuplicates","integrationsByName","currentInstance","existingInstance","getIntegrationsToSetup","defaultIntegrations","userIntegrations","integration","resolvedUserIntegrations","setupIntegrations","integrationIndex","setupIntegration","afterSetupIntegrations","createClientReportEnvelope","discarded_events","clientReportItem","SentryError","logLevel","getPossibleEventMessages","possibleMessages","lastException","convertTransactionEventToSpanJson","convertSpanJsonToTransactionEvent","ALREADY_SEEN_ERROR","MISSING_RELEASE_FOR_SESSION_ERROR","Client","hintWithEventId","eventMessage","promisedEvent","timeout","transport","clientFinished","transportFlushed","eventProcessor","integrationName","isAlreadyInstalled","env","promise","sendResponse","clientReleaseOption","clientEnvironmentOption","sessionAttrs","category","count","hook","hooks","cbIndex","callbacks","crashed","errored","exceptions","ex","mechanism","sessionNonTerminal","ticked","tick","interval","finalEvent","isTransaction","isTransactionEvent","beforeSendLabel","dataCategory","processBeforeSend","_validateBeforeSendResult","processedEvent","spanCount","spanCountBefore","spanCountAfter","droppedSpanCount","transactionInfo","outcomes","quantity","beforeSendResult","invalidValueError","beforeSend","beforeSendTransaction","processedRootSpanJson","processedSpans","initAndBind","clientClass","setCurrentClient","makePromiseBuffer","limit","isReady","remove","task","add","taskProducer","drain","counter","capturedSetTimeout","DEFAULT_RETRY_AFTER","parseRetryAfterHeader","now","headerDelay","headerDate","disabledUntil","limits","isRateLimited","updateRateLimits","statusCode","updatedRateLimits","rateLimitHeader","retryAfterHeader","retryAfter","categories","namespaces","delay","DEFAULT_TRANSPORT_BUFFER_SIZE","createTransport","makeRequest","rateLimits","flush","send","filteredEnvelopeItems","filteredEnvelope","recordEnvelopeLoss","requestTask","response","isSentryRequestUrl","checkDsn","checkTunnel","removeTrailingSlash","addAutoIpAddressToUser","objWithMaybeUser","addAutoIpAddressToSession","applySdkMetadata","names","getTraceData","scopeToTraceHeader","DEFAULT_BREADCRUMBS","addBreadcrumb","beforeBreadcrumb","finalBreadcrumb","originalFunctionToString","INTEGRATION_NAME","SETUP_CLIENTS","_functionToStringIntegration","originalFunction","functionToStringIntegration","DEFAULT_IGNORE_ERRORS","_eventFiltersIntegration","_hint","clientOptions","mergedOptions","_mergeOptions","_shouldDropEvent","eventFiltersIntegration","inboundFiltersIntegration","internalOptions","_isSentryError","_isIgnoredError","_isUselessError","_isIgnoredTransaction","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","ignoreErrors","ignoreTransactions","denyUrls","allowUrls","_getLastValidUrl","rootException","_c","applyAggregateErrorsToEvent","exceptionFromErrorImplementation","maxValueLimit","originalException","truncateAggregateExceptions","aggregateExceptionsFromError","prevExceptions","exceptionId","newExceptions","applyExceptionGroupFieldsForParentException","newException","newExceptionId","applyExceptionGroupFieldsForChildException","childError","parentId","addConsoleInstrumentationHandler","instrumentConsole","log","severityLevelFromString","_captureConsoleIntegration","handled","consoleHandler","captureConsoleIntegration","arg","_dedupeIntegration","previousEvent","currentEvent","dedupeIntegration","_isSameMessageEvent","_isSameExceptionEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","previousException","_getExceptionFromEvent","currentException","currentFrames","previousFrames","frameA","frameB","currentFingerprint","previousFingerprint","parseUrl","query","fragment","stripUrlQueryAndFragment","urlPath","instrumentFetchRequest","handlerData","shouldCreateSpan","shouldAttachHeaders","spanOrigin","method","shouldCreateSpanResult","endSpan","fullUrl","getFullURL","parsedUrl","hasParent","_addTracingHeadersToFetchRequest","fetchHint","fetchOptionsObj","traceHeaders","isRequest","isHeaders","newHeaders","prevBaggageHeader","prevHeaderStrippedFromSentryBaggage","stripBaggageHeaderOfSentryBaggageValues","headerName","headerValue","existingBaggageHeader","newBaggageHeaders","headerItem","contentLength","contentLengthNum","getBreadcrumbLogLevelFromHttpStatusCode","supportsHistory","supportsFetch","isNativeFunction","supportsNativeFetch","doc","sandbox","addFetchInstrumentationHandler","skipNativeFetchCheck","instrumentFetch","addFetchEndInstrumentationHandler","streamHandler","onFetchResolved","originalFetch","virtualError","parseFetchArgs","resolveResponse","onFinishedResolving","body","responseReader","maxFetchDurationTimeout","readingActive","chunkTimeout","done","clonedResponseForResolving","hasProp","getUrlFromResource","resource","fetchArgs","getDefaultExportFromCjs","browser","process","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","runClearTimeout","marker","queue","draining","currentQueue","queueIndex","cleanUpNextTick","drainQueue","Item","array","noop","dir","browserExports","process$1","isBrowserBundle","getSDKSource","isNodeEnv","isBrowser","isElectronNodeRenderer","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","wrap","isFunction","wrapper","sentryWrapped","wrappedArguments","exceptionFromError","parseStackFrames","extractType","extractMessage","eventFromPlainObject","isUnhandledRejection","errorFromProp","getErrorPropertyFromObject","getNonErrorObjectExceptionValue","eventFromError","stacktrace","skipLines","getSkipFirstStackStringLines","getPopFirstTopFrames","reactMinifiedRegexp","isWebAssemblyException","eventFromException","attachStacktrace","eventFromUnknownInput","eventFromMessage","eventFromString","domException","__sentry_template_string__","__sentry_template_values__","captureType","getObjectClassName","BrowserClient","opts","sdkSource","getRating","thresholds","bindReporter","metric","reportAllChanges","prevValue","delta","forceReport","generateUniqueID","getNavigationEntry","checkResponseStart","navigationEntry","getActivationStart","navEntry","initMetric","navigationType","observe","po","list","onHidden","cb","onHiddenOrPageHide","runOnce","called","firstHiddenTime","initHiddenTime","onVisibilityUpdate","removeChangeListeners","addChangeListeners","getVisibilityWatcher","whenActivated","FCPThresholds","onFCP","onReport","visibilityWatcher","report","entries","entry","CLSThresholds","onCLS","sessionValue","sessionEntries","handleEntries","firstSessionEntry","lastSessionEntry","FIDThresholds","onFID","handleEntry","interactionCountEstimate","minKnownInteractionId","maxKnownInteractionId","updateEstimate","getInteractionCount","initInteractionCountPolyfill","longestInteractionList","longestInteractionMap","DEFAULT_DURATION_THRESHOLD","prevInteractionCount","getInteractionCountForNavigation","estimateP98LongestInteraction","candidateInteractionIndex","MAX_INTERACTIONS_TO_CONSIDER","entryPreProcessingCallbacks","processInteractionEntry","minLongestInteraction","existingInteraction","interaction","whenIdle","rIC","handle","INPThresholds","onINP","inp","LCPThresholds","reportedMetricIDs","onLCP","stopListening","TTFBThresholds","whenReady","onTTFB","_previousCls","_previousFid","_previousLcp","_previousTtfb","_previousInp","addClsInstrumentationHandler","stopOnCallback","addMetricObserver","instrumentCls","addLcpInstrumentationHandler","instrumentLcp","addFidInstrumentationHandler","instrumentFid","addTtfbInstrumentationHandler","instrumentTtfb","addInpInstrumentationHandler","instrumentInp","addPerformanceInstrumentationHandler","instrumentPerformanceObserver","getCleanupCallback","previousValue","isPerformanceEventTiming","isMeasurementValue","startAndEndSpan","startTimeInSeconds","parentStartTime","startStandaloneWebVitalSpan","passedAttributes","sendDefaultPii","replay","replayId","userDisplay","profileId","getBrowserPerformanceAPI","msToSec","extractNetworkProtocol","nextHopProtocol","char","trackClsAsStandaloneSpan","standaloneCLsValue","standaloneClsEntry","pageloadSpanId","supportsLayoutShift","sentSpan","_collectClsOnce","sendStandaloneClsSpan","cleanupClsHandler","unsubscribeStartNavigation","clsValue","routeName","MAX_INT_AS_BYTES","_performanceCursor","_measurements","_lcpEntry","_clsEntry","startTrackingWebVitals","recordClsStandaloneSpans","fidCleanupCallback","_trackFID","lcpCleanupCallback","_trackLCP","ttfbCleanupCallback","_trackTtfb","clsCleanupCallback","_trackCLS","startTrackingLongTasks","parent","parentOp","parentStartTimestamp","startTrackingLongAnimationFrames","initialScript","invoker","invokerType","sourceURL","sourceFunctionName","sourceCharPosition","startTrackingInteractions","spanOptions","componentName","addPerformanceEntries","performanceEntries","transactionStartTime","_addNavigationSpans","_addMeasureSpans","firstHidden","shouldRecord","_addResourceSpans","_trackNavigator","_addTtfbRequestTimeToMeasurements","fidMark","measurementName","measurement","_setWebVitalAttributes","requestTime","measureStartTimestamp","startTimeStamp","measureEndTimestamp","_addPerformanceNavigationTiming","_addRequest","eventEnd","_getEndPropertyNameForNavigationTiming","start","requestStartTimestamp","responseEndTimestamp","responseStartTimestamp","resourceUrl","setResourceEntrySizeData","deliveryType","renderBlockingStatus","navigator","connection","dataKey","entryVal","responseStart","requestStart","DEBOUNCE_DURATION","debounceTimerID","lastCapturedEventType","lastCapturedEventTargetId","addClickKeypressInstrumentationHandler","instrumentDOM","triggerDOMHandler","globalDOMEventHandler","makeDOMEventHandler","originalAddEventListener","listener","handlerForType","originalRemoveEventListener","isSimilarToLastCapturedEvent","shouldSkipDOMEvent","globalListener","getEventTarget","lastHref","addHistoryInstrumentationHandler","instrumentHistory","to","historyReplacementFunction","originalHistoryFunction","cachedImplementations","getNativeImplementation","cached","impl","document","contentWindow","clearCachedImplementation","setTimeout","SENTRY_XHR_DATA_KEY","addXhrInstrumentationHandler","instrumentXHR","xhrproto","originalOpen","xhrOpenThisArg","xhrOpenArgArray","onreadystatechangeHandler","xhrInfo","originalOnreadystatechange","onreadystatechangeThisArg","onreadystatechangeArgArray","originalSetRequestHeader","setRequestHeaderThisArg","setRequestHeaderArgArray","originalSend","sendThisArg","sendArgArray","sentryXhrData","serializeFormData","formData","getBodyString","_logger","getFetchRequestArgBody","LAST_INTERACTIONS","INTERACTIONS_SPAN_MAP","startTrackingINP","inpCallback","_trackINP","INP_ENTRY_MAP","interactionId","interactionType","spanToUse","registerInpInteractionListener","activeRootSpan","last","makeFetchTransport","nativeFetch","pendingBodySize","pendingCount","requestSize","requestOptions","CHROME_PRIORITY","GECKO_PRIORITY","createFrame","lineno","colno","chromeRegexNoFnName","chromeRegex","chromeEvalRegex","chromeStackParserFn","noFnParts","col","subMatch","extractSafariExtensionDetails","chromeStackLineParser","geckoREgex","geckoEvalRegex","gecko","geckoStackLineParser","defaultStackLineParsers","defaultStackParser","isSafariExtension","isSafariWebExtension","MAX_ALLOWED_STRING_LENGTH","_breadcrumbsIntegration","_options","_getConsoleBreadcrumbHandler","_getDomBreadcrumbHandler","_getXhrBreadcrumbHandler","_getFetchBreadcrumbHandler","_getHistoryBreadcrumbHandler","_getSentryBreadcrumbHandler","breadcrumbsIntegration","dom","element","_isEvent","status_code","parsedLoc","parsedFrom","parsedTo","DEFAULT_EVENT_TARGET","_browserApiErrorsIntegration","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","_wrapEventTarget","browserApiErrorsIntegration","originalCallback","xhr","wrapOptions","eventName","isEventListenerObject","originalEventHandler","browserSessionIntegration","_globalHandlersIntegration","_installGlobalOnErrorHandler","globalHandlerLog","_installGlobalOnUnhandledRejectionHandler","globalHandlersIntegration","getOptions","_enhanceEventWithInitialFrame","_getUnhandledRejectionError","_eventFromRejectionWithPrimitive","ev","ev0","ev0s","ev0sf","httpContextIntegration","referrer","DEFAULT_KEY","DEFAULT_LIMIT","_linkedErrorsIntegration","linkedErrorsIntegration","getDefaultIntegrations","applyDefaultOptions","optionsArg","dropTopLevelUndefinedKeys","mutatetedObj","shouldShowBrowserExtensionError","windowWithMaybeExtension","extensionKey","extensionObject","runtimeId","href","extensionProtocols","isDedicatedExtensionPage","isNWjs","init","browserOptions","REPLAY_SESSION_KEY","REPLAY_EVENT_NAME","UNABLE_TO_SEND_REPLAY","SESSION_IDLE_PAUSE_DURATION","SESSION_IDLE_EXPIRE_DURATION","DEFAULT_FLUSH_MIN_DELAY","DEFAULT_FLUSH_MAX_DELAY","BUFFER_CHECKOUT_TIME","RETRY_BASE_INTERVAL","RETRY_MAX_COUNT","NETWORK_BODY_MAX_SIZE","CONSOLE_ARG_MAX_SIZE","SLOW_CLICK_THRESHOLD","SLOW_CLICK_SCROLL_TIMEOUT","REPLAY_MAX_EVENT_BUFFER_SIZE","MIN_REPLAY_DURATION","MIN_REPLAY_DURATION_LIMIT","MAX_REPLAY_DURATION","__defProp$1","__defNormalProp$1","__publicField$1","NodeType$2","NodeType2","isElement$1","n2","isShadowRoot","isNativeShadowDom","shadowRoot","fixBrowserCompatibilityIssuesInCSS","cssText","escapeImportStatement","rule","statement","stringifyStylesheet","s2","rules2","stringifyRule","fixAllCssProperty","styles","i2","styleDeclaration","attribute","isImportant","importStringified","isCSSImportRule","isCSSStyleRule","needsSafariColonFix","needsAllFix","fixSafariColons","cssStringified","regex","Mirror$1","id","childNode","node","meta","oldNode","createMirror$2","Mirror","shouldMaskInput","maskInputOptions","tagName","maskInputValue","isMasked","maskInputFn","text","toLowerCase","toUpperCase","ORIGINAL_ATTRIBUTE_NAME","is2DCanvasBlank","canvas","chunkSize","getImageData","originalGetImageData","pixel","getInputType","getInputValue","extractFileExtension","baseURL","cachedImplementations$1","getImplementation$1","document2","setTimeout$2","clearTimeout$1","getIframeContentDocument","iframe","_id","tagNameRegex","IGNORED_NODE","genId","getValidTagName$1","processedTagName","extractOrigin","canvasService","canvasCtx","URL_IN_CSS_REF","URL_PROTOCOL_MATCH","URL_WWW_MATCH","DATA_URI","absoluteToStylesheet","quote1","path1","quote2","path2","path3","filePath","maybeQuote","part","SRCSET_NOT_SPACES","SRCSET_COMMAS_OR_SPACES","getAbsoluteSrcsetString","attributeValue","pos","collectCharacters","regEx","chars2","absoluteToDoc","descriptorsStr","inParens","c2","cachedDocument","getHref","isSVGElement","customHref","a2","transformAttribute","maskAttributeFn","ignoreAttribute","_isBlockedElement","blockClass","blockSelector","unblockSelector","eIndex","elementClassMatchesRegex","distanceToMatch","matchPredicate","distance","createMatchPredicate","selector","needMaskingText","maskTextClass","maskTextSelector","unmaskTextClass","unmaskTextSelector","maskAllText","autocomplete","maskDistance","unmaskDistance","onceIframeLoaded","iframeEl","iframeLoadTimeout","win","fired","readyState","timer","blankUrl","onceStylesheetLoaded","styleSheetLoadTimeout","styleSheetLoaded","serializeNode","mirror2","inlineStylesheet","maskTextFn","dataURLOptions","inlineImages","recordCanvas","keepIframeSrcFn","newlyAddedElement","rootId","getRootId","serializeElementNode","serializeTextNode","docId","parentTagName","textContent","isStyle","isScript","isTextarea","forceMask","isInputMasked","needBlock","attributes2","stylesheet","checked","canvasDataURL","blankCanvas","blankCanvasDataURL","image","imageSrc","priorCrossOrigin","recordInlineImage","width","isCustomElement","lowerIfExists","maybeAttr","slimDOMExcluded","sn","slimDOMOptions","serializeNodeWithId","skipChild","onSerialize","onIframeLoad","onStylesheetLoad","stylesheetLoadTimeout","preserveWhiteSpace","_serializedNode","serializedNode2","recordChild","bypassOptions","childN","serializedChildNode","iframeDoc","serializedIframeNode","serializedLinkNode","snapshot","maskAllInputs","slimDOM","on","DEPARTED_MIRROR_ACCESS_WARNING","_mirror","receiver","throttle$1","wait","previous","remaining","clearTimeout$2","setTimeout$1","hookSetter","isRevoked","patch","replacement","nowTimestamp","getWindowScroll","_e","_d","_f","getWindowHeight","getWindowWidth","closestElementOfNode","isBlocked","checkAncestors","blockedPredicate","isUnblocked","blockDistance","unblockDistance","isSerialized","isIgnored","isAncestorRemoved","legacy_isTouchEvent","polyfill$1","isSerializedIframe","isSerializedStylesheet","hasShadowRoot","StyleSheetMirror","newId","getShadowHost","shadowHost","getRootShadowHost","rootShadowHost","shadowHostInDom","inDom","getImplementation","onRequestAnimationFrame","EventType","EventType2","IncrementalSource","IncrementalSource2","MouseInteractions","MouseInteractions2","PointerTypes","PointerTypes2","MediaInteractions","MediaInteractions2","getIFrameContentDocument","getIFrameContentWindow","isNodeInLinkedList","DoubleLinkedList","position","current","moveKey","MutationBuffer","mutations","adds","addedIds","addList","getNextId","ns","nextId","pushAdd","currentN","childSn","isParentRemoved","isAncestorInSet","candidate","tailNode","_node","unhandledNode","diffAsStr","unchangedAsStr","attributeName","old","pname","newValue","newPriority","nodeId","deepDelete","targetId","addsSet","removes","_isParentRemoved","r2","set","_isAncestorInSet","parentNode","errorHandler","registerErrorHandler","unregisterErrorHandler","callbackWrapper","mutationBuffers","initMutationObserver","rootEl","mutationBuffer","mutationObserverCtor","angularZoneSymbol","observer","initMoveObserver","mousemoveCb","sampling","callbackThreshold","positions","timeBaseline","wrappedCb","totalOffset","updatePosition","clientX","clientY","initMouseInteractionObserver","mouseInteractionCb","disableMap","currentPointerType","getHandler","eventKey","pointerType","thisEventKey","e2","initScrollObserver","scrollCb","scrollLeftTop","initViewportResizeObserver","viewportResizeCb","lastH","lastW","updateDimension","INPUT_TAGS","lastInputValueMap","initInputObserver","inputCb","ignoreClass","ignoreSelector","userTriggeredOnInput","eventHandler","userTriggered","isChecked","cbWithDedup","el2","text2","v2","lastInputValue","currentWindow","propertyDescriptor","hookProperties","getNestedCSSRulePositions","recurse","childRule","hasNestedCSSRule","getIdAndStyleId","sheet","styleMirror","styleId","initStyleSheetObserver","styleSheetRuleCb","stylesheetManager","insertRule","argumentsList","deleteRule","replace","replaceSync","supportedNestedCSSRuleTypes","canMonkeyPatchNestedCSSRule","unmodifiedFunctions","typeKey","initAdoptedStyleSheetObserver","hostId","patchTarget","originalPropertyDescriptor","sheets","initStyleDeclarationObserver","styleDeclarationCb","ignoreCSSAttributes","setProperty","priority","removeProperty","initMediaInteractionObserver","mediaInteractionCb","currentTime","volume","muted","playbackRate","initFontObserver","fontCb","fontMap","originalFontFace","family","descriptors","fontFace","restoreHandler","initSelectionObserver","param","selectionCb","collapsed","updateSelection","selection","ranges","range","startContainer","startOffset","endContainer","endOffset","initCustomElementObserver","customElementCb","constructor","initObservers","o2","_hooks","mutationObserver","mousemoveHandler","mouseInteractionHandler","scrollHandler","viewportResizeHandler","inputHandler","mediaInteractionHandler","styleSheetObserver","adoptedStyleSheetObserver","styleDeclarationObserver","fontObserver","selectionObserver","customElementObserver","pluginHandlers","plugin","CrossOriginIframeMirror","generateIdFn","remoteId","idToRemoteMap","remoteToIdMap","idToRemoteIdMap","remoteIdToIdMap","map","ids","IframeManagerNoop","IframeManager$1","crossOriginMessageEvent","transformedEvent","style","iframeMirror","ShadowDomManagerNoop","ShadowDomManager","iframeElement","iframeWindow","manager","option","chars","lookup","i$1","CanvasManagerNoop","StylesheetManager","linkEl","adoptedStyleSheetData","_linkEl","ProcessedNodeManager","thisBuffer","wrappedEmit","_takeFullSnapshot","cleanFrame","mirror","record","emit","checkoutEveryNms","checkoutEveryNth","_maskInputOptions","_slimDOMOptions","maxCanvasSize","packFn","mousemoveWait","recordDOM","recordCrossOriginIframes","recordAfter","collectFonts","plugins","errorHandler2","onMutation","getCanvasManager","inEmittingFrame","passEmitsToParent","lastFullSnapshotEvent","incrementalSnapshotCount","isCheckout","exceedCount","exceedTime","takeFullSnapshot2","wrappedMutationEmit","wrappedScrollEmit","wrappedCanvasMutationEmit","wrappedAdoptedStyleSheetEmit","iframeManager","IframeManager","processedNodeManager","canvasManager","_getCanvasManager","shadowDomManager","takeFullSnapshot","getCanvasManagerFn","t2","ReplayEventTypeIncrementalSnapshot","ReplayEventTypeCustom","timestampToMs","timestampToS","addBreadcrumbEvent","INTERACTIVE_SELECTOR","getClosestInteractive","getClickTargetNode","getTargetNode","isEventWithTarget","onWindowOpen","monkeyPatchWindowOpen","originalWindowOpen","IncrementalMutationSources","handleClick","clickDetector","clickBreadcrumb","ClickDetector","slowClickConfig","_addBreadcrumbEvent","cleanupWindowOpen","nowInSeconds","ignoreElement","isClickBreadcrumb","newClick","click","timedOutClicks","hadScroll","hadMutation","isSlowClick","clickCount","timeAfterClickMs","endReason","setTimeout$3","SLOW_CLICK_TAGS","updateClickDetectorForRecordingEvent","isIncrementalEvent","isIncrementalMouseInteraction","createBreadcrumb","NodeType","ATTRIBUTES_TO_RECORD","getAttributesToRecord","normalizedKey","handleDomListener","handleDom","isClick","getBaseDomBreadcrumb","getDomTarget","handleKeyboardEvent","getKeyboardBreadcrumb","metaKey","shiftKey","ctrlKey","altKey","isInputElement","hasModifierKey","isCharacterKey","baseBreadcrumb","ENTRY_TYPES","createResourceEntry","createPaintEntry","createNavigationEntry","webVitalHandler","getter","createPerformanceEntries","createPerformanceEntry","entryType","getAbsoluteTime","decodedBodySize","domComplete","encodedBodySize","domContentLoadedEventStart","domContentLoadedEventEnd","domInteractive","loadEventStart","loadEventEnd","redirectCount","transferSize","initiatorType","responseEnd","responseStatus","getLargestContentfulPaint","lastEntry","getWebVital","isLayoutShift","getCumulativeLayoutShift","layoutShifts","nodes","nodeIds","getFirstInputDelay","getInteractionToNextPaint","attributions","rating","setupPerformanceObserver","addPerformanceEntry","onEntries","clearCallbacks","clearCallback","_addBreadcrumb","makeReplayLogger","_capture","_trace","logger$1","EventBufferSizeExceededError","EventBufferArray","eventSize","eventsRet","WorkerHandler","worker","EventBufferCompressionWorker","EventBufferProxy","hasCheckout","waitForCheckout","addEventPromises","createEventBuffer","useCompression","customWorkerUrl","_loadWorker","workerUrl","_getWorkerUrl","hasSessionStorage","clearSession","deleteSession","isSampled","started","lastActivity","segmentId","previousSessionId","saveSession","getSessionSampleType","sessionSampleRate","allowBuffering","createSession","stickySession","fetchSession","sessionStringFromStorage","sessionObj","isExpired","initialTime","expiry","targetTime","isSessionExpired","maxReplayDuration","sessionIdleExpire","shouldRefreshSession","loadOrCreateSession","sessionOptions","existingSession","isCustomEvent","addEventSync","shouldAddEvent","_addEvent","addEvent","eventBuffer","isBufferMode","replayOptions","eventAfterPossibleCallback","maybeApplyCallback","isExceeded","timestampInMs","isReplayEvent","isFeedbackEvent","handleAfterSendEvent","handleTransactionEvent","handleErrorEvent","replayContext","beforeErrorSampling","handleBeforeSendEvent","handleHydrationError","exceptionValue","handleBreadcrumbs","beforeAddBreadcrumb","isBreadcrumbWithCategory","normalizeBreadcrumb","normalizeConsoleBreadcrumb","isTruncated","normalizedArgs","normalizedArg","isRrwebError","resetReplayIdOnDynamicSamplingContext","addFeedbackBreadcrumb","shouldSampleForBufferEvent","handleGlobalEventListener","createPerformanceSpans","handleHistory","handleHistorySpanListener","shouldFilterRequest","addNetworkBreadcrumb","getBodySize","textEncoder","formDataStr","parseContentLengthHeader","size","mergeWarning","info","warning","newMeta","existingWarnings","makeNetworkReplayBreadcrumb","buildSkippedNetworkRequestOrResponse","bodySize","buildNetworkRequestOrResponse","normalizedBody","warnings","normalizeNetworkBody","getAllowedHeaders","allowedHeaders","filteredHeaders","exceedsSizeLimit","isProbablyJson","_strIsProbablyJson","truncatedBody","first","urlMatches","urls","getFullUrl","baseURI","fixedUrl","captureFetchBreadcrumbToReplay","_prepareFetchData","enrichFetchBreadcrumb","reqSize","resSize","requestBodySize","responseBodySize","captureDetails","_getRequestInfo","_getResponseInfo","networkCaptureBodies","networkRequestHeaders","getRequestHeaders","requestBody","bodyStr","networkResponseHeaders","getAllHeaders","bodyText","_parseFetchResponseBody","getResponseData","_tryCloneResponse","_tryGetResponseText","allHeaders","getHeadersFromOptions","_getResponseText","txt","captureXhrBreadcrumbToReplay","_prepareXhrData","enrichXhrBreadcrumb","_getBodySize","getResponseHeaders","requestWarning","responseBody","responseWarning","_getXhrResponseBody","errors","_parseXhrResponse","responseType","handleNetworkBreadcrumbs","networkDetailAllowUrls","networkDetailDenyUrls","beforeAddNetworkBreadcrumb","_isXhrBreadcrumb","_isXhrHint","_isFetchBreadcrumb","_isFetchHint","addGlobalListeners","autoFlushOnFeedback","feedbackEvent","addMemoryEntry","createMemoryEntry","memoryEntry","jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize","debounce","callbackReturnValue","timerId","maxTimerId","maxWait","invokeFunc","cancelTimers","debounced","NAVIGATOR","getRecordingSamplingOptions","getHandleRecordingEmit","hadFirstEvent","_isCheckout","addSettingsEvent","earliestEvent","createOptionsEvent","createReplayEnvelope","replayEvent","recordingData","prepareRecordingData","payloadWithSequence","replayHeaders","sequence","prepareReplayEvent","event_id","eventHint","preparedEvent","sendReplayRequest","segment_id","eventContext","preparedRecordingData","errorIds","traceIds","initialTimestamp","baseEvent","TransportStatusCodeError","RateLimitError","sendReplay","replayData","retryConfig","onError","THROTTLED","SKIPPED","throttle","maxCount","durationSeconds","_cleanup","_getTotalCount","isThrottled","wasThrottled","ReplayContainer","recordingOptions","slowClickTimeout","slowClickIgnoreSelectors","experiments","errorSampleRate","requiresManualStart","canvasOptions","forceFlush","continueRecording","activityTime","hasStoppedRecording","cbResult","lastActiveSpan","lastRootSpan","_lastActivity","initialTimestampInSeconds","_context","dropReason","force","tooShort","tooLong","_flushInProgress","mutationLimit","mutationBreadcrumbLimit","overMutationLimit","getOption","selectors","defaultSelectors","getPrivacyOptions","mask","unmask","block","unblock","ignore","defaultBlockedElements","maskSelector","unmaskSelector","maskAttribute","maskAttributes","privacyOptions","MEDIA_SELECTORS","DEFAULT_NETWORK_HEADERS","_initialized","replayIntegration","Replay","flushMinDelay","flushMaxDelay","minReplayDuration","_experiments","blockAllMedia","maskFn","beforeAddRecordingEvent","_getMergedNetworkHeaders","finalOptions","loadReplayOptionsFromClient","canvasIntegration","initialOptions","opt","replaysSessionSampleRate","replaysOnErrorSampleRate","CanvasContext","CanvasContext2","encode","arraybuffer","bytes","base64","canvasVarMap","variableListFor$1","ctor","contextMap","saveWebGLVar","isInstanceOfWebGLObject","serializeArg","src","serializeArgs","initCanvas2DMutationObserver","blockClass2","props2D","recordArgs","hookHandler","getNormalizedContextName","contextType","initCanvasContextObserver","setPreserveDrawingBufferToTrue","ctxName","contextAttributes","patchGLPrototype","_mirror2","props","mutation","initCanvasWebGLMutationObserver","r$1","t$1","CanvasManager","enableManualSnapshot","canvasContextReset","fps","rafId","canvas2DReset","canvasWebGL1and2Reset","canvasElement","isManualSnapshot","timeBetweenSnapshots","getCanvas","canvasElement2","matchedCanvas","searchCanvas","root","window2","takeCanvasSnapshots","bitmap","setLatestRAFTimestamp","valuesWithType","type2","CANVAS_QUALITY","DEFAULT_MAX_CANVAS_SIZE","_replayCanvasIntegration","maxCanvasWidth","maxCanvasHeight","_canvasOptions","canvasManagerResolve","_canvasManager","quality","getCanvasManagerOptions","replayCanvasIntegration","responseToSpanId","spanIdToEndTimestamp","defaultRequestInstrumentationOptions","instrumentOutgoingRequests","traceFetch","traceXHR","trackFetchStreamPerformance","shouldCreateSpanForRequest","enableHTTPTimings","tracePropagationTargets","shouldAttachHeadersWithTargets","updatedTimestamp","createdSpan","addHTTPTimings","xhrCallback","isPerformanceResourceTiming","resourceTimingEntryToSpanData","resourceTiming","timingSpanData","targetUrl","resolvedUrl","currentOrigin","isSameOriginRequest","isRelativeSameOriginRequest","urlForSpanName","addTracingHeadersToXhrRequest","setHeaderOnXhr","sentryTraceHeader","sentryBaggageHeader","registerBackgroundTabDetection","cancelledStatus","BROWSER_TRACING_INTEGRATION_ID","DEFAULT_BROWSER_TRACING_OPTIONS","browserTracingIntegration","optionalWindowDocument","enableInp","enableLongTask","enableLongAnimationFrame","enableInteractions","enableStandaloneClsSpans","beforeStartSpan","markBackgroundSpan","instrumentPageLoad","instrumentNavigation","_collectWebVitals","latestRoute","_createRouteSpan","isPageloadTransaction","finalStartSpanOptions","idleSpan","setActiveIdleSpan","oldPropagationContext","emitFinish","startingUrl","maybeEndActiveSpan","getActiveIdleSpan","traceOptions","getMetaContent","startBrowserTracingPageLoadSpan","startBrowserTracingNavigationSpan","registerInteractionListener","metaName","metaTag","inflightInteractionSpan","registerInteractionTransaction","activeIdleSpan","currentRootSpanOp","ACTIVE_IDLE_SPAN_PROPERTY","init$1","REACT_RENDER_OP","REACT_UPDATE_OP","REACT_MOUNT_OP","reactIs_production_min","reactIsModule","reactIs","REACT_STATICS","KNOWN_STATICS","FORWARD_REF_STATICS","MEMO_STATICS","TYPE_STATICS","getStatics","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","targetStatics","sourceStatics","descriptor","hoistNonReactStatics_cjs","hoistNonReactStaticsImport.default","hoistNonReactStaticsImport","UNKNOWN_COMPONENT","Profiler","React.Component","disabled","updateProps","includeUpdates","changedProps","includeRender","renderSpan","withProfiler","WrappedComponent","componentDisplayName","Wrapped","React.createElement","ACTION_BREADCRUMB_CATEGORY","ACTION_BREADCRUMB_TYPE","defaultOptions","action","createReduxEnhancer","enhancerOptions","reducer","initialState","newState","transformedAction","transformedState","normalizationDepth","newStateContext","configureScopeWithState","_useEffect","_useLocation","_useNavigationType","_createRoutesFromChildren","_matchRoutes","_stripBasename","CLIENTS_WITH_INSTRUMENT_NAVIGATION","allRoutes","createReactRouterV6CompatibleTracingIntegration","useEffect","useLocation","useNavigationType","createRoutesFromChildren","matchRoutes","stripBasename","initPathName","handleNavigation","location","routes","basename","branches","isInDescendantRoute","locationIsInsideDescendantRoute","prefixWithSlash","rebuildRoutePathFromAllRoutes","getNormalizedName","stripBasenameFromPathname","pathname","startIndex","nextChar","sendIndexPath","pathBuilder","reconstructedPath","pathEndsWithWildcard","pathIsWildcardAndHasChildren","branch","routeIsDescendant","route","matchedRoutes","pickSplat","addRoutesToAllRoutes","getChildRoutesRecursively","pickPath","trimWildcard","trimSlash","strippedPath","newPath","getNumberOfUrlSegments","updatePageloadTransaction","createV6CompatibleWithSentryReactRouterRouting","Routes","SentryRoutes","isMountRenderPass","React.useRef","getActiveRootSpan","s","reactRouterV6BrowserTracingIntegration","withSentryReactRouterV6Routing","__assign","__spreadArray","pack","ar","shallowequal","objA","objB","compare","compareContext","ret","keysA","keysB","bHasOwnProperty","idx","valueA","valueB","MS","MOZ","WEBKIT","COMMENT","RULESET","DECLARATION","IMPORT","KEYFRAMES","LAYER","abs","assign","hash","length","charat","trim","indexof","search","substr","begin","strlen","sizeof","combine","filter","character","characters","children","siblings","copy","lift","prev","peek","caret","slice","token","alloc","dealloc","delimit","whitespace","escaping","commenter","identifier","compile","parse","rules","rulesets","pseudo","points","declarations","atrule","variable","scanning","ampersand","reference","comment","declaration","ruleset","post","j","prefix","serialize","stringify","middleware","collection","rulesheet","prefixer","unitlessKeys","define_process_env_default","C","$","Y","Z","ee","te","ne","oe","o","re","se","ie","ae","ce","le","ue","he","fe","ye","ve","ge","Se","we","be","Ee","Ne","Pe","Ce","Ie","Ae","Oe","De","Re","Te","ke","je","xe","Ve","Fe","d.RULESET","d.prefixer","d.stringify","d.compile","d.serialize","d.middleware","d.rulesheet","Me","ze","$e","Le","Ge","Ye","We","qe","He","Ue","Je","Xe","Ze","Ke","Qe","et","rt","it","E","at","ct","lt","ut","pt","dt","ht","ft","mt","SkapaDelayEnum","SkapaDurationEnum","SkapaFontSizeEnum","SkapaIconDurationEnum","SkapaTheme","CookieConsentDataSourceEnum","DexfSettingsEnvironmentEnum","DexfSettingsFilterSegmentEnum","EcommerceCartDataSourceEnum","ImageTypeNameEnum","ItemTypeEnum","ProductOptionalFieldNameEnum","CacheStore","GlobalCacheStore","REPLACERS","date","DateFormatter","dateString","format","parsedDate","fnc","LocaleUtility","locale","ExceptionTypeEnum","AbstractException","ConnectionProblemException","requestInfo","Exception","ServerErrorResponseException","ServiceException","UnableToParseServerResponseException","ProductPriceInformationSummaryTransformer","priceInformation","currency","priceInformationSummary","primaryCurrency","price","salesPrices","salesPrice","isFamilyAndNLPPrice","isFamily","isNLP","TotalPriceCalculator","shoppingProducts","dateFormat","currencyCode","isCombinedProduct","totalPrice","shoppingProductsWithQuantity","validDates","shoppingProduct","product","forcedCurrency","productPriceInformationSummary","familyValidDate","troValidDate","totalPrices","providedCurrencies","productFees","fee","validDate","DexfSettingsUtility","localizedInformation","getTheme","theme","COLORS","SCENE_COLORS","OutlineColor","fontSize","GlobalStyles","createGlobalStyle","byteToHex","unsafeStringify","getRandomValues","rnds8","rng","randomUUID","native","v4","rnds","MetadataManager_1","MetadataManager","applicationMetadata","moduleMetadata","registerApplication","applicationProps","registerModule","moduleProps","updateApplication","updateModule","moduleId","currentProps","getModuleMetadata","getApplicationMetadata","__importDefault","this","mod","SequenceNumberHandler_1","KEY","SequenceNumberHandler$1","updateValue","SequenceNumberHandler","TrackingIdEnum_1","TrackingIdEnum","IdGenerator_1","IdGenerator$1","xy","IdGenerator","SessionManager_1","require$$1","require$$2","require$$3","localStorageKeys","sessionStorageKeys","SessionManager$1","trackingId","pastId","newIdProps","sessionId","longTermId","ipexId","startSource","sourceDesignId","sourceSpr","idProps","applicationIdKey","SessionManager","IpexMomentEnum_1","IpexMomentEnum","CookieReader_1","CookieReader$1","cookieSeparated","gaCookie","cookieFields","CookieReader","EntryPoint_1","EntryPoint$1","entryPoint","EntryPoint","DesignInteractionEnum_1","DesignInteractionEnum","InsightsEventEnum_1","OtherEventsEnum","InsightsEventEnum","__awaiter","_arguments","generator","adopt","fulfilled","step","rejected","InsightsTarget_1","require$$4","require$$5","require$$6","require$$7","InsightsTarget$1","ipexMoment","eventData","eventBody","dev","domain","optionalParams","appData","pjson","require$$8","clientId","planningId","planningData","moduleData","moment","applicationId","InsightsTarget","GoogleAnalyticsTarget_1","TEAM","GoogleAnalyticsTarget$1","label","custom","appMeta","GoogleAnalyticsTarget","GaEventEnum_1","GaEventEnum","GaCategoryEnum_1","GaCategoryEnum","DesignSourceEnum_1","DesignSourceEnum","ArticleActionEnum_1","ArticleActionEnum","FlowHandler_1","FlowHandler$1","flowName","stepName","stepLevel","newFlow","flowIndex","FlowHandler","EventSender_1","require$$9","require$$10","require$$11","require$$12","EventSender$1","planning","designId","spr","mode","articleId","isGlobal","previousStepName","previousStepLevel","flow","EventSender","GAScriptLoader_1","GA_SCRIPT_URL","TYPE","GAScriptLoader$1","scriptLoaded","scripts","script","GAScriptLoader","PlatformEnum_1","PlatformEnum","ModuleClient_1","ModuleClient$1","insightsApi","abVersionName","abVersionVariation","ModuleClient","InsightsApi_1","InsightsApi$1","cookieReader","InsightsApi","DesignSaveModeEnum_1","DesignSaveModeEnum","lib","AnalyticsManager","CacheStoreType","CONNECTION_TIMEOUT","cacheStore","cacheItem","cacheItemDefault","resolves","rejects","ServiceFetch","CookieUtility","cookie","eqPos","OversattaTransformer","storeId","langId","localization","newLocalization","translations","newTranslations","application","pairs","country","language","newUrls","endpoints","newEndpoints","string","OversattaService","responses","transformer","transformed","localizedInformations","LocalizationService","endpointsCacheKey","overridesCacheKey","localizedCacheKey","queueCacheKey","cachedLocalized","cachedQueue","newQueue","service","DexfConfiguration","localizationPrefixApplication","localizationEndpoints","localizationOverrides","cache","localizationService","ItemUtility","maxItemsPerRequest","sets","currentSet","BitBoxUtility","messageListener","parsedData","BitboxCookieConsentService","consentLevel","cookieConsent","COOKIE_NAME","consentLevelMapping","ChinaCookieConsentService","OneWebCookieConsentService","cookieName","existingCookies","CookieConsentService","settings","DexfSettingsTransformer","dexfSettings","_g","_h","_i","DEXF_QA","DEXF_PROD","DexfSettingsService","dexfApplicationId","filterSegment","SettingsService","TranslationsTransformer","objectOrString","objectWithUpdatedKeys","updatedKey","InternalTranslationsService","TranslationsService","translationsCacheKey","cachedTranslations","ProductCache","fields","searchableProductMap","products","missing","store","cachedFields","hasMatch","cacheKey","productMap","newProductMap","DexfWebplannerService","sortedFields","promises","itemId","qs","ProductItemQueue","ProductService","productItemQueueKey","productItemQueue","itemsAndCallbacks","shoppingItems","shoppingItemsMap","shoppingItem","itemType","kompis","dexfApiKey","Scalar","epsilon","min","num","tx","maxDelta","amount","value1","tangent1","value2","tangent2","squared","cubed","part1","part2","part3","part4","number","percent","angle","ToGammaSpace","ToLinearSpace","PHI","Epsilon","ArrayTools","itemBuilder","_observeArrayfunction","functionName","oldFunction","newFunction","previousLength","observedArrayFunctions","_ObserveArray","unObserveFunctions","unObserveFunction","_RegisteredTypes","RegisterClass","GetClass","fqdn","PerformanceConfigurator","use64bits","matrix","EventState","skipNextObservers","currentTarget","Observer$1","Observable$1","Observable","onErrorObservable","observable","onObserverAdded","notifyIfTriggered","insertFirst","unregisterOnFirstCall","Observer","updateCounter","userInfo","obs","EngineStore","_ExtractAsInt","Vector2","otherVector","scale","cos","sin","value3","value4","left","right","vector","transformation","p0","p1","p2","sign","ref","segA","segB","l2","proj","Vector3","Quaternion","radius","theta","phi","vx","vy","vz","qx","qy","qz","qw","ty","tz","plane","MathTmp","denom","scaledV","other","absX","absY","absZ","order","tem","quaternion","point","vector0","vector1","axis","d0","d1","normal","v0","v1","dot","vNormal","forward","diff","TmpVectors","slerp","vector0Dir","vector1Dir","vector0Length","vector1Length","scale0","scale1","omega","invSin","goal","deltaTime","lerpTime","rightHandedSystem","rx","ry","rz","rw","world","transform","viewport","cw","ch","cx","cy","viewportMatrix","Matrix","inDirection","tmp","viewportWidth","viewportHeight","view","projection","sourceX","sourceY","sourceZ","screenSource","p1p0","p2p0","p2p1","vectorp0","p1p0L","p2p0L","p2p1L","nl","cosA","projVector","projP","s0","s1","edge","e0","e1","tmp2","tmp3","e0proj","e0projL","cosG","triProj","axis1","axis2","axis3","rotation","quat","Vector4","otherQuaternion","q1","conjugate","lengthSquared","zAxisY","sqw","sqz","sqx","sqy","m11","m12","m13","m21","m22","m23","m31","m32","m33","trace","quat0","quat1","vec","vecFrom","vecTo","yaw","pitch","roll","halfRoll","halfPitch","halfYaw","sinRoll","cosRoll","sinPitch","cosPitch","sinYaw","cosYaw","alpha","beta","gamma","halfGammaPlusAlpha","halfGammaMinusAlpha","halfBeta","rotMat","up","num2","num3","num4","flag","num5","num6","isIdentity","isIdentityDirty","isIdentity3x2","isIdentity3x2Dirty","m00","m01","m02","m03","m10","m20","m30","det_22_33","det_21_33","det_21_32","det_20_33","det_20_32","det_20_31","cofact_00","cofact_01","cofact_02","cofact_03","resultM","otherM","det","detInv","det_12_33","det_11_33","det_11_32","det_10_33","det_10_32","det_10_31","det_12_23","det_11_23","det_11_22","det_10_23","det_10_22","det_10_21","cofact_10","cofact_11","cofact_12","cofact_13","cofact_20","cofact_21","cofact_22","cofact_23","cofact_30","cofact_31","cofact_32","cofact_33","vector3","tm0","tm1","tm2","tm3","tm4","tm5","tm6","tm7","tm8","tm9","tm10","tm11","tm12","tm13","tm14","tm15","om0","om1","om2","om3","om4","om5","om6","om7","om8","om9","om10","om11","om12","om13","om14","om15","om","translation","preserveScalingNode","signX","signY","signZ","sx","sy","sz","rowVector","row","initialM11","initialM12","initialM13","initialM14","initialM21","initialM22","initialM23","initialM24","initialM31","initialM32","initialM33","initialM34","initialM41","initialM42","initialM43","initialM44","x2","y2","z2","xx","xz","yy","yz","zz","wx","wy","wz","identity","zero","c1","useYAxisForCoplanar","startValue","endValue","gradient","startM","endM","startScale","startRotation","startTranslation","endScale","endRotation","endTranslation","resultScale","resultRotation","resultTranslation","eye","xAxis","yAxis","zAxis","xSquareLength","ey","ez","back","znear","zfar","halfZRange","mtxConvertNDCToHalfZRange","bottom","top","i0","i1","projectionPlaneTilt","rot","fov","aspect","reverseDepthBufferMode","isVerticalFovFixed","zmin","zmax","mm","rm0","rm1","rm2","rm3","rm4","rm5","rm6","rm7","rm8","rm9","rm10","rm11","rm12","rm13","rm14","rm15","rm","temp","temp2","temp3","xaxis","yaxis","zaxis","zw","zx","yw","xw","Plane","norm","magnitude","invertedMatrix","normalX","normalY","normalZ","finalD","point1","point2","point3","x1","y1","z1","pyth","invPyth","direction","RENDER_LAYER_FORWARD","RENDER_LAYER_SHADOW","RENDER_LAYER_UI","RENDER_LAYER_IGNORE_RAYCAST","VIEWER_INTERNAL_RENDER_LAYER_SCREENSHOT","RenderLayerMask","layers","get_bitmap_of_render_layer","layer_mask","layer","RENDER_LAYER_MASK_ALL","RENDER_LAYER_MASK_RAYCASTABLE","RENDER_LAYER_MASK_DEFAULT","LightType","colorChannelToLinearSpace","color","colorChannelToLinearSpaceExact","colorChannelToGammaSpace","colorChannelToGammaSpaceExact","Color3","Color4","otherColor","intR","intG","intB","dm","exact","convertedColor","hue","saturation","chroma","hex","returnAsColor3","intA","color3","colors","colors4","newIndex","TmpColors","Deprecated","target_or_deprecation_info","property_key","handle_decorator","propertyKey","deprecation_info","warned","original_method","warning_log","original_setter","warning_message","deprecate","function_name","DEG2RAD","RAD2DEG","EPSILON_DISTANCE","EPSILON_DISTANCE_SQUARED","EPSILON_ANGLE_DEGREES","EPSILON_ANGLE_RADIANS","PARALLEL_DOT","ObjectPool","CONSTRUCTOR","vector2_pool","BABYLON_Vector2","vector3_pool","BABYLON_Vector3","vector4_pool","BABYLON_Vector4","quaternion_pool","BABYLON_Quaternion","matrix_pool","BABYLON_Matrix","determinant3x3","detA","detB","detC","imatrix4_equals_babylon_matrix","imatrix","bmatrix","temporary_compare_babylon_matrix","horizontal_to_vertical_fov","horizontal_fov","aspect_ratio","vertical_to_horizontal_fov","vertical_fov","clamp","lerp_float","dep_length","divs","rotate","delta_angle","rotation_axis","babylon_vector","radians","degrees","TrackedVec3","get_euler_angles_from_rotation_matrix","rotation_matrix","icolor_to_col4","BABYLON_Color4","vector_3","vec3","PRIMARY_COLOR","BABYLON_Color3","SECONDARY_COLOR","MIN_COLOR_DIFFERENCE","VISIBLE_LIGHT_COEFFICIENT","LINE_COLORS","ColorMode","LightVisualizer","_light","_line_manager","_color_mode","_scene","start_index","light_range_coefficient","intensity","intensity_quotient","thickness","light_color3","light_id","light_color4","shadow_far","line_thickness","LineType","start_point","endpoint","main_axis","center","num_segments","shape","num_lines","light_direction","light_position","far_circle","center_far","perp_vec","IVector3","cross_vec","polar_step","st","DataBuffer","Buffer","engine","updatable","stride","postponeInternalCreation","instanced","useBytes","divisor","kind","byteOffset","byteStride","VertexBuffer","vertexCount","isInstanced","updatableOrOptions","takeBufferOwnership","vertexData","typeByteLength","totalVertices","forceCopy","sizeInBytes","componentCount","componentType","componentIndex","dataView","componentByteLength","componentByteOffset","tightlyPackedByteStride","remainder","__decorate","decorators","desc","AndOrNotEvaluator","evaluateCallback","parenthesisContent","or","ori","and","andj","booleanString","Tags","tagsString","tagsQuery","asString","tagsArray","tag","warnedMap","_WarnImport","warnOnce","__decoratorInitialStore","__mergedStore","_copySource","creationFunction","instanciate","destination","classStore","getMergedStore","textureMap","sourceProperty","propertyType","SerializationHelper","getDirectStore","classKey","currentKey","initialStore","generateSerializableMember","sourceName","generateExpandMember","setCallback","targetKey","expandToProperty","serializeAsTexture","serializeAsColor3","serializeAsFresnelParameters","serializeAsVector2","serializeAsVector3","serializeAsMeshReference","serializeAsColorCurves","serializeAsColor4","serializeAsImageProcessingConfiguration","serializeAsQuaternion","serializeAsMatrix","animationIndex","animation","entity","serializationObject","serializedProperties","targetPropertyName","scene","rootUrl","dest","nativeOverride","predicate","jsFunc","nativeFunc","_InternalNodeDataInfo","Node$2","Node","constructorFunc","previousParentNode","rootNodes","lastIdx","behavior","attachImmediately","trigger","_initialCall","_ignoreParentClass","_completeCheck","_property","ancestor","results","directDescendantsOnly","nAnimations","deleteFrames","newParent","doNotCloneChildren","directDescendants","animationRanges","loop","speedRatio","onAnimationEnd","serializationRanges","localRange","_force","doNotRecurse","disposeMaterialAndTextures","parsedNode","includeDescendants","thisAbstractMesh","boundingInfo","descendants","descendant","childMesh","boundingBox","minBox","maxBox","_from","_to","Logger$1","Logger","padStr","formattedMessage","IsWindowObjectExist","IsNavigatorAvailable","IsDocumentAvailable","GetDOMTextContent","CloneValue","destinationObject","shallowCopyValues","GetAllPropertyNames","DeepCopier","doNotCopyList","mustCopyList","properties","sourceValue","typeOfSourceValue","clonedValue","PrecisionDate","createXMLHttpRequest","WebRequest","update","FilesInputStore","RetryStrategy","maxRetries","baseInterval","retryIndex","BaseError","ErrorCodes","RuntimeError","errorCode","innerError","Decode","EncodeArrayBufferToBase64","keyStr","chr1","chr2","chr3","enc1","enc2","enc3","enc4","DecodeBase64ToString","base64Data","DecodeBase64ToBinary","decodedString","bufferLength","bufferView","defaultAttributeKeywordName","defaultVaryingKeywordName","ShaderCodeNode","preprocessors","attributeKeyword","varyingKeyword","ShaderCodeCursor","trimmedLine","semicolonIndex","subLine","ShaderCodeConditionNode","ShaderCodeTestNode","ShaderDefineExpression","postfix","infix","stackIdx","pushOperand","operand","push","pop","sortedCache","ShaderDefineIsDefinedOperator","define","not","condition","ShaderDefineOrOperator","ShaderDefineAndOperator","ShaderDefineArithmeticOperator","testValue","ShaderLanguage","regexSE","regexSERevert","regexShaderInclude","regexShaderDecl","regexLightX","regexX","reusableMatches","ShaderProcessor","sourceCode","codeWithIncludes","migratedCode","vertexCode","fragmentCode","shouldUseHighPrecisionShader","expression","operators","operator","indexOperator","command","cursor","rootNode","ifNode","first5","elseNode","elifNode","newRootNode","newNode","defines","preparedSourceCode","keepProcessing","includeFile","includeContent","splits","indexString","indexSplits","minIndex","maxIndex","sourceIncludeContent","newParts","splitPart","includeShaderUrl","fileContent","onSuccess","onProgress","offlineProvider","useArrayBuffer","ShaderStore","shaderLanguage","Effect","EngineShaderStore","repo","baseName","attributesNamesOrOptions","uniformsNamesOrEngine","samplers","fallbacks","onCompiled","indexParameters","shaderProcessor","keepExistingPipelineContext","vertexSource","fragmentSource","hostDocument","processorOptions","shaderCodes","shadersLoaded","migratedVertexCode","migratedFragmentCode","codeBeforeMigration","finalShaders","vertex","uniformName","effect","previousPipelineContext","shader","optionalKey","shaderCode","shaderBinary","shaderStore","shaderUrl","vertexSourceCode","fragmentSourceCode","scenes","attributesNames","rebuildRebind","code","isFragment","regexp","errorLine","lineNumber","uniform","lineErrorVertex","lineErrorFragment","notifyErrors","channel","texture","textures","exName","initialPos","currentExName","channelIndex","postProcess","bufferName","blockName","matrices","bool","vector2","vector4","color4","pixelShader","vertexShader","DepthCullingState","reset","gl","StencilState","AlphaState","value0","rgb","TextureSampler","wrapU","wrapV","wrapR","anisotropicFilteringLevel","samplingMode","comparisonFunction","InternalTextureSource","InternalTexture","delayAllocation","swapAndSetIsReady","proxyInternalTexture","proxy","swapAll","WebGLShaderProcessor","processingContext","varyingRegex","WebGL2ShaderProcessor","varying","_isFragment","hasDrawBuffersExtension","hasOutput","WebGLDataBuffer","WebGLPipelineContext","uniformBuffersNames","uniformsNames","uniforms","samplerList","changed","WebGLHardwareTexture","existingTexture","hardwareTexture","DrawWrapper","createMaterialContext","resetContext","StencilStateComposer","stencilMaterialEnabled","BufferPointer","ThinEngine","useReverse","dimensions","faceData","cubeData","activate","canvasOrContext","antialias","adaptToDeviceRatio","_j","_k","_l","devicePixelRatio","limitDeviceRatio","ua","targets","capture","constraint","versionToLog","currentUA","initEngine","depthTest","depthFunc","depthMask","stencilTest","currentState","internalTexture","renderTargetWrapper","uniformBuffer","storageBuffer","rendererInfo","drawBuffersExtension","depthTextureExtension","vertexArrayObjectExtension","instanceExtension","vertexhighp","fragmenthighp","blendMinMaxExtension","sRGBExtension","slot","renderFunction","cancelAnimationFrame","shouldRender","useScreen","bindedRenderFunction","requester","backBuffer","stencil","useStencilGlobalOnly","setBackBufferColor","textureFormat","textureType","requiredWidth","requiredHeight","forceSetSize","changeRatio","boundingRect","rtWrapper","faceIndex","forceFullscreenViewport","lodLevel","webglRTWrapper","depthStencilTexture","culling","zOffset","reverseSide","cullBackFaces","zOffsetUnits","cullFace","frontFace","enable","framebuffer","disableGenerateMipMaps","onBeforeUnbind","_updatable","_label","usage","vbo","dataBuffer","indices","pipelineContext","program","uniformLocation","indx","pointer","indexBuffer","vertexBuffers","overrideVertexBuffers","ai","vertexBuffer","vao","vertexArrayObject","vertexDeclaration","vertexStrideSize","attributesCount","boundBuffer","ul","instancesBuffer","offsetLocation","offsetLocations","attributesInfo","computeStride","attributeLocation","shouldClean","useTriangles","indexStart","indexCount","instancesCount","verticesStart","verticesCount","fillMode","drawMode","indexFormat","mult","webGLPipelineContext","globalDefines","fullDefines","compiledEffect","shaderVersion","tempError","transformFeedbackVaryings","fragmentShader","shaderProcessingContext","shaderProgram","createAsRaw","rawVertexSourceCode","rawFragmentSourceCode","webGLRenderingState","oldHandler","bruteForce","generateMipMaps","magFilter","minFilter","delayGPUTextureCreation","useSRGBBuffer","samples","filters","sizedFormat","internalFormat","noMipmap","invertY","onLoad","prepareTexture","prepareTextureProcessFunction","fallback","forcedExtension","mimeType","loaderOptions","fromData","fromBlob","isBase64","originalUrl","lastDot","extension","loader","availableLoader","onLoadObserver","onInternalError","loadMipmap","isCompressed","loadFailed","onload","img","creationFlags","potWidth","potHeight","continuationCallback","isPot","tip","maxTextureSize","babylonFormat","fileExtension","imageBitmapOptions","onComplete","compression","generateStencil","bilinearFiltering","samplingParameters","lod","imageData","babylonInternalFormat","useTextureWidthAndHeight","lodMaxWidth","lodMaxHeight","xOffset","yOffset","targetForBinding","bindTarget","processFunction","generateStencilBuffer","generateDepthBuffer","depthFormat","msInternalFormat","unbindBuffer","renderBuffer","forTextureDataUpdate","wasPreviouslyBound","isTextureForRendering","sourceSlot","isPartOfTextureArray","videoInternalTexture","needToBind","textureWrapMode","anisotropicFilterExtension","parameter","successful","fb","readFormat","readType","hasAlpha","flushRenderer","numChannels","tempcanvas","pot","requestAnimationFrame","TimingTools","Base64DataUrlRegEx","LoadFileError","RequestFileError","ReadFileError","file","FileToolsOptions","_CleanUrl","SetCorsBehavior","LoadImage","usingObjectURL","onErrorHandler","inputText","LoadFile","imgBmp","handlersList","loadHandlersList","unloadHandlersList","loadHandler","cspHandler","cspException","noOfflineSupport","contentType","blob","_request","loadFromOfflineSupport","textureName","blobURL","ReadFile","reader","fileRequest","fileOrUrl","onOpened","fileName","TestBase64DataUrl","DecodeBase64UrlToBinary","DecodeBase64UrlToString","RequestFile","loadUrl","aborted","requestFile","retryHandle","onReadyStateChange","unbindEvents","onLoadEnd","handleError","retryLoop","IsFileURL","retryStrategy","waitTime","IsBase64DataUrl","uri","initSideEffects","FileTools","_injectLTSFileTools","InstantiationTools","internalClass","RandomGUID","Tools","strategy","pixels","wrappedU","wrappedV","returnUnchangedIfNoSlash","previousAngle","newAngle","smoothFactor","previousAngleRad","newAngleRad","allowsNullUndefined","eventPrefix","referrerPolicy","FileToolLoadImage","FileToolsLoadFile","scriptUrl","forceAbsoluteUrl","baseUrl","scriptId","head","fileToLoad","progressCallback","FileToolsReadFile","content","fileBlob","decimals","windowElement","successCallback","toArrayBuffer","binStr","newWindow","base64data","base64Image","camera","forceDownload","antialiasing","renderSprites","enableStencilBuffer","useLayerMask","counterName","isType","moduleName","classObj","AsyncLoop","iterations","syncedIterations","breakFunction","iteration","elements","ubo","UniformBuffer","dynamic","forceNoUniformBuffer","alignment","oldPointer","arraySize","totalPadding","mat","buf1","buf2","dst","arraySizes","countToFour","baseStride","suffix","uniformBuffers","LightConstants","Light","lightIndex","useSpecular","receiveShadows","iAsString","needUpdate","scaledIntensity","shadowGenerator","fullDetails","mesh","iterator","clonedLight","parsedLight","light","parsedAnimation","oldPush","oldSplice","deleteCount","deleted","photometricScale","lightTypeID","photometricMode","apexAngleRadians","SmartArray","capacity","compareFn","SmartArrayNoDuplicate","Viewport","renderWidth","renderHeight","Frustum","frustumPlanes","frustumPlane","Camera","newPosition","halfWidth","halfHeight","rigCamera","setActiveOnSceneIfNoneActive","completeCheck","pp","ignoreParentClass","isSynchronized","_ignored","_noPreventDefault","ppIndex","firstPostProcess","cam","rigPostProcess","insertAt","_m","_o","_p","_q","_r","_s","_t","_u","reverseDepth","getProjectionMatrix","arcRotateCamera","targetCamera","checkRigCameras","refRay","rigParams","leftCamera","rightCamera","cameraIndex","localAxis","interaxial_distance","isStereoscopicSideBySide","parsedCamera","construct","handednessMultiplier","StringDictionary","factory","curVal","cur","AbstractScene","jsonData","container","parserName","skeleton","MaterialDefines","externalProperties","disposed","defValue","ColorCurves","colorCurves","positiveUniform","neutralUniform","negativeUniform","uniformsList","density","exposure","brightness","ImageProcessingConfiguration","samplersList","forPostProcess","overrideAspectRatio","inverseWidth","inverseHeight","aspectRatio","vignetteScaleY","vignetteScaleX","vignetteScaleGeometricMean","vignettePower","textureSize","parsed","PickingInfo","useWorldCoordinates","useVerticesNormals","tmp0","tmp1","normals","normal0","normal1","normal2","vertex1","vertex2","vertex3","p1p2","p3p2","transformNormalToWorld","pickedMesh","wm","normalForDirectionChecking","uvSet","uvs","uv0","uv1","uv2","ActionEvent","pointerX","pointerY","meshUnderPointer","sourceEvent","additionalData","prim","pointerPos","PostProcessManager$1","vertices","vb","sourceTexture","postProcesses","targetTexture","doNotBindFrambuffer","doNotPresent","RenderingGroup","opaqueSortCompareFn","alphaTestSortCompareFn","transparentSortCompareFn","customRenderFunction","renderParticles","activeMeshes","stencilState","excludedMeshes","edgesRendererIndex","subMeshes","sortCompareFn","transparent","subIndex","subMesh","cameraPosition","sortedArray","material","meshA","meshB","spriteManager","particleSystem","activeCamera","particleIndex","emitter","RenderingGroupInfo","RenderingManager","renderingGroupId","renderingGroup","renderingGroupMask","autoClear","group","autoClearDepthStencil","SceneComponentConstants","Stage","PointerEventTypes","PointerInfoBase","PointerInfoPre","localX","localY","PointerInfo","pickInfo","inputManager","AbstractActionManager","tAsInt","KeyboardEventTypes","KeyboardInfo","KeyboardInfoPre","DeviceType","PointerInput","NativePointerInput","DualShockInput","DualSenseInput","XboxInput","SwitchInput","DeviceInputEventType","EventConstants","DeviceEventFactory","deviceType","deviceSlot","inputIndex","deviceInputSystem","elementToAttachTo","pointerId","buttons","isKeyboardActive","NativeDeviceInputSystem","onDeviceConnected","onDeviceDisconnected","onInputChanged","MAX_KEYCODES","MAX_POINTER_INPUTS","WebDeviceInputSystem","device","currentValue","inputElement","inputs","deviceSlotKey","gamepads","gamepad","currentX","currentY","numberOfInputs","kbKey","deviceEvent","keyCode","previousHorizontal","previousVertical","passiveSupported","gp","deviceName","DeviceSource","InternalDeviceSourceManager","numberOfDeviceTypes","deviceSource","DeviceSourceManager","devices","_ClickInfo","InputManager$1","InputManager","canvasRect","pickResult","isMeshPicked","pointerInfo","pi","actionManager","pointerEventInit","doubleTap","clickInfo","doubleClickActionManager","pickedDownActionManager","attachUp","attachDown","attachMove","act","btn","obs1","obs2","checkPicking","needToIgnoreNext","checkSingleClickImmediately","delayedClick","checkDoubleClick","prevEvt","underPointerMesh","PerfCounter","newCount","fetchResult","newFrame","UniqueIdGenerator","PointerPickingConfiguration","ScenePerformancePriority","Scene","variableName","isVector3","eyePosition","invertNormal","newStepId","cameras","serializableComponent","fullOptions","PostProcessManager","localRay","collider","visibility","checkRenderTargets","currentRenderPassId","hardwareInstancedRendering","execFunc","wasLoading","viewL","projectionL","viewR","projectionR","sceneUbo","newMesh","recursive","toRemove","newTransformNode","lastNode","index2","animationName","targetMask","lastMaterial","newLight","newCamera","newSkeleton","newParticleSystem","newAnimation","newAnimationGroup","newMultiMaterial","newMaterial","newMorphTargetManager","newGeometry","newActionManager","newTexture","attachControl","allowMultiMaterials","uniqueId","skeletonIndex","boneIndex","geometry","lastGeometry","transformNode","bone","managerIndex","morphTargetManager","postProcessIndex","initialMesh","forcePush","skipEvaluateActiveMeshes","freezeMeshes","keepFrustumCulling","psLength","meshes","meshToRender","sourceMesh","clear","rtt","rigParent","bindFrameBuffer","skipInitialClear","softwareSkinnedMeshIndex","needRebind","renderIndex","renderTarget","hasSpecialRenderTargetCamera","actionIndex","parameters","otherMesh","areIntersecting","currentIntersectionInProgress","parameterMesh","defaultFrameTime","defaultFPS","stepsTaken","maxSubSteps","internalSteps","passId","updateCameras","ignoreAnimations","currentActiveCamera","customIndex","animatable","activeRequests","itemsCopy","meshIndex","baseTexture","filterPredicate","cameraViewSpace","enableDistantPicking","fastCheck","trianglePredicate","warn","ray","system","spriteMgr","listByTags","useOfflineSupport","addClipPlaneUniforms","prepareStringDefinesForClipPlanes","primaryHolder","secondaryHolder","clipPlane","clipPlane2","clipPlane3","clipPlane4","clipPlane5","clipPlane6","prepareDefinesForClipPlanes","bindClipPlane","setClipPlane","MaterialHelper","useLogarithmicDepth","pointsCloud","fogEnabled","alphaTest","applyDecalAfterDetail","wasOrtho","wasPersp","isOrtho","isPersp","useInstances","useClipPlane","useThinInstances","materialSupportsBoneTexture","prePassRenderer","nonExcluded","useVertexColor","useBones","useMorphTargets","useVertexAlpha","useBakedVertexAnimation","hasVertexColors","previousMultiview","needAlphaBlending","previousDefine","previousDefine16Bits","canRenderToMRT","previousPrePass","texturesList","specularSupported","shadowMap","maxSimultaneousLights","disableLighting","caps","projectedLightTexture","uniformBuffersList","updateOnlyBuffersList","uniformsListOrOptions","rank","lightFallbackRank","attribs","influencers","maxAttributesCount","tangent","uv","needsPreviousMatrices","linearSpace","prePassConfiguration","boneTexture","abstractMesh","Size","otherSize","ThinTexture","BaseTexture","sceneOrEngine","ratio","isCube","correctedUseSRGBBuffer","texturesCache","texturesCacheEntry","noDataConversion","maxWidth","maxHeight","allowEmptyName","numRemaining","onLoadObservable","GenerateBase64StringFromPixelData","npixels","canvas2","ctx2","GenerateBase64StringFromTexture","GenerateBase64StringFromTextureAsync","CompatibilityOptions","Texture","noMipmapOrOptions","deleteBuffer","gammaSpace","load","loadObserver","uBase","flagMaterialsAsTextureDirty","projectionMatrix","savedName","parsedTexture","parsedCustomTexture","hasInternalTextureUniqueId","onLoaded","mirrorTexture","renderTargetTexture","probe","jsonTexture","renderTargetSize","RenderTargetWrapper","initializeBuffers","isMulti","disposePrevious","faces","face","rtw","textureArray","generateDepthTexture","textureCount","lastTextureSource","samplingModes","types","formats","targetTypes","layerIndex","layerCounts","internalTexture2Index","optionsMRT","bilinear","disposeOnlyFramebuffers","WebGLRenderTargetWrapper","depthbuffer","attachmentIndex","faceIndexOrLayer","currentFB","noColorAttachment","colorAttachment","currentFrameBuffer","hasStencil","glRtWrapper","colorRenderbuffer","PerformanceMonitor","frameSampleSize","RollingAverage","timeMs","history","bottomValue","noDepthWriteChange","equation","allocateAndCopyTypedBuffer","sizeOrDstBuffer","copyBuffer","dummy","byteLength","dataLength","Engine","imageSource","imageBitmap","bufferWidth","bufferHeight","engineIndex","sceneIndex","hostWindow","viewportOwner","unbind","stencilFunc","operation","currentViewport","clearColor","numDrawCalls","shaders","postProcessInput","requestPointerLock","camIndex","transformFeedback","hostingScene","hasMipMaps","sync","flags","intervalms","check","outputBuffer","loadingScreen","constraints","requestFunction","anyDoc","font","div","fontAscent","fontHeight","EffectRenderer","effectWrapper","outputTexture","EffectWrapper","creationOptions","effectCreationOptions","uniformNames","passPixelShader","DumpTools","renderer","data2","fileReader","arrayBuffer","RenderTargetTexture","doNotChangeAspectRatio","_functionName","newLength","numPasses","createRenderPassIds","dispose","newSize","wasCube","useCameraPostProcess","dumpForDebug","checkReadiness","sceneMeshes","sceneCamera","numLayers","currentRenderList","defaultRenderList","defaultRenderListLength","renderDimension","curved","currentRenderListLength","checkLayerMask","sceneRenderId","saveGenerateMipMaps","PostProcess","postProcessName","customShaderCodeProcessing","fragmentUrl","reusable","vertexUrl","blockCompilation","newUniforms","newSamplers","shaderType","textureOptions","tex","currentRenderId","currentlyUsed","needMipMaps","forceDepthStencil","firstPP","desiredWidth","desiredHeight","parsedPostProcess","postProcessType","BlurPostProcess","kernel","_blockCompilation","centerIndex","offsets","weights","totalWeight","linearSamplingWeights","linearSamplingOffsets","linearSamplingMap","sharedCell","weightLinear","offsetLinear","maxVaryingRows","freeVaryingVec2","varyingCount","depCount","idealKernel","sigma","denominator","exponent","decimalFigures","EffectFallbacks","currentDefines","currentFallbacks","ShadowGenerator","bias","normalBias","filteringQuality","contactHardeningLightSizeUVRatio","darkness","mapSize","usefullFloatFirst","useRedTextureType","shadowGenerators","opaqueSubMeshes","alphaTestSubMeshes","transparentSubMeshes","depthOnlySubMeshes","clearZero","clearOne","targetSize","isTransparent","renderingMesh","effectiveMesh","detNeg","sideOrientation","reverseSideOrientation","batch","shadowDepthWrapper","drawWrapper","isInstance","worldOverride","localOptions","renderList","checkReady","subMeshEffect","cachedDefines","needAlphaTesting","alphaCutOff","morphInfluencers","join","shaderName","attrib","sampler","lightPosition","parsedShadowGenerator","constr","calculate_world_transform","scene_object","parent_object","new_transform","calculate_transform_from_parent_world_transform","parent_transform","parent_rotation","parent_rotation_quat","child_rotation_quat","rotation_quat","vec3_offset_scaled","parent_scale","rotated_offset","parent_position","new_position","new_scale","calculate_direction_from_parent_world_transform","rotation_quaternion","new_direction","remove_on_call","_observable","has_enabled_observer","observers_changed_callback","sender","Watcher","subscriber","watching","subsciption","subscription","SELECTABLE_DEFINITIONS","PERSISTENT_DEFINITIONS","DESCRIPTIONS","Debug","config","Persistent","Selectable","setup","tab","instance","tab_tag","to_text","initial_value","Light_1","vector_to_color","_viewer","IColor","object_id","parent_world_transform","degrees_kelvin","linear_color","vector_sum","material_id","affects_parent","parent_color_is_dirty","parent_material","assert","update_from_partial","get_or_set_map_value","key_from_value_map","map_key","map_value","is_value_primitive","deep_equals","current_depth","max_depth","field","a_value","b_value","is_polygon_offset_bias","SHADOW_DEFAULTS","ShadowController","_babylon_light","_light_system","_shadow_resolution","_shadow_near","_shadow_far","meshes_modifications","shadowmap","refresh_rate","pre_warm","use_red_rendertarget","use_full_float","BABYLON_ShadowGenerator","restore_z_offset","restore_z_offset_units","z_factor","z_units","BABYLON_RenderTargetTexture","IVector2","dx","dy","scalar","dot_product","magnitude_product","dz","addend","sum","subtrahend","multiplier","inverse_amount","plane_normal","ortho_component","IVector4","dw","unknown","color1","color2","kelvin","temperature_scaled","red","green","blue","IColor4","IMatrix4","angle_in_radians","row0","row1","row2","scaleX","scaleY","scaleZ","m14","m24","m34","m41","m42","m43","m44","det_33_44","det_32_44","det_32_43","det_31_44","det_31_43","det_31_42","cofact_14","det_23_44","det_22_44","det_22_43","det_21_44","det_21_43","det_21_42","det_23_34","det_22_34","det_21_34","det_inv","cofact_24","cofact_34","cofact_41","cofact_42","cofact_43","cofact_44","inverse_position","matrix1","matrix2","transposed","approximate_up","IRay","bounding_box","out_intersection_distances","tmin","tmax","t1","sphere","oc","inverse_dot","intersection_distance","IBoundingSphere","bounding_sphere","IBoundingBox","ITransformedBoundingBox","local_bounding_box","bounds","local_plane","bound","effective_bound","CardinalDirection","DracoDecoderSource","CameraMode","CameraTransitionPreset","ExposurePreset","TransitionState","CameraTransition","from_camera","to_camera","engine_camera","AOQualityPreset","RenderLayerAllocation","ViewerOptionalFeatures","ScreenshotMimeType","AnimationProperty","AnimationInterpolationFunction","inlineScheduler","coroutine","onStep","createYieldingScheduler","yieldAfterMS","runCoroutine","scheduler","abortSignal","resume","reschedule","stepResult","runCoroutineSync","runCoroutineAsync","makeSyncFunction","coroutineFactory","IntersectionInfo","bu","bv","BoundingBox","worldMatrix","minX","minY","minZ","maxX","maxY","maxZ","vectors","factor","tmpVectors","newRadius","minWorld","maxWorld","directions","vectorsWorld","pointX","pointY","pointZ","myMin","myMax","myMinX","myMinY","myMinZ","myMaxX","myMaxY","myMaxZ","box0","box1","minPoint","maxPoint","sphereCenter","sphereRadius","boundingVectors","canReturnFalse","BoundingSphere","tempRadiusVector","tempVector","squareDistance","sphere0","sphere1","radiusSum","_result0","_result1","computeBoxExtents","box","r0","r1","axisOverlap","BoundingInfo","minimum","maximum","extend","toEncapsulate","invw","precise","MathHelpers","extractMinAndMaxIndexed","extractMinAndMax","SubMesh","createIfNotExisting","disposeWrapper","materialContext","materialIndex","createBoundingBox","addToMesh","replacementMesh","getDefaultMaterial","rootMaterial","effectiveMaterial","enableAlphaMode","linesIndices","checkStopper","intersectionThreshold","intersectInfo","faceId","indexA","indexB","indexC","currentIntersectInfo","newRenderingMesh","minVertexIndex","maxVertexIndex","vertexIndex","VertexDataMaterialInfo","VertexData","meshOrGeometry","isAsync","matInfo","updateExtends","makeItUnique","coordinates","coordinate","transformedCoordinate","transformedNormal","flip","materialInfo","newMaterialInfo","others","use32BitsIndices","forceCloneIndices","mergeMaterialIds","enableCompletion","vertexDatas","indexOffset","vertexOffset","materialInfos","currentMaterialInfo","vertexDataList","matInfoA","matInfoB","vertexDataSource","totalIndices","indexSum","indicesOffset","positionsOffset","nonNullOthers","sumLen","transformRange","ret32","getElementCount","positionsElementCount","validateElementCount","elementCount","materialInfoSerializationObject","copyWhenShared","polygon","fUV","fColors","frontUVs","backUVs","p1p2x","p1p2y","p1p2z","p3p2x","p3p2y","p3p2z","faceNormalx","faceNormaly","faceNormalz","v1x","v1y","v1z","v2x","v2y","v2z","v3x","v3y","v3z","computeFacetNormals","computeFacetPositions","computeFacetPartitioning","computeDepthSort","faceNormalSign","distanceTo","xSubRatio","ySubRatio","zSubRatio","subSq","nbFaces","ox","oy","oz","b1x","b1y","b1z","b2x","b2y","b2z","b3x","b3y","b3z","block_idx_v1","block_idx_v2","block_idx_v3","block_idx_o","dsf","li","ln","lp","lu","parsedVertexData","tangents","uvs2","uvs3","uvs4","uvs5","uvs6","matricesIndices","matricesWeights","materialInfoFromJSON","Space","Axis","Coordinate","convertRHSToLHS","TransformNode","isPure","newRotation","newScaling","postMultiplyPivotMatrix","onNewNodeCreated","clone","newWorldMatrix","decompose","absolutePosition","absolutePositionX","absolutePositionY","absolutePositionZ","invertParentWorldMatrix","invLocalWorldMatrix","targetPoint","yawCor","pitchCor","rollCor","space","dv","rotationMatrix","parentRotationMatrix","quaternionRotation","tmat","preserveScalingSign","updatePivot","quatRotation","invParentMatrix","composedMatrix","currentRotation","affectedTransformNode","resetToPreviousParent","rotationQuaternion","parentWorldMatrix","tmpVector","finalScale","finalTranslation","finalRotation","translationMatrix","translationMatrixInv","finalMatrix","displacementVector","tempV3","accumulation","scaling","cameraWorldMatrix","cameraGlobalPosition","scaleMatrix","orientation","storedTranslation","eulerAngles","camInObjSpace","independentOfChildren","bakedMatrix","tmpRotationQuaternion","currentSerializationObject","parsedTransformNode","transformNodes","ignoreRotation","storedRotation","storedRotationQuaternion","sizeVec","maxDimension","_MeshCollisionData","_FacetDataStorage","_InternalAbstractMeshDataInfo","AbstractMesh","nb","sort","retryCount","oldValue","disable","renderPassId","collisionId","collidedMesh","initialCall","isIn","removed","renderId","intermediateRendering","amountRight","amountUp","amountForward","rotMatrix","translationDelta","defForwardMult","flipBack","twirlClockwise","tiltRight","applySkeleton","applyMorph","faceIndexCount","positionIndex","targetCount","targetMorph","influence","morphTargetPositions","matricesIndicesData","matricesWeightsData","needExtras","matricesIndicesExtraData","matricesWeightsExtraData","skeletonMatrices","tempMatrix","matWeightIdx","inf","weight","otherBoundingInfo","collisionEnabled","displacement","coordinator","transformMatrix","collisionsScalingMatrix","collisionsTransformMatrix","onlyBoundingInfo","worldToUse","skipBoundingInfo","pickingInfo","anySubmeshSupportIntersect","worldOrigin","pickedPoint","generators","bInfo","needs32bits","f1","f2","depthSortedFacet","bbSizeMax","sind","facetData","localPos","localNorm","projected","checkFace","facing","invMat","invVect","closest","tmpx","tmpy","tmpz","t0","projx","projy","projz","facetPositions","facetNormals","facetsInBlock","shortest","tmpDistance","fib","gpuMemoryOnly","upDirection","axisX","axisZ","checkVerticesInsteadOfIndices","SceneLoaderFlags","Geometry","disposeExistingBuffer","numOfMeshes","indexToBind","overrideVertexArrayObjects","vbs","vaos","needToUpdateSubMeshes","orig","shouldDispose","previousGeometry","tIndices","tTemp","tPositions","tNormals","arrayIdx","stopChecking","vbName","parsedGeometry","geometryUniqueId","geometryId","binaryInfo","positionsData","normalsData","tangentsData","uvsData","uvs2Data","uvs3Data","uvs4Data","uvs5Data","uvs6Data","colorsData","floatIndices","indicesData","subMeshesData","matricesIndex","parsedSubMesh","noInfluenceBoneIndex","matricesIndicesExtra","matricesWeightsExtra","firstZeroWeight","mweight","MaterialStencilState","MaterialPluginEvent","Material$1","Material","doNotAdd","setScene","forceMaterialDirty","overrideOrientation","reverse","targetMaterial","targetPlugin","meshId","currentHotSwapingState","clipPlaneState","allDone","lastError","tempSubMesh","forceDisposeEffect","forceDisposeTextures","notBoundToMesh","parsedMaterial","pluginClassName","pluginData","pluginClassType","MultiMaterial","subMaterial","cloneChildren","matIndex","subMat","forceDisposeChildren","parsedMultiMaterial","multiMaterial","subMatId","MeshLODLevel","distanceOrScreenCoverage","_CreationDataStorage","_InstanceDataStorage","_InstancesBatch","_ThinInstanceDataStorage","_InternalMeshDataInfo","Mesh","clonePhysicsImpostor","physicsEngine","impostor","ib","sortingOrderFactor","internalDataInfo","boundingSphere","bSphere","distanceToCamera","compareValue","compareSign","screenArea","meshArea","bypassInstanceData","kinds","forceInstanceSupport","renderPassIds","needToRecreate","submesh","subdivisionSize","positionFunction","computeNormals","oldGeometry","allowInstancedRendering","subMeshId","isReplacementMode","isInIntermediateRendering","onlyForInstances","batchCache","visibleInstances","defaultRenderId","visibleInstanceCount","instanceStorage","currentInstancesBufferSize","instancesPreviousBuffer","bufferSize","renderSelf","needUpdateBuffer","instanceIndex","instanceMesh","m1","m2","onBeforeDraw","instanceCount","visibleInstancesForSubMesh","effectiveMeshReplacement","checkFrustumCulling","numActiveCameras","oldCameraMaxZ","oldCamera","instanceDataStorage","mainDeterminant","numWeights","recip","numberNotSorted","missingWeights","maxUsedWeights","numberNotNormalized","numInfluences","usedWeightCounts","toleranceEpsilon","lastWeight","usedWeights","tolerance","numBones","numBadBoneIndices","getBinaryData","materials","multiMaterials","submeshes","bakeIndependentlyOfChildren","minHeight","uvOffset","uvScale","forceUpdate","heightMapWidth","heightMapHeight","normalsCount","flipNormalGeneration","p3","localIndex","flattenNormals","separateVertices","previousSubmeshes","targetIndex","previousOne","flipNormals","vertex_data","numberPerEdge","currentIndices","segments","tempIndices","deltaPosition","deltaNormal","deltaUV","side","positionPtr","uvPtr","normalsPtr","currentUVs","currentPositions","currentColors","currentMatrixIndices","currentMatrixWeights","currentMatrixIndicesExtra","currentMatrixWeightsExtra","matrixIndices","matrixWeights","matrixIndicesExtra","matrixWeightsExtra","pstring","indexPtr","uniquePositions","ptr","facet","physicObject","jsonObject","vectorPositions","dupes","realPos","testedPosition","againstPosition","originalSubMeshes","serializationInstance","userThinInstance","morphTarget","parsedMesh","parsedInstance","thinInstances","hasNormals","tempVector3","minVector","maxVector","meshesOrMinMaxVector","minMaxVector","disposeSource","allow32BitsIndices","meshSubclass","subdivideWithSubMeshes","multiMultiMaterials","materialArray","materialIndexArray","indiceArray","currentOverrideMaterialSideOrientation","getVertexDataFromMesh","sourceVertexData","sourceTransform","meshVertexDatas","mergeCoroutine","mergeCoroutineStep","applyToCoroutine","applyToCoroutineStep","pathArray","closeArray","closePath","tessellation","diameter","diameterTop","diameterBottom","subdivisions","tube","radialSegments","tubularSegments","dashSize","gapSize","dashNb","holes","earcutInjection","cap","scaleFunction","rotationFunction","ribbonCloseArray","ribbonClosePath","xmin","xmax","precision","onReady","alphaFilter","radiusFunction","InstancedMesh","tempMaster","sourceMeshLODLevels","newSourceMesh","expectedSize","WorkerPool","workers","workerInfo","nextAction","AutoReleaseWorkerPool","maxWorkers","createWorkerAsync","indexOf","base64Js","toByteArray","fromByteArray","revLookup","Arr","getLens","b64","validLen","placeHoldersLen","lens","_byteLength","curByte","tripletToBase64","encodeChunk","uint8","extraBytes","maxChunkLength","len2","ieee754","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","exports","ieee754$1","customInspectSymbol","SlowBuffer","K_MAX_LENGTH","GlobalUint8Array","GlobalArrayBuffer","GlobalSharedArrayBuffer","typedArraySupport","createBuffer","encodingOrOffset","allocUnsafe","fromString","fromArrayView","fromArrayBuffer","valueOf","fromObject","assertSize","encoding","actual","fromArrayLike","arrayView","numberIsNaN","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","thisStart","thisEnd","thisCopy","targetCopy","bidirectionalIndexOf","arrayIndexOf","indexSize","arrLength","valLength","read","foundIndex","found","hexWrite","strLen","utf8Write","blitBuffer","asciiWrite","asciiToBytes","base64Write","ucs2Write","utf16leToBytes","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","MAX_ARGUMENTS_LENGTH","codePoints","hexSliceLookupTable","newBuf","checkOffset","ext","noAssert","mul","defineBigIntMethod","validateNumber","boundsError","lo","hi","checkInt","maxBytes","wrtBigUInt64LE","checkIntBI","wrtBigUInt64BE","sub","checkIEEE754","writeFloat","littleEndian","writeDouble","targetStart","sym","getMessage","Base","received","addNumericalSeparator","checkBounds","INVALID_BASE64_RE","base64clean","units","leadSurrogate","byteArray","alphabet","table","i16","BufferBigIntNotDefined","createDecoderAsync","wasmBinary","module","decodeMesh","decoderModule","onIndicesData","onAttributeData","decoder","numIndices","pointCloud","numPoints","processAttribute","dataType","numComponents","numValues","dracoAttributeTypes","decoderPromise","DracoCompression","numWorkers","decoderInfo","decoderWasmBinary","workerContent","workerBlobUrl","onMessage","workerPool","gltfNormalizedOverride","applyGltfNormalizedOverride","resultIndices","resultAttributes","dataViewCopy","meshData","floatData","PushMaterial","storeEffectOnSubMeshes","normalMatrix","Ray","intersectionTreshold","newMinimum","newMaximum","maxValue","inv","rr","vertex0","edge1","edge2","pvec","tvec","qvec","invdet","bw","result1","result2","tm","pickingInfoA","pickingInfoB","sega","segb","rsegb","sN","sD","tN","tD","sc","tc","qtc","qsc","dP","nearScreenSource","farScreenSource","nearVec3","farVec3","cameraViewport","levelInv","rayFunction","computeWorldMatrixForCamera","currentCamera","forceCompute","tmpMatrix","thinMatrices","pickingInfos","_enableDistantPicking","worldForward","MaterialFlags","NormalMaterialDefines","NormalMaterial","activeTextures","AssetCollection","Constants","PassPostProcess","CreateResizedCopy","useBilinearMode","passPostProcess","ApplyPostProcess","encodedTexture","floatView","int32View","ToHalfFloat","bits","FromHalfFloat","ProcessAsync","lodPostProcess","faceDefines","GetTextureDataAsync","TextureTools","RGBDTextureTools","expandTexture","expandRGBDTexture","rgbdPostProcess","expandedTexture","outputTextureType","_environmentBRDFBase64Texture","_instanceNumber","GetEnvironmentBRDFTexture","useDelayedTextureLoading","previousState","rxOption","MaterialPluginManager","defineNamesFromPlugins","hasRenderTargetTextures","hasTexture","customCode","pointName","existingCallback","injectedCode","regexFlags","matchOption","newCode","fullPointName","UnregisterAllMaterialPlugins","MaterialPluginBase","addToPluginList","resolveIncludes","renderTargets","animatables","currentRank","ubos","MaterialBRDFDefines","PBRBRDFConfiguration","PrePassConfiguration","isFrozen","Orientation","Angle","cosVal","Arc2","startPoint","midPoint","endPoint","startToMid","midToEnd","a1","a3","Path2","newPoint","previousPoint","midX","midY","endX","endY","numberOfSegments","arc","increment","currentAngle","controlX","controlY","val0","val1","val2","originTangentX","originTangentY","destinationTangentX","destinationTangentY","val3","isInside","edgeLow","edgeHigh","edgeDx","edgeDy","perpEdge","lastPoint","firstPoint","normalizedLengthPosition","lengthPosition","previousOffset","bToA","nextOffset","localOffset","Path3D","firstNormal","raw","alignTangentsWithPath","interpolated","smallestDistance","closestPosition","subLength","subPosition","_start","curvePoints","endIndex","slicePoints","tg0","pp0","curTang","prevNor","prevBinor","nNVector","nLVector","vt","va","tgl","interpolateTNB","currentPoint","currentLength","targetLength","parentIndex","tangentFrom","normalFrom","binormalFrom","tangentTo","normalTo","binormalTo","quatFrom","quatTo","SH3ylmBasisConstants","SH3ylmBasisTrigonometricTerms","applySH3","lm","SHCosKernelConvolution","SphericalHarmonics","deltaSolidAngle","colorVector","polynomial","SphericalPolynomial","harmonics","sp","FileFaceOrientation","worldAxisForNormal","worldAxisForFileX","worldAxisForFileY","CubeMapToSphericalPolynomialTools","rightPromise","leftPromise","upPromise","downPromise","frontPromise","backPromise","down","front","cubeInfo","sphericalHarmonics","totalSolidAngle","du","halfTexel","minUV","fileFace","dataArray","worldDirection","currentMax","correctionFactor","sphericalPolynomial","MaterialClearCoatDefines","PBRClearCoatConfiguration","disableBumpMap","invertNormalMapX","invertNormalMapY","identicalTextures","f0","eta","MaterialIridescenceDefines","PBRIridescenceConfiguration","MaterialAnisotropicDefines","PBRAnisotropicConfiguration","MaterialSheenDefines","PBRSheenConfiguration","MaterialSubSurfaceDefines","PBRSubSurfaceConfiguration","refractionTexture","refractionIntensityTextureIsThicknessTexture","translucencyIntensityTextureIsThicknessTexture","useOnlyThicknessTexture","thicknessScale","realTimeFiltering","lodBasedMicrosurface","refractionIor","cubeTexture","MaterialDetailMapDefines","DetailMapConfiguration","onCreatedEffectParameters","PBRMaterialDefines","PBRBaseMaterial","configuration","reflectionTexture","previousEffect","lightDisposed","forceWasNotReadyPreviously","fallbackRank","csnrOptions","oit","mustRebind","polynomials","preScaledHarmonics","ior","outsideIOR","metallicF90","subSurfaceConfiguration","PBRMaterial","cloneTexturesOnlyOnce","ShadowLight","viewMatrix","PointLight","previousNeedCube","useReverseDepthBuffer","lightDataUniformName","BabylonLineLight","BABYLON_PointLight","line_a","line_b","line_normal","angle_range_radians","clip_plane","ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME","ALBEDO_ROUGHNESS_UNIFORM_NAME","ALBEDO_ROUGHNESS_DEFINE","SHADER_NAME","ViewerMaterial","BABYLON_PBRMaterial","ubo_support","fs","BABYLON_Effect","vs","linelight_vs","linelight_fs","min_world","max_world","viewer","shader_name","uniform_buffers","current_albedo","light_exists","light_index","use_instances","BABYLON_SerializationHelper","BABYLON_Tools","clip_plane_index","ClipPlane","BABYLON_BoundingBox","force_dispose_effect","force_dispose_textures","LightSystem","max_shadowcasting_lights","meshes_bounds_modifications","cast_shadow","debug","debug_geomentry","mesh_id","old_bounds","new_bounds","mark_material_rendered","rendered","is_material_rendered","texture_manager","freezing_manager","BABYLON_MultiMaterial","sub_material","unlit","BABYLON_Constants","texture_property","submaterial","AbstractConstantReference","_target","property_name","Color3ConstantReference","_mark_dirty","VectorColorConstantReference","Vector3ConstantReference","Vector3ConstantPropertyReference","validate_regex","validate","uuid","byte_to_hex","uuidv4","ViewerMaterialWrapper","is_applied_by_model_loader","asset_manager","_mark_scene_dirty","name_remapper","ShaderMaterial","shaderPath","float32Array","defineName","existingDefineIdx","defineToAdd","numInfluencers","bvaManager","previousDefines","effectOverride","useSceneUBO","propName","propValue","snippetId","snippet","LinesMesh","_subMesh","colorEffect","doNotDisposeMaterial","InstancedLinesMesh","internalSizedFomat","needConversion","_convertRGBtoRGBATextureData","mipmapGenerator","onerror","internalCallback","faceDataArrays","mipData","mipSize","mipFaceData","rgbData","rgbaData","_makeCreateRawTextureFunction","is3D","_makeUpdateRawTextureFunction","internalType","RawTexture","getFileExtensionFromMimeType","_GLTFMaterialExporter","exporter","exportMaterials","hasTextureCoords","originalMaterial","originalPBRMetallicRoughness","pbrMat","babylonTexture","textureUid","babylonStandardMaterial","P0","P1","P2","P3","cubicBezierCurve","solveForRoughness","specularPower","diffuse","opacity","roughness","specular","oneMinusSpecularStrength","glTFMaterial","babylonMaterial","materialMap","pbrMetallicRoughness","textureInfo","bumpTexture","occlusionTexture","tasks","extensionWork","tempTexture","texture1","texture2","texture1Size","texture2Size","resizedTexture1","resizedTexture2","diffuseTexture","specularGlossinessTexture","factors","resizedTextures","diffuseSize","diffuseBuffer","specularGlossinessBuffer","diffusePixels","specularPixels","metallicRoughnessBuffer","baseColorBuffer","strideSize","maxBaseColor","maxMetallic","maxRoughness","diffuseColor","specularColor","glossiness","specularGlossiness","metallicRoughness","metallicRoughnessFactors","writeOutMetallicRoughnessTexture","writeOutBaseColorTexture","destinationOffset","sRGBBaseColorPixel","metallicRoughnessPixel","diffusePerceivedBrightness","specularPerceivedBrightness","metallic","baseColorFromDiffuse","baseColorFromSpecular","baseColor","babylonPBRMaterial","glTFPbrMetallicRoughness","glTFTexture","metallicTexture","wrapS","wrapT","wrapMode","specGloss","albedoTexture","reflectivityTexture","useMicrosurfaceFromReflectivityMapAlpha","samplerIndex","imageIndex","albedoColor","ambientTexture","ambientTextureStrength","emissiveTexture","emissiveColor","extensionPromise","textureMimeType","internalTextureToImage","internalTextureUniqueId","imageIndexPromise","coordinatesIndex","textureIndex","_GLTFUtilities","bufferIndex","bufferview","bufferviewIndex","accessor","vertexStart","positionStrideSize","accessorType","GLTFData","endsWith","AnimationKeyInterpolation","AnimationRange","evaluateAnimationState","Animation","targetProperty","framePerSecond","totalFrame","loopMode","easingFunction","animationType","sourceAnimation","referenceFrameOrOptions","cloneOriginal","clonedName","referenceFrame","lastKey","valueStore","rangeValue","startFrame","clippedKeys","targetValue","frameRate","transition","endFrame","runtimeAnimation","enableBlending","nKeys","outTangent","inTangent","currentFrame","searchClosestKeyOnly","keysLength","startKey","endKey","useTangent","frameDelta","floatValue","quatValue","vec3Value","vec2Value","color3Value","color4Value","dontClone","newKey","animationKey","interpolation","_inTangent","_outTangent","keyData","serializedAnimation","outputs","MorphTarget","hadPositions","hadNormals","hadTangents","hadUVs","newOne","_TangentType","_GLTFAnimation","babylonNode","babylonTransformNode","animationChannelTargetPath","useQuaternion","animationSampleRate","keyFrames","minMaxKeyFrames","interpolationOrBake","shouldBakeAnimation","dataAccessorType","runtimeGLTFAnimation","idleGLTFAnimations","nodeMap","binaryWriter","bufferViews","accessors","shouldExportAnimation","glTFAnimation","animationInfo","combinedAnimation","combinedAnimationKeys","animationKeys","babylonScene","glTFAnimations","animationGroups","animationGroup","morphAnimations","sampleAnimations","morphAnimationMeshes","animationGroupFrameDiff","targetAnimation","babylonMorphTarget","babylonMorphTargetManager","babylonMesh","combinedAnimationGroup","sampleAnimationKeys","numAnimationKeys","animationsByMorphTarget","morphTargetAnimation","morphAnimationChannels","animationData","keyframeAccessorIndex","dataAccessorIndex","outputLength","animationSampler","animationChannel","currentInput","newInputs","nodeIndex","minFrame","maxFrame","minMaxFrames","quaternionCache","previousTime","maxUsedFrame","currKeyFrame","nextKeyFrame","prevKeyFrame","basePositionRotationOrScale","cacheValue","keyFrame","newPositionRotationOrScale","posRotScale","interpolationType","tangentType","tangentValue","convertHandednessMatrix","isNoopNode","useRightHandedSystem","convertNodeHandedness","_Exporter","extensions","actionAsync","currentPromise","meshPrimitive","babylonSubMesh","primitiveMode","babylonIndices","secondIndex","thirdIndex","vertexBufferKind","meshAttributeArray","vertexAttributeKind","attributeComponentKind","vertexAttributes","meshMaterial","convertToLinear","useExactSrgbConversions","writeBinaryFunc","vertexAttribute","morphTargetAttributeArray","minMax","difference","difference4","morphData","shouldUseGlb","glTFPrefix","prettyPrint","imageName","binaryBuffer","jsonText","bin","glTFFileName","glTFBinFile","_BinaryWriter","glbFileName","headerLength","chunkLengthPrefix","jsonLength","encodedJsonText","imageByteLength","jsonPadding","binPadding","imagePadding","headerBuffer","headerBufferView","jsonChunkBuffer","jsonChunkBufferView","charCode","jsonPaddingView","binaryChunkBuffer","binaryChunkBufferView","binPaddingBuffer","binPaddingView","imagePaddingBuffer","imagePaddingView","glbData","glbFile","babylonCamera","attributeKind","bufferMesh","vertexNormals","morphNormals","bufferViewIndex","vertexPositions","morphPositions","vertexTangents","morphTangents","baseMesh","attributeData","indexBufferViewIndex","vertexAttributeBufferViews","glTFNodeIndex","glTFNode","directDescendents","removedRootNodes","cameraMap","glTFCamera","exportNodes","skinMap","descendent","promiseChain","idleGLTFAnimation","skin","inverseBindMatrices","boneIndexMap","maxBoneIndex","bufferViewOffset","bindMatrixAccessor","inverseBindAccessorIndex","cell","newBuffer","copyOldBufferSize","oldUint8Array","GLTF2Export","filePrefix","glTFData","AssetManager","mark_scene_dirty","BABYLON_Material","material_wrapper","export_translation","babylon_root_obj_ids","babylon_ids","bb","babylon_node","BABYLON_GLTF2Export","gltf","new_material","babylon_material","texture_to_canvas","flip_canvas","image_data","flipped_canvas","flipped_canvas_ctx","debug_download_texture","texture_to_base64","texture_1","mime_type","image_compression","download_gltf_files","files","ends_with","LiteRenderTarget","generate_mipmaps","do_not_change_aspect_ratio","is_cube","sampling_mode","BABYLON_Texture","generate_depth_buffer","generate_stencil_buffer","is_multi","delay_allocation","creation_flags","no_color_attachment","use_srgb_buffer","opaque","alpha_test","depth_only","BABYLON_RenderingGroup","render_list","current_scene_render_id","mesh_to_render","sub_mesh_index","sub_mesh","view_z","sub_meshes","sort_function","is_transparent","sorted_meshes","ViewerFramebufferType","get_babylon_texture_type","BABYLON_Engine","get_babylon_texture_format","get_opengl_texture_format_sized","IntegratedDepthRenderer","render_target","msaa_samples","BABYLON_ThinTexture","ext_webgl2_float_texture_color_buffer","Framebuffer","is_webgl_1","wanted_msaa_samples","texture_format","supported_msaa_samples","supported_msaa","enable_depth_renderer","texture_type","is_srgb","sampler_filter_type","generate_stencil","generate_depth","BABYLON_Camera","BABYLON_PassPostProcess","previous_render_list","LUMINANCE_CUT_RANGE","LUMINANCE_RANGE_EXPONENT","BLUR_DIRECTION","SOURCE_TEXTURE","DOWNSAMPLE_UV_SCALE","DOWNSAMPLE_DEPTH_TEXTURE","BloomEffect","gpu_profiler","downsampled_texture_count","downsampled_width","downsampled_height","BABYLON_PostProcess","downsample_on_apply","vertical_effect","horizontal_effect","ShaderDescriptorType","ShaderDescription","PostProcessShader","descriptor_matrix","JitterSampleType","FEATURE_MASK_TONEMAPPING","FEATURE_MASK_BLOOM","FEATURE_MASK_LUT","AccumulationBuffer","accumulation_frame_count","feature_mask","enable_tonemapping","enable_bloom","enable_lut","bloom_texture_names","shader_description","bloom_sampler_descriptors","bloom","lut","tonemap","prime","seq","samples_count","sample_type","halton_count","viewport_width","viewport_height","sample_offset","warmup_frame_count","frame_count","SAMPLER_DEPTH","INVERSE_DEPTH_DIMENSIONS","INVERSE_PROJECTION_MATRIX","EdgeSketchEffect","projection_matrix","depth_texture","inverse_projection_matrix","blue_noise_64x64x1","BilateralBlur","enable_normal_filtering","source_depth","source_normals","intermediate","event_data","DEPTH_SAMPLER","NOISE_SAMPLER","SAMPLE_KERNEL","NOISE_SCALE","RADIUS","INVERTED_PROJECTION_MATRIX","PROJECTION_MATRIX","NOISE_UV_OFFSET","PROJECTION_MATRIX_Z_VALUES","PREVIOUS_PROJECTION_MATRIX_Z_VALUES","PREVIOUS_AO_SAMPLER","PREVIOUS_DEPTH_SAMPLER","AO_SAMPLER","CURRENT_VIEWSPACE_TO_PREVIOUS_PROJECTION_SPACE_MATRIX","PREVIOUS_PROJECTED_TO_CURRENT_VIEW","INVERSE_VIEW_MATRIX","HALF_LINEAR_DEPTH_SAMPLER","INVERSE_HALF_RESOLUTION","AO_STRENGTH","AmbientOcclusion","post_process_camera","noise_offset_count","noise_texture_data","BABYLON_RawTexture","half_depth_sampler","bilateral_filter","view_matrix","inverse_view_matrix","previous_view_projection","view_to_previous_projection_matrix","previous_projected_to_current_view","texture_component_type","depth_component_type","downsampled_size","sample_count","golden_ratio","total_sample_count","cached_vector","sample_index","CD_PER_RGB","AO_WARMUP_FRAME_COUNT","exposure_value","aperture","shutter_speed","sensitivity","ev_to_intensity","EXPOSURE_PRESETS","ao_supported","mark_view_dirty","default_quality_preset","canvas_width","canvas_height","viewport_size","viewport_offset","normalized_pixel_width","normalized_pixel_height","normalized_pixel_x_offset","normalized_pixel_y_offset","ao_settings","use_ambient_occlusion","Utils.update_from_partial","preset","BabylonEngineCamera","projection_type","engine_camera_id_counter","EngineCamera","z_near","z_far","inverse_sqrt2","tmp_matrix","new_projection_matrix","z_row","w_row","jitter","RenderView","interaction_system","render_width","render_height","framebuffer_type","BABYLON_RenderingManager","custom_render_list","previous_active_camera","all_meshes","width_size","was_enabled","normalized_x","normalized_y","BABYLON_Ray","inverse_view_projection_matrix","ndc_x","ndc_y","near_projected","far_projected","ray_length","world_position","view_projection_matrix","ndc","InteractionSystem","interaction_id","was_deleted","verify_aspect_ratio","max_error","projection_aspect","projection_width","projection_height","active_screenshots","take_screenshot","mesh_render_list","experimental_settings","screenshot_queue","screenshot_promise","rendering_lock","VIEWER_DEFAULT_FLOAT_FRAMEBUFFER_TYPE","VIEWER_DEFAULT_COMPATIBILITY_FRAMEBUFFER_TYPE","VIEWER_WANTED_MSAA_SAMPLES","default_screenshot_ao_settings","default_bloom_settings","bloom_settings","accumulator","restore_shadow_bitmask","texture_base64_data","Viewer","newReflectionProbe","ReflectionProbe$1","ReflectionProbe","useFloat","lookAtFunction","perspectiveFunction","currentApplyByPostProcess","parsedReflectionProbe","reflectionProbe","rp","probe_count","BABYLON_ReflectionProbe","object_ids","custom_material","force_render","bounding_info","intersectBoxAASphere","boxMin","boxMax","getLowestRoot","maxR","determinant","sqrtD","Collider","pa","pb","pc","vecMin","vecMax","trianglePlaneArray","hasMaterial","hostMesh","embeddedInPlane","trianglePlane","signedDistToTrianglePlane","normalDotVelocity","lowestRoot","edgeSquaredLength","edgeDotVelocity","edgeDotBaseToVertex","distToCollisionSquared","pts","indexEnd","decal","invertTriangles","triangleStrip","vel","DefaultCollisionCoordinator","maximumRetry","excludedMesh","onNewPosition","collisionIndex","velocity","finalPosition","closeDistance","collisionMask","DepthRenderer","storeNonLinearDepth","storeCameraSpaceZ","refreshRate","preWarm","renderSubMesh","renderingMaterial","cameraIsOrtho","alphaTexture","numMorphInfluencers","keysToDelete","MinMaxReducer","depthRedux","reductionInitial","reduction","minmax","disposeAll","DepthReducer","depthRenderer","UpDir","ZeroVec","tmpv1","tmpv2","CascadedShadowGenerator","freeze","cascadeIndex","dbg","lambda","cascadeNum","near","far","cameraRange","minDistance","maxDistance","prevSplitDist","splitDist","isNDCHalfZRange","cameraInfiniteFarPlane","saveCameraMaxZ","invViewProj","cornerIndexOffset","cornerIndex","lightCameraPos","usefulFloatFirst","_v","ShadowGeneratorSceneComponent","lights","force32bitsFloat","supportFullfloat","DepthRendererSceneComponent","FxaaPostProcess","texelSize","glInfo","screenshotCanvas","CreateScreenshot","_GetScreenshotSize","renderContext","newWidth","newHeight","offsetX","offsetY","CreateScreenshotUsingRenderTarget","renderingCanvas","CreateScreenshotAsync","customizeTexture","finalWidth","finalHeight","targetTextureSize","originalSize","renderWhenReady","renderToTexture","fxaaPostProcess","CreateScreenshotUsingRenderTargetAsync","loadedFiles","onfinish","onErrorCallBack","loadedImages","tokenPendingData","maxLevel","createPolynomials","lodScale","lodOffset","beforeLoadCubeDataCallback","imageHandler","originalRootUrl","rootUrlWithoutUriParams","onloaddata","imgs","texelFormat","DDS_MAGIC","DDSD_MIPMAPCOUNT","DDSCAPS2_CUBEMAP","DDPF_FOURCC","DDPF_RGB","DDPF_LUMINANCE","FourCCToInt32","Int32ToFourCC","FOURCC_DXT1","FOURCC_DXT3","FOURCC_DXT5","FOURCC_DX10","FOURCC_D3DFMT_R16G16B16A16F","FOURCC_D3DFMT_R32G32B32A32F","DXGI_FORMAT_R32G32B32A32_FLOAT","DXGI_FORMAT_R16G16B16A16_FLOAT","DXGI_FORMAT_B8G8R8X8_UNORM","headerLengthInt","off_magic","off_size","off_flags","off_height","off_width","off_mipmapCount","off_pfFlags","off_pfFourCC","off_RGBbpp","off_RMask","off_GMask","off_BMask","off_AMask","off_caps2","off_dxgiFormat","DDSTools","extendedHeader","mipmapCount","fourCC","dxgiFormat","dataOffset","destArray","srcData","srcPos","rOffset","gOffset","bOffset","aOffset","loadMipmaps","lodIndex","currentFace","destTypeMustBeFilterable","sphericalPolynomialFaces","mip","internalCompressedFormat","blockBytes","bpp","computeFormats","supported","startFace","floatArray","floatAvailable","halfFloatAvailable","destType","dataGetter","dataGetterPolynomial","unpackAlignment","unpaddedRowSize","loadData","mipSlices","minLODIndex","maxLODIndex","mipmapIndex","glTextureFromLod","lodTexture","_DDSTextureLoader","DefaultEnvironmentTextureImageType","CurrentVersion","MagicBytes","GetEnvInfo","manifestString","manifest","normalizeEnvInfo","CreateImageDataArrayBufferViews","specularInfo","mipmapsCount","imageInfo","UploadEnvLevelsAsync","UploadLevelsAsync","_OnImageReadyAsync","generateNonLODTextures","lodTextures","cubeRtt","imageType","UploadEnvSpherical","irradianceInfo","_UpdateRGBDAsync","proxyPromise","_internalTexture","_ENVTextureLoader","KhronosTextureContainer","facesExpected","dataSize","headerDataView","imageSize","SourceTextureFormat","TranscodeTarget","EngineFormat","applyConfig","DefaultKTX2DecoderOptions","KhronosTextureContainer2","workerFunc","compressedTexturesCaps","dataCopy","isUncompressedFormat","mipmap","ktx2Decoder","mapSRGBToLinear","_KTXTextureLoader","ktx","mappedFormat","_staticOffsetValueQuaternion","_staticOffsetValueVector3","_staticOffsetValueVector2","_staticOffsetValueSize","_staticOffsetValueColor3","RuntimeAnimation","targetPropertyPath","restoreOriginal","originalValue","blendingSpeed","newSpeedRatio","newAbsoluteFrame","elapsedTimeSinceAnimationStart","frameRange","offsetValue","absoluteFrame","highLimitValue","keyOffset","fromValue","toValue","syncRoot","hostNormalizedFrame","Bone","parentBone","localMatrix","restMatrix","bindMatrix","updateAbsoluteBindMatrices","localScaling","localRotation","localPosition","updateLocalMatrix","updateChildren","tNode","translationMode","scaleChildren","locMat","scaleMat","cm","rotMatInv","rmat","rotMat2","lmat","lx","ly","lz","parentScale","parentScaleInv","poseMatrix","amat","Animatable","fromFrame","toFrame","loopAnimation","animations","onAnimationLoop","isAdditive","playOrder","newRuntimeAnimation","runtimeAnimations","useGlobalSplice","running","isRunning","animationTime","returnedAnimatable","stopCurrent","shouldRunTargetAnimations","holder","normalizer","finalScaling","finalQuaternion","originalAnimation","skipOverride","animIndex","currentPosition","currentScaling","currentQuaternion","workValue","refQuaternion","cumulativeQuaternion","quaternions","cumulativeAmount","matrixDecomposeMode","finalValue","rangeName","frameOffset","rescaleAsRequired","skelDimensionsRatio","sourceRange","sourceKeys","sourceBoneLength","sourceParent","parentScalingReqd","parentRatio","dimensionsScalingReqd","destKeys","origTranslation","TargetCamera","lockedTarget","lockedTargetPosition","vDir","directionMultiplier","needToMove","needToRotate","camLeft","camRight","leftSign","rightSign","halfSpace","newFocalTarget","CameraInputTypes","CameraInputsManager","inputToRemove","inputType","noPreventDefault","disconnect","serializedCamera","parsedInputs","parsedinput","FreeCameraKeyboardMoveInput","speed","FreeCameraMouseInput","touchEnabled","isTouch","srcElement","BaseCameraMouseWheelInput","platformScale","_CameraProperty","FreeCameraMouseWheelInput","cameraTransformMatrix","transformedDirection","cameraProperty","FreeCameraTouchInput","allowMouse","previousPosition","isMouseEvent","FreeCameraInputsManager","FreeCamera","mouse","keyboard","ignored","globalPosition","actualDisplacement","TouchCamera","touch","Gamepad","browserGamepad","leftStickX","leftStickY","rightStickX","rightStickY","newValues","GenericPad","buttonIndex","Xbox360Button","Xbox360Dpad","Xbox360Pad","xboxOne","buttonType","DualShockButton","DualShockDpad","DualShockPad","GamepadManager","newGamepad","disconnectedGamepad","dualShock","FreeCameraGamepadInput","lsValues","rsValues","BaseCameraPointersInput","previousPinchSquaredDistance","previousMultiTouchPanPosition","ed","distX","distY","pinchSquaredDistance","multiTouchPanPosition","_pointA","_pointB","_evt","ArcRotateCameraPointersInput","moveDeltaX","moveDeltaY","pointA","pointB","ArcRotateCameraKeyboardMoveInput","ffMultiplier","ArcRotateCameraMouseWheelInput","mouseWheelDelta","wheelDelta","estimatedTargetRadius","targetInertia","inertiaComp","lowerLimit","upperLimit","directionToZoomLocation","ArcRotateCameraInputsManager","ArcRotateCameraGamepadInput","normalizedRX","normalizedRY","normalizedLY","GamepadSystemSceneComponent","gamepadManager","UniversalCamera","CreateSphereVertexData","diameterX","diameterY","diameterZ","dedupTopBottomIndices","totalZRotationSteps","totalYRotationSteps","zRotationStep","normalizedZ","angleZ","yRotationStep","normalizedY","angleY","rotationZ","rotationY","afterRotZ","complete","firstIndex","CreateSphere","SphereBuilder","LightBaker","job","bake_camera","BABYLON_UniversalCamera","target_babylon_meshes","BABYLON_SphereBuilder","bake_material","BABYLON_ShaderMaterial","centers","sizes","uvset","material_ready","BABYLON_InstancedMesh","temp_rt","rt_with_result","PartialViewportRenderTarget","original_should_render","DEFAULT_OUTLINE_COLOR","OutlineState","ExpandPostProcess","OutlineLayer","BABYLON_VertexBuffer","main_texture","opaque_sub_meshes","alpha_test_sub_meshes","transparent_sub_meshes","depth_only_sub_meshes","previous_alpha_mode","reverse_side","hardware_instanced_rendering","max_colors","outline_state","color_id","clip_mask","color_id_value","remap","instanced_mesh","bone_texture","BABYLON_MaterialHelper","is_instance","bt","offset_x","offset_y","flattened_colors","actual_size","BABYLON_EffectFallbacks","morph_influencers","state_value","outline_color","old_min","old_max","new_min","new_max","NUMBER_OF_SIDES","POSITIONS_PER_LINE","COLORS_PER_LINE","INDICES_PER_LINE","LineManager","render_layer","draw_on_top","BABYLON_VertexData","BABYLON_Mesh","RenderingGroupID","api_line","sub_line_count","dash_frequency","number_of_lines","used_indices","current_position","current_color","current_index","line_index","perp","binormal","sub_lines_needed","sub_line_index","sub_line_p0","sub_line_p1","lerped_position","cos_theta","sin_theta","start_cap_index","end_cap_index","previous_loop_first_index","next_loop_first_index","top_left_index","bottom_left_index","top_right_index","bottom_right_index","line_id","dirty","line_bound","line_visible","CreateRibbonVertexData","invertUV","defaultOffset","customUV","customColors","us","uTotalDistance","vTotalDistance","minlg","lg","ar1","ar2","idc","closePathCorr","vectlg","l1","shft","path1nb","indexFirst","indexLast","positions32","normals32","uvs32","CreateRibbon","si","pathPoint","colorIndex","ribbon","CreateDiscVertexData","vertexNb","CreateDisc","disc","GroundMesh","chunksCount","octreeBlocksSize","thisAsAny","tmpVect","tmpMat","quad","subdivisionsX","subdivisionsY","v3","v1v2","v1v3","v1v4","norm1","norm2","cd","d2","CreateGroundVertexData","CreateTiledGroundVertexData","tileRow","tileCol","tileSize","applyTile","xTileMin","zTileMin","xTileMax","zTileMax","rowLength","square","CreateGroundFromHeightMapVertexData","invert","heightMapX","heightMapY","idx1","idx2","idx3","idx4","isVisibleIdx1","isVisibleIdx2","isVisibleIdx3","CreateGround","ground","CreateTiledGround","tiledGround","CreateGroundFromHeightMap","CreateBoxVertexData","topBaseAt","bottomBaseAt","topOrder","bottomOrder","topIndex","bottomIndex","basePositions","topFaceBase","bottomFaceBase","topFaceOrder","bottomFaceOrder","scaleArray","faceUV","faceColors","totalColors","CreateBox","CreateTiledPlaneVertexData","flipTile","tileWidth","tileHeight","alignH","alignV","tilesX","tilesY","adjustX","adjustY","startX","startY","uvBase","partialBottomRow","partialTopRow","partialLeftCol","partialRightCol","uvPart","uvBaseBR","uvBaseTR","uvBaseLC","uvBaseRC","CreateTiledPlane","CreateTiledBoxVertexData","halfDepth","faceVertexData","baseAlignV","facePositions","faceNormals","newFaceUV","vec0","mtrx0","vec2","mtrx2","mtrx3","vec4","mtrx4","mtrx5","CreateTiledBox","CreateCylinderVertexData","hasRings","enclose","quadNb","ringNb","surfaceNb","angleStep","tan","ringVertex","ringNormal","ringFirstVertex","ringFirstNormal","quadNormal","ringIdx","cs","i3","createCylinderCap","isTop","circleVector","vbase","textureScale","textureCoordinate","CreateCylinder","cylinder","CreateTorusVertexData","outerAngle","innerAngle","nextI","nextJ","CreateTorus","torus","CreateTorusKnotVertexData","getPos","cu","su","quOverP","tang","bitan","jNext","CreateTorusKnot","torusKnot","CreateLineSystemVertexData","vertexColors","CreateDashedLinesVertexData","curvect","dashshft","curshft","CreateLineSystem","vertexColor","lineColors","lineSystem","CreateLines","CreateDashedLines","nbSeg","dashedLines","IndexedVector2","PolygonPoints","originalPoints","lmin","lmax","PolygonMeshBuilder","contours","hole","holepoints","smoothingThreshold","positionscount","totalCount","ulength","vc","vp","vn","vc_norm","vp_norm","vn_norm","dotp","dotn","CreatePolygonVertexData","wrp","disp","distZ","totalLen","cumulate","CreatePolygon","polygonTriangulation","hNb","hPoint","ExtrudePolygon","ExtrudeShape","closeShape","_ExtrudeShapeGeneric","ExtrudeShapeCustom","adjustFrame","curve","rotateFunction","rbCA","rbCP","updtbl","extrusionPathArray","path3D","shapePaths","binormals","distances","returnScale","scl","shapePath","scaleRatio","planed","rotated","capPath","pointCap","barycenter","storage","newShapePaths","extrudedGeneric","CreateLathe","closed","clip","pi2","paths","CreatePlaneVertexData","CreatePlane","CreateTube","tubePathArray","circlePaths","radiusFunctionFinal","circlePath","rad","nbPoints","pathIndex","newPathArray","CreatePolyhedronVertexData","polyhedra","sizeX","sizeY","sizeZ","nbfaces","flat","faceIdx","indexes","ang","fl","CreatePolyhedron","polyhedron","CreateIcoSphereVertexData","radiusX","radiusY","radiusZ","icoVertices","ico_indices","vertices_unalias_id","ico_vertexuv","ustep","vstep","uoffset","voffset","island_u_offset","island_v_offset","island","current_indice","face_vertex_pos","face_vertex_uv","v012","v_id","interp_vertex","pos_x0","pos_x1","pos_interp","vertex_normal","centroid_x0","centroid_x1","uv_x0","uv_x1","uv_interp","CreateIcoSphere","xpAxis","xnAxis","ypAxis","ynAxis","zpAxis","znAxis","DecalVertex","vertexIdx","vertexIdxForBones","localPositionOverride","localNormalOverride","matrixIndicesOverride","matrixWeightsOverride","CreateDecal","hasSkeleton","useLocalComputation","meshHasOverridenMaterial","localPositions","localNormals","matIndices","matWeights","matIndicesExtra","matWeightsExtra","cameraWorldTarget","currentVertexDataIndex","extractDecalVector3","indexId","vertexId","emptyArray","clipSize","clipVertices","clipFactor","mat0Index","v0Indices","v0Weights","mat1Index","v1Indices","v1Weights","ind","sumw","v0LocalPositionX","v0LocalPositionY","v0LocalPositionZ","v1LocalPositionX","v1LocalPositionY","v1LocalPositionZ","v0LocalNormalX","v0LocalNormalY","v0LocalNormalZ","v1LocalNormalX","v1LocalNormalY","v1LocalNormalZ","interpNormalX","interpNormalY","interpNormalZ","clipResult","total","nV1","nV2","nV3","nV4","d3","v1Out","v2Out","v3Out","sourceMeshAsMesh","matrixData","numMatrices","thinInstanceMatrix","ofst","decalWorldMatrix","inverseDecalWorldMatrix","meshWorldMatrix","oneFaceVertices","faceVertices","vIndex","CreateCapsuleVertexData","capDetail","heightSegments","radiusTop","radiusBottom","heightMinusCaps","thetaStart","thetaLength","capsTopSegments","capsBottomSegments","indexArray","cosAlpha","sinAlpha","coneLength","vl","indexRow","sinA","_radius","sinTheta","cosTheta","coneHeight","slope","i4","vDat","CreateCapsule","capsule","_IsoVector","isoGridSize","_PrimaryIsoTriangle","PolyhedronData","vecToidx","n1","fr","oVec","aVec","bVec","oaVec","abVec","obVec","verts","idxR","isoId","isoIdR","closestTo","vDist","matchIdx","thirdR3","LSQD","pointR","prevR","nextR","maxPrev","maxLeftPrev","faceNb","geodesicData","oidx","aidx","bidx","OA","OB","tempVec","distFrom","vert","primVert","cartesian","distFromO","distFromA","distFromB","vertByDist","vertData","GeodesicData","primTri","nearTo","close","nearIndex","adjVerts","dualFaces","goldbergPolyhedronData","verticesNb","cz","CreateGeodesic","geoOptions","GoldbergMesh","poleOrShared","fromPole","colorRange","newCols","uvRange","points5","points6","newUVs","goldbergData","goldberg","CreateGoldbergVertexData","ba","ca","pdata","vCoord","CreateGoldberg","ShapePath","resolution","cpx","cpy","cpx1","cpy1","cpx2","cpy2","CreateShapePath","fontData","glyph","outline","CreateTextShapePaths","line_height","CreateText","letterIndex","holeVectors","shapeVectors","localHolesCopy","holePoints","bbox","pivot","MeshBuilder","Disposable","SceneLines","on_transform_update","MeshManager","light_system","half_width","half_height","BABYLON_MeshBuilder","diameter_x","diameter_y","diameter_z","BABYLON_LinesMesh","mark_mesh_dirty_for_lightsystem","bs","bs_center","bs_radius","prev_bounds","MaterialFreezingManager","_freezing_allowed","on_material_bound","disable_freezing","mtl","TargetedAnimation","AnimationGroup","targetedAnimation","beginFrame","mergedAnimationGroup","curIndex","newName","targetConverter","cloneAnimations","newGroup","targetedAnimationIndex","parsedAnimationGroup","targetNode","sourceAnimationGroup","targetedAnimations","fromKey","toKey","dontCloneAnimations","useFrame","newKeys","EasingFunction","easingMode","CubicEase","convert_value","PROPERTY_TO_DATA_TYPE_TABLE","BABYLON_Animation","INTERPOLATION_MODE_TO_EASING_FUNCTION_TABLE","BABYLON_CubicEase","BABYLON_EasingFunction","AnimationSystem","viewer_scene","animation_group","babylon_animations","anim_ch","BABYLON_AnimationGroup","target_id","animation_idx","object_animations","new_animations","Stack","smooth_step","aabb_corners","is_aabb_nan","is_aabb_valid","update_aabb_by_transformed_aabb","in_out_bounds","object_bounds","object_transform","transformed_vertex","bounds_size","get_object_bounds","root_transform","include_children","transform_bounds_tuples","total_bounds","get_object_bounds_world","objects","validate_bounds","get_object_bounds_local","aabb_center","aabb","aabb_size","is_aabb","is_sphere","clone_aabb","clone_sphere","clone_bounds","is_valid_bounding_box","IndexName","current_id","Indexed","indexed_accessor","indexed_property","indexed","new_value","ViewerCamera","_custom_aspect_ratio","vertical_resolution","render_layer_mask","LerpPositionTargetTransitionCamera","_from_camera","_to_camera","from_forward","to_forward","cos_omega","sin_omega","slerp_t_times_omega","scaled_source_right","scaled_target_right","to_right","forward_component","from_projection","to_projection","LerpTargetPositionCameraTransition","transition_camera","update_data","from_camera_frustum_world","CameraManager","to_camera_frustum_world","combined_frustum_world","current_proj_matrix","current_view_matrix","minimum_perspective_near","perspective_near","perspective_far","orthographic_near","orthographic_far","perspectiveness","perspective_c","perspective_d","orthographic_c","orthographic_d","default_color_scheme","ConsoleDecorator","color_scheme","pin_color","padding","border_radius","category_name","background","ConsoleLogger","empty","LoggingService","LoggerSettings","only","exclude","applicable_rules","create_overrides","overrides","LoggingCategory","is_enabled","ENGINE_CAMERA_DIRTY_ANGLE_EPSILON","ENGINE_CAMERA_DIRTY_POSITION_EPSILON","SMOOTH_CAMERA_TRANSITION","SMOOTH_FAST_CAMERA_TRANSITION","LINEAR_CAMERA_TRANSITION","LINEAR_FAST_CAMERA_TRANSITION","TRANSITION_PRESETS","_interaction_system","initial_aspect_ratio","current_inverse_view_matrix","inverse_matrix","delta_time","active_camera","viewer_camera","old_camera","new_camera","caller_name","_transition","LerpPositionTargetCameraTransition","prev_camera","poped_camera","viewer_cameras","previous_camera","FocusBorder","_object","camera_position","BABYLON_TransformNode","point_to_corners","camera_matrix","corner","extended_corner","transformed_corner","transformed_point","hull_points","convex_hull","num_points","hull","leftmost_index","CoroutineManager","timestep","premulAlpha","forceBindTexture","allowGPUOptimization","glformat","DynamicTexture","fillColor","textSize","hex_from_color","saturated_color","TextField","_font_size","_max_length","BABYLON_DynamicTexture","texture_context","get_box_framed_perspective_camera_matrix","loose_up","include_child_objects","margin_world","margin_viewport","direction_babylon","up_babylon","parent_objects_length","all_objects_bounds","bounds_local","all_bounds","world_bounds","world_center","horizontal_perspective_scaling","vertical_perspective_scaling","viewport_margin_scale","viewspace_bounds","cache_model_view_matrix","to_near_plane","bounds_z_range","framing","get_precise_framed_perspective_camera_matrix","all_objects_ready_promises","viewspace_center","min_z","max_z","extension_name","WebGLTimerQuery","_gl","_extension","active_query","original_begin_query_func","original_end_query_func","get_active_query_name","new_begin","_query","viewer_timer_query","new_end","GpuProfilingSection","profiler","_handle","samples_gpu","samples_cpu","cpu","GpuProfiler","average_sample_count","section","timing_samples","cpu_times","summary","user_section","csv","html","cpu_load","age","ViewerFactory","_constructors_map","HemisphericLight","_effect","normalizeDirection","AmbientLightController","BABYLON_HemisphericLight","BABYLON_Light","CubeTexture","rootUrlKey","prefiltered","delayLoad","isDDS","isEnv","isBasis","trans","oldTexture","onLoadProcessing","newCubeTexture","PanoramaToCubeMapTools","inputWidth","inputHeight","supersample","textureFront","textureBack","textureLeft","textureRight","textureUp","textureDown","texSize","sampleFactor","sampleFactorSqr","rotDX1","rotDX2","fy","xv1","xv2","px","py","inputY","HDRTools","mantissa","float32array","uint8array","endOfHeader","findFormat","lineIndex","hdrInfo","num_scanlines","scanline_width","dataIndex","scanLineArrayBuffer","scanLineArray","resultBuffer","resultArray","HDRFiltering","intTexture","onFinished","HDRCubeTexture","generateHarmonics","prefilterOnLoad","shortArray","dataFace","previousOnLoad","hdrFiltering","CUBEMAP_SIZE","DDS","ENV","HDR","EnvironmentManager","_ambient_light_controller","cubetexture","old_environment_map","file_extension","filter_mips","load_promise","on_loaded","on_error","BABYLON_CubeTexture","BABYLON_HDRCubeTexture","skybox_cube_texture","mesh_manager","sky_box_material","skybox_object","environment_map_url","PointLightShadowController","shadow_values","light_affects_old_bounds","light_affects_new_bounds","maxc","StandardMaterialDefines","modeToEnable","modes","StandardMaterial","LightPositionSphere","light_name","BABYLON_StandardMaterial","line_color","sphere_brightness","PointLightVisualizer","line_manager","color_mode","rotation_axes","FOURPI","lumen","DirectionalLight","shadowMinZ","shadowMaxZ","DirectionalLightShadowController","DirectionalLightVisualizer","BABYLON_DirectionalLight","lux","SpotLight","lightFar","lightNear","SpotLightShadowController","shadow_cone_angle","light_cone_angle_sine","light_cone_angle_cosine","rel_old","rel_new","old_dot_dir","new_dot_dir","old_radius","new_radius","old_sphere_swept_cone_adj","old_cone_vertex","new_sphere_swept_cone_adj","new_cone_vertex","SpotLightVisualizer","cone_end_radius","SpotLightIntensityMode","outer_angle","inner_angle","BABYLON_SpotLight","local_position","local_target","world_target","inverse_parent_world_matrix","world_pos_babylon","world_target_babylon","candela","world_direction","outer","inner_angle_radians","outer_angle_radians","half_inner","half_outer","inner_area","outer_weighted_area","LineLightVisualizer","line_mananger","main_axis_p1","main_axis_p2","far_endpoints","beam_leg_angle","rotated_1","line_normal_rotated_1","rotated_2","line_normal_rotated_2","beam_vector_1","beam_vector_2","main_axis_points","vec_3_endpoints","LineLightIntensityMode","INNER_ANGLE_RADIANS","LineLight","lumen_per_meter","angle_range","angle_direction","hard_side_cutoff","offseted_line_a","offseted_line_b","line_a_transform","line_b_transform","current_line_normal","rotated_line_normal","line_a_to_b","ideal_normal","ideal_crossed_with_line","ideal_crossed_with_line_crossed_again","rotation_quarternion","caps_weighted_surface_area","inner_constant_cylinder_surface_area","outer_weighted_cylinder_surface_area","DirectedShadowPointLight","get_hardware_limits","capabilities","max_vertex_uniform_blocks","webgl2_context","nr_of_lights_based_on_varyings","nr_of_lights_based_on_image_units","LIGHT_CONSTRUCTORS","LightManager","MAX_LIGHTS","MAX_SHADOWCASTING_LIGHTS","main_light_name","currentCSGMeshId","Vertex","vertColor","CSGPlane","coplanarFront","coplanarBack","polygonType","ti","tj","vi","vj","poly","CSGPolygon","shared","Node$1","polygons","bsp","CSG","vertColors","indexIndices","csg","absolute","meshPosition","meshRotation","meshRotationQuaternion","meshScaling","invertWinding","sm","sml","il","sourceNormal","sourcePosition","onBeforePolygonProcessing","onAfterPolygonProcessing","polygonIndices","vertice_dict","vertex_idx","jl","localVertex","localNormal","areUvsDifferent","areColorsDifferent","keepSubMeshes","subMeshDict","subMeshObj","materialIndexOffset","materialMaxIndex","raycast_interactable_object","hits","raycast_all_internal","closest_hit","filter_closest_hit","interactable","filter_layer_mask","gizmo_hits","raycast_all_gizmos_internal","object_mesh_hits","raycast_all_scene_meshes_internal","object_bound_hits","raycast_all_bounds_internal","raycast_all_objects_internal","pick_info","filter_backface_triangles","local_ray","world_matrix","world_matrix_inverse","hit","raycast_bvh","hit_object","local_hit_position","world_hit_position","raycast_bounds","hit_cache","local_distance","world_distance","draw_on_top_gizoms","filter_hits_to_one_per_interactable_in_place","interactable_to_hit","old_hit","update_babylon_ray","origin_or_ray","p0p1","BVH_MAX_DEPTH","BVH_MAX_TRIANGLES","BVH_MIN_BB_SIZE","build_triangles_bvh","triangles","num_triangles","index0","index1","find_split_axis","sizex","sizey","sizez","build_tree_bvh","left_triangles","right_triangles","left_node","right_node","node_triangles","triangle","split_axis","axis_length","split_value","edge10","edge20","intersection_point","intersect_ray_triangle","filter_backface","hit_distance_cache","triangle_hit","build_bvh_from_mesh","CutoutShape","basis_x","basis_y","basis_x_length","basis_y_length","extent_low","extent_high","vertices_copy","is_closed","tmp_x","tmp_y","axis_x","axis_y","axis_z","z_low","z_high","BABYLON_EngineStore","CutoutObject","source_object","original_ready","shapes","cut_meshes","cut_instances","BABYLON_CSG","cutting_csgs","cutting_mesh","source_csg","new_mesh","dispose_source_object","dispose_cut_object","VIEW_POSITION","VIEW_SIZE","VIEW_TEXTURE","ViewCompositor","target_width","target_height","normalized_width","normalized_height","outlines","canvas_viewport","R11_G11_B10F_COMPONENT_MAX_ERROR","f11_f10_round_bit_mask","GAMMA","double_truncater","double_to_ieee","f64_buffer","u32_buffer","ieee_to_double","convert_f64_f10","add_step","ieee_f64","f64_bias","f11_bias","exponent_f64","exponent_f10","mantissa_f10","round_bit","combined","packed","convert_f64_f11","exponent_f11","mantissa_f11","to_srgb_and_clamp","saturate","compress_r11g11b10f","compress_rgba8ui","color_float","compress_rgba8_unorm","rgba8","rrt_and_odt_fit_params","rrt_and_odt_fit","fitted_inverse_rrt_and_odt_fit","ath","fitted_inverse_tonemapper","linear_r","linear_g","linear_b","odt_sat_r","odt_sat_g","odt_sat_b","tmp_r","tmp_g","tmp_b","srgb_r","srgb_g","srgb_b","tonemapper","aces_input","rrt_sat_r","rrt_sat_g","rrt_sat_b","fit_r","fit_g","fit_b","aces_output","get_fitted_inverse_tonemap","enable_verbose_warnings","guess","iteration_count","tonemapped","srgba_compressed","dt_dx","compressed_guess","compressed_tonemapped","clamped","tonemapped_r11_g11_b10f","tonemapped_srgb8ui","goal_srgb8ui","webgl2_capabilities_mac_m2_chrome","create_default_context_state","WebGL2Mock","index_count","context_attributes","textureUnit","srcX0","srcY0","srcX1","srcY1","dstX0","dstY0","dstX1","dstY1","drawbuffer","srcOffset","found_framebuffer","renderbuffer","found_renderbuffer","modeRGB","modeAlpha","sfactor","dfactor","srcRGB","dstRGB","srcAlpha","dstAlpha","srcData_or_size","mock_buffer","dstByteOffset","internalformat","border","srcData_or_imageSize","srcOffset_or_offset","srcLengthOverride","xoffset","yoffset","zoffset","bound_buffer","bound_texture","zNear","zFar","mock_program","mock_shader","shader_index","real_value","renderbuffertarget","textarget","real_shaders","missing_shaders","real","real_result","srcByteOffset","dstBuffer","dstOffset","real_buffer","shadertype","precisiontype","sampler_configuration","uniformBlockIndex","found_name","fake_name","uniformBlockName","fake_index","uniformIndices","bool_value","fail","zfail","zpass","mock_texture","width_format","height_type","border_source","pboOffset_source_pixels","format_source","source_srcData_pboOffset_pixels","srcLength","transpose","uniformBlockBinding","dstData","our_query","tf","varyings","bufferMode","program_state","vertexArray","readTarget","writeTarget","readOffset","writeOffset","ALBEDO_ALPHA_INSTANCE_ATTRIBUTE_NAME","ViewerUiMeshMaterial","babylon_change_source_mesh","new_source","SceneAssetMesh","mesh_variant","existing_source_mesh_key","existing_source","can_use_source_as_source_mesh","source_mesh","babylon_instance","try_update_source_in_place","can_update_source_in_place","existing_source_mesh","previous_source","source_mesh_key","existing_custom_geometry","source_matrix_sign","wanted_matrix_sign","UiMesh","wanted_depth_function","pair","negative_mesh","UiMeshInstance","Gizmo","gizmo_or_object","matrix_determinant_sign","visible","calculate_orthographic","near_z","far_z","TRANSFER_DEPTH_TEXTURE","TRANSFER_INVERSE_VIEW_PROJECTION_MATRIX","BLUR_SOURCE_TEXTURE","SHADOW_PLANE_SOURCE_TEXTURE","SHADOW_PLANE_REFERENCE_HEIGHT","SHADOW_PLANE_INTENSITY","SoftShadowRenderer","half_extents","reference_height","ExceptionHandler","error_type","prevent","unexpected_callbacks","TEXTURE_SAMPLER","ViewerXRSession","reference_space","yaw_offset_radians","viewer_pose","xr_camera_matrix","STAGING_FRAME_COUNT","zero_frame_allocation_data","TrackedMemoryResource","new_size","max_frame_count","TrackedTexture","levels_overhead","TrackedRenderbuffer","TrackedBuffer","WebGLMemoryTracker","bindBuffer","bufferData","bufferSubData","createTexture","deleteTexture","bindTexture","generateMipmap","texImage2D","texSubImage2D","texImage3D","texSubImage3D","texStorage2D","texStorage3D","compressedTexImage2D","compressedTexImage3D","compressedTexSubImage2D","compressedTexSubImage3D","createRenderbuffer","deleteRenderbuffer","bindRenderbuffer","renderbufferStorage","renderbufferStorageMultisample","formatter","readable_report","tracked_buffer","webgl_buffer","tracked_texture","current_texture","stored_data_size","get_pixel_size","image_size_bytes","transferred_image_size_bytes","tracked_renderbuffer","current_renderbuffer","InteractionType","_view","_click_void_observable","_secondary_click_void_observable","view_viewport","interactable_raycast_result","execution_object_has_drag_interactable","execute_object","drag_event","world_drag_event","local_delta","local_drag_event","click_event","called_observer","client_x","client_y","BABYLON_Plane","hit_distance","hit_point","world_delta","raycast_result","picked_object","execute_objects","View","partial_viewport","current_viewport","Bound","Overlay","_debug_layer","line_width","listeners_description_map","listeners_instance_storage_map","CustomElement","original_render","listeners_storage","event_listeners","bound_method","originalAttributeChangedCallback","Attribute","OnEvent","method_name","ElementFactory","is_collapsed","collapsed_label","uncollapsed_label","tool_container","container_label","container_content","on_click","button","label_element","on_change","tracker","current_value","is_dragging","start_x","start_value","pointer_move","diff_x","rounded","pointer_down","tracker_enabled","stored_value","optional","hide","show","to_hex","new_val","has_color_picker","picker","select","option_element","setter","value_label","button_text","value_text","original_type","is_readonly","ContentConstructor","_parent","_watcher","ContainerController","set_enabled","_container","get","paremeter","element_set","instance_get","TabWatcher","watcher","watchers","TabController","_menu","is_dirty","dependency_record","build","build_function","dependencies","dep","ElementController","TabType","DEBUG_MENU","DebugMenu","delta_x","delta_y","controller","controllers","existing_controller","DebugMenuController","GIZMO_AXIS_COLOR","GIZMO_COLOR_FACTOR","MeshDescriptions$1","MeshDescriptions","shaft_length","shaft_radius","cone_height","cone_radius","shaft_color","cone_color","shaft","cone","cube_side_size","cube_color","detail","angle_step","color_array","top1","bottom1","top2","bottom2","tip_index","base_center_index","major_radius","minor_radius","major_segments","minor_segments","sin_phi","cos_phi","second","side_length","half_side","outer_radius","inner_radius","next_index","MoveArrow","transform_handling","use_global_transform","arrow_mesh_description","current_transform","MovePlane","MoveGizmo","world_rotation","RotationTorus","use_global_transorm","torus_mesh_description","input_mesh_description","current_plane_point","start_vector","current_vector","cross_product","rotation_angle","angle_delta","parent_matrix","new_rotation_matrix","inverted_parent_transform","local_rotation_matrix","new_rotation","RotateGizmo","axes","ScaleArrow","current_scale","inverse_rotation_matrix","scale_matrix","local_scale_matrix","scale_factors","ScaleCenter","box_mesh_description","current_point","initial_distance","ScaleGizmo","TransfomTool","TransformationOrientation","Events","DEBUG_TRANSFORM_BAR","DebugTransformBar","show_orientation_switch","old_value","tool","class_string","DebugTransformBarController","tools","PersistentHandler","_config","descriptions","tabs","initiators","applied_description","initiate_tabs","icon_vertical_alignmment","DEBUG_LABEL","DebugLabel","DebugLabelController","title","icon","SelectableHandler","selected","canvas_pos","tooltip","selectable","on_select","on_deselect","DescriptionManager","has_required_keys","UiTools","active_tab","to_activate_tab","transform_tab","initiator","selectables","persistents","selected_observer","SupportedObservers","decriptions_container","gizmo","DebugLayer","_render_canvas","definition","log_instance","LIGHT_DESCRIPTION","is_spot_light","is_directed_shadow_light","is_line_light","is_directional_light","is_point_light","shadow","MaterialCollection","viewer_materials","CustomMaterialWrapper","SceneObject","_asset_instance","is_empty","update_meshes","new_mask_has_shadow_caster","old_mask_has_shadow_caster","new_materials","material_copy","current_material","replaced_material","include_self","old_object","new_parent","old_position","old_scale","old_rotation","our_id","old_parent","delete_children","parent_is_disposing","propagate_to_children","babylon_color","block_child_objects","initial_transform","BABYLON_AbstractMesh","sphere_center","sphere_radius_squared","tmp_delta","known_offset","local_direction","local_dir","update_lights","base_color","roughness_factor","cloned_bounds","longitude","latitude","OBJECT_DESCRIPTION","CAMERA_DESCRIPTION","InputHandler","_execution_object","initial_interaction_objects","InputHandlerManager","execution_object","interaction_objects","input_handler","_sender","_objects","call_dispose","interaction_object","get_object_id","ih","ViewerLockImplementation","ViewerLockSystem","lock","SceneLoaderAnimationGroupLoadingMode","SceneLoader","registeredPlugin","sceneFilename","queryStringPosition","dotPosition","fileInfo","errorMessage","onDispose","pluginExtension","directLoad","dataCallback","responseURL","pluginDisposed","onDisposeObservable","manifestChecked","canUseOfflineSupport","exceptionFound","rawData","sceneFile","meshNames","loadingToken","disposeHandler","progressHandler","successHandler","particleSystems","skeletons","geometries","syncedPlugin","assets","assetContainer","overwriteAnimations","animationGroupLoadingMode","startingIndexForNewAnimatables","onAssetContainerLoaded","SceneAssetInstanceMetadata","SceneAssetMeshInstanceMetadata","asset_instance_metadata","SceneAssetInstance","model_transform","BABYLON_Node","mesh_instances","has_warned_for_invalid_state","KeepAssets","InstantiatedEntries","AssetContainer","nodesUidMap","dependencyGraph","dependsOn","masterMesh","dependedBy","childId","sortedNodes","leaves","visitList","nodeToVisit","dependedByVisitedNode","dependedByVisitedNodeId","dependsOnDependedByVisitedNode","nameFunction","cloneMaterials","conversionMap","storeMap","alreadySwappedSkeletons","alreadySwappedMaterials","onClone","clonedMesh","oldMorphTargetManager","oldTarget","newTarget","nodesToSort","idsOnSortList","onNewCreated","replicatedParentId","replicatedParent","sourceMaterial","multi","instancedNode","replicatedSourceId","replicatedInstancedNode","canInstance","replicatedNode","addedNodes","addedNode","sourceAssets","targetAssets","keepAssets","asset","move","keepAsset","rootMesh","_targetConverter","nodeInAC","nodeInScene","animationInAC","animationsWithSameProperty","animationInScene","animationWithSameProperty","newAnimationGroups","animationGroupInAC","nodesToVisit","visitedNodes","SceneAssetMeshVariantKey","unique_vertex_data_id_counter","_TMP_ONE4","SceneAssetMeshInstance","rendering_material","SceneAssetContainer","babylon_container","instance_mesh","asset_mesh","materials_set","root_node","flatten","created_asset_mesh_instances","source_instance","mesh_instance","source_to_instance_map","all_children","new_root","child_node","new_node","source_node","found_parent","BABYLON_AssetContainer","animation_groups","scene_asset_instance","asset_mesh_instance","SceneAsset","generation_at_load_request","asset_path","asset_file","loaded_asset","BABYLON_SceneLoader","SceneAssetCachePurgeMode","SceneAssetCache","purge_mode","get_cache_url","ViewerScene","babylon_scene","cache_url","cached_asset","new_asset","Deferred","Skeleton$1","Skeleton","engineCaps","nBones","boneDict","sourceBones","boneName","sourceBone","highest","sceneAnimatables","rangeAnimatable","sceneAnimatable","targetMatrix","initialSkinMatrix","mappedIndex","dontCheckFrameId","needsUpdate","textureWidth","serializedBone","parsedSkeleton","parsedBone","parsedBoneIndex","bones","visited","RawTexture2DArray","MorphTargetManager","influenceCount","mustUpdateTexture","morph","targetData","DataReader","validateAsync","getExternalResource","pendingExternalResources","GLTFValidation","readAsync","readViewAsync","arrayBufferView","GLTFLoaderCoordinateSystemMode","GLTFLoaderAnimationStartMode","GLTFLoaderState","GLTFFileLoader","webRequest","loaderData","meshesNames","morphTargetManagers","lengthComputable","loaded","minVersion","createLoader","json","dataReader","Binary","magic","unpacked","ContentFormat","contentFormat","bodyLength","startByteOffset","ChunkFormat","chunkLength","spaces","getVector3","getQuaternion","getWeights","AnimationPropertyInfo","getValue","getStride","babylonAnimation","TransformNodeAnimationPropertyInfo","WeightAnimationPropertyInfo","babylonAnimationClone","nodeAnimationData","mergeDeep","isObject","pVal","oVal","ArrayItem","GLTFLoader","resultFunc","loadingToReadyCounterName","loadingToCompleteCounterName","oldBlockMaterialDirtyMechanism","babylonDrawMode","nodeParents","skins","babylonAnimationGroups","babylonAnimationGroup","loadNode","childBabylonMesh","nodeName","babylonTransformNodeForSkin","babylonSkeleton","primitives","primitive","shouldInstance","babylonAbstractMesh","babylonGeometry","loadAttribute","babylonVertexBuffer","divider","oneOverDivider","targetNames","setData","skeletonId","inverseBindMatricesData","isParent","skeletonNode","babylonBones","joints","babylonBone","parentBabylonBone","baseMatrix","babylonParentBone","perspective","babylonTarget","animationContext","targetInfo","invfps","numAnimations","outputOffset","babylonAnimatable","inputAccessor","outputAccessor","inputData","outputData","sparse","indicesBufferView","valuesBufferView","valuesData","sparseLength","sparseData","valuesIndex","indicesIndex","babylonBuffer","babylonData","textureLoaderOptions","samplerData","deferred","textureCreationOptions","dataUrl","babylonObject","componentTypeLength","loaderProperty","activeLoaderExtensionFunctions","extensionName","RawCubeTexture","UpdateRGBDAsyncEnvTools","NAME","EXT_lights_image_based","extensionContext","specularImageContext","lodGenerationScale","refresh","numMaxInstances","staticBuffer","matrixBuffer","forceRefreshParentInfo","numInstances","kindIsMatrix","currentSize","EXT_mesh_gpu_instancing","translationBuffer","rotationBuffer","scaleBuffer","MeshoptCompression","EXT_meshopt_compression","bufferViewMeshopt","EXT_texture_webp","KHR_draco_mesh_compression","KHR_lights","babylonLight","babylonDirectionalLight","babylonSpotLight","KHR_materials_pbrSpecularGlossiness","KHR_materials_unlit","KHR_materials_clearcoat","KHR_materials_iridescence","KHR_materials_anisotropy","KHR_materials_emissive_strength","KHR_materials_sheen","KHR_materials_specular","KHR_materials_ior","KHR_materials_variants","extensionMetadata","variantName","mappingIndex","mapping","mappingVariantIndex","variantIndex","variant","newRoot","variantEntry","TransmissionHelper","newOptions","oldOptions","transparentIdx","opaqueIdx","sceneImageProcessingapplyByPostProcess","saveSceneEnvIntensity","opaqueRenderTarget","KHR_materials_transmission","pbrMaterial","KHR_materials_translucency","KHR_materials_volume","attenuationDistance","KHR_mesh_quantization","KHR_texture_basisu","KHR_texture_transform","KHR_xmp_json_ld","xmp_gltf","xmp_node","packet","getColor3","getAlpha","getFloat","getMinusFloat","getNextFloat","getFloatBy2","getTextureTransformTree","MaterialAnimationPropertyInfo","CameraAnimationPropertyInfo","LightAnimationPropertyInfo","nodesTree","camerasTree","materialsTree","extensionsTree","animationPointerTree","KHR_animation_pointer","gltfCurrentNode","gltfTargetNode","AnimationEvent","onlyOnce","Sound","timeSinceLastStart","wasPlaying","urlOrArrayBuffer","readyToPlayCallback","currentVolume","currentDistance","refDistance","rolloffFactor","validParameter","codecSupportedFound","audioData","audioBuffer","soundTrackAudioNode","coneInnerAngle","coneOuterAngle","coneOuterGain","newLocalDirection","tryToPlay","playPromise","oldSource","actualOffset","stopTime","newVolume","newPlaybackRate","setBufferAndRun","clonedSound","currentOptions","parsedSound","sourceSound","soundName","soundUrl","newSound","soundPosition","localDirectionToMesh","connectedMesh","WeightedSound","sounds","weightSum","invWeightSum","sound","randomValue","MSFT_audio_emitter","emitterIndex","clipPromises","clipContext","objectURL","weightedSound","babylonAnimationEvent","MSFT_lod","indexLOD","firstPromise","nodeLODs","nodeLOD","assignWrap","previousNodeLOD","materialLODs","materialLOD","previousDataLOD","previousIndexLOD","loadAsync","bufferLODs","bufferLOD","babylonMaterials","babylonMaterialsToDispose","babylonTextures","MSFT_minecraftMesh","extraContext","MSFT_sRGBFactors","ExtrasAsMetadata","gltfProp","BETRAKTA_BABYLON_EXTENSION_ID","BetraktaGLTFLoaderExtension","BABYLON_GLTF2_GLTFLoader","babylon_draw_mode","LutEffect","lut_size","is_3d","CUBE_LUT_3D_FIELD_NAME","CUBE_LUT_1D_FIELD_NAME","lut_data","words","expected_lut_data_size","packed_data","BABYLON_RawTexture2DArray","texture_source","source_width","source_height","source_channels","destination_data","src_index","dst_index","fake_image_loader","CAMERA_MANAGER_DESCRIPTION","VIEWER_VERSION","MAX_CLIP_PLANES","FRAMES_TO_COMPOSITE","MAX_RENDER_SIZE","TimeDelta","seconds","canvas_element","optional_features_partial","BABYLON_NormalMaterial","original_prepare_defines_for_light","light_defines_override","specular_supported","disable_webgl2","gl_context","engine_antialiasing","scene_options","BABYLON_Scene","BABYLON_ThinEngine","BABYLON_BaseTexture","use_float_framebuffer_type","BABYLON_ImageProcessingConfiguration","ubo_supported","BABYLON_DracoCompression","BABYLON_PushMaterial","reference_space_type","xr","original_engine_function","original_release_texture","original_create_effect","registered_effects","BABYLON_ShaderLanguage","effect_compiled_promise","iview","rect","client_scale_x","client_scale_y","inside_viewport_x","inside_viewport_y","delta_time_seconds","light_system_was_dirty","focus_border","scene_was_dirty","require_composite","transform_node","dom_event_listener","effective_mask","urls_to_check","alpha_index","progress_callback","single_url","file_path","asset_materials","source_material","cutoff","flip_cutoff","_material_id","material_handle","texture_id","promise_material","new_object","mesh_url","old_object_id","new_object_id","delete_old_object","add_light_container","light_type","ambient_light","child_id","parent_id","direct_descendants_only","start_object","visibility_changed","add_to_children","remove_from_children","allocation","available_bits","focus","receive_shadow","direction_or_filter","boundingbox","screenshot_data","expected_type","re_array","inverse_tonemapped_color","local_bounds","transformed_bounds","object_world_bounds","ui_mesh_aabb_transformed","ui_mesh_aabb_world","aabb_transformed","aabb_world","text_field","text_field_aabb","ui_lines_bounds","ui_line_on_top_bounds","clip_all_instances","normalized_direction","distance_to_plane","observable_mesh","min_max","extend_size","before_observable","after_observable","object_to_index","id_to_index","present_indices","namespace","namespace_map","metadata_map","tab_index","display_help","number_of_frames","scene_objects","ui_mesh","skybox","world_transform","photographic_exposure","full_renderer","ObjectHandle","mid","default_viewer_config","create_viewer","draco_decoders","optional_features","real_config","InputGatherer","_canvas","active_view","clicked_view","dist_x","dist_y","pinch_squared_distance","multi_touch_position","custom_event","canvas_rect","FieldOfViewDirection","PerspectiveProjection","field_of_view","field_of_view_direction","half_depth","smooth","vertical_segments","uv0_vertex_values","PrimitiveBuilder","ORBIT_PLANNER_CAMERA_DESCRIPTION","OrbitPlannerCamera_1","MAX_PITCH","DEFAULT_PAN_SENSITIVITY_RADIUS","DEFAULT_OFFSET","ALLOWED_OFFSET","DEFAULT_PLANE","DEBOUNCE_TIME","INERTIA_SPEED_YAW_PITCH","INERTIA_SPEED_PITCH_COLLISION","INERTIA_SPEED_ZOOM","INERTIA_SPEED_PAN","ZOOM_DELTA_PERCENTAGE","LIMIT_SPRING_STIFFNESS_YAW_PITCH","LIMIT_SPRING_STIFFNESS_PAN","OrbitPlannerCamera","fov_degrees","fov_radians","full_turn","new_pivot","sensitivity_factor","zoom_value","delta_time_in_seconds","limited_forward","limited_right","limited_up","limited_pivot","limited_offset","limited_pitch","collide_pitch","limited_collide_pitch","sin_limited_collide_pitch","new_target_offset","limited_new_offset","right_out","up_out","forward_out","horizontal_rotation","vertical_rotation","scene_bounding_sphere","pivot_lerp_t","look","look_length","turn","yaw_diff","tmp_forward","tmp_right","margin","advanced_viewer","minimum_margin","vector_1","vector_2","horizontal","pad","vertical_pad","horizontal_pad","target_sphere","get_pan_limit_corners","ui_lines","corners","stiffness","limit_min","limit_max","limited_after_input","input_used_up","input_left_after_limit","relativeStart","relativeEnd","TypedArray","LN2","asUint","searchString","subjectString","lastIndex","clz32","imul","isView","setMetadataFor","CharSequence","interfaceMeta","Comparable","Number_0","classMeta","Unit","objectMeta","ByteCompanionObject","ShortCompanionObject","IntCompanionObject","FloatCompanionObject","DoubleCompanionObject","StringCompanionObject","BooleanCompanionObject","Comparator","Collection","AbstractCollection","VOID","MutableIterable","AbstractMutableCollection","IteratorImpl","ListIteratorImpl","List","MutableList","AbstractMutableList","RandomAccess","SubList","Map_0","AbstractMap","MutableMap","AbstractMutableMap","Set","MutableSet","AbstractMutableSet","Companion","ArrayList","ArrayList_init_$Create$","HashMap","HashMap_init_$Create$","HashMapKeys","HashMapValues","HashMapEntrySetBase","HashMapEntrySet","HashMapKeysDefault$iterator$1","HashMapKeysDefault","HashMapValuesDefault$iterator$1","HashMapValuesDefault","HashSet","HashSet_init_$Create$","Companion_0","Itr","KeysItr","ValuesItr","EntriesItr","Entry","EntryRef","containsAllEntries","tmp$ret$0","$l$block_0","isInterface","tmp0_iterator","tmp_0","InternalMap","InternalHashMap","InternalHashMap_init_$Create$","LinkedHashMap","LinkedHashMap_init_$Create$","LinkedHashSet","LinkedHashSet_init_$Create$","BaseOutput","NodeJsOutput","BufferedOutput","BufferedOutputToConsoleLog","KClass","KClassImpl","NothingKClassImpl","ErrorKClass","PrimitiveKClassImpl","SimpleKClassImpl","KProperty1","KProperty0","KTypeImpl","PrimitiveClasses","Sequence","ConstrainedOnceSequence","StringBuilder","StringBuilder_init_$Create$_0","Companion_1","Regex","MatchGroup","findNext$1$groups$1","findNext$1","Enum","DurationUnit","MonotonicTimeSource","Reading","HrTimeSource","PerformanceTimeSource","DateNowTimeSource","_no_name_provided__qut3iv","_no_name_provided__qut3iv_0","_no_name_provided__qut3iv_1","minus$1","_no_name_provided__qut3iv_2","Companion_2","Char","Companion_3","arrayIterator$1","Companion_4","Long","Digit","Letter","OtherLowercase","Continuation","CoroutineImpl","CompletedContinuation","_no_name_provided__qut3iv_3","Exception_init_$Create$","RuntimeException","RuntimeException_init_$Create$","IllegalArgumentException","IllegalArgumentException_init_$Create$","IndexOutOfBoundsException","IndexOutOfBoundsException_init_$Create$","IllegalStateException","IllegalStateException_init_$Create$","UnsupportedOperationException","UnsupportedOperationException_init_$Create$","NoSuchElementException","NoSuchElementException_init_$Create$","Error_0","Error_init_$Create$","AssertionError","AssertionError_init_$Create$","ConcurrentModificationException","ConcurrentModificationException_init_$Create$","ArithmeticException","ArithmeticException_init_$Create$","NumberFormatException","NumberFormatException_init_$Create$","NullPointerException","NullPointerException_init_$Create$","NoWhenBranchMatchedException","NoWhenBranchMatchedException_init_$Create$","ClassCastException","ClassCastException_init_$Create$","UninitializedPropertyAccessException","UninitializedPropertyAccessException_init_$Create$","AbstractIterator","State","IteratorImpl_0","ListIteratorImpl_0","Companion_5","AbstractList","AbstractMap$keys$1$iterator$1","AbstractMap$values$1$iterator$1","Companion_6","AbstractSet","AbstractMap$keys$1","AbstractMap$values$1","Companion_7","EmptyList","ArrayAsCollection","EmptyIterator","IndexedValue","IndexingIterable","IndexingIterator","MapWithDefault","EmptyMap","IntIterator","SequenceScope","SequenceBuilderIterator","_no_name_provided__qut3iv_4","TransformingSequence$iterator$1","TransformingSequence","FilteringSequence$iterator$1","FilteringSequence","FlatteningSequence$iterator$1","FlatteningSequence","DistinctSequence","EmptySequence","DistinctIterator","GeneratorSequence$iterator$1","GeneratorSequence","_no_name_provided__qut3iv_5","EmptySet","NaturalOrderComparator","Key","ContinuationInterceptor","EmptyCoroutineContext","CoroutineSingletons","EnumEntriesList","Random","Default","Companion_8","XorWowRandom","Companion_9","IntProgression","ClosedRange","IntRange","IntProgressionIterator","Companion_10","KTypeParameter","DelimitedRangesSequence$iterator$1","DelimitedRangesSequence","Companion_11","Duration","compareTo","Duration__compareTo_impl_pchp0f","Companion_getInstance_11","ComparableTimeMark","ValueTimeMark","Monotonic","DeepRecursiveScope","DeepRecursiveFunction","DeepRecursiveScopeImpl","LazyThreadSafetyMode","UnsafeLazyImpl","UNINITIALIZED_VALUE","Companion_12","Failure","Result","NotImplementedError","Pair","Triple","Companion_13","UByte","Iterator","UByteArray","Companion_14","UInt","Iterator_0","UIntArray","Companion_15","ULong","Iterator_1","ULongArray","Companion_16","UShort","Iterator_2","UShortArray","protoOf","Unit_instance","ByteCompanionObject_instance","ShortCompanionObject_instance","IntCompanionObject_instance","FloatCompanionObject_instance","DoubleCompanionObject_instance","StringCompanionObject_instance","BooleanCompanionObject_instance","isNaN_0","_this__u8e3s4","isFinite","isInfinite","takeHighestOneBit","isFinite_0","isInfinite_0","isNaN_1","countTrailingZeroBits","low","countTrailingZeroBits_0","this_0","collectionToArray","collectionToArrayCommonImpl","arrayOfNulls","fillArrayVal","listOf","arrayListOf","setOf","hashSetOf","collectionsSort","naturalOrder","mapOf","hashMapOf","mapCapacity","checkIndexOverflow","throwIndexOverflow","sortWith","comparator","copyToArray","sortArrayWith","inductionVariable","AbstractMutableCollection$removeAll$lambda","$elements","equals_0","modified","THROW_CCE","removeAll_1","$outer","IllegalStateException_init_$Create$_0","toString_1","Companion_instance_5","fromIndex","toIndex","AbstractMutableList$removeAll$lambda","AbstractMutableList$retainAll$lambda","_index","removeAll","tmp$ret$1","$l$block","times","tmp0_elvis_lhs","tmp1_loop_parameter","iter","Companion_instance_7","arrayOfUninitializedElements","IllegalArgumentException_init_$Create$_0","resetAt","resetRange","copyOfUninitializedElements","copyOf_7","Companion_instance","ArrayList_init_$Create$_0","Companion_getInstance","ArrayList_init_$Init$","$this","objectCreate","ArrayList_init_$Init$_0","initialCapacity","ArrayList_init_$Init$_1","ArrayList_init_$Create$_1","increaseLength","rangeCheck","insertionRangeCheck","minCapacity","index_0","tail","get_lastIndex_2","lastIndexOf","arrayToString","_stableSortingIsSupported","getStableSortingIsSupported","comparison","sortArrayWith$lambda","mergeSort","get_lastIndex","sortArray","sortArray$lambda","tmp0_safe_receiver","getStableSortingIsSupported$lambda","inductionVariable_0","endInclusive","mergeSort_0","median","leftIndex","rightIndex","leftValue","rightValue","$comparator","compareTo_0","HashMap_init_$Init$","internalMap","HashMap_init_$Init$_0","HashMap_init_$Init$_1","loadFactor","InternalHashMap_init_$Create$_2","HashMap_init_$Init$_2","HashMap_init_$Create$_0","HashMap_init_$Init$_3","InternalHashMap_init_$Create$_1","HashMap_init_$Create$_1","backing","$entryIterator","backingMap","UnsupportedOperationException_init_$Create$_0","entryIterator","HashSet_init_$Init$","HashSet_init_$Init$_0","HashSet_init_$Init$_1","InternalHashMap_init_$Create$_0","HashSet_init_$Create$_0","HashSet_init_$Init$_2","HashSet_init_$Init$_3","HashSet_init_$Create$_1","computeHashSize","coerceAtLeast","computeShift","hashSize","InternalHashMap_init_$Init$","InternalHashMap_init_$Init$_0","Companion_instance_0","InternalHashMap_init_$Init$_1","InternalHashMap_init_$Init$_2","_get_capacity__a9k9f3","_get_hashSize__tftcho","registerModification","ensureExtraCapacity","shouldCompact","rehash","ensureCapacity","extraCapacity","spareCapacity","gaps","RuntimeException_init_$Create$_0","copyOf_3","newHashSize","allocateValuesArray","curValuesArray","newValuesArray","hashCode","compact","valuesArray","putRehash","hash_0","probesLeft","findKey","findValue","$l$loop","ensureNotNull","addKey","retry","tentativeMaxProbeDistance","coerceAtMost","probeDistance","putIndex","tmp4","removeKey","removeKeyAt","removeHashAt","removedHash","patchAttemptsLeft","otherHash","contentEquals","putEntry","putAllEntries","updated","tmp1_elvis_lhs","tmp0_safe_receiver_0","tmp1_elvis_lhs_0","sb","keysArray","presenceArray","hashArray","maxProbeDistance","tmp1_safe_receiver","StringBuilder_init_$Create$","LinkedHashMap_init_$Init$","LinkedHashMap_init_$Init$_0","LinkedHashMap_init_$Create$_0","LinkedHashMap_init_$Init$_1","LinkedHashMap_init_$Create$_1","LinkedHashSet_init_$Init$","LinkedHashSet_init_$Init$_0","LinkedHashSet_init_$Create$_0","LinkedHashSet_init_$Init$_1","LinkedHashSet_init_$Init$_2","LinkedHashSet_init_$Create$_1","get_output","_init_properties_console_kt__rfg7jv","outputStream","messageString","println","properties_initialized_console_kt_gll9dl","isNode","round","floor","roundToInt","numberToInt","roundToLong","Companion_getInstance_4","numberToLong","nextDown","toRawBits","toLong_0","doubleFromBits","get_INV_2_26","_init_properties_PlatformRandom_kt__6kjv62","INV_2_26","get_INV_2_53","INV_2_53","doubleFromParts","hi26","low27","defaultPlatformRandom","Random_0","properties_initialized_PlatformRandom_kt_uibhw8","get_js","jClass","getStringHashCode","NothingKClassImpl_instance","NothingKClassImpl_getInstance","givenSimpleName","isInstanceFunction","jsIsType","createKType","classifier","arguments_0","isMarkedNullable","asList","tmp_1","getBooleanHashCode","kClass","classifierName","joinToString_0","nullable","plus_4","get_functionClasses","_init_properties_primitives_kt__3fums4","functionClasses","PrimitiveClasses$anyClass$lambda","PrimitiveClasses$numberClass$lambda","isNumber","PrimitiveClasses$booleanClass$lambda","PrimitiveClasses$byteClass$lambda","PrimitiveClasses$shortClass$lambda","PrimitiveClasses$intClass$lambda","PrimitiveClasses$floatClass$lambda","PrimitiveClasses$doubleClass$lambda","PrimitiveClasses$arrayClass$lambda","isArray","PrimitiveClasses$stringClass$lambda","PrimitiveClasses$throwableClass$lambda","PrimitiveClasses$booleanArrayClass$lambda","isBooleanArray","PrimitiveClasses$charArrayClass$lambda","isCharArray","PrimitiveClasses$byteArrayClass$lambda","isByteArray","PrimitiveClasses$shortArrayClass$lambda","isShortArray","PrimitiveClasses$intArrayClass$lambda","isIntArray","PrimitiveClasses$longArrayClass$lambda","isLongArray","PrimitiveClasses$floatArrayClass$lambda","isFloatArray","PrimitiveClasses$doubleArrayClass$lambda","isDoubleArray","PrimitiveClasses$functionClass$lambda","$arity","PrimitiveClasses_instance","tmp_2","tmp_3","tmp_4","tmp_5","tmp_6","tmp_7","tmp_8","tmp_9","tmp_10","tmp_11","tmp_12","tmp_13","tmp_14","tmp_15","tmp_16","tmp_17","tmp_18","tmp_19","tmp_20","tmp_21","tmp_22","tmp_23","tmp_24","tmp_25","tmp_26","tmp_27","tmp_28","tmp_29","tmp_30","tmp_31","tmp_32","tmp_33","tmp_34","tmp_35","tmp_36","arity","PrimitiveClasses_getInstance","properties_initialized_primitives_kt_jle18u","getKClass","getKClassM","getKClass1","jClasses","getKClassFromExpression","jsClass","StringBuilder_init_$Init$","StringBuilder_init_$Init$_0","get_lastIndex_3","charSequenceGet","IndexOutOfBoundsException_init_$Create$_0","toString","toString_0","stringCsq","uppercaseChar","uppercase","isWhitespace","isWhitespaceImpl","isLowerCase","Char__compareTo_impl_ypi4mb","isLowerCaseImpl","titlecaseChar","titlecaseCharImpl","checkRadix","radix","toInt","toIntOrNull","numberFormatError","toDouble","isNaN_2","isBlank","toLong","toLongOrNull","digitOf","Char__minus_impl_a2frrh","digitToIntImpl","toDoubleOrNull","Regex_init_$Init$","emptySet","Regex_init_$Create$","Companion_instance_1","literal","Companion_getInstance_1","Regex$findAll$lambda","this$0","$input","$startIndex","Regex$findAll$lambda_0","toSet_0","toFlags","charSequenceLength","findNext","generateSequence","$super","tmp0_other_with_cast","prepend","toFlags$lambda","nextPattern","numberRangeToNumber","findNext$o$groups$o$iterator$lambda","advanceToNextCharacter","code1","code2","$match","asSequence_0","get_indices_1","$range","$nextPattern","get_indices_2","startsWith","ignoreCase","regionMatches","repeat","thisOffset","otherOffset","regionMatchesImpl","equals","thisChar","otherChar","equals_1","DurationUnit_NANOSECONDS_instance","DurationUnit_MILLISECONDS_instance","DurationUnit_SECONDS_instance","DurationUnit_MINUTES_instance","DurationUnit_HOURS_instance","DurationUnit_DAYS_instance","DurationUnit_entriesInitialized","DurationUnit_initEntries","ordinal","convertDurationUnit","sourceUnit","targetUnit","sourceCompareTarget","convertDurationUnit_0","convertDurationUnitOverflow","DurationUnit_NANOSECONDS_getInstance","DurationUnit_MILLISECONDS_getInstance","DurationUnit_SECONDS_getInstance","DurationUnit_MINUTES_getInstance","DurationUnit_HOURS_getInstance","DurationUnit_DAYS_getInstance","MonotonicTimeSource_instance","tmp2_elvis_lhs","DateNowTimeSource_instance","timeMark","one","another","MonotonicTimeSource_getInstance","contentEquals_4","contentHashCode","contentToString","name_for_destructuring_parameter_0_fjsvno","nanos","Duration__plus_impl_yu9v8f","toDuration_0","tmp0_container","tmp1_container","ms1","ms2","read_0","toList","emptyList","toMutableList","withIndex","withIndex$lambda","get_indices","get_indices_0","get_lastIndex_0","joinToString","truncated","joinTo","firstOrNull","asSequence","emptySequence","any","subtract","toMutableSet","removeAll_0","contains_0","asIterable","filterNotNull","filterNotNullTo","reversedArray","NoSuchElementException_init_$Create$_0","asCollection","zip","lastOrNull","none","distinct","toList_0","sortedWith","sortedArrayWith","contains_1","indexOf_0","contains_2","indexOf_1","contains_3","indexOf_2","contains_4","indexOf_3","last_0","toSet","toCollection","single","appendElement","sortWith_0","get_lastIndex_1","getOrNull","$this_withIndex","arrayIterator","$this_asSequence","$this_asIterable","joinTo_0","toHashSet","toCollection_0","collectionSizeOrDefault","toBooleanArray","booleanArray","toMutableList_0","optimizeReadOnlyList","toMutableList_1","plus","result_0","addAll_0","first_0","any_0","none_0","firstOrNull_0","minus","element_0","plus_0","plus_1","addAll","distinct_0","toMutableSet_0","filterNotNull_0","filterNotNullTo_0","optimizeReadOnlySet","sorted","sort_0","this_1","contains_5","indexOf_4","sortedWith_0","minOrNull","single_0","single_1","singleOrNull","lastOrNull_0","titlecaseImpl","until","Companion_getInstance_9","checkStepIsPositive","Companion_instance_10","minimumValue","reversed","downTo","coerceIn","maximumValue","coerceIn_0","contains_6","toIntExactOrNull","containsLower","toList_1","mapNotNull","filterNotNull_1","firstOrNull_1","toSet_1","flatMap","Sequence$iterator$ref","distinct_1","distinctBy","distinct$lambda","onEach","onEach$lambda","any_1","plus_2","flatten_1","sequenceOf","minus_0","asIterable_0","filterNot","filterNotNull$lambda","$action","minus$o$iterator$lambda","$removed","$element","$this_minus","plus_3","collectionSizeOrNull","drop","single_2","contentEquals_0","contentEquals_5","contentEquals_1","contentEquals_6","contentEquals_2","contentEquals_7","contentEquals_3","contentEquals_8","get_PI","PI","_Char___init__impl__6a9atx","_get_value__a43j40","_Char___init__impl__6a9atx_0","Char__compareTo_impl_ypi4mb_0","Char__toInt_impl_vasixd","Char__equals_impl_x6719k","Char__hashCode_impl_otmys","Companion_instance_2","Companion_getInstance_2","identityHashCode","arrayOf","tmp3_elvis_lhs","implement","interfaces","masks","imask","iid","bitMaskWith","iidImask","compositeBitMask","activeBit","numberIndex","intArray","positionInNumber","numberWithSettledBit","isBitSet","possibleActiveBit","initValue","charArray","longArray","charArrayOf","$array","get_buf","_init_properties_bitUtils_kt__nfcg4k","get_bufFloat64","bufFloat64","get_bufInt32","bufInt32","get_lowIndex","lowIndex","get_highIndex","highIndex","getNumberHashCode","doubleToRawBits","properties_initialized_bitUtils_kt_i2bo3e","numberToChar","charSequenceSubSequence","arrayToString$lambda","contentEqualsInternal","isArrayish","contentHashCodeInternal","doubleCompareTo","primitiveCompareTo","compareToDoNotIntrinsicify","ia","getObjectHashCode","calculateRandomHash","anyToString","obj1","obj2","typeOf","getBigIntHashCode","getSymbolHashCode","shiftNumber","MASK","bigNumber","signum","chunk","hashCodeMap","symbolIsSharable","getSymbolMap","getSymbolWeakMap","cachedHashCode","symbol","symbolMap","symbolWeakMap","captureStack","constructorFunction","defineProp","extendThrowable","this_","cause","setPropertiesToThrowableInstance","errorInfo","calculateErrorInfo","THROW_NPE","noWhenBranchMatchedException","throwUninitializedPropertyAccessException","UninitializedPropertyAccessException_init_$Create$_0","THROW_ISE","THROW_IAE","lazy","initializer","lazy_0","fillFrom","srcLen","dstLen","arrayCopyResize","defaultValue","arrayPlusCollection","Companion_instance_4","high","subtract_0","multiply","divide","modulo","bitCount","shiftLeft","shiftRight","shiftRightUnsigned","toByte","toShort","toNumber","equalsLong","hashCode_0","toStringImpl","get_ZERO","_init_properties_longjs_kt__tqrzid","ZERO","get_ONE","ONE","get_NEG_ONE","NEG_ONE","get_MAX_VALUE","MAX_VALUE","get_MIN_VALUE","MIN_VALUE","get_TWO_PWR_24_","TWO_PWR_24_","thisNeg","isNegative","otherNeg","a48","a32","a16","a00","b48","b32","b16","b00","c48","c32","c16","c00","isZero","isOdd","negate","lessThan","fromNumber","Exception_init_$Create$_0","halfThis","approx","rem","rem_0","greaterThanOrEqual","approxDouble","approx2","log2","approxRes","approxRem","greaterThan","numBits","numBits_0","getLowBitsUnsigned","radixLong","fromInt","digitsPerTime","radixToPower","remDiv","intval","digits","twoPwr32","properties_initialized_longjs_kt_5aju7t","defaultConstructor","associatedObjectKey","associatedObjects","suspendArity","createMetadata","undef","metadataConstructor","generateInterfaceId","doubleToInt","get_propertyRefClassMetadataCache","_init_properties_reflectRuntime_kt__5r4uu3","propertyRefClassMetadataCache","metadataObject","getPropertyCallableRef","paramCount","superType","getPropertyRefClass","getKPropMetadata","getInterfaceMaskFor","tmp$ret$2","getLocalDelegateReference","mutable","properties_initialized_reflectRuntime_kt_inkhwd","isJsArray","iface","isInterfaceImpl","isSuspendFunction","objTypeOf","tmp2_safe_receiver","isComparable","isCharSequence","objType","jsClassType","jsGetPrototypeOf","klassMetadata","parentProto","copyOf","copyOf_0","copyOf_1","copyOf_2","copyOf_4","copyOf_5","copyOf_6","contentDeepEquals","contentDeepEqualsImpl","plus_5","contentEquals_9","contentEquals_10","contentEquals_11","contentEquals_12","decodeVarLenBase64","fromBase64","resultLength","int","shift","sixBit","binarySearchRange","Digit_getInstance","needle","middle","Digit_instance","getLetterType","isOtherLowercase","Letter_getInstance","rangeStart","rangeEnd","lastTwoBits","shift_0","Letter_instance","toBase64","rangeStartDiff","i_0","rangeLength","rangeCategory","OtherLowercase_getInstance","OtherLowercase_instance","releaseIntercepted","intercepted","Key_instance","CompletedContinuation_instance","resultContinuation","_Result___get_isFailure__impl__jpiriv","currentResult","Result__exceptionOrNull_impl_p6xea9","$this$with","outcome","get_COROUTINE_SUSPENDED","$p","completion","exception_0","createFailure","tmp$ret$4","createCoroutineUnintercepted","$completion","$this_createCoroutineUnintercepted","$receiver","$completion$1","Exception_init_$Init$","Exception_init_$Init$_0","Exception_init_$Init$_1","IllegalArgumentException_init_$Init$","RuntimeException_init_$Init$","IllegalArgumentException_init_$Init$_0","RuntimeException_init_$Init$_0","IllegalArgumentException_init_$Init$_1","RuntimeException_init_$Init$_1","IllegalArgumentException_init_$Create$_1","IndexOutOfBoundsException_init_$Init$","IndexOutOfBoundsException_init_$Init$_0","IllegalStateException_init_$Init$","IllegalStateException_init_$Init$_0","UnsupportedOperationException_init_$Init$","UnsupportedOperationException_init_$Init$_0","NoSuchElementException_init_$Init$","NoSuchElementException_init_$Init$_0","Error_init_$Init$","Error_init_$Init$_0","Error_init_$Create$_0","AssertionError_init_$Init$","AssertionError_init_$Init$_0","AssertionError_init_$Create$_0","ConcurrentModificationException_init_$Init$","ArithmeticException_init_$Init$","ArithmeticException_init_$Init$_0","ArithmeticException_init_$Create$_0","NumberFormatException_init_$Init$","NumberFormatException_init_$Init$_0","NumberFormatException_init_$Create$_0","NullPointerException_init_$Init$","NoWhenBranchMatchedException_init_$Init$","ClassCastException_init_$Init$","UninitializedPropertyAccessException_init_$Init$","UninitializedPropertyAccessException_init_$Init$_0","findAssociatedObject","annotationClass","tmp3_safe_receiver","tmp4_elvis_lhs","tmp5_elvis_lhs","toString_2","AbstractCollection$toString$lambda","tryToComputeNext","State_Failed_getInstance","State_Ready_getInstance","State_NotReady_getInstance","State_Done_getInstance","State_Ready_instance","State_NotReady_instance","State_Done_instance","State_Failed_instance","State_entriesInitialized","State_initEntries","oldCapacity","newCapacity","otherIterator","elemOther","toString_3","implFindEntry","AbstractMap$toString$lambda","ourValue","EmptyList_getInstance","listOfNotNull","mutableListOf","listOf_0","EmptyList_instance","EmptyIterator_instance","isVarargs","flatten_0","default_0","iteratorFactory","getOrImplicitDefault","mapOf_0","toMap_0","emptyMap","EmptyMap_getInstance","toMap","toMap_1","optimizeReadOnlyMap","toMutableMap","plus_6","putAll","EmptyMap_instance","EmptySet_getInstance","putAll_0","removeFirst","filterInPlace","predicateResultToRemove","filterInPlace_0","writeIndex","readIndex","removeIndex","tmp1_iterator","addAll_1","convertToListIfNotCollection","removeLast","nextNotReady","exceptionalState","throwOnFailure","EmptyCoroutineContext_getInstance","$block","asSequence_1","constrainOnce","flatten_2","flatten$lambda","EmptySequence_instance","calcNext","sendWhen","ensureItemIterator","nextItemIterator","keySelector","flatten$lambda_0","seedFunction","nextFunction","calcNext_0","getInitialValue","getNextValue","setOf_0","EmptySet_instance","NaturalOrderComparator_instance","compareValues","EmptyCoroutineContext_instance","CoroutineSingletons_COROUTINE_SUSPENDED_getInstance","CoroutineSingletons_COROUTINE_SUSPENDED_instance","CoroutineSingletons_entriesInitialized","CoroutineSingletons_initEntries","enumEntries","getProgressionLastElement","differenceModulo","Default_instance","Default_getInstance","checkRangeBounds","seed","XorWowRandom_init_$Create$","boundsErrorMessage","takeUpperBits","XorWowRandom_init_$Init$","seed1","seed2","Companion_instance_8","Companion_getInstance_8","Companion_instance_9","isPositive","thisUpper","otherUpper","tmp$ret$6","titlecase","trimIndent","replaceIndent","newIndent","lines_0","destination_0","tmp0_iterator_0","tmp$ret$3","indentWidth","minCommonIndent","resultSizeEstimate","indentAddFunction","getIndentFunction","destination_1","tmp0_iterator_1","item_0","it_0","indent","getIndentFunction$lambda","getIndentFunction$lambda_0","$indent","toIntOrNull_0","firstChar","limitForMaxRadix","limitBeforeMul","digit","toLongOrNull_0","delimiters","split_0","rangesDelimitedBy","substring_0","contains_7","indexOf_5","indexOf_7","substring","contains_8","indexOf_6","padStart","padChar","padStart_0","startsWith_0","indexOfAny","requireNonNegativeLimit","currentOffset","nextIndex","isLimited","startIndex_0","endIndex_0","rangesDelimitedBy$lambda","last_1","step_0","charAtIndex","calcNext_1","getNextMatch","lineSequence","splitToSequence","rangesDelimitedBy_0","splitToSequence$lambda","delimitersList","rangesDelimitedBy$lambda_0","findAnyOf","strings","matchingString","index_1","matchingString_0","lastIndexOf_0","toBooleanStrictOrNull","removeSuffix","endsWith_0","substringBefore","missingDelimiterValue","substringAfter","$delimiters","$ignoreCase","$this$$receiver","$this_splitToSequence","$delimitersList","_Duration___init__impl__kdtzql","rawValue","isInNanos","containsArg","_get_value__a43j40_0","containsArg_0","containsArg_1","_get_rawValue__5zfu4e","isInMillis","_get_storageUnit__szjgha","Companion_instance_11","durationOfMillis","parseDuration","Duration__unaryMinus_impl_x2k1y0","durationOf","Duration__isInfinite_impl_tsn9y3","Duration__isFinite_impl_rzjsps","durationOfNanosNormalized","durationOfMillisNormalized","addValuesMixedRanges","thisMillis","otherNanos","otherMillis","nanosToMillis","resultMillis","otherNanoRemainder","millisToNanos","durationOfNanos","Duration__isNegative_impl_pbysfa","_Duration___get_absoluteValue__impl__vr7i6w","compareBits","Duration__compareTo_impl_pchp0f_0","_Duration___get_hoursComponent__impl__7hllxa","_Duration___get_inWholeHours__impl__kb9f3j","_Duration___get_minutesComponent__impl__ctvd8u","_Duration___get_inWholeMinutes__impl__dognoh","_Duration___get_secondsComponent__impl__if34a6","_Duration___get_inWholeSeconds__impl__hpy7b3","_Duration___get_nanosecondsComponent__impl__nh19kq","Duration__toLong_impl_shr43i","tmp0_subject","_Duration___get_inWholeDays__impl__7bvpxz","_Duration___get_inWholeNanoseconds__impl__r5x4mr","Duration__toString_impl_8d916b","days","hours","minutes","nanoseconds","hasDays","hasHours","hasMinutes","hasSeconds","appendFractional","whole","fractional","fractionalSize","isoZeroes","fracString","nonZeroDigits","Duration__toIsoString_impl_9h6wsm","hours_0","Duration__hashCode_impl_u4exz6","Duration__equals_impl_ygj6w6","normalMillis","toDuration","maxNsInUnit","millis","valueInNs","strictIso","hasSign","nonDigitSymbols","isTimeComponent","prevUnit","$l$loop_0","unitChar","durationUnitByIsoChar","dotIndex","parseOverLongIsoComponent","tmp$ret$10","normalValue","unitDiscriminator","normalNanos","isoChar","_ValueTimeMark___init__impl__uyfl2m","reading","_ValueTimeMark___get_reading__impl__5qz8rd","ValueTimeMark__elapsedNow_impl_eonqvs","ValueTimeMark__minus_impl_f87sko","ValueTimeMark__minus_impl_f87sko_0","ValueTimeMark__toString_impl_ow3ax6","ValueTimeMark__hashCode_impl_oduu93","ValueTimeMark__equals_impl_uc54jh","ValueTimeMark__compareTo_impl_uoccns","Monotonic_instance","get_UNDEFINED_RESULT","_init_properties_DeepRecursive_kt__zbwcac","UNDEFINED_RESULT","invoke","cont","tmp$ret$5","properties_initialized_DeepRecursive_kt_5z0al2","LazyThreadSafetyMode_PUBLICATION_instance","LazyThreadSafetyMode_entriesInitialized","LazyThreadSafetyMode_initEntries","UNINITIALIZED_VALUE_instance","LazyThreadSafetyMode_PUBLICATION_getInstance","_Result___init__impl__xyqfz8","_Result___get_value__impl__bjfvqg","Result__toString_impl_yu5r8k","Companion_instance_12","Result__hashCode_impl_d2zufp","Result__equals_impl_bxgmep","that","third","_UByte___init__impl__g9hnc4","_UByte___get_data__impl__jof9qr","Companion_instance_13","Companion_getInstance_13","UByte__compareTo_impl_5w5192","UByte__compareTo_impl_5w5192_0","UByte__toString_impl_v72jg","UByte__hashCode_impl_mmczcb","UByte__equals_impl_nvqtsf","_UByteArray___init__impl__ip4y9n","_UByteArray___get_storage__impl__d4kctt","_UByteArray___init__impl__ip4y9n_0","UByteArray__get_impl_t5f3hv","UByteArray__set_impl_jvcicn","_UByteArray___get_size__impl__h6pkdv","UByteArray__iterator_impl_509y1p","UByteArray__contains_impl_njh19q","UByteArray__contains_impl_njh19q_0","UByteArray__containsAll_impl_v9s6dj","UByteArray__containsAll_impl_v9s6dj_0","UByteArray__isEmpty_impl_nbfqsa","UByteArray__toString_impl_ukpl97","UByteArray__hashCode_impl_ip8jx2","UByteArray__equals_impl_roka4u","_UInt___init__impl__l7qpdl","_UInt___get_data__impl__f0vqqw","Companion_instance_14","Companion_getInstance_14","UInt__compareTo_impl_yacclj","uintCompare","UInt__compareTo_impl_yacclj_0","UInt__toString_impl_dbgl21","UInt__hashCode_impl_z2mhuw","UInt__equals_impl_ffdoxg","_UIntArray___init__impl__ghjpc6","_UIntArray___get_storage__impl__92a0v0","_UIntArray___init__impl__ghjpc6_0","UIntArray__get_impl_gp5kza","UIntArray__set_impl_7f2zu2","_UIntArray___get_size__impl__r6l8ci","UIntArray__iterator_impl_tkdv7k","UIntArray__contains_impl_b16rzj","UIntArray__contains_impl_b16rzj_0","UIntArray__containsAll_impl_414g22","UIntArray__containsAll_impl_414g22_0","UIntArray__isEmpty_impl_vd8j4n","UIntArray__toString_impl_3zy802","UIntArray__hashCode_impl_hr7ost","UIntArray__equals_impl_flcmof","_ULong___init__impl__c78o9k","_ULong___get_data__impl__fggpzb","Companion_instance_15","Companion_getInstance_15","ULong__compareTo_impl_38i7tu","ulongCompare","ULong__compareTo_impl_38i7tu_0","ULong__toString_impl_f9au7k","ulongToString","ULong__hashCode_impl_6hv2lb","ULong__equals_impl_o0gnyb","_ULongArray___init__impl__twm1l3","_ULongArray___get_storage__impl__28e64j","_ULongArray___init__impl__twm1l3_0","ULongArray__get_impl_pr71q9","ULongArray__set_impl_z19mvh","_ULongArray___get_size__impl__ju6dtr","ULongArray__iterator_impl_cq4d2h","ULongArray__contains_impl_v9bgai","ULongArray__contains_impl_v9bgai_0","ULongArray__containsAll_impl_xx8ztf","ULongArray__containsAll_impl_xx8ztf_0","ULongArray__isEmpty_impl_c3yngu","ULongArray__toString_impl_wqk1p5","ULongArray__hashCode_impl_aze4wa","ULongArray__equals_impl_vwitwa","_UShort___init__impl__jigrne","_UShort___get_data__impl__g0245","Companion_instance_16","Companion_getInstance_16","UShort__compareTo_impl_1pfgyc","UShort__compareTo_impl_1pfgyc_0","UShort__toString_impl_edaoee","UShort__hashCode_impl_ywngrv","UShort__equals_impl_7t9pdz","_UShortArray___init__impl__9b26ef","_UShortArray___get_storage__impl__t2jpv5","_UShortArray___init__impl__9b26ef_0","UShortArray__get_impl_fnbhmx","UShortArray__set_impl_6d8whp","_UShortArray___get_size__impl__jqto1b","UShortArray__iterator_impl_ktpenn","UShortArray__contains_impl_vo7k3g","UShortArray__contains_impl_vo7k3g_0","UShortArray__containsAll_impl_vlaaxp","UShortArray__containsAll_impl_vlaaxp_0","UShortArray__isEmpty_impl_cdd9l0","UShortArray__toString_impl_omz03z","UShortArray__hashCode_impl_2vt3b4","UShortArray__equals_impl_tyc3mk","toULongOrNull","toULongOrNull_0","toUInt","toUIntOrNull","toULong","toUByte","toUByteOrNull","toUShort","toUShortOrNull","uradix","ulongDivide","other_0","this_2","beforeAdding","this_3","this_4","other_1","this_5","toUIntOrNull_0","toUByteOrNull_0","toUShortOrNull_0","uintDivide","dividend","quotient","ulongToString_0","kotlin_kotlin","Map","Companion_getInstance_0","Companion_getInstance_3","Companion_getInstance_5","SerializationStrategy","DeserializationStrategy","KSerializer","AbstractPolymorphicSerializer","PolymorphicSerializer","SealedClassSerializer","SerializationException","SerializationException_init_$Create$","UnknownFieldException","MissingFieldException","get_isNullable","get_isInline","get_annotations","SerialDescriptor","ContextDescriptor","elementDescriptors$1$1","elementNames$1$1","ClassSerialDescriptorBuilder","CachedNames","SerialDescriptorImpl","SerialKind","ENUM","CONTEXTUAL","PrimitiveKind","BOOLEAN","BYTE","CHAR","SHORT","INT","LONG","FLOAT","DOUBLE","STRING","StructureKind","CLASS","LIST","MAP","OBJECT","PolymorphicKind","SEALED","OPEN","decodeSerializableValue","deserializer","Decoder","decodeSequentially","decodeCollectionSize","decodeSerializableElement$default","CompositeDecoder","AbstractDecoder","encodeNotNullMark","beginCollection","collectionSize","encodeSerializableValue","serializer","encodeNullableSerializableValue","isNullabilitySupported","Encoder","shouldEncodeElementDefault","CompositeEncoder","AbstractEncoder","NothingSerializer_0","DurationSerializer","ListLikeDescriptor","ArrayListClassDesc","HashSetClassDesc","LinkedHashSetClassDesc","MapLikeDescriptor","HashMapClassDesc","LinkedHashMapClassDesc","ArrayClassDesc","PrimitiveArrayDescriptor","AbstractCollectionSerializer","CollectionLikeSerializer","CollectionSerializer","ArrayListSerializer","HashSetSerializer","LinkedHashSetSerializer","MapLikeSerializer","HashMapSerializer","LinkedHashMapSerializer","ReferenceArraySerializer","PrimitiveArraySerializer","PrimitiveArrayBuilder","ElementMarker","EnumSerializer","PluginGeneratedSerialDescriptor","EnumDescriptor","InlineClassDescriptor","typeParametersSerializers","get_EMPTY_SERIALIZER_ARRAY","GeneratedSerializer","InlinePrimitiveDescriptor$1","NoOpEncoder","NothingSerialDescriptor","NullableSerializer","SerialDescriptorForNullable","ObjectSerializer","SerializerFactory","CharArraySerializer_0","DoubleArraySerializer_0","FloatArraySerializer_0","LongArraySerializer_0","ULongArraySerializer_0","IntArraySerializer_0","UIntArraySerializer_0","ShortArraySerializer_0","UShortArraySerializer_0","ByteArraySerializer_0","UByteArraySerializer_0","BooleanArraySerializer_0","CharArrayBuilder","DoubleArrayBuilder","FloatArrayBuilder","LongArrayBuilder","ULongArrayBuilder","IntArrayBuilder","UIntArrayBuilder","ShortArrayBuilder","UShortArrayBuilder","ByteArrayBuilder","UByteArrayBuilder","BooleanArrayBuilder","StringSerializer","CharSerializer","DoubleSerializer","FloatSerializer","LongSerializer","IntSerializer","ShortSerializer","ByteSerializer","BooleanSerializer","UnitSerializer","PrimitiveSerialDescriptor_0","TaggedEncoder","NamedValueEncoder","TaggedDecoder","NamedValueDecoder","MapEntry","KeyValueSerializer","MapEntrySerializer_0","PairSerializer_0","TripleSerializer_0","ULongSerializer","UIntSerializer","UShortSerializer","UByteSerializer","SerializersModule","SerialModuleImpl","ContextualProvider","Argless","WithTypeArguments","contextual","SerializersModuleCollector$contextual$lambda","SerializersModuleCollector","SerializableWith","createCache$1","createParametrizedCache$1","PolymorphicSerializer_init_$Init$","baseClass","classAnnotations","PolymorphicSerializer_init_$Create$","PolymorphicSerializer$descriptor$delegate$lambda$lambda","$this$buildSerialDescriptor","serializer_1","buildSerialDescriptor","CONTEXTUAL_getInstance","PolymorphicSerializer$descriptor$delegate$lambda","OPEN_getInstance","withContext","descriptor$factory","findPolymorphicSerializer","encoder","throwSubtypeNotRegistered","findPolymorphicSerializer_0","klassName","throwSubtypeNotRegistered_0","SerializationException_init_$Init$","SerializationException_init_$Init$_0","SerializationException_init_$Create$_0","SerializationException_init_$Init$_1","UnknownFieldException_init_$Init$","UnknownFieldException_init_$Create$","MissingFieldException_init_$Init$","missingFields","serialName","MissingFieldException_init_$Create$","serializerOrNull","compiledSerializerImpl","builtinSerializerOrNull","serializersForParameters","typeArguments","failOnMissingTypeArgSerializer","serializers","parametrizedSerializerOrNull","elementClassifierIfArray","builtinParametrizedSerializer","compiledParametrizedSerializer","serializerByKTypeImpl","platformSpecificSerializerNotRegistered","kclass","MapEntrySerializer","PairSerializer","TripleSerializer","isReferenceArray","ArraySerializer","constructSerializerForGivenTypeArgs","rootClass","isNullable","typeOrThrow","findCachedSerializer","findParametrizedCachedSerializer","cachedSerializer","serializerByKTypeImpl$lambda","contextualSerializer","tmp4_safe_receiver","shouldBeNullable","get_nullable","serializer_0","EmptySerializersModule_0","$typeArguments","get_SERIALIZERS_CACHE","_init_properties_SerializersCache_kt__hgwi2p","SERIALIZERS_CACHE","get_SERIALIZERS_CACHE_NULLABLE","SERIALIZERS_CACHE_NULLABLE","get_PARAMETRIZED_SERIALIZERS_CACHE","PARAMETRIZED_SERIALIZERS_CACHE","get_PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE","PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE","clazz","SERIALIZERS_CACHE$lambda","SERIALIZERS_CACHE_NULLABLE$lambda","PARAMETRIZED_SERIALIZERS_CACHE$lambda","PARAMETRIZED_SERIALIZERS_CACHE$lambda$lambda","$types","PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE$lambda","PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE$lambda$lambda","properties_initialized_SerializersCache_kt_q8kf25","createCache","createParametrizedCache","StringSerializer_getInstance","serializer_2","CharSerializer_getInstance","CharArraySerializer","CharArraySerializer_getInstance","serializer_3","DoubleSerializer_getInstance","DoubleArraySerializer","DoubleArraySerializer_getInstance","serializer_4","FloatSerializer_getInstance","FloatArraySerializer","FloatArraySerializer_getInstance","serializer_5","LongSerializer_getInstance","LongArraySerializer","LongArraySerializer_getInstance","serializer_6","ULongSerializer_getInstance","ULongArraySerializer","ULongArraySerializer_getInstance","serializer_7","IntSerializer_getInstance","IntArraySerializer","IntArraySerializer_getInstance","serializer_8","UIntSerializer_getInstance","UIntArraySerializer","UIntArraySerializer_getInstance","serializer_9","ShortSerializer_getInstance","ShortArraySerializer","ShortArraySerializer_getInstance","serializer_10","UShortSerializer_getInstance","UShortArraySerializer","UShortArraySerializer_getInstance","serializer_11","ByteSerializer_getInstance","ByteArraySerializer","ByteArraySerializer_getInstance","serializer_12","UByteSerializer_getInstance","UByteArraySerializer","UByteArraySerializer_getInstance","serializer_13","BooleanSerializer_getInstance","BooleanArraySerializer","BooleanArraySerializer_getInstance","serializer_14","UnitSerializer_getInstance","NothingSerializer","NothingSerializer_getInstance","serializer_15","DurationSerializer_getInstance","keySerializer","valueSerializer","aSerializer","bSerializer","cSerializer","elementSerializer","ListSerializer","MapSerializer","getContextualDescriptor","get_capturedKClass","get_elementDescriptors","get_elementNames","$this_elementDescriptors","$this_elementNames","typeParameters","builder","buildSerialDescriptor$lambda","CLASS_getInstance","message_0","sdBuilder","elementName","annotations","isOptional","buildClassSerialDescriptor","builderAction","buildClassSerialDescriptor$lambda","_get__hashCode__tgwhef","_hashCode$factory","SerialDescriptorImpl$_hashCode$delegate$lambda","hashCodeImpl","SerialDescriptorImpl$toString$lambda","elementsCount","compactArray","getChecked","getChecked_0","$l$block_5","PrimitiveSerialDescriptor","PrimitiveDescriptorSafe","listSerialDescriptor","elementDescriptor","$this$null","ENUM_instance","ENUM_getInstance","CONTEXTUAL_instance","BOOLEAN_instance","BOOLEAN_getInstance","BYTE_instance","BYTE_getInstance","CHAR_instance","CHAR_getInstance","SHORT_instance","SHORT_getInstance","INT_instance","INT_getInstance","LONG_instance","LONG_getInstance","FLOAT_instance","FLOAT_getInstance","DOUBLE_instance","DOUBLE_getInstance","STRING_instance","STRING_getInstance","CLASS_instance","LIST_instance","LIST_getInstance","MAP_instance","MAP_getInstance","OBJECT_instance","OBJECT_getInstance","SEALED_instance","SEALED_getInstance","OPEN_instance","enumDescriptor","NoOpEncoder_getInstance","decodeSequentially_0","compositeDecoder","actualSerializer","composite","mainLoop","value_0","$l$block_1","value_1","subClass","subClassName","NothingSerializer_instance","NothingSerialDescriptor_getInstance","DurationSerializer_instance","elementDesc","keyDesc","valueDesc","keyDescriptor","valueDescriptor","eSerializer","kSerializer","vSerializer","toNativeArrayImpl","progression","checkIndex","readSize","primitiveSerializer","requiredCapacity","Companion_getInstance_7","prepareHighMarksArray","slotsCount","elementsInLastSlot","highMarks","markHigh","offsetInSlot","nextUnmarkedHighIndex","slotOffset","slotMarks","indexInSlot","readIfAbsent","createSimpleEnumSerializer","createAnnotatedEnumSerializer","entryAnnotations","inductionVariable_1","EnumSerializer_init_$Create$","EnumSerializer_init_$Init$","createUnmarkedDescriptor","indexedObject","EnumSerializer$descriptor$delegate$lambda","$serialName","descriptor$factory_0","_get_elementDescriptors__y23q9p","elementDescriptors$factory","EnumDescriptor$elementDescriptors$delegate$lambda","$elementsCount","$name","cachedSerialNames","elementsHashCode","InlinePrimitiveDescriptor","generatedSerializer","$primitiveSerializer","jsonCachedSerialNames","NoOpEncoder_instance","NothingSerialDescriptor_instance","ObjectSerializer$descriptor$delegate$lambda$lambda","ObjectSerializer$descriptor$delegate$lambda","objectInstance","descriptor$factory_1","get_EMPTY_DESCRIPTOR_ARRAY","_init_properties_Platform_common_kt__3qzecs","EMPTY_DESCRIPTOR_ARRAY","notRegisteredMessage","notRegisteredMessage_0","properties_initialized_Platform_common_kt_i7q4ty","throwMissingFieldException","seen","goldenMask","missingFieldsBits","throwArrayMissingFieldException","seenArray","goldenMaskArray","maskSlot","_get_childSerializers__7vnyfa","childSerializers$factory","_get__hashCode__tgwhef_0","_hashCode$factory_0","buildIndices","PluginGeneratedSerialDescriptor$childSerializers$delegate$lambda","PluginGeneratedSerialDescriptor$typeParameterDescriptors$delegate$lambda","PluginGeneratedSerialDescriptor$_hashCode$delegate$lambda","PluginGeneratedSerialDescriptor$toString$lambda","typeParameterDescriptors$factory","annotation","typeParams","elementDescriptors","namesHash","accumulator_0","kindHash","_init_properties_PluginHelperInterfaces_kt__xgvzfp","EMPTY_SERIALIZER_ARRAY","properties_initialized_PluginHelperInterfaces_kt_ap8in1","CharArraySerializer_instance","DoubleArraySerializer_instance","FloatArraySerializer_instance","LongArraySerializer_instance","ULongArraySerializer_instance","IntArraySerializer_instance","UIntArraySerializer_instance","ShortArraySerializer_instance","UShortArraySerializer_instance","ByteArraySerializer_instance","UByteArraySerializer_instance","BooleanArraySerializer_instance","bufferWithData","get_BUILTIN_SERIALIZERS","_init_properties_Primitives_kt__k0eto4","BUILTIN_SERIALIZERS","StringSerializer_instance","CharSerializer_instance","DoubleSerializer_instance","FloatSerializer_instance","LongSerializer_instance","IntSerializer_instance","ShortSerializer_instance","ByteSerializer_instance","BooleanSerializer_instance","UnitSerializer_instance","error_0","checkName","simpleName","capitalize","qualifiedName","properties_initialized_Primitives_kt_6dpii6","nestedName","parentName","childName","encodeElement","inlineDescriptor","tagBlock","TaggedDecoder$decodeSerializableElement$lambda","$deserializer","$previousValue","TaggedDecoder$decodeNullableSerializableElement$lambda","currentTag","get_NULL","_init_properties_Tuples_kt__dz0qyd","NULL","MapEntrySerializer$descriptor$lambda","$keySerializer","$valueSerializer","PairSerializer$descriptor$lambda","$this$buildClassSerialDescriptor","decodeSequentially_1","decodeStructure","TripleSerializer$descriptor$lambda","structuredEncoder","key_0","properties_initialized_Tuples_kt_3vs7ar","ULongSerializer_instance","UIntSerializer_instance","UShortSerializer_instance","UByteSerializer_instance","get_EmptySerializersModuleLegacyJs","_init_properties_SerializersModule_kt__u78ha3","EmptySerializersModule","typeArgumentsSerializers","class2ContextualFactory","polyBase2Serializers","polyBase2DefaultSerializerProvider","polyBase2NamedSerializers","polyBase2DefaultDeserializerProvider","registered","serializedClassName","collector","serial","classMap","element_1","actualClass","tmp$ret$9","tmp0_iterator_2","element_2","baseClass_0","provider","tmp0_iterator_3","element_3","baseClass_1","provider_0","properties_initialized_SerializersModule_kt_fjigjn","$serializer","assocObject","get_isInterface","eClass","$factory","kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core","contains","Json","JsonBuilder","JsonImpl","JsonClassDiscriminator","JsonNames","JsonConfiguration","ClassDiscriminatorMode","JsonDecoder","JsonElement","JsonElementSerializer_getInstance","JsonObject","JsonObjectSerializer_getInstance","JsonPrimitive","JsonPrimitiveSerializer_getInstance","JsonArray","JsonArraySerializer_getInstance","JsonNull","JsonNull_getInstance","JsonLiteral","JsonElementSerializer","JsonObjectDescriptor","JsonObjectSerializer","JsonPrimitiveSerializer","JsonArrayDescriptor","JsonArraySerializer","JsonNullSerializer","JsonLiteralSerializer","defer$1","JsonEncoder","Composer","ComposerForUnsignedNumbers","ComposerForUnquotedLiterals","ComposerWithPrettyPrint","JsonElementMarker","JsonException","JsonDecodingException","JsonEncodingException","Tombstone","JsonPath","JsonTreeReader$readDeepRecursive$slambda","$readObjectCOROUTINE$0","JsonTreeReader","PolymorphismValidator","DescriptorSchemaCache","DiscriminatorHolder","StreamingJsonDecoder","JsonDecoderForUnsignedTypes","StreamingJsonEncoder","AbstractJsonTreeDecoder","JsonTreeDecoder","JsonTreeListDecoder","JsonPrimitiveDecoder","JsonTreeMapDecoder","AbstractJsonTreeEncoder","JsonTreeEncoder","AbstractJsonTreeEncoder$inlineUnsignedNumberEncoder$1","AbstractJsonTreeEncoder$inlineUnquotedLiteralEncoder$1","JsonPrimitiveEncoder","JsonTreeListEncoder","JsonTreeMapEncoder","WriteMode","AbstractJsonLexer","CharMappings","StringJsonLexer","JsonToStringWriter","serializersModule","encodeByWriter","lexer","WriteMode_OBJ_getInstance","writeJson","readJson","Json_0","conf","ClassDiscriminatorMode_POLYMORPHIC_getInstance","allWhitespaces","message_2","message_1","validateConfiguration","module_0","encodeDefaults","ignoreUnknownKeys","isLenient","allowStructuredMapKeys","explicitNulls","prettyPrintIndent","coerceInputValues","useArrayPolymorphism","classDiscriminator","allowSpecialFloatingPointValues","useAlternativeNames","namingStrategy","decodeEnumsCaseInsensitive","allowTrailingComma","classDiscriminatorMode","ClassDiscriminatorMode_NONE_instance","ClassDiscriminatorMode_POLYMORPHIC_instance","ClassDiscriminatorMode_entriesInitialized","ClassDiscriminatorMode_initEntries","ClassDiscriminatorMode_NONE_getInstance","get_jsonUnquotedLiteralDescriptor","_init_properties_JsonElement_kt__7cbdc2","jsonUnquotedLiteralDescriptor","JsonObject$toString$lambda","_name_for_destructuring_parameter_0__wldtmu","printQuoted","get_jsonPrimitive","get_double","get_jsonArray","get_jsonObject","get_doubleOrNull","get_contentOrNull","_get_$cachedSerializer__te6jhj","JsonNull$_anonymous__enib48","JsonNullSerializer_getInstance","JsonNull_instance","typeParamsSerializers","coerceToInlineType","JsonPrimitive_0","JsonPrimitive_1","JsonPrimitive_2","get_booleanOrNull","toBooleanStrictOrNull_0","get_int","get_long","get_float","properties_initialized_JsonElement_kt_abxy8s","JsonElementSerializer$descriptor$lambda","defer","JsonElementSerializer$descriptor$lambda$lambda","JsonElementSerializer$descriptor$lambda$lambda_0","JsonElementSerializer$descriptor$lambda$lambda_1","JsonElementSerializer$descriptor$lambda$lambda_2","JsonElementSerializer$descriptor$lambda$lambda_3","JsonLiteralSerializer_getInstance","JsonElementSerializer_instance","verify","asJsonDecoder","JsonObjectDescriptor_instance","JsonObjectDescriptor_getInstance","JsonObjectSerializer_instance","verify_0","JsonPrimitiveSerializer_instance","JsonDecodingException_0","JsonArrayDescriptor_instance","JsonArrayDescriptor_getInstance","JsonArraySerializer_instance","JsonNullSerializer_instance","JsonLiteralSerializer_instance","asJsonEncoder","_get_original__l7ku1m","original$factory","$deferred","writer","Composer_0","forceQuoting","JsonElementMarker$readIfAbsent$ref","$boundThis","JsonDecodingException_1","minify","invalidTrailingComma","throwInvalidFloatingPointDecoded","get_specialFlowingValuesHint","InvalidKeyKindException","get_allowStructuredMapKeysHint","InvalidFloatingPointEncoded","unexpectedFpErrorMessage","InvalidFloatingPointDecoded","UnknownKeyException","get_ignoreUnknownKeysHint","start_0","InvalidFloatingPointEncoded_0","get_JsonDeserializationNamesKey","_init_properties_JsonNamesMap_kt__cbbp0k","JsonDeserializationNamesKey","get_JsonSerializationNamesKey","JsonSerializationNamesKey","getJsonNameIndex","decodeCaseInsensitive","getJsonNameIndexSlowPath","getJsonNameIndexOrThrow","getJsonElementName","serializationNamesIndices","deserializationNamesMap","get_schemaCache","deserializationNamesMap$lambda","serializationNamesIndices$lambda","buildDeserializationNamesMap","useLowercaseEnums","strategyForClasses","buildDeserializationNamesMap$putOrThrow","nameToPut","$this_buildDeserializationNamesMap","$descriptor","$this_deserializationNamesMap","$this_serializationNamesIndices","$strategy","properties_initialized_JsonNamesMap_kt_ljpf42","Tombstone_instance","resize","sd","get_entries","StreamingJsonEncoder_init_$Create$","readObject","lastToken","get_TC_BEGIN_OBJ","get_TC_COMMA","get_TC_COLON","get_TC_END_OBJ","readObject_0","readArray","get_TC_END_LIST","get_TC_BEGIN_LIST","readValue","readDeepRecursive","JsonTreeReader$readDeepRecursive$slambda_0","suspendResult","$sm","get_TC_STRING","get_TC_OTHER","_this__u8e3s4_0","tokenDescription","decodeSerializableValuePolymorphic","discriminator","jsonTree","readPolymorphicJson","validateIfSealed","actualName","checkKind","validateIfSealed$accessor$1ad0flx","checkKind_0","checkDiscriminatorCollisions","defaultSerializerProvider","defaultDeserializerProvider","createMapForCache","answer","discriminatorToSkip","trySkip","unknownKey","skipLeftoverElements","checkLeadingComma","decodeMapIndex","hasComma","decodingKey","get_COLON","condition_0","position_0","coerceInputValue","$l$block_3","enumValue","enumIndex","decodeObjectIndex","decodeStringKey","isUnknown","handleUnknown","decodeListIndex","discriminatorHolder","newMode","switchMode","isMapKey","WriteMode_MAP_getInstance","specialFp","get_isUnsignedNumber","get_unsignedNumberDescriptors","_init_properties_StreamingJsonEncoder_kt__pn1bsi","unsignedNumberDescriptors","StreamingJsonEncoder_init_$Init$","modeReuseCache","encodeTypeInfo","composer","isPolymorphicSerializer","needDiscriminator","baseClassDiscriminator","casted","get_INVALID","get_COMMA","get_isUnquotedLiteral","properties_initialized_StreamingJsonEncoder_kt_6ifwwk","get_ESCAPE_STRINGS","_init_properties_StringOps_kt__fcy1db","ESCAPE_STRINGS","toHexChar","get_STRING","lastPos","properties_initialized_StringOps_kt_wzaea7","c3","c4","this_6","this_7","c_0","this_8","this_9","this_10","this_11","this_12","this_13","unparsedPrimitive","asLiteral","currentObject","carrierDescriptor","keyKind","currentElement","get_lenientHint","coerceInputValue_0","absenceIsNull","polyDiscriminator","polyDescriptor","deserializationNamesMap_0","fallbackName","descriptor_0","get_PRIMITIVE_TAG","writeJson$lambda","nodeConsumer","inlineUnsignedNumberEncoder","inlineUnquotedLiteralEncoder","$tag","$inlineDescriptor","AbstractJsonTreeEncoder$beginStructure$lambda","get_requiresTopLevelTag","consumer","_get_tag__e6h4qf","PRIMITIVE_TAG","$result","WriteMode_OBJ_instance","WriteMode_LIST_instance","WriteMode_MAP_instance","WriteMode_POLY_OBJ_instance","WriteMode_LIST_getInstance","WriteMode_POLY_OBJ_getInstance","$ENTRIES","WriteMode_entriesInitialized","WriteMode_initEntries","get_BEGIN_OBJ","get_END_OBJ","get_BEGIN_LIST","get_END_LIST","appendEscape","lastPosition","appendEsc","takePeeked","wasUnquotedString","startPosition","currentChar","appendHex","escapeToChar","startPos","fromHexChar","consumeBoolean","tmp1_subject","consumeBooleanLiteral","literalSuffix","expected","consumeNumericLiteral$calculateExponent","exponentAccumulator","isExponentPositive","x_0","nextToken","cpos","inputLiteral","charToTokenClass","expectedToken","wasConsumed","doConsume","endPos","usedAppend","eof","allowLenientStrings","tokenStack","processed","hintMessage","hasQuotation","hasExponent","$l$loop_4","hasChars","doubleAccumulator","CharMappings_getInstance","get_TC_WHITESPACE","TC_WHITESPACE","get_TC_EOF","TC_EOF","TC_STRING","get_STRING_ESC","STRING_ESC","TC_BEGIN_OBJ","TC_COLON","TC_COMMA","COLON","BEGIN_OBJ","END_OBJ","BEGIN_LIST","END_LIST","lenientHint","specialFlowingValuesHint","allowStructuredMapKeysHint","ignoreUnknownKeysHint","TC_OTHER","INVALID","TC_BEGIN_LIST","TC_END_LIST","TC_END_OBJ","initEscape","initC2ESC","initC2ESC_0","initCharToToken","initC2TC","initC2TC_0","esc","cl","CharMappings_instance","COMMA","closingQuote","keyToMatch","positionSnapshot","kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json","Action","get_isDone","ActionState_DONE_getInstance","ActionCandidate","ActionState","setLogModule","basePackageName","addHistoryModule","historySize","Core","CoreFactory","CoreModules","CoreServices","MissingCriticalModuleException","AddPartAction","sam$kotlin_Comparator$0","AssemblyBuilder","AssemblyPart","AssemblyPartSnapInfo","AssemblyPartConnectorInfo","$serializer_getInstance","get_serializable","get_doStoreInSnapshot","Component","AssemblyPartIdsComponent","$serializer_0","AssemblyPartsComponent","$serializer_getInstance_0","AssemblyStructureComponent","PartPair","$serializer_1","Serialized","$serializer_getInstance_1","JsonSerializable","get_serializable_0","SerializableComponent","ProductPartComponent","RemovePartAction","beforeDeserialize","catalogVersion","beforeParsingComponents","serializableTree","beforeBuildingEntities","afterDeserializeComplete","SerializableCatalogInterceptor","createCustomAssembly","originalProduct","productManager","newSpecification","createCustomAssemblySpecification","specification","partsComponent","newPartProductRef","newPartsMap","ProductCatalog","ProductCatalogFunctions","ProductComponent","createEntity","productRef","entityId","createEntityInternal","createFromSpecification","createFromSpecificationInternal","ProductManager","ProductSpecification","ProductStructureBuilder","ProductStructureComponent","ProductStructureConnection","ProductStructureItem","CircularBuffer$iterator$1","CircularBuffer","ColliderComponent","ColliderShapeComponent","ColliderUtils","Collision","CollisionConstants","CollisionUtils","findRoot","snapActionCandidate","mainEntity","HierarchyUtils_instance","Validation","ValidationImpl","CollisionValidation","ValidationResult","CollisionValidationResult","System","EcsSystem","EcsSystemImpl","SystemBase","SystemBase2","WorldColliderUpdateSystem","ComponentIdSpan","ComponentIds","ComponentUtils","AlignmentConnection","ChildConnectionValidation","Connection","ConnectionRootComponent","ConnectionUtils","Companion_17","GuestConnectionsComponent","Companion_18","HostConnectionsComponent","Companion_19","TemporarilyPauseConnectionParentingComponent","Companion_20","UpdateHostConnectionsSystem","Companion_21","Connector","ConnectorTagConstants","ConnectorType","ConnectorUtils","Companion_22","sam$kotlin_Comparator$0_0","sam$kotlin_Comparator$0_1","ConnectorsComponent","Companion_23","DisableConnectorsSystem","Companion_24","DisabledConnectorsComponent","EdgeConnector","PointConnector","PointSeriesConnector","PointSeriesSubConnector","RelativeConnectorData","RelativeConnectorRepositioner","Companion_25","RelativeConnectorsComponent","RotationDegreeOfFreedom","RotationDegreeOfFreedomImpostor","Companion_26","SurfaceConnector","DebugLine","Companion_27","DebugLinesComponent","Companion_28","DebugSurfacesComponent","Companion_29","DragSurfacesComponent","DragSurface","Companion_30","DraggableComponent","Companion_31","SomethingIsDraggedComponent","DragType","Companion_32","ViewerDragEventComponent","Companion_33","WorldDragSurfaceUpdateSystem","Companion_34","WorldDragSurfacesComponent","Companion_35","WorldSpaceDragEventComponent","ComponentHolder","ComponentListener","Companion_36","Entity","EntityManager","Companion_37","EntityManagerImpl","EntityManagerWatcher","EntityManagerWatcherList","ComponentListenerImpl","Companion_38","SystemBase3","SystemBase4","SystemBase5","SystemGraphHelper","Companion_39","AutomaticGroupBuilderSystem","Companion_40","AutomaticGroupComponent","Companion_41","AutomaticGroupIdCountComponent","EntityGroupUtils","Companion_42","ManualEntityGroupBuilderService","Companion_43","ManualGroupComponent","Companion_44","ManualGroupConnectorValidation","Companion_45","ManualGroupIdCountComponent","StaticComponent","Companion_46","ChildComponent","Companion_47","ConnectionParentingSystem","Companion_48","HierarchySystem","HierarchyUtils","hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda","hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda","InSceneComponent","Companion_49","ParentComponent","SceneComponent","Companion_50","SceneGraphSystem","SceneManager","takeSnapshot","snapshotName","History","HistoryEventType","HistoryEvent","Companion_51","HistoryChangedEventComponent","HistoryImpl","LogLevel","LogLevelJavascriptImpostor","set_logLevel","newLevel","values_3","get_logLevel","LoggerImpl","LoggerWrap","LoggerState","MockLogger","AxisAngle","Degrees","alignBottom","Vector","alignTop","alignRight","alignLeft","alignFront","alignBack","Dimension","DualDouble","Companion_52","$serializer_2","Margin","$serializer_getInstance_2","MathUtils","Companion_53","$serializer_3","ModelTransform","$serializer_getInstance_3","Companion_54","Raycastable","Companion_55","Polygon","Companion_56","$serializer_4","$serializer_getInstance_4","Radians","RelativeBoxOffset","RelationOriginAlongX","RelationOriginAlongXImpostor","RelationOriginAlongY","RelationOriginAlongYImpostor","RelationOriginAlongZ","RelationOriginAlongZImpostor","Companion_57","$serializer_5","RelationOrigin","$serializer_getInstance_5","Companion_58","$serializer_6","$serializer_getInstance_6","Companion_59","$serializer_7","Transform","$serializer_getInstance_7","Companion_60","$serializer_8","$serializer_getInstance_8","VectorConstants","InnerMeasurement","MeasurementUtils","Companion_61","DisplayNameComponent","ProductUtils","ProppingComponent","Companion_62","TemplateDataComponent","Companion_63","RaycastHit","RaycastResult","RaycastUtils","Companion_64","LoadedModelInfoComponent","Companion_65","ModelInfoComponent","Companion_66","ModelLoaderSystem","Companion_67","ModelTransformComponent","ModelUtils","Companion_68","OutlineableComponent","Companion_69","PauseViewerUpdatesComponent","Companion_70","RenderSystem","RenderedComponent","createSphere","cloneObject","vo","createBox","createPlane","createSurface","groupMeshes","createUiLine","Companion_getInstance_61","createUiDashedLine","updateUiLine","loadModel","textureFile","modelLoaded","modelLoadFailed","loadingBoxSize","loadingBoxCenter","createEmpty","createGhostModel","modelUrl","Companion_71","ViewerComponent","Companion_72","ViewerLineIdsComponent","setPosition","ViewerObject","Companion_73","ViewerObjectComponent","ViewerObjectTransformSystem","ViewerObjectVisibilitySystem","ViewerPresenceSystem","ViewerMock","Companion_74","MockDragGenerator","Companion_75","ViewerObjectMock","Companion_76","EntityReplaceHelper","Companion_77","FastReplaceAction","ReplaceAction","ReplacePartAction","Companion_78","ClickEventComponent","MultiSelectionEnabledComponent","Companion_79","SelectableComponent","SelectedComponent","Companion_80","$serializer_9","CatalogsHeader","$serializer_getInstance_9","ComponentDeserializer","ComponentDeserializerRegistry","Companion_81","Serializer","JsonSerializer","Companion_82","PreviouslySerializedIdComponent","SceneReloadingComponent","addComponent","SerializableEntity","Companion_83","$serializer_10","Companion_84","SerializableConnection","$serializer_getInstance_10","$serializer_11","SerializableGuestConnectionsComponent","$serializer_getInstance_11","entitiesArray","SerializableTree","Companion_85","UnserializableEntityComponent","Companion_86","$serializer_12","VersionHeader","$serializer_getInstance_12","Companion_87","ConnectionGraphBuildOrder","ShadowEntityWithParent","NewEntityWithShadowChildren","InterceptingAssemblyPartCatalog","Companion_88","EntityTreeBuilder","Companion_89","$serializer_13","SerializableEntityV13","$serializer_getInstance_13","Companion_90","$serializer_14","SerializableTreeV13","$serializer_getInstance_14","ProductRefLevel","Companion_91","EntityAndDO","EntityPartKey","SerializerV13","Companion_92","AxisAlignedBox","Companion_93","Polyhedron","ConvexPolyhedron","Face","Companion_94","Cuboid","PolyhedronGroup","PolyhedronUtils","Companion_95","MovedToCandidateSnapPositionComponent","Companion_96","MovedToValidSnapPositionComponent","Companion_97","RestrictAllowedRequiredHostsComponent","get_isAlignmentSnap","SnapActionCandidate","SnapActionCandidateImpl","SnapAction","SnapActionCandidateSortAndSelectStrategies","SnapActionCandidateSortAndSelectStrategy","SelectAll","sam$kotlin_Comparator$0_2","SortByPriorityInActivationDistanceThenDistance","sam$kotlin_Comparator$0_3","SortByPriorityThenDistance","sam$kotlin_Comparator$0_4","SortByDistance","sam$kotlin_Comparator$0_5","sam$kotlin_Comparator$0_6","Companion_98","SnapActionInProgressComponent","Companion_99","SnapCandidateComponent","Companion_100","SnapRootComponent","SnapSettings","AlternativeSnapCandidate","SnapUtils","EntityState","Companion_101","IsLoadingSnapshotComponent","Companion_102","SnapshotIgnoreComponent","Companion_103","SnapshotService","Snapshot","Companion_104","UpdatedFromSnapshotEventComponent","ApiSystemIds","AlwaysHangDownComponent","Companion_105","$serializer_15","Serialized_0","$serializer_getInstance_15","Companion_106","LocalTransformComponent","Companion_107","TransformSystem","TransformUtils","Companion_108","$serializer_16","Serialized_1","$serializer_getInstance_16","Companion_109","WorldTransformComponent","Measurable","Measurer","MutableStack","UrlHelper","UrlDetails","Companion_110","NoValidConnectorAvailableValidationResult","Companion_111","UnknownErrorValidationResult","Companion_112","ValidSnapActionCandidateOrErrors","ValidationResultType","Companion_113","ValidationResultFail","ValidationResultWarning","Companion_114","validateCurrentState","earlyOut","validateSnap","validateSnaps","snapActionCandidates","getFirstValidSnapAction","sortByWarnings","evaluateSnapCandidate","evaluateSnapCandidates","ValidationService","ActionState_NOT_DONE_instance","ActionState_DONE_instance","ActionState_NOT_DONE_getInstance","ActionState_initEntries","ActionState_entriesInitialized","coreModules","entityManager","sceneManager","componentDeserializerRegistry","validations","snapshotService","coreFactory","LoggerState_getInstance","connectPartToAssembly","newEntity","assemblyPart","validationService","assembleChildren","partsMap","partIds","usedHostConnections","productRefForPart","childEntity","findEntityInHierarchyThatHasConnector","connectorKey","get_hierarchy","get_connectorsComponent","transferAnyParentConnectionToTheConnectionRoot","hostedConnections","get_connectionRootEntity","parentRoot","addHostedConnection","findClosestSnap","hostEntity","usedHostConnectors","SnapUtils_instance","AssemblyBuilder$Companion$findClosestSnap$lambda","snaps","transformPart","TransformUtils_instance","partKeyToProductRefForEntity","partKey","get_partKey","get_productRef","partKeyToEntityIdForEntity","function_0","RelativeConnectorRepositioner_instance","get_descendants","childPart","Companion_getInstance_110","get_worldTransform","shouldSearchForSnap","hadSnapRootComponent","guest","snap","snap_0","connectorsDeltaTransform","setParentMaintainWorldTransform","includeSubAssemblies","get_children","get_isProductPart","childParts","childrenPartsMap","idsMap","childrenIdsMap","relativeTransform","snapInfo","locked","additionalComponents","connectorOnHost","connector","useClosest","$serializer_instance","tmp0_serialDesc","tmp0_desc","tmp1_flag","tmp2_index","tmp3_bitMask0","tmp4_local0","tmp5_local1","tmp6_local2","tmp7_local3","tmp8_local4","tmp9_local5","tmp10_local6","tmp11_input","AssemblyPartConnectorInfo_init_$Create$","tmp1_output","AssemblyPartConnectorInfo_init_$Init$","seen1","main","serializationConstructorMarker","AssemblyPartIdsComponent$toString$lambda","AssemblyPartsComponent$Companion$serializer$lambda","$this$Json","AssemblyPartsComponent_init_$Init$","partPairs","AssemblyPartsComponent_init_$Create$","$serializer_instance_0","tmp5_input","tmp6_cached","AssemblyPartsComponent_init_$Create$_0","tmp2_cached","AssemblyPartsComponent_init_$Init$_0","AssemblyPartsComponent$toString$lambda","Companion_instance_3","toString$withChildren","ap","AssemblyStructureComponent$toString$withChildren$lambda","toString$noChildren","AssemblyStructureComponent$toString$lambda","partsStr","get_isAssembly","ProductPartComponent$Companion$serializer$lambda","$serializer_instance_1","Serialized_init_$Create$","Serialized_init_$Init$","Companion_getInstance_6","get_productPart","connectPartToAssembly_0","oldEntity","Companion_instance_76","get_immediateConnectionRootDescendants","EntityReplaceHelper_init_$Create$","generatePartHierarchy","capacity_0","pair_0","oldPartsMap","generatePartHierarchyFromStructure","generatePartHierarchyFromStructure$_anonymous_$traverse_4layzz","allPartKeys","assembly","includeUnused","ProductCatalogFunctions_instance","ProductCatalogFunctions_getInstance","Companion_instance_6","get_productComponent","get_productRefOrEmptyString","componentId","specWithoutComponent","newComponents","addChild","productStructureItem","ProductStructureBuilder$Companion$addChild$lambda","transformPart_0","createSnapCandidate","ProductStructureBuilder$Companion$addChild$lambda_0","nonAlignmentSnapInThisPosition","findSnapToNonAlignmentConnector","addAsChildToRoot","allConnections","ConnectionUtils_instance","maxElem","highestPriorityConnection","demandingEntity","offeringEntity","connectionData","demandingConnectorKey","offeringConnectorKey","get_snappingEntitiesSequence","get_connectors","realDemandingEntity","hierarchyExceptSubTreesWithComponentArray","Companion_getInstance_23","tmp$ret$11","$l$block_2","indexedObject_0","realOfferingEntity","demandingConnector","offeringConnector","ProductStructureBuilder$Companion$createSnapCandidate$lambda","ProductStructureBuilder$Companion$createSnapCandidate$lambda_0","ProductStructureBuilder$Companion$buildProductStructure$lambda","ProductStructureBuilder$Companion$buildProductStructure$lambda_0","ProductStructureBuilder$Companion$buildProductStructure$lambda_1","$firstProductData","ProductStructureBuilder$Companion$buildProductStructure$lambda_2","$productStructureItem","$parent","ProductUtils_instance","$demandingConnectorKey","$offeringConnectorKey","$realOfferingEntity","structure","roots","firstProductData","firstProduct","temporarySceneRoot","createdEntitiesMap","key_1","onlyChild","setParent","otherStructure","offeringPartKey","wrappedIndex","removed_0","objectOrientedBoundingBoxForEntityHierarchy","onlyAssembly","objectOrientedBoundingBoxForEntityHierarchy$extractEntity","Companion_getInstance_60","Companion_getInstance_95","$onlyAssembly","innerEntity","localTransform","get_colliderShapeComponent","PolyhedronUtils_getInstance","get_localTransform","ColliderComponent$Companion$axisAlignedBoundingBoxForEntityHierarchies$lambda","$set","entities","forEachInHierarchy","get_collider","tmp0_safe_receiver_1","Companion_getInstance_10","worldPolyhedron","get_axisAlignedBoundingBoxForHierarchy","get_snapRoot","get_objectOrientedBoundingBoxForHierarchy","get_objectOrientedBoundingBoxForAssemblyHierarchy","get_axisAlignedBoundingBoxForSnappableHierarchy","get_snapRootSubTree","ColliderUtils_instance","ColliderUtils_getInstance","self_0","interpenetration","Companion_getInstance_12","getPenetrations","disposition","otherEntities","checkMyChildren","entitiesInSubTree","get_hierarchySequence","CollisionUtils$getPenetrations$lambda","CollisionUtils$getFirstCollision$lambda","$otherEntities","$entity","$disposition","$res","tmp1_safe_receiver_0","CollisionUtils$getPenetrations$lambda$lambda","CollisionUtils$getPenetrations$lambda$lambda_0","$worldPoly","$current","findInHierarchy","CollisionUtils_instance","CollisionUtils_getInstance","hierarchyExceptSubTreeArray","collisions","ValidationResultType_FAIL_getInstance","_set____db54di","CollisionValidationResult$toString$lambda","collision","severity","collizions","totalAabb","otherAabb","updateWorldCollider","calculateWorldCollider","basePolyhedron","transformedPolyhedron","newComponent","oldComponent","ComponentIdSpan_instance","ComponentIdSpan_getInstance","ComponentIds_instance","ComponentIds_getInstance","get_isSelected","get_selectableComponent","get_isSelectable","get_displayName","get_highestPriorityConnection","findWithComponentInUpwardsHierarchy","draggable","snapRoot","get_previousId","ComponentUtils_instance","ComponentUtils_getInstance","get_draggableRootEntity","get_selectableRoot","isSameConnector","otherEntity1","otherEntity2","otherConnector1","otherConnector2","offeringDemandingConnectorDeltaTransform","validate_0","oldHostConnector_0","oldHostConnector","Companion_instance_114","hostConnector","hostConnectorStillContainsGuest","guestConnectorEntity","guestConnector","hostConnectorEntity","hostGuestConnectorDeltaTransform","Companion_getInstance_17","get_isConnectionRoot","Companion_getInstance_18","get_guestConnections","tryCreatePartConnection","hostPart","guestPart","ConnectionUtils$tryCreatePartConnection$lambda","ConnectionUtils$tryCreatePartConnection$lambda_0","ConnectionUtils$tryCreatePartConnection$lambda_1","tmp5_safe_receiver","tryAligning","guestAlignment","hostAlignment","guestEntity","canAlign","getEntityAndGuestsThatAreNotChildrenOfEntityOrAssembly","getEntityAndGuestsThatAreNotChildrenOfEntityOrAssembly$searchEntityRecursive","get_hostedConnections","get_parent","parentOrAssembly","isOriginalEntityButNotEntityGroup","get_isAutomaticGroup","ConnectionUtils$calculateAllConnectionsToHierarchies$lambda","$guestPart","ConnectionUtils$calculateAllConnectionsToHierarchies$lambda_0","$guestConnector","partConnection","$hostPart","hostConnectorPossiblySubConnector","ConnectionUtils$matchingAlignmentConnections$lambda","get_alignmentConnectors","get_snappingEntitiesArray","guestSnapRoot","hostRoot","snappingEntities","get_snappingHierarchyEntitiesList","hierarchyExceptSubTreeSequence","hostRoots","connectionsRoot","guestHierarchyRoot","isPartOfSameHierarchy","connections","guestConnections","get_snappingHierarchyEntitiesSequence","guestAssemblyHierarchy","get_hostConnectors","guestsThatAreNotChildren","disconnectedEntities","ConnectionUtils_getInstance","Companion_instance_17","GuestConnectionsComponent$hasMultipleHosts$delegate$lambda","get_isStatic","GuestConnectionsComponent$withReplacedConnection$lambda","$newConnection","hasMultipleHosts$factory","newConnection","connectionToRemove","tmp$ret$7","connectionsWithoutConnectionToRemove","tmp$ret$12","connectionsWithReplaced","get_hasMultipleHosts","centerOfConnections","Companion_instance_18","Companion_getInstance_19","oldHostConnections","newHostConnections","removeHostedConnection","isHostingEntityWithMultipleHosts","get_guests","Companion_instance_19","Companion_getInstance_20","Companion_instance_20","Companion_getInstance_21","closestOnEdge","minDist","edgesCnt","closestPointOnSegment","calculateRotationForGuestToSnapToMe","hostTransform","guestTransform","RotationDegreeOfFreedom_NONE_getInstance","RotationDegreeOfFreedom_ONE_getInstance","rotationAxisLS","rotationAxisWS","currentGuestRotationAxisWS","calculateMovement","guestRootTransform","guestConnectorWorldSpace","guestConnectorPosAfterRotation","closestHostConnectorInWorldSpace","Companion_instance_21","Companion_getInstance_22","Connector$findHostConnectorsWithMatchingTags$lambda","Connector$allSubConnectors$delegate$lambda","newTags","ownerTransform","pointWorldSpace","pointInLocalSpace","closestInLocalSpace","guestConnectorEntityTransform","guestSnappingRootTransform","movement","newWorldPosition","newWorldRotation","hostConnectors","ConnectorType_instance","rotationNeededToSnap","Companion_getInstance_57","allSubConnectors$factory","localSpacePoint","owner","worldSpacePoint","positionLocalSpace","ownerEntity","hostConnectorTransform","guestConnectorTransform","totalRotation","get_worldRotation","dotProduct","positionWorldSpace","closestPointInHostConnector","ConnectorTagConstants_instance","ConnectorTagConstants_getInstance","demanding","offering","ConnectorType_getInstance","ConnectorUtils_instance","checkRequiredConnectorsOnParts","requiredConnector","findUnfulfilledRequiredConnectors$_anonymous_$_anonymous_$checkHost_pjpnxs","$connector","findInHierarchyExceptHierarchyOfIgnored","ConnectorUtils$findUnfulfilledRequiredConnectors$_anonymous_$_anonymous_$checkHost$lambda_xfnpmt","ConnectorUtils$snappingEntitiesSequence$lambda","ConnectorUtils$snappingEntitiesSequence$lambda_0","$$guestPart","$$connector","hierarchyExceptSubTreesWithComponentSequence","hosts","Companion_instance_97","eligibleHosts","wasFulfilled","tmp0_safe_receiver_2","unfulfilledConnectors","ConnectorUtils_getInstance","Companion_instance_22","ConnectorsComponent$hostConnectors$delegate$lambda$lambda","ConnectorsComponent$hostConnectors$delegate$lambda","ConnectorsComponent$guestConnectors$delegate$lambda$lambda","ConnectorsComponent$guestConnectors$delegate$lambda","ConnectorsComponent$alignmentConnectors$delegate$lambda","ConnectorsComponent$requiredConnectors$delegate$lambda","ConnectorsComponent$getConnectorByKey$lambda","$connectorKey","ConnectorsComponent$getConnectorByKey$lambda_0","ConnectorsComponent$getConnectorByKey$lambda_1","connectors","hostConnectors$factory","guestConnectors$factory","alignmentConnectors$factory","requiredConnectors$factory","listOfConnectors","connectorsToAdd","connectorsToRemove","get_guestConnectors","connectorsComponent","disabledConnectors","updatedConnectors","Companion_instance_23","Companion_getInstance_24","Companion_instance_24","Companion_getInstance_25","disabledConnectorKeys","activationDistance","tagArray","offersArray","demandsArray","required","newPositions","movementDelta","rotationDelta","worldSpaceOffsetOnHanging","rotationalDegreeOfFreedom","_get_direction__hwzary","direction$factory","getNumberOfSubConnectors","spacing","PointSeriesConnector$direction$delegate$lambda","PointSeriesConnector$allSubConnectors$delegate$lambda$lambda","PointSeriesConnector$allSubConnectors$delegate$lambda","subConnectorSpacing","newFirst","newLast","subConnectorCount","calculatedLast","lengthToConnection","steps","diffVec","connectionPoint","allSubConnectors$factory_0","minElem","minValue","subConnectorIndex","PointSeriesSubConnector$_init_$ref_dzni41","PointSeriesSubConnector$_init_$ref_dzni41_0","PointSeriesSubConnector$_init_$ref_dzni41_1","series","series$factory","series$factory_0","series$factory_1","$b0","relativePositions","productBounds","get_relativeConnectorsComponent","relativeConnectors","newSnappableComponent","relativeConnectorsComponent","relativeConnectorInfo","translatedConnectors","relativeConnectorData","movedConnectorPoints","newConnector","RelativeConnectorRepositioner_getInstance","Companion_instance_25","Companion_getInstance_26","RotationDegreeOfFreedom_NONE_instance","RotationDegreeOfFreedom_ONE_instance","values_0","valueOf_0","RotationDegreeOfFreedom_initEntries","RotationDegreeOfFreedom_entriesInitialized","RotationDegreeOfFreedomImpostor_instance","RotationDegreeOfFreedomImpostor_getInstance","validateNoCollinearPointsInSurfaceConnector","listOfVerticesToRemove","previousIndex","Companion_getInstance_27","SurfaceConnector$validateNoCollinearPointsInSurfaceConnector$lambda","Companion_instance_26","$index","get_geometricMean","upProjection","pE","Companion_instance_27","Companion_getInstance_28","Companion_instance_28","Companion_getInstance_29","surfaces","Companion_instance_29","Companion_getInstance_30","basedOnCollider","surface","connectorKeys","get_dragSurfacesComponent","Companion_instance_30","Companion_getInstance_31","Companion_instance_31","Companion_getInstance_32","DragType_DragStart_instance","DragType_DragMove_instance","DragType_DragEnd_instance","values_1","DragType_DragStart_getInstance","DragType_DragMove_getInstance","DragType_DragEnd_getInstance","valueOf_1","DragType_initEntries","DragType_entriesInitialized","Companion_instance_32","Companion_getInstance_33","ViewerDragEventComponent$rayFromCameraToDragEnd$delegate$lambda","rayDir","planePoint","planeNormal","rayFromCameraToDragEnd$factory","Companion_instance_33","Companion_getInstance_34","updateDragSurfaces","calculateWorldDragSurfaces","transformedPoly","transformedSurfaces","Companion_instance_34","Companion_getInstance_35","Companion_instance_35","Companion_getInstance_36","rayFromCameraToDragPoint","core","typeId","fastComponent","Companion_instance_36","Companion_getInstance_37","productComponent","displayNameComponent","displayName","validateInput","componentHolder","removeComponentHolder","componentListeners","growComponentsTo","minSize","doEntityPassSystemFilter","componentFilter","doEntityIgnoreSystemFilter","ignoreComponentFilter","shouldSystemActOnEvent","notifyComponentAdded","comp","notifyComponentRemoved","notifyComponentUpdated","addComponentWithNotifyCallback","onUpdate","onAdd","componentHolder_0","Companion_getInstance_38","EntityManagerImpl$addComponentWithNotifyCallback$lambda","removeFromComponentHolder","onRemove","EntityManagerImpl$removeFromComponentHolder$lambda","Companion_instance_37","EntityManagerImpl$createEntityInternal$lambda","EntityManagerImpl$addComponent$lambda","EntityManagerImpl$addComponent$lambda_0","$component","EntityManagerImpl$removeComponent$lambda","$componentId","EntityManagerImpl$getComponents$lambda","EntityManagerImpl$getUncastComponent$lambda","EntityManagerImpl$getComponent$lambda","EntityManagerImpl$hasComponent$lambda","EntityManagerImpl$registerSystem$lambda","$system","entitiesArrayGrowSize","size_0","size_1","size_2","tmp$ret$13","tmp$ret$8","SystemGraphHelper_getInstance","tmp$ret$14","tmp$ret$17","sorted_0","systemId","listeners","systems","all","componentListener","ownerSystem","onComponentAddedRef","onComponentUpdatedRef","onComponentRemovedRef","Companion_instance_38","Companion_getInstance_39","SystemBase$onAddComponent$ref","SystemBase$onUpdateComponent$ref","SystemBase$onRemoveComponent$ref","SystemBase$printDependencies$lambda","SystemBase$printDependencies$lambda_0","SystemBase$printDependencies$lambda_1","SystemBase$printDependencies$lambda_2","$before","SystemBase$printDependencies$lambda_3","doingChangesOnComponent","systemsBeforeMe","systemsAfterMe","mandatoryComponents","ignoreEntitiesWithComponents","SystemBase2$onAddComponent$ref","SystemBase2$onUpdateComponent$ref","SystemBase2$onRemoveComponent$ref","SystemBase2$onAddComponent2$ref","SystemBase2$onUpdateComponent2$ref","SystemBase2$onRemoveComponent2$ref","component1Id","component2Id","SystemBase3$onAddComponent$ref","SystemBase3$onUpdateComponent$ref","SystemBase3$onRemoveComponent$ref","SystemBase3$onAddComponent2$ref","SystemBase3$onUpdateComponent2$ref","SystemBase3$onRemoveComponent2$ref","SystemBase3$onAddComponent3$ref","SystemBase3$onUpdateComponent3$ref","SystemBase3$onRemoveComponent3$ref","component3Id","SystemBase4$onAddComponent$ref","SystemBase4$onUpdateComponent$ref","SystemBase4$onRemoveComponent$ref","SystemBase4$onAddComponent2$ref","SystemBase4$onUpdateComponent2$ref","SystemBase4$onRemoveComponent2$ref","SystemBase4$onAddComponent3$ref","SystemBase4$onUpdateComponent3$ref","SystemBase4$onRemoveComponent3$ref","SystemBase4$onAddComponent4$ref","SystemBase4$onUpdateComponent4$ref","SystemBase4$onRemoveComponent4$ref","component4Id","SystemBase5$onAddComponent$ref","SystemBase5$onUpdateComponent$ref","SystemBase5$onRemoveComponent$ref","SystemBase5$onAddComponent2$ref","SystemBase5$onUpdateComponent2$ref","SystemBase5$onRemoveComponent2$ref","SystemBase5$onAddComponent3$ref","SystemBase5$onUpdateComponent3$ref","SystemBase5$onRemoveComponent3$ref","SystemBase5$onAddComponent4$ref","SystemBase5$onUpdateComponent4$ref","SystemBase5$onRemoveComponent4$ref","SystemBase5$onAddComponent5$ref","SystemBase5$onUpdateComponent5$ref","SystemBase5$onRemoveComponent5$ref","component5Id","convertGraphToArray","edges","resultingList","convertGraphToArray$iterateGraph","extractOrderOfRegistrationEdgesArr","extractRealEdgesArr","inductionVariable_2","last_2","inductionVariable_3","last_3","tmp0_safe_receiver_3","tmp0_elvis_lhs_0","list_0","tmp$ret$19","tmp$ret$22","$edges","SystemGraphHelper$sortListeners$lambda","SystemGraphHelper_instance","handleLockedMemberOfGroup","entityGroup","potentiallyLockedMember","EntityGroupUtils_instance","AutomaticGroupBuilderSystem$Companion$removeFromEntityGroup$lambda","$child","hasOnlyOneHostAndItIsStatic","get_isInGroupWithNonStaticHosts","productEntities","connectionRoot","findEntityGroupAmongConnections","connectionsComponent","get_automaticEntityGroup","buildEntityGroup","newGuest","findEntitiesToPutInEntityGroup","Companion_getInstance_41","existingEntityGroup","findStaticHost","findAParentOutsideTheGroup","assignEntityToEntityGroup","Companion_getInstance_40","hasParentInGroup","entityWithParentOutsideGroup","entityRoot","otherEntityGroup","newAutomaticEntityGroupComponent","detachEntityGroup","get_isInScene","Companion_instance_39","members","member","newGroupCenter","get_worldPosition","Companion_getInstance_48","oldEntityGroup","AutomaticGroupComponent$Companion$serializer$lambda","Companion_instance_40","destination_2","get_isMemberOfAutomaticGroup","addAutomaticGroupMember","newMember","newGroupComponent","removeAutomaticGroupMember","oldMember","setAutomaticGroupParentToHighestPrioConnectionOutsideGroup","get_highestPrioConnectionOutsideGroup","highestPrioConnection","groupConnections","Companion_instance_41","Companion_getInstance_42","nextAutomaticGroupId","incrementNextAutomaticGroupId","stateHolderEntity","get_isManualGroup","potentialHost","groupId","Companion_getInstance_44","SelectedComponent_instance","EntityGroupUtils_getInstance","createNewEntityGroup","nameManualGroup","ManualEntityGroupBuilderService$Companion$disconnectFromEntityGroupParent$lambda","$entityRoot","$entityGroup","Companion_instance_42","rotationEulerRadians","addSelected","addSelectable","addDraggable","entityGroupParent","SnapActionCandidateSortAndSelectStrategies_getInstance","Companion_getInstance_43","ManualGroupComponent$Companion$serializer$lambda","Companion_instance_43","get_isInManualGroup","get_manualGroup","Companion_instance_44","Companion_getInstance_45","checkConnectorsOnParts","hasAtLeastOneConnectorFulfilled","hasAtLeastOneConnectorFulfilled$_anonymous_$_anonymous_$checkHost_6hog06","ManualGroupConnectorValidation$hasAtLeastOneConnectorFulfilled$_anonymous_$_anonymous_$checkHost$lambda_qf62wo","groupParent","get_parentComponent","snapRes","ValidationResultType_WARNING_getInstance","Companion_instance_45","Companion_getInstance_46","nextManualGroupId","StaticComponent_instance","StaticComponent_getInstance","Companion_instance_46","Companion_getInstance_47","get_childComponent","updateParent","guestConnectionsComponent","mainConnection","ConnectionParentingSystem$updateParent$lambda","unParent","guestRoot","Companion_instance_47","entityRemoved","onUpdateChild","parentComponent","oldParent","oldParentComponentWithoutMe","newParentComponentWithMe","Companion_instance_48","Companion_getInstance_49","HierarchySystem$entityRemoved$ref","Companion_getInstance_107","newChildren","generateAssemblyHierarchy","me","generateAssemblyHierarchy$add","hierarchyExceptSubTreesWithComponent$add","forEachInHierarchy$iterate","$func","forEachInHierarchyExceptHierarchyOfIgnored$iterate","$ignored","forEachInHierarchyExceptSubHierarchiesWithComponent$iterate","findInHierarchy$iterate","$finder","findInHierarchyExceptHierarchyOfIgnored$iterate","filterInHierarchy$iterate","findInUpwardsHierarchy$iterate","HierarchyUtils$getHierarchyWithComponent$lambda","services","toJsonString","deserialized","assemblyRoot","assemblyEntities","finder","currentEntity","filterInHierarchy","hasComponentInUpwardsHierarchy","HierarchyUtils_getInstance","subTreeRoot","hierarchyExceptSubTreeArray$add","subtreeRoot","hierarchyExceptSubTreeSequence$iterateHierarchySequence","hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence","get_childrenSequence","forEachInHierarchyExceptHierarchyOfIgnored","hierarchyContains","get_upwardsHierarchy","getHierarchyWithComponent","isDescendantOf","forEachInHierarchyExceptSubHierarchiesWithComponent","$subTreeRoot","$subtreeRoot","hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda_0","$this_hierarchyExceptSubTreesWithComponentSequence","hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda_0","hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda$lambda","$this$sequence","hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda$lambda","InSceneComponent_instance","InSceneComponent_getInstance","SceneComponent_instance","generateHierarchy","generateHierarchy$add","generateHierarchy$default","Companion_instance_49","Companion_getInstance_50","setOfChildren","otherParent","SceneComponent_getInstance","Companion_instance_50","Companion_getInstance_51","updateWithInfoFromParent","SceneGraphSystem$updateWithInfoFromParent$update$ref","isScene","removeInSceneComponent","isInScene","updateWithInfoFromParent$update","HistoryEventType_TAKE_SNAPSHOT_instance","HistoryEventType_UNDO_instance","HistoryEventType_REDO_instance","HistoryEventType_CLEAR_instance","HistoryEventType_DISCARD_SNAPSHOT_instance","values_2","HistoryEventType_TAKE_SNAPSHOT_getInstance","HistoryEventType_UNDO_getInstance","HistoryEventType_REDO_getInstance","HistoryEventType_CLEAR_getInstance","HistoryEventType_DISCARD_SNAPSHOT_getInstance","valueOf_2","HistoryEventType_initEntries","HistoryEventType_entriesInitialized","HistoryEvent_instance","HistoryEvent_getInstance","Companion_instance_51","Companion_getInstance_52","historyEventType","triggerHistoryChangedEvent","makeFreeSlots","removeOld","purgeFutureSnapshots","_get_isAtTopOfStack__ylrnny","maxHistorySize","LogLevel_DEBUG_instance","LogLevel_INFO_instance","LogLevel_WARN_instance","LogLevel_ERROR_instance","LogLevel_NONE_instance","LogLevel_DEBUG_getInstance","LogLevel_INFO_getInstance","LogLevel_WARN_getInstance","LogLevel_ERROR_getInstance","LogLevel_NONE_getInstance","valueOf_3","LogLevel_initEntries","LogLevel_entriesInitialized","LogLevelJavascriptImpostor_instance","LogLevelJavascriptImpostor_getInstance","echoStandardConsole","LoggerState$LoggerWrap$debug$lambda","$f","LoggerState$LoggerWrap$error$lambda","LoggerState$LoggerWrap$warn$lambda","LoggerState$LoggerWrap$info$lambda","packageColon","_anonymous_parameter_0__qggqh8","LoggerState_instance","packageName","Companion_instance_52","Companion_getInstance_53","$serializer_instance_2","tmp10_input","Margin_init_$Create$","Margin_init_$Init$","outerSize","Axis_X_instance","Axis_Y_instance","Axis_Z_instance","values_4","Axis_X_getInstance","Axis_Y_getInstance","Axis_Z_getInstance","valueOf_4","Axis_initEntries","Axis_entriesInitialized","MathUtils_instance","angleDegrees","angles","Companion_getInstance_93","MathUtils_getInstance","Companion_instance_53","Companion_getInstance_54","$serializer_instance_3","tmp7_input","ModelTransform_init_$Create$","ModelTransform_init_$Init$","aab","cuboid","Companion_instance_54","Companion_getInstance_55","pointInPlane","vectorToProject","Companion_instance_55","Companion_getInstance_56","firstDirection","currentDirection","currentNormal","almostEquals","polygonPlane","hitPoint","Quaternion_init_$Init$","iw","ix","iy","iz","Quaternion_init_$Init$_0","QuaternionFromInts","QuaternionFromDouble","toRotationMatrix","Companion_instance_56","x_1","x_2","y_0","z_0","lookDirection","backward","backwardLengthSq","upLengthSq","backwardRsqrt","upRsqrt","tLengthSq","tRsqrt","mn","a_0","mx","accept","crossT","S_0","qw_0","qx_0","qy_0","qz_0","S_1","qw_1","qx_1","qy_1","qz_1","S_2","qw_2","qx_2","qy_2","qz_2","normalizedAxis","xAngle","yAngle","zAngle","x_3","x_4","s3","x_5","$serializer_instance_4","Quaternion_init_$Create$","Quaternion_init_$Init$_1","Quaternion$toEuler$lambda","q2","floatingPoints","w2","euler","eulerX","eulerZ","eulerY","w0","x0","y0","z0","w1","relativeTo","offsetVector","RelationOriginAlongX_LEFT_instance","RelationOriginAlongX_CENTER_instance","RelationOriginAlongX_RIGHT_instance","values_5","RelationOriginAlongX_LEFT_getInstance","RelationOriginAlongX_CENTER_getInstance","RelationOriginAlongX_RIGHT_getInstance","valueOf_5","RelationOriginAlongX_initEntries","RelationOriginAlongX_entriesInitialized","RelationOriginAlongXImpostor_instance","RelationOriginAlongXImpostor_getInstance","RelationOriginAlongY_BOTTOM_instance","RelationOriginAlongY_CENTER_instance","RelationOriginAlongY_TOP_instance","values_6","RelationOriginAlongY_BOTTOM_getInstance","RelationOriginAlongY_CENTER_getInstance","RelationOriginAlongY_TOP_getInstance","valueOf_6","RelationOriginAlongY_initEntries","RelationOriginAlongY_entriesInitialized","RelationOriginAlongYImpostor_instance","RelationOriginAlongYImpostor_getInstance","RelationOriginAlongZ_BACK_instance","RelationOriginAlongZ_CENTER_instance","RelationOriginAlongZ_FRONT_instance","values_7","RelationOriginAlongZ_BACK_getInstance","RelationOriginAlongZ_CENTER_getInstance","RelationOriginAlongZ_FRONT_getInstance","valueOf_7","RelationOriginAlongZ_initEntries","RelationOriginAlongZ_entriesInitialized","RelationOriginAlongZImpostor_instance","RelationOriginAlongZImpostor_getInstance","Companion_instance_57","Companion_getInstance_58","$serializer_instance_5","tmp0_cached","tmp8_cached","RelationOrigin_init_$Create$","RelationOrigin_init_$Init$","Size_init_$Init$","SizeFromVector","Companion_instance_58","Companion_getInstance_59","$serializer_instance_6","tmp8_input","Size_init_$Create$","Size_init_$Init$_0","Companion_instance_59","$serializer_instance_7","tmp6_input","Transform_init_$Create$","Transform_init_$Init$","aPosition","bPosition","positionAlmostTheSame","aRotation","bRotation","rotationAlmostTheSame","get_zero","_init_properties_Vector_kt__7ulyhp","Vector_init_$Init$","xInt","yInt","zInt","__VectorIntConstructorKotlin","Companion_instance_60","VectorConstants_getInstance","$serializer_instance_8","Vector_init_$Create$","Vector_init_$Init$_0","toJson","qDiff","thisTimesQ","twoQW","otherPoint","cosValue","unsignedAngle","perpendicular","signedDot","cross","pointOnPlane","ptSet","minAlong","maxAlong","dotVal","p1_p","p_p2","segmentsSum","mean","VectorConstants_instance","properties_initialized_Vector_kt_6ddpp7","InnerMeasurement$distance$delegate$lambda","distance$factory","MeasurementUtils_instance","baseWorldTransform","transformedVerticesForShape","directionLocalSpace","directionWorldSpace","RaycastUtils_instance","outerHit","epsilonOffset","reverseRayOrigin","reverseRay","selfHit","MeasurementUtils_getInstance","get_nothing","Companion_instance_61","Companion_getInstance_62","ProductUtils_getInstance","ProppingComponent_instance","ProppingComponent_getInstance","get_isPropping","Companion_instance_62","Companion_getInstance_63","templateId","comSize","otherC","Companion_instance_63","Companion_getInstance_64","directionToPoint","fromRayOriginToPoint","surfaceNormal","raycast$iterator","$ray","closestHit","hitDistance","closestDistance","raycastAll$iterator","RaycastUtils$raycast$iterator$ref","$closestHit","RaycastUtils$raycast$iterator$ref_0","RaycastUtils$raycastAll$iterator$ref","$hits","RaycastUtils$raycastAll$iterator$ref_0","hierarchyToIgnore","RaycastUtils_getInstance","hasFinishedLoading","Companion_instance_64","Companion_getInstance_65","hasFailedLoading","Companion_instance_65","Companion_getInstance_66","modelRootUrl","model","UrlHelper_instance","Companion_instance_66","Companion_getInstance_67","refreshModelsOnScene","onModelInfoChanged","oldViewerObject","Companion_instance_73","ModelUtils_getInstance","loadModel_0","get_viewerObject","viewerObject","shouldHaveComponent","didHaveComponent","modelWasRemoved","modelWasAdded","modelKept","tmp6_safe_receiver","tmp7_safe_receiver","tmp8_safe_receiver","Companion_instance_67","Companion_getInstance_68","ModelUtils$loadModelFromModelInfo$lambda$lambda","ModelUtils$loadModelFromModelInfo$lambda","$viewer","modelComponent","ModelUtils$loadModelFromModelInfo$o$lambda","ModelUtils$loadModelFromModelInfo$o","ModelUtils$unloadModel$lambda","$viewerObject","ModelUtils$hide$lambda","RenderedComponent_instance","ModelUtils$show$lambda","ModelUtils_instance","modelInfo","modelTransform","onModelLoaded","onModelLoadFailed","loadingBox","traverseHierarchy","Companion_instance_68","Companion_getInstance_69","get_hasPausedViewerUpdates","resumeViewerUpdatesOnDraggedEntity","resumeViewerUpdates","pauseViewerUpdatesOnDraggedEntity","pauseViewerUpdates","Companion_instance_70","Companion_getInstance_71","RenderedComponent_getInstance","Companion_instance_71","Companion_getInstance_72","Companion_instance_72","Companion_getInstance_73","lineIds","Companion_getInstance_74","updateViewerObjectTransform","updateViewerObjectTransform_0","setVisibilityOfObject","viewerObjectComponent","registerAll","newViewer","modelLoaderSystem","unregisterAll","ViewerMock$triggerModelLoaded$lambda","ViewerMock$triggerModelLoadFailed$lambda","ViewerMock$loadModel$lambda","$url","oldVal","ViewerMock$loadModel$lambda_0","$modelLoaded","$viewerObjectMock","ViewerMock$loadModel$lambda_1","$modelLoadFailed","viewerObjectMock","objId","Companion_instance_74","Companion_getInstance_75","draggingPlane","throwErrorIfDeleted","Companion_instance_75","Companion_getInstance_76","viewerMock","unloadCallback","onClick","outlined","blockOutlined","castShadows","parentMesh","EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda","$oldEntity","EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_0","EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_1","EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_2","$newEntity","guestConnectionRoot","EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_3","EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_4","$validationService","oldConnection","EntityReplaceHelper_init_$Init$","allowedMovementsOfChildrenInMilliMeter","snapSelectStrategy","tryCreateCandidateToExactlyTheSameConnectors","isCandidateValid","candidates","candidateWithSameHostConnector","candidatesWithSameGuestConnector","sameHostConnector","findSameHostConnector","sameGuestConnector","findSameGuestConnector","foundSubConnector","isValid","tmp9_safe_receiver","tmp10_elvis_lhs","worldTransform","checkIfDisposed","entityGroupStuff","replaceInScene","adoptChildren","adoptConnections","createSimilarGuestConnection","newGuestConnections","createSimilarHostConnection","newGuestConnectionsComponent","wasPaused","newGuestConnector","Companion_getInstance_78","FastReplaceAction$createSimilarGuestConnection$lambda","newHostConnector","FastReplaceAction$createSimilarHostConnection$lambda","Companion_instance_77","$connection","replacePartInAssembly","entityToAdd","entityToReplace","connectPartToAssembly_1","adoptAllChildrenParts","removeAllConnectionRoots","childrenParts","Companion_instance_78","Companion_getInstance_79","screenSpaceCoord","triggerClickEvent","MultiSelectionEnabledComponent_instance","MultiSelectionEnabledComponent_getInstance","Companion_instance_79","Companion_getInstance_80","SelectedComponent_getInstance","Companion_instance_80","Companion_getInstance_81","$serializer_instance_9","CatalogsHeader_init_$Create$","CatalogsHeader_init_$Init$","catalogs","componentDeserializer","JsonSerializer$Companion$StrictPretty$lambda","JsonSerializer$Companion$NonStrictPretty$lambda","JsonSerializer$Companion$NonStrictPrettyIgnoreUnknownKeys$lambda","createANewCoreInstance","coreServices","tmpCore","rebuildTreeFromScratch","entityTreeBuilder","newRoots","letCatalogsUpdateTreeWhenDone","letCatalogsUpdateTreeBeforeParsingComponents","letCatalogsUpdateTreeBeforeBuildingEntities","letCatalogsUpdateJSON","bundle","newJson","catalogVersions","Companion_getInstance_82","fromJson","Companion_instance_86","fromJson_0","Companion_getInstance_91","Companion_instance_81","updatedJson","allEntities","Companion_instance_82","Companion_getInstance_83","serializedId","get_previousStringId","SceneReloadingComponent_instance","SceneReloadingComponent_getInstance","SerializableGuestConnectionsComponent$Companion$serializer$lambda","Companion_instance_83","Companion_getInstance_84","$serializer_instance_10","SerializableConnection_init_$Create$","SerializableConnection_init_$Init$","guestId","Companion_instance_84","Companion_getInstance_85","$serializer_instance_11","tmp7_cached","SerializableGuestConnectionsComponent_init_$Create$","SerializableGuestConnectionsComponent_init_$Init$","Companion_instance_85","Companion_getInstance_86","Companion_getInstance_87","$serializer_instance_12","VersionHeader_init_$Create$","VersionHeader_init_$Init$","findCorrectEntityGroupOrderFromConnectionGraph","shadowEntity","childrenLeft","childrenInOrder","connectionsComponents","hasAnyConnectionsToOther","hasNewConnectionsComponent","orderOfChildren","hasPossibleGuestConnections","Companion_instance_87","Companion_getInstance_88","EntityTreeBuilder$InterceptingAssemblyPartCatalog$productSpecification$lambda","$productRef","modifyAssemblyComponentsIfNeeded","idMap","withoutUnlockedChildren","removeNonLockedPartsFromAssemblyStructure","withPartsMap","addPartsMap","addIdsMap","assemblyStructureComponent","removeLockedChildren","Companion_getInstance_89","shadowId","mapShadowIdToRealId","buildAutomaticGroupEntityTree","groupShadowRoot","createEntityFromShadow","newEntitiesWithChildren","buildEntityTreeInternal$default","snapSettings","validCandidate","hasAnyEntityWithSerializedConnections","EntityTreeBuilder$hasAnyEntityWithSerializedConnections$lambda","existingChild","buildEntityTreeInternal","preCreated","theSecretOrderOfTheShadowChildren","findCorrectEntityGroupOrder","theSecretOrderOfTheShadowChildren_0","newChildren_0","list_1","buildEntityTreeNode","newChildren_1","repositionAndAddComponentsToPartsOfAssembly","addSerializedComponents","placeNewEntity","buildChildren","buildEntityTreeNode$default","immediateNonPartDescendants","childParent","findParentAmongCreatedEntities","mappedShadowId","shadowChild","shadowParentId","mappedShadowParentId","shadowVersion","EntityTreeBuilder$repositionAndAddComponentsToPartsOfAssembly$lambda","recreateProduct","hasShadowParent","hadConnectionBefore","shouldResnap","resnapNewEntity","findSnapsForNewEntity","EntityTreeBuilder$resnapNewEntity$lambda","hasShadowParentSnapSettings","nonNullParentSettings","refinedSpecification","EntityTreeBuilder$mapShadowIdToRealId$ref","interceptorCatalog","EntityTreeBuilder$mapShadowIdToRealId$ref_0","currentProductRoot","idMapper","entityToCreate","Companion_instance_88","$newEntityPart","remainingToBuild","Companion_instance_89","Companion_getInstance_90","$serializer_instance_13","tmp11_cached","SerializableEntityV13_init_$Create$","SerializableEntityV13_init_$Init$","needsResnap","serializedComponents","init$add","$parse","serializable","deserializeComponentsForEntity","entityDO","deserializeComponent","SerializableTreeV13$deserializeComponent$lambda","Companion_instance_90","cleanedEntities","serializableEntities","Companion_getInstance_92","serializableCatalogs","$serializer_instance_14","tmp9_cached","SerializableTreeV13_init_$Create$","SerializableTreeV13_init_$Init$","$key","SerializableTreeV13$removeEntity$lambda","$id","createSerializableEntitiesWithRelations","parentProductRoot","realParent","Json$parseToJsonElement$ref","currentSerializedEntity","SerializerV13$Companion$cleanUp$lambda","deserializeId","stringId","extractAssemblyParts","entityDOs","childToParentMap","parentToChildMap","extractAssemblyParts$checkComponents","tmp$ret$15","createEntity_0","partKeyComponents","assemblyParts","createProductWithoutProductRootChildren","asList_0","addComponents","entityAndDO","newConnections","fixProductPartComponents","toAdd","meRoot","buildProductRootHierarchy","serializableEntity","deserializedParentID","partKeyProducts","spec","Companion_instance_91","entity_0","tmp0_iterator_4","element_4","destination_3","tmp0_iterator_5","serializableEntity_0","$components","$entityDOs","rootie","there","parentID","entityAndDOs","element_5","tmp0_iterator_6","element_6","tmp0_iterator_7","element_7","Companion_instance_92","xMin","xMax","yMin","yMax","zMin","zMax","otherAABB","convexPolyhedronPenetration","penetrationAxis","shape1","shape2","convexPolyhedronPenetration$isSeparatingPlane","indexedObject_1","indexedObject_2","min1","max1","min2","max2","overlaps","isBetweenOrdered","lowerBound","upperBound","raycastEachFaceIndividually","hitPlaneNormal","facePolygon","Companion_instance_93","scaleAmount","inverseScale","edgeDirections","Companion_getInstance_94","$other","ConvexPolyhedron$axisAlignedBoundingBox$delegate$lambda","axisAlignedBoundingBox$factory","tmp0_normals","arr_0","tmp1_vertices","arr_1","i_1","tmp2_edgeDirections","tmp3_faces","otherShape","nearPlaneNormal","planeD","vN","vD","distanceToPlane","calcNormals","calcVertices","calcVertices_0","Cuboid_init_$Init$","CuboidFromSize","Cuboid_init_$Init$_0","CuboidFromSizeAndCenter","Companion_instance_94","Cuboid$size$delegate$lambda","$vertices","tmp0_edgeDirections","tmp1_normals","tmp2_faces","size$factory","newVertices","calcAxisAlignedBoundingBox","axisAlignedVertices","penetration$check","itSize","PolyhedronGroup$axisAlignedBoundingBox$delegate$lambda","axisAlignedBoundingBox$factory_0","isConcaveVertex","vertexNormal","isConvexVertex","isPlanarPointContainedInTriangle","testPoint","f3","va1","va2","va3","triangleArea","uvFactor1","uvFactor2","uvFactor3","uv3","pointCoordinate","getVerticesFromSinglePolyhedron","earClipTriangulation$isNotCornerAndNotInsideTriangle","earClipTriangulation$findValidEar","remainingVertices","shapeNormal","currentVertexIndex","previousVertexIndex","nextVertexIndex","previousVertex","nextVertex","PolyhedronUtils$singleSidedPolyhedronFromPolygon$lambda","PolyhedronUtils$polyhedronFromPolygon$lambda","PolyhedronUtils$polyhedronFromPolygon$lambda_0","PolyhedronUtils$polyhedronFromPolygon$lambda_1","PolyhedronUtils$pointInPolygon$lambda","projectionLambda","PolyhedronUtils$pointInPolygon$lambda_0","PolyhedronUtils$pointInPolygon$lambda_1","PolyhedronUtils$flatPolyhedronFromConvexPolygon$lambda","PolyhedronUtils$transformAndExtractVerticesFromPolyhedron$lambda","$poly","PolyhedronUtils_instance","compartment","outerWidth","outerDepth","innerHeight","innerWidth","innerDepth","innerDx","innerDy","innerDz","outerDz","outerDx","topY","bottomY","leftX","rightX","frontZ","backZ","compartmentWidth","compartmentHeight","outerCuboids","horizontalCompartmentCount","verticalComparmentCount","horizontalGap","verticalGap","dividerCuboids","dividerDx","dividerDy","currentDividerX","currentDividerY","cuboids","faceIndices","negativeFaceNormal","frontFaceIndices","backfaceIndicesReversed","polyhedronNormals","polyhedronFaces","polyhedronEdgeDirections","triangleVertex1","triangleVertex2","triangleVertex3","currentFaceNormal","nextFaceIndex","fromVertex","toVertex","polyhedronVertices","tmp$ret$18","projectedPoint","crossings","surfaceX","surfaceY","surfaceZ","polyhedrons","faceList","ear","Companion_instance_95","Companion_getInstance_96","triggerMovedToCandidateSnapPositionComponent","Companion_instance_96","Companion_getInstance_97","triggerMovedToValidSnapPositionComponent","Companion_getInstance_98","allowedHosts","SnapAction_init_$Init$","SnapActionFromCandidate","_get_nonDisposedGuest__7a6v6j","createConnections","connectionCausedDirectlyBySnap","hasConnectionThatCausedTheSnap","getAffectedGroups","guestConnectionsAfterSnapping","entityGroups","endTransform","initialTransform","io","newEndPosition","performMovement","productRoot","revertMovement","_get_inActivationDistance__r405b9","inActivationDistance$factory","SnapActionCandidateImpl$guestRootToGuestDeltaTransform$delegate$lambda","SnapActionCandidateImpl$guestRootToGuestConnectorDeltaTransform$delegate$lambda","SnapActionCandidateImpl$guestEndTransform$delegate$lambda","SnapActionCandidateImpl$inActivationDistance$delegate$lambda","hostActivationDistance","guestActivationDistance","tmp7_elvis_lhs","hostOwner","tmp9_elvis_lhs","guestOwner","tmp10_safe_receiver","tmp11_elvis_lhs","guestConnectorWorldPos","tmp12_safe_receiver","tmp13_elvis_lhs","hostConnectorWorldPos","overridePriority","alignmentInitiatorCandidate","guestRootToGuestDeltaTransform$factory","guestRootToGuestConnectorDeltaTransform$factory","guestEndTransform$factory","SnapActionCandidateSortAndSelectStrategies_instance","SelectAll_instance","SortByPriorityInActivationDistanceThenDistance_instance","SortByDistance_instance","SortByPriorityThenDistance_instance","SelectAll_getInstance","SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda","SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda_0","SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda_1","SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda_2","$minimumDistanceElement","minimumDistanceOrMovementDistance","snapsInActivationDistance","otherSnaps","sortedByWithEpsilon","minimumDistanceElement","othersByDistance","SortByPriorityInActivationDistanceThenDistance_getInstance","SortByPriorityThenDistance$sortAndSelect$lambda","SortByPriorityThenDistance$sortAndSelect$lambda_0","sortedByWithEpsilon_0","SortByPriorityThenDistance_getInstance","SortByDistance$sortAndSelect$lambda","SortByDistance$sortAndSelect$lambda_0","SortByDistance_getInstance","sortedByWithEpsilon$lambda","sortedByWithEpsilon$lambda_0","$selector","$epsilon","Companion_instance_98","Companion_getInstance_99","Companion_instance_99","Companion_getInstance_100","Companion_instance_100","Companion_getInstance_101","_get_snappingHierarchyEntitiesSequence_$lambda_6umhyj","_get_snappingHierarchyEntitiesSequence_$lambda_6umhyj_0","get_snappingHierarchyEntities","forEachSnappingHierarchyEntity","includeAllSubConnectors","includeInternalConnectors","includeHostAssemblyParts","includeAlignmentConnectorsOutsideActivationDistance","_get_logger__rkp4sl","findContinuousAlternativeToAlignment","alignmentSnapActionCandidate","continuousCandidates","bestCandidate","matchingSnapCandidatesOnHost$isCloseEnough","$snapSettings","$hostEntity","snappingGuest","hostSubConnector","matchingSnapCandidatesOnHost$isFree","SnapUtils$matchingSnapCandidatesOnHost$lambda","$matchingCandidates","actualHostConnector","SnapUtils$matchingSnapActionCandidatesMultipleHosts$lambda","SnapUtils$matchingSnapActionCandidatesMultipleHosts$lambda_0","$snapsList","$guestSnapRoot","SnapUtils$createSnapCandidate$lambda","matchingCandidates","hostEntities","snapsList","connectorOnHostKey","connectorOnGuestKey","hostBaseConnector","tmp5_hostTransform","forcedEndTransform","tmp6_elvis_lhs","forcedPriority","snapCandidate","alternativeRealCandidate","newPos","newEndTransform","transformFromRootToConnectingEntity","newConnectingEntityTransform","newPositionStillCanConnectToToSameConnector","SnapUtils_getInstance","Companion_instance_101","Companion_getInstance_102","Companion_instance_102","Companion_getInstance_103","setExistingEntityStates","entityStateBeforeLoadingSnapshot","entityAfterSnapshot","removeEntitiesNoLongerPresent","entitiesToRemove","Companion_getInstance_104","SnapshotService$removeEntitiesNoLongerPresent$lambda","createEntityState","Companion_instance_103","$entitiesToRemove","clonedComponents","entityStates","snapshot1","snapshot2","Companion_instance_104","Companion_getInstance_105","ApiSystemIds_instance","ApiSystemIds_getInstance","AlwaysHangDownComponent_instance","AlwaysHangDownComponent_getInstance","get_isHanging","Companion_instance_105","$serializer_instance_15","Serialized_init_$Create$_0","Serialized_init_$Init$_0","LocalTransformComponent$Companion$serializer$lambda","LocalTransformComponent_init_$Init$","LocalTransformComponentFromPosAndRot","Companion_instance_106","otherLoc","parentWorld","worldPos","worldRot","Companion_instance_107","Companion_getInstance_108","localTransformComponent","localV","newWorldPos","newWorld","parentTransform","relativePosition","relativeRotation","newLocalTransform","TransformUtils_getInstance","Companion_instance_108","$serializer_instance_16","Serialized_init_$Create$_1","Serialized_init_$Init$_1","WorldTransformComponent$Companion$serializer$lambda","WorldTransformComponent_init_$Init$","WorldTransformComponentFromPosAndRot","Companion_instance_109","local","idSumCalls","mutableStackOf","baseurl","urlDetails","baseUrlDetails","protocolAndServer","slash","lowerUrl","endOfProtocolPos","startOfPath","UrlHelper_getInstance","Companion_instance_110","Companion_getInstance_111","Companion_instance_111","Companion_getInstance_112","Companion_instance_112","Companion_getInstance_113","elements_0","ValidationResultType_WARNING_instance","ValidationResultType_FAIL_instance","values_8","valueOf_8","ValidationResultType_initEntries","ValidationResultType_entriesInitialized","Companion_instance_113","Companion_getInstance_114","Companion_getInstance_115","resultType","failedRule","unsafeCast","getCoreVersion","$jsExportAll$","$com","$com$ikea","$com$ikea$core","$com$ikea$core$action","$com$ikea$core$api","$com$ikea$core$assemblies","$com$ikea$core$catalog","$com$ikea$core$collections","$com$ikea$core$collision","$com$ikea$core$component","$com$ikea$core$connections","$com$ikea$core$connectors","$com$ikea$core$debugutils","$com$ikea$core$dragging","$com$ikea$core$ecs","$com$ikea$core$groups","$com$ikea$core$hierarchies","$com$ikea$core$history","$com$ikea$core$logging","$com$ikea$core$math","$com$ikea$core$measuring","$com$ikea$core$nothing","$com$ikea$core$products","$com$ikea$core$raycasting","$com$ikea$core$rendering","$com$ikea$core$rendering$mock","$com$ikea$core$replace","$com$ikea$core$selection","$com$ikea$core$serialization","$com$ikea$core$serialization$entitytreebuilder","$com$ikea$core$serialization$v13","$com$ikea$core$shapes","$com$ikea$core$snapping","$com$ikea$core$snapshot","$com$ikea$core$system","$com$ikea$core$transforms","$com$ikea$core$utils","$com$ikea$core$validation","kotlin_core_core_api","AlignmentConnectionCreationSystem","AlignmentConnectionsComponent","AlignmentPlane","HandleUnderAlignmentComponent","HandleRotationSystem","HostConnectorRotationValidation","AlignmentLinesReferenceCounter","AlignmentLinesSystem","AlignmentLinesUtils","IntersectionPointConnectors","IntersectionPointsTracker","RoomAlignmentEdgesComponent","SurfaceAlignmentLines","AllowedDoorPairsComponent","AllowedDoorPairsValidation","InvalidDoorPairsResult","AssemblyInstructionsService","AssemblyInstructionsServiceImpl","PointSeriesAssemblyInstruction","PointSeriesAssemblyInstructionImpl","AutoAdaptFeature","AutoAdaptProductSpecificationsSystem","AutoAdaptService","EntityWithSensorZone","AutoAdaptUtils","AutoAdaptChildFailedEventComponent","ChildInfo","PreferSameConnectorsStrategy","AutoAdaptChildrenSystem","AutoAdaptDisposeFailedChildrenSystem","AutoAdaptCacheSystem","AutoAdaptCachedVariantsComponent","AutoAdaptSessionComponent","CleanCacheOnFinishedAutoAdaptSystem","AutoAdaptGuestComponent","AutoAdaptHostComponent","AutoAdaptProductSpecificationsComponent","SpecificationPair","AutoAdaptVariantComponent","ForceAutoAdaptWhenParentIsDraggedComponent","ReplacedWithAutoAdaptEventComponent","dragStart","draggedRootEntity","dragStop","DragStrategy","AbstractDragStrategy","AutoAdaptDragStrategy","DragSurfaceSelector","DragSurfaceCanHostSelector","DragSurfaceCanHostWithAutoAdaptSelector","ValidDragStrategyResult","ValidAutoAdaptDragStrategyResult","DebugLineDrawingSystem","LoggingEntityManagerWatcher","DoneEntry","AddEntry","RemoveEntry","CallEntry","MeasuringEntityManagerWatcher","DragState","DragStateComponent","DragSurfaceNormalVisualizationSystem","DragSurfaceVisualizationSystem","DragSurfacesUpdateSystem","DragSystem","DrawDragGhostSystem","PostProcessDragStrategy","HigherPriorityAlignmentPostProcess","IsDraggedComponent","TakeSnapshotBeforeDragSystem","FreeMoveComponent","FreeMoveDragStrategy","ResolveCollisionsDragStrategy","SnapCardinalDirectionsDragStrategy","SnapClosestDragStrategy","SnapClosestWithSubConnectorsDragStrategy","CanvasTo3DDragConverterSystem","DragSurfaceEntityPair","DragSurfaceOnlyRoomSelector","LegacyCanvasTo3DDragConverterSystem","NoDragConverterDetector","DragProjectionPointComponent","GrabOffsetComponent","DragSurfacesChangedListener","DragSurfaceProjector","AnyDragSurfaceProjector","DragSurfaceEntityPairsCacheComponent","DragSurfaceUpdatesListenerSystem","XYPlaneProjector","FunctionalMarginComponent","FunctionalMarginShapeComponent","FunctionalMarginSystem","FunctionalMarginValidation","FunctionalMarginWarning","FunctionalZone","FunctionalZonesLocalComponent","FunctionalZonesLocalToWorldSystem","FunctionalZonesWorldComponent","ICFDataService","ICFProductData","LabelComponent","DebugLogger","LoggerException","ColoredOutlineComponent","ColoredOutlineSystem","OutlineBlockingComponent","OutlineEntityGroupDeselectSystem","OutlineSelectedSystem","OutlineSystem","OutlinedComponent","AutoAdaptPlacementActor","PlacementHelper","PlacementResult","PlacementService","PlacementZoneByHeightComponent","RecommendedInitialPositionFromFloorComponent","RecommendedInitialPositionFromParentComponent","SearchDirectionsUtils","CandidateResult","SnapPlacementActor","SortCriterion","SortCriterionBase","DistanceCriterion","FilterCriterion","InActivationDistanceFilter","OriginalVariantCriterion","PriorityCriterionSettings","PriorityCriterionSettings$Companion$all$1","PriorityCriterionSettings$Companion$onlyInActivationDistance$1","PriorityCriterion","RecommendedDistanceFromFloorCriterion","SnapSorter","SnapSorterBuilder","WarningsCriterion","sam$kotlin_Comparator$0_7","sam$kotlin_Comparator$0_8","SpaceFinderUtils","ProppingData","ProppingHostConnectorsComponent","ProppingHostConnectorData","ProppingInfoComponent","PropHolderInfo","ProppingSubSystem","ProppingSystem","ProppingUtils","ProppingsAvailableForDemand","SetPropHolderInfoSystem","SetProppingHostConnectorDataSystem","CommunicationSizeComponent","DoorComponent","DoorFrontComponent","DrawerComponent","FrameComponent","HandleComponent","IncludedHandleComponent","LegComponent","LightComponent","ReplaceAssemblyPartUtils","ReplacePartResult","ReplacePlacementResult","ReplaceUtils","RoomComponentDeserializer","RoomConnectorConstants","CoreRoomGeometryData","CoreRoomGeometry","CoreRoomSurface","RoomSurfaceGeometryImpl","CoreRoomEdge","CoreRoomVertex","CoreRoomObstacle","CoreRoomBoundingBox","RoomGeometryData","RoomSurface","RoomEdge","RoomCorner","RoomObstacle","RoomPoint3D","RoomRotation","RoomBoundingBox","RoomTransform","RoomService","DisabledRoomConnectorsConfigComponent","RoomComponent","RoomConnectorRelationsComponent","RoomConnectorKeysForSurface","RoomConnectorKeysForEdge","RoomConnectorKeysForCorner","RoomConnectorsForSurface","RoomConnectorsForEdge","RoomConnectorsForCorner","RoomDimensionsComponent","RoomGeometryComponent","RoomPartComponent","RoomRefToRoomComponentInterceptor","RoomDimensionToGeometrySystem","RoomServiceDragSystem","RoomSystem","RoomColliderUtilities","RoomConnectorPair","RoomConnectorRelationsMapper","Wall","RoomConnectorUtilities","RoomGeometryUtilities","StandardSelectionService","StandardSelectionSystem","StlSystemIds","DragExtensions","ViewerDragState","AllowedNumberOfChildrenOfTypeValidation","DisallowSeparateRequiredHostsValidation","InvalidNumberOfChildren","PlacementZoneValidation","PlacementZoneWarning","RequiredConnectorsSatisfiedValidation","RequiredConnectorsValidationResult","ValidationResultIds","ValidationRuleIds","CoreVisualization","VisualizationState","ColliderVisualizationConfigComponent","ColliderVisualizationNodeComponent","ColliderVisualizerViewerObjectsComponent","ConnectorVisualizationConfigComponent","ConnectorVisualizationNodeComponent","ConnectorVisualizerViewerObjectsComponent","DecoratorComponent","EntityColliderVisualizationComponent","EntityConnectorVisualizationComponent","ConnectorVisualizationData","PolyhedronVisualizationNodeComponent","PolyhedronVisualizationSystem","AutoAdaptHostZoneVisualizationSystem","DragProjectionPointVisualizationSystem","FunctionalMarginVisualizationSystem","FunctionalZoneVisualizationSystem","PolyhedronVisualizationHolderComponent","ForcedComponentBaseSystem","ColliderVisualizationSystem","ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1","ConnectorVisualizationSystem","EntityColliderVisualizationSystem","CollisionVisualizationSceneDataComponent","CollisionVisualizationSceneData","EntityCollisionVisualizationSystem","Companion_115","EntityConnectorVisualizationSystem","createColliderVisualization","collides","collisionData","ColliderVisualizer","CollisionVisualizationData","Color","ConnectorVisualizer","Companion_116","Visualizer","DefaultVisualizer","Companion_117","VisualizerUtils","childConnectionAdded","handlePositionChange","childConnectionRemoved","childConnectionUpdated","updateGroupAlignment","updateAlignment","oldAlignments","getOldAlignmentConnections","newAlignments","matchingAlignmentConnections","set_alignmentConnections","updateRelativeAlignments","belongsToSameEntityGroup","AlignmentConnectionsComponent$toString$lambda","otherAlignmentConnectionsComponent","onMoveToValidSnapPosition","new_0","checkAndCorrectRotation","isDoorOrHandle","HandleComponent_getInstance","DoorComponent_getInstance","DoorFrontComponent_getInstance","handles","isUnderAlignment","findAndApplyPossibleAlignment","markAsUnderAlignment","validateAndReSnap","unmarkAsUnderAlignment","currentConnector","possibleSnap","findValidSnapCandidate","HandleRotationSystem$validateAndReSnap$lambda","snappingGuestEntity","HandleRotationSystem$findValidSnapCandidate$lambda","matchingSnaps","validationResults","HandleUnderAlignmentComponent_getInstance","HandleUnderAlignmentComponent_instance","validateWithParent","getCloseKey","getCloseKeyFromSet","getCloseConnectorKey","usedKey","clearAlignmentEdgesFeature","connectorsToKeep","newConnectorsComponent","initializeAlignmentEdgesFeature","roomSurfaceConnectors","surfaceConnector","getSurfaceConnector","addRoomAlignmentsForAlignmentEntity","onAddConnection","isPartOfDraggedHierarchy","onRemoveConnection","removeRoomAlignmentsForAlignmentEntity","onStartedDragging","draggedEntity","AlignmentLinesSystem$onStartedDragging$lambda","onStoppedDragging","clearDragged","isApplicableGuestEntity","get_isRoom","wallConnector","addedConnectors","tmp3_safe_receiver_0","oldTransform","removedConnectors","onRoomRebuild","room","AlignmentLinesSystem$enable$lambda","hierarchyMember","tagComponentId","horizontalAlignmentKeys","verticalAlignmentKeys","offeredTags","IsDraggedComponent_instance","getConnectorOldPosition","AlignmentLinesUtils$Companion$addVertical$lambda","$alignmentEntity","$atAlignmentEntityConnector","$ex","AlignmentLinesUtils$Companion$addHorizontal$lambda","AlignmentLinesUtils$Companion$removeHorizontal$lambda","$atConnector","AlignmentLinesUtils$Companion$removeVertical$lambda","alignmentEntity","atAlignmentEntityConnector","roomAlignments","alignmentLines","posWorld","atConnector","oldConnectorPosWorld","offers","localToParentTransform","posWS","tmp0_key","tmp2_transform","tmp3_priority","tmp4_tagArray","tmp5_offersArray","tmp6_activationDistance","IntersectionPointsTracker$addHorizontalLine$lambda","$closeY","IntersectionPointsTracker$addVerticalLine$lambda","$closeX","IntersectionPointsTracker$removeHorizontalLine$lambda","IntersectionPointsTracker$removeVerticalLine$lambda","closeY","closeX","surfaceConnectors","surfaceConnectorsOwnerEntity","surfaceConnectorKey","closestAlternative","createHorizontalAlignmentConnector","p1EntitySpace","p2EntitySpace","tmp2_rotation","createVerticalAlignmentConnector","localSurfaceVertices","tmp0_localToParentTransform","tmp1_priority","tmp2_tags","tmp3_offers","tmp4_activationDistance","posOwnerSpace","pointInConnectorSpace","newEdgeConnector","newPointConnector","horizontalConnector","edgeToRemove","removedPointConnector","AllowedDoorPairsComponent_init_$Init$","width1","width2","AllowedDoorPairsComponentFromInts","AllowedDoorPairsComponent_init_$Init$_0","AllowedDoorPairsComponentFromArrays","oneDoorWidth","secondDoorWidth","comSizeWidth","allowedDoorPairs","entityIsDoor","allowedToPlaceFrontOnFrame","allowedDoorPairsComponent","newDoor","existingDoors","findExistingDoorsOnFrame","allowedToPlaceFirstDoor","allowedToPlaceSecondDoor","firstDoor","secondDoor","firstDoorWidth","doorPhysicalWidth","_get_hostSubConnector__a6nvli","preExistingCache","autoAdaptCacheSystem","preExistingChildrenSystem","autoAdaptChildrenSystem","preExistingCleanCacheOnFinishedAutoAdaptSystem","cleanCacheOnFinishedAutoAdaptSystem","preExistingDisposeFailedChildrenSystem","disposeFailedChildrenSystem","AutoAdaptFeature_instance","AutoAdaptFeature_getInstance","snapToValidAutoAdaptedSnap","sortAndSelectStrategy","snapValidationResult","findWithAutoAdapt","triggerReplaceEvent","invalidSnapResult","originalParent","get_variantEntities","AutoAdaptService$findWithAutoAdapt$lambda","AutoAdaptService$findWithAutoAdapt$lambda_0","AutoAdaptService$findWithAutoAdapt$lambda_1","AutoAdaptService$findWithAutoAdapt$lambda_2","AutoAdaptService$findWithAutoAdapt$lambda_3","AutoAdaptService$findWithAutoAdapt$lambda_4","validSnapResult","AutoAdaptService$findWithAutoAdapt$lambda_5","autoAdaptedEntity","findWithAutoAdapt$default","restrictAllowedRequiredHostsOnVariant","originalGuest","canSnap","onlyValidSnap","snapResult","snapToValidSnap","includeSubConnectors","anyResult","snapsSorted","bestWarning","AutoAdaptService$snapToValidSnap$lambda","valid","AutoAdaptService$snapToValidSnap$lambda_0","snapToValidSnap$default","snapAndValidateVariant","possibleVariant","firstInvalidResult","snapAndValidateVariant$default","prepareVariantForSnapping","originalEntity","originalRootEntity","findWithAutoAdapt$combineInvalidResult","newFail","$guest","$host","$invalidSnapResult","$sortAndSelectStrategy","$anyResult","$bestWarning","$sortByWarnings","snapWithoutAutoAdaptResult","AutoAdaptUtils_getInstance","allHosts","findAllHostsContainingPointSortedBySize","findClosestHostContainingPoint","zone","rotatedPolyhedron","boundingBox_0","boundingBox_1","findAllHostsContainingPointSortedBySize$lambda","item_1","findClosestHost","testEntity","testPosition","AutoAdaptUtils$findClosestHost$lambda","testEntity_0","distance_0","AutoAdaptUtils$getAutoAdaptSnapCandidates$lambda","AutoAdaptUtils_instance","hierarchy","myHierarchy","autoAdaptHostComponent","get_hasAutoAdapted","get_autoAdaptOriginalEntity","hierarchyRoot","originalTransform","candidatesIncludingAlignments","get_variants","AutoAdaptChildrenSystem$PreferSameConnectorsStrategy$sortAndSelect$lambda","AutoAdaptChildrenSystem$PreferSameConnectorsStrategy$sortAndSelect$lambda_0","onPostSnapAutoAdaptVariant","getChildrenToResnap","childrenToResnap","reSnap","childInfo","originalChildEntity","AutoAdaptChildrenSystem$reSnap$lambda","realHost","preferredGuest","getPreferredGuestVariant","sortedCandidates","AutoAdaptChildrenSystem$reSnap$lambda_0","AutoAdaptChildrenSystem$reSnap$lambda_1","forceAutoAdapt","createChildInfo","originalEntityId","hostPartKey","$originalChildEntity","$validCandidate","AutoAdaptDisposeFailedChildrenSystem$onRemoveComponent$lambda","variantProductRefs","variantEntity","variants","actualVariants","cachedVariantsComponent","groupName","hostZone","specifications","snapOrAutoAdapt","draggedRoot","hoveredHost","sortAndSelect","loadModelOfValidVariant","updateDraggedComponents","foundEntityVariant","dragState","connectorsFromSpecifications","DragSurfaceCanHostWithAutoAdaptSelector$connectorsFromSpecifications$lambda","DragSurfaceCanHostWithAutoAdaptSelector$lambda","DragSurfaceCanHostWithAutoAdaptSelector$canProjectDragOn$lambda","specificationPair","requiredSystemEnabled","dragSurface","get_snappingGuestEntitiesSequence","childSequence","variantConnectorsSequence","snappedEntity","hasEntityChange","snapActionCandidateFromStartDrag","hasTransformChange","oldParentComponent","newParentComponent","drawLines","lineId","cleanLines","DebugLineDrawingSystem$onAddComponent$lambda","DebugLineDrawingSystem$onUpdateComponent$lambda","DebugLineDrawingSystem$onRemoveComponent$lambda","oldLineIds","newLines","shouldPrint","DoneEntry_instance","idForAdd","idForUpdate","idForRemove","calculateEndTransform","tmp1_originalParent","tmp2_initialTransform","tmp3_dragEndTransform","originalDraggedEntity","dragPoint","dragEndTransform","validDragStrategyResult","drawLinesForEntity","dragSurfaceComponent","drawNormals","drawSurfaceEdges","faceCenter","faceNormal","getSurfaceColor","createDebugSurfaces","allPolyhedrons","worldDragSurfacesComponent","createDragSurface","prevComponent","allowedToUpdate","_get_sceneManager__lxhb6y","_get_history__d61b7h","_get_state__b8zcm8","dragStart_0","updateDragState","addDragComponents","runDragStartOnStrategies","draggableRootEntity","DragSystem$addDragComponents$lambda","dragMove","DragSystem$dragMove$lambda","newDragState","runDragMoveOnStrategies","dragStop_0","DragSystem$dragStop$lambda","isDragStartedEarlier","runDragStopOnStrategies","worldTransformBefore","validSnap","dragStrategies","postProcessDragStrategy","_get_viewer__pq1i9z","updateGhost","createGhost","rootEntityTransform","DrawDragGhostSystem$createGhost$lambda","deltaTransform","DrawDragGhostSystem$createGhost$lambda_0","$scale","$deltaTransform","$rootNode","validResult","newCandidateResult","newValidResult","IsDraggedComponent_getInstance","get_isBeingDragged","_get_validationService__6mut63","snapsByDistance","FreeMoveComponent_instance","FreeMoveComponent_getInstance","currentHost","findSnapWhereEntityDoesNotCollide","testTransform","snapToAnythingSnapResult","hasConnectionThatDemandsContinuous","resolveCollisionFeatureTag","lastValidWorld","dragStrategyResult","tryLocalDirection","localDirection","dragDelta","hostConnectorWorld","dragDeltaProjectedLocally","candidatePosition","localProjectedCandidate","tmp8_elvis_lhs","lastValidWorldTransform","horizontalResult","verticalResult","sortedSnaps","includeAlignment","matchingSnapActionCandidates","snapCandidates","distanceToLastValidSnap","foundSnap","deltaRotation","distanceFromEndDragToSnap","isCloserThanLastValidSnap","findValidSnapAmongSubConnectors","findHoveredHost","SnapClosestWithSubConnectorsDragStrategy$findValidSnapAmongSubConnectors$lambda","dragResult","FrameComponent_getInstance","sortedSnaps_0","hasParentChange","CanvasTo3DDragConverterSystem_init_$Init$","projector","CanvasTo3DDragConverterSystemFromCoreServices","vectorFromGrabPointToDragPoint","grabPoint","dragRoot","get_dragProjectionPoint","sendDragEvent","currentlyDraggedEntity","adjustDragOffsetWhenRotationChanges","worldGrabOffset","getLocalGrabOffset","offsetRay","projectionHit","calculateEndTransform_0","moveDragEvent","grabOffsetComponent","localGrabOffset","findCurrentlyDraggedEntity","dragStateComponent","candidateSnapAction","realEntity","currentTransform","lastTransform","localZRotationDelta","oldOffset","newOffset","converter","outgoingConnections","DragSurfaceCanHostSelector$canProjectDragOn$lambda","guestConnectorSequence","_get_snappingGuestEntitiesSequence_$lambda_24h0hk","hasMatchingConnector","RoomConnectorConstants_getInstance","DragSurfaceOnlyRoomSelector$canProjectDragOn$lambda","get_isRoomPart","calculateCursorDelta","rotateDragPointCursorDelta","setEndTransform","sendEvent","checkIfWorldDragWasDetected","NoDragConverterDetector$checkIfWorldDragWasDetected$lambda","projectionPoint","Companion_instance_69","AnyDragSurfaceProjector_init_$Init$","dragSurfaceSelector","AnyDragSurfaceProjectorFromCoreServices","_get_cachedSurfacesEntity__1g8lxc","initCachedServiceEntity","getSurfaces","get_projectorSurfacesComponent","getRoomSurfaces","addSurfacesToCache","roomSurfaces","newSurfaces","newRoomSurfaces","selectDragPlane","bestDist","oldRayHit","surfaceEntity","surfacePlane","rayResult","tryToFindHitPointOutsideDragSurfaces","bestRoomHit","raycastAgainstRoom","currentExtendedDragPlaneHit","findRayHitByExtendingLastDragPlane","onlyHitRoom","onlyHitExtendedPlane","hitBothRoomAndExtendedPlane","roomEntity","roomPlane","lastDragPlane","addSurfaceIfExists","DragSurfaceUpdatesListenerSystem$enable$lambda","dragSurfacesChangedListener","entityHit","cameraNormal","entityPlane","frontDragPlane","backDragPlane","intersection","oobb","updateFunctionalMarginShape","meAndMyHierarchy","FunctionalMarginValidation$validate$lambda","snapRootHierarchy","FunctionalMarginValidation$validate$lambda_0","penetration","myColliders$delegate","FunctionalMarginValidation$validate$lambda_1","validate$lambda","validate$checkZoneCollisionWithMe","FunctionalMarginValidation$validate$checkZoneCollisionWithMe$ref","$myColliders$delegate","funcZone","pen","$snapRootHierarchy","$worldFuncZone","$meAndMyHierarchy","$warn","generateWarningsForAncestors","otherEntity","functionalMarginRule","zones","updateFunctionalZonesInWorldSpace","worldSpaceZonesComponent","setChildrenFromParents","productsData","childrenMap","childrenList","createIntegerIds","entityIdToIntId","tmp1_id","tmp2_children_ids","tmp3_parent_ids","dataForEntity","includedEntities","getParents","getParentIdsFromChildCompoment","getParentIdsFromConnections","allParentConnections","ICFDataService$getICFDataForEntities$lambda","$entitiesNotInScene","entityIds","entitiesInScene","entityIdsInScene","entitiesNotInScene","dataWithChildren","parents","parent_ids","children_ids","colliderDimensions","levelToThrowException","removeOutlineFromMembers","onStartedDragging_0","setBlockingOnEntity","onStoppedDragging_0","updateOutline","doOutline","outlineEntity","handleChildComponentChanged","handleChildComponentChanged_0","newChildComponent","handleOutlineRemoved","handleOutlineAdded","added","outlineEntity$setOutlined","doBlock","setBlockingOnEntity$setBlocking","$doOutline","$doBlock","moveTo","entityToMove","doPlacement","entityToPlace","tryFindValidSnap","placementResult","actualEntity","doPlacement$default","tryFindFirstValidSnapResult","tryAllHosts","tryFindValidSnap$default","allResults","AutoAdaptPlacementActor$tryFindFirstValidSnapResult$lambda","AutoAdaptPlacementActor$tryFindFirstValidSnapResult$lambda_0","goodResult","prevResult","nextResult","tryFindFirstValidSnapResult$default","AutoAdaptPlacementActor$tryAllHosts$lambda","AutoAdaptPlacementActor$tryAllHosts$lambda_0","AutoAdaptPlacementActor$tryAllHosts$lambda_1","AutoAdaptPlacementActor$tryAllHosts$lambda_2","tmp$ret$16","warningResult","failedResult","myResult","tmp$ret$31","tmp$ret$29","tmp$ret$27","tmp$ret$25","recommendationDistance","AutoAdaptPlacementActor$recommendationDistance$lambda","$entityToPlace","$allResults","autoAdaptService","initialPosition","trySnap","validSnaps","SpaceFinderUtils_getInstance","bestValidResult","bestValidCandidate","topCandidate","PlacementHelper_instance","PlacementHelper_getInstance","warningsAndErrors","placedEntity","get_logger","_init_properties_PlacementService_kt__rip640","noAutoAdaptServiceResult","autoAdaptToScene","autoAdaptToPosition","autoAdaptToTarget","canAutoAdapt","getInitialPosition","closeTo","recommendedPosition","autoAdaptToTargets","PlacementService$snapToTarget$lambda","PlacementService$snapToConnector$lambda","$guestConnectorKey","PlacementService$snapToConnector$lambda_0","$hostConnectorKey","PlacementService$dissolveEntity$lambda","PlacementService$replaceProductParts$lambda","_anonymous_parameter_1__qggqgd","ignoreWarnings","searchDirections","recommendedPos","snapExact","exactResult","entityAlignmentConnectorKey","targetAlignmentConnectorKey","rotationEulerDegrees","guestConnectorKey","hostConnectorKey","dissolvingEntity","dissolvingEntityParent","dissolvingEntityDescendants","entityToRemove","ReplaceUtils_instance","onReplace","ReplaceAssemblyPartUtils_getInstance","originalPosition","recommendedPosition$lambda","properties_initialized_PlacementService_kt_qk8kha","referencePoint","offsetZ","getNewPositionToTheSide","ownAabb","hostConnectorWorldSpaceRot","collisionValidationResult","prioritizeSolvingRoomCollisions","b_0","largest","SearchDirectionsUtils_instance","SearchDirectionsUtils_getInstance","findBestCandidatesInTarget","getSnapActionCandidates","getSnappingEntity","findBestSnap","addedEntity","failDueToNoSnaps","validate_1","validatedCandidates","bestSoFar","cr","best","findBestValidPositionOnConnector$default","performSnapAction","candidateResult","getAlignmentCandidatesThatResolvesCollision","failedCandidateResult","findBestValidPositionOnConnector","failed","triedPositions","SnapPlacementActor$findBestValidPositionOnConnector$lambda","validAlignments","localBest","findNewPositionThatMightSatisfyFailedResult","destination_4","newCandidate","newResults","destination_5","moveToPosition","snapAction","SnapPlacementActor$snapToTargets$lambda","$snapActionCandidates","$level","alignmentCandidates","foundAlignedCandidates","aPrio","bPrio","recommendationDistance_0","RecommendedDistanceFromFloorCriterion$recommendationDistance$lambda","aDist","bDist","bestResult","SnapSorter$sortResults$lambda","SnapSorter$sortCandidates$lambda","sortCriteria","failingBestSoFar","sortCriterion","filterCriterion","aSnap","bSnap","aWarnings","bWarnings","SpaceFinderUtils$getNewValidCandidatesOnSameConnectorsUsingSearchDirections$lambda","SpaceFinderUtils$getNewValidCandidatesOnSameConnectorsUsingSearchDirections$lambda_0","SpaceFinderUtils$getNewCandidatesOnSameConnectorUsingSearchDirections$lambda","$candidateWithContinuousHost","SpaceFinderUtils_instance","originalSnaps","testedHostConnectors","searchDirectionCandidates","invalidSnaps","originallyValidSnaps","tmp$ret$21","collisionValidation","tmp$ret$23","isCandidateForSearchDirections","newCandidates","item_2","validatedSearchDirectionSnaps","candidateWithContinuousHost","directionConnectorSpace","entityCollidedWith","extraSizeMultiplesMovedOut","guestWorld","hostWorld","sizeWorldSpace","hostConnectorWorldTransform","sizeHostConnectorSpace","guestPositionInHostConnectorSpace","collidedSizeLocalSpace","collidedSizeWorldSpace","collidedSizeConnectorSpace","diffBetweenEntities","signMove","moveToSamePosition","moveDueToOwnSize","extraSizeMultiplesMovedOutVector","moveWorldSpace","worldSpacePosition","collisionResult","RoomComponent_instance","iterationsOnSide","leftPos","leftSidePositions","rightPos","rightSidePositions","forwardPos","forwardSidePositions","backwardPos","backSidePositions","overridePosition","ignoreSamePosition","guestEndTransformWorld","guestConnectorHostSpacePos","transformedSizeWorld","transformedSizeHostLocal","sizeAlongHostConnector","incrementHostSpace","incrementLocalSpace","isOnConnector","posWorldSpace","rightGuestSpace","forwardGuestSpace","moveAmountRight","moveAmountForward","incrementWorldSpace","incrementLocalSpace_0","isOnConnector_0","posWorldSpace_0","colliderBox","demands","Companion_getInstance_70","proppingHostConnectors","get_proppingHostConnectors","get_proppingHostEntitiesInHierarchy","propHoldingEntity","proppingHostConnector","propHolderInfos","propping","oldPropping","shapeComponent","getPropHolderInfo","getPropping","setPropping","setProppingProperty","setPropping$lambda","clearOldPropping","getColliderBox","getOldPropping","setOldPropping","setOldPropping$lambda","removePropping","currentPropping","clearOldPropping$lambda","restoreOldPropping","getShapeComponent","proppingComponent","propHolderInfoIndex","newPropHolderInfo","newPropHoldInfos","$propping","$oldPropping","proppingSystem","onStartedDragging_1","draggedHierarchy","onDragMove","movedPolyhedron","movedHierarchy","propInfo","onStoppedDragging_1","theEntityThatWasDraggedIsNoLongerInScene","propInfo_0","handleAddedEntityToScene","getProppingCollidingWithEntity","needToUpdatePropping","onDisconnect","clearProps","entityHierarchy","ProppingSystem$lambda$lambda","ProppingSystem$lambda","mappedProps","proppingCatalog","ProppingUtils_instance","propHolderInfo","createAndAddPropping","proppingHostConnectorData","propInfoBefore","oldProppingBefore","wantToAddBackOldPropping","adjustToHangDown","newPropping","localRot","parentRotation","rotationAroundY","newLocalRot","adjustment","newLocalPos","addProppingColliders","proppingHostEntity","removeProppingColliders","ProppingUtils$removeProppingColliders$lambda","$colliderBox","$shapeComponent","demandToProppingData","snappable","demand","demandKeys","demandToProppingMap","proppingsAvailableForDemand","sceneEntities","proppingHolders","$l$block_6","potentialProppingsThatFit","selectedPropping","allSizes","heightProppingForSize","newInfoComponent","handleEntityAddedToScene","SetProppingHostConnectorDataSystem$handleEntityAddedToScene$lambda","subHostConnector","DoorComponent_instance","DoorFrontComponent_instance","DrawerComponent_instance","DrawerComponent_getInstance","FrameComponent_instance","HandleComponent_instance","IncludedHandleComponent_instance","IncludedHandleComponent_getInstance","LegComponent_instance","LegComponent_getInstance","rollbackAndCollectFailedResult","replacePartsResult","failedReplaces","ent","findPart","internalCreateActionForReplaceProductPart","getAssemblyStructure","assemblyStructure","findPartAndParentPart$default","tmp3_container","parentPart","ReplaceAssemblyPartUtils$internalCreateActionForReplaceProductPart$lambda","createRemovePartAction","createReplacePartAction","createAddPartAction","connectionRootProductRef","oldAssemblySpecification","structureFromSpecification","replaceAction","AddPartAction$rollback$ref","ReplacePartAction$rollback$ref","removePartAction","RemovePartAction$rollback$ref","findPartAndParentPart","ReplaceAssemblyPartUtils$replaceProductParts$lambda","ReplaceAssemblyPartUtils$createActionForReplaceProductPart$lambda","$msg","$partKey","$connectionRoot","ReplaceAssemblyPartUtils_instance","replacePartsResults","validReplaceResults","originalPart","notSameProduct","newPart","rollback","Companion_getInstance_77","replacedEntityResult","childrenResult","replaceEntityInternal","doItFast","hostedEntitiesBeforeReplace","mainResult","validateChildren","childrenBeforeReplace","hostedEntitiesAfterReplace","existsAfterReplace","ReplaceUtils_getInstance","serializationKey","RoomConnectorConstants_instance","CoreRoomGeometryData_init_$Create$","CoreRoomGeometryData_init_$Init$","walls","ceiling","obstacles","CoreRoomSurface_init_$Create$","CoreRoomSurface_init_$Init$","surfaceGeometry","RoomSurfaceGeometryImpl_init_$Create$","RoomSurfaceGeometryImpl_init_$Init$","tmp9_input","CoreRoomEdge_init_$Create$","CoreRoomEdge_init_$Init$","surfaceId1","surfaceId2","CoreRoomVertex_init_$Create$","CoreRoomVertex_init_$Init$","CoreRoomObstacle_init_$Create$","CoreRoomObstacle_init_$Init$","CoreRoomBoundingBox_init_$Create$","CoreRoomBoundingBox_init_$Init$","getOrCreateConfigEntity","addDisabledConnector","_get_disabledRoomConnectorsConfigComponent__5usulp","removeDisabledConnector","generateDisabledConnectorsComponent","disabledRoomConnectorsComponent","actualRoom","disabledRoomConnectors","generateDisabledConnectorsComponent$default","RoomService$getRoom$lambda","oldRoom","room_0","coreRoomGeometryData","roomGeometryData","floorConnectors","floorConnector","allConnectors","normalizedNormal","roomConnectorRelations","safeRoom","disabledConnectorsComponent","RoomComponent_getInstance","filterConnectors","connectorsFromSurfaceKey","connectorsFromEdgeKey","connectorsFromCornerKey","roomConnectors","relatedToSurface","relatedToEdge","relatedToCorner","surfaceKey","edgeKeys","cornerKeys","edgeKey","surfaceKeys","cornerKey","RoomDimensionsComponent$Companion$serializer$lambda","RoomDimensionsComponent_init_$Create$","RoomDimensionsComponent_init_$Init$","RoomGeometryComponent$Companion$serializer$lambda","RoomGeometryComponent_init_$Create$","RoomGeometryComponent_init_$Init$","oldComponents","component_0","createGeometry","Companion_instance_115","removeOldData","RoomSystem$removeOldData$lambda","addStandardRoomComponents","generateRoom","roomGeometryComponent","roomGeometry","colliders","generateColliders","connectorComponents","generateConnectors","generateObstacleEntities","colliderIds","obstaclePolyhedron","obstacleEntity","generateWallColliders","floorPolyhedron","ceilingPolyhedron","generatedWallConnectors","Companion_instance_118","generatedEdgeConnectors","generatedPointConnectors","ceilingConnector","Companion_instance_117","connectorMappings","roomService","newRoomGeometryComponent","RoomColliderUtilities$Companion$generateWallColliders$lambda","RoomColliderUtilities$Companion$generateWallColliders$lambda_0","RoomColliderUtilities$Companion$generateWallColliders$lambda_1","$wall","Companion_instance_116","generatedColliders","wall","convertedData","collectRoomConnectorsForCorner","cornerToSurface","cornerToEdge","collectRoomConnectorsForEdge","edgeToSurface","edgeToCorner","collectRommConnectorsForSurface","surfaceToEdge","surfaceToCorner","addConnector","mapSet","surfacesPairs","edgePairs","cornerPairs","cornerGeometry","surfaceCorners","edgeConnectorKey","cornerConnector","edgeGeometry","cornersForEdge","surfaceToConnectorsMap","edgeToConnectorsMap","cornerToConnectorsMap","includesSurfaceWithNormal","generateOfferStringForFloorCornerAngle","surfaceGeometries","normal_0","pickWallsInOrder","firstWall","secondWall","degreeInt","positiveAngle","wall1","wall2","wall1NextVertex","nextVertexFrom","surfacesForThisEdge","floorGeometryData","tmp2_offersArray","tmp3_demandsArray","tmp5_vertices","ceilingGeometryData","forwards","upwards","edgeRotation","surfacesForThisPoint","isCeiling","offerForCornerAngle","pointNormal","connectorUp","roomUp","pointRotation","connectorTransform","meanNormal","validateAndFixNoCollinearPointsInSurface","originalSurface","RoomGeometryUtilities$Companion$validateAndFixNoCollinearPointsInSurface$lambda","validatePlanarSurface","coreRoomSurface","convertId","oldId","convertFromPoint3DToVector","RoomGeometryUtilities$Companion$interfaceFormatToInternalFormat$lambda","Companion_instance_119","allWallSurfaces","allSurfaces","backRightCeiling","frontRightCeiling","rightWallVertices","rightWall","backLeftCeiling","backWallVertices","backWall","frontLeftCeiling","leftWallVertices","leftWall","frontWallVertices","frontWall","floorVertices","ceilingVertices","backEdge","leftEdge","rightEdge","frontEdge","backCeilingEdge","leftCeilingEdge","rightCeilingEdge","frontCeilingEdge","backLeftVertex","backRightVertex","tmp$ret$35","frontRightVertex","tmp$ret$41","frontLeftVertex","tmp$ret$47","backLeftCeilingVertex","tmp$ret$53","backRightCeilingVertex","tmp$ret$59","frontRightCeilingVertex","tmp$ret$65","frontLeftCeilingVertex","tmp$ret$75","convertedWalls","inputRotation","inputPosition","tmp$ret$20","inductionVariable_4","last_4","inductionVariable_5","last_5","convertedFloor","inductionVariable_6","last_6","item_3","tmp$ret$26","convertedCeiling","inductionVariable_7","last_7","item_4","tmp$ret$30","convertedEdges","destination_6","inductionVariable_8","last_8","item_5","destination_7","inductionVariable_9","last_9","item_6","tmp$ret$34","destination_8","inductionVariable_10","last_10","item_7","tmp$ret$38","tmp$ret$42","convertedVertices","multiSelect","StandardSelectionSystem_init_$Init$","StandardSelectionSystemFromCoreServices","onClickNothing","onEntityClicked","selectableRootEntity","onEntityReplaced","onEntityDeleted","onEntitySelected","Companion_instance_120","StandardSelectionSystem$onEntityDeleted$ref","StlSystemIds_instance","StlSystemIds_getInstance","Companion_instance_121","simulateEntireDragInSteps","simulateEntireDrag","simulateStartDrag","simulateOngoingDrag","simulateEndDrag","totalDelta","rayFromMiddleOfRoomToDragPoint","defaultCamPos","defaultRay","roomDimensions","middleOfRoom","tmp1_this","ViewerDragState_instance","ViewerDragState_getInstance","simulateEntireViewerDragInSteps","localGrabPoint","worldCameraPosition","simulateViewerStartDrag","simulateViewerOngoingDrag","simulateViewerEndDrag","tmp0_this","Companion_instance_122","validate_2","oldestAncestorWithComponent","currentChildrenWithComponent","countDescendantsWithComponent","interestingChild","countEntitiesInHierarchyWithComponent","totalChildrenWithComponent","sum_0","ancestorWithComponent","hostComponentId","childComponentId","allowedChildrenCnt","Companion_instance_123","validate_3","requiredConnections","firstRequiredHostRoot","DisallowSeparateRequiredHostsValidation$_init_$ref_9l13xe","Companion_instance_124","Companion_instance_125","validate_4","worldY","placementZoneRule","Companion_instance_126","validate_5","hasRequiredConnectors","RequiredConnectorsSatisfiedValidation$validate$lambda","hostCandidate","failedConnectors","Companion_instance_127","RequiredConnectorsValidationResult$toString$lambda","validationResult","ValidationResultIds_instance","ValidationResultIds_getInstance","ValidationRuleIds_instance","ValidationRuleIds_getInstance","toggle","setEnabled","setEnabled$default","colliderVisualizer","connectorVisualizer","Companion_getInstance_124","$l$block_4","tmp$ret$36","$l$block_7","tmp$ret$46","$l$block_8","element_8","tmp_37","tmp_38","tmp_39","tmp$ret$51","$l$block_9","element_9","tmp_40","tmp_41","tmp_42","tmp_43","tmp$ret$56","$l$block_10","element_10","tmp_44","tmp_45","colliderVisualizationEnabled","visualizeAllColliders","collisionVisualizationEnabled","connectorVisualizationEnabled","visualizeAllConnectors","connectorActivationDistanceVisualizationEnabled","connectorTransformVisualizationEnabled","functionalMarginVisualizationEnabled","autoAdaptHostZoneVisualizationEnabled","dragSurfaceNormalVisualizationEnabled","dragProjectionPointVisualizationEnabled","functionalZoneVisualizationEnabled","debugLineDrawingSystem","dragSurfaceVisualizationSystem","Companion_instance_128","includeRoom","Companion_instance_129","collidingBoundIds","Companion_instance_130","Companion_getInstance_106","viewerObjets","Companion_instance_131","Companion_instance_132","offersFilter","demandsFilter","Companion_instance_133","Companion_getInstance_109","Companion_instance_134","placeholder","decorator","modelVisible","decoratorVisible","Companion_instance_135","isGenerated","Companion_instance_136","Companion_instance_137","Companion_instance_138","Companion_instance_139","Companion_instance_140","Companion_getInstance_116","Companion_instance_141","Companion_getInstance_117","functionalZonesComponent","Companion_instance_142","Companion_getInstance_118","_get_viewer__pq1i9z_0","createAllVisualizations","createPolyhedronVisualization","clearVisualizationEntities","clearEntityHierarchy","hasHolderComponent","createHolderEntity","createPolyhedronVisualization$default","visualizerHolder","createPolyhedronVisualization_0","createPolyhedronVisualization_2","createPolyhedronVisualization_1","vectorFaces","setTransparency","viewerObjects","Companion_instance_143","Companion_getInstance_119","wasEnabled","$showActivationDistance","$showTransform","setEnabledFeatures","activationDistanceActivate","transformActivate","Companion_instance_144","showActivationDistance","showTransform","Companion_getInstance_120","generateColliderShapeBounds","createVisualization","Companion_instance_145","id_0","viewerObject_0","_get_sceneManager__lxhb6y_0","hasNoVisualization","hasNewVisualizationData","colliderVisualizationData","_get_colliderVisualizationNode__i436cf","currentVisualizationNodeData","newVisualizationNodeData","generateNodeData","addDecoration","polyhedronDecorator","updateDecoration","removeDecoration","findVisualizerHolder","componentsChanged","colliderComponent","visualizationComponent","updateColors","Companion_getInstance_121","wasAColliderVisualizationNode","entityWasRemoved","shouldRemoveVisualization","oldParentViewerObject","Companion_instance_146","Companion_getInstance_122","collisionMap","_get_sceneManager__lxhb6y_1","_get_collisionData__2ruset","detectCollision","foldCollisions","collisionsWithoutEntity","entityCollisions","Companion_instance_150","newCollisions","applyCollisions","addColliderVisualizationComponent","foldCollisions$default","clearCollisions","boundIds","Companion_instance_147","Companion_getInstance_123","boundId","generateConnectorsDecorator","visualizationData","filteredConnectors","getFilteredEnabledConnectors","createConnectorViewerObject","enabledConnectors","EntityConnectorVisualizationSystem$Companion$runOnDecoratable$lambda","runner","hasNoVisualization_0","hasNewVisualizationData_0","connectorVisualizationData","_get_connectorVisualizationNode__spb9ou","generateNodeData_0","addDecoration_0","visualizationHolder","connectorsDecorator","removeDecoration_0","findVisualizerHolder_0","updateDecoration_0","componentsChanged_0","EntityConnectorVisualizationSystem$componentsChanged$lambda","Companion_instance_148","wasAConnectorVisualizationNode","addConfigComponentToEntities","ForcedComponentBaseSystem$addConfigComponentToEntities$lambda","addConfigComponentToEntities$default","removeConfigComponentFromEntities","configComponent","removeConfigComponentFromEntity","removeConfigComponentFromEntities$default","removeConfigComponentFromEntity$default","refreshComponentOnEntity","forcedComponent","isNew","otherBoundId","setBaseColor","setCollideColor","setTransparency_0","getColorSeed","createCube","setRandomColor","createLine","Companion_instance_149","Companion_getInstance_125","DefaultVisualizer$defaultOnConnectorClick$lambda","DefaultVisualizer$createPointConnector$lambda","DefaultVisualizer$createUnknown$lambda","transformModel","colliderVis","subConnectors","viewerObj","colorSeed","random","getCollisionsForEntity","getWorldCollision","VisualizerUtils$Companion$getCollisionsForEntity$lambda","VisualizerUtils$Companion$getWorldCollision$lambda","getBoundCollisions","collisionPairs","otherCollisionPairs","tmp1_0","createWorldColliderShapePairs","VisualizerUtils$Companion$getCollisions$lambda","$root","$worldPolyhedron","Companion_getInstance_126","$com$ikea$core$stl","$com$ikea$core$stl$alignment","$com$ikea$core$stl$alignmentlines","$com$ikea$core$stl$alloweddoorpairs","$com$ikea$core$stl$assemblyinstructions","$com$ikea$core$stl$autoadapt","$com$ikea$core$stl$autoadapt$autoadaptchildren","$com$ikea$core$stl$autoadapt$component","$com$ikea$core$stl$autoadapt$drag","$com$ikea$core$stl$debug","$com$ikea$core$stl$dragging","$com$ikea$core$stl$dragging$dragstrategy","$com$ikea$core$stl$dragging$viewerDragConversion","$com$ikea$core$stl$dragging$viewerDragConversion$component","$com$ikea$core$stl$dragging$viewerDragConversion$projector","$com$ikea$core$stl$functionalmargins","$com$ikea$core$stl$functionalzones","$com$ikea$core$stl$icf","$com$ikea$core$stl$label","$com$ikea$core$stl$logging","$com$ikea$core$stl$outlines","$com$ikea$core$stl$placement","$com$ikea$core$stl$placement$snapsorting","$com$ikea$core$stl$placement$utils","$com$ikea$core$stl$propping","$com$ikea$core$stl$range","$com$ikea$core$stl$replace","$com$ikea$core$stl$room","$com$ikea$core$stl$room$component","$com$ikea$core$stl$room$interceptor","$com$ikea$core$stl$room$system","$com$ikea$core$stl$room$utils","$com$ikea$core$stl$selection","$com$ikea$core$stl$system","$com$ikea$core$stl$test","$com$ikea$core$stl$validation","$com$ikea$core$stl$visualization","$com$ikea$core$stl$visualization$component","$com$ikea$core$stl$visualization$polyhedron","$com$ikea$core$stl$visualization$system","$com$ikea$core$stl$visualization$visualizer","kotlin_core_core_stl","CustomSerializer","AutoAdaptGroup","CustomSerializer_getInstance","DynamicComponentResolver","DynamicProduct","DynamicProductCatalog$generateAssemblyComponents$1","DynamicProductCatalog","PackedProductData","DynamicProductData","DynamicTemplateData","PackedProduct","ProductTemplate","MetaDataComponent","VisualLightSourceComponent","Bounds","CatalogTemplateData","ModelRenderInfo","Part","TemplateEditorConnectorData","ProductTemplateDTO","TemplateEditorService$runOnFilteredSceneEntities$1$1$1$1","TemplateEditorService","DynamicProductSpecifier","DynamicComponentBuilder","DynamicAssembly","DynamicShape","AssemblyChild","AssemblyTemplate","CustomSerializer_0","AutoAdaptHostTemplate","CustomSerializer_getInstance_0","BoundItemTemplate","Compartment","ComponentsTemplate","ConnectorItemTemplate","DragSurfaceTemplate","$serializer_getInstance_17","CustomSerializer_1","DragSurfacesTemplate","CustomSerializer_getInstance_1","DynamicRangeUtils","LightTemplate","$serializer_getInstance_18","MarginTemplateSerializer","MarginTemplate","MarginTemplateSerializer_getInstance","Model3DTemplate","$serializer_getInstance_19","CustomSerializer_2","OriginTemplate","CustomSerializer_getInstance_2","PlacementZoneByHeightTemplate","$serializer_getInstance_20","PositionTemplateSerializer","PositionTemplate","PositionTemplateSerializer_getInstance","$serializer_17","VisualLightSourceTemplate","$serializer_getInstance_21","$serializer_18","ProductStructureConnectionTemplate","$serializer_getInstance_22","$serializer_19","ProductStructureItemTemplate","$serializer_getInstance_23","OriginRelativeTo","OriginRelativeToImpostor","PositionType","PositionTypeImpostor","$serializer_20","PositionValue","$serializer_getInstance_24","RelativePosition","RelativeTransformSerializer","RelativeTransform","RelativeTransformSerializer_getInstance","NamedTransformObjectDeserializer","RelationOriginSerializer","RelativeTransformDeserializer","RotationDegreeOfFreedomSerializer","DynamicRangeParseError","SizeSerializer","SpacingSerializer","CatalogGenerator","parseMeta$result$1","CustomSerializer_instance","$this$run","modelRenderInfo","dynamicProduct","DynamicComponentResolver$builder$lambda","$templateId","DynamicComponentResolver$builder$lambda_0","catalog","productInfo","productTemplate","template","tmp11_local7","tmp12_local8","tmp13_local9","tmp14_local10","tmp15_input","tmp16_cached","DynamicProduct_init_$Create$","DynamicProduct_init_$Init$","dexf","modelURI","typeCode","partsInPackage","autoAdaptGroup","dexfAssetName","DynamicProductCatalog$Companion$jsonParser$lambda","getProductInfo","productId","parseTemplates","templates","resolveTemplateInheritance","resolved","unresolved","resultingTemplate","extended","unresolvedExtended","parseInfo","parseAndAddPackage","$assemblyComponents","productInfoJson","templatesJson","interceptor","productJson","productsJson","packedJson","originalDynamicProduct","oldParts","templateForOldPart","oldPartsTemplates","tmp2_elvis_lhs_0","templateForNewPart","tmp3_elvis_lhs_0","oldPartWithSameTemplate","replaceMap","assemblyJson","templateChildren","assemblyComponents","tmp10_cached","PackedProductData_init_$Create$","PackedProductData_init_$Init$","schemaVersion","rangeVersion","assetSource","DynamicProductData_init_$Create$","DynamicProductData_init_$Init$","DynamicTemplateData_init_$Create$","DynamicTemplateData_init_$Init$","PackedProduct_init_$Create$","PackedProduct_init_$Init$","ProductTemplate_init_$Create$","ProductTemplate_init_$Init$","inherits","templateData","overrideSize","getConnectorsForSize","parseMeta","colorTemperature","Bounds$Companion$parse$lambda","jsons","Bounds_init_$Create$","Bounds_init_$Init$","tmp14_input","tmp15_cached","CatalogTemplateData_init_$Create$","CatalogTemplateData_init_$Init$","isExterior","isInterior","ModelRenderInfo_init_$Create$","ModelRenderInfo_init_$Init$","Part_init_$Create$","Part_init_$Init$","included","tmp15_local11","tmp16_local12","tmp17_input","tmp18_cached","ProductComponent_init_$Create$","ProductComponent_init_$Init$","dexfId","productGroup","active","generateConnectorsData","TemplateEditorService$Companion$generateConnectorsData$lambda","$template","runOnFilteredSceneEntities","templateIds","TemplateEditorService$runOnFilteredSceneEntities$lambda","_get_templateDataSafe__803856","TemplateEditorService$visualizeConnectors$lambda","$it","TemplateEditorService$visualizeConnectors$lambda_0","TemplateEditorService$visualizeConnectors$lambda_1","TemplateEditorService$selectConnector$lambda","TemplateEditorService$selectConnector$lambda_0","TemplateEditorService$openTemplate$lambda","TemplateEditorService$updateConnectors$lambda$lambda","TemplateEditorService$updateConnectors$lambda","$group","TemplateEditorService$addConnector$lambda$lambda","TemplateEditorService$addConnector$lambda","$connectorItemTemplate","$data","$updateScene","TemplateEditorService$updateConnector$lambda$lambda","TemplateEditorService$updateConnector$lambda","TemplateEditorService$renameConnector$lambda","$connectorName","$newConnector","$newConnectorName","TemplateEditorService$deleteConnector$lambda","TemplateEditorService$updateSceneWithBounds$lambda","$entities","getPolyhedronForSize","TemplateEditorService$updateSceneWithConnectors$lambda","$templateData","$templateIds","TemplateEditorService$runOnTemplate$lambda","TemplateEditorService$runOnEntitiesBasedOn$lambda$lambda","TemplateEditorService$runOnEntitiesBasedOn$lambda","TemplateEditorService$initializeFromCatalog$lambda","$templateComponent","dynamicCatalog","isDirty","boundsTemplate","updateScene","connectorsTemplate","connectorItemTemplate","connectorName","newConnectorName","createModelInfoComponent","overrideComponent","keep","productSpecification","descriptiveName","componentsTemplate","filteredComponents","DynamicComponentBuilder$componentsFromTemplate$lambda","tmp1_safe_receiver_1","doorPairs","tmp$ret$32","tmp11_safe_receiver","tmp13_safe_receiver","tmp14_safe_receiver","tmp16_elvis_lhs","tmp15_elvis_lhs","mergedMeta","tmp17_elvis_lhs","tmp18_safe_receiver","dragSurfaces","tmp19_safe_receiver","tmp20_safe_receiver","sizeAABB","tmp$ret$54","tmp0_safe_receiver_4","tmp$ret$52","tmp1_safe_receiver_2","tmp0_safe_receiver_5","tmp$ret$60","getBoundIds","extractHash","AssemblyChild_init_$Create$","AssemblyChild_init_$Init$","catalogParts","catalogSize","generatorPartIndex","generatorPart","childCatalogSize","tmp2_container","transform_0","assemblyPart_0","AssemblyTemplate_init_$Create$","AssemblyTemplate_init_$Init$","extendedAssembly","combinedChildren","CustomSerializer_instance_0","BoundItemTemplate$Companion$descriptor$lambda","dimension","enc","sourceTemplateId","tmp4_width","tmp5_height","tmp6_depth","tmp1_width","tmp2_height","tmp3_depth","inherit","extendedBounds","Compartment$Companion$descriptor$lambda","primary","secondary","tmp17_local13","tmp18_local14","tmp19_local15","tmp20_local16","tmp21_local17","tmp22_local18","tmp23_local19","tmp24_local20","tmp25_local21","tmp26_local22","tmp27_local23","tmp28_local24","tmp29_local25","tmp30_local26","tmp31_local27","tmp32_local28","tmp33_local29","tmp34_local30","tmp36_input","tmp37_cached","ComponentsTemplate_init_$Create$","ComponentsTemplate_init_$Init$","functionalZones","outlineable","autoAdaptHost","communicationSize","door","doorFront","drawer","leg","alwaysHangDown","serializeEntity","placementZoneByHeight","functionalMargin","recommendedInitialPositionFromFloor","visualLightSource","model3D","dragProjectionPoint","productStructure","extendedComponents","inherit_0","tmp12_elvis_lhs","tmp14_elvis_lhs","tmp18_elvis_lhs","tmp19_elvis_lhs","tmp20_elvis_lhs","tmp21_elvis_lhs","tmp22_elvis_lhs","tmp23_elvis_lhs","tmp24_elvis_lhs","tmp25_elvis_lhs","tmp26_elvis_lhs","tmp27_elvis_lhs","tmp28_elvis_lhs","tmp29_elvis_lhs","tmp30_elvis_lhs","ConnectorItemTemplate$Companion$descriptor$lambda","elementSerializer_0","elementSerializer_1","elementSerializer_2","_get_allPositions__bakiw2","_get_firstPosition__de1tzc","createConnector","tmp5_key","tmp6_transform","tmp7_activationDistance","tmp8_priority","tmp3_subject","tmp9_rotationalDegreeOfFreedom","tmp10_required","pointConnector","createRepositionedConnector","createSeriesConnector","seriesConnector","createEdgeConnector","edgeConnector","createSurfaceConnector","ConnectorItemTemplate$createSurfaceConnector$lambda","ConnectorItemTemplate$createSurfaceConnector$lambda_0","aabbFromSize","addTags","addConnectorTags","templateRef","convertMagicLabels","labels","requireUpwardParent","requireDownwardParent","rotationDegreeOfFreedom","$plane","$point","OriginRelativeTo_SIZE_getInstance","mutablePositions","OriginRelativeTo_BOUND_getInstance","applyLabels","getConnectorsForSize$lambda","extendedConnectors","$connectorItem","$comSize","$family","$templateRef","calculateAxis","Dimension$Companion$descriptor$lambda","Dimension$lambda","Dimension$lambda_0","Dimension$lambda_1","_init_properties_DragSurfaceTemplate_kt__pafc5d","createPolyhedronFromVertices","absoluteVertices","DragSurfaceTemplate_init_$Create$","DragSurfaceTemplate_init_$Init$","DragSurfaceTemplate$generateDragSurface$lambda","DragSurfaceTemplate$generateDragSurface$lambda_0","tmp2_width","tmp3_height","tmp4_depth","CustomSerializer_instance_1","sameAsCollider","polyhedronForSurfaces","properties_initialized_DragSurfaceTemplate_kt_d8qnnn","DynamicRangeUtils$Companion$StrictPretty$lambda","DynamicRangeUtils$Companion$AssemblyPretty$lambda","DynamicRangeUtils$Companion$createConnector$lambda","connectorJson","tmp0_top","tmp1_bottom","tmp2_left","tmp3_right","tmp4_front","tmp5_back","LightTemplate_init_$Create$","LightTemplate_init_$Init$","encodeNonZeroDoubleElement","MarginTemplate$MarginTemplateSerializer$descriptor$lambda","MarginTemplateSerializer_instance","Model3DTemplate_init_$Create$","Model3DTemplate_init_$Init$","modelRootURL","parseRelativeTo","parseAndCatch","OriginTemplate$CustomSerializer$parseRelativeTo$lambda","parseOrigin","OriginTemplate$CustomSerializer$parseOrigin$lambda","parseSimpleOrigin","OriginTemplate$CustomSerializer$parseSimpleOrigin$lambda","OriginTemplate$CustomSerializer$jsonParser$lambda","RelationOriginSerializer_getInstance","OriginTemplate$CustomSerializer$descriptor$lambda","CustomSerializer_instance_2","relation","PlacementZoneByHeightTemplate_init_$Create$","PlacementZoneByHeightTemplate_init_$Init$","parseOrigin_0","PositionTemplate$PositionTemplateSerializer$parseOrigin$lambda","parseRelativeTransform","PositionTemplate$PositionTemplateSerializer$parseRelativeTransform$lambda","parseRelativeTransformAsArray","PositionTemplate$PositionTemplateSerializer$parseRelativeTransformAsArray$lambda","PositionTemplate$PositionTemplateSerializer$jsonParser$lambda","RelativeTransformDeserializer_instance","NamedTransformObjectDeserializer_instance","PositionTemplate$PositionTemplateSerializer$descriptor$lambda","PositionTemplate_init_$Init$","RelativeTransformFromVector","PositionTemplateFromString","PositionTemplateSerializer_instance","comp_0","comp_1","PositionTemplate$absoluteTransform$delegate$lambda","absoluteTransform$factory","$serializer_instance_17","VisualLightSourceTemplate_init_$Create$","VisualLightSourceTemplate_init_$Init$","$serializer_instance_18","ProductStructureConnectionTemplate_init_$Create$","ProductStructureConnectionTemplate_init_$Init$","$serializer_instance_19","ProductStructureItemTemplate_init_$Create$","ProductStructureItemTemplate_init_$Init$","OriginRelativeTo$Companion$_anonymous__8s7o4e","OriginRelativeTo_BOUND_instance","OriginRelativeTo_SIZE_instance","OriginRelativeTo_initEntries","OriginRelativeTo_entriesInitialized","OriginRelativeToImpostor_instance","OriginRelativeToImpostor_getInstance","PositionType_ABSOLUTE_instance","PositionType_PERCENTAGE_RELATIVE_SIZE_instance","PositionType_initEntries","PositionType_ABSOLUTE_getInstance","PositionType_PERCENTAGE_RELATIVE_SIZE_getInstance","PositionType_entriesInitialized","PositionTypeImpostor_instance","PositionTypeImpostor_getInstance","$serializer_instance_20","PositionValue_init_$Create$","PositionValue_init_$Init$","RelativePosition$Companion$descriptor$lambda","RelativePosition_init_$Init$","RelativePositionFromPosition","_get_hasAnyPercentage__wplq75","RelativePosition$getAbsolutePosition$lambda","RelativeTransform_init_$Init$","RelativeTransformSerializer_instance","rotationEuler","getPositionValue","getDegrees","jo","NamedTransformObjectDeserializer_getInstance","RelationOriginSerializer_instance","RelativeTransformDeserializer_getInstance","RotationDegreeOfFreedomSerializer_instance","RotationDegreeOfFreedomSerializer_getInstance","get_logger_0","_init_properties_Serializers_kt__wkoiy7","logger_0","errorMsg","parseCallback","parseAndCatch$lambda","$errorMsg","properties_initialized_Serializers_kt_i0ph73","SizeSerializer_instance","SizeSerializer_getInstance","SpacingSerializer_instance","jsonDecoder","SpacingSerializer_getInstance","sizeStr","componentsStr","inheritsStr","templatsStr","productsStr","$com$ikea$range","$com$ikea$range$dynamic","$com$ikea$range$dynamic$catalog","$com$ikea$range$dynamic$components","$com$ikea$range$dynamic$productdata","$com$ikea$range$dynamic$service","$com$ikea$range$dynamic$shape","$com$ikea$range$dynamic$template","$com$ikea$range$dynamic$template$hierarchy","$com$ikea$range$dynamic$template$objects","$com$ikea$range$dynamic$template$serializers","$com$ikea$range$dynamic$testutils","ExperimentalPlacementService","LegacyPlacementHelper","SnapList","SortBuilder","Sorter","CombinedSorter","SorterByDistance","OriginalSorter","PrioritySorter","WarningsSorter","RecommendedDistanceSorter","StartPositioner","ValidatedSnap","placementHelper","sortBuilder","sortBuilderWithWarnings","sorter","validatedSnaps","findSnaps","snappingEntity","moveVariantsToEntityPosition","snapsForGuest","validatedSnap","SnapList$sortByDistance$lambda","_init_properties_SortBuilder_kt__dwrk6j","onlyInActivationDistance","sorters","aIsOriginal","bIsOriginal","RecommendedDistanceSorter$recommendationDistance$lambda","properties_initialized_SortBuilder_kt_lj95wt","$com$ikea$core$experimental","$com$ikea$core$experimental$placement","$com$ikea$core$experimental$placement$twopointo","kotlin_core_core_range_dynamic_range","ComponentMultiBuilder","ComponentSingleBuilder","ComponentsCommonData","CustomComponentBuilder","StaticComponentBuilder","ProductSpecificationBuilder","AllowedDoorPairsComponentBuilder","AssemblyComponentsBuilder","AutoAdaptGuestComponentBuilder","AutoAdaptHostComponentBuilder","BooleanComponentBuilder","ColliderShapeComponentBuilder","ConnectorsComponentBuilder","DragProjectionPointComponentBuilder","DragSurfacesComponentBuilder","FunctionalMarginShapeComponentBuilder","FunctionalZonesLocalComponentBuilder","LightComponentBuilder","MetaDataComponentBuilder","ModelInfoComponentBuilder","ModelTransformComponentBuilder","PlacementZoneByHeightComponentBuilder","PolyhedronColliderIdsPair","ProductStructureComponentBuilder","ProppingComponentBuilder","RecommendedInitialPositionFromFloorComponentBuilder","RelativeConnectorsComponentBuilder","RequiredComponentsBuilder","VisualLightSourceComponentBuilder","IPEXRangeFormatCatalog","AmendableCatalog","InheritanceResolver","ReadOnlyItemRepository","ItemRepository","AssemblyChildDTO","ColliderDTO","ProductDTO","ItemComponentsDTO","ItemParametersDTO","RangeItemDTO","ItemParser","buildColliders","rangeItem","commonData","parentCustomComponentBuilder","buildComponents","allComponents","ProductSpecificationBuilder$singleBuilders$lambda","ProductSpecificationBuilder$singleBuilders$lambda_0","ProductSpecificationBuilder$singleBuilders$lambda_1","ProductSpecificationBuilder$singleBuilders$lambda_2","ProductSpecificationBuilder$singleBuilders$lambda_3","ProductSpecificationBuilder$singleBuilders$lambda_4","ProductSpecificationBuilder$singleBuilders$lambda_5","ProductSpecificationBuilder$singleBuilders$lambda_6","ProductSpecificationBuilder$singleBuilders$lambda_7","ProductSpecificationBuilder$singleBuilders$lambda_8","ProductSpecificationBuilder$singleBuilders$lambda_9","ProductSpecificationBuilder$singleBuilders$lambda_10","ProductSpecificationBuilder$singleBuilders$lambda_11","ProductSpecificationBuilder$singleBuilders$lambda_12","ProductSpecificationBuilder$singleBuilders$lambda_13","ProductSpecificationBuilder$singleBuilders$lambda_14","ProductSpecificationBuilder$singleBuilders$lambda_15","ProductSpecificationBuilder$singleBuilders$lambda_16","ProductSpecificationBuilder$singleBuilders$lambda_17","ProductSpecificationBuilder$singleBuilders$lambda_18","ProductSpecificationBuilder$singleBuilders$lambda_19","ProductSpecificationBuilder$singleBuilders$lambda_20","ProductSpecificationBuilder$singleBuilders$lambda_21","ProductSpecificationBuilder$singleBuilders$lambda_22","ProductSpecificationBuilder$singleBuilders$lambda_23","ProductSpecificationBuilder$singleBuilders$lambda_24","itemRepository","buildAssemblyComponents","mapPartsToAssemblyStructureChildren","tmp4_container","assemblyChildren","partIndex","AutoAdaptGuestComponentBuilder$buildSingle$lambda","tmp0_width","tmp1_height","tmp2_depth","dim","buildConnector","ConnectorsComponentBuilder$buildConnector$lambda","connectorLabels","parameterLabels","curParam","$item","generateDragSurface","dragData","buildProductStructureComponent","getRelativeConnectorData","AmendableCatalog$Companion$jsonParser$lambda","cleanupAndGetItemsAffectedByAmend","amendedItems","getItemsAffectedByAmend","itemsToResolve","itemIdsToResolve","collectMissingAncestors","ri","collectMissingLabels","AmendableCatalog$collectMissingLabels$lambda","itemJson","itemsJson","rangeItems","tmp2_safe_receiver_0","itemIds","resolveInheritanceAndAdd","untouchedItem","withInheritance","IPEXRangeFormatCatalog$resolveInheritanceAndAdd$lambda","IPEXRangeFormatCatalog$productSpecification$lambda","IPEXRangeFormatCatalog$resolveItems$lambda","IPEXRangeFormatCatalog$resolveItems$lambda$lambda","IPEXRangeFormatCatalog$resolveItems$lambda_0","$items","$resolvedItems","IPEXRangeFormatCatalog$resolveItems$lambda$lambda_0","IPEXRangeFormatCatalog$resolveItems$lambda_1","ItemRepository$getAllItemDTOs$ref","resolvedItems","resolveAndRemoveItem","resolvable","itemDTO","resultingItem","parentItem","itemNames","tmp12_cached","AssemblyChildDTO_init_$Create$","AssemblyChildDTO_init_$Init$","ColliderDTO_init_$Create$","ColliderDTO_init_$Init$","dexfItemId","inheritCustomComponents","parentCCBs","parentCCB","childCCB","inheritAssembly","assemblyDTO","otherAssemblyDTO","inheritColliders","colliderDTO","otherColliderDTO","inheritFunctionalZones","otherFunctionalZones","inheritConnectors","connectorDTO","otherConnectorDTO","inheritProductStructure","productStructureDTO","otherProductStructureDTO","inheritMeta","otherMeta","inheritAllowedDoorPairs","otherAllowedDoorPairs","tmp4_bitMask1","tmp5_local0","tmp6_local1","tmp7_local2","tmp8_local3","tmp9_local4","tmp10_local5","tmp11_local6","tmp12_local7","tmp13_local8","tmp14_local9","tmp15_local10","tmp16_local11","tmp17_local12","tmp18_local13","tmp19_local14","tmp20_local15","tmp21_local16","tmp22_local17","tmp23_local18","tmp24_local19","tmp25_local20","tmp26_local21","tmp27_local22","tmp28_local23","tmp29_local24","tmp30_local25","tmp31_local26","tmp32_local27","tmp33_local28","tmp34_local29","tmp35_local30","tmp36_local31","tmp37_local32","tmp38_local33","tmp39_input","tmp40_cached","ItemComponentsDTO_init_$Create$","ItemComponentsDTO_init_$Init$","seen2","innerLight","outerLight","customComponents","parentComponents","tmp40_assembly","tmp41_colliders","tmp42_connectors","tmp43_productStructure","tmp29_safe_receiver","tmp44_meta","tmp17_safe_receiver","tmp45_allowedDoorPairs","tmp46_functionalZones","tmp47_autoAdaptGroup","tmp48_product","tmp49_modelURI","tmp50_modelTransform","tmp51_selectable","tmp52_outlineable","tmp53_draggable","tmp54_autoAdaptHost","tmp55_door","tmp56_doorFront","tmp57_handle","tmp58_drawer","tmp59_frame","tmp60_leg","tmp61_innerLight","tmp62_outerLight","tmp63_outlined","tmp31_elvis_lhs","tmp64_propping","tmp32_elvis_lhs","tmp65_alwaysHangDown","tmp33_elvis_lhs","tmp66_serializeEntity","tmp34_elvis_lhs","tmp67_placementZoneByHeight","tmp35_elvis_lhs","tmp68_functionalMargin","tmp36_elvis_lhs","tmp69_recommendedInitialPositionFromFloor","tmp37_elvis_lhs","tmp70_visualLightSource","tmp38_elvis_lhs","tmp71_dragSurfaces","tmp39_elvis_lhs","tmp72_dragProjectionPoint","tmp73_customComponents","ItemParametersDTO_init_$Create$","ItemParametersDTO_init_$Init$","parentParameters","parentParts","RangeItemDTO_init_$Create$","RangeItemDTO_init_$Init$","tmp1_elvis_lhs_1","newParameters","ItemParser$Companion$jsonParser$lambda","parseCustomComponents","itemJsonElement","knownComponentKeys","componentEntries","rawCustomComponents","$com$ikea$range$ipex","$com$ikea$range$ipex$range","$com$ikea$range$ipex$range$builder","$com$ikea$range$ipex$range$builder$component","$com$ikea$range$ipex$range$catalog","$com$ikea$range$ipex$range$dto","$com$ikea$range$ipex$range$dto$component","$com$ikea$range$ipex$range$dto$item","$com$ikea$range$ipex$range$parser","CoreFactoryImpl","CoreImpl","CoreModulesImpl","ProductManagerImpl","SystemGraphViewer","SceneManagerCacheClearingSystem","SceneManagerCacheComponent","SceneManagerEntitiesCache","SceneManagerImpl","SceneSerializationUtil","CoreComponentDeserializer","ValidationServiceImpl","CoreImpl$lambda","$sceneManager","initialSceneManager","componentSerializationRegistry","validation","nonNullLogger","nonNullHistory","sceneRoot","findProductSpecification","ProductManagerImpl$findProductSpecification$lambda","createEntityFromSpecification","buildAssembly","buildHierarchy","createEntityFromSpecification$default","assemblyEntityIds","ProductManagerImpl$createEntityInternal$lambda","_defaultParent","printMe","SystemGraphViewer$printMe$lambda","printMe$innerPrint","printMe$traverseOuter","$listener","listeningOn","SystemGraphViewer$printMe$innerPrint$lambda","$depth","outgoingComponents","SystemGraphViewer$printFor$lambda","$s","em","SceneManagerEntitiesCache$clearCache$ref","holderEntity","getFromCacheOrHierarchy","SceneManagerImpl$getFromCacheOrHierarchy$lambda","replaceScene","newScene","createSpace","loadSceneGraph","extractedRoots","extractedRoot","SceneSerializationUtil_instance","rootChildren","numScenes","SceneManagerImpl$loadSceneGraph$lambda","SceneManagerImpl$loadSceneGraph$lambda_0","$numScenes","spaceRot","tempRoot","entityWithSceneComponent","nonProductChildren","roomParent","nonProductChildrenWithProductDescendants","SceneSerializationUtil_getInstance","localTransformationComponent","worldTransformationComponent","assemblyPartsComponent","automaticGroupComponent","manualGroupComponent","productPartComponent","serializableGuestConnectionsComponent","CoreComponentDeserializer$localTransformationComponent$ref","CoreComponentDeserializer$worldTransformationComponent$ref","CoreComponentDeserializer$automaticGroupComponent$ref","CoreComponentDeserializer$manualGroupComponent$ref","CoreComponentDeserializer$assemblyPartsComponent$ref","CoreComponentDeserializer$productPartComponent$ref","CoreComponentDeserializer$serializableGuestConnectionsComponent$ref","validateAndCollectResults","id$delegate","ValidationServiceImpl$validateAndCollectResults$lambda","validateAndCollectResults$_anonymous_$lambda$0_ahocsf","validateAndCollectResults_0","ValidationServiceImpl$validateAndCollectResults$lambda_0","validateAndCollectResults$_anonymous_$lambda$1_ahocse","hasNoErrorsInResult","$id$delegate","$i","$rule","allErrors","firstWarning","errorsAndWarnings","snapWasGood","snapWasOk","myWarnings","wasValid","simulateClick","$com$ikea$core$entity","$com$ikea$core$service","$com$ikea$core$test","ArrangeExtensions","AutoAdaptExtensions","PlacementExtensions","CountSystem","RoomGeneratorUtils$createRoomFromData$1","RoomGeneratorUtils$point$1","RoomGeneratorUtils$surfaces$1$1","RoomGeneratorUtils$edges$1$1","RoomGeneratorUtils$corners$1$1","RoomGeneratorUtils$obstacles$1$1","RoomGeneratorUtils$boundingBox$1","RoomGeneratorUtils$transform$1","RoomGeneratorUtils$rotation$1","RoomGeneratorUtils","RoomGeometryDataTestImpl","RoomSurfaceTestImpl","RoomEdgeTestImpl","RoomCornerTestImpl","RoomPoint3DTestImpl","RoomObstacleTestImpl","RoomRotationTestImpl","RoomBoundingBoxTestImpl","RoomTransformTestImpl","RoomGeometryDataImpl","RoomSurfaceImpl","RoomEdgeImpl","RoomCornerImpl","RoomPoint3DImpl","numOfProducts","doAutoAdapt","placeHostProductsInLine","ArrangeExtensions_instance","ArrangeExtensions_getInstance","createInSceneAndAssert","makeAutoAdaptHost","productsLeftToRight","getProductInOrderLeftToRight","assertOrderedXPlacedOnInterval","orderedLeftToRight","alignWidth","getAlignWidth","expectedBasedOnCollider","expectedBasedOnAlignments","outcome1","outcome2","alignmentConnectors","getAlignWidth$lambda","fromLeftToRight","alternativeProductRefs","makeAutoAdaptable","AutoAdaptExtensions_instance","AutoAdaptExtensions_getInstance","originalProductRefs","makeAutoAdaptable$lambda","$originalProductRefs","createdEntity","createInHostAndAssert","createInScene","createInHost","createAtPosition","createAtPositionAndAssert","fillHostWithProduct","PlacementExtensions_instance","PlacementExtensions_getInstance","createAndAlignToTargetAndAssert","alignTarget","createAndSnapToSceneWithAlignment","productEntity","createAtPositionAllowWarnings","getProductInOrderLeftToRight$lambda","createRoomFromData","RoomGeneratorUtils$createRoom$lambda","RoomGeneratorUtils_instance","$boundingBox","$transform","$rotation","RoomGeneratorUtils_getInstance","RoomGeometryDataTestImpl_init_$Create$","RoomGeometryDataTestImpl_init_$Init$","RoomSurfaceTestImpl_init_$Create$","RoomSurfaceTestImpl_init_$Init$","RoomEdgeTestImpl_init_$Create$","RoomEdgeTestImpl_init_$Init$","surface1","surface2","RoomCornerTestImpl_init_$Create$","RoomCornerTestImpl_init_$Init$","RoomPoint3DTestImpl_init_$Create$","RoomPoint3DTestImpl_init_$Init$","RoomObstacleTestImpl_init_$Create$","RoomObstacleTestImpl_init_$Init$","RoomRotationTestImpl_init_$Create$","RoomRotationTestImpl_init_$Init$","RoomBoundingBoxTestImpl_init_$Create$","RoomBoundingBoxTestImpl_init_$Init$","RoomTransformTestImpl_init_$Create$","RoomTransformTestImpl_init_$Init$","$com$ikea$core$test$helper","$com$ikea$core$test$helper$extensions","$com$ikea$core$test$helper$utils","kotlin_core_core_experimental","kotlin_core_ipex_range_format","kotlin_core_core_kernel","kotlin_core_core_test_test_helpers","UnserializableEntityComponent_0","_CoreDebug","SortedValidationResult","getMeta$result$1","Experimental","ValidDragStrategyResult_0","AutoAdaptDragStrategy_0","FunctionalZonesLocalToWorldSystem_0","get_ConnectorType","_init_properties_api_js_kt__ym3iu4","connectorType","get_Vector","Vector_0","get_Margin","Margin_0","get_Size","Size_0","get_ModelTransform","get_EntityManagerImpl","entityManagerConstructor","get_Ray","get_Transform","Transform_0","get_Quaternion","get_Degrees","get_Radians","get_Face","Face_0","get_Cuboid","get_PolyhedronGroup","PolyhedronGroup_0","get_ConvexPolyhedron","ConvexPolyhedron_0","get_AxisAlignedBox","axisAlignedBox","get_ProductSpecification","ProductSpecification_0","get_ValidationResultFail","ValidationResultFail_0","get_ValidationResultWarning","ValidationResultWarning_0","get_CollisionValidationResult","CollisionValidationResult_0","get_CollisionValidation","CollisionValidation_0","get_PartPair","PartPair_0","get_ProductCatalogFunctions","get_ColliderShapeComponent","ColliderShapeComponentConstructor","get_Polygon","Polygon_0","get_Plane","Plane_0","get_DebugSurfacesComponent","DebugSurfacesComponent_0","get_DisplayNameComponent","DisplayNameComponentConstructor","get_DisabledConnectorsComponent","DisabledConnectorsComponentConstructor","get_ModelInfoComponent","modelInfoComponent","get_ModelTransformComponent","modelTransformComponent","get_RelativeConnectorRepositioner","RelativeConnectorRepositionerRef","get_RelativeConnectorData","get_RelationOriginAlongX","relationOriginAlongX","get_RelationOriginAlongY","relationOriginAlongY","get_RelationOriginAlongZ","relationOriginAlongZ","get_RelationOrigin","relationOrigin","get_RelativeBoxOffset","relativeBoxOffset","get_PointConnector","PointConnector_0","get_PointSeriesConnector","PointSeriesConnectorConstructor","get_PointSeriesSubConnector","PointSeriesSubconnector","get_EdgeConnector","EdgeConnector_0","get_SurfaceConnector","SurfaceConnector_0","get_MathUtils","MathUtilsRef","get_ViewerDragEventComponent","ViewerDragEventComponent_0","get_LogLevel","get_RotationDegreeOfFreedom","get_PolyhedronUtils","PolyhedronUtilsRef","get_RaycastResult","RaycastResult_0","get_ApiSystemIds","apiSystemIds","get_GuestConnectionsComponent","guestConnectionsComponentConstructor","get_HostConnectionsComponent","HostConnectionsComponentConstructor","get_DragSurfacesComponent","dragSurfacesComponent","get_OutlineableComponent","get_DragSurface","get_AutomaticGroupBuilderSystem","automaticEntityGroupBuilderSystemConstructor","get_ManualGroupConnectorValidation","entityGroupConnectorValidation","get_AssemblyStructureComponent","assemblyStructureComponentConstructor","get_RestrictAllowedRequiredHostsComponent","RestrictAllowedRequiredHostsComponent_0","get_ManualEntityGroupBuilderService","ManualEntityGroupBuilderServiceConstructor","get_DebugLine","DebugLine_0","get_DebugLinesComponent","DebugLinesComponent_0","get_ValidationFail","validationFail","get_ValidationWarning","validationWarning","get_AxisAlignedBoxUtils","AxisAlignedBoxUtils","get_VectorConstants","VectorConstantsRef","get_IsLoadingSnapshotComponent","isLoadingSnapshotComponent","get_SnapshotIgnoreComponent","snapshotIgnoreComponent","get_ChildConnectionValidation","childConnectionValidation","quaternionFromEuler","createDragType","mockLoadedModelInfoComponent","Vector$_init_$ref_b2yate","Margin$_init_$ref_8haia1","p4","p5","Size$_init_$ref_sdxags","ModelTransform$_init_$ref_dirtfi","EntityManagerImpl$_init_$ref_tnm1nf","Ray$_init_$ref_ybpkqj","Transform$_init_$ref_t8t60p","Quaternion$_init_$ref_fnu1zb","Degrees$_init_$ref_s8ngf6","Radians$_init_$ref_ac71tf","Face$_init_$ref_vy87x4","Cuboid$_init_$ref_z3blhn","PolyhedronGroup$_init_$ref_9q1lgk","ConvexPolyhedron$_init_$ref_ukuqx4","AxisAlignedBox$_init_$ref_3ik1el","ProductSpecification$_init_$ref_co9ifl","ValidationResultFail$_init_$ref_33hbjl","ValidationResultWarning$_init_$ref_ifhc0v","CollisionValidationResult$_init_$ref_9xprc3","CollisionValidation$_init_$ref_6atbwm","PartPair$_init_$ref_5c2u5k","ColliderShapeComponent$_init_$ref_8mmz1x","Polygon$_init_$ref_gy2pcl","Plane$_init_$ref_qgmgjb","DebugSurfacesComponent$_init_$ref_cixmtd","DisplayNameComponent$_init_$ref_oabmi3","DisabledConnectorsComponent$_init_$ref_9lx7na","ModelInfoComponent$_init_$ref_4c9uw1","ModelTransformComponent$_init_$ref_qm70d1","RelativeConnectorData$_init_$ref_gl5e92","relationOrigin$lambda","RelativeBoxOffset$_init_$ref_c5ral","PointConnector$_init_$ref_zf7wyw","p6","p7","p8","p9","p10","p11","PointSeriesConnector$_init_$ref_nsfidb","p12","p13","EdgeConnector$_init_$ref_1gnl2j","SurfaceConnector$_init_$ref_f5mxff","ViewerDragEventComponent$_init_$ref_frd03o","RaycastResult$_init_$ref_cau7en","GuestConnectionsComponent$_init_$ref_fpjczp","HostConnectionsComponent$_init_$ref_klemph","DragSurfacesComponent$_init_$ref_vthysi","OutlineableComponent$_init_$ref_vzlam4","DragSurface$_init_$ref_mad784","AutomaticGroupBuilderSystem$_init_$ref_3dadxt","ManualGroupConnectorValidation$_init_$ref_fsugfs","AssemblyStructureComponent$_init_$ref_ghd23v","RestrictAllowedRequiredHostsComponent$_init_$ref_wx7v88","ManualEntityGroupBuilderService$_init_$ref_e8eyt1","DebugLine$_init_$ref_z9a10i","DebugLinesComponent$_init_$ref_gfcjdg","IsLoadingSnapshotComponent$_init_$ref_igs8ou","SnapshotIgnoreComponent$_init_$ref_uxdxnm","ChildConnectionValidation$_init_$ref_m19sa6","properties_initialized_api_js_kt_m1n5xa","get_SelectableComponent","_init_properties_component_kt__lifbkl","get_DraggableComponent","get_SnapRootComponent","snapRootComponent","get_HistoryEvent","get_HistoryChangedEventComponent","historyChangedEventComponent","get_WorldSpaceDragEventComponent","worldSpaceDragEventComponent","get_ClickEventComponent","clickEventComponent","get_LocalTransformComponent","localTransformation","get_ConnectorsComponent","get_ChildComponent","childComponent","get_ParentComponent","get_ViewerObjectComponent","get_ConnectionRootComponent","connectionRootComponent","get_ProductPartComponent","get_WorldTransformComponent","worldTransformComponent","get_ComponentIds","componentIds","get_ComponentIdSpan","componentIdSpan","get_TemplateDataComponent","templateDataComponent","get_RelativeConnectorsComponent","get_AssemblyPartsComponent","get_ViewerComponent","viewerComponent","get_ProductComponent","SceneReloading","SelectableComponent$_init_$ref_pdu60u","DraggableComponent$_init_$ref_8nu9aj","SnapRootComponent$_init_$ref_u9ilxo","historyChangedEventComponent$lambda","eventTypeName","WorldSpaceDragEventComponent$_init_$ref_2xqn0m","ClickEventComponent$_init_$ref_kxikre","LocalTransformComponent$_init_$ref_xjesuv","ConnectorsComponent$_init_$ref_qm59bi","ChildComponent$_init_$ref_yhw7t0","ParentComponent$_init_$ref_5hpzki","ViewerObjectComponent$_init_$ref_ijsie1","ConnectionRootComponent$_init_$ref_91dp4o","ProductPartComponent$_init_$ref_ysmpee","WorldTransformComponent$_init_$ref_t6duq","TemplateDataComponent$_init_$ref_f0kftg","RelativeConnectorsComponent$_init_$ref_ovg1ba","AssemblyPartsComponent$_init_$ref_y1v56q","ViewerComponent$_init_$ref_b4gcw6","ProductComponent$_init_$ref_wrnq5l","properties_initialized_component_kt_mmiqdv","visualizer","findSelectedEntity","getSystem","getValidationRule","snapResults","snapIndex","printHelp","validationRules","helpMessage","get_ColliderUtils","_init_properties_ColliderUtils_kt__buwx7v","get_CollisionUtils","CollisionUtilsObj","properties_initialized_ColliderUtils_kt_kh6v71","get_ComponentUtils","_init_properties_ComponentUtils_kt__d1ghsk","properties_initialized_ComponentUtils_kt_pakiie","get_ConnectionUtils","_init_properties_ConnectionUtils_kt__o7o2tb","properties_initialized_ConnectionUtils_kt_jl8lf","get_ConnectorUtils","_init_properties_ConnectorUtils_kt__thp0w4","properties_initialized_ConnectorUtils_kt_7bcy3e","get_EntityGroupUtils","_init_properties_EntityGroupUtils_kt__fa1pyj","properties_initialized_EntityGroupUtils_kt_6umwvd","get_HierarchyUtils","_init_properties_HierarchyUtils_kt__r367z0","properties_initialized_HierarchyUtils_kt_1xdqbi","get_MeasurementUtils","_init_properties_MeasurementUtils_kt__2fjxth","properties_initialized_MeasurementUtils_kt_gl5jyh","get_ModelUtils","_init_properties_ModelUtils_kt__elp6nc","modelUtils","properties_initialized_ModelUtils_kt_c4z2fe","get_ProductUtils","_init_properties_ProductUtils_kt__wn29wi","properties_initialized_ProductUtils_kt_fydiis","get_RaycastUtils","_init_properties_RaycastUtils_kt__altj14","properties_initialized_RaycastUtils_kt_sh5hti","get_SnapActionCandidateSortAndSelectStrategies","_init_properties_SnapActionCandidateSortAndSelectStrategy_kt__do0a3f","properties_initialized_SnapActionCandidateSortAndSelectStrategy_kt_q48s6f","get_SnapUtils","_init_properties_SnapUtils_kt__24ofor","properties_initialized_SnapUtils_kt_y15qfr","get_TransformUtils","_init_properties_TransformUtils_kt__4zsf3v","properties_initialized_TransformUtils_kt_j01ttz","get_OutlinedComponent","_init_properties_components_kt__qkbrje","get_OutlineBlockingComponent","outlineBlockingComponent","get_AutoAdaptHostComponent","get_AutoAdaptGuestComponent","autoAdaptGuest","get_AutoAdaptVariantComponent","autoAdaptComponent","get_ForceAutoAdaptWhenParentIsDraggedComponent","forceAutoAdaptWhenParentIsDraggedComponent","get_AllowedDoorPairsComponent","get_AlignmentConnectionsComponent","alignmentConnectionsComponent","get_LightComponent","lightComponent","get_RoomDimensionsComponent","roomDimensionsComponent","get_RoomPartComponent","roomPartComponent","OutlinedComponent$_init_$ref_h368dy","OutlineBlockingComponent$_init_$ref_we6k5d","AutoAdaptHostComponent$_init_$ref_wtzggt","AutoAdaptGuestComponent$_init_$ref_4n8cfn","AutoAdaptVariantComponent$_init_$ref_dn270a","ForceAutoAdaptWhenParentIsDraggedComponent$_init_$ref_egmtwc","AllowedDoorPairsComponent$_init_$ref_o2qka3","AlignmentConnectionsComponent$_init_$ref_6s6xm","LightComponent$_init_$ref_fuiv0e","RoomDimensionsComponent$_init_$ref_3sq2j4","RoomPartComponent$_init_$ref_2w0hre","properties_initialized_components_kt_8vt12w","get_CoreDebug","_init_properties_core_js_kt__sbuna3","CoreDebug","CoreDebug$_init_$ref_fht3jl","properties_initialized_core_js_kt_xu6gx3","get_DynamicProductCatalog","_init_properties_dynamic_range_js_kt__omhuxl","DynamicProductCatalog_0","get_DynamicProduct","DynamicProduct_0","get_ProductTemplate","ProductTemplate_0","get_CatalogTemplateData","CatalogTemplateData_0","get_Part","Part_0","get_ModelRenderInfo","ModelRenderInfo_0","get_DynamicRangeUtils","DynamicRangeUtilsRef","get_RelativePosition","get_RelativeTransform","get_PositionTemplate","positionTemplate","get_OriginRelativeTo","originRelativeTo","get_PositionType","positionType","get_VisualLightSourceComponent","visualLightSourceComponent","get_TemplateEditorService","TemplateEditorService_0","get_BoundItemTemplate","BoundItemTemplate_0","get_Dimension","Dimension_0","get_Compartment","Compartment_0","get_CatalogGenerator","catalogGenerator","PositionValue_0","OriginTemplate_0","getMeta","dto","DynamicProductCatalog$_init_$ref_ja14jo","DynamicProduct$_init_$ref_m4augl","ProductTemplate$_init_$ref_e7fptw","CatalogTemplateData$_init_$ref_pugk1k","Part$_init_$ref_yjn15e","ModelRenderInfo$_init_$ref_p9q3h4","RelativePosition$_init_$ref_etlu4w","RelativeTransform$_init_$ref_qjbp7f","PositionTemplate$_init_$ref_2pz4ci","VisualLightSourceComponent$_init_$ref_bp7zb","TemplateEditorService$_init_$ref_97ywjt","BoundItemTemplate$_init_$ref_xq74au","Dimension$_init_$ref_cvmjy7","Compartment$_init_$ref_p4mln7","CatalogGenerator$_init_$ref_itw2uj","properties_initialized_dynamic_range_js_kt_i07y6v","ExperimentalPlacementService$_init_$ref_61iroz","LegacyPlacementHelper$_init_$ref_nbi9hh","ValidatedSnap$_init_$ref_b5n0rx","experimental_js_instance_f39xui","experimental_js_getInstance_e6vaee","get_IPEXRangeFormatCatalog","_init_properties_ipex_range_format_js_kt__6qn084","ipexRangeFormatCatalog","get_AmendableCatalog","amendableCatalog","get_RangeItemDTO","rangeItemDTO","get_StaticComponentBuilder","staticComponentBuilder","IPEXRangeFormatCatalog$_init_$ref_d52y62","AmendableCatalog$_init_$ref_rulze3","RangeItemDTO$_init_$ref_774wmu","StaticComponentBuilder$_init_$ref_nnm7pj","properties_initialized_ipex_range_format_js_kt_t3r77m","get_createCore","_init_properties_kernel_js_kt__p0ka61","createCore","get_SceneSerializationUtil","sceneSerializationUtil","CoreImpl$_init_$ref_yi8yhy","properties_initialized_kernel_js_kt_yrqi4p","get_PlacementService","_init_properties_stl_js_kt__e1niln","PlacementService_0","get_ReplaceUtils","replaceUtils","get_ReplaceAssemblyPartUtils","replaceAssemblyPartUtils","get_SnapPlacementActor","SnapPlacementActor_0","get_ProppingSystem","ProppingSystem_0","get_ConnectorVisualizationSystem","ConnectorVisualizationSystem_0","get_ColliderVisualizationSystem","ColliderVisualizationSystem_0","get_AutoAdaptHostZoneVisualizationSystem","AutoAdaptHostZoneVisualizationSystem_0","get_FunctionalMarginVisualizationSystem","FunctionalMarginVisualizationSystem_0","get_FunctionalZoneVisualization","FunctionalZoneVisualization","get_DragProjectionPointVisualizationSystem","DragProjectionPointVisualizationSystem_0","get_DragSystem","DragSystem_0","get_SnapCardinalDirectionsDragStrategy","snapCardinalDirectionsDragStrategy","get_SnapClosestDragStrategy","snapClosestDragStrategy","get_SnapClosestWithSubConnectorsDragStrategy","snapClosestWithSubConnectorsDragStrategy","get_ResolveCollisionsDragStrategy","resolveCollisionsDragStrategy","get_DrawDragGhostSystem","drawDragGhostSystem","get_DragSurfaceNormalVisualizationSystem","DragSurfaceNormalVisualizationSystem_0","get_DragSurfaceVisualizationSystem","DragSurfaceVisualizationSystem_0","get_DebugLineDrawingSystem","DebugLineDrawingSystem_0","get_StandardSelectionService","StandardSelectionService_0","get_AutoAdaptService","AutoAdaptService_0","get_AlignmentConnectionCreationSystem","AlignmentConnectionCreationSystem_0","get_RoomService","RoomService_0","get_RoomSystem","RoomSystem_0","get_RoomComponentDeserializer","roomComponentDeserializer","get_RoomConnectorConstants","roomConnectorConstants","get_StandardSelectionSystem","get_OutlineSystem","OutlineSystemCtor","get_OutlineSelectedSystem","OutlineSelectedSystemCtor","get_OutlineEntityGroupDeselectSystem","OutlineEntityGroupDeselectSystem_0","get_AllowedDoorPairsValidation","AllowedDoorPairsValidation_0","get_AlignmentPlane","AlignmentPlane_0","get_AllowedNumberOfChildrenOfTypeValidation","AllowedNumberOfChildrenOfTypeValidation_0","get_DisallowSeparateRequiredHostsValidation","disallowSeparateRequiredHostsValidation","get_AssemblyInstructionsService","get_ICFDataService","ICFDataService_0","get_PlacementResult","PlacementResult_0","get_PlacementResultCompanion","PlacementResultCompanion","get_FunctionalMarginValidation","FunctionalMarginValidation_0","get_PlacementZoneValidation","placementZoneValidation","get_AlignmentLinesSystem","ALIGNMENT_LINES_SYSTEM","get_FunctionalMarginSystem","FUNCTIONAL_MARGIN_SYSTEM","get_FunctionalMarginShapeComponent","FunctionalMarginShapeComponent_0","get_FunctionalMarginComponent","FunctionalMarginComponent_0","get_RecommendedInitialPositionFromFloorComponent","RecommendedInitialPositionFromFloorComponent_0","get_PlacementZoneByHeightComponent","PlacementZoneByHeightComponent_0","get_StlSystemIds","stlSystemIds","get_ReplacePartResult","replacePartResultConstructor","get_AnyDragSurfaceProjector","anyDragSurfaceProjector","get_XYPlaneProjector","XYPlaneProjector_0","get_DragSurfaceCanHostSelector","DragSurfaceCanHostSelector_0","get_DragSurfaceCanHostWithAutoAdaptSelector","DragSurfaceCanHostWithAutoAdaptSelector_0","get_AutoAdaptProductSpecificationsSystem","AutoAdaptProductSpecificationsSystem_0","get_LegacyCanvasTo3DDragConverterSystem","LegacyCanvasTo3DDragConverterSystemConstructor","get_CanvasTo3DDragConverterSystem","get_EntityConnectorVisualizationSystem","EntityConnectorVisualizationSystem_0","get_EntityConnectorVisualizationComponent","EntityConnectorVisualizationComponent_0","get_Color","Color_0","get_DefaultVisualizer","DefaultVisualizer_0","get_EntityColliderVisualizationSystem","EntityColliderVisualizationSystem_0","get_EntityColliderVisualizationComponent","EntityColliderVisualizationComponent_0","get_EntityCollisionVisualizationSystem","EntityCollisionVisualizationSystem_0","get_DecoratorComponent","DecoratorComponent_0","get_CoreVisualization","CoreVisualization_0","get_ColoredOutlineSystem","ColoredOutlineSystemConstructor","get_ColoredOutlineComponent","ColoredOutlineComponentConstructor","get_DragExtensions","dragExtensions","get_AutoAdaptFeature","autoAdaptFeature","get_AutoAdaptUtils","autoAdaptUtils","get_AutoAdaptSessionComponent","autoAdaptSessionComponent","get_DragProjectionPointComponent","dragProjectionPointComponentConstructor","get_FunctionalZone","functionalZoneCtor","get_FunctionalZonesLocalComponent","FunctionalZonesLocalComponentCtor","get_DragState","dragStateCtor","get_DragStateComponent","dragStateComponentCtor","get_ReplaceEntityEventComponent","replacedWithAutoAdaptEventComponent","get_LabelComponent","LabelComponent_0","get_HigherPriorityAlignmentPostProcess","HigherPriorityAlignmentPostProcessCtor","get_ValidationResultIds","ValidationResultIdsObj","get_RequiredConnectorsSatisfiedValidation","RequiredConnectorsSatisfiedValidationCtor","get_ValidationRuleIds","ValidationRuleIdsObj","get_HostConnectorRotationValidation","hostConnectorRotationValidation","get_SnapSorterBuilder","sortBuilderCtor","get_PlacementHelper","placementHelperObject","get_SpaceFinderUtils","spaceFinderUtilsObject","HandleRotationSystem_0","DebugLogger_0","logPriorityLevel","exceptionPriorityLevel","PlacementService$_init_$ref_4ipsq3","SnapPlacementActor$_init_$ref_h9zo2z","ProppingSystem$_init_$ref_yjua67","ConnectorVisualizationSystem$_init_$ref_bhjn0h","ColliderVisualizationSystem$_init_$ref_iz3yxm","AutoAdaptHostZoneVisualizationSystem$_init_$ref_nexzcp","FunctionalMarginVisualizationSystem$_init_$ref_du8tkt","FunctionalZoneVisualizationSystem$_init_$ref_z56su9","DragProjectionPointVisualizationSystem$_init_$ref_iy9mhr","DragSystem$_init_$ref_z2syyq","SnapCardinalDirectionsDragStrategy$_init_$ref_ouuluo","SnapClosestDragStrategy$_init_$ref_un3qp","SnapClosestWithSubConnectorsDragStrategy$_init_$ref_20uk5v","ResolveCollisionsDragStrategy$_init_$ref_cuay8f","DrawDragGhostSystem$_init_$ref_www5q7","DragSurfaceNormalVisualizationSystem$_init_$ref_miyxm6","DragSurfaceVisualizationSystem$_init_$ref_h43d11","DebugLineDrawingSystem$_init_$ref_kvzwwv","StandardSelectionService$_init_$ref_k0v6bl","AutoAdaptService$_init_$ref_k4m925","AlignmentConnectionCreationSystem$_init_$ref_ta0hcm","RoomService$_init_$ref_14lqff","RoomSystem$_init_$ref_mxcny3","RoomComponentDeserializer$_init_$ref_ocu3f4","StandardSelectionSystem$_init_$ref_nkymih","OutlineSystem$_init_$ref_a0oop8","OutlineSelectedSystem$_init_$ref_b6zwpz","OutlineEntityGroupDeselectSystem$_init_$ref_jrsydb","AllowedDoorPairsValidation$_init_$ref_tv5wjt","AlignmentPlane$_init_$ref_i3c9l8","AllowedNumberOfChildrenOfTypeValidation$_init_$ref_sj8e0k","AssemblyInstructionsServiceImpl$_init_$ref_60674r","ICFDataService$_init_$ref_ewcpkq","PlacementResult$_init_$ref_vv0umb","FunctionalMarginValidation$_init_$ref_cl4qmd","PlacementZoneValidation$_init_$ref_xzv9i3","AlignmentLinesSystem$_init_$ref_2vzu7a","FunctionalMarginSystem$_init_$ref_nm9ef9","FunctionalMarginShapeComponent$_init_$ref_ukwgzs","FunctionalMarginComponent$_init_$ref_djhkft","RecommendedInitialPositionFromFloorComponent$_init_$ref_dyzfs8","PlacementZoneByHeightComponent$_init_$ref_1zq8h5","ReplacePartResult$_init_$ref_snfbmn","anyDragSurfaceProjector$lambda","dragSelector","XYPlaneProjector$_init_$ref_yhqdrw","DragSurfaceCanHostSelector$_init_$ref_vj8lw9","DragSurfaceCanHostWithAutoAdaptSelector$_init_$ref_xz7lxk","AutoAdaptProductSpecificationsSystem$_init_$ref_vn5aie","LegacyCanvasTo3DDragConverterSystemConstructor$lambda","CanvasTo3DDragConverterSystem$_init_$ref_9wy4k2","EntityConnectorVisualizationSystem$_init_$ref_5xr5ng","EntityConnectorVisualizationComponent$_init_$ref_jbgyim","Color$_init_$ref_hzu4wy","DefaultVisualizer$_init_$ref_c8298m","EntityColliderVisualizationSystem$_init_$ref_kjeuy1","EntityColliderVisualizationComponent$_init_$ref_fnoiaz","EntityCollisionVisualizationSystem$_init_$ref_k8ky2n","DecoratorComponent$_init_$ref_j03x2b","CoreVisualization$_init_$ref_sop7eo","ColoredOutlineSystem$_init_$ref_pg9el2","ColoredOutlineComponent$_init_$ref_7pktoo","AutoAdaptSessionComponent$_init_$ref_wk48zv","DragProjectionPointComponent$_init_$ref_bdpsob","FunctionalZone$_init_$ref_xj34xi","FunctionalZonesLocalComponent$_init_$ref_4xbtox","DragState$_init_$ref_k1ow1k","DragStateComponent$_init_$ref_bylfol","ReplacedWithAutoAdaptEventComponent$_init_$ref_nm7pmt","LabelComponent$_init_$ref_529rj8","HigherPriorityAlignmentPostProcess$_init_$ref_fytm9y","RequiredConnectorsSatisfiedValidation$_init_$ref_dsrkbj","HostConnectorRotationValidation$_init_$ref_rmkrhl","SnapSorterBuilder$_init_$ref_vyls5d","properties_initialized_stl_js_kt_pepimr","get_arrangeExtensions","_init_properties_test_helpers_js_kt__3l78uy","arrangeExtensions","get_placementExtensions","placementExtensions","get_autoAdaptExtensions","autoAdaptExtensions","get_CountSystem","countSystem","get_RoomGeneratorUtils","roomGeneratorUtils","CountSystem$_init_$ref_315rnd","properties_initialized_test_helpers_js_kt_u517pg","$com$ikea$core$debug","CoreToolboxComponentIds_1","core_1","CoreToolboxComponentIds","ComponentListenerImpl_1","SystemBase_1","_entity","_newComponent","_oldComponent","__extends","extendStatics","__","SystemBase2_1","_super","_this","SystemBase3_1","SystemBase4_1","SystemBase5_1","ValidationBase_1","ValidationBase","SimpleOutlineSelectedSystem_1","SimpleOutlineAssemblySystem_1","SimpleOutlineBlockingSystem_1","SimpleOutlineModelSystem_1","SimpleOutlineSelectedSystem","SimpleOutlineBlockingSystem","SimpleOutlineAssemblySystem","assemblyEntity","SimpleOutlineModelSystem","SimpleOutlineChildrenSystem_1","SimpleOutlineChildrenSystem","outlinedParent","AddBlockingToAllModelsSystem_1","AddBlockingToAllModelsSystem","SimpleOutlineSnapshotLoadedSystem_1","SimpleOutlineSnapshotLoadedSystem","hasModelLoadedFromInfo","OutlineUtils","blockingSystem","outlineSystem","DragUtils","DRAG_RELATED_SYSTEM_IDS","withAutoAdapt","dragSystem","startNecessarySystemsForAutoAdapt","converterSystem","newSystem","_CodeOrName","Name","_Code","strs","addCodeArg","expr","safeStringify","optimize","interpolate","mergeExprItems","strConcat","getProperty","getEsmExportName","regexpCode","code_1","ValueError","UsedValueState","prefixes","nameOrPrefix","ng","ValueScopeName","nameStr","itemIndex","ValueScope","valueKey","keyOrRef","scopeName","usedValues","getCode","valueCode","nameSet","def","scope_1","code_2","scope_2","_names","_constants","Def","varKind","rhs","es5","_n","constants","optimizeExpr","Assign","lhs","sideEffects","addExprNames","AssignOp","Label","Break","Throw","AnyCode","ParentNode","subtractNames","addNames","BlockNode","Root","Else","If","cond","For","ForLoop","ForRange","ForIter","iterable","Func","async","Return","Try","Catch","Finally","CodeGen","extScope","prefixOrName","constant","_constant","keyValues","thenBody","elseBody","forBody","tryBody","catchCode","finallyCode","nodeCount","toClose","funcBody","N1","N2","replaceName","canOptimize","par","andCode","mappend","orCode","util","codegen_1","toHash","alwaysValidSchema","schema","checkUnknownRules","schemaHasRules","self","checkStrictMode","schemaHasRulesButRef","RULES","schemaRefOrVal","topSchemaRef","schemaPath","keyword","unescapeFragment","unescapeJsonPointer","escapeFragment","escapeJsonPointer","eachItem","xs","makeMergeEvaluated","mergeNames","mergeToName","mergeValues","resultToName","gen","toName","setEvaluated","evaluatedPropsToName","ps","snippets","useFunc","Type","getErrorPath","dataProp","dataPropType","jsPropertySyntax","names_1","util_1","schemaType","reportError","cxt","errorPaths","overrideAllErrors","compositeRule","errObj","errorObjectCode","addError","returnErrors","reportExtraError","resetErrorsCount","errsCount","extendErrors","schemaValue","errs","validateName","schemaEnv","createErrors","errorObject","errorInstancePath","errorSchemaPath","extraErrorProps","errorPath","instancePath","instPath","errSchemaPath","parentSchema","schPath","propertyName","boolSchema","errors_1","boolError","topBoolOrEmptySchema","falseSchemaError","boolOrEmptySchema","_jsonTypes","jsonTypes","isJSONType","getRules","groups","applicability","schemaHasRulesForType","shouldUseGroup","shouldUseRule","kwd","rules_1","applicability_1","DataType","getSchemaTypes","getJSONTypes","ts","coerceAndCheckDataType","coerceTo","coerceToTypes","checkTypes","wrongType","checkDataTypes","coerceData","reportTypeError","COERCIBLE","coerceTypes","coerced","coerceSpecificType","assignParentData","parentData","parentDataProperty","checkDataType","strictNums","correct","EQ","numCond","_cond","dataTypes","notObj","typeError","getTypeErrorContext","schemaCode","defaults","assignDefaults","assignDefault","sch","childData","util_2","checkReportMissingProp","noPropertyInData","checkMissingProp","reportMissingProp","hasPropFunc","isOwnProperty","propertyInData","ownProperties","allSchemaProperties","schemaMap","schemaProperties","callValidateCode","passSchema","dataAndSchema","valCxt","newRegExp","usePattern","regExp","validateArray","validArr","validateItems","notValid","validateUnion","schValid","_sch","schCxt","macroKeywordCode","macroSchema","schemaRef","useKeyword","funcKeywordCode","checkAsyncKeyword","validateRef","validateKeyword","assignValid","modifyData","reportErrs","ruleErrs","validateSync","addErrs","validateErrs","_await","passCxt","validSchemaType","allowUndefined","validateKeywordUsage","deps","subschema","getSubschema","schemaProp","extendSubschemaData","dpType","dataPathArr","nextData","dataContextProps","_nextData","extendSubschemaMode","jtdDiscriminator","jtdMetadata","fastDeepEqual","equal","traverse","jsonSchemaTraverseModule","pre","_traverse","jsonPtr","rootSchema","parentJsonPtr","parentKeyword","keyIndex","escapeJsonPtr","SIMPLE_INLINED","inlineRef","hasRef","countKeys","REF_KEYWORDS","getFullPath","resolver","normalizeId","_getFullPath","TRAILING_SLASH_HASH","resolveUrl","baseId","ANCHOR","getSchemaRefs","schemaId","uriResolver","schId","baseIds","pathPrefix","localRefs","schemaRefs","fullPath","innerBaseId","addRef","addAnchor","_resolve","ambiguos","schOrRef","checkAmbiguosRef","anchor","sch1","sch2","boolSchema_1","dataType_1","dataType_2","defaults_1","keyword_1","subschema_1","resolve_1","validateFunctionCode","isSchemaObj","checkKeywords","schemaCxtHasRules","topSchemaObjCode","validateFunction","funcSourceUrl","destructureValCxtES5","destructureValCxt","commentKeyword","checkNoDefault","resetEvaluated","typeAndKeywords","returnResults","subschemaCode","subSchemaObjCode","updateContext","checkAsyncSchema","checkRefsAndKeywords","schemaKeywords","checkedTypes","rootName","ValidationError","assignEvaluated","evaluated","typeErrors","keywordCode","checkStrictTypes","groupKeywords","iterateKeywords","useDefaults","checkContextTypes","checkMultipleTypes","checkKeywordTypes","includesType","strictTypesError","narrowSchemaTypes","hasApplicableType","schTs","kwdT","withTypes","KeywordCxt","getData","successAction","failAction","errorParams","codeBlock","$dataValid","wrong$DataType","invalid$DataSchema","validateSchemaRef","appl","nextContext","schemaCxt","ruleType","JSON_POINTER","RELATIVE_JSON_POINTER","dataLevel","dataNames","jsonPointer","segment","validation_error","ref_error","MissingRefError","validation_error_1","SchemaEnv","compileSchema","getCompilingSchema","_ValidationError","validateCode","resolveRef","schOrFunc","inlineOrCompile","schEnv","sameSchemaEnv","resolveSchema","refPath","getJsonPointer","PREVENT_SCOPE_CHANGE","parsedRef","partSchema","$ref","scopedChars","HEX","normalizeIPv4","findToken","address","stripLeadingZeros","stringArrayToHexStripped","keepZero","strip","getIPV6","tokenCount","isZone","endipv6Encountered","endIpv6","consume","normalizeIPv6","ipv6","newHost","escapedHost","skip","RDS1","RDS2","RDS3","RDS5","removeDotSegments","im","normalizeComponentEncoding","recomposeAuthority","uriTokens","ipV4res","ipV6res","utils","UUID_REG","URN_REG","isSecure","wsComponents","httpParse","httpSerialize","secure","wsParse","wsSerialize","urnParse","urnComponents","scheme","urnScheme","schemeHandler","SCHEMES","urnSerialize","nid","uriComponents","nss","urnuuidParse","uuidComponents","urnuuidSerialize","http","https","ws","wss","schemes","relativeURI","schemelessOptions","resolveComponents","relative","skipNormalization","uriA","uriB","cmpts","authority","hexLookUp","nonSimpleDomain","URI_PARSE","gotEncoding","isIP","ipv4result","ipv6result","fastUri","fastUriModule","uri_1","ref_error_1","compile_1","codegen_2","$dataRefSchema","defaultRegExp","META_IGNORE_OPTIONS","EXT_SCOPE_NAMES","removedOptions","deprecatedOptions","MAX_EXPRESSION","requiredOptions","_w","_x","_y","_z","_0","_optz","Ajv","getLogger","formatOpt","checkOptions","getMetaSchemaOptions","addInitialFormats","addInitialKeywords","addInitialSchemas","_dataRefSchema","schemaKeyRef","_meta","loadSchema","runCompileAsync","_schema","loadMetaSchema","_compileAsync","checkLoaded","loadMissingSchema","missingRef","_loadSchema","_validateSchema","throwOrLogError","$schema","keyRef","getSchEnv","definitions","kwdOrDef","checkKeyword","addRule","keywordMetaschema","dataVar","metaSchema","keywordsJsonPointers","keywords","seg","schemaOrData","schemas","validateSchema","addSchema","currentOpts","checkOpts","optsSchemas","defs","metaOpts","noLogs","KEYWORD_NAME","ruleGroup","addBeforeRule","before","_rule","$dataRef","callRootRef","schOrEnv","callValidate","inlineRefSchema","callRef","getValidate","schName","$async","callAsyncRef","callSyncRef","addEvaluatedFrom","addErrorsFrom","schEvaluated","id_1","ref_1","limitNumber","ops","KWDs","multipleOf","prec","invalid","ucs2length_1","ucs2length","limitLength","limitProperties","missingProperty","useLoop","allErrorsMode","exitOnErrorMode","definedProperties","requiredKey","loopAllRequired","loopUntilMissing","limitItems","equal_1","uniqueItems","itemTypes","validateUniqueItems","loopN","loopN2","eql","_const","_enum","getEql","loopEnum","vSchema","equalCode","validation_1","limitNumber_1","multipleOf_1","limitLength_1","pattern_1","limitProperties_1","required_1","limitItems_1","uniqueItems_1","const_1","enum_1","additionalItems","validateAdditionalItems","validateTuple","extraItems","schArr","checkStrictTuple","fullTuple","prefixItems","items_1","items2020","additionalItems_1","minContains","maxContains","validateItemsWithCount","checkLimits","_valid","depsCount","property_ies","propDeps","schDeps","splitDependencies","validatePropertyDeps","validateSchemaDeps","propertyDeps","schemaDeps","hasProperty","depProp","propertyNames","additionalProperties","patProps","checkAdditionalProperties","additionalPropertyCode","isAdditional","definedProp","propsSchema","deleteAdditional","applyAdditionalSchema","additionalProperties_1","allProps","hasDefault","applyPropertySchema","patternProperties","alwaysValidPatterns","checkProperties","validatePatternProperties","pat","checkMatchingProperties","validateProperties","alwaysValid","anyOf","oneOf","passing","validateOneOf","allOf","_if","hasThen","hasSchema","hasElse","validateIf","ifClause","validateClause","thenElse","applicator","prefixItems_1","items2020_1","dependencies_1","propertyNames_1","properties_1","patternProperties_1","not_1","anyOf_1","oneOf_1","allOf_1","require$$13","if_1","require$$14","thenElse_1","require$$15","getApplicator","draft2020","validate$DataFormat","validateFormat","fmts","fDef","fType","unknownFmt","invalidFmt","callFormat","validData","formatDef","unknownFormat","fmtType","fmtRef","getFormat","validCondition","unknownMsg","fmtDef","fmt","format_2","draft7","applicator_1","format_1","metadata_1","draft7Vocabularies","DiscrError","types_1","discrError","validateMapping","getMapping","tagValue","applyTagSchema","oneOfMapping","topRequired","hasRequired","tagRequired","propSch","addMappings","addMapping","draft7_1","discriminator_1","draft7MetaSchema","META_SUPPORT_DATA","META_SCHEMA_ID","DynamicRangeValidator_1","ajv_1","DynamicRangeValidator","templateIsValid","catalogData","catalogIsValid","tempalteData","ipex_range_format_json_1","ipex_range_format_catalog_json_1","catalog_file_json_1","catalog_item_json_1","templates_file_json_1","template_item_json_1","template_defs_json_1","template_box_json_1","template_bound_json_1","template_connector_json_1","template_product_structure_json_1","IPEXRangeFormatCatalogSchemas","DynamicRangeCatalogSchemas","DynamicRangeTemplateSchemas","core_creator","core_2","core_3","DragUtils_1","withRoom","withHistory","placementService","roomSystem","FunctionalZoneValidationBase_1","FunctionalZoneValidationBase","parentOfEntityToValidate","snapParent","rootHierarchy","myHierarchyIndex","finishedAll","rootHierarchyIndex","finishedCurrent","ZoneVsZoneValidationResult_1","ZoneVsZoneValidationResult","entityWithZone1","intersectingZone1","entityWithZone2","intersectingZone2","ZoneVsZoneRule_1","ZoneVsZoneRule","restrictedLayer1","restrictedLayer2","includeAncestors","myZones","otherZones_1","myZone","otherZone","bothZonesIncludedInRestrictedLayers","resultOtherWay","ZoneVsColliderValidationResult_1","ZoneVsColliderValidationResult","entityWithZone","intersectingZone","entityWithCollider","intersectingCollider","ZoneVsColliderRule_1","ZoneVsColliderRule","restrictedLayer","myColliderPolyhedron_1","otherZones","ZoneVsColliderExceptSomeThingsRule_1","ZoneVsColliderExceptSomeThingsRule","componentIdToExclude","ViewerSurfaceReferenceComponent_1","ViewerSurfaceReferenceComponent","theOther","thisId","otherId","DebugSurfaceCleanupSystem_1","DebugSurfaceCleanupSystem","oldViewerSurfaceReferenceComponent","DebugSurfaceDrawingSystem_1","DebugSurfaceDrawingSystem","viewerSurfaceReferenceComponent","debugSurfaceComponent","surfaceObjects","DebugSurfaceUtils_1","DebugSurfaceUtils","drawingSystem","cleanupSystem","systemID","CanvasComponent_1","CanvasComponent","SnapBackUtils","snapEntitiesToClosestPlace","SnapBackResultType","MIN_DISTANCE_COUNTED_AS_MOVEMENT","bestSnapForEachEntity","findClosestValidatedSnap","sortByValidAndDistance","requiredMovement","validatedCandidate","RoomHierarchyUtils","getRoomDimensionsFromLegacyComponents","getChildrenOfRoomAndScene","roomWithGeometry","roomWithDimensions","dimensionsComponent","findRoom","nonRoomChildren","roomDescendants","findAllNonRoomPartDescendants","isRoomEntity","roomPart","SerializationUtils","RoomHierarchyUtils_1","SnapBackUtils_1","KvadratVPCComponent_1","KvadratVPCComponent","vpc","_other","KvadratVPCComponentSerializer","OutlineUtils_1","core_creator_1","require$$16","require$$17","require$$18","require$$19","require$$20","require$$21","require$$22","require$$23","require$$24","require$$25","require$$26","require$$27","SerializationUtils_1","require$$28","require$$29","_IpexViewerComponent","__publicField","IpexViewerComponent","fromMeters","toMeters","toVector","toIVector3","IPEXViewerObject","_objectId","_senderId","screenCoords","viewerRotation","materialId","parentViewerObject","earcutModule","earcut","holeIndices","hasHoles","outerLen","outerNode","linkedList","invSize","eliminateHoles","earcutLinked","clockwise","signedArea","insertNode","removeNode","filterPoints","again","area","indexCurve","stop","isEarHashed","isEar","cureLocalIntersections","splitEarcut","ax","bx","ay","by","pointInTriangle","zOrder","intersects","locallyInside","isValidDiagonal","splitPolygon","getLeftmost","compareX","eliminateHole","bridge","findHoleBridge","bridgeReverse","hx","hy","my","tanMin","sectorContainsSector","sortLinked","numMerges","pSize","qSize","inSize","leftmost","intersectsPolygon","middleInside","o1","o3","o4","onSegment","inside","b2","an","bp","polygonArea","trianglesArea","holeIndex","edge3","edge4","edge5","edge6","edge7","edge8","edge9","edge11","edge12","ProxyLoader","primitive_builder","outline_positions","outline_indices","on_complete","elapsed_time","triangle_floats","normal_scales","binormal_scales","half_size","edge_shift","offset_vector1","cylinder_point1","cylinder_point2","offset_vector2","cylinder_point3","cylinder_point4","animation_resolve","animation_reject","internal_animation_promise","IPEXViewerCoreAdapter","ipexViewer","coords","clickComponent","isAlwaysVisible","objectId","visibleObjects","meanPos","viewerPos","newViewerPos","_enable","viewerRadius","sphereId","boxId","planeId","planeMaterial","zNormal","iNormal","rotateAroundVector","dotProd","degreeToRotate","vertices_aligned_to_z","trianglesVertices","swapped","_CameraComponent","CameraComponent","formatProdErrorMessage","$$observable","symbol_observable_default","randomString","ActionTypes","actionTypes_default","createStore","preloadedState","enhancer","currentReducer","currentListeners","nextListeners","listenerIdCounter","isDispatching","ensureCanMutateNextListeners","getState","subscribe","isSubscribed","listenerId","dispatch","replaceReducer","nextReducer","outerSubscribe","observeState","observerAsObserver","assertReducerShape","reducers","combineReducers","reducerKeys","finalReducers","finalReducerKeys","shapeAssertionError","hasChanged","nextState","previousStateForKey","nextStateForKey","compose","funcs","applyMiddleware","middlewares","createStore2","middlewareAPI","chain","isAction","NOTHING","DRAFTABLE","DRAFT_STATE","die","isDraft","isDraftable","isMap","isSet","objectCtorString","Ctor","each","getArchtype","thing","has","propOrOldValue","is","latest","shallowCopy","strict","isPlain","deep","dontMutateFrozenCollections","getPlugin","pluginKey","createScope","parent_","immer_","usePatchesInScope","patchListener","revokeScope","leaveScope","revokeDraft","enterScope","immer2","draft","processResult","baseDraft","finalize","maybeFreeze","rootScope","childValue","finalizeProperty","resultEach","isSet2","parentState","targetObject","rootPath","targetIsSet","createProxyProxy","traps","objectTraps","arrayTraps","revoke","readPropFromProto","prepareCopy","createProxy","getDescriptorFromProto","current2","markChanged","Immer2","recipe","defaultBase","base2","hasError","ip","patches","inversePatches","applyPatchesImpl","currentImpl","immer","produce","createThunkMiddleware","extraArgument","thunk","withExtraArgument","composeWithDevTools","hasMatchFunction","createAction","prepareAction","actionCreator","Tuple","_Tuple","freezeDraftable","createNextState","getOrInsertComputed","compute","isBoolean","buildGetDefaultMiddleware","immutableCheck","serializableCheck","actionCreatorCheck","middlewareArray","thunkMiddleware","SHOULD_AUTOBATCH","createQueueWithTimer","notify","autoBatchEnhancer","notifying","shouldNotifyAtEndOfTick","notificationQueued","queueCallback","notifyListeners","listener2","wrappedListener","unsubscribe","buildGetDefaultEnhancers","middlewareEnhancer","autoBatch","enhancerArray","configureStore","getDefaultMiddleware","devTools","enhancers","rootReducer","isPlainObject2","finalMiddleware","finalCompose","compose2","getDefaultEnhancers","storeEnhancers","composedEnhancer","executeReducerBuilderCallback","builderCallback","actionsMap","actionMatchers","defaultCaseReducer","typeOrActionCreator","matcher","isStateFunction","createReducer","mapOrBuilderCallback","finalActionMatchers","finalDefaultCaseReducer","getInitialState","frozenInitialState","caseReducers","reducer2","caseReducer","isDraft2","isDraftable2","createNextState2","isAnyOf","matchers","urlAlphabet","nanoid","commonProperties","RejectWithValue","FulfillWithMeta","miniSerializeError","simpleError","createAsyncThunk","createAsyncThunk2","typePrefix","payloadCreator","requestId","pending","abortController","abortHandler","abortReason","abort","finalAction","conditionResult","abortedPromise","unwrapResult","asyncThunkSymbol","getType","actionKey","buildCreateSlice","creators","cAT","reducerPath","buildReducerCreators","reducerNames","contextMethods","name2","reducerName","reducerDefinition","reducerDetails","isAsyncThunkSliceReducerDefinition","handleThunkCaseReducerDefinition","handleNormalReducerDefinition","buildReducer","extraReducers","finalCaseReducers","sM","selectSelf","injectedSelectorCache","_reducer","makeSelectorProps","reducerPath2","injected","selectSlice","sliceState","getSelectors","selectState","selectorCache","wrapSelector","injectable","pathOpt","newReducerPath","rootState","createSlice","asyncThunk","prepare","createNotation","maybeReducerWithPrepare","prepareCallback","isCaseReducerWithPrepareDefinition","settled","isShallowIdentical","currentStateValue","sceneReducer","sceneAction","measurementsVisible","userWantsMeasurementVisible","hasShownIntroAnimation","hasAllSelectedModelsLoaded","doorsOpened","BROWSER_ALIASES_MAP","BROWSER_MAP","PLATFORMS_MAP","OS_MAP","ENGINE_MAP","Utils","versionA","versionB","isLoose","versionAPrecision","versionBPrecision","lastPrecision","chunks","_version","assigners","assigner","browserName","browserAlias","commonVersionIdentifier","browsersList","notLikeAndroid","butAndroid","regexpWithoutDeviceSpec","regexpWithDeviceSpec","osParsersList","versionName","os","platformParsersList","platform","iDevice","likeIDevice","osMajorVersion","enginesParsersList","isGecko","likeGecko","Parser","UA","skipParsing","browserDescriptor","browserParsersList","_browser","_os","_platform","_engine","checkTree","platformsAndOSes","platformsAndOSCounter","browsers","browsersCounter","currentDefinition","platformsAndOSNames","OSMatchingDefinition","osResult","platformMatchingDefinition","platformResult","browserNames","matchingDefinition","includingAlias","defaultBrowserName","browserNameLower","alias","expectedResults","comparableVersion","currentBrowserVersion","osName","platformType","engineName","anything","anythings","Bowser","ButtonSizeEnum","IconButtonSizeEnum","IKEA_GLOBAL_HOME","QUERY_PARAMS","PLATFORMS","SprCodesEnum","SprCodes","LOCAL_STORAGE_PREFIX","LOCAL_STORAGE_CORE_CONFIG","SCREENSHOT_ERROR_MESSAGE","SPR_REGEX","VPC_REGEX","InsightsEventsEnum","CORE_TO_VIEWER_SCALE","MM_PER_CM","PANELS_PER_DOOR_FRAME","SheetEnum","RangeFamilyEnum","AreaEnum","SheetSectionsEnum","NavigationSectionsEnum","AppStateEnum","defaultViewerCalculations","mobileNavigationBarHeight","largestSkapaBreakpoint","getBreakpoint","currentWidth","isLargestBreakpoint","selectButtonSize","shouldUseSmallButtonSize","selectIconButtonSize","shouldUseSmallIconButtons","selectGutterSize","constantOuterMargin","selectGutterHalfSize","constantMaxWidth","constantCustomizeMenuWidth","validateUrl","httpsLink","VIEWER_DEFAULT_ALPHA_INDEX","NR_OF_SUGGESTIONS_TO_SHOW_BEFORE_SHOW_MORE","disabledStoresForSharing","CriticalCatalogsEnum","SentryTags","WebGLContext","ScreenshotDirectionsEnum","getDataIdByPathname","icfVersion","NavigationOriginEnum","useQuery","EnvironmentEnum","DeviceTypeEnum","OrientationTypeEnum","getEnvironment","getDexfSegment","getAppName","getAppVersion","isRunningTest","isE2eTest","isE2eOrUnitTest","getAddonAppPath","getNonVersionedAssetsPath","isKiosk","isForcedProduction","isTouchDevice","isUpptacka","isIpexGallery","isIpexGalleryOrUpptacka","useIdleKioskHandler","showLanguageSelector","usesVirtualKeyboard","isLighthouse","getIdleTime","idleTimeString","getDeviceType","isTablet","getOrientation","getUserAgent","configurationAction","configurationReducer","showAppLoadingScreen","defaultPanelStyles","selectedPanelStyles","selectedPanelPatternStyles","selectedDoor","storageBehindVisible","storageBehind","unsupportedStorageBehind","activeStorageBehindGallery","skyttaCatalogData","paxPanelsCatalogData","showErrorPage","showLoadingSummaryButton","showSceneLoadingScreen","hasUnsavedChanges","screenshot","arrivedFromQrCode","readyToSaveCoreState","sceneReady","iconName","arrowRight","chevronRightSmall","chevronRight","imageStrikethrough","personSmall","person","ShareDesignCardStateEnum","kompisStatesReducer","kompisStatesAction","stores","shareDesignCardState","zipCode","zipAvailabilities","zipInCardState","CuttingDoorsCta","DistancePiecesCta","CustomizeSkytta","OpenGuide","OpenDesign","ShareDesign","FAQ","HamburgerMenu","WhatsIncluded","ProductDetails","Help","BookAMeeting","StartFromScratch","HomeDelivery","StoreSelector","LanguageSelector","StorageBehind","StorageBehindGallery","StorageBehindImported","UnusedPanels","CustomizeMeasurements","CustomizeDoorLayouts","CustomizeFrames","CustomizePanels","CustomizePanelPatterns","CustomizeChr","CustomizeStopbars","CustomizeDoorHeights","initialSheets","initialActiveAreas","navigationReducer","navigationAction","activeArea","pageLoaded","activeSheets","showExitPrompt","sheetAlignment","visibleMenuModal","lastNavigation","PRIMITIVE","ARRAY","DATE","REGEXP","SET","ERROR","BIGINT","as","unpair","deserialize","EMPTY","shouldSkip","spread","lossy","structuredClone$1","DoorHeightEnum","DoorHeightEnum2","MAX_TOLERANCES","TOTAL_SKYTTA_HEIGHT_LOW_FRAME","MIN_SKYTTA_HEIGHT_LOW_FRAME","MAX_SKYTTA_HEIGHT_LOW_FRAME","TOTAL_SKYTTA_HEIGHT_HIGH_FRAME","MIN_SKYTTA_HEIGHT_HIGH_FRAME","MAX_SKYTTA_HEIGHT_HIGH_FRAME","ALL_DOOR_FRAMES","DoorFrameColorEnum","DoorFrameColorEnum2","DEFAULT_DOOR_FRAME_COLOR","getDoorFrameProductRef","getDoorFrameProductReferences","getDoorFrameSize","widthType","heightType","colorType","widthIndex","heightIndex","art","isProductADoorFrame","isValidSkyttaColor","missingSkyttaProducts","doorHeightOptionsAvailable","railColors","lowDoorColors","highDoorColors","missingColors","getDefaultDoorFrameColorIndex","RailTrackEnum","RailTrackEnum2","RailTrackTypeEnum","RailTrackTypeEnum2","ORIGINAL_RAIL_LENGTH","RAIL_DEPTH_TWO_TRACK","RAIL_DEPTH_THREE_TRACK","ALL_TRACKS","getRailProductRef","railType","trackType","isProductARail","getRailSize","rail","track","trackIndex","getRailDepth","getRailTrack","railTrackIndex","getLocale","parseLocale","getLanguage","getCountry","translationsToAdd","UnitEnumHardCoded","UnitEnumTranslationKeys","getValueWithUnit","useMetric","localizedValue","showUnit","translateString","unitExtension","replaceValuesInString","translatedText","placeholderValues","originalString","placeholderKey","formattedValue","newString","AppRoutesEnum","ViewIds","getViewIdAriaLabel","getVpcId","vpcId","getSprId","sprId","getUrl","isValidUrl","oldUrl","newUrlString","redirects","designCodeFromQuery","storageDesignCodeFromQuery","validId","designSource","redirectToNewLocale","isUpptackaSession","currentLocale","productId2ShoppingItem","product2ShoppingProduct","shoppingProduct2Product","shoppingProduct2ProductItem","shoppingProduct2ShoppingItem","shoppingItem2ProductId","productId2ShoppingProduct","getVpcForSpr","DexfTypes","getDexfType","shoppingProducts2NormalizedTypes","MANDATORY_PRODUCTS","TOTAL_NR_OF_COLORS","REQUIRED_NUMBER_OF_COLORS_AVAILABLE","getMandatoryProductsData","allProducts","validationData","currentId","invalidMandatories","haveMissingMandatoryProducts","missingString","haveLessRailColorsThanRequired","noDoorHeightOptionsAvailable","verifyProduct","defaultProducts","prependArt","getProductImage","getSolutionDescription","productContent","serviceSettings","translationEndpoints","getServiceSettings","appSettings","getService","getOptionalParams","futureDate","getProductsData","normalizedObject","getProducts","randomizeList","mapCatalogProducts","missingIds","customRangeFamily","dexfAssets","parsedDexfModels","catalogProducts","dexfLinkedCatalogs","productData","deepCopiedSkyttaMainCatalog","structuredClone","skyttaMainCatalog","deepCopiedPaxPanelsCatalog","paxPanelsCatalog","dexfLinkedSkyttaCatalog","dexfLinkedPaxPanelsCatalog","fetchProductsData","productAction","allValidSPRs","isSpr","hasContextProductPicture","vpcCode","sortedSPRs","handleVisibleProducts","visibleProducts","toTypes","productsReducer","activeProductId","getEndpointsOverrides","getSettings","cookieConsentOverride","fetchSettings","settingsReducer","fetchTranslations","translationsReducer","userAgentReducer","userAgentActions","isMobile","createAppSelector","selectProducts","selectValidSPRs","getShoppingProductsByIds","states","getProductItemsByIds","_state","selectVisibleProducts","selectMissingSkyttaProducts","selectDoorHeightOptionsAvailable","selectActiveProductId","selectActiveArea","navigation","selectShowExitPrompt","selectSheets","selectActiveSheetIds","selectSheetAlignment","selectVisibleMenuModal","selectLastNavigation","selectSelectedDoor","selectStorageBehindIsVisible","selectStorageBehind","selectUnsupportedStorageBehind","selectActiveStorageBehindGallery","selectShowErrorPage","selectShowAppLoadingScreen","selectShowLoadingSummaryButton","selectShowSceneLoadingScreen","selectHasUnsavedChanges","selectArrivedFromQrCode","selectPanelPatternStyles","selectSelectedPanelStyles","selectDefaultPanelStyles","selectReadyToSaveCoreState","selectSceneReady","selectStoreId","kompisStates","selectZip","selectStores","selectShareDesignCardState","selectIsMeasurementsVisible","selectUserWantsMeasurementVisible","selectHasShownIntroAnimation","selectHasAllSelectedModelsLoaded","selectIsDoorsOpened","selectTranslations","selectAppSettings","selectShouldUseMobileLayout","selectOrientation","selectIsLandscapeMobile","selectIsSceneLoadingScreenVisible","selectIsCustomizeSheetOpen","sentryReduxEnhancer","CUSTOMIZE_MENU_BACK_BUTTON","CUSTOMIZE_MENU_SKYTTA_TITLE","ADD_STOPBARS_LABEL","ADD_STOPBARS_SWITCH","DOOR_LAYOUT_MESSAGE_LABEL","RAILS_LABEL","FAQ_LINK_LABEL","RECOMMENDED_DEPTH_LABEL","CUSTOMIZE_MENU_CONTENT","ACTIVE_ACCORDION_ITEM","RENDER_CANVAS","DataTestIdEnum","Lists","getAssetsPath","cameraSettings","customizeMenuWidthInPx","screenshotDesktopHeightOverride","windowHeight","windowWidth","imageSettings","screenshotSettings","Row","Rectangle","RectangleAtlas","desired_texels_per_unit","rectangle","next_start_y","rows","placed_row","best_row","best_row_offset","num_rows","new_start_y","TriangleCustomMesh","num_indices","edge0","num_verts","new_indices","new_positions","new_normals","new_colors","new_uv0","new_uv1","index_counter","copy_buffer_data","dest_offset","src_indices","num_values","new_index","SKIRTING_HEIGHT","SKIRTING_DEPTH","calculate_skirting_segments","wall_length","doors","cap_start","b1","minx","maxx","miny","maxy","insert_hole_vertices","hole_vertices","left_ray","closest_distance","closest_index","closest_a","closest_b","insert_hole_for_windows","wall_vertices","get_materials","Room","_wall_material","_wallskirt_material","_floor_material","_ceiling_material","coord1","coord2","normal_length","vector3_up","num_walls","atlas","floorsize_x","floorsize_z","floor_vertices","floor_atlas","ceiling_atlas","wall_atlas","window_table","window_table_for_shadow_wall","window","door_table","skirting_joint_corrections","max_wall_height","skirting_uvs","wall_skirting_infos","skirting_positions","skirting_uv1","wall_height","tesselate_polygon_with_ear_clipping","ceiling_id","wall_index","shadow_wall","wall_delta","door_vertices","area_light","windows","shadow_windows","window_center","wall_id","wall_normal","skirting_index","skirting","az","bz","side_uv","top_uv","skirting_joint_offset_a","skirting_joint_offset_b","adx","adz","bdx","bdz","u_size","skirting_cap_uv_length","side_min_u","side_max_u","index_offset","index_a","index_b","skirtings","wall_material","wallskirt_material","floor_material","ceiling_material","wallskirt_id","lightmaps","lightmap","door_index","windo_index","walls_visible","wall_center_point","to_plane","wall_visible","point_in_2d_triangle","base_u","base_v","shadow_only","is_ear","prev_index","prevprev","nextnext","ymin","ymax","x_size","y_size","custom_mesh","SkyttaComponentIds","componentSerializationKey","CustomOutlineComponentDeserializer","CustomOutlineComponent","viewerId","RailTypeEnum","RailTypeEnum2","DoorWidthEnum","DoorWidthEnum2","STOP_BAR_2_TRACKS_PRODUCT_REF","STOP_BAR_3_TRACKS_PRODUCT_REF","STOP_BAR_WIDTH","STOP_BAR_HEIGHT","getStopBarProductRef","railTrackType","decimalPlaces","decimal","SortOrderEnum","SortOrderEnum2","sortNumbers","sortOrder","sumArray","RailCalculations","numberOfDoors","doorHeightType","roomHeight","DEFAULT_DOOR_LAYOUT_INDEX","DoorLayoutStatusEnum","DoorLayoutStatusEnum2","DEFAULT_FILTER","EXCLUDE_FILTER","_DoorCalculations","widthTypeWidthInMm","layouts","numThin","numWide","totalNrOfDoors","totalMinimumOverlap","layout","roomWidth","selectedStopBar","maxOpening","overlapPerDoor","stopbarWidth","considerLargeOverlap","roomIsTooLarge","considerSmallOverlap","canBeRecommended","recommended","totalDoorWidth","thinnestDoor","oneDoorTooMany","considerOpening","nrOfTracks","tracks","wideDoorWidth","thinDoorWidth","doorWidths","newTracks","doorWidth","tracksSorted","aTrack","bTrack","tracksWithDoors","widestTrack","selectedIndex","selectedTrackType","allLayouts","bestLayoutIndex","widthToFill","isBest","totalOverlap","considerStopbars","bestLayout","numThinDoors","numWideDoors","numberOfInvalidOverlaps","haveStopbars","numberOfOverlaps","stopBarWidth","widthRange","DoorCalculations","nonNullable","DEFAULT_PANEL_STYLE_INDEX","PANELS_THAT_CAN_NOT_BE_CUT","PANELS_THAT_CAN_BE_FLIPPED","ALL_PANELS","getDefaultPanels","doorHeight","ALL_PANELS_FLATTENED","getPanelProductReference","styleIndex","getPanelProductReferences","isPanelPossibleToCut","isPanelPossibleToFlip","getPanelStyleIndex","panelArticleId","getDefaultPanel","defaultPanels","globalDefaultPanels","validPanels","getTotalAmountForProducts","PanelPattern","PanelPattern2","PanelsChangedEventType","getThinPanels","coreApi","selectedDoorLayoutIndex","selectedDoorHeight","getWidePanels","getActivePanelItemsByDoorLayout","thinItems","wideItems","getProductsForPanels","thinProducts","wideProducts","_product","bothAreValidDraft","panelStyleIndex","sortPanels","allPanelItems","filterAndSortDisabled","getDoorsInScope","selectedEntities","getSelectedEntities","getDoorsFramesInScene","getPanelStyleFromEntity","panel","isFlipped","comparePanelStyles","replacePanelsInScope","panelStyle","getPanelsInScope","getDataForPanelItems","validProducts","panelItems","panels","combinedProduct","thinProduct","wideProduct","bothAreValid","selectedPanelsCanNotBeCut","disableDoorsThatCanNotBeCut","panelCanBeFlipped","productVariants","productVariations","backSideProduct","getPanelsInDoorFrameSortedFromTopToBottom","doorFrame","DefaultRoomSettings","getDefaultRoomHeight","defaultRoomSize","getSelectedEntity","getPanelsInScene","getRailsInScene","getDoorsFramesInSceneSortedLeftToRight","sortDoorFrames","sortDoorsByRailTrack","groupByRailTrack","railTrackGroups","railTrack","getDoorsByRailTrack","getDoorsInOrderOfPlacement","doorsByRailTrack","maxDoorsOnTrack","subArr","shouldAlternateDoors","doorIndex","isEvenDoor","getRoomWidth","getRoomHeight","getUserRoomHeight","getUniquePanelStyles","getPanelStyles","isSkyttaEntityWithViewerObject","isSelectedPanelsPossibleToCut","haveUnusedPanels","prodRefs","countMap","nrOfPanels","remToPixels","mapModelUris","preloadAllModels","combineModelArrays","getViewer","getViewerId","hasEnteredObject","isRtl","ltlMousePosX","rtlMousePosX","mousePosX","mousePosY","canvasBoundsMax","canvasBoundsMin","enteredObject","isCameraBehindDoors","getCamera","enteredObjectX","enteredObjectY","isCurrentlyHovered","viewerIds","isClosestObjectByDepth","outlineObjectsByDepth","closestObject","isSelect","currentColor","clickedOutsideAllObjects","outlineObjectIds","setOutlineColor","closestObjectCurrentColor","isModelHovered","outlineId","hoveredObjects","draggedDoorOutlineId","isClosestObjectHovered","_ViewerRoomComponent","ViewerRoomComponent","invisibleMaterial","outlineObjectMaterial","RoomRenderingSystem","outlineObjectId","roomSize","_oldSize","_roomDimensions","_room","railComponent","newRailPosition","doorFrameEntity","doorFrameSize","model_id","transparent_material","oversize","box_handle","boxPosition","roomComponent","ceilingMaterial","roomMaterials","wallMaterial","skirtingMaterial","floorMaterial","orbitCamera","orbitCameraScreenshot","directionalLight","roomRenderingSystem","productPlacementUtil","getBetraktaCrashReport","memory_tracker","memory_tracker_report","effects","babylon_shader_cache_count","babylon_shader_cache_waste_bytes","rotateOnAngleCoroutine","cameraParams","on_done","cameraCoordinates","elapsedTime","cameraZPos","clampedTime","easedTime","newX","newY","newZ","dracoSource","getScreenshotCamera","restrictCameraMovement","camTarget","onResize","canvasWidth","canvasHeight","addAmbientOcclusion","createViewerDefaultSetup","importedCore","importedProductPlacementUtil","inputGatherer","setupEnvironmentMap","setupLight","coreViewer","setupCoreViewerBridge","overrideInitialTabIndex","awaitVisibleModelsOnScene","objectIds","centeredRoomDepthTarget","fromMMtoM","roomDepth","cameraDirection","subtractedPosTar","frameObjects","cameraTargets","testRoomEntity","setCameraRelativeToRoom","noAnimate","dontAwaitModels","allModelsVisible","tempCamera","setLightPosition","zCoord","setShadows","hasCookieConsent","insightsApiService","CURRENT_RUNNING_TEST","CookieConsentLevelsEnum","StepName","getStepLevel","React","objectIs","useSyncExternalStore","useRef","useMemo","useDebugValue","useSyncExternalStoreWithSelector_production","getSnapshot","getServerSnapshot","isEqual","instRef","inst","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","withSelectorModule","defaultNoopBatch","createListenerCollection","nullListeners","createSubscription","parentSub","subscriptionsAmount","selfSubscribed","addNestedSub","trySubscribe","cleanupListener","tryUnsubscribe","notifyNestedSubs","handleChangeWrapper","trySubscribeSelf","tryUnsubscribeSelf","canUseDOM","isDOM","isRunningInReactNative","isReactNative","getUseIsomorphicLayoutEffect","React.useLayoutEffect","React.useEffect","useIsomorphicLayoutEffect","ContextKey","gT","getContext","React.createContext","realContext","ReactReduxContext","Provider","providerProps","serverState","contextValue","React.useMemo","Context","Provider_default","createReduxContextHook","React.useContext","useReduxContext","createStoreHook","useReduxContext2","useStore2","useStore","createDispatchHook","useDispatch2","useDispatch","refEquality","createSelectorHook","useSelector2","equalityFnOrOptions","equalityFn","reduxContext","getServerState","wrappedSelector","React.useCallback","selectedState","useSyncExternalStoreWithSelector","React.useDebugValue","useSelector","useAppDispatch","useAppSelector","KompisContext","useKompis","KompisProvider","memoValues","INSIGHTS_LONG_TERM_ID_KEY","InsightsContext","useInsights","useContext","getLongTermId","InsightsProvider","connected","setConnected","useState","isPlanningSessionInitialised","setIsPlanningSessionInitialised","setSprId","kompisAnalytics","setKompisAnalytics","betraktaModule","setBetraktaModule","computerId","kioskId","checkConsent","connectApplication","hasConsent","isConnected","validStoreId","variableComputerId","variableKioskId","idKiosk","idStore","isIngkaMarket","insightEvent","sendUserFlowStep","initPlanningSession","sprInHashResults","fontWeightBold","radiusS","radiusM","space25","space100","space125","space150","space200","space250","space300","durationQuickWeb","breakpointXl","breakpointL","breakpointM","designTokens","debounceAnimationFrame","getWindowDimensions","useWindowDimensions","windowDimensions","setWindowDimensions","handleResize","useUpdateUserAgent","valueWithoutEm","breakpointInPixels","mobileAndTabletPortrait","supportsWebgl","supportsWebp","App","__vitePreload","ErrorPage","handleShowErrorPage","hasMandatoryProductsMissing","showErrorPageForInvalidProducts","webpBrowser","webglBrowser","showErrorPageForUnsupportedBrowser","PreApp","appReady","setAppReady","initError","setInitError","processedData","setProcessedData","errorPageVisible","allProductData","panelPatternStyles","processData","validPanel","defaultPanel","validatePayload","awaitedResult","hasSettings","hasTranslations","hasProducts","hasPanelPatternStyles","hasDoorHeightOptionsAvailable","hasSelectedPanelStyles","hasDefaultPanelStyles","jsx","jsxs","Suspense","PreApp$1","hasOwn","classNames","appendClass","parseValue","newClass","ListView","forwardRef","showDivider","otherProps","Children","cloneElement","ListView_default","kebabToCamelCase","$1","reactAttributes","styleAcc","styleKey","styleValue","renderPaths","createElement","chevron_right_small_default","chevron_right_default","arrow_right_default","link_out_default","copy_default","reqText","htmlFor","Label_default","lib_default","FormFieldContext","createContext","FormFieldProvider","shouldValidate","setCharacterCount","IconBaseElement","viewBox","ariaHidden","SSRIcon","modifier","cssStyles","SSRIcon_default","Checkbox","publicRef","caption","onChange","describedById","subtle","indeterminate","checkboxRef","Checkbox_default","RadioButton","RadioButton_default","Switch","Switch_default","image_strikethrough_default","image_default","Image","alt","srcSet","loading","setError","setLoaded","imageRef","errorEvent","loadEvent","artificialLoadEvent","artificialErrorEvent","imageFallback","Image_default","AspectRatioBox","tagType","SpanOrDiv","AspectRatioBox_default","PaymentLogo","PaymentLogo_default","person_default","person_small_default","Avatar","withIcon","imageProps","staticColour","screenReaderText","avatarContent","Fragment","Avatar_default","ListViewItem","avatarProps","control","addOn","leadingIcon","imageAltText","paymentLogo","inset","emphasised","controlProps","quantityLabel","controlIcon","leadingIconPosition","controlId","controlTypes","itemClasses","trailingIcon","linkOut","TrailingIcon","formComponentProps","FormControl","avatarSize","leadingOptsMap","leadingMedia","Loading","labelTransitions","labelPosition","displayText","setDisplayText","fadeOut","setFadeOut","fadeIn","setFadeIn","fadeOutTimer","fadeInTimer","loadingClass","loadingTextClasses","shouldRenderLabel","Loading_default","LoadingBall","loadingBallClass","LoadingBall_default","inlineBlock","TagName","Skeleton_default","Text","headingSize","Tag","Text_default","styled","SkapaText","Title","Z_INDEXES","LoadingScreenContainer","$isScene","LoadingScreenWrapper","LoadingScreenScene","LoadingScreenApp","listSkeletonProps","ShareDesignLoadingSkeleton","CustomizeMenuLoadingSkeleton","DesignCodeWrapper","CopyDesignLoadingSkeleton","schedulerModule","aa","da","ea","fa","ha","ja","ka","la","ma","oa","qa","ra","sa","ta","wa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","Ka","La","Ma","Na","Oa","Pa","Qa","Ra","Sa","Ta","Ua","Va","Wa","Xa","Ya","Za","ab","db","eb","gb","hb","jb","kb","lb","mb","ob","qb","rb","tb","ub","wb","xb","yb","zb","Ab","Bb","Cb","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","Nb","Ob","Pb","Qb","Rb","Sb","Tb","Ub","Vb","Wb","Xb","Yb","Zb","$b","ac","bc","cc","dc","ec","fc","gc","hc","ic","jc","kc","lc","mc","nc","qc","rc","uc","wc","xc","yc","zc","Ac","Bc","Cc","Dc","Ec","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Pc","Qc","Rc","Sc","Tc","Uc","Vc","Wc","Xc","Yc","Zc","$c","ad","bd","dd","fd","gd","hd","jd","kd","ld","md","nd","od","pd","qd","rd","td","ud","vd","wd","xd","yd","Ad","zd","Bd","Cd","Dd","Ed","Fd","Gd","Hd","Id","Jd","Kd","Ld","Md","Nd","Od","Pd","Qd","Rd","Sd","Td","Ud","Vd","Wd","Xd","Yd","Zd","$d","de","pe","Be","af","bf","cf","df","ef","ff","gf","hf","jf","kf","lf","mf","nf","of","pf","qf","rf","sf","uf","vf","wf","na","xa","$a","xf","yf","zf","Af","Bf","Cf","Df","Ef","Ff","Gf","Hf","Jf","Kf","Lf","Mf","Nf","Of","Pf","Qf","Rf","Sf","Tf","Uf","Vf","Wf","Xf","Yf","Zf","ag","bg","cg","dg","eg","fg","gg","hg","ig","jg","kg","mg","og","pg","qg","rg","sg","tg","ug","vg","wg","xg","yg","zg","Ag","Bg","Cg","Dg","Eg","Fg","Gg","Hg","Ig","Jg","Kg","Lg","Mg","Ng","Og","Pg","Qg","Rg","Sg","Tg","Ug","Vg","Wg","Xg","Yg","Zg","$g","ah","bh","dh","eh","fh","gh","hh","jh","kh","lh","mh","nh","oh","ph","qh","rh","sh","th","uh","vh","wh","xh","yh","zh","Ah","Bh","Ch","Dh","Eh","Fh","Gh","Hh","Ih","Jh","Kh","Lh","Mh","Nh","Oh","Ph","Qh","Rh","Sh","Th","Uh","Vh","Wh","Xh","Yh","Zh","$h","bi","ci","di","ei","fi","gi","ii","ji","ki","mi","ni","oi","qi","ui","wi","xi","yi","zi","Ai","Bi","Ci","Di","Ei","Fi","Gi","Hi","Ii","Ji","Ki","Li","Mi","Ni","Oi","Pi","Qi","Ri","Si","Ti","Ui","Vi","Wi","Xi","Yi","Zi","aj","bj","cj","dj","ej","fj","gj","hj","ij","jj","kj","lj","mj","nj","oj","pj","qj","rj","sj","uj","wj","xj","yj","zj","Aj","Bj","Cj","Dj","Ej","Fj","Gj","Hj","Ij","Jj","Kj","Lj","Mj","Nj","Oj","Pj","Qj","Rj","Sj","Tj","Uj","Vj","Wj","Xj","Yj","Zj","ak","bk","ck","dk","ek","fk","gk","hk","ik","jk","kk","lk","mk","nk","ok","pk","qk","rk","sk","tk","uk","vk","wk","xk","yk","zk","Ak","Bk","Ck","Dk","Ek","Fk","Gk","Hk","Ik","Jk","Kk","Lk","Mk","Nk","Ok","Pk","Qk","Rk","Sk","Tk","Uk","Vk","Wk","Xk","Yk","Zk","$k","al","bl","dl","hl","kl","ll","ml","ol","pl","ql","rl","sl","tl","reactDom_production_min","checkDCE","reactDomModule","hasElementType","hasMap","hasSet","hasArrayBuffer","reactFastCompare","invariant","argIndex","TAG_NAMES","TAG_NAMES2","SEO_PRIORITY_TAGS","VALID_TAG_NAMES","REACT_TAG_MAP","HTML_TAG_MAP","carry","HELMET_ATTRIBUTE","HELMET_PROPS","getInnermostProperty","propsList","getTitleFromPropsList","innermostTitle","innermostTemplate","innermostDefaultTitle","getOnChangeClientState","getAttributesFromPropsList","tagAttrs","getBaseTagFromPropsList","primaryAttributes","innermostBaseTag","lowerCaseAttributeKey","getTagsFromPropsList","approvedSeenTags","approvedTags","instanceTags","instanceSeenTags","primaryAttributeKey","keys2","attributeKey","tagUnion","getAnyTrueFromPropsList","checkedTag","reducePropsToState","flattenArray","possibleArray","checkIfPropsMatch","toMatch","prioritizer","elementsList","propsToMatch","elementAttrs","without","SELF_CLOSING_TAGS","encodeSpecialCharacters","generateElementAttributesAsString","generateTitleAsString","attributeString","flattenedTitle","generateTagsAsString","attributeHtml","tagContent","isSelfClosing","convertElementAttributesToReactProps","initProps","mapped","generateTitleAsReactComponent","_type","generateTagsAsReactComponent","mappedTag","mappedAttribute","getMethodsForTag","getPriorityMethods","metaTags","linkTags","scriptTags","mapStateOnServer","baseTag","bodyAttributes","htmlAttributes","noscriptTags","styleTags","titleAttributes","prioritizeSeoTags","priorityMethods","server_default","instances","isDocument","HelmetData","React2","HelmetProvider","updateTags","headElement","tagNodes","oldTags","indexToDelete","newElement","existingTag","updateAttributes","elementTag","helmetAttributeString","helmetAttributes","attributesToRemove","attributeKeys","indexToSave","updateTitle","commitTagChanges","onChangeClientState","tagUpdates","addedTags","removedTags","_helmetCallback","handleStateChangeOnClient","client_default","HelmetDispatcher","Component2","nextProps","shallowEqual","helmetInstances","setHelmet","Helmet","Component3","fastCompare","nestedChildren","arrayTypeChildren","newChildProps","newProps","newFlattenedProps","arrayChildName","nestedChild","React3","childProps","helmetData","cookieNameRegExp","cookieValueRegExp","domainValueRegExp","pathValueRegExp","__toString","NullObject","dec","decode","eqIdx","colonIdx","endIdx","keyStartIdx","keyEndIdx","valStartIdx","valEndIdx","isDate","PopStateEventType","createHashHistory","createHashLocation","globalHistory","parsePath","createLocation","createHashHref","href2","hashIndex","createPath","validateHashLocation","getUrlBasedHistory","createKey","getHistoryState","parsedPath","searchIndex","getLocation","createHref2","validateLocation","v5Compat","getIndex","handlePop","historyState","replace2","createURL","locationArg","matchRoutesImpl","allowPartial","flattenRoutes","rankRouteBranches","decoded","decodePath","matchRouteBranch","parentsMeta","parentPath","flattenRoute","relativePath","joinPaths","routesMeta","computeScore","exploded","explodeOptionalSegments","restExploded","subpath","compareIndexes","paramRe","dynamicSegmentValue","indexRouteValue","emptySegmentValue","staticSegmentValue","splatPenalty","isSplat","initialScore","score","matchedParams","matchedPathname","remainingPathname","matchPath","normalizePathname","compiledParams","compilePath","pathnameBase","captureGroups","memo2","paramName","splatValue","caseSensitive","regexpSource","resolvePath","fromPathname","toPathname","resolvePathname","normalizeSearch","normalizeHash","getInvalidPathError","getPathContributingMatches","getResolveToMatches","pathMatches","resolveTo","toArg","routePathnames","locationPathname","isPathRelative","isEmptyPath","routePathnameIndex","toSegments","hasExplicitTrailingSlash","hasCurrentTrailingSlash","isRouteErrorResponse","validMutationMethodsArr","validRequestMethodsArr","DataRouterContext","DataRouterStateContext","ViewTransitionContext","FetchersContext","AwaitContext","NavigationContext","LocationContext","RouteContext","RouteErrorContext","useHref","useInRouterContext","navigator2","React2.useContext","useResolvedPath","joinedPathname","navigateEffectWarning","React2.useLayoutEffect","useNavigate","isDataRoute","useNavigateStable","useNavigateUnstable","dataRouterContext","routePathnamesJson","activeRef","React2.useRef","React2.useCallback","React2.createContext","useParams","routeMatch","React2.useMemo","useRoutes","useRoutesImpl","dataRouterState","future","isStatic","parentMatches","parentParams","parentPathname","parentPathnameBase","parentRoute","warningOnce","locationFromContext","parsedLocationArg","parentSegments","renderedMatches","_renderMatches","React2.createElement","DefaultErrorComponent","useRouteError","lightgrey","preStyles","codeStyles","devInfo","React2.Fragment","defaultErrorElement","RenderErrorBoundary","React2.Component","RenderedRoute","routeContext","errorIndex","renderFallback","fallbackIndex","errors2","needsToRunLoader","outlet","shouldRenderHydrateFallback","errorElement","hydrateFallbackElement","matches2","getChildren","getDataRouterConsoleError","hookName","useDataRouterContext","useDataRouterState","useRouteContext","useCurrentRouteId","thisRoute","useRouteId","routeId","router","alreadyWarned","React3.memo","DataRoutes","Navigate","React3.useContext","navigate","jsonPath","React3.useEffect","Route","_props","Router","basenameProp","locationProp","staticProp","navigationContext","React3.useMemo","locationContext","trailingPathname","React3.createElement","React3.Children","React3.isValidElement","treePath","React3.Fragment","defaultMethod","defaultEncType","isHtmlElement","isButtonElement","isFormElement","isModifiedEvent","shouldProcessLinkClick","_formDataSupportsSubmitter","isFormDataSubmitterSupported","supportedFormEncTypes","getFormEncType","encType","getFormSubmissionInfo","form","invariant2","loadRouteModule","routeModulesCache","routeModule","isHtmlLinkDescriptor","getKeyedPrefetchLinks","routeModules","dedupeLinkDescriptors","getNewMatchesForLinks","page","nextMatches","currentMatches","matchPathChanged","manifestRoute","routeChoice","getModuleLinkHrefs","includeHydrateFallback","dedupeHrefs","hrefs","sortKeys","preloads","deduped","singleFetchUrl","reqUrl","useDataRouterContext2","React9.useContext","useDataRouterStateContext","FrameworkContext","React9.createContext","useFrameworkContext","usePrefetchBehavior","prefetch","theirElementProps","frameworkContext","maybePrefetch","setMaybePrefetch","React9.useState","shouldPrefetch","setShouldPrefetch","onFocus","onBlur","onMouseEnter","onMouseLeave","onTouchStart","React9.useRef","React9.useEffect","setIntent","cancelIntent","composeEventHandlers","theirHandler","ourHandler","PrefetchPageLinks","dataLinkProps","React9.useMemo","React9.createElement","PrefetchPageLinksImpl","useKeyedPrefetchLinks","keyedPrefetchLinks","setKeyedPrefetchLinks","interrupted","linkProps","newMatchesForData","newMatchesForAssets","dataHrefs","routesParams","foundOptOutRoute","moduleHrefs","React9.Fragment","mergeRefs","refs","HashRouter","historyRef","React10.useRef","setStateImpl","React10.useState","setState","React10.useCallback","React10.startTransition","React10.useLayoutEffect","React10.createElement","ABSOLUTE_URL_REGEX2","Link","React10.forwardRef","discover","reloadDocument","preventScrollReset","viewTransition","forwardedRef","React10.useContext","isAbsolute","absoluteHref","isExternal","currentUrl","prefetchRef","prefetchHandlers","internalOnClick","useLinkClickHandler","React10.Fragment","NavLink","ariaCurrentProp","classNameProp","styleProp","routerState","isTransitioning","useViewTransitionState","nextLocationPathname","endSlashPosition","isActive","isPending","renderProps","ariaCurrent","Form","fetcherKey","onSubmit","submit","useSubmit","formAction","useFormAction","formMethod","submitHandler","submitter","submitMethod","getDataRouterConsoleError2","useDataRouterContext3","replaceProp","fetcherId","getUniqueFetcherId","currentRouteId","indexValues","vtContext","currentPath","nextPath","getBrowserTheme","TracesSampleRateEnum","ReplaysOnErrorSampleRateEnum","ReplaysSessionSampleRateEnum","E2E_TEST_ENVIRONMENT","unsupportedLocales","getReleaseName","cleanVersion","getSentryEnvironment","isVerboseSentry","setInitialTags","packageInfo","useSentryTags","setOrientationBasedSentryTags","getExceptionMaybe","castedError","beforeSendEventProduction","beforeSendEventLocal","beforeSendEventStage","setBeforeSendCallback","beforeSendTransactionEventStage","beforeSendTransactionEventLocal","setBeforeSendTransactionCallback","setInitialScope","filteredLocale","tracesSampleRate","SENTRY_DSN","initSentry","createRoot","StyleSheetManager"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1065,1066,1067,1068,1100,1101,1102,1131,1132,1133,1137,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196],"sources":["../../node_modules/react/cjs/react.production.min.js","../../node_modules/react/index.js","../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../node_modules/react/jsx-runtime.js","../../node_modules/@sentry/core/build/esm/debug-build.js","../../node_modules/@sentry/core/build/esm/utils-hoist/worldwide.js","../../node_modules/@sentry/core/build/esm/utils-hoist/debug-build.js","../../node_modules/@sentry/core/build/esm/utils-hoist/version.js","../../node_modules/@sentry/core/build/esm/carrier.js","../../node_modules/@sentry/core/build/esm/utils-hoist/logger.js","../../node_modules/@sentry/core/build/esm/utils-hoist/stacktrace.js","../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/handlers.js","../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalError.js","../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalUnhandledRejection.js","../../node_modules/@sentry/core/build/esm/utils-hoist/is.js","../../node_modules/@sentry/core/build/esm/utils-hoist/browser.js","../../node_modules/@sentry/core/build/esm/utils-hoist/string.js","../../node_modules/@sentry/core/build/esm/utils-hoist/object.js","../../node_modules/@sentry/core/build/esm/utils-hoist/time.js","../../node_modules/@sentry/core/build/esm/utils-hoist/misc.js","../../node_modules/@sentry/core/build/esm/utils-hoist/syncpromise.js","../../node_modules/@sentry/core/build/esm/session.js","../../node_modules/@sentry/core/build/esm/utils-hoist/propagationContext.js","../../node_modules/@sentry/core/build/esm/utils/merge.js","../../node_modules/@sentry/core/build/esm/utils/spanOnScope.js","../../node_modules/@sentry/core/build/esm/scope.js","../../node_modules/@sentry/core/build/esm/defaultScopes.js","../../node_modules/@sentry/core/build/esm/asyncContext/stackStrategy.js","../../node_modules/@sentry/core/build/esm/asyncContext/index.js","../../node_modules/@sentry/core/build/esm/currentScopes.js","../../node_modules/@sentry/core/build/esm/semanticAttributes.js","../../node_modules/@sentry/core/build/esm/tracing/spanstatus.js","../../node_modules/@sentry/core/build/esm/tracing/utils.js","../../node_modules/@sentry/core/build/esm/utils/parseSampleRate.js","../../node_modules/@sentry/core/build/esm/utils-hoist/baggage.js","../../node_modules/@sentry/core/build/esm/utils-hoist/tracing.js","../../node_modules/@sentry/core/build/esm/utils/spanUtils.js","../../node_modules/@sentry/core/build/esm/tracing/errors.js","../../node_modules/@sentry/core/build/esm/utils/hasSpansEnabled.js","../../node_modules/@sentry/core/build/esm/constants.js","../../node_modules/@sentry/core/build/esm/tracing/dynamicSamplingContext.js","../../node_modules/@sentry/core/build/esm/tracing/sentryNonRecordingSpan.js","../../node_modules/@sentry/core/build/esm/tracing/logSpans.js","../../node_modules/@sentry/core/build/esm/tracing/sampling.js","../../node_modules/@sentry/core/build/esm/utils-hoist/dsn.js","../../node_modules/vite-plugin-node-polyfills/shims/global/dist/index.js","../../node_modules/@sentry/core/build/esm/utils-hoist/normalize.js","../../node_modules/@sentry/core/build/esm/utils-hoist/envelope.js","../../node_modules/@sentry/core/build/esm/envelope.js","../../node_modules/@sentry/core/build/esm/tracing/measurement.js","../../node_modules/@sentry/core/build/esm/tracing/sentrySpan.js","../../node_modules/@sentry/core/build/esm/tracing/trace.js","../../node_modules/@sentry/core/build/esm/tracing/idleSpan.js","../../node_modules/@sentry/core/build/esm/eventProcessors.js","../../node_modules/@sentry/core/build/esm/utils-hoist/debug-ids.js","../../node_modules/@sentry/core/build/esm/utils/applyScopeDataToEvent.js","../../node_modules/@sentry/core/build/esm/utils/prepareEvent.js","../../node_modules/@sentry/core/build/esm/exports.js","../../node_modules/@sentry/core/build/esm/api.js","../../node_modules/@sentry/core/build/esm/integration.js","../../node_modules/@sentry/core/build/esm/utils-hoist/clientreport.js","../../node_modules/@sentry/core/build/esm/utils-hoist/error.js","../../node_modules/@sentry/core/build/esm/utils/eventUtils.js","../../node_modules/@sentry/core/build/esm/utils/transactionEvent.js","../../node_modules/@sentry/core/build/esm/client.js","../../node_modules/@sentry/core/build/esm/sdk.js","../../node_modules/@sentry/core/build/esm/utils-hoist/promisebuffer.js","../../node_modules/@sentry/core/build/esm/utils-hoist/ratelimit.js","../../node_modules/@sentry/core/build/esm/transports/base.js","../../node_modules/@sentry/core/build/esm/utils/isSentryRequestUrl.js","../../node_modules/@sentry/core/build/esm/utils/ipAddress.js","../../node_modules/@sentry/core/build/esm/utils/sdkMetadata.js","../../node_modules/@sentry/core/build/esm/utils/traceData.js","../../node_modules/@sentry/core/build/esm/breadcrumbs.js","../../node_modules/@sentry/core/build/esm/integrations/functiontostring.js","../../node_modules/@sentry/core/build/esm/integrations/eventFilters.js","../../node_modules/@sentry/core/build/esm/utils-hoist/aggregate-errors.js","../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/console.js","../../node_modules/@sentry/core/build/esm/utils-hoist/severity.js","../../node_modules/@sentry/core/build/esm/integrations/captureconsole.js","../../node_modules/@sentry/core/build/esm/integrations/dedupe.js","../../node_modules/@sentry/core/build/esm/utils-hoist/url.js","../../node_modules/@sentry/core/build/esm/fetch.js","../../node_modules/@sentry/core/build/esm/utils-hoist/breadcrumb-log-level.js","../../node_modules/@sentry/core/build/esm/utils-hoist/supports.js","../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/fetch.js","../../node_modules/vite-plugin-node-polyfills/shims/process/dist/index.js","../../node_modules/@sentry/core/build/esm/utils-hoist/env.js","../../node_modules/@sentry/core/build/esm/utils-hoist/node.js","../../node_modules/@sentry/core/build/esm/utils-hoist/isBrowser.js","../../node_modules/@sentry/browser/build/npm/esm/helpers.js","../../node_modules/@sentry/browser/build/npm/esm/eventbuilder.js","../../node_modules/@sentry/browser/build/npm/esm/client.js","../../node_modules/@sentry-internal/browser-utils/build/esm/debug-build.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/bindReporter.js","../../node_modules/@sentry-internal/browser-utils/build/esm/types.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/generateUniqueID.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getNavigationEntry.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getActivationStart.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/initMetric.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/observe.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/onHidden.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/runOnce.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/whenActivated.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/onFCP.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getCLS.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getFID.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/interactions.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/whenIdle.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getINP.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getLCP.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/onTTFB.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/instrument.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/utils.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/cls.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/browserMetrics.js","../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/dom.js","../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/history.js","../../node_modules/@sentry-internal/browser-utils/build/esm/getNativeImplementation.js","../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/xhr.js","../../node_modules/@sentry-internal/browser-utils/build/esm/networkUtils.js","../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/inp.js","../../node_modules/@sentry/browser/build/npm/esm/transports/fetch.js","../../node_modules/@sentry/browser/build/npm/esm/stack-parsers.js","../../node_modules/@sentry/browser/build/npm/esm/debug-build.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/breadcrumbs.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/browserapierrors.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/browsersession.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/globalhandlers.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/httpcontext.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/linkederrors.js","../../node_modules/@sentry/browser/build/npm/esm/sdk.js","../../node_modules/@sentry-internal/replay/build/npm/esm/index.js","../../node_modules/@sentry-internal/replay-canvas/build/npm/esm/index.js","../../node_modules/@sentry/browser/build/npm/esm/tracing/request.js","../../node_modules/@sentry/browser/build/npm/esm/tracing/backgroundtab.js","../../node_modules/@sentry/browser/build/npm/esm/tracing/browserTracingIntegration.js","../../node_modules/@sentry/react/build/esm/sdk.js","../../node_modules/@sentry/react/build/esm/constants.js","../../node_modules/react-is/cjs/react-is.production.min.js","../../node_modules/react-is/index.js","../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../../node_modules/@sentry/react/build/esm/hoist-non-react-statics.js","../../node_modules/@sentry/react/build/esm/profiler.js","../../node_modules/@sentry/react/build/esm/debug-build.js","../../node_modules/@sentry/react/build/esm/redux.js","../../node_modules/@sentry/react/build/esm/reactrouterv6-compat-utils.js","../../node_modules/@sentry/react/build/esm/reactrouterv6.js","../../node_modules/styled-components/node_modules/tslib/tslib.es6.mjs","../../node_modules/shallowequal/index.js","../../node_modules/stylis/src/Enum.js","../../node_modules/stylis/src/Utility.js","../../node_modules/stylis/src/Tokenizer.js","../../node_modules/stylis/src/Parser.js","../../node_modules/stylis/src/Prefixer.js","../../node_modules/stylis/src/Serializer.js","../../node_modules/stylis/src/Middleware.js","../../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","../../node_modules/styled-components/dist/styled-components.browser.esm.js","../../node_modules/@inter-ikea-kompis/themes/lib/themes/skapa/enums/SkapaDelayEnum.js","../../node_modules/@inter-ikea-kompis/themes/lib/themes/skapa/enums/SkapaDurationEnum.js","../../node_modules/@inter-ikea-kompis/themes/lib/themes/skapa/enums/SkapaFontSizeEnum.js","../../node_modules/@inter-ikea-kompis/themes/lib/themes/skapa/enums/SkapaIconDurationEnum.js","../../node_modules/@inter-ikea-kompis/themes/lib/themes/skapa/SkapaTheme.js","../../node_modules/@inter-ikea-kompis/enums/lib/CookieConsentDataSourceEnum.js","../../node_modules/@inter-ikea-kompis/enums/lib/DexfSettingsEnvironmentEnum.js","../../node_modules/@inter-ikea-kompis/enums/lib/DexfSettingsFilterSegmentEnum.js","../../node_modules/@inter-ikea-kompis/enums/lib/EcommerceCartDataSourceEnum.js","../../node_modules/@inter-ikea-kompis/enums/lib/ImageTypeNameEnum.js","../../node_modules/@inter-ikea-kompis/enums/lib/ItemTypeEnum.js","../../node_modules/@inter-ikea-kompis/enums/lib/ProductOptionalFieldNameEnum.js","../../node_modules/@inter-ikea-kompis/utilities/lib/cache/CacheStore.js","../../node_modules/@inter-ikea-kompis/utilities/lib/cache/GlobalCacheStore.js","../../node_modules/@inter-ikea-kompis/utilities/lib/date/DateFormatter.js","../../node_modules/@inter-ikea-kompis/utilities/lib/locale/LocaleUtility.js","../../node_modules/@inter-ikea-kompis/exceptions/lib/enums/ExceptionTypeEnum.js","../../node_modules/@inter-ikea-kompis/exceptions/lib/AbstractException.js","../../node_modules/@inter-ikea-kompis/exceptions/lib/exceptions/ConnectionProblemException.js","../../node_modules/@inter-ikea-kompis/exceptions/lib/exceptions/Exception.js","../../node_modules/@inter-ikea-kompis/exceptions/lib/exceptions/ServerErrorResponseException.js","../../node_modules/@inter-ikea-kompis/exceptions/lib/exceptions/ServiceException.js","../../node_modules/@inter-ikea-kompis/exceptions/lib/exceptions/UnableToParseServerResponseException.js","../../node_modules/@inter-ikea-kompis/utilities/lib/price/ProductPriceInformationSummaryTransformer.js","../../node_modules/@inter-ikea-kompis/utilities/lib/price/TotalPriceCalculator.js","../../node_modules/@inter-ikea-kompis/utilities/lib/settings/DexfSettingsUtility.js","../../src/utils/getTheme.ts","../../src/utils/constants/colors.ts","../../src/utils/constants/style.ts","../../src/GlobalStyles.ts","../../node_modules/uuid/dist/esm-browser/stringify.js","../../node_modules/uuid/dist/esm-browser/rng.js","../../node_modules/uuid/dist/esm-browser/native.js","../../node_modules/uuid/dist/esm-browser/v4.js","../../node_modules/@insights/insights-data-provider/lib/utilities/MetadataManager.js","../../node_modules/@insights/insights-data-provider/lib/utilities/SequenceNumberHandler.js","../../node_modules/@insights/insights-data-provider/lib/enums/TrackingIdEnum.js","../../node_modules/@insights/insights-data-provider/lib/utilities/IdGenerator.js","../../node_modules/@insights/insights-data-provider/lib/utilities/SessionManager.js","../../node_modules/@insights/insights-data-provider/lib/enums/IpexMomentEnum.js","../../node_modules/@insights/insights-data-provider/lib/utilities/CookieReader.js","../../node_modules/@insights/insights-data-provider/lib/utilities/EntryPoint.js","../../node_modules/@insights/insights-data-provider/lib/enums/DesignInteractionEnum.js","../../node_modules/@insights/insights-data-provider/lib/enums/InsightsEventEnum.js","../../node_modules/@insights/insights-data-provider/lib/targets/InsightsTarget.js","../../node_modules/@insights/insights-data-provider/lib/targets/GoogleAnalyticsTarget.js","../../node_modules/@insights/insights-data-provider/lib/enums/GaEventEnum.js","../../node_modules/@insights/insights-data-provider/lib/enums/GaCategoryEnum.js","../../node_modules/@insights/insights-data-provider/lib/enums/DesignSourceEnum.js","../../node_modules/@insights/insights-data-provider/lib/enums/ArticleActionEnum.js","../../node_modules/@insights/insights-data-provider/lib/utilities/FlowHandler.js","../../node_modules/@insights/insights-data-provider/lib/EventSender.js","../../node_modules/@insights/insights-data-provider/lib/utilities/GAScriptLoader.js","../../node_modules/@insights/insights-data-provider/lib/enums/PlatformEnum.js","../../node_modules/@insights/insights-data-provider/lib/ModuleClient.js","../../node_modules/@insights/insights-data-provider/lib/InsightsApi.js","../../node_modules/@insights/insights-data-provider/lib/enums/DesignSaveModeEnum.js","../../node_modules/@insights/insights-data-provider/lib/index.js","../../node_modules/@inter-ikea-kompis/analytics/lib/utilities/AnalyticsManager.js","../../node_modules/@inter-ikea-kompis/services/lib/enums/CacheStoreType.js","../../node_modules/@inter-ikea-kompis/services/lib/utilities/IframeManager.js","../../node_modules/@inter-ikea-kompis/services/lib/utilities/ServiceFetch.js","../../node_modules/@inter-ikea-kompis/services/lib/utilities/CookieUtility.js","../../node_modules/@inter-ikea-kompis/services/lib/services/localization/OversattaTransformer.js","../../node_modules/@inter-ikea-kompis/services/lib/services/localization/OversattaService.js","../../node_modules/@inter-ikea-kompis/services/lib/facades/localization/LocalizationService.js","../../node_modules/@inter-ikea-kompis/services/lib/utilities/DexfConfiguration.js","../../node_modules/@inter-ikea-kompis/services/lib/utilities/ItemUtility.js","../../node_modules/@inter-ikea-kompis/services/lib/utilities/BitBoxUtility.js","../../node_modules/@inter-ikea-kompis/services/lib/services/cookie-consent/BitboxCookieConsentService.js","../../node_modules/@inter-ikea-kompis/services/lib/services/cookie-consent/ChinaCookieConsentService.js","../../node_modules/@inter-ikea-kompis/services/lib/services/cookie-consent/OneWebCookieConsentService.js","../../node_modules/@inter-ikea-kompis/services/lib/facades/cookie-consent/CookieConsentService.js","../../node_modules/@inter-ikea-kompis/services/lib/services/localization/DexfSettingsTransformer.js","../../node_modules/@inter-ikea-kompis/services/lib/services/localization/DexfSettingsService.js","../../node_modules/@inter-ikea-kompis/services/lib/facades/localization/SettingsService.js","../../node_modules/@inter-ikea-kompis/services/lib/services/localization/TranslationsTransformer.js","../../node_modules/@inter-ikea-kompis/services/lib/services/localization/InternalTranslationsService.js","../../node_modules/@inter-ikea-kompis/services/lib/facades/localization/TranslationsService.js","../../node_modules/@inter-ikea-kompis/services/lib/facades/product/ProductCache.js","../../node_modules/@inter-ikea-kompis/services/lib/services/product/DexfWebplannerService.js","../../node_modules/@inter-ikea-kompis/services/lib/facades/product/ProductItemQueue.js","../../node_modules/@inter-ikea-kompis/services/lib/facades/product/ProductService.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.scalar.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.constants.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/arrayTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/typeStore.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/performanceConfigurator.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/observable.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/engineStore.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.plane.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/Math.extension.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/RenderLayer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/types/LightType.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/Deprecated.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/Math.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/Conversion.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/debug_visualizers/LightVisualizer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Buffers/dataBuffer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Buffers/buffer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/tslib.es6.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/andOrNotEvaluator.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/tags.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/devTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/decorators.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/node.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/logger.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/domManagement.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/deepCopier.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/precisionDate.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/webRequest.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/filesInputStore.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/retryStrategy.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/error.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/stringTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Processors/shaderCodeNode.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Processors/shaderCodeCursor.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Processors/shaderCodeConditionNode.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Processors/shaderCodeTestNode.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Processors/Expressions/shaderDefineExpression.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/shaderLanguage.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Processors/shaderProcessor.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/effect.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/States/depthCullingState.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/States/stencilState.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/States/alphaCullingState.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/textureSampler.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/internalTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/WebGL/webGLShaderProcessors.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/WebGL/webGL2ShaderProcessors.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/WebGL/webGLDataBuffer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/WebGL/webGLPipelineContext.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/WebGL/webGLHardwareTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/drawWrapper.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/States/stencilStateComposer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/thinEngine.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/timingTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/fileTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/instantiationTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/guid.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/tools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Extensions/engine.uniformBuffer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/uniformBuffer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Lights/lightConstants.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Lights/light.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/smartArray.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.viewport.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.frustum.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/stringDictionary.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/abstractScene.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/materialDefines.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/colorCurves.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/imageProcessingConfiguration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Collisions/pickingInfo.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Actions/actionEvent.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/PostProcesses/postProcessManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Rendering/renderingGroup.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Rendering/renderingManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/sceneComponent.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Events/pointerEvents.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Actions/abstractActionManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Events/keyboardEvents.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/DeviceInput/InputDevices/deviceEnums.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Events/deviceInputEvents.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/DeviceInput/eventFactory.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/DeviceInput/nativeDeviceInputSystem.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/DeviceInput/webDeviceInputSystem.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/DeviceInput/InputDevices/deviceSource.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/DeviceInput/internalDeviceSourceManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/DeviceInput/InputDevices/deviceSourceManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Inputs/scene.inputManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/perfCounter.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/uniqueIdGenerator.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Inputs/pointerPickingConfiguration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/scene.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/clipPlaneMaterialHelper.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/materialHelper.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.size.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/thinTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/baseTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/copyTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Compat/compatibilityOptions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/renderTargetWrapper.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/WebGL/webGLRenderTargetWrapper.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Extensions/engine.renderTarget.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Extensions/engine.renderTargetCube.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/performanceMonitor.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Extensions/engine.alpha.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Extensions/engine.readTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Extensions/engine.dynamicBuffer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/engine.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/postprocess.vertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/effectRenderer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/pass.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/dumpTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/renderTargetTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/PostProcesses/postProcess.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/kernelBlurVaryingDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/packingFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/kernelBlurFragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/kernelBlurFragment2.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/kernelBlur.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/kernelBlurVertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/kernelBlur.vertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/PostProcesses/blurPostProcess.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/effectFallbacks.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/bayerDitherFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/shadowMapFragmentExtraDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/shadowMapFragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/shadowMap.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/bonesDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimationDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/morphTargetsVertexGlobalDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/helperFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/sceneVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/meshVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/shadowMapVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/sceneUboDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/meshUboDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/shadowMapUboDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/shadowMapVertexExtraDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/clipPlaneVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/morphTargetsVertexGlobal.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/morphTargetsVertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/instancesVertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/bonesVertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimation.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/shadowMapVertexNormalBias.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/shadowMapVertexMetric.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/clipPlaneVertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/shadowMap.vertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/depthBoxBlur.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Lights/Shadows/shadowGenerator.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/TransformHelper.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/Observable.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/utils/Watcher.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/utils/DebugDecorators.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/lights/Light.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/Assert.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/utils.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/shadows/ShadowController.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/api/IVector2.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/api/IVector3.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/api/IVector4.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/api/IColor.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/api/IColor4.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/api/IMatrix4.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/api/IRay.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/api/IBoundingSphere.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/api/ITransformedBoundingBox.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/api/IBoundingBox.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/api.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/coroutine.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Collisions/intersectionInfo.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Culling/boundingBox.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Culling/boundingSphere.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Culling/boundingInfo.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.functions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/subMesh.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.vertexData.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.axis.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/transformNode.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Collisions/meshCollisionData.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/abstractMesh.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Loading/sceneLoaderFlags.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/geometry.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/materialStencilState.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/materialPluginEvent.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/material.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/multiMaterial.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/meshLODLevel.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/instancedMesh.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/workerPool.js","../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Compression/dracoCompression.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/pushMaterial.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Culling/ray.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/materialFlags.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/lightsFragmentFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/shadowsFragmentFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/depthPrePass.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/lightFragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/fogFragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js","../../node_modules/@inter-ikea-betrakta-babylonjs/materials/normal/normal.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/instancesDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/fogVertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/shadowsVertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/materials/normal/normal.vertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/materials/normal/normalMaterial.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/AssetCollection.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/constants.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/rgbdDecode.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/passCube.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/PostProcesses/passPostProcess.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/textureTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/rgbdTextureTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/brdfTextureTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/materialPluginManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/materialPluginBase.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrBRDFConfiguration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/prePassConfiguration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.path.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/sphericalPolynomial.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/baseTexture.polynomial.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/prePassDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/oitDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/decalFragmentDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrFragmentDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrUboDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/mainUVVaryingDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrFragmentExtraDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/samplerFragmentDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/samplerFragmentAlternateDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/imageProcessingDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/logDepthDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/subSurfaceScatteringFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/importanceSampling.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrHelperFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/imageProcessingFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/harmonicsFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrDirectLightingSetupFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrDirectLightingFalloffFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBRDFFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/hdrFilteringFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrDirectLightingFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrIBLFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/bumpFragmentMainFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/bumpFragmentFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/reflectionFunction.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/decalFragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockAlbedoOpacity.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockReflectivity.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockAmbientOcclusion.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockAlphaFresnel.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockAnisotropic.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockReflection.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockSheen.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockClearcoat.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockIridescence.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockSubSurface.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockNormalGeometric.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/bumpFragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockNormalFinal.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockLightmapInit.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockGeometryInfo.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockReflectance0.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockReflectance.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockDirectLighting.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockFinalLitComponents.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockFinalUnlitComponents.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockFinalColorComposition.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/logDepthFragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrBlockImageProcessing.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/oitFragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrDebug.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/pbr.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/decalVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pbrVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/uvAttributeDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/prePassVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/samplerVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/bumpVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/lightVxFragmentDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/lightVxUboDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/prePassVertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/uvVariableDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/samplerVertexImplementation.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/bumpVertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/vertexColorMixing.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/logDepthVertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/pbr.vertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrClearCoatConfiguration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrIridescenceConfiguration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrAnisotropicConfiguration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrSheenConfiguration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrSubSurfaceConfiguration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/material.detailMapConfiguration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrBaseMaterial.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Lights/shadowLight.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Lights/pointLight.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/BabylonLineLight.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/lightUboDeclaration.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/lightVxUboDeclaration.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/lightFragmentDeclaration.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/lightFragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/pbrDirectLightingSetupFunctions.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/clipPlaneFragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/clipPlaneVertex.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/clipPlaneFunctions.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/clipPlaneVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/clipPlaneVertexDeclaration2.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/clipPlaneFragmentDeclaration.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/clipPlaneFragmentDeclaration2.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/material/ViewerMaterial.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/LightSystem.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/Material.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/material/PropertyWrappers.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/uuidv4.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/material/ViewerMaterialWrapper.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/shaderMaterial.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/color.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/color.vertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/linesMesh.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Extensions/engine.rawTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/rawTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/serializers/glTF/2.0/glTFMaterialExporter.js","../../node_modules/@inter-ikea-betrakta-babylonjs/serializers/glTF/2.0/glTFUtilities.js","../../node_modules/@inter-ikea-betrakta-babylonjs/serializers/glTF/2.0/glTFData.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Animations/animationKey.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Animations/animationRange.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Animations/animation.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Morph/morphTarget.js","../../node_modules/@inter-ikea-betrakta-babylonjs/serializers/glTF/2.0/glTFAnimation.js","../../node_modules/@inter-ikea-betrakta-babylonjs/serializers/glTF/2.0/glTFExporter.js","../../node_modules/@inter-ikea-betrakta-babylonjs/serializers/glTF/2.0/glTFSerializer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/AssetManager.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/LiteRenderTarget.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/Framebuffer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/accumulation_buffer.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/bloom_downsample.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/bloom_blur.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/Bloom.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/PostProcessShader.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/Accumulator.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/edge_sketch.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/EdgeSketchEffect.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ao_half_depth.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ao_compute.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ao_temporal_filter.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ao_half_normals.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ao_apply.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/bin/BlueNoiseTexture64x64.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/bilateral_blur.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/BilateralBlur.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/AmbientOcclusion.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/PostProcessManager.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/camera/EngineCamera.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/RenderView.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/InteractionSystem.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/Screenshots.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Probes/reflectionProbe.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/experimental/ReflectionProbe.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ShadersInclude/imageProcessingFunctions.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Collisions/collider.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Collisions/collisionCoordinator.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/depth.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pointCloudVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/pointCloudVertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/depth.vertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Rendering/depthRenderer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/minmaxRedux.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/minMaxReducer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/depthReducer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Lights/Shadows/cascadedShadowGenerator.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Lights/Shadows/shadowGeneratorSceneComponent.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Rendering/depthRendererSceneComponent.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/fxaa.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/fxaa.vertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/PostProcesses/fxaaPostProcess.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/screenshotTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Extensions/engine.cubeTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/dds.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/Loaders/ddsTextureLoader.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/rgbdEncode.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/environmentTextureTools.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/Loaders/envTextureLoader.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/khronosTextureContainer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/ktx2decoderTypes.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/khronosTextureContainer2.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/Loaders/ktxTextureLoader.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Animations/runtimeAnimation.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Bones/bone.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Animations/animatable.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/targetCamera.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/cameraInputsManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/Inputs/freeCameraKeyboardMoveInput.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/Inputs/freeCameraMouseInput.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/Inputs/BaseCameraMouseWheelInput.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/Inputs/freeCameraMouseWheelInput.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/Inputs/freeCameraTouchInput.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/freeCameraInputsManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/freeCamera.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/touchCamera.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Gamepads/gamepad.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Gamepads/xboxGamepad.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Gamepads/dualShockGamepad.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Gamepads/gamepadManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/Inputs/freeCameraGamepadInput.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/Inputs/BaseCameraPointersInput.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/Inputs/arcRotateCameraPointersInput.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/Inputs/arcRotateCameraMouseWheelInput.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/arcRotateCameraInputsManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/Inputs/arcRotateCameraGamepadInput.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Gamepads/gamepadSceneComponent.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Cameras/universalCamera.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/sphereBuilder.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/light_baker.vertex.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/light_baker_arealight.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/finalize_lightmap.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/LightBaker.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/glowBlurPostProcess.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/outline_id_map_generation.vertex.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/outline_id_map_generation.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/outline_combine.vertex.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/outline_combine.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/outline_expand.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/PartialViewportRenderTarget.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/OutlineEffect.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/LineManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/ribbonBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/discBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/groundMesh.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/groundBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/boxBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/tiledPlaneBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/tiledBoxBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/cylinderBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/torusBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/torusKnotBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/linesBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/polygonMesh.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/polygonBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/shapeBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/latheBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/planeBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/tubeBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/polyhedronBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/icoSphereBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/decalBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/capsuleBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Maths/math.isovector.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/geodesicMesh.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/geodesicBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/goldbergMesh.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/goldbergBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/textBuilder.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/meshBuilder.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/Disposable.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/SceneLines.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/MeshManager.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/MaterialFreezingManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Animations/animationGroup.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Animations/easing.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/AnimationSystem.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/Stack.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/Interpolation.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/Bounds.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/IndexedName.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/camera/ViewerCamera.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/camera/CameraTransition.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/logging/console/ConsoleDecorator.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/logging/console/ConsoleLogger.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/logging/LoggingService.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/logging/types.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/logging/Logger.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/camera/CameraManager.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/FocusBorder.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/CoroutineManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Engines/Extensions/engine.dynamicTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/dynamicTexture.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/TextField.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/camera/ObjectFraming.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/WebGLTimerQuery.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/GpuProfiler.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/ViewerFactory.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Lights/hemisphericLight.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/AmbientLightController.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/cubeTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/HighDynamicRange/panoramaToCubemap.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/HighDynamicRange/hdr.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/hdrFiltering.vertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/hdrFiltering.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/Filtering/hdrFiltering.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/hdrCubeTexture.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/EnvironmentManager.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/shadows/PointLightShadowController.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/defaultFragmentDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/defaultUboDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/fresnelFunction.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/default.fragment.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/defaultVertexDeclaration.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Shaders/default.vertex.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/standardMaterial.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/debug_visualizers/PositionSphere.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/debug_visualizers/PointLightVisualizer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/lights/PointLight.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Lights/directionalLight.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/shadows/DirectionalLightShadowController.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/debug_visualizers/DirectionalLightVisualizer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/lights/DirectionalLight.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Lights/spotLight.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/shadows/SpotLightShadowController.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/debug_visualizers/SpotLightVisualizer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/lights/SpotLight.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/debug_visualizers/LineLightVisualizer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/lights/LineLight.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/light-system/lights/DirectedShadowPointLight.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/HardwareLimits.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/light-manager/LightManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/csg.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/Raycast.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/CutoutObject.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/view_compositor.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/ViewCompositor.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/InverseTonemapper.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/WebGLPolyfill.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/WebGLMock.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ui_mesh.vertex.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/ui_mesh.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/material/ViewerUiMeshMaterial.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/scene/SceneAssetMesh.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/UiMesh.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/soft_shadow_transfer_depth.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/soft_shadow_blur.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/soft_shadow_generate_texture.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/SoftShadowRenderer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/logging/exception_handler/ExceptionHandler.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/shaders/blit.fragment.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/webxr/ViewerXRSession.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/WebGLMemoryTracker.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/input/InputManager.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/View.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/Bound.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/Overlay.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/utils/CustomElement.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/web-elements/debug-menu/components/ElementFactory.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/web-elements/debug-menu/components/ContentConstructor.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/web-elements/debug-menu/components/ContainerController.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/web-elements/debug-menu/components/TabWatcher.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/web-elements/debug-menu/components/TabController.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/web-elements/ElementController.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/web-elements/debug-menu/DebugMenu.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/viewer-gizmos/GizmoColors.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/viewer-gizmos/MeshDescriptions.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/viewer-gizmos/move-gizmo/MoveArrow.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/viewer-gizmos/move-gizmo/MovePlane.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/viewer-gizmos/move-gizmo/MoveGizmo.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/viewer-gizmos/rotation-gizmo/RotationTorus.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/viewer-gizmos/rotation-gizmo/RotateGizmo.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/viewer-gizmos/scale-gizmo/ScaleArrow.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/viewer-gizmos/scale-gizmo/ScaleCenter.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/viewer-gizmos/scale-gizmo/ScaleGizmo.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/web-elements/DebugTransformBar.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/description-handlers/PersistentHandler.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/web-elements/DebugLabel.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/description-handlers/SelectableHandler.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/DescriptionManager.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/HasRequiredKeys.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/UiTools.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/DebugLayer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/utils/LogInstance.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/descriptions/LightDescription.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/material/MaterialCollection.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/material/CustomMaterialWrapper.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/SceneObject.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/descriptions/SceneObjectDescription.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/descriptions/ViewerCameraDescription.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/input/InputHandler.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/input/InputHandlerManager.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/LockSystem.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Loading/sceneLoader.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/scene/SceneAssetMetadata.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/scene/SceneAssetInstance.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/assetContainer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/scene/SceneAssetMeshVariantKey.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/scene/SceneAssetMeshInstance.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/scene/SceneAssetContainer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/scene/SceneAsset.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/scene/SceneAssetCache.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/scene/ViewerScene.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/deferred.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Bones/skeleton.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/rawTexture2DArray.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Morph/morphTargetManager.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Misc/dataReader.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/glTFValidation.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/glTFFileLoader.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/glTFLoaderAnimation.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/glTFLoader.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Materials/Textures/rawCubeTexture.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/EXT_lights_image_based.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/thinInstanceMesh.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Meshes/Compression/meshoptCompression.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/EXT_meshopt_compression.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/EXT_texture_webp.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_draco_mesh_compression.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_lights_punctual.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_unlit.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_clearcoat.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_iridescence.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_anisotropy.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_emissive_strength.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_sheen.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_specular.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_ior.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_variants.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_transmission.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_translucency.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_volume.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_mesh_quantization.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_texture_basisu.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_texture_transform.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_xmp_json_ld.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_animation_pointer.data.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/KHR_animation_pointer.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Animations/animationEvent.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Audio/sound.js","../../node_modules/@inter-ikea-betrakta-babylonjs/core/Audio/weightedsound.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/MSFT_audio_emitter.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/MSFT_lod.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/MSFT_minecraftMesh.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/MSFT_sRGBFactors.js","../../node_modules/@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/Extensions/ExtrasAsMetadata.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/scene/BetraktaGLTFLoaderExtension.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/LutEffect.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/utility/FakeImageLoader.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/utils/DebugLayer/descriptions/CameraManagerDescription.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/babylon/Viewer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/common.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/index.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/modules/InputGatherer.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/modules/PerspectiveProjection.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/modules/PrimitiveBuilder/MeshDescriptions.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/modules/PrimitiveBuilder/PrimitiveBuilder.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/modules/cameras/debug/OrbitPlannerCameraDescription.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/modules/cameras/OrbitPlannerCamera.js","../../node_modules/@inter-ikea-core/core/kotlin/kotlin-kotlin-stdlib.js","../../node_modules/@inter-ikea-core/core/kotlin/kotlinx-serialization-kotlinx-serialization-core.js","../../node_modules/@inter-ikea-core/core/kotlin/kotlinx-serialization-kotlinx-serialization-json.js","../../node_modules/@inter-ikea-core/core/kotlin/core-core-api.js","../../node_modules/@inter-ikea-core/core/kotlin/core-core-stl.js","../../node_modules/@inter-ikea-core/core/kotlin/core-core-range-dynamic-range.js","../../node_modules/@inter-ikea-core/core/kotlin/core-core-experimental.js","../../node_modules/@inter-ikea-core/core/kotlin/ipex-range-format.js","../../node_modules/@inter-ikea-core/core/kotlin/core-core-kernel.js","../../node_modules/@inter-ikea-core/core/kotlin/core-test-helpers.js","../../node_modules/@inter-ikea-core/core/kotlin/@inter-ikea-core/core.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/CoreToolboxComponentIds.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/systembase/ComponentListenerImpl.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/systembase/SystemBase.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/systembase/SystemBase2.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/systembase/SystemBase3.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/systembase/SystemBase4.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/systembase/SystemBase5.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/validation/ValidationBase.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/outlineSystem/SimpleOutlineSelectedSystem.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/outlineSystem/SimpleOutlineBlockingSystem.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/outlineSystem/SimpleOutlineAssemblySystem.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/outlineSystem/SimpleOutlineModelSystem.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/outlineSystem/SimpleOutlineChildrenSystem.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/outlineSystem/AddBlockingToAllModelsSystem.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/outlineSystem/SimpleOutlineSnapshotLoadedSystem.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/outlineSystem/OutlineUtils.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/drag/DragUtils.js","../../node_modules/ajv/dist/compile/codegen/code.js","../../node_modules/ajv/dist/compile/codegen/scope.js","../../node_modules/ajv/dist/compile/codegen/index.js","../../node_modules/ajv/dist/compile/util.js","../../node_modules/ajv/dist/compile/names.js","../../node_modules/ajv/dist/compile/errors.js","../../node_modules/ajv/dist/compile/validate/boolSchema.js","../../node_modules/ajv/dist/compile/rules.js","../../node_modules/ajv/dist/compile/validate/applicability.js","../../node_modules/ajv/dist/compile/validate/dataType.js","../../node_modules/ajv/dist/compile/validate/defaults.js","../../node_modules/ajv/dist/vocabularies/code.js","../../node_modules/ajv/dist/compile/validate/keyword.js","../../node_modules/ajv/dist/compile/validate/subschema.js","../../node_modules/fast-deep-equal/index.js","../../node_modules/json-schema-traverse/index.js","../../node_modules/ajv/dist/compile/resolve.js","../../node_modules/ajv/dist/compile/validate/index.js","../../node_modules/ajv/dist/runtime/validation_error.js","../../node_modules/ajv/dist/compile/ref_error.js","../../node_modules/ajv/dist/compile/index.js","../../node_modules/fast-uri/lib/scopedChars.js","../../node_modules/fast-uri/lib/utils.js","../../node_modules/fast-uri/lib/schemes.js","../../node_modules/fast-uri/index.js","../../node_modules/ajv/dist/runtime/uri.js","../../node_modules/ajv/dist/core.js","../../node_modules/ajv/dist/vocabularies/core/id.js","../../node_modules/ajv/dist/vocabularies/core/ref.js","../../node_modules/ajv/dist/vocabularies/core/index.js","../../node_modules/ajv/dist/vocabularies/validation/limitNumber.js","../../node_modules/ajv/dist/vocabularies/validation/multipleOf.js","../../node_modules/ajv/dist/runtime/ucs2length.js","../../node_modules/ajv/dist/vocabularies/validation/limitLength.js","../../node_modules/ajv/dist/vocabularies/validation/pattern.js","../../node_modules/ajv/dist/vocabularies/validation/limitProperties.js","../../node_modules/ajv/dist/vocabularies/validation/required.js","../../node_modules/ajv/dist/vocabularies/validation/limitItems.js","../../node_modules/ajv/dist/runtime/equal.js","../../node_modules/ajv/dist/vocabularies/validation/uniqueItems.js","../../node_modules/ajv/dist/vocabularies/validation/const.js","../../node_modules/ajv/dist/vocabularies/validation/enum.js","../../node_modules/ajv/dist/vocabularies/validation/index.js","../../node_modules/ajv/dist/vocabularies/applicator/additionalItems.js","../../node_modules/ajv/dist/vocabularies/applicator/items.js","../../node_modules/ajv/dist/vocabularies/applicator/prefixItems.js","../../node_modules/ajv/dist/vocabularies/applicator/items2020.js","../../node_modules/ajv/dist/vocabularies/applicator/contains.js","../../node_modules/ajv/dist/vocabularies/applicator/dependencies.js","../../node_modules/ajv/dist/vocabularies/applicator/propertyNames.js","../../node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js","../../node_modules/ajv/dist/vocabularies/applicator/properties.js","../../node_modules/ajv/dist/vocabularies/applicator/patternProperties.js","../../node_modules/ajv/dist/vocabularies/applicator/not.js","../../node_modules/ajv/dist/vocabularies/applicator/anyOf.js","../../node_modules/ajv/dist/vocabularies/applicator/oneOf.js","../../node_modules/ajv/dist/vocabularies/applicator/allOf.js","../../node_modules/ajv/dist/vocabularies/applicator/if.js","../../node_modules/ajv/dist/vocabularies/applicator/thenElse.js","../../node_modules/ajv/dist/vocabularies/applicator/index.js","../../node_modules/ajv/dist/vocabularies/format/format.js","../../node_modules/ajv/dist/vocabularies/format/index.js","../../node_modules/ajv/dist/vocabularies/metadata.js","../../node_modules/ajv/dist/vocabularies/draft7.js","../../node_modules/ajv/dist/vocabularies/discriminator/types.js","../../node_modules/ajv/dist/vocabularies/discriminator/index.js","../../node_modules/ajv/dist/ajv.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/schema/DynamicRangeValidator.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/schema/index.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/testUtils/core_creator.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/functionalZones/FunctionalZoneValidationBase.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/functionalZones/ZoneVsZoneValidationResult.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/functionalZones/ZoneVsZoneRule.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/functionalZones/ZoneVsColliderValidationResult.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/functionalZones/ZoneVsColliderRule.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/functionalZones/ZoneVsColliderExceptSomeThingsRule.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/debugSurfaceDrawingSystem/ViewerSurfaceReferenceComponent.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/debugSurfaceDrawingSystem/DebugSurfaceCleanupSystem.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/debugSurfaceDrawingSystem/DebugSurfaceDrawingSystem.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/debugSurfaceDrawingSystem/DebugSurfaceUtils.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/htmlInteraction/CanvasComponent.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/serialization/SnapBackUtils.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/serialization/RoomHierarchyUtils.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/serialization/SerializationUtils.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/serialization/KvadratVPCComponent.js","../../node_modules/@inter-ikea-core/core-toolbox/dist/index.js","../../node_modules/@inter-ikea-core/ipex-betrakta-core-adapter/dist/IpexViewerComponent.js","../../node_modules/@inter-ikea-core/ipex-betrakta-core-adapter/dist/util.js","../../node_modules/@inter-ikea-core/ipex-betrakta-core-adapter/dist/adapter/IPEXViewerObject.js","../../node_modules/earcut/src/earcut.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/modules/ProxyLoader.js","../../node_modules/@inter-ikea-core/ipex-betrakta-core-adapter/dist/adapter/IPEXViewerCoreAdapter.js","../../node_modules/@inter-ikea-core/ipex-betrakta-core-adapter/dist/cameraUpdateSystem/CameraComponent.js","../../node_modules/redux/dist/redux.mjs","../../node_modules/immer/dist/immer.mjs","../../node_modules/redux-thunk/dist/redux-thunk.mjs","../../node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs","../../src/utils/isShallowIdentical.ts","../../src/redux-store/scene/scene.store.ts","../../node_modules/bowser/src/constants.js","../../node_modules/bowser/src/utils.js","../../node_modules/bowser/src/parser-browsers.js","../../node_modules/bowser/src/parser-os.js","../../node_modules/bowser/src/parser-platforms.js","../../node_modules/bowser/src/parser-engines.js","../../node_modules/bowser/src/parser.js","../../node_modules/bowser/src/bowser.js","../../node_modules/@inter-ikea-kompis/component-button/lib/enums/ButtonSizeEnum.js","../../node_modules/@inter-ikea-kompis/component-icon-button/lib/enums/IconButtonSizeEnum.js","../../src/utils/constants/index.ts","../../src/utils/useQuery.ts","../../src/utils/platform.ts","../../src/redux-store/configuration/configuration.store.ts","../../node_modules/@ingka/icons-shared/esm/paths/arrow-right.mjs","../../node_modules/@ingka/icons-shared/esm/paths/chevron-right-small.mjs","../../node_modules/@ingka/icons-shared/esm/paths/chevron-right.mjs","../../node_modules/@ingka/icons-shared/esm/paths/copy.mjs","../../node_modules/@ingka/icons-shared/esm/paths/image-strikethrough.mjs","../../node_modules/@ingka/icons-shared/esm/paths/image.mjs","../../node_modules/@ingka/icons-shared/esm/paths/link-out.mjs","../../node_modules/@ingka/icons-shared/esm/paths/person-small.mjs","../../node_modules/@ingka/icons-shared/esm/paths/person.mjs","../../node_modules/@inter-ikea-kompis/component-share-design-card/lib/enums/ShareDesignCardStateEnum.js","../../src/redux-store/kompisStates/kompisStates.store.ts","../../src/redux-store/navigation/navigation.store.ts","../../node_modules/@ungap/structured-clone/esm/types.js","../../node_modules/@ungap/structured-clone/esm/deserialize.js","../../node_modules/@ungap/structured-clone/esm/serialize.js","../../node_modules/@ungap/structured-clone/esm/index.js","../../src/CoreAPI/Components/DoorHeightEnum.ts","../../src/products/doorframes.ts","../../src/CoreAPI/Components/RailTrackEnum.ts","../../src/CoreAPI/Components/RailTrackTypeEnum.ts","../../src/products/rails.ts","../../src/i18n/i18nUtils.ts","../../src/redux-store/translations/ISkyttaTranslations.ts","../../src/i18n/parse.ts","../../src/i18n/translateString.ts","../../src/routes.ts","../../src/redirects.ts","../../src/redux-store/products/products.utils.ts","../../src/utils/constants/serviceSettings.tsx","../../src/utils/getServiceSettings.tsx","../../src/services/products/products.service.ts","../../src/utils/randomizeList.ts","../../src/redux-store/products/products.thunks.ts","../../src/redux-store/products/products.store.ts","../../src/services/settingsService/settingsService.service.ts","../../src/redux-store/settings/settings.thunks.ts","../../src/redux-store/settings/settings.store.ts","../../src/redux-store/translations/translations.thunks.ts","../../src/redux-store/translations/translations.store.ts","../../src/redux-store/userAgent/userAgent.store.ts","../../src/redux-store/rootReducer.ts","../../src/redux-store/store.ts","../../src/utils/constants/elements.ts","../../src/utils/delay.ts","../../src/utils/getAssetsPath.ts","../../src/CoreAPI/cameraSettings.ts","../../src/CoreAPI/screenshotSettings.ts","../../node_modules/@inter-ikea-betrakta/viewer/dist/modules/RectangleAtlas.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/modules/CustomMesh.js","../../node_modules/@inter-ikea-betrakta/viewer/dist/modules/Room.js","../../src/CoreAPI/Components/SkyttaComponentIds.ts","../../src/CoreAPI/Components/CustomOutlineComponent.ts","../../src/CoreAPI/Components/RailTypeEnum.ts","../../src/CoreAPI/Components/DoorWidthEnum.ts","../../src/products/stopbarproducts.ts","../../src/utils/mathUtil.ts","../../src/businessLogic/RailCalculations.ts","../../src/businessLogic/DoorCalculations.ts","../../src/utils/nonNullable.ts","../../src/products/panels.ts","../../src/utils/getTotalAmountForProducts.ts","../../src/components/Panels/Patterns/types/PanelPattern.ts","../../src/components/Panels/helpers/panels.ts","../../src/CoreAPI/helpers/room.ts","../../src/CoreAPI/coreSceneQueries.ts","../../src/CoreAPI/systembases/ComponentListenerImpl.ts","../../src/CoreAPI/systembases/SystemBase.ts","../../src/CoreAPI/systembases/SystemBase2.ts","../../src/CoreAPI/systembases/SystemBase3.ts","../../src/utils/remToPixels.ts","../../src/components/Scene/helpers/scene.ts","../../src/CoreAPI/systems/RoomRenderingSystem.ts","../../src/CoreAPI/viewerSetup.ts","../../src/services/cookieConsentService/CookieConsentService.service.ts","../../src/services/insightsService/insights.service.ts","../../src/utils/constants/abTestSettings.ts","../../src/utils/constants/consentLevels.ts","../../src/utils/constants/insightsFlow.ts","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js","../../node_modules/use-sync-external-store/with-selector.js","../../node_modules/react-redux/dist/react-redux.mjs","../../src/redux-store/hooks.ts","../../src/contexts/kompis.tsx","../../src/contexts/insights.tsx","../../node_modules/@ingka/variables/esm/design-tokens.mjs","../../src/utils/debounceAnimationFrame.ts","../../src/hooks/useWindowDimensions.ts","../../src/hooks/useUpdateUserAgent.ts","../../src/utils/supportsWebgl.ts","../../src/utils/supportsWebp.ts","../../src/components/PreApp/PreApp.tsx","../../node_modules/classnames/index.js","../../node_modules/@ingka/list-view/esm/ListView.mjs","../../node_modules/@ingka/ssr-icon/esm/renderPaths.mjs","../../node_modules/@ingka/ssr-icon/esm/paths/chevron-right-small.mjs","../../node_modules/@ingka/ssr-icon/esm/paths/chevron-right.mjs","../../node_modules/@ingka/ssr-icon/esm/paths/arrow-right.mjs","../../node_modules/@ingka/ssr-icon/esm/paths/link-out.mjs","../../node_modules/@ingka/ssr-icon/esm/paths/copy.mjs","../../node_modules/@ingka/label/esm/Label.mjs","../../node_modules/@ingka/label/esm/index.mjs","../../node_modules/@ingka/form-field/esm/FormFieldContext.mjs","../../node_modules/@ingka/ssr-icon/esm/IconBase.mjs","../../node_modules/@ingka/ssr-icon/esm/SSRIcon.mjs","../../node_modules/@ingka/ssr-icon/esm/index.mjs","../../node_modules/@ingka/checkbox/esm/Checkbox.mjs","../../node_modules/@ingka/checkbox/esm/index.mjs","../../node_modules/@ingka/radio-button/esm/RadioButton.mjs","../../node_modules/@ingka/radio-button/esm/index.mjs","../../node_modules/@ingka/switch/esm/Switch.mjs","../../node_modules/@ingka/switch/esm/index.mjs","../../node_modules/@ingka/ssr-icon/esm/paths/image-strikethrough.mjs","../../node_modules/@ingka/ssr-icon/esm/paths/image.mjs","../../node_modules/@ingka/image/esm/Image.mjs","../../node_modules/@ingka/image/esm/index.mjs","../../node_modules/@ingka/aspect-ratio-box/esm/AspectRatioBox.mjs","../../node_modules/@ingka/aspect-ratio-box/esm/index.mjs","../../node_modules/@ingka/payment-logo/esm/PaymentLogo.mjs","../../node_modules/@ingka/payment-logo/esm/index.mjs","../../node_modules/@ingka/ssr-icon/esm/paths/person.mjs","../../node_modules/@ingka/ssr-icon/esm/paths/person-small.mjs","../../node_modules/@ingka/avatar/esm/Avatar.mjs","../../node_modules/@ingka/avatar/esm/index.mjs","../../node_modules/@ingka/list-view/esm/ListViewItem.mjs","../../node_modules/@ingka/list-view/esm/index.mjs","../../node_modules/@ingka/loading/esm/Loading.mjs","../../node_modules/@ingka/loading/esm/LoadingBall.mjs","../../node_modules/@ingka/skeleton/esm/Skeleton.mjs","../../node_modules/@ingka/skeleton/esm/index.mjs","../../node_modules/@ingka/text/esm/Text.mjs","../../node_modules/@ingka/text/esm/index.mjs","../../src/ui/Text.ts","../../src/utils/constants/zIndex.ts","../../src/components/LoadingScreen.tsx","../../node_modules/scheduler/cjs/scheduler.production.min.js","../../node_modules/scheduler/index.js","../../node_modules/react-dom/cjs/react-dom.production.min.js","../../node_modules/react-dom/index.js","../../node_modules/react-dom/client.js","../../node_modules/react-fast-compare/index.js","../../node_modules/invariant/browser.js","../../node_modules/react-helmet-async/lib/index.esm.js","../../node_modules/cookie/dist/index.js","../../node_modules/react-router/dist/development/chunk-HA7DTUK3.mjs","../../src/utils/getBrowserTheme.ts","../../src/utils/sentry.ts","../../src/hooks/useSentryTags.ts","../../src/sentry/helper/index.ts","../../src/sentry/index.ts","../../src/index.tsx"],"sourcesContent":["/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1 {\n const originalConsoleMethod = originalConsoleMethods[level] ;\n wrappedFuncs[level] = console[level] ;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] ;\n });\n }\n}\n\nfunction makeLogger() {\n let enabled = false;\n const logger = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled,\n };\n\n if (DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = (...args) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger ;\n}\n\n/**\n * This is a logger singleton which either logs things or no-ops if logging is not enabled.\n * The logger is a singleton on the carrier, to ensure that a consistent logger is used throughout the SDK.\n */\nconst logger = getGlobalSingleton('logger', makeLogger);\n\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };\n//# sourceMappingURL=logger.js.map\n","const STACKTRACE_FRAME_LIMIT = 50;\nconst UNKNOWN_FUNCTION = '?';\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nfunction createStackParser(...parsers) {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack, skipFirstLines = 0, framesToPop = 0) => {\n const frames = [];\n const lines = stack.split('\\n');\n\n for (let i = skipFirstLines; i < lines.length; i++) {\n const line = lines[i] ;\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n\n if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) {\n break;\n }\n }\n\n return stripSentryFramesAndReverse(frames.slice(framesToPop));\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nfunction stackParserFromStackParserOptions(stackParser) {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nfunction stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the scope itself, making it:\n //\n // Sentry.captureException()\n // scope.captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n }\n }\n\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || getLastStackFrame(localStack).filename,\n function: frame.function || UNKNOWN_FUNCTION,\n }));\n}\n\nfunction getLastStackFrame(arr) {\n return arr[arr.length - 1] || {};\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nfunction getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Get's stack frames from an event without needing to check for undefined properties.\n */\nfunction getFramesFromEvent(event) {\n const exception = event.exception;\n\n if (exception) {\n const frames = [];\n try {\n // @ts-expect-error Object could be undefined\n exception.values.forEach(value => {\n // @ts-expect-error Value could be undefined\n if (value.stacktrace.frames) {\n // @ts-expect-error Value could be undefined\n frames.push(...value.stacktrace.frames);\n }\n });\n return frames;\n } catch (_oO) {\n return undefined;\n }\n }\n return undefined;\n}\n\nexport { UNKNOWN_FUNCTION, createStackParser, getFramesFromEvent, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse };\n//# sourceMappingURL=stacktrace.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../logger.js';\nimport { getFunctionName } from '../stacktrace.js';\n\n// We keep the handlers globally\nconst handlers = {};\nconst instrumented = {};\n\n/** Add a handler function. */\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach(key => {\n handlers[key ] = undefined;\n });\n}\n\n/** Maybe run an instrumentation function, unless it was already called. */\nfunction maybeInstrument(type, instrumentFn) {\n if (!instrumented[type]) {\n instrumented[type] = true;\n try {\n instrumentFn();\n } catch (e) {\n DEBUG_BUILD && logger.error(`Error while instrumenting ${type}`, e);\n }\n }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = type && handlers[type];\n if (!typeHandlers) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nexport { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers };\n//# sourceMappingURL=handlers.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnErrorHandler = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalErrorInstrumentationHandler(handler) {\n const type = 'error';\n addHandler(type, handler);\n maybeInstrument(type, instrumentError);\n}\n\nfunction instrumentError() {\n _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n\n // Note: The reason we are doing window.onerror instead of window.addEventListener('error')\n // is that we are using this handler in the Loader Script, to handle buffered errors consistently\n GLOBAL_OBJ.onerror = function (\n msg,\n url,\n line,\n column,\n error,\n ) {\n const handlerData = {\n column,\n error,\n line,\n msg,\n url,\n };\n triggerHandlers('error', handlerData);\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalErrorInstrumentationHandler };\n//# sourceMappingURL=globalError.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnUnhandledRejectionHandler = null;\n\n/**\n * Add an instrumentation handler for when an unhandled promise rejection is captured.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalUnhandledRejectionInstrumentationHandler(\n handler,\n) {\n const type = 'unhandledrejection';\n addHandler(type, handler);\n maybeInstrument(type, instrumentUnhandledRejection);\n}\n\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;\n\n // Note: The reason we are doing window.onunhandledrejection instead of window.addEventListener('unhandledrejection')\n // is that we are using this handler in the Loader Script, to handle buffered rejections consistently\n GLOBAL_OBJ.onunhandledrejection = function (e) {\n const handlerData = e;\n triggerHandlers('unhandledrejection', handlerData);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n\n GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalUnhandledRejectionInstrumentationHandler };\n//# sourceMappingURL=globalUnhandledRejection.js.map\n","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n case '[object WebAssembly.Exception]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isString(wat) {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isParameterizedString(wat) {\n return (\n typeof wat === 'object' &&\n wat !== null &&\n '__sentry_template_string__' in wat &&\n '__sentry_template_values__' in wat\n );\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPrimitive(wat) {\n return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nfunction isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat?.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nfunction isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isVueViewModel(wat) {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && ((wat ).__isVue || (wat )._isVue));\n}\n\nexport { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel };\n//# sourceMappingURL=is.js.map\n","import { isString } from './is.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n\n if (!elem?.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset) {\n if (elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n if (elem.dataset['sentryElement']) {\n return elem.dataset['sentryElement'];\n }\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs = keyAttrs?.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs?.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n const className = elem.className;\n if (className && isString(className)) {\n const classes = className.split(/\\s+/);\n for (const c of classes) {\n out.push(`.${c}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (const k of allowedAttrs) {\n const attr = elem.getAttribute(k);\n if (attr) {\n out.push(`[${k}=\"${attr}\"]`);\n }\n }\n\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` or `data-sentry-element` attribute with `data-sentry-component` taking\n * precedence. This attribute is added at build-time by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement) {\n if (currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n if (currentElem.dataset['sentryElement']) {\n return currentElem.dataset['sentryElement'];\n }\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n","import { isVueViewModel, isString, isRegExp } from './is.js';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nfunction truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nfunction snipLine(line, colno) {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nfunction safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if (isVueViewModel(value)) {\n output.push('[VueViewModel]');\n } else {\n output.push(String(value));\n }\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nfunction isMatchingPattern(\n value,\n pattern,\n requireExactStringMatch = false,\n) {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nfunction stringMatchesSomePattern(\n testString,\n patterns = [],\n requireExactStringMatch = false,\n) {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n\nexport { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate };\n//# sourceMappingURL=string.js.map\n","import { htmlTreeAsString } from './browser.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] ;\n const wrapped = replacementFactory(original) ;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n try {\n source[name] = wrapped;\n } catch {\n DEBUG_BUILD && logger.log(`Failed to replace method \"${name}\" in object`, source);\n }\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n DEBUG_BUILD && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argument itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(value)\n\n {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj\n\n = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj )[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n const firstKey = keys[0];\n\n if (!firstKey) {\n return '[object has no keys]';\n }\n\n if (firstKey.length >= maxLength) {\n return truncate(firstKey, maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPojo(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.getOwnPropertyNames(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue ;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue ;\n }\n\n return inputValue;\n}\n\nfunction isPojo(input) {\n if (!isPlainObject(input)) {\n return false;\n }\n\n try {\n const name = (Object.getPrototypeOf(input) ).constructor.name;\n return !name || name === 'Object';\n } catch {\n return true;\n }\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n // this will catch both undefined and null\n case wat == undefined:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat ).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify };\n//# sourceMappingURL=object.js.map\n","import { GLOBAL_OBJ } from './worldwide.js';\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nfunction dateTimestampInSeconds() {\n return Date.now() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc() {\n const { performance } = GLOBAL_OBJ ;\n if (!performance?.now) {\n return dateTimestampInSeconds;\n }\n\n // Some browser and environments don't have a timeOrigin, so we fallback to\n // using Date.now() to compute the starting time.\n const approxStartingTimeOrigin = Date.now() - performance.now();\n const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;\n\n // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n //\n // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n // correct for this.\n // See: https://github.com/getsentry/sentry-javascript/issues/2590\n // See: https://github.com/mdn/content/issues/4713\n // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n return () => {\n return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;\n };\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = createUnixTimestampInSecondsFunc();\n\n/**\n * Cached result of getBrowserTimeOrigin.\n */\nlet cachedTimeOrigin;\n\n/**\n * Gets the time origin and the mode used to determine it.\n */\nfunction getBrowserTimeOrigin() {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = GLOBAL_OBJ ;\n if (!performance?.now) {\n return [undefined, 'none'];\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing?.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n return [performance.timeOrigin, 'timeOrigin'];\n } else {\n return [navigationStart, 'navigationStart'];\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n return [dateNow, 'dateNow'];\n}\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nfunction browserPerformanceTimeOrigin() {\n if (!cachedTimeOrigin) {\n cachedTimeOrigin = getBrowserTimeOrigin();\n }\n\n return cachedTimeOrigin[0];\n}\n\nexport { browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds };\n//# sourceMappingURL=time.js.map\n","import { addNonEnumerableProperty } from './object.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nfunction getCrypto() {\n const gbl = GLOBAL_OBJ ;\n return gbl.crypto || gbl.msCrypto;\n}\n\n/**\n * UUID4 generator\n * @param crypto Object that provides the crypto API.\n * @returns string Generated UUID4.\n */\nfunction uuid4(crypto = getCrypto()) {\n let getRandomByte = () => Math.random() * 16;\n try {\n if (crypto?.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto?.getRandomValues) {\n getRandomByte = () => {\n // crypto.getRandomValues might return undefined instead of the typed array\n // in old Chromium versions (e.g. 23.0.1235.0 (151422))\n // However, `typedArray` is still filled in-place.\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#typedarray\n const typedArray = new Uint8Array(1);\n crypto.getRandomValues(typedArray);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return typedArray[0];\n };\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event) {\n return event.exception?.values?.[0];\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nfunction getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nfunction addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nfunction addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...currentMechanism?.data, ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\n\nfunction _parseInt(input) {\n return parseInt(input || '', 10);\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nfunction parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = _parseInt(match[1]);\n const minor = _parseInt(match[2]);\n const patch = _parseInt(match[3]);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line) => snipLine(line, 0));\n\n // We guard here to ensure this is not larger than the existing number of lines\n const lineIndex = Math.min(maxLines - 1, sourceLine);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n frame.context_line = snipLine(lines[lineIndex], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nfunction checkOrSetAlreadyCaught(exception) {\n if (isAlreadyCaptured(exception)) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception , '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\nfunction isAlreadyCaptured(exception) {\n try {\n return (exception ).__sentry_captured__;\n } catch {} // eslint-disable-line no-empty\n}\n\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 };\n//# sourceMappingURL=misc.js.map\n","import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n /** Pending */\n const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n constructor(executor) {\n this._state = States.PENDING;\n this._handlers = [];\n\n this._runExecutor(executor);\n }\n\n /** @inheritdoc */\n then(\n onfulfilled,\n onrejected,\n ) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result );\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** @inheritdoc */\n catch(\n onrejected,\n ) {\n return this.then(val => val, onrejected);\n }\n\n /** @inheritdoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val );\n });\n });\n }\n\n /** Excute the resolve/reject handlers. */\n _executeHandlers() {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n handler[1](this._value );\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n }\n\n /** Run the executor for the SyncPromise. */\n _runExecutor(executor) {\n const setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value ).then(resolve, reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n const resolve = (value) => {\n setResult(States.RESOLVED, value);\n };\n\n const reject = (reason) => {\n setResult(States.REJECTED, reason);\n };\n\n try {\n executor(resolve, reject);\n } catch (e) {\n reject(e);\n }\n }\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n//# sourceMappingURL=syncpromise.js.map\n","import './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { dropUndefinedKeys } from './utils-hoist/object.js';\nimport { timestampInSeconds } from './utils-hoist/time.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport './utils-hoist/syncpromise.js';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nfunction makeSession(context) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see Client.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nfunction updateSession(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nfunction closeSession(session, status) {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session) {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n\nexport { closeSession, makeSession, updateSession };\n//# sourceMappingURL=session.js.map\n","import { uuid4 } from './misc.js';\n\n/**\n * Generate a random, valid trace ID.\n */\nfunction generateTraceId() {\n return uuid4();\n}\n\n/**\n * Generate a random, valid span ID.\n */\nfunction generateSpanId() {\n return uuid4().substring(16);\n}\n\nexport { generateSpanId, generateTraceId };\n//# sourceMappingURL=propagationContext.js.map\n","/**\n * Shallow merge two objects.\n * Does not mutate the passed in objects.\n * Undefined/empty values in the merge object will overwrite existing values.\n *\n * By default, this merges 2 levels deep.\n */\nfunction merge(initialObj, mergeObj, levels = 2) {\n // If the merge value is not an object, or we have no merge levels left,\n // we just set the value to the merge value\n if (!mergeObj || typeof mergeObj !== 'object' || levels <= 0) {\n return mergeObj;\n }\n\n // If the merge object is an empty object, and the initial object is not undefined, we return the initial object\n if (initialObj && Object.keys(mergeObj).length === 0) {\n return initialObj;\n }\n\n // Clone object\n const output = { ...initialObj };\n\n // Merge values into output, resursively\n for (const key in mergeObj) {\n if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {\n output[key] = merge(output[key], mergeObj[key], levels - 1);\n }\n }\n\n return output;\n}\n\nexport { merge };\n//# sourceMappingURL=merge.js.map\n","import { addNonEnumerableProperty } from '../utils-hoist/object.js';\n\nconst SCOPE_SPAN_FIELD = '_sentrySpan';\n\n/**\n * Set the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nfunction _setSpanForScope(scope, span) {\n if (span) {\n addNonEnumerableProperty(scope , SCOPE_SPAN_FIELD, span);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete (scope )[SCOPE_SPAN_FIELD];\n }\n}\n\n/**\n * Get the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nfunction _getSpanForScope(scope) {\n return scope[SCOPE_SPAN_FIELD];\n}\n\nexport { _getSpanForScope, _setSpanForScope };\n//# sourceMappingURL=spanOnScope.js.map\n","import { updateSession } from './session.js';\nimport { isPlainObject } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport { generateTraceId } from './utils-hoist/propagationContext.js';\nimport { dateTimestampInSeconds } from './utils-hoist/time.js';\nimport { merge } from './utils/merge.js';\nimport { _setSpanForScope, _getSpanForScope } from './utils/spanOnScope.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * A context to be used for capturing an event.\n * This can either be a Scope, or a partial ScopeContext,\n * or a callback that receives the current scope and returns a new scope to use.\n */\n\n/**\n * Holds additional event information.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called during event processing. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n\n /**\n * Transaction Name\n *\n * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.\n * It's purpose is to assign a transaction to the scope that's added to non-transaction events.\n */\n\n /** Session */\n\n /** The client on this scope */\n\n /** Contains the last event id of a captured event. */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = {\n traceId: generateTraceId(),\n sampleRand: Math.random(),\n };\n }\n\n /**\n * Clone all data from this scope into a new scope.\n */\n clone() {\n const newScope = new Scope();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n if (this._contexts.flags) {\n // We need to copy the `values` array so insertions on a cloned scope\n // won't affect the original array.\n newScope._contexts.flags = {\n values: [...this._contexts.flags.values],\n };\n }\n\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n newScope._lastEventId = this._lastEventId;\n\n _setSpanForScope(newScope, _getSpanForScope(this));\n\n return newScope;\n }\n\n /**\n * Update the client assigned to this scope.\n * Note that not every scope will have a client assigned - isolation scopes & the global scope will generally not have a client,\n * as well as manually created scopes.\n */\n setClient(client) {\n this._client = client;\n }\n\n /**\n * Set the ID of the last captured error event.\n * This is generally only captured on the isolation scope.\n */\n setLastEventId(lastEventId) {\n this._lastEventId = lastEventId;\n }\n\n /**\n * Get the client assigned to this scope.\n */\n getClient() {\n return this._client ;\n }\n\n /**\n * Get the ID of the last captured error event.\n * This is generally only available on the isolation scope.\n */\n lastEventId() {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * Add an event processor that will be called before an event is sent.\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * Set the user for this scope.\n * Set to `null` to unset the user.\n */\n setUser(user) {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n username: undefined,\n };\n\n if (this._session) {\n updateSession(this._session, { user });\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Get the user from this scope.\n */\n getUser() {\n return this._user;\n }\n\n /**\n * Set an object that will be merged into existing tags on the scope,\n * and will be sent as tags data with the event.\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set a single tag that will be sent as tags data with the event.\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set an object that will be merged into existing extra on the scope,\n * and will be sent as extra data with the event.\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set a single key:value extra entry that will be sent as extra data with the event.\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param {string[]} fingerprint Fingerprint to group events in Sentry.\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the level on the scope for future events.\n */\n setLevel(level) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope so that the name of e.g. taken server route or\n * the page location is attached to future events.\n *\n * IMPORTANT: Calling this function does NOT change the name of the currently active\n * root span. If you want to change the name of the active root span, use\n * `Sentry.updateSpanName(rootSpan, 'new name')` instead.\n *\n * By default, the SDK updates the scope's transaction name automatically on sensible\n * occasions, such as a page navigation or when handling a new request on the server.\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets context data with the given name.\n * Data passed as context will be normalized. You can also pass `null` to unset the context.\n * Note that context data will not be merged - calling `setContext` will overwrite an existing context with the same key.\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set the session for the scope.\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Get the session from the scope.\n */\n getSession() {\n return this._session;\n }\n\n /**\n * Updates the scope with provided data. Can work in three variations:\n * - plain object containing updatable attributes\n * - Scope instance that'll extract the attributes from\n * - callback function that'll receive the current scope as an argument and allow for modifications\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n const scopeInstance =\n scopeToMerge instanceof Scope\n ? scopeToMerge.getScopeData()\n : isPlainObject(scopeToMerge)\n ? (captureContext )\n : undefined;\n\n const { tags, extra, user, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {};\n\n this._tags = { ...this._tags, ...tags };\n this._extra = { ...this._extra, ...extra };\n this._contexts = { ...this._contexts, ...contexts };\n\n if (user && Object.keys(user).length) {\n this._user = user;\n }\n\n if (level) {\n this._level = level;\n }\n\n if (fingerprint.length) {\n this._fingerprint = fingerprint;\n }\n\n if (propagationContext) {\n this._propagationContext = propagationContext;\n }\n\n return this;\n }\n\n /**\n * Clears the current scope and resets its properties.\n * Note: The client will not be cleared.\n */\n clear() {\n // client is not cleared here on purpose!\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._session = undefined;\n _setSpanForScope(this, undefined);\n this._attachments = [];\n this.setPropagationContext({ traceId: generateTraceId(), sampleRand: Math.random() });\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Adds a breadcrumb to the scope.\n * By default, the last 100 breadcrumbs are kept.\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n this._breadcrumbs.push(mergedBreadcrumb);\n if (this._breadcrumbs.length > maxCrumbs) {\n this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);\n this._client?.recordDroppedEvent('buffer_overflow', 'log_item');\n }\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * Get the last breadcrumb of the scope.\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * Clear all breadcrumbs from the scope.\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Add an attachment to the scope.\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * Clear all attachments from the scope.\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /**\n * Get the data of this scope, which should be applied to an event during processing.\n */\n getScopeData() {\n return {\n breadcrumbs: this._breadcrumbs,\n attachments: this._attachments,\n contexts: this._contexts,\n tags: this._tags,\n extra: this._extra,\n user: this._user,\n level: this._level,\n fingerprint: this._fingerprint || [],\n eventProcessors: this._eventProcessors,\n propagationContext: this._propagationContext,\n sdkProcessingMetadata: this._sdkProcessingMetadata,\n transactionName: this._transactionName,\n span: _getSpanForScope(this),\n };\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry.\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);\n return this;\n }\n\n /**\n * Add propagation context to the scope, used for distributed tracing\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * Get propagation context from the scope, used for distributed tracing\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * Capture an exception for this scope.\n *\n * @returns {string} The id of the captured Sentry event.\n */\n captureException(exception, hint) {\n const eventId = hint?.event_id || uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n const syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a message for this scope.\n *\n * @returns {string} The id of the captured message.\n */\n captureMessage(message, level, hint) {\n const eventId = hint?.event_id || uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n const syntheticException = new Error(message);\n\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a Sentry event for this scope.\n *\n * @returns {string} The id of the captured event.\n */\n captureEvent(event, hint) {\n const eventId = hint?.event_id || uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n\nexport { Scope };\n//# sourceMappingURL=scope.js.map\n","import { getGlobalSingleton } from './carrier.js';\nimport { Scope } from './scope.js';\n\n/** Get the default current scope. */\nfunction getDefaultCurrentScope() {\n return getGlobalSingleton('defaultCurrentScope', () => new Scope());\n}\n\n/** Get the default isolation scope. */\nfunction getDefaultIsolationScope() {\n return getGlobalSingleton('defaultIsolationScope', () => new Scope());\n}\n\nexport { getDefaultCurrentScope, getDefaultIsolationScope };\n//# sourceMappingURL=defaultScopes.js.map\n","import { getDefaultCurrentScope, getDefaultIsolationScope } from '../defaultScopes.js';\nimport { Scope } from '../scope.js';\nimport { isThenable } from '../utils-hoist/is.js';\nimport { getMainCarrier, getSentryCarrier } from '../carrier.js';\n\n/**\n * This is an object that holds a stack of scopes.\n */\nclass AsyncContextStack {\n\n constructor(scope, isolationScope) {\n let assignedScope;\n if (!scope) {\n assignedScope = new Scope();\n } else {\n assignedScope = scope;\n }\n\n let assignedIsolationScope;\n if (!isolationScope) {\n assignedIsolationScope = new Scope();\n } else {\n assignedIsolationScope = isolationScope;\n }\n\n // scope stack for domains or the process\n this._stack = [{ scope: assignedScope }];\n this._isolationScope = assignedIsolationScope;\n }\n\n /**\n * Fork a scope for the stack.\n */\n withScope(callback) {\n const scope = this._pushScope();\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(scope);\n } catch (e) {\n this._popScope();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n // @ts-expect-error - isThenable returns the wrong type\n return maybePromiseResult.then(\n res => {\n this._popScope();\n return res;\n },\n e => {\n this._popScope();\n throw e;\n },\n );\n }\n\n this._popScope();\n return maybePromiseResult;\n }\n\n /**\n * Get the client of the stack.\n */\n getClient() {\n return this.getStackTop().client ;\n }\n\n /**\n * Returns the scope of the top stack.\n */\n getScope() {\n return this.getStackTop().scope;\n }\n\n /**\n * Get the isolation scope for the stack.\n */\n getIsolationScope() {\n return this._isolationScope;\n }\n\n /**\n * Returns the topmost scope layer in the order domain > local > process.\n */\n getStackTop() {\n return this._stack[this._stack.length - 1] ;\n }\n\n /**\n * Push a scope to the stack.\n */\n _pushScope() {\n // We want to clone the content of prev scope\n const scope = this.getScope().clone();\n this._stack.push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * Pop a scope from the stack.\n */\n _popScope() {\n if (this._stack.length <= 1) return false;\n return !!this._stack.pop();\n }\n}\n\n/**\n * Get the global async context stack.\n * This will be removed during the v8 cycle and is only here to make migration easier.\n */\nfunction getAsyncContextStack() {\n const registry = getMainCarrier();\n const sentry = getSentryCarrier(registry);\n\n return (sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope()));\n}\n\nfunction withScope(callback) {\n return getAsyncContextStack().withScope(callback);\n}\n\nfunction withSetScope(scope, callback) {\n const stack = getAsyncContextStack() ;\n return stack.withScope(() => {\n stack.getStackTop().scope = scope;\n return callback(scope);\n });\n}\n\nfunction withIsolationScope(callback) {\n return getAsyncContextStack().withScope(() => {\n return callback(getAsyncContextStack().getIsolationScope());\n });\n}\n\n/**\n * Get the stack-based async context strategy.\n */\nfunction getStackAsyncContextStrategy() {\n return {\n withIsolationScope,\n withScope,\n withSetScope,\n withSetIsolationScope: (_isolationScope, callback) => {\n return withIsolationScope(callback);\n },\n getCurrentScope: () => getAsyncContextStack().getScope(),\n getIsolationScope: () => getAsyncContextStack().getIsolationScope(),\n };\n}\n\nexport { AsyncContextStack, getStackAsyncContextStrategy };\n//# sourceMappingURL=stackStrategy.js.map\n","import { getMainCarrier, getSentryCarrier } from '../carrier.js';\nimport { getStackAsyncContextStrategy } from './stackStrategy.js';\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n const sentry = getSentryCarrier(registry);\n sentry.acs = strategy;\n}\n\n/**\n * Get the current async context strategy.\n * If none has been setup, the default will be used.\n */\nfunction getAsyncContextStrategy(carrier) {\n const sentry = getSentryCarrier(carrier);\n\n if (sentry.acs) {\n return sentry.acs;\n }\n\n // Otherwise, use the default one (stack)\n return getStackAsyncContextStrategy();\n}\n\nexport { getAsyncContextStrategy, setAsyncContextStrategy };\n//# sourceMappingURL=index.js.map\n","import { getAsyncContextStrategy } from './asyncContext/index.js';\nimport { getMainCarrier, getGlobalSingleton } from './carrier.js';\nimport { Scope } from './scope.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { dropUndefinedKeys } from './utils-hoist/object.js';\nimport './utils-hoist/time.js';\nimport './utils-hoist/syncpromise.js';\nimport { generateSpanId } from './utils-hoist/propagationContext.js';\n\n/**\n * Get the currently active scope.\n */\nfunction getCurrentScope() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n return acs.getCurrentScope();\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current execution context.\n */\nfunction getIsolationScope() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n return acs.getIsolationScope();\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nfunction getGlobalScope() {\n return getGlobalSingleton('globalScope', () => new Scope());\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n */\n\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nfunction withScope(\n ...rest\n) {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [scope, callback] = rest;\n\n if (!scope) {\n return acs.withScope(callback);\n }\n\n return acs.withSetScope(scope, callback);\n }\n\n return acs.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n */\n\n/**\n * Either creates a new active isolation scope, or sets the given isolation scope as active scope in the given callback.\n */\nfunction withIsolationScope(\n ...rest\n\n) {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [isolationScope, callback] = rest;\n\n if (!isolationScope) {\n return acs.withIsolationScope(callback);\n }\n\n return acs.withSetIsolationScope(isolationScope, callback);\n }\n\n return acs.withIsolationScope(rest[0]);\n}\n\n/**\n * Get the currently active client.\n */\nfunction getClient() {\n return getCurrentScope().getClient();\n}\n\n/**\n * Get a trace context for the given scope.\n */\nfunction getTraceContextFromScope(scope) {\n const propagationContext = scope.getPropagationContext();\n\n const { traceId, parentSpanId, propagationSpanId } = propagationContext;\n\n const traceContext = dropUndefinedKeys({\n trace_id: traceId,\n span_id: propagationSpanId || generateSpanId(),\n parent_span_id: parentSpanId,\n });\n\n return traceContext;\n}\n\nexport { getClient, getCurrentScope, getGlobalScope, getIsolationScope, getTraceContextFromScope, withIsolationScope, withScope };\n//# sourceMappingURL=currentScopes.js.map\n","/**\n * Use this attribute to represent the source of a span.\n * Should be one of: custom, url, route, view, component, task, unknown\n *\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Attributes that holds the sample rate that was locally applied to a span.\n * If this attribute is not defined, it means that the span inherited a sampling decision.\n *\n * NOTE: Is only defined on root spans.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/** The reason why an idle span finished. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';\n\n/** The unit of a measurement, which may be stored as a TimedEvent. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';\n\n/** The value of a measurement, which may be stored as a TimedEvent. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';\n\n/**\n * A custom span name set by users guaranteed to be taken over any automatically\n * inferred name. This attribute is removed before the span is sent.\n *\n * @internal only meant for internal SDK usage\n * @hidden\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';\n\n/**\n * The id of the profile that this span occurred in.\n */\nconst SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';\n\nconst SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';\n\n/** TODO: Remove these once we update to latest semantic conventions */\nconst SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';\nconst SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';\n\nexport { SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_URL_FULL };\n//# sourceMappingURL=semanticAttributes.js.map\n","const SPAN_STATUS_UNSET = 0;\nconst SPAN_STATUS_OK = 1;\nconst SPAN_STATUS_ERROR = 2;\n\n/**\n * Converts a HTTP status code into a sentry status with a message.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\n// https://develop.sentry.dev/sdk/event-payloads/span/\nfunction getSpanStatusFromHttpCode(httpStatus) {\n if (httpStatus < 400 && httpStatus >= 100) {\n return { code: SPAN_STATUS_OK };\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return { code: SPAN_STATUS_ERROR, message: 'unauthenticated' };\n case 403:\n return { code: SPAN_STATUS_ERROR, message: 'permission_denied' };\n case 404:\n return { code: SPAN_STATUS_ERROR, message: 'not_found' };\n case 409:\n return { code: SPAN_STATUS_ERROR, message: 'already_exists' };\n case 413:\n return { code: SPAN_STATUS_ERROR, message: 'failed_precondition' };\n case 429:\n return { code: SPAN_STATUS_ERROR, message: 'resource_exhausted' };\n case 499:\n return { code: SPAN_STATUS_ERROR, message: 'cancelled' };\n default:\n return { code: SPAN_STATUS_ERROR, message: 'invalid_argument' };\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return { code: SPAN_STATUS_ERROR, message: 'unimplemented' };\n case 503:\n return { code: SPAN_STATUS_ERROR, message: 'unavailable' };\n case 504:\n return { code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' };\n default:\n return { code: SPAN_STATUS_ERROR, message: 'internal_error' };\n }\n }\n\n return { code: SPAN_STATUS_ERROR, message: 'unknown_error' };\n}\n\n/**\n * Sets the Http status attributes on the current span based on the http code.\n * Additionally, the span's status is updated, depending on the http code.\n */\nfunction setHttpStatus(span, httpStatus) {\n span.setAttribute('http.response.status_code', httpStatus);\n\n const spanStatus = getSpanStatusFromHttpCode(httpStatus);\n if (spanStatus.message !== 'unknown_error') {\n span.setStatus(spanStatus);\n }\n}\n\nexport { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET, getSpanStatusFromHttpCode, setHttpStatus };\n//# sourceMappingURL=spanstatus.js.map\n","import { addNonEnumerableProperty } from '../utils-hoist/object.js';\n\nconst SCOPE_ON_START_SPAN_FIELD = '_sentryScope';\nconst ISOLATION_SCOPE_ON_START_SPAN_FIELD = '_sentryIsolationScope';\n\n/** Store the scope & isolation scope for a span, which can the be used when it is finished. */\nfunction setCapturedScopesOnSpan(span, scope, isolationScope) {\n if (span) {\n addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope);\n addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope);\n }\n}\n\n/**\n * Grabs the scope and isolation scope off a span that were active when the span was started.\n */\nfunction getCapturedScopesOnSpan(span) {\n return {\n scope: (span )[SCOPE_ON_START_SPAN_FIELD],\n isolationScope: (span )[ISOLATION_SCOPE_ON_START_SPAN_FIELD],\n };\n}\n\nexport { getCapturedScopesOnSpan, setCapturedScopesOnSpan };\n//# sourceMappingURL=utils.js.map\n","/**\n * Parse a sample rate from a given value.\n * This will either return a boolean or number sample rate, if the sample rate is valid (between 0 and 1).\n * If a string is passed, we try to convert it to a number.\n *\n * Any invalid sample rate will return `undefined`.\n */\nfunction parseSampleRate(sampleRate) {\n if (typeof sampleRate === 'boolean') {\n return Number(sampleRate);\n }\n\n const rate = typeof sampleRate === 'string' ? parseFloat(sampleRate) : sampleRate;\n if (typeof rate !== 'number' || isNaN(rate) || rate < 0 || rate > 1) {\n return undefined;\n }\n\n return rate;\n}\n\nexport { parseSampleRate };\n//# sourceMappingURL=parseSampleRate.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n const baggageObject = parseBaggageHeader(baggageHeader);\n\n if (!baggageObject) {\n return undefined;\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Take a baggage header and parse it into an object.\n */\nfunction parseBaggageHeader(\n baggageHeader,\n) {\n if (!baggageHeader || (!isString(baggageHeader) && !Array.isArray(baggageHeader))) {\n return undefined;\n }\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n return baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n Object.entries(currBaggageObject).forEach(([key, value]) => {\n acc[key] = value;\n });\n return acc;\n }, {});\n }\n\n return baggageHeaderToObject(baggageHeader);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n if (key && value) {\n acc[key] = value;\n }\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader, objectToBaggageHeader, parseBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n","import { parseSampleRate } from '../utils/parseSampleRate.js';\nimport { baggageHeaderToDynamicSamplingContext } from './baggage.js';\nimport { generateTraceId, generateSpanId } from './propagationContext.js';\n\n// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- RegExp is used for readability here\nconst TRACEPARENT_REGEXP = new RegExp(\n '^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nfunction extractTraceparentData(traceparent) {\n if (!traceparent) {\n return undefined;\n }\n\n const matches = traceparent.match(TRACEPARENT_REGEXP);\n if (!matches) {\n return undefined;\n }\n\n let parentSampled;\n if (matches[3] === '1') {\n parentSampled = true;\n } else if (matches[3] === '0') {\n parentSampled = false;\n }\n\n return {\n traceId: matches[1],\n parentSampled,\n parentSpanId: matches[2],\n };\n}\n\n/**\n * Create a propagation context from incoming headers or\n * creates a minimal new one if the headers are undefined.\n */\nfunction propagationContextFromHeaders(\n sentryTrace,\n baggage,\n) {\n const traceparentData = extractTraceparentData(sentryTrace);\n const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n if (!traceparentData?.traceId) {\n return {\n traceId: generateTraceId(),\n sampleRand: Math.random(),\n };\n }\n\n const sampleRand = getSampleRandFromTraceparentAndDsc(traceparentData, dynamicSamplingContext);\n\n // The sample_rand on the DSC needs to be generated based on traceparent + baggage.\n if (dynamicSamplingContext) {\n dynamicSamplingContext.sample_rand = sampleRand.toString();\n }\n\n const { traceId, parentSpanId, parentSampled } = traceparentData;\n\n return {\n traceId,\n parentSpanId,\n sampled: parentSampled,\n dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n sampleRand,\n };\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nfunction generateSentryTraceHeader(\n traceId = generateTraceId(),\n spanId = generateSpanId(),\n sampled,\n) {\n let sampledString = '';\n if (sampled !== undefined) {\n sampledString = sampled ? '-1' : '-0';\n }\n return `${traceId}-${spanId}${sampledString}`;\n}\n\n/**\n * Given any combination of an incoming trace, generate a sample rand based on its defined semantics.\n *\n * Read more: https://develop.sentry.dev/sdk/telemetry/traces/#propagated-random-value\n */\nfunction getSampleRandFromTraceparentAndDsc(\n traceparentData,\n dsc,\n) {\n // When there is an incoming sample rand use it.\n const parsedSampleRand = parseSampleRate(dsc?.sample_rand);\n if (parsedSampleRand !== undefined) {\n return parsedSampleRand;\n }\n\n // Otherwise, if there is an incoming sampling decision + sample rate, generate a sample rand that would lead to the same sampling decision.\n const parsedSampleRate = parseSampleRate(dsc?.sample_rate);\n if (parsedSampleRate && traceparentData?.parentSampled !== undefined) {\n return traceparentData.parentSampled\n ? // Returns a sample rand with positive sampling decision [0, sampleRate)\n Math.random() * parsedSampleRate\n : // Returns a sample rand with negative sampling decision [sampleRate, 1)\n parsedSampleRate + Math.random() * (1 - parsedSampleRate);\n } else {\n // If nothing applies, return a random sample rand.\n return Math.random();\n }\n}\n\nexport { TRACEPARENT_REGEXP, extractTraceparentData, generateSentryTraceHeader, propagationContextFromHeaders };\n//# sourceMappingURL=tracing.js.map\n","import { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { getMainCarrier } from '../carrier.js';\nimport { getCurrentScope } from '../currentScopes.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '../semanticAttributes.js';\nimport { SPAN_STATUS_UNSET, SPAN_STATUS_OK } from '../tracing/spanstatus.js';\nimport { getCapturedScopesOnSpan } from '../tracing/utils.js';\nimport { consoleSandbox } from '../utils-hoist/logger.js';\nimport { dropUndefinedKeys, addNonEnumerableProperty } from '../utils-hoist/object.js';\nimport { generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { generateSentryTraceHeader } from '../utils-hoist/tracing.js';\nimport { _getSpanForScope } from './spanOnScope.js';\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\n\nlet hasShownSpanDropWarning = false;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n * By default, this will only include trace_id, span_id & parent_span_id.\n * If `includeAllData` is true, it will also include data, op, status & origin.\n */\nfunction spanToTransactionTraceContext(span) {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, origin, links } = spanToJSON(span);\n\n return dropUndefinedKeys({\n parent_span_id,\n span_id,\n trace_id,\n data,\n op,\n status,\n origin,\n links,\n });\n}\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.\n */\nfunction spanToTraceContext(span) {\n const { spanId, traceId: trace_id, isRemote } = span.spanContext();\n\n // If the span is remote, we use a random/virtual span as span_id to the trace context,\n // and the remote span as parent_span_id\n const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;\n const scope = getCapturedScopesOnSpan(span).scope;\n\n const span_id = isRemote ? scope?.getPropagationContext().propagationSpanId || generateSpanId() : spanId;\n\n return dropUndefinedKeys({\n parent_span_id,\n span_id,\n trace_id,\n });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Converts the span links array to a flattened version to be sent within an envelope.\n *\n * If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.\n */\nfunction convertSpanLinksForEnvelope(links) {\n if (links && links.length > 0) {\n return links.map(({ context: { spanId, traceId, traceFlags, ...restContext }, attributes }) => ({\n span_id: spanId,\n trace_id: traceId,\n sampled: traceFlags === TRACE_FLAG_SAMPLED,\n attributes,\n ...restContext,\n }));\n } else {\n return undefined;\n }\n}\n\n/**\n * Convert a span time input into a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n */\n// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n// And `spanToJSON` needs the Span class from `span.ts` to check here.\nfunction spanToJSON(span) {\n if (spanIsSentrySpan(span)) {\n return span.getSpanJSON();\n }\n\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n const { attributes, startTime, name, endTime, parentSpanId, status, links } = span;\n\n return dropUndefinedKeys({\n span_id,\n trace_id,\n data: attributes,\n description: name,\n parent_span_id: parentSpanId,\n start_timestamp: spanTimeInputToSeconds(startTime),\n // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time\n timestamp: spanTimeInputToSeconds(endTime) || undefined,\n status: getStatusMessage(status),\n op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,\n links: convertSpanLinksForEnvelope(links),\n });\n }\n\n // Finally, at least we have `spanContext()`....\n // This should not actually happen in reality, but we need to handle it for type safety.\n return {\n span_id,\n trace_id,\n start_timestamp: 0,\n data: {},\n };\n}\n\nfunction spanIsOpenTelemetrySdkTraceBaseSpan(span) {\n const castSpan = span ;\n return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;\n}\n\n/** Exported only for tests. */\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSentrySpan(span) {\n return typeof (span ).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n return traceFlags === TRACE_FLAG_SAMPLED;\n}\n\n/** Get the status message to use for a JSON representation of a span. */\nfunction getStatusMessage(status) {\n if (!status || status.code === SPAN_STATUS_UNSET) {\n return undefined;\n }\n\n if (status.code === SPAN_STATUS_OK) {\n return 'ok';\n }\n\n return status.message || 'unknown_error';\n}\n\nconst CHILD_SPANS_FIELD = '_sentryChildSpans';\nconst ROOT_SPAN_FIELD = '_sentryRootSpan';\n\n/**\n * Adds an opaque child span reference to a span.\n */\nfunction addChildSpanToSpan(span, childSpan) {\n // We store the root span reference on the child span\n // We need this for `getRootSpan()` to work\n const rootSpan = span[ROOT_SPAN_FIELD] || span;\n addNonEnumerableProperty(childSpan , ROOT_SPAN_FIELD, rootSpan);\n\n // We store a list of child spans on the parent span\n // We need this for `getSpanDescendants()` to work\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].add(childSpan);\n } else {\n addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));\n }\n}\n\n/** This is only used internally by Idle Spans. */\nfunction removeChildSpanFromSpan(span, childSpan) {\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].delete(childSpan);\n }\n}\n\n/**\n * Returns an array of the given span and all of its descendants.\n */\nfunction getSpanDescendants(span) {\n const resultSet = new Set();\n\n function addSpanChildren(span) {\n // This exit condition is required to not infinitely loop in case of a circular dependency.\n if (resultSet.has(span)) {\n return;\n // We want to ignore unsampled spans (e.g. non recording spans)\n } else if (spanIsSampled(span)) {\n resultSet.add(span);\n const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];\n for (const childSpan of childSpans) {\n addSpanChildren(childSpan);\n }\n }\n }\n\n addSpanChildren(span);\n\n return Array.from(resultSet);\n}\n\n/**\n * Returns the root span of a given span.\n */\nfunction getRootSpan(span) {\n return span[ROOT_SPAN_FIELD] || span;\n}\n\n/**\n * Returns the currently active span.\n */\nfunction getActiveSpan() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.getActiveSpan) {\n return acs.getActiveSpan();\n }\n\n return _getSpanForScope(getCurrentScope());\n}\n\n/**\n * Logs a warning once if `beforeSendSpan` is used to drop spans.\n */\nfunction showSpanDropWarning() {\n if (!hasShownSpanDropWarning) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.',\n );\n });\n hasShownSpanDropWarning = true;\n }\n}\n\n/**\n * Updates the name of the given span and ensures that the span name is not\n * overwritten by the Sentry SDK.\n *\n * Use this function instead of `span.updateName()` if you want to make sure that\n * your name is kept. For some spans, for example root `http.server` spans the\n * Sentry SDK would otherwise overwrite the span name with a high-quality name\n * it infers when the span ends.\n *\n * Use this function in server code or when your span is started on the server\n * and on the client (browser). If you only update a span name on the client,\n * you can also use `span.updateName()` the SDK does not overwrite the name.\n *\n * @param span - The span to update the name of.\n * @param name - The name to set on the span.\n */\nfunction updateSpanName(span, name) {\n span.updateName(name);\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name,\n });\n}\n\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, addChildSpanToSpan, convertSpanLinksForEnvelope, getActiveSpan, getRootSpan, getSpanDescendants, getStatusMessage, removeChildSpanFromSpan, showSpanDropWarning, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader, spanToTransactionTraceContext, updateSpanName };\n//# sourceMappingURL=spanUtils.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { addGlobalErrorInstrumentationHandler } from '../utils-hoist/instrument/globalError.js';\nimport { addGlobalUnhandledRejectionInstrumentationHandler } from '../utils-hoist/instrument/globalUnhandledRejection.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getActiveSpan, getRootSpan } from '../utils/spanUtils.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\n\nlet errorsInstrumented = false;\n\n/**\n * Ensure that global errors automatically set the active span status.\n */\nfunction registerSpanErrorInstrumentation() {\n if (errorsInstrumented) {\n return;\n }\n\n errorsInstrumented = true;\n addGlobalErrorInstrumentationHandler(errorCallback);\n addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);\n}\n\n/**\n * If an error or unhandled promise occurs, we mark the active root span as failed\n */\nfunction errorCallback() {\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n if (rootSpan) {\n const message = 'internal_error';\n DEBUG_BUILD && logger.log(`[Tracing] Root span: ${message} -> Global error occurred`);\n rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message });\n }\n}\n\n// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the\n// node.js default exit behaviour\nerrorCallback.tag = 'sentry_tracingErrorCallback';\n\nexport { registerSpanErrorInstrumentation };\n//# sourceMappingURL=errors.js.map\n","import { getClient } from '../currentScopes.js';\n\n// Treeshakable guard to remove all code related to tracing\n\n/**\n * Determines if span recording is currently enabled.\n *\n * Spans are recorded when at least one of `tracesSampleRate` and `tracesSampler`\n * is defined in the SDK config. This function does not make any assumption about\n * sampling decisions, it only checks if the SDK is configured to record spans.\n *\n * Important: This function only determines if span recording is enabled. Trace\n * continuation and propagation is separately controlled and not covered by this function.\n * If this function returns `false`, traces can still be propagated (which is what\n * we refer to by \"Tracing without Performance\")\n * @see https://develop.sentry.dev/sdk/telemetry/traces/tracing-without-performance/\n *\n * @param maybeOptions An SDK options object to be passed to this function.\n * If this option is not provided, the function will use the current client's options.\n */\nfunction hasSpansEnabled(\n maybeOptions,\n) {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n\n const options = maybeOptions || getClient()?.getOptions();\n return (\n !!options &&\n // Note: This check is `!= null`, meaning \"nullish\". `0` is not \"nullish\", `undefined` and `null` are. (This comment was brought to you by 15 minutes of questioning life)\n (options.tracesSampleRate != null || !!options.tracesSampler)\n );\n}\n\n/**\n * @see JSDoc of `hasSpansEnabled`\n * @deprecated Use `hasSpansEnabled` instead, which is a more accurately named version of this function.\n * This function will be removed in the next major version of the SDK.\n */\n// TODO(v10): Remove this export\nconst hasTracingEnabled = hasSpansEnabled;\n\nexport { hasSpansEnabled, hasTracingEnabled };\n//# sourceMappingURL=hasSpansEnabled.js.map\n","const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n//# sourceMappingURL=constants.js.map\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getClient } from '../currentScopes.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '../semanticAttributes.js';\nimport { baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader } from '../utils-hoist/baggage.js';\nimport { dropUndefinedKeys, addNonEnumerableProperty } from '../utils-hoist/object.js';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled.js';\nimport { getRootSpan, spanToJSON, spanIsSampled } from '../utils/spanUtils.js';\nimport { getCapturedScopesOnSpan } from './utils.js';\n\n/**\n * If you change this value, also update the terser plugin config to\n * avoid minification of the object property!\n */\nconst FROZEN_DSC_FIELD = '_frozenDsc';\n\n/**\n * Freeze the given DSC on the given span.\n */\nfunction freezeDscOnSpan(span, dsc) {\n const spanWithMaybeDsc = span ;\n addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc);\n}\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatches the `createDsc` lifecycle hook as a side effect.\n */\nfunction getDynamicSamplingContextFromClient(trace_id, client) {\n const options = client.getOptions();\n\n const { publicKey: public_key } = client.getDsn() || {};\n\n const dsc = dropUndefinedKeys({\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n public_key,\n trace_id,\n }) ;\n\n client.emit('createDsc', dsc);\n\n return dsc;\n}\n\n/**\n * Get the dynamic sampling context for the currently active scopes.\n */\nfunction getDynamicSamplingContextFromScope(client, scope) {\n const propagationContext = scope.getPropagationContext();\n return propagationContext.dsc || getDynamicSamplingContextFromClient(propagationContext.traceId, client);\n}\n\n/**\n * Creates a dynamic sampling context from a span (and client and scope)\n *\n * @param span the span from which a few values like the root span name and sample rate are extracted.\n *\n * @returns a dynamic sampling context\n */\nfunction getDynamicSamplingContextFromSpan(span) {\n const client = getClient();\n if (!client) {\n return {};\n }\n\n const rootSpan = getRootSpan(span);\n const rootSpanJson = spanToJSON(rootSpan);\n const rootSpanAttributes = rootSpanJson.data;\n const traceState = rootSpan.spanContext().traceState;\n\n // The span sample rate that was locally applied to the root span should also always be applied to the DSC, even if the DSC is frozen.\n // This is so that the downstream traces/services can use parentSampleRate in their `tracesSampler` to make consistent sampling decisions across the entire trace.\n const rootSpanSampleRate =\n traceState?.get('sentry.sample_rate') ?? rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];\n function applyLocalSampleRateToDsc(dsc) {\n if (typeof rootSpanSampleRate === 'number' || typeof rootSpanSampleRate === 'string') {\n dsc.sample_rate = `${rootSpanSampleRate}`;\n }\n return dsc;\n }\n\n // For core implementation, we freeze the DSC onto the span as a non-enumerable property\n const frozenDsc = (rootSpan )[FROZEN_DSC_FIELD];\n if (frozenDsc) {\n return applyLocalSampleRateToDsc(frozenDsc);\n }\n\n // For OpenTelemetry, we freeze the DSC on the trace state\n const traceStateDsc = traceState?.get('sentry.dsc');\n\n // If the span has a DSC, we want it to take precedence\n const dscOnTraceState = traceStateDsc && baggageHeaderToDynamicSamplingContext(traceStateDsc);\n\n if (dscOnTraceState) {\n return applyLocalSampleRateToDsc(dscOnTraceState);\n }\n\n // Else, we generate it from the span\n const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client);\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const source = rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n // after JSON conversion, txn.name becomes jsonSpan.description\n const name = rootSpanJson.description;\n if (source !== 'url' && name) {\n dsc.transaction = name;\n }\n\n // How can we even land here with hasSpansEnabled() returning false?\n // Otel creates a Non-recording span in Tracing Without Performance mode when handling incoming requests\n // So we end up with an active span that is not sampled (neither positively nor negatively)\n if (hasSpansEnabled()) {\n dsc.sampled = String(spanIsSampled(rootSpan));\n dsc.sample_rand =\n // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans\n // The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span\n traceState?.get('sentry.sample_rand') ??\n // On all other platforms we can actually get the scopes from a root span (we use this as a fallback)\n getCapturedScopesOnSpan(rootSpan).scope?.getPropagationContext().sampleRand.toString();\n }\n\n applyLocalSampleRateToDsc(dsc);\n\n client.emit('createDsc', dsc, rootSpan);\n\n return dsc;\n}\n\n/**\n * Convert a Span to a baggage header.\n */\nfunction spanToBaggageHeader(span) {\n const dsc = getDynamicSamplingContextFromSpan(span);\n return dynamicSamplingContextToSentryBaggageHeader(dsc);\n}\n\nexport { freezeDscOnSpan, getDynamicSamplingContextFromClient, getDynamicSamplingContextFromScope, getDynamicSamplingContextFromSpan, spanToBaggageHeader };\n//# sourceMappingURL=dynamicSamplingContext.js.map\n","import { generateTraceId, generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { TRACE_FLAG_NONE } from '../utils/spanUtils.js';\n\n/**\n * A Sentry Span that is non-recording, meaning it will not be sent to Sentry.\n */\nclass SentryNonRecordingSpan {\n\n constructor(spanContext = {}) {\n this._traceId = spanContext.traceId || generateTraceId();\n this._spanId = spanContext.spanId || generateSpanId();\n }\n\n /** @inheritdoc */\n spanContext() {\n return {\n spanId: this._spanId,\n traceId: this._traceId,\n traceFlags: TRACE_FLAG_NONE,\n };\n }\n\n /** @inheritdoc */\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n end(_timestamp) {}\n\n /** @inheritdoc */\n setAttribute(_key, _value) {\n return this;\n }\n\n /** @inheritdoc */\n setAttributes(_values) {\n return this;\n }\n\n /** @inheritdoc */\n setStatus(_status) {\n return this;\n }\n\n /** @inheritdoc */\n updateName(_name) {\n return this;\n }\n\n /** @inheritdoc */\n isRecording() {\n return false;\n }\n\n /** @inheritdoc */\n addEvent(\n _name,\n _attributesOrStartTime,\n _startTime,\n ) {\n return this;\n }\n\n /** @inheritDoc */\n addLink(_link) {\n return this;\n }\n\n /** @inheritDoc */\n addLinks(_links) {\n return this;\n }\n\n /**\n * This should generally not be used,\n * but we need it for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n recordException(_exception, _time) {\n // noop\n }\n}\n\nexport { SentryNonRecordingSpan };\n//# sourceMappingURL=sentryNonRecordingSpan.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { spanToJSON, spanIsSampled, getRootSpan } from '../utils/spanUtils.js';\n\n/**\n * Print a log message for a started span.\n */\nfunction logSpanStart(span) {\n if (!DEBUG_BUILD) return;\n\n const { description = '< unknown name >', op = '< unknown op >', parent_span_id: parentSpanId } = spanToJSON(span);\n const { spanId } = span.spanContext();\n\n const sampled = spanIsSampled(span);\n const rootSpan = getRootSpan(span);\n const isRootSpan = rootSpan === span;\n\n const header = `[Tracing] Starting ${sampled ? 'sampled' : 'unsampled'} ${isRootSpan ? 'root ' : ''}span`;\n\n const infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`];\n\n if (parentSpanId) {\n infoParts.push(`parent ID: ${parentSpanId}`);\n }\n\n if (!isRootSpan) {\n const { op, description } = spanToJSON(rootSpan);\n infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`);\n if (op) {\n infoParts.push(`root op: ${op}`);\n }\n if (description) {\n infoParts.push(`root description: ${description}`);\n }\n }\n\n logger.log(`${header}\n ${infoParts.join('\\n ')}`);\n}\n\n/**\n * Print a log message for an ended span.\n */\nfunction logSpanEnd(span) {\n if (!DEBUG_BUILD) return;\n\n const { description = '< unknown name >', op = '< unknown op >' } = spanToJSON(span);\n const { spanId } = span.spanContext();\n const rootSpan = getRootSpan(span);\n const isRootSpan = rootSpan === span;\n\n const msg = `[Tracing] Finishing \"${op}\" ${isRootSpan ? 'root ' : ''}span \"${description}\" with ID ${spanId}`;\n logger.log(msg);\n}\n\nexport { logSpanEnd, logSpanStart };\n//# sourceMappingURL=logSpans.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled.js';\nimport { parseSampleRate } from '../utils/parseSampleRate.js';\n\n/**\n * Makes a sampling decision for the given options.\n *\n * Called every time a root span is created. Only root spans which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n */\nfunction sampleSpan(\n options,\n samplingContext,\n sampleRand,\n) {\n // nothing to do if span recording is not enabled\n if (!hasSpansEnabled(options)) {\n return [false];\n }\n\n let localSampleRateWasApplied = undefined;\n\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should\n // work; prefer the hook if so\n let sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler({\n ...samplingContext,\n inheritOrSampleWith: fallbackSampleRate => {\n // If we have an incoming parent sample rate, we'll just use that one.\n // The sampling decision will be inherited because of the sample_rand that was generated when the trace reached the incoming boundaries of the SDK.\n if (typeof samplingContext.parentSampleRate === 'number') {\n return samplingContext.parentSampleRate;\n }\n\n // Fallback if parent sample rate is not on the incoming trace (e.g. if there is no baggage)\n // This is to provide backwards compatibility if there are incoming traces from older SDKs that don't send a parent sample rate or a sample rand. In these cases we just want to force either a sampling decision on the downstream traces via the sample rate.\n if (typeof samplingContext.parentSampled === 'boolean') {\n return Number(samplingContext.parentSampled);\n }\n\n return fallbackSampleRate;\n },\n });\n localSampleRateWasApplied = true;\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n localSampleRateWasApplied = true;\n }\n\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get.\n // (The only valid values are booleans or numbers between 0 and 1.)\n const parsedSampleRate = parseSampleRate(sampleRate);\n\n if (parsedSampleRate === undefined) {\n DEBUG_BUILD &&\n logger.warn(\n `[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n sampleRate,\n )} of type ${JSON.stringify(typeof sampleRate)}.`,\n );\n return [false];\n }\n\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!parsedSampleRate) {\n DEBUG_BUILD &&\n logger.log(\n `[Tracing] Discarding transaction because ${\n typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n }`,\n );\n return [false, parsedSampleRate, localSampleRateWasApplied];\n }\n\n // We always compare the sample rand for the current execution context against the chosen sample rate.\n // Read more: https://develop.sentry.dev/sdk/telemetry/traces/#propagated-random-value\n const shouldSample = sampleRand < parsedSampleRate;\n\n // if we're not going to keep it, we're done\n if (!shouldSample) {\n DEBUG_BUILD &&\n logger.log(\n `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n sampleRate,\n )})`,\n );\n }\n\n return [shouldSample, parsedSampleRate, localSampleRateWasApplied];\n}\n\nexport { sampleSpan };\n//# sourceMappingURL=sampling.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host = '', port = '', lastPath = ''] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn) {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n//# sourceMappingURL=dsn.js.map\n","const global = globalThis || void 0 || self;\n\nexport { global as default, global };\n//# sourceMappingURL=index.js.map\n","import { isVueViewModel, isSyntheticEvent } from './is.js';\nimport { convertToPlainObject } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normalized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction normalize(input, depth = 100, maxProperties = +Infinity) {\n try {\n // since we're at the outermost level, we don't provide a key\n return visit('', input, depth, maxProperties);\n } catch (err) {\n return { ERROR: `**non-serializable** (${err})` };\n }\n}\n\n/** JSDoc */\nfunction normalizeToSize(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n object,\n // Default Node.js REPL depth\n depth = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize = 100 * 1024,\n) {\n const normalized = normalize(object, depth);\n\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return normalized ;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n key,\n value,\n depth = +Infinity,\n maxProperties = +Infinity,\n memo = memoBuilder(),\n) {\n const [memoize, unmemoize] = memo;\n\n // Get the simple cases out of the way first\n if (\n value == null || // this matches null and undefined -> eqeq not eqeqeq\n ['boolean', 'string'].includes(typeof value) ||\n (typeof value === 'number' && Number.isFinite(value))\n ) {\n return value ;\n }\n\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if ((value )['__sentry_skip_normalization__']) {\n return value ;\n }\n\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth =\n typeof (value )['__sentry_override_normalization_depth__'] === 'number'\n ? ((value )['__sentry_override_normalization_depth__'] )\n : depth;\n\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value ;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = (Array.isArray(value) ? [] : {}) ;\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = convertToPlainObject(value );\n\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n numAdded++;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(\n key,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value,\n) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value )._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (isVueViewModel(value)) {\n return '[VueViewModel]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && !Number.isFinite(value)) {\n return `[${value}]`;\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = getConstructorName(value);\n\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return `[HTMLElement: ${objName}]`;\n }\n\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value) {\n const prototype = Object.getPrototypeOf(value);\n\n return prototype ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n\n/**\n * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint\n * across platforms and working directory.\n *\n * @param url The URL to be normalized.\n * @param basePath The application base path.\n * @returns The normalized URL.\n */\nfunction normalizeUrlToBase(url, basePath) {\n const escapedBase = basePath\n // Backslash to forward\n .replace(/\\\\/g, '/')\n // Escape RegExp special characters\n .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n\n let newUrl = url;\n try {\n newUrl = decodeURI(url);\n } catch (_Oo) {\n // Sometime this breaks\n }\n return (\n newUrl\n .replace(/\\\\/g, '/')\n .replace(/webpack:\\/?/g, '') // Remove intermediate base path\n // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\n .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///')\n );\n}\n\n/**\n * Helper to decycle json objects\n */\nfunction memoBuilder() {\n const inner = new WeakSet();\n function memoize(obj) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n\n function unmemoize(obj) {\n inner.delete(obj);\n }\n return [memoize, unmemoize];\n}\n\nexport { normalize, normalizeToSize, normalizeUrlToBase };\n//# sourceMappingURL=normalize.js.map\n","import { getSentryCarrier } from '../carrier.js';\nimport { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8 array.\n */\nfunction encodeUTF8(input) {\n const carrier = getSentryCarrier(GLOBAL_OBJ);\n return carrier.encodePolyfill ? carrier.encodePolyfill(input) : new TextEncoder().encode(input);\n}\n\n/**\n * Decode a UTF8 array to string.\n */\nfunction decodeUTF8(input) {\n const carrier = getSentryCarrier(GLOBAL_OBJ);\n return carrier.decodePolyfill ? carrier.decodePolyfill(input) : new TextDecoder().decode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.stringify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(env) {\n let buffer = typeof env === 'string' ? encodeUTF8(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(decodeUTF8(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates envelope item for a single span\n */\nfunction createSpanEnvelopeItem(spanJson) {\n const spanHeaders = {\n type: 'span',\n };\n\n return [spanHeaders, spanJson];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(attachment) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n profile_chunk: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n span: 'span',\n raw_security: 'security',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent?.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata?.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext.js';\nimport { dsnToString } from './utils-hoist/dsn.js';\nimport { getSdkMetadataForEnvelopeHeader, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem } from './utils-hoist/envelope.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { spanToJSON, showSpanDropWarning } from './utils/spanUtils.js';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates an envelope from a Session */\nfunction createSessionEnvelope(\n session,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const envelopeItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nfunction createEventEnvelope(\n event,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjust a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n enhanceEventWithSdkInfo(event, metadata?.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem = [{ type: eventType }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n\n/**\n * Create envelope from Span item.\n *\n * Takes an optional client and runs spans through `beforeSendSpan` if available.\n */\nfunction createSpanEnvelope(spans, client) {\n function dscHasRequiredProps(dsc) {\n return !!dsc.trace_id && !!dsc.public_key;\n }\n\n // For the moment we'll obtain the DSC from the first span in the array\n // This might need to be changed if we permit sending multiple spans from\n // different segments in one envelope\n const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n\n const dsn = client?.getDsn();\n const tunnel = client?.getOptions().tunnel;\n\n const headers = {\n sent_at: new Date().toISOString(),\n ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const beforeSendSpan = client?.getOptions().beforeSendSpan;\n const convertToSpanJSON = beforeSendSpan\n ? (span) => {\n const spanJson = spanToJSON(span);\n const processedSpan = beforeSendSpan(spanJson);\n\n if (!processedSpan) {\n showSpanDropWarning();\n return spanJson;\n }\n\n return processedSpan;\n }\n : spanToJSON;\n\n const items = [];\n for (const span of spans) {\n const spanJson = convertToSpanJSON(span);\n if (spanJson) {\n items.push(createSpanEnvelopeItem(spanJson));\n }\n }\n\n return createEnvelope(headers, items);\n}\n\nexport { createEventEnvelope, createSessionEnvelope, createSpanEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getRootSpan, getActiveSpan } from '../utils/spanUtils.js';\n\n/**\n * Adds a measurement to the active transaction on the current global scope. You can optionally pass in a different span\n * as the 4th parameter.\n */\nfunction setMeasurement(name, value, unit, activeSpan = getActiveSpan()) {\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n if (rootSpan) {\n DEBUG_BUILD && logger.log(`[Measurement] Setting measurement on root span: ${name} = ${value} ${unit}`);\n rootSpan.addEvent(name, {\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value,\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit ,\n });\n }\n}\n\n/**\n * Convert timed events to measurements.\n */\nfunction timedEventsToMeasurements(events) {\n if (!events || events.length === 0) {\n return undefined;\n }\n\n const measurements = {};\n events.forEach(event => {\n const attributes = event.attributes || {};\n const unit = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT] ;\n const value = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE] ;\n\n if (typeof unit === 'string' && typeof value === 'number') {\n measurements[event.name] = { value, unit };\n }\n });\n\n return measurements;\n}\n\nexport { setMeasurement, timedEventsToMeasurements };\n//# sourceMappingURL=measurement.js.map\n","import { getClient, getCurrentScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { createSpanEnvelope } from '../envelope.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport { generateTraceId, generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { TRACE_FLAG_SAMPLED, TRACE_FLAG_NONE, spanTimeInputToSeconds, getStatusMessage, getRootSpan, convertSpanLinksForEnvelope, spanToJSON, getSpanDescendants, spanToTransactionTraceContext } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan } from './dynamicSamplingContext.js';\nimport { logSpanEnd } from './logSpans.js';\nimport { timedEventsToMeasurements } from './measurement.js';\nimport { getCapturedScopesOnSpan } from './utils.js';\n\nconst MAX_SPAN_COUNT = 1000;\n\n/**\n * Span contains all data about a span\n */\nclass SentrySpan {\n\n /** Epoch timestamp in seconds when the span started. */\n\n /** Epoch timestamp in seconds when the span ended. */\n\n /** Internal keeper of the status */\n\n /** The timed events added to this span. */\n\n /** if true, treat span as a standalone span (not part of a transaction) */\n\n /**\n * You should never call the constructor manually, always use `Sentry.startSpan()`\n * or other span methods.\n * @internal\n * @hideconstructor\n * @hidden\n */\n constructor(spanContext = {}) {\n this._traceId = spanContext.traceId || generateTraceId();\n this._spanId = spanContext.spanId || generateSpanId();\n this._startTime = spanContext.startTimestamp || timestampInSeconds();\n this._links = spanContext.links;\n\n this._attributes = {};\n this.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'manual',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op,\n ...spanContext.attributes,\n });\n\n this._name = spanContext.name;\n\n if (spanContext.parentSpanId) {\n this._parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this._sampled = spanContext.sampled;\n }\n if (spanContext.endTimestamp) {\n this._endTime = spanContext.endTimestamp;\n }\n\n this._events = [];\n\n this._isStandaloneSpan = spanContext.isStandalone;\n\n // If the span is already ended, ensure we finalize the span immediately\n if (this._endTime) {\n this._onSpanEnded();\n }\n }\n\n /** @inheritDoc */\n addLink(link) {\n if (this._links) {\n this._links.push(link);\n } else {\n this._links = [link];\n }\n return this;\n }\n\n /** @inheritDoc */\n addLinks(links) {\n if (this._links) {\n this._links.push(...links);\n } else {\n this._links = links;\n }\n return this;\n }\n\n /**\n * This should generally not be used,\n * but it is needed for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n recordException(_exception, _time) {\n // noop\n }\n\n /** @inheritdoc */\n spanContext() {\n const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this;\n return {\n spanId,\n traceId,\n traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE,\n };\n }\n\n /** @inheritdoc */\n setAttribute(key, value) {\n if (value === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._attributes[key];\n } else {\n this._attributes[key] = value;\n }\n\n return this;\n }\n\n /** @inheritdoc */\n setAttributes(attributes) {\n Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key]));\n return this;\n }\n\n /**\n * This should generally not be used,\n * but we need it for browser tracing where we want to adjust the start time afterwards.\n * USE THIS WITH CAUTION!\n *\n * @hidden\n * @internal\n */\n updateStartTime(timeInput) {\n this._startTime = spanTimeInputToSeconds(timeInput);\n }\n\n /**\n * @inheritDoc\n */\n setStatus(value) {\n this._status = value;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n updateName(name) {\n this._name = name;\n this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'custom');\n return this;\n }\n\n /** @inheritdoc */\n end(endTimestamp) {\n // If already ended, skip\n if (this._endTime) {\n return;\n }\n\n this._endTime = spanTimeInputToSeconds(endTimestamp);\n logSpanEnd(this);\n\n this._onSpanEnded();\n }\n\n /**\n * Get JSON representation of this span.\n *\n * @hidden\n * @internal This method is purely for internal purposes and should not be used outside\n * of SDK code. If you need to get a JSON representation of a span,\n * use `spanToJSON(span)` instead.\n */\n getSpanJSON() {\n return dropUndefinedKeys({\n data: this._attributes,\n description: this._name,\n op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n parent_span_id: this._parentSpanId,\n span_id: this._spanId,\n start_timestamp: this._startTime,\n status: getStatusMessage(this._status),\n timestamp: this._endTime,\n trace_id: this._traceId,\n origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,\n profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID] ,\n exclusive_time: this._attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME] ,\n measurements: timedEventsToMeasurements(this._events),\n is_segment: (this._isStandaloneSpan && getRootSpan(this) === this) || undefined,\n segment_id: this._isStandaloneSpan ? getRootSpan(this).spanContext().spanId : undefined,\n links: convertSpanLinksForEnvelope(this._links),\n });\n }\n\n /** @inheritdoc */\n isRecording() {\n return !this._endTime && !!this._sampled;\n }\n\n /**\n * @inheritdoc\n */\n addEvent(\n name,\n attributesOrStartTime,\n startTime,\n ) {\n DEBUG_BUILD && logger.log('[Tracing] Adding an event to span:', name);\n\n const time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || timestampInSeconds();\n const attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {};\n\n const event = {\n name,\n time: spanTimeInputToSeconds(time),\n attributes,\n };\n\n this._events.push(event);\n\n return this;\n }\n\n /**\n * This method should generally not be used,\n * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set.\n * USE THIS WITH CAUTION!\n * @internal\n * @hidden\n * @experimental\n */\n isStandaloneSpan() {\n return !!this._isStandaloneSpan;\n }\n\n /** Emit `spanEnd` when the span is ended. */\n _onSpanEnded() {\n const client = getClient();\n if (client) {\n client.emit('spanEnd', this);\n }\n\n // A segment span is basically the root span of a local span tree.\n // So for now, this is either what we previously refer to as the root span,\n // or a standalone span.\n const isSegmentSpan = this._isStandaloneSpan || this === getRootSpan(this);\n\n if (!isSegmentSpan) {\n return;\n }\n\n // if this is a standalone span, we send it immediately\n if (this._isStandaloneSpan) {\n if (this._sampled) {\n sendSpanEnvelope(createSpanEnvelope([this], client));\n } else {\n DEBUG_BUILD &&\n logger.log('[Tracing] Discarding standalone span because its trace was not chosen to be sampled.');\n if (client) {\n client.recordDroppedEvent('sample_rate', 'span');\n }\n }\n return;\n }\n\n const transactionEvent = this._convertSpanToTransaction();\n if (transactionEvent) {\n const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope();\n scope.captureEvent(transactionEvent);\n }\n }\n\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */\n _convertSpanToTransaction() {\n // We can only convert finished spans\n if (!isFullFinishedSpan(spanToJSON(this))) {\n return undefined;\n }\n\n if (!this._name) {\n DEBUG_BUILD && logger.warn('Transaction has no name, falling back to ``.');\n this._name = '';\n }\n\n const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = getCapturedScopesOnSpan(this);\n\n if (this._sampled !== true) {\n return undefined;\n }\n\n // The transaction span itself as well as any potential standalone spans should be filtered out\n const finishedSpans = getSpanDescendants(this).filter(span => span !== this && !isStandaloneSpan(span));\n\n const spans = finishedSpans.map(span => spanToJSON(span)).filter(isFullFinishedSpan);\n\n const source = this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ;\n\n // remove internal root span attributes we don't need to send.\n /* eslint-disable @typescript-eslint/no-dynamic-delete */\n delete this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n spans.forEach(span => {\n delete span.data[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n });\n // eslint-enabled-next-line @typescript-eslint/no-dynamic-delete\n\n const transaction = {\n contexts: {\n trace: spanToTransactionTraceContext(this),\n },\n spans:\n // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here\n // we do not use spans anymore after this point\n spans.length > MAX_SPAN_COUNT\n ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT)\n : spans,\n start_timestamp: this._startTime,\n timestamp: this._endTime,\n transaction: this._name,\n type: 'transaction',\n sdkProcessingMetadata: {\n capturedSpanScope,\n capturedSpanIsolationScope,\n ...dropUndefinedKeys({\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(this),\n }),\n },\n ...(source && {\n transaction_info: {\n source,\n },\n }),\n };\n\n const measurements = timedEventsToMeasurements(this._events);\n const hasMeasurements = measurements && Object.keys(measurements).length;\n\n if (hasMeasurements) {\n DEBUG_BUILD &&\n logger.log(\n '[Measurements] Adding measurements to transaction event',\n JSON.stringify(measurements, undefined, 2),\n );\n transaction.measurements = measurements;\n }\n\n return transaction;\n }\n}\n\nfunction isSpanTimeInput(value) {\n return (value && typeof value === 'number') || value instanceof Date || Array.isArray(value);\n}\n\n// We want to filter out any incomplete SpanJSON objects\nfunction isFullFinishedSpan(input) {\n return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id;\n}\n\n/** `SentrySpan`s can be sent as a standalone span rather than belonging to a transaction */\nfunction isStandaloneSpan(span) {\n return span instanceof SentrySpan && span.isStandaloneSpan();\n}\n\n/**\n * Sends a `SpanEnvelope`.\n *\n * Note: If the envelope's spans are dropped, e.g. via `beforeSendSpan`,\n * the envelope will not be sent either.\n */\nfunction sendSpanEnvelope(envelope) {\n const client = getClient();\n if (!client) {\n return;\n }\n\n const spanItems = envelope[1];\n if (!spanItems || spanItems.length === 0) {\n client.recordDroppedEvent('before_send', 'span');\n return;\n }\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n client.sendEnvelope(envelope);\n}\n\nexport { SentrySpan };\n//# sourceMappingURL=sentrySpan.js.map\n","import { getMainCarrier } from '../carrier.js';\nimport { withScope, getCurrentScope, getIsolationScope, getClient } from '../currentScopes.js';\nimport { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { generateTraceId } from '../utils-hoist/propagationContext.js';\nimport { propagationContextFromHeaders } from '../utils-hoist/tracing.js';\nimport { handleCallbackErrors } from '../utils/handleCallbackErrors.js';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled.js';\nimport { parseSampleRate } from '../utils/parseSampleRate.js';\nimport { _setSpanForScope, _getSpanForScope } from '../utils/spanOnScope.js';\nimport { spanToJSON, addChildSpanToSpan, spanIsSampled, spanTimeInputToSeconds, getRootSpan } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan, freezeDscOnSpan } from './dynamicSamplingContext.js';\nimport { logSpanStart } from './logSpans.js';\nimport { sampleSpan } from './sampling.js';\nimport { SentryNonRecordingSpan } from './sentryNonRecordingSpan.js';\nimport { SentrySpan } from './sentrySpan.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\nimport { setCapturedScopesOnSpan } from './utils.js';\n\nconst SUPPRESS_TRACING_KEY = '__SENTRY_SUPPRESS_TRACING__';\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startSpan(options, callback) {\n const acs = getAcs();\n if (acs.startSpan) {\n return acs.startSpan(options, callback);\n }\n\n const spanArguments = parseSentrySpanArguments(options);\n const { forceTransaction, parentSpan: customParentSpan, scope: customScope } = options;\n\n // We still need to fork a potentially passed scope, as we set the active span on it\n // and we need to ensure that it is cleaned up properly once the span ends.\n const customForkedScope = customScope?.clone();\n\n return withScope(customForkedScope, () => {\n // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n const wrapper = getActiveSpanWrapper(customParentSpan);\n\n return wrapper(() => {\n const scope = getCurrentScope();\n const parentSpan = getParentSpan(scope);\n\n const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n const activeSpan = shouldSkipSpan\n ? new SentryNonRecordingSpan()\n : createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n });\n\n _setSpanForScope(scope, activeSpan);\n\n return handleCallbackErrors(\n () => callback(activeSpan),\n () => {\n // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n const { status } = spanToJSON(activeSpan);\n if (activeSpan.isRecording() && (!status || status === 'ok')) {\n activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n },\n () => {\n activeSpan.end();\n },\n );\n });\n });\n}\n\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically. Use `span.end()` to end the span.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startSpanManual(options, callback) {\n const acs = getAcs();\n if (acs.startSpanManual) {\n return acs.startSpanManual(options, callback);\n }\n\n const spanArguments = parseSentrySpanArguments(options);\n const { forceTransaction, parentSpan: customParentSpan, scope: customScope } = options;\n\n const customForkedScope = customScope?.clone();\n\n return withScope(customForkedScope, () => {\n // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n const wrapper = getActiveSpanWrapper(customParentSpan);\n\n return wrapper(() => {\n const scope = getCurrentScope();\n const parentSpan = getParentSpan(scope);\n\n const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n const activeSpan = shouldSkipSpan\n ? new SentryNonRecordingSpan()\n : createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n });\n\n _setSpanForScope(scope, activeSpan);\n\n return handleCallbackErrors(\n // We pass the `finish` function to the callback, so the user can finish the span manually\n // this is mainly here for historic purposes because previously, we instructed users to call\n // `finish` instead of `span.end()` to also clean up the scope. Nowadays, calling `span.end()`\n // or `finish` has the same effect and we simply leave it here to avoid breaking user code.\n () => callback(activeSpan, () => activeSpan.end()),\n () => {\n // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n const { status } = spanToJSON(activeSpan);\n if (activeSpan.isRecording() && (!status || status === 'ok')) {\n activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n },\n );\n });\n });\n}\n\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getActiveSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * This function will always return a span,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startInactiveSpan(options) {\n const acs = getAcs();\n if (acs.startInactiveSpan) {\n return acs.startInactiveSpan(options);\n }\n\n const spanArguments = parseSentrySpanArguments(options);\n const { forceTransaction, parentSpan: customParentSpan } = options;\n\n // If `options.scope` is defined, we use this as as a wrapper,\n // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n const wrapper = options.scope\n ? (callback) => withScope(options.scope, callback)\n : customParentSpan !== undefined\n ? (callback) => withActiveSpan(customParentSpan, callback)\n : (callback) => callback();\n\n return wrapper(() => {\n const scope = getCurrentScope();\n const parentSpan = getParentSpan(scope);\n\n const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n\n if (shouldSkipSpan) {\n return new SentryNonRecordingSpan();\n }\n\n return createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n });\n });\n}\n\n/**\n * Continue a trace from `sentry-trace` and `baggage` values.\n * These values can be obtained from incoming request headers, or in the browser from ``\n * and `` HTML tags.\n *\n * Spans started with `startSpan`, `startSpanManual` and `startInactiveSpan`, within the callback will automatically\n * be attached to the incoming trace.\n */\nconst continueTrace = (\n options\n\n,\n callback,\n) => {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.continueTrace) {\n return acs.continueTrace(options, callback);\n }\n\n const { sentryTrace, baggage } = options;\n\n return withScope(scope => {\n const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n scope.setPropagationContext(propagationContext);\n return callback();\n });\n};\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback. Can be\n * passed `null` to start an entirely new span tree.\n *\n * @param span Spans started in the context of the provided callback will be children of this span. If `null` is passed,\n * spans started within the callback will not be attached to a parent span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nfunction withActiveSpan(span, callback) {\n const acs = getAcs();\n if (acs.withActiveSpan) {\n return acs.withActiveSpan(span, callback);\n }\n\n return withScope(scope => {\n _setSpanForScope(scope, span || undefined);\n return callback(scope);\n });\n}\n\n/** Suppress tracing in the given callback, ensuring no spans are generated inside of it. */\nfunction suppressTracing(callback) {\n const acs = getAcs();\n\n if (acs.suppressTracing) {\n return acs.suppressTracing(callback);\n }\n\n return withScope(scope => {\n scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: true });\n return callback();\n });\n}\n\n/**\n * Starts a new trace for the duration of the provided callback. Spans started within the\n * callback will be part of the new trace instead of a potentially previously started trace.\n *\n * Important: Only use this function if you want to override the default trace lifetime and\n * propagation mechanism of the SDK for the duration and scope of the provided callback.\n * The newly created trace will also be the root of a new distributed trace, for example if\n * you make http requests within the callback.\n * This function might be useful if the operation you want to instrument should not be part\n * of a potentially ongoing trace.\n *\n * Default behavior:\n * - Server-side: A new trace is started for each incoming request.\n * - Browser: A new trace is started for each page our route. Navigating to a new route\n * or page will automatically create a new trace.\n */\nfunction startNewTrace(callback) {\n return withScope(scope => {\n scope.setPropagationContext({\n traceId: generateTraceId(),\n sampleRand: Math.random(),\n });\n DEBUG_BUILD && logger.info(`Starting a new trace with id ${scope.getPropagationContext().traceId}`);\n return withActiveSpan(null, callback);\n });\n}\n\nfunction createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n}\n\n) {\n if (!hasSpansEnabled()) {\n const span = new SentryNonRecordingSpan();\n\n // If this is a root span, we ensure to freeze a DSC\n // So we can have at least partial data here\n if (forceTransaction || !parentSpan) {\n const dsc = {\n sampled: 'false',\n sample_rate: '0',\n transaction: spanArguments.name,\n ...getDynamicSamplingContextFromSpan(span),\n } ;\n freezeDscOnSpan(span, dsc);\n }\n\n return span;\n }\n\n const isolationScope = getIsolationScope();\n\n let span;\n if (parentSpan && !forceTransaction) {\n span = _startChildSpan(parentSpan, scope, spanArguments);\n addChildSpanToSpan(parentSpan, span);\n } else if (parentSpan) {\n // If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope\n const dsc = getDynamicSamplingContextFromSpan(parentSpan);\n const { traceId, spanId: parentSpanId } = parentSpan.spanContext();\n const parentSampled = spanIsSampled(parentSpan);\n\n span = _startRootSpan(\n {\n traceId,\n parentSpanId,\n ...spanArguments,\n },\n scope,\n parentSampled,\n );\n\n freezeDscOnSpan(span, dsc);\n } else {\n const {\n traceId,\n dsc,\n parentSpanId,\n sampled: parentSampled,\n } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n span = _startRootSpan(\n {\n traceId,\n parentSpanId,\n ...spanArguments,\n },\n scope,\n parentSampled,\n );\n\n if (dsc) {\n freezeDscOnSpan(span, dsc);\n }\n }\n\n logSpanStart(span);\n\n setCapturedScopesOnSpan(span, scope, isolationScope);\n\n return span;\n}\n\n/**\n * This converts StartSpanOptions to SentrySpanArguments.\n * For the most part (for now) we accept the same options,\n * but some of them need to be transformed.\n */\nfunction parseSentrySpanArguments(options) {\n const exp = options.experimental || {};\n const initialCtx = {\n isStandalone: exp.standalone,\n ...options,\n };\n\n if (options.startTime) {\n const ctx = { ...initialCtx };\n ctx.startTimestamp = spanTimeInputToSeconds(options.startTime);\n delete ctx.startTime;\n return ctx;\n }\n\n return initialCtx;\n}\n\nfunction getAcs() {\n const carrier = getMainCarrier();\n return getAsyncContextStrategy(carrier);\n}\n\nfunction _startRootSpan(spanArguments, scope, parentSampled) {\n const client = getClient();\n const options = client?.getOptions() || {};\n\n const { name = '', attributes } = spanArguments;\n const currentPropagationContext = scope.getPropagationContext();\n const [sampled, sampleRate, localSampleRateWasApplied] = scope.getScopeData().sdkProcessingMetadata[\n SUPPRESS_TRACING_KEY\n ]\n ? [false]\n : sampleSpan(\n options,\n {\n name,\n parentSampled,\n attributes,\n parentSampleRate: parseSampleRate(currentPropagationContext.dsc?.sample_rate),\n },\n currentPropagationContext.sampleRand,\n );\n\n const rootSpan = new SentrySpan({\n ...spanArguments,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n [SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]:\n sampleRate !== undefined && localSampleRateWasApplied ? sampleRate : undefined,\n ...spanArguments.attributes,\n },\n sampled,\n });\n\n if (!sampled && client) {\n DEBUG_BUILD && logger.log('[Tracing] Discarding root span because its trace was not chosen to be sampled.');\n client.recordDroppedEvent('sample_rate', 'transaction');\n }\n\n if (client) {\n client.emit('spanStart', rootSpan);\n }\n\n return rootSpan;\n}\n\n/**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * This inherits the sampling decision from the parent span.\n */\nfunction _startChildSpan(parentSpan, scope, spanArguments) {\n const { spanId, traceId } = parentSpan.spanContext();\n const sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? false : spanIsSampled(parentSpan);\n\n const childSpan = sampled\n ? new SentrySpan({\n ...spanArguments,\n parentSpanId: spanId,\n traceId,\n sampled,\n })\n : new SentryNonRecordingSpan({ traceId });\n\n addChildSpanToSpan(parentSpan, childSpan);\n\n const client = getClient();\n if (client) {\n client.emit('spanStart', childSpan);\n // If it has an endTimestamp, it's already ended\n if (spanArguments.endTimestamp) {\n client.emit('spanEnd', childSpan);\n }\n }\n\n return childSpan;\n}\n\nfunction getParentSpan(scope) {\n const span = _getSpanForScope(scope) ;\n\n if (!span) {\n return undefined;\n }\n\n const client = getClient();\n const options = client ? client.getOptions() : {};\n if (options.parentSpanIsAlwaysRootSpan) {\n return getRootSpan(span) ;\n }\n\n return span;\n}\n\nfunction getActiveSpanWrapper(parentSpan) {\n return parentSpan !== undefined\n ? (callback) => {\n return withActiveSpan(parentSpan, callback);\n }\n : (callback) => callback();\n}\n\nexport { continueTrace, startInactiveSpan, startNewTrace, startSpan, startSpanManual, suppressTracing, withActiveSpan };\n//# sourceMappingURL=trace.js.map\n","import { getClient, getCurrentScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled.js';\nimport { _setSpanForScope } from '../utils/spanOnScope.js';\nimport { getActiveSpan, spanTimeInputToSeconds, getSpanDescendants, spanToJSON, removeChildSpanFromSpan } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan, freezeDscOnSpan } from './dynamicSamplingContext.js';\nimport { SentryNonRecordingSpan } from './sentryNonRecordingSpan.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\nimport { startInactiveSpan } from './trace.js';\n\nconst TRACING_DEFAULTS = {\n idleTimeout: 1000,\n finalTimeout: 30000,\n childSpanTimeout: 15000,\n};\n\nconst FINISH_REASON_HEARTBEAT_FAILED = 'heartbeatFailed';\nconst FINISH_REASON_IDLE_TIMEOUT = 'idleTimeout';\nconst FINISH_REASON_FINAL_TIMEOUT = 'finalTimeout';\nconst FINISH_REASON_EXTERNAL_FINISH = 'externalFinish';\n\n/**\n * An idle span is a span that automatically finishes. It does this by tracking child spans as activities.\n * An idle span is always the active span.\n */\nfunction startIdleSpan(startSpanOptions, options = {}) {\n // Activities store a list of active spans\n const activities = new Map();\n\n // We should not use heartbeat if we finished a span\n let _finished = false;\n\n // Timer that tracks idleTimeout\n let _idleTimeoutID;\n\n // The reason why the span was finished\n let _finishReason = FINISH_REASON_EXTERNAL_FINISH;\n\n let _autoFinishAllowed = !options.disableAutoFinish;\n\n const _cleanupHooks = [];\n\n const {\n idleTimeout = TRACING_DEFAULTS.idleTimeout,\n finalTimeout = TRACING_DEFAULTS.finalTimeout,\n childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout,\n beforeSpanEnd,\n } = options;\n\n const client = getClient();\n\n if (!client || !hasSpansEnabled()) {\n const span = new SentryNonRecordingSpan();\n\n const dsc = {\n sample_rate: '0',\n sampled: 'false',\n ...getDynamicSamplingContextFromSpan(span),\n } ;\n freezeDscOnSpan(span, dsc);\n\n return span;\n }\n\n const scope = getCurrentScope();\n const previousActiveSpan = getActiveSpan();\n const span = _startIdleSpan(startSpanOptions);\n\n // We patch span.end to ensure we can run some things before the span is ended\n // eslint-disable-next-line @typescript-eslint/unbound-method\n span.end = new Proxy(span.end, {\n apply(target, thisArg, args) {\n if (beforeSpanEnd) {\n beforeSpanEnd(span);\n }\n\n // If the span is non-recording, nothing more to do here...\n // This is the case if tracing is enabled but this specific span was not sampled\n if (thisArg instanceof SentryNonRecordingSpan) {\n return;\n }\n\n // Just ensuring that this keeps working, even if we ever have more arguments here\n const [definedEndTimestamp, ...rest] = args;\n const timestamp = definedEndTimestamp || timestampInSeconds();\n const spanEndTimestamp = spanTimeInputToSeconds(timestamp);\n\n // Ensure we end with the last span timestamp, if possible\n const spans = getSpanDescendants(span).filter(child => child !== span);\n\n // If we have no spans, we just end, nothing else to do here\n if (!spans.length) {\n onIdleSpanEnded(spanEndTimestamp);\n return Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]);\n }\n\n const childEndTimestamps = spans\n .map(span => spanToJSON(span).timestamp)\n .filter(timestamp => !!timestamp) ;\n const latestSpanEndTimestamp = childEndTimestamps.length ? Math.max(...childEndTimestamps) : undefined;\n\n // In reality this should always exist here, but type-wise it may be undefined...\n const spanStartTimestamp = spanToJSON(span).start_timestamp;\n\n // The final endTimestamp should:\n // * Never be before the span start timestamp\n // * Be the latestSpanEndTimestamp, if there is one, and it is smaller than the passed span end timestamp\n // * Otherwise be the passed end timestamp\n // Final timestamp can never be after finalTimeout\n const endTimestamp = Math.min(\n spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1000 : Infinity,\n Math.max(spanStartTimestamp || -Infinity, Math.min(spanEndTimestamp, latestSpanEndTimestamp || Infinity)),\n );\n\n onIdleSpanEnded(endTimestamp);\n return Reflect.apply(target, thisArg, [endTimestamp, ...rest]);\n },\n });\n\n /**\n * Cancels the existing idle timeout, if there is one.\n */\n function _cancelIdleTimeout() {\n if (_idleTimeoutID) {\n clearTimeout(_idleTimeoutID);\n _idleTimeoutID = undefined;\n }\n }\n\n /**\n * Restarts idle timeout, if there is no running idle timeout it will start one.\n */\n function _restartIdleTimeout(endTimestamp) {\n _cancelIdleTimeout();\n _idleTimeoutID = setTimeout(() => {\n if (!_finished && activities.size === 0 && _autoFinishAllowed) {\n _finishReason = FINISH_REASON_IDLE_TIMEOUT;\n span.end(endTimestamp);\n }\n }, idleTimeout);\n }\n\n /**\n * Restarts child span timeout, if there is none running it will start one.\n */\n function _restartChildSpanTimeout(endTimestamp) {\n _idleTimeoutID = setTimeout(() => {\n if (!_finished && _autoFinishAllowed) {\n _finishReason = FINISH_REASON_HEARTBEAT_FAILED;\n span.end(endTimestamp);\n }\n }, childSpanTimeout);\n }\n\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n function _pushActivity(spanId) {\n _cancelIdleTimeout();\n activities.set(spanId, true);\n\n const endTimestamp = timestampInSeconds();\n // We need to add the timeout here to have the real endtimestamp of the idle span\n // Remember timestampInSeconds is in seconds, timeout is in ms\n _restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1000);\n }\n\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n function _popActivity(spanId) {\n if (activities.has(spanId)) {\n activities.delete(spanId);\n }\n\n if (activities.size === 0) {\n const endTimestamp = timestampInSeconds();\n // We need to add the timeout here to have the real endtimestamp of the idle span\n // Remember timestampInSeconds is in seconds, timeout is in ms\n _restartIdleTimeout(endTimestamp + idleTimeout / 1000);\n }\n }\n\n function onIdleSpanEnded(endTimestamp) {\n _finished = true;\n activities.clear();\n\n _cleanupHooks.forEach(cleanup => cleanup());\n\n _setSpanForScope(scope, previousActiveSpan);\n\n const spanJSON = spanToJSON(span);\n\n const { start_timestamp: startTimestamp } = spanJSON;\n // This should never happen, but to make TS happy...\n if (!startTimestamp) {\n return;\n }\n\n const attributes = spanJSON.data;\n if (!attributes[SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON]) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason);\n }\n\n logger.log(`[Tracing] Idle span \"${spanJSON.op}\" finished`);\n\n const childSpans = getSpanDescendants(span).filter(child => child !== span);\n\n let discardedSpans = 0;\n childSpans.forEach(childSpan => {\n // We cancel all pending spans with status \"cancelled\" to indicate the idle span was finished early\n if (childSpan.isRecording()) {\n childSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'cancelled' });\n childSpan.end(endTimestamp);\n DEBUG_BUILD &&\n logger.log('[Tracing] Cancelling span since span ended early', JSON.stringify(childSpan, undefined, 2));\n }\n\n const childSpanJSON = spanToJSON(childSpan);\n const { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON;\n\n const spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp;\n\n // Add a delta with idle timeout so that we prevent false positives\n const timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1000;\n const spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError;\n\n if (DEBUG_BUILD) {\n const stringifiedSpan = JSON.stringify(childSpan, undefined, 2);\n if (!spanStartedBeforeIdleSpanEnd) {\n logger.log('[Tracing] Discarding span since it happened after idle span was finished', stringifiedSpan);\n } else if (!spanEndedBeforeFinalTimeout) {\n logger.log('[Tracing] Discarding span since it finished after idle span final timeout', stringifiedSpan);\n }\n }\n\n if (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) {\n removeChildSpanFromSpan(span, childSpan);\n discardedSpans++;\n }\n });\n\n if (discardedSpans > 0) {\n span.setAttribute('sentry.idle_span_discarded_spans', discardedSpans);\n }\n }\n\n _cleanupHooks.push(\n client.on('spanStart', startedSpan => {\n // If we already finished the idle span,\n // or if this is the idle span itself being started,\n // or if the started span has already been closed,\n // we don't care about it for activity\n if (_finished || startedSpan === span || !!spanToJSON(startedSpan).timestamp) {\n return;\n }\n\n const allSpans = getSpanDescendants(span);\n\n // If the span that was just started is a child of the idle span, we should track it\n if (allSpans.includes(startedSpan)) {\n _pushActivity(startedSpan.spanContext().spanId);\n }\n }),\n );\n\n _cleanupHooks.push(\n client.on('spanEnd', endedSpan => {\n if (_finished) {\n return;\n }\n\n _popActivity(endedSpan.spanContext().spanId);\n }),\n );\n\n _cleanupHooks.push(\n client.on('idleSpanEnableAutoFinish', spanToAllowAutoFinish => {\n if (spanToAllowAutoFinish === span) {\n _autoFinishAllowed = true;\n _restartIdleTimeout();\n\n if (activities.size) {\n _restartChildSpanTimeout();\n }\n }\n }),\n );\n\n // We only start the initial idle timeout if we are not delaying the auto finish\n if (!options.disableAutoFinish) {\n _restartIdleTimeout();\n }\n\n setTimeout(() => {\n if (!_finished) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' });\n _finishReason = FINISH_REASON_FINAL_TIMEOUT;\n span.end();\n }\n }, finalTimeout);\n\n return span;\n}\n\nfunction _startIdleSpan(options) {\n const span = startInactiveSpan(options);\n\n _setSpanForScope(getCurrentScope(), span);\n\n DEBUG_BUILD && logger.log('[Tracing] Started span is an idle span');\n\n return span;\n}\n\nexport { TRACING_DEFAULTS, startIdleSpan };\n//# sourceMappingURL=idleSpan.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { isThenable } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { SyncPromise } from './utils-hoist/syncpromise.js';\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(\n processors,\n event,\n hint,\n index = 0,\n) {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) ;\n\n DEBUG_BUILD && processor.id && result === null && logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n\nexport { notifyEventProcessors };\n//# sourceMappingURL=eventProcessors.js.map\n","import { GLOBAL_OBJ } from './worldwide.js';\n\nlet parsedStackResults;\nlet lastKeysCount;\nlet cachedFilenameDebugIds;\n\n/**\n * Returns a map of filenames to debug identifiers.\n */\nfunction getFilenameToDebugIdMap(stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n if (!debugIdMap) {\n return {};\n }\n\n const debugIdKeys = Object.keys(debugIdMap);\n\n // If the count of registered globals hasn't changed since the last call, we\n // can just return the cached result.\n if (cachedFilenameDebugIds && debugIdKeys.length === lastKeysCount) {\n return cachedFilenameDebugIds;\n }\n\n lastKeysCount = debugIdKeys.length;\n\n // Build a map of filename -> debug_id.\n cachedFilenameDebugIds = debugIdKeys.reduce((acc, stackKey) => {\n if (!parsedStackResults) {\n parsedStackResults = {};\n }\n\n const result = parsedStackResults[stackKey];\n\n if (result) {\n acc[result[0]] = result[1];\n } else {\n const parsedStack = stackParser(stackKey);\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n const filename = stackFrame?.filename;\n const debugId = debugIdMap[stackKey];\n\n if (filename && debugId) {\n acc[filename] = debugId;\n parsedStackResults[stackKey] = [filename, debugId];\n break;\n }\n }\n }\n\n return acc;\n }, {});\n\n return cachedFilenameDebugIds;\n}\n\n/**\n * Returns a list of debug images for the given resources.\n */\nfunction getDebugImagesForResources(\n stackParser,\n resource_paths,\n) {\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n if (!filenameDebugIdMap) {\n return [];\n }\n\n const images = [];\n for (const path of resource_paths) {\n if (path && filenameDebugIdMap[path]) {\n images.push({\n type: 'sourcemap',\n code_file: path,\n debug_id: filenameDebugIdMap[path] ,\n });\n }\n }\n\n return images;\n}\n\nexport { getDebugImagesForResources, getFilenameToDebugIdMap };\n//# sourceMappingURL=debug-ids.js.map\n","import { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport { merge } from './merge.js';\nimport { spanToTraceContext, getRootSpan, spanToJSON } from './spanUtils.js';\n\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\nfunction applyScopeDataToEvent(event, data) {\n const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;\n\n // Apply general data\n applyDataToEvent(event, data);\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (span) {\n applySpanToEvent(event, span);\n }\n\n applyFingerprintToEvent(event, fingerprint);\n applyBreadcrumbsToEvent(event, breadcrumbs);\n applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n\n/** Merge data of two scopes together. */\nfunction mergeScopeData(data, mergeData) {\n const {\n extra,\n tags,\n user,\n contexts,\n level,\n sdkProcessingMetadata,\n breadcrumbs,\n fingerprint,\n eventProcessors,\n attachments,\n propagationContext,\n transactionName,\n span,\n } = mergeData;\n\n mergeAndOverwriteScopeData(data, 'extra', extra);\n mergeAndOverwriteScopeData(data, 'tags', tags);\n mergeAndOverwriteScopeData(data, 'user', user);\n mergeAndOverwriteScopeData(data, 'contexts', contexts);\n\n data.sdkProcessingMetadata = merge(data.sdkProcessingMetadata, sdkProcessingMetadata, 2);\n\n if (level) {\n data.level = level;\n }\n\n if (transactionName) {\n data.transactionName = transactionName;\n }\n\n if (span) {\n data.span = span;\n }\n\n if (breadcrumbs.length) {\n data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n }\n\n if (fingerprint.length) {\n data.fingerprint = [...data.fingerprint, ...fingerprint];\n }\n\n if (eventProcessors.length) {\n data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n }\n\n if (attachments.length) {\n data.attachments = [...data.attachments, ...attachments];\n }\n\n data.propagationContext = { ...data.propagationContext, ...propagationContext };\n}\n\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\nfunction mergeAndOverwriteScopeData\n\n(data, prop, mergeVal) {\n data[prop] = merge(data[prop], mergeVal, 1);\n}\n\nfunction applyDataToEvent(event, data) {\n const { extra, tags, user, contexts, level, transactionName } = data;\n\n const cleanedExtra = dropUndefinedKeys(extra);\n if (Object.keys(cleanedExtra).length) {\n event.extra = { ...cleanedExtra, ...event.extra };\n }\n\n const cleanedTags = dropUndefinedKeys(tags);\n if (Object.keys(cleanedTags).length) {\n event.tags = { ...cleanedTags, ...event.tags };\n }\n\n const cleanedUser = dropUndefinedKeys(user);\n if (Object.keys(cleanedUser).length) {\n event.user = { ...cleanedUser, ...event.user };\n }\n\n const cleanedContexts = dropUndefinedKeys(contexts);\n if (Object.keys(cleanedContexts).length) {\n event.contexts = { ...cleanedContexts, ...event.contexts };\n }\n\n if (level) {\n event.level = level;\n }\n\n // transaction events get their `transaction` from the root span name\n if (transactionName && event.type !== 'transaction') {\n event.transaction = transactionName;\n }\n}\n\nfunction applyBreadcrumbsToEvent(event, breadcrumbs) {\n const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs];\n event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\n\nfunction applySdkMetadataToEvent(event, sdkProcessingMetadata) {\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...sdkProcessingMetadata,\n };\n}\n\nfunction applySpanToEvent(event, span) {\n event.contexts = {\n trace: spanToTraceContext(span),\n ...event.contexts,\n };\n\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),\n ...event.sdkProcessingMetadata,\n };\n\n const rootSpan = getRootSpan(span);\n const transactionName = spanToJSON(rootSpan).description;\n if (transactionName && !event.transaction && event.type === 'transaction') {\n event.transaction = transactionName;\n }\n}\n\n/**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\nfunction applyFingerprintToEvent(event, fingerprint) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (fingerprint) {\n event.fingerprint = event.fingerprint.concat(fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (!event.fingerprint.length) {\n delete event.fingerprint;\n }\n}\n\nexport { applyScopeDataToEvent, mergeAndOverwriteScopeData, mergeScopeData };\n//# sourceMappingURL=applyScopeDataToEvent.js.map\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalScope } from '../currentScopes.js';\nimport { notifyEventProcessors } from '../eventProcessors.js';\nimport { Scope } from '../scope.js';\nimport { getFilenameToDebugIdMap } from '../utils-hoist/debug-ids.js';\nimport { uuid4, addExceptionMechanism } from '../utils-hoist/misc.js';\nimport { normalize } from '../utils-hoist/normalize.js';\nimport { truncate } from '../utils-hoist/string.js';\nimport { dateTimestampInSeconds } from '../utils-hoist/time.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope,\n client,\n isolationScope,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n if (client) {\n client.emit('applyFrameMetadata', event);\n }\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n const finalScope = getFinalScope(scope, hint.captureContext);\n\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n\n const clientEventProcessors = client ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Scope.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n const data = getGlobalScope().getScopeData();\n\n if (isolationScope) {\n const isolationData = isolationScope.getScopeData();\n mergeScopeData(data, isolationData);\n }\n\n if (finalScope) {\n const finalScopeData = finalScope.getScopeData();\n mergeScopeData(data, finalScopeData);\n }\n\n const attachments = [...(hint.attachments || []), ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n\n applyScopeDataToEvent(prepared, data);\n\n const eventProcessors = [\n ...clientEventProcessors,\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors,\n ];\n\n const result = notifyEventProcessors(eventProcessors, prepared, hint);\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n *\n * Only exported for tests.\n *\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n // empty strings do not make sense for environment, release, and dist\n // so we handle them the same as if they were not provided\n event.environment = event.environment || environment || DEFAULT_ENVIRONMENT;\n\n if (!event.release && release) {\n event.release = release;\n }\n\n if (!event.dist && dist) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception?.values?.[0];\n if (exception?.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request?.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n event.exception?.values?.forEach(exception => {\n exception.stacktrace?.frames?.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n event.exception?.values?.forEach(exception => {\n exception.stacktrace?.frames?.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id,\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts?.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n return {\n ...span,\n ...(span.data && {\n data: normalize(span.data, depth, maxBreadth),\n }),\n };\n });\n }\n\n // event.contexts.flags (FeatureFlagContext) stores context for our feature\n // flag integrations. It has a greater nesting depth than our other typed\n // Contexts, so we re-normalize with a fixed depth of 3 here. We do not want\n // to skip this in case of conflicting, user-provided context.\n if (event.contexts?.flags && normalized.contexts) {\n normalized.contexts.flags = normalize(event.contexts.flags, 3, maxBreadth);\n }\n\n return normalized;\n}\n\nfunction getFinalScope(scope, captureContext) {\n if (!captureContext) {\n return scope;\n }\n\n const finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(\n hint,\n) {\n if (!hint) {\n return undefined;\n }\n\n // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n if (hintIsScopeOrFunction(hint)) {\n return { captureContext: hint };\n }\n\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint,\n };\n }\n\n return hint;\n}\n\nfunction hintIsScopeOrFunction(hint) {\n return hint instanceof Scope || typeof hint === 'function';\n}\n\nconst captureContextKeys = [\n 'user',\n 'level',\n 'extra',\n 'contexts',\n 'tags',\n 'fingerprint',\n 'propagationContext',\n] ;\n\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some(key => captureContextKeys.includes(key ));\n}\n\nexport { applyClientOptions, applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n","import { getCurrentScope, getIsolationScope, getClient, withIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { makeSession, updateSession, closeSession } from './session.js';\nimport { isThenable } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport { timestampInSeconds } from './utils-hoist/time.js';\nimport { GLOBAL_OBJ } from './utils-hoist/worldwide.js';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent.js';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nfunction captureException(exception, hint) {\n return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nfunction captureMessage(message, captureContext) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n return getCurrentScope().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nfunction captureEvent(event, hint) {\n return getCurrentScope().captureEvent(event, hint);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\nfunction setContext(name, context) {\n getIsolationScope().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nfunction setExtras(extras) {\n getIsolationScope().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nfunction setExtra(key, extra) {\n getIsolationScope().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nfunction setTags(tags) {\n getIsolationScope().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nfunction setTag(key, value) {\n getIsolationScope().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nfunction setUser(user) {\n getIsolationScope().setUser(user);\n}\n\n/**\n * The last error event id of the isolation scope.\n *\n * Warning: This function really returns the last recorded error event id on the current\n * isolation scope. If you call this function after handling a certain error and another error\n * is captured in between, the last one is returned instead of the one you might expect.\n * Also, ids of events that were never sent to Sentry (for example because\n * they were dropped in `beforeSend`) could be returned.\n *\n * @returns The last event id of the isolation scope.\n */\nfunction lastEventId() {\n return getIsolationScope().lastEventId();\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const scope = getCurrentScope();\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(\n monitorSlug,\n callback,\n upsertMonitorConfig,\n) {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = timestampInSeconds();\n\n function finishCheckIn(status) {\n captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n }\n\n return withIsolationScope(() => {\n let maybePromiseResult;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n e => {\n finishCheckIn('error');\n throw e;\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\n });\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function flush(timeout) {\n const client = getClient();\n if (client) {\n return client.flush(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n const client = getClient();\n if (client) {\n return client.close(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nfunction isInitialized() {\n return !!getClient();\n}\n\n/** If the SDK is initialized & enabled. */\nfunction isEnabled() {\n const client = getClient();\n return client?.getOptions().enabled !== false && !!client?.getTransport();\n}\n\n/**\n * Add an event processor.\n * This will be added to the current isolation scope, ensuring any event that is processed in the current execution\n * context will have the processor applied.\n */\nfunction addEventProcessor(callback) {\n getIsolationScope().addEventProcessor(callback);\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nfunction startSession(context) {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n user: currentScope.getUser() || isolationScope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = isolationScope.getSession();\n if (currentSession?.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n\n endSession();\n\n // Afterwards we set the new session on the scope\n isolationScope.setSession(session);\n\n return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nfunction endSession() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session) {\n closeSession(session);\n }\n _sendSessionUpdate();\n\n // the session is over; take it off of the scope\n isolationScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate() {\n const isolationScope = getIsolationScope();\n const client = getClient();\n const session = isolationScope.getSession();\n if (session && client) {\n client.captureSession(session);\n }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n * Defaults to `false`.\n */\nfunction captureSession(end = false) {\n // both send the update and pull the session from the scope\n if (end) {\n endSession();\n return;\n }\n\n // only send the update\n _sendSessionUpdate();\n}\n\nexport { addEventProcessor, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, endSession, flush, isEnabled, isInitialized, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startSession, withMonitor };\n//# sourceMappingURL=exports.js.map\n","import { makeDsn, dsnToString } from './utils-hoist/dsn.js';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn, sdkInfo) {\n const params = {\n sentry_version: SENTRY_API_VERSION,\n };\n\n if (dsn.publicKey) {\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n params.sentry_key = dsn.publicKey;\n }\n\n if (sdkInfo) {\n params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;\n }\n\n return new URLSearchParams(params).toString();\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nfunction getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) {\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nfunction getReportDialogEndpoint(dsnLike, dialogOptions) {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'onClose') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };\n//# sourceMappingURL=api.js.map\n","import { getClient } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './utils-hoist/logger.js';\n\nconst installedIntegrations = [];\n\n/** Map of integrations assigned to a client */\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preserve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations) {\n const integrationsByName = {};\n\n integrations.forEach((currentInstance) => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.values(integrationsByName);\n}\n\n/** Gets integrations to install */\nfunction getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach((integration) => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n const resolvedUserIntegrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];\n } else {\n integrations = defaultIntegrations;\n }\n\n return filterDuplicates(integrations);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nfunction setupIntegrations(client, integrations) {\n const integrationIndex = {};\n\n integrations.forEach((integration) => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n}\n\n/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\nfunction afterSetupIntegrations(client, integrations) {\n for (const integration of integrations) {\n // guard against empty provided integrations\n if (integration?.afterAllSetup) {\n integration.afterAllSetup(client);\n }\n }\n}\n\n/** Setup a single integration. */\nfunction setupIntegration(client, integration, integrationIndex) {\n if (integrationIndex[integration.name]) {\n DEBUG_BUILD && logger.log(`Integration skipped because it was already installed: ${integration.name}`);\n return;\n }\n integrationIndex[integration.name] = integration;\n\n // `setupOnce` is only called the first time\n if (installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce === 'function') {\n integration.setupOnce();\n installedIntegrations.push(integration.name);\n }\n\n // `setup` is run for each client\n if (integration.setup && typeof integration.setup === 'function') {\n integration.setup(client);\n }\n\n if (typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration) ;\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n\n if (typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration) ;\n\n const processor = Object.assign((event, hint) => callback(event, hint, client), {\n id: integration.name,\n });\n\n client.addEventProcessor(processor);\n }\n\n DEBUG_BUILD && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current scope's client. */\nfunction addIntegration(integration) {\n const client = getClient();\n\n if (!client) {\n DEBUG_BUILD && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n\n client.addIntegration(integration);\n}\n\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\nfunction defineIntegration(fn) {\n return fn;\n}\n\nexport { addIntegration, afterSetupIntegrations, defineIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n//# sourceMappingURL=integration.js.map\n","import { createEnvelope } from './envelope.js';\nimport { dateTimestampInSeconds } from './time.js';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nfunction createClientReportEnvelope(\n discarded_events,\n dsn,\n timestamp,\n) {\n const clientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n\nexport { createClientReportEnvelope };\n//# sourceMappingURL=clientreport.js.map\n","/** An error emitted by Sentry SDKs and related utilities. */\nclass SentryError extends Error {\n\n constructor(\n message,\n logLevel = 'warn',\n ) {\n super(message);this.message = message;\n this.logLevel = logLevel;\n }\n}\n\nexport { SentryError };\n//# sourceMappingURL=error.js.map\n","/**\n * Get a list of possible event messages from a Sentry event.\n */\nfunction getPossibleEventMessages(event) {\n const possibleMessages = [];\n\n if (event.message) {\n possibleMessages.push(event.message);\n }\n\n try {\n // @ts-expect-error Try catching to save bundle size\n const lastException = event.exception.values[event.exception.values.length - 1];\n if (lastException?.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n } catch (e) {\n // ignore errors here\n }\n\n return possibleMessages;\n}\n\nexport { getPossibleEventMessages };\n//# sourceMappingURL=eventUtils.js.map\n","import { SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME } from '../semanticAttributes.js';\nimport '../utils-hoist/debug-build.js';\nimport '../utils-hoist/logger.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport '../utils-hoist/time.js';\nimport '../utils-hoist/syncpromise.js';\n\n/**\n * Converts a transaction event to a span JSON object.\n */\nfunction convertTransactionEventToSpanJson(event) {\n const { trace_id, parent_span_id, span_id, status, origin, data, op } = event.contexts?.trace ?? {};\n\n return dropUndefinedKeys({\n data: data ?? {},\n description: event.transaction,\n op,\n parent_span_id,\n span_id: span_id ?? '',\n start_timestamp: event.start_timestamp ?? 0,\n status,\n timestamp: event.timestamp,\n trace_id: trace_id ?? '',\n origin,\n profile_id: data?.[SEMANTIC_ATTRIBUTE_PROFILE_ID] ,\n exclusive_time: data?.[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME] ,\n measurements: event.measurements,\n is_segment: true,\n });\n}\n\n/**\n * Converts a span JSON object to a transaction event.\n */\nfunction convertSpanJsonToTransactionEvent(span) {\n const event = {\n type: 'transaction',\n timestamp: span.timestamp,\n start_timestamp: span.start_timestamp,\n transaction: span.description,\n contexts: {\n trace: {\n trace_id: span.trace_id,\n span_id: span.span_id,\n parent_span_id: span.parent_span_id,\n op: span.op,\n status: span.status,\n origin: span.origin,\n data: {\n ...span.data,\n ...(span.profile_id && { [SEMANTIC_ATTRIBUTE_PROFILE_ID]: span.profile_id }),\n ...(span.exclusive_time && { [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: span.exclusive_time }),\n },\n },\n },\n measurements: span.measurements,\n };\n\n return dropUndefinedKeys(event);\n}\n\nexport { convertSpanJsonToTransactionEvent, convertTransactionEventToSpanJson };\n//# sourceMappingURL=transactionEvent.js.map\n","import { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { getTraceContextFromScope, getCurrentScope, getIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { setupIntegration, afterSetupIntegrations, setupIntegrations } from './integration.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromScope } from './tracing/dynamicSamplingContext.js';\nimport { createClientReportEnvelope } from './utils-hoist/clientreport.js';\nimport { makeDsn, dsnToString } from './utils-hoist/dsn.js';\nimport { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils-hoist/envelope.js';\nimport { SentryError } from './utils-hoist/error.js';\nimport { isPrimitive, isThenable, isPlainObject, isParameterizedString } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4, checkOrSetAlreadyCaught } from './utils-hoist/misc.js';\nimport { resolvedSyncPromise, SyncPromise, rejectedSyncPromise } from './utils-hoist/syncpromise.js';\nimport { getPossibleEventMessages } from './utils/eventUtils.js';\nimport { merge } from './utils/merge.js';\nimport { parseSampleRate } from './utils/parseSampleRate.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\nimport { showSpanDropWarning } from './utils/spanUtils.js';\nimport { convertTransactionEventToSpanJson, convertSpanJsonToTransactionEvent } from './utils/transactionEvent.js';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\nconst MISSING_RELEASE_FOR_SESSION_ERROR = 'Discarded session because of missing or non-string release';\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link Client._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends Client {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nclass Client {\n /** Options passed to the SDK. */\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n\n /** Array of set up integrations. */\n\n /** Number of calls being processed */\n\n /** Holds flushable */\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n constructor(options) {\n this._options = options;\n this._integrations = {};\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n DEBUG_BUILD && logger.warn('No DSN provided, client will not send events.');\n }\n\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(\n this._dsn,\n options.tunnel,\n options._metadata ? options._metadata.sdk : undefined,\n );\n this._transport = options.transport({\n tunnel: this._options.tunnel,\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n }\n }\n\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * Unlike `captureException` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureException(exception, hint, scope) {\n const eventId = uuid4();\n\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n\n const hintWithEventId = {\n event_id: eventId,\n ...hint,\n };\n\n this._process(\n this.eventFromException(exception, hintWithEventId).then(event =>\n this._captureEvent(event, hintWithEventId, scope),\n ),\n );\n\n return hintWithEventId.event_id;\n }\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * Unlike `captureMessage` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureMessage(\n message,\n level,\n hint,\n currentScope,\n ) {\n const hintWithEventId = {\n event_id: uuid4(),\n ...hint,\n };\n\n const eventMessage = isParameterizedString(message) ? message : String(message);\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(eventMessage, level, hintWithEventId)\n : this.eventFromException(message, hintWithEventId);\n\n this._process(promisedEvent.then(event => this._captureEvent(event, hintWithEventId, currentScope)));\n\n return hintWithEventId.event_id;\n }\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * Unlike `captureEvent` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureEvent(event, hint, currentScope) {\n const eventId = uuid4();\n\n // ensure we haven't captured this very object before\n if (hint?.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n\n const hintWithEventId = {\n event_id: eventId,\n ...hint,\n };\n\n const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;\n const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;\n\n this._process(\n this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope, capturedSpanIsolationScope),\n );\n\n return hintWithEventId.event_id;\n }\n\n /**\n * Captures a session.\n */\n captureSession(session) {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n\n /**\n * Create a cron monitor check in and send it to Sentry. This method is not available on all clients.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n * @param scope An optional scope containing event metadata.\n * @returns A string representing the id of the check in.\n */\n\n /**\n * Get the current Dsn.\n */\n getDsn() {\n return this._dsn;\n }\n\n /**\n * Get the current options.\n */\n getOptions() {\n return this._options;\n }\n\n /**\n * Get the SDK metadata.\n * @see SdkMetadata\n */\n getSdkMetadata() {\n return this._options._metadata;\n }\n\n /**\n * Returns the transport that is used by the client.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n */\n getTransport() {\n return this._transport;\n }\n\n /**\n * Wait for all events to be sent or the timeout to expire, whichever comes first.\n *\n * @param timeout Maximum time in ms the client should wait for events to be flushed. Omitting this parameter will\n * cause the client to wait until all events are sent before resolving the promise.\n * @returns A promise that will resolve with `true` if all events are sent before the timeout, or `false` if there are\n * still events in the queue when the timeout is reached.\n */\n flush(timeout) {\n const transport = this._transport;\n if (transport) {\n this.emit('flush');\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * Flush the event queue and set the client to `enabled = false`. See {@link Client.flush}.\n *\n * @param {number} timeout Maximum time in ms the client should wait before shutting down. Omitting this parameter will cause\n * the client to wait until all events are sent before disabling itself.\n * @returns {Promise} A promise which resolves to `true` if the flush completes successfully before the timeout, or `false` if\n * it doesn't.\n */\n close(timeout) {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n this.emit('close');\n return result;\n });\n }\n\n /**\n * Get all installed event processors.\n */\n getEventProcessors() {\n return this._eventProcessors;\n }\n\n /**\n * Adds an event processor that applies to any event processed by this client.\n */\n addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n\n /**\n * Initialize this client.\n * Call this after the client was set on a scope.\n */\n init() {\n if (\n this._isEnabled() ||\n // Force integrations to be setup even if no DSN was set when we have\n // Spotlight enabled. This is particularly important for browser as we\n // don't support the `spotlight` option there and rely on the users\n // adding the `spotlightBrowserIntegration()` to their integrations which\n // wouldn't get initialized with the check below when there's no DSN set.\n this._options.integrations.some(({ name }) => name.startsWith('Spotlight'))\n ) {\n this._setupIntegrations();\n }\n }\n\n /**\n * Gets an installed integration by its name.\n *\n * @returns {Integration|undefined} The installed integration or `undefined` if no integration with that `name` was installed.\n */\n getIntegrationByName(integrationName) {\n return this._integrations[integrationName] ;\n }\n\n /**\n * Add an integration to the client.\n * This can be used to e.g. lazy load integrations.\n * In most cases, this should not be necessary,\n * and you're better off just passing the integrations via `integrations: []` at initialization time.\n * However, if you find the need to conditionally load & add an integration, you can use `addIntegration` to do so.\n */\n addIntegration(integration) {\n const isAlreadyInstalled = this._integrations[integration.name];\n\n // This hook takes care of only installing if not already installed\n setupIntegration(this, integration, this._integrations);\n // Here we need to check manually to make sure to not run this multiple times\n if (!isAlreadyInstalled) {\n afterSetupIntegrations(this, [integration]);\n }\n }\n\n /**\n * Send a fully prepared event to Sentry.\n */\n sendEvent(event, hint = {}) {\n this.emit('beforeSendEvent', event, hint);\n\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));\n }\n\n const promise = this.sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * Send a session or session aggregrates to Sentry.\n */\n sendSession(session) {\n // Backfill release and environment on session\n const { release: clientReleaseOption, environment: clientEnvironmentOption = DEFAULT_ENVIRONMENT } = this._options;\n if ('aggregates' in session) {\n const sessionAttrs = session.attrs || {};\n if (!sessionAttrs.release && !clientReleaseOption) {\n DEBUG_BUILD && logger.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n return;\n }\n sessionAttrs.release = sessionAttrs.release || clientReleaseOption;\n sessionAttrs.environment = sessionAttrs.environment || clientEnvironmentOption;\n session.attrs = sessionAttrs;\n } else {\n if (!session.release && !clientReleaseOption) {\n DEBUG_BUILD && logger.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n return;\n }\n session.release = session.release || clientReleaseOption;\n session.environment = session.environment || clientEnvironmentOption;\n }\n\n this.emit('beforeSendSession', session);\n\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(env);\n }\n\n /**\n * Record on the client that an event got dropped (ie, an event that will not be sent to Sentry).\n */\n recordDroppedEvent(reason, category, count = 1) {\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n DEBUG_BUILD && logger.log(`Recording outcome: \"${key}\"${count > 1 ? ` (${count} times)` : ''}`);\n this._outcomes[key] = (this._outcomes[key] || 0) + count;\n }\n }\n\n /* eslint-disable @typescript-eslint/unified-signatures */\n /**\n * Register a callback for whenever a span is started.\n * Receives the span as argument.\n * @returns {() => void} A function that, when executed, removes the registered callback.\n */\n\n /**\n * Register a hook oin this client.\n */\n on(hook, callback) {\n const hooks = (this._hooks[hook] = this._hooks[hook] || []);\n\n // @ts-expect-error We assume the types are correct\n hooks.push(callback);\n\n // This function returns a callback execution handler that, when invoked,\n // deregisters a callback. This is crucial for managing instances where callbacks\n // need to be unregistered to prevent self-referencing in callback closures,\n // ensuring proper garbage collection.\n return () => {\n // @ts-expect-error We assume the types are correct\n const cbIndex = hooks.indexOf(callback);\n if (cbIndex > -1) {\n hooks.splice(cbIndex, 1);\n }\n };\n }\n\n /** Fire a hook whenever a span starts. */\n\n /**\n * Emit a hook that was previously registered via `on()`.\n */\n emit(hook, ...rest) {\n const callbacks = this._hooks[hook];\n if (callbacks) {\n callbacks.forEach(callback => callback(...rest));\n }\n }\n\n /**\n * Send an envelope to Sentry.\n */\n sendEnvelope(envelope) {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n DEBUG_BUILD && logger.error('Error while sending envelope:', reason);\n return reason;\n });\n }\n\n DEBUG_BUILD && logger.error('Transport disabled');\n\n return resolvedSyncPromise({});\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Setup integrations for this client. */\n _setupIntegrations() {\n const { integrations } = this._options;\n this._integrations = setupIntegrations(this, integrations);\n afterSetupIntegrations(this, integrations);\n }\n\n /** Updates existing session based on the provided event */\n _updateSessionFromEvent(session, event) {\n let crashed = event.level === 'fatal';\n let errored = false;\n const exceptions = event.exception?.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism?.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n _isClientDoneProcessing(timeout) {\n return new SyncPromise(resolve => {\n let ticked = 0;\n const tick = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n _isEnabled() {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param currentScope A scope containing event metadata.\n * @returns A new event with more information.\n */\n _prepareEvent(\n event,\n hint,\n currentScope,\n isolationScope,\n ) {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations?.length) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n\n if (!event.type) {\n isolationScope.setLastEventId(event.event_id || hint.event_id);\n }\n\n return prepareEvent(options, event, hint, currentScope, this, isolationScope).then(evt => {\n if (evt === null) {\n return evt;\n }\n\n this.emit('postprocessEvent', evt, hint);\n\n evt.contexts = {\n trace: getTraceContextFromScope(currentScope),\n ...evt.contexts,\n };\n\n const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);\n\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata,\n };\n\n return evt;\n });\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n _captureEvent(\n event,\n hint = {},\n currentScope = getCurrentScope(),\n isolationScope = getIsolationScope(),\n ) {\n if (DEBUG_BUILD && isErrorEvent(event)) {\n logger.log(`Captured error event \\`${getPossibleEventMessages(event)[0] || ''}\\``);\n }\n\n return this._processEvent(event, hint, currentScope, isolationScope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if (DEBUG_BUILD) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n if (reason instanceof SentryError && reason.logLevel === 'log') {\n logger.log(reason.message);\n } else {\n logger.warn(reason);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param currentScope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n _processEvent(\n event,\n hint,\n currentScope,\n isolationScope,\n ) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n const parsedSampleRate = typeof sampleRate === 'undefined' ? undefined : parseSampleRate(sampleRate);\n if (isError && typeof parsedSampleRate === 'number' && Math.random() > parsedSampleRate) {\n this.recordDroppedEvent('sample_rate', 'error');\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory = (eventType === 'replay_event' ? 'replay' : eventType) ;\n\n return this._prepareEvent(event, hint, currentScope, isolationScope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(this, options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory);\n if (isTransaction) {\n const spans = event.spans || [];\n // the transaction itself counts as one span, plus all the child spans that are added\n const spanCount = 1 + spans.length;\n this.recordDroppedEvent('before_send', 'span', spanCount);\n }\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = currentScope.getSession() || isolationScope.getSession();\n if (isError && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n if (isTransaction) {\n const spanCountBefore = processedEvent.sdkProcessingMetadata?.spanCountBeforeProcessing || 0;\n const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;\n\n const droppedSpanCount = spanCountBefore - spanCountAfter;\n if (droppedSpanCount > 0) {\n this.recordDroppedEvent('before_send', 'span', droppedSpanCount);\n }\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n _process(promise) {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n _clearOutcomes() {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.entries(outcomes).map(([key, quantity]) => {\n const [reason, category] = key.split(':') ;\n return {\n reason,\n category,\n quantity,\n };\n });\n }\n\n /**\n * Sends client reports as an envelope.\n */\n _flushOutcomes() {\n DEBUG_BUILD && logger.log('Flushing outcomes...');\n\n const outcomes = this._clearOutcomes();\n\n if (outcomes.length === 0) {\n DEBUG_BUILD && logger.log('No outcomes to send');\n return;\n }\n\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n DEBUG_BUILD && logger.log('No dsn provided, will not send outcomes');\n return;\n }\n\n DEBUG_BUILD && logger.log('Sending outcomes:', outcomes);\n\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n }\n\n /**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n */\n\n}\n\n/**\n * @deprecated Use `Client` instead. This alias may be removed in a future major version.\n */\n// TODO(v10): Remove\n\n/**\n * @deprecated Use `Client` instead. This alias may be removed in a future major version.\n */\n// TODO(v10): Remove\nconst BaseClient = Client;\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult,\n beforeSendLabel,\n) {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n client,\n options,\n event,\n hint,\n) {\n const { beforeSend, beforeSendTransaction, beforeSendSpan } = options;\n let processedEvent = event;\n\n if (isErrorEvent(processedEvent) && beforeSend) {\n return beforeSend(processedEvent, hint);\n }\n\n if (isTransactionEvent(processedEvent)) {\n if (beforeSendSpan) {\n // process root span\n const processedRootSpanJson = beforeSendSpan(convertTransactionEventToSpanJson(processedEvent));\n if (!processedRootSpanJson) {\n showSpanDropWarning();\n } else {\n // update event with processed root span values\n processedEvent = merge(event, convertSpanJsonToTransactionEvent(processedRootSpanJson));\n }\n\n // process child spans\n if (processedEvent.spans) {\n const processedSpans = [];\n for (const span of processedEvent.spans) {\n const processedSpan = beforeSendSpan(span);\n if (!processedSpan) {\n showSpanDropWarning();\n processedSpans.push(span);\n } else {\n processedSpans.push(processedSpan);\n }\n }\n processedEvent.spans = processedSpans;\n }\n }\n\n if (beforeSendTransaction) {\n if (processedEvent.spans) {\n // We store the # of spans before processing in SDK metadata,\n // so we can compare it afterwards to determine how many spans were dropped\n const spanCountBefore = processedEvent.spans.length;\n processedEvent.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n spanCountBeforeProcessing: spanCountBefore,\n };\n }\n return beforeSendTransaction(processedEvent , hint);\n }\n }\n\n return processedEvent;\n}\n\nfunction isErrorEvent(event) {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n\nexport { BaseClient, Client };\n//# sourceMappingURL=client.js.map\n","import { getCurrentScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger, consoleSandbox } from './utils-hoist/logger.js';\n\n/** A class object that can instantiate Client objects. */\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nfunction initAndBind(\n clientClass,\n options,\n) {\n if (options.debug === true) {\n if (DEBUG_BUILD) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n });\n }\n }\n const scope = getCurrentScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n setCurrentClient(client);\n client.init();\n return client;\n}\n\n/**\n * Make the given client the current client.\n */\nfunction setCurrentClient(client) {\n getCurrentScope().setClient(client);\n}\n\nexport { initAndBind, setCurrentClient };\n//# sourceMappingURL=sdk.js.map\n","import { SentryError } from './error.js';\nimport { rejectedSyncPromise, SyncPromise, resolvedSyncPromise } from './syncpromise.js';\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nfunction makePromiseBuffer(limit) {\n const buffer = [];\n\n function isReady() {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task) {\n return buffer.splice(buffer.indexOf(task), 1)[0] || Promise.resolve(undefined);\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer) {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout) {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n\nexport { makePromiseBuffer };\n//# sourceMappingURL=promisebuffer.js.map\n","// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\n\nconst DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nfunction parseRetryAfterHeader(header, now = Date.now()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nfunction disabledUntil(limits, dataCategory) {\n return limits[dataCategory] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nfunction isRateLimited(limits, dataCategory, now = Date.now()) {\n return disabledUntil(limits, dataCategory) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nfunction updateRateLimits(\n limits,\n { statusCode, headers },\n now = Date.now(),\n) {\n const updatedRateLimits = {\n ...limits,\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers?.['x-sentry-rate-limits'];\n const retryAfterHeader = headers?.['retry-after'];\n\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n *
,
,..\n * where each
is of the form\n * : : : : \n * where\n * is a delay in seconds\n * is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * ;;...\n * is what's being limited (org, project, or key) - ignored by SDK\n * is an arbitrary string like \"org_quota\" - ignored by SDK\n * Semicolon-separated list of metric namespace identifiers. Defines which namespace(s) will be affected.\n * Only present if rate limit applies to the metric_bucket data category.\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories, , , namespaces] = limit.split(':', 5) ;\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n if (category === 'metric_bucket') {\n // namespaces will be present when category === 'metric_bucket'\n if (!namespaces || namespaces.split(';').includes('custom')) {\n updatedRateLimits[category] = now + delay;\n }\n } else {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n\n return updatedRateLimits;\n}\n\nexport { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };\n//# sourceMappingURL=ratelimit.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { forEachEnvelopeItem, envelopeItemTypeToDataCategory, createEnvelope, serializeEnvelope } from '../utils-hoist/envelope.js';\nimport { SentryError } from '../utils-hoist/error.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { makePromiseBuffer } from '../utils-hoist/promisebuffer.js';\nimport { isRateLimited, updateRateLimits } from '../utils-hoist/ratelimit.js';\nimport { resolvedSyncPromise } from '../utils-hoist/syncpromise.js';\n\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 64;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nfunction createTransport(\n options,\n makeRequest,\n buffer = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n ),\n) {\n let rateLimits = {};\n const flush = (timeout) => buffer.drain(timeout);\n\n function send(envelope) {\n const filteredEnvelopeItems = [];\n\n // Drop rate limited items from envelope\n forEachEnvelopeItem(envelope, (item, type) => {\n const dataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, dataCategory)) {\n options.recordDroppedEvent('ratelimit_backoff', dataCategory);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise({});\n }\n\n const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems );\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason) => {\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type));\n });\n };\n\n const requestTask = () =>\n makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then(\n response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n DEBUG_BUILD && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n error => {\n recordEnvelopeLoss('network_error');\n throw error;\n },\n );\n\n return buffer.add(requestTask).then(\n result => result,\n error => {\n if (error instanceof SentryError) {\n DEBUG_BUILD && logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return resolvedSyncPromise({});\n } else {\n throw error;\n }\n },\n );\n }\n\n return {\n send,\n flush,\n };\n}\n\nexport { DEFAULT_TRANSPORT_BUFFER_SIZE, createTransport };\n//# sourceMappingURL=base.js.map\n","/**\n * Checks whether given url points to Sentry server\n *\n * @param url url to verify\n */\nfunction isSentryRequestUrl(url, client) {\n const dsn = client?.getDsn();\n const tunnel = client?.getOptions().tunnel;\n return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\n\nfunction checkTunnel(url, tunnel) {\n if (!tunnel) {\n return false;\n }\n\n return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\n\nfunction checkDsn(url, dsn) {\n return dsn ? url.includes(dsn.host) : false;\n}\n\nfunction removeTrailingSlash(str) {\n return str[str.length - 1] === '/' ? str.slice(0, -1) : str;\n}\n\nexport { isSentryRequestUrl };\n//# sourceMappingURL=isSentryRequestUrl.js.map\n","// By default, we want to infer the IP address, unless this is explicitly set to `null`\n// We do this after all other processing is done\n// If `ip_address` is explicitly set to `null` or a value, we leave it as is\n\n/**\n * @internal\n */\nfunction addAutoIpAddressToUser(objWithMaybeUser) {\n if (objWithMaybeUser.user?.ip_address === undefined) {\n objWithMaybeUser.user = {\n ...objWithMaybeUser.user,\n ip_address: '{{auto}}',\n };\n }\n}\n\n/**\n * @internal\n */\nfunction addAutoIpAddressToSession(session) {\n if ('aggregates' in session) {\n if (session.attrs?.['ip_address'] === undefined) {\n session.attrs = {\n ...session.attrs,\n ip_address: '{{auto}}',\n };\n }\n } else {\n if (session.ipAddress === undefined) {\n session.ipAddress = '{{auto}}';\n }\n }\n}\n\nexport { addAutoIpAddressToSession, addAutoIpAddressToUser };\n//# sourceMappingURL=ipAddress.js.map\n","import { SDK_VERSION } from '../utils-hoist/version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n","import { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { getMainCarrier } from '../carrier.js';\nimport { getClient, getCurrentScope } from '../currentScopes.js';\nimport { isEnabled } from '../exports.js';\nimport '../tracing/errors.js';\nimport '../utils-hoist/debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport '../debug-build.js';\nimport '../utils-hoist/time.js';\nimport { getActiveSpan, spanToTraceHeader } from './spanUtils.js';\nimport { getDynamicSamplingContextFromSpan, getDynamicSamplingContextFromScope } from '../tracing/dynamicSamplingContext.js';\nimport { TRACEPARENT_REGEXP, generateSentryTraceHeader } from '../utils-hoist/tracing.js';\nimport { dynamicSamplingContextToSentryBaggageHeader } from '../utils-hoist/baggage.js';\n\n/**\n * Extracts trace propagation data from the current span or from the client's scope (via transaction or propagation\n * context) and serializes it to `sentry-trace` and `baggage` values to strings. These values can be used to propagate\n * a trace via our tracing Http headers or Html `` tags.\n *\n * This function also applies some validation to the generated sentry-trace and baggage values to ensure that\n * only valid strings are returned.\n *\n * @returns an object with the tracing data values. The object keys are the name of the tracing key to be used as header\n * or meta tag name.\n */\nfunction getTraceData(options = {}) {\n const client = getClient();\n if (!isEnabled() || !client) {\n return {};\n }\n\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.getTraceData) {\n return acs.getTraceData(options);\n }\n\n const scope = getCurrentScope();\n const span = options.span || getActiveSpan();\n const sentryTrace = span ? spanToTraceHeader(span) : scopeToTraceHeader(scope);\n const dsc = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);\n const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc);\n\n const isValidSentryTraceHeader = TRACEPARENT_REGEXP.test(sentryTrace);\n if (!isValidSentryTraceHeader) {\n logger.warn('Invalid sentry-trace data. Cannot generate trace data');\n return {};\n }\n\n return {\n 'sentry-trace': sentryTrace,\n baggage,\n };\n}\n\n/**\n * Get a sentry-trace header value for the given scope.\n */\nfunction scopeToTraceHeader(scope) {\n const { traceId, sampled, propagationSpanId } = scope.getPropagationContext();\n return generateSentryTraceHeader(traceId, propagationSpanId, sampled);\n}\n\nexport { getTraceData };\n//# sourceMappingURL=traceData.js.map\n","import { getClient, getIsolationScope } from './currentScopes.js';\nimport { consoleSandbox } from './utils-hoist/logger.js';\nimport { dateTimestampInSeconds } from './utils-hoist/time.js';\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n */\nfunction addBreadcrumb(breadcrumb, hint) {\n const client = getClient();\n const isolationScope = getIsolationScope();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions();\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n}\n\nexport { addBreadcrumb };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { getClient } from '../currentScopes.js';\nimport { defineIntegration } from '../integration.js';\nimport { getOriginalFunction } from '../utils-hoist/object.js';\n\nlet originalFunctionToString;\n\nconst INTEGRATION_NAME = 'FunctionToString';\n\nconst SETUP_CLIENTS = new WeakMap();\n\nconst _functionToStringIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n Function.prototype.toString = function ( ...args) {\n const originalFunction = getOriginalFunction(this);\n const context =\n SETUP_CLIENTS.has(getClient() ) && originalFunction !== undefined ? originalFunction : this;\n return originalFunctionToString.apply(context, args);\n };\n } catch {\n // ignore errors here, just don't patch this\n }\n },\n setup(client) {\n SETUP_CLIENTS.set(client, true);\n },\n };\n}) ;\n\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * ```js\n * Sentry.init({\n * integrations: [\n * functionToStringIntegration(),\n * ],\n * });\n * ```\n */\nconst functionToStringIntegration = defineIntegration(_functionToStringIntegration);\n\nexport { functionToStringIntegration };\n//# sourceMappingURL=functiontostring.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { defineIntegration } from '../integration.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getEventDescription } from '../utils-hoist/misc.js';\nimport { stringMatchesSomePattern } from '../utils-hoist/string.js';\nimport { getPossibleEventMessages } from '../utils/eventUtils.js';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [\n /^Script error\\.?$/,\n /^Javascript error: Script error\\.? on line 0$/,\n /^ResizeObserver loop completed with undelivered notifications.$/, // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.\n /^Cannot redefine property: googletag$/, // This is thrown when google tag manager is used in combination with an ad blocker\n /^Can't find variable: gmo$/, // Error from Google Search App https://issuetracker.google.com/issues/396043331\n /^undefined is not an object \\(evaluating 'a\\.[A-Z]'\\)$/, // Random error that happens but not actionable or noticeable to end-users.\n 'can\\'t redefine non-configurable property \"solana\"', // Probably a browser extension or custom browser (Brave) throwing this error\n \"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)\", // Error thrown by GTM, seemingly not affecting end-users\n \"Can't find variable: _AutofillCallbackHandler\", // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/\n /^Non-Error promise rejection captured with value: Object Not Found Matching Id:\\d+, MethodName:simulateEvent, ParamCount:\\d+$/, // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps\n /^Java exception was raised during method invocation$/, // error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065)\n];\n\n/** Options for the EventFilters integration */\n\nconst INTEGRATION_NAME = 'EventFilters';\n\nconst _eventFiltersIntegration = ((options = {}) => {\n return {\n name: INTEGRATION_NAME,\n processEvent(event, _hint, client) {\n const clientOptions = client.getOptions();\n const mergedOptions = _mergeOptions(options, clientOptions);\n return _shouldDropEvent(event, mergedOptions) ? null : event;\n },\n };\n}) ;\n\n/**\n * An integration that filters out events (errors and transactions) based on:\n *\n * - (Errors) A curated list of known low-value or irrelevant errors (see {@link DEFAULT_IGNORE_ERRORS})\n * - (Errors) A list of error messages or urls/filenames passed in via\n * - Top level Sentry.init options (`ignoreErrors`, `denyUrls`, `allowUrls`)\n * - The same options passed to the integration directly via @param options\n * - (Transactions/Spans) A list of root span (transaction) names passed in via\n * - Top level Sentry.init option (`ignoreTransactions`)\n * - The same option passed to the integration directly via @param options\n *\n * Events filtered by this integration will not be sent to Sentry.\n */\nconst eventFiltersIntegration = defineIntegration(_eventFiltersIntegration);\n\n/**\n * An integration that filters out events (errors and transactions) based on:\n *\n * - (Errors) A curated list of known low-value or irrelevant errors (see {@link DEFAULT_IGNORE_ERRORS})\n * - (Errors) A list of error messages or urls/filenames passed in via\n * - Top level Sentry.init options (`ignoreErrors`, `denyUrls`, `allowUrls`)\n * - The same options passed to the integration directly via @param options\n * - (Transactions/Spans) A list of root span (transaction) names passed in via\n * - Top level Sentry.init option (`ignoreTransactions`)\n * - The same option passed to the integration directly via @param options\n *\n * Events filtered by this integration will not be sent to Sentry.\n *\n * @deprecated this integration was renamed and will be removed in a future major version.\n * Use `eventFiltersIntegration` instead.\n */\nconst inboundFiltersIntegration = defineIntegration(((options = {}) => {\n return {\n ...eventFiltersIntegration(options),\n name: 'InboundFilters',\n };\n}) );\n\nfunction _mergeOptions(\n internalOptions = {},\n clientOptions = {},\n) {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n ],\n ignoreTransactions: [...(internalOptions.ignoreTransactions || []), ...(clientOptions.ignoreTransactions || [])],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\nfunction _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n DEBUG_BUILD &&\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isUselessError(event)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to not having an error message, error type or stacktrace.\\nEvent: ${getEventDescription(\n event,\n )}`,\n );\n return true;\n }\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event, ignoreErrors) {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event, ignoreTransactions) {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n\n const name = event.transaction;\n return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event, denyUrls) {\n if (!denyUrls?.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event, allowUrls) {\n if (!allowUrls?.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _isSentryError(event) {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames = []) {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event) {\n try {\n // If there are linked exceptions or exception aggregates we only want to match against the top frame of the \"root\" (the main exception)\n // The root always comes last in linked exceptions\n const rootException = [...(event.exception?.values ?? []).reverse()]?.find(\n value => value.mechanism?.parent_id === undefined && value.stacktrace?.frames?.length,\n );\n const frames = rootException?.stacktrace?.frames;\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n DEBUG_BUILD && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\n\nfunction _isUselessError(event) {\n if (event.type) {\n // event is not an error\n return false;\n }\n\n // We only want to consider events for dropping that actually have recorded exception values.\n if (!event.exception?.values?.length) {\n return false;\n }\n\n return (\n // No top-level message\n !event.message &&\n // There are no exception values that have a stacktrace, a non-generic-Error type or value\n !event.exception.values.some(value => value.stacktrace || (value.type && value.type !== 'Error') || value.value)\n );\n}\n\nexport { eventFiltersIntegration, inboundFiltersIntegration };\n//# sourceMappingURL=eventFilters.js.map\n","import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception?.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n","import { CONSOLE_LEVELS, originalConsoleMethods } from '../logger.js';\nimport { fill } from '../object.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a console.xxx method is called.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addConsoleInstrumentationHandler(handler) {\n const type = 'console';\n addHandler(type, handler);\n maybeInstrument(type, instrumentConsole);\n}\n\nfunction instrumentConsole() {\n if (!('console' in GLOBAL_OBJ)) {\n return;\n }\n\n CONSOLE_LEVELS.forEach(function (level) {\n if (!(level in GLOBAL_OBJ.console)) {\n return;\n }\n\n fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod) {\n originalConsoleMethods[level] = originalConsoleMethod;\n\n return function (...args) {\n const handlerData = { args, level };\n triggerHandlers('console', handlerData);\n\n const log = originalConsoleMethods[level];\n log?.apply(GLOBAL_OBJ.console, args);\n };\n });\n });\n}\n\nexport { addConsoleInstrumentationHandler };\n//# sourceMappingURL=console.js.map\n","/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nfunction severityLevelFromString(level) {\n return (\n level === 'warn' ? 'warning' : ['fatal', 'error', 'warning', 'log', 'info', 'debug'].includes(level) ? level : 'log'\n ) ;\n}\n\nexport { severityLevelFromString };\n//# sourceMappingURL=severity.js.map\n","import { getClient, withScope } from '../currentScopes.js';\nimport { captureMessage, captureException } from '../exports.js';\nimport { defineIntegration } from '../integration.js';\nimport { addConsoleInstrumentationHandler } from '../utils-hoist/instrument/console.js';\nimport { CONSOLE_LEVELS } from '../utils-hoist/logger.js';\nimport { addExceptionMechanism } from '../utils-hoist/misc.js';\nimport { severityLevelFromString } from '../utils-hoist/severity.js';\nimport { safeJoin } from '../utils-hoist/string.js';\nimport { GLOBAL_OBJ } from '../utils-hoist/worldwide.js';\n\nconst INTEGRATION_NAME = 'CaptureConsole';\n\nconst _captureConsoleIntegration = ((options = {}) => {\n const levels = options.levels || CONSOLE_LEVELS;\n const handled = options.handled ?? true;\n\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n if (!('console' in GLOBAL_OBJ)) {\n return;\n }\n\n addConsoleInstrumentationHandler(({ args, level }) => {\n if (getClient() !== client || !levels.includes(level)) {\n return;\n }\n\n consoleHandler(args, level, handled);\n });\n },\n };\n}) ;\n\n/**\n * Send Console API calls as Sentry Events.\n */\nconst captureConsoleIntegration = defineIntegration(_captureConsoleIntegration);\n\nfunction consoleHandler(args, level, handled) {\n const captureContext = {\n level: severityLevelFromString(level),\n extra: {\n arguments: args,\n },\n };\n\n withScope(scope => {\n scope.addEventProcessor(event => {\n event.logger = 'console';\n\n addExceptionMechanism(event, {\n handled,\n type: 'console',\n });\n\n return event;\n });\n\n if (level === 'assert') {\n if (!args[0]) {\n const message = `Assertion failed: ${safeJoin(args.slice(1), ' ') || 'console.assert'}`;\n scope.setExtra('arguments', args.slice(1));\n captureMessage(message, captureContext);\n }\n return;\n }\n\n const error = args.find(arg => arg instanceof Error);\n if (error) {\n captureException(error, captureContext);\n return;\n }\n\n const message = safeJoin(args, ' ');\n captureMessage(message, captureContext);\n });\n}\n\nexport { captureConsoleIntegration };\n//# sourceMappingURL=captureconsole.js.map\n","import { defineIntegration } from '../integration.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getFramesFromEvent } from '../utils-hoist/stacktrace.js';\n\nconst INTEGRATION_NAME = 'Dedupe';\n\nconst _dedupeIntegration = (() => {\n let previousEvent;\n\n return {\n name: INTEGRATION_NAME,\n processEvent(currentEvent) {\n // We want to ignore any non-error type events, e.g. transactions or replays\n // These should never be deduped, and also not be compared against as _previousEvent.\n if (currentEvent.type) {\n return currentEvent;\n }\n\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, previousEvent)) {\n DEBUG_BUILD && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n return (previousEvent = currentEvent);\n },\n };\n}) ;\n\n/**\n * Deduplication filter.\n */\nconst dedupeIntegration = defineIntegration(_dedupeIntegration);\n\n/** only exported for tests. */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n let currentFrames = getFramesFromEvent(currentEvent);\n let previousFrames = getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames ;\n previousFrames = previousFrames ;\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const frameA = previousFrames[i];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint ;\n previousFingerprint = previousFingerprint ;\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\nfunction _getExceptionFromEvent(event) {\n return event.exception?.values && event.exception.values[0];\n}\n\nexport { _shouldDropEvent, dedupeIntegration };\n//# sourceMappingURL=dedupe.js.map\n","/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nfunction parseUrl(url) {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nfunction stripUrlQueryAndFragment(urlPath) {\n return (urlPath.split(/[?#]/, 1) )[0];\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span name\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nfunction getSanitizedUrlString(url) {\n const { protocol, host, path } = url;\n\n const filteredHost =\n host\n // Always filter out authority\n ?.replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n // TODO: Use new URL global if it exists\n .replace(/(:80)$/, '')\n .replace(/(:443)$/, '') || '';\n\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n\nexport { getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment };\n//# sourceMappingURL=url.js.map\n","import { getClient } from './currentScopes.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP } from './semanticAttributes.js';\nimport './tracing/errors.js';\nimport { isInstanceOf } from './utils-hoist/is.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport './debug-build.js';\nimport './utils-hoist/time.js';\nimport { hasSpansEnabled } from './utils/hasSpansEnabled.js';\nimport { getActiveSpan } from './utils/spanUtils.js';\nimport { SENTRY_BAGGAGE_KEY_PREFIX } from './utils-hoist/baggage.js';\nimport { SentryNonRecordingSpan } from './tracing/sentryNonRecordingSpan.js';\nimport { setHttpStatus, SPAN_STATUS_ERROR } from './tracing/spanstatus.js';\nimport { startInactiveSpan } from './tracing/trace.js';\nimport { parseUrl, stripUrlQueryAndFragment } from './utils-hoist/url.js';\nimport { getTraceData } from './utils/traceData.js';\n\n/**\n * Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction instrumentFetchRequest(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n spanOrigin = 'auto.http.browser',\n) {\n if (!handlerData.fetchData) {\n return undefined;\n }\n\n const { method, url } = handlerData.fetchData;\n\n const shouldCreateSpanResult = hasSpansEnabled() && shouldCreateSpan(url);\n\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = handlerData.fetchData.__span;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n endSpan(span, handlerData);\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const fullUrl = getFullURL(url);\n const parsedUrl = fullUrl ? parseUrl(fullUrl) : parseUrl(url);\n\n const hasParent = !!getActiveSpan();\n\n const span =\n shouldCreateSpanResult && hasParent\n ? startInactiveSpan({\n name: `${method} ${stripUrlQueryAndFragment(url)}`,\n attributes: {\n url,\n type: 'fetch',\n 'http.method': method,\n 'http.url': fullUrl,\n 'server.address': parsedUrl?.host,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n ...(parsedUrl?.search && { 'http.query': parsedUrl?.search }),\n ...(parsedUrl?.hash && { 'http.fragment': parsedUrl?.hash }),\n },\n })\n : new SentryNonRecordingSpan();\n\n handlerData.fetchData.__span = span.spanContext().spanId;\n spans[span.spanContext().spanId] = span;\n\n if (shouldAttachHeaders(handlerData.fetchData.url)) {\n const request = handlerData.args[0];\n\n const options = handlerData.args[1] || {};\n\n const headers = _addTracingHeadersToFetchRequest(\n request,\n options,\n // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n // we do not want to use the span as base for the trace headers,\n // which means that the headers will be generated from the scope and the sampling decision is deferred\n hasSpansEnabled() && hasParent ? span : undefined,\n );\n if (headers) {\n // Ensure this is actually set, if no options have been passed previously\n handlerData.args[1] = options;\n options.headers = headers;\n }\n }\n\n const client = getClient();\n\n if (client) {\n const fetchHint = {\n input: handlerData.args,\n response: handlerData.response,\n startTimestamp: handlerData.startTimestamp,\n endTimestamp: handlerData.endTimestamp,\n } ;\n\n client.emit('beforeOutgoingRequestSpan', span, fetchHint);\n }\n\n return span;\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers.\n */\nfunction _addTracingHeadersToFetchRequest(\n request,\n fetchOptionsObj\n\n,\n span,\n) {\n const traceHeaders = getTraceData({ span });\n const sentryTrace = traceHeaders['sentry-trace'];\n const baggage = traceHeaders.baggage;\n\n // Nothing to do, when we return undefined here, the original headers will be used\n if (!sentryTrace) {\n return undefined;\n }\n\n const headers = fetchOptionsObj.headers || (isRequest(request) ? request.headers : undefined);\n\n if (!headers) {\n return { ...traceHeaders };\n } else if (isHeaders(headers)) {\n const newHeaders = new Headers(headers);\n newHeaders.set('sentry-trace', sentryTrace);\n\n if (baggage) {\n const prevBaggageHeader = newHeaders.get('baggage');\n if (prevBaggageHeader) {\n const prevHeaderStrippedFromSentryBaggage = stripBaggageHeaderOfSentryBaggageValues(prevBaggageHeader);\n newHeaders.set(\n 'baggage',\n // If there are non-sentry entries (i.e. if the stripped string is non-empty/truthy) combine the stripped header and sentry baggage header\n // otherwise just set the sentry baggage header\n prevHeaderStrippedFromSentryBaggage ? `${prevHeaderStrippedFromSentryBaggage},${baggage}` : baggage,\n );\n } else {\n newHeaders.set('baggage', baggage);\n }\n }\n\n return newHeaders;\n } else if (Array.isArray(headers)) {\n const newHeaders = [\n ...headers\n // Remove any existing sentry-trace headers\n .filter(header => {\n return !(Array.isArray(header) && header[0] === 'sentry-trace');\n })\n // Get rid of previous sentry baggage values in baggage header\n .map(header => {\n if (Array.isArray(header) && header[0] === 'baggage' && typeof header[1] === 'string') {\n const [headerName, headerValue, ...rest] = header;\n return [headerName, stripBaggageHeaderOfSentryBaggageValues(headerValue), ...rest];\n } else {\n return header;\n }\n }),\n // Attach the new sentry-trace header\n ['sentry-trace', sentryTrace],\n ];\n\n if (baggage) {\n // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.push(['baggage', baggage]);\n }\n\n return newHeaders ;\n } else {\n const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined;\n let newBaggageHeaders = [];\n\n if (Array.isArray(existingBaggageHeader)) {\n newBaggageHeaders = existingBaggageHeader\n .map(headerItem =>\n typeof headerItem === 'string' ? stripBaggageHeaderOfSentryBaggageValues(headerItem) : headerItem,\n )\n .filter(headerItem => headerItem === '');\n } else if (existingBaggageHeader) {\n newBaggageHeaders.push(stripBaggageHeaderOfSentryBaggageValues(existingBaggageHeader));\n }\n\n if (baggage) {\n newBaggageHeaders.push(baggage);\n }\n\n return {\n ...(headers ),\n 'sentry-trace': sentryTrace,\n baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined,\n };\n }\n}\n\nfunction getFullURL(url) {\n try {\n const parsed = new URL(url);\n return parsed.href;\n } catch {\n return undefined;\n }\n}\n\nfunction endSpan(span, handlerData) {\n if (handlerData.response) {\n setHttpStatus(span, handlerData.response.status);\n\n const contentLength = handlerData.response?.headers && handlerData.response.headers.get('content-length');\n\n if (contentLength) {\n const contentLengthNum = parseInt(contentLength);\n if (contentLengthNum > 0) {\n span.setAttribute('http.response_content_length', contentLengthNum);\n }\n }\n } else if (handlerData.error) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n span.end();\n}\n\nfunction stripBaggageHeaderOfSentryBaggageValues(baggageHeader) {\n return (\n baggageHeader\n .split(',')\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n .filter(baggageEntry => !baggageEntry.split('=')[0].startsWith(SENTRY_BAGGAGE_KEY_PREFIX))\n .join(',')\n );\n}\n\nfunction isRequest(request) {\n return typeof Request !== 'undefined' && isInstanceOf(request, Request);\n}\n\nfunction isHeaders(headers) {\n return typeof Headers !== 'undefined' && isInstanceOf(headers, Headers);\n}\n\nexport { instrumentFetchRequest };\n//# sourceMappingURL=fetch.js.map\n","/**\n * Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.\n */\nfunction getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {\n // NOTE: undefined defaults to 'info' in Sentry\n if (statusCode === undefined) {\n return undefined;\n } else if (statusCode >= 400 && statusCode < 500) {\n return 'warning';\n } else if (statusCode >= 500) {\n return 'error';\n } else {\n return undefined;\n }\n}\n\nexport { getBreadcrumbLogLevelFromHttpStatusCode };\n//# sourceMappingURL=breadcrumb-log-level.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './logger.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ ;\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsHistory() {\n return 'history' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsFetch() {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * isNative checks if the given function is a native implementation\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFunction(func) {\n return func && /^function\\s+\\w+\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nfunction supportsNativeFetch() {\n if (typeof EdgeRuntime === 'string') {\n return true;\n }\n\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFunction(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement ) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow?.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFunction(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n DEBUG_BUILD &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReportingObserver() {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' ,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\nexport { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n//# sourceMappingURL=supports.js.map\n","import { isError } from '../is.js';\nimport { fill, addNonEnumerableProperty } from '../object.js';\nimport { supportsNativeFetch } from '../supports.js';\nimport { timestampInSeconds } from '../time.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addFetchInstrumentationHandler(\n handler,\n skipNativeFetchCheck,\n) {\n const type = 'fetch';\n addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(undefined, skipNativeFetchCheck));\n}\n\n/**\n * Add an instrumentation handler for long-lived fetch requests, like consuming server-sent events (SSE) via fetch.\n * The handler will resolve the request body and emit the actual `endTimestamp`, so that the\n * span can be updated accordingly.\n *\n * Only used internally\n * @hidden\n */\nfunction addFetchEndInstrumentationHandler(handler) {\n const type = 'fetch-body-resolved';\n addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(streamHandler));\n}\n\nfunction instrumentFetch(onFetchResolved, skipNativeFetchCheck = false) {\n if (skipNativeFetchCheck && !supportsNativeFetch()) {\n return;\n }\n\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch) {\n return function (...args) {\n // We capture the error right here and not in the Promise error callback because Safari (and probably other\n // browsers too) will wipe the stack trace up to this point, only leaving us with this file which is useless.\n\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your fetch call did not\n // have a stack trace, so the SDK backfilled the stack trace so\n // you can see which fetch call failed.\n const virtualError = new Error();\n\n const { method, url } = parseFetchArgs(args);\n const handlerData = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: timestampInSeconds() * 1000,\n // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation\n virtualError,\n };\n\n // if there is no callback, fetch is instrumented directly\n if (!onFetchResolved) {\n triggerHandlers('fetch', {\n ...handlerData,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n async (response) => {\n if (onFetchResolved) {\n onFetchResolved(response);\n } else {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1000,\n response,\n });\n }\n\n return response;\n },\n (error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1000,\n error,\n });\n\n if (isError(error) && error.stack === undefined) {\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your fetch call did not\n // have a stack trace, so the SDK backfilled the stack trace so\n // you can see which fetch call failed.\n error.stack = virtualError.stack;\n addNonEnumerableProperty(error, 'framesToPop', 1);\n }\n\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\nasync function resolveResponse(res, onFinishedResolving) {\n if (res?.body) {\n const body = res.body;\n const responseReader = body.getReader();\n\n // Define a maximum duration after which we just cancel\n const maxFetchDurationTimeout = setTimeout(\n () => {\n body.cancel().then(null, () => {\n // noop\n });\n },\n 90 * 1000, // 90s\n );\n\n let readingActive = true;\n while (readingActive) {\n let chunkTimeout;\n try {\n // abort reading if read op takes more than 5s\n chunkTimeout = setTimeout(() => {\n body.cancel().then(null, () => {\n // noop on error\n });\n }, 5000);\n\n // This .read() call will reject/throw when we abort due to timeouts through `body.cancel()`\n const { done } = await responseReader.read();\n\n clearTimeout(chunkTimeout);\n\n if (done) {\n onFinishedResolving();\n readingActive = false;\n }\n } catch (error) {\n readingActive = false;\n } finally {\n clearTimeout(chunkTimeout);\n }\n }\n\n clearTimeout(maxFetchDurationTimeout);\n\n responseReader.releaseLock();\n body.cancel().then(null, () => {\n // noop on error\n });\n }\n}\n\nfunction streamHandler(response) {\n // clone response for awaiting stream\n let clonedResponseForResolving;\n try {\n clonedResponseForResolving = response.clone();\n } catch {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n resolveResponse(clonedResponseForResolving, () => {\n triggerHandlers('fetch-body-resolved', {\n endTimestamp: timestampInSeconds() * 1000,\n response,\n });\n });\n}\n\nfunction hasProp(obj, prop) {\n return !!obj && typeof obj === 'object' && !!(obj )[prop];\n}\n\nfunction getUrlFromResource(resource) {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request.\n * Exported for tests only.\n */\nfunction parseFetchArgs(fetchArgs) {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs ;\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg ),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n\nexport { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, parseFetchArgs };\n//# sourceMappingURL=fetch.js.map\n","function getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar browser = {exports: {}};\n\n// shim for using process in browser\nvar process = browser.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ());\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] };\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\nvar browserExports = browser.exports;\nconst process$1 = /*@__PURE__*/getDefaultExportFromCjs(browserExports);\n\nexport { process$1 as default, process$1 as process };\n//# sourceMappingURL=index.js.map\n","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nfunction isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nfunction getSDKSource() {\n // This comment is used to identify this line in the CDN bundle build step and replace this with \"return 'cdn';\"\n /* __SENTRY_SDK_SOURCE__ */ return 'npm';\n}\n\nexport { getSDKSource, isBrowserBundle };\n//# sourceMappingURL=env.js.map\n","import { isBrowserBundle } from './env.js';\n\n/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nfunction isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @param existingModule module to use for requiring\n * @returns possibly required module\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction loadModule(moduleName, existingModule = module) {\n let mod;\n\n try {\n mod = dynamicRequire(existingModule, moduleName);\n } catch (e) {\n // no-empty\n }\n\n if (!mod) {\n try {\n const { cwd } = dynamicRequire(existingModule, 'process');\n mod = dynamicRequire(existingModule, `${cwd()}/node_modules/${moduleName}`) ;\n } catch (e) {\n // no-empty\n }\n }\n\n return mod;\n}\n\nexport { isNodeEnv, loadModule };\n//# sourceMappingURL=node.js.map\n","import { isNodeEnv } from './node.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * Returns true if we are in the browser.\n */\nfunction isBrowser() {\n // eslint-disable-next-line no-restricted-globals\n return typeof window !== 'undefined' && (!isNodeEnv() || isElectronNodeRenderer());\n}\n\n// Electron renderers with nodeIntegration enabled are detected as Node.js so we specifically test for them\nfunction isElectronNodeRenderer() {\n const process = (GLOBAL_OBJ ).process;\n return process?.type === 'renderer';\n}\n\nexport { isBrowser };\n//# sourceMappingURL=isBrowser.js.map\n","import { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, withScope, addExceptionTypeValue, addExceptionMechanism, captureException } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nlet ignoreOnError = 0;\n\n/**\n * @hidden\n */\nfunction shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nfunction ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nfunction wrap(\n fn,\n options\n\n = {},\n) {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n function isFunction(fn) {\n return typeof fn === 'function';\n }\n\n if (!isFunction(fn)) {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = (fn ).__sentry_wrapped__;\n if (wrapper) {\n if (typeof wrapper === 'function') {\n return wrapper;\n } else {\n // If we find that the `__sentry_wrapped__` function is not a function at the time of accessing it, it means\n // that something messed with it. In that case we want to return the originally passed function.\n return fn;\n }\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n // Wrap the function itself\n // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n const sentryWrapped = function ( ...args) {\n try {\n // Also wrap arguments that are themselves functions\n const wrappedArguments = args.map(arg => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope(scope => {\n scope.addEventProcessor(event => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n } ;\n\n // Wrap the wrapped function in a proxy, to ensure any other properties of the original function remain available\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property ] = fn[property ];\n }\n }\n } catch {\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n }\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get() {\n return fn.name;\n },\n });\n }\n } catch {\n // This may throw if e.g. the descriptor does not exist, or a browser does not allow redefining `name`.\n // to save some bytes we simply try-catch this\n }\n\n return sentryWrapped;\n}\n\nexport { WINDOW, ignoreNextOnError, shouldIgnoreOnError, wrap };\n//# sourceMappingURL=helpers.js.map\n","import { addExceptionMechanism, resolvedSyncPromise, isErrorEvent, isDOMError, isDOMException, addExceptionTypeValue, isError, isPlainObject, isEvent, isParameterizedString, getClient, normalizeToSize, extractExceptionKeysForMessage } from '@sentry/core';\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nfunction exceptionFromError(stackParser, ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n\n const exception = {\n type: extractType(ex),\n value: extractMessage(ex),\n };\n\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\nfunction eventFromPlainObject(\n stackParser,\n exception,\n syntheticException,\n isUnhandledRejection,\n) {\n const client = getClient();\n const normalizeDepth = client?.getOptions().normalizeDepth;\n\n // If we can, we extract an exception from the object properties\n const errorFromProp = getErrorPropertyFromObject(exception);\n\n const extra = {\n __serialized__: normalizeToSize(exception, normalizeDepth),\n };\n\n if (errorFromProp) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, errorFromProp)],\n },\n extra,\n };\n }\n\n const event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n } ,\n ],\n },\n extra,\n } ;\n\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].stacktrace = { frames };\n }\n }\n\n return event;\n}\n\nfunction eventFromError(stackParser, ex) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)],\n },\n };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n stackParser,\n ex,\n) {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || '';\n\n const skipLines = getSkipFirstStackStringLines(ex);\n const framesToPop = getPopFirstTopFrames(ex);\n\n try {\n return stackParser(stacktrace, skipLines, framesToPop);\n } catch (e) {\n // no-empty\n }\n\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/**\n * Certain known React errors contain links that would be falsely\n * parsed as frames. This function check for these errors and\n * returns number of the stack string lines to skip.\n */\nfunction getSkipFirstStackStringLines(ex) {\n if (ex && reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n\n return 0;\n}\n\n/**\n * If error has `framesToPop` property, it means that the\n * creator tells us the first x frames will be useless\n * and should be discarded. Typically error from wrapper function\n * which don't point to the actual location in the developer's code.\n *\n * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46\n */\nfunction getPopFirstTopFrames(ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n\n return 0;\n}\n\n// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception\n// @ts-expect-error - WebAssembly.Exception is a valid class\nfunction isWebAssemblyException(exception) {\n // Check for support\n // @ts-expect-error - WebAssembly.Exception is a valid class\n if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {\n // @ts-expect-error - WebAssembly.Exception is a valid class\n return exception instanceof WebAssembly.Exception;\n } else {\n return false;\n }\n}\n\n/**\n * Extracts from errors what we use as the exception `type` in error events.\n *\n * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.\n */\nfunction extractType(ex) {\n const name = ex?.name;\n\n // The name for WebAssembly.Exception Errors needs to be extracted differently.\n // Context: https://github.com/getsentry/sentry-javascript/issues/13787\n if (!name && isWebAssemblyException(ex)) {\n // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';\n }\n\n return name;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex) {\n const message = ex?.message;\n\n if (isWebAssemblyException(ex)) {\n // For Node 18, Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n if (Array.isArray(ex.message) && ex.message.length == 2) {\n return ex.message[1];\n }\n return 'wasm exception';\n }\n\n if (!message) {\n return 'No error message';\n }\n\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n\n return message;\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nfunction eventFromException(\n stackParser,\n exception,\n hint,\n attachStacktrace,\n) {\n const syntheticException = hint?.syntheticException || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nfunction eventFromMessage(\n stackParser,\n message,\n level = 'info',\n hint,\n attachStacktrace,\n) {\n const syntheticException = hint?.syntheticException || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nfunction eventFromUnknownInput(\n stackParser,\n exception,\n syntheticException,\n attachStacktrace,\n isUnhandledRejection,\n) {\n let event;\n\n if (isErrorEvent(exception ) && (exception ).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception ;\n return eventFromError(stackParser, errorEvent.error );\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception )) {\n const domException = exception ;\n\n if ('stack' in (exception )) {\n event = eventFromError(stackParser, exception );\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception ;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(stackParser, exception , syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\nfunction eventFromString(\n stackParser,\n message,\n syntheticException,\n attachStacktrace,\n) {\n const event = {};\n\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: message, stacktrace: { frames } }],\n };\n }\n addExceptionMechanism(event, { synthetic: true });\n }\n\n if (isParameterizedString(message)) {\n const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__,\n };\n return event;\n }\n\n event.message = message;\n return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n exception,\n { isUnhandledRejection },\n) {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch (e) {\n // ignore errors here\n }\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj) {\n for (const prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n const value = obj[prop];\n if (value instanceof Error) {\n return value;\n }\n }\n }\n\n return undefined;\n}\n\nexport { eventFromException, eventFromMessage, eventFromUnknownInput, exceptionFromError, extractMessage, extractType };\n//# sourceMappingURL=eventbuilder.js.map\n","import { Client, getSDKSource, applySdkMetadata, addAutoIpAddressToUser, addAutoIpAddressToSession } from '@sentry/core';\nimport { eventFromException, eventFromMessage } from './eventbuilder.js';\nimport { WINDOW } from './helpers.js';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/core Options for more information.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nclass BrowserClient extends Client {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n constructor(options) {\n const opts = {\n // We default this to true, as it is the safer scenario\n parentSpanIsAlwaysRootSpan: true,\n ...options,\n };\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n applySdkMetadata(opts, 'browser', ['browser'], sdkSource);\n\n super(opts);\n\n if (opts.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n\n if (this._options.sendDefaultPii) {\n this.on('postprocessEvent', addAutoIpAddressToUser);\n this.on('beforeSendSession', addAutoIpAddressToSession);\n }\n }\n\n /**\n * @inheritDoc\n */\n eventFromException(exception, hint) {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n eventFromMessage(\n message,\n level = 'info',\n hint,\n ) {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n _prepareEvent(\n event,\n hint,\n currentScope,\n isolationScope,\n ) {\n event.platform = event.platform || 'javascript';\n\n return super._prepareEvent(event, hint, currentScope, isolationScope);\n }\n}\n\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","const getRating = (value, thresholds) => {\n if (value > thresholds[1]) {\n return 'poor';\n }\n if (value > thresholds[0]) {\n return 'needs-improvement';\n }\n return 'good';\n};\n\nconst bindReporter = (\n callback,\n metric,\n thresholds,\n reportAllChanges,\n) => {\n let prevValue;\n let delta;\n return (forceReport) => {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue || 0);\n\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n metric.rating = getRating(metric.value, thresholds);\n callback(metric);\n }\n }\n }\n };\n};\n\nexport { bindReporter };\n//# sourceMappingURL=bindReporter.js.map\n","import { GLOBAL_OBJ } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ\n\n;\n\nexport { WINDOW };\n//# sourceMappingURL=types.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nconst generateUniqueID = () => {\n return `v4-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n\nexport { generateUniqueID };\n//# sourceMappingURL=generateUniqueID.js.map\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// sentry-specific change:\n// add optional param to not check for responseStart (see comment below)\nconst getNavigationEntry = (checkResponseStart = true) => {\n const navigationEntry = WINDOW.performance?.getEntriesByType?.('navigation')[0];\n // Check to ensure the `responseStart` property is present and valid.\n // In some cases no value is reported by the browser (for\n // privacy/security reasons), and in other cases (bugs) the value is\n // negative or is larger than the current page time. Ignore these cases:\n // https://github.com/GoogleChrome/web-vitals/issues/137\n // https://github.com/GoogleChrome/web-vitals/issues/162\n // https://github.com/GoogleChrome/web-vitals/issues/275\n if (\n // sentry-specific change:\n // We don't want to check for responseStart for our own use of `getNavigationEntry`\n !checkResponseStart ||\n (navigationEntry && navigationEntry.responseStart > 0 && navigationEntry.responseStart < performance.now())\n ) {\n return navigationEntry;\n }\n};\n\nexport { getNavigationEntry };\n//# sourceMappingURL=getNavigationEntry.js.map\n","import { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nconst getActivationStart = () => {\n const navEntry = getNavigationEntry();\n return navEntry?.activationStart || 0;\n};\n\nexport { getActivationStart };\n//# sourceMappingURL=getActivationStart.js.map\n","import { WINDOW } from '../../../types.js';\nimport { generateUniqueID } from './generateUniqueID.js';\nimport { getActivationStart } from './getActivationStart.js';\nimport { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nconst initMetric = (name, value) => {\n const navEntry = getNavigationEntry();\n let navigationType = 'navigate';\n\n if (navEntry) {\n if (WINDOW.document?.prerendering || getActivationStart() > 0) {\n navigationType = 'prerender';\n } else if (WINDOW.document?.wasDiscarded) {\n navigationType = 'restore';\n } else if (navEntry.type) {\n navigationType = navEntry.type.replace(/_/g, '-') ;\n }\n }\n\n // Use `entries` type specific for the metric.\n const entries = [];\n\n return {\n name,\n value: typeof value === 'undefined' ? -1 : value,\n rating: 'good' , // If needed, will be updated when reported. `const` to keep the type from widening to `string`.\n delta: 0,\n entries,\n id: generateUniqueID(),\n navigationType,\n };\n};\n\nexport { initMetric };\n//# sourceMappingURL=initMetric.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nconst observe = (\n type,\n callback,\n opts,\n) => {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n const po = new PerformanceObserver(list => {\n // Delay by a microtask to workaround a bug in Safari where the\n // callback is invoked immediately, rather than in a separate task.\n // See: https://github.com/GoogleChrome/web-vitals/issues/277\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n Promise.resolve().then(() => {\n callback(list.getEntries() );\n });\n });\n po.observe(\n Object.assign(\n {\n type,\n buffered: true,\n },\n opts || {},\n ) ,\n );\n return po;\n }\n } catch (e) {\n // Do nothing.\n }\n return;\n};\n\nexport { observe };\n//# sourceMappingURL=observe.js.map\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// Sentry-specific change:\n// This function's logic was NOT updated to web-vitals 4.2.4 but we continue\n// to use the web-vitals 3.5.2 due to us having stricter browser support.\n// PR with context that made the changes: https://github.com/GoogleChrome/web-vitals/pull/442/files#r1530492402\n// The PR removed listening to the `pagehide` event, in favour of only listening to `visibilitychange` event.\n// This is \"more correct\" but some browsers we still support (Safari 12.1-14.0) don't fully support `visibilitychange`\n// or have known bugs w.r.t the `visibilitychange` event.\n// TODO (v9): If we decide to drop support for Safari 12.1-14.0, we can use the logic from web-vitals 4.2.4\n// In this case, we also need to update the integration tests that currently trigger the `pagehide` event to\n// simulate the page being hidden.\nconst onHidden = (cb) => {\n const onHiddenOrPageHide = (event) => {\n if (event.type === 'pagehide' || WINDOW.document?.visibilityState === 'hidden') {\n cb(event);\n }\n };\n\n if (WINDOW.document) {\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n }\n};\n\nexport { onHidden };\n//# sourceMappingURL=onHidden.js.map\n","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst runOnce = (cb) => {\n let called = false;\n return () => {\n if (!called) {\n cb();\n called = true;\n }\n };\n};\n\nexport { runOnce };\n//# sourceMappingURL=runOnce.js.map\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nlet firstHiddenTime = -1;\n\nconst initHiddenTime = () => {\n // If the document is hidden when this code runs, assume it was always\n // hidden and the page was loaded in the background, with the one exception\n // that visibility state is always 'hidden' during prerendering, so we have\n // to ignore that case until prerendering finishes (see: `prerenderingchange`\n // event logic below).\n return WINDOW.document.visibilityState === 'hidden' && !WINDOW.document.prerendering ? 0 : Infinity;\n};\n\nconst onVisibilityUpdate = (event) => {\n // If the document is 'hidden' and no previous hidden timestamp has been\n // set, update it based on the current event data.\n if (WINDOW.document.visibilityState === 'hidden' && firstHiddenTime > -1) {\n // If the event is a 'visibilitychange' event, it means the page was\n // visible prior to this change, so the event timestamp is the first\n // hidden time.\n // However, if the event is not a 'visibilitychange' event, then it must\n // be a 'prerenderingchange' event, and the fact that the document is\n // still 'hidden' from the above check means the tab was activated\n // in a background state and so has always been hidden.\n firstHiddenTime = event.type === 'visibilitychange' ? event.timeStamp : 0;\n\n // Remove all listeners now that a `firstHiddenTime` value has been set.\n removeChangeListeners();\n }\n};\n\nconst addChangeListeners = () => {\n addEventListener('visibilitychange', onVisibilityUpdate, true);\n // IMPORTANT: when a page is prerendering, its `visibilityState` is\n // 'hidden', so in order to account for cases where this module checks for\n // visibility during prerendering, an additional check after prerendering\n // completes is also required.\n addEventListener('prerenderingchange', onVisibilityUpdate, true);\n};\n\nconst removeChangeListeners = () => {\n removeEventListener('visibilitychange', onVisibilityUpdate, true);\n removeEventListener('prerenderingchange', onVisibilityUpdate, true);\n};\n\nconst getVisibilityWatcher = () => {\n if (WINDOW.document && firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = initHiddenTime();\n addChangeListeners();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n\nexport { getVisibilityWatcher };\n//# sourceMappingURL=getVisibilityWatcher.js.map\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nconst whenActivated = (callback) => {\n if (WINDOW.document?.prerendering) {\n addEventListener('prerenderingchange', () => callback(), true);\n } else {\n callback();\n }\n};\n\nexport { whenActivated };\n//# sourceMappingURL=whenActivated.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { whenActivated } from './lib/whenActivated.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */\nconst FCPThresholds = [1800, 3000];\n\n/**\n * Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `paint` performance entry used to determine the value. The reported\n * value is a `DOMHighResTimeStamp`.\n */\nconst onFCP = (onReport, opts = {}) => {\n whenActivated(() => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FCP');\n let report;\n\n const handleEntries = (entries) => {\n entries.forEach(entry => {\n if (entry.name === 'first-contentful-paint') {\n po.disconnect();\n\n // Only report if the page wasn't hidden prior to the first paint.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n // The activationStart reference is used because FCP should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the FCP, this time should be clamped at 0.\n metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n metric.entries.push(entry);\n report(true);\n }\n }\n });\n };\n\n const po = observe('paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n }\n });\n};\n\nexport { FCPThresholds, onFCP };\n//# sourceMappingURL=onFCP.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { onFCP } from './onFCP.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */\nconst CLSThresholds = [0.1, 0.25];\n\n/**\n * Calculates the [CLS](https://web.dev/articles/cls) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/articles/cls#layout_shift_score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onCLS = (onReport, opts = {}) => {\n // Start monitoring FCP so we can only report CLS if FCP is also reported.\n // Note: this is done to match the current behavior of CrUX.\n onFCP(\n runOnce(() => {\n const metric = initMetric('CLS', 0);\n let report;\n\n let sessionValue = 0;\n let sessionEntries = [];\n\n const handleEntries = (entries) => {\n entries.forEach(entry => {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n const firstSessionEntry = sessionEntries[0];\n const lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n\n // If the entry occurred less than 1 second after the previous entry\n // and less than 5 seconds after the first entry in the session,\n // include the entry in the current session. Otherwise, start a new\n // session.\n if (\n sessionValue &&\n firstSessionEntry &&\n lastSessionEntry &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000\n ) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n } else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n }\n });\n\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n report();\n }\n };\n\n const po = observe('layout-shift', handleEntries);\n if (po) {\n report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);\n\n onHidden(() => {\n handleEntries(po.takeRecords() );\n report(true);\n });\n\n // Queue a task to report (if nothing else triggers a report first).\n // This allows CLS to be reported as soon as FCP fires when\n // `reportAllChanges` is true.\n setTimeout(report, 0);\n }\n }),\n );\n};\n\nexport { CLSThresholds, onCLS };\n//# sourceMappingURL=getCLS.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { whenActivated } from './lib/whenActivated.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for FID. See https://web.dev/articles/fid#what_is_a_good_fid_score */\nconst FIDThresholds = [100, 300];\n\n/**\n * Calculates the [FID](https://web.dev/articles/fid) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `first-input` performance entry used to determine the value. The\n * reported value is a `DOMHighResTimeStamp`.\n *\n * _**Important:** since FID is only reported after the user interacts with the\n * page, it's possible that it will not be reported for some page loads._\n */\nconst onFID = (onReport, opts = {}) => {\n whenActivated(() => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FID');\n // eslint-disable-next-line prefer-const\n let report;\n\n const handleEntry = (entry) => {\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n\n const handleEntries = (entries) => {\n (entries ).forEach(handleEntry);\n };\n\n const po = observe('first-input', handleEntries);\n\n report = bindReporter(onReport, metric, FIDThresholds, opts.reportAllChanges);\n\n if (po) {\n onHidden(\n runOnce(() => {\n handleEntries(po.takeRecords() );\n po.disconnect();\n }),\n );\n }\n });\n};\n\nexport { FIDThresholds, onFID };\n//# sourceMappingURL=getFID.js.map\n","import { observe } from '../observe.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\n\nconst updateEstimate = (entries) => {\n entries.forEach(e => {\n if (e.interactionId) {\n minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);\n maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);\n\n interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;\n }\n });\n};\n\nlet po;\n\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nconst getInteractionCount = () => {\n return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\n\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\nconst initInteractionCountPolyfill = () => {\n if ('interactionCount' in performance || po) return;\n\n po = observe('event', updateEstimate, {\n type: 'event',\n buffered: true,\n durationThreshold: 0,\n } );\n};\n\nexport { getInteractionCount, initInteractionCountPolyfill };\n//# sourceMappingURL=interactionCountPolyfill.js.map\n","import { getInteractionCount } from './polyfills/interactionCountPolyfill.js';\n\n/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// A list of longest interactions on the page (by latency) sorted so the\n// longest one is first. The list is at most MAX_INTERACTIONS_TO_CONSIDER long.\nconst longestInteractionList = [];\n\n// A mapping of longest interactions by their interaction ID.\n// This is used for faster lookup.\nconst longestInteractionMap = new Map();\n\n// The default `durationThreshold` used across this library for observing\n// `event` entries via PerformanceObserver.\nconst DEFAULT_DURATION_THRESHOLD = 40;\n\n// Used to store the interaction count after a bfcache restore, since p98\n// interaction latencies should only consider the current navigation.\nlet prevInteractionCount = 0;\n\n/**\n * Returns the interaction count since the last bfcache restore (or for the\n * full page lifecycle if there were no bfcache restores).\n */\nconst getInteractionCountForNavigation = () => {\n return getInteractionCount() - prevInteractionCount;\n};\n\n/**\n * Returns the estimated p98 longest interaction based on the stored\n * interaction candidates and the interaction count for the current page.\n */\nconst estimateP98LongestInteraction = () => {\n const candidateInteractionIndex = Math.min(\n longestInteractionList.length - 1,\n Math.floor(getInteractionCountForNavigation() / 50),\n );\n\n return longestInteractionList[candidateInteractionIndex];\n};\n\n// To prevent unnecessary memory usage on pages with lots of interactions,\n// store at most 10 of the longest interactions to consider as INP candidates.\nconst MAX_INTERACTIONS_TO_CONSIDER = 10;\n\n/**\n * A list of callback functions to run before each entry is processed.\n * Exposing this list allows the attribution build to hook into the\n * entry processing pipeline.\n */\nconst entryPreProcessingCallbacks = [];\n\n/**\n * Takes a performance entry and adds it to the list of worst interactions\n * if its duration is long enough to make it among the worst. If the\n * entry is part of an existing interaction, it is merged and the latency\n * and entries list is updated as needed.\n */\nconst processInteractionEntry = (entry) => {\n entryPreProcessingCallbacks.forEach(cb => cb(entry));\n\n // Skip further processing for entries that cannot be INP candidates.\n if (!(entry.interactionId || entry.entryType === 'first-input')) return;\n\n // The least-long of the 10 longest interactions.\n const minLongestInteraction = longestInteractionList[longestInteractionList.length - 1];\n\n const existingInteraction = longestInteractionMap.get(entry.interactionId);\n\n // Only process the entry if it's possibly one of the ten longest,\n // or if it's part of an existing interaction.\n if (\n existingInteraction ||\n longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER ||\n (minLongestInteraction && entry.duration > minLongestInteraction.latency)\n ) {\n // If the interaction already exists, update it. Otherwise create one.\n if (existingInteraction) {\n // If the new entry has a longer duration, replace the old entries,\n // otherwise add to the array.\n if (entry.duration > existingInteraction.latency) {\n existingInteraction.entries = [entry];\n existingInteraction.latency = entry.duration;\n } else if (\n entry.duration === existingInteraction.latency &&\n entry.startTime === existingInteraction.entries[0]?.startTime\n ) {\n existingInteraction.entries.push(entry);\n }\n } else {\n const interaction = {\n id: entry.interactionId,\n latency: entry.duration,\n entries: [entry],\n };\n longestInteractionMap.set(interaction.id, interaction);\n longestInteractionList.push(interaction);\n }\n\n // Sort the entries by latency (descending) and keep only the top ten.\n longestInteractionList.sort((a, b) => b.latency - a.latency);\n if (longestInteractionList.length > MAX_INTERACTIONS_TO_CONSIDER) {\n longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER).forEach(i => longestInteractionMap.delete(i.id));\n }\n }\n};\n\nexport { DEFAULT_DURATION_THRESHOLD, entryPreProcessingCallbacks, estimateP98LongestInteraction, longestInteractionList, longestInteractionMap, processInteractionEntry };\n//# sourceMappingURL=interactions.js.map\n","import { WINDOW } from '../../../types.js';\nimport { onHidden } from './onHidden.js';\nimport { runOnce } from './runOnce.js';\n\n/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * Runs the passed callback during the next idle period, or immediately\n * if the browser's visibility state is (or becomes) hidden.\n */\nconst whenIdle = (cb) => {\n const rIC = WINDOW.requestIdleCallback || WINDOW.setTimeout;\n\n let handle = -1;\n // eslint-disable-next-line no-param-reassign\n cb = runOnce(cb) ;\n // If the document is hidden, run the callback immediately, otherwise\n // race an idle callback with the next `visibilitychange` event.\n if (WINDOW.document?.visibilityState === 'hidden') {\n cb();\n } else {\n handle = rIC(cb);\n onHidden(cb);\n }\n return handle;\n};\n\nexport { whenIdle };\n//# sourceMappingURL=whenIdle.js.map\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { DEFAULT_DURATION_THRESHOLD, processInteractionEntry, estimateP98LongestInteraction } from './lib/interactions.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { initInteractionCountPolyfill } from './lib/polyfills/interactionCountPolyfill.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { whenIdle } from './lib/whenIdle.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */\nconst INPThresholds = [200, 500];\n\n/**\n * Calculates the [INP](https://web.dev/articles/inp) value for the current\n * page and calls the `callback` function once the value is ready, along with\n * the `event` performance entries reported for that interaction. The reported\n * value is a `DOMHighResTimeStamp`.\n *\n * A custom `durationThreshold` configuration option can optionally be passed to\n * control what `event-timing` entries are considered for INP reporting. The\n * default threshold is `40`, which means INP scores of less than 40 are\n * reported as 0. Note that this will not affect your 75th percentile INP value\n * unless that value is also less than 40 (well below the recommended\n * [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** INP should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onINP = (onReport, opts = {}) => {\n // Return if the browser doesn't support all APIs needed to measure INP.\n if (!('PerformanceEventTiming' in WINDOW && 'interactionId' in PerformanceEventTiming.prototype)) {\n return;\n }\n\n whenActivated(() => {\n // TODO(philipwalton): remove once the polyfill is no longer needed.\n initInteractionCountPolyfill();\n\n const metric = initMetric('INP');\n // eslint-disable-next-line prefer-const\n let report;\n\n const handleEntries = (entries) => {\n // Queue the `handleEntries()` callback in the next idle task.\n // This is needed to increase the chances that all event entries that\n // occurred between the user interaction and the next paint\n // have been dispatched. Note: there is currently an experiment\n // running in Chrome (EventTimingKeypressAndCompositionInteractionId)\n // 123+ that if rolled out fully may make this no longer necessary.\n whenIdle(() => {\n entries.forEach(processInteractionEntry);\n\n const inp = estimateP98LongestInteraction();\n\n if (inp && inp.latency !== metric.value) {\n metric.value = inp.latency;\n metric.entries = inp.entries;\n report();\n }\n });\n };\n\n const po = observe('event', handleEntries, {\n // Event Timing entries have their durations rounded to the nearest 8ms,\n // so a duration of 40ms would be any event that spans 2.5 or more frames\n // at 60Hz. This threshold is chosen to strike a balance between usefulness\n // and performance. Running this callback for any interaction that spans\n // just one or two frames is likely not worth the insight that could be\n // gained.\n durationThreshold: opts.durationThreshold != null ? opts.durationThreshold : DEFAULT_DURATION_THRESHOLD,\n });\n\n report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges);\n\n if (po) {\n // Also observe entries of type `first-input`. This is useful in cases\n // where the first interaction is less than the `durationThreshold`.\n po.observe({ type: 'first-input', buffered: true });\n\n onHidden(() => {\n handleEntries(po.takeRecords() );\n report(true);\n });\n }\n });\n};\n\nexport { INPThresholds, onINP };\n//# sourceMappingURL=getINP.js.map\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { whenIdle } from './lib/whenIdle.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */\nconst LCPThresholds = [2500, 4000];\n\nconst reportedMetricIDs = {};\n\n/**\n * Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called any time a new `largest-contentful-paint`\n * performance entry is dispatched, or once the final value of the metric has\n * been determined.\n */\nconst onLCP = (onReport, opts = {}) => {\n whenActivated(() => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('LCP');\n let report;\n\n const handleEntries = (entries) => {\n // If reportAllChanges is set then call this function for each entry,\n // otherwise only consider the last one.\n if (!opts.reportAllChanges) {\n // eslint-disable-next-line no-param-reassign\n entries = entries.slice(-1);\n }\n\n entries.forEach(entry => {\n // Only report if the page wasn't hidden prior to LCP.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n // The startTime attribute returns the value of the renderTime if it is\n // not 0, and the value of the loadTime otherwise. The activationStart\n // reference is used because LCP should be relative to page activation\n // rather than navigation start if the page was pre-rendered. But in cases\n // where `activationStart` occurs after the LCP, this time should be\n // clamped at 0.\n metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n metric.entries = [entry];\n report();\n }\n });\n };\n\n const po = observe('largest-contentful-paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);\n\n const stopListening = runOnce(() => {\n if (!reportedMetricIDs[metric.id]) {\n handleEntries(po.takeRecords() );\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n });\n\n // Stop listening after input. Note: while scrolling is an input that\n // stops LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(type => {\n // Wrap in a setTimeout so the callback is run in a separate task\n // to avoid extending the keyboard/click handler to reduce INP impact\n // https://github.com/GoogleChrome/web-vitals/issues/383\n if (WINDOW.document) {\n addEventListener(type, () => whenIdle(stopListening ), {\n once: true,\n capture: true,\n });\n }\n });\n\n onHidden(stopListening);\n }\n });\n};\n\nexport { LCPThresholds, onLCP };\n//# sourceMappingURL=getLCP.js.map\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getNavigationEntry } from './lib/getNavigationEntry.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { whenActivated } from './lib/whenActivated.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */\nconst TTFBThresholds = [800, 1800];\n\n/**\n * Runs in the next task after the page is done loading and/or prerendering.\n * @param callback\n */\nconst whenReady = (callback) => {\n if (WINDOW.document?.prerendering) {\n whenActivated(() => whenReady(callback));\n } else if (WINDOW.document?.readyState !== 'complete') {\n addEventListener('load', () => whenReady(callback), true);\n } else {\n // Queue a task so the callback runs after `loadEventEnd`.\n setTimeout(callback, 0);\n }\n};\n\n/**\n * Calculates the [TTFB](https://web.dev/articles/ttfb) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\nconst onTTFB = (onReport, opts = {}) => {\n const metric = initMetric('TTFB');\n const report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);\n\n whenReady(() => {\n const navigationEntry = getNavigationEntry();\n\n if (navigationEntry) {\n // The activationStart reference is used because TTFB should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the first byte is received, this time should be clamped at 0.\n metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0);\n\n metric.entries = [navigationEntry];\n report(true);\n }\n });\n};\n\nexport { TTFBThresholds, onTTFB };\n//# sourceMappingURL=onTTFB.js.map\n","import { logger, getFunctionName } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { onCLS } from './web-vitals/getCLS.js';\nimport { onFID } from './web-vitals/getFID.js';\nimport { onINP } from './web-vitals/getINP.js';\nimport { onLCP } from './web-vitals/getLCP.js';\nimport { observe } from './web-vitals/lib/observe.js';\nimport { onTTFB } from './web-vitals/onTTFB.js';\n\nconst handlers = {};\nconst instrumented = {};\n\nlet _previousCls;\nlet _previousFid;\nlet _previousLcp;\nlet _previousTtfb;\nlet _previousInp;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for CLS when the cleanup callback is called.\n * This will lead to the CLS being finalized and frozen.\n */\nfunction addClsInstrumentationHandler(\n callback,\n stopOnCallback = false,\n) {\n return addMetricObserver('cls', callback, instrumentCls, _previousCls, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for LCP when the cleanup callback is called.\n * This will lead to the LCP being finalized and frozen.\n */\nfunction addLcpInstrumentationHandler(\n callback,\n stopOnCallback = false,\n) {\n return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addFidInstrumentationHandler(callback) {\n return addMetricObserver('fid', callback, instrumentFid, _previousFid);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n */\nfunction addTtfbInstrumentationHandler(callback) {\n return addMetricObserver('ttfb', callback, instrumentTtfb, _previousTtfb);\n}\n\n/**\n * Add a callback that will be triggered when a INP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addInpInstrumentationHandler(\n callback,\n) {\n return addMetricObserver('inp', callback, instrumentInp, _previousInp);\n}\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addPerformanceInstrumentationHandler(\n type,\n callback,\n) {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentPerformanceObserver(type);\n instrumented[type] = true;\n }\n\n return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers?.length) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nfunction instrumentCls() {\n return onCLS(\n metric => {\n triggerHandlers('cls', {\n metric,\n });\n _previousCls = metric;\n },\n // We want the callback to be called whenever the CLS value updates.\n // By default, the callback is only called when the tab goes to the background.\n { reportAllChanges: true },\n );\n}\n\nfunction instrumentFid() {\n return onFID(metric => {\n triggerHandlers('fid', {\n metric,\n });\n _previousFid = metric;\n });\n}\n\nfunction instrumentLcp() {\n return onLCP(\n metric => {\n triggerHandlers('lcp', {\n metric,\n });\n _previousLcp = metric;\n },\n // We want the callback to be called whenever the LCP value updates.\n // By default, the callback is only called when the tab goes to the background.\n { reportAllChanges: true },\n );\n}\n\nfunction instrumentTtfb() {\n return onTTFB(metric => {\n triggerHandlers('ttfb', {\n metric,\n });\n _previousTtfb = metric;\n });\n}\n\nfunction instrumentInp() {\n return onINP(metric => {\n triggerHandlers('inp', {\n metric,\n });\n _previousInp = metric;\n });\n}\n\nfunction addMetricObserver(\n type,\n callback,\n instrumentFn,\n previousValue,\n stopOnCallback = false,\n) {\n addHandler(type, callback);\n\n let stopListening;\n\n if (!instrumented[type]) {\n stopListening = instrumentFn();\n instrumented[type] = true;\n }\n\n if (previousValue) {\n callback({ metric: previousValue });\n }\n\n return getCleanupCallback(type, callback, stopOnCallback ? stopListening : undefined);\n}\n\nfunction instrumentPerformanceObserver(type) {\n const options = {};\n\n // Special per-type options we want to use\n if (type === 'event') {\n options.durationThreshold = 0;\n }\n\n observe(\n type,\n entries => {\n triggerHandlers(type, { entries });\n },\n options,\n );\n}\n\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(\n type,\n callback,\n stopListening,\n) {\n return () => {\n if (stopListening) {\n stopListening();\n }\n\n const typeHandlers = handlers[type];\n\n if (!typeHandlers) {\n return;\n }\n\n const index = typeHandlers.indexOf(callback);\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n };\n}\n\n/**\n * Check if a PerformanceEntry is a PerformanceEventTiming by checking for the `duration` property.\n */\nfunction isPerformanceEventTiming(entry) {\n return 'duration' in entry;\n}\n\nexport { addClsInstrumentationHandler, addFidInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler, addPerformanceInstrumentationHandler, addTtfbInstrumentationHandler, isPerformanceEventTiming };\n//# sourceMappingURL=instrument.js.map\n","import { spanToJSON, withActiveSpan, startInactiveSpan, getClient, getCurrentScope } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\n/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nfunction startAndEndSpan(\n parentSpan,\n startTimeInSeconds,\n endTime,\n { ...ctx },\n) {\n const parentStartTime = spanToJSON(parentSpan).start_timestamp;\n if (parentStartTime && parentStartTime > startTimeInSeconds) {\n // We can only do this for SentrySpans...\n if (typeof (parentSpan ).updateStartTime === 'function') {\n (parentSpan ).updateStartTime(startTimeInSeconds);\n }\n }\n\n // The return value only exists for tests\n return withActiveSpan(parentSpan, () => {\n const span = startInactiveSpan({\n startTime: startTimeInSeconds,\n ...ctx,\n });\n\n if (span) {\n span.end(endTime);\n }\n\n return span;\n });\n}\n\n/**\n * Starts an inactive, standalone span used to send web vital values to Sentry.\n * DO NOT use this for arbitrary spans, as these spans require special handling\n * during ingestion to extract metrics.\n *\n * This function adds a bunch of attributes and data to the span that's shared\n * by all web vital standalone spans. However, you need to take care of adding\n * the actual web vital value as an event to the span. Also, you need to assign\n * a transaction name and some other values that are specific to the web vital.\n *\n * Ultimately, you also need to take care of ending the span to send it off.\n *\n * @param options\n *\n * @returns an inactive, standalone and NOT YET ended span\n */\nfunction startStandaloneWebVitalSpan(options) {\n const client = getClient();\n if (!client) {\n return;\n }\n\n const { name, transaction, attributes: passedAttributes, startTime } = options;\n\n const { release, environment, sendDefaultPii } = client.getOptions();\n // We need to get the replay, user, and activeTransaction from the current scope\n // so that we can associate replay id, profile id, and a user display to the span\n const replay = client.getIntegrationByName('Replay');\n const replayId = replay?.getReplayId();\n\n const scope = getCurrentScope();\n\n const user = scope.getUser();\n const userDisplay = user !== undefined ? user.email || user.id || user.ip_address : undefined;\n\n let profileId;\n try {\n // @ts-expect-error skip optional chaining to save bundle size with try catch\n profileId = scope.getScopeData().contexts.profile.profile_id;\n } catch {\n // do nothing\n }\n\n const attributes = {\n release,\n environment,\n\n user: userDisplay || undefined,\n profile_id: profileId || undefined,\n replay_id: replayId || undefined,\n\n transaction,\n\n // Web vital score calculation relies on the user agent to account for different\n // browsers setting different thresholds for what is considered a good/meh/bad value.\n // For example: Chrome vs. Chrome Mobile\n 'user_agent.original': WINDOW.navigator?.userAgent,\n\n // This tells Sentry to infer the IP address from the request\n 'client.address': sendDefaultPii ? '{{auto}}' : undefined,\n\n ...passedAttributes,\n };\n\n return startInactiveSpan({\n name,\n attributes,\n startTime,\n experimental: {\n standalone: true,\n },\n });\n}\n\n/** Get the browser performance API. */\nfunction getBrowserPerformanceAPI() {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n return WINDOW.addEventListener && WINDOW.performance;\n}\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nfunction msToSec(time) {\n return time / 1000;\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nfunction extractNetworkProtocol(nextHopProtocol) {\n let name = 'unknown';\n let version = 'unknown';\n let _name = '';\n for (const char of nextHopProtocol) {\n // http/1.1 etc.\n if (char === '/') {\n [name, version] = nextHopProtocol.split('/') ;\n break;\n }\n // h2, h3 etc.\n if (!isNaN(Number(char))) {\n name = _name === 'h' ? 'http' : _name;\n version = nextHopProtocol.split(_name)[1] ;\n break;\n }\n _name += char;\n }\n if (_name === nextHopProtocol) {\n // webrtc, ftp, etc.\n name = _name;\n }\n return { name, version };\n}\n\nexport { extractNetworkProtocol, getBrowserPerformanceAPI, isMeasurementValue, msToSec, startAndEndSpan, startStandaloneWebVitalSpan };\n//# sourceMappingURL=utils.js.map\n","import { getClient, getActiveSpan, getRootSpan, spanToJSON, logger, browserPerformanceTimeOrigin, getCurrentScope, htmlTreeAsString, dropUndefinedKeys, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { addClsInstrumentationHandler } from './instrument.js';\nimport { msToSec, startStandaloneWebVitalSpan } from './utils.js';\nimport { onHidden } from './web-vitals/lib/onHidden.js';\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value once\n *\n * - the page visibility is hidden\n * - a navigation span is started (to stop CLS measurement for SPA soft navigations)\n *\n * Once either of these events triggers, the CLS value is sent as a standalone span and we stop\n * measuring CLS.\n */\nfunction trackClsAsStandaloneSpan() {\n let standaloneCLsValue = 0;\n let standaloneClsEntry;\n let pageloadSpanId;\n\n if (!supportsLayoutShift()) {\n return;\n }\n\n let sentSpan = false;\n function _collectClsOnce() {\n if (sentSpan) {\n return;\n }\n sentSpan = true;\n if (pageloadSpanId) {\n sendStandaloneClsSpan(standaloneCLsValue, standaloneClsEntry, pageloadSpanId);\n }\n cleanupClsHandler();\n }\n\n const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1] ;\n if (!entry) {\n return;\n }\n standaloneCLsValue = metric.value;\n standaloneClsEntry = entry;\n }, true);\n\n // use pagehide event from web-vitals\n onHidden(() => {\n _collectClsOnce();\n });\n\n // Since the call chain of this function is synchronous and evaluates before the SDK client is created,\n // we need to wait with subscribing to a client hook until the client is created. Therefore, we defer\n // to the next tick after the SDK setup.\n setTimeout(() => {\n const client = getClient();\n\n if (!client) {\n return;\n }\n\n const unsubscribeStartNavigation = client.on('startNavigationSpan', () => {\n _collectClsOnce();\n unsubscribeStartNavigation?.();\n });\n\n const activeSpan = getActiveSpan();\n if (activeSpan) {\n const rootSpan = getRootSpan(activeSpan);\n const spanJSON = spanToJSON(rootSpan);\n if (spanJSON.op === 'pageload') {\n pageloadSpanId = rootSpan.spanContext().spanId;\n }\n }\n }, 0);\n}\n\nfunction sendStandaloneClsSpan(clsValue, entry, pageloadSpanId) {\n DEBUG_BUILD && logger.log(`Sending CLS span (${clsValue})`);\n\n const startTime = msToSec((browserPerformanceTimeOrigin() || 0) + (entry?.startTime || 0));\n const routeName = getCurrentScope().getScopeData().transactionName;\n\n const name = entry ? htmlTreeAsString(entry.sources[0]?.node) : 'Layout shift';\n\n const attributes = dropUndefinedKeys({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.cls',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.webvital.cls',\n [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry?.duration || 0,\n // attach the pageload span id to the CLS span so that we can link them in the UI\n 'sentry.pageload.span_id': pageloadSpanId,\n });\n\n const span = startStandaloneWebVitalSpan({\n name,\n transaction: routeName,\n attributes,\n startTime,\n });\n\n if (span) {\n span.addEvent('cls', {\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: '',\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: clsValue,\n });\n\n // LayoutShift performance entries always have a duration of 0, so we don't need to add `entry.duration` here\n // see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/duration\n span.end(startTime);\n }\n}\n\nfunction supportsLayoutShift() {\n try {\n return PerformanceObserver.supportedEntryTypes.includes('layout-shift');\n } catch {\n return false;\n }\n}\n\nexport { trackClsAsStandaloneSpan };\n//# sourceMappingURL=cls.js.map\n","import { browserPerformanceTimeOrigin, getActiveSpan, spanToJSON, setMeasurement, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, parseUrl, htmlTreeAsString, getComponentName } from '@sentry/core';\nimport { WINDOW } from '../types.js';\nimport { trackClsAsStandaloneSpan } from './cls.js';\nimport { addPerformanceInstrumentationHandler, addClsInstrumentationHandler, addLcpInstrumentationHandler, addFidInstrumentationHandler, addTtfbInstrumentationHandler } from './instrument.js';\nimport { getBrowserPerformanceAPI, msToSec, startAndEndSpan, extractNetworkProtocol, isMeasurementValue } from './utils.js';\nimport { getActivationStart } from './web-vitals/lib/getActivationStart.js';\nimport { getNavigationEntry } from './web-vitals/lib/getNavigationEntry.js';\nimport { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher.js';\n\nconst MAX_INT_AS_BYTES = 2147483647;\n\nlet _performanceCursor = 0;\n\nlet _measurements = {};\nlet _lcpEntry;\nlet _clsEntry;\n\n/**\n * Start tracking web vitals.\n * The callback returned by this function can be used to stop tracking & ensure all measurements are final & captured.\n *\n * @returns A function that forces web vitals collection\n */\nfunction startTrackingWebVitals({ recordClsStandaloneSpans }) {\n const performance = getBrowserPerformanceAPI();\n if (performance && browserPerformanceTimeOrigin()) {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n if (performance.mark) {\n WINDOW.performance.mark('sentry-tracing-init');\n }\n const fidCleanupCallback = _trackFID();\n const lcpCleanupCallback = _trackLCP();\n const ttfbCleanupCallback = _trackTtfb();\n const clsCleanupCallback = recordClsStandaloneSpans ? trackClsAsStandaloneSpan() : _trackCLS();\n\n return () => {\n fidCleanupCallback();\n lcpCleanupCallback();\n ttfbCleanupCallback();\n clsCleanupCallback?.();\n };\n }\n\n return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nfunction startTrackingLongTasks() {\n addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n const parent = getActiveSpan();\n if (!parent) {\n return;\n }\n\n const { op: parentOp, start_timestamp: parentStartTimestamp } = spanToJSON(parent);\n\n for (const entry of entries) {\n const startTime = msToSec((browserPerformanceTimeOrigin() ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n // Skip adding a span if the long task started before the navigation started.\n // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n // time, potentially skewing the duration of the actual navigation as reported via our\n // routing instrumentations\n continue;\n }\n\n startAndEndSpan(parent, startTime, startTime + duration, {\n name: 'Main UI thread blocked',\n op: 'ui.long-task',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n }\n });\n}\n\n/**\n * Start tracking long animation frames.\n */\nfunction startTrackingLongAnimationFrames() {\n // NOTE: the current web-vitals version (3.5.2) does not support long-animation-frame, so\n // we directly observe `long-animation-frame` events instead of through the web-vitals\n // `observe` helper function.\n const observer = new PerformanceObserver(list => {\n const parent = getActiveSpan();\n if (!parent) {\n return;\n }\n for (const entry of list.getEntries() ) {\n if (!entry.scripts[0]) {\n continue;\n }\n\n const startTime = msToSec((browserPerformanceTimeOrigin() ) + entry.startTime);\n\n const { start_timestamp: parentStartTimestamp, op: parentOp } = spanToJSON(parent);\n\n if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n // Skip adding the span if the long animation frame started before the navigation started.\n // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n // time, potentially skewing the duration of the actual navigation as reported via our\n // routing instrumentations\n continue;\n }\n const duration = msToSec(entry.duration);\n\n const attributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n };\n\n const initialScript = entry.scripts[0];\n const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript;\n attributes['browser.script.invoker'] = invoker;\n attributes['browser.script.invoker_type'] = invokerType;\n if (sourceURL) {\n attributes['code.filepath'] = sourceURL;\n }\n if (sourceFunctionName) {\n attributes['code.function'] = sourceFunctionName;\n }\n if (sourceCharPosition !== -1) {\n attributes['browser.script.source_char_position'] = sourceCharPosition;\n }\n\n startAndEndSpan(parent, startTime, startTime + duration, {\n name: 'Main UI thread blocked',\n op: 'ui.long-animation-frame',\n attributes,\n });\n }\n });\n\n observer.observe({ type: 'long-animation-frame', buffered: true });\n}\n\n/**\n * Start tracking interaction events.\n */\nfunction startTrackingInteractions() {\n addPerformanceInstrumentationHandler('event', ({ entries }) => {\n const parent = getActiveSpan();\n if (!parent) {\n return;\n }\n for (const entry of entries) {\n if (entry.name === 'click') {\n const startTime = msToSec((browserPerformanceTimeOrigin() ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n const spanOptions = {\n name: htmlTreeAsString(entry.target),\n op: `ui.interaction.${entry.name}`,\n startTime: startTime,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n };\n\n const componentName = getComponentName(entry.target);\n if (componentName) {\n spanOptions.attributes['ui.component_name'] = componentName;\n }\n\n startAndEndSpan(parent, startTime, startTime + duration, spanOptions);\n }\n }\n });\n}\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value and last entry\n * to the `_measurements` object which ultimately is applied to the pageload span's measurements.\n */\nfunction _trackCLS() {\n return addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1] ;\n if (!entry) {\n return;\n }\n _measurements['cls'] = { value: metric.value, unit: '' };\n _clsEntry = entry;\n }, true);\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP() {\n return addLcpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n _lcpEntry = entry ;\n }, true);\n}\n\n/** Starts tracking the First Input Delay on the current page. */\nfunction _trackFID() {\n return addFidInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n const timeOrigin = msToSec(browserPerformanceTimeOrigin() );\n const startTime = msToSec(entry.startTime);\n _measurements['fid'] = { value: metric.value, unit: 'millisecond' };\n _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' };\n });\n}\n\nfunction _trackTtfb() {\n return addTtfbInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n _measurements['ttfb'] = { value: metric.value, unit: 'millisecond' };\n });\n}\n\n/** Add performance related spans to a transaction */\nfunction addPerformanceEntries(span, options) {\n const performance = getBrowserPerformanceAPI();\n const origin = browserPerformanceTimeOrigin();\n if (!performance?.getEntries || !origin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n const timeOrigin = msToSec(origin);\n\n const performanceEntries = performance.getEntries();\n\n const { op, start_timestamp: transactionStartTime } = spanToJSON(span);\n\n performanceEntries.slice(_performanceCursor).forEach(entry => {\n const startTime = msToSec(entry.startTime);\n const duration = msToSec(\n // Inexplicably, Chrome sometimes emits a negative duration. We need to work around this.\n // There is a SO post attempting to explain this, but it leaves one with open questions: https://stackoverflow.com/questions/23191918/peformance-getentries-and-negative-duration-display\n // The way we clamp the value is probably not accurate, since we have observed this happen for things that may take a while to load, like for example the replay worker.\n // TODO: Investigate why this happens and how to properly mitigate. For now, this is a workaround to prevent transactions being dropped due to negative duration spans.\n Math.max(0, entry.duration),\n );\n\n if (op === 'navigation' && transactionStartTime && timeOrigin + startTime < transactionStartTime) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation': {\n _addNavigationSpans(span, entry , timeOrigin);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n _addMeasureSpans(span, entry, startTime, duration, timeOrigin);\n\n // capture web vitals\n const firstHidden = getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n\n if (entry.name === 'first-paint' && shouldRecord) {\n _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n break;\n }\n case 'resource': {\n _addResourceSpans(span, entry , entry.name, startTime, duration, timeOrigin);\n break;\n }\n // Ignore other entry types.\n }\n });\n\n _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n _trackNavigator(span);\n\n // Measurements are only available for pageload transactions\n if (op === 'pageload') {\n _addTtfbRequestTimeToMeasurements(_measurements);\n\n const fidMark = _measurements['mark.fid'];\n if (fidMark && _measurements['fid']) {\n // create span for FID\n startAndEndSpan(span, fidMark.value, fidMark.value + msToSec(_measurements['fid'].value), {\n name: 'first input delay',\n op: 'ui.action',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n\n // Delete mark.fid as we don't want it to be part of final payload\n delete _measurements['mark.fid'];\n }\n\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n // TODO: Check if the first condition is still necessary: `onCLS` already only fires once `onFCP` was called.\n if (!('fcp' in _measurements) || !options.recordClsOnPageloadSpan) {\n delete _measurements.cls;\n }\n\n Object.entries(_measurements).forEach(([measurementName, measurement]) => {\n setMeasurement(measurementName, measurement.value, measurement.unit);\n });\n\n // Set timeOrigin which denotes the timestamp which to base the LCP/FCP/FP/TTFB measurements on\n span.setAttribute('performance.timeOrigin', timeOrigin);\n\n // In prerendering scenarios, where a page might be prefetched and pre-rendered before the user clicks the link,\n // the navigation starts earlier than when the user clicks it. Web Vitals should always be based on the\n // user-perceived time, so they are not reported from the actual start of the navigation, but rather from the\n // time where the user actively started the navigation, for example by clicking a link.\n // This is user action is called \"activation\" and the time between navigation and activation is stored in\n // the `activationStart` attribute of the \"navigation\" PerformanceEntry.\n span.setAttribute('performance.activationStart', getActivationStart());\n\n _setWebVitalAttributes(span);\n }\n\n _lcpEntry = undefined;\n _clsEntry = undefined;\n _measurements = {};\n}\n\n/**\n * Create measure related spans.\n * Exported only for tests.\n */\nfunction _addMeasureSpans(\n span,\n entry,\n startTime,\n duration,\n timeOrigin,\n) {\n const navEntry = getNavigationEntry(false);\n const requestTime = msToSec(navEntry ? navEntry.requestStart : 0);\n // Because performance.measure accepts arbitrary timestamps it can produce\n // spans that happen before the browser even makes a request for the page.\n //\n // An example of this is the automatically generated Next.js-before-hydration\n // spans created by the Next.js framework.\n //\n // To prevent this we will pin the start timestamp to the request start time\n // This does make duration inaccurate, so if this does happen, we will add\n // an attribute to the span\n const measureStartTimestamp = timeOrigin + Math.max(startTime, requestTime);\n const startTimeStamp = timeOrigin + startTime;\n const measureEndTimestamp = startTimeStamp + duration;\n\n const attributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n };\n\n if (measureStartTimestamp !== startTimeStamp) {\n attributes['sentry.browser.measure_happened_before_request'] = true;\n attributes['sentry.browser.measure_start_time'] = measureStartTimestamp;\n }\n\n // Measurements from third parties can be off, which would create invalid spans, dropping transactions in the process.\n if (measureStartTimestamp <= measureEndTimestamp) {\n startAndEndSpan(span, measureStartTimestamp, measureEndTimestamp, {\n name: entry.name ,\n op: entry.entryType ,\n attributes,\n });\n }\n}\n\n/** Instrument navigation entries */\nfunction _addNavigationSpans(span, entry, timeOrigin) {\n (['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'] ).forEach(event => {\n _addPerformanceNavigationTiming(span, entry, event, timeOrigin);\n });\n _addPerformanceNavigationTiming(span, entry, 'secureConnection', timeOrigin, 'TLS/SSL');\n _addPerformanceNavigationTiming(span, entry, 'fetch', timeOrigin, 'cache');\n _addPerformanceNavigationTiming(span, entry, 'domainLookup', timeOrigin, 'DNS');\n\n _addRequest(span, entry, timeOrigin);\n}\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n span,\n entry,\n event,\n timeOrigin,\n name = event,\n) {\n const eventEnd = _getEndPropertyNameForNavigationTiming(event) ;\n const end = entry[eventEnd];\n const start = entry[`${event}Start`];\n if (!start || !end) {\n return;\n }\n startAndEndSpan(span, timeOrigin + msToSec(start), timeOrigin + msToSec(end), {\n op: `browser.${name}`,\n name: entry.name,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n}\n\nfunction _getEndPropertyNameForNavigationTiming(event) {\n if (event === 'secureConnection') {\n return 'connectEnd';\n }\n if (event === 'fetch') {\n return 'domainLookupStart';\n }\n return `${event}End`;\n}\n\n/** Create request and response related spans */\nfunction _addRequest(span, entry, timeOrigin) {\n const requestStartTimestamp = timeOrigin + msToSec(entry.requestStart );\n const responseEndTimestamp = timeOrigin + msToSec(entry.responseEnd );\n const responseStartTimestamp = timeOrigin + msToSec(entry.responseStart );\n if (entry.responseEnd) {\n // It is possible that we are collecting these metrics when the page hasn't finished loading yet, for example when the HTML slowly streams in.\n // In this case, ie. when the document request hasn't finished yet, `entry.responseEnd` will be 0.\n // In order not to produce faulty spans, where the end timestamp is before the start timestamp, we will only collect\n // these spans when the responseEnd value is available. The backend (Relay) would drop the entire span if it contained faulty spans.\n startAndEndSpan(span, requestStartTimestamp, responseEndTimestamp, {\n op: 'browser.request',\n name: entry.name,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n\n startAndEndSpan(span, responseStartTimestamp, responseEndTimestamp, {\n op: 'browser.response',\n name: entry.name,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n }\n}\n\n/**\n * Create resource-related spans.\n * Exported only for tests.\n */\nfunction _addResourceSpans(\n span,\n entry,\n resourceUrl,\n startTime,\n duration,\n timeOrigin,\n) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n\n const parsedUrl = parseUrl(resourceUrl);\n\n const attributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n };\n setResourceEntrySizeData(attributes, entry, 'transferSize', 'http.response_transfer_size');\n setResourceEntrySizeData(attributes, entry, 'encodedBodySize', 'http.response_content_length');\n setResourceEntrySizeData(attributes, entry, 'decodedBodySize', 'http.decoded_response_content_length');\n\n // `deliveryType` is experimental and does not exist everywhere\n const deliveryType = (entry ).deliveryType;\n if (deliveryType != null) {\n attributes['http.response_delivery_type'] = deliveryType;\n }\n\n // Types do not reflect this property yet\n const renderBlockingStatus = (entry )\n .renderBlockingStatus;\n if (renderBlockingStatus) {\n attributes['resource.render_blocking_status'] = renderBlockingStatus;\n }\n\n if (parsedUrl.protocol) {\n attributes['url.scheme'] = parsedUrl.protocol.split(':').pop(); // the protocol returned by parseUrl includes a :, but OTEL spec does not, so we remove it.\n }\n\n if (parsedUrl.host) {\n attributes['server.address'] = parsedUrl.host;\n }\n\n attributes['url.same_origin'] = resourceUrl.includes(WINDOW.location.origin);\n\n const { name, version } = extractNetworkProtocol(entry.nextHopProtocol);\n attributes['network.protocol.name'] = name;\n attributes['network.protocol.version'] = version;\n\n const startTimestamp = timeOrigin + startTime;\n const endTimestamp = startTimestamp + duration;\n\n startAndEndSpan(span, startTimestamp, endTimestamp, {\n name: resourceUrl.replace(WINDOW.location.origin, ''),\n op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',\n attributes,\n });\n}\n\n/**\n * Capture the information of the user agent.\n */\nfunction _trackNavigator(span) {\n const navigator = WINDOW.navigator ;\n if (!navigator) {\n return;\n }\n\n // track network connectivity\n const connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n span.setAttribute('effectiveConnectionType', connection.effectiveType);\n }\n\n if (connection.type) {\n span.setAttribute('connectionType', connection.type);\n }\n\n if (isMeasurementValue(connection.rtt)) {\n _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' };\n }\n }\n\n if (isMeasurementValue(navigator.deviceMemory)) {\n span.setAttribute('deviceMemory', `${navigator.deviceMemory} GB`);\n }\n\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n span.setAttribute('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n}\n\n/** Add LCP / CLS data to span to allow debugging */\nfunction _setWebVitalAttributes(span) {\n if (_lcpEntry) {\n // Capture Properties of the LCP element that contributes to the LCP.\n\n if (_lcpEntry.element) {\n span.setAttribute('lcp.element', htmlTreeAsString(_lcpEntry.element));\n }\n\n if (_lcpEntry.id) {\n span.setAttribute('lcp.id', _lcpEntry.id);\n }\n\n if (_lcpEntry.url) {\n // Trim URL to the first 200 characters.\n span.setAttribute('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n }\n\n if (_lcpEntry.loadTime != null) {\n // loadTime is the time of LCP that's related to receiving the LCP element response..\n span.setAttribute('lcp.loadTime', _lcpEntry.loadTime);\n }\n\n if (_lcpEntry.renderTime != null) {\n // renderTime is loadTime + rendering time\n // it's 0 if the LCP element is loaded from a 3rd party origin that doesn't send the\n // `Timing-Allow-Origin` header.\n span.setAttribute('lcp.renderTime', _lcpEntry.renderTime);\n }\n\n span.setAttribute('lcp.size', _lcpEntry.size);\n }\n\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (_clsEntry?.sources) {\n _clsEntry.sources.forEach((source, index) =>\n span.setAttribute(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n );\n }\n}\n\nfunction setResourceEntrySizeData(\n attributes,\n entry,\n key,\n dataKey,\n) {\n const entryVal = entry[key];\n if (entryVal != null && entryVal < MAX_INT_AS_BYTES) {\n attributes[dataKey] = entryVal;\n }\n}\n\n/**\n * Add ttfb request time information to measurements.\n *\n * ttfb information is added via vendored web vitals library.\n */\nfunction _addTtfbRequestTimeToMeasurements(_measurements) {\n const navEntry = getNavigationEntry(false);\n if (!navEntry) {\n return;\n }\n\n const { responseStart, requestStart } = navEntry;\n\n if (requestStart <= responseStart) {\n _measurements['ttfb.requestTime'] = {\n value: responseStart - requestStart,\n unit: 'millisecond',\n };\n }\n}\n\nexport { _addMeasureSpans, _addResourceSpans, addPerformanceEntries, startTrackingInteractions, startTrackingLongAnimationFrames, startTrackingLongTasks, startTrackingWebVitals };\n//# sourceMappingURL=browserMetrics.js.map\n","import { addHandler, maybeInstrument, triggerHandlers, fill, addNonEnumerableProperty, uuid4 } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst DEBOUNCE_DURATION = 1000;\n\nlet debounceTimerID;\nlet lastCapturedEventType;\nlet lastCapturedEventTargetId;\n\n/**\n * Add an instrumentation handler for when a click or a keypress happens.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addClickKeypressInstrumentationHandler(handler) {\n const type = 'dom';\n addHandler(type, handler);\n maybeInstrument(type, instrumentDOM);\n}\n\n/** Exported for tests only. */\nfunction instrumentDOM() {\n if (!WINDOW.document) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target) => {\n const globalObject = WINDOW ;\n const proto = globalObject[target]?.prototype;\n\n // eslint-disable-next-line no-prototype-builtins\n if (!proto?.hasOwnProperty?.('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener) {\n return function ( type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n const handlers = (this.__sentry_instrumentation_handlers__ =\n this.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener) {\n return function ( type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n const handlers = this.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete this.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event) {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (event.type !== lastCapturedEventType) {\n return false;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (!event.target || (event.target )._sentryId !== lastCapturedEventTargetId) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType, target) {\n // We are only interested in filtering `keypress` events for now.\n if (eventType !== 'keypress') {\n return false;\n }\n\n if (!target?.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n */\nfunction makeDOMEventHandler(\n handler,\n globalListener = false,\n) {\n return (event) => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || event['_sentryCaptured']) {\n return;\n }\n\n const target = getEventTarget(event);\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event.type, target)) {\n return;\n }\n\n // Mark event as \"seen\"\n addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n if (target && !target._sentryId) {\n // Add UUID to event target so we can identify if\n addNonEnumerableProperty(target, '_sentryId', uuid4());\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n if (!isSimilarToLastCapturedEvent(event)) {\n const handlerData = { event, name, global: globalListener };\n handler(handlerData);\n lastCapturedEventType = event.type;\n lastCapturedEventTargetId = target ? target._sentryId : undefined;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n lastCapturedEventTargetId = undefined;\n lastCapturedEventType = undefined;\n }, DEBOUNCE_DURATION);\n };\n}\n\nfunction getEventTarget(event) {\n try {\n return event.target ;\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n return null;\n }\n}\n\nexport { addClickKeypressInstrumentationHandler, instrumentDOM };\n//# sourceMappingURL=dom.js.map\n","import { addHandler, maybeInstrument, triggerHandlers, supportsHistory, fill } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nlet lastHref;\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addHistoryInstrumentationHandler(handler) {\n const type = 'history';\n addHandler(type, handler);\n maybeInstrument(type, instrumentHistory);\n}\n\nfunction instrumentHistory() {\n // The `popstate` event may also be triggered on `pushState`, but it may not always reliably be emitted by the browser\n // Which is why we also monkey-patch methods below, in addition to this\n WINDOW.addEventListener('popstate', () => {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n\n if (from === to) {\n return;\n }\n\n const handlerData = { from, to } ;\n triggerHandlers('history', handlerData);\n });\n\n // Just guard against this not being available, in weird environments\n if (!supportsHistory()) {\n return;\n }\n\n function historyReplacementFunction(originalHistoryFunction) {\n return function ( ...args) {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n\n if (from === to) {\n return;\n }\n\n const handlerData = { from, to } ;\n triggerHandlers('history', handlerData);\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nexport { addHistoryInstrumentationHandler };\n//# sourceMappingURL=history.js.map\n","import { isNativeFunction, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './types.js';\n\n/**\n * We generally want to use window.fetch / window.setTimeout.\n * However, in some cases this may be wrapped (e.g. by Zone.js for Angular),\n * so we try to get an unpatched version of this from a sandboxed iframe.\n */\n\nconst cachedImplementations = {};\n\n/**\n * Get the native implementation of a browser function.\n *\n * This can be used to ensure we get an unwrapped version of a function, in cases where a wrapped function can lead to problems.\n *\n * The following methods can be retrieved:\n * - `setTimeout`: This can be wrapped by e.g. Angular, causing change detection to be triggered.\n * - `fetch`: This can be wrapped by e.g. ad-blockers, causing an infinite loop when a request is blocked.\n */\nfunction getNativeImplementation(\n name,\n) {\n const cached = cachedImplementations[name];\n if (cached) {\n return cached;\n }\n\n let impl = WINDOW[name] ;\n\n // Fast path to avoid DOM I/O\n if (isNativeFunction(impl)) {\n return (cachedImplementations[name] = impl.bind(WINDOW) );\n }\n\n const document = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow?.[name]) {\n impl = contentWindow[name] ;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n // Could not create sandbox iframe, just use window.xxx\n DEBUG_BUILD && logger.warn(`Could not create sandbox iframe for ${name} check, bailing to window.${name}: `, e);\n }\n }\n\n // Sanity check: This _should_ not happen, but if it does, we just skip caching...\n // This can happen e.g. in tests where fetch may not be available in the env, or similar.\n if (!impl) {\n return impl;\n }\n\n return (cachedImplementations[name] = impl.bind(WINDOW) );\n}\n\n/** Clear a cached implementation. */\nfunction clearCachedImplementation(name) {\n cachedImplementations[name] = undefined;\n}\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nfunction fetch(...rest) {\n return getNativeImplementation('fetch')(...rest);\n}\n\n/**\n * Get an unwrapped `setTimeout` method.\n * This ensures that even if e.g. Angular wraps `setTimeout`, we get the native implementation,\n * avoiding triggering change detection.\n */\nfunction setTimeout(...rest) {\n return getNativeImplementation('setTimeout')(...rest);\n}\n\nexport { clearCachedImplementation, fetch, getNativeImplementation, setTimeout };\n//# sourceMappingURL=getNativeImplementation.js.map\n","import { addHandler, maybeInstrument, timestampInSeconds, isString, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addXhrInstrumentationHandler(handler) {\n const type = 'xhr';\n addHandler(type, handler);\n maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nfunction instrumentXHR() {\n if (!(WINDOW ).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n xhrproto.open = new Proxy(xhrproto.open, {\n apply(originalOpen, xhrOpenThisArg, xhrOpenArgArray) {\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your XHR call did not\n // have a stack trace. If you are using HttpClient integration,\n // this is the expected behavior, as we are using this virtual error to capture\n // the location of your XHR call, and group your HttpClient events accordingly.\n const virtualError = new Error();\n\n const startTimestamp = timestampInSeconds() * 1000;\n\n // open() should always be called with two or more arguments\n // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n const method = isString(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : undefined;\n const url = parseUrl(xhrOpenArgArray[1]);\n\n if (!method || !url) {\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n }\n\n xhrOpenThisArg[SENTRY_XHR_DATA_KEY] = {\n method,\n url,\n request_headers: {},\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (method === 'POST' && url.match(/sentry_key/)) {\n xhrOpenThisArg.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = xhrOpenThisArg[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (xhrOpenThisArg.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = xhrOpenThisArg.status;\n } catch (e) {\n /* do nothing */\n }\n\n const handlerData = {\n endTimestamp: timestampInSeconds() * 1000,\n startTimestamp,\n xhr: xhrOpenThisArg,\n virtualError,\n };\n triggerHandlers('xhr', handlerData);\n }\n };\n\n if ('onreadystatechange' in xhrOpenThisArg && typeof xhrOpenThisArg.onreadystatechange === 'function') {\n xhrOpenThisArg.onreadystatechange = new Proxy(xhrOpenThisArg.onreadystatechange, {\n apply(originalOnreadystatechange, onreadystatechangeThisArg, onreadystatechangeArgArray) {\n onreadystatechangeHandler();\n return originalOnreadystatechange.apply(onreadystatechangeThisArg, onreadystatechangeArgArray);\n },\n });\n } else {\n xhrOpenThisArg.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n xhrOpenThisArg.setRequestHeader = new Proxy(xhrOpenThisArg.setRequestHeader, {\n apply(\n originalSetRequestHeader,\n setRequestHeaderThisArg,\n setRequestHeaderArgArray,\n ) {\n const [header, value] = setRequestHeaderArgArray;\n\n const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo && isString(header) && isString(value)) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray);\n },\n });\n\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n },\n });\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n xhrproto.send = new Proxy(xhrproto.send, {\n apply(originalSend, sendThisArg, sendArgArray) {\n const sentryXhrData = sendThisArg[SENTRY_XHR_DATA_KEY];\n\n if (!sentryXhrData) {\n return originalSend.apply(sendThisArg, sendArgArray);\n }\n\n if (sendArgArray[0] !== undefined) {\n sentryXhrData.body = sendArgArray[0];\n }\n\n const handlerData = {\n startTimestamp: timestampInSeconds() * 1000,\n xhr: sendThisArg,\n };\n triggerHandlers('xhr', handlerData);\n\n return originalSend.apply(sendThisArg, sendArgArray);\n },\n });\n}\n\nfunction parseUrl(url) {\n if (isString(url)) {\n return url;\n }\n\n try {\n // url can be a string or URL\n // but since URL is not available in IE11, we do not check for it,\n // but simply assume it is an URL and return `toString()` from it (which returns the full URL)\n // If that fails, we just return undefined\n return (url ).toString();\n } catch {} // eslint-disable-line no-empty\n\n return undefined;\n}\n\nexport { SENTRY_XHR_DATA_KEY, addXhrInstrumentationHandler, instrumentXHR };\n//# sourceMappingURL=xhr.js.map\n","import { logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\n\n/**\n * Serializes FormData.\n *\n * This is a bit simplified, but gives us a decent estimate.\n * This converts e.g. { name: 'Anne Smith', age: 13 } to 'name=Anne+Smith&age=13'.\n *\n */\nfunction serializeFormData(formData) {\n // @ts-expect-error passing FormData to URLSearchParams actually works\n return new URLSearchParams(formData).toString();\n}\n\n/** Get the string representation of a body. */\nfunction getBodyString(body, _logger = logger) {\n try {\n if (typeof body === 'string') {\n return [body];\n }\n\n if (body instanceof URLSearchParams) {\n return [body.toString()];\n }\n\n if (body instanceof FormData) {\n return [serializeFormData(body)];\n }\n\n if (!body) {\n return [undefined];\n }\n } catch (error) {\n DEBUG_BUILD && _logger.error(error, 'Failed to serialize body', body);\n return [undefined, 'BODY_PARSE_ERROR'];\n }\n\n DEBUG_BUILD && _logger.info('Skipping network body because of body type', body);\n\n return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n\n/**\n * Parses the fetch arguments to extract the request payload.\n *\n * We only support getting the body from the fetch options.\n */\nfunction getFetchRequestArgBody(fetchArgs = []) {\n if (fetchArgs.length !== 2 || typeof fetchArgs[1] !== 'object') {\n return undefined;\n }\n\n return (fetchArgs[1] ).body;\n}\n\nexport { getBodyString, getFetchRequestArgBody, serializeFormData };\n//# sourceMappingURL=networkUtils.js.map\n","import { browserPerformanceTimeOrigin, getActiveSpan, getRootSpan, spanToJSON, getCurrentScope, htmlTreeAsString, dropUndefinedKeys, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE } from '@sentry/core';\nimport { addInpInstrumentationHandler, addPerformanceInstrumentationHandler, isPerformanceEventTiming } from './instrument.js';\nimport { getBrowserPerformanceAPI, msToSec, startStandaloneWebVitalSpan } from './utils.js';\n\nconst LAST_INTERACTIONS = [];\nconst INTERACTIONS_SPAN_MAP = new Map();\n\n/**\n * Start tracking INP webvital events.\n */\nfunction startTrackingINP() {\n const performance = getBrowserPerformanceAPI();\n if (performance && browserPerformanceTimeOrigin()) {\n const inpCallback = _trackINP();\n\n return () => {\n inpCallback();\n };\n }\n\n return () => undefined;\n}\n\nconst INP_ENTRY_MAP = {\n click: 'click',\n pointerdown: 'click',\n pointerup: 'click',\n mousedown: 'click',\n mouseup: 'click',\n touchstart: 'click',\n touchend: 'click',\n mouseover: 'hover',\n mouseout: 'hover',\n mouseenter: 'hover',\n mouseleave: 'hover',\n pointerover: 'hover',\n pointerout: 'hover',\n pointerenter: 'hover',\n pointerleave: 'hover',\n dragstart: 'drag',\n dragend: 'drag',\n drag: 'drag',\n dragenter: 'drag',\n dragleave: 'drag',\n dragover: 'drag',\n drop: 'drag',\n keydown: 'press',\n keyup: 'press',\n keypress: 'press',\n input: 'press',\n};\n\n/** Starts tracking the Interaction to Next Paint on the current page. */\nfunction _trackINP() {\n return addInpInstrumentationHandler(({ metric }) => {\n if (metric.value == undefined) {\n return;\n }\n\n const entry = metric.entries.find(entry => entry.duration === metric.value && INP_ENTRY_MAP[entry.name]);\n\n if (!entry) {\n return;\n }\n\n const { interactionId } = entry;\n const interactionType = INP_ENTRY_MAP[entry.name];\n\n /** Build the INP span, create an envelope from the span, and then send the envelope */\n const startTime = msToSec((browserPerformanceTimeOrigin() ) + entry.startTime);\n const duration = msToSec(metric.value);\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;\n\n // We first try to lookup the span from our INTERACTIONS_SPAN_MAP,\n // where we cache the route per interactionId\n const cachedSpan = interactionId != null ? INTERACTIONS_SPAN_MAP.get(interactionId) : undefined;\n\n const spanToUse = cachedSpan || rootSpan;\n\n // Else, we try to use the active span.\n // Finally, we fall back to look at the transactionName on the scope\n const routeName = spanToUse ? spanToJSON(spanToUse).description : getCurrentScope().getScopeData().transactionName;\n\n const name = htmlTreeAsString(entry.target);\n const attributes = dropUndefinedKeys({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.inp',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `ui.interaction.${interactionType}`,\n [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration,\n });\n\n const span = startStandaloneWebVitalSpan({\n name,\n transaction: routeName,\n attributes,\n startTime,\n });\n\n if (span) {\n span.addEvent('inp', {\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: 'millisecond',\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: metric.value,\n });\n\n span.end(startTime + duration);\n }\n });\n}\n\n/**\n * Register a listener to cache route information for INP interactions.\n */\nfunction registerInpInteractionListener() {\n const handleEntries = ({ entries }) => {\n const activeSpan = getActiveSpan();\n const activeRootSpan = activeSpan && getRootSpan(activeSpan);\n\n entries.forEach(entry => {\n if (!isPerformanceEventTiming(entry) || !activeRootSpan) {\n return;\n }\n\n const interactionId = entry.interactionId;\n if (interactionId == null) {\n return;\n }\n\n // If the interaction was already recorded before, nothing more to do\n if (INTERACTIONS_SPAN_MAP.has(interactionId)) {\n return;\n }\n\n // We keep max. 10 interactions in the list, then remove the oldest one & clean up\n if (LAST_INTERACTIONS.length > 10) {\n const last = LAST_INTERACTIONS.shift() ;\n INTERACTIONS_SPAN_MAP.delete(last);\n }\n\n // We add the interaction to the list of recorded interactions\n // and store the span for this interaction\n LAST_INTERACTIONS.push(interactionId);\n INTERACTIONS_SPAN_MAP.set(interactionId, activeRootSpan);\n });\n };\n\n addPerformanceInstrumentationHandler('event', handleEntries);\n addPerformanceInstrumentationHandler('first-input', handleEntries);\n}\n\nexport { registerInpInteractionListener, startTrackingINP };\n//# sourceMappingURL=inp.js.map\n","import { getNativeImplementation, clearCachedImplementation } from '@sentry-internal/browser-utils';\nimport { createTransport, rejectedSyncPromise } from '@sentry/core';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nfunction makeFetchTransport(\n options,\n nativeFetch = getNativeImplementation('fetch'),\n) {\n let pendingBodySize = 0;\n let pendingCount = 0;\n\n function makeRequest(request) {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n\n const requestOptions = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'strict-origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. when finishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60000 && pendingCount < 15,\n ...options.fetchOptions,\n };\n\n if (!nativeFetch) {\n clearCachedImplementation('fetch');\n return rejectedSyncPromise('No fetch implementation available');\n }\n\n try {\n // TODO: This may need a `suppressTracing` call in the future when we switch the browser SDK to OTEL\n return nativeFetch(options.url, requestOptions).then(response => {\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n };\n });\n } catch (e) {\n clearCachedImplementation('fetch');\n pendingBodySize -= requestSize;\n pendingCount--;\n return rejectedSyncPromise(e);\n }\n }\n\n return createTransport(options, makeRequest);\n}\n\nexport { makeFetchTransport };\n//# sourceMappingURL=fetch.js.map\n","import { createStackParser, UNKNOWN_FUNCTION } from '@sentry/core';\n\n// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename, func, lineno, colno) {\n const frame = {\n filename,\n function: func === '' ? UNKNOWN_FUNCTION : func,\n in_app: true, // All browser frames are considered in_app\n };\n\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n\n if (colno !== undefined) {\n frame.colno = colno;\n }\n\n return frame;\n}\n\n// This regex matches frames that have no function name (ie. are at the top level of a module).\n// For example \"at http://localhost:5000//script.js:1:126\"\n// Frames _with_ function names usually look as follows: \"at commitLayoutEffects (react-dom.development.js:23426:1)\"\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\n\n// This regex matches all the frames that have a function name.\nconst chromeRegex =\n /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\n// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments\n// See: https://github.com/getsentry/sentry-javascript/issues/6880\nconst chromeStackParserFn = line => {\n // If the stack line has no function name, we need to parse it differently\n const noFnParts = chromeRegexNoFnName.exec(line) ;\n\n if (noFnParts) {\n const [, filename, line, col] = noFnParts;\n return createFrame(filename, UNKNOWN_FUNCTION, +line, +col);\n }\n\n const parts = chromeRegex.exec(line) ;\n\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]) ;\n\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nconst chromeStackLineParser = [CHROME_PRIORITY, chromeStackParserFn];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko = line => {\n const parts = geckoREgex.exec(line) ;\n\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]) ;\n\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nconst geckoStackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs = line => {\n const parts = winjsRegex.exec(line) ;\n\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\n\nconst winjsStackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10 = line => {\n const parts = opera10Regex.exec(line) ;\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nconst opera10StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11 = line => {\n const parts = opera11Regex.exec(line) ;\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nconst opera11StackLineParser = [OPERA11_PRIORITY, opera11];\n\nconst defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];\n\nconst defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func, filename) => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? (func.split('@')[0] ) : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n ]\n : [func, filename];\n};\n\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };\n//# sourceMappingURL=stack-parsers.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { addClickKeypressInstrumentationHandler, addXhrInstrumentationHandler, addHistoryInstrumentationHandler, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';\nimport { defineIntegration, addConsoleInstrumentationHandler, addFetchInstrumentationHandler, getClient, addBreadcrumb, getEventDescription, logger, htmlTreeAsString, getComponentName, severityLevelFromString, safeJoin, getBreadcrumbLogLevelFromHttpStatusCode, parseUrl } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/* eslint-disable max-lines */\n\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\nconst INTEGRATION_NAME = 'Breadcrumbs';\n\nconst _breadcrumbsIntegration = ((options = {}) => {\n const _options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n if (_options.console) {\n addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));\n }\n if (_options.dom) {\n addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));\n }\n if (_options.xhr) {\n addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));\n }\n if (_options.fetch) {\n addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));\n }\n if (_options.history) {\n addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));\n }\n if (_options.sentry) {\n client.on('beforeSendEvent', _getSentryBreadcrumbHandler(client));\n }\n },\n };\n}) ;\n\nconst breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration);\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction _getSentryBreadcrumbHandler(client) {\n return function addSentryBreadcrumb(event) {\n if (getClient() !== client) {\n return;\n }\n\n addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n };\n}\n\n/**\n * A HOC that creates a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _getDomBreadcrumbHandler(\n client,\n dom,\n) {\n return function _innerDomBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n let target;\n let componentName;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n let maxStringLength =\n typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event ;\n const element = _isEvent(event) ? event.target : event;\n\n target = htmlTreeAsString(element, { keyAttrs, maxStringLength });\n componentName = getComponentName(element);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n const breadcrumb = {\n category: `ui.${handlerData.name}`,\n message: target,\n };\n\n if (componentName) {\n breadcrumb.data = { 'ui.component_name': componentName };\n }\n\n addBreadcrumb(breadcrumb, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n });\n };\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _getConsoleBreadcrumbHandler(client) {\n return function _consoleBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n };\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _getXhrBreadcrumbHandler(client) {\n return function _xhrBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n const { startTimestamp, endTimestamp } = handlerData;\n\n const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n\n const { method, url, status_code, body } = sentryXhrData;\n\n const data = {\n method,\n url,\n status_code,\n };\n\n const hint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp,\n };\n\n const breadcrumb = {\n category: 'xhr',\n data,\n type: 'http',\n level: getBreadcrumbLogLevelFromHttpStatusCode(status_code),\n };\n\n client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint );\n\n addBreadcrumb(breadcrumb, hint);\n };\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _getFetchBreadcrumbHandler(client) {\n return function _fetchBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n const { startTimestamp, endTimestamp } = handlerData;\n\n // We only capture complete fetch requests\n if (!endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n ({\n method: handlerData.fetchData.method,\n url: handlerData.fetchData.url,\n });\n\n if (handlerData.error) {\n const data = handlerData.fetchData;\n const hint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp,\n };\n\n const breadcrumb = {\n category: 'fetch',\n data,\n level: 'error',\n type: 'http',\n } ;\n\n client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint );\n\n addBreadcrumb(breadcrumb, hint);\n } else {\n const response = handlerData.response ;\n const data = {\n ...handlerData.fetchData,\n status_code: response?.status,\n };\n\n handlerData.fetchData.request_body_size;\n handlerData.fetchData.response_body_size;\n response?.status;\n\n const hint = {\n input: handlerData.args,\n response,\n startTimestamp,\n endTimestamp,\n };\n\n const breadcrumb = {\n category: 'fetch',\n data,\n type: 'http',\n level: getBreadcrumbLogLevelFromHttpStatusCode(data.status_code),\n };\n\n client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint );\n\n addBreadcrumb(breadcrumb, hint);\n }\n };\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _getHistoryBreadcrumbHandler(client) {\n return function _historyBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(WINDOW.location.href);\n let parsedFrom = from ? parseUrl(from) : undefined;\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom?.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n };\n}\n\nfunction _isEvent(event) {\n return !!event && !!(event ).target;\n}\n\nexport { breadcrumbsIntegration };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { defineIntegration, fill, getFunctionName, getOriginalFunction } from '@sentry/core';\nimport { WINDOW, wrap } from '../helpers.js';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'BroadcastChannel',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'SharedWorker',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\nconst INTEGRATION_NAME = 'BrowserApiErrors';\n\nconst _browserApiErrorsIntegration = ((options = {}) => {\n const _options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO: This currently only works for the first client this is setup\n // We may want to adjust this to check for client etc.\n setupOnce() {\n if (_options.setTimeout) {\n fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n }\n\n if (_options.setInterval) {\n fill(WINDOW, 'setInterval', _wrapTimeFunction);\n }\n\n if (_options.requestAnimationFrame) {\n fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (_options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n const eventTargetOption = _options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n },\n };\n}) ;\n\n/**\n * Wrap timer functions and event targets to catch errors and provide better meta data.\n */\nconst browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration);\n\nfunction _wrapTimeFunction(original) {\n return function ( ...args) {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: false,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n\nfunction _wrapRAF(original) {\n return function ( callback) {\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n\nfunction _wrapXHR(originalSend) {\n return function ( ...args) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function (original) {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before BrowserApiErrors, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n}\n\nfunction _wrapEventTarget(target) {\n const globalObject = WINDOW ;\n const proto = globalObject[target]?.prototype;\n\n // eslint-disable-next-line no-prototype-builtins\n if (!proto?.hasOwnProperty?.('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original)\n\n {\n return function ( eventName, fn, options) {\n try {\n if (isEventListenerObject(fn)) {\n // ESlint disable explanation:\n // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n // introduce a bug here, because bind returns a new function that doesn't have our\n // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n fn.handleEvent = wrap(fn.handleEvent, {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n });\n }\n } catch {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.apply(this, [\n eventName,\n wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n\n fill(proto, 'removeEventListener', function (originalRemoveEventListener)\n\n {\n return function ( eventName, fn, options) {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n try {\n const originalEventHandler = (fn ).__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, fn, options);\n };\n });\n}\n\nfunction isEventListenerObject(obj) {\n return typeof (obj ).handleEvent === 'function';\n}\n\nexport { browserApiErrorsIntegration };\n//# sourceMappingURL=browserapierrors.js.map\n","import { addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';\nimport { defineIntegration, logger, startSession, captureSession } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * When added, automatically creates sessions which allow you to track adoption and crashes (crash free rate) in your Releases in Sentry.\n * More information: https://docs.sentry.io/product/releases/health/\n *\n * Note: In order for session tracking to work, you need to set up Releases: https://docs.sentry.io/product/releases/\n */\nconst browserSessionIntegration = defineIntegration(() => {\n return {\n name: 'BrowserSession',\n setupOnce() {\n if (typeof WINDOW.document === 'undefined') {\n DEBUG_BUILD &&\n logger.warn('Using the `browserSessionIntegration` in non-browser environments is not supported.');\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSession({ ignoreDuration: true });\n captureSession();\n\n // We want to create a session for every navigation as well\n addHistoryInstrumentationHandler(({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (from !== undefined && from !== to) {\n startSession({ ignoreDuration: true });\n captureSession();\n }\n });\n },\n };\n});\n\nexport { browserSessionIntegration };\n//# sourceMappingURL=browsersession.js.map\n","import { defineIntegration, addGlobalErrorInstrumentationHandler, getClient, captureEvent, addGlobalUnhandledRejectionInstrumentationHandler, isPrimitive, isString, getLocationHref, UNKNOWN_FUNCTION, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { eventFromUnknownInput } from '../eventbuilder.js';\nimport { shouldIgnoreOnError } from '../helpers.js';\n\nconst INTEGRATION_NAME = 'GlobalHandlers';\n\nconst _globalHandlersIntegration = ((options = {}) => {\n const _options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n Error.stackTraceLimit = 50;\n },\n setup(client) {\n if (_options.onerror) {\n _installGlobalOnErrorHandler(client);\n globalHandlerLog('onerror');\n }\n if (_options.onunhandledrejection) {\n _installGlobalOnUnhandledRejectionHandler(client);\n globalHandlerLog('onunhandledrejection');\n }\n },\n };\n}) ;\n\nconst globalHandlersIntegration = defineIntegration(_globalHandlersIntegration);\n\nfunction _installGlobalOnErrorHandler(client) {\n addGlobalErrorInstrumentationHandler(data => {\n const { stackParser, attachStacktrace } = getOptions();\n\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n\n const { msg, url, line, column, error } = data;\n\n const event = _enhanceEventWithInitialFrame(\n eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n url,\n line,\n column,\n );\n\n event.level = 'error';\n\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onerror',\n },\n });\n });\n}\n\nfunction _installGlobalOnUnhandledRejectionHandler(client) {\n addGlobalUnhandledRejectionInstrumentationHandler(e => {\n const { stackParser, attachStacktrace } = getOptions();\n\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n\n const error = _getUnhandledRejectionError(e );\n\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n event.level = 'error';\n\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onunhandledrejection',\n },\n });\n });\n}\n\nfunction _getUnhandledRejectionError(error) {\n if (isPrimitive(error)) {\n return error;\n }\n\n // dig the object of the rejection out of known event types\n try {\n\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in (error )) {\n return (error ).reason;\n }\n\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n if ('detail' in (error ) && 'reason' in (error ).detail) {\n return (error ).detail.reason;\n }\n } catch {} // eslint-disable-line no-empty\n\n return error;\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n}\n\nfunction _enhanceEventWithInitialFrame(\n event,\n url,\n line,\n column,\n) {\n // event.exception\n const e = (event.exception = event.exception || {});\n // event.exception.values\n const ev = (e.values = e.values || []);\n // event.exception.values[0]\n const ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n const colno = column;\n const lineno = line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: UNKNOWN_FUNCTION,\n in_app: true,\n lineno,\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type) {\n DEBUG_BUILD && logger.log(`Global Handler attached: ${type}`);\n}\n\nfunction getOptions() {\n const client = getClient();\n const options = client?.getOptions() || {\n stackParser: () => [],\n attachStacktrace: false,\n };\n return options;\n}\n\nexport { globalHandlersIntegration };\n//# sourceMappingURL=globalhandlers.js.map\n","import { defineIntegration, getLocationHref } from '@sentry/core';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * Collects information about HTTP request headers and\n * attaches them to the event.\n */\nconst httpContextIntegration = defineIntegration(() => {\n return {\n name: 'HttpContext',\n preprocessEvent(event) {\n // if none of the information we want exists, don't bother\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n\n // grab as much info as exists and add it to the event\n const url = event.request?.url || getLocationHref();\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n\n const headers = {\n ...event.request?.headers,\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = {\n ...event.request,\n ...(url && { url }),\n headers,\n };\n\n event.request = request;\n },\n };\n});\n\nexport { httpContextIntegration };\n//# sourceMappingURL=httpcontext.js.map\n","import { defineIntegration, applyAggregateErrorsToEvent } from '@sentry/core';\nimport { exceptionFromError } from '../eventbuilder.js';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\nconst INTEGRATION_NAME = 'LinkedErrors';\n\nconst _linkedErrorsIntegration = ((options = {}) => {\n const limit = options.limit || DEFAULT_LIMIT;\n const key = options.key || DEFAULT_KEY;\n\n return {\n name: INTEGRATION_NAME,\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n key,\n limit,\n event,\n hint,\n );\n },\n };\n}) ;\n\n/**\n * Aggregrate linked errors in an event.\n */\nconst linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n\nexport { linkedErrorsIntegration };\n//# sourceMappingURL=linkederrors.js.map\n","import { inboundFiltersIntegration, functionToStringIntegration, dedupeIntegration, consoleSandbox, supportsFetch, logger, stackParserFromStackParserOptions, getIntegrationsToSetup, initAndBind, getCurrentScope, lastEventId, getReportDialogEndpoint, getLocationHref } from '@sentry/core';\nimport { BrowserClient } from './client.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './helpers.js';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs.js';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors.js';\nimport { browserSessionIntegration } from './integrations/browsersession.js';\nimport { globalHandlersIntegration } from './integrations/globalhandlers.js';\nimport { httpContextIntegration } from './integrations/httpcontext.js';\nimport { linkedErrorsIntegration } from './integrations/linkederrors.js';\nimport { defaultStackParser } from './stack-parsers.js';\nimport { makeFetchTransport } from './transports/fetch.js';\n\n/** Get the default integrations for the browser SDK. */\nfunction getDefaultIntegrations(_options) {\n /**\n * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n * `getDefaultIntegrations` but with an adjusted set of integrations.\n */\n return [\n // TODO(v10): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`\n // eslint-disable-next-line deprecation/deprecation\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n browserApiErrorsIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n browserSessionIntegration(),\n ];\n}\n\n/** Exported only for tests. */\nfunction applyDefaultOptions(optionsArg = {}) {\n const defaultOptions = {\n defaultIntegrations: getDefaultIntegrations(),\n release:\n typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n ? __SENTRY_RELEASE__\n : WINDOW.SENTRY_RELEASE?.id, // This supports the variable that sentry-webpack-plugin injects\n sendClientReports: true,\n };\n\n return {\n ...defaultOptions,\n ...dropTopLevelUndefinedKeys(optionsArg),\n };\n}\n\n/**\n * In contrast to the regular `dropUndefinedKeys` method,\n * this one does not deep-drop keys, but only on the top level.\n */\nfunction dropTopLevelUndefinedKeys(obj) {\n const mutatetedObj = {};\n\n for (const k of Object.getOwnPropertyNames(obj)) {\n const key = k ;\n if (obj[key] !== undefined) {\n mutatetedObj[key] = obj[key];\n }\n }\n\n return mutatetedObj;\n}\n\nfunction shouldShowBrowserExtensionError() {\n const windowWithMaybeExtension =\n typeof WINDOW.window !== 'undefined' && (WINDOW );\n if (!windowWithMaybeExtension) {\n // No need to show the error if we're not in a browser window environment (e.g. service workers)\n return false;\n }\n\n const extensionKey = windowWithMaybeExtension.chrome ? 'chrome' : 'browser';\n const extensionObject = windowWithMaybeExtension[extensionKey];\n\n const runtimeId = extensionObject?.runtime?.id;\n const href = getLocationHref() || '';\n\n const extensionProtocols = ['chrome-extension:', 'moz-extension:', 'ms-browser-extension:', 'safari-web-extension:'];\n\n // Running the SDK in a dedicated extension page and calling Sentry.init is fine; no risk of data leakage\n const isDedicatedExtensionPage =\n !!runtimeId && WINDOW === WINDOW.top && extensionProtocols.some(protocol => href.startsWith(`${protocol}//`));\n\n // Running the SDK in NW.js, which appears like a browser extension but isn't, is also fine\n // see: https://github.com/getsentry/sentry-javascript/issues/12668\n const isNWjs = typeof windowWithMaybeExtension.nw !== 'undefined';\n\n return !!runtimeId && !isDedicatedExtensionPage && !isNWjs;\n}\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nfunction init(browserOptions = {}) {\n const options = applyDefaultOptions(browserOptions);\n\n if (!options.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) {\n if (DEBUG_BUILD) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(\n '[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',\n );\n });\n }\n return;\n }\n\n if (DEBUG_BUILD && !supportsFetch()) {\n logger.warn(\n 'No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.',\n );\n }\n const clientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || makeFetchTransport,\n };\n\n return initAndBind(BrowserClient, clientOptions);\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nfunction showReportDialog(options = {}) {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n DEBUG_BUILD && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const scope = getCurrentScope();\n const client = scope.getClient();\n const dsn = client?.getDsn();\n\n if (!dsn) {\n DEBUG_BUILD && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n const eventId = lastEventId();\n if (eventId) {\n options.eventId = eventId;\n }\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const { onClose } = options;\n if (onClose) {\n const reportDialogClosedMessageHandler = (event) => {\n if (event.data === '__sentry_reportdialog_closed__') {\n try {\n onClose();\n } finally {\n WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n }\n }\n };\n WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n DEBUG_BUILD && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction forceLoad() {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction onLoad(callback) {\n callback();\n}\n\nexport { applyDefaultOptions, forceLoad, getDefaultIntegrations, init, onLoad, showReportDialog };\n//# sourceMappingURL=sdk.js.map\n","import { GLOBAL_OBJ, normalize, fill, htmlTreeAsString, browserPerformanceTimeOrigin, logger as logger$1, severityLevelFromString, captureException, addBreadcrumb, uuid4, getClient, getLocationHref, getCurrentScope, getActiveSpan, getDynamicSamplingContextFromSpan, isSentryRequestUrl, dropUndefinedKeys, stringMatchesSomePattern, addEventProcessor, createEnvelope, createEventEnvelopeHeaders, getSdkMetadataForEnvelopeHeader, prepareEvent, getIsolationScope, resolvedSyncPromise, updateRateLimits, isRateLimited, setContext, getRootSpan, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, isBrowser, parseSampleRate, consoleSandbox } from '@sentry/core';\nimport { setTimeout as setTimeout$3, addPerformanceInstrumentationHandler, addLcpInstrumentationHandler, addClsInstrumentationHandler, addFidInstrumentationHandler, addInpInstrumentationHandler, serializeFormData, getFetchRequestArgBody, getBodyString, SENTRY_XHR_DATA_KEY, addClickKeypressInstrumentationHandler, addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';\n\n// exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`\n// prevents the browser package from being bundled in the CDN bundle, and avoids a\n// circular dependency between the browser and replay packages should `@sentry/browser` import\n// from `@sentry/replay` in the future\nconst WINDOW = GLOBAL_OBJ ;\n\nconst REPLAY_SESSION_KEY = 'sentryReplaySession';\nconst REPLAY_EVENT_NAME = 'replay_event';\nconst UNABLE_TO_SEND_REPLAY = 'Unable to send Replay';\n\n// The idle limit for a session after which recording is paused.\nconst SESSION_IDLE_PAUSE_DURATION = 300000; // 5 minutes in ms\n\n// The idle limit for a session after which the session expires.\nconst SESSION_IDLE_EXPIRE_DURATION = 900000; // 15 minutes in ms\n\n/** Default flush delays */\nconst DEFAULT_FLUSH_MIN_DELAY = 5000;\n// XXX: Temp fix for our debounce logic where `maxWait` would never occur if it\n// was the same as `wait`\nconst DEFAULT_FLUSH_MAX_DELAY = 5500;\n\n/* How long to wait for error checkouts */\nconst BUFFER_CHECKOUT_TIME = 60000;\n\nconst RETRY_BASE_INTERVAL = 5000;\nconst RETRY_MAX_COUNT = 3;\n\n/* The max (uncompressed) size in bytes of a network body. Any body larger than this will be truncated. */\nconst NETWORK_BODY_MAX_SIZE = 150000;\n\n/* The max size of a single console arg that is captured. Any arg larger than this will be truncated. */\nconst CONSOLE_ARG_MAX_SIZE = 5000;\n\n/* Min. time to wait before we consider something a slow click. */\nconst SLOW_CLICK_THRESHOLD = 3000;\n/* For scroll actions after a click, we only look for a very short time period to detect programmatic scrolling. */\nconst SLOW_CLICK_SCROLL_TIMEOUT = 300;\n\n/** When encountering a total segment size exceeding this size, stop the replay (as we cannot properly ingest it). */\nconst REPLAY_MAX_EVENT_BUFFER_SIZE = 20000000; // ~20MB\n\n/** Replays must be min. 5s long before we send them. */\nconst MIN_REPLAY_DURATION = 4999;\n/* The max. allowed value that the minReplayDuration can be set to. */\nconst MIN_REPLAY_DURATION_LIMIT = 15000;\n\n/** The max. length of a replay. */\nconst MAX_REPLAY_DURATION = 3600000; // 60 minutes in ms;\n\nvar __defProp$1 = Object.defineProperty;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar NodeType$2 = /* @__PURE__ */ ((NodeType2) => {\n NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n return NodeType2;\n})(NodeType$2 || {});\nfunction isElement$1(n2) {\n return n2.nodeType === n2.ELEMENT_NODE;\n}\nfunction isShadowRoot(n2) {\n const host = n2?.host;\n return Boolean(host?.shadowRoot === n2);\n}\nfunction isNativeShadowDom(shadowRoot) {\n return Object.prototype.toString.call(shadowRoot) === \"[object ShadowRoot]\";\n}\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n if (cssText.includes(\" background-clip: text;\") && !cssText.includes(\" -webkit-background-clip: text;\")) {\n cssText = cssText.replace(\n /\\sbackground-clip:\\s*text;/g,\n \" -webkit-background-clip: text; background-clip: text;\"\n );\n }\n return cssText;\n}\nfunction escapeImportStatement(rule) {\n const { cssText } = rule;\n if (cssText.split('\"').length < 3) return cssText;\n const statement = [\"@import\", `url(${JSON.stringify(rule.href)})`];\n if (rule.layerName === \"\") {\n statement.push(`layer`);\n } else if (rule.layerName) {\n statement.push(`layer(${rule.layerName})`);\n }\n if (rule.supportsText) {\n statement.push(`supports(${rule.supportsText})`);\n }\n if (rule.media.length) {\n statement.push(rule.media.mediaText);\n }\n return statement.join(\" \") + \";\";\n}\nfunction stringifyStylesheet(s2) {\n try {\n const rules2 = s2.rules || s2.cssRules;\n return rules2 ? fixBrowserCompatibilityIssuesInCSS(\n Array.from(rules2, stringifyRule).join(\"\")\n ) : null;\n } catch (error) {\n return null;\n }\n}\nfunction fixAllCssProperty(rule) {\n let styles = \"\";\n for (let i2 = 0; i2 < rule.style.length; i2++) {\n const styleDeclaration = rule.style;\n const attribute = styleDeclaration[i2];\n const isImportant = styleDeclaration.getPropertyPriority(attribute);\n styles += `${attribute}:${styleDeclaration.getPropertyValue(attribute)}${isImportant ? ` !important` : \"\"};`;\n }\n return `${rule.selectorText} { ${styles} }`;\n}\nfunction stringifyRule(rule) {\n let importStringified;\n if (isCSSImportRule(rule)) {\n try {\n importStringified = // for same-origin stylesheets,\n // we can access the imported stylesheet rules directly\n stringifyStylesheet(rule.styleSheet) || // work around browser issues with the raw string `@import url(...)` statement\n escapeImportStatement(rule);\n } catch (error) {\n }\n } else if (isCSSStyleRule(rule)) {\n let cssText = rule.cssText;\n const needsSafariColonFix = rule.selectorText.includes(\":\");\n const needsAllFix = typeof rule.style[\"all\"] === \"string\" && rule.style[\"all\"];\n if (needsAllFix) {\n cssText = fixAllCssProperty(rule);\n }\n if (needsSafariColonFix) {\n cssText = fixSafariColons(cssText);\n }\n if (needsSafariColonFix || needsAllFix) {\n return cssText;\n }\n }\n return importStringified || rule.cssText;\n}\nfunction fixSafariColons(cssStringified) {\n const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n return cssStringified.replace(regex, \"$1\\\\$2\");\n}\nfunction isCSSImportRule(rule) {\n return \"styleSheet\" in rule;\n}\nfunction isCSSStyleRule(rule) {\n return \"selectorText\" in rule;\n}\nclass Mirror {\n constructor() {\n __publicField$1(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n __publicField$1(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n }\n getId(n2) {\n if (!n2) return -1;\n const id = this.getMeta(n2)?.id;\n return id ?? -1;\n }\n getNode(id) {\n return this.idNodeMap.get(id) || null;\n }\n getIds() {\n return Array.from(this.idNodeMap.keys());\n }\n getMeta(n2) {\n return this.nodeMetaMap.get(n2) || null;\n }\n // removes the node from idNodeMap\n // doesn't remove the node from nodeMetaMap\n removeNodeFromMap(n2) {\n const id = this.getId(n2);\n this.idNodeMap.delete(id);\n if (n2.childNodes) {\n n2.childNodes.forEach(\n (childNode) => this.removeNodeFromMap(childNode)\n );\n }\n }\n has(id) {\n return this.idNodeMap.has(id);\n }\n hasNode(node) {\n return this.nodeMetaMap.has(node);\n }\n add(n2, meta) {\n const id = meta.id;\n this.idNodeMap.set(id, n2);\n this.nodeMetaMap.set(n2, meta);\n }\n replace(id, n2) {\n const oldNode = this.getNode(id);\n if (oldNode) {\n const meta = this.nodeMetaMap.get(oldNode);\n if (meta) this.nodeMetaMap.set(n2, meta);\n }\n this.idNodeMap.set(id, n2);\n }\n reset() {\n this.idNodeMap = /* @__PURE__ */ new Map();\n this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n }\n}\nfunction createMirror$2() {\n return new Mirror();\n}\nfunction shouldMaskInput({\n maskInputOptions,\n tagName,\n type\n}) {\n if (tagName === \"OPTION\") {\n tagName = \"SELECT\";\n }\n return Boolean(\n maskInputOptions[tagName.toLowerCase()] || type && maskInputOptions[type] || type === \"password\" || // Default to \"text\" option for inputs without a \"type\" attribute defined\n tagName === \"INPUT\" && !type && maskInputOptions[\"text\"]\n );\n}\nfunction maskInputValue({\n isMasked,\n element,\n value,\n maskInputFn\n}) {\n let text = value || \"\";\n if (!isMasked) {\n return text;\n }\n if (maskInputFn) {\n text = maskInputFn(text, element);\n }\n return \"*\".repeat(text.length);\n}\nfunction toLowerCase(str) {\n return str.toLowerCase();\n}\nfunction toUpperCase(str) {\n return str.toUpperCase();\n}\nconst ORIGINAL_ATTRIBUTE_NAME = \"__rrweb_original__\";\nfunction is2DCanvasBlank(canvas) {\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) return true;\n const chunkSize = 50;\n for (let x = 0; x < canvas.width; x += chunkSize) {\n for (let y = 0; y < canvas.height; y += chunkSize) {\n const getImageData = ctx.getImageData;\n const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;\n const pixelBuffer = new Uint32Array(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n originalGetImageData.call(\n ctx,\n x,\n y,\n Math.min(chunkSize, canvas.width - x),\n Math.min(chunkSize, canvas.height - y)\n ).data.buffer\n );\n if (pixelBuffer.some((pixel) => pixel !== 0)) return false;\n }\n }\n return true;\n}\nfunction getInputType(element) {\n const type = element.type;\n return element.hasAttribute(\"data-rr-is-password\") ? \"password\" : type ? (\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n toLowerCase(type)\n ) : null;\n}\nfunction getInputValue(el, tagName, type) {\n if (tagName === \"INPUT\" && (type === \"radio\" || type === \"checkbox\")) {\n return el.getAttribute(\"value\") || \"\";\n }\n return el.value;\n}\nfunction extractFileExtension(path, baseURL) {\n let url;\n try {\n url = new URL(path, baseURL ?? window.location.href);\n } catch (err) {\n return null;\n }\n const regex = /\\.([0-9a-z]+)(?:$)/i;\n const match = url.pathname.match(regex);\n return match?.[1] ?? null;\n}\nconst cachedImplementations$1 = {};\nfunction getImplementation$1(name) {\n const cached = cachedImplementations$1[name];\n if (cached) {\n return cached;\n }\n const document2 = window.document;\n let impl = window[name];\n if (document2 && typeof document2.createElement === \"function\") {\n try {\n const sandbox = document2.createElement(\"iframe\");\n sandbox.hidden = true;\n document2.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow[name]) {\n impl = // eslint-disable-next-line @typescript-eslint/unbound-method\n contentWindow[name];\n }\n document2.head.removeChild(sandbox);\n } catch (e2) {\n }\n }\n return cachedImplementations$1[name] = impl.bind(\n window\n );\n}\nfunction setTimeout$2(...rest) {\n return getImplementation$1(\"setTimeout\")(...rest);\n}\nfunction clearTimeout$1(...rest) {\n return getImplementation$1(\"clearTimeout\")(...rest);\n}\nfunction getIframeContentDocument(iframe) {\n try {\n return iframe.contentDocument;\n } catch (e2) {\n }\n}\nlet _id = 1;\nconst tagNameRegex = new RegExp(\"[^a-z0-9-_:]\");\nconst IGNORED_NODE = -2;\nfunction genId() {\n return _id++;\n}\nfunction getValidTagName$1(element) {\n if (element instanceof HTMLFormElement) {\n return \"form\";\n }\n const processedTagName = toLowerCase(element.tagName);\n if (tagNameRegex.test(processedTagName)) {\n return \"div\";\n }\n return processedTagName;\n}\nfunction extractOrigin(url) {\n let origin = \"\";\n if (url.indexOf(\"//\") > -1) {\n origin = url.split(\"/\").slice(0, 3).join(\"/\");\n } else {\n origin = url.split(\"/\")[0];\n }\n origin = origin.split(\"?\")[0];\n return origin;\n}\nlet canvasService;\nlet canvasCtx;\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nfunction absoluteToStylesheet(cssText, href) {\n return (cssText || \"\").replace(\n URL_IN_CSS_REF,\n (origin, quote1, path1, quote2, path2, path3) => {\n const filePath = path1 || path2 || path3;\n const maybeQuote = quote1 || quote2 || \"\";\n if (!filePath) {\n return origin;\n }\n if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (DATA_URI.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (filePath[0] === \"/\") {\n return `url(${maybeQuote}${extractOrigin(href) + filePath}${maybeQuote})`;\n }\n const stack = href.split(\"/\");\n const parts = filePath.split(\"/\");\n stack.pop();\n for (const part of parts) {\n if (part === \".\") {\n continue;\n } else if (part === \"..\") {\n stack.pop();\n } else {\n stack.push(part);\n }\n }\n return `url(${maybeQuote}${stack.join(\"/\")}${maybeQuote})`;\n }\n );\n}\nconst SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nconst SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n if (attributeValue.trim() === \"\") {\n return attributeValue;\n }\n let pos = 0;\n function collectCharacters(regEx) {\n let chars2;\n const match = regEx.exec(attributeValue.substring(pos));\n if (match) {\n chars2 = match[0];\n pos += chars2.length;\n return chars2;\n }\n return \"\";\n }\n const output = [];\n while (true) {\n collectCharacters(SRCSET_COMMAS_OR_SPACES);\n if (pos >= attributeValue.length) {\n break;\n }\n let url = collectCharacters(SRCSET_NOT_SPACES);\n if (url.slice(-1) === \",\") {\n url = absoluteToDoc(doc, url.substring(0, url.length - 1));\n output.push(url);\n } else {\n let descriptorsStr = \"\";\n url = absoluteToDoc(doc, url);\n let inParens = false;\n while (true) {\n const c2 = attributeValue.charAt(pos);\n if (c2 === \"\") {\n output.push((url + descriptorsStr).trim());\n break;\n } else if (!inParens) {\n if (c2 === \",\") {\n pos += 1;\n output.push((url + descriptorsStr).trim());\n break;\n } else if (c2 === \"(\") {\n inParens = true;\n }\n } else {\n if (c2 === \")\") {\n inParens = false;\n }\n }\n descriptorsStr += c2;\n pos += 1;\n }\n }\n }\n return output.join(\", \");\n}\nconst cachedDocument = /* @__PURE__ */ new WeakMap();\nfunction absoluteToDoc(doc, attributeValue) {\n if (!attributeValue || attributeValue.trim() === \"\") {\n return attributeValue;\n }\n return getHref(doc, attributeValue);\n}\nfunction isSVGElement(el) {\n return Boolean(el.tagName === \"svg\" || el.ownerSVGElement);\n}\nfunction getHref(doc, customHref) {\n let a2 = cachedDocument.get(doc);\n if (!a2) {\n a2 = doc.createElement(\"a\");\n cachedDocument.set(doc, a2);\n }\n if (!customHref) {\n customHref = \"\";\n } else if (customHref.startsWith(\"blob:\") || customHref.startsWith(\"data:\")) {\n return customHref;\n }\n a2.setAttribute(\"href\", customHref);\n return a2.href;\n}\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn) {\n if (!value) {\n return value;\n }\n if (name === \"src\" || name === \"href\" && !(tagName === \"use\" && value[0] === \"#\")) {\n return absoluteToDoc(doc, value);\n } else if (name === \"xlink:href\" && value[0] !== \"#\") {\n return absoluteToDoc(doc, value);\n } else if (name === \"background\" && (tagName === \"table\" || tagName === \"td\" || tagName === \"th\")) {\n return absoluteToDoc(doc, value);\n } else if (name === \"srcset\") {\n return getAbsoluteSrcsetString(doc, value);\n } else if (name === \"style\") {\n return absoluteToStylesheet(value, getHref(doc));\n } else if (tagName === \"object\" && name === \"data\") {\n return absoluteToDoc(doc, value);\n }\n if (typeof maskAttributeFn === \"function\") {\n return maskAttributeFn(name, value, element);\n }\n return value;\n}\nfunction ignoreAttribute(tagName, name, _value) {\n return (tagName === \"video\" || tagName === \"audio\") && name === \"autoplay\";\n}\nfunction _isBlockedElement(element, blockClass, blockSelector, unblockSelector) {\n try {\n if (unblockSelector && element.matches(unblockSelector)) {\n return false;\n }\n if (typeof blockClass === \"string\") {\n if (element.classList.contains(blockClass)) {\n return true;\n }\n } else {\n for (let eIndex = element.classList.length; eIndex--; ) {\n const className = element.classList[eIndex];\n if (blockClass.test(className)) {\n return true;\n }\n }\n }\n if (blockSelector) {\n return element.matches(blockSelector);\n }\n } catch (e2) {\n }\n return false;\n}\nfunction elementClassMatchesRegex(el, regex) {\n for (let eIndex = el.classList.length; eIndex--; ) {\n const className = el.classList[eIndex];\n if (regex.test(className)) {\n return true;\n }\n }\n return false;\n}\nfunction distanceToMatch(node, matchPredicate, limit = Infinity, distance = 0) {\n if (!node) return -1;\n if (node.nodeType !== node.ELEMENT_NODE) return -1;\n if (distance > limit) return -1;\n if (matchPredicate(node)) return distance;\n return distanceToMatch(node.parentNode, matchPredicate, limit, distance + 1);\n}\nfunction createMatchPredicate(className, selector) {\n return (node) => {\n const el = node;\n if (el === null) return false;\n try {\n if (className) {\n if (typeof className === \"string\") {\n if (el.matches(`.${className}`)) return true;\n } else if (elementClassMatchesRegex(el, className)) {\n return true;\n }\n }\n if (selector && el.matches(selector)) return true;\n return false;\n } catch {\n return false;\n }\n };\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) {\n try {\n const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n if (el === null) return false;\n if (el.tagName === \"INPUT\") {\n const autocomplete = el.getAttribute(\"autocomplete\");\n const disallowedAutocompleteValues = [\n \"current-password\",\n \"new-password\",\n \"cc-number\",\n \"cc-exp\",\n \"cc-exp-month\",\n \"cc-exp-year\",\n \"cc-csc\"\n ];\n if (disallowedAutocompleteValues.includes(autocomplete)) {\n return true;\n }\n }\n let maskDistance = -1;\n let unmaskDistance = -1;\n if (maskAllText) {\n unmaskDistance = distanceToMatch(\n el,\n createMatchPredicate(unmaskTextClass, unmaskTextSelector)\n );\n if (unmaskDistance < 0) {\n return true;\n }\n maskDistance = distanceToMatch(\n el,\n createMatchPredicate(maskTextClass, maskTextSelector),\n unmaskDistance >= 0 ? unmaskDistance : Infinity\n );\n } else {\n maskDistance = distanceToMatch(\n el,\n createMatchPredicate(maskTextClass, maskTextSelector)\n );\n if (maskDistance < 0) {\n return false;\n }\n unmaskDistance = distanceToMatch(\n el,\n createMatchPredicate(unmaskTextClass, unmaskTextSelector),\n maskDistance >= 0 ? maskDistance : Infinity\n );\n }\n return maskDistance >= 0 ? unmaskDistance >= 0 ? maskDistance <= unmaskDistance : true : unmaskDistance >= 0 ? false : !!maskAllText;\n } catch (e2) {\n }\n return !!maskAllText;\n}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n const win = iframeEl.contentWindow;\n if (!win) {\n return;\n }\n let fired = false;\n let readyState;\n try {\n readyState = win.document.readyState;\n } catch (error) {\n return;\n }\n if (readyState !== \"complete\") {\n const timer = setTimeout$2(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, iframeLoadTimeout);\n iframeEl.addEventListener(\"load\", () => {\n clearTimeout$1(timer);\n fired = true;\n listener();\n });\n return;\n }\n const blankUrl = \"about:blank\";\n if (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === \"\") {\n setTimeout$2(listener, 0);\n return iframeEl.addEventListener(\"load\", listener);\n }\n iframeEl.addEventListener(\"load\", listener);\n}\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n let fired = false;\n let styleSheetLoaded;\n try {\n styleSheetLoaded = link.sheet;\n } catch (error) {\n return;\n }\n if (styleSheetLoaded) return;\n const timer = setTimeout$2(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, styleSheetLoadTimeout);\n link.addEventListener(\"load\", () => {\n clearTimeout$1(timer);\n fired = true;\n listener();\n });\n}\nfunction serializeNode(n2, options) {\n const {\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskAttributeFn,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskInputOptions = {},\n maskTextFn,\n maskInputFn,\n dataURLOptions = {},\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement = false\n } = options;\n const rootId = getRootId(doc, mirror2);\n switch (n2.nodeType) {\n case n2.DOCUMENT_NODE:\n if (n2.compatMode !== \"CSS1Compat\") {\n return {\n type: NodeType$2.Document,\n childNodes: [],\n compatMode: n2.compatMode\n // probably \"BackCompat\"\n };\n } else {\n return {\n type: NodeType$2.Document,\n childNodes: []\n };\n }\n case n2.DOCUMENT_TYPE_NODE:\n return {\n type: NodeType$2.DocumentType,\n name: n2.name,\n publicId: n2.publicId,\n systemId: n2.systemId,\n rootId\n };\n case n2.ELEMENT_NODE:\n return serializeElementNode(n2, {\n doc,\n blockClass,\n blockSelector,\n unblockSelector,\n inlineStylesheet,\n maskAttributeFn,\n maskInputOptions,\n maskInputFn,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement,\n rootId,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector\n });\n case n2.TEXT_NODE:\n return serializeTextNode(n2, {\n doc,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n maskTextFn,\n maskInputOptions,\n maskInputFn,\n rootId\n });\n case n2.CDATA_SECTION_NODE:\n return {\n type: NodeType$2.CDATA,\n textContent: \"\",\n rootId\n };\n case n2.COMMENT_NODE:\n return {\n type: NodeType$2.Comment,\n textContent: n2.textContent || \"\",\n rootId\n };\n default:\n return false;\n }\n}\nfunction getRootId(doc, mirror2) {\n if (!mirror2.hasNode(doc)) return undefined;\n const docId = mirror2.getId(doc);\n return docId === 1 ? undefined : docId;\n}\nfunction serializeTextNode(n2, options) {\n const {\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n maskTextFn,\n maskInputOptions,\n maskInputFn,\n rootId\n } = options;\n const parentTagName = n2.parentNode && n2.parentNode.tagName;\n let textContent = n2.textContent;\n const isStyle = parentTagName === \"STYLE\" ? true : undefined;\n const isScript = parentTagName === \"SCRIPT\" ? true : undefined;\n const isTextarea = parentTagName === \"TEXTAREA\" ? true : undefined;\n if (isStyle && textContent) {\n try {\n if (n2.nextSibling || n2.previousSibling) {\n } else if (n2.parentNode.sheet?.cssRules) {\n textContent = stringifyStylesheet(\n n2.parentNode.sheet\n );\n }\n } catch (err) {\n console.warn(\n `Cannot get CSS styles from text's parentNode. Error: ${err}`,\n n2\n );\n }\n textContent = absoluteToStylesheet(textContent, getHref(options.doc));\n }\n if (isScript) {\n textContent = \"SCRIPT_PLACEHOLDER\";\n }\n const forceMask = needMaskingText(\n n2,\n maskTextClass,\n maskTextSelector,\n unmaskTextClass,\n unmaskTextSelector,\n maskAllText\n );\n if (!isStyle && !isScript && !isTextarea && textContent && forceMask) {\n textContent = maskTextFn ? maskTextFn(textContent, n2.parentElement) : textContent.replace(/[\\S]/g, \"*\");\n }\n if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) {\n textContent = maskInputFn ? maskInputFn(textContent, n2.parentNode) : textContent.replace(/[\\S]/g, \"*\");\n }\n if (parentTagName === \"OPTION\" && textContent) {\n const isInputMasked = shouldMaskInput({\n type: null,\n tagName: parentTagName,\n maskInputOptions\n });\n textContent = maskInputValue({\n isMasked: needMaskingText(\n n2,\n maskTextClass,\n maskTextSelector,\n unmaskTextClass,\n unmaskTextSelector,\n isInputMasked\n ),\n element: n2,\n value: textContent,\n maskInputFn\n });\n }\n return {\n type: NodeType$2.Text,\n textContent: textContent || \"\",\n isStyle,\n rootId\n };\n}\nfunction serializeElementNode(n2, options) {\n const {\n doc,\n blockClass,\n blockSelector,\n unblockSelector,\n inlineStylesheet,\n maskInputOptions = {},\n maskAttributeFn,\n maskInputFn,\n dataURLOptions = {},\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement = false,\n rootId,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector\n } = options;\n const needBlock = _isBlockedElement(\n n2,\n blockClass,\n blockSelector,\n unblockSelector\n );\n const tagName = getValidTagName$1(n2);\n let attributes2 = {};\n const len = n2.attributes.length;\n for (let i2 = 0; i2 < len; i2++) {\n const attr = n2.attributes[i2];\n if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {\n attributes2[attr.name] = transformAttribute(\n doc,\n tagName,\n toLowerCase(attr.name),\n attr.value,\n n2,\n maskAttributeFn\n );\n }\n }\n if (tagName === \"link\" && inlineStylesheet) {\n const stylesheet = Array.from(doc.styleSheets).find((s2) => {\n return s2.href === n2.href;\n });\n let cssText = null;\n if (stylesheet) {\n cssText = stringifyStylesheet(stylesheet);\n }\n if (cssText) {\n attributes2.rel = null;\n attributes2.href = null;\n attributes2.crossorigin = null;\n attributes2._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n }\n }\n if (tagName === \"style\" && n2.sheet && // TODO: Currently we only try to get dynamic stylesheet when it is an empty style element\n !(n2.innerText || n2.textContent || \"\").trim().length) {\n const cssText = stringifyStylesheet(\n n2.sheet\n );\n if (cssText) {\n attributes2._cssText = absoluteToStylesheet(cssText, getHref(doc));\n }\n }\n if (tagName === \"input\" || tagName === \"textarea\" || tagName === \"select\" || tagName === \"option\") {\n const el = n2;\n const type = getInputType(el);\n const value = getInputValue(el, toUpperCase(tagName), type);\n const checked = el.checked;\n if (type !== \"submit\" && type !== \"button\" && value) {\n const forceMask = needMaskingText(\n el,\n maskTextClass,\n maskTextSelector,\n unmaskTextClass,\n unmaskTextSelector,\n shouldMaskInput({\n type,\n tagName: toUpperCase(tagName),\n maskInputOptions\n })\n );\n attributes2.value = maskInputValue({\n isMasked: forceMask,\n element: el,\n value,\n maskInputFn\n });\n }\n if (checked) {\n attributes2.checked = checked;\n }\n }\n if (tagName === \"option\") {\n if (n2.selected && !maskInputOptions[\"select\"]) {\n attributes2.selected = true;\n } else {\n delete attributes2.selected;\n }\n }\n if (tagName === \"canvas\" && recordCanvas) {\n if (n2.__context === \"2d\") {\n if (!is2DCanvasBlank(n2)) {\n attributes2.rr_dataURL = n2.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n }\n } else if (!(\"__context\" in n2)) {\n const canvasDataURL = n2.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n const blankCanvas = doc.createElement(\"canvas\");\n blankCanvas.width = n2.width;\n blankCanvas.height = n2.height;\n const blankCanvasDataURL = blankCanvas.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n if (canvasDataURL !== blankCanvasDataURL) {\n attributes2.rr_dataURL = canvasDataURL;\n }\n }\n }\n if (tagName === \"img\" && inlineImages) {\n if (!canvasService) {\n canvasService = doc.createElement(\"canvas\");\n canvasCtx = canvasService.getContext(\"2d\");\n }\n const image = n2;\n const imageSrc = image.currentSrc || image.getAttribute(\"src\") || \"\";\n const priorCrossOrigin = image.crossOrigin;\n const recordInlineImage = () => {\n image.removeEventListener(\"load\", recordInlineImage);\n try {\n canvasService.width = image.naturalWidth;\n canvasService.height = image.naturalHeight;\n canvasCtx.drawImage(image, 0, 0);\n attributes2.rr_dataURL = canvasService.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n } catch (err) {\n if (image.crossOrigin !== \"anonymous\") {\n image.crossOrigin = \"anonymous\";\n if (image.complete && image.naturalWidth !== 0)\n recordInlineImage();\n else image.addEventListener(\"load\", recordInlineImage);\n return;\n } else {\n console.warn(\n `Cannot inline img src=${imageSrc}! Error: ${err}`\n );\n }\n }\n if (image.crossOrigin === \"anonymous\") {\n priorCrossOrigin ? attributes2.crossOrigin = priorCrossOrigin : image.removeAttribute(\"crossorigin\");\n }\n };\n if (image.complete && image.naturalWidth !== 0) recordInlineImage();\n else image.addEventListener(\"load\", recordInlineImage);\n }\n if (tagName === \"audio\" || tagName === \"video\") {\n attributes2.rr_mediaState = n2.paused ? \"paused\" : \"played\";\n attributes2.rr_mediaCurrentTime = n2.currentTime;\n }\n if (!newlyAddedElement) {\n if (n2.scrollLeft) {\n attributes2.rr_scrollLeft = n2.scrollLeft;\n }\n if (n2.scrollTop) {\n attributes2.rr_scrollTop = n2.scrollTop;\n }\n }\n if (needBlock) {\n const { width, height } = n2.getBoundingClientRect();\n attributes2 = {\n class: attributes2.class,\n rr_width: `${width}px`,\n rr_height: `${height}px`\n };\n }\n if (tagName === \"iframe\" && !keepIframeSrcFn(attributes2.src)) {\n if (!needBlock && !getIframeContentDocument(n2)) {\n attributes2.rr_src = attributes2.src;\n }\n delete attributes2.src;\n }\n let isCustomElement;\n try {\n if (customElements.get(tagName)) isCustomElement = true;\n } catch (e2) {\n }\n return {\n type: NodeType$2.Element,\n tagName,\n attributes: attributes2,\n childNodes: [],\n isSVG: isSVGElement(n2) || undefined,\n needBlock,\n rootId,\n isCustom: isCustomElement\n };\n}\nfunction lowerIfExists(maybeAttr) {\n if (maybeAttr === undefined || maybeAttr === null) {\n return \"\";\n } else {\n return maybeAttr.toLowerCase();\n }\n}\nfunction slimDOMExcluded(sn, slimDOMOptions) {\n if (slimDOMOptions.comment && sn.type === NodeType$2.Comment) {\n return true;\n } else if (sn.type === NodeType$2.Element) {\n if (slimDOMOptions.script && // script tag\n (sn.tagName === \"script\" || // (module)preload link\n sn.tagName === \"link\" && (sn.attributes.rel === \"preload\" || sn.attributes.rel === \"modulepreload\") || // prefetch link\n sn.tagName === \"link\" && sn.attributes.rel === \"prefetch\" && typeof sn.attributes.href === \"string\" && extractFileExtension(sn.attributes.href) === \"js\")) {\n return true;\n } else if (slimDOMOptions.headFavicon && (sn.tagName === \"link\" && sn.attributes.rel === \"shortcut icon\" || sn.tagName === \"meta\" && (lowerIfExists(sn.attributes.name).match(\n /^msapplication-tile(image|color)$/\n ) || lowerIfExists(sn.attributes.name) === \"application-name\" || lowerIfExists(sn.attributes.rel) === \"icon\" || lowerIfExists(sn.attributes.rel) === \"apple-touch-icon\" || lowerIfExists(sn.attributes.rel) === \"shortcut icon\"))) {\n return true;\n } else if (sn.tagName === \"meta\") {\n if (slimDOMOptions.headMetaDescKeywords && lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\n return true;\n } else if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || // og = opengraph (facebook)\n lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || lowerIfExists(sn.attributes.name) === \"pinterest\")) {\n return true;\n } else if (slimDOMOptions.headMetaRobots && (lowerIfExists(sn.attributes.name) === \"robots\" || lowerIfExists(sn.attributes.name) === \"googlebot\" || lowerIfExists(sn.attributes.name) === \"bingbot\")) {\n return true;\n } else if (slimDOMOptions.headMetaHttpEquiv && sn.attributes[\"http-equiv\"] !== undefined) {\n return true;\n } else if (slimDOMOptions.headMetaAuthorship && (lowerIfExists(sn.attributes.name) === \"author\" || lowerIfExists(sn.attributes.name) === \"generator\" || lowerIfExists(sn.attributes.name) === \"framework\" || lowerIfExists(sn.attributes.name) === \"publisher\" || lowerIfExists(sn.attributes.name) === \"progid\" || lowerIfExists(sn.attributes.property).match(/^article:/) || lowerIfExists(sn.attributes.property).match(/^product:/))) {\n return true;\n } else if (slimDOMOptions.headMetaVerification && (lowerIfExists(sn.attributes.name) === \"google-site-verification\" || lowerIfExists(sn.attributes.name) === \"yandex-verification\" || lowerIfExists(sn.attributes.name) === \"csrf-token\" || lowerIfExists(sn.attributes.name) === \"p:domain_verify\" || lowerIfExists(sn.attributes.name) === \"verify-v1\" || lowerIfExists(sn.attributes.name) === \"verification\" || lowerIfExists(sn.attributes.name) === \"shopify-checkout-api-token\")) {\n return true;\n }\n }\n }\n return false;\n}\nfunction serializeNodeWithId(n2, options) {\n const {\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild = false,\n inlineStylesheet = true,\n maskInputOptions = {},\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions = {},\n inlineImages = false,\n recordCanvas = false,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout = 5e3,\n onStylesheetLoad,\n stylesheetLoadTimeout = 5e3,\n keepIframeSrcFn = () => false,\n newlyAddedElement = false\n } = options;\n let { preserveWhiteSpace = true } = options;\n const _serializedNode = serializeNode(n2, {\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n maskAllText,\n unblockSelector,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement\n });\n if (!_serializedNode) {\n console.warn(n2, \"not serialized\");\n return null;\n }\n let id;\n if (mirror2.hasNode(n2)) {\n id = mirror2.getId(n2);\n } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType$2.Text && !_serializedNode.isStyle && !_serializedNode.textContent.replace(/^\\s+|\\s+$/gm, \"\").length) {\n id = IGNORED_NODE;\n } else {\n id = genId();\n }\n const serializedNode2 = Object.assign(_serializedNode, { id });\n mirror2.add(n2, serializedNode2);\n if (id === IGNORED_NODE) {\n return null;\n }\n if (onSerialize) {\n onSerialize(n2);\n }\n let recordChild = !skipChild;\n if (serializedNode2.type === NodeType$2.Element) {\n recordChild = recordChild && !serializedNode2.needBlock;\n delete serializedNode2.needBlock;\n const shadowRoot = n2.shadowRoot;\n if (shadowRoot && isNativeShadowDom(shadowRoot))\n serializedNode2.isShadowHost = true;\n }\n if ((serializedNode2.type === NodeType$2.Document || serializedNode2.type === NodeType$2.Element) && recordChild) {\n if (slimDOMOptions.headWhitespace && serializedNode2.type === NodeType$2.Element && serializedNode2.tagName === \"head\") {\n preserveWhiteSpace = false;\n }\n const bypassOptions = {\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n maskAllText,\n unblockSelector,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn\n };\n for (const childN of Array.from(n2.childNodes)) {\n const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n if (serializedChildNode) {\n serializedNode2.childNodes.push(serializedChildNode);\n }\n }\n if (isElement$1(n2) && n2.shadowRoot) {\n for (const childN of Array.from(n2.shadowRoot.childNodes)) {\n const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n if (serializedChildNode) {\n isNativeShadowDom(n2.shadowRoot) && (serializedChildNode.isShadow = true);\n serializedNode2.childNodes.push(serializedChildNode);\n }\n }\n }\n }\n if (n2.parentNode && isShadowRoot(n2.parentNode) && isNativeShadowDom(n2.parentNode)) {\n serializedNode2.isShadow = true;\n }\n if (serializedNode2.type === NodeType$2.Element && serializedNode2.tagName === \"iframe\" && !_isBlockedElement(\n n2,\n blockClass,\n blockSelector,\n unblockSelector\n )) {\n onceIframeLoaded(\n n2,\n () => {\n const iframeDoc = getIframeContentDocument(n2);\n if (iframeDoc && onIframeLoad) {\n const serializedIframeNode = serializeNodeWithId(iframeDoc, {\n doc: iframeDoc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn\n });\n if (serializedIframeNode) {\n onIframeLoad(\n n2,\n serializedIframeNode\n );\n }\n }\n },\n iframeLoadTimeout\n );\n }\n if (serializedNode2.type === NodeType$2.Element && serializedNode2.tagName === \"link\" && typeof serializedNode2.attributes.rel === \"string\" && (serializedNode2.attributes.rel === \"stylesheet\" || serializedNode2.attributes.rel === \"preload\" && typeof serializedNode2.attributes.href === \"string\" && extractFileExtension(serializedNode2.attributes.href) === \"css\")) {\n onceStylesheetLoaded(\n n2,\n () => {\n if (onStylesheetLoad) {\n const serializedLinkNode = serializeNodeWithId(n2, {\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn\n });\n if (serializedLinkNode) {\n onStylesheetLoad(\n n2,\n serializedLinkNode\n );\n }\n }\n },\n stylesheetLoadTimeout\n );\n }\n return serializedNode2;\n}\nfunction snapshot(n2, options) {\n const {\n mirror: mirror2 = new Mirror(),\n blockClass = \"rr-block\",\n blockSelector = null,\n unblockSelector = null,\n maskAllText = false,\n maskTextClass = \"rr-mask\",\n unmaskTextClass = null,\n maskTextSelector = null,\n unmaskTextSelector = null,\n inlineStylesheet = true,\n inlineImages = false,\n recordCanvas = false,\n maskAllInputs = false,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOM = false,\n dataURLOptions,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn = () => false\n } = options;\n const maskInputOptions = maskAllInputs === true ? {\n color: true,\n date: true,\n \"datetime-local\": true,\n email: true,\n month: true,\n number: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true,\n textarea: true,\n select: true\n } : maskAllInputs === false ? {} : maskAllInputs;\n const slimDOMOptions = slimDOM === true || slimDOM === \"all\" ? (\n // if true: set of sensible options that should not throw away any information\n {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaDescKeywords: slimDOM === \"all\",\n // destructive\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaAuthorship: true,\n headMetaVerification: true\n }\n ) : slimDOM === false ? {} : slimDOM;\n return serializeNodeWithId(n2, {\n doc: n2,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n newlyAddedElement: false\n });\n}\nfunction on(type, fn, target = document) {\n const options = { capture: true, passive: true };\n target.addEventListener(type, fn, options);\n return () => target.removeEventListener(type, fn, options);\n}\nconst DEPARTED_MIRROR_ACCESS_WARNING = \"Please stop import mirror directly. Instead of that,\\r\\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\\r\\nor you can use record.mirror to access the mirror instance during recording.\";\nlet _mirror = {\n map: {},\n getId() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return -1;\n },\n getNode() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return null;\n },\n removeNodeFromMap() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n },\n has() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return false;\n },\n reset() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n};\nif (typeof window !== \"undefined\" && window.Proxy && window.Reflect) {\n _mirror = new Proxy(_mirror, {\n get(target, prop, receiver) {\n if (prop === \"map\") {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n}\nfunction throttle$1(func, wait, options = {}) {\n let timeout = null;\n let previous = 0;\n return function(...args) {\n const now = Date.now();\n if (!previous && options.leading === false) {\n previous = now;\n }\n const remaining = wait - (now - previous);\n const context = this;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout$2(timeout);\n timeout = null;\n }\n previous = now;\n func.apply(context, args);\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout$1(() => {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n func.apply(context, args);\n }, remaining);\n }\n };\n}\nfunction hookSetter(target, key, d, isRevoked, win = window) {\n const original = win.Object.getOwnPropertyDescriptor(target, key);\n win.Object.defineProperty(\n target,\n key,\n isRevoked ? d : {\n set(value) {\n setTimeout$1(() => {\n d.set.call(this, value);\n }, 0);\n if (original && original.set) {\n original.set.call(this, value);\n }\n }\n }\n );\n return () => hookSetter(target, key, original || {}, true);\n}\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return () => {\n };\n }\n const original = source[name];\n const wrapped = replacement(original);\n if (typeof wrapped === \"function\") {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __rrweb_original__: {\n enumerable: false,\n value: original\n }\n });\n }\n source[name] = wrapped;\n return () => {\n source[name] = original;\n };\n } catch {\n return () => {\n };\n }\n}\nlet nowTimestamp = Date.now;\nif (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {\n nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();\n}\nfunction getWindowScroll(win) {\n const doc = win.document;\n return {\n left: doc.scrollingElement ? doc.scrollingElement.scrollLeft : win.pageXOffset !== undefined ? win.pageXOffset : doc?.documentElement.scrollLeft || doc?.body?.parentElement?.scrollLeft || doc?.body?.scrollLeft || 0,\n top: doc.scrollingElement ? doc.scrollingElement.scrollTop : win.pageYOffset !== undefined ? win.pageYOffset : doc?.documentElement.scrollTop || doc?.body?.parentElement?.scrollTop || doc?.body?.scrollTop || 0\n };\n}\nfunction getWindowHeight() {\n return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;\n}\nfunction getWindowWidth() {\n return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;\n}\nfunction closestElementOfNode(node) {\n if (!node) {\n return null;\n }\n const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n return el;\n}\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n if (!node) {\n return false;\n }\n const el = closestElementOfNode(node);\n if (!el) {\n return false;\n }\n const blockedPredicate = createMatchPredicate(blockClass, blockSelector);\n if (!checkAncestors) {\n const isUnblocked = unblockSelector && el.matches(unblockSelector);\n return blockedPredicate(el) && !isUnblocked;\n }\n const blockDistance = distanceToMatch(el, blockedPredicate);\n let unblockDistance = -1;\n if (blockDistance < 0) {\n return false;\n }\n if (unblockSelector) {\n unblockDistance = distanceToMatch(\n el,\n createMatchPredicate(null, unblockSelector)\n );\n }\n if (blockDistance > -1 && unblockDistance < 0) {\n return true;\n }\n return blockDistance < unblockDistance;\n}\nfunction isSerialized(n2, mirror2) {\n return mirror2.getId(n2) !== -1;\n}\nfunction isIgnored(n2, mirror2) {\n return mirror2.getId(n2) === IGNORED_NODE;\n}\nfunction isAncestorRemoved(target, mirror2) {\n if (isShadowRoot(target)) {\n return false;\n }\n const id = mirror2.getId(target);\n if (!mirror2.has(id)) {\n return true;\n }\n if (target.parentNode && target.parentNode.nodeType === target.DOCUMENT_NODE) {\n return false;\n }\n if (!target.parentNode) {\n return true;\n }\n return isAncestorRemoved(target.parentNode, mirror2);\n}\nfunction legacy_isTouchEvent(event) {\n return Boolean(event.changedTouches);\n}\nfunction polyfill$1(win = window) {\n if (\"NodeList\" in win && !win.NodeList.prototype.forEach) {\n win.NodeList.prototype.forEach = Array.prototype.forEach;\n }\n if (\"DOMTokenList\" in win && !win.DOMTokenList.prototype.forEach) {\n win.DOMTokenList.prototype.forEach = Array.prototype.forEach;\n }\n if (!Node.prototype.contains) {\n Node.prototype.contains = (...args) => {\n let node = args[0];\n if (!(0 in args)) {\n throw new TypeError(\"1 argument is required\");\n }\n do {\n if (this === node) {\n return true;\n }\n } while (node = node && node.parentNode);\n return false;\n };\n }\n}\nfunction isSerializedIframe(n2, mirror2) {\n return Boolean(n2.nodeName === \"IFRAME\" && mirror2.getMeta(n2));\n}\nfunction isSerializedStylesheet(n2, mirror2) {\n return Boolean(\n n2.nodeName === \"LINK\" && n2.nodeType === n2.ELEMENT_NODE && n2.getAttribute && n2.getAttribute(\"rel\") === \"stylesheet\" && mirror2.getMeta(n2)\n );\n}\nfunction hasShadowRoot(n2) {\n return Boolean(n2?.shadowRoot);\n}\nclass StyleSheetMirror {\n constructor() {\n this.id = 1;\n this.styleIDMap = /* @__PURE__ */ new WeakMap();\n this.idStyleMap = /* @__PURE__ */ new Map();\n }\n getId(stylesheet) {\n return this.styleIDMap.get(stylesheet) ?? -1;\n }\n has(stylesheet) {\n return this.styleIDMap.has(stylesheet);\n }\n /**\n * @returns If the stylesheet is in the mirror, returns the id of the stylesheet. If not, return the new assigned id.\n */\n add(stylesheet, id) {\n if (this.has(stylesheet)) return this.getId(stylesheet);\n let newId;\n if (id === undefined) {\n newId = this.id++;\n } else newId = id;\n this.styleIDMap.set(stylesheet, newId);\n this.idStyleMap.set(newId, stylesheet);\n return newId;\n }\n getStyle(id) {\n return this.idStyleMap.get(id) || null;\n }\n reset() {\n this.styleIDMap = /* @__PURE__ */ new WeakMap();\n this.idStyleMap = /* @__PURE__ */ new Map();\n this.id = 1;\n }\n generateId() {\n return this.id++;\n }\n}\nfunction getShadowHost(n2) {\n let shadowHost = null;\n if (n2.getRootNode?.()?.nodeType === Node.DOCUMENT_FRAGMENT_NODE && n2.getRootNode().host)\n shadowHost = n2.getRootNode().host;\n return shadowHost;\n}\nfunction getRootShadowHost(n2) {\n let rootShadowHost = n2;\n let shadowHost;\n while (shadowHost = getShadowHost(rootShadowHost))\n rootShadowHost = shadowHost;\n return rootShadowHost;\n}\nfunction shadowHostInDom(n2) {\n const doc = n2.ownerDocument;\n if (!doc) return false;\n const shadowHost = getRootShadowHost(n2);\n return doc.contains(shadowHost);\n}\nfunction inDom(n2) {\n const doc = n2.ownerDocument;\n if (!doc) return false;\n return doc.contains(n2) || shadowHostInDom(n2);\n}\nconst cachedImplementations = {};\nfunction getImplementation(name) {\n const cached = cachedImplementations[name];\n if (cached) {\n return cached;\n }\n const document2 = window.document;\n let impl = window[name];\n if (document2 && typeof document2.createElement === \"function\") {\n try {\n const sandbox = document2.createElement(\"iframe\");\n sandbox.hidden = true;\n document2.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow[name]) {\n impl = // eslint-disable-next-line @typescript-eslint/unbound-method\n contentWindow[name];\n }\n document2.head.removeChild(sandbox);\n } catch (e2) {\n }\n }\n return cachedImplementations[name] = impl.bind(\n window\n );\n}\nfunction onRequestAnimationFrame(...rest) {\n return getImplementation(\"requestAnimationFrame\")(...rest);\n}\nfunction setTimeout$1(...rest) {\n return getImplementation(\"setTimeout\")(...rest);\n}\nfunction clearTimeout$2(...rest) {\n return getImplementation(\"clearTimeout\")(...rest);\n}\nvar EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n return MouseInteractions2;\n})(MouseInteractions || {});\nvar PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {\n PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n return PointerTypes2;\n})(PointerTypes || {});\nvar MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {\n MediaInteractions2[MediaInteractions2[\"Play\"] = 0] = \"Play\";\n MediaInteractions2[MediaInteractions2[\"Pause\"] = 1] = \"Pause\";\n MediaInteractions2[MediaInteractions2[\"Seeked\"] = 2] = \"Seeked\";\n MediaInteractions2[MediaInteractions2[\"VolumeChange\"] = 3] = \"VolumeChange\";\n MediaInteractions2[MediaInteractions2[\"RateChange\"] = 4] = \"RateChange\";\n return MediaInteractions2;\n})(MediaInteractions || {});\nfunction getIFrameContentDocument(iframe) {\n try {\n return iframe.contentDocument;\n } catch (e2) {\n }\n}\nfunction getIFrameContentWindow(iframe) {\n try {\n return iframe.contentWindow;\n } catch (e2) {\n }\n}\nfunction isNodeInLinkedList(n2) {\n return \"__ln\" in n2;\n}\nclass DoubleLinkedList {\n constructor() {\n this.length = 0;\n this.head = null;\n this.tail = null;\n }\n get(position) {\n if (position >= this.length) {\n throw new Error(\"Position outside of list range\");\n }\n let current = this.head;\n for (let index = 0; index < position; index++) {\n current = current?.next || null;\n }\n return current;\n }\n addNode(n2) {\n const node = {\n value: n2,\n previous: null,\n next: null\n };\n n2.__ln = node;\n if (n2.previousSibling && isNodeInLinkedList(n2.previousSibling)) {\n const current = n2.previousSibling.__ln.next;\n node.next = current;\n node.previous = n2.previousSibling.__ln;\n n2.previousSibling.__ln.next = node;\n if (current) {\n current.previous = node;\n }\n } else if (n2.nextSibling && isNodeInLinkedList(n2.nextSibling) && n2.nextSibling.__ln.previous) {\n const current = n2.nextSibling.__ln.previous;\n node.previous = current;\n node.next = n2.nextSibling.__ln;\n n2.nextSibling.__ln.previous = node;\n if (current) {\n current.next = node;\n }\n } else {\n if (this.head) {\n this.head.previous = node;\n }\n node.next = this.head;\n this.head = node;\n }\n if (node.next === null) {\n this.tail = node;\n }\n this.length++;\n }\n removeNode(n2) {\n const current = n2.__ln;\n if (!this.head) {\n return;\n }\n if (!current.previous) {\n this.head = current.next;\n if (this.head) {\n this.head.previous = null;\n } else {\n this.tail = null;\n }\n } else {\n current.previous.next = current.next;\n if (current.next) {\n current.next.previous = current.previous;\n } else {\n this.tail = current.previous;\n }\n }\n if (n2.__ln) {\n delete n2.__ln;\n }\n this.length--;\n }\n}\nconst moveKey = (id, parentId) => `${id}@${parentId}`;\nclass MutationBuffer {\n constructor() {\n this.frozen = false;\n this.locked = false;\n this.texts = [];\n this.attributes = [];\n this.attributeMap = /* @__PURE__ */ new WeakMap();\n this.removes = [];\n this.mapRemoves = [];\n this.movedMap = {};\n this.addedSet = /* @__PURE__ */ new Set();\n this.movedSet = /* @__PURE__ */ new Set();\n this.droppedSet = /* @__PURE__ */ new Set();\n this.processMutations = (mutations) => {\n mutations.forEach(this.processMutation);\n this.emit();\n };\n this.emit = () => {\n if (this.frozen || this.locked) {\n return;\n }\n const adds = [];\n const addedIds = /* @__PURE__ */ new Set();\n const addList = new DoubleLinkedList();\n const getNextId = (n2) => {\n let ns = n2;\n let nextId = IGNORED_NODE;\n while (nextId === IGNORED_NODE) {\n ns = ns && ns.nextSibling;\n nextId = ns && this.mirror.getId(ns);\n }\n return nextId;\n };\n const pushAdd = (n2) => {\n if (!n2.parentNode || !inDom(n2)) {\n return;\n }\n const parentId = isShadowRoot(n2.parentNode) ? this.mirror.getId(getShadowHost(n2)) : this.mirror.getId(n2.parentNode);\n const nextId = getNextId(n2);\n if (parentId === -1 || nextId === -1) {\n return addList.addNode(n2);\n }\n const sn = serializeNodeWithId(n2, {\n doc: this.doc,\n mirror: this.mirror,\n blockClass: this.blockClass,\n blockSelector: this.blockSelector,\n maskAllText: this.maskAllText,\n unblockSelector: this.unblockSelector,\n maskTextClass: this.maskTextClass,\n unmaskTextClass: this.unmaskTextClass,\n maskTextSelector: this.maskTextSelector,\n unmaskTextSelector: this.unmaskTextSelector,\n skipChild: true,\n newlyAddedElement: true,\n inlineStylesheet: this.inlineStylesheet,\n maskInputOptions: this.maskInputOptions,\n maskAttributeFn: this.maskAttributeFn,\n maskTextFn: this.maskTextFn,\n maskInputFn: this.maskInputFn,\n slimDOMOptions: this.slimDOMOptions,\n dataURLOptions: this.dataURLOptions,\n recordCanvas: this.recordCanvas,\n inlineImages: this.inlineImages,\n onSerialize: (currentN) => {\n if (isSerializedIframe(currentN, this.mirror) && !isBlocked(\n currentN,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n )) {\n this.iframeManager.addIframe(currentN);\n }\n if (isSerializedStylesheet(currentN, this.mirror)) {\n this.stylesheetManager.trackLinkElement(\n currentN\n );\n }\n if (hasShadowRoot(n2)) {\n this.shadowDomManager.addShadowRoot(n2.shadowRoot, this.doc);\n }\n },\n onIframeLoad: (iframe, childSn) => {\n if (isBlocked(\n iframe,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n )) {\n return;\n }\n this.iframeManager.attachIframe(iframe, childSn);\n if (iframe.contentWindow) {\n this.canvasManager.addWindow(iframe.contentWindow);\n }\n this.shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: (link, childSn) => {\n this.stylesheetManager.attachLinkElement(link, childSn);\n }\n });\n if (sn) {\n adds.push({\n parentId,\n nextId,\n node: sn\n });\n addedIds.add(sn.id);\n }\n };\n while (this.mapRemoves.length) {\n this.mirror.removeNodeFromMap(this.mapRemoves.shift());\n }\n for (const n2 of this.movedSet) {\n if (isParentRemoved(this.removes, n2, this.mirror) && !this.movedSet.has(n2.parentNode)) {\n continue;\n }\n pushAdd(n2);\n }\n for (const n2 of this.addedSet) {\n if (!isAncestorInSet(this.droppedSet, n2) && !isParentRemoved(this.removes, n2, this.mirror)) {\n pushAdd(n2);\n } else if (isAncestorInSet(this.movedSet, n2)) {\n pushAdd(n2);\n } else {\n this.droppedSet.add(n2);\n }\n }\n let candidate = null;\n while (addList.length) {\n let node = null;\n if (candidate) {\n const parentId = this.mirror.getId(candidate.value.parentNode);\n const nextId = getNextId(candidate.value);\n if (parentId !== -1 && nextId !== -1) {\n node = candidate;\n }\n }\n if (!node) {\n let tailNode = addList.tail;\n while (tailNode) {\n const _node = tailNode;\n tailNode = tailNode.previous;\n if (_node) {\n const parentId = this.mirror.getId(_node.value.parentNode);\n const nextId = getNextId(_node.value);\n if (nextId === -1) continue;\n else if (parentId !== -1) {\n node = _node;\n break;\n } else {\n const unhandledNode = _node.value;\n if (unhandledNode.parentNode && unhandledNode.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n const shadowHost = unhandledNode.parentNode.host;\n const parentId2 = this.mirror.getId(shadowHost);\n if (parentId2 !== -1) {\n node = _node;\n break;\n }\n }\n }\n }\n }\n }\n if (!node) {\n while (addList.head) {\n addList.removeNode(addList.head.value);\n }\n break;\n }\n candidate = node.previous;\n addList.removeNode(node.value);\n pushAdd(node.value);\n }\n const payload = {\n texts: this.texts.map((text) => ({\n id: this.mirror.getId(text.node),\n value: text.value\n })).filter((text) => !addedIds.has(text.id)).filter((text) => this.mirror.has(text.id)),\n attributes: this.attributes.map((attribute) => {\n const { attributes } = attribute;\n if (typeof attributes.style === \"string\") {\n const diffAsStr = JSON.stringify(attribute.styleDiff);\n const unchangedAsStr = JSON.stringify(attribute._unchangedStyles);\n if (diffAsStr.length < attributes.style.length) {\n if ((diffAsStr + unchangedAsStr).split(\"var(\").length === attributes.style.split(\"var(\").length) {\n attributes.style = attribute.styleDiff;\n }\n }\n }\n return {\n id: this.mirror.getId(attribute.node),\n attributes\n };\n }).filter((attribute) => !addedIds.has(attribute.id)).filter((attribute) => this.mirror.has(attribute.id)),\n removes: this.removes,\n adds\n };\n if (!payload.texts.length && !payload.attributes.length && !payload.removes.length && !payload.adds.length) {\n return;\n }\n this.texts = [];\n this.attributes = [];\n this.attributeMap = /* @__PURE__ */ new WeakMap();\n this.removes = [];\n this.addedSet = /* @__PURE__ */ new Set();\n this.movedSet = /* @__PURE__ */ new Set();\n this.droppedSet = /* @__PURE__ */ new Set();\n this.movedMap = {};\n this.mutationCb(payload);\n };\n this.processMutation = (m) => {\n if (isIgnored(m.target, this.mirror)) {\n return;\n }\n switch (m.type) {\n case \"characterData\": {\n const value = m.target.textContent;\n if (!isBlocked(\n m.target,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n ) && value !== m.oldValue) {\n this.texts.push({\n value: needMaskingText(\n m.target,\n this.maskTextClass,\n this.maskTextSelector,\n this.unmaskTextClass,\n this.unmaskTextSelector,\n this.maskAllText\n ) && value ? this.maskTextFn ? this.maskTextFn(value, closestElementOfNode(m.target)) : value.replace(/[\\S]/g, \"*\") : value,\n node: m.target\n });\n }\n break;\n }\n case \"attributes\": {\n const target = m.target;\n let attributeName = m.attributeName;\n let value = m.target.getAttribute(attributeName);\n if (attributeName === \"value\") {\n const type = getInputType(target);\n const tagName = target.tagName;\n value = getInputValue(target, tagName, type);\n const isInputMasked = shouldMaskInput({\n maskInputOptions: this.maskInputOptions,\n tagName,\n type\n });\n const forceMask = needMaskingText(\n m.target,\n this.maskTextClass,\n this.maskTextSelector,\n this.unmaskTextClass,\n this.unmaskTextSelector,\n isInputMasked\n );\n value = maskInputValue({\n isMasked: forceMask,\n element: target,\n value,\n maskInputFn: this.maskInputFn\n });\n }\n if (isBlocked(\n m.target,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n ) || value === m.oldValue) {\n return;\n }\n let item = this.attributeMap.get(m.target);\n if (target.tagName === \"IFRAME\" && attributeName === \"src\" && !this.keepIframeSrcFn(value)) {\n const iframeDoc = getIFrameContentDocument(\n target\n );\n if (!iframeDoc) {\n attributeName = \"rr_src\";\n } else {\n return;\n }\n }\n if (!item) {\n item = {\n node: m.target,\n attributes: {},\n styleDiff: {},\n _unchangedStyles: {}\n };\n this.attributes.push(item);\n this.attributeMap.set(m.target, item);\n }\n if (attributeName === \"type\" && target.tagName === \"INPUT\" && (m.oldValue || \"\").toLowerCase() === \"password\") {\n target.setAttribute(\"data-rr-is-password\", \"true\");\n }\n if (!ignoreAttribute(target.tagName, attributeName)) {\n item.attributes[attributeName] = transformAttribute(\n this.doc,\n toLowerCase(target.tagName),\n toLowerCase(attributeName),\n value,\n target,\n this.maskAttributeFn\n );\n if (attributeName === \"style\") {\n if (!this.unattachedDoc) {\n try {\n this.unattachedDoc = document.implementation.createHTMLDocument();\n } catch (e2) {\n this.unattachedDoc = this.doc;\n }\n }\n const old = this.unattachedDoc.createElement(\"span\");\n if (m.oldValue) {\n old.setAttribute(\"style\", m.oldValue);\n }\n for (const pname of Array.from(target.style)) {\n const newValue = target.style.getPropertyValue(pname);\n const newPriority = target.style.getPropertyPriority(pname);\n if (newValue !== old.style.getPropertyValue(pname) || newPriority !== old.style.getPropertyPriority(pname)) {\n if (newPriority === \"\") {\n item.styleDiff[pname] = newValue;\n } else {\n item.styleDiff[pname] = [newValue, newPriority];\n }\n } else {\n item._unchangedStyles[pname] = [newValue, newPriority];\n }\n }\n for (const pname of Array.from(old.style)) {\n if (target.style.getPropertyValue(pname) === \"\") {\n item.styleDiff[pname] = false;\n }\n }\n }\n }\n break;\n }\n case \"childList\": {\n if (isBlocked(\n m.target,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n true\n )) {\n return;\n }\n m.addedNodes.forEach((n2) => this.genAdds(n2, m.target));\n m.removedNodes.forEach((n2) => {\n const nodeId = this.mirror.getId(n2);\n const parentId = isShadowRoot(m.target) ? this.mirror.getId(m.target.host) : this.mirror.getId(m.target);\n if (isBlocked(\n m.target,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n ) || isIgnored(n2, this.mirror) || !isSerialized(n2, this.mirror)) {\n return;\n }\n if (this.addedSet.has(n2)) {\n deepDelete(this.addedSet, n2);\n this.droppedSet.add(n2);\n } else if (this.addedSet.has(m.target) && nodeId === -1) ;\n else if (isAncestorRemoved(m.target, this.mirror)) ;\n else if (this.movedSet.has(n2) && this.movedMap[moveKey(nodeId, parentId)]) {\n deepDelete(this.movedSet, n2);\n } else {\n this.removes.push({\n parentId,\n id: nodeId,\n isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target) ? true : undefined\n });\n }\n this.mapRemoves.push(n2);\n });\n break;\n }\n }\n };\n this.genAdds = (n2, target) => {\n if (this.processedNodeManager.inOtherBuffer(n2, this)) return;\n if (this.addedSet.has(n2) || this.movedSet.has(n2)) return;\n if (this.mirror.hasNode(n2)) {\n if (isIgnored(n2, this.mirror)) {\n return;\n }\n this.movedSet.add(n2);\n let targetId = null;\n if (target && this.mirror.hasNode(target)) {\n targetId = this.mirror.getId(target);\n }\n if (targetId && targetId !== -1) {\n this.movedMap[moveKey(this.mirror.getId(n2), targetId)] = true;\n }\n } else {\n this.addedSet.add(n2);\n this.droppedSet.delete(n2);\n }\n if (!isBlocked(\n n2,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n )) {\n n2.childNodes.forEach((childN) => this.genAdds(childN));\n if (hasShadowRoot(n2)) {\n n2.shadowRoot.childNodes.forEach((childN) => {\n this.processedNodeManager.add(childN, this);\n this.genAdds(childN, n2);\n });\n }\n }\n };\n }\n init(options) {\n [\n \"mutationCb\",\n \"blockClass\",\n \"blockSelector\",\n \"unblockSelector\",\n \"maskAllText\",\n \"maskTextClass\",\n \"unmaskTextClass\",\n \"maskTextSelector\",\n \"unmaskTextSelector\",\n \"inlineStylesheet\",\n \"maskInputOptions\",\n \"maskAttributeFn\",\n \"maskTextFn\",\n \"maskInputFn\",\n \"keepIframeSrcFn\",\n \"recordCanvas\",\n \"inlineImages\",\n \"slimDOMOptions\",\n \"dataURLOptions\",\n \"doc\",\n \"mirror\",\n \"iframeManager\",\n \"stylesheetManager\",\n \"shadowDomManager\",\n \"canvasManager\",\n \"processedNodeManager\"\n ].forEach((key) => {\n this[key] = options[key];\n });\n }\n freeze() {\n this.frozen = true;\n this.canvasManager.freeze();\n }\n unfreeze() {\n this.frozen = false;\n this.canvasManager.unfreeze();\n this.emit();\n }\n isFrozen() {\n return this.frozen;\n }\n lock() {\n this.locked = true;\n this.canvasManager.lock();\n }\n unlock() {\n this.locked = false;\n this.canvasManager.unlock();\n this.emit();\n }\n reset() {\n this.shadowDomManager.reset();\n this.canvasManager.reset();\n }\n}\nfunction deepDelete(addsSet, n2) {\n addsSet.delete(n2);\n n2.childNodes.forEach((childN) => deepDelete(addsSet, childN));\n}\nfunction isParentRemoved(removes, n2, mirror2) {\n if (removes.length === 0) return false;\n return _isParentRemoved(removes, n2, mirror2);\n}\nfunction _isParentRemoved(removes, n2, mirror2) {\n let node = n2.parentNode;\n while (node) {\n const parentId = mirror2.getId(node);\n if (removes.some((r2) => r2.id === parentId)) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\nfunction isAncestorInSet(set, n2) {\n if (set.size === 0) return false;\n return _isAncestorInSet(set, n2);\n}\nfunction _isAncestorInSet(set, n2) {\n const { parentNode } = n2;\n if (!parentNode) {\n return false;\n }\n if (set.has(parentNode)) {\n return true;\n }\n return _isAncestorInSet(set, parentNode);\n}\nlet errorHandler;\nfunction registerErrorHandler(handler) {\n errorHandler = handler;\n}\nfunction unregisterErrorHandler() {\n errorHandler = undefined;\n}\nconst callbackWrapper = (cb) => {\n if (!errorHandler) {\n return cb;\n }\n const rrwebWrapped = (...rest) => {\n try {\n return cb(...rest);\n } catch (error) {\n if (errorHandler && errorHandler(error) === true) {\n return () => {\n };\n }\n throw error;\n }\n };\n return rrwebWrapped;\n};\nconst mutationBuffers = [];\nfunction getEventTarget(event) {\n try {\n if (\"composedPath\" in event) {\n const path = event.composedPath();\n if (path.length) {\n return path[0];\n }\n } else if (\"path\" in event && event.path.length) {\n return event.path[0];\n }\n } catch {\n }\n return event && event.target;\n}\nfunction initMutationObserver(options, rootEl) {\n const mutationBuffer = new MutationBuffer();\n mutationBuffers.push(mutationBuffer);\n mutationBuffer.init(options);\n let mutationObserverCtor = window.MutationObserver || /**\n * Some websites may disable MutationObserver by removing it from the window object.\n * If someone is using rrweb to build a browser extention or things like it, they\n * could not change the website's code but can have an opportunity to inject some\n * code before the website executing its JS logic.\n * Then they can do this to store the native MutationObserver:\n * window.__rrMutationObserver = MutationObserver\n */\n window.__rrMutationObserver;\n const angularZoneSymbol = window?.Zone?.__symbol__?.(\"MutationObserver\");\n if (angularZoneSymbol && window[angularZoneSymbol]) {\n mutationObserverCtor = window[angularZoneSymbol];\n }\n const observer = new mutationObserverCtor(\n callbackWrapper((mutations) => {\n if (options.onMutation && options.onMutation(mutations) === false) {\n return;\n }\n mutationBuffer.processMutations.bind(mutationBuffer)(mutations);\n })\n );\n observer.observe(rootEl, {\n attributes: true,\n attributeOldValue: true,\n characterData: true,\n characterDataOldValue: true,\n childList: true,\n subtree: true\n });\n return observer;\n}\nfunction initMoveObserver({\n mousemoveCb,\n sampling,\n doc,\n mirror: mirror2\n}) {\n if (sampling.mousemove === false) {\n return () => {\n };\n }\n const threshold = typeof sampling.mousemove === \"number\" ? sampling.mousemove : 50;\n const callbackThreshold = typeof sampling.mousemoveCallback === \"number\" ? sampling.mousemoveCallback : 500;\n let positions = [];\n let timeBaseline;\n const wrappedCb = throttle$1(\n callbackWrapper(\n (source) => {\n const totalOffset = Date.now() - timeBaseline;\n mousemoveCb(\n positions.map((p) => {\n p.timeOffset -= totalOffset;\n return p;\n }),\n source\n );\n positions = [];\n timeBaseline = null;\n }\n ),\n callbackThreshold\n );\n const updatePosition = callbackWrapper(\n throttle$1(\n callbackWrapper((evt) => {\n const target = getEventTarget(evt);\n const { clientX, clientY } = legacy_isTouchEvent(evt) ? evt.changedTouches[0] : evt;\n if (!timeBaseline) {\n timeBaseline = nowTimestamp();\n }\n positions.push({\n x: clientX,\n y: clientY,\n id: mirror2.getId(target),\n timeOffset: nowTimestamp() - timeBaseline\n });\n wrappedCb(\n typeof DragEvent !== \"undefined\" && evt instanceof DragEvent ? IncrementalSource.Drag : evt instanceof MouseEvent ? IncrementalSource.MouseMove : IncrementalSource.TouchMove\n );\n }),\n threshold,\n {\n trailing: false\n }\n )\n );\n const handlers = [\n on(\"mousemove\", updatePosition, doc),\n on(\"touchmove\", updatePosition, doc),\n on(\"drag\", updatePosition, doc)\n ];\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initMouseInteractionObserver({\n mouseInteractionCb,\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n sampling\n}) {\n if (sampling.mouseInteraction === false) {\n return () => {\n };\n }\n const disableMap = sampling.mouseInteraction === true || sampling.mouseInteraction === undefined ? {} : sampling.mouseInteraction;\n const handlers = [];\n let currentPointerType = null;\n const getHandler = (eventKey) => {\n return (event) => {\n const target = getEventTarget(event);\n if (isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n let pointerType = null;\n let thisEventKey = eventKey;\n if (\"pointerType\" in event) {\n switch (event.pointerType) {\n case \"mouse\":\n pointerType = PointerTypes.Mouse;\n break;\n case \"touch\":\n pointerType = PointerTypes.Touch;\n break;\n case \"pen\":\n pointerType = PointerTypes.Pen;\n break;\n }\n if (pointerType === PointerTypes.Touch) {\n if (MouseInteractions[eventKey] === MouseInteractions.MouseDown) {\n thisEventKey = \"TouchStart\";\n } else if (MouseInteractions[eventKey] === MouseInteractions.MouseUp) {\n thisEventKey = \"TouchEnd\";\n }\n } else if (pointerType === PointerTypes.Pen) ;\n } else if (legacy_isTouchEvent(event)) {\n pointerType = PointerTypes.Touch;\n }\n if (pointerType !== null) {\n currentPointerType = pointerType;\n if (thisEventKey.startsWith(\"Touch\") && pointerType === PointerTypes.Touch || thisEventKey.startsWith(\"Mouse\") && pointerType === PointerTypes.Mouse) {\n pointerType = null;\n }\n } else if (MouseInteractions[eventKey] === MouseInteractions.Click) {\n pointerType = currentPointerType;\n currentPointerType = null;\n }\n const e2 = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;\n if (!e2) {\n return;\n }\n const id = mirror2.getId(target);\n const { clientX, clientY } = e2;\n callbackWrapper(mouseInteractionCb)({\n type: MouseInteractions[thisEventKey],\n id,\n x: clientX,\n y: clientY,\n ...pointerType !== null && { pointerType }\n });\n };\n };\n Object.keys(MouseInteractions).filter(\n (key) => Number.isNaN(Number(key)) && !key.endsWith(\"_Departed\") && disableMap[key] !== false\n ).forEach((eventKey) => {\n let eventName = toLowerCase(eventKey);\n const handler = getHandler(eventKey);\n if (window.PointerEvent) {\n switch (MouseInteractions[eventKey]) {\n case MouseInteractions.MouseDown:\n case MouseInteractions.MouseUp:\n eventName = eventName.replace(\n \"mouse\",\n \"pointer\"\n );\n break;\n case MouseInteractions.TouchStart:\n case MouseInteractions.TouchEnd:\n return;\n }\n }\n handlers.push(on(eventName, handler, doc));\n });\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initScrollObserver({\n scrollCb,\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n sampling\n}) {\n const updatePosition = callbackWrapper(\n throttle$1(\n callbackWrapper((evt) => {\n const target = getEventTarget(evt);\n if (!target || isBlocked(\n target,\n blockClass,\n blockSelector,\n unblockSelector,\n true\n )) {\n return;\n }\n const id = mirror2.getId(target);\n if (target === doc && doc.defaultView) {\n const scrollLeftTop = getWindowScroll(doc.defaultView);\n scrollCb({\n id,\n x: scrollLeftTop.left,\n y: scrollLeftTop.top\n });\n } else {\n scrollCb({\n id,\n x: target.scrollLeft,\n y: target.scrollTop\n });\n }\n }),\n sampling.scroll || 100\n )\n );\n return on(\"scroll\", updatePosition, doc);\n}\nfunction initViewportResizeObserver({ viewportResizeCb }, { win }) {\n let lastH = -1;\n let lastW = -1;\n const updateDimension = callbackWrapper(\n throttle$1(\n callbackWrapper(() => {\n const height = getWindowHeight();\n const width = getWindowWidth();\n if (lastH !== height || lastW !== width) {\n viewportResizeCb({\n width: Number(width),\n height: Number(height)\n });\n lastH = height;\n lastW = width;\n }\n }),\n 200\n )\n );\n return on(\"resize\", updateDimension, win);\n}\nconst INPUT_TAGS = [\"INPUT\", \"TEXTAREA\", \"SELECT\"];\nconst lastInputValueMap = /* @__PURE__ */ new WeakMap();\nfunction initInputObserver({\n inputCb,\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n ignoreClass,\n ignoreSelector,\n maskInputOptions,\n maskInputFn,\n sampling,\n userTriggeredOnInput,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector\n}) {\n function eventHandler(event) {\n let target = getEventTarget(event);\n const userTriggered = event.isTrusted;\n const tagName = target && toUpperCase(target.tagName);\n if (tagName === \"OPTION\") target = target.parentElement;\n if (!target || !tagName || INPUT_TAGS.indexOf(tagName) < 0 || isBlocked(\n target,\n blockClass,\n blockSelector,\n unblockSelector,\n true\n )) {\n return;\n }\n const el = target;\n if (el.classList.contains(ignoreClass) || ignoreSelector && el.matches(ignoreSelector)) {\n return;\n }\n const type = getInputType(target);\n let text = getInputValue(el, tagName, type);\n let isChecked = false;\n const isInputMasked = shouldMaskInput({\n maskInputOptions,\n tagName,\n type\n });\n const forceMask = needMaskingText(\n target,\n maskTextClass,\n maskTextSelector,\n unmaskTextClass,\n unmaskTextSelector,\n isInputMasked\n );\n if (type === \"radio\" || type === \"checkbox\") {\n isChecked = target.checked;\n }\n text = maskInputValue({\n isMasked: forceMask,\n element: target,\n value: text,\n maskInputFn\n });\n cbWithDedup(\n target,\n userTriggeredOnInput ? { text, isChecked, userTriggered } : { text, isChecked }\n );\n const name = target.name;\n if (type === \"radio\" && name && isChecked) {\n doc.querySelectorAll(`input[type=\"radio\"][name=\"${name}\"]`).forEach((el2) => {\n if (el2 !== target) {\n const text2 = maskInputValue({\n // share mask behavior of `target`\n isMasked: forceMask,\n element: el2,\n value: getInputValue(el2, tagName, type),\n maskInputFn\n });\n cbWithDedup(\n el2,\n userTriggeredOnInput ? { text: text2, isChecked: !isChecked, userTriggered: false } : { text: text2, isChecked: !isChecked }\n );\n }\n });\n }\n }\n function cbWithDedup(target, v2) {\n const lastInputValue = lastInputValueMap.get(target);\n if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) {\n lastInputValueMap.set(target, v2);\n const id = mirror2.getId(target);\n callbackWrapper(inputCb)({\n ...v2,\n id\n });\n }\n }\n const events = sampling.input === \"last\" ? [\"change\"] : [\"input\", \"change\"];\n const handlers = events.map(\n (eventName) => on(eventName, callbackWrapper(eventHandler), doc)\n );\n const currentWindow = doc.defaultView;\n if (!currentWindow) {\n return () => {\n handlers.forEach((h) => h());\n };\n }\n const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(\n currentWindow.HTMLInputElement.prototype,\n \"value\"\n );\n const hookProperties = [\n [currentWindow.HTMLInputElement.prototype, \"value\"],\n [currentWindow.HTMLInputElement.prototype, \"checked\"],\n [currentWindow.HTMLSelectElement.prototype, \"value\"],\n [currentWindow.HTMLTextAreaElement.prototype, \"value\"],\n // Some UI library use selectedIndex to set select value\n [currentWindow.HTMLSelectElement.prototype, \"selectedIndex\"],\n [currentWindow.HTMLOptionElement.prototype, \"selected\"]\n ];\n if (propertyDescriptor && propertyDescriptor.set) {\n handlers.push(\n ...hookProperties.map(\n (p) => hookSetter(\n p[0],\n p[1],\n {\n set() {\n callbackWrapper(eventHandler)({\n target: this,\n isTrusted: false\n // userTriggered to false as this could well be programmatic\n });\n }\n },\n false,\n currentWindow\n )\n )\n );\n }\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction getNestedCSSRulePositions(rule) {\n const positions = [];\n function recurse(childRule, pos) {\n if (hasNestedCSSRule(\"CSSGroupingRule\") && childRule.parentRule instanceof CSSGroupingRule || hasNestedCSSRule(\"CSSMediaRule\") && childRule.parentRule instanceof CSSMediaRule || hasNestedCSSRule(\"CSSSupportsRule\") && childRule.parentRule instanceof CSSSupportsRule || hasNestedCSSRule(\"CSSConditionRule\") && childRule.parentRule instanceof CSSConditionRule) {\n const rules2 = Array.from(\n childRule.parentRule.cssRules\n );\n const index = rules2.indexOf(childRule);\n pos.unshift(index);\n } else if (childRule.parentStyleSheet) {\n const rules2 = Array.from(childRule.parentStyleSheet.cssRules);\n const index = rules2.indexOf(childRule);\n pos.unshift(index);\n }\n return pos;\n }\n return recurse(rule, positions);\n}\nfunction getIdAndStyleId(sheet, mirror2, styleMirror) {\n let id, styleId;\n if (!sheet) return {};\n if (sheet.ownerNode) id = mirror2.getId(sheet.ownerNode);\n else styleId = styleMirror.getId(sheet);\n return {\n styleId,\n id\n };\n}\nfunction initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetManager }, { win }) {\n if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) {\n return () => {\n };\n }\n const insertRule = win.CSSStyleSheet.prototype.insertRule;\n win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [rule, index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n adds: [{ rule, index }]\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n const deleteRule = win.CSSStyleSheet.prototype.deleteRule;\n win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n removes: [{ index }]\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n let replace;\n if (win.CSSStyleSheet.prototype.replace) {\n replace = win.CSSStyleSheet.prototype.replace;\n win.CSSStyleSheet.prototype.replace = new Proxy(replace, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [text] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n replace: text\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n }\n let replaceSync;\n if (win.CSSStyleSheet.prototype.replaceSync) {\n replaceSync = win.CSSStyleSheet.prototype.replaceSync;\n win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [text] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n replaceSync: text\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n }\n const supportedNestedCSSRuleTypes = {};\n if (canMonkeyPatchNestedCSSRule(\"CSSGroupingRule\")) {\n supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;\n } else {\n if (canMonkeyPatchNestedCSSRule(\"CSSMediaRule\")) {\n supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule;\n }\n if (canMonkeyPatchNestedCSSRule(\"CSSConditionRule\")) {\n supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule;\n }\n if (canMonkeyPatchNestedCSSRule(\"CSSSupportsRule\")) {\n supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule;\n }\n }\n const unmodifiedFunctions = {};\n Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n unmodifiedFunctions[typeKey] = {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n insertRule: type.prototype.insertRule,\n // eslint-disable-next-line @typescript-eslint/unbound-method\n deleteRule: type.prototype.deleteRule\n };\n type.prototype.insertRule = new Proxy(\n unmodifiedFunctions[typeKey].insertRule,\n {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [rule, index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg.parentStyleSheet,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n adds: [\n {\n rule,\n index: [\n ...getNestedCSSRulePositions(thisArg),\n index || 0\n // defaults to 0\n ]\n }\n ]\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n }\n );\n type.prototype.deleteRule = new Proxy(\n unmodifiedFunctions[typeKey].deleteRule,\n {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg.parentStyleSheet,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n removes: [\n { index: [...getNestedCSSRulePositions(thisArg), index] }\n ]\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n }\n );\n });\n return callbackWrapper(() => {\n win.CSSStyleSheet.prototype.insertRule = insertRule;\n win.CSSStyleSheet.prototype.deleteRule = deleteRule;\n replace && (win.CSSStyleSheet.prototype.replace = replace);\n replaceSync && (win.CSSStyleSheet.prototype.replaceSync = replaceSync);\n Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule;\n type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule;\n });\n });\n}\nfunction initAdoptedStyleSheetObserver({\n mirror: mirror2,\n stylesheetManager\n}, host) {\n let hostId = null;\n if (host.nodeName === \"#document\") hostId = mirror2.getId(host);\n else hostId = mirror2.getId(host.host);\n const patchTarget = host.nodeName === \"#document\" ? host.defaultView?.Document : host.ownerDocument?.defaultView?.ShadowRoot;\n const originalPropertyDescriptor = patchTarget?.prototype ? Object.getOwnPropertyDescriptor(\n patchTarget?.prototype,\n \"adoptedStyleSheets\"\n ) : undefined;\n if (hostId === null || hostId === -1 || !patchTarget || !originalPropertyDescriptor)\n return () => {\n };\n Object.defineProperty(host, \"adoptedStyleSheets\", {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n get() {\n return originalPropertyDescriptor.get?.call(this);\n },\n set(sheets) {\n const result = originalPropertyDescriptor.set?.call(this, sheets);\n if (hostId !== null && hostId !== -1) {\n try {\n stylesheetManager.adoptStyleSheets(sheets, hostId);\n } catch (e2) {\n }\n }\n return result;\n }\n });\n return callbackWrapper(() => {\n Object.defineProperty(host, \"adoptedStyleSheets\", {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n // eslint-disable-next-line @typescript-eslint/unbound-method\n get: originalPropertyDescriptor.get,\n // eslint-disable-next-line @typescript-eslint/unbound-method\n set: originalPropertyDescriptor.set\n });\n });\n}\nfunction initStyleDeclarationObserver({\n styleDeclarationCb,\n mirror: mirror2,\n ignoreCSSAttributes,\n stylesheetManager\n}, { win }) {\n const setProperty = win.CSSStyleDeclaration.prototype.setProperty;\n win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [property, value, priority] = argumentsList;\n if (ignoreCSSAttributes.has(property)) {\n return setProperty.apply(thisArg, [property, value, priority]);\n }\n const { id, styleId } = getIdAndStyleId(\n thisArg.parentRule?.parentStyleSheet,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleDeclarationCb({\n id,\n styleId,\n set: {\n property,\n value,\n priority\n },\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n index: getNestedCSSRulePositions(thisArg.parentRule)\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [property] = argumentsList;\n if (ignoreCSSAttributes.has(property)) {\n return removeProperty.apply(thisArg, [property]);\n }\n const { id, styleId } = getIdAndStyleId(\n thisArg.parentRule?.parentStyleSheet,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleDeclarationCb({\n id,\n styleId,\n remove: {\n property\n },\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n index: getNestedCSSRulePositions(thisArg.parentRule)\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n return callbackWrapper(() => {\n win.CSSStyleDeclaration.prototype.setProperty = setProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;\n });\n}\nfunction initMediaInteractionObserver({\n mediaInteractionCb,\n blockClass,\n blockSelector,\n unblockSelector,\n mirror: mirror2,\n sampling,\n doc\n}) {\n const handler = callbackWrapper(\n (type) => throttle$1(\n callbackWrapper((event) => {\n const target = getEventTarget(event);\n if (!target || isBlocked(\n target,\n blockClass,\n blockSelector,\n unblockSelector,\n true\n )) {\n return;\n }\n const { currentTime, volume, muted, playbackRate } = target;\n mediaInteractionCb({\n type,\n id: mirror2.getId(target),\n currentTime,\n volume,\n muted,\n playbackRate\n });\n }),\n sampling.media || 500\n )\n );\n const handlers = [\n on(\"play\", handler(MediaInteractions.Play), doc),\n on(\"pause\", handler(MediaInteractions.Pause), doc),\n on(\"seeked\", handler(MediaInteractions.Seeked), doc),\n on(\"volumechange\", handler(MediaInteractions.VolumeChange), doc),\n on(\"ratechange\", handler(MediaInteractions.RateChange), doc)\n ];\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initFontObserver({ fontCb, doc }) {\n const win = doc.defaultView;\n if (!win) {\n return () => {\n };\n }\n const handlers = [];\n const fontMap = /* @__PURE__ */ new WeakMap();\n const originalFontFace = win.FontFace;\n win.FontFace = function FontFace2(family, source, descriptors) {\n const fontFace = new originalFontFace(family, source, descriptors);\n fontMap.set(fontFace, {\n family,\n buffer: typeof source !== \"string\",\n descriptors,\n fontSource: typeof source === \"string\" ? source : JSON.stringify(Array.from(new Uint8Array(source)))\n });\n return fontFace;\n };\n const restoreHandler = patch(\n doc.fonts,\n \"add\",\n function(original) {\n return function(fontFace) {\n setTimeout$1(\n callbackWrapper(() => {\n const p = fontMap.get(fontFace);\n if (p) {\n fontCb(p);\n fontMap.delete(fontFace);\n }\n }),\n 0\n );\n return original.apply(this, [fontFace]);\n };\n }\n );\n handlers.push(() => {\n win.FontFace = originalFontFace;\n });\n handlers.push(restoreHandler);\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initSelectionObserver(param) {\n const {\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n selectionCb\n } = param;\n let collapsed = true;\n const updateSelection = callbackWrapper(() => {\n const selection = doc.getSelection();\n if (!selection || collapsed && selection?.isCollapsed) return;\n collapsed = selection.isCollapsed || false;\n const ranges = [];\n const count = selection.rangeCount || 0;\n for (let i2 = 0; i2 < count; i2++) {\n const range = selection.getRangeAt(i2);\n const { startContainer, startOffset, endContainer, endOffset } = range;\n const blocked = isBlocked(\n startContainer,\n blockClass,\n blockSelector,\n unblockSelector,\n true\n ) || isBlocked(\n endContainer,\n blockClass,\n blockSelector,\n unblockSelector,\n true\n );\n if (blocked) continue;\n ranges.push({\n start: mirror2.getId(startContainer),\n startOffset,\n end: mirror2.getId(endContainer),\n endOffset\n });\n }\n selectionCb({ ranges });\n });\n updateSelection();\n return on(\"selectionchange\", updateSelection);\n}\nfunction initCustomElementObserver({\n doc,\n customElementCb\n}) {\n const win = doc.defaultView;\n if (!win || !win.customElements) return () => {\n };\n const restoreHandler = patch(\n win.customElements,\n \"define\",\n function(original) {\n return function(name, constructor, options) {\n try {\n customElementCb({\n define: {\n name\n }\n });\n } catch (e2) {\n }\n return original.apply(this, [name, constructor, options]);\n };\n }\n );\n return restoreHandler;\n}\nfunction initObservers(o2, _hooks = {}) {\n const currentWindow = o2.doc.defaultView;\n if (!currentWindow) {\n return () => {\n };\n }\n let mutationObserver;\n if (o2.recordDOM) {\n mutationObserver = initMutationObserver(o2, o2.doc);\n }\n const mousemoveHandler = initMoveObserver(o2);\n const mouseInteractionHandler = initMouseInteractionObserver(o2);\n const scrollHandler = initScrollObserver(o2);\n const viewportResizeHandler = initViewportResizeObserver(o2, {\n win: currentWindow\n });\n const inputHandler = initInputObserver(o2);\n const mediaInteractionHandler = initMediaInteractionObserver(o2);\n let styleSheetObserver = () => {\n };\n let adoptedStyleSheetObserver = () => {\n };\n let styleDeclarationObserver = () => {\n };\n let fontObserver = () => {\n };\n if (o2.recordDOM) {\n styleSheetObserver = initStyleSheetObserver(o2, { win: currentWindow });\n adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o2, o2.doc);\n styleDeclarationObserver = initStyleDeclarationObserver(o2, {\n win: currentWindow\n });\n if (o2.collectFonts) {\n fontObserver = initFontObserver(o2);\n }\n }\n const selectionObserver = initSelectionObserver(o2);\n const customElementObserver = initCustomElementObserver(o2);\n const pluginHandlers = [];\n for (const plugin of o2.plugins) {\n pluginHandlers.push(\n plugin.observer(plugin.callback, currentWindow, plugin.options)\n );\n }\n return callbackWrapper(() => {\n mutationBuffers.forEach((b) => b.reset());\n mutationObserver?.disconnect();\n mousemoveHandler();\n mouseInteractionHandler();\n scrollHandler();\n viewportResizeHandler();\n inputHandler();\n mediaInteractionHandler();\n styleSheetObserver();\n adoptedStyleSheetObserver();\n styleDeclarationObserver();\n fontObserver();\n selectionObserver();\n customElementObserver();\n pluginHandlers.forEach((h) => h());\n });\n}\nfunction hasNestedCSSRule(prop) {\n return typeof window[prop] !== \"undefined\";\n}\nfunction canMonkeyPatchNestedCSSRule(prop) {\n return Boolean(\n typeof window[prop] !== \"undefined\" && // Note: Generally, this check _shouldn't_ be necessary\n // However, in some scenarios (e.g. jsdom) this can sometimes fail, so we check for it here\n window[prop].prototype && \"insertRule\" in window[prop].prototype && \"deleteRule\" in window[prop].prototype\n );\n}\nclass CrossOriginIframeMirror {\n constructor(generateIdFn) {\n this.generateIdFn = generateIdFn;\n this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap();\n this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap();\n }\n getId(iframe, remoteId, idToRemoteMap, remoteToIdMap) {\n const idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe);\n const remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe);\n let id = idToRemoteIdMap.get(remoteId);\n if (!id) {\n id = this.generateIdFn();\n idToRemoteIdMap.set(remoteId, id);\n remoteIdToIdMap.set(id, remoteId);\n }\n return id;\n }\n getIds(iframe, remoteId) {\n const idToRemoteIdMap = this.getIdToRemoteIdMap(iframe);\n const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n return remoteId.map(\n (id) => this.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap)\n );\n }\n getRemoteId(iframe, id, map) {\n const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);\n if (typeof id !== \"number\") return id;\n const remoteId = remoteIdToIdMap.get(id);\n if (!remoteId) return -1;\n return remoteId;\n }\n getRemoteIds(iframe, ids) {\n const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n return ids.map((id) => this.getRemoteId(iframe, id, remoteIdToIdMap));\n }\n reset(iframe) {\n if (!iframe) {\n this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap();\n this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap();\n return;\n }\n this.iframeIdToRemoteIdMap.delete(iframe);\n this.iframeRemoteIdToIdMap.delete(iframe);\n }\n getIdToRemoteIdMap(iframe) {\n let idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe);\n if (!idToRemoteIdMap) {\n idToRemoteIdMap = /* @__PURE__ */ new Map();\n this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap);\n }\n return idToRemoteIdMap;\n }\n getRemoteIdToIdMap(iframe) {\n let remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe);\n if (!remoteIdToIdMap) {\n remoteIdToIdMap = /* @__PURE__ */ new Map();\n this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap);\n }\n return remoteIdToIdMap;\n }\n}\nclass IframeManagerNoop {\n constructor() {\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap();\n }\n addIframe() {\n }\n addLoadListener() {\n }\n attachIframe() {\n }\n}\nclass IframeManager {\n constructor(options) {\n this.iframes = /* @__PURE__ */ new WeakMap();\n this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap();\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap();\n this.mutationCb = options.mutationCb;\n this.wrappedEmit = options.wrappedEmit;\n this.stylesheetManager = options.stylesheetManager;\n this.recordCrossOriginIframes = options.recordCrossOriginIframes;\n this.crossOriginIframeStyleMirror = new CrossOriginIframeMirror(\n this.stylesheetManager.styleMirror.generateId.bind(\n this.stylesheetManager.styleMirror\n )\n );\n this.mirror = options.mirror;\n if (this.recordCrossOriginIframes) {\n window.addEventListener(\"message\", this.handleMessage.bind(this));\n }\n }\n addIframe(iframeEl) {\n this.iframes.set(iframeEl, true);\n if (iframeEl.contentWindow)\n this.crossOriginIframeMap.set(iframeEl.contentWindow, iframeEl);\n }\n addLoadListener(cb) {\n this.loadListener = cb;\n }\n attachIframe(iframeEl, childSn) {\n this.mutationCb({\n adds: [\n {\n parentId: this.mirror.getId(iframeEl),\n nextId: null,\n node: childSn\n }\n ],\n removes: [],\n texts: [],\n attributes: [],\n isAttachIframe: true\n });\n if (this.recordCrossOriginIframes)\n iframeEl.contentWindow?.addEventListener(\n \"message\",\n this.handleMessage.bind(this)\n );\n this.loadListener?.(iframeEl);\n const iframeDoc = getIFrameContentDocument(iframeEl);\n if (iframeDoc && iframeDoc.adoptedStyleSheets && iframeDoc.adoptedStyleSheets.length > 0)\n this.stylesheetManager.adoptStyleSheets(\n iframeDoc.adoptedStyleSheets,\n this.mirror.getId(iframeDoc)\n );\n }\n handleMessage(message) {\n const crossOriginMessageEvent = message;\n if (crossOriginMessageEvent.data.type !== \"rrweb\" || // To filter out the rrweb messages which are forwarded by some sites.\n crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin)\n return;\n const iframeSourceWindow = message.source;\n if (!iframeSourceWindow) return;\n const iframeEl = this.crossOriginIframeMap.get(message.source);\n if (!iframeEl) return;\n const transformedEvent = this.transformCrossOriginEvent(\n iframeEl,\n crossOriginMessageEvent.data.event\n );\n if (transformedEvent)\n this.wrappedEmit(\n transformedEvent,\n crossOriginMessageEvent.data.isCheckout\n );\n }\n transformCrossOriginEvent(iframeEl, e2) {\n switch (e2.type) {\n case EventType.FullSnapshot: {\n this.crossOriginIframeMirror.reset(iframeEl);\n this.crossOriginIframeStyleMirror.reset(iframeEl);\n this.replaceIdOnNode(e2.data.node, iframeEl);\n const rootId = e2.data.node.id;\n this.crossOriginIframeRootIdMap.set(iframeEl, rootId);\n this.patchRootIdOnNode(e2.data.node, rootId);\n return {\n timestamp: e2.timestamp,\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Mutation,\n adds: [\n {\n parentId: this.mirror.getId(iframeEl),\n nextId: null,\n node: e2.data.node\n }\n ],\n removes: [],\n texts: [],\n attributes: [],\n isAttachIframe: true\n }\n };\n }\n case EventType.Meta:\n case EventType.Load:\n case EventType.DomContentLoaded: {\n return false;\n }\n case EventType.Plugin: {\n return e2;\n }\n case EventType.Custom: {\n this.replaceIds(\n e2.data.payload,\n iframeEl,\n [\"id\", \"parentId\", \"previousId\", \"nextId\"]\n );\n return e2;\n }\n case EventType.IncrementalSnapshot: {\n switch (e2.data.source) {\n case IncrementalSource.Mutation: {\n e2.data.adds.forEach((n2) => {\n this.replaceIds(n2, iframeEl, [\n \"parentId\",\n \"nextId\",\n \"previousId\"\n ]);\n this.replaceIdOnNode(n2.node, iframeEl);\n const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);\n rootId && this.patchRootIdOnNode(n2.node, rootId);\n });\n e2.data.removes.forEach((n2) => {\n this.replaceIds(n2, iframeEl, [\"parentId\", \"id\"]);\n });\n e2.data.attributes.forEach((n2) => {\n this.replaceIds(n2, iframeEl, [\"id\"]);\n });\n e2.data.texts.forEach((n2) => {\n this.replaceIds(n2, iframeEl, [\"id\"]);\n });\n return e2;\n }\n case IncrementalSource.Drag:\n case IncrementalSource.TouchMove:\n case IncrementalSource.MouseMove: {\n e2.data.positions.forEach((p) => {\n this.replaceIds(p, iframeEl, [\"id\"]);\n });\n return e2;\n }\n case IncrementalSource.ViewportResize: {\n return false;\n }\n case IncrementalSource.MediaInteraction:\n case IncrementalSource.MouseInteraction:\n case IncrementalSource.Scroll:\n case IncrementalSource.CanvasMutation:\n case IncrementalSource.Input: {\n this.replaceIds(e2.data, iframeEl, [\"id\"]);\n return e2;\n }\n case IncrementalSource.StyleSheetRule:\n case IncrementalSource.StyleDeclaration: {\n this.replaceIds(e2.data, iframeEl, [\"id\"]);\n this.replaceStyleIds(e2.data, iframeEl, [\"styleId\"]);\n return e2;\n }\n case IncrementalSource.Font: {\n return e2;\n }\n case IncrementalSource.Selection: {\n e2.data.ranges.forEach((range) => {\n this.replaceIds(range, iframeEl, [\"start\", \"end\"]);\n });\n return e2;\n }\n case IncrementalSource.AdoptedStyleSheet: {\n this.replaceIds(e2.data, iframeEl, [\"id\"]);\n this.replaceStyleIds(e2.data, iframeEl, [\"styleIds\"]);\n e2.data.styles?.forEach((style) => {\n this.replaceStyleIds(style, iframeEl, [\"styleId\"]);\n });\n return e2;\n }\n }\n }\n }\n return false;\n }\n replace(iframeMirror, obj, iframeEl, keys) {\n for (const key of keys) {\n if (!Array.isArray(obj[key]) && typeof obj[key] !== \"number\") continue;\n if (Array.isArray(obj[key])) {\n obj[key] = iframeMirror.getIds(\n iframeEl,\n obj[key]\n );\n } else {\n obj[key] = iframeMirror.getId(iframeEl, obj[key]);\n }\n }\n return obj;\n }\n replaceIds(obj, iframeEl, keys) {\n return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys);\n }\n replaceStyleIds(obj, iframeEl, keys) {\n return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys);\n }\n replaceIdOnNode(node, iframeEl) {\n this.replaceIds(node, iframeEl, [\"id\", \"rootId\"]);\n if (\"childNodes\" in node) {\n node.childNodes.forEach((child) => {\n this.replaceIdOnNode(child, iframeEl);\n });\n }\n }\n patchRootIdOnNode(node, rootId) {\n if (node.type !== NodeType$2.Document && !node.rootId) node.rootId = rootId;\n if (\"childNodes\" in node) {\n node.childNodes.forEach((child) => {\n this.patchRootIdOnNode(child, rootId);\n });\n }\n }\n}\nclass ShadowDomManagerNoop {\n init() {\n }\n addShadowRoot() {\n }\n observeAttachShadow() {\n }\n reset() {\n }\n}\nclass ShadowDomManager {\n constructor(options) {\n this.shadowDoms = /* @__PURE__ */ new WeakSet();\n this.restoreHandlers = [];\n this.mutationCb = options.mutationCb;\n this.scrollCb = options.scrollCb;\n this.bypassOptions = options.bypassOptions;\n this.mirror = options.mirror;\n this.init();\n }\n init() {\n this.reset();\n this.patchAttachShadow(Element, document);\n }\n addShadowRoot(shadowRoot, doc) {\n if (!isNativeShadowDom(shadowRoot)) return;\n if (this.shadowDoms.has(shadowRoot)) return;\n this.shadowDoms.add(shadowRoot);\n this.bypassOptions.canvasManager.addShadowRoot(shadowRoot);\n const observer = initMutationObserver(\n {\n ...this.bypassOptions,\n doc,\n mutationCb: this.mutationCb,\n mirror: this.mirror,\n shadowDomManager: this\n },\n shadowRoot\n );\n this.restoreHandlers.push(() => observer.disconnect());\n this.restoreHandlers.push(\n initScrollObserver({\n ...this.bypassOptions,\n scrollCb: this.scrollCb,\n // https://gist.github.com/praveenpuglia/0832da687ed5a5d7a0907046c9ef1813\n // scroll is not allowed to pass the boundary, so we need to listen the shadow document\n doc: shadowRoot,\n mirror: this.mirror\n })\n );\n setTimeout$1(() => {\n if (shadowRoot.adoptedStyleSheets && shadowRoot.adoptedStyleSheets.length > 0)\n this.bypassOptions.stylesheetManager.adoptStyleSheets(\n shadowRoot.adoptedStyleSheets,\n this.mirror.getId(shadowRoot.host)\n );\n this.restoreHandlers.push(\n initAdoptedStyleSheetObserver(\n {\n mirror: this.mirror,\n stylesheetManager: this.bypassOptions.stylesheetManager\n },\n shadowRoot\n )\n );\n }, 0);\n }\n /**\n * Monkey patch 'attachShadow' of an IFrameElement to observe newly added shadow doms.\n */\n observeAttachShadow(iframeElement) {\n const iframeDoc = getIFrameContentDocument(iframeElement);\n const iframeWindow = getIFrameContentWindow(iframeElement);\n if (!iframeDoc || !iframeWindow) return;\n this.patchAttachShadow(\n iframeWindow.Element,\n iframeDoc\n );\n }\n /**\n * Patch 'attachShadow' to observe newly added shadow doms.\n */\n patchAttachShadow(element, doc) {\n const manager = this;\n this.restoreHandlers.push(\n patch(\n element.prototype,\n \"attachShadow\",\n function(original) {\n return function(option) {\n const shadowRoot = original.call(this, option);\n if (this.shadowRoot && inDom(this))\n manager.addShadowRoot(this.shadowRoot, doc);\n return shadowRoot;\n };\n }\n )\n );\n }\n reset() {\n this.restoreHandlers.forEach((handler) => {\n try {\n handler();\n } catch (e2) {\n }\n });\n this.restoreHandlers = [];\n this.shadowDoms = /* @__PURE__ */ new WeakSet();\n this.bypassOptions.canvasManager.resetShadowRoots();\n }\n}\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar lookup = typeof Uint8Array === \"undefined\" ? [] : new Uint8Array(256);\nfor (var i$1 = 0; i$1 < chars.length; i$1++) {\n lookup[chars.charCodeAt(i$1)] = i$1;\n}\nclass CanvasManagerNoop {\n reset() {\n }\n freeze() {\n }\n unfreeze() {\n }\n lock() {\n }\n unlock() {\n }\n snapshot() {\n }\n addWindow() {\n }\n addShadowRoot() {\n }\n resetShadowRoots() {\n }\n}\nclass StylesheetManager {\n constructor(options) {\n this.trackedLinkElements = /* @__PURE__ */ new WeakSet();\n this.styleMirror = new StyleSheetMirror();\n this.mutationCb = options.mutationCb;\n this.adoptedStyleSheetCb = options.adoptedStyleSheetCb;\n }\n attachLinkElement(linkEl, childSn) {\n if (\"_cssText\" in childSn.attributes)\n this.mutationCb({\n adds: [],\n removes: [],\n texts: [],\n attributes: [\n {\n id: childSn.id,\n attributes: childSn.attributes\n }\n ]\n });\n this.trackLinkElement(linkEl);\n }\n trackLinkElement(linkEl) {\n if (this.trackedLinkElements.has(linkEl)) return;\n this.trackedLinkElements.add(linkEl);\n this.trackStylesheetInLinkElement(linkEl);\n }\n adoptStyleSheets(sheets, hostId) {\n if (sheets.length === 0) return;\n const adoptedStyleSheetData = {\n id: hostId,\n styleIds: []\n };\n const styles = [];\n for (const sheet of sheets) {\n let styleId;\n if (!this.styleMirror.has(sheet)) {\n styleId = this.styleMirror.add(sheet);\n styles.push({\n styleId,\n rules: Array.from(sheet.rules || CSSRule, (r2, index) => ({\n rule: stringifyRule(r2),\n index\n }))\n });\n } else styleId = this.styleMirror.getId(sheet);\n adoptedStyleSheetData.styleIds.push(styleId);\n }\n if (styles.length > 0) adoptedStyleSheetData.styles = styles;\n this.adoptedStyleSheetCb(adoptedStyleSheetData);\n }\n reset() {\n this.styleMirror.reset();\n this.trackedLinkElements = /* @__PURE__ */ new WeakSet();\n }\n // TODO: take snapshot on stylesheet reload by applying event listener\n trackStylesheetInLinkElement(_linkEl) {\n }\n}\nclass ProcessedNodeManager {\n constructor() {\n this.nodeMap = /* @__PURE__ */ new WeakMap();\n this.active = false;\n }\n inOtherBuffer(node, thisBuffer) {\n const buffers = this.nodeMap.get(node);\n return buffers && Array.from(buffers).some((buffer) => buffer !== thisBuffer);\n }\n add(node, buffer) {\n if (!this.active) {\n this.active = true;\n onRequestAnimationFrame(() => {\n this.nodeMap = /* @__PURE__ */ new WeakMap();\n this.active = false;\n });\n }\n this.nodeMap.set(node, (this.nodeMap.get(node) || /* @__PURE__ */ new Set()).add(buffer));\n }\n destroy() {\n }\n}\nlet wrappedEmit;\nlet _takeFullSnapshot;\ntry {\n if (Array.from([1], (x) => x * 2)[0] !== 2) {\n const cleanFrame = document.createElement(\"iframe\");\n document.body.appendChild(cleanFrame);\n Array.from = cleanFrame.contentWindow?.Array.from || Array.from;\n document.body.removeChild(cleanFrame);\n }\n} catch (err) {\n console.debug(\"Unable to override Array.from\", err);\n}\nconst mirror = createMirror$2();\nfunction record(options = {}) {\n const {\n emit,\n checkoutEveryNms,\n checkoutEveryNth,\n blockClass = \"rr-block\",\n blockSelector = null,\n unblockSelector = null,\n ignoreClass = \"rr-ignore\",\n ignoreSelector = null,\n maskAllText = false,\n maskTextClass = \"rr-mask\",\n unmaskTextClass = null,\n maskTextSelector = null,\n unmaskTextSelector = null,\n inlineStylesheet = true,\n maskAllInputs,\n maskInputOptions: _maskInputOptions,\n slimDOMOptions: _slimDOMOptions,\n maskAttributeFn,\n maskInputFn,\n maskTextFn,\n maxCanvasSize = null,\n packFn,\n sampling = {},\n dataURLOptions = {},\n mousemoveWait,\n recordDOM = true,\n recordCanvas = false,\n recordCrossOriginIframes = false,\n recordAfter = options.recordAfter === \"DOMContentLoaded\" ? options.recordAfter : \"load\",\n userTriggeredOnInput = false,\n collectFonts = false,\n inlineImages = false,\n plugins,\n keepIframeSrcFn = () => false,\n ignoreCSSAttributes = /* @__PURE__ */ new Set([]),\n errorHandler: errorHandler2,\n onMutation,\n getCanvasManager\n } = options;\n registerErrorHandler(errorHandler2);\n const inEmittingFrame = recordCrossOriginIframes ? window.parent === window : true;\n let passEmitsToParent = false;\n if (!inEmittingFrame) {\n try {\n if (window.parent.document) {\n passEmitsToParent = false;\n }\n } catch (e2) {\n passEmitsToParent = true;\n }\n }\n if (inEmittingFrame && !emit) {\n throw new Error(\"emit function is required\");\n }\n if (!inEmittingFrame && !passEmitsToParent) {\n return () => {\n };\n }\n if (mousemoveWait !== undefined && sampling.mousemove === undefined) {\n sampling.mousemove = mousemoveWait;\n }\n mirror.reset();\n const maskInputOptions = maskAllInputs === true ? {\n color: true,\n date: true,\n \"datetime-local\": true,\n email: true,\n month: true,\n number: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true,\n textarea: true,\n select: true,\n radio: true,\n checkbox: true\n } : _maskInputOptions !== undefined ? _maskInputOptions : {};\n const slimDOMOptions = _slimDOMOptions === true || _slimDOMOptions === \"all\" ? {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaVerification: true,\n // the following are off for slimDOMOptions === true,\n // as they destroy some (hidden) info:\n headMetaAuthorship: _slimDOMOptions === \"all\",\n headMetaDescKeywords: _slimDOMOptions === \"all\"\n } : _slimDOMOptions ? _slimDOMOptions : {};\n polyfill$1();\n let lastFullSnapshotEvent;\n let incrementalSnapshotCount = 0;\n const eventProcessor = (e2) => {\n for (const plugin of plugins || []) {\n if (plugin.eventProcessor) {\n e2 = plugin.eventProcessor(e2);\n }\n }\n if (packFn && // Disable packing events which will be emitted to parent frames.\n !passEmitsToParent) {\n e2 = packFn(e2);\n }\n return e2;\n };\n wrappedEmit = (r2, isCheckout) => {\n const e2 = r2;\n e2.timestamp = nowTimestamp();\n if (mutationBuffers[0]?.isFrozen() && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {\n mutationBuffers.forEach((buf) => buf.unfreeze());\n }\n if (inEmittingFrame) {\n emit?.(eventProcessor(e2), isCheckout);\n } else if (passEmitsToParent) {\n const message = {\n type: \"rrweb\",\n event: eventProcessor(e2),\n origin: window.location.origin,\n isCheckout\n };\n window.parent.postMessage(message, \"*\");\n }\n if (e2.type === EventType.FullSnapshot) {\n lastFullSnapshotEvent = e2;\n incrementalSnapshotCount = 0;\n } else if (e2.type === EventType.IncrementalSnapshot) {\n if (e2.data.source === IncrementalSource.Mutation && e2.data.isAttachIframe) {\n return;\n }\n incrementalSnapshotCount++;\n const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;\n const exceedTime = checkoutEveryNms && lastFullSnapshotEvent && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\n if (exceedCount || exceedTime) {\n takeFullSnapshot2(true);\n }\n }\n };\n const wrappedMutationEmit = (m) => {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Mutation,\n ...m\n }\n });\n };\n const wrappedScrollEmit = (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Scroll,\n ...p\n }\n });\n const wrappedCanvasMutationEmit = (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.CanvasMutation,\n ...p\n }\n });\n const wrappedAdoptedStyleSheetEmit = (a2) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.AdoptedStyleSheet,\n ...a2\n }\n });\n const stylesheetManager = new StylesheetManager({\n mutationCb: wrappedMutationEmit,\n adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit\n });\n const iframeManager = typeof __RRWEB_EXCLUDE_IFRAME__ === \"boolean\" && __RRWEB_EXCLUDE_IFRAME__ ? new IframeManagerNoop() : new IframeManager({\n mirror,\n mutationCb: wrappedMutationEmit,\n stylesheetManager,\n recordCrossOriginIframes,\n wrappedEmit\n });\n for (const plugin of plugins || []) {\n if (plugin.getMirror)\n plugin.getMirror({\n nodeMirror: mirror,\n crossOriginIframeMirror: iframeManager.crossOriginIframeMirror,\n crossOriginIframeStyleMirror: iframeManager.crossOriginIframeStyleMirror\n });\n }\n const processedNodeManager = new ProcessedNodeManager();\n const canvasManager = _getCanvasManager(\n getCanvasManager,\n {\n mirror,\n win: window,\n mutationCb: (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.CanvasMutation,\n ...p\n }\n }),\n recordCanvas,\n blockClass,\n blockSelector,\n unblockSelector,\n maxCanvasSize,\n sampling: sampling[\"canvas\"],\n dataURLOptions,\n errorHandler: errorHandler2\n }\n );\n const shadowDomManager = typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === \"boolean\" && __RRWEB_EXCLUDE_SHADOW_DOM__ ? new ShadowDomManagerNoop() : new ShadowDomManager({\n mutationCb: wrappedMutationEmit,\n scrollCb: wrappedScrollEmit,\n bypassOptions: {\n onMutation,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskInputOptions,\n dataURLOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n recordCanvas,\n inlineImages,\n sampling,\n slimDOMOptions,\n iframeManager,\n stylesheetManager,\n canvasManager,\n keepIframeSrcFn,\n processedNodeManager\n },\n mirror\n });\n const takeFullSnapshot2 = (isCheckout = false) => {\n if (!recordDOM) {\n return;\n }\n wrappedEmit(\n {\n type: EventType.Meta,\n data: {\n href: window.location.href,\n width: getWindowWidth(),\n height: getWindowHeight()\n }\n },\n isCheckout\n );\n stylesheetManager.reset();\n shadowDomManager.init();\n mutationBuffers.forEach((buf) => buf.lock());\n const node = snapshot(document, {\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskAllInputs: maskInputOptions,\n maskAttributeFn,\n maskInputFn,\n maskTextFn,\n slimDOM: slimDOMOptions,\n dataURLOptions,\n recordCanvas,\n inlineImages,\n onSerialize: (n2) => {\n if (isSerializedIframe(n2, mirror)) {\n iframeManager.addIframe(n2);\n }\n if (isSerializedStylesheet(n2, mirror)) {\n stylesheetManager.trackLinkElement(n2);\n }\n if (hasShadowRoot(n2)) {\n shadowDomManager.addShadowRoot(n2.shadowRoot, document);\n }\n },\n onIframeLoad: (iframe, childSn) => {\n iframeManager.attachIframe(iframe, childSn);\n if (iframe.contentWindow) {\n canvasManager.addWindow(iframe.contentWindow);\n }\n shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: (linkEl, childSn) => {\n stylesheetManager.attachLinkElement(linkEl, childSn);\n },\n keepIframeSrcFn\n });\n if (!node) {\n return console.warn(\"Failed to snapshot the document\");\n }\n wrappedEmit({\n type: EventType.FullSnapshot,\n data: {\n node,\n initialOffset: getWindowScroll(window)\n }\n });\n mutationBuffers.forEach((buf) => buf.unlock());\n if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0)\n stylesheetManager.adoptStyleSheets(\n document.adoptedStyleSheets,\n mirror.getId(document)\n );\n };\n _takeFullSnapshot = takeFullSnapshot2;\n try {\n const handlers = [];\n const observe = (doc) => {\n return callbackWrapper(initObservers)(\n {\n onMutation,\n mutationCb: wrappedMutationEmit,\n mousemoveCb: (positions, source) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source,\n positions\n }\n }),\n mouseInteractionCb: (d) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.MouseInteraction,\n ...d\n }\n }),\n scrollCb: wrappedScrollEmit,\n viewportResizeCb: (d) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.ViewportResize,\n ...d\n }\n }),\n inputCb: (v2) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Input,\n ...v2\n }\n }),\n mediaInteractionCb: (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.MediaInteraction,\n ...p\n }\n }),\n styleSheetRuleCb: (r2) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.StyleSheetRule,\n ...r2\n }\n }),\n styleDeclarationCb: (r2) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.StyleDeclaration,\n ...r2\n }\n }),\n canvasMutationCb: wrappedCanvasMutationEmit,\n fontCb: (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Font,\n ...p\n }\n }),\n selectionCb: (p) => {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Selection,\n ...p\n }\n });\n },\n customElementCb: (c2) => {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.CustomElement,\n ...c2\n }\n });\n },\n blockClass,\n ignoreClass,\n ignoreSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n maskInputOptions,\n inlineStylesheet,\n sampling,\n recordDOM,\n recordCanvas,\n inlineImages,\n userTriggeredOnInput,\n collectFonts,\n doc,\n maskAttributeFn,\n maskInputFn,\n maskTextFn,\n keepIframeSrcFn,\n blockSelector,\n unblockSelector,\n slimDOMOptions,\n dataURLOptions,\n mirror,\n iframeManager,\n stylesheetManager,\n shadowDomManager,\n processedNodeManager,\n canvasManager,\n ignoreCSSAttributes,\n plugins: plugins?.filter((p) => p.observer)?.map((p) => ({\n observer: p.observer,\n options: p.options,\n callback: (payload) => wrappedEmit({\n type: EventType.Plugin,\n data: {\n plugin: p.name,\n payload\n }\n })\n })) || []\n },\n {}\n );\n };\n iframeManager.addLoadListener((iframeEl) => {\n try {\n handlers.push(observe(iframeEl.contentDocument));\n } catch (error) {\n console.warn(error);\n }\n });\n const init = () => {\n takeFullSnapshot2();\n handlers.push(observe(document));\n };\n if (document.readyState === \"interactive\" || document.readyState === \"complete\") {\n init();\n } else {\n handlers.push(\n on(\"DOMContentLoaded\", () => {\n wrappedEmit({\n type: EventType.DomContentLoaded,\n data: {}\n });\n if (recordAfter === \"DOMContentLoaded\") init();\n })\n );\n handlers.push(\n on(\n \"load\",\n () => {\n wrappedEmit({\n type: EventType.Load,\n data: {}\n });\n if (recordAfter === \"load\") init();\n },\n window\n )\n );\n }\n return () => {\n handlers.forEach((h) => h());\n processedNodeManager.destroy();\n _takeFullSnapshot = void 0;\n unregisterErrorHandler();\n };\n } catch (error) {\n console.warn(error);\n }\n}\nfunction takeFullSnapshot(isCheckout) {\n if (!_takeFullSnapshot) {\n throw new Error(\"please take full snapshot after start recording\");\n }\n _takeFullSnapshot(isCheckout);\n}\nrecord.mirror = mirror;\nrecord.takeFullSnapshot = takeFullSnapshot;\nfunction _getCanvasManager(getCanvasManagerFn, options) {\n try {\n return getCanvasManagerFn ? getCanvasManagerFn(options) : new CanvasManagerNoop();\n } catch {\n console.warn(\"Unable to initialize CanvasManager\");\n return new CanvasManagerNoop();\n }\n}\nvar n;\n!function(t2) {\n t2[t2.NotStarted = 0] = \"NotStarted\", t2[t2.Running = 1] = \"Running\", t2[t2.Stopped = 2] = \"Stopped\";\n}(n || (n = {}));\n\nconst ReplayEventTypeIncrementalSnapshot = 3;\nconst ReplayEventTypeCustom = 5;\n\n/**\n * Converts a timestamp to ms, if it was in s, or keeps it as ms.\n */\nfunction timestampToMs(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp : timestamp * 1000;\n}\n\n/**\n * Converts a timestamp to s, if it was in ms, or keeps it as s.\n */\nfunction timestampToS(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Add a breadcrumb event to replay.\n */\nfunction addBreadcrumbEvent(replay, breadcrumb) {\n if (breadcrumb.category === 'sentry.transaction') {\n return;\n }\n\n if (['ui.click', 'ui.input'].includes(breadcrumb.category )) {\n replay.triggerUserActivity();\n } else {\n replay.checkAndHandleExpiredSession();\n }\n\n replay.addUpdate(() => {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n replay.throttledAddEvent({\n type: EventType.Custom,\n // TODO: We were converting from ms to seconds for breadcrumbs, spans,\n // but maybe we should just keep them as milliseconds\n timestamp: (breadcrumb.timestamp || 0) * 1000,\n data: {\n tag: 'breadcrumb',\n // normalize to max. 10 depth and 1_000 properties per object\n payload: normalize(breadcrumb, 10, 1000),\n },\n });\n\n // Do not flush after console log messages\n return breadcrumb.category === 'console';\n });\n}\n\nconst INTERACTIVE_SELECTOR = 'button,a';\n\n/** Get the closest interactive parent element, or else return the given element. */\nfunction getClosestInteractive(element) {\n const closestInteractive = element.closest(INTERACTIVE_SELECTOR);\n return closestInteractive || element;\n}\n\n/**\n * For clicks, we check if the target is inside of a button or link\n * If so, we use this as the target instead\n * This is useful because if you click on the image in ,\n * The target will be the image, not the button, which we don't want here\n */\nfunction getClickTargetNode(event) {\n const target = getTargetNode(event);\n\n if (!target || !(target instanceof Element)) {\n return target;\n }\n\n return getClosestInteractive(target);\n}\n\n/** Get the event target node. */\nfunction getTargetNode(event) {\n if (isEventWithTarget(event)) {\n return event.target ;\n }\n\n return event;\n}\n\nfunction isEventWithTarget(event) {\n return typeof event === 'object' && !!event && 'target' in event;\n}\n\nlet handlers;\n\n/**\n * Register a handler to be called when `window.open()` is called.\n * Returns a cleanup function.\n */\nfunction onWindowOpen(cb) {\n // Ensure to only register this once\n if (!handlers) {\n handlers = [];\n monkeyPatchWindowOpen();\n }\n\n handlers.push(cb);\n\n return () => {\n const pos = handlers ? handlers.indexOf(cb) : -1;\n if (pos > -1) {\n (handlers ).splice(pos, 1);\n }\n };\n}\n\nfunction monkeyPatchWindowOpen() {\n fill(WINDOW, 'open', function (originalWindowOpen) {\n return function (...args) {\n if (handlers) {\n try {\n handlers.forEach(handler => handler());\n } catch (e) {\n // ignore errors in here\n }\n }\n\n return originalWindowOpen.apply(WINDOW, args);\n };\n });\n}\n\n/** Any IncrementalSource for rrweb that we interpret as a kind of mutation. */\nconst IncrementalMutationSources = new Set([\n IncrementalSource.Mutation,\n IncrementalSource.StyleSheetRule,\n IncrementalSource.StyleDeclaration,\n IncrementalSource.AdoptedStyleSheet,\n IncrementalSource.CanvasMutation,\n IncrementalSource.Selection,\n IncrementalSource.MediaInteraction,\n]);\n\n/** Handle a click. */\nfunction handleClick(clickDetector, clickBreadcrumb, node) {\n clickDetector.handleClick(clickBreadcrumb, node);\n}\n\n/** A click detector class that can be used to detect slow or rage clicks on elements. */\nclass ClickDetector {\n // protected for testing\n\n constructor(\n replay,\n slowClickConfig,\n // Just for easier testing\n _addBreadcrumbEvent = addBreadcrumbEvent,\n ) {\n this._lastMutation = 0;\n this._lastScroll = 0;\n this._clicks = [];\n\n // We want everything in s, but options are in ms\n this._timeout = slowClickConfig.timeout / 1000;\n this._threshold = slowClickConfig.threshold / 1000;\n this._scrollTimeout = slowClickConfig.scrollTimeout / 1000;\n this._replay = replay;\n this._ignoreSelector = slowClickConfig.ignoreSelector;\n this._addBreadcrumbEvent = _addBreadcrumbEvent;\n }\n\n /** Register click detection handlers on mutation or scroll. */\n addListeners() {\n const cleanupWindowOpen = onWindowOpen(() => {\n // Treat window.open as mutation\n this._lastMutation = nowInSeconds();\n });\n\n this._teardown = () => {\n cleanupWindowOpen();\n\n this._clicks = [];\n this._lastMutation = 0;\n this._lastScroll = 0;\n };\n }\n\n /** Clean up listeners. */\n removeListeners() {\n if (this._teardown) {\n this._teardown();\n }\n\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n }\n\n /** @inheritDoc */\n handleClick(breadcrumb, node) {\n if (ignoreElement(node, this._ignoreSelector) || !isClickBreadcrumb(breadcrumb)) {\n return;\n }\n\n const newClick = {\n timestamp: timestampToS(breadcrumb.timestamp),\n clickBreadcrumb: breadcrumb,\n // Set this to 0 so we know it originates from the click breadcrumb\n clickCount: 0,\n node,\n };\n\n // If there was a click in the last 1s on the same element, ignore it - only keep a single reference per second\n if (\n this._clicks.some(click => click.node === newClick.node && Math.abs(click.timestamp - newClick.timestamp) < 1)\n ) {\n return;\n }\n\n this._clicks.push(newClick);\n\n // If this is the first new click, set a timeout to check for multi clicks\n if (this._clicks.length === 1) {\n this._scheduleCheckClicks();\n }\n }\n\n /** @inheritDoc */\n registerMutation(timestamp = Date.now()) {\n this._lastMutation = timestampToS(timestamp);\n }\n\n /** @inheritDoc */\n registerScroll(timestamp = Date.now()) {\n this._lastScroll = timestampToS(timestamp);\n }\n\n /** @inheritDoc */\n registerClick(element) {\n const node = getClosestInteractive(element);\n this._handleMultiClick(node );\n }\n\n /** Count multiple clicks on elements. */\n _handleMultiClick(node) {\n this._getClicks(node).forEach(click => {\n click.clickCount++;\n });\n }\n\n /** Get all pending clicks for a given node. */\n _getClicks(node) {\n return this._clicks.filter(click => click.node === node);\n }\n\n /** Check the clicks that happened. */\n _checkClicks() {\n const timedOutClicks = [];\n\n const now = nowInSeconds();\n\n this._clicks.forEach(click => {\n if (!click.mutationAfter && this._lastMutation) {\n click.mutationAfter = click.timestamp <= this._lastMutation ? this._lastMutation - click.timestamp : undefined;\n }\n if (!click.scrollAfter && this._lastScroll) {\n click.scrollAfter = click.timestamp <= this._lastScroll ? this._lastScroll - click.timestamp : undefined;\n }\n\n // All of these are in seconds!\n if (click.timestamp + this._timeout <= now) {\n timedOutClicks.push(click);\n }\n });\n\n // Remove \"old\" clicks\n for (const click of timedOutClicks) {\n const pos = this._clicks.indexOf(click);\n\n if (pos > -1) {\n this._generateBreadcrumbs(click);\n this._clicks.splice(pos, 1);\n }\n }\n\n // Trigger new check, unless no clicks left\n if (this._clicks.length) {\n this._scheduleCheckClicks();\n }\n }\n\n /** Generate matching breadcrumb(s) for the click. */\n _generateBreadcrumbs(click) {\n const replay = this._replay;\n const hadScroll = click.scrollAfter && click.scrollAfter <= this._scrollTimeout;\n const hadMutation = click.mutationAfter && click.mutationAfter <= this._threshold;\n\n const isSlowClick = !hadScroll && !hadMutation;\n const { clickCount, clickBreadcrumb } = click;\n\n // Slow click\n if (isSlowClick) {\n // If `mutationAfter` is set, it means a mutation happened after the threshold, but before the timeout\n // If not, it means we just timed out without scroll & mutation\n const timeAfterClickMs = Math.min(click.mutationAfter || this._timeout, this._timeout) * 1000;\n const endReason = timeAfterClickMs < this._timeout * 1000 ? 'mutation' : 'timeout';\n\n const breadcrumb = {\n type: 'default',\n message: clickBreadcrumb.message,\n timestamp: clickBreadcrumb.timestamp,\n category: 'ui.slowClickDetected',\n data: {\n ...clickBreadcrumb.data,\n url: WINDOW.location.href,\n route: replay.getCurrentRoute(),\n timeAfterClickMs,\n endReason,\n // If clickCount === 0, it means multiClick was not correctly captured here\n // - we still want to send 1 in this case\n clickCount: clickCount || 1,\n },\n };\n\n this._addBreadcrumbEvent(replay, breadcrumb);\n return;\n }\n\n // Multi click\n if (clickCount > 1) {\n const breadcrumb = {\n type: 'default',\n message: clickBreadcrumb.message,\n timestamp: clickBreadcrumb.timestamp,\n category: 'ui.multiClick',\n data: {\n ...clickBreadcrumb.data,\n url: WINDOW.location.href,\n route: replay.getCurrentRoute(),\n clickCount,\n metric: true,\n },\n };\n\n this._addBreadcrumbEvent(replay, breadcrumb);\n }\n }\n\n /** Schedule to check current clicks. */\n _scheduleCheckClicks() {\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n\n this._checkClickTimeout = setTimeout$3(() => this._checkClicks(), 1000);\n }\n}\n\nconst SLOW_CLICK_TAGS = ['A', 'BUTTON', 'INPUT'];\n\n/** exported for tests only */\nfunction ignoreElement(node, ignoreSelector) {\n if (!SLOW_CLICK_TAGS.includes(node.tagName)) {\n return true;\n }\n\n // If tag, we only want to consider input[type='submit'] & input[type='button']\n if (node.tagName === 'INPUT' && !['submit', 'button'].includes(node.getAttribute('type') || '')) {\n return true;\n }\n\n // If tag, detect special variants that may not lead to an action\n // If target !== _self, we may open the link somewhere else, which would lead to no action\n // Also, when downloading a file, we may not leave the page, but still not trigger an action\n if (\n node.tagName === 'A' &&\n (node.hasAttribute('download') || (node.hasAttribute('target') && node.getAttribute('target') !== '_self'))\n ) {\n return true;\n }\n\n if (ignoreSelector && node.matches(ignoreSelector)) {\n return true;\n }\n\n return false;\n}\n\nfunction isClickBreadcrumb(breadcrumb) {\n return !!(breadcrumb.data && typeof breadcrumb.data.nodeId === 'number' && breadcrumb.timestamp);\n}\n\n// This is good enough for us, and is easier to test/mock than `timestampInSeconds`\nfunction nowInSeconds() {\n return Date.now() / 1000;\n}\n\n/** Update the click detector based on a recording event of rrweb. */\nfunction updateClickDetectorForRecordingEvent(clickDetector, event) {\n try {\n // note: We only consider incremental snapshots here\n // This means that any full snapshot is ignored for mutation detection - the reason is that we simply cannot know if a mutation happened here.\n // E.g. think that we are buffering, an error happens and we take a full snapshot because we switched to session mode -\n // in this scenario, we would not know if a dead click happened because of the error, which is a key dead click scenario.\n // Instead, by ignoring full snapshots, we have the risk that we generate a false positive\n // (if a mutation _did_ happen but was \"swallowed\" by the full snapshot)\n // But this should be more unlikely as we'd generally capture the incremental snapshot right away\n\n if (!isIncrementalEvent(event)) {\n return;\n }\n\n const { source } = event.data;\n if (IncrementalMutationSources.has(source)) {\n clickDetector.registerMutation(event.timestamp);\n }\n\n if (source === IncrementalSource.Scroll) {\n clickDetector.registerScroll(event.timestamp);\n }\n\n if (isIncrementalMouseInteraction(event)) {\n const { type, id } = event.data;\n const node = record.mirror.getNode(id);\n\n if (node instanceof HTMLElement && type === MouseInteractions.Click) {\n clickDetector.registerClick(node);\n }\n }\n } catch {\n // ignore errors here, e.g. if accessing something that does not exist\n }\n}\n\nfunction isIncrementalEvent(event) {\n return event.type === ReplayEventTypeIncrementalSnapshot;\n}\n\nfunction isIncrementalMouseInteraction(\n event,\n) {\n return event.data.source === IncrementalSource.MouseInteraction;\n}\n\n/**\n * Create a breadcrumb for a replay.\n */\nfunction createBreadcrumb(\n breadcrumb,\n) {\n return {\n timestamp: Date.now() / 1000,\n type: 'default',\n ...breadcrumb,\n };\n}\n\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n return NodeType2;\n})(NodeType || {});\n\n// Note that these are the serialized attributes and not attributes directly on\n// the DOM Node. Attributes we are interested in:\nconst ATTRIBUTES_TO_RECORD = new Set([\n 'id',\n 'class',\n 'aria-label',\n 'role',\n 'name',\n 'alt',\n 'title',\n 'data-test-id',\n 'data-testid',\n 'disabled',\n 'aria-disabled',\n 'data-sentry-component',\n]);\n\n/**\n * Inclusion list of attributes that we want to record from the DOM element\n */\nfunction getAttributesToRecord(attributes) {\n const obj = {};\n if (!attributes['data-sentry-component'] && attributes['data-sentry-element']) {\n attributes['data-sentry-component'] = attributes['data-sentry-element'];\n }\n for (const key in attributes) {\n if (ATTRIBUTES_TO_RECORD.has(key)) {\n let normalizedKey = key;\n\n if (key === 'data-testid' || key === 'data-test-id') {\n normalizedKey = 'testId';\n }\n\n obj[normalizedKey] = attributes[key];\n }\n }\n\n return obj;\n}\n\nconst handleDomListener = (\n replay,\n) => {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleDom(handlerData);\n\n if (!result) {\n return;\n }\n\n const isClick = handlerData.name === 'click';\n const event = isClick ? (handlerData.event ) : undefined;\n // Ignore clicks if ctrl/alt/meta/shift keys are held down as they alter behavior of clicks (e.g. open in new tab)\n if (\n isClick &&\n replay.clickDetector &&\n event &&\n event.target &&\n !event.altKey &&\n !event.metaKey &&\n !event.ctrlKey &&\n !event.shiftKey\n ) {\n handleClick(\n replay.clickDetector,\n result ,\n getClickTargetNode(handlerData.event ) ,\n );\n }\n\n addBreadcrumbEvent(replay, result);\n };\n};\n\n/** Get the base DOM breadcrumb. */\nfunction getBaseDomBreadcrumb(target, message) {\n const nodeId = record.mirror.getId(target);\n const node = nodeId && record.mirror.getNode(nodeId);\n const meta = node && record.mirror.getMeta(node);\n const element = meta && isElement(meta) ? meta : null;\n\n return {\n message,\n data: element\n ? {\n nodeId,\n node: {\n id: nodeId,\n tagName: element.tagName,\n textContent: Array.from(element.childNodes)\n .map((node) => node.type === NodeType.Text && node.textContent)\n .filter(Boolean) // filter out empty values\n .map(text => (text ).trim())\n .join(''),\n attributes: getAttributesToRecord(element.attributes),\n },\n }\n : {},\n };\n}\n\n/**\n * An event handler to react to DOM events.\n * Exported for tests.\n */\nfunction handleDom(handlerData) {\n const { target, message } = getDomTarget(handlerData);\n\n return createBreadcrumb({\n category: `ui.${handlerData.name}`,\n ...getBaseDomBreadcrumb(target, message),\n });\n}\n\nfunction getDomTarget(handlerData) {\n const isClick = handlerData.name === 'click';\n\n let message;\n let target = null;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = isClick ? getClickTargetNode(handlerData.event ) : getTargetNode(handlerData.event );\n message = htmlTreeAsString(target, { maxStringLength: 200 }) || '';\n } catch (e) {\n message = '';\n }\n\n return { target, message };\n}\n\nfunction isElement(node) {\n return node.type === NodeType.Element;\n}\n\n/** Handle keyboard events & create breadcrumbs. */\nfunction handleKeyboardEvent(replay, event) {\n if (!replay.isEnabled()) {\n return;\n }\n\n // Update user activity, but do not restart recording as it can create\n // noisy/low-value replays (e.g. user comes back from idle, hits alt-tab, new\n // session with a single \"keydown\" breadcrumb is created)\n replay.updateUserActivity();\n\n const breadcrumb = getKeyboardBreadcrumb(event);\n\n if (!breadcrumb) {\n return;\n }\n\n addBreadcrumbEvent(replay, breadcrumb);\n}\n\n/** exported only for tests */\nfunction getKeyboardBreadcrumb(event) {\n const { metaKey, shiftKey, ctrlKey, altKey, key, target } = event;\n\n // never capture for input fields\n if (!target || isInputElement(target ) || !key) {\n return null;\n }\n\n // Note: We do not consider shift here, as that means \"uppercase\"\n const hasModifierKey = metaKey || ctrlKey || altKey;\n const isCharacterKey = key.length === 1; // other keys like Escape, Tab, etc have a longer length\n\n // Do not capture breadcrumb if only a word key is pressed\n // This could leak e.g. user input\n if (!hasModifierKey && isCharacterKey) {\n return null;\n }\n\n const message = htmlTreeAsString(target, { maxStringLength: 200 }) || '';\n const baseBreadcrumb = getBaseDomBreadcrumb(target , message);\n\n return createBreadcrumb({\n category: 'ui.keyDown',\n message,\n data: {\n ...baseBreadcrumb.data,\n metaKey,\n shiftKey,\n ctrlKey,\n altKey,\n key,\n },\n });\n}\n\nfunction isInputElement(target) {\n return target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable;\n}\n\n// Map entryType -> function to normalize data for event\nconst ENTRY_TYPES\n\n = {\n // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n resource: createResourceEntry,\n paint: createPaintEntry,\n // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n navigation: createNavigationEntry,\n};\n\n/**\n * Handler creater for web vitals\n */\nfunction webVitalHandler(\n getter,\n replay,\n) {\n return ({ metric }) => void replay.replayPerformanceEntries.push(getter(metric));\n}\n\n/**\n * Create replay performance entries from the browser performance entries.\n */\nfunction createPerformanceEntries(\n entries,\n) {\n return entries.map(createPerformanceEntry).filter(Boolean) ;\n}\n\nfunction createPerformanceEntry(entry) {\n const entryType = ENTRY_TYPES[entry.entryType];\n if (!entryType) {\n return null;\n }\n\n return entryType(entry);\n}\n\nfunction getAbsoluteTime(time) {\n // browserPerformanceTimeOrigin can be undefined if `performance` or\n // `performance.now` doesn't exist, but this is already checked by this integration\n return ((browserPerformanceTimeOrigin() || WINDOW.performance.timeOrigin) + time) / 1000;\n}\n\nfunction createPaintEntry(entry) {\n const { duration, entryType, name, startTime } = entry;\n\n const start = getAbsoluteTime(startTime);\n return {\n type: entryType,\n name,\n start,\n end: start + duration,\n data: undefined,\n };\n}\n\nfunction createNavigationEntry(entry) {\n const {\n entryType,\n name,\n decodedBodySize,\n duration,\n domComplete,\n encodedBodySize,\n domContentLoadedEventStart,\n domContentLoadedEventEnd,\n domInteractive,\n loadEventStart,\n loadEventEnd,\n redirectCount,\n startTime,\n transferSize,\n type,\n } = entry;\n\n // Ignore entries with no duration, they do not seem to be useful and cause dupes\n if (duration === 0) {\n return null;\n }\n\n return {\n type: `${entryType}.${type}`,\n start: getAbsoluteTime(startTime),\n end: getAbsoluteTime(domComplete),\n name,\n data: {\n size: transferSize,\n decodedBodySize,\n encodedBodySize,\n duration,\n domInteractive,\n domContentLoadedEventStart,\n domContentLoadedEventEnd,\n loadEventStart,\n loadEventEnd,\n domComplete,\n redirectCount,\n },\n };\n}\n\nfunction createResourceEntry(\n entry,\n) {\n const {\n entryType,\n initiatorType,\n name,\n responseEnd,\n startTime,\n decodedBodySize,\n encodedBodySize,\n responseStatus,\n transferSize,\n } = entry;\n\n // Core SDK handles these\n if (['fetch', 'xmlhttprequest'].includes(initiatorType)) {\n return null;\n }\n\n return {\n type: `${entryType}.${initiatorType}`,\n start: getAbsoluteTime(startTime),\n end: getAbsoluteTime(responseEnd),\n name,\n data: {\n size: transferSize,\n statusCode: responseStatus,\n decodedBodySize,\n encodedBodySize,\n },\n };\n}\n\n/**\n * Add a LCP event to the replay based on a LCP metric.\n */\nfunction getLargestContentfulPaint(metric) {\n const lastEntry = metric.entries[metric.entries.length - 1] ;\n const node = lastEntry?.element ? [lastEntry.element] : undefined;\n return getWebVital(metric, 'largest-contentful-paint', node);\n}\n\nfunction isLayoutShift(entry) {\n return (entry ).sources !== undefined;\n}\n\n/**\n * Add a CLS event to the replay based on a CLS metric.\n */\nfunction getCumulativeLayoutShift(metric) {\n const layoutShifts = [];\n const nodes = [];\n for (const entry of metric.entries) {\n if (isLayoutShift(entry)) {\n const nodeIds = [];\n for (const source of entry.sources) {\n if (source.node) {\n nodes.push(source.node);\n const nodeId = record.mirror.getId(source.node);\n if (nodeId) {\n nodeIds.push(nodeId);\n }\n }\n }\n layoutShifts.push({ value: entry.value, nodeIds: nodeIds.length ? nodeIds : undefined });\n }\n }\n\n return getWebVital(metric, 'cumulative-layout-shift', nodes, layoutShifts);\n}\n\n/**\n * Add a FID event to the replay based on a FID metric.\n */\nfunction getFirstInputDelay(metric) {\n const lastEntry = metric.entries[metric.entries.length - 1] ;\n const node = lastEntry?.target ? [lastEntry.target] : undefined;\n return getWebVital(metric, 'first-input-delay', node);\n}\n\n/**\n * Add an INP event to the replay based on an INP metric.\n */\nfunction getInteractionToNextPaint(metric) {\n const lastEntry = metric.entries[metric.entries.length - 1] ;\n const node = lastEntry?.target ? [lastEntry.target] : undefined;\n return getWebVital(metric, 'interaction-to-next-paint', node);\n}\n\n/**\n * Add an web vital event to the replay based on the web vital metric.\n */\nfunction getWebVital(\n metric,\n name,\n nodes,\n attributions,\n) {\n const value = metric.value;\n const rating = metric.rating;\n\n const end = getAbsoluteTime(value);\n\n return {\n type: 'web-vital',\n name,\n start: end,\n end,\n data: {\n value,\n size: value,\n rating,\n nodeIds: nodes ? nodes.map(node => record.mirror.getId(node)) : undefined,\n attributions,\n },\n };\n}\n\n/**\n * Sets up a PerformanceObserver to listen to all performance entry types.\n * Returns a callback to stop observing.\n */\nfunction setupPerformanceObserver(replay) {\n function addPerformanceEntry(entry) {\n // It is possible for entries to come up multiple times\n if (!replay.performanceEntries.includes(entry)) {\n replay.performanceEntries.push(entry);\n }\n }\n\n function onEntries({ entries }) {\n entries.forEach(addPerformanceEntry);\n }\n\n const clearCallbacks = [];\n\n (['navigation', 'paint', 'resource'] ).forEach(type => {\n clearCallbacks.push(addPerformanceInstrumentationHandler(type, onEntries));\n });\n\n clearCallbacks.push(\n addLcpInstrumentationHandler(webVitalHandler(getLargestContentfulPaint, replay)),\n addClsInstrumentationHandler(webVitalHandler(getCumulativeLayoutShift, replay)),\n addFidInstrumentationHandler(webVitalHandler(getFirstInputDelay, replay)),\n addInpInstrumentationHandler(webVitalHandler(getInteractionToNextPaint, replay)),\n );\n\n // A callback to cleanup all handlers\n return () => {\n clearCallbacks.forEach(clearCallback => clearCallback());\n };\n}\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nconst r = `var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s>f]=l}else for(o=new n(i),s=0;s>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=[\"unexpected EOF\",\"invalid block type\",\"invalid length/literal\",\"invalid distance\",\"stream finished\",\"no stream handler\",,\"no callback\",\"invalid UTF-8 data\",\"extra field too long\",\"date not in range 1980-2099\",\"filename too long\",\"stream finishing\",\"invalid zip data\"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;sd&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<e))break;w+=m-(1<>=y;w>0;){var M=o[s].s;p[M]=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if(\"function\"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){G.prototype.flush.call(this)},t}(),J=\"undefined\"!=typeof TextEncoder&&new TextEncoder,K=\"undefined\"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;oi.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),s=i.length;return q(i,n),j(i,s-8,r.d()),j(i,s-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error(\"Adding invalid event\");const n=this._hasEvents?\",\":\"\";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push(\"]\",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push(\"[\")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener(\"message\",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&\"function\"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:\"init\",success:!0,response:void 0});`;\n\nfunction e(){const e=new Blob([r]);return URL.createObjectURL(e)}\n\nconst CONSOLE_LEVELS = ['info', 'warn', 'error', 'log'] ;\nconst PREFIX = '[Replay] ';\n\nfunction _addBreadcrumb(message, level = 'info') {\n addBreadcrumb(\n {\n category: 'console',\n data: {\n logger: 'replay',\n },\n level,\n message: `${PREFIX}${message}`,\n },\n { level },\n );\n}\n\nfunction makeReplayLogger() {\n let _capture = false;\n let _trace = false;\n\n const _logger = {\n exception: () => undefined,\n infoTick: () => undefined,\n setConfig: (opts) => {\n _capture = !!opts.captureExceptions;\n _trace = !!opts.traceInternals;\n },\n };\n\n if (DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(name => {\n _logger[name] = (...args) => {\n logger$1[name](PREFIX, ...args);\n if (_trace) {\n _addBreadcrumb(args.join(''), severityLevelFromString(name));\n }\n };\n });\n\n _logger.exception = (error, ...message) => {\n if (message.length && _logger.error) {\n _logger.error(...message);\n }\n\n logger$1.error(PREFIX, error);\n\n if (_capture) {\n captureException(error);\n } else if (_trace) {\n // No need for a breadcrumb if `_capture` is enabled since it should be\n // captured as an exception\n _addBreadcrumb(error, 'error');\n }\n };\n\n _logger.infoTick = (...args) => {\n logger$1.info(PREFIX, ...args);\n if (_trace) {\n // Wait a tick here to avoid race conditions for some initial logs\n // which may be added before replay is initialized\n setTimeout(() => _addBreadcrumb(args[0]), 0);\n }\n };\n } else {\n CONSOLE_LEVELS.forEach(name => {\n _logger[name] = () => undefined;\n });\n }\n\n return _logger ;\n}\n\nconst logger = makeReplayLogger();\n\n/** This error indicates that the event buffer size exceeded the limit.. */\nclass EventBufferSizeExceededError extends Error {\n constructor() {\n super(`Event buffer exceeded maximum size of ${REPLAY_MAX_EVENT_BUFFER_SIZE}.`);\n }\n}\n\n/**\n * A basic event buffer that does not do any compression.\n * Used as fallback if the compression worker cannot be loaded or is disabled.\n */\nclass EventBufferArray {\n /** All the events that are buffered to be sent. */\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n\n constructor() {\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n this.waitForCheckout = false;\n }\n\n /** @inheritdoc */\n get hasEvents() {\n return this.events.length > 0;\n }\n\n /** @inheritdoc */\n get type() {\n return 'sync';\n }\n\n /** @inheritdoc */\n destroy() {\n this.events = [];\n }\n\n /** @inheritdoc */\n async addEvent(event) {\n const eventSize = JSON.stringify(event).length;\n this._totalSize += eventSize;\n if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n throw new EventBufferSizeExceededError();\n }\n\n this.events.push(event);\n }\n\n /** @inheritdoc */\n finish() {\n return new Promise(resolve => {\n // Make a copy of the events array reference and immediately clear the\n // events member so that we do not lose new events while uploading\n // attachment.\n const eventsRet = this.events;\n this.clear();\n resolve(JSON.stringify(eventsRet));\n });\n }\n\n /** @inheritdoc */\n clear() {\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n const timestamp = this.events.map(event => event.timestamp).sort()[0];\n\n if (!timestamp) {\n return null;\n }\n\n return timestampToMs(timestamp);\n }\n}\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nclass WorkerHandler {\n\n constructor(worker) {\n this._worker = worker;\n this._id = 0;\n }\n\n /**\n * Ensure the worker is ready (or not).\n * This will either resolve when the worker is ready, or reject if an error occurred.\n */\n ensureReady() {\n // Ensure we only check once\n if (this._ensureReadyPromise) {\n return this._ensureReadyPromise;\n }\n\n this._ensureReadyPromise = new Promise((resolve, reject) => {\n this._worker.addEventListener(\n 'message',\n ({ data }) => {\n if ((data ).success) {\n resolve();\n } else {\n reject();\n }\n },\n { once: true },\n );\n\n this._worker.addEventListener(\n 'error',\n error => {\n reject(error);\n },\n { once: true },\n );\n });\n\n return this._ensureReadyPromise;\n }\n\n /**\n * Destroy the worker.\n */\n destroy() {\n DEBUG_BUILD && logger.info('Destroying compression worker');\n this._worker.terminate();\n }\n\n /**\n * Post message to worker and wait for response before resolving promise.\n */\n postMessage(method, arg) {\n const id = this._getAndIncrementId();\n\n return new Promise((resolve, reject) => {\n const listener = ({ data }) => {\n const response = data ;\n if (response.method !== method) {\n return;\n }\n\n // There can be multiple listeners for a single method, the id ensures\n // that the response matches the caller.\n if (response.id !== id) {\n return;\n }\n\n // At this point, we'll always want to remove listener regardless of result status\n this._worker.removeEventListener('message', listener);\n\n if (!response.success) {\n // TODO: Do some error handling, not sure what\n DEBUG_BUILD && logger.error('Error in compression worker: ', response.response);\n\n reject(new Error('Error in compression worker'));\n return;\n }\n\n resolve(response.response );\n };\n\n // Note: we can't use `once` option because it's possible it needs to\n // listen to multiple messages\n this._worker.addEventListener('message', listener);\n this._worker.postMessage({ id, method, arg });\n });\n }\n\n /** Get the current ID and increment it for the next call. */\n _getAndIncrementId() {\n return this._id++;\n }\n}\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nclass EventBufferCompressionWorker {\n /** @inheritdoc */\n\n /** @inheritdoc */\n\n constructor(worker) {\n this._worker = new WorkerHandler(worker);\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false;\n this.waitForCheckout = false;\n }\n\n /** @inheritdoc */\n get hasEvents() {\n return !!this._earliestTimestamp;\n }\n\n /** @inheritdoc */\n get type() {\n return 'worker';\n }\n\n /**\n * Ensure the worker is ready (or not).\n * This will either resolve when the worker is ready, or reject if an error occurred.\n */\n ensureReady() {\n return this._worker.ensureReady();\n }\n\n /**\n * Destroy the event buffer.\n */\n destroy() {\n this._worker.destroy();\n }\n\n /**\n * Add an event to the event buffer.\n *\n * Returns true if event was successfully received and processed by worker.\n */\n addEvent(event) {\n const timestamp = timestampToMs(event.timestamp);\n if (!this._earliestTimestamp || timestamp < this._earliestTimestamp) {\n this._earliestTimestamp = timestamp;\n }\n\n const data = JSON.stringify(event);\n this._totalSize += data.length;\n\n if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n return Promise.reject(new EventBufferSizeExceededError());\n }\n\n return this._sendEventToWorker(data);\n }\n\n /**\n * Finish the event buffer and return the compressed data.\n */\n finish() {\n return this._finishRequest();\n }\n\n /** @inheritdoc */\n clear() {\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false;\n\n // We do not wait on this, as we assume the order of messages is consistent for the worker\n this._worker.postMessage('clear').then(null, e => {\n DEBUG_BUILD && logger.exception(e, 'Sending \"clear\" message to worker failed', e);\n });\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n return this._earliestTimestamp;\n }\n\n /**\n * Send the event to the worker.\n */\n _sendEventToWorker(data) {\n return this._worker.postMessage('addEvent', data);\n }\n\n /**\n * Finish the request and return the compressed data from the worker.\n */\n async _finishRequest() {\n const response = await this._worker.postMessage('finish');\n\n this._earliestTimestamp = null;\n this._totalSize = 0;\n\n return response;\n }\n}\n\n/**\n * This proxy will try to use the compression worker, and fall back to use the simple buffer if an error occurs there.\n * This can happen e.g. if the worker cannot be loaded.\n * Exported only for testing.\n */\nclass EventBufferProxy {\n\n constructor(worker) {\n this._fallback = new EventBufferArray();\n this._compression = new EventBufferCompressionWorker(worker);\n this._used = this._fallback;\n\n this._ensureWorkerIsLoadedPromise = this._ensureWorkerIsLoaded();\n }\n\n /** @inheritdoc */\n get waitForCheckout() {\n return this._used.waitForCheckout;\n }\n\n /** @inheritdoc */\n get type() {\n return this._used.type;\n }\n\n /** @inheritDoc */\n get hasEvents() {\n return this._used.hasEvents;\n }\n\n /** @inheritdoc */\n get hasCheckout() {\n return this._used.hasCheckout;\n }\n /** @inheritdoc */\n set hasCheckout(value) {\n this._used.hasCheckout = value;\n }\n\n /** @inheritdoc */\n // eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures\n set waitForCheckout(value) {\n this._used.waitForCheckout = value;\n }\n\n /** @inheritDoc */\n destroy() {\n this._fallback.destroy();\n this._compression.destroy();\n }\n\n /** @inheritdoc */\n clear() {\n return this._used.clear();\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n return this._used.getEarliestTimestamp();\n }\n\n /**\n * Add an event to the event buffer.\n *\n * Returns true if event was successfully added.\n */\n addEvent(event) {\n return this._used.addEvent(event);\n }\n\n /** @inheritDoc */\n async finish() {\n // Ensure the worker is loaded, so the sent event is compressed\n await this.ensureWorkerIsLoaded();\n\n return this._used.finish();\n }\n\n /** Ensure the worker has loaded. */\n ensureWorkerIsLoaded() {\n return this._ensureWorkerIsLoadedPromise;\n }\n\n /** Actually check if the worker has been loaded. */\n async _ensureWorkerIsLoaded() {\n try {\n await this._compression.ensureReady();\n } catch (error) {\n // If the worker fails to load, we fall back to the simple buffer.\n // Nothing more to do from our side here\n DEBUG_BUILD && logger.exception(error, 'Failed to load the compression worker, falling back to simple buffer');\n return;\n }\n\n // Now we need to switch over the array buffer to the compression worker\n await this._switchToCompressionWorker();\n }\n\n /** Switch the used buffer to the compression worker. */\n async _switchToCompressionWorker() {\n const { events, hasCheckout, waitForCheckout } = this._fallback;\n\n const addEventPromises = [];\n for (const event of events) {\n addEventPromises.push(this._compression.addEvent(event));\n }\n\n this._compression.hasCheckout = hasCheckout;\n this._compression.waitForCheckout = waitForCheckout;\n\n // We switch over to the new buffer immediately - any further events will be added\n // after the previously buffered ones\n this._used = this._compression;\n\n // Wait for original events to be re-added before resolving\n try {\n await Promise.all(addEventPromises);\n\n // Can now clear fallback buffer as it's no longer necessary\n this._fallback.clear();\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to add events when switching buffers.');\n }\n }\n}\n\n/**\n * Create an event buffer for replays.\n */\nfunction createEventBuffer({\n useCompression,\n workerUrl: customWorkerUrl,\n}) {\n if (\n useCompression &&\n // eslint-disable-next-line no-restricted-globals\n window.Worker\n ) {\n const worker = _loadWorker(customWorkerUrl);\n\n if (worker) {\n return worker;\n }\n }\n\n DEBUG_BUILD && logger.info('Using simple buffer');\n return new EventBufferArray();\n}\n\nfunction _loadWorker(customWorkerUrl) {\n try {\n const workerUrl = customWorkerUrl || _getWorkerUrl();\n\n if (!workerUrl) {\n return;\n }\n\n DEBUG_BUILD && logger.info(`Using compression worker${customWorkerUrl ? ` from ${customWorkerUrl}` : ''}`);\n const worker = new Worker(workerUrl);\n return new EventBufferProxy(worker);\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to create compression worker');\n // Fall back to use simple event buffer array\n }\n}\n\nfunction _getWorkerUrl() {\n if (typeof __SENTRY_EXCLUDE_REPLAY_WORKER__ === 'undefined' || !__SENTRY_EXCLUDE_REPLAY_WORKER__) {\n return e();\n }\n\n return '';\n}\n\n/** If sessionStorage is available. */\nfunction hasSessionStorage() {\n try {\n // This can throw, e.g. when being accessed in a sandboxed iframe\n return 'sessionStorage' in WINDOW && !!WINDOW.sessionStorage;\n } catch {\n return false;\n }\n}\n\n/**\n * Removes the session from Session Storage and unsets session in replay instance\n */\nfunction clearSession(replay) {\n deleteSession();\n replay.session = undefined;\n}\n\n/**\n * Deletes a session from storage\n */\nfunction deleteSession() {\n if (!hasSessionStorage()) {\n return;\n }\n\n try {\n WINDOW.sessionStorage.removeItem(REPLAY_SESSION_KEY);\n } catch {\n // Ignore potential SecurityError exceptions\n }\n}\n\n/**\n * Given a sample rate, returns true if replay should be sampled.\n *\n * 1.0 = 100% sampling\n * 0.0 = 0% sampling\n */\nfunction isSampled(sampleRate) {\n if (sampleRate === undefined) {\n return false;\n }\n\n // Math.random() returns a number in range of 0 to 1 (inclusive of 0, but not 1)\n return Math.random() < sampleRate;\n}\n\n/**\n * Get a session with defaults & applied sampling.\n */\nfunction makeSession(session) {\n const now = Date.now();\n const id = session.id || uuid4();\n // Note that this means we cannot set a started/lastActivity of `0`, but this should not be relevant outside of tests.\n const started = session.started || now;\n const lastActivity = session.lastActivity || now;\n const segmentId = session.segmentId || 0;\n const sampled = session.sampled;\n const previousSessionId = session.previousSessionId;\n\n return {\n id,\n started,\n lastActivity,\n segmentId,\n sampled,\n previousSessionId,\n };\n}\n\n/**\n * Save a session to session storage.\n */\nfunction saveSession(session) {\n if (!hasSessionStorage()) {\n return;\n }\n\n try {\n WINDOW.sessionStorage.setItem(REPLAY_SESSION_KEY, JSON.stringify(session));\n } catch {\n // Ignore potential SecurityError exceptions\n }\n}\n\n/**\n * Get the sampled status for a session based on sample rates & current sampled status.\n */\nfunction getSessionSampleType(sessionSampleRate, allowBuffering) {\n return isSampled(sessionSampleRate) ? 'session' : allowBuffering ? 'buffer' : false;\n}\n\n/**\n * Create a new session, which in its current implementation is a Sentry event\n * that all replays will be saved to as attachments. Currently, we only expect\n * one of these Sentry events per \"replay session\".\n */\nfunction createSession(\n { sessionSampleRate, allowBuffering, stickySession = false },\n { previousSessionId } = {},\n) {\n const sampled = getSessionSampleType(sessionSampleRate, allowBuffering);\n const session = makeSession({\n sampled,\n previousSessionId,\n });\n\n if (stickySession) {\n saveSession(session);\n }\n\n return session;\n}\n\n/**\n * Fetches a session from storage\n */\nfunction fetchSession() {\n if (!hasSessionStorage()) {\n return null;\n }\n\n try {\n // This can throw if cookies are disabled\n const sessionStringFromStorage = WINDOW.sessionStorage.getItem(REPLAY_SESSION_KEY);\n\n if (!sessionStringFromStorage) {\n return null;\n }\n\n const sessionObj = JSON.parse(sessionStringFromStorage) ;\n\n DEBUG_BUILD && logger.infoTick('Loading existing session');\n\n return makeSession(sessionObj);\n } catch {\n return null;\n }\n}\n\n/**\n * Given an initial timestamp and an expiry duration, checks to see if current\n * time should be considered as expired.\n */\nfunction isExpired(\n initialTime,\n expiry,\n targetTime = +new Date(),\n) {\n // Always expired if < 0\n if (initialTime === null || expiry === undefined || expiry < 0) {\n return true;\n }\n\n // Never expires if == 0\n if (expiry === 0) {\n return false;\n }\n\n return initialTime + expiry <= targetTime;\n}\n\n/**\n * Checks to see if session is expired\n */\nfunction isSessionExpired(\n session,\n {\n maxReplayDuration,\n sessionIdleExpire,\n targetTime = Date.now(),\n },\n) {\n return (\n // First, check that maximum session length has not been exceeded\n isExpired(session.started, maxReplayDuration, targetTime) ||\n // check that the idle timeout has not been exceeded (i.e. user has\n // performed an action within the last `sessionIdleExpire` ms)\n isExpired(session.lastActivity, sessionIdleExpire, targetTime)\n );\n}\n\n/** If the session should be refreshed or not. */\nfunction shouldRefreshSession(\n session,\n { sessionIdleExpire, maxReplayDuration },\n) {\n // If not expired, all good, just keep the session\n if (!isSessionExpired(session, { sessionIdleExpire, maxReplayDuration })) {\n return false;\n }\n\n // If we are buffering & haven't ever flushed yet, always continue\n if (session.sampled === 'buffer' && session.segmentId === 0) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Get or create a session, when initializing the replay.\n * Returns a session that may be unsampled.\n */\nfunction loadOrCreateSession(\n {\n sessionIdleExpire,\n maxReplayDuration,\n previousSessionId,\n }\n\n,\n sessionOptions,\n) {\n const existingSession = sessionOptions.stickySession && fetchSession();\n\n // No session exists yet, just create a new one\n if (!existingSession) {\n DEBUG_BUILD && logger.infoTick('Creating new session');\n return createSession(sessionOptions, { previousSessionId });\n }\n\n if (!shouldRefreshSession(existingSession, { sessionIdleExpire, maxReplayDuration })) {\n return existingSession;\n }\n\n DEBUG_BUILD && logger.infoTick('Session in sessionStorage is expired, creating new one...');\n return createSession(sessionOptions, { previousSessionId: existingSession.id });\n}\n\nfunction isCustomEvent(event) {\n return event.type === EventType.Custom;\n}\n\n/**\n * Add an event to the event buffer.\n * In contrast to `addEvent`, this does not return a promise & does not wait for the adding of the event to succeed/fail.\n * Instead this returns `true` if we tried to add the event, else false.\n * It returns `false` e.g. if we are paused, disabled, or out of the max replay duration.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nfunction addEventSync(replay, event, isCheckout) {\n if (!shouldAddEvent(replay, event)) {\n return false;\n }\n\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n _addEvent(replay, event, isCheckout);\n\n return true;\n}\n\n/**\n * Add an event to the event buffer.\n * Resolves to `null` if no event was added, else to `void`.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nfunction addEvent(\n replay,\n event,\n isCheckout,\n) {\n if (!shouldAddEvent(replay, event)) {\n return Promise.resolve(null);\n }\n\n return _addEvent(replay, event, isCheckout);\n}\n\nasync function _addEvent(\n replay,\n event,\n isCheckout,\n) {\n const { eventBuffer } = replay;\n\n if (!eventBuffer || (eventBuffer.waitForCheckout && !isCheckout)) {\n return null;\n }\n\n const isBufferMode = replay.recordingMode === 'buffer';\n\n try {\n if (isCheckout && isBufferMode) {\n eventBuffer.clear();\n }\n\n if (isCheckout) {\n eventBuffer.hasCheckout = true;\n eventBuffer.waitForCheckout = false;\n }\n\n const replayOptions = replay.getOptions();\n\n const eventAfterPossibleCallback = maybeApplyCallback(event, replayOptions.beforeAddRecordingEvent);\n\n if (!eventAfterPossibleCallback) {\n return;\n }\n\n return await eventBuffer.addEvent(eventAfterPossibleCallback);\n } catch (error) {\n const isExceeded = error && error instanceof EventBufferSizeExceededError;\n const reason = isExceeded ? 'addEventSizeExceeded' : 'addEvent';\n\n if (isExceeded && isBufferMode) {\n // Clear buffer and wait for next checkout\n eventBuffer.clear();\n eventBuffer.waitForCheckout = true;\n\n return null;\n }\n\n replay.handleException(error);\n\n await replay.stop({ reason });\n\n const client = getClient();\n\n if (client) {\n client.recordDroppedEvent('internal_sdk_error', 'replay');\n }\n }\n}\n\n/** Exported only for tests. */\nfunction shouldAddEvent(replay, event) {\n if (!replay.eventBuffer || replay.isPaused() || !replay.isEnabled()) {\n return false;\n }\n\n const timestampInMs = timestampToMs(event.timestamp);\n\n // Throw out events that happen more than 5 minutes ago. This can happen if\n // page has been left open and idle for a long period of time and user\n // comes back to trigger a new session. The performance entries rely on\n // `performance.timeOrigin`, which is when the page first opened.\n if (timestampInMs + replay.timeouts.sessionIdlePause < Date.now()) {\n return false;\n }\n\n // Throw out events that are +60min from the initial timestamp\n if (timestampInMs > replay.getContext().initialTimestamp + replay.getOptions().maxReplayDuration) {\n DEBUG_BUILD &&\n logger.infoTick(`Skipping event with timestamp ${timestampInMs} because it is after maxReplayDuration`);\n return false;\n }\n\n return true;\n}\n\nfunction maybeApplyCallback(\n event,\n callback,\n) {\n try {\n if (typeof callback === 'function' && isCustomEvent(event)) {\n return callback(event);\n }\n } catch (error) {\n DEBUG_BUILD &&\n logger.exception(error, 'An error occurred in the `beforeAddRecordingEvent` callback, skipping the event...');\n return null;\n }\n\n return event;\n}\n\n/** If the event is an error event */\nfunction isErrorEvent(event) {\n return !event.type;\n}\n\n/** If the event is a transaction event */\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n\n/** If the event is an replay event */\nfunction isReplayEvent(event) {\n return event.type === 'replay_event';\n}\n\n/** If the event is a feedback event */\nfunction isFeedbackEvent(event) {\n return event.type === 'feedback';\n}\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nfunction handleAfterSendEvent(replay) {\n return (event, sendResponse) => {\n if (!replay.isEnabled() || (!isErrorEvent(event) && !isTransactionEvent(event))) {\n return;\n }\n\n const statusCode = sendResponse?.statusCode;\n\n // We only want to do stuff on successful error sending, otherwise you get error replays without errors attached\n // If not using the base transport, we allow `undefined` response (as a custom transport may not implement this correctly yet)\n // If we do use the base transport, we skip if we encountered an non-OK status code\n if (!statusCode || statusCode < 200 || statusCode >= 300) {\n return;\n }\n\n if (isTransactionEvent(event)) {\n handleTransactionEvent(replay, event);\n return;\n }\n\n handleErrorEvent(replay, event);\n };\n}\n\nfunction handleTransactionEvent(replay, event) {\n const replayContext = replay.getContext();\n\n // Collect traceIds in _context regardless of `recordingMode`\n // In error mode, _context gets cleared on every checkout\n // We limit to max. 100 transactions linked\n if (event.contexts?.trace?.trace_id && replayContext.traceIds.size < 100) {\n replayContext.traceIds.add(event.contexts.trace.trace_id);\n }\n}\n\nfunction handleErrorEvent(replay, event) {\n const replayContext = replay.getContext();\n\n // Add error to list of errorIds of replay. This is ok to do even if not\n // sampled because context will get reset at next checkout.\n // XXX: There is also a race condition where it's possible to capture an\n // error to Sentry before Replay SDK has loaded, but response returns after\n // it was loaded, and this gets called.\n // We limit to max. 100 errors linked\n if (event.event_id && replayContext.errorIds.size < 100) {\n replayContext.errorIds.add(event.event_id);\n }\n\n // If error event is tagged with replay id it means it was sampled (when in buffer mode)\n // Need to be very careful that this does not cause an infinite loop\n if (replay.recordingMode !== 'buffer' || !event.tags || !event.tags.replayId) {\n return;\n }\n\n const { beforeErrorSampling } = replay.getOptions();\n if (typeof beforeErrorSampling === 'function' && !beforeErrorSampling(event)) {\n return;\n }\n\n setTimeout$3(async () => {\n try {\n // Capture current event buffer as new replay\n await replay.sendBufferedReplayOrFlush();\n } catch (err) {\n replay.handleException(err);\n }\n });\n}\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nfunction handleBeforeSendEvent(replay) {\n return (event) => {\n if (!replay.isEnabled() || !isErrorEvent(event)) {\n return;\n }\n\n handleHydrationError(replay, event);\n };\n}\n\nfunction handleHydrationError(replay, event) {\n const exceptionValue = event.exception?.values?.[0]?.value;\n if (typeof exceptionValue !== 'string') {\n return;\n }\n\n if (\n // Only matches errors in production builds of react-dom\n // Example https://reactjs.org/docs/error-decoder.html?invariant=423\n // With newer React versions, the messages changed to a different website https://react.dev/errors/418\n exceptionValue.match(\n /(reactjs\\.org\\/docs\\/error-decoder\\.html\\?invariant=|react\\.dev\\/errors\\/)(418|419|422|423|425)/,\n ) ||\n // Development builds of react-dom\n // Error 1: Hydration failed because the initial UI does not match what was rendered on the server.\n // Error 2: Text content does not match server-rendered HTML. Warning: Text content did not match.\n exceptionValue.match(/(does not match server-rendered HTML|Hydration failed because)/i)\n ) {\n const breadcrumb = createBreadcrumb({\n category: 'replay.hydrate-error',\n data: {\n url: getLocationHref(),\n },\n });\n addBreadcrumbEvent(replay, breadcrumb);\n }\n}\n\n/**\n * Handle breadcrumbs that Sentry captures, and make sure to capture relevant breadcrumbs to Replay as well.\n */\nfunction handleBreadcrumbs(replay) {\n const client = getClient();\n\n if (!client) {\n return;\n }\n\n client.on('beforeAddBreadcrumb', breadcrumb => beforeAddBreadcrumb(replay, breadcrumb));\n}\n\nfunction beforeAddBreadcrumb(replay, breadcrumb) {\n if (!replay.isEnabled() || !isBreadcrumbWithCategory(breadcrumb)) {\n return;\n }\n\n const result = normalizeBreadcrumb(breadcrumb);\n if (result) {\n addBreadcrumbEvent(replay, result);\n }\n}\n\n/** Exported only for tests. */\nfunction normalizeBreadcrumb(breadcrumb) {\n if (\n !isBreadcrumbWithCategory(breadcrumb) ||\n [\n // fetch & xhr are handled separately,in handleNetworkBreadcrumbs\n 'fetch',\n 'xhr',\n // These two are breadcrumbs for emitted sentry events, we don't care about them\n 'sentry.event',\n 'sentry.transaction',\n ].includes(breadcrumb.category) ||\n // We capture UI breadcrumbs separately\n breadcrumb.category.startsWith('ui.')\n ) {\n return null;\n }\n\n if (breadcrumb.category === 'console') {\n return normalizeConsoleBreadcrumb(breadcrumb);\n }\n\n return createBreadcrumb(breadcrumb);\n}\n\n/** exported for tests only */\nfunction normalizeConsoleBreadcrumb(\n breadcrumb,\n) {\n const args = breadcrumb.data?.arguments;\n\n if (!Array.isArray(args) || args.length === 0) {\n return createBreadcrumb(breadcrumb);\n }\n\n let isTruncated = false;\n\n // Avoid giant args captures\n const normalizedArgs = args.map(arg => {\n if (!arg) {\n return arg;\n }\n if (typeof arg === 'string') {\n if (arg.length > CONSOLE_ARG_MAX_SIZE) {\n isTruncated = true;\n return `${arg.slice(0, CONSOLE_ARG_MAX_SIZE)}…`;\n }\n\n return arg;\n }\n if (typeof arg === 'object') {\n try {\n const normalizedArg = normalize(arg, 7);\n const stringified = JSON.stringify(normalizedArg);\n if (stringified.length > CONSOLE_ARG_MAX_SIZE) {\n isTruncated = true;\n // We use the pretty printed JSON string here as a base\n return `${JSON.stringify(normalizedArg, null, 2).slice(0, CONSOLE_ARG_MAX_SIZE)}…`;\n }\n return normalizedArg;\n } catch {\n // fall back to default\n }\n }\n\n return arg;\n });\n\n return createBreadcrumb({\n ...breadcrumb,\n data: {\n ...breadcrumb.data,\n arguments: normalizedArgs,\n ...(isTruncated ? { _meta: { warnings: ['CONSOLE_ARG_TRUNCATED'] } } : {}),\n },\n });\n}\n\nfunction isBreadcrumbWithCategory(breadcrumb) {\n return !!breadcrumb.category;\n}\n\n/**\n * Returns true if we think the given event is an error originating inside of rrweb.\n */\nfunction isRrwebError(event, hint) {\n if (event.type || !event.exception || !event.exception.values || !event.exception.values.length) {\n return false;\n }\n\n // @ts-expect-error this may be set by rrweb when it finds errors\n if (hint.originalException?.__rrweb__) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Reset the `replay_id` field on the DSC.\n */\nfunction resetReplayIdOnDynamicSamplingContext() {\n // Reset DSC on the current scope, if there is one\n const dsc = getCurrentScope().getPropagationContext().dsc;\n if (dsc) {\n delete dsc.replay_id;\n }\n\n // Clear it from frozen DSC on the active span\n const activeSpan = getActiveSpan();\n if (activeSpan) {\n const dsc = getDynamicSamplingContextFromSpan(activeSpan);\n delete (dsc ).replay_id;\n }\n}\n\n/**\n * Add a feedback breadcrumb event to replay.\n */\nfunction addFeedbackBreadcrumb(replay, event) {\n replay.triggerUserActivity();\n replay.addUpdate(() => {\n if (!event.timestamp) {\n // Ignore events that don't have timestamps (this shouldn't happen, more of a typing issue)\n // Return true here so that we don't flush\n return true;\n }\n\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n replay.throttledAddEvent({\n type: EventType.Custom,\n timestamp: event.timestamp * 1000,\n data: {\n tag: 'breadcrumb',\n payload: {\n timestamp: event.timestamp,\n type: 'default',\n category: 'sentry.feedback',\n data: {\n feedbackId: event.event_id,\n },\n },\n },\n } );\n\n return false;\n });\n}\n\n/**\n * Determine if event should be sampled (only applies in buffer mode).\n * When an event is captured by `handleGlobalEvent`, when in buffer mode\n * we determine if we want to sample the error or not.\n */\nfunction shouldSampleForBufferEvent(replay, event) {\n if (replay.recordingMode !== 'buffer') {\n return false;\n }\n\n // ignore this error because otherwise we could loop indefinitely with\n // trying to capture replay and failing\n if (event.message === UNABLE_TO_SEND_REPLAY) {\n return false;\n }\n\n // Require the event to be an error event & to have an exception\n if (!event.exception || event.type) {\n return false;\n }\n\n return isSampled(replay.getOptions().errorSampleRate);\n}\n\n/**\n * Returns a listener to be added to `addEventProcessor(listener)`.\n */\nfunction handleGlobalEventListener(replay) {\n return Object.assign(\n (event, hint) => {\n // Do nothing if replay has been disabled or paused\n if (!replay.isEnabled() || replay.isPaused()) {\n return event;\n }\n\n if (isReplayEvent(event)) {\n // Replays have separate set of breadcrumbs, do not include breadcrumbs\n // from core SDK\n delete event.breadcrumbs;\n return event;\n }\n\n // We only want to handle errors, transactions, and feedbacks, nothing else\n if (!isErrorEvent(event) && !isTransactionEvent(event) && !isFeedbackEvent(event)) {\n return event;\n }\n\n // Ensure we do not add replay_id if the session is expired\n const isSessionActive = replay.checkAndHandleExpiredSession();\n if (!isSessionActive) {\n // prevent exceeding replay durations by removing the expired replayId from the DSC\n resetReplayIdOnDynamicSamplingContext();\n return event;\n }\n\n if (isFeedbackEvent(event)) {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n replay.flush();\n event.contexts.feedback.replay_id = replay.getSessionId();\n // Add a replay breadcrumb for this piece of feedback\n addFeedbackBreadcrumb(replay, event);\n return event;\n }\n\n // Unless `captureExceptions` is enabled, we want to ignore errors coming from rrweb\n // As there can be a bunch of stuff going wrong in internals there, that we don't want to bubble up to users\n if (isRrwebError(event, hint) && !replay.getOptions()._experiments.captureExceptions) {\n DEBUG_BUILD && logger.log('Ignoring error from rrweb internals', event);\n return null;\n }\n\n // When in buffer mode, we decide to sample here.\n // Later, in `handleAfterSendEvent`, if the replayId is set, we know that we sampled\n // And convert the buffer session to a full session\n const isErrorEventSampled = shouldSampleForBufferEvent(replay, event);\n\n // Tag errors if it has been sampled in buffer mode, or if it is session mode\n // Only tag transactions if in session mode\n const shouldTagReplayId = isErrorEventSampled || replay.recordingMode === 'session';\n\n if (shouldTagReplayId) {\n event.tags = { ...event.tags, replayId: replay.getSessionId() };\n }\n\n return event;\n },\n { id: 'Replay' },\n );\n}\n\n/**\n * Create a \"span\" for each performance entry.\n */\nfunction createPerformanceSpans(\n replay,\n entries,\n) {\n return entries.map(({ type, start, end, name, data }) => {\n const response = replay.throttledAddEvent({\n type: EventType.Custom,\n timestamp: start,\n data: {\n tag: 'performanceSpan',\n payload: {\n op: type,\n description: name,\n startTimestamp: start,\n endTimestamp: end,\n data,\n },\n },\n });\n\n // If response is a string, it means its either THROTTLED or SKIPPED\n return typeof response === 'string' ? Promise.resolve(null) : response;\n });\n}\n\nfunction handleHistory(handlerData) {\n const { from, to } = handlerData;\n\n const now = Date.now() / 1000;\n\n return {\n type: 'navigation.push',\n start: now,\n end: now,\n name: to,\n data: {\n previous: from,\n },\n };\n}\n\n/**\n * Returns a listener to be added to `addHistoryInstrumentationHandler(listener)`.\n */\nfunction handleHistorySpanListener(replay) {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleHistory(handlerData);\n\n if (result === null) {\n return;\n }\n\n // Need to collect visited URLs\n replay.getContext().urls.push(result.name);\n replay.triggerUserActivity();\n\n replay.addUpdate(() => {\n createPerformanceSpans(replay, [result]);\n // Returning false to flush\n return false;\n });\n };\n}\n\n/**\n * Check whether a given request URL should be filtered out. This is so we\n * don't log Sentry ingest requests.\n */\nfunction shouldFilterRequest(replay, url) {\n // If we enabled the `traceInternals` experiment, we want to trace everything\n if (DEBUG_BUILD && replay.getOptions()._experiments.traceInternals) {\n return false;\n }\n\n return isSentryRequestUrl(url, getClient());\n}\n\n/** Add a performance entry breadcrumb */\nfunction addNetworkBreadcrumb(\n replay,\n result,\n) {\n if (!replay.isEnabled()) {\n return;\n }\n\n if (result === null) {\n return;\n }\n\n if (shouldFilterRequest(replay, result.name)) {\n return;\n }\n\n replay.addUpdate(() => {\n createPerformanceSpans(replay, [result]);\n // Returning true will cause `addUpdate` to not flush\n // We do not want network requests to cause a flush. This will prevent\n // recurring/polling requests from keeping the replay session alive.\n return true;\n });\n}\n\n/** Get the size of a body. */\nfunction getBodySize(body) {\n if (!body) {\n return undefined;\n }\n\n const textEncoder = new TextEncoder();\n\n try {\n if (typeof body === 'string') {\n return textEncoder.encode(body).length;\n }\n\n if (body instanceof URLSearchParams) {\n return textEncoder.encode(body.toString()).length;\n }\n\n if (body instanceof FormData) {\n const formDataStr = serializeFormData(body);\n return textEncoder.encode(formDataStr).length;\n }\n\n if (body instanceof Blob) {\n return body.size;\n }\n\n if (body instanceof ArrayBuffer) {\n return body.byteLength;\n }\n\n // Currently unhandled types: ArrayBufferView, ReadableStream\n } catch {\n // just return undefined\n }\n\n return undefined;\n}\n\n/** Convert a Content-Length header to number/undefined. */\nfunction parseContentLengthHeader(header) {\n if (!header) {\n return undefined;\n }\n\n const size = parseInt(header, 10);\n return isNaN(size) ? undefined : size;\n}\n\n/** Merge a warning into an existing network request/response. */\nfunction mergeWarning(\n info,\n warning,\n) {\n if (!info) {\n return {\n headers: {},\n size: undefined,\n _meta: {\n warnings: [warning],\n },\n };\n }\n\n const newMeta = { ...info._meta };\n const existingWarnings = newMeta.warnings || [];\n newMeta.warnings = [...existingWarnings, warning];\n\n info._meta = newMeta;\n return info;\n}\n\n/** Convert ReplayNetworkRequestData to a PerformanceEntry. */\nfunction makeNetworkReplayBreadcrumb(\n type,\n data,\n) {\n if (!data) {\n return null;\n }\n\n const { startTimestamp, endTimestamp, url, method, statusCode, request, response } = data;\n\n const result = {\n type,\n start: startTimestamp / 1000,\n end: endTimestamp / 1000,\n name: url,\n data: dropUndefinedKeys({\n method,\n statusCode,\n request,\n response,\n }),\n };\n\n return result;\n}\n\n/** Build the request or response part of a replay network breadcrumb that was skipped. */\nfunction buildSkippedNetworkRequestOrResponse(bodySize) {\n return {\n headers: {},\n size: bodySize,\n _meta: {\n warnings: ['URL_SKIPPED'],\n },\n };\n}\n\n/** Build the request or response part of a replay network breadcrumb. */\nfunction buildNetworkRequestOrResponse(\n headers,\n bodySize,\n body,\n) {\n if (!bodySize && Object.keys(headers).length === 0) {\n return undefined;\n }\n\n if (!bodySize) {\n return {\n headers,\n };\n }\n\n if (!body) {\n return {\n headers,\n size: bodySize,\n };\n }\n\n const info = {\n headers,\n size: bodySize,\n };\n\n const { body: normalizedBody, warnings } = normalizeNetworkBody(body);\n info.body = normalizedBody;\n if (warnings?.length) {\n info._meta = {\n warnings,\n };\n }\n\n return info;\n}\n\n/** Filter a set of headers */\nfunction getAllowedHeaders(headers, allowedHeaders) {\n return Object.entries(headers).reduce((filteredHeaders, [key, value]) => {\n const normalizedKey = key.toLowerCase();\n // Avoid putting empty strings into the headers\n if (allowedHeaders.includes(normalizedKey) && headers[key]) {\n filteredHeaders[normalizedKey] = value;\n }\n return filteredHeaders;\n }, {});\n}\n\nfunction normalizeNetworkBody(body)\n\n {\n if (!body || typeof body !== 'string') {\n return {\n body,\n };\n }\n\n const exceedsSizeLimit = body.length > NETWORK_BODY_MAX_SIZE;\n const isProbablyJson = _strIsProbablyJson(body);\n\n if (exceedsSizeLimit) {\n const truncatedBody = body.slice(0, NETWORK_BODY_MAX_SIZE);\n\n if (isProbablyJson) {\n return {\n body: truncatedBody,\n warnings: ['MAYBE_JSON_TRUNCATED'],\n };\n }\n\n return {\n body: `${truncatedBody}…`,\n warnings: ['TEXT_TRUNCATED'],\n };\n }\n\n if (isProbablyJson) {\n try {\n const jsonBody = JSON.parse(body);\n return {\n body: jsonBody,\n };\n } catch {\n // fall back to just send the body as string\n }\n }\n\n return {\n body,\n };\n}\n\nfunction _strIsProbablyJson(str) {\n const first = str[0];\n const last = str[str.length - 1];\n\n // Simple check: If this does not start & end with {} or [], it's not JSON\n return (first === '[' && last === ']') || (first === '{' && last === '}');\n}\n\n/** Match an URL against a list of strings/Regex. */\nfunction urlMatches(url, urls) {\n const fullUrl = getFullUrl(url);\n\n return stringMatchesSomePattern(fullUrl, urls);\n}\n\n/** exported for tests */\nfunction getFullUrl(url, baseURI = WINDOW.document.baseURI) {\n // Short circuit for common cases:\n if (url.startsWith('http://') || url.startsWith('https://') || url.startsWith(WINDOW.location.origin)) {\n return url;\n }\n const fixedUrl = new URL(url, baseURI);\n\n // If these do not match, we are not dealing with a relative URL, so just return it\n if (fixedUrl.origin !== new URL(baseURI).origin) {\n return url;\n }\n\n const fullUrl = fixedUrl.href;\n\n // Remove trailing slashes, if they don't match the original URL\n if (!url.endsWith('/') && fullUrl.endsWith('/')) {\n return fullUrl.slice(0, -1);\n }\n\n return fullUrl;\n}\n\n/**\n * Capture a fetch breadcrumb to a replay.\n * This adds additional data (where appropriate).\n */\nasync function captureFetchBreadcrumbToReplay(\n breadcrumb,\n hint,\n options\n\n,\n) {\n try {\n const data = await _prepareFetchData(breadcrumb, hint, options);\n\n // Create a replay performance entry from this breadcrumb\n const result = makeNetworkReplayBreadcrumb('resource.fetch', data);\n addNetworkBreadcrumb(options.replay, result);\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to capture fetch breadcrumb');\n }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nfunction enrichFetchBreadcrumb(\n breadcrumb,\n hint,\n) {\n const { input, response } = hint;\n\n const body = input ? getFetchRequestArgBody(input) : undefined;\n const reqSize = getBodySize(body);\n\n const resSize = response ? parseContentLengthHeader(response.headers.get('content-length')) : undefined;\n\n if (reqSize !== undefined) {\n breadcrumb.data.request_body_size = reqSize;\n }\n if (resSize !== undefined) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\n\nasync function _prepareFetchData(\n breadcrumb,\n hint,\n options,\n) {\n const now = Date.now();\n const { startTimestamp = now, endTimestamp = now } = hint;\n\n const {\n url,\n method,\n status_code: statusCode = 0,\n request_body_size: requestBodySize,\n response_body_size: responseBodySize,\n } = breadcrumb.data;\n\n const captureDetails =\n urlMatches(url, options.networkDetailAllowUrls) && !urlMatches(url, options.networkDetailDenyUrls);\n\n const request = captureDetails\n ? _getRequestInfo(options, hint.input, requestBodySize)\n : buildSkippedNetworkRequestOrResponse(requestBodySize);\n const response = await _getResponseInfo(captureDetails, options, hint.response, responseBodySize);\n\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request,\n response,\n };\n}\n\nfunction _getRequestInfo(\n { networkCaptureBodies, networkRequestHeaders },\n input,\n requestBodySize,\n) {\n const headers = input ? getRequestHeaders(input, networkRequestHeaders) : {};\n\n if (!networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, requestBodySize, undefined);\n }\n\n // We only want to transmit string or string-like bodies\n const requestBody = getFetchRequestArgBody(input);\n const [bodyStr, warning] = getBodyString(requestBody, logger);\n const data = buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr);\n\n if (warning) {\n return mergeWarning(data, warning);\n }\n\n return data;\n}\n\n/** Exported only for tests. */\nasync function _getResponseInfo(\n captureDetails,\n {\n networkCaptureBodies,\n networkResponseHeaders,\n },\n response,\n responseBodySize,\n) {\n if (!captureDetails && responseBodySize !== undefined) {\n return buildSkippedNetworkRequestOrResponse(responseBodySize);\n }\n\n const headers = response ? getAllHeaders(response.headers, networkResponseHeaders) : {};\n\n if (!response || (!networkCaptureBodies && responseBodySize !== undefined)) {\n return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n }\n\n const [bodyText, warning] = await _parseFetchResponseBody(response);\n const result = getResponseData(bodyText, {\n networkCaptureBodies,\n\n responseBodySize,\n captureDetails,\n headers,\n });\n\n if (warning) {\n return mergeWarning(result, warning);\n }\n\n return result;\n}\n\nfunction getResponseData(\n bodyText,\n {\n networkCaptureBodies,\n responseBodySize,\n captureDetails,\n headers,\n }\n\n,\n) {\n try {\n const size = bodyText?.length && responseBodySize === undefined ? getBodySize(bodyText) : responseBodySize;\n\n if (!captureDetails) {\n return buildSkippedNetworkRequestOrResponse(size);\n }\n\n if (networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, size, bodyText);\n }\n\n return buildNetworkRequestOrResponse(headers, size, undefined);\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to serialize response body');\n // fallback\n return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n }\n}\n\nasync function _parseFetchResponseBody(response) {\n const res = _tryCloneResponse(response);\n\n if (!res) {\n return [undefined, 'BODY_PARSE_ERROR'];\n }\n\n try {\n const text = await _tryGetResponseText(res);\n return [text];\n } catch (error) {\n if (error instanceof Error && error.message.indexOf('Timeout') > -1) {\n DEBUG_BUILD && logger.warn('Parsing text body from response timed out');\n return [undefined, 'BODY_PARSE_TIMEOUT'];\n }\n\n DEBUG_BUILD && logger.exception(error, 'Failed to get text body from response');\n return [undefined, 'BODY_PARSE_ERROR'];\n }\n}\n\nfunction getAllHeaders(headers, allowedHeaders) {\n const allHeaders = {};\n\n allowedHeaders.forEach(header => {\n if (headers.get(header)) {\n allHeaders[header] = headers.get(header) ;\n }\n });\n\n return allHeaders;\n}\n\nfunction getRequestHeaders(fetchArgs, allowedHeaders) {\n if (fetchArgs.length === 1 && typeof fetchArgs[0] !== 'string') {\n return getHeadersFromOptions(fetchArgs[0] , allowedHeaders);\n }\n\n if (fetchArgs.length === 2) {\n return getHeadersFromOptions(fetchArgs[1] , allowedHeaders);\n }\n\n return {};\n}\n\nfunction getHeadersFromOptions(\n input,\n allowedHeaders,\n) {\n if (!input) {\n return {};\n }\n\n const headers = input.headers;\n\n if (!headers) {\n return {};\n }\n\n if (headers instanceof Headers) {\n return getAllHeaders(headers, allowedHeaders);\n }\n\n // We do not support this, as it is not really documented (anymore?)\n if (Array.isArray(headers)) {\n return {};\n }\n\n return getAllowedHeaders(headers, allowedHeaders);\n}\n\nfunction _tryCloneResponse(response) {\n try {\n // We have to clone this, as the body can only be read once\n return response.clone();\n } catch (error) {\n // this can throw if the response was already consumed before\n DEBUG_BUILD && logger.exception(error, 'Failed to clone response body');\n }\n}\n\n/**\n * Get the response body of a fetch request, or timeout after 500ms.\n * Fetch can return a streaming body, that may not resolve (or not for a long time).\n * If that happens, we rather abort after a short time than keep waiting for this.\n */\nfunction _tryGetResponseText(response) {\n return new Promise((resolve, reject) => {\n const timeout = setTimeout$3(() => reject(new Error('Timeout while trying to read response body')), 500);\n\n _getResponseText(response)\n .then(\n txt => resolve(txt),\n reason => reject(reason),\n )\n .finally(() => clearTimeout(timeout));\n });\n}\n\nasync function _getResponseText(response) {\n // Force this to be a promise, just to be safe\n // eslint-disable-next-line no-return-await\n return await response.text();\n}\n\n/**\n * Capture an XHR breadcrumb to a replay.\n * This adds additional data (where appropriate).\n */\nasync function captureXhrBreadcrumbToReplay(\n breadcrumb,\n hint,\n options,\n) {\n try {\n const data = _prepareXhrData(breadcrumb, hint, options);\n\n // Create a replay performance entry from this breadcrumb\n const result = makeNetworkReplayBreadcrumb('resource.xhr', data);\n addNetworkBreadcrumb(options.replay, result);\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to capture xhr breadcrumb');\n }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nfunction enrichXhrBreadcrumb(\n breadcrumb,\n hint,\n) {\n const { xhr, input } = hint;\n\n if (!xhr) {\n return;\n }\n\n const reqSize = getBodySize(input);\n const resSize = xhr.getResponseHeader('content-length')\n ? parseContentLengthHeader(xhr.getResponseHeader('content-length'))\n : _getBodySize(xhr.response, xhr.responseType);\n\n if (reqSize !== undefined) {\n breadcrumb.data.request_body_size = reqSize;\n }\n if (resSize !== undefined) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\n\nfunction _prepareXhrData(\n breadcrumb,\n hint,\n options,\n) {\n const now = Date.now();\n const { startTimestamp = now, endTimestamp = now, input, xhr } = hint;\n\n const {\n url,\n method,\n status_code: statusCode = 0,\n request_body_size: requestBodySize,\n response_body_size: responseBodySize,\n } = breadcrumb.data;\n\n if (!url) {\n return null;\n }\n\n if (!xhr || !urlMatches(url, options.networkDetailAllowUrls) || urlMatches(url, options.networkDetailDenyUrls)) {\n const request = buildSkippedNetworkRequestOrResponse(requestBodySize);\n const response = buildSkippedNetworkRequestOrResponse(responseBodySize);\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request,\n response,\n };\n }\n\n const xhrInfo = xhr[SENTRY_XHR_DATA_KEY];\n const networkRequestHeaders = xhrInfo\n ? getAllowedHeaders(xhrInfo.request_headers, options.networkRequestHeaders)\n : {};\n const networkResponseHeaders = getAllowedHeaders(getResponseHeaders(xhr), options.networkResponseHeaders);\n\n const [requestBody, requestWarning] = options.networkCaptureBodies ? getBodyString(input, logger) : [undefined];\n const [responseBody, responseWarning] = options.networkCaptureBodies ? _getXhrResponseBody(xhr) : [undefined];\n\n const request = buildNetworkRequestOrResponse(networkRequestHeaders, requestBodySize, requestBody);\n const response = buildNetworkRequestOrResponse(networkResponseHeaders, responseBodySize, responseBody);\n\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request: requestWarning ? mergeWarning(request, requestWarning) : request,\n response: responseWarning ? mergeWarning(response, responseWarning) : response,\n };\n}\n\nfunction getResponseHeaders(xhr) {\n const headers = xhr.getAllResponseHeaders();\n\n if (!headers) {\n return {};\n }\n\n return headers.split('\\r\\n').reduce((acc, line) => {\n const [key, value] = line.split(': ') ;\n if (value) {\n acc[key.toLowerCase()] = value;\n }\n return acc;\n }, {});\n}\n\nfunction _getXhrResponseBody(xhr) {\n // We collect errors that happen, but only log them if we can't get any response body\n const errors = [];\n\n try {\n return [xhr.responseText];\n } catch (e) {\n errors.push(e);\n }\n\n // Try to manually parse the response body, if responseText fails\n try {\n return _parseXhrResponse(xhr.response, xhr.responseType);\n } catch (e) {\n errors.push(e);\n }\n\n DEBUG_BUILD && logger.warn('Failed to get xhr response body', ...errors);\n\n return [undefined];\n}\n\n/**\n * Get the string representation of the XHR response.\n * Based on MDN, these are the possible types of the response:\n * string\n * ArrayBuffer\n * Blob\n * Document\n * POJO\n *\n * Exported only for tests.\n */\nfunction _parseXhrResponse(\n body,\n responseType,\n) {\n try {\n if (typeof body === 'string') {\n return [body];\n }\n\n if (body instanceof Document) {\n return [body.body.outerHTML];\n }\n\n if (responseType === 'json' && body && typeof body === 'object') {\n return [JSON.stringify(body)];\n }\n\n if (!body) {\n return [undefined];\n }\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to serialize body', body);\n return [undefined, 'BODY_PARSE_ERROR'];\n }\n\n DEBUG_BUILD && logger.info('Skipping network body because of body type', body);\n\n return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n\nfunction _getBodySize(\n body,\n responseType,\n) {\n try {\n const bodyStr = responseType === 'json' && body && typeof body === 'object' ? JSON.stringify(body) : body;\n return getBodySize(bodyStr);\n } catch {\n return undefined;\n }\n}\n\n/**\n * This method does two things:\n * - It enriches the regular XHR/fetch breadcrumbs with request/response size data\n * - It captures the XHR/fetch breadcrumbs to the replay\n * (enriching it with further data that is _not_ added to the regular breadcrumbs)\n */\nfunction handleNetworkBreadcrumbs(replay) {\n const client = getClient();\n\n try {\n const {\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders,\n networkResponseHeaders,\n } = replay.getOptions();\n\n const options = {\n replay,\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders,\n networkResponseHeaders,\n };\n\n if (client) {\n client.on('beforeAddBreadcrumb', (breadcrumb, hint) => beforeAddNetworkBreadcrumb(options, breadcrumb, hint));\n }\n } catch {\n // Do nothing\n }\n}\n\n/** just exported for tests */\nfunction beforeAddNetworkBreadcrumb(\n options,\n breadcrumb,\n hint,\n) {\n if (!breadcrumb.data) {\n return;\n }\n\n try {\n if (_isXhrBreadcrumb(breadcrumb) && _isXhrHint(hint)) {\n // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n // So any async mutations to it will not be reflected in the final breadcrumb\n enrichXhrBreadcrumb(breadcrumb, hint);\n\n // This call should not reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n captureXhrBreadcrumbToReplay(breadcrumb, hint, options);\n }\n\n if (_isFetchBreadcrumb(breadcrumb) && _isFetchHint(hint)) {\n // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n // So any async mutations to it will not be reflected in the final breadcrumb\n enrichFetchBreadcrumb(breadcrumb, hint);\n\n // This call should not reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n captureFetchBreadcrumbToReplay(breadcrumb, hint, options);\n }\n } catch (e) {\n DEBUG_BUILD && logger.exception(e, 'Error when enriching network breadcrumb');\n }\n}\n\nfunction _isXhrBreadcrumb(breadcrumb) {\n return breadcrumb.category === 'xhr';\n}\n\nfunction _isFetchBreadcrumb(breadcrumb) {\n return breadcrumb.category === 'fetch';\n}\n\nfunction _isXhrHint(hint) {\n return hint?.xhr;\n}\n\nfunction _isFetchHint(hint) {\n return hint?.response;\n}\n\n/**\n * Add global listeners that cannot be removed.\n */\nfunction addGlobalListeners(\n replay,\n { autoFlushOnFeedback },\n) {\n // Listeners from core SDK //\n const client = getClient();\n\n addClickKeypressInstrumentationHandler(handleDomListener(replay));\n addHistoryInstrumentationHandler(handleHistorySpanListener(replay));\n handleBreadcrumbs(replay);\n handleNetworkBreadcrumbs(replay);\n\n // Tag all (non replay) events that get sent to Sentry with the current\n // replay ID so that we can reference them later in the UI\n const eventProcessor = handleGlobalEventListener(replay);\n addEventProcessor(eventProcessor);\n\n // If a custom client has no hooks yet, we continue to use the \"old\" implementation\n if (client) {\n client.on('beforeSendEvent', handleBeforeSendEvent(replay));\n client.on('afterSendEvent', handleAfterSendEvent(replay));\n client.on('createDsc', (dsc) => {\n const replayId = replay.getSessionId();\n // We do not want to set the DSC when in buffer mode, as that means the replay has not been sent (yet)\n if (replayId && replay.isEnabled() && replay.recordingMode === 'session') {\n // Ensure to check that the session is still active - it could have expired in the meanwhile\n const isSessionActive = replay.checkAndHandleExpiredSession();\n if (isSessionActive) {\n dsc.replay_id = replayId;\n }\n }\n });\n\n client.on('spanStart', span => {\n replay.lastActiveSpan = span;\n });\n\n // We may be missing the initial spanStart due to timing issues,\n // so we capture it on finish again.\n client.on('spanEnd', span => {\n replay.lastActiveSpan = span;\n });\n\n // We want to attach the replay id to the feedback event\n client.on('beforeSendFeedback', async (feedbackEvent, options) => {\n const replayId = replay.getSessionId();\n if (options?.includeReplay && replay.isEnabled() && replayId && feedbackEvent.contexts?.feedback) {\n // In case the feedback is sent via API and not through our widget, we want to flush replay\n if (feedbackEvent.contexts.feedback.source === 'api' && autoFlushOnFeedback) {\n await replay.flush();\n }\n feedbackEvent.contexts.feedback.replay_id = replayId;\n }\n });\n\n if (autoFlushOnFeedback) {\n client.on('openFeedbackWidget', async () => {\n await replay.flush();\n });\n }\n }\n}\n\n/**\n * Create a \"span\" for the total amount of memory being used by JS objects\n * (including v8 internal objects).\n */\nasync function addMemoryEntry(replay) {\n // window.performance.memory is a non-standard API and doesn't work on all browsers, so we try-catch this\n try {\n return Promise.all(\n createPerformanceSpans(replay, [\n // @ts-expect-error memory doesn't exist on type Performance as the API is non-standard (we check that it exists above)\n createMemoryEntry(WINDOW.performance.memory),\n ]),\n );\n } catch (error) {\n // Do nothing\n return [];\n }\n}\n\nfunction createMemoryEntry(memoryEntry) {\n const { jsHeapSizeLimit, totalJSHeapSize, usedJSHeapSize } = memoryEntry;\n // we don't want to use `getAbsoluteTime` because it adds the event time to the\n // time origin, so we get the current timestamp instead\n const time = Date.now() / 1000;\n return {\n type: 'memory',\n name: 'memory',\n start: time,\n end: time,\n data: {\n memory: {\n jsHeapSizeLimit,\n totalJSHeapSize,\n usedJSHeapSize,\n },\n },\n };\n}\n\n/**\n * Heavily simplified debounce function based on lodash.debounce.\n *\n * This function takes a callback function (@param fun) and delays its invocation\n * by @param wait milliseconds. Optionally, a maxWait can be specified in @param options,\n * which ensures that the callback is invoked at least once after the specified max. wait time.\n *\n * @param func the function whose invocation is to be debounced\n * @param wait the minimum time until the function is invoked after it was called once\n * @param options the options object, which can contain the `maxWait` property\n *\n * @returns the debounced version of the function, which needs to be called at least once to start the\n * debouncing process. Subsequent calls will reset the debouncing timer and, in case @paramfunc\n * was already invoked in the meantime, return @param func's return value.\n * The debounced function has two additional properties:\n * - `flush`: Invokes the debounced function immediately and returns its return value\n * - `cancel`: Cancels the debouncing process and resets the debouncing timer\n */\nfunction debounce(func, wait, options) {\n let callbackReturnValue;\n\n let timerId;\n let maxTimerId;\n\n const maxWait = options?.maxWait ? Math.max(options.maxWait, wait) : 0;\n\n function invokeFunc() {\n cancelTimers();\n callbackReturnValue = func();\n return callbackReturnValue;\n }\n\n function cancelTimers() {\n timerId !== undefined && clearTimeout(timerId);\n maxTimerId !== undefined && clearTimeout(maxTimerId);\n timerId = maxTimerId = undefined;\n }\n\n function flush() {\n if (timerId !== undefined || maxTimerId !== undefined) {\n return invokeFunc();\n }\n return callbackReturnValue;\n }\n\n function debounced() {\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout$3(invokeFunc, wait);\n\n if (maxWait && maxTimerId === undefined) {\n maxTimerId = setTimeout$3(invokeFunc, maxWait);\n }\n\n return callbackReturnValue;\n }\n\n debounced.cancel = cancelTimers;\n debounced.flush = flush;\n return debounced;\n}\n\nconst NAVIGATOR = GLOBAL_OBJ.navigator;\n\n/**\n * Disable sampling mousemove events on iOS browsers as this can cause blocking the main thread\n * https://github.com/getsentry/sentry-javascript/issues/14534\n */\nfunction getRecordingSamplingOptions() {\n if (\n /iPhone|iPad|iPod/i.test(NAVIGATOR?.userAgent ?? '') ||\n (/Macintosh/i.test(NAVIGATOR?.userAgent ?? '') && NAVIGATOR?.maxTouchPoints && NAVIGATOR?.maxTouchPoints > 1)\n ) {\n return {\n sampling: {\n mousemove: false,\n },\n };\n }\n\n return {};\n}\n\n/**\n * Handler for recording events.\n *\n * Adds to event buffer, and has varying flushing behaviors if the event was a checkout.\n */\nfunction getHandleRecordingEmit(replay) {\n let hadFirstEvent = false;\n\n return (event, _isCheckout) => {\n // If this is false, it means session is expired, create and a new session and wait for checkout\n if (!replay.checkAndHandleExpiredSession()) {\n DEBUG_BUILD && logger.warn('Received replay event after session expired.');\n\n return;\n }\n\n // `_isCheckout` is only set when the checkout is due to `checkoutEveryNms`\n // We also want to treat the first event as a checkout, so we handle this specifically here\n const isCheckout = _isCheckout || !hadFirstEvent;\n hadFirstEvent = true;\n\n if (replay.clickDetector) {\n updateClickDetectorForRecordingEvent(replay.clickDetector, event);\n }\n\n // The handler returns `true` if we do not want to trigger debounced flush, `false` if we want to debounce flush.\n replay.addUpdate(() => {\n // The session is always started immediately on pageload/init, but for\n // error-only replays, it should reflect the most recent checkout\n // when an error occurs. Clear any state that happens before this current\n // checkout. This needs to happen before `addEvent()` which updates state\n // dependent on this reset.\n if (replay.recordingMode === 'buffer' && isCheckout) {\n replay.setInitialState();\n }\n\n // If the event is not added (e.g. due to being paused, disabled, or out of the max replay duration),\n // Skip all further steps\n if (!addEventSync(replay, event, isCheckout)) {\n // Return true to skip scheduling a debounced flush\n return true;\n }\n\n // Different behavior for full snapshots (type=2), ignore other event types\n // See https://github.com/rrweb-io/rrweb/blob/d8f9290ca496712aa1e7d472549480c4e7876594/packages/rrweb/src/types.ts#L16\n if (!isCheckout) {\n return false;\n }\n\n const session = replay.session;\n\n // Additionally, create a meta event that will capture certain SDK settings.\n // In order to handle buffer mode, this needs to either be done when we\n // receive checkout events or at flush time. We have an experimental mode\n // to perform multiple checkouts a session (the idea is to improve\n // seeking during playback), so also only include if segmentId is 0\n // (handled in `addSettingsEvent`).\n //\n // `isCheckout` is always true, but want to be explicit that it should\n // only be added for checkouts\n addSettingsEvent(replay, isCheckout);\n\n // When in buffer mode, make sure we adjust the session started date to the current earliest event of the buffer\n // this should usually be the timestamp of the checkout event, but to be safe...\n if (replay.recordingMode === 'buffer' && session && replay.eventBuffer) {\n const earliestEvent = replay.eventBuffer.getEarliestTimestamp();\n if (earliestEvent) {\n DEBUG_BUILD &&\n logger.info(`Updating session start time to earliest event in buffer to ${new Date(earliestEvent)}`);\n\n session.started = earliestEvent;\n\n if (replay.getOptions().stickySession) {\n saveSession(session);\n }\n }\n }\n\n // If there is a previousSessionId after a full snapshot occurs, then\n // the replay session was started due to session expiration. The new session\n // is started before triggering a new checkout and contains the id\n // of the previous session. Do not immediately flush in this case\n // to avoid capturing only the checkout and instead the replay will\n // be captured if they perform any follow-up actions.\n if (session?.previousSessionId) {\n return true;\n }\n\n if (replay.recordingMode === 'session') {\n // If the full snapshot is due to an initial load, we will not have\n // a previous session ID. In this case, we want to buffer events\n // for a set amount of time before flushing. This can help avoid\n // capturing replays of users that immediately close the window.\n\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n void replay.flush();\n }\n\n return true;\n });\n };\n}\n\n/**\n * Exported for tests\n */\nfunction createOptionsEvent(replay) {\n const options = replay.getOptions();\n return {\n type: EventType.Custom,\n timestamp: Date.now(),\n data: {\n tag: 'options',\n payload: {\n shouldRecordCanvas: replay.isRecordingCanvas(),\n sessionSampleRate: options.sessionSampleRate,\n errorSampleRate: options.errorSampleRate,\n useCompressionOption: options.useCompression,\n blockAllMedia: options.blockAllMedia,\n maskAllText: options.maskAllText,\n maskAllInputs: options.maskAllInputs,\n useCompression: replay.eventBuffer ? replay.eventBuffer.type === 'worker' : false,\n networkDetailHasUrls: options.networkDetailAllowUrls.length > 0,\n networkCaptureBodies: options.networkCaptureBodies,\n networkRequestHasHeaders: options.networkRequestHeaders.length > 0,\n networkResponseHasHeaders: options.networkResponseHeaders.length > 0,\n },\n },\n };\n}\n\n/**\n * Add a \"meta\" event that contains a simplified view on current configuration\n * options. This should only be included on the first segment of a recording.\n */\nfunction addSettingsEvent(replay, isCheckout) {\n // Only need to add this event when sending the first segment\n if (!isCheckout || !replay.session || replay.session.segmentId !== 0) {\n return;\n }\n\n addEventSync(replay, createOptionsEvent(replay), false);\n}\n\n/**\n * Create a replay envelope ready to be sent.\n * This includes both the replay event, as well as the recording data.\n */\nfunction createReplayEnvelope(\n replayEvent,\n recordingData,\n dsn,\n tunnel,\n) {\n return createEnvelope(\n createEventEnvelopeHeaders(replayEvent, getSdkMetadataForEnvelopeHeader(replayEvent), tunnel, dsn),\n [\n [{ type: 'replay_event' }, replayEvent],\n [\n {\n type: 'replay_recording',\n // If string then we need to encode to UTF8, otherwise will have\n // wrong size. TextEncoder has similar browser support to\n // MutationObserver, although it does not accept IE11.\n length:\n typeof recordingData === 'string' ? new TextEncoder().encode(recordingData).length : recordingData.length,\n },\n recordingData,\n ],\n ],\n );\n}\n\n/**\n * Prepare the recording data ready to be sent.\n */\nfunction prepareRecordingData({\n recordingData,\n headers,\n}\n\n) {\n let payloadWithSequence;\n\n // XXX: newline is needed to separate sequence id from events\n const replayHeaders = `${JSON.stringify(headers)}\n`;\n\n if (typeof recordingData === 'string') {\n payloadWithSequence = `${replayHeaders}${recordingData}`;\n } else {\n const enc = new TextEncoder();\n // XXX: newline is needed to separate sequence id from events\n const sequence = enc.encode(replayHeaders);\n // Merge the two Uint8Arrays\n payloadWithSequence = new Uint8Array(sequence.length + recordingData.length);\n payloadWithSequence.set(sequence);\n payloadWithSequence.set(recordingData, sequence.length);\n }\n\n return payloadWithSequence;\n}\n\n/**\n * Prepare a replay event & enrich it with the SDK metadata.\n */\nasync function prepareReplayEvent({\n client,\n scope,\n replayId: event_id,\n event,\n}\n\n) {\n const integrations =\n typeof client['_integrations'] === 'object' &&\n client['_integrations'] !== null &&\n !Array.isArray(client['_integrations'])\n ? Object.keys(client['_integrations'])\n : undefined;\n\n const eventHint = { event_id, integrations };\n\n client.emit('preprocessEvent', event, eventHint);\n\n const preparedEvent = (await prepareEvent(\n client.getOptions(),\n event,\n eventHint,\n scope,\n client,\n getIsolationScope(),\n )) ;\n\n // If e.g. a global event processor returned null\n if (!preparedEvent) {\n return null;\n }\n\n client.emit('postprocessEvent', preparedEvent, eventHint);\n\n // This normally happens in browser client \"_prepareEvent\"\n // but since we do not use this private method from the client, but rather the plain import\n // we need to do this manually.\n preparedEvent.platform = preparedEvent.platform || 'javascript';\n\n // extract the SDK name because `client._prepareEvent` doesn't add it to the event\n const metadata = client.getSdkMetadata();\n const { name, version } = metadata?.sdk || {};\n\n preparedEvent.sdk = {\n ...preparedEvent.sdk,\n name: name || 'sentry.javascript.unknown',\n version: version || '0.0.0',\n };\n\n return preparedEvent;\n}\n\n/**\n * Send replay attachment using `fetch()`\n */\nasync function sendReplayRequest({\n recordingData,\n replayId,\n segmentId: segment_id,\n eventContext,\n timestamp,\n session,\n}) {\n const preparedRecordingData = prepareRecordingData({\n recordingData,\n headers: {\n segment_id,\n },\n });\n\n const { urls, errorIds, traceIds, initialTimestamp } = eventContext;\n\n const client = getClient();\n const scope = getCurrentScope();\n const transport = client?.getTransport();\n const dsn = client?.getDsn();\n\n if (!client || !transport || !dsn || !session.sampled) {\n return resolvedSyncPromise({});\n }\n\n const baseEvent = {\n type: REPLAY_EVENT_NAME,\n replay_start_timestamp: initialTimestamp / 1000,\n timestamp: timestamp / 1000,\n error_ids: errorIds,\n trace_ids: traceIds,\n urls,\n replay_id: replayId,\n segment_id,\n replay_type: session.sampled,\n };\n\n const replayEvent = await prepareReplayEvent({ scope, client, replayId, event: baseEvent });\n\n if (!replayEvent) {\n // Taken from baseclient's `_processEvent` method, where this is handled for errors/transactions\n client.recordDroppedEvent('event_processor', 'replay');\n DEBUG_BUILD && logger.info('An event processor returned `null`, will not send event.');\n return resolvedSyncPromise({});\n }\n\n /*\n For reference, the fully built event looks something like this:\n {\n \"type\": \"replay_event\",\n \"timestamp\": 1670837008.634,\n \"error_ids\": [\n \"errorId\"\n ],\n \"trace_ids\": [\n \"traceId\"\n ],\n \"urls\": [\n \"https://example.com\"\n ],\n \"replay_id\": \"eventId\",\n \"segment_id\": 3,\n \"replay_type\": \"error\",\n \"platform\": \"javascript\",\n \"event_id\": \"eventId\",\n \"environment\": \"production\",\n \"sdk\": {\n \"integrations\": [\n \"BrowserTracing\",\n \"Replay\"\n ],\n \"name\": \"sentry.javascript.browser\",\n \"version\": \"7.25.0\"\n },\n \"sdkProcessingMetadata\": {},\n \"contexts\": {\n },\n }\n */\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete replayEvent.sdkProcessingMetadata;\n\n const envelope = createReplayEnvelope(replayEvent, preparedRecordingData, dsn, client.getOptions().tunnel);\n\n let response;\n\n try {\n response = await transport.send(envelope);\n } catch (err) {\n const error = new Error(UNABLE_TO_SEND_REPLAY);\n\n try {\n // In case browsers don't allow this property to be writable\n // @ts-expect-error This needs lib es2022 and newer\n error.cause = err;\n } catch {\n // nothing to do\n }\n throw error;\n }\n\n // If the status code is invalid, we want to immediately stop & not retry\n if (typeof response.statusCode === 'number' && (response.statusCode < 200 || response.statusCode >= 300)) {\n throw new TransportStatusCodeError(response.statusCode);\n }\n\n const rateLimits = updateRateLimits({}, response);\n if (isRateLimited(rateLimits, 'replay')) {\n throw new RateLimitError(rateLimits);\n }\n\n return response;\n}\n\n/**\n * This error indicates that the transport returned an invalid status code.\n */\nclass TransportStatusCodeError extends Error {\n constructor(statusCode) {\n super(`Transport returned status code ${statusCode}`);\n }\n}\n\n/**\n * This error indicates that we hit a rate limit API error.\n */\nclass RateLimitError extends Error {\n\n constructor(rateLimits) {\n super('Rate limit hit');\n this.rateLimits = rateLimits;\n }\n}\n\n/**\n * Finalize and send the current replay event to Sentry\n */\nasync function sendReplay(\n replayData,\n retryConfig = {\n count: 0,\n interval: RETRY_BASE_INTERVAL,\n },\n) {\n const { recordingData, onError } = replayData;\n\n // short circuit if there's no events to upload (this shouldn't happen as _runFlush makes this check)\n if (!recordingData.length) {\n return;\n }\n\n try {\n await sendReplayRequest(replayData);\n return true;\n } catch (err) {\n if (err instanceof TransportStatusCodeError || err instanceof RateLimitError) {\n throw err;\n }\n\n // Capture error for every failed replay\n setContext('Replays', {\n _retryCount: retryConfig.count,\n });\n\n if (onError) {\n onError(err);\n }\n\n // If an error happened here, it's likely that uploading the attachment\n // failed, we'll can retry with the same events payload\n if (retryConfig.count >= RETRY_MAX_COUNT) {\n const error = new Error(`${UNABLE_TO_SEND_REPLAY} - max retries exceeded`);\n\n try {\n // In case browsers don't allow this property to be writable\n // @ts-expect-error This needs lib es2022 and newer\n error.cause = err;\n } catch {\n // nothing to do\n }\n\n throw error;\n }\n\n // will retry in intervals of 5, 10, 30\n retryConfig.interval *= ++retryConfig.count;\n\n return new Promise((resolve, reject) => {\n setTimeout$3(async () => {\n try {\n await sendReplay(replayData, retryConfig);\n resolve(true);\n } catch (err) {\n reject(err);\n }\n }, retryConfig.interval);\n });\n }\n}\n\nconst THROTTLED = '__THROTTLED';\nconst SKIPPED = '__SKIPPED';\n\n/**\n * Create a throttled function off a given function.\n * When calling the throttled function, it will call the original function only\n * if it hasn't been called more than `maxCount` times in the last `durationSeconds`.\n *\n * Returns `THROTTLED` if throttled for the first time, after that `SKIPPED`,\n * or else the return value of the original function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction throttle(\n fn,\n maxCount,\n durationSeconds,\n) {\n const counter = new Map();\n\n const _cleanup = (now) => {\n const threshold = now - durationSeconds;\n counter.forEach((_value, key) => {\n if (key < threshold) {\n counter.delete(key);\n }\n });\n };\n\n const _getTotalCount = () => {\n return [...counter.values()].reduce((a, b) => a + b, 0);\n };\n\n let isThrottled = false;\n\n return (...rest) => {\n // Date in second-precision, which we use as basis for the throttling\n const now = Math.floor(Date.now() / 1000);\n\n // First, make sure to delete any old entries\n _cleanup(now);\n\n // If already over limit, do nothing\n if (_getTotalCount() >= maxCount) {\n const wasThrottled = isThrottled;\n isThrottled = true;\n return wasThrottled ? SKIPPED : THROTTLED;\n }\n\n isThrottled = false;\n const count = counter.get(now) || 0;\n counter.set(now, count + 1);\n\n return fn(...rest);\n };\n}\n\n/* eslint-disable max-lines */ // TODO: We might want to split this file up\n\n/**\n * The main replay container class, which holds all the state and methods for recording and sending replays.\n */\nclass ReplayContainer {\n\n /**\n * Recording can happen in one of two modes:\n * - session: Record the whole session, sending it continuously\n * - buffer: Always keep the last 60s of recording, requires:\n * - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs\n * - or calling `flush()` to send the replay\n */\n\n /**\n * The current or last active span.\n * This is only available when performance is enabled.\n */\n\n /**\n * These are here so we can overwrite them in tests etc.\n * @hidden\n */\n\n /** The replay has to be manually started, because no sample rate (neither session or error) was provided. */\n\n /**\n * Options to pass to `rrweb.record()`\n */\n\n /**\n * Timestamp of the last user activity. This lives across sessions.\n */\n\n /**\n * Is the integration currently active?\n */\n\n /**\n * Paused is a state where:\n * - DOM Recording is not listening at all\n * - Nothing will be added to event buffer (e.g. core SDK events)\n */\n\n /**\n * Have we attached listeners to the core SDK?\n * Note we have to track this as there is no way to remove instrumentation handlers.\n */\n\n /**\n * Function to stop recording\n */\n\n /**\n * Internal use for canvas recording options\n */\n\n /**\n * Handle when visibility of the page content changes. Opening a new tab will\n * cause the state to change to hidden because of content of current page will\n * be hidden. Likewise, moving a different window to cover the contents of the\n * page will also trigger a change to a hidden state.\n */\n\n /**\n * Handle when page is blurred\n */\n\n /**\n * Handle when page is focused\n */\n\n /** Ensure page remains active when a key is pressed. */\n\n constructor({\n options,\n recordingOptions,\n }\n\n) {\n this.eventBuffer = null;\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n this.recordingMode = 'session';\n this.timeouts = {\n sessionIdlePause: SESSION_IDLE_PAUSE_DURATION,\n sessionIdleExpire: SESSION_IDLE_EXPIRE_DURATION,\n } ;\n this._lastActivity = Date.now();\n this._isEnabled = false;\n this._isPaused = false;\n this._requiresManualStart = false;\n this._hasInitializedCoreListeners = false;\n this._context = {\n errorIds: new Set(),\n traceIds: new Set(),\n urls: [],\n initialTimestamp: Date.now(),\n initialUrl: '',\n };\n\n this._recordingOptions = recordingOptions;\n this._options = options;\n\n this._debouncedFlush = debounce(() => this._flush(), this._options.flushMinDelay, {\n maxWait: this._options.flushMaxDelay,\n });\n\n this._throttledAddEvent = throttle(\n (event, isCheckout) => addEvent(this, event, isCheckout),\n // Max 300 events...\n 300,\n // ... per 5s\n 5,\n );\n\n const { slowClickTimeout, slowClickIgnoreSelectors } = this.getOptions();\n\n const slowClickConfig = slowClickTimeout\n ? {\n threshold: Math.min(SLOW_CLICK_THRESHOLD, slowClickTimeout),\n timeout: slowClickTimeout,\n scrollTimeout: SLOW_CLICK_SCROLL_TIMEOUT,\n ignoreSelector: slowClickIgnoreSelectors ? slowClickIgnoreSelectors.join(',') : '',\n }\n : undefined;\n\n if (slowClickConfig) {\n this.clickDetector = new ClickDetector(this, slowClickConfig);\n }\n\n // Configure replay logger w/ experimental options\n if (DEBUG_BUILD) {\n const experiments = options._experiments;\n logger.setConfig({\n captureExceptions: !!experiments.captureExceptions,\n traceInternals: !!experiments.traceInternals,\n });\n }\n\n // We set these handler properties as class properties, to make binding/unbinding them easier\n this._handleVisibilityChange = () => {\n if (WINDOW.document.visibilityState === 'visible') {\n this._doChangeToForegroundTasks();\n } else {\n this._doChangeToBackgroundTasks();\n }\n };\n\n /**\n * Handle when page is blurred\n */\n this._handleWindowBlur = () => {\n const breadcrumb = createBreadcrumb({\n category: 'ui.blur',\n });\n\n // Do not count blur as a user action -- it's part of the process of them\n // leaving the page\n this._doChangeToBackgroundTasks(breadcrumb);\n };\n\n this._handleWindowFocus = () => {\n const breadcrumb = createBreadcrumb({\n category: 'ui.focus',\n });\n\n // Do not count focus as a user action -- instead wait until they focus and\n // interactive with page\n this._doChangeToForegroundTasks(breadcrumb);\n };\n\n /** Ensure page remains active when a key is pressed. */\n this._handleKeyboardEvent = (event) => {\n handleKeyboardEvent(this, event);\n };\n }\n\n /** Get the event context. */\n getContext() {\n return this._context;\n }\n\n /** If recording is currently enabled. */\n isEnabled() {\n return this._isEnabled;\n }\n\n /** If recording is currently paused. */\n isPaused() {\n return this._isPaused;\n }\n\n /**\n * Determine if canvas recording is enabled\n */\n isRecordingCanvas() {\n return Boolean(this._canvas);\n }\n\n /** Get the replay integration options. */\n getOptions() {\n return this._options;\n }\n\n /** A wrapper to conditionally capture exceptions. */\n handleException(error) {\n DEBUG_BUILD && logger.exception(error);\n if (this._options.onError) {\n this._options.onError(error);\n }\n }\n\n /**\n * Initializes the plugin based on sampling configuration. Should not be\n * called outside of constructor.\n */\n initializeSampling(previousSessionId) {\n const { errorSampleRate, sessionSampleRate } = this._options;\n\n // If neither sample rate is > 0, then do nothing - user will need to call one of\n // `start()` or `startBuffering` themselves.\n const requiresManualStart = errorSampleRate <= 0 && sessionSampleRate <= 0;\n\n this._requiresManualStart = requiresManualStart;\n\n if (requiresManualStart) {\n return;\n }\n\n // Otherwise if there is _any_ sample rate set, try to load an existing\n // session, or create a new one.\n this._initializeSessionForSampling(previousSessionId);\n\n if (!this.session) {\n // This should not happen, something wrong has occurred\n DEBUG_BUILD && logger.exception(new Error('Unable to initialize and create session'));\n return;\n }\n\n if (this.session.sampled === false) {\n // This should only occur if `errorSampleRate` is 0 and was unsampled for\n // session-based replay. In this case there is nothing to do.\n return;\n }\n\n // If segmentId > 0, it means we've previously already captured this session\n // In this case, we still want to continue in `session` recording mode\n this.recordingMode = this.session.sampled === 'buffer' && this.session.segmentId === 0 ? 'buffer' : 'session';\n\n DEBUG_BUILD && logger.infoTick(`Starting replay in ${this.recordingMode} mode`);\n\n this._initializeRecording();\n }\n\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will log a message if replay is already in progress.\n *\n * Creates or loads a session, attaches listeners to varying events (DOM,\n * _performanceObserver, Recording, Sentry SDK, etc)\n */\n start() {\n if (this._isEnabled && this.recordingMode === 'session') {\n DEBUG_BUILD && logger.info('Recording is already in progress');\n return;\n }\n\n if (this._isEnabled && this.recordingMode === 'buffer') {\n DEBUG_BUILD && logger.info('Buffering is in progress, call `flush()` to save the replay');\n return;\n }\n\n DEBUG_BUILD && logger.infoTick('Starting replay in session mode');\n\n // Required as user activity is initially set in\n // constructor, so if `start()` is called after\n // session idle expiration, a replay will not be\n // created due to an idle timeout.\n this._updateUserActivity();\n\n const session = loadOrCreateSession(\n {\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n },\n {\n stickySession: this._options.stickySession,\n // This is intentional: create a new session-based replay when calling `start()`\n sessionSampleRate: 1,\n allowBuffering: false,\n },\n );\n\n this.session = session;\n\n this._initializeRecording();\n }\n\n /**\n * Start replay buffering. Buffers until `flush()` is called or, if\n * `replaysOnErrorSampleRate` > 0, an error occurs.\n */\n startBuffering() {\n if (this._isEnabled) {\n DEBUG_BUILD && logger.info('Buffering is in progress, call `flush()` to save the replay');\n return;\n }\n\n DEBUG_BUILD && logger.infoTick('Starting replay in buffer mode');\n\n const session = loadOrCreateSession(\n {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n },\n {\n stickySession: this._options.stickySession,\n sessionSampleRate: 0,\n allowBuffering: true,\n },\n );\n\n this.session = session;\n\n this.recordingMode = 'buffer';\n this._initializeRecording();\n }\n\n /**\n * Start recording.\n *\n * Note that this will cause a new DOM checkout\n */\n startRecording() {\n try {\n const canvasOptions = this._canvas;\n\n this._stopRecording = record({\n ...this._recordingOptions,\n // When running in error sampling mode, we need to overwrite `checkoutEveryNms`\n // Without this, it would record forever, until an error happens, which we don't want\n // instead, we'll always keep the last 60 seconds of replay before an error happened\n ...(this.recordingMode === 'buffer'\n ? { checkoutEveryNms: BUFFER_CHECKOUT_TIME }\n : // Otherwise, use experimental option w/ min checkout time of 6 minutes\n // This is to improve playback seeking as there could potentially be\n // less mutations to process in the worse cases.\n //\n // checkout by \"N\" events is probably ideal, but means we have less\n // control about the number of checkouts we make (which generally\n // increases replay size)\n this._options._experiments.continuousCheckout && {\n // Minimum checkout time is 6 minutes\n checkoutEveryNms: Math.max(360000, this._options._experiments.continuousCheckout),\n }),\n emit: getHandleRecordingEmit(this),\n ...getRecordingSamplingOptions(),\n onMutation: this._onMutationHandler.bind(this),\n ...(canvasOptions\n ? {\n recordCanvas: canvasOptions.recordCanvas,\n getCanvasManager: canvasOptions.getCanvasManager,\n sampling: canvasOptions.sampling,\n dataURLOptions: canvasOptions.dataURLOptions,\n }\n : {}),\n });\n } catch (err) {\n this.handleException(err);\n }\n }\n\n /**\n * Stops the recording, if it was running.\n *\n * Returns true if it was previously stopped, or is now stopped,\n * otherwise false.\n */\n stopRecording() {\n try {\n if (this._stopRecording) {\n this._stopRecording();\n this._stopRecording = undefined;\n }\n\n return true;\n } catch (err) {\n this.handleException(err);\n return false;\n }\n }\n\n /**\n * Currently, this needs to be manually called (e.g. for tests). Sentry SDK\n * does not support a teardown\n */\n async stop({ forceFlush = false, reason } = {}) {\n if (!this._isEnabled) {\n return;\n }\n\n // We can't move `_isEnabled` after awaiting a flush, otherwise we can\n // enter into an infinite loop when `stop()` is called while flushing.\n this._isEnabled = false;\n\n try {\n DEBUG_BUILD && logger.info(`Stopping Replay${reason ? ` triggered by ${reason}` : ''}`);\n\n resetReplayIdOnDynamicSamplingContext();\n\n this._removeListeners();\n this.stopRecording();\n\n this._debouncedFlush.cancel();\n // See comment above re: `_isEnabled`, we \"force\" a flush, ignoring the\n // `_isEnabled` state of the plugin since it was disabled above.\n if (forceFlush) {\n await this._flush({ force: true });\n }\n\n // After flush, destroy event buffer\n this.eventBuffer?.destroy();\n this.eventBuffer = null;\n\n // Clear session from session storage, note this means if a new session\n // is started after, it will not have `previousSessionId`\n clearSession(this);\n } catch (err) {\n this.handleException(err);\n }\n }\n\n /**\n * Pause some replay functionality. See comments for `_isPaused`.\n * This differs from stop as this only stops DOM recording, it is\n * not as thorough of a shutdown as `stop()`.\n */\n pause() {\n if (this._isPaused) {\n return;\n }\n\n this._isPaused = true;\n this.stopRecording();\n\n DEBUG_BUILD && logger.info('Pausing replay');\n }\n\n /**\n * Resumes recording, see notes for `pause().\n *\n * Note that calling `startRecording()` here will cause a\n * new DOM checkout.`\n */\n resume() {\n if (!this._isPaused || !this._checkSession()) {\n return;\n }\n\n this._isPaused = false;\n this.startRecording();\n\n DEBUG_BUILD && logger.info('Resuming replay');\n }\n\n /**\n * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n * Unless `continueRecording` is false, the replay will continue to record and\n * behave as a \"session\"-based replay.\n *\n * Otherwise, queue up a flush.\n */\n async sendBufferedReplayOrFlush({ continueRecording = true } = {}) {\n if (this.recordingMode === 'session') {\n return this.flushImmediate();\n }\n\n const activityTime = Date.now();\n\n DEBUG_BUILD && logger.info('Converting buffer to session');\n\n // Allow flush to complete before resuming as a session recording, otherwise\n // the checkout from `startRecording` may be included in the payload.\n // Prefer to keep the error replay as a separate (and smaller) segment\n // than the session replay.\n await this.flushImmediate();\n\n const hasStoppedRecording = this.stopRecording();\n\n if (!continueRecording || !hasStoppedRecording) {\n return;\n }\n\n // To avoid race conditions where this is called multiple times, we check here again that we are still buffering\n if ((this.recordingMode ) === 'session') {\n return;\n }\n\n // Re-start recording in session-mode\n this.recordingMode = 'session';\n\n // Once this session ends, we do not want to refresh it\n if (this.session) {\n this._updateUserActivity(activityTime);\n this._updateSessionActivity(activityTime);\n this._maybeSaveSession();\n }\n\n this.startRecording();\n }\n\n /**\n * We want to batch uploads of replay events. Save events only if\n * `` milliseconds have elapsed since the last event\n * *OR* if `` milliseconds have elapsed.\n *\n * Accepts a callback to perform side-effects and returns true to stop batch\n * processing and hand back control to caller.\n */\n addUpdate(cb) {\n // We need to always run `cb` (e.g. in the case of `this.recordingMode == 'buffer'`)\n const cbResult = cb();\n\n // If this option is turned on then we will only want to call `flush`\n // explicitly\n if (this.recordingMode === 'buffer') {\n return;\n }\n\n // If callback is true, we do not want to continue with flushing -- the\n // caller will need to handle it.\n if (cbResult === true) {\n return;\n }\n\n // addUpdate is called quite frequently - use _debouncedFlush so that it\n // respects the flush delays and does not flush immediately\n this._debouncedFlush();\n }\n\n /**\n * Updates the user activity timestamp and resumes recording. This should be\n * called in an event handler for a user action that we consider as the user\n * being \"active\" (e.g. a mouse click).\n */\n triggerUserActivity() {\n this._updateUserActivity();\n\n // This case means that recording was once stopped due to inactivity.\n // Ensure that recording is resumed.\n if (!this._stopRecording) {\n // Create a new session, otherwise when the user action is flushed, it\n // will get rejected due to an expired session.\n if (!this._checkSession()) {\n return;\n }\n\n // Note: This will cause a new DOM checkout\n this.resume();\n return;\n }\n\n // Otherwise... recording was never suspended, continue as normalish\n this.checkAndHandleExpiredSession();\n\n this._updateSessionActivity();\n }\n\n /**\n * Updates the user activity timestamp *without* resuming\n * recording. Some user events (e.g. keydown) can be create\n * low-value replays that only contain the keypress as a\n * breadcrumb. Instead this would require other events to\n * create a new replay after a session has expired.\n */\n updateUserActivity() {\n this._updateUserActivity();\n this._updateSessionActivity();\n }\n\n /**\n * Only flush if `this.recordingMode === 'session'`\n */\n conditionalFlush() {\n if (this.recordingMode === 'buffer') {\n return Promise.resolve();\n }\n\n return this.flushImmediate();\n }\n\n /**\n * Flush using debounce flush\n */\n flush() {\n return this._debouncedFlush() ;\n }\n\n /**\n * Always flush via `_debouncedFlush` so that we do not have flushes triggered\n * from calling both `flush` and `_debouncedFlush`. Otherwise, there could be\n * cases of multiple flushes happening closely together.\n */\n flushImmediate() {\n this._debouncedFlush();\n // `.flush` is provided by the debounced function, analogously to lodash.debounce\n return this._debouncedFlush.flush() ;\n }\n\n /**\n * Cancels queued up flushes.\n */\n cancelFlush() {\n this._debouncedFlush.cancel();\n }\n\n /** Get the current session (=replay) ID */\n getSessionId() {\n return this.session?.id;\n }\n\n /**\n * Checks if recording should be stopped due to user inactivity. Otherwise\n * check if session is expired and create a new session if so. Triggers a new\n * full snapshot on new session.\n *\n * Returns true if session is not expired, false otherwise.\n * @hidden\n */\n checkAndHandleExpiredSession() {\n // Prevent starting a new session if the last user activity is older than\n // SESSION_IDLE_PAUSE_DURATION. Otherwise non-user activity can trigger a new\n // session+recording. This creates noisy replays that do not have much\n // content in them.\n if (\n this._lastActivity &&\n isExpired(this._lastActivity, this.timeouts.sessionIdlePause) &&\n this.session &&\n this.session.sampled === 'session'\n ) {\n // Pause recording only for session-based replays. Otherwise, resuming\n // will create a new replay and will conflict with users who only choose\n // to record error-based replays only. (e.g. the resumed replay will not\n // contain a reference to an error)\n this.pause();\n return;\n }\n\n // --- There is recent user activity --- //\n // This will create a new session if expired, based on expiry length\n if (!this._checkSession()) {\n // Check session handles the refreshing itself\n return false;\n }\n\n return true;\n }\n\n /**\n * Capture some initial state that can change throughout the lifespan of the\n * replay. This is required because otherwise they would be captured at the\n * first flush.\n */\n setInitialState() {\n const urlPath = `${WINDOW.location.pathname}${WINDOW.location.hash}${WINDOW.location.search}`;\n const url = `${WINDOW.location.origin}${urlPath}`;\n\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n\n // Reset _context as well\n this._clearContext();\n\n this._context.initialUrl = url;\n this._context.initialTimestamp = Date.now();\n this._context.urls.push(url);\n }\n\n /**\n * Add a breadcrumb event, that may be throttled.\n * If it was throttled, we add a custom breadcrumb to indicate that.\n */\n throttledAddEvent(\n event,\n isCheckout,\n ) {\n const res = this._throttledAddEvent(event, isCheckout);\n\n // If this is THROTTLED, it means we have throttled the event for the first time\n // In this case, we want to add a breadcrumb indicating that something was skipped\n if (res === THROTTLED) {\n const breadcrumb = createBreadcrumb({\n category: 'replay.throttled',\n });\n\n this.addUpdate(() => {\n // Return `false` if the event _was_ added, as that means we schedule a flush\n return !addEventSync(this, {\n type: ReplayEventTypeCustom,\n timestamp: breadcrumb.timestamp || 0,\n data: {\n tag: 'breadcrumb',\n payload: breadcrumb,\n metric: true,\n },\n });\n });\n }\n\n return res;\n }\n\n /**\n * This will get the parametrized route name of the current page.\n * This is only available if performance is enabled, and if an instrumented router is used.\n */\n getCurrentRoute() {\n const lastActiveSpan = this.lastActiveSpan || getActiveSpan();\n const lastRootSpan = lastActiveSpan && getRootSpan(lastActiveSpan);\n\n const attributes = (lastRootSpan && spanToJSON(lastRootSpan).data) || {};\n const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n if (!lastRootSpan || !source || !['route', 'custom'].includes(source)) {\n return undefined;\n }\n\n return spanToJSON(lastRootSpan).description;\n }\n\n /**\n * Initialize and start all listeners to varying events (DOM,\n * Performance Observer, Recording, Sentry SDK, etc)\n */\n _initializeRecording() {\n this.setInitialState();\n\n // this method is generally called on page load or manually - in both cases\n // we should treat it as an activity\n this._updateSessionActivity();\n\n this.eventBuffer = createEventBuffer({\n useCompression: this._options.useCompression,\n workerUrl: this._options.workerUrl,\n });\n\n this._removeListeners();\n this._addListeners();\n\n // Need to set as enabled before we start recording, as `record()` can trigger a flush with a new checkout\n this._isEnabled = true;\n this._isPaused = false;\n\n this.startRecording();\n }\n\n /**\n * Loads (or refreshes) the current session.\n */\n _initializeSessionForSampling(previousSessionId) {\n // Whenever there is _any_ error sample rate, we always allow buffering\n // Because we decide on sampling when an error occurs, we need to buffer at all times if sampling for errors\n const allowBuffering = this._options.errorSampleRate > 0;\n\n const session = loadOrCreateSession(\n {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n previousSessionId,\n },\n {\n stickySession: this._options.stickySession,\n sessionSampleRate: this._options.sessionSampleRate,\n allowBuffering,\n },\n );\n\n this.session = session;\n }\n\n /**\n * Checks and potentially refreshes the current session.\n * Returns false if session is not recorded.\n */\n _checkSession() {\n // If there is no session yet, we do not want to refresh anything\n // This should generally not happen, but to be safe....\n if (!this.session) {\n return false;\n }\n\n const currentSession = this.session;\n\n if (\n shouldRefreshSession(currentSession, {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n })\n ) {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._refreshSession(currentSession);\n return false;\n }\n\n return true;\n }\n\n /**\n * Refresh a session with a new one.\n * This stops the current session (without forcing a flush, as that would never work since we are expired),\n * and then does a new sampling based on the refreshed session.\n */\n async _refreshSession(session) {\n if (!this._isEnabled) {\n return;\n }\n await this.stop({ reason: 'refresh session' });\n this.initializeSampling(session.id);\n }\n\n /**\n * Adds listeners to record events for the replay\n */\n _addListeners() {\n try {\n WINDOW.document.addEventListener('visibilitychange', this._handleVisibilityChange);\n WINDOW.addEventListener('blur', this._handleWindowBlur);\n WINDOW.addEventListener('focus', this._handleWindowFocus);\n WINDOW.addEventListener('keydown', this._handleKeyboardEvent);\n\n if (this.clickDetector) {\n this.clickDetector.addListeners();\n }\n\n // There is no way to remove these listeners, so ensure they are only added once\n if (!this._hasInitializedCoreListeners) {\n addGlobalListeners(this, { autoFlushOnFeedback: this._options._experiments.autoFlushOnFeedback });\n\n this._hasInitializedCoreListeners = true;\n }\n } catch (err) {\n this.handleException(err);\n }\n\n this._performanceCleanupCallback = setupPerformanceObserver(this);\n }\n\n /**\n * Cleans up listeners that were created in `_addListeners`\n */\n _removeListeners() {\n try {\n WINDOW.document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n\n WINDOW.removeEventListener('blur', this._handleWindowBlur);\n WINDOW.removeEventListener('focus', this._handleWindowFocus);\n WINDOW.removeEventListener('keydown', this._handleKeyboardEvent);\n\n if (this.clickDetector) {\n this.clickDetector.removeListeners();\n }\n\n if (this._performanceCleanupCallback) {\n this._performanceCleanupCallback();\n }\n } catch (err) {\n this.handleException(err);\n }\n }\n\n /**\n * Tasks to run when we consider a page to be hidden (via blurring and/or visibility)\n */\n _doChangeToBackgroundTasks(breadcrumb) {\n if (!this.session) {\n return;\n }\n\n const expired = isSessionExpired(this.session, {\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n });\n\n if (expired) {\n return;\n }\n\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\n }\n\n // Send replay when the page/tab becomes hidden. There is no reason to send\n // replay if it becomes visible, since no actions we care about were done\n // while it was hidden\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n void this.conditionalFlush();\n }\n\n /**\n * Tasks to run when we consider a page to be visible (via focus and/or visibility)\n */\n _doChangeToForegroundTasks(breadcrumb) {\n if (!this.session) {\n return;\n }\n\n const isSessionActive = this.checkAndHandleExpiredSession();\n\n if (!isSessionActive) {\n // If the user has come back to the page within SESSION_IDLE_PAUSE_DURATION\n // ms, we will re-use the existing session, otherwise create a new\n // session\n DEBUG_BUILD && logger.info('Document has become active, but session has expired');\n return;\n }\n\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\n }\n }\n\n /**\n * Update user activity (across session lifespans)\n */\n _updateUserActivity(_lastActivity = Date.now()) {\n this._lastActivity = _lastActivity;\n }\n\n /**\n * Updates the session's last activity timestamp\n */\n _updateSessionActivity(_lastActivity = Date.now()) {\n if (this.session) {\n this.session.lastActivity = _lastActivity;\n this._maybeSaveSession();\n }\n }\n\n /**\n * Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb\n */\n _createCustomBreadcrumb(breadcrumb) {\n this.addUpdate(() => {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.throttledAddEvent({\n type: EventType.Custom,\n timestamp: breadcrumb.timestamp || 0,\n data: {\n tag: 'breadcrumb',\n payload: breadcrumb,\n },\n });\n });\n }\n\n /**\n * Observed performance events are added to `this.performanceEntries`. These\n * are included in the replay event before it is finished and sent to Sentry.\n */\n _addPerformanceEntries() {\n let performanceEntries = createPerformanceEntries(this.performanceEntries).concat(this.replayPerformanceEntries);\n\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n\n // If we are manually starting, we want to ensure we only include performance entries\n // that are after the initial timestamp\n // The reason for this is that we may have performance entries from the page load, but may decide to start\n // the replay later on, in which case we do not want to include these entries.\n // without this, manually started replays can have events long before the actual replay recording starts,\n // which messes with the timeline etc.\n if (this._requiresManualStart) {\n const initialTimestampInSeconds = this._context.initialTimestamp / 1000;\n performanceEntries = performanceEntries.filter(entry => entry.start >= initialTimestampInSeconds);\n }\n\n return Promise.all(createPerformanceSpans(this, performanceEntries));\n }\n\n /**\n * Clear _context\n */\n _clearContext() {\n // XXX: `initialTimestamp` and `initialUrl` do not get cleared\n this._context.errorIds.clear();\n this._context.traceIds.clear();\n this._context.urls = [];\n }\n\n /** Update the initial timestamp based on the buffer content. */\n _updateInitialTimestampFromEventBuffer() {\n const { session, eventBuffer } = this;\n // If replay was started manually (=no sample rate was given),\n // We do not want to back-port the initial timestamp\n if (!session || !eventBuffer || this._requiresManualStart) {\n return;\n }\n\n // we only ever update this on the initial segment\n if (session.segmentId) {\n return;\n }\n\n const earliestEvent = eventBuffer.getEarliestTimestamp();\n if (earliestEvent && earliestEvent < this._context.initialTimestamp) {\n this._context.initialTimestamp = earliestEvent;\n }\n }\n\n /**\n * Return and clear _context\n */\n _popEventContext() {\n const _context = {\n initialTimestamp: this._context.initialTimestamp,\n initialUrl: this._context.initialUrl,\n errorIds: Array.from(this._context.errorIds),\n traceIds: Array.from(this._context.traceIds),\n urls: this._context.urls,\n };\n\n this._clearContext();\n\n return _context;\n }\n\n /**\n * Flushes replay event buffer to Sentry.\n *\n * Performance events are only added right before flushing - this is\n * due to the buffered performance observer events.\n *\n * Should never be called directly, only by `flush`\n */\n async _runFlush() {\n const replayId = this.getSessionId();\n\n if (!this.session || !this.eventBuffer || !replayId) {\n DEBUG_BUILD && logger.error('No session or eventBuffer found to flush.');\n return;\n }\n\n await this._addPerformanceEntries();\n\n // Check eventBuffer again, as it could have been stopped in the meanwhile\n if (!this.eventBuffer?.hasEvents) {\n return;\n }\n\n // Only attach memory event if eventBuffer is not empty\n await addMemoryEntry(this);\n\n // Check eventBuffer again, as it could have been stopped in the meanwhile\n if (!this.eventBuffer) {\n return;\n }\n\n // if this changed in the meanwhile, e.g. because the session was refreshed or similar, we abort here\n if (replayId !== this.getSessionId()) {\n return;\n }\n\n try {\n // This uses the data from the eventBuffer, so we need to call this before `finish()\n this._updateInitialTimestampFromEventBuffer();\n\n const timestamp = Date.now();\n\n // Check total duration again, to avoid sending outdated stuff\n // We leave 30s wiggle room to accommodate late flushing etc.\n // This _could_ happen when the browser is suspended during flushing, in which case we just want to stop\n if (timestamp - this._context.initialTimestamp > this._options.maxReplayDuration + 30000) {\n throw new Error('Session is too long, not sending replay');\n }\n\n const eventContext = this._popEventContext();\n // Always increment segmentId regardless of outcome of sending replay\n const segmentId = this.session.segmentId++;\n this._maybeSaveSession();\n\n // Note this empties the event buffer regardless of outcome of sending replay\n const recordingData = await this.eventBuffer.finish();\n\n await sendReplay({\n replayId,\n recordingData,\n segmentId,\n eventContext,\n session: this.session,\n timestamp,\n onError: err => this.handleException(err),\n });\n } catch (err) {\n this.handleException(err);\n\n // This means we retried 3 times and all of them failed,\n // or we ran into a problem we don't want to retry, like rate limiting.\n // In this case, we want to completely stop the replay - otherwise, we may get inconsistent segments\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.stop({ reason: 'sendReplay' });\n\n const client = getClient();\n\n if (client) {\n const dropReason = err instanceof RateLimitError ? 'ratelimit_backoff' : 'send_error';\n client.recordDroppedEvent(dropReason, 'replay');\n }\n }\n }\n\n /**\n * Flush recording data to Sentry. Creates a lock so that only a single flush\n * can be active at a time. Do not call this directly.\n */\n async _flush({\n force = false,\n }\n\n = {}) {\n if (!this._isEnabled && !force) {\n // This can happen if e.g. the replay was stopped because of exceeding the retry limit\n return;\n }\n\n if (!this.checkAndHandleExpiredSession()) {\n DEBUG_BUILD && logger.error('Attempting to finish replay event after session expired.');\n return;\n }\n\n if (!this.session) {\n // should never happen, as we would have bailed out before\n return;\n }\n\n const start = this.session.started;\n const now = Date.now();\n const duration = now - start;\n\n // A flush is about to happen, cancel any queued flushes\n this._debouncedFlush.cancel();\n\n // If session is too short, or too long (allow some wiggle room over maxReplayDuration), do not send it\n // This _should_ not happen, but it may happen if flush is triggered due to a page activity change or similar\n const tooShort = duration < this._options.minReplayDuration;\n const tooLong = duration > this._options.maxReplayDuration + 5000;\n if (tooShort || tooLong) {\n DEBUG_BUILD &&\n logger.info(\n `Session duration (${Math.floor(duration / 1000)}s) is too ${\n tooShort ? 'short' : 'long'\n }, not sending replay.`,\n );\n\n if (tooShort) {\n this._debouncedFlush();\n }\n return;\n }\n\n const eventBuffer = this.eventBuffer;\n if (eventBuffer && this.session.segmentId === 0 && !eventBuffer.hasCheckout) {\n DEBUG_BUILD && logger.info('Flushing initial segment without checkout.');\n // TODO FN: Evaluate if we want to stop here, or remove this again?\n }\n\n const _flushInProgress = !!this._flushLock;\n\n // this._flushLock acts as a lock so that future calls to `_flush()` will\n // be blocked until current flush is finished (i.e. this promise resolves)\n if (!this._flushLock) {\n this._flushLock = this._runFlush();\n }\n\n try {\n await this._flushLock;\n } catch (err) {\n this.handleException(err);\n } finally {\n this._flushLock = undefined;\n\n if (_flushInProgress) {\n // Wait for previous flush to finish, then call the debounced\n // `_flush()`. It's possible there are other flush requests queued and\n // waiting for it to resolve. We want to reduce all outstanding\n // requests (as well as any new flush requests that occur within a\n // second of the locked flush completing) into a single flush.\n this._debouncedFlush();\n }\n }\n }\n\n /** Save the session, if it is sticky */\n _maybeSaveSession() {\n if (this.session && this._options.stickySession) {\n saveSession(this.session);\n }\n }\n\n /** Handler for rrweb.record.onMutation */\n _onMutationHandler(mutations) {\n const count = mutations.length;\n\n const mutationLimit = this._options.mutationLimit;\n const mutationBreadcrumbLimit = this._options.mutationBreadcrumbLimit;\n const overMutationLimit = mutationLimit && count > mutationLimit;\n\n // Create a breadcrumb if a lot of mutations happen at the same time\n // We can show this in the UI as an information with potential performance improvements\n if (count > mutationBreadcrumbLimit || overMutationLimit) {\n const breadcrumb = createBreadcrumb({\n category: 'replay.mutations',\n data: {\n count,\n limit: overMutationLimit,\n },\n });\n this._createCustomBreadcrumb(breadcrumb);\n }\n\n // Stop replay if over the mutation limit\n if (overMutationLimit) {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.stop({ reason: 'mutationLimit', forceFlush: this.recordingMode === 'session' });\n return false;\n }\n\n // `true` means we use the regular mutation handling by rrweb\n return true;\n }\n}\n\nfunction getOption(selectors, defaultSelectors) {\n return [\n ...selectors,\n // sentry defaults\n ...defaultSelectors,\n ].join(',');\n}\n\n/**\n * Returns privacy related configuration for use in rrweb\n */\nfunction getPrivacyOptions({ mask, unmask, block, unblock, ignore }) {\n const defaultBlockedElements = ['base', 'iframe[srcdoc]:not([src])'];\n\n const maskSelector = getOption(mask, ['.sentry-mask', '[data-sentry-mask]']);\n const unmaskSelector = getOption(unmask, []);\n\n const options = {\n // We are making the decision to make text and input selectors the same\n maskTextSelector: maskSelector,\n unmaskTextSelector: unmaskSelector,\n\n blockSelector: getOption(block, ['.sentry-block', '[data-sentry-block]', ...defaultBlockedElements]),\n unblockSelector: getOption(unblock, []),\n ignoreSelector: getOption(ignore, ['.sentry-ignore', '[data-sentry-ignore]', 'input[type=\"file\"]']),\n };\n\n return options;\n}\n\n/**\n * Masks an attribute if necessary, otherwise return attribute value as-is.\n */\nfunction maskAttribute({\n el,\n key,\n maskAttributes,\n maskAllText,\n privacyOptions,\n value,\n}) {\n // We only mask attributes if `maskAllText` is true\n if (!maskAllText) {\n return value;\n }\n\n // unmaskTextSelector takes precedence\n if (privacyOptions.unmaskTextSelector && el.matches(privacyOptions.unmaskTextSelector)) {\n return value;\n }\n\n if (\n maskAttributes.includes(key) ||\n // Need to mask `value` attribute for `` if it's a button-like\n // type\n (key === 'value' && el.tagName === 'INPUT' && ['submit', 'button'].includes(el.getAttribute('type') || ''))\n ) {\n return value.replace(/[\\S]/g, '*');\n }\n\n return value;\n}\n\nconst MEDIA_SELECTORS =\n 'img,image,svg,video,object,picture,embed,map,audio,link[rel=\"icon\"],link[rel=\"apple-touch-icon\"]';\n\nconst DEFAULT_NETWORK_HEADERS = ['content-length', 'content-type', 'accept'];\n\nlet _initialized = false;\n\n/**\n * Sentry integration for [Session Replay](https://sentry.io/for/session-replay/).\n *\n * See the [Replay documentation](https://docs.sentry.io/platforms/javascript/guides/session-replay/) for more information.\n *\n * @example\n *\n * ```\n * Sentry.init({\n * dsn: '__DSN__',\n * integrations: [Sentry.replayIntegration()],\n * });\n * ```\n */\nconst replayIntegration = ((options) => {\n return new Replay(options);\n}) ;\n\n/**\n * Replay integration\n */\nclass Replay {\n /**\n * @inheritDoc\n */\n\n /**\n * Options to pass to `rrweb.record()`\n */\n\n /**\n * Initial options passed to the replay integration, merged with default values.\n * Note: `sessionSampleRate` and `errorSampleRate` are not required here, as they\n * can only be finally set when setupOnce() is called.\n *\n * @private\n */\n\n constructor({\n flushMinDelay = DEFAULT_FLUSH_MIN_DELAY,\n flushMaxDelay = DEFAULT_FLUSH_MAX_DELAY,\n minReplayDuration = MIN_REPLAY_DURATION,\n maxReplayDuration = MAX_REPLAY_DURATION,\n stickySession = true,\n useCompression = true,\n workerUrl,\n _experiments = {},\n maskAllText = true,\n maskAllInputs = true,\n blockAllMedia = true,\n\n mutationBreadcrumbLimit = 750,\n mutationLimit = 10000,\n\n slowClickTimeout = 7000,\n slowClickIgnoreSelectors = [],\n\n networkDetailAllowUrls = [],\n networkDetailDenyUrls = [],\n networkCaptureBodies = true,\n networkRequestHeaders = [],\n networkResponseHeaders = [],\n\n mask = [],\n maskAttributes = ['title', 'placeholder'],\n unmask = [],\n block = [],\n unblock = [],\n ignore = [],\n maskFn,\n\n beforeAddRecordingEvent,\n beforeErrorSampling,\n onError,\n } = {}) {\n this.name = 'Replay';\n\n const privacyOptions = getPrivacyOptions({\n mask,\n unmask,\n block,\n unblock,\n ignore,\n });\n\n this._recordingOptions = {\n maskAllInputs,\n maskAllText,\n maskInputOptions: { password: true },\n maskTextFn: maskFn,\n maskInputFn: maskFn,\n maskAttributeFn: (key, value, el) =>\n maskAttribute({\n maskAttributes,\n maskAllText,\n privacyOptions,\n key,\n value,\n el,\n }),\n\n ...privacyOptions,\n\n // Our defaults\n slimDOMOptions: 'all',\n inlineStylesheet: true,\n // Disable inline images as it will increase segment/replay size\n inlineImages: false,\n // collect fonts, but be aware that `sentry.io` needs to be an allowed\n // origin for playback\n collectFonts: true,\n errorHandler: (err) => {\n try {\n err.__rrweb__ = true;\n } catch (error) {\n // ignore errors here\n // this can happen if the error is frozen or does not allow mutation for other reasons\n }\n },\n // experimental support for recording iframes from different origins\n recordCrossOriginIframes: Boolean(_experiments.recordCrossOriginIframes),\n };\n\n this._initialOptions = {\n flushMinDelay,\n flushMaxDelay,\n minReplayDuration: Math.min(minReplayDuration, MIN_REPLAY_DURATION_LIMIT),\n maxReplayDuration: Math.min(maxReplayDuration, MAX_REPLAY_DURATION),\n stickySession,\n useCompression,\n workerUrl,\n blockAllMedia,\n maskAllInputs,\n maskAllText,\n mutationBreadcrumbLimit,\n mutationLimit,\n slowClickTimeout,\n slowClickIgnoreSelectors,\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders: _getMergedNetworkHeaders(networkRequestHeaders),\n networkResponseHeaders: _getMergedNetworkHeaders(networkResponseHeaders),\n beforeAddRecordingEvent,\n beforeErrorSampling,\n onError,\n\n _experiments,\n };\n\n if (this._initialOptions.blockAllMedia) {\n // `blockAllMedia` is a more user friendly option to configure blocking\n // embedded media elements\n this._recordingOptions.blockSelector = !this._recordingOptions.blockSelector\n ? MEDIA_SELECTORS\n : `${this._recordingOptions.blockSelector},${MEDIA_SELECTORS}`;\n }\n\n if (this._isInitialized && isBrowser()) {\n throw new Error('Multiple Sentry Session Replay instances are not supported');\n }\n\n this._isInitialized = true;\n }\n\n /** If replay has already been initialized */\n get _isInitialized() {\n return _initialized;\n }\n\n /** Update _isInitialized */\n set _isInitialized(value) {\n _initialized = value;\n }\n\n /**\n * Setup and initialize replay container\n */\n afterAllSetup(client) {\n if (!isBrowser() || this._replay) {\n return;\n }\n\n this._setup(client);\n this._initialize(client);\n }\n\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will log a message if replay is already in progress.\n *\n * Creates or loads a session, attaches listeners to varying events (DOM,\n * PerformanceObserver, Recording, Sentry SDK, etc)\n */\n start() {\n if (!this._replay) {\n return;\n }\n this._replay.start();\n }\n\n /**\n * Start replay buffering. Buffers until `flush()` is called or, if\n * `replaysOnErrorSampleRate` > 0, until an error occurs.\n */\n startBuffering() {\n if (!this._replay) {\n return;\n }\n\n this._replay.startBuffering();\n }\n\n /**\n * Currently, this needs to be manually called (e.g. for tests). Sentry SDK\n * does not support a teardown\n */\n stop() {\n if (!this._replay) {\n return Promise.resolve();\n }\n\n return this._replay.stop({ forceFlush: this._replay.recordingMode === 'session' });\n }\n\n /**\n * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n * If replay is not enabled, a new session replay is started.\n * Unless `continueRecording` is false, the replay will continue to record and\n * behave as a \"session\"-based replay.\n *\n * Otherwise, queue up a flush.\n */\n flush(options) {\n if (!this._replay) {\n return Promise.resolve();\n }\n\n // assuming a session should be recorded in this case\n if (!this._replay.isEnabled()) {\n this._replay.start();\n return Promise.resolve();\n }\n\n return this._replay.sendBufferedReplayOrFlush(options);\n }\n\n /**\n * Get the current session ID.\n */\n getReplayId() {\n if (!this._replay?.isEnabled()) {\n return;\n }\n\n return this._replay.getSessionId();\n }\n\n /**\n * Get the current recording mode. This can be either `session` or `buffer`.\n *\n * `session`: Recording the whole session, sending it continuously\n * `buffer`: Always keeping the last 60s of recording, requires:\n * - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs\n * - or calling `flush()` to send the replay\n */\n getRecordingMode() {\n if (!this._replay?.isEnabled()) {\n return;\n }\n\n return this._replay.recordingMode;\n }\n\n /**\n * Initializes replay.\n */\n _initialize(client) {\n if (!this._replay) {\n return;\n }\n\n this._maybeLoadFromReplayCanvasIntegration(client);\n this._replay.initializeSampling();\n }\n\n /** Setup the integration. */\n _setup(client) {\n // Client is not available in constructor, so we need to wait until setupOnce\n const finalOptions = loadReplayOptionsFromClient(this._initialOptions, client);\n\n this._replay = new ReplayContainer({\n options: finalOptions,\n recordingOptions: this._recordingOptions,\n });\n }\n\n /** Get canvas options from ReplayCanvas integration, if it is also added. */\n _maybeLoadFromReplayCanvasIntegration(client) {\n // To save bundle size, we skip checking for stuff here\n // and instead just try-catch everything - as generally this should all be defined\n /* eslint-disable @typescript-eslint/no-non-null-assertion */\n try {\n const canvasIntegration = client.getIntegrationByName('ReplayCanvas')\n\n;\n if (!canvasIntegration) {\n return;\n }\n\n this._replay['_canvas'] = canvasIntegration.getOptions();\n } catch {\n // ignore errors here\n }\n /* eslint-enable @typescript-eslint/no-non-null-assertion */\n }\n}\n\n/** Parse Replay-related options from SDK options */\nfunction loadReplayOptionsFromClient(initialOptions, client) {\n const opt = client.getOptions() ;\n\n const finalOptions = {\n sessionSampleRate: 0,\n errorSampleRate: 0,\n ...dropUndefinedKeys(initialOptions),\n };\n\n const replaysSessionSampleRate = parseSampleRate(opt.replaysSessionSampleRate);\n const replaysOnErrorSampleRate = parseSampleRate(opt.replaysOnErrorSampleRate);\n\n if (replaysSessionSampleRate == null && replaysOnErrorSampleRate == null) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n 'Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.',\n );\n });\n }\n\n if (replaysSessionSampleRate != null) {\n finalOptions.sessionSampleRate = replaysSessionSampleRate;\n }\n\n if (replaysOnErrorSampleRate != null) {\n finalOptions.errorSampleRate = replaysOnErrorSampleRate;\n }\n\n return finalOptions;\n}\n\nfunction _getMergedNetworkHeaders(headers) {\n return [...DEFAULT_NETWORK_HEADERS, ...headers.map(header => header.toLowerCase())];\n}\n\n/**\n * This is a small utility to get a type-safe instance of the Replay integration.\n */\nfunction getReplay() {\n const client = getClient();\n return client?.getIntegrationByName('Replay');\n}\n\nexport { getReplay, replayIntegration };\n//# sourceMappingURL=index.js.map\n","import { defineIntegration } from '@sentry/core';\n\nvar __defProp$1 = Object.defineProperty;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nclass Mirror {\n constructor() {\n __publicField$1(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n __publicField$1(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n }\n getId(n2) {\n if (!n2) return -1;\n const id = this.getMeta(n2)?.id;\n return id ?? -1;\n }\n getNode(id) {\n return this.idNodeMap.get(id) || null;\n }\n getIds() {\n return Array.from(this.idNodeMap.keys());\n }\n getMeta(n2) {\n return this.nodeMetaMap.get(n2) || null;\n }\n // removes the node from idNodeMap\n // doesn't remove the node from nodeMetaMap\n removeNodeFromMap(n2) {\n const id = this.getId(n2);\n this.idNodeMap.delete(id);\n if (n2.childNodes) {\n n2.childNodes.forEach(\n (childNode) => this.removeNodeFromMap(childNode)\n );\n }\n }\n has(id) {\n return this.idNodeMap.has(id);\n }\n hasNode(node) {\n return this.nodeMetaMap.has(node);\n }\n add(n2, meta) {\n const id = meta.id;\n this.idNodeMap.set(id, n2);\n this.nodeMetaMap.set(n2, meta);\n }\n replace(id, n2) {\n const oldNode = this.getNode(id);\n if (oldNode) {\n const meta = this.nodeMetaMap.get(oldNode);\n if (meta) this.nodeMetaMap.set(n2, meta);\n }\n this.idNodeMap.set(id, n2);\n }\n reset() {\n this.idNodeMap = /* @__PURE__ */ new Map();\n this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n }\n}\nfunction createMirror$2() {\n return new Mirror();\n}\nfunction elementClassMatchesRegex(el, regex) {\n for (let eIndex = el.classList.length; eIndex--; ) {\n const className = el.classList[eIndex];\n if (regex.test(className)) {\n return true;\n }\n }\n return false;\n}\nfunction distanceToMatch(node, matchPredicate, limit = Infinity, distance = 0) {\n if (!node) return -1;\n if (node.nodeType !== node.ELEMENT_NODE) return -1;\n if (distance > limit) return -1;\n if (matchPredicate(node)) return distance;\n return distanceToMatch(node.parentNode, matchPredicate, limit, distance + 1);\n}\nfunction createMatchPredicate(className, selector) {\n return (node) => {\n const el = node;\n if (el === null) return false;\n try {\n if (className) {\n if (typeof className === \"string\") {\n if (el.matches(`.${className}`)) return true;\n } else if (elementClassMatchesRegex(el, className)) {\n return true;\n }\n }\n if (selector && el.matches(selector)) return true;\n return false;\n } catch {\n return false;\n }\n };\n}\nconst DEPARTED_MIRROR_ACCESS_WARNING = \"Please stop import mirror directly. Instead of that,\\r\\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\\r\\nor you can use record.mirror to access the mirror instance during recording.\";\nlet _mirror = {\n map: {},\n getId() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return -1;\n },\n getNode() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return null;\n },\n removeNodeFromMap() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n },\n has() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return false;\n },\n reset() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n};\nif (typeof window !== \"undefined\" && window.Proxy && window.Reflect) {\n _mirror = new Proxy(_mirror, {\n get(target, prop, receiver) {\n if (prop === \"map\") {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n}\nfunction hookSetter(target, key, d, isRevoked, win = window) {\n const original = win.Object.getOwnPropertyDescriptor(target, key);\n win.Object.defineProperty(\n target,\n key,\n isRevoked ? d : {\n set(value) {\n setTimeout$1(() => {\n d.set.call(this, value);\n }, 0);\n if (original && original.set) {\n original.set.call(this, value);\n }\n }\n }\n );\n return () => hookSetter(target, key, original || {}, true);\n}\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return () => {\n };\n }\n const original = source[name];\n const wrapped = replacement(original);\n if (typeof wrapped === \"function\") {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __rrweb_original__: {\n enumerable: false,\n value: original\n }\n });\n }\n source[name] = wrapped;\n return () => {\n source[name] = original;\n };\n } catch {\n return () => {\n };\n }\n}\nif (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) ;\nfunction closestElementOfNode(node) {\n if (!node) {\n return null;\n }\n const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n return el;\n}\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n if (!node) {\n return false;\n }\n const el = closestElementOfNode(node);\n if (!el) {\n return false;\n }\n const blockedPredicate = createMatchPredicate(blockClass, blockSelector);\n if (!checkAncestors) {\n const isUnblocked = unblockSelector && el.matches(unblockSelector);\n return blockedPredicate(el) && !isUnblocked;\n }\n const blockDistance = distanceToMatch(el, blockedPredicate);\n let unblockDistance = -1;\n if (blockDistance < 0) {\n return false;\n }\n if (unblockSelector) {\n unblockDistance = distanceToMatch(\n el,\n createMatchPredicate(null, unblockSelector)\n );\n }\n if (blockDistance > -1 && unblockDistance < 0) {\n return true;\n }\n return blockDistance < unblockDistance;\n}\nconst cachedImplementations = {};\nfunction getImplementation(name) {\n const cached = cachedImplementations[name];\n if (cached) {\n return cached;\n }\n const document2 = window.document;\n let impl = window[name];\n if (document2 && typeof document2.createElement === \"function\") {\n try {\n const sandbox = document2.createElement(\"iframe\");\n sandbox.hidden = true;\n document2.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow[name]) {\n impl = // eslint-disable-next-line @typescript-eslint/unbound-method\n contentWindow[name];\n }\n document2.head.removeChild(sandbox);\n } catch (e2) {\n }\n }\n return cachedImplementations[name] = impl.bind(\n window\n );\n}\nfunction onRequestAnimationFrame(...rest) {\n return getImplementation(\"requestAnimationFrame\")(...rest);\n}\nfunction setTimeout$1(...rest) {\n return getImplementation(\"setTimeout\")(...rest);\n}\nvar CanvasContext = /* @__PURE__ */ ((CanvasContext2) => {\n CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n return CanvasContext2;\n})(CanvasContext || {});\nlet errorHandler;\nfunction registerErrorHandler(handler) {\n errorHandler = handler;\n}\nconst callbackWrapper = (cb) => {\n if (!errorHandler) {\n return cb;\n }\n const rrwebWrapped = (...rest) => {\n try {\n return cb(...rest);\n } catch (error) {\n if (errorHandler && errorHandler(error) === true) {\n return () => {\n };\n }\n throw error;\n }\n };\n return rrwebWrapped;\n};\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar lookup = typeof Uint8Array === \"undefined\" ? [] : new Uint8Array(256);\nfor (var i$1 = 0; i$1 < chars.length; i$1++) {\n lookup[chars.charCodeAt(i$1)] = i$1;\n}\nvar encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = \"\";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + \"=\";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + \"==\";\n }\n return base64;\n};\nconst canvasVarMap = /* @__PURE__ */ new Map();\nfunction variableListFor$1(ctx, ctor) {\n let contextMap = canvasVarMap.get(ctx);\n if (!contextMap) {\n contextMap = /* @__PURE__ */ new Map();\n canvasVarMap.set(ctx, contextMap);\n }\n if (!contextMap.has(ctor)) {\n contextMap.set(ctor, []);\n }\n return contextMap.get(ctor);\n}\nconst saveWebGLVar = (value, win, ctx) => {\n if (!value || !(isInstanceOfWebGLObject(value, win) || typeof value === \"object\"))\n return;\n const name = value.constructor.name;\n const list = variableListFor$1(ctx, name);\n let index = list.indexOf(value);\n if (index === -1) {\n index = list.length;\n list.push(value);\n }\n return index;\n};\nfunction serializeArg(value, win, ctx) {\n if (value instanceof Array) {\n return value.map((arg) => serializeArg(arg, win, ctx));\n } else if (value === null) {\n return value;\n } else if (value instanceof Float32Array || value instanceof Float64Array || value instanceof Int32Array || value instanceof Uint32Array || value instanceof Uint8Array || value instanceof Uint16Array || value instanceof Int16Array || value instanceof Int8Array || value instanceof Uint8ClampedArray) {\n const name = value.constructor.name;\n return {\n rr_type: name,\n args: [Object.values(value)]\n };\n } else if (\n // SharedArrayBuffer disabled on most browsers due to spectre.\n // More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/SharedArrayBuffer\n // value instanceof SharedArrayBuffer ||\n value instanceof ArrayBuffer\n ) {\n const name = value.constructor.name;\n const base64 = encode(value);\n return {\n rr_type: name,\n base64\n };\n } else if (value instanceof DataView) {\n const name = value.constructor.name;\n return {\n rr_type: name,\n args: [\n serializeArg(value.buffer, win, ctx),\n value.byteOffset,\n value.byteLength\n ]\n };\n } else if (value instanceof HTMLImageElement) {\n const name = value.constructor.name;\n const { src } = value;\n return {\n rr_type: name,\n src\n };\n } else if (value instanceof HTMLCanvasElement) {\n const name = \"HTMLImageElement\";\n const src = value.toDataURL();\n return {\n rr_type: name,\n src\n };\n } else if (value instanceof ImageData) {\n const name = value.constructor.name;\n return {\n rr_type: name,\n args: [serializeArg(value.data, win, ctx), value.width, value.height]\n };\n } else if (isInstanceOfWebGLObject(value, win) || typeof value === \"object\") {\n const name = value.constructor.name;\n const index = saveWebGLVar(value, win, ctx);\n return {\n rr_type: name,\n index\n };\n }\n return value;\n}\nconst serializeArgs = (args, win, ctx) => {\n return args.map((arg) => serializeArg(arg, win, ctx));\n};\nconst isInstanceOfWebGLObject = (value, win) => {\n const webGLConstructorNames = [\n \"WebGLActiveInfo\",\n \"WebGLBuffer\",\n \"WebGLFramebuffer\",\n \"WebGLProgram\",\n \"WebGLRenderbuffer\",\n \"WebGLShader\",\n \"WebGLShaderPrecisionFormat\",\n \"WebGLTexture\",\n \"WebGLUniformLocation\",\n \"WebGLVertexArrayObject\",\n // In old Chrome versions, value won't be an instanceof WebGLVertexArrayObject.\n \"WebGLVertexArrayObjectOES\"\n ];\n const supportedWebGLConstructorNames = webGLConstructorNames.filter(\n (name) => typeof win[name] === \"function\"\n );\n return Boolean(\n supportedWebGLConstructorNames.find(\n (name) => value instanceof win[name]\n )\n );\n};\nfunction initCanvas2DMutationObserver(cb, win, blockClass2, blockSelector, unblockSelector) {\n const handlers = [];\n const props2D = Object.getOwnPropertyNames(\n win.CanvasRenderingContext2D.prototype\n );\n for (const prop of props2D) {\n try {\n if (typeof win.CanvasRenderingContext2D.prototype[prop] !== \"function\") {\n continue;\n }\n const restoreHandler = patch(\n win.CanvasRenderingContext2D.prototype,\n prop,\n function(original) {\n return function(...args) {\n if (!isBlocked(\n this.canvas,\n blockClass2,\n blockSelector,\n unblockSelector,\n true\n )) {\n setTimeout$1(() => {\n const recordArgs = serializeArgs(args, win, this);\n cb(this.canvas, {\n type: CanvasContext[\"2D\"],\n property: prop,\n args: recordArgs\n });\n }, 0);\n }\n return original.apply(this, args);\n };\n }\n );\n handlers.push(restoreHandler);\n } catch {\n const hookHandler = hookSetter(\n win.CanvasRenderingContext2D.prototype,\n prop,\n {\n set(v2) {\n cb(this.canvas, {\n type: CanvasContext[\"2D\"],\n property: prop,\n args: [v2],\n setter: true\n });\n }\n }\n );\n handlers.push(hookHandler);\n }\n }\n return () => {\n handlers.forEach((h) => h());\n };\n}\nfunction getNormalizedContextName(contextType) {\n return contextType === \"experimental-webgl\" ? \"webgl\" : contextType;\n}\nfunction initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, setPreserveDrawingBufferToTrue) {\n const handlers = [];\n try {\n const restoreHandler = patch(\n win.HTMLCanvasElement.prototype,\n \"getContext\",\n function(original) {\n return function(contextType, ...args) {\n if (!isBlocked(this, blockClass, blockSelector, unblockSelector, true)) {\n const ctxName = getNormalizedContextName(contextType);\n if (!(\"__context\" in this)) this.__context = ctxName;\n if (setPreserveDrawingBufferToTrue && [\"webgl\", \"webgl2\"].includes(ctxName)) {\n if (args[0] && typeof args[0] === \"object\") {\n const contextAttributes = args[0];\n if (!contextAttributes.preserveDrawingBuffer) {\n contextAttributes.preserveDrawingBuffer = true;\n }\n } else {\n args.splice(0, 1, {\n preserveDrawingBuffer: true\n });\n }\n }\n }\n return original.apply(this, [contextType, ...args]);\n };\n }\n );\n handlers.push(restoreHandler);\n } catch {\n console.error(\"failed to patch HTMLCanvasElement.prototype.getContext\");\n }\n return () => {\n handlers.forEach((h) => h());\n };\n}\nfunction patchGLPrototype(prototype, type, cb, blockClass2, blockSelector, unblockSelector, _mirror2, win) {\n const handlers = [];\n const props = Object.getOwnPropertyNames(prototype);\n for (const prop of props) {\n if (\n //prop.startsWith('get') || // e.g. getProgramParameter, but too risky\n [\n \"isContextLost\",\n \"canvas\",\n \"drawingBufferWidth\",\n \"drawingBufferHeight\"\n ].includes(prop)\n ) {\n continue;\n }\n try {\n if (typeof prototype[prop] !== \"function\") {\n continue;\n }\n const restoreHandler = patch(\n prototype,\n prop,\n function(original) {\n return function(...args) {\n const result = original.apply(this, args);\n saveWebGLVar(result, win, this);\n if (\"tagName\" in this.canvas && !isBlocked(\n this.canvas,\n blockClass2,\n blockSelector,\n unblockSelector,\n true\n )) {\n const recordArgs = serializeArgs(args, win, this);\n const mutation = {\n type,\n property: prop,\n args: recordArgs\n };\n cb(this.canvas, mutation);\n }\n return result;\n };\n }\n );\n handlers.push(restoreHandler);\n } catch {\n const hookHandler = hookSetter(prototype, prop, {\n set(v2) {\n cb(this.canvas, {\n type,\n property: prop,\n args: [v2],\n setter: true\n });\n }\n });\n handlers.push(hookHandler);\n }\n }\n return handlers;\n}\nfunction initCanvasWebGLMutationObserver(cb, win, blockClass2, blockSelector, unblockSelector, mirror2) {\n const handlers = [];\n handlers.push(\n ...patchGLPrototype(\n win.WebGLRenderingContext.prototype,\n CanvasContext.WebGL,\n cb,\n blockClass2,\n blockSelector,\n unblockSelector,\n mirror2,\n win\n )\n );\n if (typeof win.WebGL2RenderingContext !== \"undefined\") {\n handlers.push(\n ...patchGLPrototype(\n win.WebGL2RenderingContext.prototype,\n CanvasContext.WebGL2,\n cb,\n blockClass2,\n blockSelector,\n unblockSelector,\n mirror2,\n win\n )\n );\n }\n return () => {\n handlers.forEach((h) => h());\n };\n}\nconst r$1 = `for(var e=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",t=\"undefined\"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s=\"\";for(a=0;a>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+\"=\":r%3==1&&(s=s.substring(0,s.length-2)+\"==\"),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!(\"OffscreenCanvas\"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+\"-\"+t;if(\"OffscreenCanvas\"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext(\"2d\");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return\"\"}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext(\"bitmaprenderer\"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:\"low\"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};`;\nfunction t$1() {\n const t2 = new Blob([r$1]);\n return URL.createObjectURL(t2);\n}\nclass CanvasManager {\n constructor(options) {\n this.pendingCanvasMutations = /* @__PURE__ */ new Map();\n this.rafStamps = { latestId: 0, invokeId: null };\n this.shadowDoms = /* @__PURE__ */ new Set();\n this.windowsSet = /* @__PURE__ */ new WeakSet();\n this.windows = [];\n this.restoreHandlers = [];\n this.frozen = false;\n this.locked = false;\n this.snapshotInProgressMap = /* @__PURE__ */ new Map();\n this.worker = null;\n this.lastSnapshotTime = 0;\n this.processMutation = (target, mutation) => {\n const newFrame = this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId;\n if (newFrame || !this.rafStamps.invokeId)\n this.rafStamps.invokeId = this.rafStamps.latestId;\n if (!this.pendingCanvasMutations.has(target)) {\n this.pendingCanvasMutations.set(target, []);\n }\n this.pendingCanvasMutations.get(target).push(mutation);\n };\n const {\n sampling = \"all\",\n win,\n blockClass,\n blockSelector,\n unblockSelector,\n maxCanvasSize,\n recordCanvas,\n dataURLOptions,\n errorHandler: errorHandler2\n } = options;\n this.mutationCb = options.mutationCb;\n this.mirror = options.mirror;\n this.options = options;\n if (errorHandler2) {\n registerErrorHandler(errorHandler2);\n }\n if (recordCanvas && typeof sampling === \"number\" || options.enableManualSnapshot) {\n this.worker = this.initFPSWorker();\n }\n this.addWindow(win);\n if (options.enableManualSnapshot) {\n return;\n }\n callbackWrapper(() => {\n if (recordCanvas && sampling === \"all\") {\n this.startRAFTimestamping();\n this.startPendingCanvasMutationFlusher();\n }\n if (recordCanvas && typeof sampling === \"number\") {\n this.initCanvasFPSObserver(\n sampling,\n blockClass,\n blockSelector,\n unblockSelector,\n maxCanvasSize,\n {\n dataURLOptions\n }\n );\n }\n })();\n }\n reset() {\n this.pendingCanvasMutations.clear();\n this.restoreHandlers.forEach((handler) => {\n try {\n handler();\n } catch (e2) {\n }\n });\n this.restoreHandlers = [];\n this.windowsSet = /* @__PURE__ */ new WeakSet();\n this.windows = [];\n this.shadowDoms = /* @__PURE__ */ new Set();\n this.worker?.terminate();\n this.worker = null;\n this.snapshotInProgressMap = /* @__PURE__ */ new Map();\n }\n freeze() {\n this.frozen = true;\n }\n unfreeze() {\n this.frozen = false;\n }\n lock() {\n this.locked = true;\n }\n unlock() {\n this.locked = false;\n }\n addWindow(win) {\n const {\n sampling = \"all\",\n blockClass,\n blockSelector,\n unblockSelector,\n recordCanvas,\n enableManualSnapshot\n } = this.options;\n if (this.windowsSet.has(win)) return;\n if (enableManualSnapshot) {\n this.windowsSet.add(win);\n this.windows.push(new WeakRef(win));\n return;\n }\n callbackWrapper(() => {\n if (recordCanvas && sampling === \"all\") {\n this.initCanvasMutationObserver(\n win,\n blockClass,\n blockSelector,\n unblockSelector\n );\n }\n if (recordCanvas && typeof sampling === \"number\") {\n const canvasContextReset = initCanvasContextObserver(\n win,\n blockClass,\n blockSelector,\n unblockSelector,\n true\n );\n this.restoreHandlers.push(() => {\n canvasContextReset();\n });\n }\n })();\n this.windowsSet.add(win);\n this.windows.push(new WeakRef(win));\n }\n addShadowRoot(shadowRoot) {\n this.shadowDoms.add(new WeakRef(shadowRoot));\n }\n resetShadowRoots() {\n this.shadowDoms = /* @__PURE__ */ new Set();\n }\n initFPSWorker() {\n const worker = new Worker(t$1());\n worker.onmessage = (e2) => {\n const data = e2.data;\n const { id } = data;\n this.snapshotInProgressMap.set(id, false);\n if (!(\"base64\" in data)) return;\n const { base64, type, width, height } = data;\n this.mutationCb({\n id,\n type: CanvasContext[\"2D\"],\n commands: [\n {\n property: \"clearRect\",\n // wipe canvas\n args: [0, 0, width, height]\n },\n {\n property: \"drawImage\",\n // draws (semi-transparent) image\n args: [\n {\n rr_type: \"ImageBitmap\",\n args: [\n {\n rr_type: \"Blob\",\n data: [{ rr_type: \"ArrayBuffer\", base64 }],\n type\n }\n ]\n },\n 0,\n 0,\n // The below args are needed if we enforce a max size, we want to\n // retain the original size when drawing the image (which should be smaller)\n width,\n height\n ]\n }\n ]\n });\n };\n return worker;\n }\n initCanvasFPSObserver(fps, blockClass, blockSelector, unblockSelector, maxCanvasSize, options) {\n const rafId = this.takeSnapshot(\n false,\n fps,\n blockClass,\n blockSelector,\n unblockSelector,\n maxCanvasSize,\n options.dataURLOptions\n );\n this.restoreHandlers.push(() => {\n cancelAnimationFrame(rafId);\n });\n }\n initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector) {\n const canvasContextReset = initCanvasContextObserver(\n win,\n blockClass,\n blockSelector,\n unblockSelector,\n false\n );\n const canvas2DReset = initCanvas2DMutationObserver(\n this.processMutation.bind(this),\n win,\n blockClass,\n blockSelector,\n unblockSelector\n );\n const canvasWebGL1and2Reset = initCanvasWebGLMutationObserver(\n this.processMutation.bind(this),\n win,\n blockClass,\n blockSelector,\n unblockSelector,\n this.mirror\n );\n this.restoreHandlers.push(() => {\n canvasContextReset();\n canvas2DReset();\n canvasWebGL1and2Reset();\n });\n }\n snapshot(canvasElement) {\n const { options } = this;\n const rafId = this.takeSnapshot(\n true,\n options.sampling === \"all\" ? 2 : options.sampling || 2,\n options.blockClass,\n options.blockSelector,\n options.unblockSelector,\n options.maxCanvasSize,\n options.dataURLOptions,\n canvasElement\n );\n this.restoreHandlers.push(() => {\n cancelAnimationFrame(rafId);\n });\n }\n takeSnapshot(isManualSnapshot, fps, blockClass, blockSelector, unblockSelector, maxCanvasSize, dataURLOptions, canvasElement) {\n const timeBetweenSnapshots = 1e3 / fps;\n let rafId;\n const getCanvas = (canvasElement2) => {\n if (canvasElement2) {\n return [canvasElement2];\n }\n const matchedCanvas = [];\n const searchCanvas = (root) => {\n root.querySelectorAll(\"canvas\").forEach((canvas) => {\n if (!isBlocked(canvas, blockClass, blockSelector, unblockSelector, true)) {\n matchedCanvas.push(canvas);\n }\n });\n };\n for (const item of this.windows) {\n const window2 = item.deref();\n if (window2) {\n searchCanvas(window2.document);\n }\n }\n for (const item of this.shadowDoms) {\n const shadowRoot = item.deref();\n if (shadowRoot) {\n searchCanvas(shadowRoot);\n }\n }\n return matchedCanvas;\n };\n const takeCanvasSnapshots = (timestamp) => {\n if (!this.windows.length) {\n return;\n }\n if (this.lastSnapshotTime && timestamp - this.lastSnapshotTime < timeBetweenSnapshots) {\n rafId = onRequestAnimationFrame(takeCanvasSnapshots);\n return;\n }\n this.lastSnapshotTime = timestamp;\n getCanvas(canvasElement).forEach((canvas) => {\n if (!this.mirror.hasNode(canvas)) {\n return;\n }\n const id = this.mirror.getId(canvas);\n if (this.snapshotInProgressMap.get(id)) return;\n if (!canvas.width || !canvas.height) return;\n this.snapshotInProgressMap.set(id, true);\n if (!isManualSnapshot && [\"webgl\", \"webgl2\"].includes(canvas.__context)) {\n const context = canvas.getContext(canvas.__context);\n if (context?.getContextAttributes()?.preserveDrawingBuffer === false) {\n context.clear(context.COLOR_BUFFER_BIT);\n }\n }\n createImageBitmap(canvas).then((bitmap) => {\n this.worker?.postMessage(\n {\n id,\n bitmap,\n width: canvas.width,\n height: canvas.height,\n dataURLOptions,\n maxCanvasSize\n },\n [bitmap]\n );\n }).catch((error) => {\n callbackWrapper(() => {\n throw error;\n })();\n });\n });\n if (!isManualSnapshot) {\n rafId = onRequestAnimationFrame(takeCanvasSnapshots);\n }\n };\n rafId = onRequestAnimationFrame(takeCanvasSnapshots);\n return rafId;\n }\n startPendingCanvasMutationFlusher() {\n onRequestAnimationFrame(() => this.flushPendingCanvasMutations());\n }\n startRAFTimestamping() {\n const setLatestRAFTimestamp = (timestamp) => {\n this.rafStamps.latestId = timestamp;\n onRequestAnimationFrame(setLatestRAFTimestamp);\n };\n onRequestAnimationFrame(setLatestRAFTimestamp);\n }\n flushPendingCanvasMutations() {\n this.pendingCanvasMutations.forEach(\n (_values, canvas) => {\n const id = this.mirror.getId(canvas);\n this.flushPendingCanvasMutationFor(canvas, id);\n }\n );\n onRequestAnimationFrame(() => this.flushPendingCanvasMutations());\n }\n flushPendingCanvasMutationFor(canvas, id) {\n if (this.frozen || this.locked) {\n return;\n }\n const valuesWithType = this.pendingCanvasMutations.get(canvas);\n if (!valuesWithType || id === -1) return;\n const values = valuesWithType.map((value) => {\n const { type: type2, ...rest } = value;\n return rest;\n });\n const { type } = valuesWithType[0];\n this.mutationCb({ id, type, commands: values });\n this.pendingCanvasMutations.delete(canvas);\n }\n}\ntry {\n if (Array.from([1], (x) => x * 2)[0] !== 2) {\n const cleanFrame = document.createElement(\"iframe\");\n document.body.appendChild(cleanFrame);\n Array.from = cleanFrame.contentWindow?.Array.from || Array.from;\n document.body.removeChild(cleanFrame);\n }\n} catch (err) {\n console.debug(\"Unable to override Array.from\", err);\n}\ncreateMirror$2();\nvar n;\n!function(t2) {\n t2[t2.NotStarted = 0] = \"NotStarted\", t2[t2.Running = 1] = \"Running\", t2[t2.Stopped = 2] = \"Stopped\";\n}(n || (n = {}));\n\nconst CANVAS_QUALITY = {\n low: {\n sampling: {\n canvas: 1,\n },\n dataURLOptions: {\n type: 'image/webp',\n quality: 0.25,\n },\n },\n medium: {\n sampling: {\n canvas: 2,\n },\n dataURLOptions: {\n type: 'image/webp',\n quality: 0.4,\n },\n },\n high: {\n sampling: {\n canvas: 4,\n },\n dataURLOptions: {\n type: 'image/webp',\n quality: 0.5,\n },\n },\n};\n\nconst INTEGRATION_NAME = 'ReplayCanvas';\nconst DEFAULT_MAX_CANVAS_SIZE = 1280;\n\n/** Exported only for type safe tests. */\nconst _replayCanvasIntegration = ((options = {}) => {\n const [maxCanvasWidth, maxCanvasHeight] = options.maxCanvasSize || [];\n const _canvasOptions = {\n quality: options.quality || 'medium',\n enableManualSnapshot: options.enableManualSnapshot,\n maxCanvasSize: [\n maxCanvasWidth ? Math.min(maxCanvasWidth, DEFAULT_MAX_CANVAS_SIZE) : DEFAULT_MAX_CANVAS_SIZE,\n maxCanvasHeight ? Math.min(maxCanvasHeight, DEFAULT_MAX_CANVAS_SIZE) : DEFAULT_MAX_CANVAS_SIZE,\n ] ,\n };\n\n let canvasManagerResolve;\n const _canvasManager = new Promise(resolve => (canvasManagerResolve = resolve));\n\n return {\n name: INTEGRATION_NAME,\n getOptions() {\n const { quality, enableManualSnapshot, maxCanvasSize } = _canvasOptions;\n\n return {\n enableManualSnapshot,\n recordCanvas: true,\n getCanvasManager: (getCanvasManagerOptions) => {\n const manager = new CanvasManager({\n ...getCanvasManagerOptions,\n enableManualSnapshot,\n maxCanvasSize,\n errorHandler: (err) => {\n try {\n if (typeof err === 'object') {\n (err ).__rrweb__ = true;\n }\n } catch (error) {\n // ignore errors here\n // this can happen if the error is frozen or does not allow mutation for other reasons\n }\n },\n });\n canvasManagerResolve(manager);\n return manager;\n },\n ...(CANVAS_QUALITY[quality || 'medium'] || CANVAS_QUALITY.medium),\n };\n },\n async snapshot(canvasElement) {\n const canvasManager = await _canvasManager;\n canvasManager.snapshot(canvasElement);\n },\n };\n}) ;\n\n/**\n * Add this in addition to `replayIntegration()` to enable canvas recording.\n */\nconst replayCanvasIntegration = defineIntegration(\n _replayCanvasIntegration,\n) ;\n\nexport { replayCanvasIntegration };\n//# sourceMappingURL=index.js.map\n","import { addXhrInstrumentationHandler, addPerformanceInstrumentationHandler, extractNetworkProtocol, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';\nimport { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, instrumentFetchRequest, parseUrl, spanToJSON, browserPerformanceTimeOrigin, hasSpansEnabled, setHttpStatus, stripUrlQueryAndFragment, getActiveSpan, startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SentryNonRecordingSpan, getClient, getTraceData, getLocationHref, stringMatchesSomePattern } from '@sentry/core';\nimport { WINDOW } from '../helpers.js';\n\n/** Options for Request Instrumentation */\n\nconst responseToSpanId = new WeakMap();\nconst spanIdToEndTimestamp = new Map();\n\nconst defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n enableHTTPTimings: true,\n trackFetchStreamPerformance: false,\n};\n\n/** Registers span creators for xhr and fetch requests */\nfunction instrumentOutgoingRequests(client, _options) {\n const {\n traceFetch,\n traceXHR,\n trackFetchStreamPerformance,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n tracePropagationTargets,\n } = {\n traceFetch: defaultRequestInstrumentationOptions.traceFetch,\n traceXHR: defaultRequestInstrumentationOptions.traceXHR,\n trackFetchStreamPerformance: defaultRequestInstrumentationOptions.trackFetchStreamPerformance,\n ..._options,\n };\n\n const shouldCreateSpan =\n typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true;\n\n const shouldAttachHeadersWithTargets = (url) => shouldAttachHeaders(url, tracePropagationTargets);\n\n const spans = {};\n\n if (traceFetch) {\n // Keeping track of http requests, whose body payloads resolved later than the initial resolved request\n // e.g. streaming using server sent events (SSE)\n client.addEventProcessor(event => {\n if (event.type === 'transaction' && event.spans) {\n event.spans.forEach(span => {\n if (span.op === 'http.client') {\n const updatedTimestamp = spanIdToEndTimestamp.get(span.span_id);\n if (updatedTimestamp) {\n span.timestamp = updatedTimestamp / 1000;\n spanIdToEndTimestamp.delete(span.span_id);\n }\n }\n });\n }\n return event;\n });\n\n if (trackFetchStreamPerformance) {\n addFetchEndInstrumentationHandler(handlerData => {\n if (handlerData.response) {\n const span = responseToSpanId.get(handlerData.response);\n if (span && handlerData.endTimestamp) {\n spanIdToEndTimestamp.set(span, handlerData.endTimestamp);\n }\n }\n });\n }\n\n addFetchInstrumentationHandler(handlerData => {\n const createdSpan = instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n\n if (handlerData.response && handlerData.fetchData.__span) {\n responseToSpanId.set(handlerData.response, handlerData.fetchData.__span);\n }\n\n // We cannot use `window.location` in the generic fetch instrumentation,\n // but we need it for reliable `server.address` attribute.\n // so we extend this in here\n if (createdSpan) {\n const fullUrl = getFullURL(handlerData.fetchData.url);\n const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n createdSpan.setAttributes({\n 'http.url': fullUrl,\n 'server.address': host,\n });\n }\n\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n\n if (traceXHR) {\n addXhrInstrumentationHandler(handlerData => {\n const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n}\n\nfunction isPerformanceResourceTiming(entry) {\n return (\n entry.entryType === 'resource' &&\n 'initiatorType' in entry &&\n typeof (entry ).nextHopProtocol === 'string' &&\n (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n );\n}\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span) {\n const { url } = spanToJSON(span).data;\n\n if (!url || typeof url !== 'string') {\n return;\n }\n\n const cleanup = addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n entries.forEach(entry => {\n if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n const spanData = resourceTimingEntryToSpanData(entry);\n spanData.forEach(data => span.setAttribute(...data));\n // In the next tick, clean this handler up\n // We have to wait here because otherwise this cleans itself up before it is fully done\n setTimeout(cleanup);\n }\n });\n });\n}\n\nfunction getAbsoluteTime(time = 0) {\n return ((browserPerformanceTimeOrigin() || performance.timeOrigin) + time) / 1000;\n}\n\nfunction resourceTimingEntryToSpanData(resourceTiming) {\n const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n\n const timingSpanData = [];\n\n timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]);\n\n if (!browserPerformanceTimeOrigin()) {\n return timingSpanData;\n }\n return [\n ...timingSpanData,\n ['http.request.redirect_start', getAbsoluteTime(resourceTiming.redirectStart)],\n ['http.request.fetch_start', getAbsoluteTime(resourceTiming.fetchStart)],\n ['http.request.domain_lookup_start', getAbsoluteTime(resourceTiming.domainLookupStart)],\n ['http.request.domain_lookup_end', getAbsoluteTime(resourceTiming.domainLookupEnd)],\n ['http.request.connect_start', getAbsoluteTime(resourceTiming.connectStart)],\n ['http.request.secure_connection_start', getAbsoluteTime(resourceTiming.secureConnectionStart)],\n ['http.request.connection_end', getAbsoluteTime(resourceTiming.connectEnd)],\n ['http.request.request_start', getAbsoluteTime(resourceTiming.requestStart)],\n ['http.request.response_start', getAbsoluteTime(resourceTiming.responseStart)],\n ['http.request.response_end', getAbsoluteTime(resourceTiming.responseEnd)],\n ];\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * We only export this function for testing purposes.\n */\nfunction shouldAttachHeaders(\n targetUrl,\n tracePropagationTargets,\n) {\n // window.location.href not being defined is an edge case in the browser but we need to handle it.\n // Potentially dangerous situations where it may not be defined: Browser Extensions, Web Workers, patching of the location obj\n const href = getLocationHref();\n\n if (!href) {\n // If there is no window.location.origin, we default to only attaching tracing headers to relative requests, i.e. ones that start with `/`\n // BIG DISCLAIMER: Users can call URLs with a double slash (fetch(\"//example.com/api\")), this is a shorthand for \"send to the same protocol\",\n // so we need a to exclude those requests, because they might be cross origin.\n const isRelativeSameOriginRequest = !!targetUrl.match(/^\\/(?!\\/)/);\n if (!tracePropagationTargets) {\n return isRelativeSameOriginRequest;\n } else {\n return stringMatchesSomePattern(targetUrl, tracePropagationTargets);\n }\n } else {\n let resolvedUrl;\n let currentOrigin;\n\n // URL parsing may fail, we default to not attaching trace headers in that case.\n try {\n resolvedUrl = new URL(targetUrl, href);\n currentOrigin = new URL(href).origin;\n } catch (e) {\n return false;\n }\n\n const isSameOriginRequest = resolvedUrl.origin === currentOrigin;\n if (!tracePropagationTargets) {\n return isSameOriginRequest;\n } else {\n return (\n stringMatchesSomePattern(resolvedUrl.toString(), tracePropagationTargets) ||\n (isSameOriginRequest && stringMatchesSomePattern(resolvedUrl.pathname, tracePropagationTargets))\n );\n }\n }\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction xhrCallback(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n) {\n const xhr = handlerData.xhr;\n const sentryXhrData = xhr?.[SENTRY_XHR_DATA_KEY];\n\n if (!xhr || xhr.__sentry_own_request__ || !sentryXhrData) {\n return undefined;\n }\n\n const { url, method } = sentryXhrData;\n\n const shouldCreateSpanResult = hasSpansEnabled() && shouldCreateSpan(url);\n\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = xhr.__sentry_xhr_span_id__;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span && sentryXhrData.status_code !== undefined) {\n setHttpStatus(span, sentryXhrData.status_code);\n span.end();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const fullUrl = getFullURL(url);\n const parsedUrl = fullUrl ? parseUrl(fullUrl) : parseUrl(url);\n\n const urlForSpanName = stripUrlQueryAndFragment(url);\n\n const hasParent = !!getActiveSpan();\n\n const span =\n shouldCreateSpanResult && hasParent\n ? startInactiveSpan({\n name: `${method} ${urlForSpanName}`,\n attributes: {\n url,\n type: 'xhr',\n 'http.method': method,\n 'http.url': fullUrl,\n 'server.address': parsedUrl?.host,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n ...(parsedUrl?.search && { 'http.query': parsedUrl?.search }),\n ...(parsedUrl?.hash && { 'http.fragment': parsedUrl?.hash }),\n },\n })\n : new SentryNonRecordingSpan();\n\n xhr.__sentry_xhr_span_id__ = span.spanContext().spanId;\n spans[xhr.__sentry_xhr_span_id__] = span;\n\n if (shouldAttachHeaders(url)) {\n addTracingHeadersToXhrRequest(\n xhr,\n // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n // we do not want to use the span as base for the trace headers,\n // which means that the headers will be generated from the scope and the sampling decision is deferred\n hasSpansEnabled() && hasParent ? span : undefined,\n );\n }\n\n const client = getClient();\n if (client) {\n client.emit('beforeOutgoingRequestSpan', span, handlerData );\n }\n\n return span;\n}\n\nfunction addTracingHeadersToXhrRequest(xhr, span) {\n const { 'sentry-trace': sentryTrace, baggage } = getTraceData({ span });\n\n if (sentryTrace) {\n setHeaderOnXhr(xhr, sentryTrace, baggage);\n }\n}\n\nfunction setHeaderOnXhr(\n xhr,\n sentryTraceHeader,\n sentryBaggageHeader,\n) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader('sentry-trace', sentryTraceHeader);\n if (sentryBaggageHeader) {\n // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n // We can therefore simply set a baggage header without checking what was there before\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader('baggage', sentryBaggageHeader);\n }\n } catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n}\n\nfunction getFullURL(url) {\n try {\n // By adding a base URL to new URL(), this will also work for relative urls\n // If `url` is a full URL, the base URL is ignored anyhow\n const parsed = new URL(url, WINDOW.location.origin);\n return parsed.href;\n } catch {\n return undefined;\n }\n}\n\nexport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback };\n//# sourceMappingURL=request.js.map\n","import { getActiveSpan, getRootSpan, spanToJSON, logger, SPAN_STATUS_ERROR } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nfunction registerBackgroundTabDetection() {\n if (WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n return;\n }\n\n const rootSpan = getRootSpan(activeSpan);\n\n if (WINDOW.document.hidden && rootSpan) {\n const cancelledStatus = 'cancelled';\n\n const { op, status } = spanToJSON(rootSpan);\n\n if (DEBUG_BUILD) {\n logger.log(`[Tracing] Transaction: ${cancelledStatus} -> since tab moved to the background, op: ${op}`);\n }\n\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!status) {\n rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message: cancelledStatus });\n }\n\n rootSpan.setAttribute('sentry.cancellation_reason', 'document.hidden');\n rootSpan.end();\n }\n });\n } else {\n DEBUG_BUILD && logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n\nexport { registerBackgroundTabDetection };\n//# sourceMappingURL=backgroundtab.js.map\n","import { startTrackingWebVitals, startTrackingINP, startTrackingLongAnimationFrames, startTrackingLongTasks, startTrackingInteractions, addHistoryInstrumentationHandler, registerInpInteractionListener, addPerformanceEntries } from '@sentry-internal/browser-utils';\nimport { TRACING_DEFAULTS, registerSpanErrorInstrumentation, GLOBAL_OBJ, getLocationHref, getClient, getIsolationScope, generateTraceId, getCurrentScope, propagationContextFromHeaders, browserPerformanceTimeOrigin, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, startIdleSpan, spanIsSampled, getDynamicSamplingContextFromSpan, spanToJSON, logger, addNonEnumerableProperty, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\nimport { registerBackgroundTabDetection } from './backgroundtab.js';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request.js';\n\n/* eslint-disable max-lines */\n\nconst BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS = {\n ...TRACING_DEFAULTS,\n instrumentNavigation: true,\n instrumentPageLoad: true,\n markBackgroundSpan: true,\n enableLongTask: true,\n enableLongAnimationFrame: true,\n enableInp: true,\n _experiments: {},\n ...defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library.\n *\n * We explicitly export the proper type here, as this has to be extended in some cases.\n */\nconst browserTracingIntegration = ((_options = {}) => {\n /**\n * This is just a small wrapper that makes `document` optional.\n * We want to be extra-safe and always check that this exists, to ensure weird environments do not blow up.\n */\n const optionalWindowDocument = WINDOW.document ;\n\n registerSpanErrorInstrumentation();\n\n const {\n enableInp,\n enableLongTask,\n enableLongAnimationFrame,\n _experiments: { enableInteractions, enableStandaloneClsSpans },\n beforeStartSpan,\n idleTimeout,\n finalTimeout,\n childSpanTimeout,\n markBackgroundSpan,\n traceFetch,\n traceXHR,\n trackFetchStreamPerformance,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n instrumentPageLoad,\n instrumentNavigation,\n } = {\n ...DEFAULT_BROWSER_TRACING_OPTIONS,\n ..._options,\n };\n\n const _collectWebVitals = startTrackingWebVitals({ recordClsStandaloneSpans: enableStandaloneClsSpans || false });\n\n if (enableInp) {\n startTrackingINP();\n }\n\n if (\n enableLongAnimationFrame &&\n GLOBAL_OBJ.PerformanceObserver &&\n PerformanceObserver.supportedEntryTypes &&\n PerformanceObserver.supportedEntryTypes.includes('long-animation-frame')\n ) {\n startTrackingLongAnimationFrames();\n } else if (enableLongTask) {\n startTrackingLongTasks();\n }\n\n if (enableInteractions) {\n startTrackingInteractions();\n }\n\n const latestRoute = {\n name: undefined,\n source: undefined,\n };\n\n /** Create routing idle transaction. */\n function _createRouteSpan(client, startSpanOptions) {\n const isPageloadTransaction = startSpanOptions.op === 'pageload';\n\n const finalStartSpanOptions = beforeStartSpan\n ? beforeStartSpan(startSpanOptions)\n : startSpanOptions;\n\n const attributes = finalStartSpanOptions.attributes || {};\n\n // If `finalStartSpanOptions.name` is different than `startSpanOptions.name`\n // it is because `beforeStartSpan` set a custom name. Therefore we set the source to 'custom'.\n if (startSpanOptions.name !== finalStartSpanOptions.name) {\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'custom';\n finalStartSpanOptions.attributes = attributes;\n }\n\n latestRoute.name = finalStartSpanOptions.name;\n latestRoute.source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n const idleSpan = startIdleSpan(finalStartSpanOptions, {\n idleTimeout,\n finalTimeout,\n childSpanTimeout,\n // should wait for finish signal if it's a pageload transaction\n disableAutoFinish: isPageloadTransaction,\n beforeSpanEnd: span => {\n _collectWebVitals();\n addPerformanceEntries(span, { recordClsOnPageloadSpan: !enableStandaloneClsSpans });\n setActiveIdleSpan(client, undefined);\n\n // A trace should stay consistent over the entire timespan of one route - even after the pageload/navigation ended.\n // Only when another navigation happens, we want to create a new trace.\n // This way, e.g. errors that occur after the pageload span ended are still associated to the pageload trace.\n const scope = getCurrentScope();\n const oldPropagationContext = scope.getPropagationContext();\n\n scope.setPropagationContext({\n ...oldPropagationContext,\n traceId: idleSpan.spanContext().traceId,\n sampled: spanIsSampled(idleSpan),\n dsc: getDynamicSamplingContextFromSpan(span),\n });\n },\n });\n setActiveIdleSpan(client, idleSpan);\n\n function emitFinish() {\n if (optionalWindowDocument && ['interactive', 'complete'].includes(optionalWindowDocument.readyState)) {\n client.emit('idleSpanEnableAutoFinish', idleSpan);\n }\n }\n\n if (isPageloadTransaction && optionalWindowDocument) {\n optionalWindowDocument.addEventListener('readystatechange', () => {\n emitFinish();\n });\n\n emitFinish();\n }\n }\n\n return {\n name: BROWSER_TRACING_INTEGRATION_ID,\n afterAllSetup(client) {\n let startingUrl = getLocationHref();\n\n function maybeEndActiveSpan() {\n const activeSpan = getActiveIdleSpan(client);\n\n if (activeSpan && !spanToJSON(activeSpan).timestamp) {\n DEBUG_BUILD && logger.log(`[Tracing] Finishing current active span with op: ${spanToJSON(activeSpan).op}`);\n // If there's an open active span, we need to finish it before creating an new one.\n activeSpan.end();\n }\n }\n\n client.on('startNavigationSpan', startSpanOptions => {\n if (getClient() !== client) {\n return;\n }\n\n maybeEndActiveSpan();\n\n getIsolationScope().setPropagationContext({ traceId: generateTraceId(), sampleRand: Math.random() });\n getCurrentScope().setPropagationContext({ traceId: generateTraceId(), sampleRand: Math.random() });\n\n _createRouteSpan(client, {\n op: 'navigation',\n ...startSpanOptions,\n });\n });\n\n client.on('startPageLoadSpan', (startSpanOptions, traceOptions = {}) => {\n if (getClient() !== client) {\n return;\n }\n maybeEndActiveSpan();\n\n const sentryTrace = traceOptions.sentryTrace || getMetaContent('sentry-trace');\n const baggage = traceOptions.baggage || getMetaContent('baggage');\n\n const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n getCurrentScope().setPropagationContext(propagationContext);\n\n _createRouteSpan(client, {\n op: 'pageload',\n ...startSpanOptions,\n });\n });\n\n if (WINDOW.location) {\n if (instrumentPageLoad) {\n const origin = browserPerformanceTimeOrigin();\n startBrowserTracingPageLoadSpan(client, {\n name: WINDOW.location.pathname,\n // pageload should always start at timeOrigin (and needs to be in s, not ms)\n startTime: origin ? origin / 1000 : undefined,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',\n },\n });\n }\n\n if (instrumentNavigation) {\n addHistoryInstrumentationHandler(({ to, from }) => {\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl?.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n startBrowserTracingNavigationSpan(client, {\n name: WINDOW.location.pathname,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',\n },\n });\n }\n });\n }\n }\n\n if (markBackgroundSpan) {\n registerBackgroundTabDetection();\n }\n\n if (enableInteractions) {\n registerInteractionListener(client, idleTimeout, finalTimeout, childSpanTimeout, latestRoute);\n }\n\n if (enableInp) {\n registerInpInteractionListener();\n }\n\n instrumentOutgoingRequests(client, {\n traceFetch,\n traceXHR,\n trackFetchStreamPerformance,\n tracePropagationTargets: client.getOptions().tracePropagationTargets,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n });\n },\n };\n}) ;\n\n/**\n * Manually start a page load span.\n * This will only do something if a browser tracing integration integration has been setup.\n *\n * If you provide a custom `traceOptions` object, it will be used to continue the trace\n * instead of the default behavior, which is to look it up on the tags.\n */\nfunction startBrowserTracingPageLoadSpan(\n client,\n spanOptions,\n traceOptions,\n) {\n client.emit('startPageLoadSpan', spanOptions, traceOptions);\n getCurrentScope().setTransactionName(spanOptions.name);\n\n return getActiveIdleSpan(client);\n}\n\n/**\n * Manually start a navigation span.\n * This will only do something if a browser tracing integration has been setup.\n */\nfunction startBrowserTracingNavigationSpan(client, spanOptions) {\n client.emit('startNavigationSpan', spanOptions);\n\n getCurrentScope().setTransactionName(spanOptions.name);\n\n return getActiveIdleSpan(client);\n}\n\n/** Returns the value of a meta tag */\nfunction getMetaContent(metaName) {\n /**\n * This is just a small wrapper that makes `document` optional.\n * We want to be extra-safe and always check that this exists, to ensure weird environments do not blow up.\n */\n const optionalWindowDocument = WINDOW.document ;\n\n const metaTag = optionalWindowDocument?.querySelector(`meta[name=${metaName}]`);\n return metaTag?.getAttribute('content') || undefined;\n}\n\n/** Start listener for interaction transactions */\nfunction registerInteractionListener(\n client,\n idleTimeout,\n finalTimeout,\n childSpanTimeout,\n latestRoute,\n) {\n /**\n * This is just a small wrapper that makes `document` optional.\n * We want to be extra-safe and always check that this exists, to ensure weird environments do not blow up.\n */\n const optionalWindowDocument = WINDOW.document ;\n\n let inflightInteractionSpan;\n const registerInteractionTransaction = () => {\n const op = 'ui.action.click';\n\n const activeIdleSpan = getActiveIdleSpan(client);\n if (activeIdleSpan) {\n const currentRootSpanOp = spanToJSON(activeIdleSpan).op;\n if (['navigation', 'pageload'].includes(currentRootSpanOp )) {\n DEBUG_BUILD &&\n logger.warn(`[Tracing] Did not create ${op} span because a pageload or navigation span is in progress.`);\n return undefined;\n }\n }\n\n if (inflightInteractionSpan) {\n inflightInteractionSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'interactionInterrupted');\n inflightInteractionSpan.end();\n inflightInteractionSpan = undefined;\n }\n\n if (!latestRoute.name) {\n DEBUG_BUILD && logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n return undefined;\n }\n\n inflightInteractionSpan = startIdleSpan(\n {\n name: latestRoute.name,\n op,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: latestRoute.source || 'url',\n },\n },\n {\n idleTimeout,\n finalTimeout,\n childSpanTimeout,\n },\n );\n };\n\n if (optionalWindowDocument) {\n addEventListener('click', registerInteractionTransaction, { once: false, capture: true });\n }\n}\n\n// We store the active idle span on the client object, so we can access it from exported functions\nconst ACTIVE_IDLE_SPAN_PROPERTY = '_sentry_idleSpan';\nfunction getActiveIdleSpan(client) {\n return (client )[ACTIVE_IDLE_SPAN_PROPERTY];\n}\n\nfunction setActiveIdleSpan(client, span) {\n addNonEnumerableProperty(client, ACTIVE_IDLE_SPAN_PROPERTY, span);\n}\n\nexport { BROWSER_TRACING_INTEGRATION_ID, browserTracingIntegration, getMetaContent, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan };\n//# sourceMappingURL=browserTracingIntegration.js.map\n","import { setContext, init as init$1 } from '@sentry/browser';\nimport { applySdkMetadata } from '@sentry/core';\nimport { version } from 'react';\n\n/**\n * Inits the React SDK\n */\nfunction init(options) {\n const opts = {\n ...options,\n };\n\n applySdkMetadata(opts, 'react');\n setContext('react', { version });\n return init$1(opts);\n}\n\nexport { init };\n//# sourceMappingURL=sdk.js.map\n","const REACT_RENDER_OP = 'ui.react.render';\n\nconst REACT_UPDATE_OP = 'ui.react.update';\n\nconst REACT_MOUNT_OP = 'ui.react.mount';\n\nexport { REACT_MOUNT_OP, REACT_RENDER_OP, REACT_UPDATE_OP };\n//# sourceMappingURL=constants.js.map\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","import * as hoistNonReactStaticsImport from 'hoist-non-react-statics';\n\n// Ensure we use the default export from hoist-non-react-statics if available,\n// falling back to the module itself. This handles both ESM and CJS usage.\nconst hoistNonReactStatics = hoistNonReactStaticsImport.default || hoistNonReactStaticsImport;\n\nexport { hoistNonReactStatics };\n//# sourceMappingURL=hoist-non-react-statics.js.map\n","import { startInactiveSpan } from '@sentry/browser';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, timestampInSeconds, withActiveSpan, spanToJSON } from '@sentry/core';\nimport * as React from 'react';\nimport { REACT_MOUNT_OP, REACT_UPDATE_OP, REACT_RENDER_OP } from './constants.js';\nimport { hoistNonReactStatics } from './hoist-non-react-statics.js';\n\nconst UNKNOWN_COMPONENT = 'unknown';\n\n/**\n * The Profiler component leverages Sentry's Tracing integration to generate\n * spans based on component lifecycles.\n */\nclass Profiler extends React.Component {\n /**\n * The span of the mount activity\n * Made protected for the React Native SDK to access\n */\n\n /**\n * The span that represents the duration of time between shouldComponentUpdate and componentDidUpdate\n */\n\n constructor(props) {\n super(props);\n const { name, disabled = false } = this.props;\n\n if (disabled) {\n return;\n }\n\n this._mountSpan = startInactiveSpan({\n name: `<${name}>`,\n onlyIfParent: true,\n op: REACT_MOUNT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n }\n\n // If a component mounted, we can finish the mount activity.\n componentDidMount() {\n if (this._mountSpan) {\n this._mountSpan.end();\n }\n }\n\n shouldComponentUpdate({ updateProps, includeUpdates = true }) {\n // Only generate an update span if includeUpdates is true, if there is a valid mountSpan,\n // and if the updateProps have changed. It is ok to not do a deep equality check here as it is expensive.\n // We are just trying to give baseline clues for further investigation.\n if (includeUpdates && this._mountSpan && updateProps !== this.props.updateProps) {\n // See what props have changed between the previous props, and the current props. This is\n // set as data on the span. We just store the prop keys as the values could be potentially very large.\n const changedProps = Object.keys(updateProps).filter(k => updateProps[k] !== this.props.updateProps[k]);\n if (changedProps.length > 0) {\n const now = timestampInSeconds();\n this._updateSpan = withActiveSpan(this._mountSpan, () => {\n return startInactiveSpan({\n name: `<${this.props.name}>`,\n onlyIfParent: true,\n op: REACT_UPDATE_OP,\n startTime: now,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': this.props.name,\n 'ui.react.changed_props': changedProps,\n },\n });\n });\n }\n }\n\n return true;\n }\n\n componentDidUpdate() {\n if (this._updateSpan) {\n this._updateSpan.end();\n this._updateSpan = undefined;\n }\n }\n\n // If a component is unmounted, we can say it is no longer on the screen.\n // This means we can finish the span representing the component render.\n componentWillUnmount() {\n const endTimestamp = timestampInSeconds();\n const { name, includeRender = true } = this.props;\n\n if (this._mountSpan && includeRender) {\n const startTime = spanToJSON(this._mountSpan).timestamp;\n withActiveSpan(this._mountSpan, () => {\n const renderSpan = startInactiveSpan({\n onlyIfParent: true,\n name: `<${name}>`,\n op: REACT_RENDER_OP,\n startTime,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n if (renderSpan) {\n // Have to cast to Span because the type of _mountSpan is Span | undefined\n // and not getting narrowed properly\n renderSpan.end(endTimestamp);\n }\n });\n }\n }\n\n render() {\n return this.props.children;\n }\n}\n\n// React.Component default props are defined as static property on the class\nObject.assign(Profiler, {\n defaultProps: {\n disabled: false,\n includeRender: true,\n includeUpdates: true,\n },\n});\n\n/**\n * withProfiler is a higher order component that wraps a\n * component in a {@link Profiler} component. It is recommended that\n * the higher order component be used over the regular {@link Profiler} component.\n *\n * @param WrappedComponent component that is wrapped by Profiler\n * @param options the {@link ProfilerProps} you can pass into the Profiler\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction withProfiler(\n WrappedComponent,\n // We do not want to have `updateProps` given in options, it is instead filled through the HOC.\n options,\n) {\n const componentDisplayName =\n options?.name || WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;\n\n const Wrapped = (props) => (\n React.createElement(Profiler, { ...options, name: componentDisplayName, updateProps: props,}\n , React.createElement(WrappedComponent, { ...props,} )\n )\n );\n\n Wrapped.displayName = `profiler(${componentDisplayName})`;\n\n // Copy over static methods from Wrapped component to Profiler HOC\n // See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over\n hoistNonReactStatics(Wrapped, WrappedComponent);\n return Wrapped;\n}\n\n/**\n *\n * `useProfiler` is a React hook that profiles a React component.\n *\n * Requires React 16.8 or above.\n * @param name displayName of component being profiled\n */\nfunction useProfiler(\n name,\n options = {\n disabled: false,\n hasRenderSpan: true,\n },\n) {\n const [mountSpan] = React.useState(() => {\n if (options?.disabled) {\n return undefined;\n }\n\n return startInactiveSpan({\n name: `<${name}>`,\n onlyIfParent: true,\n op: REACT_MOUNT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n });\n\n React.useEffect(() => {\n if (mountSpan) {\n mountSpan.end();\n }\n\n return () => {\n if (mountSpan && options.hasRenderSpan) {\n const startTime = spanToJSON(mountSpan).timestamp;\n const endTimestamp = timestampInSeconds();\n\n const renderSpan = startInactiveSpan({\n name: `<${name}>`,\n onlyIfParent: true,\n op: REACT_RENDER_OP,\n startTime,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n if (renderSpan) {\n // Have to cast to Span because the type of _mountSpan is Span | undefined\n // and not getting narrowed properly\n renderSpan.end(endTimestamp);\n }\n }\n };\n // We only want this to run once.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n}\n\nexport { Profiler, UNKNOWN_COMPONENT, useProfiler, withProfiler };\n//# sourceMappingURL=profiler.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { getGlobalScope, getCurrentScope, addBreadcrumb, getClient, addNonEnumerableProperty } from '@sentry/core';\n\nconst ACTION_BREADCRUMB_CATEGORY = 'redux.action';\nconst ACTION_BREADCRUMB_TYPE = 'info';\n\nconst defaultOptions = {\n attachReduxState: true,\n actionTransformer: action => action,\n stateTransformer: state => state || null,\n};\n\n/**\n * Creates an enhancer that would be passed to Redux's createStore to log actions and the latest state to Sentry.\n *\n * @param enhancerOptions Options to pass to the enhancer\n */\nfunction createReduxEnhancer(enhancerOptions) {\n // Note: We return an any type as to not have type conflicts.\n const options = {\n ...defaultOptions,\n ...enhancerOptions,\n };\n\n return (next) =>\n (reducer, initialState) => {\n options.attachReduxState &&\n getGlobalScope().addEventProcessor((event, hint) => {\n try {\n // @ts-expect-error try catch to reduce bundle size\n if (event.type === undefined && event.contexts.state.state.type === 'redux') {\n hint.attachments = [\n ...(hint.attachments || []),\n // @ts-expect-error try catch to reduce bundle size\n { filename: 'redux_state.json', data: JSON.stringify(event.contexts.state.state.value) },\n ];\n }\n } catch (_) {\n // empty\n }\n return event;\n });\n\n const sentryReducer = (state, action) => {\n const newState = reducer(state, action);\n\n const scope = getCurrentScope();\n\n /* Action breadcrumbs */\n const transformedAction = options.actionTransformer(action);\n if (typeof transformedAction !== 'undefined' && transformedAction !== null) {\n addBreadcrumb({\n category: ACTION_BREADCRUMB_CATEGORY,\n data: transformedAction,\n type: ACTION_BREADCRUMB_TYPE,\n });\n }\n\n /* Set latest state to scope */\n const transformedState = options.stateTransformer(newState);\n if (typeof transformedState !== 'undefined' && transformedState !== null) {\n const client = getClient();\n const options = client?.getOptions();\n const normalizationDepth = options?.normalizeDepth || 3; // default state normalization depth to 3\n\n // Set the normalization depth of the redux state to the configured `normalizeDepth` option or a sane number as a fallback\n const newStateContext = { state: { type: 'redux', value: transformedState } };\n addNonEnumerableProperty(\n newStateContext,\n '__sentry_override_normalization_depth__',\n 3 + // 3 layers for `state.value.transformedState`\n normalizationDepth, // rest for the actual state\n );\n\n scope.setContext('state', newStateContext);\n } else {\n scope.setContext('state', null);\n }\n\n /* Allow user to configure scope with latest state */\n const { configureScopeWithState } = options;\n if (typeof configureScopeWithState === 'function') {\n configureScopeWithState(scope, newState);\n }\n\n return newState;\n };\n\n return next(sentryReducer, initialState);\n };\n}\n\nexport { createReduxEnhancer };\n//# sourceMappingURL=redux.js.map\n","import { browserTracingIntegration, WINDOW, startBrowserTracingPageLoadSpan, startBrowserTracingNavigationSpan } from '@sentry/browser';\nimport { logger, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getClient, getActiveSpan, spanToJSON, getCurrentScope, getRootSpan } from '@sentry/core';\nimport * as React from 'react';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { hoistNonReactStatics } from './hoist-non-react-statics.js';\n\n/* eslint-disable max-lines */\n// Inspired from Donnie McNeal's solution:\n// https://gist.github.com/wontondon/e8c4bdf2888875e4c755712e99279536\n\n\nlet _useEffect;\nlet _useLocation;\nlet _useNavigationType;\nlet _createRoutesFromChildren;\nlet _matchRoutes;\nlet _stripBasename = false;\n\nconst CLIENTS_WITH_INSTRUMENT_NAVIGATION = new WeakSet();\n\n// Keeping as a global variable for cross-usage in multiple functions\nconst allRoutes = new Set();\n\n/**\n * Creates a wrapCreateBrowserRouter function that can be used with all React Router v6 compatible versions.\n */\nfunction createV6CompatibleWrapCreateBrowserRouter\n\n(\n createRouterFunction,\n version,\n) {\n if (!_useEffect || !_useLocation || !_useNavigationType || !_matchRoutes) {\n DEBUG_BUILD &&\n logger.warn(\n `reactRouterV${version}Instrumentation was unable to wrap the \\`createRouter\\` function because of one or more missing parameters.`,\n );\n\n return createRouterFunction;\n }\n\n return function (routes, opts) {\n addRoutesToAllRoutes(routes);\n\n const router = createRouterFunction(routes, opts);\n const basename = opts?.basename;\n\n const activeRootSpan = getActiveRootSpan();\n\n // The initial load ends when `createBrowserRouter` is called.\n // This is the earliest convenient time to update the transaction name.\n // Callbacks to `router.subscribe` are not called for the initial load.\n if (router.state.historyAction === 'POP' && activeRootSpan) {\n updatePageloadTransaction(\n activeRootSpan,\n router.state.location,\n routes,\n undefined,\n basename,\n Array.from(allRoutes),\n );\n }\n\n router.subscribe((state) => {\n if (state.historyAction === 'PUSH' || state.historyAction === 'POP') {\n // Wait for the next render if loading an unsettled route\n if (state.navigation.state !== 'idle') {\n requestAnimationFrame(() => {\n handleNavigation({\n location: state.location,\n routes,\n navigationType: state.historyAction,\n version,\n basename,\n allRoutes: Array.from(allRoutes),\n });\n });\n } else {\n handleNavigation({\n location: state.location,\n routes,\n navigationType: state.historyAction,\n version,\n basename,\n allRoutes: Array.from(allRoutes),\n });\n }\n }\n });\n\n return router;\n };\n}\n\n/**\n * Creates a wrapCreateMemoryRouter function that can be used with all React Router v6 compatible versions.\n */\nfunction createV6CompatibleWrapCreateMemoryRouter\n\n(\n createRouterFunction,\n version,\n) {\n if (!_useEffect || !_useLocation || !_useNavigationType || !_matchRoutes) {\n DEBUG_BUILD &&\n logger.warn(\n `reactRouterV${version}Instrumentation was unable to wrap the \\`createMemoryRouter\\` function because of one or more missing parameters.`,\n );\n\n return createRouterFunction;\n }\n\n return function (\n routes,\n opts\n\n,\n ) {\n addRoutesToAllRoutes(routes);\n\n const router = createRouterFunction(routes, opts);\n const basename = opts?.basename;\n\n const activeRootSpan = getActiveRootSpan();\n let initialEntry = undefined;\n\n const initialEntries = opts?.initialEntries;\n const initialIndex = opts?.initialIndex;\n\n const hasOnlyOneInitialEntry = initialEntries && initialEntries.length === 1;\n const hasIndexedEntry = initialIndex !== undefined && initialEntries && initialEntries[initialIndex];\n\n initialEntry = hasOnlyOneInitialEntry\n ? initialEntries[0]\n : hasIndexedEntry\n ? initialEntries[initialIndex]\n : undefined;\n\n const location = initialEntry\n ? typeof initialEntry === 'string'\n ? { pathname: initialEntry }\n : initialEntry\n : router.state.location;\n\n if (router.state.historyAction === 'POP' && activeRootSpan) {\n updatePageloadTransaction(activeRootSpan, location, routes, undefined, basename, Array.from(allRoutes));\n }\n\n router.subscribe((state) => {\n const location = state.location;\n if (state.historyAction === 'PUSH' || state.historyAction === 'POP') {\n handleNavigation({\n location,\n routes,\n navigationType: state.historyAction,\n version,\n basename,\n allRoutes: Array.from(allRoutes),\n });\n }\n });\n\n return router;\n };\n}\n\n/**\n * Creates a browser tracing integration that can be used with all React Router v6 compatible versions.\n */\nfunction createReactRouterV6CompatibleTracingIntegration(\n options,\n version,\n) {\n const integration = browserTracingIntegration({\n ...options,\n instrumentPageLoad: false,\n instrumentNavigation: false,\n });\n\n const {\n useEffect,\n useLocation,\n useNavigationType,\n createRoutesFromChildren,\n matchRoutes,\n stripBasename,\n instrumentPageLoad = true,\n instrumentNavigation = true,\n } = options;\n\n return {\n ...integration,\n setup() {\n _useEffect = useEffect;\n _useLocation = useLocation;\n _useNavigationType = useNavigationType;\n _matchRoutes = matchRoutes;\n _createRoutesFromChildren = createRoutesFromChildren;\n _stripBasename = stripBasename || false;\n },\n afterAllSetup(client) {\n integration.afterAllSetup(client);\n\n const initPathName = WINDOW.location?.pathname;\n if (instrumentPageLoad && initPathName) {\n startBrowserTracingPageLoadSpan(client, {\n name: initPathName,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.pageload.react.reactrouter_v${version}`,\n },\n });\n }\n\n if (instrumentNavigation) {\n CLIENTS_WITH_INSTRUMENT_NAVIGATION.add(client);\n }\n },\n };\n}\n\nfunction createV6CompatibleWrapUseRoutes(origUseRoutes, version) {\n if (!_useEffect || !_useLocation || !_useNavigationType || !_matchRoutes) {\n DEBUG_BUILD &&\n logger.warn(\n 'reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters.',\n );\n\n return origUseRoutes;\n }\n\n const SentryRoutes\n\n = (props) => {\n const isMountRenderPass = React.useRef(true);\n const { routes, locationArg } = props;\n\n const Routes = origUseRoutes(routes, locationArg);\n\n const location = _useLocation();\n const navigationType = _useNavigationType();\n\n // A value with stable identity to either pick `locationArg` if available or `location` if not\n const stableLocationParam =\n typeof locationArg === 'string' || locationArg?.pathname ? (locationArg ) : location;\n\n _useEffect(() => {\n const normalizedLocation =\n typeof stableLocationParam === 'string' ? { pathname: stableLocationParam } : stableLocationParam;\n\n if (isMountRenderPass.current) {\n addRoutesToAllRoutes(routes);\n\n updatePageloadTransaction(\n getActiveRootSpan(),\n normalizedLocation,\n routes,\n undefined,\n undefined,\n Array.from(allRoutes),\n );\n isMountRenderPass.current = false;\n } else {\n handleNavigation({\n location: normalizedLocation,\n routes,\n navigationType,\n version,\n allRoutes: Array.from(allRoutes),\n });\n }\n }, [navigationType, stableLocationParam]);\n\n return Routes;\n };\n\n // eslint-disable-next-line react/display-name\n return (routes, locationArg) => {\n return React.createElement(SentryRoutes, { routes: routes, locationArg: locationArg,} );\n };\n}\n\nfunction handleNavigation(opts\n\n) {\n const { location, routes, navigationType, version, matches, basename, allRoutes } = opts;\n const branches = Array.isArray(matches) ? matches : _matchRoutes(routes, location, basename);\n\n const client = getClient();\n if (!client || !CLIENTS_WITH_INSTRUMENT_NAVIGATION.has(client)) {\n return;\n }\n\n if ((navigationType === 'PUSH' || navigationType === 'POP') && branches) {\n let name,\n source = 'url';\n const isInDescendantRoute = locationIsInsideDescendantRoute(location, allRoutes || routes);\n\n if (isInDescendantRoute) {\n name = prefixWithSlash(rebuildRoutePathFromAllRoutes(allRoutes || routes, location));\n source = 'route';\n }\n\n if (!isInDescendantRoute || !name) {\n [name, source] = getNormalizedName(routes, location, branches, basename);\n }\n\n const activeSpan = getActiveSpan();\n const isAlreadyInNavigationSpan = activeSpan && spanToJSON(activeSpan).op === 'navigation';\n\n // Cross usage can result in multiple navigation spans being created without this check\n if (isAlreadyInNavigationSpan) {\n activeSpan?.updateName(name);\n activeSpan?.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);\n } else {\n startBrowserTracingNavigationSpan(client, {\n name,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.navigation.react.reactrouter_v${version}`,\n },\n });\n }\n }\n}\n\n/**\n * Strip the basename from a pathname if exists.\n *\n * Vendored and modified from `react-router`\n * https://github.com/remix-run/react-router/blob/462bb712156a3f739d6139a0f14810b76b002df6/packages/router/utils.ts#L1038\n */\nfunction stripBasenameFromPathname(pathname, basename) {\n if (!basename || basename === '/') {\n return pathname;\n }\n\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return pathname;\n }\n\n // We want to leave trailing slash behavior in the user's control, so if they\n // specify a basename with a trailing slash, we should support it\n const startIndex = basename.endsWith('/') ? basename.length - 1 : basename.length;\n const nextChar = pathname.charAt(startIndex);\n if (nextChar && nextChar !== '/') {\n // pathname does not start with basename/\n return pathname;\n }\n\n return pathname.slice(startIndex) || '/';\n}\n\nfunction sendIndexPath(pathBuilder, pathname, basename) {\n const reconstructedPath = pathBuilder || _stripBasename ? stripBasenameFromPathname(pathname, basename) : pathname;\n\n const formattedPath =\n // If the path ends with a slash, remove it\n reconstructedPath[reconstructedPath.length - 1] === '/'\n ? reconstructedPath.slice(0, -1)\n : // If the path ends with a wildcard, remove it\n reconstructedPath.slice(-2) === '/*'\n ? reconstructedPath.slice(0, -1)\n : reconstructedPath;\n\n return [formattedPath, 'route'];\n}\n\nfunction pathEndsWithWildcard(path) {\n return path.endsWith('*');\n}\n\nfunction pathIsWildcardAndHasChildren(path, branch) {\n return (pathEndsWithWildcard(path) && !!branch.route.children?.length) || false;\n}\n\nfunction routeIsDescendant(route) {\n return !!(!route.children && route.element && route.path?.endsWith('/*'));\n}\n\nfunction locationIsInsideDescendantRoute(location, routes) {\n const matchedRoutes = _matchRoutes(routes, location) ;\n\n if (matchedRoutes) {\n for (const match of matchedRoutes) {\n if (routeIsDescendant(match.route) && pickSplat(match)) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nfunction addRoutesToAllRoutes(routes) {\n routes.forEach(route => {\n const extractedChildRoutes = getChildRoutesRecursively(route);\n\n extractedChildRoutes.forEach(r => {\n allRoutes.add(r);\n });\n });\n}\n\nfunction getChildRoutesRecursively(route, allRoutes = new Set()) {\n if (!allRoutes.has(route)) {\n allRoutes.add(route);\n\n if (route.children && !route.index) {\n route.children.forEach(child => {\n const childRoutes = getChildRoutesRecursively(child, allRoutes);\n\n childRoutes.forEach(r => {\n allRoutes.add(r);\n });\n });\n }\n }\n\n return allRoutes;\n}\n\nfunction pickPath(match) {\n return trimWildcard(match.route.path || '');\n}\n\nfunction pickSplat(match) {\n return match.params['*'] || '';\n}\n\nfunction trimWildcard(path) {\n return path[path.length - 1] === '*' ? path.slice(0, -1) : path;\n}\n\nfunction trimSlash(path) {\n return path[path.length - 1] === '/' ? path.slice(0, -1) : path;\n}\n\nfunction prefixWithSlash(path) {\n return path[0] === '/' ? path : `/${path}`;\n}\n\nfunction rebuildRoutePathFromAllRoutes(allRoutes, location) {\n const matchedRoutes = _matchRoutes(allRoutes, location) ;\n\n if (!matchedRoutes || matchedRoutes.length === 0) {\n return '';\n }\n\n for (const match of matchedRoutes) {\n if (match.route.path && match.route.path !== '*') {\n const path = pickPath(match);\n const strippedPath = stripBasenameFromPathname(location.pathname, prefixWithSlash(match.pathnameBase));\n\n if (location.pathname === strippedPath) {\n return trimSlash(strippedPath);\n }\n\n return trimSlash(\n trimSlash(path || '') +\n prefixWithSlash(\n rebuildRoutePathFromAllRoutes(\n allRoutes.filter(route => route !== match.route),\n {\n pathname: strippedPath,\n },\n ),\n ),\n );\n }\n }\n\n return '';\n}\n\nfunction getNormalizedName(\n routes,\n location,\n branches,\n basename = '',\n) {\n if (!routes || routes.length === 0) {\n return [_stripBasename ? stripBasenameFromPathname(location.pathname, basename) : location.pathname, 'url'];\n }\n\n let pathBuilder = '';\n if (branches) {\n for (const branch of branches) {\n const route = branch.route;\n if (route) {\n // Early return if index route\n if (route.index) {\n return sendIndexPath(pathBuilder, branch.pathname, basename);\n }\n const path = route.path;\n\n // If path is not a wildcard and has no child routes, append the path\n if (path && !pathIsWildcardAndHasChildren(path, branch)) {\n const newPath = path[0] === '/' || pathBuilder[pathBuilder.length - 1] === '/' ? path : `/${path}`;\n pathBuilder = trimSlash(pathBuilder) + prefixWithSlash(newPath);\n\n // If the path matches the current location, return the path\n if (trimSlash(location.pathname) === trimSlash(basename + branch.pathname)) {\n if (\n // If the route defined on the element is something like\n // Product} />\n // We should check against the branch.pathname for the number of / separators\n getNumberOfUrlSegments(pathBuilder) !== getNumberOfUrlSegments(branch.pathname) &&\n // We should not count wildcard operators in the url segments calculation\n !pathEndsWithWildcard(pathBuilder)\n ) {\n return [(_stripBasename ? '' : basename) + newPath, 'route'];\n }\n\n // if the last character of the pathbuilder is a wildcard and there are children, remove the wildcard\n if (pathIsWildcardAndHasChildren(pathBuilder, branch)) {\n pathBuilder = pathBuilder.slice(0, -1);\n }\n\n return [(_stripBasename ? '' : basename) + pathBuilder, 'route'];\n }\n }\n }\n }\n }\n\n const fallbackTransactionName = _stripBasename\n ? stripBasenameFromPathname(location.pathname, basename)\n : location.pathname || '/';\n\n return [fallbackTransactionName, 'url'];\n}\n\nfunction updatePageloadTransaction(\n activeRootSpan,\n location,\n routes,\n matches,\n basename,\n allRoutes,\n) {\n const branches = Array.isArray(matches)\n ? matches\n : (_matchRoutes(allRoutes || routes, location, basename) );\n\n if (branches) {\n let name,\n source = 'url';\n\n const isInDescendantRoute = locationIsInsideDescendantRoute(location, allRoutes || routes);\n\n if (isInDescendantRoute) {\n name = prefixWithSlash(rebuildRoutePathFromAllRoutes(allRoutes || routes, location));\n source = 'route';\n }\n\n if (!isInDescendantRoute || !name) {\n [name, source] = getNormalizedName(routes, location, branches, basename);\n }\n\n getCurrentScope().setTransactionName(name || '/');\n\n if (activeRootSpan) {\n activeRootSpan.updateName(name);\n activeRootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);\n }\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createV6CompatibleWithSentryReactRouterRouting(\n Routes,\n version,\n) {\n if (!_useEffect || !_useLocation || !_useNavigationType || !_createRoutesFromChildren || !_matchRoutes) {\n DEBUG_BUILD &&\n logger.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.\n useEffect: ${_useEffect}. useLocation: ${_useLocation}. useNavigationType: ${_useNavigationType}.\n createRoutesFromChildren: ${_createRoutesFromChildren}. matchRoutes: ${_matchRoutes}.`);\n\n return Routes;\n }\n\n const SentryRoutes = (props) => {\n const isMountRenderPass = React.useRef(true);\n\n const location = _useLocation();\n const navigationType = _useNavigationType();\n\n _useEffect(\n () => {\n const routes = _createRoutesFromChildren(props.children) ;\n\n if (isMountRenderPass.current) {\n addRoutesToAllRoutes(routes);\n\n updatePageloadTransaction(getActiveRootSpan(), location, routes, undefined, undefined, Array.from(allRoutes));\n isMountRenderPass.current = false;\n } else {\n handleNavigation({\n location,\n routes,\n navigationType,\n version,\n allRoutes: Array.from(allRoutes),\n });\n }\n },\n // `props.children` is purposely not included in the dependency array, because we do not want to re-run this effect\n // when the children change. We only want to start transactions when the location or navigation type change.\n [location, navigationType],\n );\n\n // @ts-expect-error Setting more specific React Component typing for `R` generic above\n // will break advanced type inference done by react router params\n return React.createElement(Routes, { ...props,} );\n };\n\n hoistNonReactStatics(SentryRoutes, Routes);\n\n // @ts-expect-error Setting more specific React Component typing for `R` generic above\n // will break advanced type inference done by react router params\n return SentryRoutes;\n}\n\nfunction getActiveRootSpan() {\n const span = getActiveSpan();\n const rootSpan = span ? getRootSpan(span) : undefined;\n\n if (!rootSpan) {\n return undefined;\n }\n\n const op = spanToJSON(rootSpan).op;\n\n // Only use this root span if it is a pageload or navigation span\n return op === 'navigation' || op === 'pageload' ? rootSpan : undefined;\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n */\nfunction getNumberOfUrlSegments(url) {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter(s => s.length > 0 && s !== ',').length;\n}\n\nexport { createReactRouterV6CompatibleTracingIntegration, createV6CompatibleWithSentryReactRouterRouting, createV6CompatibleWrapCreateBrowserRouter, createV6CompatibleWrapCreateMemoryRouter, createV6CompatibleWrapUseRoutes, getNumberOfUrlSegments, handleNavigation };\n//# sourceMappingURL=reactrouterv6-compat-utils.js.map\n","import { createReactRouterV6CompatibleTracingIntegration, createV6CompatibleWrapUseRoutes, createV6CompatibleWrapCreateBrowserRouter, createV6CompatibleWrapCreateMemoryRouter, createV6CompatibleWithSentryReactRouterRouting } from './reactrouterv6-compat-utils.js';\n\n/**\n * A browser tracing integration that uses React Router v6 to instrument navigations.\n * Expects `useEffect`, `useLocation`, `useNavigationType`, `createRoutesFromChildren` and `matchRoutes` to be passed as options.\n */\nfunction reactRouterV6BrowserTracingIntegration(\n options,\n) {\n return createReactRouterV6CompatibleTracingIntegration(options, '6');\n}\n\n/**\n * A wrapper function that adds Sentry routing instrumentation to a React Router v6 useRoutes hook.\n * This is used to automatically capture route changes as transactions when using the useRoutes hook.\n */\nfunction wrapUseRoutesV6(origUseRoutes) {\n return createV6CompatibleWrapUseRoutes(origUseRoutes, '6');\n}\n\n/**\n * A wrapper function that adds Sentry routing instrumentation to a React Router v6 createBrowserRouter function.\n * This is used to automatically capture route changes as transactions when using the createBrowserRouter API.\n */\nfunction wrapCreateBrowserRouterV6\n\n(createRouterFunction) {\n return createV6CompatibleWrapCreateBrowserRouter(createRouterFunction, '6');\n}\n\n/**\n * A wrapper function that adds Sentry routing instrumentation to a React Router v6 createMemoryRouter function.\n * This is used to automatically capture route changes as transactions when using the createMemoryRouter API.\n * The difference between createBrowserRouter and createMemoryRouter is that with createMemoryRouter,\n * optional `initialEntries` are also taken into account.\n */\nfunction wrapCreateMemoryRouterV6\n\n(createMemoryRouterFunction) {\n return createV6CompatibleWrapCreateMemoryRouter(createMemoryRouterFunction, '6');\n}\n\n/**\n * A higher-order component that adds Sentry routing instrumentation to a React Router v6 Route component.\n * This is used to automatically capture route changes as transactions.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction withSentryReactRouterV6Routing(routes) {\n return createV6CompatibleWithSentryReactRouterRouting(routes, '6');\n}\n\nexport { reactRouterV6BrowserTracingIntegration, withSentryReactRouterV6Routing, wrapCreateBrowserRouterV6, wrapCreateMemoryRouterV6, wrapUseRoutesV6 };\n//# sourceMappingURL=reactrouterv6.js.map\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || (ret === void 0 && valueA !== valueB)) {\n return false;\n }\n }\n\n return true;\n};\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\nexport var SCOPE = '@scope'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @param {number} position\n * @return {number}\n */\nexport function indexof (value, search, position) {\n\treturn value.indexOf(search, position)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n\n/**\n * @param {string[]} array\n * @param {RegExp} pattern\n * @return {string[]}\n */\nexport function filter (array, pattern) {\n\treturn array.filter(function (value) { return !match(value, pattern) })\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {object[]} siblings\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length, siblings) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)\n}\n\n/**\n * @param {object} root\n */\nexport function lift (root) {\n\twhile (root.root)\n\t\troot = copy(root.root, {children: [root]})\n\n\tappend(root, root.siblings)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f', abs(index ? points[index - 1] : 0)) != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @param {object[]} siblings\n * @return {object}\n */\nexport function comment (value, root, parent, siblings) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function declaration (value, root, parent, length, siblings) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)\n}\n","import {MS, MOZ, WEBKIT} from './Enum.js'\nimport {hash, charat, strlen, indexof, replace, substr, match} from './Utility.js'\n\n/**\n * @param {string} value\n * @param {number} length\n * @param {object[]} children\n * @return {string}\n */\nexport function prefix (value, length, children) {\n\tswitch (hash(value, length)) {\n\t\t// color-adjust\n\t\tcase 5103:\n\t\t\treturn WEBKIT + 'print-' + value + value\n\t\t// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\t\tcase 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:\n\t\t// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\t\tcase 5572: case 6356: case 5844: case 3191: case 6645: case 3005:\n\t\t// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\t\tcase 6391: case 5879: case 5623: case 6135: case 4599: case 4855:\n\t\t// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\t\tcase 4215: case 6389: case 5109: case 5365: case 5621: case 3829:\n\t\t\treturn WEBKIT + value + value\n\t\t// tab-size\n\t\tcase 4789:\n\t\t\treturn MOZ + value + value\n\t\t// appearance, user-select, transform, hyphens, text-size-adjust\n\t\tcase 5349: case 4246: case 4810: case 6968: case 2756:\n\t\t\treturn WEBKIT + value + MOZ + value + MS + value + value\n\t\t// writing-mode\n\t\tcase 5936:\n\t\t\tswitch (charat(value, length + 11)) {\n\t\t\t\t// vertical-l(r)\n\t\t\t\tcase 114:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value\n\t\t\t\t// vertical-r(l)\n\t\t\t\tcase 108:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value\n\t\t\t\t// horizontal(-)tb\n\t\t\t\tcase 45:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value\n\t\t\t\t// default: fallthrough to below\n\t\t\t}\n\t\t// flex, flex-direction, scroll-snap-type, writing-mode\n\t\tcase 6828: case 4268: case 2903:\n\t\t\treturn WEBKIT + value + MS + value + value\n\t\t// order\n\t\tcase 6165:\n\t\t\treturn WEBKIT + value + MS + 'flex-' + value + value\n\t\t// align-items\n\t\tcase 5187:\n\t\t\treturn WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value\n\t\t// align-self\n\t\tcase 5443:\n\t\t\treturn WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/g, '') + (!match(value, /flex-|baseline/) ? MS + 'grid-row-' + replace(value, /flex-|-self/g, '') : '') + value\n\t\t// align-content\n\t\tcase 4675:\n\t\t\treturn WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/g, '') + value\n\t\t// flex-shrink\n\t\tcase 5548:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value\n\t\t// flex-basis\n\t\tcase 5292:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value\n\t\t// flex-grow\n\t\tcase 6060:\n\t\t\treturn WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value\n\t\t// transition\n\t\tcase 4554:\n\t\t\treturn WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value\n\t\t// cursor\n\t\tcase 6187:\n\t\t\treturn replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value\n\t\t// background, background-image\n\t\tcase 5495: case 3959:\n\t\t\treturn replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1')\n\t\t// justify-content\n\t\tcase 4968:\n\t\t\treturn replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value\n\t\t// justify-self\n\t\tcase 4200:\n\t\t\tif (!match(value, /flex-|baseline/)) return MS + 'grid-column-align' + substr(value, length) + value\n\t\t\tbreak\n\t\t// grid-template-(columns|rows)\n\t\tcase 2592: case 3360:\n\t\t\treturn MS + replace(value, 'template-', '') + value\n\t\t// grid-(row|column)-start\n\t\tcase 4384: case 3616:\n\t\t\tif (children && children.some(function (element, index) { return length = index, match(element.props, /grid-\\w+-end/) })) {\n\t\t\t\treturn ~indexof(value + (children = children[length].value), 'span', 0) ? value : (MS + replace(value, '-start', '') + value + MS + 'grid-row-span:' + (~indexof(children, 'span', 0) ? match(children, /\\d+/) : +match(children, /\\d+/) - +match(value, /\\d+/)) + ';')\n\t\t\t}\n\t\t\treturn MS + replace(value, '-start', '') + value\n\t\t// grid-(row|column)-end\n\t\tcase 4896: case 4128:\n\t\t\treturn (children && children.some(function (element) { return match(element.props, /grid-\\w+-start/) })) ? value : MS + replace(replace(value, '-end', '-span'), 'span ', '') + value\n\t\t// (margin|padding)-inline-(start|end)\n\t\tcase 4095: case 3583: case 4068: case 2532:\n\t\t\treturn replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value\n\t\t// (min|max)?(width|height|inline-size|block-size)\n\t\tcase 8116: case 7059: case 5753: case 5535:\n\t\tcase 5445: case 5701: case 4933: case 4677:\n\t\tcase 5533: case 5789: case 5021: case 4765:\n\t\t\t// stretch, max-content, min-content, fill-available\n\t\t\tif (strlen(value) - 1 - length > 6)\n\t\t\t\tswitch (charat(value, length + 1)) {\n\t\t\t\t\t// (m)ax-content, (m)in-content\n\t\t\t\t\tcase 109:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (charat(value, length + 4) !== 45)\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t// (f)ill-available, (f)it-content\n\t\t\t\t\tcase 102:\n\t\t\t\t\t\treturn replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value\n\t\t\t\t\t// (s)tretch\n\t\t\t\t\tcase 115:\n\t\t\t\t\t\treturn ~indexof(value, 'stretch', 0) ? prefix(replace(value, 'stretch', 'fill-available'), length, children) + value : value\n\t\t\t\t}\n\t\t\tbreak\n\t\t// grid-(column|row)\n\t\tcase 5152: case 5920:\n\t\t\treturn replace(value, /(.+?):(\\d+)(\\s*\\/\\s*(span)?\\s*(\\d+))?(.*)/, function (_, a, b, c, d, e, f) { return (MS + a + ':' + b + f) + (c ? (MS + a + '-span:' + (d ? e : +e - +b)) + f : '') + value })\n\t\t// position: sticky\n\t\tcase 4949:\n\t\t\t// stick(y)?\n\t\t\tif (charat(value, length + 6) === 121)\n\t\t\t\treturn replace(value, ':', ':' + WEBKIT) + value\n\t\t\tbreak\n\t\t// display: (flex|inline-flex|grid|inline-grid)\n\t\tcase 6444:\n\t\t\tswitch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {\n\t\t\t\t// (inline-)?fle(x)\n\t\t\t\tcase 120:\n\t\t\t\t\treturn replace(value, /(.+:)([^;\\s!]+)(;|(\\s+)?!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value\n\t\t\t\t// (inline-)?gri(d)\n\t\t\t\tcase 100:\n\t\t\t\t\treturn replace(value, ':', ':' + MS) + value\n\t\t\t}\n\t\t\tbreak\n\t\t// scroll-margin, scroll-margin-(top|right|bottom|left)\n\t\tcase 5719: case 2647: case 2135: case 3927: case 2391:\n\t\t\treturn replace(value, 'scroll-', 'scroll-snap-') + value\n\t}\n\n\treturn value\n}\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\n\tfor (var i = 0; i < children.length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: if (!strlen(element.value = element.props.join(','))) return ''\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine, filter, assign} from './Utility.js'\nimport {copy, lift, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(children = element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, callback = /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","import{__spreadArray as e,__assign as t}from\"tslib\";import n from\"@emotion/is-prop-valid\";import o,{useRef as r,useState as s,useMemo as i,useEffect as a,useContext as c,useDebugValue as l,createElement as u}from\"react\";import p from\"shallowequal\";import*as d from\"stylis\";import h from\"@emotion/unitless\";var f=\"undefined\"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||\"data-styled\",m=\"active\",y=\"data-styled-version\",v=\"6.1.15\",g=\"/*!sc*/\\n\",S=\"undefined\"!=typeof window&&\"HTMLElement\"in window,w=Boolean(\"boolean\"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:\"undefined\"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&\"\"!==process.env.REACT_APP_SC_DISABLE_SPEEDY?\"false\"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:\"undefined\"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&\"\"!==process.env.SC_DISABLE_SPEEDY?\"false\"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:\"production\"!==process.env.NODE_ENV),b={},E=/invalid hook call/i,N=new Set,P=function(t,n){if(\"production\"!==process.env.NODE_ENV){var o=n?' with the id of \"'.concat(n,'\"'):\"\",s=\"The component \".concat(t).concat(o,\" has been created dynamically.\\n\")+\"You may see this warning because you've called styled inside another component.\\nTo resolve this only create new StyledComponents outside of any render method and function component.\",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],o=1;o?@[\\\\\\]^`{|}~-]+/g,D=/(^-|-$)/g;function R(e){return e.replace(O,\"-\").replace(D,\"\")}var T=/(a)(d)/gi,k=52,j=function(e){return String.fromCharCode(e+(e>25?39:97))};function x(e){var t,n=\"\";for(t=Math.abs(e);t>k;t=t/k|0)n=j(t%k)+n;return(j(t%k)+n).replace(T,\"$1-$2\")}var V,F=5381,M=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},z=function(e){return M(F,e)};function $(e){return x(z(e)>>>0)}function B(e){return\"production\"!==process.env.NODE_ENV&&\"string\"==typeof e&&e||e.displayName||e.name||\"Component\"}function L(e){return\"string\"==typeof e&&(\"production\"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var G=\"function\"==typeof Symbol&&Symbol.for,Y=G?Symbol.for(\"react.memo\"):60115,W=G?Symbol.for(\"react.forward_ref\"):60112,q={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},H={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},U={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},J=((V={})[W]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V[Y]=U,V);function X(e){return(\"type\"in(t=e)&&t.type.$$typeof)===Y?U:\"$$typeof\"in e?J[e.$$typeof]:q;var t}var Z=Object.defineProperty,K=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,ee=Object.getOwnPropertyDescriptor,te=Object.getPrototypeOf,ne=Object.prototype;function oe(e,t,n){if(\"string\"!=typeof t){if(ne){var o=te(t);o&&o!==ne&&oe(e,o,n)}var r=K(t);Q&&(r=r.concat(Q(t)));for(var s=X(e),i=X(t),a=0;a ({})}\\n```\\n\\n',8:'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',9:\"Missing document ``\\n\\n\",10:\"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",11:\"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",12:\"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n\",13:\"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",14:'ThemeProvider: \"theme\" prop is required.\\n\\n',15:\"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to ``, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",16:\"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",17:\"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\",18:\"ThemeProvider: Please make sure your useTheme hook is within a ``\"}:{};function de(){for(var e=[],t=0;t0?\" Args: \".concat(n.join(\", \")):\"\")):new Error(de.apply(void 0,e([pe[t]],n,!1)).trim())}var fe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,r=o;e>=r;)if((r<<=1)<0)throw he(16,\"\".concat(e));this.groupSizes=new Uint32Array(r),this.groupSizes.set(n),this.length=r;for(var s=o;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],o=this.indexOfGroup(e),r=o+n,s=o;sme))throw he(16,\"\".concat(t));return ye.set(e,t),ve.set(t,e),t},we=function(e,t){ge=t+1,ye.set(e,t),ve.set(t,e)},be=\"style[\".concat(f,\"][\").concat(y,'=\"').concat(v,'\"]'),Ee=new RegExp(\"^\".concat(f,'\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)')),Ne=function(e,t,n){for(var o,r=n.split(\",\"),s=0,i=r.length;s=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(c+=\"\".concat(e,\",\"))}),o+=\"\".concat(i).concat(a,'{content:\"').concat(c,'\"}').concat(g)},s=0;s0?\".\".concat(t):e},u=c.slice();u.push(function(e){e.type===d.RULESET&&e.value.includes(\"&\")&&(e.props[0]=e.props[0].replace(je,n).replace(o,l))}),i.prefix&&u.push(d.prefixer),u.push(d.stringify);var p=function(e,r,s,a){void 0===r&&(r=\"\"),void 0===s&&(s=\"\"),void 0===a&&(a=\"&\"),t=a,n=r,o=new RegExp(\"\\\\\".concat(n,\"\\\\b\"),\"g\");var c=e.replace(xe,\"\"),l=d.compile(s||r?\"\".concat(s,\" \").concat(r,\" { \").concat(c,\" }\"):c);i.namespace&&(l=Ve(l,i.namespace));var p=[];return d.serialize(l,d.middleware(u.concat(d.rulesheet(function(e){return p.push(e)})))),p};return p.hash=c.length?c.reduce(function(e,t){return t.name||he(15),M(e,t.name)},F).toString():\"\",p}var Me=new ke,ze=Fe(),$e=o.createContext({shouldForwardProp:void 0,styleSheet:Me,stylis:ze}),Be=$e.Consumer,Le=o.createContext(void 0);function Ge(){return c($e)}function Ye(e){var t=s(e.stylisPlugins),n=t[0],r=t[1],c=Ge().styleSheet,l=i(function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,c]),u=i(function(){return Fe({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);a(function(){p(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var d=i(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:l,stylis:u}},[e.shouldForwardProp,l,u]);return o.createElement($e.Provider,{value:d},o.createElement(Le.Provider,{value:u},e.children))}var We=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ze);var o=n.name+t.hash;e.hasNameForId(n.id,o)||e.insertRules(n.id,o,t(n.rules,o,\"@keyframes\"))},this.name=e,this.id=\"sc-keyframes-\".concat(e),this.rules=t,ue(this,function(){throw he(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=ze),this.name+e.hash},e}(),qe=function(e){return e>=\"A\"&&e<=\"Z\"};function He(e){for(var t=\"\",n=0;n>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(r,\".\".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}o=ie(o,s),this.staticRulesId=s}else{for(var a=M(this.baseHash,n.hash),c=\"\",l=0;l>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,\".\".concat(d),void 0,this.componentId)),o=ie(o,d)}}return o},e}(),et=o.createContext(void 0),tt=et.Consumer;function nt(){var e=c(et);if(!e)throw he(18);return e}function ot(e){var n=o.useContext(et),r=i(function(){return function(e,n){if(!e)throw he(14);if(re(e)){var o=e(n);if(\"production\"!==process.env.NODE_ENV&&(null===o||Array.isArray(o)||\"object\"!=typeof o))throw he(7);return o}if(Array.isArray(e)||\"object\"!=typeof e)throw he(8);return n?t(t({},n),e):e}(e.theme,n)},[e.theme,n]);return e.children?o.createElement(et.Provider,{value:r},e.children):null}var rt={},st=new Set;function it(e,r,s){var i=se(e),a=e,c=!L(e),p=r.attrs,d=void 0===p?_:p,h=r.componentId,f=void 0===h?function(e,t){var n=\"string\"!=typeof e?\"sc\":R(e);rt[n]=(rt[n]||0)+1;var o=\"\".concat(n,\"-\").concat($(v+n+rt[n]));return t?\"\".concat(t,\"-\").concat(o):o}(r.displayName,r.parentComponentId):h,m=r.displayName,y=void 0===m?function(e){return L(e)?\"styled.\".concat(e):\"Styled(\".concat(B(e),\")\")}(e):m,g=r.displayName&&r.componentId?\"\".concat(R(r.displayName),\"-\").concat(r.componentId):r.componentId||f,S=i&&a.attrs?a.attrs.concat(d).filter(Boolean):d,w=r.shouldForwardProp;if(i&&a.shouldForwardProp){var b=a.shouldForwardProp;if(r.shouldForwardProp){var E=r.shouldForwardProp;w=function(e,t){return b(e,t)&&E(e,t)}}else w=b}var N=new Qe(s,g,i?a.componentStyle:void 0);function O(e,r){return function(e,r,s){var i=e.attrs,a=e.componentStyle,c=e.defaultProps,p=e.foldedComponentIds,d=e.styledComponentId,h=e.target,f=o.useContext(et),m=Ge(),y=e.shouldForwardProp||m.shouldForwardProp;\"production\"!==process.env.NODE_ENV&&l(d);var v=I(r,f,c)||C,g=function(e,n,o){for(var r,s=t(t({},n),{className:void 0,theme:o}),i=0;i` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var E=function(e,t){var n=Ge(),o=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return\"production\"!==process.env.NODE_ENV&&l(o),o}(a,g);\"production\"!==process.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(E);var N=ie(p,d);return E&&(N+=\" \"+E),g.className&&(N+=\" \"+g.className),w[L(S)&&!A.has(S)?\"class\":\"className\"]=N,s&&(w.ref=s),u(S,w)}(D,e,r)}O.displayName=y;var D=o.forwardRef(O);return D.attrs=S,D.componentStyle=N,D.displayName=y,D.shouldForwardProp=w,D.foldedComponentIds=i?ie(a.foldedComponentIds,a.styledComponentId):\"\",D.styledComponentId=g,D.target=i?a.target:e,Object.defineProperty(D,\"defaultProps\",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],n=1;n=200)){var s=t?' with the id of \"'.concat(t,'\"'):\"\";console.warn(\"Over \".concat(200,\" classes were generated for component \").concat(e).concat(s,\".\\n\")+\"Consider using the attrs method, together with a style object for frequently changed styles.\\nExample:\\n const Component = styled.div.attrs(props => ({\\n style: {\\n background: props.background,\\n },\\n }))`width: 100%;`\\n\\n \"),o=!0,n={}}}}(y,g)),ue(D,function(){return\".\".concat(D.styledComponentId)}),c&&oe(D,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),D}function at(e,t){for(var n=[e[0]],o=0,r=t.length;o2&&ke.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)},e}();function ft(n){for(var r=[],s=1;s meta tag to the stylesheet, or simply embedding it manually in your index.html section for a simpler app.\"),t.styleSheet.server&&u(r,e,t.styleSheet,n,t.stylis),o.useLayoutEffect(function(){if(!t.styleSheet.server)return u(r,e,t.styleSheet,n,t.stylis),function(){return c.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function u(e,n,o,r,s){if(c.isStatic)c.renderStyles(e,b,o,s);else{var i=t(t({},n),{theme:I(n,r,l.defaultProps)});c.renderStyles(e,i,o,s)}}return o.memo(l)}function mt(t){for(var n=[],o=1;o\").concat(t,\"\")},this.getStyleTags=function(){if(e.sealed)throw he(2);return e._emitSheetCSS()},this.getStyleElement=function(){var n;if(e.sealed)throw he(2);var r=e.instance.toString();if(!r)return[];var s=((n={})[f]=\"\",n[y]=v,n.dangerouslySetInnerHTML={__html:r},n),i=Ce();return i&&(s.nonce=i),[o.createElement(\"style\",t({},s,{key:\"sc-0-0\"}))]},this.seal=function(){e.sealed=!0},this.instance=new ke({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw he(2);return o.createElement(Ye,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw he(3)},e}(),gt={StyleSheet:ke,mainSheet:Me};\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"It looks like you've imported 'styled-components' on React Native.\\nPerhaps you're looking to import 'styled-components/native'?\\nRead more about this at https://www.styled-components.com/docs/basics#react-native\");var St=\"__sc-\".concat(f,\"__\");\"production\"!==process.env.NODE_ENV&&\"test\"!==process.env.NODE_ENV&&\"undefined\"!=typeof window&&(window[St]||(window[St]=0),1===window[St]&&console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\\n\\nSee https://s-c.sh/2BAXzed for more info.\"),window[St]+=1);export{vt as ServerStyleSheet,Be as StyleSheetConsumer,$e as StyleSheetContext,Ye as StyleSheetManager,tt as ThemeConsumer,et as ThemeContext,ot as ThemeProvider,gt as __PRIVATE__,ft as createGlobalStyle,lt as css,dt as default,se as isStyledComponent,mt as keyframes,dt as styled,nt as useTheme,v as version,yt as withTheme};\n//# sourceMappingURL=styled-components.browser.esm.js.map\n","var SkapaDelayEnum;\n(function (SkapaDelayEnum) {\n SkapaDelayEnum[\"tight\"] = \"33ms\";\n SkapaDelayEnum[\"standard\"] = \"100ms\";\n SkapaDelayEnum[\"emphasised\"] = \"150ms\";\n})(SkapaDelayEnum || (SkapaDelayEnum = {}));\nexport default SkapaDelayEnum;\n//# sourceMappingURL=SkapaDelayEnum.js.map","var SkapaDurationEnum;\n(function (SkapaDurationEnum) {\n SkapaDurationEnum[\"instant\"] = \"0ms\";\n SkapaDurationEnum[\"quick\"] = \"100ms\";\n SkapaDurationEnum[\"standard\"] = \"200ms\";\n SkapaDurationEnum[\"slow\"] = \"250ms\";\n})(SkapaDurationEnum || (SkapaDurationEnum = {}));\nexport default SkapaDurationEnum;\n//# sourceMappingURL=SkapaDurationEnum.js.map","var SkapaFontSizeEnum;\n(function (SkapaFontSizeEnum) {\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize50\"] = 12] = \"fontSize50\";\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize75\"] = 14] = \"fontSize75\";\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize100\"] = 16] = \"fontSize100\";\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize200\"] = 18] = \"fontSize200\";\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize300\"] = 20] = \"fontSize300\";\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize400\"] = 22] = \"fontSize400\";\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize500\"] = 25] = \"fontSize500\";\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize600\"] = 28] = \"fontSize600\";\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize700\"] = 32] = \"fontSize700\";\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize800\"] = 36] = \"fontSize800\";\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize1000\"] = 45] = \"fontSize1000\";\n SkapaFontSizeEnum[SkapaFontSizeEnum[\"fontSize1100\"] = 50] = \"fontSize1100\";\n})(SkapaFontSizeEnum || (SkapaFontSizeEnum = {}));\nexport default SkapaFontSizeEnum;\n//# sourceMappingURL=SkapaFontSizeEnum.js.map","var SkapaIconDurationEnum;\n(function (SkapaIconDurationEnum) {\n SkapaIconDurationEnum[\"simple\"] = \"150ms\";\n SkapaIconDurationEnum[\"average\"] = \"300ms\";\n SkapaIconDurationEnum[\"complex\"] = \"600ms\";\n})(SkapaIconDurationEnum || (SkapaIconDurationEnum = {}));\nexport default SkapaIconDurationEnum;\n//# sourceMappingURL=SkapaIconDurationEnum.js.map","import SkapaDelayEnum from './enums/SkapaDelayEnum.js';\nimport SkapaDurationEnum from './enums/SkapaDurationEnum.js';\nimport SkapaFontSizeEnum from './enums/SkapaFontSizeEnum.js';\nimport SkapaIconDurationEnum from './enums/SkapaIconDurationEnum.js';\nexport default {\n /** @deprecated Use Skapas way of scaling instead. */\n scale: 1,\n color: {\n accent: {\n primaryAccent: '#0058a3',\n primaryAccentDark: '#004f93',\n primaryAccentDarkest: '#003e72',\n secondaryAccent: '#ffdb00',\n secondaryAccentDark: '#e6c200',\n secondaryAccentDarker: '#ccad00'\n },\n neutral: {\n white: '#ffffff',\n grey100: '#f5f5f5',\n grey200: '#dfdfdf',\n grey300: '#cccccc',\n grey500: '#929292',\n grey700: '#484848',\n grey900: '#111111'\n },\n commercialMessage: {\n newLowerPrice: '#cc0008',\n new: '#ca5008',\n btiYellow: '#ffdb00',\n btiRed: '#cc0008',\n family: '#007cc1'\n },\n semantic: {\n positive: '#0a8a00',\n negative: '#e00751',\n caution: '#f26a2f',\n informative: '#0058a3'\n },\n component: {\n dangerDefault: '#e00751',\n dangerHover: '#cc003d',\n dangerPress: '#b80029',\n primaryDefault: '#111111',\n primaryHover: '#333333',\n primaryPress: '#000000',\n inverseBorderPress: '#ffffff',\n primaryEmphasisedDefault: '#0058a3',\n primaryEmphasisedHover: '#004f93',\n primaryEmphasisedPress: '#003e72',\n switchOff: '#808080'\n },\n background: {\n default: '#ffffff',\n alt: '#f5f5f5',\n inverse: '#111111',\n accent: '#0058a3'\n },\n text: {\n default: '#484848',\n dark: '#111111',\n lightest: '#767676',\n inverse: '#ffffff'\n },\n border: {\n default: '#929292',\n dark: '#111111',\n light: '#dfdfdf',\n inverse: '#ffffff'\n },\n icon: {\n default: '#111111',\n favorite: '#e00751',\n light: '#929292',\n inverse: '#ffffff'\n },\n disabled: {\n default: '#dfdfdf'\n },\n transparency: {\n default: 'rgba(255,255,255,0)',\n light: 'rgba(0,0,0,0.15)',\n dark: 'rgba(0,0,0,0.7)'\n },\n campaign: {\n sustainability: '#00853e'\n }\n },\n border: {\n thickness: {\n thin: 1,\n thick: 2\n },\n radius: {\n radius4: 4,\n radius8: 8,\n radius12: 12,\n radius20: 20,\n radius64: 64\n }\n },\n fontFace: {\n family: 'notoIKEAlatin',\n fallbacks: ['Noto Sans', 'Roboto', 'Open Sans', 'sans-serif'],\n sources: [\n {\n formats: {\n ttf: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-BoldItalic.ttf',\n format: 'truetype'\n },\n woff: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-BoldItalic.woff',\n format: 'woff'\n },\n woff2: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-BoldItalic.woff2',\n format: 'woff2'\n }\n },\n weight: 700,\n style: 'italic'\n },\n {\n formats: {\n ttf: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-Bold.ttf',\n format: 'truetype'\n },\n woff: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-Bold.woff',\n format: 'woff'\n },\n woff2: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-Bold.woff2',\n format: 'woff2'\n }\n },\n weight: 700,\n style: 'normal'\n },\n {\n formats: {\n ttf: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-Italic.ttf',\n format: 'truetype'\n },\n woff: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-Italic.woff',\n format: 'woff'\n },\n woff2: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-Italic.woff2',\n format: 'woff2'\n }\n },\n weight: 400,\n style: 'italic'\n },\n {\n formats: {\n ttf: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-Regular.ttf',\n format: 'truetype'\n },\n woff: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-Regular.woff',\n format: 'woff'\n },\n woff2: {\n url: '/addon-app/components/resources/fonts/44/noto/NotoSansIKEA-Regular.woff2',\n format: 'woff2'\n }\n },\n weight: 400,\n style: 'normal'\n }\n ]\n },\n focusOutline: {\n offset: 4,\n width: 2,\n color: '#111111',\n transitionTime: 0.2,\n borderRadius: 2\n },\n spacing: {\n space25: 4,\n space50: 8,\n space75: 12,\n space100: 16,\n space125: 20,\n space150: 24,\n space200: 32,\n space250: 40,\n space300: 48,\n space400: 64,\n space550: 88,\n space750: 120\n },\n elevation: {\n size: {\n default: '0px 4px 16px'\n },\n color: {\n default: 'rgba(0,0,0,0.1)'\n }\n },\n motion: {\n ease: {\n easy: 'cubic-bezier(0.4, 0.0, 0.4, 1.0)',\n expressive: 'cubic-bezier(0.8, 0.0, 0.0, 1.0)',\n enter: 'cubic-bezier(0.0, 0.0, 0.1, 1.0)',\n exit: 'cubic-bezier(0.9, 0.0, 1.0, 1.0)',\n bob: 'cubic-bezier(0.45, 1.45, 0.65, 1.0)',\n linear: 'cubic-bezier(0,0,1,1)'\n },\n duration: {\n xsmall: SkapaDurationEnum.instant,\n small: SkapaDurationEnum.quick,\n medium: SkapaDurationEnum.standard,\n large: SkapaDurationEnum.slow\n },\n iconDuration: {\n small: SkapaIconDurationEnum.simple,\n medium: SkapaIconDurationEnum.average,\n large: SkapaIconDurationEnum.complex\n },\n delay: {\n small: SkapaDelayEnum.tight,\n medium: SkapaDelayEnum.standard,\n large: SkapaDelayEnum.emphasised\n }\n },\n breakpoint: {\n small: {\n width: 0,\n gridSpacing: {\n column: 4,\n gutter: 12\n },\n fontStyle: {\n bodyXLarge: { size: SkapaFontSizeEnum.fontSize300, lineHeight: 32 },\n bodyLarge: { size: SkapaFontSizeEnum.fontSize100, lineHeight: 26 },\n bodyMedium: { size: SkapaFontSizeEnum.fontSize75, lineHeight: 22 },\n bodySmall: { size: SkapaFontSizeEnum.fontSize50, lineHeight: 18 },\n headingXSmall: {\n size: SkapaFontSizeEnum.fontSize75,\n lineHeight: 22,\n weight: 700\n },\n headingSmall: {\n size: SkapaFontSizeEnum.fontSize100,\n lineHeight: 24,\n weight: 700\n },\n headingMedium: {\n size: SkapaFontSizeEnum.fontSize200,\n lineHeight: 26,\n weight: 700\n },\n headingLarge: {\n size: SkapaFontSizeEnum.fontSize500,\n lineHeight: 34,\n letterSpacing: -0.42,\n weight: 700\n },\n headingXLarge: {\n size: SkapaFontSizeEnum.fontSize700,\n lineHeight: 44,\n letterSpacing: -0.56,\n weight: 700\n },\n priceXSmall: { size: SkapaFontSizeEnum.fontSize50, lineHeight: 12 },\n priceSmall: { size: SkapaFontSizeEnum.fontSize75, lineHeight: 14 },\n priceMedium: { size: SkapaFontSizeEnum.fontSize200, lineHeight: 18 },\n priceLarge: { size: SkapaFontSizeEnum.fontSize500, lineHeight: 25 },\n priceXLarge: { size: SkapaFontSizeEnum.fontSize600, lineHeight: 28 },\n priceXXLarge: { size: SkapaFontSizeEnum.fontSize1000, lineHeight: 45 }\n }\n },\n medium: {\n width: 600,\n gridSpacing: {\n column: 6,\n gutter: 16\n },\n fontStyle: {\n bodyXLarge: { size: SkapaFontSizeEnum.fontSize300, lineHeight: 32 },\n bodyLarge: { size: SkapaFontSizeEnum.fontSize100, lineHeight: 26 },\n bodyMedium: { size: SkapaFontSizeEnum.fontSize75, lineHeight: 22 },\n bodySmall: { size: SkapaFontSizeEnum.fontSize50, lineHeight: 18 },\n headingXSmall: {\n size: SkapaFontSizeEnum.fontSize75,\n lineHeight: 22,\n weight: 700\n },\n headingSmall: {\n size: SkapaFontSizeEnum.fontSize100,\n lineHeight: 24,\n weight: 700\n },\n headingMedium: {\n size: SkapaFontSizeEnum.fontSize200,\n lineHeight: 26,\n weight: 700\n },\n headingLarge: {\n size: SkapaFontSizeEnum.fontSize500,\n lineHeight: 34,\n letterSpacing: -0.42,\n weight: 700\n },\n headingXLarge: {\n size: SkapaFontSizeEnum.fontSize700,\n lineHeight: 44,\n letterSpacing: -0.56,\n weight: 700\n },\n priceXSmall: { size: SkapaFontSizeEnum.fontSize50, lineHeight: 12 },\n priceSmall: { size: SkapaFontSizeEnum.fontSize75, lineHeight: 14 },\n priceMedium: { size: SkapaFontSizeEnum.fontSize200, lineHeight: 18 },\n priceLarge: { size: SkapaFontSizeEnum.fontSize500, lineHeight: 25 },\n priceXLarge: { size: SkapaFontSizeEnum.fontSize600, lineHeight: 28 },\n priceXXLarge: { size: SkapaFontSizeEnum.fontSize1000, lineHeight: 45 }\n }\n },\n large: {\n width: 900,\n gridSpacing: {\n column: 12,\n gutter: 24\n },\n fontStyle: {\n bodyXLarge: { size: SkapaFontSizeEnum.fontSize300, lineHeight: 32 },\n bodyLarge: { size: SkapaFontSizeEnum.fontSize100, lineHeight: 26 },\n bodyMedium: { size: SkapaFontSizeEnum.fontSize75, lineHeight: 22 },\n bodySmall: { size: SkapaFontSizeEnum.fontSize50, lineHeight: 18 },\n headingXSmall: {\n size: SkapaFontSizeEnum.fontSize75,\n lineHeight: 22,\n weight: 700\n },\n headingSmall: {\n size: SkapaFontSizeEnum.fontSize100,\n lineHeight: 24,\n weight: 700\n },\n headingMedium: {\n size: SkapaFontSizeEnum.fontSize200,\n lineHeight: 26,\n weight: 700\n },\n headingLarge: {\n size: SkapaFontSizeEnum.fontSize500,\n lineHeight: 34,\n letterSpacing: -0.42,\n weight: 700\n },\n headingXLarge: {\n size: SkapaFontSizeEnum.fontSize700,\n lineHeight: 44,\n letterSpacing: -0.56,\n weight: 700\n },\n priceXSmall: { size: SkapaFontSizeEnum.fontSize50, lineHeight: 12 },\n priceSmall: { size: SkapaFontSizeEnum.fontSize75, lineHeight: 14 },\n priceMedium: { size: SkapaFontSizeEnum.fontSize200, lineHeight: 18 },\n priceLarge: { size: SkapaFontSizeEnum.fontSize500, lineHeight: 25 },\n priceXLarge: { size: SkapaFontSizeEnum.fontSize600, lineHeight: 28 },\n priceXXLarge: { size: SkapaFontSizeEnum.fontSize1000, lineHeight: 45 }\n }\n },\n xlarge: {\n width: 1200,\n gridSpacing: {\n column: 12,\n gutter: 24\n },\n fontStyle: {\n bodyXLarge: { size: SkapaFontSizeEnum.fontSize300, lineHeight: 32 },\n bodyLarge: { size: SkapaFontSizeEnum.fontSize100, lineHeight: 26 },\n bodyMedium: { size: SkapaFontSizeEnum.fontSize75, lineHeight: 22 },\n bodySmall: { size: SkapaFontSizeEnum.fontSize50, lineHeight: 18 },\n headingXSmall: {\n size: SkapaFontSizeEnum.fontSize75,\n lineHeight: 22,\n weight: 700\n },\n headingSmall: {\n size: SkapaFontSizeEnum.fontSize100,\n lineHeight: 24,\n weight: 700\n },\n headingMedium: {\n size: SkapaFontSizeEnum.fontSize500,\n lineHeight: 34,\n letterSpacing: -0.42,\n weight: 700\n },\n headingLarge: {\n size: SkapaFontSizeEnum.fontSize800,\n lineHeight: 48,\n letterSpacing: -0.63,\n weight: 700\n },\n headingXLarge: {\n size: SkapaFontSizeEnum.fontSize1100,\n lineHeight: 66,\n letterSpacing: -0.87,\n weight: 700\n },\n priceXSmall: { size: SkapaFontSizeEnum.fontSize50, lineHeight: 12 },\n priceSmall: { size: SkapaFontSizeEnum.fontSize75, lineHeight: 14 },\n priceMedium: { size: SkapaFontSizeEnum.fontSize200, lineHeight: 18 },\n priceLarge: { size: SkapaFontSizeEnum.fontSize500, lineHeight: 25 },\n priceXLarge: { size: SkapaFontSizeEnum.fontSize600, lineHeight: 28 },\n priceXXLarge: { size: SkapaFontSizeEnum.fontSize1000, lineHeight: 45 }\n }\n },\n xxlarge: {\n width: 1920,\n gridSpacing: {\n column: 12,\n gutter: 24\n },\n fontStyle: {\n bodyXLarge: { size: SkapaFontSizeEnum.fontSize300, lineHeight: 32 },\n bodyLarge: { size: SkapaFontSizeEnum.fontSize100, lineHeight: 26 },\n bodyMedium: { size: SkapaFontSizeEnum.fontSize75, lineHeight: 22 },\n bodySmall: { size: SkapaFontSizeEnum.fontSize50, lineHeight: 18 },\n headingXSmall: {\n size: SkapaFontSizeEnum.fontSize75,\n lineHeight: 22,\n weight: 700\n },\n headingSmall: {\n size: SkapaFontSizeEnum.fontSize100,\n lineHeight: 24,\n weight: 700\n },\n headingMedium: {\n size: SkapaFontSizeEnum.fontSize500,\n lineHeight: 34,\n letterSpacing: -0.42,\n weight: 700\n },\n headingLarge: {\n size: SkapaFontSizeEnum.fontSize800,\n lineHeight: 48,\n letterSpacing: -0.63,\n weight: 700\n },\n headingXLarge: {\n size: SkapaFontSizeEnum.fontSize1100,\n lineHeight: 66,\n letterSpacing: -0.87,\n weight: 700\n },\n priceXSmall: { size: SkapaFontSizeEnum.fontSize50, lineHeight: 12 },\n priceSmall: { size: SkapaFontSizeEnum.fontSize75, lineHeight: 14 },\n priceMedium: { size: SkapaFontSizeEnum.fontSize200, lineHeight: 18 },\n priceLarge: { size: SkapaFontSizeEnum.fontSize500, lineHeight: 25 },\n priceXLarge: { size: SkapaFontSizeEnum.fontSize600, lineHeight: 28 },\n priceXXLarge: { size: SkapaFontSizeEnum.fontSize1000, lineHeight: 45 }\n }\n }\n }\n};\n//# sourceMappingURL=SkapaTheme.js.map","var CookieConsentDataSourceEnum;\n(function (CookieConsentDataSourceEnum) {\n CookieConsentDataSourceEnum[\"disabled\"] = \"Disabled\";\n CookieConsentDataSourceEnum[\"oneWeb\"] = \"OneWeb\";\n CookieConsentDataSourceEnum[\"bitbox\"] = \"Bitbox\";\n CookieConsentDataSourceEnum[\"china\"] = \"China\";\n CookieConsentDataSourceEnum[\"block\"] = \"Block\";\n})(CookieConsentDataSourceEnum || (CookieConsentDataSourceEnum = {}));\nexport default CookieConsentDataSourceEnum;\n//# sourceMappingURL=CookieConsentDataSourceEnum.js.map","var DexfSettingsEnvironmentEnum;\n(function (DexfSettingsEnvironmentEnum) {\n DexfSettingsEnvironmentEnum[\"development\"] = \"development\";\n DexfSettingsEnvironmentEnum[\"production\"] = \"production\";\n})(DexfSettingsEnvironmentEnum || (DexfSettingsEnvironmentEnum = {}));\nexport default DexfSettingsEnvironmentEnum;\n//# sourceMappingURL=DexfSettingsEnvironmentEnum.js.map","var DexfSettingsFilterSegmentEnum;\n(function (DexfSettingsFilterSegmentEnum) {\n DexfSettingsFilterSegmentEnum[\"development\"] = \"development\";\n DexfSettingsFilterSegmentEnum[\"test\"] = \"test\";\n DexfSettingsFilterSegmentEnum[\"verification\"] = \"verification\";\n DexfSettingsFilterSegmentEnum[\"production\"] = \"production\";\n})(DexfSettingsFilterSegmentEnum || (DexfSettingsFilterSegmentEnum = {}));\nexport default DexfSettingsFilterSegmentEnum;\n//# sourceMappingURL=DexfSettingsFilterSegmentEnum.js.map","var EcommerceCartDataSourceEnum;\n(function (EcommerceCartDataSourceEnum) {\n EcommerceCartDataSourceEnum[\"default\"] = \"default\";\n EcommerceCartDataSourceEnum[\"disabled\"] = \"disabled\";\n EcommerceCartDataSourceEnum[\"iows\"] = \"IOWS\";\n EcommerceCartDataSourceEnum[\"cartApi\"] = \"CartApi\";\n EcommerceCartDataSourceEnum[\"chinaCartApi\"] = \"ChinaCartApi\";\n EcommerceCartDataSourceEnum[\"nifApi\"] = \"NifApi\";\n EcommerceCartDataSourceEnum[\"mvecom\"] = \"MvEcom\";\n EcommerceCartDataSourceEnum[\"mvecomV2\"] = \"MvEcomV2\";\n EcommerceCartDataSourceEnum[\"iksa\"] = \"IKSA\";\n})(EcommerceCartDataSourceEnum || (EcommerceCartDataSourceEnum = {}));\nexport default EcommerceCartDataSourceEnum;\n//# sourceMappingURL=EcommerceCartDataSourceEnum.js.map","var ImageTypeNameEnum;\n(function (ImageTypeNameEnum) {\n ImageTypeNameEnum[\"mainProductPicture\"] = \"Main Product Picture\";\n ImageTypeNameEnum[\"contextProductPicture\"] = \"Context Product Picture\";\n ImageTypeNameEnum[\"functionalProductPicture\"] = \"Functional Product Picture\";\n ImageTypeNameEnum[\"inspirationalProductPicture\"] = \"Inspirational Product Picture\";\n /**\n * Images that shows measurements.\n *\n * For instance when applied to a Malm bureau, it will show the entire bureau measurements, as well as the drawers measurements.\n */\n ImageTypeNameEnum[\"measurementIllustration\"] = \"Measurement Illustration\";\n})(ImageTypeNameEnum || (ImageTypeNameEnum = {}));\nexport default ImageTypeNameEnum;\n//# sourceMappingURL=ImageTypeNameEnum.js.map","/**\n * All different types of items, that are accepted by DEXF.\n *\n * Note: Custom Kompis item types like bundles are not included in this enum.\n */\nvar ItemTypeEnum;\n(function (ItemTypeEnum) {\n ItemTypeEnum[\"art\"] = \"ART\";\n ItemTypeEnum[\"spr\"] = \"SPR\";\n ItemTypeEnum[\"ext\"] = \"EXT\";\n ItemTypeEnum[\"asl\"] = \"ASL\";\n ItemTypeEnum[\"msc\"] = \"MSC\";\n ItemTypeEnum[\"asm\"] = \"ASM\";\n ItemTypeEnum[\"asp\"] = \"ASP\";\n})(ItemTypeEnum || (ItemTypeEnum = {}));\nexport default ItemTypeEnum;\n//# sourceMappingURL=ItemTypeEnum.js.map","var ProductOptionalFieldNameEnum;\n(function (ProductOptionalFieldNameEnum) {\n ProductOptionalFieldNameEnum[\"asset\"] = \"asset\";\n ProductOptionalFieldNameEnum[\"careInstruction\"] = \"careInstruction\";\n ProductOptionalFieldNameEnum[\"complementaryItem\"] = \"complementaryItem\";\n ProductOptionalFieldNameEnum[\"customerMaterial\"] = \"customerMaterial\";\n ProductOptionalFieldNameEnum[\"document\"] = \"document\";\n ProductOptionalFieldNameEnum[\"filterAttribute\"] = \"filterAttribute\";\n ProductOptionalFieldNameEnum[\"genericProduct\"] = \"genericProduct\";\n ProductOptionalFieldNameEnum[\"customerBenefitSummary\"] = \"customerBenefitSummary\";\n ProductOptionalFieldNameEnum[\"priceInformation\"] = \"priceInformation\";\n ProductOptionalFieldNameEnum[\"priceUnit\"] = \"priceUnit\";\n ProductOptionalFieldNameEnum[\"child\"] = \"child\";\n ProductOptionalFieldNameEnum[\"measureReference\"] = \"measureReference\";\n ProductOptionalFieldNameEnum[\"measure\"] = \"measure\";\n ProductOptionalFieldNameEnum[\"packageMeasure\"] = \"packageMeasure\";\n ProductOptionalFieldNameEnum[\"customerBenefit\"] = \"customerBenefit\";\n ProductOptionalFieldNameEnum[\"goodToKnow\"] = \"goodToKnow\";\n ProductOptionalFieldNameEnum[\"peopleAndPlanet\"] = \"peopleAndPlanet\";\n ProductOptionalFieldNameEnum[\"image\"] = \"image\";\n ProductOptionalFieldNameEnum[\"video\"] = \"video\";\n ProductOptionalFieldNameEnum[\"technicalInformation\"] = \"technicalInformation\";\n ProductOptionalFieldNameEnum[\"complianceTechnical\"] = \"complianceTechnical\";\n ProductOptionalFieldNameEnum[\"complianceInformation\"] = \"complianceInformation\";\n ProductOptionalFieldNameEnum[\"complianceLabel\"] = \"complianceLabel\";\n ProductOptionalFieldNameEnum[\"validDesignPart\"] = \"validDesignPart\";\n ProductOptionalFieldNameEnum[\"appConfig\"] = \"appConfig\";\n})(ProductOptionalFieldNameEnum || (ProductOptionalFieldNameEnum = {}));\nexport default ProductOptionalFieldNameEnum;\n//# sourceMappingURL=ProductOptionalFieldNameEnum.js.map","/**\n * Cache store manager.\n */\nexport default class CacheStore {\n constructor() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.stores = {};\n }\n /**\n * Returns store.\n *\n * @param name Name.\n * @returns Map.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getStore(name) {\n this.stores[name] = this.stores[name] || new Map();\n return this.stores[name];\n }\n}\n//# sourceMappingURL=CacheStore.js.map","import CacheStore from './CacheStore.js';\n/**\n * Cache store manager.\n */\nexport default class GlobalCacheStore extends CacheStore {\n /**\n * Constructor.\n *\n * @param [global] Global/Window object.\n */\n constructor(global) {\n super();\n this.global = global || window;\n }\n /**\n * Returns store.\n *\n * @param name Name.\n * @returns Map.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getStore(name) {\n this.global.$ikeaKompisCacheStores = this.global.$ikeaKompisCacheStores || {};\n this.global.$ikeaKompisCacheStores[name] =\n this.global.$ikeaKompisCacheStores[name] || new Map();\n return this.global.$ikeaKompisCacheStores[name];\n }\n}\n//# sourceMappingURL=GlobalCacheStore.js.map","const REPLACERS = [\n [/yyyy|YYYY/, (date) => date.getFullYear()],\n [/yy|YY/, (date) => date.getFullYear().toString().slice(2)],\n ['MM', (date) => DateFormatter.addLeadingZeros(date.getMonth() + 1)],\n ['M', (date) => date.getMonth() + 1],\n ['DD', (date) => DateFormatter.addLeadingZeros(date.getDate())],\n ['D', (date) => date.getDate()],\n ['HH', (date) => DateFormatter.addLeadingZeros(date.getHours())],\n ['H', (date) => date.getHours()],\n ['mm', (date) => DateFormatter.addLeadingZeros(date.getMinutes())],\n ['m', (date) => date.getMinutes()],\n ['ss', (date) => DateFormatter.addLeadingZeros(date.getSeconds())],\n ['s', (date) => date.getSeconds()],\n ['SSS', (date) => date.getMilliseconds()],\n ['SS', (date) => Math.floor(date.getMilliseconds() / 10)],\n ['S', (date) => Math.floor(date.getMilliseconds() / 100)]\n];\n/**\n * Handles formatting of dates.\n */\nexport default class DateFormatter {\n /**\n * Formats a date.\n *\n * @param dateString Date string.\n * @returns Formatted date.\n */\n static isoStringToDate(dateString) {\n return new Date(dateString.replace('Z', ''));\n }\n /**\n * Formats a date object to a date string.\n *\n * @param date Date object or string to pass into the Date constructor.\n * @param [format] Format to use. Default is \"YYYY-MM-DD\".\n * @returns Formatted date.\n */\n static dateToString(date, format = 'YYYY-MM-DD') {\n const parsedDate = date instanceof Date ? date : new Date(date);\n if (isNaN(parsedDate.getTime())) {\n return parsedDate.toString();\n }\n return REPLACERS.reduce((str, [pattern, fnc]) => {\n const arr = str.split(pattern);\n if (arr.length === 1) {\n return arr[0];\n }\n return arr.join(fnc(parsedDate));\n }, format);\n }\n /**\n * Adds leading zeross to a number.\n *\n * @param value Number to add leading zeros to.\n * @returns Number with leading zeros converted to a string.\n */\n static addLeadingZeros(value) {\n value = String(value);\n while (value.length < 2) {\n value = '0' + value;\n }\n return value;\n }\n}\n//# sourceMappingURL=DateFormatter.js.map","/**\n * This utility is used for locales.\n */\nexport default class LocaleUtility {\n /**\n * Converts a locale to country and language.\n *\n * @param locale Locale. Example: en-GB.\n * @returns Country and language.\n */\n static getCountryAndLanguage(locale) {\n const list = locale.split('-');\n if (list.length > 1 && list[0].length === 2 && list[1].length === 2) {\n return {\n country: list[1].toLowerCase(),\n language: list[0].toLowerCase()\n };\n }\n return {\n country: null,\n language: null\n };\n }\n}\n//# sourceMappingURL=LocaleUtility.js.map","var ExceptionTypeEnum;\n(function (ExceptionTypeEnum) {\n ExceptionTypeEnum[\"platformComponentElement\"] = \"platformComponentElement\";\n ExceptionTypeEnum[\"platform\"] = \"platform\";\n ExceptionTypeEnum[\"componentElement\"] = \"componentElement\";\n ExceptionTypeEnum[\"component\"] = \"component\";\n ExceptionTypeEnum[\"service\"] = \"service\";\n ExceptionTypeEnum[\"generic\"] = \"generic\";\n ExceptionTypeEnum[\"serverErrorResponse\"] = \"serverErrorResponse\";\n ExceptionTypeEnum[\"connectionProblem\"] = \"connectionProblem\";\n ExceptionTypeEnum[\"unableToParseServerResponse\"] = \"unableToParseServerResponse\";\n ExceptionTypeEnum[\"shoppingCart\"] = \"shoppingCart\";\n})(ExceptionTypeEnum || (ExceptionTypeEnum = {}));\nexport default ExceptionTypeEnum;\n//# sourceMappingURL=ExceptionTypeEnum.js.map","/**\n * Custom exception.\n */\nexport default class AbstractException extends Error {\n}\n//# sourceMappingURL=AbstractException.js.map","import AbstractException from '../AbstractException.js';\nimport ExceptionTypeEnum from '../enums/ExceptionTypeEnum.js';\n/**\n * Custom exception.\n */\nexport default class ConnectionProblemException extends AbstractException {\n /**\n * Class constructor.\n *\n * @param requestInfo Request info.\n * @param message Message.\n */\n constructor(requestInfo, message) {\n super(`Connection to \"${requestInfo.toString()}\" failed.${message ? ` Error: ${message}` : ''}`);\n this.exceptionType = ExceptionTypeEnum.connectionProblem;\n this.name = 'ConnectionProblemException';\n this.requestInfo = requestInfo;\n }\n}\n//# sourceMappingURL=ConnectionProblemException.js.map","import AbstractException from '../AbstractException.js';\nimport ExceptionTypeEnum from '../enums/ExceptionTypeEnum.js';\n/**\n * Custom exception.\n */\nexport default class Exception extends AbstractException {\n constructor() {\n super(...arguments);\n this.exceptionType = ExceptionTypeEnum.generic;\n this.name = 'Exception';\n }\n}\n//# sourceMappingURL=Exception.js.map","import AbstractException from '../AbstractException.js';\nimport ExceptionTypeEnum from '../enums/ExceptionTypeEnum.js';\n/**\n * Custom exception.\n */\nexport default class ServerErrorResponseException extends AbstractException {\n /**\n * Class constructor.\n *\n * @param response Server response.\n * @param message Message.\n */\n constructor(response, message) {\n super(`Failed to fetch from \"${response.url}\". Server responded with ${response.status} ${response.statusText}.${message ? ` Error: ${message}` : ''}`);\n this.exceptionType = ExceptionTypeEnum.serverErrorResponse;\n this.name = 'ServerErrorResponseException';\n this.serverResponse = response;\n }\n}\n//# sourceMappingURL=ServerErrorResponseException.js.map","import AbstractException from '../AbstractException.js';\nimport ExceptionTypeEnum from '../enums/ExceptionTypeEnum.js';\n/**\n * Custom exception.\n */\nexport default class ServiceException extends AbstractException {\n constructor() {\n super(...arguments);\n this.exceptionType = ExceptionTypeEnum.service;\n this.name = 'ServiceException';\n }\n}\n//# sourceMappingURL=ServiceException.js.map","import AbstractException from '../AbstractException.js';\nimport ExceptionTypeEnum from '../enums/ExceptionTypeEnum.js';\n/**\n * Custom exception.\n */\nexport default class UnableToParseServerResponseException extends AbstractException {\n /**\n * Class constructor.\n *\n * @param response Server response.\n * @param message Message.\n */\n constructor(response, message) {\n super(`Unable to parse response from \"${response.url}\". Server responded with ${response.status} ${response.statusText}.${message ? ` Error: ${message}` : ''}`);\n this.exceptionType = ExceptionTypeEnum.unableToParseServerResponse;\n this.name = 'UnableToParseServerResponseException';\n this.serverResponse = response;\n }\n}\n//# sourceMappingURL=UnableToParseServerResponseException.js.map","/**\n * Product price information summary transformer.\n */\nexport default class ProductPriceInformationSummaryTransformer {\n /**\n * Extracts the information from the sales price of a product and puts it into properties that are easier to interpret.\n *\n * @param priceInformation Product price information.\n * @param currency ...\n * @returns Product price information summary.\n */\n static transform(priceInformation, currency) {\n const priceInformationSummary = {\n temporaryFamilyPrice: false,\n newLowerPrice: false,\n hasPreviousPrice: false,\n timeRestrictedOffer: false,\n familyPrice: null,\n price: null,\n regularPrice: null\n };\n if (!priceInformation?.salesPrice) {\n return priceInformationSummary;\n }\n const primaryCurrency = [\n ...new Set(priceInformation.salesPrice.map((price) => price.currencyCode))\n ][0];\n const salesPrices = currency\n ? [...priceInformation.salesPrice]\n .filter((salesPrice) => salesPrice.currencyCode === currency)\n .reverse()\n : [...priceInformation.salesPrice]\n .filter((salesPrice) => salesPrice.currencyCode === primaryCurrency)\n .reverse();\n const isFamilyAndNLP = () => {\n const isFamily = salesPrices.some((salesPrice) => salesPrice.typeCode === 'IKEAFamilySalesUnitPrice');\n const isNLP = salesPrices.some((salesPrice) => salesPrice.typeCode === 'RegularSalesUnitPrice' &&\n salesPrice.changeReason === 'NewLowerPrice');\n return isFamily && isNLP;\n };\n const isFamilyAndNLPPrice = isFamilyAndNLP();\n for (const salesPrice of salesPrices) {\n if (salesPrice.typeCode === 'IKEAFamilySalesUnitPrice') {\n priceInformationSummary.familyPrice = salesPrice;\n if (salesPrice.changeReason === 'Temporary') {\n priceInformationSummary.temporaryFamilyPrice = true;\n }\n }\n else if (salesPrice.changeReason === 'NewLowerPrice') {\n priceInformationSummary.newLowerPrice = true;\n priceInformationSummary.price = salesPrice;\n if (salesPrice.previousSalesPrice) {\n priceInformationSummary.hasPreviousPrice = true;\n if (isFamilyAndNLPPrice) {\n priceInformationSummary.regularPrice = Object.assign({}, salesPrice);\n }\n else {\n priceInformationSummary.regularPrice = Object.assign({}, salesPrice, salesPrice.previousSalesPrice);\n }\n }\n }\n else if (salesPrice.changeReason === 'TimeRestrictedOffer') {\n priceInformationSummary.timeRestrictedOffer = true;\n priceInformationSummary.price = salesPrice;\n if (salesPrice.previousSalesPrice) {\n priceInformationSummary.hasPreviousPrice = true;\n priceInformationSummary.regularPrice = Object.assign({}, salesPrice, salesPrice.previousSalesPrice);\n }\n }\n else if (priceInformation.salesPrice.length > 1) {\n priceInformationSummary.regularPrice = salesPrice;\n }\n else {\n priceInformationSummary.price = salesPrice;\n }\n }\n if (!priceInformationSummary.price && priceInformationSummary.regularPrice) {\n priceInformationSummary.price = priceInformationSummary.regularPrice;\n }\n return priceInformationSummary;\n }\n}\n//# sourceMappingURL=ProductPriceInformationSummaryTransformer.js.map","import { Exception } from '@inter-ikea-kompis/exceptions';\nimport DateFormatter from '../date/DateFormatter.js';\nimport ProductPriceInformationSummaryTransformer from './ProductPriceInformationSummaryTransformer.js';\n/**\n * Handles calculation of total price for a list of products.\n */\nexport default class TotalPriceCalculator {\n /**\n * Calculates total price.\n *\n * @param shoppingProducts Shopping products.\n * @param dateFormat Date format. Example: YYYY-MM-DD.\n * @param currencyCode Currency code to match with.\n * @param isCombinedProduct True if the products should be treated as one.\n * @returns Instance of TotalPriceSummary.\n */\n static calculate(shoppingProducts, dateFormat, currencyCode, isCombinedProduct) {\n if (!dateFormat) {\n throw new Exception('Second parameter \"dateFormat\" was not given.');\n }\n const totalPrice = {\n inclTax: 0,\n exclTax: 0,\n familyInclTax: 0,\n familyExclTax: 0,\n regularInclTax: 0,\n regularExclTax: 0,\n onlineSaleable: false,\n newLowerPrice: false,\n hasPreviousPrice: false,\n breathTakingItem: false,\n family: false,\n temporary: false,\n validDateInterval: null,\n ecoPrice: 0,\n weeePrice: 0,\n currencyCode: currencyCode ?? null\n };\n const shoppingProductsWithQuantity = shoppingProducts.filter(({ quantity }) => quantity > 0);\n if (!shoppingProductsWithQuantity.length) {\n return totalPrice;\n }\n const validDates = [];\n totalPrice.newLowerPrice = isCombinedProduct ? false : true;\n totalPrice.breathTakingItem = true;\n totalPrice.onlineSaleable = true;\n for (const shoppingProduct of shoppingProductsWithQuantity) {\n if (!shoppingProduct.product.valid) {\n throw new Error(`Failed to calculate total price. One of the products (${shoppingProduct.product.itemId}) is not valid.`);\n }\n if (shoppingProduct.product.content) {\n const product = shoppingProduct.product.content;\n if (!product.priceInformation) {\n throw new Exception('Failed to calculate total price, priceInformation was not present in the content object.');\n }\n // Uses the currency provided or only the first currency in the list, if two currencies are present.\n const forcedCurrency = currencyCode\n ? currencyCode\n : product.priceInformation.salesPrice[0].currencyCode;\n const productPriceInformationSummary = ProductPriceInformationSummaryTransformer.transform(product.priceInformation, forcedCurrency);\n const familyValidDate = this.calculateFamilyPrice(shoppingProduct, productPriceInformationSummary, totalPrice);\n const troValidDate = this.calculateTroPrice(productPriceInformationSummary, totalPrice);\n this.calculateNormalPrice(shoppingProduct, productPriceInformationSummary, totalPrice);\n this.calculateRegularPrice(shoppingProduct, productPriceInformationSummary, totalPrice);\n this.calculateFeePrices(shoppingProduct, totalPrice, forcedCurrency);\n totalPrice.onlineSaleable =\n product.priceInformation.onlineSaleable === false ? false : totalPrice.onlineSaleable;\n // If the products are considered a \"combined\" product it is enough that one of the products have NLP to produce a NPL price.\n // Otherwise all products need to have NLP to produce a total NLP price.\n if (isCombinedProduct) {\n totalPrice.newLowerPrice =\n productPriceInformationSummary.newLowerPrice === true ? true : totalPrice.newLowerPrice;\n }\n else {\n totalPrice.newLowerPrice =\n productPriceInformationSummary.newLowerPrice === false\n ? false\n : totalPrice.newLowerPrice;\n }\n totalPrice.hasPreviousPrice = productPriceInformationSummary.hasPreviousPrice\n ? true\n : totalPrice.hasPreviousPrice;\n totalPrice.breathTakingItem =\n product.breathTakingItem === false ? false : totalPrice.breathTakingItem;\n if (familyValidDate) {\n validDates.push(familyValidDate);\n }\n if (troValidDate) {\n validDates.push(troValidDate);\n }\n }\n }\n totalPrice.validDateInterval = this.getValidDateInterval(validDates, dateFormat);\n if (!totalPrice.currencyCode) {\n totalPrice.currencyCode =\n shoppingProducts[0]?.product?.content?.priceInformation?.salesPrice[0]?.currencyCode ??\n null;\n }\n return totalPrice;\n }\n /**\n * Calculates total prices for more than one currency. Used for dual currencies.\n *\n * @param shoppingProducts Shopping products.\n * @param dateFormat Date format. Example: YYYY-MM-DD.\n * @param isCombinedProduct True if the products should be treated as one.\n * @returns Instance of TotalPriceSummary.\n */\n static calculateMultiple(shoppingProducts, dateFormat, isCombinedProduct) {\n if (!dateFormat) {\n throw new Exception('Second parameter \"dateFormat\" was not given.');\n }\n if (shoppingProducts.some((product) => !product.product.content?.priceInformation)) {\n return [];\n }\n const totalPrices = [];\n if (!shoppingProducts.length) {\n totalPrices.push(this.calculate(shoppingProducts, dateFormat, undefined, isCombinedProduct));\n return totalPrices;\n }\n const providedCurrencies = [\n ...new Set(shoppingProducts[0]?.product?.content?.priceInformation?.salesPrice?.map((price) => price.currencyCode))\n ];\n for (const currency in providedCurrencies) {\n totalPrices.push(this.calculate(shoppingProducts, dateFormat, providedCurrencies[currency], isCombinedProduct));\n }\n return totalPrices;\n }\n /**\n * Handles normal price.\n *\n * @param shoppingProduct Shopping product.\n * @param productPriceInformationSummary Sales price information.\n * @param totalPrice Total price model.\n */\n static calculateNormalPrice(shoppingProduct, productPriceInformationSummary, totalPrice) {\n // We should always have a normal price\n if (productPriceInformationSummary.price) {\n totalPrice.inclTax +=\n productPriceInformationSummary.price.priceInclTax * shoppingProduct.quantity;\n totalPrice.exclTax +=\n productPriceInformationSummary.price.priceExclTax * shoppingProduct.quantity;\n }\n else if (productPriceInformationSummary.regularPrice) {\n totalPrice.inclTax +=\n productPriceInformationSummary.regularPrice.priceInclTax * shoppingProduct.quantity;\n totalPrice.exclTax +=\n productPriceInformationSummary.regularPrice.priceExclTax * shoppingProduct.quantity;\n }\n else {\n throw new Exception(`Failed to calculate total price. Missing valid normal price in item: \"${shoppingProduct.product.itemId}\".`);\n }\n }\n /**\n * Handles family price.\n *\n * @param shoppingProduct Shopping product.\n * @param productPriceInformationSummary Sales price information.\n * @param totalPrice Total price model.\n * @returns Valid date.\n */\n static calculateFamilyPrice(shoppingProduct, productPriceInformationSummary, totalPrice) {\n if (productPriceInformationSummary.familyPrice) {\n totalPrice.family = true;\n totalPrice.familyInclTax +=\n productPriceInformationSummary.familyPrice.priceInclTax * shoppingProduct.quantity;\n totalPrice.familyExclTax +=\n productPriceInformationSummary.familyPrice.priceExclTax * shoppingProduct.quantity;\n }\n else {\n // If this was not a family product, family price increases with normal price\n totalPrice.familyInclTax +=\n productPriceInformationSummary.price?.priceInclTax * shoppingProduct.quantity;\n totalPrice.familyExclTax +=\n productPriceInformationSummary.price?.priceExclTax * shoppingProduct.quantity;\n }\n if (productPriceInformationSummary.temporaryFamilyPrice) {\n totalPrice.temporary = true;\n return {\n validFrom: DateFormatter.isoStringToDate(productPriceInformationSummary.familyPrice?.validFromText),\n validTo: DateFormatter.isoStringToDate(productPriceInformationSummary.familyPrice?.validToText)\n };\n }\n return null;\n }\n /**\n * Handles TRO (Time Restricted Offer) price.\n *\n * @param productPriceInformationSummary Sales price information.\n * @param totalPrice Total price model.\n * @returns Valid date.\n */\n static calculateTroPrice(productPriceInformationSummary, totalPrice) {\n if (productPriceInformationSummary.timeRestrictedOffer) {\n totalPrice.temporary = true;\n return {\n validFrom: DateFormatter.isoStringToDate(productPriceInformationSummary.price?.validFromText),\n validTo: DateFormatter.isoStringToDate(productPriceInformationSummary.price?.validToText)\n };\n }\n return null;\n }\n /**\n * Handles Regular price.\n *\n * @param shoppingProduct Shopping product.\n * @param productPriceInformationSummary Sales price information.\n * @param totalPrice Total price model.\n */\n static calculateRegularPrice(shoppingProduct, productPriceInformationSummary, totalPrice) {\n // There was a check here before: if (priceInformation.regularPrice && !priceInformation.newLowerPrice)\n // The check does not make sense, so it has been removed\n if (productPriceInformationSummary.regularPrice) {\n totalPrice.regularInclTax +=\n productPriceInformationSummary.regularPrice.priceInclTax * shoppingProduct.quantity;\n totalPrice.regularExclTax +=\n productPriceInformationSummary.regularPrice.priceExclTax * shoppingProduct.quantity;\n }\n else {\n // If we don't have a special regular price, then the normal is regular\n totalPrice.regularInclTax +=\n productPriceInformationSummary.price?.priceInclTax * shoppingProduct.quantity;\n totalPrice.regularExclTax +=\n productPriceInformationSummary.price?.priceExclTax * shoppingProduct.quantity;\n }\n }\n /**\n * Handles fee price.\n *\n * @param shoppingProduct Shopping product.\n * @param totalPrice Total price model.\n * @param currencyCode To match if there are multiple (dual) currencies in the prices.\n */\n static calculateFeePrices(shoppingProduct, totalPrice, currencyCode) {\n const productFees = shoppingProduct.product.content?.priceInformation?.fees;\n if (productFees) {\n for (const fee of productFees.filter((fee) => fee.currencyCode === currencyCode)) {\n if (fee.typeCode === 'ECO') {\n totalPrice.ecoPrice += fee.amount * shoppingProduct.quantity;\n }\n else if (fee.typeCode === 'WEEE') {\n totalPrice.weeePrice += fee.amount * shoppingProduct.quantity;\n }\n }\n }\n }\n /**\n * Returns the shortest date span of multiple dates.\n *\n * @param validDates Valid dates.\n * @param dateFormat Pattern to use.\n * @returns Date interval.\n */\n static getValidDateInterval(validDates, dateFormat) {\n if (validDates.length > 0) {\n const date = {\n validFrom: validDates[0].validFrom,\n validTo: validDates[0].validTo\n };\n for (const validDate of validDates) {\n if (validDate.validFrom > date.validFrom) {\n date.validFrom = validDate.validFrom;\n }\n if (validDate.validTo < date.validTo) {\n date.validTo = validDate.validTo;\n }\n }\n return {\n validFrom: DateFormatter.dateToString(date.validFrom, dateFormat),\n validTo: DateFormatter.dateToString(date.validTo, dateFormat)\n };\n }\n return null;\n }\n}\n//# sourceMappingURL=TotalPriceCalculator.js.map","/**\n *\n */\nexport default class DexfSettingsUtility {\n /**\n * Parses localized information object from Översätta to DEXF settings object.\n *\n * @param localizedInformation Localized information to parse.\n * @returns Parsed IDexfSettings object.\n */\n static parseLocalizedInformation(localizedInformation) {\n const parsedSettings = {\n kompis: {\n endpoints: localizedInformation.endpoints,\n localization: {\n ...localizedInformation.localization,\n abTest: localizedInformation.userABTest?.ordnaTeam\n },\n serviceSettings: localizedInformation.localization,\n urls: localizedInformation.urls,\n priceSettings: localizedInformation.priceSettings\n },\n localisation: {\n // localization\n useMetricMeasures: localizedInformation.localization.useMetricMeasures,\n usesSubDomain: localizedInformation.localization.usesSubDomain,\n dateFormat: localizedInformation.localization.dateFormat,\n alternateLanguages: localizedInformation.localization.alternateLanguages,\n writeDirection: localizedInformation.localization.writeDirection,\n // priceSettings\n decimalSeparator: localizedInformation.priceSettings.decimalSeparator,\n currencySymbol: localizedInformation.priceSettings.currencySymbol,\n noValueDecimalsString: localizedInformation.priceSettings.noValueDecimalsString,\n thousandSeparatorEnabled: localizedInformation.priceSettings.thousandSeparatorEnabled,\n currencyPosition: localizedInformation.priceSettings.currencyPosition,\n symbolSpacing: localizedInformation.priceSettings.symbolSpacing,\n thousandSeparator: localizedInformation.priceSettings.thousandSeparator,\n replaceNoValueDecimals: localizedInformation.priceSettings.replaceNoValueDecimals,\n numberOfDecimals: localizedInformation.priceSettings.numberOfDecimals,\n currencyCode: localizedInformation.priceSettings.currencyCode\n }\n };\n return parsedSettings;\n }\n}\n//# sourceMappingURL=DexfSettingsUtility.js.map","import { ITheme } from '@inter-ikea-kompis/types';\n\nexport const getTheme = (theme: ITheme): ITheme => {\n const useProxy = ['ikea', 'www.ikea', 'planner.ikea'].every(key => {\n return !window.location.host.startsWith(key);\n });\n\n if (useProxy) {\n theme.fontFace.sources.map(source => {\n return Object.values(source.formats).map(format => {\n format.url = new URL(format.url, 'https://kompis-proxy.azurewebsites.net').href;\n return source;\n });\n });\n }\n\n return theme;\n};\n","import { SkapaTheme } from '@inter-ikea-kompis/themes/lib';\nimport { getTheme } from 'utils/getTheme';\nimport { ISceneColors } from '.';\n\nconst theme = getTheme(SkapaTheme);\n\nexport const COLORS = {\n BACKGROUND_WHITE: theme.color.background.default,\n BACKGROUND_LIGHTGRAY: theme.color.background.alt,\n ERROR_RED: theme.color.component.dangerDefault,\n BORDER_BLACK: theme.color.border.dark,\n BORDER_GRAY: theme.color.border.light,\n BACKGROUND_TEAL: '#9AB0A9',\n BACKGROUND_SCENE: '#f2f2f2',\n WHITE: theme.color.neutral.white,\n COMPONENT_PRIMARY_DEFAULT: theme.color.component.primaryDefault,\n CARD_GREEN: '#AFCDC4'\n};\n\nexport const SCENE_COLORS: ISceneColors = {\n grayEnhancedParent: { r: 200 / 255, g: 200 / 255, b: 200 / 255, a: 255 / 255 },\n grayEnhanced: { r: 230 / 255, g: 230 / 255, b: 230 / 255, a: 255 / 255 },\n grayBright: { r: 245 / 255, g: 245 / 255, b: 245 / 255, a: 255 / 255 },\n gray: { r: 220 / 255, g: 220 / 255, b: 220 / 255, a: 255 / 255 },\n blue: { r: 0 / 255, g: 88 / 255, b: 163 / 255, a: 255 / 255 },\n red: { r: 205 / 255, g: 46 / 255, b: 84 / 255, a: 255 / 255 }\n};\n\nexport const OutlineColor: ISceneColors = {\n hover: { r: 255 / 255, g: 255 / 255, b: 255 / 255, a: 255 / 255 },\n select: { r: 21 / 255, g: 146 / 255, b: 230 / 255, a: 255 / 255 }\n};\n","/**\n * Default fontsize in pixels.\n */\nexport const fontSize = 16;\n","import 'sanitize.css';\n\nimport '@ingka/accordion/dist/style.min.css';\nimport '@ingka/aspect-ratio-box/dist/style.min.css';\nimport '@ingka/button/dist/style.min.css';\nimport '@ingka/card/dist/style.min.css';\nimport '@ingka/carousel/dist/style.min.css';\nimport '@ingka/choice/dist/style.min.css';\nimport '@ingka/compact-card/dist/style.min.css';\nimport '@ingka/expander/dist/style.min.css';\nimport '@ingka/focus/dist/style.min.css';\nimport '@ingka/forms/dist/style.min.css';\nimport '@ingka/hyperlink/dist/style.min.css';\nimport '@ingka/image/dist/style.min.css';\nimport '@ingka/inline-message/dist/style.min.css';\nimport '@ingka/list-view/dist/style.min.css';\nimport '@ingka/list/dist/style.min.css';\nimport '@ingka/loading/dist/style.min.css';\nimport '@ingka/modal/dist/style.min.css';\nimport '@ingka/price/dist/style.min.css';\nimport '@ingka/simple-video/dist/style.min.css';\nimport '@ingka/skeleton/dist/style.min.css';\nimport '@ingka/slider/dist/style.min.css';\nimport '@ingka/svg-icon/dist/style.min.css';\nimport '@ingka/switch/dist/style.min.css';\nimport '@ingka/text/dist/style.min.css';\nimport '@ingka/toast/dist/style.min.css';\nimport '@ingka/toggle/dist/style.min.css';\nimport '@ingka/tooltip/dist/style.min.css';\nimport '@nipe-solutions/react-spring-bottom-sheet/dist/style.css';\n\nimport { createGlobalStyle } from 'styled-components';\nimport { COLORS } from 'utils/constants/colors';\nimport { fontSize } from 'utils/constants/style';\n\nconst GlobalStyles = createGlobalStyle`\n html,\n body {\n height: 100%;\n width: 100%;\n }\n\n html {\n box-sizing: border-box;\n touch-action: pan-x pan-y;\n scroll-behavior: smooth;\n font-size: ${fontSize}px;\n }\n\n *,\n *::before,\n *::after {\n box-sizing: inherit;\n -webkit-tap-highlight-color: transparent;\n font-family: \"Noto IKEA\", notoIKEAlatin, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n }\n\n body {\n min-height: 100vh;\n min-height: fill-available;\n overscroll-behavior-y: none;\n -webkit-font-smoothing: antialiased;\n -webkit-touch-callout: none !important;\n overflow: hidden;\n }\n\n #root {\n min-height: 100%;\n min-width: 100%;\n height: 100%;\n overflow-y: auto;\n \n }\n\n // Skapa button have a fluid attribute that doest the same thing. So I think we can keep this until we switch to those or this is a good time to do so.\n .width-full {\n width: 100%;\n }\n\n .choice-item button {\n cursor: pointer;\n }\n\n a {\n color: initial;\n text-decoration: none;\n cursor: pointer;\n }\n\n h1, h2, h3, h4, h5, h6 {\n margin: 0;\n }\n\n ul {\n padding: 0;\n }\n \n .unstyled-list {\n padding: 0;\n list-style-type: none;\n }\n\n p, a {\n margin: 0;\n }\n\n #intro, #guide, #planner, #summary {\n outline: none;\n overflow: hidden;\n }\n\n body.hovered {\n cursor: pointer;\n }\n \n body.hovered.dragging {\n cursor: grabbing;\n }\n\n :where([aria-disabled=\"true\" i], [disabled]) {\n cursor: default;\n }\n\n @media print {\n #root, [aria-modal=\"true\"]{\n display: none;\n }\n }\n\n /**\n * Same z-index as Kompis. Temporary until Kompis migrate to SKAPA sheets.\n * Original value: 400\n * We do this to make sure our missing panels modal is visible when summarys own modal is shown. \n * Summary built in modal is not working properly when there is no content available in productData.\n */\n .modal-wrapper {\n z-index: 500;\n }\n\n .gallery-item-fixed-size { \n width: 16rem;\n margin-inline: 0\n }\n\n #webglContext {\n opacity: 0;\n visibility: hidden;\n }\n\n .greenCard {\n background-color: ${COLORS.CARD_GREEN};\n }\n .grayCard {\n background-color: ${COLORS.BACKGROUND_LIGHTGRAY}\n }\n\n .columnReverse {\n flex-direction: column-reverse !important;\n }\n \n .columnReverse .content-card__title {\n font-size: 1.125rem;\n }\n\n .card .content-card {\n padding: 2rem !important;\n }\n\n [data-rsbs-header] {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n [data-rsbs-backdrop] {\n display: none;\n }\n`;\n\nexport default GlobalStyles;\n","import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n","let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Function for interacting with application and module metadata.\n */\nconst MetadataManager = (() => {\n let applicationMetadata = null;\n let moduleMetadata = [];\n /**\n * Register application metadata.\n *\n * @param applicationProps Application metadata to register.\n */\n const registerApplication = (applicationProps) => {\n applicationMetadata = applicationProps;\n };\n /**\n * Register module metadata.\n *\n * @param moduleProps Module metadata to register.\n */\n const registerModule = (moduleProps) => {\n moduleMetadata = [\n ...moduleMetadata.filter(m => m.moduleId !== moduleProps.moduleId),\n moduleProps\n ];\n };\n /**\n * Update and/or add some properties of the application metadata and saves it.\n * The new properties must be a subset of {@link IApplicationMetadata}.\n *\n * @param applicationProps The properties to update.\n */\n const updateApplication = (applicationProps) => {\n applicationMetadata = Object.assign(Object.assign({}, applicationMetadata), applicationProps);\n };\n /**\n * Update and/or add some properties of the module metadata and saves it.\n * The new properties must be a subset of {@link IModuleClient}.\n *\n * @param moduleProps The properties to update.\n * @param moduleId The module id.\n */\n const updateModule = (moduleProps, moduleId) => {\n const currentProps = getModuleMetadata(moduleId);\n moduleMetadata = [\n ...moduleMetadata.filter(m => m.moduleId !== moduleId),\n Object.assign(Object.assign({}, currentProps), moduleProps)\n ];\n };\n /**\n * Get the currently registered application metadata.\n *\n * @returns The registered application metadata if it exists.\n */\n const getApplicationMetadata = () => {\n return applicationMetadata;\n };\n /**\n * Get the registered module metadata for given module id.\n *\n * @param moduleId The module that you want to retrieve the metadata.\n * @returns The registered metadata as an object if it exists.\n */\n const getModuleMetadata = (moduleId) => {\n if (!moduleId) {\n return undefined;\n }\n return moduleMetadata.find(m => m.moduleId == moduleId) || null;\n };\n /**\n * Clear application and module metadata stored.\n */\n const clear = () => {\n applicationMetadata = null;\n moduleMetadata = [];\n };\n return {\n registerApplication,\n registerModule,\n updateApplication,\n updateModule,\n getApplicationMetadata,\n getModuleMetadata,\n clear\n };\n})();\nexports.default = MetadataManager;\n//# sourceMappingURL=MetadataManager.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst MetadataManager_1 = __importDefault(require(\"./MetadataManager\"));\nconst KEY = 'sequence_number';\n/**\n * Class for handling logic related to the sequence number.\n */\nclass SequenceNumberHandler {\n /**\n * Get the current sequence number.\n *\n * @returns The current sequence number.\n */\n getSequenceNumber() {\n const metadata = MetadataManager_1.default.getApplicationMetadata();\n return (metadata === null || metadata === void 0 ? void 0 : metadata.applicationId)\n ? Number(sessionStorage.getItem(metadata.applicationId.concat('_', KEY)))\n : 0;\n }\n /**\n * Reset sequence number to the default value.\n */\n resetSequenceNumber() {\n this.setSequenceNumber(0);\n }\n /**\n * Increment the current sequence number.\n */\n incrementSequenceNumber() {\n const value = this.getSequenceNumber();\n const updateValue = value + 1;\n this.setSequenceNumber(updateValue);\n }\n /**\n * Set the sequence number.\n *\n * @param value Sequence number to store.\n */\n setSequenceNumber(value) {\n const metadata = MetadataManager_1.default.getApplicationMetadata();\n if (metadata === null || metadata === void 0 ? void 0 : metadata.applicationId) {\n sessionStorage.setItem(metadata.applicationId.concat('_', KEY), String(value));\n }\n }\n}\nexports.default = SequenceNumberHandler;\n//# sourceMappingURL=SequenceNumberHandler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TrackingIdEnum;\n(function (TrackingIdEnum) {\n TrackingIdEnum[\"sessionIdKey\"] = \"session_id\";\n TrackingIdEnum[\"longTermIdKey\"] = \"long_term_id\";\n TrackingIdEnum[\"planningIdKey\"] = \"planning_id\";\n TrackingIdEnum[\"ipexIdKey\"] = \"ipex_id\";\n})(TrackingIdEnum || (TrackingIdEnum = {}));\nexports.default = TrackingIdEnum;\n//# sourceMappingURL=TrackingIdEnum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Utility class for random Id generation.\n */\nclass IdGenerator {\n /**\n * Generate a RFC4122 v4 compliant UUID.\n *\n * @returns The newly generated UUID.\n */\n uuidV4() {\n /* Tslint:disable:no-bitwise */\n let d = Date.now(); // Start with now as a seed\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, xy => {\n const r = (d + Math.random() * 16) % 16 | 0; // Generate a new random number\n const c = xy === 'x' ? r : (r & 0x3) | 0x8; // Make sure it's RFC4122 version 4 compliant\n d = Math.floor(d / 16); // Update the seed\n return c.toString(16); // Return the hex digit\n });\n /* Tslint:enable:no-bitwise */\n }\n}\nexports.default = IdGenerator;\n//# sourceMappingURL=IdGenerator.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst SequenceNumberHandler_1 = __importDefault(require(\"./SequenceNumberHandler\"));\nconst TrackingIdEnum_1 = __importDefault(require(\"../enums/TrackingIdEnum\"));\nconst IdGenerator_1 = __importDefault(require(\"./IdGenerator\"));\nconst MetadataManager_1 = __importDefault(require(\"./MetadataManager\"));\nconst localStorageKeys = [TrackingIdEnum_1.default.longTermIdKey, TrackingIdEnum_1.default.ipexIdKey];\nconst sessionStorageKeys = [TrackingIdEnum_1.default.sessionIdKey, TrackingIdEnum_1.default.planningIdKey];\n/**\n * Utility class for handling data about the session.\n */\nclass SessionManager {\n constructor() {\n this.sequenceNumber = new SequenceNumberHandler_1.default();\n this.idGenerator = new IdGenerator_1.default();\n }\n /**\n * Get the current session Id if one exists, or creates one and returns it if it doesn't.\n *\n * @param key The request session type.\n * @returns The valid tracking Id.\n */\n getValidId(key) {\n const trackingId = this.getId(key);\n if (trackingId) {\n return trackingId;\n }\n return this.createId(key);\n }\n /**\n * Update the time for when the session started to now, and saves it to storage.\n * Will throw an Error if no session exists.\n *\n * @param key The key for the id to update.\n * @returns The new session id object which has been saved.\n */\n updateIdTime(key) {\n const pastId = this.getId(key);\n if (!pastId) {\n throw Error('No session to update');\n }\n const newIdProps = {\n time: Date.now(),\n id: pastId.id\n };\n if (localStorageKeys.includes(key)) {\n localStorage.setItem(key, JSON.stringify(newIdProps));\n }\n else if (sessionStorageKeys.includes(key)) {\n this.safeSessionSet(key, newIdProps);\n }\n return newIdProps;\n }\n /**\n * Ensure the ids in local and session storage exist and are valid. Will create and/or update values if necessary.\n */\n updateIds() {\n const sessionId = this.getId(TrackingIdEnum_1.default.sessionIdKey);\n let longTermId = this.getId(TrackingIdEnum_1.default.longTermIdKey);\n let ipexId = this.getId(TrackingIdEnum_1.default.ipexIdKey);\n if (!longTermId) {\n longTermId = this.createId(TrackingIdEnum_1.default.longTermIdKey);\n }\n if (!ipexId || Date.now() - ipexId.time > 30 * 60 * 1000) {\n ipexId = this.createId(TrackingIdEnum_1.default.ipexIdKey);\n }\n else {\n this.updateIdTime(TrackingIdEnum_1.default.ipexIdKey);\n }\n if (!sessionId) {\n this.createId(TrackingIdEnum_1.default.sessionIdKey);\n this.sequenceNumber.resetSequenceNumber();\n return {\n ['long_term_id_created']: longTermId.time,\n ['ipex_id_created']: ipexId.time\n };\n }\n else if (Date.now() - sessionId.time > 30 * 60 * 1000) {\n // No interaction the past 30 minutes. Create a new session, but leave the long term id as is.\n this.createId(TrackingIdEnum_1.default.sessionIdKey);\n this.sequenceNumber.resetSequenceNumber();\n return {\n ['long_term_id_created']: longTermId.time,\n ['ipex_id_created']: ipexId.time\n };\n }\n else {\n this.updateIdTime(TrackingIdEnum_1.default.sessionIdKey);\n return undefined;\n }\n }\n /**\n * Clear all session related data.\n */\n clearSessions() {\n localStorage.clear();\n sessionStorage.clear();\n }\n /**\n * Create a new id for given key, generates an uuidV4 as id and sets time to now.\n *\n * @param key The key to generate a value for.\n * @param startSource Optional planning start source, which will be saved if the key is for planning ids.\n * @param sourceDesignId Optional design id, which will be saved if the key is for planning ids.\n * @param sourceSpr Optional spr source, which will be saved if the key is for planning ids.\n * @returns The new value object.\n */\n createId(key, startSource, sourceDesignId, sourceSpr) {\n const id = this.idGenerator.uuidV4();\n const newIdProps = {\n time: Date.now(),\n id\n };\n if (key === TrackingIdEnum_1.default.planningIdKey && startSource) {\n newIdProps.startSource = startSource;\n newIdProps.sourceDesignId = sourceDesignId;\n newIdProps.sourceSpr = sourceSpr;\n }\n if (localStorageKeys.includes(key)) {\n localStorage.setItem(key, JSON.stringify(newIdProps));\n }\n else if (sessionStorageKeys.includes(key)) {\n this.safeSessionSet(key, newIdProps);\n }\n return newIdProps;\n }\n /**\n * Get the value for supplied key.\n *\n * @param key The key which to look for.\n * @returns The value for the key. Will be null if no value exists.\n */\n getId(key) {\n if (localStorageKeys.includes(key)) {\n const idProps = localStorage.getItem(key);\n return idProps ? JSON.parse(idProps) : null;\n }\n else if (sessionStorageKeys.includes(key)) {\n return this.safeSessionGet(key);\n }\n return null;\n }\n /**\n * Get user ids.\n *\n * @returns The user ids (sessionId, planningId, longTermId and ipexId).\n */\n getIds() {\n var _a, _b, _c, _d;\n return {\n sessionId: (_a = this.getId(TrackingIdEnum_1.default.sessionIdKey)) === null || _a === void 0 ? void 0 : _a.id,\n planningId: (_b = this.getId(TrackingIdEnum_1.default.planningIdKey)) === null || _b === void 0 ? void 0 : _b.id,\n longTermId: (_c = this.getId(TrackingIdEnum_1.default.longTermIdKey)) === null || _c === void 0 ? void 0 : _c.id,\n ipexId: (_d = this.getId(TrackingIdEnum_1.default.ipexIdKey)) === null || _d === void 0 ? void 0 : _d.id\n };\n }\n /**\n * Save some props to a planner-prepended key, but only if planner name is registered in metadata.\n *\n * @param key The session storage key to save to.\n * @param props The props to save to the key.\n */\n safeSessionSet(key, props) {\n const metadata = MetadataManager_1.default.getApplicationMetadata();\n if ('applicationId' in metadata) {\n const applicationIdKey = metadata.applicationId.concat('_', key);\n sessionStorage.setItem(applicationIdKey, JSON.stringify(props));\n }\n }\n /**\n * Retrieve some props from a planner-prepended key, but only if planner name is registered in metadata.\n *\n * @param key The session storage key to save to.\n * @returns The ITrackingProps saved to the key if it exists, otherwise null.\n */\n safeSessionGet(key) {\n const metadata = MetadataManager_1.default.getApplicationMetadata();\n let idProps;\n if (metadata === null || metadata === void 0 ? void 0 : metadata.applicationId) {\n const applicationIdKey = metadata.applicationId.concat('_', key);\n idProps = sessionStorage.getItem(applicationIdKey);\n }\n return idProps ? JSON.parse(idProps) : null;\n }\n}\nexports.default = SessionManager;\n//# sourceMappingURL=SessionManager.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar IpexMomentEnum;\n(function (IpexMomentEnum) {\n IpexMomentEnum[\"giveMe\"] = \"give_me\";\n IpexMomentEnum[\"whatIsMe\"] = \"what_is_me\";\n IpexMomentEnum[\"showMe\"] = \"show_me\";\n IpexMomentEnum[\"makeItMe\"] = \"make_it_me\";\n IpexMomentEnum[\"helpMe\"] = \"help_me\";\n IpexMomentEnum[\"nonInteraction\"] = \"non_interaction\";\n})(IpexMomentEnum || (IpexMomentEnum = {}));\nexports.default = IpexMomentEnum;\n//# sourceMappingURL=IpexMomentEnum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Utility class for retrieving and handling cookie data.\n */\nclass CookieReader {\n /**\n * Read the Google Analytics clientId from the document cookie.\n *\n * @returns The GA clientId, extracted and trimmed from cookie.\n * @throws If there is no clientId in the cookie, or the cookie is incorrectly formatted.\n */\n getGaId() {\n const cookieSeparated = document.cookie.split('; ').filter(value => value.startsWith('_ga='));\n if (cookieSeparated.length == 0) {\n throw new Error('Unable to retrieve Google Analytics cookie.');\n }\n /* Some markets are setting two cookies with the same name\n * we want to filter out the one that has the following format\n * _ga=GA1.2.XXXXXXXXXX.XXXXXXXXXX\n */\n const gaCookie = cookieSeparated.filter(c => c.split('.').length == 4);\n if (!gaCookie.length) {\n throw new Error('GA cookie is incorrectly constructed.');\n }\n const cookieFields = gaCookie[0].split('.');\n return cookieFields[2] + '.' + cookieFields[3];\n }\n}\nexports.default = CookieReader;\n//# sourceMappingURL=CookieReader.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Utility class for retrieving document referrer.\n */\nclass EntryPoint {\n /**\n * Get document referrer.\n *\n * @returns The entry point as an object that contains host, pathname and search.\n */\n getEntryPoint() {\n const entryPoint = document.referrer;\n try {\n const url = new URL(entryPoint);\n return {\n host: url.host,\n pathname: url.pathname,\n search: url.search\n };\n }\n catch (e) {\n return undefined;\n }\n }\n}\nexports.default = EntryPoint;\n//# sourceMappingURL=EntryPoint.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DesignInteractionEnum;\n(function (DesignInteractionEnum) {\n DesignInteractionEnum[\"getConfiguration\"] = \"get_configuration\";\n DesignInteractionEnum[\"storeConfiguration\"] = \"store_configuration\";\n})(DesignInteractionEnum || (DesignInteractionEnum = {}));\nexports.default = DesignInteractionEnum;\n//# sourceMappingURL=DesignInteractionEnum.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst DesignInteractionEnum_1 = __importDefault(require(\"./DesignInteractionEnum\"));\nvar OtherEventsEnum;\n(function (OtherEventsEnum) {\n OtherEventsEnum[\"start\"] = \"start\";\n OtherEventsEnum[\"addToCart\"] = \"add_to_cart\";\n OtherEventsEnum[\"addToWishList\"] = \"add_to_wishlist\";\n OtherEventsEnum[\"initiatePlanningSession\"] = \"initiate_planning_session\";\n OtherEventsEnum[\"connectApplication\"] = \"connect_application\";\n OtherEventsEnum[\"pageview\"] = \"pageview\";\n OtherEventsEnum[\"articleAction\"] = \"article_action\";\n OtherEventsEnum[\"userFlow\"] = \"user_flow\";\n})(OtherEventsEnum || (OtherEventsEnum = {}));\nconst InsightsEventEnum = Object.assign(Object.assign({}, OtherEventsEnum), DesignInteractionEnum_1.default);\nexports.default = InsightsEventEnum;\n//# sourceMappingURL=InsightsEventEnum.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst SessionManager_1 = __importDefault(require(\"../utilities/SessionManager\"));\nconst SequenceNumberHandler_1 = __importDefault(require(\"../utilities/SequenceNumberHandler\"));\nconst IpexMomentEnum_1 = __importDefault(require(\"../enums/IpexMomentEnum\"));\nconst TrackingIdEnum_1 = __importDefault(require(\"../enums/TrackingIdEnum\"));\nconst CookieReader_1 = __importDefault(require(\"../utilities/CookieReader\"));\nconst EntryPoint_1 = __importDefault(require(\"../utilities/EntryPoint\"));\nconst InsightsEventEnum_1 = __importDefault(require(\"../enums/InsightsEventEnum\"));\nconst MetadataManager_1 = __importDefault(require(\"../utilities/MetadataManager\"));\n/**\n * Class for handling logic about sending events to Insights.\n */\nclass InsightsTarget {\n constructor() {\n this.sessionManager = new SessionManager_1.default();\n this.sequenceNumberHandler = new SequenceNumberHandler_1.default();\n this.cookie = new CookieReader_1.default();\n }\n /**\n * Sends a given set of data to Ipex Insights.\n *\n * @param ipexMoment The IPEX moment for the event.\n * @param name Name of the event.\n * @param payload Optional payload.\n * @param eventData Event data to send.\n */\n sendInsightsEvent(ipexMoment, name, eventData, payload) {\n return __awaiter(this, void 0, void 0, function* () {\n const applicationMetadata = MetadataManager_1.default.getApplicationMetadata();\n const moduleMetadata = MetadataManager_1.default.getModuleMetadata(this.moduleId);\n this.checkEventSchema(name, ipexMoment, applicationMetadata);\n const eventBody = this.constructEventBody(ipexMoment, name, applicationMetadata, eventData, payload);\n this.sequenceNumberHandler.incrementSequenceNumber();\n const dev = applicationMetadata.dev || (moduleMetadata === null || moduleMetadata === void 0 ? void 0 : moduleMetadata.dev);\n const domain = this.getIpexDomain(dev);\n const key = this.getIpexStreamKey(dev);\n try {\n yield fetch(domain, {\n method: 'POST',\n body: JSON.stringify(eventBody),\n headers: { 'x-api-key': key, 'Content-Type': 'application/json' }\n });\n }\n catch (error) {\n throw new Error(`Failed to send ${name} event, ${error}`);\n }\n });\n }\n /**\n * Create and populate event data object according to IEventSchema.\n *\n * @param ipexMoment Moment for the event.\n * @param name Name of the event.\n * @param applicationMetadata The application metadata.\n * @param eventData Optional eventData.\n * @param payload Optional payload.\n * @returns An event body, conforming to the IEventSchema type.\n */\n constructEventBody(ipexMoment, name, applicationMetadata, eventData, payload) {\n const location = window === null || window === void 0 ? void 0 : window.location;\n const eventBody = {\n event: name,\n moment: ipexMoment,\n ['app_id']: applicationMetadata.applicationId,\n ['session_id']: this.sessionManager.getId(TrackingIdEnum_1.default.sessionIdKey).id,\n ['sequence_nbr']: this.sequenceNumberHandler.getSequenceNumber(),\n ['visitor_timestamp']: Date.now(),\n ['meta']: this.constructMetadata(applicationMetadata),\n page: {\n origin: location === null || location === void 0 ? void 0 : location.origin,\n pathname: location === null || location === void 0 ? void 0 : location.pathname,\n ['query_param']: location === null || location === void 0 ? void 0 : location.search\n }\n };\n if (name == InsightsEventEnum_1.default.start) {\n const entryPoint = new EntryPoint_1.default().getEntryPoint();\n eventBody['meta']['entry_point'] = entryPoint;\n }\n const optionalParams = {\n ['payload']: JSON.stringify(payload),\n ['event_data']: eventData,\n planning: this.constructPlanningData(),\n module: this.constructModuleData()\n };\n for (const [key, value] of Object.entries(optionalParams)) {\n this.addOptionalParameter(eventBody, key, value);\n }\n return eventBody;\n }\n /**\n * Create and populate metatadata, to be added to the object body.\n *\n * @param appData Application metadata.\n * @returns An IMetaDataSchema object, with all relevant parameters set.\n */\n constructMetadata(appData) {\n const pjson = require('../../package.json');\n const metadata = {\n ['ipex_session_id']: this.sessionManager.getId(TrackingIdEnum_1.default.ipexIdKey).id,\n ['long_term_id']: this.sessionManager.getId(TrackingIdEnum_1.default.longTermIdKey).id,\n ['app_version']: appData.applicationVersion,\n ['dpc_version']: pjson.version,\n platform: appData.platform,\n ['country_code']: appData.countryCode,\n ['language_code']: appData.languageCode,\n ['is_planner']: appData.isPlanner\n };\n if (appData.abVersionName || appData.abVersionVariation) {\n metadata['ab_version'] = {\n name: appData.abVersionName || '',\n variation: appData.abVersionVariation || ''\n };\n }\n if (appData.enableGa === true) {\n let clientId;\n try {\n clientId = this.cookie.getGaId();\n }\n catch (error) {\n // eslint-disable-next-line\n console.error(error);\n }\n metadata['ga_client_id'] = clientId || '';\n }\n const optionalParams = {\n ['store_id']: appData.storeId,\n kiosk: appData.kiosk,\n ['kiosk_id']: appData.kioskId\n };\n for (const [key, value] of Object.entries(optionalParams)) {\n this.addOptionalParameter(metadata, key, value);\n }\n return metadata;\n }\n /**\n * Create planning data for the event body, with the appropriate structure.\n * Will set optional parameters only if they are present (i.e. Not undefined).\n *\n * @returns Planning data, as an IPlanning object.\n */\n constructPlanningData() {\n const planningId = this.sessionManager.getId(TrackingIdEnum_1.default.planningIdKey);\n if (planningId == null) {\n return undefined;\n }\n const planningData = {\n ['planning_id']: planningId.id,\n ['start_source']: planningId.startSource\n };\n this.addOptionalParameter(planningData, 'source_design_id', planningId.sourceDesignId);\n this.addOptionalParameter(planningData, 'source_spr', planningId.sourceSpr);\n return planningData;\n }\n /**\n * Create module data for the event body, with the appropriate structure.\n * Will set optional parameters only if they are present (i.e. Not undefined).\n *\n * @returns ModuleData Module data, as an IModuleData object.\n */\n constructModuleData() {\n const metadata = MetadataManager_1.default.getModuleMetadata(this.moduleId);\n if (!metadata) {\n return undefined;\n }\n const moduleData = {\n ['module_id']: metadata.moduleId,\n ['module_version']: metadata.moduleVersion\n };\n if (metadata.abVersionName || metadata.abVersionVariation) {\n moduleData['module_ab_version'] = {\n name: metadata.abVersionName || '',\n variation: metadata.abVersionVariation || ''\n };\n }\n return moduleData;\n }\n /**\n * Helper method to add optional parameters to objects.\n *\n * @param obj The object to add a parameter to.\n * @param key Thge parameter to add.\n * @param val The value of the parameter.\n */\n addOptionalParameter(obj, key, val) {\n if (val !== undefined) {\n obj[key] = val;\n }\n }\n /**\n * Get the domain URL for web events depending on if development or production environment.\n *\n * @param dev True if using the development environment, false if production.\n * @returns The domain URL address.\n */\n getIpexDomain(dev) {\n return dev\n ? 'https://dpc-qa.ipex-insights.com/event/submit'\n : 'https://dpc.ipex-insights.com/event/submit';\n }\n /**\n * Get the stream key for events depending on if development or production.\n *\n * @param dev True if using the development environment, false if production.\n * @returns The x-api-key for the IPEX stream.\n */\n getIpexStreamKey(dev) {\n return dev\n ? 'puIswII0bn2UxyC9IL8KI3aWnYCeIQmv2tya5v7b'\n : 'rZQMCYLyig4uqKOCiRBY78ypyNfCE9Cz7XVh7XdV';\n }\n /**\n * Checks if the event name is valid.\n *\n * @param eventName The event name.\n * @param moment The IPEX moment.\n * @param applicationMetadata The app metadata.\n * @throws An Error if eventName, moment, app_id or module_id are incorrect.\n */\n checkEventSchema(eventName, moment, applicationMetadata) {\n if (typeof eventName !== 'string') {\n throw Error('Insights event name not defined. Will not send event.');\n }\n if (eventName.match(/[^A-Za-z0-9_]/g)) {\n throw Error(`Insights event ${eventName} contains special characters. Only alphanumerics and underscores are allowed.`);\n }\n if (eventName.length <= 3 || eventName.length > 40) {\n throw Error(`Insights event name ${eventName} too long or too short. Please keep it between 3 and 40 characters.`);\n }\n if (!applicationMetadata || Object.keys(applicationMetadata).length === 0) {\n throw Error(`Failed to send ${eventName} event, application metadata not found.`);\n }\n const applicationId = applicationMetadata.applicationId;\n if (applicationId.match(/[^A-Za-z0-9_äÄåÅöÖ]/g)) {\n throw Error(`Application id ${applicationId} contains special characters. Only alphanumerics and underscores are allowed.`);\n }\n const moduleId = this.moduleId || '';\n if (moduleId.match(/[^A-Za-z0-9_äÄåÅöÖ]/g)) {\n throw Error(`Module id ${moduleId} contains special characters. Only alphanumerics and underscores are allowed.`);\n }\n if (!Object.values(IpexMomentEnum_1.default).includes(moment)) {\n throw Error(`Failed to send ${eventName}, moment ${moment} does not exist in IpexMomentEnum.`);\n }\n }\n}\nexports.default = InsightsTarget;\n//# sourceMappingURL=InsightsTarget.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst MetadataManager_1 = __importDefault(require(\"../utilities/MetadataManager\"));\nconst TEAM = 'ipexinsights';\n/**\n * Class for using Google Analytics and sending events.\n */\nclass GoogleAnalyticsTarget {\n /**\n * Set up the Google Analytics integration based on given properties.\n * Will initialize and send the first required event.\n * Requires the Google Analytics script to be loaded in advance.\n *\n * @param props Parameters needed to initiate Google Analytics.\n * @returns A Promise from window.sendEvent.\n */\n setupGoogleAnalytics(props) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.checkGaEnabled()) {\n try {\n return yield window\n .analyticsInit({\n countryCode: props.countryCode,\n languageCode: props.language,\n platform: props.platform,\n plannerName: props.plannerName,\n dev: props.dev\n })\n .then(() => {\n return this.sendPageViewEvent();\n });\n }\n catch (e) {\n // eslint-disable-next-line\n console.error(e);\n }\n }\n });\n }\n /**\n * Send a given set of data to Google Analytics.\n *\n * @param category The category the event belongs to.\n * @param action The action being performed in the event.\n * @param label Event label, optional.\n * @param custom Parameters to include in the custom dimension.\n */\n sendGoogleAnalyticsEvent(category, action, label, custom) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.checkGaEnabled()) {\n try {\n return yield window.sendEvent({\n ['event_category']: category,\n ['event_action']: action,\n ['event_label']: label,\n custom: Object.assign({ team: TEAM }, custom)\n });\n }\n catch (e) {\n // eslint-disable-next-line\n console.error(e);\n }\n }\n });\n }\n /**\n * Send an event to Google Analytics with a name and a set of parameters.\n *\n * @param name Name of the event to be sent.\n * @param params Parameters to include in the event.\n * @param custom Parameters to include in the custom dimension.\n */\n sendGoogleAnalyticsEventWithParams(name, params, custom) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.checkGaEnabled()) {\n try {\n return yield window.sendEvent({\n name: name,\n params: params,\n custom: Object.assign({ team: TEAM }, custom)\n });\n }\n catch (e) {\n // eslint-disable-next-line\n console.error(e);\n }\n }\n });\n }\n /**\n * Check app metadata to see if GA is enabled.\n *\n * @returns True if GA is enabled, false if it's not, or if it's not defined.\n */\n checkGaEnabled() {\n const appMeta = MetadataManager_1.default.getApplicationMetadata();\n if (!('enableGa' in appMeta)) {\n return false;\n }\n if (appMeta.enableGa == null || appMeta.enableGa === false) {\n return false;\n }\n return true;\n }\n /**\n * Send the initial page view event required for Google Analytics to work.\n *\n * @returns A Promise from window.sendEvent.\n */\n sendPageViewEvent() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.checkGaEnabled()) {\n try {\n return yield window.sendEvent({\n ['event_category']: 'pageview',\n ['page_path']: window.location.pathname,\n ['page_location']: window.location.href,\n custom: {\n team: TEAM\n }\n });\n }\n catch (e) {\n // eslint-disable-next-line\n console.error(e);\n }\n }\n });\n }\n}\nexports.default = GoogleAnalyticsTarget;\n//# sourceMappingURL=GoogleAnalyticsTarget.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar GaEventEnum;\n(function (GaEventEnum) {\n GaEventEnum[\"savePlanner\"] = \"save_planner\";\n GaEventEnum[\"addToWishlist\"] = \"add_to_wishlist\";\n GaEventEnum[\"addToCart\"] = \"add_to_cart\";\n GaEventEnum[\"openPlanner\"] = \"open_planner\";\n})(GaEventEnum || (GaEventEnum = {}));\nexports.default = GaEventEnum;\n//# sourceMappingURL=GaEventEnum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar GaCategoryEnum;\n(function (GaCategoryEnum) {\n GaCategoryEnum[\"ecommerce\"] = \"ecommerce\";\n GaCategoryEnum[\"planners\"] = \"planners\";\n GaCategoryEnum[\"nonInteraction\"] = \"non_interaction\";\n})(GaCategoryEnum || (GaCategoryEnum = {}));\nexports.default = GaCategoryEnum;\n//# sourceMappingURL=GaCategoryEnum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DesignSourceEnum;\n(function (DesignSourceEnum) {\n DesignSourceEnum[\"clipboard\"] = \"clipboard\";\n DesignSourceEnum[\"designSearch\"] = \"design_search\";\n DesignSourceEnum[\"email\"] = \"email\";\n DesignSourceEnum[\"enterCode\"] = \"enter_code\";\n DesignSourceEnum[\"gallery\"] = \"gallery\";\n DesignSourceEnum[\"imageDeeplink\"] = \"image_deeplink\";\n DesignSourceEnum[\"iSell\"] = \"i_sell\";\n DesignSourceEnum[\"planningSupportTool\"] = \"planning_support_tool\";\n DesignSourceEnum[\"qr\"] = \"qr\";\n DesignSourceEnum[\"recommendation\"] = \"recommendation\";\n DesignSourceEnum[\"resumeLastDesign\"] = \"resume_last_design\";\n DesignSourceEnum[\"retailerSystem\"] = \"retailer_system\";\n DesignSourceEnum[\"salesSystem\"] = \"sales_system\";\n DesignSourceEnum[\"searchBar\"] = \"search_bar\";\n DesignSourceEnum[\"skytta\"] = \"skytta\";\n DesignSourceEnum[\"sms\"] = \"sms\";\n DesignSourceEnum[\"space\"] = \"space\";\n DesignSourceEnum[\"spr\"] = \"spr\";\n DesignSourceEnum[\"profile\"] = \"profile\";\n DesignSourceEnum[\"storageGuide\"] = \"storage_guide\";\n DesignSourceEnum[\"startFromSaved\"] = \"start_from_saved\";\n DesignSourceEnum[\"startFromScratch\"] = \"start_from_scratch\";\n DesignSourceEnum[\"startFromTemplate\"] = \"start_from_template\";\n DesignSourceEnum[\"unknown\"] = \"unknown\";\n})(DesignSourceEnum || (DesignSourceEnum = {}));\nexports.default = DesignSourceEnum;\n//# sourceMappingURL=DesignSourceEnum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ArticleActionEnum;\n(function (ArticleActionEnum) {\n ArticleActionEnum[\"add\"] = \"add\";\n ArticleActionEnum[\"delete\"] = \"delete\";\n ArticleActionEnum[\"move\"] = \"move\";\n ArticleActionEnum[\"select\"] = \"select\";\n ArticleActionEnum[\"copy\"] = \"copy\";\n ArticleActionEnum[\"rotate\"] = \"rotate\";\n})(ArticleActionEnum || (ArticleActionEnum = {}));\nexports.default = ArticleActionEnum;\n//# sourceMappingURL=ArticleActionEnum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Class for handling user flow events.\n */\nclass FlowHandler {\n constructor() {\n this.flows = [];\n }\n /**\n * Get a user flow by name.\n *\n * @param flowName\n */\n getFlow(flowName) {\n return this.flows.find(f => f.flowName == flowName);\n }\n /**\n * Create a new flow.\n *\n * @param flowName\n * @param stepName\n * @param stepLevel\n */\n createFlow(flowName, stepName, stepLevel) {\n const flow = this.flows.find(f => f.flowName == flowName);\n if (flow === undefined) {\n const newFlow = {\n flowName: flowName,\n stepName: stepName,\n stepLevel: stepLevel\n };\n this.flows.push(newFlow);\n }\n }\n /**\n * Update a flow.\n *\n * @param flowName\n * @param stepName\n * @param stepLevel\n */\n updateFlow(flowName, stepName, stepLevel) {\n const flowIndex = this.flows.map(f => f.flowName).indexOf(flowName);\n if (flowIndex === -1) {\n this.createFlow(flowName, stepName, stepLevel);\n }\n else {\n this.flows[flowIndex] = {\n flowName: flowName,\n stepName: stepName,\n stepLevel: stepLevel\n };\n }\n }\n /**\n * Delete a flow.\n *\n * @param flowName\n */\n deleteFlow(flowName) {\n const flowIndex = this.flows.map(f => f.flowName).indexOf(flowName);\n if (flowIndex !== -1) {\n this.flows.splice(flowIndex, 1);\n }\n }\n}\nexports.default = FlowHandler;\n//# sourceMappingURL=FlowHandler.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst InsightsTarget_1 = __importDefault(require(\"./targets/InsightsTarget\"));\nconst GoogleAnalyticsTarget_1 = __importDefault(require(\"./targets/GoogleAnalyticsTarget\"));\nconst IpexMomentEnum_1 = __importDefault(require(\"./enums/IpexMomentEnum\"));\nconst GaEventEnum_1 = __importDefault(require(\"./enums/GaEventEnum\"));\nconst GaCategoryEnum_1 = __importDefault(require(\"./enums/GaCategoryEnum\"));\nconst DesignSourceEnum_1 = __importDefault(require(\"./enums/DesignSourceEnum\"));\nconst SessionManager_1 = __importDefault(require(\"./utilities/SessionManager\"));\nconst DesignInteractionEnum_1 = __importDefault(require(\"./enums/DesignInteractionEnum\"));\nconst TrackingIdEnum_1 = __importDefault(require(\"./enums/TrackingIdEnum\"));\nconst ArticleActionEnum_1 = __importDefault(require(\"./enums/ArticleActionEnum\"));\nconst InsightsEventEnum_1 = __importDefault(require(\"./enums/InsightsEventEnum\"));\nconst MetadataManager_1 = __importDefault(require(\"./utilities/MetadataManager\"));\nconst FlowHandler_1 = __importDefault(require(\"./utilities/FlowHandler\"));\n/**\n * Class for sending of events to various sources.\n */\nclass EventSender {\n constructor() {\n this.insights = new InsightsTarget_1.default();\n this.sessionManager = new SessionManager_1.default();\n this.googleAnalytics = new GoogleAnalyticsTarget_1.default();\n this.flowHandler = new FlowHandler_1.default();\n }\n /**\n * Set the module id in insights target.\n *\n * @param moduleId The module id.\n */\n setTargetModuleId(moduleId) {\n this.insights.moduleId = moduleId;\n }\n /**\n * Set up Google Analytics, and send open_planner events to Insights and GA.\n *\n * @param props Properties for the init event.\n * @returns The promise for setupGoogleAnalytics.\n */\n setupAndSendInit(props) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.sendApplicationStartUpEvents();\n return this.googleAnalytics\n .setupGoogleAnalytics({\n countryCode: props.countryCode.toLowerCase(),\n language: props.languageCode.toLowerCase(),\n plannerName: props.applicationId,\n dev: !!props.dev,\n platform: props.platform\n })\n .then(() => __awaiter(this, void 0, void 0, function* () {\n const session = this.sessionManager.getValidId(TrackingIdEnum_1.default.sessionIdKey);\n this.googleAnalytics.sendGoogleAnalyticsEvent(GaCategoryEnum_1.default.planners, GaEventEnum_1.default.openPlanner, session.id);\n }));\n });\n }\n /**\n * Send an add_to_cart event to Insights and GA.\n *\n * @param data Items added to cart.\n */\n sendAddToCart(data) {\n var _a, _b, _c;\n return __awaiter(this, void 0, void 0, function* () {\n yield this.updateLocalIds();\n const planning = this.sessionManager.getId(TrackingIdEnum_1.default.planningIdKey);\n const session = this.sessionManager.getId(TrackingIdEnum_1.default.sessionIdKey);\n yield Promise.all([\n this.insights.sendInsightsEvent(IpexMomentEnum_1.default.giveMe, InsightsEventEnum_1.default.addToCart, {\n currency: data.currency,\n ['design_id']: data.designId ? data.designId : null,\n articles: data.items,\n ['unavailable_articles']: data.unavailableItems ? data.unavailableItems : null\n }, data.payload),\n this.googleAnalytics.sendGoogleAnalyticsEventWithParams(GaEventEnum_1.default.addToCart, {\n currency: data.currency,\n items: data.items.map(item => ({\n id: item.id,\n price: item.price,\n quantity: item.qty\n }))\n }, {\n // This is custom dimension 47 and will be renamed to planner_product_combination_id on the server side\n // Note that this is not the planning id, but rather the design id due to a legacy naming on Ingkas side.\n ['planning_id']: (_a = data.designId) !== null && _a !== void 0 ? _a : null,\n // Relevant primarily for episod, we include session and the actual planning id that relates to sessions.\n ['session_id']: (_b = session === null || session === void 0 ? void 0 : session.id) !== null && _b !== void 0 ? _b : null,\n ['session_planning_id']: (_c = planning === null || planning === void 0 ? void 0 : planning.id) !== null && _c !== void 0 ? _c : null\n })\n ]);\n });\n }\n /**\n * Send an add_to_wishlist event to Insights and GA.\n *\n * @param data Items added to wish list.\n */\n sendAddToWishList(data) {\n var _a, _b, _c, _d;\n return __awaiter(this, void 0, void 0, function* () {\n yield this.updateLocalIds();\n const planning = this.sessionManager.getId(TrackingIdEnum_1.default.planningIdKey);\n const session = this.sessionManager.getId(TrackingIdEnum_1.default.sessionIdKey);\n yield Promise.all([\n this.insights.sendInsightsEvent(IpexMomentEnum_1.default.giveMe, InsightsEventEnum_1.default.addToWishList, {\n currency: data.currency,\n ['design_id']: (_a = data.designId) !== null && _a !== void 0 ? _a : null,\n articles: data.items\n }, data.payload),\n this.googleAnalytics.sendGoogleAnalyticsEvent(GaCategoryEnum_1.default.ecommerce, GaEventEnum_1.default.addToWishlist, undefined, {\n // Custom dimension 47\n ['planning_id']: (_b = data.designId) !== null && _b !== void 0 ? _b : null,\n // Relevant primarily for episod, we include session and the actual planning id that relates to sessions.\n ['session_id']: (_c = session === null || session === void 0 ? void 0 : session.id) !== null && _c !== void 0 ? _c : null,\n ['session_planning_id']: (_d = planning === null || planning === void 0 ? void 0 : planning.id) !== null && _d !== void 0 ? _d : null\n })\n ]);\n });\n }\n /**\n *\n * @param designId The design id that started the planning session.\n * @param source The source of the planning session.\n * @param payload The payload data.\n * @param spr The SPR that was used as base for the planning if any.\n * @throws If source does not exist in DesignSourceEnum.\n */\n sendInitPlanningSession(designId, source, payload, spr) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!Object.values(DesignSourceEnum_1.default).includes(source)) {\n throw Error(`Failed to send event, design source ${source} is not a valid source. Check DesignSourceEnum.`);\n }\n this.updateDesignId(designId, source);\n this.sessionManager.createId(TrackingIdEnum_1.default.planningIdKey, source, designId, spr);\n yield this.updateLocalIds();\n // Planning data is sent automatically when the event is created.\n yield this.insights.sendInsightsEvent(IpexMomentEnum_1.default.nonInteraction, InsightsEventEnum_1.default.initiatePlanningSession, undefined, payload);\n });\n }\n /**\n * Send a save_planner event to Insights and GA.\n *\n * @param designId The design id to save.\n * @param payload The payload data.\n * @param mode How this design was saved or shared.\n */\n sendSavePlanner(designId, payload, mode) {\n return __awaiter(this, void 0, void 0, function* () {\n const metadata = MetadataManager_1.default.getApplicationMetadata();\n yield this.updateLocalIds();\n yield Promise.all([\n this.insights.sendInsightsEvent(IpexMomentEnum_1.default.giveMe, 'save_planner', {\n ['mode']: mode,\n ['design_id']: designId\n }, payload),\n this.googleAnalytics.sendGoogleAnalyticsEvent(GaCategoryEnum_1.default.planners, GaEventEnum_1.default.savePlanner, metadata.applicationId, {\n // Custom dimension 47\n ['planning_id']: designId\n })\n ]);\n });\n }\n /**\n * Send a custom event to Insights. The name of the event is contained in data.event.\n *\n * @param data Data sent with the event.\n */\n sendCustomEvent(data) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.updateLocalIds();\n yield this.insights.sendInsightsEvent(data.ipexMoment, data.event, undefined, data.payload);\n });\n }\n /**\n * Send a design interaction event to Insights.\n *\n * @param designId The design id which was interacted with.\n * @param interaction The interaction source.\n * @param payload The payload data.\n * @throws An Error if interaction is incorrect.\n */\n sendDesignInteractionEvent(designId, interaction, payload) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!Object.values(DesignInteractionEnum_1.default).includes(interaction)) {\n throw Error(`Failed to send event, interaction ${interaction} is not a valid interaction. Check DesignInteractionEnum.`);\n }\n yield this.updateLocalIds();\n yield this.insights.sendInsightsEvent(IpexMomentEnum_1.default.nonInteraction, interaction, {\n ['design_id']: designId\n }, payload);\n });\n }\n /**\n * Send an article_action event to Insights.\n *\n * @param articleId The article id.\n * @param action The action being performed.\n * @param isGlobal Indicate if article id is global or local.\n * @param [payload] Optional payload data.\n * @throws An Error if action is incorrect.\n */\n sendArticleAction(articleId, action, isGlobal, payload) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!Object.values(ArticleActionEnum_1.default).includes(action)) {\n throw Error(`Failed to send event, action ${action} is not a valid interaction. Check ArticleActionEnum.`);\n }\n yield this.updateLocalIds();\n yield this.insights.sendInsightsEvent(IpexMomentEnum_1.default.makeItMe, InsightsEventEnum_1.default.articleAction, {\n ['article_action']: action,\n ['article_id']: articleId,\n ['is_global']: isGlobal\n }, payload);\n });\n }\n /**\n * Send a flow step event to Insights.\n *\n * @param flowName Name of the flow.\n * @param stepName Name of the step in the flow.\n * @param stepLevel Level of step in the flow.\n */\n sendUserFlowStep(flowName, stepName, stepLevel, payload) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.updateLocalIds();\n let previousStepName;\n let previousStepLevel;\n const flow = this.flowHandler.getFlow(flowName);\n if (flow === undefined) {\n this.flowHandler.createFlow(flowName, stepName, stepLevel);\n previousStepName = null;\n previousStepLevel = null;\n }\n else {\n previousStepLevel = flow.stepLevel;\n previousStepName = flow.stepName;\n this.flowHandler.updateFlow(flowName, stepName, stepLevel);\n }\n yield this.insights.sendInsightsEvent(IpexMomentEnum_1.default.nonInteraction, InsightsEventEnum_1.default.userFlow, {\n ['flow_name']: flowName,\n ['step_name']: stepName,\n ['step_level']: stepLevel,\n ['previous_step_name']: previousStepName,\n ['previous_step_level']: previousStepLevel\n }, payload);\n });\n }\n /**\n * Send mandatory startup event for the module client flow.\n */\n sendModuleStartUpEvents() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.updateLocalIds();\n yield this.insights.sendInsightsEvent(IpexMomentEnum_1.default.nonInteraction, 'connect_module');\n });\n }\n /**\n * Send mandatory startup event for the application startup flow.\n */\n sendApplicationStartUpEvents() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.updateLocalIds();\n yield this.insights.sendInsightsEvent(IpexMomentEnum_1.default.nonInteraction, InsightsEventEnum_1.default.connectApplication);\n });\n }\n /**\n * Send AB version changed event.\n */\n sendSetAbVersion() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.updateLocalIds();\n yield this.insights.sendInsightsEvent(IpexMomentEnum_1.default.nonInteraction, 'set_ab_version');\n });\n }\n /**\n * Register a design id in the metadata, or throw an Error if it's empty/undefined and source is incorrect.\n * If the design id is empty/undefined and the source is start_from_scratch, start_from_template,\n * resume_last_design, or space design id will be registered as start_from_scratch, start_from_template,\n * resume_last_design, or space respectively. Should a design id be provided, that will be registered instead.\n *\n * @param designId The design id to update.\n * @param source The source of the planning session.\n */\n updateDesignId(designId, source) {\n if (!designId &&\n source !== DesignSourceEnum_1.default.startFromScratch &&\n source !== DesignSourceEnum_1.default.startFromTemplate &&\n source !== DesignSourceEnum_1.default.resumeLastDesign &&\n source !== DesignSourceEnum_1.default.space) {\n // Will throw an error if no design id is provided (or it's empty), given source is not start_from_scratch\n throw Error('No design id provided');\n }\n else if (!designId && source === DesignSourceEnum_1.default.startFromScratch) {\n MetadataManager_1.default.updateApplication({ designId: 'start_from_scratch' });\n }\n else if (!designId && source === DesignSourceEnum_1.default.startFromTemplate) {\n MetadataManager_1.default.updateApplication({ designId: 'start_from_template' });\n }\n else if (!designId && source === DesignSourceEnum_1.default.resumeLastDesign) {\n MetadataManager_1.default.updateApplication({ designId: 'resume_last_design' });\n }\n else if (!designId && source === DesignSourceEnum_1.default.space) {\n MetadataManager_1.default.updateApplication({ designId: 'space' });\n }\n else {\n MetadataManager_1.default.updateApplication({ designId });\n }\n }\n /**\n * Update all local Ids through the session manager, then sends a start event if a new Id was generated.\n */\n updateLocalIds() {\n return __awaiter(this, void 0, void 0, function* () {\n const eventData = this.sessionManager.updateIds();\n if (eventData !== undefined) {\n yield this.insights.sendInsightsEvent(IpexMomentEnum_1.default.nonInteraction, InsightsEventEnum_1.default.start, eventData);\n }\n });\n }\n}\nexports.default = EventSender;\n//# sourceMappingURL=EventSender.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst GA_SCRIPT_URL = 'https://www.ikea.com/se/sv/analytics/scripts/analytics-minor.min.js';\nconst TYPE = 'text/javascript';\n/**\n * Utility class for loading the INGKA GA script, necessary for setting up Google Analytics.\n */\nclass GAScriptLoader {\n /**\n * Check if the GA script is already loaded, and constructs and loads it if not.\n *\n * @returns The Promise from {@link constructScriptElement}, or an autoresolved Promise if already loaded.\n */\n loadGoogleAnalyticsScript() {\n return __awaiter(this, void 0, void 0, function* () {\n let scriptLoaded = false;\n const scripts = document.getElementsByTagName('script');\n // Loop through all script tags\n Array.from(scripts).forEach(script => {\n if (script.src && script.src === GA_SCRIPT_URL && script.type && script.type === TYPE) {\n scriptLoaded = true;\n }\n });\n if (!scriptLoaded) {\n try {\n yield this.constructScriptElement();\n return Promise.resolve();\n }\n catch (e) {\n return Promise.reject(e);\n }\n }\n return Promise.resolve();\n });\n }\n /**\n * Construct the script element, and appends it to document.head.\n *\n * @returns A promise for loading the script.\n */\n constructScriptElement() {\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = GA_SCRIPT_URL;\n script.type = TYPE;\n script.async = true;\n document.head.appendChild(script);\n script.addEventListener('load', () => {\n resolve(script);\n });\n script.addEventListener('error', () => {\n reject(new Error(`${GA_SCRIPT_URL} failed to load.`));\n });\n });\n }\n}\nexports.default = GAScriptLoader;\n//# sourceMappingURL=GAScriptLoader.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar PlatformEnum;\n(function (PlatformEnum) {\n PlatformEnum[\"owfe\"] = \"owfe\";\n PlatformEnum[\"nonIrw\"] = \"non_irw\";\n PlatformEnum[\"kiosk\"] = \"kiosk\";\n})(PlatformEnum || (PlatformEnum = {}));\nexports.default = PlatformEnum;\n//# sourceMappingURL=PlatformEnum.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst EventSender_1 = __importDefault(require(\"./EventSender\"));\nconst MetadataManager_1 = __importDefault(require(\"./utilities/MetadataManager\"));\n/**\n * Entrypoint API class for modules.\n */\nclass ModuleClient {\n /**\n * @param moduleMetadata The module metadata.\n * @param insightsApi The insightsApi instance.\n */\n constructor(moduleMetadata, insightsApi) {\n this.insightsApi = null;\n this.insightsApi = insightsApi;\n this.eventSender = new EventSender_1.default();\n MetadataManager_1.default.registerModule(moduleMetadata);\n this.moduleId = moduleMetadata.moduleId;\n this.eventSender.setTargetModuleId(moduleMetadata.moduleId);\n this.eventSender.sendModuleStartUpEvents();\n }\n /**\n * Send an addToCart event, if application is enabled.\n *\n * @param data The included items in the cart.\n */\n addToCart(data) {\n if (this.insightsApi.isEnabled) {\n this.eventSender.sendAddToCart(data);\n }\n }\n /**\n * Send an addToWishList event, if application is enabled.\n *\n * @param data The included items in the wish list.\n */\n addToWishList(data) {\n if (this.insightsApi.isEnabled) {\n this.eventSender.sendAddToWishList(data);\n }\n }\n /**\n * Send a savePlanner event, if application is enabled.\n *\n * @param designId The design id to save, optional.\n * @param [payload] Optional payload data.\n * @param [mode] How this design was saved or shared.\n */\n saveDesign(designId, payload, mode) {\n if (this.insightsApi.isEnabled) {\n this.eventSender.sendSavePlanner(designId, payload, mode);\n }\n }\n /**\n * Send a custom event, if application is enabled.\n *\n * @param data The information about the custom event.\n */\n sendEvent(data) {\n if (this.insightsApi.isEnabled) {\n this.eventSender.sendCustomEvent(data);\n }\n }\n /**\n * Send an initPlanningSession event, if application is enabled.\n *\n * @param designId The design id that started the session.\n * @param source The source of the planning session.\n * @param [payload] Optional payload data.\n * @param [spr] Optional The SPR that was used as base for the planning if any.\n */\n initPlanningSession(designId, source, payload, spr) {\n if (this.insightsApi.isEnabled) {\n this.eventSender.sendInitPlanningSession(designId, source, payload, spr);\n }\n }\n /**\n * Send a design interaction event, if application is enabled.\n *\n * @param designId The design id which was interacted with.\n * @param interaction The interaction source.\n * @param [payload] Optional payload data.\n */\n sendDesignInteractionEvent(designId, interaction, payload) {\n if (this.insightsApi.isEnabled) {\n this.eventSender.sendDesignInteractionEvent(designId, interaction, payload);\n }\n }\n /**\n * Send a article action event, if application is enabled.\n *\n * @param articleId The article id.\n * @param action The action being performed.\n * @param isGlobal Indicate if article id is global or local.\n * @param [payload] Optional payload data.\n */\n articleAction(articleId, action, isGlobal, payload) {\n if (this.insightsApi.isEnabled) {\n this.eventSender.sendArticleAction(articleId, action, isGlobal, payload);\n }\n }\n /**\n * Sets the A/B version for the session to facilitate A/B testing, if application is enabled.\n *\n * @param abVersionName Name of the ab version.\n * @param abVersionVariation Optional ab varation.\n */\n setAbVersion(abVersionName, abVersionVariation) {\n if (this.insightsApi.isEnabled) {\n MetadataManager_1.default.updateModule({\n abVersionName,\n abVersionVariation\n }, this.moduleId);\n this.eventSender.sendSetAbVersion();\n }\n }\n /**\n * Send a flow step event, if the component is enabled.\n *\n * @param flowName Name of the flow.\n * @param stepName Name of the step in the flow.\n * @param stepLevel Level of step in the flow.\n */\n sendUserFlowStep(flowName, stepName, stepLevel, payload) {\n if (this.insightsApi.isEnabled) {\n this.eventSender.sendUserFlowStep(flowName, stepName, stepLevel, payload);\n }\n }\n /**\n * Send a flow step event, if the component is enabled.\n * Asynchronous version of this function.\n *\n * @param flowName Name of the flow.\n * @param stepName Name of the step in the flow.\n * @param stepLevel Level of step in the flow.\n */\n sendUserFlowStepAsync(flowName, stepName, stepLevel, payload) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.insightsApi.isEnabled) {\n yield this.eventSender.sendUserFlowStep(flowName, stepName, stepLevel, payload);\n }\n });\n }\n /**\n * Get user ids.\n *\n * @returns The user ids (sessionId, planningId, longTermId and ipexId).\n */\n getIds() {\n if (this.insightsApi.isEnabled) {\n return this.insightsApi.getIds();\n }\n }\n}\nexports.default = ModuleClient;\n//# sourceMappingURL=ModuleClient.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst EventSender_1 = __importDefault(require(\"./EventSender\"));\nconst SessionManager_1 = __importDefault(require(\"./utilities/SessionManager\"));\nconst SequenceNumberHandler_1 = __importDefault(require(\"./utilities/SequenceNumberHandler\"));\nconst GAScriptLoader_1 = __importDefault(require(\"./utilities/GAScriptLoader\"));\nconst PlatformEnum_1 = __importDefault(require(\"./enums/PlatformEnum\"));\nconst ModuleClient_1 = __importDefault(require(\"./ModuleClient\"));\nconst CookieReader_1 = __importDefault(require(\"./utilities/CookieReader\"));\nconst MetadataManager_1 = __importDefault(require(\"./utilities/MetadataManager\"));\n/**\n * Entrypoint API class for applications.\n */\nclass InsightsApi {\n constructor() {\n // eslint-disable-next-line\n this._isEnabled = false;\n this.eventSender = new EventSender_1.default();\n this.session = new SessionManager_1.default();\n this.sequenceNumber = new SequenceNumberHandler_1.default();\n }\n /**\n *\tReturns a boolean that indicates whether or not insights api is enabled.\n */\n get isEnabled() {\n return this._isEnabled;\n }\n /**\n * Connect the component for an application.\n *\n * @param props Initialization data for the application.\n */\n connectApplication(props) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof props.applicationId !== 'string') {\n throw new Error('Property applicationId is not a string. DPC Initialization will not proceed.');\n }\n if (!Object.values(PlatformEnum_1.default).includes(props.platform)) {\n throw Error(`Platform ${props.platform} is not valid. Check PlatformEnum. DPC Initialization will not proceed.`);\n }\n if (props.kiosk) {\n props.platform = PlatformEnum_1.default.kiosk;\n }\n MetadataManager_1.default.registerApplication(props);\n if (props.enableGa === true) {\n const cookieReader = new CookieReader_1.default();\n try {\n cookieReader.getGaId();\n const scriptLoader = new GAScriptLoader_1.default();\n yield scriptLoader.loadGoogleAnalyticsScript();\n yield this.eventSender.setupAndSendInit(props);\n }\n catch (error) {\n // Disable GA in case we cannot find the cookie.\n // eslint-disable-next-line\n console.warn(`GA data not found. Disabling GA events.`);\n MetadataManager_1.default.updateApplication({ enableGa: false });\n // Send regular ApplicationStartUpEvents instead.\n yield this.eventSender.sendApplicationStartUpEvents();\n }\n }\n else {\n yield this.eventSender.sendApplicationStartUpEvents();\n }\n this._isEnabled = true;\n });\n }\n /**\n * Receive module initialization data and\n * returns instance of module client.\n *\n * @param moduleMetadata Initialization data for the module.\n * @returns The module client instance.\n */\n moduleClient(moduleMetadata) {\n if (typeof moduleMetadata.moduleId !== 'string') {\n throw new Error('Property moduleId is not a string. Module client initialization will not proceed.');\n }\n if (!this.isEnabled) {\n throw new Error('Application is not enabled. Module client initialization will not proceed.');\n }\n const applicationMetadata = MetadataManager_1.default.getApplicationMetadata();\n if (!applicationMetadata || Object.keys(applicationMetadata).length === 0) {\n throw new Error('Application metadata not found. Module client initialization will not proceed.');\n }\n return new ModuleClient_1.default(moduleMetadata, this);\n }\n /**\n * Disable the component. Will reset session data and metadata, as well as the sequence number.\n */\n disconnect() {\n this._isEnabled = false;\n this.session.clearSessions();\n this.sequenceNumber.resetSequenceNumber();\n MetadataManager_1.default.clear();\n }\n /**\n * Send an addToCart event, if the component is enabled.\n *\n * @param data The included items in the cart.\n */\n addToCart(data) {\n if (this.isEnabled) {\n this.eventSender.sendAddToCart(data);\n }\n }\n /**\n * Send an addToWishList event, if the component is enabled.\n *\n * @param data The included items in the wish list.\n */\n addToWishList(data) {\n if (this.isEnabled) {\n this.eventSender.sendAddToWishList(data);\n }\n }\n /**\n * Send an initPlanningSession event, if the component is enabled.\n *\n * @param designId The design id that started the session.\n * @param source The source of the planning session.\n * @param [payload] Optional payload data.\n * @param [spr] Optional The SPR that was used as base for the planning if any.\n *\n */\n initPlanningSession(designId, source, payload, spr) {\n if (this.isEnabled) {\n this.eventSender.sendInitPlanningSession(designId, source, payload, spr);\n }\n }\n /**\n * Send a savePlanner event, if the component is enabled.\n *\n * @param designId The design id to save, optional.\n * @param [payload] Optional payload data.\n * @param [mode] How this design was saved or shared.\n */\n saveDesign(designId, payload, mode) {\n if (this.isEnabled) {\n this.eventSender.sendSavePlanner(designId, payload, mode);\n }\n }\n /**\n * Send a custom event, if the component is enabled.\n *\n * @param data The information about the custom event.\n */\n sendEvent(data) {\n if (this.isEnabled) {\n this.eventSender.sendCustomEvent(data);\n }\n }\n /**\n * Send a design interaction event, if the component is enabled.\n *\n * @param designId The design id which was interacted with.\n * @param interaction The interaction source.\n * @param [payload] Optional payload data.\n */\n sendDesignInteractionEvent(designId, interaction, payload) {\n if (this.isEnabled) {\n this.eventSender.sendDesignInteractionEvent(designId, interaction, payload);\n }\n }\n /**\n * Send a article action event, if the component is enabled.\n *\n * @param articleId The article id.\n * @param action The action being performed.\n * @param isGlobal Indicate if article id is global or local.\n * @param [payload] Optional payload data.\n */\n articleAction(articleId, action, isGlobal, payload) {\n if (this.isEnabled) {\n this.eventSender.sendArticleAction(articleId, action, isGlobal, payload);\n }\n }\n /**\n * Sets the A/B version for the session to facilitate A/B testing, if the component is enabled.\n *\n * @param abVersionName Name of the ab version.\n * @param abVersionVariation Optional ab variation.\n */\n setAbVersion(abVersionName, abVersionVariation) {\n if (this.isEnabled) {\n MetadataManager_1.default.updateApplication({ abVersionName, abVersionVariation });\n this.eventSender.sendSetAbVersion();\n }\n }\n /**\n * Send a flow step event, if the component is enabled.\n *\n * @param flowName Name of the flow.\n * @param stepName Name of the step in the flow.\n * @param stepLevel Level of step in the flow.\n */\n sendUserFlowStep(flowName, stepName, stepLevel, payload) {\n if (this.isEnabled) {\n this.eventSender.sendUserFlowStep(flowName, stepName, stepLevel, payload);\n }\n }\n /**\n * Send a flow step event, if the component is enabled.\n * Asynchronous version of this function.\n *\n * @param flowName Name of the flow.\n * @param stepName Name of the step in the flow.\n * @param stepLevel Level of step in the flow.\n */\n sendUserFlowStepAsync(flowName, stepName, stepLevel, payload) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.isEnabled) {\n yield this.eventSender.sendUserFlowStep(flowName, stepName, stepLevel, payload);\n }\n });\n }\n /**\n * Get user ids.\n *\n * @returns The user ids (sessionId, planningId, longTermId and ipexId).\n */\n getIds() {\n if (this.isEnabled) {\n return this.session.getIds();\n }\n }\n}\nexports.default = InsightsApi;\n//# sourceMappingURL=InsightsApi.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DesignSaveModeEnum;\n(function (DesignSaveModeEnum) {\n DesignSaveModeEnum[\"profile\"] = \"profile\";\n DesignSaveModeEnum[\"sms\"] = \"sms\";\n DesignSaveModeEnum[\"email\"] = \"email\";\n DesignSaveModeEnum[\"code\"] = \"code\";\n DesignSaveModeEnum[\"other\"] = \"other\";\n})(DesignSaveModeEnum || (DesignSaveModeEnum = {}));\nexports.default = DesignSaveModeEnum;\n//# sourceMappingURL=DesignSaveModeEnum.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DesignSaveModeEnum = exports.PlatformEnum = exports.ModuleClient = exports.IpexMomentEnum = exports.InsightsApi = exports.DesignSourceEnum = exports.DesignInteractionEnum = exports.ArticleActionEnum = void 0;\nconst InsightsApi_1 = __importDefault(require(\"./InsightsApi\"));\nexports.InsightsApi = InsightsApi_1.default;\nconst DesignSourceEnum_1 = __importDefault(require(\"./enums/DesignSourceEnum\"));\nexports.DesignSourceEnum = DesignSourceEnum_1.default;\nconst IpexMomentEnum_1 = __importDefault(require(\"./enums/IpexMomentEnum\"));\nexports.IpexMomentEnum = IpexMomentEnum_1.default;\nconst DesignInteractionEnum_1 = __importDefault(require(\"./enums/DesignInteractionEnum\"));\nexports.DesignInteractionEnum = DesignInteractionEnum_1.default;\nconst PlatformEnum_1 = __importDefault(require(\"./enums/PlatformEnum\"));\nexports.PlatformEnum = PlatformEnum_1.default;\nconst ArticleActionEnum_1 = __importDefault(require(\"./enums/ArticleActionEnum\"));\nexports.ArticleActionEnum = ArticleActionEnum_1.default;\nconst ModuleClient_1 = __importDefault(require(\"./ModuleClient\"));\nexports.ModuleClient = ModuleClient_1.default;\nconst DesignSaveModeEnum_1 = __importDefault(require(\"./enums/DesignSaveModeEnum\"));\nexports.DesignSaveModeEnum = DesignSaveModeEnum_1.default;\n//# sourceMappingURL=index.js.map","/**\n * Used for setting the instance of InsightsApi, so that components\n * with automatic analytics can access it, and send events through it.\n */\nclass AnalyticsManager {\n /**\n * Returns the set insightsApi instance, or null if it wasn't set.\n */\n static getInsightsApi() {\n return this.insightsApi;\n }\n /**\n * Planners should call this method as early as possible, before rendering\n * any components which have automatic analytics enabled.\n *\n * @param insightsApi The insightsApi instance created by the planner.\n */\n static setInsightsApi(insightsApi) {\n this.insightsApi = insightsApi;\n }\n}\nAnalyticsManager.insightsApi = null;\nexport default AnalyticsManager;\n//# sourceMappingURL=AnalyticsManager.js.map","export default Object.freeze({\n authentication: 'authentication',\n localization: 'localization',\n translations: 'translations',\n product: 'product',\n storeAvailability: 'storeAvailability',\n store: 'store'\n});\n//# sourceMappingURL=CacheStoreType.js.map","import { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport { GlobalCacheStore } from '@inter-ikea-kompis/utilities';\nconst CONNECTION_TIMEOUT = 15000;\n/**\n * Service fetch utility.\n */\nexport default class IframeManager {\n /**\n * Constructor.\n *\n * @param url Iframe URL.\n * @param cacheStore Cache store.\n */\n constructor(url, cacheStore = new GlobalCacheStore()) {\n this.isConnected = false;\n this.url = url;\n this.cache = cacheStore.getStore('iframeManager');\n }\n /**\n * Connects the iframe.\n *\n * @returns Iframe.\n */\n getIframe() {\n return new Promise((resolve, reject) => {\n const cacheItem = this.cache.get(this.url);\n if (cacheItem) {\n if (!this.isConnected) {\n cacheItem.connectedCount++;\n }\n if (cacheItem.error) {\n reject(cacheItem.error);\n }\n else if (cacheItem.connectionTimeout === null) {\n resolve(cacheItem.iframe);\n }\n else {\n cacheItem.resolves.push(resolve);\n cacheItem.rejects.push(reject);\n }\n }\n else {\n const iframe = document.createElement('iframe');\n const cacheItemDefault = {\n connectedCount: 1,\n iframe,\n connectionTimeout: null,\n resolves: [resolve],\n rejects: [reject],\n error: null\n };\n cacheItemDefault.connectionTimeout = this.getConnectionTimeout(cacheItemDefault);\n this.cache.set(this.url, cacheItemDefault);\n iframe.addEventListener('load', this.onIframeLoad.bind(this, cacheItemDefault));\n iframe.src = this.url;\n iframe.style.display = 'none';\n document.body.appendChild(iframe);\n }\n this.isConnected = true;\n });\n }\n /**\n * Disconnects the iframe.\n */\n disconnect() {\n const cacheItem = this.cache.get(this.url);\n if (cacheItem) {\n cacheItem.connectedCount--;\n if (cacheItem.connectedCount === 0) {\n if (cacheItem.connectionTimeout)\n clearTimeout(cacheItem.connectionTimeout);\n document.body.removeChild(cacheItem.iframe);\n this.cache.delete(this.url);\n }\n }\n this.isConnected = false;\n }\n /**\n * Triggered on iframe load.\n *\n * @param cacheItem Cache item.\n */\n onIframeLoad(cacheItem) {\n if (cacheItem.connectionTimeout)\n clearTimeout(cacheItem.connectionTimeout);\n cacheItem.connectionTimeout = null;\n if (cacheItem.iframe.contentWindow) {\n const resolves = cacheItem.resolves;\n cacheItem.resolves = [];\n for (const resolve of resolves) {\n resolve(cacheItem.iframe);\n }\n }\n else {\n const rejects = cacheItem.rejects;\n cacheItem.error = new ServiceException('Failed to load iframe. Missing access to iframe.contentWindow.');\n cacheItem.rejects = [];\n for (const reject of rejects) {\n reject(cacheItem.error);\n }\n }\n }\n /**\n * Returns a timeout.\n *\n * @param cacheItem Cache item.\n * @returns Timeout.\n */\n getConnectionTimeout(cacheItem) {\n return setTimeout(() => {\n const rejects = cacheItem.rejects;\n cacheItem.error = new ServiceException('Failed to load iframe. Request timed out. Connection problems? Trying to load: ' + this.url);\n cacheItem.rejects = [];\n for (const reject of rejects) {\n reject(cacheItem.error);\n }\n }, CONNECTION_TIMEOUT);\n }\n}\n//# sourceMappingURL=IframeManager.js.map","import { ConnectionProblemException, ServerErrorResponseException, UnableToParseServerResponseException } from '@inter-ikea-kompis/exceptions';\n/**\n * Service fetch utility.\n */\nexport default class ServiceFetch {\n /**\n * Fetches JSON and handles error responses.\n *\n * @param requestInfo Request info.\n * @param [options] Fetch options.\n * @param [options.headers] Fetch options.\n * @param [options.credentials] Fetch options.\n * @param [options.statusHandlers] Object with status handlers for a specific status code. Example: { 419: async () => { return this.__getUser() } }.\n * @returns Promise.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static async json(requestInfo, options) {\n const response = await this.fetch(requestInfo, options);\n if (typeof response.json === 'function') {\n try {\n return await response.json();\n }\n catch (error) {\n throw new UnableToParseServerResponseException(response, error.message);\n }\n }\n return response;\n }\n /**\n * Fetches text and handles error responses.\n *\n * @param requestInfo Request info.\n * @param [options] Fetch options.\n * @param [options.headers] Fetch options.\n * @param [options.credentials] Fetch options.\n * @param [options.statusHandlers] Object with status handlers for a specific status code. Example: { 419: async () => { return this.__getUser() } }.\n * @returns Promise.\n */\n static async text(requestInfo, options) {\n const response = await this.fetch(requestInfo, options);\n if (typeof response.text === 'function') {\n try {\n return await response.text();\n }\n catch (error) {\n throw new UnableToParseServerResponseException(response, error.message);\n }\n }\n return null;\n }\n /**\n * Fetches JSON and handles error responses.\n *\n * @param requestInfo Request info.\n * @param [options] Fetch options.\n * @param [options.headers] Fetch options.\n * @param [options.credentials] Fetch options.\n * @param [options.statusHandlers] Object with status handlers for a specific status code. Example: { 419: async () => { return this.__getUser() } }.\n * @returns Promise.\n */\n static async fetch(requestInfo, options) {\n let response;\n try {\n response = await window.fetch(requestInfo, options);\n }\n catch (error) {\n throw new ConnectionProblemException(requestInfo, error.message);\n }\n if (!response.ok) {\n throw new ServerErrorResponseException(response);\n }\n return response;\n }\n}\n//# sourceMappingURL=ServiceFetch.js.map","/**\n * Cookie util.\n */\nexport default class CookieUtility {\n /**\n * Deletes all cookies from document.\n */\n static deleteAllCookies() {\n document.cookie.split(';').forEach((cookie) => {\n const eqPos = cookie.indexOf('=');\n const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;\n this.removeCookie(name);\n });\n }\n /**\n * Removes a cookie.\n *\n * @param name Name.\n */\n static removeCookie(name) {\n document.cookie = `${name}=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT;`;\n }\n /**\n * Sets a session cookie.\n *\n * @param name Name.\n * @param value Value.\n */\n static setCookie(name, value) {\n document.cookie = `${name}=${value}; path=/;};`;\n }\n /**\n * Returns a cookie.\n *\n * @param name Name.\n * @returns Cookie value.\n */\n static getCookie(name) {\n const cookie = document.cookie.match('(^|;)\\\\s*' + name + '\\\\s*=\\\\s*([^;]+)');\n return cookie?.pop() ?? null;\n }\n}\n//# sourceMappingURL=CookieUtility.js.map","import { LocaleUtility } from '@inter-ikea-kompis/utilities';\n/**\n * This class is used for transforming data ÖVERSÄTTA translation tool.\n */\nexport default class OversattaTransformer {\n /**\n * Constructor.\n *\n * @param options Options.\n * @param [options.localizationPrefixApplication] Localization prefix application.\n * @param options.locale Locale.\n */\n constructor(options) {\n this.localizationPrefixApplication = options.localizationPrefixApplication || null;\n this.locale = options.locale;\n }\n /**\n * Transforms data into a LocalizedInformation model.\n *\n * @param data Response data to parse.\n * @returns Localized information model.\n */\n transform(data) {\n const storeId = data.localization && data.localization.storeId ? data.localization.storeId : null;\n const langId = data.localization && data.localization.langId ? data.localization.langId : null;\n const localizedInformation = {\n localization: this.getLocalization(data.localization || {}),\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n priceSettings: (data.priceSettings || data.prices || {}),\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n urls: this.getUrls(data.urls || data.URLs || {}, storeId, langId),\n endpoints: this.getEndpoints(data.endpoints || {}),\n translations: this.getTranslations(data.translations || {}),\n userABTest: data.UserABTest\n };\n for (const key of Object.keys(data)) {\n if (!localizedInformation[key] &&\n key !== 'iconImages' &&\n key !== 'prices' &&\n key !== 'URLs' &&\n key !== 'UserABTest') {\n localizedInformation[key] = data[key];\n }\n }\n return localizedInformation;\n }\n /**\n * Parses localization.\n *\n * @param localization Localization.\n * @returns Parsed localization.\n */\n getLocalization(localization) {\n const newLocalization = Object.assign({}, localization);\n this.replaceApplicationPrefixedKeys(newLocalization);\n // We should not use these.\n // Instead we should take the locale from the URL, or use endpoints.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete newLocalization.locale;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete newLocalization.iowsLocalePath;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete newLocalization.countryCode;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete newLocalization.languageCode;\n return newLocalization;\n }\n /**\n * Parses translations.\n *\n * @param translations Translations.\n * @returns Parsed translations.\n */\n getTranslations(translations) {\n const newTranslations = {};\n this.replaceApplicationPrefixedKeys(translations);\n for (const key of Object.keys(translations)) {\n newTranslations[this.snakeToCamelCase(key)] = translations[key];\n }\n return newTranslations;\n }\n /**\n * Overrides keys with value from key with application prefix.\n *\n * @param keys Object of key/value.\n */\n replaceApplicationPrefixedKeys(keys) {\n const application = this.localizationPrefixApplication;\n if (application) {\n for (const key of Object.keys(keys)) {\n const pairs = key.split('__');\n if (pairs.length > 1 && pairs[0] === application) {\n keys[pairs[1]] = keys[key];\n }\n if (pairs.length > 1) {\n delete keys[key];\n }\n }\n }\n }\n /**\n * Parses URL:s.\n *\n * @param urls URL:s.\n * @param storeId Store id.\n * @param langId Langauge id.\n * @returns Parsed URL:s.\n */\n getUrls(urls, storeId, langId) {\n const { country, language } = LocaleUtility.getCountryAndLanguage(this.locale);\n const newUrls = {};\n for (const key of Object.keys(urls)) {\n newUrls[key] = urls[key]\n .replace('{country}', country)\n .replace('{language}', language)\n .replace('{storeId}', storeId)\n .replace('{langId}', langId);\n }\n return newUrls;\n }\n /**\n * Parses endpoints.\n *\n * @param endpoints Endpoints.\n * @returns Parsed endpoints.\n */\n getEndpoints(endpoints) {\n const { country, language } = LocaleUtility.getCountryAndLanguage(this.locale);\n const newEndpoints = {};\n for (const key of Object.keys(endpoints)) {\n newEndpoints[key] = endpoints[key]\n .replace('{country}', country)\n .replace('{language}', language)\n .replace('{retailUnit}', country?.toUpperCase())\n .replace('{locale}', this.locale);\n }\n return newEndpoints;\n }\n /**\n * Formats a lower camel case string into upper snake case (translation key).\n *\n * @param string String to format.\n * @returns Formatted string.\n */\n snakeToCamelCase(string) {\n if (/[^A-Z0-9_]/.test(string)) {\n return string;\n }\n return string\n .toLowerCase()\n .replace(/([_][a-z0-9])/gi, (chars) => chars.toUpperCase().replace('_', ''));\n }\n}\n//# sourceMappingURL=OversattaTransformer.js.map","import { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport { LocaleUtility } from '@inter-ikea-kompis/utilities';\nimport ServiceFetch from '../../utilities/ServiceFetch.js';\nimport OversattaTransformer from './OversattaTransformer.js';\n/**\n * This service is used for fetching localization information from ÖVERSÄTTA.\n */\nexport default class OversattaService {\n /**\n * Constructor.\n *\n * @param options Options.\n * @param options.localizationPrefixApplication Localization prefix application.\n * @param options.localizationEndpoints Localization endpoints.\n * @param [options.localizationOverrides] Localization overrides.\n * @param options.locale Locale.\n */\n constructor(options) {\n this.localizationPrefixApplication = options.localizationPrefixApplication;\n this.localizationEndpoints = options.localizationEndpoints;\n this.localizationOverrides = options.localizationOverrides;\n this.locale = options.locale;\n }\n /**\n * Fetches and returns translations.\n *\n * @returns Promise object.\n */\n async getLocalizedInformation() {\n const responses = await Promise.all(this.localizationEndpoints.map((url) => this.fetch(url)));\n const transformer = new OversattaTransformer({\n localizationPrefixApplication: this.localizationPrefixApplication,\n locale: this.locale\n });\n const transformed = [];\n for (const response of responses) {\n transformed.push(transformer.transform(response));\n }\n if (this.localizationOverrides) {\n transformed.push(transformer.transform(this.localizationOverrides));\n }\n return this.mergeLocalizedInformation(transformed);\n }\n /**\n * Merges multiple localized information.\n *\n * @param localizedInformations Array of localized informations.\n * @returns Merged localized informations.\n */\n mergeLocalizedInformation(localizedInformations) {\n const merged = Object.assign({}, ...localizedInformations);\n for (const key of Object.keys(merged)) {\n merged[key] = Object.assign({}, ...localizedInformations.map((localizedInformation) => localizedInformation[key]));\n }\n return merged;\n }\n /**\n * Fetches and returns translations.\n *\n * @param url URL.\n * @returns Promise object.\n */\n async fetch(url) {\n const { country, language } = LocaleUtility.getCountryAndLanguage(this.locale);\n if (!country || !language) {\n throw new ServiceException('Country or language is not defined. Format locale correctly, e.g. en-GB');\n }\n const parsedUrl = url.replace('{country}', country).replace('{language}', language);\n return await ServiceFetch.json(parsedUrl, {\n credentials: 'same-origin'\n });\n }\n}\n//# sourceMappingURL=OversattaService.js.map","import { GlobalCacheStore } from '@inter-ikea-kompis/utilities';\nimport CacheStoreType from '../../enums/CacheStoreType.js';\nimport OversattaService from '../../services/localization/OversattaService.js';\n/**\n * @deprecated Use TranslationsService for translations (Phrase) and SettingsService for settings (DEXF).\n * This class is used as a simple interface for translation services.\n */\nexport default class LocalizationService {\n /**\n * Constructor.\n *\n * @param options Options.\n */\n constructor(options) {\n this.localizationPrefixApplication = options.localizationPrefixApplication;\n this.localizationEndpoints = options.localizationEndpoints;\n this.localizationOverrides = options.localizationOverrides;\n this.locale = options.locale;\n this.cache = options.cache || new GlobalCacheStore();\n }\n /**\n * Fetches and returns translations.\n *\n * @returns Promise object.\n */\n async getLocalizedInformation() {\n const cacheStore = this.cache.getStore(CacheStoreType.localization);\n const endpointsCacheKey = JSON.stringify(this.localizationEndpoints);\n const overridesCacheKey = this.localizationOverrides\n ? JSON.stringify(this.localizationOverrides)\n : '';\n const localizedCacheKey = this.locale + endpointsCacheKey + overridesCacheKey;\n const queueCacheKey = this.locale + endpointsCacheKey + overridesCacheKey + 'queue';\n const cachedLocalized = cacheStore.get(localizedCacheKey);\n const cachedQueue = cacheStore.get(queueCacheKey);\n const newQueue = [];\n if (cachedLocalized) {\n return cachedLocalized;\n }\n if (cachedQueue) {\n return new Promise((resolve, reject) => cachedQueue.push({ resolve, reject }));\n }\n cacheStore.set(queueCacheKey, newQueue);\n const service = new OversattaService({\n localizationPrefixApplication: this.localizationPrefixApplication,\n localizationEndpoints: this.localizationEndpoints,\n localizationOverrides: this.localizationOverrides,\n locale: this.locale\n });\n let localizedInformation;\n try {\n localizedInformation = await service.getLocalizedInformation();\n }\n catch (error) {\n for (const item of newQueue) {\n item.reject(error);\n }\n throw error;\n }\n cacheStore.set(localizedCacheKey, localizedInformation);\n cacheStore.delete(queueCacheKey);\n for (const item of newQueue) {\n item.resolve(localizedInformation);\n }\n return localizedInformation;\n }\n}\n//# sourceMappingURL=LocalizationService.js.map","import { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport { DexfSettingsUtility } from '@inter-ikea-kompis/utilities';\nimport LocalizationService from '../facades/localization/LocalizationService.js';\n/**\n *\n */\nexport default class DexfConfiguration {\n constructor(options) {\n this.settingsOptions = options;\n }\n /**\n * Returns the dexf API key that has been set.\n * If no key has been set or can't be fetched an exception will be thrown.\n */\n async getDexfApiKeyOrThrow() {\n if (this.dexfApiKey) {\n return this.dexfApiKey;\n }\n if (this.settingsOptions.dexfApiKey) {\n this.dexfApiKey = this.settingsOptions.dexfApiKey;\n }\n else {\n const localizedInformation = await this.getLocalizedInformation();\n this.dexfApiKey = localizedInformation.localization.dexfApiKey;\n }\n if (!this.dexfApiKey) {\n throw new ServiceException('DEXF API Key not set');\n }\n return this.dexfApiKey;\n }\n /**\n * Get the DEXF settings, either through the already provided DEXF settings object, or by fetching Översätta settings and transforming them to DEXF settings.\n *\n * @returns Promise of DEXF settings.\n */\n async getSettings() {\n if (this.settings) {\n return this.settings;\n }\n if (this.settingsOptions.settings) {\n this.settings = this.settingsOptions.settings;\n }\n else {\n const localizedInformation = await this.getLocalizedInformation();\n this.settings = DexfSettingsUtility.parseLocalizedInformation(localizedInformation);\n }\n return this.settings;\n }\n /**\n *\n */\n async getLocalizedInformation() {\n if (!this.localizedInformation) {\n const { locale, localizationPrefixApplication, localizationEndpoints, localizationOverrides, cache } = this.settingsOptions;\n if (!localizationEndpoints || !locale) {\n throw new ServiceException('Options to fetch localized information not set.');\n }\n const localizationService = new LocalizationService({\n localizationPrefixApplication: localizationPrefixApplication,\n localizationEndpoints: localizationEndpoints,\n localizationOverrides: localizationOverrides,\n locale: locale,\n cache: cache\n });\n this.localizedInformation = await localizationService.getLocalizedInformation();\n }\n return this.localizedInformation;\n }\n}\n//# sourceMappingURL=DexfConfiguration.js.map","/**\n * Item handling utility.\n */\nexport default class ItemUtility {\n /**\n * Returns an item string to be used in the request URL.\n *\n * @param items Array of items.\n * @returns Item string.\n */\n static getItemsString(items) {\n return items.map((item) => item.type.toUpperCase() + '-' + item.id).join(',');\n }\n /**\n * Returns item sets based on the maximum allowed items per request.\n *\n * @param items Array of items to parse.\n * @param maxItemsPerRequest Maximum items in the request.\n * @returns Product sets.\n */\n static getItemSets(items, maxItemsPerRequest) {\n const sets = [[]];\n let currentSet = sets[0];\n for (let i = 0, max = items.length; i < max; i++) {\n if (currentSet.length === maxItemsPerRequest) {\n currentSet = [];\n sets.push(currentSet);\n }\n if (items[i].id && items[i].type) {\n currentSet.push(items[i]);\n }\n }\n return sets;\n }\n}\n//# sourceMappingURL=ItemUtility.js.map","import { ServiceException } from '@inter-ikea-kompis/exceptions';\n/**\n * Utilities related to BitBox.\n */\nexport default class BitBoxUtility {\n static async readIframeContext(iframe) {\n return await new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n window.removeEventListener('message', messageListener);\n reject(new ServiceException('No response from Bitbox iframe script'));\n }, 1000);\n const messageListener = (event) => {\n let parsedData;\n try {\n parsedData = JSON.parse(event.data);\n }\n catch (error) {\n return;\n }\n if (parsedData.action === 'set_context') {\n window.removeEventListener('message', messageListener);\n clearTimeout(timeout);\n resolve(parsedData.value);\n }\n };\n window.addEventListener('message', messageListener);\n iframe.contentWindow?.postMessage(JSON.stringify({ action: 'get_context' }), '*');\n });\n }\n}\n//# sourceMappingURL=BitBoxUtility.js.map","import BitBoxUtility from '../../utilities/BitBoxUtility.js';\nimport IframeManager from '../../utilities/IframeManager.js';\n/**\n * This class is used for checking cookie consent in bitbox markets.\n */\nexport default class BitboxCookieConsentService {\n /**\n * Constructor.\n *\n * @param options Options.\n * @param options.endpoint Endpoint.\n * @param options.cache Cache store.\n */\n constructor(options) {\n this.endpoint = options.endpoint;\n this.cache = options.cache;\n }\n /**\n * Checks if cookie consent meets a provided level.\n *\n * @param consentLevel Consent level (1-4).\n * @returns Promise of boolean.\n */\n async hasCookieConsent(consentLevel) {\n const iframe = await this.createIframe();\n const result = await BitBoxUtility.readIframeContext(iframe);\n const cookieConsent = result.CookieConsent;\n switch (consentLevel) {\n // These numbers mirror the levels used by OneWeb.\n case 1:\n return cookieConsent.necessary;\n case 2:\n return cookieConsent.statistics;\n case 3:\n return cookieConsent.preferences;\n case 4:\n return cookieConsent.marketing;\n }\n }\n /**\n * Creates and returns iframe element.\n *\n * @returns Promise with iframe.\n */\n async createIframe() {\n if (this.iframeManager && this.iframeManager.url !== this.endpoint) {\n this.iframeManager.disconnect();\n this.iframeManager = null;\n }\n if (!this.iframeManager) {\n this.iframeManager = new IframeManager(this.endpoint, this.cache);\n }\n return await this.iframeManager.getIframe();\n }\n}\n//# sourceMappingURL=BitboxCookieConsentService.js.map","import { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport CookieUtility from '../../utilities/CookieUtility.js';\nconst COOKIE_NAME = 'ikeacn_cookie_consent';\nconst consentLevelMapping = {\n 1: 'necessary',\n 2: 'performance',\n 3: 'functional',\n 4: 'targeting'\n};\n/**\n * This class is used for checking cookie consent for the CN market.\n */\nexport default class ChinaCookieConsentService {\n /**\n * Checks if cookie consent meets a provided level.\n *\n * @param consentLevel Consent level (1-4).\n * @returns Promise of boolean.\n */\n async hasCookieConsent(consentLevel) {\n const cookie = CookieUtility.getCookie(COOKIE_NAME);\n if (cookie) {\n try {\n const consentCookie = JSON.parse(cookie);\n return !!consentCookie.level?.includes(consentLevelMapping[consentLevel]);\n }\n catch (error) {\n throw new ServiceException(`Failed to parse china cookie consent cookie. ${error}`);\n }\n }\n return false;\n }\n}\n//# sourceMappingURL=ChinaCookieConsentService.js.map","import { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport IframeManager from '../../utilities/IframeManager.js';\nconst COOKIE_NAME = 'ikea_cookieconsent_{countryCode}';\n/**\n * This class is used for checking cookie consent.\n */\nexport default class OneWebCookieConsentService {\n constructor(options) {\n this.iframeManager = null;\n this.endpoint = options.endpoint;\n this.cache = options.cache;\n }\n /**\n * Checks if cookie consent meets a provided level.\n *\n * @param consentLevel Consent level (1-4).\n * @param country Country of the cookie.\n * @returns Promise.\n */\n async hasCookieConsent(consentLevel, country) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (typeof window.ikea?.cookieConsent?.hasConsent === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return window.ikea.cookieConsent.hasConsent(consentLevel);\n }\n const cookie = this.getCookie(country);\n if (cookie) {\n return !!Object.values(cookie)[Object.keys(cookie).indexOf(consentLevel.toString())];\n }\n if (this.iframeManager && this.iframeManager.url !== this.endpoint) {\n this.iframeManager.disconnect();\n this.iframeManager = null;\n }\n if (!this.iframeManager) {\n this.iframeManager = new IframeManager(this.endpoint, this.cache);\n }\n const iframe = await this.iframeManager.getIframe();\n if (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !iframe.contentWindow?.ikea ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !iframe.contentWindow.ikea.cookieConsent ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !iframe.contentWindow.ikea.cookieConsent.hasConsent) {\n throw new ServiceException('Failed to retrieve cookie consent from iframe. \"ikea.cookieConsent.hasConsent()\" is not defined.');\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return iframe.contentWindow.ikea.cookieConsent.hasConsent(consentLevel);\n }\n /**\n * @param country Country.\n */\n getCookie(country) {\n const cookieName = COOKIE_NAME.replace('{countryCode}', country.toLowerCase()) + '=';\n const decodedCookie = decodeURIComponent(document.cookie);\n const existingCookies = decodedCookie.split(';');\n for (let cookie of existingCookies) {\n while (cookie.charAt(0) == ' ') {\n cookie = cookie.substring(1);\n }\n if (cookie.indexOf(cookieName) == 0) {\n return JSON.parse(cookie.substring(cookieName.length, cookie.length));\n }\n }\n return null;\n }\n}\n//# sourceMappingURL=OneWebCookieConsentService.js.map","import { CookieConsentDataSourceEnum } from '@inter-ikea-kompis/enums';\nimport { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport { GlobalCacheStore, LocaleUtility } from '@inter-ikea-kompis/utilities';\nimport BitboxCookieConsentService from '../../services/cookie-consent/BitboxCookieConsentService.js';\nimport ChinaCookieConsentService from '../../services/cookie-consent/ChinaCookieConsentService.js';\nimport OneWebCookieConsentService from '../../services/cookie-consent/OneWebCookieConsentService.js';\nimport DexfConfiguration from '../../utilities/DexfConfiguration.js';\n/**\n * This class is used as a simple interface for cookie consent services.\n */\nexport default class CookieConsentService {\n /**\n * Constructor.\n *\n * @param options Localization service options or a localized information object.\n */\n constructor(options) {\n this.localizedInformation = null;\n if ('localizedServiceOptions' in options) {\n this.localizedInformation = options.localizedServiceOptions ?? null;\n }\n else {\n this.dexfConfiguration = new DexfConfiguration(options);\n }\n if ('cache' in options && options.cache) {\n this.cache = options.cache;\n }\n else {\n this.cache = new GlobalCacheStore();\n }\n this.locale = options.locale;\n }\n /**\n * Checks if cookie consent meets a provided level.\n *\n * @param consentLevel Consent level (1-4).\n * @returns Promise.\n */\n async hasCookieConsent(consentLevel) {\n const localizedInformation = await this.getLocalizedInformation();\n const cookieConsentDataSource = localizedInformation.localization.cookieConsentDataSource;\n switch (cookieConsentDataSource) {\n case CookieConsentDataSourceEnum.disabled:\n return true;\n case CookieConsentDataSourceEnum.block:\n return false;\n case CookieConsentDataSourceEnum.bitbox:\n return await this.hasCookieConsentBitbox(consentLevel, localizedInformation);\n case CookieConsentDataSourceEnum.oneWeb:\n return await this.hasCookieConsentOneWeb(consentLevel, localizedInformation);\n case CookieConsentDataSourceEnum.china:\n return await this.hasCookieConsentChina(consentLevel);\n default:\n return false;\n }\n }\n async hasCookieConsentBitbox(consentLevel, localizedInformation) {\n return await new BitboxCookieConsentService({\n endpoint: localizedInformation.endpoints.bitboxCookieConsentService,\n cache: this.cache\n }).hasCookieConsent(consentLevel);\n }\n async hasCookieConsentChina(consentLevel) {\n return await new ChinaCookieConsentService().hasCookieConsent(consentLevel);\n }\n async hasCookieConsentOneWeb(consentLevel, localizedInformation) {\n const country = LocaleUtility.getCountryAndLanguage(this.locale).country;\n if (!country) {\n throw new ServiceException(`Locale does not contain country. Bad format: ${this.locale}`);\n }\n return await new OneWebCookieConsentService({\n endpoint: localizedInformation.endpoints.oneWebCookieConsentService,\n cache: this.cache\n }).hasCookieConsent(consentLevel, country);\n }\n /**\n *\n * @returns Get either the provided localized information or fetch a new/cached one using localization service options.\n */\n async getLocalizedInformation() {\n if (this.localizedInformation) {\n return this.localizedInformation;\n }\n const settings = await this.dexfConfiguration.getSettings();\n return {\n localization: {\n cookieConsentDataSource: settings.kompis.serviceSettings.cookieConsentDataSource\n },\n endpoints: {\n oneWebCookieConsentService: settings.kompis.endpoints.oneWebCookieConsentService,\n bitboxCookieConsentService: settings.kompis.endpoints.bitboxCookieConsentService\n }\n };\n }\n}\n//# sourceMappingURL=CookieConsentService.js.map","import { LocaleUtility } from '@inter-ikea-kompis/utilities';\n/**\n * This class is used for transforming data from DEXF Settings.\n */\nexport default class DexfSettingsTransformer {\n /**\n * Constructor.\n *\n * @param options Options.\n * @param options.locale Locale.\n */\n constructor(options) {\n this.locale = options.locale;\n }\n /**\n * Transforms data into a DexfSettings model.\n *\n * @param data Response data to parse.\n * @returns IDexfSettings model.\n */\n transform(data) {\n const storeId = data.kompis?.localization?.storeId ? data.kompis.localization.storeId : null;\n const langId = data.kompis?.localization?.langId ? data.kompis.localization.langId : null;\n const dexfSettings = {\n kompis: {\n endpoints: this.getEndpoints(data.kompis?.endpoints || {}),\n urls: this.getUrls(data.kompis?.urls || {}, storeId, langId),\n serviceSettings: (data.kompis?.serviceSettings || {}),\n localization: (data.kompis?.localization || {}),\n priceSettings: (data.kompis?.priceSettings || {})\n },\n localisation: (data.localisation || {})\n };\n // Include all custom settings which the teams could have\n for (const key of Object.keys(data)) {\n if (!dexfSettings[key]) {\n dexfSettings[key] = data[key];\n }\n }\n return dexfSettings;\n }\n /**\n * Parses URL:s.\n *\n * @param urls URL:s.\n * @param storeId Store id.\n * @param langId Language id.\n * @returns Parsed URL:s.\n */\n getUrls(urls, storeId, langId) {\n const { country, language } = LocaleUtility.getCountryAndLanguage(this.locale);\n const newUrls = {};\n for (const key of Object.keys(urls)) {\n newUrls[key] = urls[key]\n .replace('{country}', country)\n .replace('{language}', language)\n .replace('{storeId}', storeId)\n .replace('{langId}', langId);\n }\n return newUrls;\n }\n /**\n * Parses endpoints.\n *\n * @param endpoints Endpoints.\n * @returns Parsed endpoints.\n */\n getEndpoints(endpoints) {\n const { country, language } = LocaleUtility.getCountryAndLanguage(this.locale);\n const newEndpoints = {};\n for (const key of Object.keys(endpoints)) {\n newEndpoints[key] = endpoints[key]\n .replace('{country}', country)\n .replace('{language}', language)\n .replace('{retailUnit}', country?.toUpperCase())\n .replace('{locale}', this.locale);\n }\n return newEndpoints;\n }\n}\n//# sourceMappingURL=DexfSettingsTransformer.js.map","import { DexfSettingsEnvironmentEnum } from '@inter-ikea-kompis/enums';\nimport { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport { LocaleUtility } from '@inter-ikea-kompis/utilities';\nimport ServiceFetch from '../../utilities/ServiceFetch.js';\nimport DexfSettingsTransformer from './DexfSettingsTransformer.js';\nconst DEXF_QA = 'https://api.dexf.qa.ikeadt.com';\nconst DEXF_PROD = 'https://api.dexf.ikea.com';\n/**\n * This service is used for fetching setting configuration from DEXF.\n */\nexport default class DexfSettingsService {\n /**\n * Constructor.\n *\n * @param options Options.\n * @param options.dexfApiKey DEXF API key.\n * @param options.environment ...\n */\n constructor(options) {\n this.dexfApiKey = options.dexfApiKey;\n this.endpoint = `${options.environment === DexfSettingsEnvironmentEnum.development ? DEXF_QA : DEXF_PROD}/setting/v1/data/apps/{appId}/retail-units/{retailUnit}/locales/{language}-{country}`;\n }\n /**\n * Fetches setting configuration assigned to an application in DEXF.\n *\n * @param dexfApplicationId ...\n * @param locale ...\n * @param filterSegment ...\n * @returns Promise.\n */\n async getApplicationSettings(dexfApplicationId, locale, filterSegment) {\n const { country, language } = LocaleUtility.getCountryAndLanguage(locale);\n if (!country || !language) {\n throw new ServiceException('Country or language is not defined. Format locale correctly, e.g. en-GB');\n }\n const url = `${this.endpoint}${filterSegment ? `?filter.segment=${filterSegment}` : ''}`\n .replace('{appId}', dexfApplicationId)\n .replace('{retailUnit}', country.toUpperCase())\n .replace('{language}', language)\n .replace('{country}', country.toUpperCase());\n const response = await ServiceFetch.json(url, {\n credentials: 'same-origin',\n headers: {\n 'dexf-api-key': this.dexfApiKey\n }\n });\n const transformer = new DexfSettingsTransformer({ locale });\n const transformedResponse = transformer.transform(response);\n return transformedResponse;\n }\n}\n//# sourceMappingURL=DexfSettingsService.js.map","import { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport DexfSettingsService from '../../services/localization/DexfSettingsService.js';\n/**\n * This class is used as a simple interface for settings configuration services.\n */\nexport default class SettingsService {\n /**\n * Constructor.\n *\n * @param options Options.\n * @param options.dexfApiKey ...\n * @param options.dexfApplicationId ...\n * @param options.locale ...\n */\n constructor(options) {\n this.dexfApiKey = options.dexfApiKey;\n this.dexfEnvironment = options.dexfEnvironment;\n this.dexfApplicationId = options.dexfApplicationId;\n this.locale = options.locale;\n }\n /**\n * Fetches and returns configuration settings from DEXF.\n *\n * @param filterSegment ...\n * @returns Promise object.\n */\n async getApplicationSettings(filterSegment) {\n if (!this.dexfApiKey) {\n throw new ServiceException('Failed to fetch application settings. The configuration \"dexfApiKey\" has not been defined. Send it in to the constructor of SettingsService.');\n }\n if (!this.dexfApplicationId) {\n throw new ServiceException('Failed to fetch application settings. The configuration \"dexfApplicationId\" has not been defined. Send it in to the constructor of SettingsService.');\n }\n if (!this.locale) {\n throw new ServiceException('Failed to fetch application settings. The configuration \"locale\" has not been defined. Send it in to the constructor of SettingsService.');\n }\n const service = new DexfSettingsService({\n dexfApiKey: this.dexfApiKey,\n environment: this.dexfEnvironment\n });\n const configurationSettings = await service.getApplicationSettings(this.dexfApplicationId, this.locale, filterSegment);\n return configurationSettings;\n }\n}\n//# sourceMappingURL=SettingsService.js.map","/**\n * This class is used for transforming translations data.\n */\nexport default class TranslationsTransformer {\n /**\n * Constructor.\n *\n * @param options Options.\n * @param options.translationPrefixApplication Translation prefix application.\n */\n constructor(options) {\n this.translationPrefixApplication = options?.translationPrefixApplication || null;\n }\n /**\n * Transforms data into a ITranslations model.\n *\n * @param data Response data to parse.\n * @returns Localized information model.\n */\n transform(data) {\n return this.replaceApplicationPrefixInKeys(data);\n }\n /**\n * Recursively replaces application prefix in all keys in the object.\n *\n * @param objectOrString Object or string.\n */\n replaceApplicationPrefixInKeys(objectOrString) {\n if (!objectOrString || typeof objectOrString === 'string') {\n return objectOrString;\n }\n const objectWithUpdatedKeys = {};\n for (const key in objectOrString) {\n const updatedKey = this.replaceApplicationPrefixInKey(key);\n if (updatedKey) {\n objectWithUpdatedKeys[updatedKey] = this.replaceApplicationPrefixInKeys(objectOrString[key]);\n }\n }\n return objectWithUpdatedKeys;\n }\n /**\n * @param key The key to replace application prefix in.\n */\n replaceApplicationPrefixInKey(key) {\n const application = this.translationPrefixApplication;\n if (!application) {\n return key;\n }\n const pairs = key.split('__');\n if (pairs.length > 1 && pairs[0] === application) {\n return pairs[1];\n }\n // We should remove other application prefixed keys that don't match the application.\n if (pairs.length > 1) {\n return null;\n }\n return key;\n }\n}\n//# sourceMappingURL=TranslationsTransformer.js.map","import { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport { LocaleUtility } from '@inter-ikea-kompis/utilities';\nimport ServiceFetch from '../../utilities/ServiceFetch.js';\nimport TranslationsTransformer from './TranslationsTransformer.js';\n/**\n * This service is used for fetching and transforming translations.\n */\nexport default class InternalTranslationsService {\n /**\n * Constructor.\n *\n * @param options Options.\n * @param options.translationPrefixApplication Translation prefix application.\n * @param options.translationEndpoints Translation endpoints.\n * @param options.locale Locale.\n */\n constructor(options) {\n this.translationPrefixApplication = options.translationPrefixApplication;\n this.translationEndpoints = options.translationEndpoints;\n this.locale = options.locale;\n }\n /**\n * Fetches and returns translations.\n *\n * @returns Promise object.\n */\n async getTranslations() {\n const responses = await Promise.all(this.translationEndpoints.map((url) => this.fetch(url)));\n const transformer = new TranslationsTransformer({\n translationPrefixApplication: this.translationPrefixApplication\n });\n const transformed = responses.map((response) => transformer.transform(response));\n return this.mergeTranslations(transformed);\n }\n /**\n * Merges multiple translations.\n *\n * @param translations Array of translations.\n * @returns Merged translations.\n */\n mergeTranslations(translations) {\n const merged = Object.assign({}, ...translations);\n for (const key of Object.keys(merged)) {\n merged[key] = Object.assign({}, ...translations.map((translations) => translations[key]));\n }\n return merged;\n }\n /**\n * Fetches and returns translations.\n *\n * @param url URL.\n * @returns Promise object.\n */\n async fetch(url) {\n const { country, language } = LocaleUtility.getCountryAndLanguage(this.locale);\n if (!country || !language) {\n throw new ServiceException('Country or language is not defined. Format locale correctly, e.g. en-GB');\n }\n const parsedUrl = url\n .replace('{country}', country.toUpperCase())\n .replace('{language}', language);\n return await ServiceFetch.json(parsedUrl, {\n credentials: 'same-origin'\n });\n }\n}\n//# sourceMappingURL=InternalTranslationsService.js.map","import { GlobalCacheStore } from '@inter-ikea-kompis/utilities';\nimport CacheStoreType from '../../enums/CacheStoreType.js';\nimport InternalTranslationsService from '../../services/localization/InternalTranslationsService.js';\n/**\n * This class is used as a simple interface for translation services.\n */\nexport default class TranslationsService {\n /**\n * Constructor.\n *\n * @param options Options.\n */\n constructor(options) {\n this.translationPrefixApplication = options.translationPrefixApplication;\n this.translationEndpoints = options.translationEndpoints;\n this.locale = options.locale;\n this.cache = options.cache || new GlobalCacheStore();\n }\n /**\n * Fetches and returns translations.\n *\n * @returns Promise object.\n */\n async getTranslations() {\n const cacheStore = this.cache.getStore(CacheStoreType.translations);\n const endpointsCacheKey = JSON.stringify(this.translationEndpoints);\n const translationsCacheKey = this.locale + endpointsCacheKey;\n const queueCacheKey = this.locale + endpointsCacheKey + 'queue';\n const cachedTranslations = cacheStore.get(translationsCacheKey);\n if (cachedTranslations) {\n return cachedTranslations;\n }\n const cachedQueue = cacheStore.get(queueCacheKey);\n if (cachedQueue) {\n return new Promise((resolve, reject) => cachedQueue.push({ resolve, reject }));\n }\n const newQueue = [];\n cacheStore.set(queueCacheKey, newQueue);\n const service = new InternalTranslationsService({\n translationPrefixApplication: this.translationPrefixApplication,\n translationEndpoints: this.translationEndpoints,\n locale: this.locale\n });\n let translations;\n try {\n translations = await service.getTranslations();\n }\n catch (error) {\n for (const item of newQueue) {\n item.reject(error);\n }\n throw error;\n }\n cacheStore.set(translationsCacheKey, translations);\n cacheStore.delete(queueCacheKey);\n for (const item of newQueue) {\n item.resolve(translations);\n }\n return translations;\n }\n}\n//# sourceMappingURL=TranslationsService.js.map","import { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport { GlobalCacheStore } from '@inter-ikea-kompis/utilities';\nimport CacheStoreType from '../../enums/CacheStoreType.js';\n/**\n * This class is used for storing and loading products from cache.\n */\nexport default class ProductCache {\n /**\n * Constructor.\n *\n * @param [locale] Locale.\n * @param [cache] Cache store.\n */\n constructor(locale, cache = null) {\n this.products = new Map();\n if (cache && !cache.getStore) {\n throw new ServiceException('Failed to instanciate facade. Expected second parameter to be of type CacheStore.');\n }\n this.locale = locale;\n this.cache = cache || new GlobalCacheStore();\n }\n /**\n * Returns multiple cached products.\n *\n * @param items Array of items.\n * @param fields Fields.\n * @returns Products and missing items.\n */\n getProducts(items, fields) {\n const searchableProductMap = this.getSearchableProductMap(fields);\n const products = [];\n const missing = [];\n for (const item of items) {\n const product = searchableProductMap[this.getProductCacheKey(item)];\n if (product) {\n products.push(product);\n }\n else {\n missing.push(item);\n }\n }\n return { products, missing };\n }\n /**\n * Adds multiple products.\n *\n * @param products Products.\n * @param fields Fields.\n */\n addProducts(products, fields) {\n for (const product of products) {\n this.addProduct(product, fields);\n }\n }\n /**\n * Removes products that has been added to this instance from cache.\n \n */\n removeProducts(products) {\n for (const product of products) {\n this.removeProduct(product);\n }\n }\n /**\n * Clears all products that has been added to this instance from cache.\n */\n clear() {\n for (const product of Array.from(this.products.values())) {\n this.removeProduct(product);\n }\n }\n /**\n * Returns map that can be used for when searching for a product item.\n *\n * @param fields Fields.\n * @returns Product items.\n */\n getSearchableProductMap(fields) {\n const store = this.cache.getStore(CacheStoreType.product);\n let merged = {};\n for (const key of Array.from(store.keys())) {\n if (key.startsWith('items-' + this.locale)) {\n const cachedFields = key.replace('items-' + this.locale + '-', '').split('_');\n let hasMatch = true;\n for (let i = 0, max = fields.length; i < max; i++) {\n if (!cachedFields.includes(fields[i])) {\n hasMatch = false;\n break;\n }\n }\n if (hasMatch) {\n merged = Object.assign(merged, store.get(key));\n }\n }\n }\n return merged;\n }\n /**\n * Returns map that can be used for storing products.\n *\n * @param fields Fields.\n * @returns Product items.\n */\n getStorableProductMap(fields) {\n const store = this.cache.getStore(CacheStoreType.product);\n const cacheKey = this.getFieldsCacheKey(fields);\n const productMap = store.get(cacheKey);\n if (productMap) {\n return productMap;\n }\n const newProductMap = {};\n store.set(cacheKey, newProductMap);\n return newProductMap;\n }\n /**\n * Returns fields cache key.\n *\n * @param fields Fields.\n * @returns Cache key.\n */\n getFieldsCacheKey(fields) {\n return 'items-' + this.locale + '-' + fields.sort().join('_');\n }\n /**\n * Returns cache key for an item.\n *\n * @param item Product item.\n * @returns Cache key.\n */\n getProductCacheKey(item) {\n return item.type.toLowerCase() + item.id;\n }\n /**\n * Removes a product that has been added to this instance from cache.\n */\n removeProduct(product) {\n const store = this.cache.getStore(CacheStoreType.product);\n const [type, id] = product.itemId.split('-');\n const cacheKey = this.getProductCacheKey({ id, type });\n if (this.products.get(cacheKey)) {\n this.products.delete(cacheKey);\n }\n for (const items of Array.from(store.values())) {\n if (items[cacheKey]) {\n delete items[cacheKey];\n }\n }\n }\n /**\n * Adds a product to cache.\n *\n * @param product Product.\n * @param fields Fields.\n */\n addProduct(product, fields) {\n const productMap = this.getStorableProductMap(fields);\n const [type, id] = product.itemId.split('-');\n const cacheKey = this.getProductCacheKey({ id, type });\n this.products.set(cacheKey, product);\n productMap[cacheKey] = product;\n }\n}\n//# sourceMappingURL=ProductCache.js.map","import { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport ItemUtility from '../../utilities/ItemUtility.js';\nimport ServiceFetch from '../../utilities/ServiceFetch.js';\n/**\n * This class is used for fetching product data.\n */\nexport default class DexfWebplannerService {\n /**\n * Constructor.\n *\n * @param options Options.\n * @param options.endpoint Endpoint.\n * @param options.dexfApiKey DEXF API key.\n */\n constructor(options) {\n this.maxItemsPerRequest = 50;\n this.endpoint = options.endpoint;\n this.dexfApiKey = options.dexfApiKey;\n }\n /**\n * Fetches items from DEXF.\n *\n * @param items Array of items.\n * @param fields Fields.\n * @param params Optional params.\n * @returns Promise.\n */\n async getProducts(items, fields, params = {}) {\n if (!fields) {\n throw new ServiceException('You have to specify fields to fetch product information.');\n }\n const sortedFields = fields.slice();\n const sets = ItemUtility.getItemSets(items, this.maxItemsPerRequest);\n const options = {\n credentials: 'same-origin',\n headers: {\n 'dexf-api-key': this.dexfApiKey\n }\n };\n sortedFields.sort();\n const promises = sets.map((set) => {\n const itemId = ItemUtility.getItemsString(set);\n const url = `${this.endpoint}?filter.itemId=${itemId}&fields=${sortedFields.join(',')}${this.getOptionalQueryString(params)}`;\n return ServiceFetch.json(url, options);\n });\n const parts = await Promise.all(promises);\n const products = [];\n for (const part of parts) {\n for (const item of part.data) {\n products.push(this.parseProduct(item));\n }\n }\n return products;\n }\n /**\n * Fetches all items assigned to an application from DEXF.\n *\n * @param dexfApplicationId DEXF application ID.\n * @param fields Fields.\n * @param params Optional params.\n * @returns Promise.\n */\n async getApplicationProducts(dexfApplicationId, fields, params = {}) {\n if (!fields) {\n throw new ServiceException('You have to specify fields to fetch product information.');\n }\n const sortedFields = fields.slice();\n sortedFields.sort();\n const url = `${this.endpoint}?filter.appId=${dexfApplicationId}&fields=${sortedFields.join(',')}${this.getOptionalQueryString(params)}`;\n const response = await ServiceFetch.json(url, {\n credentials: 'same-origin',\n headers: {\n 'dexf-api-key': this.dexfApiKey\n }\n });\n const products = [];\n for (const item of response.data) {\n products.push(this.parseProduct(item));\n }\n return products;\n }\n /**\n * Get optional query string.\n *\n * @param params Optional params.\n * @returns Query string.\n */\n getOptionalQueryString(params) {\n let qs = '';\n if (params.tags && params.tags.length > 0) {\n qs += `&filter.tags=${params.tags.join(',')}`;\n }\n if (params.valid !== undefined) {\n qs += `&filter.valid=${params.valid}`;\n }\n if (params.customParams) {\n for (const param in params.customParams) {\n qs += `&${param}=${params.customParams[param]}`;\n }\n }\n return qs;\n }\n /**\n * Parses product data.\n *\n * @param data Data.\n * @returns Item string.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parseProduct(data) {\n return {\n reason: data.reason || [],\n valid: data.valid || false,\n itemId: data.itemId || null,\n content: data.content ? this.parseProductContent(data.content) : null\n };\n }\n /**\n * Parses product content data.\n *\n * @param data Data.\n * @returns Item string.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parseProductContent(data) {\n return {\n itemType: data.itemType || null,\n itemNoGlobal: data.itemNoGlobal || null,\n itemNoLocal: data.itemNoLocal || null,\n ruItemType: data.ruItemType || null,\n ruItemNo: data.ruItemNo || null,\n breathTakingItem: data.breathTakingItem || false,\n name: data.name || null,\n mainTypeCode: data.mainTypeCode || null,\n mainTypeName: data.mainTypeName || null,\n typeCode: data.typeCode || null,\n typeName: data.typeName || null,\n validDesignText: data.validDesignText || null,\n colourDotCode: data.colourDotCode || null,\n colourDotUrl: data.colourDotUrl || null,\n requiresAssembly: data.requiresAssembly || null,\n appConfig: data.appConfig || null,\n measure: data.measure || null,\n packageMeasure: data.packageMeasure || null,\n priceInformation: data.priceInformation || null,\n image: data.image || null,\n video: data.video || null,\n goodToKnow: data.goodToKnow || null,\n customerBenefit: data.customerBenefit || null,\n customerBenefitSummary: data.customerBenefitSummary || null,\n complianceTechnical: data.complianceTechnical || null,\n complianceLabel: data.complianceLabel || null,\n complianceInformation: data.complianceInformation || null,\n technicalInformation: data.technicalInformation || null,\n peopleAndPlanet: data.peopleAndPlanet || null,\n careInstruction: data.careInstruction || null,\n customerMaterial: data.customerMaterial || null,\n filterAttribute: data.filterAttribute || null,\n validDesignPart: data.validDesignPart || null,\n priceUnit: data.priceUnit || null,\n child: data.child || null,\n fullyLocalized: data.fullyLocalized || null,\n presentationGroupCode: data.presentationGroupCode || null,\n assemblyTime: data.assemblyTime || null,\n genericProduct: data.genericProduct || null,\n measureReference: data.measureReference || null,\n reason: data.reason || null,\n document: data.document || null,\n complementaryItem: data.complementaryItem || null,\n asset: data.asset || null,\n saleEndDateTime: data.saleEndDateTime || null,\n saleEndDateText: data.saleEndDateText || null\n };\n }\n}\n//# sourceMappingURL=DexfWebplannerService.js.map","/**\n * This class is used for storing items in a queue.\n */\nexport default class ProductItemQueue {\n constructor() {\n this.items = {};\n this.timeout = null;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n this.callbacks = [];\n }\n /**\n * Releases waiting in queue.\n *\n * @param callbacks Callbacks.\n */\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n releaseWaiting(callbacks) {\n for (const callback of callbacks) {\n callback({ items: [], callbacks: [] });\n }\n }\n /**\n * Retrieves items in queue.\n *\n * @param items Array of items.\n * @returns Promise.\n */\n async retrieveItems(items\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n ) {\n this.addItems(items);\n return new Promise((resolve) => {\n if (this.timeout !== null) {\n this.callbacks.push(resolve);\n }\n else {\n this.timeout = window.setTimeout(() => {\n const items = Object.values(this.items);\n const callbacks = this.callbacks;\n this.callbacks = [];\n this.timeout = null;\n this.items = {};\n resolve({ items, callbacks });\n });\n }\n });\n }\n /**\n * Adds items to queue.\n *\n * @param items Array of items.\n */\n addItems(items) {\n for (const item of items) {\n this.items[item.type.toLowerCase() + item.id] = item;\n }\n }\n}\n//# sourceMappingURL=ProductItemQueue.js.map","import { ServiceException } from '@inter-ikea-kompis/exceptions';\nimport { GlobalCacheStore } from '@inter-ikea-kompis/utilities';\nimport CacheStoreType from '../../enums/CacheStoreType.js';\nimport DexfWebplannerService from '../../services/product/DexfWebplannerService.js';\nimport DexfConfiguration from '../../utilities/DexfConfiguration.js';\nimport ProductCache from './ProductCache.js';\nimport ProductItemQueue from './ProductItemQueue.js';\n/**\n * This class is used as a simple interface for product services.\n */\nexport default class ProductService {\n /**\n * Constructor.\n *\n * @param options Options.\n */\n constructor(options) {\n this.locale = options.locale;\n this.dexfApplicationId = options.dexfApplicationId || null;\n this.cache = options.cache || new GlobalCacheStore();\n this.cacheStore = this.cache.getStore(CacheStoreType.product);\n this.productCache = new ProductCache(options.locale, this.cache);\n this.dexfConfiguration = new DexfConfiguration(options);\n }\n /**\n * Fetches and returns products.\n *\n * @param items Array of items.\n * @param fields Fields.\n * @param params Optional params.\n * @returns Promise.\n */\n async getProducts(items, fields, params) {\n const cached = this.productCache.getProducts(items, fields);\n if (cached.missing.length === 0) {\n return cached.products;\n }\n const productItemQueueKey = 'queue-' + this.locale + '-' + fields.sort().join('_');\n let productItemQueue = this.cacheStore.get(productItemQueueKey);\n if (!productItemQueue) {\n productItemQueue = new ProductItemQueue();\n this.cacheStore.set(productItemQueueKey, productItemQueue);\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n const callbacks = [];\n let itemsAndCallbacks = { items, callbacks };\n itemsAndCallbacks = await productItemQueue.retrieveItems(cached.missing);\n if (itemsAndCallbacks.items.length > 0) {\n const service = await this.getService();\n const products = await service.getProducts(itemsAndCallbacks.items, fields, params);\n this.productCache.addProducts(products, fields);\n productItemQueue.releaseWaiting(itemsAndCallbacks.callbacks);\n }\n return this.productCache.getProducts(items, fields).products;\n }\n /**\n * Returns an Array of fetched ShoppingProduct objects.\n *\n * @param shoppingItems Array of ShoppingItem.\n * @param fields Fields.\n * @returns Array of ShoppingProduct objects.\n */\n async getShoppingProducts(shoppingItems, fields) {\n const products = await this.getProducts(shoppingItems, fields);\n const shoppingItemsMap = {};\n for (const shoppingItem of shoppingItems) {\n const type = shoppingItem.type.toLowerCase();\n shoppingItemsMap[type + '-' + shoppingItem.id] = shoppingItem;\n }\n return products.map((product) => {\n if (!product.content) {\n return {\n product,\n quantity: shoppingItemsMap[product.itemId.toLowerCase()].quantity\n };\n }\n const itemType = product.content.itemType?.toLowerCase();\n const item = shoppingItemsMap[itemType + '-' + product.content.itemNoLocal] ||\n shoppingItemsMap[itemType + '-' + product.content.itemNoGlobal];\n return {\n product,\n quantity: item.quantity\n };\n });\n }\n /**\n * Fetches and returns all products for a planner.\n *\n * @param fields Fields.\n * @param params Optional params.\n * @returns Promise.\n */\n async getApplicationProducts(fields, params) {\n if (!this.dexfApplicationId) {\n throw new ServiceException('Failed to fetch application products. The configuration \"dexfApplicationId\" has not been defined. Send it in to the constructor of ProductService.');\n }\n const service = await this.getService();\n const products = await service.getApplicationProducts(this.dexfApplicationId, fields, params);\n this.productCache.addProducts(products, fields);\n return products;\n }\n /**\n * Returns service.\n *\n * @returns Service.\n */\n async getService() {\n const { kompis } = await this.dexfConfiguration.getSettings();\n const dexfApiKey = await this.dexfConfiguration.getDexfApiKeyOrThrow();\n return new DexfWebplannerService({\n endpoint: kompis.endpoints.dexfWebplannerService,\n dexfApiKey\n });\n }\n}\n//# sourceMappingURL=ProductService.js.map","/**\n * Scalar computation library\n */\nexport class Scalar {\n /**\n * Boolean : true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)\n * @param a number\n * @param b number\n * @param epsilon (default = 1.401298E-45)\n * @returns true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)\n */\n static WithinEpsilon(a, b, epsilon = 1.401298e-45) {\n return Math.abs(a - b) <= epsilon;\n }\n /**\n * Returns a string : the upper case translation of the number i to hexadecimal.\n * @param i number\n * @returns the upper case translation of the number i to hexadecimal.\n */\n static ToHex(i) {\n const str = i.toString(16);\n if (i <= 15) {\n return (\"0\" + str).toUpperCase();\n }\n return str.toUpperCase();\n }\n /**\n * Returns -1 if value is negative and +1 is value is positive.\n * @param value the value\n * @returns the value itself if it's equal to zero.\n */\n static Sign(value) {\n value = +value; // convert to a number\n if (value === 0 || isNaN(value)) {\n return value;\n }\n return value > 0 ? 1 : -1;\n }\n /**\n * Returns the value itself if it's between min and max.\n * Returns min if the value is lower than min.\n * Returns max if the value is greater than max.\n * @param value the value to clmap\n * @param min the min value to clamp to (default: 0)\n * @param max the max value to clamp to (default: 1)\n * @returns the clamped value\n */\n static Clamp(value, min = 0, max = 1) {\n return Math.min(max, Math.max(min, value));\n }\n /**\n * the log2 of value.\n * @param value the value to compute log2 of\n * @returns the log2 of value.\n */\n static Log2(value) {\n return Math.log(value) * Math.LOG2E;\n }\n /**\n * the floor part of a log2 value.\n * @param value the value to compute log2 of\n * @returns the log2 of value.\n */\n static ILog2(value) {\n if (Math.log2) {\n return Math.floor(Math.log2(value));\n }\n if (value < 0) {\n return NaN;\n }\n else if (value === 0) {\n return -Infinity;\n }\n let n = 0;\n if (value < 1) {\n while (value < 1) {\n n++;\n value = value * 2;\n }\n n = -n;\n }\n else if (value > 1) {\n while (value > 1) {\n n++;\n value = Math.floor(value / 2);\n }\n }\n return n;\n }\n /**\n * Loops the value, so that it is never larger than length and never smaller than 0.\n *\n * This is similar to the modulo operator but it works with floating point numbers.\n * For example, using 3.0 for t and 2.5 for length, the result would be 0.5.\n * With t = 5 and length = 2.5, the result would be 0.0.\n * Note, however, that the behaviour is not defined for negative numbers as it is for the modulo operator\n * @param value the value\n * @param length the length\n * @returns the looped value\n */\n static Repeat(value, length) {\n return value - Math.floor(value / length) * length;\n }\n /**\n * Normalize the value between 0.0 and 1.0 using min and max values\n * @param value value to normalize\n * @param min max to normalize between\n * @param max min to normalize between\n * @returns the normalized value\n */\n static Normalize(value, min, max) {\n return (value - min) / (max - min);\n }\n /**\n * Denormalize the value from 0.0 and 1.0 using min and max values\n * @param normalized value to denormalize\n * @param min max to denormalize between\n * @param max min to denormalize between\n * @returns the denormalized value\n */\n static Denormalize(normalized, min, max) {\n return normalized * (max - min) + min;\n }\n /**\n * Calculates the shortest difference between two given angles given in degrees.\n * @param current current angle in degrees\n * @param target target angle in degrees\n * @returns the delta\n */\n static DeltaAngle(current, target) {\n let num = Scalar.Repeat(target - current, 360.0);\n if (num > 180.0) {\n num -= 360.0;\n }\n return num;\n }\n /**\n * PingPongs the value t, so that it is never larger than length and never smaller than 0.\n * @param tx value\n * @param length length\n * @returns The returned value will move back and forth between 0 and length\n */\n static PingPong(tx, length) {\n const t = Scalar.Repeat(tx, length * 2.0);\n return length - Math.abs(t - length);\n }\n /**\n * Interpolates between min and max with smoothing at the limits.\n *\n * This function interpolates between min and max in a similar way to Lerp. However, the interpolation will gradually speed up\n * from the start and slow down toward the end. This is useful for creating natural-looking animation, fading and other transitions.\n * @param from from\n * @param to to\n * @param tx value\n * @returns the smooth stepped value\n */\n static SmoothStep(from, to, tx) {\n let t = Scalar.Clamp(tx);\n t = -2.0 * t * t * t + 3.0 * t * t;\n return to * t + from * (1.0 - t);\n }\n /**\n * Moves a value current towards target.\n *\n * This is essentially the same as Mathf.Lerp but instead the function will ensure that the speed never exceeds maxDelta.\n * Negative values of maxDelta pushes the value away from target.\n * @param current current value\n * @param target target value\n * @param maxDelta max distance to move\n * @returns resulting value\n */\n static MoveTowards(current, target, maxDelta) {\n let result = 0;\n if (Math.abs(target - current) <= maxDelta) {\n result = target;\n }\n else {\n result = current + Scalar.Sign(target - current) * maxDelta;\n }\n return result;\n }\n /**\n * Same as MoveTowards but makes sure the values interpolate correctly when they wrap around 360 degrees.\n *\n * Variables current and target are assumed to be in degrees. For optimization reasons, negative values of maxDelta\n * are not supported and may cause oscillation. To push current away from a target angle, add 180 to that angle instead.\n * @param current current value\n * @param target target value\n * @param maxDelta max distance to move\n * @returns resulting angle\n */\n static MoveTowardsAngle(current, target, maxDelta) {\n const num = Scalar.DeltaAngle(current, target);\n let result = 0;\n if (-maxDelta < num && num < maxDelta) {\n result = target;\n }\n else {\n target = current + num;\n result = Scalar.MoveTowards(current, target, maxDelta);\n }\n return result;\n }\n /**\n * Creates a new scalar with values linearly interpolated of \"amount\" between the start scalar and the end scalar.\n * @param start start value\n * @param end target value\n * @param amount amount to lerp between\n * @returns the lerped value\n */\n static Lerp(start, end, amount) {\n return start + (end - start) * amount;\n }\n /**\n * Same as Lerp but makes sure the values interpolate correctly when they wrap around 360 degrees.\n * The parameter t is clamped to the range [0, 1]. Variables a and b are assumed to be in degrees.\n * @param start start value\n * @param end target value\n * @param amount amount to lerp between\n * @returns the lerped value\n */\n static LerpAngle(start, end, amount) {\n let num = Scalar.Repeat(end - start, 360.0);\n if (num > 180.0) {\n num -= 360.0;\n }\n return start + num * Scalar.Clamp(amount);\n }\n /**\n * Calculates the linear parameter t that produces the interpolant value within the range [a, b].\n * @param a start value\n * @param b target value\n * @param value value between a and b\n * @returns the inverseLerp value\n */\n static InverseLerp(a, b, value) {\n let result = 0;\n if (a != b) {\n result = Scalar.Clamp((value - a) / (b - a));\n }\n else {\n result = 0.0;\n }\n return result;\n }\n /**\n * Returns a new scalar located for \"amount\" (float) on the Hermite spline defined by the scalars \"value1\", \"value3\", \"tangent1\", \"tangent2\".\n * @see http://mathworld.wolfram.com/HermitePolynomial.html\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param amount defines the amount on the interpolation spline (between 0 and 1)\n * @returns hermite result\n */\n static Hermite(value1, tangent1, value2, tangent2, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\n const part2 = -2.0 * cubed + 3.0 * squared;\n const part3 = cubed - 2.0 * squared + amount;\n const part4 = cubed - squared;\n return value1 * part1 + value2 * part2 + tangent1 * part3 + tangent2 * part4;\n }\n /**\n * Returns a new scalar which is the 1st derivative of the Hermite spline defined by the scalars \"value1\", \"value2\", \"tangent1\", \"tangent2\".\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param time define where the derivative must be done\n * @returns 1st derivative\n */\n static Hermite1stDerivative(value1, tangent1, value2, tangent2, time) {\n const t2 = time * time;\n return (t2 - time) * 6 * value1 + (3 * t2 - 4 * time + 1) * tangent1 + (-t2 + time) * 6 * value2 + (3 * t2 - 2 * time) * tangent2;\n }\n /**\n * Returns a random float number between and min and max values\n * @param min min value of random\n * @param max max value of random\n * @returns random value\n */\n static RandomRange(min, max) {\n if (min === max) {\n return min;\n }\n return Math.random() * (max - min) + min;\n }\n /**\n * This function returns percentage of a number in a given range.\n *\n * RangeToPercent(40,20,60) will return 0.5 (50%)\n * RangeToPercent(34,0,100) will return 0.34 (34%)\n * @param number to convert to percentage\n * @param min min range\n * @param max max range\n * @returns the percentage\n */\n static RangeToPercent(number, min, max) {\n return (number - min) / (max - min);\n }\n /**\n * This function returns number that corresponds to the percentage in a given range.\n *\n * PercentToRange(0.34,0,100) will return 34.\n * @param percent to convert to number\n * @param min min range\n * @param max max range\n * @returns the number\n */\n static PercentToRange(percent, min, max) {\n return (max - min) * percent + min;\n }\n /**\n * Returns the angle converted to equivalent value between -Math.PI and Math.PI radians.\n * @param angle The angle to normalize in radian.\n * @returns The converted angle.\n */\n static NormalizeRadians(angle) {\n // More precise but slower version kept for reference.\n // angle = angle % Tools.TwoPi;\n // angle = (angle + Tools.TwoPi) % Tools.TwoPi;\n //if (angle > Math.PI) {\n //\tangle -= Tools.TwoPi;\n //}\n angle -= Scalar.TwoPi * Math.floor((angle + Math.PI) / Scalar.TwoPi);\n return angle;\n }\n /**\n * Returns the highest common factor of two integers.\n * @param a first parameter\n * @param b second parameter\n * @returns HCF of a and b\n */\n static HCF(a, b) {\n const r = a % b;\n if (r === 0) {\n return b;\n }\n return Scalar.HCF(b, r);\n }\n}\n/**\n * Two pi constants convenient for computation.\n */\nScalar.TwoPi = Math.PI * 2;\n//# sourceMappingURL=math.scalar.js.map","/**\n * Constant used to convert a value to gamma space\n * @ignorenaming\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ToGammaSpace = 1 / 2.2;\n/**\n * Constant used to convert a value to linear space\n * @ignorenaming\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ToLinearSpace = 2.2;\n/**\n * Constant Golden Ratio value in Babylon.js\n * @ignorenaming\n */\nexport const PHI = (1 + Math.sqrt(5)) / 2;\n/**\n * Constant used to define the minimal number value in Babylon.js\n * @ignorenaming\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst Epsilon = 0.001;\nexport { Epsilon };\n//# sourceMappingURL=math.constants.js.map","/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * Class containing a set of static utilities functions for arrays.\n */\nexport class ArrayTools {\n /**\n * Returns an array of the given size filled with elements built from the given constructor and the parameters.\n * @param size the number of element to construct and put in the array.\n * @param itemBuilder a callback responsible for creating new instance of item. Called once per array entry.\n * @returns a new array filled with new objects.\n */\n static BuildArray(size, itemBuilder) {\n const a = [];\n for (let i = 0; i < size; ++i) {\n a.push(itemBuilder());\n }\n return a;\n }\n /**\n * Returns a tuple of the given size filled with elements built from the given constructor and the parameters.\n * @param size he number of element to construct and put in the tuple.\n * @param itemBuilder a callback responsible for creating new instance of item. Called once per tuple entry.\n * @returns a new tuple filled with new objects.\n */\n static BuildTuple(size, itemBuilder) {\n return ArrayTools.BuildArray(size, itemBuilder);\n }\n}\n/**\n * Observes a function and calls the given callback when it is called.\n * @param object Defines the object the function to observe belongs to.\n * @param functionName Defines the name of the function to observe.\n * @param callback Defines the callback to call when the function is called.\n * @returns A function to call to stop observing\n */\nfunction _observeArrayfunction(object, functionName, callback) {\n // Finds the function to observe\n const oldFunction = object[functionName];\n if (typeof oldFunction !== \"function\") {\n return null;\n }\n // Creates a new function that calls the callback and the old function\n const newFunction = function () {\n const previousLength = object.length;\n const returnValue = newFunction.previous.apply(object, arguments);\n callback(functionName, previousLength);\n return returnValue;\n };\n // Doublishly links the new function and the old function\n oldFunction.next = newFunction;\n newFunction.previous = oldFunction;\n // Replaces the old function with the new function\n object[functionName] = newFunction;\n // Returns a function to disable the hook\n return () => {\n // Only unhook if the function is still hooked\n const previous = newFunction.previous;\n if (!previous) {\n return;\n }\n // Finds the ref to the next function in the chain\n const next = newFunction.next;\n // If in the middle of the chain, link the previous and next functions\n if (next) {\n previous.next = next;\n next.previous = previous;\n }\n // If at the end of the chain, remove the reference to the previous function\n // and restore the previous function\n else {\n previous.next = undefined;\n object[functionName] = previous;\n }\n // Lose reference to the previous and next functions\n newFunction.next = undefined;\n newFunction.previous = undefined;\n };\n}\n/**\n * Defines the list of functions to proxy when observing an array.\n * The scope is currently reduced to the common functions used in the render target render list and the scene cameras.\n */\nconst observedArrayFunctions = [\"push\", \"splice\", \"pop\", \"shift\", \"unshift\"];\n/**\n * Observes an array and notifies the given observer when the array is modified.\n * @param array Defines the array to observe\n * @param callback Defines the function to call when the array is modified (in the limit of the observed array functions)\n * @returns A function to call to stop observing the array\n * @internal\n */\nexport function _ObserveArray(array, callback) {\n // Observes all the required array functions and stores the unhook functions\n const unObserveFunctions = observedArrayFunctions.map((name) => {\n return _observeArrayfunction(array, name, callback);\n });\n // Returns a function that unhook all the observed functions\n return () => {\n unObserveFunctions.forEach((unObserveFunction) => {\n unObserveFunction === null || unObserveFunction === void 0 ? void 0 : unObserveFunction();\n });\n };\n}\n//# sourceMappingURL=arrayTools.js.map","/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst _RegisteredTypes = {};\n/**\n * @internal\n */\nexport function RegisterClass(className, type) {\n _RegisteredTypes[className] = type;\n}\n/**\n * @internal\n */\nexport function GetClass(fqdn) {\n return _RegisteredTypes[fqdn];\n}\n//# sourceMappingURL=typeStore.js.map","/** @internal */\nexport class PerformanceConfigurator {\n /**\n * @internal\n */\n static SetMatrixPrecision(use64bits) {\n PerformanceConfigurator.MatrixTrackPrecisionChange = false;\n if (use64bits && !PerformanceConfigurator.MatrixUse64Bits) {\n if (PerformanceConfigurator.MatrixTrackedMatrices) {\n for (let m = 0; m < PerformanceConfigurator.MatrixTrackedMatrices.length; ++m) {\n const matrix = PerformanceConfigurator.MatrixTrackedMatrices[m];\n const values = matrix._m;\n matrix._m = new Array(16);\n for (let i = 0; i < 16; ++i) {\n matrix._m[i] = values[i];\n }\n }\n }\n }\n PerformanceConfigurator.MatrixUse64Bits = use64bits;\n PerformanceConfigurator.MatrixCurrentType = PerformanceConfigurator.MatrixUse64Bits ? Array : Float32Array;\n PerformanceConfigurator.MatrixTrackedMatrices = null; // reclaim some memory, as we don't need _TrackedMatrices anymore\n }\n}\n/** @internal */\nPerformanceConfigurator.MatrixUse64Bits = false;\n/** @internal */\nPerformanceConfigurator.MatrixTrackPrecisionChange = true;\n/** @internal */\nPerformanceConfigurator.MatrixCurrentType = Float32Array;\n/** @internal */\nPerformanceConfigurator.MatrixTrackedMatrices = [];\n//# sourceMappingURL=performanceConfigurator.js.map","/**\n * A class serves as a medium between the observable and its observers\n */\nexport class EventState {\n /**\n * Create a new EventState\n * @param mask defines the mask associated with this state\n * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true\n * @param target defines the original target of the state\n * @param currentTarget defines the current target of the state\n */\n constructor(mask, skipNextObservers = false, target, currentTarget) {\n this.initialize(mask, skipNextObservers, target, currentTarget);\n }\n /**\n * Initialize the current event state\n * @param mask defines the mask associated with this state\n * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true\n * @param target defines the original target of the state\n * @param currentTarget defines the current target of the state\n * @returns the current event state\n */\n initialize(mask, skipNextObservers = false, target, currentTarget) {\n this.mask = mask;\n this.skipNextObservers = skipNextObservers;\n this.target = target;\n this.currentTarget = currentTarget;\n return this;\n }\n}\n/**\n * Represent an Observer registered to a given Observable object.\n */\nexport class Observer {\n /**\n * Creates a new observer\n * @param callback defines the callback to call when the observer is notified\n * @param mask defines the mask of the observer (used to filter notifications)\n * @param scope defines the current scope used to restore the JS context\n */\n constructor(\n /**\n * Defines the callback to call when the observer is notified\n */\n callback, \n /**\n * Defines the mask of the observer (used to filter notifications)\n */\n mask, \n /**\n * Defines the current scope used to restore the JS context\n */\n scope = null) {\n this.callback = callback;\n this.mask = mask;\n this.scope = scope;\n /** @internal */\n this._willBeUnregistered = false;\n /**\n * Gets or sets a property defining that the observer as to be unregistered after the next notification\n */\n this.unregisterOnNextCall = false;\n /**\n * this function can be used to remove the observer from the observable.\n * It will be set by the observable that the observer belongs to.\n * @internal\n */\n this._remove = null;\n }\n /**\n * Remove the observer from its observable\n * This can be used instead of using the observable's remove function.\n */\n remove() {\n if (this._remove) {\n this._remove();\n }\n }\n}\n/**\n * The Observable class is a simple implementation of the Observable pattern.\n *\n * There's one slight particularity though: a given Observable can notify its observer using a particular mask value, only the Observers registered with this mask value will be notified.\n * This enable a more fine grained execution without having to rely on multiple different Observable objects.\n * For instance you may have a given Observable that have four different types of notifications: Move (mask = 0x01), Stop (mask = 0x02), Turn Right (mask = 0X04), Turn Left (mask = 0X08).\n * A given observer can register itself with only Move and Stop (mask = 0x03), then it will only be notified when one of these two occurs and will never be for Turn Left/Right.\n */\nexport class Observable {\n /**\n * Create an observable from a Promise.\n * @param promise a promise to observe for fulfillment.\n * @param onErrorObservable an observable to notify if a promise was rejected.\n * @returns the new Observable\n */\n static FromPromise(promise, onErrorObservable) {\n const observable = new Observable();\n promise\n .then((ret) => {\n observable.notifyObservers(ret);\n })\n .catch((err) => {\n if (onErrorObservable) {\n onErrorObservable.notifyObservers(err);\n }\n else {\n throw err;\n }\n });\n return observable;\n }\n /**\n * Gets the list of observers\n * Note that observers that were recently deleted may still be present in the list because they are only really deleted on the next javascript tick!\n */\n get observers() {\n return this._observers;\n }\n /**\n * Creates a new observable\n * @param onObserverAdded defines a callback to call when a new observer is added\n * @param notifyIfTriggered If set to true the observable will notify when an observer was added if the observable was already triggered.\n */\n constructor(onObserverAdded, \n /**\n * If set to true the observable will notify when an observer was added if the observable was already triggered.\n * This is helpful to single-state observables like the scene onReady or the dispose observable.\n */\n notifyIfTriggered = false) {\n this.notifyIfTriggered = notifyIfTriggered;\n this._observers = new Array();\n this._numObserversMarkedAsDeleted = 0;\n this._hasNotified = false;\n this._eventState = new EventState(0);\n if (onObserverAdded) {\n this._onObserverAdded = onObserverAdded;\n }\n }\n add(callback, mask = -1, insertFirst = false, scope = null, unregisterOnFirstCall = false) {\n if (!callback) {\n return null;\n }\n const observer = new Observer(callback, mask, scope);\n observer.unregisterOnNextCall = unregisterOnFirstCall;\n if (insertFirst) {\n this._observers.unshift(observer);\n }\n else {\n this._observers.push(observer);\n }\n if (this._onObserverAdded) {\n this._onObserverAdded(observer);\n }\n // If the observable was already triggered and the observable is set to notify if triggered, notify the new observer\n if (this._hasNotified && this.notifyIfTriggered) {\n if (this._lastNotifiedValue !== undefined) {\n this.notifyObserver(observer, this._lastNotifiedValue);\n }\n }\n // attach the remove function to the observer\n observer._remove = () => {\n this.remove(observer);\n };\n return observer;\n }\n addOnce(callback) {\n return this.add(callback, undefined, undefined, undefined, true);\n }\n /**\n * Remove an Observer from the Observable object\n * @param observer the instance of the Observer to remove\n * @returns false if it doesn't belong to this Observable\n */\n remove(observer) {\n if (!observer) {\n return false;\n }\n observer._remove = null;\n const index = this._observers.indexOf(observer);\n if (index !== -1) {\n this._deferUnregister(observer);\n return true;\n }\n return false;\n }\n /**\n * Remove a callback from the Observable object\n * @param callback the callback to remove\n * @param scope optional scope. If used only the callbacks with this scope will be removed\n * @returns false if it doesn't belong to this Observable\n */\n removeCallback(callback, scope) {\n for (let index = 0; index < this._observers.length; index++) {\n const observer = this._observers[index];\n if (observer._willBeUnregistered) {\n continue;\n }\n if (observer.callback === callback && (!scope || scope === observer.scope)) {\n this._deferUnregister(observer);\n return true;\n }\n }\n return false;\n }\n /**\n * @internal\n */\n _deferUnregister(observer) {\n if (observer._willBeUnregistered) {\n return;\n }\n this._numObserversMarkedAsDeleted++;\n observer.unregisterOnNextCall = false;\n observer._willBeUnregistered = true;\n setTimeout(() => {\n this._remove(observer);\n }, 0);\n }\n // This should only be called when not iterating over _observers to avoid callback skipping.\n // Removes an observer from the _observer Array.\n _remove(observer, updateCounter = true) {\n if (!observer) {\n return false;\n }\n const index = this._observers.indexOf(observer);\n if (index !== -1) {\n if (updateCounter) {\n this._numObserversMarkedAsDeleted--;\n }\n this._observers.splice(index, 1);\n return true;\n }\n return false;\n }\n /**\n * Moves the observable to the top of the observer list making it get called first when notified\n * @param observer the observer to move\n */\n makeObserverTopPriority(observer) {\n this._remove(observer, false);\n this._observers.unshift(observer);\n }\n /**\n * Moves the observable to the bottom of the observer list making it get called last when notified\n * @param observer the observer to move\n */\n makeObserverBottomPriority(observer) {\n this._remove(observer, false);\n this._observers.push(observer);\n }\n /**\n * Notify all Observers by calling their respective callback with the given data\n * Will return true if all observers were executed, false if an observer set skipNextObservers to true, then prevent the subsequent ones to execute\n * @param eventData defines the data to send to all observers\n * @param mask defines the mask of the current notification (observers with incompatible mask (ie mask & observer.mask === 0) will not be notified)\n * @param target defines the original target of the state\n * @param currentTarget defines the current target of the state\n * @param userInfo defines any user info to send to observers\n * @returns false if the complete observer chain was not processed (because one observer set the skipNextObservers to true)\n */\n notifyObservers(eventData, mask = -1, target, currentTarget, userInfo) {\n // this prevents potential memory leaks - if an object is disposed but the observable doesn't get cleared.\n if (this.notifyIfTriggered) {\n this._hasNotified = true;\n this._lastNotifiedValue = eventData;\n }\n if (!this._observers.length) {\n return true;\n }\n const state = this._eventState;\n state.mask = mask;\n state.target = target;\n state.currentTarget = currentTarget;\n state.skipNextObservers = false;\n state.lastReturnValue = eventData;\n state.userInfo = userInfo;\n for (const obs of this._observers) {\n if (obs._willBeUnregistered) {\n continue;\n }\n if (obs.mask & mask) {\n if (obs.unregisterOnNextCall) {\n this._deferUnregister(obs);\n }\n if (obs.scope) {\n state.lastReturnValue = obs.callback.apply(obs.scope, [eventData, state]);\n }\n else {\n state.lastReturnValue = obs.callback(eventData, state);\n }\n }\n if (state.skipNextObservers) {\n return false;\n }\n }\n return true;\n }\n /**\n * Notify a specific observer\n * @param observer defines the observer to notify\n * @param eventData defines the data to be sent to each callback\n * @param mask is used to filter observers defaults to -1\n */\n notifyObserver(observer, eventData, mask = -1) {\n // this prevents potential memory leaks - if an object is disposed but the observable doesn't get cleared.\n if (this.notifyIfTriggered) {\n this._hasNotified = true;\n this._lastNotifiedValue = eventData;\n }\n if (observer._willBeUnregistered) {\n return;\n }\n const state = this._eventState;\n state.mask = mask;\n state.skipNextObservers = false;\n if (observer.unregisterOnNextCall) {\n this._deferUnregister(observer);\n }\n observer.callback(eventData, state);\n }\n /**\n * Gets a boolean indicating if the observable has at least one observer\n * @returns true is the Observable has at least one Observer registered\n */\n hasObservers() {\n return this._observers.length - this._numObserversMarkedAsDeleted > 0;\n }\n /**\n * Clear the list of observers\n */\n clear() {\n while (this._observers.length) {\n const o = this._observers.pop();\n if (o) {\n o._remove = null;\n }\n }\n this._onObserverAdded = null;\n this._numObserversMarkedAsDeleted = 0;\n this.cleanLastNotifiedState();\n }\n /**\n * Clean the last notified state - both the internal last value and the has-notified flag\n */\n cleanLastNotifiedState() {\n this._hasNotified = false;\n this._lastNotifiedValue = undefined;\n }\n /**\n * Clone the current observable\n * @returns a new observable\n */\n clone() {\n const result = new Observable();\n result._observers = this._observers.slice(0);\n return result;\n }\n /**\n * Does this observable handles observer registered with a given mask\n * @param mask defines the mask to be tested\n * @returns whether or not one observer registered with the given mask is handled\n **/\n hasSpecificMask(mask = -1) {\n for (const obs of this._observers) {\n if (obs.mask & mask || obs.mask === mask) {\n return true;\n }\n }\n return false;\n }\n}\n//# sourceMappingURL=observable.js.map","import { Observable } from \"../Misc/observable.js\";\n/**\n * The engine store class is responsible to hold all the instances of Engine and Scene created\n * during the life time of the application.\n */\nexport class EngineStore {\n /**\n * Gets the latest created engine\n */\n static get LastCreatedEngine() {\n if (this.Instances.length === 0) {\n return null;\n }\n return this.Instances[this.Instances.length - 1];\n }\n /**\n * Gets the latest created scene\n */\n static get LastCreatedScene() {\n return this._LastCreatedScene;\n }\n}\n/** Gets the list of created engines */\nEngineStore.Instances = [];\n/**\n * Notifies when an engine was disposed.\n * Mainly used for static/cache cleanup\n */\nEngineStore.OnEnginesDisposedObservable = new Observable();\n/** @internal */\nEngineStore._LastCreatedScene = null;\n/**\n * Gets or sets a global variable indicating if fallback texture must be used when a texture cannot be loaded\n * @ignorenaming\n */\nEngineStore.UseFallbackTexture = true;\n/**\n * Texture content used if a texture cannot loaded\n * @ignorenaming\n */\nEngineStore.FallbackTexture = \"\";\n//# sourceMappingURL=engineStore.js.map","/* eslint-disable @typescript-eslint/naming-convention */\nimport { Scalar } from \"./math.scalar.js\";\nimport { Epsilon } from \"./math.constants.js\";\nimport { ArrayTools } from \"../Misc/arrayTools.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { PerformanceConfigurator } from \"../Engines/performanceConfigurator.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst _ExtractAsInt = (value) => {\n return parseInt(value.toString().replace(/\\W/g, \"\"));\n};\n/**\n * Class representing a vector containing 2 coordinates\n * Example Playground - Overview - https://playground.babylonjs.com/#QYBWV4#9\n */\nexport class Vector2 {\n /**\n * Creates a new Vector2 from the given x and y coordinates\n * @param x defines the first coordinate\n * @param y defines the second coordinate\n */\n constructor(\n /** defines the first coordinate */\n x = 0, \n /** defines the second coordinate */\n y = 0) {\n this.x = x;\n this.y = y;\n }\n /**\n * Gets a string with the Vector2 coordinates\n * @returns a string with the Vector2 coordinates\n */\n toString() {\n return `{X: ${this.x} Y: ${this.y}}`;\n }\n /**\n * Gets class name\n * @returns the string \"Vector2\"\n */\n getClassName() {\n return \"Vector2\";\n }\n /**\n * Gets current vector hash code\n * @returns the Vector2 hash code as a number\n */\n getHashCode() {\n const x = _ExtractAsInt(this.x);\n const y = _ExtractAsInt(this.y);\n let hash = x;\n hash = (hash * 397) ^ y;\n return hash;\n }\n // Operators\n /**\n * Sets the Vector2 coordinates in the given array or Float32Array from the given index.\n * Example Playground https://playground.babylonjs.com/#QYBWV4#15\n * @param array defines the source array\n * @param index defines the offset in source array\n * @returns the current Vector2\n */\n toArray(array, index = 0) {\n array[index] = this.x;\n array[index + 1] = this.y;\n return this;\n }\n /**\n * Update the current vector from an array\n * Example Playground https://playground.babylonjs.com/#QYBWV4#39\n * @param array defines the destination array\n * @param index defines the offset in the destination array\n * @returns the current Vector2\n */\n fromArray(array, index = 0) {\n Vector2.FromArrayToRef(array, index, this);\n return this;\n }\n /**\n * Copy the current vector to an array\n * Example Playground https://playground.babylonjs.com/#QYBWV4#40\n * @returns a new array with 2 elements: the Vector2 coordinates.\n */\n asArray() {\n const result = [];\n this.toArray(result, 0);\n return result;\n }\n /**\n * Sets the Vector2 coordinates with the given Vector2 coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#24\n * @param source defines the source Vector2\n * @returns the current updated Vector2\n */\n copyFrom(source) {\n this.x = source.x;\n this.y = source.y;\n return this;\n }\n /**\n * Sets the Vector2 coordinates with the given floats\n * Example Playground https://playground.babylonjs.com/#QYBWV4#25\n * @param x defines the first coordinate\n * @param y defines the second coordinate\n * @returns the current updated Vector2\n */\n copyFromFloats(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n /**\n * Sets the Vector2 coordinates with the given floats\n * Example Playground https://playground.babylonjs.com/#QYBWV4#62\n * @param x defines the first coordinate\n * @param y defines the second coordinate\n * @returns the current updated Vector2\n */\n set(x, y) {\n return this.copyFromFloats(x, y);\n }\n /**\n * Add another vector with the current one\n * Example Playground https://playground.babylonjs.com/#QYBWV4#11\n * @param otherVector defines the other vector\n * @returns a new Vector2 set with the addition of the current Vector2 and the given one coordinates\n */\n add(otherVector) {\n return new this.constructor(this.x + otherVector.x, this.y + otherVector.y);\n }\n /**\n * Sets the \"result\" coordinates with the addition of the current Vector2 and the given one coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#12\n * @param otherVector defines the other vector\n * @param result defines the target vector\n * @returns result input\n */\n addToRef(otherVector, result) {\n result.x = this.x + otherVector.x;\n result.y = this.y + otherVector.y;\n return result;\n }\n /**\n * Set the Vector2 coordinates by adding the given Vector2 coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#13\n * @param otherVector defines the other vector\n * @returns the current updated Vector2\n */\n addInPlace(otherVector) {\n this.x += otherVector.x;\n this.y += otherVector.y;\n return this;\n }\n /**\n * Gets a new Vector2 by adding the current Vector2 coordinates to the given Vector3 x, y coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#14\n * @param otherVector defines the other vector\n * @returns a new Vector2\n */\n addVector3(otherVector) {\n return new this.constructor(this.x + otherVector.x, this.y + otherVector.y);\n }\n /**\n * Gets a new Vector2 set with the subtracted coordinates of the given one from the current Vector2\n * Example Playground https://playground.babylonjs.com/#QYBWV4#61\n * @param otherVector defines the other vector\n * @returns a new Vector2\n */\n subtract(otherVector) {\n return new this.constructor(this.x - otherVector.x, this.y - otherVector.y);\n }\n /**\n * Sets the \"result\" coordinates with the subtraction of the given one from the current Vector2 coordinates.\n * Example Playground https://playground.babylonjs.com/#QYBWV4#63\n * @param otherVector defines the other vector\n * @param result defines the target vector\n * @returns result input\n */\n subtractToRef(otherVector, result) {\n result.x = this.x - otherVector.x;\n result.y = this.y - otherVector.y;\n return result;\n }\n /**\n * Sets the current Vector2 coordinates by subtracting from it the given one coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#88\n * @param otherVector defines the other vector\n * @returns the current updated Vector2\n */\n subtractInPlace(otherVector) {\n this.x -= otherVector.x;\n this.y -= otherVector.y;\n return this;\n }\n /**\n * Multiplies in place the current Vector2 coordinates by the given ones\n * Example Playground https://playground.babylonjs.com/#QYBWV4#43\n * @param otherVector defines the other vector\n * @returns the current updated Vector2\n */\n multiplyInPlace(otherVector) {\n this.x *= otherVector.x;\n this.y *= otherVector.y;\n return this;\n }\n /**\n * Returns a new Vector2 set with the multiplication of the current Vector2 and the given one coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#42\n * @param otherVector defines the other vector\n * @returns a new Vector2\n */\n multiply(otherVector) {\n return new this.constructor(this.x * otherVector.x, this.y * otherVector.y);\n }\n /**\n * Sets \"result\" coordinates with the multiplication of the current Vector2 and the given one coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#44\n * @param otherVector defines the other vector\n * @param result defines the target vector\n * @returns result input\n */\n multiplyToRef(otherVector, result) {\n result.x = this.x * otherVector.x;\n result.y = this.y * otherVector.y;\n return result;\n }\n /**\n * Gets a new Vector2 set with the Vector2 coordinates multiplied by the given floats\n * Example Playground https://playground.babylonjs.com/#QYBWV4#89\n * @param x defines the first coordinate\n * @param y defines the second coordinate\n * @returns a new Vector2\n */\n multiplyByFloats(x, y) {\n return new this.constructor(this.x * x, this.y * y);\n }\n /**\n * Returns a new Vector2 set with the Vector2 coordinates divided by the given one coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#27\n * @param otherVector defines the other vector\n * @returns a new Vector2\n */\n divide(otherVector) {\n return new this.constructor(this.x / otherVector.x, this.y / otherVector.y);\n }\n /**\n * Sets the \"result\" coordinates with the Vector2 divided by the given one coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#30\n * @param otherVector defines the other vector\n * @param result defines the target vector\n * @returns result input\n */\n divideToRef(otherVector, result) {\n result.x = this.x / otherVector.x;\n result.y = this.y / otherVector.y;\n return result;\n }\n /**\n * Divides the current Vector2 coordinates by the given ones\n * Example Playground https://playground.babylonjs.com/#QYBWV4#28\n * @param otherVector defines the other vector\n * @returns the current updated Vector2\n */\n divideInPlace(otherVector) {\n return this.divideToRef(otherVector, this);\n }\n /**\n * Gets a new Vector2 with current Vector2 negated coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#22\n * @returns a new Vector2\n */\n negate() {\n return new this.constructor(-this.x, -this.y);\n }\n /**\n * Negate this vector in place\n * Example Playground https://playground.babylonjs.com/#QYBWV4#23\n * @returns this\n */\n negateInPlace() {\n this.x *= -1;\n this.y *= -1;\n return this;\n }\n /**\n * Negate the current Vector2 and stores the result in the given vector \"result\" coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#41\n * @param result defines the Vector3 object where to store the result\n * @returns the result\n */\n negateToRef(result) {\n return result.copyFromFloats(this.x * -1, this.y * -1);\n }\n /**\n * Multiply the Vector2 coordinates by\n * Example Playground https://playground.babylonjs.com/#QYBWV4#59\n * @param scale defines the scaling factor\n * @returns the current updated Vector2\n */\n scaleInPlace(scale) {\n this.x *= scale;\n this.y *= scale;\n return this;\n }\n /**\n * Returns a new Vector2 scaled by \"scale\" from the current Vector2\n * Example Playground https://playground.babylonjs.com/#QYBWV4#52\n * @param scale defines the scaling factor\n * @returns a new Vector2\n */\n scale(scale) {\n const result = new this.constructor(0, 0);\n this.scaleToRef(scale, result);\n return result;\n }\n /**\n * Scale the current Vector2 values by a factor to a given Vector2\n * Example Playground https://playground.babylonjs.com/#QYBWV4#57\n * @param scale defines the scale factor\n * @param result defines the Vector2 object where to store the result\n * @returns result input\n */\n scaleToRef(scale, result) {\n result.x = this.x * scale;\n result.y = this.y * scale;\n return result;\n }\n /**\n * Scale the current Vector2 values by a factor and add the result to a given Vector2\n * Example Playground https://playground.babylonjs.com/#QYBWV4#58\n * @param scale defines the scale factor\n * @param result defines the Vector2 object where to store the result\n * @returns result input\n */\n scaleAndAddToRef(scale, result) {\n result.x += this.x * scale;\n result.y += this.y * scale;\n return result;\n }\n /**\n * Gets a boolean if two vectors are equals\n * Example Playground https://playground.babylonjs.com/#QYBWV4#31\n * @param otherVector defines the other vector\n * @returns true if the given vector coordinates strictly equal the current Vector2 ones\n */\n equals(otherVector) {\n return otherVector && this.x === otherVector.x && this.y === otherVector.y;\n }\n /**\n * Gets a boolean if two vectors are equals (using an epsilon value)\n * Example Playground https://playground.babylonjs.com/#QYBWV4#32\n * @param otherVector defines the other vector\n * @param epsilon defines the minimal distance to consider equality\n * @returns true if the given vector coordinates are close to the current ones by a distance of epsilon.\n */\n equalsWithEpsilon(otherVector, epsilon = Epsilon) {\n return otherVector && Scalar.WithinEpsilon(this.x, otherVector.x, epsilon) && Scalar.WithinEpsilon(this.y, otherVector.y, epsilon);\n }\n /**\n * Gets a new Vector2 from current Vector2 floored values\n * Example Playground https://playground.babylonjs.com/#QYBWV4#35\n * eg (1.2, 2.31) returns (1, 2)\n * @returns a new Vector2\n */\n floor() {\n return new this.constructor(Math.floor(this.x), Math.floor(this.y));\n }\n /**\n * Gets a new Vector2 from current Vector2 fractional values\n * Example Playground https://playground.babylonjs.com/#QYBWV4#34\n * eg (1.2, 2.31) returns (0.2, 0.31)\n * @returns a new Vector2\n */\n fract() {\n return new this.constructor(this.x - Math.floor(this.x), this.y - Math.floor(this.y));\n }\n /**\n * Rotate the current vector into a given result vector\n * Example Playground https://playground.babylonjs.com/#QYBWV4#49\n * @param angle defines the rotation angle\n * @param result defines the result vector where to store the rotated vector\n * @returns result input\n */\n rotateToRef(angle, result) {\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const x = cos * this.x - sin * this.y;\n const y = sin * this.x + cos * this.y;\n result.x = x;\n result.y = y;\n return result;\n }\n // Properties\n /**\n * Gets the length of the vector\n * @returns the vector length (float)\n */\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }\n /**\n * Gets the vector squared length\n * @returns the vector squared length (float)\n */\n lengthSquared() {\n return this.x * this.x + this.y * this.y;\n }\n // Methods\n /**\n * Normalize the vector\n * Example Playground https://playground.babylonjs.com/#QYBWV4#48\n * @returns the current updated Vector2\n */\n normalize() {\n return this.normalizeFromLength(this.length());\n }\n /**\n * Normalize the current Vector2 with the given input length.\n * Please note that this is an in place operation.\n * @param len the length of the vector\n * @returns the current updated Vector2\n */\n normalizeFromLength(len) {\n if (len === 0 || len === 1.0) {\n return this;\n }\n return this.scaleInPlace(1.0 / len);\n }\n /**\n * Normalize the current Vector2 to a new vector\n * @returns the new Vector2\n */\n normalizeToNew() {\n const normalized = new this.constructor(0, 0);\n this.normalizeToRef(normalized);\n return normalized;\n }\n /**\n * Normalize the current Vector2 to the reference\n * @param reference define the Vector2 to update\n * @returns the updated Vector2\n */\n normalizeToRef(reference) {\n const len = this.length();\n if (len === 0 || len === 1.0) {\n return reference.copyFromFloats(this.x, this.y);\n }\n return this.scaleToRef(1.0 / len, reference);\n }\n /**\n * Gets a new Vector2 copied from the Vector2\n * Example Playground https://playground.babylonjs.com/#QYBWV4#20\n * @returns a new Vector2\n */\n clone() {\n return new this.constructor(this.x, this.y);\n }\n /**\n * Gets the dot product of the current vector and the vector \"otherVector\"\n * @param otherVector defines second vector\n * @returns the dot product (float)\n */\n dot(otherVector) {\n return this.x * otherVector.x + this.y * otherVector.y;\n }\n // Statics\n /**\n * Gets a new Vector2(0, 0)\n * @returns a new Vector2\n */\n static Zero() {\n return new Vector2(0, 0);\n }\n /**\n * Gets a new Vector2(1, 1)\n * @returns a new Vector2\n */\n static One() {\n return new Vector2(1, 1);\n }\n /**\n * Returns a new Vector2 with random values between min and max\n * @param min the minimum random value\n * @param max the maximum random value\n * @returns a Vector2 with random values between min and max\n */\n static Random(min = 0, max = 1) {\n return new Vector2(Scalar.RandomRange(min, max), Scalar.RandomRange(min, max));\n }\n /**\n * Gets a zero Vector2 that must not be updated\n */\n static get ZeroReadOnly() {\n return Vector2._ZeroReadOnly;\n }\n /**\n * Gets a new Vector2 set from the given index element of the given array\n * Example Playground https://playground.babylonjs.com/#QYBWV4#79\n * @param array defines the data source\n * @param offset defines the offset in the data source\n * @returns a new Vector2\n */\n static FromArray(array, offset = 0) {\n return new Vector2(array[offset], array[offset + 1]);\n }\n /**\n * Sets \"result\" from the given index element of the given array\n * Example Playground https://playground.babylonjs.com/#QYBWV4#80\n * @param array defines the data source\n * @param offset defines the offset in the data source\n * @param result defines the target vector\n * @returns result input\n */\n static FromArrayToRef(array, offset, result) {\n result.x = array[offset];\n result.y = array[offset + 1];\n return result;\n }\n /**\n * Gets a new Vector2 located for \"amount\" (float) on the CatmullRom spline defined by the given four Vector2\n * Example Playground https://playground.babylonjs.com/#QYBWV4#65\n * @param value1 defines 1st point of control\n * @param value2 defines 2nd point of control\n * @param value3 defines 3rd point of control\n * @param value4 defines 4th point of control\n * @param amount defines the interpolation factor\n * @returns a new Vector2\n */\n static CatmullRom(value1, value2, value3, value4, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const x = 0.5 *\n (2.0 * value2.x +\n (-value1.x + value3.x) * amount +\n (2.0 * value1.x - 5.0 * value2.x + 4.0 * value3.x - value4.x) * squared +\n (-value1.x + 3.0 * value2.x - 3.0 * value3.x + value4.x) * cubed);\n const y = 0.5 *\n (2.0 * value2.y +\n (-value1.y + value3.y) * amount +\n (2.0 * value1.y - 5.0 * value2.y + 4.0 * value3.y - value4.y) * squared +\n (-value1.y + 3.0 * value2.y - 3.0 * value3.y + value4.y) * cubed);\n return new value1.constructor(x, y);\n }\n /**\n * Returns a new Vector2 set with same the coordinates than \"value\" ones if the vector \"value\" is in the square defined by \"min\" and \"max\".\n * If a coordinate of \"value\" is lower than \"min\" coordinates, the returned Vector2 is given this \"min\" coordinate.\n * If a coordinate of \"value\" is greater than \"max\" coordinates, the returned Vector2 is given this \"max\" coordinate\n * Example Playground https://playground.babylonjs.com/#QYBWV4#76\n * @param value defines the value to clamp\n * @param min defines the lower limit\n * @param max defines the upper limit\n * @returns a new Vector2\n */\n static Clamp(value, min, max) {\n let x = value.x;\n x = x > max.x ? max.x : x;\n x = x < min.x ? min.x : x;\n let y = value.y;\n y = y > max.y ? max.y : y;\n y = y < min.y ? min.y : y;\n return new value.constructor(x, y);\n }\n /**\n * Returns a new Vector2 located for \"amount\" (float) on the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\"\n * Example Playground https://playground.babylonjs.com/#QYBWV4#81\n * @param value1 defines the 1st control point\n * @param tangent1 defines the outgoing tangent\n * @param value2 defines the 2nd control point\n * @param tangent2 defines the incoming tangent\n * @param amount defines the interpolation factor\n * @returns a new Vector2\n */\n static Hermite(value1, tangent1, value2, tangent2, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\n const part2 = -2.0 * cubed + 3.0 * squared;\n const part3 = cubed - 2.0 * squared + amount;\n const part4 = cubed - squared;\n const x = value1.x * part1 + value2.x * part2 + tangent1.x * part3 + tangent2.x * part4;\n const y = value1.y * part1 + value2.y * part2 + tangent1.y * part3 + tangent2.y * part4;\n return new value1.constructor(x, y);\n }\n /**\n * Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\n * Example Playground https://playground.babylonjs.com/#QYBWV4#82\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param time define where the derivative must be done\n * @returns 1st derivative\n */\n static Hermite1stDerivative(value1, tangent1, value2, tangent2, time) {\n const result = new value1.constructor();\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\n return result;\n }\n /**\n * Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\n * Example Playground https://playground.babylonjs.com/#QYBWV4#83\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param time define where the derivative must be done\n * @param result define where the derivative will be stored\n * @returns result input\n */\n static Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result) {\n const t2 = time * time;\n result.x = (t2 - time) * 6 * value1.x + (3 * t2 - 4 * time + 1) * tangent1.x + (-t2 + time) * 6 * value2.x + (3 * t2 - 2 * time) * tangent2.x;\n result.y = (t2 - time) * 6 * value1.y + (3 * t2 - 4 * time + 1) * tangent1.y + (-t2 + time) * 6 * value2.y + (3 * t2 - 2 * time) * tangent2.y;\n return result;\n }\n /**\n * Returns a new Vector2 located for \"amount\" (float) on the linear interpolation between the vector \"start\" adn the vector \"end\".\n * Example Playground https://playground.babylonjs.com/#QYBWV4#84\n * @param start defines the start vector\n * @param end defines the end vector\n * @param amount defines the interpolation factor\n * @returns a new Vector2\n */\n static Lerp(start, end, amount) {\n const x = start.x + (end.x - start.x) * amount;\n const y = start.y + (end.y - start.y) * amount;\n return new start.constructor(x, y);\n }\n /**\n * Gets the dot product of the vector \"left\" and the vector \"right\"\n * Example Playground https://playground.babylonjs.com/#QYBWV4#90\n * @param left defines first vector\n * @param right defines second vector\n * @returns the dot product (float)\n */\n static Dot(left, right) {\n return left.x * right.x + left.y * right.y;\n }\n /**\n * Returns a new Vector2 equal to the normalized given vector\n * Example Playground https://playground.babylonjs.com/#QYBWV4#46\n * @param vector defines the vector to normalize\n * @returns a new Vector2\n */\n static Normalize(vector) {\n const result = new vector.constructor();\n Vector2.NormalizeToRef(vector, result);\n return result;\n }\n /**\n * Normalize a given vector into a second one\n * Example Playground https://playground.babylonjs.com/#QYBWV4#50\n * @param vector defines the vector to normalize\n * @param result defines the vector where to store the result\n * @returns result input\n */\n static NormalizeToRef(vector, result) {\n vector.normalizeToRef(result);\n return result;\n }\n /**\n * Gets a new Vector2 set with the minimal coordinate values from the \"left\" and \"right\" vectors\n * Example Playground https://playground.babylonjs.com/#QYBWV4#86\n * @param left defines 1st vector\n * @param right defines 2nd vector\n * @returns a new Vector2\n */\n static Minimize(left, right) {\n const x = left.x < right.x ? left.x : right.x;\n const y = left.y < right.y ? left.y : right.y;\n return new left.constructor(x, y);\n }\n /**\n * Gets a new Vector2 set with the maximal coordinate values from the \"left\" and \"right\" vectors\n * Example Playground https://playground.babylonjs.com/#QYBWV4#86\n * @param left defines 1st vector\n * @param right defines 2nd vector\n * @returns a new Vector2\n */\n static Maximize(left, right) {\n const x = left.x > right.x ? left.x : right.x;\n const y = left.y > right.y ? left.y : right.y;\n return new left.constructor(x, y);\n }\n /**\n * Gets a new Vector2 set with the transformed coordinates of the given vector by the given transformation matrix\n * Example Playground https://playground.babylonjs.com/#QYBWV4#17\n * @param vector defines the vector to transform\n * @param transformation defines the matrix to apply\n * @returns a new Vector2\n */\n static Transform(vector, transformation) {\n const result = new vector.constructor();\n Vector2.TransformToRef(vector, transformation, result);\n return result;\n }\n /**\n * Transforms the given vector coordinates by the given transformation matrix and stores the result in the vector \"result\" coordinates\n * Example Playground https://playground.babylonjs.com/#QYBWV4#19\n * @param vector defines the vector to transform\n * @param transformation defines the matrix to apply\n * @param result defines the target vector\n * @returns result input\n */\n static TransformToRef(vector, transformation, result) {\n const m = transformation.m;\n const x = vector.x * m[0] + vector.y * m[4] + m[12];\n const y = vector.x * m[1] + vector.y * m[5] + m[13];\n result.x = x;\n result.y = y;\n return result;\n }\n /**\n * Determines if a given vector is included in a triangle\n * Example Playground https://playground.babylonjs.com/#QYBWV4#87\n * @param p defines the vector to test\n * @param p0 defines 1st triangle point\n * @param p1 defines 2nd triangle point\n * @param p2 defines 3rd triangle point\n * @returns true if the point \"p\" is in the triangle defined by the vectors \"p0\", \"p1\", \"p2\"\n */\n static PointInTriangle(p, p0, p1, p2) {\n const a = (1 / 2) * (-p1.y * p2.x + p0.y * (-p1.x + p2.x) + p0.x * (p1.y - p2.y) + p1.x * p2.y);\n const sign = a < 0 ? -1 : 1;\n const s = (p0.y * p2.x - p0.x * p2.y + (p2.y - p0.y) * p.x + (p0.x - p2.x) * p.y) * sign;\n const t = (p0.x * p1.y - p0.y * p1.x + (p0.y - p1.y) * p.x + (p1.x - p0.x) * p.y) * sign;\n return s > 0 && t > 0 && s + t < 2 * a * sign;\n }\n /**\n * Gets the distance between the vectors \"value1\" and \"value2\"\n * Example Playground https://playground.babylonjs.com/#QYBWV4#71\n * @param value1 defines first vector\n * @param value2 defines second vector\n * @returns the distance between vectors\n */\n static Distance(value1, value2) {\n return Math.sqrt(Vector2.DistanceSquared(value1, value2));\n }\n /**\n * Returns the squared distance between the vectors \"value1\" and \"value2\"\n * Example Playground https://playground.babylonjs.com/#QYBWV4#72\n * @param value1 defines first vector\n * @param value2 defines second vector\n * @returns the squared distance between vectors\n */\n static DistanceSquared(value1, value2) {\n const x = value1.x - value2.x;\n const y = value1.y - value2.y;\n return x * x + y * y;\n }\n /**\n * Gets a new Vector2 located at the center of the vectors \"value1\" and \"value2\"\n * Example Playground https://playground.babylonjs.com/#QYBWV4#86\n * Example Playground https://playground.babylonjs.com/#QYBWV4#66\n * @param value1 defines first vector\n * @param value2 defines second vector\n * @returns a new Vector2\n */\n static Center(value1, value2) {\n const result = new value1.constructor();\n return Vector2.CenterToRef(value1, value2, result);\n }\n /**\n * Gets the center of the vectors \"value1\" and \"value2\" and stores the result in the vector \"ref\"\n * Example Playground https://playground.babylonjs.com/#QYBWV4#66\n * @param value1 defines first vector\n * @param value2 defines second vector\n * @param ref defines third vector\n * @returns ref\n */\n static CenterToRef(value1, value2, ref) {\n return ref.copyFromFloats((value1.x + value2.x) / 2, (value1.y + value2.y) / 2);\n }\n /**\n * Gets the shortest distance (float) between the point \"p\" and the segment defined by the two points \"segA\" and \"segB\".\n * Example Playground https://playground.babylonjs.com/#QYBWV4#77\n * @param p defines the middle point\n * @param segA defines one point of the segment\n * @param segB defines the other point of the segment\n * @returns the shortest distance\n */\n static DistanceOfPointFromSegment(p, segA, segB) {\n const l2 = Vector2.DistanceSquared(segA, segB);\n if (l2 === 0.0) {\n return Vector2.Distance(p, segA);\n }\n const v = segB.subtract(segA);\n const t = Math.max(0, Math.min(1, Vector2.Dot(p.subtract(segA), v) / l2));\n const proj = segA.add(v.multiplyByFloats(t, t));\n return Vector2.Distance(p, proj);\n }\n}\nVector2._ZeroReadOnly = Vector2.Zero();\n/**\n * Class used to store (x,y,z) vector representation\n * A Vector3 is the main object used in 3D geometry\n * It can represent either the coordinates of a point the space, either a direction\n * Reminder: js uses a left handed forward facing system\n * Example Playground - Overview - https://playground.babylonjs.com/#R1F8YU\n */\nexport class Vector3 {\n /** Gets or sets the x coordinate */\n get x() {\n return this._x;\n }\n set x(value) {\n this._x = value;\n this._isDirty = true;\n }\n /** Gets or sets the y coordinate */\n get y() {\n return this._y;\n }\n set y(value) {\n this._y = value;\n this._isDirty = true;\n }\n /** Gets or sets the z coordinate */\n get z() {\n return this._z;\n }\n set z(value) {\n this._z = value;\n this._isDirty = true;\n }\n /**\n * Creates a new Vector3 object from the given x, y, z (floats) coordinates.\n * @param x defines the first coordinates (on X axis)\n * @param y defines the second coordinates (on Y axis)\n * @param z defines the third coordinates (on Z axis)\n */\n constructor(x = 0, y = 0, z = 0) {\n /** @internal */\n this._isDirty = true;\n this._x = x;\n this._y = y;\n this._z = z;\n }\n /**\n * Creates a string representation of the Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#67\n * @returns a string with the Vector3 coordinates.\n */\n toString() {\n return `{X: ${this._x} Y: ${this._y} Z: ${this._z}}`;\n }\n /**\n * Gets the class name\n * @returns the string \"Vector3\"\n */\n getClassName() {\n return \"Vector3\";\n }\n /**\n * Creates the Vector3 hash code\n * @returns a number which tends to be unique between Vector3 instances\n */\n getHashCode() {\n const x = _ExtractAsInt(this._x);\n const y = _ExtractAsInt(this._y);\n const z = _ExtractAsInt(this._z);\n let hash = x;\n hash = (hash * 397) ^ y;\n hash = (hash * 397) ^ z;\n return hash;\n }\n // Operators\n /**\n * Creates an array containing three elements : the coordinates of the Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#10\n * @returns a new array of numbers\n */\n asArray() {\n const result = [];\n this.toArray(result, 0);\n return result;\n }\n /**\n * Populates the given array or Float32Array from the given index with the successive coordinates of the Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#65\n * @param array defines the destination array\n * @param index defines the offset in the destination array\n * @returns the current Vector3\n */\n toArray(array, index = 0) {\n array[index] = this._x;\n array[index + 1] = this._y;\n array[index + 2] = this._z;\n return this;\n }\n /**\n * Update the current vector from an array\n * Example Playground https://playground.babylonjs.com/#R1F8YU#24\n * @param array defines the destination array\n * @param index defines the offset in the destination array\n * @returns the current Vector3\n */\n fromArray(array, index = 0) {\n Vector3.FromArrayToRef(array, index, this);\n return this;\n }\n /**\n * Converts the current Vector3 into a quaternion (considering that the Vector3 contains Euler angles representation of a rotation)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#66\n * @returns a new Quaternion object, computed from the Vector3 coordinates\n */\n toQuaternion() {\n return Quaternion.RotationYawPitchRoll(this._y, this._x, this._z);\n }\n /**\n * Adds the given vector to the current Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#4\n * @param otherVector defines the second operand\n * @returns the current updated Vector3\n */\n addInPlace(otherVector) {\n return this.addInPlaceFromFloats(otherVector._x, otherVector._y, otherVector._z);\n }\n /**\n * Adds the given coordinates to the current Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#5\n * @param x defines the x coordinate of the operand\n * @param y defines the y coordinate of the operand\n * @param z defines the z coordinate of the operand\n * @returns the current updated Vector3\n */\n addInPlaceFromFloats(x, y, z) {\n this._x += x;\n this._y += y;\n this._z += z;\n this._isDirty = true;\n return this;\n }\n /**\n * Gets a new Vector3, result of the addition the current Vector3 and the given vector\n * Example Playground https://playground.babylonjs.com/#R1F8YU#3\n * @param otherVector defines the second operand\n * @returns the resulting Vector3\n */\n add(otherVector) {\n return new this.constructor(this._x + otherVector._x, this._y + otherVector._y, this._z + otherVector._z);\n }\n /**\n * Adds the current Vector3 to the given one and stores the result in the vector \"result\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#6\n * @param otherVector defines the second operand\n * @param result defines the Vector3 object where to store the result\n * @returns the result\n */\n addToRef(otherVector, result) {\n return result.copyFromFloats(this._x + otherVector._x, this._y + otherVector._y, this._z + otherVector._z);\n }\n /**\n * Subtract the given vector from the current Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#61\n * @param otherVector defines the second operand\n * @returns the current updated Vector3\n */\n subtractInPlace(otherVector) {\n this._x -= otherVector._x;\n this._y -= otherVector._y;\n this._z -= otherVector._z;\n this._isDirty = true;\n return this;\n }\n /**\n * Returns a new Vector3, result of the subtraction of the given vector from the current Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#60\n * @param otherVector defines the second operand\n * @returns the resulting Vector3\n */\n subtract(otherVector) {\n return new this.constructor(this._x - otherVector._x, this._y - otherVector._y, this._z - otherVector._z);\n }\n /**\n * Subtracts the given vector from the current Vector3 and stores the result in the vector \"result\".\n * Example Playground https://playground.babylonjs.com/#R1F8YU#63\n * @param otherVector defines the second operand\n * @param result defines the Vector3 object where to store the result\n * @returns the result\n */\n subtractToRef(otherVector, result) {\n return this.subtractFromFloatsToRef(otherVector._x, otherVector._y, otherVector._z, result);\n }\n /**\n * Returns a new Vector3 set with the subtraction of the given floats from the current Vector3 coordinates\n * Example Playground https://playground.babylonjs.com/#R1F8YU#62\n * @param x defines the x coordinate of the operand\n * @param y defines the y coordinate of the operand\n * @param z defines the z coordinate of the operand\n * @returns the resulting Vector3\n */\n subtractFromFloats(x, y, z) {\n return new this.constructor(this._x - x, this._y - y, this._z - z);\n }\n /**\n * Subtracts the given floats from the current Vector3 coordinates and set the given vector \"result\" with this result\n * Example Playground https://playground.babylonjs.com/#R1F8YU#64\n * @param x defines the x coordinate of the operand\n * @param y defines the y coordinate of the operand\n * @param z defines the z coordinate of the operand\n * @param result defines the Vector3 object where to store the result\n * @returns the result\n */\n subtractFromFloatsToRef(x, y, z, result) {\n return result.copyFromFloats(this._x - x, this._y - y, this._z - z);\n }\n /**\n * Gets a new Vector3 set with the current Vector3 negated coordinates\n * Example Playground https://playground.babylonjs.com/#R1F8YU#35\n * @returns a new Vector3\n */\n negate() {\n return new this.constructor(-this._x, -this._y, -this._z);\n }\n /**\n * Negate this vector in place\n * Example Playground https://playground.babylonjs.com/#R1F8YU#36\n * @returns this\n */\n negateInPlace() {\n this._x *= -1;\n this._y *= -1;\n this._z *= -1;\n this._isDirty = true;\n return this;\n }\n /**\n * Negate the current Vector3 and stores the result in the given vector \"result\" coordinates\n * Example Playground https://playground.babylonjs.com/#R1F8YU#37\n * @param result defines the Vector3 object where to store the result\n * @returns the result\n */\n negateToRef(result) {\n return result.copyFromFloats(this._x * -1, this._y * -1, this._z * -1);\n }\n /**\n * Multiplies the Vector3 coordinates by the float \"scale\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#56\n * @param scale defines the multiplier factor\n * @returns the current updated Vector3\n */\n scaleInPlace(scale) {\n this._x *= scale;\n this._y *= scale;\n this._z *= scale;\n this._isDirty = true;\n return this;\n }\n /**\n * Returns a new Vector3 set with the current Vector3 coordinates multiplied by the float \"scale\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#53\n * @param scale defines the multiplier factor\n * @returns a new Vector3\n */\n scale(scale) {\n return new this.constructor(this._x * scale, this._y * scale, this._z * scale);\n }\n /**\n * Multiplies the current Vector3 coordinates by the float \"scale\" and stores the result in the given vector \"result\" coordinates\n * Example Playground https://playground.babylonjs.com/#R1F8YU#57\n * @param scale defines the multiplier factor\n * @param result defines the Vector3 object where to store the result\n * @returns the result\n */\n scaleToRef(scale, result) {\n return result.copyFromFloats(this._x * scale, this._y * scale, this._z * scale);\n }\n /**\n * Creates a vector normal (perpendicular) to the current Vector3 and stores the result in the given vector\n * Out of the infinite possibilities the normal chosen is the one formed by rotating the current vector\n * 90 degrees about an axis which lies perpendicular to the current vector\n * and its projection on the xz plane. In the case of a current vector in the xz plane\n * the normal is calculated to be along the y axis.\n * Example Playground https://playground.babylonjs.com/#R1F8YU#230\n * Example Playground https://playground.babylonjs.com/#R1F8YU#231\n * @param result defines the Vector3 object where to store the resultant normal\n * returns the result\n */\n getNormalToRef(result) {\n /**\n * Calculates the spherical coordinates of the current vector\n * so saves on memory rather than importing whole Spherical Class\n */\n const radius = this.length();\n let theta = Math.acos(this.y / radius);\n const phi = Math.atan2(this.z, this.x);\n //makes angle 90 degs to current vector\n if (theta > Math.PI / 2) {\n theta -= Math.PI / 2;\n }\n else {\n theta += Math.PI / 2;\n }\n //Calculates resutant normal vector from spherical coordinate of perpendicular vector\n const x = radius * Math.sin(theta) * Math.cos(phi);\n const y = radius * Math.cos(theta);\n const z = radius * Math.sin(theta) * Math.sin(phi);\n result.set(x, y, z);\n return result;\n }\n /**\n * Rotates the vector using the given unit quaternion and stores the new vector in result\n * Example Playground https://playground.babylonjs.com/#R1F8YU#9\n * @param q the unit quaternion representing the rotation\n * @param result the output vector\n * @returns the result\n */\n applyRotationQuaternionToRef(q, result) {\n // Derived from https://raw.org/proof/vector-rotation-using-quaternions/\n const vx = this._x, vy = this._y, vz = this._z;\n const qx = q._x, qy = q._y, qz = q._z, qw = q._w;\n // t = 2q x v\n const tx = 2 * (qy * vz - qz * vy);\n const ty = 2 * (qz * vx - qx * vz);\n const tz = 2 * (qx * vy - qy * vx);\n // v + w t + q x t\n result._x = vx + qw * tx + qy * tz - qz * ty;\n result._y = vy + qw * ty + qz * tx - qx * tz;\n result._z = vz + qw * tz + qx * ty - qy * tx;\n result._isDirty = true;\n return result;\n }\n /**\n * Rotates the vector in place using the given unit quaternion\n * Example Playground https://playground.babylonjs.com/#R1F8YU#8\n * @param q the unit quaternion representing the rotation\n * @returns the current updated Vector3\n */\n applyRotationQuaternionInPlace(q) {\n return this.applyRotationQuaternionToRef(q, this);\n }\n /**\n * Rotates the vector using the given unit quaternion and returns the new vector\n * Example Playground https://playground.babylonjs.com/#R1F8YU#7\n * @param q the unit quaternion representing the rotation\n * @returns a new Vector3\n */\n applyRotationQuaternion(q) {\n return this.applyRotationQuaternionToRef(q, new this.constructor());\n }\n /**\n * Scale the current Vector3 values by a factor and add the result to a given Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#55\n * @param scale defines the scale factor\n * @param result defines the Vector3 object where to store the result\n * @returns result input\n */\n scaleAndAddToRef(scale, result) {\n return result.addInPlaceFromFloats(this._x * scale, this._y * scale, this._z * scale);\n }\n /**\n * Projects the current point Vector3 to a plane along a ray starting from a specified origin and passing through the current point Vector3.\n * Example Playground https://playground.babylonjs.com/#R1F8YU#48\n * @param plane defines the plane to project to\n * @param origin defines the origin of the projection ray\n * @returns the projected vector3\n */\n projectOnPlane(plane, origin) {\n const result = new this.constructor();\n this.projectOnPlaneToRef(plane, origin, result);\n return result;\n }\n /**\n * Projects the current point Vector3 to a plane along a ray starting from a specified origin and passing through the current point Vector3.\n * Example Playground https://playground.babylonjs.com/#R1F8YU#49\n * @param plane defines the plane to project to\n * @param origin defines the origin of the projection ray\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n projectOnPlaneToRef(plane, origin, result) {\n const n = plane.normal;\n const d = plane.d;\n const V = MathTmp.Vector3[0];\n // ray direction\n this.subtractToRef(origin, V);\n V.normalize();\n const denom = Vector3.Dot(V, n);\n //When the ray is close to parallel to the plane return infinity vector\n if (Math.abs(denom) < 0.0000000001) {\n result.setAll(Infinity);\n }\n else {\n const t = -(Vector3.Dot(origin, n) + d) / denom;\n // P = P0 + t*V\n const scaledV = V.scaleInPlace(t);\n origin.addToRef(scaledV, result);\n }\n return result;\n }\n /**\n * Returns true if the current Vector3 and the given vector coordinates are strictly equal\n * Example Playground https://playground.babylonjs.com/#R1F8YU#19\n * @param otherVector defines the second operand\n * @returns true if both vectors are equals\n */\n equals(otherVector) {\n return otherVector && this._x === otherVector._x && this._y === otherVector._y && this._z === otherVector._z;\n }\n /**\n * Returns true if the current Vector3 and the given vector coordinates are distant less than epsilon\n * Example Playground https://playground.babylonjs.com/#R1F8YU#21\n * @param otherVector defines the second operand\n * @param epsilon defines the minimal distance to define values as equals\n * @returns true if both vectors are distant less than epsilon\n */\n equalsWithEpsilon(otherVector, epsilon = Epsilon) {\n return (otherVector &&\n Scalar.WithinEpsilon(this._x, otherVector._x, epsilon) &&\n Scalar.WithinEpsilon(this._y, otherVector._y, epsilon) &&\n Scalar.WithinEpsilon(this._z, otherVector._z, epsilon));\n }\n /**\n * Returns true if the current Vector3 coordinates equals the given floats\n * Example Playground https://playground.babylonjs.com/#R1F8YU#20\n * @param x defines the x coordinate of the operand\n * @param y defines the y coordinate of the operand\n * @param z defines the z coordinate of the operand\n * @returns true if both vectors are equal\n */\n equalsToFloats(x, y, z) {\n return this._x === x && this._y === y && this._z === z;\n }\n /**\n * Multiplies the current Vector3 coordinates by the given ones\n * Example Playground https://playground.babylonjs.com/#R1F8YU#32\n * @param otherVector defines the second operand\n * @returns the current updated Vector3\n */\n multiplyInPlace(otherVector) {\n this._x *= otherVector._x;\n this._y *= otherVector._y;\n this._z *= otherVector._z;\n this._isDirty = true;\n return this;\n }\n /**\n * Returns a new Vector3, result of the multiplication of the current Vector3 by the given vector\n * Example Playground https://playground.babylonjs.com/#R1F8YU#31\n * @param otherVector defines the second operand\n * @returns the new Vector3\n */\n multiply(otherVector) {\n return this.multiplyByFloats(otherVector._x, otherVector._y, otherVector._z);\n }\n /**\n * Multiplies the current Vector3 by the given one and stores the result in the given vector \"result\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#33\n * @param otherVector defines the second operand\n * @param result defines the Vector3 object where to store the result\n * @returns the result\n */\n multiplyToRef(otherVector, result) {\n return result.copyFromFloats(this._x * otherVector._x, this._y * otherVector._y, this._z * otherVector._z);\n }\n /**\n * Returns a new Vector3 set with the result of the multiplication of the current Vector3 coordinates by the given floats\n * Example Playground https://playground.babylonjs.com/#R1F8YU#34\n * @param x defines the x coordinate of the operand\n * @param y defines the y coordinate of the operand\n * @param z defines the z coordinate of the operand\n * @returns the new Vector3\n */\n multiplyByFloats(x, y, z) {\n return new this.constructor(this._x * x, this._y * y, this._z * z);\n }\n /**\n * Returns a new Vector3 set with the result of the division of the current Vector3 coordinates by the given ones\n * Example Playground https://playground.babylonjs.com/#R1F8YU#16\n * @param otherVector defines the second operand\n * @returns the new Vector3\n */\n divide(otherVector) {\n return new this.constructor(this._x / otherVector._x, this._y / otherVector._y, this._z / otherVector._z);\n }\n /**\n * Divides the current Vector3 coordinates by the given ones and stores the result in the given vector \"result\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#18\n * @param otherVector defines the second operand\n * @param result defines the Vector3 object where to store the result\n * @returns the result\n */\n divideToRef(otherVector, result) {\n return result.copyFromFloats(this._x / otherVector._x, this._y / otherVector._y, this._z / otherVector._z);\n }\n /**\n * Divides the current Vector3 coordinates by the given ones.\n * Example Playground https://playground.babylonjs.com/#R1F8YU#17\n * @param otherVector defines the second operand\n * @returns the current updated Vector3\n */\n divideInPlace(otherVector) {\n return this.divideToRef(otherVector, this);\n }\n /**\n * Updates the current Vector3 with the minimal coordinate values between its and the given vector ones\n * Example Playground https://playground.babylonjs.com/#R1F8YU#29\n * @param other defines the second operand\n * @returns the current updated Vector3\n */\n minimizeInPlace(other) {\n return this.minimizeInPlaceFromFloats(other._x, other._y, other._z);\n }\n /**\n * Updates the current Vector3 with the maximal coordinate values between its and the given vector ones.\n * Example Playground https://playground.babylonjs.com/#R1F8YU#27\n * @param other defines the second operand\n * @returns the current updated Vector3\n */\n maximizeInPlace(other) {\n return this.maximizeInPlaceFromFloats(other._x, other._y, other._z);\n }\n /**\n * Updates the current Vector3 with the minimal coordinate values between its and the given coordinates\n * Example Playground https://playground.babylonjs.com/#R1F8YU#30\n * @param x defines the x coordinate of the operand\n * @param y defines the y coordinate of the operand\n * @param z defines the z coordinate of the operand\n * @returns the current updated Vector3\n */\n minimizeInPlaceFromFloats(x, y, z) {\n if (x < this._x) {\n this.x = x;\n }\n if (y < this._y) {\n this.y = y;\n }\n if (z < this._z) {\n this.z = z;\n }\n return this;\n }\n /**\n * Updates the current Vector3 with the maximal coordinate values between its and the given coordinates.\n * Example Playground https://playground.babylonjs.com/#R1F8YU#28\n * @param x defines the x coordinate of the operand\n * @param y defines the y coordinate of the operand\n * @param z defines the z coordinate of the operand\n * @returns the current updated Vector3\n */\n maximizeInPlaceFromFloats(x, y, z) {\n if (x > this._x) {\n this.x = x;\n }\n if (y > this._y) {\n this.y = y;\n }\n if (z > this._z) {\n this.z = z;\n }\n return this;\n }\n /**\n * Due to float precision, scale of a mesh could be uniform but float values are off by a small fraction\n * Check if is non uniform within a certain amount of decimal places to account for this\n * @param epsilon the amount the values can differ\n * @returns if the vector is non uniform to a certain number of decimal places\n */\n isNonUniformWithinEpsilon(epsilon) {\n const absX = Math.abs(this._x);\n const absY = Math.abs(this._y);\n if (!Scalar.WithinEpsilon(absX, absY, epsilon)) {\n return true;\n }\n const absZ = Math.abs(this._z);\n if (!Scalar.WithinEpsilon(absX, absZ, epsilon)) {\n return true;\n }\n if (!Scalar.WithinEpsilon(absY, absZ, epsilon)) {\n return true;\n }\n return false;\n }\n /**\n * Gets a boolean indicating that the vector is non uniform meaning x, y or z are not all the same\n */\n get isNonUniform() {\n const absX = Math.abs(this._x);\n const absY = Math.abs(this._y);\n if (absX !== absY) {\n return true;\n }\n const absZ = Math.abs(this._z);\n if (absX !== absZ) {\n return true;\n }\n return false;\n }\n /**\n * Gets a new Vector3 from current Vector3 floored values\n * Example Playground https://playground.babylonjs.com/#R1F8YU#22\n * @returns a new Vector3\n */\n floor() {\n return new this.constructor(Math.floor(this._x), Math.floor(this._y), Math.floor(this._z));\n }\n /**\n * Gets a new Vector3 from current Vector3 fractional values\n * Example Playground https://playground.babylonjs.com/#R1F8YU#23\n * @returns a new Vector3\n */\n fract() {\n return new this.constructor(this._x - Math.floor(this._x), this._y - Math.floor(this._y), this._z - Math.floor(this._z));\n }\n // Properties\n /**\n * Gets the length of the Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#25\n * @returns the length of the Vector3\n */\n length() {\n return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z);\n }\n /**\n * Gets the squared length of the Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#26\n * @returns squared length of the Vector3\n */\n lengthSquared() {\n return this._x * this._x + this._y * this._y + this._z * this._z;\n }\n /**\n * Gets a boolean indicating if the vector contains a zero in one of its components\n * Example Playground https://playground.babylonjs.com/#R1F8YU#1\n */\n get hasAZeroComponent() {\n return this._x * this._y * this._z === 0;\n }\n /**\n * Normalize the current Vector3.\n * Please note that this is an in place operation.\n * Example Playground https://playground.babylonjs.com/#R1F8YU#122\n * @returns the current updated Vector3\n */\n normalize() {\n return this.normalizeFromLength(this.length());\n }\n /**\n * Reorders the x y z properties of the vector in place\n * Example Playground https://playground.babylonjs.com/#R1F8YU#44\n * @param order new ordering of the properties (eg. for vector 1,2,3 with \"ZYX\" will produce 3,2,1)\n * @returns the current updated vector\n */\n reorderInPlace(order) {\n order = order.toLowerCase();\n if (order === \"xyz\") {\n return this;\n }\n const tem = MathTmp.Vector3[0].copyFrom(this);\n this.x = tem[order[0]];\n this.y = tem[order[1]];\n this.z = tem[order[2]];\n return this;\n }\n /**\n * Rotates the vector around 0,0,0 by a quaternion\n * Example Playground https://playground.babylonjs.com/#R1F8YU#47\n * @param quaternion the rotation quaternion\n * @param result vector to store the result\n * @returns the resulting vector\n */\n rotateByQuaternionToRef(quaternion, result) {\n quaternion.toRotationMatrix(MathTmp.Matrix[0]);\n Vector3.TransformCoordinatesToRef(this, MathTmp.Matrix[0], result);\n return result;\n }\n /**\n * Rotates a vector around a given point\n * Example Playground https://playground.babylonjs.com/#R1F8YU#46\n * @param quaternion the rotation quaternion\n * @param point the point to rotate around\n * @param result vector to store the result\n * @returns the resulting vector\n */\n rotateByQuaternionAroundPointToRef(quaternion, point, result) {\n this.subtractToRef(point, MathTmp.Vector3[0]);\n MathTmp.Vector3[0].rotateByQuaternionToRef(quaternion, MathTmp.Vector3[0]);\n point.addToRef(MathTmp.Vector3[0], result);\n return result;\n }\n /**\n * Returns a new Vector3 as the cross product of the current vector and the \"other\" one\n * The cross product is then orthogonal to both current and \"other\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#14\n * @param other defines the right operand\n * @returns the cross product\n */\n cross(other) {\n const result = new this.constructor();\n return Vector3.CrossToRef(this, other, result);\n }\n /**\n * Normalize the current Vector3 with the given input length.\n * Please note that this is an in place operation.\n * Example Playground https://playground.babylonjs.com/#R1F8YU#123\n * @param len the length of the vector\n * @returns the current updated Vector3\n */\n normalizeFromLength(len) {\n if (len === 0 || len === 1.0) {\n return this;\n }\n return this.scaleInPlace(1.0 / len);\n }\n /**\n * Normalize the current Vector3 to a new vector\n * Example Playground https://playground.babylonjs.com/#R1F8YU#124\n * @returns the new Vector3\n */\n normalizeToNew() {\n const normalized = new this.constructor(0, 0, 0);\n this.normalizeToRef(normalized);\n return normalized;\n }\n /**\n * Normalize the current Vector3 to the reference\n * Example Playground https://playground.babylonjs.com/#R1F8YU#125\n * @param reference define the Vector3 to update\n * @returns the updated Vector3\n */\n normalizeToRef(reference) {\n const len = this.length();\n if (len === 0 || len === 1.0) {\n return reference.copyFromFloats(this._x, this._y, this._z);\n }\n return this.scaleToRef(1.0 / len, reference);\n }\n /**\n * Creates a new Vector3 copied from the current Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#11\n * @returns the new Vector3\n */\n clone() {\n return new this.constructor(this._x, this._y, this._z);\n }\n /**\n * Copies the given vector coordinates to the current Vector3 ones\n * Example Playground https://playground.babylonjs.com/#R1F8YU#12\n * @param source defines the source Vector3\n * @returns the current updated Vector3\n */\n copyFrom(source) {\n return this.copyFromFloats(source._x, source._y, source._z);\n }\n /**\n * Copies the given floats to the current Vector3 coordinates\n * Example Playground https://playground.babylonjs.com/#R1F8YU#13\n * @param x defines the x coordinate of the operand\n * @param y defines the y coordinate of the operand\n * @param z defines the z coordinate of the operand\n * @returns the current updated Vector3\n */\n copyFromFloats(x, y, z) {\n this._x = x;\n this._y = y;\n this._z = z;\n this._isDirty = true;\n return this;\n }\n /**\n * Copies the given floats to the current Vector3 coordinates\n * Example Playground https://playground.babylonjs.com/#R1F8YU#58\n * @param x defines the x coordinate of the operand\n * @param y defines the y coordinate of the operand\n * @param z defines the z coordinate of the operand\n * @returns the current updated Vector3\n */\n set(x, y, z) {\n return this.copyFromFloats(x, y, z);\n }\n /**\n * Copies the given float to the current Vector3 coordinates\n * Example Playground https://playground.babylonjs.com/#R1F8YU#59\n * @param v defines the x, y and z coordinates of the operand\n * @returns the current updated Vector3\n */\n setAll(v) {\n this._x = this._y = this._z = v;\n this._isDirty = true;\n return this;\n }\n // Statics\n /**\n * Get the clip factor between two vectors\n * Example Playground https://playground.babylonjs.com/#R1F8YU#126\n * @param vector0 defines the first operand\n * @param vector1 defines the second operand\n * @param axis defines the axis to use\n * @param size defines the size along the axis\n * @returns the clip factor\n */\n static GetClipFactor(vector0, vector1, axis, size) {\n const d0 = Vector3.Dot(vector0, axis);\n const d1 = Vector3.Dot(vector1, axis);\n return (d0 - size) / (d0 - d1);\n }\n /**\n * Get angle between two vectors\n * Example Playground https://playground.babylonjs.com/#R1F8YU#86\n * @param vector0 the starting point\n * @param vector1 the ending point\n * @param normal direction of the normal\n * @returns the angle between vector0 and vector1\n */\n static GetAngleBetweenVectors(vector0, vector1, normal) {\n const v0 = vector0.normalizeToRef(MathTmp.Vector3[1]);\n const v1 = vector1.normalizeToRef(MathTmp.Vector3[2]);\n let dot = Vector3.Dot(v0, v1);\n // Vectors are normalized so dot will be in [-1, 1] (aside precision issues enough to break the result which explains the below clamp)\n dot = Scalar.Clamp(dot, -1, 1);\n const angle = Math.acos(dot);\n const n = MathTmp.Vector3[3];\n Vector3.CrossToRef(v0, v1, n);\n if (Vector3.Dot(n, normal) > 0) {\n return isNaN(angle) ? 0 : angle;\n }\n return isNaN(angle) ? -Math.PI : -Math.acos(dot);\n }\n /**\n * Get angle between two vectors projected on a plane\n * Example Playground https://playground.babylonjs.com/#R1F8YU#87\n * Expectation compute time: 0.01 ms (median) and 0.02 ms (percentile 95%)\n * @param vector0 angle between vector0 and vector1\n * @param vector1 angle between vector0 and vector1\n * @param normal Normal of the projection plane\n * @returns the angle in radians (float) between vector0 and vector1 projected on the plane with the specified normal\n */\n static GetAngleBetweenVectorsOnPlane(vector0, vector1, normal) {\n MathTmp.Vector3[0].copyFrom(vector0);\n const v0 = MathTmp.Vector3[0];\n MathTmp.Vector3[1].copyFrom(vector1);\n const v1 = MathTmp.Vector3[1];\n MathTmp.Vector3[2].copyFrom(normal);\n const vNormal = MathTmp.Vector3[2];\n const right = MathTmp.Vector3[3];\n const forward = MathTmp.Vector3[4];\n v0.normalize();\n v1.normalize();\n vNormal.normalize();\n Vector3.CrossToRef(vNormal, v0, right);\n Vector3.CrossToRef(right, vNormal, forward);\n const angle = Math.atan2(Vector3.Dot(v1, right), Vector3.Dot(v1, forward));\n return Scalar.NormalizeRadians(angle);\n }\n /**\n * Gets the rotation that aligns the roll axis (Y) to the line joining the start point to the target point and stores it in the ref Vector3\n * Example PG https://playground.babylonjs.com/#R1F8YU#189\n * @param start the starting point\n * @param target the target point\n * @param ref the vector3 to store the result\n * @returns ref in the form (pitch, yaw, 0)\n */\n static PitchYawRollToMoveBetweenPointsToRef(start, target, ref) {\n const diff = TmpVectors.Vector3[0];\n target.subtractToRef(start, diff);\n ref._y = Math.atan2(diff.x, diff.z) || 0;\n ref._x = Math.atan2(Math.sqrt(diff.x ** 2 + diff.z ** 2), diff.y) || 0;\n ref._z = 0;\n ref._isDirty = true;\n return ref;\n }\n /**\n * Gets the rotation that aligns the roll axis (Y) to the line joining the start point to the target point\n * Example PG https://playground.babylonjs.com/#R1F8YU#188\n * @param start the starting point\n * @param target the target point\n * @returns the rotation in the form (pitch, yaw, 0)\n */\n static PitchYawRollToMoveBetweenPoints(start, target) {\n const ref = Vector3.Zero();\n return Vector3.PitchYawRollToMoveBetweenPointsToRef(start, target, ref);\n }\n /**\n * Slerp between two vectors. See also `SmoothToRef`\n * Slerp is a spherical linear interpolation\n * giving a slow in and out effect\n * Example Playground 1 https://playground.babylonjs.com/#R1F8YU#108\n * Example Playground 2 https://playground.babylonjs.com/#R1F8YU#109\n * @param vector0 Start vector\n * @param vector1 End vector\n * @param slerp amount (will be clamped between 0 and 1)\n * @param result The slerped vector\n */\n static SlerpToRef(vector0, vector1, slerp, result) {\n slerp = Scalar.Clamp(slerp, 0, 1);\n const vector0Dir = MathTmp.Vector3[0];\n const vector1Dir = MathTmp.Vector3[1];\n vector0Dir.copyFrom(vector0);\n const vector0Length = vector0Dir.length();\n vector0Dir.normalizeFromLength(vector0Length);\n vector1Dir.copyFrom(vector1);\n const vector1Length = vector1Dir.length();\n vector1Dir.normalizeFromLength(vector1Length);\n const dot = Vector3.Dot(vector0Dir, vector1Dir);\n let scale0;\n let scale1;\n if (dot < 1 - Epsilon) {\n const omega = Math.acos(dot);\n const invSin = 1 / Math.sin(omega);\n scale0 = Math.sin((1 - slerp) * omega) * invSin;\n scale1 = Math.sin(slerp * omega) * invSin;\n }\n else {\n // Use linear interpolation\n scale0 = 1 - slerp;\n scale1 = slerp;\n }\n vector0Dir.scaleInPlace(scale0);\n vector1Dir.scaleInPlace(scale1);\n result.copyFrom(vector0Dir).addInPlace(vector1Dir);\n result.scaleInPlace(Scalar.Lerp(vector0Length, vector1Length, slerp));\n return result;\n }\n /**\n * Smooth interpolation between two vectors using Slerp\n * Example Playground https://playground.babylonjs.com/#R1F8YU#110\n * @param source source vector\n * @param goal goal vector\n * @param deltaTime current interpolation frame\n * @param lerpTime total interpolation time\n * @param result the smoothed vector\n */\n static SmoothToRef(source, goal, deltaTime, lerpTime, result) {\n Vector3.SlerpToRef(source, goal, lerpTime === 0 ? 1 : deltaTime / lerpTime, result);\n return result;\n }\n /**\n * Returns a new Vector3 set from the index \"offset\" of the given array\n * Example Playground https://playground.babylonjs.com/#R1F8YU#83\n * @param array defines the source array\n * @param offset defines the offset in the source array\n * @returns the new Vector3\n */\n static FromArray(array, offset = 0) {\n return new Vector3(array[offset], array[offset + 1], array[offset + 2]);\n }\n /**\n * Returns a new Vector3 set from the index \"offset\" of the given Float32Array\n * @param array defines the source array\n * @param offset defines the offset in the source array\n * @returns the new Vector3\n * @deprecated Please use FromArray instead.\n */\n static FromFloatArray(array, offset) {\n return Vector3.FromArray(array, offset);\n }\n /**\n * Sets the given vector \"result\" with the element values from the index \"offset\" of the given array\n * Example Playground https://playground.babylonjs.com/#R1F8YU#84\n * @param array defines the source array\n * @param offset defines the offset in the source array\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n static FromArrayToRef(array, offset, result) {\n result._x = array[offset];\n result._y = array[offset + 1];\n result._z = array[offset + 2];\n result._isDirty = true;\n return result;\n }\n /**\n * Sets the given vector \"result\" with the element values from the index \"offset\" of the given Float32Array\n * @param array defines the source array\n * @param offset defines the offset in the source array\n * @param result defines the Vector3 where to store the result\n * @deprecated Please use FromArrayToRef instead.\n */\n static FromFloatArrayToRef(array, offset, result) {\n return Vector3.FromArrayToRef(array, offset, result);\n }\n /**\n * Sets the given vector \"result\" with the given floats.\n * Example Playground https://playground.babylonjs.com/#R1F8YU#85\n * @param x defines the x coordinate of the source\n * @param y defines the y coordinate of the source\n * @param z defines the z coordinate of the source\n * @param result defines the Vector3 where to store the result\n */\n static FromFloatsToRef(x, y, z, result) {\n result.copyFromFloats(x, y, z);\n return result;\n }\n /**\n * Returns a new Vector3 set to (0.0, 0.0, 0.0)\n * @returns a new empty Vector3\n */\n static Zero() {\n return new Vector3(0.0, 0.0, 0.0);\n }\n /**\n * Returns a new Vector3 set to (1.0, 1.0, 1.0)\n * @returns a new Vector3\n */\n static One() {\n return new Vector3(1.0, 1.0, 1.0);\n }\n /**\n * Returns a new Vector3 set to (0.0, 1.0, 0.0)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#71\n * @returns a new up Vector3\n */\n static Up() {\n return new Vector3(0.0, 1.0, 0.0);\n }\n /**\n * Gets an up Vector3 that must not be updated\n */\n static get UpReadOnly() {\n return Vector3._UpReadOnly;\n }\n /**\n * Gets a down Vector3 that must not be updated\n */\n static get DownReadOnly() {\n return Vector3._DownReadOnly;\n }\n /**\n * Gets a right Vector3 that must not be updated\n */\n static get RightReadOnly() {\n return Vector3._RightReadOnly;\n }\n /**\n * Gets a left Vector3 that must not be updated\n */\n static get LeftReadOnly() {\n return Vector3._LeftReadOnly;\n }\n /**\n * Gets a forward Vector3 that must not be updated\n */\n static get LeftHandedForwardReadOnly() {\n return Vector3._LeftHandedForwardReadOnly;\n }\n /**\n * Gets a forward Vector3 that must not be updated\n */\n static get RightHandedForwardReadOnly() {\n return Vector3._RightHandedForwardReadOnly;\n }\n /**\n * Gets a backward Vector3 that must not be updated\n */\n static get LeftHandedBackwardReadOnly() {\n return Vector3._LeftHandedBackwardReadOnly;\n }\n /**\n * Gets a backward Vector3 that must not be updated\n */\n static get RightHandedBackwardReadOnly() {\n return Vector3._RightHandedBackwardReadOnly;\n }\n /**\n * Gets a zero Vector3 that must not be updated\n */\n static get ZeroReadOnly() {\n return Vector3._ZeroReadOnly;\n }\n /**\n * Gets a one Vector3 that must not be updated\n */\n static get OneReadOnly() {\n return Vector3._OneReadOnly;\n }\n /**\n * Returns a new Vector3 set to (0.0, -1.0, 0.0)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#71\n * @returns a new down Vector3\n */\n static Down() {\n return new Vector3(0.0, -1.0, 0.0);\n }\n /**\n * Returns a new Vector3 set to (0.0, 0.0, 1.0)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#71\n * @param rightHandedSystem is the scene right-handed (negative z)\n * @returns a new forward Vector3\n */\n static Forward(rightHandedSystem = false) {\n return new Vector3(0.0, 0.0, rightHandedSystem ? -1.0 : 1.0);\n }\n /**\n * Returns a new Vector3 set to (0.0, 0.0, -1.0)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#71\n * @param rightHandedSystem is the scene right-handed (negative-z)\n * @returns a new Backward Vector3\n */\n static Backward(rightHandedSystem = false) {\n return new Vector3(0.0, 0.0, rightHandedSystem ? 1.0 : -1.0);\n }\n /**\n * Returns a new Vector3 set to (1.0, 0.0, 0.0)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#71\n * @returns a new right Vector3\n */\n static Right() {\n return new Vector3(1.0, 0.0, 0.0);\n }\n /**\n * Returns a new Vector3 set to (-1.0, 0.0, 0.0)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#71\n * @returns a new left Vector3\n */\n static Left() {\n return new Vector3(-1.0, 0.0, 0.0);\n }\n /**\n * Returns a new Vector3 with random values between min and max\n * @param min the minimum random value\n * @param max the maximum random value\n * @returns a Vector3 with random values between min and max\n */\n static Random(min = 0, max = 1) {\n return new Vector3(Scalar.RandomRange(min, max), Scalar.RandomRange(min, max), Scalar.RandomRange(min, max));\n }\n /**\n * Returns a new Vector3 set with the result of the transformation by the given matrix of the given vector.\n * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#111\n * @param vector defines the Vector3 to transform\n * @param transformation defines the transformation matrix\n * @returns the transformed Vector3\n */\n static TransformCoordinates(vector, transformation) {\n const result = Vector3.Zero();\n Vector3.TransformCoordinatesToRef(vector, transformation, result);\n return result;\n }\n /**\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given vector\n * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#113\n * @param vector defines the Vector3 to transform\n * @param transformation defines the transformation matrix\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n static TransformCoordinatesToRef(vector, transformation, result) {\n Vector3.TransformCoordinatesFromFloatsToRef(vector._x, vector._y, vector._z, transformation, result);\n return result;\n }\n /**\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z)\n * This method computes transformed coordinates only, not transformed direction vectors\n * Example Playground https://playground.babylonjs.com/#R1F8YU#115\n * @param x define the x coordinate of the source vector\n * @param y define the y coordinate of the source vector\n * @param z define the z coordinate of the source vector\n * @param transformation defines the transformation matrix\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n static TransformCoordinatesFromFloatsToRef(x, y, z, transformation, result) {\n const m = transformation.m;\n const rx = x * m[0] + y * m[4] + z * m[8] + m[12];\n const ry = x * m[1] + y * m[5] + z * m[9] + m[13];\n const rz = x * m[2] + y * m[6] + z * m[10] + m[14];\n const rw = 1 / (x * m[3] + y * m[7] + z * m[11] + m[15]);\n result._x = rx * rw;\n result._y = ry * rw;\n result._z = rz * rw;\n result._isDirty = true;\n return result;\n }\n /**\n * Returns a new Vector3 set with the result of the normal transformation by the given matrix of the given vector\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#112\n * @param vector defines the Vector3 to transform\n * @param transformation defines the transformation matrix\n * @returns the new Vector3\n */\n static TransformNormal(vector, transformation) {\n const result = Vector3.Zero();\n Vector3.TransformNormalToRef(vector, transformation, result);\n return result;\n }\n /**\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given vector\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#114\n * @param vector defines the Vector3 to transform\n * @param transformation defines the transformation matrix\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n static TransformNormalToRef(vector, transformation, result) {\n this.TransformNormalFromFloatsToRef(vector._x, vector._y, vector._z, transformation, result);\n return result;\n }\n /**\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given floats (x, y, z)\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\n * Example Playground https://playground.babylonjs.com/#R1F8YU#116\n * @param x define the x coordinate of the source vector\n * @param y define the y coordinate of the source vector\n * @param z define the z coordinate of the source vector\n * @param transformation defines the transformation matrix\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n static TransformNormalFromFloatsToRef(x, y, z, transformation, result) {\n const m = transformation.m;\n result._x = x * m[0] + y * m[4] + z * m[8];\n result._y = x * m[1] + y * m[5] + z * m[9];\n result._z = x * m[2] + y * m[6] + z * m[10];\n result._isDirty = true;\n return result;\n }\n /**\n * Returns a new Vector3 located for \"amount\" on the CatmullRom interpolation spline defined by the vectors \"value1\", \"value2\", \"value3\", \"value4\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#69\n * @param value1 defines the first control point\n * @param value2 defines the second control point\n * @param value3 defines the third control point\n * @param value4 defines the fourth control point\n * @param amount defines the amount on the spline to use\n * @returns the new Vector3\n */\n static CatmullRom(value1, value2, value3, value4, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const x = 0.5 *\n (2.0 * value2._x +\n (-value1._x + value3._x) * amount +\n (2.0 * value1._x - 5.0 * value2._x + 4.0 * value3._x - value4._x) * squared +\n (-value1._x + 3.0 * value2._x - 3.0 * value3._x + value4._x) * cubed);\n const y = 0.5 *\n (2.0 * value2._y +\n (-value1._y + value3._y) * amount +\n (2.0 * value1._y - 5.0 * value2._y + 4.0 * value3._y - value4._y) * squared +\n (-value1._y + 3.0 * value2._y - 3.0 * value3._y + value4._y) * cubed);\n const z = 0.5 *\n (2.0 * value2._z +\n (-value1._z + value3._z) * amount +\n (2.0 * value1._z - 5.0 * value2._z + 4.0 * value3._z - value4._z) * squared +\n (-value1._z + 3.0 * value2._z - 3.0 * value3._z + value4._z) * cubed);\n return new value1.constructor(x, y, z);\n }\n /**\n * Returns a new Vector3 set with the coordinates of \"value\", if the vector \"value\" is in the cube defined by the vectors \"min\" and \"max\"\n * If a coordinate value of \"value\" is lower than one of the \"min\" coordinate, then this \"value\" coordinate is set with the \"min\" one\n * If a coordinate value of \"value\" is greater than one of the \"max\" coordinate, then this \"value\" coordinate is set with the \"max\" one\n * Example Playground https://playground.babylonjs.com/#R1F8YU#76\n * @param value defines the current value\n * @param min defines the lower range value\n * @param max defines the upper range value\n * @returns the new Vector3\n */\n static Clamp(value, min, max) {\n const result = new value.constructor();\n Vector3.ClampToRef(value, min, max, result);\n return result;\n }\n /**\n * Sets the given vector \"result\" with the coordinates of \"value\", if the vector \"value\" is in the cube defined by the vectors \"min\" and \"max\"\n * If a coordinate value of \"value\" is lower than one of the \"min\" coordinate, then this \"value\" coordinate is set with the \"min\" one\n * If a coordinate value of \"value\" is greater than one of the \"max\" coordinate, then this \"value\" coordinate is set with the \"max\" one\n * Example Playground https://playground.babylonjs.com/#R1F8YU#77\n * @param value defines the current value\n * @param min defines the lower range value\n * @param max defines the upper range value\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n static ClampToRef(value, min, max, result) {\n let x = value._x;\n x = x > max._x ? max._x : x;\n x = x < min._x ? min._x : x;\n let y = value._y;\n y = y > max._y ? max._y : y;\n y = y < min._y ? min._y : y;\n let z = value._z;\n z = z > max._z ? max._z : z;\n z = z < min._z ? min._z : z;\n result.copyFromFloats(x, y, z);\n return result;\n }\n /**\n * Checks if a given vector is inside a specific range\n * Example Playground https://playground.babylonjs.com/#R1F8YU#75\n * @param v defines the vector to test\n * @param min defines the minimum range\n * @param max defines the maximum range\n */\n static CheckExtends(v, min, max) {\n min.minimizeInPlace(v);\n max.maximizeInPlace(v);\n }\n /**\n * Returns a new Vector3 located for \"amount\" (float) on the Hermite interpolation spline defined by the vectors \"value1\", \"tangent1\", \"value2\", \"tangent2\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#89\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent vector\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent vector\n * @param amount defines the amount on the interpolation spline (between 0 and 1)\n * @returns the new Vector3\n */\n static Hermite(value1, tangent1, value2, tangent2, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\n const part2 = -2.0 * cubed + 3.0 * squared;\n const part3 = cubed - 2.0 * squared + amount;\n const part4 = cubed - squared;\n const x = value1._x * part1 + value2._x * part2 + tangent1._x * part3 + tangent2._x * part4;\n const y = value1._y * part1 + value2._y * part2 + tangent1._y * part3 + tangent2._y * part4;\n const z = value1._z * part1 + value2._z * part2 + tangent1._z * part3 + tangent2._z * part4;\n return new value1.constructor(x, y, z);\n }\n /**\n * Returns a new Vector3 which is the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\n * Example Playground https://playground.babylonjs.com/#R1F8YU#90\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param time define where the derivative must be done\n * @returns 1st derivative\n */\n static Hermite1stDerivative(value1, tangent1, value2, tangent2, time) {\n const result = new value1.constructor();\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\n return result;\n }\n /**\n * Update a Vector3 with the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\n * Example Playground https://playground.babylonjs.com/#R1F8YU#91\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param time define where the derivative must be done\n * @param result define where to store the derivative\n * @returns result input\n */\n static Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result) {\n const t2 = time * time;\n result._x = (t2 - time) * 6 * value1._x + (3 * t2 - 4 * time + 1) * tangent1._x + (-t2 + time) * 6 * value2._x + (3 * t2 - 2 * time) * tangent2._x;\n result._y = (t2 - time) * 6 * value1._y + (3 * t2 - 4 * time + 1) * tangent1._y + (-t2 + time) * 6 * value2._y + (3 * t2 - 2 * time) * tangent2._y;\n result._z = (t2 - time) * 6 * value1._z + (3 * t2 - 4 * time + 1) * tangent1._z + (-t2 + time) * 6 * value2._z + (3 * t2 - 2 * time) * tangent2._z;\n result._isDirty = true;\n return result;\n }\n /**\n * Returns a new Vector3 located for \"amount\" (float) on the linear interpolation between the vectors \"start\" and \"end\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#95\n * @param start defines the start value\n * @param end defines the end value\n * @param amount max defines amount between both (between 0 and 1)\n * @returns the new Vector3\n */\n static Lerp(start, end, amount) {\n const result = new start.constructor(0, 0, 0);\n Vector3.LerpToRef(start, end, amount, result);\n return result;\n }\n /**\n * Sets the given vector \"result\" with the result of the linear interpolation from the vector \"start\" for \"amount\" to the vector \"end\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#93\n * @param start defines the start value\n * @param end defines the end value\n * @param amount max defines amount between both (between 0 and 1)\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n static LerpToRef(start, end, amount, result) {\n result._x = start._x + (end._x - start._x) * amount;\n result._y = start._y + (end._y - start._y) * amount;\n result._z = start._z + (end._z - start._z) * amount;\n result._isDirty = true;\n return result;\n }\n /**\n * Returns the dot product (float) between the vectors \"left\" and \"right\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#82\n * @param left defines the left operand\n * @param right defines the right operand\n * @returns the dot product\n */\n static Dot(left, right) {\n return left._x * right._x + left._y * right._y + left._z * right._z;\n }\n /**\n * Returns the dot product (float) between the current vectors and \"otherVector\"\n * @param otherVector defines the right operand\n * @returns the dot product\n */\n dot(otherVector) {\n return this._x * otherVector._x + this._y * otherVector._y + this._z * otherVector._z;\n }\n /**\n * Returns a new Vector3 as the cross product of the vectors \"left\" and \"right\"\n * The cross product is then orthogonal to both \"left\" and \"right\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#15\n * @param left defines the left operand\n * @param right defines the right operand\n * @returns the cross product\n */\n static Cross(left, right) {\n const result = new left.constructor();\n Vector3.CrossToRef(left, right, result);\n return result;\n }\n /**\n * Sets the given vector \"result\" with the cross product of \"left\" and \"right\"\n * The cross product is then orthogonal to both \"left\" and \"right\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#78\n * @param left defines the left operand\n * @param right defines the right operand\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n static CrossToRef(left, right, result) {\n const x = left._y * right._z - left._z * right._y;\n const y = left._z * right._x - left._x * right._z;\n const z = left._x * right._y - left._y * right._x;\n result.copyFromFloats(x, y, z);\n return result;\n }\n /**\n * Returns a new Vector3 as the normalization of the given vector\n * Example Playground https://playground.babylonjs.com/#R1F8YU#98\n * @param vector defines the Vector3 to normalize\n * @returns the new Vector3\n */\n static Normalize(vector) {\n const result = Vector3.Zero();\n Vector3.NormalizeToRef(vector, result);\n return result;\n }\n /**\n * Sets the given vector \"result\" with the normalization of the given first vector\n * Example Playground https://playground.babylonjs.com/#R1F8YU#98\n * @param vector defines the Vector3 to normalize\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n static NormalizeToRef(vector, result) {\n vector.normalizeToRef(result);\n return result;\n }\n /**\n * Project a Vector3 onto screen space\n * Example Playground https://playground.babylonjs.com/#R1F8YU#101\n * @param vector defines the Vector3 to project\n * @param world defines the world matrix to use\n * @param transform defines the transform (view x projection) matrix to use\n * @param viewport defines the screen viewport to use\n * @returns the new Vector3\n */\n static Project(vector, world, transform, viewport) {\n const result = new vector.constructor();\n Vector3.ProjectToRef(vector, world, transform, viewport, result);\n return result;\n }\n /**\n * Project a Vector3 onto screen space to reference\n * Example Playground https://playground.babylonjs.com/#R1F8YU#102\n * @param vector defines the Vector3 to project\n * @param world defines the world matrix to use\n * @param transform defines the transform (view x projection) matrix to use\n * @param viewport defines the screen viewport to use\n * @param result the vector in which the screen space will be stored\n * @returns result input\n */\n static ProjectToRef(vector, world, transform, viewport, result) {\n const cw = viewport.width;\n const ch = viewport.height;\n const cx = viewport.x;\n const cy = viewport.y;\n const viewportMatrix = MathTmp.Matrix[1];\n Matrix.FromValuesToRef(cw / 2.0, 0, 0, 0, 0, -ch / 2.0, 0, 0, 0, 0, 0.5, 0, cx + cw / 2.0, ch / 2.0 + cy, 0.5, 1, viewportMatrix);\n const matrix = MathTmp.Matrix[0];\n world.multiplyToRef(transform, matrix);\n matrix.multiplyToRef(viewportMatrix, matrix);\n Vector3.TransformCoordinatesToRef(vector, matrix, result);\n return result;\n }\n /**\n * Reflects a vector off the plane defined by a normalized normal\n * @param inDirection defines the vector direction\n * @param normal defines the normal - Must be normalized\n * @returns the resulting vector\n */\n static Reflect(inDirection, normal) {\n return this.ReflectToRef(inDirection, normal, new Vector3());\n }\n /**\n * Reflects a vector off the plane defined by a normalized normal to reference\n * @param inDirection defines the vector direction\n * @param normal defines the normal - Must be normalized\n * @param result defines the Vector3 where to store the result\n * @returns the resulting vector\n */\n static ReflectToRef(inDirection, normal, ref) {\n const tmp = TmpVectors.Vector3[0];\n tmp.copyFrom(normal).scaleInPlace(2 * Vector3.Dot(inDirection, normal));\n return ref.copyFrom(inDirection).subtractInPlace(tmp);\n }\n /**\n * @internal\n */\n static _UnprojectFromInvertedMatrixToRef(source, matrix, result) {\n Vector3.TransformCoordinatesToRef(source, matrix, result);\n const m = matrix.m;\n const num = source._x * m[3] + source._y * m[7] + source._z * m[11] + m[15];\n if (Scalar.WithinEpsilon(num, 1.0)) {\n result.scaleInPlace(1.0 / num);\n }\n return result;\n }\n /**\n * Unproject from screen space to object space\n * Example Playground https://playground.babylonjs.com/#R1F8YU#121\n * @param source defines the screen space Vector3 to use\n * @param viewportWidth defines the current width of the viewport\n * @param viewportHeight defines the current height of the viewport\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\n * @param transform defines the transform (view x projection) matrix to use\n * @returns the new Vector3\n */\n static UnprojectFromTransform(source, viewportWidth, viewportHeight, world, transform) {\n return this.Unproject(source, viewportWidth, viewportHeight, world, transform, Matrix.IdentityReadOnly);\n }\n /**\n * Unproject from screen space to object space\n * Example Playground https://playground.babylonjs.com/#R1F8YU#117\n * @param source defines the screen space Vector3 to use\n * @param viewportWidth defines the current width of the viewport\n * @param viewportHeight defines the current height of the viewport\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\n * @param view defines the view matrix to use\n * @param projection defines the projection matrix to use\n * @returns the new Vector3\n */\n static Unproject(source, viewportWidth, viewportHeight, world, view, projection) {\n const result = new source.constructor();\n Vector3.UnprojectToRef(source, viewportWidth, viewportHeight, world, view, projection, result);\n return result;\n }\n /**\n * Unproject from screen space to object space\n * Example Playground https://playground.babylonjs.com/#R1F8YU#119\n * @param source defines the screen space Vector3 to use\n * @param viewportWidth defines the current width of the viewport\n * @param viewportHeight defines the current height of the viewport\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\n * @param view defines the view matrix to use\n * @param projection defines the projection matrix to use\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n static UnprojectToRef(source, viewportWidth, viewportHeight, world, view, projection, result) {\n Vector3.UnprojectFloatsToRef(source._x, source._y, source._z, viewportWidth, viewportHeight, world, view, projection, result);\n return result;\n }\n /**\n * Unproject from screen space to object space\n * Example Playground https://playground.babylonjs.com/#R1F8YU#120\n * @param sourceX defines the screen space x coordinate to use\n * @param sourceY defines the screen space y coordinate to use\n * @param sourceZ defines the screen space z coordinate to use\n * @param viewportWidth defines the current width of the viewport\n * @param viewportHeight defines the current height of the viewport\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\n * @param view defines the view matrix to use\n * @param projection defines the projection matrix to use\n * @param result defines the Vector3 where to store the result\n * @returns result input\n */\n static UnprojectFloatsToRef(sourceX, sourceY, sourceZ, viewportWidth, viewportHeight, world, view, projection, result) {\n var _a;\n const matrix = MathTmp.Matrix[0];\n world.multiplyToRef(view, matrix);\n matrix.multiplyToRef(projection, matrix);\n matrix.invert();\n const screenSource = MathTmp.Vector3[0];\n screenSource.x = (sourceX / viewportWidth) * 2 - 1;\n screenSource.y = -((sourceY / viewportHeight) * 2 - 1);\n if ((_a = EngineStore.LastCreatedEngine) === null || _a === void 0 ? void 0 : _a.isNDCHalfZRange) {\n screenSource.z = sourceZ;\n }\n else {\n screenSource.z = 2 * sourceZ - 1.0;\n }\n Vector3._UnprojectFromInvertedMatrixToRef(screenSource, matrix, result);\n return result;\n }\n /**\n * Gets the minimal coordinate values between two Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#97\n * @param left defines the first operand\n * @param right defines the second operand\n * @returns the new Vector3\n */\n static Minimize(left, right) {\n const min = new left.constructor();\n min.copyFrom(left);\n min.minimizeInPlace(right);\n return min;\n }\n /**\n * Gets the maximal coordinate values between two Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#96\n * @param left defines the first operand\n * @param right defines the second operand\n * @returns the new Vector3\n */\n static Maximize(left, right) {\n const max = new left.constructor();\n max.copyFrom(left);\n max.maximizeInPlace(right);\n return max;\n }\n /**\n * Returns the distance between the vectors \"value1\" and \"value2\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#81\n * @param value1 defines the first operand\n * @param value2 defines the second operand\n * @returns the distance\n */\n static Distance(value1, value2) {\n return Math.sqrt(Vector3.DistanceSquared(value1, value2));\n }\n /**\n * Returns the squared distance between the vectors \"value1\" and \"value2\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#80\n * @param value1 defines the first operand\n * @param value2 defines the second operand\n * @returns the squared distance\n */\n static DistanceSquared(value1, value2) {\n const x = value1._x - value2._x;\n const y = value1._y - value2._y;\n const z = value1._z - value2._z;\n return x * x + y * y + z * z;\n }\n /**\n * Projects \"vector\" on the triangle determined by its extremities \"p0\", \"p1\" and \"p2\", stores the result in \"ref\"\n * and returns the distance to the projected point.\n * Example Playground https://playground.babylonjs.com/#R1F8YU#104\n * From http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.104.4264&rep=rep1&type=pdf\n *\n * @param vector the vector to get distance from\n * @param p0 extremity of the triangle\n * @param p1 extremity of the triangle\n * @param p2 extremity of the triangle\n * @param ref variable to store the result to\n * @returns The distance between \"ref\" and \"vector\"\n */\n static ProjectOnTriangleToRef(vector, p0, p1, p2, ref) {\n const p1p0 = MathTmp.Vector3[0];\n const p2p0 = MathTmp.Vector3[1];\n const p2p1 = MathTmp.Vector3[2];\n const normal = MathTmp.Vector3[3];\n const vectorp0 = MathTmp.Vector3[4];\n // Triangle vectors\n p1.subtractToRef(p0, p1p0);\n p2.subtractToRef(p0, p2p0);\n p2.subtractToRef(p1, p2p1);\n const p1p0L = p1p0.length();\n const p2p0L = p2p0.length();\n const p2p1L = p2p1.length();\n if (p1p0L < Epsilon || p2p0L < Epsilon || p2p1L < Epsilon) {\n // This is a degenerate triangle. As we assume this is part of a non-degenerate mesh,\n // we will find a better intersection later.\n // Let's just return one of the extremities\n ref.copyFrom(p0);\n return Vector3.Distance(vector, p0);\n }\n // Compute normal and vector to p0\n vector.subtractToRef(p0, vectorp0);\n Vector3.CrossToRef(p1p0, p2p0, normal);\n const nl = normal.length();\n if (nl < Epsilon) {\n // Extremities are aligned, we are back on the case of a degenerate triangle\n ref.copyFrom(p0);\n return Vector3.Distance(vector, p0);\n }\n normal.normalizeFromLength(nl);\n let l = vectorp0.length();\n if (l < Epsilon) {\n // Vector is p0\n ref.copyFrom(p0);\n return 0;\n }\n vectorp0.normalizeFromLength(l);\n // Project to \"proj\" that lies on the triangle plane\n const cosA = Vector3.Dot(normal, vectorp0);\n const projVector = MathTmp.Vector3[5];\n const proj = MathTmp.Vector3[6];\n projVector.copyFrom(normal).scaleInPlace(-l * cosA);\n proj.copyFrom(vector).addInPlace(projVector);\n // Compute barycentric coordinates (v0, v1 and v2 are axis from barycenter to extremities)\n const v0 = MathTmp.Vector3[4];\n const v1 = MathTmp.Vector3[5];\n const v2 = MathTmp.Vector3[7];\n const tmp = MathTmp.Vector3[8];\n v0.copyFrom(p1p0).scaleInPlace(1 / p1p0L);\n tmp.copyFrom(p2p0).scaleInPlace(1 / p2p0L);\n v0.addInPlace(tmp).scaleInPlace(-1);\n v1.copyFrom(p1p0).scaleInPlace(-1 / p1p0L);\n tmp.copyFrom(p2p1).scaleInPlace(1 / p2p1L);\n v1.addInPlace(tmp).scaleInPlace(-1);\n v2.copyFrom(p2p1).scaleInPlace(-1 / p2p1L);\n tmp.copyFrom(p2p0).scaleInPlace(-1 / p2p0L);\n v2.addInPlace(tmp).scaleInPlace(-1);\n // Determines which edge of the triangle is closest to \"proj\"\n const projP = MathTmp.Vector3[9];\n let dot;\n projP.copyFrom(proj).subtractInPlace(p0);\n Vector3.CrossToRef(v0, projP, tmp);\n dot = Vector3.Dot(tmp, normal);\n const s0 = dot;\n projP.copyFrom(proj).subtractInPlace(p1);\n Vector3.CrossToRef(v1, projP, tmp);\n dot = Vector3.Dot(tmp, normal);\n const s1 = dot;\n projP.copyFrom(proj).subtractInPlace(p2);\n Vector3.CrossToRef(v2, projP, tmp);\n dot = Vector3.Dot(tmp, normal);\n const s2 = dot;\n const edge = MathTmp.Vector3[10];\n let e0, e1;\n if (s0 > 0 && s1 < 0) {\n edge.copyFrom(p1p0);\n e0 = p0;\n e1 = p1;\n }\n else if (s1 > 0 && s2 < 0) {\n edge.copyFrom(p2p1);\n e0 = p1;\n e1 = p2;\n }\n else {\n edge.copyFrom(p2p0).scaleInPlace(-1);\n e0 = p2;\n e1 = p0;\n }\n // Determines if \"proj\" lies inside the triangle\n const tmp2 = MathTmp.Vector3[9];\n const tmp3 = MathTmp.Vector3[4];\n e0.subtractToRef(proj, tmp);\n e1.subtractToRef(proj, tmp2);\n Vector3.CrossToRef(tmp, tmp2, tmp3);\n const isOutside = Vector3.Dot(tmp3, normal) < 0;\n // If inside, we already found the projected point, \"proj\"\n if (!isOutside) {\n ref.copyFrom(proj);\n return Math.abs(l * cosA);\n }\n // If outside, we find \"triProj\", the closest point from \"proj\" on the closest edge\n const r = MathTmp.Vector3[5];\n Vector3.CrossToRef(edge, tmp3, r);\n r.normalize();\n const e0proj = MathTmp.Vector3[9];\n e0proj.copyFrom(e0).subtractInPlace(proj);\n const e0projL = e0proj.length();\n if (e0projL < Epsilon) {\n // Proj is e0\n ref.copyFrom(e0);\n return Vector3.Distance(vector, e0);\n }\n e0proj.normalizeFromLength(e0projL);\n const cosG = Vector3.Dot(r, e0proj);\n const triProj = MathTmp.Vector3[7];\n triProj.copyFrom(proj).addInPlace(r.scaleInPlace(e0projL * cosG));\n // Now we clamp \"triProj\" so it lies between e0 and e1\n tmp.copyFrom(triProj).subtractInPlace(e0);\n l = edge.length();\n edge.normalizeFromLength(l);\n let t = Vector3.Dot(tmp, edge) / Math.max(l, Epsilon);\n t = Scalar.Clamp(t, 0, 1);\n triProj.copyFrom(e0).addInPlace(edge.scaleInPlace(t * l));\n ref.copyFrom(triProj);\n return Vector3.Distance(vector, triProj);\n }\n /**\n * Returns a new Vector3 located at the center between \"value1\" and \"value2\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#72\n * @param value1 defines the first operand\n * @param value2 defines the second operand\n * @returns the new Vector3\n */\n static Center(value1, value2) {\n return Vector3.CenterToRef(value1, value2, Vector3.Zero());\n }\n /**\n * Gets the center of the vectors \"value1\" and \"value2\" and stores the result in the vector \"ref\"\n * Example Playground https://playground.babylonjs.com/#R1F8YU#73\n * @param value1 defines first vector\n * @param value2 defines second vector\n * @param ref defines third vector\n * @returns ref\n */\n static CenterToRef(value1, value2, ref) {\n return ref.copyFromFloats((value1._x + value2._x) / 2, (value1._y + value2._y) / 2, (value1._z + value2._z) / 2);\n }\n /**\n * Given three orthogonal normalized left-handed oriented Vector3 axis in space (target system),\n * RotationFromAxis() returns the rotation Euler angles (ex : rotation.x, rotation.y, rotation.z) to apply\n * to something in order to rotate it from its local system to the given target system\n * Note: axis1, axis2 and axis3 are normalized during this operation\n * Example Playground https://playground.babylonjs.com/#R1F8YU#106\n * @param axis1 defines the first axis\n * @param axis2 defines the second axis\n * @param axis3 defines the third axis\n * @returns a new Vector3\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/center_origin/target_align\n */\n static RotationFromAxis(axis1, axis2, axis3) {\n const rotation = new axis1.constructor();\n Vector3.RotationFromAxisToRef(axis1, axis2, axis3, rotation);\n return rotation;\n }\n /**\n * The same than RotationFromAxis but updates the given ref Vector3 parameter instead of returning a new Vector3\n * Example Playground https://playground.babylonjs.com/#R1F8YU#107\n * @param axis1 defines the first axis\n * @param axis2 defines the second axis\n * @param axis3 defines the third axis\n * @param ref defines the Vector3 where to store the result\n * @returns result input\n */\n static RotationFromAxisToRef(axis1, axis2, axis3, ref) {\n const quat = MathTmp.Quaternion[0];\n Quaternion.RotationQuaternionFromAxisToRef(axis1, axis2, axis3, quat);\n quat.toEulerAnglesToRef(ref);\n return ref;\n }\n}\nVector3._UpReadOnly = Vector3.Up();\nVector3._DownReadOnly = Vector3.Down();\nVector3._LeftHandedForwardReadOnly = Vector3.Forward(false);\nVector3._RightHandedForwardReadOnly = Vector3.Forward(true);\nVector3._LeftHandedBackwardReadOnly = Vector3.Backward(false);\nVector3._RightHandedBackwardReadOnly = Vector3.Backward(true);\nVector3._RightReadOnly = Vector3.Right();\nVector3._LeftReadOnly = Vector3.Left();\nVector3._ZeroReadOnly = Vector3.Zero();\nVector3._OneReadOnly = Vector3.One();\n/**\n * Vector4 class created for EulerAngle class conversion to Quaternion\n */\nexport class Vector4 {\n /**\n * Creates a Vector4 object from the given floats.\n * @param x x value of the vector\n * @param y y value of the vector\n * @param z z value of the vector\n * @param w w value of the vector\n */\n constructor(\n /** x value of the vector */\n x = 0, \n /** y value of the vector */\n y = 0, \n /** z value of the vector */\n z = 0, \n /** w value of the vector */\n w = 0) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n /**\n * Returns the string with the Vector4 coordinates.\n * @returns a string containing all the vector values\n */\n toString() {\n return `{X: ${this.x} Y: ${this.y} Z: ${this.z} W: ${this.w}}`;\n }\n /**\n * Returns the string \"Vector4\".\n * @returns \"Vector4\"\n */\n getClassName() {\n return \"Vector4\";\n }\n /**\n * Returns the Vector4 hash code.\n * @returns a unique hash code\n */\n getHashCode() {\n const x = _ExtractAsInt(this.x);\n const y = _ExtractAsInt(this.y);\n const z = _ExtractAsInt(this.z);\n const w = _ExtractAsInt(this.w);\n let hash = x;\n hash = (hash * 397) ^ y;\n hash = (hash * 397) ^ z;\n hash = (hash * 397) ^ w;\n return hash;\n }\n // Operators\n /**\n * Returns a new array populated with 4 elements : the Vector4 coordinates.\n * @returns the resulting array\n */\n asArray() {\n const result = [];\n this.toArray(result, 0);\n return result;\n }\n /**\n * Populates the given array from the given index with the Vector4 coordinates.\n * @param array array to populate\n * @param index index of the array to start at (default: 0)\n * @returns the Vector4.\n */\n toArray(array, index) {\n if (index === undefined) {\n index = 0;\n }\n array[index] = this.x;\n array[index + 1] = this.y;\n array[index + 2] = this.z;\n array[index + 3] = this.w;\n return this;\n }\n /**\n * Update the current vector from an array\n * @param array defines the destination array\n * @param index defines the offset in the destination array\n * @returns the current Vector3\n */\n fromArray(array, index = 0) {\n Vector4.FromArrayToRef(array, index, this);\n return this;\n }\n /**\n * Adds the given vector to the current Vector4.\n * @param otherVector the vector to add\n * @returns the updated Vector4.\n */\n addInPlace(otherVector) {\n this.x += otherVector.x;\n this.y += otherVector.y;\n this.z += otherVector.z;\n this.w += otherVector.w;\n return this;\n }\n /**\n * Returns a new Vector4 as the result of the addition of the current Vector4 and the given one.\n * @param otherVector the vector to add\n * @returns the resulting vector\n */\n add(otherVector) {\n return new this.constructor(this.x + otherVector.x, this.y + otherVector.y, this.z + otherVector.z, this.w + otherVector.w);\n }\n /**\n * Updates the given vector \"result\" with the result of the addition of the current Vector4 and the given one.\n * @param otherVector the vector to add\n * @param result the vector to store the result\n * @returns result input\n */\n addToRef(otherVector, result) {\n result.x = this.x + otherVector.x;\n result.y = this.y + otherVector.y;\n result.z = this.z + otherVector.z;\n result.w = this.w + otherVector.w;\n return result;\n }\n /**\n * Subtract in place the given vector from the current Vector4.\n * @param otherVector the vector to subtract\n * @returns the updated Vector4.\n */\n subtractInPlace(otherVector) {\n this.x -= otherVector.x;\n this.y -= otherVector.y;\n this.z -= otherVector.z;\n this.w -= otherVector.w;\n return this;\n }\n /**\n * Returns a new Vector4 with the result of the subtraction of the given vector from the current Vector4.\n * @param otherVector the vector to add\n * @returns the new vector with the result\n */\n subtract(otherVector) {\n return new this.constructor(this.x - otherVector.x, this.y - otherVector.y, this.z - otherVector.z, this.w - otherVector.w);\n }\n /**\n * Sets the given vector \"result\" with the result of the subtraction of the given vector from the current Vector4.\n * @param otherVector the vector to subtract\n * @param result the vector to store the result\n * @returns result input\n */\n subtractToRef(otherVector, result) {\n result.x = this.x - otherVector.x;\n result.y = this.y - otherVector.y;\n result.z = this.z - otherVector.z;\n result.w = this.w - otherVector.w;\n return result;\n }\n /**\n * Returns a new Vector4 set with the result of the subtraction of the given floats from the current Vector4 coordinates.\n */\n /**\n * Returns a new Vector4 set with the result of the subtraction of the given floats from the current Vector4 coordinates.\n * @param x value to subtract\n * @param y value to subtract\n * @param z value to subtract\n * @param w value to subtract\n * @returns new vector containing the result\n */\n subtractFromFloats(x, y, z, w) {\n return new this.constructor(this.x - x, this.y - y, this.z - z, this.w - w);\n }\n /**\n * Sets the given vector \"result\" set with the result of the subtraction of the given floats from the current Vector4 coordinates.\n * @param x value to subtract\n * @param y value to subtract\n * @param z value to subtract\n * @param w value to subtract\n * @param result the vector to store the result in\n * @returns result input\n */\n subtractFromFloatsToRef(x, y, z, w, result) {\n result.x = this.x - x;\n result.y = this.y - y;\n result.z = this.z - z;\n result.w = this.w - w;\n return result;\n }\n /**\n * Returns a new Vector4 set with the current Vector4 negated coordinates.\n * @returns a new vector with the negated values\n */\n negate() {\n return new this.constructor(-this.x, -this.y, -this.z, -this.w);\n }\n /**\n * Negate this vector in place\n * @returns this\n */\n negateInPlace() {\n this.x *= -1;\n this.y *= -1;\n this.z *= -1;\n this.w *= -1;\n return this;\n }\n /**\n * Negate the current Vector4 and stores the result in the given vector \"result\" coordinates\n * @param result defines the Vector3 object where to store the result\n * @returns the result\n */\n negateToRef(result) {\n return result.copyFromFloats(this.x * -1, this.y * -1, this.z * -1, this.w * -1);\n }\n /**\n * Multiplies the current Vector4 coordinates by scale (float).\n * @param scale the number to scale with\n * @returns the updated Vector4.\n */\n scaleInPlace(scale) {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n this.w *= scale;\n return this;\n }\n /**\n * Returns a new Vector4 set with the current Vector4 coordinates multiplied by scale (float).\n * @param scale the number to scale with\n * @returns a new vector with the result\n */\n scale(scale) {\n return new this.constructor(this.x * scale, this.y * scale, this.z * scale, this.w * scale);\n }\n /**\n * Sets the given vector \"result\" with the current Vector4 coordinates multiplied by scale (float).\n * @param scale the number to scale with\n * @param result a vector to store the result in\n * @returns result input\n */\n scaleToRef(scale, result) {\n result.x = this.x * scale;\n result.y = this.y * scale;\n result.z = this.z * scale;\n result.w = this.w * scale;\n return result;\n }\n /**\n * Scale the current Vector4 values by a factor and add the result to a given Vector4\n * @param scale defines the scale factor\n * @param result defines the Vector4 object where to store the result\n * @returns result input\n */\n scaleAndAddToRef(scale, result) {\n result.x += this.x * scale;\n result.y += this.y * scale;\n result.z += this.z * scale;\n result.w += this.w * scale;\n return result;\n }\n /**\n * Boolean : True if the current Vector4 coordinates are stricly equal to the given ones.\n * @param otherVector the vector to compare against\n * @returns true if they are equal\n */\n equals(otherVector) {\n return otherVector && this.x === otherVector.x && this.y === otherVector.y && this.z === otherVector.z && this.w === otherVector.w;\n }\n /**\n * Boolean : True if the current Vector4 coordinates are each beneath the distance \"epsilon\" from the given vector ones.\n * @param otherVector vector to compare against\n * @param epsilon (Default: very small number)\n * @returns true if they are equal\n */\n equalsWithEpsilon(otherVector, epsilon = Epsilon) {\n return (otherVector &&\n Scalar.WithinEpsilon(this.x, otherVector.x, epsilon) &&\n Scalar.WithinEpsilon(this.y, otherVector.y, epsilon) &&\n Scalar.WithinEpsilon(this.z, otherVector.z, epsilon) &&\n Scalar.WithinEpsilon(this.w, otherVector.w, epsilon));\n }\n /**\n * Boolean : True if the given floats are strictly equal to the current Vector4 coordinates.\n * @param x x value to compare against\n * @param y y value to compare against\n * @param z z value to compare against\n * @param w w value to compare against\n * @returns true if equal\n */\n equalsToFloats(x, y, z, w) {\n return this.x === x && this.y === y && this.z === z && this.w === w;\n }\n /**\n * Multiplies in place the current Vector4 by the given one.\n * @param otherVector vector to multiple with\n * @returns the updated Vector4.\n */\n multiplyInPlace(otherVector) {\n this.x *= otherVector.x;\n this.y *= otherVector.y;\n this.z *= otherVector.z;\n this.w *= otherVector.w;\n return this;\n }\n /**\n * Returns a new Vector4 set with the multiplication result of the current Vector4 and the given one.\n * @param otherVector vector to multiple with\n * @returns resulting new vector\n */\n multiply(otherVector) {\n return new this.constructor(this.x * otherVector.x, this.y * otherVector.y, this.z * otherVector.z, this.w * otherVector.w);\n }\n /**\n * Updates the given vector \"result\" with the multiplication result of the current Vector4 and the given one.\n * @param otherVector vector to multiple with\n * @param result vector to store the result\n * @returns result input\n */\n multiplyToRef(otherVector, result) {\n result.x = this.x * otherVector.x;\n result.y = this.y * otherVector.y;\n result.z = this.z * otherVector.z;\n result.w = this.w * otherVector.w;\n return result;\n }\n /**\n * Returns a new Vector4 set with the multiplication result of the given floats and the current Vector4 coordinates.\n * @param x x value multiply with\n * @param y y value multiply with\n * @param z z value multiply with\n * @param w w value multiply with\n * @returns resulting new vector\n */\n multiplyByFloats(x, y, z, w) {\n return new this.constructor(this.x * x, this.y * y, this.z * z, this.w * w);\n }\n /**\n * Returns a new Vector4 set with the division result of the current Vector4 by the given one.\n * @param otherVector vector to devide with\n * @returns resulting new vector\n */\n divide(otherVector) {\n return new this.constructor(this.x / otherVector.x, this.y / otherVector.y, this.z / otherVector.z, this.w / otherVector.w);\n }\n /**\n * Updates the given vector \"result\" with the division result of the current Vector4 by the given one.\n * @param otherVector vector to devide with\n * @param result vector to store the result\n * @returns result input\n */\n divideToRef(otherVector, result) {\n result.x = this.x / otherVector.x;\n result.y = this.y / otherVector.y;\n result.z = this.z / otherVector.z;\n result.w = this.w / otherVector.w;\n return result;\n }\n /**\n * Divides the current Vector3 coordinates by the given ones.\n * @param otherVector vector to devide with\n * @returns the updated Vector3.\n */\n divideInPlace(otherVector) {\n return this.divideToRef(otherVector, this);\n }\n /**\n * Updates the Vector4 coordinates with the minimum values between its own and the given vector ones\n * @param other defines the second operand\n * @returns the current updated Vector4\n */\n minimizeInPlace(other) {\n if (other.x < this.x) {\n this.x = other.x;\n }\n if (other.y < this.y) {\n this.y = other.y;\n }\n if (other.z < this.z) {\n this.z = other.z;\n }\n if (other.w < this.w) {\n this.w = other.w;\n }\n return this;\n }\n /**\n * Updates the Vector4 coordinates with the maximum values between its own and the given vector ones\n * @param other defines the second operand\n * @returns the current updated Vector4\n */\n maximizeInPlace(other) {\n if (other.x > this.x) {\n this.x = other.x;\n }\n if (other.y > this.y) {\n this.y = other.y;\n }\n if (other.z > this.z) {\n this.z = other.z;\n }\n if (other.w > this.w) {\n this.w = other.w;\n }\n return this;\n }\n /**\n * Gets a new Vector4 from current Vector4 floored values\n * @returns a new Vector4\n */\n floor() {\n return new this.constructor(Math.floor(this.x), Math.floor(this.y), Math.floor(this.z), Math.floor(this.w));\n }\n /**\n * Gets a new Vector4 from current Vector4 fractional values\n * @returns a new Vector4\n */\n fract() {\n return new this.constructor(this.x - Math.floor(this.x), this.y - Math.floor(this.y), this.z - Math.floor(this.z), this.w - Math.floor(this.w));\n }\n // Properties\n /**\n * Returns the Vector4 length (float).\n * @returns the length\n */\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n }\n /**\n * Returns the Vector4 squared length (float).\n * @returns the length squared\n */\n lengthSquared() {\n return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n }\n // Methods\n /**\n * Normalizes in place the Vector4.\n * @returns the updated Vector4.\n */\n normalize() {\n return this.normalizeFromLength(this.length());\n }\n /**\n * Normalize the current Vector4 with the given input length.\n * Please note that this is an in place operation.\n * @param len the length of the vector\n * @returns the current updated Vector4\n */\n normalizeFromLength(len) {\n if (len === 0 || len === 1.0) {\n return this;\n }\n return this.scaleInPlace(1.0 / len);\n }\n /**\n * Normalize the current Vector4 to a new vector\n * @returns the new Vector4\n */\n normalizeToNew() {\n const normalized = new this.constructor(0, 0, 0, 0);\n this.normalizeToRef(normalized);\n return normalized;\n }\n /**\n * Normalize the current Vector4 to the reference\n * @param reference define the Vector4 to update\n * @returns the updated Vector4\n */\n normalizeToRef(reference) {\n const len = this.length();\n if (len === 0 || len === 1.0) {\n return reference.copyFromFloats(this.x, this.y, this.z, this.w);\n }\n return this.scaleToRef(1.0 / len, reference);\n }\n /**\n * Returns a new Vector3 from the Vector4 (x, y, z) coordinates.\n * @returns this converted to a new vector3\n */\n toVector3() {\n return new Vector3(this.x, this.y, this.z);\n }\n /**\n * Returns a new Vector4 copied from the current one.\n * @returns the new cloned vector\n */\n clone() {\n return new this.constructor(this.x, this.y, this.z, this.w);\n }\n /**\n * Updates the current Vector4 with the given one coordinates.\n * @param source the source vector to copy from\n * @returns the updated Vector4.\n */\n copyFrom(source) {\n this.x = source.x;\n this.y = source.y;\n this.z = source.z;\n this.w = source.w;\n return this;\n }\n /**\n * Updates the current Vector4 coordinates with the given floats.\n * @param x float to copy from\n * @param y float to copy from\n * @param z float to copy from\n * @param w float to copy from\n * @returns the updated Vector4.\n */\n copyFromFloats(x, y, z, w) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n return this;\n }\n /**\n * Updates the current Vector4 coordinates with the given floats.\n * @param x float to set from\n * @param y float to set from\n * @param z float to set from\n * @param w float to set from\n * @returns the updated Vector4.\n */\n set(x, y, z, w) {\n return this.copyFromFloats(x, y, z, w);\n }\n /**\n * Copies the given float to the current Vector3 coordinates\n * @param v defines the x, y, z and w coordinates of the operand\n * @returns the current updated Vector3\n */\n setAll(v) {\n this.x = this.y = this.z = this.w = v;\n return this;\n }\n /**\n * Returns the dot product (float) between the current vectors and \"otherVector\"\n * @param otherVector defines the right operand\n * @returns the dot product\n */\n dot(otherVector) {\n return this.x * otherVector.x + this.y * otherVector.y + this.z * otherVector.z + this.w * otherVector.w;\n }\n // Statics\n /**\n * Returns a new Vector4 set from the starting index of the given array.\n * @param array the array to pull values from\n * @param offset the offset into the array to start at\n * @returns the new vector\n */\n static FromArray(array, offset) {\n if (!offset) {\n offset = 0;\n }\n return new Vector4(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);\n }\n /**\n * Updates the given vector \"result\" from the starting index of the given array.\n * @param array the array to pull values from\n * @param offset the offset into the array to start at\n * @param result the vector to store the result in\n * @returns result input\n */\n static FromArrayToRef(array, offset, result) {\n result.x = array[offset];\n result.y = array[offset + 1];\n result.z = array[offset + 2];\n result.w = array[offset + 3];\n return result;\n }\n /**\n * Updates the given vector \"result\" from the starting index of the given Float32Array.\n * @param array the array to pull values from\n * @param offset the offset into the array to start at\n * @param result the vector to store the result in\n * @returns result input\n */\n static FromFloatArrayToRef(array, offset, result) {\n Vector4.FromArrayToRef(array, offset, result);\n return result;\n }\n /**\n * Updates the given vector \"result\" coordinates from the given floats.\n * @param x float to set from\n * @param y float to set from\n * @param z float to set from\n * @param w float to set from\n * @param result the vector to the floats in\n * @returns result input\n */\n static FromFloatsToRef(x, y, z, w, result) {\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n }\n /**\n * Returns a new Vector4 set to (0.0, 0.0, 0.0, 0.0)\n * @returns the new vector\n */\n static Zero() {\n return new Vector4(0.0, 0.0, 0.0, 0.0);\n }\n /**\n * Returns a new Vector4 set to (1.0, 1.0, 1.0, 1.0)\n * @returns the new vector\n */\n static One() {\n return new Vector4(1.0, 1.0, 1.0, 1.0);\n }\n /**\n * Returns a new Vector4 with random values between min and max\n * @param min the minimum random value\n * @param max the maximum random value\n * @returns a Vector4 with random values between min and max\n */\n static Random(min = 0, max = 1) {\n return new Vector4(Scalar.RandomRange(min, max), Scalar.RandomRange(min, max), Scalar.RandomRange(min, max), Scalar.RandomRange(min, max));\n }\n /**\n * Gets a zero Vector4 that must not be updated\n */\n static get ZeroReadOnly() {\n return Vector4._ZeroReadOnly;\n }\n /**\n * Returns a new normalized Vector4 from the given one.\n * @param vector the vector to normalize\n * @returns the vector\n */\n static Normalize(vector) {\n const result = Vector4.Zero();\n Vector4.NormalizeToRef(vector, result);\n return result;\n }\n /**\n * Updates the given vector \"result\" from the normalization of the given one.\n * @param vector the vector to normalize\n * @param result the vector to store the result in\n * @returns result input\n */\n static NormalizeToRef(vector, result) {\n vector.normalizeToRef(result);\n return result;\n }\n /**\n * Returns a vector with the minimum values from the left and right vectors\n * @param left left vector to minimize\n * @param right right vector to minimize\n * @returns a new vector with the minimum of the left and right vector values\n */\n static Minimize(left, right) {\n const min = new left.constructor();\n min.copyFrom(left);\n min.minimizeInPlace(right);\n return min;\n }\n /**\n * Returns a vector with the maximum values from the left and right vectors\n * @param left left vector to maximize\n * @param right right vector to maximize\n * @returns a new vector with the maximum of the left and right vector values\n */\n static Maximize(left, right) {\n const max = new left.constructor();\n max.copyFrom(left);\n max.maximizeInPlace(right);\n return max;\n }\n /**\n * Returns the distance (float) between the vectors \"value1\" and \"value2\".\n * @param value1 value to calulate the distance between\n * @param value2 value to calulate the distance between\n * @returns the distance between the two vectors\n */\n static Distance(value1, value2) {\n return Math.sqrt(Vector4.DistanceSquared(value1, value2));\n }\n /**\n * Returns the squared distance (float) between the vectors \"value1\" and \"value2\".\n * @param value1 value to calulate the distance between\n * @param value2 value to calulate the distance between\n * @returns the distance between the two vectors squared\n */\n static DistanceSquared(value1, value2) {\n const x = value1.x - value2.x;\n const y = value1.y - value2.y;\n const z = value1.z - value2.z;\n const w = value1.w - value2.w;\n return x * x + y * y + z * z + w * w;\n }\n /**\n * Returns a new Vector4 located at the center between the vectors \"value1\" and \"value2\".\n * @param value1 value to calulate the center between\n * @param value2 value to calulate the center between\n * @returns the center between the two vectors\n */\n static Center(value1, value2) {\n return Vector4.CenterToRef(value1, value2, Vector4.Zero());\n }\n /**\n * Gets the center of the vectors \"value1\" and \"value2\" and stores the result in the vector \"ref\"\n * @param value1 defines first vector\n * @param value2 defines second vector\n * @param ref defines third vector\n * @returns ref\n */\n static CenterToRef(value1, value2, ref) {\n return ref.copyFromFloats((value1.x + value2.x) / 2, (value1.y + value2.y) / 2, (value1.z + value2.z) / 2, (value1.w + value2.w) / 2);\n }\n /**\n * Returns a new Vector4 set with the result of the transformation by the given matrix of the given vector.\n * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\n * The difference with Vector3.TransformCoordinates is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead\n * @param vector defines the Vector3 to transform\n * @param transformation defines the transformation matrix\n * @returns the transformed Vector4\n */\n static TransformCoordinates(vector, transformation) {\n const result = Vector4.Zero();\n Vector4.TransformCoordinatesToRef(vector, transformation, result);\n return result;\n }\n /**\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given vector\n * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\n * The difference with Vector3.TransformCoordinatesToRef is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead\n * @param vector defines the Vector3 to transform\n * @param transformation defines the transformation matrix\n * @param result defines the Vector4 where to store the result\n * @returns result input\n */\n static TransformCoordinatesToRef(vector, transformation, result) {\n Vector4.TransformCoordinatesFromFloatsToRef(vector._x, vector._y, vector._z, transformation, result);\n return result;\n }\n /**\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z)\n * This method computes tranformed coordinates only, not transformed direction vectors\n * The difference with Vector3.TransformCoordinatesFromFloatsToRef is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead\n * @param x define the x coordinate of the source vector\n * @param y define the y coordinate of the source vector\n * @param z define the z coordinate of the source vector\n * @param transformation defines the transformation matrix\n * @param result defines the Vector4 where to store the result\n * @returns result input\n */\n static TransformCoordinatesFromFloatsToRef(x, y, z, transformation, result) {\n const m = transformation.m;\n const rx = x * m[0] + y * m[4] + z * m[8] + m[12];\n const ry = x * m[1] + y * m[5] + z * m[9] + m[13];\n const rz = x * m[2] + y * m[6] + z * m[10] + m[14];\n const rw = x * m[3] + y * m[7] + z * m[11] + m[15];\n result.x = rx;\n result.y = ry;\n result.z = rz;\n result.w = rw;\n return result;\n }\n /**\n * Returns a new Vector4 set with the result of the normal transformation by the given matrix of the given vector.\n * This methods computes transformed normalized direction vectors only.\n * @param vector the vector to transform\n * @param transformation the transformation matrix to apply\n * @returns the new vector\n */\n static TransformNormal(vector, transformation) {\n const result = new vector.constructor();\n Vector4.TransformNormalToRef(vector, transformation, result);\n return result;\n }\n /**\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given vector.\n * This methods computes transformed normalized direction vectors only.\n * @param vector the vector to transform\n * @param transformation the transformation matrix to apply\n * @param result the vector to store the result in\n * @returns result input\n */\n static TransformNormalToRef(vector, transformation, result) {\n const m = transformation.m;\n const x = vector.x * m[0] + vector.y * m[4] + vector.z * m[8];\n const y = vector.x * m[1] + vector.y * m[5] + vector.z * m[9];\n const z = vector.x * m[2] + vector.y * m[6] + vector.z * m[10];\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = vector.w;\n return result;\n }\n /**\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given floats (x, y, z, w).\n * This methods computes transformed normalized direction vectors only.\n * @param x value to transform\n * @param y value to transform\n * @param z value to transform\n * @param w value to transform\n * @param transformation the transformation matrix to apply\n * @param result the vector to store the results in\n * @returns result input\n */\n static TransformNormalFromFloatsToRef(x, y, z, w, transformation, result) {\n const m = transformation.m;\n result.x = x * m[0] + y * m[4] + z * m[8];\n result.y = x * m[1] + y * m[5] + z * m[9];\n result.z = x * m[2] + y * m[6] + z * m[10];\n result.w = w;\n return result;\n }\n /**\n * Creates a new Vector4 from a Vector3\n * @param source defines the source data\n * @param w defines the 4th component (default is 0)\n * @returns a new Vector4\n */\n static FromVector3(source, w = 0) {\n return new Vector4(source._x, source._y, source._z, w);\n }\n /**\n * Returns the dot product (float) between the vectors \"left\" and \"right\"\n * @param left defines the left operand\n * @param right defines the right operand\n * @returns the dot product\n */\n static Dot(left, right) {\n return left.dot(right);\n }\n}\nVector4._ZeroReadOnly = Vector4.Zero();\n/**\n * Class used to store quaternion data\n * Example Playground - Overview - https://playground.babylonjs.com/#L49EJ7#100\n * @see https://en.wikipedia.org/wiki/Quaternion\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms\n */\nexport class Quaternion {\n /** Gets or sets the x coordinate */\n get x() {\n return this._x;\n }\n set x(value) {\n this._x = value;\n this._isDirty = true;\n }\n /** Gets or sets the y coordinate */\n get y() {\n return this._y;\n }\n set y(value) {\n this._y = value;\n this._isDirty = true;\n }\n /** Gets or sets the z coordinate */\n get z() {\n return this._z;\n }\n set z(value) {\n this._z = value;\n this._isDirty = true;\n }\n /** Gets or sets the w coordinate */\n get w() {\n return this._w;\n }\n set w(value) {\n this._w = value;\n this._isDirty = true;\n }\n /**\n * Creates a new Quaternion from the given floats\n * @param x defines the first component (0 by default)\n * @param y defines the second component (0 by default)\n * @param z defines the third component (0 by default)\n * @param w defines the fourth component (1.0 by default)\n */\n constructor(x = 0.0, y = 0.0, z = 0.0, w = 1.0) {\n /** @internal */\n this._isDirty = true;\n this._x = x;\n this._y = y;\n this._z = z;\n this._w = w;\n }\n /**\n * Gets a string representation for the current quaternion\n * @returns a string with the Quaternion coordinates\n */\n toString() {\n return `{X: ${this._x} Y: ${this._y} Z: ${this._z} W: ${this._w}}`;\n }\n /**\n * Gets the class name of the quaternion\n * @returns the string \"Quaternion\"\n */\n getClassName() {\n return \"Quaternion\";\n }\n /**\n * Gets a hash code for this quaternion\n * @returns the quaternion hash code\n */\n getHashCode() {\n const x = _ExtractAsInt(this._x);\n const y = _ExtractAsInt(this._y);\n const z = _ExtractAsInt(this._z);\n const w = _ExtractAsInt(this._w);\n let hash = x;\n hash = (hash * 397) ^ y;\n hash = (hash * 397) ^ z;\n hash = (hash * 397) ^ w;\n return hash;\n }\n /**\n * Copy the quaternion to an array\n * Example Playground https://playground.babylonjs.com/#L49EJ7#13\n * @returns a new array populated with 4 elements from the quaternion coordinates\n */\n asArray() {\n return [this._x, this._y, this._z, this._w];\n }\n /**\n * Stores from the starting index in the given array the Quaternion successive values\n * Example Playground https://playground.babylonjs.com/#L49EJ7#59\n * @param array defines the array where to store the x,y,z,w components\n * @param index defines an optional index in the target array to define where to start storing values\n * @returns the current Quaternion object\n */\n toArray(array, index = 0) {\n array[index] = this._x;\n array[index + 1] = this._y;\n array[index + 2] = this._z;\n array[index + 3] = this._w;\n return this;\n }\n /**\n * Check if two quaternions are equals\n * Example Playground https://playground.babylonjs.com/#L49EJ7#38\n * @param otherQuaternion defines the second operand\n * @returns true if the current quaternion and the given one coordinates are strictly equals\n */\n equals(otherQuaternion) {\n return otherQuaternion && this._x === otherQuaternion._x && this._y === otherQuaternion._y && this._z === otherQuaternion._z && this._w === otherQuaternion._w;\n }\n /**\n * Gets a boolean if two quaternions are equals (using an epsilon value)\n * Example Playground https://playground.babylonjs.com/#L49EJ7#37\n * @param otherQuaternion defines the other quaternion\n * @param epsilon defines the minimal distance to consider equality\n * @returns true if the given quaternion coordinates are close to the current ones by a distance of epsilon.\n */\n equalsWithEpsilon(otherQuaternion, epsilon = Epsilon) {\n return (otherQuaternion &&\n Scalar.WithinEpsilon(this._x, otherQuaternion._x, epsilon) &&\n Scalar.WithinEpsilon(this._y, otherQuaternion._y, epsilon) &&\n Scalar.WithinEpsilon(this._z, otherQuaternion._z, epsilon) &&\n Scalar.WithinEpsilon(this._w, otherQuaternion._w, epsilon));\n }\n /**\n * Clone the current quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#12\n * @returns a new quaternion copied from the current one\n */\n clone() {\n return new this.constructor(this._x, this._y, this._z, this._w);\n }\n /**\n * Copy a quaternion to the current one\n * Example Playground https://playground.babylonjs.com/#L49EJ7#86\n * @param other defines the other quaternion\n * @returns the updated current quaternion\n */\n copyFrom(other) {\n this._x = other._x;\n this._y = other._y;\n this._z = other._z;\n this._w = other._w;\n this._isDirty = true;\n return this;\n }\n /**\n * Updates the current quaternion with the given float coordinates\n * Example Playground https://playground.babylonjs.com/#L49EJ7#87\n * @param x defines the x coordinate\n * @param y defines the y coordinate\n * @param z defines the z coordinate\n * @param w defines the w coordinate\n * @returns the updated current quaternion\n */\n copyFromFloats(x, y, z, w) {\n this._x = x;\n this._y = y;\n this._z = z;\n this._w = w;\n this._isDirty = true;\n return this;\n }\n /**\n * Updates the current quaternion from the given float coordinates\n * Example Playground https://playground.babylonjs.com/#L49EJ7#56\n * @param x defines the x coordinate\n * @param y defines the y coordinate\n * @param z defines the z coordinate\n * @param w defines the w coordinate\n * @returns the updated current quaternion\n */\n set(x, y, z, w) {\n return this.copyFromFloats(x, y, z, w);\n }\n /**\n * Adds two quaternions\n * Example Playground https://playground.babylonjs.com/#L49EJ7#10\n * @param other defines the second operand\n * @returns a new quaternion as the addition result of the given one and the current quaternion\n */\n add(other) {\n return new this.constructor(this._x + other._x, this._y + other._y, this._z + other._z, this._w + other._w);\n }\n /**\n * Add a quaternion to the current one\n * Example Playground https://playground.babylonjs.com/#L49EJ7#11\n * @param other defines the quaternion to add\n * @returns the current quaternion\n */\n addInPlace(other) {\n this._x += other._x;\n this._y += other._y;\n this._z += other._z;\n this._w += other._w;\n this._isDirty = true;\n return this;\n }\n /**\n * Subtract two quaternions\n * Example Playground https://playground.babylonjs.com/#L49EJ7#57\n * @param other defines the second operand\n * @returns a new quaternion as the subtraction result of the given one from the current one\n */\n subtract(other) {\n return new this.constructor(this._x - other._x, this._y - other._y, this._z - other._z, this._w - other._w);\n }\n /**\n * Subtract a quaternion to the current one\n * Example Playground https://playground.babylonjs.com/#L49EJ7#58\n * @param other defines the quaternion to subtract\n * @returns the current quaternion\n */\n subtractInPlace(other) {\n this._x -= other._x;\n this._y -= other._y;\n this._z -= other._z;\n this._w -= other._w;\n this._isDirty = true;\n return this;\n }\n /**\n * Multiplies the current quaternion by a scale factor\n * Example Playground https://playground.babylonjs.com/#L49EJ7#88\n * @param value defines the scale factor\n * @returns a new quaternion set by multiplying the current quaternion coordinates by the float \"scale\"\n */\n scale(value) {\n return new this.constructor(this._x * value, this._y * value, this._z * value, this._w * value);\n }\n /**\n * Scale the current quaternion values by a factor and stores the result to a given quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#89\n * @param scale defines the scale factor\n * @param result defines the Quaternion object where to store the result\n * @returns result input\n */\n scaleToRef(scale, result) {\n result._x = this._x * scale;\n result._y = this._y * scale;\n result._z = this._z * scale;\n result._w = this._w * scale;\n result._isDirty = true;\n return result;\n }\n /**\n * Multiplies in place the current quaternion by a scale factor\n * Example Playground https://playground.babylonjs.com/#L49EJ7#90\n * @param value defines the scale factor\n * @returns the current modified quaternion\n */\n scaleInPlace(value) {\n this._x *= value;\n this._y *= value;\n this._z *= value;\n this._w *= value;\n this._isDirty = true;\n return this;\n }\n /**\n * Scale the current quaternion values by a factor and add the result to a given quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#91\n * @param scale defines the scale factor\n * @param result defines the Quaternion object where to store the result\n * @returns result input\n */\n scaleAndAddToRef(scale, result) {\n result._x += this._x * scale;\n result._y += this._y * scale;\n result._z += this._z * scale;\n result._w += this._w * scale;\n result._isDirty = true;\n return result;\n }\n /**\n * Multiplies two quaternions\n * Example Playground https://playground.babylonjs.com/#L49EJ7#43\n * @param q1 defines the second operand\n * @returns a new quaternion set as the multiplication result of the current one with the given one \"q1\"\n */\n multiply(q1) {\n const result = new this.constructor(0, 0, 0, 1.0);\n this.multiplyToRef(q1, result);\n return result;\n }\n /**\n * Sets the given \"result\" as the multiplication result of the current one with the given one \"q1\"\n * Example Playground https://playground.babylonjs.com/#L49EJ7#45\n * @param q1 defines the second operand\n * @param result defines the target quaternion\n * @returns the current quaternion\n */\n multiplyToRef(q1, result) {\n const x = this._x * q1._w + this._y * q1._z - this._z * q1._y + this._w * q1._x;\n const y = -this._x * q1._z + this._y * q1._w + this._z * q1._x + this._w * q1._y;\n const z = this._x * q1._y - this._y * q1._x + this._z * q1._w + this._w * q1._z;\n const w = -this._x * q1._x - this._y * q1._y - this._z * q1._z + this._w * q1._w;\n result.copyFromFloats(x, y, z, w);\n return result;\n }\n /**\n * Updates the current quaternion with the multiplication of itself with the given one \"q1\"\n * Example Playground https://playground.babylonjs.com/#L49EJ7#46\n * @param q1 defines the second operand\n * @returns the currentupdated quaternion\n */\n multiplyInPlace(q1) {\n this.multiplyToRef(q1, this);\n return this;\n }\n /**\n * Conjugates the current quaternion and stores the result in the given quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#81\n * @param ref defines the target quaternion\n * @returns result input\n */\n conjugateToRef(ref) {\n ref.copyFromFloats(-this._x, -this._y, -this._z, this._w);\n return ref;\n }\n /**\n * Conjugates in place the current quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#82\n * @returns the current updated quaternion\n */\n conjugateInPlace() {\n this._x *= -1;\n this._y *= -1;\n this._z *= -1;\n this._isDirty = true;\n return this;\n }\n /**\n * Conjugates (1-q) the current quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#83\n * @returns a new quaternion\n */\n conjugate() {\n return new this.constructor(-this._x, -this._y, -this._z, this._w);\n }\n /**\n * Returns the inverse of the current quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#84\n * @returns a new quaternion\n */\n invert() {\n const conjugate = this.conjugate();\n const lengthSquared = this.lengthSquared();\n if (lengthSquared == 0 || lengthSquared == 1) {\n return conjugate;\n }\n conjugate.scaleInPlace(1 / lengthSquared);\n return conjugate;\n }\n /**\n * Invert in place the current quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#85\n * @returns this quaternion\n */\n invertInPlace() {\n this.conjugateInPlace();\n const lengthSquared = this.lengthSquared();\n if (lengthSquared == 0 || lengthSquared == 1) {\n return this;\n }\n this.scaleInPlace(1 / lengthSquared);\n return this;\n }\n /**\n * Gets squared length of current quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#29\n * @returns the quaternion length (float)\n */\n lengthSquared() {\n return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;\n }\n /**\n * Gets length of current quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#28\n * @returns the quaternion length (float)\n */\n length() {\n return Math.sqrt(this.lengthSquared());\n }\n /**\n * Normalize in place the current quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#54\n * @returns the current updated quaternion\n */\n normalize() {\n return this.normalizeFromLength(this.length());\n }\n /**\n * Normalize the current quaternion with the given input length.\n * Please note that this is an in place operation.\n * @param len the length of the quaternion\n * @returns the current updated Quaternion\n */\n normalizeFromLength(len) {\n if (len === 0 || len === 1.0) {\n return this;\n }\n return this.scaleInPlace(1.0 / len);\n }\n /**\n * Normalize a copy of the current quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#55\n * @returns the normalized quaternion\n */\n normalizeToNew() {\n const normalized = new this.constructor(0, 0, 0, 1);\n this.normalizeToRef(normalized);\n return normalized;\n }\n /**\n * Normalize the current Quaternion to the reference\n * @param reference define the Quaternion to update\n * @returns the updated Quaternion\n */\n normalizeToRef(reference) {\n const len = this.length();\n if (len === 0 || len === 1.0) {\n return reference.copyFromFloats(this._x, this._y, this._z, this._w);\n }\n return this.scaleToRef(1.0 / len, reference);\n }\n /**\n * Returns a new Vector3 set with the Euler angles translated from the current quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#32\n * @returns a new Vector3 containing the Euler angles\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/center_origin/rotation_conventions\n */\n toEulerAngles() {\n const result = Vector3.Zero();\n this.toEulerAnglesToRef(result);\n return result;\n }\n /**\n * Sets the given vector3 \"result\" with the Euler angles translated from the current quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#31\n * @param result defines the vector which will be filled with the Euler angles\n * @returns result input\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/center_origin/rotation_conventions\n */\n toEulerAnglesToRef(result) {\n const qz = this._z;\n const qx = this._x;\n const qy = this._y;\n const qw = this._w;\n const zAxisY = qy * qz - qx * qw;\n const limit = 0.4999999;\n if (zAxisY < -limit) {\n result._y = 2 * Math.atan2(qy, qw);\n result._x = Math.PI / 2;\n result._z = 0;\n result._isDirty = true;\n }\n else if (zAxisY > limit) {\n result._y = 2 * Math.atan2(qy, qw);\n result._x = -Math.PI / 2;\n result._z = 0;\n result._isDirty = true;\n }\n else {\n const sqw = qw * qw;\n const sqz = qz * qz;\n const sqx = qx * qx;\n const sqy = qy * qy;\n result._z = Math.atan2(2.0 * (qx * qy + qz * qw), -sqz - sqx + sqy + sqw);\n result._x = Math.asin(-2.0 * zAxisY);\n result._y = Math.atan2(2.0 * (qz * qx + qy * qw), sqz - sqx - sqy + sqw);\n result._isDirty = true;\n }\n return result;\n }\n /**\n * Updates the given rotation matrix with the current quaternion values\n * Example Playground https://playground.babylonjs.com/#L49EJ7#67\n * @param result defines the target matrix\n * @returns the updated matrix with the rotation\n */\n toRotationMatrix(result) {\n Matrix.FromQuaternionToRef(this, result);\n return result;\n }\n /**\n * Updates the current quaternion from the given rotation matrix values\n * Example Playground https://playground.babylonjs.com/#L49EJ7#41\n * @param matrix defines the source matrix\n * @returns the current updated quaternion\n */\n fromRotationMatrix(matrix) {\n Quaternion.FromRotationMatrixToRef(matrix, this);\n return this;\n }\n /**\n * Returns the dot product (float) between the current quaternions and \"other\"\n * @param other defines the right operand\n * @returns the dot product\n */\n dot(other) {\n return this._x * other._x + this._y * other._y + this._z * other._z + this._w * other._w;\n }\n // Statics\n /**\n * Creates a new quaternion from a rotation matrix\n * Example Playground https://playground.babylonjs.com/#L49EJ7#101\n * @param matrix defines the source matrix\n * @returns a new quaternion created from the given rotation matrix values\n */\n static FromRotationMatrix(matrix) {\n const result = new Quaternion();\n Quaternion.FromRotationMatrixToRef(matrix, result);\n return result;\n }\n /**\n * Updates the given quaternion with the given rotation matrix values\n * Example Playground https://playground.babylonjs.com/#L49EJ7#102\n * @param matrix defines the source matrix\n * @param result defines the target quaternion\n * @returns result input\n */\n static FromRotationMatrixToRef(matrix, result) {\n const data = matrix.m;\n const m11 = data[0], m12 = data[4], m13 = data[8];\n const m21 = data[1], m22 = data[5], m23 = data[9];\n const m31 = data[2], m32 = data[6], m33 = data[10];\n const trace = m11 + m22 + m33;\n let s;\n if (trace > 0) {\n s = 0.5 / Math.sqrt(trace + 1.0);\n result._w = 0.25 / s;\n result._x = (m32 - m23) * s;\n result._y = (m13 - m31) * s;\n result._z = (m21 - m12) * s;\n result._isDirty = true;\n }\n else if (m11 > m22 && m11 > m33) {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n result._w = (m32 - m23) / s;\n result._x = 0.25 * s;\n result._y = (m12 + m21) / s;\n result._z = (m13 + m31) / s;\n result._isDirty = true;\n }\n else if (m22 > m33) {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n result._w = (m13 - m31) / s;\n result._x = (m12 + m21) / s;\n result._y = 0.25 * s;\n result._z = (m23 + m32) / s;\n result._isDirty = true;\n }\n else {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n result._w = (m21 - m12) / s;\n result._x = (m13 + m31) / s;\n result._y = (m23 + m32) / s;\n result._z = 0.25 * s;\n result._isDirty = true;\n }\n return result;\n }\n /**\n * Returns the dot product (float) between the quaternions \"left\" and \"right\"\n * Example Playground https://playground.babylonjs.com/#L49EJ7#61\n * @param left defines the left operand\n * @param right defines the right operand\n * @returns the dot product\n */\n static Dot(left, right) {\n return left._x * right._x + left._y * right._y + left._z * right._z + left._w * right._w;\n }\n /**\n * Checks if the orientations of two rotation quaternions are close to each other\n * Example Playground https://playground.babylonjs.com/#L49EJ7#60\n * @param quat0 defines the first quaternion to check\n * @param quat1 defines the second quaternion to check\n * @param epsilon defines closeness, 0 same orientation, 1 PI apart, default 0.1\n * @returns true if the two quaternions are close to each other within epsilon\n */\n static AreClose(quat0, quat1, epsilon = 0.1) {\n const dot = Quaternion.Dot(quat0, quat1);\n return 1 - dot * dot <= epsilon;\n }\n /**\n * Smooth interpolation between two quaternions using Slerp\n * Example Playground https://playground.babylonjs.com/#L49EJ7#93\n * @param source source quaternion\n * @param goal goal quaternion\n * @param deltaTime current interpolation frame\n * @param lerpTime total interpolation time\n * @param result the smoothed quaternion\n */\n static SmoothToRef(source, goal, deltaTime, lerpTime, result) {\n let slerp = lerpTime === 0 ? 1 : deltaTime / lerpTime;\n slerp = Scalar.Clamp(slerp, 0, 1);\n Quaternion.SlerpToRef(source, goal, slerp, result);\n return result;\n }\n /**\n * Creates an empty quaternion\n * @returns a new quaternion set to (0.0, 0.0, 0.0)\n */\n static Zero() {\n return new Quaternion(0.0, 0.0, 0.0, 0.0);\n }\n /**\n * Inverse a given quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#103\n * @param q defines the source quaternion\n * @returns a new quaternion as the inverted current quaternion\n */\n static Inverse(q) {\n return new q.constructor(-q._x, -q._y, -q._z, q._w);\n }\n /**\n * Inverse a given quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#104\n * @param q defines the source quaternion\n * @param result the quaternion the result will be stored in\n * @returns the result quaternion\n */\n static InverseToRef(q, result) {\n result.set(-q._x, -q._y, -q._z, q._w);\n return result;\n }\n /**\n * Creates an identity quaternion\n * @returns the identity quaternion\n */\n static Identity() {\n return new Quaternion(0.0, 0.0, 0.0, 1.0);\n }\n /**\n * Gets a boolean indicating if the given quaternion is identity\n * @param quaternion defines the quaternion to check\n * @returns true if the quaternion is identity\n */\n static IsIdentity(quaternion) {\n return quaternion && quaternion._x === 0 && quaternion._y === 0 && quaternion._z === 0 && quaternion._w === 1;\n }\n /**\n * Creates a quaternion from a rotation around an axis\n * Example Playground https://playground.babylonjs.com/#L49EJ7#72\n * @param axis defines the axis to use\n * @param angle defines the angle to use\n * @returns a new quaternion created from the given axis (Vector3) and angle in radians (float)\n */\n static RotationAxis(axis, angle) {\n return Quaternion.RotationAxisToRef(axis, angle, new Quaternion());\n }\n /**\n * Creates a rotation around an axis and stores it into the given quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#73\n * @param axis defines the axis to use\n * @param angle defines the angle to use\n * @param result defines the target quaternion\n * @returns the target quaternion\n */\n static RotationAxisToRef(axis, angle, result) {\n const sin = Math.sin(angle / 2);\n axis.normalize();\n result._w = Math.cos(angle / 2);\n result._x = axis._x * sin;\n result._y = axis._y * sin;\n result._z = axis._z * sin;\n result._isDirty = true;\n return result;\n }\n /**\n * Creates a new quaternion from data stored into an array\n * Example Playground https://playground.babylonjs.com/#L49EJ7#63\n * @param array defines the data source\n * @param offset defines the offset in the source array where the data starts\n * @returns a new quaternion\n */\n static FromArray(array, offset) {\n if (!offset) {\n offset = 0;\n }\n return new Quaternion(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);\n }\n /**\n * Updates the given quaternion \"result\" from the starting index of the given array.\n * Example Playground https://playground.babylonjs.com/#L49EJ7#64\n * @param array the array to pull values from\n * @param offset the offset into the array to start at\n * @param result the quaternion to store the result in\n * @returns result input\n */\n static FromArrayToRef(array, offset, result) {\n result._x = array[offset];\n result._y = array[offset + 1];\n result._z = array[offset + 2];\n result._w = array[offset + 3];\n result._isDirty = true;\n return result;\n }\n /**\n * Create a quaternion from Euler rotation angles\n * Example Playground https://playground.babylonjs.com/#L49EJ7#33\n * @param x Pitch\n * @param y Yaw\n * @param z Roll\n * @returns the new Quaternion\n */\n static FromEulerAngles(x, y, z) {\n const q = new Quaternion();\n Quaternion.RotationYawPitchRollToRef(y, x, z, q);\n return q;\n }\n /**\n * Updates a quaternion from Euler rotation angles\n * Example Playground https://playground.babylonjs.com/#L49EJ7#34\n * @param x Pitch\n * @param y Yaw\n * @param z Roll\n * @param result the quaternion to store the result\n * @returns the updated quaternion\n */\n static FromEulerAnglesToRef(x, y, z, result) {\n Quaternion.RotationYawPitchRollToRef(y, x, z, result);\n return result;\n }\n /**\n * Create a quaternion from Euler rotation vector\n * Example Playground https://playground.babylonjs.com/#L49EJ7#35\n * @param vec the Euler vector (x Pitch, y Yaw, z Roll)\n * @returns the new Quaternion\n */\n static FromEulerVector(vec) {\n const q = new Quaternion();\n Quaternion.RotationYawPitchRollToRef(vec._y, vec._x, vec._z, q);\n return q;\n }\n /**\n * Updates a quaternion from Euler rotation vector\n * Example Playground https://playground.babylonjs.com/#L49EJ7#36\n * @param vec the Euler vector (x Pitch, y Yaw, z Roll)\n * @param result the quaternion to store the result\n * @returns the updated quaternion\n */\n static FromEulerVectorToRef(vec, result) {\n Quaternion.RotationYawPitchRollToRef(vec._y, vec._x, vec._z, result);\n return result;\n }\n /**\n * Updates a quaternion so that it rotates vector vecFrom to vector vecTo\n * Example Playground - https://playground.babylonjs.com/#L49EJ7#70\n * @param vecFrom defines the direction vector from which to rotate\n * @param vecTo defines the direction vector to which to rotate\n * @param result the quaternion to store the result\n * @param epsilon defines the minimal dot value to define vecs as opposite. Default: `BABYLON.Epsilon`\n * @returns the updated quaternion\n */\n static FromUnitVectorsToRef(vecFrom, vecTo, result, epsilon = Epsilon) {\n const r = Vector3.Dot(vecFrom, vecTo) + 1;\n if (r < epsilon) {\n if (Math.abs(vecFrom.x) > Math.abs(vecFrom.z)) {\n result.set(-vecFrom.y, vecFrom.x, 0, 0);\n }\n else {\n result.set(0, -vecFrom.z, vecFrom.y, 0);\n }\n }\n else {\n Vector3.CrossToRef(vecFrom, vecTo, TmpVectors.Vector3[0]);\n result.set(TmpVectors.Vector3[0].x, TmpVectors.Vector3[0].y, TmpVectors.Vector3[0].z, r);\n }\n return result.normalize();\n }\n /**\n * Creates a new quaternion from the given Euler float angles (y, x, z)\n * Example Playground https://playground.babylonjs.com/#L49EJ7#77\n * @param yaw defines the rotation around Y axis\n * @param pitch defines the rotation around X axis\n * @param roll defines the rotation around Z axis\n * @returns the new quaternion\n */\n static RotationYawPitchRoll(yaw, pitch, roll) {\n const q = new Quaternion();\n Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, q);\n return q;\n }\n /**\n * Creates a new rotation from the given Euler float angles (y, x, z) and stores it in the target quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#78\n * @param yaw defines the rotation around Y axis\n * @param pitch defines the rotation around X axis\n * @param roll defines the rotation around Z axis\n * @param result defines the target quaternion\n * @returns result input\n */\n static RotationYawPitchRollToRef(yaw, pitch, roll, result) {\n // Produces a quaternion from Euler angles in the z-y-x orientation (Tait-Bryan angles)\n const halfRoll = roll * 0.5;\n const halfPitch = pitch * 0.5;\n const halfYaw = yaw * 0.5;\n const sinRoll = Math.sin(halfRoll);\n const cosRoll = Math.cos(halfRoll);\n const sinPitch = Math.sin(halfPitch);\n const cosPitch = Math.cos(halfPitch);\n const sinYaw = Math.sin(halfYaw);\n const cosYaw = Math.cos(halfYaw);\n result._x = cosYaw * sinPitch * cosRoll + sinYaw * cosPitch * sinRoll;\n result._y = sinYaw * cosPitch * cosRoll - cosYaw * sinPitch * sinRoll;\n result._z = cosYaw * cosPitch * sinRoll - sinYaw * sinPitch * cosRoll;\n result._w = cosYaw * cosPitch * cosRoll + sinYaw * sinPitch * sinRoll;\n result._isDirty = true;\n return result;\n }\n /**\n * Creates a new quaternion from the given Euler float angles expressed in z-x-z orientation\n * Example Playground https://playground.babylonjs.com/#L49EJ7#68\n * @param alpha defines the rotation around first axis\n * @param beta defines the rotation around second axis\n * @param gamma defines the rotation around third axis\n * @returns the new quaternion\n */\n static RotationAlphaBetaGamma(alpha, beta, gamma) {\n const result = new Quaternion();\n Quaternion.RotationAlphaBetaGammaToRef(alpha, beta, gamma, result);\n return result;\n }\n /**\n * Creates a new quaternion from the given Euler float angles expressed in z-x-z orientation and stores it in the target quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#69\n * @param alpha defines the rotation around first axis\n * @param beta defines the rotation around second axis\n * @param gamma defines the rotation around third axis\n * @param result defines the target quaternion\n * @returns result input\n */\n static RotationAlphaBetaGammaToRef(alpha, beta, gamma, result) {\n // Produces a quaternion from Euler angles in the z-x-z orientation\n const halfGammaPlusAlpha = (gamma + alpha) * 0.5;\n const halfGammaMinusAlpha = (gamma - alpha) * 0.5;\n const halfBeta = beta * 0.5;\n result._x = Math.cos(halfGammaMinusAlpha) * Math.sin(halfBeta);\n result._y = Math.sin(halfGammaMinusAlpha) * Math.sin(halfBeta);\n result._z = Math.sin(halfGammaPlusAlpha) * Math.cos(halfBeta);\n result._w = Math.cos(halfGammaPlusAlpha) * Math.cos(halfBeta);\n result._isDirty = true;\n return result;\n }\n /**\n * Creates a new quaternion containing the rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation)\n * Example Playground https://playground.babylonjs.com/#L49EJ7#75\n * @param axis1 defines the first axis\n * @param axis2 defines the second axis\n * @param axis3 defines the third axis\n * @returns the new quaternion\n */\n static RotationQuaternionFromAxis(axis1, axis2, axis3) {\n const quat = new Quaternion(0.0, 0.0, 0.0, 0.0);\n Quaternion.RotationQuaternionFromAxisToRef(axis1, axis2, axis3, quat);\n return quat;\n }\n /**\n * Creates a rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation) and stores it in the target quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#76\n * @param axis1 defines the first axis\n * @param axis2 defines the second axis\n * @param axis3 defines the third axis\n * @param ref defines the target quaternion\n * @returns result input\n */\n static RotationQuaternionFromAxisToRef(axis1, axis2, axis3, ref) {\n const rotMat = MathTmp.Matrix[0];\n Matrix.FromXYZAxesToRef(axis1.normalize(), axis2.normalize(), axis3.normalize(), rotMat);\n Quaternion.FromRotationMatrixToRef(rotMat, ref);\n return ref;\n }\n /**\n * Creates a new rotation value to orient an object to look towards the given forward direction, the up direction being oriented like \"up\".\n * This function works in left handed mode\n * Example Playground https://playground.babylonjs.com/#L49EJ7#96\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\n * @returns A new quaternion oriented toward the specified forward and up.\n */\n static FromLookDirectionLH(forward, up) {\n const quat = new Quaternion();\n Quaternion.FromLookDirectionLHToRef(forward, up, quat);\n return quat;\n }\n /**\n * Creates a new rotation value to orient an object to look towards the given forward direction with the up direction being oriented like \"up\", and stores it in the target quaternion.\n * This function works in left handed mode\n * Example Playground https://playground.babylonjs.com/#L49EJ7#97\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\n * @param ref defines the target quaternion.\n * @returns result input\n */\n static FromLookDirectionLHToRef(forward, up, ref) {\n const rotMat = MathTmp.Matrix[0];\n Matrix.LookDirectionLHToRef(forward, up, rotMat);\n Quaternion.FromRotationMatrixToRef(rotMat, ref);\n return ref;\n }\n /**\n * Creates a new rotation value to orient an object to look towards the given forward direction, the up direction being oriented like \"up\".\n * This function works in right handed mode\n * Example Playground https://playground.babylonjs.com/#L49EJ7#98\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\n * @returns A new quaternion oriented toward the specified forward and up.\n */\n static FromLookDirectionRH(forward, up) {\n const quat = new Quaternion();\n Quaternion.FromLookDirectionRHToRef(forward, up, quat);\n return quat;\n }\n /**\n * Creates a new rotation value to orient an object to look towards the given forward direction with the up direction being oriented like \"up\", and stores it in the target quaternion.\n * This function works in right handed mode\n * Example Playground https://playground.babylonjs.com/#L49EJ7#105\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\n * @param ref defines the target quaternion.\n * @returns result input\n */\n static FromLookDirectionRHToRef(forward, up, ref) {\n const rotMat = MathTmp.Matrix[0];\n Matrix.LookDirectionRHToRef(forward, up, rotMat);\n return Quaternion.FromRotationMatrixToRef(rotMat, ref);\n }\n /**\n * Interpolates between two quaternions\n * Example Playground https://playground.babylonjs.com/#L49EJ7#79\n * @param left defines first quaternion\n * @param right defines second quaternion\n * @param amount defines the gradient to use\n * @returns the new interpolated quaternion\n */\n static Slerp(left, right, amount) {\n const result = Quaternion.Identity();\n Quaternion.SlerpToRef(left, right, amount, result);\n return result;\n }\n /**\n * Interpolates between two quaternions and stores it into a target quaternion\n * Example Playground https://playground.babylonjs.com/#L49EJ7#92\n * @param left defines first quaternion\n * @param right defines second quaternion\n * @param amount defines the gradient to use\n * @param result defines the target quaternion\n * @returns result input\n */\n static SlerpToRef(left, right, amount, result) {\n let num2;\n let num3;\n let num4 = left._x * right._x + left._y * right._y + left._z * right._z + left._w * right._w;\n let flag = false;\n if (num4 < 0) {\n flag = true;\n num4 = -num4;\n }\n if (num4 > 0.999999) {\n num3 = 1 - amount;\n num2 = flag ? -amount : amount;\n }\n else {\n const num5 = Math.acos(num4);\n const num6 = 1.0 / Math.sin(num5);\n num3 = Math.sin((1.0 - amount) * num5) * num6;\n num2 = flag ? -Math.sin(amount * num5) * num6 : Math.sin(amount * num5) * num6;\n }\n result._x = num3 * left._x + num2 * right._x;\n result._y = num3 * left._y + num2 * right._y;\n result._z = num3 * left._z + num2 * right._z;\n result._w = num3 * left._w + num2 * right._w;\n result._isDirty = true;\n return result;\n }\n /**\n * Interpolate between two quaternions using Hermite interpolation\n * Example Playground https://playground.babylonjs.com/#L49EJ7#47\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#hermite-quaternion-spline\n * @param value1 defines first quaternion\n * @param tangent1 defines the incoming tangent\n * @param value2 defines second quaternion\n * @param tangent2 defines the outgoing tangent\n * @param amount defines the target quaternion\n * @returns the new interpolated quaternion\n */\n static Hermite(value1, tangent1, value2, tangent2, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\n const part2 = -2.0 * cubed + 3.0 * squared;\n const part3 = cubed - 2.0 * squared + amount;\n const part4 = cubed - squared;\n const x = value1._x * part1 + value2._x * part2 + tangent1._x * part3 + tangent2._x * part4;\n const y = value1._y * part1 + value2._y * part2 + tangent1._y * part3 + tangent2._y * part4;\n const z = value1._z * part1 + value2._z * part2 + tangent1._z * part3 + tangent2._z * part4;\n const w = value1._w * part1 + value2._w * part2 + tangent1._w * part3 + tangent2._w * part4;\n return new value1.constructor(x, y, z, w);\n }\n /**\n * Returns a new Quaternion which is the 1st derivative of the Hermite spline defined by the quaternions \"value1\", \"value2\", \"tangent1\", \"tangent2\".\n * Example Playground https://playground.babylonjs.com/#L49EJ7#48\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param time define where the derivative must be done\n * @returns 1st derivative\n */\n static Hermite1stDerivative(value1, tangent1, value2, tangent2, time) {\n const result = new value1.constructor();\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\n return result;\n }\n /**\n * Update a Quaternion with the 1st derivative of the Hermite spline defined by the quaternions \"value1\", \"value2\", \"tangent1\", \"tangent2\".\n * Example Playground https://playground.babylonjs.com/#L49EJ7#49\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param time define where the derivative must be done\n * @param result define where to store the derivative\n * @returns result input\n */\n static Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result) {\n const t2 = time * time;\n result._x = (t2 - time) * 6 * value1._x + (3 * t2 - 4 * time + 1) * tangent1._x + (-t2 + time) * 6 * value2._x + (3 * t2 - 2 * time) * tangent2._x;\n result._y = (t2 - time) * 6 * value1._y + (3 * t2 - 4 * time + 1) * tangent1._y + (-t2 + time) * 6 * value2._y + (3 * t2 - 2 * time) * tangent2._y;\n result._z = (t2 - time) * 6 * value1._z + (3 * t2 - 4 * time + 1) * tangent1._z + (-t2 + time) * 6 * value2._z + (3 * t2 - 2 * time) * tangent2._z;\n result._w = (t2 - time) * 6 * value1._w + (3 * t2 - 4 * time + 1) * tangent1._w + (-t2 + time) * 6 * value2._w + (3 * t2 - 2 * time) * tangent2._w;\n result._isDirty = true;\n return result;\n }\n /**\n * Returns a new Quaternion as the normalization of the given Quaternion\n * @param quat defines the Quaternion to normalize\n * @returns the new Quaternion\n */\n static Normalize(quat) {\n const result = Quaternion.Zero();\n Quaternion.NormalizeToRef(quat, result);\n return result;\n }\n /**\n * Sets the given Quaternion \"result\" with the normalization of the given first Quaternion\n * @param quat defines the Quaternion to normalize\n * @param result defines the Quaternion where to store the result\n * @returns result input\n */\n static NormalizeToRef(quat, result) {\n quat.normalizeToRef(result);\n return result;\n }\n}\n/**\n * Class used to store matrix data (4x4)\n * Note on matrix definitions in Babylon.js for setting values directly\n * rather than using one of the methods available.\n * Matrix size is given by rows x columns.\n * A Vector3 is a 1 X 3 matrix [x, y, z].\n *\n * In Babylon.js multiplying a 1 x 3 matrix by a 4 x 4 matrix\n * is done using BABYLON.Vector4.TransformCoordinates(Vector3, Matrix).\n * and extending the passed Vector3 to a Vector4, V = [x, y, z, 1].\n * Let M be a matrix with elements m(row, column), so that\n * m(2, 3) is the element in row 2 column 3 of M.\n *\n * Multiplication is of the form VM and has the resulting Vector4\n * VM = [xm(0, 0) + ym(1, 0) + zm(2, 0) + m(3, 0), xm(0, 1) + ym(1, 1) + zm(2, 1) + m(3, 1), xm(0, 2) + ym(1, 2) + zm(2, 2) + m(3, 2), xm(0, 3) + ym(1, 3) + zm(2, 3) + m(3, 3)].\n * On the web you will find many examples that use the opposite convention of MV,\n * in which case to make use of the examples you will need to transpose the matrix.\n *\n * Example Playground - Overview Linear Algebra - https://playground.babylonjs.com/#AV9X17\n * Example Playground - Overview Transformation - https://playground.babylonjs.com/#AV9X17#1\n * Example Playground - Overview Projection - https://playground.babylonjs.com/#AV9X17#2\n */\nexport class Matrix {\n /**\n * Gets the precision of matrix computations\n */\n static get Use64Bits() {\n return PerformanceConfigurator.MatrixUse64Bits;\n }\n /**\n * Gets the internal data of the matrix\n */\n get m() {\n return this._m;\n }\n /**\n * Update the updateFlag to indicate that the matrix has been updated\n */\n markAsUpdated() {\n this.updateFlag = Matrix._UpdateFlagSeed++;\n this._isIdentity = false;\n this._isIdentity3x2 = false;\n this._isIdentityDirty = true;\n this._isIdentity3x2Dirty = true;\n }\n _updateIdentityStatus(isIdentity, isIdentityDirty = false, isIdentity3x2 = false, isIdentity3x2Dirty = true) {\n this._isIdentity = isIdentity;\n this._isIdentity3x2 = isIdentity || isIdentity3x2;\n this._isIdentityDirty = this._isIdentity ? false : isIdentityDirty;\n this._isIdentity3x2Dirty = this._isIdentity3x2 ? false : isIdentity3x2Dirty;\n }\n /**\n * Creates an empty matrix (filled with zeros)\n */\n constructor() {\n this._isIdentity = false;\n this._isIdentityDirty = true;\n this._isIdentity3x2 = true;\n this._isIdentity3x2Dirty = true;\n /**\n * Gets the update flag of the matrix which is an unique number for the matrix.\n * It will be incremented every time the matrix data change.\n * You can use it to speed the comparison between two versions of the same matrix.\n */\n this.updateFlag = -1;\n if (PerformanceConfigurator.MatrixTrackPrecisionChange) {\n PerformanceConfigurator.MatrixTrackedMatrices.push(this);\n }\n this._m = new PerformanceConfigurator.MatrixCurrentType(16);\n this.markAsUpdated();\n }\n // Properties\n /**\n * Check if the current matrix is identity\n * @returns true is the matrix is the identity matrix\n */\n isIdentity() {\n if (this._isIdentityDirty) {\n this._isIdentityDirty = false;\n const m = this._m;\n this._isIdentity =\n m[0] === 1.0 &&\n m[1] === 0.0 &&\n m[2] === 0.0 &&\n m[3] === 0.0 &&\n m[4] === 0.0 &&\n m[5] === 1.0 &&\n m[6] === 0.0 &&\n m[7] === 0.0 &&\n m[8] === 0.0 &&\n m[9] === 0.0 &&\n m[10] === 1.0 &&\n m[11] === 0.0 &&\n m[12] === 0.0 &&\n m[13] === 0.0 &&\n m[14] === 0.0 &&\n m[15] === 1.0;\n }\n return this._isIdentity;\n }\n /**\n * Check if the current matrix is identity as a texture matrix (3x2 store in 4x4)\n * @returns true is the matrix is the identity matrix\n */\n isIdentityAs3x2() {\n if (this._isIdentity3x2Dirty) {\n this._isIdentity3x2Dirty = false;\n if (this._m[0] !== 1.0 || this._m[5] !== 1.0 || this._m[15] !== 1.0) {\n this._isIdentity3x2 = false;\n }\n else if (this._m[1] !== 0.0 ||\n this._m[2] !== 0.0 ||\n this._m[3] !== 0.0 ||\n this._m[4] !== 0.0 ||\n this._m[6] !== 0.0 ||\n this._m[7] !== 0.0 ||\n this._m[8] !== 0.0 ||\n this._m[9] !== 0.0 ||\n this._m[10] !== 0.0 ||\n this._m[11] !== 0.0 ||\n this._m[12] !== 0.0 ||\n this._m[13] !== 0.0 ||\n this._m[14] !== 0.0) {\n this._isIdentity3x2 = false;\n }\n else {\n this._isIdentity3x2 = true;\n }\n }\n return this._isIdentity3x2;\n }\n /**\n * Gets the determinant of the matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#34\n * @returns the matrix determinant\n */\n determinant() {\n if (this._isIdentity === true) {\n return 1;\n }\n const m = this._m;\n const m00 = m[0], m01 = m[1], m02 = m[2], m03 = m[3];\n const m10 = m[4], m11 = m[5], m12 = m[6], m13 = m[7];\n const m20 = m[8], m21 = m[9], m22 = m[10], m23 = m[11];\n const m30 = m[12], m31 = m[13], m32 = m[14], m33 = m[15];\n // https://en.wikipedia.org/wiki/Laplace_expansion\n // to compute the deterrminant of a 4x4 Matrix we compute the cofactors of any row or column,\n // then we multiply each Cofactor by its corresponding matrix value and sum them all to get the determinant\n // Cofactor(i, j) = sign(i,j) * det(Minor(i, j))\n // where\n // - sign(i,j) = (i+j) % 2 === 0 ? 1 : -1\n // - Minor(i, j) is the 3x3 matrix we get by removing row i and column j from current Matrix\n //\n // Here we do that for the 1st row.\n const det_22_33 = m22 * m33 - m32 * m23;\n const det_21_33 = m21 * m33 - m31 * m23;\n const det_21_32 = m21 * m32 - m31 * m22;\n const det_20_33 = m20 * m33 - m30 * m23;\n const det_20_32 = m20 * m32 - m22 * m30;\n const det_20_31 = m20 * m31 - m30 * m21;\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\n return m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\n }\n // Methods\n /**\n * Gets a string with the Matrix values\n * @returns a string with the Matrix values\n */\n toString() {\n return `{${this.m[0]}, ${this.m[1]}, ${this.m[2]}, ${this.m[3]}\\n${this.m[4]}, ${this.m[5]}, ${this.m[6]}, ${this.m[7]}\\n${this.m[8]}, ${this.m[9]}, ${this.m[10]}, ${this.m[11]}\\n${this.m[12]}, ${this.m[13]}, ${this.m[14]}, ${this.m[15]}}`;\n }\n /**\n * Returns the matrix as a Float32Array or Array\n * Example Playground - https://playground.babylonjs.com/#AV9X17#49\n * @returns the matrix underlying array\n */\n toArray() {\n return this._m;\n }\n /**\n * Returns the matrix as a Float32Array or Array\n * Example Playground - https://playground.babylonjs.com/#AV9X17#114\n * @returns the matrix underlying array.\n */\n asArray() {\n return this._m;\n }\n /**\n * Inverts the current matrix in place\n * Example Playground - https://playground.babylonjs.com/#AV9X17#118\n * @returns the current inverted matrix\n */\n invert() {\n this.invertToRef(this);\n return this;\n }\n /**\n * Sets all the matrix elements to zero\n * @returns the current matrix\n */\n reset() {\n Matrix.FromValuesToRef(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, this);\n this._updateIdentityStatus(false);\n return this;\n }\n /**\n * Adds the current matrix with a second one\n * Example Playground - https://playground.babylonjs.com/#AV9X17#44\n * @param other defines the matrix to add\n * @returns a new matrix as the addition of the current matrix and the given one\n */\n add(other) {\n const result = new this.constructor();\n this.addToRef(other, result);\n return result;\n }\n /**\n * Sets the given matrix \"result\" to the addition of the current matrix and the given one\n * Example Playground - https://playground.babylonjs.com/#AV9X17#45\n * @param other defines the matrix to add\n * @param result defines the target matrix\n * @returns result input\n */\n addToRef(other, result) {\n const m = this._m;\n const resultM = result._m;\n const otherM = other.m;\n for (let index = 0; index < 16; index++) {\n resultM[index] = m[index] + otherM[index];\n }\n result.markAsUpdated();\n return result;\n }\n /**\n * Adds in place the given matrix to the current matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#46\n * @param other defines the second operand\n * @returns the current updated matrix\n */\n addToSelf(other) {\n const m = this._m;\n const otherM = other.m;\n for (let index = 0; index < 16; index++) {\n m[index] += otherM[index];\n }\n this.markAsUpdated();\n return this;\n }\n /**\n * Sets the given matrix to the current inverted Matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#119\n * @param other defines the target matrix\n * @returns result input\n */\n invertToRef(other) {\n if (this._isIdentity === true) {\n Matrix.IdentityToRef(other);\n return other;\n }\n // the inverse of a Matrix is the transpose of cofactor matrix divided by the determinant\n const m = this._m;\n const m00 = m[0], m01 = m[1], m02 = m[2], m03 = m[3];\n const m10 = m[4], m11 = m[5], m12 = m[6], m13 = m[7];\n const m20 = m[8], m21 = m[9], m22 = m[10], m23 = m[11];\n const m30 = m[12], m31 = m[13], m32 = m[14], m33 = m[15];\n const det_22_33 = m22 * m33 - m32 * m23;\n const det_21_33 = m21 * m33 - m31 * m23;\n const det_21_32 = m21 * m32 - m31 * m22;\n const det_20_33 = m20 * m33 - m30 * m23;\n const det_20_32 = m20 * m32 - m22 * m30;\n const det_20_31 = m20 * m31 - m30 * m21;\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\n const det = m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\n if (det === 0) {\n // not invertible\n other.copyFrom(this);\n return other;\n }\n const detInv = 1 / det;\n const det_12_33 = m12 * m33 - m32 * m13;\n const det_11_33 = m11 * m33 - m31 * m13;\n const det_11_32 = m11 * m32 - m31 * m12;\n const det_10_33 = m10 * m33 - m30 * m13;\n const det_10_32 = m10 * m32 - m30 * m12;\n const det_10_31 = m10 * m31 - m30 * m11;\n const det_12_23 = m12 * m23 - m22 * m13;\n const det_11_23 = m11 * m23 - m21 * m13;\n const det_11_22 = m11 * m22 - m21 * m12;\n const det_10_23 = m10 * m23 - m20 * m13;\n const det_10_22 = m10 * m22 - m20 * m12;\n const det_10_21 = m10 * m21 - m20 * m11;\n const cofact_10 = -(m01 * det_22_33 - m02 * det_21_33 + m03 * det_21_32);\n const cofact_11 = +(m00 * det_22_33 - m02 * det_20_33 + m03 * det_20_32);\n const cofact_12 = -(m00 * det_21_33 - m01 * det_20_33 + m03 * det_20_31);\n const cofact_13 = +(m00 * det_21_32 - m01 * det_20_32 + m02 * det_20_31);\n const cofact_20 = +(m01 * det_12_33 - m02 * det_11_33 + m03 * det_11_32);\n const cofact_21 = -(m00 * det_12_33 - m02 * det_10_33 + m03 * det_10_32);\n const cofact_22 = +(m00 * det_11_33 - m01 * det_10_33 + m03 * det_10_31);\n const cofact_23 = -(m00 * det_11_32 - m01 * det_10_32 + m02 * det_10_31);\n const cofact_30 = -(m01 * det_12_23 - m02 * det_11_23 + m03 * det_11_22);\n const cofact_31 = +(m00 * det_12_23 - m02 * det_10_23 + m03 * det_10_22);\n const cofact_32 = -(m00 * det_11_23 - m01 * det_10_23 + m03 * det_10_21);\n const cofact_33 = +(m00 * det_11_22 - m01 * det_10_22 + m02 * det_10_21);\n Matrix.FromValuesToRef(cofact_00 * detInv, cofact_10 * detInv, cofact_20 * detInv, cofact_30 * detInv, cofact_01 * detInv, cofact_11 * detInv, cofact_21 * detInv, cofact_31 * detInv, cofact_02 * detInv, cofact_12 * detInv, cofact_22 * detInv, cofact_32 * detInv, cofact_03 * detInv, cofact_13 * detInv, cofact_23 * detInv, cofact_33 * detInv, other);\n return other;\n }\n /**\n * add a value at the specified position in the current Matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#47\n * @param index the index of the value within the matrix. between 0 and 15.\n * @param value the value to be added\n * @returns the current updated matrix\n */\n addAtIndex(index, value) {\n this._m[index] += value;\n this.markAsUpdated();\n return this;\n }\n /**\n * mutiply the specified position in the current Matrix by a value\n * @param index the index of the value within the matrix. between 0 and 15.\n * @param value the value to be added\n * @returns the current updated matrix\n */\n multiplyAtIndex(index, value) {\n this._m[index] *= value;\n this.markAsUpdated();\n return this;\n }\n /**\n * Inserts the translation vector (using 3 floats) in the current matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#120\n * @param x defines the 1st component of the translation\n * @param y defines the 2nd component of the translation\n * @param z defines the 3rd component of the translation\n * @returns the current updated matrix\n */\n setTranslationFromFloats(x, y, z) {\n this._m[12] = x;\n this._m[13] = y;\n this._m[14] = z;\n this.markAsUpdated();\n return this;\n }\n /**\n * Adds the translation vector (using 3 floats) in the current matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#20\n * Example Playground - https://playground.babylonjs.com/#AV9X17#48\n * @param x defines the 1st component of the translation\n * @param y defines the 2nd component of the translation\n * @param z defines the 3rd component of the translation\n * @returns the current updated matrix\n */\n addTranslationFromFloats(x, y, z) {\n this._m[12] += x;\n this._m[13] += y;\n this._m[14] += z;\n this.markAsUpdated();\n return this;\n }\n /**\n * Inserts the translation vector in the current matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#121\n * @param vector3 defines the translation to insert\n * @returns the current updated matrix\n */\n setTranslation(vector3) {\n return this.setTranslationFromFloats(vector3._x, vector3._y, vector3._z);\n }\n /**\n * Gets the translation value of the current matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#122\n * @returns a new Vector3 as the extracted translation from the matrix\n */\n getTranslation() {\n return new Vector3(this._m[12], this._m[13], this._m[14]);\n }\n /**\n * Fill a Vector3 with the extracted translation from the matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#123\n * @param result defines the Vector3 where to store the translation\n * @returns the current matrix\n */\n getTranslationToRef(result) {\n result.x = this._m[12];\n result.y = this._m[13];\n result.z = this._m[14];\n return result;\n }\n /**\n * Remove rotation and scaling part from the matrix\n * @returns the updated matrix\n */\n removeRotationAndScaling() {\n const m = this.m;\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, m[12], m[13], m[14], m[15], this);\n this._updateIdentityStatus(m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1);\n return this;\n }\n /**\n * Multiply two matrices\n * Example Playground - https://playground.babylonjs.com/#AV9X17#15\n * A.multiply(B) means apply B to A so result is B x A\n * @param other defines the second operand\n * @returns a new matrix set with the multiplication result of the current Matrix and the given one\n */\n multiply(other) {\n const result = new this.constructor();\n this.multiplyToRef(other, result);\n return result;\n }\n /**\n * Copy the current matrix from the given one\n * Example Playground - https://playground.babylonjs.com/#AV9X17#21\n * @param other defines the source matrix\n * @returns the current updated matrix\n */\n copyFrom(other) {\n other.copyToArray(this._m);\n const o = other;\n this.updateFlag = o.updateFlag;\n this._updateIdentityStatus(o._isIdentity, o._isIdentityDirty, o._isIdentity3x2, o._isIdentity3x2Dirty);\n return this;\n }\n /**\n * Populates the given array from the starting index with the current matrix values\n * @param array defines the target array\n * @param offset defines the offset in the target array where to start storing values\n * @returns the current matrix\n */\n copyToArray(array, offset = 0) {\n const source = this._m;\n array[offset] = source[0];\n array[offset + 1] = source[1];\n array[offset + 2] = source[2];\n array[offset + 3] = source[3];\n array[offset + 4] = source[4];\n array[offset + 5] = source[5];\n array[offset + 6] = source[6];\n array[offset + 7] = source[7];\n array[offset + 8] = source[8];\n array[offset + 9] = source[9];\n array[offset + 10] = source[10];\n array[offset + 11] = source[11];\n array[offset + 12] = source[12];\n array[offset + 13] = source[13];\n array[offset + 14] = source[14];\n array[offset + 15] = source[15];\n return this;\n }\n /**\n * Sets the given matrix \"result\" with the multiplication result of the current Matrix and the given one\n * A.multiplyToRef(B, R) means apply B to A and store in R and R = B x A\n * Example Playground - https://playground.babylonjs.com/#AV9X17#16\n * @param other defines the second operand\n * @param result defines the matrix where to store the multiplication\n * @returns result input\n */\n multiplyToRef(other, result) {\n if (this._isIdentity) {\n result.copyFrom(other);\n return result;\n }\n if (other._isIdentity) {\n result.copyFrom(this);\n return result;\n }\n this.multiplyToArray(other, result._m, 0);\n result.markAsUpdated();\n return result;\n }\n /**\n * Sets the Float32Array \"result\" from the given index \"offset\" with the multiplication of the current matrix and the given one\n * @param other defines the second operand\n * @param result defines the array where to store the multiplication\n * @param offset defines the offset in the target array where to start storing values\n * @returns the current matrix\n */\n multiplyToArray(other, result, offset) {\n const m = this._m;\n const otherM = other.m;\n const tm0 = m[0], tm1 = m[1], tm2 = m[2], tm3 = m[3];\n const tm4 = m[4], tm5 = m[5], tm6 = m[6], tm7 = m[7];\n const tm8 = m[8], tm9 = m[9], tm10 = m[10], tm11 = m[11];\n const tm12 = m[12], tm13 = m[13], tm14 = m[14], tm15 = m[15];\n const om0 = otherM[0], om1 = otherM[1], om2 = otherM[2], om3 = otherM[3];\n const om4 = otherM[4], om5 = otherM[5], om6 = otherM[6], om7 = otherM[7];\n const om8 = otherM[8], om9 = otherM[9], om10 = otherM[10], om11 = otherM[11];\n const om12 = otherM[12], om13 = otherM[13], om14 = otherM[14], om15 = otherM[15];\n result[offset] = tm0 * om0 + tm1 * om4 + tm2 * om8 + tm3 * om12;\n result[offset + 1] = tm0 * om1 + tm1 * om5 + tm2 * om9 + tm3 * om13;\n result[offset + 2] = tm0 * om2 + tm1 * om6 + tm2 * om10 + tm3 * om14;\n result[offset + 3] = tm0 * om3 + tm1 * om7 + tm2 * om11 + tm3 * om15;\n result[offset + 4] = tm4 * om0 + tm5 * om4 + tm6 * om8 + tm7 * om12;\n result[offset + 5] = tm4 * om1 + tm5 * om5 + tm6 * om9 + tm7 * om13;\n result[offset + 6] = tm4 * om2 + tm5 * om6 + tm6 * om10 + tm7 * om14;\n result[offset + 7] = tm4 * om3 + tm5 * om7 + tm6 * om11 + tm7 * om15;\n result[offset + 8] = tm8 * om0 + tm9 * om4 + tm10 * om8 + tm11 * om12;\n result[offset + 9] = tm8 * om1 + tm9 * om5 + tm10 * om9 + tm11 * om13;\n result[offset + 10] = tm8 * om2 + tm9 * om6 + tm10 * om10 + tm11 * om14;\n result[offset + 11] = tm8 * om3 + tm9 * om7 + tm10 * om11 + tm11 * om15;\n result[offset + 12] = tm12 * om0 + tm13 * om4 + tm14 * om8 + tm15 * om12;\n result[offset + 13] = tm12 * om1 + tm13 * om5 + tm14 * om9 + tm15 * om13;\n result[offset + 14] = tm12 * om2 + tm13 * om6 + tm14 * om10 + tm15 * om14;\n result[offset + 15] = tm12 * om3 + tm13 * om7 + tm14 * om11 + tm15 * om15;\n return this;\n }\n /**\n * Check equality between this matrix and a second one\n * @param value defines the second matrix to compare\n * @returns true is the current matrix and the given one values are strictly equal\n */\n equals(value) {\n const other = value;\n if (!other) {\n return false;\n }\n if (this._isIdentity || other._isIdentity) {\n if (!this._isIdentityDirty && !other._isIdentityDirty) {\n return this._isIdentity && other._isIdentity;\n }\n }\n const m = this.m;\n const om = other.m;\n return (m[0] === om[0] &&\n m[1] === om[1] &&\n m[2] === om[2] &&\n m[3] === om[3] &&\n m[4] === om[4] &&\n m[5] === om[5] &&\n m[6] === om[6] &&\n m[7] === om[7] &&\n m[8] === om[8] &&\n m[9] === om[9] &&\n m[10] === om[10] &&\n m[11] === om[11] &&\n m[12] === om[12] &&\n m[13] === om[13] &&\n m[14] === om[14] &&\n m[15] === om[15]);\n }\n /**\n * Clone the current matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#18\n * @returns a new matrix from the current matrix\n */\n clone() {\n const matrix = new this.constructor();\n matrix.copyFrom(this);\n return matrix;\n }\n /**\n * Returns the name of the current matrix class\n * @returns the string \"Matrix\"\n */\n getClassName() {\n return \"Matrix\";\n }\n /**\n * Gets the hash code of the current matrix\n * @returns the hash code\n */\n getHashCode() {\n let hash = _ExtractAsInt(this._m[0]);\n for (let i = 1; i < 16; i++) {\n hash = (hash * 397) ^ _ExtractAsInt(this._m[i]);\n }\n return hash;\n }\n /**\n * Decomposes the current Matrix into a translation, rotation and scaling components of the provided node\n * Example Playground - https://playground.babylonjs.com/#AV9X17#13\n * @param node the node to decompose the matrix to\n * @returns true if operation was successful\n */\n decomposeToTransformNode(node) {\n node.rotationQuaternion = node.rotationQuaternion || new Quaternion();\n return this.decompose(node.scaling, node.rotationQuaternion, node.position);\n }\n /**\n * Decomposes the current Matrix into a translation, rotation and scaling components\n * Example Playground - https://playground.babylonjs.com/#AV9X17#12\n * @param scale defines the scale vector3 given as a reference to update\n * @param rotation defines the rotation quaternion given as a reference to update\n * @param translation defines the translation vector3 given as a reference to update\n * @param preserveScalingNode Use scaling sign coming from this node. Otherwise scaling sign might change.\n * @returns true if operation was successful\n */\n decompose(scale, rotation, translation, preserveScalingNode) {\n if (this._isIdentity) {\n if (translation) {\n translation.setAll(0);\n }\n if (scale) {\n scale.setAll(1);\n }\n if (rotation) {\n rotation.copyFromFloats(0, 0, 0, 1);\n }\n return true;\n }\n const m = this._m;\n if (translation) {\n translation.copyFromFloats(m[12], m[13], m[14]);\n }\n scale = scale || MathTmp.Vector3[0];\n scale.x = Math.sqrt(m[0] * m[0] + m[1] * m[1] + m[2] * m[2]);\n scale.y = Math.sqrt(m[4] * m[4] + m[5] * m[5] + m[6] * m[6]);\n scale.z = Math.sqrt(m[8] * m[8] + m[9] * m[9] + m[10] * m[10]);\n if (preserveScalingNode) {\n const signX = preserveScalingNode.absoluteScaling.x < 0 ? -1 : 1;\n const signY = preserveScalingNode.absoluteScaling.y < 0 ? -1 : 1;\n const signZ = preserveScalingNode.absoluteScaling.z < 0 ? -1 : 1;\n scale.x *= signX;\n scale.y *= signY;\n scale.z *= signZ;\n }\n else {\n if (this.determinant() <= 0) {\n scale.y *= -1;\n }\n }\n if (scale._x === 0 || scale._y === 0 || scale._z === 0) {\n if (rotation) {\n rotation.copyFromFloats(0.0, 0.0, 0.0, 1.0);\n }\n return false;\n }\n if (rotation) {\n const sx = 1 / scale._x, sy = 1 / scale._y, sz = 1 / scale._z;\n Matrix.FromValuesToRef(m[0] * sx, m[1] * sx, m[2] * sx, 0.0, m[4] * sy, m[5] * sy, m[6] * sy, 0.0, m[8] * sz, m[9] * sz, m[10] * sz, 0.0, 0.0, 0.0, 0.0, 1.0, MathTmp.Matrix[0]);\n Quaternion.FromRotationMatrixToRef(MathTmp.Matrix[0], rotation);\n }\n return true;\n }\n /**\n * Gets specific row of the matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#36\n * @param index defines the number of the row to get\n * @returns the index-th row of the current matrix as a new Vector4\n */\n getRow(index) {\n if (index < 0 || index > 3) {\n return null;\n }\n const i = index * 4;\n return new Vector4(this._m[i + 0], this._m[i + 1], this._m[i + 2], this._m[i + 3]);\n }\n /**\n * Gets specific row of the matrix to ref\n * Example Playground - https://playground.babylonjs.com/#AV9X17#36\n * @param index defines the number of the row to get\n * @param rowVector vector to store the index-th row of the current matrix\n * @returns result input\n */\n getRowToRef(index, rowVector) {\n if (index >= 0 && index < 3) {\n const i = index * 4;\n rowVector.x = this._m[i + 0];\n rowVector.y = this._m[i + 1];\n rowVector.z = this._m[i + 2];\n rowVector.w = this._m[i + 3];\n }\n return rowVector;\n }\n /**\n * Sets the index-th row of the current matrix to the vector4 values\n * Example Playground - https://playground.babylonjs.com/#AV9X17#36\n * @param index defines the number of the row to set\n * @param row defines the target vector4\n * @returns the updated current matrix\n */\n setRow(index, row) {\n return this.setRowFromFloats(index, row.x, row.y, row.z, row.w);\n }\n /**\n * Compute the transpose of the matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#40\n * @returns the new transposed matrix\n */\n transpose() {\n const result = new this.constructor();\n Matrix.TransposeToRef(this, result);\n return result;\n }\n /**\n * Compute the transpose of the matrix and store it in a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#41\n * @param result defines the target matrix\n * @returns result input\n */\n transposeToRef(result) {\n Matrix.TransposeToRef(this, result);\n return result;\n }\n /**\n * Sets the index-th row of the current matrix with the given 4 x float values\n * Example Playground - https://playground.babylonjs.com/#AV9X17#36\n * @param index defines the row index\n * @param x defines the x component to set\n * @param y defines the y component to set\n * @param z defines the z component to set\n * @param w defines the w component to set\n * @returns the updated current matrix\n */\n setRowFromFloats(index, x, y, z, w) {\n if (index < 0 || index > 3) {\n return this;\n }\n const i = index * 4;\n this._m[i + 0] = x;\n this._m[i + 1] = y;\n this._m[i + 2] = z;\n this._m[i + 3] = w;\n this.markAsUpdated();\n return this;\n }\n /**\n * Compute a new matrix set with the current matrix values multiplied by scale (float)\n * @param scale defines the scale factor\n * @returns a new matrix\n */\n scale(scale) {\n const result = new this.constructor();\n this.scaleToRef(scale, result);\n return result;\n }\n /**\n * Scale the current matrix values by a factor to a given result matrix\n * @param scale defines the scale factor\n * @param result defines the matrix to store the result\n * @returns result input\n */\n scaleToRef(scale, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] = this._m[index] * scale;\n }\n result.markAsUpdated();\n return result;\n }\n /**\n * Scale the current matrix values by a factor and add the result to a given matrix\n * @param scale defines the scale factor\n * @param result defines the Matrix to store the result\n * @returns result input\n */\n scaleAndAddToRef(scale, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] += this._m[index] * scale;\n }\n result.markAsUpdated();\n return result;\n }\n /**\n * Writes to the given matrix a normal matrix, computed from this one (using values from identity matrix for fourth row and column).\n * Example Playground - https://playground.babylonjs.com/#AV9X17#17\n * @param ref matrix to store the result\n */\n toNormalMatrix(ref) {\n const tmp = MathTmp.Matrix[0];\n this.invertToRef(tmp);\n tmp.transposeToRef(ref);\n const m = ref._m;\n Matrix.FromValuesToRef(m[0], m[1], m[2], 0.0, m[4], m[5], m[6], 0.0, m[8], m[9], m[10], 0.0, 0.0, 0.0, 0.0, 1.0, ref);\n return ref;\n }\n /**\n * Gets only rotation part of the current matrix\n * @returns a new matrix sets to the extracted rotation matrix from the current one\n */\n getRotationMatrix() {\n const result = new this.constructor();\n this.getRotationMatrixToRef(result);\n return result;\n }\n /**\n * Extracts the rotation matrix from the current one and sets it as the given \"result\"\n * @param result defines the target matrix to store data to\n * @returns result input\n */\n getRotationMatrixToRef(result) {\n const scale = MathTmp.Vector3[0];\n if (!this.decompose(scale)) {\n Matrix.IdentityToRef(result);\n return result;\n }\n const m = this._m;\n const sx = 1 / scale._x, sy = 1 / scale._y, sz = 1 / scale._z;\n Matrix.FromValuesToRef(m[0] * sx, m[1] * sx, m[2] * sx, 0.0, m[4] * sy, m[5] * sy, m[6] * sy, 0.0, m[8] * sz, m[9] * sz, m[10] * sz, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n return result;\n }\n /**\n * Toggles model matrix from being right handed to left handed in place and vice versa\n */\n toggleModelMatrixHandInPlace() {\n const m = this._m;\n m[2] *= -1;\n m[6] *= -1;\n m[8] *= -1;\n m[9] *= -1;\n m[14] *= -1;\n this.markAsUpdated();\n return this;\n }\n /**\n * Toggles projection matrix from being right handed to left handed in place and vice versa\n */\n toggleProjectionMatrixHandInPlace() {\n const m = this._m;\n m[8] *= -1;\n m[9] *= -1;\n m[10] *= -1;\n m[11] *= -1;\n this.markAsUpdated();\n return this;\n }\n // Statics\n /**\n * Creates a matrix from an array\n * Example Playground - https://playground.babylonjs.com/#AV9X17#42\n * @param array defines the source array\n * @param offset defines an offset in the source array\n * @returns a new Matrix set from the starting index of the given array\n */\n static FromArray(array, offset = 0) {\n const result = new Matrix();\n Matrix.FromArrayToRef(array, offset, result);\n return result;\n }\n /**\n * Copy the content of an array into a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#43\n * @param array defines the source array\n * @param offset defines an offset in the source array\n * @param result defines the target matrix\n * @returns result input\n */\n static FromArrayToRef(array, offset, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] = array[index + offset];\n }\n result.markAsUpdated();\n return result;\n }\n /**\n * Stores an array into a matrix after having multiplied each component by a given factor\n * Example Playground - https://playground.babylonjs.com/#AV9X17#50\n * @param array defines the source array\n * @param offset defines the offset in the source array\n * @param scale defines the scaling factor\n * @param result defines the target matrix\n * @returns result input\n */\n static FromFloat32ArrayToRefScaled(array, offset, scale, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] = array[index + offset] * scale;\n }\n result.markAsUpdated();\n return result;\n }\n /**\n * Gets an identity matrix that must not be updated\n */\n static get IdentityReadOnly() {\n return Matrix._IdentityReadOnly;\n }\n /**\n * Stores a list of values (16) inside a given matrix\n * @param initialM11 defines 1st value of 1st row\n * @param initialM12 defines 2nd value of 1st row\n * @param initialM13 defines 3rd value of 1st row\n * @param initialM14 defines 4th value of 1st row\n * @param initialM21 defines 1st value of 2nd row\n * @param initialM22 defines 2nd value of 2nd row\n * @param initialM23 defines 3rd value of 2nd row\n * @param initialM24 defines 4th value of 2nd row\n * @param initialM31 defines 1st value of 3rd row\n * @param initialM32 defines 2nd value of 3rd row\n * @param initialM33 defines 3rd value of 3rd row\n * @param initialM34 defines 4th value of 3rd row\n * @param initialM41 defines 1st value of 4th row\n * @param initialM42 defines 2nd value of 4th row\n * @param initialM43 defines 3rd value of 4th row\n * @param initialM44 defines 4th value of 4th row\n * @param result defines the target matrix\n * @returns result input\n */\n static FromValuesToRef(initialM11, initialM12, initialM13, initialM14, initialM21, initialM22, initialM23, initialM24, initialM31, initialM32, initialM33, initialM34, initialM41, initialM42, initialM43, initialM44, result) {\n const m = result._m;\n m[0] = initialM11;\n m[1] = initialM12;\n m[2] = initialM13;\n m[3] = initialM14;\n m[4] = initialM21;\n m[5] = initialM22;\n m[6] = initialM23;\n m[7] = initialM24;\n m[8] = initialM31;\n m[9] = initialM32;\n m[10] = initialM33;\n m[11] = initialM34;\n m[12] = initialM41;\n m[13] = initialM42;\n m[14] = initialM43;\n m[15] = initialM44;\n result.markAsUpdated();\n }\n /**\n * Creates new matrix from a list of values (16)\n * @param initialM11 defines 1st value of 1st row\n * @param initialM12 defines 2nd value of 1st row\n * @param initialM13 defines 3rd value of 1st row\n * @param initialM14 defines 4th value of 1st row\n * @param initialM21 defines 1st value of 2nd row\n * @param initialM22 defines 2nd value of 2nd row\n * @param initialM23 defines 3rd value of 2nd row\n * @param initialM24 defines 4th value of 2nd row\n * @param initialM31 defines 1st value of 3rd row\n * @param initialM32 defines 2nd value of 3rd row\n * @param initialM33 defines 3rd value of 3rd row\n * @param initialM34 defines 4th value of 3rd row\n * @param initialM41 defines 1st value of 4th row\n * @param initialM42 defines 2nd value of 4th row\n * @param initialM43 defines 3rd value of 4th row\n * @param initialM44 defines 4th value of 4th row\n * @returns the new matrix\n */\n static FromValues(initialM11, initialM12, initialM13, initialM14, initialM21, initialM22, initialM23, initialM24, initialM31, initialM32, initialM33, initialM34, initialM41, initialM42, initialM43, initialM44) {\n const result = new Matrix();\n const m = result._m;\n m[0] = initialM11;\n m[1] = initialM12;\n m[2] = initialM13;\n m[3] = initialM14;\n m[4] = initialM21;\n m[5] = initialM22;\n m[6] = initialM23;\n m[7] = initialM24;\n m[8] = initialM31;\n m[9] = initialM32;\n m[10] = initialM33;\n m[11] = initialM34;\n m[12] = initialM41;\n m[13] = initialM42;\n m[14] = initialM43;\n m[15] = initialM44;\n result.markAsUpdated();\n return result;\n }\n /**\n * Creates a new matrix composed by merging scale (vector3), rotation (quaternion) and translation (vector3)\n * Example Playground - https://playground.babylonjs.com/#AV9X17#24\n * @param scale defines the scale vector3\n * @param rotation defines the rotation quaternion\n * @param translation defines the translation vector3\n * @returns a new matrix\n */\n static Compose(scale, rotation, translation) {\n const result = new Matrix();\n Matrix.ComposeToRef(scale, rotation, translation, result);\n return result;\n }\n /**\n * Sets a matrix to a value composed by merging scale (vector3), rotation (quaternion) and translation (vector3)\n * Example Playground - https://playground.babylonjs.com/#AV9X17#25\n * @param scale defines the scale vector3\n * @param rotation defines the rotation quaternion\n * @param translation defines the translation vector3\n * @param result defines the target matrix\n * @returns result input\n */\n static ComposeToRef(scale, rotation, translation, result) {\n const m = result._m;\n const x = rotation._x, y = rotation._y, z = rotation._z, w = rotation._w;\n const x2 = x + x, y2 = y + y, z2 = z + z;\n const xx = x * x2, xy = x * y2, xz = x * z2;\n const yy = y * y2, yz = y * z2, zz = z * z2;\n const wx = w * x2, wy = w * y2, wz = w * z2;\n const sx = scale._x, sy = scale._y, sz = scale._z;\n m[0] = (1 - (yy + zz)) * sx;\n m[1] = (xy + wz) * sx;\n m[2] = (xz - wy) * sx;\n m[3] = 0;\n m[4] = (xy - wz) * sy;\n m[5] = (1 - (xx + zz)) * sy;\n m[6] = (yz + wx) * sy;\n m[7] = 0;\n m[8] = (xz + wy) * sz;\n m[9] = (yz - wx) * sz;\n m[10] = (1 - (xx + yy)) * sz;\n m[11] = 0;\n m[12] = translation._x;\n m[13] = translation._y;\n m[14] = translation._z;\n m[15] = 1;\n result.markAsUpdated();\n return result;\n }\n /**\n * Creates a new identity matrix\n * @returns a new identity matrix\n */\n static Identity() {\n const identity = Matrix.FromValues(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);\n identity._updateIdentityStatus(true);\n return identity;\n }\n /**\n * Creates a new identity matrix and stores the result in a given matrix\n * @param result defines the target matrix\n * @returns result input\n */\n static IdentityToRef(result) {\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n result._updateIdentityStatus(true);\n return result;\n }\n /**\n * Creates a new zero matrix\n * @returns a new zero matrix\n */\n static Zero() {\n const zero = Matrix.FromValues(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);\n zero._updateIdentityStatus(false);\n return zero;\n }\n /**\n * Creates a new rotation matrix for \"angle\" radians around the X axis\n * Example Playground - https://playground.babylonjs.com/#AV9X17#97\n * @param angle defines the angle (in radians) to use\n * @returns the new matrix\n */\n static RotationX(angle) {\n const result = new Matrix();\n Matrix.RotationXToRef(angle, result);\n return result;\n }\n /**\n * Creates a new matrix as the invert of a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#124\n * @param source defines the source matrix\n * @returns the new matrix\n */\n static Invert(source) {\n const result = new source.constructor();\n source.invertToRef(result);\n return result;\n }\n /**\n * Creates a new rotation matrix for \"angle\" radians around the X axis and stores it in a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#98\n * @param angle defines the angle (in radians) to use\n * @param result defines the target matrix\n * @returns result input\n */\n static RotationXToRef(angle, result) {\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, c, s, 0.0, 0.0, -s, c, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n result._updateIdentityStatus(c === 1 && s === 0);\n return result;\n }\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Y axis\n * Example Playground - https://playground.babylonjs.com/#AV9X17#99\n * @param angle defines the angle (in radians) to use\n * @returns the new matrix\n */\n static RotationY(angle) {\n const result = new Matrix();\n Matrix.RotationYToRef(angle, result);\n return result;\n }\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Y axis and stores it in a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#100\n * @param angle defines the angle (in radians) to use\n * @param result defines the target matrix\n * @returns result input\n */\n static RotationYToRef(angle, result) {\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n Matrix.FromValuesToRef(c, 0.0, -s, 0.0, 0.0, 1.0, 0.0, 0.0, s, 0.0, c, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n result._updateIdentityStatus(c === 1 && s === 0);\n return result;\n }\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Z axis\n * Example Playground - https://playground.babylonjs.com/#AV9X17#101\n * @param angle defines the angle (in radians) to use\n * @returns the new matrix\n */\n static RotationZ(angle) {\n const result = new Matrix();\n Matrix.RotationZToRef(angle, result);\n return result;\n }\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Z axis and stores it in a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#102\n * @param angle defines the angle (in radians) to use\n * @param result defines the target matrix\n * @returns result input\n */\n static RotationZToRef(angle, result) {\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n Matrix.FromValuesToRef(c, s, 0.0, 0.0, -s, c, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n result._updateIdentityStatus(c === 1 && s === 0);\n return result;\n }\n /**\n * Creates a new rotation matrix for \"angle\" radians around the given axis\n * Example Playground - https://playground.babylonjs.com/#AV9X17#96\n * @param axis defines the axis to use\n * @param angle defines the angle (in radians) to use\n * @returns the new matrix\n */\n static RotationAxis(axis, angle) {\n const result = new Matrix();\n Matrix.RotationAxisToRef(axis, angle, result);\n return result;\n }\n /**\n * Creates a new rotation matrix for \"angle\" radians around the given axis and stores it in a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#94\n * @param axis defines the axis to use\n * @param angle defines the angle (in radians) to use\n * @param result defines the target matrix\n * @returns result input\n */\n static RotationAxisToRef(axis, angle, result) {\n const s = Math.sin(-angle);\n const c = Math.cos(-angle);\n const c1 = 1 - c;\n axis.normalize();\n const m = result._m;\n m[0] = axis._x * axis._x * c1 + c;\n m[1] = axis._x * axis._y * c1 - axis._z * s;\n m[2] = axis._x * axis._z * c1 + axis._y * s;\n m[3] = 0.0;\n m[4] = axis._y * axis._x * c1 + axis._z * s;\n m[5] = axis._y * axis._y * c1 + c;\n m[6] = axis._y * axis._z * c1 - axis._x * s;\n m[7] = 0.0;\n m[8] = axis._z * axis._x * c1 - axis._y * s;\n m[9] = axis._z * axis._y * c1 + axis._x * s;\n m[10] = axis._z * axis._z * c1 + c;\n m[11] = 0.0;\n m[12] = 0.0;\n m[13] = 0.0;\n m[14] = 0.0;\n m[15] = 1.0;\n result.markAsUpdated();\n return result;\n }\n /**\n * Takes normalised vectors and returns a rotation matrix to align \"from\" with \"to\".\n * Taken from http://www.iquilezles.org/www/articles/noacos/noacos.htm\n * Example Playground - https://playground.babylonjs.com/#AV9X17#93\n * @param from defines the vector to align\n * @param to defines the vector to align to\n * @param result defines the target matrix\n * @param useYAxisForCoplanar defines a boolean indicating that we should favor Y axis for coplanar vectors (default is false)\n * @returns result input\n */\n static RotationAlignToRef(from, to, result, useYAxisForCoplanar = false) {\n const c = Vector3.Dot(to, from);\n const m = result._m;\n if (c < -1 + Epsilon) {\n // from and to are colinear and opposite direction.\n // compute a PI rotation on Y axis\n m[0] = -1;\n m[1] = 0;\n m[2] = 0;\n m[3] = 0;\n m[4] = 0;\n m[5] = useYAxisForCoplanar ? 1 : -1;\n m[6] = 0;\n m[7] = 0;\n m[8] = 0;\n m[9] = 0;\n m[10] = useYAxisForCoplanar ? -1 : 1;\n m[11] = 0;\n }\n else {\n const v = Vector3.Cross(to, from);\n const k = 1 / (1 + c);\n m[0] = v._x * v._x * k + c;\n m[1] = v._y * v._x * k - v._z;\n m[2] = v._z * v._x * k + v._y;\n m[3] = 0;\n m[4] = v._x * v._y * k + v._z;\n m[5] = v._y * v._y * k + c;\n m[6] = v._z * v._y * k - v._x;\n m[7] = 0;\n m[8] = v._x * v._z * k - v._y;\n m[9] = v._y * v._z * k + v._x;\n m[10] = v._z * v._z * k + c;\n m[11] = 0;\n }\n m[12] = 0;\n m[13] = 0;\n m[14] = 0;\n m[15] = 1;\n result.markAsUpdated();\n return result;\n }\n /**\n * Creates a rotation matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#103\n * Example Playground - https://playground.babylonjs.com/#AV9X17#105\n * @param yaw defines the yaw angle in radians (Y axis)\n * @param pitch defines the pitch angle in radians (X axis)\n * @param roll defines the roll angle in radians (Z axis)\n * @returns the new rotation matrix\n */\n static RotationYawPitchRoll(yaw, pitch, roll) {\n const result = new Matrix();\n Matrix.RotationYawPitchRollToRef(yaw, pitch, roll, result);\n return result;\n }\n /**\n * Creates a rotation matrix and stores it in a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#104\n * @param yaw defines the yaw angle in radians (Y axis)\n * @param pitch defines the pitch angle in radians (X axis)\n * @param roll defines the roll angle in radians (Z axis)\n * @param result defines the target matrix\n * @returns result input\n */\n static RotationYawPitchRollToRef(yaw, pitch, roll, result) {\n Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, MathTmp.Quaternion[0]);\n MathTmp.Quaternion[0].toRotationMatrix(result);\n return result;\n }\n /**\n * Creates a scaling matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#107\n * @param x defines the scale factor on X axis\n * @param y defines the scale factor on Y axis\n * @param z defines the scale factor on Z axis\n * @returns the new matrix\n */\n static Scaling(x, y, z) {\n const result = new Matrix();\n Matrix.ScalingToRef(x, y, z, result);\n return result;\n }\n /**\n * Creates a scaling matrix and stores it in a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#108\n * @param x defines the scale factor on X axis\n * @param y defines the scale factor on Y axis\n * @param z defines the scale factor on Z axis\n * @param result defines the target matrix\n * @returns result input\n */\n static ScalingToRef(x, y, z, result) {\n Matrix.FromValuesToRef(x, 0.0, 0.0, 0.0, 0.0, y, 0.0, 0.0, 0.0, 0.0, z, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n result._updateIdentityStatus(x === 1 && y === 1 && z === 1);\n return result;\n }\n /**\n * Creates a translation matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#109\n * @param x defines the translation on X axis\n * @param y defines the translation on Y axis\n * @param z defines the translationon Z axis\n * @returns the new matrix\n */\n static Translation(x, y, z) {\n const result = new Matrix();\n Matrix.TranslationToRef(x, y, z, result);\n return result;\n }\n /**\n * Creates a translation matrix and stores it in a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#110\n * @param x defines the translation on X axis\n * @param y defines the translation on Y axis\n * @param z defines the translationon Z axis\n * @param result defines the target matrix\n * @returns result input\n */\n static TranslationToRef(x, y, z, result) {\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, x, y, z, 1.0, result);\n result._updateIdentityStatus(x === 0 && y === 0 && z === 0);\n return result;\n }\n /**\n * Returns a new Matrix whose values are the interpolated values for \"gradient\" (float) between the ones of the matrices \"startValue\" and \"endValue\".\n * Example Playground - https://playground.babylonjs.com/#AV9X17#55\n * @param startValue defines the start value\n * @param endValue defines the end value\n * @param gradient defines the gradient factor\n * @returns the new matrix\n */\n static Lerp(startValue, endValue, gradient) {\n const result = new startValue.constructor();\n Matrix.LerpToRef(startValue, endValue, gradient, result);\n return result;\n }\n /**\n * Set the given matrix \"result\" as the interpolated values for \"gradient\" (float) between the ones of the matrices \"startValue\" and \"endValue\".\n * Example Playground - https://playground.babylonjs.com/#AV9X17#54\n * @param startValue defines the start value\n * @param endValue defines the end value\n * @param gradient defines the gradient factor\n * @param result defines the Matrix object where to store data\n * @returns result input\n */\n static LerpToRef(startValue, endValue, gradient, result) {\n const resultM = result._m;\n const startM = startValue.m;\n const endM = endValue.m;\n for (let index = 0; index < 16; index++) {\n resultM[index] = startM[index] * (1.0 - gradient) + endM[index] * gradient;\n }\n result.markAsUpdated();\n return result;\n }\n /**\n * Builds a new matrix whose values are computed by:\n * * decomposing the \"startValue\" and \"endValue\" matrices into their respective scale, rotation and translation matrices\n * * interpolating for \"gradient\" (float) the values between each of these decomposed matrices between the start and the end\n * * recomposing a new matrix from these 3 interpolated scale, rotation and translation matrices\n * Example Playground - https://playground.babylonjs.com/#AV9X17#22\n * Example Playground - https://playground.babylonjs.com/#AV9X17#51\n * @param startValue defines the first matrix\n * @param endValue defines the second matrix\n * @param gradient defines the gradient between the two matrices\n * @returns the new matrix\n */\n static DecomposeLerp(startValue, endValue, gradient) {\n const result = new startValue.constructor();\n Matrix.DecomposeLerpToRef(startValue, endValue, gradient, result);\n return result;\n }\n /**\n * Update a matrix to values which are computed by:\n * * decomposing the \"startValue\" and \"endValue\" matrices into their respective scale, rotation and translation matrices\n * * interpolating for \"gradient\" (float) the values between each of these decomposed matrices between the start and the end\n * * recomposing a new matrix from these 3 interpolated scale, rotation and translation matrices\n * Example Playground - https://playground.babylonjs.com/#AV9X17#23\n * Example Playground - https://playground.babylonjs.com/#AV9X17#53\n * @param startValue defines the first matrix\n * @param endValue defines the second matrix\n * @param gradient defines the gradient between the two matrices\n * @param result defines the target matrix\n * @returns result input\n */\n static DecomposeLerpToRef(startValue, endValue, gradient, result) {\n const startScale = MathTmp.Vector3[0];\n const startRotation = MathTmp.Quaternion[0];\n const startTranslation = MathTmp.Vector3[1];\n startValue.decompose(startScale, startRotation, startTranslation);\n const endScale = MathTmp.Vector3[2];\n const endRotation = MathTmp.Quaternion[1];\n const endTranslation = MathTmp.Vector3[3];\n endValue.decompose(endScale, endRotation, endTranslation);\n const resultScale = MathTmp.Vector3[4];\n Vector3.LerpToRef(startScale, endScale, gradient, resultScale);\n const resultRotation = MathTmp.Quaternion[2];\n Quaternion.SlerpToRef(startRotation, endRotation, gradient, resultRotation);\n const resultTranslation = MathTmp.Vector3[5];\n Vector3.LerpToRef(startTranslation, endTranslation, gradient, resultTranslation);\n Matrix.ComposeToRef(resultScale, resultRotation, resultTranslation, result);\n return result;\n }\n /**\n * Creates a new matrix that transforms vertices from world space to camera space. It takes three vectors as arguments that together describe the position and orientation of the camera.\n * This function generates a matrix suitable for a left handed coordinate system\n * Example Playground - https://playground.babylonjs.com/#AV9X17#58\n * Example Playground - https://playground.babylonjs.com/#AV9X17#59\n * @param eye defines the final position of the entity\n * @param target defines where the entity should look at\n * @param up defines the up vector for the entity\n * @returns the new matrix\n */\n static LookAtLH(eye, target, up) {\n const result = new Matrix();\n Matrix.LookAtLHToRef(eye, target, up, result);\n return result;\n }\n /**\n * Sets the given \"result\" Matrix to a matrix that transforms vertices from world space to camera space. It takes three vectors as arguments that together describe the position and orientation of the camera.\n * This function generates a matrix suitable for a left handed coordinate system\n * Example Playground - https://playground.babylonjs.com/#AV9X17#60\n * Example Playground - https://playground.babylonjs.com/#AV9X17#61\n * @param eye defines the final position of the entity\n * @param target defines where the entity should look at\n * @param up defines the up vector for the entity\n * @param result defines the target matrix\n * @returns result input\n */\n static LookAtLHToRef(eye, target, up, result) {\n const xAxis = MathTmp.Vector3[0];\n const yAxis = MathTmp.Vector3[1];\n const zAxis = MathTmp.Vector3[2];\n // Z axis\n target.subtractToRef(eye, zAxis);\n zAxis.normalize();\n // X axis\n Vector3.CrossToRef(up, zAxis, xAxis);\n const xSquareLength = xAxis.lengthSquared();\n if (xSquareLength === 0) {\n xAxis.x = 1.0;\n }\n else {\n xAxis.normalizeFromLength(Math.sqrt(xSquareLength));\n }\n // Y axis\n Vector3.CrossToRef(zAxis, xAxis, yAxis);\n yAxis.normalize();\n // Eye angles\n const ex = -Vector3.Dot(xAxis, eye);\n const ey = -Vector3.Dot(yAxis, eye);\n const ez = -Vector3.Dot(zAxis, eye);\n Matrix.FromValuesToRef(xAxis._x, yAxis._x, zAxis._x, 0.0, xAxis._y, yAxis._y, zAxis._y, 0.0, xAxis._z, yAxis._z, zAxis._z, 0.0, ex, ey, ez, 1.0, result);\n return result;\n }\n /**\n * Creates a new matrix that transforms vertices from world space to camera space. It takes three vectors as arguments that together describe the position and orientation of the camera.\n * This function generates a matrix suitable for a right handed coordinate system\n * Example Playground - https://playground.babylonjs.com/#AV9X17#62\n * Example Playground - https://playground.babylonjs.com/#AV9X17#63\n * @param eye defines the final position of the entity\n * @param target defines where the entity should look at\n * @param up defines the up vector for the entity\n * @returns the new matrix\n */\n static LookAtRH(eye, target, up) {\n const result = new Matrix();\n Matrix.LookAtRHToRef(eye, target, up, result);\n return result;\n }\n /**\n * Sets the given \"result\" Matrix to a matrix that transforms vertices from world space to camera space. It takes three vectors as arguments that together describe the position and orientation of the camera.\n * This function generates a matrix suitable for a right handed coordinate system\n * Example Playground - https://playground.babylonjs.com/#AV9X17#64\n * Example Playground - https://playground.babylonjs.com/#AV9X17#65\n * @param eye defines the final position of the entity\n * @param target defines where the entity should look at\n * @param up defines the up vector for the entity\n * @param result defines the target matrix\n * @returns result input\n */\n static LookAtRHToRef(eye, target, up, result) {\n const xAxis = MathTmp.Vector3[0];\n const yAxis = MathTmp.Vector3[1];\n const zAxis = MathTmp.Vector3[2];\n // Z axis\n eye.subtractToRef(target, zAxis);\n zAxis.normalize();\n // X axis\n Vector3.CrossToRef(up, zAxis, xAxis);\n const xSquareLength = xAxis.lengthSquared();\n if (xSquareLength === 0) {\n xAxis.x = 1.0;\n }\n else {\n xAxis.normalizeFromLength(Math.sqrt(xSquareLength));\n }\n // Y axis\n Vector3.CrossToRef(zAxis, xAxis, yAxis);\n yAxis.normalize();\n // Eye angles\n const ex = -Vector3.Dot(xAxis, eye);\n const ey = -Vector3.Dot(yAxis, eye);\n const ez = -Vector3.Dot(zAxis, eye);\n Matrix.FromValuesToRef(xAxis._x, yAxis._x, zAxis._x, 0.0, xAxis._y, yAxis._y, zAxis._y, 0.0, xAxis._z, yAxis._z, zAxis._z, 0.0, ex, ey, ez, 1.0, result);\n return result;\n }\n /**\n * Creates a new matrix that transforms vertices from world space to camera space. It takes two vectors as arguments that together describe the orientation of the camera. The position is assumed to be at the origin (0,0,0)\n * This function generates a matrix suitable for a left handed coordinate system\n * Example Playground - https://playground.babylonjs.com/#AV9X17#66\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\n * @returns the new matrix\n */\n static LookDirectionLH(forward, up) {\n const result = new Matrix();\n Matrix.LookDirectionLHToRef(forward, up, result);\n return result;\n }\n /**\n * Sets the given \"result\" Matrix to a matrix that transforms vertices from world space to camera space. It takes two vectors as arguments that together describe the orientation of the camera. The position is assumed to be at the origin (0,0,0)\n * This function generates a matrix suitable for a left handed coordinate system\n * Example Playground - https://playground.babylonjs.com/#AV9X17#67\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\n * @param result defines the target matrix\n * @returns result input\n */\n static LookDirectionLHToRef(forward, up, result) {\n const back = MathTmp.Vector3[0];\n back.copyFrom(forward);\n back.scaleInPlace(-1);\n const left = MathTmp.Vector3[1];\n Vector3.CrossToRef(up, back, left);\n // Generate the rotation matrix.\n Matrix.FromValuesToRef(left._x, left._y, left._z, 0.0, up._x, up._y, up._z, 0.0, back._x, back._y, back._z, 0.0, 0, 0, 0, 1.0, result);\n return result;\n }\n /**\n * Creates a new matrix that transforms vertices from world space to camera space. It takes two vectors as arguments that together describe the orientation of the camera. The position is assumed to be at the origin (0,0,0)\n * This function generates a matrix suitable for a right handed coordinate system\n * Example Playground - https://playground.babylonjs.com/#AV9X17#68\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\n * @returns the new matrix\n */\n static LookDirectionRH(forward, up) {\n const result = new Matrix();\n Matrix.LookDirectionRHToRef(forward, up, result);\n return result;\n }\n /**\n * Sets the given \"result\" Matrix to a matrix that transforms vertices from world space to camera space. It takes two vectors as arguments that together describe the orientation of the camera. The position is assumed to be at the origin (0,0,0)\n * This function generates a matrix suitable for a right handed coordinate system\n * Example Playground - https://playground.babylonjs.com/#AV9X17#69\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\n * @param result defines the target matrix\n * @returns result input\n */\n static LookDirectionRHToRef(forward, up, result) {\n const right = MathTmp.Vector3[2];\n Vector3.CrossToRef(up, forward, right);\n // Generate the rotation matrix.\n Matrix.FromValuesToRef(right._x, right._y, right._z, 0.0, up._x, up._y, up._z, 0.0, forward._x, forward._y, forward._z, 0.0, 0, 0, 0, 1.0, result);\n return result;\n }\n /**\n * Create a left-handed orthographic projection matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#70\n * @param width defines the viewport width\n * @param height defines the viewport height\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @returns a new matrix as a left-handed orthographic projection matrix\n */\n static OrthoLH(width, height, znear, zfar, halfZRange) {\n const matrix = new Matrix();\n Matrix.OrthoLHToRef(width, height, znear, zfar, matrix, halfZRange);\n return matrix;\n }\n /**\n * Store a left-handed orthographic projection to a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#71\n * @param width defines the viewport width\n * @param height defines the viewport height\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane\n * @param result defines the target matrix\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @returns result input\n */\n static OrthoLHToRef(width, height, znear, zfar, result, halfZRange) {\n const n = znear;\n const f = zfar;\n const a = 2.0 / width;\n const b = 2.0 / height;\n const c = 2.0 / (f - n);\n const d = -(f + n) / (f - n);\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 0.0, 0.0, 0.0, d, 1.0, result);\n if (halfZRange) {\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\n }\n result._updateIdentityStatus(a === 1 && b === 1 && c === 1 && d === 0);\n return result;\n }\n /**\n * Create a left-handed orthographic projection matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#72\n * @param left defines the viewport left coordinate\n * @param right defines the viewport right coordinate\n * @param bottom defines the viewport bottom coordinate\n * @param top defines the viewport top coordinate\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @returns a new matrix as a left-handed orthographic projection matrix\n */\n static OrthoOffCenterLH(left, right, bottom, top, znear, zfar, halfZRange) {\n const matrix = new Matrix();\n Matrix.OrthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, matrix, halfZRange);\n return matrix;\n }\n /**\n * Stores a left-handed orthographic projection into a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#73\n * @param left defines the viewport left coordinate\n * @param right defines the viewport right coordinate\n * @param bottom defines the viewport bottom coordinate\n * @param top defines the viewport top coordinate\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane\n * @param result defines the target matrix\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @returns result input\n */\n static OrthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, result, halfZRange) {\n const n = znear;\n const f = zfar;\n const a = 2.0 / (right - left);\n const b = 2.0 / (top - bottom);\n const c = 2.0 / (f - n);\n const d = -(f + n) / (f - n);\n const i0 = (left + right) / (left - right);\n const i1 = (top + bottom) / (bottom - top);\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 0.0, i0, i1, d, 1.0, result);\n if (halfZRange) {\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\n }\n result.markAsUpdated();\n return result;\n }\n /**\n * Stores a left-handed oblique projection into a given matrix\n * @param left defines the viewport left coordinate\n * @param right defines the viewport right coordinate\n * @param bottom defines the viewport bottom coordinate\n * @param top defines the viewport top coordinate\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane\n * @param angle Angle (along X/Y Plane) to apply shear\n * @param length Length of the shear\n * @param distance Distance from shear point\n * @param result defines the target matrix\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @returns result input\n */\n static ObliqueOffCenterLHToRef(left, right, bottom, top, znear, zfar, length, angle, distance, result, halfZRange) {\n const a = -length * Math.cos(angle);\n const b = -length * Math.sin(angle);\n Matrix.TranslationToRef(0, 0, -distance, MathTmp.Matrix[1]);\n Matrix.FromValuesToRef(1, 0, 0, 0, 0, 1, 0, 0, a, b, 1, 0, 0, 0, 0, 1, MathTmp.Matrix[0]);\n MathTmp.Matrix[1].multiplyToRef(MathTmp.Matrix[0], MathTmp.Matrix[0]);\n Matrix.TranslationToRef(0, 0, distance, MathTmp.Matrix[1]);\n MathTmp.Matrix[0].multiplyToRef(MathTmp.Matrix[1], MathTmp.Matrix[0]);\n Matrix.OrthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, result, halfZRange);\n MathTmp.Matrix[0].multiplyToRef(result, result);\n return result;\n }\n /**\n * Creates a right-handed orthographic projection matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#76\n * @param left defines the viewport left coordinate\n * @param right defines the viewport right coordinate\n * @param bottom defines the viewport bottom coordinate\n * @param top defines the viewport top coordinate\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @returns a new matrix as a right-handed orthographic projection matrix\n */\n static OrthoOffCenterRH(left, right, bottom, top, znear, zfar, halfZRange) {\n const matrix = new Matrix();\n Matrix.OrthoOffCenterRHToRef(left, right, bottom, top, znear, zfar, matrix, halfZRange);\n return matrix;\n }\n /**\n * Stores a right-handed orthographic projection into a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#77\n * @param left defines the viewport left coordinate\n * @param right defines the viewport right coordinate\n * @param bottom defines the viewport bottom coordinate\n * @param top defines the viewport top coordinate\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane\n * @param result defines the target matrix\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @returns result input\n */\n static OrthoOffCenterRHToRef(left, right, bottom, top, znear, zfar, result, halfZRange) {\n Matrix.OrthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, result, halfZRange);\n result._m[10] *= -1; // No need to call markAsUpdated as previous function already called it and let _isIdentityDirty to true\n return result;\n }\n /**\n * Stores a right-handed oblique projection into a given matrix\n * @param left defines the viewport left coordinate\n * @param right defines the viewport right coordinate\n * @param bottom defines the viewport bottom coordinate\n * @param top defines the viewport top coordinate\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane\n * @param angle Angle (along X/Y Plane) to apply shear\n * @param length Length of the shear\n * @param distance Distance from shear point\n * @param result defines the target matrix\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @returns result input\n */\n static ObliqueOffCenterRHToRef(left, right, bottom, top, znear, zfar, length, angle, distance, result, halfZRange) {\n const a = length * Math.cos(angle);\n const b = length * Math.sin(angle);\n Matrix.TranslationToRef(0, 0, distance, MathTmp.Matrix[1]);\n Matrix.FromValuesToRef(1, 0, 0, 0, 0, 1, 0, 0, a, b, 1, 0, 0, 0, 0, 1, MathTmp.Matrix[0]);\n MathTmp.Matrix[1].multiplyToRef(MathTmp.Matrix[0], MathTmp.Matrix[0]);\n Matrix.TranslationToRef(0, 0, -distance, MathTmp.Matrix[1]);\n MathTmp.Matrix[0].multiplyToRef(MathTmp.Matrix[1], MathTmp.Matrix[0]);\n Matrix.OrthoOffCenterRHToRef(left, right, bottom, top, znear, zfar, result, halfZRange);\n MathTmp.Matrix[0].multiplyToRef(result, result);\n return result;\n }\n /**\n * Creates a left-handed perspective projection matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#85\n * @param width defines the viewport width\n * @param height defines the viewport height\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\n * @returns a new matrix as a left-handed perspective projection matrix\n */\n static PerspectiveLH(width, height, znear, zfar, halfZRange, projectionPlaneTilt = 0) {\n const matrix = new Matrix();\n const n = znear;\n const f = zfar;\n const a = (2.0 * n) / width;\n const b = (2.0 * n) / height;\n const c = (f + n) / (f - n);\n const d = (-2.0 * f * n) / (f - n);\n const rot = Math.tan(projectionPlaneTilt);\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0, matrix);\n if (halfZRange) {\n matrix.multiplyToRef(mtxConvertNDCToHalfZRange, matrix);\n }\n matrix._updateIdentityStatus(false);\n return matrix;\n }\n /**\n * Creates a left-handed perspective projection matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#78\n * @param fov defines the horizontal field of view\n * @param aspect defines the aspect ratio\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\n * @returns a new matrix as a left-handed perspective projection matrix\n */\n static PerspectiveFovLH(fov, aspect, znear, zfar, halfZRange, projectionPlaneTilt = 0, reverseDepthBufferMode = false) {\n const matrix = new Matrix();\n Matrix.PerspectiveFovLHToRef(fov, aspect, znear, zfar, matrix, true, halfZRange, projectionPlaneTilt, reverseDepthBufferMode);\n return matrix;\n }\n /**\n * Stores a left-handed perspective projection into a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#81\n * @param fov defines the horizontal field of view\n * @param aspect defines the aspect ratio\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\n * @param result defines the target matrix\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\n * @returns result input\n */\n static PerspectiveFovLHToRef(fov, aspect, znear, zfar, result, isVerticalFovFixed = true, halfZRange, projectionPlaneTilt = 0, reverseDepthBufferMode = false) {\n const n = znear;\n const f = zfar;\n const t = 1.0 / Math.tan(fov * 0.5);\n const a = isVerticalFovFixed ? t / aspect : t;\n const b = isVerticalFovFixed ? t : t * aspect;\n const c = reverseDepthBufferMode && n === 0 ? -1 : f !== 0 ? (f + n) / (f - n) : 1;\n const d = reverseDepthBufferMode && n === 0 ? 2 * f : f !== 0 ? (-2.0 * f * n) / (f - n) : -2 * n;\n const rot = Math.tan(projectionPlaneTilt);\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0, result);\n if (halfZRange) {\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\n }\n result._updateIdentityStatus(false);\n return result;\n }\n /**\n * Stores a left-handed perspective projection into a given matrix with depth reversed\n * Example Playground - https://playground.babylonjs.com/#AV9X17#89\n * @param fov defines the horizontal field of view\n * @param aspect defines the aspect ratio\n * @param znear defines the near clip plane\n * @param zfar not used as infinity is used as far clip\n * @param result defines the target matrix\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\n * @returns result input\n */\n static PerspectiveFovReverseLHToRef(fov, aspect, znear, zfar, result, isVerticalFovFixed = true, halfZRange, projectionPlaneTilt = 0) {\n const t = 1.0 / Math.tan(fov * 0.5);\n const a = isVerticalFovFixed ? t / aspect : t;\n const b = isVerticalFovFixed ? t : t * aspect;\n const rot = Math.tan(projectionPlaneTilt);\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, -znear, 1.0, 0.0, 0.0, 1.0, 0.0, result);\n if (halfZRange) {\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\n }\n result._updateIdentityStatus(false);\n return result;\n }\n /**\n * Creates a right-handed perspective projection matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#83\n * @param fov defines the horizontal field of view\n * @param aspect defines the aspect ratio\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\n * @returns a new matrix as a right-handed perspective projection matrix\n */\n static PerspectiveFovRH(fov, aspect, znear, zfar, halfZRange, projectionPlaneTilt = 0, reverseDepthBufferMode = false) {\n const matrix = new Matrix();\n Matrix.PerspectiveFovRHToRef(fov, aspect, znear, zfar, matrix, true, halfZRange, projectionPlaneTilt, reverseDepthBufferMode);\n return matrix;\n }\n /**\n * Stores a right-handed perspective projection into a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#84\n * @param fov defines the horizontal field of view\n * @param aspect defines the aspect ratio\n * @param znear defines the near clip plane\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\n * @param result defines the target matrix\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\n * @returns result input\n */\n static PerspectiveFovRHToRef(fov, aspect, znear, zfar, result, isVerticalFovFixed = true, halfZRange, projectionPlaneTilt = 0, reverseDepthBufferMode = false) {\n //alternatively this could be expressed as:\n // m = PerspectiveFovLHToRef\n // m[10] *= -1.0;\n // m[11] *= -1.0;\n const n = znear;\n const f = zfar;\n const t = 1.0 / Math.tan(fov * 0.5);\n const a = isVerticalFovFixed ? t / aspect : t;\n const b = isVerticalFovFixed ? t : t * aspect;\n const c = reverseDepthBufferMode && n === 0 ? 1 : f !== 0 ? -(f + n) / (f - n) : -1;\n const d = reverseDepthBufferMode && n === 0 ? 2 * f : f !== 0 ? (-2 * f * n) / (f - n) : -2 * n;\n const rot = Math.tan(projectionPlaneTilt);\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, c, -1.0, 0.0, 0.0, d, 0.0, result);\n if (halfZRange) {\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\n }\n result._updateIdentityStatus(false);\n return result;\n }\n /**\n * Stores a right-handed perspective projection into a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#90\n * @param fov defines the horizontal field of view\n * @param aspect defines the aspect ratio\n * @param znear defines the near clip plane\n * @param zfar not used as infinity is used as far clip\n * @param result defines the target matrix\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\n * @returns result input\n */\n static PerspectiveFovReverseRHToRef(fov, aspect, znear, zfar, result, isVerticalFovFixed = true, halfZRange, projectionPlaneTilt = 0) {\n const t = 1.0 / Math.tan(fov * 0.5);\n const a = isVerticalFovFixed ? t / aspect : t;\n const b = isVerticalFovFixed ? t : t * aspect;\n const rot = Math.tan(projectionPlaneTilt);\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, -znear, -1.0, 0.0, 0.0, -1.0, 0.0, result);\n if (halfZRange) {\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\n }\n result._updateIdentityStatus(false);\n return result;\n }\n /**\n * Computes a complete transformation matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#113\n * @param viewport defines the viewport to use\n * @param world defines the world matrix\n * @param view defines the view matrix\n * @param projection defines the projection matrix\n * @param zmin defines the near clip plane\n * @param zmax defines the far clip plane\n * @returns the transformation matrix\n */\n static GetFinalMatrix(viewport, world, view, projection, zmin, zmax) {\n const cw = viewport.width;\n const ch = viewport.height;\n const cx = viewport.x;\n const cy = viewport.y;\n const viewportMatrix = Matrix.FromValues(cw / 2.0, 0.0, 0.0, 0.0, 0.0, -ch / 2.0, 0.0, 0.0, 0.0, 0.0, zmax - zmin, 0.0, cx + cw / 2.0, ch / 2.0 + cy, zmin, 1.0);\n const matrix = new world.constructor();\n world.multiplyToRef(view, matrix);\n matrix.multiplyToRef(projection, matrix);\n return matrix.multiplyToRef(viewportMatrix, matrix);\n }\n /**\n * Extracts a 2x2 matrix from a given matrix and store the result in a Float32Array\n * @param matrix defines the matrix to use\n * @returns a new Float32Array array with 4 elements : the 2x2 matrix extracted from the given matrix\n */\n static GetAsMatrix2x2(matrix) {\n const m = matrix.m;\n const arr = [m[0], m[1], m[4], m[5]];\n return PerformanceConfigurator.MatrixUse64Bits ? arr : new Float32Array(arr);\n }\n /**\n * Extracts a 3x3 matrix from a given matrix and store the result in a Float32Array\n * @param matrix defines the matrix to use\n * @returns a new Float32Array array with 9 elements : the 3x3 matrix extracted from the given matrix\n */\n static GetAsMatrix3x3(matrix) {\n const m = matrix.m;\n const arr = [m[0], m[1], m[2], m[4], m[5], m[6], m[8], m[9], m[10]];\n return PerformanceConfigurator.MatrixUse64Bits ? arr : new Float32Array(arr);\n }\n /**\n * Compute the transpose of a given matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#111\n * @param matrix defines the matrix to transpose\n * @returns the new matrix\n */\n static Transpose(matrix) {\n const result = new matrix.constructor();\n Matrix.TransposeToRef(matrix, result);\n return result;\n }\n /**\n * Compute the transpose of a matrix and store it in a target matrix\n * Example Playground - https://playground.babylonjs.com/#AV9X17#112\n * @param matrix defines the matrix to transpose\n * @param result defines the target matrix\n * @returns result input\n */\n static TransposeToRef(matrix, result) {\n const mm = matrix.m;\n const rm0 = mm[0];\n const rm1 = mm[4];\n const rm2 = mm[8];\n const rm3 = mm[12];\n const rm4 = mm[1];\n const rm5 = mm[5];\n const rm6 = mm[9];\n const rm7 = mm[13];\n const rm8 = mm[2];\n const rm9 = mm[6];\n const rm10 = mm[10];\n const rm11 = mm[14];\n const rm12 = mm[3];\n const rm13 = mm[7];\n const rm14 = mm[11];\n const rm15 = mm[15];\n const rm = result._m;\n rm[0] = rm0;\n rm[1] = rm1;\n rm[2] = rm2;\n rm[3] = rm3;\n rm[4] = rm4;\n rm[5] = rm5;\n rm[6] = rm6;\n rm[7] = rm7;\n rm[8] = rm8;\n rm[9] = rm9;\n rm[10] = rm10;\n rm[11] = rm11;\n rm[12] = rm12;\n rm[13] = rm13;\n rm[14] = rm14;\n rm[15] = rm15;\n result.markAsUpdated();\n // identity-ness does not change when transposing\n result._updateIdentityStatus(matrix._isIdentity, matrix._isIdentityDirty);\n return result;\n }\n /**\n * Computes a reflection matrix from a plane\n * Example Playground - https://playground.babylonjs.com/#AV9X17#87\n * @param plane defines the reflection plane\n * @returns a new matrix\n */\n static Reflection(plane) {\n const matrix = new Matrix();\n Matrix.ReflectionToRef(plane, matrix);\n return matrix;\n }\n /**\n * Computes a reflection matrix from a plane\n * Example Playground - https://playground.babylonjs.com/#AV9X17#88\n * @param plane defines the reflection plane\n * @param result defines the target matrix\n * @returns result input\n */\n static ReflectionToRef(plane, result) {\n plane.normalize();\n const x = plane.normal.x;\n const y = plane.normal.y;\n const z = plane.normal.z;\n const temp = -2 * x;\n const temp2 = -2 * y;\n const temp3 = -2 * z;\n Matrix.FromValuesToRef(temp * x + 1, temp2 * x, temp3 * x, 0.0, temp * y, temp2 * y + 1, temp3 * y, 0.0, temp * z, temp2 * z, temp3 * z + 1, 0.0, temp * plane.d, temp2 * plane.d, temp3 * plane.d, 1.0, result);\n return result;\n }\n /**\n * Sets the given matrix as a rotation matrix composed from the 3 left handed axes\n * @param xaxis defines the value of the 1st axis\n * @param yaxis defines the value of the 2nd axis\n * @param zaxis defines the value of the 3rd axis\n * @param result defines the target matrix\n * @returns result input\n */\n static FromXYZAxesToRef(xaxis, yaxis, zaxis, result) {\n Matrix.FromValuesToRef(xaxis._x, xaxis._y, xaxis._z, 0.0, yaxis._x, yaxis._y, yaxis._z, 0.0, zaxis._x, zaxis._y, zaxis._z, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n return result;\n }\n /**\n * Creates a rotation matrix from a quaternion and stores it in a target matrix\n * @param quat defines the quaternion to use\n * @param result defines the target matrix\n * @returns result input\n */\n static FromQuaternionToRef(quat, result) {\n const xx = quat._x * quat._x;\n const yy = quat._y * quat._y;\n const zz = quat._z * quat._z;\n const xy = quat._x * quat._y;\n const zw = quat._z * quat._w;\n const zx = quat._z * quat._x;\n const yw = quat._y * quat._w;\n const yz = quat._y * quat._z;\n const xw = quat._x * quat._w;\n result._m[0] = 1.0 - 2.0 * (yy + zz);\n result._m[1] = 2.0 * (xy + zw);\n result._m[2] = 2.0 * (zx - yw);\n result._m[3] = 0.0;\n result._m[4] = 2.0 * (xy - zw);\n result._m[5] = 1.0 - 2.0 * (zz + xx);\n result._m[6] = 2.0 * (yz + xw);\n result._m[7] = 0.0;\n result._m[8] = 2.0 * (zx + yw);\n result._m[9] = 2.0 * (yz - xw);\n result._m[10] = 1.0 - 2.0 * (yy + xx);\n result._m[11] = 0.0;\n result._m[12] = 0.0;\n result._m[13] = 0.0;\n result._m[14] = 0.0;\n result._m[15] = 1.0;\n result.markAsUpdated();\n return result;\n }\n}\nMatrix._UpdateFlagSeed = 0;\nMatrix._IdentityReadOnly = Matrix.Identity();\n/**\n * @internal\n * Same as Tmp but not exported to keep it only for math functions to avoid conflicts\n */\nclass MathTmp {\n}\nMathTmp.Vector3 = ArrayTools.BuildTuple(11, Vector3.Zero);\nMathTmp.Matrix = ArrayTools.BuildTuple(2, Matrix.Identity);\nMathTmp.Quaternion = ArrayTools.BuildTuple(3, Quaternion.Zero);\n/**\n * @internal\n */\nexport class TmpVectors {\n}\nTmpVectors.Vector2 = ArrayTools.BuildTuple(3, Vector2.Zero); // 3 temp Vector2 at once should be enough\nTmpVectors.Vector3 = ArrayTools.BuildTuple(13, Vector3.Zero); // 13 temp Vector3 at once should be enough\nTmpVectors.Vector4 = ArrayTools.BuildTuple(3, Vector4.Zero); // 3 temp Vector4 at once should be enough\nTmpVectors.Quaternion = ArrayTools.BuildTuple(2, Quaternion.Zero); // 2 temp Quaternion at once should be enough\nTmpVectors.Matrix = ArrayTools.BuildTuple(8, Matrix.Identity); // 8 temp Matrices at once should be enough\nRegisterClass(\"BABYLON.Vector2\", Vector2);\nRegisterClass(\"BABYLON.Vector3\", Vector3);\nRegisterClass(\"BABYLON.Vector4\", Vector4);\nRegisterClass(\"BABYLON.Matrix\", Matrix);\nconst mtxConvertNDCToHalfZRange = Matrix.FromValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 1);\n//# sourceMappingURL=math.vector.js.map","import { Vector3, Matrix } from \"./math.vector.js\";\n/**\n * Represents a plane by the equation ax + by + cz + d = 0\n */\nexport class Plane {\n /**\n * Creates a Plane object according to the given floats a, b, c, d and the plane equation : ax + by + cz + d = 0\n * @param a a component of the plane\n * @param b b component of the plane\n * @param c c component of the plane\n * @param d d component of the plane\n */\n constructor(a, b, c, d) {\n this.normal = new Vector3(a, b, c);\n this.d = d;\n }\n /**\n * @returns the plane coordinates as a new array of 4 elements [a, b, c, d].\n */\n asArray() {\n return [this.normal.x, this.normal.y, this.normal.z, this.d];\n }\n // Methods\n /**\n * @returns a new plane copied from the current Plane.\n */\n clone() {\n return new Plane(this.normal.x, this.normal.y, this.normal.z, this.d);\n }\n /**\n * @returns the string \"Plane\".\n */\n getClassName() {\n return \"Plane\";\n }\n /**\n * @returns the Plane hash code.\n */\n getHashCode() {\n let hash = this.normal.getHashCode();\n hash = (hash * 397) ^ (this.d | 0);\n return hash;\n }\n /**\n * Normalize the current Plane in place.\n * @returns the updated Plane.\n */\n normalize() {\n const norm = Math.sqrt(this.normal.x * this.normal.x + this.normal.y * this.normal.y + this.normal.z * this.normal.z);\n let magnitude = 0.0;\n if (norm !== 0) {\n magnitude = 1.0 / norm;\n }\n this.normal.x *= magnitude;\n this.normal.y *= magnitude;\n this.normal.z *= magnitude;\n this.d *= magnitude;\n return this;\n }\n /**\n * Applies a transformation the plane and returns the result\n * @param transformation the transformation matrix to be applied to the plane\n * @returns a new Plane as the result of the transformation of the current Plane by the given matrix.\n */\n transform(transformation) {\n const invertedMatrix = Plane._TmpMatrix;\n transformation.invertToRef(invertedMatrix);\n const m = invertedMatrix.m;\n const x = this.normal.x;\n const y = this.normal.y;\n const z = this.normal.z;\n const d = this.d;\n const normalX = x * m[0] + y * m[1] + z * m[2] + d * m[3];\n const normalY = x * m[4] + y * m[5] + z * m[6] + d * m[7];\n const normalZ = x * m[8] + y * m[9] + z * m[10] + d * m[11];\n const finalD = x * m[12] + y * m[13] + z * m[14] + d * m[15];\n return new Plane(normalX, normalY, normalZ, finalD);\n }\n /**\n * Compute the dot product between the point and the plane normal\n * @param point point to calculate the dot product with\n * @returns the dot product (float) of the point coordinates and the plane normal.\n */\n dotCoordinate(point) {\n return this.normal.x * point.x + this.normal.y * point.y + this.normal.z * point.z + this.d;\n }\n /**\n * Updates the current Plane from the plane defined by the three given points.\n * @param point1 one of the points used to construct the plane\n * @param point2 one of the points used to construct the plane\n * @param point3 one of the points used to construct the plane\n * @returns the updated Plane.\n */\n copyFromPoints(point1, point2, point3) {\n const x1 = point2.x - point1.x;\n const y1 = point2.y - point1.y;\n const z1 = point2.z - point1.z;\n const x2 = point3.x - point1.x;\n const y2 = point3.y - point1.y;\n const z2 = point3.z - point1.z;\n const yz = y1 * z2 - z1 * y2;\n const xz = z1 * x2 - x1 * z2;\n const xy = x1 * y2 - y1 * x2;\n const pyth = Math.sqrt(yz * yz + xz * xz + xy * xy);\n let invPyth;\n if (pyth !== 0) {\n invPyth = 1.0 / pyth;\n }\n else {\n invPyth = 0.0;\n }\n this.normal.x = yz * invPyth;\n this.normal.y = xz * invPyth;\n this.normal.z = xy * invPyth;\n this.d = -(this.normal.x * point1.x + this.normal.y * point1.y + this.normal.z * point1.z);\n return this;\n }\n /**\n * Checks if the plane is facing a given direction (meaning if the plane's normal is pointing in the opposite direction of the given vector).\n * Note that for this function to work as expected you should make sure that:\n * - direction and the plane normal are normalized\n * - epsilon is a number just bigger than -1, something like -0.99 for eg\n * @param direction the direction to check if the plane is facing\n * @param epsilon value the dot product is compared against (returns true if dot <= epsilon)\n * @returns True if the plane is facing the given direction\n */\n isFrontFacingTo(direction, epsilon) {\n const dot = Vector3.Dot(this.normal, direction);\n return dot <= epsilon;\n }\n /**\n * Calculates the distance to a point\n * @param point point to calculate distance to\n * @returns the signed distance (float) from the given point to the Plane.\n */\n signedDistanceTo(point) {\n return Vector3.Dot(point, this.normal) + this.d;\n }\n // Statics\n /**\n * Creates a plane from an array\n * @param array the array to create a plane from\n * @returns a new Plane from the given array.\n */\n static FromArray(array) {\n return new Plane(array[0], array[1], array[2], array[3]);\n }\n /**\n * Creates a plane from three points\n * @param point1 point used to create the plane\n * @param point2 point used to create the plane\n * @param point3 point used to create the plane\n * @returns a new Plane defined by the three given points.\n */\n static FromPoints(point1, point2, point3) {\n const result = new Plane(0.0, 0.0, 0.0, 0.0);\n result.copyFromPoints(point1, point2, point3);\n return result;\n }\n /**\n * Creates a plane from an origin point and a normal\n * @param origin origin of the plane to be constructed\n * @param normal normal of the plane to be constructed\n * @returns a new Plane the normal vector to this plane at the given origin point.\n * Note : the vector \"normal\" is updated because normalized.\n */\n static FromPositionAndNormal(origin, normal) {\n const result = new Plane(0.0, 0.0, 0.0, 0.0);\n normal.normalize();\n result.normal = normal;\n result.d = -(normal.x * origin.x + normal.y * origin.y + normal.z * origin.z);\n return result;\n }\n /**\n * Calculates the distance from a plane and a point\n * @param origin origin of the plane to be constructed\n * @param normal normal of the plane to be constructed\n * @param point point to calculate distance to\n * @returns the signed distance between the plane defined by the normal vector at the \"origin\"\" point and the given other point.\n */\n static SignedDistanceToPlaneFromPositionAndNormal(origin, normal, point) {\n const d = -(normal.x * origin.x + normal.y * origin.y + normal.z * origin.z);\n return Vector3.Dot(point, normal) + d;\n }\n}\nPlane._TmpMatrix = Matrix.Identity();\n//# sourceMappingURL=math.plane.js.map","/* eslint-disable-next-line ipex-viewer/prefix-babylon-imports */\nimport { Quaternion, Vector2, Vector3, Vector4, Matrix } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\n/* eslint-disable-next-line ipex-viewer/prefix-babylon-imports */\nimport { Plane } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.plane.js';\nVector2.prototype.toIVector2ToRef = function (ref) {\n ref.x = this.x;\n ref.y = this.y;\n return ref;\n};\nVector2.prototype.fromIVector2 = function (val) {\n this.x = val.x;\n this.y = val.y;\n return this;\n};\nVector3.prototype.toIVector3ToRef = function (ref) {\n ref.x = this.x;\n ref.y = this.y;\n ref.z = this.z;\n return ref;\n};\nVector3.prototype.fromIVector3 = function (val) {\n this.set(val.x, val.y, val.z);\n return this;\n};\nVector4.prototype.toIVector4ToRef = function (ref) {\n ref.x = this.x;\n ref.y = this.y;\n ref.z = this.z;\n ref.w = this.w;\n return ref;\n};\nVector4.prototype.fromIVector4 = function (val) {\n this.set(val.x, val.y, val.z, val.w);\n return this;\n};\nVector4.prototype.toIVector4ToRef = function (ref) {\n ref.x = this.x;\n ref.y = this.y;\n ref.z = this.z;\n ref.w = this.w;\n return ref;\n};\nQuaternion.prototype.fromIVector4 = function (val) {\n this.set(val.x, val.y, val.z, val.w);\n return this;\n};\nQuaternion.prototype.toIVector4ToRef = function (ref) {\n ref.x = this.x;\n ref.y = this.y;\n ref.z = this.z;\n ref.w = this.w;\n return ref;\n};\nMatrix.prototype.toIMatrix4ToRef = function (ref) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const m = this;\n for (let i = 0; i < 4; i++) {\n const row = m.getRow(i);\n ref[i].x = row.x;\n ref[i].y = row.y;\n ref[i].z = row.z;\n ref[i].w = row.w;\n }\n return ref;\n};\nMatrix.prototype.fromIMatrix4 = function (val) {\n for (let i = 0; i < 4; i++) {\n // This forces us to mark the matrix as updated 4 times. looks like it just sets a few bools tho\n this.setRowFromFloats(i, val[i].x, val[i].y, val[i].z, val[i].w);\n }\n return this;\n};\nVector3.Forward = function () {\n return new Vector3(0, 0, -1);\n};\nVector3.Backward = function () {\n return new Vector3(0, 0, 1);\n};\nVector3.Perpendicular = function (value) {\n if (Math.abs(value.y) < Math.abs(value.x)) {\n return new Vector3(value.z, 0, -value.x);\n }\n else {\n return new Vector3(0, value.z, -value.y);\n }\n};\nexport { Vector2 };\nexport { Vector3 };\nexport { Vector4 };\nexport { Quaternion };\nexport { Matrix };\nexport { Plane };\n//# sourceMappingURL=Math.extension.js.map","// Layer bits 0...7 (inclusive) are reserved for the viewer.\n// There are more unallocated bits though if needed.\n// The precise \"allocation\" of bits to different viewer users is found in the Viewer constructor.\nexport const RENDER_LAYER_FORWARD = { bit: 0 };\nexport const RENDER_LAYER_SHADOW = { bit: 1 };\nexport const RENDER_LAYER_UI = { bit: 2 };\nexport const RENDER_LAYER_IGNORE_RAYCAST = { bit: 3 };\nexport const VIEWER_INTERNAL_RENDER_LAYER_SCREENSHOT = { bit: 4 };\nexport class RenderLayerMask {\n /**\n * Creates a render layer mask from an array of layers\n * @param layers The layers to be present in the mask\n * @returns A new layer mask\n */\n constructor(layers) {\n let mask = 0;\n for (let i = 0; i < layers.length; i++) {\n mask |= get_bitmap_of_render_layer(layers[i]);\n }\n return {\n bitmap: mask\n };\n }\n /**\n * Creates a clone of a render layer mask\n */\n static clone(layer_mask) {\n return {\n bitmap: layer_mask.bitmap\n };\n }\n /**\n * Creates a new mask containing the layers present in 'mask', but adding the given 'layer'\n * @param mask The existing mask to base the new one from\n * @param layer The layer to add\n * @returns The new mask\n */\n static add_layer(mask, layer) {\n const layer_mask = new RenderLayerMask([layer]);\n return {\n bitmap: mask.bitmap | layer_mask.bitmap\n };\n }\n /**\n * Creates a new mask containing the layers present in 'mask' but with the given 'layer' removed\n * @param mask The existing mask to base the new one from\n * @param layer The layer to remove\n * @returns The new mask\n */\n static remove_layer(mask, layer) {\n const layer_mask = new RenderLayerMask([layer]);\n return {\n bitmap: mask.bitmap & (~layer_mask.bitmap)\n };\n }\n /**\n * Checks if the layer is present in the given mask\n * @param mask The mask\n * @param layer The layer to check for\n * @returns true if the layer is present in the mask, otherwise false\n */\n static has_layer(mask, layer) {\n return (mask.bitmap & get_bitmap_of_render_layer(layer)) !== 0;\n }\n}\nfunction get_bitmap_of_render_layer(layer) {\n // We could in theory use all 32 bits, but Babylon doesn't support using the last bit.\n if (layer.bit < 0 || layer.bit >= 31) {\n console.error('Invalid render layer');\n return 0;\n }\n else {\n return 1 << layer.bit;\n }\n}\n/**\n * Creates a render layer mask from an array of layers\n * @deprecated Use RenderLayerMask constructor\n * @param layers The layers to be present in the mask\n * @returns A new layer mask\n */\nexport function create_render_layer_mask(layers) {\n let mask = 0;\n for (let i = 0; i < layers.length; i++) {\n mask |= get_bitmap_of_render_layer(layers[i]);\n }\n return {\n bitmap: mask\n };\n}\n/**\n * Creates a clone of a render layer mask\n * @deprecated Use RenderLayerMask.clone\n */\nexport function clone_render_layer_mask(mask) {\n return {\n bitmap: mask.bitmap\n };\n}\n/**\n * Creates a new mask containing the layers present in 'mask', but adding the given 'layer'\n * @deprecated Use RenderLayerMask.add_layer\n * @param mask The existing mask to base the new one from\n * @param layer The layer to add\n * @returns The new mask\n */\nexport function add_layer_to_mask(mask, layer) {\n const layer_mask = create_render_layer_mask([layer]);\n return {\n bitmap: mask.bitmap | layer_mask.bitmap\n };\n}\n/**\n * Creates a new mask containing the layers present in 'mask' but with the given 'layer' removed\n * @deprecated Use RenderLayerMask.remove_layer\n * @param mask The existing mask to base the new one from\n * @param layer The layer to remove\n * @returns The new mask\n */\nexport function remove_layer_from_mask(mask, layer) {\n const layer_mask = create_render_layer_mask([layer]);\n return {\n bitmap: mask.bitmap & (~layer_mask.bitmap)\n };\n}\n/**\n * Tells if you a layer is present in a mask\n * @deprecated Use RenderLayerMask.has_layer\n * @param mask The mask\n * @param layer The layer to check for\n * @returns true if the layer is present in the mask, otherwise false\n */\nexport function mask_includes_layer(mask, layer) {\n return (mask.bitmap & get_bitmap_of_render_layer(layer)) !== 0;\n}\nexport const RENDER_LAYER_MASK_ALL = { bitmap: 2147483647 };\nexport const RENDER_LAYER_MASK_NONE = { bitmap: 0 };\nexport const RENDER_LAYER_MASK_RAYCASTABLE = { bitmap: 2147483639 };\nexport const RENDER_LAYER_MASK_FORWARD = new RenderLayerMask([RENDER_LAYER_FORWARD]);\nexport const RENDER_LAYER_MASK_IGNORE_RAYCAST = new RenderLayerMask([RENDER_LAYER_IGNORE_RAYCAST]);\n// A layer mask describing what you'll normally see in your viewport\nexport const RENDER_LAYER_MASK_DEFAULT = new RenderLayerMask([RENDER_LAYER_FORWARD, RENDER_LAYER_UI]);\n//# sourceMappingURL=RenderLayer.js.map","export var LightType;\n(function (LightType) {\n LightType[\"POINT_LIGHT\"] = \"Point Light\";\n LightType[\"SPOT_LIGHT\"] = \"Spot Light\";\n LightType[\"DIRECTED_SHADOW_POINT_LIGHT\"] = \"Directed Shadow Point Light\";\n LightType[\"LINE_LIGHT\"] = \"Line Light\";\n LightType[\"DIRECTIONAL_LIGHT\"] = \"Directional Light\";\n})(LightType || (LightType = {}));\n//# sourceMappingURL=LightType.js.map","import { Scalar } from \"./math.scalar.js\";\nimport { ToLinearSpace, ToGammaSpace } from \"./math.constants.js\";\nimport { ArrayTools } from \"../Misc/arrayTools.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nfunction colorChannelToLinearSpace(color) {\n return Math.pow(color, ToLinearSpace);\n}\nfunction colorChannelToLinearSpaceExact(color) {\n if (color <= 0.04045) {\n return 0.0773993808 * color;\n }\n return Math.pow(0.947867299 * (color + 0.055), 2.4);\n}\nfunction colorChannelToGammaSpace(color) {\n return Math.pow(color, ToGammaSpace);\n}\nfunction colorChannelToGammaSpaceExact(color) {\n if (color <= 0.0031308) {\n return 12.92 * color;\n }\n return 1.055 * Math.pow(color, 0.41666) - 0.055;\n}\n/**\n * Class used to hold a RGB color\n */\nexport class Color3 {\n /**\n * Creates a new Color3 object from red, green, blue values, all between 0 and 1\n * @param r defines the red component (between 0 and 1, default is 0)\n * @param g defines the green component (between 0 and 1, default is 0)\n * @param b defines the blue component (between 0 and 1, default is 0)\n */\n constructor(\n /**\n * Defines the red component (between 0 and 1, default is 0)\n */\n r = 0, \n /**\n * Defines the green component (between 0 and 1, default is 0)\n */\n g = 0, \n /**\n * Defines the blue component (between 0 and 1, default is 0)\n */\n b = 0) {\n this.r = r;\n this.g = g;\n this.b = b;\n }\n /**\n * Creates a string with the Color3 current values\n * @returns the string representation of the Color3 object\n */\n toString() {\n return \"{R: \" + this.r + \" G:\" + this.g + \" B:\" + this.b + \"}\";\n }\n /**\n * Returns the string \"Color3\"\n * @returns \"Color3\"\n */\n getClassName() {\n return \"Color3\";\n }\n /**\n * Compute the Color3 hash code\n * @returns an unique number that can be used to hash Color3 objects\n */\n getHashCode() {\n let hash = (this.r * 255) | 0;\n hash = (hash * 397) ^ ((this.g * 255) | 0);\n hash = (hash * 397) ^ ((this.b * 255) | 0);\n return hash;\n }\n // Operators\n /**\n * Stores in the given array from the given starting index the red, green, blue values as successive elements\n * @param array defines the array where to store the r,g,b components\n * @param index defines an optional index in the target array to define where to start storing values\n * @returns the current Color3 object\n */\n toArray(array, index = 0) {\n array[index] = this.r;\n array[index + 1] = this.g;\n array[index + 2] = this.b;\n return this;\n }\n /**\n * Update the current color with values stored in an array from the starting index of the given array\n * @param array defines the source array\n * @param offset defines an offset in the source array\n * @returns the current Color3 object\n */\n fromArray(array, offset = 0) {\n Color3.FromArrayToRef(array, offset, this);\n return this;\n }\n /**\n * Returns a new Color4 object from the current Color3 and the given alpha\n * @param alpha defines the alpha component on the new Color4 object (default is 1)\n * @returns a new Color4 object\n */\n toColor4(alpha = 1) {\n return new Color4(this.r, this.g, this.b, alpha);\n }\n /**\n * Returns a new array populated with 3 numeric elements : red, green and blue values\n * @returns the new array\n */\n asArray() {\n return [this.r, this.g, this.b];\n }\n /**\n * Returns the luminance value\n * @returns a float value\n */\n toLuminance() {\n return this.r * 0.3 + this.g * 0.59 + this.b * 0.11;\n }\n /**\n * Multiply each Color3 rgb values by the given Color3 rgb values in a new Color3 object\n * @param otherColor defines the second operand\n * @returns the new Color3 object\n */\n multiply(otherColor) {\n return new Color3(this.r * otherColor.r, this.g * otherColor.g, this.b * otherColor.b);\n }\n /**\n * Multiply the rgb values of the Color3 and the given Color3 and stores the result in the object \"result\"\n * @param otherColor defines the second operand\n * @param result defines the Color3 object where to store the result\n * @returns the current Color3\n */\n multiplyToRef(otherColor, result) {\n result.r = this.r * otherColor.r;\n result.g = this.g * otherColor.g;\n result.b = this.b * otherColor.b;\n return this;\n }\n /**\n * Determines equality between Color3 objects\n * @param otherColor defines the second operand\n * @returns true if the rgb values are equal to the given ones\n */\n equals(otherColor) {\n return otherColor && this.r === otherColor.r && this.g === otherColor.g && this.b === otherColor.b;\n }\n /**\n * Determines equality between the current Color3 object and a set of r,b,g values\n * @param r defines the red component to check\n * @param g defines the green component to check\n * @param b defines the blue component to check\n * @returns true if the rgb values are equal to the given ones\n */\n equalsFloats(r, g, b) {\n return this.r === r && this.g === g && this.b === b;\n }\n /**\n * Creates a new Color3 with the current Color3 values multiplied by scale\n * @param scale defines the scaling factor to apply\n * @returns a new Color3 object\n */\n scale(scale) {\n return new Color3(this.r * scale, this.g * scale, this.b * scale);\n }\n /**\n * Multiplies the Color3 values by the float \"scale\"\n * @param scale defines the scaling factor to apply\n * @returns the current updated Color3\n */\n scaleInPlace(scale) {\n this.r *= scale;\n this.g *= scale;\n this.b *= scale;\n return this;\n }\n /**\n * Multiplies the rgb values by scale and stores the result into \"result\"\n * @param scale defines the scaling factor\n * @param result defines the Color3 object where to store the result\n * @returns the unmodified current Color3\n */\n scaleToRef(scale, result) {\n result.r = this.r * scale;\n result.g = this.g * scale;\n result.b = this.b * scale;\n return this;\n }\n /**\n * Scale the current Color3 values by a factor and add the result to a given Color3\n * @param scale defines the scale factor\n * @param result defines color to store the result into\n * @returns the unmodified current Color3\n */\n scaleAndAddToRef(scale, result) {\n result.r += this.r * scale;\n result.g += this.g * scale;\n result.b += this.b * scale;\n return this;\n }\n /**\n * Clamps the rgb values by the min and max values and stores the result into \"result\"\n * @param min defines minimum clamping value (default is 0)\n * @param max defines maximum clamping value (default is 1)\n * @param result defines color to store the result into\n * @returns the original Color3\n */\n clampToRef(min = 0, max = 1, result) {\n result.r = Scalar.Clamp(this.r, min, max);\n result.g = Scalar.Clamp(this.g, min, max);\n result.b = Scalar.Clamp(this.b, min, max);\n return this;\n }\n /**\n * Creates a new Color3 set with the added values of the current Color3 and of the given one\n * @param otherColor defines the second operand\n * @returns the new Color3\n */\n add(otherColor) {\n return new Color3(this.r + otherColor.r, this.g + otherColor.g, this.b + otherColor.b);\n }\n /**\n * Stores the result of the addition of the current Color3 and given one rgb values into \"result\"\n * @param otherColor defines the second operand\n * @param result defines Color3 object to store the result into\n * @returns the unmodified current Color3\n */\n addToRef(otherColor, result) {\n result.r = this.r + otherColor.r;\n result.g = this.g + otherColor.g;\n result.b = this.b + otherColor.b;\n return this;\n }\n /**\n * Returns a new Color3 set with the subtracted values of the given one from the current Color3\n * @param otherColor defines the second operand\n * @returns the new Color3\n */\n subtract(otherColor) {\n return new Color3(this.r - otherColor.r, this.g - otherColor.g, this.b - otherColor.b);\n }\n /**\n * Stores the result of the subtraction of given one from the current Color3 rgb values into \"result\"\n * @param otherColor defines the second operand\n * @param result defines Color3 object to store the result into\n * @returns the unmodified current Color3\n */\n subtractToRef(otherColor, result) {\n result.r = this.r - otherColor.r;\n result.g = this.g - otherColor.g;\n result.b = this.b - otherColor.b;\n return this;\n }\n /**\n * Copy the current object\n * @returns a new Color3 copied the current one\n */\n clone() {\n return new Color3(this.r, this.g, this.b);\n }\n /**\n * Copies the rgb values from the source in the current Color3\n * @param source defines the source Color3 object\n * @returns the updated Color3 object\n */\n copyFrom(source) {\n this.r = source.r;\n this.g = source.g;\n this.b = source.b;\n return this;\n }\n /**\n * Updates the Color3 rgb values from the given floats\n * @param r defines the red component to read from\n * @param g defines the green component to read from\n * @param b defines the blue component to read from\n * @returns the current Color3 object\n */\n copyFromFloats(r, g, b) {\n this.r = r;\n this.g = g;\n this.b = b;\n return this;\n }\n /**\n * Updates the Color3 rgb values from the given floats\n * @param r defines the red component to read from\n * @param g defines the green component to read from\n * @param b defines the blue component to read from\n * @returns the current Color3 object\n */\n set(r, g, b) {\n return this.copyFromFloats(r, g, b);\n }\n /**\n * Compute the Color3 hexadecimal code as a string\n * @returns a string containing the hexadecimal representation of the Color3 object\n */\n toHexString() {\n const intR = Math.round(this.r * 255);\n const intG = Math.round(this.g * 255);\n const intB = Math.round(this.b * 255);\n return \"#\" + Scalar.ToHex(intR) + Scalar.ToHex(intG) + Scalar.ToHex(intB);\n }\n /**\n * Converts current color in rgb space to HSV values\n * @returns a new color3 representing the HSV values\n */\n toHSV() {\n const result = new Color3();\n this.toHSVToRef(result);\n return result;\n }\n /**\n * Converts current color in rgb space to HSV values\n * @param result defines the Color3 where to store the HSV values\n */\n toHSVToRef(result) {\n const r = this.r;\n const g = this.g;\n const b = this.b;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h = 0;\n let s = 0;\n const v = max;\n const dm = max - min;\n if (max !== 0) {\n s = dm / max;\n }\n if (max != min) {\n if (max == r) {\n h = (g - b) / dm;\n if (g < b) {\n h += 6;\n }\n }\n else if (max == g) {\n h = (b - r) / dm + 2;\n }\n else if (max == b) {\n h = (r - g) / dm + 4;\n }\n h *= 60;\n }\n result.r = h;\n result.g = s;\n result.b = v;\n }\n /**\n * Computes a new Color3 converted from the current one to linear space\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\n * @returns a new Color3 object\n */\n toLinearSpace(exact = false) {\n const convertedColor = new Color3();\n this.toLinearSpaceToRef(convertedColor, exact);\n return convertedColor;\n }\n /**\n * Converts the Color3 values to linear space and stores the result in \"convertedColor\"\n * @param convertedColor defines the Color3 object where to store the linear space version\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\n * @returns the unmodified Color3\n */\n toLinearSpaceToRef(convertedColor, exact = false) {\n if (exact) {\n convertedColor.r = colorChannelToLinearSpaceExact(this.r);\n convertedColor.g = colorChannelToLinearSpaceExact(this.g);\n convertedColor.b = colorChannelToLinearSpaceExact(this.b);\n }\n else {\n convertedColor.r = colorChannelToLinearSpace(this.r);\n convertedColor.g = colorChannelToLinearSpace(this.g);\n convertedColor.b = colorChannelToLinearSpace(this.b);\n }\n return this;\n }\n /**\n * Computes a new Color3 converted from the current one to gamma space\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\n * @returns a new Color3 object\n */\n toGammaSpace(exact = false) {\n const convertedColor = new Color3();\n this.toGammaSpaceToRef(convertedColor, exact);\n return convertedColor;\n }\n /**\n * Converts the Color3 values to gamma space and stores the result in \"convertedColor\"\n * @param convertedColor defines the Color3 object where to store the gamma space version\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\n * @returns the unmodified Color3\n */\n toGammaSpaceToRef(convertedColor, exact = false) {\n if (exact) {\n convertedColor.r = colorChannelToGammaSpaceExact(this.r);\n convertedColor.g = colorChannelToGammaSpaceExact(this.g);\n convertedColor.b = colorChannelToGammaSpaceExact(this.b);\n }\n else {\n convertedColor.r = colorChannelToGammaSpace(this.r);\n convertedColor.g = colorChannelToGammaSpace(this.g);\n convertedColor.b = colorChannelToGammaSpace(this.b);\n }\n return this;\n }\n /**\n * Converts Hue, saturation and value to a Color3 (RGB)\n * @param hue defines the hue (value between 0 and 360)\n * @param saturation defines the saturation (value between 0 and 1)\n * @param value defines the value (value between 0 and 1)\n * @param result defines the Color3 where to store the RGB values\n */\n static HSVtoRGBToRef(hue, saturation, value, result) {\n const chroma = value * saturation;\n const h = hue / 60;\n const x = chroma * (1 - Math.abs((h % 2) - 1));\n let r = 0;\n let g = 0;\n let b = 0;\n if (h >= 0 && h <= 1) {\n r = chroma;\n g = x;\n }\n else if (h >= 1 && h <= 2) {\n r = x;\n g = chroma;\n }\n else if (h >= 2 && h <= 3) {\n g = chroma;\n b = x;\n }\n else if (h >= 3 && h <= 4) {\n g = x;\n b = chroma;\n }\n else if (h >= 4 && h <= 5) {\n r = x;\n b = chroma;\n }\n else if (h >= 5 && h <= 6) {\n r = chroma;\n b = x;\n }\n const m = value - chroma;\n result.set(r + m, g + m, b + m);\n }\n /**\n * Converts Hue, saturation and value to a new Color3 (RGB)\n * @param hue defines the hue (value between 0 and 360)\n * @param saturation defines the saturation (value between 0 and 1)\n * @param value defines the value (value between 0 and 1)\n * @returns a new Color3 object\n */\n static FromHSV(hue, saturation, value) {\n const result = new Color3(0, 0, 0);\n Color3.HSVtoRGBToRef(hue, saturation, value, result);\n return result;\n }\n /**\n * Creates a new Color3 from the string containing valid hexadecimal values\n * @param hex defines a string containing valid hexadecimal values\n * @returns a new Color3 object\n */\n static FromHexString(hex) {\n if (hex.substring(0, 1) !== \"#\" || hex.length !== 7) {\n return new Color3(0, 0, 0);\n }\n const r = parseInt(hex.substring(1, 3), 16);\n const g = parseInt(hex.substring(3, 5), 16);\n const b = parseInt(hex.substring(5, 7), 16);\n return Color3.FromInts(r, g, b);\n }\n /**\n * Creates a new Color3 from the starting index of the given array\n * @param array defines the source array\n * @param offset defines an offset in the source array\n * @returns a new Color3 object\n */\n static FromArray(array, offset = 0) {\n return new Color3(array[offset], array[offset + 1], array[offset + 2]);\n }\n /**\n * Creates a new Color3 from the starting index element of the given array\n * @param array defines the source array to read from\n * @param offset defines the offset in the source array\n * @param result defines the target Color3 object\n */\n static FromArrayToRef(array, offset = 0, result) {\n result.r = array[offset];\n result.g = array[offset + 1];\n result.b = array[offset + 2];\n }\n /**\n * Creates a new Color3 from integer values (< 256)\n * @param r defines the red component to read from (value between 0 and 255)\n * @param g defines the green component to read from (value between 0 and 255)\n * @param b defines the blue component to read from (value between 0 and 255)\n * @returns a new Color3 object\n */\n static FromInts(r, g, b) {\n return new Color3(r / 255.0, g / 255.0, b / 255.0);\n }\n /**\n * Creates a new Color3 with values linearly interpolated of \"amount\" between the start Color3 and the end Color3\n * @param start defines the start Color3 value\n * @param end defines the end Color3 value\n * @param amount defines the gradient value between start and end\n * @returns a new Color3 object\n */\n static Lerp(start, end, amount) {\n const result = new Color3(0.0, 0.0, 0.0);\n Color3.LerpToRef(start, end, amount, result);\n return result;\n }\n /**\n * Creates a new Color3 with values linearly interpolated of \"amount\" between the start Color3 and the end Color3\n * @param left defines the start value\n * @param right defines the end value\n * @param amount defines the gradient factor\n * @param result defines the Color3 object where to store the result\n */\n static LerpToRef(left, right, amount, result) {\n result.r = left.r + (right.r - left.r) * amount;\n result.g = left.g + (right.g - left.g) * amount;\n result.b = left.b + (right.b - left.b) * amount;\n }\n /**\n * Returns a new Color3 located for \"amount\" (float) on the Hermite interpolation spline defined by the vectors \"value1\", \"tangent1\", \"value2\", \"tangent2\"\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent Color3\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent Color3\n * @param amount defines the amount on the interpolation spline (between 0 and 1)\n * @returns the new Color3\n */\n static Hermite(value1, tangent1, value2, tangent2, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\n const part2 = -2.0 * cubed + 3.0 * squared;\n const part3 = cubed - 2.0 * squared + amount;\n const part4 = cubed - squared;\n const r = value1.r * part1 + value2.r * part2 + tangent1.r * part3 + tangent2.r * part4;\n const g = value1.g * part1 + value2.g * part2 + tangent1.g * part3 + tangent2.g * part4;\n const b = value1.b * part1 + value2.b * part2 + tangent1.b * part3 + tangent2.b * part4;\n return new Color3(r, g, b);\n }\n /**\n * Returns a new Color3 which is the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param time define where the derivative must be done\n * @returns 1st derivative\n */\n static Hermite1stDerivative(value1, tangent1, value2, tangent2, time) {\n const result = Color3.Black();\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\n return result;\n }\n /**\n * Returns a new Color3 which is the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param time define where the derivative must be done\n * @param result define where to store the derivative\n */\n static Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result) {\n const t2 = time * time;\n result.r = (t2 - time) * 6 * value1.r + (3 * t2 - 4 * time + 1) * tangent1.r + (-t2 + time) * 6 * value2.r + (3 * t2 - 2 * time) * tangent2.r;\n result.g = (t2 - time) * 6 * value1.g + (3 * t2 - 4 * time + 1) * tangent1.g + (-t2 + time) * 6 * value2.g + (3 * t2 - 2 * time) * tangent2.g;\n result.b = (t2 - time) * 6 * value1.b + (3 * t2 - 4 * time + 1) * tangent1.b + (-t2 + time) * 6 * value2.b + (3 * t2 - 2 * time) * tangent2.b;\n }\n /**\n * Returns a Color3 value containing a red color\n * @returns a new Color3 object\n */\n static Red() {\n return new Color3(1, 0, 0);\n }\n /**\n * Returns a Color3 value containing a green color\n * @returns a new Color3 object\n */\n static Green() {\n return new Color3(0, 1, 0);\n }\n /**\n * Returns a Color3 value containing a blue color\n * @returns a new Color3 object\n */\n static Blue() {\n return new Color3(0, 0, 1);\n }\n /**\n * Returns a Color3 value containing a black color\n * @returns a new Color3 object\n */\n static Black() {\n return new Color3(0, 0, 0);\n }\n /**\n * Gets a Color3 value containing a black color that must not be updated\n */\n static get BlackReadOnly() {\n return Color3._BlackReadOnly;\n }\n /**\n * Returns a Color3 value containing a white color\n * @returns a new Color3 object\n */\n static White() {\n return new Color3(1, 1, 1);\n }\n /**\n * Returns a Color3 value containing a purple color\n * @returns a new Color3 object\n */\n static Purple() {\n return new Color3(0.5, 0, 0.5);\n }\n /**\n * Returns a Color3 value containing a magenta color\n * @returns a new Color3 object\n */\n static Magenta() {\n return new Color3(1, 0, 1);\n }\n /**\n * Returns a Color3 value containing a yellow color\n * @returns a new Color3 object\n */\n static Yellow() {\n return new Color3(1, 1, 0);\n }\n /**\n * Returns a Color3 value containing a gray color\n * @returns a new Color3 object\n */\n static Gray() {\n return new Color3(0.5, 0.5, 0.5);\n }\n /**\n * Returns a Color3 value containing a teal color\n * @returns a new Color3 object\n */\n static Teal() {\n return new Color3(0, 1.0, 1.0);\n }\n /**\n * Returns a Color3 value containing a random color\n * @returns a new Color3 object\n */\n static Random() {\n return new Color3(Math.random(), Math.random(), Math.random());\n }\n}\n// Statics\nColor3._BlackReadOnly = Color3.Black();\n/**\n * Class used to hold a RBGA color\n */\nexport class Color4 {\n /**\n * Creates a new Color4 object from red, green, blue values, all between 0 and 1\n * @param r defines the red component (between 0 and 1, default is 0)\n * @param g defines the green component (between 0 and 1, default is 0)\n * @param b defines the blue component (between 0 and 1, default is 0)\n * @param a defines the alpha component (between 0 and 1, default is 1)\n */\n constructor(\n /**\n * Defines the red component (between 0 and 1, default is 0)\n */\n r = 0, \n /**\n * Defines the green component (between 0 and 1, default is 0)\n */\n g = 0, \n /**\n * Defines the blue component (between 0 and 1, default is 0)\n */\n b = 0, \n /**\n * Defines the alpha component (between 0 and 1, default is 1)\n */\n a = 1) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n // Operators\n /**\n * Adds in place the given Color4 values to the current Color4 object\n * @param right defines the second operand\n * @returns the current updated Color4 object\n */\n addInPlace(right) {\n this.r += right.r;\n this.g += right.g;\n this.b += right.b;\n this.a += right.a;\n return this;\n }\n /**\n * Creates a new array populated with 4 numeric elements : red, green, blue, alpha values\n * @returns the new array\n */\n asArray() {\n return [this.r, this.g, this.b, this.a];\n }\n /**\n * Stores from the starting index in the given array the Color4 successive values\n * @param array defines the array where to store the r,g,b components\n * @param index defines an optional index in the target array to define where to start storing values\n * @returns the current Color4 object\n */\n toArray(array, index = 0) {\n array[index] = this.r;\n array[index + 1] = this.g;\n array[index + 2] = this.b;\n array[index + 3] = this.a;\n return this;\n }\n /**\n * Update the current color with values stored in an array from the starting index of the given array\n * @param array defines the source array\n * @param offset defines an offset in the source array\n * @returns the current Color4 object\n */\n fromArray(array, offset = 0) {\n Color4.FromArrayToRef(array, offset, this);\n return this;\n }\n /**\n * Determines equality between Color4 objects\n * @param otherColor defines the second operand\n * @returns true if the rgba values are equal to the given ones\n */\n equals(otherColor) {\n return otherColor && this.r === otherColor.r && this.g === otherColor.g && this.b === otherColor.b && this.a === otherColor.a;\n }\n /**\n * Creates a new Color4 set with the added values of the current Color4 and of the given one\n * @param right defines the second operand\n * @returns a new Color4 object\n */\n add(right) {\n return new Color4(this.r + right.r, this.g + right.g, this.b + right.b, this.a + right.a);\n }\n /**\n * Creates a new Color4 set with the subtracted values of the given one from the current Color4\n * @param right defines the second operand\n * @returns a new Color4 object\n */\n subtract(right) {\n return new Color4(this.r - right.r, this.g - right.g, this.b - right.b, this.a - right.a);\n }\n /**\n * Subtracts the given ones from the current Color4 values and stores the results in \"result\"\n * @param right defines the second operand\n * @param result defines the Color4 object where to store the result\n * @returns the current Color4 object\n */\n subtractToRef(right, result) {\n result.r = this.r - right.r;\n result.g = this.g - right.g;\n result.b = this.b - right.b;\n result.a = this.a - right.a;\n return this;\n }\n /**\n * Creates a new Color4 with the current Color4 values multiplied by scale\n * @param scale defines the scaling factor to apply\n * @returns a new Color4 object\n */\n scale(scale) {\n return new Color4(this.r * scale, this.g * scale, this.b * scale, this.a * scale);\n }\n /**\n * Multiplies the Color4 values by the float \"scale\"\n * @param scale defines the scaling factor to apply\n * @returns the current updated Color4\n */\n scaleInPlace(scale) {\n this.r *= scale;\n this.g *= scale;\n this.b *= scale;\n this.a *= scale;\n return this;\n }\n /**\n * Multiplies the current Color4 values by scale and stores the result in \"result\"\n * @param scale defines the scaling factor to apply\n * @param result defines the Color4 object where to store the result\n * @returns the current unmodified Color4\n */\n scaleToRef(scale, result) {\n result.r = this.r * scale;\n result.g = this.g * scale;\n result.b = this.b * scale;\n result.a = this.a * scale;\n return this;\n }\n /**\n * Scale the current Color4 values by a factor and add the result to a given Color4\n * @param scale defines the scale factor\n * @param result defines the Color4 object where to store the result\n * @returns the unmodified current Color4\n */\n scaleAndAddToRef(scale, result) {\n result.r += this.r * scale;\n result.g += this.g * scale;\n result.b += this.b * scale;\n result.a += this.a * scale;\n return this;\n }\n /**\n * Clamps the rgb values by the min and max values and stores the result into \"result\"\n * @param min defines minimum clamping value (default is 0)\n * @param max defines maximum clamping value (default is 1)\n * @param result defines color to store the result into.\n * @returns the current Color4\n */\n clampToRef(min = 0, max = 1, result) {\n result.r = Scalar.Clamp(this.r, min, max);\n result.g = Scalar.Clamp(this.g, min, max);\n result.b = Scalar.Clamp(this.b, min, max);\n result.a = Scalar.Clamp(this.a, min, max);\n return this;\n }\n /**\n * Multiply an Color4 value by another and return a new Color4 object\n * @param color defines the Color4 value to multiply by\n * @returns a new Color4 object\n */\n multiply(color) {\n return new Color4(this.r * color.r, this.g * color.g, this.b * color.b, this.a * color.a);\n }\n /**\n * Multiply a Color4 value by another and push the result in a reference value\n * @param color defines the Color4 value to multiply by\n * @param result defines the Color4 to fill the result in\n * @returns the result Color4\n */\n multiplyToRef(color, result) {\n result.r = this.r * color.r;\n result.g = this.g * color.g;\n result.b = this.b * color.b;\n result.a = this.a * color.a;\n return result;\n }\n /**\n * Creates a string with the Color4 current values\n * @returns the string representation of the Color4 object\n */\n toString() {\n return \"{R: \" + this.r + \" G:\" + this.g + \" B:\" + this.b + \" A:\" + this.a + \"}\";\n }\n /**\n * Returns the string \"Color4\"\n * @returns \"Color4\"\n */\n getClassName() {\n return \"Color4\";\n }\n /**\n * Compute the Color4 hash code\n * @returns an unique number that can be used to hash Color4 objects\n */\n getHashCode() {\n let hash = (this.r * 255) | 0;\n hash = (hash * 397) ^ ((this.g * 255) | 0);\n hash = (hash * 397) ^ ((this.b * 255) | 0);\n hash = (hash * 397) ^ ((this.a * 255) | 0);\n return hash;\n }\n /**\n * Creates a new Color4 copied from the current one\n * @returns a new Color4 object\n */\n clone() {\n return new Color4(this.r, this.g, this.b, this.a);\n }\n /**\n * Copies the given Color4 values into the current one\n * @param source defines the source Color4 object\n * @returns the current updated Color4 object\n */\n copyFrom(source) {\n this.r = source.r;\n this.g = source.g;\n this.b = source.b;\n this.a = source.a;\n return this;\n }\n /**\n * Copies the given float values into the current one\n * @param r defines the red component to read from\n * @param g defines the green component to read from\n * @param b defines the blue component to read from\n * @param a defines the alpha component to read from\n * @returns the current updated Color4 object\n */\n copyFromFloats(r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n return this;\n }\n /**\n * Copies the given float values into the current one\n * @param r defines the red component to read from\n * @param g defines the green component to read from\n * @param b defines the blue component to read from\n * @param a defines the alpha component to read from\n * @returns the current updated Color4 object\n */\n set(r, g, b, a) {\n return this.copyFromFloats(r, g, b, a);\n }\n /**\n * Compute the Color4 hexadecimal code as a string\n * @param returnAsColor3 defines if the string should only contains RGB values (off by default)\n * @returns a string containing the hexadecimal representation of the Color4 object\n */\n toHexString(returnAsColor3 = false) {\n const intR = Math.round(this.r * 255);\n const intG = Math.round(this.g * 255);\n const intB = Math.round(this.b * 255);\n if (returnAsColor3) {\n return \"#\" + Scalar.ToHex(intR) + Scalar.ToHex(intG) + Scalar.ToHex(intB);\n }\n const intA = Math.round(this.a * 255);\n return \"#\" + Scalar.ToHex(intR) + Scalar.ToHex(intG) + Scalar.ToHex(intB) + Scalar.ToHex(intA);\n }\n /**\n * Computes a new Color4 converted from the current one to linear space\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\n * @returns a new Color4 object\n */\n toLinearSpace(exact = false) {\n const convertedColor = new Color4();\n this.toLinearSpaceToRef(convertedColor, exact);\n return convertedColor;\n }\n /**\n * Converts the Color4 values to linear space and stores the result in \"convertedColor\"\n * @param convertedColor defines the Color4 object where to store the linear space version\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\n * @returns the unmodified Color4\n */\n toLinearSpaceToRef(convertedColor, exact = false) {\n if (exact) {\n convertedColor.r = colorChannelToLinearSpaceExact(this.r);\n convertedColor.g = colorChannelToLinearSpaceExact(this.g);\n convertedColor.b = colorChannelToLinearSpaceExact(this.b);\n }\n else {\n convertedColor.r = colorChannelToLinearSpace(this.r);\n convertedColor.g = colorChannelToLinearSpace(this.g);\n convertedColor.b = colorChannelToLinearSpace(this.b);\n }\n convertedColor.a = this.a;\n return this;\n }\n /**\n * Computes a new Color4 converted from the current one to gamma space\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\n * @returns a new Color4 object\n */\n toGammaSpace(exact = false) {\n const convertedColor = new Color4();\n this.toGammaSpaceToRef(convertedColor, exact);\n return convertedColor;\n }\n /**\n * Converts the Color4 values to gamma space and stores the result in \"convertedColor\"\n * @param convertedColor defines the Color4 object where to store the gamma space version\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\n * @returns the unmodified Color4\n */\n toGammaSpaceToRef(convertedColor, exact = false) {\n if (exact) {\n convertedColor.r = colorChannelToGammaSpaceExact(this.r);\n convertedColor.g = colorChannelToGammaSpaceExact(this.g);\n convertedColor.b = colorChannelToGammaSpaceExact(this.b);\n }\n else {\n convertedColor.r = colorChannelToGammaSpace(this.r);\n convertedColor.g = colorChannelToGammaSpace(this.g);\n convertedColor.b = colorChannelToGammaSpace(this.b);\n }\n convertedColor.a = this.a;\n return this;\n }\n // Statics\n /**\n * Creates a new Color4 from the string containing valid hexadecimal values.\n *\n * A valid hex string is either in the format #RRGGBB or #RRGGBBAA.\n *\n * When a hex string without alpha is passed, the resulting Color4 has\n * its alpha value set to 1.0.\n *\n * An invalid string results in a Color with all its channels set to 0.0,\n * i.e. \"transparent black\".\n *\n * @param hex defines a string containing valid hexadecimal values\n * @returns a new Color4 object\n */\n static FromHexString(hex) {\n if (hex.substring(0, 1) !== \"#\" || (hex.length !== 9 && hex.length !== 7)) {\n return new Color4(0.0, 0.0, 0.0, 0.0);\n }\n const r = parseInt(hex.substring(1, 3), 16);\n const g = parseInt(hex.substring(3, 5), 16);\n const b = parseInt(hex.substring(5, 7), 16);\n const a = hex.length === 9 ? parseInt(hex.substring(7, 9), 16) : 255;\n return Color4.FromInts(r, g, b, a);\n }\n /**\n * Creates a new Color4 object set with the linearly interpolated values of \"amount\" between the left Color4 object and the right Color4 object\n * @param left defines the start value\n * @param right defines the end value\n * @param amount defines the gradient factor\n * @returns a new Color4 object\n */\n static Lerp(left, right, amount) {\n const result = new Color4(0.0, 0.0, 0.0, 0.0);\n Color4.LerpToRef(left, right, amount, result);\n return result;\n }\n /**\n * Set the given \"result\" with the linearly interpolated values of \"amount\" between the left Color4 object and the right Color4 object\n * @param left defines the start value\n * @param right defines the end value\n * @param amount defines the gradient factor\n * @param result defines the Color4 object where to store data\n */\n static LerpToRef(left, right, amount, result) {\n result.r = left.r + (right.r - left.r) * amount;\n result.g = left.g + (right.g - left.g) * amount;\n result.b = left.b + (right.b - left.b) * amount;\n result.a = left.a + (right.a - left.a) * amount;\n }\n /**\n * Interpolate between two Color4 using Hermite interpolation\n * @param value1 defines first Color4\n * @param tangent1 defines the incoming tangent\n * @param value2 defines second Color4\n * @param tangent2 defines the outgoing tangent\n * @param amount defines the target Color4\n * @returns the new interpolated Color4\n */\n static Hermite(value1, tangent1, value2, tangent2, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\n const part2 = -2.0 * cubed + 3.0 * squared;\n const part3 = cubed - 2.0 * squared + amount;\n const part4 = cubed - squared;\n const r = value1.r * part1 + value2.r * part2 + tangent1.r * part3 + tangent2.r * part4;\n const g = value1.g * part1 + value2.g * part2 + tangent1.g * part3 + tangent2.g * part4;\n const b = value1.b * part1 + value2.b * part2 + tangent1.b * part3 + tangent2.b * part4;\n const a = value1.a * part1 + value2.a * part2 + tangent1.a * part3 + tangent2.a * part4;\n return new Color4(r, g, b, a);\n }\n /**\n * Returns a new Color4 which is the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param time define where the derivative must be done\n * @returns 1st derivative\n */\n static Hermite1stDerivative(value1, tangent1, value2, tangent2, time) {\n const result = new Color4();\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\n return result;\n }\n /**\n * Update a Color4 with the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\n * @param value1 defines the first control point\n * @param tangent1 defines the first tangent\n * @param value2 defines the second control point\n * @param tangent2 defines the second tangent\n * @param time define where the derivative must be done\n * @param result define where to store the derivative\n */\n static Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result) {\n const t2 = time * time;\n result.r = (t2 - time) * 6 * value1.r + (3 * t2 - 4 * time + 1) * tangent1.r + (-t2 + time) * 6 * value2.r + (3 * t2 - 2 * time) * tangent2.r;\n result.g = (t2 - time) * 6 * value1.g + (3 * t2 - 4 * time + 1) * tangent1.g + (-t2 + time) * 6 * value2.g + (3 * t2 - 2 * time) * tangent2.g;\n result.b = (t2 - time) * 6 * value1.b + (3 * t2 - 4 * time + 1) * tangent1.b + (-t2 + time) * 6 * value2.b + (3 * t2 - 2 * time) * tangent2.b;\n result.a = (t2 - time) * 6 * value1.a + (3 * t2 - 4 * time + 1) * tangent1.a + (-t2 + time) * 6 * value2.a + (3 * t2 - 2 * time) * tangent2.a;\n }\n /**\n * Creates a new Color4 from a Color3 and an alpha value\n * @param color3 defines the source Color3 to read from\n * @param alpha defines the alpha component (1.0 by default)\n * @returns a new Color4 object\n */\n static FromColor3(color3, alpha = 1.0) {\n return new Color4(color3.r, color3.g, color3.b, alpha);\n }\n /**\n * Creates a new Color4 from the starting index element of the given array\n * @param array defines the source array to read from\n * @param offset defines the offset in the source array\n * @returns a new Color4 object\n */\n static FromArray(array, offset = 0) {\n return new Color4(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);\n }\n /**\n * Creates a new Color4 from the starting index element of the given array\n * @param array defines the source array to read from\n * @param offset defines the offset in the source array\n * @param result defines the target Color4 object\n */\n static FromArrayToRef(array, offset = 0, result) {\n result.r = array[offset];\n result.g = array[offset + 1];\n result.b = array[offset + 2];\n result.a = array[offset + 3];\n }\n /**\n * Creates a new Color3 from integer values (< 256)\n * @param r defines the red component to read from (value between 0 and 255)\n * @param g defines the green component to read from (value between 0 and 255)\n * @param b defines the blue component to read from (value between 0 and 255)\n * @param a defines the alpha component to read from (value between 0 and 255)\n * @returns a new Color3 object\n */\n static FromInts(r, g, b, a) {\n return new Color4(r / 255.0, g / 255.0, b / 255.0, a / 255.0);\n }\n /**\n * Check the content of a given array and convert it to an array containing RGBA data\n * If the original array was already containing count * 4 values then it is returned directly\n * @param colors defines the array to check\n * @param count defines the number of RGBA data to expect\n * @returns an array containing count * 4 values (RGBA)\n */\n static CheckColors4(colors, count) {\n // Check if color3 was used\n if (colors.length === count * 3) {\n const colors4 = [];\n for (let index = 0; index < colors.length; index += 3) {\n const newIndex = (index / 3) * 4;\n colors4[newIndex] = colors[index];\n colors4[newIndex + 1] = colors[index + 1];\n colors4[newIndex + 2] = colors[index + 2];\n colors4[newIndex + 3] = 1.0;\n }\n return colors4;\n }\n return colors;\n }\n}\n/**\n * @internal\n */\nexport class TmpColors {\n}\nTmpColors.Color3 = ArrayTools.BuildArray(3, Color3.Black);\nTmpColors.Color4 = ArrayTools.BuildArray(3, () => new Color4(0, 0, 0, 0));\nRegisterClass(\"BABYLON.Color3\", Color3);\nRegisterClass(\"BABYLON.Color4\", Color4);\n//# sourceMappingURL=math.color.js.map","/**\n * Marks method as deprecated and logs a warning once when it is called.\n * @param deprecation_info - Information about the deprecation, such as the new method to be used instead.\n * @note target_or_deprecation_info allows the decorator to be used as a function, so it can be used like this: `@Deprecated` or like this: `@Deprecated({ new: 'NewMethod' })`\n */\nexport function Deprecated(target_or_deprecation_info, property_key, descriptor) {\n if (descriptor && property_key) {\n // Directly applied as a decorator without being called as a function\n return handle_decorator(target_or_deprecation_info, property_key, descriptor);\n }\n // Called as a function, so it returns the actual decorator.\n // It is safe to assume that target_or_deprecation_info is DeprecationInfo.\n return function (target, propertyKey, descriptor) {\n return handle_decorator(target, propertyKey, descriptor, target_or_deprecation_info);\n };\n}\n// Function that actually handles the decorator\nfunction handle_decorator(_, property_key, descriptor, deprecation_info) {\n let warned = false;\n // Method decorator\n if (descriptor.value) {\n const original_method = descriptor.value;\n descriptor.value = function (...args) {\n if (!warned) {\n warning_log(property_key, deprecation_info);\n warned = true;\n }\n return original_method.apply(this, args);\n };\n // Setter decorator\n }\n else if (descriptor.set) {\n const original_setter = descriptor.set;\n descriptor.set = function (value) {\n if (!warned) {\n warning_log(property_key, deprecation_info);\n warned = true;\n }\n original_setter.call(this, value);\n };\n }\n return descriptor;\n}\nfunction warning_log(property_key, deprecation_info) {\n let warning_message = `${property_key} is deprecated and will be removed in a future version.`;\n if (deprecation_info) {\n warning_message += ` Please use ${deprecation_info.new} instead.`;\n }\n console.warn(warning_message);\n}\nexport function deprecate(fn, function_name, deprecation_info) {\n let warned = false;\n return function (...args) {\n if (!warned) {\n warning_log(function_name !== null && function_name !== void 0 ? function_name : fn.name, deprecation_info);\n warned = true;\n }\n return fn.apply(this, args);\n };\n}\n//# sourceMappingURL=Deprecated.js.map","import { Quaternion as BABYLON_Quaternion, Vector2 as BABYLON_Vector2, Vector3 as BABYLON_Vector3, Vector4 as BABYLON_Vector4, Matrix as BABYLON_Matrix } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Plane as BABYLON_Plane } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.plane.js';\nimport { deprecate } from './utils/Deprecated.js';\nexport const DEG2RAD = Math.PI / 180.0;\nexport const RAD2DEG = 180.0 / Math.PI;\nexport const EPSILON_DISTANCE = 0.0001; // This is 10th of a milimeter, which at this time seems like a small enough value.\nexport const EPSILON_DISTANCE_SQUARED = EPSILON_DISTANCE * EPSILON_DISTANCE;\nexport const EPSILON_ANGLE_DEGREES = 0.5;\nexport const EPSILON_ANGLE_RADIANS = EPSILON_ANGLE_DEGREES * DEG2RAD;\nexport const PARALLEL_DOT = Math.cos(EPSILON_ANGLE_RADIANS); // The precision of this value is subject to change and has been chosen based on observed bahaviour.\nexport { BABYLON_Vector2 as Vector2 };\nexport { BABYLON_Vector3 as Vector3 };\nexport { BABYLON_Vector4 as Vector4 };\nexport { BABYLON_Quaternion as Quaternion };\nexport { BABYLON_Matrix as Matrix };\nexport { BABYLON_Plane as Plane };\nclass ObjectPool {\n constructor(CONSTRUCTOR, ...args) {\n this.CONSTRUCTOR = CONSTRUCTOR;\n this.pool_storage = [];\n this.pool_size = 100;\n this.pool_storage.length = this.pool_size;\n this._args = args;\n for (let i = 0; i < this.pool_size; i++) {\n this.pool_storage[i] = new this.CONSTRUCTOR(...args);\n }\n }\n fetch() {\n if (this.pool_storage.length === 0) {\n console.warn(`Object pool for ${this.CONSTRUCTOR.name} ran out of objects with a size of ${this.pool_size}`);\n return new this.CONSTRUCTOR(...this._args);\n }\n else {\n // return last object in pool\n return this.pool_storage.pop();\n }\n }\n return(...val) {\n if (this.pool_storage.length > this.pool_size) {\n console.warn(`Object pool for ${this.CONSTRUCTOR.name} has over ${this.pool_size} objects, dropping objects`);\n }\n else {\n for (let i = 0; i < val.length; i++) {\n this.pool_storage.push(val[i]);\n }\n }\n }\n}\nexport const vector2_pool = new ObjectPool(BABYLON_Vector2);\nexport const vector3_pool = new ObjectPool(BABYLON_Vector3);\nexport const vector4_pool = new ObjectPool(BABYLON_Vector4);\nexport const quaternion_pool = new ObjectPool(BABYLON_Quaternion);\nexport const matrix_pool = new ObjectPool(BABYLON_Matrix);\n/**\n * @deprecated\n */\nexport const vec3 = deprecate(function vec3(x, y, z) {\n return { x: x, y: y, z: z };\n}, 'vec3', { new: 'new IVector3(x, y, z)' });\n/**\n * @deprecated\n */\nexport const identity_imatrix4 = deprecate(function identity_imatrix4() {\n return [\n { x: 1, y: 0, z: 0, w: 0 },\n { x: 0, y: 1, z: 0, w: 0 },\n { x: 0, y: 0, z: 1, w: 0 },\n { x: 0, y: 0, z: 0, w: 1 }\n ];\n}, 'identity_imatrix4', { new: 'IMatrix4.Identity()' });\n/**\n * @deprecated\n * Return a \"pure diagonal\" vector (vector with equal elements).\n * https://math.stackexchange.com/questions/1626821/what-is-the-name-of-a-vector-with-all-equal-elements\n * @param magnitude The magnitude of each element\n */\nexport const pure_diagonal_vector = deprecate(function pure_diagonal_vector(magnitude) {\n return vec3(magnitude, magnitude, magnitude);\n}, 'pure_diagonal_vector', { new: 'new IVector3(value)' });\n/**\n * @deprecated\n */\nexport const add = deprecate(function add(a, b) {\n return { x: a.x + b.x, y: a.y + b.y, z: a.z + b.z };\n}, 'add', { new: 'IVector3.add(a, b)' });\n/**\n * @deprecated\n */\nexport const sub = deprecate(function sub(a, b) {\n return vec3(a.x - b.x, a.y - b.y, a.z - b.z);\n}, 'sub', { new: 'IVector3.subtract(a, b)' });\n/**\n * @deprecated\n * Creates new matrix from a list of values (16)\n * @param initial_m11 defines 1st value of 1st row\n * @param initial_m12 defines 2nd value of 1st row\n * @param initial_m13 defines 3rd value of 1st row\n * @param initial_m14 defines 4th value of 1st row\n * @param initial_m21 defines 1st value of 2nd row\n * @param initial_m22 defines 2nd value of 2nd row\n * @param initial_m23 defines 3rd value of 2nd row\n * @param initial_m24 defines 4th value of 2nd row\n * @param initial_m31 defines 1st value of 3rd row\n * @param initial_m32 defines 2nd value of 3rd row\n * @param initial_m33 defines 3rd value of 3rd row\n * @param initial_m34 defines 4th value of 3rd row\n * @param initial_m41 defines 1st value of 4th row\n * @param initial_m42 defines 2nd value of 4th row\n * @param initial_m43 defines 3rd value of 4th row\n * @param initial_m44 defines 4th value of 4th row\n * @returns the new matrix\n */\nexport const from_values_to_matrix4 = deprecate(function from_values_to_matrix4(initial_m11, initial_m12, initial_m13, initial_m14, initial_m21, initial_m22, initial_m23, initial_m24, initial_m31, initial_m32, initial_m33, initial_m34, initial_m41, initial_m42, initial_m43, initial_m44) {\n const matrix = [\n { x: initial_m11, y: initial_m12, z: initial_m13, w: initial_m14 },\n { x: initial_m21, y: initial_m22, z: initial_m23, w: initial_m24 },\n { x: initial_m31, y: initial_m32, z: initial_m33, w: initial_m34 },\n { x: initial_m41, y: initial_m42, z: initial_m43, w: initial_m44 }\n ];\n return matrix;\n}, 'from_values_to_matrix4', { new: 'IMatrix4.from_values(...vals)' });\n// Implementation taken from BabylonJS\n// https://github.com/BabylonJS/Babylon.js/blob/86928af69d738d9a66c2e2468f0a2fe301f86780/packages/dev/core/src/Maths/math.vector.ts#L4705\n/**\n * @deprecated\n */\nexport const inverse = deprecate(function inverse(m) {\n // TODO: Add early out for identity matrix\n // the inverse of a Matrix is the transpose of cofactor matrix divided by the determinant\n const m00 = m[0].x;\n const m01 = m[0].y;\n const m02 = m[0].z;\n const m03 = m[0].w;\n const m10 = m[1].x;\n const m11 = m[1].y;\n const m12 = m[1].z;\n const m13 = m[1].w;\n const m20 = m[2].x;\n const m21 = m[2].y;\n const m22 = m[2].z;\n const m23 = m[2].w;\n const m30 = m[3].x;\n const m31 = m[3].y;\n const m32 = m[3].z;\n const m33 = m[3].w;\n const det_22_33 = m22 * m33 - m32 * m23;\n const det_21_33 = m21 * m33 - m31 * m23;\n const det_21_32 = m21 * m32 - m31 * m22;\n const det_20_33 = m20 * m33 - m30 * m23;\n const det_20_32 = m20 * m32 - m22 * m30;\n const det_20_31 = m20 * m31 - m30 * m21;\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\n const det = m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\n if (det === 0) {\n console.warn('Matrix determinant is zero so it could not be inverted');\n return m;\n }\n const det_inv = 1 / det;\n const det_12_33 = m12 * m33 - m32 * m13;\n const det_11_33 = m11 * m33 - m31 * m13;\n const det_11_32 = m11 * m32 - m31 * m12;\n const det_10_33 = m10 * m33 - m30 * m13;\n const det_10_32 = m10 * m32 - m30 * m12;\n const det_10_31 = m10 * m31 - m30 * m11;\n const det_12_23 = m12 * m23 - m22 * m13;\n const det_11_23 = m11 * m23 - m21 * m13;\n const det_11_22 = m11 * m22 - m21 * m12;\n const det_10_23 = m10 * m23 - m20 * m13;\n const det_10_22 = m10 * m22 - m20 * m12;\n const det_10_21 = m10 * m21 - m20 * m11;\n const cofact_10 = -(m01 * det_22_33 - m02 * det_21_33 + m03 * det_21_32);\n const cofact_11 = +(m00 * det_22_33 - m02 * det_20_33 + m03 * det_20_32);\n const cofact_12 = -(m00 * det_21_33 - m01 * det_20_33 + m03 * det_20_31);\n const cofact_13 = +(m00 * det_21_32 - m01 * det_20_32 + m02 * det_20_31);\n const cofact_20 = +(m01 * det_12_33 - m02 * det_11_33 + m03 * det_11_32);\n const cofact_21 = -(m00 * det_12_33 - m02 * det_10_33 + m03 * det_10_32);\n const cofact_22 = +(m00 * det_11_33 - m01 * det_10_33 + m03 * det_10_31);\n const cofact_23 = -(m00 * det_11_32 - m01 * det_10_32 + m02 * det_10_31);\n const cofact_30 = -(m01 * det_12_23 - m02 * det_11_23 + m03 * det_11_22);\n const cofact_31 = +(m00 * det_12_23 - m02 * det_10_23 + m03 * det_10_22);\n const cofact_32 = -(m00 * det_11_23 - m01 * det_10_23 + m03 * det_10_21);\n const cofact_33 = +(m00 * det_11_22 - m01 * det_10_22 + m02 * det_10_21);\n return from_values_to_matrix4(cofact_00 * det_inv, cofact_10 * det_inv, cofact_20 * det_inv, cofact_30 * det_inv, cofact_01 * det_inv, cofact_11 * det_inv, cofact_21 * det_inv, cofact_31 * det_inv, cofact_02 * det_inv, cofact_12 * det_inv, cofact_22 * det_inv, cofact_32 * det_inv, cofact_03 * det_inv, cofact_13 * det_inv, cofact_23 * det_inv, cofact_33 * det_inv);\n}, 'inverse', { new: 'IMatrix4.inverse(m)' });\nexport function determinant3x3(m) {\n if (m.length !== 16)\n throw new Error('determinant3x3 expects an array of length 16 (4x4)');\n const detA = (m[4 * 1 + 1] * m[4 * 2 + 2] - m[4 * 1 + 2] * m[4 * 2 + 1]);\n const detB = (m[4 * 1 + 2] * m[4 * 2 + 0] - m[4 * 1 + 0] * m[4 * 2 + 2]);\n const detC = (m[4 * 1 + 0] * m[4 * 2 + 1] - m[4 * 1 + 1] * m[4 * 2 + 0]);\n return detA * m[4 * 0 + 0] + detB * m[4 * 0 + 1] + detC * m[4 * 0 + 2];\n}\nexport function imatrix4_equals_babylon_matrix(imatrix, bmatrix) {\n // Because babylon actually uses a Float32Array as their backing storage for their matrices, we need to compare in their float space.\n // So we convert the viewer matrix to a babylon matrix first, and then compare that with the given babylon matrix.\n const temporary_compare_babylon_matrix = matrix_pool.fetch().fromIMatrix4(imatrix);\n const result = temporary_compare_babylon_matrix.equals(bmatrix);\n matrix_pool.return(temporary_compare_babylon_matrix);\n return result;\n}\n/**\n * @deprecated\n */\nexport const copy_imatrix4_to_ref = deprecate(function copy_imatrix4_to_ref(src, dst) {\n for (let i = 0; i < 4; i++) {\n dst[i].x = src[i].x;\n dst[i].y = src[i].y;\n dst[i].z = src[i].z;\n dst[i].w = src[i].w;\n }\n}, 'copy_imatrix4_to_ref', { new: 'IMatrix4.copy_to_ref(a, b)' });\nexport function horizontal_to_vertical_fov(horizontal_fov, aspect_ratio) {\n return 2 * Math.atan(Math.tan(horizontal_fov * 0.5) / aspect_ratio);\n}\nexport function vertical_to_horizontal_fov(vertical_fov, aspect_ratio) {\n return 2 * Math.atan(Math.tan(vertical_fov * 0.5) * aspect_ratio);\n}\nexport function clamp(a, min, max) {\n return Math.min(Math.max(a, min), max);\n}\nfunction instance_of_i_color(object) {\n return 'r' in object;\n}\n/**\n * @deprecated\n * Returns an object with numbers r, g and b, representing respective colors.\n */\nexport const color3 = deprecate(function color3(r = 0, g = 0, b = 0) {\n return { r: r, g: g, b: b };\n}, 'color3', { new: 'new IColor(r, g, b)' });\n/**\n * @deprecated\n * Returns an IColor object with integers in the range 0 - 255\n * @param c An IColor object with floats in the range 0.0 - 1.0\n */\nexport const color_float_to_uint = deprecate(function color_float_to_uint(c) {\n return color3(c.r * 255, c.g * 255, c.b * 255);\n}, 'color_float_to_uint');\n/**\n * @deprecated\n * Returns an IColor object with floats in the range 0.0 - 1.0\n * @param c An IColor object with integers in the range 0 - 255\n */\nexport const color_uint_to_float = deprecate(function color_uint_to_float(c) {\n return color3(c.r / 255, c.g / 255, c.b / 255);\n}, 'color_uint_to_float');\nfunction ensure_i_vector(vec_or_color) {\n let vec_1;\n if (instance_of_i_color(vec_or_color)) {\n vec_1 = { x: vec_or_color.r, y: vec_or_color.g, z: vec_or_color.b };\n }\n else {\n vec_1 = vec_or_color;\n }\n return vec_1;\n}\n/**\n * @deprecated\n */\nexport const lerp = deprecate(function lerp(a, b, scale) {\n if (scale < 0.0 || scale > 1.0) {\n console.warn('Keep scale between 0.0 and 1.0');\n scale = scale % 1.0;\n }\n a = ensure_i_vector(a);\n b = ensure_i_vector(b);\n return vec3(a.x + scale * (b.x - a.x), a.y + scale * (b.y - a.y), a.z + scale * (b.z - a.z));\n}, 'lerp', { new: 'IVector3.lerp(v)' });\nexport function lerp_float(a, b, scale) {\n return a * (1 - scale) + b * scale;\n}\nfunction dep_length(v) {\n return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z);\n}\n/**\n * @deprecated\n */\nexport const length = deprecate(dep_length, 'length', { new: 'IVector3.magnitude(v)' });\nfunction dep_dist_squared(a, b) {\n const v = sub(a, b);\n return v.x * v.x + v.y * v.y + v.z * v.z;\n}\n/**\n * @deprecated\n */\nexport const dist_squared = deprecate(dep_dist_squared, 'dist_squared', { new: 'IVector3.sqr_distance(v)' });\n/**\n * @deprecated\n * Returns a vector multiplied by a scalar.\n * @param a the vector.\n * @param s the scalar.\n */\nexport const muls = deprecate(function muls(a, s) {\n return vec3(a.x * s, a.y * s, a.z * s);\n}, 'muls', { new: 'IVector3.scale(v, scale)' });\n/**\n * @deprecated\n * Returns a vector divided by a scalar.\n * @param v the vector.\n * @param s the scalar.\n */\nexport const divs = deprecate(function divs(v, s) {\n return { x: v.x / s, y: v.y / s, z: v.z / s };\n}, 'divs');\n/**\n * @deprecated\n */\nexport const normalize = deprecate(function normalize(v) {\n return divs(v, length(v));\n}, 'normalize', { new: 'IVector3.normalize(v)' });\n/**\n * @deprecated\n */\nexport const dot = deprecate(function dot(a, b) {\n return a.x * b.x + a.y * b.y + a.z * b.z;\n}, 'dot', { new: 'IVector3.dot(a, b)' });\n/**\n * @deprecated\n */\nexport const angle = deprecate(function angle(a, b) {\n return Math.acos(dot(a, b) / (length(a) * length(b)));\n}, 'angle', { new: 'IVector3.angle(a, b)' });\n/**\n * Returns the solid angle of an angle.\n * @param a an angle measured in radians\n * @returns solid angle measured in steradians\n */\nexport function solid_angle(a) {\n // 2*pi*(1-cos(a/2))\n return 2 * Math.PI * (1 - Math.cos(a / 2));\n}\n/**\n * @deprecated\n */\nexport const max_component = deprecate(function max_component(v) {\n return v.x >= v.y && v.x >= v.z ? v.x : v.y >= v.z ? v.y : v.z;\n}, 'max_component', { new: 'IVector3.max_component(v)' });\n/**\n * @deprecated\n */\nexport const absv3 = deprecate(function absv3(v) {\n return vec3(Math.abs(v.x), Math.abs(v.y), Math.abs(v.z));\n}, 'absv3');\n/**\n * @deprecated\n */\nexport const min_vector3_to_ref = deprecate(function min_vector3_to_ref(a, b, ref) {\n ref.x = Math.min(a.x, b.x);\n ref.y = Math.min(a.y, b.y);\n ref.z = Math.min(a.z, b.z);\n}, 'min_vector3_to_ref', { new: 'IVector3.min_to_ref(a, b, r)' });\n/**\n * @deprecated\n */\nexport const max_vector3_to_ref = deprecate(function max_vector3_to_ref(a, b, ref) {\n ref.x = Math.max(a.x, b.x);\n ref.y = Math.max(a.y, b.y);\n ref.z = Math.max(a.z, b.z);\n}, 'max_vector3_to_ref', { new: 'IVector3.max_to_ref(a, b, r)' });\n/**\n * @deprecated\n */\nexport const perpendicular = deprecate(function perpendicular(v) {\n if (Math.abs(v.y) < Math.abs(v.x)) {\n return vec3(v.z, 0, -v.x);\n }\n else {\n return vec3(0, v.z, -v.y);\n }\n}, 'perpendicular', { new: 'IVector3.perpendicular(v)' });\n/**\n * @deprecated\n */\nexport const cross = deprecate(function cross(a, b) {\n return vec3(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x);\n}, 'cross', { new: 'IVector3.cross(a, b)' });\n/**\n * Rotate a vector.\n */\nexport function rotate(vector3, delta_angle, rotation_axis) {\n // TODO: Fix new once merged to main\n const quaternion = new BABYLON_Quaternion();\n BABYLON_Quaternion.RotationAxisToRef(new BABYLON_Vector3(rotation_axis.x, rotation_axis.y, rotation_axis.z), delta_angle, quaternion);\n const babylon_vector = new BABYLON_Vector3(vector3.x, vector3.y, vector3.z)\n .rotateByQuaternionToRef(quaternion, new BABYLON_Vector3(0.0, 0.0, 0.0));\n return { x: babylon_vector.x, y: babylon_vector.y, z: babylon_vector.z };\n}\nexport function radians(degrees) {\n return Math.PI * degrees / 180;\n}\nexport function degrees(radians) {\n return 180 * radians / Math.PI;\n}\nexport class TrackedVec3 {\n constructor(x = 0.0, y = 0.0, z = 0.0) {\n this._x = 0;\n this._y = 0;\n this._z = 0;\n this._x = x;\n this._y = y;\n this._z = z;\n }\n report_change() {\n if (this.onchange) {\n this.onchange();\n }\n }\n get x() {\n return this._x;\n }\n set x(v) {\n if (this._x === v)\n return;\n this._x = v;\n this.report_change();\n }\n get y() {\n return this._y;\n }\n set y(v) {\n if (this._y === v)\n return;\n this._y = v;\n this.report_change();\n }\n get z() {\n return this._z;\n }\n set z(v) {\n if (this._z === v)\n return;\n this._z = v;\n this.report_change();\n }\n get r() {\n return this._x;\n }\n set r(v) {\n if (this._x === v)\n return;\n this._x = v;\n this.report_change();\n }\n get g() {\n return this._y;\n }\n set g(v) {\n if (this._y === v)\n return;\n this._y = v;\n this.report_change();\n }\n get b() {\n return this._z;\n }\n set b(v) {\n if (this._z === v)\n return;\n this._z = v;\n this.report_change();\n }\n set(x, y, z) {\n if (this._x !== x || this._y !== y || this._z !== z) {\n this._x = x;\n this._y = y;\n this._z = z;\n this.report_change();\n }\n }\n copy(v) {\n this.set(v.x, v.y, v.z);\n }\n}\n/**\n * @deprecated\n * Check if two vector3s are equivalent.\n * @param lh first vector\n * @param rh second vector\n */\nexport const equivalent_vector3s = deprecate(function equivalent_vector3s(lh, rh) {\n return lh.x === rh.x && lh.y === rh.y && lh.z === rh.z;\n}, 'equivalent_vector3s', { new: 'IVector3.equals(a, b)' });\n/**\n * @deprecated\n * Check if two vector4s are equivalent.\n * @param lh first vector\n * @param rh second vector\n */\nexport const equivalent_vector4s = deprecate(function equivalent_vector4s(lh, rh) {\n return lh.x === rh.x && lh.y === rh.y && lh.z === rh.z && lh.w === rh.w;\n}, 'equivalent_vector4s', { new: 'IVector4.equals(a, b)' });\n/**\n * @deprecated\n * Check if two matrix4s are equivalent.\n * @param lh first matrix\n * @param rh second matrix\n */\nexport const equivalent_matrix4s = deprecate(function equivalent_matrix4s(lh, rh) {\n return equivalent_vector4s(lh[0], rh[0]) &&\n equivalent_vector4s(lh[1], rh[1]) &&\n equivalent_vector4s(lh[2], rh[2]) &&\n equivalent_vector4s(lh[3], rh[3]);\n}, 'equivalent_matrix4s', { new: 'IMatrix4.equals(a, b)' });\n/**\n * @deprecated\n */\nexport const from_array_to_matrix4 = deprecate(function from_array_to_matrix4(val) {\n const matrix = [\n { x: val[0], y: val[1], z: val[2], w: val[3] },\n { x: val[4], y: val[5], z: val[6], w: val[7] },\n { x: val[8], y: val[9], z: val[10], w: val[11] },\n { x: val[12], y: val[13], z: val[14], w: val[15] }\n ];\n return matrix;\n}, 'from_array_to_matrix4', { new: 'IMatrix4.from_array(arr)' });\n/**\n * @deprecated\n * Project a vector3 onto a plane and return resulting vector3.\n * @param v a vector3\n * @param plane_normal normal of the plane\n */\nexport const project_onto_plane = deprecate(function project_onto_plane(v, plane_normal) {\n const ortho_component = muls(plane_normal, dot(v, plane_normal));\n return sub(v, ortho_component); // Project by removing the component of v orthogonal to the plane\n}, 'project_onto_plane', { new: 'IVector3.project_on_plane(v, p)' });\nexport function get_euler_angles_from_rotation_matrix(transform) {\n const matrix = matrix_pool.fetch().fromIMatrix4(transform);\n const rotation_matrix = matrix.getRotationMatrixToRef(matrix_pool.fetch());\n const quaternion = new BABYLON_Quaternion();\n quaternion.fromRotationMatrix(rotation_matrix);\n matrix_pool.return(matrix, rotation_matrix);\n return quaternion.toEulerAngles();\n}\n//# sourceMappingURL=Math.js.map","import { Color4 as BABYLON_Color4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nexport function ivec3_to_col4(col, alpha = 1.0) {\n return new BABYLON_Color4(col.x, col.y, col.z, alpha);\n}\nexport function icolor_to_col4(col, alpha = 1.0) {\n return new BABYLON_Color4(col.r, col.g, col.b, alpha);\n}\nexport function vector_3(vec3) {\n return new BABYLON_Vector3(vec3.x, vec3.y, vec3.z);\n}\n//# sourceMappingURL=Conversion.js.map","import { Color3 as BABYLON_Color3, Color4 as BABYLON_Color4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js';\nimport { IVector3, LineType } from '../../../../api.js';\nimport { rotate } from '../../../../Math.js';\nimport { icolor_to_col4, vector_3 } from '../../../utility/Conversion.js';\nconst PRIMARY_COLOR = BABYLON_Color3.Magenta().toColor4();\nconst SECONDARY_COLOR = BABYLON_Color3.Green().toColor4();\n// If UNIFORM color mode is used, determines how similar the light source color may\n// be to PRIMARY_COLOR before switching to SECONDARY_COLOR.\nconst MIN_COLOR_DIFFERENCE = 0.3;\n// Used to make line length appear proportional to light falloff.\nconst VISIBLE_LIGHT_COEFFICIENT = 4;\nconst LINE_COLORS = [BABYLON_Color3.Green(), BABYLON_Color3.Magenta(), BABYLON_Color3.Red(),\n BABYLON_Color3.Gray(), BABYLON_Color3.Blue(), BABYLON_Color3.Purple(), BABYLON_Color3.Teal(), BABYLON_Color3.Yellow()];\n/**\n * Determines how the lines of LightVisualizers are colored.\n * DIFFERENTIATED (default): Color is set according to LightID and index of line_colors.\n * For LightID's > 7, random color is used.\n * UNIFORM: All LightVisualizers have PRIMARY_COLOR (except if it's very similar\n * to the light source's - then they use SECONDARY_COLOR.\n * MATCHING: Lines are of the same color as the light source.\n */\nexport var ColorMode;\n(function (ColorMode) {\n ColorMode[ColorMode[\"DIFFERENTIATED\"] = 0] = \"DIFFERENTIATED\";\n ColorMode[ColorMode[\"UNIFORM\"] = 1] = \"UNIFORM\";\n ColorMode[ColorMode[\"MATCHING\"] = 2] = \"MATCHING\";\n})(ColorMode || (ColorMode = {}));\nexport class LightVisualizer {\n constructor(_light, _line_manager, _color_mode, _scene) {\n this._light = _light;\n this._line_manager = _line_manager;\n this._color_mode = _color_mode;\n this._scene = _scene;\n this._random_color = BABYLON_Color3.Random();\n this._minimum_line_length = -1;\n // Computed by using intensity and the inverse square law, or shadow_far,\n // if that is smaller\n this._light_range = -1;\n this._lines = [];\n this._intensity_line_thickness = {\n min_intensity: 0.3, min_thickness: 0.005, max_intensity: 5, max_thickness: 0.02\n };\n }\n get color_mode() {\n return this._color_mode;\n }\n set color_mode(mode) {\n this._color_mode = mode;\n this.update();\n }\n /**\n * Remove lines used for visualization. If start_index is set, spare lines with lower index.\n */\n dispose(start_index = 0) {\n // Disposing of sprite will take place here\n this.remove_lines(start_index);\n }\n update_visualizer(light_range_coefficient = VISIBLE_LIGHT_COEFFICIENT) {\n this.set_light_range(light_range_coefficient);\n this._line_color = this.compute_line_color();\n this._line_thickness = this.get_thickness();\n }\n get_thickness() {\n const intensity = this._light.intensity;\n const map = this._intensity_line_thickness;\n const intensity_quotient = (intensity - map.min_intensity) / (map.max_intensity - map.min_intensity);\n const thickness = (map.max_thickness - map.min_thickness) * intensity_quotient + map.min_thickness;\n return Math.min(Math.max(thickness, map.min_thickness), map.max_thickness);\n }\n // If uniform colors are used, determine whether or not PRIMARY_COLOR or SECONDARY_COLOR\n // should be used for the lines. This is in order to clearly visually separate\n // the lines from the lighting.\n get_uniform_color(color) {\n const difference = Math.abs(color.r - PRIMARY_COLOR.r) +\n Math.abs(color.g - PRIMARY_COLOR.g) + Math.abs(color.b - PRIMARY_COLOR.b);\n if (difference >= MIN_COLOR_DIFFERENCE) {\n return PRIMARY_COLOR;\n }\n else\n return SECONDARY_COLOR;\n }\n get_differentiated_color(id) {\n const color = id < LINE_COLORS.length ? LINE_COLORS[id] : this._random_color;\n return BABYLON_Color4.FromColor3(color);\n }\n compute_line_color() {\n const light_color3 = this._light.color;\n const light_id = this._light.id;\n const light_color4 = icolor_to_col4(light_color3);\n switch (this.color_mode) {\n case ColorMode.UNIFORM:\n return this.get_uniform_color(light_color4);\n case ColorMode.DIFFERENTIATED:\n return this.get_differentiated_color(light_id);\n default:\n return light_color4;\n }\n }\n set_light_range(light_range_coefficient) {\n var _a;\n this._light_range = Math.max(Math.sqrt(this._light.intensity * light_range_coefficient), this._minimum_line_length);\n const shadow_far = ((_a = this._light.shadow) === null || _a === void 0 ? void 0 : _a.shadow_far) || 20;\n if (this._light_range > shadow_far) {\n this._light_range = shadow_far;\n }\n }\n draw_line(index, p1, p2, color, line_thickness) {\n if (this._lines.length > index) {\n this._line_manager.update_line(this._lines[index], p1, p2, color, line_thickness);\n }\n else {\n this._lines.push(this._line_manager.create_line(LineType.SOLID, p1, p2, color, line_thickness));\n }\n }\n // Draw curve and return index of last line modified\n draw_curve(index, start_point, endpoint, main_axis, center, delta_angle) {\n const num_segments = Math.round(delta_angle * 100);\n const points = [...Array(num_segments)].map((_, i) => rotate(start_point.subtract(center), -delta_angle * i / num_segments, main_axis));\n for (let i = 0; i < points.length; i++) {\n const point = vector_3(points[i]);\n if (i === points.length - 1) {\n this.draw_line(index + i, point.add(center), endpoint, this._line_color, this._line_thickness);\n }\n else {\n this.draw_line(index + i, point.add(center), vector_3(points[i + 1]).add(center), this._line_color, this._line_thickness);\n }\n }\n return index + num_segments;\n }\n remove_lines(start_index) {\n this._lines.slice(start_index).forEach(line => {\n this._line_manager.remove_line(line);\n });\n this._lines.splice(start_index);\n }\n draw_directional_lines(length, radius, shape, num_lines, light_direction, light_position, far_circle = false) {\n const center_far = light_position.add(light_direction.scale(length));\n const perp_vec = vector_3(IVector3.perpendicular(light_direction));\n const cross_vec = light_direction.cross(perp_vec);\n const polar_step = (Math.PI * 2.0) / num_lines;\n for (let n = 0; n < num_lines; n++) {\n const ct = Math.cos(n * polar_step);\n const st = Math.sin(n * polar_step);\n const offset = perp_vec.scale(ct * radius)\n .add(cross_vec.scale(st * radius));\n const endpoint = center_far.add(offset);\n const start_point = shape === 'cone' ? light_position : light_position.add(offset);\n this.draw_line(n, start_point, endpoint, this._line_color, this._line_thickness);\n if (n === 0 && far_circle) {\n this.draw_curve(num_lines, endpoint, endpoint, light_direction, center_far, 2 * Math.PI);\n }\n }\n }\n}\n//# sourceMappingURL=LightVisualizer.js.map","/**\n * Class used to store gfx data (like WebGLBuffer)\n */\nexport class DataBuffer {\n /**\n * Gets the underlying buffer\n */\n get underlyingResource() {\n return null;\n }\n /**\n * Constructs the buffer\n */\n constructor() {\n /**\n * Gets or sets the number of objects referencing this buffer\n */\n this.references = 0;\n /** Gets or sets the size of the underlying buffer */\n this.capacity = 0;\n /**\n * Gets or sets a boolean indicating if the buffer contains 32bits indices\n */\n this.is32Bits = false;\n this.uniqueId = DataBuffer._Counter++;\n }\n}\nDataBuffer._Counter = 0;\n//# sourceMappingURL=dataBuffer.js.map","import { DataBuffer } from \"./dataBuffer.js\";\n/**\n * Class used to store data that will be store in GPU memory\n */\nexport class Buffer {\n /**\n * Gets a boolean indicating if the Buffer is disposed\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Constructor\n * @param engine the engine\n * @param data the data to use for this buffer\n * @param updatable whether the data is updatable\n * @param stride the stride (optional)\n * @param postponeInternalCreation whether to postpone creating the internal WebGL buffer (optional)\n * @param instanced whether the buffer is instanced (optional)\n * @param useBytes set to true if the stride in in bytes (optional)\n * @param divisor sets an optional divisor for instances (1 by default)\n * @param label defines the label of the buffer (for debug purpose)\n */\n constructor(engine, data, updatable, stride = 0, postponeInternalCreation = false, instanced = false, useBytes = false, divisor, label) {\n this._isAlreadyOwned = false;\n this._isDisposed = false;\n if (engine && engine.getScene) {\n // old versions of VertexBuffer accepted 'mesh' instead of 'engine'\n this._engine = engine.getScene().getEngine();\n }\n else {\n this._engine = engine;\n }\n this._updatable = updatable;\n this._instanced = instanced;\n this._divisor = divisor || 1;\n this._label = label;\n if (data instanceof DataBuffer) {\n this._data = null;\n this._buffer = data;\n }\n else {\n this._data = data;\n this._buffer = null;\n }\n this.byteStride = useBytes ? stride : stride * Float32Array.BYTES_PER_ELEMENT;\n if (!postponeInternalCreation) {\n // by default\n this.create();\n }\n }\n /**\n * Create a new VertexBuffer based on the current buffer\n * @param kind defines the vertex buffer kind (position, normal, etc.)\n * @param offset defines offset in the buffer (0 by default)\n * @param size defines the size in floats of attributes (position is 3 for instance)\n * @param stride defines the stride size in floats in the buffer (the offset to apply to reach next value when data is interleaved)\n * @param instanced defines if the vertex buffer contains indexed data\n * @param useBytes defines if the offset and stride are in bytes *\n * @param divisor sets an optional divisor for instances (1 by default)\n * @returns the new vertex buffer\n */\n createVertexBuffer(kind, offset, size, stride, instanced, useBytes = false, divisor) {\n const byteOffset = useBytes ? offset : offset * Float32Array.BYTES_PER_ELEMENT;\n const byteStride = stride ? (useBytes ? stride : stride * Float32Array.BYTES_PER_ELEMENT) : this.byteStride;\n // a lot of these parameters are ignored as they are overridden by the buffer\n return new VertexBuffer(this._engine, this, kind, this._updatable, true, byteStride, instanced === undefined ? this._instanced : instanced, byteOffset, size, undefined, undefined, true, this._divisor || divisor);\n }\n // Properties\n /**\n * Gets a boolean indicating if the Buffer is updatable?\n * @returns true if the buffer is updatable\n */\n isUpdatable() {\n return this._updatable;\n }\n /**\n * Gets current buffer's data\n * @returns a DataArray or null\n */\n getData() {\n return this._data;\n }\n /**\n * Gets underlying native buffer\n * @returns underlying native buffer\n */\n getBuffer() {\n return this._buffer;\n }\n /**\n * Gets the stride in float32 units (i.e. byte stride / 4).\n * May not be an integer if the byte stride is not divisible by 4.\n * @returns the stride in float32 units\n * @deprecated Please use byteStride instead.\n */\n getStrideSize() {\n return this.byteStride / Float32Array.BYTES_PER_ELEMENT;\n }\n // Methods\n /**\n * Store data into the buffer. Creates the buffer if not used already.\n * If the buffer was already used, it will be updated only if it is updatable, otherwise it will do nothing.\n * @param data defines the data to store\n */\n create(data = null) {\n if (!data && this._buffer) {\n return; // nothing to do\n }\n data = data || this._data;\n if (!data) {\n return;\n }\n if (!this._buffer) {\n // create buffer\n if (this._updatable) {\n this._buffer = this._engine.createDynamicVertexBuffer(data, this._label);\n this._data = data;\n }\n else {\n this._buffer = this._engine.createVertexBuffer(data, undefined, this._label);\n }\n }\n else if (this._updatable) {\n // update buffer\n this._engine.updateDynamicVertexBuffer(this._buffer, data);\n this._data = data;\n }\n }\n /** @internal */\n _rebuild() {\n this._buffer = null;\n this.create(this._data);\n }\n /**\n * Update current buffer data\n * @param data defines the data to store\n */\n update(data) {\n this.create(data);\n }\n /**\n * Updates the data directly.\n * @param data the new data\n * @param offset the new offset\n * @param vertexCount the vertex count (optional)\n * @param useBytes set to true if the offset is in bytes\n */\n updateDirectly(data, offset, vertexCount, useBytes = false) {\n if (!this._buffer) {\n return;\n }\n if (this._updatable) {\n // update buffer\n this._engine.updateDynamicVertexBuffer(this._buffer, data, useBytes ? offset : offset * Float32Array.BYTES_PER_ELEMENT, vertexCount ? vertexCount * this.byteStride : undefined);\n if (offset === 0 && vertexCount === undefined) {\n // Keep the data if we easily can\n this._data = data;\n }\n else {\n this._data = null;\n }\n }\n }\n /** @internal */\n _increaseReferences() {\n if (!this._buffer) {\n return;\n }\n if (!this._isAlreadyOwned) {\n this._isAlreadyOwned = true;\n return;\n }\n this._buffer.references++;\n }\n /**\n * Release all resources\n */\n dispose() {\n if (!this._buffer) {\n return;\n }\n // The data buffer has an internal counter as this buffer can be used by several VertexBuffer objects\n // This means that we only flag it as disposed when all references are released (when _releaseBuffer will return true)\n if (this._engine._releaseBuffer(this._buffer)) {\n this._isDisposed = true;\n this._data = null;\n this._buffer = null;\n }\n }\n}\n/**\n * Specialized buffer used to store vertex data\n */\nexport class VertexBuffer {\n /**\n * Gets a boolean indicating if the Buffer is disposed\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Gets or sets the instance divisor when in instanced mode\n */\n get instanceDivisor() {\n return this._instanceDivisor;\n }\n set instanceDivisor(value) {\n const isInstanced = value != 0;\n this._instanceDivisor = value;\n if (isInstanced !== this._instanced) {\n this._instanced = isInstanced;\n this._computeHashCode();\n }\n }\n /**\n * Gets the number of vertices in the buffer\n */\n get totalVertices() {\n const data = this.getData();\n if (!data) {\n return 0;\n }\n if (Array.isArray(data)) {\n // data is a regular number[] with float values\n return data.length / (this.byteStride / 4) - this.byteOffset / 4;\n }\n return (data.byteLength - this.byteOffset) / this.byteStride;\n }\n /** @internal */\n constructor(engine, data, kind, updatableOrOptions, postponeInternalCreation, stride, instanced, offset, size, type, normalized = false, useBytes = false, divisor = 1, takeBufferOwnership = false) {\n var _a, _b, _c, _d, _e;\n /** @internal */\n this._isDisposed = false;\n let updatable = false;\n this.engine = engine;\n if (typeof updatableOrOptions === \"object\" && updatableOrOptions !== null) {\n updatable = (_a = updatableOrOptions.updatable) !== null && _a !== void 0 ? _a : false;\n postponeInternalCreation = updatableOrOptions.postponeInternalCreation;\n stride = updatableOrOptions.stride;\n instanced = updatableOrOptions.instanced;\n offset = updatableOrOptions.offset;\n size = updatableOrOptions.size;\n type = updatableOrOptions.type;\n normalized = (_b = updatableOrOptions.normalized) !== null && _b !== void 0 ? _b : false;\n useBytes = (_c = updatableOrOptions.useBytes) !== null && _c !== void 0 ? _c : false;\n divisor = (_d = updatableOrOptions.divisor) !== null && _d !== void 0 ? _d : 1;\n takeBufferOwnership = (_e = updatableOrOptions.takeBufferOwnership) !== null && _e !== void 0 ? _e : false;\n this._label = updatableOrOptions.label;\n }\n else {\n updatable = !!updatableOrOptions;\n }\n if (data instanceof Buffer) {\n this._buffer = data;\n this._ownsBuffer = takeBufferOwnership;\n }\n else {\n this._buffer = new Buffer(engine, data, updatable, stride, postponeInternalCreation, instanced, useBytes, divisor, this._label);\n this._ownsBuffer = true;\n }\n this.uniqueId = VertexBuffer._Counter++;\n this._kind = kind;\n if (type === undefined) {\n const vertexData = this.getData();\n this.type = vertexData ? VertexBuffer.GetDataType(vertexData) : VertexBuffer.FLOAT;\n }\n else {\n this.type = type;\n }\n const typeByteLength = VertexBuffer.GetTypeByteLength(this.type);\n if (useBytes) {\n this._size = size || (stride ? stride / typeByteLength : VertexBuffer.DeduceStride(kind));\n this.byteStride = stride || this._buffer.byteStride || this._size * typeByteLength;\n this.byteOffset = offset || 0;\n }\n else {\n this._size = size || stride || VertexBuffer.DeduceStride(kind);\n this.byteStride = stride ? stride * typeByteLength : this._buffer.byteStride || this._size * typeByteLength;\n this.byteOffset = (offset || 0) * typeByteLength;\n }\n this.normalized = normalized;\n this._instanced = instanced !== undefined ? instanced : false;\n this._instanceDivisor = instanced ? divisor : 0;\n this._alignBuffer();\n this._computeHashCode();\n }\n _computeHashCode() {\n // note: cast to any because the property is declared readonly\n this.hashCode =\n ((this.type - 5120) << 0) +\n ((this.normalized ? 1 : 0) << 3) +\n (this._size << 4) +\n ((this._instanced ? 1 : 0) << 6) +\n /* keep 5 bits free */\n (this.byteStride << 12);\n }\n /** @internal */\n _rebuild() {\n var _a;\n (_a = this._buffer) === null || _a === void 0 ? void 0 : _a._rebuild();\n }\n /**\n * Returns the kind of the VertexBuffer (string)\n * @returns a string\n */\n getKind() {\n return this._kind;\n }\n // Properties\n /**\n * Gets a boolean indicating if the VertexBuffer is updatable?\n * @returns true if the buffer is updatable\n */\n isUpdatable() {\n return this._buffer.isUpdatable();\n }\n /**\n * Gets current buffer's data\n * @returns a DataArray or null\n */\n getData() {\n return this._buffer.getData();\n }\n /**\n * Gets current buffer's data as a float array. Float data is constructed if the vertex buffer data cannot be returned directly.\n * @param totalVertices number of vertices in the buffer to take into account\n * @param forceCopy defines a boolean indicating that the returned array must be cloned upon returning it\n * @returns a float array containing vertex data\n */\n getFloatData(totalVertices, forceCopy) {\n const data = this.getData();\n if (!data) {\n return null;\n }\n totalVertices = totalVertices !== null && totalVertices !== void 0 ? totalVertices : this.totalVertices;\n return VertexBuffer.GetFloatData(data, this._size, this.type, this.byteOffset, this.byteStride, this.normalized, totalVertices, forceCopy);\n }\n /**\n * Gets underlying native buffer\n * @returns underlying native buffer\n */\n getBuffer() {\n return this._buffer.getBuffer();\n }\n /**\n * Gets the stride in float32 units (i.e. byte stride / 4).\n * May not be an integer if the byte stride is not divisible by 4.\n * @returns the stride in float32 units\n * @deprecated Please use byteStride instead.\n */\n getStrideSize() {\n return this.byteStride / VertexBuffer.GetTypeByteLength(this.type);\n }\n /**\n * Returns the offset as a multiple of the type byte length.\n * @returns the offset in bytes\n * @deprecated Please use byteOffset instead.\n */\n getOffset() {\n return this.byteOffset / VertexBuffer.GetTypeByteLength(this.type);\n }\n /**\n * Returns the number of components or the byte size per vertex attribute\n * @param sizeInBytes If true, returns the size in bytes or else the size in number of components of the vertex attribute (default: false)\n * @returns the number of components\n */\n getSize(sizeInBytes = false) {\n return sizeInBytes ? this._size * VertexBuffer.GetTypeByteLength(this.type) : this._size;\n }\n /**\n * Gets a boolean indicating is the internal buffer of the VertexBuffer is instanced\n * @returns true if this buffer is instanced\n */\n getIsInstanced() {\n return this._instanced;\n }\n /**\n * Returns the instancing divisor, zero for non-instanced (integer).\n * @returns a number\n */\n getInstanceDivisor() {\n return this._instanceDivisor;\n }\n // Methods\n /**\n * Store data into the buffer. If the buffer was already used it will be either recreated or updated depending on isUpdatable property\n * @param data defines the data to store\n */\n create(data) {\n this._buffer.create(data);\n this._alignBuffer();\n }\n /**\n * Updates the underlying buffer according to the passed numeric array or Float32Array.\n * This function will create a new buffer if the current one is not updatable\n * @param data defines the data to store\n */\n update(data) {\n this._buffer.update(data);\n this._alignBuffer();\n }\n /**\n * Updates directly the underlying WebGLBuffer according to the passed numeric array or Float32Array.\n * Returns the directly updated WebGLBuffer.\n * @param data the new data\n * @param offset the new offset\n * @param useBytes set to true if the offset is in bytes\n */\n updateDirectly(data, offset, useBytes = false) {\n this._buffer.updateDirectly(data, offset, undefined, useBytes);\n this._alignBuffer();\n }\n /**\n * Disposes the VertexBuffer and the underlying WebGLBuffer.\n */\n dispose() {\n if (this._ownsBuffer) {\n this._buffer.dispose();\n }\n this._isDisposed = true;\n }\n /**\n * Enumerates each value of this vertex buffer as numbers.\n * @param count the number of values to enumerate\n * @param callback the callback function called for each value\n */\n forEach(count, callback) {\n VertexBuffer.ForEach(this._buffer.getData(), this.byteOffset, this.byteStride, this._size, this.type, count, this.normalized, callback);\n }\n /** @internal */\n _alignBuffer() { }\n /**\n * Deduces the stride given a kind.\n * @param kind The kind string to deduce\n * @returns The deduced stride\n */\n static DeduceStride(kind) {\n switch (kind) {\n case VertexBuffer.UVKind:\n case VertexBuffer.UV2Kind:\n case VertexBuffer.UV3Kind:\n case VertexBuffer.UV4Kind:\n case VertexBuffer.UV5Kind:\n case VertexBuffer.UV6Kind:\n return 2;\n case VertexBuffer.NormalKind:\n case VertexBuffer.PositionKind:\n return 3;\n case VertexBuffer.ColorKind:\n case VertexBuffer.ColorInstanceKind:\n case VertexBuffer.MatricesIndicesKind:\n case VertexBuffer.MatricesIndicesExtraKind:\n case VertexBuffer.MatricesWeightsKind:\n case VertexBuffer.MatricesWeightsExtraKind:\n case VertexBuffer.TangentKind:\n return 4;\n default:\n throw new Error(\"Invalid kind '\" + kind + \"'\");\n }\n }\n /**\n * Gets the vertex buffer type of the given data array.\n * @param data the data array\n * @returns the vertex buffer type\n */\n static GetDataType(data) {\n if (data instanceof Int8Array) {\n return VertexBuffer.BYTE;\n }\n else if (data instanceof Uint8Array) {\n return VertexBuffer.UNSIGNED_BYTE;\n }\n else if (data instanceof Int16Array) {\n return VertexBuffer.SHORT;\n }\n else if (data instanceof Uint16Array) {\n return VertexBuffer.UNSIGNED_SHORT;\n }\n else if (data instanceof Int32Array) {\n return VertexBuffer.INT;\n }\n else if (data instanceof Uint32Array) {\n return VertexBuffer.UNSIGNED_INT;\n }\n else {\n return VertexBuffer.FLOAT;\n }\n }\n /**\n * Gets the byte length of the given type.\n * @param type the type\n * @returns the number of bytes\n */\n static GetTypeByteLength(type) {\n switch (type) {\n case VertexBuffer.BYTE:\n case VertexBuffer.UNSIGNED_BYTE:\n return 1;\n case VertexBuffer.SHORT:\n case VertexBuffer.UNSIGNED_SHORT:\n return 2;\n case VertexBuffer.INT:\n case VertexBuffer.UNSIGNED_INT:\n case VertexBuffer.FLOAT:\n return 4;\n default:\n throw new Error(`Invalid type '${type}'`);\n }\n }\n /**\n * Enumerates each value of the given parameters as numbers.\n * @param data the data to enumerate\n * @param byteOffset the byte offset of the data\n * @param byteStride the byte stride of the data\n * @param componentCount the number of components per element\n * @param componentType the type of the component\n * @param count the number of values to enumerate\n * @param normalized whether the data is normalized\n * @param callback the callback function called for each value\n */\n static ForEach(data, byteOffset, byteStride, componentCount, componentType, count, normalized, callback) {\n if (data instanceof Array) {\n let offset = byteOffset / 4;\n const stride = byteStride / 4;\n for (let index = 0; index < count; index += componentCount) {\n for (let componentIndex = 0; componentIndex < componentCount; componentIndex++) {\n callback(data[offset + componentIndex], index + componentIndex);\n }\n offset += stride;\n }\n }\n else {\n const dataView = data instanceof ArrayBuffer ? new DataView(data) : new DataView(data.buffer, data.byteOffset, data.byteLength);\n const componentByteLength = VertexBuffer.GetTypeByteLength(componentType);\n for (let index = 0; index < count; index += componentCount) {\n let componentByteOffset = byteOffset;\n for (let componentIndex = 0; componentIndex < componentCount; componentIndex++) {\n const value = VertexBuffer._GetFloatValue(dataView, componentType, componentByteOffset, normalized);\n callback(value, index + componentIndex);\n componentByteOffset += componentByteLength;\n }\n byteOffset += byteStride;\n }\n }\n }\n static _GetFloatValue(dataView, type, byteOffset, normalized) {\n switch (type) {\n case VertexBuffer.BYTE: {\n let value = dataView.getInt8(byteOffset);\n if (normalized) {\n value = Math.max(value / 127, -1);\n }\n return value;\n }\n case VertexBuffer.UNSIGNED_BYTE: {\n let value = dataView.getUint8(byteOffset);\n if (normalized) {\n value = value / 255;\n }\n return value;\n }\n case VertexBuffer.SHORT: {\n let value = dataView.getInt16(byteOffset, true);\n if (normalized) {\n value = Math.max(value / 32767, -1);\n }\n return value;\n }\n case VertexBuffer.UNSIGNED_SHORT: {\n let value = dataView.getUint16(byteOffset, true);\n if (normalized) {\n value = value / 65535;\n }\n return value;\n }\n case VertexBuffer.INT: {\n return dataView.getInt32(byteOffset, true);\n }\n case VertexBuffer.UNSIGNED_INT: {\n return dataView.getUint32(byteOffset, true);\n }\n case VertexBuffer.FLOAT: {\n return dataView.getFloat32(byteOffset, true);\n }\n default: {\n throw new Error(`Invalid component type ${type}`);\n }\n }\n }\n /**\n * Gets the given data array as a float array. Float data is constructed if the data array cannot be returned directly.\n * @param data the input data array\n * @param size the number of components\n * @param type the component type\n * @param byteOffset the byte offset of the data\n * @param byteStride the byte stride of the data\n * @param normalized whether the data is normalized\n * @param totalVertices number of vertices in the buffer to take into account\n * @param forceCopy defines a boolean indicating that the returned array must be cloned upon returning it\n * @returns a float array containing vertex data\n */\n static GetFloatData(data, size, type, byteOffset, byteStride, normalized, totalVertices, forceCopy) {\n const tightlyPackedByteStride = size * VertexBuffer.GetTypeByteLength(type);\n const count = totalVertices * size;\n if (type !== VertexBuffer.FLOAT || byteStride !== tightlyPackedByteStride) {\n const copy = new Float32Array(count);\n VertexBuffer.ForEach(data, byteOffset, byteStride, size, type, count, normalized, (value, index) => (copy[index] = value));\n return copy;\n }\n if (!(data instanceof Array || data instanceof Float32Array) || byteOffset !== 0 || data.length !== count) {\n if (data instanceof Array) {\n const offset = byteOffset / 4;\n return data.slice(offset, offset + count);\n }\n else if (data instanceof ArrayBuffer) {\n return new Float32Array(data, byteOffset, count);\n }\n else {\n let offset = data.byteOffset + byteOffset;\n if (forceCopy) {\n const result = new Float32Array(count);\n const source = new Float32Array(data.buffer, offset, count);\n result.set(source);\n return result;\n }\n // Protect against bad data\n const remainder = offset % 4;\n if (remainder) {\n offset = Math.max(0, offset - remainder);\n }\n return new Float32Array(data.buffer, offset, count);\n }\n }\n if (forceCopy) {\n return data.slice();\n }\n return data;\n }\n}\nVertexBuffer._Counter = 0;\n/**\n * The byte type.\n */\nVertexBuffer.BYTE = 5120;\n/**\n * The unsigned byte type.\n */\nVertexBuffer.UNSIGNED_BYTE = 5121;\n/**\n * The short type.\n */\nVertexBuffer.SHORT = 5122;\n/**\n * The unsigned short type.\n */\nVertexBuffer.UNSIGNED_SHORT = 5123;\n/**\n * The integer type.\n */\nVertexBuffer.INT = 5124;\n/**\n * The unsigned integer type.\n */\nVertexBuffer.UNSIGNED_INT = 5125;\n/**\n * The float type.\n */\nVertexBuffer.FLOAT = 5126;\n// Enums\n/**\n * Positions\n */\nVertexBuffer.PositionKind = \"position\";\n/**\n * Normals\n */\nVertexBuffer.NormalKind = \"normal\";\n/**\n * Tangents\n */\nVertexBuffer.TangentKind = \"tangent\";\n/**\n * Texture coordinates\n */\nVertexBuffer.UVKind = \"uv\";\n/**\n * Texture coordinates 2\n */\nVertexBuffer.UV2Kind = \"uv2\";\n/**\n * Texture coordinates 3\n */\nVertexBuffer.UV3Kind = \"uv3\";\n/**\n * Texture coordinates 4\n */\nVertexBuffer.UV4Kind = \"uv4\";\n/**\n * Texture coordinates 5\n */\nVertexBuffer.UV5Kind = \"uv5\";\n/**\n * Texture coordinates 6\n */\nVertexBuffer.UV6Kind = \"uv6\";\n/**\n * Colors\n */\nVertexBuffer.ColorKind = \"color\";\n/**\n * Instance Colors\n */\nVertexBuffer.ColorInstanceKind = \"instanceColor\";\n/**\n * Matrix indices (for bones)\n */\nVertexBuffer.MatricesIndicesKind = \"matricesIndices\";\n/**\n * Matrix weights (for bones)\n */\nVertexBuffer.MatricesWeightsKind = \"matricesWeights\";\n/**\n * Additional matrix indices (for bones)\n */\nVertexBuffer.MatricesIndicesExtraKind = \"matricesIndicesExtra\";\n/**\n * Additional matrix weights (for bones)\n */\nVertexBuffer.MatricesWeightsExtraKind = \"matricesWeightsExtra\";\n//# sourceMappingURL=buffer.js.map","\n/******************************************************************************\nCopyright (c) Microsoft Corporation.\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n","/**\n * Class used to evaluate queries containing `and` and `or` operators\n */\nexport class AndOrNotEvaluator {\n /**\n * Evaluate a query\n * @param query defines the query to evaluate\n * @param evaluateCallback defines the callback used to filter result\n * @returns true if the query matches\n */\n static Eval(query, evaluateCallback) {\n if (!query.match(/\\([^()]*\\)/g)) {\n query = AndOrNotEvaluator._HandleParenthesisContent(query, evaluateCallback);\n }\n else {\n query = query.replace(/\\([^()]*\\)/g, (r) => {\n // remove parenthesis\n r = r.slice(1, r.length - 1);\n return AndOrNotEvaluator._HandleParenthesisContent(r, evaluateCallback);\n });\n }\n if (query === \"true\") {\n return true;\n }\n if (query === \"false\") {\n return false;\n }\n return AndOrNotEvaluator.Eval(query, evaluateCallback);\n }\n static _HandleParenthesisContent(parenthesisContent, evaluateCallback) {\n evaluateCallback =\n evaluateCallback ||\n ((r) => {\n return r === \"true\" ? true : false;\n });\n let result;\n const or = parenthesisContent.split(\"||\");\n for (const i in or) {\n if (Object.prototype.hasOwnProperty.call(or, i)) {\n let ori = AndOrNotEvaluator._SimplifyNegation(or[i].trim());\n const and = ori.split(\"&&\");\n if (and.length > 1) {\n for (let j = 0; j < and.length; ++j) {\n const andj = AndOrNotEvaluator._SimplifyNegation(and[j].trim());\n if (andj !== \"true\" && andj !== \"false\") {\n if (andj[0] === \"!\") {\n result = !evaluateCallback(andj.substring(1));\n }\n else {\n result = evaluateCallback(andj);\n }\n }\n else {\n result = andj === \"true\" ? true : false;\n }\n if (!result) {\n // no need to continue since 'false && ... && ...' will always return false\n ori = \"false\";\n break;\n }\n }\n }\n if (result || ori === \"true\") {\n // no need to continue since 'true || ... || ...' will always return true\n result = true;\n break;\n }\n // result equals false (or undefined)\n if (ori !== \"true\" && ori !== \"false\") {\n if (ori[0] === \"!\") {\n result = !evaluateCallback(ori.substring(1));\n }\n else {\n result = evaluateCallback(ori);\n }\n }\n else {\n result = ori === \"true\" ? true : false;\n }\n }\n }\n // the whole parenthesis scope is replaced by 'true' or 'false'\n return result ? \"true\" : \"false\";\n }\n static _SimplifyNegation(booleanString) {\n booleanString = booleanString.replace(/^[\\s!]+/, (r) => {\n // remove whitespaces\n r = r.replace(/[\\s]/g, () => \"\");\n return r.length % 2 ? \"!\" : \"\";\n });\n booleanString = booleanString.trim();\n if (booleanString === \"!true\") {\n booleanString = \"false\";\n }\n else if (booleanString === \"!false\") {\n booleanString = \"true\";\n }\n return booleanString;\n }\n}\n//# sourceMappingURL=andOrNotEvaluator.js.map","import { AndOrNotEvaluator } from \"./andOrNotEvaluator.js\";\n/**\n * Class used to store custom tags\n */\nexport class Tags {\n /**\n * Adds support for tags on the given object\n * @param obj defines the object to use\n */\n static EnableFor(obj) {\n obj._tags = obj._tags || {};\n obj.hasTags = () => {\n return Tags.HasTags(obj);\n };\n obj.addTags = (tagsString) => {\n return Tags.AddTagsTo(obj, tagsString);\n };\n obj.removeTags = (tagsString) => {\n return Tags.RemoveTagsFrom(obj, tagsString);\n };\n obj.matchesTagsQuery = (tagsQuery) => {\n return Tags.MatchesQuery(obj, tagsQuery);\n };\n }\n /**\n * Removes tags support\n * @param obj defines the object to use\n */\n static DisableFor(obj) {\n delete obj._tags;\n delete obj.hasTags;\n delete obj.addTags;\n delete obj.removeTags;\n delete obj.matchesTagsQuery;\n }\n /**\n * Gets a boolean indicating if the given object has tags\n * @param obj defines the object to use\n * @returns a boolean\n */\n static HasTags(obj) {\n if (!obj._tags) {\n return false;\n }\n const tags = obj._tags;\n for (const i in tags) {\n if (Object.prototype.hasOwnProperty.call(tags, i)) {\n return true;\n }\n }\n return false;\n }\n /**\n * Gets the tags available on a given object\n * @param obj defines the object to use\n * @param asString defines if the tags must be returned as a string instead of an array of strings\n * @returns the tags\n */\n static GetTags(obj, asString = true) {\n if (!obj._tags) {\n return null;\n }\n if (asString) {\n const tagsArray = [];\n for (const tag in obj._tags) {\n if (Object.prototype.hasOwnProperty.call(obj._tags, tag) && obj._tags[tag] === true) {\n tagsArray.push(tag);\n }\n }\n return tagsArray.join(\" \");\n }\n else {\n return obj._tags;\n }\n }\n /**\n * Adds tags to an object\n * @param obj defines the object to use\n * @param tagsString defines the tag string. The tags 'true' and 'false' are reserved and cannot be used as tags.\n * A tag cannot start with '||', '&&', and '!'. It cannot contain whitespaces\n */\n static AddTagsTo(obj, tagsString) {\n if (!tagsString) {\n return;\n }\n if (typeof tagsString !== \"string\") {\n return;\n }\n const tags = tagsString.split(\" \");\n tags.forEach(function (tag) {\n Tags._AddTagTo(obj, tag);\n });\n }\n /**\n * @internal\n */\n static _AddTagTo(obj, tag) {\n tag = tag.trim();\n if (tag === \"\" || tag === \"true\" || tag === \"false\") {\n return;\n }\n if (tag.match(/[\\s]/) || tag.match(/^([!]|([|]|[&]){2})/)) {\n return;\n }\n Tags.EnableFor(obj);\n obj._tags[tag] = true;\n }\n /**\n * Removes specific tags from a specific object\n * @param obj defines the object to use\n * @param tagsString defines the tags to remove\n */\n static RemoveTagsFrom(obj, tagsString) {\n if (!Tags.HasTags(obj)) {\n return;\n }\n const tags = tagsString.split(\" \");\n for (const t in tags) {\n Tags._RemoveTagFrom(obj, tags[t]);\n }\n }\n /**\n * @internal\n */\n static _RemoveTagFrom(obj, tag) {\n delete obj._tags[tag];\n }\n /**\n * Defines if tags hosted on an object match a given query\n * @param obj defines the object to use\n * @param tagsQuery defines the tag query\n * @returns a boolean\n */\n static MatchesQuery(obj, tagsQuery) {\n if (tagsQuery === undefined) {\n return true;\n }\n if (tagsQuery === \"\") {\n return Tags.HasTags(obj);\n }\n return AndOrNotEvaluator.Eval(tagsQuery, (r) => Tags.HasTags(obj) && obj._tags[r]);\n }\n}\n//# sourceMappingURL=tags.js.map","const warnedMap = {};\n/**\n * @internal\n */\nexport function _WarnImport(name, warnOnce = false) {\n if (warnOnce && warnedMap[name]) {\n return;\n }\n warnedMap[name] = true;\n return `${name} needs to be imported before as it contains a side-effect required by your code.`;\n}\n//# sourceMappingURL=devTools.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { Tags } from \"../Misc/tags.js\";\nimport { Quaternion, Vector2, Vector3, Matrix } from \"../Maths/math.vector.js\";\nimport { _WarnImport } from \"./devTools.js\";\nimport { Color4, Color3 } from \"../Maths/math.color.js\";\nconst __decoratorInitialStore = {};\nconst __mergedStore = {};\nconst _copySource = function (creationFunction, source, instanciate, options = {}) {\n const destination = creationFunction();\n // Tags\n if (Tags && Tags.HasTags(source)) {\n Tags.AddTagsTo(destination, Tags.GetTags(source, true));\n }\n const classStore = getMergedStore(destination);\n // Map from source texture uniqueId to destination texture\n const textureMap = {};\n // Properties\n for (const property in classStore) {\n const propertyDescriptor = classStore[property];\n const sourceProperty = source[property];\n const propertyType = propertyDescriptor.type;\n if (sourceProperty !== undefined && sourceProperty !== null && (property !== \"uniqueId\" || SerializationHelper.AllowLoadingUniqueId)) {\n switch (propertyType) {\n case 0: // Value\n case 6: // Mesh reference\n case 11: // Camera reference\n destination[property] = sourceProperty;\n break;\n case 1: // Texture\n if (options.cloneTexturesOnlyOnce && textureMap[sourceProperty.uniqueId]) {\n destination[property] = textureMap[sourceProperty.uniqueId];\n }\n else {\n destination[property] = instanciate || sourceProperty.isRenderTarget ? sourceProperty : sourceProperty.clone();\n textureMap[sourceProperty.uniqueId] = destination[property];\n }\n break;\n case 2: // Color3\n case 3: // FresnelParameters\n case 4: // Vector2\n case 5: // Vector3\n case 7: // Color Curves\n case 10: // Quaternion\n case 12: // Matrix\n destination[property] = instanciate ? sourceProperty : sourceProperty.clone();\n break;\n }\n }\n }\n return destination;\n};\nfunction getDirectStore(target) {\n const classKey = target.getClassName();\n if (!__decoratorInitialStore[classKey]) {\n __decoratorInitialStore[classKey] = {};\n }\n return __decoratorInitialStore[classKey];\n}\n/**\n * Return the list of properties flagged as serializable\n * @param target host object\n */\nfunction getMergedStore(target) {\n const classKey = target.getClassName();\n if (__mergedStore[classKey]) {\n return __mergedStore[classKey];\n }\n __mergedStore[classKey] = {};\n const store = __mergedStore[classKey];\n let currentTarget = target;\n let currentKey = classKey;\n while (currentKey) {\n const initialStore = __decoratorInitialStore[currentKey];\n for (const property in initialStore) {\n store[property] = initialStore[property];\n }\n let parent;\n let done = false;\n do {\n parent = Object.getPrototypeOf(currentTarget);\n if (!parent.getClassName) {\n done = true;\n break;\n }\n if (parent.getClassName() !== currentKey) {\n break;\n }\n currentTarget = parent;\n } while (parent);\n if (done) {\n break;\n }\n currentKey = parent.getClassName();\n currentTarget = parent;\n }\n return store;\n}\nfunction generateSerializableMember(type, sourceName) {\n return (target, propertyKey) => {\n const classStore = getDirectStore(target);\n if (!classStore[propertyKey]) {\n classStore[propertyKey] = { type: type, sourceName: sourceName };\n }\n };\n}\nfunction generateExpandMember(setCallback, targetKey = null) {\n return (target, propertyKey) => {\n const key = targetKey || \"_\" + propertyKey;\n Object.defineProperty(target, propertyKey, {\n get: function () {\n return this[key];\n },\n set: function (value) {\n // does this object (i.e. vector3) has an equals function? use it!\n // Note - not using \"with epsilon\" here, it is expected te behave like the internal cache does.\n if (typeof this.equals === \"function\") {\n if (this.equals(value)) {\n return;\n }\n }\n if (this[key] === value) {\n return;\n }\n this[key] = value;\n target[setCallback].apply(this);\n },\n enumerable: true,\n configurable: true,\n });\n };\n}\nexport function expandToProperty(callback, targetKey = null) {\n return generateExpandMember(callback, targetKey);\n}\nexport function serialize(sourceName) {\n return generateSerializableMember(0, sourceName); // value member\n}\nexport function serializeAsTexture(sourceName) {\n return generateSerializableMember(1, sourceName); // texture member\n}\nexport function serializeAsColor3(sourceName) {\n return generateSerializableMember(2, sourceName); // color3 member\n}\nexport function serializeAsFresnelParameters(sourceName) {\n return generateSerializableMember(3, sourceName); // fresnel parameters member\n}\nexport function serializeAsVector2(sourceName) {\n return generateSerializableMember(4, sourceName); // vector2 member\n}\nexport function serializeAsVector3(sourceName) {\n return generateSerializableMember(5, sourceName); // vector3 member\n}\nexport function serializeAsMeshReference(sourceName) {\n return generateSerializableMember(6, sourceName); // mesh reference member\n}\nexport function serializeAsColorCurves(sourceName) {\n return generateSerializableMember(7, sourceName); // color curves\n}\nexport function serializeAsColor4(sourceName) {\n return generateSerializableMember(8, sourceName); // color 4\n}\nexport function serializeAsImageProcessingConfiguration(sourceName) {\n return generateSerializableMember(9, sourceName); // image processing\n}\nexport function serializeAsQuaternion(sourceName) {\n return generateSerializableMember(10, sourceName); // quaternion member\n}\nexport function serializeAsMatrix(sourceName) {\n return generateSerializableMember(12, sourceName); // matrix member\n}\n/**\n * Decorator used to define property that can be serialized as reference to a camera\n * @param sourceName defines the name of the property to decorate\n */\nexport function serializeAsCameraReference(sourceName) {\n return generateSerializableMember(11, sourceName); // camera reference member\n}\n/**\n * Class used to help serialization objects\n */\nexport class SerializationHelper {\n /**\n * Appends the serialized animations from the source animations\n * @param source Source containing the animations\n * @param destination Target to store the animations\n */\n static AppendSerializedAnimations(source, destination) {\n if (source.animations) {\n destination.animations = [];\n for (let animationIndex = 0; animationIndex < source.animations.length; animationIndex++) {\n const animation = source.animations[animationIndex];\n destination.animations.push(animation.serialize());\n }\n }\n }\n /**\n * Static function used to serialized a specific entity\n * @param entity defines the entity to serialize\n * @param serializationObject defines the optional target object where serialization data will be stored\n * @returns a JSON compatible object representing the serialization of the entity\n */\n static Serialize(entity, serializationObject) {\n if (!serializationObject) {\n serializationObject = {};\n }\n // Tags\n if (Tags) {\n serializationObject.tags = Tags.GetTags(entity);\n }\n const serializedProperties = getMergedStore(entity);\n // Properties\n for (const property in serializedProperties) {\n const propertyDescriptor = serializedProperties[property];\n const targetPropertyName = propertyDescriptor.sourceName || property;\n const propertyType = propertyDescriptor.type;\n const sourceProperty = entity[property];\n if (sourceProperty !== undefined && sourceProperty !== null && (property !== \"uniqueId\" || SerializationHelper.AllowLoadingUniqueId)) {\n switch (propertyType) {\n case 0: // Value\n serializationObject[targetPropertyName] = sourceProperty;\n break;\n case 1: // Texture\n serializationObject[targetPropertyName] = sourceProperty.serialize();\n break;\n case 2: // Color3\n serializationObject[targetPropertyName] = sourceProperty.asArray();\n break;\n case 3: // FresnelParameters\n serializationObject[targetPropertyName] = sourceProperty.serialize();\n break;\n case 4: // Vector2\n serializationObject[targetPropertyName] = sourceProperty.asArray();\n break;\n case 5: // Vector3\n serializationObject[targetPropertyName] = sourceProperty.asArray();\n break;\n case 6: // Mesh reference\n serializationObject[targetPropertyName] = sourceProperty.id;\n break;\n case 7: // Color Curves\n serializationObject[targetPropertyName] = sourceProperty.serialize();\n break;\n case 8: // Color 4\n serializationObject[targetPropertyName] = sourceProperty.asArray();\n break;\n case 9: // Image Processing\n serializationObject[targetPropertyName] = sourceProperty.serialize();\n break;\n case 10: // Quaternion\n serializationObject[targetPropertyName] = sourceProperty.asArray();\n break;\n case 11: // Camera reference\n serializationObject[targetPropertyName] = sourceProperty.id;\n break;\n case 12: // Matrix\n serializationObject[targetPropertyName] = sourceProperty.asArray();\n break;\n }\n }\n }\n return serializationObject;\n }\n /**\n * Given a source json and a destination object in a scene, this function will parse the source and will try to apply its content to the destination object\n * @param source the source json data\n * @param destination the destination object\n * @param scene the scene where the object is\n * @param rootUrl root url to use to load assets\n */\n static ParseProperties(source, destination, scene, rootUrl) {\n if (!rootUrl) {\n rootUrl = \"\";\n }\n const classStore = getMergedStore(destination);\n // Properties\n for (const property in classStore) {\n const propertyDescriptor = classStore[property];\n const sourceProperty = source[propertyDescriptor.sourceName || property];\n const propertyType = propertyDescriptor.type;\n if (sourceProperty !== undefined && sourceProperty !== null && (property !== \"uniqueId\" || SerializationHelper.AllowLoadingUniqueId)) {\n const dest = destination;\n switch (propertyType) {\n case 0: // Value\n dest[property] = sourceProperty;\n break;\n case 1: // Texture\n if (scene) {\n dest[property] = SerializationHelper._TextureParser(sourceProperty, scene, rootUrl);\n }\n break;\n case 2: // Color3\n dest[property] = Color3.FromArray(sourceProperty);\n break;\n case 3: // FresnelParameters\n dest[property] = SerializationHelper._FresnelParametersParser(sourceProperty);\n break;\n case 4: // Vector2\n dest[property] = Vector2.FromArray(sourceProperty);\n break;\n case 5: // Vector3\n dest[property] = Vector3.FromArray(sourceProperty);\n break;\n case 6: // Mesh reference\n if (scene) {\n dest[property] = scene.getLastMeshById(sourceProperty);\n }\n break;\n case 7: // Color Curves\n dest[property] = SerializationHelper._ColorCurvesParser(sourceProperty);\n break;\n case 8: // Color 4\n dest[property] = Color4.FromArray(sourceProperty);\n break;\n case 9: // Image Processing\n dest[property] = SerializationHelper._ImageProcessingConfigurationParser(sourceProperty);\n break;\n case 10: // Quaternion\n dest[property] = Quaternion.FromArray(sourceProperty);\n break;\n case 11: // Camera reference\n if (scene) {\n dest[property] = scene.getCameraById(sourceProperty);\n }\n break;\n case 12: // Matrix\n dest[property] = Matrix.FromArray(sourceProperty);\n break;\n }\n }\n }\n }\n /**\n * Creates a new entity from a serialization data object\n * @param creationFunction defines a function used to instanciated the new entity\n * @param source defines the source serialization data\n * @param scene defines the hosting scene\n * @param rootUrl defines the root url for resources\n * @returns a new entity\n */\n static Parse(creationFunction, source, scene, rootUrl = null) {\n const destination = creationFunction();\n // Tags\n if (Tags) {\n Tags.AddTagsTo(destination, source.tags);\n }\n SerializationHelper.ParseProperties(source, destination, scene, rootUrl);\n return destination;\n }\n /**\n * Clones an object\n * @param creationFunction defines the function used to instanciate the new object\n * @param source defines the source object\n * @returns the cloned object\n */\n static Clone(creationFunction, source, options = {}) {\n return _copySource(creationFunction, source, false, options);\n }\n /**\n * Instanciates a new object based on a source one (some data will be shared between both object)\n * @param creationFunction defines the function used to instanciate the new object\n * @param source defines the source object\n * @returns the new object\n */\n static Instanciate(creationFunction, source) {\n return _copySource(creationFunction, source, true);\n }\n}\n/**\n * Gets or sets a boolean to indicate if the UniqueId property should be serialized\n */\nSerializationHelper.AllowLoadingUniqueId = false;\n/**\n * @internal\n */\nSerializationHelper._ImageProcessingConfigurationParser = (sourceProperty) => {\n throw _WarnImport(\"ImageProcessingConfiguration\");\n};\n/**\n * @internal\n */\nSerializationHelper._FresnelParametersParser = (sourceProperty) => {\n throw _WarnImport(\"FresnelParameters\");\n};\n/**\n * @internal\n */\nSerializationHelper._ColorCurvesParser = (sourceProperty) => {\n throw _WarnImport(\"ColorCurves\");\n};\n/**\n * @internal\n */\nSerializationHelper._TextureParser = (sourceProperty, scene, rootUrl) => {\n throw _WarnImport(\"Texture\");\n};\n/**\n * Decorator used to redirect a function to a native implementation if available.\n * @internal\n */\nexport function nativeOverride(target, propertyKey, descriptor, predicate) {\n // Cache the original JS function for later.\n const jsFunc = descriptor.value;\n // Override the JS function to check for a native override on first invocation. Setting descriptor.value overrides the function at the early stage of code being loaded/imported.\n descriptor.value = (...params) => {\n // Assume the resolved function will be the original JS function, then we will check for the Babylon Native context.\n let func = jsFunc;\n // Check if we are executing in a Babylon Native context (e.g. check the presence of the _native global property) and if so also check if a function override is available.\n if (typeof _native !== \"undefined\" && _native[propertyKey]) {\n const nativeFunc = _native[propertyKey];\n // If a predicate was provided, then we'll need to invoke the predicate on each invocation of the underlying function to determine whether to call the native function or the JS function.\n if (predicate) {\n // The resolved function will execute the predicate and then either execute the native function or the JS function.\n func = (...params) => (predicate(...params) ? nativeFunc(...params) : jsFunc(...params));\n }\n else {\n // The resolved function will directly execute the native function.\n func = nativeFunc;\n }\n }\n // Override the JS function again with the final resolved target function.\n target[propertyKey] = func;\n // The JS function has now been overridden based on whether we're executing in the context of Babylon Native, but we still need to invoke that function.\n // Future invocations of the function will just directly invoke the final overridden function, not any of the decorator setup logic above.\n return func(...params);\n };\n}\n/**\n * Decorator factory that applies the nativeOverride decorator, but determines whether to redirect to the native implementation based on a filter function that evaluates the function arguments.\n * @param predicate\n * @example @nativeOverride.filter((...[arg1]: Parameters) => arg1.length > 20)\n * public someMethod(arg1: string, arg2: number): string {\n * @internal\n */\nnativeOverride.filter = function (predicate) {\n return (target, propertyKey, descriptor) => nativeOverride(target, propertyKey, descriptor, predicate);\n};\n//# sourceMappingURL=decorators.js.map","import { __decorate } from \"./tslib.es6.js\";\nimport { Matrix, Vector3 } from \"./Maths/math.vector.js\";\nimport { SerializationHelper, serialize } from \"./Misc/decorators.js\";\nimport { Observable } from \"./Misc/observable.js\";\nimport { EngineStore } from \"./Engines/engineStore.js\";\nimport { _WarnImport } from \"./Misc/devTools.js\";\n/** @internal */\nclass _InternalNodeDataInfo {\n constructor() {\n this._doNotSerialize = false;\n this._isDisposed = false;\n this._sceneRootNodesIndex = -1;\n this._isEnabled = true;\n this._isParentEnabled = true;\n this._isReady = true;\n this._onEnabledStateChangedObservable = new Observable();\n this._onClonedObservable = new Observable();\n }\n}\n/**\n * Node is the basic class for all scene objects (Mesh, Light, Camera.)\n */\nexport class Node {\n /**\n * Add a new node constructor\n * @param type defines the type name of the node to construct\n * @param constructorFunc defines the constructor function\n */\n static AddNodeConstructor(type, constructorFunc) {\n this._NodeConstructors[type] = constructorFunc;\n }\n /**\n * Returns a node constructor based on type name\n * @param type defines the type name\n * @param name defines the new node name\n * @param scene defines the hosting scene\n * @param options defines optional options to transmit to constructors\n * @returns the new constructor or null\n */\n static Construct(type, name, scene, options) {\n const constructorFunc = this._NodeConstructors[type];\n if (!constructorFunc) {\n return null;\n }\n return constructorFunc(name, scene, options);\n }\n /**\n * Gets or sets the accessibility tag to describe the node for accessibility purpose.\n */\n set accessibilityTag(value) {\n this._accessibilityTag = value;\n this.onAccessibilityTagChangedObservable.notifyObservers(value);\n }\n get accessibilityTag() {\n return this._accessibilityTag;\n }\n /**\n * Gets or sets a boolean used to define if the node must be serialized\n */\n get doNotSerialize() {\n if (this._nodeDataStorage._doNotSerialize) {\n return true;\n }\n if (this._parentNode) {\n return this._parentNode.doNotSerialize;\n }\n return false;\n }\n set doNotSerialize(value) {\n this._nodeDataStorage._doNotSerialize = value;\n }\n /**\n * Gets a boolean indicating if the node has been disposed\n * @returns true if the node was disposed\n */\n isDisposed() {\n return this._nodeDataStorage._isDisposed;\n }\n /**\n * Gets or sets the parent of the node (without keeping the current position in the scene)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/parent\n */\n set parent(parent) {\n if (this._parentNode === parent) {\n return;\n }\n const previousParentNode = this._parentNode;\n // Remove self from list of children of parent\n if (this._parentNode && this._parentNode._children !== undefined && this._parentNode._children !== null) {\n const index = this._parentNode._children.indexOf(this);\n if (index !== -1) {\n this._parentNode._children.splice(index, 1);\n }\n if (!parent && !this._nodeDataStorage._isDisposed) {\n this._addToSceneRootNodes();\n }\n }\n // Store new parent\n this._parentNode = parent;\n // Add as child to new parent\n if (this._parentNode) {\n if (this._parentNode._children === undefined || this._parentNode._children === null) {\n this._parentNode._children = new Array();\n }\n this._parentNode._children.push(this);\n if (!previousParentNode) {\n this._removeFromSceneRootNodes();\n }\n }\n // Enabled state\n this._syncParentEnabledState();\n }\n get parent() {\n return this._parentNode;\n }\n /**\n * @internal\n */\n _serializeAsParent(serializationObject) {\n serializationObject.parentId = this.uniqueId;\n }\n /** @internal */\n _addToSceneRootNodes() {\n if (this._nodeDataStorage._sceneRootNodesIndex === -1) {\n this._nodeDataStorage._sceneRootNodesIndex = this._scene.rootNodes.length;\n this._scene.rootNodes.push(this);\n }\n }\n /** @internal */\n _removeFromSceneRootNodes() {\n if (this._nodeDataStorage._sceneRootNodesIndex !== -1) {\n const rootNodes = this._scene.rootNodes;\n const lastIdx = rootNodes.length - 1;\n rootNodes[this._nodeDataStorage._sceneRootNodesIndex] = rootNodes[lastIdx];\n rootNodes[this._nodeDataStorage._sceneRootNodesIndex]._nodeDataStorage._sceneRootNodesIndex = this._nodeDataStorage._sceneRootNodesIndex;\n this._scene.rootNodes.pop();\n this._nodeDataStorage._sceneRootNodesIndex = -1;\n }\n }\n /**\n * Gets or sets the animation properties override\n */\n get animationPropertiesOverride() {\n if (!this._animationPropertiesOverride) {\n return this._scene.animationPropertiesOverride;\n }\n return this._animationPropertiesOverride;\n }\n set animationPropertiesOverride(value) {\n this._animationPropertiesOverride = value;\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"Node\" string\n */\n getClassName() {\n return \"Node\";\n }\n /**\n * Sets a callback that will be raised when the node will be disposed\n */\n set onDispose(callback) {\n if (this._onDisposeObserver) {\n this.onDisposeObservable.remove(this._onDisposeObserver);\n }\n this._onDisposeObserver = this.onDisposeObservable.add(callback);\n }\n /**\n * An event triggered when the enabled state of the node changes\n */\n get onEnabledStateChangedObservable() {\n return this._nodeDataStorage._onEnabledStateChangedObservable;\n }\n /**\n * An event triggered when the node is cloned\n */\n get onClonedObservable() {\n return this._nodeDataStorage._onClonedObservable;\n }\n /**\n * Creates a new Node\n * @param name the name and id to be given to this node\n * @param scene the scene this node will be added to\n */\n constructor(name, scene = null) {\n this._isDirty = false;\n this._nodeDataStorage = new _InternalNodeDataInfo();\n /**\n * Gets or sets a string used to store user defined state for the node\n */\n this.state = \"\";\n /**\n * Gets or sets an object used to store user defined information for the node\n */\n this.metadata = null;\n /**\n * For internal use only. Please do not use.\n */\n this.reservedDataStore = null;\n this._accessibilityTag = null;\n this.onAccessibilityTagChangedObservable = new Observable();\n /** @internal */\n this._parentContainer = null;\n /**\n * Gets a list of Animations associated with the node\n */\n this.animations = [];\n this._ranges = {};\n /**\n * Callback raised when the node is ready to be used\n */\n this.onReady = null;\n /** @internal */\n this._currentRenderId = -1;\n this._parentUpdateId = -1;\n /** @internal */\n this._childUpdateId = -1;\n /** @internal */\n this._waitingParentId = null;\n /** @internal */\n this._waitingParentInstanceIndex = null;\n /** @internal */\n this._waitingParsedUniqueId = null;\n /** @internal */\n this._cache = {};\n this._parentNode = null;\n /** @internal */\n this._children = null;\n /** @internal */\n this._worldMatrix = Matrix.Identity();\n /** @internal */\n this._worldMatrixDeterminant = 0;\n /** @internal */\n this._worldMatrixDeterminantIsDirty = true;\n this._animationPropertiesOverride = null;\n /** @internal */\n this._isNode = true;\n /**\n * An event triggered when the mesh is disposed\n */\n this.onDisposeObservable = new Observable();\n this._onDisposeObserver = null;\n // Behaviors\n this._behaviors = new Array();\n this.name = name;\n this.id = name;\n this._scene = (scene || EngineStore.LastCreatedScene);\n this.uniqueId = this._scene.getUniqueId();\n this._initCache();\n }\n /**\n * Gets the scene of the node\n * @returns a scene\n */\n getScene() {\n return this._scene;\n }\n /**\n * Gets the engine of the node\n * @returns a Engine\n */\n getEngine() {\n return this._scene.getEngine();\n }\n /**\n * Attach a behavior to the node\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\n * @param behavior defines the behavior to attach\n * @param attachImmediately defines that the behavior must be attached even if the scene is still loading\n * @returns the current Node\n */\n addBehavior(behavior, attachImmediately = false) {\n const index = this._behaviors.indexOf(behavior);\n if (index !== -1) {\n return this;\n }\n behavior.init();\n if (this._scene.isLoading && !attachImmediately) {\n // We defer the attach when the scene will be loaded\n this._scene.onDataLoadedObservable.addOnce(() => {\n behavior.attach(this);\n });\n }\n else {\n behavior.attach(this);\n }\n this._behaviors.push(behavior);\n return this;\n }\n /**\n * Remove an attached behavior\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\n * @param behavior defines the behavior to attach\n * @returns the current Node\n */\n removeBehavior(behavior) {\n const index = this._behaviors.indexOf(behavior);\n if (index === -1) {\n return this;\n }\n this._behaviors[index].detach();\n this._behaviors.splice(index, 1);\n return this;\n }\n /**\n * Gets the list of attached behaviors\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\n */\n get behaviors() {\n return this._behaviors;\n }\n /**\n * Gets an attached behavior by name\n * @param name defines the name of the behavior to look for\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\n * @returns null if behavior was not found else the requested behavior\n */\n getBehaviorByName(name) {\n for (const behavior of this._behaviors) {\n if (behavior.name === name) {\n return behavior;\n }\n }\n return null;\n }\n /**\n * Returns the latest update of the World matrix\n * @returns a Matrix\n */\n getWorldMatrix() {\n if (this._currentRenderId !== this._scene.getRenderId()) {\n this.computeWorldMatrix();\n }\n return this._worldMatrix;\n }\n /** @internal */\n _getWorldMatrixDeterminant() {\n if (this._worldMatrixDeterminantIsDirty) {\n this._worldMatrixDeterminantIsDirty = false;\n this._worldMatrixDeterminant = this._worldMatrix.determinant();\n }\n return this._worldMatrixDeterminant;\n }\n /**\n * Returns directly the latest state of the mesh World matrix.\n * A Matrix is returned.\n */\n get worldMatrixFromCache() {\n return this._worldMatrix;\n }\n // override it in derived class if you add new variables to the cache\n // and call the parent class method\n /** @internal */\n _initCache() {\n this._cache = {};\n this._cache.parent = undefined;\n }\n /**\n * @internal\n */\n updateCache(force) {\n if (!force && this.isSynchronized()) {\n return;\n }\n this._cache.parent = this.parent;\n this._updateCache();\n }\n /**\n * @internal\n */\n _getActionManagerForTrigger(trigger, _initialCall = true) {\n if (!this.parent) {\n return null;\n }\n return this.parent._getActionManagerForTrigger(trigger, false);\n }\n // override it in derived class if you add new variables to the cache\n // and call the parent class method if !ignoreParentClass\n /**\n * @internal\n */\n _updateCache(_ignoreParentClass) { }\n // override it in derived class if you add new variables to the cache\n /** @internal */\n _isSynchronized() {\n return true;\n }\n /** @internal */\n _markSyncedWithParent() {\n if (this._parentNode) {\n this._parentUpdateId = this._parentNode._childUpdateId;\n }\n }\n /** @internal */\n isSynchronizedWithParent() {\n if (!this._parentNode) {\n return true;\n }\n if (this._parentNode._isDirty || this._parentUpdateId !== this._parentNode._childUpdateId) {\n return false;\n }\n return this._parentNode.isSynchronized();\n }\n /** @internal */\n isSynchronized() {\n if (this._cache.parent !== this._parentNode) {\n this._cache.parent = this._parentNode;\n return false;\n }\n if (this._parentNode && !this.isSynchronizedWithParent()) {\n return false;\n }\n return this._isSynchronized();\n }\n /**\n * Is this node ready to be used/rendered\n * @param _completeCheck defines if a complete check (including materials and lights) has to be done (false by default)\n * @returns true if the node is ready\n */\n isReady(_completeCheck = false) {\n return this._nodeDataStorage._isReady;\n }\n /**\n * Flag the node as dirty (Forcing it to update everything)\n * @param _property helps children apply precise \"dirtyfication\"\n * @returns this node\n */\n markAsDirty(_property) {\n this._currentRenderId = Number.MAX_VALUE;\n this._isDirty = true;\n return this;\n }\n /**\n * Is this node enabled?\n * If the node has a parent, all ancestors will be checked and false will be returned if any are false (not enabled), otherwise will return true\n * @param checkAncestors indicates if this method should check the ancestors. The default is to check the ancestors. If set to false, the method will return the value of this node without checking ancestors\n * @returns whether this node (and its parent) is enabled\n */\n isEnabled(checkAncestors = true) {\n if (checkAncestors === false) {\n return this._nodeDataStorage._isEnabled;\n }\n if (!this._nodeDataStorage._isEnabled) {\n return false;\n }\n return this._nodeDataStorage._isParentEnabled;\n }\n /** @internal */\n _syncParentEnabledState() {\n this._nodeDataStorage._isParentEnabled = this._parentNode ? this._parentNode.isEnabled() : true;\n if (this._children) {\n this._children.forEach((c) => {\n c._syncParentEnabledState(); // Force children to update accordingly\n });\n }\n }\n /**\n * Set the enabled state of this node\n * @param value defines the new enabled state\n */\n setEnabled(value) {\n if (this._nodeDataStorage._isEnabled === value) {\n return;\n }\n this._nodeDataStorage._isEnabled = value;\n this._syncParentEnabledState();\n this._nodeDataStorage._onEnabledStateChangedObservable.notifyObservers(value);\n }\n /**\n * Is this node a descendant of the given node?\n * The function will iterate up the hierarchy until the ancestor was found or no more parents defined\n * @param ancestor defines the parent node to inspect\n * @returns a boolean indicating if this node is a descendant of the given node\n */\n isDescendantOf(ancestor) {\n if (this.parent) {\n if (this.parent === ancestor) {\n return true;\n }\n return this.parent.isDescendantOf(ancestor);\n }\n return false;\n }\n /**\n * @internal\n */\n _getDescendants(results, directDescendantsOnly = false, predicate) {\n if (!this._children) {\n return;\n }\n for (let index = 0; index < this._children.length; index++) {\n const item = this._children[index];\n if (!predicate || predicate(item)) {\n results.push(item);\n }\n if (!directDescendantsOnly) {\n item._getDescendants(results, false, predicate);\n }\n }\n }\n /**\n * Will return all nodes that have this node as ascendant\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\n * @returns all children nodes of all types\n */\n getDescendants(directDescendantsOnly, predicate) {\n const results = [];\n this._getDescendants(results, directDescendantsOnly, predicate);\n return results;\n }\n /**\n * Get all child-meshes of this node\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\n * @returns an array of AbstractMesh\n */\n getChildMeshes(directDescendantsOnly, predicate) {\n const results = [];\n this._getDescendants(results, directDescendantsOnly, (node) => {\n return (!predicate || predicate(node)) && node.cullingStrategy !== undefined;\n });\n return results;\n }\n /**\n * Get all direct children of this node\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\n * @returns an array of Node\n */\n getChildren(predicate, directDescendantsOnly = true) {\n return this.getDescendants(directDescendantsOnly, predicate);\n }\n /**\n * @internal\n */\n _setReady(state) {\n if (state === this._nodeDataStorage._isReady) {\n return;\n }\n if (!state) {\n this._nodeDataStorage._isReady = false;\n return;\n }\n if (this.onReady) {\n this.onReady(this);\n }\n this._nodeDataStorage._isReady = true;\n }\n /**\n * Get an animation by name\n * @param name defines the name of the animation to look for\n * @returns null if not found else the requested animation\n */\n getAnimationByName(name) {\n for (let i = 0; i < this.animations.length; i++) {\n const animation = this.animations[i];\n if (animation.name === name) {\n return animation;\n }\n }\n return null;\n }\n /**\n * Creates an animation range for this node\n * @param name defines the name of the range\n * @param from defines the starting key\n * @param to defines the end key\n */\n createAnimationRange(name, from, to) {\n // check name not already in use\n if (!this._ranges[name]) {\n this._ranges[name] = Node._AnimationRangeFactory(name, from, to);\n for (let i = 0, nAnimations = this.animations.length; i < nAnimations; i++) {\n if (this.animations[i]) {\n this.animations[i].createRange(name, from, to);\n }\n }\n }\n }\n /**\n * Delete a specific animation range\n * @param name defines the name of the range to delete\n * @param deleteFrames defines if animation frames from the range must be deleted as well\n */\n deleteAnimationRange(name, deleteFrames = true) {\n for (let i = 0, nAnimations = this.animations.length; i < nAnimations; i++) {\n if (this.animations[i]) {\n this.animations[i].deleteRange(name, deleteFrames);\n }\n }\n this._ranges[name] = null; // said much faster than 'delete this._range[name]'\n }\n /**\n * Get an animation range by name\n * @param name defines the name of the animation range to look for\n * @returns null if not found else the requested animation range\n */\n getAnimationRange(name) {\n return this._ranges[name] || null;\n }\n /**\n * Clone the current node\n * @param name Name of the new clone\n * @param newParent New parent for the clone\n * @param doNotCloneChildren Do not clone children hierarchy\n * @returns the new transform node\n */\n clone(name, newParent, doNotCloneChildren) {\n const result = SerializationHelper.Clone(() => new Node(name, this.getScene()), this);\n if (newParent) {\n result.parent = newParent;\n }\n if (!doNotCloneChildren) {\n // Children\n const directDescendants = this.getDescendants(true);\n for (let index = 0; index < directDescendants.length; index++) {\n const child = directDescendants[index];\n child.clone(name + \".\" + child.name, result);\n }\n }\n return result;\n }\n /**\n * Gets the list of all animation ranges defined on this node\n * @returns an array\n */\n getAnimationRanges() {\n const animationRanges = [];\n let name;\n for (name in this._ranges) {\n animationRanges.push(this._ranges[name]);\n }\n return animationRanges;\n }\n /**\n * Will start the animation sequence\n * @param name defines the range frames for animation sequence\n * @param loop defines if the animation should loop (false by default)\n * @param speedRatio defines the speed factor in which to run the animation (1 by default)\n * @param onAnimationEnd defines a function to be executed when the animation ended (undefined by default)\n * @returns the object created for this animation. If range does not exist, it will return null\n */\n beginAnimation(name, loop, speedRatio, onAnimationEnd) {\n const range = this.getAnimationRange(name);\n if (!range) {\n return null;\n }\n return this._scene.beginAnimation(this, range.from, range.to, loop, speedRatio, onAnimationEnd);\n }\n /**\n * Serialize animation ranges into a JSON compatible object\n * @returns serialization object\n */\n serializeAnimationRanges() {\n const serializationRanges = [];\n for (const name in this._ranges) {\n const localRange = this._ranges[name];\n if (!localRange) {\n continue;\n }\n const range = {};\n range.name = name;\n range.from = localRange.from;\n range.to = localRange.to;\n serializationRanges.push(range);\n }\n return serializationRanges;\n }\n /**\n * Computes the world matrix of the node\n * @param _force defines if the cache version should be invalidated forcing the world matrix to be created from scratch\n * @returns the world matrix\n */\n computeWorldMatrix(_force) {\n if (!this._worldMatrix) {\n this._worldMatrix = Matrix.Identity();\n }\n return this._worldMatrix;\n }\n /**\n * Releases resources associated with this node.\n * @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)\n * @param disposeMaterialAndTextures Set to true to also dispose referenced materials and textures (false by default)\n */\n dispose(doNotRecurse, disposeMaterialAndTextures = false) {\n this._nodeDataStorage._isDisposed = true;\n if (!doNotRecurse) {\n const nodes = this.getDescendants(true);\n for (const node of nodes) {\n node.dispose(doNotRecurse, disposeMaterialAndTextures);\n }\n }\n if (!this.parent) {\n this._removeFromSceneRootNodes();\n }\n else {\n this.parent = null;\n }\n // Callback\n this.onDisposeObservable.notifyObservers(this);\n this.onDisposeObservable.clear();\n this.onEnabledStateChangedObservable.clear();\n this.onClonedObservable.clear();\n // Behaviors\n for (const behavior of this._behaviors) {\n behavior.detach();\n }\n this._behaviors.length = 0;\n this.metadata = null;\n }\n /**\n * Parse animation range data from a serialization object and store them into a given node\n * @param node defines where to store the animation ranges\n * @param parsedNode defines the serialization object to read data from\n * @param _scene defines the hosting scene\n */\n static ParseAnimationRanges(node, parsedNode, _scene) {\n if (parsedNode.ranges) {\n for (let index = 0; index < parsedNode.ranges.length; index++) {\n const data = parsedNode.ranges[index];\n node.createAnimationRange(data.name, data.from, data.to);\n }\n }\n }\n /**\n * Return the minimum and maximum world vectors of the entire hierarchy under current node\n * @param includeDescendants Include bounding info from descendants as well (true by default)\n * @param predicate defines a callback function that can be customize to filter what meshes should be included in the list used to compute the bounding vectors\n * @returns the new bounding vectors\n */\n getHierarchyBoundingVectors(includeDescendants = true, predicate = null) {\n // Ensures that all world matrix will be recomputed.\n this.getScene().incrementRenderId();\n this.computeWorldMatrix(true);\n let min;\n let max;\n const thisAbstractMesh = this;\n if (thisAbstractMesh.getBoundingInfo && thisAbstractMesh.subMeshes) {\n // If this is an abstract mesh get its bounding info\n const boundingInfo = thisAbstractMesh.getBoundingInfo();\n min = boundingInfo.boundingBox.minimumWorld.clone();\n max = boundingInfo.boundingBox.maximumWorld.clone();\n }\n else {\n min = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n max = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\n }\n if (includeDescendants) {\n const descendants = this.getDescendants(false);\n for (const descendant of descendants) {\n const childMesh = descendant;\n childMesh.computeWorldMatrix(true);\n // Filters meshes based on custom predicate function.\n if (predicate && !predicate(childMesh)) {\n continue;\n }\n //make sure we have the needed params to get mix and max\n if (!childMesh.getBoundingInfo || childMesh.getTotalVertices() === 0) {\n continue;\n }\n const childBoundingInfo = childMesh.getBoundingInfo();\n const boundingBox = childBoundingInfo.boundingBox;\n const minBox = boundingBox.minimumWorld;\n const maxBox = boundingBox.maximumWorld;\n Vector3.CheckExtends(minBox, min, max);\n Vector3.CheckExtends(maxBox, min, max);\n }\n }\n return {\n min: min,\n max: max,\n };\n }\n}\n/**\n * @internal\n */\nNode._AnimationRangeFactory = (_name, _from, _to) => {\n throw _WarnImport(\"AnimationRange\");\n};\nNode._NodeConstructors = {};\n__decorate([\n serialize()\n], Node.prototype, \"name\", void 0);\n__decorate([\n serialize()\n], Node.prototype, \"id\", void 0);\n__decorate([\n serialize()\n], Node.prototype, \"uniqueId\", void 0);\n__decorate([\n serialize()\n], Node.prototype, \"state\", void 0);\n__decorate([\n serialize()\n], Node.prototype, \"metadata\", void 0);\n//# sourceMappingURL=node.js.map","/**\n * Logger used throughout the application to allow configuration of\n * the log level required for the messages.\n */\nexport class Logger {\n static _CheckLimit(message, limit) {\n let entry = Logger._LogLimitOutputs[message];\n if (!entry) {\n entry = { limit, current: 1 };\n Logger._LogLimitOutputs[message] = entry;\n }\n else {\n entry.current++;\n }\n return entry.current <= entry.limit;\n }\n static _GenerateLimitMessage(message, level = 1) {\n var _a;\n const entry = Logger._LogLimitOutputs[message];\n if (!entry || !Logger.MessageLimitReached) {\n return;\n }\n const type = this._Levels[level];\n if (entry.current === entry.limit) {\n Logger[type.name](Logger.MessageLimitReached.replace(/%LIMIT%/g, \"\" + entry.limit).replace(/%TYPE%/g, (_a = type.name) !== null && _a !== void 0 ? _a : \"\"));\n }\n }\n static _AddLogEntry(entry) {\n Logger._LogCache = entry + Logger._LogCache;\n if (Logger.OnNewCacheEntry) {\n Logger.OnNewCacheEntry(entry);\n }\n }\n static _FormatMessage(message) {\n const padStr = (i) => (i < 10 ? \"0\" + i : \"\" + i);\n const date = new Date();\n return \"[\" + padStr(date.getHours()) + \":\" + padStr(date.getMinutes()) + \":\" + padStr(date.getSeconds()) + \"]: \" + message;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static _LogDisabled(message, limit) {\n // nothing to do\n }\n static _LogEnabled(level = 1, message, limit) {\n if (limit !== undefined && !Logger._CheckLimit(message, limit)) {\n return;\n }\n const formattedMessage = Logger._FormatMessage(message);\n const type = this._Levels[level];\n type.logFunc && type.logFunc(\"BJS - \" + formattedMessage);\n const entry = `
${formattedMessage}

`;\n Logger._AddLogEntry(entry);\n Logger._GenerateLimitMessage(message, level);\n }\n /**\n * Gets current log cache (list of logs)\n */\n static get LogCache() {\n return Logger._LogCache;\n }\n /**\n * Clears the log cache\n */\n static ClearLogCache() {\n Logger._LogCache = \"\";\n Logger._LogLimitOutputs = {};\n Logger.errorsCount = 0;\n }\n /**\n * Sets the current log level (MessageLogLevel / WarningLogLevel / ErrorLogLevel)\n */\n static set LogLevels(level) {\n Logger.Log = Logger._LogDisabled;\n Logger.Warn = Logger._LogDisabled;\n Logger.Error = Logger._LogDisabled;\n [Logger.MessageLogLevel, Logger.WarningLogLevel, Logger.ErrorLogLevel].forEach((l) => {\n if ((level & l) === l) {\n const type = this._Levels[l];\n Logger[type.name] = Logger._LogEnabled.bind(Logger, l);\n }\n });\n }\n}\n/**\n * No log\n */\nLogger.NoneLogLevel = 0;\n/**\n * Only message logs\n */\nLogger.MessageLogLevel = 1;\n/**\n * Only warning logs\n */\nLogger.WarningLogLevel = 2;\n/**\n * Only error logs\n */\nLogger.ErrorLogLevel = 4;\n/**\n * All logs\n */\nLogger.AllLogLevel = 7;\n/**\n * Message to display when a message has been logged too many times\n */\nLogger.MessageLimitReached = \"Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.\";\nLogger._LogCache = \"\";\nLogger._LogLimitOutputs = {};\n// levels according to the (binary) numbering.\nLogger._Levels = [\n {},\n { color: \"white\", logFunc: console.log, name: \"Log\" },\n { color: \"orange\", logFunc: console.warn, name: \"Warn\" },\n {},\n { color: \"red\", logFunc: console.error, name: \"Error\" },\n];\n/**\n * Gets a value indicating the number of loading errors\n * @ignorenaming\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nLogger.errorsCount = 0;\n/**\n * Log a message to the console\n */\nLogger.Log = Logger._LogEnabled.bind(Logger, Logger.MessageLogLevel);\n/**\n * Write a warning message to the console\n */\nLogger.Warn = Logger._LogEnabled.bind(Logger, Logger.WarningLogLevel);\n/**\n * Write an error message to the console\n */\nLogger.Error = Logger._LogEnabled.bind(Logger, Logger.ErrorLogLevel);\n//# sourceMappingURL=logger.js.map","/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * Checks if the window object exists\n * @returns true if the window object exists\n */\nexport function IsWindowObjectExist() {\n return typeof window !== \"undefined\";\n}\n/**\n * Checks if the navigator object exists\n * @returns true if the navigator object exists\n */\nexport function IsNavigatorAvailable() {\n return typeof navigator !== \"undefined\";\n}\n/**\n * Check if the document object exists\n * @returns true if the document object exists\n */\nexport function IsDocumentAvailable() {\n return typeof document !== \"undefined\";\n}\n/**\n * Extracts text content from a DOM element hierarchy\n * @param element defines the root element\n * @returns a string\n */\nexport function GetDOMTextContent(element) {\n let result = \"\";\n let child = element.firstChild;\n while (child) {\n if (child.nodeType === 3) {\n result += child.textContent;\n }\n child = child.nextSibling;\n }\n return result;\n}\n/**\n * Sets of helpers dealing with the DOM and some of the recurrent functions needed in\n * Babylon.js\n */\nexport const DomManagement = {\n /**\n * Checks if the window object exists\n * @returns true if the window object exists\n */\n IsWindowObjectExist,\n /**\n * Checks if the navigator object exists\n * @returns true if the navigator object exists\n */\n IsNavigatorAvailable,\n /**\n * Check if the document object exists\n * @returns true if the document object exists\n */\n IsDocumentAvailable,\n /**\n * Extracts text content from a DOM element hierarchy\n * @param element defines the root element\n * @returns a string\n */\n GetDOMTextContent,\n};\n//# sourceMappingURL=domManagement.js.map","import { Logger } from \"./logger.js\";\nconst CloneValue = (source, destinationObject, shallowCopyValues) => {\n if (!source) {\n return null;\n }\n if (source.getClassName && source.getClassName() === \"Mesh\") {\n return null;\n }\n if (source.getClassName && (source.getClassName() === \"SubMesh\" || source.getClassName() === \"PhysicsBody\")) {\n return source.clone(destinationObject);\n }\n else if (source.clone) {\n return source.clone();\n }\n else if (Array.isArray(source)) {\n return source.slice();\n }\n else if (shallowCopyValues && typeof source === \"object\") {\n return Object.assign({}, source);\n }\n return null;\n};\nfunction GetAllPropertyNames(obj) {\n const props = [];\n do {\n Object.getOwnPropertyNames(obj).forEach(function (prop) {\n if (props.indexOf(prop) === -1) {\n props.push(prop);\n }\n });\n } while ((obj = Object.getPrototypeOf(obj)));\n return props;\n}\n/**\n * Class containing a set of static utilities functions for deep copy.\n */\nexport class DeepCopier {\n /**\n * Tries to copy an object by duplicating every property\n * @param source defines the source object\n * @param destination defines the target object\n * @param doNotCopyList defines a list of properties to avoid\n * @param mustCopyList defines a list of properties to copy (even if they start with _)\n * @param shallowCopyValues defines wether properties referencing objects (none cloneable) must be shallow copied (false by default)\n * @remarks shallowCopyValues will not instantite the copied values which makes it only usable for \"JSON objects\"\n */\n static DeepCopy(source, destination, doNotCopyList, mustCopyList, shallowCopyValues = false) {\n const properties = GetAllPropertyNames(source);\n for (const prop of properties) {\n if (prop[0] === \"_\" && (!mustCopyList || mustCopyList.indexOf(prop) === -1)) {\n continue;\n }\n if (prop.endsWith(\"Observable\")) {\n continue;\n }\n if (doNotCopyList && doNotCopyList.indexOf(prop) !== -1) {\n continue;\n }\n const sourceValue = source[prop];\n const typeOfSourceValue = typeof sourceValue;\n if (typeOfSourceValue === \"function\") {\n continue;\n }\n try {\n if (typeOfSourceValue === \"object\") {\n if (sourceValue instanceof Uint8Array) {\n destination[prop] = Uint8Array.from(sourceValue);\n }\n else if (sourceValue instanceof Array) {\n destination[prop] = [];\n if (sourceValue.length > 0) {\n if (typeof sourceValue[0] == \"object\") {\n for (let index = 0; index < sourceValue.length; index++) {\n const clonedValue = CloneValue(sourceValue[index], destination, shallowCopyValues);\n if (destination[prop].indexOf(clonedValue) === -1) {\n // Test if auto inject was not done\n destination[prop].push(clonedValue);\n }\n }\n }\n else {\n destination[prop] = sourceValue.slice(0);\n }\n }\n }\n else {\n destination[prop] = CloneValue(sourceValue, destination, shallowCopyValues);\n }\n }\n else {\n destination[prop] = sourceValue;\n }\n }\n catch (e) {\n // Log a warning (it could be because of a read-only property)\n Logger.Warn(e.message);\n }\n }\n }\n}\n//# sourceMappingURL=deepCopier.js.map","import { IsWindowObjectExist } from \"./domManagement.js\";\n/**\n * Class containing a set of static utilities functions for precision date\n */\nexport class PrecisionDate {\n /**\n * Gets either window.performance.now() if supported or Date.now() else\n */\n static get Now() {\n if (IsWindowObjectExist() && window.performance && window.performance.now) {\n return window.performance.now();\n }\n return Date.now();\n }\n}\n//# sourceMappingURL=precisionDate.js.map","/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction createXMLHttpRequest() {\n // If running in Babylon Native, then defer to the native XMLHttpRequest, which has the same public contract\n if (typeof _native !== \"undefined\" && _native.XMLHttpRequest) {\n return new _native.XMLHttpRequest();\n }\n else {\n return new XMLHttpRequest();\n }\n}\n/**\n * Extended version of XMLHttpRequest with support for customizations (headers, ...)\n */\nexport class WebRequest {\n constructor() {\n this._xhr = createXMLHttpRequest();\n this._requestURL = \"\";\n }\n /**\n * This function can be called to check if there are request modifiers for network requests\n * @returns true if there are any custom requests available\n */\n static get IsCustomRequestAvailable() {\n return Object.keys(WebRequest.CustomRequestHeaders).length > 0 || WebRequest.CustomRequestModifiers.length > 0;\n }\n _injectCustomRequestHeaders() {\n if (this._shouldSkipRequestModifications(this._requestURL)) {\n return;\n }\n for (const key in WebRequest.CustomRequestHeaders) {\n const val = WebRequest.CustomRequestHeaders[key];\n if (val) {\n this._xhr.setRequestHeader(key, val);\n }\n }\n }\n _shouldSkipRequestModifications(url) {\n return WebRequest.SkipRequestModificationForBabylonCDN && (url.includes(\"preview.babylonjs.com\") || url.includes(\"cdn.babylonjs.com\"));\n }\n /**\n * Gets or sets a function to be called when loading progress changes\n */\n get onprogress() {\n return this._xhr.onprogress;\n }\n set onprogress(value) {\n this._xhr.onprogress = value;\n }\n /**\n * Returns client's state\n */\n get readyState() {\n return this._xhr.readyState;\n }\n /**\n * Returns client's status\n */\n get status() {\n return this._xhr.status;\n }\n /**\n * Returns client's status as a text\n */\n get statusText() {\n return this._xhr.statusText;\n }\n /**\n * Returns client's response\n */\n get response() {\n return this._xhr.response;\n }\n /**\n * Returns client's response url\n */\n get responseURL() {\n return this._xhr.responseURL;\n }\n /**\n * Returns client's response as text\n */\n get responseText() {\n return this._xhr.responseText;\n }\n /**\n * Gets or sets the expected response type\n */\n get responseType() {\n return this._xhr.responseType;\n }\n set responseType(value) {\n this._xhr.responseType = value;\n }\n /**\n * Gets or sets the timeout value in milliseconds\n */\n get timeout() {\n return this._xhr.timeout;\n }\n set timeout(value) {\n this._xhr.timeout = value;\n }\n addEventListener(type, listener, options) {\n this._xhr.addEventListener(type, listener, options);\n }\n removeEventListener(type, listener, options) {\n this._xhr.removeEventListener(type, listener, options);\n }\n /**\n * Cancels any network activity\n */\n abort() {\n this._xhr.abort();\n }\n /**\n * Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD\n * @param body defines an optional request body\n */\n send(body) {\n if (WebRequest.CustomRequestHeaders) {\n this._injectCustomRequestHeaders();\n }\n this._xhr.send(body);\n }\n /**\n * Sets the request method, request URL\n * @param method defines the method to use (GET, POST, etc..)\n * @param url defines the url to connect with\n */\n open(method, url) {\n for (const update of WebRequest.CustomRequestModifiers) {\n if (this._shouldSkipRequestModifications(url)) {\n return;\n }\n update(this._xhr, url);\n }\n // Clean url\n url = url.replace(\"file:http:\", \"http:\");\n url = url.replace(\"file:https:\", \"https:\");\n this._requestURL = url;\n return this._xhr.open(method, url, true);\n }\n /**\n * Sets the value of a request header.\n * @param name The name of the header whose value is to be set\n * @param value The value to set as the body of the header\n */\n setRequestHeader(name, value) {\n this._xhr.setRequestHeader(name, value);\n }\n /**\n * Get the string containing the text of a particular header's value.\n * @param name The name of the header\n * @returns The string containing the text of the given header name\n */\n getResponseHeader(name) {\n return this._xhr.getResponseHeader(name);\n }\n}\n/**\n * Custom HTTP Request Headers to be sent with XMLHttpRequests\n * i.e. when loading files, where the server/service expects an Authorization header\n */\nWebRequest.CustomRequestHeaders = {};\n/**\n * Add callback functions in this array to update all the requests before they get sent to the network\n */\nWebRequest.CustomRequestModifiers = new Array();\nWebRequest.SkipRequestModificationForBabylonCDN = true;\n//# sourceMappingURL=webRequest.js.map","/**\n * Class used to help managing file picking and drag'n'drop\n * File Storage\n */\nexport class FilesInputStore {\n}\n/**\n * List of files ready to be loaded\n */\nFilesInputStore.FilesToLoad = {};\n//# sourceMappingURL=filesInputStore.js.map","/**\n * Class used to define a retry strategy when error happens while loading assets\n */\nexport class RetryStrategy {\n /**\n * Function used to defines an exponential back off strategy\n * @param maxRetries defines the maximum number of retries (3 by default)\n * @param baseInterval defines the interval between retries\n * @returns the strategy function to use\n */\n static ExponentialBackoff(maxRetries = 3, baseInterval = 500) {\n return (url, request, retryIndex) => {\n if (request.status !== 0 || retryIndex >= maxRetries || url.indexOf(\"file:\") !== -1) {\n return -1;\n }\n return Math.pow(2, retryIndex) * baseInterval;\n };\n }\n}\n//# sourceMappingURL=retryStrategy.js.map","/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * Base error. Due to limitations of typedoc-check and missing documentation\n * in lib.es5.d.ts, cannot extend Error directly for RuntimeError.\n * @ignore\n */\nexport class BaseError extends Error {\n}\n// See https://stackoverflow.com/questions/12915412/how-do-i-extend-a-host-object-e-g-error-in-typescript\n// and https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work\n// Polyfill for Object.setPrototypeOf if necessary.\nBaseError._setPrototypeOf = Object.setPrototypeOf ||\n ((o, proto) => {\n o.__proto__ = proto;\n return o;\n });\n/* IMP! DO NOT CHANGE THE NUMBERING OF EXISTING ERROR CODES */\n/**\n * Error codes for BaseError\n */\nexport const ErrorCodes = {\n // Mesh errors 0-999\n /** Invalid or empty mesh vertex positions. */\n MeshInvalidPositionsError: 0,\n // Texture errors 1000-1999\n /** Unsupported texture found. */\n UnsupportedTextureError: 1000,\n // GLTFLoader errors 2000-2999\n /** Unexpected magic number found in GLTF file header. */\n GLTFLoaderUnexpectedMagicError: 2000,\n // SceneLoader errors 3000-3999\n /** SceneLoader generic error code. Ideally wraps the inner exception. */\n SceneLoaderError: 3000,\n // File related errors 4000-4999\n /** Load file error */\n LoadFileError: 4000,\n /** Request file error */\n RequestFileError: 4001,\n /** Read file error */\n ReadFileError: 4002,\n};\n/**\n * Application runtime error\n */\nexport class RuntimeError extends BaseError {\n /**\n * Creates a new RuntimeError\n * @param message defines the message of the error\n * @param errorCode the error code\n * @param innerError the error that caused the outer error\n */\n constructor(message, errorCode, innerError) {\n super(message);\n this.errorCode = errorCode;\n this.innerError = innerError;\n this.name = \"RuntimeError\";\n BaseError._setPrototypeOf(this, RuntimeError.prototype);\n }\n}\n//# sourceMappingURL=error.js.map","/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * Checks for a matching suffix at the end of a string (for ES5 and lower)\n * @param str Source string\n * @param suffix Suffix to search for in the source string\n * @returns Boolean indicating whether the suffix was found (true) or not (false)\n * @deprecated Please use native string function instead\n */\nexport const EndsWith = (str, suffix) => {\n return str.endsWith(suffix);\n};\n/**\n * Checks for a matching suffix at the beginning of a string (for ES5 and lower)\n * @param str Source string\n * @param suffix Suffix to search for in the source string\n * @returns Boolean indicating whether the suffix was found (true) or not (false)\n * @deprecated Please use native string function instead\n */\nexport const StartsWith = (str, suffix) => {\n if (!str) {\n return false;\n }\n return str.startsWith(suffix);\n};\n/**\n * Decodes a buffer into a string\n * @param buffer The buffer to decode\n * @returns The decoded string\n */\nexport const Decode = (buffer) => {\n if (typeof TextDecoder !== \"undefined\") {\n return new TextDecoder().decode(buffer);\n }\n let result = \"\";\n for (let i = 0; i < buffer.byteLength; i++) {\n result += String.fromCharCode(buffer[i]);\n }\n return result;\n};\n/**\n * Encode a buffer to a base64 string\n * @param buffer defines the buffer to encode\n * @returns the encoded string\n */\nexport const EncodeArrayBufferToBase64 = (buffer) => {\n const keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n let output = \"\";\n let chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n let i = 0;\n const bytes = ArrayBuffer.isView(buffer) ? new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength) : new Uint8Array(buffer);\n while (i < bytes.length) {\n chr1 = bytes[i++];\n chr2 = i < bytes.length ? bytes[i++] : Number.NaN;\n chr3 = i < bytes.length ? bytes[i++] : Number.NaN;\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n }\n else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output += keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4);\n }\n return output;\n};\n/**\n * Converts a given base64 string as an ASCII encoded stream of data\n * @param base64Data The base64 encoded string to decode\n * @returns Decoded ASCII string\n */\nexport const DecodeBase64ToString = (base64Data) => {\n return atob(base64Data);\n};\n/**\n * Converts a given base64 string into an ArrayBuffer of raw byte data\n * @param base64Data The base64 encoded string to decode\n * @returns ArrayBuffer of byte data\n */\nexport const DecodeBase64ToBinary = (base64Data) => {\n const decodedString = DecodeBase64ToString(base64Data);\n const bufferLength = decodedString.length;\n const bufferView = new Uint8Array(new ArrayBuffer(bufferLength));\n for (let i = 0; i < bufferLength; i++) {\n bufferView[i] = decodedString.charCodeAt(i);\n }\n return bufferView.buffer;\n};\n/**\n * Converts a number to string and pads with preceding zeroes until it is of specified length.\n * @param num the number to convert and pad\n * @param length the expected length of the string\n * @returns the padded string\n */\nexport const PadNumber = (num, length) => {\n let str = String(num);\n while (str.length < length) {\n str = \"0\" + str;\n }\n return str;\n};\n/**\n * Helper to manipulate strings\n */\nexport const StringTools = {\n EndsWith,\n StartsWith,\n Decode,\n EncodeArrayBufferToBase64,\n DecodeBase64ToString,\n DecodeBase64ToBinary,\n PadNumber,\n};\n//# sourceMappingURL=stringTools.js.map","const defaultAttributeKeywordName = \"attribute\";\nconst defaultVaryingKeywordName = \"varying\";\n/** @internal */\nexport class ShaderCodeNode {\n constructor() {\n this.children = [];\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isValid(preprocessors) {\n return true;\n }\n process(preprocessors, options) {\n var _a, _b, _c, _d, _e, _f, _g;\n let result = \"\";\n if (this.line) {\n let value = this.line;\n const processor = options.processor;\n if (processor) {\n // This must be done before other replacements to avoid mistakenly changing something that was already changed.\n if (processor.lineProcessor) {\n value = processor.lineProcessor(value, options.isFragment, options.processingContext);\n }\n const attributeKeyword = (_b = (_a = options.processor) === null || _a === void 0 ? void 0 : _a.attributeKeywordName) !== null && _b !== void 0 ? _b : defaultAttributeKeywordName;\n const varyingKeyword = options.isFragment && ((_c = options.processor) === null || _c === void 0 ? void 0 : _c.varyingFragmentKeywordName)\n ? (_d = options.processor) === null || _d === void 0 ? void 0 : _d.varyingFragmentKeywordName\n : !options.isFragment && ((_e = options.processor) === null || _e === void 0 ? void 0 : _e.varyingVertexKeywordName)\n ? (_f = options.processor) === null || _f === void 0 ? void 0 : _f.varyingVertexKeywordName\n : defaultVaryingKeywordName;\n if (!options.isFragment && processor.attributeProcessor && this.line.startsWith(attributeKeyword)) {\n value = processor.attributeProcessor(this.line, preprocessors, options.processingContext);\n }\n else if (processor.varyingProcessor &&\n (((_g = processor.varyingCheck) === null || _g === void 0 ? void 0 : _g.call(processor, this.line, options.isFragment)) || (!processor.varyingCheck && this.line.startsWith(varyingKeyword)))) {\n value = processor.varyingProcessor(this.line, options.isFragment, preprocessors, options.processingContext);\n }\n else if (processor.uniformProcessor && processor.uniformRegexp && processor.uniformRegexp.test(this.line)) {\n if (!options.lookForClosingBracketForUniformBuffer) {\n value = processor.uniformProcessor(this.line, options.isFragment, preprocessors, options.processingContext);\n }\n }\n else if (processor.uniformBufferProcessor && processor.uniformBufferRegexp && processor.uniformBufferRegexp.test(this.line)) {\n if (!options.lookForClosingBracketForUniformBuffer) {\n value = processor.uniformBufferProcessor(this.line, options.isFragment, options.processingContext);\n options.lookForClosingBracketForUniformBuffer = true;\n }\n }\n else if (processor.textureProcessor && processor.textureRegexp && processor.textureRegexp.test(this.line)) {\n value = processor.textureProcessor(this.line, options.isFragment, preprocessors, options.processingContext);\n }\n else if ((processor.uniformProcessor || processor.uniformBufferProcessor) && this.line.startsWith(\"uniform\") && !options.lookForClosingBracketForUniformBuffer) {\n const regex = /uniform\\s+(?:(?:highp)?|(?:lowp)?)\\s*(\\S+)\\s+(\\S+)\\s*;/;\n if (regex.test(this.line)) {\n // uniform\n if (processor.uniformProcessor) {\n value = processor.uniformProcessor(this.line, options.isFragment, preprocessors, options.processingContext);\n }\n }\n else {\n // Uniform buffer\n if (processor.uniformBufferProcessor) {\n value = processor.uniformBufferProcessor(this.line, options.isFragment, options.processingContext);\n options.lookForClosingBracketForUniformBuffer = true;\n }\n }\n }\n if (options.lookForClosingBracketForUniformBuffer && this.line.indexOf(\"}\") !== -1) {\n options.lookForClosingBracketForUniformBuffer = false;\n if (processor.endOfUniformBufferProcessor) {\n value = processor.endOfUniformBufferProcessor(this.line, options.isFragment, options.processingContext);\n }\n }\n }\n result += value + \"\\n\";\n }\n this.children.forEach((child) => {\n result += child.process(preprocessors, options);\n });\n if (this.additionalDefineKey) {\n preprocessors[this.additionalDefineKey] = this.additionalDefineValue || \"true\";\n }\n return result;\n }\n}\n//# sourceMappingURL=shaderCodeNode.js.map","/** @internal */\nexport class ShaderCodeCursor {\n constructor() {\n this._lines = [];\n }\n get currentLine() {\n return this._lines[this.lineIndex];\n }\n get canRead() {\n return this.lineIndex < this._lines.length - 1;\n }\n set lines(value) {\n this._lines.length = 0;\n for (const line of value) {\n // Skip empty lines\n if (!line || line === \"\\r\") {\n continue;\n }\n // Prevent removing line break in macros.\n if (line[0] === \"#\") {\n this._lines.push(line);\n continue;\n }\n // Do not split single line comments\n const trimmedLine = line.trim();\n if (!trimmedLine) {\n continue;\n }\n if (trimmedLine.startsWith(\"//\")) {\n this._lines.push(line);\n continue;\n }\n // Work with semicolon in the line\n const semicolonIndex = trimmedLine.indexOf(\";\");\n if (semicolonIndex === -1) {\n // No semicolon in the line\n this._lines.push(trimmedLine);\n }\n else if (semicolonIndex === trimmedLine.length - 1) {\n // Single semicolon at the end of the line\n // If trimmedLine == \";\", we must not push, to be backward compatible with the old code!\n if (trimmedLine.length > 1) {\n this._lines.push(trimmedLine);\n }\n }\n else {\n // Semicolon in the middle of the line\n const split = line.split(\";\");\n for (let index = 0; index < split.length; index++) {\n let subLine = split[index];\n if (!subLine) {\n continue;\n }\n subLine = subLine.trim();\n if (!subLine) {\n continue;\n }\n this._lines.push(subLine + (index !== split.length - 1 ? \";\" : \"\"));\n }\n }\n }\n }\n}\n//# sourceMappingURL=shaderCodeCursor.js.map","import { ShaderCodeNode } from \"./shaderCodeNode.js\";\n/** @internal */\nexport class ShaderCodeConditionNode extends ShaderCodeNode {\n process(preprocessors, options) {\n for (let index = 0; index < this.children.length; index++) {\n const node = this.children[index];\n if (node.isValid(preprocessors)) {\n return node.process(preprocessors, options);\n }\n }\n return \"\";\n }\n}\n//# sourceMappingURL=shaderCodeConditionNode.js.map","import { ShaderCodeNode } from \"./shaderCodeNode.js\";\n/** @internal */\nexport class ShaderCodeTestNode extends ShaderCodeNode {\n isValid(preprocessors) {\n return this.testExpression.isTrue(preprocessors);\n }\n}\n//# sourceMappingURL=shaderCodeTestNode.js.map","/* eslint-disable @typescript-eslint/naming-convention */\n/** @internal */\nexport class ShaderDefineExpression {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isTrue(preprocessors) {\n return true;\n }\n static postfixToInfix(postfix) {\n const stack = [];\n for (const c of postfix) {\n if (ShaderDefineExpression._OperatorPriority[c] === undefined) {\n stack.push(c);\n }\n else {\n const v1 = stack[stack.length - 1], v2 = stack[stack.length - 2];\n stack.length -= 2;\n stack.push(`(${v2}${c}${v1})`);\n }\n }\n return stack[stack.length - 1];\n }\n /**\n * Converts an infix expression to a postfix expression.\n *\n * This method is used to transform infix expressions, which are more human-readable,\n * into postfix expressions, also known as Reverse Polish Notation (RPN), that can be\n * evaluated more efficiently by a computer. The conversion is based on the operator\n * priority defined in _OperatorPriority.\n *\n * The function employs a stack-based algorithm for the conversion and caches the result\n * to improve performance. The cache keeps track of each converted expression's access time\n * to manage the cache size and optimize memory usage. When the cache size exceeds a specified\n * limit, the least recently accessed items in the cache are deleted.\n *\n * The cache mechanism is particularly helpful for shader compilation, where the same infix\n * expressions might be encountered repeatedly, hence the caching can speed up the process.\n *\n * @param infix - The infix expression to be converted.\n * @returns The postfix expression as an array of strings.\n */\n static infixToPostfix(infix) {\n // Is infix already in cache\n const cacheItem = ShaderDefineExpression._InfixToPostfixCache.get(infix);\n if (cacheItem) {\n cacheItem.accessTime = Date.now();\n return cacheItem.result;\n }\n // Is infix contain any operator\n if (!infix.includes(\"&&\") && !infix.includes(\"||\") && !infix.includes(\")\") && !infix.includes(\"(\")) {\n return [infix];\n }\n const result = [];\n let stackIdx = -1;\n const pushOperand = () => {\n operand = operand.trim();\n if (operand !== \"\") {\n result.push(operand);\n operand = \"\";\n }\n };\n const push = (s) => {\n if (stackIdx < ShaderDefineExpression._Stack.length - 1) {\n ShaderDefineExpression._Stack[++stackIdx] = s;\n }\n };\n const peek = () => ShaderDefineExpression._Stack[stackIdx];\n const pop = () => (stackIdx === -1 ? \"!!INVALID EXPRESSION!!\" : ShaderDefineExpression._Stack[stackIdx--]);\n let idx = 0, operand = \"\";\n while (idx < infix.length) {\n const c = infix.charAt(idx), token = idx < infix.length - 1 ? infix.substr(idx, 2) : \"\";\n if (c === \"(\") {\n operand = \"\";\n push(c);\n }\n else if (c === \")\") {\n pushOperand();\n while (stackIdx !== -1 && peek() !== \"(\") {\n result.push(pop());\n }\n pop();\n }\n else if (ShaderDefineExpression._OperatorPriority[token] > 1) {\n pushOperand();\n while (stackIdx !== -1 && ShaderDefineExpression._OperatorPriority[peek()] >= ShaderDefineExpression._OperatorPriority[token]) {\n result.push(pop());\n }\n push(token);\n idx++;\n }\n else {\n operand += c;\n }\n idx++;\n }\n pushOperand();\n while (stackIdx !== -1) {\n if (peek() === \"(\") {\n pop();\n }\n else {\n result.push(pop());\n }\n }\n // If the cache is at capacity, clear it before adding a new item\n if (ShaderDefineExpression._InfixToPostfixCache.size >= ShaderDefineExpression.InfixToPostfixCacheLimitSize) {\n ShaderDefineExpression.ClearCache();\n }\n // Add the new item to the cache, including the current time as the last access time\n ShaderDefineExpression._InfixToPostfixCache.set(infix, { result, accessTime: Date.now() });\n return result;\n }\n static ClearCache() {\n // Convert the cache to an array and sort by last access time\n const sortedCache = Array.from(ShaderDefineExpression._InfixToPostfixCache.entries()).sort((a, b) => a[1].accessTime - b[1].accessTime);\n // Remove the least recently accessed half of the cache\n for (let i = 0; i < ShaderDefineExpression.InfixToPostfixCacheCleanupSize; i++) {\n ShaderDefineExpression._InfixToPostfixCache.delete(sortedCache[i][0]);\n }\n }\n}\n/**\n * Cache items count limit for the InfixToPostfix cache.\n * It uses to improve the performance of the shader compilation.\n * For details see PR: https://github.com/BabylonJS/Babylon.js/pull/13936\n */\nShaderDefineExpression.InfixToPostfixCacheLimitSize = 50000;\n/**\n * When the cache size is exceeded, a cache cleanup will be triggered\n * and the cache will be reduced by the size specified\n * in the InfixToPostfixCacheCleanupSize variable, removing entries\n * that have not been accessed the longest.\n */\nShaderDefineExpression.InfixToPostfixCacheCleanupSize = 25000;\nShaderDefineExpression._InfixToPostfixCache = new Map();\nShaderDefineExpression._OperatorPriority = {\n \")\": 0,\n \"(\": 1,\n \"||\": 2,\n \"&&\": 3,\n};\nShaderDefineExpression._Stack = [\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"];\n//# sourceMappingURL=shaderDefineExpression.js.map","import { ShaderDefineExpression } from \"../shaderDefineExpression.js\";\n/** @internal */\nexport class ShaderDefineIsDefinedOperator extends ShaderDefineExpression {\n constructor(define, not = false) {\n super();\n this.define = define;\n this.not = not;\n }\n isTrue(preprocessors) {\n let condition = preprocessors[this.define] !== undefined;\n if (this.not) {\n condition = !condition;\n }\n return condition;\n }\n}\n//# sourceMappingURL=shaderDefineIsDefinedOperator.js.map","import { ShaderDefineExpression } from \"../shaderDefineExpression.js\";\n/** @internal */\nexport class ShaderDefineOrOperator extends ShaderDefineExpression {\n isTrue(preprocessors) {\n return this.leftOperand.isTrue(preprocessors) || this.rightOperand.isTrue(preprocessors);\n }\n}\n//# sourceMappingURL=shaderDefineOrOperator.js.map","import { ShaderDefineExpression } from \"../shaderDefineExpression.js\";\n/** @internal */\nexport class ShaderDefineAndOperator extends ShaderDefineExpression {\n isTrue(preprocessors) {\n return this.leftOperand.isTrue(preprocessors) && this.rightOperand.isTrue(preprocessors);\n }\n}\n//# sourceMappingURL=shaderDefineAndOperator.js.map","import { ShaderDefineExpression } from \"../shaderDefineExpression.js\";\n/** @internal */\nexport class ShaderDefineArithmeticOperator extends ShaderDefineExpression {\n constructor(define, operand, testValue) {\n super();\n this.define = define;\n this.operand = operand;\n this.testValue = testValue;\n }\n isTrue(preprocessors) {\n let value = preprocessors[this.define];\n if (value === undefined) {\n value = this.define;\n }\n let condition = false;\n const left = parseInt(value);\n const right = parseInt(this.testValue);\n switch (this.operand) {\n case \">\":\n condition = left > right;\n break;\n case \"<\":\n condition = left < right;\n break;\n case \"<=\":\n condition = left <= right;\n break;\n case \">=\":\n condition = left >= right;\n break;\n case \"==\":\n condition = left === right;\n break;\n case \"!=\":\n condition = left !== right;\n break;\n }\n return condition;\n }\n}\n//# sourceMappingURL=shaderDefineArithmeticOperator.js.map","/**\n * Language of the shader code\n */\nexport var ShaderLanguage;\n(function (ShaderLanguage) {\n /** language is GLSL (used by WebGL) */\n ShaderLanguage[ShaderLanguage[\"GLSL\"] = 0] = \"GLSL\";\n /** language is WGSL (used by WebGPU) */\n ShaderLanguage[ShaderLanguage[\"WGSL\"] = 1] = \"WGSL\";\n})(ShaderLanguage || (ShaderLanguage = {}));\n//# sourceMappingURL=shaderLanguage.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { ShaderCodeNode } from \"./shaderCodeNode.js\";\nimport { ShaderCodeCursor } from \"./shaderCodeCursor.js\";\nimport { ShaderCodeConditionNode } from \"./shaderCodeConditionNode.js\";\nimport { ShaderCodeTestNode } from \"./shaderCodeTestNode.js\";\nimport { ShaderDefineIsDefinedOperator } from \"./Expressions/Operators/shaderDefineIsDefinedOperator.js\";\nimport { ShaderDefineOrOperator } from \"./Expressions/Operators/shaderDefineOrOperator.js\";\nimport { ShaderDefineAndOperator } from \"./Expressions/Operators/shaderDefineAndOperator.js\";\nimport { ShaderDefineExpression } from \"./Expressions/shaderDefineExpression.js\";\nimport { ShaderDefineArithmeticOperator } from \"./Expressions/Operators/shaderDefineArithmeticOperator.js\";\nimport { _WarnImport } from \"../../Misc/devTools.js\";\nimport { ShaderLanguage } from \"../../Materials/shaderLanguage.js\";\nconst regexSE = /defined\\s*?\\((.+?)\\)/g;\nconst regexSERevert = /defined\\s*?\\[(.+?)\\]/g;\nconst regexShaderInclude = /#include\\s?<(.+)>(\\((.*)\\))*(\\[(.*)\\])*/g;\nconst regexShaderDecl = /__decl__/;\nconst regexLightX = /light\\{X\\}.(\\w*)/g;\nconst regexX = /\\{X\\}/g;\nconst reusableMatches = [];\n/** @internal */\nexport class ShaderProcessor {\n static Initialize(options) {\n if (options.processor && options.processor.initializeShaders) {\n options.processor.initializeShaders(options.processingContext);\n }\n }\n static Process(sourceCode, options, callback, engine) {\n var _a;\n if ((_a = options.processor) === null || _a === void 0 ? void 0 : _a.preProcessShaderCode) {\n sourceCode = options.processor.preProcessShaderCode(sourceCode, options.isFragment);\n }\n this._ProcessIncludes(sourceCode, options, (codeWithIncludes) => {\n if (options.processCodeAfterIncludes) {\n codeWithIncludes = options.processCodeAfterIncludes(options.isFragment ? \"fragment\" : \"vertex\", codeWithIncludes);\n }\n const migratedCode = this._ProcessShaderConversion(codeWithIncludes, options, engine);\n callback(migratedCode, codeWithIncludes);\n });\n }\n static PreProcess(sourceCode, options, callback, engine) {\n var _a;\n if ((_a = options.processor) === null || _a === void 0 ? void 0 : _a.preProcessShaderCode) {\n sourceCode = options.processor.preProcessShaderCode(sourceCode, options.isFragment);\n }\n this._ProcessIncludes(sourceCode, options, (codeWithIncludes) => {\n if (options.processCodeAfterIncludes) {\n codeWithIncludes = options.processCodeAfterIncludes(options.isFragment ? \"fragment\" : \"vertex\", codeWithIncludes);\n }\n const migratedCode = this._ApplyPreProcessing(codeWithIncludes, options, engine);\n callback(migratedCode, codeWithIncludes);\n });\n }\n static Finalize(vertexCode, fragmentCode, options) {\n if (!options.processor || !options.processor.finalizeShaders) {\n return { vertexCode, fragmentCode };\n }\n return options.processor.finalizeShaders(vertexCode, fragmentCode, options.processingContext);\n }\n static _ProcessPrecision(source, options) {\n var _a;\n if ((_a = options.processor) === null || _a === void 0 ? void 0 : _a.noPrecision) {\n return source;\n }\n const shouldUseHighPrecisionShader = options.shouldUseHighPrecisionShader;\n if (source.indexOf(\"precision highp float\") === -1) {\n if (!shouldUseHighPrecisionShader) {\n source = \"precision mediump float;\\n\" + source;\n }\n else {\n source = \"precision highp float;\\n\" + source;\n }\n }\n else {\n if (!shouldUseHighPrecisionShader) {\n // Moving highp to mediump\n source = source.replace(\"precision highp float\", \"precision mediump float\");\n }\n }\n return source;\n }\n static _ExtractOperation(expression) {\n const regex = /defined\\((.+)\\)/;\n const match = regex.exec(expression);\n if (match && match.length) {\n return new ShaderDefineIsDefinedOperator(match[1].trim(), expression[0] === \"!\");\n }\n const operators = [\"==\", \"!=\", \">=\", \"<=\", \"<\", \">\"];\n let operator = \"\";\n let indexOperator = 0;\n for (operator of operators) {\n indexOperator = expression.indexOf(operator);\n if (indexOperator > -1) {\n break;\n }\n }\n if (indexOperator === -1) {\n return new ShaderDefineIsDefinedOperator(expression);\n }\n const define = expression.substring(0, indexOperator).trim();\n const value = expression.substring(indexOperator + operator.length).trim();\n return new ShaderDefineArithmeticOperator(define, operator, value);\n }\n static _BuildSubExpression(expression) {\n expression = expression.replace(regexSE, \"defined[$1]\");\n const postfix = ShaderDefineExpression.infixToPostfix(expression);\n const stack = [];\n for (const c of postfix) {\n if (c !== \"||\" && c !== \"&&\") {\n stack.push(c);\n }\n else if (stack.length >= 2) {\n let v1 = stack[stack.length - 1], v2 = stack[stack.length - 2];\n stack.length -= 2;\n const operator = c == \"&&\" ? new ShaderDefineAndOperator() : new ShaderDefineOrOperator();\n if (typeof v1 === \"string\") {\n v1 = v1.replace(regexSERevert, \"defined($1)\");\n }\n if (typeof v2 === \"string\") {\n v2 = v2.replace(regexSERevert, \"defined($1)\");\n }\n operator.leftOperand = typeof v2 === \"string\" ? this._ExtractOperation(v2) : v2;\n operator.rightOperand = typeof v1 === \"string\" ? this._ExtractOperation(v1) : v1;\n stack.push(operator);\n }\n }\n let result = stack[stack.length - 1];\n if (typeof result === \"string\") {\n result = result.replace(regexSERevert, \"defined($1)\");\n }\n // note: stack.length !== 1 if there was an error in the parsing\n return typeof result === \"string\" ? this._ExtractOperation(result) : result;\n }\n static _BuildExpression(line, start) {\n const node = new ShaderCodeTestNode();\n const command = line.substring(0, start);\n let expression = line.substring(start);\n expression = expression.substring(0, (expression.indexOf(\"//\") + 1 || expression.length + 1) - 1).trim();\n if (command === \"#ifdef\") {\n node.testExpression = new ShaderDefineIsDefinedOperator(expression);\n }\n else if (command === \"#ifndef\") {\n node.testExpression = new ShaderDefineIsDefinedOperator(expression, true);\n }\n else {\n node.testExpression = this._BuildSubExpression(expression);\n }\n return node;\n }\n static _MoveCursorWithinIf(cursor, rootNode, ifNode) {\n let line = cursor.currentLine;\n while (this._MoveCursor(cursor, ifNode)) {\n line = cursor.currentLine;\n const first5 = line.substring(0, 5).toLowerCase();\n if (first5 === \"#else\") {\n const elseNode = new ShaderCodeNode();\n rootNode.children.push(elseNode);\n this._MoveCursor(cursor, elseNode);\n return;\n }\n else if (first5 === \"#elif\") {\n const elifNode = this._BuildExpression(line, 5);\n rootNode.children.push(elifNode);\n ifNode = elifNode;\n }\n }\n }\n static _MoveCursor(cursor, rootNode) {\n while (cursor.canRead) {\n cursor.lineIndex++;\n const line = cursor.currentLine;\n if (line.indexOf(\"#\") >= 0) {\n const matches = ShaderProcessor._MoveCursorRegex.exec(line);\n if (matches && matches.length) {\n const keyword = matches[0];\n switch (keyword) {\n case \"#ifdef\": {\n const newRootNode = new ShaderCodeConditionNode();\n rootNode.children.push(newRootNode);\n const ifNode = this._BuildExpression(line, 6);\n newRootNode.children.push(ifNode);\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\n break;\n }\n case \"#else\":\n case \"#elif\":\n return true;\n case \"#endif\":\n return false;\n case \"#ifndef\": {\n const newRootNode = new ShaderCodeConditionNode();\n rootNode.children.push(newRootNode);\n const ifNode = this._BuildExpression(line, 7);\n newRootNode.children.push(ifNode);\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\n break;\n }\n case \"#if\": {\n const newRootNode = new ShaderCodeConditionNode();\n const ifNode = this._BuildExpression(line, 3);\n rootNode.children.push(newRootNode);\n newRootNode.children.push(ifNode);\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\n break;\n }\n }\n continue;\n }\n }\n const newNode = new ShaderCodeNode();\n newNode.line = line;\n rootNode.children.push(newNode);\n // Detect additional defines\n if (line[0] === \"#\" && line[1] === \"d\") {\n const split = line.replace(\";\", \"\").split(\" \");\n newNode.additionalDefineKey = split[1];\n if (split.length === 3) {\n newNode.additionalDefineValue = split[2];\n }\n }\n }\n return false;\n }\n static _EvaluatePreProcessors(sourceCode, preprocessors, options) {\n const rootNode = new ShaderCodeNode();\n const cursor = new ShaderCodeCursor();\n cursor.lineIndex = -1;\n cursor.lines = sourceCode.split(\"\\n\");\n // Decompose (We keep it in 2 steps so it is easier to maintain and perf hit is insignificant)\n this._MoveCursor(cursor, rootNode);\n // Recompose\n return rootNode.process(preprocessors, options);\n }\n static _PreparePreProcessors(options, engine) {\n var _a;\n const defines = options.defines;\n const preprocessors = {};\n for (const define of defines) {\n const keyValue = define.replace(\"#define\", \"\").replace(\";\", \"\").trim();\n const split = keyValue.split(\" \");\n preprocessors[split[0]] = split.length > 1 ? split[1] : \"\";\n }\n if (((_a = options.processor) === null || _a === void 0 ? void 0 : _a.shaderLanguage) === ShaderLanguage.GLSL) {\n preprocessors[\"GL_ES\"] = \"true\";\n }\n preprocessors[\"__VERSION__\"] = options.version;\n preprocessors[options.platformName] = \"true\";\n engine._getGlobalDefines(preprocessors);\n return preprocessors;\n }\n static _ProcessShaderConversion(sourceCode, options, engine) {\n let preparedSourceCode = this._ProcessPrecision(sourceCode, options);\n if (!options.processor) {\n return preparedSourceCode;\n }\n // Already converted\n if (options.processor.shaderLanguage === ShaderLanguage.GLSL && preparedSourceCode.indexOf(\"#version 3\") !== -1) {\n preparedSourceCode = preparedSourceCode.replace(\"#version 300 es\", \"\");\n if (!options.processor.parseGLES3) {\n return preparedSourceCode;\n }\n }\n const defines = options.defines;\n const preprocessors = this._PreparePreProcessors(options, engine);\n // General pre processing\n if (options.processor.preProcessor) {\n preparedSourceCode = options.processor.preProcessor(preparedSourceCode, defines, options.isFragment, options.processingContext);\n }\n preparedSourceCode = this._EvaluatePreProcessors(preparedSourceCode, preprocessors, options);\n // Post processing\n if (options.processor.postProcessor) {\n preparedSourceCode = options.processor.postProcessor(preparedSourceCode, defines, options.isFragment, options.processingContext, engine);\n }\n // Inline functions tagged with #define inline\n if (engine._features.needShaderCodeInlining) {\n preparedSourceCode = engine.inlineShaderCode(preparedSourceCode);\n }\n return preparedSourceCode;\n }\n static _ApplyPreProcessing(sourceCode, options, engine) {\n var _a, _b;\n let preparedSourceCode = sourceCode;\n const defines = options.defines;\n const preprocessors = this._PreparePreProcessors(options, engine);\n // General pre processing\n if ((_a = options.processor) === null || _a === void 0 ? void 0 : _a.preProcessor) {\n preparedSourceCode = options.processor.preProcessor(preparedSourceCode, defines, options.isFragment, options.processingContext);\n }\n preparedSourceCode = this._EvaluatePreProcessors(preparedSourceCode, preprocessors, options);\n // Post processing\n if ((_b = options.processor) === null || _b === void 0 ? void 0 : _b.postProcessor) {\n preparedSourceCode = options.processor.postProcessor(preparedSourceCode, defines, options.isFragment, options.processingContext, engine);\n }\n // Inline functions tagged with #define inline\n if (engine._features.needShaderCodeInlining) {\n preparedSourceCode = engine.inlineShaderCode(preparedSourceCode);\n }\n return preparedSourceCode;\n }\n /** @internal */\n static _ProcessIncludes(sourceCode, options, callback) {\n reusableMatches.length = 0;\n let match;\n // stay back-compat to the old matchAll syntax\n while ((match = regexShaderInclude.exec(sourceCode)) !== null) {\n reusableMatches.push(match);\n }\n let returnValue = String(sourceCode);\n let parts = [sourceCode];\n let keepProcessing = false;\n for (const match of reusableMatches) {\n let includeFile = match[1];\n // Uniform declaration\n if (includeFile.indexOf(\"__decl__\") !== -1) {\n includeFile = includeFile.replace(regexShaderDecl, \"\");\n if (options.supportsUniformBuffers) {\n includeFile = includeFile.replace(\"Vertex\", \"Ubo\").replace(\"Fragment\", \"Ubo\");\n }\n includeFile = includeFile + \"Declaration\";\n }\n if (options.includesShadersStore[includeFile]) {\n // Substitution\n let includeContent = options.includesShadersStore[includeFile];\n if (match[2]) {\n const splits = match[3].split(\",\");\n for (let index = 0; index < splits.length; index += 2) {\n const source = new RegExp(splits[index], \"g\");\n const dest = splits[index + 1];\n includeContent = includeContent.replace(source, dest);\n }\n }\n if (match[4]) {\n const indexString = match[5];\n if (indexString.indexOf(\"..\") !== -1) {\n const indexSplits = indexString.split(\"..\");\n const minIndex = parseInt(indexSplits[0]);\n let maxIndex = parseInt(indexSplits[1]);\n let sourceIncludeContent = includeContent.slice(0);\n includeContent = \"\";\n if (isNaN(maxIndex)) {\n maxIndex = options.indexParameters[indexSplits[1]];\n }\n for (let i = minIndex; i < maxIndex; i++) {\n if (!options.supportsUniformBuffers) {\n // Ubo replacement\n sourceIncludeContent = sourceIncludeContent.replace(regexLightX, (str, p1) => {\n return p1 + \"{X}\";\n });\n }\n includeContent += sourceIncludeContent.replace(regexX, i.toString()) + \"\\n\";\n }\n }\n else {\n if (!options.supportsUniformBuffers) {\n // Ubo replacement\n includeContent = includeContent.replace(regexLightX, (str, p1) => {\n return p1 + \"{X}\";\n });\n }\n includeContent = includeContent.replace(regexX, indexString);\n }\n }\n // Replace\n // Split all parts on match[0] and intersperse the parts with the include content\n const newParts = [];\n for (const part of parts) {\n const splitPart = part.split(match[0]);\n for (let i = 0; i < splitPart.length - 1; i++) {\n newParts.push(splitPart[i]);\n newParts.push(includeContent);\n }\n newParts.push(splitPart[splitPart.length - 1]);\n }\n parts = newParts;\n keepProcessing = keepProcessing || includeContent.indexOf(\"#include<\") >= 0 || includeContent.indexOf(\"#include <\") >= 0;\n }\n else {\n const includeShaderUrl = options.shadersRepository + \"ShadersInclude/\" + includeFile + \".fx\";\n ShaderProcessor._FileToolsLoadFile(includeShaderUrl, (fileContent) => {\n options.includesShadersStore[includeFile] = fileContent;\n this._ProcessIncludes(parts.join(\"\"), options, callback);\n });\n return;\n }\n }\n reusableMatches.length = 0;\n returnValue = parts.join(\"\");\n if (keepProcessing) {\n this._ProcessIncludes(returnValue.toString(), options, callback);\n }\n else {\n callback(returnValue);\n }\n }\n /**\n * Loads a file from a url\n * @param url url to load\n * @param onSuccess callback called when the file successfully loads\n * @param onProgress callback called while file is loading (if the server supports this mode)\n * @param offlineProvider defines the offline provider for caching\n * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer\n * @param onError callback called when the file fails to load\n * @returns a file request object\n * @internal\n */\n static _FileToolsLoadFile(url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError) {\n throw _WarnImport(\"FileTools\");\n }\n}\nShaderProcessor._MoveCursorRegex = /(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/;\n//# sourceMappingURL=shaderProcessor.js.map","import { ShaderLanguage } from \"../Materials/shaderLanguage.js\";\n/**\n * Defines the shader related stores and directory\n */\nexport class ShaderStore {\n /**\n * Gets the shaders repository path for a given shader language\n * @param shaderLanguage the shader language\n * @returns the path to the shaders repository\n */\n static GetShadersRepository(shaderLanguage = ShaderLanguage.GLSL) {\n return shaderLanguage === ShaderLanguage.GLSL ? ShaderStore.ShadersRepository : ShaderStore.ShadersRepositoryWGSL;\n }\n /**\n * Gets the shaders store of a given shader language\n * @param shaderLanguage the shader language\n * @returns the shaders store\n */\n static GetShadersStore(shaderLanguage = ShaderLanguage.GLSL) {\n return shaderLanguage === ShaderLanguage.GLSL ? ShaderStore.ShadersStore : ShaderStore.ShadersStoreWGSL;\n }\n /**\n * Gets the include shaders store of a given shader language\n * @param shaderLanguage the shader language\n * @returns the include shaders store\n */\n static GetIncludesShadersStore(shaderLanguage = ShaderLanguage.GLSL) {\n return shaderLanguage === ShaderLanguage.GLSL ? ShaderStore.IncludesShadersStore : ShaderStore.IncludesShadersStoreWGSL;\n }\n}\n/**\n * Gets or sets the relative url used to load shaders if using the engine in non-minified mode\n */\nShaderStore.ShadersRepository = \"src/Shaders/\";\n/**\n * Store of each shader (The can be looked up using effect.key)\n */\nShaderStore.ShadersStore = {};\n/**\n * Store of each included file for a shader (The can be looked up using effect.key)\n */\nShaderStore.IncludesShadersStore = {};\n/**\n * Gets or sets the relative url used to load shaders (WGSL) if using the engine in non-minified mode\n */\nShaderStore.ShadersRepositoryWGSL = \"src/ShadersWGSL/\";\n/**\n * Store of each shader (WGSL)\n */\nShaderStore.ShadersStoreWGSL = {};\n/**\n * Store of each included file for a shader (WGSL)\n */\nShaderStore.IncludesShadersStoreWGSL = {};\n//# sourceMappingURL=shaderStore.js.map","import { Observable } from \"../Misc/observable.js\";\n\nimport { GetDOMTextContent, IsWindowObjectExist } from \"../Misc/domManagement.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { ShaderProcessor } from \"../Engines/Processors/shaderProcessor.js\";\nimport { ShaderStore as EngineShaderStore } from \"../Engines/shaderStore.js\";\nimport { ShaderLanguage } from \"./shaderLanguage.js\";\n/**\n * Effect containing vertex and fragment shader that can be executed on an object.\n */\nexport class Effect {\n /**\n * Gets or sets the relative url used to load shaders if using the engine in non-minified mode\n */\n static get ShadersRepository() {\n return EngineShaderStore.ShadersRepository;\n }\n static set ShadersRepository(repo) {\n EngineShaderStore.ShadersRepository = repo;\n }\n /**\n * Observable that will be called when effect is bound.\n */\n get onBindObservable() {\n if (!this._onBindObservable) {\n this._onBindObservable = new Observable();\n }\n return this._onBindObservable;\n }\n /**\n * Instantiates an effect.\n * An effect can be used to create/manage/execute vertex and fragment shaders.\n * @param baseName Name of the effect.\n * @param attributesNamesOrOptions List of attribute names that will be passed to the shader or set of all options to create the effect.\n * @param uniformsNamesOrEngine List of uniform variable names that will be passed to the shader or the engine that will be used to render effect.\n * @param samplers List of sampler variables that will be passed to the shader.\n * @param engine Engine to be used to render the effect\n * @param defines Define statements to be added to the shader.\n * @param fallbacks Possible fallbacks for this effect to improve performance when needed.\n * @param onCompiled Callback that will be called when the shader is compiled.\n * @param onError Callback that will be called if an error occurs during shader compilation.\n * @param indexParameters Parameters to be used with Babylons include syntax to iterate over an array (eg. \\{lights: 10\\})\n * @param key Effect Key identifying uniquely compiled shader variants\n * @param shaderLanguage the language the shader is written in (default: GLSL)\n */\n constructor(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers = null, engine, defines = null, fallbacks = null, onCompiled = null, onError = null, indexParameters, key = \"\", shaderLanguage = ShaderLanguage.GLSL) {\n var _a, _b, _c;\n /**\n * Name of the effect.\n */\n this.name = null;\n /**\n * String container all the define statements that should be set on the shader.\n */\n this.defines = \"\";\n /**\n * Callback that will be called when the shader is compiled.\n */\n this.onCompiled = null;\n /**\n * Callback that will be called if an error occurs during shader compilation.\n */\n this.onError = null;\n /**\n * Callback that will be called when effect is bound.\n */\n this.onBind = null;\n /**\n * Unique ID of the effect.\n */\n this.uniqueId = 0;\n /**\n * Observable that will be called when the shader is compiled.\n * It is recommended to use executeWhenCompile() or to make sure that scene.isReady() is called to get this observable raised.\n */\n this.onCompileObservable = new Observable();\n /**\n * Observable that will be called if an error occurs during shader compilation.\n */\n this.onErrorObservable = new Observable();\n /** @internal */\n this._onBindObservable = null;\n /**\n * @internal\n * Specifies if the effect was previously ready\n */\n this._wasPreviouslyReady = false;\n /**\n * @internal\n * Forces the code from bindForSubMesh to be fully run the next time it is called\n * It is used in frozen mode to make sure the effect is properly rebound when a new effect is created\n */\n this._forceRebindOnNextCall = false;\n /**\n * @internal\n * Specifies if the effect was previously using instances\n */\n this._wasPreviouslyUsingInstances = null;\n this._isDisposed = false;\n /** @internal */\n this._bonesComputationForcedToCPU = false;\n /** @internal */\n this._uniformBuffersNames = {};\n /** @internal */\n this._multiTarget = false;\n this._samplers = {};\n this._isReady = false;\n this._compilationError = \"\";\n this._allFallbacksProcessed = false;\n this._uniforms = {};\n /**\n * Key for the effect.\n * @internal\n */\n this._key = \"\";\n this._fallbacks = null;\n this._vertexSourceCodeOverride = \"\";\n this._fragmentSourceCodeOverride = \"\";\n this._transformFeedbackVaryings = null;\n /**\n * Compiled shader to webGL program.\n * @internal\n */\n this._pipelineContext = null;\n /** @internal */\n this._vertexSourceCode = \"\";\n /** @internal */\n this._fragmentSourceCode = \"\";\n /** @internal */\n this._vertexSourceCodeBeforeMigration = \"\";\n /** @internal */\n this._fragmentSourceCodeBeforeMigration = \"\";\n /** @internal */\n this._rawVertexSourceCode = \"\";\n /** @internal */\n this._rawFragmentSourceCode = \"\";\n this._processCodeAfterIncludes = undefined;\n this._processFinalCode = null;\n this.name = baseName;\n this._key = key;\n if (attributesNamesOrOptions.attributes) {\n const options = attributesNamesOrOptions;\n this._engine = uniformsNamesOrEngine;\n this._attributesNames = options.attributes;\n this._uniformsNames = options.uniformsNames.concat(options.samplers);\n this._samplerList = options.samplers.slice();\n this.defines = options.defines;\n this.onError = options.onError;\n this.onCompiled = options.onCompiled;\n this._fallbacks = options.fallbacks;\n this._indexParameters = options.indexParameters;\n this._transformFeedbackVaryings = options.transformFeedbackVaryings || null;\n this._multiTarget = !!options.multiTarget;\n this._shaderLanguage = (_a = options.shaderLanguage) !== null && _a !== void 0 ? _a : ShaderLanguage.GLSL;\n if (options.uniformBuffersNames) {\n this._uniformBuffersNamesList = options.uniformBuffersNames.slice();\n for (let i = 0; i < options.uniformBuffersNames.length; i++) {\n this._uniformBuffersNames[options.uniformBuffersNames[i]] = i;\n }\n }\n this._processFinalCode = (_b = options.processFinalCode) !== null && _b !== void 0 ? _b : null;\n this._processCodeAfterIncludes = (_c = options.processCodeAfterIncludes) !== null && _c !== void 0 ? _c : undefined;\n }\n else {\n this._engine = engine;\n this.defines = defines == null ? \"\" : defines;\n this._uniformsNames = uniformsNamesOrEngine.concat(samplers);\n this._samplerList = samplers ? samplers.slice() : [];\n this._attributesNames = attributesNamesOrOptions;\n this._uniformBuffersNamesList = [];\n this._shaderLanguage = shaderLanguage;\n this.onError = onError;\n this.onCompiled = onCompiled;\n this._indexParameters = indexParameters;\n this._fallbacks = fallbacks;\n }\n this._attributeLocationByName = {};\n this.uniqueId = Effect._UniqueIdSeed++;\n this._processShaderCode();\n }\n /** @internal */\n _processShaderCode(shaderProcessor = null, keepExistingPipelineContext = false) {\n let vertexSource;\n let fragmentSource;\n const baseName = this.name;\n const hostDocument = IsWindowObjectExist() ? this._engine.getHostDocument() : null;\n if (baseName.vertexSource) {\n vertexSource = \"source:\" + baseName.vertexSource;\n }\n else if (baseName.vertexElement) {\n vertexSource = hostDocument ? hostDocument.getElementById(baseName.vertexElement) : null;\n if (!vertexSource) {\n vertexSource = baseName.vertexElement;\n }\n }\n else {\n vertexSource = baseName.vertex || baseName;\n }\n if (baseName.fragmentSource) {\n fragmentSource = \"source:\" + baseName.fragmentSource;\n }\n else if (baseName.fragmentElement) {\n fragmentSource = hostDocument ? hostDocument.getElementById(baseName.fragmentElement) : null;\n if (!fragmentSource) {\n fragmentSource = baseName.fragmentElement;\n }\n }\n else {\n fragmentSource = baseName.fragment || baseName;\n }\n this._processingContext = this._engine._getShaderProcessingContext(this._shaderLanguage);\n let processorOptions = {\n defines: this.defines.split(\"\\n\"),\n indexParameters: this._indexParameters,\n isFragment: false,\n shouldUseHighPrecisionShader: this._engine._shouldUseHighPrecisionShader,\n processor: shaderProcessor !== null && shaderProcessor !== void 0 ? shaderProcessor : this._engine._getShaderProcessor(this._shaderLanguage),\n supportsUniformBuffers: this._engine.supportsUniformBuffers,\n shadersRepository: EngineShaderStore.GetShadersRepository(this._shaderLanguage),\n includesShadersStore: EngineShaderStore.GetIncludesShadersStore(this._shaderLanguage),\n version: (this._engine.version * 100).toString(),\n platformName: this._engine.shaderPlatformName,\n processingContext: this._processingContext,\n isNDCHalfZRange: this._engine.isNDCHalfZRange,\n useReverseDepthBuffer: this._engine.useReverseDepthBuffer,\n processCodeAfterIncludes: this._processCodeAfterIncludes,\n };\n const shaderCodes = [undefined, undefined];\n const shadersLoaded = () => {\n if (shaderCodes[0] && shaderCodes[1]) {\n processorOptions.isFragment = true;\n const [migratedVertexCode, fragmentCode] = shaderCodes;\n ShaderProcessor.Process(fragmentCode, processorOptions, (migratedFragmentCode, codeBeforeMigration) => {\n this._fragmentSourceCodeBeforeMigration = codeBeforeMigration;\n if (this._processFinalCode) {\n migratedFragmentCode = this._processFinalCode(\"fragment\", migratedFragmentCode);\n }\n const finalShaders = ShaderProcessor.Finalize(migratedVertexCode, migratedFragmentCode, processorOptions);\n processorOptions = null;\n this._useFinalCode(finalShaders.vertexCode, finalShaders.fragmentCode, baseName, keepExistingPipelineContext);\n }, this._engine);\n }\n };\n this._loadShader(vertexSource, \"Vertex\", \"\", (vertexCode) => {\n ShaderProcessor.Initialize(processorOptions);\n ShaderProcessor.Process(vertexCode, processorOptions, (migratedVertexCode, codeBeforeMigration) => {\n this._rawVertexSourceCode = vertexCode;\n this._vertexSourceCodeBeforeMigration = codeBeforeMigration;\n if (this._processFinalCode) {\n migratedVertexCode = this._processFinalCode(\"vertex\", migratedVertexCode);\n }\n shaderCodes[0] = migratedVertexCode;\n shadersLoaded();\n }, this._engine);\n });\n this._loadShader(fragmentSource, \"Fragment\", \"Pixel\", (fragmentCode) => {\n this._rawFragmentSourceCode = fragmentCode;\n shaderCodes[1] = fragmentCode;\n shadersLoaded();\n });\n }\n _useFinalCode(migratedVertexCode, migratedFragmentCode, baseName, keepExistingPipelineContext = false) {\n if (baseName) {\n const vertex = baseName.vertexElement || baseName.vertex || baseName.spectorName || baseName;\n const fragment = baseName.fragmentElement || baseName.fragment || baseName.spectorName || baseName;\n this._vertexSourceCode = (this._shaderLanguage === ShaderLanguage.WGSL ? \"//\" : \"\") + \"#define SHADER_NAME vertex:\" + vertex + \"\\n\" + migratedVertexCode;\n this._fragmentSourceCode = (this._shaderLanguage === ShaderLanguage.WGSL ? \"//\" : \"\") + \"#define SHADER_NAME fragment:\" + fragment + \"\\n\" + migratedFragmentCode;\n }\n else {\n this._vertexSourceCode = migratedVertexCode;\n this._fragmentSourceCode = migratedFragmentCode;\n }\n this._prepareEffect(keepExistingPipelineContext);\n }\n /**\n * Unique key for this effect\n */\n get key() {\n return this._key;\n }\n /**\n * If the effect has been compiled and prepared.\n * @returns if the effect is compiled and prepared.\n */\n isReady() {\n try {\n return this._isReadyInternal();\n }\n catch (_a) {\n return false;\n }\n }\n _isReadyInternal() {\n if (this._isReady) {\n return true;\n }\n if (this._pipelineContext) {\n return this._pipelineContext.isReady;\n }\n return false;\n }\n /**\n * The engine the effect was initialized with.\n * @returns the engine.\n */\n getEngine() {\n return this._engine;\n }\n /**\n * The pipeline context for this effect\n * @returns the associated pipeline context\n */\n getPipelineContext() {\n return this._pipelineContext;\n }\n /**\n * The set of names of attribute variables for the shader.\n * @returns An array of attribute names.\n */\n getAttributesNames() {\n return this._attributesNames;\n }\n /**\n * Returns the attribute at the given index.\n * @param index The index of the attribute.\n * @returns The location of the attribute.\n */\n getAttributeLocation(index) {\n return this._attributes[index];\n }\n /**\n * Returns the attribute based on the name of the variable.\n * @param name of the attribute to look up.\n * @returns the attribute location.\n */\n getAttributeLocationByName(name) {\n return this._attributeLocationByName[name];\n }\n /**\n * The number of attributes.\n * @returns the number of attributes.\n */\n getAttributesCount() {\n return this._attributes.length;\n }\n /**\n * Gets the index of a uniform variable.\n * @param uniformName of the uniform to look up.\n * @returns the index.\n */\n getUniformIndex(uniformName) {\n return this._uniformsNames.indexOf(uniformName);\n }\n /**\n * Returns the attribute based on the name of the variable.\n * @param uniformName of the uniform to look up.\n * @returns the location of the uniform.\n */\n getUniform(uniformName) {\n return this._uniforms[uniformName];\n }\n /**\n * Returns an array of sampler variable names\n * @returns The array of sampler variable names.\n */\n getSamplers() {\n return this._samplerList;\n }\n /**\n * Returns an array of uniform variable names\n * @returns The array of uniform variable names.\n */\n getUniformNames() {\n return this._uniformsNames;\n }\n /**\n * Returns an array of uniform buffer variable names\n * @returns The array of uniform buffer variable names.\n */\n getUniformBuffersNames() {\n return this._uniformBuffersNamesList;\n }\n /**\n * Returns the index parameters used to create the effect\n * @returns The index parameters object\n */\n getIndexParameters() {\n return this._indexParameters;\n }\n /**\n * The error from the last compilation.\n * @returns the error string.\n */\n getCompilationError() {\n return this._compilationError;\n }\n /**\n * Gets a boolean indicating that all fallbacks were used during compilation\n * @returns true if all fallbacks were used\n */\n allFallbacksProcessed() {\n return this._allFallbacksProcessed;\n }\n /**\n * Adds a callback to the onCompiled observable and call the callback immediately if already ready.\n * @param func The callback to be used.\n */\n executeWhenCompiled(func) {\n if (this.isReady()) {\n func(this);\n return;\n }\n this.onCompileObservable.add((effect) => {\n func(effect);\n });\n if (!this._pipelineContext || this._pipelineContext.isAsync) {\n setTimeout(() => {\n this._checkIsReady(null);\n }, 16);\n }\n }\n _checkIsReady(previousPipelineContext) {\n try {\n if (this._isReadyInternal()) {\n return;\n }\n }\n catch (e) {\n this._processCompilationErrors(e, previousPipelineContext);\n return;\n }\n if (this._isDisposed) {\n return;\n }\n setTimeout(() => {\n this._checkIsReady(previousPipelineContext);\n }, 16);\n }\n _loadShader(shader, key, optionalKey, callback) {\n if (typeof HTMLElement !== \"undefined\") {\n // DOM element ?\n if (shader instanceof HTMLElement) {\n const shaderCode = GetDOMTextContent(shader);\n callback(shaderCode);\n return;\n }\n }\n // Direct source ?\n if (shader.substr(0, 7) === \"source:\") {\n callback(shader.substr(7));\n return;\n }\n // Base64 encoded ?\n if (shader.substr(0, 7) === \"base64:\") {\n const shaderBinary = window.atob(shader.substr(7));\n callback(shaderBinary);\n return;\n }\n const shaderStore = EngineShaderStore.GetShadersStore(this._shaderLanguage);\n // Is in local store ?\n if (shaderStore[shader + key + \"Shader\"]) {\n callback(shaderStore[shader + key + \"Shader\"]);\n return;\n }\n if (optionalKey && shaderStore[shader + optionalKey + \"Shader\"]) {\n callback(shaderStore[shader + optionalKey + \"Shader\"]);\n return;\n }\n let shaderUrl;\n if (shader[0] === \".\" || shader[0] === \"/\" || shader.indexOf(\"http\") > -1) {\n shaderUrl = shader;\n }\n else {\n shaderUrl = EngineShaderStore.GetShadersRepository(this._shaderLanguage) + shader;\n }\n // Vertex shader\n this._engine._loadFile(shaderUrl + \".\" + key.toLowerCase() + \".fx\", callback);\n }\n /**\n * Gets the vertex shader source code of this effect\n * This is the final source code that will be compiled, after all the processing has been done (pre-processing applied, code injection/replacement, etc)\n */\n get vertexSourceCode() {\n var _a, _b;\n return this._vertexSourceCodeOverride && this._fragmentSourceCodeOverride\n ? this._vertexSourceCodeOverride\n : (_b = (_a = this._pipelineContext) === null || _a === void 0 ? void 0 : _a._getVertexShaderCode()) !== null && _b !== void 0 ? _b : this._vertexSourceCode;\n }\n /**\n * Gets the fragment shader source code of this effect\n * This is the final source code that will be compiled, after all the processing has been done (pre-processing applied, code injection/replacement, etc)\n */\n get fragmentSourceCode() {\n var _a, _b;\n return this._vertexSourceCodeOverride && this._fragmentSourceCodeOverride\n ? this._fragmentSourceCodeOverride\n : (_b = (_a = this._pipelineContext) === null || _a === void 0 ? void 0 : _a._getFragmentShaderCode()) !== null && _b !== void 0 ? _b : this._fragmentSourceCode;\n }\n /**\n * Gets the vertex shader source code before migration.\n * This is the source code after the include directives have been replaced by their contents but before the code is migrated, i.e. before ShaderProcess._ProcessShaderConversion is executed.\n * This method is, among other things, responsible for parsing #if/#define directives as well as converting GLES2 syntax to GLES3 (in the case of WebGL).\n */\n get vertexSourceCodeBeforeMigration() {\n return this._vertexSourceCodeBeforeMigration;\n }\n /**\n * Gets the fragment shader source code before migration.\n * This is the source code after the include directives have been replaced by their contents but before the code is migrated, i.e. before ShaderProcess._ProcessShaderConversion is executed.\n * This method is, among other things, responsible for parsing #if/#define directives as well as converting GLES2 syntax to GLES3 (in the case of WebGL).\n */\n get fragmentSourceCodeBeforeMigration() {\n return this._fragmentSourceCodeBeforeMigration;\n }\n /**\n * Gets the vertex shader source code before it has been modified by any processing\n */\n get rawVertexSourceCode() {\n return this._rawVertexSourceCode;\n }\n /**\n * Gets the fragment shader source code before it has been modified by any processing\n */\n get rawFragmentSourceCode() {\n return this._rawFragmentSourceCode;\n }\n /**\n * Recompiles the webGL program\n * @param vertexSourceCode The source code for the vertex shader.\n * @param fragmentSourceCode The source code for the fragment shader.\n * @param onCompiled Callback called when completed.\n * @param onError Callback called on error.\n * @internal\n */\n _rebuildProgram(vertexSourceCode, fragmentSourceCode, onCompiled, onError) {\n this._isReady = false;\n this._vertexSourceCodeOverride = vertexSourceCode;\n this._fragmentSourceCodeOverride = fragmentSourceCode;\n this.onError = (effect, error) => {\n if (onError) {\n onError(error);\n }\n };\n this.onCompiled = () => {\n const scenes = this.getEngine().scenes;\n if (scenes) {\n for (let i = 0; i < scenes.length; i++) {\n scenes[i].markAllMaterialsAsDirty(63);\n }\n }\n this._pipelineContext._handlesSpectorRebuildCallback(onCompiled);\n };\n this._fallbacks = null;\n this._prepareEffect();\n }\n /**\n * Prepares the effect\n * @internal\n */\n _prepareEffect(keepExistingPipelineContext = false) {\n var _a;\n const attributesNames = this._attributesNames;\n const defines = this.defines;\n const previousPipelineContext = this._pipelineContext;\n this._isReady = false;\n try {\n const engine = this._engine;\n this._pipelineContext = (_a = (keepExistingPipelineContext ? previousPipelineContext : undefined)) !== null && _a !== void 0 ? _a : engine.createPipelineContext(this._processingContext);\n this._pipelineContext._name = this._key.replace(/\\r/g, \"\").replace(/\\n/g, \"|\");\n const rebuildRebind = (vertexSourceCode, fragmentSourceCode, onCompiled, onError) => this._rebuildProgram(vertexSourceCode, fragmentSourceCode, onCompiled, onError);\n if (this._vertexSourceCodeOverride && this._fragmentSourceCodeOverride) {\n engine._preparePipelineContext(this._pipelineContext, this._vertexSourceCodeOverride, this._fragmentSourceCodeOverride, true, this._rawVertexSourceCode, this._rawFragmentSourceCode, rebuildRebind, null, this._transformFeedbackVaryings, this._key);\n }\n else {\n engine._preparePipelineContext(this._pipelineContext, this._vertexSourceCode, this._fragmentSourceCode, false, this._rawVertexSourceCode, this._rawFragmentSourceCode, rebuildRebind, defines, this._transformFeedbackVaryings, this._key);\n }\n engine._executeWhenRenderingStateIsCompiled(this._pipelineContext, () => {\n this._attributes = [];\n this._pipelineContext._fillEffectInformation(this, this._uniformBuffersNames, this._uniformsNames, this._uniforms, this._samplerList, this._samplers, attributesNames, this._attributes);\n // Caches attribute locations.\n if (attributesNames) {\n for (let i = 0; i < attributesNames.length; i++) {\n const name = attributesNames[i];\n this._attributeLocationByName[name] = this._attributes[i];\n }\n }\n engine.bindSamplers(this);\n this._compilationError = \"\";\n this._isReady = true;\n if (this.onCompiled) {\n this.onCompiled(this);\n }\n this.onCompileObservable.notifyObservers(this);\n this.onCompileObservable.clear();\n // Unbind mesh reference in fallbacks\n if (this._fallbacks) {\n this._fallbacks.unBindMesh();\n }\n if (previousPipelineContext && !keepExistingPipelineContext) {\n this.getEngine()._deletePipelineContext(previousPipelineContext);\n }\n });\n if (this._pipelineContext.isAsync) {\n this._checkIsReady(previousPipelineContext);\n }\n }\n catch (e) {\n this._processCompilationErrors(e, previousPipelineContext);\n }\n }\n _getShaderCodeAndErrorLine(code, error, isFragment) {\n const regexp = isFragment ? /FRAGMENT SHADER ERROR: 0:(\\d+?):/ : /VERTEX SHADER ERROR: 0:(\\d+?):/;\n let errorLine = null;\n if (error && code) {\n const res = error.match(regexp);\n if (res && res.length === 2) {\n const lineNumber = parseInt(res[1]);\n const lines = code.split(\"\\n\", -1);\n if (lines.length >= lineNumber) {\n errorLine = `Offending line [${lineNumber}] in ${isFragment ? \"fragment\" : \"vertex\"} code: ${lines[lineNumber - 1]}`;\n }\n }\n }\n return [code, errorLine];\n }\n _processCompilationErrors(e, previousPipelineContext = null) {\n var _a, _b, _c;\n this._compilationError = e.message;\n const attributesNames = this._attributesNames;\n const fallbacks = this._fallbacks;\n // Let's go through fallbacks then\n Logger.Error(\"Unable to compile effect:\");\n Logger.Error(\"Uniforms: \" +\n this._uniformsNames.map(function (uniform) {\n return \" \" + uniform;\n }));\n Logger.Error(\"Attributes: \" +\n attributesNames.map(function (attribute) {\n return \" \" + attribute;\n }));\n Logger.Error(\"Defines:\\n\" + this.defines);\n if (Effect.LogShaderCodeOnCompilationError) {\n let lineErrorVertex = null, lineErrorFragment = null, code = null;\n if ((_a = this._pipelineContext) === null || _a === void 0 ? void 0 : _a._getVertexShaderCode()) {\n [code, lineErrorVertex] = this._getShaderCodeAndErrorLine(this._pipelineContext._getVertexShaderCode(), this._compilationError, false);\n if (code) {\n Logger.Error(\"Vertex code:\");\n Logger.Error(code);\n }\n }\n if ((_b = this._pipelineContext) === null || _b === void 0 ? void 0 : _b._getFragmentShaderCode()) {\n [code, lineErrorFragment] = this._getShaderCodeAndErrorLine((_c = this._pipelineContext) === null || _c === void 0 ? void 0 : _c._getFragmentShaderCode(), this._compilationError, true);\n if (code) {\n Logger.Error(\"Fragment code:\");\n Logger.Error(code);\n }\n }\n if (lineErrorVertex) {\n Logger.Error(lineErrorVertex);\n }\n if (lineErrorFragment) {\n Logger.Error(lineErrorFragment);\n }\n }\n Logger.Error(\"Error: \" + this._compilationError);\n const notifyErrors = () => {\n if (this.onError) {\n this.onError(this, this._compilationError);\n }\n this.onErrorObservable.notifyObservers(this);\n };\n // In case a previous compilation was successful, we need to restore the previous pipeline context\n if (previousPipelineContext) {\n this._pipelineContext = previousPipelineContext;\n this._isReady = true;\n notifyErrors();\n }\n // Lets try to compile fallbacks as long as we have some.\n if (fallbacks) {\n this._pipelineContext = null;\n if (fallbacks.hasMoreFallbacks) {\n this._allFallbacksProcessed = false;\n Logger.Error(\"Trying next fallback.\");\n this.defines = fallbacks.reduce(this.defines, this);\n this._prepareEffect();\n }\n else {\n // Sorry we did everything we can\n this._allFallbacksProcessed = true;\n notifyErrors();\n this.onErrorObservable.clear();\n // Unbind mesh reference in fallbacks\n if (this._fallbacks) {\n this._fallbacks.unBindMesh();\n }\n }\n }\n else {\n this._allFallbacksProcessed = true;\n // In case of error, without any prior successful compilation, let s notify observers\n if (!previousPipelineContext) {\n notifyErrors();\n }\n }\n }\n /**\n * Checks if the effect is supported. (Must be called after compilation)\n */\n get isSupported() {\n return this._compilationError === \"\";\n }\n /**\n * Binds a texture to the engine to be used as output of the shader.\n * @param channel Name of the output variable.\n * @param texture Texture to bind.\n * @internal\n */\n _bindTexture(channel, texture) {\n this._engine._bindTexture(this._samplers[channel], texture, channel);\n }\n /**\n * Sets a texture on the engine to be used in the shader.\n * @param channel Name of the sampler variable.\n * @param texture Texture to set.\n */\n setTexture(channel, texture) {\n this._engine.setTexture(this._samplers[channel], this._uniforms[channel], texture, channel);\n }\n /**\n * Sets a depth stencil texture from a render target on the engine to be used in the shader.\n * @param channel Name of the sampler variable.\n * @param texture Texture to set.\n */\n setDepthStencilTexture(channel, texture) {\n this._engine.setDepthStencilTexture(this._samplers[channel], this._uniforms[channel], texture, channel);\n }\n /**\n * Sets an array of textures on the engine to be used in the shader.\n * @param channel Name of the variable.\n * @param textures Textures to set.\n */\n setTextureArray(channel, textures) {\n const exName = channel + \"Ex\";\n if (this._samplerList.indexOf(exName + \"0\") === -1) {\n const initialPos = this._samplerList.indexOf(channel);\n for (let index = 1; index < textures.length; index++) {\n const currentExName = exName + (index - 1).toString();\n this._samplerList.splice(initialPos + index, 0, currentExName);\n }\n // Reset every channels\n let channelIndex = 0;\n for (const key of this._samplerList) {\n this._samplers[key] = channelIndex;\n channelIndex += 1;\n }\n }\n this._engine.setTextureArray(this._samplers[channel], this._uniforms[channel], textures, channel);\n }\n /**\n * Sets a texture to be the input of the specified post process. (To use the output, pass in the next post process in the pipeline)\n * @param channel Name of the sampler variable.\n * @param postProcess Post process to get the input texture from.\n */\n setTextureFromPostProcess(channel, postProcess) {\n this._engine.setTextureFromPostProcess(this._samplers[channel], postProcess, channel);\n }\n /**\n * (Warning! setTextureFromPostProcessOutput may be desired instead)\n * Sets the input texture of the passed in post process to be input of this effect. (To use the output of the passed in post process use setTextureFromPostProcessOutput)\n * @param channel Name of the sampler variable.\n * @param postProcess Post process to get the output texture from.\n */\n setTextureFromPostProcessOutput(channel, postProcess) {\n this._engine.setTextureFromPostProcessOutput(this._samplers[channel], postProcess, channel);\n }\n /**\n * Binds a buffer to a uniform.\n * @param buffer Buffer to bind.\n * @param name Name of the uniform variable to bind to.\n */\n bindUniformBuffer(buffer, name) {\n const bufferName = this._uniformBuffersNames[name];\n if (bufferName === undefined || (Effect._BaseCache[bufferName] === buffer && this._engine._features.useUBOBindingCache)) {\n return;\n }\n Effect._BaseCache[bufferName] = buffer;\n this._engine.bindUniformBufferBase(buffer, bufferName, name);\n }\n /**\n * Binds block to a uniform.\n * @param blockName Name of the block to bind.\n * @param index Index to bind.\n */\n bindUniformBlock(blockName, index) {\n this._engine.bindUniformBlock(this._pipelineContext, blockName, index);\n }\n /**\n * Sets an integer value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param value Value to be set.\n * @returns this effect.\n */\n setInt(uniformName, value) {\n this._pipelineContext.setInt(uniformName, value);\n return this;\n }\n /**\n * Sets an int2 value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First int in int2.\n * @param y Second int in int2.\n * @returns this effect.\n */\n setInt2(uniformName, x, y) {\n this._pipelineContext.setInt2(uniformName, x, y);\n return this;\n }\n /**\n * Sets an int3 value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First int in int3.\n * @param y Second int in int3.\n * @param z Third int in int3.\n * @returns this effect.\n */\n setInt3(uniformName, x, y, z) {\n this._pipelineContext.setInt3(uniformName, x, y, z);\n return this;\n }\n /**\n * Sets an int4 value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First int in int4.\n * @param y Second int in int4.\n * @param z Third int in int4.\n * @param w Fourth int in int4.\n * @returns this effect.\n */\n setInt4(uniformName, x, y, z, w) {\n this._pipelineContext.setInt4(uniformName, x, y, z, w);\n return this;\n }\n /**\n * Sets an int array on a uniform variable.\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setIntArray(uniformName, array) {\n this._pipelineContext.setIntArray(uniformName, array);\n return this;\n }\n /**\n * Sets an int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setIntArray2(uniformName, array) {\n this._pipelineContext.setIntArray2(uniformName, array);\n return this;\n }\n /**\n * Sets an int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setIntArray3(uniformName, array) {\n this._pipelineContext.setIntArray3(uniformName, array);\n return this;\n }\n /**\n * Sets an int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setIntArray4(uniformName, array) {\n this._pipelineContext.setIntArray4(uniformName, array);\n return this;\n }\n /**\n * Sets an unsigned integer value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param value Value to be set.\n * @returns this effect.\n */\n setUInt(uniformName, value) {\n this._pipelineContext.setUInt(uniformName, value);\n return this;\n }\n /**\n * Sets an unsigned int2 value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First unsigned int in uint2.\n * @param y Second unsigned int in uint2.\n * @returns this effect.\n */\n setUInt2(uniformName, x, y) {\n this._pipelineContext.setUInt2(uniformName, x, y);\n return this;\n }\n /**\n * Sets an unsigned int3 value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First unsigned int in uint3.\n * @param y Second unsigned int in uint3.\n * @param z Third unsigned int in uint3.\n * @returns this effect.\n */\n setUInt3(uniformName, x, y, z) {\n this._pipelineContext.setUInt3(uniformName, x, y, z);\n return this;\n }\n /**\n * Sets an unsigned int4 value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First unsigned int in uint4.\n * @param y Second unsigned int in uint4.\n * @param z Third unsigned int in uint4.\n * @param w Fourth unsigned int in uint4.\n * @returns this effect.\n */\n setUInt4(uniformName, x, y, z, w) {\n this._pipelineContext.setUInt4(uniformName, x, y, z, w);\n return this;\n }\n /**\n * Sets an unsigned int array on a uniform variable.\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setUIntArray(uniformName, array) {\n this._pipelineContext.setUIntArray(uniformName, array);\n return this;\n }\n /**\n * Sets an unsigned int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setUIntArray2(uniformName, array) {\n this._pipelineContext.setUIntArray2(uniformName, array);\n return this;\n }\n /**\n * Sets an unsigned int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setUIntArray3(uniformName, array) {\n this._pipelineContext.setUIntArray3(uniformName, array);\n return this;\n }\n /**\n * Sets an unsigned int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setUIntArray4(uniformName, array) {\n this._pipelineContext.setUIntArray4(uniformName, array);\n return this;\n }\n /**\n * Sets an float array on a uniform variable.\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setFloatArray(uniformName, array) {\n this._pipelineContext.setArray(uniformName, array);\n return this;\n }\n /**\n * Sets an float array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setFloatArray2(uniformName, array) {\n this._pipelineContext.setArray2(uniformName, array);\n return this;\n }\n /**\n * Sets an float array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setFloatArray3(uniformName, array) {\n this._pipelineContext.setArray3(uniformName, array);\n return this;\n }\n /**\n * Sets an float array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setFloatArray4(uniformName, array) {\n this._pipelineContext.setArray4(uniformName, array);\n return this;\n }\n /**\n * Sets an array on a uniform variable.\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setArray(uniformName, array) {\n this._pipelineContext.setArray(uniformName, array);\n return this;\n }\n /**\n * Sets an array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setArray2(uniformName, array) {\n this._pipelineContext.setArray2(uniformName, array);\n return this;\n }\n /**\n * Sets an array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setArray3(uniformName, array) {\n this._pipelineContext.setArray3(uniformName, array);\n return this;\n }\n /**\n * Sets an array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setArray4(uniformName, array) {\n this._pipelineContext.setArray4(uniformName, array);\n return this;\n }\n /**\n * Sets matrices on a uniform variable.\n * @param uniformName Name of the variable.\n * @param matrices matrices to be set.\n * @returns this effect.\n */\n setMatrices(uniformName, matrices) {\n this._pipelineContext.setMatrices(uniformName, matrices);\n return this;\n }\n /**\n * Sets matrix on a uniform variable.\n * @param uniformName Name of the variable.\n * @param matrix matrix to be set.\n * @returns this effect.\n */\n setMatrix(uniformName, matrix) {\n this._pipelineContext.setMatrix(uniformName, matrix);\n return this;\n }\n /**\n * Sets a 3x3 matrix on a uniform variable. (Specified as [1,2,3,4,5,6,7,8,9] will result in [1,2,3][4,5,6][7,8,9] matrix)\n * @param uniformName Name of the variable.\n * @param matrix matrix to be set.\n * @returns this effect.\n */\n setMatrix3x3(uniformName, matrix) {\n // the cast is ok because it is gl.uniformMatrix3fv() which is called at the end, and this function accepts Float32Array and Array\n this._pipelineContext.setMatrix3x3(uniformName, matrix);\n return this;\n }\n /**\n * Sets a 2x2 matrix on a uniform variable. (Specified as [1,2,3,4] will result in [1,2][3,4] matrix)\n * @param uniformName Name of the variable.\n * @param matrix matrix to be set.\n * @returns this effect.\n */\n setMatrix2x2(uniformName, matrix) {\n // the cast is ok because it is gl.uniformMatrix3fv() which is called at the end, and this function accepts Float32Array and Array\n this._pipelineContext.setMatrix2x2(uniformName, matrix);\n return this;\n }\n /**\n * Sets a float on a uniform variable.\n * @param uniformName Name of the variable.\n * @param value value to be set.\n * @returns this effect.\n */\n setFloat(uniformName, value) {\n this._pipelineContext.setFloat(uniformName, value);\n return this;\n }\n /**\n * Sets a boolean on a uniform variable.\n * @param uniformName Name of the variable.\n * @param bool value to be set.\n * @returns this effect.\n */\n setBool(uniformName, bool) {\n this._pipelineContext.setInt(uniformName, bool ? 1 : 0);\n return this;\n }\n /**\n * Sets a Vector2 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param vector2 vector2 to be set.\n * @returns this effect.\n */\n setVector2(uniformName, vector2) {\n this._pipelineContext.setVector2(uniformName, vector2);\n return this;\n }\n /**\n * Sets a float2 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First float in float2.\n * @param y Second float in float2.\n * @returns this effect.\n */\n setFloat2(uniformName, x, y) {\n this._pipelineContext.setFloat2(uniformName, x, y);\n return this;\n }\n /**\n * Sets a Vector3 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param vector3 Value to be set.\n * @returns this effect.\n */\n setVector3(uniformName, vector3) {\n this._pipelineContext.setVector3(uniformName, vector3);\n return this;\n }\n /**\n * Sets a float3 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First float in float3.\n * @param y Second float in float3.\n * @param z Third float in float3.\n * @returns this effect.\n */\n setFloat3(uniformName, x, y, z) {\n this._pipelineContext.setFloat3(uniformName, x, y, z);\n return this;\n }\n /**\n * Sets a Vector4 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param vector4 Value to be set.\n * @returns this effect.\n */\n setVector4(uniformName, vector4) {\n this._pipelineContext.setVector4(uniformName, vector4);\n return this;\n }\n /**\n * Sets a Quaternion on a uniform variable.\n * @param uniformName Name of the variable.\n * @param quaternion Value to be set.\n * @returns this effect.\n */\n setQuaternion(uniformName, quaternion) {\n this._pipelineContext.setQuaternion(uniformName, quaternion);\n return this;\n }\n /**\n * Sets a float4 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First float in float4.\n * @param y Second float in float4.\n * @param z Third float in float4.\n * @param w Fourth float in float4.\n * @returns this effect.\n */\n setFloat4(uniformName, x, y, z, w) {\n this._pipelineContext.setFloat4(uniformName, x, y, z, w);\n return this;\n }\n /**\n * Sets a Color3 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param color3 Value to be set.\n * @returns this effect.\n */\n setColor3(uniformName, color3) {\n this._pipelineContext.setColor3(uniformName, color3);\n return this;\n }\n /**\n * Sets a Color4 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param color3 Value to be set.\n * @param alpha Alpha value to be set.\n * @returns this effect.\n */\n setColor4(uniformName, color3, alpha) {\n this._pipelineContext.setColor4(uniformName, color3, alpha);\n return this;\n }\n /**\n * Sets a Color4 on a uniform variable\n * @param uniformName defines the name of the variable\n * @param color4 defines the value to be set\n * @returns this effect.\n */\n setDirectColor4(uniformName, color4) {\n this._pipelineContext.setDirectColor4(uniformName, color4);\n return this;\n }\n /**\n * Release all associated resources.\n **/\n dispose() {\n if (this._pipelineContext) {\n this._pipelineContext.dispose();\n }\n this._engine._releaseEffect(this);\n this._isDisposed = true;\n }\n /**\n * This function will add a new shader to the shader store\n * @param name the name of the shader\n * @param pixelShader optional pixel shader content\n * @param vertexShader optional vertex shader content\n * @param shaderLanguage the language the shader is written in (default: GLSL)\n */\n static RegisterShader(name, pixelShader, vertexShader, shaderLanguage = ShaderLanguage.GLSL) {\n if (pixelShader) {\n EngineShaderStore.GetShadersStore(shaderLanguage)[`${name}PixelShader`] = pixelShader;\n }\n if (vertexShader) {\n EngineShaderStore.GetShadersStore(shaderLanguage)[`${name}VertexShader`] = vertexShader;\n }\n }\n /**\n * Resets the cache of effects.\n */\n static ResetCache() {\n Effect._BaseCache = {};\n }\n}\n/**\n * Enable logging of the shader code when a compilation error occurs\n */\nEffect.LogShaderCodeOnCompilationError = true;\nEffect._UniqueIdSeed = 0;\nEffect._BaseCache = {};\n/**\n * Store of each shader (The can be looked up using effect.key)\n */\nEffect.ShadersStore = EngineShaderStore.ShadersStore;\n/**\n * Store of each included file for a shader (The can be looked up using effect.key)\n */\nEffect.IncludesShadersStore = EngineShaderStore.IncludesShadersStore;\n//# sourceMappingURL=effect.js.map","/**\n * @internal\n **/\nexport class DepthCullingState {\n /**\n * Initializes the state.\n * @param reset\n */\n constructor(reset = true) {\n this._isDepthTestDirty = false;\n this._isDepthMaskDirty = false;\n this._isDepthFuncDirty = false;\n this._isCullFaceDirty = false;\n this._isCullDirty = false;\n this._isZOffsetDirty = false;\n this._isFrontFaceDirty = false;\n if (reset) {\n this.reset();\n }\n }\n get isDirty() {\n return (this._isDepthFuncDirty ||\n this._isDepthTestDirty ||\n this._isDepthMaskDirty ||\n this._isCullFaceDirty ||\n this._isCullDirty ||\n this._isZOffsetDirty ||\n this._isFrontFaceDirty);\n }\n get zOffset() {\n return this._zOffset;\n }\n set zOffset(value) {\n if (this._zOffset === value) {\n return;\n }\n this._zOffset = value;\n this._isZOffsetDirty = true;\n }\n get zOffsetUnits() {\n return this._zOffsetUnits;\n }\n set zOffsetUnits(value) {\n if (this._zOffsetUnits === value) {\n return;\n }\n this._zOffsetUnits = value;\n this._isZOffsetDirty = true;\n }\n get cullFace() {\n return this._cullFace;\n }\n set cullFace(value) {\n if (this._cullFace === value) {\n return;\n }\n this._cullFace = value;\n this._isCullFaceDirty = true;\n }\n get cull() {\n return this._cull;\n }\n set cull(value) {\n if (this._cull === value) {\n return;\n }\n this._cull = value;\n this._isCullDirty = true;\n }\n get depthFunc() {\n return this._depthFunc;\n }\n set depthFunc(value) {\n if (this._depthFunc === value) {\n return;\n }\n this._depthFunc = value;\n this._isDepthFuncDirty = true;\n }\n get depthMask() {\n return this._depthMask;\n }\n set depthMask(value) {\n if (this._depthMask === value) {\n return;\n }\n this._depthMask = value;\n this._isDepthMaskDirty = true;\n }\n get depthTest() {\n return this._depthTest;\n }\n set depthTest(value) {\n if (this._depthTest === value) {\n return;\n }\n this._depthTest = value;\n this._isDepthTestDirty = true;\n }\n get frontFace() {\n return this._frontFace;\n }\n set frontFace(value) {\n if (this._frontFace === value) {\n return;\n }\n this._frontFace = value;\n this._isFrontFaceDirty = true;\n }\n reset() {\n this._depthMask = true;\n this._depthTest = true;\n this._depthFunc = null;\n this._cullFace = null;\n this._cull = null;\n this._zOffset = 0;\n this._zOffsetUnits = 0;\n this._frontFace = null;\n this._isDepthTestDirty = true;\n this._isDepthMaskDirty = true;\n this._isDepthFuncDirty = false;\n this._isCullFaceDirty = false;\n this._isCullDirty = false;\n this._isZOffsetDirty = true;\n this._isFrontFaceDirty = false;\n }\n apply(gl) {\n if (!this.isDirty) {\n return;\n }\n // Cull\n if (this._isCullDirty) {\n if (this.cull) {\n gl.enable(gl.CULL_FACE);\n }\n else {\n gl.disable(gl.CULL_FACE);\n }\n this._isCullDirty = false;\n }\n // Cull face\n if (this._isCullFaceDirty) {\n gl.cullFace(this.cullFace);\n this._isCullFaceDirty = false;\n }\n // Depth mask\n if (this._isDepthMaskDirty) {\n gl.depthMask(this.depthMask);\n this._isDepthMaskDirty = false;\n }\n // Depth test\n if (this._isDepthTestDirty) {\n if (this.depthTest) {\n gl.enable(gl.DEPTH_TEST);\n }\n else {\n gl.disable(gl.DEPTH_TEST);\n }\n this._isDepthTestDirty = false;\n }\n // Depth func\n if (this._isDepthFuncDirty) {\n gl.depthFunc(this.depthFunc);\n this._isDepthFuncDirty = false;\n }\n // zOffset\n if (this._isZOffsetDirty) {\n if (this.zOffset || this.zOffsetUnits) {\n gl.enable(gl.POLYGON_OFFSET_FILL);\n gl.polygonOffset(this.zOffset, this.zOffsetUnits);\n }\n else {\n gl.disable(gl.POLYGON_OFFSET_FILL);\n }\n this._isZOffsetDirty = false;\n }\n // Front face\n if (this._isFrontFaceDirty) {\n gl.frontFace(this.frontFace);\n this._isFrontFaceDirty = false;\n }\n }\n}\n//# sourceMappingURL=depthCullingState.js.map","\n/**\n * @internal\n **/\nexport class StencilState {\n constructor() {\n this.reset();\n }\n reset() {\n this.enabled = false;\n this.mask = 0xff;\n this.func = StencilState.ALWAYS;\n this.funcRef = 1;\n this.funcMask = 0xff;\n this.opStencilFail = StencilState.KEEP;\n this.opDepthFail = StencilState.KEEP;\n this.opStencilDepthPass = StencilState.REPLACE;\n }\n get stencilFunc() {\n return this.func;\n }\n set stencilFunc(value) {\n this.func = value;\n }\n get stencilFuncRef() {\n return this.funcRef;\n }\n set stencilFuncRef(value) {\n this.funcRef = value;\n }\n get stencilFuncMask() {\n return this.funcMask;\n }\n set stencilFuncMask(value) {\n this.funcMask = value;\n }\n get stencilOpStencilFail() {\n return this.opStencilFail;\n }\n set stencilOpStencilFail(value) {\n this.opStencilFail = value;\n }\n get stencilOpDepthFail() {\n return this.opDepthFail;\n }\n set stencilOpDepthFail(value) {\n this.opDepthFail = value;\n }\n get stencilOpStencilDepthPass() {\n return this.opStencilDepthPass;\n }\n set stencilOpStencilDepthPass(value) {\n this.opStencilDepthPass = value;\n }\n get stencilMask() {\n return this.mask;\n }\n set stencilMask(value) {\n this.mask = value;\n }\n get stencilTest() {\n return this.enabled;\n }\n set stencilTest(value) {\n this.enabled = value;\n }\n}\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */\nStencilState.ALWAYS = 519;\n/** Passed to stencilOperation to specify that stencil value must be kept */\nStencilState.KEEP = 7680;\n/** Passed to stencilOperation to specify that stencil value must be replaced */\nStencilState.REPLACE = 7681;\n//# sourceMappingURL=stencilState.js.map","/**\n * @internal\n **/\nexport class AlphaState {\n /**\n * Initializes the state.\n */\n constructor() {\n this._blendFunctionParameters = new Array(4);\n this._blendEquationParameters = new Array(2);\n this._blendConstants = new Array(4);\n this._isBlendConstantsDirty = false;\n this._alphaBlend = false;\n this._isAlphaBlendDirty = false;\n this._isBlendFunctionParametersDirty = false;\n this._isBlendEquationParametersDirty = false;\n this.reset();\n }\n get isDirty() {\n return this._isAlphaBlendDirty || this._isBlendFunctionParametersDirty || this._isBlendEquationParametersDirty;\n }\n get alphaBlend() {\n return this._alphaBlend;\n }\n set alphaBlend(value) {\n if (this._alphaBlend === value) {\n return;\n }\n this._alphaBlend = value;\n this._isAlphaBlendDirty = true;\n }\n setAlphaBlendConstants(r, g, b, a) {\n if (this._blendConstants[0] === r && this._blendConstants[1] === g && this._blendConstants[2] === b && this._blendConstants[3] === a) {\n return;\n }\n this._blendConstants[0] = r;\n this._blendConstants[1] = g;\n this._blendConstants[2] = b;\n this._blendConstants[3] = a;\n this._isBlendConstantsDirty = true;\n }\n setAlphaBlendFunctionParameters(value0, value1, value2, value3) {\n if (this._blendFunctionParameters[0] === value0 &&\n this._blendFunctionParameters[1] === value1 &&\n this._blendFunctionParameters[2] === value2 &&\n this._blendFunctionParameters[3] === value3) {\n return;\n }\n this._blendFunctionParameters[0] = value0;\n this._blendFunctionParameters[1] = value1;\n this._blendFunctionParameters[2] = value2;\n this._blendFunctionParameters[3] = value3;\n this._isBlendFunctionParametersDirty = true;\n }\n setAlphaEquationParameters(rgb, alpha) {\n if (this._blendEquationParameters[0] === rgb && this._blendEquationParameters[1] === alpha) {\n return;\n }\n this._blendEquationParameters[0] = rgb;\n this._blendEquationParameters[1] = alpha;\n this._isBlendEquationParametersDirty = true;\n }\n reset() {\n this._alphaBlend = false;\n this._blendFunctionParameters[0] = null;\n this._blendFunctionParameters[1] = null;\n this._blendFunctionParameters[2] = null;\n this._blendFunctionParameters[3] = null;\n this._blendEquationParameters[0] = null;\n this._blendEquationParameters[1] = null;\n this._blendConstants[0] = null;\n this._blendConstants[1] = null;\n this._blendConstants[2] = null;\n this._blendConstants[3] = null;\n this._isAlphaBlendDirty = true;\n this._isBlendFunctionParametersDirty = false;\n this._isBlendEquationParametersDirty = false;\n this._isBlendConstantsDirty = false;\n }\n apply(gl) {\n if (!this.isDirty) {\n return;\n }\n // Alpha blend\n if (this._isAlphaBlendDirty) {\n if (this._alphaBlend) {\n gl.enable(gl.BLEND);\n }\n else {\n gl.disable(gl.BLEND);\n }\n this._isAlphaBlendDirty = false;\n }\n // Alpha function\n if (this._isBlendFunctionParametersDirty) {\n gl.blendFuncSeparate(this._blendFunctionParameters[0], this._blendFunctionParameters[1], this._blendFunctionParameters[2], this._blendFunctionParameters[3]);\n this._isBlendFunctionParametersDirty = false;\n }\n // Alpha equation\n if (this._isBlendEquationParametersDirty) {\n gl.blendEquationSeparate(this._blendEquationParameters[0], this._blendEquationParameters[1]);\n this._isBlendEquationParametersDirty = false;\n }\n // Constants\n if (this._isBlendConstantsDirty) {\n gl.blendColor(this._blendConstants[0], this._blendConstants[1], this._blendConstants[2], this._blendConstants[3]);\n this._isBlendConstantsDirty = false;\n }\n }\n}\n//# sourceMappingURL=alphaCullingState.js.map","\n/**\n * Class used to store a texture sampler data\n */\nexport class TextureSampler {\n /**\n * | Value | Type | Description |\n * | ----- | ------------------ | ----------- |\n * | 0 | CLAMP_ADDRESSMODE | |\n * | 1 | WRAP_ADDRESSMODE | |\n * | 2 | MIRROR_ADDRESSMODE | |\n */\n get wrapU() {\n return this._cachedWrapU;\n }\n set wrapU(value) {\n this._cachedWrapU = value;\n }\n /**\n * | Value | Type | Description |\n * | ----- | ------------------ | ----------- |\n * | 0 | CLAMP_ADDRESSMODE | |\n * | 1 | WRAP_ADDRESSMODE | |\n * | 2 | MIRROR_ADDRESSMODE | |\n */\n get wrapV() {\n return this._cachedWrapV;\n }\n set wrapV(value) {\n this._cachedWrapV = value;\n }\n /**\n * | Value | Type | Description |\n * | ----- | ------------------ | ----------- |\n * | 0 | CLAMP_ADDRESSMODE | |\n * | 1 | WRAP_ADDRESSMODE | |\n * | 2 | MIRROR_ADDRESSMODE | |\n */\n get wrapR() {\n return this._cachedWrapR;\n }\n set wrapR(value) {\n this._cachedWrapR = value;\n }\n /**\n * With compliant hardware and browser (supporting anisotropic filtering)\n * this defines the level of anisotropic filtering in the texture.\n * The higher the better but the slower.\n */\n get anisotropicFilteringLevel() {\n return this._cachedAnisotropicFilteringLevel;\n }\n set anisotropicFilteringLevel(value) {\n this._cachedAnisotropicFilteringLevel = value;\n }\n /**\n * Gets or sets the comparison function (513, 514, etc). Set 0 to not use a comparison function\n */\n get comparisonFunction() {\n return this._comparisonFunction;\n }\n set comparisonFunction(value) {\n this._comparisonFunction = value;\n }\n /**\n * Indicates to use the mip maps (if available on the texture).\n * Thanks to this flag, you can instruct the sampler to not sample the mipmaps even if they exist (and if the sampling mode is set to a value that normally samples the mipmaps!)\n */\n get useMipMaps() {\n return this._useMipMaps;\n }\n set useMipMaps(value) {\n this._useMipMaps = value;\n }\n /**\n * Creates a Sampler instance\n */\n constructor() {\n /**\n * Gets the sampling mode of the texture\n */\n this.samplingMode = -1;\n this._useMipMaps = true;\n /** @internal */\n this._cachedWrapU = null;\n /** @internal */\n this._cachedWrapV = null;\n /** @internal */\n this._cachedWrapR = null;\n /** @internal */\n this._cachedAnisotropicFilteringLevel = null;\n /** @internal */\n this._comparisonFunction = 0;\n }\n /**\n * Sets all the parameters of the sampler\n * @param wrapU u address mode (default: TEXTURE_WRAP_ADDRESSMODE)\n * @param wrapV v address mode (default: TEXTURE_WRAP_ADDRESSMODE)\n * @param wrapR r address mode (default: TEXTURE_WRAP_ADDRESSMODE)\n * @param anisotropicFilteringLevel anisotropic level (default: 1)\n * @param samplingMode sampling mode (default: 2)\n * @param comparisonFunction comparison function (default: 0 - no comparison function)\n * @returns the current sampler instance\n */\n setParameters(wrapU = 1, wrapV = 1, wrapR = 1, anisotropicFilteringLevel = 1, samplingMode = 2, comparisonFunction = 0) {\n this._cachedWrapU = wrapU;\n this._cachedWrapV = wrapV;\n this._cachedWrapR = wrapR;\n this._cachedAnisotropicFilteringLevel = anisotropicFilteringLevel;\n this.samplingMode = samplingMode;\n this._comparisonFunction = comparisonFunction;\n return this;\n }\n /**\n * Compares this sampler with another one\n * @param other sampler to compare with\n * @returns true if the samplers have the same parametres, else false\n */\n compareSampler(other) {\n return (this._cachedWrapU === other._cachedWrapU &&\n this._cachedWrapV === other._cachedWrapV &&\n this._cachedWrapR === other._cachedWrapR &&\n this._cachedAnisotropicFilteringLevel === other._cachedAnisotropicFilteringLevel &&\n this.samplingMode === other.samplingMode &&\n this._comparisonFunction === other._comparisonFunction &&\n this._useMipMaps === other._useMipMaps);\n }\n}\n//# sourceMappingURL=textureSampler.js.map","import { Observable } from \"../../Misc/observable.js\";\nimport { TextureSampler } from \"./textureSampler.js\";\n/**\n * Defines the source of the internal texture\n */\nexport var InternalTextureSource;\n(function (InternalTextureSource) {\n /**\n * The source of the texture data is unknown\n */\n InternalTextureSource[InternalTextureSource[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * Texture data comes from an URL\n */\n InternalTextureSource[InternalTextureSource[\"Url\"] = 1] = \"Url\";\n /**\n * Texture data is only used for temporary storage\n */\n InternalTextureSource[InternalTextureSource[\"Temp\"] = 2] = \"Temp\";\n /**\n * Texture data comes from raw data (ArrayBuffer)\n */\n InternalTextureSource[InternalTextureSource[\"Raw\"] = 3] = \"Raw\";\n /**\n * Texture content is dynamic (video or dynamic texture)\n */\n InternalTextureSource[InternalTextureSource[\"Dynamic\"] = 4] = \"Dynamic\";\n /**\n * Texture content is generated by rendering to it\n */\n InternalTextureSource[InternalTextureSource[\"RenderTarget\"] = 5] = \"RenderTarget\";\n /**\n * Texture content is part of a multi render target process\n */\n InternalTextureSource[InternalTextureSource[\"MultiRenderTarget\"] = 6] = \"MultiRenderTarget\";\n /**\n * Texture data comes from a cube data file\n */\n InternalTextureSource[InternalTextureSource[\"Cube\"] = 7] = \"Cube\";\n /**\n * Texture data comes from a raw cube data\n */\n InternalTextureSource[InternalTextureSource[\"CubeRaw\"] = 8] = \"CubeRaw\";\n /**\n * Texture data come from a prefiltered cube data file\n */\n InternalTextureSource[InternalTextureSource[\"CubePrefiltered\"] = 9] = \"CubePrefiltered\";\n /**\n * Texture content is raw 3D data\n */\n InternalTextureSource[InternalTextureSource[\"Raw3D\"] = 10] = \"Raw3D\";\n /**\n * Texture content is raw 2D array data\n */\n InternalTextureSource[InternalTextureSource[\"Raw2DArray\"] = 11] = \"Raw2DArray\";\n /**\n * Texture content is a depth/stencil texture\n */\n InternalTextureSource[InternalTextureSource[\"DepthStencil\"] = 12] = \"DepthStencil\";\n /**\n * Texture data comes from a raw cube data encoded with RGBD\n */\n InternalTextureSource[InternalTextureSource[\"CubeRawRGBD\"] = 13] = \"CubeRawRGBD\";\n /**\n * Texture content is a depth texture\n */\n InternalTextureSource[InternalTextureSource[\"Depth\"] = 14] = \"Depth\";\n})(InternalTextureSource || (InternalTextureSource = {}));\n/**\n * Class used to store data associated with WebGL texture data for the engine\n * This class should not be used directly\n */\nexport class InternalTexture extends TextureSampler {\n /**\n * Gets a boolean indicating if the texture uses mipmaps\n * TODO implements useMipMaps as a separate setting from generateMipMaps\n */\n get useMipMaps() {\n return this.generateMipMaps;\n }\n set useMipMaps(value) {\n this.generateMipMaps = value;\n }\n /** Gets the unique id of the internal texture */\n get uniqueId() {\n return this._uniqueId;\n }\n /** @internal */\n _setUniqueId(id) {\n this._uniqueId = id;\n }\n /**\n * Gets the Engine the texture belongs to.\n * @returns The babylon engine\n */\n getEngine() {\n return this._engine;\n }\n /**\n * Gets the data source type of the texture\n */\n get source() {\n return this._source;\n }\n /**\n * Creates a new InternalTexture\n * @param engine defines the engine to use\n * @param source defines the type of data that will be used\n * @param delayAllocation if the texture allocation should be delayed (default: false)\n */\n constructor(engine, source, delayAllocation = false) {\n super();\n /**\n * Defines if the texture is ready\n */\n this.isReady = false;\n /**\n * Defines if the texture is a cube texture\n */\n this.isCube = false;\n /**\n * Defines if the texture contains 3D data\n */\n this.is3D = false;\n /**\n * Defines if the texture contains 2D array data\n */\n this.is2DArray = false;\n /**\n * Defines if the texture contains multiview data\n */\n this.isMultiview = false;\n /**\n * Gets the URL used to load this texture\n */\n this.url = \"\";\n /**\n * Gets a boolean indicating if the texture needs mipmaps generation\n */\n this.generateMipMaps = false;\n /**\n * Gets the number of samples used by the texture (WebGL2+ only)\n */\n this.samples = 0;\n /**\n * Gets the type of the texture (int, float...)\n */\n this.type = -1;\n /**\n * Gets the format of the texture (RGB, RGBA...)\n */\n this.format = -1;\n /**\n * Observable called when the texture is loaded\n */\n this.onLoadedObservable = new Observable();\n /**\n * Observable called when the texture load is raising an error\n */\n this.onErrorObservable = new Observable();\n /**\n * If this callback is defined it will be called instead of the default _rebuild function\n */\n this.onRebuildCallback = null;\n /**\n * Gets the width of the texture\n */\n this.width = 0;\n /**\n * Gets the height of the texture\n */\n this.height = 0;\n /**\n * Gets the depth of the texture\n */\n this.depth = 0;\n /**\n * Gets the initial width of the texture (It could be rescaled if the current system does not support non power of two textures)\n */\n this.baseWidth = 0;\n /**\n * Gets the initial height of the texture (It could be rescaled if the current system does not support non power of two textures)\n */\n this.baseHeight = 0;\n /**\n * Gets the initial depth of the texture (It could be rescaled if the current system does not support non power of two textures)\n */\n this.baseDepth = 0;\n /**\n * Gets a boolean indicating if the texture is inverted on Y axis\n */\n this.invertY = false;\n // Private\n /** @internal */\n this._invertVScale = false;\n /** @internal */\n this._associatedChannel = -1;\n /** @internal */\n this._source = InternalTextureSource.Unknown;\n /** @internal */\n this._buffer = null;\n /** @internal */\n this._bufferView = null;\n /** @internal */\n this._bufferViewArray = null;\n /** @internal */\n this._bufferViewArrayArray = null;\n /** @internal */\n this._size = 0;\n /** @internal */\n this._extension = \"\";\n /** @internal */\n this._files = null;\n /** @internal */\n this._workingCanvas = null;\n /** @internal */\n this._workingContext = null;\n /** @internal */\n this._cachedCoordinatesMode = null;\n /** @internal */\n this._isDisabled = false;\n /** @internal */\n this._compression = null;\n /** @internal */\n this._sphericalPolynomial = null;\n /** @internal */\n this._sphericalPolynomialPromise = null;\n /** @internal */\n this._sphericalPolynomialComputed = false;\n /** @internal */\n this._lodGenerationScale = 0;\n /** @internal */\n this._lodGenerationOffset = 0;\n /** @internal */\n this._useSRGBBuffer = false;\n // The following three fields helps sharing generated fixed LODs for texture filtering\n // In environment not supporting the textureLOD extension like EDGE. They are for internal use only.\n // They are at the level of the gl texture to benefit from the cache.\n /** @internal */\n this._lodTextureHigh = null;\n /** @internal */\n this._lodTextureMid = null;\n /** @internal */\n this._lodTextureLow = null;\n /** @internal */\n this._isRGBD = false;\n /** @internal */\n this._linearSpecularLOD = false;\n /** @internal */\n this._irradianceTexture = null;\n /** @internal */\n this._hardwareTexture = null;\n /** @internal */\n this._maxLodLevel = null;\n /** @internal */\n this._references = 1;\n /** @internal */\n this._gammaSpace = null;\n this._engine = engine;\n this._source = source;\n this._uniqueId = InternalTexture._Counter++;\n if (!delayAllocation) {\n this._hardwareTexture = engine._createHardwareTexture();\n }\n }\n /**\n * Increments the number of references (ie. the number of Texture that point to it)\n */\n incrementReferences() {\n this._references++;\n }\n /**\n * Change the size of the texture (not the size of the content)\n * @param width defines the new width\n * @param height defines the new height\n * @param depth defines the new depth (1 by default)\n */\n updateSize(width, height, depth = 1) {\n this._engine.updateTextureDimensions(this, width, height, depth);\n this.width = width;\n this.height = height;\n this.depth = depth;\n this.baseWidth = width;\n this.baseHeight = height;\n this.baseDepth = depth;\n this._size = width * height * depth;\n }\n /** @internal */\n _rebuild() {\n var _a;\n this.isReady = false;\n this._cachedCoordinatesMode = null;\n this._cachedWrapU = null;\n this._cachedWrapV = null;\n this._cachedWrapR = null;\n this._cachedAnisotropicFilteringLevel = null;\n if (this.onRebuildCallback) {\n const data = this.onRebuildCallback(this);\n const swapAndSetIsReady = (proxyInternalTexture) => {\n proxyInternalTexture._swapAndDie(this, false);\n this.isReady = data.isReady;\n };\n if (data.isAsync) {\n data.proxy.then(swapAndSetIsReady);\n }\n else {\n swapAndSetIsReady(data.proxy);\n }\n return;\n }\n let proxy;\n switch (this.source) {\n case InternalTextureSource.Temp:\n break;\n case InternalTextureSource.Url:\n proxy = this._engine.createTexture((_a = this._originalUrl) !== null && _a !== void 0 ? _a : this.url, !this.generateMipMaps, this.invertY, null, this.samplingMode, \n // Do not use Proxy here as it could be fully synchronous\n // and proxy would be undefined.\n (temp) => {\n temp._swapAndDie(this, false);\n this.isReady = true;\n }, null, this._buffer, undefined, this.format, this._extension, undefined, undefined, undefined, this._useSRGBBuffer);\n return;\n case InternalTextureSource.Raw:\n proxy = this._engine.createRawTexture(this._bufferView, this.baseWidth, this.baseHeight, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression, this.type, undefined, this._useSRGBBuffer);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case InternalTextureSource.Raw3D:\n proxy = this._engine.createRawTexture3D(this._bufferView, this.baseWidth, this.baseHeight, this.baseDepth, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression, this.type);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case InternalTextureSource.Raw2DArray:\n proxy = this._engine.createRawTexture2DArray(this._bufferView, this.baseWidth, this.baseHeight, this.baseDepth, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression, this.type);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case InternalTextureSource.Dynamic:\n proxy = this._engine.createDynamicTexture(this.baseWidth, this.baseHeight, this.generateMipMaps, this.samplingMode);\n proxy._swapAndDie(this, false);\n this._engine.updateDynamicTexture(this, this._engine.getRenderingCanvas(), this.invertY, undefined, undefined, true);\n // The engine will make sure to update content so no need to flag it as isReady = true\n break;\n case InternalTextureSource.Cube:\n proxy = this._engine.createCubeTexture(this.url, null, this._files, !this.generateMipMaps, () => {\n proxy._swapAndDie(this, false);\n this.isReady = true;\n }, null, this.format, this._extension, false, 0, 0, null, undefined, this._useSRGBBuffer);\n return;\n case InternalTextureSource.CubeRaw:\n proxy = this._engine.createRawCubeTexture(this._bufferViewArray, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case InternalTextureSource.CubeRawRGBD:\n // This case is being handeled by the environment texture tools and is not a part of the rebuild process.\n // To use CubeRawRGBD use updateRGBDAsync on the cube texture.\n return;\n case InternalTextureSource.CubePrefiltered:\n proxy = this._engine.createPrefilteredCubeTexture(this.url, null, this._lodGenerationScale, this._lodGenerationOffset, (proxy) => {\n if (proxy) {\n proxy._swapAndDie(this, false);\n }\n this.isReady = true;\n }, null, this.format, this._extension);\n proxy._sphericalPolynomial = this._sphericalPolynomial;\n return;\n }\n }\n /**\n * @internal\n */\n _swapAndDie(target, swapAll = true) {\n // TODO what about refcount on target?\n var _a;\n (_a = this._hardwareTexture) === null || _a === void 0 ? void 0 : _a.setUsage(target._source, this.generateMipMaps, this.isCube, this.width, this.height);\n target._hardwareTexture = this._hardwareTexture;\n if (swapAll) {\n target._isRGBD = this._isRGBD;\n }\n if (this._lodTextureHigh) {\n if (target._lodTextureHigh) {\n target._lodTextureHigh.dispose();\n }\n target._lodTextureHigh = this._lodTextureHigh;\n }\n if (this._lodTextureMid) {\n if (target._lodTextureMid) {\n target._lodTextureMid.dispose();\n }\n target._lodTextureMid = this._lodTextureMid;\n }\n if (this._lodTextureLow) {\n if (target._lodTextureLow) {\n target._lodTextureLow.dispose();\n }\n target._lodTextureLow = this._lodTextureLow;\n }\n if (this._irradianceTexture) {\n if (target._irradianceTexture) {\n target._irradianceTexture.dispose();\n }\n target._irradianceTexture = this._irradianceTexture;\n }\n const cache = this._engine.getLoadedTexturesCache();\n let index = cache.indexOf(this);\n if (index !== -1) {\n cache.splice(index, 1);\n }\n index = cache.indexOf(target);\n if (index === -1) {\n cache.push(target);\n }\n }\n /**\n * Dispose the current allocated resources\n */\n dispose() {\n this._references--;\n this.onLoadedObservable.clear();\n this.onErrorObservable.clear();\n if (this._references === 0) {\n this._engine._releaseTexture(this);\n this._hardwareTexture = null;\n }\n }\n}\n/** @internal */\nInternalTexture._Counter = 0;\n//# sourceMappingURL=internalTexture.js.map","import { ShaderLanguage } from \"../../Materials/shaderLanguage.js\";\n/** @internal */\nexport class WebGLShaderProcessor {\n constructor() {\n this.shaderLanguage = ShaderLanguage.GLSL;\n }\n postProcessor(code, defines, isFragment, processingContext, engine) {\n // Remove extensions\n if (!engine.getCaps().drawBuffersExtension) {\n // even if enclosed in #if/#endif, IE11 does parse the #extension declaration, so we need to remove it altogether\n const regex = /#extension.+GL_EXT_draw_buffers.+(enable|require)/g;\n code = code.replace(regex, \"\");\n }\n return code;\n }\n}\n//# sourceMappingURL=webGLShaderProcessors.js.map","import { ShaderLanguage } from \"../../Materials/shaderLanguage.js\";\nconst varyingRegex = /(flat\\s)?\\s*varying\\s*.*/;\n/** @internal */\nexport class WebGL2ShaderProcessor {\n constructor() {\n this.shaderLanguage = ShaderLanguage.GLSL;\n }\n attributeProcessor(attribute) {\n return attribute.replace(\"attribute\", \"in\");\n }\n varyingCheck(varying, _isFragment) {\n return varyingRegex.test(varying);\n }\n varyingProcessor(varying, isFragment) {\n return varying.replace(\"varying\", isFragment ? \"in\" : \"out\");\n }\n postProcessor(code, defines, isFragment) {\n const hasDrawBuffersExtension = code.search(/#extension.+GL_EXT_draw_buffers.+require/) !== -1;\n // Remove extensions\n const regex = /#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g;\n code = code.replace(regex, \"\");\n // Replace instructions\n code = code.replace(/texture2D\\s*\\(/g, \"texture(\");\n if (isFragment) {\n const hasOutput = code.search(/layout *\\(location *= *0\\) *out/g) !== -1;\n code = code.replace(/texture2DLodEXT\\s*\\(/g, \"textureLod(\");\n code = code.replace(/textureCubeLodEXT\\s*\\(/g, \"textureLod(\");\n code = code.replace(/textureCube\\s*\\(/g, \"texture(\");\n code = code.replace(/gl_FragDepthEXT/g, \"gl_FragDepth\");\n code = code.replace(/gl_FragColor/g, \"glFragColor\");\n code = code.replace(/gl_FragData/g, \"glFragData\");\n code = code.replace(/void\\s+?main\\s*\\(/g, (hasDrawBuffersExtension || hasOutput ? \"\" : \"layout(location = 0) out vec4 glFragColor;\\n\") + \"void main(\");\n }\n else {\n const hasMultiviewExtension = defines.indexOf(\"#define MULTIVIEW\") !== -1;\n if (hasMultiviewExtension) {\n return \"#extension GL_OVR_multiview2 : require\\nlayout (num_views = 2) in;\\n\" + code;\n }\n }\n return code;\n }\n}\n//# sourceMappingURL=webGL2ShaderProcessors.js.map","import { DataBuffer } from \"../../Buffers/dataBuffer.js\";\n/** @internal */\nexport class WebGLDataBuffer extends DataBuffer {\n constructor(resource) {\n super();\n this._buffer = resource;\n }\n get underlyingResource() {\n return this._buffer;\n }\n}\n//# sourceMappingURL=webGLDataBuffer.js.map","/** @internal */\nexport class WebGLPipelineContext {\n constructor() {\n this._valueCache = {};\n this.vertexCompilationError = null;\n this.fragmentCompilationError = null;\n this.programLinkError = null;\n this.programValidationError = null;\n /** @internal */\n this._isDisposed = false;\n }\n get isAsync() {\n return this.isParallelCompiled;\n }\n get isReady() {\n if (this.program) {\n if (this.isParallelCompiled) {\n return this.engine._isRenderingStateCompiled(this);\n }\n return true;\n }\n return false;\n }\n _handlesSpectorRebuildCallback(onCompiled) {\n if (onCompiled && this.program) {\n onCompiled(this.program);\n }\n }\n _fillEffectInformation(effect, uniformBuffersNames, uniformsNames, uniforms, samplerList, samplers, attributesNames, attributes) {\n const engine = this.engine;\n if (engine.supportsUniformBuffers) {\n for (const name in uniformBuffersNames) {\n effect.bindUniformBlock(name, uniformBuffersNames[name]);\n }\n }\n const effectAvailableUniforms = this.engine.getUniforms(this, uniformsNames);\n effectAvailableUniforms.forEach((uniform, index) => {\n uniforms[uniformsNames[index]] = uniform;\n });\n this._uniforms = uniforms;\n let index;\n for (index = 0; index < samplerList.length; index++) {\n const sampler = effect.getUniform(samplerList[index]);\n if (sampler == null) {\n samplerList.splice(index, 1);\n index--;\n }\n }\n samplerList.forEach((name, index) => {\n samplers[name] = index;\n });\n for (const attr of engine.getAttributes(this, attributesNames)) {\n attributes.push(attr);\n }\n }\n /**\n * Release all associated resources.\n **/\n dispose() {\n this._uniforms = {};\n this._isDisposed = true;\n }\n /**\n * @internal\n */\n _cacheMatrix(uniformName, matrix) {\n const cache = this._valueCache[uniformName];\n const flag = matrix.updateFlag;\n if (cache !== undefined && cache === flag) {\n return false;\n }\n this._valueCache[uniformName] = flag;\n return true;\n }\n /**\n * @internal\n */\n _cacheFloat2(uniformName, x, y) {\n let cache = this._valueCache[uniformName];\n if (!cache || cache.length !== 2) {\n cache = [x, y];\n this._valueCache[uniformName] = cache;\n return true;\n }\n let changed = false;\n if (cache[0] !== x) {\n cache[0] = x;\n changed = true;\n }\n if (cache[1] !== y) {\n cache[1] = y;\n changed = true;\n }\n return changed;\n }\n /**\n * @internal\n */\n _cacheFloat3(uniformName, x, y, z) {\n let cache = this._valueCache[uniformName];\n if (!cache || cache.length !== 3) {\n cache = [x, y, z];\n this._valueCache[uniformName] = cache;\n return true;\n }\n let changed = false;\n if (cache[0] !== x) {\n cache[0] = x;\n changed = true;\n }\n if (cache[1] !== y) {\n cache[1] = y;\n changed = true;\n }\n if (cache[2] !== z) {\n cache[2] = z;\n changed = true;\n }\n return changed;\n }\n /**\n * @internal\n */\n _cacheFloat4(uniformName, x, y, z, w) {\n let cache = this._valueCache[uniformName];\n if (!cache || cache.length !== 4) {\n cache = [x, y, z, w];\n this._valueCache[uniformName] = cache;\n return true;\n }\n let changed = false;\n if (cache[0] !== x) {\n cache[0] = x;\n changed = true;\n }\n if (cache[1] !== y) {\n cache[1] = y;\n changed = true;\n }\n if (cache[2] !== z) {\n cache[2] = z;\n changed = true;\n }\n if (cache[3] !== w) {\n cache[3] = w;\n changed = true;\n }\n return changed;\n }\n /**\n * Sets an integer value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param value Value to be set.\n */\n setInt(uniformName, value) {\n const cache = this._valueCache[uniformName];\n if (cache !== undefined && cache === value) {\n return;\n }\n if (this.engine.setInt(this._uniforms[uniformName], value)) {\n this._valueCache[uniformName] = value;\n }\n }\n /**\n * Sets a int2 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First int in int2.\n * @param y Second int in int2.\n */\n setInt2(uniformName, x, y) {\n if (this._cacheFloat2(uniformName, x, y)) {\n if (!this.engine.setInt2(this._uniforms[uniformName], x, y)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a int3 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First int in int3.\n * @param y Second int in int3.\n * @param z Third int in int3.\n */\n setInt3(uniformName, x, y, z) {\n if (this._cacheFloat3(uniformName, x, y, z)) {\n if (!this.engine.setInt3(this._uniforms[uniformName], x, y, z)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a int4 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First int in int4.\n * @param y Second int in int4.\n * @param z Third int in int4.\n * @param w Fourth int in int4.\n */\n setInt4(uniformName, x, y, z, w) {\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\n if (!this.engine.setInt4(this._uniforms[uniformName], x, y, z, w)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets an int array on a uniform variable.\n * @param uniformName Name of the variable.\n * @param array array to be set.\n */\n setIntArray(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setIntArray(this._uniforms[uniformName], array);\n }\n /**\n * Sets an int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n */\n setIntArray2(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setIntArray2(this._uniforms[uniformName], array);\n }\n /**\n * Sets an int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n */\n setIntArray3(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setIntArray3(this._uniforms[uniformName], array);\n }\n /**\n * Sets an int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n */\n setIntArray4(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setIntArray4(this._uniforms[uniformName], array);\n }\n /**\n * Sets an unsigned integer value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param value Value to be set.\n */\n setUInt(uniformName, value) {\n const cache = this._valueCache[uniformName];\n if (cache !== undefined && cache === value) {\n return;\n }\n if (this.engine.setUInt(this._uniforms[uniformName], value)) {\n this._valueCache[uniformName] = value;\n }\n }\n /**\n * Sets an unsigned int2 value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First unsigned int in uint2.\n * @param y Second unsigned int in uint2.\n */\n setUInt2(uniformName, x, y) {\n if (this._cacheFloat2(uniformName, x, y)) {\n if (!this.engine.setUInt2(this._uniforms[uniformName], x, y)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets an unsigned int3 value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First unsigned int in uint3.\n * @param y Second unsigned int in uint3.\n * @param z Third unsigned int in uint3.\n */\n setUInt3(uniformName, x, y, z) {\n if (this._cacheFloat3(uniformName, x, y, z)) {\n if (!this.engine.setUInt3(this._uniforms[uniformName], x, y, z)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets an unsigned int4 value on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First unsigned int in uint4.\n * @param y Second unsigned int in uint4.\n * @param z Third unsigned int in uint4.\n * @param w Fourth unsigned int in uint4.\n */\n setUInt4(uniformName, x, y, z, w) {\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\n if (!this.engine.setUInt4(this._uniforms[uniformName], x, y, z, w)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets an unsigned int array on a uniform variable.\n * @param uniformName Name of the variable.\n * @param array array to be set.\n */\n setUIntArray(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setUIntArray(this._uniforms[uniformName], array);\n }\n /**\n * Sets an unsigned int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n */\n setUIntArray2(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setUIntArray2(this._uniforms[uniformName], array);\n }\n /**\n * Sets an unsigned int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n */\n setUIntArray3(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setUIntArray3(this._uniforms[uniformName], array);\n }\n /**\n * Sets an unsigned int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n */\n setUIntArray4(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setUIntArray4(this._uniforms[uniformName], array);\n }\n /**\n * Sets an array on a uniform variable.\n * @param uniformName Name of the variable.\n * @param array array to be set.\n */\n setArray(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setArray(this._uniforms[uniformName], array);\n }\n /**\n * Sets an array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n */\n setArray2(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setArray2(this._uniforms[uniformName], array);\n }\n /**\n * Sets an array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n * @returns this effect.\n */\n setArray3(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setArray3(this._uniforms[uniformName], array);\n }\n /**\n * Sets an array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\n * @param uniformName Name of the variable.\n * @param array array to be set.\n */\n setArray4(uniformName, array) {\n this._valueCache[uniformName] = null;\n this.engine.setArray4(this._uniforms[uniformName], array);\n }\n /**\n * Sets matrices on a uniform variable.\n * @param uniformName Name of the variable.\n * @param matrices matrices to be set.\n */\n setMatrices(uniformName, matrices) {\n if (!matrices) {\n return;\n }\n this._valueCache[uniformName] = null;\n this.engine.setMatrices(this._uniforms[uniformName], matrices);\n }\n /**\n * Sets matrix on a uniform variable.\n * @param uniformName Name of the variable.\n * @param matrix matrix to be set.\n */\n setMatrix(uniformName, matrix) {\n if (this._cacheMatrix(uniformName, matrix)) {\n if (!this.engine.setMatrices(this._uniforms[uniformName], matrix.toArray())) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a 3x3 matrix on a uniform variable. (Specified as [1,2,3,4,5,6,7,8,9] will result in [1,2,3][4,5,6][7,8,9] matrix)\n * @param uniformName Name of the variable.\n * @param matrix matrix to be set.\n */\n setMatrix3x3(uniformName, matrix) {\n this._valueCache[uniformName] = null;\n this.engine.setMatrix3x3(this._uniforms[uniformName], matrix);\n }\n /**\n * Sets a 2x2 matrix on a uniform variable. (Specified as [1,2,3,4] will result in [1,2][3,4] matrix)\n * @param uniformName Name of the variable.\n * @param matrix matrix to be set.\n */\n setMatrix2x2(uniformName, matrix) {\n this._valueCache[uniformName] = null;\n this.engine.setMatrix2x2(this._uniforms[uniformName], matrix);\n }\n /**\n * Sets a float on a uniform variable.\n * @param uniformName Name of the variable.\n * @param value value to be set.\n * @returns this effect.\n */\n setFloat(uniformName, value) {\n const cache = this._valueCache[uniformName];\n if (cache !== undefined && cache === value) {\n return;\n }\n if (this.engine.setFloat(this._uniforms[uniformName], value)) {\n this._valueCache[uniformName] = value;\n }\n }\n /**\n * Sets a Vector2 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param vector2 vector2 to be set.\n */\n setVector2(uniformName, vector2) {\n if (this._cacheFloat2(uniformName, vector2.x, vector2.y)) {\n if (!this.engine.setFloat2(this._uniforms[uniformName], vector2.x, vector2.y)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a float2 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First float in float2.\n * @param y Second float in float2.\n */\n setFloat2(uniformName, x, y) {\n if (this._cacheFloat2(uniformName, x, y)) {\n if (!this.engine.setFloat2(this._uniforms[uniformName], x, y)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a Vector3 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param vector3 Value to be set.\n */\n setVector3(uniformName, vector3) {\n if (this._cacheFloat3(uniformName, vector3.x, vector3.y, vector3.z)) {\n if (!this.engine.setFloat3(this._uniforms[uniformName], vector3.x, vector3.y, vector3.z)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a float3 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First float in float3.\n * @param y Second float in float3.\n * @param z Third float in float3.\n */\n setFloat3(uniformName, x, y, z) {\n if (this._cacheFloat3(uniformName, x, y, z)) {\n if (!this.engine.setFloat3(this._uniforms[uniformName], x, y, z)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a Vector4 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param vector4 Value to be set.\n */\n setVector4(uniformName, vector4) {\n if (this._cacheFloat4(uniformName, vector4.x, vector4.y, vector4.z, vector4.w)) {\n if (!this.engine.setFloat4(this._uniforms[uniformName], vector4.x, vector4.y, vector4.z, vector4.w)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a Quaternion on a uniform variable.\n * @param uniformName Name of the variable.\n * @param quaternion Value to be set.\n */\n setQuaternion(uniformName, quaternion) {\n if (this._cacheFloat4(uniformName, quaternion.x, quaternion.y, quaternion.z, quaternion.w)) {\n if (!this.engine.setFloat4(this._uniforms[uniformName], quaternion.x, quaternion.y, quaternion.z, quaternion.w)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a float4 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param x First float in float4.\n * @param y Second float in float4.\n * @param z Third float in float4.\n * @param w Fourth float in float4.\n * @returns this effect.\n */\n setFloat4(uniformName, x, y, z, w) {\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\n if (!this.engine.setFloat4(this._uniforms[uniformName], x, y, z, w)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a Color3 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param color3 Value to be set.\n */\n setColor3(uniformName, color3) {\n if (this._cacheFloat3(uniformName, color3.r, color3.g, color3.b)) {\n if (!this.engine.setFloat3(this._uniforms[uniformName], color3.r, color3.g, color3.b)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a Color4 on a uniform variable.\n * @param uniformName Name of the variable.\n * @param color3 Value to be set.\n * @param alpha Alpha value to be set.\n */\n setColor4(uniformName, color3, alpha) {\n if (this._cacheFloat4(uniformName, color3.r, color3.g, color3.b, alpha)) {\n if (!this.engine.setFloat4(this._uniforms[uniformName], color3.r, color3.g, color3.b, alpha)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n /**\n * Sets a Color4 on a uniform variable\n * @param uniformName defines the name of the variable\n * @param color4 defines the value to be set\n */\n setDirectColor4(uniformName, color4) {\n if (this._cacheFloat4(uniformName, color4.r, color4.g, color4.b, color4.a)) {\n if (!this.engine.setFloat4(this._uniforms[uniformName], color4.r, color4.g, color4.b, color4.a)) {\n this._valueCache[uniformName] = null;\n }\n }\n }\n _getVertexShaderCode() {\n return this.vertexShader ? this.engine._getShaderSource(this.vertexShader) : null;\n }\n _getFragmentShaderCode() {\n return this.fragmentShader ? this.engine._getShaderSource(this.fragmentShader) : null;\n }\n}\n//# sourceMappingURL=webGLPipelineContext.js.map","/** @internal */\nexport class WebGLHardwareTexture {\n get underlyingResource() {\n return this._webGLTexture;\n }\n constructor(existingTexture = null, context) {\n // There can be multiple buffers for a single WebGL texture because different layers of a 2DArrayTexture / 3DTexture\n // or different faces of a cube texture can be bound to different render targets at the same time.\n this._MSAARenderBuffers = null;\n this._context = context;\n if (!existingTexture) {\n existingTexture = context.createTexture();\n if (!existingTexture) {\n throw new Error(\"Unable to create webGL texture\");\n }\n }\n this.set(existingTexture);\n }\n setUsage() { }\n set(hardwareTexture) {\n this._webGLTexture = hardwareTexture;\n }\n reset() {\n this._webGLTexture = null;\n this._MSAARenderBuffers = null;\n }\n addMSAARenderBuffer(buffer) {\n if (!this._MSAARenderBuffers) {\n this._MSAARenderBuffers = [];\n }\n this._MSAARenderBuffers.push(buffer);\n }\n releaseMSAARenderBuffers() {\n if (this._MSAARenderBuffers) {\n for (const buffer of this._MSAARenderBuffers) {\n this._context.deleteRenderbuffer(buffer);\n }\n this._MSAARenderBuffers = null;\n }\n }\n getMSAARenderBuffer(index = 0) {\n var _a, _b;\n return (_b = (_a = this._MSAARenderBuffers) === null || _a === void 0 ? void 0 : _a[index]) !== null && _b !== void 0 ? _b : null;\n }\n release() {\n this.releaseMSAARenderBuffers();\n if (this._webGLTexture) {\n this._context.deleteTexture(this._webGLTexture);\n }\n this.reset();\n }\n}\n//# sourceMappingURL=webGLHardwareTexture.js.map","/** @internal */\nexport class DrawWrapper {\n static IsWrapper(effect) {\n return effect.getPipelineContext === undefined;\n }\n static GetEffect(effect) {\n return effect.getPipelineContext === undefined ? effect.effect : effect;\n }\n constructor(engine, createMaterialContext = true) {\n this.effect = null;\n this.defines = null;\n this.drawContext = engine.createDrawContext();\n if (createMaterialContext) {\n this.materialContext = engine.createMaterialContext();\n }\n }\n setEffect(effect, defines, resetContext = true) {\n var _a;\n this.effect = effect;\n if (defines !== undefined) {\n this.defines = defines;\n }\n if (resetContext) {\n (_a = this.drawContext) === null || _a === void 0 ? void 0 : _a.reset();\n }\n }\n dispose() {\n var _a;\n (_a = this.drawContext) === null || _a === void 0 ? void 0 : _a.dispose();\n }\n}\n//# sourceMappingURL=drawWrapper.js.map","/**\n * @internal\n **/\nexport class StencilStateComposer {\n get isDirty() {\n return this._isStencilTestDirty || this._isStencilMaskDirty || this._isStencilFuncDirty || this._isStencilOpDirty;\n }\n get func() {\n return this._func;\n }\n set func(value) {\n if (this._func === value) {\n return;\n }\n this._func = value;\n this._isStencilFuncDirty = true;\n }\n get funcRef() {\n return this._funcRef;\n }\n set funcRef(value) {\n if (this._funcRef === value) {\n return;\n }\n this._funcRef = value;\n this._isStencilFuncDirty = true;\n }\n get funcMask() {\n return this._funcMask;\n }\n set funcMask(value) {\n if (this._funcMask === value) {\n return;\n }\n this._funcMask = value;\n this._isStencilFuncDirty = true;\n }\n get opStencilFail() {\n return this._opStencilFail;\n }\n set opStencilFail(value) {\n if (this._opStencilFail === value) {\n return;\n }\n this._opStencilFail = value;\n this._isStencilOpDirty = true;\n }\n get opDepthFail() {\n return this._opDepthFail;\n }\n set opDepthFail(value) {\n if (this._opDepthFail === value) {\n return;\n }\n this._opDepthFail = value;\n this._isStencilOpDirty = true;\n }\n get opStencilDepthPass() {\n return this._opStencilDepthPass;\n }\n set opStencilDepthPass(value) {\n if (this._opStencilDepthPass === value) {\n return;\n }\n this._opStencilDepthPass = value;\n this._isStencilOpDirty = true;\n }\n get mask() {\n return this._mask;\n }\n set mask(value) {\n if (this._mask === value) {\n return;\n }\n this._mask = value;\n this._isStencilMaskDirty = true;\n }\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n if (this._enabled === value) {\n return;\n }\n this._enabled = value;\n this._isStencilTestDirty = true;\n }\n constructor(reset = true) {\n this._isStencilTestDirty = false;\n this._isStencilMaskDirty = false;\n this._isStencilFuncDirty = false;\n this._isStencilOpDirty = false;\n this.useStencilGlobalOnly = false;\n if (reset) {\n this.reset();\n }\n }\n reset() {\n var _a;\n this.stencilMaterial = undefined;\n (_a = this.stencilGlobal) === null || _a === void 0 ? void 0 : _a.reset();\n this._isStencilTestDirty = true;\n this._isStencilMaskDirty = true;\n this._isStencilFuncDirty = true;\n this._isStencilOpDirty = true;\n }\n apply(gl) {\n var _a;\n if (!gl) {\n return;\n }\n const stencilMaterialEnabled = !this.useStencilGlobalOnly && !!((_a = this.stencilMaterial) === null || _a === void 0 ? void 0 : _a.enabled);\n this.enabled = stencilMaterialEnabled ? this.stencilMaterial.enabled : this.stencilGlobal.enabled;\n this.func = stencilMaterialEnabled ? this.stencilMaterial.func : this.stencilGlobal.func;\n this.funcRef = stencilMaterialEnabled ? this.stencilMaterial.funcRef : this.stencilGlobal.funcRef;\n this.funcMask = stencilMaterialEnabled ? this.stencilMaterial.funcMask : this.stencilGlobal.funcMask;\n this.opStencilFail = stencilMaterialEnabled ? this.stencilMaterial.opStencilFail : this.stencilGlobal.opStencilFail;\n this.opDepthFail = stencilMaterialEnabled ? this.stencilMaterial.opDepthFail : this.stencilGlobal.opDepthFail;\n this.opStencilDepthPass = stencilMaterialEnabled ? this.stencilMaterial.opStencilDepthPass : this.stencilGlobal.opStencilDepthPass;\n this.mask = stencilMaterialEnabled ? this.stencilMaterial.mask : this.stencilGlobal.mask;\n if (!this.isDirty) {\n return;\n }\n // Stencil test\n if (this._isStencilTestDirty) {\n if (this.enabled) {\n gl.enable(gl.STENCIL_TEST);\n }\n else {\n gl.disable(gl.STENCIL_TEST);\n }\n this._isStencilTestDirty = false;\n }\n // Stencil mask\n if (this._isStencilMaskDirty) {\n gl.stencilMask(this.mask);\n this._isStencilMaskDirty = false;\n }\n // Stencil func\n if (this._isStencilFuncDirty) {\n gl.stencilFunc(this.func, this.funcRef, this.funcMask);\n this._isStencilFuncDirty = false;\n }\n // Stencil op\n if (this._isStencilOpDirty) {\n gl.stencilOp(this.opStencilFail, this.opDepthFail, this.opStencilDepthPass);\n this._isStencilOpDirty = false;\n }\n }\n}\n//# sourceMappingURL=stencilStateComposer.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { EngineStore } from \"./engineStore.js\";\nimport { Effect } from \"../Materials/effect.js\";\nimport { _WarnImport } from \"../Misc/devTools.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { DepthCullingState } from \"../States/depthCullingState.js\";\nimport { StencilState } from \"../States/stencilState.js\";\nimport { AlphaState } from \"../States/alphaCullingState.js\";\n\nimport { InternalTexture, InternalTextureSource } from \"../Materials/Textures/internalTexture.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { IsDocumentAvailable, IsWindowObjectExist } from \"../Misc/domManagement.js\";\nimport { WebGLShaderProcessor } from \"./WebGL/webGLShaderProcessors.js\";\nimport { WebGL2ShaderProcessor } from \"./WebGL/webGL2ShaderProcessors.js\";\nimport { WebGLDataBuffer } from \"../Meshes/WebGL/webGLDataBuffer.js\";\nimport { WebGLPipelineContext } from \"./WebGL/webGLPipelineContext.js\";\nimport { PerformanceConfigurator } from \"./performanceConfigurator.js\";\nimport { WebGLHardwareTexture } from \"./WebGL/webGLHardwareTexture.js\";\nimport { DrawWrapper } from \"../Materials/drawWrapper.js\";\nimport { StencilStateComposer } from \"../States/stencilStateComposer.js\";\nimport { ShaderLanguage } from \"../Materials/shaderLanguage.js\";\nimport { PrecisionDate } from \"../Misc/precisionDate.js\";\n/**\n * Keeps track of all the buffer info used in engine.\n */\nclass BufferPointer {\n}\n/**\n * The base engine class (root of all engines)\n */\nexport class ThinEngine {\n /**\n * Returns the current npm package of the sdk\n */\n // Not mixed with Version for tooling purpose.\n static get NpmPackage() {\n return \"babylonjs@6.31.0\";\n }\n /**\n * Returns the current version of the framework\n */\n static get Version() {\n return \"6.31.0\";\n }\n /**\n * Returns a string describing the current engine\n */\n get description() {\n let description = this.name + this.webGLVersion;\n if (this._caps.parallelShaderCompile) {\n description += \" - Parallel shader compilation\";\n }\n return description;\n }\n /**\n * Gets or sets the name of the engine\n */\n get name() {\n return this._name;\n }\n set name(value) {\n this._name = value;\n }\n /**\n * Returns the version of the engine\n */\n get version() {\n return this._webGLVersion;\n }\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Gets or sets the relative url used to load shaders if using the engine in non-minified mode\n */\n static get ShadersRepository() {\n return Effect.ShadersRepository;\n }\n static set ShadersRepository(value) {\n Effect.ShadersRepository = value;\n }\n /**\n * @internal\n */\n _getShaderProcessor(shaderLanguage) {\n return this._shaderProcessor;\n }\n /**\n * Gets or sets a boolean indicating if depth buffer should be reverse, going from far to near.\n * This can provide greater z depth for distant objects.\n */\n get useReverseDepthBuffer() {\n return this._useReverseDepthBuffer;\n }\n set useReverseDepthBuffer(useReverse) {\n if (useReverse === this._useReverseDepthBuffer) {\n return;\n }\n this._useReverseDepthBuffer = useReverse;\n if (useReverse) {\n this._depthCullingState.depthFunc = 518;\n }\n else {\n this._depthCullingState.depthFunc = 515;\n }\n }\n /**\n * Gets the current frame id\n */\n get frameId() {\n return this._frameId;\n }\n /**\n * Gets a boolean indicating that the engine supports uniform buffers\n * @see https://doc.babylonjs.com/setup/support/webGL2#uniform-buffer-objets\n */\n get supportsUniformBuffers() {\n return this.webGLVersion > 1 && !this.disableUniformBuffers;\n }\n /**\n * Gets the options used for engine creation\n * @returns EngineOptions object\n */\n getCreationOptions() {\n return this._creationOptions;\n }\n /** @internal */\n get _shouldUseHighPrecisionShader() {\n return !!(this._caps.highPrecisionShaderSupported && this._highPrecisionShadersAllowed);\n }\n /**\n * Gets a boolean indicating that only power of 2 textures are supported\n * Please note that you can still use non power of 2 textures but in this case the engine will forcefully convert them\n */\n get needPOTTextures() {\n return this._webGLVersion < 2 || this.forcePOTTextures;\n }\n /**\n * Gets the list of current active render loop functions\n * @returns an array with the current render loop functions\n */\n get activeRenderLoops() {\n return this._activeRenderLoops;\n }\n /**\n * Gets or sets a boolean indicating if resources should be retained to be able to handle context lost events\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#handling-webgl-context-lost\n */\n get doNotHandleContextLost() {\n return this._doNotHandleContextLost;\n }\n set doNotHandleContextLost(value) {\n this._doNotHandleContextLost = value;\n }\n get _supportsHardwareTextureRescaling() {\n return false;\n }\n /**\n * sets the object from which width and height will be taken from when getting render width and height\n * Will fallback to the gl object\n * @param dimensions the framebuffer width and height that will be used.\n */\n set framebufferDimensionsObject(dimensions) {\n this._framebufferDimensionsObject = dimensions;\n }\n /**\n * Gets the current viewport\n */\n get currentViewport() {\n return this._cachedViewport;\n }\n /**\n * Gets the default empty texture\n */\n get emptyTexture() {\n if (!this._emptyTexture) {\n this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, 5, false, false, 1);\n }\n return this._emptyTexture;\n }\n /**\n * Gets the default empty 3D texture\n */\n get emptyTexture3D() {\n if (!this._emptyTexture3D) {\n this._emptyTexture3D = this.createRawTexture3D(new Uint8Array(4), 1, 1, 1, 5, false, false, 1);\n }\n return this._emptyTexture3D;\n }\n /**\n * Gets the default empty 2D array texture\n */\n get emptyTexture2DArray() {\n if (!this._emptyTexture2DArray) {\n this._emptyTexture2DArray = this.createRawTexture2DArray(new Uint8Array(4), 1, 1, 1, 5, false, false, 1);\n }\n return this._emptyTexture2DArray;\n }\n /**\n * Gets the default empty cube texture\n */\n get emptyCubeTexture() {\n if (!this._emptyCubeTexture) {\n const faceData = new Uint8Array(4);\n const cubeData = [faceData, faceData, faceData, faceData, faceData, faceData];\n this._emptyCubeTexture = this.createRawCubeTexture(cubeData, 1, 5, 0, false, false, 1);\n }\n return this._emptyCubeTexture;\n }\n /**\n * Gets a boolean indicating if the engine runs in WebGPU or not.\n */\n get isWebGPU() {\n return this._isWebGPU;\n }\n /**\n * Gets the shader platform name used by the effects.\n */\n get shaderPlatformName() {\n return this._shaderPlatformName;\n }\n /**\n * Enables or disables the snapshot rendering mode\n * Note that the WebGL engine does not support snapshot rendering so setting the value won't have any effect for this engine\n */\n get snapshotRendering() {\n return false;\n }\n set snapshotRendering(activate) {\n // WebGL engine does not support snapshot rendering\n }\n /**\n * Gets or sets the snapshot rendering mode\n */\n get snapshotRenderingMode() {\n return this._snapshotRenderingMode;\n }\n set snapshotRenderingMode(mode) {\n this._snapshotRenderingMode = mode;\n }\n /**\n * Creates a new snapshot at the next frame using the current snapshotRenderingMode\n */\n snapshotRenderingReset() {\n this.snapshotRendering = false;\n }\n static _CreateCanvas(width, height) {\n if (typeof document === \"undefined\") {\n return new OffscreenCanvas(width, height);\n }\n const canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n /**\n * Create a canvas. This method is overridden by other engines\n * @param width width\n * @param height height\n * @returns ICanvas interface\n */\n createCanvas(width, height) {\n return ThinEngine._CreateCanvas(width, height);\n }\n /**\n * Create an image to use with canvas\n * @returns IImage interface\n */\n createCanvasImage() {\n return document.createElement(\"img\");\n }\n /**\n * Creates a new engine\n * @param canvasOrContext defines the canvas or WebGL context to use for rendering. If you provide a WebGL context, Babylon.js will not hook events on the canvas (like pointers, keyboards, etc...) so no event observables will be available. This is mostly used when Babylon.js is used as a plugin on a system which already used the WebGL context\n * @param antialias defines enable antialiasing (default: false)\n * @param options defines further options to be sent to the getContext() function\n * @param adaptToDeviceRatio defines whether to adapt to the device's viewport characteristics (default: false)\n */\n constructor(canvasOrContext, antialias, options, adaptToDeviceRatio) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n /** @internal */\n this._name = \"WebGL\";\n this._isDisposed = false;\n /**\n * Gets or sets a boolean that indicates if textures must be forced to power of 2 size even if not required\n */\n this.forcePOTTextures = false;\n /**\n * Gets a boolean indicating if the engine is currently rendering in fullscreen mode\n */\n this.isFullscreen = false;\n /**\n * Gets or sets a boolean indicating if back faces must be culled. If false, front faces are culled instead (true by default)\n * If non null, this takes precedence over the value from the material\n */\n this.cullBackFaces = null;\n /**\n * Gets or sets a boolean indicating if the engine must keep rendering even if the window is not in foreground\n */\n this.renderEvenInBackground = true;\n /**\n * Gets or sets a boolean indicating that cache can be kept between frames\n */\n this.preventCacheWipeBetweenFrames = false;\n /** Gets or sets a boolean indicating if the engine should validate programs after compilation */\n this.validateShaderPrograms = false;\n this._useReverseDepthBuffer = false;\n /**\n * Indicates if the z range in NDC space is 0..1 (value: true) or -1..1 (value: false)\n */\n this.isNDCHalfZRange = false;\n /**\n * Indicates that the origin of the texture/framebuffer space is the bottom left corner. If false, the origin is top left\n */\n this.hasOriginBottomLeft = true;\n /**\n * Gets or sets a boolean indicating that uniform buffers must be disabled even if they are supported\n */\n this.disableUniformBuffers = false;\n /**\n * An event triggered when the engine is disposed.\n */\n this.onDisposeObservable = new Observable();\n this._frameId = 0;\n /** @internal */\n this._uniformBuffers = new Array();\n /** @internal */\n this._storageBuffers = new Array();\n /** @internal */\n this._webGLVersion = 1.0;\n this._windowIsBackground = false;\n this._highPrecisionShadersAllowed = true;\n /** @internal */\n this._badOS = false;\n /** @internal */\n this._badDesktopOS = false;\n this._renderingQueueLaunched = false;\n this._activeRenderLoops = new Array();\n // Lost context\n /**\n * Observable signaled when a context lost event is raised\n */\n this.onContextLostObservable = new Observable();\n /**\n * Observable signaled when a context restored event is raised\n */\n this.onContextRestoredObservable = new Observable();\n this._contextWasLost = false;\n /** @internal */\n this._doNotHandleContextLost = false;\n /**\n * Gets or sets a boolean indicating that vertex array object must be disabled even if they are supported\n */\n this.disableVertexArrayObjects = false;\n // States\n /** @internal */\n this._colorWrite = true;\n /** @internal */\n this._colorWriteChanged = true;\n /** @internal */\n this._depthCullingState = new DepthCullingState();\n /** @internal */\n this._stencilStateComposer = new StencilStateComposer();\n /** @internal */\n this._stencilState = new StencilState();\n /** @internal */\n this._alphaState = new AlphaState();\n /** @internal */\n this._alphaMode = 1;\n /** @internal */\n this._alphaEquation = 0;\n // Cache\n /** @internal */\n this._internalTexturesCache = new Array();\n /** @internal */\n this._renderTargetWrapperCache = new Array();\n /** @internal */\n this._activeChannel = 0;\n this._currentTextureChannel = -1;\n /** @internal */\n this._boundTexturesCache = {};\n this._compiledEffects = {};\n this._vertexAttribArraysEnabled = [];\n /** @internal */\n this._currentRenderTarget = null;\n this._uintIndicesCurrentlySet = false;\n this._currentBoundBuffer = new Array();\n /** @internal */\n this._currentFramebuffer = null;\n /** @internal */\n this._dummyFramebuffer = null;\n this._currentBufferPointers = new Array();\n this._currentInstanceLocations = new Array();\n this._currentInstanceBuffers = new Array();\n this._vaoRecordInProgress = false;\n this._mustWipeVertexAttributes = false;\n this._nextFreeTextureSlots = new Array();\n this._maxSimultaneousTextures = 0;\n this._maxMSAASamplesOverride = null;\n this._activeRequests = new Array();\n /**\n * If set to true zooming in and out in the browser will rescale the hardware-scaling correctly.\n */\n this.adaptToDeviceRatio = false;\n /** @internal */\n this._lastDevicePixelRatio = 1.0;\n /** @internal */\n this._transformTextureUrl = null;\n /**\n * Gets information about the current host\n */\n this.hostInformation = {\n isMobile: false,\n };\n /**\n * Defines whether the engine has been created with the premultipliedAlpha option on or not.\n */\n this.premultipliedAlpha = true;\n /**\n * Observable event triggered before each texture is initialized\n */\n this.onBeforeTextureInitObservable = new Observable();\n /** @internal */\n this._isWebGPU = false;\n this._snapshotRenderingMode = 0;\n this._viewportCached = { x: 0, y: 0, z: 0, w: 0 };\n this._unpackFlipYCached = null;\n /**\n * In case you are sharing the context with other applications, it might\n * be interested to not cache the unpack flip y state to ensure a consistent\n * value would be set.\n */\n this.enableUnpackFlipYCached = true;\n this._boundUniforms = {};\n this.startTime = PrecisionDate.Now;\n let canvas = null;\n options = options || {};\n this._creationOptions = options;\n // Save this off for use in resize().\n this.adaptToDeviceRatio = adaptToDeviceRatio !== null && adaptToDeviceRatio !== void 0 ? adaptToDeviceRatio : false;\n this._stencilStateComposer.stencilGlobal = this._stencilState;\n PerformanceConfigurator.SetMatrixPrecision(!!options.useHighPrecisionMatrix);\n options.antialias = antialias !== null && antialias !== void 0 ? antialias : options.antialias;\n options.deterministicLockstep = (_a = options.deterministicLockstep) !== null && _a !== void 0 ? _a : false;\n options.lockstepMaxSteps = (_b = options.lockstepMaxSteps) !== null && _b !== void 0 ? _b : 4;\n options.timeStep = (_c = options.timeStep) !== null && _c !== void 0 ? _c : 1 / 60;\n options.audioEngine = (_d = options.audioEngine) !== null && _d !== void 0 ? _d : true;\n options.stencil = (_e = options.stencil) !== null && _e !== void 0 ? _e : true;\n this._audioContext = (_g = (_f = options.audioEngineOptions) === null || _f === void 0 ? void 0 : _f.audioContext) !== null && _g !== void 0 ? _g : null;\n this._audioDestination = (_j = (_h = options.audioEngineOptions) === null || _h === void 0 ? void 0 : _h.audioDestination) !== null && _j !== void 0 ? _j : null;\n this.premultipliedAlpha = (_k = options.premultipliedAlpha) !== null && _k !== void 0 ? _k : true;\n this.useExactSrgbConversions = (_l = options.useExactSrgbConversions) !== null && _l !== void 0 ? _l : false;\n this._doNotHandleContextLost = !!options.doNotHandleContextLost;\n this._isStencilEnable = options.stencil ? true : false;\n // Viewport\n adaptToDeviceRatio = adaptToDeviceRatio || options.adaptToDeviceRatio || false;\n const devicePixelRatio = IsWindowObjectExist() ? window.devicePixelRatio || 1.0 : 1.0;\n const limitDeviceRatio = options.limitDeviceRatio || devicePixelRatio;\n this._hardwareScalingLevel = adaptToDeviceRatio ? 1.0 / Math.min(limitDeviceRatio, devicePixelRatio) : 1.0;\n this._lastDevicePixelRatio = devicePixelRatio;\n if (!canvasOrContext) {\n return;\n }\n if (canvasOrContext.getContext) {\n canvas = canvasOrContext;\n this._renderingCanvas = canvas;\n if (options.preserveDrawingBuffer === undefined) {\n options.preserveDrawingBuffer = false;\n }\n if (options.xrCompatible === undefined) {\n options.xrCompatible = true;\n }\n // Exceptions\n if (navigator && navigator.userAgent) {\n this._setupMobileChecks();\n const ua = navigator.userAgent;\n for (const exception of ThinEngine.ExceptionList) {\n const key = exception.key;\n const targets = exception.targets;\n const check = new RegExp(key);\n if (check.test(ua)) {\n if (exception.capture && exception.captureConstraint) {\n const capture = exception.capture;\n const constraint = exception.captureConstraint;\n const regex = new RegExp(capture);\n const matches = regex.exec(ua);\n if (matches && matches.length > 0) {\n const capturedValue = parseInt(matches[matches.length - 1]);\n if (capturedValue >= constraint) {\n continue;\n }\n }\n }\n for (const target of targets) {\n switch (target) {\n case \"uniformBuffer\":\n this.disableUniformBuffers = true;\n break;\n case \"vao\":\n this.disableVertexArrayObjects = true;\n break;\n case \"antialias\":\n options.antialias = false;\n break;\n case \"maxMSAASamples\":\n this._maxMSAASamplesOverride = 1;\n break;\n }\n }\n }\n }\n }\n // Context lost\n if (!this._doNotHandleContextLost) {\n this._onContextLost = (evt) => {\n evt.preventDefault();\n this._contextWasLost = true;\n Logger.Warn(\"WebGL context lost.\");\n this.onContextLostObservable.notifyObservers(this);\n };\n this._onContextRestored = () => {\n this._restoreEngineAfterContextLost(() => this._initGLContext());\n };\n canvas.addEventListener(\"webglcontextlost\", this._onContextLost, false);\n canvas.addEventListener(\"webglcontextrestored\", this._onContextRestored, false);\n options.powerPreference = options.powerPreference || \"high-performance\";\n }\n // Detect if we are running on a faulty buggy desktop OS.\n this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (this._badDesktopOS) {\n options.xrCompatible = false;\n }\n // GL\n if (!options.disableWebGL2Support) {\n try {\n this._gl = (canvas.getContext(\"webgl2\", options) || canvas.getContext(\"experimental-webgl2\", options));\n if (this._gl) {\n this._webGLVersion = 2.0;\n this._shaderPlatformName = \"WEBGL2\";\n // Prevent weird browsers to lie (yeah that happens!)\n if (!this._gl.deleteQuery) {\n this._webGLVersion = 1.0;\n this._shaderPlatformName = \"WEBGL1\";\n }\n }\n }\n catch (e) {\n // Do nothing\n }\n }\n if (!this._gl) {\n if (!canvas) {\n throw new Error(\"The provided canvas is null or undefined.\");\n }\n try {\n this._gl = (canvas.getContext(\"webgl\", options) || canvas.getContext(\"experimental-webgl\", options));\n }\n catch (e) {\n throw new Error(\"WebGL not supported\");\n }\n }\n if (!this._gl) {\n throw new Error(\"WebGL not supported\");\n }\n }\n else {\n this._gl = canvasOrContext;\n this._renderingCanvas = this._gl.canvas;\n if (this._gl.renderbufferStorageMultisample) {\n this._webGLVersion = 2.0;\n this._shaderPlatformName = \"WEBGL2\";\n }\n else {\n this._shaderPlatformName = \"WEBGL1\";\n }\n const attributes = this._gl.getContextAttributes();\n if (attributes) {\n options.stencil = attributes.stencil;\n }\n }\n // Ensures a consistent color space unpacking of textures cross browser.\n this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this._gl.NONE);\n if (options.useHighPrecisionFloats !== undefined) {\n this._highPrecisionShadersAllowed = options.useHighPrecisionFloats;\n }\n this.resize();\n this._initGLContext();\n this._initFeatures();\n // Prepare buffer pointers\n for (let i = 0; i < this._caps.maxVertexAttribs; i++) {\n this._currentBufferPointers[i] = new BufferPointer();\n }\n // Shader processor\n this._shaderProcessor = this.webGLVersion > 1 ? new WebGL2ShaderProcessor() : new WebGLShaderProcessor();\n // Detect if we are running on a faulty buggy OS.\n this._badOS = /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent);\n // Starting with iOS 14, we can trust the browser\n // let matches = navigator.userAgent.match(/Version\\/(\\d+)/);\n // if (matches && matches.length === 2) {\n // if (parseInt(matches[1]) >= 14) {\n // this._badOS = false;\n // }\n // }\n const versionToLog = `Babylon.js v${ThinEngine.Version}`;\n console.log(versionToLog + ` - ${this.description}`);\n // Check setAttribute in case of workers\n if (this._renderingCanvas && this._renderingCanvas.setAttribute) {\n this._renderingCanvas.setAttribute(\"data-engine\", versionToLog);\n }\n }\n _setupMobileChecks() {\n if (!(navigator && navigator.userAgent)) {\n return;\n }\n // Function to check if running on mobile device\n this._checkForMobile = () => {\n const currentUA = navigator.userAgent;\n this.hostInformation.isMobile =\n currentUA.indexOf(\"Mobile\") !== -1 ||\n // Needed for iOS 13+ detection on iPad (inspired by solution from https://stackoverflow.com/questions/9038625/detect-if-device-is-ios)\n (currentUA.indexOf(\"Mac\") !== -1 && IsDocumentAvailable() && \"ontouchend\" in document);\n };\n // Set initial isMobile value\n this._checkForMobile();\n // Set up event listener to check when window is resized (used to get emulator activation to work properly)\n if (IsWindowObjectExist()) {\n window.addEventListener(\"resize\", this._checkForMobile);\n }\n }\n _restoreEngineAfterContextLost(initEngine) {\n // Adding a timeout to avoid race condition at browser level\n setTimeout(async () => {\n var _a;\n this._dummyFramebuffer = null;\n const depthTest = this._depthCullingState.depthTest; // backup those values because the call to initEngine / wipeCaches will reset them\n const depthFunc = this._depthCullingState.depthFunc;\n const depthMask = this._depthCullingState.depthMask;\n const stencilTest = this._stencilState.stencilTest;\n // Rebuild context\n await initEngine();\n // Ensure webgl and engine states are matching\n this.wipeCaches(true);\n // Rebuild effects\n this._rebuildEffects();\n (_a = this._rebuildComputeEffects) === null || _a === void 0 ? void 0 : _a.call(this);\n // Note:\n // The call to _rebuildBuffers must be made before the call to _rebuildInternalTextures because in the process of _rebuildBuffers the buffers used by the post process managers will be rebuilt\n // and we may need to use the post process manager of the scene during _rebuildInternalTextures (in WebGL1, non-POT textures are rescaled using a post process + post process manager of the scene)\n // Rebuild buffers\n this._rebuildBuffers();\n // Rebuild textures\n this._rebuildInternalTextures();\n // Rebuild textures\n this._rebuildRenderTargetWrappers();\n // Reset engine states after all the buffer/textures/... have been rebuilt\n this.wipeCaches(true);\n this._depthCullingState.depthTest = depthTest;\n this._depthCullingState.depthFunc = depthFunc;\n this._depthCullingState.depthMask = depthMask;\n this._stencilState.stencilTest = stencilTest;\n Logger.Warn(this.name + \" context successfully restored.\");\n this.onContextRestoredObservable.notifyObservers(this);\n this._contextWasLost = false;\n }, 0);\n }\n /**\n * Shared initialization across engines types.\n * @param canvas The canvas associated with this instance of the engine.\n */\n _sharedInit(canvas) {\n this._renderingCanvas = canvas;\n }\n /**\n * @internal\n */\n _getShaderProcessingContext(shaderLanguage) {\n return null;\n }\n _rebuildInternalTextures() {\n const currentState = this._internalTexturesCache.slice(); // Do a copy because the rebuild will add proxies\n for (const internalTexture of currentState) {\n internalTexture._rebuild();\n }\n }\n _rebuildRenderTargetWrappers() {\n const currentState = this._renderTargetWrapperCache.slice(); // Do a copy because the rebuild will add proxies\n for (const renderTargetWrapper of currentState) {\n renderTargetWrapper._rebuild();\n }\n }\n _rebuildEffects() {\n for (const key in this._compiledEffects) {\n const effect = this._compiledEffects[key];\n effect._pipelineContext = null; // because _prepareEffect will try to dispose this pipeline before recreating it and that would lead to webgl errors\n effect._wasPreviouslyReady = false;\n effect._prepareEffect();\n }\n Effect.ResetCache();\n }\n /**\n * Gets a boolean indicating if all created effects are ready\n * @returns true if all effects are ready\n */\n areAllEffectsReady() {\n for (const key in this._compiledEffects) {\n const effect = this._compiledEffects[key];\n if (!effect.isReady()) {\n return false;\n }\n }\n return true;\n }\n _rebuildBuffers() {\n // Uniforms\n for (const uniformBuffer of this._uniformBuffers) {\n uniformBuffer._rebuild();\n }\n // Storage buffers\n for (const storageBuffer of this._storageBuffers) {\n storageBuffer._rebuild();\n }\n }\n _initGLContext() {\n var _a;\n // Caps\n this._caps = {\n maxTexturesImageUnits: this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),\n maxCombinedTexturesImageUnits: this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),\n maxVertexTextureImageUnits: this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),\n maxTextureSize: this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),\n maxSamples: this._webGLVersion > 1 ? this._gl.getParameter(this._gl.MAX_SAMPLES) : 1,\n maxCubemapTextureSize: this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),\n maxRenderTextureSize: this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),\n maxVertexAttribs: this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),\n maxVaryingVectors: this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),\n maxFragmentUniformVectors: this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),\n maxVertexUniformVectors: this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),\n parallelShaderCompile: this._gl.getExtension(\"KHR_parallel_shader_compile\") || undefined,\n standardDerivatives: this._webGLVersion > 1 || this._gl.getExtension(\"OES_standard_derivatives\") !== null,\n maxAnisotropy: 1,\n astc: this._gl.getExtension(\"WEBGL_compressed_texture_astc\") || this._gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_astc\"),\n bptc: this._gl.getExtension(\"EXT_texture_compression_bptc\") || this._gl.getExtension(\"WEBKIT_EXT_texture_compression_bptc\"),\n s3tc: this._gl.getExtension(\"WEBGL_compressed_texture_s3tc\") || this._gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_s3tc\"),\n // eslint-disable-next-line @typescript-eslint/naming-convention\n s3tc_srgb: this._gl.getExtension(\"WEBGL_compressed_texture_s3tc_srgb\") || this._gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_s3tc_srgb\"),\n pvrtc: this._gl.getExtension(\"WEBGL_compressed_texture_pvrtc\") || this._gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_pvrtc\"),\n etc1: this._gl.getExtension(\"WEBGL_compressed_texture_etc1\") || this._gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_etc1\"),\n etc2: this._gl.getExtension(\"WEBGL_compressed_texture_etc\") ||\n this._gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_etc\") ||\n this._gl.getExtension(\"WEBGL_compressed_texture_es3_0\"),\n textureAnisotropicFilterExtension: this._gl.getExtension(\"EXT_texture_filter_anisotropic\") ||\n this._gl.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\") ||\n this._gl.getExtension(\"MOZ_EXT_texture_filter_anisotropic\"),\n uintIndices: this._webGLVersion > 1 || this._gl.getExtension(\"OES_element_index_uint\") !== null,\n fragmentDepthSupported: this._webGLVersion > 1 || this._gl.getExtension(\"EXT_frag_depth\") !== null,\n highPrecisionShaderSupported: false,\n timerQuery: this._gl.getExtension(\"EXT_disjoint_timer_query_webgl2\") || this._gl.getExtension(\"EXT_disjoint_timer_query\"),\n supportOcclusionQuery: this._webGLVersion > 1,\n canUseTimestampForTimerQuery: false,\n drawBuffersExtension: false,\n maxMSAASamples: 1,\n colorBufferFloat: !!(this._webGLVersion > 1 && this._gl.getExtension(\"EXT_color_buffer_float\")),\n supportFloatTexturesResolve: false,\n colorBufferHalfFloat: !!(this._webGLVersion > 1 && this._gl.getExtension(\"EXT_color_buffer_half_float\")),\n textureFloat: this._webGLVersion > 1 || this._gl.getExtension(\"OES_texture_float\") ? true : false,\n textureHalfFloat: this._webGLVersion > 1 || this._gl.getExtension(\"OES_texture_half_float\") ? true : false,\n textureHalfFloatRender: false,\n textureFloatLinearFiltering: false,\n textureFloatRender: false,\n textureHalfFloatLinearFiltering: false,\n vertexArrayObject: false,\n instancedArrays: false,\n textureLOD: this._webGLVersion > 1 || this._gl.getExtension(\"EXT_shader_texture_lod\") ? true : false,\n texelFetch: this._webGLVersion !== 1,\n blendMinMax: false,\n multiview: this._gl.getExtension(\"OVR_multiview2\"),\n oculusMultiview: this._gl.getExtension(\"OCULUS_multiview\"),\n depthTextureExtension: false,\n canUseGLInstanceID: this._webGLVersion > 1,\n canUseGLVertexID: this._webGLVersion > 1,\n supportComputeShaders: false,\n supportSRGBBuffers: false,\n supportTransformFeedbacks: this._webGLVersion > 1,\n textureMaxLevel: this._webGLVersion > 1,\n texture2DArrayMaxLayerCount: this._webGLVersion > 1 ? this._gl.getParameter(this._gl.MAX_ARRAY_TEXTURE_LAYERS) : 128,\n disableMorphTargetTexture: false,\n };\n this._caps.supportFloatTexturesResolve = this._caps.colorBufferFloat;\n // Infos\n this._glVersion = this._gl.getParameter(this._gl.VERSION);\n const rendererInfo = this._gl.getExtension(\"WEBGL_debug_renderer_info\");\n if (rendererInfo != null) {\n this._glRenderer = this._gl.getParameter(rendererInfo.UNMASKED_RENDERER_WEBGL);\n this._glVendor = this._gl.getParameter(rendererInfo.UNMASKED_VENDOR_WEBGL);\n }\n if (!this._glVendor) {\n this._glVendor = this._gl.getParameter(this._gl.VENDOR) || \"Unknown vendor\";\n }\n if (!this._glRenderer) {\n this._glRenderer = this._gl.getParameter(this._gl.RENDERER) || \"Unknown renderer\";\n }\n // Constants\n if (this._gl.HALF_FLOAT_OES !== 0x8d61) {\n this._gl.HALF_FLOAT_OES = 0x8d61; // Half floating-point type (16-bit).\n }\n if (this._gl.RGBA16F !== 0x881a) {\n this._gl.RGBA16F = 0x881a; // RGBA 16-bit floating-point color-renderable internal sized format.\n }\n if (this._gl.RGBA32F !== 0x8814) {\n this._gl.RGBA32F = 0x8814; // RGBA 32-bit floating-point color-renderable internal sized format.\n }\n if (this._gl.DEPTH24_STENCIL8 !== 35056) {\n this._gl.DEPTH24_STENCIL8 = 35056;\n }\n // Extensions\n if (this._caps.timerQuery) {\n if (this._webGLVersion === 1) {\n this._gl.getQuery = this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery);\n }\n // WebGLQuery casted to number to avoid TS error\n this._caps.canUseTimestampForTimerQuery = ((_a = this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT, this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)) !== null && _a !== void 0 ? _a : 0) > 0;\n }\n this._caps.maxAnisotropy = this._caps.textureAnisotropicFilterExtension\n ? this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT)\n : 0;\n this._caps.textureFloatLinearFiltering = this._caps.textureFloat && this._gl.getExtension(\"OES_texture_float_linear\") ? true : false;\n this._caps.textureFloatRender = this._caps.textureFloat && this._canRenderToFloatFramebuffer() ? true : false;\n this._caps.textureHalfFloatLinearFiltering =\n this._webGLVersion > 1 || (this._caps.textureHalfFloat && this._gl.getExtension(\"OES_texture_half_float_linear\")) ? true : false;\n // Compressed formats\n if (this._caps.astc) {\n this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;\n }\n if (this._caps.bptc) {\n this._gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT = this._caps.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;\n }\n if (this._caps.s3tc_srgb) {\n this._gl.COMPRESSED_SRGB_S3TC_DXT1_EXT = this._caps.s3tc_srgb.COMPRESSED_SRGB_S3TC_DXT1_EXT;\n this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;\n this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;\n }\n if (this._caps.etc2) {\n this._gl.COMPRESSED_SRGB8_ETC2 = this._caps.etc2.COMPRESSED_SRGB8_ETC2;\n this._gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = this._caps.etc2.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC;\n }\n // Checks if some of the format renders first to allow the use of webgl inspector.\n if (this._webGLVersion > 1) {\n if (this._gl.HALF_FLOAT_OES !== 0x140b) {\n this._gl.HALF_FLOAT_OES = 0x140b;\n }\n }\n this._caps.textureHalfFloatRender = this._caps.textureHalfFloat && this._canRenderToHalfFloatFramebuffer();\n // Draw buffers\n if (this._webGLVersion > 1) {\n this._caps.drawBuffersExtension = true;\n this._caps.maxMSAASamples = this._maxMSAASamplesOverride !== null ? this._maxMSAASamplesOverride : this._gl.getParameter(this._gl.MAX_SAMPLES);\n }\n else {\n const drawBuffersExtension = this._gl.getExtension(\"WEBGL_draw_buffers\");\n if (drawBuffersExtension !== null) {\n this._caps.drawBuffersExtension = true;\n this._gl.drawBuffers = drawBuffersExtension.drawBuffersWEBGL.bind(drawBuffersExtension);\n this._gl.DRAW_FRAMEBUFFER = this._gl.FRAMEBUFFER;\n for (let i = 0; i < 16; i++) {\n this._gl[\"COLOR_ATTACHMENT\" + i + \"_WEBGL\"] = drawBuffersExtension[\"COLOR_ATTACHMENT\" + i + \"_WEBGL\"];\n }\n }\n }\n // Depth Texture\n if (this._webGLVersion > 1) {\n this._caps.depthTextureExtension = true;\n }\n else {\n const depthTextureExtension = this._gl.getExtension(\"WEBGL_depth_texture\");\n if (depthTextureExtension != null) {\n this._caps.depthTextureExtension = true;\n this._gl.UNSIGNED_INT_24_8 = depthTextureExtension.UNSIGNED_INT_24_8_WEBGL;\n }\n }\n // Vertex array object\n if (this.disableVertexArrayObjects) {\n this._caps.vertexArrayObject = false;\n }\n else if (this._webGLVersion > 1) {\n this._caps.vertexArrayObject = true;\n }\n else {\n const vertexArrayObjectExtension = this._gl.getExtension(\"OES_vertex_array_object\");\n if (vertexArrayObjectExtension != null) {\n this._caps.vertexArrayObject = true;\n this._gl.createVertexArray = vertexArrayObjectExtension.createVertexArrayOES.bind(vertexArrayObjectExtension);\n this._gl.bindVertexArray = vertexArrayObjectExtension.bindVertexArrayOES.bind(vertexArrayObjectExtension);\n this._gl.deleteVertexArray = vertexArrayObjectExtension.deleteVertexArrayOES.bind(vertexArrayObjectExtension);\n }\n }\n // Instances count\n if (this._webGLVersion > 1) {\n this._caps.instancedArrays = true;\n }\n else {\n const instanceExtension = this._gl.getExtension(\"ANGLE_instanced_arrays\");\n if (instanceExtension != null) {\n this._caps.instancedArrays = true;\n this._gl.drawArraysInstanced = instanceExtension.drawArraysInstancedANGLE.bind(instanceExtension);\n this._gl.drawElementsInstanced = instanceExtension.drawElementsInstancedANGLE.bind(instanceExtension);\n this._gl.vertexAttribDivisor = instanceExtension.vertexAttribDivisorANGLE.bind(instanceExtension);\n }\n else {\n this._caps.instancedArrays = false;\n }\n }\n if (this._gl.getShaderPrecisionFormat) {\n const vertexhighp = this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER, this._gl.HIGH_FLOAT);\n const fragmenthighp = this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER, this._gl.HIGH_FLOAT);\n if (vertexhighp && fragmenthighp) {\n this._caps.highPrecisionShaderSupported = vertexhighp.precision !== 0 && fragmenthighp.precision !== 0;\n }\n }\n if (this._webGLVersion > 1) {\n this._caps.blendMinMax = true;\n }\n else {\n const blendMinMaxExtension = this._gl.getExtension(\"EXT_blend_minmax\");\n if (blendMinMaxExtension != null) {\n this._caps.blendMinMax = true;\n this._gl.MAX = blendMinMaxExtension.MAX_EXT;\n this._gl.MIN = blendMinMaxExtension.MIN_EXT;\n }\n }\n // sRGB buffers\n // only run this if not already set to true (in the constructor, for example)\n if (!this._caps.supportSRGBBuffers) {\n if (this._webGLVersion > 1) {\n this._caps.supportSRGBBuffers = true;\n this._glSRGBExtensionValues = {\n SRGB: WebGL2RenderingContext.SRGB,\n SRGB8: WebGL2RenderingContext.SRGB8,\n SRGB8_ALPHA8: WebGL2RenderingContext.SRGB8_ALPHA8,\n };\n }\n else {\n const sRGBExtension = this._gl.getExtension(\"EXT_sRGB\");\n if (sRGBExtension != null) {\n this._caps.supportSRGBBuffers = true;\n this._glSRGBExtensionValues = {\n SRGB: sRGBExtension.SRGB_EXT,\n SRGB8: sRGBExtension.SRGB_ALPHA_EXT,\n SRGB8_ALPHA8: sRGBExtension.SRGB_ALPHA_EXT,\n };\n }\n }\n // take into account the forced state that was provided in options\n // When the issue in angle/chrome is fixed the flag should be taken into account only when it is explicitly defined\n this._caps.supportSRGBBuffers = this._caps.supportSRGBBuffers && !!(this._creationOptions && this._creationOptions.forceSRGBBufferSupportState);\n }\n // Depth buffer\n this._depthCullingState.depthTest = true;\n this._depthCullingState.depthFunc = this._gl.LEQUAL;\n this._depthCullingState.depthMask = true;\n // Texture maps\n this._maxSimultaneousTextures = this._caps.maxCombinedTexturesImageUnits;\n for (let slot = 0; slot < this._maxSimultaneousTextures; slot++) {\n this._nextFreeTextureSlots.push(slot);\n }\n if (this._glRenderer === \"Mali-G72\") {\n // Overcome a bug when using a texture to store morph targets on Mali-G72\n this._caps.disableMorphTargetTexture = true;\n }\n }\n _initFeatures() {\n this._features = {\n forceBitmapOverHTMLImageElement: false,\n supportRenderAndCopyToLodForFloatTextures: this._webGLVersion !== 1,\n supportDepthStencilTexture: this._webGLVersion !== 1,\n supportShadowSamplers: this._webGLVersion !== 1,\n uniformBufferHardCheckMatrix: false,\n allowTexturePrefiltering: this._webGLVersion !== 1,\n trackUbosInFrame: false,\n checkUbosContentBeforeUpload: false,\n supportCSM: this._webGLVersion !== 1,\n basisNeedsPOT: this._webGLVersion === 1,\n support3DTextures: this._webGLVersion !== 1,\n needTypeSuffixInShaderConstants: this._webGLVersion !== 1,\n supportMSAA: this._webGLVersion !== 1,\n supportSSAO2: this._webGLVersion !== 1,\n supportExtendedTextureFormats: this._webGLVersion !== 1,\n supportSwitchCaseInShader: this._webGLVersion !== 1,\n supportSyncTextureRead: true,\n needsInvertingBitmap: true,\n useUBOBindingCache: true,\n needShaderCodeInlining: false,\n needToAlwaysBindUniformBuffers: false,\n supportRenderPasses: false,\n supportSpriteInstancing: true,\n forceVertexBufferStrideMultiple4Bytes: false,\n _collectUbosUpdatedInFrame: false,\n };\n }\n /**\n * Gets version of the current webGL context\n * Keep it for back compat - use version instead\n */\n get webGLVersion() {\n return this._webGLVersion;\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"Engine\" string\n */\n getClassName() {\n return \"ThinEngine\";\n }\n /**\n * Returns true if the stencil buffer has been enabled through the creation option of the context.\n */\n get isStencilEnable() {\n return this._isStencilEnable;\n }\n /** @internal */\n _prepareWorkingCanvas() {\n if (this._workingCanvas) {\n return;\n }\n this._workingCanvas = this.createCanvas(1, 1);\n const context = this._workingCanvas.getContext(\"2d\");\n if (context) {\n this._workingContext = context;\n }\n }\n /**\n * Reset the texture cache to empty state\n */\n resetTextureCache() {\n for (const key in this._boundTexturesCache) {\n if (!Object.prototype.hasOwnProperty.call(this._boundTexturesCache, key)) {\n continue;\n }\n this._boundTexturesCache[key] = null;\n }\n this._currentTextureChannel = -1;\n }\n /**\n * Gets an object containing information about the current engine context\n * @returns an object containing the vendor, the renderer and the version of the current engine context\n */\n getInfo() {\n return this.getGlInfo();\n }\n /**\n * Gets an object containing information about the current webGL context\n * @returns an object containing the vendor, the renderer and the version of the current webGL context\n */\n getGlInfo() {\n return {\n vendor: this._glVendor,\n renderer: this._glRenderer,\n version: this._glVersion,\n };\n }\n /**\n * Defines the hardware scaling level.\n * By default the hardware scaling level is computed from the window device ratio.\n * if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.\n * @param level defines the level to use\n */\n setHardwareScalingLevel(level) {\n this._hardwareScalingLevel = level;\n this.resize();\n }\n /**\n * Gets the current hardware scaling level.\n * By default the hardware scaling level is computed from the window device ratio.\n * if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.\n * @returns a number indicating the current hardware scaling level\n */\n getHardwareScalingLevel() {\n return this._hardwareScalingLevel;\n }\n /**\n * Gets the list of loaded textures\n * @returns an array containing all loaded textures\n */\n getLoadedTexturesCache() {\n return this._internalTexturesCache;\n }\n /**\n * Gets the object containing all engine capabilities\n * @returns the EngineCapabilities object\n */\n getCaps() {\n return this._caps;\n }\n /**\n * stop executing a render loop function and remove it from the execution array\n * @param renderFunction defines the function to be removed. If not provided all functions will be removed.\n */\n stopRenderLoop(renderFunction) {\n if (!renderFunction) {\n this._activeRenderLoops.length = 0;\n this._cancelFrame();\n return;\n }\n const index = this._activeRenderLoops.indexOf(renderFunction);\n if (index >= 0) {\n this._activeRenderLoops.splice(index, 1);\n if (this._activeRenderLoops.length == 0) {\n this._cancelFrame();\n }\n }\n }\n _cancelFrame() {\n if (this._renderingQueueLaunched && this._frameHandler) {\n this._renderingQueueLaunched = false;\n if (!IsWindowObjectExist()) {\n if (typeof cancelAnimationFrame === \"function\") {\n return cancelAnimationFrame(this._frameHandler);\n }\n }\n else {\n const { cancelAnimationFrame } = this.getHostWindow() || window;\n if (typeof cancelAnimationFrame === \"function\") {\n return cancelAnimationFrame(this._frameHandler);\n }\n }\n return clearTimeout(this._frameHandler);\n }\n }\n /** @internal */\n _renderLoop() {\n if (!this._contextWasLost) {\n let shouldRender = true;\n if (this._isDisposed || (!this.renderEvenInBackground && this._windowIsBackground)) {\n shouldRender = false;\n }\n if (shouldRender) {\n // Start new frame\n this.beginFrame();\n for (let index = 0; index < this._activeRenderLoops.length; index++) {\n const renderFunction = this._activeRenderLoops[index];\n renderFunction();\n }\n // Present\n this.endFrame();\n }\n }\n if (this._activeRenderLoops.length > 0) {\n this._frameHandler = this._queueNewFrame(this._boundRenderFunction, this.getHostWindow());\n }\n else {\n this._renderingQueueLaunched = false;\n }\n }\n /**\n * Gets the HTML canvas attached with the current webGL context\n * @returns a HTML canvas\n */\n getRenderingCanvas() {\n return this._renderingCanvas;\n }\n /**\n * Gets the audio context specified in engine initialization options\n * @returns an Audio Context\n */\n getAudioContext() {\n return this._audioContext;\n }\n /**\n * Gets the audio destination specified in engine initialization options\n * @returns an audio destination node\n */\n getAudioDestination() {\n return this._audioDestination;\n }\n /**\n * Gets host window\n * @returns the host window object\n */\n getHostWindow() {\n if (!IsWindowObjectExist()) {\n return null;\n }\n if (this._renderingCanvas && this._renderingCanvas.ownerDocument && this._renderingCanvas.ownerDocument.defaultView) {\n return this._renderingCanvas.ownerDocument.defaultView;\n }\n return window;\n }\n /**\n * Gets the current render width\n * @param useScreen defines if screen size must be used (or the current render target if any)\n * @returns a number defining the current render width\n */\n getRenderWidth(useScreen = false) {\n if (!useScreen && this._currentRenderTarget) {\n return this._currentRenderTarget.width;\n }\n return this._framebufferDimensionsObject ? this._framebufferDimensionsObject.framebufferWidth : this._gl.drawingBufferWidth;\n }\n /**\n * Gets the current render height\n * @param useScreen defines if screen size must be used (or the current render target if any)\n * @returns a number defining the current render height\n */\n getRenderHeight(useScreen = false) {\n if (!useScreen && this._currentRenderTarget) {\n return this._currentRenderTarget.height;\n }\n return this._framebufferDimensionsObject ? this._framebufferDimensionsObject.framebufferHeight : this._gl.drawingBufferHeight;\n }\n /**\n * Can be used to override the current requestAnimationFrame requester.\n * @internal\n */\n _queueNewFrame(bindedRenderFunction, requester) {\n return ThinEngine.QueueNewFrame(bindedRenderFunction, requester);\n }\n /**\n * Register and execute a render loop. The engine can have more than one render function\n * @param renderFunction defines the function to continuously execute\n */\n runRenderLoop(renderFunction) {\n if (this._activeRenderLoops.indexOf(renderFunction) !== -1) {\n return;\n }\n this._activeRenderLoops.push(renderFunction);\n if (!this._renderingQueueLaunched) {\n this._renderingQueueLaunched = true;\n this._boundRenderFunction = () => this._renderLoop();\n this._frameHandler = this._queueNewFrame(this._boundRenderFunction, this.getHostWindow());\n }\n }\n /**\n * Clear the current render buffer or the current render target (if any is set up)\n * @param color defines the color to use\n * @param backBuffer defines if the back buffer must be cleared\n * @param depth defines if the depth buffer must be cleared\n * @param stencil defines if the stencil buffer must be cleared\n */\n clear(color, backBuffer, depth, stencil = false) {\n var _a, _b;\n const useStencilGlobalOnly = this.stencilStateComposer.useStencilGlobalOnly;\n this.stencilStateComposer.useStencilGlobalOnly = true; // make sure the stencil mask is coming from the global stencil and not from a material (effect) which would currently be in effect\n this.applyStates();\n this.stencilStateComposer.useStencilGlobalOnly = useStencilGlobalOnly;\n let mode = 0;\n if (backBuffer && color) {\n let setBackBufferColor = true;\n if (this._currentRenderTarget) {\n const textureFormat = (_a = this._currentRenderTarget.texture) === null || _a === void 0 ? void 0 : _a.format;\n if (textureFormat === 8 ||\n textureFormat === 9 ||\n textureFormat === 10 ||\n textureFormat === 11) {\n const textureType = (_b = this._currentRenderTarget.texture) === null || _b === void 0 ? void 0 : _b.type;\n if (textureType === 7 || textureType === 5) {\n ThinEngine._TempClearColorUint32[0] = color.r * 255;\n ThinEngine._TempClearColorUint32[1] = color.g * 255;\n ThinEngine._TempClearColorUint32[2] = color.b * 255;\n ThinEngine._TempClearColorUint32[3] = color.a * 255;\n this._gl.clearBufferuiv(this._gl.COLOR, 0, ThinEngine._TempClearColorUint32);\n setBackBufferColor = false;\n }\n else {\n ThinEngine._TempClearColorInt32[0] = color.r * 255;\n ThinEngine._TempClearColorInt32[1] = color.g * 255;\n ThinEngine._TempClearColorInt32[2] = color.b * 255;\n ThinEngine._TempClearColorInt32[3] = color.a * 255;\n this._gl.clearBufferiv(this._gl.COLOR, 0, ThinEngine._TempClearColorInt32);\n setBackBufferColor = false;\n }\n }\n }\n if (setBackBufferColor) {\n this._gl.clearColor(color.r, color.g, color.b, color.a !== undefined ? color.a : 1.0);\n mode |= this._gl.COLOR_BUFFER_BIT;\n }\n }\n if (depth) {\n if (this.useReverseDepthBuffer) {\n this._depthCullingState.depthFunc = this._gl.GEQUAL;\n this._gl.clearDepth(0.0);\n }\n else {\n this._gl.clearDepth(1.0);\n }\n mode |= this._gl.DEPTH_BUFFER_BIT;\n }\n if (stencil) {\n this._gl.clearStencil(0);\n mode |= this._gl.STENCIL_BUFFER_BIT;\n }\n this._gl.clear(mode);\n }\n /**\n * @internal\n */\n _viewport(x, y, width, height) {\n if (x !== this._viewportCached.x || y !== this._viewportCached.y || width !== this._viewportCached.z || height !== this._viewportCached.w) {\n this._viewportCached.x = x;\n this._viewportCached.y = y;\n this._viewportCached.z = width;\n this._viewportCached.w = height;\n this._gl.viewport(x, y, width, height);\n }\n }\n /**\n * Set the WebGL's viewport\n * @param viewport defines the viewport element to be used\n * @param requiredWidth defines the width required for rendering. If not provided the rendering canvas' width is used\n * @param requiredHeight defines the height required for rendering. If not provided the rendering canvas' height is used\n */\n setViewport(viewport, requiredWidth, requiredHeight) {\n const width = requiredWidth || this.getRenderWidth();\n const height = requiredHeight || this.getRenderHeight();\n const x = viewport.x || 0;\n const y = viewport.y || 0;\n this._cachedViewport = viewport;\n this._viewport(x * width, y * height, width * viewport.width, height * viewport.height);\n }\n /**\n * Begin a new frame\n */\n beginFrame() { }\n /**\n * Enf the current frame\n */\n endFrame() {\n // Force a flush in case we are using a bad OS.\n if (this._badOS) {\n this.flushFramebuffer();\n }\n this._frameId++;\n }\n /**\n * Resize the view according to the canvas' size\n * @param forceSetSize true to force setting the sizes of the underlying canvas\n */\n resize(forceSetSize = false) {\n let width;\n let height;\n // Re-query hardware scaling level to handle zoomed-in resizing.\n if (this.adaptToDeviceRatio) {\n const devicePixelRatio = IsWindowObjectExist() ? window.devicePixelRatio || 1.0 : 1.0;\n const changeRatio = this._lastDevicePixelRatio / devicePixelRatio;\n this._lastDevicePixelRatio = devicePixelRatio;\n this._hardwareScalingLevel *= changeRatio;\n }\n if (IsWindowObjectExist() && IsDocumentAvailable()) {\n // make sure it is a Node object, and is a part of the document.\n if (this._renderingCanvas) {\n const boundingRect = this._renderingCanvas.getBoundingClientRect\n ? this._renderingCanvas.getBoundingClientRect()\n : {\n // fallback to last solution in case the function doesn't exist\n width: this._renderingCanvas.width * this._hardwareScalingLevel,\n height: this._renderingCanvas.height * this._hardwareScalingLevel,\n };\n width = this._renderingCanvas.clientWidth || boundingRect.width || this._renderingCanvas.width || 100;\n height = this._renderingCanvas.clientHeight || boundingRect.height || this._renderingCanvas.height || 100;\n }\n else {\n width = window.innerWidth;\n height = window.innerHeight;\n }\n }\n else {\n width = this._renderingCanvas ? this._renderingCanvas.width : 100;\n height = this._renderingCanvas ? this._renderingCanvas.height : 100;\n }\n this.setSize(width / this._hardwareScalingLevel, height / this._hardwareScalingLevel, forceSetSize);\n }\n /**\n * Force a specific size of the canvas\n * @param width defines the new canvas' width\n * @param height defines the new canvas' height\n * @param forceSetSize true to force setting the sizes of the underlying canvas\n * @returns true if the size was changed\n */\n setSize(width, height, forceSetSize = false) {\n if (!this._renderingCanvas) {\n return false;\n }\n width = width | 0;\n height = height | 0;\n if (!forceSetSize && this._renderingCanvas.width === width && this._renderingCanvas.height === height) {\n return false;\n }\n this._renderingCanvas.width = width;\n this._renderingCanvas.height = height;\n return true;\n }\n /**\n * Binds the frame buffer to the specified texture.\n * @param rtWrapper The render target wrapper to render to\n * @param faceIndex The face of the texture to render to in case of cube texture and if the render target wrapper is not a multi render target\n * @param requiredWidth The width of the target to render to\n * @param requiredHeight The height of the target to render to\n * @param forceFullscreenViewport Forces the viewport to be the entire texture/screen if true\n * @param lodLevel Defines the lod level to bind to the frame buffer\n * @param layer Defines the 2d array index to bind to the frame buffer if the render target wrapper is not a multi render target\n */\n bindFramebuffer(rtWrapper, faceIndex = 0, requiredWidth, requiredHeight, forceFullscreenViewport, lodLevel = 0, layer = 0) {\n var _a, _b, _c, _d, _e, _f;\n const webglRTWrapper = rtWrapper;\n if (this._currentRenderTarget) {\n this.unBindFramebuffer(this._currentRenderTarget);\n }\n this._currentRenderTarget = rtWrapper;\n this._bindUnboundFramebuffer(webglRTWrapper._MSAAFramebuffer ? webglRTWrapper._MSAAFramebuffer : webglRTWrapper._framebuffer);\n const gl = this._gl;\n if (!rtWrapper.isMulti) {\n if (rtWrapper.is2DArray) {\n gl.framebufferTextureLayer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, (_a = rtWrapper.texture._hardwareTexture) === null || _a === void 0 ? void 0 : _a.underlyingResource, lodLevel, layer);\n }\n else if (rtWrapper.isCube) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, (_b = rtWrapper.texture._hardwareTexture) === null || _b === void 0 ? void 0 : _b.underlyingResource, lodLevel);\n }\n else if (webglRTWrapper._currentLOD !== lodLevel) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, (_c = rtWrapper.texture._hardwareTexture) === null || _c === void 0 ? void 0 : _c.underlyingResource, lodLevel);\n webglRTWrapper._currentLOD = lodLevel;\n }\n }\n const depthStencilTexture = rtWrapper._depthStencilTexture;\n if (depthStencilTexture) {\n const attachment = rtWrapper._depthStencilTextureWithStencil ? gl.DEPTH_STENCIL_ATTACHMENT : gl.DEPTH_ATTACHMENT;\n if (rtWrapper.is2DArray) {\n gl.framebufferTextureLayer(gl.FRAMEBUFFER, attachment, (_d = depthStencilTexture._hardwareTexture) === null || _d === void 0 ? void 0 : _d.underlyingResource, lodLevel, layer);\n }\n else if (rtWrapper.isCube) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, (_e = depthStencilTexture._hardwareTexture) === null || _e === void 0 ? void 0 : _e.underlyingResource, lodLevel);\n }\n else {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, gl.TEXTURE_2D, (_f = depthStencilTexture._hardwareTexture) === null || _f === void 0 ? void 0 : _f.underlyingResource, lodLevel);\n }\n }\n if (this._cachedViewport && !forceFullscreenViewport) {\n this.setViewport(this._cachedViewport, requiredWidth, requiredHeight);\n }\n else {\n if (!requiredWidth) {\n requiredWidth = rtWrapper.width;\n if (lodLevel) {\n requiredWidth = requiredWidth / Math.pow(2, lodLevel);\n }\n }\n if (!requiredHeight) {\n requiredHeight = rtWrapper.height;\n if (lodLevel) {\n requiredHeight = requiredHeight / Math.pow(2, lodLevel);\n }\n }\n this._viewport(0, 0, requiredWidth, requiredHeight);\n }\n this.wipeCaches();\n }\n /**\n * Set various states to the webGL context\n * @param culling defines culling state: true to enable culling, false to disable it\n * @param zOffset defines the value to apply to zOffset (0 by default)\n * @param force defines if states must be applied even if cache is up to date\n * @param reverseSide defines if culling must be reversed (CCW if false, CW if true)\n * @param cullBackFaces true to cull back faces, false to cull front faces (if culling is enabled)\n * @param stencil stencil states to set\n * @param zOffsetUnits defines the value to apply to zOffsetUnits (0 by default)\n */\n setState(culling, zOffset = 0, force, reverseSide = false, cullBackFaces, stencil, zOffsetUnits = 0) {\n var _a, _b;\n // Culling\n if (this._depthCullingState.cull !== culling || force) {\n this._depthCullingState.cull = culling;\n }\n // Cull face\n const cullFace = ((_b = (_a = this.cullBackFaces) !== null && _a !== void 0 ? _a : cullBackFaces) !== null && _b !== void 0 ? _b : true) ? this._gl.BACK : this._gl.FRONT;\n if (this._depthCullingState.cullFace !== cullFace || force) {\n this._depthCullingState.cullFace = cullFace;\n }\n // Z offset\n this.setZOffset(zOffset);\n this.setZOffsetUnits(zOffsetUnits);\n // Front face\n const frontFace = reverseSide ? this._gl.CW : this._gl.CCW;\n if (this._depthCullingState.frontFace !== frontFace || force) {\n this._depthCullingState.frontFace = frontFace;\n }\n this._stencilStateComposer.stencilMaterial = stencil;\n }\n /**\n * Gets a boolean indicating if depth testing is enabled\n * @returns the current state\n */\n getDepthBuffer() {\n return this._depthCullingState.depthTest;\n }\n /**\n * Enable or disable depth buffering\n * @param enable defines the state to set\n */\n setDepthBuffer(enable) {\n this._depthCullingState.depthTest = enable;\n }\n /**\n * Set the z offset Factor to apply to current rendering\n * @param value defines the offset to apply\n */\n setZOffset(value) {\n this._depthCullingState.zOffset = this.useReverseDepthBuffer ? -value : value;\n }\n /**\n * Gets the current value of the zOffset Factor\n * @returns the current zOffset Factor state\n */\n getZOffset() {\n const zOffset = this._depthCullingState.zOffset;\n return this.useReverseDepthBuffer ? -zOffset : zOffset;\n }\n /**\n * Set the z offset Units to apply to current rendering\n * @param value defines the offset to apply\n */\n setZOffsetUnits(value) {\n this._depthCullingState.zOffsetUnits = this.useReverseDepthBuffer ? -value : value;\n }\n /**\n * Gets the current value of the zOffset Units\n * @returns the current zOffset Units state\n */\n getZOffsetUnits() {\n const zOffsetUnits = this._depthCullingState.zOffsetUnits;\n return this.useReverseDepthBuffer ? -zOffsetUnits : zOffsetUnits;\n }\n /**\n * @internal\n */\n _bindUnboundFramebuffer(framebuffer) {\n if (this._currentFramebuffer !== framebuffer) {\n this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, framebuffer);\n this._currentFramebuffer = framebuffer;\n }\n }\n /** @internal */\n _currentFrameBufferIsDefaultFrameBuffer() {\n return this._currentFramebuffer === null;\n }\n /**\n * Generates the mipmaps for a texture\n * @param texture texture to generate the mipmaps for\n */\n generateMipmaps(texture) {\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);\n this._gl.generateMipmap(this._gl.TEXTURE_2D);\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\n }\n /**\n * Unbind the current render target texture from the webGL context\n * @param texture defines the render target wrapper to unbind\n * @param disableGenerateMipMaps defines a boolean indicating that mipmaps must not be generated\n * @param onBeforeUnbind defines a function which will be called before the effective unbind\n */\n unBindFramebuffer(texture, disableGenerateMipMaps = false, onBeforeUnbind) {\n var _a;\n const webglRTWrapper = texture;\n this._currentRenderTarget = null;\n // If MSAA, we need to bitblt back to main texture\n const gl = this._gl;\n if (webglRTWrapper._MSAAFramebuffer) {\n if (texture.isMulti) {\n // This texture is part of a MRT texture, we need to treat all attachments\n this.unBindMultiColorAttachmentFramebuffer(texture, disableGenerateMipMaps, onBeforeUnbind);\n return;\n }\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, webglRTWrapper._MSAAFramebuffer);\n gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, webglRTWrapper._framebuffer);\n gl.blitFramebuffer(0, 0, texture.width, texture.height, 0, 0, texture.width, texture.height, gl.COLOR_BUFFER_BIT, gl.NEAREST);\n }\n if (((_a = texture.texture) === null || _a === void 0 ? void 0 : _a.generateMipMaps) && !disableGenerateMipMaps && !texture.isCube) {\n this.generateMipmaps(texture.texture);\n }\n if (onBeforeUnbind) {\n if (webglRTWrapper._MSAAFramebuffer) {\n // Bind the correct framebuffer\n this._bindUnboundFramebuffer(webglRTWrapper._framebuffer);\n }\n onBeforeUnbind();\n }\n this._bindUnboundFramebuffer(null);\n }\n /**\n * Force a webGL flush (ie. a flush of all waiting webGL commands)\n */\n flushFramebuffer() {\n this._gl.flush();\n }\n /**\n * Unbind the current render target and bind the default framebuffer\n */\n restoreDefaultFramebuffer() {\n if (this._currentRenderTarget) {\n this.unBindFramebuffer(this._currentRenderTarget);\n }\n else {\n this._bindUnboundFramebuffer(null);\n }\n if (this._cachedViewport) {\n this.setViewport(this._cachedViewport);\n }\n this.wipeCaches();\n }\n // VBOs\n /** @internal */\n _resetVertexBufferBinding() {\n this.bindArrayBuffer(null);\n this._cachedVertexBuffers = null;\n }\n /**\n * Creates a vertex buffer\n * @param data the data for the vertex buffer\n * @param _updatable whether the buffer should be created as updatable\n * @param _label defines the label of the buffer (for debug purpose)\n * @returns the new WebGL static buffer\n */\n createVertexBuffer(data, _updatable, _label) {\n return this._createVertexBuffer(data, this._gl.STATIC_DRAW);\n }\n _createVertexBuffer(data, usage) {\n const vbo = this._gl.createBuffer();\n if (!vbo) {\n throw new Error(\"Unable to create vertex buffer\");\n }\n const dataBuffer = new WebGLDataBuffer(vbo);\n this.bindArrayBuffer(dataBuffer);\n if (data instanceof Array) {\n this._gl.bufferData(this._gl.ARRAY_BUFFER, new Float32Array(data), usage);\n }\n else {\n this._gl.bufferData(this._gl.ARRAY_BUFFER, data, usage);\n }\n this._resetVertexBufferBinding();\n dataBuffer.references = 1;\n return dataBuffer;\n }\n /**\n * Creates a dynamic vertex buffer\n * @param data the data for the dynamic vertex buffer\n * @param _label defines the label of the buffer (for debug purpose)\n * @returns the new WebGL dynamic buffer\n */\n createDynamicVertexBuffer(data, _label) {\n return this._createVertexBuffer(data, this._gl.DYNAMIC_DRAW);\n }\n _resetIndexBufferBinding() {\n this.bindIndexBuffer(null);\n this._cachedIndexBuffer = null;\n }\n /**\n * Creates a new index buffer\n * @param indices defines the content of the index buffer\n * @param updatable defines if the index buffer must be updatable\n * @param _label defines the label of the buffer (for debug purpose)\n * @returns a new webGL buffer\n */\n createIndexBuffer(indices, updatable, _label) {\n const vbo = this._gl.createBuffer();\n const dataBuffer = new WebGLDataBuffer(vbo);\n if (!vbo) {\n throw new Error(\"Unable to create index buffer\");\n }\n this.bindIndexBuffer(dataBuffer);\n const data = this._normalizeIndexData(indices);\n this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, data, updatable ? this._gl.DYNAMIC_DRAW : this._gl.STATIC_DRAW);\n this._resetIndexBufferBinding();\n dataBuffer.references = 1;\n dataBuffer.is32Bits = data.BYTES_PER_ELEMENT === 4;\n return dataBuffer;\n }\n _normalizeIndexData(indices) {\n const bytesPerElement = indices.BYTES_PER_ELEMENT;\n if (bytesPerElement === 2) {\n return indices;\n }\n // Check 32 bit support\n if (this._caps.uintIndices) {\n if (indices instanceof Uint32Array) {\n return indices;\n }\n else {\n // number[] or Int32Array, check if 32 bit is necessary\n for (let index = 0; index < indices.length; index++) {\n if (indices[index] >= 65535) {\n return new Uint32Array(indices);\n }\n }\n return new Uint16Array(indices);\n }\n }\n // No 32 bit support, force conversion to 16 bit (values greater 16 bit are lost)\n return new Uint16Array(indices);\n }\n /**\n * Bind a webGL buffer to the webGL context\n * @param buffer defines the buffer to bind\n */\n bindArrayBuffer(buffer) {\n if (!this._vaoRecordInProgress) {\n this._unbindVertexArrayObject();\n }\n this._bindBuffer(buffer, this._gl.ARRAY_BUFFER);\n }\n /**\n * Bind a specific block at a given index in a specific shader program\n * @param pipelineContext defines the pipeline context to use\n * @param blockName defines the block name\n * @param index defines the index where to bind the block\n */\n bindUniformBlock(pipelineContext, blockName, index) {\n const program = pipelineContext.program;\n const uniformLocation = this._gl.getUniformBlockIndex(program, blockName);\n this._gl.uniformBlockBinding(program, uniformLocation, index);\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n bindIndexBuffer(buffer) {\n if (!this._vaoRecordInProgress) {\n this._unbindVertexArrayObject();\n }\n this._bindBuffer(buffer, this._gl.ELEMENT_ARRAY_BUFFER);\n }\n _bindBuffer(buffer, target) {\n if (this._vaoRecordInProgress || this._currentBoundBuffer[target] !== buffer) {\n this._gl.bindBuffer(target, buffer ? buffer.underlyingResource : null);\n this._currentBoundBuffer[target] = buffer;\n }\n }\n /**\n * update the bound buffer with the given data\n * @param data defines the data to update\n */\n updateArrayBuffer(data) {\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);\n }\n _vertexAttribPointer(buffer, indx, size, type, normalized, stride, offset) {\n const pointer = this._currentBufferPointers[indx];\n if (!pointer) {\n return;\n }\n let changed = false;\n if (!pointer.active) {\n changed = true;\n pointer.active = true;\n pointer.index = indx;\n pointer.size = size;\n pointer.type = type;\n pointer.normalized = normalized;\n pointer.stride = stride;\n pointer.offset = offset;\n pointer.buffer = buffer;\n }\n else {\n if (pointer.buffer !== buffer) {\n pointer.buffer = buffer;\n changed = true;\n }\n if (pointer.size !== size) {\n pointer.size = size;\n changed = true;\n }\n if (pointer.type !== type) {\n pointer.type = type;\n changed = true;\n }\n if (pointer.normalized !== normalized) {\n pointer.normalized = normalized;\n changed = true;\n }\n if (pointer.stride !== stride) {\n pointer.stride = stride;\n changed = true;\n }\n if (pointer.offset !== offset) {\n pointer.offset = offset;\n changed = true;\n }\n }\n if (changed || this._vaoRecordInProgress) {\n this.bindArrayBuffer(buffer);\n if (type === this._gl.UNSIGNED_INT || type === this._gl.INT) {\n this._gl.vertexAttribIPointer(indx, size, type, stride, offset);\n }\n else {\n this._gl.vertexAttribPointer(indx, size, type, normalized, stride, offset);\n }\n }\n }\n /**\n * @internal\n */\n _bindIndexBufferWithCache(indexBuffer) {\n if (indexBuffer == null) {\n return;\n }\n if (this._cachedIndexBuffer !== indexBuffer) {\n this._cachedIndexBuffer = indexBuffer;\n this.bindIndexBuffer(indexBuffer);\n this._uintIndicesCurrentlySet = indexBuffer.is32Bits;\n }\n }\n _bindVertexBuffersAttributes(vertexBuffers, effect, overrideVertexBuffers) {\n const attributes = effect.getAttributesNames();\n if (!this._vaoRecordInProgress) {\n this._unbindVertexArrayObject();\n }\n this.unbindAllAttributes();\n for (let index = 0; index < attributes.length; index++) {\n const order = effect.getAttributeLocation(index);\n if (order >= 0) {\n const ai = attributes[index];\n let vertexBuffer = null;\n if (overrideVertexBuffers) {\n vertexBuffer = overrideVertexBuffers[ai];\n }\n if (!vertexBuffer) {\n vertexBuffer = vertexBuffers[ai];\n }\n if (!vertexBuffer) {\n continue;\n }\n this._gl.enableVertexAttribArray(order);\n if (!this._vaoRecordInProgress) {\n this._vertexAttribArraysEnabled[order] = true;\n }\n const buffer = vertexBuffer.getBuffer();\n if (buffer) {\n this._vertexAttribPointer(buffer, order, vertexBuffer.getSize(), vertexBuffer.type, vertexBuffer.normalized, vertexBuffer.byteStride, vertexBuffer.byteOffset);\n if (vertexBuffer.getIsInstanced()) {\n this._gl.vertexAttribDivisor(order, vertexBuffer.getInstanceDivisor());\n if (!this._vaoRecordInProgress) {\n this._currentInstanceLocations.push(order);\n this._currentInstanceBuffers.push(buffer);\n }\n }\n }\n }\n }\n }\n /**\n * Records a vertex array object\n * @see https://doc.babylonjs.com/setup/support/webGL2#vertex-array-objects\n * @param vertexBuffers defines the list of vertex buffers to store\n * @param indexBuffer defines the index buffer to store\n * @param effect defines the effect to store\n * @param overrideVertexBuffers defines optional list of avertex buffers that overrides the entries in vertexBuffers\n * @returns the new vertex array object\n */\n recordVertexArrayObject(vertexBuffers, indexBuffer, effect, overrideVertexBuffers) {\n const vao = this._gl.createVertexArray();\n if (!vao) {\n throw new Error(\"Unable to create VAO\");\n }\n this._vaoRecordInProgress = true;\n this._gl.bindVertexArray(vao);\n this._mustWipeVertexAttributes = true;\n this._bindVertexBuffersAttributes(vertexBuffers, effect, overrideVertexBuffers);\n this.bindIndexBuffer(indexBuffer);\n this._vaoRecordInProgress = false;\n this._gl.bindVertexArray(null);\n return vao;\n }\n /**\n * Bind a specific vertex array object\n * @see https://doc.babylonjs.com/setup/support/webGL2#vertex-array-objects\n * @param vertexArrayObject defines the vertex array object to bind\n * @param indexBuffer defines the index buffer to bind\n */\n bindVertexArrayObject(vertexArrayObject, indexBuffer) {\n if (this._cachedVertexArrayObject !== vertexArrayObject) {\n this._cachedVertexArrayObject = vertexArrayObject;\n this._gl.bindVertexArray(vertexArrayObject);\n this._cachedVertexBuffers = null;\n this._cachedIndexBuffer = null;\n this._uintIndicesCurrentlySet = indexBuffer != null && indexBuffer.is32Bits;\n this._mustWipeVertexAttributes = true;\n }\n }\n /**\n * Bind webGl buffers directly to the webGL context\n * @param vertexBuffer defines the vertex buffer to bind\n * @param indexBuffer defines the index buffer to bind\n * @param vertexDeclaration defines the vertex declaration to use with the vertex buffer\n * @param vertexStrideSize defines the vertex stride of the vertex buffer\n * @param effect defines the effect associated with the vertex buffer\n */\n bindBuffersDirectly(vertexBuffer, indexBuffer, vertexDeclaration, vertexStrideSize, effect) {\n if (this._cachedVertexBuffers !== vertexBuffer || this._cachedEffectForVertexBuffers !== effect) {\n this._cachedVertexBuffers = vertexBuffer;\n this._cachedEffectForVertexBuffers = effect;\n const attributesCount = effect.getAttributesCount();\n this._unbindVertexArrayObject();\n this.unbindAllAttributes();\n let offset = 0;\n for (let index = 0; index < attributesCount; index++) {\n if (index < vertexDeclaration.length) {\n const order = effect.getAttributeLocation(index);\n if (order >= 0) {\n this._gl.enableVertexAttribArray(order);\n this._vertexAttribArraysEnabled[order] = true;\n this._vertexAttribPointer(vertexBuffer, order, vertexDeclaration[index], this._gl.FLOAT, false, vertexStrideSize, offset);\n }\n offset += vertexDeclaration[index] * 4;\n }\n }\n }\n this._bindIndexBufferWithCache(indexBuffer);\n }\n _unbindVertexArrayObject() {\n if (!this._cachedVertexArrayObject) {\n return;\n }\n this._cachedVertexArrayObject = null;\n this._gl.bindVertexArray(null);\n }\n /**\n * Bind a list of vertex buffers to the webGL context\n * @param vertexBuffers defines the list of vertex buffers to bind\n * @param indexBuffer defines the index buffer to bind\n * @param effect defines the effect associated with the vertex buffers\n * @param overrideVertexBuffers defines optional list of avertex buffers that overrides the entries in vertexBuffers\n */\n bindBuffers(vertexBuffers, indexBuffer, effect, overrideVertexBuffers) {\n if (this._cachedVertexBuffers !== vertexBuffers || this._cachedEffectForVertexBuffers !== effect) {\n this._cachedVertexBuffers = vertexBuffers;\n this._cachedEffectForVertexBuffers = effect;\n this._bindVertexBuffersAttributes(vertexBuffers, effect, overrideVertexBuffers);\n }\n this._bindIndexBufferWithCache(indexBuffer);\n }\n /**\n * Unbind all instance attributes\n */\n unbindInstanceAttributes() {\n let boundBuffer;\n for (let i = 0, ul = this._currentInstanceLocations.length; i < ul; i++) {\n const instancesBuffer = this._currentInstanceBuffers[i];\n if (boundBuffer != instancesBuffer && instancesBuffer.references) {\n boundBuffer = instancesBuffer;\n this.bindArrayBuffer(instancesBuffer);\n }\n const offsetLocation = this._currentInstanceLocations[i];\n this._gl.vertexAttribDivisor(offsetLocation, 0);\n }\n this._currentInstanceBuffers.length = 0;\n this._currentInstanceLocations.length = 0;\n }\n /**\n * Release and free the memory of a vertex array object\n * @param vao defines the vertex array object to delete\n */\n releaseVertexArrayObject(vao) {\n this._gl.deleteVertexArray(vao);\n }\n /**\n * @internal\n */\n _releaseBuffer(buffer) {\n buffer.references--;\n if (buffer.references === 0) {\n this._deleteBuffer(buffer);\n return true;\n }\n return false;\n }\n _deleteBuffer(buffer) {\n this._gl.deleteBuffer(buffer.underlyingResource);\n }\n /**\n * Update the content of a webGL buffer used with instantiation and bind it to the webGL context\n * @param instancesBuffer defines the webGL buffer to update and bind\n * @param data defines the data to store in the buffer\n * @param offsetLocations defines the offsets or attributes information used to determine where data must be stored in the buffer\n */\n updateAndBindInstancesBuffer(instancesBuffer, data, offsetLocations) {\n this.bindArrayBuffer(instancesBuffer);\n if (data) {\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);\n }\n if (offsetLocations[0].index !== undefined) {\n this.bindInstancesBuffer(instancesBuffer, offsetLocations, true);\n }\n else {\n for (let index = 0; index < 4; index++) {\n const offsetLocation = offsetLocations[index];\n if (!this._vertexAttribArraysEnabled[offsetLocation]) {\n this._gl.enableVertexAttribArray(offsetLocation);\n this._vertexAttribArraysEnabled[offsetLocation] = true;\n }\n this._vertexAttribPointer(instancesBuffer, offsetLocation, 4, this._gl.FLOAT, false, 64, index * 16);\n this._gl.vertexAttribDivisor(offsetLocation, 1);\n this._currentInstanceLocations.push(offsetLocation);\n this._currentInstanceBuffers.push(instancesBuffer);\n }\n }\n }\n /**\n * Bind the content of a webGL buffer used with instantiation\n * @param instancesBuffer defines the webGL buffer to bind\n * @param attributesInfo defines the offsets or attributes information used to determine where data must be stored in the buffer\n * @param computeStride defines Whether to compute the strides from the info or use the default 0\n */\n bindInstancesBuffer(instancesBuffer, attributesInfo, computeStride = true) {\n this.bindArrayBuffer(instancesBuffer);\n let stride = 0;\n if (computeStride) {\n for (let i = 0; i < attributesInfo.length; i++) {\n const ai = attributesInfo[i];\n stride += ai.attributeSize * 4;\n }\n }\n for (let i = 0; i < attributesInfo.length; i++) {\n const ai = attributesInfo[i];\n if (ai.index === undefined) {\n ai.index = this._currentEffect.getAttributeLocationByName(ai.attributeName);\n }\n if (ai.index < 0) {\n continue;\n }\n if (!this._vertexAttribArraysEnabled[ai.index]) {\n this._gl.enableVertexAttribArray(ai.index);\n this._vertexAttribArraysEnabled[ai.index] = true;\n }\n this._vertexAttribPointer(instancesBuffer, ai.index, ai.attributeSize, ai.attributeType || this._gl.FLOAT, ai.normalized || false, stride, ai.offset);\n this._gl.vertexAttribDivisor(ai.index, ai.divisor === undefined ? 1 : ai.divisor);\n this._currentInstanceLocations.push(ai.index);\n this._currentInstanceBuffers.push(instancesBuffer);\n }\n }\n /**\n * Disable the instance attribute corresponding to the name in parameter\n * @param name defines the name of the attribute to disable\n */\n disableInstanceAttributeByName(name) {\n if (!this._currentEffect) {\n return;\n }\n const attributeLocation = this._currentEffect.getAttributeLocationByName(name);\n this.disableInstanceAttribute(attributeLocation);\n }\n /**\n * Disable the instance attribute corresponding to the location in parameter\n * @param attributeLocation defines the attribute location of the attribute to disable\n */\n disableInstanceAttribute(attributeLocation) {\n let shouldClean = false;\n let index;\n while ((index = this._currentInstanceLocations.indexOf(attributeLocation)) !== -1) {\n this._currentInstanceLocations.splice(index, 1);\n this._currentInstanceBuffers.splice(index, 1);\n shouldClean = true;\n index = this._currentInstanceLocations.indexOf(attributeLocation);\n }\n if (shouldClean) {\n this._gl.vertexAttribDivisor(attributeLocation, 0);\n this.disableAttributeByIndex(attributeLocation);\n }\n }\n /**\n * Disable the attribute corresponding to the location in parameter\n * @param attributeLocation defines the attribute location of the attribute to disable\n */\n disableAttributeByIndex(attributeLocation) {\n this._gl.disableVertexAttribArray(attributeLocation);\n this._vertexAttribArraysEnabled[attributeLocation] = false;\n this._currentBufferPointers[attributeLocation].active = false;\n }\n /**\n * Send a draw order\n * @param useTriangles defines if triangles must be used to draw (else wireframe will be used)\n * @param indexStart defines the starting index\n * @param indexCount defines the number of index to draw\n * @param instancesCount defines the number of instances to draw (if instantiation is enabled)\n */\n draw(useTriangles, indexStart, indexCount, instancesCount) {\n this.drawElementsType(useTriangles ? 0 : 1, indexStart, indexCount, instancesCount);\n }\n /**\n * Draw a list of points\n * @param verticesStart defines the index of first vertex to draw\n * @param verticesCount defines the count of vertices to draw\n * @param instancesCount defines the number of instances to draw (if instantiation is enabled)\n */\n drawPointClouds(verticesStart, verticesCount, instancesCount) {\n this.drawArraysType(2, verticesStart, verticesCount, instancesCount);\n }\n /**\n * Draw a list of unindexed primitives\n * @param useTriangles defines if triangles must be used to draw (else wireframe will be used)\n * @param verticesStart defines the index of first vertex to draw\n * @param verticesCount defines the count of vertices to draw\n * @param instancesCount defines the number of instances to draw (if instantiation is enabled)\n */\n drawUnIndexed(useTriangles, verticesStart, verticesCount, instancesCount) {\n this.drawArraysType(useTriangles ? 0 : 1, verticesStart, verticesCount, instancesCount);\n }\n /**\n * Draw a list of indexed primitives\n * @param fillMode defines the primitive to use\n * @param indexStart defines the starting index\n * @param indexCount defines the number of index to draw\n * @param instancesCount defines the number of instances to draw (if instantiation is enabled)\n */\n drawElementsType(fillMode, indexStart, indexCount, instancesCount) {\n // Apply states\n this.applyStates();\n this._reportDrawCall();\n // Render\n const drawMode = this._drawMode(fillMode);\n const indexFormat = this._uintIndicesCurrentlySet ? this._gl.UNSIGNED_INT : this._gl.UNSIGNED_SHORT;\n const mult = this._uintIndicesCurrentlySet ? 4 : 2;\n if (instancesCount) {\n this._gl.drawElementsInstanced(drawMode, indexCount, indexFormat, indexStart * mult, instancesCount);\n }\n else {\n this._gl.drawElements(drawMode, indexCount, indexFormat, indexStart * mult);\n }\n }\n /**\n * Draw a list of unindexed primitives\n * @param fillMode defines the primitive to use\n * @param verticesStart defines the index of first vertex to draw\n * @param verticesCount defines the count of vertices to draw\n * @param instancesCount defines the number of instances to draw (if instantiation is enabled)\n */\n drawArraysType(fillMode, verticesStart, verticesCount, instancesCount) {\n // Apply states\n this.applyStates();\n this._reportDrawCall();\n const drawMode = this._drawMode(fillMode);\n if (instancesCount) {\n this._gl.drawArraysInstanced(drawMode, verticesStart, verticesCount, instancesCount);\n }\n else {\n this._gl.drawArrays(drawMode, verticesStart, verticesCount);\n }\n }\n _drawMode(fillMode) {\n switch (fillMode) {\n // Triangle views\n case 0:\n return this._gl.TRIANGLES;\n case 2:\n return this._gl.POINTS;\n case 1:\n return this._gl.LINES;\n // Draw modes\n case 3:\n return this._gl.POINTS;\n case 4:\n return this._gl.LINES;\n case 5:\n return this._gl.LINE_LOOP;\n case 6:\n return this._gl.LINE_STRIP;\n case 7:\n return this._gl.TRIANGLE_STRIP;\n case 8:\n return this._gl.TRIANGLE_FAN;\n default:\n return this._gl.TRIANGLES;\n }\n }\n /** @internal */\n _reportDrawCall() {\n // Will be implemented by children\n }\n // Shaders\n /**\n * @internal\n */\n _releaseEffect(effect) {\n if (this._compiledEffects[effect._key]) {\n delete this._compiledEffects[effect._key];\n }\n const pipelineContext = effect.getPipelineContext();\n if (pipelineContext) {\n this._deletePipelineContext(pipelineContext);\n }\n }\n /**\n * @internal\n */\n _deletePipelineContext(pipelineContext) {\n const webGLPipelineContext = pipelineContext;\n if (webGLPipelineContext && webGLPipelineContext.program) {\n webGLPipelineContext.program.__SPECTOR_rebuildProgram = null;\n this._gl.deleteProgram(webGLPipelineContext.program);\n }\n }\n /** @internal */\n _getGlobalDefines(defines) {\n if (defines) {\n if (this.isNDCHalfZRange) {\n defines[\"IS_NDC_HALF_ZRANGE\"] = \"\";\n }\n else {\n delete defines[\"IS_NDC_HALF_ZRANGE\"];\n }\n if (this.useReverseDepthBuffer) {\n defines[\"USE_REVERSE_DEPTHBUFFER\"] = \"\";\n }\n else {\n delete defines[\"USE_REVERSE_DEPTHBUFFER\"];\n }\n if (this.useExactSrgbConversions) {\n defines[\"USE_EXACT_SRGB_CONVERSIONS\"] = \"\";\n }\n else {\n delete defines[\"USE_EXACT_SRGB_CONVERSIONS\"];\n }\n return;\n }\n else {\n let s = \"\";\n if (this.isNDCHalfZRange) {\n s += \"#define IS_NDC_HALF_ZRANGE\";\n }\n if (this.useReverseDepthBuffer) {\n if (s) {\n s += \"\\n\";\n }\n s += \"#define USE_REVERSE_DEPTHBUFFER\";\n }\n if (this.useExactSrgbConversions) {\n if (s) {\n s += \"\\n\";\n }\n s += \"#define USE_EXACT_SRGB_CONVERSIONS\";\n }\n return s;\n }\n }\n /**\n * Create a new effect (used to store vertex/fragment shaders)\n * @param baseName defines the base name of the effect (The name of file without .fragment.fx or .vertex.fx)\n * @param attributesNamesOrOptions defines either a list of attribute names or an IEffectCreationOptions object\n * @param uniformsNamesOrEngine defines either a list of uniform names or the engine to use\n * @param samplers defines an array of string used to represent textures\n * @param defines defines the string containing the defines to use to compile the shaders\n * @param fallbacks defines the list of potential fallbacks to use if shader compilation fails\n * @param onCompiled defines a function to call when the effect creation is successful\n * @param onError defines a function to call when the effect creation has failed\n * @param indexParameters defines an object containing the index values to use to compile shaders (like the maximum number of simultaneous lights)\n * @param shaderLanguage the language the shader is written in (default: GLSL)\n * @returns the new Effect\n */\n createEffect(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, defines, fallbacks, onCompiled, onError, indexParameters, shaderLanguage = ShaderLanguage.GLSL) {\n var _a;\n const vertex = baseName.vertexElement || baseName.vertex || baseName.vertexToken || baseName.vertexSource || baseName;\n const fragment = baseName.fragmentElement || baseName.fragment || baseName.fragmentToken || baseName.fragmentSource || baseName;\n const globalDefines = this._getGlobalDefines();\n let fullDefines = (_a = defines !== null && defines !== void 0 ? defines : attributesNamesOrOptions.defines) !== null && _a !== void 0 ? _a : \"\";\n if (globalDefines) {\n fullDefines += globalDefines;\n }\n const name = vertex + \"+\" + fragment + \"@\" + fullDefines;\n if (this._compiledEffects[name]) {\n const compiledEffect = this._compiledEffects[name];\n if (onCompiled && compiledEffect.isReady()) {\n onCompiled(compiledEffect);\n }\n return compiledEffect;\n }\n const effect = new Effect(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, this, defines, fallbacks, onCompiled, onError, indexParameters, name, shaderLanguage);\n this._compiledEffects[name] = effect;\n return effect;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static _ConcatenateShader(source, defines, shaderVersion = \"\") {\n return shaderVersion + (defines ? defines + \"\\n\" : \"\") + source;\n }\n _compileShader(source, type, defines, shaderVersion) {\n return this._compileRawShader(ThinEngine._ConcatenateShader(source, defines, shaderVersion), type);\n }\n _compileRawShader(source, type) {\n const gl = this._gl;\n const shader = gl.createShader(type === \"vertex\" ? gl.VERTEX_SHADER : gl.FRAGMENT_SHADER);\n if (!shader) {\n let error = gl.NO_ERROR;\n let tempError = gl.NO_ERROR;\n while ((tempError = gl.getError()) !== gl.NO_ERROR) {\n error = tempError;\n }\n throw new Error(`Something went wrong while creating a gl ${type} shader object. gl error=${error}, gl isContextLost=${gl.isContextLost()}, _contextWasLost=${this._contextWasLost}`);\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n return shader;\n }\n /**\n * @internal\n */\n _getShaderSource(shader) {\n return this._gl.getShaderSource(shader);\n }\n /**\n * Directly creates a webGL program\n * @param pipelineContext defines the pipeline context to attach to\n * @param vertexCode defines the vertex shader code to use\n * @param fragmentCode defines the fragment shader code to use\n * @param context defines the webGL context to use (if not set, the current one will be used)\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\n * @returns the new webGL program\n */\n createRawShaderProgram(pipelineContext, vertexCode, fragmentCode, context, transformFeedbackVaryings = null) {\n context = context || this._gl;\n const vertexShader = this._compileRawShader(vertexCode, \"vertex\");\n const fragmentShader = this._compileRawShader(fragmentCode, \"fragment\");\n return this._createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings);\n }\n /**\n * Creates a webGL program\n * @param pipelineContext defines the pipeline context to attach to\n * @param vertexCode defines the vertex shader code to use\n * @param fragmentCode defines the fragment shader code to use\n * @param defines defines the string containing the defines to use to compile the shaders\n * @param context defines the webGL context to use (if not set, the current one will be used)\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\n * @returns the new webGL program\n */\n createShaderProgram(pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings = null) {\n context = context || this._gl;\n const shaderVersion = this._webGLVersion > 1 ? \"#version 300 es\\n#define WEBGL2 \\n\" : \"\";\n const vertexShader = this._compileShader(vertexCode, \"vertex\", defines, shaderVersion);\n const fragmentShader = this._compileShader(fragmentCode, \"fragment\", defines, shaderVersion);\n return this._createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings);\n }\n /**\n * Inline functions in shader code that are marked to be inlined\n * @param code code to inline\n * @returns inlined code\n */\n inlineShaderCode(code) {\n // no inlining needed in the WebGL engine\n return code;\n }\n /**\n * Creates a new pipeline context\n * @param shaderProcessingContext defines the shader processing context used during the processing if available\n * @returns the new pipeline\n */\n createPipelineContext(shaderProcessingContext) {\n const pipelineContext = new WebGLPipelineContext();\n pipelineContext.engine = this;\n if (this._caps.parallelShaderCompile) {\n pipelineContext.isParallelCompiled = true;\n }\n return pipelineContext;\n }\n /**\n * Creates a new material context\n * @returns the new context\n */\n createMaterialContext() {\n return undefined;\n }\n /**\n * Creates a new draw context\n * @returns the new context\n */\n createDrawContext() {\n return undefined;\n }\n _createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings = null) {\n const shaderProgram = context.createProgram();\n pipelineContext.program = shaderProgram;\n if (!shaderProgram) {\n throw new Error(\"Unable to create program\");\n }\n context.attachShader(shaderProgram, vertexShader);\n context.attachShader(shaderProgram, fragmentShader);\n context.linkProgram(shaderProgram);\n pipelineContext.context = context;\n pipelineContext.vertexShader = vertexShader;\n pipelineContext.fragmentShader = fragmentShader;\n if (!pipelineContext.isParallelCompiled) {\n this._finalizePipelineContext(pipelineContext);\n }\n return shaderProgram;\n }\n _finalizePipelineContext(pipelineContext) {\n const context = pipelineContext.context;\n const vertexShader = pipelineContext.vertexShader;\n const fragmentShader = pipelineContext.fragmentShader;\n const program = pipelineContext.program;\n const linked = context.getProgramParameter(program, context.LINK_STATUS);\n if (!linked) {\n // Get more info\n // Vertex\n if (!this._gl.getShaderParameter(vertexShader, this._gl.COMPILE_STATUS)) {\n const log = this._gl.getShaderInfoLog(vertexShader);\n if (log) {\n pipelineContext.vertexCompilationError = log;\n throw new Error(\"VERTEX SHADER \" + log);\n }\n }\n // Fragment\n if (!this._gl.getShaderParameter(fragmentShader, this._gl.COMPILE_STATUS)) {\n const log = this._gl.getShaderInfoLog(fragmentShader);\n if (log) {\n pipelineContext.fragmentCompilationError = log;\n throw new Error(\"FRAGMENT SHADER \" + log);\n }\n }\n const error = context.getProgramInfoLog(program);\n if (error) {\n pipelineContext.programLinkError = error;\n throw new Error(error);\n }\n }\n if (this.validateShaderPrograms) {\n context.validateProgram(program);\n const validated = context.getProgramParameter(program, context.VALIDATE_STATUS);\n if (!validated) {\n const error = context.getProgramInfoLog(program);\n if (error) {\n pipelineContext.programValidationError = error;\n throw new Error(error);\n }\n }\n }\n context.deleteShader(vertexShader);\n context.deleteShader(fragmentShader);\n pipelineContext.vertexShader = undefined;\n pipelineContext.fragmentShader = undefined;\n if (pipelineContext.onCompiled) {\n pipelineContext.onCompiled();\n pipelineContext.onCompiled = undefined;\n }\n }\n /**\n * @internal\n */\n _preparePipelineContext(pipelineContext, vertexSourceCode, fragmentSourceCode, createAsRaw, rawVertexSourceCode, rawFragmentSourceCode, rebuildRebind, defines, transformFeedbackVaryings, key) {\n const webGLRenderingState = pipelineContext;\n if (createAsRaw) {\n webGLRenderingState.program = this.createRawShaderProgram(webGLRenderingState, vertexSourceCode, fragmentSourceCode, undefined, transformFeedbackVaryings);\n }\n else {\n webGLRenderingState.program = this.createShaderProgram(webGLRenderingState, vertexSourceCode, fragmentSourceCode, defines, undefined, transformFeedbackVaryings);\n }\n webGLRenderingState.program.__SPECTOR_rebuildProgram = rebuildRebind;\n }\n /**\n * @internal\n */\n _isRenderingStateCompiled(pipelineContext) {\n const webGLPipelineContext = pipelineContext;\n if (this._isDisposed || webGLPipelineContext._isDisposed) {\n return false;\n }\n if (this._gl.getProgramParameter(webGLPipelineContext.program, this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)) {\n this._finalizePipelineContext(webGLPipelineContext);\n return true;\n }\n return false;\n }\n /**\n * @internal\n */\n _executeWhenRenderingStateIsCompiled(pipelineContext, action) {\n const webGLPipelineContext = pipelineContext;\n if (!webGLPipelineContext.isParallelCompiled) {\n action();\n return;\n }\n const oldHandler = webGLPipelineContext.onCompiled;\n if (oldHandler) {\n webGLPipelineContext.onCompiled = () => {\n oldHandler();\n action();\n };\n }\n else {\n webGLPipelineContext.onCompiled = action;\n }\n }\n /**\n * Gets the list of webGL uniform locations associated with a specific program based on a list of uniform names\n * @param pipelineContext defines the pipeline context to use\n * @param uniformsNames defines the list of uniform names\n * @returns an array of webGL uniform locations\n */\n getUniforms(pipelineContext, uniformsNames) {\n const results = new Array();\n const webGLPipelineContext = pipelineContext;\n for (let index = 0; index < uniformsNames.length; index++) {\n results.push(this._gl.getUniformLocation(webGLPipelineContext.program, uniformsNames[index]));\n }\n return results;\n }\n /**\n * Gets the list of active attributes for a given webGL program\n * @param pipelineContext defines the pipeline context to use\n * @param attributesNames defines the list of attribute names to get\n * @returns an array of indices indicating the offset of each attribute\n */\n getAttributes(pipelineContext, attributesNames) {\n const results = [];\n const webGLPipelineContext = pipelineContext;\n for (let index = 0; index < attributesNames.length; index++) {\n try {\n results.push(this._gl.getAttribLocation(webGLPipelineContext.program, attributesNames[index]));\n }\n catch (e) {\n results.push(-1);\n }\n }\n return results;\n }\n /**\n * Activates an effect, making it the current one (ie. the one used for rendering)\n * @param effect defines the effect to activate\n */\n enableEffect(effect) {\n effect = effect !== null && DrawWrapper.IsWrapper(effect) ? effect.effect : effect; // get only the effect, we don't need a Wrapper in the WebGL engine\n if (!effect || effect === this._currentEffect) {\n return;\n }\n this._stencilStateComposer.stencilMaterial = undefined;\n effect = effect;\n // Use program\n this.bindSamplers(effect);\n this._currentEffect = effect;\n if (effect.onBind) {\n effect.onBind(effect);\n }\n if (effect._onBindObservable) {\n effect._onBindObservable.notifyObservers(effect);\n }\n }\n /**\n * Set the value of an uniform to a number (int)\n * @param uniform defines the webGL uniform location where to store the value\n * @param value defines the int number to store\n * @returns true if the value was set\n */\n setInt(uniform, value) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform1i(uniform, value);\n return true;\n }\n /**\n * Set the value of an uniform to a int2\n * @param uniform defines the webGL uniform location where to store the value\n * @param x defines the 1st component of the value\n * @param y defines the 2nd component of the value\n * @returns true if the value was set\n */\n setInt2(uniform, x, y) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform2i(uniform, x, y);\n return true;\n }\n /**\n * Set the value of an uniform to a int3\n * @param uniform defines the webGL uniform location where to store the value\n * @param x defines the 1st component of the value\n * @param y defines the 2nd component of the value\n * @param z defines the 3rd component of the value\n * @returns true if the value was set\n */\n setInt3(uniform, x, y, z) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform3i(uniform, x, y, z);\n return true;\n }\n /**\n * Set the value of an uniform to a int4\n * @param uniform defines the webGL uniform location where to store the value\n * @param x defines the 1st component of the value\n * @param y defines the 2nd component of the value\n * @param z defines the 3rd component of the value\n * @param w defines the 4th component of the value\n * @returns true if the value was set\n */\n setInt4(uniform, x, y, z, w) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform4i(uniform, x, y, z, w);\n return true;\n }\n /**\n * Set the value of an uniform to an array of int32\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of int32 to store\n * @returns true if the value was set\n */\n setIntArray(uniform, array) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform1iv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to an array of int32 (stored as vec2)\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of int32 to store\n * @returns true if the value was set\n */\n setIntArray2(uniform, array) {\n if (!uniform || array.length % 2 !== 0) {\n return false;\n }\n this._gl.uniform2iv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to an array of int32 (stored as vec3)\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of int32 to store\n * @returns true if the value was set\n */\n setIntArray3(uniform, array) {\n if (!uniform || array.length % 3 !== 0) {\n return false;\n }\n this._gl.uniform3iv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to an array of int32 (stored as vec4)\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of int32 to store\n * @returns true if the value was set\n */\n setIntArray4(uniform, array) {\n if (!uniform || array.length % 4 !== 0) {\n return false;\n }\n this._gl.uniform4iv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to a number (unsigned int)\n * @param uniform defines the webGL uniform location where to store the value\n * @param value defines the unsigned int number to store\n * @returns true if the value was set\n */\n setUInt(uniform, value) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform1ui(uniform, value);\n return true;\n }\n /**\n * Set the value of an uniform to a unsigned int2\n * @param uniform defines the webGL uniform location where to store the value\n * @param x defines the 1st component of the value\n * @param y defines the 2nd component of the value\n * @returns true if the value was set\n */\n setUInt2(uniform, x, y) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform2ui(uniform, x, y);\n return true;\n }\n /**\n * Set the value of an uniform to a unsigned int3\n * @param uniform defines the webGL uniform location where to store the value\n * @param x defines the 1st component of the value\n * @param y defines the 2nd component of the value\n * @param z defines the 3rd component of the value\n * @returns true if the value was set\n */\n setUInt3(uniform, x, y, z) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform3ui(uniform, x, y, z);\n return true;\n }\n /**\n * Set the value of an uniform to a unsigned int4\n * @param uniform defines the webGL uniform location where to store the value\n * @param x defines the 1st component of the value\n * @param y defines the 2nd component of the value\n * @param z defines the 3rd component of the value\n * @param w defines the 4th component of the value\n * @returns true if the value was set\n */\n setUInt4(uniform, x, y, z, w) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform4ui(uniform, x, y, z, w);\n return true;\n }\n /**\n * Set the value of an uniform to an array of unsigned int32\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of unsigned int32 to store\n * @returns true if the value was set\n */\n setUIntArray(uniform, array) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform1uiv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to an array of unsigned int32 (stored as vec2)\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of unsigned int32 to store\n * @returns true if the value was set\n */\n setUIntArray2(uniform, array) {\n if (!uniform || array.length % 2 !== 0) {\n return false;\n }\n this._gl.uniform2uiv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to an array of unsigned int32 (stored as vec3)\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of unsigned int32 to store\n * @returns true if the value was set\n */\n setUIntArray3(uniform, array) {\n if (!uniform || array.length % 3 !== 0) {\n return false;\n }\n this._gl.uniform3uiv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to an array of unsigned int32 (stored as vec4)\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of unsigned int32 to store\n * @returns true if the value was set\n */\n setUIntArray4(uniform, array) {\n if (!uniform || array.length % 4 !== 0) {\n return false;\n }\n this._gl.uniform4uiv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to an array of number\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of number to store\n * @returns true if the value was set\n */\n setArray(uniform, array) {\n if (!uniform) {\n return false;\n }\n if (array.length < 1) {\n return false;\n }\n this._gl.uniform1fv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to an array of number (stored as vec2)\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of number to store\n * @returns true if the value was set\n */\n setArray2(uniform, array) {\n if (!uniform || array.length % 2 !== 0) {\n return false;\n }\n this._gl.uniform2fv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to an array of number (stored as vec3)\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of number to store\n * @returns true if the value was set\n */\n setArray3(uniform, array) {\n if (!uniform || array.length % 3 !== 0) {\n return false;\n }\n this._gl.uniform3fv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to an array of number (stored as vec4)\n * @param uniform defines the webGL uniform location where to store the value\n * @param array defines the array of number to store\n * @returns true if the value was set\n */\n setArray4(uniform, array) {\n if (!uniform || array.length % 4 !== 0) {\n return false;\n }\n this._gl.uniform4fv(uniform, array);\n return true;\n }\n /**\n * Set the value of an uniform to an array of float32 (stored as matrices)\n * @param uniform defines the webGL uniform location where to store the value\n * @param matrices defines the array of float32 to store\n * @returns true if the value was set\n */\n setMatrices(uniform, matrices) {\n if (!uniform) {\n return false;\n }\n this._gl.uniformMatrix4fv(uniform, false, matrices);\n return true;\n }\n /**\n * Set the value of an uniform to a matrix (3x3)\n * @param uniform defines the webGL uniform location where to store the value\n * @param matrix defines the Float32Array representing the 3x3 matrix to store\n * @returns true if the value was set\n */\n setMatrix3x3(uniform, matrix) {\n if (!uniform) {\n return false;\n }\n this._gl.uniformMatrix3fv(uniform, false, matrix);\n return true;\n }\n /**\n * Set the value of an uniform to a matrix (2x2)\n * @param uniform defines the webGL uniform location where to store the value\n * @param matrix defines the Float32Array representing the 2x2 matrix to store\n * @returns true if the value was set\n */\n setMatrix2x2(uniform, matrix) {\n if (!uniform) {\n return false;\n }\n this._gl.uniformMatrix2fv(uniform, false, matrix);\n return true;\n }\n /**\n * Set the value of an uniform to a number (float)\n * @param uniform defines the webGL uniform location where to store the value\n * @param value defines the float number to store\n * @returns true if the value was transferred\n */\n setFloat(uniform, value) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform1f(uniform, value);\n return true;\n }\n /**\n * Set the value of an uniform to a vec2\n * @param uniform defines the webGL uniform location where to store the value\n * @param x defines the 1st component of the value\n * @param y defines the 2nd component of the value\n * @returns true if the value was set\n */\n setFloat2(uniform, x, y) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform2f(uniform, x, y);\n return true;\n }\n /**\n * Set the value of an uniform to a vec3\n * @param uniform defines the webGL uniform location where to store the value\n * @param x defines the 1st component of the value\n * @param y defines the 2nd component of the value\n * @param z defines the 3rd component of the value\n * @returns true if the value was set\n */\n setFloat3(uniform, x, y, z) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform3f(uniform, x, y, z);\n return true;\n }\n /**\n * Set the value of an uniform to a vec4\n * @param uniform defines the webGL uniform location where to store the value\n * @param x defines the 1st component of the value\n * @param y defines the 2nd component of the value\n * @param z defines the 3rd component of the value\n * @param w defines the 4th component of the value\n * @returns true if the value was set\n */\n setFloat4(uniform, x, y, z, w) {\n if (!uniform) {\n return false;\n }\n this._gl.uniform4f(uniform, x, y, z, w);\n return true;\n }\n // States\n /**\n * Apply all cached states (depth, culling, stencil and alpha)\n */\n applyStates() {\n this._depthCullingState.apply(this._gl);\n this._stencilStateComposer.apply(this._gl);\n this._alphaState.apply(this._gl);\n if (this._colorWriteChanged) {\n this._colorWriteChanged = false;\n const enable = this._colorWrite;\n this._gl.colorMask(enable, enable, enable, enable);\n }\n }\n /**\n * Enable or disable color writing\n * @param enable defines the state to set\n */\n setColorWrite(enable) {\n if (enable !== this._colorWrite) {\n this._colorWriteChanged = true;\n this._colorWrite = enable;\n }\n }\n /**\n * Gets a boolean indicating if color writing is enabled\n * @returns the current color writing state\n */\n getColorWrite() {\n return this._colorWrite;\n }\n /**\n * Gets the depth culling state manager\n */\n get depthCullingState() {\n return this._depthCullingState;\n }\n /**\n * Gets the alpha state manager\n */\n get alphaState() {\n return this._alphaState;\n }\n /**\n * Gets the stencil state manager\n */\n get stencilState() {\n return this._stencilState;\n }\n /**\n * Gets the stencil state composer\n */\n get stencilStateComposer() {\n return this._stencilStateComposer;\n }\n // Textures\n /**\n * Clears the list of texture accessible through engine.\n * This can help preventing texture load conflict due to name collision.\n */\n clearInternalTexturesCache() {\n this._internalTexturesCache.length = 0;\n }\n /**\n * Force the entire cache to be cleared\n * You should not have to use this function unless your engine needs to share the webGL context with another engine\n * @param bruteForce defines a boolean to force clearing ALL caches (including stencil, detoh and alpha states)\n */\n wipeCaches(bruteForce) {\n if (this.preventCacheWipeBetweenFrames && !bruteForce) {\n return;\n }\n this._currentEffect = null;\n this._viewportCached.x = 0;\n this._viewportCached.y = 0;\n this._viewportCached.z = 0;\n this._viewportCached.w = 0;\n // Done before in case we clean the attributes\n this._unbindVertexArrayObject();\n if (bruteForce) {\n this._currentProgram = null;\n this.resetTextureCache();\n this._stencilStateComposer.reset();\n this._depthCullingState.reset();\n this._depthCullingState.depthFunc = this._gl.LEQUAL;\n this._alphaState.reset();\n this._alphaMode = 1;\n this._alphaEquation = 0;\n this._colorWrite = true;\n this._colorWriteChanged = true;\n this._unpackFlipYCached = null;\n this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this._gl.NONE);\n this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0);\n this._mustWipeVertexAttributes = true;\n this.unbindAllAttributes();\n }\n this._resetVertexBufferBinding();\n this._cachedIndexBuffer = null;\n this._cachedEffectForVertexBuffers = null;\n this.bindIndexBuffer(null);\n }\n /**\n * @internal\n */\n _getSamplingParameters(samplingMode, generateMipMaps) {\n const gl = this._gl;\n let magFilter = gl.NEAREST;\n let minFilter = gl.NEAREST;\n switch (samplingMode) {\n case 11:\n magFilter = gl.LINEAR;\n if (generateMipMaps) {\n minFilter = gl.LINEAR_MIPMAP_NEAREST;\n }\n else {\n minFilter = gl.LINEAR;\n }\n break;\n case 3:\n magFilter = gl.LINEAR;\n if (generateMipMaps) {\n minFilter = gl.LINEAR_MIPMAP_LINEAR;\n }\n else {\n minFilter = gl.LINEAR;\n }\n break;\n case 8:\n magFilter = gl.NEAREST;\n if (generateMipMaps) {\n minFilter = gl.NEAREST_MIPMAP_LINEAR;\n }\n else {\n minFilter = gl.NEAREST;\n }\n break;\n case 4:\n magFilter = gl.NEAREST;\n if (generateMipMaps) {\n minFilter = gl.NEAREST_MIPMAP_NEAREST;\n }\n else {\n minFilter = gl.NEAREST;\n }\n break;\n case 5:\n magFilter = gl.NEAREST;\n if (generateMipMaps) {\n minFilter = gl.LINEAR_MIPMAP_NEAREST;\n }\n else {\n minFilter = gl.LINEAR;\n }\n break;\n case 6:\n magFilter = gl.NEAREST;\n if (generateMipMaps) {\n minFilter = gl.LINEAR_MIPMAP_LINEAR;\n }\n else {\n minFilter = gl.LINEAR;\n }\n break;\n case 7:\n magFilter = gl.NEAREST;\n minFilter = gl.LINEAR;\n break;\n case 1:\n magFilter = gl.NEAREST;\n minFilter = gl.NEAREST;\n break;\n case 9:\n magFilter = gl.LINEAR;\n if (generateMipMaps) {\n minFilter = gl.NEAREST_MIPMAP_NEAREST;\n }\n else {\n minFilter = gl.NEAREST;\n }\n break;\n case 10:\n magFilter = gl.LINEAR;\n if (generateMipMaps) {\n minFilter = gl.NEAREST_MIPMAP_LINEAR;\n }\n else {\n minFilter = gl.NEAREST;\n }\n break;\n case 2:\n magFilter = gl.LINEAR;\n minFilter = gl.LINEAR;\n break;\n case 12:\n magFilter = gl.LINEAR;\n minFilter = gl.NEAREST;\n break;\n }\n return {\n min: minFilter,\n mag: magFilter,\n };\n }\n /** @internal */\n _createTexture() {\n const texture = this._gl.createTexture();\n if (!texture) {\n throw new Error(\"Unable to create texture\");\n }\n return texture;\n }\n /** @internal */\n _createHardwareTexture() {\n return new WebGLHardwareTexture(this._createTexture(), this._gl);\n }\n /**\n * Creates an internal texture without binding it to a framebuffer\n * @internal\n * @param size defines the size of the texture\n * @param options defines the options used to create the texture\n * @param delayGPUTextureCreation true to delay the texture creation the first time it is really needed. false to create it right away\n * @param source source type of the texture\n * @returns a new internal texture\n */\n _createInternalTexture(size, options, delayGPUTextureCreation = true, source = InternalTextureSource.Unknown) {\n var _a;\n let generateMipMaps = false;\n let type = 0;\n let samplingMode = 3;\n let format = 5;\n let useSRGBBuffer = false;\n let samples = 1;\n let label;\n if (options !== undefined && typeof options === \"object\") {\n generateMipMaps = !!options.generateMipMaps;\n type = options.type === undefined ? 0 : options.type;\n samplingMode = options.samplingMode === undefined ? 3 : options.samplingMode;\n format = options.format === undefined ? 5 : options.format;\n useSRGBBuffer = options.useSRGBBuffer === undefined ? false : options.useSRGBBuffer;\n samples = (_a = options.samples) !== null && _a !== void 0 ? _a : 1;\n label = options.label;\n }\n else {\n generateMipMaps = !!options;\n }\n useSRGBBuffer && (useSRGBBuffer = this._caps.supportSRGBBuffers && (this.webGLVersion > 1 || this.isWebGPU));\n if (type === 1 && !this._caps.textureFloatLinearFiltering) {\n // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE\n samplingMode = 1;\n }\n else if (type === 2 && !this._caps.textureHalfFloatLinearFiltering) {\n // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE\n samplingMode = 1;\n }\n if (type === 1 && !this._caps.textureFloat) {\n type = 0;\n Logger.Warn(\"Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE\");\n }\n const gl = this._gl;\n const texture = new InternalTexture(this, source);\n const width = size.width || size;\n const height = size.height || size;\n const layers = size.layers || 0;\n const filters = this._getSamplingParameters(samplingMode, generateMipMaps);\n const target = layers !== 0 ? gl.TEXTURE_2D_ARRAY : gl.TEXTURE_2D;\n const sizedFormat = this._getRGBABufferInternalSizedFormat(type, format, useSRGBBuffer);\n const internalFormat = this._getInternalFormat(format);\n const textureType = this._getWebGLTextureType(type);\n // Bind\n this._bindTextureDirectly(target, texture);\n if (layers !== 0) {\n texture.is2DArray = true;\n gl.texImage3D(target, 0, sizedFormat, width, height, layers, 0, internalFormat, textureType, null);\n }\n else {\n gl.texImage2D(target, 0, sizedFormat, width, height, 0, internalFormat, textureType, null);\n }\n gl.texParameteri(target, gl.TEXTURE_MAG_FILTER, filters.mag);\n gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, filters.min);\n gl.texParameteri(target, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(target, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n // MipMaps\n if (generateMipMaps) {\n this._gl.generateMipmap(target);\n }\n this._bindTextureDirectly(target, null);\n texture._useSRGBBuffer = useSRGBBuffer;\n texture.baseWidth = width;\n texture.baseHeight = height;\n texture.width = width;\n texture.height = height;\n texture.depth = layers;\n texture.isReady = true;\n texture.samples = samples;\n texture.generateMipMaps = generateMipMaps;\n texture.samplingMode = samplingMode;\n texture.type = type;\n texture.format = format;\n texture.label = label;\n this._internalTexturesCache.push(texture);\n return texture;\n }\n /**\n * @internal\n */\n _getUseSRGBBuffer(useSRGBBuffer, noMipmap) {\n // Generating mipmaps for sRGB textures is not supported in WebGL1 so we must disable the support if mipmaps is enabled\n return useSRGBBuffer && this._caps.supportSRGBBuffers && (this.webGLVersion > 1 || this.isWebGPU || noMipmap);\n }\n _createTextureBase(url, noMipmap, invertY, scene, samplingMode = 3, onLoad = null, onError = null, prepareTexture, prepareTextureProcessFunction, buffer = null, fallback = null, format = null, forcedExtension = null, mimeType, loaderOptions, useSRGBBuffer) {\n url = url || \"\";\n const fromData = url.substr(0, 5) === \"data:\";\n const fromBlob = url.substr(0, 5) === \"blob:\";\n const isBase64 = fromData && url.indexOf(\";base64,\") !== -1;\n const texture = fallback ? fallback : new InternalTexture(this, InternalTextureSource.Url);\n if (texture !== fallback) {\n texture.label = url.substring(0, 60); // default label, can be overriden by the caller\n }\n const originalUrl = url;\n if (this._transformTextureUrl && !isBase64 && !fallback && !buffer) {\n url = this._transformTextureUrl(url);\n }\n if (originalUrl !== url) {\n texture._originalUrl = originalUrl;\n }\n // establish the file extension, if possible\n const lastDot = url.lastIndexOf(\".\");\n let extension = forcedExtension ? forcedExtension : lastDot > -1 ? url.substring(lastDot).toLowerCase() : \"\";\n let loader = null;\n // Remove query string\n const queryStringIndex = extension.indexOf(\"?\");\n if (queryStringIndex > -1) {\n extension = extension.split(\"?\")[0];\n }\n for (const availableLoader of ThinEngine._TextureLoaders) {\n if (availableLoader.canLoad(extension, mimeType)) {\n loader = availableLoader;\n break;\n }\n }\n if (scene) {\n scene.addPendingData(texture);\n }\n texture.url = url;\n texture.generateMipMaps = !noMipmap;\n texture.samplingMode = samplingMode;\n texture.invertY = invertY;\n texture._useSRGBBuffer = this._getUseSRGBBuffer(!!useSRGBBuffer, noMipmap);\n if (!this._doNotHandleContextLost) {\n // Keep a link to the buffer only if we plan to handle context lost\n texture._buffer = buffer;\n }\n let onLoadObserver = null;\n if (onLoad && !fallback) {\n onLoadObserver = texture.onLoadedObservable.add(onLoad);\n }\n if (!fallback) {\n this._internalTexturesCache.push(texture);\n }\n const onInternalError = (message, exception) => {\n if (scene) {\n scene.removePendingData(texture);\n }\n if (url === originalUrl) {\n if (onLoadObserver) {\n texture.onLoadedObservable.remove(onLoadObserver);\n }\n if (EngineStore.UseFallbackTexture) {\n this._createTextureBase(EngineStore.FallbackTexture, noMipmap, texture.invertY, scene, samplingMode, null, onError, prepareTexture, prepareTextureProcessFunction, buffer, texture);\n }\n message = (message || \"Unknown error\") + (EngineStore.UseFallbackTexture ? \" - Fallback texture was used\" : \"\");\n texture.onErrorObservable.notifyObservers({ message, exception });\n if (onError) {\n onError(message, exception);\n }\n }\n else {\n // fall back to the original url if the transformed url fails to load\n Logger.Warn(`Failed to load ${url}, falling back to ${originalUrl}`);\n this._createTextureBase(originalUrl, noMipmap, texture.invertY, scene, samplingMode, onLoad, onError, prepareTexture, prepareTextureProcessFunction, buffer, texture, format, forcedExtension, mimeType, loaderOptions, useSRGBBuffer);\n }\n };\n // processing for non-image formats\n if (loader) {\n const callback = (data) => {\n loader.loadData(data, texture, (width, height, loadMipmap, isCompressed, done, loadFailed) => {\n if (loadFailed) {\n onInternalError(\"TextureLoader failed to load data\");\n }\n else {\n prepareTexture(texture, extension, scene, { width, height }, texture.invertY, !loadMipmap, isCompressed, () => {\n done();\n return false;\n }, samplingMode);\n }\n }, loaderOptions);\n };\n if (!buffer) {\n this._loadFile(url, (data) => callback(new Uint8Array(data)), undefined, scene ? scene.offlineProvider : undefined, true, (request, exception) => {\n onInternalError(\"Unable to load \" + (request ? request.responseURL : url, exception));\n });\n }\n else {\n if (buffer instanceof ArrayBuffer) {\n callback(new Uint8Array(buffer));\n }\n else if (ArrayBuffer.isView(buffer)) {\n callback(buffer);\n }\n else {\n if (onError) {\n onError(\"Unable to load: only ArrayBuffer or ArrayBufferView is supported\", null);\n }\n }\n }\n }\n else {\n const onload = (img) => {\n if (fromBlob && !this._doNotHandleContextLost) {\n // We need to store the image if we need to rebuild the texture\n // in case of a webgl context lost\n texture._buffer = img;\n }\n prepareTexture(texture, extension, scene, img, texture.invertY, noMipmap, false, prepareTextureProcessFunction, samplingMode);\n };\n // According to the WebGL spec section 6.10, ImageBitmaps must be inverted on creation.\n // So, we pass imageOrientation to _FileToolsLoadImage() as it may create an ImageBitmap.\n if (!fromData || isBase64) {\n if (buffer && (typeof buffer.decoding === \"string\" || buffer.close)) {\n onload(buffer);\n }\n else {\n ThinEngine._FileToolsLoadImage(url, onload, onInternalError, scene ? scene.offlineProvider : null, mimeType, texture.invertY && this._features.needsInvertingBitmap ? { imageOrientation: \"flipY\" } : undefined);\n }\n }\n else if (typeof buffer === \"string\" || buffer instanceof ArrayBuffer || ArrayBuffer.isView(buffer) || buffer instanceof Blob) {\n ThinEngine._FileToolsLoadImage(buffer, onload, onInternalError, scene ? scene.offlineProvider : null, mimeType, texture.invertY && this._features.needsInvertingBitmap ? { imageOrientation: \"flipY\" } : undefined);\n }\n else if (buffer) {\n onload(buffer);\n }\n }\n return texture;\n }\n /**\n * Usually called from Texture.ts.\n * Passed information to create a WebGLTexture\n * @param url defines a value which contains one of the following:\n * * A conventional http URL, e.g. 'http://...' or 'file://...'\n * * A base64 string of in-line texture data, e.g. 'data:image/jpg;base64,/...'\n * * An indicator that data being passed using the buffer parameter, e.g. 'data:mytexture.jpg'\n * @param noMipmap defines a boolean indicating that no mipmaps shall be generated. Ignored for compressed textures. They must be in the file\n * @param invertY when true, image is flipped when loaded. You probably want true. Certain compressed textures may invert this if their default is inverted (eg. ktx)\n * @param scene needed for loading to the correct scene\n * @param samplingMode mode with should be used sample / access the texture (Default: Texture.TRILINEAR_SAMPLINGMODE)\n * @param onLoad optional callback to be called upon successful completion\n * @param onError optional callback to be called upon failure\n * @param buffer a source of a file previously fetched as either a base64 string, an ArrayBuffer (compressed or image format), HTMLImageElement (image format), or a Blob\n * @param fallback an internal argument in case the function must be called again, due to etc1 not having alpha capabilities\n * @param format internal format. Default: RGB when extension is '.jpg' else RGBA. Ignored for compressed textures\n * @param forcedExtension defines the extension to use to pick the right loader\n * @param mimeType defines an optional mime type\n * @param loaderOptions options to be passed to the loader\n * @param creationFlags specific flags to use when creating the texture (1 for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns a InternalTexture for assignment back into BABYLON.Texture\n */\n createTexture(url, noMipmap, invertY, scene, samplingMode = 3, onLoad = null, onError = null, buffer = null, fallback = null, format = null, forcedExtension = null, mimeType, loaderOptions, creationFlags, useSRGBBuffer) {\n return this._createTextureBase(url, noMipmap, invertY, scene, samplingMode, onLoad, onError, this._prepareWebGLTexture.bind(this), (potWidth, potHeight, img, extension, texture, continuationCallback) => {\n const gl = this._gl;\n const isPot = img.width === potWidth && img.height === potHeight;\n const tip = this._getTexImageParametersForCreateTexture(format, extension, texture._useSRGBBuffer);\n if (isPot) {\n gl.texImage2D(gl.TEXTURE_2D, 0, tip.internalFormat, tip.format, tip.type, img);\n return false;\n }\n const maxTextureSize = this._caps.maxTextureSize;\n if (img.width > maxTextureSize || img.height > maxTextureSize || !this._supportsHardwareTextureRescaling) {\n this._prepareWorkingCanvas();\n if (!this._workingCanvas || !this._workingContext) {\n return false;\n }\n this._workingCanvas.width = potWidth;\n this._workingCanvas.height = potHeight;\n this._workingContext.drawImage(img, 0, 0, img.width, img.height, 0, 0, potWidth, potHeight);\n gl.texImage2D(gl.TEXTURE_2D, 0, tip.internalFormat, tip.format, tip.type, this._workingCanvas);\n texture.width = potWidth;\n texture.height = potHeight;\n return false;\n }\n else {\n // Using shaders when possible to rescale because canvas.drawImage is lossy\n const source = new InternalTexture(this, InternalTextureSource.Temp);\n this._bindTextureDirectly(gl.TEXTURE_2D, source, true);\n gl.texImage2D(gl.TEXTURE_2D, 0, tip.internalFormat, tip.format, tip.type, img);\n this._rescaleTexture(source, texture, scene, tip.format, () => {\n this._releaseTexture(source);\n this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);\n continuationCallback();\n });\n }\n return true;\n }, buffer, fallback, format, forcedExtension, mimeType, loaderOptions, useSRGBBuffer);\n }\n /**\n * Calls to the GL texImage2D and texImage3D functions require three arguments describing the pixel format of the texture.\n * createTexture derives these from the babylonFormat and useSRGBBuffer arguments and also the file extension of the URL it's working with.\n * This function encapsulates that derivation for easy unit testing.\n * @param babylonFormat Babylon's format enum, as specified in ITextureCreationOptions.\n * @param fileExtension The file extension including the dot, e.g. .jpg.\n * @param useSRGBBuffer Use SRGB not linear.\n * @returns The options to pass to texImage2D or texImage3D calls.\n * @internal\n */\n _getTexImageParametersForCreateTexture(babylonFormat, fileExtension, useSRGBBuffer) {\n if (babylonFormat === undefined || babylonFormat === null) {\n babylonFormat = fileExtension === \".jpg\" && !useSRGBBuffer ? 4 : 5;\n }\n let format, internalFormat;\n if (this.webGLVersion === 1) {\n // In WebGL 1, format and internalFormat must be the same and taken from a limited set of values, see https://docs.gl/es2/glTexImage2D.\n // The SRGB extension (https://developer.mozilla.org/en-US/docs/Web/API/EXT_sRGB) adds some extra values, hence passing useSRGBBuffer\n // to getInternalFormat.\n format = this._getInternalFormat(babylonFormat, useSRGBBuffer);\n internalFormat = format;\n }\n else {\n // In WebGL 2, format has a wider range of values and internal format can be one of the sized formats, see\n // https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml.\n // SRGB is included in the sized format and should not be passed in \"format\", hence always passing useSRGBBuffer as false.\n format = this._getInternalFormat(babylonFormat, false);\n internalFormat = this._getRGBABufferInternalSizedFormat(0, babylonFormat, useSRGBBuffer);\n }\n return {\n internalFormat,\n format,\n type: this._gl.UNSIGNED_BYTE,\n };\n }\n /**\n * Loads an image as an HTMLImageElement.\n * @param input url string, ArrayBuffer, or Blob to load\n * @param onLoad callback called when the image successfully loads\n * @param onError callback called when the image fails to load\n * @param offlineProvider offline provider for caching\n * @param mimeType optional mime type\n * @param imageBitmapOptions optional the options to use when creating an ImageBitmap\n * @returns the HTMLImageElement of the loaded image\n * @internal\n */\n static _FileToolsLoadImage(input, onLoad, onError, offlineProvider, mimeType, imageBitmapOptions) {\n throw _WarnImport(\"FileTools\");\n }\n /**\n * @internal\n */\n _rescaleTexture(source, destination, scene, internalFormat, onComplete) { }\n /**\n * Creates a raw texture\n * @param data defines the data to store in the texture\n * @param width defines the width of the texture\n * @param height defines the height of the texture\n * @param format defines the format of the data\n * @param generateMipMaps defines if the engine should generate the mip levels\n * @param invertY defines if data must be stored with Y axis inverted\n * @param samplingMode defines the required sampling mode (Texture.NEAREST_SAMPLINGMODE by default)\n * @param compression defines the compression used (null by default)\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\n * @param creationFlags specific flags to use when creating the texture (1 for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the raw texture inside an InternalTexture\n */\n createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, compression = null, type = 0, creationFlags = 0, useSRGBBuffer = false) {\n throw _WarnImport(\"Engine.RawTexture\");\n }\n /**\n * Creates a new raw cube texture\n * @param data defines the array of data to use to create each face\n * @param size defines the size of the textures\n * @param format defines the format of the data\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\n * @param generateMipMaps defines if the engine should generate the mip levels\n * @param invertY defines if data must be stored with Y axis inverted\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\n * @param compression defines the compression used (null by default)\n * @returns the cube texture as an InternalTexture\n */\n createRawCubeTexture(data, size, format, type, generateMipMaps, invertY, samplingMode, compression = null) {\n throw _WarnImport(\"Engine.RawTexture\");\n }\n /**\n * Creates a new raw 3D texture\n * @param data defines the data used to create the texture\n * @param width defines the width of the texture\n * @param height defines the height of the texture\n * @param depth defines the depth of the texture\n * @param format defines the format of the texture\n * @param generateMipMaps defines if the engine must generate mip levels\n * @param invertY defines if data must be stored with Y axis inverted\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\n * @param compression defines the compressed used (can be null)\n * @param textureType defines the compressed used (can be null)\n * @returns a new raw 3D texture (stored in an InternalTexture)\n */\n createRawTexture3D(data, width, height, depth, format, generateMipMaps, invertY, samplingMode, compression = null, textureType = 0) {\n throw _WarnImport(\"Engine.RawTexture\");\n }\n /**\n * Creates a new raw 2D array texture\n * @param data defines the data used to create the texture\n * @param width defines the width of the texture\n * @param height defines the height of the texture\n * @param depth defines the number of layers of the texture\n * @param format defines the format of the texture\n * @param generateMipMaps defines if the engine must generate mip levels\n * @param invertY defines if data must be stored with Y axis inverted\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\n * @param compression defines the compressed used (can be null)\n * @param textureType defines the compressed used (can be null)\n * @returns a new raw 2D array texture (stored in an InternalTexture)\n */\n createRawTexture2DArray(data, width, height, depth, format, generateMipMaps, invertY, samplingMode, compression = null, textureType = 0) {\n throw _WarnImport(\"Engine.RawTexture\");\n }\n /**\n * @internal\n */\n _unpackFlipY(value) {\n if (this._unpackFlipYCached !== value) {\n this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL, value ? 1 : 0);\n if (this.enableUnpackFlipYCached) {\n this._unpackFlipYCached = value;\n }\n }\n }\n /** @internal */\n _getUnpackAlignement() {\n return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT);\n }\n _getTextureTarget(texture) {\n if (texture.isCube) {\n return this._gl.TEXTURE_CUBE_MAP;\n }\n else if (texture.is3D) {\n return this._gl.TEXTURE_3D;\n }\n else if (texture.is2DArray || texture.isMultiview) {\n return this._gl.TEXTURE_2D_ARRAY;\n }\n return this._gl.TEXTURE_2D;\n }\n /**\n * Update the sampling mode of a given texture\n * @param samplingMode defines the required sampling mode\n * @param texture defines the texture to update\n * @param generateMipMaps defines whether to generate mipmaps for the texture\n */\n updateTextureSamplingMode(samplingMode, texture, generateMipMaps = false) {\n const target = this._getTextureTarget(texture);\n const filters = this._getSamplingParameters(samplingMode, texture.useMipMaps || generateMipMaps);\n this._setTextureParameterInteger(target, this._gl.TEXTURE_MAG_FILTER, filters.mag, texture);\n this._setTextureParameterInteger(target, this._gl.TEXTURE_MIN_FILTER, filters.min);\n if (generateMipMaps) {\n texture.generateMipMaps = true;\n this._gl.generateMipmap(target);\n }\n this._bindTextureDirectly(target, null);\n texture.samplingMode = samplingMode;\n }\n /**\n * Update the dimensions of a texture\n * @param texture texture to update\n * @param width new width of the texture\n * @param height new height of the texture\n * @param depth new depth of the texture\n */\n updateTextureDimensions(texture, width, height, depth = 1) { }\n /**\n * Update the sampling mode of a given texture\n * @param texture defines the texture to update\n * @param wrapU defines the texture wrap mode of the u coordinates\n * @param wrapV defines the texture wrap mode of the v coordinates\n * @param wrapR defines the texture wrap mode of the r coordinates\n */\n updateTextureWrappingMode(texture, wrapU, wrapV = null, wrapR = null) {\n const target = this._getTextureTarget(texture);\n if (wrapU !== null) {\n this._setTextureParameterInteger(target, this._gl.TEXTURE_WRAP_S, this._getTextureWrapMode(wrapU), texture);\n texture._cachedWrapU = wrapU;\n }\n if (wrapV !== null) {\n this._setTextureParameterInteger(target, this._gl.TEXTURE_WRAP_T, this._getTextureWrapMode(wrapV), texture);\n texture._cachedWrapV = wrapV;\n }\n if ((texture.is2DArray || texture.is3D) && wrapR !== null) {\n this._setTextureParameterInteger(target, this._gl.TEXTURE_WRAP_R, this._getTextureWrapMode(wrapR), texture);\n texture._cachedWrapR = wrapR;\n }\n this._bindTextureDirectly(target, null);\n }\n /**\n * @internal\n */\n _setupDepthStencilTexture(internalTexture, size, generateStencil, bilinearFiltering, comparisonFunction, samples = 1) {\n const width = size.width || size;\n const height = size.height || size;\n const layers = size.layers || 0;\n internalTexture.baseWidth = width;\n internalTexture.baseHeight = height;\n internalTexture.width = width;\n internalTexture.height = height;\n internalTexture.is2DArray = layers > 0;\n internalTexture.depth = layers;\n internalTexture.isReady = true;\n internalTexture.samples = samples;\n internalTexture.generateMipMaps = false;\n internalTexture.samplingMode = bilinearFiltering ? 2 : 1;\n internalTexture.type = 0;\n internalTexture._comparisonFunction = comparisonFunction;\n const gl = this._gl;\n const target = this._getTextureTarget(internalTexture);\n const samplingParameters = this._getSamplingParameters(internalTexture.samplingMode, false);\n gl.texParameteri(target, gl.TEXTURE_MAG_FILTER, samplingParameters.mag);\n gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, samplingParameters.min);\n gl.texParameteri(target, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(target, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n // TEXTURE_COMPARE_FUNC/MODE are only availble in WebGL2.\n if (this.webGLVersion > 1) {\n if (comparisonFunction === 0) {\n gl.texParameteri(target, gl.TEXTURE_COMPARE_FUNC, 515);\n gl.texParameteri(target, gl.TEXTURE_COMPARE_MODE, gl.NONE);\n }\n else {\n gl.texParameteri(target, gl.TEXTURE_COMPARE_FUNC, comparisonFunction);\n gl.texParameteri(target, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);\n }\n }\n }\n /**\n * @internal\n */\n _uploadCompressedDataToTextureDirectly(texture, internalFormat, width, height, data, faceIndex = 0, lod = 0) {\n const gl = this._gl;\n let target = gl.TEXTURE_2D;\n if (texture.isCube) {\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\n }\n if (texture._useSRGBBuffer) {\n switch (internalFormat) {\n case 37492:\n case 36196:\n // Note, if using ETC1 and sRGB is requested, this will use ETC2 if available.\n if (this._caps.etc2) {\n internalFormat = gl.COMPRESSED_SRGB8_ETC2;\n }\n else {\n texture._useSRGBBuffer = false;\n }\n break;\n case 37496:\n if (this._caps.etc2) {\n internalFormat = gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC;\n }\n else {\n texture._useSRGBBuffer = false;\n }\n break;\n case 36492:\n internalFormat = gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;\n break;\n case 37808:\n internalFormat = gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;\n break;\n case 33776:\n if (this._caps.s3tc_srgb) {\n internalFormat = gl.COMPRESSED_SRGB_S3TC_DXT1_EXT;\n }\n else {\n // S3TC sRGB extension not supported\n texture._useSRGBBuffer = false;\n }\n break;\n case 33777:\n if (this._caps.s3tc_srgb) {\n internalFormat = gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;\n }\n else {\n // S3TC sRGB extension not supported\n texture._useSRGBBuffer = false;\n }\n break;\n case 33779:\n if (this._caps.s3tc_srgb) {\n internalFormat = gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;\n }\n else {\n // S3TC sRGB extension not supported\n texture._useSRGBBuffer = false;\n }\n break;\n default:\n // We don't support a sRGB format corresponding to internalFormat, so revert to non sRGB format\n texture._useSRGBBuffer = false;\n break;\n }\n }\n this._gl.compressedTexImage2D(target, lod, internalFormat, width, height, 0, data);\n }\n /**\n * @internal\n */\n _uploadDataToTextureDirectly(texture, imageData, faceIndex = 0, lod = 0, babylonInternalFormat, useTextureWidthAndHeight = false) {\n const gl = this._gl;\n const textureType = this._getWebGLTextureType(texture.type);\n const format = this._getInternalFormat(texture.format);\n const internalFormat = babylonInternalFormat === undefined\n ? this._getRGBABufferInternalSizedFormat(texture.type, texture.format, texture._useSRGBBuffer)\n : this._getInternalFormat(babylonInternalFormat, texture._useSRGBBuffer);\n this._unpackFlipY(texture.invertY);\n let target = gl.TEXTURE_2D;\n if (texture.isCube) {\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\n }\n const lodMaxWidth = Math.round(Math.log(texture.width) * Math.LOG2E);\n const lodMaxHeight = Math.round(Math.log(texture.height) * Math.LOG2E);\n const width = useTextureWidthAndHeight ? texture.width : Math.pow(2, Math.max(lodMaxWidth - lod, 0));\n const height = useTextureWidthAndHeight ? texture.height : Math.pow(2, Math.max(lodMaxHeight - lod, 0));\n gl.texImage2D(target, lod, internalFormat, width, height, 0, format, textureType, imageData);\n }\n /**\n * Update a portion of an internal texture\n * @param texture defines the texture to update\n * @param imageData defines the data to store into the texture\n * @param xOffset defines the x coordinates of the update rectangle\n * @param yOffset defines the y coordinates of the update rectangle\n * @param width defines the width of the update rectangle\n * @param height defines the height of the update rectangle\n * @param faceIndex defines the face index if texture is a cube (0 by default)\n * @param lod defines the lod level to update (0 by default)\n * @param generateMipMaps defines whether to generate mipmaps or not\n */\n updateTextureData(texture, imageData, xOffset, yOffset, width, height, faceIndex = 0, lod = 0, generateMipMaps = false) {\n const gl = this._gl;\n const textureType = this._getWebGLTextureType(texture.type);\n const format = this._getInternalFormat(texture.format);\n this._unpackFlipY(texture.invertY);\n let targetForBinding = gl.TEXTURE_2D;\n let target = gl.TEXTURE_2D;\n if (texture.isCube) {\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\n targetForBinding = gl.TEXTURE_CUBE_MAP;\n }\n this._bindTextureDirectly(targetForBinding, texture, true);\n gl.texSubImage2D(target, lod, xOffset, yOffset, width, height, format, textureType, imageData);\n if (generateMipMaps) {\n this._gl.generateMipmap(target);\n }\n this._bindTextureDirectly(targetForBinding, null);\n }\n /**\n * @internal\n */\n _uploadArrayBufferViewToTexture(texture, imageData, faceIndex = 0, lod = 0) {\n const gl = this._gl;\n const bindTarget = texture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;\n this._bindTextureDirectly(bindTarget, texture, true);\n this._uploadDataToTextureDirectly(texture, imageData, faceIndex, lod);\n this._bindTextureDirectly(bindTarget, null, true);\n }\n _prepareWebGLTextureContinuation(texture, scene, noMipmap, isCompressed, samplingMode) {\n const gl = this._gl;\n if (!gl) {\n return;\n }\n const filters = this._getSamplingParameters(samplingMode, !noMipmap);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filters.mag);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filters.min);\n if (!noMipmap && !isCompressed) {\n gl.generateMipmap(gl.TEXTURE_2D);\n }\n this._bindTextureDirectly(gl.TEXTURE_2D, null);\n // this.resetTextureCache();\n if (scene) {\n scene.removePendingData(texture);\n }\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n }\n _prepareWebGLTexture(texture, extension, scene, img, invertY, noMipmap, isCompressed, processFunction, samplingMode = 3) {\n const maxTextureSize = this.getCaps().maxTextureSize;\n const potWidth = Math.min(maxTextureSize, this.needPOTTextures ? ThinEngine.GetExponentOfTwo(img.width, maxTextureSize) : img.width);\n const potHeight = Math.min(maxTextureSize, this.needPOTTextures ? ThinEngine.GetExponentOfTwo(img.height, maxTextureSize) : img.height);\n const gl = this._gl;\n if (!gl) {\n return;\n }\n if (!texture._hardwareTexture) {\n // this.resetTextureCache();\n if (scene) {\n scene.removePendingData(texture);\n }\n return;\n }\n this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);\n this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);\n texture.baseWidth = img.width;\n texture.baseHeight = img.height;\n texture.width = potWidth;\n texture.height = potHeight;\n texture.isReady = true;\n texture.type = texture.type !== -1 ? texture.type : 0;\n texture.format = texture.format !== -1 ? texture.format : extension === \".jpg\" && !texture._useSRGBBuffer ? 4 : 5;\n if (processFunction(potWidth, potHeight, img, extension, texture, () => {\n this._prepareWebGLTextureContinuation(texture, scene, noMipmap, isCompressed, samplingMode);\n })) {\n // Returning as texture needs extra async steps\n return;\n }\n this._prepareWebGLTextureContinuation(texture, scene, noMipmap, isCompressed, samplingMode);\n }\n /**\n * @internal\n */\n _setupFramebufferDepthAttachments(generateStencilBuffer, generateDepthBuffer, width, height, samples = 1) {\n const gl = this._gl;\n // Create the depth/stencil buffer\n if (generateStencilBuffer && generateDepthBuffer) {\n return this._createRenderBuffer(width, height, samples, gl.DEPTH_STENCIL, gl.DEPTH24_STENCIL8, gl.DEPTH_STENCIL_ATTACHMENT);\n }\n if (generateDepthBuffer) {\n let depthFormat = gl.DEPTH_COMPONENT16;\n if (this._webGLVersion > 1) {\n depthFormat = gl.DEPTH_COMPONENT32F;\n }\n return this._createRenderBuffer(width, height, samples, depthFormat, depthFormat, gl.DEPTH_ATTACHMENT);\n }\n if (generateStencilBuffer) {\n return this._createRenderBuffer(width, height, samples, gl.STENCIL_INDEX8, gl.STENCIL_INDEX8, gl.STENCIL_ATTACHMENT);\n }\n return null;\n }\n /**\n * @internal\n */\n _createRenderBuffer(width, height, samples, internalFormat, msInternalFormat, attachment, unbindBuffer = true) {\n const gl = this._gl;\n const renderBuffer = gl.createRenderbuffer();\n return this._updateRenderBuffer(renderBuffer, width, height, samples, internalFormat, msInternalFormat, attachment, unbindBuffer);\n }\n _updateRenderBuffer(renderBuffer, width, height, samples, internalFormat, msInternalFormat, attachment, unbindBuffer = true) {\n const gl = this._gl;\n gl.bindRenderbuffer(gl.RENDERBUFFER, renderBuffer);\n if (samples > 1 && gl.renderbufferStorageMultisample) {\n gl.renderbufferStorageMultisample(gl.RENDERBUFFER, samples, msInternalFormat, width, height);\n }\n else {\n gl.renderbufferStorage(gl.RENDERBUFFER, internalFormat, width, height);\n }\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment, gl.RENDERBUFFER, renderBuffer);\n if (unbindBuffer) {\n gl.bindRenderbuffer(gl.RENDERBUFFER, null);\n }\n return renderBuffer;\n }\n /**\n * @internal\n */\n _releaseTexture(texture) {\n var _a;\n this._deleteTexture((_a = texture._hardwareTexture) === null || _a === void 0 ? void 0 : _a.underlyingResource);\n // Unbind channels\n this.unbindAllTextures();\n const index = this._internalTexturesCache.indexOf(texture);\n if (index !== -1) {\n this._internalTexturesCache.splice(index, 1);\n }\n // Integrated fixed lod samplers.\n if (texture._lodTextureHigh) {\n texture._lodTextureHigh.dispose();\n }\n if (texture._lodTextureMid) {\n texture._lodTextureMid.dispose();\n }\n if (texture._lodTextureLow) {\n texture._lodTextureLow.dispose();\n }\n // Integrated irradiance map.\n if (texture._irradianceTexture) {\n texture._irradianceTexture.dispose();\n }\n }\n /**\n * @internal\n */\n _releaseRenderTargetWrapper(rtWrapper) {\n const index = this._renderTargetWrapperCache.indexOf(rtWrapper);\n if (index !== -1) {\n this._renderTargetWrapperCache.splice(index, 1);\n }\n }\n _deleteTexture(texture) {\n if (texture) {\n this._gl.deleteTexture(texture);\n }\n }\n _setProgram(program) {\n if (this._currentProgram !== program) {\n this._gl.useProgram(program);\n this._currentProgram = program;\n }\n }\n /**\n * Binds an effect to the webGL context\n * @param effect defines the effect to bind\n */\n bindSamplers(effect) {\n const webGLPipelineContext = effect.getPipelineContext();\n this._setProgram(webGLPipelineContext.program);\n const samplers = effect.getSamplers();\n for (let index = 0; index < samplers.length; index++) {\n const uniform = effect.getUniform(samplers[index]);\n if (uniform) {\n this._boundUniforms[index] = uniform;\n }\n }\n this._currentEffect = null;\n }\n _activateCurrentTexture() {\n if (this._currentTextureChannel !== this._activeChannel) {\n this._gl.activeTexture(this._gl.TEXTURE0 + this._activeChannel);\n this._currentTextureChannel = this._activeChannel;\n }\n }\n /**\n * @internal\n */\n _bindTextureDirectly(target, texture, forTextureDataUpdate = false, force = false) {\n var _a, _b;\n let wasPreviouslyBound = false;\n const isTextureForRendering = texture && texture._associatedChannel > -1;\n if (forTextureDataUpdate && isTextureForRendering) {\n this._activeChannel = texture._associatedChannel;\n }\n const currentTextureBound = this._boundTexturesCache[this._activeChannel];\n if (currentTextureBound !== texture || force) {\n this._activateCurrentTexture();\n if (texture && texture.isMultiview) {\n //this._gl.bindTexture(target, texture ? texture._colorTextureArray : null);\n console.error(target, texture);\n throw \"_bindTextureDirectly called with a multiview texture!\";\n }\n else {\n this._gl.bindTexture(target, (_b = (_a = texture === null || texture === void 0 ? void 0 : texture._hardwareTexture) === null || _a === void 0 ? void 0 : _a.underlyingResource) !== null && _b !== void 0 ? _b : null);\n }\n this._boundTexturesCache[this._activeChannel] = texture;\n if (texture) {\n texture._associatedChannel = this._activeChannel;\n }\n }\n else if (forTextureDataUpdate) {\n wasPreviouslyBound = true;\n this._activateCurrentTexture();\n }\n if (isTextureForRendering && !forTextureDataUpdate) {\n this._bindSamplerUniformToChannel(texture._associatedChannel, this._activeChannel);\n }\n return wasPreviouslyBound;\n }\n /**\n * @internal\n */\n _bindTexture(channel, texture, name) {\n if (channel === undefined) {\n return;\n }\n if (texture) {\n texture._associatedChannel = channel;\n }\n this._activeChannel = channel;\n const target = texture ? this._getTextureTarget(texture) : this._gl.TEXTURE_2D;\n this._bindTextureDirectly(target, texture);\n }\n /**\n * Unbind all textures from the webGL context\n */\n unbindAllTextures() {\n for (let channel = 0; channel < this._maxSimultaneousTextures; channel++) {\n this._activeChannel = channel;\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\n if (this.webGLVersion > 1) {\n this._bindTextureDirectly(this._gl.TEXTURE_3D, null);\n this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY, null);\n }\n }\n }\n /**\n * Sets a texture to the according uniform.\n * @param channel The texture channel\n * @param uniform The uniform to set\n * @param texture The texture to apply\n * @param name The name of the uniform in the effect\n */\n setTexture(channel, uniform, texture, name) {\n if (channel === undefined) {\n return;\n }\n if (uniform) {\n this._boundUniforms[channel] = uniform;\n }\n this._setTexture(channel, texture);\n }\n _bindSamplerUniformToChannel(sourceSlot, destination) {\n const uniform = this._boundUniforms[sourceSlot];\n if (!uniform || uniform._currentState === destination) {\n return;\n }\n this._gl.uniform1i(uniform, destination);\n uniform._currentState = destination;\n }\n _getTextureWrapMode(mode) {\n switch (mode) {\n case 1:\n return this._gl.REPEAT;\n case 0:\n return this._gl.CLAMP_TO_EDGE;\n case 2:\n return this._gl.MIRRORED_REPEAT;\n }\n return this._gl.REPEAT;\n }\n _setTexture(channel, texture, isPartOfTextureArray = false, depthStencilTexture = false, name = \"\") {\n // Not ready?\n if (!texture) {\n if (this._boundTexturesCache[channel] != null) {\n this._activeChannel = channel;\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\n if (this.webGLVersion > 1) {\n this._bindTextureDirectly(this._gl.TEXTURE_3D, null);\n this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY, null);\n }\n }\n return false;\n }\n // Video\n if (texture.video) {\n this._activeChannel = channel;\n const videoInternalTexture = texture.getInternalTexture();\n if (videoInternalTexture) {\n videoInternalTexture._associatedChannel = channel;\n }\n texture.update();\n }\n else if (texture.delayLoadState === 4) {\n // Delay loading\n texture.delayLoad();\n return false;\n }\n let internalTexture;\n if (depthStencilTexture) {\n internalTexture = texture.depthStencilTexture;\n }\n else if (texture.isReady()) {\n internalTexture = texture.getInternalTexture();\n }\n else if (texture.isCube) {\n internalTexture = this.emptyCubeTexture;\n }\n else if (texture.is3D) {\n internalTexture = this.emptyTexture3D;\n }\n else if (texture.is2DArray) {\n internalTexture = this.emptyTexture2DArray;\n }\n else {\n internalTexture = this.emptyTexture;\n }\n if (!isPartOfTextureArray && internalTexture) {\n internalTexture._associatedChannel = channel;\n }\n let needToBind = true;\n if (this._boundTexturesCache[channel] === internalTexture) {\n if (!isPartOfTextureArray) {\n this._bindSamplerUniformToChannel(internalTexture._associatedChannel, channel);\n }\n needToBind = false;\n }\n this._activeChannel = channel;\n const target = this._getTextureTarget(internalTexture);\n if (needToBind) {\n this._bindTextureDirectly(target, internalTexture, isPartOfTextureArray);\n }\n if (internalTexture && !internalTexture.isMultiview) {\n // CUBIC_MODE and SKYBOX_MODE both require CLAMP_TO_EDGE. All other modes use REPEAT.\n if (internalTexture.isCube && internalTexture._cachedCoordinatesMode !== texture.coordinatesMode) {\n internalTexture._cachedCoordinatesMode = texture.coordinatesMode;\n const textureWrapMode = texture.coordinatesMode !== 3 && texture.coordinatesMode !== 5\n ? 1\n : 0;\n texture.wrapU = textureWrapMode;\n texture.wrapV = textureWrapMode;\n }\n if (internalTexture._cachedWrapU !== texture.wrapU) {\n internalTexture._cachedWrapU = texture.wrapU;\n this._setTextureParameterInteger(target, this._gl.TEXTURE_WRAP_S, this._getTextureWrapMode(texture.wrapU), internalTexture);\n }\n if (internalTexture._cachedWrapV !== texture.wrapV) {\n internalTexture._cachedWrapV = texture.wrapV;\n this._setTextureParameterInteger(target, this._gl.TEXTURE_WRAP_T, this._getTextureWrapMode(texture.wrapV), internalTexture);\n }\n if (internalTexture.is3D && internalTexture._cachedWrapR !== texture.wrapR) {\n internalTexture._cachedWrapR = texture.wrapR;\n this._setTextureParameterInteger(target, this._gl.TEXTURE_WRAP_R, this._getTextureWrapMode(texture.wrapR), internalTexture);\n }\n this._setAnisotropicLevel(target, internalTexture, texture.anisotropicFilteringLevel);\n }\n return true;\n }\n /**\n * Sets an array of texture to the webGL context\n * @param channel defines the channel where the texture array must be set\n * @param uniform defines the associated uniform location\n * @param textures defines the array of textures to bind\n * @param name name of the channel\n */\n setTextureArray(channel, uniform, textures, name) {\n if (channel === undefined || !uniform) {\n return;\n }\n if (!this._textureUnits || this._textureUnits.length !== textures.length) {\n this._textureUnits = new Int32Array(textures.length);\n }\n for (let i = 0; i < textures.length; i++) {\n const texture = textures[i].getInternalTexture();\n if (texture) {\n this._textureUnits[i] = channel + i;\n texture._associatedChannel = channel + i;\n }\n else {\n this._textureUnits[i] = -1;\n }\n }\n this._gl.uniform1iv(uniform, this._textureUnits);\n for (let index = 0; index < textures.length; index++) {\n this._setTexture(this._textureUnits[index], textures[index], true);\n }\n }\n /**\n * @internal\n */\n _setAnisotropicLevel(target, internalTexture, anisotropicFilteringLevel) {\n const anisotropicFilterExtension = this._caps.textureAnisotropicFilterExtension;\n if (internalTexture.samplingMode !== 11 &&\n internalTexture.samplingMode !== 3 &&\n internalTexture.samplingMode !== 2) {\n anisotropicFilteringLevel = 1; // Forcing the anisotropic to 1 because else webgl will force filters to linear\n }\n if (anisotropicFilterExtension && internalTexture._cachedAnisotropicFilteringLevel !== anisotropicFilteringLevel) {\n this._setTextureParameterFloat(target, anisotropicFilterExtension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(anisotropicFilteringLevel, this._caps.maxAnisotropy), internalTexture);\n internalTexture._cachedAnisotropicFilteringLevel = anisotropicFilteringLevel;\n }\n }\n _setTextureParameterFloat(target, parameter, value, texture) {\n this._bindTextureDirectly(target, texture, true, true);\n this._gl.texParameterf(target, parameter, value);\n }\n _setTextureParameterInteger(target, parameter, value, texture) {\n if (texture) {\n this._bindTextureDirectly(target, texture, true, true);\n }\n this._gl.texParameteri(target, parameter, value);\n }\n /**\n * Unbind all vertex attributes from the webGL context\n */\n unbindAllAttributes() {\n if (this._mustWipeVertexAttributes) {\n this._mustWipeVertexAttributes = false;\n for (let i = 0; i < this._caps.maxVertexAttribs; i++) {\n this.disableAttributeByIndex(i);\n }\n return;\n }\n for (let i = 0, ul = this._vertexAttribArraysEnabled.length; i < ul; i++) {\n if (i >= this._caps.maxVertexAttribs || !this._vertexAttribArraysEnabled[i]) {\n continue;\n }\n this.disableAttributeByIndex(i);\n }\n }\n /**\n * Force the engine to release all cached effects. This means that next effect compilation will have to be done completely even if a similar effect was already compiled\n */\n releaseEffects() {\n for (const name in this._compiledEffects) {\n const webGLPipelineContext = this._compiledEffects[name].getPipelineContext();\n this._deletePipelineContext(webGLPipelineContext);\n }\n this._compiledEffects = {};\n }\n /**\n * Dispose and release all associated resources\n */\n dispose() {\n var _a, _b;\n this._isDisposed = true;\n this.stopRenderLoop();\n // Clear observables\n if (this.onBeforeTextureInitObservable) {\n this.onBeforeTextureInitObservable.clear();\n }\n // Empty texture\n if (this._emptyTexture) {\n this._releaseTexture(this._emptyTexture);\n this._emptyTexture = null;\n }\n if (this._emptyCubeTexture) {\n this._releaseTexture(this._emptyCubeTexture);\n this._emptyCubeTexture = null;\n }\n if (this._dummyFramebuffer) {\n this._gl.deleteFramebuffer(this._dummyFramebuffer);\n }\n // Release effects\n this.releaseEffects();\n (_a = this.releaseComputeEffects) === null || _a === void 0 ? void 0 : _a.call(this);\n // Unbind\n this.unbindAllAttributes();\n this._boundUniforms = {};\n // Events\n if (IsWindowObjectExist()) {\n if (this._renderingCanvas) {\n if (!this._doNotHandleContextLost) {\n this._renderingCanvas.removeEventListener(\"webglcontextlost\", this._onContextLost);\n this._renderingCanvas.removeEventListener(\"webglcontextrestored\", this._onContextRestored);\n }\n window.removeEventListener(\"resize\", this._checkForMobile);\n }\n }\n this._workingCanvas = null;\n this._workingContext = null;\n this._currentBufferPointers.length = 0;\n this._renderingCanvas = null;\n this._currentProgram = null;\n this._boundRenderFunction = null;\n Effect.ResetCache();\n // Abort active requests\n for (const request of this._activeRequests) {\n request.abort();\n }\n this.onDisposeObservable.notifyObservers(this);\n this.onDisposeObservable.clear();\n if (this._creationOptions.loseContextOnDispose) {\n (_b = this._gl.getExtension(\"WEBGL_lose_context\")) === null || _b === void 0 ? void 0 : _b.loseContext();\n }\n }\n /**\n * Attach a new callback raised when context lost event is fired\n * @param callback defines the callback to call\n */\n attachContextLostEvent(callback) {\n if (this._renderingCanvas) {\n this._renderingCanvas.addEventListener(\"webglcontextlost\", callback, false);\n }\n }\n /**\n * Attach a new callback raised when context restored event is fired\n * @param callback defines the callback to call\n */\n attachContextRestoredEvent(callback) {\n if (this._renderingCanvas) {\n this._renderingCanvas.addEventListener(\"webglcontextrestored\", callback, false);\n }\n }\n /**\n * Get the current error code of the webGL context\n * @returns the error code\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getError\n */\n getError() {\n return this._gl.getError();\n }\n _canRenderToFloatFramebuffer() {\n if (this._webGLVersion > 1) {\n return this._caps.colorBufferFloat;\n }\n return this._canRenderToFramebuffer(1);\n }\n _canRenderToHalfFloatFramebuffer() {\n if (this._webGLVersion > 1) {\n return this._caps.colorBufferFloat;\n }\n return this._canRenderToFramebuffer(2);\n }\n // Thank you : http://stackoverflow.com/questions/28827511/webgl-ios-render-to-floating-point-texture\n _canRenderToFramebuffer(type) {\n const gl = this._gl;\n //clear existing errors\n // eslint-disable-next-line no-empty\n while (gl.getError() !== gl.NO_ERROR) { }\n let successful = true;\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texImage2D(gl.TEXTURE_2D, 0, this._getRGBABufferInternalSizedFormat(type), 1, 1, 0, gl.RGBA, this._getWebGLTextureType(type), null);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n const fb = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, fb);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n const status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n successful = successful && status === gl.FRAMEBUFFER_COMPLETE;\n successful = successful && gl.getError() === gl.NO_ERROR;\n //try render by clearing frame buffer's color buffer\n if (successful) {\n gl.clear(gl.COLOR_BUFFER_BIT);\n successful = successful && gl.getError() === gl.NO_ERROR;\n }\n //try reading from frame to ensure render occurs (just creating the FBO is not sufficient to determine if rendering is supported)\n if (successful) {\n //in practice it's sufficient to just read from the backbuffer rather than handle potentially issues reading from the texture\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n const readFormat = gl.RGBA;\n const readType = gl.UNSIGNED_BYTE;\n const buffer = new Uint8Array(4);\n gl.readPixels(0, 0, 1, 1, readFormat, readType, buffer);\n successful = successful && gl.getError() === gl.NO_ERROR;\n }\n //clean up\n gl.deleteTexture(texture);\n gl.deleteFramebuffer(fb);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n //clear accumulated errors\n // eslint-disable-next-line no-empty\n while (!successful && gl.getError() !== gl.NO_ERROR) { }\n return successful;\n }\n /**\n * @internal\n */\n _getWebGLTextureType(type) {\n if (this._webGLVersion === 1) {\n switch (type) {\n case 1:\n return this._gl.FLOAT;\n case 2:\n return this._gl.HALF_FLOAT_OES;\n case 0:\n return this._gl.UNSIGNED_BYTE;\n case 8:\n return this._gl.UNSIGNED_SHORT_4_4_4_4;\n case 9:\n return this._gl.UNSIGNED_SHORT_5_5_5_1;\n case 10:\n return this._gl.UNSIGNED_SHORT_5_6_5;\n }\n return this._gl.UNSIGNED_BYTE;\n }\n switch (type) {\n case 3:\n return this._gl.BYTE;\n case 0:\n return this._gl.UNSIGNED_BYTE;\n case 4:\n return this._gl.SHORT;\n case 5:\n return this._gl.UNSIGNED_SHORT;\n case 6:\n return this._gl.INT;\n case 7: // Refers to UNSIGNED_INT\n return this._gl.UNSIGNED_INT;\n case 1:\n return this._gl.FLOAT;\n case 2:\n return this._gl.HALF_FLOAT;\n case 8:\n return this._gl.UNSIGNED_SHORT_4_4_4_4;\n case 9:\n return this._gl.UNSIGNED_SHORT_5_5_5_1;\n case 10:\n return this._gl.UNSIGNED_SHORT_5_6_5;\n case 11:\n return this._gl.UNSIGNED_INT_2_10_10_10_REV;\n case 12:\n return this._gl.UNSIGNED_INT_24_8;\n case 13:\n return this._gl.UNSIGNED_INT_10F_11F_11F_REV;\n case 14:\n return this._gl.UNSIGNED_INT_5_9_9_9_REV;\n case 15:\n return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV;\n }\n return this._gl.UNSIGNED_BYTE;\n }\n /**\n * @internal\n */\n _getInternalFormat(format, useSRGBBuffer = false) {\n let internalFormat = useSRGBBuffer ? this._glSRGBExtensionValues.SRGB8_ALPHA8 : this._gl.RGBA;\n switch (format) {\n case 0:\n internalFormat = this._gl.ALPHA;\n break;\n case 1:\n internalFormat = this._gl.LUMINANCE;\n break;\n case 2:\n internalFormat = this._gl.LUMINANCE_ALPHA;\n break;\n case 6:\n internalFormat = this._gl.RED;\n break;\n case 7:\n internalFormat = this._gl.RG;\n break;\n case 4:\n internalFormat = useSRGBBuffer ? this._glSRGBExtensionValues.SRGB : this._gl.RGB;\n break;\n case 5:\n internalFormat = useSRGBBuffer ? this._glSRGBExtensionValues.SRGB8_ALPHA8 : this._gl.RGBA;\n break;\n }\n if (this._webGLVersion > 1) {\n switch (format) {\n case 8:\n internalFormat = this._gl.RED_INTEGER;\n break;\n case 9:\n internalFormat = this._gl.RG_INTEGER;\n break;\n case 10:\n internalFormat = this._gl.RGB_INTEGER;\n break;\n case 11:\n internalFormat = this._gl.RGBA_INTEGER;\n break;\n }\n }\n return internalFormat;\n }\n /**\n * @internal\n */\n _getRGBABufferInternalSizedFormat(type, format, useSRGBBuffer = false) {\n if (this._webGLVersion === 1) {\n if (format !== undefined) {\n switch (format) {\n case 0:\n return this._gl.ALPHA;\n case 1:\n return this._gl.LUMINANCE;\n case 2:\n return this._gl.LUMINANCE_ALPHA;\n case 4:\n return useSRGBBuffer ? this._glSRGBExtensionValues.SRGB : this._gl.RGB;\n }\n }\n return this._gl.RGBA;\n }\n switch (type) {\n case 3:\n switch (format) {\n case 6:\n return this._gl.R8_SNORM;\n case 7:\n return this._gl.RG8_SNORM;\n case 4:\n return this._gl.RGB8_SNORM;\n case 8:\n return this._gl.R8I;\n case 9:\n return this._gl.RG8I;\n case 10:\n return this._gl.RGB8I;\n case 11:\n return this._gl.RGBA8I;\n default:\n return this._gl.RGBA8_SNORM;\n }\n case 0:\n switch (format) {\n case 6:\n return this._gl.R8;\n case 7:\n return this._gl.RG8;\n case 4:\n return useSRGBBuffer ? this._glSRGBExtensionValues.SRGB8 : this._gl.RGB8; // By default. Other possibilities are RGB565, SRGB8.\n case 5:\n return useSRGBBuffer ? this._glSRGBExtensionValues.SRGB8_ALPHA8 : this._gl.RGBA8; // By default. Other possibilities are RGB5_A1, RGBA4, SRGB8_ALPHA8.\n case 8:\n return this._gl.R8UI;\n case 9:\n return this._gl.RG8UI;\n case 10:\n return this._gl.RGB8UI;\n case 11:\n return this._gl.RGBA8UI;\n case 0:\n return this._gl.ALPHA;\n case 1:\n return this._gl.LUMINANCE;\n case 2:\n return this._gl.LUMINANCE_ALPHA;\n default:\n return this._gl.RGBA8;\n }\n case 4:\n switch (format) {\n case 8:\n return this._gl.R16I;\n case 9:\n return this._gl.RG16I;\n case 10:\n return this._gl.RGB16I;\n case 11:\n return this._gl.RGBA16I;\n default:\n return this._gl.RGBA16I;\n }\n case 5:\n switch (format) {\n case 8:\n return this._gl.R16UI;\n case 9:\n return this._gl.RG16UI;\n case 10:\n return this._gl.RGB16UI;\n case 11:\n return this._gl.RGBA16UI;\n default:\n return this._gl.RGBA16UI;\n }\n case 6:\n switch (format) {\n case 8:\n return this._gl.R32I;\n case 9:\n return this._gl.RG32I;\n case 10:\n return this._gl.RGB32I;\n case 11:\n return this._gl.RGBA32I;\n default:\n return this._gl.RGBA32I;\n }\n case 7: // Refers to UNSIGNED_INT\n switch (format) {\n case 8:\n return this._gl.R32UI;\n case 9:\n return this._gl.RG32UI;\n case 10:\n return this._gl.RGB32UI;\n case 11:\n return this._gl.RGBA32UI;\n default:\n return this._gl.RGBA32UI;\n }\n case 1:\n switch (format) {\n case 6:\n return this._gl.R32F; // By default. Other possibility is R16F.\n case 7:\n return this._gl.RG32F; // By default. Other possibility is RG16F.\n case 4:\n return this._gl.RGB32F; // By default. Other possibilities are RGB16F, R11F_G11F_B10F, RGB9_E5.\n case 5:\n return this._gl.RGBA32F; // By default. Other possibility is RGBA16F.\n default:\n return this._gl.RGBA32F;\n }\n case 2:\n switch (format) {\n case 6:\n return this._gl.R16F;\n case 7:\n return this._gl.RG16F;\n case 4:\n return this._gl.RGB16F; // By default. Other possibilities are R11F_G11F_B10F, RGB9_E5.\n case 5:\n return this._gl.RGBA16F;\n default:\n return this._gl.RGBA16F;\n }\n case 10:\n return this._gl.RGB565;\n case 13:\n return this._gl.R11F_G11F_B10F;\n case 14:\n return this._gl.RGB9_E5;\n case 8:\n return this._gl.RGBA4;\n case 9:\n return this._gl.RGB5_A1;\n case 11:\n switch (format) {\n case 5:\n return this._gl.RGB10_A2; // By default. Other possibility is RGB5_A1.\n case 11:\n return this._gl.RGB10_A2UI;\n default:\n return this._gl.RGB10_A2;\n }\n }\n return useSRGBBuffer ? this._glSRGBExtensionValues.SRGB8_ALPHA8 : this._gl.RGBA8;\n }\n /**\n * @internal\n */\n _getRGBAMultiSampleBufferFormat(type, format = 5) {\n switch (type) {\n case 1:\n switch (format) {\n case 6:\n return this._gl.R32F;\n default:\n return this._gl.RGBA32F;\n }\n case 2:\n switch (format) {\n case 6:\n return this._gl.R16F;\n default:\n return this._gl.RGBA16F;\n }\n }\n return this._gl.RGBA8;\n }\n /**\n * @internal\n */\n _loadFile(url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError) {\n const request = ThinEngine._FileToolsLoadFile(url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError);\n this._activeRequests.push(request);\n request.onCompleteObservable.add((request) => {\n this._activeRequests.splice(this._activeRequests.indexOf(request), 1);\n });\n return request;\n }\n /**\n * Loads a file from a url\n * @param url url to load\n * @param onSuccess callback called when the file successfully loads\n * @param onProgress callback called while file is loading (if the server supports this mode)\n * @param offlineProvider defines the offline provider for caching\n * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer\n * @param onError callback called when the file fails to load\n * @returns a file request object\n * @internal\n */\n static _FileToolsLoadFile(url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError) {\n throw _WarnImport(\"FileTools\");\n }\n /**\n * Reads pixels from the current frame buffer. Please note that this function can be slow\n * @param x defines the x coordinate of the rectangle where pixels must be read\n * @param y defines the y coordinate of the rectangle where pixels must be read\n * @param width defines the width of the rectangle where pixels must be read\n * @param height defines the height of the rectangle where pixels must be read\n * @param hasAlpha defines whether the output should have alpha or not (defaults to true)\n * @param flushRenderer true to flush the renderer from the pending commands before reading the pixels\n * @returns a ArrayBufferView promise (Uint8Array) containing RGBA colors\n */\n readPixels(x, y, width, height, hasAlpha = true, flushRenderer = true) {\n const numChannels = hasAlpha ? 4 : 3;\n const format = hasAlpha ? this._gl.RGBA : this._gl.RGB;\n const data = new Uint8Array(height * width * numChannels);\n if (flushRenderer) {\n this.flushFramebuffer();\n }\n this._gl.readPixels(x, y, width, height, format, this._gl.UNSIGNED_BYTE, data);\n return Promise.resolve(data);\n }\n /**\n * Gets a Promise indicating if the engine can be instantiated (ie. if a webGL context can be found)\n */\n static get IsSupportedAsync() {\n return Promise.resolve(this.isSupported());\n }\n /**\n * Gets a boolean indicating if the engine can be instantiated (ie. if a webGL context can be found)\n */\n static get IsSupported() {\n return this.isSupported(); // Backward compat\n }\n /**\n * Gets a boolean indicating if the engine can be instantiated (ie. if a webGL context can be found)\n * @returns true if the engine can be created\n * @ignorenaming\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static isSupported() {\n if (this._HasMajorPerformanceCaveat !== null) {\n return !this._HasMajorPerformanceCaveat; // We know it is performant so WebGL is supported\n }\n if (this._IsSupported === null) {\n try {\n const tempcanvas = this._CreateCanvas(1, 1);\n const gl = tempcanvas.getContext(\"webgl\") || tempcanvas.getContext(\"experimental-webgl\");\n this._IsSupported = gl != null && !!window.WebGLRenderingContext;\n }\n catch (e) {\n this._IsSupported = false;\n }\n }\n return this._IsSupported;\n }\n /**\n * Gets a boolean indicating if the engine can be instantiated on a performant device (ie. if a webGL context can be found and it does not use a slow implementation)\n */\n static get HasMajorPerformanceCaveat() {\n if (this._HasMajorPerformanceCaveat === null) {\n try {\n const tempcanvas = this._CreateCanvas(1, 1);\n const gl = tempcanvas.getContext(\"webgl\", { failIfMajorPerformanceCaveat: true }) ||\n tempcanvas.getContext(\"experimental-webgl\", { failIfMajorPerformanceCaveat: true });\n this._HasMajorPerformanceCaveat = !gl;\n }\n catch (e) {\n this._HasMajorPerformanceCaveat = false;\n }\n }\n return this._HasMajorPerformanceCaveat;\n }\n /**\n * Find the next highest power of two.\n * @param x Number to start search from.\n * @returns Next highest power of two.\n */\n static CeilingPOT(x) {\n x--;\n x |= x >> 1;\n x |= x >> 2;\n x |= x >> 4;\n x |= x >> 8;\n x |= x >> 16;\n x++;\n return x;\n }\n /**\n * Find the next lowest power of two.\n * @param x Number to start search from.\n * @returns Next lowest power of two.\n */\n static FloorPOT(x) {\n x = x | (x >> 1);\n x = x | (x >> 2);\n x = x | (x >> 4);\n x = x | (x >> 8);\n x = x | (x >> 16);\n return x - (x >> 1);\n }\n /**\n * Find the nearest power of two.\n * @param x Number to start search from.\n * @returns Next nearest power of two.\n */\n static NearestPOT(x) {\n const c = ThinEngine.CeilingPOT(x);\n const f = ThinEngine.FloorPOT(x);\n return c - x > x - f ? f : c;\n }\n /**\n * Get the closest exponent of two\n * @param value defines the value to approximate\n * @param max defines the maximum value to return\n * @param mode defines how to define the closest value\n * @returns closest exponent of two of the given value\n */\n static GetExponentOfTwo(value, max, mode = 2) {\n let pot;\n switch (mode) {\n case 1:\n pot = ThinEngine.FloorPOT(value);\n break;\n case 2:\n pot = ThinEngine.NearestPOT(value);\n break;\n case 3:\n default:\n pot = ThinEngine.CeilingPOT(value);\n break;\n }\n return Math.min(pot, max);\n }\n /**\n * Queue a new function into the requested animation frame pool (ie. this function will be executed by the browser (or the javascript engine) for the next frame)\n * @param func - the function to be called\n * @param requester - the object that will request the next frame. Falls back to window.\n * @returns frame number\n */\n static QueueNewFrame(func, requester) {\n // Note that there is kind of a typing issue here, as `setTimeout` might return something else than a number (NodeJs returns a NodeJS.Timeout object).\n // Also if the global `requestAnimationFrame`'s returnType is number, `requester.requestPostAnimationFrame` and `requester.requestAnimationFrame` types\n // are `any`.\n if (!IsWindowObjectExist()) {\n if (typeof requestAnimationFrame === \"function\") {\n return requestAnimationFrame(func);\n }\n }\n else {\n const { requestAnimationFrame } = requester || window;\n if (typeof requestAnimationFrame === \"function\") {\n return requestAnimationFrame(func);\n }\n }\n // fallback to the global `setTimeout`.\n // In most cases (aka in the browser), `window` is the global object, so instead of calling `window.setTimeout` we could call the global `setTimeout`.\n return setTimeout(func, 16);\n }\n /**\n * Gets host document\n * @returns the host document object\n */\n getHostDocument() {\n if (this._renderingCanvas && this._renderingCanvas.ownerDocument) {\n return this._renderingCanvas.ownerDocument;\n }\n return IsDocumentAvailable() ? document : null;\n }\n}\nThinEngine._TempClearColorUint32 = new Uint32Array(4);\nThinEngine._TempClearColorInt32 = new Int32Array(4);\n/** Use this array to turn off some WebGL2 features on known buggy browsers version */\nThinEngine.ExceptionList = [\n { key: \"Chrome/63.0\", capture: \"63\\\\.0\\\\.3239\\\\.(\\\\d+)\", captureConstraint: 108, targets: [\"uniformBuffer\"] },\n { key: \"Firefox/58\", capture: null, captureConstraint: null, targets: [\"uniformBuffer\"] },\n { key: \"Firefox/59\", capture: null, captureConstraint: null, targets: [\"uniformBuffer\"] },\n { key: \"Chrome/72.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\n { key: \"Chrome/73.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\n { key: \"Chrome/74.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\n { key: \"Mac OS.+Chrome/71\", capture: null, captureConstraint: null, targets: [\"vao\"] },\n { key: \"Mac OS.+Chrome/72\", capture: null, captureConstraint: null, targets: [\"vao\"] },\n { key: \"Mac OS.+Chrome\", capture: null, captureConstraint: null, targets: [\"uniformBuffer\"] },\n // desktop osx safari 15.4\n { key: \".*AppleWebKit.*(15.4).*Safari\", capture: null, captureConstraint: null, targets: [\"antialias\", \"maxMSAASamples\"] },\n // mobile browsers using safari 15.4 on ios\n { key: \".*(15.4).*AppleWebKit.*Safari\", capture: null, captureConstraint: null, targets: [\"antialias\", \"maxMSAASamples\"] },\n];\n/** @internal */\nThinEngine._TextureLoaders = [];\n// Updatable statics so stick with vars here\n/**\n * Gets or sets the epsilon value used by collision engine\n */\nThinEngine.CollisionsEpsilon = 0.001;\n// Statics\nThinEngine._IsSupported = null;\nThinEngine._HasMajorPerformanceCaveat = null;\n//# sourceMappingURL=thinEngine.js.map","import { IsWindowObjectExist } from \"./domManagement.js\";\n/**\n * Class used to provide helper for timing\n */\nexport class TimingTools {\n /**\n * Polyfill for setImmediate\n * @param action defines the action to execute after the current execution block\n */\n static SetImmediate(action) {\n if (IsWindowObjectExist() && window.setImmediate) {\n window.setImmediate(action);\n }\n else {\n setTimeout(action, 1);\n }\n }\n}\n//# sourceMappingURL=timingTools.js.map","/* eslint-disable @typescript-eslint/naming-convention */\nimport { WebRequest } from \"./webRequest.js\";\nimport { IsWindowObjectExist } from \"./domManagement.js\";\nimport { Observable } from \"./observable.js\";\nimport { FilesInputStore } from \"./filesInputStore.js\";\nimport { RetryStrategy } from \"./retryStrategy.js\";\nimport { BaseError, ErrorCodes, RuntimeError } from \"./error.js\";\nimport { DecodeBase64ToBinary, DecodeBase64ToString, EncodeArrayBufferToBase64 } from \"./stringTools.js\";\nimport { ShaderProcessor } from \"../Engines/Processors/shaderProcessor.js\";\nimport { ThinEngine } from \"../Engines/thinEngine.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { Logger } from \"./logger.js\";\nimport { TimingTools } from \"./timingTools.js\";\nconst Base64DataUrlRegEx = new RegExp(/^data:([^,]+\\/[^,]+)?;base64,/i);\n/** @ignore */\nexport class LoadFileError extends RuntimeError {\n /**\n * Creates a new LoadFileError\n * @param message defines the message of the error\n * @param object defines the optional web request\n */\n constructor(message, object) {\n super(message, ErrorCodes.LoadFileError);\n this.name = \"LoadFileError\";\n BaseError._setPrototypeOf(this, LoadFileError.prototype);\n if (object instanceof WebRequest) {\n this.request = object;\n }\n else {\n this.file = object;\n }\n }\n}\n/** @ignore */\nexport class RequestFileError extends RuntimeError {\n /**\n * Creates a new LoadFileError\n * @param message defines the message of the error\n * @param request defines the optional web request\n */\n constructor(message, request) {\n super(message, ErrorCodes.RequestFileError);\n this.request = request;\n this.name = \"RequestFileError\";\n BaseError._setPrototypeOf(this, RequestFileError.prototype);\n }\n}\n/** @ignore */\nexport class ReadFileError extends RuntimeError {\n /**\n * Creates a new ReadFileError\n * @param message defines the message of the error\n * @param file defines the optional file\n */\n constructor(message, file) {\n super(message, ErrorCodes.ReadFileError);\n this.file = file;\n this.name = \"ReadFileError\";\n BaseError._setPrototypeOf(this, ReadFileError.prototype);\n }\n}\n/**\n * @internal\n */\nexport const FileToolsOptions = {\n /**\n * Gets or sets the retry strategy to apply when an error happens while loading an asset.\n * When defining this function, return the wait time before trying again or return -1 to\n * stop retrying and error out.\n */\n DefaultRetryStrategy: RetryStrategy.ExponentialBackoff(),\n /**\n * Gets or sets the base URL to use to load assets\n */\n BaseUrl: \"\",\n /**\n * Default behaviour for cors in the application.\n * It can be a string if the expected behavior is identical in the entire app.\n * Or a callback to be able to set it per url or on a group of them (in case of Video source for instance)\n */\n CorsBehavior: \"anonymous\",\n /**\n * Gets or sets a function used to pre-process url before using them to load assets\n * @param url\n */\n PreprocessUrl: (url) => url,\n /**\n * Gets or sets the base URL to use to load scripts\n * Used for both JS and WASM\n */\n ScriptBaseUrl: \"\",\n /**\n * Gets or sets a function used to pre-process script url before using them to load.\n * Used for both JS and WASM\n * @param url defines the url to process\n */\n ScriptPreprocessUrl: (url) => url,\n};\n/**\n * Removes unwanted characters from an url\n * @param url defines the url to clean\n * @returns the cleaned url\n */\nconst _CleanUrl = (url) => {\n url = url.replace(/#/gm, \"%23\");\n return url;\n};\n/**\n * Sets the cors behavior on a dom element. This will add the required Tools.CorsBehavior to the element.\n * @param url define the url we are trying\n * @param element define the dom element where to configure the cors policy\n * @internal\n */\nexport const SetCorsBehavior = (url, element) => {\n if (url && url.indexOf(\"data:\") === 0) {\n return;\n }\n if (FileToolsOptions.CorsBehavior) {\n if (typeof FileToolsOptions.CorsBehavior === \"string\" || FileToolsOptions.CorsBehavior instanceof String) {\n element.crossOrigin = FileToolsOptions.CorsBehavior;\n }\n else {\n const result = FileToolsOptions.CorsBehavior(url);\n if (result) {\n element.crossOrigin = result;\n }\n }\n }\n};\n/**\n * Loads an image as an HTMLImageElement.\n * @param input url string, ArrayBuffer, or Blob to load\n * @param onLoad callback called when the image successfully loads\n * @param onError callback called when the image fails to load\n * @param offlineProvider offline provider for caching\n * @param mimeType optional mime type\n * @param imageBitmapOptions\n * @returns the HTMLImageElement of the loaded image\n * @internal\n */\nexport const LoadImage = (input, onLoad, onError, offlineProvider, mimeType = \"\", imageBitmapOptions) => {\n var _a;\n let url;\n let usingObjectURL = false;\n if (input instanceof ArrayBuffer || ArrayBuffer.isView(input)) {\n if (typeof Blob !== \"undefined\" && typeof URL !== \"undefined\") {\n url = URL.createObjectURL(new Blob([input], { type: mimeType }));\n usingObjectURL = true;\n }\n else {\n url = `data:${mimeType};base64,` + EncodeArrayBufferToBase64(input);\n }\n }\n else if (input instanceof Blob) {\n url = URL.createObjectURL(input);\n usingObjectURL = true;\n }\n else {\n url = _CleanUrl(input);\n url = FileToolsOptions.PreprocessUrl(input);\n }\n const engine = EngineStore.LastCreatedEngine;\n const onErrorHandler = (exception) => {\n if (onError) {\n const inputText = url || input.toString();\n onError(`Error while trying to load image: ${inputText.indexOf(\"http\") === 0 || inputText.length <= 128 ? inputText : inputText.slice(0, 128) + \"...\"}`, exception);\n }\n };\n if (typeof Image === \"undefined\" || ((_a = engine === null || engine === void 0 ? void 0 : engine._features.forceBitmapOverHTMLImageElement) !== null && _a !== void 0 ? _a : false)) {\n LoadFile(url, (data) => {\n engine\n .createImageBitmap(new Blob([data], { type: mimeType }), Object.assign({ premultiplyAlpha: \"none\" }, imageBitmapOptions))\n .then((imgBmp) => {\n onLoad(imgBmp);\n if (usingObjectURL) {\n URL.revokeObjectURL(url);\n }\n })\n .catch((reason) => {\n if (onError) {\n onError(\"Error while trying to load image: \" + input, reason);\n }\n });\n }, undefined, offlineProvider || undefined, true, (request, exception) => {\n onErrorHandler(exception);\n });\n return null;\n }\n const img = new Image();\n SetCorsBehavior(url, img);\n const handlersList = [];\n const loadHandlersList = () => {\n handlersList.forEach((handler) => {\n handler.target.addEventListener(handler.name, handler.handler);\n });\n };\n const unloadHandlersList = () => {\n handlersList.forEach((handler) => {\n handler.target.removeEventListener(handler.name, handler.handler);\n });\n handlersList.length = 0;\n };\n const loadHandler = () => {\n unloadHandlersList();\n onLoad(img);\n // Must revoke the URL after calling onLoad to avoid security exceptions in\n // certain scenarios (e.g. when hosted in vscode).\n if (usingObjectURL && img.src) {\n URL.revokeObjectURL(img.src);\n }\n };\n const errorHandler = (err) => {\n unloadHandlersList();\n onErrorHandler(err);\n if (usingObjectURL && img.src) {\n URL.revokeObjectURL(img.src);\n }\n };\n const cspHandler = (err) => {\n if (err.blockedURI !== img.src) {\n return;\n }\n unloadHandlersList();\n const cspException = new Error(`CSP violation of policy ${err.effectiveDirective} ${err.blockedURI}. Current policy is ${err.originalPolicy}`);\n EngineStore.UseFallbackTexture = false;\n onErrorHandler(cspException);\n if (usingObjectURL && img.src) {\n URL.revokeObjectURL(img.src);\n }\n img.src = \"\";\n };\n handlersList.push({ target: img, name: \"load\", handler: loadHandler });\n handlersList.push({ target: img, name: \"error\", handler: errorHandler });\n handlersList.push({ target: document, name: \"securitypolicyviolation\", handler: cspHandler });\n loadHandlersList();\n const fromBlob = url.substring(0, 5) === \"blob:\";\n const fromData = url.substring(0, 5) === \"data:\";\n const noOfflineSupport = () => {\n if (fromBlob || fromData || !WebRequest.IsCustomRequestAvailable) {\n img.src = url;\n }\n else {\n LoadFile(url, (data, _, contentType) => {\n const type = !mimeType && contentType ? contentType : mimeType;\n const blob = new Blob([data], { type });\n const url = URL.createObjectURL(blob);\n usingObjectURL = true;\n img.src = url;\n }, undefined, offlineProvider || undefined, true, (_request, exception) => {\n onErrorHandler(exception);\n });\n }\n };\n const loadFromOfflineSupport = () => {\n if (offlineProvider) {\n offlineProvider.loadImage(url, img);\n }\n };\n if (!fromBlob && !fromData && offlineProvider && offlineProvider.enableTexturesOffline) {\n offlineProvider.open(loadFromOfflineSupport, noOfflineSupport);\n }\n else {\n if (url.indexOf(\"file:\") !== -1) {\n const textureName = decodeURIComponent(url.substring(5).toLowerCase());\n if (FilesInputStore.FilesToLoad[textureName] && typeof URL !== \"undefined\") {\n try {\n let blobURL;\n try {\n blobURL = URL.createObjectURL(FilesInputStore.FilesToLoad[textureName]);\n }\n catch (ex) {\n // Chrome doesn't support oneTimeOnly parameter\n blobURL = URL.createObjectURL(FilesInputStore.FilesToLoad[textureName]);\n }\n img.src = blobURL;\n usingObjectURL = true;\n }\n catch (e) {\n img.src = \"\";\n }\n return img;\n }\n }\n noOfflineSupport();\n }\n return img;\n};\n/**\n * Reads a file from a File object\n * @param file defines the file to load\n * @param onSuccess defines the callback to call when data is loaded\n * @param onProgress defines the callback to call during loading process\n * @param useArrayBuffer defines a boolean indicating that data must be returned as an ArrayBuffer\n * @param onError defines the callback to call when an error occurs\n * @returns a file request object\n * @internal\n */\nexport const ReadFile = (file, onSuccess, onProgress, useArrayBuffer, onError) => {\n const reader = new FileReader();\n const fileRequest = {\n onCompleteObservable: new Observable(),\n abort: () => reader.abort(),\n };\n reader.onloadend = () => fileRequest.onCompleteObservable.notifyObservers(fileRequest);\n if (onError) {\n reader.onerror = () => {\n onError(new ReadFileError(`Unable to read ${file.name}`, file));\n };\n }\n reader.onload = (e) => {\n //target doesn't have result from ts 1.3\n onSuccess(e.target[\"result\"]);\n };\n if (onProgress) {\n reader.onprogress = onProgress;\n }\n if (!useArrayBuffer) {\n // Asynchronous read\n reader.readAsText(file);\n }\n else {\n reader.readAsArrayBuffer(file);\n }\n return fileRequest;\n};\n/**\n * Loads a file from a url, a data url, or a file url\n * @param fileOrUrl file, url, data url, or file url to load\n * @param onSuccess callback called when the file successfully loads\n * @param onProgress callback called while file is loading (if the server supports this mode)\n * @param offlineProvider defines the offline provider for caching\n * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer\n * @param onError callback called when the file fails to load\n * @param onOpened\n * @returns a file request object\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const LoadFile = (fileOrUrl, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError, onOpened) => {\n if (fileOrUrl.name) {\n return ReadFile(fileOrUrl, onSuccess, onProgress, useArrayBuffer, onError\n ? (error) => {\n onError(undefined, error);\n }\n : undefined);\n }\n const url = fileOrUrl;\n // If file and file input are set\n if (url.indexOf(\"file:\") !== -1) {\n let fileName = decodeURIComponent(url.substring(5).toLowerCase());\n if (fileName.indexOf(\"./\") === 0) {\n fileName = fileName.substring(2);\n }\n const file = FilesInputStore.FilesToLoad[fileName];\n if (file) {\n return ReadFile(file, onSuccess, onProgress, useArrayBuffer, onError ? (error) => onError(undefined, new LoadFileError(error.message, error.file)) : undefined);\n }\n }\n // For a Base64 Data URL\n const { match, type } = TestBase64DataUrl(url);\n if (match) {\n const fileRequest = {\n onCompleteObservable: new Observable(),\n abort: () => () => { },\n };\n try {\n const data = useArrayBuffer ? DecodeBase64UrlToBinary(url) : DecodeBase64UrlToString(url);\n onSuccess(data, undefined, type);\n }\n catch (error) {\n if (onError) {\n onError(undefined, error);\n }\n else {\n Logger.Error(error.message || \"Failed to parse the Data URL\");\n }\n }\n TimingTools.SetImmediate(() => {\n fileRequest.onCompleteObservable.notifyObservers(fileRequest);\n });\n return fileRequest;\n }\n return RequestFile(url, (data, request) => {\n onSuccess(data, request === null || request === void 0 ? void 0 : request.responseURL, request === null || request === void 0 ? void 0 : request.getResponseHeader(\"content-type\"));\n }, onProgress, offlineProvider, useArrayBuffer, onError\n ? (error) => {\n onError(error.request, new LoadFileError(error.message, error.request));\n }\n : undefined, onOpened);\n};\n/**\n * Loads a file from a url\n * @param url url to load\n * @param onSuccess callback called when the file successfully loads\n * @param onProgress callback called while file is loading (if the server supports this mode)\n * @param offlineProvider defines the offline provider for caching\n * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer\n * @param onError callback called when the file fails to load\n * @param onOpened callback called when the web request is opened\n * @returns a file request object\n * @internal\n */\nexport const RequestFile = (url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError, onOpened) => {\n url = _CleanUrl(url);\n url = FileToolsOptions.PreprocessUrl(url);\n const loadUrl = FileToolsOptions.BaseUrl + url;\n let aborted = false;\n const fileRequest = {\n onCompleteObservable: new Observable(),\n abort: () => (aborted = true),\n };\n const requestFile = () => {\n let request = new WebRequest();\n let retryHandle = null;\n let onReadyStateChange;\n const unbindEvents = () => {\n if (!request) {\n return;\n }\n if (onProgress) {\n request.removeEventListener(\"progress\", onProgress);\n }\n if (onReadyStateChange) {\n request.removeEventListener(\"readystatechange\", onReadyStateChange);\n }\n request.removeEventListener(\"loadend\", onLoadEnd);\n };\n let onLoadEnd = () => {\n unbindEvents();\n fileRequest.onCompleteObservable.notifyObservers(fileRequest);\n fileRequest.onCompleteObservable.clear();\n onProgress = undefined;\n onReadyStateChange = null;\n onLoadEnd = null;\n onError = undefined;\n onOpened = undefined;\n onSuccess = undefined;\n };\n fileRequest.abort = () => {\n aborted = true;\n if (onLoadEnd) {\n onLoadEnd();\n }\n if (request && request.readyState !== (XMLHttpRequest.DONE || 4)) {\n request.abort();\n }\n if (retryHandle !== null) {\n clearTimeout(retryHandle);\n retryHandle = null;\n }\n request = null;\n };\n const handleError = (error) => {\n const message = error.message || \"Unknown error\";\n if (onError && request) {\n onError(new RequestFileError(message, request));\n }\n else {\n Logger.Error(message);\n }\n };\n const retryLoop = (retryIndex) => {\n if (!request) {\n return;\n }\n request.open(\"GET\", loadUrl);\n if (onOpened) {\n try {\n onOpened(request);\n }\n catch (e) {\n handleError(e);\n return;\n }\n }\n if (useArrayBuffer) {\n request.responseType = \"arraybuffer\";\n }\n if (onProgress) {\n request.addEventListener(\"progress\", onProgress);\n }\n if (onLoadEnd) {\n request.addEventListener(\"loadend\", onLoadEnd);\n }\n onReadyStateChange = () => {\n if (aborted || !request) {\n return;\n }\n // In case of undefined state in some browsers.\n if (request.readyState === (XMLHttpRequest.DONE || 4)) {\n // Some browsers have issues where onreadystatechange can be called multiple times with the same value.\n if (onReadyStateChange) {\n request.removeEventListener(\"readystatechange\", onReadyStateChange);\n }\n if ((request.status >= 200 && request.status < 300) || (request.status === 0 && (!IsWindowObjectExist() || IsFileURL()))) {\n try {\n if (onSuccess) {\n onSuccess(useArrayBuffer ? request.response : request.responseText, request);\n }\n }\n catch (e) {\n handleError(e);\n }\n return;\n }\n const retryStrategy = FileToolsOptions.DefaultRetryStrategy;\n if (retryStrategy) {\n const waitTime = retryStrategy(loadUrl, request, retryIndex);\n if (waitTime !== -1) {\n // Prevent the request from completing for retry.\n unbindEvents();\n request = new WebRequest();\n retryHandle = setTimeout(() => retryLoop(retryIndex + 1), waitTime);\n return;\n }\n }\n const error = new RequestFileError(\"Error status: \" + request.status + \" \" + request.statusText + \" - Unable to load \" + loadUrl, request);\n if (onError) {\n onError(error);\n }\n }\n };\n request.addEventListener(\"readystatechange\", onReadyStateChange);\n request.send();\n };\n retryLoop(0);\n };\n // Caching all files\n if (offlineProvider && offlineProvider.enableSceneOffline) {\n const noOfflineSupport = (request) => {\n if (request && request.status > 400) {\n if (onError) {\n onError(request);\n }\n }\n else {\n requestFile();\n }\n };\n const loadFromOfflineSupport = () => {\n // TODO: database needs to support aborting and should return a IFileRequest\n if (offlineProvider) {\n offlineProvider.loadFile(FileToolsOptions.BaseUrl + url, (data) => {\n if (!aborted && onSuccess) {\n onSuccess(data);\n }\n fileRequest.onCompleteObservable.notifyObservers(fileRequest);\n }, onProgress\n ? (event) => {\n if (!aborted && onProgress) {\n onProgress(event);\n }\n }\n : undefined, noOfflineSupport, useArrayBuffer);\n }\n };\n offlineProvider.open(loadFromOfflineSupport, noOfflineSupport);\n }\n else {\n requestFile();\n }\n return fileRequest;\n};\n/**\n * Checks if the loaded document was accessed via `file:`-Protocol.\n * @returns boolean\n * @internal\n */\nexport const IsFileURL = () => {\n return typeof location !== \"undefined\" && location.protocol === \"file:\";\n};\n/**\n * Test if the given uri is a valid base64 data url\n * @param uri The uri to test\n * @returns True if the uri is a base64 data url or false otherwise\n * @internal\n */\nexport const IsBase64DataUrl = (uri) => {\n return Base64DataUrlRegEx.test(uri);\n};\nexport const TestBase64DataUrl = (uri) => {\n const results = Base64DataUrlRegEx.exec(uri);\n if (results === null || results.length === 0) {\n return { match: false, type: \"\" };\n }\n else {\n const type = results[0].replace(\"data:\", \"\").replace(\"base64,\", \"\");\n return { match: true, type };\n }\n};\n/**\n * Decode the given base64 uri.\n * @param uri The uri to decode\n * @returns The decoded base64 data.\n * @internal\n */\nexport function DecodeBase64UrlToBinary(uri) {\n return DecodeBase64ToBinary(uri.split(\",\")[1]);\n}\n/**\n * Decode the given base64 uri into a UTF-8 encoded string.\n * @param uri The uri to decode\n * @returns The decoded base64 data.\n * @internal\n */\nexport const DecodeBase64UrlToString = (uri) => {\n return DecodeBase64ToString(uri.split(\",\")[1]);\n};\n/**\n * This will be executed automatically for UMD and es5.\n * If esm dev wants the side effects to execute they will have to run it manually\n * Once we build native modules those need to be exported.\n * @internal\n */\nconst initSideEffects = () => {\n ThinEngine._FileToolsLoadImage = LoadImage;\n ThinEngine._FileToolsLoadFile = LoadFile;\n ShaderProcessor._FileToolsLoadFile = LoadFile;\n};\ninitSideEffects();\n// deprecated\n/**\n * FileTools defined as any.\n * This should not be imported or used in future releases or in any module in the framework\n * @internal\n * @deprecated import the needed function from fileTools.ts\n */\nexport let FileTools;\n/**\n * @param DecodeBase64UrlToBinary\n * @param DecodeBase64UrlToString\n * @param FileToolsOptions\n * @internal\n */\nexport const _injectLTSFileTools = (DecodeBase64UrlToBinary, DecodeBase64UrlToString, FileToolsOptions, IsBase64DataUrl, IsFileURL, LoadFile, LoadImage, ReadFile, RequestFile, SetCorsBehavior) => {\n /**\n * Backwards compatibility.\n * @internal\n * @deprecated\n */\n FileTools = {\n DecodeBase64UrlToBinary,\n DecodeBase64UrlToString,\n DefaultRetryStrategy: FileToolsOptions.DefaultRetryStrategy,\n BaseUrl: FileToolsOptions.BaseUrl,\n CorsBehavior: FileToolsOptions.CorsBehavior,\n PreprocessUrl: FileToolsOptions.PreprocessUrl,\n IsBase64DataUrl,\n IsFileURL,\n LoadFile,\n LoadImage,\n ReadFile,\n RequestFile,\n SetCorsBehavior,\n };\n Object.defineProperty(FileTools, \"DefaultRetryStrategy\", {\n get: function () {\n return FileToolsOptions.DefaultRetryStrategy;\n },\n set: function (value) {\n FileToolsOptions.DefaultRetryStrategy = value;\n },\n });\n Object.defineProperty(FileTools, \"BaseUrl\", {\n get: function () {\n return FileToolsOptions.BaseUrl;\n },\n set: function (value) {\n FileToolsOptions.BaseUrl = value;\n },\n });\n Object.defineProperty(FileTools, \"PreprocessUrl\", {\n get: function () {\n return FileToolsOptions.PreprocessUrl;\n },\n set: function (value) {\n FileToolsOptions.PreprocessUrl = value;\n },\n });\n Object.defineProperty(FileTools, \"CorsBehavior\", {\n get: function () {\n return FileToolsOptions.CorsBehavior;\n },\n set: function (value) {\n FileToolsOptions.CorsBehavior = value;\n },\n });\n};\n_injectLTSFileTools(DecodeBase64UrlToBinary, DecodeBase64UrlToString, FileToolsOptions, IsBase64DataUrl, IsFileURL, LoadFile, LoadImage, ReadFile, RequestFile, SetCorsBehavior);\n//# sourceMappingURL=fileTools.js.map","import { Logger } from \"./logger.js\";\nimport { GetClass } from \"./typeStore.js\";\n/**\n * Class used to enable instantiation of objects by class name\n */\nexport class InstantiationTools {\n /**\n * Tries to instantiate a new object from a given class name\n * @param className defines the class name to instantiate\n * @returns the new object or null if the system was not able to do the instantiation\n */\n static Instantiate(className) {\n if (this.RegisteredExternalClasses && this.RegisteredExternalClasses[className]) {\n return this.RegisteredExternalClasses[className];\n }\n const internalClass = GetClass(className);\n if (internalClass) {\n return internalClass;\n }\n Logger.Warn(className + \" not found, you may have missed an import.\");\n const arr = className.split(\".\");\n let fn = window || this;\n for (let i = 0, len = arr.length; i < len; i++) {\n fn = fn[arr[i]];\n }\n if (typeof fn !== \"function\") {\n return null;\n }\n return fn;\n }\n}\n/**\n * Use this object to register external classes like custom textures or material\n * to allow the loaders to instantiate them\n */\nInstantiationTools.RegisteredExternalClasses = {};\n//# sourceMappingURL=instantiationTools.js.map","/**\n * Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523\n * Be aware Math.random() could cause collisions, but:\n * \"All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide\"\n * @returns a pseudo random id\n */\nexport function RandomGUID() {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16) | 0, v = c === \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n/**\n * Class used to manipulate GUIDs\n */\nexport const GUID = {\n /**\n * Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523\n * Be aware Math.random() could cause collisions, but:\n * \"All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide\"\n * @returns a pseudo random id\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n RandomId: RandomGUID,\n};\n//# sourceMappingURL=guid.js.map","import { Observable } from \"./observable.js\";\nimport { GetDOMTextContent, IsNavigatorAvailable, IsWindowObjectExist } from \"./domManagement.js\";\nimport { Logger } from \"./logger.js\";\nimport { DeepCopier } from \"./deepCopier.js\";\nimport { PrecisionDate } from \"./precisionDate.js\";\nimport { _WarnImport } from \"./devTools.js\";\nimport { WebRequest } from \"./webRequest.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { FileToolsOptions, DecodeBase64UrlToBinary, IsBase64DataUrl, LoadFile as FileToolsLoadFile, LoadImage as FileToolLoadImage, ReadFile as FileToolsReadFile, SetCorsBehavior, } from \"./fileTools.js\";\nimport { TimingTools } from \"./timingTools.js\";\nimport { InstantiationTools } from \"./instantiationTools.js\";\nimport { RandomGUID } from \"./guid.js\";\n/**\n * Class containing a set of static utilities functions\n */\nexport class Tools {\n /**\n * Gets or sets the base URL to use to load assets\n */\n static get BaseUrl() {\n return FileToolsOptions.BaseUrl;\n }\n static set BaseUrl(value) {\n FileToolsOptions.BaseUrl = value;\n }\n /**\n * This function checks whether a URL is absolute or not.\n * It will also detect data and blob URLs\n * @param url the url to check\n * @returns is the url absolute or relative\n */\n static IsAbsoluteUrl(url) {\n // See https://stackoverflow.com/a/38979205.\n // URL is protocol-relative (= absolute)\n if (url.indexOf(\"//\") === 0) {\n return true;\n }\n // URL has no protocol (= relative)\n if (url.indexOf(\"://\") === -1) {\n return false;\n }\n // URL does not contain a dot, i.e. no TLD (= relative, possibly REST)\n if (url.indexOf(\".\") === -1) {\n return false;\n }\n // URL does not contain a single slash (= relative)\n if (url.indexOf(\"/\") === -1) {\n return false;\n }\n // The first colon comes after the first slash (= relative)\n if (url.indexOf(\":\") > url.indexOf(\"/\")) {\n return false;\n }\n // Protocol is defined before first dot (= absolute)\n if (url.indexOf(\"://\") < url.indexOf(\".\")) {\n return true;\n }\n if (url.indexOf(\"data:\") === 0 || url.indexOf(\"blob:\") === 0) {\n return true;\n }\n // Anything else must be relative\n return false;\n }\n /**\n * Sets the base URL to use to load scripts\n */\n static set ScriptBaseUrl(value) {\n FileToolsOptions.ScriptBaseUrl = value;\n }\n static get ScriptBaseUrl() {\n return FileToolsOptions.ScriptBaseUrl;\n }\n /**\n * Sets a preprocessing function to run on a source URL before importing it\n * Note that this function will execute AFTER the base URL is appended to the URL\n */\n static set ScriptPreprocessUrl(func) {\n FileToolsOptions.ScriptPreprocessUrl = func;\n }\n static get ScriptPreprocessUrl() {\n return FileToolsOptions.ScriptPreprocessUrl;\n }\n /**\n * Gets or sets the retry strategy to apply when an error happens while loading an asset\n */\n static get DefaultRetryStrategy() {\n return FileToolsOptions.DefaultRetryStrategy;\n }\n static set DefaultRetryStrategy(strategy) {\n FileToolsOptions.DefaultRetryStrategy = strategy;\n }\n /**\n * Default behavior for cors in the application.\n * It can be a string if the expected behavior is identical in the entire app.\n * Or a callback to be able to set it per url or on a group of them (in case of Video source for instance)\n */\n static get CorsBehavior() {\n return FileToolsOptions.CorsBehavior;\n }\n static set CorsBehavior(value) {\n FileToolsOptions.CorsBehavior = value;\n }\n /**\n * Gets or sets a global variable indicating if fallback texture must be used when a texture cannot be loaded\n * @ignorenaming\n */\n static get UseFallbackTexture() {\n return EngineStore.UseFallbackTexture;\n }\n static set UseFallbackTexture(value) {\n EngineStore.UseFallbackTexture = value;\n }\n /**\n * Use this object to register external classes like custom textures or material\n * to allow the loaders to instantiate them\n */\n static get RegisteredExternalClasses() {\n return InstantiationTools.RegisteredExternalClasses;\n }\n static set RegisteredExternalClasses(classes) {\n InstantiationTools.RegisteredExternalClasses = classes;\n }\n /**\n * Texture content used if a texture cannot loaded\n * @ignorenaming\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static get fallbackTexture() {\n return EngineStore.FallbackTexture;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static set fallbackTexture(value) {\n EngineStore.FallbackTexture = value;\n }\n /**\n * Read the content of a byte array at a specified coordinates (taking in account wrapping)\n * @param u defines the coordinate on X axis\n * @param v defines the coordinate on Y axis\n * @param width defines the width of the source data\n * @param height defines the height of the source data\n * @param pixels defines the source byte array\n * @param color defines the output color\n */\n static FetchToRef(u, v, width, height, pixels, color) {\n const wrappedU = (Math.abs(u) * width) % width | 0;\n const wrappedV = (Math.abs(v) * height) % height | 0;\n const position = (wrappedU + wrappedV * width) * 4;\n color.r = pixels[position] / 255;\n color.g = pixels[position + 1] / 255;\n color.b = pixels[position + 2] / 255;\n color.a = pixels[position + 3] / 255;\n }\n /**\n * Interpolates between a and b via alpha\n * @param a The lower value (returned when alpha = 0)\n * @param b The upper value (returned when alpha = 1)\n * @param alpha The interpolation-factor\n * @returns The mixed value\n */\n static Mix(a, b, alpha) {\n return a * (1 - alpha) + b * alpha;\n }\n /**\n * Tries to instantiate a new object from a given class name\n * @param className defines the class name to instantiate\n * @returns the new object or null if the system was not able to do the instantiation\n */\n static Instantiate(className) {\n return InstantiationTools.Instantiate(className);\n }\n /**\n * Polyfill for setImmediate\n * @param action defines the action to execute after the current execution block\n */\n static SetImmediate(action) {\n TimingTools.SetImmediate(action);\n }\n /**\n * Function indicating if a number is an exponent of 2\n * @param value defines the value to test\n * @returns true if the value is an exponent of 2\n */\n static IsExponentOfTwo(value) {\n let count = 1;\n do {\n count *= 2;\n } while (count < value);\n return count === value;\n }\n /**\n * Returns the nearest 32-bit single precision float representation of a Number\n * @param value A Number. If the parameter is of a different type, it will get converted\n * to a number or to NaN if it cannot be converted\n * @returns number\n */\n static FloatRound(value) {\n return Math.fround(value);\n }\n /**\n * Extracts the filename from a path\n * @param path defines the path to use\n * @returns the filename\n */\n static GetFilename(path) {\n const index = path.lastIndexOf(\"/\");\n if (index < 0) {\n return path;\n }\n return path.substring(index + 1);\n }\n /**\n * Extracts the \"folder\" part of a path (everything before the filename).\n * @param uri The URI to extract the info from\n * @param returnUnchangedIfNoSlash Do not touch the URI if no slashes are present\n * @returns The \"folder\" part of the path\n */\n static GetFolderPath(uri, returnUnchangedIfNoSlash = false) {\n const index = uri.lastIndexOf(\"/\");\n if (index < 0) {\n if (returnUnchangedIfNoSlash) {\n return uri;\n }\n return \"\";\n }\n return uri.substring(0, index + 1);\n }\n /**\n * Convert an angle in radians to degrees\n * @param angle defines the angle to convert\n * @returns the angle in degrees\n */\n static ToDegrees(angle) {\n return (angle * 180) / Math.PI;\n }\n /**\n * Convert an angle in degrees to radians\n * @param angle defines the angle to convert\n * @returns the angle in radians\n */\n static ToRadians(angle) {\n return (angle * Math.PI) / 180;\n }\n /**\n * Smooth angle changes (kind of low-pass filter), in particular for device orientation \"shaking\"\n * Use trigonometric functions to avoid discontinuity (0/360, -180/180)\n * @param previousAngle defines last angle value, in degrees\n * @param newAngle defines new angle value, in degrees\n * @param smoothFactor defines smoothing sensitivity; min 0: no smoothing, max 1: new data ignored\n * @returns the angle in degrees\n */\n static SmoothAngleChange(previousAngle, newAngle, smoothFactor = 0.9) {\n const previousAngleRad = this.ToRadians(previousAngle);\n const newAngleRad = this.ToRadians(newAngle);\n return this.ToDegrees(Math.atan2((1 - smoothFactor) * Math.sin(newAngleRad) + smoothFactor * Math.sin(previousAngleRad), (1 - smoothFactor) * Math.cos(newAngleRad) + smoothFactor * Math.cos(previousAngleRad)));\n }\n /**\n * Returns an array if obj is not an array\n * @param obj defines the object to evaluate as an array\n * @param allowsNullUndefined defines a boolean indicating if obj is allowed to be null or undefined\n * @returns either obj directly if obj is an array or a new array containing obj\n */\n static MakeArray(obj, allowsNullUndefined) {\n if (allowsNullUndefined !== true && (obj === undefined || obj == null)) {\n return null;\n }\n return Array.isArray(obj) ? obj : [obj];\n }\n /**\n * Gets the pointer prefix to use\n * @param engine defines the engine we are finding the prefix for\n * @returns \"pointer\" if touch is enabled. Else returns \"mouse\"\n */\n static GetPointerPrefix(engine) {\n let eventPrefix = \"pointer\";\n // Check if pointer events are supported\n if (IsWindowObjectExist() && !window.PointerEvent) {\n eventPrefix = \"mouse\";\n }\n // Special Fallback MacOS Safari...\n if (engine._badDesktopOS &&\n !engine._badOS &&\n // And not ipad pros who claim to be macs...\n !(document && \"ontouchend\" in document)) {\n eventPrefix = \"mouse\";\n }\n return eventPrefix;\n }\n /**\n * Sets the cors behavior on a dom element. This will add the required Tools.CorsBehavior to the element.\n * @param url define the url we are trying\n * @param element define the dom element where to configure the cors policy\n * @param element.crossOrigin\n */\n static SetCorsBehavior(url, element) {\n SetCorsBehavior(url, element);\n }\n /**\n * Sets the referrerPolicy behavior on a dom element.\n * @param referrerPolicy define the referrer policy to use\n * @param element define the dom element where to configure the referrer policy\n * @param element.referrerPolicy\n */\n static SetReferrerPolicyBehavior(referrerPolicy, element) {\n element.referrerPolicy = referrerPolicy;\n }\n // External files\n /**\n * Removes unwanted characters from an url\n * @param url defines the url to clean\n * @returns the cleaned url\n */\n static CleanUrl(url) {\n url = url.replace(/#/gm, \"%23\");\n return url;\n }\n /**\n * Gets or sets a function used to pre-process url before using them to load assets\n */\n static get PreprocessUrl() {\n return FileToolsOptions.PreprocessUrl;\n }\n static set PreprocessUrl(processor) {\n FileToolsOptions.PreprocessUrl = processor;\n }\n /**\n * Loads an image as an HTMLImageElement.\n * @param input url string, ArrayBuffer, or Blob to load\n * @param onLoad callback called when the image successfully loads\n * @param onError callback called when the image fails to load\n * @param offlineProvider offline provider for caching\n * @param mimeType optional mime type\n * @param imageBitmapOptions optional the options to use when creating an ImageBitmap\n * @returns the HTMLImageElement of the loaded image\n */\n static LoadImage(input, onLoad, onError, offlineProvider, mimeType, imageBitmapOptions) {\n return FileToolLoadImage(input, onLoad, onError, offlineProvider, mimeType, imageBitmapOptions);\n }\n /**\n * Loads a file from a url\n * @param url url string, ArrayBuffer, or Blob to load\n * @param onSuccess callback called when the file successfully loads\n * @param onProgress callback called while file is loading (if the server supports this mode)\n * @param offlineProvider defines the offline provider for caching\n * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer\n * @param onError callback called when the file fails to load\n * @returns a file request object\n */\n static LoadFile(url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError) {\n return FileToolsLoadFile(url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError);\n }\n /**\n * Loads a file from a url\n * @param url the file url to load\n * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer\n * @returns a promise containing an ArrayBuffer corresponding to the loaded file\n */\n static LoadFileAsync(url, useArrayBuffer = true) {\n return new Promise((resolve, reject) => {\n FileToolsLoadFile(url, (data) => {\n resolve(data);\n }, undefined, undefined, useArrayBuffer, (request, exception) => {\n reject(exception);\n });\n });\n }\n /**\n * Get a script URL including preprocessing\n * @param scriptUrl the script Url to process\n * @returns a modified URL to use\n */\n static GetBabylonScriptURL(scriptUrl, forceAbsoluteUrl) {\n if (!scriptUrl) {\n return \"\";\n }\n // if the base URL was set, and the script Url is an absolute path change the default path\n if (Tools.ScriptBaseUrl && scriptUrl.startsWith(Tools._DefaultCdnUrl)) {\n // change the default host, which is https://cdn.babylonjs.com with the one defined\n // make sure no trailing slash is present\n const baseUrl = Tools.ScriptBaseUrl[Tools.ScriptBaseUrl.length - 1] === \"/\" ? Tools.ScriptBaseUrl.substring(0, Tools.ScriptBaseUrl.length - 1) : Tools.ScriptBaseUrl;\n scriptUrl = scriptUrl.replace(Tools._DefaultCdnUrl, baseUrl);\n }\n // run the preprocessor\n scriptUrl = Tools.ScriptPreprocessUrl(scriptUrl);\n if (forceAbsoluteUrl) {\n scriptUrl = Tools.GetAbsoluteUrl(scriptUrl);\n }\n return scriptUrl;\n }\n /**\n * This function is used internally by babylon components to load a script (identified by an url). When the url returns, the\n * content of this file is added into a new script element, attached to the DOM (body element)\n * @param scriptUrl defines the url of the script to load\n * @param onSuccess defines the callback called when the script is loaded\n * @param onError defines the callback to call if an error occurs\n * @param scriptId defines the id of the script element\n */\n static LoadBabylonScript(scriptUrl, onSuccess, onError, scriptId) {\n scriptUrl = Tools.GetBabylonScriptURL(scriptUrl);\n Tools.LoadScript(scriptUrl, onSuccess, onError);\n }\n /**\n * Load an asynchronous script (identified by an url). When the url returns, the\n * content of this file is added into a new script element, attached to the DOM (body element)\n * @param scriptUrl defines the url of the script to laod\n * @returns a promise request object\n */\n static LoadBabylonScriptAsync(scriptUrl) {\n scriptUrl = Tools.GetBabylonScriptURL(scriptUrl);\n return Tools.LoadScriptAsync(scriptUrl);\n }\n /**\n * This function is used internally by babylon components to load a script (identified by an url). When the url returns, the\n * content of this file is added into a new script element, attached to the DOM (body element)\n * @param scriptUrl defines the url of the script to load\n * @param onSuccess defines the callback called when the script is loaded\n * @param onError defines the callback to call if an error occurs\n * @param scriptId defines the id of the script element\n */\n static LoadScript(scriptUrl, onSuccess, onError, scriptId) {\n if (typeof importScripts === \"function\") {\n try {\n importScripts(scriptUrl);\n onSuccess();\n }\n catch (e) {\n onError === null || onError === void 0 ? void 0 : onError(`Unable to load script '${scriptUrl}' in worker`, e);\n }\n return;\n }\n else if (!IsWindowObjectExist()) {\n onError === null || onError === void 0 ? void 0 : onError(`Cannot load script '${scriptUrl}' outside of a window or a worker`);\n return;\n }\n const head = document.getElementsByTagName(\"head\")[0];\n const script = document.createElement(\"script\");\n script.setAttribute(\"type\", \"text/javascript\");\n script.setAttribute(\"src\", scriptUrl);\n if (scriptId) {\n script.id = scriptId;\n }\n script.onload = () => {\n if (onSuccess) {\n onSuccess();\n }\n };\n script.onerror = (e) => {\n if (onError) {\n onError(`Unable to load script '${scriptUrl}'`, e);\n }\n };\n head.appendChild(script);\n }\n /**\n * Load an asynchronous script (identified by an url). When the url returns, the\n * content of this file is added into a new script element, attached to the DOM (body element)\n * @param scriptUrl defines the url of the script to laod\n * @returns a promise request object\n */\n static LoadScriptAsync(scriptUrl) {\n return new Promise((resolve, reject) => {\n this.LoadScript(scriptUrl, () => {\n resolve();\n }, (message, exception) => {\n reject(exception || new Error(message));\n });\n });\n }\n /**\n * Loads a file from a blob\n * @param fileToLoad defines the blob to use\n * @param callback defines the callback to call when data is loaded\n * @param progressCallback defines the callback to call during loading process\n * @returns a file request object\n */\n static ReadFileAsDataURL(fileToLoad, callback, progressCallback) {\n const reader = new FileReader();\n const request = {\n onCompleteObservable: new Observable(),\n abort: () => reader.abort(),\n };\n reader.onloadend = () => {\n request.onCompleteObservable.notifyObservers(request);\n };\n reader.onload = (e) => {\n //target doesn't have result from ts 1.3\n callback(e.target[\"result\"]);\n };\n reader.onprogress = progressCallback;\n reader.readAsDataURL(fileToLoad);\n return request;\n }\n /**\n * Reads a file from a File object\n * @param file defines the file to load\n * @param onSuccess defines the callback to call when data is loaded\n * @param onProgress defines the callback to call during loading process\n * @param useArrayBuffer defines a boolean indicating that data must be returned as an ArrayBuffer\n * @param onError defines the callback to call when an error occurs\n * @returns a file request object\n */\n static ReadFile(file, onSuccess, onProgress, useArrayBuffer, onError) {\n return FileToolsReadFile(file, onSuccess, onProgress, useArrayBuffer, onError);\n }\n /**\n * Creates a data url from a given string content\n * @param content defines the content to convert\n * @returns the new data url link\n */\n static FileAsURL(content) {\n const fileBlob = new Blob([content]);\n const url = window.URL;\n const link = url.createObjectURL(fileBlob);\n return link;\n }\n /**\n * Format the given number to a specific decimal format\n * @param value defines the number to format\n * @param decimals defines the number of decimals to use\n * @returns the formatted string\n */\n static Format(value, decimals = 2) {\n return value.toFixed(decimals);\n }\n /**\n * Tries to copy an object by duplicating every property\n * @param source defines the source object\n * @param destination defines the target object\n * @param doNotCopyList defines a list of properties to avoid\n * @param mustCopyList defines a list of properties to copy (even if they start with _)\n */\n static DeepCopy(source, destination, doNotCopyList, mustCopyList) {\n DeepCopier.DeepCopy(source, destination, doNotCopyList, mustCopyList);\n }\n /**\n * Gets a boolean indicating if the given object has no own property\n * @param obj defines the object to test\n * @returns true if object has no own property\n */\n static IsEmpty(obj) {\n for (const i in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, i)) {\n return false;\n }\n }\n return true;\n }\n /**\n * Function used to register events at window level\n * @param windowElement defines the Window object to use\n * @param events defines the events to register\n */\n static RegisterTopRootEvents(windowElement, events) {\n for (let index = 0; index < events.length; index++) {\n const event = events[index];\n windowElement.addEventListener(event.name, event.handler, false);\n try {\n if (window.parent) {\n window.parent.addEventListener(event.name, event.handler, false);\n }\n }\n catch (e) {\n // Silently fails...\n }\n }\n }\n /**\n * Function used to unregister events from window level\n * @param windowElement defines the Window object to use\n * @param events defines the events to unregister\n */\n static UnregisterTopRootEvents(windowElement, events) {\n for (let index = 0; index < events.length; index++) {\n const event = events[index];\n windowElement.removeEventListener(event.name, event.handler);\n try {\n if (windowElement.parent) {\n windowElement.parent.removeEventListener(event.name, event.handler);\n }\n }\n catch (e) {\n // Silently fails...\n }\n }\n }\n /**\n * Dumps the current bound framebuffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param engine defines the hosting engine\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a void promise\n */\n static async DumpFramebuffer(width, height, engine, successCallback, mimeType = \"image/png\", fileName, quality) {\n throw _WarnImport(\"DumpTools\");\n }\n /**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\n static DumpData(width, height, data, successCallback, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n throw _WarnImport(\"DumpTools\");\n }\n /**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a promise that resolve to the final data\n */\n static DumpDataAsync(width, height, data, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n throw _WarnImport(\"DumpTools\");\n }\n static _IsOffScreenCanvas(canvas) {\n return canvas.convertToBlob !== undefined;\n }\n /**\n * Converts the canvas data to blob.\n * This acts as a polyfill for browsers not supporting the to blob function.\n * @param canvas Defines the canvas to extract the data from (can be an offscreen canvas)\n * @param successCallback Defines the callback triggered once the data are available\n * @param mimeType Defines the mime type of the result\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\n static ToBlob(canvas, successCallback, mimeType = \"image/png\", quality) {\n // We need HTMLCanvasElement.toBlob for HD screenshots\n if (!Tools._IsOffScreenCanvas(canvas) && !canvas.toBlob) {\n // low performance polyfill based on toDataURL (https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob)\n canvas.toBlob = function (callback, type, quality) {\n setTimeout(() => {\n const binStr = atob(this.toDataURL(type, quality).split(\",\")[1]), len = binStr.length, arr = new Uint8Array(len);\n for (let i = 0; i < len; i++) {\n arr[i] = binStr.charCodeAt(i);\n }\n callback(new Blob([arr]));\n });\n };\n }\n if (Tools._IsOffScreenCanvas(canvas)) {\n canvas\n .convertToBlob({\n type: mimeType,\n quality,\n })\n .then((blob) => successCallback(blob));\n }\n else {\n canvas.toBlob(function (blob) {\n successCallback(blob);\n }, mimeType, quality);\n }\n }\n /**\n * Download a Blob object\n * @param blob the Blob object\n * @param fileName the file name to download\n * @returns\n */\n static DownloadBlob(blob, fileName) {\n //Creating a link if the browser have the download attribute on the a tag, to automatically start download generated image.\n if (\"download\" in document.createElement(\"a\")) {\n if (!fileName) {\n const date = new Date();\n const stringDate = (date.getFullYear() + \"-\" + (date.getMonth() + 1)).slice(2) + \"-\" + date.getDate() + \"_\" + date.getHours() + \"-\" + (\"0\" + date.getMinutes()).slice(-2);\n fileName = \"screenshot_\" + stringDate + \".png\";\n }\n Tools.Download(blob, fileName);\n }\n else {\n if (blob && typeof URL !== \"undefined\") {\n const url = URL.createObjectURL(blob);\n const newWindow = window.open(\"\");\n if (!newWindow) {\n return;\n }\n const img = newWindow.document.createElement(\"img\");\n img.onload = function () {\n // no longer need to read the blob so it's revoked\n URL.revokeObjectURL(url);\n };\n img.src = url;\n newWindow.document.body.appendChild(img);\n }\n }\n }\n /**\n * Encodes the canvas data to base 64, or automatically downloads the result if `fileName` is defined.\n * @param canvas The canvas to get the data from, which can be an offscreen canvas.\n * @param successCallback The callback which is triggered once the data is available. If `fileName` is defined, the callback will be invoked after the download occurs, and the `data` argument will be an empty string.\n * @param mimeType The mime type of the result.\n * @param fileName The name of the file to download. If defined, the result will automatically be downloaded. If not defined, and `successCallback` is also not defined, the result will automatically be downloaded with an auto-generated file name.\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\n static EncodeScreenshotCanvasData(canvas, successCallback, mimeType = \"image/png\", fileName, quality) {\n if (typeof fileName === \"string\" || !successCallback) {\n this.ToBlob(canvas, function (blob) {\n if (blob) {\n Tools.DownloadBlob(blob, fileName);\n }\n if (successCallback) {\n successCallback(\"\");\n }\n }, mimeType, quality);\n }\n else if (successCallback) {\n if (Tools._IsOffScreenCanvas(canvas)) {\n canvas\n .convertToBlob({\n type: mimeType,\n quality,\n })\n .then((blob) => {\n const reader = new FileReader();\n reader.readAsDataURL(blob);\n reader.onloadend = () => {\n const base64data = reader.result;\n successCallback(base64data);\n };\n });\n return;\n }\n const base64Image = canvas.toDataURL(mimeType, quality);\n successCallback(base64Image);\n }\n }\n /**\n * Downloads a blob in the browser\n * @param blob defines the blob to download\n * @param fileName defines the name of the downloaded file\n */\n static Download(blob, fileName) {\n if (typeof URL === \"undefined\") {\n return;\n }\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement(\"a\");\n document.body.appendChild(a);\n a.style.display = \"none\";\n a.href = url;\n a.download = fileName;\n a.addEventListener(\"click\", () => {\n if (a.parentElement) {\n a.parentElement.removeChild(a);\n }\n });\n a.click();\n window.URL.revokeObjectURL(url);\n }\n /**\n * Will return the right value of the noPreventDefault variable\n * Needed to keep backwards compatibility to the old API.\n *\n * @param args arguments passed to the attachControl function\n * @returns the correct value for noPreventDefault\n */\n static BackCompatCameraNoPreventDefault(args) {\n // is it used correctly?\n if (typeof args[0] === \"boolean\") {\n return args[0];\n }\n else if (typeof args[1] === \"boolean\") {\n return args[1];\n }\n return false;\n }\n /**\n * Captures a screenshot of the current rendering\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine defines the rendering engine\n * @param camera defines the source camera\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height. If a single number is passed,\n * it will be used for both width and height. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param successCallback defines the callback receives a single parameter which contains the\n * screenshot as a string of base64-encoded characters. This string can be assigned to the\n * src parameter of an to display it\n * @param mimeType defines the MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param forceDownload force the system to download the image even if a successCallback is provided\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static CreateScreenshot(engine, camera, size, successCallback, mimeType = \"image/png\", forceDownload = false, quality) {\n throw _WarnImport(\"ScreenshotTools\");\n }\n /**\n * Captures a screenshot of the current rendering\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine defines the rendering engine\n * @param camera defines the source camera\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height. If a single number is passed,\n * it will be used for both width and height. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param mimeType defines the MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns screenshot as a string of base64-encoded characters. This string can be assigned\n * to the src parameter of an to display it\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static CreateScreenshotAsync(engine, camera, size, mimeType = \"image/png\", quality) {\n throw _WarnImport(\"ScreenshotTools\");\n }\n /**\n * Generates an image screenshot from the specified camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine The engine to use for rendering\n * @param camera The camera to use for rendering\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height. If a single number is passed,\n * it will be used for both width and height. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param successCallback The callback receives a single parameter which contains the\n * screenshot as a string of base64-encoded characters. This string can be assigned to the\n * src parameter of an to display it\n * @param mimeType The MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param samples Texture samples (default: 1)\n * @param antialiasing Whether antialiasing should be turned on or not (default: false)\n * @param fileName A name for for the downloaded file.\n * @param renderSprites Whether the sprites should be rendered or not (default: false)\n * @param enableStencilBuffer Whether the stencil buffer should be enabled or not (default: false)\n * @param useLayerMask if the camera's layer mask should be used to filter what should be rendered (default: true)\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static CreateScreenshotUsingRenderTarget(engine, camera, size, successCallback, mimeType = \"image/png\", samples = 1, antialiasing = false, fileName, renderSprites = false, enableStencilBuffer = false, useLayerMask = true, quality) {\n throw _WarnImport(\"ScreenshotTools\");\n }\n /**\n * Generates an image screenshot from the specified camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine The engine to use for rendering\n * @param camera The camera to use for rendering\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height. If a single number is passed,\n * it will be used for both width and height. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param mimeType The MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param samples Texture samples (default: 1)\n * @param antialiasing Whether antialiasing should be turned on or not (default: false)\n * @param fileName A name for for the downloaded file.\n * @returns screenshot as a string of base64-encoded characters. This string can be assigned\n * @param renderSprites Whether the sprites should be rendered or not (default: false)\n * @param enableStencilBuffer Whether the stencil buffer should be enabled or not (default: false)\n * @param useLayerMask if the camera's layer mask should be used to filter what should be rendered (default: true)\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * to the src parameter of an to display it\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static CreateScreenshotUsingRenderTargetAsync(engine, camera, size, mimeType = \"image/png\", samples = 1, antialiasing = false, fileName, renderSprites = false, enableStencilBuffer = false, useLayerMask = true, quality) {\n throw _WarnImport(\"ScreenshotTools\");\n }\n /**\n * Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523\n * Be aware Math.random() could cause collisions, but:\n * \"All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide\"\n * @returns a pseudo random id\n */\n static RandomId() {\n return RandomGUID();\n }\n /**\n * Test if the given uri is a base64 string\n * @deprecated Please use FileTools.IsBase64DataUrl instead.\n * @param uri The uri to test\n * @returns True if the uri is a base64 string or false otherwise\n */\n static IsBase64(uri) {\n return IsBase64DataUrl(uri);\n }\n /**\n * Decode the given base64 uri.\n * @deprecated Please use FileTools.DecodeBase64UrlToBinary instead.\n * @param uri The uri to decode\n * @returns The decoded base64 data.\n */\n static DecodeBase64(uri) {\n return DecodeBase64UrlToBinary(uri);\n }\n /**\n * Gets a value indicating the number of loading errors\n * @ignorenaming\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static get errorsCount() {\n return Logger.errorsCount;\n }\n /**\n * Log a message to the console\n * @param message defines the message to log\n */\n static Log(message) {\n Logger.Log(message);\n }\n /**\n * Write a warning message to the console\n * @param message defines the message to log\n */\n static Warn(message) {\n Logger.Warn(message);\n }\n /**\n * Write an error message to the console\n * @param message defines the message to log\n */\n static Error(message) {\n Logger.Error(message);\n }\n /**\n * Gets current log cache (list of logs)\n */\n static get LogCache() {\n return Logger.LogCache;\n }\n /**\n * Clears the log cache\n */\n static ClearLogCache() {\n Logger.ClearLogCache();\n }\n /**\n * Sets the current log level (MessageLogLevel / WarningLogLevel / ErrorLogLevel)\n */\n static set LogLevels(level) {\n Logger.LogLevels = level;\n }\n /**\n * Sets the current performance log level\n */\n static set PerformanceLogLevel(level) {\n if ((level & Tools.PerformanceUserMarkLogLevel) === Tools.PerformanceUserMarkLogLevel) {\n Tools.StartPerformanceCounter = Tools._StartUserMark;\n Tools.EndPerformanceCounter = Tools._EndUserMark;\n return;\n }\n if ((level & Tools.PerformanceConsoleLogLevel) === Tools.PerformanceConsoleLogLevel) {\n Tools.StartPerformanceCounter = Tools._StartPerformanceConsole;\n Tools.EndPerformanceCounter = Tools._EndPerformanceConsole;\n return;\n }\n Tools.StartPerformanceCounter = Tools._StartPerformanceCounterDisabled;\n Tools.EndPerformanceCounter = Tools._EndPerformanceCounterDisabled;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static _StartPerformanceCounterDisabled(counterName, condition) { }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static _EndPerformanceCounterDisabled(counterName, condition) { }\n static _StartUserMark(counterName, condition = true) {\n if (!Tools._Performance) {\n if (!IsWindowObjectExist()) {\n return;\n }\n Tools._Performance = window.performance;\n }\n if (!condition || !Tools._Performance.mark) {\n return;\n }\n Tools._Performance.mark(counterName + \"-Begin\");\n }\n static _EndUserMark(counterName, condition = true) {\n if (!condition || !Tools._Performance.mark) {\n return;\n }\n Tools._Performance.mark(counterName + \"-End\");\n Tools._Performance.measure(counterName, counterName + \"-Begin\", counterName + \"-End\");\n }\n static _StartPerformanceConsole(counterName, condition = true) {\n if (!condition) {\n return;\n }\n Tools._StartUserMark(counterName, condition);\n if (console.time) {\n console.time(counterName);\n }\n }\n static _EndPerformanceConsole(counterName, condition = true) {\n if (!condition) {\n return;\n }\n Tools._EndUserMark(counterName, condition);\n console.timeEnd(counterName);\n }\n /**\n * Gets either window.performance.now() if supported or Date.now() else\n */\n static get Now() {\n return PrecisionDate.Now;\n }\n /**\n * This method will return the name of the class used to create the instance of the given object.\n * It will works only on Javascript basic data types (number, string, ...) and instance of class declared with the @className decorator.\n * @param object the object to get the class name from\n * @param isType defines if the object is actually a type\n * @returns the name of the class, will be \"object\" for a custom data type not using the @className decorator\n */\n static GetClassName(object, isType = false) {\n let name = null;\n if (!isType && object.getClassName) {\n name = object.getClassName();\n }\n else {\n if (object instanceof Object) {\n const classObj = isType ? object : Object.getPrototypeOf(object);\n name = classObj.constructor[\"__bjsclassName__\"];\n }\n if (!name) {\n name = typeof object;\n }\n }\n return name;\n }\n /**\n * Gets the first element of an array satisfying a given predicate\n * @param array defines the array to browse\n * @param predicate defines the predicate to use\n * @returns null if not found or the element\n */\n static First(array, predicate) {\n for (const el of array) {\n if (predicate(el)) {\n return el;\n }\n }\n return null;\n }\n /**\n * This method will return the name of the full name of the class, including its owning module (if any).\n * It will works only on Javascript basic data types (number, string, ...) and instance of class declared with the @className decorator or implementing a method getClassName():string (in which case the module won't be specified).\n * @param object the object to get the class name from\n * @param isType defines if the object is actually a type\n * @returns a string that can have two forms: \"moduleName.className\" if module was specified when the class' Name was registered or \"className\" if there was not module specified.\n * @ignorenaming\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static getFullClassName(object, isType = false) {\n let className = null;\n let moduleName = null;\n if (!isType && object.getClassName) {\n className = object.getClassName();\n }\n else {\n if (object instanceof Object) {\n const classObj = isType ? object : Object.getPrototypeOf(object);\n className = classObj.constructor[\"__bjsclassName__\"];\n moduleName = classObj.constructor[\"__bjsmoduleName__\"];\n }\n if (!className) {\n className = typeof object;\n }\n }\n if (!className) {\n return null;\n }\n return (moduleName != null ? moduleName + \".\" : \"\") + className;\n }\n /**\n * Returns a promise that resolves after the given amount of time.\n * @param delay Number of milliseconds to delay\n * @returns Promise that resolves after the given amount of time\n */\n static DelayAsync(delay) {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, delay);\n });\n }\n /**\n * Utility function to detect if the current user agent is Safari\n * @returns whether or not the current user agent is safari\n */\n static IsSafari() {\n if (!IsNavigatorAvailable()) {\n return false;\n }\n return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n }\n}\n/**\n * Enable/Disable Custom HTTP Request Headers globally.\n * default = false\n * @see CustomRequestHeaders\n */\nTools.UseCustomRequestHeaders = false;\n/**\n * Custom HTTP Request Headers to be sent with XMLHttpRequests\n * i.e. when loading files, where the server/service expects an Authorization header\n */\nTools.CustomRequestHeaders = WebRequest.CustomRequestHeaders;\n/**\n * Extracts text content from a DOM element hierarchy\n * Back Compat only, please use GetDOMTextContent instead.\n */\nTools.GetDOMTextContent = GetDOMTextContent;\n/**\n * @internal\n */\nTools._DefaultCdnUrl = \"https://cdn.babylonjs.com\";\nTools.GetAbsoluteUrl = typeof document === \"object\"\n ? (url) => {\n const a = document.createElement(\"a\");\n a.href = url;\n return a.href;\n }\n : typeof URL === \"function\" && typeof location === \"object\"\n ? (url) => new URL(url, location.origin).href\n : () => {\n throw new Error(\"Unable to get absolute URL. Override BABYLON.Tools.GetAbsoluteUrl to a custom implementation for the current context.\");\n };\n// Logs\n/**\n * No log\n */\nTools.NoneLogLevel = Logger.NoneLogLevel;\n/**\n * Only message logs\n */\nTools.MessageLogLevel = Logger.MessageLogLevel;\n/**\n * Only warning logs\n */\nTools.WarningLogLevel = Logger.WarningLogLevel;\n/**\n * Only error logs\n */\nTools.ErrorLogLevel = Logger.ErrorLogLevel;\n/**\n * All logs\n */\nTools.AllLogLevel = Logger.AllLogLevel;\n/**\n * Checks if the window object exists\n * Back Compat only, please use IsWindowObjectExist instead.\n */\nTools.IsWindowObjectExist = IsWindowObjectExist;\n// Performances\n/**\n * No performance log\n */\nTools.PerformanceNoneLogLevel = 0;\n/**\n * Use user marks to log performance\n */\nTools.PerformanceUserMarkLogLevel = 1;\n/**\n * Log performance to the console\n */\nTools.PerformanceConsoleLogLevel = 2;\n/**\n * Starts a performance counter\n */\nTools.StartPerformanceCounter = Tools._StartPerformanceCounterDisabled;\n/**\n * Ends a specific performance counter\n */\nTools.EndPerformanceCounter = Tools._EndPerformanceCounterDisabled;\n/**\n * Use this className as a decorator on a given class definition to add it a name and optionally its module.\n * You can then use the Tools.getClassName(obj) on an instance to retrieve its class name.\n * This method is the only way to get it done in all cases, even if the .js file declaring the class is minified\n * @param name The name of the class, case should be preserved\n * @param module The name of the Module hosting the class, optional, but strongly recommended to specify if possible. Case should be preserved.\n */\nexport function className(name, module) {\n return (target) => {\n target[\"__bjsclassName__\"] = name;\n target[\"__bjsmoduleName__\"] = module != null ? module : null;\n };\n}\n/**\n * An implementation of a loop for asynchronous functions.\n */\nexport class AsyncLoop {\n /**\n * Constructor.\n * @param iterations the number of iterations.\n * @param func the function to run each iteration\n * @param successCallback the callback that will be called upon successful execution\n * @param offset starting offset.\n */\n constructor(\n /**\n * Defines the number of iterations for the loop\n */\n iterations, func, successCallback, offset = 0) {\n this.iterations = iterations;\n this.index = offset - 1;\n this._done = false;\n this._fn = func;\n this._successCallback = successCallback;\n }\n /**\n * Execute the next iteration. Must be called after the last iteration was finished.\n */\n executeNext() {\n if (!this._done) {\n if (this.index + 1 < this.iterations) {\n ++this.index;\n this._fn(this);\n }\n else {\n this.breakLoop();\n }\n }\n }\n /**\n * Break the loop and run the success callback.\n */\n breakLoop() {\n this._done = true;\n this._successCallback();\n }\n /**\n * Create and run an async loop.\n * @param iterations the number of iterations.\n * @param fn the function to run each iteration\n * @param successCallback the callback that will be called upon successful execution\n * @param offset starting offset.\n * @returns the created async loop object\n */\n static Run(iterations, fn, successCallback, offset = 0) {\n const loop = new AsyncLoop(iterations, fn, successCallback, offset);\n loop.executeNext();\n return loop;\n }\n /**\n * A for-loop that will run a given number of iterations synchronous and the rest async.\n * @param iterations total number of iterations\n * @param syncedIterations number of synchronous iterations in each async iteration.\n * @param fn the function to call each iteration.\n * @param callback a success call back that will be called when iterating stops.\n * @param breakFunction a break condition (optional)\n * @param timeout timeout settings for the setTimeout function. default - 0.\n * @returns the created async loop object\n */\n static SyncAsyncForLoop(iterations, syncedIterations, fn, callback, breakFunction, timeout = 0) {\n return AsyncLoop.Run(Math.ceil(iterations / syncedIterations), (loop) => {\n if (breakFunction && breakFunction()) {\n loop.breakLoop();\n }\n else {\n setTimeout(() => {\n for (let i = 0; i < syncedIterations; ++i) {\n const iteration = loop.index * syncedIterations + i;\n if (iteration >= iterations) {\n break;\n }\n fn(iteration);\n if (breakFunction && breakFunction()) {\n loop.breakLoop();\n break;\n }\n }\n loop.executeNext();\n }, timeout);\n }\n }, callback);\n }\n}\n// Will only be define if Tools is imported freeing up some space when only engine is required\nEngineStore.FallbackTexture =\n \"data:image/jpg;base64,/9j/4AAQSkZJRg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/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76P//Z\";\n//# sourceMappingURL=tools.js.map","import { ThinEngine } from \"../../Engines/thinEngine.js\";\nimport { WebGLDataBuffer } from \"../../Meshes/WebGL/webGLDataBuffer.js\";\nThinEngine.prototype.createUniformBuffer = function (elements, _label) {\n const ubo = this._gl.createBuffer();\n if (!ubo) {\n throw new Error(\"Unable to create uniform buffer\");\n }\n const result = new WebGLDataBuffer(ubo);\n this.bindUniformBuffer(result);\n if (elements instanceof Float32Array) {\n this._gl.bufferData(this._gl.UNIFORM_BUFFER, elements, this._gl.STATIC_DRAW);\n }\n else {\n this._gl.bufferData(this._gl.UNIFORM_BUFFER, new Float32Array(elements), this._gl.STATIC_DRAW);\n }\n this.bindUniformBuffer(null);\n result.references = 1;\n return result;\n};\nThinEngine.prototype.createDynamicUniformBuffer = function (elements, _label) {\n const ubo = this._gl.createBuffer();\n if (!ubo) {\n throw new Error(\"Unable to create dynamic uniform buffer\");\n }\n const result = new WebGLDataBuffer(ubo);\n this.bindUniformBuffer(result);\n if (elements instanceof Float32Array) {\n this._gl.bufferData(this._gl.UNIFORM_BUFFER, elements, this._gl.DYNAMIC_DRAW);\n }\n else {\n this._gl.bufferData(this._gl.UNIFORM_BUFFER, new Float32Array(elements), this._gl.DYNAMIC_DRAW);\n }\n this.bindUniformBuffer(null);\n result.references = 1;\n return result;\n};\nThinEngine.prototype.updateUniformBuffer = function (uniformBuffer, elements, offset, count) {\n this.bindUniformBuffer(uniformBuffer);\n if (offset === undefined) {\n offset = 0;\n }\n if (count === undefined) {\n if (elements instanceof Float32Array) {\n this._gl.bufferSubData(this._gl.UNIFORM_BUFFER, offset, elements);\n }\n else {\n this._gl.bufferSubData(this._gl.UNIFORM_BUFFER, offset, new Float32Array(elements));\n }\n }\n else {\n if (elements instanceof Float32Array) {\n this._gl.bufferSubData(this._gl.UNIFORM_BUFFER, 0, elements.subarray(offset, offset + count));\n }\n else {\n this._gl.bufferSubData(this._gl.UNIFORM_BUFFER, 0, new Float32Array(elements).subarray(offset, offset + count));\n }\n }\n this.bindUniformBuffer(null);\n};\nThinEngine.prototype.bindUniformBuffer = function (buffer) {\n this._gl.bindBuffer(this._gl.UNIFORM_BUFFER, buffer ? buffer.underlyingResource : null);\n};\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nThinEngine.prototype.bindUniformBufferBase = function (buffer, location, name) {\n this._gl.bindBufferBase(this._gl.UNIFORM_BUFFER, location, buffer ? buffer.underlyingResource : null);\n};\nThinEngine.prototype.bindUniformBlock = function (pipelineContext, blockName, index) {\n const program = pipelineContext.program;\n const uniformLocation = this._gl.getUniformBlockIndex(program, blockName);\n if (uniformLocation !== 0xffffffff) {\n this._gl.uniformBlockBinding(program, uniformLocation, index);\n }\n};\n//# sourceMappingURL=engine.uniformBuffer.js.map","import { Logger } from \"../Misc/logger.js\";\nimport { Tools } from \"../Misc/tools.js\";\nimport \"../Engines/Extensions/engine.uniformBuffer.js\";\n/**\n * Uniform buffer objects.\n *\n * Handles blocks of uniform on the GPU.\n *\n * If WebGL 2 is not available, this class falls back on traditional setUniformXXX calls.\n *\n * For more information, please refer to :\n * https://www.khronos.org/opengl/wiki/Uniform_Buffer_Object\n */\nexport class UniformBuffer {\n /**\n * Instantiates a new Uniform buffer objects.\n *\n * Handles blocks of uniform on the GPU.\n *\n * If WebGL 2 is not available, this class falls back on traditional setUniformXXX calls.\n *\n * For more information, please refer to :\n * @see https://www.khronos.org/opengl/wiki/Uniform_Buffer_Object\n * @param engine Define the engine the buffer is associated with\n * @param data Define the data contained in the buffer\n * @param dynamic Define if the buffer is updatable\n * @param name to assign to the buffer (debugging purpose)\n * @param forceNoUniformBuffer define that this object must not rely on UBO objects\n */\n constructor(engine, data, dynamic, name, forceNoUniformBuffer = false) {\n // Matrix cache\n this._valueCache = {};\n this._engine = engine;\n this._noUBO = !engine.supportsUniformBuffers || forceNoUniformBuffer;\n this._dynamic = dynamic;\n this._name = name !== null && name !== void 0 ? name : \"no-name\";\n this._data = data || [];\n this._uniformLocations = {};\n this._uniformSizes = {};\n this._uniformArraySizes = {};\n this._uniformLocationPointer = 0;\n this._needSync = false;\n if (this._engine._features.trackUbosInFrame) {\n this._buffers = [];\n this._bufferIndex = -1;\n this._createBufferOnWrite = false;\n this._currentFrameId = 0;\n }\n if (this._noUBO) {\n this.updateMatrix3x3 = this._updateMatrix3x3ForEffect;\n this.updateMatrix2x2 = this._updateMatrix2x2ForEffect;\n this.updateFloat = this._updateFloatForEffect;\n this.updateFloat2 = this._updateFloat2ForEffect;\n this.updateFloat3 = this._updateFloat3ForEffect;\n this.updateFloat4 = this._updateFloat4ForEffect;\n this.updateFloatArray = this._updateFloatArrayForEffect;\n this.updateArray = this._updateArrayForEffect;\n this.updateIntArray = this._updateIntArrayForEffect;\n this.updateUIntArray = this._updateUIntArrayForEffect;\n this.updateMatrix = this._updateMatrixForEffect;\n this.updateMatrices = this._updateMatricesForEffect;\n this.updateVector3 = this._updateVector3ForEffect;\n this.updateVector4 = this._updateVector4ForEffect;\n this.updateColor3 = this._updateColor3ForEffect;\n this.updateColor4 = this._updateColor4ForEffect;\n this.updateDirectColor4 = this._updateDirectColor4ForEffect;\n this.updateInt = this._updateIntForEffect;\n this.updateInt2 = this._updateInt2ForEffect;\n this.updateInt3 = this._updateInt3ForEffect;\n this.updateInt4 = this._updateInt4ForEffect;\n this.updateUInt = this._updateUIntForEffect;\n this.updateUInt2 = this._updateUInt2ForEffect;\n this.updateUInt3 = this._updateUInt3ForEffect;\n this.updateUInt4 = this._updateUInt4ForEffect;\n }\n else {\n this._engine._uniformBuffers.push(this);\n this.updateMatrix3x3 = this._updateMatrix3x3ForUniform;\n this.updateMatrix2x2 = this._updateMatrix2x2ForUniform;\n this.updateFloat = this._updateFloatForUniform;\n this.updateFloat2 = this._updateFloat2ForUniform;\n this.updateFloat3 = this._updateFloat3ForUniform;\n this.updateFloat4 = this._updateFloat4ForUniform;\n this.updateFloatArray = this._updateFloatArrayForUniform;\n this.updateArray = this._updateArrayForUniform;\n this.updateIntArray = this._updateIntArrayForUniform;\n this.updateUIntArray = this._updateUIntArrayForUniform;\n this.updateMatrix = this._updateMatrixForUniform;\n this.updateMatrices = this._updateMatricesForUniform;\n this.updateVector3 = this._updateVector3ForUniform;\n this.updateVector4 = this._updateVector4ForUniform;\n this.updateColor3 = this._updateColor3ForUniform;\n this.updateColor4 = this._updateColor4ForUniform;\n this.updateDirectColor4 = this._updateDirectColor4ForUniform;\n this.updateInt = this._updateIntForUniform;\n this.updateInt2 = this._updateInt2ForUniform;\n this.updateInt3 = this._updateInt3ForUniform;\n this.updateInt4 = this._updateInt4ForUniform;\n this.updateUInt = this._updateUIntForUniform;\n this.updateUInt2 = this._updateUInt2ForUniform;\n this.updateUInt3 = this._updateUInt3ForUniform;\n this.updateUInt4 = this._updateUInt4ForUniform;\n }\n }\n /**\n * Indicates if the buffer is using the WebGL2 UBO implementation,\n * or just falling back on setUniformXXX calls.\n */\n get useUbo() {\n return !this._noUBO;\n }\n /**\n * Indicates if the WebGL underlying uniform buffer is in sync\n * with the javascript cache data.\n */\n get isSync() {\n return !this._needSync;\n }\n /**\n * Indicates if the WebGL underlying uniform buffer is dynamic.\n * Also, a dynamic UniformBuffer will disable cache verification and always\n * update the underlying WebGL uniform buffer to the GPU.\n * @returns if Dynamic, otherwise false\n */\n isDynamic() {\n return this._dynamic !== undefined;\n }\n /**\n * The data cache on JS side.\n * @returns the underlying data as a float array\n */\n getData() {\n return this._bufferData;\n }\n /**\n * The underlying WebGL Uniform buffer.\n * @returns the webgl buffer\n */\n getBuffer() {\n return this._buffer;\n }\n /**\n * std140 layout specifies how to align data within an UBO structure.\n * See https://khronos.org/registry/OpenGL/specs/gl/glspec45.core.pdf#page=159\n * for specs.\n * @param size\n */\n _fillAlignment(size) {\n // This code has been simplified because we only use floats, vectors of 1, 2, 3, 4 components\n // and 4x4 matrices\n // TODO : change if other types are used\n let alignment;\n if (size <= 2) {\n alignment = size;\n }\n else {\n alignment = 4;\n }\n if (this._uniformLocationPointer % alignment !== 0) {\n const oldPointer = this._uniformLocationPointer;\n this._uniformLocationPointer += alignment - (this._uniformLocationPointer % alignment);\n const diff = this._uniformLocationPointer - oldPointer;\n for (let i = 0; i < diff; i++) {\n this._data.push(0);\n }\n }\n }\n /**\n * Adds an uniform in the buffer.\n * Warning : the subsequents calls of this function must be in the same order as declared in the shader\n * for the layout to be correct ! The addUniform function only handles types like float, vec2, vec3, vec4, mat4,\n * meaning size=1,2,3,4 or 16. It does not handle struct types.\n * @param name Name of the uniform, as used in the uniform block in the shader.\n * @param size Data size, or data directly.\n * @param arraySize The number of elements in the array, 0 if not an array.\n */\n addUniform(name, size, arraySize = 0) {\n if (this._noUBO) {\n return;\n }\n if (this._uniformLocations[name] !== undefined) {\n // Already existing uniform\n return;\n }\n // This function must be called in the order of the shader layout !\n // size can be the size of the uniform, or data directly\n let data;\n // std140 FTW...\n if (arraySize > 0) {\n if (size instanceof Array) {\n throw \"addUniform should not be use with Array in UBO: \" + name;\n }\n this._fillAlignment(4);\n this._uniformArraySizes[name] = { strideSize: size, arraySize };\n if (size == 16) {\n size = size * arraySize;\n }\n else {\n const perElementPadding = 4 - size;\n const totalPadding = perElementPadding * arraySize;\n size = size * arraySize + totalPadding;\n }\n data = [];\n // Fill with zeros\n for (let i = 0; i < size; i++) {\n data.push(0);\n }\n }\n else {\n if (size instanceof Array) {\n data = size;\n size = data.length;\n }\n else {\n size = size;\n data = [];\n // Fill with zeros\n for (let i = 0; i < size; i++) {\n data.push(0);\n }\n }\n this._fillAlignment(size);\n }\n this._uniformSizes[name] = size;\n this._uniformLocations[name] = this._uniformLocationPointer;\n this._uniformLocationPointer += size;\n for (let i = 0; i < size; i++) {\n this._data.push(data[i]);\n }\n this._needSync = true;\n }\n /**\n * Adds a Matrix 4x4 to the uniform buffer.\n * @param name Name of the uniform, as used in the uniform block in the shader.\n * @param mat A 4x4 matrix.\n */\n addMatrix(name, mat) {\n this.addUniform(name, Array.prototype.slice.call(mat.toArray()));\n }\n /**\n * Adds a vec2 to the uniform buffer.\n * @param name Name of the uniform, as used in the uniform block in the shader.\n * @param x Define the x component value of the vec2\n * @param y Define the y component value of the vec2\n */\n addFloat2(name, x, y) {\n const temp = [x, y];\n this.addUniform(name, temp);\n }\n /**\n * Adds a vec3 to the uniform buffer.\n * @param name Name of the uniform, as used in the uniform block in the shader.\n * @param x Define the x component value of the vec3\n * @param y Define the y component value of the vec3\n * @param z Define the z component value of the vec3\n */\n addFloat3(name, x, y, z) {\n const temp = [x, y, z];\n this.addUniform(name, temp);\n }\n /**\n * Adds a vec3 to the uniform buffer.\n * @param name Name of the uniform, as used in the uniform block in the shader.\n * @param color Define the vec3 from a Color\n */\n addColor3(name, color) {\n const temp = [color.r, color.g, color.b];\n this.addUniform(name, temp);\n }\n /**\n * Adds a vec4 to the uniform buffer.\n * @param name Name of the uniform, as used in the uniform block in the shader.\n * @param color Define the rgb components from a Color\n * @param alpha Define the a component of the vec4\n */\n addColor4(name, color, alpha) {\n const temp = [color.r, color.g, color.b, alpha];\n this.addUniform(name, temp);\n }\n /**\n * Adds a vec3 to the uniform buffer.\n * @param name Name of the uniform, as used in the uniform block in the shader.\n * @param vector Define the vec3 components from a Vector\n */\n addVector3(name, vector) {\n const temp = [vector.x, vector.y, vector.z];\n this.addUniform(name, temp);\n }\n /**\n * Adds a Matrix 3x3 to the uniform buffer.\n * @param name Name of the uniform, as used in the uniform block in the shader.\n */\n addMatrix3x3(name) {\n this.addUniform(name, 12);\n }\n /**\n * Adds a Matrix 2x2 to the uniform buffer.\n * @param name Name of the uniform, as used in the uniform block in the shader.\n */\n addMatrix2x2(name) {\n this.addUniform(name, 8);\n }\n /**\n * Effectively creates the WebGL Uniform Buffer, once layout is completed with `addUniform`.\n */\n create() {\n if (this._noUBO) {\n return;\n }\n if (this._buffer) {\n return; // nothing to do\n }\n // See spec, alignment must be filled as a vec4\n this._fillAlignment(4);\n this._bufferData = new Float32Array(this._data);\n this._rebuild();\n this._needSync = true;\n }\n _getNames() {\n const names = [];\n for (const name in this._uniformLocations) {\n names.push(name);\n }\n return names.join(\",\");\n }\n /** @internal */\n _rebuild() {\n if (this._noUBO || !this._bufferData) {\n return;\n }\n if (this._dynamic) {\n this._buffer = this._engine.createDynamicUniformBuffer(this._bufferData, this._name + \"_UniformList:\" + this._getNames());\n }\n else {\n this._buffer = this._engine.createUniformBuffer(this._bufferData, this._name + \"_UniformList:\" + this._getNames());\n }\n if (this._engine._features.trackUbosInFrame) {\n this._buffers.push([this._buffer, this._engine._features.checkUbosContentBeforeUpload ? this._bufferData.slice() : undefined]);\n this._bufferIndex = this._buffers.length - 1;\n this._createBufferOnWrite = false;\n }\n }\n /** @internal */\n get _numBuffers() {\n return this._buffers.length;\n }\n /** @internal */\n get _indexBuffer() {\n return this._bufferIndex;\n }\n /** Gets the name of this buffer */\n get name() {\n return this._name;\n }\n /** Gets the current effect */\n get currentEffect() {\n return this._currentEffect;\n }\n _buffersEqual(buf1, buf2) {\n for (let i = 0; i < buf1.length; ++i) {\n if (buf1[i] !== buf2[i]) {\n return false;\n }\n }\n return true;\n }\n _copyBuffer(src, dst) {\n for (let i = 0; i < src.length; ++i) {\n dst[i] = src[i];\n }\n }\n /**\n * Updates the WebGL Uniform Buffer on the GPU.\n * If the `dynamic` flag is set to true, no cache comparison is done.\n * Otherwise, the buffer will be updated only if the cache differs.\n */\n update() {\n if (this._noUBO) {\n return;\n }\n this.bindUniformBuffer();\n if (!this._buffer) {\n this.create();\n return;\n }\n if (!this._dynamic && !this._needSync) {\n this._createBufferOnWrite = this._engine._features.trackUbosInFrame;\n return;\n }\n if (this._buffers && this._buffers.length > 1 && this._buffers[this._bufferIndex][1]) {\n if (this._buffersEqual(this._bufferData, this._buffers[this._bufferIndex][1])) {\n this._needSync = false;\n this._createBufferOnWrite = this._engine._features.trackUbosInFrame;\n return;\n }\n else {\n this._copyBuffer(this._bufferData, this._buffers[this._bufferIndex][1]);\n }\n }\n this._engine.updateUniformBuffer(this._buffer, this._bufferData);\n if (this._engine._features._collectUbosUpdatedInFrame) {\n if (!UniformBuffer._UpdatedUbosInFrame[this._name]) {\n UniformBuffer._UpdatedUbosInFrame[this._name] = 0;\n }\n UniformBuffer._UpdatedUbosInFrame[this._name]++;\n }\n this._needSync = false;\n this._createBufferOnWrite = this._engine._features.trackUbosInFrame;\n }\n _createNewBuffer() {\n if (this._bufferIndex + 1 < this._buffers.length) {\n this._bufferIndex++;\n this._buffer = this._buffers[this._bufferIndex][0];\n this._createBufferOnWrite = false;\n this._needSync = true;\n }\n else {\n this._rebuild();\n }\n }\n _checkNewFrame() {\n if (this._engine._features.trackUbosInFrame && this._currentFrameId !== this._engine.frameId) {\n this._currentFrameId = this._engine.frameId;\n this._createBufferOnWrite = false;\n if (this._buffers && this._buffers.length > 0) {\n this._needSync = this._bufferIndex !== 0;\n this._bufferIndex = 0;\n this._buffer = this._buffers[this._bufferIndex][0];\n }\n else {\n this._bufferIndex = -1;\n }\n }\n }\n /**\n * Updates the value of an uniform. The `update` method must be called afterwards to make it effective in the GPU.\n * @param uniformName Define the name of the uniform, as used in the uniform block in the shader.\n * @param data Define the flattened data\n * @param size Define the size of the data.\n */\n updateUniform(uniformName, data, size) {\n this._checkNewFrame();\n let location = this._uniformLocations[uniformName];\n if (location === undefined) {\n if (this._buffer) {\n // Cannot add an uniform if the buffer is already created\n Logger.Error(\"Cannot add an uniform after UBO has been created.\");\n return;\n }\n this.addUniform(uniformName, size);\n location = this._uniformLocations[uniformName];\n }\n if (!this._buffer) {\n this.create();\n }\n if (!this._dynamic) {\n // Cache for static uniform buffers\n let changed = false;\n for (let i = 0; i < size; i++) {\n // We are checking the matrix cache before calling updateUniform so we do not need to check it here\n // Hence the test for size === 16 to simply commit the matrix values\n if ((size === 16 && !this._engine._features.uniformBufferHardCheckMatrix) || this._bufferData[location + i] !== Math.fround(data[i])) {\n changed = true;\n if (this._createBufferOnWrite) {\n this._createNewBuffer();\n }\n this._bufferData[location + i] = data[i];\n }\n }\n this._needSync = this._needSync || changed;\n }\n else {\n // No cache for dynamic\n for (let i = 0; i < size; i++) {\n this._bufferData[location + i] = data[i];\n }\n }\n }\n /**\n * Updates the value of an uniform. The `update` method must be called afterwards to make it effective in the GPU.\n * @param uniformName Define the name of the uniform, as used in the uniform block in the shader.\n * @param data Define the flattened data\n * @param size Define the size of the data.\n */\n updateUniformArray(uniformName, data, size) {\n this._checkNewFrame();\n const location = this._uniformLocations[uniformName];\n if (location === undefined) {\n Logger.Error(\"Cannot add an uniform Array dynamically. Please, add it using addUniform and make sure that uniform buffers are supported by the current engine.\");\n return;\n }\n if (!this._buffer) {\n this.create();\n }\n const arraySizes = this._uniformArraySizes[uniformName];\n if (!this._dynamic) {\n // Cache for static uniform buffers\n let changed = false;\n let countToFour = 0;\n let baseStride = 0;\n for (let i = 0; i < size; i++) {\n if (this._bufferData[location + baseStride * 4 + countToFour] !== Tools.FloatRound(data[i])) {\n changed = true;\n if (this._createBufferOnWrite) {\n this._createNewBuffer();\n }\n this._bufferData[location + baseStride * 4 + countToFour] = data[i];\n }\n countToFour++;\n if (countToFour === arraySizes.strideSize) {\n for (; countToFour < 4; countToFour++) {\n this._bufferData[location + baseStride * 4 + countToFour] = 0;\n }\n countToFour = 0;\n baseStride++;\n }\n }\n this._needSync = this._needSync || changed;\n }\n else {\n // No cache for dynamic\n for (let i = 0; i < size; i++) {\n this._bufferData[location + i] = data[i];\n }\n }\n }\n _cacheMatrix(name, matrix) {\n this._checkNewFrame();\n const cache = this._valueCache[name];\n const flag = matrix.updateFlag;\n if (cache !== undefined && cache === flag) {\n return false;\n }\n this._valueCache[name] = flag;\n return true;\n }\n // Update methods\n _updateMatrix3x3ForUniform(name, matrix) {\n // To match std140, matrix must be realigned\n for (let i = 0; i < 3; i++) {\n UniformBuffer._TempBuffer[i * 4] = matrix[i * 3];\n UniformBuffer._TempBuffer[i * 4 + 1] = matrix[i * 3 + 1];\n UniformBuffer._TempBuffer[i * 4 + 2] = matrix[i * 3 + 2];\n UniformBuffer._TempBuffer[i * 4 + 3] = 0.0;\n }\n this.updateUniform(name, UniformBuffer._TempBuffer, 12);\n }\n _updateMatrix3x3ForEffect(name, matrix) {\n this._currentEffect.setMatrix3x3(name, matrix);\n }\n _updateMatrix2x2ForEffect(name, matrix) {\n this._currentEffect.setMatrix2x2(name, matrix);\n }\n _updateMatrix2x2ForUniform(name, matrix) {\n // To match std140, matrix must be realigned\n for (let i = 0; i < 2; i++) {\n UniformBuffer._TempBuffer[i * 4] = matrix[i * 2];\n UniformBuffer._TempBuffer[i * 4 + 1] = matrix[i * 2 + 1];\n UniformBuffer._TempBuffer[i * 4 + 2] = 0.0;\n UniformBuffer._TempBuffer[i * 4 + 3] = 0.0;\n }\n this.updateUniform(name, UniformBuffer._TempBuffer, 8);\n }\n _updateFloatForEffect(name, x) {\n this._currentEffect.setFloat(name, x);\n }\n _updateFloatForUniform(name, x) {\n UniformBuffer._TempBuffer[0] = x;\n this.updateUniform(name, UniformBuffer._TempBuffer, 1);\n }\n _updateFloat2ForEffect(name, x, y, suffix = \"\") {\n this._currentEffect.setFloat2(name + suffix, x, y);\n }\n _updateFloat2ForUniform(name, x, y) {\n UniformBuffer._TempBuffer[0] = x;\n UniformBuffer._TempBuffer[1] = y;\n this.updateUniform(name, UniformBuffer._TempBuffer, 2);\n }\n _updateFloat3ForEffect(name, x, y, z, suffix = \"\") {\n this._currentEffect.setFloat3(name + suffix, x, y, z);\n }\n _updateFloat3ForUniform(name, x, y, z) {\n UniformBuffer._TempBuffer[0] = x;\n UniformBuffer._TempBuffer[1] = y;\n UniformBuffer._TempBuffer[2] = z;\n this.updateUniform(name, UniformBuffer._TempBuffer, 3);\n }\n _updateFloat4ForEffect(name, x, y, z, w, suffix = \"\") {\n this._currentEffect.setFloat4(name + suffix, x, y, z, w);\n }\n _updateFloat4ForUniform(name, x, y, z, w) {\n UniformBuffer._TempBuffer[0] = x;\n UniformBuffer._TempBuffer[1] = y;\n UniformBuffer._TempBuffer[2] = z;\n UniformBuffer._TempBuffer[3] = w;\n this.updateUniform(name, UniformBuffer._TempBuffer, 4);\n }\n _updateFloatArrayForEffect(name, array) {\n this._currentEffect.setFloatArray(name, array);\n }\n _updateFloatArrayForUniform(name, array) {\n this.updateUniformArray(name, array, array.length);\n }\n _updateArrayForEffect(name, array) {\n this._currentEffect.setArray(name, array);\n }\n _updateArrayForUniform(name, array) {\n this.updateUniformArray(name, array, array.length);\n }\n _updateIntArrayForEffect(name, array) {\n this._currentEffect.setIntArray(name, array);\n }\n _updateIntArrayForUniform(name, array) {\n UniformBuffer._TempBufferInt32View.set(array);\n this.updateUniformArray(name, UniformBuffer._TempBuffer, array.length);\n }\n _updateUIntArrayForEffect(name, array) {\n this._currentEffect.setUIntArray(name, array);\n }\n _updateUIntArrayForUniform(name, array) {\n UniformBuffer._TempBufferUInt32View.set(array);\n this.updateUniformArray(name, UniformBuffer._TempBuffer, array.length);\n }\n _updateMatrixForEffect(name, mat) {\n this._currentEffect.setMatrix(name, mat);\n }\n _updateMatrixForUniform(name, mat) {\n if (this._cacheMatrix(name, mat)) {\n this.updateUniform(name, mat.toArray(), 16);\n }\n }\n _updateMatricesForEffect(name, mat) {\n this._currentEffect.setMatrices(name, mat);\n }\n _updateMatricesForUniform(name, mat) {\n this.updateUniform(name, mat, mat.length);\n }\n _updateVector3ForEffect(name, vector) {\n this._currentEffect.setVector3(name, vector);\n }\n _updateVector3ForUniform(name, vector) {\n UniformBuffer._TempBuffer[0] = vector.x;\n UniformBuffer._TempBuffer[1] = vector.y;\n UniformBuffer._TempBuffer[2] = vector.z;\n this.updateUniform(name, UniformBuffer._TempBuffer, 3);\n }\n _updateVector4ForEffect(name, vector) {\n this._currentEffect.setVector4(name, vector);\n }\n _updateVector4ForUniform(name, vector) {\n UniformBuffer._TempBuffer[0] = vector.x;\n UniformBuffer._TempBuffer[1] = vector.y;\n UniformBuffer._TempBuffer[2] = vector.z;\n UniformBuffer._TempBuffer[3] = vector.w;\n this.updateUniform(name, UniformBuffer._TempBuffer, 4);\n }\n _updateColor3ForEffect(name, color, suffix = \"\") {\n this._currentEffect.setColor3(name + suffix, color);\n }\n _updateColor3ForUniform(name, color) {\n UniformBuffer._TempBuffer[0] = color.r;\n UniformBuffer._TempBuffer[1] = color.g;\n UniformBuffer._TempBuffer[2] = color.b;\n this.updateUniform(name, UniformBuffer._TempBuffer, 3);\n }\n _updateColor4ForEffect(name, color, alpha, suffix = \"\") {\n this._currentEffect.setColor4(name + suffix, color, alpha);\n }\n _updateDirectColor4ForEffect(name, color, suffix = \"\") {\n this._currentEffect.setDirectColor4(name + suffix, color);\n }\n _updateColor4ForUniform(name, color, alpha) {\n UniformBuffer._TempBuffer[0] = color.r;\n UniformBuffer._TempBuffer[1] = color.g;\n UniformBuffer._TempBuffer[2] = color.b;\n UniformBuffer._TempBuffer[3] = alpha;\n this.updateUniform(name, UniformBuffer._TempBuffer, 4);\n }\n _updateDirectColor4ForUniform(name, color) {\n UniformBuffer._TempBuffer[0] = color.r;\n UniformBuffer._TempBuffer[1] = color.g;\n UniformBuffer._TempBuffer[2] = color.b;\n UniformBuffer._TempBuffer[3] = color.a;\n this.updateUniform(name, UniformBuffer._TempBuffer, 4);\n }\n _updateIntForEffect(name, x, suffix = \"\") {\n this._currentEffect.setInt(name + suffix, x);\n }\n _updateIntForUniform(name, x) {\n UniformBuffer._TempBufferInt32View[0] = x;\n this.updateUniform(name, UniformBuffer._TempBuffer, 1);\n }\n _updateInt2ForEffect(name, x, y, suffix = \"\") {\n this._currentEffect.setInt2(name + suffix, x, y);\n }\n _updateInt2ForUniform(name, x, y) {\n UniformBuffer._TempBufferInt32View[0] = x;\n UniformBuffer._TempBufferInt32View[1] = y;\n this.updateUniform(name, UniformBuffer._TempBuffer, 2);\n }\n _updateInt3ForEffect(name, x, y, z, suffix = \"\") {\n this._currentEffect.setInt3(name + suffix, x, y, z);\n }\n _updateInt3ForUniform(name, x, y, z) {\n UniformBuffer._TempBufferInt32View[0] = x;\n UniformBuffer._TempBufferInt32View[1] = y;\n UniformBuffer._TempBufferInt32View[2] = z;\n this.updateUniform(name, UniformBuffer._TempBuffer, 3);\n }\n _updateInt4ForEffect(name, x, y, z, w, suffix = \"\") {\n this._currentEffect.setInt4(name + suffix, x, y, z, w);\n }\n _updateInt4ForUniform(name, x, y, z, w) {\n UniformBuffer._TempBufferInt32View[0] = x;\n UniformBuffer._TempBufferInt32View[1] = y;\n UniformBuffer._TempBufferInt32View[2] = z;\n UniformBuffer._TempBufferInt32View[3] = w;\n this.updateUniform(name, UniformBuffer._TempBuffer, 4);\n }\n _updateUIntForEffect(name, x, suffix = \"\") {\n this._currentEffect.setUInt(name + suffix, x);\n }\n _updateUIntForUniform(name, x) {\n UniformBuffer._TempBufferUInt32View[0] = x;\n this.updateUniform(name, UniformBuffer._TempBuffer, 1);\n }\n _updateUInt2ForEffect(name, x, y, suffix = \"\") {\n this._currentEffect.setUInt2(name + suffix, x, y);\n }\n _updateUInt2ForUniform(name, x, y) {\n UniformBuffer._TempBufferUInt32View[0] = x;\n UniformBuffer._TempBufferUInt32View[1] = y;\n this.updateUniform(name, UniformBuffer._TempBuffer, 2);\n }\n _updateUInt3ForEffect(name, x, y, z, suffix = \"\") {\n this._currentEffect.setUInt3(name + suffix, x, y, z);\n }\n _updateUInt3ForUniform(name, x, y, z) {\n UniformBuffer._TempBufferUInt32View[0] = x;\n UniformBuffer._TempBufferUInt32View[1] = y;\n UniformBuffer._TempBufferUInt32View[2] = z;\n this.updateUniform(name, UniformBuffer._TempBuffer, 3);\n }\n _updateUInt4ForEffect(name, x, y, z, w, suffix = \"\") {\n this._currentEffect.setUInt4(name + suffix, x, y, z, w);\n }\n _updateUInt4ForUniform(name, x, y, z, w) {\n UniformBuffer._TempBufferUInt32View[0] = x;\n UniformBuffer._TempBufferUInt32View[1] = y;\n UniformBuffer._TempBufferUInt32View[2] = z;\n UniformBuffer._TempBufferUInt32View[3] = w;\n this.updateUniform(name, UniformBuffer._TempBuffer, 4);\n }\n /**\n * Sets a sampler uniform on the effect.\n * @param name Define the name of the sampler.\n * @param texture Define the texture to set in the sampler\n */\n setTexture(name, texture) {\n this._currentEffect.setTexture(name, texture);\n }\n /**\n * Sets a sampler uniform on the effect.\n * @param name Define the name of the sampler.\n * @param texture Define the (internal) texture to set in the sampler\n */\n bindTexture(name, texture) {\n this._currentEffect._bindTexture(name, texture);\n }\n /**\n * Directly updates the value of the uniform in the cache AND on the GPU.\n * @param uniformName Define the name of the uniform, as used in the uniform block in the shader.\n * @param data Define the flattened data\n */\n updateUniformDirectly(uniformName, data) {\n this.updateUniform(uniformName, data, data.length);\n this.update();\n }\n /**\n * Associates an effect to this uniform buffer\n * @param effect Define the effect to associate the buffer to\n * @param name Name of the uniform block in the shader.\n */\n bindToEffect(effect, name) {\n this._currentEffect = effect;\n this._currentEffectName = name;\n }\n /**\n * Binds the current (GPU) buffer to the effect\n */\n bindUniformBuffer() {\n if (!this._noUBO && this._buffer && this._currentEffect) {\n this._currentEffect.bindUniformBuffer(this._buffer, this._currentEffectName);\n }\n }\n /**\n * Dissociates the current effect from this uniform buffer\n */\n unbindEffect() {\n this._currentEffect = undefined;\n this._currentEffectName = undefined;\n }\n /**\n * Sets the current state of the class (_bufferIndex, _buffer) to point to the data buffer passed in parameter if this buffer is one of the buffers handled by the class (meaning if it can be found in the _buffers array)\n * This method is meant to be able to update a buffer at any time: just call setDataBuffer to set the class in the right state, call some updateXXX methods and then call udpate() => that will update the GPU buffer on the graphic card\n * @param dataBuffer buffer to look for\n * @returns true if the buffer has been found and the class internal state points to it, else false\n */\n setDataBuffer(dataBuffer) {\n if (!this._buffers) {\n return this._buffer === dataBuffer;\n }\n for (let b = 0; b < this._buffers.length; ++b) {\n const buffer = this._buffers[b];\n if (buffer[0] === dataBuffer) {\n this._bufferIndex = b;\n this._buffer = dataBuffer;\n this._createBufferOnWrite = false;\n this._currentEffect = undefined;\n return true;\n }\n }\n return false;\n }\n /**\n * Disposes the uniform buffer.\n */\n dispose() {\n if (this._noUBO) {\n return;\n }\n const uniformBuffers = this._engine._uniformBuffers;\n const index = uniformBuffers.indexOf(this);\n if (index !== -1) {\n uniformBuffers[index] = uniformBuffers[uniformBuffers.length - 1];\n uniformBuffers.pop();\n }\n if (this._engine._features.trackUbosInFrame && this._buffers) {\n for (let i = 0; i < this._buffers.length; ++i) {\n const buffer = this._buffers[i][0];\n this._engine._releaseBuffer(buffer);\n }\n }\n else if (this._buffer && this._engine._releaseBuffer(this._buffer)) {\n this._buffer = null;\n }\n }\n}\n/** @internal */\nUniformBuffer._UpdatedUbosInFrame = {};\n// Pool for avoiding memory leaks\nUniformBuffer._MAX_UNIFORM_SIZE = 256;\nUniformBuffer._TempBuffer = new Float32Array(UniformBuffer._MAX_UNIFORM_SIZE);\nUniformBuffer._TempBufferInt32View = new Int32Array(UniformBuffer._TempBuffer.buffer);\nUniformBuffer._TempBufferUInt32View = new Uint32Array(UniformBuffer._TempBuffer.buffer);\n//# sourceMappingURL=uniformBuffer.js.map","/** Defines the cross module constantsused by lights to avoid circular dependencies */\nexport class LightConstants {\n /**\n * Sort function to order lights for rendering.\n * @param a First Light object to compare to second.\n * @param b Second Light object to compare first.\n * @returns -1 to reduce's a's index relative to be, 0 for no change, 1 to increase a's index relative to b.\n */\n static CompareLightsPriority(a, b) {\n //shadow-casting lights have priority over non-shadow-casting lights\n //the renderPriority is a secondary sort criterion\n if (a.shadowEnabled !== b.shadowEnabled) {\n return (b.shadowEnabled ? 1 : 0) - (a.shadowEnabled ? 1 : 0);\n }\n return b.renderPriority - a.renderPriority;\n }\n}\n/**\n * Falloff Default: light is falling off following the material specification:\n * standard material is using standard falloff whereas pbr material can request special falloff per materials.\n */\nLightConstants.FALLOFF_DEFAULT = 0;\n/**\n * Falloff Physical: light is falling off following the inverse squared distance law.\n */\nLightConstants.FALLOFF_PHYSICAL = 1;\n/**\n * Falloff gltf: light is falling off as described in the gltf moving to PBR document\n * to enhance interoperability with other engines.\n */\nLightConstants.FALLOFF_GLTF = 2;\n/**\n * Falloff Standard: light is falling off like in the standard material\n * to enhance interoperability with other materials.\n */\nLightConstants.FALLOFF_STANDARD = 3;\n//lightmapMode Consts\n/**\n * If every light affecting the material is in this lightmapMode,\n * material.lightmapTexture adds or multiplies\n * (depends on material.useLightmapAsShadowmap)\n * after every other light calculations.\n */\nLightConstants.LIGHTMAP_DEFAULT = 0;\n/**\n * material.lightmapTexture as only diffuse lighting from this light\n * adds only specular lighting from this light\n * adds dynamic shadows\n */\nLightConstants.LIGHTMAP_SPECULAR = 1;\n/**\n * material.lightmapTexture as only lighting\n * no light calculation from this light\n * only adds dynamic shadows from this light\n */\nLightConstants.LIGHTMAP_SHADOWSONLY = 2;\n// Intensity Mode Consts\n/**\n * Each light type uses the default quantity according to its type:\n * point/spot lights use luminous intensity\n * directional lights use illuminance\n */\nLightConstants.INTENSITYMODE_AUTOMATIC = 0;\n/**\n * lumen (lm)\n */\nLightConstants.INTENSITYMODE_LUMINOUSPOWER = 1;\n/**\n * candela (lm/sr)\n */\nLightConstants.INTENSITYMODE_LUMINOUSINTENSITY = 2;\n/**\n * lux (lm/m^2)\n */\nLightConstants.INTENSITYMODE_ILLUMINANCE = 3;\n/**\n * nit (cd/m^2)\n */\nLightConstants.INTENSITYMODE_LUMINANCE = 4;\n// Light types ids const.\n/**\n * Light type const id of the point light.\n */\nLightConstants.LIGHTTYPEID_POINTLIGHT = 0;\n/**\n * Light type const id of the directional light.\n */\nLightConstants.LIGHTTYPEID_DIRECTIONALLIGHT = 1;\n/**\n * Light type const id of the spot light.\n */\nLightConstants.LIGHTTYPEID_SPOTLIGHT = 2;\n/**\n * Light type const id of the hemispheric light.\n */\nLightConstants.LIGHTTYPEID_HEMISPHERICLIGHT = 3;\n//# sourceMappingURL=lightConstants.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serialize, SerializationHelper, serializeAsColor3, expandToProperty } from \"../Misc/decorators.js\";\nimport { Vector3 } from \"../Maths/math.vector.js\";\nimport { Color3, TmpColors } from \"../Maths/math.color.js\";\nimport { Node } from \"../node.js\";\nimport { UniformBuffer } from \"../Materials/uniformBuffer.js\";\nimport { GetClass } from \"../Misc/typeStore.js\";\nimport { LightConstants } from \"./lightConstants.js\";\n/**\n * Base class of all the lights in Babylon. It groups all the generic information about lights.\n * Lights are used, as you would expect, to affect how meshes are seen, in terms of both illumination and colour.\n * All meshes allow light to pass through them unless shadow generation is activated. The default number of lights allowed is four but this can be increased.\n */\nexport class Light extends Node {\n /**\n * Defines how far from the source the light is impacting in scene units.\n * Note: Unused in PBR material as the distance light falloff is defined following the inverse squared falloff.\n */\n get range() {\n return this._range;\n }\n /**\n * Defines how far from the source the light is impacting in scene units.\n * Note: Unused in PBR material as the distance light falloff is defined following the inverse squared falloff.\n */\n set range(value) {\n this._range = value;\n this._inverseSquaredRange = 1.0 / (this.range * this.range);\n }\n /**\n * Gets the photometric scale used to interpret the intensity.\n * This is only relevant with PBR Materials where the light intensity can be defined in a physical way.\n */\n get intensityMode() {\n return this._intensityMode;\n }\n /**\n * Sets the photometric scale used to interpret the intensity.\n * This is only relevant with PBR Materials where the light intensity can be defined in a physical way.\n */\n set intensityMode(value) {\n this._intensityMode = value;\n this._computePhotometricScale();\n }\n /**\n * Gets the light radius used by PBR Materials to simulate soft area lights.\n */\n get radius() {\n return this._radius;\n }\n /**\n * sets the light radius used by PBR Materials to simulate soft area lights.\n */\n set radius(value) {\n this._radius = value;\n this._computePhotometricScale();\n }\n /**\n * Gets whether or not the shadows are enabled for this light. This can help turning off/on shadow without detaching\n * the current shadow generator.\n */\n get shadowEnabled() {\n return this._shadowEnabled;\n }\n /**\n * Sets whether or not the shadows are enabled for this light. This can help turning off/on shadow without detaching\n * the current shadow generator.\n */\n set shadowEnabled(value) {\n if (this._shadowEnabled === value) {\n return;\n }\n this._shadowEnabled = value;\n this._markMeshesAsLightDirty();\n }\n /**\n * Gets the only meshes impacted by this light.\n */\n get includedOnlyMeshes() {\n return this._includedOnlyMeshes;\n }\n /**\n * Sets the only meshes impacted by this light.\n */\n set includedOnlyMeshes(value) {\n this._includedOnlyMeshes = value;\n this._hookArrayForIncludedOnly(value);\n }\n /**\n * Gets the meshes not impacted by this light.\n */\n get excludedMeshes() {\n return this._excludedMeshes;\n }\n /**\n * Sets the meshes not impacted by this light.\n */\n set excludedMeshes(value) {\n this._excludedMeshes = value;\n this._hookArrayForExcluded(value);\n }\n /**\n * Gets the layer id use to find what meshes are not impacted by the light.\n * Inactive if 0\n */\n get excludeWithLayerMask() {\n return this._excludeWithLayerMask;\n }\n /**\n * Sets the layer id use to find what meshes are not impacted by the light.\n * Inactive if 0\n */\n set excludeWithLayerMask(value) {\n this._excludeWithLayerMask = value;\n this._resyncMeshes();\n }\n /**\n * Gets the layer id use to find what meshes are impacted by the light.\n * Inactive if 0\n */\n get includeOnlyWithLayerMask() {\n return this._includeOnlyWithLayerMask;\n }\n /**\n * Sets the layer id use to find what meshes are impacted by the light.\n * Inactive if 0\n */\n set includeOnlyWithLayerMask(value) {\n this._includeOnlyWithLayerMask = value;\n this._resyncMeshes();\n }\n /**\n * Gets the lightmap mode of this light (should be one of the constants defined by Light.LIGHTMAP_x)\n */\n get lightmapMode() {\n return this._lightmapMode;\n }\n /**\n * Sets the lightmap mode of this light (should be one of the constants defined by Light.LIGHTMAP_x)\n */\n set lightmapMode(value) {\n if (this._lightmapMode === value) {\n return;\n }\n this._lightmapMode = value;\n this._markMeshesAsLightDirty();\n }\n /**\n * Creates a Light object in the scene.\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n * @param name The friendly name of the light\n * @param scene The scene the light belongs too\n */\n constructor(name, scene) {\n super(name, scene);\n /**\n * Diffuse gives the basic color to an object.\n */\n this.diffuse = new Color3(1.0, 1.0, 1.0);\n /**\n * Specular produces a highlight color on an object.\n * Note: This is not affecting PBR materials.\n */\n this.specular = new Color3(1.0, 1.0, 1.0);\n /**\n * Defines the falloff type for this light. This lets overriding how punctual light are\n * falling off base on range or angle.\n * This can be set to any values in Light.FALLOFF_x.\n *\n * Note: This is only useful for PBR Materials at the moment. This could be extended if required to\n * other types of materials.\n */\n this.falloffType = Light.FALLOFF_DEFAULT;\n /**\n * Strength of the light.\n * Note: By default it is define in the framework own unit.\n * Note: In PBR materials the intensityMode can be use to chose what unit the intensity is defined in.\n */\n this.intensity = 1.0;\n this._range = Number.MAX_VALUE;\n this._inverseSquaredRange = 0;\n /**\n * Cached photometric scale default to 1.0 as the automatic intensity mode defaults to 1.0 for every type\n * of light.\n */\n this._photometricScale = 1.0;\n this._intensityMode = Light.INTENSITYMODE_AUTOMATIC;\n this._radius = 0.00001;\n /**\n * Defines the rendering priority of the lights. It can help in case of fallback or number of lights\n * exceeding the number allowed of the materials.\n */\n this.renderPriority = 0;\n this._shadowEnabled = true;\n this._excludeWithLayerMask = 0;\n this._includeOnlyWithLayerMask = 0;\n this._lightmapMode = 0;\n /**\n * Shadow generators associated to the light.\n * @internal Internal use only.\n */\n this._shadowGenerators = null;\n /**\n * @internal Internal use only.\n */\n this._excludedMeshesIds = new Array();\n /**\n * @internal Internal use only.\n */\n this._includedOnlyMeshesIds = new Array();\n /** @internal */\n this._isLight = true;\n this.getScene().addLight(this);\n this._uniformBuffer = new UniformBuffer(this.getScene().getEngine(), undefined, undefined, name);\n this._buildUniformLayout();\n this.includedOnlyMeshes = [];\n this.excludedMeshes = [];\n this._resyncMeshes();\n }\n /**\n * Sets the passed Effect \"effect\" with the Light textures.\n * @param effect The effect to update\n * @param lightIndex The index of the light in the effect to update\n * @returns The light\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n transferTexturesToEffect(effect, lightIndex) {\n // Do nothing by default.\n return this;\n }\n /**\n * Binds the lights information from the scene to the effect for the given mesh.\n * @param lightIndex Light index\n * @param scene The scene where the light belongs to\n * @param effect The effect we are binding the data to\n * @param useSpecular Defines if specular is supported\n * @param receiveShadows Defines if the effect (mesh) we bind the light for receives shadows\n */\n _bindLight(lightIndex, scene, effect, useSpecular, receiveShadows = true) {\n var _a;\n const iAsString = lightIndex.toString();\n let needUpdate = false;\n this._uniformBuffer.bindToEffect(effect, \"Light\" + iAsString);\n if (this._renderId !== scene.getRenderId() || this._lastUseSpecular !== useSpecular || !this._uniformBuffer.useUbo) {\n this._renderId = scene.getRenderId();\n this._lastUseSpecular = useSpecular;\n const scaledIntensity = this.getScaledIntensity();\n this.transferToEffect(effect, iAsString);\n this.diffuse.scaleToRef(scaledIntensity, TmpColors.Color3[0]);\n this._uniformBuffer.updateColor4(\"vLightDiffuse\", TmpColors.Color3[0], this.range, iAsString);\n if (useSpecular) {\n this.specular.scaleToRef(scaledIntensity, TmpColors.Color3[1]);\n this._uniformBuffer.updateColor4(\"vLightSpecular\", TmpColors.Color3[1], this.radius, iAsString);\n }\n needUpdate = true;\n }\n // Textures might still need to be rebound.\n this.transferTexturesToEffect(effect, iAsString);\n // Shadows\n if (scene.shadowsEnabled && this.shadowEnabled && receiveShadows) {\n const shadowGenerator = (_a = this.getShadowGenerator(scene.activeCamera)) !== null && _a !== void 0 ? _a : this.getShadowGenerator();\n if (shadowGenerator) {\n shadowGenerator.bindShadowLight(iAsString, effect);\n needUpdate = true;\n }\n }\n if (needUpdate) {\n this._uniformBuffer.update();\n }\n else {\n this._uniformBuffer.bindUniformBuffer();\n }\n }\n /**\n * Returns the string \"Light\".\n * @returns the class name\n */\n getClassName() {\n return \"Light\";\n }\n /**\n * Converts the light information to a readable string for debug purpose.\n * @param fullDetails Supports for multiple levels of logging within scene loading\n * @returns the human readable light info\n */\n toString(fullDetails) {\n let ret = \"Name: \" + this.name;\n ret += \", type: \" + [\"Point\", \"Directional\", \"Spot\", \"Hemispheric\"][this.getTypeID()];\n if (this.animations) {\n for (let i = 0; i < this.animations.length; i++) {\n ret += \", animation[0]: \" + this.animations[i].toString(fullDetails);\n }\n }\n return ret;\n }\n /** @internal */\n _syncParentEnabledState() {\n super._syncParentEnabledState();\n if (!this.isDisposed()) {\n this._resyncMeshes();\n }\n }\n /**\n * Set the enabled state of this node.\n * @param value - the new enabled state\n */\n setEnabled(value) {\n super.setEnabled(value);\n this._resyncMeshes();\n }\n /**\n * Returns the Light associated shadow generator if any.\n * @param camera Camera for which the shadow generator should be retrieved (default: null). If null, retrieves the default shadow generator\n * @returns the associated shadow generator.\n */\n getShadowGenerator(camera = null) {\n var _a;\n if (this._shadowGenerators === null) {\n return null;\n }\n return (_a = this._shadowGenerators.get(camera)) !== null && _a !== void 0 ? _a : null;\n }\n /**\n * Returns all the shadow generators associated to this light\n * @returns\n */\n getShadowGenerators() {\n return this._shadowGenerators;\n }\n /**\n * Returns a Vector3, the absolute light position in the World.\n * @returns the world space position of the light\n */\n getAbsolutePosition() {\n return Vector3.Zero();\n }\n /**\n * Specifies if the light will affect the passed mesh.\n * @param mesh The mesh to test against the light\n * @returns true the mesh is affected otherwise, false.\n */\n canAffectMesh(mesh) {\n if (!mesh) {\n return true;\n }\n if (this.includedOnlyMeshes && this.includedOnlyMeshes.length > 0 && this.includedOnlyMeshes.indexOf(mesh) === -1) {\n return false;\n }\n if (this.excludedMeshes && this.excludedMeshes.length > 0 && this.excludedMeshes.indexOf(mesh) !== -1) {\n return false;\n }\n if (this.includeOnlyWithLayerMask !== 0 && (this.includeOnlyWithLayerMask & mesh.layerMask) === 0) {\n return false;\n }\n if (this.excludeWithLayerMask !== 0 && this.excludeWithLayerMask & mesh.layerMask) {\n return false;\n }\n return true;\n }\n /**\n * Releases resources associated with this node.\n * @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)\n * @param disposeMaterialAndTextures Set to true to also dispose referenced materials and textures (false by default)\n */\n dispose(doNotRecurse, disposeMaterialAndTextures = false) {\n if (this._shadowGenerators) {\n const iterator = this._shadowGenerators.values();\n for (let key = iterator.next(); key.done !== true; key = iterator.next()) {\n const shadowGenerator = key.value;\n shadowGenerator.dispose();\n }\n this._shadowGenerators = null;\n }\n // Animations\n this.getScene().stopAnimation(this);\n if (this._parentContainer) {\n const index = this._parentContainer.lights.indexOf(this);\n if (index > -1) {\n this._parentContainer.lights.splice(index, 1);\n }\n this._parentContainer = null;\n }\n // Remove from meshes\n for (const mesh of this.getScene().meshes) {\n mesh._removeLightSource(this, true);\n }\n this._uniformBuffer.dispose();\n // Remove from scene\n this.getScene().removeLight(this);\n super.dispose(doNotRecurse, disposeMaterialAndTextures);\n }\n /**\n * Returns the light type ID (integer).\n * @returns The light Type id as a constant defines in Light.LIGHTTYPEID_x\n */\n getTypeID() {\n return 0;\n }\n /**\n * Returns the intensity scaled by the Photometric Scale according to the light type and intensity mode.\n * @returns the scaled intensity in intensity mode unit\n */\n getScaledIntensity() {\n return this._photometricScale * this.intensity;\n }\n /**\n * Returns a new Light object, named \"name\", from the current one.\n * @param name The name of the cloned light\n * @param newParent The parent of this light, if it has one\n * @returns the new created light\n */\n clone(name, newParent = null) {\n const constructor = Light.GetConstructorFromName(this.getTypeID(), name, this.getScene());\n if (!constructor) {\n return null;\n }\n const clonedLight = SerializationHelper.Clone(constructor, this);\n if (name) {\n clonedLight.name = name;\n }\n if (newParent) {\n clonedLight.parent = newParent;\n }\n clonedLight.setEnabled(this.isEnabled());\n this.onClonedObservable.notifyObservers(clonedLight);\n return clonedLight;\n }\n /**\n * Serializes the current light into a Serialization object.\n * @returns the serialized object.\n */\n serialize() {\n const serializationObject = SerializationHelper.Serialize(this);\n serializationObject.uniqueId = this.uniqueId;\n // Type\n serializationObject.type = this.getTypeID();\n // Parent\n if (this.parent) {\n this.parent._serializeAsParent(serializationObject);\n }\n // Inclusion / exclusions\n if (this.excludedMeshes.length > 0) {\n serializationObject.excludedMeshesIds = [];\n this.excludedMeshes.forEach((mesh) => {\n serializationObject.excludedMeshesIds.push(mesh.id);\n });\n }\n if (this.includedOnlyMeshes.length > 0) {\n serializationObject.includedOnlyMeshesIds = [];\n this.includedOnlyMeshes.forEach((mesh) => {\n serializationObject.includedOnlyMeshesIds.push(mesh.id);\n });\n }\n // Animations\n SerializationHelper.AppendSerializedAnimations(this, serializationObject);\n serializationObject.ranges = this.serializeAnimationRanges();\n serializationObject.isEnabled = this.isEnabled();\n return serializationObject;\n }\n /**\n * Creates a new typed light from the passed type (integer) : point light = 0, directional light = 1, spot light = 2, hemispheric light = 3.\n * This new light is named \"name\" and added to the passed scene.\n * @param type Type according to the types available in Light.LIGHTTYPEID_x\n * @param name The friendly name of the light\n * @param scene The scene the new light will belong to\n * @returns the constructor function\n */\n static GetConstructorFromName(type, name, scene) {\n const constructorFunc = Node.Construct(\"Light_Type_\" + type, name, scene);\n if (constructorFunc) {\n return constructorFunc;\n }\n // Default to no light for none present once.\n return null;\n }\n /**\n * Parses the passed \"parsedLight\" and returns a new instanced Light from this parsing.\n * @param parsedLight The JSON representation of the light\n * @param scene The scene to create the parsed light in\n * @returns the created light after parsing\n */\n static Parse(parsedLight, scene) {\n const constructor = Light.GetConstructorFromName(parsedLight.type, parsedLight.name, scene);\n if (!constructor) {\n return null;\n }\n const light = SerializationHelper.Parse(constructor, parsedLight, scene);\n // Inclusion / exclusions\n if (parsedLight.excludedMeshesIds) {\n light._excludedMeshesIds = parsedLight.excludedMeshesIds;\n }\n if (parsedLight.includedOnlyMeshesIds) {\n light._includedOnlyMeshesIds = parsedLight.includedOnlyMeshesIds;\n }\n // Parent\n if (parsedLight.parentId !== undefined) {\n light._waitingParentId = parsedLight.parentId;\n }\n if (parsedLight.parentInstanceIndex !== undefined) {\n light._waitingParentInstanceIndex = parsedLight.parentInstanceIndex;\n }\n // Falloff\n if (parsedLight.falloffType !== undefined) {\n light.falloffType = parsedLight.falloffType;\n }\n // Lightmaps\n if (parsedLight.lightmapMode !== undefined) {\n light.lightmapMode = parsedLight.lightmapMode;\n }\n // Animations\n if (parsedLight.animations) {\n for (let animationIndex = 0; animationIndex < parsedLight.animations.length; animationIndex++) {\n const parsedAnimation = parsedLight.animations[animationIndex];\n const internalClass = GetClass(\"BABYLON.Animation\");\n if (internalClass) {\n light.animations.push(internalClass.Parse(parsedAnimation));\n }\n }\n Node.ParseAnimationRanges(light, parsedLight, scene);\n }\n if (parsedLight.autoAnimate) {\n scene.beginAnimation(light, parsedLight.autoAnimateFrom, parsedLight.autoAnimateTo, parsedLight.autoAnimateLoop, parsedLight.autoAnimateSpeed || 1.0);\n }\n // Check if isEnabled is defined to be back compatible with prior serialized versions.\n if (parsedLight.isEnabled !== undefined) {\n light.setEnabled(parsedLight.isEnabled);\n }\n return light;\n }\n _hookArrayForExcluded(array) {\n const oldPush = array.push;\n array.push = (...items) => {\n const result = oldPush.apply(array, items);\n for (const item of items) {\n item._resyncLightSource(this);\n }\n return result;\n };\n const oldSplice = array.splice;\n array.splice = (index, deleteCount) => {\n const deleted = oldSplice.apply(array, [index, deleteCount]);\n for (const item of deleted) {\n item._resyncLightSource(this);\n }\n return deleted;\n };\n for (const item of array) {\n item._resyncLightSource(this);\n }\n }\n _hookArrayForIncludedOnly(array) {\n const oldPush = array.push;\n array.push = (...items) => {\n const result = oldPush.apply(array, items);\n this._resyncMeshes();\n return result;\n };\n const oldSplice = array.splice;\n array.splice = (index, deleteCount) => {\n const deleted = oldSplice.apply(array, [index, deleteCount]);\n this._resyncMeshes();\n return deleted;\n };\n this._resyncMeshes();\n }\n _resyncMeshes() {\n for (const mesh of this.getScene().meshes) {\n mesh._resyncLightSource(this);\n }\n }\n /**\n * Forces the meshes to update their light related information in their rendering used effects\n * @internal Internal Use Only\n */\n _markMeshesAsLightDirty() {\n for (const mesh of this.getScene().meshes) {\n if (mesh.lightSources.indexOf(this) !== -1) {\n mesh._markSubMeshesAsLightDirty();\n }\n }\n }\n /**\n * Recomputes the cached photometric scale if needed.\n */\n _computePhotometricScale() {\n this._photometricScale = this._getPhotometricScale();\n this.getScene().resetCachedMaterial();\n }\n /**\n * Returns the Photometric Scale according to the light type and intensity mode.\n */\n _getPhotometricScale() {\n let photometricScale = 0.0;\n const lightTypeID = this.getTypeID();\n //get photometric mode\n let photometricMode = this.intensityMode;\n if (photometricMode === Light.INTENSITYMODE_AUTOMATIC) {\n if (lightTypeID === Light.LIGHTTYPEID_DIRECTIONALLIGHT) {\n photometricMode = Light.INTENSITYMODE_ILLUMINANCE;\n }\n else {\n photometricMode = Light.INTENSITYMODE_LUMINOUSINTENSITY;\n }\n }\n //compute photometric scale\n switch (lightTypeID) {\n case Light.LIGHTTYPEID_POINTLIGHT:\n case Light.LIGHTTYPEID_SPOTLIGHT:\n switch (photometricMode) {\n case Light.INTENSITYMODE_LUMINOUSPOWER:\n photometricScale = 1.0 / (4.0 * Math.PI);\n break;\n case Light.INTENSITYMODE_LUMINOUSINTENSITY:\n photometricScale = 1.0;\n break;\n case Light.INTENSITYMODE_LUMINANCE:\n photometricScale = this.radius * this.radius;\n break;\n }\n break;\n case Light.LIGHTTYPEID_DIRECTIONALLIGHT:\n switch (photometricMode) {\n case Light.INTENSITYMODE_ILLUMINANCE:\n photometricScale = 1.0;\n break;\n case Light.INTENSITYMODE_LUMINANCE: {\n // When radius (and therefore solid angle) is non-zero a directional lights brightness can be specified via central (peak) luminance.\n // For a directional light the 'radius' defines the angular radius (in radians) rather than world-space radius (e.g. in metres).\n let apexAngleRadians = this.radius;\n // Impose a minimum light angular size to avoid the light becoming an infinitely small angular light source (i.e. a dirac delta function).\n apexAngleRadians = Math.max(apexAngleRadians, 0.001);\n const solidAngle = 2.0 * Math.PI * (1.0 - Math.cos(apexAngleRadians));\n photometricScale = solidAngle;\n break;\n }\n }\n break;\n case Light.LIGHTTYPEID_HEMISPHERICLIGHT:\n // No fall off in hemispheric light.\n photometricScale = 1.0;\n break;\n }\n return photometricScale;\n }\n /**\n * Reorder the light in the scene according to their defined priority.\n * @internal Internal Use Only\n */\n _reorderLightsInScene() {\n const scene = this.getScene();\n if (this._renderPriority != 0) {\n scene.requireLightSorting = true;\n }\n this.getScene().sortLightsByPriority();\n }\n}\n/**\n * Falloff Default: light is falling off following the material specification:\n * standard material is using standard falloff whereas pbr material can request special falloff per materials.\n */\nLight.FALLOFF_DEFAULT = LightConstants.FALLOFF_DEFAULT;\n/**\n * Falloff Physical: light is falling off following the inverse squared distance law.\n */\nLight.FALLOFF_PHYSICAL = LightConstants.FALLOFF_PHYSICAL;\n/**\n * Falloff gltf: light is falling off as described in the gltf moving to PBR document\n * to enhance interoperability with other engines.\n */\nLight.FALLOFF_GLTF = LightConstants.FALLOFF_GLTF;\n/**\n * Falloff Standard: light is falling off like in the standard material\n * to enhance interoperability with other materials.\n */\nLight.FALLOFF_STANDARD = LightConstants.FALLOFF_STANDARD;\n//lightmapMode Consts\n/**\n * If every light affecting the material is in this lightmapMode,\n * material.lightmapTexture adds or multiplies\n * (depends on material.useLightmapAsShadowmap)\n * after every other light calculations.\n */\nLight.LIGHTMAP_DEFAULT = LightConstants.LIGHTMAP_DEFAULT;\n/**\n * material.lightmapTexture as only diffuse lighting from this light\n * adds only specular lighting from this light\n * adds dynamic shadows\n */\nLight.LIGHTMAP_SPECULAR = LightConstants.LIGHTMAP_SPECULAR;\n/**\n * material.lightmapTexture as only lighting\n * no light calculation from this light\n * only adds dynamic shadows from this light\n */\nLight.LIGHTMAP_SHADOWSONLY = LightConstants.LIGHTMAP_SHADOWSONLY;\n// Intensity Mode Consts\n/**\n * Each light type uses the default quantity according to its type:\n * point/spot lights use luminous intensity\n * directional lights use illuminance\n */\nLight.INTENSITYMODE_AUTOMATIC = LightConstants.INTENSITYMODE_AUTOMATIC;\n/**\n * lumen (lm)\n */\nLight.INTENSITYMODE_LUMINOUSPOWER = LightConstants.INTENSITYMODE_LUMINOUSPOWER;\n/**\n * candela (lm/sr)\n */\nLight.INTENSITYMODE_LUMINOUSINTENSITY = LightConstants.INTENSITYMODE_LUMINOUSINTENSITY;\n/**\n * lux (lm/m^2)\n */\nLight.INTENSITYMODE_ILLUMINANCE = LightConstants.INTENSITYMODE_ILLUMINANCE;\n/**\n * nit (cd/m^2)\n */\nLight.INTENSITYMODE_LUMINANCE = LightConstants.INTENSITYMODE_LUMINANCE;\n// Light types ids const.\n/**\n * Light type const id of the point light.\n */\nLight.LIGHTTYPEID_POINTLIGHT = LightConstants.LIGHTTYPEID_POINTLIGHT;\n/**\n * Light type const id of the directional light.\n */\nLight.LIGHTTYPEID_DIRECTIONALLIGHT = LightConstants.LIGHTTYPEID_DIRECTIONALLIGHT;\n/**\n * Light type const id of the spot light.\n */\nLight.LIGHTTYPEID_SPOTLIGHT = LightConstants.LIGHTTYPEID_SPOTLIGHT;\n/**\n * Light type const id of the hemispheric light.\n */\nLight.LIGHTTYPEID_HEMISPHERICLIGHT = LightConstants.LIGHTTYPEID_HEMISPHERICLIGHT;\n__decorate([\n serializeAsColor3()\n], Light.prototype, \"diffuse\", void 0);\n__decorate([\n serializeAsColor3()\n], Light.prototype, \"specular\", void 0);\n__decorate([\n serialize()\n], Light.prototype, \"falloffType\", void 0);\n__decorate([\n serialize()\n], Light.prototype, \"intensity\", void 0);\n__decorate([\n serialize()\n], Light.prototype, \"range\", null);\n__decorate([\n serialize()\n], Light.prototype, \"intensityMode\", null);\n__decorate([\n serialize()\n], Light.prototype, \"radius\", null);\n__decorate([\n serialize()\n], Light.prototype, \"_renderPriority\", void 0);\n__decorate([\n expandToProperty(\"_reorderLightsInScene\")\n], Light.prototype, \"renderPriority\", void 0);\n__decorate([\n serialize(\"shadowEnabled\")\n], Light.prototype, \"_shadowEnabled\", void 0);\n__decorate([\n serialize(\"excludeWithLayerMask\")\n], Light.prototype, \"_excludeWithLayerMask\", void 0);\n__decorate([\n serialize(\"includeOnlyWithLayerMask\")\n], Light.prototype, \"_includeOnlyWithLayerMask\", void 0);\n__decorate([\n serialize(\"lightmapMode\")\n], Light.prototype, \"_lightmapMode\", void 0);\n//# sourceMappingURL=light.js.map","/**\n * Defines an GC Friendly array where the backfield array do not shrink to prevent over allocations.\n */\nexport class SmartArray {\n /**\n * Instantiates a Smart Array.\n * @param capacity defines the default capacity of the array.\n */\n constructor(capacity) {\n /**\n * The active length of the array.\n */\n this.length = 0;\n this.data = new Array(capacity);\n this._id = SmartArray._GlobalId++;\n }\n /**\n * Pushes a value at the end of the active data.\n * @param value defines the object to push in the array.\n */\n push(value) {\n this.data[this.length++] = value;\n if (this.length > this.data.length) {\n this.data.length *= 2;\n }\n }\n /**\n * Iterates over the active data and apply the lambda to them.\n * @param func defines the action to apply on each value.\n */\n forEach(func) {\n for (let index = 0; index < this.length; index++) {\n func(this.data[index]);\n }\n }\n /**\n * Sorts the full sets of data.\n * @param compareFn defines the comparison function to apply.\n */\n sort(compareFn) {\n this.data.sort(compareFn);\n }\n /**\n * Resets the active data to an empty array.\n */\n reset() {\n this.length = 0;\n }\n /**\n * Releases all the data from the array as well as the array.\n */\n dispose() {\n this.reset();\n if (this.data) {\n this.data.length = 0;\n }\n }\n /**\n * Concats the active data with a given array.\n * @param array defines the data to concatenate with.\n */\n concat(array) {\n if (array.length === 0) {\n return;\n }\n if (this.length + array.length > this.data.length) {\n this.data.length = (this.length + array.length) * 2;\n }\n for (let index = 0; index < array.length; index++) {\n this.data[this.length++] = (array.data || array)[index];\n }\n }\n /**\n * Returns the position of a value in the active data.\n * @param value defines the value to find the index for\n * @returns the index if found in the active data otherwise -1\n */\n indexOf(value) {\n const position = this.data.indexOf(value);\n if (position >= this.length) {\n return -1;\n }\n return position;\n }\n /**\n * Returns whether an element is part of the active data.\n * @param value defines the value to look for\n * @returns true if found in the active data otherwise false\n */\n contains(value) {\n return this.indexOf(value) !== -1;\n }\n}\n// Statics\nSmartArray._GlobalId = 0;\n/**\n * Defines an GC Friendly array where the backfield array do not shrink to prevent over allocations.\n * The data in this array can only be present once\n */\nexport class SmartArrayNoDuplicate extends SmartArray {\n constructor() {\n super(...arguments);\n this._duplicateId = 0;\n }\n /**\n * Pushes a value at the end of the active data.\n * THIS DOES NOT PREVENT DUPPLICATE DATA\n * @param value defines the object to push in the array.\n */\n push(value) {\n super.push(value);\n if (!value.__smartArrayFlags) {\n value.__smartArrayFlags = {};\n }\n value.__smartArrayFlags[this._id] = this._duplicateId;\n }\n /**\n * Pushes a value at the end of the active data.\n * If the data is already present, it won t be added again\n * @param value defines the object to push in the array.\n * @returns true if added false if it was already present\n */\n pushNoDuplicate(value) {\n if (value.__smartArrayFlags && value.__smartArrayFlags[this._id] === this._duplicateId) {\n return false;\n }\n this.push(value);\n return true;\n }\n /**\n * Resets the active data to an empty array.\n */\n reset() {\n super.reset();\n this._duplicateId++;\n }\n /**\n * Concats the active data with a given array.\n * This ensures no duplicate will be present in the result.\n * @param array defines the data to concatenate with.\n */\n concatWithNoDuplicate(array) {\n if (array.length === 0) {\n return;\n }\n if (this.length + array.length > this.data.length) {\n this.data.length = (this.length + array.length) * 2;\n }\n for (let index = 0; index < array.length; index++) {\n const item = (array.data || array)[index];\n this.pushNoDuplicate(item);\n }\n }\n}\n//# sourceMappingURL=smartArray.js.map","/**\n * Class used to represent a viewport on screen\n */\nexport class Viewport {\n /**\n * Creates a Viewport object located at (x, y) and sized (width, height)\n * @param x defines viewport left coordinate\n * @param y defines viewport top coordinate\n * @param width defines the viewport width\n * @param height defines the viewport height\n */\n constructor(\n /** viewport left coordinate */\n x, \n /** viewport top coordinate */\n y, \n /**viewport width */\n width, \n /** viewport height */\n height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n /**\n * Creates a new viewport using absolute sizing (from 0-> width, 0-> height instead of 0->1)\n * @param renderWidth defines the rendering width\n * @param renderHeight defines the rendering height\n * @returns a new Viewport\n */\n toGlobal(renderWidth, renderHeight) {\n return new Viewport(this.x * renderWidth, this.y * renderHeight, this.width * renderWidth, this.height * renderHeight);\n }\n /**\n * Stores absolute viewport value into a target viewport (from 0-> width, 0-> height instead of 0->1)\n * @param renderWidth defines the rendering width\n * @param renderHeight defines the rendering height\n * @param ref defines the target viewport\n * @returns the current viewport\n */\n toGlobalToRef(renderWidth, renderHeight, ref) {\n ref.x = this.x * renderWidth;\n ref.y = this.y * renderHeight;\n ref.width = this.width * renderWidth;\n ref.height = this.height * renderHeight;\n return this;\n }\n /**\n * Returns a new Viewport copied from the current one\n * @returns a new Viewport\n */\n clone() {\n return new Viewport(this.x, this.y, this.width, this.height);\n }\n}\n//# sourceMappingURL=math.viewport.js.map","import { Plane } from \"./math.plane.js\";\n/**\n * Represents a camera frustum\n */\nexport class Frustum {\n /**\n * Gets the planes representing the frustum\n * @param transform matrix to be applied to the returned planes\n * @returns a new array of 6 Frustum planes computed by the given transformation matrix.\n */\n static GetPlanes(transform) {\n const frustumPlanes = [];\n for (let index = 0; index < 6; index++) {\n frustumPlanes.push(new Plane(0.0, 0.0, 0.0, 0.0));\n }\n Frustum.GetPlanesToRef(transform, frustumPlanes);\n return frustumPlanes;\n }\n /**\n * Gets the near frustum plane transformed by the transform matrix\n * @param transform transformation matrix to be applied to the resulting frustum plane\n * @param frustumPlane the resulting frustum plane\n */\n static GetNearPlaneToRef(transform, frustumPlane) {\n const m = transform.m;\n frustumPlane.normal.x = m[3] + m[2];\n frustumPlane.normal.y = m[7] + m[6];\n frustumPlane.normal.z = m[11] + m[10];\n frustumPlane.d = m[15] + m[14];\n frustumPlane.normalize();\n }\n /**\n * Gets the far frustum plane transformed by the transform matrix\n * @param transform transformation matrix to be applied to the resulting frustum plane\n * @param frustumPlane the resulting frustum plane\n */\n static GetFarPlaneToRef(transform, frustumPlane) {\n const m = transform.m;\n frustumPlane.normal.x = m[3] - m[2];\n frustumPlane.normal.y = m[7] - m[6];\n frustumPlane.normal.z = m[11] - m[10];\n frustumPlane.d = m[15] - m[14];\n frustumPlane.normalize();\n }\n /**\n * Gets the left frustum plane transformed by the transform matrix\n * @param transform transformation matrix to be applied to the resulting frustum plane\n * @param frustumPlane the resulting frustum plane\n */\n static GetLeftPlaneToRef(transform, frustumPlane) {\n const m = transform.m;\n frustumPlane.normal.x = m[3] + m[0];\n frustumPlane.normal.y = m[7] + m[4];\n frustumPlane.normal.z = m[11] + m[8];\n frustumPlane.d = m[15] + m[12];\n frustumPlane.normalize();\n }\n /**\n * Gets the right frustum plane transformed by the transform matrix\n * @param transform transformation matrix to be applied to the resulting frustum plane\n * @param frustumPlane the resulting frustum plane\n */\n static GetRightPlaneToRef(transform, frustumPlane) {\n const m = transform.m;\n frustumPlane.normal.x = m[3] - m[0];\n frustumPlane.normal.y = m[7] - m[4];\n frustumPlane.normal.z = m[11] - m[8];\n frustumPlane.d = m[15] - m[12];\n frustumPlane.normalize();\n }\n /**\n * Gets the top frustum plane transformed by the transform matrix\n * @param transform transformation matrix to be applied to the resulting frustum plane\n * @param frustumPlane the resulting frustum plane\n */\n static GetTopPlaneToRef(transform, frustumPlane) {\n const m = transform.m;\n frustumPlane.normal.x = m[3] - m[1];\n frustumPlane.normal.y = m[7] - m[5];\n frustumPlane.normal.z = m[11] - m[9];\n frustumPlane.d = m[15] - m[13];\n frustumPlane.normalize();\n }\n /**\n * Gets the bottom frustum plane transformed by the transform matrix\n * @param transform transformation matrix to be applied to the resulting frustum plane\n * @param frustumPlane the resulting frustum plane\n */\n static GetBottomPlaneToRef(transform, frustumPlane) {\n const m = transform.m;\n frustumPlane.normal.x = m[3] + m[1];\n frustumPlane.normal.y = m[7] + m[5];\n frustumPlane.normal.z = m[11] + m[9];\n frustumPlane.d = m[15] + m[13];\n frustumPlane.normalize();\n }\n /**\n * Sets the given array \"frustumPlanes\" with the 6 Frustum planes computed by the given transformation matrix.\n * @param transform transformation matrix to be applied to the resulting frustum planes\n * @param frustumPlanes the resulting frustum planes\n */\n static GetPlanesToRef(transform, frustumPlanes) {\n // Near\n Frustum.GetNearPlaneToRef(transform, frustumPlanes[0]);\n // Far\n Frustum.GetFarPlaneToRef(transform, frustumPlanes[1]);\n // Left\n Frustum.GetLeftPlaneToRef(transform, frustumPlanes[2]);\n // Right\n Frustum.GetRightPlaneToRef(transform, frustumPlanes[3]);\n // Top\n Frustum.GetTopPlaneToRef(transform, frustumPlanes[4]);\n // Bottom\n Frustum.GetBottomPlaneToRef(transform, frustumPlanes[5]);\n }\n /**\n * Tests if a point is located between the frustum planes.\n * @param point defines the point to test\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if the point is located between the frustum planes\n */\n static IsPointInFrustum(point, frustumPlanes) {\n for (let i = 0; i < 6; i++) {\n if (frustumPlanes[i].dotCoordinate(point) < 0) {\n return false;\n }\n }\n return true;\n }\n}\n//# sourceMappingURL=math.frustum.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serialize, SerializationHelper, serializeAsVector3 } from \"../Misc/decorators.js\";\nimport { SmartArray } from \"../Misc/smartArray.js\";\nimport { Tools } from \"../Misc/tools.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { Matrix, Vector3, Quaternion } from \"../Maths/math.vector.js\";\nimport { Node } from \"../node.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { GetClass } from \"../Misc/typeStore.js\";\nimport { _WarnImport } from \"../Misc/devTools.js\";\nimport { Viewport } from \"../Maths/math.viewport.js\";\nimport { Frustum } from \"../Maths/math.frustum.js\";\n\n/**\n * This is the base class of all the camera used in the application.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras\n */\nexport class Camera extends Node {\n /**\n * Define the current local position of the camera in the scene\n */\n get position() {\n return this._position;\n }\n set position(newPosition) {\n this._position = newPosition;\n }\n /**\n * The vector the camera should consider as up.\n * (default is Vector3(0, 1, 0) aka Vector3.Up())\n */\n set upVector(vec) {\n this._upVector = vec;\n }\n get upVector() {\n return this._upVector;\n }\n /**\n * The screen area in scene units squared\n */\n get screenArea() {\n var _a, _b, _c, _d;\n let x = 0;\n let y = 0;\n if (this.mode === Camera.PERSPECTIVE_CAMERA) {\n if (this.fovMode === Camera.FOVMODE_VERTICAL_FIXED) {\n y = this.minZ * 2 * Math.tan(this.fov / 2);\n x = this.getEngine().getAspectRatio(this) * y;\n }\n else {\n x = this.minZ * 2 * Math.tan(this.fov / 2);\n y = x / this.getEngine().getAspectRatio(this);\n }\n }\n else {\n const halfWidth = this.getEngine().getRenderWidth() / 2.0;\n const halfHeight = this.getEngine().getRenderHeight() / 2.0;\n x = ((_a = this.orthoRight) !== null && _a !== void 0 ? _a : halfWidth) - ((_b = this.orthoLeft) !== null && _b !== void 0 ? _b : -halfWidth);\n y = ((_c = this.orthoTop) !== null && _c !== void 0 ? _c : halfHeight) - ((_d = this.orthoBottom) !== null && _d !== void 0 ? _d : -halfHeight);\n }\n return x * y;\n }\n set orthoLeft(value) {\n this._orthoLeft = value;\n for (const rigCamera of this._rigCameras) {\n rigCamera.orthoLeft = value;\n }\n }\n get orthoLeft() {\n return this._orthoLeft;\n }\n set orthoRight(value) {\n this._orthoRight = value;\n for (const rigCamera of this._rigCameras) {\n rigCamera.orthoRight = value;\n }\n }\n get orthoRight() {\n return this._orthoRight;\n }\n set orthoBottom(value) {\n this._orthoBottom = value;\n for (const rigCamera of this._rigCameras) {\n rigCamera.orthoBottom = value;\n }\n }\n get orthoBottom() {\n return this._orthoBottom;\n }\n set orthoTop(value) {\n this._orthoTop = value;\n for (const rigCamera of this._rigCameras) {\n rigCamera.orthoTop = value;\n }\n }\n get orthoTop() {\n return this._orthoTop;\n }\n set mode(mode) {\n this._mode = mode;\n // Pass the mode down to the rig cameras\n for (const rigCamera of this._rigCameras) {\n rigCamera.mode = mode;\n }\n }\n get mode() {\n return this._mode;\n }\n /**\n * Instantiates a new camera object.\n * This should not be used directly but through the inherited cameras: ArcRotate, Free...\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras\n * @param name Defines the name of the camera in the scene\n * @param position Defines the position of the camera\n * @param scene Defines the scene the camera belongs too\n * @param setActiveOnSceneIfNoneActive Defines if the camera should be set as active after creation if no other camera have been defined in the scene\n */\n constructor(name, position, scene, setActiveOnSceneIfNoneActive = true) {\n super(name, scene);\n /** @internal */\n this._position = Vector3.Zero();\n this._upVector = Vector3.Up();\n /**\n * Object containing oblique projection values (only used with ORTHOGRAPHIC_CAMERA)\n */\n this.oblique = null;\n /**\n * Define the current limit on the left side for an orthographic camera\n * In scene unit\n */\n this._orthoLeft = null;\n /**\n * Define the current limit on the right side for an orthographic camera\n * In scene unit\n */\n this._orthoRight = null;\n /**\n * Define the current limit on the bottom side for an orthographic camera\n * In scene unit\n */\n this._orthoBottom = null;\n /**\n * Define the current limit on the top side for an orthographic camera\n * In scene unit\n */\n this._orthoTop = null;\n /**\n * Field Of View is set in Radians. (default is 0.8)\n */\n this.fov = 0.8;\n /**\n * Projection plane tilt around the X axis (horizontal), set in Radians. (default is 0)\n * Can be used to make vertical lines in world space actually vertical on the screen.\n * See https://forum.babylonjs.com/t/add-vertical-shift-to-3ds-max-exporter-babylon-cameras/17480\n */\n this.projectionPlaneTilt = 0;\n /**\n * Define the minimum distance the camera can see from.\n * This is important to note that the depth buffer are not infinite and the closer it starts\n * the more your scene might encounter depth fighting issue.\n */\n this.minZ = 1;\n /**\n * Define the maximum distance the camera can see to.\n * This is important to note that the depth buffer are not infinite and the further it end\n * the more your scene might encounter depth fighting issue.\n */\n this.maxZ = 10000.0;\n /**\n * Define the default inertia of the camera.\n * This helps giving a smooth feeling to the camera movement.\n */\n this.inertia = 0.9;\n /**\n * Define the mode of the camera (Camera.PERSPECTIVE_CAMERA or Camera.ORTHOGRAPHIC_CAMERA)\n */\n this._mode = Camera.PERSPECTIVE_CAMERA;\n /**\n * Define whether the camera is intermediate.\n * This is useful to not present the output directly to the screen in case of rig without post process for instance\n */\n this.isIntermediate = false;\n /**\n * Define the viewport of the camera.\n * This correspond to the portion of the screen the camera will render to in normalized 0 to 1 unit.\n */\n this.viewport = new Viewport(0, 0, 1.0, 1.0);\n /**\n * Restricts the camera to viewing objects with the same layerMask.\n * A camera with a layerMask of 1 will render mesh.layerMask & camera.layerMask!== 0\n */\n this.layerMask = 0x0fffffff;\n /**\n * fovMode sets the camera frustum bounds to the viewport bounds. (default is FOVMODE_VERTICAL_FIXED)\n */\n this.fovMode = Camera.FOVMODE_VERTICAL_FIXED;\n /**\n * Rig mode of the camera.\n * This is useful to create the camera with two \"eyes\" instead of one to create VR or stereoscopic scenes.\n * This is normally controlled byt the camera themselves as internal use.\n */\n this.cameraRigMode = Camera.RIG_MODE_NONE;\n /**\n * Defines the list of custom render target which are rendered to and then used as the input to this camera's render. Eg. display another camera view on a TV in the main scene\n * This is pretty helpful if you wish to make a camera render to a texture you could reuse somewhere\n * else in the scene. (Eg. security camera)\n *\n * To change the final output target of the camera, camera.outputRenderTarget should be used instead (eg. webXR renders to a render target corresponding to an HMD)\n */\n this.customRenderTargets = [];\n /**\n * When set, the camera will render to this render target instead of the default canvas\n *\n * If the desire is to use the output of a camera as a texture in the scene consider using camera.customRenderTargets instead\n */\n this.outputRenderTarget = null;\n /**\n * Observable triggered when the camera view matrix has changed.\n */\n this.onViewMatrixChangedObservable = new Observable();\n /**\n * Observable triggered when the camera Projection matrix has changed.\n */\n this.onProjectionMatrixChangedObservable = new Observable();\n /**\n * Observable triggered when the inputs have been processed.\n */\n this.onAfterCheckInputsObservable = new Observable();\n /**\n * Observable triggered when reset has been called and applied to the camera.\n */\n this.onRestoreStateObservable = new Observable();\n /**\n * Is this camera a part of a rig system?\n */\n this.isRigCamera = false;\n /** @internal */\n this._rigCameras = new Array();\n /** @internal */\n this._skipRendering = false;\n /** @internal */\n this._projectionMatrix = new Matrix();\n /** @internal */\n this._postProcesses = new Array();\n /** @internal */\n this._activeMeshes = new SmartArray(256);\n this._globalPosition = Vector3.Zero();\n /** @internal */\n this._computedViewMatrix = Matrix.Identity();\n this._doNotComputeProjectionMatrix = false;\n this._transformMatrix = Matrix.Zero();\n this._refreshFrustumPlanes = true;\n this._absoluteRotation = Quaternion.Identity();\n /** @internal */\n this._isCamera = true;\n /** @internal */\n this._isLeftCamera = false;\n /** @internal */\n this._isRightCamera = false;\n this.getScene().addCamera(this);\n if (setActiveOnSceneIfNoneActive && !this.getScene().activeCamera) {\n this.getScene().activeCamera = this;\n }\n this.position = position;\n this.renderPassId = this.getScene().getEngine().createRenderPassId(`Camera ${name}`);\n }\n /**\n * Store current camera state (fov, position, etc..)\n * @returns the camera\n */\n storeState() {\n this._stateStored = true;\n this._storedFov = this.fov;\n return this;\n }\n /**\n * Restores the camera state values if it has been stored. You must call storeState() first\n */\n _restoreStateValues() {\n if (!this._stateStored) {\n return false;\n }\n this.fov = this._storedFov;\n return true;\n }\n /**\n * Restored camera state. You must call storeState() first.\n * @returns true if restored and false otherwise\n */\n restoreState() {\n if (this._restoreStateValues()) {\n this.onRestoreStateObservable.notifyObservers(this);\n return true;\n }\n return false;\n }\n /**\n * Gets the class name of the camera.\n * @returns the class name\n */\n getClassName() {\n return \"Camera\";\n }\n /**\n * Gets a string representation of the camera useful for debug purpose.\n * @param fullDetails Defines that a more verbose level of logging is required\n * @returns the string representation\n */\n toString(fullDetails) {\n let ret = \"Name: \" + this.name;\n ret += \", type: \" + this.getClassName();\n if (this.animations) {\n for (let i = 0; i < this.animations.length; i++) {\n ret += \", animation[0]: \" + this.animations[i].toString(fullDetails);\n }\n }\n return ret;\n }\n /**\n * Automatically tilts the projection plane, using `projectionPlaneTilt`, to correct the perspective effect on vertical lines.\n */\n applyVerticalCorrection() {\n const rot = this.absoluteRotation.toEulerAngles();\n this.projectionPlaneTilt = this._scene.useRightHandedSystem ? -rot.x : rot.x;\n }\n /**\n * Gets the current world space position of the camera.\n */\n get globalPosition() {\n return this._globalPosition;\n }\n /**\n * Gets the list of active meshes this frame (meshes no culled or excluded by lod s in the frame)\n * @returns the active meshe list\n */\n getActiveMeshes() {\n return this._activeMeshes;\n }\n /**\n * Check whether a mesh is part of the current active mesh list of the camera\n * @param mesh Defines the mesh to check\n * @returns true if active, false otherwise\n */\n isActiveMesh(mesh) {\n return this._activeMeshes.indexOf(mesh) !== -1;\n }\n /**\n * Is this camera ready to be used/rendered\n * @param completeCheck defines if a complete check (including post processes) has to be done (false by default)\n * @returns true if the camera is ready\n */\n isReady(completeCheck = false) {\n if (completeCheck) {\n for (const pp of this._postProcesses) {\n if (pp && !pp.isReady()) {\n return false;\n }\n }\n }\n return super.isReady(completeCheck);\n }\n /** @internal */\n _initCache() {\n super._initCache();\n this._cache.position = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n this._cache.upVector = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n this._cache.mode = undefined;\n this._cache.minZ = undefined;\n this._cache.maxZ = undefined;\n this._cache.fov = undefined;\n this._cache.fovMode = undefined;\n this._cache.aspectRatio = undefined;\n this._cache.orthoLeft = undefined;\n this._cache.orthoRight = undefined;\n this._cache.orthoBottom = undefined;\n this._cache.orthoTop = undefined;\n this._cache.obliqueAngle = undefined;\n this._cache.obliqueLength = undefined;\n this._cache.obliqueOffset = undefined;\n this._cache.renderWidth = undefined;\n this._cache.renderHeight = undefined;\n }\n /**\n * @internal\n */\n _updateCache(ignoreParentClass) {\n if (!ignoreParentClass) {\n super._updateCache();\n }\n this._cache.position.copyFrom(this.position);\n this._cache.upVector.copyFrom(this.upVector);\n }\n /** @internal */\n _isSynchronized() {\n return this._isSynchronizedViewMatrix() && this._isSynchronizedProjectionMatrix();\n }\n /** @internal */\n _isSynchronizedViewMatrix() {\n if (!super._isSynchronized()) {\n return false;\n }\n return this._cache.position.equals(this.position) && this._cache.upVector.equals(this.upVector) && this.isSynchronizedWithParent();\n }\n /** @internal */\n _isSynchronizedProjectionMatrix() {\n let isSynchronized = this._cache.mode === this.mode && this._cache.minZ === this.minZ && this._cache.maxZ === this.maxZ;\n if (!isSynchronized) {\n return false;\n }\n const engine = this.getEngine();\n if (this.mode === Camera.PERSPECTIVE_CAMERA) {\n isSynchronized =\n this._cache.fov === this.fov &&\n this._cache.fovMode === this.fovMode &&\n this._cache.aspectRatio === engine.getAspectRatio(this) &&\n this._cache.projectionPlaneTilt === this.projectionPlaneTilt;\n }\n else {\n isSynchronized =\n this._cache.orthoLeft === this.orthoLeft &&\n this._cache.orthoRight === this.orthoRight &&\n this._cache.orthoBottom === this.orthoBottom &&\n this._cache.orthoTop === this.orthoTop &&\n this._cache.renderWidth === engine.getRenderWidth() &&\n this._cache.renderHeight === engine.getRenderHeight();\n if (this.oblique) {\n isSynchronized =\n isSynchronized &&\n this._cache.obliqueAngle === this.oblique.angle &&\n this._cache.obliqueLength === this.oblique.length &&\n this._cache.obliqueOffset === this.oblique.offset;\n }\n }\n return isSynchronized;\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n * This function is here because typescript removes the typing of the last function.\n * @param _ignored defines an ignored parameter kept for backward compatibility.\n * @param _noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)\n */\n attachControl(_ignored, _noPreventDefault) { }\n /**\n * Detach the current controls from the specified dom element.\n * This function is here because typescript removes the typing of the last function.\n * @param _ignored defines an ignored parameter kept for backward compatibility.\n */\n detachControl(_ignored) { }\n /**\n * Update the camera state according to the different inputs gathered during the frame.\n */\n update() {\n this._checkInputs();\n if (this.cameraRigMode !== Camera.RIG_MODE_NONE) {\n this._updateRigCameras();\n }\n // Attempt to update the camera's view and projection matrices.\n // This call is being made because these matrices are no longer being updated\n // as a part of the picking ray process (in addition to scene.render).\n this.getViewMatrix();\n this.getProjectionMatrix();\n }\n /** @internal */\n _checkInputs() {\n this.onAfterCheckInputsObservable.notifyObservers(this);\n }\n /** @internal */\n get rigCameras() {\n return this._rigCameras;\n }\n /**\n * Gets the post process used by the rig cameras\n */\n get rigPostProcess() {\n return this._rigPostProcess;\n }\n /**\n * Internal, gets the first post process.\n * @returns the first post process to be run on this camera.\n */\n _getFirstPostProcess() {\n for (let ppIndex = 0; ppIndex < this._postProcesses.length; ppIndex++) {\n if (this._postProcesses[ppIndex] !== null) {\n return this._postProcesses[ppIndex];\n }\n }\n return null;\n }\n _cascadePostProcessesToRigCams() {\n // invalidate framebuffer\n const firstPostProcess = this._getFirstPostProcess();\n if (firstPostProcess) {\n firstPostProcess.markTextureDirty();\n }\n // glue the rigPostProcess to the end of the user postprocesses & assign to each sub-camera\n for (let i = 0, len = this._rigCameras.length; i < len; i++) {\n const cam = this._rigCameras[i];\n const rigPostProcess = cam._rigPostProcess;\n // for VR rig, there does not have to be a post process\n if (rigPostProcess) {\n const isPass = rigPostProcess.getEffectName() === \"pass\";\n if (isPass) {\n // any rig which has a PassPostProcess for rig[0], cannot be isIntermediate when there are also user postProcesses\n cam.isIntermediate = this._postProcesses.length === 0;\n }\n cam._postProcesses = this._postProcesses.slice(0).concat(rigPostProcess);\n rigPostProcess.markTextureDirty();\n }\n else {\n cam._postProcesses = this._postProcesses.slice(0);\n }\n }\n }\n /**\n * Attach a post process to the camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/usePostProcesses#attach-postprocess\n * @param postProcess The post process to attach to the camera\n * @param insertAt The position of the post process in case several of them are in use in the scene\n * @returns the position the post process has been inserted at\n */\n attachPostProcess(postProcess, insertAt = null) {\n if (!postProcess.isReusable() && this._postProcesses.indexOf(postProcess) > -1) {\n Logger.Error(\"You're trying to reuse a post process not defined as reusable.\");\n return 0;\n }\n if (insertAt == null || insertAt < 0) {\n this._postProcesses.push(postProcess);\n }\n else if (this._postProcesses[insertAt] === null) {\n this._postProcesses[insertAt] = postProcess;\n }\n else {\n this._postProcesses.splice(insertAt, 0, postProcess);\n }\n this._cascadePostProcessesToRigCams(); // also ensures framebuffer invalidated\n // Update prePass\n if (this._scene.prePassRenderer) {\n this._scene.prePassRenderer.markAsDirty();\n }\n return this._postProcesses.indexOf(postProcess);\n }\n /**\n * Detach a post process to the camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/usePostProcesses#attach-postprocess\n * @param postProcess The post process to detach from the camera\n */\n detachPostProcess(postProcess) {\n const idx = this._postProcesses.indexOf(postProcess);\n if (idx !== -1) {\n this._postProcesses[idx] = null;\n }\n // Update prePass\n if (this._scene.prePassRenderer) {\n this._scene.prePassRenderer.markAsDirty();\n }\n this._cascadePostProcessesToRigCams(); // also ensures framebuffer invalidated\n }\n /**\n * Gets the current world matrix of the camera\n */\n getWorldMatrix() {\n if (this._isSynchronizedViewMatrix()) {\n return this._worldMatrix;\n }\n // Getting the view matrix will also compute the world matrix.\n this.getViewMatrix();\n return this._worldMatrix;\n }\n /** @internal */\n _getViewMatrix() {\n return Matrix.Identity();\n }\n /**\n * Gets the current view matrix of the camera.\n * @param force forces the camera to recompute the matrix without looking at the cached state\n * @returns the view matrix\n */\n getViewMatrix(force) {\n if (!force && this._isSynchronizedViewMatrix()) {\n return this._computedViewMatrix;\n }\n this.updateCache();\n this._computedViewMatrix = this._getViewMatrix();\n this._currentRenderId = this.getScene().getRenderId();\n this._childUpdateId++;\n this._refreshFrustumPlanes = true;\n if (this._cameraRigParams && this._cameraRigParams.vrPreViewMatrix) {\n this._computedViewMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix, this._computedViewMatrix);\n }\n // Notify parent camera if rig camera is changed\n if (this.parent && this.parent.onViewMatrixChangedObservable) {\n this.parent.onViewMatrixChangedObservable.notifyObservers(this.parent);\n }\n this.onViewMatrixChangedObservable.notifyObservers(this);\n this._computedViewMatrix.invertToRef(this._worldMatrix);\n return this._computedViewMatrix;\n }\n /**\n * Freeze the projection matrix.\n * It will prevent the cache check of the camera projection compute and can speed up perf\n * if no parameter of the camera are meant to change\n * @param projection Defines manually a projection if necessary\n */\n freezeProjectionMatrix(projection) {\n this._doNotComputeProjectionMatrix = true;\n if (projection !== undefined) {\n this._projectionMatrix = projection;\n }\n }\n /**\n * Unfreeze the projection matrix if it has previously been freezed by freezeProjectionMatrix.\n */\n unfreezeProjectionMatrix() {\n this._doNotComputeProjectionMatrix = false;\n }\n /**\n * Gets the current projection matrix of the camera.\n * @param force forces the camera to recompute the matrix without looking at the cached state\n * @returns the projection matrix\n */\n getProjectionMatrix(force) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;\n if (this._doNotComputeProjectionMatrix || (!force && this._isSynchronizedProjectionMatrix())) {\n return this._projectionMatrix;\n }\n // Cache\n this._cache.mode = this.mode;\n this._cache.minZ = this.minZ;\n this._cache.maxZ = this.maxZ;\n // Matrix\n this._refreshFrustumPlanes = true;\n const engine = this.getEngine();\n const scene = this.getScene();\n const reverseDepth = engine.useReverseDepthBuffer;\n if (this.mode === Camera.PERSPECTIVE_CAMERA) {\n this._cache.fov = this.fov;\n this._cache.fovMode = this.fovMode;\n this._cache.aspectRatio = engine.getAspectRatio(this);\n this._cache.projectionPlaneTilt = this.projectionPlaneTilt;\n if (this.minZ <= 0) {\n this.minZ = 0.1;\n }\n let getProjectionMatrix;\n if (scene.useRightHandedSystem) {\n getProjectionMatrix = Matrix.PerspectiveFovRHToRef;\n }\n else {\n getProjectionMatrix = Matrix.PerspectiveFovLHToRef;\n }\n getProjectionMatrix(this.fov, engine.getAspectRatio(this), reverseDepth ? this.maxZ : this.minZ, reverseDepth ? this.minZ : this.maxZ, this._projectionMatrix, this.fovMode === Camera.FOVMODE_VERTICAL_FIXED, engine.isNDCHalfZRange, this.projectionPlaneTilt, reverseDepth);\n }\n else {\n const halfWidth = engine.getRenderWidth() / 2.0;\n const halfHeight = engine.getRenderHeight() / 2.0;\n if (scene.useRightHandedSystem) {\n if (this.oblique) {\n Matrix.ObliqueOffCenterRHToRef((_a = this.orthoLeft) !== null && _a !== void 0 ? _a : -halfWidth, (_b = this.orthoRight) !== null && _b !== void 0 ? _b : halfWidth, (_c = this.orthoBottom) !== null && _c !== void 0 ? _c : -halfHeight, (_d = this.orthoTop) !== null && _d !== void 0 ? _d : halfHeight, reverseDepth ? this.maxZ : this.minZ, reverseDepth ? this.minZ : this.maxZ, this.oblique.length, this.oblique.angle, this._computeObliqueDistance(this.oblique.offset), this._projectionMatrix, engine.isNDCHalfZRange);\n }\n else {\n Matrix.OrthoOffCenterRHToRef((_e = this.orthoLeft) !== null && _e !== void 0 ? _e : -halfWidth, (_f = this.orthoRight) !== null && _f !== void 0 ? _f : halfWidth, (_g = this.orthoBottom) !== null && _g !== void 0 ? _g : -halfHeight, (_h = this.orthoTop) !== null && _h !== void 0 ? _h : halfHeight, reverseDepth ? this.maxZ : this.minZ, reverseDepth ? this.minZ : this.maxZ, this._projectionMatrix, engine.isNDCHalfZRange);\n }\n }\n else {\n if (this.oblique) {\n Matrix.ObliqueOffCenterLHToRef((_j = this.orthoLeft) !== null && _j !== void 0 ? _j : -halfWidth, (_k = this.orthoRight) !== null && _k !== void 0 ? _k : halfWidth, (_l = this.orthoBottom) !== null && _l !== void 0 ? _l : -halfHeight, (_m = this.orthoTop) !== null && _m !== void 0 ? _m : halfHeight, reverseDepth ? this.maxZ : this.minZ, reverseDepth ? this.minZ : this.maxZ, this.oblique.length, this.oblique.angle, this._computeObliqueDistance(this.oblique.offset), this._projectionMatrix, engine.isNDCHalfZRange);\n }\n else {\n Matrix.OrthoOffCenterLHToRef((_o = this.orthoLeft) !== null && _o !== void 0 ? _o : -halfWidth, (_p = this.orthoRight) !== null && _p !== void 0 ? _p : halfWidth, (_q = this.orthoBottom) !== null && _q !== void 0 ? _q : -halfHeight, (_r = this.orthoTop) !== null && _r !== void 0 ? _r : halfHeight, reverseDepth ? this.maxZ : this.minZ, reverseDepth ? this.minZ : this.maxZ, this._projectionMatrix, engine.isNDCHalfZRange);\n }\n }\n this._cache.orthoLeft = this.orthoLeft;\n this._cache.orthoRight = this.orthoRight;\n this._cache.orthoBottom = this.orthoBottom;\n this._cache.orthoTop = this.orthoTop;\n this._cache.obliqueAngle = (_s = this.oblique) === null || _s === void 0 ? void 0 : _s.angle;\n this._cache.obliqueLength = (_t = this.oblique) === null || _t === void 0 ? void 0 : _t.length;\n this._cache.obliqueOffset = (_u = this.oblique) === null || _u === void 0 ? void 0 : _u.offset;\n this._cache.renderWidth = engine.getRenderWidth();\n this._cache.renderHeight = engine.getRenderHeight();\n }\n this.onProjectionMatrixChangedObservable.notifyObservers(this);\n return this._projectionMatrix;\n }\n /**\n * Gets the transformation matrix (ie. the multiplication of view by projection matrices)\n * @returns a Matrix\n */\n getTransformationMatrix() {\n this._computedViewMatrix.multiplyToRef(this._projectionMatrix, this._transformMatrix);\n return this._transformMatrix;\n }\n _computeObliqueDistance(offset) {\n const arcRotateCamera = this;\n const targetCamera = this;\n return (arcRotateCamera.radius || (targetCamera.target ? Vector3.Distance(this.position, targetCamera.target) : this.position.length())) + offset;\n }\n _updateFrustumPlanes() {\n if (!this._refreshFrustumPlanes) {\n return;\n }\n this.getTransformationMatrix();\n if (!this._frustumPlanes) {\n this._frustumPlanes = Frustum.GetPlanes(this._transformMatrix);\n }\n else {\n Frustum.GetPlanesToRef(this._transformMatrix, this._frustumPlanes);\n }\n this._refreshFrustumPlanes = false;\n }\n /**\n * Checks if a cullable object (mesh...) is in the camera frustum\n * This checks the bounding box center. See isCompletelyInFrustum for a full bounding check\n * @param target The object to check\n * @param checkRigCameras If the rig cameras should be checked (eg. with VR camera both eyes should be checked) (Default: false)\n * @returns true if the object is in frustum otherwise false\n */\n isInFrustum(target, checkRigCameras = false) {\n this._updateFrustumPlanes();\n if (checkRigCameras && this.rigCameras.length > 0) {\n let result = false;\n this.rigCameras.forEach((cam) => {\n cam._updateFrustumPlanes();\n result = result || target.isInFrustum(cam._frustumPlanes);\n });\n return result;\n }\n else {\n return target.isInFrustum(this._frustumPlanes);\n }\n }\n /**\n * Checks if a cullable object (mesh...) is in the camera frustum\n * Unlike isInFrustum this checks the full bounding box\n * @param target The object to check\n * @returns true if the object is in frustum otherwise false\n */\n isCompletelyInFrustum(target) {\n this._updateFrustumPlanes();\n return target.isCompletelyInFrustum(this._frustumPlanes);\n }\n /**\n * Gets a ray in the forward direction from the camera.\n * @param length Defines the length of the ray to create\n * @param transform Defines the transform to apply to the ray, by default the world matrix is used to create a workd space ray\n * @param origin Defines the start point of the ray which defaults to the camera position\n * @returns the forward ray\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getForwardRay(length = 100, transform, origin) {\n throw _WarnImport(\"Ray\");\n }\n /**\n * Gets a ray in the forward direction from the camera.\n * @param refRay the ray to (re)use when setting the values\n * @param length Defines the length of the ray to create\n * @param transform Defines the transform to apply to the ray, by default the world matrx is used to create a workd space ray\n * @param origin Defines the start point of the ray which defaults to the camera position\n * @returns the forward ray\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getForwardRayToRef(refRay, length = 100, transform, origin) {\n throw _WarnImport(\"Ray\");\n }\n /**\n * Releases resources associated with this node.\n * @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)\n * @param disposeMaterialAndTextures Set to true to also dispose referenced materials and textures (false by default)\n */\n dispose(doNotRecurse, disposeMaterialAndTextures = false) {\n // Observables\n this.onViewMatrixChangedObservable.clear();\n this.onProjectionMatrixChangedObservable.clear();\n this.onAfterCheckInputsObservable.clear();\n this.onRestoreStateObservable.clear();\n // Inputs\n if (this.inputs) {\n this.inputs.clear();\n }\n // Animations\n this.getScene().stopAnimation(this);\n // Remove from scene\n this.getScene().removeCamera(this);\n while (this._rigCameras.length > 0) {\n const camera = this._rigCameras.pop();\n if (camera) {\n camera.dispose();\n }\n }\n if (this._parentContainer) {\n const index = this._parentContainer.cameras.indexOf(this);\n if (index > -1) {\n this._parentContainer.cameras.splice(index, 1);\n }\n this._parentContainer = null;\n }\n // Postprocesses\n if (this._rigPostProcess) {\n this._rigPostProcess.dispose(this);\n this._rigPostProcess = null;\n this._postProcesses.length = 0;\n }\n else if (this.cameraRigMode !== Camera.RIG_MODE_NONE) {\n this._rigPostProcess = null;\n this._postProcesses.length = 0;\n }\n else {\n let i = this._postProcesses.length;\n while (--i >= 0) {\n const postProcess = this._postProcesses[i];\n if (postProcess) {\n postProcess.dispose(this);\n }\n }\n }\n // Render targets\n let i = this.customRenderTargets.length;\n while (--i >= 0) {\n this.customRenderTargets[i].dispose();\n }\n this.customRenderTargets.length = 0;\n // Active Meshes\n this._activeMeshes.dispose();\n this.getScene().getEngine().releaseRenderPassId(this.renderPassId);\n super.dispose(doNotRecurse, disposeMaterialAndTextures);\n }\n /**\n * Gets the left camera of a rig setup in case of Rigged Camera\n */\n get isLeftCamera() {\n return this._isLeftCamera;\n }\n /**\n * Gets the right camera of a rig setup in case of Rigged Camera\n */\n get isRightCamera() {\n return this._isRightCamera;\n }\n /**\n * Gets the left camera of a rig setup in case of Rigged Camera\n */\n get leftCamera() {\n if (this._rigCameras.length < 1) {\n return null;\n }\n return this._rigCameras[0];\n }\n /**\n * Gets the right camera of a rig setup in case of Rigged Camera\n */\n get rightCamera() {\n if (this._rigCameras.length < 2) {\n return null;\n }\n return this._rigCameras[1];\n }\n /**\n * Gets the left camera target of a rig setup in case of Rigged Camera\n * @returns the target position\n */\n getLeftTarget() {\n if (this._rigCameras.length < 1) {\n return null;\n }\n return this._rigCameras[0].getTarget();\n }\n /**\n * Gets the right camera target of a rig setup in case of Rigged Camera\n * @returns the target position\n */\n getRightTarget() {\n if (this._rigCameras.length < 2) {\n return null;\n }\n return this._rigCameras[1].getTarget();\n }\n /**\n * @internal\n */\n setCameraRigMode(mode, rigParams) {\n if (this.cameraRigMode === mode) {\n return;\n }\n while (this._rigCameras.length > 0) {\n const camera = this._rigCameras.pop();\n if (camera) {\n camera.dispose();\n }\n }\n this.cameraRigMode = mode;\n this._cameraRigParams = {};\n //we have to implement stereo camera calcultating left and right viewpoints from interaxialDistance and target,\n //not from a given angle as it is now, but until that complete code rewriting provisional stereoHalfAngle value is introduced\n this._cameraRigParams.interaxialDistance = rigParams.interaxialDistance || 0.0637;\n this._cameraRigParams.stereoHalfAngle = Tools.ToRadians(this._cameraRigParams.interaxialDistance / 0.0637);\n // create the rig cameras, unless none\n if (this.cameraRigMode !== Camera.RIG_MODE_NONE) {\n const leftCamera = this.createRigCamera(this.name + \"_L\", 0);\n if (leftCamera) {\n leftCamera._isLeftCamera = true;\n }\n const rightCamera = this.createRigCamera(this.name + \"_R\", 1);\n if (rightCamera) {\n rightCamera._isRightCamera = true;\n }\n if (leftCamera && rightCamera) {\n this._rigCameras.push(leftCamera);\n this._rigCameras.push(rightCamera);\n }\n }\n this._setRigMode(rigParams);\n this._cascadePostProcessesToRigCams();\n this.update();\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _setRigMode(rigParams) {\n // no-op\n }\n /** @internal */\n _getVRProjectionMatrix() {\n Matrix.PerspectiveFovLHToRef(this._cameraRigParams.vrMetrics.aspectRatioFov, this._cameraRigParams.vrMetrics.aspectRatio, this.minZ, this.maxZ, this._cameraRigParams.vrWorkMatrix, true, this.getEngine().isNDCHalfZRange);\n this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrHMatrix, this._projectionMatrix);\n return this._projectionMatrix;\n }\n /**\n * @internal\n */\n setCameraRigParameter(name, value) {\n if (!this._cameraRigParams) {\n this._cameraRigParams = {};\n }\n this._cameraRigParams[name] = value;\n //provisionnally:\n if (name === \"interaxialDistance\") {\n this._cameraRigParams.stereoHalfAngle = Tools.ToRadians(value / 0.0637);\n }\n }\n /**\n * needs to be overridden by children so sub has required properties to be copied\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n createRigCamera(name, cameraIndex) {\n return null;\n }\n /**\n * May need to be overridden by children\n * @internal\n */\n _updateRigCameras() {\n for (let i = 0; i < this._rigCameras.length; i++) {\n this._rigCameras[i].minZ = this.minZ;\n this._rigCameras[i].maxZ = this.maxZ;\n this._rigCameras[i].fov = this.fov;\n this._rigCameras[i].upVector.copyFrom(this.upVector);\n }\n // only update viewport when ANAGLYPH\n if (this.cameraRigMode === Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH) {\n this._rigCameras[0].viewport = this._rigCameras[1].viewport = this.viewport;\n }\n }\n /** @internal */\n _setupInputs() { }\n /**\n * Serialiaze the camera setup to a json representation\n * @returns the JSON representation\n */\n serialize() {\n const serializationObject = SerializationHelper.Serialize(this);\n serializationObject.uniqueId = this.uniqueId;\n // Type\n serializationObject.type = this.getClassName();\n // Parent\n if (this.parent) {\n this.parent._serializeAsParent(serializationObject);\n }\n if (this.inputs) {\n this.inputs.serialize(serializationObject);\n }\n // Animations\n SerializationHelper.AppendSerializedAnimations(this, serializationObject);\n serializationObject.ranges = this.serializeAnimationRanges();\n serializationObject.isEnabled = this.isEnabled();\n return serializationObject;\n }\n /**\n * Clones the current camera.\n * @param name The cloned camera name\n * @param newParent The cloned camera's new parent (none by default)\n * @returns the cloned camera\n */\n clone(name, newParent = null) {\n const camera = SerializationHelper.Clone(Camera.GetConstructorFromName(this.getClassName(), name, this.getScene(), this.interaxialDistance, this.isStereoscopicSideBySide), this);\n camera.name = name;\n camera.parent = newParent;\n this.onClonedObservable.notifyObservers(camera);\n return camera;\n }\n /**\n * Gets the direction of the camera relative to a given local axis.\n * @param localAxis Defines the reference axis to provide a relative direction.\n * @returns the direction\n */\n getDirection(localAxis) {\n const result = Vector3.Zero();\n this.getDirectionToRef(localAxis, result);\n return result;\n }\n /**\n * Returns the current camera absolute rotation\n */\n get absoluteRotation() {\n this.getWorldMatrix().decompose(undefined, this._absoluteRotation);\n return this._absoluteRotation;\n }\n /**\n * Gets the direction of the camera relative to a given local axis into a passed vector.\n * @param localAxis Defines the reference axis to provide a relative direction.\n * @param result Defines the vector to store the result in\n */\n getDirectionToRef(localAxis, result) {\n Vector3.TransformNormalToRef(localAxis, this.getWorldMatrix(), result);\n }\n /**\n * Gets a camera constructor for a given camera type\n * @param type The type of the camera to construct (should be equal to one of the camera class name)\n * @param name The name of the camera the result will be able to instantiate\n * @param scene The scene the result will construct the camera in\n * @param interaxial_distance In case of stereoscopic setup, the distance between both eyes\n * @param isStereoscopicSideBySide In case of stereoscopic setup, should the sereo be side b side\n * @returns a factory method to construct the camera\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static GetConstructorFromName(type, name, scene, interaxial_distance = 0, isStereoscopicSideBySide = true) {\n const constructorFunc = Node.Construct(type, name, scene, {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n interaxial_distance: interaxial_distance,\n isStereoscopicSideBySide: isStereoscopicSideBySide,\n });\n if (constructorFunc) {\n return constructorFunc;\n }\n // Default to universal camera\n return () => Camera._CreateDefaultParsedCamera(name, scene);\n }\n /**\n * Compute the world matrix of the camera.\n * @returns the camera world matrix\n */\n computeWorldMatrix() {\n return this.getWorldMatrix();\n }\n /**\n * Parse a JSON and creates the camera from the parsed information\n * @param parsedCamera The JSON to parse\n * @param scene The scene to instantiate the camera in\n * @returns the newly constructed camera\n */\n static Parse(parsedCamera, scene) {\n const type = parsedCamera.type;\n const construct = Camera.GetConstructorFromName(type, parsedCamera.name, scene, parsedCamera.interaxial_distance, parsedCamera.isStereoscopicSideBySide);\n const camera = SerializationHelper.Parse(construct, parsedCamera, scene);\n // Parent\n if (parsedCamera.parentId !== undefined) {\n camera._waitingParentId = parsedCamera.parentId;\n }\n // Parent instance index\n if (parsedCamera.parentInstanceIndex !== undefined) {\n camera._waitingParentInstanceIndex = parsedCamera.parentInstanceIndex;\n }\n //If camera has an input manager, let it parse inputs settings\n if (camera.inputs) {\n camera.inputs.parse(parsedCamera);\n camera._setupInputs();\n }\n if (parsedCamera.upVector) {\n camera.upVector = Vector3.FromArray(parsedCamera.upVector); // need to force the upVector\n }\n if (camera.setPosition) {\n // need to force position\n camera.position.copyFromFloats(0, 0, 0);\n camera.setPosition(Vector3.FromArray(parsedCamera.position));\n }\n // Target\n if (parsedCamera.target) {\n if (camera.setTarget) {\n camera.setTarget(Vector3.FromArray(parsedCamera.target));\n }\n }\n // Apply 3d rig, when found\n if (parsedCamera.cameraRigMode) {\n const rigParams = parsedCamera.interaxial_distance ? { interaxialDistance: parsedCamera.interaxial_distance } : {};\n camera.setCameraRigMode(parsedCamera.cameraRigMode, rigParams);\n }\n // Animations\n if (parsedCamera.animations) {\n for (let animationIndex = 0; animationIndex < parsedCamera.animations.length; animationIndex++) {\n const parsedAnimation = parsedCamera.animations[animationIndex];\n const internalClass = GetClass(\"BABYLON.Animation\");\n if (internalClass) {\n camera.animations.push(internalClass.Parse(parsedAnimation));\n }\n }\n Node.ParseAnimationRanges(camera, parsedCamera, scene);\n }\n if (parsedCamera.autoAnimate) {\n scene.beginAnimation(camera, parsedCamera.autoAnimateFrom, parsedCamera.autoAnimateTo, parsedCamera.autoAnimateLoop, parsedCamera.autoAnimateSpeed || 1.0);\n }\n // Check if isEnabled is defined to be back compatible with prior serialized versions.\n if (parsedCamera.isEnabled !== undefined) {\n camera.setEnabled(parsedCamera.isEnabled);\n }\n return camera;\n }\n /** @internal */\n _calculateHandednessMultiplier() {\n let handednessMultiplier = this.getScene().useRightHandedSystem ? -1 : 1;\n if (this.parent && this.parent._getWorldMatrixDeterminant() < 0) {\n handednessMultiplier *= -1;\n }\n return handednessMultiplier;\n }\n}\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nCamera._CreateDefaultParsedCamera = (name, scene) => {\n throw _WarnImport(\"UniversalCamera\");\n};\n/**\n * This is the default projection mode used by the cameras.\n * It helps recreating a feeling of perspective and better appreciate depth.\n * This is the best way to simulate real life cameras.\n */\nCamera.PERSPECTIVE_CAMERA = 0;\n/**\n * This helps creating camera with an orthographic mode.\n * Orthographic is commonly used in engineering as a means to produce object specifications that communicate dimensions unambiguously, each line of 1 unit length (cm, meter..whatever) will appear to have the same length everywhere on the drawing. This allows the drafter to dimension only a subset of lines and let the reader know that other lines of that length on the drawing are also that length in reality. Every parallel line in the drawing is also parallel in the object.\n */\nCamera.ORTHOGRAPHIC_CAMERA = 1;\n/**\n * This is the default FOV mode for perspective cameras.\n * This setting aligns the upper and lower bounds of the viewport to the upper and lower bounds of the camera frustum.\n */\nCamera.FOVMODE_VERTICAL_FIXED = 0;\n/**\n * This setting aligns the left and right bounds of the viewport to the left and right bounds of the camera frustum.\n */\nCamera.FOVMODE_HORIZONTAL_FIXED = 1;\n/**\n * This specifies there is no need for a camera rig.\n * Basically only one eye is rendered corresponding to the camera.\n */\nCamera.RIG_MODE_NONE = 0;\n/**\n * Simulates a camera Rig with one blue eye and one red eye.\n * This can be use with 3d blue and red glasses.\n */\nCamera.RIG_MODE_STEREOSCOPIC_ANAGLYPH = 10;\n/**\n * Defines that both eyes of the camera will be rendered side by side with a parallel target.\n */\nCamera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL = 11;\n/**\n * Defines that both eyes of the camera will be rendered side by side with a none parallel target.\n */\nCamera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED = 12;\n/**\n * Defines that both eyes of the camera will be rendered over under each other.\n */\nCamera.RIG_MODE_STEREOSCOPIC_OVERUNDER = 13;\n/**\n * Defines that both eyes of the camera will be rendered on successive lines interlaced for passive 3d monitors.\n */\nCamera.RIG_MODE_STEREOSCOPIC_INTERLACED = 14;\n/**\n * Defines that both eyes of the camera should be renderered in a VR mode (carbox).\n */\nCamera.RIG_MODE_VR = 20;\n/**\n * Custom rig mode allowing rig cameras to be populated manually with any number of cameras\n */\nCamera.RIG_MODE_CUSTOM = 22;\n/**\n * Defines if by default attaching controls should prevent the default javascript event to continue.\n */\nCamera.ForceAttachControlToAlwaysPreventDefault = false;\n__decorate([\n serializeAsVector3(\"position\")\n], Camera.prototype, \"_position\", void 0);\n__decorate([\n serializeAsVector3(\"upVector\")\n], Camera.prototype, \"_upVector\", void 0);\n__decorate([\n serialize()\n], Camera.prototype, \"orthoLeft\", null);\n__decorate([\n serialize()\n], Camera.prototype, \"orthoRight\", null);\n__decorate([\n serialize()\n], Camera.prototype, \"orthoBottom\", null);\n__decorate([\n serialize()\n], Camera.prototype, \"orthoTop\", null);\n__decorate([\n serialize()\n], Camera.prototype, \"fov\", void 0);\n__decorate([\n serialize()\n], Camera.prototype, \"projectionPlaneTilt\", void 0);\n__decorate([\n serialize()\n], Camera.prototype, \"minZ\", void 0);\n__decorate([\n serialize()\n], Camera.prototype, \"maxZ\", void 0);\n__decorate([\n serialize()\n], Camera.prototype, \"inertia\", void 0);\n__decorate([\n serialize()\n], Camera.prototype, \"mode\", null);\n__decorate([\n serialize()\n], Camera.prototype, \"layerMask\", void 0);\n__decorate([\n serialize()\n], Camera.prototype, \"fovMode\", void 0);\n__decorate([\n serialize()\n], Camera.prototype, \"cameraRigMode\", void 0);\n__decorate([\n serialize()\n], Camera.prototype, \"interaxialDistance\", void 0);\n__decorate([\n serialize()\n], Camera.prototype, \"isStereoscopicSideBySide\", void 0);\n//# sourceMappingURL=camera.js.map","/**\n * This class implement a typical dictionary using a string as key and the generic type T as value.\n * The underlying implementation relies on an associative array to ensure the best performances.\n * The value can be anything including 'null' but except 'undefined'\n */\nexport class StringDictionary {\n constructor() {\n this._count = 0;\n this._data = {};\n }\n /**\n * This will clear this dictionary and copy the content from the 'source' one.\n * If the T value is a custom object, it won't be copied/cloned, the same object will be used\n * @param source the dictionary to take the content from and copy to this dictionary\n */\n copyFrom(source) {\n this.clear();\n source.forEach((t, v) => this.add(t, v));\n }\n /**\n * Get a value based from its key\n * @param key the given key to get the matching value from\n * @returns the value if found, otherwise undefined is returned\n */\n get(key) {\n const val = this._data[key];\n if (val !== undefined) {\n return val;\n }\n return undefined;\n }\n /**\n * Get a value from its key or add it if it doesn't exist.\n * This method will ensure you that a given key/data will be present in the dictionary.\n * @param key the given key to get the matching value from\n * @param factory the factory that will create the value if the key is not present in the dictionary.\n * The factory will only be invoked if there's no data for the given key.\n * @returns the value corresponding to the key.\n */\n getOrAddWithFactory(key, factory) {\n let val = this.get(key);\n if (val !== undefined) {\n return val;\n }\n val = factory(key);\n if (val) {\n this.add(key, val);\n }\n return val;\n }\n /**\n * Get a value from its key if present in the dictionary otherwise add it\n * @param key the key to get the value from\n * @param val if there's no such key/value pair in the dictionary add it with this value\n * @returns the value corresponding to the key\n */\n getOrAdd(key, val) {\n const curVal = this.get(key);\n if (curVal !== undefined) {\n return curVal;\n }\n this.add(key, val);\n return val;\n }\n /**\n * Check if there's a given key in the dictionary\n * @param key the key to check for\n * @returns true if the key is present, false otherwise\n */\n contains(key) {\n return this._data[key] !== undefined;\n }\n /**\n * Add a new key and its corresponding value\n * @param key the key to add\n * @param value the value corresponding to the key\n * @returns true if the operation completed successfully, false if we couldn't insert the key/value because there was already this key in the dictionary\n */\n add(key, value) {\n if (this._data[key] !== undefined) {\n return false;\n }\n this._data[key] = value;\n ++this._count;\n return true;\n }\n /**\n * Update a specific value associated to a key\n * @param key defines the key to use\n * @param value defines the value to store\n * @returns true if the value was updated (or false if the key was not found)\n */\n set(key, value) {\n if (this._data[key] === undefined) {\n return false;\n }\n this._data[key] = value;\n return true;\n }\n /**\n * Get the element of the given key and remove it from the dictionary\n * @param key defines the key to search\n * @returns the value associated with the key or null if not found\n */\n getAndRemove(key) {\n const val = this.get(key);\n if (val !== undefined) {\n delete this._data[key];\n --this._count;\n return val;\n }\n return null;\n }\n /**\n * Remove a key/value from the dictionary.\n * @param key the key to remove\n * @returns true if the item was successfully deleted, false if no item with such key exist in the dictionary\n */\n remove(key) {\n if (this.contains(key)) {\n delete this._data[key];\n --this._count;\n return true;\n }\n return false;\n }\n /**\n * Clear the whole content of the dictionary\n */\n clear() {\n this._data = {};\n this._count = 0;\n }\n /**\n * Gets the current count\n */\n get count() {\n return this._count;\n }\n /**\n * Execute a callback on each key/val of the dictionary.\n * Note that you can remove any element in this dictionary in the callback implementation\n * @param callback the callback to execute on a given key/value pair\n */\n forEach(callback) {\n for (const cur in this._data) {\n const val = this._data[cur];\n callback(cur, val);\n }\n }\n /**\n * Execute a callback on every occurrence of the dictionary until it returns a valid TRes object.\n * If the callback returns null or undefined the method will iterate to the next key/value pair\n * Note that you can remove any element in this dictionary in the callback implementation\n * @param callback the callback to execute, if it return a valid T instanced object the enumeration will stop and the object will be returned\n * @returns the first item\n */\n first(callback) {\n for (const cur in this._data) {\n const val = this._data[cur];\n const res = callback(cur, val);\n if (res) {\n return res;\n }\n }\n return null;\n }\n}\n//# sourceMappingURL=stringDictionary.js.map","/**\n * Base class of the scene acting as a container for the different elements composing a scene.\n * This class is dynamically extended by the different components of the scene increasing\n * flexibility and reducing coupling\n */\nexport class AbstractScene {\n constructor() {\n /**\n * Gets the list of root nodes (ie. nodes with no parent)\n */\n this.rootNodes = [];\n /** All of the cameras added to this scene\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras\n */\n this.cameras = [];\n /**\n * All of the lights added to this scene\n * @see https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n */\n this.lights = [];\n /**\n * All of the (abstract) meshes added to this scene\n */\n this.meshes = [];\n /**\n * The list of skeletons added to the scene\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons\n */\n this.skeletons = [];\n /**\n * All of the particle systems added to this scene\n * @see https://doc.babylonjs.com/features/featuresDeepDive/particles/particle_system/particle_system_intro\n */\n this.particleSystems = [];\n /**\n * Gets a list of Animations associated with the scene\n */\n this.animations = [];\n /**\n * All of the animation groups added to this scene\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/groupAnimations\n */\n this.animationGroups = [];\n /**\n * All of the multi-materials added to this scene\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/multiMaterials\n */\n this.multiMaterials = [];\n /**\n * All of the materials added to this scene\n * In the context of a Scene, it is not supposed to be modified manually.\n * Any addition or removal should be done using the addMaterial and removeMaterial Scene methods.\n * Note also that the order of the Material within the array is not significant and might change.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction\n */\n this.materials = [];\n /**\n * The list of morph target managers added to the scene\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph\n */\n this.morphTargetManagers = [];\n /**\n * The list of geometries used in the scene.\n */\n this.geometries = [];\n /**\n * All of the transform nodes added to this scene\n * In the context of a Scene, it is not supposed to be modified manually.\n * Any addition or removal should be done using the addTransformNode and removeTransformNode Scene methods.\n * Note also that the order of the TransformNode within the array is not significant and might change.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/transform_node\n */\n this.transformNodes = [];\n /**\n * ActionManagers available on the scene.\n * @deprecated\n */\n this.actionManagers = [];\n /**\n * Textures to keep.\n */\n this.textures = [];\n /** @internal */\n this._environmentTexture = null;\n /**\n * The list of postprocesses added to the scene\n */\n this.postProcesses = [];\n }\n /**\n * Adds a parser in the list of available ones\n * @param name Defines the name of the parser\n * @param parser Defines the parser to add\n */\n static AddParser(name, parser) {\n this._BabylonFileParsers[name] = parser;\n }\n /**\n * Gets a general parser from the list of available ones\n * @param name Defines the name of the parser\n * @returns the requested parser or null\n */\n static GetParser(name) {\n if (this._BabylonFileParsers[name]) {\n return this._BabylonFileParsers[name];\n }\n return null;\n }\n /**\n * Adds n individual parser in the list of available ones\n * @param name Defines the name of the parser\n * @param parser Defines the parser to add\n */\n static AddIndividualParser(name, parser) {\n this._IndividualBabylonFileParsers[name] = parser;\n }\n /**\n * Gets an individual parser from the list of available ones\n * @param name Defines the name of the parser\n * @returns the requested parser or null\n */\n static GetIndividualParser(name) {\n if (this._IndividualBabylonFileParsers[name]) {\n return this._IndividualBabylonFileParsers[name];\n }\n return null;\n }\n /**\n * Parser json data and populate both a scene and its associated container object\n * @param jsonData Defines the data to parse\n * @param scene Defines the scene to parse the data for\n * @param container Defines the container attached to the parsing sequence\n * @param rootUrl Defines the root url of the data\n */\n static Parse(jsonData, scene, container, rootUrl) {\n for (const parserName in this._BabylonFileParsers) {\n if (Object.prototype.hasOwnProperty.call(this._BabylonFileParsers, parserName)) {\n this._BabylonFileParsers[parserName](jsonData, scene, container, rootUrl);\n }\n }\n }\n /**\n * Texture used in all pbr material as the reflection texture.\n * As in the majority of the scene they are the same (exception for multi room and so on),\n * this is easier to reference from here than from all the materials.\n */\n get environmentTexture() {\n return this._environmentTexture;\n }\n set environmentTexture(value) {\n this._environmentTexture = value;\n }\n /**\n * @returns all meshes, lights, cameras, transformNodes and bones\n */\n getNodes() {\n let nodes = [];\n nodes = nodes.concat(this.meshes);\n nodes = nodes.concat(this.lights);\n nodes = nodes.concat(this.cameras);\n nodes = nodes.concat(this.transformNodes); // dummies\n this.skeletons.forEach((skeleton) => (nodes = nodes.concat(skeleton.bones)));\n return nodes;\n }\n}\n/**\n * Stores the list of available parsers in the application.\n */\nAbstractScene._BabylonFileParsers = {};\n/**\n * Stores the list of available individual parsers in the application.\n */\nAbstractScene._IndividualBabylonFileParsers = {};\n//# sourceMappingURL=abstractScene.js.map","/**\n * Manages the defines for the Material\n */\nexport class MaterialDefines {\n /**\n * Creates a new instance\n * @param externalProperties list of external properties to inject into the object\n */\n constructor(externalProperties) {\n /** @internal */\n this._keys = [];\n this._isDirty = true;\n /** @internal */\n this._areLightsDirty = true;\n /** @internal */\n this._areLightsDisposed = false;\n /** @internal */\n this._areAttributesDirty = true;\n /** @internal */\n this._areTexturesDirty = true;\n /** @internal */\n this._areFresnelDirty = true;\n /** @internal */\n this._areMiscDirty = true;\n /** @internal */\n this._arePrePassDirty = true;\n /** @internal */\n this._areImageProcessingDirty = true;\n /** @internal */\n this._normals = false;\n /** @internal */\n this._uvs = false;\n /** @internal */\n this._needNormals = false;\n /** @internal */\n this._needUVs = false;\n this._externalProperties = externalProperties;\n // Initialize External Properties\n if (externalProperties) {\n for (const prop in externalProperties) {\n if (Object.prototype.hasOwnProperty.call(externalProperties, prop)) {\n this._setDefaultValue(prop);\n }\n }\n }\n }\n /**\n * Specifies if the material needs to be re-calculated\n */\n get isDirty() {\n return this._isDirty;\n }\n /**\n * Marks the material to indicate that it has been re-calculated\n */\n markAsProcessed() {\n this._isDirty = false;\n this._areAttributesDirty = false;\n this._areTexturesDirty = false;\n this._areFresnelDirty = false;\n this._areLightsDirty = false;\n this._areLightsDisposed = false;\n this._areMiscDirty = false;\n this._arePrePassDirty = false;\n this._areImageProcessingDirty = false;\n }\n /**\n * Marks the material to indicate that it needs to be re-calculated\n */\n markAsUnprocessed() {\n this._isDirty = true;\n }\n /**\n * Marks the material to indicate all of its defines need to be re-calculated\n */\n markAllAsDirty() {\n this._areTexturesDirty = true;\n this._areAttributesDirty = true;\n this._areLightsDirty = true;\n this._areFresnelDirty = true;\n this._areMiscDirty = true;\n this._arePrePassDirty = false;\n this._areImageProcessingDirty = true;\n this._isDirty = true;\n }\n /**\n * Marks the material to indicate that image processing needs to be re-calculated\n */\n markAsImageProcessingDirty() {\n this._areImageProcessingDirty = true;\n this._isDirty = true;\n }\n /**\n * Marks the material to indicate the lights need to be re-calculated\n * @param disposed Defines whether the light is dirty due to dispose or not\n */\n markAsLightDirty(disposed = false) {\n this._areLightsDirty = true;\n this._areLightsDisposed = this._areLightsDisposed || disposed;\n this._isDirty = true;\n }\n /**\n * Marks the attribute state as changed\n */\n markAsAttributesDirty() {\n this._areAttributesDirty = true;\n this._isDirty = true;\n }\n /**\n * Marks the texture state as changed\n */\n markAsTexturesDirty() {\n this._areTexturesDirty = true;\n this._isDirty = true;\n }\n /**\n * Marks the fresnel state as changed\n */\n markAsFresnelDirty() {\n this._areFresnelDirty = true;\n this._isDirty = true;\n }\n /**\n * Marks the misc state as changed\n */\n markAsMiscDirty() {\n this._areMiscDirty = true;\n this._isDirty = true;\n }\n /**\n * Marks the prepass state as changed\n */\n markAsPrePassDirty() {\n this._arePrePassDirty = true;\n this._isDirty = true;\n }\n /**\n * Rebuilds the material defines\n */\n rebuild() {\n this._keys.length = 0;\n for (const key of Object.keys(this)) {\n if (key[0] === \"_\") {\n continue;\n }\n this._keys.push(key);\n }\n if (this._externalProperties) {\n for (const name in this._externalProperties) {\n if (this._keys.indexOf(name) === -1) {\n this._keys.push(name);\n }\n }\n }\n }\n /**\n * Specifies if two material defines are equal\n * @param other - A material define instance to compare to\n * @returns - Boolean indicating if the material defines are equal (true) or not (false)\n */\n isEqual(other) {\n if (this._keys.length !== other._keys.length) {\n return false;\n }\n for (let index = 0; index < this._keys.length; index++) {\n const prop = this._keys[index];\n if (this[prop] !== other[prop]) {\n return false;\n }\n }\n return true;\n }\n /**\n * Clones this instance's defines to another instance\n * @param other - material defines to clone values to\n */\n cloneTo(other) {\n if (this._keys.length !== other._keys.length) {\n other._keys = this._keys.slice(0);\n }\n for (let index = 0; index < this._keys.length; index++) {\n const prop = this._keys[index];\n other[prop] = this[prop];\n }\n }\n /**\n * Resets the material define values\n */\n reset() {\n this._keys.forEach((prop) => this._setDefaultValue(prop));\n }\n _setDefaultValue(prop) {\n var _a, _b, _c, _d, _e;\n const type = (_c = (_b = (_a = this._externalProperties) === null || _a === void 0 ? void 0 : _a[prop]) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : typeof this[prop];\n const defValue = (_e = (_d = this._externalProperties) === null || _d === void 0 ? void 0 : _d[prop]) === null || _e === void 0 ? void 0 : _e.default;\n switch (type) {\n case \"number\":\n this[prop] = defValue !== null && defValue !== void 0 ? defValue : 0;\n break;\n case \"string\":\n this[prop] = defValue !== null && defValue !== void 0 ? defValue : \"\";\n break;\n default:\n this[prop] = defValue !== null && defValue !== void 0 ? defValue : false;\n break;\n }\n }\n /**\n * Converts the material define values to a string\n * @returns - String of material define information\n */\n toString() {\n let result = \"\";\n for (let index = 0; index < this._keys.length; index++) {\n const prop = this._keys[index];\n const value = this[prop];\n const type = typeof value;\n switch (type) {\n case \"number\":\n case \"string\":\n result += \"#define \" + prop + \" \" + value + \"\\n\";\n break;\n default:\n if (value) {\n result += \"#define \" + prop + \"\\n\";\n }\n break;\n }\n }\n return result;\n }\n}\n//# sourceMappingURL=materialDefines.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { SerializationHelper, serialize } from \"../Misc/decorators.js\";\nimport { Color4 } from \"../Maths/math.color.js\";\n/**\n * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).\n * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.\n * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;\n * corresponding to low luminance, medium luminance, and high luminance areas respectively.\n */\nexport class ColorCurves {\n constructor() {\n this._dirty = true;\n this._tempColor = new Color4(0, 0, 0, 0);\n this._globalCurve = new Color4(0, 0, 0, 0);\n this._highlightsCurve = new Color4(0, 0, 0, 0);\n this._midtonesCurve = new Color4(0, 0, 0, 0);\n this._shadowsCurve = new Color4(0, 0, 0, 0);\n this._positiveCurve = new Color4(0, 0, 0, 0);\n this._negativeCurve = new Color4(0, 0, 0, 0);\n this._globalHue = 30;\n this._globalDensity = 0;\n this._globalSaturation = 0;\n this._globalExposure = 0;\n this._highlightsHue = 30;\n this._highlightsDensity = 0;\n this._highlightsSaturation = 0;\n this._highlightsExposure = 0;\n this._midtonesHue = 30;\n this._midtonesDensity = 0;\n this._midtonesSaturation = 0;\n this._midtonesExposure = 0;\n this._shadowsHue = 30;\n this._shadowsDensity = 0;\n this._shadowsSaturation = 0;\n this._shadowsExposure = 0;\n }\n /**\n * Gets the global Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get globalHue() {\n return this._globalHue;\n }\n /**\n * Sets the global Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set globalHue(value) {\n this._globalHue = value;\n this._dirty = true;\n }\n /**\n * Gets the global Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get globalDensity() {\n return this._globalDensity;\n }\n /**\n * Sets the global Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set globalDensity(value) {\n this._globalDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the global Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get globalSaturation() {\n return this._globalSaturation;\n }\n /**\n * Sets the global Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set globalSaturation(value) {\n this._globalSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the global Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get globalExposure() {\n return this._globalExposure;\n }\n /**\n * Sets the global Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set globalExposure(value) {\n this._globalExposure = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get highlightsHue() {\n return this._highlightsHue;\n }\n /**\n * Sets the highlights Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set highlightsHue(value) {\n this._highlightsHue = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get highlightsDensity() {\n return this._highlightsDensity;\n }\n /**\n * Sets the highlights Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set highlightsDensity(value) {\n this._highlightsDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get highlightsSaturation() {\n return this._highlightsSaturation;\n }\n /**\n * Sets the highlights Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set highlightsSaturation(value) {\n this._highlightsSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get highlightsExposure() {\n return this._highlightsExposure;\n }\n /**\n * Sets the highlights Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set highlightsExposure(value) {\n this._highlightsExposure = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get midtonesHue() {\n return this._midtonesHue;\n }\n /**\n * Sets the midtones Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set midtonesHue(value) {\n this._midtonesHue = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get midtonesDensity() {\n return this._midtonesDensity;\n }\n /**\n * Sets the midtones Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set midtonesDensity(value) {\n this._midtonesDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get midtonesSaturation() {\n return this._midtonesSaturation;\n }\n /**\n * Sets the midtones Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set midtonesSaturation(value) {\n this._midtonesSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get midtonesExposure() {\n return this._midtonesExposure;\n }\n /**\n * Sets the midtones Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set midtonesExposure(value) {\n this._midtonesExposure = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get shadowsHue() {\n return this._shadowsHue;\n }\n /**\n * Sets the shadows Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set shadowsHue(value) {\n this._shadowsHue = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get shadowsDensity() {\n return this._shadowsDensity;\n }\n /**\n * Sets the shadows Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set shadowsDensity(value) {\n this._shadowsDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get shadowsSaturation() {\n return this._shadowsSaturation;\n }\n /**\n * Sets the shadows Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set shadowsSaturation(value) {\n this._shadowsSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get shadowsExposure() {\n return this._shadowsExposure;\n }\n /**\n * Sets the shadows Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set shadowsExposure(value) {\n this._shadowsExposure = value;\n this._dirty = true;\n }\n /**\n * Returns the class name\n * @returns The class name\n */\n getClassName() {\n return \"ColorCurves\";\n }\n /**\n * Binds the color curves to the shader.\n * @param colorCurves The color curve to bind\n * @param effect The effect to bind to\n * @param positiveUniform The positive uniform shader parameter\n * @param neutralUniform The neutral uniform shader parameter\n * @param negativeUniform The negative uniform shader parameter\n */\n static Bind(colorCurves, effect, positiveUniform = \"vCameraColorCurvePositive\", neutralUniform = \"vCameraColorCurveNeutral\", negativeUniform = \"vCameraColorCurveNegative\") {\n if (colorCurves._dirty) {\n colorCurves._dirty = false;\n // Fill in global info.\n colorCurves._getColorGradingDataToRef(colorCurves._globalHue, colorCurves._globalDensity, colorCurves._globalSaturation, colorCurves._globalExposure, colorCurves._globalCurve);\n // Compute highlights info.\n colorCurves._getColorGradingDataToRef(colorCurves._highlightsHue, colorCurves._highlightsDensity, colorCurves._highlightsSaturation, colorCurves._highlightsExposure, colorCurves._tempColor);\n colorCurves._tempColor.multiplyToRef(colorCurves._globalCurve, colorCurves._highlightsCurve);\n // Compute midtones info.\n colorCurves._getColorGradingDataToRef(colorCurves._midtonesHue, colorCurves._midtonesDensity, colorCurves._midtonesSaturation, colorCurves._midtonesExposure, colorCurves._tempColor);\n colorCurves._tempColor.multiplyToRef(colorCurves._globalCurve, colorCurves._midtonesCurve);\n // Compute shadows info.\n colorCurves._getColorGradingDataToRef(colorCurves._shadowsHue, colorCurves._shadowsDensity, colorCurves._shadowsSaturation, colorCurves._shadowsExposure, colorCurves._tempColor);\n colorCurves._tempColor.multiplyToRef(colorCurves._globalCurve, colorCurves._shadowsCurve);\n // Compute deltas (neutral is midtones).\n colorCurves._highlightsCurve.subtractToRef(colorCurves._midtonesCurve, colorCurves._positiveCurve);\n colorCurves._midtonesCurve.subtractToRef(colorCurves._shadowsCurve, colorCurves._negativeCurve);\n }\n if (effect) {\n effect.setFloat4(positiveUniform, colorCurves._positiveCurve.r, colorCurves._positiveCurve.g, colorCurves._positiveCurve.b, colorCurves._positiveCurve.a);\n effect.setFloat4(neutralUniform, colorCurves._midtonesCurve.r, colorCurves._midtonesCurve.g, colorCurves._midtonesCurve.b, colorCurves._midtonesCurve.a);\n effect.setFloat4(negativeUniform, colorCurves._negativeCurve.r, colorCurves._negativeCurve.g, colorCurves._negativeCurve.b, colorCurves._negativeCurve.a);\n }\n }\n /**\n * Prepare the list of uniforms associated with the ColorCurves effects.\n * @param uniformsList The list of uniforms used in the effect\n */\n static PrepareUniforms(uniformsList) {\n uniformsList.push(\"vCameraColorCurveNeutral\", \"vCameraColorCurvePositive\", \"vCameraColorCurveNegative\");\n }\n /**\n * Returns color grading data based on a hue, density, saturation and exposure value.\n * @param hue\n * @param density\n * @param saturation The saturation.\n * @param exposure The exposure.\n * @param result The result data container.\n */\n _getColorGradingDataToRef(hue, density, saturation, exposure, result) {\n if (hue == null) {\n return;\n }\n hue = ColorCurves._Clamp(hue, 0, 360);\n density = ColorCurves._Clamp(density, -100, 100);\n saturation = ColorCurves._Clamp(saturation, -100, 100);\n exposure = ColorCurves._Clamp(exposure, -100, 100);\n // Remap the slider/config filter density with non-linear mapping and also scale by half\n // so that the maximum filter density is only 50% control. This provides fine control\n // for small values and reasonable range.\n density = ColorCurves._ApplyColorGradingSliderNonlinear(density);\n density *= 0.5;\n exposure = ColorCurves._ApplyColorGradingSliderNonlinear(exposure);\n if (density < 0) {\n density *= -1;\n hue = (hue + 180) % 360;\n }\n ColorCurves._FromHSBToRef(hue, density, 50 + 0.25 * exposure, result);\n result.scaleToRef(2, result);\n result.a = 1 + 0.01 * saturation;\n }\n /**\n * Takes an input slider value and returns an adjusted value that provides extra control near the centre.\n * @param value The input slider value in range [-100,100].\n * @returns Adjusted value.\n */\n static _ApplyColorGradingSliderNonlinear(value) {\n value /= 100;\n let x = Math.abs(value);\n x = Math.pow(x, 2);\n if (value < 0) {\n x *= -1;\n }\n x *= 100;\n return x;\n }\n /**\n * Returns an RGBA Color4 based on Hue, Saturation and Brightness (also referred to as value, HSV).\n * @param hue The hue (H) input.\n * @param saturation The saturation (S) input.\n * @param brightness The brightness (B) input.\n * @param result\n * @result An RGBA color represented as Vector4.\n */\n static _FromHSBToRef(hue, saturation, brightness, result) {\n let h = ColorCurves._Clamp(hue, 0, 360);\n const s = ColorCurves._Clamp(saturation / 100, 0, 1);\n const v = ColorCurves._Clamp(brightness / 100, 0, 1);\n if (s === 0) {\n result.r = v;\n result.g = v;\n result.b = v;\n }\n else {\n // sector 0 to 5\n h /= 60;\n const i = Math.floor(h);\n // fractional part of h\n const f = h - i;\n const p = v * (1 - s);\n const q = v * (1 - s * f);\n const t = v * (1 - s * (1 - f));\n switch (i) {\n case 0:\n result.r = v;\n result.g = t;\n result.b = p;\n break;\n case 1:\n result.r = q;\n result.g = v;\n result.b = p;\n break;\n case 2:\n result.r = p;\n result.g = v;\n result.b = t;\n break;\n case 3:\n result.r = p;\n result.g = q;\n result.b = v;\n break;\n case 4:\n result.r = t;\n result.g = p;\n result.b = v;\n break;\n default:\n // case 5:\n result.r = v;\n result.g = p;\n result.b = q;\n break;\n }\n }\n result.a = 1;\n }\n /**\n * Returns a value clamped between min and max\n * @param value The value to clamp\n * @param min The minimum of value\n * @param max The maximum of value\n * @returns The clamped value.\n */\n static _Clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n }\n /**\n * Clones the current color curve instance.\n * @returns The cloned curves\n */\n clone() {\n return SerializationHelper.Clone(() => new ColorCurves(), this);\n }\n /**\n * Serializes the current color curve instance to a json representation.\n * @returns a JSON representation\n */\n serialize() {\n return SerializationHelper.Serialize(this);\n }\n /**\n * Parses the color curve from a json representation.\n * @param source the JSON source to parse\n * @returns The parsed curves\n */\n static Parse(source) {\n return SerializationHelper.Parse(() => new ColorCurves(), source, null, null);\n }\n}\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_globalHue\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_globalDensity\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_globalSaturation\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_globalExposure\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_highlightsHue\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_highlightsDensity\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_highlightsSaturation\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_highlightsExposure\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_midtonesHue\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_midtonesDensity\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_midtonesSaturation\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_midtonesExposure\", void 0);\n// References the dependencies.\nSerializationHelper._ColorCurvesParser = ColorCurves.Parse;\n//# sourceMappingURL=colorCurves.js.map","import { __decorate } from \"../tslib.es6.js\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { serialize, SerializationHelper, serializeAsTexture, serializeAsColorCurves, serializeAsColor4 } from \"../Misc/decorators.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { Tools } from \"../Misc/tools.js\";\nimport { Color4 } from \"../Maths/math.color.js\";\nimport { MaterialDefines } from \"../Materials/materialDefines.js\";\nimport { ColorCurves } from \"../Materials/colorCurves.js\";\n/**\n * @internal\n */\nexport class ImageProcessingConfigurationDefines extends MaterialDefines {\n constructor() {\n super();\n this.IMAGEPROCESSING = false;\n this.VIGNETTE = false;\n this.VIGNETTEBLENDMODEMULTIPLY = false;\n this.VIGNETTEBLENDMODEOPAQUE = false;\n this.TONEMAPPING = false;\n this.TONEMAPPING_ACES = false;\n this.CONTRAST = false;\n this.COLORCURVES = false;\n this.COLORGRADING = false;\n this.COLORGRADING3D = false;\n this.SAMPLER3DGREENDEPTH = false;\n this.SAMPLER3DBGRMAP = false;\n this.DITHER = false;\n this.IMAGEPROCESSINGPOSTPROCESS = false;\n this.EXPOSURE = false;\n this.SKIPFINALCOLORCLAMP = false;\n this.rebuild();\n }\n}\n/**\n * This groups together the common properties used for image processing either in direct forward pass\n * or through post processing effect depending on the use of the image processing pipeline in your scene\n * or not.\n */\nexport class ImageProcessingConfiguration {\n constructor() {\n /**\n * Color curves setup used in the effect if colorCurvesEnabled is set to true\n */\n this.colorCurves = new ColorCurves();\n this._colorCurvesEnabled = false;\n this._colorGradingEnabled = false;\n this._colorGradingWithGreenDepth = true;\n this._colorGradingBGR = true;\n /** @internal */\n this._exposure = 1.0;\n this._toneMappingEnabled = false;\n this._toneMappingType = ImageProcessingConfiguration.TONEMAPPING_STANDARD;\n this._contrast = 1.0;\n /**\n * Vignette stretch size.\n */\n this.vignetteStretch = 0;\n /**\n * Vignette center X Offset.\n */\n this.vignetteCenterX = 0;\n /**\n * Vignette center Y Offset.\n */\n this.vignetteCenterY = 0;\n /**\n * Vignette weight or intensity of the vignette effect.\n */\n this.vignetteWeight = 1.5;\n /**\n * Color of the vignette applied on the screen through the chosen blend mode (vignetteBlendMode)\n * if vignetteEnabled is set to true.\n */\n this.vignetteColor = new Color4(0, 0, 0, 0);\n /**\n * Camera field of view used by the Vignette effect.\n */\n this.vignetteCameraFov = 0.5;\n this._vignetteBlendMode = ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY;\n this._vignetteEnabled = false;\n this._ditheringEnabled = false;\n this._ditheringIntensity = 1.0 / 255.0;\n /** @internal */\n this._skipFinalColorClamp = false;\n /** @internal */\n this._applyByPostProcess = false;\n this._isEnabled = true;\n /**\n * An event triggered when the configuration changes and requires Shader to Update some parameters.\n */\n this.onUpdateParameters = new Observable();\n }\n /**\n * Gets whether the color curves effect is enabled.\n */\n get colorCurvesEnabled() {\n return this._colorCurvesEnabled;\n }\n /**\n * Sets whether the color curves effect is enabled.\n */\n set colorCurvesEnabled(value) {\n if (this._colorCurvesEnabled === value) {\n return;\n }\n this._colorCurvesEnabled = value;\n this._updateParameters();\n }\n /**\n * Color grading LUT texture used in the effect if colorGradingEnabled is set to true\n */\n get colorGradingTexture() {\n return this._colorGradingTexture;\n }\n /**\n * Color grading LUT texture used in the effect if colorGradingEnabled is set to true\n */\n set colorGradingTexture(value) {\n if (this._colorGradingTexture === value) {\n return;\n }\n this._colorGradingTexture = value;\n this._updateParameters();\n }\n /**\n * Gets whether the color grading effect is enabled.\n */\n get colorGradingEnabled() {\n return this._colorGradingEnabled;\n }\n /**\n * Sets whether the color grading effect is enabled.\n */\n set colorGradingEnabled(value) {\n if (this._colorGradingEnabled === value) {\n return;\n }\n this._colorGradingEnabled = value;\n this._updateParameters();\n }\n /**\n * Gets whether the color grading effect is using a green depth for the 3d Texture.\n */\n get colorGradingWithGreenDepth() {\n return this._colorGradingWithGreenDepth;\n }\n /**\n * Sets whether the color grading effect is using a green depth for the 3d Texture.\n */\n set colorGradingWithGreenDepth(value) {\n if (this._colorGradingWithGreenDepth === value) {\n return;\n }\n this._colorGradingWithGreenDepth = value;\n this._updateParameters();\n }\n /**\n * Gets whether the color grading texture contains BGR values.\n */\n get colorGradingBGR() {\n return this._colorGradingBGR;\n }\n /**\n * Sets whether the color grading texture contains BGR values.\n */\n set colorGradingBGR(value) {\n if (this._colorGradingBGR === value) {\n return;\n }\n this._colorGradingBGR = value;\n this._updateParameters();\n }\n /**\n * Gets the Exposure used in the effect.\n */\n get exposure() {\n return this._exposure;\n }\n /**\n * Sets the Exposure used in the effect.\n */\n set exposure(value) {\n if (this._exposure === value) {\n return;\n }\n this._exposure = value;\n this._updateParameters();\n }\n /**\n * Gets whether the tone mapping effect is enabled.\n */\n get toneMappingEnabled() {\n return this._toneMappingEnabled;\n }\n /**\n * Sets whether the tone mapping effect is enabled.\n */\n set toneMappingEnabled(value) {\n if (this._toneMappingEnabled === value) {\n return;\n }\n this._toneMappingEnabled = value;\n this._updateParameters();\n }\n /**\n * Gets the type of tone mapping effect.\n */\n get toneMappingType() {\n return this._toneMappingType;\n }\n /**\n * Sets the type of tone mapping effect used in BabylonJS.\n */\n set toneMappingType(value) {\n if (this._toneMappingType === value) {\n return;\n }\n this._toneMappingType = value;\n this._updateParameters();\n }\n /**\n * Gets the contrast used in the effect.\n */\n get contrast() {\n return this._contrast;\n }\n /**\n * Sets the contrast used in the effect.\n */\n set contrast(value) {\n if (this._contrast === value) {\n return;\n }\n this._contrast = value;\n this._updateParameters();\n }\n /**\n * Back Compat: Vignette center Y Offset.\n * @deprecated use vignetteCenterY instead\n */\n get vignetteCentreY() {\n return this.vignetteCenterY;\n }\n set vignetteCentreY(value) {\n this.vignetteCenterY = value;\n }\n /**\n * Back Compat: Vignette center X Offset.\n * @deprecated use vignetteCenterX instead\n */\n get vignetteCentreX() {\n return this.vignetteCenterX;\n }\n set vignetteCentreX(value) {\n this.vignetteCenterX = value;\n }\n /**\n * Gets the vignette blend mode allowing different kind of effect.\n */\n get vignetteBlendMode() {\n return this._vignetteBlendMode;\n }\n /**\n * Sets the vignette blend mode allowing different kind of effect.\n */\n set vignetteBlendMode(value) {\n if (this._vignetteBlendMode === value) {\n return;\n }\n this._vignetteBlendMode = value;\n this._updateParameters();\n }\n /**\n * Gets whether the vignette effect is enabled.\n */\n get vignetteEnabled() {\n return this._vignetteEnabled;\n }\n /**\n * Sets whether the vignette effect is enabled.\n */\n set vignetteEnabled(value) {\n if (this._vignetteEnabled === value) {\n return;\n }\n this._vignetteEnabled = value;\n this._updateParameters();\n }\n /**\n * Gets whether the dithering effect is enabled.\n * The dithering effect can be used to reduce banding.\n */\n get ditheringEnabled() {\n return this._ditheringEnabled;\n }\n /**\n * Sets whether the dithering effect is enabled.\n * The dithering effect can be used to reduce banding.\n */\n set ditheringEnabled(value) {\n if (this._ditheringEnabled === value) {\n return;\n }\n this._ditheringEnabled = value;\n this._updateParameters();\n }\n /**\n * Gets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.\n */\n get ditheringIntensity() {\n return this._ditheringIntensity;\n }\n /**\n * Sets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.\n */\n set ditheringIntensity(value) {\n if (this._ditheringIntensity === value) {\n return;\n }\n this._ditheringIntensity = value;\n this._updateParameters();\n }\n /**\n * If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader\n * Applies to PBR materials.\n */\n get skipFinalColorClamp() {\n return this._skipFinalColorClamp;\n }\n /**\n * If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader\n * Applies to PBR materials.\n */\n set skipFinalColorClamp(value) {\n if (this._skipFinalColorClamp === value) {\n return;\n }\n this._skipFinalColorClamp = value;\n this._updateParameters();\n }\n /**\n * Gets whether the image processing is applied through a post process or not.\n */\n get applyByPostProcess() {\n return this._applyByPostProcess;\n }\n /**\n * Sets whether the image processing is applied through a post process or not.\n */\n set applyByPostProcess(value) {\n if (this._applyByPostProcess === value) {\n return;\n }\n this._applyByPostProcess = value;\n this._updateParameters();\n }\n /**\n * Gets whether the image processing is enabled or not.\n */\n get isEnabled() {\n return this._isEnabled;\n }\n /**\n * Sets whether the image processing is enabled or not.\n */\n set isEnabled(value) {\n if (this._isEnabled === value) {\n return;\n }\n this._isEnabled = value;\n this._updateParameters();\n }\n /**\n * Method called each time the image processing information changes requires to recompile the effect.\n */\n _updateParameters() {\n this.onUpdateParameters.notifyObservers(this);\n }\n /**\n * Gets the current class name.\n * @returns \"ImageProcessingConfiguration\"\n */\n getClassName() {\n return \"ImageProcessingConfiguration\";\n }\n /**\n * Prepare the list of uniforms associated with the Image Processing effects.\n * @param uniforms The list of uniforms used in the effect\n * @param defines the list of defines currently in use\n */\n static PrepareUniforms(uniforms, defines) {\n if (defines.EXPOSURE) {\n uniforms.push(\"exposureLinear\");\n }\n if (defines.CONTRAST) {\n uniforms.push(\"contrast\");\n }\n if (defines.COLORGRADING) {\n uniforms.push(\"colorTransformSettings\");\n }\n if (defines.VIGNETTE || defines.DITHER) {\n uniforms.push(\"vInverseScreenSize\");\n }\n if (defines.VIGNETTE) {\n uniforms.push(\"vignetteSettings1\");\n uniforms.push(\"vignetteSettings2\");\n }\n if (defines.COLORCURVES) {\n ColorCurves.PrepareUniforms(uniforms);\n }\n if (defines.DITHER) {\n uniforms.push(\"ditherIntensity\");\n }\n }\n /**\n * Prepare the list of samplers associated with the Image Processing effects.\n * @param samplersList The list of uniforms used in the effect\n * @param defines the list of defines currently in use\n */\n static PrepareSamplers(samplersList, defines) {\n if (defines.COLORGRADING) {\n samplersList.push(\"txColorTransform\");\n }\n }\n /**\n * Prepare the list of defines associated to the shader.\n * @param defines the list of defines to complete\n * @param forPostProcess Define if we are currently in post process mode or not\n */\n prepareDefines(defines, forPostProcess = false) {\n if (forPostProcess !== this.applyByPostProcess || !this._isEnabled) {\n defines.VIGNETTE = false;\n defines.TONEMAPPING = false;\n defines.TONEMAPPING_ACES = false;\n defines.CONTRAST = false;\n defines.EXPOSURE = false;\n defines.COLORCURVES = false;\n defines.COLORGRADING = false;\n defines.COLORGRADING3D = false;\n defines.DITHER = false;\n defines.IMAGEPROCESSING = false;\n defines.SKIPFINALCOLORCLAMP = this.skipFinalColorClamp;\n defines.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess && this._isEnabled;\n return;\n }\n defines.VIGNETTE = this.vignetteEnabled;\n defines.VIGNETTEBLENDMODEMULTIPLY = this.vignetteBlendMode === ImageProcessingConfiguration._VIGNETTEMODE_MULTIPLY;\n defines.VIGNETTEBLENDMODEOPAQUE = !defines.VIGNETTEBLENDMODEMULTIPLY;\n defines.TONEMAPPING = this.toneMappingEnabled;\n switch (this._toneMappingType) {\n case ImageProcessingConfiguration.TONEMAPPING_ACES:\n defines.TONEMAPPING_ACES = true;\n break;\n default:\n defines.TONEMAPPING_ACES = false;\n break;\n }\n defines.CONTRAST = this.contrast !== 1.0;\n defines.EXPOSURE = this.exposure !== 1.0;\n defines.COLORCURVES = this.colorCurvesEnabled && !!this.colorCurves;\n defines.COLORGRADING = this.colorGradingEnabled && !!this.colorGradingTexture;\n if (defines.COLORGRADING) {\n defines.COLORGRADING3D = this.colorGradingTexture.is3D;\n }\n else {\n defines.COLORGRADING3D = false;\n }\n defines.SAMPLER3DGREENDEPTH = this.colorGradingWithGreenDepth;\n defines.SAMPLER3DBGRMAP = this.colorGradingBGR;\n defines.DITHER = this._ditheringEnabled;\n defines.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess;\n defines.SKIPFINALCOLORCLAMP = this.skipFinalColorClamp;\n defines.IMAGEPROCESSING = defines.VIGNETTE || defines.TONEMAPPING || defines.CONTRAST || defines.EXPOSURE || defines.COLORCURVES || defines.COLORGRADING || defines.DITHER;\n }\n /**\n * Returns true if all the image processing information are ready.\n * @returns True if ready, otherwise, false\n */\n isReady() {\n // Color Grading texture can not be none blocking.\n return !this.colorGradingEnabled || !this.colorGradingTexture || this.colorGradingTexture.isReady();\n }\n /**\n * Binds the image processing to the shader.\n * @param effect The effect to bind to\n * @param overrideAspectRatio Override the aspect ratio of the effect\n */\n bind(effect, overrideAspectRatio) {\n // Color Curves\n if (this._colorCurvesEnabled && this.colorCurves) {\n ColorCurves.Bind(this.colorCurves, effect);\n }\n // Vignette and dither handled together due to common uniform.\n if (this._vignetteEnabled || this._ditheringEnabled) {\n const inverseWidth = 1 / effect.getEngine().getRenderWidth();\n const inverseHeight = 1 / effect.getEngine().getRenderHeight();\n effect.setFloat2(\"vInverseScreenSize\", inverseWidth, inverseHeight);\n if (this._ditheringEnabled) {\n effect.setFloat(\"ditherIntensity\", 0.5 * this._ditheringIntensity);\n }\n if (this._vignetteEnabled) {\n const aspectRatio = overrideAspectRatio != null ? overrideAspectRatio : inverseHeight / inverseWidth;\n let vignetteScaleY = Math.tan(this.vignetteCameraFov * 0.5);\n let vignetteScaleX = vignetteScaleY * aspectRatio;\n const vignetteScaleGeometricMean = Math.sqrt(vignetteScaleX * vignetteScaleY);\n vignetteScaleX = Tools.Mix(vignetteScaleX, vignetteScaleGeometricMean, this.vignetteStretch);\n vignetteScaleY = Tools.Mix(vignetteScaleY, vignetteScaleGeometricMean, this.vignetteStretch);\n effect.setFloat4(\"vignetteSettings1\", vignetteScaleX, vignetteScaleY, -vignetteScaleX * this.vignetteCenterX, -vignetteScaleY * this.vignetteCenterY);\n const vignettePower = -2.0 * this.vignetteWeight;\n effect.setFloat4(\"vignetteSettings2\", this.vignetteColor.r, this.vignetteColor.g, this.vignetteColor.b, vignettePower);\n }\n }\n // Exposure\n effect.setFloat(\"exposureLinear\", this.exposure);\n // Contrast\n effect.setFloat(\"contrast\", this.contrast);\n // Color transform settings\n if (this.colorGradingTexture) {\n effect.setTexture(\"txColorTransform\", this.colorGradingTexture);\n const textureSize = this.colorGradingTexture.getSize().height;\n effect.setFloat4(\"colorTransformSettings\", (textureSize - 1) / textureSize, // textureScale\n 0.5 / textureSize, // textureOffset\n textureSize, // textureSize\n this.colorGradingTexture.level // weight\n );\n }\n }\n /**\n * Clones the current image processing instance.\n * @returns The cloned image processing\n */\n clone() {\n return SerializationHelper.Clone(() => new ImageProcessingConfiguration(), this);\n }\n /**\n * Serializes the current image processing instance to a json representation.\n * @returns a JSON representation\n */\n serialize() {\n return SerializationHelper.Serialize(this);\n }\n /**\n * Parses the image processing from a json representation.\n * @param source the JSON source to parse\n * @returns The parsed image processing\n */\n static Parse(source) {\n const parsed = SerializationHelper.Parse(() => new ImageProcessingConfiguration(), source, null, null);\n // Backward compatibility\n if (source.vignetteCentreX !== undefined) {\n parsed.vignetteCenterX = source.vignetteCentreX;\n }\n if (source.vignetteCentreY !== undefined) {\n parsed.vignetteCenterY = source.vignetteCentreY;\n }\n return parsed;\n }\n /**\n * Used to apply the vignette as a mix with the pixel color.\n */\n static get VIGNETTEMODE_MULTIPLY() {\n return this._VIGNETTEMODE_MULTIPLY;\n }\n /**\n * Used to apply the vignette as a replacement of the pixel color.\n */\n static get VIGNETTEMODE_OPAQUE() {\n return this._VIGNETTEMODE_OPAQUE;\n }\n}\n/**\n * Default tone mapping applied in BabylonJS.\n */\nImageProcessingConfiguration.TONEMAPPING_STANDARD = 0;\n/**\n * ACES Tone mapping (used by default in unreal and unity). This can help getting closer\n * to other engines rendering to increase portability.\n */\nImageProcessingConfiguration.TONEMAPPING_ACES = 1;\n// Static constants associated to the image processing.\nImageProcessingConfiguration._VIGNETTEMODE_MULTIPLY = 0;\nImageProcessingConfiguration._VIGNETTEMODE_OPAQUE = 1;\n__decorate([\n serializeAsColorCurves()\n], ImageProcessingConfiguration.prototype, \"colorCurves\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_colorCurvesEnabled\", void 0);\n__decorate([\n serializeAsTexture(\"colorGradingTexture\")\n], ImageProcessingConfiguration.prototype, \"_colorGradingTexture\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_colorGradingEnabled\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_colorGradingWithGreenDepth\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_colorGradingBGR\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_exposure\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_toneMappingEnabled\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_toneMappingType\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_contrast\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"vignetteStretch\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"vignetteCenterX\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"vignetteCenterY\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"vignetteWeight\", void 0);\n__decorate([\n serializeAsColor4()\n], ImageProcessingConfiguration.prototype, \"vignetteColor\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"vignetteCameraFov\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_vignetteBlendMode\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_vignetteEnabled\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_ditheringEnabled\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_ditheringIntensity\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_skipFinalColorClamp\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_applyByPostProcess\", void 0);\n__decorate([\n serialize()\n], ImageProcessingConfiguration.prototype, \"_isEnabled\", void 0);\n// References the dependencies.\nSerializationHelper._ImageProcessingConfigurationParser = ImageProcessingConfiguration.Parse;\n//# sourceMappingURL=imageProcessingConfiguration.js.map","import { Vector3, Vector2, TmpVectors } from \"../Maths/math.vector.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\n/**\n * Information about the result of picking within a scene\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/interactions/picking_collisions\n */\nexport class PickingInfo {\n constructor() {\n /**\n * If the pick collided with an object\n */\n this.hit = false;\n /**\n * Distance away where the pick collided\n */\n this.distance = 0;\n /**\n * The location of pick collision\n */\n this.pickedPoint = null;\n /**\n * The mesh corresponding the pick collision\n */\n this.pickedMesh = null;\n /** (See getTextureCoordinates) The barycentric U coordinate that is used when calculating the texture coordinates of the collision.*/\n this.bu = 0;\n /** (See getTextureCoordinates) The barycentric V coordinate that is used when calculating the texture coordinates of the collision.*/\n this.bv = 0;\n /** The index of the face on the mesh that was picked, or the index of the Line if the picked Mesh is a LinesMesh */\n this.faceId = -1;\n /** The index of the face on the subMesh that was picked, or the index of the Line if the picked Mesh is a LinesMesh */\n this.subMeshFaceId = -1;\n /** Id of the submesh that was picked */\n this.subMeshId = 0;\n /** If a sprite was picked, this will be the sprite the pick collided with */\n this.pickedSprite = null;\n /** If we are picking a mesh with thin instance, this will give you the picked thin instance */\n this.thinInstanceIndex = -1;\n /**\n * The ray that was used to perform the picking.\n */\n this.ray = null;\n /**\n * If a mesh was used to do the picking (eg. 6dof controller) as a \"near interaction\", this will be populated.\n */\n this.originMesh = null;\n /**\n * The aim-space transform of the input used for picking, if it is an XR input source.\n */\n this.aimTransform = null;\n /**\n * The grip-space transform of the input used for picking, if it is an XR input source.\n * Some XR sources, such as input coming from head mounted displays, do not have this.\n */\n this.gripTransform = null;\n }\n /**\n * Gets the normal corresponding to the face the pick collided with\n * @param useWorldCoordinates If the resulting normal should be relative to the world (default: false)\n * @param useVerticesNormals If the vertices normals should be used to calculate the normal instead of the normal map (default: true)\n * @returns The normal corresponding to the face the pick collided with\n * @remarks Note that the returned normal will always point towards the picking ray.\n */\n getNormal(useWorldCoordinates = false, useVerticesNormals = true) {\n if (!this.pickedMesh || (useVerticesNormals && !this.pickedMesh.isVerticesDataPresent(VertexBuffer.NormalKind))) {\n return null;\n }\n let indices = this.pickedMesh.getIndices();\n if ((indices === null || indices === void 0 ? void 0 : indices.length) === 0) {\n indices = null;\n }\n let result;\n const tmp0 = TmpVectors.Vector3[0];\n const tmp1 = TmpVectors.Vector3[1];\n const tmp2 = TmpVectors.Vector3[2];\n if (useVerticesNormals) {\n const normals = this.pickedMesh.getVerticesData(VertexBuffer.NormalKind);\n let normal0 = indices\n ? Vector3.FromArrayToRef(normals, indices[this.faceId * 3] * 3, tmp0)\n : tmp0.copyFromFloats(normals[this.faceId * 3 * 3], normals[this.faceId * 3 * 3 + 1], normals[this.faceId * 3 * 3 + 2]);\n let normal1 = indices\n ? Vector3.FromArrayToRef(normals, indices[this.faceId * 3 + 1] * 3, tmp1)\n : tmp1.copyFromFloats(normals[(this.faceId * 3 + 1) * 3], normals[(this.faceId * 3 + 1) * 3 + 1], normals[(this.faceId * 3 + 1) * 3 + 2]);\n let normal2 = indices\n ? Vector3.FromArrayToRef(normals, indices[this.faceId * 3 + 2] * 3, tmp2)\n : tmp2.copyFromFloats(normals[(this.faceId * 3 + 2) * 3], normals[(this.faceId * 3 + 2) * 3 + 1], normals[(this.faceId * 3 + 2) * 3 + 2]);\n normal0 = normal0.scale(this.bu);\n normal1 = normal1.scale(this.bv);\n normal2 = normal2.scale(1.0 - this.bu - this.bv);\n result = new Vector3(normal0.x + normal1.x + normal2.x, normal0.y + normal1.y + normal2.y, normal0.z + normal1.z + normal2.z);\n }\n else {\n const positions = this.pickedMesh.getVerticesData(VertexBuffer.PositionKind);\n const vertex1 = indices\n ? Vector3.FromArrayToRef(positions, indices[this.faceId * 3] * 3, tmp0)\n : tmp0.copyFromFloats(positions[this.faceId * 3 * 3], positions[this.faceId * 3 * 3 + 1], positions[this.faceId * 3 * 3 + 2]);\n const vertex2 = indices\n ? Vector3.FromArrayToRef(positions, indices[this.faceId * 3 + 1] * 3, tmp1)\n : tmp1.copyFromFloats(positions[(this.faceId * 3 + 1) * 3], positions[(this.faceId * 3 + 1) * 3 + 1], positions[(this.faceId * 3 + 1) * 3 + 2]);\n const vertex3 = indices\n ? Vector3.FromArrayToRef(positions, indices[this.faceId * 3 + 2] * 3, tmp2)\n : tmp2.copyFromFloats(positions[(this.faceId * 3 + 2) * 3], positions[(this.faceId * 3 + 2) * 3 + 1], positions[(this.faceId * 3 + 2) * 3 + 2]);\n const p1p2 = vertex1.subtract(vertex2);\n const p3p2 = vertex3.subtract(vertex2);\n result = Vector3.Cross(p1p2, p3p2);\n }\n const transformNormalToWorld = (pickedMesh, n) => {\n let wm = pickedMesh.getWorldMatrix();\n if (pickedMesh.nonUniformScaling) {\n TmpVectors.Matrix[0].copyFrom(wm);\n wm = TmpVectors.Matrix[0];\n wm.setTranslationFromFloats(0, 0, 0);\n wm.invert();\n wm.transposeToRef(TmpVectors.Matrix[1]);\n wm = TmpVectors.Matrix[1];\n }\n Vector3.TransformNormalToRef(n, wm, n);\n };\n if (useWorldCoordinates) {\n transformNormalToWorld(this.pickedMesh, result);\n }\n if (this.ray) {\n const normalForDirectionChecking = TmpVectors.Vector3[0].copyFrom(result);\n if (!useWorldCoordinates) {\n // the normal has not been transformed to world space as part as the normal processing, so we must do it now\n transformNormalToWorld(this.pickedMesh, normalForDirectionChecking);\n }\n // Flip the normal if the picking ray is in the same direction.\n if (Vector3.Dot(normalForDirectionChecking, this.ray.direction) > 0) {\n result.negateInPlace();\n }\n }\n result.normalize();\n return result;\n }\n /**\n * Gets the texture coordinates of where the pick occurred\n * @param uvSet The UV set to use to calculate the texture coordinates (default: VertexBuffer.UVKind)\n * @returns The vector containing the coordinates of the texture\n */\n getTextureCoordinates(uvSet = VertexBuffer.UVKind) {\n if (!this.pickedMesh || !this.pickedMesh.isVerticesDataPresent(uvSet)) {\n return null;\n }\n const indices = this.pickedMesh.getIndices();\n if (!indices) {\n return null;\n }\n const uvs = this.pickedMesh.getVerticesData(uvSet);\n if (!uvs) {\n return null;\n }\n let uv0 = Vector2.FromArray(uvs, indices[this.faceId * 3] * 2);\n let uv1 = Vector2.FromArray(uvs, indices[this.faceId * 3 + 1] * 2);\n let uv2 = Vector2.FromArray(uvs, indices[this.faceId * 3 + 2] * 2);\n uv0 = uv0.scale(this.bu);\n uv1 = uv1.scale(this.bv);\n uv2 = uv2.scale(1.0 - this.bu - this.bv);\n return new Vector2(uv0.x + uv1.x + uv2.x, uv0.y + uv1.y + uv2.y);\n }\n}\n//# sourceMappingURL=pickingInfo.js.map","/**\n * ActionEvent is the event being sent when an action is triggered.\n */\nexport class ActionEvent {\n /**\n * Creates a new ActionEvent\n * @param source The mesh or sprite that triggered the action\n * @param pointerX The X mouse cursor position at the time of the event\n * @param pointerY The Y mouse cursor position at the time of the event\n * @param meshUnderPointer The mesh that is currently pointed at (can be null)\n * @param sourceEvent the original (browser) event that triggered the ActionEvent\n * @param additionalData additional data for the event\n */\n constructor(\n /** The mesh or sprite that triggered the action */\n source, \n /** The X mouse cursor position at the time of the event */\n pointerX, \n /** The Y mouse cursor position at the time of the event */\n pointerY, \n /** The mesh that is currently pointed at (can be null) */\n meshUnderPointer, \n /** the original (browser) event that triggered the ActionEvent */\n sourceEvent, \n /** additional data for the event */\n additionalData) {\n this.source = source;\n this.pointerX = pointerX;\n this.pointerY = pointerY;\n this.meshUnderPointer = meshUnderPointer;\n this.sourceEvent = sourceEvent;\n this.additionalData = additionalData;\n }\n /**\n * Helper function to auto-create an ActionEvent from a source mesh.\n * @param source The source mesh that triggered the event\n * @param evt The original (browser) event\n * @param additionalData additional data for the event\n * @returns the new ActionEvent\n */\n static CreateNew(source, evt, additionalData) {\n const scene = source.getScene();\n return new ActionEvent(source, scene.pointerX, scene.pointerY, scene.meshUnderPointer || source, evt, additionalData);\n }\n /**\n * Helper function to auto-create an ActionEvent from a source sprite\n * @param source The source sprite that triggered the event\n * @param scene Scene associated with the sprite\n * @param evt The original (browser) event\n * @param additionalData additional data for the event\n * @returns the new ActionEvent\n */\n static CreateNewFromSprite(source, scene, evt, additionalData) {\n return new ActionEvent(source, scene.pointerX, scene.pointerY, scene.meshUnderPointer, evt, additionalData);\n }\n /**\n * Helper function to auto-create an ActionEvent from a scene. If triggered by a mesh use ActionEvent.CreateNew\n * @param scene the scene where the event occurred\n * @param evt The original (browser) event\n * @returns the new ActionEvent\n */\n static CreateNewFromScene(scene, evt) {\n return new ActionEvent(null, scene.pointerX, scene.pointerY, scene.meshUnderPointer, evt);\n }\n /**\n * Helper function to auto-create an ActionEvent from a primitive\n * @param prim defines the target primitive\n * @param pointerPos defines the pointer position\n * @param evt The original (browser) event\n * @param additionalData additional data for the event\n * @returns the new ActionEvent\n */\n static CreateNewFromPrimitive(prim, pointerPos, evt, additionalData) {\n return new ActionEvent(prim, pointerPos.x, pointerPos.y, null, evt, additionalData);\n }\n}\n//# sourceMappingURL=actionEvent.js.map","import { VertexBuffer } from \"../Buffers/buffer.js\";\n\n/**\n * PostProcessManager is used to manage one or more post processes or post process pipelines\n * See https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/usePostProcesses\n */\nexport class PostProcessManager {\n /**\n * Creates a new instance PostProcess\n * @param scene The scene that the post process is associated with.\n */\n constructor(scene) {\n this._vertexBuffers = {};\n this._scene = scene;\n }\n _prepareBuffers() {\n if (this._vertexBuffers[VertexBuffer.PositionKind]) {\n return;\n }\n // VBO\n const vertices = [];\n vertices.push(1, 1);\n vertices.push(-1, 1);\n vertices.push(-1, -1);\n vertices.push(1, -1);\n this._vertexBuffers[VertexBuffer.PositionKind] = new VertexBuffer(this._scene.getEngine(), vertices, VertexBuffer.PositionKind, false, false, 2);\n this._buildIndexBuffer();\n }\n _buildIndexBuffer() {\n // Indices\n const indices = [];\n indices.push(0);\n indices.push(1);\n indices.push(2);\n indices.push(0);\n indices.push(2);\n indices.push(3);\n this._indexBuffer = this._scene.getEngine().createIndexBuffer(indices);\n }\n /**\n * Rebuilds the vertex buffers of the manager.\n * @internal\n */\n _rebuild() {\n const vb = this._vertexBuffers[VertexBuffer.PositionKind];\n if (!vb) {\n return;\n }\n vb._rebuild();\n this._buildIndexBuffer();\n }\n // Methods\n /**\n * Prepares a frame to be run through a post process.\n * @param sourceTexture The input texture to the post processes. (default: null)\n * @param postProcesses An array of post processes to be run. (default: null)\n * @returns True if the post processes were able to be run.\n * @internal\n */\n _prepareFrame(sourceTexture = null, postProcesses = null) {\n const camera = this._scene.activeCamera;\n if (!camera) {\n return false;\n }\n postProcesses = postProcesses || camera._postProcesses.filter((pp) => {\n return pp != null;\n });\n if (!postProcesses || postProcesses.length === 0 || !this._scene.postProcessesEnabled) {\n return false;\n }\n postProcesses[0].activate(camera, sourceTexture, postProcesses !== null && postProcesses !== undefined);\n return true;\n }\n /**\n * Manually render a set of post processes to a texture.\n * Please note, the frame buffer won't be unbound after the call in case you have more render to do.\n * @param postProcesses An array of post processes to be run.\n * @param targetTexture The render target wrapper to render to.\n * @param forceFullscreenViewport force gl.viewport to be full screen eg. 0,0,textureWidth,textureHeight\n * @param faceIndex defines the face to render to if a cubemap is defined as the target\n * @param lodLevel defines which lod of the texture to render to\n * @param doNotBindFrambuffer If set to true, assumes that the framebuffer has been bound previously\n */\n directRender(postProcesses, targetTexture = null, forceFullscreenViewport = false, faceIndex = 0, lodLevel = 0, doNotBindFrambuffer = false) {\n var _a;\n const engine = this._scene.getEngine();\n for (let index = 0; index < postProcesses.length; index++) {\n if (index < postProcesses.length - 1) {\n postProcesses[index + 1].activate(this._scene.activeCamera, targetTexture === null || targetTexture === void 0 ? void 0 : targetTexture.texture);\n }\n else {\n if (targetTexture) {\n engine.bindFramebuffer(targetTexture, faceIndex, undefined, undefined, forceFullscreenViewport, lodLevel);\n }\n else if (!doNotBindFrambuffer) {\n engine.restoreDefaultFramebuffer();\n }\n (_a = engine._debugInsertMarker) === null || _a === void 0 ? void 0 : _a.call(engine, `post process ${postProcesses[index].name} output`);\n }\n const pp = postProcesses[index];\n const effect = pp.apply();\n if (effect) {\n pp.onBeforeRenderObservable.notifyObservers(effect);\n // VBOs\n this._prepareBuffers();\n engine.bindBuffers(this._vertexBuffers, this._indexBuffer, effect);\n // Draw order\n engine.drawElementsType(0, 0, 6);\n pp.onAfterRenderObservable.notifyObservers(effect);\n }\n }\n // Restore depth buffer\n engine.setDepthBuffer(true);\n engine.setDepthWrite(true);\n }\n /**\n * Finalize the result of the output of the postprocesses.\n * @param doNotPresent If true the result will not be displayed to the screen.\n * @param targetTexture The render target wrapper to render to.\n * @param faceIndex The index of the face to bind the target texture to.\n * @param postProcesses The array of post processes to render.\n * @param forceFullscreenViewport force gl.viewport to be full screen eg. 0,0,textureWidth,textureHeight (default: false)\n * @internal\n */\n _finalizeFrame(doNotPresent, targetTexture, faceIndex, postProcesses, forceFullscreenViewport = false) {\n var _a;\n const camera = this._scene.activeCamera;\n if (!camera) {\n return;\n }\n postProcesses = postProcesses || camera._postProcesses.filter((pp) => {\n return pp != null;\n });\n if (postProcesses.length === 0 || !this._scene.postProcessesEnabled) {\n return;\n }\n const engine = this._scene.getEngine();\n for (let index = 0, len = postProcesses.length; index < len; index++) {\n const pp = postProcesses[index];\n if (index < len - 1) {\n pp._outputTexture = postProcesses[index + 1].activate(camera, targetTexture === null || targetTexture === void 0 ? void 0 : targetTexture.texture);\n }\n else {\n if (targetTexture) {\n engine.bindFramebuffer(targetTexture, faceIndex, undefined, undefined, forceFullscreenViewport);\n pp._outputTexture = targetTexture;\n }\n else {\n engine.restoreDefaultFramebuffer();\n pp._outputTexture = null;\n }\n (_a = engine._debugInsertMarker) === null || _a === void 0 ? void 0 : _a.call(engine, `post process ${postProcesses[index].name} output`);\n }\n if (doNotPresent) {\n break;\n }\n const effect = pp.apply();\n if (effect) {\n pp.onBeforeRenderObservable.notifyObservers(effect);\n // VBOs\n this._prepareBuffers();\n engine.bindBuffers(this._vertexBuffers, this._indexBuffer, effect);\n // Draw order\n engine.drawElementsType(0, 0, 6);\n pp.onAfterRenderObservable.notifyObservers(effect);\n }\n }\n // Restore states\n engine.setDepthBuffer(true);\n engine.setDepthWrite(true);\n engine.setAlphaMode(0);\n }\n /**\n * Disposes of the post process manager.\n */\n dispose() {\n const buffer = this._vertexBuffers[VertexBuffer.PositionKind];\n if (buffer) {\n buffer.dispose();\n this._vertexBuffers[VertexBuffer.PositionKind] = null;\n }\n if (this._indexBuffer) {\n this._scene.getEngine()._releaseBuffer(this._indexBuffer);\n this._indexBuffer = null;\n }\n }\n}\n//# sourceMappingURL=postProcessManager.js.map","import { SmartArray, SmartArrayNoDuplicate } from \"../Misc/smartArray.js\";\nimport { Vector3 } from \"../Maths/math.vector.js\";\n\n/**\n * This represents the object necessary to create a rendering group.\n * This is exclusively used and created by the rendering manager.\n * To modify the behavior, you use the available helpers in your scene or meshes.\n * @internal\n */\nexport class RenderingGroup {\n /**\n * Set the opaque sort comparison function.\n * If null the sub meshes will be render in the order they were created\n */\n set opaqueSortCompareFn(value) {\n if (value) {\n this._opaqueSortCompareFn = value;\n }\n else {\n this._opaqueSortCompareFn = RenderingGroup.PainterSortCompare;\n }\n this._renderOpaque = this._renderOpaqueSorted;\n }\n /**\n * Set the alpha test sort comparison function.\n * If null the sub meshes will be render in the order they were created\n */\n set alphaTestSortCompareFn(value) {\n if (value) {\n this._alphaTestSortCompareFn = value;\n }\n else {\n this._alphaTestSortCompareFn = RenderingGroup.PainterSortCompare;\n }\n this._renderAlphaTest = this._renderAlphaTestSorted;\n }\n /**\n * Set the transparent sort comparison function.\n * If null the sub meshes will be render in the order they were created\n */\n set transparentSortCompareFn(value) {\n if (value) {\n this._transparentSortCompareFn = value;\n }\n else {\n this._transparentSortCompareFn = RenderingGroup.defaultTransparentSortCompare;\n }\n this._renderTransparent = this._renderTransparentSorted;\n }\n /**\n * Creates a new rendering group.\n * @param index The rendering group index\n * @param scene\n * @param opaqueSortCompareFn The opaque sort comparison function. If null no order is applied\n * @param alphaTestSortCompareFn The alpha test sort comparison function. If null no order is applied\n * @param transparentSortCompareFn The transparent sort comparison function. If null back to front + alpha index sort is applied\n */\n constructor(index, scene, opaqueSortCompareFn = null, alphaTestSortCompareFn = null, transparentSortCompareFn = null) {\n this.index = index;\n this._opaqueSubMeshes = new SmartArray(256);\n this._transparentSubMeshes = new SmartArray(256);\n this._alphaTestSubMeshes = new SmartArray(256);\n this._depthOnlySubMeshes = new SmartArray(256);\n this._particleSystems = new SmartArray(256);\n this._spriteManagers = new SmartArray(256);\n /** @internal */\n this._empty = true;\n /** @internal */\n this._edgesRenderers = new SmartArrayNoDuplicate(16);\n this._scene = scene;\n this.opaqueSortCompareFn = opaqueSortCompareFn;\n this.alphaTestSortCompareFn = alphaTestSortCompareFn;\n this.transparentSortCompareFn = transparentSortCompareFn;\n }\n /**\n * Render all the sub meshes contained in the group.\n * @param customRenderFunction Used to override the default render behaviour of the group.\n * @param renderSprites\n * @param renderParticles\n * @param activeMeshes\n * @returns true if rendered some submeshes.\n */\n render(customRenderFunction, renderSprites, renderParticles, activeMeshes) {\n if (customRenderFunction) {\n customRenderFunction(this._opaqueSubMeshes, this._alphaTestSubMeshes, this._transparentSubMeshes, this._depthOnlySubMeshes);\n return;\n }\n const engine = this._scene.getEngine();\n // Depth only\n if (this._depthOnlySubMeshes.length !== 0) {\n engine.setColorWrite(false);\n this._renderAlphaTest(this._depthOnlySubMeshes);\n engine.setColorWrite(true);\n }\n // Opaque\n if (this._opaqueSubMeshes.length !== 0) {\n this._renderOpaque(this._opaqueSubMeshes);\n }\n // Alpha test\n if (this._alphaTestSubMeshes.length !== 0) {\n this._renderAlphaTest(this._alphaTestSubMeshes);\n }\n const stencilState = engine.getStencilBuffer();\n engine.setStencilBuffer(false);\n // Sprites\n if (renderSprites) {\n this._renderSprites();\n }\n // Particles\n if (renderParticles) {\n this._renderParticles(activeMeshes);\n }\n if (this.onBeforeTransparentRendering) {\n this.onBeforeTransparentRendering();\n }\n // Transparent\n if (this._transparentSubMeshes.length !== 0 || this._scene.useOrderIndependentTransparency) {\n engine.setStencilBuffer(stencilState);\n if (this._scene.useOrderIndependentTransparency) {\n const excludedMeshes = this._scene.depthPeelingRenderer.render(this._transparentSubMeshes);\n if (excludedMeshes.length) {\n // Render leftover meshes that could not be processed by depth peeling\n this._renderTransparent(excludedMeshes);\n }\n }\n else {\n this._renderTransparent(this._transparentSubMeshes);\n }\n engine.setAlphaMode(0);\n }\n // Set back stencil to false in case it changes before the edge renderer.\n engine.setStencilBuffer(false);\n // Edges\n if (this._edgesRenderers.length) {\n for (let edgesRendererIndex = 0; edgesRendererIndex < this._edgesRenderers.length; edgesRendererIndex++) {\n this._edgesRenderers.data[edgesRendererIndex].render();\n }\n engine.setAlphaMode(0);\n }\n // Restore Stencil state.\n engine.setStencilBuffer(stencilState);\n }\n /**\n * Renders the opaque submeshes in the order from the opaqueSortCompareFn.\n * @param subMeshes The submeshes to render\n */\n _renderOpaqueSorted(subMeshes) {\n return RenderingGroup._RenderSorted(subMeshes, this._opaqueSortCompareFn, this._scene.activeCamera, false);\n }\n /**\n * Renders the opaque submeshes in the order from the alphatestSortCompareFn.\n * @param subMeshes The submeshes to render\n */\n _renderAlphaTestSorted(subMeshes) {\n return RenderingGroup._RenderSorted(subMeshes, this._alphaTestSortCompareFn, this._scene.activeCamera, false);\n }\n /**\n * Renders the opaque submeshes in the order from the transparentSortCompareFn.\n * @param subMeshes The submeshes to render\n */\n _renderTransparentSorted(subMeshes) {\n return RenderingGroup._RenderSorted(subMeshes, this._transparentSortCompareFn, this._scene.activeCamera, true);\n }\n /**\n * Renders the submeshes in a specified order.\n * @param subMeshes The submeshes to sort before render\n * @param sortCompareFn The comparison function use to sort\n * @param camera The camera position use to preprocess the submeshes to help sorting\n * @param transparent Specifies to activate blending if true\n */\n static _RenderSorted(subMeshes, sortCompareFn, camera, transparent) {\n let subIndex = 0;\n let subMesh;\n const cameraPosition = camera ? camera.globalPosition : RenderingGroup._ZeroVector;\n if (transparent) {\n for (; subIndex < subMeshes.length; subIndex++) {\n subMesh = subMeshes.data[subIndex];\n subMesh._alphaIndex = subMesh.getMesh().alphaIndex;\n subMesh._distanceToCamera = Vector3.Distance(subMesh.getBoundingInfo().boundingSphere.centerWorld, cameraPosition);\n }\n }\n const sortedArray = subMeshes.length === subMeshes.data.length ? subMeshes.data : subMeshes.data.slice(0, subMeshes.length);\n if (sortCompareFn) {\n sortedArray.sort(sortCompareFn);\n }\n const scene = sortedArray[0].getMesh().getScene();\n for (subIndex = 0; subIndex < sortedArray.length; subIndex++) {\n subMesh = sortedArray[subIndex];\n if (scene._activeMeshesFrozenButKeepClipping && !subMesh.isInFrustum(scene._frustumPlanes)) {\n continue;\n }\n if (transparent) {\n const material = subMesh.getMaterial();\n if (material && material.needDepthPrePass) {\n const engine = material.getScene().getEngine();\n engine.setColorWrite(false);\n engine.setAlphaMode(0);\n subMesh.render(false);\n engine.setColorWrite(true);\n }\n }\n subMesh.render(transparent);\n }\n }\n /**\n * Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent)\n * are rendered back to front if in the same alpha index.\n *\n * @param a The first submesh\n * @param b The second submesh\n * @returns The result of the comparison\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static defaultTransparentSortCompare(a, b) {\n // Alpha index first\n if (a._alphaIndex > b._alphaIndex) {\n return 1;\n }\n if (a._alphaIndex < b._alphaIndex) {\n return -1;\n }\n // Then distance to camera\n return RenderingGroup.backToFrontSortCompare(a, b);\n }\n /**\n * Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent)\n * are rendered back to front.\n *\n * @param a The first submesh\n * @param b The second submesh\n * @returns The result of the comparison\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static backToFrontSortCompare(a, b) {\n // Then distance to camera\n if (a._distanceToCamera < b._distanceToCamera) {\n return 1;\n }\n if (a._distanceToCamera > b._distanceToCamera) {\n return -1;\n }\n return 0;\n }\n /**\n * Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent)\n * are rendered front to back (prevent overdraw).\n *\n * @param a The first submesh\n * @param b The second submesh\n * @returns The result of the comparison\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static frontToBackSortCompare(a, b) {\n // Then distance to camera\n if (a._distanceToCamera < b._distanceToCamera) {\n return -1;\n }\n if (a._distanceToCamera > b._distanceToCamera) {\n return 1;\n }\n return 0;\n }\n /**\n * Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent)\n * are grouped by material then geometry.\n *\n * @param a The first submesh\n * @param b The second submesh\n * @returns The result of the comparison\n */\n static PainterSortCompare(a, b) {\n const meshA = a.getMesh();\n const meshB = b.getMesh();\n if (meshA.material && meshB.material) {\n return meshA.material.uniqueId - meshB.material.uniqueId;\n }\n return meshA.uniqueId - meshB.uniqueId;\n }\n /**\n * Resets the different lists of submeshes to prepare a new frame.\n */\n prepare() {\n this._opaqueSubMeshes.reset();\n this._transparentSubMeshes.reset();\n this._alphaTestSubMeshes.reset();\n this._depthOnlySubMeshes.reset();\n this._particleSystems.reset();\n this.prepareSprites();\n this._edgesRenderers.reset();\n this._empty = true;\n }\n /**\n * Resets the different lists of sprites to prepare a new frame.\n */\n prepareSprites() {\n this._spriteManagers.reset();\n }\n dispose() {\n this._opaqueSubMeshes.dispose();\n this._transparentSubMeshes.dispose();\n this._alphaTestSubMeshes.dispose();\n this._depthOnlySubMeshes.dispose();\n this._particleSystems.dispose();\n this._spriteManagers.dispose();\n this._edgesRenderers.dispose();\n }\n /**\n * Inserts the submesh in its correct queue depending on its material.\n * @param subMesh The submesh to dispatch\n * @param [mesh] Optional reference to the submeshes's mesh. Provide if you have an exiting reference to improve performance.\n * @param [material] Optional reference to the submeshes's material. Provide if you have an exiting reference to improve performance.\n */\n dispatch(subMesh, mesh, material) {\n // Get mesh and materials if not provided\n if (mesh === undefined) {\n mesh = subMesh.getMesh();\n }\n if (material === undefined) {\n material = subMesh.getMaterial();\n }\n if (material === null || material === undefined) {\n return;\n }\n if (material.needAlphaBlendingForMesh(mesh)) {\n // Transparent\n this._transparentSubMeshes.push(subMesh);\n }\n else if (material.needAlphaTesting()) {\n // Alpha test\n if (material.needDepthPrePass) {\n this._depthOnlySubMeshes.push(subMesh);\n }\n this._alphaTestSubMeshes.push(subMesh);\n }\n else {\n if (material.needDepthPrePass) {\n this._depthOnlySubMeshes.push(subMesh);\n }\n this._opaqueSubMeshes.push(subMesh); // Opaque\n }\n mesh._renderingGroup = this;\n if (mesh._edgesRenderer && mesh._edgesRenderer.isEnabled) {\n this._edgesRenderers.pushNoDuplicate(mesh._edgesRenderer);\n }\n this._empty = false;\n }\n dispatchSprites(spriteManager) {\n this._spriteManagers.push(spriteManager);\n this._empty = false;\n }\n dispatchParticles(particleSystem) {\n this._particleSystems.push(particleSystem);\n this._empty = false;\n }\n _renderParticles(activeMeshes) {\n if (this._particleSystems.length === 0) {\n return;\n }\n // Particles\n const activeCamera = this._scene.activeCamera;\n this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);\n for (let particleIndex = 0; particleIndex < this._particleSystems.length; particleIndex++) {\n const particleSystem = this._particleSystems.data[particleIndex];\n if ((activeCamera && activeCamera.layerMask & particleSystem.layerMask) === 0) {\n continue;\n }\n const emitter = particleSystem.emitter;\n if (!emitter.position || !activeMeshes || activeMeshes.indexOf(emitter) !== -1) {\n this._scene._activeParticles.addCount(particleSystem.render(), false);\n }\n }\n this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene);\n }\n _renderSprites() {\n if (!this._scene.spritesEnabled || this._spriteManagers.length === 0) {\n return;\n }\n // Sprites\n const activeCamera = this._scene.activeCamera;\n this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene);\n for (let id = 0; id < this._spriteManagers.length; id++) {\n const spriteManager = this._spriteManagers.data[id];\n if ((activeCamera && activeCamera.layerMask & spriteManager.layerMask) !== 0) {\n spriteManager.render();\n }\n }\n this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene);\n }\n}\nRenderingGroup._ZeroVector = Vector3.Zero();\n//# sourceMappingURL=renderingGroup.js.map","import { RenderingGroup } from \"./renderingGroup.js\";\n/**\n * This class is used by the onRenderingGroupObservable\n */\nexport class RenderingGroupInfo {\n}\n/**\n * This is the manager responsible of all the rendering for meshes sprites and particles.\n * It is enable to manage the different groups as well as the different necessary sort functions.\n * This should not be used directly aside of the few static configurations\n */\nexport class RenderingManager {\n /**\n * Gets or sets a boolean indicating that the manager will not reset between frames.\n * This means that if a mesh becomes invisible or transparent it will not be visible until this boolean is set to false again.\n * By default, the rendering manager will dispatch all active meshes per frame (moving them to the transparent, opaque or alpha testing lists).\n * By turning this property on, you will accelerate the rendering by keeping all these lists unchanged between frames.\n */\n get maintainStateBetweenFrames() {\n return this._maintainStateBetweenFrames;\n }\n set maintainStateBetweenFrames(value) {\n if (value === this._maintainStateBetweenFrames) {\n return;\n }\n this._maintainStateBetweenFrames = value;\n if (!this._maintainStateBetweenFrames) {\n this.restoreDispachedFlags();\n }\n }\n /**\n * Restore wasDispatched flags on the lists of elements to render.\n */\n restoreDispachedFlags() {\n for (const mesh of this._scene.meshes) {\n if (mesh.subMeshes) {\n for (const subMesh of mesh.subMeshes) {\n subMesh._wasDispatched = false;\n }\n }\n }\n if (this._scene.spriteManagers) {\n for (const spriteManager of this._scene.spriteManagers) {\n spriteManager._wasDispatched = false;\n }\n }\n for (const particleSystem of this._scene.particleSystems) {\n particleSystem._wasDispatched = false;\n }\n }\n /**\n * Instantiates a new rendering group for a particular scene\n * @param scene Defines the scene the groups belongs to\n */\n constructor(scene) {\n /**\n * @internal\n */\n this._useSceneAutoClearSetup = false;\n this._renderingGroups = new Array();\n this._autoClearDepthStencil = {};\n this._customOpaqueSortCompareFn = {};\n this._customAlphaTestSortCompareFn = {};\n this._customTransparentSortCompareFn = {};\n this._renderingGroupInfo = new RenderingGroupInfo();\n this._maintainStateBetweenFrames = false;\n this._scene = scene;\n for (let i = RenderingManager.MIN_RENDERINGGROUPS; i < RenderingManager.MAX_RENDERINGGROUPS; i++) {\n this._autoClearDepthStencil[i] = { autoClear: true, depth: true, stencil: true };\n }\n }\n /**\n * Gets the rendering group with the specified id.\n */\n getRenderingGroup(id) {\n const renderingGroupId = id || 0;\n this._prepareRenderingGroup(renderingGroupId);\n return this._renderingGroups[renderingGroupId];\n }\n _clearDepthStencilBuffer(depth = true, stencil = true) {\n if (this._depthStencilBufferAlreadyCleaned) {\n return;\n }\n this._scene.getEngine().clear(null, false, depth, stencil);\n this._depthStencilBufferAlreadyCleaned = true;\n }\n /**\n * Renders the entire managed groups. This is used by the scene or the different render targets.\n * @internal\n */\n render(customRenderFunction, activeMeshes, renderParticles, renderSprites) {\n // Update the observable context (not null as it only goes away on dispose)\n const info = this._renderingGroupInfo;\n info.scene = this._scene;\n info.camera = this._scene.activeCamera;\n // Dispatch sprites\n if (this._scene.spriteManagers && renderSprites) {\n for (let index = 0; index < this._scene.spriteManagers.length; index++) {\n const manager = this._scene.spriteManagers[index];\n this.dispatchSprites(manager);\n }\n }\n // Render\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n this._depthStencilBufferAlreadyCleaned = index === RenderingManager.MIN_RENDERINGGROUPS;\n const renderingGroup = this._renderingGroups[index];\n if (!renderingGroup || renderingGroup._empty) {\n continue;\n }\n const renderingGroupMask = Math.pow(2, index);\n info.renderingGroupId = index;\n // Before Observable\n this._scene.onBeforeRenderingGroupObservable.notifyObservers(info, renderingGroupMask);\n // Clear depth/stencil if needed\n if (RenderingManager.AUTOCLEAR) {\n const autoClear = this._useSceneAutoClearSetup ? this._scene.getAutoClearDepthStencilSetup(index) : this._autoClearDepthStencil[index];\n if (autoClear && autoClear.autoClear) {\n this._clearDepthStencilBuffer(autoClear.depth, autoClear.stencil);\n }\n }\n // Render\n for (const step of this._scene._beforeRenderingGroupDrawStage) {\n step.action(index);\n }\n renderingGroup.render(customRenderFunction, renderSprites, renderParticles, activeMeshes);\n for (const step of this._scene._afterRenderingGroupDrawStage) {\n step.action(index);\n }\n // After Observable\n this._scene.onAfterRenderingGroupObservable.notifyObservers(info, renderingGroupMask);\n }\n }\n /**\n * Resets the different information of the group to prepare a new frame\n * @internal\n */\n reset() {\n if (this.maintainStateBetweenFrames) {\n return;\n }\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n const renderingGroup = this._renderingGroups[index];\n if (renderingGroup) {\n renderingGroup.prepare();\n }\n }\n }\n /**\n * Resets the sprites information of the group to prepare a new frame\n * @internal\n */\n resetSprites() {\n if (this.maintainStateBetweenFrames) {\n return;\n }\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n const renderingGroup = this._renderingGroups[index];\n if (renderingGroup) {\n renderingGroup.prepareSprites();\n }\n }\n }\n /**\n * Dispose and release the group and its associated resources.\n * @internal\n */\n dispose() {\n this.freeRenderingGroups();\n this._renderingGroups.length = 0;\n this._renderingGroupInfo = null;\n }\n /**\n * Clear the info related to rendering groups preventing retention points during dispose.\n */\n freeRenderingGroups() {\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n const renderingGroup = this._renderingGroups[index];\n if (renderingGroup) {\n renderingGroup.dispose();\n }\n }\n }\n _prepareRenderingGroup(renderingGroupId) {\n if (this._renderingGroups[renderingGroupId] === undefined) {\n this._renderingGroups[renderingGroupId] = new RenderingGroup(renderingGroupId, this._scene, this._customOpaqueSortCompareFn[renderingGroupId], this._customAlphaTestSortCompareFn[renderingGroupId], this._customTransparentSortCompareFn[renderingGroupId]);\n }\n }\n /**\n * Add a sprite manager to the rendering manager in order to render it this frame.\n * @param spriteManager Define the sprite manager to render\n */\n dispatchSprites(spriteManager) {\n if (this.maintainStateBetweenFrames && spriteManager._wasDispatched) {\n return;\n }\n spriteManager._wasDispatched = true;\n this.getRenderingGroup(spriteManager.renderingGroupId).dispatchSprites(spriteManager);\n }\n /**\n * Add a particle system to the rendering manager in order to render it this frame.\n * @param particleSystem Define the particle system to render\n */\n dispatchParticles(particleSystem) {\n if (this.maintainStateBetweenFrames && particleSystem._wasDispatched) {\n return;\n }\n particleSystem._wasDispatched = true;\n this.getRenderingGroup(particleSystem.renderingGroupId).dispatchParticles(particleSystem);\n }\n /**\n * Add a submesh to the manager in order to render it this frame\n * @param subMesh The submesh to dispatch\n * @param mesh Optional reference to the submeshes's mesh. Provide if you have an exiting reference to improve performance.\n * @param material Optional reference to the submeshes's material. Provide if you have an exiting reference to improve performance.\n */\n dispatch(subMesh, mesh, material) {\n if (mesh === undefined) {\n mesh = subMesh.getMesh();\n }\n if (this.maintainStateBetweenFrames && subMesh._wasDispatched) {\n return;\n }\n subMesh._wasDispatched = true;\n this.getRenderingGroup(mesh.renderingGroupId).dispatch(subMesh, mesh, material);\n }\n /**\n * Overrides the default sort function applied in the rendering group to prepare the meshes.\n * This allowed control for front to back rendering or reversely depending of the special needs.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param opaqueSortCompareFn The opaque queue comparison function use to sort.\n * @param alphaTestSortCompareFn The alpha test queue comparison function use to sort.\n * @param transparentSortCompareFn The transparent queue comparison function use to sort.\n */\n setRenderingOrder(renderingGroupId, opaqueSortCompareFn = null, alphaTestSortCompareFn = null, transparentSortCompareFn = null) {\n this._customOpaqueSortCompareFn[renderingGroupId] = opaqueSortCompareFn;\n this._customAlphaTestSortCompareFn[renderingGroupId] = alphaTestSortCompareFn;\n this._customTransparentSortCompareFn[renderingGroupId] = transparentSortCompareFn;\n if (this._renderingGroups[renderingGroupId]) {\n const group = this._renderingGroups[renderingGroupId];\n group.opaqueSortCompareFn = this._customOpaqueSortCompareFn[renderingGroupId];\n group.alphaTestSortCompareFn = this._customAlphaTestSortCompareFn[renderingGroupId];\n group.transparentSortCompareFn = this._customTransparentSortCompareFn[renderingGroupId];\n }\n }\n /**\n * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.\n * @param depth Automatically clears depth between groups if true and autoClear is true.\n * @param stencil Automatically clears stencil between groups if true and autoClear is true.\n */\n setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil, depth = true, stencil = true) {\n this._autoClearDepthStencil[renderingGroupId] = {\n autoClear: autoClearDepthStencil,\n depth: depth,\n stencil: stencil,\n };\n }\n /**\n * Gets the current auto clear configuration for one rendering group of the rendering\n * manager.\n * @param index the rendering group index to get the information for\n * @returns The auto clear setup for the requested rendering group\n */\n getAutoClearDepthStencilSetup(index) {\n return this._autoClearDepthStencil[index];\n }\n}\n/**\n * The max id used for rendering groups (not included)\n */\nRenderingManager.MAX_RENDERINGGROUPS = 4;\n/**\n * The min id used for rendering groups (included)\n */\nRenderingManager.MIN_RENDERINGGROUPS = 0;\n/**\n * Used to globally prevent autoclearing scenes.\n */\nRenderingManager.AUTOCLEAR = true;\n//# sourceMappingURL=renderingManager.js.map","/**\n * Groups all the scene component constants in one place to ease maintenance.\n * @internal\n */\nexport class SceneComponentConstants {\n}\nSceneComponentConstants.NAME_EFFECTLAYER = \"EffectLayer\";\nSceneComponentConstants.NAME_LAYER = \"Layer\";\nSceneComponentConstants.NAME_LENSFLARESYSTEM = \"LensFlareSystem\";\nSceneComponentConstants.NAME_BOUNDINGBOXRENDERER = \"BoundingBoxRenderer\";\nSceneComponentConstants.NAME_PARTICLESYSTEM = \"ParticleSystem\";\nSceneComponentConstants.NAME_GAMEPAD = \"Gamepad\";\nSceneComponentConstants.NAME_SIMPLIFICATIONQUEUE = \"SimplificationQueue\";\nSceneComponentConstants.NAME_GEOMETRYBUFFERRENDERER = \"GeometryBufferRenderer\";\nSceneComponentConstants.NAME_PREPASSRENDERER = \"PrePassRenderer\";\nSceneComponentConstants.NAME_DEPTHRENDERER = \"DepthRenderer\";\nSceneComponentConstants.NAME_DEPTHPEELINGRENDERER = \"DepthPeelingRenderer\";\nSceneComponentConstants.NAME_POSTPROCESSRENDERPIPELINEMANAGER = \"PostProcessRenderPipelineManager\";\nSceneComponentConstants.NAME_SPRITE = \"Sprite\";\nSceneComponentConstants.NAME_SUBSURFACE = \"SubSurface\";\nSceneComponentConstants.NAME_OUTLINERENDERER = \"Outline\";\nSceneComponentConstants.NAME_PROCEDURALTEXTURE = \"ProceduralTexture\";\nSceneComponentConstants.NAME_SHADOWGENERATOR = \"ShadowGenerator\";\nSceneComponentConstants.NAME_OCTREE = \"Octree\";\nSceneComponentConstants.NAME_PHYSICSENGINE = \"PhysicsEngine\";\nSceneComponentConstants.NAME_AUDIO = \"Audio\";\nSceneComponentConstants.NAME_FLUIDRENDERER = \"FluidRenderer\";\nSceneComponentConstants.STEP_ISREADYFORMESH_EFFECTLAYER = 0;\nSceneComponentConstants.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER = 0;\nSceneComponentConstants.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER = 0;\nSceneComponentConstants.STEP_PREACTIVEMESH_BOUNDINGBOXRENDERER = 0;\nSceneComponentConstants.STEP_CAMERADRAWRENDERTARGET_EFFECTLAYER = 1;\nSceneComponentConstants.STEP_BEFORECAMERADRAW_PREPASS = 0;\nSceneComponentConstants.STEP_BEFORECAMERADRAW_EFFECTLAYER = 1;\nSceneComponentConstants.STEP_BEFORECAMERADRAW_LAYER = 2;\nSceneComponentConstants.STEP_BEFORERENDERTARGETDRAW_PREPASS = 0;\nSceneComponentConstants.STEP_BEFORERENDERTARGETDRAW_LAYER = 1;\nSceneComponentConstants.STEP_BEFORERENDERINGMESH_PREPASS = 0;\nSceneComponentConstants.STEP_BEFORERENDERINGMESH_OUTLINE = 1;\nSceneComponentConstants.STEP_AFTERRENDERINGMESH_PREPASS = 0;\nSceneComponentConstants.STEP_AFTERRENDERINGMESH_OUTLINE = 1;\nSceneComponentConstants.STEP_AFTERRENDERINGGROUPDRAW_EFFECTLAYER_DRAW = 0;\nSceneComponentConstants.STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER = 1;\nSceneComponentConstants.STEP_BEFORECAMERAUPDATE_SIMPLIFICATIONQUEUE = 0;\nSceneComponentConstants.STEP_BEFORECAMERAUPDATE_GAMEPAD = 1;\nSceneComponentConstants.STEP_BEFORECLEAR_PROCEDURALTEXTURE = 0;\nSceneComponentConstants.STEP_BEFORECLEAR_PREPASS = 1;\nSceneComponentConstants.STEP_BEFORERENDERTARGETCLEAR_PREPASS = 0;\nSceneComponentConstants.STEP_AFTERRENDERTARGETDRAW_PREPASS = 0;\nSceneComponentConstants.STEP_AFTERRENDERTARGETDRAW_LAYER = 1;\nSceneComponentConstants.STEP_AFTERCAMERADRAW_PREPASS = 0;\nSceneComponentConstants.STEP_AFTERCAMERADRAW_EFFECTLAYER = 1;\nSceneComponentConstants.STEP_AFTERCAMERADRAW_LENSFLARESYSTEM = 2;\nSceneComponentConstants.STEP_AFTERCAMERADRAW_EFFECTLAYER_DRAW = 3;\nSceneComponentConstants.STEP_AFTERCAMERADRAW_LAYER = 4;\nSceneComponentConstants.STEP_AFTERCAMERADRAW_FLUIDRENDERER = 5;\nSceneComponentConstants.STEP_AFTERCAMERAPOSTPROCESS_LAYER = 0;\nSceneComponentConstants.STEP_AFTERRENDERTARGETPOSTPROCESS_LAYER = 0;\nSceneComponentConstants.STEP_AFTERRENDER_AUDIO = 0;\nSceneComponentConstants.STEP_GATHERRENDERTARGETS_DEPTHRENDERER = 0;\nSceneComponentConstants.STEP_GATHERRENDERTARGETS_GEOMETRYBUFFERRENDERER = 1;\nSceneComponentConstants.STEP_GATHERRENDERTARGETS_SHADOWGENERATOR = 2;\nSceneComponentConstants.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER = 3;\nSceneComponentConstants.STEP_GATHERACTIVECAMERARENDERTARGETS_DEPTHRENDERER = 0;\nSceneComponentConstants.STEP_GATHERACTIVECAMERARENDERTARGETS_FLUIDRENDERER = 1;\nSceneComponentConstants.STEP_POINTERMOVE_SPRITE = 0;\nSceneComponentConstants.STEP_POINTERDOWN_SPRITE = 0;\nSceneComponentConstants.STEP_POINTERUP_SPRITE = 0;\n/**\n * Representation of a stage in the scene (Basically a list of ordered steps)\n * @internal\n */\nexport class Stage extends Array {\n /**\n * Hide ctor from the rest of the world.\n * @param items The items to add.\n */\n constructor(items) {\n super(...items);\n }\n /**\n * Creates a new Stage.\n * @returns A new instance of a Stage\n */\n static Create() {\n return Object.create(Stage.prototype);\n }\n /**\n * Registers a step in an ordered way in the targeted stage.\n * @param index Defines the position to register the step in\n * @param component Defines the component attached to the step\n * @param action Defines the action to launch during the step\n */\n registerStep(index, component, action) {\n let i = 0;\n let maxIndex = Number.MAX_VALUE;\n for (; i < this.length; i++) {\n const step = this[i];\n maxIndex = step.index;\n if (index < maxIndex) {\n break;\n }\n }\n this.splice(i, 0, { index, component, action: action.bind(component) });\n }\n /**\n * Clears all the steps from the stage.\n */\n clear() {\n this.length = 0;\n }\n}\n//# sourceMappingURL=sceneComponent.js.map","import { Vector2 } from \"../Maths/math.vector.js\";\n/**\n * Gather the list of pointer event types as constants.\n */\nexport class PointerEventTypes {\n}\n/**\n * The pointerdown event is fired when a pointer becomes active. For mouse, it is fired when the device transitions from no buttons depressed to at least one button depressed. For touch, it is fired when physical contact is made with the digitizer. For pen, it is fired when the stylus makes physical contact with the digitizer.\n */\nPointerEventTypes.POINTERDOWN = 0x01;\n/**\n * The pointerup event is fired when a pointer is no longer active.\n */\nPointerEventTypes.POINTERUP = 0x02;\n/**\n * The pointermove event is fired when a pointer changes coordinates.\n */\nPointerEventTypes.POINTERMOVE = 0x04;\n/**\n * The pointerwheel event is fired when a mouse wheel has been rotated.\n */\nPointerEventTypes.POINTERWHEEL = 0x08;\n/**\n * The pointerpick event is fired when a mesh or sprite has been picked by the pointer.\n */\nPointerEventTypes.POINTERPICK = 0x10;\n/**\n * The pointertap event is fired when a the object has been touched and released without drag.\n */\nPointerEventTypes.POINTERTAP = 0x20;\n/**\n * The pointerdoubletap event is fired when a the object has been touched and released twice without drag.\n */\nPointerEventTypes.POINTERDOUBLETAP = 0x40;\n/**\n * Base class of pointer info types.\n */\nexport class PointerInfoBase {\n /**\n * Instantiates the base class of pointers info.\n * @param type Defines the type of event (PointerEventTypes)\n * @param event Defines the related dom event\n */\n constructor(\n /**\n * Defines the type of event (PointerEventTypes)\n */\n type, \n /**\n * Defines the related dom event\n */\n event) {\n this.type = type;\n this.event = event;\n }\n}\n/**\n * This class is used to store pointer related info for the onPrePointerObservable event.\n * Set the skipOnPointerObservable property to true if you want the engine to stop any process after this event is triggered, even not calling onPointerObservable\n */\nexport class PointerInfoPre extends PointerInfoBase {\n /**\n * Instantiates a PointerInfoPre to store pointer related info to the onPrePointerObservable event.\n * @param type Defines the type of event (PointerEventTypes)\n * @param event Defines the related dom event\n * @param localX Defines the local x coordinates of the pointer when the event occured\n * @param localY Defines the local y coordinates of the pointer when the event occured\n */\n constructor(type, event, localX, localY) {\n super(type, event);\n /**\n * Ray from a pointer if available (eg. 6dof controller)\n */\n this.ray = null;\n /**\n * The original picking info that was used to trigger the pointer event\n */\n this.originalPickingInfo = null;\n this.skipOnPointerObservable = false;\n this.localPosition = new Vector2(localX, localY);\n }\n}\n/**\n * This type contains all the data related to a pointer event in Babylon.js.\n * The event member is an instance of PointerEvent for all types except PointerWheel and is of type MouseWheelEvent when type equals PointerWheel. The different event types can be found in the PointerEventTypes class.\n */\nexport class PointerInfo extends PointerInfoBase {\n /**\n * Defines the picking info associated with this PointerInfo object (if applicable)\n */\n get pickInfo() {\n if (!this._pickInfo) {\n this._generatePickInfo();\n }\n return this._pickInfo;\n }\n /**\n * Instantiates a PointerInfo to store pointer related info to the onPointerObservable event.\n * @param type Defines the type of event (PointerEventTypes)\n * @param event Defines the related dom event\n * @param pickInfo Defines the picking info associated to the info (if any)\n * @param inputManager Defines the InputManager to use if there is no pickInfo\n */\n constructor(type, event, pickInfo, inputManager = null) {\n super(type, event);\n this._pickInfo = pickInfo;\n this._inputManager = inputManager;\n }\n /**\n * Generates the picking info if needed\n */\n /** @internal */\n _generatePickInfo() {\n if (this._inputManager) {\n this._pickInfo = this._inputManager._pickMove(this.event);\n this._inputManager._setRayOnPointerInfo(this._pickInfo, this.event);\n this._inputManager = null;\n }\n }\n}\n//# sourceMappingURL=pointerEvents.js.map","\n/**\n * Abstract class used to decouple action Manager from scene and meshes.\n * Do not instantiate.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\n */\nexport class AbstractActionManager {\n constructor() {\n /** Gets the cursor to use when hovering items */\n this.hoverCursor = \"\";\n /** Gets the list of actions */\n this.actions = [];\n /**\n * Gets or sets a boolean indicating that the manager is recursive meaning that it can trigger action from children\n */\n this.isRecursive = false;\n }\n /**\n * Does exist one action manager with at least one trigger\n **/\n static get HasTriggers() {\n for (const t in AbstractActionManager.Triggers) {\n if (Object.prototype.hasOwnProperty.call(AbstractActionManager.Triggers, t)) {\n return true;\n }\n }\n return false;\n }\n /**\n * Does exist one action manager with at least one pick trigger\n **/\n static get HasPickTriggers() {\n for (const t in AbstractActionManager.Triggers) {\n if (Object.prototype.hasOwnProperty.call(AbstractActionManager.Triggers, t)) {\n const tAsInt = parseInt(t);\n if (tAsInt >= 1 && tAsInt <= 7) {\n return true;\n }\n }\n }\n return false;\n }\n /**\n * Does exist one action manager that handles actions of a given trigger\n * @param trigger defines the trigger to be tested\n * @returns a boolean indicating whether the trigger is handled by at least one action manager\n **/\n static HasSpecificTrigger(trigger) {\n for (const t in AbstractActionManager.Triggers) {\n if (Object.prototype.hasOwnProperty.call(AbstractActionManager.Triggers, t)) {\n const tAsInt = parseInt(t);\n if (tAsInt === trigger) {\n return true;\n }\n }\n }\n return false;\n }\n}\n/** Gets the list of active triggers */\nAbstractActionManager.Triggers = {};\n//# sourceMappingURL=abstractActionManager.js.map","/**\n * Gather the list of keyboard event types as constants.\n */\nexport class KeyboardEventTypes {\n}\n/**\n * The keydown event is fired when a key becomes active (pressed).\n */\nKeyboardEventTypes.KEYDOWN = 0x01;\n/**\n * The keyup event is fired when a key has been released.\n */\nKeyboardEventTypes.KEYUP = 0x02;\n/**\n * This class is used to store keyboard related info for the onKeyboardObservable event.\n */\nexport class KeyboardInfo {\n /**\n * Instantiates a new keyboard info.\n * This class is used to store keyboard related info for the onKeyboardObservable event.\n * @param type Defines the type of event (KeyboardEventTypes)\n * @param event Defines the related dom event\n */\n constructor(\n /**\n * Defines the type of event (KeyboardEventTypes)\n */\n type, \n /**\n * Defines the related dom event\n */\n event) {\n this.type = type;\n this.event = event;\n }\n}\n/**\n * This class is used to store keyboard related info for the onPreKeyboardObservable event.\n * Set the skipOnKeyboardObservable property to true if you want the engine to stop any process after this event is triggered, even not calling onKeyboardObservable\n */\nexport class KeyboardInfoPre extends KeyboardInfo {\n /**\n * Defines whether the engine should skip the next onKeyboardObservable associated to this pre.\n * @deprecated use skipOnKeyboardObservable property instead\n */\n get skipOnPointerObservable() {\n return this.skipOnKeyboardObservable;\n }\n set skipOnPointerObservable(value) {\n this.skipOnKeyboardObservable = value;\n }\n /**\n * Instantiates a new keyboard pre info.\n * This class is used to store keyboard related info for the onPreKeyboardObservable event.\n * @param type Defines the type of event (KeyboardEventTypes)\n * @param event Defines the related dom event\n */\n constructor(\n /**\n * Defines the type of event (KeyboardEventTypes)\n */\n type, \n /**\n * Defines the related dom event\n */\n event) {\n super(type, event);\n this.type = type;\n this.event = event;\n this.skipOnKeyboardObservable = false;\n }\n}\n//# sourceMappingURL=keyboardEvents.js.map","/**\n * Enum for Device Types\n */\nexport var DeviceType;\n(function (DeviceType) {\n /** Generic */\n DeviceType[DeviceType[\"Generic\"] = 0] = \"Generic\";\n /** Keyboard */\n DeviceType[DeviceType[\"Keyboard\"] = 1] = \"Keyboard\";\n /** Mouse */\n DeviceType[DeviceType[\"Mouse\"] = 2] = \"Mouse\";\n /** Touch Pointers */\n DeviceType[DeviceType[\"Touch\"] = 3] = \"Touch\";\n /** PS4 Dual Shock */\n DeviceType[DeviceType[\"DualShock\"] = 4] = \"DualShock\";\n /** Xbox */\n DeviceType[DeviceType[\"Xbox\"] = 5] = \"Xbox\";\n /** Switch Controller */\n DeviceType[DeviceType[\"Switch\"] = 6] = \"Switch\";\n /** PS5 DualSense */\n DeviceType[DeviceType[\"DualSense\"] = 7] = \"DualSense\";\n})(DeviceType || (DeviceType = {}));\n// Device Enums\n/**\n * Enum for All Pointers (Touch/Mouse)\n */\nexport var PointerInput;\n(function (PointerInput) {\n /** Horizontal Axis (Not used in events/observables; only in polling) */\n PointerInput[PointerInput[\"Horizontal\"] = 0] = \"Horizontal\";\n /** Vertical Axis (Not used in events/observables; only in polling) */\n PointerInput[PointerInput[\"Vertical\"] = 1] = \"Vertical\";\n /** Left Click or Touch */\n PointerInput[PointerInput[\"LeftClick\"] = 2] = \"LeftClick\";\n /** Middle Click */\n PointerInput[PointerInput[\"MiddleClick\"] = 3] = \"MiddleClick\";\n /** Right Click */\n PointerInput[PointerInput[\"RightClick\"] = 4] = \"RightClick\";\n /** Browser Back */\n PointerInput[PointerInput[\"BrowserBack\"] = 5] = \"BrowserBack\";\n /** Browser Forward */\n PointerInput[PointerInput[\"BrowserForward\"] = 6] = \"BrowserForward\";\n /** Mouse Wheel X */\n PointerInput[PointerInput[\"MouseWheelX\"] = 7] = \"MouseWheelX\";\n /** Mouse Wheel Y */\n PointerInput[PointerInput[\"MouseWheelY\"] = 8] = \"MouseWheelY\";\n /** Mouse Wheel Z */\n PointerInput[PointerInput[\"MouseWheelZ\"] = 9] = \"MouseWheelZ\";\n /** Used in events/observables to identify if x/y changes occurred */\n PointerInput[PointerInput[\"Move\"] = 12] = \"Move\";\n})(PointerInput || (PointerInput = {}));\n/** @internal */\nexport var NativePointerInput;\n(function (NativePointerInput) {\n /** Horizontal Axis */\n NativePointerInput[NativePointerInput[\"Horizontal\"] = 0] = \"Horizontal\";\n /** Vertical Axis */\n NativePointerInput[NativePointerInput[\"Vertical\"] = 1] = \"Vertical\";\n /** Left Click or Touch */\n NativePointerInput[NativePointerInput[\"LeftClick\"] = 2] = \"LeftClick\";\n /** Middle Click */\n NativePointerInput[NativePointerInput[\"MiddleClick\"] = 3] = \"MiddleClick\";\n /** Right Click */\n NativePointerInput[NativePointerInput[\"RightClick\"] = 4] = \"RightClick\";\n /** Browser Back */\n NativePointerInput[NativePointerInput[\"BrowserBack\"] = 5] = \"BrowserBack\";\n /** Browser Forward */\n NativePointerInput[NativePointerInput[\"BrowserForward\"] = 6] = \"BrowserForward\";\n /** Mouse Wheel X */\n NativePointerInput[NativePointerInput[\"MouseWheelX\"] = 7] = \"MouseWheelX\";\n /** Mouse Wheel Y */\n NativePointerInput[NativePointerInput[\"MouseWheelY\"] = 8] = \"MouseWheelY\";\n /** Mouse Wheel Z */\n NativePointerInput[NativePointerInput[\"MouseWheelZ\"] = 9] = \"MouseWheelZ\";\n /** Delta X */\n NativePointerInput[NativePointerInput[\"DeltaHorizontal\"] = 10] = \"DeltaHorizontal\";\n /** Delta Y */\n NativePointerInput[NativePointerInput[\"DeltaVertical\"] = 11] = \"DeltaVertical\";\n})(NativePointerInput || (NativePointerInput = {}));\n/**\n * Enum for Dual Shock Gamepad\n */\nexport var DualShockInput;\n(function (DualShockInput) {\n /** Cross */\n DualShockInput[DualShockInput[\"Cross\"] = 0] = \"Cross\";\n /** Circle */\n DualShockInput[DualShockInput[\"Circle\"] = 1] = \"Circle\";\n /** Square */\n DualShockInput[DualShockInput[\"Square\"] = 2] = \"Square\";\n /** Triangle */\n DualShockInput[DualShockInput[\"Triangle\"] = 3] = \"Triangle\";\n /** L1 */\n DualShockInput[DualShockInput[\"L1\"] = 4] = \"L1\";\n /** R1 */\n DualShockInput[DualShockInput[\"R1\"] = 5] = \"R1\";\n /** L2 */\n DualShockInput[DualShockInput[\"L2\"] = 6] = \"L2\";\n /** R2 */\n DualShockInput[DualShockInput[\"R2\"] = 7] = \"R2\";\n /** Share */\n DualShockInput[DualShockInput[\"Share\"] = 8] = \"Share\";\n /** Options */\n DualShockInput[DualShockInput[\"Options\"] = 9] = \"Options\";\n /** L3 */\n DualShockInput[DualShockInput[\"L3\"] = 10] = \"L3\";\n /** R3 */\n DualShockInput[DualShockInput[\"R3\"] = 11] = \"R3\";\n /** DPadUp */\n DualShockInput[DualShockInput[\"DPadUp\"] = 12] = \"DPadUp\";\n /** DPadDown */\n DualShockInput[DualShockInput[\"DPadDown\"] = 13] = \"DPadDown\";\n /** DPadLeft */\n DualShockInput[DualShockInput[\"DPadLeft\"] = 14] = \"DPadLeft\";\n /** DRight */\n DualShockInput[DualShockInput[\"DPadRight\"] = 15] = \"DPadRight\";\n /** Home */\n DualShockInput[DualShockInput[\"Home\"] = 16] = \"Home\";\n /** TouchPad */\n DualShockInput[DualShockInput[\"TouchPad\"] = 17] = \"TouchPad\";\n /** LStickXAxis */\n DualShockInput[DualShockInput[\"LStickXAxis\"] = 18] = \"LStickXAxis\";\n /** LStickYAxis */\n DualShockInput[DualShockInput[\"LStickYAxis\"] = 19] = \"LStickYAxis\";\n /** RStickXAxis */\n DualShockInput[DualShockInput[\"RStickXAxis\"] = 20] = \"RStickXAxis\";\n /** RStickYAxis */\n DualShockInput[DualShockInput[\"RStickYAxis\"] = 21] = \"RStickYAxis\";\n})(DualShockInput || (DualShockInput = {}));\n/**\n * Enum for Dual Sense Gamepad\n */\nexport var DualSenseInput;\n(function (DualSenseInput) {\n /** Cross */\n DualSenseInput[DualSenseInput[\"Cross\"] = 0] = \"Cross\";\n /** Circle */\n DualSenseInput[DualSenseInput[\"Circle\"] = 1] = \"Circle\";\n /** Square */\n DualSenseInput[DualSenseInput[\"Square\"] = 2] = \"Square\";\n /** Triangle */\n DualSenseInput[DualSenseInput[\"Triangle\"] = 3] = \"Triangle\";\n /** L1 */\n DualSenseInput[DualSenseInput[\"L1\"] = 4] = \"L1\";\n /** R1 */\n DualSenseInput[DualSenseInput[\"R1\"] = 5] = \"R1\";\n /** L2 */\n DualSenseInput[DualSenseInput[\"L2\"] = 6] = \"L2\";\n /** R2 */\n DualSenseInput[DualSenseInput[\"R2\"] = 7] = \"R2\";\n /** Create */\n DualSenseInput[DualSenseInput[\"Create\"] = 8] = \"Create\";\n /** Options */\n DualSenseInput[DualSenseInput[\"Options\"] = 9] = \"Options\";\n /** L3 */\n DualSenseInput[DualSenseInput[\"L3\"] = 10] = \"L3\";\n /** R3 */\n DualSenseInput[DualSenseInput[\"R3\"] = 11] = \"R3\";\n /** DPadUp */\n DualSenseInput[DualSenseInput[\"DPadUp\"] = 12] = \"DPadUp\";\n /** DPadDown */\n DualSenseInput[DualSenseInput[\"DPadDown\"] = 13] = \"DPadDown\";\n /** DPadLeft */\n DualSenseInput[DualSenseInput[\"DPadLeft\"] = 14] = \"DPadLeft\";\n /** DRight */\n DualSenseInput[DualSenseInput[\"DPadRight\"] = 15] = \"DPadRight\";\n /** Home */\n DualSenseInput[DualSenseInput[\"Home\"] = 16] = \"Home\";\n /** TouchPad */\n DualSenseInput[DualSenseInput[\"TouchPad\"] = 17] = \"TouchPad\";\n /** LStickXAxis */\n DualSenseInput[DualSenseInput[\"LStickXAxis\"] = 18] = \"LStickXAxis\";\n /** LStickYAxis */\n DualSenseInput[DualSenseInput[\"LStickYAxis\"] = 19] = \"LStickYAxis\";\n /** RStickXAxis */\n DualSenseInput[DualSenseInput[\"RStickXAxis\"] = 20] = \"RStickXAxis\";\n /** RStickYAxis */\n DualSenseInput[DualSenseInput[\"RStickYAxis\"] = 21] = \"RStickYAxis\";\n})(DualSenseInput || (DualSenseInput = {}));\n/**\n * Enum for Xbox Gamepad\n */\nexport var XboxInput;\n(function (XboxInput) {\n /** A */\n XboxInput[XboxInput[\"A\"] = 0] = \"A\";\n /** B */\n XboxInput[XboxInput[\"B\"] = 1] = \"B\";\n /** X */\n XboxInput[XboxInput[\"X\"] = 2] = \"X\";\n /** Y */\n XboxInput[XboxInput[\"Y\"] = 3] = \"Y\";\n /** LB */\n XboxInput[XboxInput[\"LB\"] = 4] = \"LB\";\n /** RB */\n XboxInput[XboxInput[\"RB\"] = 5] = \"RB\";\n /** LT */\n XboxInput[XboxInput[\"LT\"] = 6] = \"LT\";\n /** RT */\n XboxInput[XboxInput[\"RT\"] = 7] = \"RT\";\n /** Back */\n XboxInput[XboxInput[\"Back\"] = 8] = \"Back\";\n /** Start */\n XboxInput[XboxInput[\"Start\"] = 9] = \"Start\";\n /** LS */\n XboxInput[XboxInput[\"LS\"] = 10] = \"LS\";\n /** RS */\n XboxInput[XboxInput[\"RS\"] = 11] = \"RS\";\n /** DPadUp */\n XboxInput[XboxInput[\"DPadUp\"] = 12] = \"DPadUp\";\n /** DPadDown */\n XboxInput[XboxInput[\"DPadDown\"] = 13] = \"DPadDown\";\n /** DPadLeft */\n XboxInput[XboxInput[\"DPadLeft\"] = 14] = \"DPadLeft\";\n /** DRight */\n XboxInput[XboxInput[\"DPadRight\"] = 15] = \"DPadRight\";\n /** Home */\n XboxInput[XboxInput[\"Home\"] = 16] = \"Home\";\n /** LStickXAxis */\n XboxInput[XboxInput[\"LStickXAxis\"] = 17] = \"LStickXAxis\";\n /** LStickYAxis */\n XboxInput[XboxInput[\"LStickYAxis\"] = 18] = \"LStickYAxis\";\n /** RStickXAxis */\n XboxInput[XboxInput[\"RStickXAxis\"] = 19] = \"RStickXAxis\";\n /** RStickYAxis */\n XboxInput[XboxInput[\"RStickYAxis\"] = 20] = \"RStickYAxis\";\n})(XboxInput || (XboxInput = {}));\n/**\n * Enum for Switch (Pro/JoyCon L+R) Gamepad\n */\nexport var SwitchInput;\n(function (SwitchInput) {\n /** B */\n SwitchInput[SwitchInput[\"B\"] = 0] = \"B\";\n /** A */\n SwitchInput[SwitchInput[\"A\"] = 1] = \"A\";\n /** Y */\n SwitchInput[SwitchInput[\"Y\"] = 2] = \"Y\";\n /** X */\n SwitchInput[SwitchInput[\"X\"] = 3] = \"X\";\n /** L */\n SwitchInput[SwitchInput[\"L\"] = 4] = \"L\";\n /** R */\n SwitchInput[SwitchInput[\"R\"] = 5] = \"R\";\n /** ZL */\n SwitchInput[SwitchInput[\"ZL\"] = 6] = \"ZL\";\n /** ZR */\n SwitchInput[SwitchInput[\"ZR\"] = 7] = \"ZR\";\n /** Minus */\n SwitchInput[SwitchInput[\"Minus\"] = 8] = \"Minus\";\n /** Plus */\n SwitchInput[SwitchInput[\"Plus\"] = 9] = \"Plus\";\n /** LS */\n SwitchInput[SwitchInput[\"LS\"] = 10] = \"LS\";\n /** RS */\n SwitchInput[SwitchInput[\"RS\"] = 11] = \"RS\";\n /** DPadUp */\n SwitchInput[SwitchInput[\"DPadUp\"] = 12] = \"DPadUp\";\n /** DPadDown */\n SwitchInput[SwitchInput[\"DPadDown\"] = 13] = \"DPadDown\";\n /** DPadLeft */\n SwitchInput[SwitchInput[\"DPadLeft\"] = 14] = \"DPadLeft\";\n /** DRight */\n SwitchInput[SwitchInput[\"DPadRight\"] = 15] = \"DPadRight\";\n /** Home */\n SwitchInput[SwitchInput[\"Home\"] = 16] = \"Home\";\n /** Capture */\n SwitchInput[SwitchInput[\"Capture\"] = 17] = \"Capture\";\n /** LStickXAxis */\n SwitchInput[SwitchInput[\"LStickXAxis\"] = 18] = \"LStickXAxis\";\n /** LStickYAxis */\n SwitchInput[SwitchInput[\"LStickYAxis\"] = 19] = \"LStickYAxis\";\n /** RStickXAxis */\n SwitchInput[SwitchInput[\"RStickXAxis\"] = 20] = \"RStickXAxis\";\n /** RStickYAxis */\n SwitchInput[SwitchInput[\"RStickYAxis\"] = 21] = \"RStickYAxis\";\n})(SwitchInput || (SwitchInput = {}));\n//# sourceMappingURL=deviceEnums.js.map","/**\n * Event Types\n */\nexport var DeviceInputEventType;\n(function (DeviceInputEventType) {\n // Pointers\n /** PointerMove */\n DeviceInputEventType[DeviceInputEventType[\"PointerMove\"] = 0] = \"PointerMove\";\n /** PointerDown */\n DeviceInputEventType[DeviceInputEventType[\"PointerDown\"] = 1] = \"PointerDown\";\n /** PointerUp */\n DeviceInputEventType[DeviceInputEventType[\"PointerUp\"] = 2] = \"PointerUp\";\n})(DeviceInputEventType || (DeviceInputEventType = {}));\n/**\n * Constants used for Events\n */\nexport class EventConstants {\n}\n/**\n * Pixel delta for Wheel Events (Default)\n */\nEventConstants.DOM_DELTA_PIXEL = 0x00;\n/**\n * Line delta for Wheel Events\n */\nEventConstants.DOM_DELTA_LINE = 0x01;\n/**\n * Page delta for Wheel Events\n */\nEventConstants.DOM_DELTA_PAGE = 0x02;\n//# sourceMappingURL=deviceInputEvents.js.map","\nimport { EventConstants } from \"../Events/deviceInputEvents.js\";\nimport { DeviceType, NativePointerInput, PointerInput } from \"./InputDevices/deviceEnums.js\";\n/**\n * Class to wrap DeviceInputSystem data into an event object\n */\nexport class DeviceEventFactory {\n /**\n * Create device input events based on provided type and slot\n *\n * @param deviceType Type of device\n * @param deviceSlot \"Slot\" or index that device is referenced in\n * @param inputIndex Id of input to be checked\n * @param currentState Current value for given input\n * @param deviceInputSystem Reference to DeviceInputSystem\n * @param elementToAttachTo HTMLElement to reference as target for inputs\n * @returns IUIEvent object\n */\n static CreateDeviceEvent(deviceType, deviceSlot, inputIndex, currentState, deviceInputSystem, elementToAttachTo, pointerId) {\n switch (deviceType) {\n case DeviceType.Keyboard:\n return this._CreateKeyboardEvent(inputIndex, currentState, deviceInputSystem, elementToAttachTo);\n case DeviceType.Mouse:\n if (inputIndex === PointerInput.MouseWheelX || inputIndex === PointerInput.MouseWheelY || inputIndex === PointerInput.MouseWheelZ) {\n return this._CreateWheelEvent(deviceType, deviceSlot, inputIndex, currentState, deviceInputSystem, elementToAttachTo);\n }\n // eslint-disable-next-line no-fallthrough\n case DeviceType.Touch:\n return this._CreatePointerEvent(deviceType, deviceSlot, inputIndex, currentState, deviceInputSystem, elementToAttachTo, pointerId);\n default:\n throw `Unable to generate event for device ${DeviceType[deviceType]}`;\n }\n }\n /**\n * Creates pointer event\n *\n * @param deviceType Type of device\n * @param deviceSlot \"Slot\" or index that device is referenced in\n * @param inputIndex Id of input to be checked\n * @param currentState Current value for given input\n * @param deviceInputSystem Reference to DeviceInputSystem\n * @param elementToAttachTo HTMLElement to reference as target for inputs\n * @returns IUIEvent object (Pointer)\n */\n static _CreatePointerEvent(deviceType, deviceSlot, inputIndex, currentState, deviceInputSystem, elementToAttachTo, pointerId) {\n const evt = this._CreateMouseEvent(deviceType, deviceSlot, inputIndex, currentState, deviceInputSystem, elementToAttachTo);\n if (deviceType === DeviceType.Mouse) {\n evt.deviceType = DeviceType.Mouse;\n evt.pointerId = 1;\n evt.pointerType = \"mouse\";\n }\n else {\n evt.deviceType = DeviceType.Touch;\n evt.pointerId = pointerId !== null && pointerId !== void 0 ? pointerId : deviceSlot;\n evt.pointerType = \"touch\";\n }\n let buttons = 0;\n // Populate buttons property with current state of all mouse buttons\n // Uses values found on: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons\n buttons += deviceInputSystem.pollInput(deviceType, deviceSlot, PointerInput.LeftClick);\n buttons += deviceInputSystem.pollInput(deviceType, deviceSlot, PointerInput.RightClick) * 2;\n buttons += deviceInputSystem.pollInput(deviceType, deviceSlot, PointerInput.MiddleClick) * 4;\n evt.buttons = buttons;\n if (inputIndex === PointerInput.Move) {\n evt.type = \"pointermove\";\n }\n else if (inputIndex >= PointerInput.LeftClick && inputIndex <= PointerInput.RightClick) {\n evt.type = currentState === 1 ? \"pointerdown\" : \"pointerup\";\n evt.button = inputIndex - 2;\n }\n return evt;\n }\n /**\n * Create Mouse Wheel Event\n * @param deviceType Type of device\n * @param deviceSlot \"Slot\" or index that device is referenced in\n * @param inputIndex Id of input to be checked\n * @param currentState Current value for given input\n * @param deviceInputSystem Reference to DeviceInputSystem\n * @param elementToAttachTo HTMLElement to reference as target for inputs\n * @returns IUIEvent object (Wheel)\n */\n static _CreateWheelEvent(deviceType, deviceSlot, inputIndex, currentState, deviceInputSystem, elementToAttachTo) {\n const evt = this._CreateMouseEvent(deviceType, deviceSlot, inputIndex, currentState, deviceInputSystem, elementToAttachTo);\n // While WheelEvents don't generally have a pointerId, we used to add one in the InputManager\n // This line has been added to make the InputManager more platform-agnostic\n // Similar code exists in the WebDeviceInputSystem to handle browser created events\n evt.pointerId = 1;\n evt.type = \"wheel\";\n evt.deltaMode = EventConstants.DOM_DELTA_PIXEL;\n evt.deltaX = 0;\n evt.deltaY = 0;\n evt.deltaZ = 0;\n switch (inputIndex) {\n case PointerInput.MouseWheelX:\n evt.deltaX = currentState;\n break;\n case PointerInput.MouseWheelY:\n evt.deltaY = currentState;\n break;\n case PointerInput.MouseWheelZ:\n evt.deltaZ = currentState;\n break;\n }\n return evt;\n }\n /**\n * Create Mouse Event\n * @param deviceType Type of device\n * @param deviceSlot \"Slot\" or index that device is referenced in\n * @param inputIndex Id of input to be checked\n * @param currentState Current value for given input\n * @param deviceInputSystem Reference to DeviceInputSystem\n * @param elementToAttachTo HTMLElement to reference as target for inputs\n * @returns IUIEvent object (Mouse)\n */\n static _CreateMouseEvent(deviceType, deviceSlot, inputIndex, currentState, deviceInputSystem, elementToAttachTo) {\n const evt = this._CreateEvent(elementToAttachTo);\n const pointerX = deviceInputSystem.pollInput(deviceType, deviceSlot, PointerInput.Horizontal);\n const pointerY = deviceInputSystem.pollInput(deviceType, deviceSlot, PointerInput.Vertical);\n // Handle offsets/deltas based on existence of HTMLElement\n if (elementToAttachTo) {\n evt.movementX = 0;\n evt.movementY = 0;\n evt.offsetX = evt.movementX - elementToAttachTo.getBoundingClientRect().x;\n evt.offsetY = evt.movementY - elementToAttachTo.getBoundingClientRect().y;\n }\n else {\n evt.movementX = deviceInputSystem.pollInput(deviceType, deviceSlot, NativePointerInput.DeltaHorizontal); // DeltaHorizontal\n evt.movementY = deviceInputSystem.pollInput(deviceType, deviceSlot, NativePointerInput.DeltaVertical); // DeltaVertical\n evt.offsetX = 0;\n evt.offsetY = 0;\n }\n this._CheckNonCharacterKeys(evt, deviceInputSystem);\n evt.clientX = pointerX;\n evt.clientY = pointerY;\n evt.x = pointerX;\n evt.y = pointerY;\n evt.deviceType = deviceType;\n evt.deviceSlot = deviceSlot;\n evt.inputIndex = inputIndex;\n return evt;\n }\n /**\n * Create Keyboard Event\n * @param inputIndex Id of input to be checked\n * @param currentState Current value for given input\n * @param deviceInputSystem Reference to DeviceInputSystem\n * @param elementToAttachTo HTMLElement to reference as target for inputs\n * @returns IEvent object (Keyboard)\n */\n static _CreateKeyboardEvent(inputIndex, currentState, deviceInputSystem, elementToAttachTo) {\n const evt = this._CreateEvent(elementToAttachTo);\n this._CheckNonCharacterKeys(evt, deviceInputSystem);\n evt.deviceType = DeviceType.Keyboard;\n evt.deviceSlot = 0;\n evt.inputIndex = inputIndex;\n evt.type = currentState === 1 ? \"keydown\" : \"keyup\";\n evt.key = String.fromCharCode(inputIndex);\n evt.keyCode = inputIndex;\n return evt;\n }\n /**\n * Add parameters for non-character keys (Ctrl, Alt, Meta, Shift)\n * @param evt Event object to add parameters to\n * @param deviceInputSystem DeviceInputSystem to pull values from\n */\n static _CheckNonCharacterKeys(evt, deviceInputSystem) {\n const isKeyboardActive = deviceInputSystem.isDeviceAvailable(DeviceType.Keyboard);\n const altKey = isKeyboardActive && deviceInputSystem.pollInput(DeviceType.Keyboard, 0, 18) === 1;\n const ctrlKey = isKeyboardActive && deviceInputSystem.pollInput(DeviceType.Keyboard, 0, 17) === 1;\n const metaKey = isKeyboardActive &&\n (deviceInputSystem.pollInput(DeviceType.Keyboard, 0, 91) === 1 ||\n deviceInputSystem.pollInput(DeviceType.Keyboard, 0, 92) === 1 ||\n deviceInputSystem.pollInput(DeviceType.Keyboard, 0, 93) === 1);\n const shiftKey = isKeyboardActive && deviceInputSystem.pollInput(DeviceType.Keyboard, 0, 16) === 1;\n evt.altKey = altKey;\n evt.ctrlKey = ctrlKey;\n evt.metaKey = metaKey;\n evt.shiftKey = shiftKey;\n }\n /**\n * Create base event object\n * @param elementToAttachTo Value to use as event target\n * @returns\n */\n static _CreateEvent(elementToAttachTo) {\n const evt = {};\n evt.preventDefault = () => { };\n evt.target = elementToAttachTo;\n return evt;\n }\n}\n//# sourceMappingURL=eventFactory.js.map","import { DeviceEventFactory } from \"./eventFactory.js\";\nimport { DeviceType } from \"./InputDevices/deviceEnums.js\";\n/** @internal */\nexport class NativeDeviceInputSystem {\n constructor(onDeviceConnected, onDeviceDisconnected, onInputChanged) {\n this._nativeInput = _native.DeviceInputSystem\n ? new _native.DeviceInputSystem(onDeviceConnected, onDeviceDisconnected, (deviceType, deviceSlot, inputIndex, currentState) => {\n const evt = DeviceEventFactory.CreateDeviceEvent(deviceType, deviceSlot, inputIndex, currentState, this);\n onInputChanged(deviceType, deviceSlot, evt);\n })\n : this._createDummyNativeInput();\n }\n // Public functions\n /**\n * Checks for current device input value, given an id and input index. Throws exception if requested device not initialized.\n * @param deviceType Enum specifying device type\n * @param deviceSlot \"Slot\" or index that device is referenced in\n * @param inputIndex Id of input to be checked\n * @returns Current value of input\n */\n pollInput(deviceType, deviceSlot, inputIndex) {\n return this._nativeInput.pollInput(deviceType, deviceSlot, inputIndex);\n }\n /**\n * Check for a specific device in the DeviceInputSystem\n * @param deviceType Type of device to check for\n * @returns bool with status of device's existence\n */\n isDeviceAvailable(deviceType) {\n //TODO: FIx native side first\n return deviceType === DeviceType.Mouse || deviceType === DeviceType.Touch;\n }\n /**\n * Dispose of all the observables\n */\n dispose() {\n this._nativeInput.dispose();\n }\n /**\n * For versions of BabylonNative that don't have the NativeInput plugin initialized, create a dummy version\n * @returns Object with dummy functions\n */\n _createDummyNativeInput() {\n const nativeInput = {\n pollInput: () => {\n return 0;\n },\n isDeviceAvailable: () => {\n return false;\n },\n dispose: () => { },\n };\n return nativeInput;\n }\n}\n//# sourceMappingURL=nativeDeviceInputSystem.js.map","import { IsNavigatorAvailable } from \"../Misc/domManagement.js\";\nimport { Tools } from \"../Misc/tools.js\";\nimport { DeviceEventFactory } from \"./eventFactory.js\";\nimport { DeviceType, PointerInput } from \"./InputDevices/deviceEnums.js\";\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst MAX_KEYCODES = 255;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst MAX_POINTER_INPUTS = Object.keys(PointerInput).length / 2;\n/** @internal */\nexport class WebDeviceInputSystem {\n /**\n * Constructor for the WebDeviceInputSystem\n * @param engine Engine to reference\n * @param onDeviceConnected Callback to execute when device is connected\n * @param onDeviceDisconnected Callback to execute when device is disconnected\n * @param onInputChanged Callback to execute when input changes on device\n */\n constructor(engine, onDeviceConnected, onDeviceDisconnected, onInputChanged) {\n // Private Members\n this._inputs = [];\n this._keyboardActive = false;\n this._pointerActive = false;\n this._usingSafari = Tools.IsSafari();\n // Found solution for determining if MacOS is being used here:\n // https://stackoverflow.com/questions/10527983/best-way-to-detect-mac-os-x-or-windows-computers-with-javascript-or-jquery\n this._usingMacOS = IsNavigatorAvailable() && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._keyboardDownEvent = (evt) => { };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._keyboardUpEvent = (evt) => { };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._keyboardBlurEvent = (evt) => { };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._pointerMoveEvent = (evt) => { };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._pointerDownEvent = (evt) => { };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._pointerUpEvent = (evt) => { };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._pointerCancelEvent = (evt) => { };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._pointerWheelEvent = (evt) => { };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._pointerBlurEvent = (evt) => { };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._pointerMacOSChromeOutEvent = (evt) => { };\n this._eventsAttached = false;\n this._mouseId = -1;\n this._isUsingFirefox = IsNavigatorAvailable() && navigator.userAgent && navigator.userAgent.indexOf(\"Firefox\") !== -1;\n this._isUsingChromium = IsNavigatorAvailable() && navigator.userAgent && navigator.userAgent.indexOf(\"Chrome\") !== -1;\n this._maxTouchPoints = 0;\n this._pointerInputClearObserver = null;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._gamepadConnectedEvent = (evt) => { };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._gamepadDisconnectedEvent = (evt) => { };\n this._eventPrefix = Tools.GetPointerPrefix(engine);\n this._engine = engine;\n this._onDeviceConnected = onDeviceConnected;\n this._onDeviceDisconnected = onDeviceDisconnected;\n this._onInputChanged = onInputChanged;\n // If we need a pointerId, set one for future use\n this._mouseId = this._isUsingFirefox ? 0 : 1;\n this._enableEvents();\n if (this._usingMacOS) {\n this._metaKeys = [];\n }\n // Set callback to enable event handler switching when inputElement changes\n if (!this._engine._onEngineViewChanged) {\n this._engine._onEngineViewChanged = () => {\n this._enableEvents();\n };\n }\n }\n // Public functions\n /**\n * Checks for current device input value, given an id and input index. Throws exception if requested device not initialized.\n * @param deviceType Enum specifying device type\n * @param deviceSlot \"Slot\" or index that device is referenced in\n * @param inputIndex Id of input to be checked\n * @returns Current value of input\n */\n pollInput(deviceType, deviceSlot, inputIndex) {\n const device = this._inputs[deviceType][deviceSlot];\n if (!device) {\n throw `Unable to find device ${DeviceType[deviceType]}`;\n }\n if (deviceType >= DeviceType.DualShock && deviceType <= DeviceType.DualSense) {\n this._updateDevice(deviceType, deviceSlot, inputIndex);\n }\n const currentValue = device[inputIndex];\n if (currentValue === undefined) {\n throw `Unable to find input ${inputIndex} for device ${DeviceType[deviceType]} in slot ${deviceSlot}`;\n }\n if (inputIndex === PointerInput.Move) {\n Tools.Warn(`Unable to provide information for PointerInput.Move. Try using PointerInput.Horizontal or PointerInput.Vertical for move data.`);\n }\n return currentValue;\n }\n /**\n * Check for a specific device in the DeviceInputSystem\n * @param deviceType Type of device to check for\n * @returns bool with status of device's existence\n */\n isDeviceAvailable(deviceType) {\n return this._inputs[deviceType] !== undefined;\n }\n /**\n * Dispose of all the eventlisteners\n */\n dispose() {\n // Callbacks\n this._onDeviceConnected = () => { };\n this._onDeviceDisconnected = () => { };\n this._onInputChanged = () => { };\n delete this._engine._onEngineViewChanged;\n if (this._elementToAttachTo) {\n this._disableEvents();\n }\n }\n /**\n * Enable listening for user input events\n */\n _enableEvents() {\n const inputElement = this === null || this === void 0 ? void 0 : this._engine.getInputElement();\n if (inputElement && (!this._eventsAttached || this._elementToAttachTo !== inputElement)) {\n // Remove events before adding to avoid double events or simultaneous events on multiple canvases\n this._disableEvents();\n // If the inputs array has already been created, zero it out to before setting up events\n if (this._inputs) {\n for (const inputs of this._inputs) {\n if (inputs) {\n for (const deviceSlotKey in inputs) {\n const deviceSlot = +deviceSlotKey;\n const device = inputs[deviceSlot];\n if (device) {\n for (let inputIndex = 0; inputIndex < device.length; inputIndex++) {\n device[inputIndex] = 0;\n }\n }\n }\n }\n }\n }\n this._elementToAttachTo = inputElement;\n // Set tab index for the inputElement to the engine's canvasTabIndex, if and only if the element's tab index is -1\n this._elementToAttachTo.tabIndex = this._elementToAttachTo.tabIndex !== -1 ? this._elementToAttachTo.tabIndex : this._engine.canvasTabIndex;\n this._handleKeyActions();\n this._handlePointerActions();\n this._handleGamepadActions();\n this._eventsAttached = true;\n // Check for devices that are already connected but aren't registered. Currently, only checks for gamepads and mouse\n this._checkForConnectedDevices();\n }\n }\n /**\n * Disable listening for user input events\n */\n _disableEvents() {\n if (this._elementToAttachTo) {\n // Blur Events\n this._elementToAttachTo.removeEventListener(\"blur\", this._keyboardBlurEvent);\n this._elementToAttachTo.removeEventListener(\"blur\", this._pointerBlurEvent);\n // Keyboard Events\n this._elementToAttachTo.removeEventListener(\"keydown\", this._keyboardDownEvent);\n this._elementToAttachTo.removeEventListener(\"keyup\", this._keyboardUpEvent);\n // Pointer Events\n this._elementToAttachTo.removeEventListener(this._eventPrefix + \"move\", this._pointerMoveEvent);\n this._elementToAttachTo.removeEventListener(this._eventPrefix + \"down\", this._pointerDownEvent);\n this._elementToAttachTo.removeEventListener(this._eventPrefix + \"up\", this._pointerUpEvent);\n this._elementToAttachTo.removeEventListener(this._eventPrefix + \"cancel\", this._pointerCancelEvent);\n this._elementToAttachTo.removeEventListener(this._wheelEventName, this._pointerWheelEvent);\n if (this._usingMacOS && this._isUsingChromium) {\n this._elementToAttachTo.removeEventListener(\"lostpointercapture\", this._pointerMacOSChromeOutEvent);\n }\n // Gamepad Events\n window.removeEventListener(\"gamepadconnected\", this._gamepadConnectedEvent);\n window.removeEventListener(\"gamepaddisconnected\", this._gamepadDisconnectedEvent);\n }\n if (this._pointerInputClearObserver) {\n this._engine.onEndFrameObservable.remove(this._pointerInputClearObserver);\n }\n this._eventsAttached = false;\n }\n /**\n * Checks for existing connections to devices and register them, if necessary\n * Currently handles gamepads and mouse\n */\n _checkForConnectedDevices() {\n if (navigator.getGamepads) {\n const gamepads = navigator.getGamepads();\n for (const gamepad of gamepads) {\n if (gamepad) {\n this._addGamePad(gamepad);\n }\n }\n }\n // If the device in use has mouse capabilities, pre-register mouse\n if (typeof matchMedia === \"function\" && matchMedia(\"(pointer:fine)\").matches) {\n // This will provide a dummy value for the cursor position and is expected to be overridden when the first mouse event happens.\n // There isn't any good way to get the current position outside of a pointer event so that's why this was done.\n this._addPointerDevice(DeviceType.Mouse, 0, 0, 0);\n }\n }\n // Private functions\n /**\n * Add a gamepad to the DeviceInputSystem\n * @param gamepad A single DOM Gamepad object\n */\n _addGamePad(gamepad) {\n const deviceType = this._getGamepadDeviceType(gamepad.id);\n const deviceSlot = gamepad.index;\n this._gamepads = this._gamepads || new Array(gamepad.index + 1);\n this._registerDevice(deviceType, deviceSlot, gamepad.buttons.length + gamepad.axes.length);\n this._gamepads[deviceSlot] = deviceType;\n }\n /**\n * Add pointer device to DeviceInputSystem\n * @param deviceType Type of Pointer to add\n * @param deviceSlot Pointer ID (0 for mouse, pointerId for Touch)\n * @param currentX Current X at point of adding\n * @param currentY Current Y at point of adding\n */\n _addPointerDevice(deviceType, deviceSlot, currentX, currentY) {\n if (!this._pointerActive) {\n this._pointerActive = true;\n }\n this._registerDevice(deviceType, deviceSlot, MAX_POINTER_INPUTS);\n const pointer = this._inputs[deviceType][deviceSlot]; /* initialize our pointer position immediately after registration */\n pointer[0] = currentX;\n pointer[1] = currentY;\n }\n /**\n * Add device and inputs to device array\n * @param deviceType Enum specifying device type\n * @param deviceSlot \"Slot\" or index that device is referenced in\n * @param numberOfInputs Number of input entries to create for given device\n */\n _registerDevice(deviceType, deviceSlot, numberOfInputs) {\n if (deviceSlot === undefined) {\n throw `Unable to register device ${DeviceType[deviceType]} to undefined slot.`;\n }\n if (!this._inputs[deviceType]) {\n this._inputs[deviceType] = {};\n }\n if (!this._inputs[deviceType][deviceSlot]) {\n const device = new Array(numberOfInputs);\n device.fill(0);\n this._inputs[deviceType][deviceSlot] = device;\n this._onDeviceConnected(deviceType, deviceSlot);\n }\n }\n /**\n * Given a specific device name, remove that device from the device map\n * @param deviceType Enum specifying device type\n * @param deviceSlot \"Slot\" or index that device is referenced in\n */\n _unregisterDevice(deviceType, deviceSlot) {\n if (this._inputs[deviceType][deviceSlot]) {\n delete this._inputs[deviceType][deviceSlot];\n this._onDeviceDisconnected(deviceType, deviceSlot);\n }\n }\n /**\n * Handle all actions that come from keyboard interaction\n */\n _handleKeyActions() {\n this._keyboardDownEvent = (evt) => {\n if (!this._keyboardActive) {\n this._keyboardActive = true;\n this._registerDevice(DeviceType.Keyboard, 0, MAX_KEYCODES);\n }\n const kbKey = this._inputs[DeviceType.Keyboard][0];\n if (kbKey) {\n kbKey[evt.keyCode] = 1;\n const deviceEvent = evt;\n deviceEvent.inputIndex = evt.keyCode;\n if (this._usingMacOS && evt.metaKey && evt.key !== \"Meta\") {\n if (!this._metaKeys.includes(evt.keyCode)) {\n this._metaKeys.push(evt.keyCode);\n }\n }\n this._onInputChanged(DeviceType.Keyboard, 0, deviceEvent);\n }\n };\n this._keyboardUpEvent = (evt) => {\n if (!this._keyboardActive) {\n this._keyboardActive = true;\n this._registerDevice(DeviceType.Keyboard, 0, MAX_KEYCODES);\n }\n const kbKey = this._inputs[DeviceType.Keyboard][0];\n if (kbKey) {\n kbKey[evt.keyCode] = 0;\n const deviceEvent = evt;\n deviceEvent.inputIndex = evt.keyCode;\n if (this._usingMacOS && evt.key === \"Meta\" && this._metaKeys.length > 0) {\n for (const keyCode of this._metaKeys) {\n const deviceEvent = DeviceEventFactory.CreateDeviceEvent(DeviceType.Keyboard, 0, keyCode, 0, this, this._elementToAttachTo);\n kbKey[keyCode] = 0;\n this._onInputChanged(DeviceType.Keyboard, 0, deviceEvent);\n }\n this._metaKeys.splice(0, this._metaKeys.length);\n }\n this._onInputChanged(DeviceType.Keyboard, 0, deviceEvent);\n }\n };\n this._keyboardBlurEvent = () => {\n if (this._keyboardActive) {\n const kbKey = this._inputs[DeviceType.Keyboard][0];\n for (let i = 0; i < kbKey.length; i++) {\n if (kbKey[i] !== 0) {\n kbKey[i] = 0;\n const deviceEvent = DeviceEventFactory.CreateDeviceEvent(DeviceType.Keyboard, 0, i, 0, this, this._elementToAttachTo);\n this._onInputChanged(DeviceType.Keyboard, 0, deviceEvent);\n }\n }\n if (this._usingMacOS) {\n this._metaKeys.splice(0, this._metaKeys.length);\n }\n }\n };\n this._elementToAttachTo.addEventListener(\"keydown\", this._keyboardDownEvent);\n this._elementToAttachTo.addEventListener(\"keyup\", this._keyboardUpEvent);\n this._elementToAttachTo.addEventListener(\"blur\", this._keyboardBlurEvent);\n }\n /**\n * Handle all actions that come from pointer interaction\n */\n _handlePointerActions() {\n // If maxTouchPoints is defined, use that value. Otherwise, allow for a minimum for supported gestures like pinch\n this._maxTouchPoints = (IsNavigatorAvailable() && navigator.maxTouchPoints) || 2;\n if (!this._activeTouchIds) {\n this._activeTouchIds = new Array(this._maxTouchPoints);\n }\n for (let i = 0; i < this._maxTouchPoints; i++) {\n this._activeTouchIds[i] = -1;\n }\n this._pointerMoveEvent = (evt) => {\n const deviceType = this._getPointerType(evt);\n let deviceSlot = deviceType === DeviceType.Mouse ? 0 : this._activeTouchIds.indexOf(evt.pointerId);\n // In the event that we're gettting pointermove events from touch inputs that we aren't tracking,\n // look for an available slot and retroactively connect it.\n if (deviceType === DeviceType.Touch && deviceSlot === -1) {\n const idx = this._activeTouchIds.indexOf(-1);\n if (idx >= 0) {\n deviceSlot = idx;\n this._activeTouchIds[idx] = evt.pointerId;\n // Because this is a \"new\" input, inform the connected callback\n this._onDeviceConnected(deviceType, deviceSlot);\n }\n else {\n // We can't find an open slot to store new pointer so just return (can only support max number of touches)\n Tools.Warn(`Max number of touches exceeded. Ignoring touches in excess of ${this._maxTouchPoints}`);\n return;\n }\n }\n if (!this._inputs[deviceType]) {\n this._inputs[deviceType] = {};\n }\n if (!this._inputs[deviceType][deviceSlot]) {\n this._addPointerDevice(deviceType, deviceSlot, evt.clientX, evt.clientY);\n }\n const pointer = this._inputs[deviceType][deviceSlot];\n if (pointer) {\n const deviceEvent = evt;\n deviceEvent.inputIndex = PointerInput.Move;\n pointer[PointerInput.Horizontal] = evt.clientX;\n pointer[PointerInput.Vertical] = evt.clientY;\n // For touches that aren't started with a down, we need to set the button state to 1\n if (deviceType === DeviceType.Touch && pointer[PointerInput.LeftClick] === 0) {\n pointer[PointerInput.LeftClick] = 1;\n }\n if (evt.pointerId === undefined) {\n evt.pointerId = this._mouseId;\n }\n this._onInputChanged(deviceType, deviceSlot, deviceEvent);\n // Lets Propagate the event for move with same position.\n if (!this._usingSafari && evt.button !== -1) {\n deviceEvent.inputIndex = evt.button + 2;\n pointer[evt.button + 2] = pointer[evt.button + 2] ? 0 : 1; // Reverse state of button if evt.button has value\n this._onInputChanged(deviceType, deviceSlot, deviceEvent);\n }\n }\n };\n this._pointerDownEvent = (evt) => {\n const deviceType = this._getPointerType(evt);\n let deviceSlot = deviceType === DeviceType.Mouse ? 0 : evt.pointerId;\n if (deviceType === DeviceType.Touch) {\n const idx = this._activeTouchIds.indexOf(-1);\n if (idx >= 0) {\n deviceSlot = idx;\n this._activeTouchIds[idx] = evt.pointerId;\n }\n else {\n // We can't find an open slot to store new pointer so just return (can only support max number of touches)\n Tools.Warn(`Max number of touches exceeded. Ignoring touches in excess of ${this._maxTouchPoints}`);\n return;\n }\n }\n if (!this._inputs[deviceType]) {\n this._inputs[deviceType] = {};\n }\n if (!this._inputs[deviceType][deviceSlot]) {\n this._addPointerDevice(deviceType, deviceSlot, evt.clientX, evt.clientY);\n }\n else if (deviceType === DeviceType.Touch) {\n this._onDeviceConnected(deviceType, deviceSlot);\n }\n const pointer = this._inputs[deviceType][deviceSlot];\n if (pointer) {\n const previousHorizontal = pointer[PointerInput.Horizontal];\n const previousVertical = pointer[PointerInput.Vertical];\n if (deviceType === DeviceType.Mouse) {\n // Mouse; Set pointerId if undefined\n if (evt.pointerId === undefined) {\n evt.pointerId = this._mouseId;\n }\n if (!document.pointerLockElement) {\n try {\n this._elementToAttachTo.setPointerCapture(this._mouseId);\n }\n catch (e) {\n // DO NOTHING\n }\n }\n }\n else {\n // Touch; Since touches are dynamically assigned, only set capture if we have an id\n if (evt.pointerId && !document.pointerLockElement) {\n try {\n this._elementToAttachTo.setPointerCapture(evt.pointerId);\n }\n catch (e) {\n // DO NOTHING\n }\n }\n }\n pointer[PointerInput.Horizontal] = evt.clientX;\n pointer[PointerInput.Vertical] = evt.clientY;\n pointer[evt.button + 2] = 1;\n const deviceEvent = evt;\n // NOTE: The +2 used here to is because PointerInput has the same value progression for its mouse buttons as PointerEvent.button\n // However, we have our X and Y values front-loaded to group together the touch inputs but not break this progression\n // EG. ([X, Y, Left-click], Middle-click, etc...)\n deviceEvent.inputIndex = evt.button + 2;\n this._onInputChanged(deviceType, deviceSlot, deviceEvent);\n if (previousHorizontal !== evt.clientX || previousVertical !== evt.clientY) {\n deviceEvent.inputIndex = PointerInput.Move;\n this._onInputChanged(deviceType, deviceSlot, deviceEvent);\n }\n }\n };\n this._pointerUpEvent = (evt) => {\n var _a, _b, _c, _d, _e;\n const deviceType = this._getPointerType(evt);\n const deviceSlot = deviceType === DeviceType.Mouse ? 0 : this._activeTouchIds.indexOf(evt.pointerId);\n if (deviceType === DeviceType.Touch) {\n // If we're getting a pointerup event for a touch that isn't active, just return.\n if (deviceSlot === -1) {\n return;\n }\n else {\n this._activeTouchIds[deviceSlot] = -1;\n }\n }\n const pointer = (_a = this._inputs[deviceType]) === null || _a === void 0 ? void 0 : _a[deviceSlot];\n if (pointer && pointer[evt.button + 2] !== 0) {\n const previousHorizontal = pointer[PointerInput.Horizontal];\n const previousVertical = pointer[PointerInput.Vertical];\n pointer[PointerInput.Horizontal] = evt.clientX;\n pointer[PointerInput.Vertical] = evt.clientY;\n pointer[evt.button + 2] = 0;\n const deviceEvent = evt;\n if (evt.pointerId === undefined) {\n evt.pointerId = this._mouseId;\n }\n if (previousHorizontal !== evt.clientX || previousVertical !== evt.clientY) {\n deviceEvent.inputIndex = PointerInput.Move;\n this._onInputChanged(deviceType, deviceSlot, deviceEvent);\n }\n // NOTE: The +2 used here to is because PointerInput has the same value progression for its mouse buttons as PointerEvent.button\n // However, we have our X and Y values front-loaded to group together the touch inputs but not break this progression\n // EG. ([X, Y, Left-click], Middle-click, etc...)\n deviceEvent.inputIndex = evt.button + 2;\n if (deviceType === DeviceType.Mouse && this._mouseId >= 0 && ((_c = (_b = this._elementToAttachTo).hasPointerCapture) === null || _c === void 0 ? void 0 : _c.call(_b, this._mouseId))) {\n this._elementToAttachTo.releasePointerCapture(this._mouseId);\n }\n else if (evt.pointerId && ((_e = (_d = this._elementToAttachTo).hasPointerCapture) === null || _e === void 0 ? void 0 : _e.call(_d, evt.pointerId))) {\n this._elementToAttachTo.releasePointerCapture(evt.pointerId);\n }\n this._onInputChanged(deviceType, deviceSlot, deviceEvent);\n if (deviceType === DeviceType.Touch) {\n this._onDeviceDisconnected(deviceType, deviceSlot);\n }\n }\n };\n this._pointerCancelEvent = (evt) => {\n var _a, _b, _c, _d;\n if (evt.pointerType === \"mouse\") {\n const pointer = this._inputs[DeviceType.Mouse][0];\n if (this._mouseId >= 0 && ((_b = (_a = this._elementToAttachTo).hasPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, this._mouseId))) {\n this._elementToAttachTo.releasePointerCapture(this._mouseId);\n }\n for (let inputIndex = PointerInput.LeftClick; inputIndex <= PointerInput.BrowserForward; inputIndex++) {\n if (pointer[inputIndex] === 1) {\n pointer[inputIndex] = 0;\n const deviceEvent = DeviceEventFactory.CreateDeviceEvent(DeviceType.Mouse, 0, inputIndex, 0, this, this._elementToAttachTo);\n this._onInputChanged(DeviceType.Mouse, 0, deviceEvent);\n }\n }\n }\n else {\n const deviceSlot = this._activeTouchIds.indexOf(evt.pointerId);\n // If we're getting a pointercancel event for a touch that isn't active, just return\n if (deviceSlot === -1) {\n return;\n }\n if ((_d = (_c = this._elementToAttachTo).hasPointerCapture) === null || _d === void 0 ? void 0 : _d.call(_c, evt.pointerId)) {\n this._elementToAttachTo.releasePointerCapture(evt.pointerId);\n }\n this._inputs[DeviceType.Touch][deviceSlot][PointerInput.LeftClick] = 0;\n const deviceEvent = DeviceEventFactory.CreateDeviceEvent(DeviceType.Touch, deviceSlot, PointerInput.LeftClick, 0, this, this._elementToAttachTo, evt.pointerId);\n this._onInputChanged(DeviceType.Touch, deviceSlot, deviceEvent);\n this._activeTouchIds[deviceSlot] = -1;\n this._onDeviceDisconnected(DeviceType.Touch, deviceSlot);\n }\n };\n // Set Wheel Event Name, code originally from scene.inputManager\n this._wheelEventName =\n \"onwheel\" in document.createElement(\"div\")\n ? \"wheel\" // Modern browsers support \"wheel\"\n : document.onmousewheel !== undefined\n ? \"mousewheel\" // Webkit and IE support at least \"mousewheel\"\n : \"DOMMouseScroll\"; // let's assume that remaining browsers are older Firefox\n // Code originally in scene.inputManager.ts\n // Chrome reports warning in console if wheel listener doesn't set an explicit passive option.\n // IE11 only supports captureEvent:boolean, not options:object, and it defaults to false.\n // Feature detection technique copied from: https://github.com/github/eventlistener-polyfill (MIT license)\n let passiveSupported = false;\n const noop = function () { };\n try {\n const options = Object.defineProperty({}, \"passive\", {\n get: function () {\n passiveSupported = true;\n },\n });\n this._elementToAttachTo.addEventListener(\"test\", noop, options);\n this._elementToAttachTo.removeEventListener(\"test\", noop, options);\n }\n catch (e) {\n /* */\n }\n this._pointerBlurEvent = () => {\n var _a, _b, _c, _d, _e;\n // Handle mouse buttons\n if (this.isDeviceAvailable(DeviceType.Mouse)) {\n const pointer = this._inputs[DeviceType.Mouse][0];\n if (this._mouseId >= 0 && ((_b = (_a = this._elementToAttachTo).hasPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, this._mouseId))) {\n this._elementToAttachTo.releasePointerCapture(this._mouseId);\n }\n for (let inputIndex = PointerInput.LeftClick; inputIndex <= PointerInput.BrowserForward; inputIndex++) {\n if (pointer[inputIndex] === 1) {\n pointer[inputIndex] = 0;\n const deviceEvent = DeviceEventFactory.CreateDeviceEvent(DeviceType.Mouse, 0, inputIndex, 0, this, this._elementToAttachTo);\n this._onInputChanged(DeviceType.Mouse, 0, deviceEvent);\n }\n }\n }\n // Handle Active Touches\n if (this.isDeviceAvailable(DeviceType.Touch)) {\n const pointer = this._inputs[DeviceType.Touch];\n for (let deviceSlot = 0; deviceSlot < this._activeTouchIds.length; deviceSlot++) {\n const pointerId = this._activeTouchIds[deviceSlot];\n if ((_d = (_c = this._elementToAttachTo).hasPointerCapture) === null || _d === void 0 ? void 0 : _d.call(_c, pointerId)) {\n this._elementToAttachTo.releasePointerCapture(pointerId);\n }\n if (pointerId !== -1 && ((_e = pointer[deviceSlot]) === null || _e === void 0 ? void 0 : _e[PointerInput.LeftClick]) === 1) {\n pointer[deviceSlot][PointerInput.LeftClick] = 0;\n const deviceEvent = DeviceEventFactory.CreateDeviceEvent(DeviceType.Touch, deviceSlot, PointerInput.LeftClick, 0, this, this._elementToAttachTo, pointerId);\n this._onInputChanged(DeviceType.Touch, deviceSlot, deviceEvent);\n this._activeTouchIds[deviceSlot] = -1;\n this._onDeviceDisconnected(DeviceType.Touch, deviceSlot);\n }\n }\n }\n };\n this._pointerWheelEvent = (evt) => {\n const deviceType = DeviceType.Mouse;\n const deviceSlot = 0;\n if (!this._inputs[deviceType]) {\n this._inputs[deviceType] = [];\n }\n if (!this._inputs[deviceType][deviceSlot]) {\n this._pointerActive = true;\n this._registerDevice(deviceType, deviceSlot, MAX_POINTER_INPUTS);\n }\n const pointer = this._inputs[deviceType][deviceSlot];\n if (pointer) {\n pointer[PointerInput.MouseWheelX] = evt.deltaX || 0;\n pointer[PointerInput.MouseWheelY] = evt.deltaY || evt.wheelDelta || 0;\n pointer[PointerInput.MouseWheelZ] = evt.deltaZ || 0;\n const deviceEvent = evt;\n // By default, there is no pointerId for mouse wheel events so we'll add one here\n // This logic was originally in the InputManager but was added here to make the\n // InputManager more platform-agnostic\n if (evt.pointerId === undefined) {\n evt.pointerId = this._mouseId;\n }\n if (pointer[PointerInput.MouseWheelX] !== 0) {\n deviceEvent.inputIndex = PointerInput.MouseWheelX;\n this._onInputChanged(deviceType, deviceSlot, deviceEvent);\n }\n if (pointer[PointerInput.MouseWheelY] !== 0) {\n deviceEvent.inputIndex = PointerInput.MouseWheelY;\n this._onInputChanged(deviceType, deviceSlot, deviceEvent);\n }\n if (pointer[PointerInput.MouseWheelZ] !== 0) {\n deviceEvent.inputIndex = PointerInput.MouseWheelZ;\n this._onInputChanged(deviceType, deviceSlot, deviceEvent);\n }\n }\n };\n // Workaround for MacOS Chromium Browsers for lost pointer capture bug\n if (this._usingMacOS && this._isUsingChromium) {\n this._pointerMacOSChromeOutEvent = (evt) => {\n if (evt.buttons > 1) {\n this._pointerCancelEvent(evt);\n }\n };\n this._elementToAttachTo.addEventListener(\"lostpointercapture\", this._pointerMacOSChromeOutEvent);\n }\n this._elementToAttachTo.addEventListener(this._eventPrefix + \"move\", this._pointerMoveEvent);\n this._elementToAttachTo.addEventListener(this._eventPrefix + \"down\", this._pointerDownEvent);\n this._elementToAttachTo.addEventListener(this._eventPrefix + \"up\", this._pointerUpEvent);\n this._elementToAttachTo.addEventListener(this._eventPrefix + \"cancel\", this._pointerCancelEvent);\n this._elementToAttachTo.addEventListener(\"blur\", this._pointerBlurEvent);\n this._elementToAttachTo.addEventListener(this._wheelEventName, this._pointerWheelEvent, passiveSupported ? { passive: false } : false);\n // Since there's no up or down event for mouse wheel or delta x/y, clear mouse values at end of frame\n this._pointerInputClearObserver = this._engine.onEndFrameObservable.add(() => {\n if (this.isDeviceAvailable(DeviceType.Mouse)) {\n const pointer = this._inputs[DeviceType.Mouse][0];\n pointer[PointerInput.MouseWheelX] = 0;\n pointer[PointerInput.MouseWheelY] = 0;\n pointer[PointerInput.MouseWheelZ] = 0;\n }\n });\n }\n /**\n * Handle all actions that come from gamepad interaction\n */\n _handleGamepadActions() {\n this._gamepadConnectedEvent = (evt) => {\n this._addGamePad(evt.gamepad);\n };\n this._gamepadDisconnectedEvent = (evt) => {\n if (this._gamepads) {\n const deviceType = this._getGamepadDeviceType(evt.gamepad.id);\n const deviceSlot = evt.gamepad.index;\n this._unregisterDevice(deviceType, deviceSlot);\n delete this._gamepads[deviceSlot];\n }\n };\n window.addEventListener(\"gamepadconnected\", this._gamepadConnectedEvent);\n window.addEventListener(\"gamepaddisconnected\", this._gamepadDisconnectedEvent);\n }\n /**\n * Update all non-event based devices with each frame\n * @param deviceType Enum specifying device type\n * @param deviceSlot \"Slot\" or index that device is referenced in\n * @param inputIndex Id of input to be checked\n */\n _updateDevice(deviceType, deviceSlot, inputIndex) {\n // Gamepads\n const gp = navigator.getGamepads()[deviceSlot];\n if (gp && deviceType === this._gamepads[deviceSlot]) {\n const device = this._inputs[deviceType][deviceSlot];\n if (inputIndex >= gp.buttons.length) {\n device[inputIndex] = gp.axes[inputIndex - gp.buttons.length].valueOf();\n }\n else {\n device[inputIndex] = gp.buttons[inputIndex].value;\n }\n }\n }\n /**\n * Gets DeviceType from the device name\n * @param deviceName Name of Device from DeviceInputSystem\n * @returns DeviceType enum value\n */\n _getGamepadDeviceType(deviceName) {\n if (deviceName.indexOf(\"054c\") !== -1) {\n // DualShock 4 Gamepad\n return deviceName.indexOf(\"0ce6\") !== -1 ? DeviceType.DualSense : DeviceType.DualShock;\n }\n else if (deviceName.indexOf(\"Xbox One\") !== -1 || deviceName.search(\"Xbox 360\") !== -1 || deviceName.search(\"xinput\") !== -1) {\n // Xbox Gamepad\n return DeviceType.Xbox;\n }\n else if (deviceName.indexOf(\"057e\") !== -1) {\n // Switch Gamepad\n return DeviceType.Switch;\n }\n return DeviceType.Generic;\n }\n /**\n * Get DeviceType from a given pointer/mouse/touch event.\n * @param evt PointerEvent to evaluate\n * @returns DeviceType interpreted from event\n */\n _getPointerType(evt) {\n let deviceType = DeviceType.Mouse;\n if (evt.pointerType === \"touch\" || evt.pointerType === \"pen\" || evt.touches) {\n deviceType = DeviceType.Touch;\n }\n return deviceType;\n }\n}\n//# sourceMappingURL=webDeviceInputSystem.js.map","import { Observable } from \"../../Misc/observable.js\";\n/**\n * Class that handles all input for a specific device\n */\nexport class DeviceSource {\n /**\n * Default Constructor\n * @param deviceInputSystem - Reference to DeviceInputSystem\n * @param deviceType - Type of device\n * @param deviceSlot - \"Slot\" or index that device is referenced in\n */\n constructor(deviceInputSystem, \n /** Type of device */\n deviceType, \n /** \"Slot\" or index that device is referenced in */\n deviceSlot = 0) {\n this.deviceType = deviceType;\n this.deviceSlot = deviceSlot;\n // Public Members\n /**\n * Observable to handle device input changes per device\n */\n this.onInputChangedObservable = new Observable();\n this._deviceInputSystem = deviceInputSystem;\n }\n /**\n * Get input for specific input\n * @param inputIndex - index of specific input on device\n * @returns Input value from DeviceInputSystem\n */\n getInput(inputIndex) {\n return this._deviceInputSystem.pollInput(this.deviceType, this.deviceSlot, inputIndex);\n }\n}\n//# sourceMappingURL=deviceSource.js.map","import { DeviceType } from \"./InputDevices/deviceEnums.js\";\nimport { NativeDeviceInputSystem } from \"./nativeDeviceInputSystem.js\";\nimport { WebDeviceInputSystem } from \"./webDeviceInputSystem.js\";\nimport { DeviceSource } from \"./InputDevices/deviceSource.js\";\n/** @internal */\nexport class InternalDeviceSourceManager {\n constructor(engine) {\n this._registeredManagers = new Array();\n this._refCount = 0;\n // Public Functions\n this.registerManager = (manager) => {\n for (let deviceType = 0; deviceType < this._devices.length; deviceType++) {\n const device = this._devices[deviceType];\n for (const deviceSlotKey in device) {\n const deviceSlot = +deviceSlotKey;\n manager._addDevice(new DeviceSource(this._deviceInputSystem, deviceType, deviceSlot));\n }\n }\n this._registeredManagers.push(manager);\n };\n this.unregisterManager = (manager) => {\n const idx = this._registeredManagers.indexOf(manager);\n if (idx > -1) {\n this._registeredManagers.splice(idx, 1);\n }\n };\n const numberOfDeviceTypes = Object.keys(DeviceType).length / 2;\n this._devices = new Array(numberOfDeviceTypes);\n const onDeviceConnected = (deviceType, deviceSlot) => {\n if (!this._devices[deviceType]) {\n this._devices[deviceType] = new Array();\n }\n if (!this._devices[deviceType][deviceSlot]) {\n this._devices[deviceType][deviceSlot] = deviceSlot;\n }\n for (const manager of this._registeredManagers) {\n const deviceSource = new DeviceSource(this._deviceInputSystem, deviceType, deviceSlot);\n manager._addDevice(deviceSource);\n }\n };\n const onDeviceDisconnected = (deviceType, deviceSlot) => {\n var _a;\n if ((_a = this._devices[deviceType]) === null || _a === void 0 ? void 0 : _a[deviceSlot]) {\n delete this._devices[deviceType][deviceSlot];\n }\n for (const manager of this._registeredManagers) {\n manager._removeDevice(deviceType, deviceSlot);\n }\n };\n const onInputChanged = (deviceType, deviceSlot, eventData) => {\n if (eventData) {\n for (const manager of this._registeredManagers) {\n manager._onInputChanged(deviceType, deviceSlot, eventData);\n }\n }\n };\n if (typeof _native !== \"undefined\") {\n this._deviceInputSystem = new NativeDeviceInputSystem(onDeviceConnected, onDeviceDisconnected, onInputChanged);\n }\n else {\n this._deviceInputSystem = new WebDeviceInputSystem(engine, onDeviceConnected, onDeviceDisconnected, onInputChanged);\n }\n }\n dispose() {\n this._deviceInputSystem.dispose();\n }\n}\n//# sourceMappingURL=internalDeviceSourceManager.js.map","import { DeviceType } from \"./deviceEnums.js\";\nimport { Observable } from \"../../Misc/observable.js\";\nimport { InternalDeviceSourceManager } from \"../internalDeviceSourceManager.js\";\n/**\n * Class to keep track of devices\n */\nexport class DeviceSourceManager {\n // Public Functions\n /**\n * Gets a DeviceSource, given a type and slot\n * @param deviceType - Type of Device\n * @param deviceSlot - Slot or ID of device\n * @returns DeviceSource\n */\n getDeviceSource(deviceType, deviceSlot) {\n if (deviceSlot === undefined) {\n if (this._firstDevice[deviceType] === undefined) {\n return null;\n }\n deviceSlot = this._firstDevice[deviceType];\n }\n if (!this._devices[deviceType] || this._devices[deviceType][deviceSlot] === undefined) {\n return null;\n }\n return this._devices[deviceType][deviceSlot];\n }\n /**\n * Gets an array of DeviceSource objects for a given device type\n * @param deviceType - Type of Device\n * @returns All available DeviceSources of a given type\n */\n getDeviceSources(deviceType) {\n // If device type hasn't had any devices connected yet, return empty array.\n if (!this._devices[deviceType]) {\n return [];\n }\n return this._devices[deviceType].filter((source) => {\n return !!source;\n });\n }\n /**\n * Default constructor\n * @param engine - Used to get canvas (if applicable)\n */\n constructor(engine) {\n const numberOfDeviceTypes = Object.keys(DeviceType).length / 2;\n this._devices = new Array(numberOfDeviceTypes);\n this._firstDevice = new Array(numberOfDeviceTypes);\n this._engine = engine;\n if (!this._engine._deviceSourceManager) {\n this._engine._deviceSourceManager = new InternalDeviceSourceManager(engine);\n }\n this._engine._deviceSourceManager._refCount++;\n // Observables\n this.onDeviceConnectedObservable = new Observable((observer) => {\n for (const devices of this._devices) {\n if (devices) {\n for (const device of devices) {\n if (device) {\n this.onDeviceConnectedObservable.notifyObserver(observer, device);\n }\n }\n }\n }\n });\n this.onDeviceDisconnectedObservable = new Observable();\n this._engine._deviceSourceManager.registerManager(this);\n this._onDisposeObserver = engine.onDisposeObservable.add(() => {\n this.dispose();\n });\n }\n /**\n * Dispose of DeviceSourceManager\n */\n dispose() {\n // Null out observable refs\n this.onDeviceConnectedObservable.clear();\n this.onDeviceDisconnectedObservable.clear();\n if (this._engine._deviceSourceManager) {\n this._engine._deviceSourceManager.unregisterManager(this);\n if (--this._engine._deviceSourceManager._refCount < 1) {\n this._engine._deviceSourceManager.dispose();\n delete this._engine._deviceSourceManager;\n }\n }\n this._engine.onDisposeObservable.remove(this._onDisposeObserver);\n }\n // Hidden Functions\n /**\n * @param deviceSource - Source to add\n * @internal\n */\n _addDevice(deviceSource) {\n if (!this._devices[deviceSource.deviceType]) {\n this._devices[deviceSource.deviceType] = new Array();\n }\n if (!this._devices[deviceSource.deviceType][deviceSource.deviceSlot]) {\n this._devices[deviceSource.deviceType][deviceSource.deviceSlot] = deviceSource;\n this._updateFirstDevices(deviceSource.deviceType);\n }\n this.onDeviceConnectedObservable.notifyObservers(deviceSource);\n }\n /**\n * @param deviceType - DeviceType\n * @param deviceSlot - DeviceSlot\n * @internal\n */\n _removeDevice(deviceType, deviceSlot) {\n var _a, _b;\n const deviceSource = (_a = this._devices[deviceType]) === null || _a === void 0 ? void 0 : _a[deviceSlot]; // Grab local reference to use before removing from devices\n this.onDeviceDisconnectedObservable.notifyObservers(deviceSource);\n if ((_b = this._devices[deviceType]) === null || _b === void 0 ? void 0 : _b[deviceSlot]) {\n delete this._devices[deviceType][deviceSlot];\n }\n // Even if we don't delete a device, we should still check for the first device as things may have gotten out of sync.\n this._updateFirstDevices(deviceType);\n }\n /**\n * @param deviceType - DeviceType\n * @param deviceSlot - DeviceSlot\n * @param eventData - Event\n * @internal\n */\n _onInputChanged(deviceType, deviceSlot, eventData) {\n var _a, _b;\n (_b = (_a = this._devices[deviceType]) === null || _a === void 0 ? void 0 : _a[deviceSlot]) === null || _b === void 0 ? void 0 : _b.onInputChangedObservable.notifyObservers(eventData);\n }\n // Private Functions\n _updateFirstDevices(type) {\n switch (type) {\n case DeviceType.Keyboard:\n case DeviceType.Mouse:\n this._firstDevice[type] = 0;\n break;\n case DeviceType.Touch:\n case DeviceType.DualSense:\n case DeviceType.DualShock:\n case DeviceType.Xbox:\n case DeviceType.Switch:\n case DeviceType.Generic: {\n delete this._firstDevice[type];\n // eslint-disable-next-line no-case-declarations\n const devices = this._devices[type];\n if (devices) {\n for (let i = 0; i < devices.length; i++) {\n if (devices[i]) {\n this._firstDevice[type] = i;\n break;\n }\n }\n }\n break;\n }\n }\n }\n}\n//# sourceMappingURL=deviceSourceManager.js.map","import { PointerInfoPre, PointerInfo, PointerEventTypes } from \"../Events/pointerEvents.js\";\nimport { AbstractActionManager } from \"../Actions/abstractActionManager.js\";\nimport { PickingInfo } from \"../Collisions/pickingInfo.js\";\nimport { Vector2, Matrix } from \"../Maths/math.vector.js\";\n\nimport { ActionEvent } from \"../Actions/actionEvent.js\";\nimport { KeyboardEventTypes, KeyboardInfoPre, KeyboardInfo } from \"../Events/keyboardEvents.js\";\nimport { DeviceType, PointerInput } from \"../DeviceInput/InputDevices/deviceEnums.js\";\nimport { DeviceSourceManager } from \"../DeviceInput/InputDevices/deviceSourceManager.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass _ClickInfo {\n constructor() {\n this._singleClick = false;\n this._doubleClick = false;\n this._hasSwiped = false;\n this._ignore = false;\n }\n get singleClick() {\n return this._singleClick;\n }\n get doubleClick() {\n return this._doubleClick;\n }\n get hasSwiped() {\n return this._hasSwiped;\n }\n get ignore() {\n return this._ignore;\n }\n set singleClick(b) {\n this._singleClick = b;\n }\n set doubleClick(b) {\n this._doubleClick = b;\n }\n set hasSwiped(b) {\n this._hasSwiped = b;\n }\n set ignore(b) {\n this._ignore = b;\n }\n}\n/**\n * Class used to manage all inputs for the scene.\n */\nexport class InputManager {\n /**\n * Creates a new InputManager\n * @param scene - defines the hosting scene\n */\n constructor(scene) {\n /** This is a defensive check to not allow control attachment prior to an already active one. If already attached, previous control is unattached before attaching the new one. */\n this._alreadyAttached = false;\n this._meshPickProceed = false;\n this._currentPickResult = null;\n this._previousPickResult = null;\n this._totalPointersPressed = 0;\n this._doubleClickOccured = false;\n this._isSwiping = false;\n this._swipeButtonPressed = -1;\n this._skipPointerTap = false;\n this._isMultiTouchGesture = false;\n this._pointerX = 0;\n this._pointerY = 0;\n this._startingPointerPosition = new Vector2(0, 0);\n this._previousStartingPointerPosition = new Vector2(0, 0);\n this._startingPointerTime = 0;\n this._previousStartingPointerTime = 0;\n this._pointerCaptures = {};\n this._meshUnderPointerId = {};\n this._movePointerInfo = null;\n this._cameraObserverCount = 0;\n this._delayedClicks = [null, null, null, null, null];\n this._deviceSourceManager = null;\n this._scene = scene || EngineStore.LastCreatedScene;\n if (!this._scene) {\n return;\n }\n }\n /**\n * Gets the mesh that is currently under the pointer\n * @returns Mesh that the pointer is pointer is hovering over\n */\n get meshUnderPointer() {\n if (this._movePointerInfo) {\n // Because _pointerOverMesh is populated as part of _pickMove, we need to force a pick to update it.\n // Calling _pickMove calls _setCursorAndPointerOverMesh which calls setPointerOverMesh\n this._movePointerInfo._generatePickInfo();\n // Once we have what we need, we can clear _movePointerInfo because we don't need it anymore\n this._movePointerInfo = null;\n }\n return this._pointerOverMesh;\n }\n /**\n * When using more than one pointer (for example in XR) you can get the mesh under the specific pointer\n * @param pointerId - the pointer id to use\n * @returns The mesh under this pointer id or null if not found\n */\n getMeshUnderPointerByPointerId(pointerId) {\n return this._meshUnderPointerId[pointerId] || null;\n }\n /**\n * Gets the pointer coordinates in 2D without any translation (ie. straight out of the pointer event)\n * @returns Vector with X/Y values directly from pointer event\n */\n get unTranslatedPointer() {\n return new Vector2(this._unTranslatedPointerX, this._unTranslatedPointerY);\n }\n /**\n * Gets or sets the current on-screen X position of the pointer\n * @returns Translated X with respect to screen\n */\n get pointerX() {\n return this._pointerX;\n }\n set pointerX(value) {\n this._pointerX = value;\n }\n /**\n * Gets or sets the current on-screen Y position of the pointer\n * @returns Translated Y with respect to screen\n */\n get pointerY() {\n return this._pointerY;\n }\n set pointerY(value) {\n this._pointerY = value;\n }\n _updatePointerPosition(evt) {\n const canvasRect = this._scene.getEngine().getInputElementClientRect();\n if (!canvasRect) {\n return;\n }\n this._pointerX = evt.clientX - canvasRect.left;\n this._pointerY = evt.clientY - canvasRect.top;\n this._unTranslatedPointerX = this._pointerX;\n this._unTranslatedPointerY = this._pointerY;\n }\n _processPointerMove(pickResult, evt) {\n const scene = this._scene;\n const engine = scene.getEngine();\n const canvas = engine.getInputElement();\n if (canvas) {\n canvas.tabIndex = engine.canvasTabIndex;\n // Restore pointer\n if (!scene.doNotHandleCursors) {\n canvas.style.cursor = scene.defaultCursor;\n }\n }\n this._setCursorAndPointerOverMesh(pickResult, evt, scene);\n for (const step of scene._pointerMoveStage) {\n // If _pointerMoveState is defined, we have an active spriteManager and can't use Lazy Picking\n // Therefore, we need to force a pick to update the pickResult\n pickResult = pickResult || this._pickMove(evt);\n const isMeshPicked = (pickResult === null || pickResult === void 0 ? void 0 : pickResult.pickedMesh) ? true : false;\n pickResult = step.action(this._unTranslatedPointerX, this._unTranslatedPointerY, pickResult, isMeshPicked, canvas);\n }\n const type = evt.inputIndex >= PointerInput.MouseWheelX && evt.inputIndex <= PointerInput.MouseWheelZ ? PointerEventTypes.POINTERWHEEL : PointerEventTypes.POINTERMOVE;\n if (scene.onPointerMove) {\n // Because of lazy picking, we need to force a pick to update the pickResult\n pickResult = pickResult || this._pickMove(evt);\n scene.onPointerMove(evt, pickResult, type);\n }\n let pointerInfo;\n if (pickResult) {\n pointerInfo = new PointerInfo(type, evt, pickResult);\n this._setRayOnPointerInfo(pickResult, evt);\n }\n else {\n pointerInfo = new PointerInfo(type, evt, null, this);\n this._movePointerInfo = pointerInfo;\n }\n if (scene.onPointerObservable.hasObservers()) {\n scene.onPointerObservable.notifyObservers(pointerInfo, type);\n }\n }\n // Pointers handling\n /** @internal */\n _setRayOnPointerInfo(pickInfo, event) {\n const scene = this._scene;\n if (pickInfo && scene._pickingAvailable) {\n if (!pickInfo.ray) {\n pickInfo.ray = scene.createPickingRay(event.offsetX, event.offsetY, Matrix.Identity(), scene.activeCamera);\n }\n }\n }\n /** @internal */\n _addCameraPointerObserver(observer, mask) {\n this._cameraObserverCount++;\n return this._scene.onPointerObservable.add(observer, mask);\n }\n /** @internal */\n _removeCameraPointerObserver(observer) {\n this._cameraObserverCount--;\n return this._scene.onPointerObservable.remove(observer);\n }\n _checkForPicking() {\n return !!(this._scene.onPointerObservable.observers.length > this._cameraObserverCount || this._scene.onPointerPick);\n }\n _checkPrePointerObservable(pickResult, evt, type) {\n const scene = this._scene;\n const pi = new PointerInfoPre(type, evt, this._unTranslatedPointerX, this._unTranslatedPointerY);\n if (pickResult) {\n pi.originalPickingInfo = pickResult;\n pi.ray = pickResult.ray;\n if (pickResult.originMesh) {\n pi.nearInteractionPickingInfo = pickResult;\n }\n }\n scene.onPrePointerObservable.notifyObservers(pi, type);\n if (pi.skipOnPointerObservable) {\n return true;\n }\n else {\n return false;\n }\n }\n /** @internal */\n _pickMove(evt) {\n const scene = this._scene;\n const pickResult = scene.pick(this._unTranslatedPointerX, this._unTranslatedPointerY, scene.pointerMovePredicate, scene.pointerMoveFastCheck, scene.cameraToUseForPointers, scene.pointerMoveTrianglePredicate);\n this._setCursorAndPointerOverMesh(pickResult, evt, scene);\n return pickResult;\n }\n _setCursorAndPointerOverMesh(pickResult, evt, scene) {\n const engine = scene.getEngine();\n const canvas = engine.getInputElement();\n if (pickResult === null || pickResult === void 0 ? void 0 : pickResult.pickedMesh) {\n this.setPointerOverMesh(pickResult.pickedMesh, evt.pointerId, pickResult, evt);\n if (!scene.doNotHandleCursors && canvas && this._pointerOverMesh) {\n const actionManager = this._pointerOverMesh._getActionManagerForTrigger();\n if (actionManager && actionManager.hasPointerTriggers) {\n canvas.style.cursor = actionManager.hoverCursor || scene.hoverCursor;\n }\n }\n }\n else {\n this.setPointerOverMesh(null, evt.pointerId, pickResult, evt);\n }\n }\n /**\n * Use this method to simulate a pointer move on a mesh\n * The pickResult parameter can be obtained from a scene.pick or scene.pickWithRay\n * @param pickResult - pickingInfo of the object wished to simulate pointer event on\n * @param pointerEventInit - pointer event state to be used when simulating the pointer event (eg. pointer id for multitouch)\n */\n simulatePointerMove(pickResult, pointerEventInit) {\n const evt = new PointerEvent(\"pointermove\", pointerEventInit);\n evt.inputIndex = PointerInput.Move;\n if (this._checkPrePointerObservable(pickResult, evt, PointerEventTypes.POINTERMOVE)) {\n return;\n }\n this._processPointerMove(pickResult, evt);\n }\n /**\n * Use this method to simulate a pointer down on a mesh\n * The pickResult parameter can be obtained from a scene.pick or scene.pickWithRay\n * @param pickResult - pickingInfo of the object wished to simulate pointer event on\n * @param pointerEventInit - pointer event state to be used when simulating the pointer event (eg. pointer id for multitouch)\n */\n simulatePointerDown(pickResult, pointerEventInit) {\n const evt = new PointerEvent(\"pointerdown\", pointerEventInit);\n evt.inputIndex = evt.button + 2;\n if (this._checkPrePointerObservable(pickResult, evt, PointerEventTypes.POINTERDOWN)) {\n return;\n }\n this._processPointerDown(pickResult, evt);\n }\n _processPointerDown(pickResult, evt) {\n const scene = this._scene;\n if (pickResult === null || pickResult === void 0 ? void 0 : pickResult.pickedMesh) {\n this._pickedDownMesh = pickResult.pickedMesh;\n const actionManager = pickResult.pickedMesh._getActionManagerForTrigger();\n if (actionManager) {\n if (actionManager.hasPickTriggers) {\n actionManager.processTrigger(5, ActionEvent.CreateNew(pickResult.pickedMesh, evt, pickResult));\n switch (evt.button) {\n case 0:\n actionManager.processTrigger(2, ActionEvent.CreateNew(pickResult.pickedMesh, evt, pickResult));\n break;\n case 1:\n actionManager.processTrigger(4, ActionEvent.CreateNew(pickResult.pickedMesh, evt, pickResult));\n break;\n case 2:\n actionManager.processTrigger(3, ActionEvent.CreateNew(pickResult.pickedMesh, evt, pickResult));\n break;\n }\n }\n if (actionManager.hasSpecificTrigger(8)) {\n window.setTimeout(() => {\n const pickResult = scene.pick(this._unTranslatedPointerX, this._unTranslatedPointerY, (mesh) => ((mesh.isPickable &&\n mesh.isVisible &&\n mesh.isReady() &&\n mesh.actionManager &&\n mesh.actionManager.hasSpecificTrigger(8) &&\n mesh === this._pickedDownMesh)), false, scene.cameraToUseForPointers);\n if ((pickResult === null || pickResult === void 0 ? void 0 : pickResult.pickedMesh) && actionManager) {\n if (this._totalPointersPressed !== 0 && Date.now() - this._startingPointerTime > InputManager.LongPressDelay && !this._isPointerSwiping()) {\n this._startingPointerTime = 0;\n actionManager.processTrigger(8, ActionEvent.CreateNew(pickResult.pickedMesh, evt));\n }\n }\n }, InputManager.LongPressDelay);\n }\n }\n }\n else {\n for (const step of scene._pointerDownStage) {\n pickResult = step.action(this._unTranslatedPointerX, this._unTranslatedPointerY, pickResult, evt, false);\n }\n }\n let pointerInfo;\n const type = PointerEventTypes.POINTERDOWN;\n if (pickResult) {\n if (scene.onPointerDown) {\n scene.onPointerDown(evt, pickResult, type);\n }\n pointerInfo = new PointerInfo(type, evt, pickResult);\n this._setRayOnPointerInfo(pickResult, evt);\n }\n else {\n pointerInfo = new PointerInfo(type, evt, null, this);\n }\n if (scene.onPointerObservable.hasObservers()) {\n scene.onPointerObservable.notifyObservers(pointerInfo, type);\n }\n }\n /**\n * @internal\n * @internals Boolean if delta for pointer exceeds drag movement threshold\n */\n _isPointerSwiping() {\n return this._isSwiping;\n }\n /**\n * Use this method to simulate a pointer up on a mesh\n * The pickResult parameter can be obtained from a scene.pick or scene.pickWithRay\n * @param pickResult - pickingInfo of the object wished to simulate pointer event on\n * @param pointerEventInit - pointer event state to be used when simulating the pointer event (eg. pointer id for multitouch)\n * @param doubleTap - indicates that the pointer up event should be considered as part of a double click (false by default)\n */\n simulatePointerUp(pickResult, pointerEventInit, doubleTap) {\n const evt = new PointerEvent(\"pointerup\", pointerEventInit);\n evt.inputIndex = PointerInput.Move;\n const clickInfo = new _ClickInfo();\n if (doubleTap) {\n clickInfo.doubleClick = true;\n }\n else {\n clickInfo.singleClick = true;\n }\n if (this._checkPrePointerObservable(pickResult, evt, PointerEventTypes.POINTERUP)) {\n return;\n }\n this._processPointerUp(pickResult, evt, clickInfo);\n }\n _processPointerUp(pickResult, evt, clickInfo) {\n const scene = this._scene;\n if (pickResult === null || pickResult === void 0 ? void 0 : pickResult.pickedMesh) {\n this._pickedUpMesh = pickResult.pickedMesh;\n if (this._pickedDownMesh === this._pickedUpMesh) {\n if (scene.onPointerPick) {\n scene.onPointerPick(evt, pickResult);\n }\n if (clickInfo.singleClick && !clickInfo.ignore && scene.onPointerObservable.observers.length > this._cameraObserverCount) {\n const type = PointerEventTypes.POINTERPICK;\n const pi = new PointerInfo(type, evt, pickResult);\n this._setRayOnPointerInfo(pickResult, evt);\n scene.onPointerObservable.notifyObservers(pi, type);\n }\n }\n const actionManager = pickResult.pickedMesh._getActionManagerForTrigger();\n if (actionManager && !clickInfo.ignore) {\n actionManager.processTrigger(7, ActionEvent.CreateNew(pickResult.pickedMesh, evt, pickResult));\n if (!clickInfo.hasSwiped && clickInfo.singleClick) {\n actionManager.processTrigger(1, ActionEvent.CreateNew(pickResult.pickedMesh, evt, pickResult));\n }\n const doubleClickActionManager = pickResult.pickedMesh._getActionManagerForTrigger(6);\n if (clickInfo.doubleClick && doubleClickActionManager) {\n doubleClickActionManager.processTrigger(6, ActionEvent.CreateNew(pickResult.pickedMesh, evt, pickResult));\n }\n }\n }\n else {\n if (!clickInfo.ignore) {\n for (const step of scene._pointerUpStage) {\n pickResult = step.action(this._unTranslatedPointerX, this._unTranslatedPointerY, pickResult, evt, clickInfo.doubleClick);\n }\n }\n }\n if (this._pickedDownMesh && this._pickedDownMesh !== this._pickedUpMesh) {\n const pickedDownActionManager = this._pickedDownMesh._getActionManagerForTrigger(16);\n if (pickedDownActionManager) {\n pickedDownActionManager.processTrigger(16, ActionEvent.CreateNew(this._pickedDownMesh, evt));\n }\n }\n if (!clickInfo.ignore) {\n const pi = new PointerInfo(PointerEventTypes.POINTERUP, evt, pickResult);\n // Set ray on picking info. Note that this info will also be reused for the tap notification.\n this._setRayOnPointerInfo(pickResult, evt);\n scene.onPointerObservable.notifyObservers(pi, PointerEventTypes.POINTERUP);\n if (scene.onPointerUp) {\n scene.onPointerUp(evt, pickResult, PointerEventTypes.POINTERUP);\n }\n if (!clickInfo.hasSwiped && !this._skipPointerTap && !this._isMultiTouchGesture) {\n let type = 0;\n if (clickInfo.singleClick) {\n type = PointerEventTypes.POINTERTAP;\n }\n else if (clickInfo.doubleClick) {\n type = PointerEventTypes.POINTERDOUBLETAP;\n }\n if (type) {\n const pi = new PointerInfo(type, evt, pickResult);\n if (scene.onPointerObservable.hasObservers() && scene.onPointerObservable.hasSpecificMask(type)) {\n scene.onPointerObservable.notifyObservers(pi, type);\n }\n }\n }\n }\n }\n /**\n * Gets a boolean indicating if the current pointer event is captured (meaning that the scene has already handled the pointer down)\n * @param pointerId - defines the pointer id to use in a multi-touch scenario (0 by default)\n * @returns true if the pointer was captured\n */\n isPointerCaptured(pointerId = 0) {\n return this._pointerCaptures[pointerId];\n }\n /**\n * Attach events to the canvas (To handle actionManagers triggers and raise onPointerMove, onPointerDown and onPointerUp\n * @param attachUp - defines if you want to attach events to pointerup\n * @param attachDown - defines if you want to attach events to pointerdown\n * @param attachMove - defines if you want to attach events to pointermove\n * @param elementToAttachTo - defines the target DOM element to attach to (will use the canvas by default)\n */\n attachControl(attachUp = true, attachDown = true, attachMove = true, elementToAttachTo = null) {\n const scene = this._scene;\n const engine = scene.getEngine();\n if (!elementToAttachTo) {\n elementToAttachTo = engine.getInputElement();\n }\n if (this._alreadyAttached) {\n this.detachControl();\n }\n if (elementToAttachTo) {\n this._alreadyAttachedTo = elementToAttachTo;\n }\n this._deviceSourceManager = new DeviceSourceManager(engine);\n // Because this is only called from _initClickEvent, which is called in _onPointerUp, we'll use the pointerUpPredicate for the pick call\n this._initActionManager = (act) => {\n if (!this._meshPickProceed) {\n const pickResult = scene.skipPointerUpPicking || (scene._registeredActions === 0 && !this._checkForPicking() && !scene.onPointerUp)\n ? null\n : scene.pick(this._unTranslatedPointerX, this._unTranslatedPointerY, scene.pointerUpPredicate, scene.pointerUpFastCheck, scene.cameraToUseForPointers);\n this._currentPickResult = pickResult;\n if (pickResult) {\n act = pickResult.hit && pickResult.pickedMesh ? pickResult.pickedMesh._getActionManagerForTrigger() : null;\n }\n this._meshPickProceed = true;\n }\n return act;\n };\n this._delayedSimpleClick = (btn, clickInfo, cb) => {\n // double click delay is over and that no double click has been raised since, or the 2 consecutive keys pressed are different\n if ((Date.now() - this._previousStartingPointerTime > InputManager.DoubleClickDelay && !this._doubleClickOccured) || btn !== this._previousButtonPressed) {\n this._doubleClickOccured = false;\n clickInfo.singleClick = true;\n clickInfo.ignore = false;\n // If we have a delayed click, we need to resolve the TAP event\n if (this._delayedClicks[btn]) {\n const evt = this._delayedClicks[btn].evt;\n const type = PointerEventTypes.POINTERTAP;\n const pi = new PointerInfo(type, evt, this._currentPickResult);\n if (scene.onPointerObservable.hasObservers() && scene.onPointerObservable.hasSpecificMask(type)) {\n scene.onPointerObservable.notifyObservers(pi, type);\n }\n // Clear the delayed click\n this._delayedClicks[btn] = null;\n }\n }\n };\n this._initClickEvent = (obs1, obs2, evt, cb) => {\n var _a, _b;\n const clickInfo = new _ClickInfo();\n this._currentPickResult = null;\n let act = null;\n let checkPicking = obs1.hasSpecificMask(PointerEventTypes.POINTERPICK) ||\n obs2.hasSpecificMask(PointerEventTypes.POINTERPICK) ||\n obs1.hasSpecificMask(PointerEventTypes.POINTERTAP) ||\n obs2.hasSpecificMask(PointerEventTypes.POINTERTAP) ||\n obs1.hasSpecificMask(PointerEventTypes.POINTERDOUBLETAP) ||\n obs2.hasSpecificMask(PointerEventTypes.POINTERDOUBLETAP);\n if (!checkPicking && AbstractActionManager) {\n act = this._initActionManager(act, clickInfo);\n if (act) {\n checkPicking = act.hasPickTriggers;\n }\n }\n let needToIgnoreNext = false;\n if (checkPicking) {\n const btn = evt.button;\n clickInfo.hasSwiped = this._isPointerSwiping();\n if (!clickInfo.hasSwiped) {\n let checkSingleClickImmediately = !InputManager.ExclusiveDoubleClickMode;\n if (!checkSingleClickImmediately) {\n checkSingleClickImmediately = !obs1.hasSpecificMask(PointerEventTypes.POINTERDOUBLETAP) && !obs2.hasSpecificMask(PointerEventTypes.POINTERDOUBLETAP);\n if (checkSingleClickImmediately && !AbstractActionManager.HasSpecificTrigger(6)) {\n act = this._initActionManager(act, clickInfo);\n if (act) {\n checkSingleClickImmediately = !act.hasSpecificTrigger(6);\n }\n }\n }\n if (checkSingleClickImmediately) {\n // single click detected if double click delay is over or two different successive keys pressed without exclusive double click or no double click required\n if (Date.now() - this._previousStartingPointerTime > InputManager.DoubleClickDelay || btn !== this._previousButtonPressed) {\n clickInfo.singleClick = true;\n cb(clickInfo, this._currentPickResult);\n needToIgnoreNext = true;\n }\n }\n // at least one double click is required to be check and exclusive double click is enabled\n else {\n // Queue up a delayed click, just in case this isn't a double click\n // It should be noted that while this delayed event happens\n // because of user input, it shouldn't be considered as a direct,\n // timing-dependent result of that input. It's meant to just fire the TAP event\n const delayedClick = {\n evt: evt,\n clickInfo: clickInfo,\n timeoutId: window.setTimeout(this._delayedSimpleClick.bind(this, btn, clickInfo, cb), InputManager.DoubleClickDelay),\n };\n this._delayedClicks[btn] = delayedClick;\n }\n let checkDoubleClick = obs1.hasSpecificMask(PointerEventTypes.POINTERDOUBLETAP) || obs2.hasSpecificMask(PointerEventTypes.POINTERDOUBLETAP);\n if (!checkDoubleClick && AbstractActionManager.HasSpecificTrigger(6)) {\n act = this._initActionManager(act, clickInfo);\n if (act) {\n checkDoubleClick = act.hasSpecificTrigger(6);\n }\n }\n if (checkDoubleClick) {\n // two successive keys pressed are equal, double click delay is not over and double click has not just occurred\n if (btn === this._previousButtonPressed && Date.now() - this._previousStartingPointerTime < InputManager.DoubleClickDelay && !this._doubleClickOccured) {\n // pointer has not moved for 2 clicks, it's a double click\n if (!clickInfo.hasSwiped && !this._isPointerSwiping()) {\n this._previousStartingPointerTime = 0;\n this._doubleClickOccured = true;\n clickInfo.doubleClick = true;\n clickInfo.ignore = false;\n // If we have a pending click, we need to cancel it\n if (InputManager.ExclusiveDoubleClickMode && this._delayedClicks[btn]) {\n clearTimeout((_a = this._delayedClicks[btn]) === null || _a === void 0 ? void 0 : _a.timeoutId);\n this._delayedClicks[btn] = null;\n }\n cb(clickInfo, this._currentPickResult);\n }\n // if the two successive clicks are too far, it's just two simple clicks\n else {\n this._doubleClickOccured = false;\n this._previousStartingPointerTime = this._startingPointerTime;\n this._previousStartingPointerPosition.x = this._startingPointerPosition.x;\n this._previousStartingPointerPosition.y = this._startingPointerPosition.y;\n this._previousButtonPressed = btn;\n if (InputManager.ExclusiveDoubleClickMode) {\n // If we have a delayed click, we need to cancel it\n if (this._delayedClicks[btn]) {\n clearTimeout((_b = this._delayedClicks[btn]) === null || _b === void 0 ? void 0 : _b.timeoutId);\n this._delayedClicks[btn] = null;\n }\n cb(clickInfo, this._previousPickResult);\n }\n else {\n cb(clickInfo, this._currentPickResult);\n }\n }\n needToIgnoreNext = true;\n }\n // just the first click of the double has been raised\n else {\n this._doubleClickOccured = false;\n this._previousStartingPointerTime = this._startingPointerTime;\n this._previousStartingPointerPosition.x = this._startingPointerPosition.x;\n this._previousStartingPointerPosition.y = this._startingPointerPosition.y;\n this._previousButtonPressed = btn;\n }\n }\n }\n }\n // Even if ExclusiveDoubleClickMode is true, we need to always handle\n // up events at time of execution, unless we're explicitly ignoring them.\n if (!needToIgnoreNext) {\n cb(clickInfo, this._currentPickResult);\n }\n };\n this._onPointerMove = (evt) => {\n this._updatePointerPosition(evt);\n // Check if pointer leaves DragMovementThreshold range to determine if swipe is occurring\n if (!this._isSwiping && this._swipeButtonPressed !== -1) {\n this._isSwiping =\n Math.abs(this._startingPointerPosition.x - this._pointerX) > InputManager.DragMovementThreshold ||\n Math.abs(this._startingPointerPosition.y - this._pointerY) > InputManager.DragMovementThreshold;\n }\n // Because there's a race condition between pointermove and pointerlockchange events, we need to\n // verify that the pointer is still locked after each pointermove event.\n if (engine.isPointerLock) {\n engine._verifyPointerLock();\n }\n // PreObservable support\n if (this._checkPrePointerObservable(null, evt, evt.inputIndex >= PointerInput.MouseWheelX && evt.inputIndex <= PointerInput.MouseWheelZ ? PointerEventTypes.POINTERWHEEL : PointerEventTypes.POINTERMOVE)) {\n return;\n }\n if (!scene.cameraToUseForPointers && !scene.activeCamera) {\n return;\n }\n if (scene.skipPointerMovePicking) {\n this._processPointerMove(new PickingInfo(), evt);\n return;\n }\n if (!scene.pointerMovePredicate) {\n scene.pointerMovePredicate = (mesh) => mesh.isPickable &&\n mesh.isVisible &&\n mesh.isReady() &&\n mesh.isEnabled() &&\n (mesh.enablePointerMoveEvents || scene.constantlyUpdateMeshUnderPointer || mesh._getActionManagerForTrigger() !== null) &&\n (!scene.cameraToUseForPointers || (scene.cameraToUseForPointers.layerMask & mesh.layerMask) !== 0);\n }\n const pickResult = scene._registeredActions > 0 || scene.constantlyUpdateMeshUnderPointer ? this._pickMove(evt) : null;\n this._processPointerMove(pickResult, evt);\n };\n this._onPointerDown = (evt) => {\n var _a;\n this._totalPointersPressed++;\n this._pickedDownMesh = null;\n this._meshPickProceed = false;\n // If ExclusiveDoubleClickMode is true, we need to resolve any pending delayed clicks\n if (InputManager.ExclusiveDoubleClickMode) {\n for (let i = 0; i < this._delayedClicks.length; i++) {\n if (this._delayedClicks[i]) {\n // If the button that was pressed is the same as the one that was released,\n // just clear the timer. This will be resolved in the up event.\n if (evt.button === i) {\n clearTimeout((_a = this._delayedClicks[i]) === null || _a === void 0 ? void 0 : _a.timeoutId);\n }\n else {\n // Otherwise, we need to resolve the click\n const clickInfo = this._delayedClicks[i].clickInfo;\n this._doubleClickOccured = false;\n clickInfo.singleClick = true;\n clickInfo.ignore = false;\n const prevEvt = this._delayedClicks[i].evt;\n const type = PointerEventTypes.POINTERTAP;\n const pi = new PointerInfo(type, prevEvt, this._currentPickResult);\n if (scene.onPointerObservable.hasObservers() && scene.onPointerObservable.hasSpecificMask(type)) {\n scene.onPointerObservable.notifyObservers(pi, type);\n }\n // Clear the delayed click\n this._delayedClicks[i] = null;\n }\n }\n }\n }\n this._updatePointerPosition(evt);\n if (this._swipeButtonPressed === -1) {\n this._swipeButtonPressed = evt.button;\n }\n if (scene.preventDefaultOnPointerDown && elementToAttachTo) {\n evt.preventDefault();\n elementToAttachTo.focus();\n }\n this._startingPointerPosition.x = this._pointerX;\n this._startingPointerPosition.y = this._pointerY;\n this._startingPointerTime = Date.now();\n // PreObservable support\n if (this._checkPrePointerObservable(null, evt, PointerEventTypes.POINTERDOWN)) {\n return;\n }\n if (!scene.cameraToUseForPointers && !scene.activeCamera) {\n return;\n }\n this._pointerCaptures[evt.pointerId] = true;\n if (!scene.pointerDownPredicate) {\n scene.pointerDownPredicate = (mesh) => {\n return (mesh.isPickable &&\n mesh.isVisible &&\n mesh.isReady() &&\n mesh.isEnabled() &&\n (!scene.cameraToUseForPointers || (scene.cameraToUseForPointers.layerMask & mesh.layerMask) !== 0));\n };\n }\n // Meshes\n this._pickedDownMesh = null;\n let pickResult;\n if (scene.skipPointerDownPicking || (scene._registeredActions === 0 && !this._checkForPicking() && !scene.onPointerDown)) {\n pickResult = new PickingInfo();\n }\n else {\n pickResult = scene.pick(this._unTranslatedPointerX, this._unTranslatedPointerY, scene.pointerDownPredicate, scene.pointerDownFastCheck, scene.cameraToUseForPointers);\n }\n this._processPointerDown(pickResult, evt);\n };\n this._onPointerUp = (evt) => {\n if (this._totalPointersPressed === 0) {\n // We are attaching the pointer up to windows because of a bug in FF\n return; // So we need to test it the pointer down was pressed before.\n }\n this._totalPointersPressed--;\n this._pickedUpMesh = null;\n this._meshPickProceed = false;\n this._updatePointerPosition(evt);\n if (scene.preventDefaultOnPointerUp && elementToAttachTo) {\n evt.preventDefault();\n elementToAttachTo.focus();\n }\n this._initClickEvent(scene.onPrePointerObservable, scene.onPointerObservable, evt, (clickInfo, pickResult) => {\n // PreObservable support\n if (scene.onPrePointerObservable.hasObservers()) {\n this._skipPointerTap = false;\n if (!clickInfo.ignore) {\n if (this._checkPrePointerObservable(null, evt, PointerEventTypes.POINTERUP)) {\n // If we're skipping the next observable, we need to reset the swipe state before returning\n if (this._swipeButtonPressed === evt.button) {\n this._isSwiping = false;\n this._swipeButtonPressed = -1;\n }\n // If we're going to skip the POINTERUP, we need to reset the pointer capture\n if (evt.buttons === 0) {\n this._pointerCaptures[evt.pointerId] = false;\n }\n return;\n }\n if (!clickInfo.hasSwiped) {\n if (clickInfo.singleClick && scene.onPrePointerObservable.hasSpecificMask(PointerEventTypes.POINTERTAP)) {\n if (this._checkPrePointerObservable(null, evt, PointerEventTypes.POINTERTAP)) {\n this._skipPointerTap = true;\n }\n }\n if (clickInfo.doubleClick && scene.onPrePointerObservable.hasSpecificMask(PointerEventTypes.POINTERDOUBLETAP)) {\n if (this._checkPrePointerObservable(null, evt, PointerEventTypes.POINTERDOUBLETAP)) {\n this._skipPointerTap = true;\n }\n }\n }\n }\n }\n // There should be a pointer captured at this point so if there isn't we should reset and return\n if (!this._pointerCaptures[evt.pointerId]) {\n if (this._swipeButtonPressed === evt.button) {\n this._isSwiping = false;\n this._swipeButtonPressed = -1;\n }\n return;\n }\n // Only release capture if all buttons are released\n if (evt.buttons === 0) {\n this._pointerCaptures[evt.pointerId] = false;\n }\n if (!scene.cameraToUseForPointers && !scene.activeCamera) {\n return;\n }\n if (!scene.pointerUpPredicate) {\n scene.pointerUpPredicate = (mesh) => {\n return (mesh.isPickable &&\n mesh.isVisible &&\n mesh.isReady() &&\n mesh.isEnabled() &&\n (!scene.cameraToUseForPointers || (scene.cameraToUseForPointers.layerMask & mesh.layerMask) !== 0));\n };\n }\n // Meshes\n if (!this._meshPickProceed && ((AbstractActionManager && AbstractActionManager.HasTriggers) || this._checkForPicking() || scene.onPointerUp)) {\n this._initActionManager(null, clickInfo);\n }\n if (!pickResult) {\n pickResult = this._currentPickResult;\n }\n this._processPointerUp(pickResult, evt, clickInfo);\n this._previousPickResult = this._currentPickResult;\n if (this._swipeButtonPressed === evt.button) {\n this._isSwiping = false;\n this._swipeButtonPressed = -1;\n }\n });\n };\n this._onKeyDown = (evt) => {\n const type = KeyboardEventTypes.KEYDOWN;\n if (scene.onPreKeyboardObservable.hasObservers()) {\n const pi = new KeyboardInfoPre(type, evt);\n scene.onPreKeyboardObservable.notifyObservers(pi, type);\n if (pi.skipOnKeyboardObservable) {\n return;\n }\n }\n if (scene.onKeyboardObservable.hasObservers()) {\n const pi = new KeyboardInfo(type, evt);\n scene.onKeyboardObservable.notifyObservers(pi, type);\n }\n if (scene.actionManager) {\n scene.actionManager.processTrigger(14, ActionEvent.CreateNewFromScene(scene, evt));\n }\n };\n this._onKeyUp = (evt) => {\n const type = KeyboardEventTypes.KEYUP;\n if (scene.onPreKeyboardObservable.hasObservers()) {\n const pi = new KeyboardInfoPre(type, evt);\n scene.onPreKeyboardObservable.notifyObservers(pi, type);\n if (pi.skipOnKeyboardObservable) {\n return;\n }\n }\n if (scene.onKeyboardObservable.hasObservers()) {\n const pi = new KeyboardInfo(type, evt);\n scene.onKeyboardObservable.notifyObservers(pi, type);\n }\n if (scene.actionManager) {\n scene.actionManager.processTrigger(15, ActionEvent.CreateNewFromScene(scene, evt));\n }\n };\n // If a device connects that we can handle, wire up the observable\n this._deviceSourceManager.onDeviceConnectedObservable.add((deviceSource) => {\n if (deviceSource.deviceType === DeviceType.Mouse) {\n deviceSource.onInputChangedObservable.add((eventData) => {\n if (eventData.inputIndex === PointerInput.LeftClick ||\n eventData.inputIndex === PointerInput.MiddleClick ||\n eventData.inputIndex === PointerInput.RightClick ||\n eventData.inputIndex === PointerInput.BrowserBack ||\n eventData.inputIndex === PointerInput.BrowserForward) {\n if (attachDown && deviceSource.getInput(eventData.inputIndex) === 1) {\n this._onPointerDown(eventData);\n }\n else if (attachUp && deviceSource.getInput(eventData.inputIndex) === 0) {\n this._onPointerUp(eventData);\n }\n }\n else if (attachMove) {\n if (eventData.inputIndex === PointerInput.Move) {\n this._onPointerMove(eventData);\n }\n else if (eventData.inputIndex === PointerInput.MouseWheelX ||\n eventData.inputIndex === PointerInput.MouseWheelY ||\n eventData.inputIndex === PointerInput.MouseWheelZ) {\n this._onPointerMove(eventData);\n }\n }\n });\n }\n else if (deviceSource.deviceType === DeviceType.Touch) {\n deviceSource.onInputChangedObservable.add((eventData) => {\n if (eventData.inputIndex === PointerInput.LeftClick) {\n if (attachDown && deviceSource.getInput(eventData.inputIndex) === 1) {\n this._onPointerDown(eventData);\n if (this._totalPointersPressed > 1) {\n this._isMultiTouchGesture = true;\n }\n }\n else if (attachUp && deviceSource.getInput(eventData.inputIndex) === 0) {\n this._onPointerUp(eventData);\n if (this._totalPointersPressed === 0) {\n this._isMultiTouchGesture = false;\n }\n }\n }\n if (attachMove && eventData.inputIndex === PointerInput.Move) {\n this._onPointerMove(eventData);\n }\n });\n }\n else if (deviceSource.deviceType === DeviceType.Keyboard) {\n deviceSource.onInputChangedObservable.add((eventData) => {\n if (eventData.type === \"keydown\") {\n this._onKeyDown(eventData);\n }\n else if (eventData.type === \"keyup\") {\n this._onKeyUp(eventData);\n }\n });\n }\n });\n this._alreadyAttached = true;\n }\n /**\n * Detaches all event handlers\n */\n detachControl() {\n if (this._alreadyAttached) {\n this._deviceSourceManager.dispose();\n this._deviceSourceManager = null;\n // Cursor\n if (this._alreadyAttachedTo && !this._scene.doNotHandleCursors) {\n this._alreadyAttachedTo.style.cursor = this._scene.defaultCursor;\n }\n this._alreadyAttached = false;\n this._alreadyAttachedTo = null;\n }\n }\n /**\n * Force the value of meshUnderPointer\n * @param mesh - defines the mesh to use\n * @param pointerId - optional pointer id when using more than one pointer. Defaults to 0\n * @param pickResult - optional pickingInfo data used to find mesh\n * @param evt - optional pointer event\n */\n setPointerOverMesh(mesh, pointerId = 0, pickResult, evt) {\n if (this._meshUnderPointerId[pointerId] === mesh && (!mesh || !mesh._internalAbstractMeshDataInfo._pointerOverDisableMeshTesting)) {\n return;\n }\n const underPointerMesh = this._meshUnderPointerId[pointerId];\n let actionManager;\n if (underPointerMesh) {\n actionManager = underPointerMesh._getActionManagerForTrigger(10);\n if (actionManager) {\n actionManager.processTrigger(10, ActionEvent.CreateNew(underPointerMesh, evt, { pointerId }));\n }\n }\n if (mesh) {\n this._meshUnderPointerId[pointerId] = mesh;\n this._pointerOverMesh = mesh;\n actionManager = mesh._getActionManagerForTrigger(9);\n if (actionManager) {\n actionManager.processTrigger(9, ActionEvent.CreateNew(mesh, evt, { pointerId, pickResult }));\n }\n }\n else {\n delete this._meshUnderPointerId[pointerId];\n this._pointerOverMesh = null;\n }\n }\n /**\n * Gets the mesh under the pointer\n * @returns a Mesh or null if no mesh is under the pointer\n */\n getPointerOverMesh() {\n return this.meshUnderPointer;\n }\n /**\n * @param mesh - Mesh to invalidate\n * @internal\n */\n _invalidateMesh(mesh) {\n if (this._pointerOverMesh === mesh) {\n this._pointerOverMesh = null;\n }\n if (this._pickedDownMesh === mesh) {\n this._pickedDownMesh = null;\n }\n if (this._pickedUpMesh === mesh) {\n this._pickedUpMesh = null;\n }\n for (const pointerId in this._meshUnderPointerId) {\n if (this._meshUnderPointerId[pointerId] === mesh) {\n delete this._meshUnderPointerId[pointerId];\n }\n }\n }\n}\n/** The distance in pixel that you have to move to prevent some events */\nInputManager.DragMovementThreshold = 10; // in pixels\n/** Time in milliseconds to wait to raise long press events if button is still pressed */\nInputManager.LongPressDelay = 500; // in milliseconds\n/** Time in milliseconds with two consecutive clicks will be considered as a double click */\nInputManager.DoubleClickDelay = 300; // in milliseconds\n/**\n * This flag will modify the behavior so that, when true, a click will happen if and only if\n * another click DOES NOT happen within the DoubleClickDelay time frame. If another click does\n * happen within that time frame, the first click will not fire an event and and a double click will occur.\n */\nInputManager.ExclusiveDoubleClickMode = false;\n//# sourceMappingURL=scene.inputManager.js.map","import { PrecisionDate } from \"./precisionDate.js\";\n/**\n * This class is used to track a performance counter which is number based.\n * The user has access to many properties which give statistics of different nature.\n *\n * The implementer can track two kinds of Performance Counter: time and count.\n * For time you can optionally call fetchNewFrame() to notify the start of a new frame to monitor, then call beginMonitoring() to start and endMonitoring() to record the lapsed time. endMonitoring takes a newFrame parameter for you to specify if the monitored time should be set for a new frame or accumulated to the current frame being monitored.\n * For count you first have to call fetchNewFrame() to notify the start of a new frame to monitor, then call addCount() how many time required to increment the count value you monitor.\n */\nexport class PerfCounter {\n /**\n * Returns the smallest value ever\n */\n get min() {\n return this._min;\n }\n /**\n * Returns the biggest value ever\n */\n get max() {\n return this._max;\n }\n /**\n * Returns the average value since the performance counter is running\n */\n get average() {\n return this._average;\n }\n /**\n * Returns the average value of the last second the counter was monitored\n */\n get lastSecAverage() {\n return this._lastSecAverage;\n }\n /**\n * Returns the current value\n */\n get current() {\n return this._current;\n }\n /**\n * Gets the accumulated total\n */\n get total() {\n return this._totalAccumulated;\n }\n /**\n * Gets the total value count\n */\n get count() {\n return this._totalValueCount;\n }\n /**\n * Creates a new counter\n */\n constructor() {\n this._startMonitoringTime = 0;\n this._min = 0;\n this._max = 0;\n this._average = 0;\n this._lastSecAverage = 0;\n this._current = 0;\n this._totalValueCount = 0;\n this._totalAccumulated = 0;\n this._lastSecAccumulated = 0;\n this._lastSecTime = 0;\n this._lastSecValueCount = 0;\n }\n /**\n * Call this method to start monitoring a new frame.\n * This scenario is typically used when you accumulate monitoring time many times for a single frame, you call this method at the start of the frame, then beginMonitoring to start recording and endMonitoring(false) to accumulated the recorded time to the PerfCounter or addCount() to accumulate a monitored count.\n */\n fetchNewFrame() {\n this._totalValueCount++;\n this._current = 0;\n this._lastSecValueCount++;\n }\n /**\n * Call this method to monitor a count of something (e.g. mesh drawn in viewport count)\n * @param newCount the count value to add to the monitored count\n * @param fetchResult true when it's the last time in the frame you add to the counter and you wish to update the statistics properties (min/max/average), false if you only want to update statistics.\n */\n addCount(newCount, fetchResult) {\n if (!PerfCounter.Enabled) {\n return;\n }\n this._current += newCount;\n if (fetchResult) {\n this._fetchResult();\n }\n }\n /**\n * Start monitoring this performance counter\n */\n beginMonitoring() {\n if (!PerfCounter.Enabled) {\n return;\n }\n this._startMonitoringTime = PrecisionDate.Now;\n }\n /**\n * Compute the time lapsed since the previous beginMonitoring() call.\n * @param newFrame true by default to fetch the result and monitor a new frame, if false the time monitored will be added to the current frame counter\n */\n endMonitoring(newFrame = true) {\n if (!PerfCounter.Enabled) {\n return;\n }\n if (newFrame) {\n this.fetchNewFrame();\n }\n const currentTime = PrecisionDate.Now;\n this._current = currentTime - this._startMonitoringTime;\n if (newFrame) {\n this._fetchResult();\n }\n }\n /**\n * Call this method to end the monitoring of a frame.\n * This scenario is typically used when you accumulate monitoring time many times for a single frame, you call this method at the end of the frame, after beginMonitoring to start recording and endMonitoring(false) to accumulated the recorded time to the PerfCounter or addCount() to accumulate a monitored count.\n */\n endFrame() {\n this._fetchResult();\n }\n _fetchResult() {\n this._totalAccumulated += this._current;\n this._lastSecAccumulated += this._current;\n // Min/Max update\n this._min = Math.min(this._min, this._current);\n this._max = Math.max(this._max, this._current);\n this._average = this._totalAccumulated / this._totalValueCount;\n // Reset last sec?\n const now = PrecisionDate.Now;\n if (now - this._lastSecTime > 1000) {\n this._lastSecAverage = this._lastSecAccumulated / this._lastSecValueCount;\n this._lastSecTime = now;\n this._lastSecAccumulated = 0;\n this._lastSecValueCount = 0;\n }\n }\n}\n/**\n * Gets or sets a global boolean to turn on and off all the counters\n */\nPerfCounter.Enabled = true;\n//# sourceMappingURL=perfCounter.js.map","/**\n * Helper class used to generate session unique ID\n */\nexport class UniqueIdGenerator {\n /**\n * Gets an unique (relatively to the current scene) Id\n */\n static get UniqueId() {\n const result = this._UniqueIdCounter;\n this._UniqueIdCounter++;\n return result;\n }\n}\n// Statics\nUniqueIdGenerator._UniqueIdCounter = 1;\n//# sourceMappingURL=uniqueIdGenerator.js.map","/**\n * Class used to store configuration data associated with pointer picking\n */\nexport class PointerPickingConfiguration {\n constructor() {\n /**\n * Gets or sets a predicate used to select candidate meshes for a pointer down event\n */\n this.pointerDownFastCheck = false;\n /**\n * Gets or sets a predicate used to select candidate meshes for a pointer up event\n */\n this.pointerUpFastCheck = false;\n /**\n * Gets or sets a predicate used to select candidate meshes for a pointer move event\n */\n this.pointerMoveFastCheck = false;\n /**\n * Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer move event occurs.\n */\n this.skipPointerMovePicking = false;\n /**\n * Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer down event occurs.\n */\n this.skipPointerDownPicking = false;\n /**\n * Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer up event occurs. Off by default.\n */\n this.skipPointerUpPicking = false;\n }\n}\n//# sourceMappingURL=pointerPickingConfiguration.js.map","import { Tools } from \"./Misc/tools.js\";\nimport { PrecisionDate } from \"./Misc/precisionDate.js\";\nimport { Observable } from \"./Misc/observable.js\";\nimport { SmartArrayNoDuplicate, SmartArray } from \"./Misc/smartArray.js\";\nimport { StringDictionary } from \"./Misc/stringDictionary.js\";\nimport { Tags } from \"./Misc/tags.js\";\nimport { Vector3, Matrix, TmpVectors } from \"./Maths/math.vector.js\";\nimport { AbstractScene } from \"./abstractScene.js\";\nimport { ImageProcessingConfiguration } from \"./Materials/imageProcessingConfiguration.js\";\nimport { UniformBuffer } from \"./Materials/uniformBuffer.js\";\nimport { PickingInfo } from \"./Collisions/pickingInfo.js\";\nimport { ActionEvent } from \"./Actions/actionEvent.js\";\nimport { PostProcessManager } from \"./PostProcesses/postProcessManager.js\";\nimport { RenderingManager } from \"./Rendering/renderingManager.js\";\nimport { Stage } from \"./sceneComponent.js\";\n\nimport { IsWindowObjectExist } from \"./Misc/domManagement.js\";\nimport { EngineStore } from \"./Engines/engineStore.js\";\nimport { _WarnImport } from \"./Misc/devTools.js\";\nimport { InputManager } from \"./Inputs/scene.inputManager.js\";\nimport { PerfCounter } from \"./Misc/perfCounter.js\";\nimport { Color4, Color3 } from \"./Maths/math.color.js\";\nimport { Frustum } from \"./Maths/math.frustum.js\";\nimport { UniqueIdGenerator } from \"./Misc/uniqueIdGenerator.js\";\nimport { ReadFile, RequestFile, LoadFile } from \"./Misc/fileTools.js\";\nimport { LightConstants } from \"./Lights/lightConstants.js\";\nimport { _ObserveArray } from \"./Misc/arrayTools.js\";\nimport { PointerPickingConfiguration } from \"./Inputs/pointerPickingConfiguration.js\";\nimport { Logger } from \"./Misc/logger.js\";\n/**\n * Define how the scene should favor performance over ease of use\n */\nexport var ScenePerformancePriority;\n(function (ScenePerformancePriority) {\n /** Default mode. No change. Performance will be treated as less important than backward compatibility */\n ScenePerformancePriority[ScenePerformancePriority[\"BackwardCompatible\"] = 0] = \"BackwardCompatible\";\n /** Some performance options will be turned on trying to strike a balance between perf and ease of use */\n ScenePerformancePriority[ScenePerformancePriority[\"Intermediate\"] = 1] = \"Intermediate\";\n /** Performance will be top priority */\n ScenePerformancePriority[ScenePerformancePriority[\"Aggressive\"] = 2] = \"Aggressive\";\n})(ScenePerformancePriority || (ScenePerformancePriority = {}));\n/**\n * Represents a scene to be rendered by the engine.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene\n */\nexport class Scene extends AbstractScene {\n /**\n * Factory used to create the default material.\n * @param scene The scene to create the material for\n * @returns The default material\n */\n static DefaultMaterialFactory(scene) {\n throw _WarnImport(\"StandardMaterial\");\n }\n /**\n * Factory used to create the a collision coordinator.\n * @returns The collision coordinator\n */\n static CollisionCoordinatorFactory() {\n throw _WarnImport(\"DefaultCollisionCoordinator\");\n }\n /**\n * Texture used in all pbr material as the reflection texture.\n * As in the majority of the scene they are the same (exception for multi room and so on),\n * this is easier to reference from here than from all the materials.\n */\n get environmentTexture() {\n return this._environmentTexture;\n }\n /**\n * Texture used in all pbr material as the reflection texture.\n * As in the majority of the scene they are the same (exception for multi room and so on),\n * this is easier to set here than in all the materials.\n */\n set environmentTexture(value) {\n if (this._environmentTexture === value) {\n return;\n }\n this._environmentTexture = value;\n this.markAllMaterialsAsDirty(1);\n }\n /**\n * Default image processing configuration used either in the rendering\n * Forward main pass or through the imageProcessingPostProcess if present.\n * As in the majority of the scene they are the same (exception for multi camera),\n * this is easier to reference from here than from all the materials and post process.\n *\n * No setter as we it is a shared configuration, you can set the values instead.\n */\n get imageProcessingConfiguration() {\n return this._imageProcessingConfiguration;\n }\n /**\n * Gets or sets a value indicating how to treat performance relatively to ease of use and backward compatibility\n */\n get performancePriority() {\n return this._performancePriority;\n }\n set performancePriority(value) {\n if (value === this._performancePriority) {\n return;\n }\n this._performancePriority = value;\n switch (value) {\n case ScenePerformancePriority.BackwardCompatible:\n this.skipFrustumClipping = false;\n this._renderingManager.maintainStateBetweenFrames = false;\n this.skipPointerMovePicking = false;\n this.autoClear = true;\n break;\n case ScenePerformancePriority.Intermediate:\n this.skipFrustumClipping = false;\n this._renderingManager.maintainStateBetweenFrames = false;\n this.skipPointerMovePicking = true;\n this.autoClear = false;\n break;\n case ScenePerformancePriority.Aggressive:\n this.skipFrustumClipping = true;\n this._renderingManager.maintainStateBetweenFrames = true;\n this.skipPointerMovePicking = true;\n this.autoClear = false;\n break;\n }\n this.onScenePerformancePriorityChangedObservable.notifyObservers(value);\n }\n /**\n * Gets or sets a boolean indicating if all rendering must be done in wireframe\n */\n set forceWireframe(value) {\n if (this._forceWireframe === value) {\n return;\n }\n this._forceWireframe = value;\n this.markAllMaterialsAsDirty(16);\n }\n get forceWireframe() {\n return this._forceWireframe;\n }\n /**\n * Gets or sets a boolean indicating if we should skip the frustum clipping part of the active meshes selection\n */\n set skipFrustumClipping(value) {\n if (this._skipFrustumClipping === value) {\n return;\n }\n this._skipFrustumClipping = value;\n }\n get skipFrustumClipping() {\n return this._skipFrustumClipping;\n }\n /**\n * Gets or sets a boolean indicating if all rendering must be done in point cloud\n */\n set forcePointsCloud(value) {\n if (this._forcePointsCloud === value) {\n return;\n }\n this._forcePointsCloud = value;\n this.markAllMaterialsAsDirty(16);\n }\n get forcePointsCloud() {\n return this._forcePointsCloud;\n }\n /**\n * Gets or sets the animation properties override\n */\n get animationPropertiesOverride() {\n return this._animationPropertiesOverride;\n }\n set animationPropertiesOverride(value) {\n this._animationPropertiesOverride = value;\n }\n /** Sets a function to be executed when this scene is disposed. */\n set onDispose(callback) {\n if (this._onDisposeObserver) {\n this.onDisposeObservable.remove(this._onDisposeObserver);\n }\n this._onDisposeObserver = this.onDisposeObservable.add(callback);\n }\n /** Sets a function to be executed before rendering this scene */\n set beforeRender(callback) {\n if (this._onBeforeRenderObserver) {\n this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver);\n }\n if (callback) {\n this._onBeforeRenderObserver = this.onBeforeRenderObservable.add(callback);\n }\n }\n /** Sets a function to be executed after rendering this scene */\n set afterRender(callback) {\n if (this._onAfterRenderObserver) {\n this.onAfterRenderObservable.remove(this._onAfterRenderObserver);\n }\n if (callback) {\n this._onAfterRenderObserver = this.onAfterRenderObservable.add(callback);\n }\n }\n /** Sets a function to be executed before rendering a camera*/\n set beforeCameraRender(callback) {\n if (this._onBeforeCameraRenderObserver) {\n this.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver);\n }\n this._onBeforeCameraRenderObserver = this.onBeforeCameraRenderObservable.add(callback);\n }\n /** Sets a function to be executed after rendering a camera*/\n set afterCameraRender(callback) {\n if (this._onAfterCameraRenderObserver) {\n this.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver);\n }\n this._onAfterCameraRenderObserver = this.onAfterCameraRenderObservable.add(callback);\n }\n /**\n * Gets or sets a predicate used to select candidate meshes for a pointer down event\n */\n get pointerDownPredicate() {\n return this._pointerPickingConfiguration.pointerDownPredicate;\n }\n set pointerDownPredicate(value) {\n this._pointerPickingConfiguration.pointerDownPredicate = value;\n }\n /**\n * Gets or sets a predicate used to select candidate meshes for a pointer up event\n */\n get pointerUpPredicate() {\n return this._pointerPickingConfiguration.pointerUpPredicate;\n }\n set pointerUpPredicate(value) {\n this._pointerPickingConfiguration.pointerUpPredicate = value;\n }\n /**\n * Gets or sets a predicate used to select candidate meshes for a pointer move event\n */\n get pointerMovePredicate() {\n return this._pointerPickingConfiguration.pointerMovePredicate;\n }\n set pointerMovePredicate(value) {\n this._pointerPickingConfiguration.pointerMovePredicate = value;\n }\n /**\n * Gets or sets a predicate used to select candidate meshes for a pointer down event\n */\n get pointerDownFastCheck() {\n return this._pointerPickingConfiguration.pointerDownFastCheck;\n }\n set pointerDownFastCheck(value) {\n this._pointerPickingConfiguration.pointerDownFastCheck = value;\n }\n /**\n * Gets or sets a predicate used to select candidate meshes for a pointer up event\n */\n get pointerUpFastCheck() {\n return this._pointerPickingConfiguration.pointerUpFastCheck;\n }\n set pointerUpFastCheck(value) {\n this._pointerPickingConfiguration.pointerUpFastCheck = value;\n }\n /**\n * Gets or sets a predicate used to select candidate meshes for a pointer move event\n */\n get pointerMoveFastCheck() {\n return this._pointerPickingConfiguration.pointerMoveFastCheck;\n }\n set pointerMoveFastCheck(value) {\n this._pointerPickingConfiguration.pointerMoveFastCheck = value;\n }\n /**\n * Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer move event occurs.\n */\n get skipPointerMovePicking() {\n return this._pointerPickingConfiguration.skipPointerMovePicking;\n }\n set skipPointerMovePicking(value) {\n this._pointerPickingConfiguration.skipPointerMovePicking = value;\n }\n /**\n * Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer down event occurs.\n */\n get skipPointerDownPicking() {\n return this._pointerPickingConfiguration.skipPointerDownPicking;\n }\n set skipPointerDownPicking(value) {\n this._pointerPickingConfiguration.skipPointerDownPicking = value;\n }\n /**\n * Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer up event occurs. Off by default.\n */\n get skipPointerUpPicking() {\n return this._pointerPickingConfiguration.skipPointerUpPicking;\n }\n set skipPointerUpPicking(value) {\n this._pointerPickingConfiguration.skipPointerUpPicking = value;\n }\n /**\n * Gets the pointer coordinates without any translation (ie. straight out of the pointer event)\n */\n get unTranslatedPointer() {\n return this._inputManager.unTranslatedPointer;\n }\n /**\n * Gets or sets the distance in pixel that you have to move to prevent some events. Default is 10 pixels\n */\n static get DragMovementThreshold() {\n return InputManager.DragMovementThreshold;\n }\n static set DragMovementThreshold(value) {\n InputManager.DragMovementThreshold = value;\n }\n /**\n * Time in milliseconds to wait to raise long press events if button is still pressed. Default is 500 ms\n */\n static get LongPressDelay() {\n return InputManager.LongPressDelay;\n }\n static set LongPressDelay(value) {\n InputManager.LongPressDelay = value;\n }\n /**\n * Time in milliseconds to wait to raise long press events if button is still pressed. Default is 300 ms\n */\n static get DoubleClickDelay() {\n return InputManager.DoubleClickDelay;\n }\n static set DoubleClickDelay(value) {\n InputManager.DoubleClickDelay = value;\n }\n /** If you need to check double click without raising a single click at first click, enable this flag */\n static get ExclusiveDoubleClickMode() {\n return InputManager.ExclusiveDoubleClickMode;\n }\n static set ExclusiveDoubleClickMode(value) {\n InputManager.ExclusiveDoubleClickMode = value;\n }\n /**\n * Bind the current view position to an effect.\n * @param effect The effect to be bound\n * @param variableName name of the shader variable that will hold the eye position\n * @param isVector3 true to indicates that variableName is a Vector3 and not a Vector4\n * @returns the computed eye position\n */\n bindEyePosition(effect, variableName = \"vEyePosition\", isVector3 = false) {\n const eyePosition = this._forcedViewPosition ? this._forcedViewPosition : this._mirroredCameraPosition ? this._mirroredCameraPosition : this.activeCamera.globalPosition;\n const invertNormal = this.useRightHandedSystem === (this._mirroredCameraPosition != null);\n TmpVectors.Vector4[0].set(eyePosition.x, eyePosition.y, eyePosition.z, invertNormal ? -1 : 1);\n if (effect) {\n if (isVector3) {\n effect.setFloat3(variableName, TmpVectors.Vector4[0].x, TmpVectors.Vector4[0].y, TmpVectors.Vector4[0].z);\n }\n else {\n effect.setVector4(variableName, TmpVectors.Vector4[0]);\n }\n }\n return TmpVectors.Vector4[0];\n }\n /**\n * Update the scene ubo before it can be used in rendering processing\n * @returns the scene UniformBuffer\n */\n finalizeSceneUbo() {\n const ubo = this.getSceneUniformBuffer();\n const eyePosition = this.bindEyePosition(null);\n ubo.updateFloat4(\"vEyePosition\", eyePosition.x, eyePosition.y, eyePosition.z, eyePosition.w);\n ubo.update();\n return ubo;\n }\n /**\n * Gets or sets a boolean indicating if the scene must use right-handed coordinates system\n */\n set useRightHandedSystem(value) {\n if (this._useRightHandedSystem === value) {\n return;\n }\n this._useRightHandedSystem = value;\n this.markAllMaterialsAsDirty(16);\n }\n get useRightHandedSystem() {\n return this._useRightHandedSystem;\n }\n /**\n * Sets the step Id used by deterministic lock step\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\n * @param newStepId defines the step Id\n */\n setStepId(newStepId) {\n this._currentStepId = newStepId;\n }\n /**\n * Gets the step Id used by deterministic lock step\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\n * @returns the step Id\n */\n getStepId() {\n return this._currentStepId;\n }\n /**\n * Gets the internal step used by deterministic lock step\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\n * @returns the internal step\n */\n getInternalStep() {\n return this._currentInternalStep;\n }\n /**\n * Gets or sets a boolean indicating if fog is enabled on this scene\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/environment_introduction#fog\n * (Default is true)\n */\n set fogEnabled(value) {\n if (this._fogEnabled === value) {\n return;\n }\n this._fogEnabled = value;\n this.markAllMaterialsAsDirty(16);\n }\n get fogEnabled() {\n return this._fogEnabled;\n }\n /**\n * Gets or sets the fog mode to use\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/environment_introduction#fog\n * | mode | value |\n * | --- | --- |\n * | FOGMODE_NONE | 0 |\n * | FOGMODE_EXP | 1 |\n * | FOGMODE_EXP2 | 2 |\n * | FOGMODE_LINEAR | 3 |\n */\n set fogMode(value) {\n if (this._fogMode === value) {\n return;\n }\n this._fogMode = value;\n this.markAllMaterialsAsDirty(16);\n }\n get fogMode() {\n return this._fogMode;\n }\n /**\n * Flag indicating that the frame buffer binding is handled by another component\n */\n get prePass() {\n return !!this.prePassRenderer && this.prePassRenderer.defaultRT.enabled;\n }\n /**\n * Gets or sets a boolean indicating if shadows are enabled on this scene\n */\n set shadowsEnabled(value) {\n if (this._shadowsEnabled === value) {\n return;\n }\n this._shadowsEnabled = value;\n this.markAllMaterialsAsDirty(2);\n }\n get shadowsEnabled() {\n return this._shadowsEnabled;\n }\n /**\n * Gets or sets a boolean indicating if lights are enabled on this scene\n */\n set lightsEnabled(value) {\n if (this._lightsEnabled === value) {\n return;\n }\n this._lightsEnabled = value;\n this.markAllMaterialsAsDirty(2);\n }\n get lightsEnabled() {\n return this._lightsEnabled;\n }\n /** All of the active cameras added to this scene. */\n get activeCameras() {\n return this._activeCameras;\n }\n set activeCameras(cameras) {\n if (this._unObserveActiveCameras) {\n this._unObserveActiveCameras();\n this._unObserveActiveCameras = null;\n }\n if (cameras) {\n this._unObserveActiveCameras = _ObserveArray(cameras, () => {\n this.onActiveCamerasChanged.notifyObservers(this);\n });\n }\n this._activeCameras = cameras;\n }\n /** Gets or sets the current active camera */\n get activeCamera() {\n return this._activeCamera;\n }\n set activeCamera(value) {\n if (value === this._activeCamera) {\n return;\n }\n this._activeCamera = value;\n this.onActiveCameraChanged.notifyObservers(this);\n }\n /** The default material used on meshes when no material is affected */\n get defaultMaterial() {\n if (!this._defaultMaterial) {\n this._defaultMaterial = Scene.DefaultMaterialFactory(this);\n }\n return this._defaultMaterial;\n }\n /** The default material used on meshes when no material is affected */\n set defaultMaterial(value) {\n this._defaultMaterial = value;\n }\n /**\n * Gets or sets a boolean indicating if textures are enabled on this scene\n */\n set texturesEnabled(value) {\n if (this._texturesEnabled === value) {\n return;\n }\n this._texturesEnabled = value;\n this.markAllMaterialsAsDirty(1);\n }\n get texturesEnabled() {\n return this._texturesEnabled;\n }\n /**\n * Gets or sets a boolean indicating if skeletons are enabled on this scene\n */\n set skeletonsEnabled(value) {\n if (this._skeletonsEnabled === value) {\n return;\n }\n this._skeletonsEnabled = value;\n this.markAllMaterialsAsDirty(8);\n }\n get skeletonsEnabled() {\n return this._skeletonsEnabled;\n }\n /** @internal */\n get collisionCoordinator() {\n if (!this._collisionCoordinator) {\n this._collisionCoordinator = Scene.CollisionCoordinatorFactory();\n this._collisionCoordinator.init(this);\n }\n return this._collisionCoordinator;\n }\n /**\n * Gets the scene's rendering manager\n */\n get renderingManager() {\n return this._renderingManager;\n }\n /**\n * Gets the list of frustum planes (built from the active camera)\n */\n get frustumPlanes() {\n return this._frustumPlanes;\n }\n /**\n * Registers the transient components if needed.\n */\n _registerTransientComponents() {\n // Register components that have been associated lately to the scene.\n if (this._transientComponents.length > 0) {\n for (const component of this._transientComponents) {\n component.register();\n }\n this._transientComponents.length = 0;\n }\n }\n /**\n * @internal\n * Add a component to the scene.\n * Note that the ccomponent could be registered on th next frame if this is called after\n * the register component stage.\n * @param component Defines the component to add to the scene\n */\n _addComponent(component) {\n this._components.push(component);\n this._transientComponents.push(component);\n const serializableComponent = component;\n if (serializableComponent.addFromContainer && serializableComponent.serialize) {\n this._serializableComponents.push(serializableComponent);\n }\n }\n /**\n * @internal\n * Gets a component from the scene.\n * @param name defines the name of the component to retrieve\n * @returns the component or null if not present\n */\n _getComponent(name) {\n for (const component of this._components) {\n if (component.name === name) {\n return component;\n }\n }\n return null;\n }\n /**\n * Creates a new Scene\n * @param engine defines the engine to use to render this scene\n * @param options defines the scene options\n */\n constructor(engine, options) {\n super();\n // Members\n /** @internal */\n this._inputManager = new InputManager(this);\n /** Define this parameter if you are using multiple cameras and you want to specify which one should be used for pointer position */\n this.cameraToUseForPointers = null;\n /** @internal */\n this._isScene = true;\n /** @internal */\n this._blockEntityCollection = false;\n /**\n * Gets or sets a boolean that indicates if the scene must clear the render buffer before rendering a frame\n */\n this.autoClear = true;\n /**\n * Gets or sets a boolean that indicates if the scene must clear the depth and stencil buffers before rendering a frame\n */\n this.autoClearDepthAndStencil = true;\n /**\n * Defines the color used to clear the render buffer (Default is (0.2, 0.2, 0.3, 1.0))\n */\n this.clearColor = new Color4(0.2, 0.2, 0.3, 1.0);\n /**\n * Defines the color used to simulate the ambient color (Default is (0, 0, 0))\n */\n this.ambientColor = new Color3(0, 0, 0);\n /**\n * Intensity of the environment in all pbr material.\n * This dims or reinforces the IBL lighting overall (reflection and diffuse).\n * As in the majority of the scene they are the same (exception for multi room and so on),\n * this is easier to reference from here than from all the materials.\n */\n this.environmentIntensity = 1;\n this._performancePriority = ScenePerformancePriority.BackwardCompatible;\n /**\n * Observable triggered when the performance priority is changed\n */\n this.onScenePerformancePriorityChangedObservable = new Observable();\n this._forceWireframe = false;\n this._skipFrustumClipping = false;\n this._forcePointsCloud = false;\n /**\n * Gets or sets a boolean indicating if animations are enabled\n */\n this.animationsEnabled = true;\n this._animationPropertiesOverride = null;\n /**\n * Gets or sets a boolean indicating if a constant deltatime has to be used\n * This is mostly useful for testing purposes when you do not want the animations to scale with the framerate\n */\n this.useConstantAnimationDeltaTime = false;\n /**\n * Gets or sets a boolean indicating if the scene must keep the meshUnderPointer property updated\n * Please note that it requires to run a ray cast through the scene on every frame\n */\n this.constantlyUpdateMeshUnderPointer = false;\n /**\n * Defines the HTML cursor to use when hovering over interactive elements\n */\n this.hoverCursor = \"pointer\";\n /**\n * Defines the HTML default cursor to use (empty by default)\n */\n this.defaultCursor = \"\";\n /**\n * Defines whether cursors are handled by the scene.\n */\n this.doNotHandleCursors = false;\n /**\n * This is used to call preventDefault() on pointer down\n * in order to block unwanted artifacts like system double clicks\n */\n this.preventDefaultOnPointerDown = true;\n /**\n * This is used to call preventDefault() on pointer up\n * in order to block unwanted artifacts like system double clicks\n */\n this.preventDefaultOnPointerUp = true;\n // Metadata\n /**\n * Gets or sets user defined metadata\n */\n this.metadata = null;\n /**\n * For internal use only. Please do not use.\n */\n this.reservedDataStore = null;\n /**\n * Use this array to add regular expressions used to disable offline support for specific urls\n */\n this.disableOfflineSupportExceptionRules = [];\n /**\n * An event triggered when the scene is disposed.\n */\n this.onDisposeObservable = new Observable();\n this._onDisposeObserver = null;\n /**\n * An event triggered before rendering the scene (right after animations and physics)\n */\n this.onBeforeRenderObservable = new Observable();\n this._onBeforeRenderObserver = null;\n /**\n * An event triggered after rendering the scene\n */\n this.onAfterRenderObservable = new Observable();\n /**\n * An event triggered after rendering the scene for an active camera (When scene.render is called this will be called after each camera)\n * This is triggered for each \"sub\" camera in a Camera Rig unlike onAfterCameraRenderObservable\n */\n this.onAfterRenderCameraObservable = new Observable();\n this._onAfterRenderObserver = null;\n /**\n * An event triggered before animating the scene\n */\n this.onBeforeAnimationsObservable = new Observable();\n /**\n * An event triggered after animations processing\n */\n this.onAfterAnimationsObservable = new Observable();\n /**\n * An event triggered before draw calls are ready to be sent\n */\n this.onBeforeDrawPhaseObservable = new Observable();\n /**\n * An event triggered after draw calls have been sent\n */\n this.onAfterDrawPhaseObservable = new Observable();\n /**\n * An event triggered when the scene is ready\n */\n this.onReadyObservable = new Observable();\n /**\n * An event triggered before rendering a camera\n */\n this.onBeforeCameraRenderObservable = new Observable();\n this._onBeforeCameraRenderObserver = null;\n /**\n * An event triggered after rendering a camera\n * This is triggered for the full rig Camera only unlike onAfterRenderCameraObservable\n */\n this.onAfterCameraRenderObservable = new Observable();\n this._onAfterCameraRenderObserver = null;\n /**\n * An event triggered when active meshes evaluation is about to start\n */\n this.onBeforeActiveMeshesEvaluationObservable = new Observable();\n /**\n * An event triggered when active meshes evaluation is done\n */\n this.onAfterActiveMeshesEvaluationObservable = new Observable();\n /**\n * An event triggered when particles rendering is about to start\n * Note: This event can be trigger more than once per frame (because particles can be rendered by render target textures as well)\n */\n this.onBeforeParticlesRenderingObservable = new Observable();\n /**\n * An event triggered when particles rendering is done\n * Note: This event can be trigger more than once per frame (because particles can be rendered by render target textures as well)\n */\n this.onAfterParticlesRenderingObservable = new Observable();\n /**\n * An event triggered when SceneLoader.Append or SceneLoader.Load or SceneLoader.ImportMesh were successfully executed\n */\n this.onDataLoadedObservable = new Observable();\n /**\n * An event triggered when a camera is created\n */\n this.onNewCameraAddedObservable = new Observable();\n /**\n * An event triggered when a camera is removed\n */\n this.onCameraRemovedObservable = new Observable();\n /**\n * An event triggered when a light is created\n */\n this.onNewLightAddedObservable = new Observable();\n /**\n * An event triggered when a light is removed\n */\n this.onLightRemovedObservable = new Observable();\n /**\n * An event triggered when a geometry is created\n */\n this.onNewGeometryAddedObservable = new Observable();\n /**\n * An event triggered when a geometry is removed\n */\n this.onGeometryRemovedObservable = new Observable();\n /**\n * An event triggered when a transform node is created\n */\n this.onNewTransformNodeAddedObservable = new Observable();\n /**\n * An event triggered when a transform node is removed\n */\n this.onTransformNodeRemovedObservable = new Observable();\n /**\n * An event triggered when a mesh is created\n */\n this.onNewMeshAddedObservable = new Observable();\n /**\n * An event triggered when a mesh is removed\n */\n this.onMeshRemovedObservable = new Observable();\n /**\n * An event triggered when a skeleton is created\n */\n this.onNewSkeletonAddedObservable = new Observable();\n /**\n * An event triggered when a skeleton is removed\n */\n this.onSkeletonRemovedObservable = new Observable();\n /**\n * An event triggered when a material is created\n */\n this.onNewMaterialAddedObservable = new Observable();\n /**\n * An event triggered when a multi material is created\n */\n this.onNewMultiMaterialAddedObservable = new Observable();\n /**\n * An event triggered when a material is removed\n */\n this.onMaterialRemovedObservable = new Observable();\n /**\n * An event triggered when a multi material is removed\n */\n this.onMultiMaterialRemovedObservable = new Observable();\n /**\n * An event triggered when a texture is created\n */\n this.onNewTextureAddedObservable = new Observable();\n /**\n * An event triggered when a texture is removed\n */\n this.onTextureRemovedObservable = new Observable();\n /**\n * An event triggered when render targets are about to be rendered\n * Can happen multiple times per frame.\n */\n this.onBeforeRenderTargetsRenderObservable = new Observable();\n /**\n * An event triggered when render targets were rendered.\n * Can happen multiple times per frame.\n */\n this.onAfterRenderTargetsRenderObservable = new Observable();\n /**\n * An event triggered before calculating deterministic simulation step\n */\n this.onBeforeStepObservable = new Observable();\n /**\n * An event triggered after calculating deterministic simulation step\n */\n this.onAfterStepObservable = new Observable();\n /**\n * An event triggered when the activeCamera property is updated\n */\n this.onActiveCameraChanged = new Observable();\n /**\n * An event triggered when the activeCameras property is updated\n */\n this.onActiveCamerasChanged = new Observable();\n /**\n * This Observable will be triggered before rendering each renderingGroup of each rendered camera.\n * The RenderingGroupInfo class contains all the information about the context in which the observable is called\n * If you wish to register an Observer only for a given set of renderingGroup, use the mask with a combination of the renderingGroup index elevated to the power of two (1 for renderingGroup 0, 2 for renderingrOup1, 4 for 2 and 8 for 3)\n */\n this.onBeforeRenderingGroupObservable = new Observable();\n /**\n * This Observable will be triggered after rendering each renderingGroup of each rendered camera.\n * The RenderingGroupInfo class contains all the information about the context in which the observable is called\n * If you wish to register an Observer only for a given set of renderingGroup, use the mask with a combination of the renderingGroup index elevated to the power of two (1 for renderingGroup 0, 2 for renderingrOup1, 4 for 2 and 8 for 3)\n */\n this.onAfterRenderingGroupObservable = new Observable();\n /**\n * This Observable will when a mesh has been imported into the scene.\n */\n this.onMeshImportedObservable = new Observable();\n /**\n * This Observable will when an animation file has been imported into the scene.\n */\n this.onAnimationFileImportedObservable = new Observable();\n // Animations\n /** @internal */\n this._registeredForLateAnimationBindings = new SmartArrayNoDuplicate(256);\n // Pointers\n this._pointerPickingConfiguration = new PointerPickingConfiguration();\n /**\n * This observable event is triggered when any ponter event is triggered. It is registered during Scene.attachControl() and it is called BEFORE the 3D engine process anything (mesh/sprite picking for instance).\n * You have the possibility to skip the process and the call to onPointerObservable by setting PointerInfoPre.skipOnPointerObservable to true\n */\n this.onPrePointerObservable = new Observable();\n /**\n * Observable event triggered each time an input event is received from the rendering canvas\n */\n this.onPointerObservable = new Observable();\n // Keyboard\n /**\n * This observable event is triggered when any keyboard event si raised and registered during Scene.attachControl()\n * You have the possibility to skip the process and the call to onKeyboardObservable by setting KeyboardInfoPre.skipOnPointerObservable to true\n */\n this.onPreKeyboardObservable = new Observable();\n /**\n * Observable event triggered each time an keyboard event is received from the hosting window\n */\n this.onKeyboardObservable = new Observable();\n // Coordinates system\n this._useRightHandedSystem = false;\n // Deterministic lockstep\n this._timeAccumulator = 0;\n this._currentStepId = 0;\n this._currentInternalStep = 0;\n // Fog\n this._fogEnabled = true;\n this._fogMode = Scene.FOGMODE_NONE;\n /**\n * Gets or sets the fog color to use\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/environment_introduction#fog\n * (Default is Color3(0.2, 0.2, 0.3))\n */\n this.fogColor = new Color3(0.2, 0.2, 0.3);\n /**\n * Gets or sets the fog density to use\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/environment_introduction#fog\n * (Default is 0.1)\n */\n this.fogDensity = 0.1;\n /**\n * Gets or sets the fog start distance to use\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/environment_introduction#fog\n * (Default is 0)\n */\n this.fogStart = 0;\n /**\n * Gets or sets the fog end distance to use\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/environment_introduction#fog\n * (Default is 1000)\n */\n this.fogEnd = 1000.0;\n /**\n * Flag indicating if we need to store previous matrices when rendering\n */\n this.needsPreviousWorldMatrices = false;\n // Lights\n this._shadowsEnabled = true;\n this._lightsEnabled = true;\n this._unObserveActiveCameras = null;\n // Textures\n this._texturesEnabled = true;\n // Physics\n /**\n * Gets or sets a boolean indicating if physic engines are enabled on this scene\n */\n this.physicsEnabled = true;\n // Particles\n /**\n * Gets or sets a boolean indicating if particles are enabled on this scene\n */\n this.particlesEnabled = true;\n // Sprites\n /**\n * Gets or sets a boolean indicating if sprites are enabled on this scene\n */\n this.spritesEnabled = true;\n // Skeletons\n this._skeletonsEnabled = true;\n // Lens flares\n /**\n * Gets or sets a boolean indicating if lens flares are enabled on this scene\n */\n this.lensFlaresEnabled = true;\n // Collisions\n /**\n * Gets or sets a boolean indicating if collisions are enabled on this scene\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions\n */\n this.collisionsEnabled = true;\n /**\n * Defines the gravity applied to this scene (used only for collisions)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions\n */\n this.gravity = new Vector3(0, -9.807, 0);\n // Postprocesses\n /**\n * Gets or sets a boolean indicating if postprocesses are enabled on this scene\n */\n this.postProcessesEnabled = true;\n // Customs render targets\n /**\n * Gets or sets a boolean indicating if render targets are enabled on this scene\n */\n this.renderTargetsEnabled = true;\n /**\n * Gets or sets a boolean indicating if next render targets must be dumped as image for debugging purposes\n * We recommend not using it and instead rely on Spector.js: http://spector.babylonjs.com\n */\n this.dumpNextRenderTargets = false;\n /**\n * The list of user defined render targets added to the scene\n */\n this.customRenderTargets = [];\n /**\n * Gets the list of meshes imported to the scene through SceneLoader\n */\n this.importedMeshesFiles = [];\n // Probes\n /**\n * Gets or sets a boolean indicating if probes are enabled on this scene\n */\n this.probesEnabled = true;\n this._meshesForIntersections = new SmartArrayNoDuplicate(256);\n // Procedural textures\n /**\n * Gets or sets a boolean indicating if procedural textures are enabled on this scene\n */\n this.proceduralTexturesEnabled = true;\n // Performance counters\n this._totalVertices = new PerfCounter();\n /** @internal */\n this._activeIndices = new PerfCounter();\n /** @internal */\n this._activeParticles = new PerfCounter();\n /** @internal */\n this._activeBones = new PerfCounter();\n /** @internal */\n this._animationTime = 0;\n /**\n * Gets or sets a general scale for animation speed\n * @see https://www.babylonjs-playground.com/#IBU2W7#3\n */\n this.animationTimeScale = 1;\n this._renderId = 0;\n this._frameId = 0;\n this._executeWhenReadyTimeoutId = null;\n this._intermediateRendering = false;\n this._defaultFrameBufferCleared = false;\n this._viewUpdateFlag = -1;\n this._projectionUpdateFlag = -1;\n /** @internal */\n this._toBeDisposed = new Array(256);\n this._activeRequests = new Array();\n /** @internal */\n this._pendingData = new Array();\n this._isDisposed = false;\n /**\n * Gets or sets a boolean indicating that all submeshes of active meshes must be rendered\n * Use this boolean to avoid computing frustum clipping on submeshes (This could help when you are CPU bound)\n */\n this.dispatchAllSubMeshesOfActiveMeshes = false;\n this._activeMeshes = new SmartArray(256);\n this._processedMaterials = new SmartArray(256);\n this._renderTargets = new SmartArrayNoDuplicate(256);\n this._materialsRenderTargets = new SmartArrayNoDuplicate(256);\n /** @internal */\n this._activeParticleSystems = new SmartArray(256);\n this._activeSkeletons = new SmartArrayNoDuplicate(32);\n this._softwareSkinnedMeshes = new SmartArrayNoDuplicate(32);\n /** @internal */\n this._activeAnimatables = new Array();\n this._transformMatrix = Matrix.Zero();\n /**\n * Gets or sets a boolean indicating if lights must be sorted by priority (off by default)\n * This is useful if there are more lights that the maximum simulteanous authorized\n */\n this.requireLightSorting = false;\n /**\n * @internal\n * Backing store of defined scene components.\n */\n this._components = [];\n /**\n * @internal\n * Backing store of defined scene components.\n */\n this._serializableComponents = [];\n /**\n * List of components to register on the next registration step.\n */\n this._transientComponents = [];\n /**\n * @internal\n * Defines the actions happening before camera updates.\n */\n this._beforeCameraUpdateStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening before clear the canvas.\n */\n this._beforeClearStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening before clear the canvas.\n */\n this._beforeRenderTargetClearStage = Stage.Create();\n /**\n * @internal\n * Defines the actions when collecting render targets for the frame.\n */\n this._gatherRenderTargetsStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening for one camera in the frame.\n */\n this._gatherActiveCameraRenderTargetsStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening during the per mesh ready checks.\n */\n this._isReadyForMeshStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening before evaluate active mesh checks.\n */\n this._beforeEvaluateActiveMeshStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening during the evaluate sub mesh checks.\n */\n this._evaluateSubMeshStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening during the active mesh stage.\n */\n this._preActiveMeshStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening during the per camera render target step.\n */\n this._cameraDrawRenderTargetStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening just before the active camera is drawing.\n */\n this._beforeCameraDrawStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening just before a render target is drawing.\n */\n this._beforeRenderTargetDrawStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening just before a rendering group is drawing.\n */\n this._beforeRenderingGroupDrawStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening just before a mesh is drawing.\n */\n this._beforeRenderingMeshStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening just after a mesh has been drawn.\n */\n this._afterRenderingMeshStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening just after a rendering group has been drawn.\n */\n this._afterRenderingGroupDrawStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening just after the active camera has been drawn.\n */\n this._afterCameraDrawStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening just after the post processing\n */\n this._afterCameraPostProcessStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening just after a render target has been drawn.\n */\n this._afterRenderTargetDrawStage = Stage.Create();\n /**\n * Defines the actions happening just after the post processing on a render target\n */\n this._afterRenderTargetPostProcessStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening just after rendering all cameras and computing intersections.\n */\n this._afterRenderStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening when a pointer move event happens.\n */\n this._pointerMoveStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening when a pointer down event happens.\n */\n this._pointerDownStage = Stage.Create();\n /**\n * @internal\n * Defines the actions happening when a pointer up event happens.\n */\n this._pointerUpStage = Stage.Create();\n /**\n * an optional map from Geometry Id to Geometry index in the 'geometries' array\n */\n this._geometriesByUniqueId = null;\n this._defaultMeshCandidates = {\n data: [],\n length: 0,\n };\n this._defaultSubMeshCandidates = {\n data: [],\n length: 0,\n };\n this._preventFreeActiveMeshesAndRenderingGroups = false;\n /** @internal */\n this._activeMeshesFrozen = false;\n /** @internal */\n this._activeMeshesFrozenButKeepClipping = false;\n this._skipEvaluateActiveMeshesCompletely = false;\n /** @internal */\n this._allowPostProcessClearColor = true;\n /**\n * User updatable function that will return a deterministic frame time when engine is in deterministic lock step mode\n */\n this.getDeterministicFrameTime = () => {\n return this._engine.getTimeStep();\n };\n /** @internal */\n this._registeredActions = 0;\n this._blockMaterialDirtyMechanism = false;\n /**\n * Internal perfCollector instance used for sharing between inspector and playground.\n * Marked as protected to allow sharing between prototype extensions, but disallow access at toplevel.\n */\n this._perfCollector = null;\n this.activeCameras = [];\n const fullOptions = Object.assign({ useGeometryUniqueIdsMap: true, useMaterialMeshMap: true, useClonedMeshMap: true, virtual: false }, options);\n engine = this._engine = engine || EngineStore.LastCreatedEngine;\n if (fullOptions.virtual) {\n engine._virtualScenes.push(this);\n }\n else {\n EngineStore._LastCreatedScene = this;\n engine.scenes.push(this);\n }\n this._uid = null;\n this._renderingManager = new RenderingManager(this);\n if (PostProcessManager) {\n this.postProcessManager = new PostProcessManager(this);\n }\n if (IsWindowObjectExist()) {\n this.attachControl();\n }\n // Uniform Buffer\n this._createUbo();\n // Default Image processing definition\n if (ImageProcessingConfiguration) {\n this._imageProcessingConfiguration = new ImageProcessingConfiguration();\n }\n this.setDefaultCandidateProviders();\n if (fullOptions.useGeometryUniqueIdsMap) {\n this._geometriesByUniqueId = {};\n }\n this.useMaterialMeshMap = fullOptions.useMaterialMeshMap;\n this.useClonedMeshMap = fullOptions.useClonedMeshMap;\n if (!options || !options.virtual) {\n engine.onNewSceneAddedObservable.notifyObservers(this);\n }\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"Scene\" string\n */\n getClassName() {\n return \"Scene\";\n }\n /**\n * @internal\n */\n _getDefaultMeshCandidates() {\n this._defaultMeshCandidates.data = this.meshes;\n this._defaultMeshCandidates.length = this.meshes.length;\n return this._defaultMeshCandidates;\n }\n /**\n * @internal\n */\n _getDefaultSubMeshCandidates(mesh) {\n this._defaultSubMeshCandidates.data = mesh.subMeshes;\n this._defaultSubMeshCandidates.length = mesh.subMeshes.length;\n return this._defaultSubMeshCandidates;\n }\n /**\n * Sets the default candidate providers for the scene.\n * This sets the getActiveMeshCandidates, getActiveSubMeshCandidates, getIntersectingSubMeshCandidates\n * and getCollidingSubMeshCandidates to their default function\n */\n setDefaultCandidateProviders() {\n this.getActiveMeshCandidates = () => this._getDefaultMeshCandidates();\n this.getActiveSubMeshCandidates = (mesh) => this._getDefaultSubMeshCandidates(mesh);\n this.getIntersectingSubMeshCandidates = (mesh, localRay) => this._getDefaultSubMeshCandidates(mesh);\n this.getCollidingSubMeshCandidates = (mesh, collider) => this._getDefaultSubMeshCandidates(mesh);\n }\n /**\n * Gets the mesh that is currently under the pointer\n */\n get meshUnderPointer() {\n return this._inputManager.meshUnderPointer;\n }\n /**\n * Gets or sets the current on-screen X position of the pointer\n */\n get pointerX() {\n return this._inputManager.pointerX;\n }\n set pointerX(value) {\n this._inputManager.pointerX = value;\n }\n /**\n * Gets or sets the current on-screen Y position of the pointer\n */\n get pointerY() {\n return this._inputManager.pointerY;\n }\n set pointerY(value) {\n this._inputManager.pointerY = value;\n }\n /**\n * Gets the cached material (ie. the latest rendered one)\n * @returns the cached material\n */\n getCachedMaterial() {\n return this._cachedMaterial;\n }\n /**\n * Gets the cached effect (ie. the latest rendered one)\n * @returns the cached effect\n */\n getCachedEffect() {\n return this._cachedEffect;\n }\n /**\n * Gets the cached visibility state (ie. the latest rendered one)\n * @returns the cached visibility state\n */\n getCachedVisibility() {\n return this._cachedVisibility;\n }\n /**\n * Gets a boolean indicating if the current material / effect / visibility must be bind again\n * @param material defines the current material\n * @param effect defines the current effect\n * @param visibility defines the current visibility state\n * @returns true if one parameter is not cached\n */\n isCachedMaterialInvalid(material, effect, visibility = 1) {\n return this._cachedEffect !== effect || this._cachedMaterial !== material || this._cachedVisibility !== visibility;\n }\n /**\n * Gets the engine associated with the scene\n * @returns an Engine\n */\n getEngine() {\n return this._engine;\n }\n /**\n * Gets the total number of vertices rendered per frame\n * @returns the total number of vertices rendered per frame\n */\n getTotalVertices() {\n return this._totalVertices.current;\n }\n /**\n * Gets the performance counter for total vertices\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#instrumentation\n */\n get totalVerticesPerfCounter() {\n return this._totalVertices;\n }\n /**\n * Gets the total number of active indices rendered per frame (You can deduce the number of rendered triangles by dividing this number by 3)\n * @returns the total number of active indices rendered per frame\n */\n getActiveIndices() {\n return this._activeIndices.current;\n }\n /**\n * Gets the performance counter for active indices\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#instrumentation\n */\n get totalActiveIndicesPerfCounter() {\n return this._activeIndices;\n }\n /**\n * Gets the total number of active particles rendered per frame\n * @returns the total number of active particles rendered per frame\n */\n getActiveParticles() {\n return this._activeParticles.current;\n }\n /**\n * Gets the performance counter for active particles\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#instrumentation\n */\n get activeParticlesPerfCounter() {\n return this._activeParticles;\n }\n /**\n * Gets the total number of active bones rendered per frame\n * @returns the total number of active bones rendered per frame\n */\n getActiveBones() {\n return this._activeBones.current;\n }\n /**\n * Gets the performance counter for active bones\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#instrumentation\n */\n get activeBonesPerfCounter() {\n return this._activeBones;\n }\n /**\n * Gets the array of active meshes\n * @returns an array of AbstractMesh\n */\n getActiveMeshes() {\n return this._activeMeshes;\n }\n /**\n * Gets the animation ratio (which is 1.0 is the scene renders at 60fps and 2 if the scene renders at 30fps, etc.)\n * @returns a number\n */\n getAnimationRatio() {\n return this._animationRatio !== undefined ? this._animationRatio : 1;\n }\n /**\n * Gets an unique Id for the current render phase\n * @returns a number\n */\n getRenderId() {\n return this._renderId;\n }\n /**\n * Gets an unique Id for the current frame\n * @returns a number\n */\n getFrameId() {\n return this._frameId;\n }\n /** Call this function if you want to manually increment the render Id*/\n incrementRenderId() {\n this._renderId++;\n }\n _createUbo() {\n this.setSceneUniformBuffer(this.createSceneUniformBuffer());\n }\n /**\n * Use this method to simulate a pointer move on a mesh\n * The pickResult parameter can be obtained from a scene.pick or scene.pickWithRay\n * @param pickResult pickingInfo of the object wished to simulate pointer event on\n * @param pointerEventInit pointer event state to be used when simulating the pointer event (eg. pointer id for multitouch)\n * @returns the current scene\n */\n simulatePointerMove(pickResult, pointerEventInit) {\n this._inputManager.simulatePointerMove(pickResult, pointerEventInit);\n return this;\n }\n /**\n * Use this method to simulate a pointer down on a mesh\n * The pickResult parameter can be obtained from a scene.pick or scene.pickWithRay\n * @param pickResult pickingInfo of the object wished to simulate pointer event on\n * @param pointerEventInit pointer event state to be used when simulating the pointer event (eg. pointer id for multitouch)\n * @returns the current scene\n */\n simulatePointerDown(pickResult, pointerEventInit) {\n this._inputManager.simulatePointerDown(pickResult, pointerEventInit);\n return this;\n }\n /**\n * Use this method to simulate a pointer up on a mesh\n * The pickResult parameter can be obtained from a scene.pick or scene.pickWithRay\n * @param pickResult pickingInfo of the object wished to simulate pointer event on\n * @param pointerEventInit pointer event state to be used when simulating the pointer event (eg. pointer id for multitouch)\n * @param doubleTap indicates that the pointer up event should be considered as part of a double click (false by default)\n * @returns the current scene\n */\n simulatePointerUp(pickResult, pointerEventInit, doubleTap) {\n this._inputManager.simulatePointerUp(pickResult, pointerEventInit, doubleTap);\n return this;\n }\n /**\n * Gets a boolean indicating if the current pointer event is captured (meaning that the scene has already handled the pointer down)\n * @param pointerId defines the pointer id to use in a multi-touch scenario (0 by default)\n * @returns true if the pointer was captured\n */\n isPointerCaptured(pointerId = 0) {\n return this._inputManager.isPointerCaptured(pointerId);\n }\n /**\n * Attach events to the canvas (To handle actionManagers triggers and raise onPointerMove, onPointerDown and onPointerUp\n * @param attachUp defines if you want to attach events to pointerup\n * @param attachDown defines if you want to attach events to pointerdown\n * @param attachMove defines if you want to attach events to pointermove\n */\n attachControl(attachUp = true, attachDown = true, attachMove = true) {\n this._inputManager.attachControl(attachUp, attachDown, attachMove);\n }\n /** Detaches all event handlers*/\n detachControl() {\n this._inputManager.detachControl();\n }\n /**\n * This function will check if the scene can be rendered (textures are loaded, shaders are compiled)\n * Delay loaded resources are not taking in account\n * @param checkRenderTargets true to also check that the meshes rendered as part of a render target are ready (default: true)\n * @returns true if all required resources are ready\n */\n isReady(checkRenderTargets = true) {\n var _a, _b, _c;\n if (this._isDisposed) {\n return false;\n }\n let index;\n const engine = this.getEngine();\n const currentRenderPassId = engine.currentRenderPassId;\n engine.currentRenderPassId = (_b = (_a = this.activeCamera) === null || _a === void 0 ? void 0 : _a.renderPassId) !== null && _b !== void 0 ? _b : currentRenderPassId;\n let isReady = true;\n // Pending data\n if (this._pendingData.length > 0) {\n isReady = false;\n }\n // Ensures that the pre-pass renderer is enabled if it is to be enabled.\n (_c = this.prePassRenderer) === null || _c === void 0 ? void 0 : _c.update();\n // OIT\n if (this.useOrderIndependentTransparency && this.depthPeelingRenderer) {\n isReady && (isReady = this.depthPeelingRenderer.isReady());\n }\n // Meshes\n if (checkRenderTargets) {\n this._processedMaterials.reset();\n this._materialsRenderTargets.reset();\n }\n for (index = 0; index < this.meshes.length; index++) {\n const mesh = this.meshes[index];\n if (!mesh.subMeshes || mesh.subMeshes.length === 0) {\n continue;\n }\n // Do not stop at the first encountered \"unready\" object as we want to ensure\n // all materials are starting off their compilation in parallel.\n if (!mesh.isReady(true)) {\n isReady = false;\n continue;\n }\n const hardwareInstancedRendering = mesh.hasThinInstances ||\n mesh.getClassName() === \"InstancedMesh\" ||\n mesh.getClassName() === \"InstancedLinesMesh\" ||\n (engine.getCaps().instancedArrays && mesh.instances.length > 0);\n // Is Ready For Mesh\n for (const step of this._isReadyForMeshStage) {\n if (!step.action(mesh, hardwareInstancedRendering)) {\n isReady = false;\n }\n }\n if (!checkRenderTargets) {\n continue;\n }\n const mat = mesh.material || this.defaultMaterial;\n if (mat) {\n if (mat._storeEffectOnSubMeshes) {\n for (const subMesh of mesh.subMeshes) {\n const material = subMesh.getMaterial();\n if (material && material.hasRenderTargetTextures && material.getRenderTargetTextures != null) {\n if (this._processedMaterials.indexOf(material) === -1) {\n this._processedMaterials.push(material);\n this._materialsRenderTargets.concatWithNoDuplicate(material.getRenderTargetTextures());\n }\n }\n }\n }\n else {\n if (mat.hasRenderTargetTextures && mat.getRenderTargetTextures != null) {\n if (this._processedMaterials.indexOf(mat) === -1) {\n this._processedMaterials.push(mat);\n this._materialsRenderTargets.concatWithNoDuplicate(mat.getRenderTargetTextures());\n }\n }\n }\n }\n }\n // Render targets\n if (checkRenderTargets) {\n for (index = 0; index < this._materialsRenderTargets.length; ++index) {\n const rtt = this._materialsRenderTargets.data[index];\n if (!rtt.isReadyForRendering()) {\n isReady = false;\n }\n }\n }\n // Geometries\n for (index = 0; index < this.geometries.length; index++) {\n const geometry = this.geometries[index];\n if (geometry.delayLoadState === 2) {\n isReady = false;\n }\n }\n // Post-processes\n if (this.activeCameras && this.activeCameras.length > 0) {\n for (const camera of this.activeCameras) {\n if (!camera.isReady(true)) {\n isReady = false;\n }\n }\n }\n else if (this.activeCamera) {\n if (!this.activeCamera.isReady(true)) {\n isReady = false;\n }\n }\n // Particles\n for (const particleSystem of this.particleSystems) {\n if (!particleSystem.isReady()) {\n isReady = false;\n }\n }\n // Layers\n if (this.layers) {\n for (const layer of this.layers) {\n if (!layer.isReady()) {\n isReady = false;\n }\n }\n }\n // Effects\n if (!engine.areAllEffectsReady()) {\n isReady = false;\n }\n engine.currentRenderPassId = currentRenderPassId;\n return isReady;\n }\n /** Resets all cached information relative to material (including effect and visibility) */\n resetCachedMaterial() {\n this._cachedMaterial = null;\n this._cachedEffect = null;\n this._cachedVisibility = null;\n }\n /**\n * Registers a function to be called before every frame render\n * @param func defines the function to register\n */\n registerBeforeRender(func) {\n this.onBeforeRenderObservable.add(func);\n }\n /**\n * Unregisters a function called before every frame render\n * @param func defines the function to unregister\n */\n unregisterBeforeRender(func) {\n this.onBeforeRenderObservable.removeCallback(func);\n }\n /**\n * Registers a function to be called after every frame render\n * @param func defines the function to register\n */\n registerAfterRender(func) {\n this.onAfterRenderObservable.add(func);\n }\n /**\n * Unregisters a function called after every frame render\n * @param func defines the function to unregister\n */\n unregisterAfterRender(func) {\n this.onAfterRenderObservable.removeCallback(func);\n }\n _executeOnceBeforeRender(func) {\n const execFunc = () => {\n func();\n setTimeout(() => {\n this.unregisterBeforeRender(execFunc);\n });\n };\n this.registerBeforeRender(execFunc);\n }\n /**\n * The provided function will run before render once and will be disposed afterwards.\n * A timeout delay can be provided so that the function will be executed in N ms.\n * The timeout is using the browser's native setTimeout so time percision cannot be guaranteed.\n * @param func The function to be executed.\n * @param timeout optional delay in ms\n */\n executeOnceBeforeRender(func, timeout) {\n if (timeout !== undefined) {\n setTimeout(() => {\n this._executeOnceBeforeRender(func);\n }, timeout);\n }\n else {\n this._executeOnceBeforeRender(func);\n }\n }\n /**\n * This function can help adding any object to the list of data awaited to be ready in order to check for a complete scene loading.\n * @param data defines the object to wait for\n */\n addPendingData(data) {\n this._pendingData.push(data);\n }\n /**\n * Remove a pending data from the loading list which has previously been added with addPendingData.\n * @param data defines the object to remove from the pending list\n */\n removePendingData(data) {\n const wasLoading = this.isLoading;\n const index = this._pendingData.indexOf(data);\n if (index !== -1) {\n this._pendingData.splice(index, 1);\n }\n if (wasLoading && !this.isLoading) {\n this.onDataLoadedObservable.notifyObservers(this);\n }\n }\n /**\n * Returns the number of items waiting to be loaded\n * @returns the number of items waiting to be loaded\n */\n getWaitingItemsCount() {\n return this._pendingData.length;\n }\n /**\n * Returns a boolean indicating if the scene is still loading data\n */\n get isLoading() {\n return this._pendingData.length > 0;\n }\n /**\n * Registers a function to be executed when the scene is ready\n * @param func - the function to be executed\n * @param checkRenderTargets true to also check that the meshes rendered as part of a render target are ready (default: false)\n */\n executeWhenReady(func, checkRenderTargets = false) {\n this.onReadyObservable.addOnce(func);\n if (this._executeWhenReadyTimeoutId !== null) {\n return;\n }\n this._checkIsReady(checkRenderTargets);\n }\n /**\n * Returns a promise that resolves when the scene is ready\n * @param checkRenderTargets true to also check that the meshes rendered as part of a render target are ready (default: false)\n * @returns A promise that resolves when the scene is ready\n */\n whenReadyAsync(checkRenderTargets = false) {\n return new Promise((resolve) => {\n this.executeWhenReady(() => {\n resolve();\n }, checkRenderTargets);\n });\n }\n /**\n * @internal\n */\n _checkIsReady(checkRenderTargets = false) {\n this._registerTransientComponents();\n if (this.isReady(checkRenderTargets)) {\n this.onReadyObservable.notifyObservers(this);\n this.onReadyObservable.clear();\n this._executeWhenReadyTimeoutId = null;\n return;\n }\n if (this._isDisposed) {\n this.onReadyObservable.clear();\n this._executeWhenReadyTimeoutId = null;\n return;\n }\n this._executeWhenReadyTimeoutId = setTimeout(() => {\n // Ensure materials effects are checked outside render loops\n this.incrementRenderId();\n this._checkIsReady(checkRenderTargets);\n }, 100);\n }\n /**\n * Gets all animatable attached to the scene\n */\n get animatables() {\n return this._activeAnimatables;\n }\n /**\n * Resets the last animation time frame.\n * Useful to override when animations start running when loading a scene for the first time.\n */\n resetLastAnimationTimeFrame() {\n this._animationTimeLast = PrecisionDate.Now;\n }\n // Matrix\n /**\n * Gets the current view matrix\n * @returns a Matrix\n */\n getViewMatrix() {\n return this._viewMatrix;\n }\n /**\n * Gets the current projection matrix\n * @returns a Matrix\n */\n getProjectionMatrix() {\n return this._projectionMatrix;\n }\n /**\n * Gets the current transform matrix\n * @returns a Matrix made of View * Projection\n */\n getTransformMatrix() {\n return this._transformMatrix;\n }\n /**\n * Sets the current transform matrix\n * @param viewL defines the View matrix to use\n * @param projectionL defines the Projection matrix to use\n * @param viewR defines the right View matrix to use (if provided)\n * @param projectionR defines the right Projection matrix to use (if provided)\n */\n setTransformMatrix(viewL, projectionL, viewR, projectionR) {\n // clear the multiviewSceneUbo if no viewR and projectionR are defined\n if (!viewR && !projectionR && this._multiviewSceneUbo) {\n this._multiviewSceneUbo.dispose();\n this._multiviewSceneUbo = null;\n }\n if (this._viewUpdateFlag === viewL.updateFlag && this._projectionUpdateFlag === projectionL.updateFlag) {\n return;\n }\n this._viewUpdateFlag = viewL.updateFlag;\n this._projectionUpdateFlag = projectionL.updateFlag;\n this._viewMatrix = viewL;\n this._projectionMatrix = projectionL;\n this._viewMatrix.multiplyToRef(this._projectionMatrix, this._transformMatrix);\n // Update frustum\n if (!this._frustumPlanes) {\n this._frustumPlanes = Frustum.GetPlanes(this._transformMatrix);\n }\n else {\n Frustum.GetPlanesToRef(this._transformMatrix, this._frustumPlanes);\n }\n if (this._multiviewSceneUbo && this._multiviewSceneUbo.useUbo) {\n this._updateMultiviewUbo(viewR, projectionR);\n }\n else if (this._sceneUbo.useUbo) {\n this._sceneUbo.updateMatrix(\"viewProjection\", this._transformMatrix);\n this._sceneUbo.updateMatrix(\"view\", this._viewMatrix);\n this._sceneUbo.updateMatrix(\"projection\", this._projectionMatrix);\n }\n }\n /**\n * Gets the uniform buffer used to store scene data\n * @returns a UniformBuffer\n */\n getSceneUniformBuffer() {\n return this._multiviewSceneUbo ? this._multiviewSceneUbo : this._sceneUbo;\n }\n /**\n * Creates a scene UBO\n * @param name name of the uniform buffer (optional, for debugging purpose only)\n * @returns a new ubo\n */\n createSceneUniformBuffer(name) {\n const sceneUbo = new UniformBuffer(this._engine, undefined, false, name !== null && name !== void 0 ? name : \"scene\");\n sceneUbo.addUniform(\"viewProjection\", 16);\n sceneUbo.addUniform(\"view\", 16);\n sceneUbo.addUniform(\"projection\", 16);\n sceneUbo.addUniform(\"vEyePosition\", 4);\n return sceneUbo;\n }\n /**\n * Sets the scene ubo\n * @param ubo the ubo to set for the scene\n */\n setSceneUniformBuffer(ubo) {\n this._sceneUbo = ubo;\n this._viewUpdateFlag = -1;\n this._projectionUpdateFlag = -1;\n }\n /**\n * Gets an unique (relatively to the current scene) Id\n * @returns an unique number for the scene\n */\n getUniqueId() {\n return UniqueIdGenerator.UniqueId;\n }\n /**\n * Add a mesh to the list of scene's meshes\n * @param newMesh defines the mesh to add\n * @param recursive if all child meshes should also be added to the scene\n */\n addMesh(newMesh, recursive = false) {\n if (this._blockEntityCollection) {\n return;\n }\n this.meshes.push(newMesh);\n newMesh._resyncLightSources();\n if (!newMesh.parent) {\n newMesh._addToSceneRootNodes();\n }\n this.onNewMeshAddedObservable.notifyObservers(newMesh);\n if (recursive) {\n newMesh.getChildMeshes().forEach((m) => {\n this.addMesh(m);\n });\n }\n }\n /**\n * Remove a mesh for the list of scene's meshes\n * @param toRemove defines the mesh to remove\n * @param recursive if all child meshes should also be removed from the scene\n * @returns the index where the mesh was in the mesh list\n */\n removeMesh(toRemove, recursive = false) {\n const index = this.meshes.indexOf(toRemove);\n if (index !== -1) {\n // Remove from the scene if mesh found\n this.meshes[index] = this.meshes[this.meshes.length - 1];\n this.meshes.pop();\n if (!toRemove.parent) {\n toRemove._removeFromSceneRootNodes();\n }\n }\n this._inputManager._invalidateMesh(toRemove);\n this.onMeshRemovedObservable.notifyObservers(toRemove);\n if (recursive) {\n toRemove.getChildMeshes().forEach((m) => {\n this.removeMesh(m);\n });\n }\n return index;\n }\n /**\n * Add a transform node to the list of scene's transform nodes\n * @param newTransformNode defines the transform node to add\n */\n addTransformNode(newTransformNode) {\n if (this._blockEntityCollection) {\n return;\n }\n if (newTransformNode.getScene() === this && newTransformNode._indexInSceneTransformNodesArray !== -1) {\n // Already there?\n return;\n }\n newTransformNode._indexInSceneTransformNodesArray = this.transformNodes.length;\n this.transformNodes.push(newTransformNode);\n if (!newTransformNode.parent) {\n newTransformNode._addToSceneRootNodes();\n }\n this.onNewTransformNodeAddedObservable.notifyObservers(newTransformNode);\n }\n /**\n * Remove a transform node for the list of scene's transform nodes\n * @param toRemove defines the transform node to remove\n * @returns the index where the transform node was in the transform node list\n */\n removeTransformNode(toRemove) {\n const index = toRemove._indexInSceneTransformNodesArray;\n if (index !== -1) {\n if (index !== this.transformNodes.length - 1) {\n const lastNode = this.transformNodes[this.transformNodes.length - 1];\n this.transformNodes[index] = lastNode;\n lastNode._indexInSceneTransformNodesArray = index;\n }\n toRemove._indexInSceneTransformNodesArray = -1;\n this.transformNodes.pop();\n if (!toRemove.parent) {\n toRemove._removeFromSceneRootNodes();\n }\n }\n this.onTransformNodeRemovedObservable.notifyObservers(toRemove);\n return index;\n }\n /**\n * Remove a skeleton for the list of scene's skeletons\n * @param toRemove defines the skeleton to remove\n * @returns the index where the skeleton was in the skeleton list\n */\n removeSkeleton(toRemove) {\n const index = this.skeletons.indexOf(toRemove);\n if (index !== -1) {\n // Remove from the scene if found\n this.skeletons.splice(index, 1);\n this.onSkeletonRemovedObservable.notifyObservers(toRemove);\n // Clean active container\n this._executeActiveContainerCleanup(this._activeSkeletons);\n }\n return index;\n }\n /**\n * Remove a morph target for the list of scene's morph targets\n * @param toRemove defines the morph target to remove\n * @returns the index where the morph target was in the morph target list\n */\n removeMorphTargetManager(toRemove) {\n const index = this.morphTargetManagers.indexOf(toRemove);\n if (index !== -1) {\n // Remove from the scene if found\n this.morphTargetManagers.splice(index, 1);\n }\n return index;\n }\n /**\n * Remove a light for the list of scene's lights\n * @param toRemove defines the light to remove\n * @returns the index where the light was in the light list\n */\n removeLight(toRemove) {\n const index = this.lights.indexOf(toRemove);\n if (index !== -1) {\n // Remove from meshes\n for (const mesh of this.meshes) {\n mesh._removeLightSource(toRemove, false);\n }\n // Remove from the scene if mesh found\n this.lights.splice(index, 1);\n this.sortLightsByPriority();\n if (!toRemove.parent) {\n toRemove._removeFromSceneRootNodes();\n }\n }\n this.onLightRemovedObservable.notifyObservers(toRemove);\n return index;\n }\n /**\n * Remove a camera for the list of scene's cameras\n * @param toRemove defines the camera to remove\n * @returns the index where the camera was in the camera list\n */\n removeCamera(toRemove) {\n const index = this.cameras.indexOf(toRemove);\n if (index !== -1) {\n // Remove from the scene if mesh found\n this.cameras.splice(index, 1);\n if (!toRemove.parent) {\n toRemove._removeFromSceneRootNodes();\n }\n }\n // Remove from activeCameras\n if (this.activeCameras) {\n const index2 = this.activeCameras.indexOf(toRemove);\n if (index2 !== -1) {\n // Remove from the scene if mesh found\n this.activeCameras.splice(index2, 1);\n }\n }\n // Reset the activeCamera\n if (this.activeCamera === toRemove) {\n if (this.cameras.length > 0) {\n this.activeCamera = this.cameras[0];\n }\n else {\n this.activeCamera = null;\n }\n }\n this.onCameraRemovedObservable.notifyObservers(toRemove);\n return index;\n }\n /**\n * Remove a particle system for the list of scene's particle systems\n * @param toRemove defines the particle system to remove\n * @returns the index where the particle system was in the particle system list\n */\n removeParticleSystem(toRemove) {\n const index = this.particleSystems.indexOf(toRemove);\n if (index !== -1) {\n this.particleSystems.splice(index, 1);\n // Clean active container\n this._executeActiveContainerCleanup(this._activeParticleSystems);\n }\n return index;\n }\n /**\n * Remove a animation for the list of scene's animations\n * @param toRemove defines the animation to remove\n * @returns the index where the animation was in the animation list\n */\n removeAnimation(toRemove) {\n const index = this.animations.indexOf(toRemove);\n if (index !== -1) {\n this.animations.splice(index, 1);\n }\n return index;\n }\n /**\n * Will stop the animation of the given target\n * @param target - the target\n * @param animationName - the name of the animation to stop (all animations will be stopped if both this and targetMask are empty)\n * @param targetMask - a function that determines if the animation should be stopped based on its target (all animations will be stopped if both this and animationName are empty)\n */\n stopAnimation(target, animationName, targetMask) {\n // Do nothing as code will be provided by animation component\n }\n /**\n * Removes the given animation group from this scene.\n * @param toRemove The animation group to remove\n * @returns The index of the removed animation group\n */\n removeAnimationGroup(toRemove) {\n const index = this.animationGroups.indexOf(toRemove);\n if (index !== -1) {\n this.animationGroups.splice(index, 1);\n }\n return index;\n }\n /**\n * Removes the given multi-material from this scene.\n * @param toRemove The multi-material to remove\n * @returns The index of the removed multi-material\n */\n removeMultiMaterial(toRemove) {\n const index = this.multiMaterials.indexOf(toRemove);\n if (index !== -1) {\n this.multiMaterials.splice(index, 1);\n }\n this.onMultiMaterialRemovedObservable.notifyObservers(toRemove);\n return index;\n }\n /**\n * Removes the given material from this scene.\n * @param toRemove The material to remove\n * @returns The index of the removed material\n */\n removeMaterial(toRemove) {\n const index = toRemove._indexInSceneMaterialArray;\n if (index !== -1 && index < this.materials.length) {\n if (index !== this.materials.length - 1) {\n const lastMaterial = this.materials[this.materials.length - 1];\n this.materials[index] = lastMaterial;\n lastMaterial._indexInSceneMaterialArray = index;\n }\n toRemove._indexInSceneMaterialArray = -1;\n this.materials.pop();\n }\n this.onMaterialRemovedObservable.notifyObservers(toRemove);\n return index;\n }\n /**\n * Removes the given action manager from this scene.\n * @deprecated\n * @param toRemove The action manager to remove\n * @returns The index of the removed action manager\n */\n removeActionManager(toRemove) {\n const index = this.actionManagers.indexOf(toRemove);\n if (index !== -1) {\n this.actionManagers.splice(index, 1);\n }\n return index;\n }\n /**\n * Removes the given texture from this scene.\n * @param toRemove The texture to remove\n * @returns The index of the removed texture\n */\n removeTexture(toRemove) {\n const index = this.textures.indexOf(toRemove);\n if (index !== -1) {\n this.textures.splice(index, 1);\n }\n this.onTextureRemovedObservable.notifyObservers(toRemove);\n return index;\n }\n /**\n * Adds the given light to this scene\n * @param newLight The light to add\n */\n addLight(newLight) {\n if (this._blockEntityCollection) {\n return;\n }\n this.lights.push(newLight);\n this.sortLightsByPriority();\n if (!newLight.parent) {\n newLight._addToSceneRootNodes();\n }\n // Add light to all meshes (To support if the light is removed and then re-added)\n for (const mesh of this.meshes) {\n if (mesh.lightSources.indexOf(newLight) === -1) {\n mesh.lightSources.push(newLight);\n mesh._resyncLightSources();\n }\n }\n this.onNewLightAddedObservable.notifyObservers(newLight);\n }\n /**\n * Sorts the list list based on light priorities\n */\n sortLightsByPriority() {\n if (this.requireLightSorting) {\n this.lights.sort(LightConstants.CompareLightsPriority);\n }\n }\n /**\n * Adds the given camera to this scene\n * @param newCamera The camera to add\n */\n addCamera(newCamera) {\n if (this._blockEntityCollection) {\n return;\n }\n this.cameras.push(newCamera);\n this.onNewCameraAddedObservable.notifyObservers(newCamera);\n if (!newCamera.parent) {\n newCamera._addToSceneRootNodes();\n }\n }\n /**\n * Adds the given skeleton to this scene\n * @param newSkeleton The skeleton to add\n */\n addSkeleton(newSkeleton) {\n if (this._blockEntityCollection) {\n return;\n }\n this.skeletons.push(newSkeleton);\n this.onNewSkeletonAddedObservable.notifyObservers(newSkeleton);\n }\n /**\n * Adds the given particle system to this scene\n * @param newParticleSystem The particle system to add\n */\n addParticleSystem(newParticleSystem) {\n if (this._blockEntityCollection) {\n return;\n }\n this.particleSystems.push(newParticleSystem);\n }\n /**\n * Adds the given animation to this scene\n * @param newAnimation The animation to add\n */\n addAnimation(newAnimation) {\n if (this._blockEntityCollection) {\n return;\n }\n this.animations.push(newAnimation);\n }\n /**\n * Adds the given animation group to this scene.\n * @param newAnimationGroup The animation group to add\n */\n addAnimationGroup(newAnimationGroup) {\n if (this._blockEntityCollection) {\n return;\n }\n this.animationGroups.push(newAnimationGroup);\n }\n /**\n * Adds the given multi-material to this scene\n * @param newMultiMaterial The multi-material to add\n */\n addMultiMaterial(newMultiMaterial) {\n if (this._blockEntityCollection) {\n return;\n }\n this.multiMaterials.push(newMultiMaterial);\n this.onNewMultiMaterialAddedObservable.notifyObservers(newMultiMaterial);\n }\n /**\n * Adds the given material to this scene\n * @param newMaterial The material to add\n */\n addMaterial(newMaterial) {\n if (this._blockEntityCollection) {\n return;\n }\n if (newMaterial.getScene() === this && newMaterial._indexInSceneMaterialArray !== -1) {\n // Already there??\n return;\n }\n newMaterial._indexInSceneMaterialArray = this.materials.length;\n this.materials.push(newMaterial);\n this.onNewMaterialAddedObservable.notifyObservers(newMaterial);\n }\n /**\n * Adds the given morph target to this scene\n * @param newMorphTargetManager The morph target to add\n */\n addMorphTargetManager(newMorphTargetManager) {\n if (this._blockEntityCollection) {\n return;\n }\n this.morphTargetManagers.push(newMorphTargetManager);\n }\n /**\n * Adds the given geometry to this scene\n * @param newGeometry The geometry to add\n */\n addGeometry(newGeometry) {\n if (this._blockEntityCollection) {\n return;\n }\n if (this._geometriesByUniqueId) {\n this._geometriesByUniqueId[newGeometry.uniqueId] = this.geometries.length;\n }\n this.geometries.push(newGeometry);\n }\n /**\n * Adds the given action manager to this scene\n * @deprecated\n * @param newActionManager The action manager to add\n */\n addActionManager(newActionManager) {\n this.actionManagers.push(newActionManager);\n }\n /**\n * Adds the given texture to this scene.\n * @param newTexture The texture to add\n */\n addTexture(newTexture) {\n if (this._blockEntityCollection) {\n return;\n }\n this.textures.push(newTexture);\n this.onNewTextureAddedObservable.notifyObservers(newTexture);\n }\n /**\n * Switch active camera\n * @param newCamera defines the new active camera\n * @param attachControl defines if attachControl must be called for the new active camera (default: true)\n */\n switchActiveCamera(newCamera, attachControl = true) {\n const canvas = this._engine.getInputElement();\n if (!canvas) {\n return;\n }\n if (this.activeCamera) {\n this.activeCamera.detachControl();\n }\n this.activeCamera = newCamera;\n if (attachControl) {\n newCamera.attachControl();\n }\n }\n /**\n * sets the active camera of the scene using its Id\n * @param id defines the camera's Id\n * @returns the new active camera or null if none found.\n */\n setActiveCameraById(id) {\n const camera = this.getCameraById(id);\n if (camera) {\n this.activeCamera = camera;\n return camera;\n }\n return null;\n }\n /**\n * sets the active camera of the scene using its name\n * @param name defines the camera's name\n * @returns the new active camera or null if none found.\n */\n setActiveCameraByName(name) {\n const camera = this.getCameraByName(name);\n if (camera) {\n this.activeCamera = camera;\n return camera;\n }\n return null;\n }\n /**\n * get an animation group using its name\n * @param name defines the material's name\n * @returns the animation group or null if none found.\n */\n getAnimationGroupByName(name) {\n for (let index = 0; index < this.animationGroups.length; index++) {\n if (this.animationGroups[index].name === name) {\n return this.animationGroups[index];\n }\n }\n return null;\n }\n _getMaterial(allowMultiMaterials, predicate) {\n for (let index = 0; index < this.materials.length; index++) {\n const material = this.materials[index];\n if (predicate(material)) {\n return material;\n }\n }\n if (allowMultiMaterials) {\n for (let index = 0; index < this.multiMaterials.length; index++) {\n const material = this.multiMaterials[index];\n if (predicate(material)) {\n return material;\n }\n }\n }\n return null;\n }\n /**\n * Get a material using its unique id\n * @param uniqueId defines the material's unique id\n * @param allowMultiMaterials determines whether multimaterials should be considered\n * @returns the material or null if none found.\n */\n getMaterialByUniqueID(uniqueId, allowMultiMaterials = false) {\n return this._getMaterial(allowMultiMaterials, (m) => m.uniqueId === uniqueId);\n }\n /**\n * get a material using its id\n * @param id defines the material's Id\n * @param allowMultiMaterials determines whether multimaterials should be considered\n * @returns the material or null if none found.\n */\n getMaterialById(id, allowMultiMaterials = false) {\n return this._getMaterial(allowMultiMaterials, (m) => m.id === id);\n }\n /**\n * Gets a material using its name\n * @param name defines the material's name\n * @param allowMultiMaterials determines whether multimaterials should be considered\n * @returns the material or null if none found.\n */\n getMaterialByName(name, allowMultiMaterials = false) {\n return this._getMaterial(allowMultiMaterials, (m) => m.name === name);\n }\n /**\n * Gets a last added material using a given id\n * @param id defines the material's id\n * @param allowMultiMaterials determines whether multimaterials should be considered\n * @returns the last material with the given id or null if none found.\n */\n getLastMaterialById(id, allowMultiMaterials = false) {\n for (let index = this.materials.length - 1; index >= 0; index--) {\n if (this.materials[index].id === id) {\n return this.materials[index];\n }\n }\n if (allowMultiMaterials) {\n for (let index = this.multiMaterials.length - 1; index >= 0; index--) {\n if (this.multiMaterials[index].id === id) {\n return this.multiMaterials[index];\n }\n }\n }\n return null;\n }\n /**\n * Get a texture using its unique id\n * @param uniqueId defines the texture's unique id\n * @returns the texture or null if none found.\n */\n getTextureByUniqueId(uniqueId) {\n for (let index = 0; index < this.textures.length; index++) {\n if (this.textures[index].uniqueId === uniqueId) {\n return this.textures[index];\n }\n }\n return null;\n }\n /**\n * Gets a texture using its name\n * @param name defines the texture's name\n * @returns the texture or null if none found.\n */\n getTextureByName(name) {\n for (let index = 0; index < this.textures.length; index++) {\n if (this.textures[index].name === name) {\n return this.textures[index];\n }\n }\n return null;\n }\n /**\n * Gets a camera using its Id\n * @param id defines the Id to look for\n * @returns the camera or null if not found\n */\n getCameraById(id) {\n for (let index = 0; index < this.cameras.length; index++) {\n if (this.cameras[index].id === id) {\n return this.cameras[index];\n }\n }\n return null;\n }\n /**\n * Gets a camera using its unique Id\n * @param uniqueId defines the unique Id to look for\n * @returns the camera or null if not found\n */\n getCameraByUniqueId(uniqueId) {\n for (let index = 0; index < this.cameras.length; index++) {\n if (this.cameras[index].uniqueId === uniqueId) {\n return this.cameras[index];\n }\n }\n return null;\n }\n /**\n * Gets a camera using its name\n * @param name defines the camera's name\n * @returns the camera or null if none found.\n */\n getCameraByName(name) {\n for (let index = 0; index < this.cameras.length; index++) {\n if (this.cameras[index].name === name) {\n return this.cameras[index];\n }\n }\n return null;\n }\n /**\n * Gets a bone using its Id\n * @param id defines the bone's Id\n * @returns the bone or null if not found\n */\n getBoneById(id) {\n for (let skeletonIndex = 0; skeletonIndex < this.skeletons.length; skeletonIndex++) {\n const skeleton = this.skeletons[skeletonIndex];\n for (let boneIndex = 0; boneIndex < skeleton.bones.length; boneIndex++) {\n if (skeleton.bones[boneIndex].id === id) {\n return skeleton.bones[boneIndex];\n }\n }\n }\n return null;\n }\n /**\n * Gets a bone using its id\n * @param name defines the bone's name\n * @returns the bone or null if not found\n */\n getBoneByName(name) {\n for (let skeletonIndex = 0; skeletonIndex < this.skeletons.length; skeletonIndex++) {\n const skeleton = this.skeletons[skeletonIndex];\n for (let boneIndex = 0; boneIndex < skeleton.bones.length; boneIndex++) {\n if (skeleton.bones[boneIndex].name === name) {\n return skeleton.bones[boneIndex];\n }\n }\n }\n return null;\n }\n /**\n * Gets a light node using its name\n * @param name defines the light's name\n * @returns the light or null if none found.\n */\n getLightByName(name) {\n for (let index = 0; index < this.lights.length; index++) {\n if (this.lights[index].name === name) {\n return this.lights[index];\n }\n }\n return null;\n }\n /**\n * Gets a light node using its Id\n * @param id defines the light's Id\n * @returns the light or null if none found.\n */\n getLightById(id) {\n for (let index = 0; index < this.lights.length; index++) {\n if (this.lights[index].id === id) {\n return this.lights[index];\n }\n }\n return null;\n }\n /**\n * Gets a light node using its scene-generated unique Id\n * @param uniqueId defines the light's unique Id\n * @returns the light or null if none found.\n */\n getLightByUniqueId(uniqueId) {\n for (let index = 0; index < this.lights.length; index++) {\n if (this.lights[index].uniqueId === uniqueId) {\n return this.lights[index];\n }\n }\n return null;\n }\n /**\n * Gets a particle system by Id\n * @param id defines the particle system Id\n * @returns the corresponding system or null if none found\n */\n getParticleSystemById(id) {\n for (let index = 0; index < this.particleSystems.length; index++) {\n if (this.particleSystems[index].id === id) {\n return this.particleSystems[index];\n }\n }\n return null;\n }\n /**\n * Gets a geometry using its Id\n * @param id defines the geometry's Id\n * @returns the geometry or null if none found.\n */\n getGeometryById(id) {\n for (let index = 0; index < this.geometries.length; index++) {\n if (this.geometries[index].id === id) {\n return this.geometries[index];\n }\n }\n return null;\n }\n _getGeometryByUniqueId(uniqueId) {\n if (this._geometriesByUniqueId) {\n const index = this._geometriesByUniqueId[uniqueId];\n if (index !== undefined) {\n return this.geometries[index];\n }\n }\n else {\n for (let index = 0; index < this.geometries.length; index++) {\n if (this.geometries[index].uniqueId === uniqueId) {\n return this.geometries[index];\n }\n }\n }\n return null;\n }\n /**\n * Add a new geometry to this scene\n * @param geometry defines the geometry to be added to the scene.\n * @param force defines if the geometry must be pushed even if a geometry with this id already exists\n * @returns a boolean defining if the geometry was added or not\n */\n pushGeometry(geometry, force) {\n if (!force && this._getGeometryByUniqueId(geometry.uniqueId)) {\n return false;\n }\n this.addGeometry(geometry);\n this.onNewGeometryAddedObservable.notifyObservers(geometry);\n return true;\n }\n /**\n * Removes an existing geometry\n * @param geometry defines the geometry to be removed from the scene\n * @returns a boolean defining if the geometry was removed or not\n */\n removeGeometry(geometry) {\n let index;\n if (this._geometriesByUniqueId) {\n index = this._geometriesByUniqueId[geometry.uniqueId];\n if (index === undefined) {\n return false;\n }\n }\n else {\n index = this.geometries.indexOf(geometry);\n if (index < 0) {\n return false;\n }\n }\n if (index !== this.geometries.length - 1) {\n const lastGeometry = this.geometries[this.geometries.length - 1];\n if (lastGeometry) {\n this.geometries[index] = lastGeometry;\n if (this._geometriesByUniqueId) {\n this._geometriesByUniqueId[lastGeometry.uniqueId] = index;\n }\n }\n }\n if (this._geometriesByUniqueId) {\n this._geometriesByUniqueId[geometry.uniqueId] = undefined;\n }\n this.geometries.pop();\n this.onGeometryRemovedObservable.notifyObservers(geometry);\n return true;\n }\n /**\n * Gets the list of geometries attached to the scene\n * @returns an array of Geometry\n */\n getGeometries() {\n return this.geometries;\n }\n /**\n * Gets the first added mesh found of a given Id\n * @param id defines the Id to search for\n * @returns the mesh found or null if not found at all\n */\n getMeshById(id) {\n for (let index = 0; index < this.meshes.length; index++) {\n if (this.meshes[index].id === id) {\n return this.meshes[index];\n }\n }\n return null;\n }\n /**\n * Gets a list of meshes using their Id\n * @param id defines the Id to search for\n * @returns a list of meshes\n */\n getMeshesById(id) {\n return this.meshes.filter(function (m) {\n return m.id === id;\n });\n }\n /**\n * Gets the first added transform node found of a given Id\n * @param id defines the Id to search for\n * @returns the found transform node or null if not found at all.\n */\n getTransformNodeById(id) {\n for (let index = 0; index < this.transformNodes.length; index++) {\n if (this.transformNodes[index].id === id) {\n return this.transformNodes[index];\n }\n }\n return null;\n }\n /**\n * Gets a transform node with its auto-generated unique Id\n * @param uniqueId defines the unique Id to search for\n * @returns the found transform node or null if not found at all.\n */\n getTransformNodeByUniqueId(uniqueId) {\n for (let index = 0; index < this.transformNodes.length; index++) {\n if (this.transformNodes[index].uniqueId === uniqueId) {\n return this.transformNodes[index];\n }\n }\n return null;\n }\n /**\n * Gets a list of transform nodes using their Id\n * @param id defines the Id to search for\n * @returns a list of transform nodes\n */\n getTransformNodesById(id) {\n return this.transformNodes.filter(function (m) {\n return m.id === id;\n });\n }\n /**\n * Gets a mesh with its auto-generated unique Id\n * @param uniqueId defines the unique Id to search for\n * @returns the found mesh or null if not found at all.\n */\n getMeshByUniqueId(uniqueId) {\n for (let index = 0; index < this.meshes.length; index++) {\n if (this.meshes[index].uniqueId === uniqueId) {\n return this.meshes[index];\n }\n }\n return null;\n }\n /**\n * Gets a the last added mesh using a given Id\n * @param id defines the Id to search for\n * @returns the found mesh or null if not found at all.\n */\n getLastMeshById(id) {\n for (let index = this.meshes.length - 1; index >= 0; index--) {\n if (this.meshes[index].id === id) {\n return this.meshes[index];\n }\n }\n return null;\n }\n /**\n * Gets a the last transform node using a given Id\n * @param id defines the Id to search for\n * @returns the found mesh or null if not found at all.\n */\n getLastTransformNodeById(id) {\n for (let index = this.transformNodes.length - 1; index >= 0; index--) {\n if (this.transformNodes[index].id === id) {\n return this.transformNodes[index];\n }\n }\n return null;\n }\n /**\n * Gets a the last added node (Mesh, Camera, Light) using a given Id\n * @param id defines the Id to search for\n * @returns the found node or null if not found at all\n */\n getLastEntryById(id) {\n let index;\n for (index = this.meshes.length - 1; index >= 0; index--) {\n if (this.meshes[index].id === id) {\n return this.meshes[index];\n }\n }\n for (index = this.transformNodes.length - 1; index >= 0; index--) {\n if (this.transformNodes[index].id === id) {\n return this.transformNodes[index];\n }\n }\n for (index = this.cameras.length - 1; index >= 0; index--) {\n if (this.cameras[index].id === id) {\n return this.cameras[index];\n }\n }\n for (index = this.lights.length - 1; index >= 0; index--) {\n if (this.lights[index].id === id) {\n return this.lights[index];\n }\n }\n return null;\n }\n /**\n * Gets a node (Mesh, Camera, Light) using a given Id\n * @param id defines the Id to search for\n * @returns the found node or null if not found at all\n */\n getNodeById(id) {\n const mesh = this.getMeshById(id);\n if (mesh) {\n return mesh;\n }\n const transformNode = this.getTransformNodeById(id);\n if (transformNode) {\n return transformNode;\n }\n const light = this.getLightById(id);\n if (light) {\n return light;\n }\n const camera = this.getCameraById(id);\n if (camera) {\n return camera;\n }\n const bone = this.getBoneById(id);\n if (bone) {\n return bone;\n }\n return null;\n }\n /**\n * Gets a node (Mesh, Camera, Light) using a given name\n * @param name defines the name to search for\n * @returns the found node or null if not found at all.\n */\n getNodeByName(name) {\n const mesh = this.getMeshByName(name);\n if (mesh) {\n return mesh;\n }\n const transformNode = this.getTransformNodeByName(name);\n if (transformNode) {\n return transformNode;\n }\n const light = this.getLightByName(name);\n if (light) {\n return light;\n }\n const camera = this.getCameraByName(name);\n if (camera) {\n return camera;\n }\n const bone = this.getBoneByName(name);\n if (bone) {\n return bone;\n }\n return null;\n }\n /**\n * Gets a mesh using a given name\n * @param name defines the name to search for\n * @returns the found mesh or null if not found at all.\n */\n getMeshByName(name) {\n for (let index = 0; index < this.meshes.length; index++) {\n if (this.meshes[index].name === name) {\n return this.meshes[index];\n }\n }\n return null;\n }\n /**\n * Gets a transform node using a given name\n * @param name defines the name to search for\n * @returns the found transform node or null if not found at all.\n */\n getTransformNodeByName(name) {\n for (let index = 0; index < this.transformNodes.length; index++) {\n if (this.transformNodes[index].name === name) {\n return this.transformNodes[index];\n }\n }\n return null;\n }\n /**\n * Gets a skeleton using a given Id (if many are found, this function will pick the last one)\n * @param id defines the Id to search for\n * @returns the found skeleton or null if not found at all.\n */\n getLastSkeletonById(id) {\n for (let index = this.skeletons.length - 1; index >= 0; index--) {\n if (this.skeletons[index].id === id) {\n return this.skeletons[index];\n }\n }\n return null;\n }\n /**\n * Gets a skeleton using a given auto generated unique id\n * @param uniqueId defines the unique id to search for\n * @returns the found skeleton or null if not found at all.\n */\n getSkeletonByUniqueId(uniqueId) {\n for (let index = 0; index < this.skeletons.length; index++) {\n if (this.skeletons[index].uniqueId === uniqueId) {\n return this.skeletons[index];\n }\n }\n return null;\n }\n /**\n * Gets a skeleton using a given id (if many are found, this function will pick the first one)\n * @param id defines the id to search for\n * @returns the found skeleton or null if not found at all.\n */\n getSkeletonById(id) {\n for (let index = 0; index < this.skeletons.length; index++) {\n if (this.skeletons[index].id === id) {\n return this.skeletons[index];\n }\n }\n return null;\n }\n /**\n * Gets a skeleton using a given name\n * @param name defines the name to search for\n * @returns the found skeleton or null if not found at all.\n */\n getSkeletonByName(name) {\n for (let index = 0; index < this.skeletons.length; index++) {\n if (this.skeletons[index].name === name) {\n return this.skeletons[index];\n }\n }\n return null;\n }\n /**\n * Gets a morph target manager using a given id (if many are found, this function will pick the last one)\n * @param id defines the id to search for\n * @returns the found morph target manager or null if not found at all.\n */\n getMorphTargetManagerById(id) {\n for (let index = 0; index < this.morphTargetManagers.length; index++) {\n if (this.morphTargetManagers[index].uniqueId === id) {\n return this.morphTargetManagers[index];\n }\n }\n return null;\n }\n /**\n * Gets a morph target using a given id (if many are found, this function will pick the first one)\n * @param id defines the id to search for\n * @returns the found morph target or null if not found at all.\n */\n getMorphTargetById(id) {\n for (let managerIndex = 0; managerIndex < this.morphTargetManagers.length; ++managerIndex) {\n const morphTargetManager = this.morphTargetManagers[managerIndex];\n for (let index = 0; index < morphTargetManager.numTargets; ++index) {\n const target = morphTargetManager.getTarget(index);\n if (target.id === id) {\n return target;\n }\n }\n }\n return null;\n }\n /**\n * Gets a morph target using a given name (if many are found, this function will pick the first one)\n * @param name defines the name to search for\n * @returns the found morph target or null if not found at all.\n */\n getMorphTargetByName(name) {\n for (let managerIndex = 0; managerIndex < this.morphTargetManagers.length; ++managerIndex) {\n const morphTargetManager = this.morphTargetManagers[managerIndex];\n for (let index = 0; index < morphTargetManager.numTargets; ++index) {\n const target = morphTargetManager.getTarget(index);\n if (target.name === name) {\n return target;\n }\n }\n }\n return null;\n }\n /**\n * Gets a post process using a given name (if many are found, this function will pick the first one)\n * @param name defines the name to search for\n * @returns the found post process or null if not found at all.\n */\n getPostProcessByName(name) {\n for (let postProcessIndex = 0; postProcessIndex < this.postProcesses.length; ++postProcessIndex) {\n const postProcess = this.postProcesses[postProcessIndex];\n if (postProcess.name === name) {\n return postProcess;\n }\n }\n return null;\n }\n /**\n * Gets a boolean indicating if the given mesh is active\n * @param mesh defines the mesh to look for\n * @returns true if the mesh is in the active list\n */\n isActiveMesh(mesh) {\n return this._activeMeshes.indexOf(mesh) !== -1;\n }\n /**\n * Return a unique id as a string which can serve as an identifier for the scene\n */\n get uid() {\n if (!this._uid) {\n this._uid = Tools.RandomId();\n }\n return this._uid;\n }\n /**\n * Add an externally attached data from its key.\n * This method call will fail and return false, if such key already exists.\n * If you don't care and just want to get the data no matter what, use the more convenient getOrAddExternalDataWithFactory() method.\n * @param key the unique key that identifies the data\n * @param data the data object to associate to the key for this Engine instance\n * @returns true if no such key were already present and the data was added successfully, false otherwise\n */\n addExternalData(key, data) {\n if (!this._externalData) {\n this._externalData = new StringDictionary();\n }\n return this._externalData.add(key, data);\n }\n /**\n * Get an externally attached data from its key\n * @param key the unique key that identifies the data\n * @returns the associated data, if present (can be null), or undefined if not present\n */\n getExternalData(key) {\n if (!this._externalData) {\n return null;\n }\n return this._externalData.get(key);\n }\n /**\n * Get an externally attached data from its key, create it using a factory if it's not already present\n * @param key the unique key that identifies the data\n * @param factory the factory that will be called to create the instance if and only if it doesn't exists\n * @returns the associated data, can be null if the factory returned null.\n */\n getOrAddExternalDataWithFactory(key, factory) {\n if (!this._externalData) {\n this._externalData = new StringDictionary();\n }\n return this._externalData.getOrAddWithFactory(key, factory);\n }\n /**\n * Remove an externally attached data from the Engine instance\n * @param key the unique key that identifies the data\n * @returns true if the data was successfully removed, false if it doesn't exist\n */\n removeExternalData(key) {\n return this._externalData.remove(key);\n }\n _evaluateSubMesh(subMesh, mesh, initialMesh, forcePush) {\n if (forcePush || subMesh.isInFrustum(this._frustumPlanes)) {\n for (const step of this._evaluateSubMeshStage) {\n step.action(mesh, subMesh);\n }\n const material = subMesh.getMaterial();\n if (material !== null && material !== undefined) {\n // Render targets\n if (material.hasRenderTargetTextures && material.getRenderTargetTextures != null) {\n if (this._processedMaterials.indexOf(material) === -1) {\n this._processedMaterials.push(material);\n this._materialsRenderTargets.concatWithNoDuplicate(material.getRenderTargetTextures());\n }\n }\n // Dispatch\n this._renderingManager.dispatch(subMesh, mesh, material);\n }\n }\n }\n /**\n * Clear the processed materials smart array preventing retention point in material dispose.\n */\n freeProcessedMaterials() {\n this._processedMaterials.dispose();\n }\n /** Gets or sets a boolean blocking all the calls to freeActiveMeshes and freeRenderingGroups\n * It can be used in order to prevent going through methods freeRenderingGroups and freeActiveMeshes several times to improve performance\n * when disposing several meshes in a row or a hierarchy of meshes.\n * When used, it is the responsibility of the user to blockfreeActiveMeshesAndRenderingGroups back to false.\n */\n get blockfreeActiveMeshesAndRenderingGroups() {\n return this._preventFreeActiveMeshesAndRenderingGroups;\n }\n set blockfreeActiveMeshesAndRenderingGroups(value) {\n if (this._preventFreeActiveMeshesAndRenderingGroups === value) {\n return;\n }\n if (value) {\n this.freeActiveMeshes();\n this.freeRenderingGroups();\n }\n this._preventFreeActiveMeshesAndRenderingGroups = value;\n }\n /**\n * Clear the active meshes smart array preventing retention point in mesh dispose.\n */\n freeActiveMeshes() {\n if (this.blockfreeActiveMeshesAndRenderingGroups) {\n return;\n }\n this._activeMeshes.dispose();\n if (this.activeCamera && this.activeCamera._activeMeshes) {\n this.activeCamera._activeMeshes.dispose();\n }\n if (this.activeCameras) {\n for (let i = 0; i < this.activeCameras.length; i++) {\n const activeCamera = this.activeCameras[i];\n if (activeCamera && activeCamera._activeMeshes) {\n activeCamera._activeMeshes.dispose();\n }\n }\n }\n }\n /**\n * Clear the info related to rendering groups preventing retention points during dispose.\n */\n freeRenderingGroups() {\n if (this.blockfreeActiveMeshesAndRenderingGroups) {\n return;\n }\n if (this._renderingManager) {\n this._renderingManager.freeRenderingGroups();\n }\n if (this.textures) {\n for (let i = 0; i < this.textures.length; i++) {\n const texture = this.textures[i];\n if (texture && texture.renderList) {\n texture.freeRenderingGroups();\n }\n }\n }\n }\n /** @internal */\n _isInIntermediateRendering() {\n return this._intermediateRendering;\n }\n /**\n * Use this function to stop evaluating active meshes. The current list will be keep alive between frames\n * @param skipEvaluateActiveMeshes defines an optional boolean indicating that the evaluate active meshes step must be completely skipped\n * @param onSuccess optional success callback\n * @param onError optional error callback\n * @param freezeMeshes defines if meshes should be frozen (true by default)\n * @param keepFrustumCulling defines if you want to keep running the frustum clipping (false by default)\n * @returns the current scene\n */\n freezeActiveMeshes(skipEvaluateActiveMeshes = false, onSuccess, onError, freezeMeshes = true, keepFrustumCulling = false) {\n this.executeWhenReady(() => {\n if (!this.activeCamera) {\n onError && onError(\"No active camera found\");\n return;\n }\n if (!this._frustumPlanes) {\n this.updateTransformMatrix();\n }\n this._evaluateActiveMeshes();\n this._activeMeshesFrozen = true;\n this._activeMeshesFrozenButKeepClipping = keepFrustumCulling;\n this._skipEvaluateActiveMeshesCompletely = skipEvaluateActiveMeshes;\n if (freezeMeshes) {\n for (let index = 0; index < this._activeMeshes.length; index++) {\n this._activeMeshes.data[index]._freeze();\n }\n }\n onSuccess && onSuccess();\n });\n return this;\n }\n /**\n * Use this function to restart evaluating active meshes on every frame\n * @returns the current scene\n */\n unfreezeActiveMeshes() {\n for (let index = 0; index < this.meshes.length; index++) {\n const mesh = this.meshes[index];\n if (mesh._internalAbstractMeshDataInfo) {\n mesh._internalAbstractMeshDataInfo._isActive = false;\n }\n }\n for (let index = 0; index < this._activeMeshes.length; index++) {\n this._activeMeshes.data[index]._unFreeze();\n }\n this._activeMeshesFrozen = false;\n return this;\n }\n _executeActiveContainerCleanup(container) {\n const isInFastMode = this._engine.snapshotRendering && this._engine.snapshotRenderingMode === 1;\n if (!isInFastMode && this._activeMeshesFrozen && this._activeMeshes.length) {\n return; // Do not execute in frozen mode\n }\n // We need to ensure we are not in the rendering loop\n this.onBeforeRenderObservable.addOnce(() => container.dispose());\n }\n _evaluateActiveMeshes() {\n var _a;\n if (this._engine.snapshotRendering && this._engine.snapshotRenderingMode === 1) {\n if (this._activeMeshes.length > 0) {\n (_a = this.activeCamera) === null || _a === void 0 ? void 0 : _a._activeMeshes.reset();\n this._activeMeshes.reset();\n this._renderingManager.reset();\n this._processedMaterials.reset();\n this._activeParticleSystems.reset();\n this._activeSkeletons.reset();\n this._softwareSkinnedMeshes.reset();\n }\n return;\n }\n if (this._activeMeshesFrozen && this._activeMeshes.length) {\n if (!this._skipEvaluateActiveMeshesCompletely) {\n const len = this._activeMeshes.length;\n for (let i = 0; i < len; i++) {\n const mesh = this._activeMeshes.data[i];\n mesh.computeWorldMatrix();\n }\n }\n if (this._activeParticleSystems) {\n const psLength = this._activeParticleSystems.length;\n for (let i = 0; i < psLength; i++) {\n this._activeParticleSystems.data[i].animate();\n }\n }\n this._renderingManager.resetSprites();\n return;\n }\n if (!this.activeCamera) {\n return;\n }\n this.onBeforeActiveMeshesEvaluationObservable.notifyObservers(this);\n this.activeCamera._activeMeshes.reset();\n this._activeMeshes.reset();\n this._renderingManager.reset();\n this._processedMaterials.reset();\n this._activeParticleSystems.reset();\n this._activeSkeletons.reset();\n this._softwareSkinnedMeshes.reset();\n this._materialsRenderTargets.reset();\n for (const step of this._beforeEvaluateActiveMeshStage) {\n step.action();\n }\n // Determine mesh candidates\n const meshes = this.getActiveMeshCandidates();\n // Check each mesh\n const len = meshes.length;\n for (let i = 0; i < len; i++) {\n const mesh = meshes.data[i];\n mesh._internalAbstractMeshDataInfo._currentLODIsUpToDate = false;\n if (mesh.isBlocked) {\n continue;\n }\n this._totalVertices.addCount(mesh.getTotalVertices(), false);\n if (!mesh.isReady() || !mesh.isEnabled() || mesh.scaling.hasAZeroComponent) {\n continue;\n }\n mesh.computeWorldMatrix();\n // Intersections\n if (mesh.actionManager && mesh.actionManager.hasSpecificTriggers2(12, 13)) {\n this._meshesForIntersections.pushNoDuplicate(mesh);\n }\n // Switch to current LOD\n let meshToRender = this.customLODSelector ? this.customLODSelector(mesh, this.activeCamera) : mesh.getLOD(this.activeCamera);\n mesh._internalAbstractMeshDataInfo._currentLOD = meshToRender;\n mesh._internalAbstractMeshDataInfo._currentLODIsUpToDate = true;\n if (meshToRender === undefined || meshToRender === null) {\n continue;\n }\n // Compute world matrix if LOD is billboard\n if (meshToRender !== mesh && meshToRender.billboardMode !== 0) {\n meshToRender.computeWorldMatrix();\n }\n mesh._preActivate();\n if (mesh.isVisible &&\n mesh.visibility > 0 &&\n (mesh.layerMask & this.activeCamera.layerMask) !== 0 &&\n (this._skipFrustumClipping || mesh.alwaysSelectAsActiveMesh || mesh.isInFrustum(this._frustumPlanes))) {\n this._activeMeshes.push(mesh);\n this.activeCamera._activeMeshes.push(mesh);\n if (meshToRender !== mesh) {\n meshToRender._activate(this._renderId, false);\n }\n for (const step of this._preActiveMeshStage) {\n step.action(mesh);\n }\n if (mesh._activate(this._renderId, false)) {\n if (!mesh.isAnInstance) {\n meshToRender._internalAbstractMeshDataInfo._onlyForInstances = false;\n }\n else {\n if (mesh._internalAbstractMeshDataInfo._actAsRegularMesh) {\n meshToRender = mesh;\n }\n }\n meshToRender._internalAbstractMeshDataInfo._isActive = true;\n this._activeMesh(mesh, meshToRender);\n }\n mesh._postActivate();\n }\n }\n this.onAfterActiveMeshesEvaluationObservable.notifyObservers(this);\n // Particle systems\n if (this.particlesEnabled) {\n this.onBeforeParticlesRenderingObservable.notifyObservers(this);\n for (let particleIndex = 0; particleIndex < this.particleSystems.length; particleIndex++) {\n const particleSystem = this.particleSystems[particleIndex];\n if (!particleSystem.isStarted() || !particleSystem.emitter) {\n continue;\n }\n const emitter = particleSystem.emitter;\n if (!emitter.position || emitter.isEnabled()) {\n this._activeParticleSystems.push(particleSystem);\n particleSystem.animate();\n this._renderingManager.dispatchParticles(particleSystem);\n }\n }\n this.onAfterParticlesRenderingObservable.notifyObservers(this);\n }\n }\n _activeMesh(sourceMesh, mesh) {\n if (this._skeletonsEnabled && mesh.skeleton !== null && mesh.skeleton !== undefined) {\n if (this._activeSkeletons.pushNoDuplicate(mesh.skeleton)) {\n mesh.skeleton.prepare();\n this._activeBones.addCount(mesh.skeleton.bones.length, false);\n }\n if (!mesh.computeBonesUsingShaders) {\n this._softwareSkinnedMeshes.pushNoDuplicate(mesh);\n }\n }\n let forcePush = sourceMesh.hasInstances || sourceMesh.isAnInstance || this.dispatchAllSubMeshesOfActiveMeshes || this._skipFrustumClipping || mesh.alwaysSelectAsActiveMesh;\n if (mesh && mesh.subMeshes && mesh.subMeshes.length > 0) {\n const subMeshes = this.getActiveSubMeshCandidates(mesh);\n const len = subMeshes.length;\n forcePush = forcePush || len === 1;\n for (let i = 0; i < len; i++) {\n const subMesh = subMeshes.data[i];\n this._evaluateSubMesh(subMesh, mesh, sourceMesh, forcePush);\n }\n }\n }\n /**\n * Update the transform matrix to update from the current active camera\n * @param force defines a boolean used to force the update even if cache is up to date\n */\n updateTransformMatrix(force) {\n const activeCamera = this.activeCamera;\n if (!activeCamera) {\n return;\n }\n if (activeCamera._renderingMultiview) {\n const leftCamera = activeCamera._rigCameras[0];\n const rightCamera = activeCamera._rigCameras[1];\n this.setTransformMatrix(leftCamera.getViewMatrix(), leftCamera.getProjectionMatrix(force), rightCamera.getViewMatrix(), rightCamera.getProjectionMatrix(force));\n }\n else {\n this.setTransformMatrix(activeCamera.getViewMatrix(), activeCamera.getProjectionMatrix(force));\n }\n }\n _bindFrameBuffer(camera, clear = true) {\n if (camera && camera._multiviewTexture) {\n camera._multiviewTexture._bindFrameBuffer();\n }\n else if (camera && camera.outputRenderTarget) {\n camera.outputRenderTarget._bindFrameBuffer();\n }\n else {\n if (!this._engine._currentFrameBufferIsDefaultFrameBuffer()) {\n this._engine.restoreDefaultFramebuffer();\n }\n }\n if (clear) {\n this._clearFrameBuffer(camera);\n }\n }\n _clearFrameBuffer(camera) {\n // we assume the framebuffer currently bound is the right one\n if (camera && camera._multiviewTexture) {\n // no clearing?\n }\n else if (camera && camera.outputRenderTarget && !camera._renderingMultiview) {\n const rtt = camera.outputRenderTarget;\n if (rtt.onClearObservable.hasObservers()) {\n rtt.onClearObservable.notifyObservers(this._engine);\n }\n else if (!rtt.skipInitialClear) {\n if (this.autoClear) {\n this._engine.clear(rtt.clearColor || this.clearColor, !rtt._cleared, true, true);\n }\n rtt._cleared = true;\n }\n }\n else {\n if (!this._defaultFrameBufferCleared) {\n this._defaultFrameBufferCleared = true;\n this._clear();\n }\n else {\n this._engine.clear(null, false, true, true);\n }\n }\n }\n /**\n * @internal\n */\n _renderForCamera(camera, rigParent, bindFrameBuffer = true) {\n var _a, _b, _c;\n if (camera && camera._skipRendering) {\n return;\n }\n const engine = this._engine;\n // Use _activeCamera instead of activeCamera to avoid onActiveCameraChanged\n this._activeCamera = camera;\n if (!this.activeCamera) {\n throw new Error(\"Active camera not set\");\n }\n // Viewport\n engine.setViewport(this.activeCamera.viewport);\n // Camera\n this.resetCachedMaterial();\n this._renderId++;\n if (!this.prePass && bindFrameBuffer) {\n let skipInitialClear = true;\n if (camera._renderingMultiview && camera.outputRenderTarget) {\n skipInitialClear = camera.outputRenderTarget.skipInitialClear;\n if (this.autoClear) {\n this._defaultFrameBufferCleared = false;\n camera.outputRenderTarget.skipInitialClear = false;\n }\n }\n this._bindFrameBuffer(this._activeCamera);\n if (camera._renderingMultiview && camera.outputRenderTarget) {\n camera.outputRenderTarget.skipInitialClear = skipInitialClear;\n }\n }\n this.updateTransformMatrix();\n this.onBeforeCameraRenderObservable.notifyObservers(this.activeCamera);\n // Meshes\n this._evaluateActiveMeshes();\n // Software skinning\n for (let softwareSkinnedMeshIndex = 0; softwareSkinnedMeshIndex < this._softwareSkinnedMeshes.length; softwareSkinnedMeshIndex++) {\n const mesh = this._softwareSkinnedMeshes.data[softwareSkinnedMeshIndex];\n mesh.applySkeleton(mesh.skeleton);\n }\n // Render targets\n this.onBeforeRenderTargetsRenderObservable.notifyObservers(this);\n this._renderTargets.concatWithNoDuplicate(this._materialsRenderTargets);\n if (camera.customRenderTargets && camera.customRenderTargets.length > 0) {\n this._renderTargets.concatWithNoDuplicate(camera.customRenderTargets);\n }\n if (rigParent && rigParent.customRenderTargets && rigParent.customRenderTargets.length > 0) {\n this._renderTargets.concatWithNoDuplicate(rigParent.customRenderTargets);\n }\n if (this.environmentTexture && this.environmentTexture.isRenderTarget) {\n this._renderTargets.pushNoDuplicate(this.environmentTexture);\n }\n // Collects render targets from external components.\n for (const step of this._gatherActiveCameraRenderTargetsStage) {\n step.action(this._renderTargets);\n }\n let needRebind = false;\n if (this.renderTargetsEnabled) {\n this._intermediateRendering = true;\n if (this._renderTargets.length > 0) {\n Tools.StartPerformanceCounter(\"Render targets\", this._renderTargets.length > 0);\n for (let renderIndex = 0; renderIndex < this._renderTargets.length; renderIndex++) {\n const renderTarget = this._renderTargets.data[renderIndex];\n if (renderTarget._shouldRender()) {\n this._renderId++;\n const hasSpecialRenderTargetCamera = renderTarget.activeCamera && renderTarget.activeCamera !== this.activeCamera;\n renderTarget.render(hasSpecialRenderTargetCamera, this.dumpNextRenderTargets);\n needRebind = true;\n }\n }\n Tools.EndPerformanceCounter(\"Render targets\", this._renderTargets.length > 0);\n this._renderId++;\n }\n for (const step of this._cameraDrawRenderTargetStage) {\n needRebind = step.action(this.activeCamera) || needRebind;\n }\n this._intermediateRendering = false;\n }\n this._engine.currentRenderPassId = (_c = (_b = (_a = camera.outputRenderTarget) === null || _a === void 0 ? void 0 : _a.renderPassId) !== null && _b !== void 0 ? _b : camera.renderPassId) !== null && _c !== void 0 ? _c : 0;\n // Restore framebuffer after rendering to targets\n if (needRebind && !this.prePass) {\n this._bindFrameBuffer(this._activeCamera, false);\n }\n this.onAfterRenderTargetsRenderObservable.notifyObservers(this);\n // Prepare Frame\n if (this.postProcessManager && !camera._multiviewTexture && !this.prePass) {\n this.postProcessManager._prepareFrame();\n }\n // Before Camera Draw\n for (const step of this._beforeCameraDrawStage) {\n step.action(this.activeCamera);\n }\n // Render\n this.onBeforeDrawPhaseObservable.notifyObservers(this);\n if (engine.snapshotRendering && engine.snapshotRenderingMode === 1) {\n this.finalizeSceneUbo();\n }\n this._renderingManager.render(null, null, true, true);\n this.onAfterDrawPhaseObservable.notifyObservers(this);\n // After Camera Draw\n for (const step of this._afterCameraDrawStage) {\n step.action(this.activeCamera);\n }\n // Finalize frame\n if (this.postProcessManager && !camera._multiviewTexture) {\n // if the camera has an output render target, render the post process to the render target\n const texture = camera.outputRenderTarget ? camera.outputRenderTarget.renderTarget : undefined;\n this.postProcessManager._finalizeFrame(camera.isIntermediate, texture);\n }\n // After post process\n for (const step of this._afterCameraPostProcessStage) {\n step.action(this.activeCamera);\n }\n // Reset some special arrays\n this._renderTargets.reset();\n this.onAfterCameraRenderObservable.notifyObservers(this.activeCamera);\n }\n _processSubCameras(camera, bindFrameBuffer = true) {\n if (camera.cameraRigMode === 0 || camera._renderingMultiview) {\n if (camera._renderingMultiview && !this._multiviewSceneUbo) {\n this._createMultiviewUbo();\n }\n this._renderForCamera(camera, undefined, bindFrameBuffer);\n this.onAfterRenderCameraObservable.notifyObservers(camera);\n return;\n }\n if (camera._useMultiviewToSingleView) {\n this._renderMultiviewToSingleView(camera);\n }\n else {\n // rig cameras\n this.onBeforeCameraRenderObservable.notifyObservers(camera);\n for (let index = 0; index < camera._rigCameras.length; index++) {\n this._renderForCamera(camera._rigCameras[index], camera);\n }\n }\n // Use _activeCamera instead of activeCamera to avoid onActiveCameraChanged\n this._activeCamera = camera;\n this.updateTransformMatrix();\n this.onAfterRenderCameraObservable.notifyObservers(camera);\n }\n _checkIntersections() {\n for (let index = 0; index < this._meshesForIntersections.length; index++) {\n const sourceMesh = this._meshesForIntersections.data[index];\n if (!sourceMesh.actionManager) {\n continue;\n }\n for (let actionIndex = 0; sourceMesh.actionManager && actionIndex < sourceMesh.actionManager.actions.length; actionIndex++) {\n const action = sourceMesh.actionManager.actions[actionIndex];\n if (action.trigger === 12 || action.trigger === 13) {\n const parameters = action.getTriggerParameter();\n const otherMesh = parameters.mesh ? parameters.mesh : parameters;\n const areIntersecting = otherMesh.intersectsMesh(sourceMesh, parameters.usePreciseIntersection);\n const currentIntersectionInProgress = sourceMesh._intersectionsInProgress.indexOf(otherMesh);\n if (areIntersecting && currentIntersectionInProgress === -1) {\n if (action.trigger === 12) {\n action._executeCurrent(ActionEvent.CreateNew(sourceMesh, undefined, otherMesh));\n sourceMesh._intersectionsInProgress.push(otherMesh);\n }\n else if (action.trigger === 13) {\n sourceMesh._intersectionsInProgress.push(otherMesh);\n }\n }\n else if (!areIntersecting && currentIntersectionInProgress > -1) {\n //They intersected, and now they don't.\n //is this trigger an exit trigger? execute an event.\n if (action.trigger === 13) {\n action._executeCurrent(ActionEvent.CreateNew(sourceMesh, undefined, otherMesh));\n }\n //if this is an exit trigger, or no exit trigger exists, remove the id from the intersection in progress array.\n if (!sourceMesh.actionManager.hasSpecificTrigger(13, (parameter) => {\n const parameterMesh = parameter.mesh ? parameter.mesh : parameter;\n return otherMesh === parameterMesh;\n }) ||\n action.trigger === 13) {\n sourceMesh._intersectionsInProgress.splice(currentIntersectionInProgress, 1);\n }\n }\n }\n }\n }\n }\n /**\n * @internal\n */\n _advancePhysicsEngineStep(step) {\n // Do nothing. Code will be replaced if physics engine component is referenced\n }\n /** @internal */\n _animate() {\n // Nothing to do as long as Animatable have not been imported.\n }\n /** Execute all animations (for a frame) */\n animate() {\n if (this._engine.isDeterministicLockStep()) {\n let deltaTime = Math.max(Scene.MinDeltaTime, Math.min(this._engine.getDeltaTime(), Scene.MaxDeltaTime)) + this._timeAccumulator;\n const defaultFrameTime = this._engine.getTimeStep();\n const defaultFPS = 1000.0 / defaultFrameTime / 1000.0;\n let stepsTaken = 0;\n const maxSubSteps = this._engine.getLockstepMaxSteps();\n let internalSteps = Math.floor(deltaTime / defaultFrameTime);\n internalSteps = Math.min(internalSteps, maxSubSteps);\n while (deltaTime > 0 && stepsTaken < internalSteps) {\n this.onBeforeStepObservable.notifyObservers(this);\n // Animations\n this._animationRatio = defaultFrameTime * defaultFPS;\n this._animate();\n this.onAfterAnimationsObservable.notifyObservers(this);\n // Physics\n if (this.physicsEnabled) {\n this._advancePhysicsEngineStep(defaultFrameTime);\n }\n this.onAfterStepObservable.notifyObservers(this);\n this._currentStepId++;\n stepsTaken++;\n deltaTime -= defaultFrameTime;\n }\n this._timeAccumulator = deltaTime < 0 ? 0 : deltaTime;\n }\n else {\n // Animations\n const deltaTime = this.useConstantAnimationDeltaTime ? 16 : Math.max(Scene.MinDeltaTime, Math.min(this._engine.getDeltaTime(), Scene.MaxDeltaTime));\n this._animationRatio = deltaTime * (60.0 / 1000.0);\n this._animate();\n this.onAfterAnimationsObservable.notifyObservers(this);\n // Physics\n if (this.physicsEnabled) {\n this._advancePhysicsEngineStep(deltaTime);\n }\n }\n }\n _clear() {\n if (this.autoClearDepthAndStencil || this.autoClear) {\n this._engine.clear(this.clearColor, this.autoClear || this.forceWireframe || this.forcePointsCloud, this.autoClearDepthAndStencil, this.autoClearDepthAndStencil);\n }\n }\n _checkCameraRenderTarget(camera) {\n var _a;\n if ((camera === null || camera === void 0 ? void 0 : camera.outputRenderTarget) && !(camera === null || camera === void 0 ? void 0 : camera.isRigCamera)) {\n camera.outputRenderTarget._cleared = false;\n }\n if ((_a = camera === null || camera === void 0 ? void 0 : camera.rigCameras) === null || _a === void 0 ? void 0 : _a.length) {\n for (let i = 0; i < camera.rigCameras.length; ++i) {\n const rtt = camera.rigCameras[i].outputRenderTarget;\n if (rtt) {\n rtt._cleared = false;\n }\n }\n }\n }\n /**\n * Resets the draw wrappers cache of all meshes\n * @param passId If provided, releases only the draw wrapper corresponding to this render pass id\n */\n resetDrawCache(passId) {\n if (!this.meshes) {\n return;\n }\n for (const mesh of this.meshes) {\n mesh.resetDrawCache(passId);\n }\n }\n /**\n * Render the scene\n * @param updateCameras defines a boolean indicating if cameras must update according to their inputs (true by default)\n * @param ignoreAnimations defines a boolean indicating if animations should not be executed (false by default)\n */\n render(updateCameras = true, ignoreAnimations = false) {\n var _a, _b, _c;\n if (this.isDisposed) {\n return;\n }\n if (this.onReadyObservable.hasObservers() && this._executeWhenReadyTimeoutId === null) {\n this._checkIsReady();\n }\n this._frameId++;\n this._defaultFrameBufferCleared = false;\n this._checkCameraRenderTarget(this.activeCamera);\n if ((_a = this.activeCameras) === null || _a === void 0 ? void 0 : _a.length) {\n this.activeCameras.forEach(this._checkCameraRenderTarget);\n }\n // Register components that have been associated lately to the scene.\n this._registerTransientComponents();\n this._activeParticles.fetchNewFrame();\n this._totalVertices.fetchNewFrame();\n this._activeIndices.fetchNewFrame();\n this._activeBones.fetchNewFrame();\n this._meshesForIntersections.reset();\n this.resetCachedMaterial();\n this.onBeforeAnimationsObservable.notifyObservers(this);\n // Actions\n if (this.actionManager) {\n this.actionManager.processTrigger(11);\n }\n // Animations\n if (!ignoreAnimations) {\n this.animate();\n }\n // Before camera update steps\n for (const step of this._beforeCameraUpdateStage) {\n step.action();\n }\n // Update Cameras\n if (updateCameras) {\n if (this.activeCameras && this.activeCameras.length > 0) {\n for (let cameraIndex = 0; cameraIndex < this.activeCameras.length; cameraIndex++) {\n const camera = this.activeCameras[cameraIndex];\n camera.update();\n if (camera.cameraRigMode !== 0) {\n // rig cameras\n for (let index = 0; index < camera._rigCameras.length; index++) {\n camera._rigCameras[index].update();\n }\n }\n }\n }\n else if (this.activeCamera) {\n this.activeCamera.update();\n if (this.activeCamera.cameraRigMode !== 0) {\n // rig cameras\n for (let index = 0; index < this.activeCamera._rigCameras.length; index++) {\n this.activeCamera._rigCameras[index].update();\n }\n }\n }\n }\n // Before render\n this.onBeforeRenderObservable.notifyObservers(this);\n const engine = this.getEngine();\n // Customs render targets\n this.onBeforeRenderTargetsRenderObservable.notifyObservers(this);\n const currentActiveCamera = ((_b = this.activeCameras) === null || _b === void 0 ? void 0 : _b.length) ? this.activeCameras[0] : this.activeCamera;\n if (this.renderTargetsEnabled) {\n Tools.StartPerformanceCounter(\"Custom render targets\", this.customRenderTargets.length > 0);\n this._intermediateRendering = true;\n for (let customIndex = 0; customIndex < this.customRenderTargets.length; customIndex++) {\n const renderTarget = this.customRenderTargets[customIndex];\n if (renderTarget._shouldRender()) {\n this._renderId++;\n this.activeCamera = renderTarget.activeCamera || this.activeCamera;\n if (!this.activeCamera) {\n throw new Error(\"Active camera not set\");\n }\n // Viewport\n engine.setViewport(this.activeCamera.viewport);\n // Camera\n this.updateTransformMatrix();\n renderTarget.render(currentActiveCamera !== this.activeCamera, this.dumpNextRenderTargets);\n }\n }\n Tools.EndPerformanceCounter(\"Custom render targets\", this.customRenderTargets.length > 0);\n this._intermediateRendering = false;\n this._renderId++;\n }\n this._engine.currentRenderPassId = (_c = currentActiveCamera === null || currentActiveCamera === void 0 ? void 0 : currentActiveCamera.renderPassId) !== null && _c !== void 0 ? _c : 0;\n // Restore back buffer\n this.activeCamera = currentActiveCamera;\n if (this._activeCamera && this._activeCamera.cameraRigMode !== 22 && !this.prePass) {\n this._bindFrameBuffer(this._activeCamera, false);\n }\n this.onAfterRenderTargetsRenderObservable.notifyObservers(this);\n for (const step of this._beforeClearStage) {\n step.action();\n }\n // Clear\n this._clearFrameBuffer(this.activeCamera);\n // Collects render targets from external components.\n for (const step of this._gatherRenderTargetsStage) {\n step.action(this._renderTargets);\n }\n // Multi-cameras?\n if (this.activeCameras && this.activeCameras.length > 0) {\n for (let cameraIndex = 0; cameraIndex < this.activeCameras.length; cameraIndex++) {\n this._processSubCameras(this.activeCameras[cameraIndex], cameraIndex > 0);\n }\n }\n else {\n if (!this.activeCamera) {\n throw new Error(\"No camera defined\");\n }\n this._processSubCameras(this.activeCamera, !!this.activeCamera.outputRenderTarget);\n }\n // Intersection checks\n this._checkIntersections();\n // Executes the after render stage actions.\n for (const step of this._afterRenderStage) {\n step.action();\n }\n // After render\n if (this.afterRender) {\n this.afterRender();\n }\n this.onAfterRenderObservable.notifyObservers(this);\n // Cleaning\n if (this._toBeDisposed.length) {\n for (let index = 0; index < this._toBeDisposed.length; index++) {\n const data = this._toBeDisposed[index];\n if (data) {\n data.dispose();\n }\n }\n this._toBeDisposed.length = 0;\n }\n if (this.dumpNextRenderTargets) {\n this.dumpNextRenderTargets = false;\n }\n this._activeBones.addCount(0, true);\n this._activeIndices.addCount(0, true);\n this._activeParticles.addCount(0, true);\n this._engine.restoreDefaultFramebuffer();\n }\n /**\n * Freeze all materials\n * A frozen material will not be updatable but should be faster to render\n * Note: multimaterials will not be frozen, but their submaterials will\n */\n freezeMaterials() {\n for (let i = 0; i < this.materials.length; i++) {\n this.materials[i].freeze();\n }\n }\n /**\n * Unfreeze all materials\n * A frozen material will not be updatable but should be faster to render\n */\n unfreezeMaterials() {\n for (let i = 0; i < this.materials.length; i++) {\n this.materials[i].unfreeze();\n }\n }\n /**\n * Releases all held resources\n */\n dispose() {\n if (this.isDisposed) {\n return;\n }\n this.beforeRender = null;\n this.afterRender = null;\n this.metadata = null;\n this.skeletons.length = 0;\n this.morphTargetManagers.length = 0;\n this._transientComponents.length = 0;\n this._isReadyForMeshStage.clear();\n this._beforeEvaluateActiveMeshStage.clear();\n this._evaluateSubMeshStage.clear();\n this._preActiveMeshStage.clear();\n this._cameraDrawRenderTargetStage.clear();\n this._beforeCameraDrawStage.clear();\n this._beforeRenderTargetDrawStage.clear();\n this._beforeRenderingGroupDrawStage.clear();\n this._beforeRenderingMeshStage.clear();\n this._afterRenderingMeshStage.clear();\n this._afterRenderingGroupDrawStage.clear();\n this._afterCameraDrawStage.clear();\n this._afterRenderTargetDrawStage.clear();\n this._afterRenderStage.clear();\n this._beforeCameraUpdateStage.clear();\n this._beforeClearStage.clear();\n this._gatherRenderTargetsStage.clear();\n this._gatherActiveCameraRenderTargetsStage.clear();\n this._pointerMoveStage.clear();\n this._pointerDownStage.clear();\n this._pointerUpStage.clear();\n this.importedMeshesFiles = [];\n if (this.stopAllAnimations) {\n // Ensures that no animatable notifies a callback that could start a new animation group, constantly adding new animatables to the active list...\n this._activeAnimatables.forEach((animatable) => {\n animatable.onAnimationEndObservable.clear();\n animatable.onAnimationEnd = null;\n });\n this.stopAllAnimations();\n }\n this.resetCachedMaterial();\n // Smart arrays\n if (this.activeCamera) {\n this.activeCamera._activeMeshes.dispose();\n this.activeCamera = null;\n }\n this.activeCameras = null;\n this._activeMeshes.dispose();\n this._renderingManager.dispose();\n this._processedMaterials.dispose();\n this._activeParticleSystems.dispose();\n this._activeSkeletons.dispose();\n this._softwareSkinnedMeshes.dispose();\n this._renderTargets.dispose();\n this._materialsRenderTargets.dispose();\n this._registeredForLateAnimationBindings.dispose();\n this._meshesForIntersections.dispose();\n this._toBeDisposed.length = 0;\n // Abort active requests\n const activeRequests = this._activeRequests.slice();\n for (const request of activeRequests) {\n request.abort();\n }\n this._activeRequests.length = 0;\n // Events\n try {\n this.onDisposeObservable.notifyObservers(this);\n }\n catch (e) {\n console.error(\"An error occurred while calling onDisposeObservable!\", e);\n }\n this.detachControl();\n // Detach cameras\n const canvas = this._engine.getInputElement();\n if (canvas) {\n for (let index = 0; index < this.cameras.length; index++) {\n this.cameras[index].detachControl();\n }\n }\n // Release animation groups\n this._disposeList(this.animationGroups);\n // Release lights\n this._disposeList(this.lights);\n // Release meshes\n this._disposeList(this.meshes, (item) => item.dispose(true));\n this._disposeList(this.transformNodes, (item) => item.dispose(true));\n // Release cameras\n const cameras = this.cameras;\n this._disposeList(cameras);\n // Release materials\n if (this._defaultMaterial) {\n this._defaultMaterial.dispose();\n }\n this._disposeList(this.multiMaterials);\n this._disposeList(this.materials);\n // Release particles\n this._disposeList(this.particleSystems);\n // Release postProcesses\n this._disposeList(this.postProcesses);\n // Release textures\n this._disposeList(this.textures);\n // Release morph targets\n this._disposeList(this.morphTargetManagers);\n // Release UBO\n this._sceneUbo.dispose();\n if (this._multiviewSceneUbo) {\n this._multiviewSceneUbo.dispose();\n }\n // Post-processes\n this.postProcessManager.dispose();\n // Components\n this._disposeList(this._components);\n // Remove from engine\n let index = this._engine.scenes.indexOf(this);\n if (index > -1) {\n this._engine.scenes.splice(index, 1);\n }\n if (EngineStore._LastCreatedScene === this) {\n if (this._engine.scenes.length > 0) {\n EngineStore._LastCreatedScene = this._engine.scenes[this._engine.scenes.length - 1];\n }\n else {\n EngineStore._LastCreatedScene = null;\n }\n }\n index = this._engine._virtualScenes.indexOf(this);\n if (index > -1) {\n this._engine._virtualScenes.splice(index, 1);\n }\n this._engine.wipeCaches(true);\n this.onDisposeObservable.clear();\n this.onBeforeRenderObservable.clear();\n this.onAfterRenderObservable.clear();\n this.onBeforeRenderTargetsRenderObservable.clear();\n this.onAfterRenderTargetsRenderObservable.clear();\n this.onAfterStepObservable.clear();\n this.onBeforeStepObservable.clear();\n this.onBeforeActiveMeshesEvaluationObservable.clear();\n this.onAfterActiveMeshesEvaluationObservable.clear();\n this.onBeforeParticlesRenderingObservable.clear();\n this.onAfterParticlesRenderingObservable.clear();\n this.onBeforeDrawPhaseObservable.clear();\n this.onAfterDrawPhaseObservable.clear();\n this.onBeforeAnimationsObservable.clear();\n this.onAfterAnimationsObservable.clear();\n this.onDataLoadedObservable.clear();\n this.onBeforeRenderingGroupObservable.clear();\n this.onAfterRenderingGroupObservable.clear();\n this.onMeshImportedObservable.clear();\n this.onBeforeCameraRenderObservable.clear();\n this.onAfterCameraRenderObservable.clear();\n this.onAfterRenderCameraObservable.clear();\n this.onReadyObservable.clear();\n this.onNewCameraAddedObservable.clear();\n this.onCameraRemovedObservable.clear();\n this.onNewLightAddedObservable.clear();\n this.onLightRemovedObservable.clear();\n this.onNewGeometryAddedObservable.clear();\n this.onGeometryRemovedObservable.clear();\n this.onNewTransformNodeAddedObservable.clear();\n this.onTransformNodeRemovedObservable.clear();\n this.onNewMeshAddedObservable.clear();\n this.onMeshRemovedObservable.clear();\n this.onNewSkeletonAddedObservable.clear();\n this.onSkeletonRemovedObservable.clear();\n this.onNewMaterialAddedObservable.clear();\n this.onNewMultiMaterialAddedObservable.clear();\n this.onMaterialRemovedObservable.clear();\n this.onMultiMaterialRemovedObservable.clear();\n this.onNewTextureAddedObservable.clear();\n this.onTextureRemovedObservable.clear();\n this.onPrePointerObservable.clear();\n this.onPointerObservable.clear();\n this.onPreKeyboardObservable.clear();\n this.onKeyboardObservable.clear();\n this.onActiveCameraChanged.clear();\n this.onScenePerformancePriorityChangedObservable.clear();\n this._isDisposed = true;\n }\n _disposeList(items, callback) {\n const itemsCopy = items.slice(0);\n callback = callback !== null && callback !== void 0 ? callback : ((item) => item.dispose());\n for (const item of itemsCopy) {\n callback(item);\n }\n items.length = 0;\n }\n /**\n * Gets if the scene is already disposed\n */\n get isDisposed() {\n return this._isDisposed;\n }\n /**\n * Call this function to reduce memory footprint of the scene.\n * Vertex buffers will not store CPU data anymore (this will prevent picking, collisions or physics to work correctly)\n */\n clearCachedVertexData() {\n for (let meshIndex = 0; meshIndex < this.meshes.length; meshIndex++) {\n const mesh = this.meshes[meshIndex];\n const geometry = mesh.geometry;\n if (geometry) {\n geometry.clearCachedData();\n }\n }\n }\n /**\n * This function will remove the local cached buffer data from texture.\n * It will save memory but will prevent the texture from being rebuilt\n */\n cleanCachedTextureBuffer() {\n for (const baseTexture of this.textures) {\n const buffer = baseTexture._buffer;\n if (buffer) {\n baseTexture._buffer = null;\n }\n }\n }\n /**\n * Get the world extend vectors with an optional filter\n *\n * @param filterPredicate the predicate - which meshes should be included when calculating the world size\n * @returns {{ min: Vector3; max: Vector3 }} min and max vectors\n */\n getWorldExtends(filterPredicate) {\n const min = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n const max = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\n filterPredicate = filterPredicate || (() => true);\n this.meshes.filter(filterPredicate).forEach((mesh) => {\n mesh.computeWorldMatrix(true);\n if (!mesh.subMeshes || mesh.subMeshes.length === 0 || mesh.infiniteDistance) {\n return;\n }\n const boundingInfo = mesh.getBoundingInfo();\n const minBox = boundingInfo.boundingBox.minimumWorld;\n const maxBox = boundingInfo.boundingBox.maximumWorld;\n Vector3.CheckExtends(minBox, min, max);\n Vector3.CheckExtends(maxBox, min, max);\n });\n return {\n min: min,\n max: max,\n };\n }\n // Picking\n /**\n * Creates a ray that can be used to pick in the scene\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param world defines the world matrix to use if you want to pick in object space (instead of world space)\n * @param camera defines the camera to use for the picking\n * @param cameraViewSpace defines if picking will be done in view space (false by default)\n * @returns a Ray\n */\n createPickingRay(x, y, world, camera, cameraViewSpace = false) {\n throw _WarnImport(\"Ray\");\n }\n /**\n * Creates a ray that can be used to pick in the scene\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param world defines the world matrix to use if you want to pick in object space (instead of world space)\n * @param result defines the ray where to store the picking ray\n * @param camera defines the camera to use for the picking\n * @param cameraViewSpace defines if picking will be done in view space (false by default)\n * @param enableDistantPicking defines if picking should handle large values for mesh position/scaling (false by default)\n * @returns the current scene\n */\n createPickingRayToRef(x, y, world, result, camera, cameraViewSpace = false, enableDistantPicking = false) {\n throw _WarnImport(\"Ray\");\n }\n /**\n * Creates a ray that can be used to pick in the scene\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param camera defines the camera to use for the picking\n * @returns a Ray\n */\n createPickingRayInCameraSpace(x, y, camera) {\n throw _WarnImport(\"Ray\");\n }\n /**\n * Creates a ray that can be used to pick in the scene\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param result defines the ray where to store the picking ray\n * @param camera defines the camera to use for the picking\n * @returns the current scene\n */\n createPickingRayInCameraSpaceToRef(x, y, result, camera) {\n throw _WarnImport(\"Ray\");\n }\n /** @internal */\n get _pickingAvailable() {\n return false;\n }\n /** Launch a ray to try to pick a mesh in the scene\n * @param x position on screen\n * @param y position on screen\n * @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @returns a PickingInfo\n */\n pick(x, y, predicate, fastCheck, camera, trianglePredicate) {\n const warn = _WarnImport(\"Ray\", true);\n if (warn) {\n Logger.Warn(warn);\n }\n // Dummy info if picking as not been imported\n return new PickingInfo();\n }\n /** Launch a ray to try to pick a mesh in the scene using only bounding information of the main mesh (not using submeshes)\n * @param x position on screen\n * @param y position on screen\n * @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used\n * @returns a PickingInfo (Please note that some info will not be set like distance, bv, bu and everything that cannot be capture by only using bounding infos)\n */\n pickWithBoundingInfo(x, y, predicate, fastCheck, camera) {\n const warn = _WarnImport(\"Ray\", true);\n if (warn) {\n Logger.Warn(warn);\n }\n // Dummy info if picking as not been imported\n return new PickingInfo();\n }\n /**\n * Use the given ray to pick a mesh in the scene. A mesh triangle can be picked both from its front and back sides,\n * irrespective of orientation.\n * @param ray The ray to use to pick meshes\n * @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must have isPickable set to true\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @returns a PickingInfo\n */\n pickWithRay(ray, predicate, fastCheck, trianglePredicate) {\n throw _WarnImport(\"Ray\");\n }\n /**\n * Launch a ray to try to pick a mesh in the scene. A mesh triangle can be picked both from its front and back sides,\n * irrespective of orientation.\n * @param x X position on screen\n * @param y Y position on screen\n * @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true\n * @param camera camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @returns an array of PickingInfo\n */\n multiPick(x, y, predicate, camera, trianglePredicate) {\n throw _WarnImport(\"Ray\");\n }\n /**\n * Launch a ray to try to pick a mesh in the scene\n * @param ray Ray to use\n * @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @returns an array of PickingInfo\n */\n multiPickWithRay(ray, predicate, trianglePredicate) {\n throw _WarnImport(\"Ray\");\n }\n /**\n * Force the value of meshUnderPointer\n * @param mesh defines the mesh to use\n * @param pointerId optional pointer id when using more than one pointer\n * @param pickResult optional pickingInfo data used to find mesh\n */\n setPointerOverMesh(mesh, pointerId, pickResult) {\n this._inputManager.setPointerOverMesh(mesh, pointerId, pickResult);\n }\n /**\n * Gets the mesh under the pointer\n * @returns a Mesh or null if no mesh is under the pointer\n */\n getPointerOverMesh() {\n return this._inputManager.getPointerOverMesh();\n }\n // Misc.\n /** @internal */\n _rebuildGeometries() {\n for (const geometry of this.geometries) {\n geometry._rebuild();\n }\n for (const mesh of this.meshes) {\n mesh._rebuild();\n }\n if (this.postProcessManager) {\n this.postProcessManager._rebuild();\n }\n for (const component of this._components) {\n component.rebuild();\n }\n for (const system of this.particleSystems) {\n system.rebuild();\n }\n if (this.spriteManagers) {\n for (const spriteMgr of this.spriteManagers) {\n spriteMgr.rebuild();\n }\n }\n }\n /** @internal */\n _rebuildTextures() {\n for (const texture of this.textures) {\n texture._rebuild();\n }\n this.markAllMaterialsAsDirty(1);\n }\n /**\n * Get from a list of objects by tags\n * @param list the list of objects to use\n * @param tagsQuery the query to use\n * @param filter a predicate to filter for tags\n * @returns\n */\n _getByTags(list, tagsQuery, filter) {\n if (tagsQuery === undefined) {\n // returns the complete list (could be done with Tags.MatchesQuery but no need to have a for-loop here)\n return list;\n }\n const listByTags = [];\n for (const i in list) {\n const item = list[i];\n if (Tags && Tags.MatchesQuery(item, tagsQuery) && (!filter || filter(item))) {\n listByTags.push(item);\n }\n }\n return listByTags;\n }\n /**\n * Get a list of meshes by tags\n * @param tagsQuery defines the tags query to use\n * @param filter defines a predicate used to filter results\n * @returns an array of Mesh\n */\n getMeshesByTags(tagsQuery, filter) {\n return this._getByTags(this.meshes, tagsQuery, filter);\n }\n /**\n * Get a list of cameras by tags\n * @param tagsQuery defines the tags query to use\n * @param filter defines a predicate used to filter results\n * @returns an array of Camera\n */\n getCamerasByTags(tagsQuery, filter) {\n return this._getByTags(this.cameras, tagsQuery, filter);\n }\n /**\n * Get a list of lights by tags\n * @param tagsQuery defines the tags query to use\n * @param filter defines a predicate used to filter results\n * @returns an array of Light\n */\n getLightsByTags(tagsQuery, filter) {\n return this._getByTags(this.lights, tagsQuery, filter);\n }\n /**\n * Get a list of materials by tags\n * @param tagsQuery defines the tags query to use\n * @param filter defines a predicate used to filter results\n * @returns an array of Material\n */\n getMaterialByTags(tagsQuery, filter) {\n return this._getByTags(this.materials, tagsQuery, filter).concat(this._getByTags(this.multiMaterials, tagsQuery, filter));\n }\n /**\n * Get a list of transform nodes by tags\n * @param tagsQuery defines the tags query to use\n * @param filter defines a predicate used to filter results\n * @returns an array of TransformNode\n */\n getTransformNodesByTags(tagsQuery, filter) {\n return this._getByTags(this.transformNodes, tagsQuery, filter);\n }\n /**\n * Overrides the default sort function applied in the rendering group to prepare the meshes.\n * This allowed control for front to back rendering or reversly depending of the special needs.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param opaqueSortCompareFn The opaque queue comparison function use to sort.\n * @param alphaTestSortCompareFn The alpha test queue comparison function use to sort.\n * @param transparentSortCompareFn The transparent queue comparison function use to sort.\n */\n setRenderingOrder(renderingGroupId, opaqueSortCompareFn = null, alphaTestSortCompareFn = null, transparentSortCompareFn = null) {\n this._renderingManager.setRenderingOrder(renderingGroupId, opaqueSortCompareFn, alphaTestSortCompareFn, transparentSortCompareFn);\n }\n /**\n * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.\n * @param depth Automatically clears depth between groups if true and autoClear is true.\n * @param stencil Automatically clears stencil between groups if true and autoClear is true.\n */\n setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil, depth = true, stencil = true) {\n this._renderingManager.setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil, depth, stencil);\n }\n /**\n * Gets the current auto clear configuration for one rendering group of the rendering\n * manager.\n * @param index the rendering group index to get the information for\n * @returns The auto clear setup for the requested rendering group\n */\n getAutoClearDepthStencilSetup(index) {\n return this._renderingManager.getAutoClearDepthStencilSetup(index);\n }\n /** @internal */\n _forceBlockMaterialDirtyMechanism(value) {\n this._blockMaterialDirtyMechanism = value;\n }\n /** Gets or sets a boolean blocking all the calls to markAllMaterialsAsDirty (ie. the materials won't be updated if they are out of sync) */\n get blockMaterialDirtyMechanism() {\n return this._blockMaterialDirtyMechanism;\n }\n set blockMaterialDirtyMechanism(value) {\n if (this._blockMaterialDirtyMechanism === value) {\n return;\n }\n this._blockMaterialDirtyMechanism = value;\n if (!value) {\n // Do a complete update\n this.markAllMaterialsAsDirty(63);\n }\n }\n /**\n * Will flag all materials as dirty to trigger new shader compilation\n * @param flag defines the flag used to specify which material part must be marked as dirty\n * @param predicate If not null, it will be used to specify if a material has to be marked as dirty\n */\n markAllMaterialsAsDirty(flag, predicate) {\n if (this._blockMaterialDirtyMechanism) {\n return;\n }\n for (const material of this.materials) {\n if (predicate && !predicate(material)) {\n continue;\n }\n material.markAsDirty(flag);\n }\n }\n /**\n * @internal\n */\n _loadFile(fileOrUrl, onSuccess, onProgress, useOfflineSupport, useArrayBuffer, onError, onOpened) {\n const request = LoadFile(fileOrUrl, onSuccess, onProgress, useOfflineSupport ? this.offlineProvider : undefined, useArrayBuffer, onError, onOpened);\n this._activeRequests.push(request);\n request.onCompleteObservable.add((request) => {\n this._activeRequests.splice(this._activeRequests.indexOf(request), 1);\n });\n return request;\n }\n /**\n * @internal\n */\n _loadFileAsync(fileOrUrl, onProgress, useOfflineSupport, useArrayBuffer, onOpened) {\n return new Promise((resolve, reject) => {\n this._loadFile(fileOrUrl, (data) => {\n resolve(data);\n }, onProgress, useOfflineSupport, useArrayBuffer, (request, exception) => {\n reject(exception);\n }, onOpened);\n });\n }\n /**\n * @internal\n */\n _requestFile(url, onSuccess, onProgress, useOfflineSupport, useArrayBuffer, onError, onOpened) {\n const request = RequestFile(url, onSuccess, onProgress, useOfflineSupport ? this.offlineProvider : undefined, useArrayBuffer, onError, onOpened);\n this._activeRequests.push(request);\n request.onCompleteObservable.add((request) => {\n this._activeRequests.splice(this._activeRequests.indexOf(request), 1);\n });\n return request;\n }\n /**\n * @internal\n */\n _requestFileAsync(url, onProgress, useOfflineSupport, useArrayBuffer, onOpened) {\n return new Promise((resolve, reject) => {\n this._requestFile(url, (data) => {\n resolve(data);\n }, onProgress, useOfflineSupport, useArrayBuffer, (error) => {\n reject(error);\n }, onOpened);\n });\n }\n /**\n * @internal\n */\n _readFile(file, onSuccess, onProgress, useArrayBuffer, onError) {\n const request = ReadFile(file, onSuccess, onProgress, useArrayBuffer, onError);\n this._activeRequests.push(request);\n request.onCompleteObservable.add((request) => {\n this._activeRequests.splice(this._activeRequests.indexOf(request), 1);\n });\n return request;\n }\n /**\n * @internal\n */\n _readFileAsync(file, onProgress, useArrayBuffer) {\n return new Promise((resolve, reject) => {\n this._readFile(file, (data) => {\n resolve(data);\n }, onProgress, useArrayBuffer, (error) => {\n reject(error);\n });\n });\n }\n /**\n * This method gets the performance collector belonging to the scene, which is generally shared with the inspector.\n * @returns the perf collector belonging to the scene.\n */\n getPerfCollector() {\n throw _WarnImport(\"performanceViewerSceneExtension\");\n }\n // deprecated\n /**\n * Sets the active camera of the scene using its Id\n * @param id defines the camera's Id\n * @returns the new active camera or null if none found.\n * @deprecated Please use setActiveCameraById instead\n */\n setActiveCameraByID(id) {\n return this.setActiveCameraById(id);\n }\n /**\n * Get a material using its id\n * @param id defines the material's Id\n * @returns the material or null if none found.\n * @deprecated Please use getMaterialById instead\n */\n getMaterialByID(id) {\n return this.getMaterialById(id);\n }\n /**\n * Gets a the last added material using a given id\n * @param id defines the material's Id\n * @returns the last material with the given id or null if none found.\n * @deprecated Please use getLastMaterialById instead\n */\n getLastMaterialByID(id) {\n return this.getLastMaterialById(id);\n }\n /**\n * Get a texture using its unique id\n * @param uniqueId defines the texture's unique id\n * @returns the texture or null if none found.\n * @deprecated Please use getTextureByUniqueId instead\n */\n getTextureByUniqueID(uniqueId) {\n return this.getTextureByUniqueId(uniqueId);\n }\n /**\n * Gets a camera using its Id\n * @param id defines the Id to look for\n * @returns the camera or null if not found\n * @deprecated Please use getCameraById instead\n */\n getCameraByID(id) {\n return this.getCameraById(id);\n }\n /**\n * Gets a camera using its unique Id\n * @param uniqueId defines the unique Id to look for\n * @returns the camera or null if not found\n * @deprecated Please use getCameraByUniqueId instead\n */\n getCameraByUniqueID(uniqueId) {\n return this.getCameraByUniqueId(uniqueId);\n }\n /**\n * Gets a bone using its Id\n * @param id defines the bone's Id\n * @returns the bone or null if not found\n * @deprecated Please use getBoneById instead\n */\n getBoneByID(id) {\n return this.getBoneById(id);\n }\n /**\n * Gets a light node using its Id\n * @param id defines the light's Id\n * @returns the light or null if none found.\n * @deprecated Please use getLightById instead\n */\n getLightByID(id) {\n return this.getLightById(id);\n }\n /**\n * Gets a light node using its scene-generated unique Id\n * @param uniqueId defines the light's unique Id\n * @returns the light or null if none found.\n * @deprecated Please use getLightByUniqueId instead\n */\n getLightByUniqueID(uniqueId) {\n return this.getLightByUniqueId(uniqueId);\n }\n /**\n * Gets a particle system by Id\n * @param id defines the particle system Id\n * @returns the corresponding system or null if none found\n * @deprecated Please use getParticleSystemById instead\n */\n getParticleSystemByID(id) {\n return this.getParticleSystemById(id);\n }\n /**\n * Gets a geometry using its Id\n * @param id defines the geometry's Id\n * @returns the geometry or null if none found.\n * @deprecated Please use getGeometryById instead\n */\n getGeometryByID(id) {\n return this.getGeometryById(id);\n }\n /**\n * Gets the first added mesh found of a given Id\n * @param id defines the Id to search for\n * @returns the mesh found or null if not found at all\n * @deprecated Please use getMeshById instead\n */\n getMeshByID(id) {\n return this.getMeshById(id);\n }\n /**\n * Gets a mesh with its auto-generated unique Id\n * @param uniqueId defines the unique Id to search for\n * @returns the found mesh or null if not found at all.\n * @deprecated Please use getMeshByUniqueId instead\n */\n getMeshByUniqueID(uniqueId) {\n return this.getMeshByUniqueId(uniqueId);\n }\n /**\n * Gets a the last added mesh using a given Id\n * @param id defines the Id to search for\n * @returns the found mesh or null if not found at all.\n * @deprecated Please use getLastMeshById instead\n */\n getLastMeshByID(id) {\n return this.getLastMeshById(id);\n }\n /**\n * Gets a list of meshes using their Id\n * @param id defines the Id to search for\n * @returns a list of meshes\n * @deprecated Please use getMeshesById instead\n */\n getMeshesByID(id) {\n return this.getMeshesById(id);\n }\n /**\n * Gets the first added transform node found of a given Id\n * @param id defines the Id to search for\n * @returns the found transform node or null if not found at all.\n * @deprecated Please use getTransformNodeById instead\n */\n getTransformNodeByID(id) {\n return this.getTransformNodeById(id);\n }\n /**\n * Gets a transform node with its auto-generated unique Id\n * @param uniqueId defines the unique Id to search for\n * @returns the found transform node or null if not found at all.\n * @deprecated Please use getTransformNodeByUniqueId instead\n */\n getTransformNodeByUniqueID(uniqueId) {\n return this.getTransformNodeByUniqueId(uniqueId);\n }\n /**\n * Gets a list of transform nodes using their Id\n * @param id defines the Id to search for\n * @returns a list of transform nodes\n * @deprecated Please use getTransformNodesById instead\n */\n getTransformNodesByID(id) {\n return this.getTransformNodesById(id);\n }\n /**\n * Gets a node (Mesh, Camera, Light) using a given Id\n * @param id defines the Id to search for\n * @returns the found node or null if not found at all\n * @deprecated Please use getNodeById instead\n */\n getNodeByID(id) {\n return this.getNodeById(id);\n }\n /**\n * Gets a the last added node (Mesh, Camera, Light) using a given Id\n * @param id defines the Id to search for\n * @returns the found node or null if not found at all\n * @deprecated Please use getLastEntryById instead\n */\n getLastEntryByID(id) {\n return this.getLastEntryById(id);\n }\n /**\n * Gets a skeleton using a given Id (if many are found, this function will pick the last one)\n * @param id defines the Id to search for\n * @returns the found skeleton or null if not found at all.\n * @deprecated Please use getLastSkeletonById instead\n */\n getLastSkeletonByID(id) {\n return this.getLastSkeletonById(id);\n }\n}\n/** The fog is deactivated */\nScene.FOGMODE_NONE = 0;\n/** The fog density is following an exponential function */\nScene.FOGMODE_EXP = 1;\n/** The fog density is following an exponential function faster than FOGMODE_EXP */\nScene.FOGMODE_EXP2 = 2;\n/** The fog density is following a linear function. */\nScene.FOGMODE_LINEAR = 3;\n/**\n * Gets or sets the minimum deltatime when deterministic lock step is enabled\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\n */\nScene.MinDeltaTime = 1.0;\n/**\n * Gets or sets the maximum deltatime when deterministic lock step is enabled\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\n */\nScene.MaxDeltaTime = 1000.0;\n//# sourceMappingURL=scene.js.map","/** @internal */\nexport function addClipPlaneUniforms(uniforms) {\n if (uniforms.indexOf(\"vClipPlane\") === -1) {\n uniforms.push(\"vClipPlane\");\n }\n if (uniforms.indexOf(\"vClipPlane2\") === -1) {\n uniforms.push(\"vClipPlane2\");\n }\n if (uniforms.indexOf(\"vClipPlane3\") === -1) {\n uniforms.push(\"vClipPlane3\");\n }\n if (uniforms.indexOf(\"vClipPlane4\") === -1) {\n uniforms.push(\"vClipPlane4\");\n }\n if (uniforms.indexOf(\"vClipPlane5\") === -1) {\n uniforms.push(\"vClipPlane5\");\n }\n if (uniforms.indexOf(\"vClipPlane6\") === -1) {\n uniforms.push(\"vClipPlane6\");\n }\n}\n/** @internal */\nexport function prepareStringDefinesForClipPlanes(primaryHolder, secondaryHolder, defines) {\n var _a, _b, _c, _d, _e, _f;\n const clipPlane = !!((_a = primaryHolder.clipPlane) !== null && _a !== void 0 ? _a : secondaryHolder.clipPlane);\n const clipPlane2 = !!((_b = primaryHolder.clipPlane2) !== null && _b !== void 0 ? _b : secondaryHolder.clipPlane2);\n const clipPlane3 = !!((_c = primaryHolder.clipPlane3) !== null && _c !== void 0 ? _c : secondaryHolder.clipPlane3);\n const clipPlane4 = !!((_d = primaryHolder.clipPlane4) !== null && _d !== void 0 ? _d : secondaryHolder.clipPlane4);\n const clipPlane5 = !!((_e = primaryHolder.clipPlane5) !== null && _e !== void 0 ? _e : secondaryHolder.clipPlane5);\n const clipPlane6 = !!((_f = primaryHolder.clipPlane6) !== null && _f !== void 0 ? _f : secondaryHolder.clipPlane6);\n if (clipPlane)\n defines.push(\"#define CLIPPLANE\");\n if (clipPlane2)\n defines.push(\"#define CLIPPLANE2\");\n if (clipPlane3)\n defines.push(\"#define CLIPPLANE3\");\n if (clipPlane4)\n defines.push(\"#define CLIPPLANE4\");\n if (clipPlane5)\n defines.push(\"#define CLIPPLANE5\");\n if (clipPlane6)\n defines.push(\"#define CLIPPLANE6\");\n}\n/** @internal */\nexport function prepareDefinesForClipPlanes(primaryHolder, secondaryHolder, defines) {\n var _a, _b, _c, _d, _e, _f;\n let changed = false;\n const clipPlane = !!((_a = primaryHolder.clipPlane) !== null && _a !== void 0 ? _a : secondaryHolder.clipPlane);\n const clipPlane2 = !!((_b = primaryHolder.clipPlane2) !== null && _b !== void 0 ? _b : secondaryHolder.clipPlane2);\n const clipPlane3 = !!((_c = primaryHolder.clipPlane3) !== null && _c !== void 0 ? _c : secondaryHolder.clipPlane3);\n const clipPlane4 = !!((_d = primaryHolder.clipPlane4) !== null && _d !== void 0 ? _d : secondaryHolder.clipPlane4);\n const clipPlane5 = !!((_e = primaryHolder.clipPlane5) !== null && _e !== void 0 ? _e : secondaryHolder.clipPlane5);\n const clipPlane6 = !!((_f = primaryHolder.clipPlane6) !== null && _f !== void 0 ? _f : secondaryHolder.clipPlane6);\n // Do not factorize this code, it breaks browsers optimizations.\n if (defines[\"CLIPPLANE\"] !== clipPlane) {\n defines[\"CLIPPLANE\"] = clipPlane;\n changed = true;\n }\n if (defines[\"CLIPPLANE2\"] !== clipPlane2) {\n defines[\"CLIPPLANE2\"] = clipPlane2;\n changed = true;\n }\n if (defines[\"CLIPPLANE3\"] !== clipPlane3) {\n defines[\"CLIPPLANE3\"] = clipPlane3;\n changed = true;\n }\n if (defines[\"CLIPPLANE4\"] !== clipPlane4) {\n defines[\"CLIPPLANE4\"] = clipPlane4;\n changed = true;\n }\n if (defines[\"CLIPPLANE5\"] !== clipPlane5) {\n defines[\"CLIPPLANE5\"] = clipPlane5;\n changed = true;\n }\n if (defines[\"CLIPPLANE6\"] !== clipPlane6) {\n defines[\"CLIPPLANE6\"] = clipPlane6;\n changed = true;\n }\n return changed;\n}\n/** @internal */\nexport function bindClipPlane(effect, primaryHolder, secondaryHolder) {\n var _a, _b, _c, _d, _e, _f;\n let clipPlane = (_a = primaryHolder.clipPlane) !== null && _a !== void 0 ? _a : secondaryHolder.clipPlane;\n setClipPlane(effect, \"vClipPlane\", clipPlane);\n clipPlane = (_b = primaryHolder.clipPlane2) !== null && _b !== void 0 ? _b : secondaryHolder.clipPlane2;\n setClipPlane(effect, \"vClipPlane2\", clipPlane);\n clipPlane = (_c = primaryHolder.clipPlane3) !== null && _c !== void 0 ? _c : secondaryHolder.clipPlane3;\n setClipPlane(effect, \"vClipPlane3\", clipPlane);\n clipPlane = (_d = primaryHolder.clipPlane4) !== null && _d !== void 0 ? _d : secondaryHolder.clipPlane4;\n setClipPlane(effect, \"vClipPlane4\", clipPlane);\n clipPlane = (_e = primaryHolder.clipPlane5) !== null && _e !== void 0 ? _e : secondaryHolder.clipPlane5;\n setClipPlane(effect, \"vClipPlane5\", clipPlane);\n clipPlane = (_f = primaryHolder.clipPlane6) !== null && _f !== void 0 ? _f : secondaryHolder.clipPlane6;\n setClipPlane(effect, \"vClipPlane6\", clipPlane);\n}\nfunction setClipPlane(effect, uniformName, clipPlane) {\n if (clipPlane) {\n effect.setFloat4(uniformName, clipPlane.normal.x, clipPlane.normal.y, clipPlane.normal.z, clipPlane.d);\n }\n}\n//# sourceMappingURL=clipPlaneMaterialHelper.js.map","import { Logger } from \"../Misc/logger.js\";\nimport { Camera } from \"../Cameras/camera.js\";\nimport { Scene } from \"../scene.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { LightConstants } from \"../Lights/lightConstants.js\";\n\nimport { Color3 } from \"../Maths/math.color.js\";\nimport { prepareDefinesForClipPlanes } from \"./clipPlaneMaterialHelper.js\";\n/**\n * \"Static Class\" containing the most commonly used helper while dealing with material for rendering purpose.\n *\n * It contains the basic tools to help defining defines, binding uniform for the common part of the materials.\n *\n * This works by convention in BabylonJS but is meant to be use only with shader following the in place naming rules and conventions.\n */\nexport class MaterialHelper {\n /**\n * Binds the scene's uniform buffer to the effect.\n * @param effect defines the effect to bind to the scene uniform buffer\n * @param sceneUbo defines the uniform buffer storing scene data\n */\n static BindSceneUniformBuffer(effect, sceneUbo) {\n sceneUbo.bindToEffect(effect, \"Scene\");\n }\n /**\n * Helps preparing the defines values about the UVs in used in the effect.\n * UVs are shared as much as we can across channels in the shaders.\n * @param texture The texture we are preparing the UVs for\n * @param defines The defines to update\n * @param key The channel key \"diffuse\", \"specular\"... used in the shader\n */\n static PrepareDefinesForMergedUV(texture, defines, key) {\n defines._needUVs = true;\n defines[key] = true;\n if (texture.optimizeUVAllocation && texture.getTextureMatrix().isIdentityAs3x2()) {\n defines[key + \"DIRECTUV\"] = texture.coordinatesIndex + 1;\n defines[\"MAINUV\" + (texture.coordinatesIndex + 1)] = true;\n }\n else {\n defines[key + \"DIRECTUV\"] = 0;\n }\n }\n /**\n * Binds a texture matrix value to its corresponding uniform\n * @param texture The texture to bind the matrix for\n * @param uniformBuffer The uniform buffer receiving the data\n * @param key The channel key \"diffuse\", \"specular\"... used in the shader\n */\n static BindTextureMatrix(texture, uniformBuffer, key) {\n const matrix = texture.getTextureMatrix();\n uniformBuffer.updateMatrix(key + \"Matrix\", matrix);\n }\n /**\n * Gets the current status of the fog (should it be enabled?)\n * @param mesh defines the mesh to evaluate for fog support\n * @param scene defines the hosting scene\n * @returns true if fog must be enabled\n */\n static GetFogState(mesh, scene) {\n return scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE;\n }\n /**\n * Helper used to prepare the list of defines associated with misc. values for shader compilation\n * @param mesh defines the current mesh\n * @param scene defines the current scene\n * @param useLogarithmicDepth defines if logarithmic depth has to be turned on\n * @param pointsCloud defines if point cloud rendering has to be turned on\n * @param fogEnabled defines if fog has to be turned on\n * @param alphaTest defines if alpha testing has to be turned on\n * @param defines defines the current list of defines\n * @param applyDecalAfterDetail Defines if the decal is applied after or before the detail\n */\n static PrepareDefinesForMisc(mesh, scene, useLogarithmicDepth, pointsCloud, fogEnabled, alphaTest, defines, applyDecalAfterDetail = false) {\n if (defines._areMiscDirty) {\n defines[\"LOGARITHMICDEPTH\"] = useLogarithmicDepth;\n defines[\"POINTSIZE\"] = pointsCloud;\n defines[\"FOG\"] = fogEnabled && this.GetFogState(mesh, scene);\n defines[\"NONUNIFORMSCALING\"] = mesh.nonUniformScaling;\n defines[\"ALPHATEST\"] = alphaTest;\n defines[\"DECAL_AFTER_DETAIL\"] = applyDecalAfterDetail;\n }\n }\n /**\n * Helper used to prepare the defines relative to the active camera\n * @param scene defines the current scene\n * @param defines specifies the list of active defines\n * @returns true if the defines have been updated, else false\n */\n static PrepareDefinesForCamera(scene, defines) {\n let changed = false;\n if (scene.activeCamera) {\n const wasOrtho = defines[\"CAMERA_ORTHOGRAPHIC\"] ? 1 : 0;\n const wasPersp = defines[\"CAMERA_PERSPECTIVE\"] ? 1 : 0;\n const isOrtho = scene.activeCamera.mode === Camera.ORTHOGRAPHIC_CAMERA ? 1 : 0;\n const isPersp = scene.activeCamera.mode === Camera.PERSPECTIVE_CAMERA ? 1 : 0;\n if (wasOrtho ^ isOrtho || wasPersp ^ isPersp) {\n defines[\"CAMERA_ORTHOGRAPHIC\"] = isOrtho === 1;\n defines[\"CAMERA_PERSPECTIVE\"] = isPersp === 1;\n changed = true;\n }\n }\n return changed;\n }\n /**\n * Helper used to prepare the list of defines associated with frame values for shader compilation\n * @param scene defines the current scene\n * @param engine defines the current engine\n * @param material defines the material we are compiling the shader for\n * @param defines specifies the list of active defines\n * @param useInstances defines if instances have to be turned on\n * @param useClipPlane defines if clip plane have to be turned on\n * @param useThinInstances defines if thin instances have to be turned on\n */\n static PrepareDefinesForFrameBoundValues(scene, engine, material, defines, useInstances, useClipPlane = null, useThinInstances = false) {\n let changed = MaterialHelper.PrepareDefinesForCamera(scene, defines);\n if (useClipPlane !== false) {\n changed = prepareDefinesForClipPlanes(material, scene, defines);\n }\n if (defines[\"DEPTHPREPASS\"] !== !engine.getColorWrite()) {\n defines[\"DEPTHPREPASS\"] = !defines[\"DEPTHPREPASS\"];\n changed = true;\n }\n if (defines[\"INSTANCES\"] !== useInstances) {\n defines[\"INSTANCES\"] = useInstances;\n changed = true;\n }\n if (defines[\"THIN_INSTANCES\"] !== useThinInstances) {\n defines[\"THIN_INSTANCES\"] = useThinInstances;\n changed = true;\n }\n if (changed) {\n defines.markAsUnprocessed();\n }\n }\n /**\n * Prepares the defines for bones\n * @param mesh The mesh containing the geometry data we will draw\n * @param defines The defines to update\n */\n static PrepareDefinesForBones(mesh, defines) {\n if (mesh.useBones && mesh.computeBonesUsingShaders && mesh.skeleton) {\n defines[\"NUM_BONE_INFLUENCERS\"] = mesh.numBoneInfluencers;\n const materialSupportsBoneTexture = defines[\"BONETEXTURE\"] !== undefined;\n if (mesh.skeleton.isUsingTextureForMatrices && materialSupportsBoneTexture) {\n defines[\"BONETEXTURE\"] = true;\n }\n else {\n defines[\"BonesPerMesh\"] = mesh.skeleton.bones.length + 1;\n defines[\"BONETEXTURE\"] = materialSupportsBoneTexture ? false : undefined;\n const prePassRenderer = mesh.getScene().prePassRenderer;\n if (prePassRenderer && prePassRenderer.enabled) {\n const nonExcluded = prePassRenderer.excludedSkinnedMesh.indexOf(mesh) === -1;\n defines[\"BONES_VELOCITY_ENABLED\"] = nonExcluded;\n }\n }\n }\n else {\n defines[\"NUM_BONE_INFLUENCERS\"] = 0;\n defines[\"BonesPerMesh\"] = 0;\n if (defines[\"BONETEXTURE\"] !== undefined) {\n defines[\"BONETEXTURE\"] = false;\n }\n }\n }\n /**\n * Prepares the defines for morph targets\n * @param mesh The mesh containing the geometry data we will draw\n * @param defines The defines to update\n */\n static PrepareDefinesForMorphTargets(mesh, defines) {\n const manager = mesh.morphTargetManager;\n if (manager) {\n defines[\"MORPHTARGETS_UV\"] = manager.supportsUVs && defines[\"UV1\"];\n defines[\"MORPHTARGETS_TANGENT\"] = manager.supportsTangents && defines[\"TANGENT\"];\n defines[\"MORPHTARGETS_NORMAL\"] = manager.supportsNormals && defines[\"NORMAL\"];\n defines[\"MORPHTARGETS\"] = manager.numInfluencers > 0;\n defines[\"NUM_MORPH_INFLUENCERS\"] = manager.numInfluencers;\n defines[\"MORPHTARGETS_TEXTURE\"] = manager.isUsingTextureForTargets;\n }\n else {\n defines[\"MORPHTARGETS_UV\"] = false;\n defines[\"MORPHTARGETS_TANGENT\"] = false;\n defines[\"MORPHTARGETS_NORMAL\"] = false;\n defines[\"MORPHTARGETS\"] = false;\n defines[\"NUM_MORPH_INFLUENCERS\"] = 0;\n }\n }\n /**\n * Prepares the defines for baked vertex animation\n * @param mesh The mesh containing the geometry data we will draw\n * @param defines The defines to update\n */\n static PrepareDefinesForBakedVertexAnimation(mesh, defines) {\n const manager = mesh.bakedVertexAnimationManager;\n defines[\"BAKED_VERTEX_ANIMATION_TEXTURE\"] = manager && manager.isEnabled ? true : false;\n }\n /**\n * Prepares the defines used in the shader depending on the attributes data available in the mesh\n * @param mesh The mesh containing the geometry data we will draw\n * @param defines The defines to update\n * @param useVertexColor Precise whether vertex colors should be used or not (override mesh info)\n * @param useBones Precise whether bones should be used or not (override mesh info)\n * @param useMorphTargets Precise whether morph targets should be used or not (override mesh info)\n * @param useVertexAlpha Precise whether vertex alpha should be used or not (override mesh info)\n * @param useBakedVertexAnimation Precise whether baked vertex animation should be used or not (override mesh info)\n * @returns false if defines are considered not dirty and have not been checked\n */\n static PrepareDefinesForAttributes(mesh, defines, useVertexColor, useBones, useMorphTargets = false, useVertexAlpha = true, useBakedVertexAnimation = true) {\n if (!defines._areAttributesDirty && defines._needNormals === defines._normals && defines._needUVs === defines._uvs) {\n return false;\n }\n defines._normals = defines._needNormals;\n defines._uvs = defines._needUVs;\n defines[\"NORMAL\"] = defines._needNormals && mesh.isVerticesDataPresent(VertexBuffer.NormalKind);\n if (defines._needNormals && mesh.isVerticesDataPresent(VertexBuffer.TangentKind)) {\n defines[\"TANGENT\"] = true;\n }\n for (let i = 1; i <= 6; ++i) {\n defines[\"UV\" + i] = defines._needUVs ? mesh.isVerticesDataPresent(`uv${i === 1 ? \"\" : i}`) : false;\n }\n if (useVertexColor) {\n const hasVertexColors = mesh.useVertexColors && mesh.isVerticesDataPresent(VertexBuffer.ColorKind);\n defines[\"VERTEXCOLOR\"] = hasVertexColors;\n defines[\"VERTEXALPHA\"] = mesh.hasVertexAlpha && hasVertexColors && useVertexAlpha;\n }\n if (mesh.isVerticesDataPresent(VertexBuffer.ColorInstanceKind) && (mesh.hasInstances || mesh.hasThinInstances)) {\n defines[\"INSTANCESCOLOR\"] = true;\n }\n if (useBones) {\n this.PrepareDefinesForBones(mesh, defines);\n }\n if (useMorphTargets) {\n this.PrepareDefinesForMorphTargets(mesh, defines);\n }\n if (useBakedVertexAnimation) {\n this.PrepareDefinesForBakedVertexAnimation(mesh, defines);\n }\n return true;\n }\n /**\n * Prepares the defines related to multiview\n * @param scene The scene we are intending to draw\n * @param defines The defines to update\n */\n static PrepareDefinesForMultiview(scene, defines) {\n if (scene.activeCamera) {\n const previousMultiview = defines.MULTIVIEW;\n defines.MULTIVIEW = scene.activeCamera.outputRenderTarget !== null && scene.activeCamera.outputRenderTarget.getViewCount() > 1;\n if (defines.MULTIVIEW != previousMultiview) {\n defines.markAsUnprocessed();\n }\n }\n }\n /**\n * Prepares the defines related to order independant transparency\n * @param scene The scene we are intending to draw\n * @param defines The defines to update\n * @param needAlphaBlending Determines if the material needs alpha blending\n */\n static PrepareDefinesForOIT(scene, defines, needAlphaBlending) {\n const previousDefine = defines.ORDER_INDEPENDENT_TRANSPARENCY;\n const previousDefine16Bits = defines.ORDER_INDEPENDENT_TRANSPARENCY_16BITS;\n defines.ORDER_INDEPENDENT_TRANSPARENCY = scene.useOrderIndependentTransparency && needAlphaBlending;\n defines.ORDER_INDEPENDENT_TRANSPARENCY_16BITS = !scene.getEngine().getCaps().textureFloatLinearFiltering;\n if (previousDefine !== defines.ORDER_INDEPENDENT_TRANSPARENCY || previousDefine16Bits !== defines.ORDER_INDEPENDENT_TRANSPARENCY_16BITS) {\n defines.markAsUnprocessed();\n }\n }\n /**\n * Prepares the defines related to the prepass\n * @param scene The scene we are intending to draw\n * @param defines The defines to update\n * @param canRenderToMRT Indicates if this material renders to several textures in the prepass\n */\n static PrepareDefinesForPrePass(scene, defines, canRenderToMRT) {\n const previousPrePass = defines.PREPASS;\n if (!defines._arePrePassDirty) {\n return;\n }\n const texturesList = [\n {\n type: 1,\n define: \"PREPASS_POSITION\",\n index: \"PREPASS_POSITION_INDEX\",\n },\n {\n type: 2,\n define: \"PREPASS_VELOCITY\",\n index: \"PREPASS_VELOCITY_INDEX\",\n },\n {\n type: 3,\n define: \"PREPASS_REFLECTIVITY\",\n index: \"PREPASS_REFLECTIVITY_INDEX\",\n },\n {\n type: 0,\n define: \"PREPASS_IRRADIANCE\",\n index: \"PREPASS_IRRADIANCE_INDEX\",\n },\n {\n type: 7,\n define: \"PREPASS_ALBEDO_SQRT\",\n index: \"PREPASS_ALBEDO_SQRT_INDEX\",\n },\n {\n type: 5,\n define: \"PREPASS_DEPTH\",\n index: \"PREPASS_DEPTH_INDEX\",\n },\n {\n type: 6,\n define: \"PREPASS_NORMAL\",\n index: \"PREPASS_NORMAL_INDEX\",\n },\n ];\n if (scene.prePassRenderer && scene.prePassRenderer.enabled && canRenderToMRT) {\n defines.PREPASS = true;\n defines.SCENE_MRT_COUNT = scene.prePassRenderer.mrtCount;\n defines.PREPASS_NORMAL_WORLDSPACE = scene.prePassRenderer.generateNormalsInWorldSpace;\n for (let i = 0; i < texturesList.length; i++) {\n const index = scene.prePassRenderer.getIndex(texturesList[i].type);\n if (index !== -1) {\n defines[texturesList[i].define] = true;\n defines[texturesList[i].index] = index;\n }\n else {\n defines[texturesList[i].define] = false;\n }\n }\n }\n else {\n defines.PREPASS = false;\n for (let i = 0; i < texturesList.length; i++) {\n defines[texturesList[i].define] = false;\n }\n }\n if (defines.PREPASS != previousPrePass) {\n defines.markAsUnprocessed();\n defines.markAsImageProcessingDirty();\n }\n }\n /**\n * Prepares the defines related to the light information passed in parameter\n * @param scene The scene we are intending to draw\n * @param mesh The mesh the effect is compiling for\n * @param light The light the effect is compiling for\n * @param lightIndex The index of the light\n * @param defines The defines to update\n * @param specularSupported Specifies whether specular is supported or not (override lights data)\n * @param state Defines the current state regarding what is needed (normals, etc...)\n * @param state.needNormals\n * @param state.needRebuild\n * @param state.shadowEnabled\n * @param state.specularEnabled\n * @param state.lightmapMode\n */\n static PrepareDefinesForLight(scene, mesh, light, lightIndex, defines, specularSupported, state) {\n var _a;\n state.needNormals = true;\n if (defines[\"LIGHT\" + lightIndex] === undefined) {\n state.needRebuild = true;\n }\n defines[\"LIGHT\" + lightIndex] = true;\n defines[\"SPOTLIGHT\" + lightIndex] = false;\n defines[\"HEMILIGHT\" + lightIndex] = false;\n defines[\"POINTLIGHT\" + lightIndex] = false;\n defines[\"DIRLIGHT\" + lightIndex] = false;\n light.prepareLightSpecificDefines(defines, lightIndex);\n // FallOff.\n defines[\"LIGHT_FALLOFF_PHYSICAL\" + lightIndex] = false;\n defines[\"LIGHT_FALLOFF_GLTF\" + lightIndex] = false;\n defines[\"LIGHT_FALLOFF_STANDARD\" + lightIndex] = false;\n switch (light.falloffType) {\n case LightConstants.FALLOFF_GLTF:\n defines[\"LIGHT_FALLOFF_GLTF\" + lightIndex] = true;\n break;\n case LightConstants.FALLOFF_PHYSICAL:\n defines[\"LIGHT_FALLOFF_PHYSICAL\" + lightIndex] = true;\n break;\n case LightConstants.FALLOFF_STANDARD:\n defines[\"LIGHT_FALLOFF_STANDARD\" + lightIndex] = true;\n break;\n }\n // Specular\n if (specularSupported && !light.specular.equalsFloats(0, 0, 0)) {\n state.specularEnabled = true;\n }\n // Shadows\n defines[\"SHADOW\" + lightIndex] = false;\n defines[\"SHADOWCSM\" + lightIndex] = false;\n defines[\"SHADOWCSMDEBUG\" + lightIndex] = false;\n defines[\"SHADOWCSMNUM_CASCADES\" + lightIndex] = false;\n defines[\"SHADOWCSMUSESHADOWMAXZ\" + lightIndex] = false;\n defines[\"SHADOWCSMNOBLEND\" + lightIndex] = false;\n defines[\"SHADOWCSM_RIGHTHANDED\" + lightIndex] = false;\n defines[\"SHADOWPCF\" + lightIndex] = false;\n defines[\"SHADOWPCSS\" + lightIndex] = false;\n defines[\"SHADOWPOISSON\" + lightIndex] = false;\n defines[\"SHADOWESM\" + lightIndex] = false;\n defines[\"SHADOWCLOSEESM\" + lightIndex] = false;\n defines[\"SHADOWCUBE\" + lightIndex] = false;\n defines[\"SHADOWLOWQUALITY\" + lightIndex] = false;\n defines[\"SHADOWMEDIUMQUALITY\" + lightIndex] = false;\n if (mesh && mesh.receiveShadows && scene.shadowsEnabled && light.shadowEnabled) {\n const shadowGenerator = (_a = light.getShadowGenerator(scene.activeCamera)) !== null && _a !== void 0 ? _a : light.getShadowGenerator();\n if (shadowGenerator) {\n const shadowMap = shadowGenerator.getShadowMap();\n if (shadowMap) {\n if (shadowMap.renderList && shadowMap.renderList.length > 0) {\n state.shadowEnabled = true;\n shadowGenerator.prepareDefines(defines, lightIndex);\n }\n }\n }\n }\n if (light.lightmapMode != LightConstants.LIGHTMAP_DEFAULT) {\n state.lightmapMode = true;\n defines[\"LIGHTMAPEXCLUDED\" + lightIndex] = true;\n defines[\"LIGHTMAPNOSPECULAR\" + lightIndex] = light.lightmapMode == LightConstants.LIGHTMAP_SHADOWSONLY;\n }\n else {\n defines[\"LIGHTMAPEXCLUDED\" + lightIndex] = false;\n defines[\"LIGHTMAPNOSPECULAR\" + lightIndex] = false;\n }\n }\n /**\n * Prepares the defines related to the light information passed in parameter\n * @param scene The scene we are intending to draw\n * @param mesh The mesh the effect is compiling for\n * @param defines The defines to update\n * @param specularSupported Specifies whether specular is supported or not (override lights data)\n * @param maxSimultaneousLights Specifies how manuy lights can be added to the effect at max\n * @param disableLighting Specifies whether the lighting is disabled (override scene and light)\n * @returns true if normals will be required for the rest of the effect\n */\n static PrepareDefinesForLights(scene, mesh, defines, specularSupported, maxSimultaneousLights = 4, disableLighting = false) {\n if (!defines._areLightsDirty) {\n return defines._needNormals;\n }\n let lightIndex = 0;\n const state = {\n needNormals: defines._needNormals,\n needRebuild: false,\n lightmapMode: false,\n shadowEnabled: false,\n specularEnabled: false,\n };\n if (scene.lightsEnabled && !disableLighting) {\n for (const light of mesh.lightSources) {\n this.PrepareDefinesForLight(scene, mesh, light, lightIndex, defines, specularSupported, state);\n lightIndex++;\n if (lightIndex === maxSimultaneousLights) {\n break;\n }\n }\n }\n defines[\"SPECULARTERM\"] = state.specularEnabled;\n defines[\"SHADOWS\"] = state.shadowEnabled;\n // Resetting all other lights if any\n for (let index = lightIndex; index < maxSimultaneousLights; index++) {\n if (defines[\"LIGHT\" + index] !== undefined) {\n defines[\"LIGHT\" + index] = false;\n defines[\"HEMILIGHT\" + index] = false;\n defines[\"POINTLIGHT\" + index] = false;\n defines[\"DIRLIGHT\" + index] = false;\n defines[\"SPOTLIGHT\" + index] = false;\n defines[\"SHADOW\" + index] = false;\n defines[\"SHADOWCSM\" + index] = false;\n defines[\"SHADOWCSMDEBUG\" + index] = false;\n defines[\"SHADOWCSMNUM_CASCADES\" + index] = false;\n defines[\"SHADOWCSMUSESHADOWMAXZ\" + index] = false;\n defines[\"SHADOWCSMNOBLEND\" + index] = false;\n defines[\"SHADOWCSM_RIGHTHANDED\" + index] = false;\n defines[\"SHADOWPCF\" + index] = false;\n defines[\"SHADOWPCSS\" + index] = false;\n defines[\"SHADOWPOISSON\" + index] = false;\n defines[\"SHADOWESM\" + index] = false;\n defines[\"SHADOWCLOSEESM\" + index] = false;\n defines[\"SHADOWCUBE\" + index] = false;\n defines[\"SHADOWLOWQUALITY\" + index] = false;\n defines[\"SHADOWMEDIUMQUALITY\" + index] = false;\n }\n }\n const caps = scene.getEngine().getCaps();\n if (defines[\"SHADOWFLOAT\"] === undefined) {\n state.needRebuild = true;\n }\n defines[\"SHADOWFLOAT\"] =\n state.shadowEnabled && ((caps.textureFloatRender && caps.textureFloatLinearFiltering) || (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering));\n defines[\"LIGHTMAPEXCLUDED\"] = state.lightmapMode;\n if (state.needRebuild) {\n defines.rebuild();\n }\n return state.needNormals;\n }\n /**\n * Prepares the uniforms and samplers list to be used in the effect (for a specific light)\n * @param lightIndex defines the light index\n * @param uniformsList The uniform list\n * @param samplersList The sampler list\n * @param projectedLightTexture defines if projected texture must be used\n * @param uniformBuffersList defines an optional list of uniform buffers\n * @param updateOnlyBuffersList True to only update the uniformBuffersList array\n */\n static PrepareUniformsAndSamplersForLight(lightIndex, uniformsList, samplersList, projectedLightTexture, uniformBuffersList = null, updateOnlyBuffersList = false) {\n if (uniformBuffersList) {\n uniformBuffersList.push(\"Light\" + lightIndex);\n }\n if (updateOnlyBuffersList) {\n return;\n }\n uniformsList.push(\"vLightData\" + lightIndex, \"vLightDiffuse\" + lightIndex, \"vLightSpecular\" + lightIndex, \"vLightDirection\" + lightIndex, \"vLightFalloff\" + lightIndex, \"vLightGround\" + lightIndex, \"lightMatrix\" + lightIndex, \"shadowsInfo\" + lightIndex, \"depthValues\" + lightIndex);\n samplersList.push(\"shadowSampler\" + lightIndex);\n samplersList.push(\"depthSampler\" + lightIndex);\n uniformsList.push(\"viewFrustumZ\" + lightIndex, \"cascadeBlendFactor\" + lightIndex, \"lightSizeUVCorrection\" + lightIndex, \"depthCorrection\" + lightIndex, \"penumbraDarkness\" + lightIndex, \"frustumLengths\" + lightIndex);\n if (projectedLightTexture) {\n samplersList.push(\"projectionLightSampler\" + lightIndex);\n uniformsList.push(\"textureProjectionMatrix\" + lightIndex);\n }\n }\n /**\n * Prepares the uniforms and samplers list to be used in the effect\n * @param uniformsListOrOptions The uniform names to prepare or an EffectCreationOptions containing the list and extra information\n * @param samplersList The sampler list\n * @param defines The defines helping in the list generation\n * @param maxSimultaneousLights The maximum number of simultaneous light allowed in the effect\n */\n static PrepareUniformsAndSamplersList(uniformsListOrOptions, samplersList, defines, maxSimultaneousLights = 4) {\n let uniformsList;\n let uniformBuffersList = null;\n if (uniformsListOrOptions.uniformsNames) {\n const options = uniformsListOrOptions;\n uniformsList = options.uniformsNames;\n uniformBuffersList = options.uniformBuffersNames;\n samplersList = options.samplers;\n defines = options.defines;\n maxSimultaneousLights = options.maxSimultaneousLights || 0;\n }\n else {\n uniformsList = uniformsListOrOptions;\n if (!samplersList) {\n samplersList = [];\n }\n }\n for (let lightIndex = 0; lightIndex < maxSimultaneousLights; lightIndex++) {\n if (!defines[\"LIGHT\" + lightIndex]) {\n break;\n }\n this.PrepareUniformsAndSamplersForLight(lightIndex, uniformsList, samplersList, defines[\"PROJECTEDLIGHTTEXTURE\" + lightIndex], uniformBuffersList);\n }\n if (defines[\"NUM_MORPH_INFLUENCERS\"]) {\n uniformsList.push(\"morphTargetInfluences\");\n }\n if (defines[\"BAKED_VERTEX_ANIMATION_TEXTURE\"]) {\n uniformsList.push(\"bakedVertexAnimationSettings\");\n uniformsList.push(\"bakedVertexAnimationTextureSizeInverted\");\n uniformsList.push(\"bakedVertexAnimationTime\");\n samplersList.push(\"bakedVertexAnimationTexture\");\n }\n }\n /**\n * This helps decreasing rank by rank the shadow quality (0 being the highest rank and quality)\n * @param defines The defines to update while falling back\n * @param fallbacks The authorized effect fallbacks\n * @param maxSimultaneousLights The maximum number of lights allowed\n * @param rank the current rank of the Effect\n * @returns The newly affected rank\n */\n static HandleFallbacksForShadows(defines, fallbacks, maxSimultaneousLights = 4, rank = 0) {\n let lightFallbackRank = 0;\n for (let lightIndex = 0; lightIndex < maxSimultaneousLights; lightIndex++) {\n if (!defines[\"LIGHT\" + lightIndex]) {\n break;\n }\n if (lightIndex > 0) {\n lightFallbackRank = rank + lightIndex;\n fallbacks.addFallback(lightFallbackRank, \"LIGHT\" + lightIndex);\n }\n if (!defines[\"SHADOWS\"]) {\n if (defines[\"SHADOW\" + lightIndex]) {\n fallbacks.addFallback(rank, \"SHADOW\" + lightIndex);\n }\n if (defines[\"SHADOWPCF\" + lightIndex]) {\n fallbacks.addFallback(rank, \"SHADOWPCF\" + lightIndex);\n }\n if (defines[\"SHADOWPCSS\" + lightIndex]) {\n fallbacks.addFallback(rank, \"SHADOWPCSS\" + lightIndex);\n }\n if (defines[\"SHADOWPOISSON\" + lightIndex]) {\n fallbacks.addFallback(rank, \"SHADOWPOISSON\" + lightIndex);\n }\n if (defines[\"SHADOWESM\" + lightIndex]) {\n fallbacks.addFallback(rank, \"SHADOWESM\" + lightIndex);\n }\n if (defines[\"SHADOWCLOSEESM\" + lightIndex]) {\n fallbacks.addFallback(rank, \"SHADOWCLOSEESM\" + lightIndex);\n }\n }\n }\n return lightFallbackRank++;\n }\n /**\n * Prepares the list of attributes required for morph targets according to the effect defines.\n * @param attribs The current list of supported attribs\n * @param mesh The mesh to prepare the morph targets attributes for\n * @param influencers The number of influencers\n */\n static PrepareAttributesForMorphTargetsInfluencers(attribs, mesh, influencers) {\n this._TmpMorphInfluencers.NUM_MORPH_INFLUENCERS = influencers;\n this.PrepareAttributesForMorphTargets(attribs, mesh, this._TmpMorphInfluencers);\n }\n /**\n * Prepares the list of attributes required for morph targets according to the effect defines.\n * @param attribs The current list of supported attribs\n * @param mesh The mesh to prepare the morph targets attributes for\n * @param defines The current Defines of the effect\n */\n static PrepareAttributesForMorphTargets(attribs, mesh, defines) {\n const influencers = defines[\"NUM_MORPH_INFLUENCERS\"];\n if (influencers > 0 && EngineStore.LastCreatedEngine) {\n const maxAttributesCount = EngineStore.LastCreatedEngine.getCaps().maxVertexAttribs;\n const manager = mesh.morphTargetManager;\n if (manager === null || manager === void 0 ? void 0 : manager.isUsingTextureForTargets) {\n return;\n }\n const normal = manager && manager.supportsNormals && defines[\"NORMAL\"];\n const tangent = manager && manager.supportsTangents && defines[\"TANGENT\"];\n const uv = manager && manager.supportsUVs && defines[\"UV1\"];\n for (let index = 0; index < influencers; index++) {\n attribs.push(VertexBuffer.PositionKind + index);\n if (normal) {\n attribs.push(VertexBuffer.NormalKind + index);\n }\n if (tangent) {\n attribs.push(VertexBuffer.TangentKind + index);\n }\n if (uv) {\n attribs.push(VertexBuffer.UVKind + \"_\" + index);\n }\n if (attribs.length > maxAttributesCount) {\n Logger.Error(\"Cannot add more vertex attributes for mesh \" + mesh.name);\n }\n }\n }\n }\n /**\n * Prepares the list of attributes required for baked vertex animations according to the effect defines.\n * @param attribs The current list of supported attribs\n * @param mesh The mesh to prepare the morph targets attributes for\n * @param defines The current Defines of the effect\n */\n static PrepareAttributesForBakedVertexAnimation(attribs, mesh, defines) {\n const enabled = defines[\"BAKED_VERTEX_ANIMATION_TEXTURE\"] && defines[\"INSTANCES\"];\n if (enabled) {\n attribs.push(\"bakedVertexAnimationSettingsInstanced\");\n }\n }\n /**\n * Prepares the list of attributes required for bones according to the effect defines.\n * @param attribs The current list of supported attribs\n * @param mesh The mesh to prepare the bones attributes for\n * @param defines The current Defines of the effect\n * @param fallbacks The current effect fallback strategy\n */\n static PrepareAttributesForBones(attribs, mesh, defines, fallbacks) {\n if (defines[\"NUM_BONE_INFLUENCERS\"] > 0) {\n fallbacks.addCPUSkinningFallback(0, mesh);\n attribs.push(VertexBuffer.MatricesIndicesKind);\n attribs.push(VertexBuffer.MatricesWeightsKind);\n if (defines[\"NUM_BONE_INFLUENCERS\"] > 4) {\n attribs.push(VertexBuffer.MatricesIndicesExtraKind);\n attribs.push(VertexBuffer.MatricesWeightsExtraKind);\n }\n }\n }\n /**\n * Check and prepare the list of attributes required for instances according to the effect defines.\n * @param attribs The current list of supported attribs\n * @param defines The current MaterialDefines of the effect\n */\n static PrepareAttributesForInstances(attribs, defines) {\n if (defines[\"INSTANCES\"] || defines[\"THIN_INSTANCES\"]) {\n this.PushAttributesForInstances(attribs, !!defines[\"PREPASS_VELOCITY\"]);\n }\n if (defines.INSTANCESCOLOR) {\n attribs.push(VertexBuffer.ColorInstanceKind);\n }\n }\n /**\n * Add the list of attributes required for instances to the attribs array.\n * @param attribs The current list of supported attribs\n * @param needsPreviousMatrices If the shader needs previous matrices\n */\n static PushAttributesForInstances(attribs, needsPreviousMatrices = false) {\n attribs.push(\"world0\");\n attribs.push(\"world1\");\n attribs.push(\"world2\");\n attribs.push(\"world3\");\n if (needsPreviousMatrices) {\n attribs.push(\"previousWorld0\");\n attribs.push(\"previousWorld1\");\n attribs.push(\"previousWorld2\");\n attribs.push(\"previousWorld3\");\n }\n }\n /**\n * Binds the light information to the effect.\n * @param light The light containing the generator\n * @param effect The effect we are binding the data to\n * @param lightIndex The light index in the effect used to render\n */\n static BindLightProperties(light, effect, lightIndex) {\n light.transferToEffect(effect, lightIndex + \"\");\n }\n /**\n * Binds the lights information from the scene to the effect for the given mesh.\n * @param light Light to bind\n * @param lightIndex Light index\n * @param scene The scene where the light belongs to\n * @param effect The effect we are binding the data to\n * @param useSpecular Defines if specular is supported\n * @param receiveShadows Defines if the effect (mesh) we bind the light for receives shadows\n */\n static BindLight(light, lightIndex, scene, effect, useSpecular, receiveShadows = true) {\n light._bindLight(lightIndex, scene, effect, useSpecular, receiveShadows);\n }\n /**\n * Binds the lights information from the scene to the effect for the given mesh.\n * @param scene The scene the lights belongs to\n * @param mesh The mesh we are binding the information to render\n * @param effect The effect we are binding the data to\n * @param defines The generated defines for the effect\n * @param maxSimultaneousLights The maximum number of light that can be bound to the effect\n */\n static BindLights(scene, mesh, effect, defines, maxSimultaneousLights = 4) {\n const len = Math.min(mesh.lightSources.length, maxSimultaneousLights);\n for (let i = 0; i < len; i++) {\n const light = mesh.lightSources[i];\n this.BindLight(light, i, scene, effect, typeof defines === \"boolean\" ? defines : defines[\"SPECULARTERM\"], mesh.receiveShadows);\n }\n }\n /**\n * Binds the fog information from the scene to the effect for the given mesh.\n * @param scene The scene the lights belongs to\n * @param mesh The mesh we are binding the information to render\n * @param effect The effect we are binding the data to\n * @param linearSpace Defines if the fog effect is applied in linear space\n */\n static BindFogParameters(scene, mesh, effect, linearSpace = false) {\n if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) {\n effect.setFloat4(\"vFogInfos\", scene.fogMode, scene.fogStart, scene.fogEnd, scene.fogDensity);\n // Convert fog color to linear space if used in a linear space computed shader.\n if (linearSpace) {\n scene.fogColor.toLinearSpaceToRef(this._TempFogColor, scene.getEngine().useExactSrgbConversions);\n effect.setColor3(\"vFogColor\", this._TempFogColor);\n }\n else {\n effect.setColor3(\"vFogColor\", scene.fogColor);\n }\n }\n }\n /**\n * Binds the bones information from the mesh to the effect.\n * @param mesh The mesh we are binding the information to render\n * @param effect The effect we are binding the data to\n * @param prePassConfiguration Configuration for the prepass, in case prepass is activated\n */\n static BindBonesParameters(mesh, effect, prePassConfiguration) {\n if (!effect || !mesh) {\n return;\n }\n if (mesh.computeBonesUsingShaders && effect._bonesComputationForcedToCPU) {\n mesh.computeBonesUsingShaders = false;\n }\n if (mesh.useBones && mesh.computeBonesUsingShaders && mesh.skeleton) {\n const skeleton = mesh.skeleton;\n if (skeleton.isUsingTextureForMatrices && effect.getUniformIndex(\"boneTextureWidth\") > -1) {\n const boneTexture = skeleton.getTransformMatrixTexture(mesh);\n effect.setTexture(\"boneSampler\", boneTexture);\n effect.setFloat(\"boneTextureWidth\", 4.0 * (skeleton.bones.length + 1));\n }\n else {\n const matrices = skeleton.getTransformMatrices(mesh);\n if (matrices) {\n effect.setMatrices(\"mBones\", matrices);\n if (prePassConfiguration && mesh.getScene().prePassRenderer && mesh.getScene().prePassRenderer.getIndex(2)) {\n if (!prePassConfiguration.previousBones[mesh.uniqueId]) {\n prePassConfiguration.previousBones[mesh.uniqueId] = matrices.slice();\n }\n effect.setMatrices(\"mPreviousBones\", prePassConfiguration.previousBones[mesh.uniqueId]);\n MaterialHelper._CopyBonesTransformationMatrices(matrices, prePassConfiguration.previousBones[mesh.uniqueId]);\n }\n }\n }\n }\n }\n // Copies the bones transformation matrices into the target array and returns the target's reference\n static _CopyBonesTransformationMatrices(source, target) {\n target.set(source);\n return target;\n }\n /**\n * Binds the morph targets information from the mesh to the effect.\n * @param abstractMesh The mesh we are binding the information to render\n * @param effect The effect we are binding the data to\n */\n static BindMorphTargetParameters(abstractMesh, effect) {\n const manager = abstractMesh.morphTargetManager;\n if (!abstractMesh || !manager) {\n return;\n }\n effect.setFloatArray(\"morphTargetInfluences\", manager.influences);\n }\n /**\n * Binds the logarithmic depth information from the scene to the effect for the given defines.\n * @param defines The generated defines used in the effect\n * @param effect The effect we are binding the data to\n * @param scene The scene we are willing to render with logarithmic scale for\n */\n static BindLogDepth(defines, effect, scene) {\n if (!defines || defines[\"LOGARITHMICDEPTH\"] || (defines.indexOf && defines.indexOf(\"LOGARITHMICDEPTH\") >= 0)) {\n const camera = scene.activeCamera;\n if (camera.mode === Camera.ORTHOGRAPHIC_CAMERA) {\n Logger.Error(\"Logarithmic depth is not compatible with orthographic cameras!\", 20);\n }\n effect.setFloat(\"logarithmicDepthConstant\", 2.0 / (Math.log(camera.maxZ + 1.0) / Math.LN2));\n }\n }\n}\n// eslint-disable-next-line @typescript-eslint/naming-convention\nMaterialHelper._TmpMorphInfluencers = { NUM_MORPH_INFLUENCERS: 0 };\nMaterialHelper._TempFogColor = Color3.Black();\n//# sourceMappingURL=materialHelper.js.map","/**\n * Size containing width and height\n */\nexport class Size {\n /**\n * Creates a Size object from the given width and height (floats).\n * @param width width of the new size\n * @param height height of the new size\n */\n constructor(width, height) {\n this.width = width;\n this.height = height;\n }\n /**\n * Returns a string with the Size width and height\n * @returns a string with the Size width and height\n */\n toString() {\n return `{W: ${this.width}, H: ${this.height}}`;\n }\n /**\n * \"Size\"\n * @returns the string \"Size\"\n */\n getClassName() {\n return \"Size\";\n }\n /**\n * Returns the Size hash code.\n * @returns a hash code for a unique width and height\n */\n getHashCode() {\n let hash = this.width | 0;\n hash = (hash * 397) ^ (this.height | 0);\n return hash;\n }\n /**\n * Updates the current size from the given one.\n * @param src the given size\n */\n copyFrom(src) {\n this.width = src.width;\n this.height = src.height;\n }\n /**\n * Updates in place the current Size from the given floats.\n * @param width width of the new size\n * @param height height of the new size\n * @returns the updated Size.\n */\n copyFromFloats(width, height) {\n this.width = width;\n this.height = height;\n return this;\n }\n /**\n * Updates in place the current Size from the given floats.\n * @param width width to set\n * @param height height to set\n * @returns the updated Size.\n */\n set(width, height) {\n return this.copyFromFloats(width, height);\n }\n /**\n * Multiplies the width and height by numbers\n * @param w factor to multiple the width by\n * @param h factor to multiple the height by\n * @returns a new Size set with the multiplication result of the current Size and the given floats.\n */\n multiplyByFloats(w, h) {\n return new Size(this.width * w, this.height * h);\n }\n /**\n * Clones the size\n * @returns a new Size copied from the given one.\n */\n clone() {\n return new Size(this.width, this.height);\n }\n /**\n * True if the current Size and the given one width and height are strictly equal.\n * @param other the other size to compare against\n * @returns True if the current Size and the given one width and height are strictly equal.\n */\n equals(other) {\n if (!other) {\n return false;\n }\n return this.width === other.width && this.height === other.height;\n }\n /**\n * The surface of the Size : width * height (float).\n */\n get surface() {\n return this.width * this.height;\n }\n /**\n * Create a new size of zero\n * @returns a new Size set to (0.0, 0.0)\n */\n static Zero() {\n return new Size(0.0, 0.0);\n }\n /**\n * Sums the width and height of two sizes\n * @param otherSize size to add to this size\n * @returns a new Size set as the addition result of the current Size and the given one.\n */\n add(otherSize) {\n const r = new Size(this.width + otherSize.width, this.height + otherSize.height);\n return r;\n }\n /**\n * Subtracts the width and height of two\n * @param otherSize size to subtract to this size\n * @returns a new Size set as the subtraction result of the given one from the current Size.\n */\n subtract(otherSize) {\n const r = new Size(this.width - otherSize.width, this.height - otherSize.height);\n return r;\n }\n /**\n * Creates a new Size set at the linear interpolation \"amount\" between \"start\" and \"end\"\n * @param start starting size to lerp between\n * @param end end size to lerp between\n * @param amount amount to lerp between the start and end values\n * @returns a new Size set at the linear interpolation \"amount\" between \"start\" and \"end\"\n */\n static Lerp(start, end, amount) {\n const w = start.width + (end.width - start.width) * amount;\n const h = start.height + (end.height - start.height) * amount;\n return new Size(w, h);\n }\n}\n//# sourceMappingURL=math.size.js.map","\nimport { Size } from \"../../Maths/math.size.js\";\n/**\n * Base class of all the textures in babylon.\n * It groups all the common properties required to work with Thin Engine.\n */\nexport class ThinTexture {\n /**\n * | Value | Type | Description |\n * | ----- | ------------------ | ----------- |\n * | 0 | CLAMP_ADDRESSMODE | |\n * | 1 | WRAP_ADDRESSMODE | |\n * | 2 | MIRROR_ADDRESSMODE | |\n */\n get wrapU() {\n return this._wrapU;\n }\n set wrapU(value) {\n this._wrapU = value;\n }\n /**\n * | Value | Type | Description |\n * | ----- | ------------------ | ----------- |\n * | 0 | CLAMP_ADDRESSMODE | |\n * | 1 | WRAP_ADDRESSMODE | |\n * | 2 | MIRROR_ADDRESSMODE | |\n */\n get wrapV() {\n return this._wrapV;\n }\n set wrapV(value) {\n this._wrapV = value;\n }\n /**\n * How a texture is mapped.\n * Unused in thin texture mode.\n */\n get coordinatesMode() {\n return 0;\n }\n /**\n * Define if the texture is a cube texture or if false a 2d texture.\n */\n get isCube() {\n if (!this._texture) {\n return false;\n }\n return this._texture.isCube;\n }\n set isCube(value) {\n if (!this._texture) {\n return;\n }\n this._texture.isCube = value;\n }\n /**\n * Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.\n */\n get is3D() {\n if (!this._texture) {\n return false;\n }\n return this._texture.is3D;\n }\n set is3D(value) {\n if (!this._texture) {\n return;\n }\n this._texture.is3D = value;\n }\n /**\n * Define if the texture is a 2d array texture (webgl 2) or if false a 2d texture.\n */\n get is2DArray() {\n if (!this._texture) {\n return false;\n }\n return this._texture.is2DArray;\n }\n set is2DArray(value) {\n if (!this._texture) {\n return;\n }\n this._texture.is2DArray = value;\n }\n /**\n * Get the class name of the texture.\n * @returns \"ThinTexture\"\n */\n getClassName() {\n return \"ThinTexture\";\n }\n static _IsRenderTargetWrapper(texture) {\n return (texture === null || texture === void 0 ? void 0 : texture._shareDepth) !== undefined;\n }\n /**\n * Instantiates a new ThinTexture.\n * Base class of all the textures in babylon.\n * This can be used as an internal texture wrapper in ThinEngine to benefit from the cache\n * @param internalTexture Define the internalTexture to wrap. You can also pass a RenderTargetWrapper, in which case the texture will be the render target's texture\n */\n constructor(internalTexture) {\n this._wrapU = 1;\n this._wrapV = 1;\n /**\n * | Value | Type | Description |\n * | ----- | ------------------ | ----------- |\n * | 0 | CLAMP_ADDRESSMODE | |\n * | 1 | WRAP_ADDRESSMODE | |\n * | 2 | MIRROR_ADDRESSMODE | |\n */\n this.wrapR = 1;\n /**\n * With compliant hardware and browser (supporting anisotropic filtering)\n * this defines the level of anisotropic filtering in the texture.\n * The higher the better but the slower. This defaults to 4 as it seems to be the best tradeoff.\n */\n this.anisotropicFilteringLevel = 4;\n /**\n * Define the current state of the loading sequence when in delayed load mode.\n */\n this.delayLoadState = 0;\n /** @internal */\n this._texture = null;\n this._engine = null;\n this._cachedSize = Size.Zero();\n this._cachedBaseSize = Size.Zero();\n /** @internal */\n this._initialSamplingMode = 2;\n this._texture = ThinTexture._IsRenderTargetWrapper(internalTexture) ? internalTexture.texture : internalTexture;\n if (this._texture) {\n this._engine = this._texture.getEngine();\n }\n }\n /**\n * Get if the texture is ready to be used (downloaded, converted, mip mapped...).\n * @returns true if fully ready\n */\n isReady() {\n if (this.delayLoadState === 4) {\n this.delayLoad();\n return false;\n }\n if (this._texture) {\n return this._texture.isReady;\n }\n return false;\n }\n /**\n * Triggers the load sequence in delayed load mode.\n */\n delayLoad() { }\n /**\n * Get the underlying lower level texture from Babylon.\n * @returns the internal texture\n */\n getInternalTexture() {\n return this._texture;\n }\n /**\n * Get the size of the texture.\n * @returns the texture size.\n */\n getSize() {\n if (this._texture) {\n if (this._texture.width) {\n this._cachedSize.width = this._texture.width;\n this._cachedSize.height = this._texture.height;\n return this._cachedSize;\n }\n if (this._texture._size) {\n this._cachedSize.width = this._texture._size;\n this._cachedSize.height = this._texture._size;\n return this._cachedSize;\n }\n }\n return this._cachedSize;\n }\n /**\n * Get the base size of the texture.\n * It can be different from the size if the texture has been resized for POT for instance\n * @returns the base size\n */\n getBaseSize() {\n if (!this.isReady() || !this._texture) {\n this._cachedBaseSize.width = 0;\n this._cachedBaseSize.height = 0;\n return this._cachedBaseSize;\n }\n if (this._texture._size) {\n this._cachedBaseSize.width = this._texture._size;\n this._cachedBaseSize.height = this._texture._size;\n return this._cachedBaseSize;\n }\n this._cachedBaseSize.width = this._texture.baseWidth;\n this._cachedBaseSize.height = this._texture.baseHeight;\n return this._cachedBaseSize;\n }\n /**\n * Get the current sampling mode associated with the texture.\n */\n get samplingMode() {\n if (!this._texture) {\n return this._initialSamplingMode;\n }\n return this._texture.samplingMode;\n }\n /**\n * Update the sampling mode of the texture.\n * Default is Trilinear mode.\n *\n * | Value | Type | Description |\n * | ----- | ------------------ | ----------- |\n * | 1 | NEAREST_SAMPLINGMODE or NEAREST_NEAREST_MIPLINEAR | Nearest is: mag = nearest, min = nearest, mip = linear |\n * | 2 | BILINEAR_SAMPLINGMODE or LINEAR_LINEAR_MIPNEAREST | Bilinear is: mag = linear, min = linear, mip = nearest |\n * | 3 | TRILINEAR_SAMPLINGMODE or LINEAR_LINEAR_MIPLINEAR | Trilinear is: mag = linear, min = linear, mip = linear |\n * | 4 | NEAREST_NEAREST_MIPNEAREST | |\n * | 5 | NEAREST_LINEAR_MIPNEAREST | |\n * | 6 | NEAREST_LINEAR_MIPLINEAR | |\n * | 7 | NEAREST_LINEAR | |\n * | 8 | NEAREST_NEAREST | |\n * | 9 | LINEAR_NEAREST_MIPNEAREST | |\n * | 10 | LINEAR_NEAREST_MIPLINEAR | |\n * | 11 | LINEAR_LINEAR | |\n * | 12 | LINEAR_NEAREST | |\n *\n * > _mag_: magnification filter (close to the viewer)\n * > _min_: minification filter (far from the viewer)\n * > _mip_: filter used between mip map levels\n *@param samplingMode Define the new sampling mode of the texture\n */\n updateSamplingMode(samplingMode) {\n if (this._texture && this._engine) {\n this._engine.updateTextureSamplingMode(samplingMode, this._texture);\n }\n }\n /**\n * Release and destroy the underlying lower level texture aka internalTexture.\n */\n releaseInternalTexture() {\n if (this._texture) {\n this._texture.dispose();\n this._texture = null;\n }\n }\n /**\n * Dispose the texture and release its associated resources.\n */\n dispose() {\n if (this._texture) {\n this.releaseInternalTexture();\n this._engine = null;\n }\n }\n}\n//# sourceMappingURL=thinTexture.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize, SerializationHelper, serializeAsTexture } from \"../../Misc/decorators.js\";\nimport { Observable } from \"../../Misc/observable.js\";\nimport { Matrix } from \"../../Maths/math.vector.js\";\nimport { EngineStore } from \"../../Engines/engineStore.js\";\n\nimport { RandomGUID } from \"../../Misc/guid.js\";\nimport \"../../Misc/fileTools.js\";\nimport { ThinTexture } from \"./thinTexture.js\";\n/**\n * Base class of all the textures in babylon.\n * It groups all the common properties the materials, post process, lights... might need\n * in order to make a correct use of the texture.\n */\nexport class BaseTexture extends ThinTexture {\n /**\n * Define if the texture is having a usable alpha value (can be use for transparency or glossiness for instance).\n */\n set hasAlpha(value) {\n if (this._hasAlpha === value) {\n return;\n }\n this._hasAlpha = value;\n if (this._scene) {\n this._scene.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this);\n });\n }\n }\n get hasAlpha() {\n return this._hasAlpha;\n }\n /**\n * Defines if the alpha value should be determined via the rgb values.\n * If true the luminance of the pixel might be used to find the corresponding alpha value.\n */\n set getAlphaFromRGB(value) {\n if (this._getAlphaFromRGB === value) {\n return;\n }\n this._getAlphaFromRGB = value;\n if (this._scene) {\n this._scene.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this);\n });\n }\n }\n get getAlphaFromRGB() {\n return this._getAlphaFromRGB;\n }\n /**\n * Define the UV channel to use starting from 0 and defaulting to 0.\n * This is part of the texture as textures usually maps to one uv set.\n */\n set coordinatesIndex(value) {\n if (this._coordinatesIndex === value) {\n return;\n }\n this._coordinatesIndex = value;\n if (this._scene) {\n this._scene.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this);\n });\n }\n }\n get coordinatesIndex() {\n return this._coordinatesIndex;\n }\n /**\n * How a texture is mapped.\n *\n * | Value | Type | Description |\n * | ----- | ----------------------------------- | ----------- |\n * | 0 | EXPLICIT_MODE | |\n * | 1 | SPHERICAL_MODE | |\n * | 2 | PLANAR_MODE | |\n * | 3 | CUBIC_MODE | |\n * | 4 | PROJECTION_MODE | |\n * | 5 | SKYBOX_MODE | |\n * | 6 | INVCUBIC_MODE | |\n * | 7 | EQUIRECTANGULAR_MODE | |\n * | 8 | FIXED_EQUIRECTANGULAR_MODE | |\n * | 9 | FIXED_EQUIRECTANGULAR_MIRRORED_MODE | |\n */\n set coordinatesMode(value) {\n if (this._coordinatesMode === value) {\n return;\n }\n this._coordinatesMode = value;\n if (this._scene) {\n this._scene.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this);\n });\n }\n }\n get coordinatesMode() {\n return this._coordinatesMode;\n }\n /**\n * | Value | Type | Description |\n * | ----- | ------------------ | ----------- |\n * | 0 | CLAMP_ADDRESSMODE | |\n * | 1 | WRAP_ADDRESSMODE | |\n * | 2 | MIRROR_ADDRESSMODE | |\n */\n get wrapU() {\n return this._wrapU;\n }\n set wrapU(value) {\n this._wrapU = value;\n }\n /**\n * | Value | Type | Description |\n * | ----- | ------------------ | ----------- |\n * | 0 | CLAMP_ADDRESSMODE | |\n * | 1 | WRAP_ADDRESSMODE | |\n * | 2 | MIRROR_ADDRESSMODE | |\n */\n get wrapV() {\n return this._wrapV;\n }\n set wrapV(value) {\n this._wrapV = value;\n }\n /**\n * Define if the texture is a cube texture or if false a 2d texture.\n */\n get isCube() {\n if (!this._texture) {\n return this._isCube;\n }\n return this._texture.isCube;\n }\n set isCube(value) {\n if (!this._texture) {\n this._isCube = value;\n }\n else {\n this._texture.isCube = value;\n }\n }\n /**\n * Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.\n */\n get is3D() {\n if (!this._texture) {\n return false;\n }\n return this._texture.is3D;\n }\n set is3D(value) {\n if (!this._texture) {\n return;\n }\n this._texture.is3D = value;\n }\n /**\n * Define if the texture is a 2d array texture (webgl 2) or if false a 2d texture.\n */\n get is2DArray() {\n if (!this._texture) {\n return false;\n }\n return this._texture.is2DArray;\n }\n set is2DArray(value) {\n if (!this._texture) {\n return;\n }\n this._texture.is2DArray = value;\n }\n /**\n * Define if the texture contains data in gamma space (most of the png/jpg aside bump).\n * HDR texture are usually stored in linear space.\n * This only impacts the PBR and Background materials\n */\n get gammaSpace() {\n if (!this._texture) {\n return this._gammaSpace;\n }\n else {\n if (this._texture._gammaSpace === null) {\n this._texture._gammaSpace = this._gammaSpace;\n }\n }\n return this._texture._gammaSpace && !this._texture._useSRGBBuffer;\n }\n set gammaSpace(gamma) {\n var _a;\n if (!this._texture) {\n if (this._gammaSpace === gamma) {\n return;\n }\n this._gammaSpace = gamma;\n }\n else {\n if (this._texture._gammaSpace === gamma) {\n return;\n }\n this._texture._gammaSpace = gamma;\n }\n (_a = this.getScene()) === null || _a === void 0 ? void 0 : _a.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this);\n });\n }\n /**\n * Gets or sets whether or not the texture contains RGBD data.\n */\n get isRGBD() {\n return this._texture != null && this._texture._isRGBD;\n }\n set isRGBD(value) {\n var _a;\n if (value === this.isRGBD) {\n return;\n }\n if (this._texture) {\n this._texture._isRGBD = value;\n }\n (_a = this.getScene()) === null || _a === void 0 ? void 0 : _a.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this);\n });\n }\n /**\n * Are mip maps generated for this texture or not.\n */\n get noMipmap() {\n return false;\n }\n /**\n * With prefiltered texture, defined the offset used during the prefiltering steps.\n */\n get lodGenerationOffset() {\n if (this._texture) {\n return this._texture._lodGenerationOffset;\n }\n return 0.0;\n }\n set lodGenerationOffset(value) {\n if (this._texture) {\n this._texture._lodGenerationOffset = value;\n }\n }\n /**\n * With prefiltered texture, defined the scale used during the prefiltering steps.\n */\n get lodGenerationScale() {\n if (this._texture) {\n return this._texture._lodGenerationScale;\n }\n return 0.0;\n }\n set lodGenerationScale(value) {\n if (this._texture) {\n this._texture._lodGenerationScale = value;\n }\n }\n /**\n * With prefiltered texture, defined if the specular generation is based on a linear ramp.\n * By default we are using a log2 of the linear roughness helping to keep a better resolution for\n * average roughness values.\n */\n get linearSpecularLOD() {\n if (this._texture) {\n return this._texture._linearSpecularLOD;\n }\n return false;\n }\n set linearSpecularLOD(value) {\n if (this._texture) {\n this._texture._linearSpecularLOD = value;\n }\n }\n /**\n * In case a better definition than spherical harmonics is required for the diffuse part of the environment.\n * You can set the irradiance texture to rely on a texture instead of the spherical approach.\n * This texture need to have the same characteristics than its parent (Cube vs 2d, coordinates mode, Gamma/Linear, RGBD).\n */\n get irradianceTexture() {\n if (this._texture) {\n return this._texture._irradianceTexture;\n }\n return null;\n }\n set irradianceTexture(value) {\n if (this._texture) {\n this._texture._irradianceTexture = value;\n }\n }\n /**\n * Define the unique id of the texture in the scene.\n */\n get uid() {\n if (!this._uid) {\n this._uid = RandomGUID();\n }\n return this._uid;\n }\n /**\n * Return a string representation of the texture.\n * @returns the texture as a string\n */\n toString() {\n return this.name;\n }\n /**\n * Get the class name of the texture.\n * @returns \"BaseTexture\"\n */\n getClassName() {\n return \"BaseTexture\";\n }\n /**\n * Callback triggered when the texture has been disposed.\n * Kept for back compatibility, you can use the onDisposeObservable instead.\n */\n set onDispose(callback) {\n if (this._onDisposeObserver) {\n this.onDisposeObservable.remove(this._onDisposeObserver);\n }\n this._onDisposeObserver = this.onDisposeObservable.add(callback);\n }\n /**\n * Define if the texture is preventing a material to render or not.\n * If not and the texture is not ready, the engine will use a default black texture instead.\n */\n get isBlocking() {\n return true;\n }\n /**\n * Was there any loading error?\n */\n get loadingError() {\n return this._loadingError;\n }\n /**\n * If a loading error occurred this object will be populated with information about the error.\n */\n get errorObject() {\n return this._errorObject;\n }\n /**\n * Instantiates a new BaseTexture.\n * Base class of all the textures in babylon.\n * It groups all the common properties the materials, post process, lights... might need\n * in order to make a correct use of the texture.\n * @param sceneOrEngine Define the scene or engine the texture belongs to\n * @param internalTexture Define the internal texture associated with the texture\n */\n constructor(sceneOrEngine, internalTexture = null) {\n super(null);\n /**\n * Gets or sets an object used to store user defined information.\n */\n this.metadata = null;\n /**\n * For internal use only. Please do not use.\n */\n this.reservedDataStore = null;\n this._hasAlpha = false;\n this._getAlphaFromRGB = false;\n /**\n * Intensity or strength of the texture.\n * It is commonly used by materials to fine tune the intensity of the texture\n */\n this.level = 1;\n this._coordinatesIndex = 0;\n /**\n * Gets or sets a boolean indicating that the texture should try to reduce shader code if there is no UV manipulation.\n * (ie. when texture.getTextureMatrix().isIdentityAs3x2() returns true)\n */\n this.optimizeUVAllocation = true;\n this._coordinatesMode = 0;\n /**\n * | Value | Type | Description |\n * | ----- | ------------------ | ----------- |\n * | 0 | CLAMP_ADDRESSMODE | |\n * | 1 | WRAP_ADDRESSMODE | |\n * | 2 | MIRROR_ADDRESSMODE | |\n */\n this.wrapR = 1;\n /**\n * With compliant hardware and browser (supporting anisotropic filtering)\n * this defines the level of anisotropic filtering in the texture.\n * The higher the better but the slower. This defaults to 4 as it seems to be the best tradeoff.\n */\n this.anisotropicFilteringLevel = BaseTexture.DEFAULT_ANISOTROPIC_FILTERING_LEVEL;\n /** @internal */\n this._isCube = false;\n /** @internal */\n this._gammaSpace = true;\n /**\n * Is Z inverted in the texture (useful in a cube texture).\n */\n this.invertZ = false;\n /**\n * @internal\n */\n this.lodLevelInAlpha = false;\n /**\n * Define if the texture is a render target.\n */\n this.isRenderTarget = false;\n /** @internal */\n this._prefiltered = false;\n /** @internal */\n this._forceSerialize = false;\n /**\n * Define the list of animation attached to the texture.\n */\n this.animations = [];\n /**\n * An event triggered when the texture is disposed.\n */\n this.onDisposeObservable = new Observable();\n this._onDisposeObserver = null;\n this._scene = null;\n /** @internal */\n this._uid = null;\n /** @internal */\n this._parentContainer = null;\n this._loadingError = false;\n if (sceneOrEngine) {\n if (BaseTexture._IsScene(sceneOrEngine)) {\n this._scene = sceneOrEngine;\n }\n else {\n this._engine = sceneOrEngine;\n }\n }\n else {\n this._scene = EngineStore.LastCreatedScene;\n }\n if (this._scene) {\n this.uniqueId = this._scene.getUniqueId();\n this._scene.addTexture(this);\n this._engine = this._scene.getEngine();\n }\n this._texture = internalTexture;\n this._uid = null;\n }\n /**\n * Get the scene the texture belongs to.\n * @returns the scene or null if undefined\n */\n getScene() {\n return this._scene;\n }\n /** @internal */\n _getEngine() {\n return this._engine;\n }\n /**\n * Checks if the texture has the same transform matrix than another texture\n * @param texture texture to check against\n * @returns true if the transforms are the same, else false\n */\n checkTransformsAreIdentical(texture) {\n return texture !== null;\n }\n /**\n * Get the texture transform matrix used to offset tile the texture for instance.\n * @returns the transformation matrix\n */\n getTextureMatrix() {\n return Matrix.IdentityReadOnly;\n }\n /**\n * Get the texture reflection matrix used to rotate/transform the reflection.\n * @returns the reflection matrix\n */\n getReflectionTextureMatrix() {\n return Matrix.IdentityReadOnly;\n }\n /**\n * Gets a suitable rotate/transform matrix when the texture is used for refraction.\n * There's a separate function from getReflectionTextureMatrix because refraction requires a special configuration of the matrix in right-handed mode.\n * @returns The refraction matrix\n */\n getRefractionTextureMatrix() {\n return this.getReflectionTextureMatrix();\n }\n /**\n * Get if the texture is ready to be consumed (either it is ready or it is not blocking)\n * @returns true if ready, not blocking or if there was an error loading the texture\n */\n isReadyOrNotBlocking() {\n return !this.isBlocking || this.isReady() || this.loadingError;\n }\n /**\n * Scales the texture if is `canRescale()`\n * @param ratio the resize factor we want to use to rescale\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n scale(ratio) { }\n /**\n * Get if the texture can rescale.\n */\n get canRescale() {\n return false;\n }\n /**\n * @internal\n */\n _getFromCache(url, noMipmap, sampling, invertY, useSRGBBuffer, isCube) {\n const engine = this._getEngine();\n if (!engine) {\n return null;\n }\n const correctedUseSRGBBuffer = engine._getUseSRGBBuffer(!!useSRGBBuffer, noMipmap);\n const texturesCache = engine.getLoadedTexturesCache();\n for (let index = 0; index < texturesCache.length; index++) {\n const texturesCacheEntry = texturesCache[index];\n if (useSRGBBuffer === undefined || correctedUseSRGBBuffer === texturesCacheEntry._useSRGBBuffer) {\n if (invertY === undefined || invertY === texturesCacheEntry.invertY) {\n if (texturesCacheEntry.url === url && texturesCacheEntry.generateMipMaps === !noMipmap) {\n if (!sampling || sampling === texturesCacheEntry.samplingMode) {\n if (isCube === undefined || isCube === texturesCacheEntry.isCube) {\n texturesCacheEntry.incrementReferences();\n return texturesCacheEntry;\n }\n }\n }\n }\n }\n }\n return null;\n }\n /** @internal */\n _rebuild() { }\n /**\n * Clones the texture.\n * @returns the cloned texture\n */\n clone() {\n return null;\n }\n /**\n * Get the texture underlying type (INT, FLOAT...)\n */\n get textureType() {\n if (!this._texture) {\n return 0;\n }\n return this._texture.type !== undefined ? this._texture.type : 0;\n }\n /**\n * Get the texture underlying format (RGB, RGBA...)\n */\n get textureFormat() {\n if (!this._texture) {\n return 5;\n }\n return this._texture.format !== undefined ? this._texture.format : 5;\n }\n /**\n * Indicates that textures need to be re-calculated for all materials\n */\n _markAllSubMeshesAsTexturesDirty() {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n scene.markAllMaterialsAsDirty(1);\n }\n /**\n * Reads the pixels stored in the webgl texture and returns them as an ArrayBuffer.\n * This will returns an RGBA array buffer containing either in values (0-255) or\n * float values (0-1) depending of the underlying buffer type.\n * @param faceIndex defines the face of the texture to read (in case of cube texture)\n * @param level defines the LOD level of the texture to read (in case of Mip Maps)\n * @param buffer defines a user defined buffer to fill with data (can be null)\n * @param flushRenderer true to flush the renderer from the pending commands before reading the pixels\n * @param noDataConversion false to convert the data to Uint8Array (if texture type is UNSIGNED_BYTE) or to Float32Array (if texture type is anything but UNSIGNED_BYTE). If true, the type of the generated buffer (if buffer==null) will depend on the type of the texture\n * @param x defines the region x coordinates to start reading from (default to 0)\n * @param y defines the region y coordinates to start reading from (default to 0)\n * @param width defines the region width to read from (default to the texture size at level)\n * @param height defines the region width to read from (default to the texture size at level)\n * @returns The Array buffer promise containing the pixels data.\n */\n readPixels(faceIndex = 0, level = 0, buffer = null, flushRenderer = true, noDataConversion = false, x = 0, y = 0, width = Number.MAX_VALUE, height = Number.MAX_VALUE) {\n if (!this._texture) {\n return null;\n }\n const engine = this._getEngine();\n if (!engine) {\n return null;\n }\n const size = this.getSize();\n let maxWidth = size.width;\n let maxHeight = size.height;\n if (level !== 0) {\n maxWidth = maxWidth / Math.pow(2, level);\n maxHeight = maxHeight / Math.pow(2, level);\n maxWidth = Math.round(maxWidth);\n maxHeight = Math.round(maxHeight);\n }\n width = Math.min(maxWidth, width);\n height = Math.min(maxHeight, height);\n try {\n if (this._texture.isCube) {\n return engine._readTexturePixels(this._texture, width, height, faceIndex, level, buffer, flushRenderer, noDataConversion, x, y);\n }\n return engine._readTexturePixels(this._texture, width, height, -1, level, buffer, flushRenderer, noDataConversion, x, y);\n }\n catch (e) {\n return null;\n }\n }\n /**\n * @internal\n */\n _readPixelsSync(faceIndex = 0, level = 0, buffer = null, flushRenderer = true, noDataConversion = false) {\n if (!this._texture) {\n return null;\n }\n const size = this.getSize();\n let width = size.width;\n let height = size.height;\n const engine = this._getEngine();\n if (!engine) {\n return null;\n }\n if (level != 0) {\n width = width / Math.pow(2, level);\n height = height / Math.pow(2, level);\n width = Math.round(width);\n height = Math.round(height);\n }\n try {\n if (this._texture.isCube) {\n return engine._readTexturePixelsSync(this._texture, width, height, faceIndex, level, buffer, flushRenderer, noDataConversion);\n }\n return engine._readTexturePixelsSync(this._texture, width, height, -1, level, buffer, flushRenderer, noDataConversion);\n }\n catch (e) {\n return null;\n }\n }\n /** @internal */\n get _lodTextureHigh() {\n if (this._texture) {\n return this._texture._lodTextureHigh;\n }\n return null;\n }\n /** @internal */\n get _lodTextureMid() {\n if (this._texture) {\n return this._texture._lodTextureMid;\n }\n return null;\n }\n /** @internal */\n get _lodTextureLow() {\n if (this._texture) {\n return this._texture._lodTextureLow;\n }\n return null;\n }\n /**\n * Dispose the texture and release its associated resources.\n */\n dispose() {\n if (this._scene) {\n // Animations\n if (this._scene.stopAnimation) {\n this._scene.stopAnimation(this);\n }\n // Remove from scene\n this._scene.removePendingData(this);\n const index = this._scene.textures.indexOf(this);\n if (index >= 0) {\n this._scene.textures.splice(index, 1);\n }\n this._scene.onTextureRemovedObservable.notifyObservers(this);\n this._scene = null;\n if (this._parentContainer) {\n const index = this._parentContainer.textures.indexOf(this);\n if (index > -1) {\n this._parentContainer.textures.splice(index, 1);\n }\n this._parentContainer = null;\n }\n }\n // Callback\n this.onDisposeObservable.notifyObservers(this);\n this.onDisposeObservable.clear();\n this.metadata = null;\n super.dispose();\n }\n /**\n * Serialize the texture into a JSON representation that can be parsed later on.\n * @param allowEmptyName True to force serialization even if name is empty. Default: false\n * @returns the JSON representation of the texture\n */\n serialize(allowEmptyName = false) {\n if (!this.name && !allowEmptyName) {\n return null;\n }\n const serializationObject = SerializationHelper.Serialize(this);\n // Animations\n SerializationHelper.AppendSerializedAnimations(this, serializationObject);\n return serializationObject;\n }\n /**\n * Helper function to be called back once a list of texture contains only ready textures.\n * @param textures Define the list of textures to wait for\n * @param callback Define the callback triggered once the entire list will be ready\n */\n static WhenAllReady(textures, callback) {\n let numRemaining = textures.length;\n if (numRemaining === 0) {\n callback();\n return;\n }\n for (let i = 0; i < textures.length; i++) {\n const texture = textures[i];\n if (texture.isReady()) {\n if (--numRemaining === 0) {\n callback();\n }\n }\n else {\n const onLoadObservable = texture.onLoadObservable;\n if (onLoadObservable) {\n onLoadObservable.addOnce(() => {\n if (--numRemaining === 0) {\n callback();\n }\n });\n }\n else {\n if (--numRemaining === 0) {\n callback();\n }\n }\n }\n }\n }\n static _IsScene(sceneOrEngine) {\n return sceneOrEngine.getClassName() === \"Scene\";\n }\n}\n/**\n * Default anisotropic filtering level for the application.\n * It is set to 4 as a good tradeoff between perf and quality.\n */\nBaseTexture.DEFAULT_ANISOTROPIC_FILTERING_LEVEL = 4;\n__decorate([\n serialize()\n], BaseTexture.prototype, \"uniqueId\", void 0);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"name\", void 0);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"metadata\", void 0);\n__decorate([\n serialize(\"hasAlpha\")\n], BaseTexture.prototype, \"_hasAlpha\", void 0);\n__decorate([\n serialize(\"getAlphaFromRGB\")\n], BaseTexture.prototype, \"_getAlphaFromRGB\", void 0);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"level\", void 0);\n__decorate([\n serialize(\"coordinatesIndex\")\n], BaseTexture.prototype, \"_coordinatesIndex\", void 0);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"optimizeUVAllocation\", void 0);\n__decorate([\n serialize(\"coordinatesMode\")\n], BaseTexture.prototype, \"_coordinatesMode\", void 0);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"wrapU\", null);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"wrapV\", null);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"wrapR\", void 0);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"anisotropicFilteringLevel\", void 0);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"isCube\", null);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"is3D\", null);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"is2DArray\", null);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"gammaSpace\", null);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"invertZ\", void 0);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"lodLevelInAlpha\", void 0);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"lodGenerationOffset\", null);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"lodGenerationScale\", null);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"linearSpecularLOD\", null);\n__decorate([\n serializeAsTexture()\n], BaseTexture.prototype, \"irradianceTexture\", null);\n__decorate([\n serialize()\n], BaseTexture.prototype, \"isRenderTarget\", void 0);\n//# sourceMappingURL=baseTexture.js.map","/**\n * Transform some pixel data to a base64 string\n * @param pixels defines the pixel data to transform to base64\n * @param size defines the width and height of the (texture) data\n * @param invertY true if the data must be inverted for the Y coordinate during the conversion\n * @returns The base64 encoded string or null\n */\nexport function GenerateBase64StringFromPixelData(pixels, size, invertY = false) {\n const width = size.width;\n const height = size.height;\n if (pixels instanceof Float32Array) {\n let len = pixels.byteLength / pixels.BYTES_PER_ELEMENT;\n const npixels = new Uint8Array(len);\n while (--len >= 0) {\n let val = pixels[len];\n if (val < 0) {\n val = 0;\n }\n else if (val > 1) {\n val = 1;\n }\n npixels[len] = val * 255;\n }\n pixels = npixels;\n }\n const canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) {\n return null;\n }\n const imageData = ctx.createImageData(width, height);\n const castData = imageData.data;\n castData.set(pixels);\n ctx.putImageData(imageData, 0, 0);\n if (invertY) {\n const canvas2 = document.createElement(\"canvas\");\n canvas2.width = width;\n canvas2.height = height;\n const ctx2 = canvas2.getContext(\"2d\");\n if (!ctx2) {\n return null;\n }\n ctx2.translate(0, height);\n ctx2.scale(1, -1);\n ctx2.drawImage(canvas, 0, 0);\n return canvas2.toDataURL(\"image/png\");\n }\n return canvas.toDataURL(\"image/png\");\n}\n/**\n * Reads the pixels stored in the webgl texture and returns them as a base64 string\n * @param texture defines the texture to read pixels from\n * @param faceIndex defines the face of the texture to read (in case of cube texture)\n * @param level defines the LOD level of the texture to read (in case of Mip Maps)\n * @returns The base64 encoded string or null\n */\nexport function GenerateBase64StringFromTexture(texture, faceIndex = 0, level = 0) {\n const internalTexture = texture.getInternalTexture();\n if (!internalTexture) {\n return null;\n }\n const pixels = texture._readPixelsSync(faceIndex, level);\n if (!pixels) {\n return null;\n }\n return GenerateBase64StringFromPixelData(pixels, texture.getSize(), internalTexture.invertY);\n}\n/**\n * Reads the pixels stored in the webgl texture and returns them as a base64 string\n * @param texture defines the texture to read pixels from\n * @param faceIndex defines the face of the texture to read (in case of cube texture)\n * @param level defines the LOD level of the texture to read (in case of Mip Maps)\n * @returns The base64 encoded string or null wrapped in a promise\n */\nexport async function GenerateBase64StringFromTextureAsync(texture, faceIndex = 0, level = 0) {\n const internalTexture = texture.getInternalTexture();\n if (!internalTexture) {\n return null;\n }\n const pixels = await texture.readPixels(faceIndex, level);\n if (!pixels) {\n return null;\n }\n return GenerateBase64StringFromPixelData(pixels, texture.getSize(), internalTexture.invertY);\n}\n/**\n * Class used to host copy specific utilities\n * (Back-compat)\n */\nexport const CopyTools = {\n /**\n * Transform some pixel data to a base64 string\n * @param pixels defines the pixel data to transform to base64\n * @param size defines the width and height of the (texture) data\n * @param invertY true if the data must be inverted for the Y coordinate during the conversion\n * @returns The base64 encoded string or null\n */\n GenerateBase64StringFromPixelData,\n /**\n * Reads the pixels stored in the webgl texture and returns them as a base64 string\n * @param texture defines the texture to read pixels from\n * @param faceIndex defines the face of the texture to read (in case of cube texture)\n * @param level defines the LOD level of the texture to read (in case of Mip Maps)\n * @returns The base64 encoded string or null\n */\n GenerateBase64StringFromTexture,\n /**\n * Reads the pixels stored in the webgl texture and returns them as a base64 string\n * @param texture defines the texture to read pixels from\n * @param faceIndex defines the face of the texture to read (in case of cube texture)\n * @param level defines the LOD level of the texture to read (in case of Mip Maps)\n * @returns The base64 encoded string or null wrapped in a promise\n */\n GenerateBase64StringFromTextureAsync,\n};\n//# sourceMappingURL=copyTools.js.map","/**\n * Options used to control default behaviors regarding compatibility support\n */\nexport class CompatibilityOptions {\n}\n/**\n * Defines if the system should use OpenGL convention for UVs when creating geometry or loading .babylon files (false by default)\n */\nCompatibilityOptions.UseOpenGLOrientationForUV = false;\n//# sourceMappingURL=compatibilityOptions.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize, SerializationHelper } from \"../../Misc/decorators.js\";\nimport { Observable } from \"../../Misc/observable.js\";\nimport { Matrix, TmpVectors, Vector3 } from \"../../Maths/math.vector.js\";\nimport { BaseTexture } from \"../../Materials/Textures/baseTexture.js\";\n\nimport { GetClass, RegisterClass } from \"../../Misc/typeStore.js\";\nimport { _WarnImport } from \"../../Misc/devTools.js\";\nimport { TimingTools } from \"../../Misc/timingTools.js\";\nimport { InstantiationTools } from \"../../Misc/instantiationTools.js\";\nimport { Plane } from \"../../Maths/math.plane.js\";\nimport { EncodeArrayBufferToBase64 } from \"../../Misc/stringTools.js\";\nimport { GenerateBase64StringFromTexture, GenerateBase64StringFromTextureAsync } from \"../../Misc/copyTools.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * This represents a texture in babylon. It can be easily loaded from a network, base64 or html input.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#texture\n */\nexport class Texture extends BaseTexture {\n static _CreateVideoTexture(name, src, scene, generateMipMaps = false, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, settings = {}, onError, format = 5) {\n throw _WarnImport(\"VideoTexture\");\n }\n /**\n * Are mip maps generated for this texture or not.\n */\n get noMipmap() {\n return this._noMipmap;\n }\n /** Returns the texture mime type if it was defined by a loader (undefined else) */\n get mimeType() {\n return this._mimeType;\n }\n /**\n * Is the texture preventing material to render while loading.\n * If false, a default texture will be used instead of the loading one during the preparation step.\n */\n set isBlocking(value) {\n this._isBlocking = value;\n }\n get isBlocking() {\n return this._isBlocking;\n }\n /**\n * Gets a boolean indicating if the texture needs to be inverted on the y axis during loading\n */\n get invertY() {\n return this._invertY;\n }\n /**\n * Instantiates a new texture.\n * This represents a texture in babylon. It can be easily loaded from a network, base64 or html input.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#texture\n * @param url defines the url of the picture to load as a texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param noMipmapOrOptions defines if the texture will require mip maps or not or set of all options to create the texture\n * @param invertY defines if the texture needs to be inverted on the y axis during loading\n * @param samplingMode defines the sampling mode we want for the texture while fetching from it (Texture.NEAREST_SAMPLINGMODE...)\n * @param onLoad defines a callback triggered when the texture has been loaded\n * @param onError defines a callback triggered when an error occurred during the loading session\n * @param buffer defines the buffer to load the texture from in case the texture is loaded from a buffer representation\n * @param deleteBuffer defines if the buffer we are loading the texture from should be deleted after load\n * @param format defines the format of the texture we are trying to load (Engine.TEXTUREFORMAT_RGBA...)\n * @param mimeType defines an optional mime type information\n * @param loaderOptions options to be passed to the loader\n * @param creationFlags specific flags to use when creating the texture (1 for storage textures, for eg)\n * @param forcedExtension defines the extension to use to pick the right loader\n */\n constructor(url, sceneOrEngine, noMipmapOrOptions, invertY, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, onLoad = null, onError = null, buffer = null, deleteBuffer = false, format, mimeType, loaderOptions, creationFlags, forcedExtension) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n super(sceneOrEngine);\n /**\n * Define the url of the texture.\n */\n this.url = null;\n /**\n * Define an offset on the texture to offset the u coordinates of the UVs\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#offsetting\n */\n this.uOffset = 0;\n /**\n * Define an offset on the texture to offset the v coordinates of the UVs\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#offsetting\n */\n this.vOffset = 0;\n /**\n * Define an offset on the texture to scale the u coordinates of the UVs\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#tiling\n */\n this.uScale = 1.0;\n /**\n * Define an offset on the texture to scale the v coordinates of the UVs\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#tiling\n */\n this.vScale = 1.0;\n /**\n * Define an offset on the texture to rotate around the u coordinates of the UVs\n * The angle is defined in radians.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials\n */\n this.uAng = 0;\n /**\n * Define an offset on the texture to rotate around the v coordinates of the UVs\n * The angle is defined in radians.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials\n */\n this.vAng = 0;\n /**\n * Define an offset on the texture to rotate around the w coordinates of the UVs (in case of 3d texture)\n * The angle is defined in radians.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials\n */\n this.wAng = 0;\n /**\n * Defines the center of rotation (U)\n */\n this.uRotationCenter = 0.5;\n /**\n * Defines the center of rotation (V)\n */\n this.vRotationCenter = 0.5;\n /**\n * Defines the center of rotation (W)\n */\n this.wRotationCenter = 0.5;\n /**\n * Sets this property to true to avoid deformations when rotating the texture with non-uniform scaling\n */\n this.homogeneousRotationInUVTransform = false;\n /**\n * List of inspectable custom properties (used by the Inspector)\n * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility\n */\n this.inspectableCustomProperties = null;\n /** @internal */\n this._noMipmap = false;\n /** @internal */\n this._invertY = false;\n this._rowGenerationMatrix = null;\n this._cachedTextureMatrix = null;\n this._projectionModeMatrix = null;\n this._t0 = null;\n this._t1 = null;\n this._t2 = null;\n this._cachedUOffset = -1;\n this._cachedVOffset = -1;\n this._cachedUScale = 0;\n this._cachedVScale = 0;\n this._cachedUAng = -1;\n this._cachedVAng = -1;\n this._cachedWAng = -1;\n this._cachedReflectionProjectionMatrixId = -1;\n this._cachedURotationCenter = -1;\n this._cachedVRotationCenter = -1;\n this._cachedWRotationCenter = -1;\n this._cachedHomogeneousRotationInUVTransform = false;\n this._cachedReflectionTextureMatrix = null;\n this._cachedReflectionUOffset = -1;\n this._cachedReflectionVOffset = -1;\n this._cachedReflectionUScale = 0;\n this._cachedReflectionVScale = 0;\n this._cachedReflectionCoordinatesMode = -1;\n /** @internal */\n this._buffer = null;\n this._deleteBuffer = false;\n this._format = null;\n this._delayedOnLoad = null;\n this._delayedOnError = null;\n /**\n * Observable triggered once the texture has been loaded.\n */\n this.onLoadObservable = new Observable();\n this._isBlocking = true;\n this.name = url || \"\";\n this.url = url;\n let noMipmap;\n let useSRGBBuffer = false;\n let internalTexture = null;\n let gammaSpace = true;\n if (typeof noMipmapOrOptions === \"object\" && noMipmapOrOptions !== null) {\n noMipmap = (_a = noMipmapOrOptions.noMipmap) !== null && _a !== void 0 ? _a : false;\n invertY = (_b = noMipmapOrOptions.invertY) !== null && _b !== void 0 ? _b : (CompatibilityOptions.UseOpenGLOrientationForUV ? false : true);\n samplingMode = (_c = noMipmapOrOptions.samplingMode) !== null && _c !== void 0 ? _c : Texture.TRILINEAR_SAMPLINGMODE;\n onLoad = (_d = noMipmapOrOptions.onLoad) !== null && _d !== void 0 ? _d : null;\n onError = (_e = noMipmapOrOptions.onError) !== null && _e !== void 0 ? _e : null;\n buffer = (_f = noMipmapOrOptions.buffer) !== null && _f !== void 0 ? _f : null;\n deleteBuffer = (_g = noMipmapOrOptions.deleteBuffer) !== null && _g !== void 0 ? _g : false;\n format = noMipmapOrOptions.format;\n mimeType = noMipmapOrOptions.mimeType;\n loaderOptions = noMipmapOrOptions.loaderOptions;\n creationFlags = noMipmapOrOptions.creationFlags;\n useSRGBBuffer = (_h = noMipmapOrOptions.useSRGBBuffer) !== null && _h !== void 0 ? _h : false;\n internalTexture = (_j = noMipmapOrOptions.internalTexture) !== null && _j !== void 0 ? _j : null;\n gammaSpace = (_k = noMipmapOrOptions.gammaSpace) !== null && _k !== void 0 ? _k : gammaSpace;\n }\n else {\n noMipmap = !!noMipmapOrOptions;\n }\n this._gammaSpace = gammaSpace;\n this._noMipmap = noMipmap;\n this._invertY = invertY === undefined ? (CompatibilityOptions.UseOpenGLOrientationForUV ? false : true) : invertY;\n this._initialSamplingMode = samplingMode;\n this._buffer = buffer;\n this._deleteBuffer = deleteBuffer;\n this._mimeType = mimeType;\n this._loaderOptions = loaderOptions;\n this._creationFlags = creationFlags;\n this._useSRGBBuffer = useSRGBBuffer;\n this._forcedExtension = forcedExtension;\n if (format) {\n this._format = format;\n }\n const scene = this.getScene();\n const engine = this._getEngine();\n if (!engine) {\n return;\n }\n engine.onBeforeTextureInitObservable.notifyObservers(this);\n const load = () => {\n if (this._texture) {\n if (this._texture._invertVScale) {\n this.vScale *= -1;\n this.vOffset += 1;\n }\n // Update texture to match internal texture's wrapping\n if (this._texture._cachedWrapU !== null) {\n this.wrapU = this._texture._cachedWrapU;\n this._texture._cachedWrapU = null;\n }\n if (this._texture._cachedWrapV !== null) {\n this.wrapV = this._texture._cachedWrapV;\n this._texture._cachedWrapV = null;\n }\n if (this._texture._cachedWrapR !== null) {\n this.wrapR = this._texture._cachedWrapR;\n this._texture._cachedWrapR = null;\n }\n }\n if (this.onLoadObservable.hasObservers()) {\n this.onLoadObservable.notifyObservers(this);\n }\n if (onLoad) {\n onLoad();\n }\n if (!this.isBlocking && scene) {\n scene.resetCachedMaterial();\n }\n };\n const errorHandler = (message, exception) => {\n this._loadingError = true;\n this._errorObject = { message, exception };\n if (onError) {\n onError(message, exception);\n }\n Texture.OnTextureLoadErrorObservable.notifyObservers(this);\n };\n if (!this.url && !internalTexture) {\n this._delayedOnLoad = load;\n this._delayedOnError = errorHandler;\n return;\n }\n this._texture = internalTexture !== null && internalTexture !== void 0 ? internalTexture : this._getFromCache(this.url, noMipmap, samplingMode, this._invertY, useSRGBBuffer, this.isCube);\n if (!this._texture) {\n if (!scene || !scene.useDelayedTextureLoading) {\n try {\n this._texture = engine.createTexture(this.url, noMipmap, this._invertY, scene, samplingMode, load, errorHandler, this._buffer, undefined, this._format, this._forcedExtension, mimeType, loaderOptions, creationFlags, useSRGBBuffer);\n }\n catch (e) {\n errorHandler(\"error loading\", e);\n throw e;\n }\n if (deleteBuffer) {\n this._buffer = null;\n }\n }\n else {\n this.delayLoadState = 4;\n this._delayedOnLoad = load;\n this._delayedOnError = errorHandler;\n }\n }\n else {\n if (this._texture.isReady) {\n TimingTools.SetImmediate(() => load());\n }\n else {\n const loadObserver = this._texture.onLoadedObservable.add(load);\n this._texture.onErrorObservable.add((e) => {\n var _a;\n errorHandler(e.message, e.exception);\n (_a = this._texture) === null || _a === void 0 ? void 0 : _a.onLoadedObservable.remove(loadObserver);\n });\n }\n }\n }\n /**\n * Update the url (and optional buffer) of this texture if url was null during construction.\n * @param url the url of the texture\n * @param buffer the buffer of the texture (defaults to null)\n * @param onLoad callback called when the texture is loaded (defaults to null)\n * @param forcedExtension defines the extension to use to pick the right loader\n */\n updateURL(url, buffer = null, onLoad, forcedExtension) {\n if (this.url) {\n this.releaseInternalTexture();\n this.getScene().markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this);\n });\n }\n if (!this.name || this.name.startsWith(\"data:\")) {\n this.name = url;\n }\n this.url = url;\n this._buffer = buffer;\n this._forcedExtension = forcedExtension;\n this.delayLoadState = 4;\n if (onLoad) {\n this._delayedOnLoad = onLoad;\n }\n this.delayLoad();\n }\n /**\n * Finish the loading sequence of a texture flagged as delayed load.\n * @internal\n */\n delayLoad() {\n if (this.delayLoadState !== 4) {\n return;\n }\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n this.delayLoadState = 1;\n this._texture = this._getFromCache(this.url, this._noMipmap, this.samplingMode, this._invertY, this._useSRGBBuffer, this.isCube);\n if (!this._texture) {\n this._texture = scene\n .getEngine()\n .createTexture(this.url, this._noMipmap, this._invertY, scene, this.samplingMode, this._delayedOnLoad, this._delayedOnError, this._buffer, null, this._format, this._forcedExtension, this._mimeType, this._loaderOptions, this._creationFlags, this._useSRGBBuffer);\n if (this._deleteBuffer) {\n this._buffer = null;\n }\n }\n else {\n if (this._delayedOnLoad) {\n if (this._texture.isReady) {\n TimingTools.SetImmediate(this._delayedOnLoad);\n }\n else {\n this._texture.onLoadedObservable.add(this._delayedOnLoad);\n }\n }\n }\n this._delayedOnLoad = null;\n this._delayedOnError = null;\n }\n _prepareRowForTextureGeneration(x, y, z, t) {\n x *= this._cachedUScale;\n y *= this._cachedVScale;\n x -= this.uRotationCenter * this._cachedUScale;\n y -= this.vRotationCenter * this._cachedVScale;\n z -= this.wRotationCenter;\n Vector3.TransformCoordinatesFromFloatsToRef(x, y, z, this._rowGenerationMatrix, t);\n t.x += this.uRotationCenter * this._cachedUScale + this._cachedUOffset;\n t.y += this.vRotationCenter * this._cachedVScale + this._cachedVOffset;\n t.z += this.wRotationCenter;\n }\n /**\n * Checks if the texture has the same transform matrix than another texture\n * @param texture texture to check against\n * @returns true if the transforms are the same, else false\n */\n checkTransformsAreIdentical(texture) {\n return (texture !== null &&\n this.uOffset === texture.uOffset &&\n this.vOffset === texture.vOffset &&\n this.uScale === texture.uScale &&\n this.vScale === texture.vScale &&\n this.uAng === texture.uAng &&\n this.vAng === texture.vAng &&\n this.wAng === texture.wAng);\n }\n /**\n * Get the current texture matrix which includes the requested offsetting, tiling and rotation components.\n * @param uBase\n * @returns the transform matrix of the texture.\n */\n getTextureMatrix(uBase = 1) {\n if (this.uOffset === this._cachedUOffset &&\n this.vOffset === this._cachedVOffset &&\n this.uScale * uBase === this._cachedUScale &&\n this.vScale === this._cachedVScale &&\n this.uAng === this._cachedUAng &&\n this.vAng === this._cachedVAng &&\n this.wAng === this._cachedWAng &&\n this.uRotationCenter === this._cachedURotationCenter &&\n this.vRotationCenter === this._cachedVRotationCenter &&\n this.wRotationCenter === this._cachedWRotationCenter &&\n this.homogeneousRotationInUVTransform === this._cachedHomogeneousRotationInUVTransform) {\n return this._cachedTextureMatrix;\n }\n this._cachedUOffset = this.uOffset;\n this._cachedVOffset = this.vOffset;\n this._cachedUScale = this.uScale * uBase;\n this._cachedVScale = this.vScale;\n this._cachedUAng = this.uAng;\n this._cachedVAng = this.vAng;\n this._cachedWAng = this.wAng;\n this._cachedURotationCenter = this.uRotationCenter;\n this._cachedVRotationCenter = this.vRotationCenter;\n this._cachedWRotationCenter = this.wRotationCenter;\n this._cachedHomogeneousRotationInUVTransform = this.homogeneousRotationInUVTransform;\n if (!this._cachedTextureMatrix || !this._rowGenerationMatrix) {\n this._cachedTextureMatrix = Matrix.Zero();\n this._rowGenerationMatrix = new Matrix();\n this._t0 = Vector3.Zero();\n this._t1 = Vector3.Zero();\n this._t2 = Vector3.Zero();\n }\n Matrix.RotationYawPitchRollToRef(this.vAng, this.uAng, this.wAng, this._rowGenerationMatrix);\n if (this.homogeneousRotationInUVTransform) {\n Matrix.TranslationToRef(-this._cachedURotationCenter, -this._cachedVRotationCenter, -this._cachedWRotationCenter, TmpVectors.Matrix[0]);\n Matrix.TranslationToRef(this._cachedURotationCenter, this._cachedVRotationCenter, this._cachedWRotationCenter, TmpVectors.Matrix[1]);\n Matrix.ScalingToRef(this._cachedUScale, this._cachedVScale, 0, TmpVectors.Matrix[2]);\n Matrix.TranslationToRef(this._cachedUOffset, this._cachedVOffset, 0, TmpVectors.Matrix[3]);\n TmpVectors.Matrix[0].multiplyToRef(this._rowGenerationMatrix, this._cachedTextureMatrix);\n this._cachedTextureMatrix.multiplyToRef(TmpVectors.Matrix[1], this._cachedTextureMatrix);\n this._cachedTextureMatrix.multiplyToRef(TmpVectors.Matrix[2], this._cachedTextureMatrix);\n this._cachedTextureMatrix.multiplyToRef(TmpVectors.Matrix[3], this._cachedTextureMatrix);\n // copy the translation row to the 3rd row of the matrix so that we don't need to update the shaders (which expects the translation to be on the 3rd row)\n this._cachedTextureMatrix.setRowFromFloats(2, this._cachedTextureMatrix.m[12], this._cachedTextureMatrix.m[13], this._cachedTextureMatrix.m[14], 1);\n }\n else {\n this._prepareRowForTextureGeneration(0, 0, 0, this._t0);\n this._prepareRowForTextureGeneration(1.0, 0, 0, this._t1);\n this._prepareRowForTextureGeneration(0, 1.0, 0, this._t2);\n this._t1.subtractInPlace(this._t0);\n this._t2.subtractInPlace(this._t0);\n Matrix.FromValuesToRef(this._t1.x, this._t1.y, this._t1.z, 0.0, this._t2.x, this._t2.y, this._t2.z, 0.0, this._t0.x, this._t0.y, this._t0.z, 0.0, 0.0, 0.0, 0.0, 1.0, this._cachedTextureMatrix);\n }\n const scene = this.getScene();\n if (!scene) {\n return this._cachedTextureMatrix;\n }\n if (this.optimizeUVAllocation) {\n // We flag the materials that are using this texture as \"texture dirty\" because depending on the fact that the matrix is the identity or not, some defines\n // will get different values (see MaterialHelper.PrepareDefinesForMergedUV), meaning we should regenerate the effect accordingly\n scene.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this);\n });\n }\n return this._cachedTextureMatrix;\n }\n /**\n * Get the current matrix used to apply reflection. This is useful to rotate an environment texture for instance.\n * @returns The reflection texture transform\n */\n getReflectionTextureMatrix() {\n const scene = this.getScene();\n if (!scene) {\n return this._cachedReflectionTextureMatrix;\n }\n if (this.uOffset === this._cachedReflectionUOffset &&\n this.vOffset === this._cachedReflectionVOffset &&\n this.uScale === this._cachedReflectionUScale &&\n this.vScale === this._cachedReflectionVScale &&\n this.coordinatesMode === this._cachedReflectionCoordinatesMode) {\n if (this.coordinatesMode === Texture.PROJECTION_MODE) {\n if (this._cachedReflectionProjectionMatrixId === scene.getProjectionMatrix().updateFlag) {\n return this._cachedReflectionTextureMatrix;\n }\n }\n else {\n return this._cachedReflectionTextureMatrix;\n }\n }\n if (!this._cachedReflectionTextureMatrix) {\n this._cachedReflectionTextureMatrix = Matrix.Zero();\n }\n if (!this._projectionModeMatrix) {\n this._projectionModeMatrix = Matrix.Zero();\n }\n const flagMaterialsAsTextureDirty = this._cachedReflectionCoordinatesMode !== this.coordinatesMode;\n this._cachedReflectionUOffset = this.uOffset;\n this._cachedReflectionVOffset = this.vOffset;\n this._cachedReflectionUScale = this.uScale;\n this._cachedReflectionVScale = this.vScale;\n this._cachedReflectionCoordinatesMode = this.coordinatesMode;\n switch (this.coordinatesMode) {\n case Texture.PLANAR_MODE: {\n Matrix.IdentityToRef(this._cachedReflectionTextureMatrix);\n this._cachedReflectionTextureMatrix[0] = this.uScale;\n this._cachedReflectionTextureMatrix[5] = this.vScale;\n this._cachedReflectionTextureMatrix[12] = this.uOffset;\n this._cachedReflectionTextureMatrix[13] = this.vOffset;\n break;\n }\n case Texture.PROJECTION_MODE: {\n Matrix.FromValuesToRef(0.5, 0.0, 0.0, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 1.0, 1.0, this._projectionModeMatrix);\n const projectionMatrix = scene.getProjectionMatrix();\n this._cachedReflectionProjectionMatrixId = projectionMatrix.updateFlag;\n projectionMatrix.multiplyToRef(this._projectionModeMatrix, this._cachedReflectionTextureMatrix);\n break;\n }\n default:\n Matrix.IdentityToRef(this._cachedReflectionTextureMatrix);\n break;\n }\n if (flagMaterialsAsTextureDirty) {\n // We flag the materials that are using this texture as \"texture dirty\" if the coordinatesMode has changed.\n // Indeed, this property is used to set the value of some defines used to generate the effect (in material.isReadyForSubMesh), so we must make sure this code will be re-executed and the effect recreated if necessary\n scene.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this);\n });\n }\n return this._cachedReflectionTextureMatrix;\n }\n /**\n * Clones the texture.\n * @returns the cloned texture\n */\n clone() {\n const options = {\n noMipmap: this._noMipmap,\n invertY: this._invertY,\n samplingMode: this.samplingMode,\n onLoad: undefined,\n onError: undefined,\n buffer: this._texture ? this._texture._buffer : undefined,\n deleteBuffer: this._deleteBuffer,\n format: this.textureFormat,\n mimeType: this.mimeType,\n loaderOptions: this._loaderOptions,\n creationFlags: this._creationFlags,\n useSRGBBuffer: this._useSRGBBuffer,\n };\n return SerializationHelper.Clone(() => {\n return new Texture(this._texture ? this._texture.url : null, this.getScene(), options);\n }, this);\n }\n /**\n * Serialize the texture to a JSON representation we can easily use in the respective Parse function.\n * @returns The JSON representation of the texture\n */\n serialize() {\n var _a, _b;\n const savedName = this.name;\n if (!Texture.SerializeBuffers) {\n if (this.name.startsWith(\"data:\")) {\n this.name = \"\";\n }\n }\n if (this.name.startsWith(\"data:\") && this.url === this.name) {\n this.url = \"\";\n }\n const serializationObject = super.serialize(Texture._SerializeInternalTextureUniqueId);\n if (!serializationObject) {\n return null;\n }\n if (Texture.SerializeBuffers || Texture.ForceSerializeBuffers) {\n if (typeof this._buffer === \"string\" && this._buffer.substr(0, 5) === \"data:\") {\n serializationObject.base64String = this._buffer;\n serializationObject.name = serializationObject.name.replace(\"data:\", \"\");\n }\n else if (this.url && this.url.startsWith(\"data:\") && this._buffer instanceof Uint8Array) {\n serializationObject.base64String = \"data:image/png;base64,\" + EncodeArrayBufferToBase64(this._buffer);\n }\n else if (Texture.ForceSerializeBuffers || (this.url && this.url.startsWith(\"blob:\")) || this._forceSerialize) {\n serializationObject.base64String =\n !this._engine || this._engine._features.supportSyncTextureRead ? GenerateBase64StringFromTexture(this) : GenerateBase64StringFromTextureAsync(this);\n }\n }\n serializationObject.invertY = this._invertY;\n serializationObject.samplingMode = this.samplingMode;\n serializationObject._creationFlags = this._creationFlags;\n serializationObject._useSRGBBuffer = this._useSRGBBuffer;\n if (Texture._SerializeInternalTextureUniqueId) {\n serializationObject.internalTextureUniqueId = (_b = (_a = this._texture) === null || _a === void 0 ? void 0 : _a.uniqueId) !== null && _b !== void 0 ? _b : undefined;\n }\n serializationObject.noMipmap = this._noMipmap;\n this.name = savedName;\n return serializationObject;\n }\n /**\n * Get the current class name of the texture useful for serialization or dynamic coding.\n * @returns \"Texture\"\n */\n getClassName() {\n return \"Texture\";\n }\n /**\n * Dispose the texture and release its associated resources.\n */\n dispose() {\n super.dispose();\n this.onLoadObservable.clear();\n this._delayedOnLoad = null;\n this._delayedOnError = null;\n this._buffer = null;\n }\n /**\n * Parse the JSON representation of a texture in order to recreate the texture in the given scene.\n * @param parsedTexture Define the JSON representation of the texture\n * @param scene Define the scene the parsed texture should be instantiated in\n * @param rootUrl Define the root url of the parsing sequence in the case of relative dependencies\n * @returns The parsed texture if successful\n */\n static Parse(parsedTexture, scene, rootUrl) {\n if (parsedTexture.customType) {\n const customTexture = InstantiationTools.Instantiate(parsedTexture.customType);\n // Update Sampling Mode\n const parsedCustomTexture = customTexture.Parse(parsedTexture, scene, rootUrl);\n if (parsedTexture.samplingMode && parsedCustomTexture.updateSamplingMode && parsedCustomTexture._samplingMode) {\n if (parsedCustomTexture._samplingMode !== parsedTexture.samplingMode) {\n parsedCustomTexture.updateSamplingMode(parsedTexture.samplingMode);\n }\n }\n return parsedCustomTexture;\n }\n if (parsedTexture.isCube && !parsedTexture.isRenderTarget) {\n return Texture._CubeTextureParser(parsedTexture, scene, rootUrl);\n }\n const hasInternalTextureUniqueId = parsedTexture.internalTextureUniqueId !== undefined;\n if (!parsedTexture.name && !parsedTexture.isRenderTarget && !hasInternalTextureUniqueId) {\n return null;\n }\n let internalTexture;\n if (hasInternalTextureUniqueId) {\n const cache = scene.getEngine().getLoadedTexturesCache();\n for (const texture of cache) {\n if (texture.uniqueId === parsedTexture.internalTextureUniqueId) {\n internalTexture = texture;\n break;\n }\n }\n }\n const onLoaded = (texture) => {\n var _a;\n // Clear cache\n if (texture && texture._texture) {\n texture._texture._cachedWrapU = null;\n texture._texture._cachedWrapV = null;\n texture._texture._cachedWrapR = null;\n }\n // Update Sampling Mode\n if (parsedTexture.samplingMode) {\n const sampling = parsedTexture.samplingMode;\n if (texture && texture.samplingMode !== sampling) {\n texture.updateSamplingMode(sampling);\n }\n }\n // Animations\n if (texture && parsedTexture.animations) {\n for (let animationIndex = 0; animationIndex < parsedTexture.animations.length; animationIndex++) {\n const parsedAnimation = parsedTexture.animations[animationIndex];\n const internalClass = GetClass(\"BABYLON.Animation\");\n if (internalClass) {\n texture.animations.push(internalClass.Parse(parsedAnimation));\n }\n }\n }\n if (hasInternalTextureUniqueId && !internalTexture) {\n (_a = texture === null || texture === void 0 ? void 0 : texture._texture) === null || _a === void 0 ? void 0 : _a._setUniqueId(parsedTexture.internalTextureUniqueId);\n }\n };\n const texture = SerializationHelper.Parse(() => {\n var _a, _b, _c;\n let generateMipMaps = true;\n if (parsedTexture.noMipmap) {\n generateMipMaps = false;\n }\n if (parsedTexture.mirrorPlane) {\n const mirrorTexture = Texture._CreateMirror(parsedTexture.name, parsedTexture.renderTargetSize, scene, generateMipMaps);\n mirrorTexture._waitingRenderList = parsedTexture.renderList;\n mirrorTexture.mirrorPlane = Plane.FromArray(parsedTexture.mirrorPlane);\n onLoaded(mirrorTexture);\n return mirrorTexture;\n }\n else if (parsedTexture.isRenderTarget) {\n let renderTargetTexture = null;\n if (parsedTexture.isCube) {\n // Search for an existing reflection probe (which contains a cube render target texture)\n if (scene.reflectionProbes) {\n for (let index = 0; index < scene.reflectionProbes.length; index++) {\n const probe = scene.reflectionProbes[index];\n if (probe.name === parsedTexture.name) {\n return probe.cubeTexture;\n }\n }\n }\n }\n else {\n renderTargetTexture = Texture._CreateRenderTargetTexture(parsedTexture.name, parsedTexture.renderTargetSize, scene, generateMipMaps, (_a = parsedTexture._creationFlags) !== null && _a !== void 0 ? _a : 0);\n renderTargetTexture._waitingRenderList = parsedTexture.renderList;\n }\n onLoaded(renderTargetTexture);\n return renderTargetTexture;\n }\n else if (parsedTexture.isVideo) {\n const texture = Texture._CreateVideoTexture(rootUrl + (parsedTexture.url || parsedTexture.name), rootUrl + (parsedTexture.src || parsedTexture.url), scene, generateMipMaps, parsedTexture.invertY, parsedTexture.samplingMode, parsedTexture.settings || {});\n onLoaded(texture);\n return texture;\n }\n else {\n let texture;\n if (parsedTexture.base64String && !internalTexture) {\n // name and url are the same to ensure caching happens from the actual base64 string\n texture = Texture.CreateFromBase64String(parsedTexture.base64String, parsedTexture.base64String, scene, !generateMipMaps, parsedTexture.invertY, parsedTexture.samplingMode, () => {\n onLoaded(texture);\n }, (_b = parsedTexture._creationFlags) !== null && _b !== void 0 ? _b : 0, (_c = parsedTexture._useSRGBBuffer) !== null && _c !== void 0 ? _c : false);\n // prettier name to fit with the loaded data\n texture.name = parsedTexture.name;\n }\n else {\n let url;\n if (parsedTexture.name && (parsedTexture.name.indexOf(\"://\") > 0 || parsedTexture.name.startsWith(\"data:\"))) {\n url = parsedTexture.name;\n }\n else {\n url = rootUrl + parsedTexture.name;\n }\n if (parsedTexture.url && (parsedTexture.url.startsWith(\"data:\") || Texture.UseSerializedUrlIfAny)) {\n url = parsedTexture.url;\n }\n const options = {\n noMipmap: !generateMipMaps,\n invertY: parsedTexture.invertY,\n samplingMode: parsedTexture.samplingMode,\n onLoad: () => {\n onLoaded(texture);\n },\n internalTexture,\n };\n texture = new Texture(url, scene, options);\n }\n return texture;\n }\n }, parsedTexture, scene);\n return texture;\n }\n /**\n * Creates a texture from its base 64 representation.\n * @param data Define the base64 payload without the data: prefix\n * @param name Define the name of the texture in the scene useful fo caching purpose for instance\n * @param scene Define the scene the texture should belong to\n * @param noMipmapOrOptions defines if the texture will require mip maps or not or set of all options to create the texture\n * @param invertY define if the texture needs to be inverted on the y axis during loading\n * @param samplingMode define the sampling mode we want for the texture while fetching from it (Texture.NEAREST_SAMPLINGMODE...)\n * @param onLoad define a callback triggered when the texture has been loaded\n * @param onError define a callback triggered when an error occurred during the loading session\n * @param format define the format of the texture we are trying to load (Engine.TEXTUREFORMAT_RGBA...)\n * @param creationFlags specific flags to use when creating the texture (1 for storage textures, for eg)\n * @returns the created texture\n */\n static CreateFromBase64String(data, name, scene, noMipmapOrOptions, invertY, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, onLoad = null, onError = null, format = 5, creationFlags) {\n return new Texture(\"data:\" + name, scene, noMipmapOrOptions, invertY, samplingMode, onLoad, onError, data, false, format, undefined, undefined, creationFlags);\n }\n /**\n * Creates a texture from its data: representation. (data: will be added in case only the payload has been passed in)\n * @param name Define the name of the texture in the scene useful fo caching purpose for instance\n * @param buffer define the buffer to load the texture from in case the texture is loaded from a buffer representation\n * @param scene Define the scene the texture should belong to\n * @param deleteBuffer define if the buffer we are loading the texture from should be deleted after load\n * @param noMipmapOrOptions defines if the texture will require mip maps or not or set of all options to create the texture\n * @param invertY define if the texture needs to be inverted on the y axis during loading\n * @param samplingMode define the sampling mode we want for the texture while fetching from it (Texture.NEAREST_SAMPLINGMODE...)\n * @param onLoad define a callback triggered when the texture has been loaded\n * @param onError define a callback triggered when an error occurred during the loading session\n * @param format define the format of the texture we are trying to load (Engine.TEXTUREFORMAT_RGBA...)\n * @param creationFlags specific flags to use when creating the texture (1 for storage textures, for eg)\n * @returns the created texture\n */\n static LoadFromDataString(name, buffer, scene, deleteBuffer = false, noMipmapOrOptions, invertY = true, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, onLoad = null, onError = null, format = 5, creationFlags) {\n if (name.substr(0, 5) !== \"data:\") {\n name = \"data:\" + name;\n }\n return new Texture(name, scene, noMipmapOrOptions, invertY, samplingMode, onLoad, onError, buffer, deleteBuffer, format, undefined, undefined, creationFlags);\n }\n}\n/**\n * Gets or sets a general boolean used to indicate that textures containing direct data (buffers) must be saved as part of the serialization process\n */\nTexture.SerializeBuffers = true;\n/**\n * Gets or sets a general boolean used to indicate that texture buffers must be saved as part of the serialization process.\n * If no buffer exists, one will be created as base64 string from the internal webgl data.\n */\nTexture.ForceSerializeBuffers = false;\n/**\n * This observable will notify when any texture had a loading error\n */\nTexture.OnTextureLoadErrorObservable = new Observable();\n/** @internal */\nTexture._SerializeInternalTextureUniqueId = false;\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nTexture._CubeTextureParser = (jsonTexture, scene, rootUrl) => {\n throw _WarnImport(\"CubeTexture\");\n};\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nTexture._CreateMirror = (name, renderTargetSize, scene, generateMipMaps) => {\n throw _WarnImport(\"MirrorTexture\");\n};\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nTexture._CreateRenderTargetTexture = (name, renderTargetSize, scene, generateMipMaps, creationFlags) => {\n throw _WarnImport(\"RenderTargetTexture\");\n};\n/** nearest is mag = nearest and min = nearest and no mip */\nTexture.NEAREST_SAMPLINGMODE = 1;\n/** nearest is mag = nearest and min = nearest and mip = linear */\nTexture.NEAREST_NEAREST_MIPLINEAR = 8; // nearest is mag = nearest and min = nearest and mip = linear\n/** Bilinear is mag = linear and min = linear and no mip */\nTexture.BILINEAR_SAMPLINGMODE = 2;\n/** Bilinear is mag = linear and min = linear and mip = nearest */\nTexture.LINEAR_LINEAR_MIPNEAREST = 11; // Bilinear is mag = linear and min = linear and mip = nearest\n/** Trilinear is mag = linear and min = linear and mip = linear */\nTexture.TRILINEAR_SAMPLINGMODE = 3;\n/** Trilinear is mag = linear and min = linear and mip = linear */\nTexture.LINEAR_LINEAR_MIPLINEAR = 3; // Trilinear is mag = linear and min = linear and mip = linear\n/** mag = nearest and min = nearest and mip = nearest */\nTexture.NEAREST_NEAREST_MIPNEAREST = 4;\n/** mag = nearest and min = linear and mip = nearest */\nTexture.NEAREST_LINEAR_MIPNEAREST = 5;\n/** mag = nearest and min = linear and mip = linear */\nTexture.NEAREST_LINEAR_MIPLINEAR = 6;\n/** mag = nearest and min = linear and mip = none */\nTexture.NEAREST_LINEAR = 7;\n/** mag = nearest and min = nearest and mip = none */\nTexture.NEAREST_NEAREST = 1;\n/** mag = linear and min = nearest and mip = nearest */\nTexture.LINEAR_NEAREST_MIPNEAREST = 9;\n/** mag = linear and min = nearest and mip = linear */\nTexture.LINEAR_NEAREST_MIPLINEAR = 10;\n/** mag = linear and min = linear and mip = none */\nTexture.LINEAR_LINEAR = 2;\n/** mag = linear and min = nearest and mip = none */\nTexture.LINEAR_NEAREST = 12;\n/** Explicit coordinates mode */\nTexture.EXPLICIT_MODE = 0;\n/** Spherical coordinates mode */\nTexture.SPHERICAL_MODE = 1;\n/** Planar coordinates mode */\nTexture.PLANAR_MODE = 2;\n/** Cubic coordinates mode */\nTexture.CUBIC_MODE = 3;\n/** Projection coordinates mode */\nTexture.PROJECTION_MODE = 4;\n/** Inverse Cubic coordinates mode */\nTexture.SKYBOX_MODE = 5;\n/** Inverse Cubic coordinates mode */\nTexture.INVCUBIC_MODE = 6;\n/** Equirectangular coordinates mode */\nTexture.EQUIRECTANGULAR_MODE = 7;\n/** Equirectangular Fixed coordinates mode */\nTexture.FIXED_EQUIRECTANGULAR_MODE = 8;\n/** Equirectangular Fixed Mirrored coordinates mode */\nTexture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;\n/** Texture is not repeating outside of 0..1 UVs */\nTexture.CLAMP_ADDRESSMODE = 0;\n/** Texture is repeating outside of 0..1 UVs */\nTexture.WRAP_ADDRESSMODE = 1;\n/** Texture is repeating and mirrored */\nTexture.MIRROR_ADDRESSMODE = 2;\n/**\n * Gets or sets a boolean which defines if the texture url must be build from the serialized URL instead of just using the name and loading them side by side with the scene file\n */\nTexture.UseSerializedUrlIfAny = false;\n__decorate([\n serialize()\n], Texture.prototype, \"url\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"uOffset\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"vOffset\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"uScale\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"vScale\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"uAng\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"vAng\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"wAng\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"uRotationCenter\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"vRotationCenter\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"wRotationCenter\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"homogeneousRotationInUVTransform\", void 0);\n__decorate([\n serialize()\n], Texture.prototype, \"isBlocking\", null);\n// References the dependencies.\nRegisterClass(\"BABYLON.Texture\", Texture);\nSerializationHelper._TextureParser = Texture.Parse;\n//# sourceMappingURL=texture.js.map","import { InternalTextureSource } from \"../Materials/Textures/internalTexture.js\";\n\n/**\n * Wrapper around a render target (either single or multi textures)\n */\nexport class RenderTargetWrapper {\n /**\n * Gets the depth/stencil texture (if created by a createDepthStencilTexture() call)\n */\n get depthStencilTexture() {\n return this._depthStencilTexture;\n }\n /**\n * Indicates if the depth/stencil texture has a stencil aspect\n */\n get depthStencilTextureWithStencil() {\n return this._depthStencilTextureWithStencil;\n }\n /**\n * Defines if the render target wrapper is for a cube texture or if false a 2d texture\n */\n get isCube() {\n return this._isCube;\n }\n /**\n * Defines if the render target wrapper is for a single or multi target render wrapper\n */\n get isMulti() {\n return this._isMulti;\n }\n /**\n * Defines if the render target wrapper is for a single or an array of textures\n */\n get is2DArray() {\n return this.layers > 0;\n }\n /**\n * Gets the size of the render target wrapper (used for cubes, as width=height in this case)\n */\n get size() {\n return this.width;\n }\n /**\n * Gets the width of the render target wrapper\n */\n get width() {\n return this._size.width || this._size;\n }\n /**\n * Gets the height of the render target wrapper\n */\n get height() {\n return this._size.height || this._size;\n }\n /**\n * Gets the number of layers of the render target wrapper (only used if is2DArray is true and wrapper is not a multi render target)\n */\n get layers() {\n return this._size.layers || 0;\n }\n /**\n * Gets the render texture. If this is a multi render target, gets the first texture\n */\n get texture() {\n var _a, _b;\n return (_b = (_a = this._textures) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null;\n }\n /**\n * Gets the list of render textures. If we are not in a multi render target, the list will be null (use the texture getter instead)\n */\n get textures() {\n return this._textures;\n }\n /**\n * Gets the face indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null\n */\n get faceIndices() {\n return this._faceIndices;\n }\n /**\n * Gets the layer indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null\n */\n get layerIndices() {\n return this._layerIndices;\n }\n /**\n * Gets the sample count of the render target\n */\n get samples() {\n return this._samples;\n }\n /**\n * Sets the sample count of the render target\n * @param value sample count\n * @param initializeBuffers If set to true, the engine will make an initializing call to drawBuffers (only used when isMulti=true).\n * @param force true to force calling the update sample count engine function even if the current sample count is equal to value\n * @returns the sample count that has been set\n */\n setSamples(value, initializeBuffers = true, force = false) {\n if (this.samples === value && !force) {\n return value;\n }\n const result = this._isMulti\n ? this._engine.updateMultipleRenderTargetTextureSampleCount(this, value, initializeBuffers)\n : this._engine.updateRenderTargetTextureSampleCount(this, value);\n this._samples = value;\n return result;\n }\n /**\n * Initializes the render target wrapper\n * @param isMulti true if the wrapper is a multi render target\n * @param isCube true if the wrapper should render to a cube texture\n * @param size size of the render target (width/height/layers)\n * @param engine engine used to create the render target\n * @param label defines the label to use for the wrapper (for debugging purpose only)\n */\n constructor(isMulti, isCube, size, engine, label) {\n this._textures = null;\n this._faceIndices = null;\n this._layerIndices = null;\n /** @internal */\n this._samples = 1;\n /** @internal */\n this._attachments = null;\n /** @internal */\n this._generateStencilBuffer = false;\n /** @internal */\n this._generateDepthBuffer = false;\n /** @internal */\n this._depthStencilTextureWithStencil = false;\n this._isMulti = isMulti;\n this._isCube = isCube;\n this._size = size;\n this._engine = engine;\n this._depthStencilTexture = null;\n this.label = label;\n }\n /**\n * Sets the render target texture(s)\n * @param textures texture(s) to set\n */\n setTextures(textures) {\n if (Array.isArray(textures)) {\n this._textures = textures;\n }\n else if (textures) {\n this._textures = [textures];\n }\n else {\n this._textures = null;\n }\n }\n /**\n * Set a texture in the textures array\n * @param texture The texture to set\n * @param index The index in the textures array to set\n * @param disposePrevious If this function should dispose the previous texture\n */\n setTexture(texture, index = 0, disposePrevious = true) {\n if (!this._textures) {\n this._textures = [];\n }\n if (this._textures[index] === texture) {\n return;\n }\n if (this._textures[index] && disposePrevious) {\n this._textures[index].dispose();\n }\n this._textures[index] = texture;\n }\n /**\n * Sets the layer and face indices of every render target texture bound to each color attachment\n * @param layers The layers of each texture to be set\n * @param faces The faces of each texture to be set\n */\n setLayerAndFaceIndices(layers, faces) {\n this._layerIndices = layers;\n this._faceIndices = faces;\n }\n /**\n * Sets the layer and face indices of a texture in the textures array that should be bound to each color attachment\n * @param index The index of the texture in the textures array to modify\n * @param layer The layer of the texture to be set\n * @param face The face of the texture to be set\n */\n setLayerAndFaceIndex(index = 0, layer, face) {\n if (!this._layerIndices) {\n this._layerIndices = [];\n }\n if (!this._faceIndices) {\n this._faceIndices = [];\n }\n if (layer !== undefined && layer >= 0) {\n this._layerIndices[index] = layer;\n }\n if (face !== undefined && face >= 0) {\n this._faceIndices[index] = face;\n }\n }\n /**\n * Creates the depth/stencil texture\n * @param comparisonFunction Comparison function to use for the texture\n * @param bilinearFiltering true if bilinear filtering should be used when sampling the texture\n * @param generateStencil true if the stencil aspect should also be created\n * @param samples sample count to use when creating the texture\n * @param format format of the depth texture\n * @param label defines the label to use for the texture (for debugging purpose only)\n * @returns the depth/stencil created texture\n */\n createDepthStencilTexture(comparisonFunction = 0, bilinearFiltering = true, generateStencil = false, samples = 1, format = 14, label) {\n var _a;\n (_a = this._depthStencilTexture) === null || _a === void 0 ? void 0 : _a.dispose();\n this._depthStencilTextureWithStencil = generateStencil;\n this._depthStencilTexture = this._engine.createDepthStencilTexture(this._size, {\n bilinearFiltering,\n comparisonFunction,\n generateStencil,\n isCube: this._isCube,\n samples,\n depthTextureFormat: format,\n label,\n }, this);\n return this._depthStencilTexture;\n }\n /**\n * Shares the depth buffer of this render target with another render target.\n * @internal\n * @param renderTarget Destination renderTarget\n */\n _shareDepth(renderTarget) {\n if (this._depthStencilTexture) {\n if (renderTarget._depthStencilTexture) {\n renderTarget._depthStencilTexture.dispose();\n }\n renderTarget._depthStencilTexture = this._depthStencilTexture;\n this._depthStencilTexture.incrementReferences();\n }\n }\n /**\n * @internal\n */\n _swapAndDie(target) {\n if (this.texture) {\n this.texture._swapAndDie(target);\n }\n this._textures = null;\n this.dispose(true);\n }\n _cloneRenderTargetWrapper() {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n let rtw = null;\n if (this._isMulti) {\n const textureArray = this.textures;\n if (textureArray && textureArray.length > 0) {\n let generateDepthTexture = false;\n let textureCount = textureArray.length;\n const lastTextureSource = textureArray[textureArray.length - 1]._source;\n if (lastTextureSource === InternalTextureSource.Depth || lastTextureSource === InternalTextureSource.DepthStencil) {\n generateDepthTexture = true;\n textureCount--;\n }\n const samplingModes = [];\n const types = [];\n const formats = [];\n const targetTypes = [];\n const faceIndex = [];\n const layerIndex = [];\n const layerCounts = [];\n const internalTexture2Index = {};\n for (let i = 0; i < textureCount; ++i) {\n const texture = textureArray[i];\n samplingModes.push(texture.samplingMode);\n types.push(texture.type);\n formats.push(texture.format);\n const index = internalTexture2Index[texture.uniqueId];\n if (index !== undefined) {\n targetTypes.push(-1);\n layerCounts.push(0);\n }\n else {\n internalTexture2Index[texture.uniqueId] = i;\n if (texture.is2DArray) {\n targetTypes.push(35866);\n layerCounts.push(texture.depth);\n }\n else if (texture.isCube) {\n targetTypes.push(34067);\n layerCounts.push(0);\n } /*else if (texture.isCubeArray) {\n targetTypes.push(3735928559);\n layerCounts.push(texture.depth);\n }*/\n else if (texture.is3D) {\n targetTypes.push(32879);\n layerCounts.push(texture.depth);\n }\n else {\n targetTypes.push(3553);\n layerCounts.push(0);\n }\n }\n if (this._faceIndices) {\n faceIndex.push((_a = this._faceIndices[i]) !== null && _a !== void 0 ? _a : 0);\n }\n if (this._layerIndices) {\n layerIndex.push((_b = this._layerIndices[i]) !== null && _b !== void 0 ? _b : 0);\n }\n }\n const optionsMRT = {\n samplingModes,\n generateMipMaps: textureArray[0].generateMipMaps,\n generateDepthBuffer: this._generateDepthBuffer,\n generateStencilBuffer: this._generateStencilBuffer,\n generateDepthTexture,\n types,\n formats,\n textureCount,\n targetTypes,\n faceIndex,\n layerIndex,\n layerCounts,\n };\n const size = {\n width: this.width,\n height: this.height,\n };\n rtw = this._engine.createMultipleRenderTarget(size, optionsMRT);\n for (let i = 0; i < textureCount; ++i) {\n if (targetTypes[i] !== -1) {\n continue;\n }\n const index = internalTexture2Index[textureArray[i].uniqueId];\n rtw.setTexture(rtw.textures[index], i);\n }\n }\n }\n else {\n const options = {};\n options.generateDepthBuffer = this._generateDepthBuffer;\n options.generateMipMaps = (_d = (_c = this.texture) === null || _c === void 0 ? void 0 : _c.generateMipMaps) !== null && _d !== void 0 ? _d : false;\n options.generateStencilBuffer = this._generateStencilBuffer;\n options.samplingMode = (_e = this.texture) === null || _e === void 0 ? void 0 : _e.samplingMode;\n options.type = (_f = this.texture) === null || _f === void 0 ? void 0 : _f.type;\n options.format = (_g = this.texture) === null || _g === void 0 ? void 0 : _g.format;\n if (this.isCube) {\n rtw = this._engine.createRenderTargetCubeTexture(this.width, options);\n }\n else {\n const size = {\n width: this.width,\n height: this.height,\n layers: this.is2DArray ? (_h = this.texture) === null || _h === void 0 ? void 0 : _h.depth : undefined,\n };\n rtw = this._engine.createRenderTargetTexture(size, options);\n }\n rtw.texture.isReady = true;\n }\n return rtw;\n }\n _swapRenderTargetWrapper(target) {\n if (this._textures && target._textures) {\n for (let i = 0; i < this._textures.length; ++i) {\n this._textures[i]._swapAndDie(target._textures[i], false);\n target._textures[i].isReady = true;\n }\n }\n if (this._depthStencilTexture && target._depthStencilTexture) {\n this._depthStencilTexture._swapAndDie(target._depthStencilTexture);\n target._depthStencilTexture.isReady = true;\n }\n this._textures = null;\n this._depthStencilTexture = null;\n }\n /** @internal */\n _rebuild() {\n const rtw = this._cloneRenderTargetWrapper();\n if (!rtw) {\n return;\n }\n if (this._depthStencilTexture) {\n const samplingMode = this._depthStencilTexture.samplingMode;\n const bilinear = samplingMode === 2 ||\n samplingMode === 3 ||\n samplingMode === 11;\n rtw.createDepthStencilTexture(this._depthStencilTexture._comparisonFunction, bilinear, this._depthStencilTextureWithStencil, this._depthStencilTexture.samples);\n }\n if (this.samples > 1) {\n rtw.setSamples(this.samples);\n }\n rtw._swapRenderTargetWrapper(this);\n rtw.dispose();\n }\n /**\n * Releases the internal render textures\n */\n releaseTextures() {\n var _a, _b;\n if (this._textures) {\n for (let i = 0; (_b = i < ((_a = this._textures) === null || _a === void 0 ? void 0 : _a.length)) !== null && _b !== void 0 ? _b : 0; ++i) {\n this._textures[i].dispose();\n }\n }\n this._textures = null;\n }\n /**\n * Disposes the whole render target wrapper\n * @param disposeOnlyFramebuffers true if only the frame buffers should be released (used for the WebGL engine). If false, all the textures will also be released\n */\n dispose(disposeOnlyFramebuffers = false) {\n var _a;\n if (!disposeOnlyFramebuffers) {\n (_a = this._depthStencilTexture) === null || _a === void 0 ? void 0 : _a.dispose();\n this._depthStencilTexture = null;\n this.releaseTextures();\n }\n this._engine._releaseRenderTargetWrapper(this);\n }\n}\n//# sourceMappingURL=renderTargetWrapper.js.map","import { RenderTargetWrapper } from \"../renderTargetWrapper.js\";\n/** @internal */\nexport class WebGLRenderTargetWrapper extends RenderTargetWrapper {\n constructor(isMulti, isCube, size, engine, context) {\n super(isMulti, isCube, size, engine);\n /**\n * @internal\n */\n this._framebuffer = null;\n /**\n * @internal\n */\n this._depthStencilBuffer = null;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n /**\n * @internal\n */\n this._MSAAFramebuffer = null;\n // Multiview\n /**\n * @internal\n */\n this._colorTextureArray = null;\n /**\n * @internal\n */\n this._depthStencilTextureArray = null;\n /**\n * @internal\n */\n this._disposeOnlyFramebuffers = false;\n /**\n * @internal\n */\n this._currentLOD = 0;\n this._context = context;\n }\n _cloneRenderTargetWrapper() {\n let rtw = null;\n if (this._colorTextureArray && this._depthStencilTextureArray) {\n rtw = this._engine.createMultiviewRenderTargetTexture(this.width, this.height);\n rtw.texture.isReady = true;\n }\n else {\n rtw = super._cloneRenderTargetWrapper();\n }\n return rtw;\n }\n _swapRenderTargetWrapper(target) {\n super._swapRenderTargetWrapper(target);\n target._framebuffer = this._framebuffer;\n target._depthStencilBuffer = this._depthStencilBuffer;\n target._MSAAFramebuffer = this._MSAAFramebuffer;\n target._colorTextureArray = this._colorTextureArray;\n target._depthStencilTextureArray = this._depthStencilTextureArray;\n this._framebuffer = this._depthStencilBuffer = this._MSAAFramebuffer = this._colorTextureArray = this._depthStencilTextureArray = null;\n }\n /**\n * Shares the depth buffer of this render target with another render target.\n * @internal\n * @param renderTarget Destination renderTarget\n */\n _shareDepth(renderTarget) {\n super._shareDepth(renderTarget);\n const gl = this._context;\n const depthbuffer = this._depthStencilBuffer;\n const framebuffer = renderTarget._MSAAFramebuffer || renderTarget._framebuffer;\n if (renderTarget._depthStencilBuffer && renderTarget._depthStencilBuffer !== depthbuffer) {\n gl.deleteRenderbuffer(renderTarget._depthStencilBuffer);\n }\n renderTarget._depthStencilBuffer = depthbuffer;\n const attachment = renderTarget._generateStencilBuffer ? gl.DEPTH_STENCIL_ATTACHMENT : gl.DEPTH_ATTACHMENT;\n this._engine._bindUnboundFramebuffer(framebuffer);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment, gl.RENDERBUFFER, depthbuffer);\n this._engine._bindUnboundFramebuffer(null);\n }\n /**\n * Binds a texture to this render target on a specific attachment\n * @param texture The texture to bind to the framebuffer\n * @param attachmentIndex Index of the attachment\n * @param faceIndexOrLayer The face or layer of the texture to render to in case of cube texture or array texture\n * @param lodLevel defines the lod level to bind to the frame buffer\n */\n _bindTextureRenderTarget(texture, attachmentIndex = 0, faceIndexOrLayer, lodLevel = 0) {\n var _a, _b, _c, _d;\n if (!texture._hardwareTexture) {\n return;\n }\n const framebuffer = this._framebuffer;\n const currentFB = this._engine._currentFramebuffer;\n this._engine._bindUnboundFramebuffer(framebuffer);\n if (this._engine.webGLVersion > 1) {\n const gl = this._context;\n const attachment = gl[\"COLOR_ATTACHMENT\" + attachmentIndex];\n if (texture.is2DArray || texture.is3D) {\n faceIndexOrLayer = (_b = faceIndexOrLayer !== null && faceIndexOrLayer !== void 0 ? faceIndexOrLayer : (_a = this.layerIndices) === null || _a === void 0 ? void 0 : _a[attachmentIndex]) !== null && _b !== void 0 ? _b : 0;\n gl.framebufferTextureLayer(gl.FRAMEBUFFER, attachment, texture._hardwareTexture.underlyingResource, lodLevel, faceIndexOrLayer);\n }\n else if (texture.isCube) {\n // if face index is not specified, try to query it from faceIndices\n // default is face 0\n faceIndexOrLayer = (_d = faceIndexOrLayer !== null && faceIndexOrLayer !== void 0 ? faceIndexOrLayer : (_c = this.faceIndices) === null || _c === void 0 ? void 0 : _c[attachmentIndex]) !== null && _d !== void 0 ? _d : 0;\n gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndexOrLayer, texture._hardwareTexture.underlyingResource, lodLevel);\n }\n else {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, gl.TEXTURE_2D, texture._hardwareTexture.underlyingResource, lodLevel);\n }\n }\n else {\n // Default behavior (WebGL)\n const gl = this._context;\n const attachment = gl[\"COLOR_ATTACHMENT\" + attachmentIndex + \"_WEBGL\"];\n const target = faceIndexOrLayer !== undefined ? gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndexOrLayer : gl.TEXTURE_2D;\n gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, target, texture._hardwareTexture.underlyingResource, lodLevel);\n }\n this._engine._bindUnboundFramebuffer(currentFB);\n }\n /**\n * Set a texture in the textures array\n * @param texture the texture to set\n * @param index the index in the textures array to set\n * @param disposePrevious If this function should dispose the previous texture\n */\n setTexture(texture, index = 0, disposePrevious = true) {\n super.setTexture(texture, index, disposePrevious);\n this._bindTextureRenderTarget(texture, index);\n }\n /**\n * Sets the layer and face indices of every render target texture\n * @param layers The layer of the texture to be set (make negative to not modify)\n * @param faces The face of the texture to be set (make negative to not modify)\n */\n setLayerAndFaceIndices(layers, faces) {\n var _a, _b;\n super.setLayerAndFaceIndices(layers, faces);\n if (!this.textures || !this.layerIndices || !this.faceIndices) {\n return;\n }\n // the length of this._attachments is the right one as it does not count the depth texture, in case we generated it\n const textureCount = (_b = (_a = this._attachments) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : this.textures.length;\n for (let index = 0; index < textureCount; index++) {\n const texture = this.textures[index];\n if (!texture) {\n // The target type was probably -1 at creation time and setTexture has not been called yet for this index\n continue;\n }\n if (texture.is2DArray || texture.is3D) {\n this._bindTextureRenderTarget(texture, index, this.layerIndices[index]);\n }\n else if (texture.isCube) {\n this._bindTextureRenderTarget(texture, index, this.faceIndices[index]);\n }\n else {\n this._bindTextureRenderTarget(texture, index);\n }\n }\n }\n /**\n * Set the face and layer indices of a texture in the textures array\n * @param index The index of the texture in the textures array to modify\n * @param layer The layer of the texture to be set\n * @param face The face of the texture to be set\n */\n setLayerAndFaceIndex(index = 0, layer, face) {\n super.setLayerAndFaceIndex(index, layer, face);\n if (!this.textures || !this.layerIndices || !this.faceIndices) {\n return;\n }\n const texture = this.textures[index];\n if (texture.is2DArray || texture.is3D) {\n this._bindTextureRenderTarget(this.textures[index], index, this.layerIndices[index]);\n }\n else if (texture.isCube) {\n this._bindTextureRenderTarget(this.textures[index], index, this.faceIndices[index]);\n }\n }\n dispose(disposeOnlyFramebuffers = this._disposeOnlyFramebuffers) {\n const gl = this._context;\n if (!disposeOnlyFramebuffers) {\n if (this._colorTextureArray) {\n this._context.deleteTexture(this._colorTextureArray);\n this._colorTextureArray = null;\n }\n if (this._depthStencilTextureArray) {\n this._context.deleteTexture(this._depthStencilTextureArray);\n this._depthStencilTextureArray = null;\n }\n }\n if (this._framebuffer) {\n gl.deleteFramebuffer(this._framebuffer);\n this._framebuffer = null;\n }\n if (this._depthStencilBuffer) {\n gl.deleteRenderbuffer(this._depthStencilBuffer);\n this._depthStencilBuffer = null;\n }\n if (this._MSAAFramebuffer) {\n gl.deleteFramebuffer(this._MSAAFramebuffer);\n this._MSAAFramebuffer = null;\n }\n super.dispose(disposeOnlyFramebuffers);\n }\n}\n//# sourceMappingURL=webGLRenderTargetWrapper.js.map","import { InternalTexture, InternalTextureSource } from \"../../Materials/Textures/internalTexture.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nimport { ThinEngine } from \"../thinEngine.js\";\nimport { WebGLRenderTargetWrapper } from \"../WebGL/webGLRenderTargetWrapper.js\";\n\nThinEngine.prototype._createHardwareRenderTargetWrapper = function (isMulti, isCube, size) {\n const rtWrapper = new WebGLRenderTargetWrapper(isMulti, isCube, size, this, this._gl);\n this._renderTargetWrapperCache.push(rtWrapper);\n return rtWrapper;\n};\nThinEngine.prototype.createRenderTargetTexture = function (size, options) {\n var _a, _b;\n const rtWrapper = this._createHardwareRenderTargetWrapper(false, false, size);\n let generateDepthBuffer = true;\n let generateStencilBuffer = false;\n let noColorAttachment = false;\n let colorAttachment = undefined;\n let samples = 1;\n if (options !== undefined && typeof options === \"object\") {\n generateDepthBuffer = (_a = options.generateDepthBuffer) !== null && _a !== void 0 ? _a : true;\n generateStencilBuffer = !!options.generateStencilBuffer;\n noColorAttachment = !!options.noColorAttachment;\n colorAttachment = options.colorAttachment;\n samples = (_b = options.samples) !== null && _b !== void 0 ? _b : 1;\n }\n const texture = colorAttachment || (noColorAttachment ? null : this._createInternalTexture(size, options, true, InternalTextureSource.RenderTarget));\n const width = size.width || size;\n const height = size.height || size;\n const currentFrameBuffer = this._currentFramebuffer;\n const gl = this._gl;\n // Create the framebuffer\n const framebuffer = gl.createFramebuffer();\n this._bindUnboundFramebuffer(framebuffer);\n rtWrapper._depthStencilBuffer = this._setupFramebufferDepthAttachments(generateStencilBuffer, generateDepthBuffer, width, height);\n // No need to rebind on every frame\n if (texture && !texture.is2DArray) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture._hardwareTexture.underlyingResource, 0);\n }\n this._bindUnboundFramebuffer(currentFrameBuffer);\n rtWrapper._framebuffer = framebuffer;\n rtWrapper._generateDepthBuffer = generateDepthBuffer;\n rtWrapper._generateStencilBuffer = generateStencilBuffer;\n rtWrapper.setTextures(texture);\n this.updateRenderTargetTextureSampleCount(rtWrapper, samples);\n return rtWrapper;\n};\nThinEngine.prototype.createDepthStencilTexture = function (size, options, rtWrapper) {\n if (options.isCube) {\n const width = size.width || size;\n return this._createDepthStencilCubeTexture(width, options, rtWrapper);\n }\n else {\n return this._createDepthStencilTexture(size, options, rtWrapper);\n }\n};\nThinEngine.prototype._createDepthStencilTexture = function (size, options, rtWrapper) {\n const gl = this._gl;\n const layers = size.layers || 0;\n const target = layers !== 0 ? gl.TEXTURE_2D_ARRAY : gl.TEXTURE_2D;\n const internalTexture = new InternalTexture(this, InternalTextureSource.DepthStencil);\n if (!this._caps.depthTextureExtension) {\n Logger.Error(\"Depth texture is not supported by your browser or hardware.\");\n return internalTexture;\n }\n const internalOptions = Object.assign({ bilinearFiltering: false, comparisonFunction: 0, generateStencil: false }, options);\n this._bindTextureDirectly(target, internalTexture, true);\n this._setupDepthStencilTexture(internalTexture, size, internalOptions.generateStencil, internalOptions.comparisonFunction === 0 ? false : internalOptions.bilinearFiltering, internalOptions.comparisonFunction, internalOptions.samples);\n if (internalOptions.depthTextureFormat !== undefined) {\n if (internalOptions.depthTextureFormat !== 15 &&\n internalOptions.depthTextureFormat !== 16 &&\n internalOptions.depthTextureFormat !== 17 &&\n internalOptions.depthTextureFormat !== 13 &&\n internalOptions.depthTextureFormat !== 14 &&\n internalOptions.depthTextureFormat !== 18) {\n Logger.Error(\"Depth texture format is not supported.\");\n return internalTexture;\n }\n internalTexture.format = internalOptions.depthTextureFormat;\n }\n else {\n internalTexture.format = internalOptions.generateStencil ? 13 : 16;\n }\n const hasStencil = internalTexture.format === 17 ||\n internalTexture.format === 13 ||\n internalTexture.format === 18;\n rtWrapper._depthStencilTexture = internalTexture;\n rtWrapper._depthStencilTextureWithStencil = hasStencil;\n let type = gl.UNSIGNED_INT;\n if (internalTexture.format === 15) {\n type = gl.UNSIGNED_SHORT;\n }\n else if (internalTexture.format === 17 || internalTexture.format === 13) {\n type = gl.UNSIGNED_INT_24_8;\n }\n else if (internalTexture.format === 14) {\n type = gl.FLOAT;\n }\n else if (internalTexture.format === 18) {\n type = gl.FLOAT_32_UNSIGNED_INT_24_8_REV;\n }\n const format = hasStencil ? gl.DEPTH_STENCIL : gl.DEPTH_COMPONENT;\n let internalFormat = format;\n if (this.webGLVersion > 1) {\n if (internalTexture.format === 15) {\n internalFormat = gl.DEPTH_COMPONENT16;\n }\n else if (internalTexture.format === 16) {\n internalFormat = gl.DEPTH_COMPONENT24;\n }\n else if (internalTexture.format === 17 || internalTexture.format === 13) {\n internalFormat = gl.DEPTH24_STENCIL8;\n }\n else if (internalTexture.format === 14) {\n internalFormat = gl.DEPTH_COMPONENT32F;\n }\n else if (internalTexture.format === 18) {\n internalFormat = gl.DEPTH32F_STENCIL8;\n }\n }\n if (internalTexture.is2DArray) {\n gl.texImage3D(target, 0, internalFormat, internalTexture.width, internalTexture.height, layers, 0, format, type, null);\n }\n else {\n gl.texImage2D(target, 0, internalFormat, internalTexture.width, internalTexture.height, 0, format, type, null);\n }\n this._bindTextureDirectly(target, null);\n this._internalTexturesCache.push(internalTexture);\n // Dispose previous depth/stencil render buffers and clear the corresponding attachment.\n // Next time this framebuffer is bound, the new depth/stencil texture will be attached.\n const glRtWrapper = rtWrapper;\n if (glRtWrapper._depthStencilBuffer) {\n const currentFrameBuffer = this._currentFramebuffer;\n this._bindUnboundFramebuffer(glRtWrapper._framebuffer);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, null);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, null);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.RENDERBUFFER, null);\n this._bindUnboundFramebuffer(currentFrameBuffer);\n gl.deleteRenderbuffer(glRtWrapper._depthStencilBuffer);\n glRtWrapper._depthStencilBuffer = null;\n }\n return internalTexture;\n};\nThinEngine.prototype.updateRenderTargetTextureSampleCount = function (rtWrapper, samples) {\n if (this.webGLVersion < 2 || !rtWrapper || !rtWrapper.texture) {\n return 1;\n }\n if (rtWrapper.samples === samples) {\n return samples;\n }\n const gl = this._gl;\n samples = Math.min(samples, this.getCaps().maxMSAASamples);\n // Dispose previous render buffers\n if (rtWrapper._depthStencilBuffer) {\n gl.deleteRenderbuffer(rtWrapper._depthStencilBuffer);\n rtWrapper._depthStencilBuffer = null;\n }\n if (rtWrapper._MSAAFramebuffer) {\n gl.deleteFramebuffer(rtWrapper._MSAAFramebuffer);\n rtWrapper._MSAAFramebuffer = null;\n }\n const hardwareTexture = rtWrapper.texture._hardwareTexture;\n hardwareTexture.releaseMSAARenderBuffers();\n if (samples > 1 && typeof gl.renderbufferStorageMultisample === \"function\") {\n const framebuffer = gl.createFramebuffer();\n if (!framebuffer) {\n throw new Error(\"Unable to create multi sampled framebuffer\");\n }\n rtWrapper._MSAAFramebuffer = framebuffer;\n this._bindUnboundFramebuffer(rtWrapper._MSAAFramebuffer);\n const colorRenderbuffer = this._createRenderBuffer(rtWrapper.texture.width, rtWrapper.texture.height, samples, -1 /* not used */, this._getRGBAMultiSampleBufferFormat(rtWrapper.texture.type), gl.COLOR_ATTACHMENT0, false);\n if (!colorRenderbuffer) {\n throw new Error(\"Unable to create multi sampled framebuffer\");\n }\n hardwareTexture.addMSAARenderBuffer(colorRenderbuffer);\n }\n else {\n this._bindUnboundFramebuffer(rtWrapper._framebuffer);\n }\n rtWrapper.texture.samples = samples;\n rtWrapper._samples = samples;\n rtWrapper._depthStencilBuffer = this._setupFramebufferDepthAttachments(rtWrapper._generateStencilBuffer, rtWrapper._generateDepthBuffer, rtWrapper.texture.width, rtWrapper.texture.height, samples);\n this._bindUnboundFramebuffer(null);\n return samples;\n};\n//# sourceMappingURL=engine.renderTarget.js.map","import { InternalTexture, InternalTextureSource } from \"../../Materials/Textures/internalTexture.js\";\nimport { Logger } from \"../../Misc/logger.js\";\n\nimport { ThinEngine } from \"../thinEngine.js\";\nThinEngine.prototype.createRenderTargetCubeTexture = function (size, options) {\n const rtWrapper = this._createHardwareRenderTargetWrapper(false, true, size);\n const fullOptions = Object.assign({ generateMipMaps: true, generateDepthBuffer: true, generateStencilBuffer: false, type: 0, samplingMode: 3, format: 5 }, options);\n fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && fullOptions.generateStencilBuffer;\n if (fullOptions.type === 1 && !this._caps.textureFloatLinearFiltering) {\n // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE\n fullOptions.samplingMode = 1;\n }\n else if (fullOptions.type === 2 && !this._caps.textureHalfFloatLinearFiltering) {\n // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE\n fullOptions.samplingMode = 1;\n }\n const gl = this._gl;\n const texture = new InternalTexture(this, InternalTextureSource.RenderTarget);\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n const filters = this._getSamplingParameters(fullOptions.samplingMode, fullOptions.generateMipMaps);\n if (fullOptions.type === 1 && !this._caps.textureFloat) {\n fullOptions.type = 0;\n Logger.Warn(\"Float textures are not supported. Cube render target forced to TEXTURETYPE_UNESIGNED_BYTE type\");\n }\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, filters.mag);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, filters.min);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n for (let face = 0; face < 6; face++) {\n gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + face, 0, this._getRGBABufferInternalSizedFormat(fullOptions.type, fullOptions.format), size, size, 0, this._getInternalFormat(fullOptions.format), this._getWebGLTextureType(fullOptions.type), null);\n }\n // Create the framebuffer\n const framebuffer = gl.createFramebuffer();\n this._bindUnboundFramebuffer(framebuffer);\n rtWrapper._depthStencilBuffer = this._setupFramebufferDepthAttachments(fullOptions.generateStencilBuffer, fullOptions.generateDepthBuffer, size, size);\n // MipMaps\n if (fullOptions.generateMipMaps) {\n gl.generateMipmap(gl.TEXTURE_CUBE_MAP);\n }\n // Unbind\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\n this._bindUnboundFramebuffer(null);\n rtWrapper._framebuffer = framebuffer;\n rtWrapper._generateDepthBuffer = fullOptions.generateDepthBuffer;\n rtWrapper._generateStencilBuffer = fullOptions.generateStencilBuffer;\n texture.width = size;\n texture.height = size;\n texture.isReady = true;\n texture.isCube = true;\n texture.samples = 1;\n texture.generateMipMaps = fullOptions.generateMipMaps;\n texture.samplingMode = fullOptions.samplingMode;\n texture.type = fullOptions.type;\n texture.format = fullOptions.format;\n this._internalTexturesCache.push(texture);\n rtWrapper.setTextures(texture);\n return rtWrapper;\n};\n//# sourceMappingURL=engine.renderTargetCube.js.map","import { PrecisionDate } from \"./precisionDate.js\";\n/**\n * Performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window\n */\nexport class PerformanceMonitor {\n /**\n * constructor\n * @param frameSampleSize The number of samples required to saturate the sliding window\n */\n constructor(frameSampleSize = 30) {\n this._enabled = true;\n this._rollingFrameTime = new RollingAverage(frameSampleSize);\n }\n /**\n * Samples current frame\n * @param timeMs A timestamp in milliseconds of the current frame to compare with other frames\n */\n sampleFrame(timeMs = PrecisionDate.Now) {\n if (!this._enabled) {\n return;\n }\n if (this._lastFrameTimeMs != null) {\n const dt = timeMs - this._lastFrameTimeMs;\n this._rollingFrameTime.add(dt);\n }\n this._lastFrameTimeMs = timeMs;\n }\n /**\n * Returns the average frame time in milliseconds over the sliding window (or the subset of frames sampled so far)\n */\n get averageFrameTime() {\n return this._rollingFrameTime.average;\n }\n /**\n * Returns the variance frame time in milliseconds over the sliding window (or the subset of frames sampled so far)\n */\n get averageFrameTimeVariance() {\n return this._rollingFrameTime.variance;\n }\n /**\n * Returns the frame time of the most recent frame\n */\n get instantaneousFrameTime() {\n return this._rollingFrameTime.history(0);\n }\n /**\n * Returns the average framerate in frames per second over the sliding window (or the subset of frames sampled so far)\n */\n get averageFPS() {\n return 1000.0 / this._rollingFrameTime.average;\n }\n /**\n * Returns the average framerate in frames per second using the most recent frame time\n */\n get instantaneousFPS() {\n const history = this._rollingFrameTime.history(0);\n if (history === 0) {\n return 0;\n }\n return 1000.0 / history;\n }\n /**\n * Returns true if enough samples have been taken to completely fill the sliding window\n */\n get isSaturated() {\n return this._rollingFrameTime.isSaturated();\n }\n /**\n * Enables contributions to the sliding window sample set\n */\n enable() {\n this._enabled = true;\n }\n /**\n * Disables contributions to the sliding window sample set\n * Samples will not be interpolated over the disabled period\n */\n disable() {\n this._enabled = false;\n //clear last sample to avoid interpolating over the disabled period when next enabled\n this._lastFrameTimeMs = null;\n }\n /**\n * Returns true if sampling is enabled\n */\n get isEnabled() {\n return this._enabled;\n }\n /**\n * Resets performance monitor\n */\n reset() {\n //clear last sample to avoid interpolating over the disabled period when next enabled\n this._lastFrameTimeMs = null;\n //wipe record\n this._rollingFrameTime.reset();\n }\n}\n/**\n * RollingAverage\n *\n * Utility to efficiently compute the rolling average and variance over a sliding window of samples\n */\nexport class RollingAverage {\n /**\n * constructor\n * @param length The number of samples required to saturate the sliding window\n */\n constructor(length) {\n this._samples = new Array(length);\n this.reset();\n }\n /**\n * Adds a sample to the sample set\n * @param v The sample value\n */\n add(v) {\n //http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance\n let delta;\n //we need to check if we've already wrapped round\n if (this.isSaturated()) {\n //remove bottom of stack from mean\n const bottomValue = this._samples[this._pos];\n delta = bottomValue - this.average;\n this.average -= delta / (this._sampleCount - 1);\n this._m2 -= delta * (bottomValue - this.average);\n }\n else {\n this._sampleCount++;\n }\n //add new value to mean\n delta = v - this.average;\n this.average += delta / this._sampleCount;\n this._m2 += delta * (v - this.average);\n //set the new variance\n this.variance = this._m2 / (this._sampleCount - 1);\n this._samples[this._pos] = v;\n this._pos++;\n this._pos %= this._samples.length; //positive wrap around\n }\n /**\n * Returns previously added values or null if outside of history or outside the sliding window domain\n * @param i Index in history. For example, pass 0 for the most recent value and 1 for the value before that\n * @returns Value previously recorded with add() or null if outside of range\n */\n history(i) {\n if (i >= this._sampleCount || i >= this._samples.length) {\n return 0;\n }\n const i0 = this._wrapPosition(this._pos - 1.0);\n return this._samples[this._wrapPosition(i0 - i)];\n }\n /**\n * Returns true if enough samples have been taken to completely fill the sliding window\n * @returns true if sample-set saturated\n */\n isSaturated() {\n return this._sampleCount >= this._samples.length;\n }\n /**\n * Resets the rolling average (equivalent to 0 samples taken so far)\n */\n reset() {\n this.average = 0;\n this.variance = 0;\n this._sampleCount = 0;\n this._pos = 0;\n this._m2 = 0;\n }\n /**\n * Wraps a value around the sample range boundaries\n * @param i Position in sample range, for example if the sample length is 5, and i is -3, then 2 will be returned.\n * @returns Wrapped position in sample range\n */\n _wrapPosition(i) {\n const max = this._samples.length;\n return ((i % max) + max) % max;\n }\n}\n//# sourceMappingURL=performanceMonitor.js.map","import { ThinEngine } from \"../../Engines/thinEngine.js\";\n\nThinEngine.prototype.setAlphaConstants = function (r, g, b, a) {\n this._alphaState.setAlphaBlendConstants(r, g, b, a);\n};\nThinEngine.prototype.setAlphaMode = function (mode, noDepthWriteChange = false) {\n if (this._alphaMode === mode) {\n if (!noDepthWriteChange) {\n // Make sure we still have the correct depth mask according to the alpha mode (a transparent material could have forced writting to the depth buffer, for instance)\n const depthMask = mode === 0;\n if (this.depthCullingState.depthMask !== depthMask) {\n this.depthCullingState.depthMask = depthMask;\n }\n }\n return;\n }\n switch (mode) {\n case 0:\n this._alphaState.alphaBlend = false;\n break;\n case 7:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case 8:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n case 2:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case 6:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE, this._gl.ZERO, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case 1:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE, this._gl.ZERO, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case 3:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ZERO, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case 4:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_COLOR, this._gl.ZERO, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case 5:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case 9:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.CONSTANT_COLOR, this._gl.ONE_MINUS_CONSTANT_COLOR, this._gl.CONSTANT_ALPHA, this._gl.ONE_MINUS_CONSTANT_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n case 10:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n case 11:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case 12:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_ALPHA, this._gl.ONE, this._gl.ZERO, this._gl.ZERO);\n this._alphaState.alphaBlend = true;\n break;\n case 13:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE_MINUS_DST_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n case 14:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n case 15:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE, this._gl.ONE, this._gl.ZERO);\n this._alphaState.alphaBlend = true;\n break;\n case 16:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ZERO, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case 17:\n // Same as ALPHA_COMBINE but accumulates (1 - alpha) values in the alpha channel for a later readout in order independant transparency\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n }\n if (!noDepthWriteChange) {\n this.depthCullingState.depthMask = mode === 0;\n }\n this._alphaMode = mode;\n};\nThinEngine.prototype.getAlphaMode = function () {\n return this._alphaMode;\n};\nThinEngine.prototype.setAlphaEquation = function (equation) {\n if (this._alphaEquation === equation) {\n return;\n }\n switch (equation) {\n case 0:\n this._alphaState.setAlphaEquationParameters(32774, 32774);\n break;\n case 1:\n this._alphaState.setAlphaEquationParameters(32778, 32778);\n break;\n case 2:\n this._alphaState.setAlphaEquationParameters(32779, 32779);\n break;\n case 3:\n this._alphaState.setAlphaEquationParameters(32776, 32776);\n break;\n case 4:\n this._alphaState.setAlphaEquationParameters(32775, 32775);\n break;\n case 5:\n this._alphaState.setAlphaEquationParameters(32775, 32774);\n break;\n }\n this._alphaEquation = equation;\n};\nThinEngine.prototype.getAlphaEquation = function () {\n return this._alphaEquation;\n};\n//# sourceMappingURL=engine.alpha.js.map","import { ThinEngine } from \"../../Engines/thinEngine.js\";\n\n/**\n * Allocate a typed array depending on a texture type. Optionally can copy existing data in the buffer.\n * @param type type of the texture\n * @param sizeOrDstBuffer size of the array OR an existing buffer that will be used as the destination of the copy (if copyBuffer is provided)\n * @param sizeInBytes true if the size of the array is given in bytes, false if it is the number of elements of the array\n * @param copyBuffer if provided, buffer to copy into the destination buffer (either a newly allocated buffer if sizeOrDstBuffer is a number or use sizeOrDstBuffer as the destination buffer otherwise)\n * @returns the allocated buffer or sizeOrDstBuffer if the latter is an ArrayBuffer\n */\nexport function allocateAndCopyTypedBuffer(type, sizeOrDstBuffer, sizeInBytes = false, copyBuffer) {\n switch (type) {\n case 3: {\n const buffer = sizeOrDstBuffer instanceof ArrayBuffer ? new Int8Array(sizeOrDstBuffer) : new Int8Array(sizeOrDstBuffer);\n if (copyBuffer) {\n buffer.set(new Int8Array(copyBuffer));\n }\n return buffer;\n }\n case 0: {\n const buffer = sizeOrDstBuffer instanceof ArrayBuffer ? new Uint8Array(sizeOrDstBuffer) : new Uint8Array(sizeOrDstBuffer);\n if (copyBuffer) {\n buffer.set(new Uint8Array(copyBuffer));\n }\n return buffer;\n }\n case 4: {\n const buffer = sizeOrDstBuffer instanceof ArrayBuffer ? new Int16Array(sizeOrDstBuffer) : new Int16Array(sizeInBytes ? sizeOrDstBuffer / 2 : sizeOrDstBuffer);\n if (copyBuffer) {\n buffer.set(new Int16Array(copyBuffer));\n }\n return buffer;\n }\n case 5:\n case 8:\n case 9:\n case 10:\n case 2: {\n const buffer = sizeOrDstBuffer instanceof ArrayBuffer ? new Uint16Array(sizeOrDstBuffer) : new Uint16Array(sizeInBytes ? sizeOrDstBuffer / 2 : sizeOrDstBuffer);\n if (copyBuffer) {\n buffer.set(new Uint16Array(copyBuffer));\n }\n return buffer;\n }\n case 6: {\n const buffer = sizeOrDstBuffer instanceof ArrayBuffer ? new Int32Array(sizeOrDstBuffer) : new Int32Array(sizeInBytes ? sizeOrDstBuffer / 4 : sizeOrDstBuffer);\n if (copyBuffer) {\n buffer.set(new Int32Array(copyBuffer));\n }\n return buffer;\n }\n case 7:\n case 11:\n case 12:\n case 13:\n case 14:\n case 15: {\n const buffer = sizeOrDstBuffer instanceof ArrayBuffer ? new Uint32Array(sizeOrDstBuffer) : new Uint32Array(sizeInBytes ? sizeOrDstBuffer / 4 : sizeOrDstBuffer);\n if (copyBuffer) {\n buffer.set(new Uint32Array(copyBuffer));\n }\n return buffer;\n }\n case 1: {\n const buffer = sizeOrDstBuffer instanceof ArrayBuffer ? new Float32Array(sizeOrDstBuffer) : new Float32Array(sizeInBytes ? sizeOrDstBuffer / 4 : sizeOrDstBuffer);\n if (copyBuffer) {\n buffer.set(new Float32Array(copyBuffer));\n }\n return buffer;\n }\n }\n const buffer = sizeOrDstBuffer instanceof ArrayBuffer ? new Uint8Array(sizeOrDstBuffer) : new Uint8Array(sizeOrDstBuffer);\n if (copyBuffer) {\n buffer.set(new Uint8Array(copyBuffer));\n }\n return buffer;\n}\nThinEngine.prototype._readTexturePixelsSync = function (texture, width, height, faceIndex = -1, level = 0, buffer = null, flushRenderer = true, noDataConversion = false, x = 0, y = 0) {\n var _a, _b;\n const gl = this._gl;\n if (!gl) {\n throw new Error(\"Engine does not have gl rendering context.\");\n }\n if (!this._dummyFramebuffer) {\n const dummy = gl.createFramebuffer();\n if (!dummy) {\n throw new Error(\"Unable to create dummy framebuffer\");\n }\n this._dummyFramebuffer = dummy;\n }\n gl.bindFramebuffer(gl.FRAMEBUFFER, this._dummyFramebuffer);\n if (faceIndex > -1) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, (_a = texture._hardwareTexture) === null || _a === void 0 ? void 0 : _a.underlyingResource, level);\n }\n else {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, (_b = texture._hardwareTexture) === null || _b === void 0 ? void 0 : _b.underlyingResource, level);\n }\n let readType = texture.type !== undefined ? this._getWebGLTextureType(texture.type) : gl.UNSIGNED_BYTE;\n if (!noDataConversion) {\n switch (readType) {\n case gl.UNSIGNED_BYTE:\n if (!buffer) {\n buffer = new Uint8Array(4 * width * height);\n }\n readType = gl.UNSIGNED_BYTE;\n break;\n default:\n if (!buffer) {\n buffer = new Float32Array(4 * width * height);\n }\n readType = gl.FLOAT;\n break;\n }\n }\n else if (!buffer) {\n buffer = allocateAndCopyTypedBuffer(texture.type, 4 * width * height);\n }\n if (flushRenderer) {\n this.flushFramebuffer();\n }\n gl.readPixels(x, y, width, height, gl.RGBA, readType, buffer);\n gl.bindFramebuffer(gl.FRAMEBUFFER, this._currentFramebuffer);\n return buffer;\n};\nThinEngine.prototype._readTexturePixels = function (texture, width, height, faceIndex = -1, level = 0, buffer = null, flushRenderer = true, noDataConversion = false, x = 0, y = 0) {\n return Promise.resolve(this._readTexturePixelsSync(texture, width, height, faceIndex, level, buffer, flushRenderer, noDataConversion, x, y));\n};\n//# sourceMappingURL=engine.readTexture.js.map","import { ThinEngine } from \"../../Engines/thinEngine.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nThinEngine.prototype.updateDynamicIndexBuffer = function (indexBuffer, indices, offset = 0) {\n // Force cache update\n this._currentBoundBuffer[this._gl.ELEMENT_ARRAY_BUFFER] = null;\n this.bindIndexBuffer(indexBuffer);\n let view;\n if (indexBuffer.is32Bits) {\n // anything else than Uint32Array needs to be converted to Uint32Array\n view = indices instanceof Uint32Array ? indices : new Uint32Array(indices);\n }\n else {\n // anything else than Uint16Array needs to be converted to Uint16Array\n view = indices instanceof Uint16Array ? indices : new Uint16Array(indices);\n }\n this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, view, this._gl.DYNAMIC_DRAW);\n this._resetIndexBufferBinding();\n};\nThinEngine.prototype.updateDynamicVertexBuffer = function (vertexBuffer, data, byteOffset, byteLength) {\n this.bindArrayBuffer(vertexBuffer);\n if (byteOffset === undefined) {\n byteOffset = 0;\n }\n const dataLength = data.byteLength || data.length;\n if (byteLength === undefined || (byteLength >= dataLength && byteOffset === 0)) {\n if (data instanceof Array) {\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, byteOffset, new Float32Array(data));\n }\n else {\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, byteOffset, data);\n }\n }\n else {\n if (data instanceof Array) {\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, new Float32Array(data).subarray(byteOffset, byteOffset + byteLength));\n }\n else {\n if (data instanceof ArrayBuffer) {\n data = new Uint8Array(data, byteOffset, byteLength);\n }\n else {\n data = new Uint8Array(data.buffer, data.byteOffset + byteOffset, byteLength);\n }\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);\n }\n }\n this._resetVertexBufferBinding();\n};\n//# sourceMappingURL=engine.dynamicBuffer.js.map","import { Observable } from \"../Misc/observable.js\";\nimport { InternalTexture, InternalTextureSource } from \"../Materials/Textures/internalTexture.js\";\nimport { IsDocumentAvailable, IsWindowObjectExist } from \"../Misc/domManagement.js\";\nimport { EngineStore } from \"./engineStore.js\";\nimport { _WarnImport } from \"../Misc/devTools.js\";\nimport { ThinEngine } from \"./thinEngine.js\";\n\nimport { PerformanceMonitor } from \"../Misc/performanceMonitor.js\";\nimport { PerfCounter } from \"../Misc/perfCounter.js\";\nimport { WebGLDataBuffer } from \"../Meshes/WebGL/webGLDataBuffer.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { WebGLHardwareTexture } from \"./WebGL/webGLHardwareTexture.js\";\nimport \"./Extensions/engine.alpha.js\";\nimport \"./Extensions/engine.readTexture.js\";\nimport \"./Extensions/engine.dynamicBuffer.js\";\n/**\n * The engine class is responsible for interfacing with all lower-level APIs such as WebGL and Audio\n */\nexport class Engine extends ThinEngine {\n /**\n * Returns the current npm package of the sdk\n */\n // Not mixed with Version for tooling purpose.\n static get NpmPackage() {\n return ThinEngine.NpmPackage;\n }\n /**\n * Returns the current version of the framework\n */\n static get Version() {\n return ThinEngine.Version;\n }\n /** Gets the list of created engines */\n static get Instances() {\n return EngineStore.Instances;\n }\n /**\n * Gets the latest created engine\n */\n static get LastCreatedEngine() {\n return EngineStore.LastCreatedEngine;\n }\n /**\n * Gets the latest created scene\n */\n static get LastCreatedScene() {\n return EngineStore.LastCreatedScene;\n }\n /** @internal */\n /**\n * Engine abstraction for loading and creating an image bitmap from a given source string.\n * @param imageSource source to load the image from.\n * @param options An object that sets options for the image's extraction.\n * @returns ImageBitmap.\n */\n _createImageBitmapFromSource(imageSource, options) {\n const promise = new Promise((resolve, reject) => {\n const image = new Image();\n image.onload = () => {\n image.decode().then(() => {\n this.createImageBitmap(image, options).then((imageBitmap) => {\n resolve(imageBitmap);\n });\n });\n };\n image.onerror = () => {\n reject(`Error loading image ${image.src}`);\n };\n image.src = imageSource;\n });\n return promise;\n }\n /**\n * Engine abstraction for createImageBitmap\n * @param image source for image\n * @param options An object that sets options for the image's extraction.\n * @returns ImageBitmap\n */\n createImageBitmap(image, options) {\n return createImageBitmap(image, options);\n }\n /**\n * Resize an image and returns the image data as an uint8array\n * @param image image to resize\n * @param bufferWidth destination buffer width\n * @param bufferHeight destination buffer height\n * @returns an uint8array containing RGBA values of bufferWidth * bufferHeight size\n */\n resizeImageBitmap(image, bufferWidth, bufferHeight) {\n const canvas = this.createCanvas(bufferWidth, bufferHeight);\n const context = canvas.getContext(\"2d\");\n if (!context) {\n throw new Error(\"Unable to get 2d context for resizeImageBitmap\");\n }\n context.drawImage(image, 0, 0);\n // Create VertexData from map data\n // Cast is due to wrong definition in lib.d.ts from ts 1.3 - https://github.com/Microsoft/TypeScript/issues/949\n const buffer = context.getImageData(0, 0, bufferWidth, bufferHeight).data;\n return buffer;\n }\n /**\n * Will flag all materials in all scenes in all engines as dirty to trigger new shader compilation\n * @param flag defines which part of the materials must be marked as dirty\n * @param predicate defines a predicate used to filter which materials should be affected\n */\n static MarkAllMaterialsAsDirty(flag, predicate) {\n for (let engineIndex = 0; engineIndex < Engine.Instances.length; engineIndex++) {\n const engine = Engine.Instances[engineIndex];\n for (let sceneIndex = 0; sceneIndex < engine.scenes.length; sceneIndex++) {\n engine.scenes[sceneIndex].markAllMaterialsAsDirty(flag, predicate);\n }\n }\n }\n /**\n * Method called to create the default loading screen.\n * This can be overridden in your own app.\n * @param canvas The rendering canvas element\n * @returns The loading screen\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static DefaultLoadingScreenFactory(canvas) {\n throw _WarnImport(\"LoadingScreen\");\n }\n get _supportsHardwareTextureRescaling() {\n return !!Engine._RescalePostProcessFactory;\n }\n /**\n * Gets the performance monitor attached to this engine\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#engineinstrumentation\n */\n get performanceMonitor() {\n return this._performanceMonitor;\n }\n /**\n * (WebGPU only) True (default) to be in compatibility mode, meaning rendering all existing scenes without artifacts (same rendering than WebGL).\n * Setting the property to false will improve performances but may not work in some scenes if some precautions are not taken.\n * See https://doc.babylonjs.com/setup/support/webGPU/webGPUOptimization/webGPUNonCompatibilityMode for more details\n */\n get compatibilityMode() {\n return this._compatibilityMode;\n }\n set compatibilityMode(mode) {\n // not supported in WebGL\n this._compatibilityMode = true;\n }\n // Events\n /**\n * Gets the HTML element used to attach event listeners\n * @returns a HTML element\n */\n getInputElement() {\n return this._renderingCanvas;\n }\n /**\n * Creates a new engine\n * @param canvasOrContext defines the canvas or WebGL context to use for rendering. If you provide a WebGL context, Babylon.js will not hook events on the canvas (like pointers, keyboards, etc...) so no event observables will be available. This is mostly used when Babylon.js is used as a plugin on a system which already used the WebGL context\n * @param antialias defines enable antialiasing (default: false)\n * @param options defines further options to be sent to the getContext() function\n * @param adaptToDeviceRatio defines whether to adapt to the device's viewport characteristics (default: false)\n */\n constructor(canvasOrContext, antialias, options, adaptToDeviceRatio = false) {\n super(canvasOrContext, antialias, options, adaptToDeviceRatio);\n // Members\n /**\n * Gets or sets a boolean to enable/disable IndexedDB support and avoid XHR on .manifest\n **/\n this.enableOfflineSupport = false;\n /**\n * Gets or sets a boolean to enable/disable checking manifest if IndexedDB support is enabled (js will always consider the database is up to date)\n **/\n this.disableManifestCheck = false;\n /**\n * Gets or sets a boolean to enable/disable the context menu (right-click) from appearing on the main canvas\n */\n this.disableContextMenu = true;\n /**\n * Gets the list of created scenes\n */\n this.scenes = [];\n /** @internal */\n this._virtualScenes = new Array();\n /**\n * Event raised when a new scene is created\n */\n this.onNewSceneAddedObservable = new Observable();\n /**\n * Gets the list of created postprocesses\n */\n this.postProcesses = [];\n /**\n * Gets a boolean indicating if the pointer is currently locked\n */\n this.isPointerLock = false;\n // Observables\n /**\n * Observable event triggered each time the rendering canvas is resized\n */\n this.onResizeObservable = new Observable();\n /**\n * Observable event triggered each time the canvas loses focus\n */\n this.onCanvasBlurObservable = new Observable();\n /**\n * Observable event triggered each time the canvas gains focus\n */\n this.onCanvasFocusObservable = new Observable();\n /**\n * Observable event triggered each time the canvas receives pointerout event\n */\n this.onCanvasPointerOutObservable = new Observable();\n /**\n * Observable raised when the engine begins a new frame\n */\n this.onBeginFrameObservable = new Observable();\n /**\n * If set, will be used to request the next animation frame for the render loop\n */\n this.customAnimationFrameRequester = null;\n /**\n * Observable raised when the engine ends the current frame\n */\n this.onEndFrameObservable = new Observable();\n /**\n * Observable raised when the engine is about to compile a shader\n */\n this.onBeforeShaderCompilationObservable = new Observable();\n /**\n * Observable raised when the engine has just compiled a shader\n */\n this.onAfterShaderCompilationObservable = new Observable();\n // Deterministic lockstepMaxSteps\n this._deterministicLockstep = false;\n this._lockstepMaxSteps = 4;\n this._timeStep = 1 / 60;\n // FPS\n this._fps = 60;\n this._deltaTime = 0;\n /** @internal */\n this._drawCalls = new PerfCounter();\n /** Gets or sets the tab index to set to the rendering canvas. 1 is the minimum value to set to be able to capture keyboard events */\n this.canvasTabIndex = 1;\n /**\n * Turn this value on if you want to pause FPS computation when in background\n */\n this.disablePerformanceMonitorInBackground = false;\n this._performanceMonitor = new PerformanceMonitor();\n this._compatibilityMode = true;\n /**\n * Gets or sets the current render pass id\n */\n this.currentRenderPassId = 0;\n this._renderPassNames = [\"main\"];\n Engine.Instances.push(this);\n if (!canvasOrContext) {\n return;\n }\n this._features.supportRenderPasses = true;\n options = this._creationOptions;\n if (canvasOrContext.getContext) {\n const canvas = canvasOrContext;\n this._sharedInit(canvas);\n }\n }\n _initGLContext() {\n super._initGLContext();\n this._rescalePostProcess = null;\n }\n /**\n * Shared initialization across engines types.\n * @param canvas The canvas associated with this instance of the engine.\n */\n _sharedInit(canvas) {\n super._sharedInit(canvas);\n this._onCanvasFocus = () => {\n this.onCanvasFocusObservable.notifyObservers(this);\n };\n this._onCanvasBlur = () => {\n this.onCanvasBlurObservable.notifyObservers(this);\n };\n this._onCanvasContextMenu = (evt) => {\n if (this.disableContextMenu) {\n evt.preventDefault();\n }\n };\n canvas.addEventListener(\"focus\", this._onCanvasFocus);\n canvas.addEventListener(\"blur\", this._onCanvasBlur);\n canvas.addEventListener(\"contextmenu\", this._onCanvasContextMenu);\n this._onBlur = () => {\n if (this.disablePerformanceMonitorInBackground) {\n this._performanceMonitor.disable();\n }\n this._windowIsBackground = true;\n };\n this._onFocus = () => {\n if (this.disablePerformanceMonitorInBackground) {\n this._performanceMonitor.enable();\n }\n this._windowIsBackground = false;\n };\n this._onCanvasPointerOut = (ev) => {\n // Check that the element at the point of the pointer out isn't the canvas and if it isn't, notify observers\n // Note: This is a workaround for a bug with Safari\n if (document.elementFromPoint(ev.clientX, ev.clientY) !== canvas) {\n this.onCanvasPointerOutObservable.notifyObservers(ev);\n }\n };\n const hostWindow = this.getHostWindow(); // it calls IsWindowObjectExist()\n if (hostWindow && typeof hostWindow.addEventListener === \"function\") {\n hostWindow.addEventListener(\"blur\", this._onBlur);\n hostWindow.addEventListener(\"focus\", this._onFocus);\n }\n canvas.addEventListener(\"pointerout\", this._onCanvasPointerOut);\n if (!this._creationOptions.doNotHandleTouchAction) {\n this._disableTouchAction();\n }\n // Create Audio Engine if needed.\n if (!Engine.audioEngine && this._creationOptions.audioEngine && Engine.AudioEngineFactory) {\n Engine.audioEngine = Engine.AudioEngineFactory(this.getRenderingCanvas(), this.getAudioContext(), this.getAudioDestination());\n }\n if (IsDocumentAvailable()) {\n // Fullscreen\n this._onFullscreenChange = () => {\n this.isFullscreen = !!document.fullscreenElement;\n // Pointer lock\n if (this.isFullscreen && this._pointerLockRequested && canvas) {\n Engine._RequestPointerlock(canvas);\n }\n };\n document.addEventListener(\"fullscreenchange\", this._onFullscreenChange, false);\n document.addEventListener(\"webkitfullscreenchange\", this._onFullscreenChange, false);\n // Pointer lock\n this._onPointerLockChange = () => {\n this.isPointerLock = document.pointerLockElement === canvas;\n };\n document.addEventListener(\"pointerlockchange\", this._onPointerLockChange, false);\n document.addEventListener(\"webkitpointerlockchange\", this._onPointerLockChange, false);\n }\n this.enableOfflineSupport = Engine.OfflineProviderFactory !== undefined;\n this._deterministicLockstep = !!this._creationOptions.deterministicLockstep;\n this._lockstepMaxSteps = this._creationOptions.lockstepMaxSteps || 0;\n this._timeStep = this._creationOptions.timeStep || 1 / 60;\n }\n /** @internal */\n _verifyPointerLock() {\n var _a;\n (_a = this._onPointerLockChange) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n /**\n * Gets current aspect ratio\n * @param viewportOwner defines the camera to use to get the aspect ratio\n * @param useScreen defines if screen size must be used (or the current render target if any)\n * @returns a number defining the aspect ratio\n */\n getAspectRatio(viewportOwner, useScreen = false) {\n const viewport = viewportOwner.viewport;\n return (this.getRenderWidth(useScreen) * viewport.width) / (this.getRenderHeight(useScreen) * viewport.height);\n }\n /**\n * Gets current screen aspect ratio\n * @returns a number defining the aspect ratio\n */\n getScreenAspectRatio() {\n return this.getRenderWidth(true) / this.getRenderHeight(true);\n }\n /**\n * Gets the client rect of the HTML canvas attached with the current webGL context\n * @returns a client rectangle\n */\n getRenderingCanvasClientRect() {\n if (!this._renderingCanvas) {\n return null;\n }\n return this._renderingCanvas.getBoundingClientRect();\n }\n /**\n * Gets the client rect of the HTML element used for events\n * @returns a client rectangle\n */\n getInputElementClientRect() {\n if (!this._renderingCanvas) {\n return null;\n }\n return this.getInputElement().getBoundingClientRect();\n }\n /**\n * Gets a boolean indicating that the engine is running in deterministic lock step mode\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\n * @returns true if engine is in deterministic lock step mode\n */\n isDeterministicLockStep() {\n return this._deterministicLockstep;\n }\n /**\n * Gets the max steps when engine is running in deterministic lock step\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\n * @returns the max steps\n */\n getLockstepMaxSteps() {\n return this._lockstepMaxSteps;\n }\n /**\n * Returns the time in ms between steps when using deterministic lock step.\n * @returns time step in (ms)\n */\n getTimeStep() {\n return this._timeStep * 1000;\n }\n /**\n * Force the mipmap generation for the given render target texture\n * @param texture defines the render target texture to use\n * @param unbind defines whether or not to unbind the texture after generation. Defaults to true.\n */\n generateMipMapsForCubemap(texture, unbind = true) {\n if (texture.generateMipMaps) {\n const gl = this._gl;\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n gl.generateMipmap(gl.TEXTURE_CUBE_MAP);\n if (unbind) {\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\n }\n }\n }\n /** States */\n /**\n * Gets a boolean indicating if depth writing is enabled\n * @returns the current depth writing state\n */\n getDepthWrite() {\n return this._depthCullingState.depthMask;\n }\n /**\n * Enable or disable depth writing\n * @param enable defines the state to set\n */\n setDepthWrite(enable) {\n this._depthCullingState.depthMask = enable;\n }\n /**\n * Gets a boolean indicating if stencil buffer is enabled\n * @returns the current stencil buffer state\n */\n getStencilBuffer() {\n return this._stencilState.stencilTest;\n }\n /**\n * Enable or disable the stencil buffer\n * @param enable defines if the stencil buffer must be enabled or disabled\n */\n setStencilBuffer(enable) {\n this._stencilState.stencilTest = enable;\n }\n /**\n * Gets the current stencil mask\n * @returns a number defining the new stencil mask to use\n */\n getStencilMask() {\n return this._stencilState.stencilMask;\n }\n /**\n * Sets the current stencil mask\n * @param mask defines the new stencil mask to use\n */\n setStencilMask(mask) {\n this._stencilState.stencilMask = mask;\n }\n /**\n * Gets the current stencil function\n * @returns a number defining the stencil function to use\n */\n getStencilFunction() {\n return this._stencilState.stencilFunc;\n }\n /**\n * Gets the current stencil reference value\n * @returns a number defining the stencil reference value to use\n */\n getStencilFunctionReference() {\n return this._stencilState.stencilFuncRef;\n }\n /**\n * Gets the current stencil mask\n * @returns a number defining the stencil mask to use\n */\n getStencilFunctionMask() {\n return this._stencilState.stencilFuncMask;\n }\n /**\n * Sets the current stencil function\n * @param stencilFunc defines the new stencil function to use\n */\n setStencilFunction(stencilFunc) {\n this._stencilState.stencilFunc = stencilFunc;\n }\n /**\n * Sets the current stencil reference\n * @param reference defines the new stencil reference to use\n */\n setStencilFunctionReference(reference) {\n this._stencilState.stencilFuncRef = reference;\n }\n /**\n * Sets the current stencil mask\n * @param mask defines the new stencil mask to use\n */\n setStencilFunctionMask(mask) {\n this._stencilState.stencilFuncMask = mask;\n }\n /**\n * Gets the current stencil operation when stencil fails\n * @returns a number defining stencil operation to use when stencil fails\n */\n getStencilOperationFail() {\n return this._stencilState.stencilOpStencilFail;\n }\n /**\n * Gets the current stencil operation when depth fails\n * @returns a number defining stencil operation to use when depth fails\n */\n getStencilOperationDepthFail() {\n return this._stencilState.stencilOpDepthFail;\n }\n /**\n * Gets the current stencil operation when stencil passes\n * @returns a number defining stencil operation to use when stencil passes\n */\n getStencilOperationPass() {\n return this._stencilState.stencilOpStencilDepthPass;\n }\n /**\n * Sets the stencil operation to use when stencil fails\n * @param operation defines the stencil operation to use when stencil fails\n */\n setStencilOperationFail(operation) {\n this._stencilState.stencilOpStencilFail = operation;\n }\n /**\n * Sets the stencil operation to use when depth fails\n * @param operation defines the stencil operation to use when depth fails\n */\n setStencilOperationDepthFail(operation) {\n this._stencilState.stencilOpDepthFail = operation;\n }\n /**\n * Sets the stencil operation to use when stencil passes\n * @param operation defines the stencil operation to use when stencil passes\n */\n setStencilOperationPass(operation) {\n this._stencilState.stencilOpStencilDepthPass = operation;\n }\n /**\n * Sets a boolean indicating if the dithering state is enabled or disabled\n * @param value defines the dithering state\n */\n setDitheringState(value) {\n if (value) {\n this._gl.enable(this._gl.DITHER);\n }\n else {\n this._gl.disable(this._gl.DITHER);\n }\n }\n /**\n * Sets a boolean indicating if the rasterizer state is enabled or disabled\n * @param value defines the rasterizer state\n */\n setRasterizerState(value) {\n if (value) {\n this._gl.disable(this._gl.RASTERIZER_DISCARD);\n }\n else {\n this._gl.enable(this._gl.RASTERIZER_DISCARD);\n }\n }\n /**\n * Gets the current depth function\n * @returns a number defining the depth function\n */\n getDepthFunction() {\n return this._depthCullingState.depthFunc;\n }\n /**\n * Sets the current depth function\n * @param depthFunc defines the function to use\n */\n setDepthFunction(depthFunc) {\n this._depthCullingState.depthFunc = depthFunc;\n }\n /**\n * Sets the current depth function to GREATER\n */\n setDepthFunctionToGreater() {\n this.setDepthFunction(516);\n }\n /**\n * Sets the current depth function to GEQUAL\n */\n setDepthFunctionToGreaterOrEqual() {\n this.setDepthFunction(518);\n }\n /**\n * Sets the current depth function to LESS\n */\n setDepthFunctionToLess() {\n this.setDepthFunction(513);\n }\n /**\n * Sets the current depth function to LEQUAL\n */\n setDepthFunctionToLessOrEqual() {\n this.setDepthFunction(515);\n }\n /**\n * Caches the state of the stencil buffer\n */\n cacheStencilState() {\n this._cachedStencilBuffer = this.getStencilBuffer();\n this._cachedStencilFunction = this.getStencilFunction();\n this._cachedStencilMask = this.getStencilMask();\n this._cachedStencilOperationPass = this.getStencilOperationPass();\n this._cachedStencilOperationFail = this.getStencilOperationFail();\n this._cachedStencilOperationDepthFail = this.getStencilOperationDepthFail();\n this._cachedStencilReference = this.getStencilFunctionReference();\n }\n /**\n * Restores the state of the stencil buffer\n */\n restoreStencilState() {\n this.setStencilFunction(this._cachedStencilFunction);\n this.setStencilMask(this._cachedStencilMask);\n this.setStencilBuffer(this._cachedStencilBuffer);\n this.setStencilOperationPass(this._cachedStencilOperationPass);\n this.setStencilOperationFail(this._cachedStencilOperationFail);\n this.setStencilOperationDepthFail(this._cachedStencilOperationDepthFail);\n this.setStencilFunctionReference(this._cachedStencilReference);\n }\n /**\n * Directly set the WebGL Viewport\n * @param x defines the x coordinate of the viewport (in screen space)\n * @param y defines the y coordinate of the viewport (in screen space)\n * @param width defines the width of the viewport (in screen space)\n * @param height defines the height of the viewport (in screen space)\n * @returns the current viewport Object (if any) that is being replaced by this call. You can restore this viewport later on to go back to the original state\n */\n setDirectViewport(x, y, width, height) {\n const currentViewport = this._cachedViewport;\n this._cachedViewport = null;\n this._viewport(x, y, width, height);\n return currentViewport;\n }\n /**\n * Executes a scissor clear (ie. a clear on a specific portion of the screen)\n * @param x defines the x-coordinate of the bottom left corner of the clear rectangle\n * @param y defines the y-coordinate of the corner of the clear rectangle\n * @param width defines the width of the clear rectangle\n * @param height defines the height of the clear rectangle\n * @param clearColor defines the clear color\n */\n scissorClear(x, y, width, height, clearColor) {\n this.enableScissor(x, y, width, height);\n this.clear(clearColor, true, true, true);\n this.disableScissor();\n }\n /**\n * Enable scissor test on a specific rectangle (ie. render will only be executed on a specific portion of the screen)\n * @param x defines the x-coordinate of the bottom left corner of the clear rectangle\n * @param y defines the y-coordinate of the corner of the clear rectangle\n * @param width defines the width of the clear rectangle\n * @param height defines the height of the clear rectangle\n */\n enableScissor(x, y, width, height) {\n const gl = this._gl;\n // Change state\n gl.enable(gl.SCISSOR_TEST);\n gl.scissor(x, y, width, height);\n }\n /**\n * Disable previously set scissor test rectangle\n */\n disableScissor() {\n const gl = this._gl;\n gl.disable(gl.SCISSOR_TEST);\n }\n /**\n * @internal\n */\n _reportDrawCall(numDrawCalls = 1) {\n this._drawCalls.addCount(numDrawCalls, false);\n }\n /**\n * @internal\n */\n _loadFileAsync(url, offlineProvider, useArrayBuffer) {\n return new Promise((resolve, reject) => {\n this._loadFile(url, (data) => {\n resolve(data);\n }, undefined, offlineProvider, useArrayBuffer, (request, exception) => {\n reject(exception);\n });\n });\n }\n /**\n * Gets the source code of the vertex shader associated with a specific webGL program\n * @param program defines the program to use\n * @returns a string containing the source code of the vertex shader associated with the program\n */\n getVertexShaderSource(program) {\n const shaders = this._gl.getAttachedShaders(program);\n if (!shaders) {\n return null;\n }\n return this._gl.getShaderSource(shaders[0]);\n }\n /**\n * Gets the source code of the fragment shader associated with a specific webGL program\n * @param program defines the program to use\n * @returns a string containing the source code of the fragment shader associated with the program\n */\n getFragmentShaderSource(program) {\n const shaders = this._gl.getAttachedShaders(program);\n if (!shaders) {\n return null;\n }\n return this._gl.getShaderSource(shaders[1]);\n }\n /**\n * Sets a depth stencil texture from a render target to the according uniform.\n * @param channel The texture channel\n * @param uniform The uniform to set\n * @param texture The render target texture containing the depth stencil texture to apply\n * @param name The texture name\n */\n setDepthStencilTexture(channel, uniform, texture, name) {\n if (channel === undefined) {\n return;\n }\n if (uniform) {\n this._boundUniforms[channel] = uniform;\n }\n if (!texture || !texture.depthStencilTexture) {\n this._setTexture(channel, null, undefined, undefined, name);\n }\n else {\n this._setTexture(channel, texture, false, true, name);\n }\n }\n /**\n * Sets a texture to the webGL context from a postprocess\n * @param channel defines the channel to use\n * @param postProcess defines the source postprocess\n * @param name name of the channel\n */\n setTextureFromPostProcess(channel, postProcess, name) {\n var _a;\n let postProcessInput = null;\n if (postProcess) {\n if (postProcess._forcedOutputTexture) {\n postProcessInput = postProcess._forcedOutputTexture;\n }\n else if (postProcess._textures.data[postProcess._currentRenderTextureInd]) {\n postProcessInput = postProcess._textures.data[postProcess._currentRenderTextureInd];\n }\n }\n this._bindTexture(channel, (_a = postProcessInput === null || postProcessInput === void 0 ? void 0 : postProcessInput.texture) !== null && _a !== void 0 ? _a : null, name);\n }\n /**\n * Binds the output of the passed in post process to the texture channel specified\n * @param channel The channel the texture should be bound to\n * @param postProcess The post process which's output should be bound\n * @param name name of the channel\n */\n setTextureFromPostProcessOutput(channel, postProcess, name) {\n var _a, _b;\n this._bindTexture(channel, (_b = (_a = postProcess === null || postProcess === void 0 ? void 0 : postProcess._outputTexture) === null || _a === void 0 ? void 0 : _a.texture) !== null && _b !== void 0 ? _b : null, name);\n }\n _rebuildBuffers() {\n // Index / Vertex\n for (const scene of this.scenes) {\n scene.resetCachedMaterial();\n scene._rebuildGeometries();\n scene._rebuildTextures();\n }\n for (const scene of this._virtualScenes) {\n scene.resetCachedMaterial();\n scene._rebuildGeometries();\n scene._rebuildTextures();\n }\n super._rebuildBuffers();\n }\n /** @internal */\n _renderFrame() {\n for (let index = 0; index < this._activeRenderLoops.length; index++) {\n const renderFunction = this._activeRenderLoops[index];\n renderFunction();\n }\n }\n _cancelFrame() {\n if (this._renderingQueueLaunched && this.customAnimationFrameRequester) {\n this._renderingQueueLaunched = false;\n const { cancelAnimationFrame } = this.customAnimationFrameRequester;\n if (cancelAnimationFrame) {\n cancelAnimationFrame(this.customAnimationFrameRequester.requestID);\n }\n }\n else {\n super._cancelFrame();\n }\n }\n _renderLoop() {\n if (!this._contextWasLost) {\n let shouldRender = true;\n if (this.isDisposed || (!this.renderEvenInBackground && this._windowIsBackground)) {\n shouldRender = false;\n }\n if (shouldRender) {\n // Start new frame\n this.beginFrame();\n // Child canvases\n if (!this._renderViews()) {\n // Main frame\n this._renderFrame();\n }\n // Present\n this.endFrame();\n }\n }\n if (this._activeRenderLoops.length > 0) {\n // Register new frame\n if (this.customAnimationFrameRequester) {\n this.customAnimationFrameRequester.requestID = this._queueNewFrame(this.customAnimationFrameRequester.renderFunction || this._boundRenderFunction, this.customAnimationFrameRequester);\n this._frameHandler = this.customAnimationFrameRequester.requestID;\n }\n else {\n this._frameHandler = this._queueNewFrame(this._boundRenderFunction, this.getHostWindow());\n }\n }\n else {\n this._renderingQueueLaunched = false;\n }\n }\n /** @internal */\n _renderViews() {\n return false;\n }\n /**\n * Toggle full screen mode\n * @param requestPointerLock defines if a pointer lock should be requested from the user\n */\n switchFullscreen(requestPointerLock) {\n if (this.isFullscreen) {\n this.exitFullscreen();\n }\n else {\n this.enterFullscreen(requestPointerLock);\n }\n }\n /**\n * Enters full screen mode\n * @param requestPointerLock defines if a pointer lock should be requested from the user\n */\n enterFullscreen(requestPointerLock) {\n if (!this.isFullscreen) {\n this._pointerLockRequested = requestPointerLock;\n if (this._renderingCanvas) {\n Engine._RequestFullscreen(this._renderingCanvas);\n }\n }\n }\n /**\n * Exits full screen mode\n */\n exitFullscreen() {\n if (this.isFullscreen) {\n Engine._ExitFullscreen();\n }\n }\n /**\n * Enters Pointerlock mode\n */\n enterPointerlock() {\n if (this._renderingCanvas) {\n Engine._RequestPointerlock(this._renderingCanvas);\n }\n }\n /**\n * Exits Pointerlock mode\n */\n exitPointerlock() {\n Engine._ExitPointerlock();\n }\n /**\n * Begin a new frame\n */\n beginFrame() {\n this._measureFps();\n this.onBeginFrameObservable.notifyObservers(this);\n super.beginFrame();\n }\n /**\n * End the current frame\n */\n endFrame() {\n super.endFrame();\n this.onEndFrameObservable.notifyObservers(this);\n }\n /**\n * Force a specific size of the canvas\n * @param width defines the new canvas' width\n * @param height defines the new canvas' height\n * @param forceSetSize true to force setting the sizes of the underlying canvas\n * @returns true if the size was changed\n */\n setSize(width, height, forceSetSize = false) {\n if (!this._renderingCanvas) {\n return false;\n }\n if (!super.setSize(width, height, forceSetSize)) {\n return false;\n }\n if (this.scenes) {\n for (let index = 0; index < this.scenes.length; index++) {\n const scene = this.scenes[index];\n for (let camIndex = 0; camIndex < scene.cameras.length; camIndex++) {\n const cam = scene.cameras[camIndex];\n cam._currentRenderId = 0;\n }\n }\n if (this.onResizeObservable.hasObservers()) {\n this.onResizeObservable.notifyObservers(this);\n }\n }\n return true;\n }\n _deletePipelineContext(pipelineContext) {\n const webGLPipelineContext = pipelineContext;\n if (webGLPipelineContext && webGLPipelineContext.program) {\n if (webGLPipelineContext.transformFeedback) {\n this.deleteTransformFeedback(webGLPipelineContext.transformFeedback);\n webGLPipelineContext.transformFeedback = null;\n }\n }\n super._deletePipelineContext(pipelineContext);\n }\n createShaderProgram(pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings = null) {\n context = context || this._gl;\n this.onBeforeShaderCompilationObservable.notifyObservers(this);\n const program = super.createShaderProgram(pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings);\n this.onAfterShaderCompilationObservable.notifyObservers(this);\n return program;\n }\n _createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings = null) {\n const shaderProgram = context.createProgram();\n pipelineContext.program = shaderProgram;\n if (!shaderProgram) {\n throw new Error(\"Unable to create program\");\n }\n context.attachShader(shaderProgram, vertexShader);\n context.attachShader(shaderProgram, fragmentShader);\n if (this.webGLVersion > 1 && transformFeedbackVaryings) {\n const transformFeedback = this.createTransformFeedback();\n this.bindTransformFeedback(transformFeedback);\n this.setTranformFeedbackVaryings(shaderProgram, transformFeedbackVaryings);\n pipelineContext.transformFeedback = transformFeedback;\n }\n context.linkProgram(shaderProgram);\n if (this.webGLVersion > 1 && transformFeedbackVaryings) {\n this.bindTransformFeedback(null);\n }\n pipelineContext.context = context;\n pipelineContext.vertexShader = vertexShader;\n pipelineContext.fragmentShader = fragmentShader;\n if (!pipelineContext.isParallelCompiled) {\n this._finalizePipelineContext(pipelineContext);\n }\n return shaderProgram;\n }\n /**\n * @internal\n */\n _releaseTexture(texture) {\n super._releaseTexture(texture);\n }\n /**\n * @internal\n */\n _releaseRenderTargetWrapper(rtWrapper) {\n super._releaseRenderTargetWrapper(rtWrapper);\n // Set output texture of post process to null if the framebuffer has been released/disposed\n this.scenes.forEach((scene) => {\n scene.postProcesses.forEach((postProcess) => {\n if (postProcess._outputTexture === rtWrapper) {\n postProcess._outputTexture = null;\n }\n });\n scene.cameras.forEach((camera) => {\n camera._postProcesses.forEach((postProcess) => {\n if (postProcess) {\n if (postProcess._outputTexture === rtWrapper) {\n postProcess._outputTexture = null;\n }\n }\n });\n });\n });\n }\n /**\n * Gets the names of the render passes that are currently created\n * @returns list of the render pass names\n */\n getRenderPassNames() {\n return this._renderPassNames;\n }\n /**\n * Gets the name of the current render pass\n * @returns name of the current render pass\n */\n getCurrentRenderPassName() {\n return this._renderPassNames[this.currentRenderPassId];\n }\n /**\n * Creates a render pass id\n * @param name Name of the render pass (for debug purpose only)\n * @returns the id of the new render pass\n */\n createRenderPassId(name) {\n // Note: render pass id == 0 is always for the main render pass\n const id = ++Engine._RenderPassIdCounter;\n this._renderPassNames[id] = name !== null && name !== void 0 ? name : \"NONAME\";\n return id;\n }\n /**\n * Releases a render pass id\n * @param id id of the render pass to release\n */\n releaseRenderPassId(id) {\n this._renderPassNames[id] = undefined;\n for (let s = 0; s < this.scenes.length; ++s) {\n const scene = this.scenes[s];\n for (let m = 0; m < scene.meshes.length; ++m) {\n const mesh = scene.meshes[m];\n if (mesh.subMeshes) {\n for (let b = 0; b < mesh.subMeshes.length; ++b) {\n const subMesh = mesh.subMeshes[b];\n subMesh._removeDrawWrapper(id);\n }\n }\n }\n }\n }\n /**\n * @internal\n * Rescales a texture\n * @param source input texture\n * @param destination destination texture\n * @param scene scene to use to render the resize\n * @param internalFormat format to use when resizing\n * @param onComplete callback to be called when resize has completed\n */\n _rescaleTexture(source, destination, scene, internalFormat, onComplete) {\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, this._gl.LINEAR);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, this._gl.LINEAR);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_S, this._gl.CLAMP_TO_EDGE);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_T, this._gl.CLAMP_TO_EDGE);\n const rtt = this.createRenderTargetTexture({\n width: destination.width,\n height: destination.height,\n }, {\n generateMipMaps: false,\n type: 0,\n samplingMode: 2,\n generateDepthBuffer: false,\n generateStencilBuffer: false,\n });\n if (!this._rescalePostProcess && Engine._RescalePostProcessFactory) {\n this._rescalePostProcess = Engine._RescalePostProcessFactory(this);\n }\n if (this._rescalePostProcess) {\n this._rescalePostProcess.externalTextureSamplerBinding = true;\n this._rescalePostProcess.getEffect().executeWhenCompiled(() => {\n this._rescalePostProcess.onApply = function (effect) {\n effect._bindTexture(\"textureSampler\", source);\n };\n let hostingScene = scene;\n if (!hostingScene) {\n hostingScene = this.scenes[this.scenes.length - 1];\n }\n hostingScene.postProcessManager.directRender([this._rescalePostProcess], rtt, true);\n this._bindTextureDirectly(this._gl.TEXTURE_2D, destination, true);\n this._gl.copyTexImage2D(this._gl.TEXTURE_2D, 0, internalFormat, 0, 0, destination.width, destination.height, 0);\n this.unBindFramebuffer(rtt);\n rtt.dispose();\n if (onComplete) {\n onComplete();\n }\n });\n }\n }\n // FPS\n /**\n * Gets the current framerate\n * @returns a number representing the framerate\n */\n getFps() {\n return this._fps;\n }\n /**\n * Gets the time spent between current and previous frame\n * @returns a number representing the delta time in ms\n */\n getDeltaTime() {\n return this._deltaTime;\n }\n _measureFps() {\n this._performanceMonitor.sampleFrame();\n this._fps = this._performanceMonitor.averageFPS;\n this._deltaTime = this._performanceMonitor.instantaneousFrameTime || 0;\n }\n /**\n * Wraps an external web gl texture in a Babylon texture.\n * @param texture defines the external texture\n * @param hasMipMaps defines whether the external texture has mip maps (default: false)\n * @param samplingMode defines the sampling mode for the external texture (default: 3)\n * @param width defines the width for the external texture (default: 0)\n * @param height defines the height for the external texture (default: 0)\n * @returns the babylon internal texture\n */\n wrapWebGLTexture(texture, hasMipMaps = false, samplingMode = 3, width = 0, height = 0) {\n const hardwareTexture = new WebGLHardwareTexture(texture, this._gl);\n const internalTexture = new InternalTexture(this, InternalTextureSource.Unknown, true);\n internalTexture._hardwareTexture = hardwareTexture;\n internalTexture.baseWidth = width;\n internalTexture.baseHeight = height;\n internalTexture.width = width;\n internalTexture.height = height;\n internalTexture.isReady = true;\n internalTexture.useMipMaps = hasMipMaps;\n this.updateTextureSamplingMode(samplingMode, internalTexture);\n return internalTexture;\n }\n /**\n * @internal\n */\n _uploadImageToTexture(texture, image, faceIndex = 0, lod = 0) {\n const gl = this._gl;\n const textureType = this._getWebGLTextureType(texture.type);\n const format = this._getInternalFormat(texture.format);\n const internalFormat = this._getRGBABufferInternalSizedFormat(texture.type, format);\n const bindTarget = texture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;\n this._bindTextureDirectly(bindTarget, texture, true);\n this._unpackFlipY(texture.invertY);\n let target = gl.TEXTURE_2D;\n if (texture.isCube) {\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\n }\n gl.texImage2D(target, lod, internalFormat, format, textureType, image);\n this._bindTextureDirectly(bindTarget, null, true);\n }\n /**\n * Updates a depth texture Comparison Mode and Function.\n * If the comparison Function is equal to 0, the mode will be set to none.\n * Otherwise, this only works in webgl 2 and requires a shadow sampler in the shader.\n * @param texture The texture to set the comparison function for\n * @param comparisonFunction The comparison function to set, 0 if no comparison required\n */\n updateTextureComparisonFunction(texture, comparisonFunction) {\n if (this.webGLVersion === 1) {\n Logger.Error(\"WebGL 1 does not support texture comparison.\");\n return;\n }\n const gl = this._gl;\n if (texture.isCube) {\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, texture, true);\n if (comparisonFunction === 0) {\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_FUNC, 515);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_MODE, gl.NONE);\n }\n else {\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_FUNC, comparisonFunction);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\n }\n else {\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);\n if (comparisonFunction === 0) {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_FUNC, 515);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_MODE, gl.NONE);\n }\n else {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_FUNC, comparisonFunction);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\n }\n texture._comparisonFunction = comparisonFunction;\n }\n /**\n * Creates a webGL buffer to use with instantiation\n * @param capacity defines the size of the buffer\n * @returns the webGL buffer\n */\n createInstancesBuffer(capacity) {\n const buffer = this._gl.createBuffer();\n if (!buffer) {\n throw new Error(\"Unable to create instance buffer\");\n }\n const result = new WebGLDataBuffer(buffer);\n result.capacity = capacity;\n this.bindArrayBuffer(result);\n this._gl.bufferData(this._gl.ARRAY_BUFFER, capacity, this._gl.DYNAMIC_DRAW);\n result.references = 1;\n return result;\n }\n /**\n * Delete a webGL buffer used with instantiation\n * @param buffer defines the webGL buffer to delete\n */\n deleteInstancesBuffer(buffer) {\n this._gl.deleteBuffer(buffer);\n }\n _clientWaitAsync(sync, flags = 0, intervalms = 10) {\n const gl = this._gl;\n return new Promise((resolve, reject) => {\n const check = () => {\n const res = gl.clientWaitSync(sync, flags, 0);\n if (res == gl.WAIT_FAILED) {\n reject();\n return;\n }\n if (res == gl.TIMEOUT_EXPIRED) {\n setTimeout(check, intervalms);\n return;\n }\n resolve();\n };\n check();\n });\n }\n /**\n * @internal\n */\n _readPixelsAsync(x, y, w, h, format, type, outputBuffer) {\n if (this._webGLVersion < 2) {\n throw new Error(\"_readPixelsAsync only work on WebGL2+\");\n }\n const gl = this._gl;\n const buf = gl.createBuffer();\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, buf);\n gl.bufferData(gl.PIXEL_PACK_BUFFER, outputBuffer.byteLength, gl.STREAM_READ);\n gl.readPixels(x, y, w, h, format, type, 0);\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, null);\n const sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0);\n if (!sync) {\n return null;\n }\n gl.flush();\n return this._clientWaitAsync(sync, 0, 10).then(() => {\n gl.deleteSync(sync);\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, buf);\n gl.getBufferSubData(gl.PIXEL_PACK_BUFFER, 0, outputBuffer);\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, null);\n gl.deleteBuffer(buf);\n return outputBuffer;\n });\n }\n dispose() {\n this.hideLoadingUI();\n this.onNewSceneAddedObservable.clear();\n // Release postProcesses\n while (this.postProcesses.length) {\n this.postProcesses[0].dispose();\n }\n // Rescale PP\n if (this._rescalePostProcess) {\n this._rescalePostProcess.dispose();\n }\n // Release scenes\n while (this.scenes.length) {\n this.scenes[0].dispose();\n }\n while (this._virtualScenes.length) {\n this._virtualScenes[0].dispose();\n }\n // Release audio engine\n if (EngineStore.Instances.length === 1 && Engine.audioEngine) {\n Engine.audioEngine.dispose();\n Engine.audioEngine = null;\n }\n // Events\n const hostWindow = this.getHostWindow(); // it calls IsWindowObjectExist()\n if (hostWindow && typeof hostWindow.removeEventListener === \"function\") {\n hostWindow.removeEventListener(\"blur\", this._onBlur);\n hostWindow.removeEventListener(\"focus\", this._onFocus);\n }\n if (this._renderingCanvas) {\n this._renderingCanvas.removeEventListener(\"focus\", this._onCanvasFocus);\n this._renderingCanvas.removeEventListener(\"blur\", this._onCanvasBlur);\n this._renderingCanvas.removeEventListener(\"pointerout\", this._onCanvasPointerOut);\n this._renderingCanvas.removeEventListener(\"contextmenu\", this._onCanvasContextMenu);\n }\n if (IsDocumentAvailable()) {\n document.removeEventListener(\"fullscreenchange\", this._onFullscreenChange);\n document.removeEventListener(\"mozfullscreenchange\", this._onFullscreenChange);\n document.removeEventListener(\"webkitfullscreenchange\", this._onFullscreenChange);\n document.removeEventListener(\"msfullscreenchange\", this._onFullscreenChange);\n document.removeEventListener(\"pointerlockchange\", this._onPointerLockChange);\n document.removeEventListener(\"mspointerlockchange\", this._onPointerLockChange);\n document.removeEventListener(\"mozpointerlockchange\", this._onPointerLockChange);\n document.removeEventListener(\"webkitpointerlockchange\", this._onPointerLockChange);\n }\n super.dispose();\n // Remove from Instances\n const index = EngineStore.Instances.indexOf(this);\n if (index >= 0) {\n EngineStore.Instances.splice(index, 1);\n }\n // no more engines left in the engine store? Notify!\n if (!Engine.Instances.length) {\n EngineStore.OnEnginesDisposedObservable.notifyObservers(this);\n }\n // Observables\n this.onResizeObservable.clear();\n this.onCanvasBlurObservable.clear();\n this.onCanvasFocusObservable.clear();\n this.onCanvasPointerOutObservable.clear();\n this.onBeginFrameObservable.clear();\n this.onEndFrameObservable.clear();\n }\n _disableTouchAction() {\n if (!this._renderingCanvas || !this._renderingCanvas.setAttribute) {\n return;\n }\n this._renderingCanvas.setAttribute(\"touch-action\", \"none\");\n this._renderingCanvas.style.touchAction = \"none\";\n this._renderingCanvas.style.webkitTapHighlightColor = \"transparent\";\n }\n // Loading screen\n /**\n * Display the loading screen\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/customLoadingScreen\n */\n displayLoadingUI() {\n if (!IsWindowObjectExist()) {\n return;\n }\n const loadingScreen = this.loadingScreen;\n if (loadingScreen) {\n loadingScreen.displayLoadingUI();\n }\n }\n /**\n * Hide the loading screen\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/customLoadingScreen\n */\n hideLoadingUI() {\n if (!IsWindowObjectExist()) {\n return;\n }\n const loadingScreen = this._loadingScreen;\n if (loadingScreen) {\n loadingScreen.hideLoadingUI();\n }\n }\n /**\n * Gets the current loading screen object\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/customLoadingScreen\n */\n get loadingScreen() {\n if (!this._loadingScreen && this._renderingCanvas) {\n this._loadingScreen = Engine.DefaultLoadingScreenFactory(this._renderingCanvas);\n }\n return this._loadingScreen;\n }\n /**\n * Sets the current loading screen object\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/customLoadingScreen\n */\n set loadingScreen(loadingScreen) {\n this._loadingScreen = loadingScreen;\n }\n /**\n * Sets the current loading screen text\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/customLoadingScreen\n */\n set loadingUIText(text) {\n this.loadingScreen.loadingUIText = text;\n }\n /**\n * Sets the current loading screen background color\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/customLoadingScreen\n */\n set loadingUIBackgroundColor(color) {\n this.loadingScreen.loadingUIBackgroundColor = color;\n }\n /**\n * creates and returns a new video element\n * @param constraints video constraints\n * @returns video element\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n createVideoElement(constraints) {\n return document.createElement(\"video\");\n }\n /** Pointerlock and fullscreen */\n /**\n * Ask the browser to promote the current element to pointerlock mode\n * @param element defines the DOM element to promote\n */\n static _RequestPointerlock(element) {\n if (element.requestPointerLock) {\n // In some browsers, requestPointerLock returns a promise.\n // Handle possible rejections to avoid an unhandled top-level exception.\n const promise = element.requestPointerLock();\n if (promise instanceof Promise)\n promise\n .then(() => {\n element.focus();\n })\n .catch(() => { });\n else\n element.focus();\n }\n }\n /**\n * Asks the browser to exit pointerlock mode\n */\n static _ExitPointerlock() {\n if (document.exitPointerLock) {\n document.exitPointerLock();\n }\n }\n /**\n * Ask the browser to promote the current element to fullscreen rendering mode\n * @param element defines the DOM element to promote\n */\n static _RequestFullscreen(element) {\n const requestFunction = element.requestFullscreen || element.webkitRequestFullscreen;\n if (!requestFunction) {\n return;\n }\n requestFunction.call(element);\n }\n /**\n * Asks the browser to exit fullscreen mode\n */\n static _ExitFullscreen() {\n const anyDoc = document;\n if (document.exitFullscreen) {\n document.exitFullscreen();\n }\n else if (anyDoc.webkitCancelFullScreen) {\n anyDoc.webkitCancelFullScreen();\n }\n }\n /**\n * Get Font size information\n * @param font font name\n * @returns an object containing ascent, height and descent\n */\n getFontOffset(font) {\n const text = document.createElement(\"span\");\n text.innerHTML = \"Hg\";\n text.setAttribute(\"style\", `font: ${font} !important`);\n const block = document.createElement(\"div\");\n block.style.display = \"inline-block\";\n block.style.width = \"1px\";\n block.style.height = \"0px\";\n block.style.verticalAlign = \"bottom\";\n const div = document.createElement(\"div\");\n div.style.whiteSpace = \"nowrap\";\n div.appendChild(text);\n div.appendChild(block);\n document.body.appendChild(div);\n let fontAscent = 0;\n let fontHeight = 0;\n try {\n fontHeight = block.getBoundingClientRect().top - text.getBoundingClientRect().top;\n block.style.verticalAlign = \"baseline\";\n fontAscent = block.getBoundingClientRect().top - text.getBoundingClientRect().top;\n }\n finally {\n document.body.removeChild(div);\n }\n return { ascent: fontAscent, height: fontHeight, descent: fontHeight - fontAscent };\n }\n}\n// Const statics\n/** Defines that alpha blending is disabled */\nEngine.ALPHA_DISABLE = 0;\n/** Defines that alpha blending to SRC ALPHA * SRC + DEST */\nEngine.ALPHA_ADD = 1;\n/** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */\nEngine.ALPHA_COMBINE = 2;\n/** Defines that alpha blending to DEST - SRC * DEST */\nEngine.ALPHA_SUBTRACT = 3;\n/** Defines that alpha blending to SRC * DEST */\nEngine.ALPHA_MULTIPLY = 4;\n/** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST */\nEngine.ALPHA_MAXIMIZED = 5;\n/** Defines that alpha blending to SRC + DEST */\nEngine.ALPHA_ONEONE = 6;\n/** Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST */\nEngine.ALPHA_PREMULTIPLIED = 7;\n/**\n * Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST\n * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA\n */\nEngine.ALPHA_PREMULTIPLIED_PORTERDUFF = 8;\n/** Defines that alpha blending to CST * SRC + (1 - CST) * DEST */\nEngine.ALPHA_INTERPOLATE = 9;\n/**\n * Defines that alpha blending to SRC + (1 - SRC) * DEST\n * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA\n */\nEngine.ALPHA_SCREENMODE = 10;\n/** Defines that the resource is not delayed*/\nEngine.DELAYLOADSTATE_NONE = 0;\n/** Defines that the resource was successfully delay loaded */\nEngine.DELAYLOADSTATE_LOADED = 1;\n/** Defines that the resource is currently delay loading */\nEngine.DELAYLOADSTATE_LOADING = 2;\n/** Defines that the resource is delayed and has not started loading */\nEngine.DELAYLOADSTATE_NOTLOADED = 4;\n// Depht or Stencil test Constants.\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */\nEngine.NEVER = 512;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */\nEngine.ALWAYS = 519;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */\nEngine.LESS = 513;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */\nEngine.EQUAL = 514;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */\nEngine.LEQUAL = 515;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */\nEngine.GREATER = 516;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */\nEngine.GEQUAL = 518;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */\nEngine.NOTEQUAL = 517;\n// Stencil Actions Constants.\n/** Passed to stencilOperation to specify that stencil value must be kept */\nEngine.KEEP = 7680;\n/** Passed to stencilOperation to specify that stencil value must be replaced */\nEngine.REPLACE = 7681;\n/** Passed to stencilOperation to specify that stencil value must be incremented */\nEngine.INCR = 7682;\n/** Passed to stencilOperation to specify that stencil value must be decremented */\nEngine.DECR = 7683;\n/** Passed to stencilOperation to specify that stencil value must be inverted */\nEngine.INVERT = 5386;\n/** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */\nEngine.INCR_WRAP = 34055;\n/** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */\nEngine.DECR_WRAP = 34056;\n/** Texture is not repeating outside of 0..1 UVs */\nEngine.TEXTURE_CLAMP_ADDRESSMODE = 0;\n/** Texture is repeating outside of 0..1 UVs */\nEngine.TEXTURE_WRAP_ADDRESSMODE = 1;\n/** Texture is repeating and mirrored */\nEngine.TEXTURE_MIRROR_ADDRESSMODE = 2;\n/** ALPHA */\nEngine.TEXTUREFORMAT_ALPHA = 0;\n/** LUMINANCE */\nEngine.TEXTUREFORMAT_LUMINANCE = 1;\n/** LUMINANCE_ALPHA */\nEngine.TEXTUREFORMAT_LUMINANCE_ALPHA = 2;\n/** RGB */\nEngine.TEXTUREFORMAT_RGB = 4;\n/** RGBA */\nEngine.TEXTUREFORMAT_RGBA = 5;\n/** RED */\nEngine.TEXTUREFORMAT_RED = 6;\n/** RED (2nd reference) */\nEngine.TEXTUREFORMAT_R = 6;\n/** RG */\nEngine.TEXTUREFORMAT_RG = 7;\n/** RED_INTEGER */\nEngine.TEXTUREFORMAT_RED_INTEGER = 8;\n/** RED_INTEGER (2nd reference) */\nEngine.TEXTUREFORMAT_R_INTEGER = 8;\n/** RG_INTEGER */\nEngine.TEXTUREFORMAT_RG_INTEGER = 9;\n/** RGB_INTEGER */\nEngine.TEXTUREFORMAT_RGB_INTEGER = 10;\n/** RGBA_INTEGER */\nEngine.TEXTUREFORMAT_RGBA_INTEGER = 11;\n/** UNSIGNED_BYTE */\nEngine.TEXTURETYPE_UNSIGNED_BYTE = 0;\n/** UNSIGNED_BYTE (2nd reference) */\nEngine.TEXTURETYPE_UNSIGNED_INT = 0;\n/** FLOAT */\nEngine.TEXTURETYPE_FLOAT = 1;\n/** HALF_FLOAT */\nEngine.TEXTURETYPE_HALF_FLOAT = 2;\n/** BYTE */\nEngine.TEXTURETYPE_BYTE = 3;\n/** SHORT */\nEngine.TEXTURETYPE_SHORT = 4;\n/** UNSIGNED_SHORT */\nEngine.TEXTURETYPE_UNSIGNED_SHORT = 5;\n/** INT */\nEngine.TEXTURETYPE_INT = 6;\n/** UNSIGNED_INT */\nEngine.TEXTURETYPE_UNSIGNED_INTEGER = 7;\n/** UNSIGNED_SHORT_4_4_4_4 */\nEngine.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 = 8;\n/** UNSIGNED_SHORT_5_5_5_1 */\nEngine.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 = 9;\n/** UNSIGNED_SHORT_5_6_5 */\nEngine.TEXTURETYPE_UNSIGNED_SHORT_5_6_5 = 10;\n/** UNSIGNED_INT_2_10_10_10_REV */\nEngine.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV = 11;\n/** UNSIGNED_INT_24_8 */\nEngine.TEXTURETYPE_UNSIGNED_INT_24_8 = 12;\n/** UNSIGNED_INT_10F_11F_11F_REV */\nEngine.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV = 13;\n/** UNSIGNED_INT_5_9_9_9_REV */\nEngine.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV = 14;\n/** FLOAT_32_UNSIGNED_INT_24_8_REV */\nEngine.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV = 15;\n/** nearest is mag = nearest and min = nearest and mip = none */\nEngine.TEXTURE_NEAREST_SAMPLINGMODE = 1;\n/** Bilinear is mag = linear and min = linear and mip = nearest */\nEngine.TEXTURE_BILINEAR_SAMPLINGMODE = 2;\n/** Trilinear is mag = linear and min = linear and mip = linear */\nEngine.TEXTURE_TRILINEAR_SAMPLINGMODE = 3;\n/** nearest is mag = nearest and min = nearest and mip = linear */\nEngine.TEXTURE_NEAREST_NEAREST_MIPLINEAR = 8;\n/** Bilinear is mag = linear and min = linear and mip = nearest */\nEngine.TEXTURE_LINEAR_LINEAR_MIPNEAREST = 11;\n/** Trilinear is mag = linear and min = linear and mip = linear */\nEngine.TEXTURE_LINEAR_LINEAR_MIPLINEAR = 3;\n/** mag = nearest and min = nearest and mip = nearest */\nEngine.TEXTURE_NEAREST_NEAREST_MIPNEAREST = 4;\n/** mag = nearest and min = linear and mip = nearest */\nEngine.TEXTURE_NEAREST_LINEAR_MIPNEAREST = 5;\n/** mag = nearest and min = linear and mip = linear */\nEngine.TEXTURE_NEAREST_LINEAR_MIPLINEAR = 6;\n/** mag = nearest and min = linear and mip = none */\nEngine.TEXTURE_NEAREST_LINEAR = 7;\n/** mag = nearest and min = nearest and mip = none */\nEngine.TEXTURE_NEAREST_NEAREST = 1;\n/** mag = linear and min = nearest and mip = nearest */\nEngine.TEXTURE_LINEAR_NEAREST_MIPNEAREST = 9;\n/** mag = linear and min = nearest and mip = linear */\nEngine.TEXTURE_LINEAR_NEAREST_MIPLINEAR = 10;\n/** mag = linear and min = linear and mip = none */\nEngine.TEXTURE_LINEAR_LINEAR = 2;\n/** mag = linear and min = nearest and mip = none */\nEngine.TEXTURE_LINEAR_NEAREST = 12;\n/** Explicit coordinates mode */\nEngine.TEXTURE_EXPLICIT_MODE = 0;\n/** Spherical coordinates mode */\nEngine.TEXTURE_SPHERICAL_MODE = 1;\n/** Planar coordinates mode */\nEngine.TEXTURE_PLANAR_MODE = 2;\n/** Cubic coordinates mode */\nEngine.TEXTURE_CUBIC_MODE = 3;\n/** Projection coordinates mode */\nEngine.TEXTURE_PROJECTION_MODE = 4;\n/** Skybox coordinates mode */\nEngine.TEXTURE_SKYBOX_MODE = 5;\n/** Inverse Cubic coordinates mode */\nEngine.TEXTURE_INVCUBIC_MODE = 6;\n/** Equirectangular coordinates mode */\nEngine.TEXTURE_EQUIRECTANGULAR_MODE = 7;\n/** Equirectangular Fixed coordinates mode */\nEngine.TEXTURE_FIXED_EQUIRECTANGULAR_MODE = 8;\n/** Equirectangular Fixed Mirrored coordinates mode */\nEngine.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;\n// Texture rescaling mode\n/** Defines that texture rescaling will use a floor to find the closer power of 2 size */\nEngine.SCALEMODE_FLOOR = 1;\n/** Defines that texture rescaling will look for the nearest power of 2 size */\nEngine.SCALEMODE_NEAREST = 2;\n/** Defines that texture rescaling will use a ceil to find the closer power of 2 size */\nEngine.SCALEMODE_CEILING = 3;\n/**\n * Method called to create the default rescale post process on each engine.\n */\nEngine._RescalePostProcessFactory = null;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nEngine._RenderPassIdCounter = 0;\n//# sourceMappingURL=engine.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nconst name = \"postprocessVertexShader\";\nconst shader = `attribute vec2 position;uniform vec2 scale;varying vec2 vUV;const vec2 madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvUV=(position*madd+madd)*scale;gl_Position=vec4(position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const postprocessVertexShader = { name, shader };\n//# sourceMappingURL=postprocess.vertex.js.map","import { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { Viewport } from \"../Maths/math.viewport.js\";\n\nimport { Observable } from \"../Misc/observable.js\";\nimport { Effect } from \"./effect.js\";\nimport { DrawWrapper } from \"./drawWrapper.js\";\n// Prevents ES6 Crash if not imported.\nimport \"../Shaders/postprocess.vertex.js\";\n// Fullscreen quad buffers by default.\nconst defaultOptions = {\n positions: [1, 1, -1, 1, -1, -1, 1, -1],\n indices: [0, 1, 2, 0, 2, 3],\n};\n/**\n * Helper class to render one or more effects.\n * You can access the previous rendering in your shader by declaring a sampler named textureSampler\n */\nexport class EffectRenderer {\n /**\n * Creates an effect renderer\n * @param engine the engine to use for rendering\n * @param options defines the options of the effect renderer\n */\n constructor(engine, options = defaultOptions) {\n var _a, _b;\n this._fullscreenViewport = new Viewport(0, 0, 1, 1);\n const positions = (_a = options.positions) !== null && _a !== void 0 ? _a : defaultOptions.positions;\n const indices = (_b = options.indices) !== null && _b !== void 0 ? _b : defaultOptions.indices;\n this.engine = engine;\n this._vertexBuffers = {\n [VertexBuffer.PositionKind]: new VertexBuffer(engine, positions, VertexBuffer.PositionKind, false, false, 2),\n };\n this._indexBuffer = engine.createIndexBuffer(indices);\n this._onContextRestoredObserver = engine.onContextRestoredObservable.add(() => {\n this._indexBuffer = engine.createIndexBuffer(indices);\n for (const key in this._vertexBuffers) {\n const vertexBuffer = this._vertexBuffers[key];\n vertexBuffer._rebuild();\n }\n });\n }\n /**\n * Sets the current viewport in normalized coordinates 0-1\n * @param viewport Defines the viewport to set (defaults to 0 0 1 1)\n */\n setViewport(viewport = this._fullscreenViewport) {\n this.engine.setViewport(viewport);\n }\n /**\n * Binds the embedded attributes buffer to the effect.\n * @param effect Defines the effect to bind the attributes for\n */\n bindBuffers(effect) {\n this.engine.bindBuffers(this._vertexBuffers, this._indexBuffer, effect);\n }\n /**\n * Sets the current effect wrapper to use during draw.\n * The effect needs to be ready before calling this api.\n * This also sets the default full screen position attribute.\n * @param effectWrapper Defines the effect to draw with\n */\n applyEffectWrapper(effectWrapper) {\n this.engine.setState(true);\n this.engine.depthCullingState.depthTest = false;\n this.engine.stencilState.stencilTest = false;\n this.engine.enableEffect(effectWrapper._drawWrapper);\n this.bindBuffers(effectWrapper.effect);\n effectWrapper.onApplyObservable.notifyObservers({});\n }\n /**\n * Saves engine states\n */\n saveStates() {\n this._savedStateDepthTest = this.engine.depthCullingState.depthTest;\n this._savedStateStencilTest = this.engine.stencilState.stencilTest;\n }\n /**\n * Restores engine states\n */\n restoreStates() {\n this.engine.depthCullingState.depthTest = this._savedStateDepthTest;\n this.engine.stencilState.stencilTest = this._savedStateStencilTest;\n }\n /**\n * Draws a full screen quad.\n */\n draw() {\n this.engine.drawElementsType(0, 0, 6);\n }\n _isRenderTargetTexture(texture) {\n return texture.renderTarget !== undefined;\n }\n /**\n * renders one or more effects to a specified texture\n * @param effectWrapper the effect to renderer\n * @param outputTexture texture to draw to, if null it will render to the screen.\n */\n render(effectWrapper, outputTexture = null) {\n // Ensure effect is ready\n if (!effectWrapper.effect.isReady()) {\n return;\n }\n this.saveStates();\n // Reset state\n this.setViewport();\n const out = outputTexture === null ? null : this._isRenderTargetTexture(outputTexture) ? outputTexture.renderTarget : outputTexture;\n if (out) {\n this.engine.bindFramebuffer(out);\n }\n this.applyEffectWrapper(effectWrapper);\n this.draw();\n if (out) {\n this.engine.unBindFramebuffer(out);\n }\n this.restoreStates();\n }\n /**\n * Disposes of the effect renderer\n */\n dispose() {\n const vertexBuffer = this._vertexBuffers[VertexBuffer.PositionKind];\n if (vertexBuffer) {\n vertexBuffer.dispose();\n delete this._vertexBuffers[VertexBuffer.PositionKind];\n }\n if (this._indexBuffer) {\n this.engine._releaseBuffer(this._indexBuffer);\n }\n if (this._onContextRestoredObserver) {\n this.engine.onContextRestoredObservable.remove(this._onContextRestoredObserver);\n this._onContextRestoredObserver = null;\n }\n }\n}\n/**\n * Wraps an effect to be used for rendering\n */\nexport class EffectWrapper {\n /**\n * The underlying effect\n */\n get effect() {\n return this._drawWrapper.effect;\n }\n set effect(effect) {\n this._drawWrapper.effect = effect;\n }\n /**\n * Creates an effect to be renderer\n * @param creationOptions options to create the effect\n */\n constructor(creationOptions) {\n /**\n * Event that is fired right before the effect is drawn (should be used to update uniforms)\n */\n this.onApplyObservable = new Observable();\n let effectCreationOptions;\n const uniformNames = creationOptions.uniformNames || [];\n if (creationOptions.vertexShader) {\n effectCreationOptions = {\n fragmentSource: creationOptions.fragmentShader,\n vertexSource: creationOptions.vertexShader,\n spectorName: creationOptions.name || \"effectWrapper\",\n };\n }\n else {\n // Default scale to use in post process vertex shader.\n uniformNames.push(\"scale\");\n effectCreationOptions = {\n fragmentSource: creationOptions.fragmentShader,\n vertex: \"postprocess\",\n spectorName: creationOptions.name || \"effectWrapper\",\n };\n // Sets the default scale to identity for the post process vertex shader.\n this.onApplyObservable.add(() => {\n this.effect.setFloat2(\"scale\", 1, 1);\n });\n }\n const defines = creationOptions.defines ? creationOptions.defines.join(\"\\n\") : \"\";\n this._drawWrapper = new DrawWrapper(creationOptions.engine);\n if (creationOptions.useShaderStore) {\n effectCreationOptions.fragment = effectCreationOptions.fragmentSource;\n if (!effectCreationOptions.vertex) {\n effectCreationOptions.vertex = effectCreationOptions.vertexSource;\n }\n delete effectCreationOptions.fragmentSource;\n delete effectCreationOptions.vertexSource;\n this.effect = creationOptions.engine.createEffect(effectCreationOptions, creationOptions.attributeNames || [\"position\"], uniformNames, creationOptions.samplerNames, defines, undefined, creationOptions.onCompiled, undefined, undefined, creationOptions.shaderLanguage);\n }\n else {\n this.effect = new Effect(effectCreationOptions, creationOptions.attributeNames || [\"position\"], uniformNames, creationOptions.samplerNames, creationOptions.engine, defines, undefined, creationOptions.onCompiled, undefined, undefined, undefined, creationOptions.shaderLanguage);\n this._onContextRestoredObserver = creationOptions.engine.onContextRestoredObservable.add(() => {\n this.effect._pipelineContext = null; // because _prepareEffect will try to dispose this pipeline before recreating it and that would lead to webgl errors\n this.effect._wasPreviouslyReady = false;\n this.effect._prepareEffect();\n });\n }\n }\n /**\n * Disposes of the effect wrapper\n */\n dispose() {\n if (this._onContextRestoredObserver) {\n this.effect.getEngine().onContextRestoredObservable.remove(this._onContextRestoredObserver);\n this._onContextRestoredObserver = null;\n }\n this.effect.dispose();\n }\n}\n//# sourceMappingURL=effectRenderer.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nconst name = \"passPixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=texture2D(textureSampler,vUV);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const passPixelShader = { name, shader };\n//# sourceMappingURL=pass.fragment.js.map","import { ThinEngine } from \"../Engines/thinEngine.js\";\n\nimport { EffectRenderer, EffectWrapper } from \"../Materials/effectRenderer.js\";\nimport { Tools } from \"./tools.js\";\nimport { passPixelShader } from \"../Shaders/pass.fragment.js\";\nimport { Scalar } from \"../Maths/math.scalar.js\";\n/**\n * Class containing a set of static utilities functions to dump data from a canvas\n */\nexport class DumpTools {\n static _CreateDumpRenderer() {\n if (!DumpTools._DumpToolsEngine) {\n let canvas;\n let engine = null;\n const options = {\n preserveDrawingBuffer: true,\n depth: false,\n stencil: false,\n alpha: true,\n premultipliedAlpha: false,\n antialias: false,\n failIfMajorPerformanceCaveat: false,\n };\n try {\n canvas = new OffscreenCanvas(100, 100); // will be resized later\n engine = new ThinEngine(canvas, false, options);\n }\n catch (e) {\n // The browser either does not support OffscreenCanvas or WebGL context in OffscreenCanvas, fallback on a regular canvas\n canvas = document.createElement(\"canvas\");\n engine = new ThinEngine(canvas, false, options);\n }\n engine.getCaps().parallelShaderCompile = undefined;\n const renderer = new EffectRenderer(engine);\n const wrapper = new EffectWrapper({\n engine,\n name: passPixelShader.name,\n fragmentShader: passPixelShader.shader,\n samplerNames: [\"textureSampler\"],\n });\n DumpTools._DumpToolsEngine = {\n canvas,\n engine,\n renderer,\n wrapper,\n };\n }\n return DumpTools._DumpToolsEngine;\n }\n /**\n * Dumps the current bound framebuffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param engine defines the hosting engine\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a void promise\n */\n static async DumpFramebuffer(width, height, engine, successCallback, mimeType = \"image/png\", fileName, quality) {\n // Read the contents of the framebuffer\n const bufferView = await engine.readPixels(0, 0, width, height);\n const data = new Uint8Array(bufferView.buffer);\n DumpTools.DumpData(width, height, data, successCallback, mimeType, fileName, true, undefined, quality);\n }\n /**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a promise that resolve to the final data\n */\n static DumpDataAsync(width, height, data, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n return new Promise((resolve) => {\n DumpTools.DumpData(width, height, data, (result) => resolve(result), mimeType, fileName, invertY, toArrayBuffer, quality);\n });\n }\n /**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\n static DumpData(width, height, data, successCallback, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n const renderer = DumpTools._CreateDumpRenderer();\n renderer.engine.setSize(width, height, true);\n // Convert if data are float32\n if (data instanceof Float32Array) {\n const data2 = new Uint8Array(data.length);\n let n = data.length;\n while (n--) {\n const v = data[n];\n data2[n] = Math.round(Scalar.Clamp(v) * 255);\n }\n data = data2;\n }\n // Create the image\n const texture = renderer.engine.createRawTexture(data, width, height, 5, false, !invertY, 1);\n renderer.renderer.setViewport();\n renderer.renderer.applyEffectWrapper(renderer.wrapper);\n renderer.wrapper.effect._bindTexture(\"textureSampler\", texture);\n renderer.renderer.draw();\n if (toArrayBuffer) {\n Tools.ToBlob(renderer.canvas, (blob) => {\n const fileReader = new FileReader();\n fileReader.onload = (event) => {\n const arrayBuffer = event.target.result;\n if (successCallback) {\n successCallback(arrayBuffer);\n }\n };\n fileReader.readAsArrayBuffer(blob);\n }, mimeType, quality);\n }\n else {\n Tools.EncodeScreenshotCanvasData(renderer.canvas, successCallback, mimeType, fileName, quality);\n }\n texture.dispose();\n }\n /**\n * Dispose the dump tools associated resources\n */\n static Dispose() {\n if (DumpTools._DumpToolsEngine) {\n DumpTools._DumpToolsEngine.wrapper.dispose();\n DumpTools._DumpToolsEngine.renderer.dispose();\n DumpTools._DumpToolsEngine.engine.dispose();\n }\n DumpTools._DumpToolsEngine = null;\n }\n}\n/**\n * This will be executed automatically for UMD and es5.\n * If esm dev wants the side effects to execute they will have to run it manually\n * Once we build native modules those need to be exported.\n * @internal\n */\nconst initSideEffects = () => {\n // References the dependencies.\n Tools.DumpData = DumpTools.DumpData;\n Tools.DumpDataAsync = DumpTools.DumpDataAsync;\n Tools.DumpFramebuffer = DumpTools.DumpFramebuffer;\n};\ninitSideEffects();\n//# sourceMappingURL=dumpTools.js.map","import { Observable } from \"../../Misc/observable.js\";\nimport { Matrix, Vector3 } from \"../../Maths/math.vector.js\";\nimport { Texture } from \"../../Materials/Textures/texture.js\";\nimport { PostProcessManager } from \"../../PostProcesses/postProcessManager.js\";\nimport { RenderingManager } from \"../../Rendering/renderingManager.js\";\n\nimport \"../../Engines/Extensions/engine.renderTarget.js\";\nimport \"../../Engines/Extensions/engine.renderTargetCube.js\";\nimport { Engine } from \"../../Engines/engine.js\";\nimport { _ObserveArray } from \"../../Misc/arrayTools.js\";\nimport { DumpTools } from \"../../Misc/dumpTools.js\";\n/**\n * This Helps creating a texture that will be created from a camera in your scene.\n * It is basically a dynamic texture that could be used to create special effects for instance.\n * Actually, It is the base of lot of effects in the framework like post process, shadows, effect layers and rendering pipelines...\n */\nexport class RenderTargetTexture extends Texture {\n /**\n * Use this list to define the list of mesh you want to render.\n */\n get renderList() {\n return this._renderList;\n }\n set renderList(value) {\n if (this._unObserveRenderList) {\n this._unObserveRenderList();\n this._unObserveRenderList = null;\n }\n if (value) {\n this._unObserveRenderList = _ObserveArray(value, this._renderListHasChanged);\n }\n this._renderList = value;\n }\n /**\n * Post-processes for this render target\n */\n get postProcesses() {\n return this._postProcesses;\n }\n get _prePassEnabled() {\n return !!this._prePassRenderTarget && this._prePassRenderTarget.enabled;\n }\n /**\n * Set a after unbind callback in the texture.\n * This has been kept for backward compatibility and use of onAfterUnbindObservable is recommended.\n */\n set onAfterUnbind(callback) {\n if (this._onAfterUnbindObserver) {\n this.onAfterUnbindObservable.remove(this._onAfterUnbindObserver);\n }\n this._onAfterUnbindObserver = this.onAfterUnbindObservable.add(callback);\n }\n /**\n * Set a before render callback in the texture.\n * This has been kept for backward compatibility and use of onBeforeRenderObservable is recommended.\n */\n set onBeforeRender(callback) {\n if (this._onBeforeRenderObserver) {\n this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver);\n }\n this._onBeforeRenderObserver = this.onBeforeRenderObservable.add(callback);\n }\n /**\n * Set a after render callback in the texture.\n * This has been kept for backward compatibility and use of onAfterRenderObservable is recommended.\n */\n set onAfterRender(callback) {\n if (this._onAfterRenderObserver) {\n this.onAfterRenderObservable.remove(this._onAfterRenderObserver);\n }\n this._onAfterRenderObserver = this.onAfterRenderObservable.add(callback);\n }\n /**\n * Set a clear callback in the texture.\n * This has been kept for backward compatibility and use of onClearObservable is recommended.\n */\n set onClear(callback) {\n if (this._onClearObserver) {\n this.onClearObservable.remove(this._onClearObserver);\n }\n this._onClearObserver = this.onClearObservable.add(callback);\n }\n /**\n * Gets the render pass ids used by the render target texture. For a single render target the array length will be 1, for a cube texture it will be 6 and for\n * a 2D texture array it will return an array of ids the size of the 2D texture array\n */\n get renderPassIds() {\n return this._renderPassIds;\n }\n /**\n * Gets the current value of the refreshId counter\n */\n get currentRefreshId() {\n return this._currentRefreshId;\n }\n /**\n * Sets a specific material to be used to render a mesh/a list of meshes in this render target texture\n * @param mesh mesh or array of meshes\n * @param material material or array of materials to use for this render pass. If undefined is passed, no specific material will be used but the regular material instead (mesh.material). It's possible to provide an array of materials to use a different material for each rendering in the case of a cube texture (6 rendering) and a 2D texture array (as many rendering as the length of the array)\n */\n setMaterialForRendering(mesh, material) {\n let meshes;\n if (!Array.isArray(mesh)) {\n meshes = [mesh];\n }\n else {\n meshes = mesh;\n }\n for (let j = 0; j < meshes.length; ++j) {\n for (let i = 0; i < this._renderPassIds.length; ++i) {\n meshes[j].setMaterialForRenderPass(this._renderPassIds[i], material !== undefined ? (Array.isArray(material) ? material[i] : material) : undefined);\n }\n }\n }\n /**\n * Define if the texture has multiple draw buffers or if false a single draw buffer.\n */\n get isMulti() {\n var _a, _b;\n return (_b = (_a = this._renderTarget) === null || _a === void 0 ? void 0 : _a.isMulti) !== null && _b !== void 0 ? _b : false;\n }\n /**\n * Gets render target creation options that were used.\n */\n get renderTargetOptions() {\n return this._renderTargetOptions;\n }\n /**\n * Gets the render target wrapper associated with this render target\n */\n get renderTarget() {\n return this._renderTarget;\n }\n _onRatioRescale() {\n if (this._sizeRatio) {\n this.resize(this._initialSizeParameter);\n }\n }\n /**\n * Gets or sets the size of the bounding box associated with the texture (when in cube mode)\n * When defined, the cubemap will switch to local mode\n * @see https://community.arm.com/graphics/b/blog/posts/reflections-based-on-local-cubemaps-in-unity\n * @example https://www.babylonjs-playground.com/#RNASML\n */\n set boundingBoxSize(value) {\n if (this._boundingBoxSize && this._boundingBoxSize.equals(value)) {\n return;\n }\n this._boundingBoxSize = value;\n const scene = this.getScene();\n if (scene) {\n scene.markAllMaterialsAsDirty(1);\n }\n }\n get boundingBoxSize() {\n return this._boundingBoxSize;\n }\n /**\n * In case the RTT has been created with a depth texture, get the associated\n * depth texture.\n * Otherwise, return null.\n */\n get depthStencilTexture() {\n var _a, _b;\n return (_b = (_a = this._renderTarget) === null || _a === void 0 ? void 0 : _a._depthStencilTexture) !== null && _b !== void 0 ? _b : null;\n }\n /** @internal */\n constructor(name, size, scene, generateMipMaps = false, doNotChangeAspectRatio = true, type = 0, isCube = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, generateDepthBuffer = true, generateStencilBuffer = false, isMulti = false, format = 5, delayAllocation = false, samples, creationFlags, noColorAttachment = false, useSRGBBuffer = false) {\n var _a, _b, _c, _d, _e, _f, _g;\n let colorAttachment = undefined;\n let gammaSpace = true;\n if (typeof generateMipMaps === \"object\") {\n const options = generateMipMaps;\n generateMipMaps = !!options.generateMipMaps;\n doNotChangeAspectRatio = (_a = options.doNotChangeAspectRatio) !== null && _a !== void 0 ? _a : true;\n type = (_b = options.type) !== null && _b !== void 0 ? _b : 0;\n isCube = !!options.isCube;\n samplingMode = (_c = options.samplingMode) !== null && _c !== void 0 ? _c : Texture.TRILINEAR_SAMPLINGMODE;\n generateDepthBuffer = (_d = options.generateDepthBuffer) !== null && _d !== void 0 ? _d : true;\n generateStencilBuffer = !!options.generateStencilBuffer;\n isMulti = !!options.isMulti;\n format = (_e = options.format) !== null && _e !== void 0 ? _e : 5;\n delayAllocation = !!options.delayAllocation;\n samples = options.samples;\n creationFlags = options.creationFlags;\n noColorAttachment = !!options.noColorAttachment;\n useSRGBBuffer = !!options.useSRGBBuffer;\n colorAttachment = options.colorAttachment;\n gammaSpace = (_f = options.gammaSpace) !== null && _f !== void 0 ? _f : gammaSpace;\n }\n super(null, scene, !generateMipMaps, undefined, samplingMode, undefined, undefined, undefined, undefined, format);\n this._unObserveRenderList = null;\n this._renderListHasChanged = (_functionName, previousLength) => {\n var _a;\n const newLength = this._renderList ? this._renderList.length : 0;\n if ((previousLength === 0 && newLength > 0) || newLength === 0) {\n (_a = this.getScene()) === null || _a === void 0 ? void 0 : _a.meshes.forEach((mesh) => {\n mesh._markSubMeshesAsLightDirty();\n });\n }\n };\n /**\n * Define if particles should be rendered in your texture.\n */\n this.renderParticles = true;\n /**\n * Define if sprites should be rendered in your texture.\n */\n this.renderSprites = false;\n /**\n * Force checking the layerMask property even if a custom list of meshes is provided (ie. if renderList is not undefined)\n */\n this.forceLayerMaskCheck = false;\n /**\n * Define if the camera viewport should be respected while rendering the texture or if the render should be done to the entire texture.\n */\n this.ignoreCameraViewport = false;\n /**\n * An event triggered when the texture is unbind.\n */\n this.onBeforeBindObservable = new Observable();\n /**\n * An event triggered when the texture is unbind.\n */\n this.onAfterUnbindObservable = new Observable();\n /**\n * An event triggered before rendering the texture\n */\n this.onBeforeRenderObservable = new Observable();\n /**\n * An event triggered after rendering the texture\n */\n this.onAfterRenderObservable = new Observable();\n /**\n * An event triggered after the texture clear\n */\n this.onClearObservable = new Observable();\n /**\n * An event triggered when the texture is resized.\n */\n this.onResizeObservable = new Observable();\n /** @internal */\n this._cleared = false;\n /**\n * Skip the initial clear of the rtt at the beginning of the frame render loop\n */\n this.skipInitialClear = false;\n this._currentRefreshId = -1;\n this._refreshRate = 1;\n this._samples = 1;\n this._canRescale = true;\n this._renderTarget = null;\n /**\n * Gets or sets the center of the bounding box associated with the texture (when in cube mode)\n * It must define where the camera used to render the texture is set\n */\n this.boundingBoxPosition = Vector3.Zero();\n scene = this.getScene();\n if (!scene) {\n return;\n }\n const engine = this.getScene().getEngine();\n this._gammaSpace = gammaSpace;\n this._coordinatesMode = Texture.PROJECTION_MODE;\n this.renderList = [];\n this.name = name;\n this.isRenderTarget = true;\n this._initialSizeParameter = size;\n this._renderPassIds = [];\n this._isCubeData = isCube;\n this._processSizeParameter(size);\n this.renderPassId = this._renderPassIds[0];\n this._resizeObserver = engine.onResizeObservable.add(() => { });\n this._generateMipMaps = generateMipMaps ? true : false;\n this._doNotChangeAspectRatio = doNotChangeAspectRatio;\n // Rendering groups\n this._renderingManager = new RenderingManager(scene);\n this._renderingManager._useSceneAutoClearSetup = true;\n if (isMulti) {\n return;\n }\n this._renderTargetOptions = {\n generateMipMaps: generateMipMaps,\n type: type,\n format: (_g = this._format) !== null && _g !== void 0 ? _g : undefined,\n samplingMode: this.samplingMode,\n generateDepthBuffer: generateDepthBuffer,\n generateStencilBuffer: generateStencilBuffer,\n samples,\n creationFlags,\n noColorAttachment: noColorAttachment,\n useSRGBBuffer,\n colorAttachment: colorAttachment,\n label: this.name,\n };\n if (this.samplingMode === Texture.NEAREST_SAMPLINGMODE) {\n this.wrapU = Texture.CLAMP_ADDRESSMODE;\n this.wrapV = Texture.CLAMP_ADDRESSMODE;\n }\n if (!delayAllocation) {\n if (isCube) {\n this._renderTarget = scene.getEngine().createRenderTargetCubeTexture(this.getRenderSize(), this._renderTargetOptions);\n this.coordinatesMode = Texture.INVCUBIC_MODE;\n this._textureMatrix = Matrix.Identity();\n }\n else {\n this._renderTarget = scene.getEngine().createRenderTargetTexture(this._size, this._renderTargetOptions);\n }\n this._texture = this._renderTarget.texture;\n if (samples !== undefined) {\n this.samples = samples;\n }\n }\n }\n /**\n * Creates a depth stencil texture.\n * This is only available in WebGL 2 or with the depth texture extension available.\n * @param comparisonFunction Specifies the comparison function to set on the texture. If 0 or undefined, the texture is not in comparison mode (default: 0)\n * @param bilinearFiltering Specifies whether or not bilinear filtering is enable on the texture (default: true)\n * @param generateStencil Specifies whether or not a stencil should be allocated in the texture (default: false)\n * @param samples sample count of the depth/stencil texture (default: 1)\n * @param format format of the depth texture (default: 14)\n */\n createDepthStencilTexture(comparisonFunction = 0, bilinearFiltering = true, generateStencil = false, samples = 1, format = 14) {\n var _a;\n (_a = this._renderTarget) === null || _a === void 0 ? void 0 : _a.createDepthStencilTexture(comparisonFunction, bilinearFiltering, generateStencil, samples, format);\n }\n _releaseRenderPassId() {\n if (this._scene) {\n const engine = this._scene.getEngine();\n for (let i = 0; i < this._renderPassIds.length; ++i) {\n engine.releaseRenderPassId(this._renderPassIds[i]);\n }\n }\n this._renderPassIds = [];\n }\n _createRenderPassId() {\n this._releaseRenderPassId();\n const engine = this._scene.getEngine(); // scene can't be null in a RenderTargetTexture, see constructor\n const numPasses = this._isCubeData ? 6 : this.getRenderLayers() || 1;\n for (let i = 0; i < numPasses; ++i) {\n this._renderPassIds[i] = engine.createRenderPassId(`RenderTargetTexture - ${this.name}#${i}`);\n }\n }\n _processSizeParameter(size, createRenderPassIds = true) {\n if (size.ratio) {\n this._sizeRatio = size.ratio;\n const engine = this._getEngine();\n this._size = {\n width: this._bestReflectionRenderTargetDimension(engine.getRenderWidth(), this._sizeRatio),\n height: this._bestReflectionRenderTargetDimension(engine.getRenderHeight(), this._sizeRatio),\n };\n }\n else {\n this._size = size;\n }\n if (createRenderPassIds) {\n this._createRenderPassId();\n }\n }\n /**\n * Define the number of samples to use in case of MSAA.\n * It defaults to one meaning no MSAA has been enabled.\n */\n get samples() {\n var _a, _b;\n return (_b = (_a = this._renderTarget) === null || _a === void 0 ? void 0 : _a.samples) !== null && _b !== void 0 ? _b : this._samples;\n }\n set samples(value) {\n if (this._renderTarget) {\n this._samples = this._renderTarget.setSamples(value);\n }\n }\n /**\n * Resets the refresh counter of the texture and start bak from scratch.\n * Could be useful to regenerate the texture if it is setup to render only once.\n */\n resetRefreshCounter() {\n this._currentRefreshId = -1;\n }\n /**\n * Define the refresh rate of the texture or the rendering frequency.\n * Use 0 to render just once, 1 to render on every frame, 2 to render every two frames and so on...\n */\n get refreshRate() {\n return this._refreshRate;\n }\n set refreshRate(value) {\n this._refreshRate = value;\n this.resetRefreshCounter();\n }\n /**\n * Adds a post process to the render target rendering passes.\n * @param postProcess define the post process to add\n */\n addPostProcess(postProcess) {\n if (!this._postProcessManager) {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n this._postProcessManager = new PostProcessManager(scene);\n this._postProcesses = new Array();\n }\n this._postProcesses.push(postProcess);\n this._postProcesses[0].autoClear = false;\n }\n /**\n * Clear all the post processes attached to the render target\n * @param dispose define if the cleared post processes should also be disposed (false by default)\n */\n clearPostProcesses(dispose = false) {\n if (!this._postProcesses) {\n return;\n }\n if (dispose) {\n for (const postProcess of this._postProcesses) {\n postProcess.dispose();\n }\n }\n this._postProcesses = [];\n }\n /**\n * Remove one of the post process from the list of attached post processes to the texture\n * @param postProcess define the post process to remove from the list\n */\n removePostProcess(postProcess) {\n if (!this._postProcesses) {\n return;\n }\n const index = this._postProcesses.indexOf(postProcess);\n if (index === -1) {\n return;\n }\n this._postProcesses.splice(index, 1);\n if (this._postProcesses.length > 0) {\n this._postProcesses[0].autoClear = false;\n }\n }\n /** @internal */\n _shouldRender() {\n if (this._currentRefreshId === -1) {\n // At least render once\n this._currentRefreshId = 1;\n return true;\n }\n if (this.refreshRate === this._currentRefreshId) {\n this._currentRefreshId = 1;\n return true;\n }\n this._currentRefreshId++;\n return false;\n }\n /**\n * Gets the actual render size of the texture.\n * @returns the width of the render size\n */\n getRenderSize() {\n return this.getRenderWidth();\n }\n /**\n * Gets the actual render width of the texture.\n * @returns the width of the render size\n */\n getRenderWidth() {\n if (this._size.width) {\n return this._size.width;\n }\n return this._size;\n }\n /**\n * Gets the actual render height of the texture.\n * @returns the height of the render size\n */\n getRenderHeight() {\n if (this._size.width) {\n return this._size.height;\n }\n return this._size;\n }\n /**\n * Gets the actual number of layers of the texture.\n * @returns the number of layers\n */\n getRenderLayers() {\n const layers = this._size.layers;\n if (layers) {\n return layers;\n }\n return 0;\n }\n /**\n * Don't allow this render target texture to rescale. Mainly used to prevent rescaling by the scene optimizer.\n */\n disableRescaling() {\n this._canRescale = false;\n }\n /**\n * Get if the texture can be rescaled or not.\n */\n get canRescale() {\n return this._canRescale;\n }\n /**\n * Resize the texture using a ratio.\n * @param ratio the ratio to apply to the texture size in order to compute the new target size\n */\n scale(ratio) {\n const newSize = Math.max(1, this.getRenderSize() * ratio);\n this.resize(newSize);\n }\n /**\n * Get the texture reflection matrix used to rotate/transform the reflection.\n * @returns the reflection matrix\n */\n getReflectionTextureMatrix() {\n if (this.isCube) {\n return this._textureMatrix;\n }\n return super.getReflectionTextureMatrix();\n }\n /**\n * Resize the texture to a new desired size.\n * Be careful as it will recreate all the data in the new texture.\n * @param size Define the new size. It can be:\n * - a number for squared texture,\n * - an object containing { width: number, height: number }\n * - or an object containing a ratio { ratio: number }\n */\n resize(size) {\n var _a;\n const wasCube = this.isCube;\n (_a = this._renderTarget) === null || _a === void 0 ? void 0 : _a.dispose();\n this._renderTarget = null;\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n this._processSizeParameter(size, false);\n if (wasCube) {\n this._renderTarget = scene.getEngine().createRenderTargetCubeTexture(this.getRenderSize(), this._renderTargetOptions);\n }\n else {\n this._renderTarget = scene.getEngine().createRenderTargetTexture(this._size, this._renderTargetOptions);\n }\n this._texture = this._renderTarget.texture;\n if (this._renderTargetOptions.samples !== undefined) {\n this.samples = this._renderTargetOptions.samples;\n }\n if (this.onResizeObservable.hasObservers()) {\n this.onResizeObservable.notifyObservers(this);\n }\n }\n /**\n * Renders all the objects from the render list into the texture.\n * @param useCameraPostProcess Define if camera post processes should be used during the rendering\n * @param dumpForDebug Define if the rendering result should be dumped (copied) for debugging purpose\n */\n render(useCameraPostProcess = false, dumpForDebug = false) {\n this._render(useCameraPostProcess, dumpForDebug);\n }\n /**\n * This function will check if the render target texture can be rendered (textures are loaded, shaders are compiled)\n * @returns true if all required resources are ready\n */\n isReadyForRendering() {\n return this._render(false, false, true);\n }\n _render(useCameraPostProcess = false, dumpForDebug = false, checkReadiness = false) {\n var _a;\n const scene = this.getScene();\n if (!scene) {\n return checkReadiness;\n }\n const engine = scene.getEngine();\n if (this.useCameraPostProcesses !== undefined) {\n useCameraPostProcess = this.useCameraPostProcesses;\n }\n if (this._waitingRenderList) {\n this.renderList = [];\n for (let index = 0; index < this._waitingRenderList.length; index++) {\n const id = this._waitingRenderList[index];\n const mesh = scene.getMeshById(id);\n if (mesh) {\n this.renderList.push(mesh);\n }\n }\n this._waitingRenderList = undefined;\n }\n // Is predicate defined?\n if (this.renderListPredicate) {\n if (this.renderList) {\n this.renderList.length = 0; // Clear previous renderList\n }\n else {\n this.renderList = [];\n }\n const scene = this.getScene();\n if (!scene) {\n return checkReadiness;\n }\n const sceneMeshes = scene.meshes;\n for (let index = 0; index < sceneMeshes.length; index++) {\n const mesh = sceneMeshes[index];\n if (this.renderListPredicate(mesh)) {\n this.renderList.push(mesh);\n }\n }\n }\n const currentRenderPassId = engine.currentRenderPassId;\n this.onBeforeBindObservable.notifyObservers(this);\n // Set custom projection.\n // Needs to be before binding to prevent changing the aspect ratio.\n const camera = (_a = this.activeCamera) !== null && _a !== void 0 ? _a : scene.activeCamera;\n const sceneCamera = scene.activeCamera;\n if (camera) {\n if (camera !== scene.activeCamera) {\n scene.setTransformMatrix(camera.getViewMatrix(), camera.getProjectionMatrix(true));\n scene.activeCamera = camera;\n }\n engine.setViewport(camera.rigParent ? camera.rigParent.viewport : camera.viewport, this.getRenderWidth(), this.getRenderHeight());\n }\n this._defaultRenderListPrepared = false;\n let returnValue = checkReadiness;\n if (!checkReadiness) {\n if (this.is2DArray && !this.isMulti) {\n for (let layer = 0; layer < this.getRenderLayers(); layer++) {\n this._renderToTarget(0, useCameraPostProcess, dumpForDebug, layer, camera);\n scene.incrementRenderId();\n scene.resetCachedMaterial();\n }\n }\n else if (this.isCube && !this.isMulti) {\n for (let face = 0; face < 6; face++) {\n this._renderToTarget(face, useCameraPostProcess, dumpForDebug, undefined, camera);\n scene.incrementRenderId();\n scene.resetCachedMaterial();\n }\n }\n else {\n this._renderToTarget(0, useCameraPostProcess, dumpForDebug, undefined, camera);\n }\n }\n else {\n if (!scene.getViewMatrix()) {\n // We probably didn't execute scene.render() yet, so make sure we have a view/projection matrix setup for the scene\n scene.updateTransformMatrix();\n }\n const numLayers = this.is2DArray ? this.getRenderLayers() : this.isCube ? 6 : 1;\n for (let layer = 0; layer < numLayers && returnValue; layer++) {\n let currentRenderList = null;\n const defaultRenderList = this.renderList ? this.renderList : scene.getActiveMeshes().data;\n const defaultRenderListLength = this.renderList ? this.renderList.length : scene.getActiveMeshes().length;\n engine.currentRenderPassId = this._renderPassIds[layer];\n this.onBeforeRenderObservable.notifyObservers(layer);\n if (this.getCustomRenderList) {\n currentRenderList = this.getCustomRenderList(layer, defaultRenderList, defaultRenderListLength);\n }\n if (!currentRenderList) {\n currentRenderList = defaultRenderList;\n }\n if (!this._doNotChangeAspectRatio) {\n scene.updateTransformMatrix(true);\n }\n for (let i = 0; i < currentRenderList.length && returnValue; ++i) {\n const mesh = currentRenderList[i];\n if (!mesh.isEnabled() || mesh.isBlocked || !mesh.isVisible || !mesh.subMeshes) {\n continue;\n }\n if (this.customIsReadyFunction) {\n if (!this.customIsReadyFunction(mesh, this.refreshRate, checkReadiness)) {\n returnValue = false;\n continue;\n }\n }\n else if (!mesh.isReady(true)) {\n returnValue = false;\n continue;\n }\n }\n this.onAfterRenderObservable.notifyObservers(layer);\n if (this.is2DArray || this.isCube) {\n scene.incrementRenderId();\n scene.resetCachedMaterial();\n }\n }\n }\n this.onAfterUnbindObservable.notifyObservers(this);\n engine.currentRenderPassId = currentRenderPassId;\n if (sceneCamera) {\n scene.activeCamera = sceneCamera;\n // Do not avoid setting uniforms when multiple scenes are active as another camera may have overwrite these\n if (scene.getEngine().scenes.length > 1 || (this.activeCamera && this.activeCamera !== scene.activeCamera)) {\n scene.setTransformMatrix(scene.activeCamera.getViewMatrix(), scene.activeCamera.getProjectionMatrix(true));\n }\n engine.setViewport(scene.activeCamera.viewport);\n }\n scene.resetCachedMaterial();\n return returnValue;\n }\n _bestReflectionRenderTargetDimension(renderDimension, scale) {\n const minimum = 128;\n const x = renderDimension * scale;\n const curved = Engine.NearestPOT(x + (minimum * minimum) / (minimum + x));\n // Ensure we don't exceed the render dimension (while staying POT)\n return Math.min(Engine.FloorPOT(renderDimension), curved);\n }\n _prepareRenderingManager(currentRenderList, currentRenderListLength, camera, checkLayerMask) {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n this._renderingManager.reset();\n const sceneRenderId = scene.getRenderId();\n for (let meshIndex = 0; meshIndex < currentRenderListLength; meshIndex++) {\n const mesh = currentRenderList[meshIndex];\n if (mesh && !mesh.isBlocked) {\n if (this.customIsReadyFunction) {\n if (!this.customIsReadyFunction(mesh, this.refreshRate, false)) {\n this.resetRefreshCounter();\n continue;\n }\n }\n else if (!mesh.isReady(this.refreshRate === 0)) {\n this.resetRefreshCounter();\n continue;\n }\n if (!mesh._internalAbstractMeshDataInfo._currentLODIsUpToDate && scene.activeCamera) {\n mesh._internalAbstractMeshDataInfo._currentLOD = scene.customLODSelector\n ? scene.customLODSelector(mesh, this.activeCamera || scene.activeCamera)\n : mesh.getLOD(this.activeCamera || scene.activeCamera);\n mesh._internalAbstractMeshDataInfo._currentLODIsUpToDate = true;\n }\n if (!mesh._internalAbstractMeshDataInfo._currentLOD) {\n continue;\n }\n let meshToRender = mesh._internalAbstractMeshDataInfo._currentLOD;\n meshToRender._preActivateForIntermediateRendering(sceneRenderId);\n let isMasked;\n if (checkLayerMask && camera) {\n isMasked = (mesh.layerMask & camera.layerMask) === 0;\n }\n else {\n isMasked = false;\n }\n if (mesh.isEnabled() && mesh.isVisible && mesh.subMeshes && !isMasked) {\n if (meshToRender !== mesh) {\n meshToRender._activate(sceneRenderId, true);\n }\n if (mesh._activate(sceneRenderId, true) && mesh.subMeshes.length) {\n if (!mesh.isAnInstance) {\n meshToRender._internalAbstractMeshDataInfo._onlyForInstancesIntermediate = false;\n }\n else {\n if (mesh._internalAbstractMeshDataInfo._actAsRegularMesh) {\n meshToRender = mesh;\n }\n }\n meshToRender._internalAbstractMeshDataInfo._isActiveIntermediate = true;\n for (let subIndex = 0; subIndex < meshToRender.subMeshes.length; subIndex++) {\n const subMesh = meshToRender.subMeshes[subIndex];\n this._renderingManager.dispatch(subMesh, meshToRender);\n }\n }\n }\n }\n }\n for (let particleIndex = 0; particleIndex < scene.particleSystems.length; particleIndex++) {\n const particleSystem = scene.particleSystems[particleIndex];\n const emitter = particleSystem.emitter;\n if (!particleSystem.isStarted() || !emitter || (emitter.position && !emitter.isEnabled())) {\n continue;\n }\n this._renderingManager.dispatchParticles(particleSystem);\n }\n }\n /**\n * @internal\n * @param faceIndex face index to bind to if this is a cubetexture\n * @param layer defines the index of the texture to bind in the array\n */\n _bindFrameBuffer(faceIndex = 0, layer = 0) {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n const engine = scene.getEngine();\n if (this._renderTarget) {\n engine.bindFramebuffer(this._renderTarget, this.isCube ? faceIndex : undefined, undefined, undefined, this.ignoreCameraViewport, 0, layer);\n }\n }\n _unbindFrameBuffer(engine, faceIndex) {\n if (!this._renderTarget) {\n return;\n }\n engine.unBindFramebuffer(this._renderTarget, this.isCube, () => {\n this.onAfterRenderObservable.notifyObservers(faceIndex);\n });\n }\n /**\n * @internal\n */\n _prepareFrame(scene, faceIndex, layer, useCameraPostProcess) {\n if (this._postProcessManager) {\n if (!this._prePassEnabled) {\n this._postProcessManager._prepareFrame(this._texture, this._postProcesses);\n }\n }\n else if (!useCameraPostProcess || !scene.postProcessManager._prepareFrame(this._texture)) {\n this._bindFrameBuffer(faceIndex, layer);\n }\n }\n _renderToTarget(faceIndex, useCameraPostProcess, dumpForDebug, layer = 0, camera = null) {\n var _a, _b, _c, _d, _e, _f;\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n const engine = scene.getEngine();\n (_a = engine._debugPushGroup) === null || _a === void 0 ? void 0 : _a.call(engine, `render to face #${faceIndex} layer #${layer}`, 1);\n // Bind\n this._prepareFrame(scene, faceIndex, layer, useCameraPostProcess);\n if (this.is2DArray) {\n engine.currentRenderPassId = this._renderPassIds[layer];\n this.onBeforeRenderObservable.notifyObservers(layer);\n }\n else {\n engine.currentRenderPassId = this._renderPassIds[faceIndex];\n this.onBeforeRenderObservable.notifyObservers(faceIndex);\n }\n const fastPath = engine.snapshotRendering && engine.snapshotRenderingMode === 1;\n if (!fastPath) {\n // Get the list of meshes to render\n let currentRenderList = null;\n const defaultRenderList = this.renderList ? this.renderList : scene.getActiveMeshes().data;\n const defaultRenderListLength = this.renderList ? this.renderList.length : scene.getActiveMeshes().length;\n if (this.getCustomRenderList) {\n currentRenderList = this.getCustomRenderList(this.is2DArray ? layer : faceIndex, defaultRenderList, defaultRenderListLength);\n }\n if (!currentRenderList) {\n // No custom render list provided, we prepare the rendering for the default list, but check\n // first if we did not already performed the preparation before so as to avoid re-doing it several times\n if (!this._defaultRenderListPrepared) {\n this._prepareRenderingManager(defaultRenderList, defaultRenderListLength, camera, !this.renderList || this.forceLayerMaskCheck);\n this._defaultRenderListPrepared = true;\n }\n currentRenderList = defaultRenderList;\n }\n else {\n // Prepare the rendering for the custom render list provided\n this._prepareRenderingManager(currentRenderList, currentRenderList.length, camera, this.forceLayerMaskCheck);\n }\n // Before clear\n for (const step of scene._beforeRenderTargetClearStage) {\n step.action(this, faceIndex, layer);\n }\n // Clear\n if (this.onClearObservable.hasObservers()) {\n this.onClearObservable.notifyObservers(engine);\n }\n else {\n if (!this.skipInitialClear) {\n engine.clear(this.clearColor || scene.clearColor, true, true, true);\n }\n }\n if (!this._doNotChangeAspectRatio) {\n scene.updateTransformMatrix(true);\n }\n // Before Camera Draw\n for (const step of scene._beforeRenderTargetDrawStage) {\n step.action(this, faceIndex, layer);\n }\n // Render\n this._renderingManager.render(this.customRenderFunction, currentRenderList, this.renderParticles, this.renderSprites);\n // After Camera Draw\n for (const step of scene._afterRenderTargetDrawStage) {\n step.action(this, faceIndex, layer);\n }\n const saveGenerateMipMaps = (_c = (_b = this._texture) === null || _b === void 0 ? void 0 : _b.generateMipMaps) !== null && _c !== void 0 ? _c : false;\n if (this._texture) {\n this._texture.generateMipMaps = false; // if left true, the mipmaps will be generated (if this._texture.generateMipMaps = true) when the first post process binds its own RTT: by doing so it will unbind the current RTT,\n // which will trigger a mipmap generation. We don't want this because it's a wasted work, we will do an unbind of the current RTT at the end of the process (see unbindFrameBuffer) which will\n // trigger the generation of the final mipmaps\n }\n if (this._postProcessManager) {\n this._postProcessManager._finalizeFrame(false, (_d = this._renderTarget) !== null && _d !== void 0 ? _d : undefined, faceIndex, this._postProcesses, this.ignoreCameraViewport);\n }\n else if (useCameraPostProcess) {\n scene.postProcessManager._finalizeFrame(false, (_e = this._renderTarget) !== null && _e !== void 0 ? _e : undefined, faceIndex);\n }\n for (const step of scene._afterRenderTargetPostProcessStage) {\n step.action(this, faceIndex, layer);\n }\n if (this._texture) {\n this._texture.generateMipMaps = saveGenerateMipMaps;\n }\n if (!this._doNotChangeAspectRatio) {\n scene.updateTransformMatrix(true);\n }\n // Dump ?\n if (dumpForDebug) {\n DumpTools.DumpFramebuffer(this.getRenderWidth(), this.getRenderHeight(), engine);\n }\n }\n else {\n // Clear\n if (this.onClearObservable.hasObservers()) {\n this.onClearObservable.notifyObservers(engine);\n }\n else {\n if (!this.skipInitialClear) {\n engine.clear(this.clearColor || scene.clearColor, true, true, true);\n }\n }\n }\n // Unbind\n this._unbindFrameBuffer(engine, faceIndex);\n if (this._texture && this.isCube && faceIndex === 5) {\n engine.generateMipMapsForCubemap(this._texture);\n }\n (_f = engine._debugPopGroup) === null || _f === void 0 ? void 0 : _f.call(engine, 1);\n }\n /**\n * Overrides the default sort function applied in the rendering group to prepare the meshes.\n * This allowed control for front to back rendering or reversely depending of the special needs.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param opaqueSortCompareFn The opaque queue comparison function use to sort.\n * @param alphaTestSortCompareFn The alpha test queue comparison function use to sort.\n * @param transparentSortCompareFn The transparent queue comparison function use to sort.\n */\n setRenderingOrder(renderingGroupId, opaqueSortCompareFn = null, alphaTestSortCompareFn = null, transparentSortCompareFn = null) {\n this._renderingManager.setRenderingOrder(renderingGroupId, opaqueSortCompareFn, alphaTestSortCompareFn, transparentSortCompareFn);\n }\n /**\n * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.\n */\n setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil) {\n this._renderingManager.setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil);\n this._renderingManager._useSceneAutoClearSetup = false;\n }\n /**\n * Clones the texture.\n * @returns the cloned texture\n */\n clone() {\n const textureSize = this.getSize();\n const newTexture = new RenderTargetTexture(this.name, textureSize, this.getScene(), this._renderTargetOptions.generateMipMaps, this._doNotChangeAspectRatio, this._renderTargetOptions.type, this.isCube, this._renderTargetOptions.samplingMode, this._renderTargetOptions.generateDepthBuffer, this._renderTargetOptions.generateStencilBuffer, undefined, this._renderTargetOptions.format, undefined, this._renderTargetOptions.samples);\n // Base texture\n newTexture.hasAlpha = this.hasAlpha;\n newTexture.level = this.level;\n // RenderTarget Texture\n newTexture.coordinatesMode = this.coordinatesMode;\n if (this.renderList) {\n newTexture.renderList = this.renderList.slice(0);\n }\n return newTexture;\n }\n /**\n * Serialize the texture to a JSON representation we can easily use in the respective Parse function.\n * @returns The JSON representation of the texture\n */\n serialize() {\n if (!this.name) {\n return null;\n }\n const serializationObject = super.serialize();\n serializationObject.renderTargetSize = this.getRenderSize();\n serializationObject.renderList = [];\n if (this.renderList) {\n for (let index = 0; index < this.renderList.length; index++) {\n serializationObject.renderList.push(this.renderList[index].id);\n }\n }\n return serializationObject;\n }\n /**\n * This will remove the attached framebuffer objects. The texture will not be able to be used as render target anymore\n */\n disposeFramebufferObjects() {\n var _a;\n (_a = this._renderTarget) === null || _a === void 0 ? void 0 : _a.dispose(true);\n }\n /**\n * Release and destroy the underlying lower level texture aka internalTexture.\n */\n releaseInternalTexture() {\n var _a;\n (_a = this._renderTarget) === null || _a === void 0 ? void 0 : _a.releaseTextures();\n this._texture = null;\n }\n /**\n * Dispose the texture and release its associated resources.\n */\n dispose() {\n var _a;\n this.onResizeObservable.clear();\n this.onClearObservable.clear();\n this.onAfterRenderObservable.clear();\n this.onAfterUnbindObservable.clear();\n this.onBeforeBindObservable.clear();\n this.onBeforeRenderObservable.clear();\n if (this._postProcessManager) {\n this._postProcessManager.dispose();\n this._postProcessManager = null;\n }\n if (this._prePassRenderTarget) {\n this._prePassRenderTarget.dispose();\n }\n this._releaseRenderPassId();\n this.clearPostProcesses(true);\n if (this._resizeObserver) {\n this.getScene().getEngine().onResizeObservable.remove(this._resizeObserver);\n this._resizeObserver = null;\n }\n this.renderList = null;\n // Remove from custom render targets\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n let index = scene.customRenderTargets.indexOf(this);\n if (index >= 0) {\n scene.customRenderTargets.splice(index, 1);\n }\n for (const camera of scene.cameras) {\n index = camera.customRenderTargets.indexOf(this);\n if (index >= 0) {\n camera.customRenderTargets.splice(index, 1);\n }\n }\n (_a = this._renderTarget) === null || _a === void 0 ? void 0 : _a.dispose();\n this._renderTarget = null;\n this._texture = null;\n super.dispose();\n }\n /** @internal */\n _rebuild() {\n if (this.refreshRate === RenderTargetTexture.REFRESHRATE_RENDER_ONCE) {\n this.refreshRate = RenderTargetTexture.REFRESHRATE_RENDER_ONCE;\n }\n if (this._postProcessManager) {\n this._postProcessManager._rebuild();\n }\n }\n /**\n * Clear the info related to rendering groups preventing retention point in material dispose.\n */\n freeRenderingGroups() {\n if (this._renderingManager) {\n this._renderingManager.freeRenderingGroups();\n }\n }\n /**\n * Gets the number of views the corresponding to the texture (eg. a MultiviewRenderTarget will have > 1)\n * @returns the view count\n */\n getViewCount() {\n return 1;\n }\n}\n/**\n * The texture will only be rendered once which can be useful to improve performance if everything in your render is static for instance.\n */\nRenderTargetTexture.REFRESHRATE_RENDER_ONCE = 0;\n/**\n * The texture will only be rendered rendered every frame and is recommended for dynamic contents.\n */\nRenderTargetTexture.REFRESHRATE_RENDER_ONEVERYFRAME = 1;\n/**\n * The texture will be rendered every 2 frames which could be enough if your dynamic objects are not\n * the central point of your effect and can save a lot of performances.\n */\nRenderTargetTexture.REFRESHRATE_RENDER_ONEVERYTWOFRAMES = 2;\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nTexture._CreateRenderTargetTexture = (name, renderTargetSize, scene, generateMipMaps, creationFlags) => {\n return new RenderTargetTexture(name, renderTargetSize, scene, generateMipMaps);\n};\n//# sourceMappingURL=renderTargetTexture.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { SmartArray } from \"../Misc/smartArray.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { Vector2 } from \"../Maths/math.vector.js\";\n\nimport \"../Shaders/postprocess.vertex.js\";\nimport { Engine } from \"../Engines/engine.js\";\nimport \"../Engines/Extensions/engine.renderTarget.js\";\nimport { serialize, serializeAsColor4, SerializationHelper } from \"../Misc/decorators.js\";\nimport { GetClass, RegisterClass } from \"../Misc/typeStore.js\";\nimport { DrawWrapper } from \"../Materials/drawWrapper.js\";\nimport { ShaderLanguage } from \"../Materials/shaderLanguage.js\";\n/**\n * PostProcess can be used to apply a shader to a texture after it has been rendered\n * See https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/usePostProcesses\n */\nexport class PostProcess {\n /**\n * Registers a shader code processing with a post process name.\n * @param postProcessName name of the post process. Use null for the fallback shader code processing. This is the shader code processing that will be used in case no specific shader code processing has been associated to a post process name\n * @param customShaderCodeProcessing shader code processing to associate to the post process name\n * @returns\n */\n static RegisterShaderCodeProcessing(postProcessName, customShaderCodeProcessing) {\n if (!customShaderCodeProcessing) {\n delete PostProcess._CustomShaderCodeProcessing[postProcessName !== null && postProcessName !== void 0 ? postProcessName : \"\"];\n return;\n }\n PostProcess._CustomShaderCodeProcessing[postProcessName !== null && postProcessName !== void 0 ? postProcessName : \"\"] = customShaderCodeProcessing;\n }\n static _GetShaderCodeProcessing(postProcessName) {\n var _a;\n return (_a = PostProcess._CustomShaderCodeProcessing[postProcessName]) !== null && _a !== void 0 ? _a : PostProcess._CustomShaderCodeProcessing[\"\"];\n }\n /**\n * Number of sample textures (default: 1)\n */\n get samples() {\n return this._samples;\n }\n set samples(n) {\n this._samples = Math.min(n, this._engine.getCaps().maxMSAASamples);\n this._textures.forEach((texture) => {\n texture.setSamples(this._samples);\n });\n }\n /**\n * Returns the fragment url or shader name used in the post process.\n * @returns the fragment url or name in the shader store.\n */\n getEffectName() {\n return this._fragmentUrl;\n }\n /**\n * A function that is added to the onActivateObservable\n */\n set onActivate(callback) {\n if (this._onActivateObserver) {\n this.onActivateObservable.remove(this._onActivateObserver);\n }\n if (callback) {\n this._onActivateObserver = this.onActivateObservable.add(callback);\n }\n }\n /**\n * A function that is added to the onSizeChangedObservable\n */\n set onSizeChanged(callback) {\n if (this._onSizeChangedObserver) {\n this.onSizeChangedObservable.remove(this._onSizeChangedObserver);\n }\n this._onSizeChangedObserver = this.onSizeChangedObservable.add(callback);\n }\n /**\n * A function that is added to the onApplyObservable\n */\n set onApply(callback) {\n if (this._onApplyObserver) {\n this.onApplyObservable.remove(this._onApplyObserver);\n }\n this._onApplyObserver = this.onApplyObservable.add(callback);\n }\n /**\n * A function that is added to the onBeforeRenderObservable\n */\n set onBeforeRender(callback) {\n if (this._onBeforeRenderObserver) {\n this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver);\n }\n this._onBeforeRenderObserver = this.onBeforeRenderObservable.add(callback);\n }\n /**\n * A function that is added to the onAfterRenderObservable\n */\n set onAfterRender(callback) {\n if (this._onAfterRenderObserver) {\n this.onAfterRenderObservable.remove(this._onAfterRenderObserver);\n }\n this._onAfterRenderObserver = this.onAfterRenderObservable.add(callback);\n }\n /**\n * The input texture for this post process and the output texture of the previous post process. When added to a pipeline the previous post process will\n * render it's output into this texture and this texture will be used as textureSampler in the fragment shader of this post process.\n */\n get inputTexture() {\n return this._textures.data[this._currentRenderTextureInd];\n }\n set inputTexture(value) {\n this._forcedOutputTexture = value;\n }\n /**\n * Since inputTexture should always be defined, if we previously manually set `inputTexture`,\n * the only way to unset it is to use this function to restore its internal state\n */\n restoreDefaultInputTexture() {\n if (this._forcedOutputTexture) {\n this._forcedOutputTexture = null;\n this.markTextureDirty();\n }\n }\n /**\n * Gets the camera which post process is applied to.\n * @returns The camera the post process is applied to.\n */\n getCamera() {\n return this._camera;\n }\n /**\n * Gets the texel size of the postprocess.\n * See https://en.wikipedia.org/wiki/Texel_(graphics)\n */\n get texelSize() {\n if (this._shareOutputWithPostProcess) {\n return this._shareOutputWithPostProcess.texelSize;\n }\n if (this._forcedOutputTexture) {\n this._texelSize.copyFromFloats(1.0 / this._forcedOutputTexture.width, 1.0 / this._forcedOutputTexture.height);\n }\n return this._texelSize;\n }\n /**\n * Creates a new instance PostProcess\n * @param name The name of the PostProcess.\n * @param fragmentUrl The url of the fragment shader to be used.\n * @param parameters Array of the names of uniform non-sampler2D variables that will be passed to the shader.\n * @param samplers Array of the names of uniform sampler2D variables that will be passed to the shader.\n * @param options The required width/height ratio to downsize to before computing the render pass. (Use 1.0 for full size)\n * @param camera The camera to apply the render pass to.\n * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)\n * @param engine The engine which the post process will be applied. (default: current engine)\n * @param reusable If the post process can be reused on the same frame. (default: false)\n * @param defines String of defines that will be set when running the fragment shader. (default: null)\n * @param textureType Type of textures used when performing the post process. (default: 0)\n * @param vertexUrl The url of the vertex shader to be used. (default: \"postprocess\")\n * @param indexParameters The index parameters to be used for babylons include syntax \"#include[0..varyingCount]\". (default: undefined) See usage in babylon.blurPostProcess.ts and kernelBlur.vertex.fx\n * @param blockCompilation If the shader should not be compiled immediatly. (default: false)\n * @param textureFormat Format of textures used when performing the post process. (default: TEXTUREFORMAT_RGBA)\n */\n constructor(name, fragmentUrl, parameters, samplers, options, camera, samplingMode = 1, engine, reusable, defines = null, textureType = 0, vertexUrl = \"postprocess\", indexParameters, blockCompilation = false, textureFormat = 5, shaderLanguage = ShaderLanguage.GLSL) {\n /** @internal */\n this._parentContainer = null;\n /**\n * Width of the texture to apply the post process on\n */\n this.width = -1;\n /**\n * Height of the texture to apply the post process on\n */\n this.height = -1;\n /**\n * Gets the node material used to create this postprocess (null if the postprocess was manually created)\n */\n this.nodeMaterialSource = null;\n /**\n * Internal, reference to the location where this postprocess was output to. (Typically the texture on the next postprocess in the chain)\n * @internal\n */\n this._outputTexture = null;\n /**\n * If the buffer needs to be cleared before applying the post process. (default: true)\n * Should be set to false if shader will overwrite all previous pixels.\n */\n this.autoClear = true;\n /**\n * If clearing the buffer should be forced in autoClear mode, even when alpha mode is enabled (default: false).\n * By default, the buffer will only be cleared if alpha mode is disabled (and autoClear is true).\n */\n this.forceAutoClearInAlphaMode = false;\n /**\n * Type of alpha mode to use when performing the post process (default: Engine.ALPHA_DISABLE)\n */\n this.alphaMode = 0;\n /**\n * Animations to be used for the post processing\n */\n this.animations = [];\n /**\n * Enable Pixel Perfect mode where texture is not scaled to be power of 2.\n * Can only be used on a single postprocess or on the last one of a chain. (default: false)\n */\n this.enablePixelPerfectMode = false;\n /**\n * Force the postprocess to be applied without taking in account viewport\n */\n this.forceFullscreenViewport = true;\n /**\n * Scale mode for the post process (default: Engine.SCALEMODE_FLOOR)\n *\n * | Value | Type | Description |\n * | ----- | ----------------------------------- | ----------- |\n * | 1 | SCALEMODE_FLOOR | [engine.scalemode_floor](https://doc.babylonjs.com/api/classes/babylon.engine#scalemode_floor) |\n * | 2 | SCALEMODE_NEAREST | [engine.scalemode_nearest](https://doc.babylonjs.com/api/classes/babylon.engine#scalemode_nearest) |\n * | 3 | SCALEMODE_CEILING | [engine.scalemode_ceiling](https://doc.babylonjs.com/api/classes/babylon.engine#scalemode_ceiling) |\n *\n */\n this.scaleMode = 1;\n /**\n * Force textures to be a power of two (default: false)\n */\n this.alwaysForcePOT = false;\n this._samples = 1;\n /**\n * Modify the scale of the post process to be the same as the viewport (default: false)\n */\n this.adaptScaleToCurrentViewport = false;\n this._reusable = false;\n this._renderId = 0;\n /**\n * if externalTextureSamplerBinding is true, the \"apply\" method won't bind the textureSampler texture, it is expected to be done by the \"outside\" (by the onApplyObservable observer most probably).\n * counter-productive in some cases because if the texture bound by \"apply\" is different from the currently texture bound, (the one set by the onApplyObservable observer, for eg) some\n * internal structures (materialContext) will be dirtified, which may impact performances\n */\n this.externalTextureSamplerBinding = false;\n /**\n * Smart array of input and output textures for the post process.\n * @internal\n */\n this._textures = new SmartArray(2);\n /**\n * Smart array of input and output textures for the post process.\n * @internal\n */\n this._textureCache = [];\n /**\n * The index in _textures that corresponds to the output texture.\n * @internal\n */\n this._currentRenderTextureInd = 0;\n this._scaleRatio = new Vector2(1, 1);\n this._texelSize = Vector2.Zero();\n // Events\n /**\n * An event triggered when the postprocess is activated.\n */\n this.onActivateObservable = new Observable();\n /**\n * An event triggered when the postprocess changes its size.\n */\n this.onSizeChangedObservable = new Observable();\n /**\n * An event triggered when the postprocess applies its effect.\n */\n this.onApplyObservable = new Observable();\n /**\n * An event triggered before rendering the postprocess\n */\n this.onBeforeRenderObservable = new Observable();\n /**\n * An event triggered after rendering the postprocess\n */\n this.onAfterRenderObservable = new Observable();\n this.name = name;\n if (camera != null) {\n this._camera = camera;\n this._scene = camera.getScene();\n camera.attachPostProcess(this);\n this._engine = this._scene.getEngine();\n this._scene.postProcesses.push(this);\n this.uniqueId = this._scene.getUniqueId();\n }\n else if (engine) {\n this._engine = engine;\n this._engine.postProcesses.push(this);\n }\n this._options = options;\n this.renderTargetSamplingMode = samplingMode ? samplingMode : 1;\n this._reusable = reusable || false;\n this._textureType = textureType;\n this._textureFormat = textureFormat;\n this._shaderLanguage = shaderLanguage;\n this._samplers = samplers || [];\n this._samplers.push(\"textureSampler\");\n this._fragmentUrl = fragmentUrl;\n this._vertexUrl = vertexUrl;\n this._parameters = parameters || [];\n this._parameters.push(\"scale\");\n this._indexParameters = indexParameters;\n this._drawWrapper = new DrawWrapper(this._engine);\n if (!blockCompilation) {\n this.updateEffect(defines);\n }\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"PostProcess\" string\n */\n getClassName() {\n return \"PostProcess\";\n }\n /**\n * Gets the engine which this post process belongs to.\n * @returns The engine the post process was enabled with.\n */\n getEngine() {\n return this._engine;\n }\n /**\n * The effect that is created when initializing the post process.\n * @returns The created effect corresponding the postprocess.\n */\n getEffect() {\n return this._drawWrapper.effect;\n }\n /**\n * To avoid multiple redundant textures for multiple post process, the output the output texture for this post process can be shared with another.\n * @param postProcess The post process to share the output with.\n * @returns This post process.\n */\n shareOutputWith(postProcess) {\n this._disposeTextures();\n this._shareOutputWithPostProcess = postProcess;\n return this;\n }\n /**\n * Reverses the effect of calling shareOutputWith and returns the post process back to its original state.\n * This should be called if the post process that shares output with this post process is disabled/disposed.\n */\n useOwnOutput() {\n if (this._textures.length == 0) {\n this._textures = new SmartArray(2);\n }\n this._shareOutputWithPostProcess = null;\n }\n /**\n * Updates the effect with the current post process compile time values and recompiles the shader.\n * @param defines Define statements that should be added at the beginning of the shader. (default: null)\n * @param uniforms Set of uniform variables that will be passed to the shader. (default: null)\n * @param samplers Set of Texture2D variables that will be passed to the shader. (default: null)\n * @param indexParameters The index parameters to be used for babylons include syntax \"#include[0..varyingCount]\". (default: undefined) See usage in babylon.blurPostProcess.ts and kernelBlur.vertex.fx\n * @param onCompiled Called when the shader has been compiled.\n * @param onError Called if there is an error when compiling a shader.\n * @param vertexUrl The url of the vertex shader to be used (default: the one given at construction time)\n * @param fragmentUrl The url of the fragment shader to be used (default: the one given at construction time)\n */\n updateEffect(defines = null, uniforms = null, samplers = null, indexParameters, onCompiled, onError, vertexUrl, fragmentUrl) {\n var _a, _b;\n const customShaderCodeProcessing = PostProcess._GetShaderCodeProcessing(this.name);\n if (customShaderCodeProcessing === null || customShaderCodeProcessing === void 0 ? void 0 : customShaderCodeProcessing.defineCustomBindings) {\n const newUniforms = (_a = uniforms === null || uniforms === void 0 ? void 0 : uniforms.slice()) !== null && _a !== void 0 ? _a : [];\n newUniforms.push(...this._parameters);\n const newSamplers = (_b = samplers === null || samplers === void 0 ? void 0 : samplers.slice()) !== null && _b !== void 0 ? _b : [];\n newSamplers.push(...this._samplers);\n defines = customShaderCodeProcessing.defineCustomBindings(this.name, defines, newUniforms, newSamplers);\n uniforms = newUniforms;\n samplers = newSamplers;\n }\n this._postProcessDefines = defines;\n this._drawWrapper.effect = this._engine.createEffect({ vertex: vertexUrl !== null && vertexUrl !== void 0 ? vertexUrl : this._vertexUrl, fragment: fragmentUrl !== null && fragmentUrl !== void 0 ? fragmentUrl : this._fragmentUrl }, {\n attributes: [\"position\"],\n uniformsNames: uniforms || this._parameters,\n uniformBuffersNames: [],\n samplers: samplers || this._samplers,\n defines: defines !== null ? defines : \"\",\n fallbacks: null,\n onCompiled: onCompiled !== null && onCompiled !== void 0 ? onCompiled : null,\n onError: onError !== null && onError !== void 0 ? onError : null,\n indexParameters: indexParameters || this._indexParameters,\n processCodeAfterIncludes: (customShaderCodeProcessing === null || customShaderCodeProcessing === void 0 ? void 0 : customShaderCodeProcessing.processCodeAfterIncludes)\n ? (shaderType, code) => customShaderCodeProcessing.processCodeAfterIncludes(this.name, shaderType, code)\n : null,\n processFinalCode: (customShaderCodeProcessing === null || customShaderCodeProcessing === void 0 ? void 0 : customShaderCodeProcessing.processFinalCode)\n ? (shaderType, code) => customShaderCodeProcessing.processFinalCode(this.name, shaderType, code)\n : null,\n shaderLanguage: this._shaderLanguage,\n }, this._engine);\n }\n /**\n * The post process is reusable if it can be used multiple times within one frame.\n * @returns If the post process is reusable\n */\n isReusable() {\n return this._reusable;\n }\n /** invalidate frameBuffer to hint the postprocess to create a depth buffer */\n markTextureDirty() {\n this.width = -1;\n }\n _createRenderTargetTexture(textureSize, textureOptions, channel = 0) {\n for (let i = 0; i < this._textureCache.length; i++) {\n if (this._textureCache[i].texture.width === textureSize.width &&\n this._textureCache[i].texture.height === textureSize.height &&\n this._textureCache[i].postProcessChannel === channel &&\n this._textureCache[i].texture._generateDepthBuffer === textureOptions.generateDepthBuffer &&\n this._textureCache[i].texture.samples === textureOptions.samples) {\n return this._textureCache[i].texture;\n }\n }\n const tex = this._engine.createRenderTargetTexture(textureSize, textureOptions);\n this._textureCache.push({ texture: tex, postProcessChannel: channel, lastUsedRenderId: -1 });\n return tex;\n }\n _flushTextureCache() {\n const currentRenderId = this._renderId;\n for (let i = this._textureCache.length - 1; i >= 0; i--) {\n if (currentRenderId - this._textureCache[i].lastUsedRenderId > 100) {\n let currentlyUsed = false;\n for (let j = 0; j < this._textures.length; j++) {\n if (this._textures.data[j] === this._textureCache[i].texture) {\n currentlyUsed = true;\n break;\n }\n }\n if (!currentlyUsed) {\n this._textureCache[i].texture.dispose();\n this._textureCache.splice(i, 1);\n }\n }\n }\n }\n _resize(width, height, camera, needMipMaps, forceDepthStencil) {\n if (this._textures.length > 0) {\n this._textures.reset();\n }\n this.width = width;\n this.height = height;\n let firstPP = null;\n for (let i = 0; i < camera._postProcesses.length; i++) {\n if (camera._postProcesses[i] !== null) {\n firstPP = camera._postProcesses[i];\n break;\n }\n }\n const textureSize = { width: this.width, height: this.height };\n const textureOptions = {\n generateMipMaps: needMipMaps,\n generateDepthBuffer: forceDepthStencil || firstPP === this,\n generateStencilBuffer: (forceDepthStencil || firstPP === this) && this._engine.isStencilEnable,\n samplingMode: this.renderTargetSamplingMode,\n type: this._textureType,\n format: this._textureFormat,\n samples: this._samples,\n label: \"PostProcessRTT-\" + this.name,\n };\n this._textures.push(this._createRenderTargetTexture(textureSize, textureOptions, 0));\n if (this._reusable) {\n this._textures.push(this._createRenderTargetTexture(textureSize, textureOptions, 1));\n }\n this._texelSize.copyFromFloats(1.0 / this.width, 1.0 / this.height);\n this.onSizeChangedObservable.notifyObservers(this);\n }\n _getTarget() {\n let target;\n if (this._shareOutputWithPostProcess) {\n target = this._shareOutputWithPostProcess.inputTexture;\n }\n else if (this._forcedOutputTexture) {\n target = this._forcedOutputTexture;\n this.width = this._forcedOutputTexture.width;\n this.height = this._forcedOutputTexture.height;\n }\n else {\n target = this.inputTexture;\n let cache;\n for (let i = 0; i < this._textureCache.length; i++) {\n if (this._textureCache[i].texture === target) {\n cache = this._textureCache[i];\n break;\n }\n }\n if (cache) {\n cache.lastUsedRenderId = this._renderId;\n }\n }\n return target;\n }\n /**\n * Activates the post process by intializing the textures to be used when executed. Notifies onActivateObservable.\n * When this post process is used in a pipeline, this is call will bind the input texture of this post process to the output of the previous.\n * @param camera The camera that will be used in the post process. This camera will be used when calling onActivateObservable.\n * @param sourceTexture The source texture to be inspected to get the width and height if not specified in the post process constructor. (default: null)\n * @param forceDepthStencil If true, a depth and stencil buffer will be generated. (default: false)\n * @returns The render target wrapper that was bound to be written to.\n */\n activate(camera, sourceTexture = null, forceDepthStencil) {\n var _a, _b;\n camera = camera || this._camera;\n const scene = camera.getScene();\n const engine = scene.getEngine();\n const maxSize = engine.getCaps().maxTextureSize;\n const requiredWidth = ((sourceTexture ? sourceTexture.width : this._engine.getRenderWidth(true)) * this._options) | 0;\n const requiredHeight = ((sourceTexture ? sourceTexture.height : this._engine.getRenderHeight(true)) * this._options) | 0;\n let desiredWidth = this._options.width || requiredWidth;\n let desiredHeight = this._options.height || requiredHeight;\n const needMipMaps = this.renderTargetSamplingMode !== 7 &&\n this.renderTargetSamplingMode !== 1 &&\n this.renderTargetSamplingMode !== 2;\n let target = null;\n if (!this._shareOutputWithPostProcess && !this._forcedOutputTexture) {\n if (this.adaptScaleToCurrentViewport) {\n const currentViewport = engine.currentViewport;\n if (currentViewport) {\n desiredWidth *= currentViewport.width;\n desiredHeight *= currentViewport.height;\n }\n }\n if (needMipMaps || this.alwaysForcePOT) {\n if (!this._options.width) {\n desiredWidth = engine.needPOTTextures ? Engine.GetExponentOfTwo(desiredWidth, maxSize, this.scaleMode) : desiredWidth;\n }\n if (!this._options.height) {\n desiredHeight = engine.needPOTTextures ? Engine.GetExponentOfTwo(desiredHeight, maxSize, this.scaleMode) : desiredHeight;\n }\n }\n if (this.width !== desiredWidth || this.height !== desiredHeight || !(target = this._getTarget())) {\n this._resize(desiredWidth, desiredHeight, camera, needMipMaps, forceDepthStencil);\n }\n this._textures.forEach((texture) => {\n if (texture.samples !== this.samples) {\n this._engine.updateRenderTargetTextureSampleCount(texture, this.samples);\n }\n });\n this._flushTextureCache();\n this._renderId++;\n }\n if (!target) {\n target = this._getTarget();\n }\n // Bind the input of this post process to be used as the output of the previous post process.\n if (this.enablePixelPerfectMode) {\n this._scaleRatio.copyFromFloats(requiredWidth / desiredWidth, requiredHeight / desiredHeight);\n this._engine.bindFramebuffer(target, 0, requiredWidth, requiredHeight, this.forceFullscreenViewport);\n }\n else {\n this._scaleRatio.copyFromFloats(1, 1);\n this._engine.bindFramebuffer(target, 0, undefined, undefined, this.forceFullscreenViewport);\n }\n (_b = (_a = this._engine)._debugInsertMarker) === null || _b === void 0 ? void 0 : _b.call(_a, `post process ${this.name} input`);\n this.onActivateObservable.notifyObservers(camera);\n // Clear\n if (this.autoClear && (this.alphaMode === 0 || this.forceAutoClearInAlphaMode)) {\n this._engine.clear(this.clearColor ? this.clearColor : scene.clearColor, scene._allowPostProcessClearColor, true, true);\n }\n if (this._reusable) {\n this._currentRenderTextureInd = (this._currentRenderTextureInd + 1) % 2;\n }\n return target;\n }\n /**\n * If the post process is supported.\n */\n get isSupported() {\n return this._drawWrapper.effect.isSupported;\n }\n /**\n * The aspect ratio of the output texture.\n */\n get aspectRatio() {\n if (this._shareOutputWithPostProcess) {\n return this._shareOutputWithPostProcess.aspectRatio;\n }\n if (this._forcedOutputTexture) {\n return this._forcedOutputTexture.width / this._forcedOutputTexture.height;\n }\n return this.width / this.height;\n }\n /**\n * Get a value indicating if the post-process is ready to be used\n * @returns true if the post-process is ready (shader is compiled)\n */\n isReady() {\n var _a, _b;\n return (_b = (_a = this._drawWrapper.effect) === null || _a === void 0 ? void 0 : _a.isReady()) !== null && _b !== void 0 ? _b : false;\n }\n /**\n * Binds all textures and uniforms to the shader, this will be run on every pass.\n * @returns the effect corresponding to this post process. Null if not compiled or not ready.\n */\n apply() {\n var _a, _b, _c;\n // Check\n if (!((_a = this._drawWrapper.effect) === null || _a === void 0 ? void 0 : _a.isReady())) {\n return null;\n }\n // States\n this._engine.enableEffect(this._drawWrapper);\n this._engine.setState(false);\n this._engine.setDepthBuffer(false);\n this._engine.setDepthWrite(false);\n // Alpha\n this._engine.setAlphaMode(this.alphaMode);\n if (this.alphaConstants) {\n this.getEngine().setAlphaConstants(this.alphaConstants.r, this.alphaConstants.g, this.alphaConstants.b, this.alphaConstants.a);\n }\n // Bind the output texture of the preivous post process as the input to this post process.\n let source;\n if (this._shareOutputWithPostProcess) {\n source = this._shareOutputWithPostProcess.inputTexture;\n }\n else if (this._forcedOutputTexture) {\n source = this._forcedOutputTexture;\n }\n else {\n source = this.inputTexture;\n }\n if (!this.externalTextureSamplerBinding) {\n this._drawWrapper.effect._bindTexture(\"textureSampler\", source === null || source === void 0 ? void 0 : source.texture);\n }\n // Parameters\n this._drawWrapper.effect.setVector2(\"scale\", this._scaleRatio);\n this.onApplyObservable.notifyObservers(this._drawWrapper.effect);\n (_c = (_b = PostProcess._GetShaderCodeProcessing(this.name)) === null || _b === void 0 ? void 0 : _b.bindCustomBindings) === null || _c === void 0 ? void 0 : _c.call(_b, this.name, this._drawWrapper.effect);\n return this._drawWrapper.effect;\n }\n _disposeTextures() {\n if (this._shareOutputWithPostProcess || this._forcedOutputTexture) {\n this._disposeTextureCache();\n return;\n }\n this._disposeTextureCache();\n this._textures.dispose();\n }\n _disposeTextureCache() {\n for (let i = this._textureCache.length - 1; i >= 0; i--) {\n this._textureCache[i].texture.dispose();\n }\n this._textureCache.length = 0;\n }\n /**\n * Sets the required values to the prepass renderer.\n * @param prePassRenderer defines the prepass renderer to setup.\n * @returns true if the pre pass is needed.\n */\n setPrePassRenderer(prePassRenderer) {\n if (this._prePassEffectConfiguration) {\n this._prePassEffectConfiguration = prePassRenderer.addEffectConfiguration(this._prePassEffectConfiguration);\n this._prePassEffectConfiguration.enabled = true;\n return true;\n }\n return false;\n }\n /**\n * Disposes the post process.\n * @param camera The camera to dispose the post process on.\n */\n dispose(camera) {\n camera = camera || this._camera;\n this._disposeTextures();\n let index;\n if (this._scene) {\n index = this._scene.postProcesses.indexOf(this);\n if (index !== -1) {\n this._scene.postProcesses.splice(index, 1);\n }\n }\n if (this._parentContainer) {\n const index = this._parentContainer.postProcesses.indexOf(this);\n if (index > -1) {\n this._parentContainer.postProcesses.splice(index, 1);\n }\n this._parentContainer = null;\n }\n index = this._engine.postProcesses.indexOf(this);\n if (index !== -1) {\n this._engine.postProcesses.splice(index, 1);\n }\n if (!camera) {\n return;\n }\n camera.detachPostProcess(this);\n index = camera._postProcesses.indexOf(this);\n if (index === 0 && camera._postProcesses.length > 0) {\n const firstPostProcess = this._camera._getFirstPostProcess();\n if (firstPostProcess) {\n firstPostProcess.markTextureDirty();\n }\n }\n this.onActivateObservable.clear();\n this.onAfterRenderObservable.clear();\n this.onApplyObservable.clear();\n this.onBeforeRenderObservable.clear();\n this.onSizeChangedObservable.clear();\n }\n /**\n * Serializes the post process to a JSON object\n * @returns the JSON object\n */\n serialize() {\n const serializationObject = SerializationHelper.Serialize(this);\n const camera = this.getCamera() || (this._scene && this._scene.activeCamera);\n serializationObject.customType = \"BABYLON.\" + this.getClassName();\n serializationObject.cameraId = camera ? camera.id : null;\n serializationObject.reusable = this._reusable;\n serializationObject.textureType = this._textureType;\n serializationObject.fragmentUrl = this._fragmentUrl;\n serializationObject.parameters = this._parameters;\n serializationObject.samplers = this._samplers;\n serializationObject.options = this._options;\n serializationObject.defines = this._postProcessDefines;\n serializationObject.textureFormat = this._textureFormat;\n serializationObject.vertexUrl = this._vertexUrl;\n serializationObject.indexParameters = this._indexParameters;\n return serializationObject;\n }\n /**\n * Clones this post process\n * @returns a new post process similar to this one\n */\n clone() {\n const serializationObject = this.serialize();\n serializationObject._engine = this._engine;\n serializationObject.cameraId = null;\n const result = PostProcess.Parse(serializationObject, this._scene, \"\");\n if (!result) {\n return null;\n }\n result.onActivateObservable = this.onActivateObservable.clone();\n result.onSizeChangedObservable = this.onSizeChangedObservable.clone();\n result.onApplyObservable = this.onApplyObservable.clone();\n result.onBeforeRenderObservable = this.onBeforeRenderObservable.clone();\n result.onAfterRenderObservable = this.onAfterRenderObservable.clone();\n result._prePassEffectConfiguration = this._prePassEffectConfiguration;\n return result;\n }\n /**\n * Creates a material from parsed material data\n * @param parsedPostProcess defines parsed post process data\n * @param scene defines the hosting scene\n * @param rootUrl defines the root URL to use to load textures\n * @returns a new post process\n */\n static Parse(parsedPostProcess, scene, rootUrl) {\n const postProcessType = GetClass(parsedPostProcess.customType);\n if (!postProcessType || !postProcessType._Parse) {\n return null;\n }\n const camera = scene ? scene.getCameraById(parsedPostProcess.cameraId) : null;\n return postProcessType._Parse(parsedPostProcess, camera, scene, rootUrl);\n }\n /**\n * @internal\n */\n static _Parse(parsedPostProcess, targetCamera, scene, rootUrl) {\n return SerializationHelper.Parse(() => {\n return new PostProcess(parsedPostProcess.name, parsedPostProcess.fragmentUrl, parsedPostProcess.parameters, parsedPostProcess.samplers, parsedPostProcess.options, targetCamera, parsedPostProcess.renderTargetSamplingMode, parsedPostProcess._engine, parsedPostProcess.reusable, parsedPostProcess.defines, parsedPostProcess.textureType, parsedPostProcess.vertexUrl, parsedPostProcess.indexParameters, false, parsedPostProcess.textureFormat);\n }, parsedPostProcess, scene, rootUrl);\n }\n}\nPostProcess._CustomShaderCodeProcessing = {};\n__decorate([\n serialize()\n], PostProcess.prototype, \"uniqueId\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"name\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"width\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"height\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"renderTargetSamplingMode\", void 0);\n__decorate([\n serializeAsColor4()\n], PostProcess.prototype, \"clearColor\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"autoClear\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"forceAutoClearInAlphaMode\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"alphaMode\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"alphaConstants\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"enablePixelPerfectMode\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"forceFullscreenViewport\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"scaleMode\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"alwaysForcePOT\", void 0);\n__decorate([\n serialize(\"samples\")\n], PostProcess.prototype, \"_samples\", void 0);\n__decorate([\n serialize()\n], PostProcess.prototype, \"adaptScaleToCurrentViewport\", void 0);\nRegisterClass(\"BABYLON.PostProcess\", PostProcess);\n//# sourceMappingURL=postProcess.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"kernelBlurVaryingDeclaration\";\nconst shader = `varying vec2 sampleCoord{X};`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const kernelBlurVaryingDeclaration = { name, shader };\n//# sourceMappingURL=kernelBlurVaryingDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"packingFunctions\";\nconst shader = `vec4 pack(float depth)\n{const vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);vec4 res=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}\nfloat unpack(vec4 color)\n{const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(color,bit_shift);}`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const packingFunctions = { name, shader };\n//# sourceMappingURL=packingFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"kernelBlurFragment\";\nconst shader = `#ifdef DOF\nfactor=sampleCoC(sampleCoord{X}); \ncomputedWeight=KERNEL_WEIGHT{X}*factor;sumOfWeights+=computedWeight;\n#else\ncomputedWeight=KERNEL_WEIGHT{X};\n#endif\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCoord{X}))*computedWeight;\n#else\nblend+=texture2D(textureSampler,sampleCoord{X})*computedWeight;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const kernelBlurFragment = { name, shader };\n//# sourceMappingURL=kernelBlurFragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"kernelBlurFragment2\";\nconst shader = `#ifdef DOF\nfactor=sampleCoC(sampleCenter+delta*KERNEL_DEP_OFFSET{X});computedWeight=KERNEL_DEP_WEIGHT{X}*factor;sumOfWeights+=computedWeight;\n#else\ncomputedWeight=KERNEL_DEP_WEIGHT{X};\n#endif\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X}))*computedWeight;\n#else\nblend+=texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X})*computedWeight;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const kernelBlurFragment2 = { name, shader };\n//# sourceMappingURL=kernelBlurFragment2.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/kernelBlurVaryingDeclaration.js\";\nimport \"./ShadersInclude/packingFunctions.js\";\nimport \"./ShadersInclude/kernelBlurFragment.js\";\nimport \"./ShadersInclude/kernelBlurFragment2.js\";\nconst name = \"kernelBlurPixelShader\";\nconst shader = `uniform sampler2D textureSampler;uniform vec2 delta;varying vec2 sampleCenter;\n#ifdef DOF\nuniform sampler2D circleOfConfusionSampler;float sampleCoC(in vec2 offset) {float coc=texture2D(circleOfConfusionSampler,offset).r;return coc; }\n#endif\n#include[0..varyingCount]\n#ifdef PACKEDFLOAT\n#include\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{float computedWeight=0.0;\n#ifdef PACKEDFLOAT\nfloat blend=0.;\n#else\nvec4 blend=vec4(0.);\n#endif\n#ifdef DOF\nfloat sumOfWeights=CENTER_WEIGHT; \nfloat factor=0.0;\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCenter))*CENTER_WEIGHT;\n#else\nblend+=texture2D(textureSampler,sampleCenter)*CENTER_WEIGHT;\n#endif\n#endif\n#include[0..varyingCount]\n#include[0..depCount]\n#ifdef PACKEDFLOAT\ngl_FragColor=pack(blend);\n#else\ngl_FragColor=blend;\n#endif\n#ifdef DOF\ngl_FragColor/=sumOfWeights;\n#endif\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const kernelBlurPixelShader = { name, shader };\n//# sourceMappingURL=kernelBlur.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"kernelBlurVertex\";\nconst shader = `sampleCoord{X}=sampleCenter+delta*KERNEL_OFFSET{X};`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const kernelBlurVertex = { name, shader };\n//# sourceMappingURL=kernelBlurVertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/kernelBlurVaryingDeclaration.js\";\nimport \"./ShadersInclude/kernelBlurVertex.js\";\nconst name = \"kernelBlurVertexShader\";\nconst shader = `attribute vec2 position;uniform vec2 delta;varying vec2 sampleCenter;\n#include[0..varyingCount]\nconst vec2 madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nsampleCenter=(position*madd+madd);\n#include[0..varyingCount]\ngl_Position=vec4(position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const kernelBlurVertexShader = { name, shader };\n//# sourceMappingURL=kernelBlur.vertex.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { PostProcess } from \"./postProcess.js\";\nimport { Texture } from \"../Materials/Textures/texture.js\";\n\nimport \"../Shaders/kernelBlur.fragment.js\";\nimport \"../Shaders/kernelBlur.vertex.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { serialize, serializeAsVector2, SerializationHelper } from \"../Misc/decorators.js\";\n/**\n * The Blur Post Process which blurs an image based on a kernel and direction.\n * Can be used twice in x and y directions to perform a gaussian blur in two passes.\n */\nexport class BlurPostProcess extends PostProcess {\n /**\n * Sets the length in pixels of the blur sample region\n */\n set kernel(v) {\n if (this._idealKernel === v) {\n return;\n }\n v = Math.max(v, 1);\n this._idealKernel = v;\n this._kernel = this._nearestBestKernel(v);\n if (!this._blockCompilation) {\n this._updateParameters();\n }\n }\n /**\n * Gets the length in pixels of the blur sample region\n */\n get kernel() {\n return this._idealKernel;\n }\n /**\n * Sets whether or not the blur needs to unpack/repack floats\n */\n set packedFloat(v) {\n if (this._packedFloat === v) {\n return;\n }\n this._packedFloat = v;\n if (!this._blockCompilation) {\n this._updateParameters();\n }\n }\n /**\n * Gets whether or not the blur is unpacking/repacking floats\n */\n get packedFloat() {\n return this._packedFloat;\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"BlurPostProcess\" string\n */\n getClassName() {\n return \"BlurPostProcess\";\n }\n /**\n * Creates a new instance BlurPostProcess\n * @param name The name of the effect.\n * @param direction The direction in which to blur the image.\n * @param kernel The size of the kernel to be used when computing the blur. eg. Size of 3 will blur the center pixel by 2 pixels surrounding it.\n * @param options The required width/height ratio to downsize to before computing the render pass. (Use 1.0 for full size)\n * @param camera The camera to apply the render pass to.\n * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)\n * @param engine The engine which the post process will be applied. (default: current engine)\n * @param reusable If the post process can be reused on the same frame. (default: false)\n * @param textureType Type of textures used when performing the post process. (default: 0)\n * @param defines\n * @param _blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)\n * @param textureFormat Format of textures used when performing the post process. (default: TEXTUREFORMAT_RGBA)\n */\n constructor(name, direction, kernel, options, camera, samplingMode = Texture.BILINEAR_SAMPLINGMODE, engine, reusable, textureType = 0, defines = \"\", _blockCompilation = false, textureFormat = 5) {\n super(name, \"kernelBlur\", [\"delta\", \"direction\"], [\"circleOfConfusionSampler\"], options, camera, samplingMode, engine, reusable, null, textureType, \"kernelBlur\", { varyingCount: 0, depCount: 0 }, true, textureFormat);\n this._blockCompilation = _blockCompilation;\n this._packedFloat = false;\n this._staticDefines = \"\";\n this._staticDefines = defines;\n this.direction = direction;\n this.onApplyObservable.add((effect) => {\n if (this._outputTexture) {\n effect.setFloat2(\"delta\", (1 / this._outputTexture.width) * this.direction.x, (1 / this._outputTexture.height) * this.direction.y);\n }\n else {\n effect.setFloat2(\"delta\", (1 / this.width) * this.direction.x, (1 / this.height) * this.direction.y);\n }\n });\n this.kernel = kernel;\n }\n /**\n * Updates the effect with the current post process compile time values and recompiles the shader.\n * @param defines Define statements that should be added at the beginning of the shader. (default: null)\n * @param uniforms Set of uniform variables that will be passed to the shader. (default: null)\n * @param samplers Set of Texture2D variables that will be passed to the shader. (default: null)\n * @param indexParameters The index parameters to be used for babylons include syntax \"#include[0..varyingCount]\". (default: undefined) See usage in babylon.blurPostProcess.ts and kernelBlur.vertex.fx\n * @param onCompiled Called when the shader has been compiled.\n * @param onError Called if there is an error when compiling a shader.\n */\n updateEffect(defines = null, uniforms = null, samplers = null, indexParameters, onCompiled, onError) {\n this._updateParameters(onCompiled, onError);\n }\n _updateParameters(onCompiled, onError) {\n // Generate sampling offsets and weights\n const N = this._kernel;\n const centerIndex = (N - 1) / 2;\n // Generate Gaussian sampling weights over kernel\n let offsets = [];\n let weights = [];\n let totalWeight = 0;\n for (let i = 0; i < N; i++) {\n const u = i / (N - 1);\n const w = this._gaussianWeight(u * 2.0 - 1);\n offsets[i] = i - centerIndex;\n weights[i] = w;\n totalWeight += w;\n }\n // Normalize weights\n for (let i = 0; i < weights.length; i++) {\n weights[i] /= totalWeight;\n }\n // Optimize: combine samples to take advantage of hardware linear sampling\n // Walk from left to center, combining pairs (symmetrically)\n const linearSamplingWeights = [];\n const linearSamplingOffsets = [];\n const linearSamplingMap = [];\n for (let i = 0; i <= centerIndex; i += 2) {\n const j = Math.min(i + 1, Math.floor(centerIndex));\n const singleCenterSample = i === j;\n if (singleCenterSample) {\n linearSamplingMap.push({ o: offsets[i], w: weights[i] });\n }\n else {\n const sharedCell = j === centerIndex;\n const weightLinear = weights[i] + weights[j] * (sharedCell ? 0.5 : 1);\n const offsetLinear = offsets[i] + 1 / (1 + weights[i] / weights[j]);\n if (offsetLinear === 0) {\n linearSamplingMap.push({ o: offsets[i], w: weights[i] });\n linearSamplingMap.push({ o: offsets[i + 1], w: weights[i + 1] });\n }\n else {\n linearSamplingMap.push({ o: offsetLinear, w: weightLinear });\n linearSamplingMap.push({ o: -offsetLinear, w: weightLinear });\n }\n }\n }\n for (let i = 0; i < linearSamplingMap.length; i++) {\n linearSamplingOffsets[i] = linearSamplingMap[i].o;\n linearSamplingWeights[i] = linearSamplingMap[i].w;\n }\n // Replace with optimized\n offsets = linearSamplingOffsets;\n weights = linearSamplingWeights;\n // Generate shaders\n const maxVaryingRows = this.getEngine().getCaps().maxVaryingVectors;\n const freeVaryingVec2 = Math.max(maxVaryingRows, 0) - 1; // Because of sampleCenter\n let varyingCount = Math.min(offsets.length, freeVaryingVec2);\n let defines = \"\";\n defines += this._staticDefines;\n // The DOF fragment should ignore the center pixel when looping as it is handled manually in the fragment shader.\n if (this._staticDefines.indexOf(\"DOF\") != -1) {\n defines += `#define CENTER_WEIGHT ${this._glslFloat(weights[varyingCount - 1])}\\n`;\n varyingCount--;\n }\n for (let i = 0; i < varyingCount; i++) {\n defines += `#define KERNEL_OFFSET${i} ${this._glslFloat(offsets[i])}\\n`;\n defines += `#define KERNEL_WEIGHT${i} ${this._glslFloat(weights[i])}\\n`;\n }\n let depCount = 0;\n for (let i = freeVaryingVec2; i < offsets.length; i++) {\n defines += `#define KERNEL_DEP_OFFSET${depCount} ${this._glslFloat(offsets[i])}\\n`;\n defines += `#define KERNEL_DEP_WEIGHT${depCount} ${this._glslFloat(weights[i])}\\n`;\n depCount++;\n }\n if (this.packedFloat) {\n defines += `#define PACKEDFLOAT 1`;\n }\n this._blockCompilation = false;\n super.updateEffect(defines, null, null, {\n varyingCount: varyingCount,\n depCount: depCount,\n }, onCompiled, onError);\n }\n /**\n * Best kernels are odd numbers that when divided by 2, their integer part is even, so 5, 9 or 13.\n * Other odd kernels optimize correctly but require proportionally more samples, even kernels are\n * possible but will produce minor visual artifacts. Since each new kernel requires a new shader we\n * want to minimize kernel changes, having gaps between physical kernels is helpful in that regard.\n * The gaps between physical kernels are compensated for in the weighting of the samples\n * @param idealKernel Ideal blur kernel.\n * @returns Nearest best kernel.\n */\n _nearestBestKernel(idealKernel) {\n const v = Math.round(idealKernel);\n for (const k of [v, v - 1, v + 1, v - 2, v + 2]) {\n if (k % 2 !== 0 && Math.floor(k / 2) % 2 === 0 && k > 0) {\n return Math.max(k, 3);\n }\n }\n return Math.max(v, 3);\n }\n /**\n * Calculates the value of a Gaussian distribution with sigma 3 at a given point.\n * @param x The point on the Gaussian distribution to sample.\n * @returns the value of the Gaussian function at x.\n */\n _gaussianWeight(x) {\n //reference: Engines/ImageProcessingBlur.cpp #dcc760\n // We are evaluating the Gaussian (normal) distribution over a kernel parameter space of [-1,1],\n // so we truncate at three standard deviations by setting stddev (sigma) to 1/3.\n // The choice of 3-sigma truncation is common but arbitrary, and means that the signal is\n // truncated at around 1.3% of peak strength.\n //the distribution is scaled to account for the difference between the actual kernel size and the requested kernel size\n const sigma = 1 / 3;\n const denominator = Math.sqrt(2.0 * Math.PI) * sigma;\n const exponent = -((x * x) / (2.0 * sigma * sigma));\n const weight = (1.0 / denominator) * Math.exp(exponent);\n return weight;\n }\n /**\n * Generates a string that can be used as a floating point number in GLSL.\n * @param x Value to print.\n * @param decimalFigures Number of decimal places to print the number to (excluding trailing 0s).\n * @returns GLSL float string.\n */\n _glslFloat(x, decimalFigures = 8) {\n return x.toFixed(decimalFigures).replace(/0+$/, \"\");\n }\n /**\n * @internal\n */\n static _Parse(parsedPostProcess, targetCamera, scene, rootUrl) {\n return SerializationHelper.Parse(() => {\n return new BlurPostProcess(parsedPostProcess.name, parsedPostProcess.direction, parsedPostProcess.kernel, parsedPostProcess.options, targetCamera, parsedPostProcess.renderTargetSamplingMode, scene.getEngine(), parsedPostProcess.reusable, parsedPostProcess.textureType, undefined, false);\n }, parsedPostProcess, scene, rootUrl);\n }\n}\n__decorate([\n serialize(\"kernel\")\n], BlurPostProcess.prototype, \"_kernel\", void 0);\n__decorate([\n serialize(\"packedFloat\")\n], BlurPostProcess.prototype, \"_packedFloat\", void 0);\n__decorate([\n serializeAsVector2()\n], BlurPostProcess.prototype, \"direction\", void 0);\nRegisterClass(\"BABYLON.BlurPostProcess\", BlurPostProcess);\n//# sourceMappingURL=blurPostProcess.js.map","/**\n * EffectFallbacks can be used to add fallbacks (properties to disable) to certain properties when desired to improve performance.\n * (Eg. Start at high quality with reflection and fog, if fps is low, remove reflection, if still low remove fog)\n */\nexport class EffectFallbacks {\n constructor() {\n this._defines = {};\n this._currentRank = 32;\n this._maxRank = -1;\n this._mesh = null;\n }\n /**\n * Removes the fallback from the bound mesh.\n */\n unBindMesh() {\n this._mesh = null;\n }\n /**\n * Adds a fallback on the specified property.\n * @param rank The rank of the fallback (Lower ranks will be fallbacked to first)\n * @param define The name of the define in the shader\n */\n addFallback(rank, define) {\n if (!this._defines[rank]) {\n if (rank < this._currentRank) {\n this._currentRank = rank;\n }\n if (rank > this._maxRank) {\n this._maxRank = rank;\n }\n this._defines[rank] = new Array();\n }\n this._defines[rank].push(define);\n }\n /**\n * Sets the mesh to use CPU skinning when needing to fallback.\n * @param rank The rank of the fallback (Lower ranks will be fallbacked to first)\n * @param mesh The mesh to use the fallbacks.\n */\n addCPUSkinningFallback(rank, mesh) {\n this._mesh = mesh;\n if (rank < this._currentRank) {\n this._currentRank = rank;\n }\n if (rank > this._maxRank) {\n this._maxRank = rank;\n }\n }\n /**\n * Checks to see if more fallbacks are still available.\n */\n get hasMoreFallbacks() {\n return this._currentRank <= this._maxRank;\n }\n /**\n * Removes the defines that should be removed when falling back.\n * @param currentDefines defines the current define statements for the shader.\n * @param effect defines the current effect we try to compile\n * @returns The resulting defines with defines of the current rank removed.\n */\n reduce(currentDefines, effect) {\n // First we try to switch to CPU skinning\n if (this._mesh && this._mesh.computeBonesUsingShaders && this._mesh.numBoneInfluencers > 0) {\n this._mesh.computeBonesUsingShaders = false;\n currentDefines = currentDefines.replace(\"#define NUM_BONE_INFLUENCERS \" + this._mesh.numBoneInfluencers, \"#define NUM_BONE_INFLUENCERS 0\");\n effect._bonesComputationForcedToCPU = true;\n const scene = this._mesh.getScene();\n for (let index = 0; index < scene.meshes.length; index++) {\n const otherMesh = scene.meshes[index];\n if (!otherMesh.material) {\n if (!this._mesh.material && otherMesh.computeBonesUsingShaders && otherMesh.numBoneInfluencers > 0) {\n otherMesh.computeBonesUsingShaders = false;\n }\n continue;\n }\n if (!otherMesh.computeBonesUsingShaders || otherMesh.numBoneInfluencers === 0) {\n continue;\n }\n if (otherMesh.material.getEffect() === effect) {\n otherMesh.computeBonesUsingShaders = false;\n }\n else if (otherMesh.subMeshes) {\n for (const subMesh of otherMesh.subMeshes) {\n const subMeshEffect = subMesh.effect;\n if (subMeshEffect === effect) {\n otherMesh.computeBonesUsingShaders = false;\n break;\n }\n }\n }\n }\n }\n else {\n const currentFallbacks = this._defines[this._currentRank];\n if (currentFallbacks) {\n for (let index = 0; index < currentFallbacks.length; index++) {\n currentDefines = currentDefines.replace(\"#define \" + currentFallbacks[index], \"\");\n }\n }\n this._currentRank++;\n }\n return currentDefines;\n }\n}\n//# sourceMappingURL=effectFallbacks.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"bayerDitherFunctions\";\nconst shader = `float bayerDither2(vec2 _P) {return mod(2.0*_P.y+_P.x+1.0,4.0);}\nfloat bayerDither4(vec2 _P) {vec2 P1=mod(_P,2.0); \nvec2 P2=floor(0.5*mod(_P,4.0)); \nreturn 4.0*bayerDither2(P1)+bayerDither2(P2);}\nfloat bayerDither8(vec2 _P) {vec2 P1=mod(_P,2.0); \nvec2 P2=floor(0.5 *mod(_P,4.0)); \nvec2 P4=floor(0.25*mod(_P,8.0)); \nreturn 4.0*(4.0*bayerDither2(P1)+bayerDither2(P2))+bayerDither2(P4);}\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const bayerDitherFunctions = { name, shader };\n//# sourceMappingURL=bayerDitherFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./packingFunctions.js\";\nimport \"./bayerDitherFunctions.js\";\nconst name = \"shadowMapFragmentExtraDeclaration\";\nconst shader = `#if SM_FLOAT==0\n#include\n#endif\n#if SM_SOFTTRANSPARENTSHADOW==1\n#include\nuniform float softTransparentShadowSM;\n#endif\nvarying float vDepthMetricSM;\n#if SM_USEDISTANCE==1\nuniform vec3 lightDataSM;varying vec3 vPositionWSM;\n#endif\nuniform vec3 biasAndScaleSM;uniform vec2 depthValuesSM;\n#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP==1\nvarying float zSM;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const shadowMapFragmentExtraDeclaration = { name, shader };\n//# sourceMappingURL=shadowMapFragmentExtraDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"clipPlaneFragmentDeclaration\";\nconst shader = `#ifdef CLIPPLANE\nvarying float fClipDistance;\n#endif\n#ifdef CLIPPLANE2\nvarying float fClipDistance2;\n#endif\n#ifdef CLIPPLANE3\nvarying float fClipDistance3;\n#endif\n#ifdef CLIPPLANE4\nvarying float fClipDistance4;\n#endif\n#ifdef CLIPPLANE5\nvarying float fClipDistance5;\n#endif\n#ifdef CLIPPLANE6\nvarying float fClipDistance6;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const clipPlaneFragmentDeclaration = { name, shader };\n//# sourceMappingURL=clipPlaneFragmentDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"clipPlaneFragment\";\nconst shader = `#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)\nif (false) {}\n#endif\n#ifdef CLIPPLANE\nelse if (fClipDistance>0.0)\n{discard;}\n#endif\n#ifdef CLIPPLANE2\nelse if (fClipDistance2>0.0)\n{discard;}\n#endif\n#ifdef CLIPPLANE3\nelse if (fClipDistance3>0.0)\n{discard;}\n#endif\n#ifdef CLIPPLANE4\nelse if (fClipDistance4>0.0)\n{discard;}\n#endif\n#ifdef CLIPPLANE5\nelse if (fClipDistance5>0.0)\n{discard;}\n#endif\n#ifdef CLIPPLANE6\nelse if (fClipDistance6>0.0)\n{discard;}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const clipPlaneFragment = { name, shader };\n//# sourceMappingURL=clipPlaneFragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"shadowMapFragment\";\nconst shader = `float depthSM=vDepthMetricSM;\n#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP==1\n#if SM_USEDISTANCE==1\ndepthSM=(length(vPositionWSM-lightDataSM)+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#else\n#ifdef USE_REVERSE_DEPTHBUFFER\ndepthSM=(-zSM+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#else\ndepthSM=(zSM+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#endif\n#endif\n#ifdef USE_REVERSE_DEPTHBUFFER\ngl_FragDepth=clamp(1.0-depthSM,0.0,1.0);\n#else\ngl_FragDepth=clamp(depthSM,0.0,1.0); \n#endif\n#elif SM_USEDISTANCE==1\ndepthSM=(length(vPositionWSM-lightDataSM)+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#endif\n#if SM_ESM==1\ndepthSM=clamp(exp(-min(87.,biasAndScaleSM.z*depthSM)),0.,1.);\n#endif\n#if SM_FLOAT==1\ngl_FragColor=vec4(depthSM,1.0,1.0,1.0);\n#else\ngl_FragColor=pack(depthSM);\n#endif\nreturn;`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const shadowMapFragment = { name, shader };\n//# sourceMappingURL=shadowMapFragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/shadowMapFragmentExtraDeclaration.js\";\nimport \"./ShadersInclude/clipPlaneFragmentDeclaration.js\";\nimport \"./ShadersInclude/clipPlaneFragment.js\";\nimport \"./ShadersInclude/shadowMapFragment.js\";\nconst name = \"shadowMapPixelShader\";\nconst shader = `#include\n#ifdef ALPHATEXTURE\nvarying vec2 vUV;uniform sampler2D diffuseSampler;\n#endif\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{\n#include\n#ifdef ALPHATEXTURE\nfloat alphaFromAlphaTexture=texture2D(diffuseSampler,vUV).a;\n#ifdef ALPHATESTVALUE\nif (alphaFromAlphaTexture=softTransparentShadowSM*alphaFromAlphaTexture) discard;\n#else\nif ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM) discard;\n#endif\n#endif\n#include\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const shadowMapPixelShader = { name, shader };\n//# sourceMappingURL=shadowMap.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"bonesDeclaration\";\nconst shader = `#if NUM_BONE_INFLUENCERS>0\nattribute vec4 matricesIndices;attribute vec4 matricesWeights;\n#if NUM_BONE_INFLUENCERS>4\nattribute vec4 matricesIndicesExtra;attribute vec4 matricesWeightsExtra;\n#endif\n#ifndef BAKED_VERTEX_ANIMATION_TEXTURE\n#ifdef BONETEXTURE\nuniform highp sampler2D boneSampler;uniform float boneTextureWidth;\n#else\nuniform mat4 mBones[BonesPerMesh];\n#ifdef BONES_VELOCITY_ENABLED\nuniform mat4 mPreviousBones[BonesPerMesh];\n#endif\n#endif\n#ifdef BONETEXTURE\n#define inline\nmat4 readMatrixFromRawSampler(sampler2D smp,float index)\n{float offset=index *4.0;float dx=1.0/boneTextureWidth;vec4 m0=texture2D(smp,vec2(dx*(offset+0.5),0.));vec4 m1=texture2D(smp,vec2(dx*(offset+1.5),0.));vec4 m2=texture2D(smp,vec2(dx*(offset+2.5),0.));vec4 m3=texture2D(smp,vec2(dx*(offset+3.5),0.));return mat4(m0,m1,m2,m3);}\n#endif\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const bonesDeclaration = { name, shader };\n//# sourceMappingURL=bonesDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"bakedVertexAnimationDeclaration\";\nconst shader = `#ifdef BAKED_VERTEX_ANIMATION_TEXTURE\nuniform float bakedVertexAnimationTime;uniform vec2 bakedVertexAnimationTextureSizeInverted;uniform vec4 bakedVertexAnimationSettings;uniform sampler2D bakedVertexAnimationTexture;\n#ifdef INSTANCES\nattribute vec4 bakedVertexAnimationSettingsInstanced;\n#endif\n#define inline\nmat4 readMatrixFromRawSamplerVAT(sampler2D smp,float index,float frame)\n{float offset=index*4.0;float frameUV=(frame+0.5)*bakedVertexAnimationTextureSizeInverted.y;float dx=bakedVertexAnimationTextureSizeInverted.x;vec4 m0=texture2D(smp,vec2(dx*(offset+0.5),frameUV));vec4 m1=texture2D(smp,vec2(dx*(offset+1.5),frameUV));vec4 m2=texture2D(smp,vec2(dx*(offset+2.5),frameUV));vec4 m3=texture2D(smp,vec2(dx*(offset+3.5),frameUV));return mat4(m0,m1,m2,m3);}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const bakedVertexAnimationDeclaration = { name, shader };\n//# sourceMappingURL=bakedVertexAnimationDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"morphTargetsVertexGlobalDeclaration\";\nconst shader = `#ifdef MORPHTARGETS\nuniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS];\n#ifdef MORPHTARGETS_TEXTURE \nuniform float morphTargetTextureIndices[NUM_MORPH_INFLUENCERS];uniform vec3 morphTargetTextureInfo;uniform highp sampler2DArray morphTargets;vec3 readVector3FromRawSampler(int targetIndex,float vertexIndex)\n{ \nfloat y=floor(vertexIndex/morphTargetTextureInfo.y);float x=vertexIndex-y*morphTargetTextureInfo.y;vec3 textureUV=vec3((x+0.5)/morphTargetTextureInfo.y,(y+0.5)/morphTargetTextureInfo.z,morphTargetTextureIndices[targetIndex]);return texture(morphTargets,textureUV).xyz;}\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const morphTargetsVertexGlobalDeclaration = { name, shader };\n//# sourceMappingURL=morphTargetsVertexGlobalDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"morphTargetsVertexDeclaration\";\nconst shader = `#ifdef MORPHTARGETS\n#ifndef MORPHTARGETS_TEXTURE\nattribute vec3 position{X};\n#ifdef MORPHTARGETS_NORMAL\nattribute vec3 normal{X};\n#endif\n#ifdef MORPHTARGETS_TANGENT\nattribute vec3 tangent{X};\n#endif\n#ifdef MORPHTARGETS_UV\nattribute vec2 uv_{X};\n#endif\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const morphTargetsVertexDeclaration = { name, shader };\n//# sourceMappingURL=morphTargetsVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"helperFunctions\";\nconst shader = `const float PI=3.1415926535897932384626433832795;const float RECIPROCAL_PI=0.3183098861837907;const float RECIPROCAL_PI2=0.15915494309189535;const float HALF_MIN=5.96046448e-08; \nconst float LinearEncodePowerApprox=2.2;const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox;const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722);const float Epsilon=0.0000001;\n#define saturate(x) clamp(x,0.0,1.0)\n#define absEps(x) abs(x)+Epsilon\n#define maxEps(x) max(x,Epsilon)\n#define saturateEps(x) clamp(x,Epsilon,1.0)\nmat3 transposeMat3(mat3 inMatrix) {vec3 i0=inMatrix[0];vec3 i1=inMatrix[1];vec3 i2=inMatrix[2];mat3 outMatrix=mat3(\nvec3(i0.x,i1.x,i2.x),\nvec3(i0.y,i1.y,i2.y),\nvec3(i0.z,i1.z,i2.z)\n);return outMatrix;}\nmat3 inverseMat3(mat3 inMatrix) {float a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2];float a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2];float a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2];float b01=a22*a11-a12*a21;float b11=-a22*a10+a12*a20;float b21=a21*a10-a11*a20;float det=a00*b01+a01*b11+a02*b21;return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11),\nb11,(a22*a00-a02*a20),(-a12*a00+a02*a10),\nb21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det;}\n#if USE_EXACT_SRGB_CONVERSIONS\nvec3 toLinearSpaceExact(vec3 color)\n{vec3 nearZeroSection=0.0773993808*color;vec3 remainingSection=pow(0.947867299*(color+vec3(0.055)),vec3(2.4));\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nreturn mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3(0.04045)));\n#else\nreturn\nvec3(\ncolor.r<=0.04045 ? nearZeroSection.r : remainingSection.r,\ncolor.g<=0.04045 ? nearZeroSection.g : remainingSection.g,\ncolor.b<=0.04045 ? nearZeroSection.b : remainingSection.b);\n#endif\n}\nvec3 toGammaSpaceExact(vec3 color)\n{vec3 nearZeroSection=12.92*color;vec3 remainingSection=1.055*pow(color,vec3(0.41666))-vec3(0.055);\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nreturn mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3(0.0031308)));\n#else\nreturn\nvec3(\ncolor.r<=0.0031308 ? nearZeroSection.r : remainingSection.r,\ncolor.g<=0.0031308 ? nearZeroSection.g : remainingSection.g,\ncolor.b<=0.0031308 ? nearZeroSection.b : remainingSection.b);\n#endif\n}\n#endif\nfloat toLinearSpace(float color)\n{\n#if USE_EXACT_SRGB_CONVERSIONS\nfloat nearZeroSection=0.0773993808*color;float remainingSection=pow(0.947867299*(color+0.055),2.4);return color<=0.04045 ? nearZeroSection : remainingSection;\n#else\nreturn pow(color,LinearEncodePowerApprox);\n#endif\n}\nvec3 toLinearSpace(vec3 color)\n{\n#if USE_EXACT_SRGB_CONVERSIONS\nreturn toLinearSpaceExact(color);\n#else\nreturn pow(color,vec3(LinearEncodePowerApprox));\n#endif\n}\nvec4 toLinearSpace(vec4 color)\n{\n#if USE_EXACT_SRGB_CONVERSIONS\nreturn vec4(toLinearSpaceExact(color.rgb),color.a);\n#else\nreturn vec4(pow(color.rgb,vec3(LinearEncodePowerApprox)),color.a);\n#endif\n}\nfloat toGammaSpace(float color)\n{\n#if USE_EXACT_SRGB_CONVERSIONS\nfloat nearZeroSection=12.92*color;float remainingSection=1.055*pow(color,0.41666)-0.055;return color<=0.0031308 ? nearZeroSection : remainingSection;\n#else\nreturn pow(color,GammaEncodePowerApprox);\n#endif\n}\nvec3 toGammaSpace(vec3 color)\n{\n#if USE_EXACT_SRGB_CONVERSIONS\nreturn toGammaSpaceExact(color);\n#else\nreturn pow(color,vec3(GammaEncodePowerApprox));\n#endif\n}\nvec4 toGammaSpace(vec4 color)\n{\n#if USE_EXACT_SRGB_CONVERSIONS\nreturn vec4(toGammaSpaceExact(color.rgb),color.a);\n#else\nreturn vec4(pow(color.rgb,vec3(GammaEncodePowerApprox)),color.a);\n#endif\n}\nfloat square(float value)\n{return value*value;}\nvec3 square(vec3 value)\n{return value*value;}\nfloat pow5(float value) {float sq=value*value;return sq*sq*value;}\nfloat getLuminance(vec3 color)\n{return clamp(dot(color,LuminanceEncodeApprox),0.,1.);}\nfloat getRand(vec2 seed) {return fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453);}\nfloat dither(vec2 seed,float varianceAmount) {float rand=getRand(seed);float normVariance=varianceAmount/255.0;float dither=mix(-normVariance,normVariance,rand);return dither;}\nconst float rgbdMaxRange=255.0;vec4 toRGBD(vec3 color) {float maxRGB=maxEps(max(color.r,max(color.g,color.b)));float D =max(rgbdMaxRange/maxRGB,1.);D =clamp(floor(D)/255.0,0.,1.);vec3 rgb=color.rgb*D;rgb=toGammaSpace(rgb);return vec4(clamp(rgb,0.,1.),D); }\nvec3 fromRGBD(vec4 rgbd) {rgbd.rgb=toLinearSpace(rgbd.rgb);return rgbd.rgb/rgbd.a;}\nvec3 parallaxCorrectNormal( vec3 vertexPos,vec3 origVec,vec3 cubeSize,vec3 cubePos ) {vec3 invOrigVec=vec3(1.0,1.0,1.0)/origVec;vec3 halfSize=cubeSize*0.5;vec3 intersecAtMaxPlane=(cubePos+halfSize-vertexPos)*invOrigVec;vec3 intersecAtMinPlane=(cubePos-halfSize-vertexPos)*invOrigVec;vec3 largestIntersec=max(intersecAtMaxPlane,intersecAtMinPlane);float distance=min(min(largestIntersec.x,largestIntersec.y),largestIntersec.z);vec3 intersectPositionWS=vertexPos+origVec*distance;return intersectPositionWS-cubePos;}\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const helperFunctions = { name, shader };\n//# sourceMappingURL=helperFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"sceneVertexDeclaration\";\nconst shader = `uniform mat4 viewProjection;\n#ifdef MULTIVIEW\nuniform mat4 viewProjectionR;\n#endif\nuniform mat4 view;uniform mat4 projection;uniform vec4 vEyePosition;\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const sceneVertexDeclaration = { name, shader };\n//# sourceMappingURL=sceneVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"meshVertexDeclaration\";\nconst shader = `uniform mat4 world;uniform float visibility;\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const meshVertexDeclaration = { name, shader };\n//# sourceMappingURL=meshVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./sceneVertexDeclaration.js\";\nimport \"./meshVertexDeclaration.js\";\nconst name = \"shadowMapVertexDeclaration\";\nconst shader = `#include\n#include\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const shadowMapVertexDeclaration = { name, shader };\n//# sourceMappingURL=shadowMapVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"sceneUboDeclaration\";\nconst shader = `layout(std140,column_major) uniform;uniform Scene {mat4 viewProjection;\n#ifdef MULTIVIEW\nmat4 viewProjectionR;\n#endif \nmat4 view;mat4 projection;vec4 vEyePosition;};\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const sceneUboDeclaration = { name, shader };\n//# sourceMappingURL=sceneUboDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"meshUboDeclaration\";\nconst shader = `#ifdef WEBGL2\nuniform mat4 world;uniform float visibility;\n#else\nlayout(std140,column_major) uniform;uniform Mesh\n{mat4 world;float visibility;};\n#endif\n#define WORLD_UBO\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const meshUboDeclaration = { name, shader };\n//# sourceMappingURL=meshUboDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./sceneUboDeclaration.js\";\nimport \"./meshUboDeclaration.js\";\nconst name = \"shadowMapUboDeclaration\";\nconst shader = `layout(std140,column_major) uniform;\n#include\n#include\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const shadowMapUboDeclaration = { name, shader };\n//# sourceMappingURL=shadowMapUboDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"shadowMapVertexExtraDeclaration\";\nconst shader = `#if SM_NORMALBIAS==1\nuniform vec3 lightDataSM;\n#endif\nuniform vec3 biasAndScaleSM;uniform vec2 depthValuesSM;varying float vDepthMetricSM;\n#if SM_USEDISTANCE==1\nvarying vec3 vPositionWSM;\n#endif\n#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP==1\nvarying float zSM;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const shadowMapVertexExtraDeclaration = { name, shader };\n//# sourceMappingURL=shadowMapVertexExtraDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"clipPlaneVertexDeclaration\";\nconst shader = `#ifdef CLIPPLANE\nuniform vec4 vClipPlane;varying float fClipDistance;\n#endif\n#ifdef CLIPPLANE2\nuniform vec4 vClipPlane2;varying float fClipDistance2;\n#endif\n#ifdef CLIPPLANE3\nuniform vec4 vClipPlane3;varying float fClipDistance3;\n#endif\n#ifdef CLIPPLANE4\nuniform vec4 vClipPlane4;varying float fClipDistance4;\n#endif\n#ifdef CLIPPLANE5\nuniform vec4 vClipPlane5;varying float fClipDistance5;\n#endif\n#ifdef CLIPPLANE6\nuniform vec4 vClipPlane6;varying float fClipDistance6;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const clipPlaneVertexDeclaration = { name, shader };\n//# sourceMappingURL=clipPlaneVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"morphTargetsVertexGlobal\";\nconst shader = `#ifdef MORPHTARGETS\n#ifdef MORPHTARGETS_TEXTURE\nfloat vertexID;\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const morphTargetsVertexGlobal = { name, shader };\n//# sourceMappingURL=morphTargetsVertexGlobal.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"morphTargetsVertex\";\nconst shader = `#ifdef MORPHTARGETS\n#ifdef MORPHTARGETS_TEXTURE \nvertexID=float(gl_VertexID)*morphTargetTextureInfo.x;positionUpdated+=(readVector3FromRawSampler({X},vertexID)-position)*morphTargetInfluences[{X}];vertexID+=1.0;\n#ifdef MORPHTARGETS_NORMAL\nnormalUpdated+=(readVector3FromRawSampler({X},vertexID) -normal)*morphTargetInfluences[{X}];vertexID+=1.0;\n#endif\n#ifdef MORPHTARGETS_UV\nuvUpdated+=(readVector3FromRawSampler({X},vertexID).xy-uv)*morphTargetInfluences[{X}];vertexID+=1.0;\n#endif\n#ifdef MORPHTARGETS_TANGENT\ntangentUpdated.xyz+=(readVector3FromRawSampler({X},vertexID) -tangent.xyz)*morphTargetInfluences[{X}];\n#endif\n#else\npositionUpdated+=(position{X}-position)*morphTargetInfluences[{X}];\n#ifdef MORPHTARGETS_NORMAL\nnormalUpdated+=(normal{X}-normal)*morphTargetInfluences[{X}];\n#endif\n#ifdef MORPHTARGETS_TANGENT\ntangentUpdated.xyz+=(tangent{X}-tangent.xyz)*morphTargetInfluences[{X}];\n#endif\n#ifdef MORPHTARGETS_UV\nuvUpdated+=(uv_{X}-uv)*morphTargetInfluences[{X}];\n#endif\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const morphTargetsVertex = { name, shader };\n//# sourceMappingURL=morphTargetsVertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"instancesVertex\";\nconst shader = `#ifdef INSTANCES\nmat4 finalWorld=mat4(world0,world1,world2,world3);\n#if defined(PREPASS_VELOCITY) || defined(VELOCITY)\nmat4 finalPreviousWorld=mat4(previousWorld0,previousWorld1,previousWorld2,previousWorld3);\n#endif\n#ifdef THIN_INSTANCES\nfinalWorld=world*finalWorld;\n#if defined(PREPASS_VELOCITY) || defined(VELOCITY)\nfinalPreviousWorld=previousWorld*finalPreviousWorld;\n#endif\n#endif\n#else\nmat4 finalWorld=world;\n#if defined(PREPASS_VELOCITY) || defined(VELOCITY)\nmat4 finalPreviousWorld=previousWorld;\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const instancesVertex = { name, shader };\n//# sourceMappingURL=instancesVertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"bonesVertex\";\nconst shader = `#ifndef BAKED_VERTEX_ANIMATION_TEXTURE\n#if NUM_BONE_INFLUENCERS>0\nmat4 influence;\n#ifdef BONETEXTURE\ninfluence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3];\n#endif\n#else\ninfluence=mBones[int(matricesIndices[0])]*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\ninfluence+=mBones[int(matricesIndices[1])]*matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\ninfluence+=mBones[int(matricesIndices[2])]*matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\ninfluence+=mBones[int(matricesIndices[3])]*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\ninfluence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\ninfluence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\ninfluence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\ninfluence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];\n#endif\n#endif\nfinalWorld=finalWorld*influence;\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const bonesVertex = { name, shader };\n//# sourceMappingURL=bonesVertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"bakedVertexAnimation\";\nconst shader = `#ifdef BAKED_VERTEX_ANIMATION_TEXTURE\n{\n#ifdef INSTANCES\n#define BVASNAME bakedVertexAnimationSettingsInstanced\n#else\n#define BVASNAME bakedVertexAnimationSettings\n#endif\nfloat VATStartFrame=BVASNAME.x;float VATEndFrame=BVASNAME.y;float VATOffsetFrame=BVASNAME.z;float VATSpeed=BVASNAME.w;float totalFrames=VATEndFrame-VATStartFrame+1.0;float time=bakedVertexAnimationTime*VATSpeed/totalFrames;float frameCorrection=time<1.0 ? 0.0 : 1.0;float numOfFrames=totalFrames-frameCorrection;float VATFrameNum=fract(time)*numOfFrames;VATFrameNum=mod(VATFrameNum+VATOffsetFrame,numOfFrames);VATFrameNum=floor(VATFrameNum);VATFrameNum+=VATStartFrame+frameCorrection;mat4 VATInfluence;VATInfluence=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[0],VATFrameNum)*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\nVATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[1],VATFrameNum)*matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\nVATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[2],VATFrameNum)*matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\nVATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[3],VATFrameNum)*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\nVATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[0],VATFrameNum)*matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\nVATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[1],VATFrameNum)*matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\nVATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[2],VATFrameNum)*matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\nVATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[3],VATFrameNum)*matricesWeightsExtra[3];\n#endif\nfinalWorld=finalWorld*VATInfluence;}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const bakedVertexAnimation = { name, shader };\n//# sourceMappingURL=bakedVertexAnimation.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"shadowMapVertexNormalBias\";\nconst shader = `#if SM_NORMALBIAS==1\n#if SM_DIRECTIONINLIGHTDATA==1\nvec3 worldLightDirSM=normalize(-lightDataSM.xyz);\n#else\nvec3 directionToLightSM=lightDataSM.xyz-worldPos.xyz;vec3 worldLightDirSM=normalize(directionToLightSM);\n#endif\nfloat ndlSM=dot(vNormalW,worldLightDirSM);float sinNLSM=sqrt(1.0-ndlSM*ndlSM);float normalBiasSM=biasAndScaleSM.y*sinNLSM;worldPos.xyz-=vNormalW*normalBiasSM;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const shadowMapVertexNormalBias = { name, shader };\n//# sourceMappingURL=shadowMapVertexNormalBias.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"shadowMapVertexMetric\";\nconst shader = `#if SM_USEDISTANCE==1\nvPositionWSM=worldPos.xyz;\n#endif\n#if SM_DEPTHTEXTURE==1\n#ifdef IS_NDC_HALF_ZRANGE\n#define BIASFACTOR 0.5\n#else\n#define BIASFACTOR 1.0\n#endif\n#ifdef USE_REVERSE_DEPTHBUFFER\ngl_Position.z-=biasAndScaleSM.x*gl_Position.w*BIASFACTOR;\n#else\ngl_Position.z+=biasAndScaleSM.x*gl_Position.w*BIASFACTOR;\n#endif\n#endif\n#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP==1\nzSM=gl_Position.z;gl_Position.z=0.0;\n#elif SM_USEDISTANCE==0\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetricSM=(-gl_Position.z+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#else\nvDepthMetricSM=(gl_Position.z+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x;\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const shadowMapVertexMetric = { name, shader };\n//# sourceMappingURL=shadowMapVertexMetric.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"clipPlaneVertex\";\nconst shader = `#ifdef CLIPPLANE\nfClipDistance=dot(worldPos,vClipPlane);\n#endif\n#ifdef CLIPPLANE2\nfClipDistance2=dot(worldPos,vClipPlane2);\n#endif\n#ifdef CLIPPLANE3\nfClipDistance3=dot(worldPos,vClipPlane3);\n#endif\n#ifdef CLIPPLANE4\nfClipDistance4=dot(worldPos,vClipPlane4);\n#endif\n#ifdef CLIPPLANE5\nfClipDistance5=dot(worldPos,vClipPlane5);\n#endif\n#ifdef CLIPPLANE6\nfClipDistance6=dot(worldPos,vClipPlane6);\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const clipPlaneVertex = { name, shader };\n//# sourceMappingURL=clipPlaneVertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/bonesDeclaration.js\";\nimport \"./ShadersInclude/bakedVertexAnimationDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexGlobalDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexDeclaration.js\";\nimport \"./ShadersInclude/helperFunctions.js\";\nimport \"./ShadersInclude/shadowMapVertexDeclaration.js\";\nimport \"./ShadersInclude/shadowMapUboDeclaration.js\";\nimport \"./ShadersInclude/shadowMapVertexExtraDeclaration.js\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexGlobal.js\";\nimport \"./ShadersInclude/morphTargetsVertex.js\";\nimport \"./ShadersInclude/instancesVertex.js\";\nimport \"./ShadersInclude/bonesVertex.js\";\nimport \"./ShadersInclude/bakedVertexAnimation.js\";\nimport \"./ShadersInclude/shadowMapVertexNormalBias.js\";\nimport \"./ShadersInclude/shadowMapVertexMetric.js\";\nimport \"./ShadersInclude/clipPlaneVertex.js\";\nconst name = \"shadowMapVertexShader\";\nconst shader = `attribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#include\n#include\n#include\n#include[0..maxSimultaneousMorphTargets]\n#ifdef INSTANCES\nattribute vec4 world0;attribute vec4 world1;attribute vec4 world2;attribute vec4 world3;\n#endif\n#include\n#include<__decl__shadowMapVertex>\n#ifdef ALPHATEXTURE\nvarying vec2 vUV;uniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\n#include\n#include\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void)\n{vec3 positionUpdated=position;\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#ifdef NORMAL\nvec3 normalUpdated=normal;\n#endif\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\n#include\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\n#ifdef NORMAL\nmat3 normWorldSM=mat3(finalWorld);\n#if defined(INSTANCES) && defined(THIN_INSTANCES)\nvec3 vNormalW=normalUpdated/vec3(dot(normWorldSM[0],normWorldSM[0]),dot(normWorldSM[1],normWorldSM[1]),dot(normWorldSM[2],normWorldSM[2]));vNormalW=normalize(normWorldSM*vNormalW);\n#else\n#ifdef NONUNIFORMSCALING\nnormWorldSM=transposeMat3(inverseMat3(normWorldSM));\n#endif\nvec3 vNormalW=normalize(normWorldSM*normalUpdated);\n#endif\n#endif\n#include\ngl_Position=viewProjection*worldPos;\n#include\n#ifdef ALPHATEXTURE\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#include\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const shadowMapVertexShader = { name, shader };\n//# sourceMappingURL=shadowMap.vertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nconst name = \"depthBoxBlurPixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;uniform vec2 screenSize;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{vec4 colorDepth=vec4(0.0);for (int x=-OFFSET; x<=OFFSET; x++)\nfor (int y=-OFFSET; y<=OFFSET; y++)\ncolorDepth+=texture2D(textureSampler,vUV+vec2(x,y)/screenSize);gl_FragColor=(colorDepth/float((OFFSET*2+1)*(OFFSET*2+1)));}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const depthBoxBlurPixelShader = { name, shader };\n//# sourceMappingURL=depthBoxBlur.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"shadowMapFragmentSoftTransparentShadow\";\nconst shader = `#if SM_SOFTTRANSPARENTSHADOW==1\nif ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM*alpha) discard;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const shadowMapFragmentSoftTransparentShadow = { name, shader };\n//# sourceMappingURL=shadowMapFragmentSoftTransparentShadow.js.map","import { Matrix, Vector3, Vector2 } from \"../../Maths/math.vector.js\";\nimport { Color4 } from \"../../Maths/math.color.js\";\nimport { VertexBuffer } from \"../../Buffers/buffer.js\";\nimport { Light } from \"../../Lights/light.js\";\nimport { MaterialHelper } from \"../../Materials/materialHelper.js\";\nimport { Texture } from \"../../Materials/Textures/texture.js\";\nimport { RenderTargetTexture } from \"../../Materials/Textures/renderTargetTexture.js\";\nimport { PostProcess } from \"../../PostProcesses/postProcess.js\";\nimport { BlurPostProcess } from \"../../PostProcesses/blurPostProcess.js\";\n\nimport { Observable } from \"../../Misc/observable.js\";\nimport { _WarnImport } from \"../../Misc/devTools.js\";\nimport { EffectFallbacks } from \"../../Materials/effectFallbacks.js\";\nimport { RenderingManager } from \"../../Rendering/renderingManager.js\";\nimport { DrawWrapper } from \"../../Materials/drawWrapper.js\";\nimport \"../../Shaders/shadowMap.fragment.js\";\nimport \"../../Shaders/shadowMap.vertex.js\";\nimport \"../../Shaders/depthBoxBlur.fragment.js\";\nimport \"../../Shaders/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js\";\nimport { addClipPlaneUniforms, bindClipPlane, prepareStringDefinesForClipPlanes } from \"../../Materials/clipPlaneMaterialHelper.js\";\n/**\n * Default implementation IShadowGenerator.\n * This is the main object responsible of generating shadows in the framework.\n * Documentation: https://doc.babylonjs.com/features/featuresDeepDive/lights/shadows\n */\nexport class ShadowGenerator {\n /**\n * Gets the bias: offset applied on the depth preventing acnea (in light direction).\n */\n get bias() {\n return this._bias;\n }\n /**\n * Sets the bias: offset applied on the depth preventing acnea (in light direction).\n */\n set bias(bias) {\n this._bias = bias;\n }\n /**\n * Gets the normalBias: offset applied on the depth preventing acnea (along side the normal direction and proportional to the light/normal angle).\n */\n get normalBias() {\n return this._normalBias;\n }\n /**\n * Sets the normalBias: offset applied on the depth preventing acnea (along side the normal direction and proportional to the light/normal angle).\n */\n set normalBias(normalBias) {\n this._normalBias = normalBias;\n }\n /**\n * Gets the blur box offset: offset applied during the blur pass.\n * Only useful if useKernelBlur = false\n */\n get blurBoxOffset() {\n return this._blurBoxOffset;\n }\n /**\n * Sets the blur box offset: offset applied during the blur pass.\n * Only useful if useKernelBlur = false\n */\n set blurBoxOffset(value) {\n if (this._blurBoxOffset === value) {\n return;\n }\n this._blurBoxOffset = value;\n this._disposeBlurPostProcesses();\n }\n /**\n * Gets the blur scale: scale of the blurred texture compared to the main shadow map.\n * 2 means half of the size.\n */\n get blurScale() {\n return this._blurScale;\n }\n /**\n * Sets the blur scale: scale of the blurred texture compared to the main shadow map.\n * 2 means half of the size.\n */\n set blurScale(value) {\n if (this._blurScale === value) {\n return;\n }\n this._blurScale = value;\n this._disposeBlurPostProcesses();\n }\n /**\n * Gets the blur kernel: kernel size of the blur pass.\n * Only useful if useKernelBlur = true\n */\n get blurKernel() {\n return this._blurKernel;\n }\n /**\n * Sets the blur kernel: kernel size of the blur pass.\n * Only useful if useKernelBlur = true\n */\n set blurKernel(value) {\n if (this._blurKernel === value) {\n return;\n }\n this._blurKernel = value;\n this._disposeBlurPostProcesses();\n }\n /**\n * Gets whether the blur pass is a kernel blur (if true) or box blur.\n * Only useful in filtered mode (useBlurExponentialShadowMap...)\n */\n get useKernelBlur() {\n return this._useKernelBlur;\n }\n /**\n * Sets whether the blur pass is a kernel blur (if true) or box blur.\n * Only useful in filtered mode (useBlurExponentialShadowMap...)\n */\n set useKernelBlur(value) {\n if (this._useKernelBlur === value) {\n return;\n }\n this._useKernelBlur = value;\n this._disposeBlurPostProcesses();\n }\n /**\n * Gets the depth scale used in ESM mode.\n */\n get depthScale() {\n return this._depthScale !== undefined ? this._depthScale : this._light.getDepthScale();\n }\n /**\n * Sets the depth scale used in ESM mode.\n * This can override the scale stored on the light.\n */\n set depthScale(value) {\n this._depthScale = value;\n }\n _validateFilter(filter) {\n return filter;\n }\n /**\n * Gets the current mode of the shadow generator (normal, PCF, ESM...).\n * The returned value is a number equal to one of the available mode defined in ShadowMap.FILTER_x like _FILTER_NONE\n */\n get filter() {\n return this._filter;\n }\n /**\n * Sets the current mode of the shadow generator (normal, PCF, ESM...).\n * The returned value is a number equal to one of the available mode defined in ShadowMap.FILTER_x like _FILTER_NONE\n */\n set filter(value) {\n value = this._validateFilter(value);\n // Blurring the cubemap is going to be too expensive. Reverting to unblurred version\n if (this._light.needCube()) {\n if (value === ShadowGenerator.FILTER_BLUREXPONENTIALSHADOWMAP) {\n this.useExponentialShadowMap = true;\n return;\n }\n else if (value === ShadowGenerator.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP) {\n this.useCloseExponentialShadowMap = true;\n return;\n }\n // PCF on cubemap would also be expensive\n else if (value === ShadowGenerator.FILTER_PCF || value === ShadowGenerator.FILTER_PCSS) {\n this.usePoissonSampling = true;\n return;\n }\n }\n // Weblg1 fallback for PCF.\n if (value === ShadowGenerator.FILTER_PCF || value === ShadowGenerator.FILTER_PCSS) {\n if (!this._scene.getEngine()._features.supportShadowSamplers) {\n this.usePoissonSampling = true;\n return;\n }\n }\n if (this._filter === value) {\n return;\n }\n this._filter = value;\n this._disposeBlurPostProcesses();\n this._applyFilterValues();\n this._light._markMeshesAsLightDirty();\n }\n /**\n * Gets if the current filter is set to Poisson Sampling.\n */\n get usePoissonSampling() {\n return this.filter === ShadowGenerator.FILTER_POISSONSAMPLING;\n }\n /**\n * Sets the current filter to Poisson Sampling.\n */\n set usePoissonSampling(value) {\n const filter = this._validateFilter(ShadowGenerator.FILTER_POISSONSAMPLING);\n if (!value && this.filter !== ShadowGenerator.FILTER_POISSONSAMPLING) {\n return;\n }\n this.filter = value ? filter : ShadowGenerator.FILTER_NONE;\n }\n /**\n * Gets if the current filter is set to ESM.\n */\n get useExponentialShadowMap() {\n return this.filter === ShadowGenerator.FILTER_EXPONENTIALSHADOWMAP;\n }\n /**\n * Sets the current filter is to ESM.\n */\n set useExponentialShadowMap(value) {\n const filter = this._validateFilter(ShadowGenerator.FILTER_EXPONENTIALSHADOWMAP);\n if (!value && this.filter !== ShadowGenerator.FILTER_EXPONENTIALSHADOWMAP) {\n return;\n }\n this.filter = value ? filter : ShadowGenerator.FILTER_NONE;\n }\n /**\n * Gets if the current filter is set to filtered ESM.\n */\n get useBlurExponentialShadowMap() {\n return this.filter === ShadowGenerator.FILTER_BLUREXPONENTIALSHADOWMAP;\n }\n /**\n * Gets if the current filter is set to filtered ESM.\n */\n set useBlurExponentialShadowMap(value) {\n const filter = this._validateFilter(ShadowGenerator.FILTER_BLUREXPONENTIALSHADOWMAP);\n if (!value && this.filter !== ShadowGenerator.FILTER_BLUREXPONENTIALSHADOWMAP) {\n return;\n }\n this.filter = value ? filter : ShadowGenerator.FILTER_NONE;\n }\n /**\n * Gets if the current filter is set to \"close ESM\" (using the inverse of the\n * exponential to prevent steep falloff artifacts).\n */\n get useCloseExponentialShadowMap() {\n return this.filter === ShadowGenerator.FILTER_CLOSEEXPONENTIALSHADOWMAP;\n }\n /**\n * Sets the current filter to \"close ESM\" (using the inverse of the\n * exponential to prevent steep falloff artifacts).\n */\n set useCloseExponentialShadowMap(value) {\n const filter = this._validateFilter(ShadowGenerator.FILTER_CLOSEEXPONENTIALSHADOWMAP);\n if (!value && this.filter !== ShadowGenerator.FILTER_CLOSEEXPONENTIALSHADOWMAP) {\n return;\n }\n this.filter = value ? filter : ShadowGenerator.FILTER_NONE;\n }\n /**\n * Gets if the current filter is set to filtered \"close ESM\" (using the inverse of the\n * exponential to prevent steep falloff artifacts).\n */\n get useBlurCloseExponentialShadowMap() {\n return this.filter === ShadowGenerator.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP;\n }\n /**\n * Sets the current filter to filtered \"close ESM\" (using the inverse of the\n * exponential to prevent steep falloff artifacts).\n */\n set useBlurCloseExponentialShadowMap(value) {\n const filter = this._validateFilter(ShadowGenerator.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP);\n if (!value && this.filter !== ShadowGenerator.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP) {\n return;\n }\n this.filter = value ? filter : ShadowGenerator.FILTER_NONE;\n }\n /**\n * Gets if the current filter is set to \"PCF\" (percentage closer filtering).\n */\n get usePercentageCloserFiltering() {\n return this.filter === ShadowGenerator.FILTER_PCF;\n }\n /**\n * Sets the current filter to \"PCF\" (percentage closer filtering).\n */\n set usePercentageCloserFiltering(value) {\n const filter = this._validateFilter(ShadowGenerator.FILTER_PCF);\n if (!value && this.filter !== ShadowGenerator.FILTER_PCF) {\n return;\n }\n this.filter = value ? filter : ShadowGenerator.FILTER_NONE;\n }\n /**\n * Gets the PCF or PCSS Quality.\n * Only valid if usePercentageCloserFiltering or usePercentageCloserFiltering is true.\n */\n get filteringQuality() {\n return this._filteringQuality;\n }\n /**\n * Sets the PCF or PCSS Quality.\n * Only valid if usePercentageCloserFiltering or usePercentageCloserFiltering is true.\n */\n set filteringQuality(filteringQuality) {\n if (this._filteringQuality === filteringQuality) {\n return;\n }\n this._filteringQuality = filteringQuality;\n this._disposeBlurPostProcesses();\n this._applyFilterValues();\n this._light._markMeshesAsLightDirty();\n }\n /**\n * Gets if the current filter is set to \"PCSS\" (contact hardening).\n */\n get useContactHardeningShadow() {\n return this.filter === ShadowGenerator.FILTER_PCSS;\n }\n /**\n * Sets the current filter to \"PCSS\" (contact hardening).\n */\n set useContactHardeningShadow(value) {\n const filter = this._validateFilter(ShadowGenerator.FILTER_PCSS);\n if (!value && this.filter !== ShadowGenerator.FILTER_PCSS) {\n return;\n }\n this.filter = value ? filter : ShadowGenerator.FILTER_NONE;\n }\n /**\n * Gets the Light Size (in shadow map uv unit) used in PCSS to determine the blocker search area and the penumbra size.\n * Using a ratio helps keeping shape stability independently of the map size.\n *\n * It does not account for the light projection as it was having too much\n * instability during the light setup or during light position changes.\n *\n * Only valid if useContactHardeningShadow is true.\n */\n get contactHardeningLightSizeUVRatio() {\n return this._contactHardeningLightSizeUVRatio;\n }\n /**\n * Sets the Light Size (in shadow map uv unit) used in PCSS to determine the blocker search area and the penumbra size.\n * Using a ratio helps keeping shape stability independently of the map size.\n *\n * It does not account for the light projection as it was having too much\n * instability during the light setup or during light position changes.\n *\n * Only valid if useContactHardeningShadow is true.\n */\n set contactHardeningLightSizeUVRatio(contactHardeningLightSizeUVRatio) {\n this._contactHardeningLightSizeUVRatio = contactHardeningLightSizeUVRatio;\n }\n /** Gets or sets the actual darkness of a shadow */\n get darkness() {\n return this._darkness;\n }\n set darkness(value) {\n this.setDarkness(value);\n }\n /**\n * Returns the darkness value (float). This can only decrease the actual darkness of a shadow.\n * 0 means strongest and 1 would means no shadow.\n * @returns the darkness.\n */\n getDarkness() {\n return this._darkness;\n }\n /**\n * Sets the darkness value (float). This can only decrease the actual darkness of a shadow.\n * @param darkness The darkness value 0 means strongest and 1 would means no shadow.\n * @returns the shadow generator allowing fluent coding.\n */\n setDarkness(darkness) {\n if (darkness >= 1.0) {\n this._darkness = 1.0;\n }\n else if (darkness <= 0.0) {\n this._darkness = 0.0;\n }\n else {\n this._darkness = darkness;\n }\n return this;\n }\n /** Gets or sets the ability to have transparent shadow */\n get transparencyShadow() {\n return this._transparencyShadow;\n }\n set transparencyShadow(value) {\n this.setTransparencyShadow(value);\n }\n /**\n * Sets the ability to have transparent shadow (boolean).\n * @param transparent True if transparent else False\n * @returns the shadow generator allowing fluent coding\n */\n setTransparencyShadow(transparent) {\n this._transparencyShadow = transparent;\n return this;\n }\n /**\n * Gets the main RTT containing the shadow map (usually storing depth from the light point of view).\n * @returns The render target texture if present otherwise, null\n */\n getShadowMap() {\n return this._shadowMap;\n }\n /**\n * Gets the RTT used during rendering (can be a blurred version of the shadow map or the shadow map itself).\n * @returns The render target texture if the shadow map is present otherwise, null\n */\n getShadowMapForRendering() {\n if (this._shadowMap2) {\n return this._shadowMap2;\n }\n return this._shadowMap;\n }\n /**\n * Gets the class name of that object\n * @returns \"ShadowGenerator\"\n */\n getClassName() {\n return ShadowGenerator.CLASSNAME;\n }\n /**\n * Helper function to add a mesh and its descendants to the list of shadow casters.\n * @param mesh Mesh to add\n * @param includeDescendants boolean indicating if the descendants should be added. Default to true\n * @returns the Shadow Generator itself\n */\n addShadowCaster(mesh, includeDescendants = true) {\n if (!this._shadowMap) {\n return this;\n }\n if (!this._shadowMap.renderList) {\n this._shadowMap.renderList = [];\n }\n if (this._shadowMap.renderList.indexOf(mesh) === -1) {\n this._shadowMap.renderList.push(mesh);\n }\n if (includeDescendants) {\n for (const childMesh of mesh.getChildMeshes()) {\n if (this._shadowMap.renderList.indexOf(childMesh) === -1) {\n this._shadowMap.renderList.push(childMesh);\n }\n }\n }\n return this;\n }\n /**\n * Helper function to remove a mesh and its descendants from the list of shadow casters\n * @param mesh Mesh to remove\n * @param includeDescendants boolean indicating if the descendants should be removed. Default to true\n * @returns the Shadow Generator itself\n */\n removeShadowCaster(mesh, includeDescendants = true) {\n if (!this._shadowMap || !this._shadowMap.renderList) {\n return this;\n }\n const index = this._shadowMap.renderList.indexOf(mesh);\n if (index !== -1) {\n this._shadowMap.renderList.splice(index, 1);\n }\n if (includeDescendants) {\n for (const child of mesh.getChildren()) {\n this.removeShadowCaster(child);\n }\n }\n return this;\n }\n /**\n * Returns the associated light object.\n * @returns the light generating the shadow\n */\n getLight() {\n return this._light;\n }\n _getCamera() {\n var _a;\n return (_a = this._camera) !== null && _a !== void 0 ? _a : this._scene.activeCamera;\n }\n /**\n * Gets or sets the size of the texture what stores the shadows\n */\n get mapSize() {\n return this._mapSize;\n }\n set mapSize(size) {\n this._mapSize = size;\n this._light._markMeshesAsLightDirty();\n this.recreateShadowMap();\n }\n /**\n * Creates a ShadowGenerator object.\n * A ShadowGenerator is the required tool to use the shadows.\n * Each light casting shadows needs to use its own ShadowGenerator.\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/shadows\n * @param mapSize The size of the texture what stores the shadows. Example : 1024.\n * @param light The light object generating the shadows.\n * @param usefullFloatFirst By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.\n * @param camera Camera associated with this shadow generator (default: null). If null, takes the scene active camera at the time we need to access it\n * @param useRedTextureType Forces the generator to use a Red instead of a RGBA type for the shadow map texture format (default: false)\n */\n constructor(mapSize, light, usefullFloatFirst, camera, useRedTextureType) {\n /**\n * Observable triggered before the shadow is rendered. Can be used to update internal effect state\n */\n this.onBeforeShadowMapRenderObservable = new Observable();\n /**\n * Observable triggered after the shadow is rendered. Can be used to restore internal effect state\n */\n this.onAfterShadowMapRenderObservable = new Observable();\n /**\n * Observable triggered before a mesh is rendered in the shadow map.\n * Can be used to update internal effect state (that you can get from the onBeforeShadowMapRenderObservable)\n */\n this.onBeforeShadowMapRenderMeshObservable = new Observable();\n /**\n * Observable triggered after a mesh is rendered in the shadow map.\n * Can be used to update internal effect state (that you can get from the onAfterShadowMapRenderObservable)\n */\n this.onAfterShadowMapRenderMeshObservable = new Observable();\n this._bias = 0.00005;\n this._normalBias = 0;\n this._blurBoxOffset = 1;\n this._blurScale = 2;\n this._blurKernel = 1;\n this._useKernelBlur = false;\n this._filter = ShadowGenerator.FILTER_NONE;\n this._filteringQuality = ShadowGenerator.QUALITY_HIGH;\n this._contactHardeningLightSizeUVRatio = 0.1;\n this._darkness = 0;\n this._transparencyShadow = false;\n /**\n * Enables or disables shadows with varying strength based on the transparency\n * When it is enabled, the strength of the shadow is taken equal to mesh.visibility\n * If you enabled an alpha texture on your material, the alpha value red from the texture is also combined to compute the strength:\n * mesh.visibility * alphaTexture.a\n * The texture used is the diffuse by default, but it can be set to the opacity by setting useOpacityTextureForTransparentShadow\n * Note that by definition transparencyShadow must be set to true for enableSoftTransparentShadow to work!\n */\n this.enableSoftTransparentShadow = false;\n /**\n * If this is true, use the opacity texture's alpha channel for transparent shadows instead of the diffuse one\n */\n this.useOpacityTextureForTransparentShadow = false;\n /**\n * Controls the extent to which the shadows fade out at the edge of the frustum\n */\n this.frustumEdgeFalloff = 0;\n /**\n * If true the shadow map is generated by rendering the back face of the mesh instead of the front face.\n * This can help with self-shadowing as the geometry making up the back of objects is slightly offset.\n * It might on the other hand introduce peter panning.\n */\n this.forceBackFacesOnly = false;\n this._lightDirection = Vector3.Zero();\n this._viewMatrix = Matrix.Zero();\n this._projectionMatrix = Matrix.Zero();\n this._transformMatrix = Matrix.Zero();\n this._cachedPosition = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n this._cachedDirection = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n this._currentFaceIndex = 0;\n this._currentFaceIndexCache = 0;\n this._defaultTextureMatrix = Matrix.Identity();\n this._mapSize = mapSize;\n this._light = light;\n this._scene = light.getScene();\n this._camera = camera !== null && camera !== void 0 ? camera : null;\n this._useRedTextureType = !!useRedTextureType;\n let shadowGenerators = light._shadowGenerators;\n if (!shadowGenerators) {\n shadowGenerators = light._shadowGenerators = new Map();\n }\n shadowGenerators.set(this._camera, this);\n this.id = light.id;\n this._useUBO = this._scene.getEngine().supportsUniformBuffers;\n if (this._useUBO) {\n this._sceneUBOs = [];\n this._sceneUBOs.push(this._scene.createSceneUniformBuffer(`Scene for Shadow Generator (light \"${this._light.name}\")`));\n }\n ShadowGenerator._SceneComponentInitialization(this._scene);\n // Texture type fallback from float to int if not supported.\n const caps = this._scene.getEngine().getCaps();\n if (!usefullFloatFirst) {\n if (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering) {\n this._textureType = 2;\n }\n else if (caps.textureFloatRender && caps.textureFloatLinearFiltering) {\n this._textureType = 1;\n }\n else {\n this._textureType = 0;\n }\n }\n else {\n if (caps.textureFloatRender && caps.textureFloatLinearFiltering) {\n this._textureType = 1;\n }\n else if (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering) {\n this._textureType = 2;\n }\n else {\n this._textureType = 0;\n }\n }\n this._initializeGenerator();\n this._applyFilterValues();\n }\n _initializeGenerator() {\n this._light._markMeshesAsLightDirty();\n this._initializeShadowMap();\n }\n _createTargetRenderTexture() {\n const engine = this._scene.getEngine();\n if (engine._features.supportDepthStencilTexture) {\n this._shadowMap = new RenderTargetTexture(this._light.name + \"_shadowMap\", this._mapSize, this._scene, false, true, this._textureType, this._light.needCube(), undefined, false, false, undefined, this._useRedTextureType ? 6 : 5);\n this._shadowMap.createDepthStencilTexture(engine.useReverseDepthBuffer ? 516 : 513, true);\n }\n else {\n this._shadowMap = new RenderTargetTexture(this._light.name + \"_shadowMap\", this._mapSize, this._scene, false, true, this._textureType, this._light.needCube());\n }\n this._shadowMap.noPrePassRenderer = true;\n }\n _initializeShadowMap() {\n this._createTargetRenderTexture();\n if (this._shadowMap === null) {\n return;\n }\n this._shadowMap.wrapU = Texture.CLAMP_ADDRESSMODE;\n this._shadowMap.wrapV = Texture.CLAMP_ADDRESSMODE;\n this._shadowMap.anisotropicFilteringLevel = 1;\n this._shadowMap.updateSamplingMode(Texture.BILINEAR_SAMPLINGMODE);\n this._shadowMap.renderParticles = false;\n this._shadowMap.ignoreCameraViewport = true;\n if (this._storedUniqueId) {\n this._shadowMap.uniqueId = this._storedUniqueId;\n }\n // Custom render function.\n this._shadowMap.customRenderFunction = (opaqueSubMeshes, alphaTestSubMeshes, transparentSubMeshes, depthOnlySubMeshes) => this._renderForShadowMap(opaqueSubMeshes, alphaTestSubMeshes, transparentSubMeshes, depthOnlySubMeshes);\n // Force the mesh is ready function to true as we are double checking it\n // in the custom render function. Also it prevents side effects and useless\n // shader variations in DEPTHPREPASS mode.\n this._shadowMap.customIsReadyFunction = () => {\n return true;\n };\n const engine = this._scene.getEngine();\n this._shadowMap.onBeforeBindObservable.add(() => {\n var _a;\n this._currentSceneUBO = this._scene.getSceneUniformBuffer();\n (_a = engine._debugPushGroup) === null || _a === void 0 ? void 0 : _a.call(engine, `shadow map generation for pass id ${engine.currentRenderPassId}`, 1);\n });\n // Record Face Index before render.\n this._shadowMap.onBeforeRenderObservable.add((faceIndex) => {\n if (this._sceneUBOs) {\n this._scene.setSceneUniformBuffer(this._sceneUBOs[0]);\n }\n this._currentFaceIndex = faceIndex;\n if (this._filter === ShadowGenerator.FILTER_PCF) {\n engine.setColorWrite(false);\n }\n this.getTransformMatrix(); // generate the view/projection matrix\n this._scene.setTransformMatrix(this._viewMatrix, this._projectionMatrix);\n if (this._useUBO) {\n this._scene.getSceneUniformBuffer().unbindEffect();\n this._scene.finalizeSceneUbo();\n }\n });\n // Blur if required after render.\n this._shadowMap.onAfterUnbindObservable.add(() => {\n var _a, _b;\n if (this._sceneUBOs) {\n this._scene.setSceneUniformBuffer(this._currentSceneUBO);\n }\n this._scene.updateTransformMatrix(); // restore the view/projection matrices of the active camera\n if (this._filter === ShadowGenerator.FILTER_PCF) {\n engine.setColorWrite(true);\n }\n if (!this.useBlurExponentialShadowMap && !this.useBlurCloseExponentialShadowMap) {\n (_a = engine._debugPopGroup) === null || _a === void 0 ? void 0 : _a.call(engine, 1);\n return;\n }\n const shadowMap = this.getShadowMapForRendering();\n if (shadowMap) {\n this._scene.postProcessManager.directRender(this._blurPostProcesses, shadowMap.renderTarget, true);\n engine.unBindFramebuffer(shadowMap.renderTarget, true);\n (_b = engine._debugPopGroup) === null || _b === void 0 ? void 0 : _b.call(engine, 1);\n }\n });\n // Clear according to the chosen filter.\n const clearZero = new Color4(0, 0, 0, 0);\n const clearOne = new Color4(1.0, 1.0, 1.0, 1.0);\n this._shadowMap.onClearObservable.add((engine) => {\n if (this._filter === ShadowGenerator.FILTER_PCF) {\n engine.clear(clearOne, false, true, false);\n }\n else if (this.useExponentialShadowMap || this.useBlurExponentialShadowMap) {\n engine.clear(clearZero, true, true, false);\n }\n else {\n engine.clear(clearOne, true, true, false);\n }\n });\n // Recreate on resize.\n this._shadowMap.onResizeObservable.add((rtt) => {\n this._storedUniqueId = this._shadowMap.uniqueId;\n this._mapSize = rtt.getRenderSize();\n this._light._markMeshesAsLightDirty();\n this.recreateShadowMap();\n });\n // Ensures rendering groupids do not erase the depth buffer\n // or we would lose the shadows information.\n for (let i = RenderingManager.MIN_RENDERINGGROUPS; i < RenderingManager.MAX_RENDERINGGROUPS; i++) {\n this._shadowMap.setRenderingAutoClearDepthStencil(i, false);\n }\n }\n _initializeBlurRTTAndPostProcesses() {\n const engine = this._scene.getEngine();\n const targetSize = this._mapSize / this.blurScale;\n if (!this.useKernelBlur || this.blurScale !== 1.0) {\n this._shadowMap2 = new RenderTargetTexture(this._light.name + \"_shadowMap2\", targetSize, this._scene, false, true, this._textureType, undefined, undefined, false);\n this._shadowMap2.wrapU = Texture.CLAMP_ADDRESSMODE;\n this._shadowMap2.wrapV = Texture.CLAMP_ADDRESSMODE;\n this._shadowMap2.updateSamplingMode(Texture.BILINEAR_SAMPLINGMODE);\n }\n if (this.useKernelBlur) {\n this._kernelBlurXPostprocess = new BlurPostProcess(this._light.name + \"KernelBlurX\", new Vector2(1, 0), this.blurKernel, 1.0, null, Texture.BILINEAR_SAMPLINGMODE, engine, false, this._textureType);\n this._kernelBlurXPostprocess.width = targetSize;\n this._kernelBlurXPostprocess.height = targetSize;\n this._kernelBlurXPostprocess.externalTextureSamplerBinding = true;\n this._kernelBlurXPostprocess.onApplyObservable.add((effect) => {\n effect.setTexture(\"textureSampler\", this._shadowMap);\n });\n this._kernelBlurYPostprocess = new BlurPostProcess(this._light.name + \"KernelBlurY\", new Vector2(0, 1), this.blurKernel, 1.0, null, Texture.BILINEAR_SAMPLINGMODE, engine, false, this._textureType);\n this._kernelBlurXPostprocess.autoClear = false;\n this._kernelBlurYPostprocess.autoClear = false;\n if (this._textureType === 0) {\n this._kernelBlurXPostprocess.packedFloat = true;\n this._kernelBlurYPostprocess.packedFloat = true;\n }\n this._blurPostProcesses = [this._kernelBlurXPostprocess, this._kernelBlurYPostprocess];\n }\n else {\n this._boxBlurPostprocess = new PostProcess(this._light.name + \"DepthBoxBlur\", \"depthBoxBlur\", [\"screenSize\", \"boxOffset\"], [], 1.0, null, Texture.BILINEAR_SAMPLINGMODE, engine, false, \"#define OFFSET \" + this._blurBoxOffset, this._textureType);\n this._boxBlurPostprocess.externalTextureSamplerBinding = true;\n this._boxBlurPostprocess.onApplyObservable.add((effect) => {\n effect.setFloat2(\"screenSize\", targetSize, targetSize);\n effect.setTexture(\"textureSampler\", this._shadowMap);\n });\n this._boxBlurPostprocess.autoClear = false;\n this._blurPostProcesses = [this._boxBlurPostprocess];\n }\n }\n _renderForShadowMap(opaqueSubMeshes, alphaTestSubMeshes, transparentSubMeshes, depthOnlySubMeshes) {\n let index;\n if (depthOnlySubMeshes.length) {\n for (index = 0; index < depthOnlySubMeshes.length; index++) {\n this._renderSubMeshForShadowMap(depthOnlySubMeshes.data[index]);\n }\n }\n for (index = 0; index < opaqueSubMeshes.length; index++) {\n this._renderSubMeshForShadowMap(opaqueSubMeshes.data[index]);\n }\n for (index = 0; index < alphaTestSubMeshes.length; index++) {\n this._renderSubMeshForShadowMap(alphaTestSubMeshes.data[index]);\n }\n if (this._transparencyShadow) {\n for (index = 0; index < transparentSubMeshes.length; index++) {\n this._renderSubMeshForShadowMap(transparentSubMeshes.data[index], true);\n }\n }\n else {\n for (index = 0; index < transparentSubMeshes.length; index++) {\n transparentSubMeshes.data[index].getEffectiveMesh()._internalAbstractMeshDataInfo._isActiveIntermediate = false;\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _bindCustomEffectForRenderSubMeshForShadowMap(subMesh, effect, mesh) {\n effect.setMatrix(\"viewProjection\", this.getTransformMatrix());\n }\n _renderSubMeshForShadowMap(subMesh, isTransparent = false) {\n var _a, _b;\n const renderingMesh = subMesh.getRenderingMesh();\n const effectiveMesh = subMesh.getEffectiveMesh();\n const scene = this._scene;\n const engine = scene.getEngine();\n const material = subMesh.getMaterial();\n effectiveMesh._internalAbstractMeshDataInfo._isActiveIntermediate = false;\n if (!material || subMesh.verticesCount === 0 || subMesh._renderId === scene.getRenderId()) {\n return;\n }\n // Culling\n const detNeg = effectiveMesh._getWorldMatrixDeterminant() < 0;\n let sideOrientation = (_a = renderingMesh.overrideMaterialSideOrientation) !== null && _a !== void 0 ? _a : material.sideOrientation;\n if (detNeg) {\n sideOrientation =\n sideOrientation === 0 ? 1 : 0;\n }\n const reverseSideOrientation = sideOrientation === 0;\n engine.setState(material.backFaceCulling, undefined, undefined, reverseSideOrientation, material.cullBackFaces);\n // Managing instances\n const batch = renderingMesh._getInstancesRenderList(subMesh._id, !!subMesh.getReplacementMesh());\n if (batch.mustReturn) {\n return;\n }\n const hardwareInstancedRendering = engine.getCaps().instancedArrays &&\n ((batch.visibleInstances[subMesh._id] !== null && batch.visibleInstances[subMesh._id] !== undefined) || renderingMesh.hasThinInstances);\n if (this.customAllowRendering && !this.customAllowRendering(subMesh)) {\n return;\n }\n if (this.isReady(subMesh, hardwareInstancedRendering, isTransparent)) {\n subMesh._renderId = scene.getRenderId();\n const shadowDepthWrapper = material.shadowDepthWrapper;\n const drawWrapper = (_b = shadowDepthWrapper === null || shadowDepthWrapper === void 0 ? void 0 : shadowDepthWrapper.getEffect(subMesh, this, engine.currentRenderPassId)) !== null && _b !== void 0 ? _b : subMesh._getDrawWrapper();\n const effect = DrawWrapper.GetEffect(drawWrapper);\n engine.enableEffect(drawWrapper);\n if (!hardwareInstancedRendering) {\n renderingMesh._bind(subMesh, effect, material.fillMode);\n }\n this.getTransformMatrix(); // make sure _cachedDirection et _cachedPosition are up to date\n effect.setFloat3(\"biasAndScaleSM\", this.bias, this.normalBias, this.depthScale);\n if (this.getLight().getTypeID() === Light.LIGHTTYPEID_DIRECTIONALLIGHT) {\n effect.setVector3(\"lightDataSM\", this._cachedDirection);\n }\n else {\n effect.setVector3(\"lightDataSM\", this._cachedPosition);\n }\n const camera = this._getCamera();\n if (camera) {\n effect.setFloat2(\"depthValuesSM\", this.getLight().getDepthMinZ(camera), this.getLight().getDepthMinZ(camera) + this.getLight().getDepthMaxZ(camera));\n }\n if (isTransparent && this.enableSoftTransparentShadow) {\n effect.setFloat(\"softTransparentShadowSM\", effectiveMesh.visibility * material.alpha);\n }\n if (shadowDepthWrapper) {\n subMesh._setMainDrawWrapperOverride(drawWrapper);\n if (shadowDepthWrapper.standalone) {\n shadowDepthWrapper.baseMaterial.bindForSubMesh(effectiveMesh.getWorldMatrix(), renderingMesh, subMesh);\n }\n else {\n material.bindForSubMesh(effectiveMesh.getWorldMatrix(), renderingMesh, subMesh);\n }\n subMesh._setMainDrawWrapperOverride(null);\n }\n else {\n // Alpha test\n if (this._opacityTexture) {\n effect.setTexture(\"diffuseSampler\", this._opacityTexture);\n effect.setMatrix(\"diffuseMatrix\", this._opacityTexture.getTextureMatrix() || this._defaultTextureMatrix);\n }\n // Bones\n if (renderingMesh.useBones && renderingMesh.computeBonesUsingShaders && renderingMesh.skeleton) {\n const skeleton = renderingMesh.skeleton;\n if (skeleton.isUsingTextureForMatrices) {\n const boneTexture = skeleton.getTransformMatrixTexture(renderingMesh);\n if (!boneTexture) {\n return;\n }\n effect.setTexture(\"boneSampler\", boneTexture);\n effect.setFloat(\"boneTextureWidth\", 4.0 * (skeleton.bones.length + 1));\n }\n else {\n effect.setMatrices(\"mBones\", skeleton.getTransformMatrices(renderingMesh));\n }\n }\n // Morph targets\n MaterialHelper.BindMorphTargetParameters(renderingMesh, effect);\n if (renderingMesh.morphTargetManager && renderingMesh.morphTargetManager.isUsingTextureForTargets) {\n renderingMesh.morphTargetManager._bind(effect);\n }\n // Clip planes\n bindClipPlane(effect, material, scene);\n }\n if (!this._useUBO && !shadowDepthWrapper) {\n this._bindCustomEffectForRenderSubMeshForShadowMap(subMesh, effect, effectiveMesh);\n }\n MaterialHelper.BindSceneUniformBuffer(effect, this._scene.getSceneUniformBuffer());\n this._scene.getSceneUniformBuffer().bindUniformBuffer();\n const world = effectiveMesh.getWorldMatrix();\n // In the non hardware instanced mode, the Mesh ubo update is done by the callback passed to renderingMesh._processRendering (see below)\n if (hardwareInstancedRendering) {\n effectiveMesh.getMeshUniformBuffer().bindToEffect(effect, \"Mesh\");\n effectiveMesh.transferToEffect(world);\n }\n if (this.forceBackFacesOnly) {\n engine.setState(true, 0, false, true, material.cullBackFaces);\n }\n // Observables\n this.onBeforeShadowMapRenderMeshObservable.notifyObservers(renderingMesh);\n this.onBeforeShadowMapRenderObservable.notifyObservers(effect);\n // Draw\n renderingMesh._processRendering(effectiveMesh, subMesh, effect, material.fillMode, batch, hardwareInstancedRendering, (isInstance, worldOverride) => {\n if (effectiveMesh !== renderingMesh && !isInstance) {\n renderingMesh.getMeshUniformBuffer().bindToEffect(effect, \"Mesh\");\n renderingMesh.transferToEffect(worldOverride);\n }\n else {\n effectiveMesh.getMeshUniformBuffer().bindToEffect(effect, \"Mesh\");\n effectiveMesh.transferToEffect(isInstance ? worldOverride : world);\n }\n });\n if (this.forceBackFacesOnly) {\n engine.setState(true, 0, false, false, material.cullBackFaces);\n }\n // Observables\n this.onAfterShadowMapRenderObservable.notifyObservers(effect);\n this.onAfterShadowMapRenderMeshObservable.notifyObservers(renderingMesh);\n }\n else {\n // Need to reset refresh rate of the shadowMap\n if (this._shadowMap) {\n this._shadowMap.resetRefreshCounter();\n }\n }\n }\n _applyFilterValues() {\n if (!this._shadowMap) {\n return;\n }\n if (this.filter === ShadowGenerator.FILTER_NONE || this.filter === ShadowGenerator.FILTER_PCSS) {\n this._shadowMap.updateSamplingMode(Texture.NEAREST_SAMPLINGMODE);\n }\n else {\n this._shadowMap.updateSamplingMode(Texture.BILINEAR_SAMPLINGMODE);\n }\n }\n /**\n * Forces all the attached effect to compile to enable rendering only once ready vs. lazily compiling effects.\n * @param onCompiled Callback triggered at the and of the effects compilation\n * @param options Sets of optional options forcing the compilation with different modes\n */\n forceCompilation(onCompiled, options) {\n const localOptions = Object.assign({ useInstances: false }, options);\n const shadowMap = this.getShadowMap();\n if (!shadowMap) {\n if (onCompiled) {\n onCompiled(this);\n }\n return;\n }\n const renderList = shadowMap.renderList;\n if (!renderList) {\n if (onCompiled) {\n onCompiled(this);\n }\n return;\n }\n const subMeshes = [];\n for (const mesh of renderList) {\n subMeshes.push(...mesh.subMeshes);\n }\n if (subMeshes.length === 0) {\n if (onCompiled) {\n onCompiled(this);\n }\n return;\n }\n let currentIndex = 0;\n const checkReady = () => {\n var _a, _b;\n if (!this._scene || !this._scene.getEngine()) {\n return;\n }\n while (this.isReady(subMeshes[currentIndex], localOptions.useInstances, (_b = (_a = subMeshes[currentIndex].getMaterial()) === null || _a === void 0 ? void 0 : _a.needAlphaBlendingForMesh(subMeshes[currentIndex].getMesh())) !== null && _b !== void 0 ? _b : false)) {\n currentIndex++;\n if (currentIndex >= subMeshes.length) {\n if (onCompiled) {\n onCompiled(this);\n }\n return;\n }\n }\n setTimeout(checkReady, 16);\n };\n checkReady();\n }\n /**\n * Forces all the attached effect to compile to enable rendering only once ready vs. lazily compiling effects.\n * @param options Sets of optional options forcing the compilation with different modes\n * @returns A promise that resolves when the compilation completes\n */\n forceCompilationAsync(options) {\n return new Promise((resolve) => {\n this.forceCompilation(() => {\n resolve();\n }, options);\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _isReadyCustomDefines(defines, subMesh, useInstances) { }\n _prepareShadowDefines(subMesh, useInstances, defines, isTransparent) {\n defines.push(\"#define SM_LIGHTTYPE_\" + this._light.getClassName().toUpperCase());\n defines.push(\"#define SM_FLOAT \" + (this._textureType !== 0 ? \"1\" : \"0\"));\n defines.push(\"#define SM_ESM \" + (this.useExponentialShadowMap || this.useBlurExponentialShadowMap ? \"1\" : \"0\"));\n defines.push(\"#define SM_DEPTHTEXTURE \" + (this.usePercentageCloserFiltering || this.useContactHardeningShadow ? \"1\" : \"0\"));\n const mesh = subMesh.getMesh();\n // Normal bias.\n defines.push(\"#define SM_NORMALBIAS \" + (this.normalBias && mesh.isVerticesDataPresent(VertexBuffer.NormalKind) ? \"1\" : \"0\"));\n defines.push(\"#define SM_DIRECTIONINLIGHTDATA \" + (this.getLight().getTypeID() === Light.LIGHTTYPEID_DIRECTIONALLIGHT ? \"1\" : \"0\"));\n // Point light\n defines.push(\"#define SM_USEDISTANCE \" + (this._light.needCube() ? \"1\" : \"0\"));\n // Soft transparent shadows\n defines.push(\"#define SM_SOFTTRANSPARENTSHADOW \" + (this.enableSoftTransparentShadow && isTransparent ? \"1\" : \"0\"));\n this._isReadyCustomDefines(defines, subMesh, useInstances);\n return defines;\n }\n /**\n * Determine whether the shadow generator is ready or not (mainly all effects and related post processes needs to be ready).\n * @param subMesh The submesh we want to render in the shadow map\n * @param useInstances Defines whether will draw in the map using instances\n * @param isTransparent Indicates that isReady is called for a transparent subMesh\n * @returns true if ready otherwise, false\n */\n isReady(subMesh, useInstances, isTransparent) {\n var _a;\n const material = subMesh.getMaterial(), shadowDepthWrapper = material === null || material === void 0 ? void 0 : material.shadowDepthWrapper;\n this._opacityTexture = null;\n if (!material) {\n return false;\n }\n const defines = [];\n this._prepareShadowDefines(subMesh, useInstances, defines, isTransparent);\n if (shadowDepthWrapper) {\n if (!shadowDepthWrapper.isReadyForSubMesh(subMesh, defines, this, useInstances, this._scene.getEngine().currentRenderPassId)) {\n return false;\n }\n }\n else {\n const subMeshEffect = subMesh._getDrawWrapper(undefined, true);\n let effect = subMeshEffect.effect;\n let cachedDefines = subMeshEffect.defines;\n const attribs = [VertexBuffer.PositionKind];\n const mesh = subMesh.getMesh();\n // Normal bias.\n if (this.normalBias && mesh.isVerticesDataPresent(VertexBuffer.NormalKind)) {\n attribs.push(VertexBuffer.NormalKind);\n defines.push(\"#define NORMAL\");\n if (mesh.nonUniformScaling) {\n defines.push(\"#define NONUNIFORMSCALING\");\n }\n }\n // Alpha test\n const needAlphaTesting = material.needAlphaTesting();\n if (needAlphaTesting || material.needAlphaBlending()) {\n if (this.useOpacityTextureForTransparentShadow) {\n this._opacityTexture = material.opacityTexture;\n }\n else {\n this._opacityTexture = material.getAlphaTestTexture();\n }\n if (this._opacityTexture) {\n if (!this._opacityTexture.isReady()) {\n return false;\n }\n const alphaCutOff = (_a = material.alphaCutOff) !== null && _a !== void 0 ? _a : ShadowGenerator.DEFAULT_ALPHA_CUTOFF;\n defines.push(\"#define ALPHATEXTURE\");\n if (needAlphaTesting) {\n defines.push(`#define ALPHATESTVALUE ${alphaCutOff}${alphaCutOff % 1 === 0 ? \".\" : \"\"}`);\n }\n if (mesh.isVerticesDataPresent(VertexBuffer.UVKind)) {\n attribs.push(VertexBuffer.UVKind);\n defines.push(\"#define UV1\");\n }\n if (mesh.isVerticesDataPresent(VertexBuffer.UV2Kind)) {\n if (this._opacityTexture.coordinatesIndex === 1) {\n attribs.push(VertexBuffer.UV2Kind);\n defines.push(\"#define UV2\");\n }\n }\n }\n }\n // Bones\n const fallbacks = new EffectFallbacks();\n if (mesh.useBones && mesh.computeBonesUsingShaders && mesh.skeleton) {\n attribs.push(VertexBuffer.MatricesIndicesKind);\n attribs.push(VertexBuffer.MatricesWeightsKind);\n if (mesh.numBoneInfluencers > 4) {\n attribs.push(VertexBuffer.MatricesIndicesExtraKind);\n attribs.push(VertexBuffer.MatricesWeightsExtraKind);\n }\n const skeleton = mesh.skeleton;\n defines.push(\"#define NUM_BONE_INFLUENCERS \" + mesh.numBoneInfluencers);\n if (mesh.numBoneInfluencers > 0) {\n fallbacks.addCPUSkinningFallback(0, mesh);\n }\n if (skeleton.isUsingTextureForMatrices) {\n defines.push(\"#define BONETEXTURE\");\n }\n else {\n defines.push(\"#define BonesPerMesh \" + (skeleton.bones.length + 1));\n }\n }\n else {\n defines.push(\"#define NUM_BONE_INFLUENCERS 0\");\n }\n // Morph targets\n const manager = mesh.morphTargetManager;\n let morphInfluencers = 0;\n if (manager) {\n if (manager.numInfluencers > 0) {\n defines.push(\"#define MORPHTARGETS\");\n morphInfluencers = manager.numInfluencers;\n defines.push(\"#define NUM_MORPH_INFLUENCERS \" + morphInfluencers);\n if (manager.isUsingTextureForTargets) {\n defines.push(\"#define MORPHTARGETS_TEXTURE\");\n }\n MaterialHelper.PrepareAttributesForMorphTargetsInfluencers(attribs, mesh, morphInfluencers);\n }\n }\n // ClipPlanes\n prepareStringDefinesForClipPlanes(material, this._scene, defines);\n // Instances\n if (useInstances) {\n defines.push(\"#define INSTANCES\");\n MaterialHelper.PushAttributesForInstances(attribs);\n if (subMesh.getRenderingMesh().hasThinInstances) {\n defines.push(\"#define THIN_INSTANCES\");\n }\n }\n if (this.customShaderOptions) {\n if (this.customShaderOptions.defines) {\n for (const define of this.customShaderOptions.defines) {\n if (defines.indexOf(define) === -1) {\n defines.push(define);\n }\n }\n }\n }\n // Get correct effect\n const join = defines.join(\"\\n\");\n if (cachedDefines !== join) {\n cachedDefines = join;\n let shaderName = \"shadowMap\";\n const uniforms = [\n \"world\",\n \"mBones\",\n \"viewProjection\",\n \"diffuseMatrix\",\n \"lightDataSM\",\n \"depthValuesSM\",\n \"biasAndScaleSM\",\n \"morphTargetInfluences\",\n \"boneTextureWidth\",\n \"softTransparentShadowSM\",\n \"morphTargetTextureInfo\",\n \"morphTargetTextureIndices\",\n ];\n const samplers = [\"diffuseSampler\", \"boneSampler\", \"morphTargets\"];\n const uniformBuffers = [\"Scene\", \"Mesh\"];\n addClipPlaneUniforms(uniforms);\n // Custom shader?\n if (this.customShaderOptions) {\n shaderName = this.customShaderOptions.shaderName;\n if (this.customShaderOptions.attributes) {\n for (const attrib of this.customShaderOptions.attributes) {\n if (attribs.indexOf(attrib) === -1) {\n attribs.push(attrib);\n }\n }\n }\n if (this.customShaderOptions.uniforms) {\n for (const uniform of this.customShaderOptions.uniforms) {\n if (uniforms.indexOf(uniform) === -1) {\n uniforms.push(uniform);\n }\n }\n }\n if (this.customShaderOptions.samplers) {\n for (const sampler of this.customShaderOptions.samplers) {\n if (samplers.indexOf(sampler) === -1) {\n samplers.push(sampler);\n }\n }\n }\n }\n const engine = this._scene.getEngine();\n effect = engine.createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: null,\n onError: null,\n indexParameters: { maxSimultaneousMorphTargets: morphInfluencers },\n }, engine);\n subMeshEffect.setEffect(effect, cachedDefines);\n }\n if (!effect.isReady()) {\n return false;\n }\n }\n if (this.useBlurExponentialShadowMap || this.useBlurCloseExponentialShadowMap) {\n if (!this._blurPostProcesses || !this._blurPostProcesses.length) {\n this._initializeBlurRTTAndPostProcesses();\n }\n }\n if (this._kernelBlurXPostprocess && !this._kernelBlurXPostprocess.isReady()) {\n return false;\n }\n if (this._kernelBlurYPostprocess && !this._kernelBlurYPostprocess.isReady()) {\n return false;\n }\n if (this._boxBlurPostprocess && !this._boxBlurPostprocess.isReady()) {\n return false;\n }\n return true;\n }\n /**\n * Prepare all the defines in a material relying on a shadow map at the specified light index.\n * @param defines Defines of the material we want to update\n * @param lightIndex Index of the light in the enabled light list of the material\n */\n prepareDefines(defines, lightIndex) {\n const scene = this._scene;\n const light = this._light;\n if (!scene.shadowsEnabled || !light.shadowEnabled) {\n return;\n }\n defines[\"SHADOW\" + lightIndex] = true;\n if (this.useContactHardeningShadow) {\n defines[\"SHADOWPCSS\" + lightIndex] = true;\n if (this._filteringQuality === ShadowGenerator.QUALITY_LOW) {\n defines[\"SHADOWLOWQUALITY\" + lightIndex] = true;\n }\n else if (this._filteringQuality === ShadowGenerator.QUALITY_MEDIUM) {\n defines[\"SHADOWMEDIUMQUALITY\" + lightIndex] = true;\n }\n // else default to high.\n }\n else if (this.usePercentageCloserFiltering) {\n defines[\"SHADOWPCF\" + lightIndex] = true;\n if (this._filteringQuality === ShadowGenerator.QUALITY_LOW) {\n defines[\"SHADOWLOWQUALITY\" + lightIndex] = true;\n }\n else if (this._filteringQuality === ShadowGenerator.QUALITY_MEDIUM) {\n defines[\"SHADOWMEDIUMQUALITY\" + lightIndex] = true;\n }\n // else default to high.\n }\n else if (this.usePoissonSampling) {\n defines[\"SHADOWPOISSON\" + lightIndex] = true;\n }\n else if (this.useExponentialShadowMap || this.useBlurExponentialShadowMap) {\n defines[\"SHADOWESM\" + lightIndex] = true;\n }\n else if (this.useCloseExponentialShadowMap || this.useBlurCloseExponentialShadowMap) {\n defines[\"SHADOWCLOSEESM\" + lightIndex] = true;\n }\n if (light.needCube()) {\n defines[\"SHADOWCUBE\" + lightIndex] = true;\n }\n }\n /**\n * Binds the shadow related information inside of an effect (information like near, far, darkness...\n * defined in the generator but impacting the effect).\n * @param lightIndex Index of the light in the enabled light list of the material owning the effect\n * @param effect The effect we are binding the information for\n */\n bindShadowLight(lightIndex, effect) {\n const light = this._light;\n const scene = this._scene;\n if (!scene.shadowsEnabled || !light.shadowEnabled) {\n return;\n }\n const camera = this._getCamera();\n if (!camera) {\n return;\n }\n const shadowMap = this.getShadowMap();\n if (!shadowMap) {\n return;\n }\n if (!light.needCube()) {\n effect.setMatrix(\"lightMatrix\" + lightIndex, this.getTransformMatrix());\n }\n // Only PCF uses depth stencil texture.\n if (this._filter === ShadowGenerator.FILTER_PCF) {\n effect.setDepthStencilTexture(\"shadowSampler\" + lightIndex, this.getShadowMapForRendering());\n light._uniformBuffer.updateFloat4(\"shadowsInfo\", this.getDarkness(), shadowMap.getSize().width, 1 / shadowMap.getSize().width, this.frustumEdgeFalloff, lightIndex);\n }\n else if (this._filter === ShadowGenerator.FILTER_PCSS) {\n effect.setDepthStencilTexture(\"shadowSampler\" + lightIndex, this.getShadowMapForRendering());\n effect.setTexture(\"depthSampler\" + lightIndex, this.getShadowMapForRendering());\n light._uniformBuffer.updateFloat4(\"shadowsInfo\", this.getDarkness(), 1 / shadowMap.getSize().width, this._contactHardeningLightSizeUVRatio * shadowMap.getSize().width, this.frustumEdgeFalloff, lightIndex);\n }\n else {\n effect.setTexture(\"shadowSampler\" + lightIndex, this.getShadowMapForRendering());\n light._uniformBuffer.updateFloat4(\"shadowsInfo\", this.getDarkness(), this.blurScale / shadowMap.getSize().width, this.depthScale, this.frustumEdgeFalloff, lightIndex);\n }\n light._uniformBuffer.updateFloat2(\"depthValues\", this.getLight().getDepthMinZ(camera), this.getLight().getDepthMinZ(camera) + this.getLight().getDepthMaxZ(camera), lightIndex);\n }\n /**\n * Gets the transformation matrix used to project the meshes into the map from the light point of view.\n * (eq to shadow projection matrix * light transform matrix)\n * @returns The transform matrix used to create the shadow map\n */\n getTransformMatrix() {\n const scene = this._scene;\n if (this._currentRenderId === scene.getRenderId() && this._currentFaceIndexCache === this._currentFaceIndex) {\n return this._transformMatrix;\n }\n this._currentRenderId = scene.getRenderId();\n this._currentFaceIndexCache = this._currentFaceIndex;\n let lightPosition = this._light.position;\n if (this._light.computeTransformedInformation()) {\n lightPosition = this._light.transformedPosition;\n }\n Vector3.NormalizeToRef(this._light.getShadowDirection(this._currentFaceIndex), this._lightDirection);\n if (Math.abs(Vector3.Dot(this._lightDirection, Vector3.Up())) === 1.0) {\n this._lightDirection.z = 0.0000000000001; // Required to avoid perfectly perpendicular light\n }\n if (this._light.needProjectionMatrixCompute() ||\n !this._cachedPosition ||\n !this._cachedDirection ||\n !lightPosition.equals(this._cachedPosition) ||\n !this._lightDirection.equals(this._cachedDirection)) {\n this._cachedPosition.copyFrom(lightPosition);\n this._cachedDirection.copyFrom(this._lightDirection);\n Matrix.LookAtLHToRef(lightPosition, lightPosition.add(this._lightDirection), Vector3.Up(), this._viewMatrix);\n const shadowMap = this.getShadowMap();\n if (shadowMap) {\n const renderList = shadowMap.renderList;\n if (renderList) {\n this._light.setShadowProjectionMatrix(this._projectionMatrix, this._viewMatrix, renderList);\n }\n }\n this._viewMatrix.multiplyToRef(this._projectionMatrix, this._transformMatrix);\n }\n return this._transformMatrix;\n }\n /**\n * Recreates the shadow map dependencies like RTT and post processes. This can be used during the switch between\n * Cube and 2D textures for instance.\n */\n recreateShadowMap() {\n const shadowMap = this._shadowMap;\n if (!shadowMap) {\n return;\n }\n // Track render list.\n const renderList = shadowMap.renderList;\n // Clean up existing data.\n this._disposeRTTandPostProcesses();\n // Reinitializes.\n this._initializeGenerator();\n // Reaffect the filter to ensure a correct fallback if necessary.\n this.filter = this._filter;\n // Reaffect the filter.\n this._applyFilterValues();\n // Reaffect Render List.\n if (renderList) {\n // Note: don't do this._shadowMap!.renderList = renderList;\n // The renderList hooked array is accessing the old RenderTargetTexture (see RenderTargetTexture._hookArray), which is disposed at this point (by the call to _disposeRTTandPostProcesses)\n if (!this._shadowMap.renderList) {\n this._shadowMap.renderList = [];\n }\n for (const mesh of renderList) {\n this._shadowMap.renderList.push(mesh);\n }\n }\n else {\n this._shadowMap.renderList = null;\n }\n }\n _disposeBlurPostProcesses() {\n if (this._shadowMap2) {\n this._shadowMap2.dispose();\n this._shadowMap2 = null;\n }\n if (this._boxBlurPostprocess) {\n this._boxBlurPostprocess.dispose();\n this._boxBlurPostprocess = null;\n }\n if (this._kernelBlurXPostprocess) {\n this._kernelBlurXPostprocess.dispose();\n this._kernelBlurXPostprocess = null;\n }\n if (this._kernelBlurYPostprocess) {\n this._kernelBlurYPostprocess.dispose();\n this._kernelBlurYPostprocess = null;\n }\n this._blurPostProcesses = [];\n }\n _disposeRTTandPostProcesses() {\n if (this._shadowMap) {\n this._shadowMap.dispose();\n this._shadowMap = null;\n }\n this._disposeBlurPostProcesses();\n }\n _disposeSceneUBOs() {\n if (this._sceneUBOs) {\n for (const ubo of this._sceneUBOs) {\n ubo.dispose();\n }\n this._sceneUBOs = [];\n }\n }\n /**\n * Disposes the ShadowGenerator.\n * Returns nothing.\n */\n dispose() {\n this._disposeRTTandPostProcesses();\n this._disposeSceneUBOs();\n if (this._light) {\n if (this._light._shadowGenerators) {\n const iterator = this._light._shadowGenerators.entries();\n for (let entry = iterator.next(); entry.done !== true; entry = iterator.next()) {\n const [camera, shadowGenerator] = entry.value;\n if (shadowGenerator === this) {\n this._light._shadowGenerators.delete(camera);\n }\n }\n if (this._light._shadowGenerators.size === 0) {\n this._light._shadowGenerators = null;\n }\n }\n this._light._markMeshesAsLightDirty();\n }\n this.onBeforeShadowMapRenderMeshObservable.clear();\n this.onBeforeShadowMapRenderObservable.clear();\n this.onAfterShadowMapRenderMeshObservable.clear();\n this.onAfterShadowMapRenderObservable.clear();\n }\n /**\n * Serializes the shadow generator setup to a json object.\n * @returns The serialized JSON object\n */\n serialize() {\n var _a;\n const serializationObject = {};\n const shadowMap = this.getShadowMap();\n if (!shadowMap) {\n return serializationObject;\n }\n serializationObject.className = this.getClassName();\n serializationObject.lightId = this._light.id;\n serializationObject.cameraId = (_a = this._camera) === null || _a === void 0 ? void 0 : _a.id;\n serializationObject.id = this.id;\n serializationObject.mapSize = shadowMap.getRenderSize();\n serializationObject.forceBackFacesOnly = this.forceBackFacesOnly;\n serializationObject.darkness = this.getDarkness();\n serializationObject.transparencyShadow = this._transparencyShadow;\n serializationObject.frustumEdgeFalloff = this.frustumEdgeFalloff;\n serializationObject.bias = this.bias;\n serializationObject.normalBias = this.normalBias;\n serializationObject.usePercentageCloserFiltering = this.usePercentageCloserFiltering;\n serializationObject.useContactHardeningShadow = this.useContactHardeningShadow;\n serializationObject.contactHardeningLightSizeUVRatio = this.contactHardeningLightSizeUVRatio;\n serializationObject.filteringQuality = this.filteringQuality;\n serializationObject.useExponentialShadowMap = this.useExponentialShadowMap;\n serializationObject.useBlurExponentialShadowMap = this.useBlurExponentialShadowMap;\n serializationObject.useCloseExponentialShadowMap = this.useBlurExponentialShadowMap;\n serializationObject.useBlurCloseExponentialShadowMap = this.useBlurExponentialShadowMap;\n serializationObject.usePoissonSampling = this.usePoissonSampling;\n serializationObject.depthScale = this.depthScale;\n serializationObject.blurBoxOffset = this.blurBoxOffset;\n serializationObject.blurKernel = this.blurKernel;\n serializationObject.blurScale = this.blurScale;\n serializationObject.useKernelBlur = this.useKernelBlur;\n serializationObject.renderList = [];\n if (shadowMap.renderList) {\n for (let meshIndex = 0; meshIndex < shadowMap.renderList.length; meshIndex++) {\n const mesh = shadowMap.renderList[meshIndex];\n serializationObject.renderList.push(mesh.id);\n }\n }\n return serializationObject;\n }\n /**\n * Parses a serialized ShadowGenerator and returns a new ShadowGenerator.\n * @param parsedShadowGenerator The JSON object to parse\n * @param scene The scene to create the shadow map for\n * @param constr A function that builds a shadow generator or undefined to create an instance of the default shadow generator\n * @returns The parsed shadow generator\n */\n static Parse(parsedShadowGenerator, scene, constr) {\n const light = scene.getLightById(parsedShadowGenerator.lightId);\n const camera = parsedShadowGenerator.cameraId !== undefined ? scene.getCameraById(parsedShadowGenerator.cameraId) : null;\n const shadowGenerator = constr ? constr(parsedShadowGenerator.mapSize, light, camera) : new ShadowGenerator(parsedShadowGenerator.mapSize, light, undefined, camera);\n const shadowMap = shadowGenerator.getShadowMap();\n for (let meshIndex = 0; meshIndex < parsedShadowGenerator.renderList.length; meshIndex++) {\n const meshes = scene.getMeshesById(parsedShadowGenerator.renderList[meshIndex]);\n meshes.forEach(function (mesh) {\n if (!shadowMap) {\n return;\n }\n if (!shadowMap.renderList) {\n shadowMap.renderList = [];\n }\n shadowMap.renderList.push(mesh);\n });\n }\n if (parsedShadowGenerator.id !== undefined) {\n shadowGenerator.id = parsedShadowGenerator.id;\n }\n shadowGenerator.forceBackFacesOnly = !!parsedShadowGenerator.forceBackFacesOnly;\n if (parsedShadowGenerator.darkness !== undefined) {\n shadowGenerator.setDarkness(parsedShadowGenerator.darkness);\n }\n if (parsedShadowGenerator.transparencyShadow) {\n shadowGenerator.setTransparencyShadow(true);\n }\n if (parsedShadowGenerator.frustumEdgeFalloff !== undefined) {\n shadowGenerator.frustumEdgeFalloff = parsedShadowGenerator.frustumEdgeFalloff;\n }\n if (parsedShadowGenerator.bias !== undefined) {\n shadowGenerator.bias = parsedShadowGenerator.bias;\n }\n if (parsedShadowGenerator.normalBias !== undefined) {\n shadowGenerator.normalBias = parsedShadowGenerator.normalBias;\n }\n if (parsedShadowGenerator.usePercentageCloserFiltering) {\n shadowGenerator.usePercentageCloserFiltering = true;\n }\n else if (parsedShadowGenerator.useContactHardeningShadow) {\n shadowGenerator.useContactHardeningShadow = true;\n }\n else if (parsedShadowGenerator.usePoissonSampling) {\n shadowGenerator.usePoissonSampling = true;\n }\n else if (parsedShadowGenerator.useExponentialShadowMap) {\n shadowGenerator.useExponentialShadowMap = true;\n }\n else if (parsedShadowGenerator.useBlurExponentialShadowMap) {\n shadowGenerator.useBlurExponentialShadowMap = true;\n }\n else if (parsedShadowGenerator.useCloseExponentialShadowMap) {\n shadowGenerator.useCloseExponentialShadowMap = true;\n }\n else if (parsedShadowGenerator.useBlurCloseExponentialShadowMap) {\n shadowGenerator.useBlurCloseExponentialShadowMap = true;\n }\n // Backward compat\n else if (parsedShadowGenerator.useVarianceShadowMap) {\n shadowGenerator.useExponentialShadowMap = true;\n }\n else if (parsedShadowGenerator.useBlurVarianceShadowMap) {\n shadowGenerator.useBlurExponentialShadowMap = true;\n }\n if (parsedShadowGenerator.contactHardeningLightSizeUVRatio !== undefined) {\n shadowGenerator.contactHardeningLightSizeUVRatio = parsedShadowGenerator.contactHardeningLightSizeUVRatio;\n }\n if (parsedShadowGenerator.filteringQuality !== undefined) {\n shadowGenerator.filteringQuality = parsedShadowGenerator.filteringQuality;\n }\n if (parsedShadowGenerator.depthScale) {\n shadowGenerator.depthScale = parsedShadowGenerator.depthScale;\n }\n if (parsedShadowGenerator.blurScale) {\n shadowGenerator.blurScale = parsedShadowGenerator.blurScale;\n }\n if (parsedShadowGenerator.blurBoxOffset) {\n shadowGenerator.blurBoxOffset = parsedShadowGenerator.blurBoxOffset;\n }\n if (parsedShadowGenerator.useKernelBlur) {\n shadowGenerator.useKernelBlur = parsedShadowGenerator.useKernelBlur;\n }\n if (parsedShadowGenerator.blurKernel) {\n shadowGenerator.blurKernel = parsedShadowGenerator.blurKernel;\n }\n return shadowGenerator;\n }\n}\n/**\n * Name of the shadow generator class\n */\nShadowGenerator.CLASSNAME = \"ShadowGenerator\";\n/**\n * Shadow generator mode None: no filtering applied.\n */\nShadowGenerator.FILTER_NONE = 0;\n/**\n * Shadow generator mode ESM: Exponential Shadow Mapping.\n * (http://developer.download.nvidia.com/presentations/2008/GDC/GDC08_SoftShadowMapping.pdf)\n */\nShadowGenerator.FILTER_EXPONENTIALSHADOWMAP = 1;\n/**\n * Shadow generator mode Poisson Sampling: Percentage Closer Filtering.\n * (Multiple Tap around evenly distributed around the pixel are used to evaluate the shadow strength)\n */\nShadowGenerator.FILTER_POISSONSAMPLING = 2;\n/**\n * Shadow generator mode ESM: Blurred Exponential Shadow Mapping.\n * (http://developer.download.nvidia.com/presentations/2008/GDC/GDC08_SoftShadowMapping.pdf)\n */\nShadowGenerator.FILTER_BLUREXPONENTIALSHADOWMAP = 3;\n/**\n * Shadow generator mode ESM: Exponential Shadow Mapping using the inverse of the exponential preventing\n * edge artifacts on steep falloff.\n * (http://developer.download.nvidia.com/presentations/2008/GDC/GDC08_SoftShadowMapping.pdf)\n */\nShadowGenerator.FILTER_CLOSEEXPONENTIALSHADOWMAP = 4;\n/**\n * Shadow generator mode ESM: Blurred Exponential Shadow Mapping using the inverse of the exponential preventing\n * edge artifacts on steep falloff.\n * (http://developer.download.nvidia.com/presentations/2008/GDC/GDC08_SoftShadowMapping.pdf)\n */\nShadowGenerator.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP = 5;\n/**\n * Shadow generator mode PCF: Percentage Closer Filtering\n * benefits from Webgl 2 shadow samplers. Fallback to Poisson Sampling in Webgl 1\n * (https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch11.html)\n */\nShadowGenerator.FILTER_PCF = 6;\n/**\n * Shadow generator mode PCSS: Percentage Closering Soft Shadow.\n * benefits from Webgl 2 shadow samplers. Fallback to Poisson Sampling in Webgl 1\n * Contact Hardening\n */\nShadowGenerator.FILTER_PCSS = 7;\n/**\n * Reserved for PCF and PCSS\n * Highest Quality.\n *\n * Execute PCF on a 5*5 kernel improving a lot the shadow aliasing artifacts.\n *\n * Execute PCSS with 32 taps blocker search and 64 taps PCF.\n */\nShadowGenerator.QUALITY_HIGH = 0;\n/**\n * Reserved for PCF and PCSS\n * Good tradeoff for quality/perf cross devices\n *\n * Execute PCF on a 3*3 kernel.\n *\n * Execute PCSS with 16 taps blocker search and 32 taps PCF.\n */\nShadowGenerator.QUALITY_MEDIUM = 1;\n/**\n * Reserved for PCF and PCSS\n * The lowest quality but the fastest.\n *\n * Execute PCF on a 1*1 kernel.\n *\n * Execute PCSS with 16 taps blocker search and 16 taps PCF.\n */\nShadowGenerator.QUALITY_LOW = 2;\n/**\n * Defines the default alpha cutoff value used for transparent alpha tested materials.\n */\nShadowGenerator.DEFAULT_ALPHA_CUTOFF = 0.5;\n/**\n * @internal\n */\nShadowGenerator._SceneComponentInitialization = (_) => {\n throw _WarnImport(\"ShadowGeneratorSceneComponent\");\n};\n//# sourceMappingURL=shadowGenerator.js.map","import { Vector3 as BABYLON_Vector3, Quaternion as BABYLON_Quaternion } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { vector_3 } from './Conversion.js';\n/**\n * Calculates the world transform of a scene object.\n * @param scene_object The scene object to calculate the world transform of.\n */\nexport function calculate_world_transform(scene_object) {\n let position = BABYLON_Vector3.Zero();\n let scale = BABYLON_Vector3.One();\n let rotation = BABYLON_Vector3.Zero();\n let parent_object = scene_object;\n do {\n const new_transform = calculate_transform_from_parent_world_transform({\n position: parent_object.get_position(),\n scale: parent_object.get_scale(),\n rotation: parent_object.get_rotation()\n }, position, scale, rotation);\n position = vector_3(new_transform.position);\n scale = vector_3(new_transform.scale);\n rotation = vector_3(new_transform.rotation);\n parent_object = parent_object.parent;\n } while (parent_object);\n return { position: position, scale: scale, rotation: rotation };\n}\n/**\n* Calculates the world transform of a scene object from a parent world transform.\n* @param parent_transform The parent world transform.\n* @param position The position of the scene object.\n* @param scale The scale of the scene object.\n* @param rotation The rotation of the scene object.\n*/\nexport function calculate_transform_from_parent_world_transform(parent_transform, position = BABYLON_Vector3.Zero(), scale = BABYLON_Vector3.One(), rotation = BABYLON_Vector3.Zero()) {\n const parent_rotation = parent_transform.rotation;\n const parent_rotation_quat = BABYLON_Quaternion.RotationYawPitchRoll(parent_rotation.y, parent_rotation.x, parent_rotation.z);\n const child_rotation_quat = BABYLON_Quaternion.RotationYawPitchRoll(rotation.y, rotation.x, rotation.z);\n const rotation_quat = parent_rotation_quat.multiply(child_rotation_quat);\n const vec3_offset_scaled = new BABYLON_Vector3(position.x, position.y, position.z);\n const parent_scale = parent_transform.scale;\n vec3_offset_scaled.x *= parent_scale.x;\n vec3_offset_scaled.y *= parent_scale.y;\n vec3_offset_scaled.z *= parent_scale.z;\n const rotated_offset = vec3_offset_scaled.rotateByQuaternionToRef(parent_rotation_quat, new BABYLON_Vector3(0.0, 0.0, 0.0));\n const parent_position = parent_transform.position;\n const new_position = new BABYLON_Vector3(parent_position.x + rotated_offset.x, parent_position.y + rotated_offset.y, parent_position.z + rotated_offset.z);\n const new_scale = new BABYLON_Vector3(scale.x, scale.y, scale.z).multiply(vector_3(parent_scale));\n return { position: new_position, scale: new_scale, rotation: rotation_quat.toEulerAngles() };\n}\n/**\n* Calculates the world direction of a scene object from a parent world transform.\n* @param parent_transform The parent world transform.\n* @param direction The direction of the scene object.\n*/\nexport function calculate_direction_from_parent_world_transform(parent_transform, direction) {\n const rotation = parent_transform.rotation;\n const rotation_quaternion = BABYLON_Quaternion.RotationYawPitchRoll(rotation.y, rotation.x, rotation.z);\n const new_direction = new BABYLON_Vector3(direction.x, direction.y, direction.z);\n new_direction.rotateByQuaternionToRef(rotation_quaternion, new_direction);\n return new_direction;\n}\n//# sourceMappingURL=TransformHelper.js.map","/**\n * NOTE: Observers can block Observables from being garbage collected if Observable/Observer was not properly disposed.\n * @see dispose() method on Observable / Observer to release the reference.\n * @TODO This can be fixed using WeakRef which is a ES2021 feature.\n */\nexport class Observer {\n constructor(callback, remove_on_call, _observable) {\n this.callback = callback;\n this.remove_on_call = remove_on_call;\n this._observable = _observable;\n this.enabled = true;\n }\n /**\n * Removes the observer from its observable\n */\n dispose() {\n try {\n this._observable.remove(this);\n }\n catch (_) { }\n }\n}\nexport class Observable {\n get has_active_observers() {\n let has_enabled_observer = false;\n for (const observer of this._observers) {\n if (observer.enabled) {\n has_enabled_observer = true;\n break;\n }\n }\n return has_enabled_observer;\n }\n get has_observers() {\n return this._observers.size > 0;\n }\n constructor(observers_changed_callback = null) {\n this.observers_changed_callback = observers_changed_callback;\n // Since this should hold both full instances and interfaces we can not make it type safe.\n // This set should be manipulated only via TypeSafe methods.\n this._observers = new Set();\n this._revokable = Proxy.revocable(this, {});\n }\n /**\n * Notify observers of a new value of type T. This should only be called from the owner of the observable\n * @param val the new value to notify observers about\n */\n notify(sender, val) {\n // Call all observers in order of insertion\n for (const observer of this._observers) {\n if (!observer.enabled)\n continue;\n observer.callback(sender, val);\n if (observer.remove_on_call) {\n // This will call observers_changed_callback for every disposed Observer\n observer.dispose();\n }\n }\n }\n /**\n * Adds a new callback to be called when Observable notifies\n * @param callback Function to be called with the new value when observable notifies\n * @returns Observer object that can be used to later remove the Observer\n */\n add(callback) {\n const observer = new Observer(callback, false, this._revokable.proxy);\n this._observers.add(observer);\n if (this.observers_changed_callback !== null)\n this.observers_changed_callback(this._observers.size);\n return observer;\n }\n /**\n * Adds a new callback to be called when Observable notifies, will remove itself after the first call\n * @param callback Function to be called with the new value when observable notifies\n * @returns Observer object that can be used to later remove the Observer\n */\n add_once(callback) {\n const observer = new Observer(callback, true, this._revokable.proxy);\n this._observers.add(observer);\n return observer;\n }\n /**\n * Removes the observer from this observable\n * @param observer observer to remove\n * @returns True if the observer was removed, false otherwise\n */\n remove(observer) {\n if (this._observers.has(observer)) {\n const was_deleted = this._observers.delete(observer);\n if (was_deleted && this.observers_changed_callback !== null)\n this.observers_changed_callback(this._observers.size);\n return true;\n }\n return false;\n }\n clear() {\n this._observers.forEach(observer => observer.dispose());\n this._observers.clear();\n if (this.observers_changed_callback !== null)\n this.observers_changed_callback(this._observers.size);\n }\n dispose() {\n this._observers.clear();\n this._revokable.revoke();\n this.observers_changed_callback = null;\n }\n}\n//# sourceMappingURL=Observable.js.map","/**\n * Static class to watch over all decorated `Persistant` or `Selectable` instances.\n * Notifies subscribers when the instance of specifed `type` is created or disposed.\n */\nexport class Watcher {\n constructor() { }\n static notify_created(value) {\n Watcher._subscriptions.forEach(({ subscriber, watching }) => {\n if (value instanceof watching) {\n subscriber.on_object_created(value);\n }\n });\n Watcher._disposable_storage.add(value);\n }\n static notify_disposed(value) {\n Watcher._subscriptions.forEach(({ subscriber, watching }) => {\n if (value instanceof watching) {\n subscriber.on_object_disposed(value);\n }\n });\n Watcher._disposable_storage.delete(value);\n }\n static clear() {\n Watcher._subscriptions.clear();\n Watcher._disposable_storage.clear();\n }\n}\nWatcher._subscriptions = new Set();\nWatcher._disposable_storage = new Set();\nWatcher.subscriptions = {\n add: (subsciption) => {\n Watcher._subscriptions.add(subsciption);\n const { subscriber, watching } = subsciption;\n for (const value of Watcher._disposable_storage) {\n if (value instanceof watching) {\n subscriber.on_object_created(value);\n }\n }\n },\n remove: (subscriber) => {\n Watcher._subscriptions.forEach(subscription => {\n if (subscription.subscriber === subscriber) {\n Watcher._subscriptions.delete(subscription);\n }\n });\n }\n};\n//# sourceMappingURL=Watcher.js.map","import { Watcher } from './Watcher.js';\nexport const SELECTABLE_DEFINITIONS = [];\nexport const PERSISTENT_DEFINITIONS = [];\nexport const DESCRIPTIONS = [];\n/**\n * Debug Layer Decorators.\n */\nexport class Debug {\n /**\n * Defines a class as a Persistant.\n */\n static Persistent(config = {}) {\n return function (constructor) {\n PERSISTENT_DEFINITIONS.push({ type: constructor, config: config });\n class Persistent extends constructor {\n constructor(...args) {\n super(...args);\n this.__self = this;\n Watcher.notify_created(this.__self);\n }\n dispose(...args) {\n Watcher.notify_disposed(this.__self);\n super.dispose(...args);\n }\n }\n return Persistent;\n };\n }\n /**\n * Defines a class as a Selectable.\n */\n static Selectable(config) {\n return function (constructor) {\n SELECTABLE_DEFINITIONS.push({ type: constructor, config: config });\n class Selectable extends constructor {\n constructor(...args) {\n super(...args);\n this.__self = this;\n Watcher.notify_created(this.__self);\n }\n dispose(...args) {\n Watcher.notify_disposed(this.__self);\n super.dispose(...args);\n }\n }\n return Selectable;\n };\n }\n /**\n * Describes a class for the debug layer.\n */\n static Describe(description) {\n return function (constructor) {\n DESCRIPTIONS.push(Object.assign({ type: constructor }, description));\n };\n }\n /**\n * Property.\n *\n * Creates a watcher for a decorated property.\n */\n static Property(config = {}) {\n return function (target, property_key, descriptor) {\n var _a, _b;\n const setup = (tab, instance) => {\n if (!config.if || config.if(instance)) {\n tab.watch(instance, property_key, {\n name: typeof config.name === 'function' ? config.name(instance) : config === null || config === void 0 ? void 0 : config.name,\n is_readonly: config === null || config === void 0 ? void 0 : config.is_readonly\n });\n }\n };\n const tab_tag = (_a = config.tab) !== null && _a !== void 0 ? _a : to_text(target.constructor.name);\n const description = {\n type: target.constructor,\n name: (_b = config.tag) !== null && _b !== void 0 ? _b : 'decorated: ' + property_key,\n is_enabled: true,\n initiate_tabs: [{\n tag: tab_tag,\n setup: setup,\n dependencies: config.if\n ? (instance) => {\n return [() => config.if(instance)];\n }\n : undefined\n }]\n };\n DESCRIPTIONS.push(description);\n };\n }\n /**\n * Button\n *\n * Creates a button for a decorated method.\n */\n static Button(config = {}) {\n return function (target, property_key, descriptor) {\n var _a, _b;\n const setup = (tab, instance) => {\n var _a;\n if (!config.if || config.if(instance)) {\n const label = typeof config.name === 'function' ? config.name(instance) : (_a = config === null || config === void 0 ? void 0 : config.name) !== null && _a !== void 0 ? _a : property_key;\n tab.button(label, { on_click: () => instance[property_key]() });\n }\n };\n const tab_tag = (_a = config.tab) !== null && _a !== void 0 ? _a : to_text(target.constructor.name);\n const description = {\n type: target.constructor,\n name: (_b = config.tag) !== null && _b !== void 0 ? _b : 'decorated: ' + property_key,\n is_enabled: true,\n initiate_tabs: [{\n tag: tab_tag,\n setup: setup,\n dependencies: config.if\n ? (instance) => {\n return [() => config.if(instance)];\n }\n : undefined\n }]\n };\n DESCRIPTIONS.push(description);\n };\n }\n /**\n * Setter\n *\n * Creates a setter for a decorated method.\n */\n static Setter(type, config) {\n return function (target, property_key, descriptor) {\n var _a, _b;\n const setup = (tab, instance) => {\n var _a;\n if (!config.if || config.if(instance)) {\n const label = typeof config.name === 'function' ? config.name(instance) : (_a = config === null || config === void 0 ? void 0 : config.name) !== null && _a !== void 0 ? _a : property_key;\n const initial_value = config.initial_value;\n tab.setter(instance, property_key, initial_value, { name: label });\n }\n };\n const tab_tag = (_a = config.tab) !== null && _a !== void 0 ? _a : to_text(target.constructor.name);\n const description = {\n type: target.constructor,\n name: (_b = config.tag) !== null && _b !== void 0 ? _b : 'decorated: ' + property_key,\n is_enabled: true,\n initiate_tabs: [{\n tag: tab_tag,\n setup: setup,\n dependencies: config.if\n ? (instance) => {\n return [() => config.if(instance)];\n }\n : undefined\n }]\n };\n DESCRIPTIONS.push(description);\n };\n }\n /**\n * Getter\n *\n * Creates a getter for a decorated method.\n */\n static Getter(type, config = {}) {\n return function (target, property_key, descriptor) {\n var _a, _b;\n const setup = (tab, instance) => {\n var _a;\n if (!config.if || config.if(instance)) {\n const label = typeof config.name === 'function' ? config.name(instance) : (_a = config === null || config === void 0 ? void 0 : config.name) !== null && _a !== void 0 ? _a : property_key;\n tab.getter(instance, property_key, { name: label });\n }\n };\n const tab_tag = (_a = config.tab) !== null && _a !== void 0 ? _a : to_text(target.constructor.name);\n const description = {\n type: target.constructor,\n name: (_b = config.tag) !== null && _b !== void 0 ? _b : 'decorated: ' + property_key,\n is_enabled: true,\n initiate_tabs: [{\n tag: tab_tag,\n setup: setup,\n dependencies: config.if\n ? (instance) => {\n return [() => config.if(instance)];\n }\n : undefined\n }]\n };\n DESCRIPTIONS.push(description);\n };\n }\n}\nfunction to_text(str) {\n return str.replace(/([A-Z])/g, ' $1').trim();\n}\n//# sourceMappingURL=DebugDecorators.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar Light_1;\nimport { TrackedVec3, vector3_pool } from '../../../../Math.js';\nimport { IColor } from '../../../../api.js';\nimport { calculate_world_transform, calculate_transform_from_parent_world_transform } from '../../../utility/TransformHelper.js';\nimport { vector_3 } from '../../../utility/Conversion.js';\nimport { Observable } from '../../../../Observable.js';\nimport { Deprecated, deprecate } from '../../../../utils/Deprecated.js';\nimport { Debug } from '../../../../utils/DebugLayer/utils/DebugDecorators.js';\n// TODO: Remove this once we do a breaking change\nconst vector_to_color = deprecate(function to_color(vector) {\n return { r: vector.x, g: vector.y, b: vector.z };\n}, 'setting color using IVector3 is deprecated');\n/**\n * An abstract light\n */\nlet Light = Light_1 = class Light {\n constructor(_viewer) {\n this._viewer = _viewer;\n this.update_observable = new Observable();\n this.shadow = null;\n this._ready = Promise.resolve();\n this._intensity = 1.0;\n this._intensity_affects_parent_emission_color = false;\n this._position = new TrackedVec3();\n this._color = new TrackedVec3(1, 1, 1);\n this._dirty_flags = Light_1.DIRTY_EVERYTHING;\n this._parent = null;\n this._parent_material = null;\n this._debug_geometry = null;\n this._light_system = _viewer.light_system;\n this._position.onchange = this.mark_dirty.bind(this, Light_1.DIRTY_POSITION);\n this._color.onchange = this.mark_dirty.bind(this, Light_1.DIRTY_COLOR);\n this.id = Light_1._id_count++;\n }\n get name() {\n return this._babylon_light.name;\n }\n set name(name) {\n this._babylon_light.name = name;\n }\n get position() {\n return this._position;\n }\n set position(value) {\n this._position.set(value.x, value.y, value.z);\n }\n get color() {\n return this._color;\n }\n set color(value) {\n const color = IColor.is(value) ? value : vector_to_color(value);\n if (this._viewer.get_config().verbose_warnings && !IColor.is_saturated(color)) {\n console.warn('Setting color with one or more channel not in range 0-1, this is generally a bad idea');\n }\n this._color.set(color.r, color.g, color.b);\n }\n // ------ ILight interface implementation -------\n get intensity_affects_parent_emission_color() {\n return this._intensity_affects_parent_emission_color;\n }\n set intensity_affects_parent_emission_color(value) {\n if (this._intensity_affects_parent_emission_color === value)\n return;\n this._intensity_affects_parent_emission_color = value;\n this.mark_dirty(Light_1.DIRTY_PARENT_EMISSIVE_COLOR);\n }\n get intensity() {\n return this._intensity;\n }\n set intensity(i) {\n if (this._intensity === i)\n return;\n this._intensity = i;\n this.mark_dirty(Light_1.DIRTY_INTENSITY);\n }\n set parent(object_id) {\n if (this.parent === object_id)\n return;\n const scene_object = object_id !== null ? this._viewer.viewer_scene.objects.get(object_id) : null;\n if (this._parent !== scene_object) {\n if (scene_object !== null) {\n this.set_parent(scene_object);\n }\n else {\n this.remove_parent();\n }\n }\n }\n get parent() {\n var _a, _b;\n return (_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null;\n }\n get_world_position() {\n if (!this._parent) {\n return this._position;\n }\n const parent_world_transform = calculate_world_transform(this._parent);\n const new_transform = calculate_transform_from_parent_world_transform(parent_world_transform, vector_3(this._position));\n return new_transform.position;\n }\n set_color_temperature(degrees_kelvin) {\n if (degrees_kelvin < 1000 || degrees_kelvin > 40000) {\n console.error('Color temperature value outside of accepted range [1000-40000]. Color accuracy may vary outside of values 1000-40000.');\n }\n const color = IColor.from_temperature(degrees_kelvin); // Color values in range [0, 1] in sRGB color space.\n // Convert color to linear color space to be able to normalize the sum of the vector's components (to maintain the same intensity regardless of color temp)\n const linear_color = vector3_pool.fetch();\n linear_color.set(Math.pow(color.r, 2.2), Math.pow(color.g, 2.2), Math.pow(color.b, 2.2));\n const vector_sum = linear_color.x + linear_color.y + linear_color.z;\n linear_color.set(linear_color.x / vector_sum, linear_color.y / vector_sum, linear_color.z / vector_sum);\n // Convert color back to sRGB color space when setting the normalized color values.\n this._color.set(Math.pow(linear_color.x, 1 / 2.2), Math.pow(linear_color.y, 1 / 2.2), Math.pow(linear_color.z, 1 / 2.2));\n vector3_pool.return(linear_color);\n }\n remove_debug_geometry() {\n if (this._debug_geometry) {\n this._debug_geometry.dispose();\n this._debug_geometry = null;\n }\n }\n get debug_geomentry() {\n return this._debug_geometry;\n }\n get ready() {\n return this._ready;\n }\n dispose() {\n var _a;\n this.remove_debug_geometry();\n if (this._babylon_light) {\n this._viewer.scene.removeLight(this._babylon_light);\n this._babylon_light.dispose();\n }\n this._light_system.remove_light(this);\n (_a = this.shadow) === null || _a === void 0 ? void 0 : _a.dispose();\n }\n mark_dirty(flags) {\n this._dirty_flags |= flags;\n }\n is_dirty(mask = Light_1.DIRTY_EVERYTHING) {\n return !!(this._dirty_flags & mask);\n }\n clear_dirty_flags() {\n this._dirty_flags = 0;\n }\n unset_dirty_flags(mask) {\n this._dirty_flags &= ~mask;\n }\n set_parent(scene_object) {\n if (this._parent) {\n this.remove_parent();\n }\n this._parent = scene_object;\n this.mark_dirty(Light_1.DIRTY_PARENT_ADDED);\n }\n remove_parent() {\n this._parent = null;\n this.mark_dirty(Light_1.DIRTY_PARENT_REMOVED);\n }\n update_color_and_intensity() {\n if (this.is_dirty(Light_1.DIRTY_INTENSITY)) {\n this._babylon_light.intensity = this.intensity;\n }\n if (this.is_dirty(Light_1.DIRTY_COLOR)) {\n // Convert the color values from sRGB color space to linear color space when sending the color values to Babylon.\n this._babylon_light.diffuse.set(Math.pow(this._color.r, 2.2), Math.pow(this._color.g, 2.2), Math.pow(this._color.b, 2.2));\n this._babylon_light.specular.set(Math.pow(this._color.r, 2.2), Math.pow(this._color.g, 2.2), Math.pow(this._color.b, 2.2));\n }\n }\n update_parent_material() {\n var _a, _b, _c;\n if (this.is_dirty(Light_1.DIRTY_PARENT_ADDED)) {\n (_a = this._parent) === null || _a === void 0 ? void 0 : _a.mark_world_matrices_to_be_recomputed();\n const material_id = (_b = this._parent) === null || _b === void 0 ? void 0 : _b.get_material();\n if (material_id) {\n this._parent_material = this._viewer.asset_manager.materials.get(material_id);\n }\n }\n else if (this.is_dirty(Light_1.DIRTY_PARENT_REMOVED) && this._parent_material) {\n (_c = this._parent_material) === null || _c === void 0 ? void 0 : _c.reset_emissive_color();\n this._parent_material = null;\n }\n if (this._parent_material) {\n const affects_parent = this.intensity_affects_parent_emission_color;\n const parent_color_is_dirty = this.is_dirty(Light_1.DIRTY_INTENSITY | Light_1.DIRTY_COLOR | Light_1.DIRTY_PARENT_EMISSIVE_COLOR);\n if (affects_parent && parent_color_is_dirty) {\n this.update_parent_emissive_color();\n }\n else if (!affects_parent) {\n this._parent_material.reset_emissive_color();\n }\n }\n }\n update_parent_emissive_color() {\n if (!this._parent)\n return;\n const material_id = this._parent.get_material();\n const parent_material = (material_id !== null)\n ? this._viewer.asset_manager.materials.get(material_id)\n : null;\n if (parent_material) {\n // With a value of 0 we will get zero emission (Climate neutral) earlier and therefore will not have the material shown in the glow layer.\n parent_material.emissive_color = new IColor(Math.pow(Math.pow(this._color.r, 2.2) * this.intensity, 1.0 / 2.2), Math.pow(Math.pow(this._color.g, 2.2) * this.intensity, 1.0 / 2.2), Math.pow(Math.pow(this._color.b, 2.2) * this.intensity, 1.0 / 2.2));\n }\n }\n};\nLight._id_count = 0;\n// Lets use the lower 24 bits (second half of the literal) for the common stuff in this base class.\n// The upper 8 bits can be used by each light type that extends the base.\n// Bitmasks for the properties in the derived classes can overlap (e.g. DirectionLight.DIRTY_DIRECTION and SpotLight.DIRTY_ANGLE can use the same bitmask)\n// TODO: Switch linter to eslint and allow aligning stuff like this using whitespace\nLight.DIRTY_POSITION = 1;\nLight.DIRTY_INTENSITY = 2;\nLight.DIRTY_COLOR = 4;\nLight.DIRTY_PARENT_EMISSIVE_COLOR = 8;\nLight.DIRTY_PARENT_TRANSFORM = 16;\nLight.DIRTY_PARENT_ADDED = 32;\nLight.DIRTY_PARENT_REMOVED = 64;\nLight.DIRTY_ENABLE_SHADOWS = 256;\nLight.DIRTY_SHADOW_BIAS = 512;\nLight.DIRTY_SHADOW_NEAR = 1024;\nLight.DIRTY_SHADOW_FAR = 2048;\nLight.DIRTY_SHADOW_RESOLUTION = 4096;\nLight.DIRTY_SHADOW_MAP = 8192;\nLight.DIRTY_DIRECTION = 16777216;\nLight.DIRTY_ANGLE = 33554432;\n// TODO: This flag is a bit broken by design since it sets that a parent was both added and removed.\n// This is some kind of broken state which makes it hard to reason about, since we expect add and remove to be mutually exclusive\nLight.DIRTY_EVERYTHING = 4294967295;\n__decorate([\n Deprecated\n], Light.prototype, \"intensity_affects_parent_emission_color\", null);\nLight = Light_1 = __decorate([\n Debug.Selectable({\n icon: '☀',\n name: 'Light',\n tooltip: (light) => light.type,\n world_position: light => light.get_world_position()\n })\n], Light);\nexport { Light };\n//# sourceMappingURL=Light.js.map","/**\n* Asserts condition, throws an error if not.\n* @param condition The condition to assert.\n* @param message The message to throw.\n*/\nexport function assert(condition, message) {\n if (!condition) {\n throw new Error(message);\n }\n}\n//# sourceMappingURL=Assert.js.map","export function update_from_partial(obj, update) {\n return Object.assign(Object.assign({}, obj), update);\n}\n/**\n * Checks if the given map has an entry for key which is not undefined and returns it.\n * If there is no entry, or it is undefined, sets the entry to value and returns it.\n * @param map the Map for which to do the operation\n * @param key The key at which to set or get the value\n * @param value The value to set if there is no value\n * @returns The value at Key or Value if there was none/undefined\n */\nexport function get_or_set_map_value(map, key, value) {\n let ret = value;\n ret = map.get(key);\n if (ret === undefined) {\n map.set(key, value);\n ret = value;\n }\n return ret;\n}\n/**\n * Remove an element, in-place, from array.\n * @param {T} array Array to remove element from\n * @param {T[]} element Element to remove\n * @returns {boolean} True if element was found and removed, false if element wasn't found\n */\nexport function remove_array_element(array, element) {\n const index = array.indexOf(element);\n if (index < 0) {\n return false;\n }\n array.splice(index, 1);\n return true;\n}\nexport function key_from_value_map(map, value) {\n for (const [map_key, map_value] of map) {\n if (map_value === value) {\n return map_key;\n }\n }\n return undefined;\n}\nexport function is_same(a, b) {\n for (const key in a) {\n if (b[key] !== undefined && b[key] !== a[key]) {\n return false;\n }\n }\n return true;\n}\nfunction is_value_primitive(value) {\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || typeof value === 'bigint' || typeof value === 'undefined' || typeof value === 'symbol') {\n return true;\n }\n else if (value === null) {\n // null is of type object, but we still consider it a primitive\n return true;\n }\n return false;\n}\nexport function deep_equals(a, b, current_depth = 0, max_depth = 10) {\n if (current_depth === max_depth) {\n throw new Error('deep_equals exceeded maximum search depth');\n }\n for (const field in a) {\n // Typescript typeof type narrowing doesnt work properly for T[key] but it does for unknown..\n const a_value = a[field];\n const b_value = b[field];\n if (is_value_primitive(a_value) && a_value !== b_value) {\n return false;\n }\n else if (typeof a_value === 'object' && a_value !== null && typeof b_value === 'object' && b_value !== null) {\n // See if objects are equal in value defenition\n if (!deep_equals(a_value, b_value, current_depth + 1, max_depth)) {\n return false;\n }\n }\n }\n return true;\n}\n//# sourceMappingURL=utils.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { ShadowGenerator as BABYLON_ShadowGenerator } from '@inter-ikea-betrakta-babylonjs/core/Lights/Shadows/shadowGenerator.js';\nimport { RenderTargetTexture as BABYLON_RenderTargetTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/renderTargetTexture.js';\nimport { Light } from '../lights/Light.js';\nimport { assert } from '../../../utility/Assert.js';\nimport { deep_equals } from '../../../utility/utils.js';\nexport function is_polygon_offset_bias(bias) {\n return 'z_factor' in bias;\n}\nexport const SHADOW_DEFAULTS = {\n DIRECTIONAL_LIGHT: {\n resolution: 1024,\n near: 0.5,\n far: 20,\n webgl1_bias: {\n bias: 0.005\n },\n webgl2_bias: {\n z_factor: 4.0,\n z_units: 64.0\n }\n },\n SPOT_LIGHT: {\n resolution: 512,\n near: 0.1,\n far: 6,\n webgl1_bias: {\n bias: 0.02\n },\n webgl2_bias: {\n z_factor: 4.0,\n z_units: 64.0\n }\n },\n POINT_LIGHT: {\n resolution: 256,\n near: 0.1,\n far: 10,\n webgl1_bias: {\n bias: 0.02\n },\n webgl2_bias: {\n z_factor: 4.0,\n z_units: 64.0\n }\n }\n};\n/**\n * An abstract controller for a light's shadows.\n */\nexport class ShadowController {\n constructor(_light, _babylon_light, _light_system, _shadow_resolution, _shadow_near, _shadow_far, bias) {\n this._light = _light;\n this._babylon_light = _babylon_light;\n this._light_system = _light_system;\n this._shadow_resolution = _shadow_resolution;\n this._shadow_near = _shadow_near;\n this._shadow_far = _shadow_far;\n this._enable_shadows = false;\n this._babylon_shadow_generator = null;\n // State we store so we can properly clean up old shadowmaps when they get switched out (Babylon creates new ones when changing certain settings).\n // See function: setup_mesh_rendering_filter\n this._current_shadowmap = null;\n this._current_shadowmap_original_custom_is_ready_function = null;\n this._babylon_light.shadowEnabled = this._enable_shadows;\n this._shadow_casters = _light_system.shadow_casters;\n this._bias = Object.assign({}, bias);\n }\n dispose() {\n var _a;\n this.setup_mesh_rendering_filter(null);\n (_a = this._babylon_shadow_generator) === null || _a === void 0 ? void 0 : _a.dispose();\n this._babylon_shadow_generator = null;\n }\n update_bias_properties() {\n if (this._babylon_shadow_generator === null)\n return;\n if (is_polygon_offset_bias(this._bias)) {\n this._babylon_shadow_generator.bias = 0.0;\n }\n else {\n this._babylon_shadow_generator.bias = this._bias.bias;\n }\n }\n update(meshes_modifications) {\n this._babylon_light.shadowEnabled = this._enable_shadows;\n if (this._babylon_shadow_generator === null && this._enable_shadows) {\n // The shadowmap needs to be created\n this._babylon_shadow_generator = this.create_babylon_shadow_generator();\n this.update_bias_properties();\n // Unsure why we need to do this, but might have to do with applying the shadowmap to materials\n this._light_system.viewer.mark_scene_dirty();\n }\n else if (this._babylon_shadow_generator !== null && !this._enable_shadows) {\n // We should dispose the shadowmap\n this.setup_mesh_rendering_filter(null);\n this._babylon_shadow_generator.dispose();\n this._babylon_shadow_generator = null;\n }\n if (this._light.is_dirty(Light.DIRTY_SHADOW_NEAR | Light.DIRTY_ENABLE_SHADOWS)) {\n this._babylon_light.shadowMinZ = this._shadow_near;\n }\n if (this._light.is_dirty(Light.DIRTY_SHADOW_FAR | Light.DIRTY_ENABLE_SHADOWS)) {\n this._babylon_light.shadowMaxZ = this._shadow_far;\n }\n if (this._light.is_dirty(Light.DIRTY_SHADOW_BIAS)) {\n this.update_bias_properties();\n }\n if (this._light.is_dirty(Light.DIRTY_SHADOW_RESOLUTION | Light.DIRTY_ENABLE_SHADOWS) && this._babylon_shadow_generator !== null) {\n const shadowmap = this._babylon_shadow_generator.getShadowMap();\n assert(shadowmap, 'Shadowmap is not initialized');\n shadowmap.resize({ width: this._shadow_resolution, height: this._shadow_resolution });\n }\n const shadowmap_needs_update = this._light.is_dirty(Light.DIRTY_SHADOW_NEAR |\n Light.DIRTY_SHADOW_FAR |\n Light.DIRTY_SHADOW_RESOLUTION |\n Light.DIRTY_SHADOW_MAP |\n Light.DIRTY_ENABLE_SHADOWS);\n if (shadowmap_needs_update || this.should_update_shadowmap(meshes_modifications)) {\n this.update_babylon_shadowmap();\n }\n }\n add_shadowcaster(scene_object) {\n this.add_babylon_shadowcaster(scene_object)\n .then(() => this.update_babylon_shadowmap());\n }\n remove_shadowcaster(scene_object) {\n this.remove_babylon_shadowcaster(scene_object)\n .then(() => this.update_babylon_shadowmap());\n }\n /**\n * A per-mesh filter that allows us to do dynamic filter of objects to be rendered in the shadowmap.\n * Do remember that if you change something for the predicate, you have to dirty the shadowmap for it to re-render.\n * @param mesh The mesh to be rendered or not.\n */\n mesh_should_render(mesh) {\n return (mesh.layerMask & this._light_system.viewer.get_shadows_render_layer_mask().bitmap) !== 0;\n }\n /**\n * Sets up our custom mesh rendering filter, allowing us to have render layers for shadowmaps.\n * Currently only used with a global layer mask from the Viewer\n * @param shadowmap The shadowmap currently rendered with. Early outs if it's the same as previously.\n */\n setup_mesh_rendering_filter(shadowmap) {\n // Babylon shadow generators do have a user-settable predicate to decide if a given sub mesh should be rendered or not.\n // However, we can't retrace the original mesh from the submesh (seems to be due to our cloning.), so we have to do it on the customIsReadyFunction on the render target.\n // In Babylon's current implementation, it is just a \"return true\", but for futureproofing we're also calling their function.\n // Early out if nothing has changed since last time\n if (shadowmap === this._current_shadowmap)\n return;\n if (this._current_shadowmap !== null) {\n // Clean up the old shadowmap, restoring its customIsReadyFunction\n this._current_shadowmap.customIsReadyFunction = this._current_shadowmap_original_custom_is_ready_function;\n this._current_shadowmap_original_custom_is_ready_function = null;\n }\n this._current_shadowmap = shadowmap;\n if (shadowmap !== null) {\n // If the new shadowmap exists, store away its original customIsReadyFunction and set up the new predicate.\n this._current_shadowmap_original_custom_is_ready_function = shadowmap.customIsReadyFunction;\n shadowmap.customIsReadyFunction = (mesh, refresh_rate, pre_warm) => {\n return this.mesh_should_render(mesh) && this._current_shadowmap_original_custom_is_ready_function(mesh, refresh_rate, pre_warm);\n };\n }\n }\n render() {\n var _a, _b, _c;\n const shadowmap = (_a = this._babylon_shadow_generator) === null || _a === void 0 ? void 0 : _a.getShadowMap();\n if (shadowmap === null || shadowmap === void 0 ? void 0 : shadowmap._shouldRender()) {\n this.setup_mesh_rendering_filter(shadowmap);\n this._babylon_light.getScene().incrementRenderId();\n (_c = (_b = this._babylon_shadow_generator) === null || _b === void 0 ? void 0 : _b.getShadowMap()) === null || _c === void 0 ? void 0 : _c.render(false, false);\n }\n }\n get enable_shadows() {\n return this._enable_shadows;\n }\n set enable_shadows(value) {\n if (this._enable_shadows === value)\n return;\n if (value && !this._light_system.can_enable_shadow()) {\n console.warn(`Unable to enable shadow for light with id: ${this._light.id}. Maximum number of shadowcasting lights reached`);\n return;\n }\n this._enable_shadows = value;\n this._light.mark_dirty(Light.DIRTY_ENABLE_SHADOWS);\n }\n get_bias() {\n return Object.assign({}, this._bias);\n }\n set_bias(bias) {\n if (deep_equals(this._bias, bias)) {\n return;\n }\n this._bias = Object.assign({}, bias);\n this._light.mark_dirty(Light.DIRTY_SHADOW_BIAS | Light.DIRTY_SHADOW_MAP);\n }\n get shadow_near() {\n return this._shadow_near;\n }\n set shadow_near(value) {\n if (this._shadow_near === value)\n return;\n this._shadow_near = value;\n this._light.mark_dirty(Light.DIRTY_SHADOW_NEAR);\n }\n get shadow_far() {\n return this._shadow_far;\n }\n set shadow_far(value) {\n if (this._shadow_far === value)\n return;\n this._shadow_far = value;\n this._light.mark_dirty(Light.DIRTY_SHADOW_FAR);\n }\n get shadow_resolution() {\n return this._shadow_resolution;\n }\n set shadow_resolution(value) {\n if (this._shadow_resolution === value)\n return;\n this._shadow_resolution = value;\n this._light.mark_dirty(Light.DIRTY_SHADOW_RESOLUTION);\n }\n update_babylon_shadowmap() {\n var _a, _b;\n (_b = (_a = this._babylon_shadow_generator) === null || _a === void 0 ? void 0 : _a.getShadowMap()) === null || _b === void 0 ? void 0 : _b.resetRefreshCounter();\n }\n create_babylon_shadow_generator() {\n // With WebGL 2, we can optimize Babylon shadowmap rendering by supplying this flag.\n const use_red_rendertarget = this._babylon_light.getEngine().webGLVersion === 2;\n // This only seems necessary in WebGL1 for some reason, otherise we get artifacts.\n const use_full_float = this._babylon_light.getEngine().webGLVersion === 1;\n const generator = new BABYLON_ShadowGenerator(this._shadow_resolution, this._babylon_light, use_full_float, undefined, use_red_rendertarget);\n generator.transparencyShadow = false;\n generator.usePercentageCloserFiltering = true;\n // Due to a Babylon bug - this actually means we always render front faces.\n // (Babylon doesn't seem to care about us being right-handed in shadow-rendering)\n generator.forceBackFacesOnly = true;\n generator.bias = 0.0;\n generator.normalBias = 0.0;\n const engine = this._babylon_light.getEngine();\n let restore_z_offset = 0.0;\n let restore_z_offset_units = 0.0;\n generator.onBeforeShadowMapRenderObservable.add(() => {\n const state = engine.depthCullingState;\n restore_z_offset = state.zOffset;\n restore_z_offset_units = state.zOffsetUnits;\n let z_factor = 0.0;\n let z_units = 0.0;\n if (is_polygon_offset_bias(this._bias)) {\n z_factor = this._bias.z_factor;\n z_units = this._bias.z_units;\n }\n engine.setZOffset(z_factor);\n engine.setZOffsetUnits(z_units);\n });\n generator.onAfterShadowMapRenderObservable.add(() => {\n engine.setZOffset(restore_z_offset);\n engine.setZOffsetUnits(restore_z_offset_units);\n });\n if (is_polygon_offset_bias(this._bias)) {\n generator.bias = 0.0;\n }\n else {\n generator.bias = this._bias.bias;\n }\n this._babylon_light.shadowMinZ = this._shadow_near;\n this._babylon_light.shadowMaxZ = this._shadow_far;\n this._light.unset_dirty_flags(Light.DIRTY_SHADOW_RESOLUTION |\n Light.DIRTY_SHADOW_NEAR |\n Light.DIRTY_SHADOW_FAR |\n Light.DIRTY_SHADOW_BIAS |\n Light.DIRTY_ENABLE_SHADOWS);\n this._shadow_casters.forEach(object => this.add_shadowcaster(object));\n const shadowmap = generator.getShadowMap();\n assert(shadowmap, 'Shadowmap is not initialized');\n // We want to manualy control shadowmap render\n shadowmap.refreshRate = BABYLON_RenderTargetTexture.REFRESHRATE_RENDER_ONCE;\n return generator;\n }\n add_babylon_shadowcaster(scene_object) {\n return __awaiter(this, void 0, void 0, function* () {\n yield scene_object.ready;\n scene_object.mesh_iterator(false, (child) => {\n var _a;\n (_a = this._babylon_shadow_generator) === null || _a === void 0 ? void 0 : _a.addShadowCaster(child, true);\n });\n });\n }\n remove_babylon_shadowcaster(scene_object) {\n return __awaiter(this, void 0, void 0, function* () {\n yield scene_object.ready;\n scene_object.mesh_iterator(false, (child) => {\n var _a;\n (_a = this._babylon_shadow_generator) === null || _a === void 0 ? void 0 : _a.removeShadowCaster(child, true);\n });\n });\n }\n}\n//# sourceMappingURL=ShadowController.js.map","import { clamp } from '../Math.js';\n/**\n * Utility class for creating and manipulating `IVector2` objects.\n */\nexport class IVector2 {\n constructor(x, y) {\n if (x !== undefined && y !== undefined) {\n return { x: x, y: y };\n }\n if (x !== undefined) {\n return { x: x, y: x };\n }\n return { x: 0, y: 0 };\n }\n /**\n * Returns a new `IVector2` object with all components set to 0.\n * @returns Anonymous object `{ x: 0, y: 0 }`\n */\n static Zero() {\n return new IVector2(0, 0);\n }\n /**\n * Returns a new `IVector2` object with all components set to 1.\n * @returns Anonymous object `{ x: 1, y: 1 }`\n */\n static One() {\n return new IVector2(1, 1);\n }\n /**\n * Type guard to check if the provided object is applicable to the `IVector2` interface.\n * @returns Type assertion if the object is applicable to the IVector2.\n */\n static is(value) {\n const vector = value;\n return typeof vector.x === 'number' && typeof vector.y === 'number';\n }\n /**\n * Creates a new `IVector2` object as a verbose copy of the provided vector.\n * @returns A new `IVector2` object.\n */\n static copy(vector) {\n return new IVector2(vector.x, vector.y);\n }\n /**\n * Copies the values from one `IVector2` object to another.\n * @note This method directly modifies the `result` vector.\n */\n static copy_to_ref(vector, result) {\n result.x = vector.x;\n result.y = vector.y;\n return result;\n }\n /**\n * Directly sets the values to a `IVector2` object.\n * @note This method directly modifies the `target` vector.\n */\n static set(target, x, y) {\n target.x = x;\n target.y = y;\n return target;\n }\n /**\n * Calculates the magnitude (length) of the given `IVector2`.\n * @returns The magnitude of the vector.\n */\n static magnitude(vector) {\n return Math.sqrt(IVector2.magnitude_squared(vector));\n }\n /**\n * Calculates the squared magnitude of the given `IVector2`.\n * This method is useful for performance-sensitive situations.\n * @returns The squared magnitude of the vector.\n */\n static magnitude_squared(vector) {\n return Math.pow(vector.x, 2) + Math.pow(vector.y, 2);\n }\n /**\n * Normalizes the given `IVector2` object and returns a new object with the normalized values.\n * @returns A new `IVector2` object.\n */\n static normalize(vector) {\n const magnitude = IVector2.magnitude(vector);\n if (magnitude === 0) {\n // TODO: Add a verbose warning.\n }\n return new IVector2(vector.x / magnitude, vector.y / magnitude);\n }\n /**\n * Calculates the distance between two `IVector2` instances.\n * @returns The distance between vector1 and vector2.\n */\n static distance(vector1, vector2) {\n return Math.sqrt(IVector2.distance_squared(vector1, vector2));\n }\n /**\n * Calculates the squared distance between two `IVector3` instances.\n * This method is useful for performance-sensitive situations.\n * @returns The squared distance between vector1 and vector2.\n */\n static distance_squared(vector1, vector2) {\n const dx = vector1.x - vector2.x;\n const dy = vector1.y - vector2.y;\n return Math.pow(dx, 2) + Math.pow(dy, 2);\n }\n /**\n * Scales an `IVector2` object by a scalar.\n * @returns A new `IVector2` object.\n */\n static scale(vector, scalar) {\n return new IVector2(vector.x * scalar, vector.y * scalar);\n }\n /**\n * Checks if two `IVector2` objects are equal by comparing their components.\n * @returns True if the components of vector1 and vector2 are exactly equal.\n */\n static equals(vector1, vector2) {\n return vector1.x === vector2.x && vector1.y === vector2.y;\n }\n /**\n * Checks if two IVector2 instances are approximately equal using an epsilon.\n * This is useful for dealing with floating-point precision issues.\n * @returns True if the differences of the components are less than epsilon.\n */\n static equals_with_epsilon(vector1, vector2, epsilon) {\n return Math.abs(vector1.x - vector2.x) < epsilon &&\n Math.abs(vector1.y - vector2.y) < epsilon;\n }\n /**\n * Adds two `IVector2` objects together and returns a new object with the result.\n * @returns A new `IVector2` objects.\n */\n static add(vector1, vector2) {\n return new IVector2(vector1.x + vector2.x, vector1.y + vector2.y);\n }\n /**\n * Substracts the second `IVector2` object from the first and returns a new object with the result.\n * @returns A new `IVector2` objects.\n */\n static subtract(vector1, vector2) {\n return new IVector2(vector1.x - vector2.x, vector1.y - vector2.y);\n }\n /**\n * Calculates the dot product of two `IVector2` objects.\n * @returns The dot product of two vectors.\n */\n static dot(vector1, vector2) {\n return vector1.x * vector2.x + vector1.y * vector2.y;\n }\n /**\n * Multiplies the components of two `IVector2` objects and returns a new object with the result.\n * @returns A new `IVector2` objects.\n */\n static multiply(vector1, vector2) {\n return new IVector2(vector1.x * vector2.x, vector1.y * vector2.y);\n }\n /**\n * Divides the components of the first `IVector2` object by the components of the second.\n * @returns A new `IVector2` objects.\n */\n static divide(vector1, vector2) {\n return new IVector2(vector1.x / vector2.x, vector1.y / vector2.y);\n }\n /**\n * Returns a new `IVector2` object representing the component-wise minimum of two vectors.\n * @returns A new `IVector2` object.\n */\n static min(vector1, vector2) {\n return new IVector2(Math.min(vector1.x, vector2.x), Math.min(vector1.y, vector2.y));\n }\n /**\n * Returns a new `IVector2` object representing the component-wise naximum of two vectors.\n * @returns A new `IVector2` object.\n */\n static max(vector1, vector2) {\n return new IVector2(Math.max(vector1.x, vector2.x), Math.max(vector1.y, vector2.y));\n }\n /**\n * Linearly interpolates between two `IVector2` objects by the given amount.\n * @param a The start `IVector2`.\n * @param b The end `IVector2`.\n * @param t The interpolation factor `0 - 1`.\n * @returns A new `IVector2` object.\n */\n static lerp(a, b, t) {\n return new IVector2(a.x * (1 - t) + b.x * t, a.y * (1 - t) + b.y * t);\n }\n static lerp_to_ref(a, b, t, result) {\n result.x = a.x * (1 - t) + b.x * t;\n result.y = a.y * (1 - t) + b.y * t;\n return result;\n }\n /**\n * Calculates the angle in radians between two IVector2 vectors.\n * @returns The angle in radians.\n */\n static angle(vector1, vector2) {\n const dot_product = IVector2.dot(vector1, vector2);\n const magnitude_product = IVector2.magnitude(vector1) * IVector2.magnitude(vector2);\n return Math.acos(clamp(dot_product / magnitude_product, -1.0, 1.0));\n }\n /**\n * Converts an `IVector2` object to an array of numbers `[ x, y ]`.\n * @returns An array `[ number, number ]`.\n */\n static to_array(vector2) {\n return [vector2.x, vector2.y];\n }\n /**\n * Converts an `IVector2` object to a `string`.\n * @returns A string in the format `{ x: number, y: number }`.\n */\n static to_string(vector) {\n return `{ x: ${vector.x}, y: ${vector.y} }`;\n }\n}\n//# sourceMappingURL=IVector2.js.map","/**\n * Utility class for creating and manipulating `IVector3` objects.\n */\nexport class IVector3 {\n constructor(x, y, z) {\n if (x !== undefined && y !== undefined && z !== undefined) {\n return { x: x, y: y, z: z };\n }\n if (x !== undefined) {\n return { x: x, y: x, z: x };\n }\n return { x: 0, y: 0, z: 0 };\n }\n /**\n * Returns a new `IVector3` object with all components set to 0.\n * @returns Anonymous object `{ x: 0, y: 0, z: 0 }`\n */\n static Zero() {\n return new IVector3();\n }\n /**\n * Returns a new `IVector3` object with all components set to 1.\n * @returns Anonymous object `{ x: 1, y: 1, z: 1 }`\n */\n static One() {\n return new IVector3(1);\n }\n /**\n * Returns a new `IVector3` object that points up.\n * @returns Anonymous object `{ x: 0, y: 1, z: 0 }`\n */\n static Up() {\n return new IVector3(0, 1, 0);\n }\n /**\n * Returns a new `IVector3` object that points down.\n * @returns Anonymous object `{ x: 0, y: -1, z: 0 }`\n */\n static Down() {\n return new IVector3(0, -1, 0);\n }\n /**\n * Returns a new `IVector3` object that points right.\n * @returns Anonymous object `{ x: 1, y: 0, z: 0 }`\n */\n static Right() {\n return new IVector3(1, 0, 0);\n }\n /**\n * Returns a new `IVector3` object that points left.\n * @returns anonymous object `{ x: -1, y: 0, z: 0 }`\n */\n static Left() {\n return new IVector3(-1, 0, 0);\n }\n /**\n * Returns a new `IVector3` object that points forward.\n * @returns Anonymous object `{ x: 0, y: 0, z: 1 }`\n */\n static Forward() {\n return new IVector3(0, 0, 1);\n }\n /**\n * @deprecated replaced with Backward().\n * Returns a new `IVector3` object that points backward.\n * @returns Anonymous object `{ x: 0, y: 0, z: -1 }`\n */\n static Back() {\n return new IVector3(0, 0, -1);\n }\n /**\n * Returns a new `IVector3` object that points backward.\n * @returns Anonymous object `{ x: 0, y: 0, z: -1 }`\n */\n static Backward() {\n return new IVector3(0, 0, -1);\n }\n /**\n * Type guard to check if the provided object is applicable to the `IVector3` interface.\n * @returns Type assertion if the object is applicable to the IVector3.\n */\n static is(value) {\n const vector = value;\n return typeof vector.x === 'number' && typeof vector.y === 'number' && typeof vector.z === 'number';\n }\n /**\n * Creates a new `IVector3` object as a verbose copy of the provided vector.\n * @returns A new `IVector3` object.\n */\n static copy(vector) {\n return new IVector3(vector.x, vector.y, vector.z);\n }\n /**\n * Copies the values from one `IVector3` object to another.\n * @note This method directly modifies the `result` vector.\n */\n static copy_to_ref(vector, result) {\n result.x = vector.x;\n result.y = vector.y;\n result.z = vector.z;\n return result;\n }\n /**\n * Creates an `IVector3` object from an array of numbers starting at the specified offset.\n * @returns A new `IVector3` object.\n */\n static from_array(array, offset = 0) {\n return new IVector3(array[offset], array[offset + 1], array[offset + 2]);\n }\n /**\n * Sets the values to an existing `IVector3` object from an array of numbers starting at the specified offset.\n * @note This method directly modifies the `result` vector.\n */\n static from_array_to_ref(array, offset, result) {\n result.x = array[offset];\n result.y = array[offset + 1];\n result.z = array[offset + 2];\n }\n /**\n * Directly sets the values to a `IVector3` object.\n * @note This method directly modifies the `target` vector.\n */\n static set(target, x, y, z) {\n target.x = x;\n target.y = y;\n target.z = z;\n return target;\n }\n /**\n * Calculates the magnitude (length) of the given `IVector3`.\n * @returns The magnitude of the vector.\n */\n static magnitude(vector) {\n return Math.sqrt(IVector3.magnitude_squared(vector));\n }\n /**\n * Calculates the squared magnitude of the given `IVector3`.\n * This method is useful for performance-sensitive situations.\n * @returns The squared magnitude of the vector.\n */\n static magnitude_squared(vector) {\n return Math.pow(vector.x, 2) + Math.pow(vector.y, 2) + Math.pow(vector.z, 2);\n }\n /**\n * Normalizes the given `IVector3` object and returns a new object with the normalized values.\n * @returns A new `IVector3` object.\n */\n static normalize(vector) {\n const magnitude = IVector3.magnitude(vector);\n if (magnitude === 0) {\n // TODO: Add a verbose warning.\n }\n return new IVector3(vector.x / magnitude, vector.y / magnitude, vector.z / magnitude);\n }\n /**\n * Normalizes the given `IVector3` if it's not the zero-vector and returns a new object with the normalized values, otherwise returns a new object with zeroes.\n * @returns A new `IVector3` object.\n */\n static normalize_safe(vector) {\n const magnitude = IVector3.magnitude(vector);\n if (magnitude === 0) {\n return new IVector3(0, 0, 0);\n }\n return new IVector3(vector.x / magnitude, vector.y / magnitude, vector.z / magnitude);\n }\n /**\n * Normalizes the given `IVector3` object values and sets them to the specified vector.\n * @note This method directly modifies the `result` vector.\n */\n static normalize_to_ref(vector, result) {\n const magnitude = IVector3.magnitude(vector);\n if (magnitude === 0) {\n // TODO: Add a verbose warning.\n }\n result.x = vector.x / magnitude;\n result.y = vector.y / magnitude;\n result.z = vector.z / magnitude;\n }\n /**\n * Normalizes the given `IVector3` object in place.\n * @note This method directly modifies the `result` vector.\n * @returns The modified `IVector3` object reference.\n */\n static normalize_in_place(vector) {\n const magnitude = IVector3.magnitude(vector);\n if (magnitude === 0) {\n // TODO: Add a verbose warning.\n }\n vector.x /= magnitude;\n vector.y /= magnitude;\n vector.z /= magnitude;\n return vector;\n }\n /**\n * Calculates the distance between two `IVector3` instances.\n * @returns The distance between vector1 and vector2.\n */\n static distance(vector1, vector2) {\n return Math.sqrt(IVector3.distance_squared(vector1, vector2));\n }\n /**\n * Calculates the squared distance between two `IVector3` instances.\n * This method is useful for performance-sensitive situations.\n * @returns The squared distance between vector1 and vector2.\n */\n static distance_squared(vector1, vector2) {\n const dx = vector1.x - vector2.x;\n const dy = vector1.y - vector2.y;\n const dz = vector1.z - vector2.z;\n return Math.pow(dx, 2) + Math.pow(dy, 2) + Math.pow(dz, 2);\n }\n /**\n * Scales an `IVector3` object by a scalar.\n * @returns A new `IVector3` object.\n */\n static scale(vector, scalar) {\n return new IVector3(vector.x * scalar, vector.y * scalar, vector.z * scalar);\n }\n /**\n * Scales an `IVector3` object values by a scalar and sets them to the specified vector.\n * @note This method directly modifies the `result` vector.\n */\n static scale_to_ref(vector, scalar, result) {\n result.x = vector.x * scalar;\n result.y = vector.y * scalar;\n result.z = vector.z * scalar;\n return result;\n }\n /**\n * Scales an IVector3 instance by a scalar in place, modifying its components directly.\n * @note This method directly modifies the `vector` instance.\n * @returns The modified `IVector3` object reference.\n */\n static scale_in_place(vector, scalar) {\n vector.x *= scalar;\n vector.y *= scalar;\n vector.z *= scalar;\n return vector;\n }\n /**\n * Takes a given vector and adds a scaled vector to it as a single operation\n * @param target the vector to work on\n * @param scalar value to scale vector with\n * @param vector vector to scale and add to target\n * @returns target\n */\n static add_scaled_in_place(target, scalar, vector) {\n IVector3.copy_to_ref(vector, IVector3.scale_cache);\n IVector3.scale_in_place(IVector3.scale_cache, scalar);\n IVector3.add_in_place(target, IVector3.scale_cache);\n return target;\n }\n /**\n * scales the second vector with the scalar and adds the result with the first vector\n * @param vector1 vector to add\n * @param scalar scalar for @param vector2\n * @param vector2 vector to scale with @param scalar\n * @returns @param vector1 added with scaled @param vector2\n */\n static add_scaled(vector1, scalar, vector2) {\n const result = IVector3.copy(vector1);\n return IVector3.add_scaled_in_place(result, scalar, vector2);\n }\n /**\n * Checks if two `IVector3` objects are equal by comparing their components.\n * @returns True if the components of vector1 and vector2 are exactly equal.\n */\n static equals(vector1, vector2) {\n return vector1.x === vector2.x && vector1.y === vector2.y && vector1.z === vector2.z;\n }\n /**\n * Checks if two IVector3 instances are approximately equal using an epsilon.\n * This is useful for dealing with floating-point precision issues.\n * @returns True if the differences of the components are less than epsilon.\n */\n static equals_with_epsilon(vector1, vector2, epsilon) {\n return Math.abs(vector1.x - vector2.x) < epsilon &&\n Math.abs(vector1.y - vector2.y) < epsilon &&\n Math.abs(vector1.z - vector2.z) < epsilon;\n }\n /**\n * Adds two `IVector3` objects together and returns a new object with the result.\n * @returns A new `IVector3` objects.\n */\n static add(vector1, vector2) {\n return new IVector3(vector1.x + vector2.x, vector1.y + vector2.y, vector1.z + vector2.z);\n }\n /**\n * Adds two `IVector3` objects together and sets the result to the specified vector.\n * @note This method directly modifies the `result` vector.\n */\n static add_to_ref(vector1, vector2, result) {\n result.x = vector1.x + vector2.x;\n result.y = vector1.y + vector2.y;\n result.z = vector1.z + vector2.z;\n return result;\n }\n /**\n * Adds the components of one `IVector3` object to another in place.\n * @note This method directly modifies the `target` vector.\n * @returns The modified `IVector3` object reference.\n */\n static add_in_place(target, addend) {\n target.x += addend.x;\n target.y += addend.y;\n target.z += addend.z;\n return target;\n }\n /**\n * Sums together the given values\n * @returns A new `IVector3` object\n */\n static sum(...values) {\n const sum = new IVector3(0, 0, 0);\n for (let i = 0; i < values.length; i++) {\n sum.x += values[i].x;\n sum.y += values[i].y;\n sum.z += values[i].z;\n }\n return sum;\n }\n /**\n * Substracts the second `IVector3` object from the first and returns a new object with the result.\n * @returns A new `IVector3` objects.\n */\n static subtract(vector1, vector2) {\n return new IVector3(vector1.x - vector2.x, vector1.y - vector2.y, vector1.z - vector2.z);\n }\n /**\n * Substracts the second `IVector3` object from the first and sets the result to the specified vector.\n * @note This method directly modifies the `result` vector.\n */\n static subtract_to_ref(vector1, vector2, result) {\n result.x = vector1.x - vector2.x;\n result.y = vector1.y - vector2.y;\n result.z = vector1.z - vector2.z;\n return result;\n }\n /**\n * Substracts the second `IVector3` object from the first in place.\n * @note This method directly modifies the `target` vector.\n * @returns The modified `IVector3` object reference.\n */\n static subtract_in_place(target, subtrahend) {\n target.x -= subtrahend.x;\n target.y -= subtrahend.y;\n target.z -= subtrahend.z;\n return target;\n }\n /**\n * Calculates the dot product of two `IVector3` objects.\n * @returns The dot product of two vectors.\n */\n static dot(vector1, vector2) {\n return vector1.x * vector2.x + vector1.y * vector2.y + vector1.z * vector2.z;\n }\n /**\n * Calculates the cross product of two`IVector3` objects.\n * @returns A new `IVector3` object representing the cross product of two vectors.\n */\n static cross(vector1, vector2) {\n return IVector3.cross_to_ref(vector1, vector2, new IVector3());\n }\n static cross_to_ref(vector1, vector2, result) {\n const x = vector1.y * vector2.z - vector1.z * vector2.y;\n const y = vector1.z * vector2.x - vector1.x * vector2.z;\n const z = vector1.x * vector2.y - vector1.y * vector2.x;\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n }\n /**\n * Multiplies the components of two `IVector3` objects and returns a new object with the result.\n * @returns A new `IVector3` objects.\n */\n static multiply(vector1, vector2) {\n return new IVector3(vector1.x * vector2.x, vector1.y * vector2.y, vector1.z * vector2.z);\n }\n /**\n * Multiplies the components of two `IVector3` objects and sets the values to the specified vector.\n * @note This method directly modifies the `result` vector.\n */\n static multiply_to_ref(vector1, vector2, result) {\n result.x = vector1.x * vector2.x;\n result.y = vector1.y * vector2.y;\n result.z = vector1.z * vector2.z;\n return result;\n }\n /**\n * Multiplies the components of the one `IVector3` object by another in place.\n * @note This method directly modifies the `target` vector.\n * @returns The modified `IVector3` object reference.\n */\n static multiply_in_place(target, multiplier) {\n target.x *= multiplier.x;\n target.y *= multiplier.y;\n target.z *= multiplier.z;\n return target;\n }\n /**\n * Divides the components of the first `IVector3` object by the components of the second.\n * @returns A new `IVector3` objects.\n */\n static divide(vector1, vector2) {\n return new IVector3(vector1.x / vector2.x, vector1.y / vector2.y, vector1.z / vector2.z);\n }\n /**\n * Divides the components of the first `IVector3` object by the components of the second.\n * @note This method directly modifies the `result` vector.\n */\n static divide_to_ref(vector1, vector2, result) {\n result.x = vector1.x / vector2.x;\n result.y = vector1.y / vector2.y;\n result.z = vector1.z / vector2.z;\n return result;\n }\n /**\n * Divides the components of the first `IVector3` object by the components of the second in place.\n * @note This method directly modifies the `target` vector.\n * @returns The modified `IVector3` object reference.\n */\n static divide_in_place(target, divisor) {\n target.x /= divisor.x;\n target.y /= divisor.y;\n target.z /= divisor.z;\n return target;\n }\n /**\n * Returns a new `IVector3` object representing the component-wise minimum of two vectors.\n * @returns A new `IVector3` object.\n */\n static min(vector1, vector2) {\n return new IVector3(Math.min(vector1.x, vector2.x), Math.min(vector1.y, vector2.y), Math.min(vector1.z, vector2.z));\n }\n /**\n * Returns a new `IVector3` object representing the component-wise naximum of two vectors.\n * @returns A new `IVector3` object.\n */\n static max(vector1, vector2) {\n return new IVector3(Math.max(vector1.x, vector2.x), Math.max(vector1.y, vector2.y), Math.max(vector1.z, vector2.z));\n }\n /**\n * Sets the component-wise minimum of two `IVector3` objects to the specified vector.\n * @note This method directly modifies the `result` vector.\n */\n static min_to_ref(vector1, vector2, result) {\n result.x = Math.min(vector1.x, vector2.x);\n result.y = Math.min(vector1.y, vector2.y);\n result.z = Math.min(vector1.z, vector2.z);\n return result;\n }\n /**\n * Sets the component-wise maximum of two `IVector3` objects to the specified vector.\n * @note This method directly modifies the `result` vector.\n */\n static max_to_ref(vector1, vector2, result) {\n result.x = Math.max(vector1.x, vector2.x);\n result.y = Math.max(vector1.y, vector2.y);\n result.z = Math.max(vector1.z, vector2.z);\n return result;\n }\n static lerp(a, b, t) {\n if (typeof t === 'number') {\n const inverse_amount = 1.0 - t;\n return new IVector3(a.x * inverse_amount + b.x * t, a.y * inverse_amount + b.y * t, a.z * inverse_amount + b.z * t);\n }\n else {\n return new IVector3(a.x * (1.0 - t.x) + b.x * t.x, a.y * (1.0 - t.y) + b.y * t.y, a.z * (1.0 - t.z) + b.z * t.z);\n }\n }\n static lerp_to_ref(a, b, t, result) {\n if (typeof t === 'number') {\n const inverse_amount = 1.0 - t;\n result.x = a.x * inverse_amount + b.x * t;\n result.y = a.y * inverse_amount + b.y * t;\n result.z = a.z * inverse_amount + b.z * t;\n }\n else {\n result.x = a.x * (1.0 - t.x) + b.x * t.x;\n result.y = a.y * (1.0 - t.y) + b.y * t.y;\n result.z = a.z * (1.0 - t.z) + b.z * t.z;\n }\n return result;\n }\n /**\n * Calculates the angle in radians between two IVector3 vectors.\n * @returns The angle in radians.\n */\n static angle(vector1, vector2) {\n return Math.acos(IVector3.dot(vector1, vector2) / (IVector3.magnitude(vector1) * IVector3.magnitude(vector2)));\n }\n /**\n * Calculates a vector perpendicular to the given `IVector3` vector.\n * @returns A new `IVector3` object.\n */\n static perpendicular(v) {\n if (Math.abs(v.y) < Math.abs(v.x)) {\n return new IVector3(v.z, 0, -v.x);\n }\n else {\n return new IVector3(0, v.z, -v.y);\n }\n }\n /**\n * Project a `IVector3` onto a plane and return resulting `IVector3`.\n * @returns A new `IVector3` object.\n */\n static project_on_plane(vector, plane_normal) {\n const ortho_component = IVector3.scale(plane_normal, IVector3.dot(vector, plane_normal));\n return IVector3.subtract(vector, ortho_component);\n }\n /**\n * Converts an `IVector3` object to an array of numbers `[ x, y, z ]`.\n * @returns An array `[ number, number, number ]`.\n */\n static to_array(vector3) {\n return [vector3.x, vector3.y, vector3.z];\n }\n /**\n * Converts an `IVector3` object to a `string`.\n * @returns A string in the format `{ x: number, y: number, z: number }`.\n */\n static to_string(vector) {\n return `{ x: ${vector.x}, y: ${vector.y}, z: ${vector.z} }`;\n }\n}\nIVector3.scale_cache = new IVector3();\n//# sourceMappingURL=IVector3.js.map","/**\n * Utility class for creating and manipulating `IVector4` objects.\n */\nexport class IVector4 {\n constructor(x, y, z, w) {\n if (x !== undefined && y !== undefined && z !== undefined && w !== undefined) {\n return { x: x, y: y, z: z, w: w };\n }\n if (x !== undefined) {\n return { x: x, y: x, z: x, w: x };\n }\n return { x: 0, y: 0, z: 0, w: 0 };\n }\n /**\n * Returns a new `IVector4` object with all components set to 0.\n * @returns Anonymous object `{ x: 0, y: 0, z: 0, w: 0 }`\n */\n static Zero() {\n return new IVector4(0, 0, 0, 0);\n }\n /**\n * Returns a new `IVector4` object with all components set to 1.\n * @returns Anonymous object `{ x: 1, y: 1, z: 1, w: 1 }`\n */\n static One() {\n return new IVector4(1, 1, 1, 1);\n }\n /**\n * Type guard to check if the provided object is applicable to the `IVector4` interface.\n * @returns Type assertion if the object is applicable to the IVector4.\n */\n static is(value) {\n const vector = value;\n return typeof vector.x === 'number' && typeof vector.y === 'number' && typeof vector.z === 'number' && typeof vector.w === 'number';\n }\n /**\n * Creates a new `IVector4` object as a verbose copy of the provided vector.\n * @returns A new `IVector4` object.\n */\n static copy(vector) {\n return new IVector4(vector.x, vector.y, vector.z, vector.w);\n }\n /**\n * Copies the values from one `IVector4` object to another.\n * @note This method directly modifies the `result` vector.\n */\n static copy_to_ref(vector, result) {\n result.x = vector.x;\n result.y = vector.y;\n result.z = vector.z;\n result.w = vector.w;\n return result;\n }\n /**\n * Directly sets the values to a `IVector4` object.\n * @note This method directly modifies the `target` vector.\n */\n static set(target, x, y, z, w) {\n target.x = x;\n target.y = y;\n target.z = z;\n target.w = w;\n return target;\n }\n /**\n * Calculates the magnitude (length) of the given `IVector4`.\n * @returns The magnitude of the vector.\n */\n static magnitude(vector) {\n return Math.sqrt(IVector4.magnitude_squared(vector));\n }\n /**\n * Calculates the squared magnitude of the given `IVector4`.\n * This method is useful for performance-sensitive situations.\n * @returns The squared magnitude of the vector.\n */\n static magnitude_squared(vector) {\n return Math.pow(vector.x, 2) + Math.pow(vector.y, 2) + Math.pow(vector.z, 2) + Math.pow(vector.w, 2);\n }\n /**\n * Normalizes the given `IVector4` object and returns a new object with the normalized values.\n * @returns A new `IVector4` object.\n */\n static normalize(vector) {\n const magnitude = IVector4.magnitude(vector);\n if (magnitude === 0) {\n // TODO: Add a verbose warning.\n }\n return new IVector4(vector.x / magnitude, vector.y / magnitude, vector.z / magnitude, vector.w / magnitude);\n }\n /**\n * Calculates the distance between two `IVector4` instances.\n * @returns The distance between vector1 and vector2.\n */\n static distance(vector1, vector2) {\n return Math.sqrt(IVector4.distance_squared(vector1, vector2));\n }\n /**\n * Calculates the squared distance between two `IVector4` instances.\n * This method is useful for performance-sensitive situations.\n * @returns The squared distance between vector1 and vector2.\n */\n static distance_squared(vector1, vector2) {\n const dx = vector1.x - vector2.x;\n const dy = vector1.y - vector2.y;\n const dz = vector1.z - vector2.z;\n const dw = vector1.w - vector2.w;\n return Math.pow(dx, 2) + Math.pow(dy, 2) + Math.pow(dz, 2) + Math.pow(dw, 2);\n }\n /**\n * Scales an `IVector4` object by a scalar.\n * @returns A new `IVector4` object.\n */\n static scale(vector, scalar) {\n return new IVector4(vector.x * scalar, vector.y * scalar, vector.z * scalar, vector.w * scalar);\n }\n /**\n * Scales an IVector4 instance by a scalar in place, modifying its components directly.\n * @note This method directly modifies the `vector` instance.\n * @returns The modified `IVector4` object reference.\n */\n static scale_in_place(vector, scalar) {\n vector.x *= scalar;\n vector.y *= scalar;\n vector.z *= scalar;\n vector.w *= scalar;\n return vector;\n }\n /**\n * Checks if two `IVector4` objects are equal by comparing their components.\n * @returns True if the components of vector1 and vector2 are exactly equal.\n */\n static equals(vector1, vector2) {\n return vector1.x === vector2.x && vector1.y === vector2.y && vector1.z === vector2.z && vector1.w === vector2.w;\n }\n /**\n * Checks if two IVector4 instances are approximately equal using an epsilon.\n * This is useful for dealing with floating-point precision issues.\n * @returns True if the differences of the components are less than epsilon.\n */\n static equals_with_epsilon(vector1, vector2, epsilon) {\n return Math.abs(vector1.x - vector2.x) < epsilon &&\n Math.abs(vector1.y - vector2.y) < epsilon &&\n Math.abs(vector1.z - vector2.z) < epsilon &&\n Math.abs(vector1.w - vector2.w) < epsilon;\n }\n /**\n * Adds two `IVector4` objects together and returns a new object with the result.\n * @returns A new `IVector4` objects.\n */\n static add(vector1, vector2) {\n return new IVector4(vector1.x + vector2.x, vector1.y + vector2.y, vector1.z + vector2.z, vector1.w + vector2.w);\n }\n /**\n * Substracts the second `IVector4` object from the first and returns a new object with the result.\n * @returns A new `IVector4` objects.\n */\n static subtract(vector1, vector2) {\n return new IVector4(vector1.x - vector2.x, vector1.y - vector2.y, vector1.z - vector2.z, vector1.w - vector2.w);\n }\n /**\n * Calculates the dot product of two `IVector4` objects.\n * @returns The dot product of two vectors.\n */\n static dot(vector1, vector2) {\n return vector1.x * vector2.x + vector1.y * vector2.y + vector1.z * vector2.z + vector1.w * vector2.w;\n }\n /**\n * Multiplies the components of two `IVector4` objects and returns a new object with the result.\n * @returns A new `IVector4` objects.\n */\n static multiply(vector1, vector2) {\n return new IVector4(vector1.x * vector2.x, vector1.y * vector2.y, vector1.z * vector2.z, vector1.w * vector2.w);\n }\n /**\n * Divides the components of the first `IVector4` object by the components of the second.\n * @returns A new `IVector4` objects.\n */\n static divide(vector1, vector2) {\n return new IVector4(vector1.x / vector2.x, vector1.y / vector2.y, vector1.z / vector2.z, vector1.w / vector2.w);\n }\n /**\n * Returns a new `IVector4` object representing the component-wise minimum of two vectors.\n * @returns A new `IVector4` object.\n */\n static min(vector1, vector2) {\n return new IVector4(Math.min(vector1.x, vector2.x), Math.min(vector1.y, vector2.y), Math.min(vector1.z, vector2.z), Math.min(vector1.w, vector2.w));\n }\n /**\n * Returns a new `IVector4` object representing the component-wise maximum of two vectors.\n * @returns A new `IVector4` object.\n */\n static max(vector1, vector2) {\n return new IVector4(Math.max(vector1.x, vector2.x), Math.max(vector1.y, vector2.y), Math.max(vector1.z, vector2.z), Math.max(vector1.w, vector2.w));\n }\n /**\n * Linearly interpolates between two `IVector4` objects by the given amount.\n * @param a The start `IVector4`.\n * @param b The end `IVector4`.\n * @param t The interpolation factor `0 - 1`.\n * @returns A new `IVector4` object.\n */\n static lerp(a, b, t) {\n return IVector4.lerp_to_ref(a, b, t, new IVector4());\n }\n /**\n * Linearly interpolates between two `IVector4` objects by the given amount.\n * @param a The start `IVector4`.\n * @param b The end `IVector4`.\n * @param t The interpolation factor `0 - 1`.\n * @param ref The `IVector4` to store result in.\n * @returns ref parameter.\n */\n static lerp_to_ref(a, b, t, ref) {\n ref.x = a.x * (1 - t) + b.x * t;\n ref.y = a.y * (1 - t) + b.y * t;\n ref.z = a.z * (1 - t) + b.z * t;\n ref.w = a.w * (1 - t) + b.w * t;\n return ref;\n }\n /**\n * Converts an `IVector4` object to an array of numbers `[ x, y, z, w ]`.\n * @returns An array `[ number, number, number, number ]`.\n */\n static to_array(vector3) {\n return [vector3.x, vector3.y, vector3.z, vector3.w];\n }\n /**\n * Converts an `IVector4` object to a `string`.\n * @returns A string in the format `{ x: number, y: number, z: number, w: number }`.\n */\n static to_string(vector) {\n return `{ x: ${vector.x}, y: ${vector.y}, z: ${vector.z}, w: ${vector.w}`;\n }\n}\n//# sourceMappingURL=IVector4.js.map","/* eslint-disable @typescript-eslint/naming-convention */\nimport { clamp } from '../Math.js';\n/**\n * Utility class for creating and manipulating `IColor` objects.\n */\nexport class IColor {\n constructor(r, g, b) {\n if (r !== undefined && g !== undefined && b !== undefined) {\n return { r: r, g: g, b: b };\n }\n return { r: 0, g: 0, b: 0 };\n }\n /**\n * Type guard to check if the provided object is applicable to the `IColor` interface.\n * @returns Type assertion if the object is applicable to the IColor.\n */\n static is(unknown) {\n const color = unknown;\n return typeof color.r === 'number' && typeof color.g === 'number' && typeof color.b === 'number';\n }\n /**\n * Checks if two `IColor` objects are equal by comparing their components.\n * @returns True if the components of color1 and color2 are exactly equal.\n */\n static equals(color1, color2) {\n return color1.r === color2.r && color1.g === color2.g && color1.b === color2.b;\n }\n /**\n * Creates a new `IColor` object as a verbose copy of the provided color.\n * @returns A new `IColor` object.\n */\n static copy(color) {\n return new IColor(color.r, color.g, color.b);\n }\n /**\n * Copies the values from one `IColor` object to another.\n * @note This method directly modifies the `result` color.\n */\n static copy_to_ref(color, result) {\n result.r = color.r;\n result.g = color.g;\n result.b = color.b;\n return result;\n }\n /**\n * Directly sets the values to a `IColor` object.\n * @note This method directly modifies the `target` color.\n */\n static set(color, r, g, b) {\n color.r = r;\n color.g = g;\n color.b = b;\n return color;\n }\n /**\n * Creates a new `IColor` object from provided `hex` string.\n * @returns A new `IColor` object.\n */\n static from_HEX(hex) {\n hex = hex.replace('#', '');\n const v = parseInt(hex, 16);\n let b = v & 0xff;\n let g = (v >> 8) & 0xff;\n let r = (v >> 16) & 0xff;\n r /= 255.0;\n g /= 255.0;\n b /= 255.0;\n return { r: r, g: g, b: b };\n }\n /**\n * Creates a new `IColor` object from provided temperature in kelvin.\n * Conversion algorithm from http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/\n * Returns an IColor in sRGB color space.\n * @returns A new `IColor` object.\n */\n static from_temperature(kelvin) {\n const temperature_scaled = kelvin / 100;\n let red, green, blue;\n if (temperature_scaled <= 66) {\n red = 255;\n green = temperature_scaled;\n green = 99.4708025861 * Math.log(green) - 161.1195681661;\n if (temperature_scaled <= 19) {\n blue = 0;\n }\n else {\n blue = temperature_scaled - 10;\n blue = 138.5177312231 * Math.log(blue) - 305.0447927307;\n }\n }\n else {\n red = temperature_scaled - 60;\n red = 329.698727446 * Math.pow(red, -0.1332047592);\n green = temperature_scaled - 60;\n green = 288.1221695283 * Math.pow(green, -0.0755148492);\n blue = 255;\n }\n return {\n r: clamp(red, 0, 255) / 255,\n g: clamp(green, 0, 255) / 255,\n b: clamp(blue, 0, 255) / 255\n };\n }\n /**\n * Converts provided `IVector3` to sRGB color space.\n * @returns A new `IColor` object.\n */\n static to_sRGB(vector) {\n return {\n r: Math.pow(vector.x, 1 / 2.2),\n g: Math.pow(vector.y, 1 / 2.2),\n b: Math.pow(vector.z, 1 / 2.2)\n };\n }\n /**\n * Converts provided `IColor` to Linear color space represented as `IVector3`.\n * @returns A new `IVector3` object.\n */\n static to_linear_space(color) {\n return {\n x: Math.pow(color.r, 2.2),\n y: Math.pow(color.g, 2.2),\n z: Math.pow(color.b, 2.2)\n };\n }\n /**\n * Verifies if the provided `IColor` is within the specified range.\n * @returns `true` if the color is within the range.\n */\n static is_in_range(color, min, max) {\n return !(color.r < min || color.r > max || color.g < min || color.g > max || color.b < min || color.b > max);\n }\n /**\n * Verifies if the provided `IColor` is within `0 - 1` range.\n * @returns `true` if the color is within the range.\n */\n static is_saturated(color) {\n return !(color.r < 0 || color.r > 1 || color.g < 0 || color.g > 1 || color.b < 0 || color.b > 1);\n }\n static saturate(color) {\n return new IColor(clamp(color.r, 0, 1), clamp(color.g, 0, 1), clamp(color.b, 0, 1));\n }\n static saturate_to_ref(color, result) {\n result.r = clamp(color.r, 0, 1);\n result.g = clamp(color.g, 0, 1);\n result.b = clamp(color.b, 0, 1);\n return result;\n }\n /**\n * Converts an `IColor` object to an array of numbers `[ r, g, b ]`.\n * @returns An array `[ number, number, number ]`.\n */\n static to_array(color) {\n return [color.r, color.g, color.b];\n }\n /**\n * Converts an `IColor` object to a `string`.\n * @returns A string in the format `{ r: number, g: number, b: number }`.\n */\n static to_string(color) {\n return `{ r: ${color.r}, g: ${color.g}, b: ${color.b} }`;\n }\n}\n//# sourceMappingURL=IColor.js.map","/**\n * Utility class for creating and manipulating `IColor4` objects.\n */\nexport class IColor4 {\n constructor(r, g, b, a = 1) {\n if (r !== undefined && g !== undefined && b !== undefined) {\n return { r: r, g: g, b: b, a: a };\n }\n return { r: 0, g: 0, b: 0, a: 1 };\n }\n /**\n * Type guard to check if the provided object is applicable to the `IColor4` interface.\n * @returns Type assertion if the object is applicable to the IColor4.\n */\n static is(unknown) {\n const color = unknown;\n return typeof color.r === 'number' && typeof color.g === 'number' && typeof color.b === 'number' && typeof color.a === 'number';\n }\n /**\n * Checks if two `IColor4` objects are equal by comparing their components.\n * @returns True if the components of color1 and color2 are exactly equal.\n */\n static equals(color1, color2) {\n return color1.r === color2.r && color1.g === color2.g && color1.b === color2.b && color1.a === color2.a;\n }\n /**\n * Creates a new `IColor4` object as a verbose copy of the provided color.\n * @returns A new `IColor4` object.\n */\n static copy(color) {\n return new IColor4(color.r, color.g, color.b, color.a);\n }\n /**\n * Copies the values from one `IColor4` object to another.\n * @note This method directly modifies the `result` color.\n */\n static copy_to_ref(color, result) {\n result.r = color.r;\n result.g = color.g;\n result.b = color.b;\n result.a = color.a;\n return result;\n }\n /**\n * Directly sets the values to a `IColor4` object.\n * @note This method directly modifies the `target` color.\n */\n static set(color, r, g, b, a) {\n color.r = r;\n color.g = g;\n color.b = b;\n color.a = a;\n return color;\n }\n /**\n * Verifies if the provided `IColor4` is within the specified range.\n * @returns `true` if the color is within the range.\n */\n static is_in_range(color, min, max) {\n return !(color.r < min || color.r > max || color.g < min || color.g > max || color.b < min || color.b > max || color.a < min || color.a > max);\n }\n /**\n * Verifies if the provided `IColor4` is within `0 - 1` range.\n * @returns `true` if the color is within the range.\n */\n static is_saturated(color) {\n return !(color.r < 0 || color.r > 1 || color.g < 0 || color.g > 1 || color.b < 0 || color.b > 1 || color.a < 0 || color.a > 1);\n }\n /**\n * Converts provided `IVector4` to sRGB color space.\n * @returns A new `IColor4` object.\n */\n static to_sRGB(vector) {\n return {\n r: Math.pow(vector.x, 1 / 2.2),\n g: Math.pow(vector.y, 1 / 2.2),\n b: Math.pow(vector.z, 1 / 2.2),\n a: vector.w\n };\n }\n /**\n * Converts provided `IColor` to Linear color space represented as `IVector4`.\n * @returns A new `IVector4` object.\n */\n static to_linear_space(color) {\n return {\n x: Math.pow(color.r, 2.2),\n y: Math.pow(color.g, 2.2),\n z: Math.pow(color.b, 2.2),\n w: color.a\n };\n }\n /**\n * Converts an `IColor4` object to an array of numbers `[ r, g, b, a ]`.\n * @returns An array `[ number, number, number, number ]`.\n */\n static to_array(color) {\n return [color.r, color.g, color.b, color.a];\n }\n /**\n * Converts an `IColor4` object to a `string`.\n * @returns A string in the format `{ r: number, g: number, b: number, a: number }`.\n */\n static to_string(color) {\n return `{ r: ${color.r}, g: ${color.g}, b: ${color.b}, a: ${color.a} }`;\n }\n}\n//# sourceMappingURL=IColor4.js.map","import { IVector3 } from './IVector3.js';\nimport { IVector4 } from './IVector4.js';\n/**\n * Utility class for creating and manipulating `IMatrix4` objects.\n */\nexport class IMatrix4 {\n /**\n * Creates a new `IMatrix4` object filled with `0`.\n * @returns Anonymous object `IMatrix4`\n */\n constructor() {\n return [\n { x: 0, y: 0, z: 0, w: 0 },\n { x: 0, y: 0, z: 0, w: 0 },\n { x: 0, y: 0, z: 0, w: 0 },\n { x: 0, y: 0, z: 0, w: 0 }\n ];\n }\n /**\n * Creates an identity matrix.\n * @returns Anonymous object `IMatrix4`\n */\n static Identity() {\n return [\n { x: 1, y: 0, z: 0, w: 0 },\n { x: 0, y: 1, z: 0, w: 0 },\n { x: 0, y: 0, z: 1, w: 0 },\n { x: 0, y: 0, z: 0, w: 1 }\n ];\n }\n /**\n * Creates a translation matrix from `x`, `y`, `z` displacements.\n * @returns Anonymous object `IMatrix4`\n */\n static Translation(x, y, z) {\n return [\n { x: 1, y: 0, z: 0, w: 0 },\n { x: 0, y: 1, z: 0, w: 0 },\n { x: 0, y: 0, z: 1, w: 0 },\n { x: x, y: y, z: z, w: 1 }\n ];\n }\n /**\n * Creates a scale matrix from `x`, `y`, `z` scale factors.\n * @returns Anonymous object `IMatrix4`\n */\n static Scale(x, y, z) {\n return [\n { x: x, y: 0, z: 0, w: 0 },\n { x: 0, y: y, z: 0, w: 0 },\n { x: 0, y: 0, z: z, w: 0 },\n { x: 0, y: 0, z: 0, w: 1 }\n ];\n }\n /**\n * Creates a rotation matrix around the X-axis.\n * @returns Anonymous object `IMatrix4`\n */\n static Rotation_X(angle_in_radians) {\n const s = Math.sin(angle_in_radians);\n const c = Math.cos(angle_in_radians);\n return [\n { x: 1, y: 0, z: 0, w: 0 },\n { x: 0, y: c, z: -s, w: 0 },\n { x: 0, y: s, z: c, w: 0 },\n { x: 0, y: 0, z: 0, w: 1 }\n ];\n }\n /**\n * Creates a rotation matrix around the Y-axis.\n * @returns Anonymous object `IMatrix4`\n */\n static Rotation_Y(angle_in_radians) {\n const s = Math.sin(angle_in_radians);\n const c = Math.cos(angle_in_radians);\n return [\n { x: c, y: 0, z: s, w: 0 },\n { x: 0, y: 1, z: 0, w: 0 },\n { x: -s, y: 0, z: c, w: 0 },\n { x: 0, y: 0, z: 0, w: 1 }\n ];\n }\n /**\n * Creates a rotation matrix around the Z-axis.\n * @returns Anonymous object `IMatrix4`\n */\n static Rotation_Z(angle_in_radians) {\n const s = Math.sin(angle_in_radians);\n const c = Math.cos(angle_in_radians);\n return [\n { x: c, y: -s, z: 0, w: 0 },\n { x: s, y: c, z: 0, w: 0 },\n { x: 0, y: 0, z: 1, w: 0 },\n { x: 0, y: 0, z: 0, w: 1 }\n ];\n }\n /**\n * Extracts a rotation part from a matrix.\n * @returns Anonymous object `IMatrix4`\n */\n static extractRotationMatrix(matrix) {\n const row0 = IVector3.normalize(matrix[0]);\n const row1 = IVector3.normalize(matrix[1]);\n const row2 = IVector3.normalize(matrix[2]);\n return [\n { x: row0.x, y: row0.y, z: row0.z, w: 0 },\n { x: row1.x, y: row1.y, z: row1.z, w: 0 },\n { x: row2.x, y: row2.y, z: row2.z, w: 0 },\n { x: 0, y: 0, z: 0, w: 1 }\n ];\n }\n /**\n * Extracts scaling values from a matrix.\n * @returns A new `IVector3` object.\n */\n static getScaleValues(matrix) {\n const scaleX = IVector3.magnitude({ x: matrix[0].x, y: matrix[0].y, z: matrix[0].z });\n const scaleY = IVector3.magnitude({ x: matrix[1].x, y: matrix[1].y, z: matrix[1].z });\n const scaleZ = IVector3.magnitude({ x: matrix[2].x, y: matrix[2].y, z: matrix[2].z });\n return { x: scaleX, y: scaleY, z: scaleZ };\n }\n /**\n * Checks if the provided matrix is an identity matrix.\n * @returns `true` if the matrix is an identity matrix.\n */\n static is_identity(matrix) {\n return matrix[0].x === 1 && matrix[0].y === 0 && matrix[0].z === 0 && matrix[0].w === 0 &&\n matrix[1].x === 0 && matrix[1].y === 1 && matrix[1].z === 0 && matrix[1].w === 0 &&\n matrix[2].x === 0 && matrix[2].y === 0 && matrix[2].z === 1 && matrix[2].w === 0 &&\n matrix[3].x === 0 && matrix[3].y === 0 && matrix[3].z === 0 && matrix[3].w === 1;\n }\n static fill_in_place(matrix, value) {\n for (let i = 0; i < 4; i++) {\n matrix[i].x = value;\n matrix[i].y = value;\n matrix[i].z = value;\n matrix[i].w = value;\n }\n return matrix;\n }\n /**\n * Creates a new `IMatrix4` object as a verbose copy of the provided matrix.\n * @returns A new `IMatrix4` object.\n */\n static copy(matrix) {\n return [\n { x: matrix[0].x, y: matrix[0].y, z: matrix[0].z, w: matrix[0].w },\n { x: matrix[1].x, y: matrix[1].y, z: matrix[1].z, w: matrix[1].w },\n { x: matrix[2].x, y: matrix[2].y, z: matrix[2].z, w: matrix[2].w },\n { x: matrix[3].x, y: matrix[3].y, z: matrix[3].z, w: matrix[3].w }\n ];\n }\n /**\n * Copies the values from one `IMatrix4` object to another.\n * @note This method directly modifies the `result` matrix.\n */\n static copy_to_ref(matrix, result) {\n result[0].x = matrix[0].x;\n result[0].y = matrix[0].y;\n result[0].z = matrix[0].z;\n result[0].w = matrix[0].w;\n result[1].x = matrix[1].x;\n result[1].y = matrix[1].y;\n result[1].z = matrix[1].z;\n result[1].w = matrix[1].w;\n result[2].x = matrix[2].x;\n result[2].y = matrix[2].y;\n result[2].z = matrix[2].z;\n result[2].w = matrix[2].w;\n result[3].x = matrix[3].x;\n result[3].y = matrix[3].y;\n result[3].z = matrix[3].z;\n result[3].w = matrix[3].w;\n return result;\n }\n /**\n * Calculates the determinant of the provided matrix.\n * @returns The determinant of the matrix.\n */\n static determinant(m) {\n const { m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44 } = IMatrix4.to_matrix_object(m);\n // Determinant components\n const det_33_44 = m33 * m44 - m34 * m43;\n const det_32_44 = m32 * m44 - m34 * m42;\n const det_32_43 = m32 * m43 - m33 * m42;\n const det_31_44 = m31 * m44 - m34 * m41;\n const det_31_43 = m31 * m43 - m33 * m41;\n const det_31_42 = m31 * m42 - m32 * m41;\n // Cofactor calculations\n const cofact_11 = +(m22 * det_33_44 - m23 * det_32_44 + m24 * det_32_43);\n const cofact_12 = -(m21 * det_33_44 - m23 * det_31_44 + m24 * det_31_43);\n const cofact_13 = +(m21 * det_32_44 - m22 * det_31_44 + m24 * det_31_42);\n const cofact_14 = -(m21 * det_32_43 - m22 * det_31_43 + m23 * det_31_42);\n return m11 * cofact_11 + m12 * cofact_12 + m13 * cofact_13 + m14 * cofact_14;\n }\n /**\n * Inverts the provided matrix.\n * @returns Anonymous object `IMatrix4`\n */\n static inverse(m) {\n const matrix = new IMatrix4();\n return this.inverse_to_ref(m, matrix);\n }\n /**\n * Inverts the provided matrix in place.\n * @note This method directly modifies the matrix.\n * @returns The modified `IMatrix4` object reference.\n */\n static inverse_in_place(m) {\n return this.inverse_to_ref(m, m);\n }\n /**\n * Inverts the provided matrix and writes the result to the `result` matrix.\n * @note This method directly modifies the `result` matrix.\n */\n static inverse_to_ref(m, result) {\n const { m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44 } = IMatrix4.to_matrix_object(m);\n // Determinant components\n const det_33_44 = m33 * m44 - m34 * m43;\n const det_32_44 = m32 * m44 - m34 * m42;\n const det_32_43 = m32 * m43 - m33 * m42;\n const det_31_44 = m31 * m44 - m34 * m41;\n const det_31_43 = m31 * m43 - m33 * m41;\n const det_31_42 = m31 * m42 - m32 * m41;\n const det_23_44 = m23 * m44 - m24 * m43;\n const det_22_44 = m22 * m44 - m24 * m42;\n const det_22_43 = m22 * m43 - m23 * m42;\n const det_21_44 = m21 * m44 - m24 * m41;\n const det_21_43 = m21 * m43 - m23 * m41;\n const det_21_42 = m21 * m42 - m22 * m41;\n const det_23_34 = m23 * m34 - m24 * m33;\n const det_22_34 = m22 * m34 - m24 * m32;\n const det_22_33 = m22 * m33 - m23 * m32;\n const det_21_34 = m21 * m34 - m24 * m31;\n const det_21_33 = m21 * m33 - m23 * m31;\n const det_21_32 = m21 * m32 - m22 * m31;\n // Cofactors for m11, m12, m13, m14\n const cofact_11 = +(m22 * det_33_44 - m23 * det_32_44 + m24 * det_32_43);\n const cofact_12 = -(m21 * det_33_44 - m23 * det_31_44 + m24 * det_31_43);\n const cofact_13 = +(m21 * det_32_44 - m22 * det_31_44 + m24 * det_31_42);\n const cofact_14 = -(m21 * det_32_43 - m22 * det_31_43 + m23 * det_31_42);\n const det = m11 * cofact_11 + m12 * cofact_12 + m13 * cofact_13 + m14 * cofact_14;\n if (det === 0) {\n console.warn('Matrix determinant is zero so it could not be inverted');\n return IMatrix4.fill_in_place(result, Number.NaN);\n }\n const det_inv = 1 / det;\n // Cofactors for the inverse matrix\n const cofact_21 = -(m12 * det_33_44 - m13 * det_32_44 + m14 * det_32_43);\n const cofact_22 = +(m11 * det_33_44 - m13 * det_31_44 + m14 * det_31_43);\n const cofact_23 = -(m11 * det_32_44 - m12 * det_31_44 + m14 * det_31_42);\n const cofact_24 = +(m11 * det_32_43 - m12 * det_31_43 + m13 * det_31_42);\n const cofact_31 = +(m12 * det_23_44 - m13 * det_22_44 + m14 * det_22_43);\n const cofact_32 = -(m11 * det_23_44 - m13 * det_21_44 + m14 * det_21_43);\n const cofact_33 = +(m11 * det_22_44 - m12 * det_21_44 + m14 * det_21_42);\n const cofact_34 = -(m11 * det_22_43 - m12 * det_21_43 + m13 * det_21_42);\n const cofact_41 = -(m12 * det_23_34 - m13 * det_22_34 + m14 * det_22_33);\n const cofact_42 = +(m11 * det_23_34 - m13 * det_21_34 + m14 * det_21_33);\n const cofact_43 = -(m11 * det_22_34 - m12 * det_21_34 + m14 * det_21_32);\n const cofact_44 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\n IMatrix4.from_values_to_ref(cofact_11 * det_inv, cofact_21 * det_inv, cofact_31 * det_inv, cofact_41 * det_inv, cofact_12 * det_inv, cofact_22 * det_inv, cofact_32 * det_inv, cofact_42 * det_inv, cofact_13 * det_inv, cofact_23 * det_inv, cofact_33 * det_inv, cofact_43 * det_inv, cofact_14 * det_inv, cofact_24 * det_inv, cofact_34 * det_inv, cofact_44 * det_inv, result);\n return result;\n }\n /**\n * Calculates the inverse of the provided matrix with the assumption that it is an affine transform with an orthonormal rotation part.\n * Compared to a normal matrix inverse this method is faster & more precise when usable.\n * @returns A new matrix containing the result\n */\n static orthonormal_rotation_affine_transform_inverse(matrix) {\n const result = new IMatrix4();\n return IMatrix4.orthonormal_rotation_affine_transform_inverse_to_ref(matrix, result);\n }\n /**\n * Inverts the provided matrix with the assumption that it is an affine transform with an orthonormal rotation part, and writes the result to the `result` matrix.\n * Compared to a normal matrix inverse this method is faster & more precise when usable.\n * @note This method directly modifies the `result` matrix.\n */\n static orthonormal_rotation_affine_transform_inverse_to_ref(matrix, result) {\n // Store the inverse of the orthonormal rotation matrix\n IMatrix4.from_values_to_ref(matrix[0].x, matrix[1].x, matrix[2].x, 0, matrix[0].y, matrix[1].y, matrix[2].y, 0, matrix[0].z, matrix[1].z, matrix[2].z, 0, 0, 0, 0, 1, result);\n // Calculate the inverse position\n const inverse_position = IMatrix4.transform_vector4(result, matrix[3]);\n result[3].x = -inverse_position.x;\n result[3].y = -inverse_position.y;\n result[3].z = -inverse_position.z;\n return result;\n }\n /**\n * Multiplies two matrices and returns a new matrix.\n * @returns Anonymous object `IMatrix4`\n */\n static multiply(a, b) {\n const result = [\n { x: 0, y: 0, z: 0, w: 0 },\n { x: 0, y: 0, z: 0, w: 0 },\n { x: 0, y: 0, z: 0, w: 0 },\n { x: 0, y: 0, z: 0, w: 0 }\n ];\n for (let i = 0; i < 4; i++) {\n result[i].x = a[0].x * b[i].x + a[1].x * b[i].y + a[2].x * b[i].z + a[3].x * b[i].w;\n result[i].y = a[0].y * b[i].x + a[1].y * b[i].y + a[2].y * b[i].z + a[3].y * b[i].w;\n result[i].z = a[0].z * b[i].x + a[1].z * b[i].y + a[2].z * b[i].z + a[3].z * b[i].w;\n result[i].w = a[0].w * b[i].x + a[1].w * b[i].y + a[2].w * b[i].z + a[3].w * b[i].w;\n }\n return result;\n }\n static equals(matrix1, matrix2) {\n for (let i = 0; i < 4; i++) {\n if (matrix1[i].x !== matrix2[i].x ||\n matrix1[i].y !== matrix2[i].y ||\n matrix1[i].z !== matrix2[i].z ||\n matrix1[i].w !== matrix2[i].w) {\n return false;\n }\n }\n return true;\n }\n static lerp(a, b, t) {\n return IMatrix4.lerp_to_ref(a, b, t, new IMatrix4());\n }\n static lerp_to_ref(a, b, t, ref) {\n for (let i = 0; i < 4; i++) {\n IVector4.lerp_to_ref(a[i], b[i], t, ref[i]);\n }\n return ref;\n }\n /**\n * Transforms a `IVector3` by a matrix and returns a new vector.\n * Assumes w = 1\n * @returns A new `IVector3` object.\n */\n static transform_vector3(matrix, vector) {\n // We assume w is 1.\n return {\n x: matrix[0].x * vector.x + matrix[1].x * vector.y + matrix[2].x * vector.z + matrix[3].x,\n y: matrix[0].y * vector.x + matrix[1].y * vector.y + matrix[2].y * vector.z + matrix[3].y,\n z: matrix[0].z * vector.x + matrix[1].z * vector.y + matrix[2].z * vector.z + matrix[3].z\n };\n }\n /**\n * Transforms a `IVector3` by a matrix and writes the result into ref.\n * Assumes w = 1\n * @returns ref\n */\n static transform_vector3_to_ref(matrix, vector, ref) {\n // We assume w is 1.\n const x = matrix[0].x * vector.x + matrix[1].x * vector.y + matrix[2].x * vector.z + matrix[3].x;\n const y = matrix[0].y * vector.x + matrix[1].y * vector.y + matrix[2].y * vector.z + matrix[3].y;\n const z = matrix[0].z * vector.x + matrix[1].z * vector.y + matrix[2].z * vector.z + matrix[3].z;\n ref.x = x;\n ref.y = y;\n ref.z = z;\n return ref;\n }\n /**\n * Transforms a `IVector4` by a matrix and returns a new vector.\n * @returns A new `IVector4` object.\n */\n static transform_vector4(matrix, vector) {\n return {\n x: matrix[0].x * vector.x + matrix[1].x * vector.y + matrix[2].x * vector.z + matrix[3].x * vector.w,\n y: matrix[0].y * vector.x + matrix[1].y * vector.y + matrix[2].y * vector.z + matrix[3].y * vector.w,\n z: matrix[0].z * vector.x + matrix[1].z * vector.y + matrix[2].z * vector.z + matrix[3].z * vector.w,\n w: matrix[0].w * vector.x + matrix[1].w * vector.y + matrix[2].w * vector.z + matrix[3].w * vector.w\n };\n }\n static transform_vector4_to_ref(matrix, vector, result) {\n const x = matrix[0].x * vector.x + matrix[1].x * vector.y + matrix[2].x * vector.z + matrix[3].x * vector.w;\n const y = matrix[0].y * vector.x + matrix[1].y * vector.y + matrix[2].y * vector.z + matrix[3].y * vector.w;\n const z = matrix[0].z * vector.x + matrix[1].z * vector.y + matrix[2].z * vector.z + matrix[3].z * vector.w;\n const w = matrix[0].w * vector.x + matrix[1].w * vector.y + matrix[2].w * vector.z + matrix[3].w * vector.w;\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n }\n /**\n * Creates a new `IMatrix4` object from the provided values.\n * @returns Anonymous object `IMatrix4`\n */\n static from_values(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44) {\n const matrix = [\n { x: m11, y: m12, z: m13, w: m14 },\n { x: m21, y: m22, z: m23, w: m24 },\n { x: m31, y: m32, z: m33, w: m34 },\n { x: m41, y: m42, z: m43, w: m44 }\n ];\n return matrix;\n }\n /**\n * Creates a new `IMatrix4` object from the provided values and writes the result to the `result` matrix.\n * @note This method directly modifies the `result` matrix.\n */\n static from_values_to_ref(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44, result) {\n result[0].x = m11;\n result[0].y = m12;\n result[0].z = m13;\n result[0].w = m14;\n result[1].x = m21;\n result[1].y = m22;\n result[1].z = m23;\n result[1].w = m24;\n result[2].x = m31;\n result[2].y = m32;\n result[2].z = m33;\n result[2].w = m34;\n result[3].x = m41;\n result[3].y = m42;\n result[3].z = m43;\n result[3].w = m44;\n return result;\n }\n /**\n * Creates a new `IMatrix4` object from the provided array.\n * @returns Anonymous object `IMatrix4`\n */\n static from_array(array, offset = 0) {\n return [\n { x: array[offset], y: array[offset + 1], z: array[offset + 2], w: array[offset + 3] },\n { x: array[offset + 4], y: array[offset + 5], z: array[offset + 6], w: array[offset + 7] },\n { x: array[offset + 8], y: array[offset + 9], z: array[offset + 10], w: array[offset + 11] },\n { x: array[offset + 12], y: array[offset + 13], z: array[offset + 14], w: array[offset + 15] }\n ];\n }\n static to_matrix_object(matrix) {\n return {\n m11: matrix[0].x, m12: matrix[0].y, m13: matrix[0].z, m14: matrix[0].w,\n m21: matrix[1].x, m22: matrix[1].y, m23: matrix[1].z, m24: matrix[1].w,\n m31: matrix[2].x, m32: matrix[2].y, m33: matrix[2].z, m34: matrix[2].w,\n m41: matrix[3].x, m42: matrix[3].y, m43: matrix[3].z, m44: matrix[3].w\n };\n }\n static transpose(source) {\n const transposed = new IMatrix4();\n transposed[0].x = source[0].x;\n transposed[0].y = source[1].x;\n transposed[0].z = source[2].x;\n transposed[0].w = source[3].x;\n transposed[1].x = source[0].y;\n transposed[1].y = source[1].y;\n transposed[1].z = source[2].y;\n transposed[1].w = source[3].y;\n transposed[2].x = source[0].z;\n transposed[2].y = source[1].z;\n transposed[2].z = source[2].z;\n transposed[2].w = source[3].z;\n transposed[3].x = source[0].w;\n transposed[3].y = source[1].w;\n transposed[3].z = source[2].w;\n transposed[3].w = source[3].w;\n return transposed;\n }\n /**\n * Creates a matrix positioned at 'position' and oriented towards 'target'.\n * The up vector is aligned to the plane along 'approximate_up' and the calculated forward vector.\n */\n static look_at(position, target, approximate_up) {\n const camera = new IMatrix4();\n const forward = IVector3.normalize(IVector3.subtract(target, position));\n const right = IVector3.normalize(IVector3.cross(forward, approximate_up));\n const up = IVector3.cross(right, forward);\n camera[0] = new IVector4(right.x, right.y, right.z, 0);\n camera[1] = new IVector4(up.x, up.y, up.z, 0);\n camera[2] = new IVector4(forward.x, forward.y, forward.z, 0);\n camera[3] = new IVector4(position.x, position.y, position.z, 1);\n return camera;\n }\n}\n//# sourceMappingURL=IMatrix4.js.map","import { IVector3 } from './IVector3.js';\nexport class IRay {\n constructor(origin, direction, length) {\n return {\n origin: origin,\n direction: direction,\n length: length !== null && length !== void 0 ? length : Number.MAX_VALUE\n };\n }\n /**\n * Checks if ray intersects aabb and returns the distance from ray origin to hit surface point of aabb\n * negative return value indicates a miss\n * @param ray to intersect with\n * @param bounding_box to intersect with\n * @param out_intersection_distances optional output variable to store intersection distances (near and far intersection)\n * @returns true if the infinite line along the ray intersects the bounding box\n */\n static intersects_bounding_box(ray, bounding_box, out_intersection_distances) {\n let tmin = Number.NEGATIVE_INFINITY;\n let tmax = Number.POSITIVE_INFINITY;\n if (ray.direction.x !== 0.0) {\n const t1 = (bounding_box.min.x - ray.origin.x) / ray.direction.x;\n const t2 = (bounding_box.max.x - ray.origin.x) / ray.direction.x;\n tmin = Math.max(tmin, Math.min(t1, t2));\n tmax = Math.min(tmax, Math.max(t1, t2));\n }\n if (ray.direction.y !== 0.0) {\n const t1 = (bounding_box.min.y - ray.origin.y) / ray.direction.y;\n const t2 = (bounding_box.max.y - ray.origin.y) / ray.direction.y;\n tmin = Math.max(tmin, Math.min(t1, t2));\n tmax = Math.min(tmax, Math.max(t1, t2));\n }\n if (ray.direction.z !== 0.0) {\n const t1 = (bounding_box.min.z - ray.origin.z) / ray.direction.z;\n const t2 = (bounding_box.max.z - ray.origin.z) / ray.direction.z;\n tmin = Math.max(tmin, Math.min(t1, t2));\n tmax = Math.min(tmax, Math.max(t1, t2));\n }\n if (tmin > tmax)\n return false;\n if (out_intersection_distances !== undefined) {\n out_intersection_distances.x = tmin;\n out_intersection_distances.y = tmax;\n }\n return true;\n }\n /**\n * Checks if ray intersects sphere and returns the distance from ray origin to hit surface point of sphere\n * negative return value indicates a miss\n * @param ray to intersect with\n * @param sphere to intersect with\n * @param out_intersection_distances optional output variable to store intersection distances (near and far intersection)\n * @returns >= 0 there is a hit and the value indicates the distance to the hit surface point of the sphere, negative value is miss\n */\n static intersects_sphere(ray, sphere, out_intersection_distances) {\n // https://iquilezles.org/articles/intersectors/\n const oc = IVector3.subtract(ray.origin, sphere.position);\n const b = IVector3.dot(oc, ray.direction);\n const c = IVector3.dot(oc, oc) - Math.pow(sphere.radius, 2);\n let h = b * b - c;\n if (h < 0)\n return false;\n h = Math.sqrt(h);\n if (out_intersection_distances !== undefined) {\n out_intersection_distances.x = -b - h;\n out_intersection_distances.y = -b + h;\n }\n return true;\n }\n /**\n * Calculates the point where the given ray and plane intersect\n * @returns The intersection point, regardless if it's \"behind\" the ray\n */\n static get_plane_intersection(ray, plane) {\n const inverse_dot = 1.0 / IVector3.dot(plane.normal, ray.direction);\n const intersection_distance = IVector3.dot(IVector3.subtract(plane.position, ray.origin), plane.normal) * (Number.isFinite(inverse_dot) ? inverse_dot : 0.0);\n const intersection_point = IVector3.add(ray.origin, IVector3.scale(ray.direction, intersection_distance));\n return intersection_point;\n }\n}\n//# sourceMappingURL=IRay.js.map","import { IBoundingBox } from './IBoundingBox.js';\nimport { IVector3 } from './IVector3.js';\nexport class IBoundingSphere {\n constructor(position, radius) {\n return {\n position: position,\n radius: radius\n };\n }\n static to_bounding_box(bounding_sphere) {\n const r = new IVector3(bounding_sphere.radius);\n return new IBoundingBox(IVector3.subtract(bounding_sphere.position, r), IVector3.add(bounding_sphere.position, r));\n }\n}\n//# sourceMappingURL=IBoundingSphere.js.map","import { IBoundingBox } from './IBoundingBox.js';\nimport { IBoundingSphere } from './IBoundingSphere.js';\nimport { IMatrix4 } from './IMatrix4.js';\nimport { IVector3 } from './IVector3.js';\nimport { IVector4 } from './IVector4.js';\nexport class ITransformedBoundingBox {\n constructor(local_bounding_box, transform) {\n return {\n local_bounding_box: local_bounding_box,\n transform: transform\n };\n }\n static get_center(bounds) {\n return IVector3.add_in_place(IBoundingBox.get_center(bounds.local_bounding_box), bounds.transform[3]);\n }\n static get_transformed_vertices(bounds) {\n const result = IBoundingBox.get_vertices(bounds.local_bounding_box);\n const vertex = new IVector3();\n for (let i = 0; i < 8; i++) {\n IVector3.copy_to_ref(result[i], vertex);\n IMatrix4.transform_vector3_to_ref(bounds.transform, vertex, result[i]);\n }\n return result;\n }\n static get_encapsulating_axis_aligned_bounding_box(bounds) {\n const min = new IVector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n const max = new IVector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\n const vertices = ITransformedBoundingBox.get_transformed_vertices(bounds);\n for (let i = 0; i < 8; i++) {\n IVector3.min_to_ref(min, vertices[i], min);\n IVector3.max_to_ref(max, vertices[i], max);\n }\n return new IBoundingBox(min, max);\n }\n static to_bounding_sphere(bounding_box) {\n const center = ITransformedBoundingBox.get_center(bounding_box);\n let radius = -Number.MAX_VALUE;\n const vertices = ITransformedBoundingBox.get_transformed_vertices(bounding_box);\n for (let i = 0; i < 8; i++) {\n radius = Math.max(IVector3.distance_squared(center, vertices[i]), radius);\n }\n radius = Math.sqrt(radius);\n return new IBoundingSphere(center, radius);\n }\n static get_face_plane(bounds, direction) {\n const local_plane = IBoundingBox.get_face_plane(bounds.local_bounding_box, direction);\n const transformed_plane = {\n normal: IMatrix4.transform_vector4(bounds.transform, new IVector4(local_plane.normal.x, local_plane.normal.y, local_plane.normal.z, 0.0)),\n position: IMatrix4.transform_vector3(bounds.transform, local_plane.position)\n };\n return transformed_plane;\n }\n}\n//# sourceMappingURL=ITransformedBoundingBox.js.map","import { CardinalDirection } from '../api.js';\nimport { IBoundingSphere } from './IBoundingSphere.js';\nimport { ITransformedBoundingBox } from './ITransformedBoundingBox.js';\nimport { IVector3 } from './IVector3.js';\nexport class IBoundingBox {\n constructor(min, max) {\n return {\n min: IVector3.copy(min),\n max: IVector3.copy(max)\n };\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static Invalid() {\n return {\n min: new IVector3(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY),\n max: new IVector3(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY)\n };\n }\n static equals(a, b) {\n return IVector3.equals(a.min, b.min) && IVector3.equals(a.max, b.max);\n }\n static copy(bounds) {\n return new IBoundingBox(bounds.min, bounds.max);\n }\n static get_center(bounds) {\n return IVector3.lerp(bounds.min, bounds.max, 0.5);\n }\n static size(bounds) {\n if (!IBoundingBox.is_valid(bounds))\n return new IVector3(NaN, NaN, NaN);\n return new IVector3(bounds.max.x - bounds.min.x, bounds.max.y - bounds.min.y, bounds.max.z - bounds.min.z);\n }\n /**\n * Calculates the union of the given bounds.\n * @param bounds\n * @returns\n */\n static union(...bounds) {\n const min = new IVector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n const max = new IVector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\n for (let i = 0; i < bounds.length; i++) {\n const bound = bounds[i];\n const effective_bound = ('transform' in bound) ? ITransformedBoundingBox.get_encapsulating_axis_aligned_bounding_box(bound) : bound;\n IVector3.min_to_ref(min, effective_bound.min, min);\n IVector3.max_to_ref(max, effective_bound.max, max);\n }\n return new IBoundingBox(min, max);\n }\n static encapsulate_in_place(bound, ...points) {\n for (const point of points) {\n IVector3.min_to_ref(bound.min, point, bound.min);\n IVector3.max_to_ref(bound.max, point, bound.max);\n }\n return bound;\n }\n /**\n * Calculates the intersection volume of the given bounds\n * @param bounds The bounds whose intersection to calculate\n * @returns The intersecting volume (a bounding box)\n */\n static intersection(...bounds) {\n if (bounds.length === 0) {\n const min = new IVector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n const max = new IVector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\n return new IBoundingBox(min, max);\n }\n else {\n const min = IVector3.copy(bounds[0].min);\n const max = IVector3.copy(bounds[0].max);\n for (let i = 1; i < bounds.length; i++) {\n IVector3.max_to_ref(min, bounds[i].min, min);\n IVector3.min_to_ref(max, bounds[i].max, max);\n }\n return new IBoundingBox(min, max);\n }\n }\n /**\n * Calculates whether there is an intersection volume of the given bounds\n * @param bounds\n * @returns true if all bounds intersect\n */\n static intersects(...bounds) {\n return IBoundingBox.is_valid(IBoundingBox.intersection(...bounds));\n }\n /**\n * Calculates if the given bounds are valid, i.e. has a volume\n * @param bounds The bounds to check\n * @returns true if the bounds are valid\n */\n static is_valid(bounds) {\n if (bounds.max.x < bounds.min.x || bounds.max.y < bounds.min.y || bounds.max.z < bounds.min.z)\n return false;\n if (bounds.min.x === bounds.max.x && bounds.min.y === bounds.max.y && bounds.min.z === bounds.max.z)\n return false;\n return true;\n }\n /**\n * Calculates the vertices of the bounding box, optionally transformed by transform.\n * @param bounding_box The bounding box whose vertices to extract\n * @returns An array of 8 vertices describing the corners of a box.\n */\n static get_vertices(bounding_box) {\n const result = [];\n for (let i = 0; i < 8; i++) {\n result.push(IVector3.lerp(bounding_box.min, bounding_box.max, IBoundingBox._identity_vertices[i]));\n }\n return result;\n }\n static to_bounding_sphere(bounding_box) {\n return new IBoundingSphere(IVector3.lerp(bounding_box.min, bounding_box.max, 0.5), 0.5 * IVector3.distance(bounding_box.min, bounding_box.max));\n }\n static get_face_plane(bounds, direction) {\n const center = IVector3.scale(IVector3.add(bounds.min, bounds.max), 0.5);\n switch (direction) {\n case CardinalDirection.RIGHT:\n return {\n normal: { x: -1, y: 0, z: 0 },\n position: { x: bounds.min.x, y: center.y, z: center.z }\n };\n case CardinalDirection.LEFT:\n return {\n normal: { x: 1, y: 0, z: 0 },\n position: { x: bounds.max.x, y: center.y, z: center.z }\n };\n case CardinalDirection.BOTTOM:\n return {\n normal: { x: 0, y: -1, z: 0 },\n position: { x: center.x, y: bounds.min.y, z: center.z }\n };\n case CardinalDirection.TOP:\n return {\n normal: { x: 0, y: 1, z: 0 },\n position: { x: center.x, y: bounds.max.y, z: center.z }\n };\n case CardinalDirection.FRONT:\n return {\n normal: { x: 0, y: 0, z: 1 },\n position: { x: center.x, y: center.y, z: bounds.max.z }\n };\n case CardinalDirection.BACK:\n return {\n normal: { x: 0, y: 0, z: -1 },\n position: { x: center.x, y: center.y, z: bounds.min.z }\n };\n default:\n // Either we missed an enum, or the user sent in something else.\n throw new Error(\"Unknown cardinal direction. This shouldn't happen.\");\n }\n }\n}\n// Helper array containing the vertices of an AABB in normalized coordinates (0 to 1)\nIBoundingBox._identity_vertices = [\n new IVector3(0, 0, 0),\n new IVector3(1, 0, 0),\n new IVector3(0, 1, 0),\n new IVector3(1, 1, 0),\n new IVector3(0, 0, 1),\n new IVector3(1, 0, 1),\n new IVector3(0, 1, 1),\n new IVector3(1, 1, 1)\n];\n//# sourceMappingURL=IBoundingBox.js.map","import { RenderLayerMask } from './babylon/RenderLayer.js';\nimport { LightType } from './babylon/light-manager/types/LightType.js';\nimport { ColorMode } from './babylon/light-manager/light-system/debug_visualizers/LightVisualizer.js';\nimport { is_polygon_offset_bias } from './babylon/light-manager/light-system/shadows/ShadowController.js';\nimport { IVector2 } from './api/IVector2.js';\nimport { IVector3 } from './api/IVector3.js';\nimport { IVector4 } from './api/IVector4.js';\nimport { IColor } from './api/IColor.js';\nimport { IColor4 } from './api/IColor4.js';\nimport { IMatrix4 } from './api/IMatrix4.js';\nimport { Random } from './api/Random.js';\nimport { IRay } from './api/IRay.js';\nimport { IBoundingBox } from './api/IBoundingBox.js';\nimport { ITransformedBoundingBox } from './api/ITransformedBoundingBox.js';\nimport { IBoundingSphere } from './api/IBoundingSphere.js';\nexport { IVector2, IVector3, IVector4, IColor, IColor4, IMatrix4 };\nexport { IBoundingBox, ITransformedBoundingBox, IBoundingSphere };\nexport { Random };\nexport { RenderLayerMask };\nexport { ColorMode, LightType, is_polygon_offset_bias };\n/**\n * The six main directions of the 3D scene, describing from which side you are looking at it.\n */\nexport var CardinalDirection;\n(function (CardinalDirection) {\n CardinalDirection[CardinalDirection[\"FRONT\"] = 0] = \"FRONT\";\n CardinalDirection[CardinalDirection[\"BACK\"] = 1] = \"BACK\";\n CardinalDirection[CardinalDirection[\"LEFT\"] = 2] = \"LEFT\";\n CardinalDirection[CardinalDirection[\"RIGHT\"] = 3] = \"RIGHT\";\n CardinalDirection[CardinalDirection[\"BOTTOM\"] = 4] = \"BOTTOM\";\n CardinalDirection[CardinalDirection[\"TOP\"] = 5] = \"TOP\";\n})(CardinalDirection || (CardinalDirection = {}));\n/**\n * Enum describing presets for draco decoder sources\n * These are prefered over custom urls since they allow for automatic updating of urls with viewer version\n */\nexport var DracoDecoderSource;\n(function (DracoDecoderSource) {\n /**\n * Should only be used when ikea.com is the origin, prefered when it is.\n */\n DracoDecoderSource[DracoDecoderSource[\"IKEA_COM\"] = 0] = \"IKEA_COM\";\n /**\n * Can be used with any origin but might have worse performance than named counterparts, prefered for dev environments\n */\n DracoDecoderSource[DracoDecoderSource[\"UNIVERSAL\"] = 1] = \"UNIVERSAL\";\n})(DracoDecoderSource || (DracoDecoderSource = {}));\nexport { IRay };\nexport var CameraMode;\n(function (CameraMode) {\n CameraMode[CameraMode[\"PERSPECTIVE\"] = 0] = \"PERSPECTIVE\";\n CameraMode[CameraMode[\"ORTHOGRAPHIC\"] = 1] = \"ORTHOGRAPHIC\";\n})(CameraMode || (CameraMode = {}));\nexport var CameraTransitionPreset;\n(function (CameraTransitionPreset) {\n CameraTransitionPreset[CameraTransitionPreset[\"NONE\"] = 0] = \"NONE\";\n CameraTransitionPreset[CameraTransitionPreset[\"SMOOTH\"] = 1] = \"SMOOTH\";\n CameraTransitionPreset[CameraTransitionPreset[\"SMOOTH_FAST\"] = 2] = \"SMOOTH_FAST\";\n CameraTransitionPreset[CameraTransitionPreset[\"LINEAR\"] = 3] = \"LINEAR\";\n CameraTransitionPreset[CameraTransitionPreset[\"LINEAR_FAST\"] = 4] = \"LINEAR_FAST\";\n})(CameraTransitionPreset || (CameraTransitionPreset = {}));\nexport var ExposurePreset;\n(function (ExposurePreset) {\n ExposurePreset[\"HOME_INTERIOR\"] = \"Home Interior\";\n ExposurePreset[\"BRIGHTLY_LIT_OFFICE\"] = \"Brightly Lit Office\";\n ExposurePreset[\"OUTDOOR_HEAVY_OVERCAST\"] = \"Outdoor Heavy Overcast\";\n ExposurePreset[\"OUTDOOR_CLEAR_DAY\"] = \"Outdoor Clear Day\";\n})(ExposurePreset || (ExposurePreset = {}));\nexport var TransitionState;\n(function (TransitionState) {\n TransitionState[TransitionState[\"NONE\"] = 0] = \"NONE\";\n TransitionState[TransitionState[\"STARTED\"] = 1] = \"STARTED\";\n TransitionState[TransitionState[\"CONTINUE\"] = 2] = \"CONTINUE\";\n TransitionState[TransitionState[\"COMPLETED\"] = 3] = \"COMPLETED\";\n})(TransitionState || (TransitionState = {}));\n/**\n * Base class that can be implemented for when writing custom camera transitions\n */\nexport class CameraTransition {\n constructor(from_camera, to_camera, engine_camera) {\n this.from_camera = from_camera;\n this.to_camera = to_camera;\n this.engine_camera = engine_camera;\n }\n /**\n * This function updates the projection matrix of the transition_camera so that\n * near and far planes are spread enought to see anything that the from and to cameras could have seen.\n * @param aspect_ratio current aspect ratio\n * @returns a new projection matrix with updated near and far compared to transition_camera\n */\n fix_interpolated_projection(aspect_ratio) {\n // This is a dummy implementation, CameraTransition.ts has the real default implementation\n return this.transition_camera.get_projection_matrix(aspect_ratio);\n }\n}\nexport var AOQualityPreset;\n(function (AOQualityPreset) {\n AOQualityPreset[AOQualityPreset[\"MOBILE_LOW\"] = 0] = \"MOBILE_LOW\";\n AOQualityPreset[AOQualityPreset[\"MOBILE_MEDIUM\"] = 1] = \"MOBILE_MEDIUM\";\n AOQualityPreset[AOQualityPreset[\"MOBILE_HIGH\"] = 2] = \"MOBILE_HIGH\";\n AOQualityPreset[AOQualityPreset[\"DESKTOP_LOW\"] = 3] = \"DESKTOP_LOW\";\n AOQualityPreset[AOQualityPreset[\"DESKTOP_MEDIUM\"] = 4] = \"DESKTOP_MEDIUM\";\n AOQualityPreset[AOQualityPreset[\"DESKTOP_HIGH\"] = 5] = \"DESKTOP_HIGH\";\n AOQualityPreset[AOQualityPreset[\"SCREENSHOT\"] = 6] = \"SCREENSHOT\";\n AOQualityPreset[AOQualityPreset[\"DESKTOP_DEFAULT\"] = 4] = \"DESKTOP_DEFAULT\";\n AOQualityPreset[AOQualityPreset[\"MOBILE_DEFAULT\"] = 1] = \"MOBILE_DEFAULT\";\n})(AOQualityPreset || (AOQualityPreset = {}));\nexport var LineType;\n(function (LineType) {\n LineType[LineType[\"SOLID\"] = 0] = \"SOLID\";\n LineType[LineType[\"DASHED\"] = 1] = \"DASHED\";\n})(LineType || (LineType = {}));\nexport var RenderLayerAllocation;\n(function (RenderLayerAllocation) {\n RenderLayerAllocation[RenderLayerAllocation[\"IPEX_CORE\"] = 0] = \"IPEX_CORE\";\n RenderLayerAllocation[RenderLayerAllocation[\"IPEX_KVADRAT\"] = 1] = \"IPEX_KVADRAT\";\n RenderLayerAllocation[RenderLayerAllocation[\"IPEX_SPACE\"] = 2] = \"IPEX_SPACE\";\n RenderLayerAllocation[RenderLayerAllocation[\"IPEX_PLANNER\"] = 3] = \"IPEX_PLANNER\";\n})(RenderLayerAllocation || (RenderLayerAllocation = {}));\nexport class DebugProfilingInformation {\n constructor() {\n this.engine_update_id = 0;\n this.num_api_objects = 0;\n this.num_api_materials = 0;\n this.num_babylon_materials = 0;\n this.num_babylon_meshes = 0;\n this.num_babylon_transform_nodes = 0;\n this.num_babylon_cameras = 0;\n this.num_babylon_template_meshes = 0;\n }\n}\n/**\n * Viewer has some experimental features that can be enabled here. With time, options might go away as they become standard or are removed.\n * Features here might have either performance problems (such that they should not be enabled by default) or are not fully tested yet.\n */\nexport class ViewerOptionalFeatures {\n constructor() {\n /**\n * This flag lets you decide if you want to utilize a float framebuffer for the Viewer, when supported.\n * This flag is left for testing and debugging purposes, and can be used as a last resort performance gain on very low-end devices.\n * Float framebuffers are required for bloom and correct tonemapping.\n * Default value: true (enabled)\n */\n this.feature_gate_use_float_framebuffer = true;\n /**\n * This flag is solely left for testing purposes.\n * Use it to emulate a device with only WebGL1 support.\n * DO NOT USE IN PRODUCTION\n * Default value: false (WebGL2 is used when supported)\n */\n this.feature_gate_disable_webgl2_support = false;\n /**\n * Enables the GPU profiler in the Viewer, for testing purposes only.\n * Do not enable in production environments.\n * Default value: false (disabled)\n */\n this.debug_enable_gpu_profiler = false;\n this.feature_gate_material_objects = false;\n /**\n * Use this flag to tell the Viewer to not create its default View.\n * This will make some endpoints on the Viewer error if used.\n * Default value: false (default view is created)\n */\n this.no_default_view = false;\n }\n}\nexport var ScreenshotMimeType;\n(function (ScreenshotMimeType) {\n ScreenshotMimeType[\"PNG\"] = \"image/png\";\n ScreenshotMimeType[\"JPEG\"] = \"image/jpeg\";\n})(ScreenshotMimeType || (ScreenshotMimeType = {}));\n/**\n * OBS, Animations are a prototype and may be subject to change.\n */\nexport var AnimationProperty;\n(function (AnimationProperty) {\n AnimationProperty[\"POSITION\"] = \"position\";\n AnimationProperty[\"ROTATION\"] = \"rotationQuaternion\";\n AnimationProperty[\"SCALE\"] = \"scaling\";\n})(AnimationProperty || (AnimationProperty = {}));\n/**\n * OBS, Animations are a prototype and may be subject to change.\n */\nexport var AnimationInterpolationFunction;\n(function (AnimationInterpolationFunction) {\n AnimationInterpolationFunction[AnimationInterpolationFunction[\"LINEAR\"] = 0] = \"LINEAR\";\n AnimationInterpolationFunction[AnimationInterpolationFunction[\"CUBIC\"] = 1] = \"CUBIC\";\n})(AnimationInterpolationFunction || (AnimationInterpolationFunction = {}));\n//# sourceMappingURL=api.js.map","/* eslint-disable @typescript-eslint/naming-convention */\n// \"Coroutines are computer program components that generalize subroutines for non-preemptive multitasking, by allowing execution to be suspended and resumed.\"\n// https://en.wikipedia.org/wiki/Coroutine\n// The inline scheduler simply steps the coroutine synchronously. This is useful for running a coroutine synchronously, and also as a helper function for other schedulers.\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function inlineScheduler(coroutine, onStep, onError) {\n try {\n const step = coroutine.next();\n if (step.done) {\n onStep(step);\n }\n else if (!step.value) {\n // NOTE: The properties of step have been narrowed, but the type of step itself is not narrowed, so the cast below is the most type safe way to deal with this without instantiating a new object to hold the values.\n onStep(step);\n }\n else {\n step.value.then(() => {\n step.value = undefined;\n onStep(step);\n }, onError);\n }\n }\n catch (error) {\n onError(error);\n }\n}\n// The yielding scheduler steps the coroutine synchronously until the specified time interval has elapsed, then yields control so other operations can be performed.\n// A single instance of a yielding scheduler could be shared across multiple coroutines to yield when their collective work exceeds the threshold.\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function createYieldingScheduler(yieldAfterMS = 25) {\n let startTime;\n return (coroutine, onStep, onError) => {\n const currentTime = performance.now();\n if (startTime === undefined || currentTime - startTime > yieldAfterMS) {\n // If this is the first coroutine step, or if the time interval has elapsed, record a new start time, and schedule the coroutine step to happen later, effectively yielding control of the execution context.\n startTime = currentTime;\n setTimeout(() => {\n inlineScheduler(coroutine, onStep, onError);\n }, 0);\n }\n else {\n // Otherwise it is not time to yield yet, so step the coroutine synchronously.\n inlineScheduler(coroutine, onStep, onError);\n }\n };\n}\n// Runs the specified coroutine with the specified scheduler. The success or error callback will be invoked when the coroutine finishes.\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function runCoroutine(coroutine, scheduler, onSuccess, onError, abortSignal) {\n const resume = () => {\n let reschedule;\n const onStep = (stepResult) => {\n if (stepResult.done) {\n // If the coroutine is done, report success.\n onSuccess(stepResult.value);\n }\n else {\n // If the coroutine is not done, resume the coroutine (via the scheduler).\n if (reschedule === undefined) {\n // If reschedule is undefined at this point, then the coroutine must have stepped synchronously, so just flag another loop iteration.\n reschedule = true;\n }\n else {\n // If reschedule is defined at this point, then the coroutine must have stepped asynchronously, so call resume to restart the step loop.\n resume();\n }\n }\n };\n do {\n reschedule = undefined;\n if (!abortSignal || !abortSignal.aborted) {\n scheduler(coroutine, onStep, onError);\n }\n else {\n onError(new Error(\"Aborted\"));\n }\n if (reschedule === undefined) {\n // If reschedule is undefined at this point, then the coroutine must have stepped asynchronously, so stop looping and let the coroutine be resumed later.\n reschedule = false;\n }\n } while (reschedule);\n };\n resume();\n}\n// Runs the specified coroutine synchronously.\n/**\n * @internal\n */\nexport function runCoroutineSync(coroutine, abortSignal) {\n // Run the coroutine with the inline scheduler, storing the returned value, or re-throwing the error (since the error callback will be called synchronously by the inline scheduler).\n let result;\n runCoroutine(coroutine, inlineScheduler, (r) => (result = r), (e) => {\n throw e;\n }, abortSignal);\n // Synchronously return the result of the coroutine.\n return result;\n}\n// Runs the specified coroutine asynchronously with the specified scheduler.\n/**\n * @internal\n */\nexport function runCoroutineAsync(coroutine, scheduler, abortSignal) {\n // Run the coroutine with a yielding scheduler, resolving or rejecting the result promise when the coroutine finishes.\n return new Promise((resolve, reject) => {\n runCoroutine(coroutine, scheduler, resolve, reject, abortSignal);\n });\n}\n/**\n * Given a function that returns a Coroutine, produce a function with the same parameters that returns a T.\n * The returned function runs the coroutine synchronously.\n * @param coroutineFactory A function that returns a Coroutine.\n * @param abortSignal\n * @returns A function that runs the coroutine synchronously.\n * @internal\n */\nexport function makeSyncFunction(coroutineFactory, abortSignal) {\n return (...params) => {\n // Run the coroutine synchronously.\n return runCoroutineSync(coroutineFactory(...params), abortSignal);\n };\n}\n/**\n * Given a function that returns a Coroutine, product a function with the same parameters that returns a Promise.\n * The returned function runs the coroutine asynchronously, yield control of the execution context occasionally to enable a more responsive experience.\n * @param coroutineFactory A function that returns a Coroutine.\n * @param scheduler\n * @param abortSignal\n * @returns A function that runs the coroutine asynchronously.\n * @internal\n */\nexport function makeAsyncFunction(coroutineFactory, scheduler, abortSignal) {\n return (...params) => {\n // Run the coroutine asynchronously.\n return runCoroutineAsync(coroutineFactory(...params), scheduler, abortSignal);\n };\n}\n//# sourceMappingURL=coroutine.js.map","/**\n * @internal\n */\nexport class IntersectionInfo {\n constructor(bu, bv, distance) {\n this.bu = bu;\n this.bv = bv;\n this.distance = distance;\n this.faceId = 0;\n this.subMeshId = 0;\n }\n}\n//# sourceMappingURL=intersectionInfo.js.map","import { ArrayTools } from \"../Misc/arrayTools.js\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector.js\";\nimport { Epsilon } from \"../Maths/math.constants.js\";\n/**\n * Class used to store bounding box information\n */\nexport class BoundingBox {\n /**\n * Creates a new bounding box\n * @param min defines the minimum vector (in local space)\n * @param max defines the maximum vector (in local space)\n * @param worldMatrix defines the new world matrix\n */\n constructor(min, max, worldMatrix) {\n /**\n * Gets the 8 vectors representing the bounding box in local space\n */\n this.vectors = ArrayTools.BuildArray(8, Vector3.Zero);\n /**\n * Gets the center of the bounding box in local space\n */\n this.center = Vector3.Zero();\n /**\n * Gets the center of the bounding box in world space\n */\n this.centerWorld = Vector3.Zero();\n /**\n * Gets the extend size in local space\n */\n this.extendSize = Vector3.Zero();\n /**\n * Gets the extend size in world space\n */\n this.extendSizeWorld = Vector3.Zero();\n /**\n * Gets the OBB (object bounding box) directions\n */\n this.directions = ArrayTools.BuildArray(3, Vector3.Zero);\n /**\n * Gets the 8 vectors representing the bounding box in world space\n */\n this.vectorsWorld = ArrayTools.BuildArray(8, Vector3.Zero);\n /**\n * Gets the minimum vector in world space\n */\n this.minimumWorld = Vector3.Zero();\n /**\n * Gets the maximum vector in world space\n */\n this.maximumWorld = Vector3.Zero();\n /**\n * Gets the minimum vector in local space\n */\n this.minimum = Vector3.Zero();\n /**\n * Gets the maximum vector in local space\n */\n this.maximum = Vector3.Zero();\n /** @internal */\n this._drawWrapperFront = null;\n /** @internal */\n this._drawWrapperBack = null;\n this.reConstruct(min, max, worldMatrix);\n }\n // Methods\n /**\n * Recreates the entire bounding box from scratch as if we call the constructor in place\n * @param min defines the new minimum vector (in local space)\n * @param max defines the new maximum vector (in local space)\n * @param worldMatrix defines the new world matrix\n */\n reConstruct(min, max, worldMatrix) {\n const minX = min.x, minY = min.y, minZ = min.z, maxX = max.x, maxY = max.y, maxZ = max.z;\n const vectors = this.vectors;\n this.minimum.copyFromFloats(minX, minY, minZ);\n this.maximum.copyFromFloats(maxX, maxY, maxZ);\n vectors[0].copyFromFloats(minX, minY, minZ);\n vectors[1].copyFromFloats(maxX, maxY, maxZ);\n vectors[2].copyFromFloats(maxX, minY, minZ);\n vectors[3].copyFromFloats(minX, maxY, minZ);\n vectors[4].copyFromFloats(minX, minY, maxZ);\n vectors[5].copyFromFloats(maxX, maxY, minZ);\n vectors[6].copyFromFloats(minX, maxY, maxZ);\n vectors[7].copyFromFloats(maxX, minY, maxZ);\n // OBB\n max.addToRef(min, this.center).scaleInPlace(0.5);\n max.subtractToRef(min, this.extendSize).scaleInPlace(0.5);\n this._worldMatrix = worldMatrix || Matrix.IdentityReadOnly;\n this._update(this._worldMatrix);\n }\n /**\n * Scale the current bounding box by applying a scale factor\n * @param factor defines the scale factor to apply\n * @returns the current bounding box\n */\n scale(factor) {\n const tmpVectors = BoundingBox._TmpVector3;\n const diff = this.maximum.subtractToRef(this.minimum, tmpVectors[0]);\n const len = diff.length();\n diff.normalizeFromLength(len);\n const distance = len * factor;\n const newRadius = diff.scaleInPlace(distance * 0.5);\n const min = this.center.subtractToRef(newRadius, tmpVectors[1]);\n const max = this.center.addToRef(newRadius, tmpVectors[2]);\n this.reConstruct(min, max, this._worldMatrix);\n return this;\n }\n /**\n * Gets the world matrix of the bounding box\n * @returns a matrix\n */\n getWorldMatrix() {\n return this._worldMatrix;\n }\n /**\n * @internal\n */\n _update(world) {\n const minWorld = this.minimumWorld;\n const maxWorld = this.maximumWorld;\n const directions = this.directions;\n const vectorsWorld = this.vectorsWorld;\n const vectors = this.vectors;\n if (!world.isIdentity()) {\n minWorld.setAll(Number.MAX_VALUE);\n maxWorld.setAll(-Number.MAX_VALUE);\n for (let index = 0; index < 8; ++index) {\n const v = vectorsWorld[index];\n Vector3.TransformCoordinatesToRef(vectors[index], world, v);\n minWorld.minimizeInPlace(v);\n maxWorld.maximizeInPlace(v);\n }\n // Extend\n maxWorld.subtractToRef(minWorld, this.extendSizeWorld).scaleInPlace(0.5);\n maxWorld.addToRef(minWorld, this.centerWorld).scaleInPlace(0.5);\n }\n else {\n minWorld.copyFrom(this.minimum);\n maxWorld.copyFrom(this.maximum);\n for (let index = 0; index < 8; ++index) {\n vectorsWorld[index].copyFrom(vectors[index]);\n }\n // Extend\n this.extendSizeWorld.copyFrom(this.extendSize);\n this.centerWorld.copyFrom(this.center);\n }\n Vector3.FromArrayToRef(world.m, 0, directions[0]);\n Vector3.FromArrayToRef(world.m, 4, directions[1]);\n Vector3.FromArrayToRef(world.m, 8, directions[2]);\n this._worldMatrix = world;\n }\n /**\n * Tests if the bounding box is intersecting the frustum planes\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an intersection\n */\n isInFrustum(frustumPlanes) {\n return BoundingBox.IsInFrustum(this.vectorsWorld, frustumPlanes);\n }\n /**\n * Tests if the bounding box is entirely inside the frustum planes\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an inclusion\n */\n isCompletelyInFrustum(frustumPlanes) {\n return BoundingBox.IsCompletelyInFrustum(this.vectorsWorld, frustumPlanes);\n }\n /**\n * Tests if a point is inside the bounding box\n * @param point defines the point to test\n * @returns true if the point is inside the bounding box\n */\n intersectsPoint(point) {\n const min = this.minimumWorld;\n const max = this.maximumWorld;\n const minX = min.x, minY = min.y, minZ = min.z, maxX = max.x, maxY = max.y, maxZ = max.z;\n const pointX = point.x, pointY = point.y, pointZ = point.z;\n const delta = -Epsilon;\n if (maxX - pointX < delta || delta > pointX - minX) {\n return false;\n }\n if (maxY - pointY < delta || delta > pointY - minY) {\n return false;\n }\n if (maxZ - pointZ < delta || delta > pointZ - minZ) {\n return false;\n }\n return true;\n }\n /**\n * Tests if the bounding box intersects with a bounding sphere\n * @param sphere defines the sphere to test\n * @returns true if there is an intersection\n */\n intersectsSphere(sphere) {\n return BoundingBox.IntersectsSphere(this.minimumWorld, this.maximumWorld, sphere.centerWorld, sphere.radiusWorld);\n }\n /**\n * Tests if the bounding box intersects with a box defined by a min and max vectors\n * @param min defines the min vector to use\n * @param max defines the max vector to use\n * @returns true if there is an intersection\n */\n intersectsMinMax(min, max) {\n const myMin = this.minimumWorld;\n const myMax = this.maximumWorld;\n const myMinX = myMin.x, myMinY = myMin.y, myMinZ = myMin.z, myMaxX = myMax.x, myMaxY = myMax.y, myMaxZ = myMax.z;\n const minX = min.x, minY = min.y, minZ = min.z, maxX = max.x, maxY = max.y, maxZ = max.z;\n if (myMaxX < minX || myMinX > maxX) {\n return false;\n }\n if (myMaxY < minY || myMinY > maxY) {\n return false;\n }\n if (myMaxZ < minZ || myMinZ > maxZ) {\n return false;\n }\n return true;\n }\n /**\n * Disposes the resources of the class\n */\n dispose() {\n var _a, _b;\n (_a = this._drawWrapperFront) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._drawWrapperBack) === null || _b === void 0 ? void 0 : _b.dispose();\n }\n // Statics\n /**\n * Tests if two bounding boxes are intersections\n * @param box0 defines the first box to test\n * @param box1 defines the second box to test\n * @returns true if there is an intersection\n */\n static Intersects(box0, box1) {\n return box0.intersectsMinMax(box1.minimumWorld, box1.maximumWorld);\n }\n /**\n * Tests if a bounding box defines by a min/max vectors intersects a sphere\n * @param minPoint defines the minimum vector of the bounding box\n * @param maxPoint defines the maximum vector of the bounding box\n * @param sphereCenter defines the sphere center\n * @param sphereRadius defines the sphere radius\n * @returns true if there is an intersection\n */\n static IntersectsSphere(minPoint, maxPoint, sphereCenter, sphereRadius) {\n const vector = BoundingBox._TmpVector3[0];\n Vector3.ClampToRef(sphereCenter, minPoint, maxPoint, vector);\n const num = Vector3.DistanceSquared(sphereCenter, vector);\n return num <= sphereRadius * sphereRadius;\n }\n /**\n * Tests if a bounding box defined with 8 vectors is entirely inside frustum planes\n * @param boundingVectors defines an array of 8 vectors representing a bounding box\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an inclusion\n */\n static IsCompletelyInFrustum(boundingVectors, frustumPlanes) {\n for (let p = 0; p < 6; ++p) {\n const frustumPlane = frustumPlanes[p];\n for (let i = 0; i < 8; ++i) {\n if (frustumPlane.dotCoordinate(boundingVectors[i]) < 0) {\n return false;\n }\n }\n }\n return true;\n }\n /**\n * Tests if a bounding box defined with 8 vectors intersects frustum planes\n * @param boundingVectors defines an array of 8 vectors representing a bounding box\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an intersection\n */\n static IsInFrustum(boundingVectors, frustumPlanes) {\n for (let p = 0; p < 6; ++p) {\n let canReturnFalse = true;\n const frustumPlane = frustumPlanes[p];\n for (let i = 0; i < 8; ++i) {\n if (frustumPlane.dotCoordinate(boundingVectors[i]) >= 0) {\n canReturnFalse = false;\n break;\n }\n }\n if (canReturnFalse) {\n return false;\n }\n }\n return true;\n }\n}\nBoundingBox._TmpVector3 = ArrayTools.BuildArray(3, Vector3.Zero);\n//# sourceMappingURL=boundingBox.js.map","import { ArrayTools } from \"../Misc/arrayTools.js\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector.js\";\n/**\n * Class used to store bounding sphere information\n */\nexport class BoundingSphere {\n /**\n * Creates a new bounding sphere\n * @param min defines the minimum vector (in local space)\n * @param max defines the maximum vector (in local space)\n * @param worldMatrix defines the new world matrix\n */\n constructor(min, max, worldMatrix) {\n /**\n * Gets the center of the bounding sphere in local space\n */\n this.center = Vector3.Zero();\n /**\n * Gets the center of the bounding sphere in world space\n */\n this.centerWorld = Vector3.Zero();\n /**\n * Gets the minimum vector in local space\n */\n this.minimum = Vector3.Zero();\n /**\n * Gets the maximum vector in local space\n */\n this.maximum = Vector3.Zero();\n this.reConstruct(min, max, worldMatrix);\n }\n /**\n * Recreates the entire bounding sphere from scratch as if we call the constructor in place\n * @param min defines the new minimum vector (in local space)\n * @param max defines the new maximum vector (in local space)\n * @param worldMatrix defines the new world matrix\n */\n reConstruct(min, max, worldMatrix) {\n this.minimum.copyFrom(min);\n this.maximum.copyFrom(max);\n const distance = Vector3.Distance(min, max);\n max.addToRef(min, this.center).scaleInPlace(0.5);\n this.radius = distance * 0.5;\n this._update(worldMatrix || Matrix.IdentityReadOnly);\n }\n /**\n * Scale the current bounding sphere by applying a scale factor\n * @param factor defines the scale factor to apply\n * @returns the current bounding box\n */\n scale(factor) {\n const newRadius = this.radius * factor;\n const tmpVectors = BoundingSphere._TmpVector3;\n const tempRadiusVector = tmpVectors[0].setAll(newRadius);\n const min = this.center.subtractToRef(tempRadiusVector, tmpVectors[1]);\n const max = this.center.addToRef(tempRadiusVector, tmpVectors[2]);\n this.reConstruct(min, max, this._worldMatrix);\n return this;\n }\n /**\n * Gets the world matrix of the bounding box\n * @returns a matrix\n */\n getWorldMatrix() {\n return this._worldMatrix;\n }\n // Methods\n /**\n * @internal\n */\n _update(worldMatrix) {\n if (!worldMatrix.isIdentity()) {\n Vector3.TransformCoordinatesToRef(this.center, worldMatrix, this.centerWorld);\n const tempVector = BoundingSphere._TmpVector3[0];\n Vector3.TransformNormalFromFloatsToRef(1.0, 1.0, 1.0, worldMatrix, tempVector);\n this.radiusWorld = Math.max(Math.abs(tempVector.x), Math.abs(tempVector.y), Math.abs(tempVector.z)) * this.radius;\n }\n else {\n this.centerWorld.copyFrom(this.center);\n this.radiusWorld = this.radius;\n }\n }\n /**\n * Tests if the bounding sphere is intersecting the frustum planes\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an intersection\n */\n isInFrustum(frustumPlanes) {\n const center = this.centerWorld;\n const radius = this.radiusWorld;\n for (let i = 0; i < 6; i++) {\n if (frustumPlanes[i].dotCoordinate(center) <= -radius) {\n return false;\n }\n }\n return true;\n }\n /**\n * Tests if the bounding sphere center is in between the frustum planes.\n * Used for optimistic fast inclusion.\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if the sphere center is in between the frustum planes\n */\n isCenterInFrustum(frustumPlanes) {\n const center = this.centerWorld;\n for (let i = 0; i < 6; i++) {\n if (frustumPlanes[i].dotCoordinate(center) < 0) {\n return false;\n }\n }\n return true;\n }\n /**\n * Tests if a point is inside the bounding sphere\n * @param point defines the point to test\n * @returns true if the point is inside the bounding sphere\n */\n intersectsPoint(point) {\n const squareDistance = Vector3.DistanceSquared(this.centerWorld, point);\n if (this.radiusWorld * this.radiusWorld < squareDistance) {\n return false;\n }\n return true;\n }\n // Statics\n /**\n * Checks if two sphere intersect\n * @param sphere0 sphere 0\n * @param sphere1 sphere 1\n * @returns true if the spheres intersect\n */\n static Intersects(sphere0, sphere1) {\n const squareDistance = Vector3.DistanceSquared(sphere0.centerWorld, sphere1.centerWorld);\n const radiusSum = sphere0.radiusWorld + sphere1.radiusWorld;\n if (radiusSum * radiusSum < squareDistance) {\n return false;\n }\n return true;\n }\n /**\n * Creates a sphere from a center and a radius\n * @param center The center\n * @param radius radius\n * @param matrix Optional worldMatrix\n * @returns The sphere\n */\n static CreateFromCenterAndRadius(center, radius, matrix) {\n this._TmpVector3[0].copyFrom(center);\n this._TmpVector3[1].copyFromFloats(0, 0, radius);\n this._TmpVector3[2].copyFrom(center);\n this._TmpVector3[0].addInPlace(this._TmpVector3[1]);\n this._TmpVector3[2].subtractInPlace(this._TmpVector3[1]);\n const sphere = new BoundingSphere(this._TmpVector3[0], this._TmpVector3[2]);\n if (matrix) {\n sphere._worldMatrix = matrix;\n }\n else {\n sphere._worldMatrix = Matrix.Identity();\n }\n return sphere;\n }\n}\nBoundingSphere._TmpVector3 = ArrayTools.BuildArray(3, Vector3.Zero);\n//# sourceMappingURL=boundingSphere.js.map","import { ArrayTools } from \"../Misc/arrayTools.js\";\nimport { TmpVectors } from \"../Maths/math.vector.js\";\nimport { Vector3 } from \"../Maths/math.vector.js\";\n\nimport { BoundingBox } from \"./boundingBox.js\";\nimport { BoundingSphere } from \"./boundingSphere.js\";\nconst _result0 = { min: 0, max: 0 };\nconst _result1 = { min: 0, max: 0 };\nconst computeBoxExtents = (axis, box, result) => {\n const p = Vector3.Dot(box.centerWorld, axis);\n const r0 = Math.abs(Vector3.Dot(box.directions[0], axis)) * box.extendSize.x;\n const r1 = Math.abs(Vector3.Dot(box.directions[1], axis)) * box.extendSize.y;\n const r2 = Math.abs(Vector3.Dot(box.directions[2], axis)) * box.extendSize.z;\n const r = r0 + r1 + r2;\n result.min = p - r;\n result.max = p + r;\n};\nconst axisOverlap = (axis, box0, box1) => {\n computeBoxExtents(axis, box0, _result0);\n computeBoxExtents(axis, box1, _result1);\n return !(_result0.min > _result1.max || _result1.min > _result0.max);\n};\n/**\n * Info for a bounding data of a mesh\n */\nexport class BoundingInfo {\n /**\n * Constructs bounding info\n * @param minimum min vector of the bounding box/sphere\n * @param maximum max vector of the bounding box/sphere\n * @param worldMatrix defines the new world matrix\n */\n constructor(minimum, maximum, worldMatrix) {\n this._isLocked = false;\n this.boundingBox = new BoundingBox(minimum, maximum, worldMatrix);\n this.boundingSphere = new BoundingSphere(minimum, maximum, worldMatrix);\n }\n /**\n * Recreates the entire bounding info from scratch as if we call the constructor in place\n * @param min defines the new minimum vector (in local space)\n * @param max defines the new maximum vector (in local space)\n * @param worldMatrix defines the new world matrix\n */\n reConstruct(min, max, worldMatrix) {\n this.boundingBox.reConstruct(min, max, worldMatrix);\n this.boundingSphere.reConstruct(min, max, worldMatrix);\n }\n /**\n * min vector of the bounding box/sphere\n */\n get minimum() {\n return this.boundingBox.minimum;\n }\n /**\n * max vector of the bounding box/sphere\n */\n get maximum() {\n return this.boundingBox.maximum;\n }\n /**\n * If the info is locked and won't be updated to avoid perf overhead\n */\n get isLocked() {\n return this._isLocked;\n }\n set isLocked(value) {\n this._isLocked = value;\n }\n // Methods\n /**\n * Updates the bounding sphere and box\n * @param world world matrix to be used to update\n */\n update(world) {\n if (this._isLocked) {\n return;\n }\n this.boundingBox._update(world);\n this.boundingSphere._update(world);\n }\n /**\n * Recreate the bounding info to be centered around a specific point given a specific extend.\n * @param center New center of the bounding info\n * @param extend New extend of the bounding info\n * @returns the current bounding info\n */\n centerOn(center, extend) {\n const minimum = BoundingInfo._TmpVector3[0].copyFrom(center).subtractInPlace(extend);\n const maximum = BoundingInfo._TmpVector3[1].copyFrom(center).addInPlace(extend);\n this.boundingBox.reConstruct(minimum, maximum, this.boundingBox.getWorldMatrix());\n this.boundingSphere.reConstruct(minimum, maximum, this.boundingBox.getWorldMatrix());\n return this;\n }\n /**\n * Grows the bounding info to include the given point.\n * @param point The point that will be included in the current bounding info (in local space)\n * @returns the current bounding info\n */\n encapsulate(point) {\n const minimum = Vector3.Minimize(this.minimum, point);\n const maximum = Vector3.Maximize(this.maximum, point);\n this.reConstruct(minimum, maximum, this.boundingBox.getWorldMatrix());\n return this;\n }\n /**\n * Grows the bounding info to encapsulate the given bounding info.\n * @param toEncapsulate The bounding info that will be encapsulated in the current bounding info\n * @returns the current bounding info\n */\n encapsulateBoundingInfo(toEncapsulate) {\n const invw = TmpVectors.Matrix[0];\n this.boundingBox.getWorldMatrix().invertToRef(invw);\n const v = TmpVectors.Vector3[0];\n Vector3.TransformCoordinatesToRef(toEncapsulate.boundingBox.minimumWorld, invw, v);\n this.encapsulate(v);\n Vector3.TransformCoordinatesToRef(toEncapsulate.boundingBox.maximumWorld, invw, v);\n this.encapsulate(v);\n return this;\n }\n /**\n * Scale the current bounding info by applying a scale factor\n * @param factor defines the scale factor to apply\n * @returns the current bounding info\n */\n scale(factor) {\n this.boundingBox.scale(factor);\n this.boundingSphere.scale(factor);\n return this;\n }\n /**\n * Returns `true` if the bounding info is within the frustum defined by the passed array of planes.\n * @param frustumPlanes defines the frustum to test\n * @param strategy defines the strategy to use for the culling (default is BABYLON.AbstractMesh.CULLINGSTRATEGY_STANDARD)\n * The different strategies available are:\n * * BABYLON.AbstractMesh.CULLINGSTRATEGY_STANDARD most accurate but slower @see https://doc.babylonjs.com/typedoc/classes/BABYLON.AbstractMesh#CULLINGSTRATEGY_STANDARD\n * * BABYLON.AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY faster but less accurate @see https://doc.babylonjs.com/typedoc/classes/BABYLON.AbstractMesh#CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY\n * * BABYLON.AbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION can be faster if always visible @see https://doc.babylonjs.com/typedoc/classes/BABYLON.AbstractMesh#CULLINGSTRATEGY_OPTIMISTIC_INCLUSION\n * * BABYLON.AbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY can be faster if always visible @see https://doc.babylonjs.com/typedoc/classes/BABYLON.AbstractMesh#CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY\n * @returns true if the bounding info is in the frustum planes\n */\n isInFrustum(frustumPlanes, strategy = 0) {\n const inclusionTest = strategy === 2 || strategy === 3;\n if (inclusionTest) {\n if (this.boundingSphere.isCenterInFrustum(frustumPlanes)) {\n return true;\n }\n }\n if (!this.boundingSphere.isInFrustum(frustumPlanes)) {\n return false;\n }\n const bSphereOnlyTest = strategy === 1 || strategy === 3;\n if (bSphereOnlyTest) {\n return true;\n }\n return this.boundingBox.isInFrustum(frustumPlanes);\n }\n /**\n * Gets the world distance between the min and max points of the bounding box\n */\n get diagonalLength() {\n const boundingBox = this.boundingBox;\n const diag = boundingBox.maximumWorld.subtractToRef(boundingBox.minimumWorld, BoundingInfo._TmpVector3[0]);\n return diag.length();\n }\n /**\n * Checks if a cullable object (mesh...) is in the camera frustum\n * Unlike isInFrustum this checks the full bounding box\n * @param frustumPlanes Camera near/planes\n * @returns true if the object is in frustum otherwise false\n */\n isCompletelyInFrustum(frustumPlanes) {\n return this.boundingBox.isCompletelyInFrustum(frustumPlanes);\n }\n /**\n * @internal\n */\n _checkCollision(collider) {\n return collider._canDoCollision(this.boundingSphere.centerWorld, this.boundingSphere.radiusWorld, this.boundingBox.minimumWorld, this.boundingBox.maximumWorld);\n }\n /**\n * Checks if a point is inside the bounding box and bounding sphere or the mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/interactions/mesh_intersect\n * @param point the point to check intersection with\n * @returns if the point intersects\n */\n intersectsPoint(point) {\n if (!this.boundingSphere.centerWorld) {\n return false;\n }\n if (!this.boundingSphere.intersectsPoint(point)) {\n return false;\n }\n if (!this.boundingBox.intersectsPoint(point)) {\n return false;\n }\n return true;\n }\n /**\n * Checks if another bounding info intersects the bounding box and bounding sphere or the mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/interactions/mesh_intersect\n * @param boundingInfo the bounding info to check intersection with\n * @param precise if the intersection should be done using OBB\n * @returns if the bounding info intersects\n */\n intersects(boundingInfo, precise) {\n if (!BoundingSphere.Intersects(this.boundingSphere, boundingInfo.boundingSphere)) {\n return false;\n }\n if (!BoundingBox.Intersects(this.boundingBox, boundingInfo.boundingBox)) {\n return false;\n }\n if (!precise) {\n return true;\n }\n const box0 = this.boundingBox;\n const box1 = boundingInfo.boundingBox;\n if (!axisOverlap(box0.directions[0], box0, box1)) {\n return false;\n }\n if (!axisOverlap(box0.directions[1], box0, box1)) {\n return false;\n }\n if (!axisOverlap(box0.directions[2], box0, box1)) {\n return false;\n }\n if (!axisOverlap(box1.directions[0], box0, box1)) {\n return false;\n }\n if (!axisOverlap(box1.directions[1], box0, box1)) {\n return false;\n }\n if (!axisOverlap(box1.directions[2], box0, box1)) {\n return false;\n }\n if (!axisOverlap(Vector3.Cross(box0.directions[0], box1.directions[0]), box0, box1)) {\n return false;\n }\n if (!axisOverlap(Vector3.Cross(box0.directions[0], box1.directions[1]), box0, box1)) {\n return false;\n }\n if (!axisOverlap(Vector3.Cross(box0.directions[0], box1.directions[2]), box0, box1)) {\n return false;\n }\n if (!axisOverlap(Vector3.Cross(box0.directions[1], box1.directions[0]), box0, box1)) {\n return false;\n }\n if (!axisOverlap(Vector3.Cross(box0.directions[1], box1.directions[1]), box0, box1)) {\n return false;\n }\n if (!axisOverlap(Vector3.Cross(box0.directions[1], box1.directions[2]), box0, box1)) {\n return false;\n }\n if (!axisOverlap(Vector3.Cross(box0.directions[2], box1.directions[0]), box0, box1)) {\n return false;\n }\n if (!axisOverlap(Vector3.Cross(box0.directions[2], box1.directions[1]), box0, box1)) {\n return false;\n }\n if (!axisOverlap(Vector3.Cross(box0.directions[2], box1.directions[2]), box0, box1)) {\n return false;\n }\n return true;\n }\n}\nBoundingInfo._TmpVector3 = ArrayTools.BuildArray(2, Vector3.Zero);\n//# sourceMappingURL=boundingInfo.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { Vector3 } from \"./math.vector.js\";\nimport { nativeOverride } from \"../Misc/decorators.js\";\n// This helper class is only here so we can apply the nativeOverride decorator to functions.\nclass MathHelpers {\n static extractMinAndMaxIndexed(positions, indices, indexStart, indexCount, minimum, maximum) {\n for (let index = indexStart; index < indexStart + indexCount; index++) {\n const offset = indices[index] * 3;\n const x = positions[offset];\n const y = positions[offset + 1];\n const z = positions[offset + 2];\n minimum.minimizeInPlaceFromFloats(x, y, z);\n maximum.maximizeInPlaceFromFloats(x, y, z);\n }\n }\n static extractMinAndMax(positions, start, count, stride, minimum, maximum) {\n for (let index = start, offset = start * stride; index < start + count; index++, offset += stride) {\n const x = positions[offset];\n const y = positions[offset + 1];\n const z = positions[offset + 2];\n minimum.minimizeInPlaceFromFloats(x, y, z);\n maximum.maximizeInPlaceFromFloats(x, y, z);\n }\n }\n}\n__decorate([\n nativeOverride.filter((...[positions, indices]) => !Array.isArray(positions) && !Array.isArray(indices))\n // eslint-disable-next-line @typescript-eslint/naming-convention\n], MathHelpers, \"extractMinAndMaxIndexed\", null);\n__decorate([\n nativeOverride.filter((...[positions]) => !Array.isArray(positions))\n // eslint-disable-next-line @typescript-eslint/naming-convention\n], MathHelpers, \"extractMinAndMax\", null);\n/**\n * Extracts minimum and maximum values from a list of indexed positions\n * @param positions defines the positions to use\n * @param indices defines the indices to the positions\n * @param indexStart defines the start index\n * @param indexCount defines the end index\n * @param bias defines bias value to add to the result\n * @returns minimum and maximum values\n */\nexport function extractMinAndMaxIndexed(positions, indices, indexStart, indexCount, bias = null) {\n const minimum = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n const maximum = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\n MathHelpers.extractMinAndMaxIndexed(positions, indices, indexStart, indexCount, minimum, maximum);\n if (bias) {\n minimum.x -= minimum.x * bias.x + bias.y;\n minimum.y -= minimum.y * bias.x + bias.y;\n minimum.z -= minimum.z * bias.x + bias.y;\n maximum.x += maximum.x * bias.x + bias.y;\n maximum.y += maximum.y * bias.x + bias.y;\n maximum.z += maximum.z * bias.x + bias.y;\n }\n return {\n minimum: minimum,\n maximum: maximum,\n };\n}\n/**\n * Extracts minimum and maximum values from a list of positions\n * @param positions defines the positions to use\n * @param start defines the start index in the positions array\n * @param count defines the number of positions to handle\n * @param bias defines bias value to add to the result\n * @param stride defines the stride size to use (distance between two positions in the positions array)\n * @returns minimum and maximum values\n */\nexport function extractMinAndMax(positions, start, count, bias = null, stride) {\n const minimum = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n const maximum = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\n if (!stride) {\n stride = 3;\n }\n MathHelpers.extractMinAndMax(positions, start, count, stride, minimum, maximum);\n if (bias) {\n minimum.x -= minimum.x * bias.x + bias.y;\n minimum.y -= minimum.y * bias.x + bias.y;\n minimum.z -= minimum.z * bias.x + bias.y;\n maximum.x += maximum.x * bias.x + bias.y;\n maximum.y += maximum.y * bias.x + bias.y;\n maximum.z += maximum.z * bias.x + bias.y;\n }\n return {\n minimum: minimum,\n maximum: maximum,\n };\n}\n//# sourceMappingURL=math.functions.js.map","import { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { IntersectionInfo } from \"../Collisions/intersectionInfo.js\";\nimport { BoundingInfo } from \"../Culling/boundingInfo.js\";\n\nimport { extractMinAndMaxIndexed } from \"../Maths/math.functions.js\";\nimport { DrawWrapper } from \"../Materials/drawWrapper.js\";\n/**\n * Defines a subdivision inside a mesh\n */\nexport class SubMesh {\n /**\n * Gets material defines used by the effect associated to the sub mesh\n */\n get materialDefines() {\n var _a;\n return this._mainDrawWrapperOverride ? this._mainDrawWrapperOverride.defines : (_a = this._getDrawWrapper()) === null || _a === void 0 ? void 0 : _a.defines;\n }\n /**\n * Sets material defines used by the effect associated to the sub mesh\n */\n set materialDefines(defines) {\n var _a;\n const drawWrapper = (_a = this._mainDrawWrapperOverride) !== null && _a !== void 0 ? _a : this._getDrawWrapper(undefined, true);\n drawWrapper.defines = defines;\n }\n /**\n * @internal\n */\n _getDrawWrapper(passId, createIfNotExisting = false) {\n passId = passId !== null && passId !== void 0 ? passId : this._engine.currentRenderPassId;\n let drawWrapper = this._drawWrappers[passId];\n if (!drawWrapper && createIfNotExisting) {\n this._drawWrappers[passId] = drawWrapper = new DrawWrapper(this._mesh.getScene().getEngine());\n }\n return drawWrapper;\n }\n /**\n * @internal\n */\n _removeDrawWrapper(passId, disposeWrapper = true) {\n var _a;\n if (disposeWrapper) {\n (_a = this._drawWrappers[passId]) === null || _a === void 0 ? void 0 : _a.dispose();\n }\n this._drawWrappers[passId] = undefined;\n }\n /**\n * Gets associated (main) effect (possibly the effect override if defined)\n */\n get effect() {\n var _a, _b;\n return this._mainDrawWrapperOverride ? this._mainDrawWrapperOverride.effect : (_b = (_a = this._getDrawWrapper()) === null || _a === void 0 ? void 0 : _a.effect) !== null && _b !== void 0 ? _b : null;\n }\n /** @internal */\n get _drawWrapper() {\n var _a;\n return (_a = this._mainDrawWrapperOverride) !== null && _a !== void 0 ? _a : this._getDrawWrapper(undefined, true);\n }\n /** @internal */\n get _drawWrapperOverride() {\n return this._mainDrawWrapperOverride;\n }\n /**\n * @internal\n */\n _setMainDrawWrapperOverride(wrapper) {\n this._mainDrawWrapperOverride = wrapper;\n }\n /**\n * Sets associated effect (effect used to render this submesh)\n * @param effect defines the effect to associate with\n * @param defines defines the set of defines used to compile this effect\n * @param materialContext material context associated to the effect\n * @param resetContext true to reset the draw context\n */\n setEffect(effect, defines = null, materialContext, resetContext = true) {\n const drawWrapper = this._drawWrapper;\n drawWrapper.setEffect(effect, defines, resetContext);\n if (materialContext !== undefined) {\n drawWrapper.materialContext = materialContext;\n }\n if (!effect) {\n drawWrapper.defines = null;\n drawWrapper.materialContext = undefined;\n }\n }\n /**\n * Resets the draw wrappers cache\n * @param passId If provided, releases only the draw wrapper corresponding to this render pass id\n */\n resetDrawCache(passId) {\n if (this._drawWrappers) {\n if (passId !== undefined) {\n this._removeDrawWrapper(passId);\n return;\n }\n else {\n for (const drawWrapper of this._drawWrappers) {\n drawWrapper === null || drawWrapper === void 0 ? void 0 : drawWrapper.dispose();\n }\n }\n }\n this._drawWrappers = [];\n }\n /**\n * Add a new submesh to a mesh\n * @param materialIndex defines the material index to use\n * @param verticesStart defines vertex index start\n * @param verticesCount defines vertices count\n * @param indexStart defines index start\n * @param indexCount defines indices count\n * @param mesh defines the parent mesh\n * @param renderingMesh defines an optional rendering mesh\n * @param createBoundingBox defines if bounding box should be created for this submesh\n * @returns the new submesh\n */\n static AddToMesh(materialIndex, verticesStart, verticesCount, indexStart, indexCount, mesh, renderingMesh, createBoundingBox = true) {\n return new SubMesh(materialIndex, verticesStart, verticesCount, indexStart, indexCount, mesh, renderingMesh, createBoundingBox);\n }\n /**\n * Creates a new submesh\n * @param materialIndex defines the material index to use\n * @param verticesStart defines vertex index start\n * @param verticesCount defines vertices count\n * @param indexStart defines index start\n * @param indexCount defines indices count\n * @param mesh defines the parent mesh\n * @param renderingMesh defines an optional rendering mesh\n * @param createBoundingBox defines if bounding box should be created for this submesh\n * @param addToMesh defines a boolean indicating that the submesh must be added to the mesh.subMeshes array (true by default)\n */\n constructor(\n /** the material index to use */\n materialIndex, \n /** vertex index start */\n verticesStart, \n /** vertices count */\n verticesCount, \n /** index start */\n indexStart, \n /** indices count */\n indexCount, mesh, renderingMesh, createBoundingBox = true, addToMesh = true) {\n this.materialIndex = materialIndex;\n this.verticesStart = verticesStart;\n this.verticesCount = verticesCount;\n this.indexStart = indexStart;\n this.indexCount = indexCount;\n this._mainDrawWrapperOverride = null;\n /** @internal */\n this._linesIndexCount = 0;\n this._linesIndexBuffer = null;\n /** @internal */\n this._lastColliderWorldVertices = null;\n /** @internal */\n this._lastColliderTransformMatrix = null;\n /** @internal */\n this._wasDispatched = false;\n /** @internal */\n this._renderId = 0;\n /** @internal */\n this._alphaIndex = 0;\n /** @internal */\n this._distanceToCamera = 0;\n this._currentMaterial = null;\n this._mesh = mesh;\n this._renderingMesh = renderingMesh || mesh;\n if (addToMesh) {\n mesh.subMeshes.push(this);\n }\n this._engine = this._mesh.getScene().getEngine();\n this.resetDrawCache();\n this._trianglePlanes = [];\n this._id = mesh.subMeshes.length - 1;\n if (createBoundingBox) {\n this.refreshBoundingInfo();\n mesh.computeWorldMatrix(true);\n }\n }\n /**\n * Returns true if this submesh covers the entire parent mesh\n * @ignorenaming\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n get IsGlobal() {\n return this.verticesStart === 0 && this.verticesCount === this._mesh.getTotalVertices() && this.indexStart === 0 && this.indexCount === this._mesh.getTotalIndices();\n }\n /**\n * Returns the submesh BoundingInfo object\n * @returns current bounding info (or mesh's one if the submesh is global)\n */\n getBoundingInfo() {\n if (this.IsGlobal || this._mesh.hasThinInstances) {\n return this._mesh.getBoundingInfo();\n }\n return this._boundingInfo;\n }\n /**\n * Sets the submesh BoundingInfo\n * @param boundingInfo defines the new bounding info to use\n * @returns the SubMesh\n */\n setBoundingInfo(boundingInfo) {\n this._boundingInfo = boundingInfo;\n return this;\n }\n /**\n * Returns the mesh of the current submesh\n * @returns the parent mesh\n */\n getMesh() {\n return this._mesh;\n }\n /**\n * Returns the rendering mesh of the submesh\n * @returns the rendering mesh (could be different from parent mesh)\n */\n getRenderingMesh() {\n return this._renderingMesh;\n }\n /**\n * Returns the replacement mesh of the submesh\n * @returns the replacement mesh (could be different from parent mesh)\n */\n getReplacementMesh() {\n return this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh ? this._mesh : null;\n }\n /**\n * Returns the effective mesh of the submesh\n * @returns the effective mesh (could be different from parent mesh)\n */\n getEffectiveMesh() {\n const replacementMesh = this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh ? this._mesh : null;\n return replacementMesh ? replacementMesh : this._renderingMesh;\n }\n /**\n * Returns the submesh material\n * @param getDefaultMaterial Defines whether or not to get the default material if nothing has been defined.\n * @returns null or the current material\n */\n getMaterial(getDefaultMaterial = true) {\n var _a;\n const rootMaterial = (_a = this._renderingMesh.getMaterialForRenderPass(this._engine.currentRenderPassId)) !== null && _a !== void 0 ? _a : this._renderingMesh.material;\n if (!rootMaterial) {\n return getDefaultMaterial ? this._mesh.getScene().defaultMaterial : null;\n }\n else if (this._isMultiMaterial(rootMaterial)) {\n const effectiveMaterial = rootMaterial.getSubMaterial(this.materialIndex);\n if (this._currentMaterial !== effectiveMaterial) {\n this._currentMaterial = effectiveMaterial;\n this.resetDrawCache();\n }\n return effectiveMaterial;\n }\n return rootMaterial;\n }\n _isMultiMaterial(material) {\n return material.getSubMaterial !== undefined;\n }\n // Methods\n /**\n * Sets a new updated BoundingInfo object to the submesh\n * @param data defines an optional position array to use to determine the bounding info\n * @returns the SubMesh\n */\n refreshBoundingInfo(data = null) {\n this._lastColliderWorldVertices = null;\n if (this.IsGlobal || !this._renderingMesh || !this._renderingMesh.geometry) {\n return this;\n }\n if (!data) {\n data = this._renderingMesh.getVerticesData(VertexBuffer.PositionKind);\n }\n if (!data) {\n this._boundingInfo = this._mesh.getBoundingInfo();\n return this;\n }\n const indices = this._renderingMesh.getIndices();\n let extend;\n //is this the only submesh?\n if (this.indexStart === 0 && this.indexCount === indices.length) {\n const boundingInfo = this._renderingMesh.getBoundingInfo();\n //the rendering mesh's bounding info can be used, it is the standard submesh for all indices.\n extend = { minimum: boundingInfo.minimum.clone(), maximum: boundingInfo.maximum.clone() };\n }\n else {\n extend = extractMinAndMaxIndexed(data, indices, this.indexStart, this.indexCount, this._renderingMesh.geometry.boundingBias);\n }\n if (this._boundingInfo) {\n this._boundingInfo.reConstruct(extend.minimum, extend.maximum);\n }\n else {\n this._boundingInfo = new BoundingInfo(extend.minimum, extend.maximum);\n }\n return this;\n }\n /**\n * @internal\n */\n _checkCollision(collider) {\n const boundingInfo = this.getBoundingInfo();\n return boundingInfo._checkCollision(collider);\n }\n /**\n * Updates the submesh BoundingInfo\n * @param world defines the world matrix to use to update the bounding info\n * @returns the submesh\n */\n updateBoundingInfo(world) {\n let boundingInfo = this.getBoundingInfo();\n if (!boundingInfo) {\n this.refreshBoundingInfo();\n boundingInfo = this.getBoundingInfo();\n }\n if (boundingInfo) {\n boundingInfo.update(world);\n }\n return this;\n }\n /**\n * True is the submesh bounding box intersects the frustum defined by the passed array of planes.\n * @param frustumPlanes defines the frustum planes\n * @returns true if the submesh is intersecting with the frustum\n */\n isInFrustum(frustumPlanes) {\n const boundingInfo = this.getBoundingInfo();\n if (!boundingInfo) {\n return false;\n }\n return boundingInfo.isInFrustum(frustumPlanes, this._mesh.cullingStrategy);\n }\n /**\n * True is the submesh bounding box is completely inside the frustum defined by the passed array of planes\n * @param frustumPlanes defines the frustum planes\n * @returns true if the submesh is inside the frustum\n */\n isCompletelyInFrustum(frustumPlanes) {\n const boundingInfo = this.getBoundingInfo();\n if (!boundingInfo) {\n return false;\n }\n return boundingInfo.isCompletelyInFrustum(frustumPlanes);\n }\n /**\n * Renders the submesh\n * @param enableAlphaMode defines if alpha needs to be used\n * @returns the submesh\n */\n render(enableAlphaMode) {\n this._renderingMesh.render(this, enableAlphaMode, this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh ? this._mesh : undefined);\n return this;\n }\n /**\n * @internal\n */\n _getLinesIndexBuffer(indices, engine) {\n if (!this._linesIndexBuffer) {\n const linesIndices = [];\n for (let index = this.indexStart; index < this.indexStart + this.indexCount; index += 3) {\n linesIndices.push(indices[index], indices[index + 1], indices[index + 1], indices[index + 2], indices[index + 2], indices[index]);\n }\n this._linesIndexBuffer = engine.createIndexBuffer(linesIndices);\n this._linesIndexCount = linesIndices.length;\n }\n return this._linesIndexBuffer;\n }\n /**\n * Checks if the submesh intersects with a ray\n * @param ray defines the ray to test\n * @returns true is the passed ray intersects the submesh bounding box\n */\n canIntersects(ray) {\n const boundingInfo = this.getBoundingInfo();\n if (!boundingInfo) {\n return false;\n }\n return ray.intersectsBox(boundingInfo.boundingBox);\n }\n /**\n * Intersects current submesh with a ray\n * @param ray defines the ray to test\n * @param positions defines mesh's positions array\n * @param indices defines mesh's indices array\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @returns intersection info or null if no intersection\n */\n intersects(ray, positions, indices, fastCheck, trianglePredicate) {\n const material = this.getMaterial();\n if (!material) {\n return null;\n }\n let step = 3;\n let checkStopper = false;\n switch (material.fillMode) {\n case 3:\n case 5:\n case 6:\n case 8:\n return null;\n case 7:\n step = 1;\n checkStopper = true;\n break;\n default:\n break;\n }\n // LineMesh first as it's also a Mesh...\n if (material.fillMode === 4) {\n // Check if mesh is unindexed\n if (!indices.length) {\n return this._intersectUnIndexedLines(ray, positions, indices, this._mesh.intersectionThreshold, fastCheck);\n }\n return this._intersectLines(ray, positions, indices, this._mesh.intersectionThreshold, fastCheck);\n }\n else {\n // Check if mesh is unindexed\n if (!indices.length && this._mesh._unIndexed) {\n return this._intersectUnIndexedTriangles(ray, positions, indices, fastCheck, trianglePredicate);\n }\n return this._intersectTriangles(ray, positions, indices, step, checkStopper, fastCheck, trianglePredicate);\n }\n }\n /**\n * @internal\n */\n _intersectLines(ray, positions, indices, intersectionThreshold, fastCheck) {\n let intersectInfo = null;\n // Line test\n for (let index = this.indexStart; index < this.indexStart + this.indexCount; index += 2) {\n const p0 = positions[indices[index]];\n const p1 = positions[indices[index + 1]];\n const length = ray.intersectionSegment(p0, p1, intersectionThreshold);\n if (length < 0) {\n continue;\n }\n if (fastCheck || !intersectInfo || length < intersectInfo.distance) {\n intersectInfo = new IntersectionInfo(null, null, length);\n intersectInfo.faceId = index / 2;\n if (fastCheck) {\n break;\n }\n }\n }\n return intersectInfo;\n }\n /**\n * @internal\n */\n _intersectUnIndexedLines(ray, positions, indices, intersectionThreshold, fastCheck) {\n let intersectInfo = null;\n // Line test\n for (let index = this.verticesStart; index < this.verticesStart + this.verticesCount; index += 2) {\n const p0 = positions[index];\n const p1 = positions[index + 1];\n const length = ray.intersectionSegment(p0, p1, intersectionThreshold);\n if (length < 0) {\n continue;\n }\n if (fastCheck || !intersectInfo || length < intersectInfo.distance) {\n intersectInfo = new IntersectionInfo(null, null, length);\n intersectInfo.faceId = index / 2;\n if (fastCheck) {\n break;\n }\n }\n }\n return intersectInfo;\n }\n /**\n * @internal\n */\n _intersectTriangles(ray, positions, indices, step, checkStopper, fastCheck, trianglePredicate) {\n let intersectInfo = null;\n // Triangles test\n let faceId = -1;\n for (let index = this.indexStart; index < this.indexStart + this.indexCount - (3 - step); index += step) {\n faceId++;\n const indexA = indices[index];\n const indexB = indices[index + 1];\n const indexC = indices[index + 2];\n if (checkStopper && indexC === 0xffffffff) {\n index += 2;\n continue;\n }\n const p0 = positions[indexA];\n const p1 = positions[indexB];\n const p2 = positions[indexC];\n // stay defensive and don't check against undefined positions.\n if (!p0 || !p1 || !p2) {\n continue;\n }\n if (trianglePredicate && !trianglePredicate(p0, p1, p2, ray, indexA, indexB, indexC)) {\n continue;\n }\n const currentIntersectInfo = ray.intersectsTriangle(p0, p1, p2);\n if (currentIntersectInfo) {\n if (currentIntersectInfo.distance < 0) {\n continue;\n }\n if (fastCheck || !intersectInfo || currentIntersectInfo.distance < intersectInfo.distance) {\n intersectInfo = currentIntersectInfo;\n intersectInfo.faceId = faceId;\n if (fastCheck) {\n break;\n }\n }\n }\n }\n return intersectInfo;\n }\n /**\n * @internal\n */\n _intersectUnIndexedTriangles(ray, positions, indices, fastCheck, trianglePredicate) {\n let intersectInfo = null;\n // Triangles test\n for (let index = this.verticesStart; index < this.verticesStart + this.verticesCount; index += 3) {\n const p0 = positions[index];\n const p1 = positions[index + 1];\n const p2 = positions[index + 2];\n if (trianglePredicate && !trianglePredicate(p0, p1, p2, ray, -1, -1, -1)) {\n continue;\n }\n const currentIntersectInfo = ray.intersectsTriangle(p0, p1, p2);\n if (currentIntersectInfo) {\n if (currentIntersectInfo.distance < 0) {\n continue;\n }\n if (fastCheck || !intersectInfo || currentIntersectInfo.distance < intersectInfo.distance) {\n intersectInfo = currentIntersectInfo;\n intersectInfo.faceId = index / 3;\n if (fastCheck) {\n break;\n }\n }\n }\n }\n return intersectInfo;\n }\n /** @internal */\n _rebuild() {\n if (this._linesIndexBuffer) {\n this._linesIndexBuffer = null;\n }\n }\n // Clone\n /**\n * Creates a new submesh from the passed mesh\n * @param newMesh defines the new hosting mesh\n * @param newRenderingMesh defines an optional rendering mesh\n * @returns the new submesh\n */\n clone(newMesh, newRenderingMesh) {\n const result = new SubMesh(this.materialIndex, this.verticesStart, this.verticesCount, this.indexStart, this.indexCount, newMesh, newRenderingMesh, false);\n if (!this.IsGlobal) {\n const boundingInfo = this.getBoundingInfo();\n if (!boundingInfo) {\n return result;\n }\n result._boundingInfo = new BoundingInfo(boundingInfo.minimum, boundingInfo.maximum);\n }\n return result;\n }\n // Dispose\n /**\n * Release associated resources\n */\n dispose() {\n if (this._linesIndexBuffer) {\n this._mesh.getScene().getEngine()._releaseBuffer(this._linesIndexBuffer);\n this._linesIndexBuffer = null;\n }\n // Remove from mesh\n const index = this._mesh.subMeshes.indexOf(this);\n this._mesh.subMeshes.splice(index, 1);\n this.resetDrawCache();\n }\n /**\n * Gets the class name\n * @returns the string \"SubMesh\".\n */\n getClassName() {\n return \"SubMesh\";\n }\n // Statics\n /**\n * Creates a new submesh from indices data\n * @param materialIndex the index of the main mesh material\n * @param startIndex the index where to start the copy in the mesh indices array\n * @param indexCount the number of indices to copy then from the startIndex\n * @param mesh the main mesh to create the submesh from\n * @param renderingMesh the optional rendering mesh\n * @param createBoundingBox defines if bounding box should be created for this submesh\n * @returns a new submesh\n */\n static CreateFromIndices(materialIndex, startIndex, indexCount, mesh, renderingMesh, createBoundingBox = true) {\n let minVertexIndex = Number.MAX_VALUE;\n let maxVertexIndex = -Number.MAX_VALUE;\n const whatWillRender = renderingMesh || mesh;\n const indices = whatWillRender.getIndices();\n for (let index = startIndex; index < startIndex + indexCount; index++) {\n const vertexIndex = indices[index];\n if (vertexIndex < minVertexIndex) {\n minVertexIndex = vertexIndex;\n }\n if (vertexIndex > maxVertexIndex) {\n maxVertexIndex = vertexIndex;\n }\n }\n return new SubMesh(materialIndex, minVertexIndex, maxVertexIndex - minVertexIndex + 1, startIndex, indexCount, mesh, renderingMesh, createBoundingBox);\n }\n}\n//# sourceMappingURL=subMesh.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { Vector3, Vector4, TmpVectors } from \"../Maths/math.vector.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { _WarnImport } from \"../Misc/devTools.js\";\nimport { Color4 } from \"../Maths/math.color.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { nativeOverride } from \"../Misc/decorators.js\";\nimport { makeSyncFunction, runCoroutineSync } from \"../Misc/coroutine.js\";\nimport { RuntimeError, ErrorCodes } from \"../Misc/error.js\";\nimport { SubMesh } from \"./subMesh.js\";\n/** Class used to attach material info to sub section of a vertex data class */\nexport class VertexDataMaterialInfo {\n}\n/**\n * This class contains the various kinds of data on every vertex of a mesh used in determining its shape and appearance\n */\nexport class VertexData {\n /**\n * Creates a new VertexData\n */\n constructor() {\n /**\n * Gets the unique ID of this vertex Data\n */\n this.uniqueId = 0;\n /**\n * Metadata used to store contextual values\n */\n this.metadata = {};\n this._applyTo = makeSyncFunction(this._applyToCoroutine.bind(this));\n this.uniqueId = VertexData._UniqueIDGenerator;\n VertexData._UniqueIDGenerator++;\n }\n /**\n * Uses the passed data array to set the set the values for the specified kind of data\n * @param data a linear array of floating numbers\n * @param kind the type of data that is being set, eg positions, colors etc\n */\n set(data, kind) {\n if (!data.length) {\n Logger.Warn(`Setting vertex data kind '${kind}' with an empty array`);\n }\n switch (kind) {\n case VertexBuffer.PositionKind:\n this.positions = data;\n break;\n case VertexBuffer.NormalKind:\n this.normals = data;\n break;\n case VertexBuffer.TangentKind:\n this.tangents = data;\n break;\n case VertexBuffer.UVKind:\n this.uvs = data;\n break;\n case VertexBuffer.UV2Kind:\n this.uvs2 = data;\n break;\n case VertexBuffer.UV3Kind:\n this.uvs3 = data;\n break;\n case VertexBuffer.UV4Kind:\n this.uvs4 = data;\n break;\n case VertexBuffer.UV5Kind:\n this.uvs5 = data;\n break;\n case VertexBuffer.UV6Kind:\n this.uvs6 = data;\n break;\n case VertexBuffer.ColorKind:\n this.colors = data;\n break;\n case VertexBuffer.MatricesIndicesKind:\n this.matricesIndices = data;\n break;\n case VertexBuffer.MatricesWeightsKind:\n this.matricesWeights = data;\n break;\n case VertexBuffer.MatricesIndicesExtraKind:\n this.matricesIndicesExtra = data;\n break;\n case VertexBuffer.MatricesWeightsExtraKind:\n this.matricesWeightsExtra = data;\n break;\n }\n }\n /**\n * Associates the vertexData to the passed Mesh.\n * Sets it as updatable or not (default `false`)\n * @param mesh the mesh the vertexData is applied to\n * @param updatable when used and having the value true allows new data to update the vertexData\n * @returns the VertexData\n */\n applyToMesh(mesh, updatable) {\n this._applyTo(mesh, updatable, false);\n return this;\n }\n /**\n * Associates the vertexData to the passed Geometry.\n * Sets it as updatable or not (default `false`)\n * @param geometry the geometry the vertexData is applied to\n * @param updatable when used and having the value true allows new data to update the vertexData\n * @returns VertexData\n */\n applyToGeometry(geometry, updatable) {\n this._applyTo(geometry, updatable, false);\n return this;\n }\n /**\n * Updates the associated mesh\n * @param mesh the mesh to be updated\n * @returns VertexData\n */\n updateMesh(mesh) {\n this._update(mesh);\n return this;\n }\n /**\n * Updates the associated geometry\n * @param geometry the geometry to be updated\n * @returns VertexData.\n */\n updateGeometry(geometry) {\n this._update(geometry);\n return this;\n }\n /**\n * @internal\n */\n *_applyToCoroutine(meshOrGeometry, updatable = false, isAsync) {\n if (this.positions) {\n meshOrGeometry.setVerticesData(VertexBuffer.PositionKind, this.positions, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.normals) {\n meshOrGeometry.setVerticesData(VertexBuffer.NormalKind, this.normals, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.tangents) {\n meshOrGeometry.setVerticesData(VertexBuffer.TangentKind, this.tangents, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.uvs) {\n meshOrGeometry.setVerticesData(VertexBuffer.UVKind, this.uvs, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.uvs2) {\n meshOrGeometry.setVerticesData(VertexBuffer.UV2Kind, this.uvs2, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.uvs3) {\n meshOrGeometry.setVerticesData(VertexBuffer.UV3Kind, this.uvs3, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.uvs4) {\n meshOrGeometry.setVerticesData(VertexBuffer.UV4Kind, this.uvs4, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.uvs5) {\n meshOrGeometry.setVerticesData(VertexBuffer.UV5Kind, this.uvs5, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.uvs6) {\n meshOrGeometry.setVerticesData(VertexBuffer.UV6Kind, this.uvs6, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.colors) {\n meshOrGeometry.setVerticesData(VertexBuffer.ColorKind, this.colors, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.matricesIndices) {\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesIndicesKind, this.matricesIndices, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.matricesWeights) {\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesWeightsKind, this.matricesWeights, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.matricesIndicesExtra) {\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesIndicesExtraKind, this.matricesIndicesExtra, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.matricesWeightsExtra) {\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesWeightsExtraKind, this.matricesWeightsExtra, updatable);\n if (isAsync) {\n yield;\n }\n }\n if (this.indices) {\n meshOrGeometry.setIndices(this.indices, null, updatable);\n if (isAsync) {\n yield;\n }\n }\n else {\n meshOrGeometry.setIndices([], null);\n }\n if (meshOrGeometry.subMeshes && this.materialInfos && this.materialInfos.length > 1) {\n const mesh = meshOrGeometry;\n mesh.subMeshes = [];\n for (const matInfo of this.materialInfos) {\n new SubMesh(matInfo.materialIndex, matInfo.verticesStart, matInfo.verticesCount, matInfo.indexStart, matInfo.indexCount, mesh);\n }\n }\n return this;\n }\n _update(meshOrGeometry, updateExtends, makeItUnique) {\n if (this.positions) {\n meshOrGeometry.updateVerticesData(VertexBuffer.PositionKind, this.positions, updateExtends, makeItUnique);\n }\n if (this.normals) {\n meshOrGeometry.updateVerticesData(VertexBuffer.NormalKind, this.normals, updateExtends, makeItUnique);\n }\n if (this.tangents) {\n meshOrGeometry.updateVerticesData(VertexBuffer.TangentKind, this.tangents, updateExtends, makeItUnique);\n }\n if (this.uvs) {\n meshOrGeometry.updateVerticesData(VertexBuffer.UVKind, this.uvs, updateExtends, makeItUnique);\n }\n if (this.uvs2) {\n meshOrGeometry.updateVerticesData(VertexBuffer.UV2Kind, this.uvs2, updateExtends, makeItUnique);\n }\n if (this.uvs3) {\n meshOrGeometry.updateVerticesData(VertexBuffer.UV3Kind, this.uvs3, updateExtends, makeItUnique);\n }\n if (this.uvs4) {\n meshOrGeometry.updateVerticesData(VertexBuffer.UV4Kind, this.uvs4, updateExtends, makeItUnique);\n }\n if (this.uvs5) {\n meshOrGeometry.updateVerticesData(VertexBuffer.UV5Kind, this.uvs5, updateExtends, makeItUnique);\n }\n if (this.uvs6) {\n meshOrGeometry.updateVerticesData(VertexBuffer.UV6Kind, this.uvs6, updateExtends, makeItUnique);\n }\n if (this.colors) {\n meshOrGeometry.updateVerticesData(VertexBuffer.ColorKind, this.colors, updateExtends, makeItUnique);\n }\n if (this.matricesIndices) {\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesIndicesKind, this.matricesIndices, updateExtends, makeItUnique);\n }\n if (this.matricesWeights) {\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesWeightsKind, this.matricesWeights, updateExtends, makeItUnique);\n }\n if (this.matricesIndicesExtra) {\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesIndicesExtraKind, this.matricesIndicesExtra, updateExtends, makeItUnique);\n }\n if (this.matricesWeightsExtra) {\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesWeightsExtraKind, this.matricesWeightsExtra, updateExtends, makeItUnique);\n }\n if (this.indices) {\n meshOrGeometry.setIndices(this.indices, null);\n }\n return this;\n }\n static _TransformVector3Coordinates(coordinates, transformation, offset = 0, length = coordinates.length) {\n const coordinate = TmpVectors.Vector3[0];\n const transformedCoordinate = TmpVectors.Vector3[1];\n for (let index = offset; index < offset + length; index += 3) {\n Vector3.FromArrayToRef(coordinates, index, coordinate);\n Vector3.TransformCoordinatesToRef(coordinate, transformation, transformedCoordinate);\n coordinates[index] = transformedCoordinate.x;\n coordinates[index + 1] = transformedCoordinate.y;\n coordinates[index + 2] = transformedCoordinate.z;\n }\n }\n static _TransformVector3Normals(normals, transformation, offset = 0, length = normals.length) {\n const normal = TmpVectors.Vector3[0];\n const transformedNormal = TmpVectors.Vector3[1];\n for (let index = offset; index < offset + length; index += 3) {\n Vector3.FromArrayToRef(normals, index, normal);\n Vector3.TransformNormalToRef(normal, transformation, transformedNormal);\n normals[index] = transformedNormal.x;\n normals[index + 1] = transformedNormal.y;\n normals[index + 2] = transformedNormal.z;\n }\n }\n static _TransformVector4Normals(normals, transformation, offset = 0, length = normals.length) {\n const normal = TmpVectors.Vector4[0];\n const transformedNormal = TmpVectors.Vector4[1];\n for (let index = offset; index < offset + length; index += 4) {\n Vector4.FromArrayToRef(normals, index, normal);\n Vector4.TransformNormalToRef(normal, transformation, transformedNormal);\n normals[index] = transformedNormal.x;\n normals[index + 1] = transformedNormal.y;\n normals[index + 2] = transformedNormal.z;\n normals[index + 3] = transformedNormal.w;\n }\n }\n static _FlipFaces(indices, offset = 0, length = indices.length) {\n for (let index = offset; index < offset + length; index += 3) {\n const tmp = indices[index + 1];\n indices[index + 1] = indices[index + 2];\n indices[index + 2] = tmp;\n }\n }\n /**\n * Transforms each position and each normal of the vertexData according to the passed Matrix\n * @param matrix the transforming matrix\n * @returns the VertexData\n */\n transform(matrix) {\n const flip = matrix.determinant() < 0;\n if (this.positions) {\n VertexData._TransformVector3Coordinates(this.positions, matrix);\n }\n if (this.normals) {\n VertexData._TransformVector3Normals(this.normals, matrix);\n }\n if (this.tangents) {\n VertexData._TransformVector4Normals(this.tangents, matrix);\n }\n if (flip && this.indices) {\n VertexData._FlipFaces(this.indices);\n }\n return this;\n }\n /**\n * Generates an array of vertex data where each vertex data only has one material info\n * @returns An array of VertexData\n */\n splitBasedOnMaterialID() {\n if (!this.materialInfos || this.materialInfos.length < 2) {\n return [this];\n }\n const result = [];\n for (const materialInfo of this.materialInfos) {\n const vertexData = new VertexData();\n if (this.positions) {\n vertexData.positions = this.positions.slice(materialInfo.verticesStart * 3, (materialInfo.verticesCount + materialInfo.verticesStart) * 3);\n }\n if (this.normals) {\n vertexData.normals = this.normals.slice(materialInfo.verticesStart * 3, (materialInfo.verticesCount + materialInfo.verticesStart) * 3);\n }\n if (this.tangents) {\n vertexData.tangents = this.tangents.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\n }\n if (this.colors) {\n vertexData.colors = this.colors.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\n }\n if (this.uvs) {\n vertexData.uvs = this.uvs.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\n }\n if (this.uvs2) {\n vertexData.uvs2 = this.uvs2.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\n }\n if (this.uvs3) {\n vertexData.uvs3 = this.uvs3.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\n }\n if (this.uvs4) {\n vertexData.uvs4 = this.uvs4.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\n }\n if (this.uvs5) {\n vertexData.uvs5 = this.uvs5.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\n }\n if (this.uvs6) {\n vertexData.uvs6 = this.uvs6.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\n }\n if (this.matricesIndices) {\n vertexData.matricesIndices = this.matricesIndices.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\n }\n if (this.matricesIndicesExtra) {\n vertexData.matricesIndicesExtra = this.matricesIndicesExtra.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\n }\n if (this.matricesWeights) {\n vertexData.matricesWeights = this.matricesWeights.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\n }\n if (this.matricesWeightsExtra) {\n vertexData.matricesWeightsExtra = this.matricesWeightsExtra.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\n }\n if (this.indices) {\n vertexData.indices = [];\n for (let index = materialInfo.indexStart; index < materialInfo.indexStart + materialInfo.indexCount; index++) {\n vertexData.indices.push(this.indices[index] - materialInfo.verticesStart);\n }\n }\n const newMaterialInfo = new VertexDataMaterialInfo();\n newMaterialInfo.indexStart = 0;\n newMaterialInfo.indexCount = vertexData.indices ? vertexData.indices.length : 0;\n newMaterialInfo.materialIndex = materialInfo.materialIndex;\n newMaterialInfo.verticesStart = 0;\n newMaterialInfo.verticesCount = (vertexData.positions ? vertexData.positions.length : 0) / 3;\n vertexData.materialInfos = [newMaterialInfo];\n result.push(vertexData);\n }\n return result;\n }\n /**\n * Merges the passed VertexData into the current one\n * @param others the VertexData to be merged into the current one\n * @param use32BitsIndices defines a boolean indicating if indices must be store in a 32 bits array\n * @param forceCloneIndices defines a boolean indicating if indices are forced to be cloned\n * @param mergeMaterialIds defines a boolean indicating if we need to merge the material infos\n * @param enableCompletion defines a boolean indicating if the vertex data should be completed to be compatible\n * @returns the modified VertexData\n */\n merge(others, use32BitsIndices = false, forceCloneIndices = false, mergeMaterialIds = false, enableCompletion = false) {\n const vertexDatas = Array.isArray(others)\n ? others.map((other) => {\n return { vertexData: other };\n })\n : [{ vertexData: others }];\n return runCoroutineSync(this._mergeCoroutine(undefined, vertexDatas, use32BitsIndices, false, forceCloneIndices, mergeMaterialIds, enableCompletion));\n }\n /**\n * @internal\n */\n *_mergeCoroutine(transform, vertexDatas, use32BitsIndices = false, isAsync, forceCloneIndices, mergeMaterialIds = false, enableCompletion = false) {\n var _a, _b, _c, _d;\n this._validate();\n let others = vertexDatas.map((vertexData) => vertexData.vertexData);\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let root = this;\n for (const other of others) {\n if (!other) {\n continue;\n }\n other._validate();\n if (!enableCompletion) {\n if (!this.normals !== !other.normals ||\n !this.tangents !== !other.tangents ||\n !this.uvs !== !other.uvs ||\n !this.uvs2 !== !other.uvs2 ||\n !this.uvs3 !== !other.uvs3 ||\n !this.uvs4 !== !other.uvs4 ||\n !this.uvs5 !== !other.uvs5 ||\n !this.uvs6 !== !other.uvs6 ||\n !this.colors !== !other.colors ||\n !this.matricesIndices !== !other.matricesIndices ||\n !this.matricesWeights !== !other.matricesWeights ||\n !this.matricesIndicesExtra !== !other.matricesIndicesExtra ||\n !this.matricesWeightsExtra !== !other.matricesWeightsExtra) {\n throw new Error(\"Cannot merge vertex data that do not have the same set of attributes\");\n }\n }\n else {\n if (!this.normals !== !other.normals) {\n if (!this.normals) {\n this.normals = new Float32Array(this.positions.length);\n }\n else {\n other.normals = new Float32Array(other.positions.length);\n }\n }\n if (!this.tangents !== !other.tangents) {\n if (!this.tangents) {\n this.tangents = new Float32Array((this.positions.length / 3) * 4);\n }\n else {\n other.tangents = new Float32Array((other.positions.length / 3) * 4);\n }\n }\n if (!this.uvs !== !other.uvs) {\n if (!this.uvs) {\n this.uvs = new Float32Array((this.positions.length / 3) * 2);\n }\n else {\n other.uvs = new Float32Array((other.positions.length / 3) * 2);\n }\n }\n if (!this.uvs2 !== !other.uvs2) {\n if (!this.uvs2) {\n this.uvs2 = new Float32Array((this.positions.length / 3) * 2);\n }\n else {\n other.uvs2 = new Float32Array((other.positions.length / 3) * 2);\n }\n }\n if (!this.uvs3 !== !other.uvs3) {\n if (!this.uvs3) {\n this.uvs3 = new Float32Array((this.positions.length / 3) * 2);\n }\n else {\n other.uvs3 = new Float32Array((other.positions.length / 3) * 2);\n }\n }\n if (!this.uvs4 !== !other.uvs4) {\n if (!this.uvs4) {\n this.uvs4 = new Float32Array((this.positions.length / 3) * 2);\n }\n else {\n other.uvs4 = new Float32Array((other.positions.length / 3) * 2);\n }\n }\n if (!this.uvs5 !== !other.uvs5) {\n if (!this.uvs5) {\n this.uvs5 = new Float32Array((this.positions.length / 3) * 2);\n }\n else {\n other.uvs5 = new Float32Array((other.positions.length / 3) * 2);\n }\n }\n if (!this.uvs6 !== !other.uvs6) {\n if (!this.uvs6) {\n this.uvs6 = new Float32Array((this.positions.length / 3) * 2);\n }\n else {\n other.uvs6 = new Float32Array((other.positions.length / 3) * 2);\n }\n }\n if (!this.colors !== !other.colors) {\n if (!this.colors) {\n this.colors = new Float32Array((this.positions.length / 3) * 4);\n this.colors.fill(1); // Set to white by default\n }\n else {\n other.colors = new Float32Array((other.positions.length / 3) * 4);\n other.colors.fill(1); // Set to white by default\n }\n }\n if (!this.matricesIndices !== !other.matricesIndices) {\n if (!this.matricesIndices) {\n this.matricesIndices = new Float32Array((this.positions.length / 3) * 4);\n }\n else {\n other.matricesIndices = new Float32Array((other.positions.length / 3) * 4);\n }\n }\n if (!this.matricesWeights !== !other.matricesWeights) {\n if (!this.matricesWeights) {\n this.matricesWeights = new Float32Array((this.positions.length / 3) * 4);\n }\n else {\n other.matricesWeights = new Float32Array((other.positions.length / 3) * 4);\n }\n }\n if (!this.matricesIndicesExtra !== !other.matricesIndicesExtra) {\n if (!this.matricesIndicesExtra) {\n this.matricesIndicesExtra = new Float32Array((this.positions.length / 3) * 4);\n }\n else {\n other.matricesIndicesExtra = new Float32Array((other.positions.length / 3) * 4);\n }\n }\n if (!this.matricesWeightsExtra !== !other.matricesWeightsExtra) {\n if (!this.matricesWeightsExtra) {\n this.matricesWeightsExtra = new Float32Array((this.positions.length / 3) * 4);\n }\n else {\n other.matricesWeightsExtra = new Float32Array((other.positions.length / 3) * 4);\n }\n }\n }\n }\n if (mergeMaterialIds) {\n // Merge material infos\n let materialIndex = 0;\n let indexOffset = 0;\n let vertexOffset = 0;\n const materialInfos = [];\n let currentMaterialInfo = null;\n const vertexDataList = [];\n // We need to split vertexData with more than one materialInfo\n for (const split of this.splitBasedOnMaterialID()) {\n vertexDataList.push({ vertexData: split, transform: transform });\n }\n for (const data of vertexDatas) {\n if (!data.vertexData) {\n continue;\n }\n for (const split of data.vertexData.splitBasedOnMaterialID()) {\n vertexDataList.push({ vertexData: split, transform: data.transform });\n }\n }\n // Sort by material IDs\n vertexDataList.sort((a, b) => {\n const matInfoA = a.vertexData.materialInfos ? a.vertexData.materialInfos[0].materialIndex : 0;\n const matInfoB = b.vertexData.materialInfos ? b.vertexData.materialInfos[0].materialIndex : 0;\n if (matInfoA > matInfoB) {\n return 1;\n }\n if (matInfoA === matInfoB) {\n return 0;\n }\n return -1;\n });\n // Build the new material info\n for (const vertexDataSource of vertexDataList) {\n const vertexData = vertexDataSource.vertexData;\n if (vertexData.materialInfos) {\n materialIndex = vertexData.materialInfos[0].materialIndex;\n }\n else {\n materialIndex = 0;\n }\n if (currentMaterialInfo && currentMaterialInfo.materialIndex === materialIndex) {\n currentMaterialInfo.indexCount += vertexData.indices.length;\n currentMaterialInfo.verticesCount += vertexData.positions.length / 3;\n }\n else {\n const materialInfo = new VertexDataMaterialInfo();\n materialInfo.materialIndex = materialIndex;\n materialInfo.indexStart = indexOffset;\n materialInfo.indexCount = vertexData.indices.length;\n materialInfo.verticesStart = vertexOffset;\n materialInfo.verticesCount = vertexData.positions.length / 3;\n materialInfos.push(materialInfo);\n currentMaterialInfo = materialInfo;\n }\n indexOffset += vertexData.indices.length;\n vertexOffset += vertexData.positions.length / 3;\n }\n // Extract sorted values\n const first = vertexDataList.splice(0, 1)[0];\n root = first.vertexData;\n transform = first.transform;\n others = vertexDataList.map((v) => v.vertexData);\n vertexDatas = vertexDataList;\n this.materialInfos = materialInfos;\n }\n // Merge geometries\n const totalIndices = others.reduce((indexSum, vertexData) => { var _a, _b; return indexSum + ((_b = (_a = vertexData.indices) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0); }, (_b = (_a = root.indices) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);\n const sliceIndices = forceCloneIndices || others.some((vertexData) => vertexData.indices === root.indices);\n let indices = sliceIndices ? (_c = root.indices) === null || _c === void 0 ? void 0 : _c.slice() : root.indices;\n if (totalIndices > 0) {\n let indicesOffset = (_d = indices === null || indices === void 0 ? void 0 : indices.length) !== null && _d !== void 0 ? _d : 0;\n if (!indices) {\n indices = new Array(totalIndices);\n }\n if (indices.length !== totalIndices) {\n if (Array.isArray(indices)) {\n indices.length = totalIndices;\n }\n else {\n const temp = use32BitsIndices || indices instanceof Uint32Array ? new Uint32Array(totalIndices) : new Uint16Array(totalIndices);\n temp.set(indices);\n indices = temp;\n }\n if (transform && transform.determinant() < 0) {\n VertexData._FlipFaces(indices, 0, indicesOffset);\n }\n }\n let positionsOffset = root.positions ? root.positions.length / 3 : 0;\n for (const { vertexData: other, transform } of vertexDatas) {\n if (other.indices) {\n for (let index = 0; index < other.indices.length; index++) {\n indices[indicesOffset + index] = other.indices[index] + positionsOffset;\n }\n if (transform && transform.determinant() < 0) {\n VertexData._FlipFaces(indices, indicesOffset, other.indices.length);\n }\n // The call to _validate already checked for positions\n positionsOffset += other.positions.length / 3;\n indicesOffset += other.indices.length;\n if (isAsync) {\n yield;\n }\n }\n }\n }\n this.indices = indices;\n this.positions = VertexData._MergeElement(VertexBuffer.PositionKind, root.positions, transform, vertexDatas.map((other) => [other.vertexData.positions, other.transform]));\n if (isAsync) {\n yield;\n }\n if (root.normals) {\n this.normals = VertexData._MergeElement(VertexBuffer.NormalKind, root.normals, transform, vertexDatas.map((other) => [other.vertexData.normals, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.tangents) {\n this.tangents = VertexData._MergeElement(VertexBuffer.TangentKind, root.tangents, transform, vertexDatas.map((other) => [other.vertexData.tangents, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.uvs) {\n this.uvs = VertexData._MergeElement(VertexBuffer.UVKind, root.uvs, transform, vertexDatas.map((other) => [other.vertexData.uvs, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.uvs2) {\n this.uvs2 = VertexData._MergeElement(VertexBuffer.UV2Kind, root.uvs2, transform, vertexDatas.map((other) => [other.vertexData.uvs2, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.uvs3) {\n this.uvs3 = VertexData._MergeElement(VertexBuffer.UV3Kind, root.uvs3, transform, vertexDatas.map((other) => [other.vertexData.uvs3, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.uvs4) {\n this.uvs4 = VertexData._MergeElement(VertexBuffer.UV4Kind, root.uvs4, transform, vertexDatas.map((other) => [other.vertexData.uvs4, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.uvs5) {\n this.uvs5 = VertexData._MergeElement(VertexBuffer.UV5Kind, root.uvs5, transform, vertexDatas.map((other) => [other.vertexData.uvs5, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.uvs6) {\n this.uvs6 = VertexData._MergeElement(VertexBuffer.UV6Kind, root.uvs6, transform, vertexDatas.map((other) => [other.vertexData.uvs6, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.colors) {\n this.colors = VertexData._MergeElement(VertexBuffer.ColorKind, root.colors, transform, vertexDatas.map((other) => [other.vertexData.colors, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.matricesIndices) {\n this.matricesIndices = VertexData._MergeElement(VertexBuffer.MatricesIndicesKind, root.matricesIndices, transform, vertexDatas.map((other) => [other.vertexData.matricesIndices, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.matricesWeights) {\n this.matricesWeights = VertexData._MergeElement(VertexBuffer.MatricesWeightsKind, root.matricesWeights, transform, vertexDatas.map((other) => [other.vertexData.matricesWeights, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.matricesIndicesExtra) {\n this.matricesIndicesExtra = VertexData._MergeElement(VertexBuffer.MatricesIndicesExtraKind, root.matricesIndicesExtra, transform, vertexDatas.map((other) => [other.vertexData.matricesIndicesExtra, other.transform]));\n if (isAsync) {\n yield;\n }\n }\n if (root.matricesWeightsExtra) {\n this.matricesWeightsExtra = VertexData._MergeElement(VertexBuffer.MatricesWeightsExtraKind, root.matricesWeightsExtra, transform, vertexDatas.map((other) => [other.vertexData.matricesWeightsExtra, other.transform]));\n }\n return this;\n }\n static _MergeElement(kind, source, transform, others) {\n const nonNullOthers = others.filter((other) => other[0] !== null && other[0] !== undefined);\n // If there is no source to copy and no other non-null sources then skip this element.\n if (!source && nonNullOthers.length == 0) {\n return source;\n }\n if (!source) {\n return this._MergeElement(kind, nonNullOthers[0][0], nonNullOthers[0][1], nonNullOthers.slice(1));\n }\n const len = nonNullOthers.reduce((sumLen, elements) => sumLen + elements[0].length, source.length);\n const transformRange = kind === VertexBuffer.PositionKind\n ? VertexData._TransformVector3Coordinates\n : kind === VertexBuffer.NormalKind\n ? VertexData._TransformVector3Normals\n : kind === VertexBuffer.TangentKind\n ? VertexData._TransformVector4Normals\n : () => { };\n if (source instanceof Float32Array) {\n // use non-loop method when the source is Float32Array\n const ret32 = new Float32Array(len);\n ret32.set(source);\n transform && transformRange(ret32, transform, 0, source.length);\n let offset = source.length;\n for (const [vertexData, transform] of nonNullOthers) {\n ret32.set(vertexData, offset);\n transform && transformRange(ret32, transform, offset, vertexData.length);\n offset += vertexData.length;\n }\n return ret32;\n }\n else {\n // don't use concat as it is super slow, just loop for other cases\n const ret = new Array(len);\n for (let i = 0; i < source.length; i++) {\n ret[i] = source[i];\n }\n transform && transformRange(ret, transform, 0, source.length);\n let offset = source.length;\n for (const [vertexData, transform] of nonNullOthers) {\n for (let i = 0; i < vertexData.length; i++) {\n ret[offset + i] = vertexData[i];\n }\n transform && transformRange(ret, transform, offset, vertexData.length);\n offset += vertexData.length;\n }\n return ret;\n }\n }\n _validate() {\n if (!this.positions) {\n throw new RuntimeError(\"Positions are required\", ErrorCodes.MeshInvalidPositionsError);\n }\n const getElementCount = (kind, values) => {\n const stride = VertexBuffer.DeduceStride(kind);\n if (values.length % stride !== 0) {\n throw new Error(\"The \" + kind + \"s array count must be a multiple of \" + stride);\n }\n return values.length / stride;\n };\n const positionsElementCount = getElementCount(VertexBuffer.PositionKind, this.positions);\n const validateElementCount = (kind, values) => {\n const elementCount = getElementCount(kind, values);\n if (elementCount !== positionsElementCount) {\n throw new Error(\"The \" + kind + \"s element count (\" + elementCount + \") does not match the positions count (\" + positionsElementCount + \")\");\n }\n };\n if (this.normals) {\n validateElementCount(VertexBuffer.NormalKind, this.normals);\n }\n if (this.tangents) {\n validateElementCount(VertexBuffer.TangentKind, this.tangents);\n }\n if (this.uvs) {\n validateElementCount(VertexBuffer.UVKind, this.uvs);\n }\n if (this.uvs2) {\n validateElementCount(VertexBuffer.UV2Kind, this.uvs2);\n }\n if (this.uvs3) {\n validateElementCount(VertexBuffer.UV3Kind, this.uvs3);\n }\n if (this.uvs4) {\n validateElementCount(VertexBuffer.UV4Kind, this.uvs4);\n }\n if (this.uvs5) {\n validateElementCount(VertexBuffer.UV5Kind, this.uvs5);\n }\n if (this.uvs6) {\n validateElementCount(VertexBuffer.UV6Kind, this.uvs6);\n }\n if (this.colors) {\n validateElementCount(VertexBuffer.ColorKind, this.colors);\n }\n if (this.matricesIndices) {\n validateElementCount(VertexBuffer.MatricesIndicesKind, this.matricesIndices);\n }\n if (this.matricesWeights) {\n validateElementCount(VertexBuffer.MatricesWeightsKind, this.matricesWeights);\n }\n if (this.matricesIndicesExtra) {\n validateElementCount(VertexBuffer.MatricesIndicesExtraKind, this.matricesIndicesExtra);\n }\n if (this.matricesWeightsExtra) {\n validateElementCount(VertexBuffer.MatricesWeightsExtraKind, this.matricesWeightsExtra);\n }\n }\n /**\n * Clone the current vertex data\n * @returns a copy of the current data\n */\n clone() {\n const serializationObject = this.serialize();\n return VertexData.Parse(serializationObject);\n }\n /**\n * Serializes the VertexData\n * @returns a serialized object\n */\n serialize() {\n const serializationObject = {};\n if (this.positions) {\n serializationObject.positions = Array.from(this.positions);\n }\n if (this.normals) {\n serializationObject.normals = Array.from(this.normals);\n }\n if (this.tangents) {\n serializationObject.tangents = Array.from(this.tangents);\n }\n if (this.uvs) {\n serializationObject.uvs = Array.from(this.uvs);\n }\n if (this.uvs2) {\n serializationObject.uvs2 = Array.from(this.uvs2);\n }\n if (this.uvs3) {\n serializationObject.uvs3 = Array.from(this.uvs3);\n }\n if (this.uvs4) {\n serializationObject.uvs4 = Array.from(this.uvs4);\n }\n if (this.uvs5) {\n serializationObject.uvs5 = Array.from(this.uvs5);\n }\n if (this.uvs6) {\n serializationObject.uvs6 = Array.from(this.uvs6);\n }\n if (this.colors) {\n serializationObject.colors = Array.from(this.colors);\n }\n if (this.matricesIndices) {\n serializationObject.matricesIndices = Array.from(this.matricesIndices);\n serializationObject.matricesIndices._isExpanded = true;\n }\n if (this.matricesWeights) {\n serializationObject.matricesWeights = Array.from(this.matricesWeights);\n }\n if (this.matricesIndicesExtra) {\n serializationObject.matricesIndicesExtra = Array.from(this.matricesIndicesExtra);\n serializationObject.matricesIndicesExtra._isExpanded = true;\n }\n if (this.matricesWeightsExtra) {\n serializationObject.matricesWeightsExtra = Array.from(this.matricesWeightsExtra);\n }\n serializationObject.indices = Array.from(this.indices);\n if (this.materialInfos) {\n serializationObject.materialInfos = [];\n for (const materialInfo of this.materialInfos) {\n const materialInfoSerializationObject = {\n indexStart: materialInfo.indexStart,\n indexCount: materialInfo.indexCount,\n materialIndex: materialInfo.materialIndex,\n verticesStart: materialInfo.verticesStart,\n verticesCount: materialInfo.verticesCount,\n };\n serializationObject.materialInfos.push(materialInfoSerializationObject);\n }\n }\n return serializationObject;\n }\n // Statics\n /**\n * Extracts the vertexData from a mesh\n * @param mesh the mesh from which to extract the VertexData\n * @param copyWhenShared defines if the VertexData must be cloned when shared between multiple meshes, optional, default false\n * @param forceCopy indicating that the VertexData must be cloned, optional, default false\n * @returns the object VertexData associated to the passed mesh\n */\n static ExtractFromMesh(mesh, copyWhenShared, forceCopy) {\n return VertexData._ExtractFrom(mesh, copyWhenShared, forceCopy);\n }\n /**\n * Extracts the vertexData from the geometry\n * @param geometry the geometry from which to extract the VertexData\n * @param copyWhenShared defines if the VertexData must be cloned when the geometry is shared between multiple meshes, optional, default false\n * @param forceCopy indicating that the VertexData must be cloned, optional, default false\n * @returns the object VertexData associated to the passed mesh\n */\n static ExtractFromGeometry(geometry, copyWhenShared, forceCopy) {\n return VertexData._ExtractFrom(geometry, copyWhenShared, forceCopy);\n }\n static _ExtractFrom(meshOrGeometry, copyWhenShared, forceCopy) {\n const result = new VertexData();\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.PositionKind)) {\n result.positions = meshOrGeometry.getVerticesData(VertexBuffer.PositionKind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.NormalKind)) {\n result.normals = meshOrGeometry.getVerticesData(VertexBuffer.NormalKind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.TangentKind)) {\n result.tangents = meshOrGeometry.getVerticesData(VertexBuffer.TangentKind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UVKind)) {\n result.uvs = meshOrGeometry.getVerticesData(VertexBuffer.UVKind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV2Kind)) {\n result.uvs2 = meshOrGeometry.getVerticesData(VertexBuffer.UV2Kind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV3Kind)) {\n result.uvs3 = meshOrGeometry.getVerticesData(VertexBuffer.UV3Kind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV4Kind)) {\n result.uvs4 = meshOrGeometry.getVerticesData(VertexBuffer.UV4Kind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV5Kind)) {\n result.uvs5 = meshOrGeometry.getVerticesData(VertexBuffer.UV5Kind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV6Kind)) {\n result.uvs6 = meshOrGeometry.getVerticesData(VertexBuffer.UV6Kind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.ColorKind)) {\n result.colors = meshOrGeometry.getVerticesData(VertexBuffer.ColorKind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind)) {\n result.matricesIndices = meshOrGeometry.getVerticesData(VertexBuffer.MatricesIndicesKind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) {\n result.matricesWeights = meshOrGeometry.getVerticesData(VertexBuffer.MatricesWeightsKind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesIndicesExtraKind)) {\n result.matricesIndicesExtra = meshOrGeometry.getVerticesData(VertexBuffer.MatricesIndicesExtraKind, copyWhenShared, forceCopy);\n }\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesWeightsExtraKind)) {\n result.matricesWeightsExtra = meshOrGeometry.getVerticesData(VertexBuffer.MatricesWeightsExtraKind, copyWhenShared, forceCopy);\n }\n result.indices = meshOrGeometry.getIndices(copyWhenShared, forceCopy);\n return result;\n }\n /**\n * Creates the VertexData for a Ribbon\n * @param options an object used to set the following optional parameters for the ribbon, required but can be empty\n * * pathArray array of paths, each of which an array of successive Vector3\n * * closeArray creates a seam between the first and the last paths of the pathArray, optional, default false\n * * closePath creates a seam between the first and the last points of each path of the path array, optional, default false\n * * offset a positive integer, only used when pathArray contains a single path (offset = 10 means the point 1 is joined to the point 11), default rounded half size of the pathArray length\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * * invertUV swaps in the U and V coordinates when applying a texture, optional, default false\n * * uvs a linear array, of length 2 * number of vertices, of custom UV values, optional\n * * colors a linear array, of length 4 * number of vertices, of custom color values, optional\n * @param options.pathArray\n * @param options.closeArray\n * @param options.closePath\n * @param options.offset\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.invertUV\n * @param options.uvs\n * @param options.colors\n * @returns the VertexData of the ribbon\n * @deprecated use CreateRibbonVertexData instead\n */\n static CreateRibbon(options) {\n throw _WarnImport(\"ribbonBuilder\");\n }\n /**\n * Creates the VertexData for a box\n * @param options an object used to set the following optional parameters for the box, required but can be empty\n * * size sets the width, height and depth of the box to the value of size, optional default 1\n * * width sets the width (x direction) of the box, overwrites the width set by size, optional, default size\n * * height sets the height (y direction) of the box, overwrites the height set by size, optional, default size\n * * depth sets the depth (z direction) of the box, overwrites the depth set by size, optional, default size\n * * faceUV an array of 6 Vector4 elements used to set different images to each box side\n * * faceColors an array of 6 Color3 elements used to set different colors to each box side\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.size\n * @param options.width\n * @param options.height\n * @param options.depth\n * @param options.faceUV\n * @param options.faceColors\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the box\n * @deprecated Please use CreateBoxVertexData from the BoxBuilder file instead\n */\n static CreateBox(options) {\n throw _WarnImport(\"boxBuilder\");\n }\n /**\n * Creates the VertexData for a tiled box\n * @param options an object used to set the following optional parameters for the box, required but can be empty\n * * faceTiles sets the pattern, tile size and number of tiles for a face\n * * faceUV an array of 6 Vector4 elements used to set different images to each box side\n * * faceColors an array of 6 Color3 elements used to set different colors to each box side\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * @param options.pattern\n * @param options.width\n * @param options.height\n * @param options.depth\n * @param options.tileSize\n * @param options.tileWidth\n * @param options.tileHeight\n * @param options.alignHorizontal\n * @param options.alignVertical\n * @param options.faceUV\n * @param options.faceColors\n * @param options.sideOrientation\n * @returns the VertexData of the box\n * @deprecated Please use CreateTiledBoxVertexData instead\n */\n static CreateTiledBox(options) {\n throw _WarnImport(\"tiledBoxBuilder\");\n }\n /**\n * Creates the VertexData for a tiled plane\n * @param options an object used to set the following optional parameters for the box, required but can be empty\n * * pattern a limited pattern arrangement depending on the number\n * * tileSize sets the width, height and depth of the tile to the value of size, optional default 1\n * * tileWidth sets the width (x direction) of the tile, overwrites the width set by size, optional, default size\n * * tileHeight sets the height (y direction) of the tile, overwrites the height set by size, optional, default size\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.pattern\n * @param options.tileSize\n * @param options.tileWidth\n * @param options.tileHeight\n * @param options.size\n * @param options.width\n * @param options.height\n * @param options.alignHorizontal\n * @param options.alignVertical\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the tiled plane\n * @deprecated use CreateTiledPlaneVertexData instead\n */\n static CreateTiledPlane(options) {\n throw _WarnImport(\"tiledPlaneBuilder\");\n }\n /**\n * Creates the VertexData for an ellipsoid, defaults to a sphere\n * @param options an object used to set the following optional parameters for the box, required but can be empty\n * * segments sets the number of horizontal strips optional, default 32\n * * diameter sets the axes dimensions, diameterX, diameterY and diameterZ to the value of diameter, optional default 1\n * * diameterX sets the diameterX (x direction) of the ellipsoid, overwrites the diameterX set by diameter, optional, default diameter\n * * diameterY sets the diameterY (y direction) of the ellipsoid, overwrites the diameterY set by diameter, optional, default diameter\n * * diameterZ sets the diameterZ (z direction) of the ellipsoid, overwrites the diameterZ set by diameter, optional, default diameter\n * * arc a number from 0 to 1, to create an unclosed ellipsoid based on the fraction of the circumference (latitude) given by the arc value, optional, default 1\n * * slice a number from 0 to 1, to create an unclosed ellipsoid based on the fraction of the height (latitude) given by the arc value, optional, default 1\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.segments\n * @param options.diameter\n * @param options.diameterX\n * @param options.diameterY\n * @param options.diameterZ\n * @param options.arc\n * @param options.slice\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the ellipsoid\n * @deprecated use CreateSphereVertexData instead\n */\n static CreateSphere(options) {\n throw _WarnImport(\"sphereBuilder\");\n }\n /**\n * Creates the VertexData for a cylinder, cone or prism\n * @param options an object used to set the following optional parameters for the box, required but can be empty\n * * height sets the height (y direction) of the cylinder, optional, default 2\n * * diameterTop sets the diameter of the top of the cone, overwrites diameter, optional, default diameter\n * * diameterBottom sets the diameter of the bottom of the cone, overwrites diameter, optional, default diameter\n * * diameter sets the diameter of the top and bottom of the cone, optional default 1\n * * tessellation the number of prism sides, 3 for a triangular prism, optional, default 24\n * * subdivisions` the number of rings along the cylinder height, optional, default 1\n * * arc a number from 0 to 1, to create an unclosed cylinder based on the fraction of the circumference given by the arc value, optional, default 1\n * * faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\n * * faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\n * * hasRings when true makes each subdivision independently treated as a face for faceUV and faceColors, optional, default false\n * * enclose when true closes an open cylinder by adding extra flat faces between the height axis and vertical edges, think cut cake\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.height\n * @param options.diameterTop\n * @param options.diameterBottom\n * @param options.diameter\n * @param options.tessellation\n * @param options.subdivisions\n * @param options.arc\n * @param options.faceColors\n * @param options.faceUV\n * @param options.hasRings\n * @param options.enclose\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the cylinder, cone or prism\n * @deprecated please use CreateCylinderVertexData instead\n */\n static CreateCylinder(options) {\n throw _WarnImport(\"cylinderBuilder\");\n }\n /**\n * Creates the VertexData for a torus\n * @param options an object used to set the following optional parameters for the box, required but can be empty\n * * diameter the diameter of the torus, optional default 1\n * * thickness the diameter of the tube forming the torus, optional default 0.5\n * * tessellation the number of prism sides, 3 for a triangular prism, optional, default 24\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.diameter\n * @param options.thickness\n * @param options.tessellation\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the torus\n * @deprecated use CreateTorusVertexData instead\n */\n static CreateTorus(options) {\n throw _WarnImport(\"torusBuilder\");\n }\n /**\n * Creates the VertexData of the LineSystem\n * @param options an object used to set the following optional parameters for the LineSystem, required but can be empty\n * - lines an array of lines, each line being an array of successive Vector3\n * - colors an array of line colors, each of the line colors being an array of successive Color4, one per line point\n * @param options.lines\n * @param options.colors\n * @returns the VertexData of the LineSystem\n * @deprecated use CreateLineSystemVertexData instead\n */\n static CreateLineSystem(options) {\n throw _WarnImport(\"linesBuilder\");\n }\n /**\n * Create the VertexData for a DashedLines\n * @param options an object used to set the following optional parameters for the DashedLines, required but can be empty\n * - points an array successive Vector3\n * - dashSize the size of the dashes relative to the dash number, optional, default 3\n * - gapSize the size of the gap between two successive dashes relative to the dash number, optional, default 1\n * - dashNb the intended total number of dashes, optional, default 200\n * @param options.points\n * @param options.dashSize\n * @param options.gapSize\n * @param options.dashNb\n * @returns the VertexData for the DashedLines\n * @deprecated use CreateDashedLinesVertexData instead\n */\n static CreateDashedLines(options) {\n throw _WarnImport(\"linesBuilder\");\n }\n /**\n * Creates the VertexData for a Ground\n * @param options an object used to set the following optional parameters for the Ground, required but can be empty\n * - width the width (x direction) of the ground, optional, default 1\n * - height the height (z direction) of the ground, optional, default 1\n * - subdivisions the number of subdivisions per side, optional, default 1\n * @param options.width\n * @param options.height\n * @param options.subdivisions\n * @param options.subdivisionsX\n * @param options.subdivisionsY\n * @returns the VertexData of the Ground\n * @deprecated Please use CreateGroundVertexData instead\n */\n static CreateGround(options) {\n throw _WarnImport(\"groundBuilder\");\n }\n /**\n * Creates the VertexData for a TiledGround by subdividing the ground into tiles\n * @param options an object used to set the following optional parameters for the Ground, required but can be empty\n * * xmin the ground minimum X coordinate, optional, default -1\n * * zmin the ground minimum Z coordinate, optional, default -1\n * * xmax the ground maximum X coordinate, optional, default 1\n * * zmax the ground maximum Z coordinate, optional, default 1\n * * subdivisions a javascript object {w: positive integer, h: positive integer}, `w` and `h` are the numbers of subdivisions on the ground width and height creating 'tiles', default {w: 6, h: 6}\n * * precision a javascript object {w: positive integer, h: positive integer}, `w` and `h` are the numbers of subdivisions on the tile width and height, default {w: 2, h: 2}\n * @param options.xmin\n * @param options.zmin\n * @param options.xmax\n * @param options.zmax\n * @param options.subdivisions\n * @param options.subdivisions.w\n * @param options.subdivisions.h\n * @param options.precision\n * @param options.precision.w\n * @param options.precision.h\n * @returns the VertexData of the TiledGround\n * @deprecated use CreateTiledGroundVertexData instead\n */\n static CreateTiledGround(options) {\n throw _WarnImport(\"groundBuilder\");\n }\n /**\n * Creates the VertexData of the Ground designed from a heightmap\n * @param options an object used to set the following parameters for the Ground, required and provided by CreateGroundFromHeightMap\n * * width the width (x direction) of the ground\n * * height the height (z direction) of the ground\n * * subdivisions the number of subdivisions per side\n * * minHeight the minimum altitude on the ground, optional, default 0\n * * maxHeight the maximum altitude on the ground, optional default 1\n * * colorFilter the filter to apply to the image pixel colors to compute the height, optional Color3, default (0.3, 0.59, 0.11)\n * * buffer the array holding the image color data\n * * bufferWidth the width of image\n * * bufferHeight the height of image\n * * alphaFilter Remove any data where the alpha channel is below this value, defaults 0 (all data visible)\n * @param options.width\n * @param options.height\n * @param options.subdivisions\n * @param options.minHeight\n * @param options.maxHeight\n * @param options.colorFilter\n * @param options.buffer\n * @param options.bufferWidth\n * @param options.bufferHeight\n * @param options.alphaFilter\n * @returns the VertexData of the Ground designed from a heightmap\n * @deprecated use CreateGroundFromHeightMapVertexData instead\n */\n static CreateGroundFromHeightMap(options) {\n throw _WarnImport(\"groundBuilder\");\n }\n /**\n * Creates the VertexData for a Plane\n * @param options an object used to set the following optional parameters for the plane, required but can be empty\n * * size sets the width and height of the plane to the value of size, optional default 1\n * * width sets the width (x direction) of the plane, overwrites the width set by size, optional, default size\n * * height sets the height (y direction) of the plane, overwrites the height set by size, optional, default size\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.size\n * @param options.width\n * @param options.height\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the box\n * @deprecated use CreatePlaneVertexData instead\n */\n static CreatePlane(options) {\n throw _WarnImport(\"planeBuilder\");\n }\n /**\n * Creates the VertexData of the Disc or regular Polygon\n * @param options an object used to set the following optional parameters for the disc, required but can be empty\n * * radius the radius of the disc, optional default 0.5\n * * tessellation the number of polygon sides, optional, default 64\n * * arc a number from 0 to 1, to create an unclosed polygon based on the fraction of the circumference given by the arc value, optional, default 1\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.radius\n * @param options.tessellation\n * @param options.arc\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the box\n * @deprecated use CreateDiscVertexData instead\n */\n static CreateDisc(options) {\n throw _WarnImport(\"discBuilder\");\n }\n /**\n * Creates the VertexData for an irregular Polygon in the XoZ plane using a mesh built by polygonTriangulation.build()\n * All parameters are provided by CreatePolygon as needed\n * @param polygon a mesh built from polygonTriangulation.build()\n * @param sideOrientation takes the values Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * @param fUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\n * @param fColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\n * @param frontUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * @param backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param wrap a boolean, default false, when true and fUVs used texture is wrapped around all sides, when false texture is applied side\n * @returns the VertexData of the Polygon\n * @deprecated use CreatePolygonVertexData instead\n */\n static CreatePolygon(polygon, sideOrientation, fUV, fColors, frontUVs, backUVs, wrap) {\n throw _WarnImport(\"polygonBuilder\");\n }\n /**\n * Creates the VertexData of the IcoSphere\n * @param options an object used to set the following optional parameters for the IcoSphere, required but can be empty\n * * radius the radius of the IcoSphere, optional default 1\n * * radiusX allows stretching in the x direction, optional, default radius\n * * radiusY allows stretching in the y direction, optional, default radius\n * * radiusZ allows stretching in the z direction, optional, default radius\n * * flat when true creates a flat shaded mesh, optional, default true\n * * subdivisions increasing the subdivisions increases the number of faces, optional, default 4\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.radius\n * @param options.radiusX\n * @param options.radiusY\n * @param options.radiusZ\n * @param options.flat\n * @param options.subdivisions\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the IcoSphere\n * @deprecated use CreateIcoSphereVertexData instead\n */\n static CreateIcoSphere(options) {\n throw _WarnImport(\"icoSphereBuilder\");\n }\n // inspired from // http://stemkoski.github.io/Three.js/Polyhedra.html\n /**\n * Creates the VertexData for a Polyhedron\n * @param options an object used to set the following optional parameters for the polyhedron, required but can be empty\n * * type provided types are:\n * * 0 : Tetrahedron, 1 : Octahedron, 2 : Dodecahedron, 3 : Icosahedron, 4 : Rhombicuboctahedron, 5 : Triangular Prism, 6 : Pentagonal Prism, 7 : Hexagonal Prism, 8 : Square Pyramid (J1)\n * * 9 : Pentagonal Pyramid (J2), 10 : Triangular Dipyramid (J12), 11 : Pentagonal Dipyramid (J13), 12 : Elongated Square Dipyramid (J15), 13 : Elongated Pentagonal Dipyramid (J16), 14 : Elongated Pentagonal Cupola (J20)\n * * size the size of the IcoSphere, optional default 1\n * * sizeX allows stretching in the x direction, optional, default size\n * * sizeY allows stretching in the y direction, optional, default size\n * * sizeZ allows stretching in the z direction, optional, default size\n * * custom a number that overwrites the type to create from an extended set of polyhedron from https://www.babylonjs-playground.com/#21QRSK#15 with minimised editor\n * * faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\n * * faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\n * * flat when true creates a flat shaded mesh, optional, default true\n * * subdivisions increasing the subdivisions increases the number of faces, optional, default 4\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.type\n * @param options.size\n * @param options.sizeX\n * @param options.sizeY\n * @param options.sizeZ\n * @param options.custom\n * @param options.faceUV\n * @param options.faceColors\n * @param options.flat\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the Polyhedron\n * @deprecated use CreatePolyhedronVertexData instead\n */\n static CreatePolyhedron(options) {\n throw _WarnImport(\"polyhedronBuilder\");\n }\n /**\n * Creates the VertexData for a Capsule, inspired from https://github.com/maximeq/three-js-capsule-geometry/blob/master/src/CapsuleBufferGeometry.js\n * @param options an object used to set the following optional parameters for the capsule, required but can be empty\n * @returns the VertexData of the Capsule\n * @deprecated Please use CreateCapsuleVertexData from the capsuleBuilder file instead\n */\n static CreateCapsule(options = {\n orientation: Vector3.Up(),\n subdivisions: 2,\n tessellation: 16,\n height: 1,\n radius: 0.25,\n capSubdivisions: 6,\n }) {\n throw _WarnImport(\"capsuleBuilder\");\n }\n // based on http://code.google.com/p/away3d/source/browse/trunk/fp10/Away3D/src/away3d/primitives/TorusKnot.as?spec=svn2473&r=2473\n /**\n * Creates the VertexData for a TorusKnot\n * @param options an object used to set the following optional parameters for the TorusKnot, required but can be empty\n * * radius the radius of the torus knot, optional, default 2\n * * tube the thickness of the tube, optional, default 0.5\n * * radialSegments the number of sides on each tube segments, optional, default 32\n * * tubularSegments the number of tubes to decompose the knot into, optional, default 32\n * * p the number of windings around the z axis, optional, default 2\n * * q the number of windings around the x axis, optional, default 3\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.radius\n * @param options.tube\n * @param options.radialSegments\n * @param options.tubularSegments\n * @param options.p\n * @param options.q\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the Torus Knot\n * @deprecated use CreateTorusKnotVertexData instead\n */\n static CreateTorusKnot(options) {\n throw _WarnImport(\"torusKnotBuilder\");\n }\n // Tools\n /**\n * Compute normals for given positions and indices\n * @param positions an array of vertex positions, [...., x, y, z, ......]\n * @param indices an array of indices in groups of three for each triangular facet, [...., i, j, k, ......]\n * @param normals an array of vertex normals, [...., x, y, z, ......]\n * @param options an object used to set the following optional parameters for the TorusKnot, optional\n * * facetNormals : optional array of facet normals (vector3)\n * * facetPositions : optional array of facet positions (vector3)\n * * facetPartitioning : optional partitioning array. facetPositions is required for facetPartitioning computation\n * * ratio : optional partitioning ratio / bounding box, required for facetPartitioning computation\n * * bInfo : optional bounding info, required for facetPartitioning computation\n * * bbSize : optional bounding box size data, required for facetPartitioning computation\n * * subDiv : optional partitioning data about subdivisions on each axis (int), required for facetPartitioning computation\n * * useRightHandedSystem: optional boolean to for right handed system computation\n * * depthSort : optional boolean to enable the facet depth sort computation\n * * distanceTo : optional Vector3 to compute the facet depth from this location\n * * depthSortedFacets : optional array of depthSortedFacets to store the facet distances from the reference location\n * @param options.facetNormals\n * @param options.facetPositions\n * @param options.facetPartitioning\n * @param options.ratio\n * @param options.bInfo\n * @param options.bbSize\n * @param options.subDiv\n * @param options.useRightHandedSystem\n * @param options.depthSort\n * @param options.distanceTo\n * @param options.depthSortedFacets\n */\n static ComputeNormals(positions, indices, normals, options) {\n // temporary scalar variables\n let index = 0; // facet index\n let p1p2x = 0.0; // p1p2 vector x coordinate\n let p1p2y = 0.0; // p1p2 vector y coordinate\n let p1p2z = 0.0; // p1p2 vector z coordinate\n let p3p2x = 0.0; // p3p2 vector x coordinate\n let p3p2y = 0.0; // p3p2 vector y coordinate\n let p3p2z = 0.0; // p3p2 vector z coordinate\n let faceNormalx = 0.0; // facet normal x coordinate\n let faceNormaly = 0.0; // facet normal y coordinate\n let faceNormalz = 0.0; // facet normal z coordinate\n let length = 0.0; // facet normal length before normalization\n let v1x = 0; // vector1 x index in the positions array\n let v1y = 0; // vector1 y index in the positions array\n let v1z = 0; // vector1 z index in the positions array\n let v2x = 0; // vector2 x index in the positions array\n let v2y = 0; // vector2 y index in the positions array\n let v2z = 0; // vector2 z index in the positions array\n let v3x = 0; // vector3 x index in the positions array\n let v3y = 0; // vector3 y index in the positions array\n let v3z = 0; // vector3 z index in the positions array\n let computeFacetNormals = false;\n let computeFacetPositions = false;\n let computeFacetPartitioning = false;\n let computeDepthSort = false;\n let faceNormalSign = 1;\n let ratio = 0;\n let distanceTo = null;\n if (options) {\n computeFacetNormals = options.facetNormals ? true : false;\n computeFacetPositions = options.facetPositions ? true : false;\n computeFacetPartitioning = options.facetPartitioning ? true : false;\n faceNormalSign = options.useRightHandedSystem === true ? -1 : 1;\n ratio = options.ratio || 0;\n computeDepthSort = options.depthSort ? true : false;\n distanceTo = options.distanceTo;\n if (computeDepthSort) {\n if (distanceTo === undefined) {\n distanceTo = Vector3.Zero();\n }\n }\n }\n // facetPartitioning reinit if needed\n let xSubRatio = 0;\n let ySubRatio = 0;\n let zSubRatio = 0;\n let subSq = 0;\n if (computeFacetPartitioning && options && options.bbSize) {\n //let bbSizeMax = options.bbSize.x > options.bbSize.y ? options.bbSize.x : options.bbSize.y;\n //bbSizeMax = bbSizeMax > options.bbSize.z ? bbSizeMax : options.bbSize.z;\n xSubRatio = (options.subDiv.X * ratio) / options.bbSize.x;\n ySubRatio = (options.subDiv.Y * ratio) / options.bbSize.y;\n zSubRatio = (options.subDiv.Z * ratio) / options.bbSize.z;\n subSq = options.subDiv.max * options.subDiv.max;\n options.facetPartitioning.length = 0;\n }\n // reset the normals\n for (index = 0; index < positions.length; index++) {\n normals[index] = 0.0;\n }\n // Loop : 1 indice triplet = 1 facet\n const nbFaces = (indices.length / 3) | 0;\n for (index = 0; index < nbFaces; index++) {\n // get the indexes of the coordinates of each vertex of the facet\n v1x = indices[index * 3] * 3;\n v1y = v1x + 1;\n v1z = v1x + 2;\n v2x = indices[index * 3 + 1] * 3;\n v2y = v2x + 1;\n v2z = v2x + 2;\n v3x = indices[index * 3 + 2] * 3;\n v3y = v3x + 1;\n v3z = v3x + 2;\n p1p2x = positions[v1x] - positions[v2x]; // compute two vectors per facet : p1p2 and p3p2\n p1p2y = positions[v1y] - positions[v2y];\n p1p2z = positions[v1z] - positions[v2z];\n p3p2x = positions[v3x] - positions[v2x];\n p3p2y = positions[v3y] - positions[v2y];\n p3p2z = positions[v3z] - positions[v2z];\n // compute the face normal with the cross product\n faceNormalx = faceNormalSign * (p1p2y * p3p2z - p1p2z * p3p2y);\n faceNormaly = faceNormalSign * (p1p2z * p3p2x - p1p2x * p3p2z);\n faceNormalz = faceNormalSign * (p1p2x * p3p2y - p1p2y * p3p2x);\n // normalize this normal and store it in the array facetData\n length = Math.sqrt(faceNormalx * faceNormalx + faceNormaly * faceNormaly + faceNormalz * faceNormalz);\n length = length === 0 ? 1.0 : length;\n faceNormalx /= length;\n faceNormaly /= length;\n faceNormalz /= length;\n if (computeFacetNormals && options) {\n options.facetNormals[index].x = faceNormalx;\n options.facetNormals[index].y = faceNormaly;\n options.facetNormals[index].z = faceNormalz;\n }\n if (computeFacetPositions && options) {\n // compute and the facet barycenter coordinates in the array facetPositions\n options.facetPositions[index].x = (positions[v1x] + positions[v2x] + positions[v3x]) / 3.0;\n options.facetPositions[index].y = (positions[v1y] + positions[v2y] + positions[v3y]) / 3.0;\n options.facetPositions[index].z = (positions[v1z] + positions[v2z] + positions[v3z]) / 3.0;\n }\n if (computeFacetPartitioning && options) {\n // store the facet indexes in arrays in the main facetPartitioning array :\n // compute each facet vertex (+ facet barycenter) index in the partiniong array\n const ox = Math.floor((options.facetPositions[index].x - options.bInfo.minimum.x * ratio) * xSubRatio);\n const oy = Math.floor((options.facetPositions[index].y - options.bInfo.minimum.y * ratio) * ySubRatio);\n const oz = Math.floor((options.facetPositions[index].z - options.bInfo.minimum.z * ratio) * zSubRatio);\n const b1x = Math.floor((positions[v1x] - options.bInfo.minimum.x * ratio) * xSubRatio);\n const b1y = Math.floor((positions[v1y] - options.bInfo.minimum.y * ratio) * ySubRatio);\n const b1z = Math.floor((positions[v1z] - options.bInfo.minimum.z * ratio) * zSubRatio);\n const b2x = Math.floor((positions[v2x] - options.bInfo.minimum.x * ratio) * xSubRatio);\n const b2y = Math.floor((positions[v2y] - options.bInfo.minimum.y * ratio) * ySubRatio);\n const b2z = Math.floor((positions[v2z] - options.bInfo.minimum.z * ratio) * zSubRatio);\n const b3x = Math.floor((positions[v3x] - options.bInfo.minimum.x * ratio) * xSubRatio);\n const b3y = Math.floor((positions[v3y] - options.bInfo.minimum.y * ratio) * ySubRatio);\n const b3z = Math.floor((positions[v3z] - options.bInfo.minimum.z * ratio) * zSubRatio);\n const block_idx_v1 = b1x + options.subDiv.max * b1y + subSq * b1z;\n const block_idx_v2 = b2x + options.subDiv.max * b2y + subSq * b2z;\n const block_idx_v3 = b3x + options.subDiv.max * b3y + subSq * b3z;\n const block_idx_o = ox + options.subDiv.max * oy + subSq * oz;\n options.facetPartitioning[block_idx_o] = options.facetPartitioning[block_idx_o] ? options.facetPartitioning[block_idx_o] : new Array();\n options.facetPartitioning[block_idx_v1] = options.facetPartitioning[block_idx_v1] ? options.facetPartitioning[block_idx_v1] : new Array();\n options.facetPartitioning[block_idx_v2] = options.facetPartitioning[block_idx_v2] ? options.facetPartitioning[block_idx_v2] : new Array();\n options.facetPartitioning[block_idx_v3] = options.facetPartitioning[block_idx_v3] ? options.facetPartitioning[block_idx_v3] : new Array();\n // push each facet index in each block containing the vertex\n options.facetPartitioning[block_idx_v1].push(index);\n if (block_idx_v2 != block_idx_v1) {\n options.facetPartitioning[block_idx_v2].push(index);\n }\n if (!(block_idx_v3 == block_idx_v2 || block_idx_v3 == block_idx_v1)) {\n options.facetPartitioning[block_idx_v3].push(index);\n }\n if (!(block_idx_o == block_idx_v1 || block_idx_o == block_idx_v2 || block_idx_o == block_idx_v3)) {\n options.facetPartitioning[block_idx_o].push(index);\n }\n }\n if (computeDepthSort && options && options.facetPositions) {\n const dsf = options.depthSortedFacets[index];\n dsf.ind = index * 3;\n dsf.sqDistance = Vector3.DistanceSquared(options.facetPositions[index], distanceTo);\n }\n // compute the normals anyway\n normals[v1x] += faceNormalx; // accumulate all the normals per face\n normals[v1y] += faceNormaly;\n normals[v1z] += faceNormalz;\n normals[v2x] += faceNormalx;\n normals[v2y] += faceNormaly;\n normals[v2z] += faceNormalz;\n normals[v3x] += faceNormalx;\n normals[v3y] += faceNormaly;\n normals[v3z] += faceNormalz;\n }\n // last normalization of each normal\n for (index = 0; index < normals.length / 3; index++) {\n faceNormalx = normals[index * 3];\n faceNormaly = normals[index * 3 + 1];\n faceNormalz = normals[index * 3 + 2];\n length = Math.sqrt(faceNormalx * faceNormalx + faceNormaly * faceNormaly + faceNormalz * faceNormalz);\n length = length === 0 ? 1.0 : length;\n faceNormalx /= length;\n faceNormaly /= length;\n faceNormalz /= length;\n normals[index * 3] = faceNormalx;\n normals[index * 3 + 1] = faceNormaly;\n normals[index * 3 + 2] = faceNormalz;\n }\n }\n /**\n * @internal\n */\n static _ComputeSides(sideOrientation, positions, indices, normals, uvs, frontUVs, backUVs) {\n const li = indices.length;\n const ln = normals.length;\n let i;\n let n;\n sideOrientation = sideOrientation || VertexData.DEFAULTSIDE;\n switch (sideOrientation) {\n case VertexData.FRONTSIDE:\n // nothing changed\n break;\n case VertexData.BACKSIDE:\n // indices\n for (i = 0; i < li; i += 3) {\n const tmp = indices[i];\n indices[i] = indices[i + 2];\n indices[i + 2] = tmp;\n }\n // normals\n for (n = 0; n < ln; n++) {\n normals[n] = -normals[n];\n }\n break;\n case VertexData.DOUBLESIDE: {\n // positions\n const lp = positions.length;\n const l = lp / 3;\n for (let p = 0; p < lp; p++) {\n positions[lp + p] = positions[p];\n }\n // indices\n for (i = 0; i < li; i += 3) {\n indices[i + li] = indices[i + 2] + l;\n indices[i + 1 + li] = indices[i + 1] + l;\n indices[i + 2 + li] = indices[i] + l;\n }\n // normals\n for (n = 0; n < ln; n++) {\n normals[ln + n] = -normals[n];\n }\n // uvs\n const lu = uvs.length;\n let u = 0;\n for (u = 0; u < lu; u++) {\n uvs[u + lu] = uvs[u];\n }\n frontUVs = frontUVs ? frontUVs : new Vector4(0.0, 0.0, 1.0, 1.0);\n backUVs = backUVs ? backUVs : new Vector4(0.0, 0.0, 1.0, 1.0);\n u = 0;\n for (i = 0; i < lu / 2; i++) {\n uvs[u] = frontUVs.x + (frontUVs.z - frontUVs.x) * uvs[u];\n uvs[u + 1] = frontUVs.y + (frontUVs.w - frontUVs.y) * uvs[u + 1];\n uvs[u + lu] = backUVs.x + (backUVs.z - backUVs.x) * uvs[u + lu];\n uvs[u + lu + 1] = backUVs.y + (backUVs.w - backUVs.y) * uvs[u + lu + 1];\n u += 2;\n }\n break;\n }\n }\n }\n /**\n * Creates a VertexData from serialized data\n * @param parsedVertexData the parsed data from an imported file\n * @returns a VertexData\n */\n static Parse(parsedVertexData) {\n const vertexData = new VertexData();\n // positions\n const positions = parsedVertexData.positions;\n if (positions) {\n vertexData.set(positions, VertexBuffer.PositionKind);\n }\n // normals\n const normals = parsedVertexData.normals;\n if (normals) {\n vertexData.set(normals, VertexBuffer.NormalKind);\n }\n // tangents\n const tangents = parsedVertexData.tangents;\n if (tangents) {\n vertexData.set(tangents, VertexBuffer.TangentKind);\n }\n // uvs\n const uvs = parsedVertexData.uvs;\n if (uvs) {\n vertexData.set(uvs, VertexBuffer.UVKind);\n }\n // uv2s\n const uvs2 = parsedVertexData.uvs2;\n if (uvs2) {\n vertexData.set(uvs2, VertexBuffer.UV2Kind);\n }\n // uv3s\n const uvs3 = parsedVertexData.uvs3;\n if (uvs3) {\n vertexData.set(uvs3, VertexBuffer.UV3Kind);\n }\n // uv4s\n const uvs4 = parsedVertexData.uvs4;\n if (uvs4) {\n vertexData.set(uvs4, VertexBuffer.UV4Kind);\n }\n // uv5s\n const uvs5 = parsedVertexData.uvs5;\n if (uvs5) {\n vertexData.set(uvs5, VertexBuffer.UV5Kind);\n }\n // uv6s\n const uvs6 = parsedVertexData.uvs6;\n if (uvs6) {\n vertexData.set(uvs6, VertexBuffer.UV6Kind);\n }\n // colors\n const colors = parsedVertexData.colors;\n if (colors) {\n vertexData.set(Color4.CheckColors4(colors, positions.length / 3), VertexBuffer.ColorKind);\n }\n // matricesIndices\n const matricesIndices = parsedVertexData.matricesIndices;\n if (matricesIndices) {\n vertexData.set(matricesIndices, VertexBuffer.MatricesIndicesKind);\n }\n // matricesWeights\n const matricesWeights = parsedVertexData.matricesWeights;\n if (matricesWeights) {\n vertexData.set(matricesWeights, VertexBuffer.MatricesWeightsKind);\n }\n // indices\n const indices = parsedVertexData.indices;\n if (indices) {\n vertexData.indices = indices;\n }\n // MaterialInfos\n const materialInfos = parsedVertexData.materialInfos;\n if (materialInfos) {\n vertexData.materialInfos = [];\n for (const materialInfoFromJSON of materialInfos) {\n const materialInfo = new VertexDataMaterialInfo();\n materialInfo.indexCount = materialInfoFromJSON.indexCount;\n materialInfo.indexStart = materialInfoFromJSON.indexStart;\n materialInfo.verticesCount = materialInfoFromJSON.verticesCount;\n materialInfo.verticesStart = materialInfoFromJSON.verticesStart;\n materialInfo.materialIndex = materialInfoFromJSON.materialIndex;\n vertexData.materialInfos.push(materialInfo);\n }\n }\n return vertexData;\n }\n /**\n * Applies VertexData created from the imported parameters to the geometry\n * @param parsedVertexData the parsed data from an imported file\n * @param geometry the geometry to apply the VertexData to\n */\n static ImportVertexData(parsedVertexData, geometry) {\n const vertexData = VertexData.Parse(parsedVertexData);\n geometry.setAllVerticesData(vertexData, parsedVertexData.updatable);\n }\n}\n/**\n * Mesh side orientation : usually the external or front surface\n */\nVertexData.FRONTSIDE = 0;\n/**\n * Mesh side orientation : usually the internal or back surface\n */\nVertexData.BACKSIDE = 1;\n/**\n * Mesh side orientation : both internal and external or front and back surfaces\n */\nVertexData.DOUBLESIDE = 2;\n/**\n * Mesh side orientation : by default, `FRONTSIDE`\n */\nVertexData.DEFAULTSIDE = 0;\nVertexData._UniqueIDGenerator = 0;\n__decorate([\n nativeOverride.filter((...[coordinates]) => !Array.isArray(coordinates))\n], VertexData, \"_TransformVector3Coordinates\", null);\n__decorate([\n nativeOverride.filter((...[normals]) => !Array.isArray(normals))\n], VertexData, \"_TransformVector3Normals\", null);\n__decorate([\n nativeOverride.filter((...[normals]) => !Array.isArray(normals))\n], VertexData, \"_TransformVector4Normals\", null);\n__decorate([\n nativeOverride.filter((...[indices]) => !Array.isArray(indices))\n], VertexData, \"_FlipFaces\", null);\n//# sourceMappingURL=mesh.vertexData.js.map","import { Vector3 } from \"./math.vector.js\";\n/** Defines supported spaces */\nexport var Space;\n(function (Space) {\n /** Local (object) space */\n Space[Space[\"LOCAL\"] = 0] = \"LOCAL\";\n /** World space */\n Space[Space[\"WORLD\"] = 1] = \"WORLD\";\n /** Bone space */\n Space[Space[\"BONE\"] = 2] = \"BONE\";\n})(Space || (Space = {}));\n/** Defines the 3 main axes */\nexport class Axis {\n}\n/** X axis */\nAxis.X = new Vector3(1.0, 0.0, 0.0);\n/** Y axis */\nAxis.Y = new Vector3(0.0, 1.0, 0.0);\n/** Z axis */\nAxis.Z = new Vector3(0.0, 0.0, 1.0);\n/**\n * Defines cartesian components.\n */\nexport var Coordinate;\n(function (Coordinate) {\n /** X axis */\n Coordinate[Coordinate[\"X\"] = 0] = \"X\";\n /** Y axis */\n Coordinate[Coordinate[\"Y\"] = 1] = \"Y\";\n /** Z axis */\n Coordinate[Coordinate[\"Z\"] = 2] = \"Z\";\n})(Coordinate || (Coordinate = {}));\n//# sourceMappingURL=math.axis.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serialize, serializeAsVector3, serializeAsQuaternion, SerializationHelper } from \"../Misc/decorators.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { Quaternion, Matrix, Vector3, TmpVectors } from \"../Maths/math.vector.js\";\nimport { Node } from \"../node.js\";\nimport { Space } from \"../Maths/math.axis.js\";\nconst convertRHSToLHS = Matrix.Compose(Vector3.One(), Quaternion.FromEulerAngles(0, Math.PI, 0), Vector3.Zero());\n/**\n * A TransformNode is an object that is not rendered but can be used as a center of transformation. This can decrease memory usage and increase rendering speed compared to using an empty mesh as a parent and is less complicated than using a pivot matrix.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/transform_node\n */\nexport class TransformNode extends Node {\n /**\n * Gets or sets the billboard mode. Default is 0.\n *\n * | Value | Type | Description |\n * | --- | --- | --- |\n * | 0 | BILLBOARDMODE_NONE | |\n * | 1 | BILLBOARDMODE_X | |\n * | 2 | BILLBOARDMODE_Y | |\n * | 4 | BILLBOARDMODE_Z | |\n * | 7 | BILLBOARDMODE_ALL | |\n *\n */\n get billboardMode() {\n return this._billboardMode;\n }\n set billboardMode(value) {\n if (this._billboardMode === value) {\n return;\n }\n this._billboardMode = value;\n this._cache.useBillboardPosition = (this._billboardMode & TransformNode.BILLBOARDMODE_USE_POSITION) !== 0;\n this._computeUseBillboardPath();\n }\n /**\n * Gets or sets a boolean indicating that parent rotation should be preserved when using billboards.\n * This could be useful for glTF objects where parent rotation helps converting from right handed to left handed\n */\n get preserveParentRotationForBillboard() {\n return this._preserveParentRotationForBillboard;\n }\n set preserveParentRotationForBillboard(value) {\n if (value === this._preserveParentRotationForBillboard) {\n return;\n }\n this._preserveParentRotationForBillboard = value;\n this._computeUseBillboardPath();\n }\n _computeUseBillboardPath() {\n this._cache.useBillboardPath = this._billboardMode !== TransformNode.BILLBOARDMODE_NONE && !this.preserveParentRotationForBillboard;\n }\n /**\n * Gets or sets the distance of the object to max, often used by skybox\n */\n get infiniteDistance() {\n return this._infiniteDistance;\n }\n set infiniteDistance(value) {\n if (this._infiniteDistance === value) {\n return;\n }\n this._infiniteDistance = value;\n }\n constructor(name, scene = null, isPure = true) {\n super(name, scene);\n this._forward = new Vector3(0, 0, 1);\n this._up = new Vector3(0, 1, 0);\n this._right = new Vector3(1, 0, 0);\n // Properties\n this._position = Vector3.Zero();\n this._rotation = Vector3.Zero();\n this._rotationQuaternion = null;\n this._scaling = Vector3.One();\n this._transformToBoneReferal = null;\n this._isAbsoluteSynced = false;\n this._billboardMode = TransformNode.BILLBOARDMODE_NONE;\n this._preserveParentRotationForBillboard = false;\n /**\n * Multiplication factor on scale x/y/z when computing the world matrix. Eg. for a 1x1x1 cube setting this to 2 will make it a 2x2x2 cube\n */\n this.scalingDeterminant = 1;\n this._infiniteDistance = false;\n /**\n * Gets or sets a boolean indicating that non uniform scaling (when at least one component is different from others) should be ignored.\n * By default the system will update normals to compensate\n */\n this.ignoreNonUniformScaling = false;\n /**\n * Gets or sets a boolean indicating that even if rotationQuaternion is defined, you can keep updating rotation property and Babylon.js will just mix both\n */\n this.reIntegrateRotationIntoRotationQuaternion = false;\n // Cache\n /** @internal */\n this._poseMatrix = null;\n /** @internal */\n this._localMatrix = Matrix.Zero();\n this._usePivotMatrix = false;\n this._absolutePosition = Vector3.Zero();\n this._absoluteScaling = Vector3.Zero();\n this._absoluteRotationQuaternion = Quaternion.Identity();\n this._pivotMatrix = Matrix.Identity();\n /** @internal */\n this._postMultiplyPivotMatrix = false;\n this._isWorldMatrixFrozen = false;\n /** @internal */\n this._indexInSceneTransformNodesArray = -1;\n /**\n * An event triggered after the world matrix is updated\n */\n this.onAfterWorldMatrixUpdateObservable = new Observable();\n this._nonUniformScaling = false;\n if (isPure) {\n this.getScene().addTransformNode(this);\n }\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"TransformNode\" string\n */\n getClassName() {\n return \"TransformNode\";\n }\n /**\n * Gets or set the node position (default is (0.0, 0.0, 0.0))\n */\n get position() {\n return this._position;\n }\n set position(newPosition) {\n this._position = newPosition;\n this._isDirty = true;\n }\n /**\n * return true if a pivot has been set\n * @returns true if a pivot matrix is used\n */\n isUsingPivotMatrix() {\n return this._usePivotMatrix;\n }\n /**\n * Gets or sets the rotation property : a Vector3 defining the rotation value in radians around each local axis X, Y, Z (default is (0.0, 0.0, 0.0)).\n * If rotation quaternion is set, this Vector3 will be ignored and copy from the quaternion\n */\n get rotation() {\n return this._rotation;\n }\n set rotation(newRotation) {\n this._rotation = newRotation;\n this._rotationQuaternion = null;\n this._isDirty = true;\n }\n /**\n * Gets or sets the scaling property : a Vector3 defining the node scaling along each local axis X, Y, Z (default is (1.0, 1.0, 1.0)).\n */\n get scaling() {\n return this._scaling;\n }\n set scaling(newScaling) {\n this._scaling = newScaling;\n this._isDirty = true;\n }\n /**\n * Gets or sets the rotation Quaternion property : this a Quaternion object defining the node rotation by using a unit quaternion (undefined by default, but can be null).\n * If set, only the rotationQuaternion is then used to compute the node rotation (ie. node.rotation will be ignored)\n */\n get rotationQuaternion() {\n return this._rotationQuaternion;\n }\n set rotationQuaternion(quaternion) {\n this._rotationQuaternion = quaternion;\n //reset the rotation vector.\n if (quaternion) {\n this._rotation.setAll(0.0);\n }\n this._isDirty = true;\n }\n /**\n * The forward direction of that transform in world space.\n */\n get forward() {\n Vector3.TransformNormalFromFloatsToRef(0, 0, this.getScene().useRightHandedSystem ? -1.0 : 1.0, this.getWorldMatrix(), this._forward);\n return this._forward.normalize();\n }\n /**\n * The up direction of that transform in world space.\n */\n get up() {\n Vector3.TransformNormalFromFloatsToRef(0, 1, 0, this.getWorldMatrix(), this._up);\n return this._up.normalize();\n }\n /**\n * The right direction of that transform in world space.\n */\n get right() {\n Vector3.TransformNormalFromFloatsToRef(this.getScene().useRightHandedSystem ? -1.0 : 1.0, 0, 0, this.getWorldMatrix(), this._right);\n return this._right.normalize();\n }\n /**\n * Copies the parameter passed Matrix into the mesh Pose matrix.\n * @param matrix the matrix to copy the pose from\n * @returns this TransformNode.\n */\n updatePoseMatrix(matrix) {\n if (!this._poseMatrix) {\n this._poseMatrix = matrix.clone();\n return this;\n }\n this._poseMatrix.copyFrom(matrix);\n return this;\n }\n /**\n * Returns the mesh Pose matrix.\n * @returns the pose matrix\n */\n getPoseMatrix() {\n if (!this._poseMatrix) {\n this._poseMatrix = Matrix.Identity();\n }\n return this._poseMatrix;\n }\n /** @internal */\n _isSynchronized() {\n const cache = this._cache;\n if (this._billboardMode !== cache.billboardMode || this._billboardMode !== TransformNode.BILLBOARDMODE_NONE) {\n return false;\n }\n if (cache.pivotMatrixUpdated) {\n return false;\n }\n if (this._infiniteDistance) {\n return false;\n }\n if (this._position._isDirty) {\n return false;\n }\n if (this._scaling._isDirty) {\n return false;\n }\n if ((this._rotationQuaternion && this._rotationQuaternion._isDirty) || this._rotation._isDirty) {\n return false;\n }\n return true;\n }\n /** @internal */\n _initCache() {\n super._initCache();\n const cache = this._cache;\n cache.localMatrixUpdated = false;\n cache.billboardMode = -1;\n cache.infiniteDistance = false;\n cache.useBillboardPosition = false;\n cache.useBillboardPath = false;\n }\n /**\n * Returns the current mesh absolute position.\n * Returns a Vector3.\n */\n get absolutePosition() {\n return this.getAbsolutePosition();\n }\n /**\n * Returns the current mesh absolute scaling.\n * Returns a Vector3.\n */\n get absoluteScaling() {\n this._syncAbsoluteScalingAndRotation();\n return this._absoluteScaling;\n }\n /**\n * Returns the current mesh absolute rotation.\n * Returns a Quaternion.\n */\n get absoluteRotationQuaternion() {\n this._syncAbsoluteScalingAndRotation();\n return this._absoluteRotationQuaternion;\n }\n /**\n * Sets a new matrix to apply before all other transformation\n * @param matrix defines the transform matrix\n * @returns the current TransformNode\n */\n setPreTransformMatrix(matrix) {\n return this.setPivotMatrix(matrix, false);\n }\n /**\n * Sets a new pivot matrix to the current node\n * @param matrix defines the new pivot matrix to use\n * @param postMultiplyPivotMatrix defines if the pivot matrix must be cancelled in the world matrix. When this parameter is set to true (default), the inverse of the pivot matrix is also applied at the end to cancel the transformation effect\n * @returns the current TransformNode\n */\n setPivotMatrix(matrix, postMultiplyPivotMatrix = true) {\n this._pivotMatrix.copyFrom(matrix);\n this._usePivotMatrix = !this._pivotMatrix.isIdentity();\n this._cache.pivotMatrixUpdated = true;\n this._postMultiplyPivotMatrix = postMultiplyPivotMatrix;\n if (this._postMultiplyPivotMatrix) {\n if (!this._pivotMatrixInverse) {\n this._pivotMatrixInverse = Matrix.Invert(this._pivotMatrix);\n }\n else {\n this._pivotMatrix.invertToRef(this._pivotMatrixInverse);\n }\n }\n return this;\n }\n /**\n * Returns the mesh pivot matrix.\n * Default : Identity.\n * @returns the matrix\n */\n getPivotMatrix() {\n return this._pivotMatrix;\n }\n /**\n * Instantiate (when possible) or clone that node with its hierarchy\n * @param newParent defines the new parent to use for the instance (or clone)\n * @param options defines options to configure how copy is done\n * @param options.doNotInstantiate defines if the model must be instantiated or just cloned\n * @param onNewNodeCreated defines an option callback to call when a clone or an instance is created\n * @returns an instance (or a clone) of the current node with its hierarchy\n */\n instantiateHierarchy(newParent = null, options, onNewNodeCreated) {\n const clone = this.clone(\"Clone of \" + (this.name || this.id), newParent || this.parent, true);\n if (clone) {\n if (onNewNodeCreated) {\n onNewNodeCreated(this, clone);\n }\n }\n for (const child of this.getChildTransformNodes(true)) {\n child.instantiateHierarchy(clone, options, onNewNodeCreated);\n }\n return clone;\n }\n /**\n * Prevents the World matrix to be computed any longer\n * @param newWorldMatrix defines an optional matrix to use as world matrix\n * @param decompose defines whether to decompose the given newWorldMatrix or directly assign\n * @returns the TransformNode.\n */\n freezeWorldMatrix(newWorldMatrix = null, decompose = false) {\n if (newWorldMatrix) {\n if (decompose) {\n this._rotation.setAll(0);\n this._rotationQuaternion = this._rotationQuaternion || Quaternion.Identity();\n newWorldMatrix.decompose(this._scaling, this._rotationQuaternion, this._position);\n this.computeWorldMatrix(true);\n }\n else {\n this._worldMatrix = newWorldMatrix;\n this._absolutePosition.copyFromFloats(this._worldMatrix.m[12], this._worldMatrix.m[13], this._worldMatrix.m[14]);\n this._afterComputeWorldMatrix();\n }\n }\n else {\n this._isWorldMatrixFrozen = false; // no guarantee world is not already frozen, switch off temporarily\n this.computeWorldMatrix(true);\n }\n this._isDirty = false;\n this._isWorldMatrixFrozen = true;\n return this;\n }\n /**\n * Allows back the World matrix computation.\n * @returns the TransformNode.\n */\n unfreezeWorldMatrix() {\n this._isWorldMatrixFrozen = false;\n this.computeWorldMatrix(true);\n return this;\n }\n /**\n * True if the World matrix has been frozen.\n */\n get isWorldMatrixFrozen() {\n return this._isWorldMatrixFrozen;\n }\n /**\n * Returns the mesh absolute position in the World.\n * @returns a Vector3.\n */\n getAbsolutePosition() {\n this.computeWorldMatrix();\n return this._absolutePosition;\n }\n /**\n * Sets the mesh absolute position in the World from a Vector3 or an Array(3).\n * @param absolutePosition the absolute position to set\n * @returns the TransformNode.\n */\n setAbsolutePosition(absolutePosition) {\n if (!absolutePosition) {\n return this;\n }\n let absolutePositionX;\n let absolutePositionY;\n let absolutePositionZ;\n if (absolutePosition.x === undefined) {\n if (arguments.length < 3) {\n return this;\n }\n absolutePositionX = arguments[0];\n absolutePositionY = arguments[1];\n absolutePositionZ = arguments[2];\n }\n else {\n absolutePositionX = absolutePosition.x;\n absolutePositionY = absolutePosition.y;\n absolutePositionZ = absolutePosition.z;\n }\n if (this.parent) {\n const invertParentWorldMatrix = TmpVectors.Matrix[0];\n this.parent.getWorldMatrix().invertToRef(invertParentWorldMatrix);\n Vector3.TransformCoordinatesFromFloatsToRef(absolutePositionX, absolutePositionY, absolutePositionZ, invertParentWorldMatrix, this.position);\n }\n else {\n this.position.x = absolutePositionX;\n this.position.y = absolutePositionY;\n this.position.z = absolutePositionZ;\n }\n this._absolutePosition.copyFrom(absolutePosition);\n return this;\n }\n /**\n * Sets the mesh position in its local space.\n * @param vector3 the position to set in localspace\n * @returns the TransformNode.\n */\n setPositionWithLocalVector(vector3) {\n this.computeWorldMatrix();\n this.position = Vector3.TransformNormal(vector3, this._localMatrix);\n return this;\n }\n /**\n * Returns the mesh position in the local space from the current World matrix values.\n * @returns a new Vector3.\n */\n getPositionExpressedInLocalSpace() {\n this.computeWorldMatrix();\n const invLocalWorldMatrix = TmpVectors.Matrix[0];\n this._localMatrix.invertToRef(invLocalWorldMatrix);\n return Vector3.TransformNormal(this.position, invLocalWorldMatrix);\n }\n /**\n * Translates the mesh along the passed Vector3 in its local space.\n * @param vector3 the distance to translate in localspace\n * @returns the TransformNode.\n */\n locallyTranslate(vector3) {\n this.computeWorldMatrix(true);\n this.position = Vector3.TransformCoordinates(vector3, this._localMatrix);\n return this;\n }\n /**\n * Orients a mesh towards a target point. Mesh must be drawn facing user.\n * @param targetPoint the position (must be in same space as current mesh) to look at\n * @param yawCor optional yaw (y-axis) correction in radians\n * @param pitchCor optional pitch (x-axis) correction in radians\n * @param rollCor optional roll (z-axis) correction in radians\n * @param space the chosen space of the target\n * @returns the TransformNode.\n */\n lookAt(targetPoint, yawCor = 0, pitchCor = 0, rollCor = 0, space = Space.LOCAL) {\n const dv = TransformNode._LookAtVectorCache;\n const pos = space === Space.LOCAL ? this.position : this.getAbsolutePosition();\n targetPoint.subtractToRef(pos, dv);\n this.setDirection(dv, yawCor, pitchCor, rollCor);\n // Correct for parent's rotation offset\n if (space === Space.WORLD && this.parent) {\n if (this.rotationQuaternion) {\n // Get local rotation matrix of the looking object\n const rotationMatrix = TmpVectors.Matrix[0];\n this.rotationQuaternion.toRotationMatrix(rotationMatrix);\n // Offset rotation by parent's inverted rotation matrix to correct in world space\n const parentRotationMatrix = TmpVectors.Matrix[1];\n this.parent.getWorldMatrix().getRotationMatrixToRef(parentRotationMatrix);\n parentRotationMatrix.invert();\n rotationMatrix.multiplyToRef(parentRotationMatrix, rotationMatrix);\n this.rotationQuaternion.fromRotationMatrix(rotationMatrix);\n }\n else {\n // Get local rotation matrix of the looking object\n const quaternionRotation = TmpVectors.Quaternion[0];\n Quaternion.FromEulerVectorToRef(this.rotation, quaternionRotation);\n const rotationMatrix = TmpVectors.Matrix[0];\n quaternionRotation.toRotationMatrix(rotationMatrix);\n // Offset rotation by parent's inverted rotation matrix to correct in world space\n const parentRotationMatrix = TmpVectors.Matrix[1];\n this.parent.getWorldMatrix().getRotationMatrixToRef(parentRotationMatrix);\n parentRotationMatrix.invert();\n rotationMatrix.multiplyToRef(parentRotationMatrix, rotationMatrix);\n quaternionRotation.fromRotationMatrix(rotationMatrix);\n quaternionRotation.toEulerAnglesToRef(this.rotation);\n }\n }\n return this;\n }\n /**\n * Returns a new Vector3 that is the localAxis, expressed in the mesh local space, rotated like the mesh.\n * This Vector3 is expressed in the World space.\n * @param localAxis axis to rotate\n * @returns a new Vector3 that is the localAxis, expressed in the mesh local space, rotated like the mesh.\n */\n getDirection(localAxis) {\n const result = Vector3.Zero();\n this.getDirectionToRef(localAxis, result);\n return result;\n }\n /**\n * Sets the Vector3 \"result\" as the rotated Vector3 \"localAxis\" in the same rotation than the mesh.\n * localAxis is expressed in the mesh local space.\n * result is computed in the World space from the mesh World matrix.\n * @param localAxis axis to rotate\n * @param result the resulting transformnode\n * @returns this TransformNode.\n */\n getDirectionToRef(localAxis, result) {\n Vector3.TransformNormalToRef(localAxis, this.getWorldMatrix(), result);\n return this;\n }\n /**\n * Sets this transform node rotation to the given local axis.\n * @param localAxis the axis in local space\n * @param yawCor optional yaw (y-axis) correction in radians\n * @param pitchCor optional pitch (x-axis) correction in radians\n * @param rollCor optional roll (z-axis) correction in radians\n * @returns this TransformNode\n */\n setDirection(localAxis, yawCor = 0, pitchCor = 0, rollCor = 0) {\n const yaw = -Math.atan2(localAxis.z, localAxis.x) + Math.PI / 2;\n const len = Math.sqrt(localAxis.x * localAxis.x + localAxis.z * localAxis.z);\n const pitch = -Math.atan2(localAxis.y, len);\n if (this.rotationQuaternion) {\n Quaternion.RotationYawPitchRollToRef(yaw + yawCor, pitch + pitchCor, rollCor, this.rotationQuaternion);\n }\n else {\n this.rotation.x = pitch + pitchCor;\n this.rotation.y = yaw + yawCor;\n this.rotation.z = rollCor;\n }\n return this;\n }\n /**\n * Sets a new pivot point to the current node\n * @param point defines the new pivot point to use\n * @param space defines if the point is in world or local space (local by default)\n * @returns the current TransformNode\n */\n setPivotPoint(point, space = Space.LOCAL) {\n if (this.getScene().getRenderId() == 0) {\n this.computeWorldMatrix(true);\n }\n const wm = this.getWorldMatrix();\n if (space == Space.WORLD) {\n const tmat = TmpVectors.Matrix[0];\n wm.invertToRef(tmat);\n point = Vector3.TransformCoordinates(point, tmat);\n }\n return this.setPivotMatrix(Matrix.Translation(-point.x, -point.y, -point.z), true);\n }\n /**\n * Returns a new Vector3 set with the mesh pivot point coordinates in the local space.\n * @returns the pivot point\n */\n getPivotPoint() {\n const point = Vector3.Zero();\n this.getPivotPointToRef(point);\n return point;\n }\n /**\n * Sets the passed Vector3 \"result\" with the coordinates of the mesh pivot point in the local space.\n * @param result the vector3 to store the result\n * @returns this TransformNode.\n */\n getPivotPointToRef(result) {\n result.x = -this._pivotMatrix.m[12];\n result.y = -this._pivotMatrix.m[13];\n result.z = -this._pivotMatrix.m[14];\n return this;\n }\n /**\n * Returns a new Vector3 set with the mesh pivot point World coordinates.\n * @returns a new Vector3 set with the mesh pivot point World coordinates.\n */\n getAbsolutePivotPoint() {\n const point = Vector3.Zero();\n this.getAbsolutePivotPointToRef(point);\n return point;\n }\n /**\n * Sets the Vector3 \"result\" coordinates with the mesh pivot point World coordinates.\n * @param result vector3 to store the result\n * @returns this TransformNode.\n */\n getAbsolutePivotPointToRef(result) {\n this.getPivotPointToRef(result);\n Vector3.TransformCoordinatesToRef(result, this.getWorldMatrix(), result);\n return this;\n }\n /**\n * Flag the transform node as dirty (Forcing it to update everything)\n * @param property if set to \"rotation\" the objects rotationQuaternion will be set to null\n * @returns this node\n */\n markAsDirty(property) {\n if (this._isDirty) {\n return this;\n }\n // We need to explicitly update the children\n // as the scene.evaluateActiveMeshes will not poll the transform nodes\n if (this._children) {\n for (const child of this._children) {\n child.markAsDirty(property);\n }\n }\n return super.markAsDirty(property);\n }\n /**\n * Defines the passed node as the parent of the current node.\n * The node will remain exactly where it is and its position / rotation will be updated accordingly.\n * Note that if the mesh has a pivot matrix / point defined it will be applied after the parent was updated.\n * In that case the node will not remain in the same space as it is, as the pivot will be applied.\n * To avoid this, you can set updatePivot to true and the pivot will be updated to identity\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/parent\n * @param node the node ot set as the parent\n * @param preserveScalingSign if true, keep scaling sign of child. Otherwise, scaling sign might change.\n * @param updatePivot if true, update the pivot matrix to keep the node in the same space as before\n * @returns this TransformNode.\n */\n setParent(node, preserveScalingSign = false, updatePivot = false) {\n if (!node && !this.parent) {\n return this;\n }\n const quatRotation = TmpVectors.Quaternion[0];\n const position = TmpVectors.Vector3[0];\n const scale = TmpVectors.Vector3[1];\n const invParentMatrix = TmpVectors.Matrix[1];\n Matrix.IdentityToRef(invParentMatrix);\n const composedMatrix = TmpVectors.Matrix[0];\n this.computeWorldMatrix(true);\n let currentRotation = this.rotationQuaternion;\n if (!currentRotation) {\n currentRotation = TransformNode._TmpRotation;\n Quaternion.RotationYawPitchRollToRef(this._rotation.y, this._rotation.x, this._rotation.z, currentRotation);\n }\n // current global transformation without pivot\n Matrix.ComposeToRef(this.scaling, currentRotation, this.position, composedMatrix);\n if (this.parent) {\n composedMatrix.multiplyToRef(this.parent.computeWorldMatrix(true), composedMatrix);\n }\n // is a node was set, calculate the difference between this and the node\n if (node) {\n node.computeWorldMatrix(true).invertToRef(invParentMatrix);\n composedMatrix.multiplyToRef(invParentMatrix, composedMatrix);\n }\n composedMatrix.decompose(scale, quatRotation, position, preserveScalingSign ? this : undefined);\n if (this.rotationQuaternion) {\n this.rotationQuaternion.copyFrom(quatRotation);\n }\n else {\n quatRotation.toEulerAnglesToRef(this.rotation);\n }\n this.scaling.copyFrom(scale);\n this.position.copyFrom(position);\n this.parent = node;\n if (updatePivot) {\n this.setPivotMatrix(Matrix.Identity());\n }\n return this;\n }\n /**\n * True if the scaling property of this object is non uniform eg. (1,2,1)\n */\n get nonUniformScaling() {\n return this._nonUniformScaling;\n }\n /**\n * @internal\n */\n _updateNonUniformScalingState(value) {\n if (this._nonUniformScaling === value) {\n return false;\n }\n this._nonUniformScaling = value;\n return true;\n }\n /**\n * Attach the current TransformNode to another TransformNode associated with a bone\n * @param bone Bone affecting the TransformNode\n * @param affectedTransformNode TransformNode associated with the bone\n * @returns this object\n */\n attachToBone(bone, affectedTransformNode) {\n this._currentParentWhenAttachingToBone = this.parent;\n this._transformToBoneReferal = affectedTransformNode;\n this.parent = bone;\n bone.getSkeleton().prepare(true); // make sure bone.getFinalMatrix() is up to date\n if (bone.getFinalMatrix().determinant() < 0) {\n this.scalingDeterminant *= -1;\n }\n return this;\n }\n /**\n * Detach the transform node if its associated with a bone\n * @param resetToPreviousParent Indicates if the parent that was in effect when attachToBone was called should be set back or if we should set parent to null instead (defaults to the latter)\n * @returns this object\n */\n detachFromBone(resetToPreviousParent = false) {\n if (!this.parent) {\n if (resetToPreviousParent) {\n this.parent = this._currentParentWhenAttachingToBone;\n }\n return this;\n }\n if (this.parent.getWorldMatrix().determinant() < 0) {\n this.scalingDeterminant *= -1;\n }\n this._transformToBoneReferal = null;\n if (resetToPreviousParent) {\n this.parent = this._currentParentWhenAttachingToBone;\n }\n else {\n this.parent = null;\n }\n return this;\n }\n /**\n * Rotates the mesh around the axis vector for the passed angle (amount) expressed in radians, in the given space.\n * space (default LOCAL) can be either Space.LOCAL, either Space.WORLD.\n * Note that the property `rotationQuaternion` is then automatically updated and the property `rotation` is set to (0,0,0) and no longer used.\n * The passed axis is also normalized.\n * @param axis the axis to rotate around\n * @param amount the amount to rotate in radians\n * @param space Space to rotate in (Default: local)\n * @returns the TransformNode.\n */\n rotate(axis, amount, space) {\n axis.normalize();\n if (!this.rotationQuaternion) {\n this.rotationQuaternion = this.rotation.toQuaternion();\n this.rotation.setAll(0);\n }\n let rotationQuaternion;\n if (!space || space === Space.LOCAL) {\n rotationQuaternion = Quaternion.RotationAxisToRef(axis, amount, TransformNode._RotationAxisCache);\n this.rotationQuaternion.multiplyToRef(rotationQuaternion, this.rotationQuaternion);\n }\n else {\n if (this.parent) {\n const parentWorldMatrix = this.parent.getWorldMatrix();\n const invertParentWorldMatrix = TmpVectors.Matrix[0];\n parentWorldMatrix.invertToRef(invertParentWorldMatrix);\n axis = Vector3.TransformNormal(axis, invertParentWorldMatrix);\n if (parentWorldMatrix.determinant() < 0) {\n amount *= -1;\n }\n }\n rotationQuaternion = Quaternion.RotationAxisToRef(axis, amount, TransformNode._RotationAxisCache);\n rotationQuaternion.multiplyToRef(this.rotationQuaternion, this.rotationQuaternion);\n }\n return this;\n }\n /**\n * Rotates the mesh around the axis vector for the passed angle (amount) expressed in radians, in world space.\n * Note that the property `rotationQuaternion` is then automatically updated and the property `rotation` is set to (0,0,0) and no longer used.\n * The passed axis is also normalized. .\n * Method is based on http://www.euclideanspace.com/maths/geometry/affine/aroundPoint/index.htm\n * @param point the point to rotate around\n * @param axis the axis to rotate around\n * @param amount the amount to rotate in radians\n * @returns the TransformNode\n */\n rotateAround(point, axis, amount) {\n axis.normalize();\n if (!this.rotationQuaternion) {\n this.rotationQuaternion = Quaternion.RotationYawPitchRoll(this.rotation.y, this.rotation.x, this.rotation.z);\n this.rotation.setAll(0);\n }\n const tmpVector = TmpVectors.Vector3[0];\n const finalScale = TmpVectors.Vector3[1];\n const finalTranslation = TmpVectors.Vector3[2];\n const finalRotation = TmpVectors.Quaternion[0];\n const translationMatrix = TmpVectors.Matrix[0]; // T\n const translationMatrixInv = TmpVectors.Matrix[1]; // T'\n const rotationMatrix = TmpVectors.Matrix[2]; // R\n const finalMatrix = TmpVectors.Matrix[3]; // T' x R x T\n point.subtractToRef(this.position, tmpVector);\n Matrix.TranslationToRef(tmpVector.x, tmpVector.y, tmpVector.z, translationMatrix); // T\n Matrix.TranslationToRef(-tmpVector.x, -tmpVector.y, -tmpVector.z, translationMatrixInv); // T'\n Matrix.RotationAxisToRef(axis, amount, rotationMatrix); // R\n translationMatrixInv.multiplyToRef(rotationMatrix, finalMatrix); // T' x R\n finalMatrix.multiplyToRef(translationMatrix, finalMatrix); // T' x R x T\n finalMatrix.decompose(finalScale, finalRotation, finalTranslation);\n this.position.addInPlace(finalTranslation);\n finalRotation.multiplyToRef(this.rotationQuaternion, this.rotationQuaternion);\n return this;\n }\n /**\n * Translates the mesh along the axis vector for the passed distance in the given space.\n * space (default LOCAL) can be either Space.LOCAL, either Space.WORLD.\n * @param axis the axis to translate in\n * @param distance the distance to translate\n * @param space Space to rotate in (Default: local)\n * @returns the TransformNode.\n */\n translate(axis, distance, space) {\n const displacementVector = axis.scale(distance);\n if (!space || space === Space.LOCAL) {\n const tempV3 = this.getPositionExpressedInLocalSpace().add(displacementVector);\n this.setPositionWithLocalVector(tempV3);\n }\n else {\n this.setAbsolutePosition(this.getAbsolutePosition().add(displacementVector));\n }\n return this;\n }\n /**\n * Adds a rotation step to the mesh current rotation.\n * x, y, z are Euler angles expressed in radians.\n * This methods updates the current mesh rotation, either mesh.rotation, either mesh.rotationQuaternion if it's set.\n * This means this rotation is made in the mesh local space only.\n * It's useful to set a custom rotation order different from the BJS standard one YXZ.\n * Example : this rotates the mesh first around its local X axis, then around its local Z axis, finally around its local Y axis.\n * ```javascript\n * mesh.addRotation(x1, 0, 0).addRotation(0, 0, z2).addRotation(0, 0, y3);\n * ```\n * Note that `addRotation()` accumulates the passed rotation values to the current ones and computes the .rotation or .rotationQuaternion updated values.\n * Under the hood, only quaternions are used. So it's a little faster is you use .rotationQuaternion because it doesn't need to translate them back to Euler angles.\n * @param x Rotation to add\n * @param y Rotation to add\n * @param z Rotation to add\n * @returns the TransformNode.\n */\n addRotation(x, y, z) {\n let rotationQuaternion;\n if (this.rotationQuaternion) {\n rotationQuaternion = this.rotationQuaternion;\n }\n else {\n rotationQuaternion = TmpVectors.Quaternion[1];\n Quaternion.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, rotationQuaternion);\n }\n const accumulation = TmpVectors.Quaternion[0];\n Quaternion.RotationYawPitchRollToRef(y, x, z, accumulation);\n rotationQuaternion.multiplyInPlace(accumulation);\n if (!this.rotationQuaternion) {\n rotationQuaternion.toEulerAnglesToRef(this.rotation);\n }\n return this;\n }\n /**\n * @internal\n */\n _getEffectiveParent() {\n return this.parent;\n }\n /**\n * Returns whether the transform node world matrix computation needs the camera information to be computed.\n * This is the case when the node is a billboard or has an infinite distance for instance.\n * @returns true if the world matrix computation needs the camera information to be computed\n */\n isWorldMatrixCameraDependent() {\n return (this._infiniteDistance && !this.parent) || (this._billboardMode !== TransformNode.BILLBOARDMODE_NONE && !this.preserveParentRotationForBillboard);\n }\n /**\n * Computes the world matrix of the node\n * @param force defines if the cache version should be invalidated forcing the world matrix to be created from scratch\n * @param camera defines the camera used if different from the scene active camera (This is used with modes like Billboard or infinite distance)\n * @returns the world matrix\n */\n computeWorldMatrix(force = false, camera = null) {\n if (this._isWorldMatrixFrozen && !this._isDirty) {\n return this._worldMatrix;\n }\n const currentRenderId = this.getScene().getRenderId();\n if (!this._isDirty && !force && (this._currentRenderId === currentRenderId || this.isSynchronized())) {\n this._currentRenderId = currentRenderId;\n return this._worldMatrix;\n }\n camera = camera || this.getScene().activeCamera;\n this._updateCache();\n const cache = this._cache;\n cache.pivotMatrixUpdated = false;\n cache.billboardMode = this.billboardMode;\n cache.infiniteDistance = this.infiniteDistance;\n cache.parent = this._parentNode;\n this._currentRenderId = currentRenderId;\n this._childUpdateId += 1;\n this._isDirty = false;\n this._position._isDirty = false;\n this._rotation._isDirty = false;\n this._scaling._isDirty = false;\n const parent = this._getEffectiveParent();\n // Scaling\n const scaling = TransformNode._TmpScaling;\n let translation = this._position;\n // Translation\n if (this._infiniteDistance) {\n if (!this.parent && camera) {\n const cameraWorldMatrix = camera.getWorldMatrix();\n const cameraGlobalPosition = new Vector3(cameraWorldMatrix.m[12], cameraWorldMatrix.m[13], cameraWorldMatrix.m[14]);\n translation = TransformNode._TmpTranslation;\n translation.copyFromFloats(this._position.x + cameraGlobalPosition.x, this._position.y + cameraGlobalPosition.y, this._position.z + cameraGlobalPosition.z);\n }\n }\n // Scaling\n scaling.copyFromFloats(this._scaling.x * this.scalingDeterminant, this._scaling.y * this.scalingDeterminant, this._scaling.z * this.scalingDeterminant);\n // Rotation\n let rotation;\n if (this._rotationQuaternion) {\n this._rotationQuaternion._isDirty = false;\n rotation = this._rotationQuaternion;\n if (this.reIntegrateRotationIntoRotationQuaternion) {\n const len = this.rotation.lengthSquared();\n if (len) {\n this._rotationQuaternion.multiplyInPlace(Quaternion.RotationYawPitchRoll(this._rotation.y, this._rotation.x, this._rotation.z));\n this._rotation.copyFromFloats(0, 0, 0);\n }\n }\n }\n else {\n rotation = TransformNode._TmpRotation;\n Quaternion.RotationYawPitchRollToRef(this._rotation.y, this._rotation.x, this._rotation.z, rotation);\n }\n // Compose\n if (this._usePivotMatrix) {\n const scaleMatrix = TmpVectors.Matrix[1];\n Matrix.ScalingToRef(scaling.x, scaling.y, scaling.z, scaleMatrix);\n // Rotation\n const rotationMatrix = TmpVectors.Matrix[0];\n rotation.toRotationMatrix(rotationMatrix);\n // Composing transformations\n this._pivotMatrix.multiplyToRef(scaleMatrix, TmpVectors.Matrix[4]);\n TmpVectors.Matrix[4].multiplyToRef(rotationMatrix, this._localMatrix);\n // Post multiply inverse of pivotMatrix\n if (this._postMultiplyPivotMatrix) {\n this._localMatrix.multiplyToRef(this._pivotMatrixInverse, this._localMatrix);\n }\n this._localMatrix.addTranslationFromFloats(translation.x, translation.y, translation.z);\n }\n else {\n Matrix.ComposeToRef(scaling, rotation, translation, this._localMatrix);\n }\n // Parent\n if (parent && parent.getWorldMatrix) {\n if (force) {\n parent.computeWorldMatrix(force);\n }\n if (cache.useBillboardPath) {\n if (this._transformToBoneReferal) {\n const bone = this.parent;\n bone.getSkeleton().prepare();\n bone.getFinalMatrix().multiplyToRef(this._transformToBoneReferal.getWorldMatrix(), TmpVectors.Matrix[7]);\n }\n else {\n TmpVectors.Matrix[7].copyFrom(parent.getWorldMatrix());\n }\n // Extract scaling and translation from parent\n const translation = TmpVectors.Vector3[5];\n const scale = TmpVectors.Vector3[6];\n const orientation = TmpVectors.Quaternion[0];\n TmpVectors.Matrix[7].decompose(scale, orientation, translation);\n Matrix.ScalingToRef(scale.x, scale.y, scale.z, TmpVectors.Matrix[7]);\n TmpVectors.Matrix[7].setTranslation(translation);\n if (TransformNode.BillboardUseParentOrientation) {\n // set localMatrix translation to be transformed against parent's orientation.\n this._position.applyRotationQuaternionToRef(orientation, translation);\n this._localMatrix.setTranslation(translation);\n }\n this._localMatrix.multiplyToRef(TmpVectors.Matrix[7], this._worldMatrix);\n }\n else {\n if (this._transformToBoneReferal) {\n const bone = this.parent;\n bone.getSkeleton().prepare();\n this._localMatrix.multiplyToRef(bone.getFinalMatrix(), TmpVectors.Matrix[6]);\n TmpVectors.Matrix[6].multiplyToRef(this._transformToBoneReferal.getWorldMatrix(), this._worldMatrix);\n }\n else {\n this._localMatrix.multiplyToRef(parent.getWorldMatrix(), this._worldMatrix);\n }\n }\n this._markSyncedWithParent();\n }\n else {\n this._worldMatrix.copyFrom(this._localMatrix);\n }\n // Billboarding based on camera orientation (testing PG:http://www.babylonjs-playground.com/#UJEIL#13)\n if (cache.useBillboardPath && camera && this.billboardMode && !cache.useBillboardPosition) {\n const storedTranslation = TmpVectors.Vector3[0];\n this._worldMatrix.getTranslationToRef(storedTranslation); // Save translation\n // Cancel camera rotation\n TmpVectors.Matrix[1].copyFrom(camera.getViewMatrix());\n if (this._scene.useRightHandedSystem) {\n TmpVectors.Matrix[1].multiplyToRef(convertRHSToLHS, TmpVectors.Matrix[1]);\n }\n TmpVectors.Matrix[1].setTranslationFromFloats(0, 0, 0);\n TmpVectors.Matrix[1].invertToRef(TmpVectors.Matrix[0]);\n if ((this.billboardMode & TransformNode.BILLBOARDMODE_ALL) !== TransformNode.BILLBOARDMODE_ALL) {\n TmpVectors.Matrix[0].decompose(undefined, TmpVectors.Quaternion[0], undefined);\n const eulerAngles = TmpVectors.Vector3[1];\n TmpVectors.Quaternion[0].toEulerAnglesToRef(eulerAngles);\n if ((this.billboardMode & TransformNode.BILLBOARDMODE_X) !== TransformNode.BILLBOARDMODE_X) {\n eulerAngles.x = 0;\n }\n if ((this.billboardMode & TransformNode.BILLBOARDMODE_Y) !== TransformNode.BILLBOARDMODE_Y) {\n eulerAngles.y = 0;\n }\n if ((this.billboardMode & TransformNode.BILLBOARDMODE_Z) !== TransformNode.BILLBOARDMODE_Z) {\n eulerAngles.z = 0;\n }\n Matrix.RotationYawPitchRollToRef(eulerAngles.y, eulerAngles.x, eulerAngles.z, TmpVectors.Matrix[0]);\n }\n this._worldMatrix.setTranslationFromFloats(0, 0, 0);\n this._worldMatrix.multiplyToRef(TmpVectors.Matrix[0], this._worldMatrix);\n // Restore translation\n this._worldMatrix.setTranslation(TmpVectors.Vector3[0]);\n }\n // Billboarding based on camera position\n else if (cache.useBillboardPath && camera && cache.useBillboardPosition) {\n const storedTranslation = TmpVectors.Vector3[0];\n // Save translation\n this._worldMatrix.getTranslationToRef(storedTranslation);\n // Compute camera position in local space\n const cameraPosition = camera.globalPosition;\n this._worldMatrix.invertToRef(TmpVectors.Matrix[1]);\n const camInObjSpace = TmpVectors.Vector3[1];\n Vector3.TransformCoordinatesToRef(cameraPosition, TmpVectors.Matrix[1], camInObjSpace);\n camInObjSpace.normalize();\n // Find the lookAt info in local space\n const yaw = -Math.atan2(camInObjSpace.z, camInObjSpace.x) + Math.PI / 2;\n const len = Math.sqrt(camInObjSpace.x * camInObjSpace.x + camInObjSpace.z * camInObjSpace.z);\n const pitch = -Math.atan2(camInObjSpace.y, len);\n Quaternion.RotationYawPitchRollToRef(yaw, pitch, 0, TmpVectors.Quaternion[0]);\n if ((this.billboardMode & TransformNode.BILLBOARDMODE_ALL) !== TransformNode.BILLBOARDMODE_ALL) {\n const eulerAngles = TmpVectors.Vector3[1];\n TmpVectors.Quaternion[0].toEulerAnglesToRef(eulerAngles);\n if ((this.billboardMode & TransformNode.BILLBOARDMODE_X) !== TransformNode.BILLBOARDMODE_X) {\n eulerAngles.x = 0;\n }\n if ((this.billboardMode & TransformNode.BILLBOARDMODE_Y) !== TransformNode.BILLBOARDMODE_Y) {\n eulerAngles.y = 0;\n }\n if ((this.billboardMode & TransformNode.BILLBOARDMODE_Z) !== TransformNode.BILLBOARDMODE_Z) {\n eulerAngles.z = 0;\n }\n Matrix.RotationYawPitchRollToRef(eulerAngles.y, eulerAngles.x, eulerAngles.z, TmpVectors.Matrix[0]);\n }\n else {\n Matrix.FromQuaternionToRef(TmpVectors.Quaternion[0], TmpVectors.Matrix[0]);\n }\n // Cancel translation\n this._worldMatrix.setTranslationFromFloats(0, 0, 0);\n // Rotate according to lookat (diff from local to lookat)\n this._worldMatrix.multiplyToRef(TmpVectors.Matrix[0], this._worldMatrix);\n // Restore translation\n this._worldMatrix.setTranslation(TmpVectors.Vector3[0]);\n }\n // Normal matrix\n if (!this.ignoreNonUniformScaling) {\n if (this._scaling.isNonUniformWithinEpsilon(0.000001)) {\n this._updateNonUniformScalingState(true);\n }\n else if (parent && parent._nonUniformScaling) {\n this._updateNonUniformScalingState(parent._nonUniformScaling);\n }\n else {\n this._updateNonUniformScalingState(false);\n }\n }\n else {\n this._updateNonUniformScalingState(false);\n }\n this._afterComputeWorldMatrix();\n // Absolute position\n this._absolutePosition.copyFromFloats(this._worldMatrix.m[12], this._worldMatrix.m[13], this._worldMatrix.m[14]);\n this._isAbsoluteSynced = false;\n // Callbacks\n this.onAfterWorldMatrixUpdateObservable.notifyObservers(this);\n if (!this._poseMatrix) {\n this._poseMatrix = Matrix.Invert(this._worldMatrix);\n }\n // Cache the determinant\n this._worldMatrixDeterminantIsDirty = true;\n return this._worldMatrix;\n }\n /**\n * Resets this nodeTransform's local matrix to Matrix.Identity().\n * @param independentOfChildren indicates if all child nodeTransform's world-space transform should be preserved.\n */\n resetLocalMatrix(independentOfChildren = true) {\n this.computeWorldMatrix();\n if (independentOfChildren) {\n const children = this.getChildren();\n for (let i = 0; i < children.length; ++i) {\n const child = children[i];\n if (child) {\n child.computeWorldMatrix();\n const bakedMatrix = TmpVectors.Matrix[0];\n child._localMatrix.multiplyToRef(this._localMatrix, bakedMatrix);\n const tmpRotationQuaternion = TmpVectors.Quaternion[0];\n bakedMatrix.decompose(child.scaling, tmpRotationQuaternion, child.position);\n if (child.rotationQuaternion) {\n child.rotationQuaternion.copyFrom(tmpRotationQuaternion);\n }\n else {\n tmpRotationQuaternion.toEulerAnglesToRef(child.rotation);\n }\n }\n }\n }\n this.scaling.copyFromFloats(1, 1, 1);\n this.position.copyFromFloats(0, 0, 0);\n this.rotation.copyFromFloats(0, 0, 0);\n //only if quaternion is already set\n if (this.rotationQuaternion) {\n this.rotationQuaternion = Quaternion.Identity();\n }\n this._worldMatrix = Matrix.Identity();\n }\n _afterComputeWorldMatrix() { }\n /**\n * If you'd like to be called back after the mesh position, rotation or scaling has been updated.\n * @param func callback function to add\n *\n * @returns the TransformNode.\n */\n registerAfterWorldMatrixUpdate(func) {\n this.onAfterWorldMatrixUpdateObservable.add(func);\n return this;\n }\n /**\n * Removes a registered callback function.\n * @param func callback function to remove\n * @returns the TransformNode.\n */\n unregisterAfterWorldMatrixUpdate(func) {\n this.onAfterWorldMatrixUpdateObservable.removeCallback(func);\n return this;\n }\n /**\n * Gets the position of the current mesh in camera space\n * @param camera defines the camera to use\n * @returns a position\n */\n getPositionInCameraSpace(camera = null) {\n if (!camera) {\n camera = this.getScene().activeCamera;\n }\n return Vector3.TransformCoordinates(this.getAbsolutePosition(), camera.getViewMatrix());\n }\n /**\n * Returns the distance from the mesh to the active camera\n * @param camera defines the camera to use\n * @returns the distance\n */\n getDistanceToCamera(camera = null) {\n if (!camera) {\n camera = this.getScene().activeCamera;\n }\n return this.getAbsolutePosition().subtract(camera.globalPosition).length();\n }\n /**\n * Clone the current transform node\n * @param name Name of the new clone\n * @param newParent New parent for the clone\n * @param doNotCloneChildren Do not clone children hierarchy\n * @returns the new transform node\n */\n clone(name, newParent, doNotCloneChildren) {\n const result = SerializationHelper.Clone(() => new TransformNode(name, this.getScene()), this);\n result.name = name;\n result.id = name;\n if (newParent) {\n result.parent = newParent;\n }\n if (!doNotCloneChildren) {\n // Children\n const directDescendants = this.getDescendants(true);\n for (let index = 0; index < directDescendants.length; index++) {\n const child = directDescendants[index];\n if (child.clone) {\n child.clone(name + \".\" + child.name, result);\n }\n }\n }\n return result;\n }\n /**\n * Serializes the objects information.\n * @param currentSerializationObject defines the object to serialize in\n * @returns the serialized object\n */\n serialize(currentSerializationObject) {\n const serializationObject = SerializationHelper.Serialize(this, currentSerializationObject);\n serializationObject.type = this.getClassName();\n serializationObject.uniqueId = this.uniqueId;\n // Parent\n if (this.parent) {\n this.parent._serializeAsParent(serializationObject);\n }\n serializationObject.localMatrix = this.getPivotMatrix().asArray();\n serializationObject.isEnabled = this.isEnabled();\n return serializationObject;\n }\n // Statics\n /**\n * Returns a new TransformNode object parsed from the source provided.\n * @param parsedTransformNode is the source.\n * @param scene the scene the object belongs to\n * @param rootUrl is a string, it's the root URL to prefix the `delayLoadingFile` property with\n * @returns a new TransformNode object parsed from the source provided.\n */\n static Parse(parsedTransformNode, scene, rootUrl) {\n const transformNode = SerializationHelper.Parse(() => new TransformNode(parsedTransformNode.name, scene), parsedTransformNode, scene, rootUrl);\n if (parsedTransformNode.localMatrix) {\n transformNode.setPreTransformMatrix(Matrix.FromArray(parsedTransformNode.localMatrix));\n }\n else if (parsedTransformNode.pivotMatrix) {\n transformNode.setPivotMatrix(Matrix.FromArray(parsedTransformNode.pivotMatrix));\n }\n transformNode.setEnabled(parsedTransformNode.isEnabled);\n transformNode._waitingParsedUniqueId = parsedTransformNode.uniqueId;\n // Parent\n if (parsedTransformNode.parentId !== undefined) {\n transformNode._waitingParentId = parsedTransformNode.parentId;\n }\n if (parsedTransformNode.parentInstanceIndex !== undefined) {\n transformNode._waitingParentInstanceIndex = parsedTransformNode.parentInstanceIndex;\n }\n return transformNode;\n }\n /**\n * Get all child-transformNodes of this node\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\n * @returns an array of TransformNode\n */\n getChildTransformNodes(directDescendantsOnly, predicate) {\n const results = [];\n this._getDescendants(results, directDescendantsOnly, (node) => {\n return (!predicate || predicate(node)) && node instanceof TransformNode;\n });\n return results;\n }\n /**\n * Releases resources associated with this transform node.\n * @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)\n * @param disposeMaterialAndTextures Set to true to also dispose referenced materials and textures (false by default)\n */\n dispose(doNotRecurse, disposeMaterialAndTextures = false) {\n // Animations\n this.getScene().stopAnimation(this);\n // Remove from scene\n this.getScene().removeTransformNode(this);\n if (this._parentContainer) {\n const index = this._parentContainer.transformNodes.indexOf(this);\n if (index > -1) {\n this._parentContainer.transformNodes.splice(index, 1);\n }\n this._parentContainer = null;\n }\n this.onAfterWorldMatrixUpdateObservable.clear();\n if (doNotRecurse) {\n const transformNodes = this.getChildTransformNodes(true);\n for (const transformNode of transformNodes) {\n transformNode.parent = null;\n transformNode.computeWorldMatrix(true);\n }\n }\n super.dispose(doNotRecurse, disposeMaterialAndTextures);\n }\n /**\n * Uniformly scales the mesh to fit inside of a unit cube (1 X 1 X 1 units)\n * @param includeDescendants Use the hierarchy's bounding box instead of the mesh's bounding box. Default is false\n * @param ignoreRotation ignore rotation when computing the scale (ie. object will be axis aligned). Default is false\n * @param predicate predicate that is passed in to getHierarchyBoundingVectors when selecting which object should be included when scaling\n * @returns the current mesh\n */\n normalizeToUnitCube(includeDescendants = true, ignoreRotation = false, predicate) {\n let storedRotation = null;\n let storedRotationQuaternion = null;\n if (ignoreRotation) {\n if (this.rotationQuaternion) {\n storedRotationQuaternion = this.rotationQuaternion.clone();\n this.rotationQuaternion.copyFromFloats(0, 0, 0, 1);\n }\n else if (this.rotation) {\n storedRotation = this.rotation.clone();\n this.rotation.copyFromFloats(0, 0, 0);\n }\n }\n const boundingVectors = this.getHierarchyBoundingVectors(includeDescendants, predicate);\n const sizeVec = boundingVectors.max.subtract(boundingVectors.min);\n const maxDimension = Math.max(sizeVec.x, sizeVec.y, sizeVec.z);\n if (maxDimension === 0) {\n return this;\n }\n const scale = 1 / maxDimension;\n this.scaling.scaleInPlace(scale);\n if (ignoreRotation) {\n if (this.rotationQuaternion && storedRotationQuaternion) {\n this.rotationQuaternion.copyFrom(storedRotationQuaternion);\n }\n else if (this.rotation && storedRotation) {\n this.rotation.copyFrom(storedRotation);\n }\n }\n return this;\n }\n _syncAbsoluteScalingAndRotation() {\n if (!this._isAbsoluteSynced) {\n this._worldMatrix.decompose(this._absoluteScaling, this._absoluteRotationQuaternion);\n this._isAbsoluteSynced = true;\n }\n }\n}\n// Statics\n/**\n * Object will not rotate to face the camera\n */\nTransformNode.BILLBOARDMODE_NONE = 0;\n/**\n * Object will rotate to face the camera but only on the x axis\n */\nTransformNode.BILLBOARDMODE_X = 1;\n/**\n * Object will rotate to face the camera but only on the y axis\n */\nTransformNode.BILLBOARDMODE_Y = 2;\n/**\n * Object will rotate to face the camera but only on the z axis\n */\nTransformNode.BILLBOARDMODE_Z = 4;\n/**\n * Object will rotate to face the camera\n */\nTransformNode.BILLBOARDMODE_ALL = 7;\n/**\n * Object will rotate to face the camera's position instead of orientation\n */\nTransformNode.BILLBOARDMODE_USE_POSITION = 128;\n/**\n * Child transform with Billboard flags should or should not apply parent rotation (default if off)\n */\nTransformNode.BillboardUseParentOrientation = false;\nTransformNode._TmpRotation = Quaternion.Zero();\nTransformNode._TmpScaling = Vector3.Zero();\nTransformNode._TmpTranslation = Vector3.Zero();\nTransformNode._LookAtVectorCache = new Vector3(0, 0, 0);\nTransformNode._RotationAxisCache = new Quaternion();\n__decorate([\n serializeAsVector3(\"position\")\n], TransformNode.prototype, \"_position\", void 0);\n__decorate([\n serializeAsVector3(\"rotation\")\n], TransformNode.prototype, \"_rotation\", void 0);\n__decorate([\n serializeAsQuaternion(\"rotationQuaternion\")\n], TransformNode.prototype, \"_rotationQuaternion\", void 0);\n__decorate([\n serializeAsVector3(\"scaling\")\n], TransformNode.prototype, \"_scaling\", void 0);\n__decorate([\n serialize(\"billboardMode\")\n], TransformNode.prototype, \"_billboardMode\", void 0);\n__decorate([\n serialize()\n], TransformNode.prototype, \"scalingDeterminant\", void 0);\n__decorate([\n serialize(\"infiniteDistance\")\n], TransformNode.prototype, \"_infiniteDistance\", void 0);\n__decorate([\n serialize()\n], TransformNode.prototype, \"ignoreNonUniformScaling\", void 0);\n__decorate([\n serialize()\n], TransformNode.prototype, \"reIntegrateRotationIntoRotationQuaternion\", void 0);\n//# sourceMappingURL=transformNode.js.map","import { Vector3 } from \"../Maths/math.vector.js\";\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _MeshCollisionData {\n constructor() {\n this._checkCollisions = false;\n this._collisionMask = -1;\n this._collisionGroup = -1;\n this._surroundingMeshes = null;\n this._collider = null;\n this._oldPositionForCollisions = new Vector3(0, 0, 0);\n this._diffPositionForCollisions = new Vector3(0, 0, 0);\n this._collisionResponse = true;\n }\n}\n//# sourceMappingURL=meshCollisionData.js.map","import { Observable } from \"../Misc/observable.js\";\nimport { ScenePerformancePriority } from \"../scene.js\";\nimport { Quaternion, Matrix, Vector3, TmpVectors } from \"../Maths/math.vector.js\";\nimport { Engine } from \"../Engines/engine.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { VertexData } from \"../Meshes/mesh.vertexData.js\";\nimport { TransformNode } from \"../Meshes/transformNode.js\";\nimport { PickingInfo } from \"../Collisions/pickingInfo.js\";\nimport { BoundingInfo } from \"../Culling/boundingInfo.js\";\n\nimport { UniformBuffer } from \"../Materials/uniformBuffer.js\";\nimport { _MeshCollisionData } from \"../Collisions/meshCollisionData.js\";\nimport { _WarnImport } from \"../Misc/devTools.js\";\nimport { extractMinAndMax } from \"../Maths/math.functions.js\";\nimport { Color3, Color4 } from \"../Maths/math.color.js\";\nimport { Epsilon } from \"../Maths/math.constants.js\";\nimport { Axis } from \"../Maths/math.axis.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass _FacetDataStorage {\n constructor() {\n this.facetNb = 0; // facet number\n this.partitioningSubdivisions = 10; // number of subdivisions per axis in the partitioning space\n this.partitioningBBoxRatio = 1.01; // the partitioning array space is by default 1% bigger than the bounding box\n this.facetDataEnabled = false; // is the facet data feature enabled on this mesh ?\n this.facetParameters = {}; // keep a reference to the object parameters to avoid memory re-allocation\n this.bbSize = Vector3.Zero(); // bbox size approximated for facet data\n this.subDiv = {\n // actual number of subdivisions per axis for ComputeNormals()\n max: 1,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n X: 1,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Y: 1,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Z: 1,\n };\n this.facetDepthSort = false; // is the facet depth sort to be computed\n this.facetDepthSortEnabled = false; // is the facet depth sort initialized\n }\n}\n/**\n * @internal\n **/\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass _InternalAbstractMeshDataInfo {\n constructor() {\n this._hasVertexAlpha = false;\n this._useVertexColors = true;\n this._numBoneInfluencers = 4;\n this._applyFog = true;\n this._receiveShadows = false;\n this._facetData = new _FacetDataStorage();\n this._visibility = 1.0;\n this._skeleton = null;\n this._layerMask = 0x0fffffff;\n this._computeBonesUsingShaders = true;\n this._isActive = false;\n this._onlyForInstances = false;\n this._isActiveIntermediate = false;\n this._onlyForInstancesIntermediate = false;\n this._actAsRegularMesh = false;\n this._currentLOD = null;\n this._currentLODIsUpToDate = false;\n this._collisionRetryCount = 3;\n this._morphTargetManager = null;\n this._renderingGroupId = 0;\n this._bakedVertexAnimationManager = null;\n this._material = null;\n this._positions = null;\n this._pointerOverDisableMeshTesting = false;\n // Collisions\n this._meshCollisionData = new _MeshCollisionData();\n this._enableDistantPicking = false;\n /** @internal\n * Bounding info that is unnafected by the addition of thin instances\n */\n this._rawBoundingInfo = null;\n }\n}\n/**\n * Class used to store all common mesh properties\n */\nexport class AbstractMesh extends TransformNode {\n /**\n * No billboard\n */\n static get BILLBOARDMODE_NONE() {\n return TransformNode.BILLBOARDMODE_NONE;\n }\n /** Billboard on X axis */\n static get BILLBOARDMODE_X() {\n return TransformNode.BILLBOARDMODE_X;\n }\n /** Billboard on Y axis */\n static get BILLBOARDMODE_Y() {\n return TransformNode.BILLBOARDMODE_Y;\n }\n /** Billboard on Z axis */\n static get BILLBOARDMODE_Z() {\n return TransformNode.BILLBOARDMODE_Z;\n }\n /** Billboard on all axes */\n static get BILLBOARDMODE_ALL() {\n return TransformNode.BILLBOARDMODE_ALL;\n }\n /** Billboard on using position instead of orientation */\n static get BILLBOARDMODE_USE_POSITION() {\n return TransformNode.BILLBOARDMODE_USE_POSITION;\n }\n /**\n * Gets the number of facets in the mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData#what-is-a-mesh-facet\n */\n get facetNb() {\n return this._internalAbstractMeshDataInfo._facetData.facetNb;\n }\n /**\n * Gets or set the number (integer) of subdivisions per axis in the partitioning space\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData#tweaking-the-partitioning\n */\n get partitioningSubdivisions() {\n return this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions;\n }\n set partitioningSubdivisions(nb) {\n this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions = nb;\n }\n /**\n * The ratio (float) to apply to the bounding box size to set to the partitioning space.\n * Ex : 1.01 (default) the partitioning space is 1% bigger than the bounding box\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData#tweaking-the-partitioning\n */\n get partitioningBBoxRatio() {\n return this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio;\n }\n set partitioningBBoxRatio(ratio) {\n this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio = ratio;\n }\n /**\n * Gets or sets a boolean indicating that the facets must be depth sorted on next call to `updateFacetData()`.\n * Works only for updatable meshes.\n * Doesn't work with multi-materials\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData#facet-depth-sort\n */\n get mustDepthSortFacets() {\n return this._internalAbstractMeshDataInfo._facetData.facetDepthSort;\n }\n set mustDepthSortFacets(sort) {\n this._internalAbstractMeshDataInfo._facetData.facetDepthSort = sort;\n }\n /**\n * The location (Vector3) where the facet depth sort must be computed from.\n * By default, the active camera position.\n * Used only when facet depth sort is enabled\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData#facet-depth-sort\n */\n get facetDepthSortFrom() {\n return this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom;\n }\n set facetDepthSortFrom(location) {\n this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom = location;\n }\n /** number of collision detection tries. Change this value if not all collisions are detected and handled properly */\n get collisionRetryCount() {\n return this._internalAbstractMeshDataInfo._collisionRetryCount;\n }\n set collisionRetryCount(retryCount) {\n this._internalAbstractMeshDataInfo._collisionRetryCount = retryCount;\n }\n /**\n * gets a boolean indicating if facetData is enabled\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData#what-is-a-mesh-facet\n */\n get isFacetDataEnabled() {\n return this._internalAbstractMeshDataInfo._facetData.facetDataEnabled;\n }\n /**\n * Gets or sets the morph target manager\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/morphTargets\n */\n get morphTargetManager() {\n return this._internalAbstractMeshDataInfo._morphTargetManager;\n }\n set morphTargetManager(value) {\n if (this._internalAbstractMeshDataInfo._morphTargetManager === value) {\n return;\n }\n this._internalAbstractMeshDataInfo._morphTargetManager = value;\n this._syncGeometryWithMorphTargetManager();\n }\n /**\n * Gets or sets the baked vertex animation manager\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/baked_texture_animations\n */\n get bakedVertexAnimationManager() {\n return this._internalAbstractMeshDataInfo._bakedVertexAnimationManager;\n }\n set bakedVertexAnimationManager(value) {\n if (this._internalAbstractMeshDataInfo._bakedVertexAnimationManager === value) {\n return;\n }\n this._internalAbstractMeshDataInfo._bakedVertexAnimationManager = value;\n this._markSubMeshesAsAttributesDirty();\n }\n /** @internal */\n _syncGeometryWithMorphTargetManager() { }\n /**\n * @internal\n */\n _updateNonUniformScalingState(value) {\n if (!super._updateNonUniformScalingState(value)) {\n return false;\n }\n this._markSubMeshesAsMiscDirty();\n return true;\n }\n /** @internal */\n get rawBoundingInfo() {\n return this._internalAbstractMeshDataInfo._rawBoundingInfo;\n }\n set rawBoundingInfo(boundingInfo) {\n this._internalAbstractMeshDataInfo._rawBoundingInfo = boundingInfo;\n }\n /** Set a function to call when this mesh collides with another one */\n set onCollide(callback) {\n if (this._internalAbstractMeshDataInfo._meshCollisionData._onCollideObserver) {\n this.onCollideObservable.remove(this._internalAbstractMeshDataInfo._meshCollisionData._onCollideObserver);\n }\n this._internalAbstractMeshDataInfo._meshCollisionData._onCollideObserver = this.onCollideObservable.add(callback);\n }\n /** Set a function to call when the collision's position changes */\n set onCollisionPositionChange(callback) {\n if (this._internalAbstractMeshDataInfo._meshCollisionData._onCollisionPositionChangeObserver) {\n this.onCollisionPositionChangeObservable.remove(this._internalAbstractMeshDataInfo._meshCollisionData._onCollisionPositionChangeObserver);\n }\n this._internalAbstractMeshDataInfo._meshCollisionData._onCollisionPositionChangeObserver = this.onCollisionPositionChangeObservable.add(callback);\n }\n /**\n * Gets or sets mesh visibility between 0 and 1 (default is 1)\n */\n get visibility() {\n return this._internalAbstractMeshDataInfo._visibility;\n }\n /**\n * Gets or sets mesh visibility between 0 and 1 (default is 1)\n */\n set visibility(value) {\n if (this._internalAbstractMeshDataInfo._visibility === value) {\n return;\n }\n const oldValue = this._internalAbstractMeshDataInfo._visibility;\n this._internalAbstractMeshDataInfo._visibility = value;\n if ((oldValue === 1 && value !== 1) || (oldValue !== 1 && value === 1)) {\n this._markSubMeshesAsDirty((defines) => {\n defines.markAsMiscDirty();\n defines.markAsPrePassDirty();\n });\n }\n }\n /**\n * Gets or sets the property which disables the test that is checking that the mesh under the pointer is the same than the previous time we tested for it (default: false).\n * Set this property to true if you want thin instances picking to be reported accurately when moving over the mesh.\n * Note that setting this property to true will incur some performance penalties when dealing with pointer events for this mesh so use it sparingly.\n */\n get pointerOverDisableMeshTesting() {\n return this._internalAbstractMeshDataInfo._pointerOverDisableMeshTesting;\n }\n set pointerOverDisableMeshTesting(disable) {\n this._internalAbstractMeshDataInfo._pointerOverDisableMeshTesting = disable;\n }\n /**\n * Specifies the rendering group id for this mesh (0 by default)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/transparent_rendering#rendering-groups\n */\n get renderingGroupId() {\n return this._internalAbstractMeshDataInfo._renderingGroupId;\n }\n set renderingGroupId(value) {\n this._internalAbstractMeshDataInfo._renderingGroupId = value;\n }\n /** Gets or sets current material */\n get material() {\n return this._internalAbstractMeshDataInfo._material;\n }\n set material(value) {\n if (this._internalAbstractMeshDataInfo._material === value) {\n return;\n }\n // remove from material mesh map id needed\n if (this._internalAbstractMeshDataInfo._material && this._internalAbstractMeshDataInfo._material.meshMap) {\n this._internalAbstractMeshDataInfo._material.meshMap[this.uniqueId] = undefined;\n }\n this._internalAbstractMeshDataInfo._material = value;\n if (value && value.meshMap) {\n value.meshMap[this.uniqueId] = this;\n }\n if (this.onMaterialChangedObservable.hasObservers()) {\n this.onMaterialChangedObservable.notifyObservers(this);\n }\n if (!this.subMeshes) {\n return;\n }\n this.resetDrawCache();\n this._unBindEffect();\n }\n /**\n * Gets the material used to render the mesh in a specific render pass\n * @param renderPassId render pass id\n * @returns material used for the render pass. If no specific material is used for this render pass, undefined is returned (meaning mesh.material is used for this pass)\n */\n getMaterialForRenderPass(renderPassId) {\n var _a;\n return (_a = this._internalAbstractMeshDataInfo._materialForRenderPass) === null || _a === void 0 ? void 0 : _a[renderPassId];\n }\n /**\n * Sets the material to be used to render the mesh in a specific render pass\n * @param renderPassId render pass id\n * @param material material to use for this render pass. If undefined is passed, no specific material will be used for this render pass but the regular material will be used instead (mesh.material)\n */\n setMaterialForRenderPass(renderPassId, material) {\n this.resetDrawCache(renderPassId);\n if (!this._internalAbstractMeshDataInfo._materialForRenderPass) {\n this._internalAbstractMeshDataInfo._materialForRenderPass = [];\n }\n this._internalAbstractMeshDataInfo._materialForRenderPass[renderPassId] = material;\n }\n /**\n * Gets or sets a boolean indicating that this mesh can receive realtime shadows\n * @see https://doc.babylonjs.com/features/featuresDeepDive/lights/shadows\n */\n get receiveShadows() {\n return this._internalAbstractMeshDataInfo._receiveShadows;\n }\n set receiveShadows(value) {\n if (this._internalAbstractMeshDataInfo._receiveShadows === value) {\n return;\n }\n this._internalAbstractMeshDataInfo._receiveShadows = value;\n this._markSubMeshesAsLightDirty();\n }\n /** Gets or sets a boolean indicating that this mesh contains vertex color data with alpha values */\n get hasVertexAlpha() {\n return this._internalAbstractMeshDataInfo._hasVertexAlpha;\n }\n set hasVertexAlpha(value) {\n if (this._internalAbstractMeshDataInfo._hasVertexAlpha === value) {\n return;\n }\n this._internalAbstractMeshDataInfo._hasVertexAlpha = value;\n this._markSubMeshesAsAttributesDirty();\n this._markSubMeshesAsMiscDirty();\n }\n /** Gets or sets a boolean indicating that this mesh needs to use vertex color data to render (if this kind of vertex data is available in the geometry) */\n get useVertexColors() {\n return this._internalAbstractMeshDataInfo._useVertexColors;\n }\n set useVertexColors(value) {\n if (this._internalAbstractMeshDataInfo._useVertexColors === value) {\n return;\n }\n this._internalAbstractMeshDataInfo._useVertexColors = value;\n this._markSubMeshesAsAttributesDirty();\n }\n /**\n * Gets or sets a boolean indicating that bone animations must be computed by the GPU (true by default)\n */\n get computeBonesUsingShaders() {\n return this._internalAbstractMeshDataInfo._computeBonesUsingShaders;\n }\n set computeBonesUsingShaders(value) {\n if (this._internalAbstractMeshDataInfo._computeBonesUsingShaders === value) {\n return;\n }\n this._internalAbstractMeshDataInfo._computeBonesUsingShaders = value;\n this._markSubMeshesAsAttributesDirty();\n }\n /** Gets or sets the number of allowed bone influences per vertex (4 by default) */\n get numBoneInfluencers() {\n return this._internalAbstractMeshDataInfo._numBoneInfluencers;\n }\n set numBoneInfluencers(value) {\n if (this._internalAbstractMeshDataInfo._numBoneInfluencers === value) {\n return;\n }\n this._internalAbstractMeshDataInfo._numBoneInfluencers = value;\n this._markSubMeshesAsAttributesDirty();\n }\n /** Gets or sets a boolean indicating that this mesh will allow fog to be rendered on it (true by default) */\n get applyFog() {\n return this._internalAbstractMeshDataInfo._applyFog;\n }\n set applyFog(value) {\n if (this._internalAbstractMeshDataInfo._applyFog === value) {\n return;\n }\n this._internalAbstractMeshDataInfo._applyFog = value;\n this._markSubMeshesAsMiscDirty();\n }\n /** When enabled, decompose picking matrices for better precision with large values for mesh position and scling */\n get enableDistantPicking() {\n return this._internalAbstractMeshDataInfo._enableDistantPicking;\n }\n set enableDistantPicking(value) {\n this._internalAbstractMeshDataInfo._enableDistantPicking = value;\n }\n /**\n * Gets or sets the current layer mask (default is 0x0FFFFFFF)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/layerMasksAndMultiCam\n */\n get layerMask() {\n return this._internalAbstractMeshDataInfo._layerMask;\n }\n set layerMask(value) {\n if (value === this._internalAbstractMeshDataInfo._layerMask) {\n return;\n }\n this._internalAbstractMeshDataInfo._layerMask = value;\n this._resyncLightSources();\n }\n /**\n * Gets or sets a collision mask used to mask collisions (default is -1).\n * A collision between A and B will happen if A.collisionGroup & b.collisionMask !== 0\n */\n get collisionMask() {\n return this._internalAbstractMeshDataInfo._meshCollisionData._collisionMask;\n }\n set collisionMask(mask) {\n this._internalAbstractMeshDataInfo._meshCollisionData._collisionMask = !isNaN(mask) ? mask : -1;\n }\n /**\n * Gets or sets a collision response flag (default is true).\n * when collisionResponse is false, events are still triggered but colliding entity has no response\n * This helps creating trigger volume when user wants collision feedback events but not position/velocity\n * to respond to the collision.\n */\n get collisionResponse() {\n return this._internalAbstractMeshDataInfo._meshCollisionData._collisionResponse;\n }\n set collisionResponse(response) {\n this._internalAbstractMeshDataInfo._meshCollisionData._collisionResponse = response;\n }\n /**\n * Gets or sets the current collision group mask (-1 by default).\n * A collision between A and B will happen if A.collisionGroup & b.collisionMask !== 0\n */\n get collisionGroup() {\n return this._internalAbstractMeshDataInfo._meshCollisionData._collisionGroup;\n }\n set collisionGroup(mask) {\n this._internalAbstractMeshDataInfo._meshCollisionData._collisionGroup = !isNaN(mask) ? mask : -1;\n }\n /**\n * Gets or sets current surrounding meshes (null by default).\n *\n * By default collision detection is tested against every mesh in the scene.\n * It is possible to set surroundingMeshes to a defined list of meshes and then only these specified\n * meshes will be tested for the collision.\n *\n * Note: if set to an empty array no collision will happen when this mesh is moved.\n */\n get surroundingMeshes() {\n return this._internalAbstractMeshDataInfo._meshCollisionData._surroundingMeshes;\n }\n set surroundingMeshes(meshes) {\n this._internalAbstractMeshDataInfo._meshCollisionData._surroundingMeshes = meshes;\n }\n /** Gets the list of lights affecting that mesh */\n get lightSources() {\n return this._lightSources;\n }\n /** @internal */\n get _positions() {\n return null;\n }\n /**\n * Gets or sets a skeleton to apply skinning transformations\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons\n */\n set skeleton(value) {\n const skeleton = this._internalAbstractMeshDataInfo._skeleton;\n if (skeleton && skeleton.needInitialSkinMatrix) {\n skeleton._unregisterMeshWithPoseMatrix(this);\n }\n if (value && value.needInitialSkinMatrix) {\n value._registerMeshWithPoseMatrix(this);\n }\n this._internalAbstractMeshDataInfo._skeleton = value;\n if (!this._internalAbstractMeshDataInfo._skeleton) {\n this._bonesTransformMatrices = null;\n }\n this._markSubMeshesAsAttributesDirty();\n }\n get skeleton() {\n return this._internalAbstractMeshDataInfo._skeleton;\n }\n // Constructor\n /**\n * Creates a new AbstractMesh\n * @param name defines the name of the mesh\n * @param scene defines the hosting scene\n */\n constructor(name, scene = null) {\n super(name, scene, false);\n // Internal data\n /** @internal */\n this._internalAbstractMeshDataInfo = new _InternalAbstractMeshDataInfo();\n /** @internal */\n this._waitingMaterialId = null;\n /**\n * The culling strategy to use to check whether the mesh must be rendered or not.\n * This value can be changed at any time and will be used on the next render mesh selection.\n * The possible values are :\n * - AbstractMesh.CULLINGSTRATEGY_STANDARD\n * - AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY\n * - AbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION\n * - AbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY\n * Please read each static variable documentation to get details about the culling process.\n * */\n this.cullingStrategy = AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY;\n // Events\n /**\n * An event triggered when this mesh collides with another one\n */\n this.onCollideObservable = new Observable();\n /**\n * An event triggered when the collision's position changes\n */\n this.onCollisionPositionChangeObservable = new Observable();\n /**\n * An event triggered when material is changed\n */\n this.onMaterialChangedObservable = new Observable();\n // Properties\n /**\n * Gets or sets the orientation for POV movement & rotation\n */\n this.definedFacingForward = true;\n /** @internal */\n this._occlusionQuery = null;\n /** @internal */\n this._renderingGroup = null;\n /** Gets or sets the alpha index used to sort transparent meshes\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/transparent_rendering#alpha-index\n */\n this.alphaIndex = Number.MAX_VALUE;\n /**\n * Gets or sets a boolean indicating if the mesh is visible (renderable). Default is true\n */\n this.isVisible = true;\n /**\n * Gets or sets a boolean indicating if the mesh can be picked (by scene.pick for instance or through actions). Default is true\n */\n this.isPickable = true;\n /**\n * Gets or sets a boolean indicating if the mesh can be near picked. Default is false\n */\n this.isNearPickable = false;\n /**\n * Gets or sets a boolean indicating if the mesh can be near grabbed. Default is false\n */\n this.isNearGrabbable = false;\n /** Gets or sets a boolean indicating that bounding boxes of subMeshes must be rendered as well (false by default) */\n this.showSubMeshesBoundingBox = false;\n /** Gets or sets a boolean indicating if the mesh must be considered as a ray blocker for lens flares (false by default)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/lenseFlare\n */\n this.isBlocker = false;\n /**\n * Gets or sets a boolean indicating that pointer move events must be supported on this mesh (false by default)\n */\n this.enablePointerMoveEvents = false;\n /** Defines color to use when rendering outline */\n this.outlineColor = Color3.Red();\n /** Define width to use when rendering outline */\n this.outlineWidth = 0.02;\n /** Defines color to use when rendering overlay */\n this.overlayColor = Color3.Red();\n /** Defines alpha to use when rendering overlay */\n this.overlayAlpha = 0.5;\n /** Gets or sets a boolean indicating that internal octree (if available) can be used to boost submeshes selection (true by default) */\n this.useOctreeForRenderingSelection = true;\n /** Gets or sets a boolean indicating that internal octree (if available) can be used to boost submeshes picking (true by default) */\n this.useOctreeForPicking = true;\n /** Gets or sets a boolean indicating that internal octree (if available) can be used to boost submeshes collision (true by default) */\n this.useOctreeForCollisions = true;\n /**\n * True if the mesh must be rendered in any case (this will shortcut the frustum clipping phase)\n */\n this.alwaysSelectAsActiveMesh = false;\n /**\n * Gets or sets a boolean indicating that the bounding info does not need to be kept in sync (for performance reason)\n */\n this.doNotSyncBoundingInfo = false;\n /**\n * Gets or sets the current action manager\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\n */\n this.actionManager = null;\n /**\n * Gets or sets the ellipsoid used to impersonate this mesh when using collision engine (default is (0.5, 1, 0.5))\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions\n */\n this.ellipsoid = new Vector3(0.5, 1, 0.5);\n /**\n * Gets or sets the ellipsoid offset used to impersonate this mesh when using collision engine (default is (0, 0, 0))\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions\n */\n this.ellipsoidOffset = new Vector3(0, 0, 0);\n // Edges\n /**\n * Defines edge width used when edgesRenderer is enabled\n * @see https://www.babylonjs-playground.com/#10OJSG#13\n */\n this.edgesWidth = 1;\n /**\n * Defines edge color used when edgesRenderer is enabled\n * @see https://www.babylonjs-playground.com/#10OJSG#13\n */\n this.edgesColor = new Color4(1, 0, 0, 1);\n /** @internal */\n this._edgesRenderer = null;\n /** @internal */\n this._masterMesh = null;\n this._boundingInfo = null;\n this._boundingInfoIsDirty = true;\n /** @internal */\n this._renderId = 0;\n /** @internal */\n this._intersectionsInProgress = new Array();\n /** @internal */\n this._unIndexed = false;\n /** @internal */\n this._lightSources = new Array();\n // Loading properties\n /** @internal */\n this._waitingData = {\n lods: null,\n actions: null,\n freezeWorldMatrix: null,\n };\n /** @internal */\n this._bonesTransformMatrices = null;\n /** @internal */\n this._transformMatrixTexture = null;\n /**\n * An event triggered when the mesh is rebuilt.\n */\n this.onRebuildObservable = new Observable();\n this._onCollisionPositionChange = (collisionId, newPosition, collidedMesh = null) => {\n newPosition.subtractToRef(this._internalAbstractMeshDataInfo._meshCollisionData._oldPositionForCollisions, this._internalAbstractMeshDataInfo._meshCollisionData._diffPositionForCollisions);\n if (this._internalAbstractMeshDataInfo._meshCollisionData._diffPositionForCollisions.length() > Engine.CollisionsEpsilon) {\n this.position.addInPlace(this._internalAbstractMeshDataInfo._meshCollisionData._diffPositionForCollisions);\n }\n if (collidedMesh) {\n this.onCollideObservable.notifyObservers(collidedMesh);\n }\n this.onCollisionPositionChangeObservable.notifyObservers(this.position);\n };\n scene = this.getScene();\n scene.addMesh(this);\n this._resyncLightSources();\n // Mesh Uniform Buffer.\n this._uniformBuffer = new UniformBuffer(this.getScene().getEngine(), undefined, undefined, name, !this.getScene().getEngine().isWebGPU);\n this._buildUniformLayout();\n switch (scene.performancePriority) {\n case ScenePerformancePriority.Aggressive:\n this.doNotSyncBoundingInfo = true;\n // eslint-disable-next-line no-fallthrough\n case ScenePerformancePriority.Intermediate:\n this.alwaysSelectAsActiveMesh = true;\n this.isPickable = false;\n break;\n }\n }\n _buildUniformLayout() {\n this._uniformBuffer.addUniform(\"world\", 16);\n this._uniformBuffer.addUniform(\"visibility\", 1);\n this._uniformBuffer.create();\n }\n /**\n * Transfer the mesh values to its UBO.\n * @param world The world matrix associated with the mesh\n */\n transferToEffect(world) {\n const ubo = this._uniformBuffer;\n ubo.updateMatrix(\"world\", world);\n ubo.updateFloat(\"visibility\", this._internalAbstractMeshDataInfo._visibility);\n ubo.update();\n }\n /**\n * Gets the mesh uniform buffer.\n * @returns the uniform buffer of the mesh.\n */\n getMeshUniformBuffer() {\n return this._uniformBuffer;\n }\n /**\n * Returns the string \"AbstractMesh\"\n * @returns \"AbstractMesh\"\n */\n getClassName() {\n return \"AbstractMesh\";\n }\n /**\n * Gets a string representation of the current mesh\n * @param fullDetails defines a boolean indicating if full details must be included\n * @returns a string representation of the current mesh\n */\n toString(fullDetails) {\n let ret = \"Name: \" + this.name + \", isInstance: \" + (this.getClassName() !== \"InstancedMesh\" ? \"YES\" : \"NO\");\n ret += \", # of submeshes: \" + (this.subMeshes ? this.subMeshes.length : 0);\n const skeleton = this._internalAbstractMeshDataInfo._skeleton;\n if (skeleton) {\n ret += \", skeleton: \" + skeleton.name;\n }\n if (fullDetails) {\n ret += \", billboard mode: \" + [\"NONE\", \"X\", \"Y\", null, \"Z\", null, null, \"ALL\"][this.billboardMode];\n ret += \", freeze wrld mat: \" + (this._isWorldMatrixFrozen || this._waitingData.freezeWorldMatrix ? \"YES\" : \"NO\");\n }\n return ret;\n }\n /**\n * @internal\n */\n _getEffectiveParent() {\n if (this._masterMesh && this.billboardMode !== TransformNode.BILLBOARDMODE_NONE) {\n return this._masterMesh;\n }\n return super._getEffectiveParent();\n }\n /**\n * @internal\n */\n _getActionManagerForTrigger(trigger, initialCall = true) {\n if (this.actionManager && (initialCall || this.actionManager.isRecursive)) {\n if (trigger) {\n if (this.actionManager.hasSpecificTrigger(trigger)) {\n return this.actionManager;\n }\n }\n else {\n return this.actionManager;\n }\n }\n if (!this.parent) {\n return null;\n }\n return this.parent._getActionManagerForTrigger(trigger, false);\n }\n /**\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _rebuild(dispose = false) {\n this.onRebuildObservable.notifyObservers(this);\n if (this._occlusionQuery !== null) {\n this._occlusionQuery = null;\n }\n if (!this.subMeshes) {\n return;\n }\n for (const subMesh of this.subMeshes) {\n subMesh._rebuild();\n }\n }\n /** @internal */\n _resyncLightSources() {\n this._lightSources.length = 0;\n for (const light of this.getScene().lights) {\n if (!light.isEnabled()) {\n continue;\n }\n if (light.canAffectMesh(this)) {\n this._lightSources.push(light);\n }\n }\n this._markSubMeshesAsLightDirty();\n }\n /**\n * @internal\n */\n _resyncLightSource(light) {\n const isIn = light.isEnabled() && light.canAffectMesh(this);\n const index = this._lightSources.indexOf(light);\n let removed = false;\n if (index === -1) {\n if (!isIn) {\n return;\n }\n this._lightSources.push(light);\n }\n else {\n if (isIn) {\n return;\n }\n removed = true;\n this._lightSources.splice(index, 1);\n }\n this._markSubMeshesAsLightDirty(removed);\n }\n /** @internal */\n _unBindEffect() {\n for (const subMesh of this.subMeshes) {\n subMesh.setEffect(null);\n }\n }\n /**\n * @internal\n */\n _removeLightSource(light, dispose) {\n const index = this._lightSources.indexOf(light);\n if (index === -1) {\n return;\n }\n this._lightSources.splice(index, 1);\n this._markSubMeshesAsLightDirty(dispose);\n }\n _markSubMeshesAsDirty(func) {\n if (!this.subMeshes) {\n return;\n }\n for (const subMesh of this.subMeshes) {\n for (let i = 0; i < subMesh._drawWrappers.length; ++i) {\n const drawWrapper = subMesh._drawWrappers[i];\n if (!drawWrapper || !drawWrapper.defines || !drawWrapper.defines.markAllAsDirty) {\n continue;\n }\n func(drawWrapper.defines);\n }\n }\n }\n /**\n * @internal\n */\n _markSubMeshesAsLightDirty(dispose = false) {\n this._markSubMeshesAsDirty((defines) => defines.markAsLightDirty(dispose));\n }\n /** @internal */\n _markSubMeshesAsAttributesDirty() {\n this._markSubMeshesAsDirty((defines) => defines.markAsAttributesDirty());\n }\n /** @internal */\n _markSubMeshesAsMiscDirty() {\n this._markSubMeshesAsDirty((defines) => defines.markAsMiscDirty());\n }\n /**\n * Flag the AbstractMesh as dirty (Forcing it to update everything)\n * @param property if set to \"rotation\" the objects rotationQuaternion will be set to null\n * @returns this AbstractMesh\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n markAsDirty(property) {\n this._currentRenderId = Number.MAX_VALUE;\n this._isDirty = true;\n return this;\n }\n /**\n * Resets the draw wrappers cache for all submeshes of this abstract mesh\n * @param passId If provided, releases only the draw wrapper corresponding to this render pass id\n */\n resetDrawCache(passId) {\n if (!this.subMeshes) {\n return;\n }\n for (const subMesh of this.subMeshes) {\n subMesh.resetDrawCache(passId);\n }\n }\n // Methods\n /**\n * Returns true if the mesh is blocked. Implemented by child classes\n */\n get isBlocked() {\n return false;\n }\n /**\n * Returns the mesh itself by default. Implemented by child classes\n * @param camera defines the camera to use to pick the right LOD level\n * @returns the currentAbstractMesh\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getLOD(camera) {\n return this;\n }\n /**\n * Returns 0 by default. Implemented by child classes\n * @returns an integer\n */\n getTotalVertices() {\n return 0;\n }\n /**\n * Returns a positive integer : the total number of indices in this mesh geometry.\n * @returns the number of indices or zero if the mesh has no geometry.\n */\n getTotalIndices() {\n return 0;\n }\n /**\n * Returns null by default. Implemented by child classes\n * @returns null\n */\n getIndices() {\n return null;\n }\n /**\n * Returns the array of the requested vertex data kind. Implemented by child classes\n * @param kind defines the vertex data kind to use\n * @returns null\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getVerticesData(kind) {\n return null;\n }\n /**\n * Sets the vertex data of the mesh geometry for the requested `kind`.\n * If the mesh has no geometry, a new Geometry object is set to the mesh and then passed this vertex data.\n * Note that a new underlying VertexBuffer object is created each call.\n * If the `kind` is the `PositionKind`, the mesh BoundingInfo is renewed, so the bounding box and sphere, and the mesh World Matrix is recomputed.\n * @param kind defines vertex data kind:\n * * VertexBuffer.PositionKind\n * * VertexBuffer.UVKind\n * * VertexBuffer.UV2Kind\n * * VertexBuffer.UV3Kind\n * * VertexBuffer.UV4Kind\n * * VertexBuffer.UV5Kind\n * * VertexBuffer.UV6Kind\n * * VertexBuffer.ColorKind\n * * VertexBuffer.MatricesIndicesKind\n * * VertexBuffer.MatricesIndicesExtraKind\n * * VertexBuffer.MatricesWeightsKind\n * * VertexBuffer.MatricesWeightsExtraKind\n * @param data defines the data source\n * @param updatable defines if the data must be flagged as updatable (or static)\n * @param stride defines the vertex stride (size of an entire vertex). Can be null and in this case will be deduced from vertex data kind\n * @returns the current mesh\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n setVerticesData(kind, data, updatable, stride) {\n return this;\n }\n /**\n * Updates the existing vertex data of the mesh geometry for the requested `kind`.\n * If the mesh has no geometry, it is simply returned as it is.\n * @param kind defines vertex data kind:\n * * VertexBuffer.PositionKind\n * * VertexBuffer.UVKind\n * * VertexBuffer.UV2Kind\n * * VertexBuffer.UV3Kind\n * * VertexBuffer.UV4Kind\n * * VertexBuffer.UV5Kind\n * * VertexBuffer.UV6Kind\n * * VertexBuffer.ColorKind\n * * VertexBuffer.MatricesIndicesKind\n * * VertexBuffer.MatricesIndicesExtraKind\n * * VertexBuffer.MatricesWeightsKind\n * * VertexBuffer.MatricesWeightsExtraKind\n * @param data defines the data source\n * @param updateExtends If `kind` is `PositionKind` and if `updateExtends` is true, the mesh BoundingInfo is renewed, so the bounding box and sphere, and the mesh World Matrix is recomputed\n * @param makeItUnique If true, a new global geometry is created from this data and is set to the mesh\n * @returns the current mesh\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n updateVerticesData(kind, data, updateExtends, makeItUnique) {\n return this;\n }\n /**\n * Sets the mesh indices,\n * If the mesh has no geometry, a new Geometry object is created and set to the mesh.\n * @param indices Expects an array populated with integers or a typed array (Int32Array, Uint32Array, Uint16Array)\n * @param totalVertices Defines the total number of vertices\n * @returns the current mesh\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n setIndices(indices, totalVertices) {\n return this;\n }\n /**\n * Gets a boolean indicating if specific vertex data is present\n * @param kind defines the vertex data kind to use\n * @returns true is data kind is present\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isVerticesDataPresent(kind) {\n return false;\n }\n /**\n * Returns the mesh BoundingInfo object or creates a new one and returns if it was undefined.\n * Note that it returns a shallow bounding of the mesh (i.e. it does not include children).\n * However, if the mesh contains thin instances, it will be expanded to include them. If you want the \"raw\" bounding data instead, then use `getRawBoundingInfo()`.\n * To get the full bounding of all children, call `getHierarchyBoundingVectors` instead.\n * @returns a BoundingInfo\n */\n getBoundingInfo() {\n if (this._masterMesh) {\n return this._masterMesh.getBoundingInfo();\n }\n if (this._boundingInfoIsDirty) {\n this._boundingInfoIsDirty = false;\n // this._boundingInfo is being created if undefined\n this._updateBoundingInfo();\n }\n // cannot be null.\n return this._boundingInfo;\n }\n /**\n * Returns the bounding info unnafected by instance data.\n * @returns the bounding info of the mesh unaffected by instance data.\n */\n getRawBoundingInfo() {\n var _a;\n return (_a = this.rawBoundingInfo) !== null && _a !== void 0 ? _a : this.getBoundingInfo();\n }\n /**\n * Overwrite the current bounding info\n * @param boundingInfo defines the new bounding info\n * @returns the current mesh\n */\n setBoundingInfo(boundingInfo) {\n this._boundingInfo = boundingInfo;\n return this;\n }\n /**\n * Returns true if there is already a bounding info\n */\n get hasBoundingInfo() {\n return this._boundingInfo !== null;\n }\n /**\n * Creates a new bounding info for the mesh\n * @param minimum min vector of the bounding box/sphere\n * @param maximum max vector of the bounding box/sphere\n * @param worldMatrix defines the new world matrix\n * @returns the new bounding info\n */\n buildBoundingInfo(minimum, maximum, worldMatrix) {\n this._boundingInfo = new BoundingInfo(minimum, maximum, worldMatrix);\n return this._boundingInfo;\n }\n /**\n * Uniformly scales the mesh to fit inside of a unit cube (1 X 1 X 1 units)\n * @param includeDescendants Use the hierarchy's bounding box instead of the mesh's bounding box. Default is false\n * @param ignoreRotation ignore rotation when computing the scale (ie. object will be axis aligned). Default is false\n * @param predicate predicate that is passed in to getHierarchyBoundingVectors when selecting which object should be included when scaling\n * @returns the current mesh\n */\n normalizeToUnitCube(includeDescendants = true, ignoreRotation = false, predicate) {\n return super.normalizeToUnitCube(includeDescendants, ignoreRotation, predicate);\n }\n /** Gets a boolean indicating if this mesh has skinning data and an attached skeleton */\n get useBones() {\n return ((this.skeleton &&\n this.getScene().skeletonsEnabled &&\n this.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind) &&\n this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)));\n }\n /** @internal */\n _preActivate() { }\n /**\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _preActivateForIntermediateRendering(renderId) { }\n /**\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _activate(renderId, intermediateRendering) {\n this._renderId = renderId;\n return true;\n }\n /** @internal */\n _postActivate() {\n // Do nothing\n }\n /** @internal */\n _freeze() {\n // Do nothing\n }\n /** @internal */\n _unFreeze() {\n // Do nothing\n }\n /**\n * Gets the current world matrix\n * @returns a Matrix\n */\n getWorldMatrix() {\n if (this._masterMesh && this.billboardMode === TransformNode.BILLBOARDMODE_NONE) {\n return this._masterMesh.getWorldMatrix();\n }\n return super.getWorldMatrix();\n }\n /** @internal */\n _getWorldMatrixDeterminant() {\n if (this._masterMesh) {\n return this._masterMesh._getWorldMatrixDeterminant();\n }\n return super._getWorldMatrixDeterminant();\n }\n /**\n * Gets a boolean indicating if this mesh is an instance or a regular mesh\n */\n get isAnInstance() {\n return false;\n }\n /**\n * Gets a boolean indicating if this mesh has instances\n */\n get hasInstances() {\n return false;\n }\n /**\n * Gets a boolean indicating if this mesh has thin instances\n */\n get hasThinInstances() {\n return false;\n }\n // ================================== Point of View Movement =================================\n /**\n * Perform relative position change from the point of view of behind the front of the mesh.\n * This is performed taking into account the meshes current rotation, so you do not have to care.\n * Supports definition of mesh facing forward or backward {@link definedFacingForwardSearch | See definedFacingForwardSearch }.\n * @param amountRight defines the distance on the right axis\n * @param amountUp defines the distance on the up axis\n * @param amountForward defines the distance on the forward axis\n * @returns the current mesh\n */\n movePOV(amountRight, amountUp, amountForward) {\n this.position.addInPlace(this.calcMovePOV(amountRight, amountUp, amountForward));\n return this;\n }\n /**\n * Calculate relative position change from the point of view of behind the front of the mesh.\n * This is performed taking into account the meshes current rotation, so you do not have to care.\n * Supports definition of mesh facing forward or backward {@link definedFacingForwardSearch | See definedFacingForwardSearch }.\n * @param amountRight defines the distance on the right axis\n * @param amountUp defines the distance on the up axis\n * @param amountForward defines the distance on the forward axis\n * @returns the new displacement vector\n */\n calcMovePOV(amountRight, amountUp, amountForward) {\n const rotMatrix = new Matrix();\n const rotQuaternion = this.rotationQuaternion ? this.rotationQuaternion : Quaternion.RotationYawPitchRoll(this.rotation.y, this.rotation.x, this.rotation.z);\n rotQuaternion.toRotationMatrix(rotMatrix);\n const translationDelta = Vector3.Zero();\n const defForwardMult = this.definedFacingForward ? -1 : 1;\n Vector3.TransformCoordinatesFromFloatsToRef(amountRight * defForwardMult, amountUp, amountForward * defForwardMult, rotMatrix, translationDelta);\n return translationDelta;\n }\n // ================================== Point of View Rotation =================================\n /**\n * Perform relative rotation change from the point of view of behind the front of the mesh.\n * Supports definition of mesh facing forward or backward {@link definedFacingForwardSearch | See definedFacingForwardSearch }.\n * @param flipBack defines the flip\n * @param twirlClockwise defines the twirl\n * @param tiltRight defines the tilt\n * @returns the current mesh\n */\n rotatePOV(flipBack, twirlClockwise, tiltRight) {\n this.rotation.addInPlace(this.calcRotatePOV(flipBack, twirlClockwise, tiltRight));\n return this;\n }\n /**\n * Calculate relative rotation change from the point of view of behind the front of the mesh.\n * Supports definition of mesh facing forward or backward {@link definedFacingForwardSearch | See definedFacingForwardSearch }.\n * @param flipBack defines the flip\n * @param twirlClockwise defines the twirl\n * @param tiltRight defines the tilt\n * @returns the new rotation vector\n */\n calcRotatePOV(flipBack, twirlClockwise, tiltRight) {\n const defForwardMult = this.definedFacingForward ? 1 : -1;\n return new Vector3(flipBack * defForwardMult, twirlClockwise, tiltRight * defForwardMult);\n }\n /**\n * This method recomputes and sets a new BoundingInfo to the mesh unless it is locked.\n * This means the mesh underlying bounding box and sphere are recomputed.\n * @param applySkeleton defines whether to apply the skeleton before computing the bounding info\n * @param applyMorph defines whether to apply the morph target before computing the bounding info\n * @returns the current mesh\n */\n refreshBoundingInfo(applySkeleton = false, applyMorph = false) {\n if (this._boundingInfo && this._boundingInfo.isLocked) {\n return this;\n }\n this._refreshBoundingInfo(this._getPositionData(applySkeleton, applyMorph), null);\n return this;\n }\n /**\n * @internal\n */\n _refreshBoundingInfo(data, bias) {\n if (data) {\n const extend = extractMinAndMax(data, 0, this.getTotalVertices(), bias);\n if (this._boundingInfo) {\n this._boundingInfo.reConstruct(extend.minimum, extend.maximum);\n }\n else {\n this._boundingInfo = new BoundingInfo(extend.minimum, extend.maximum);\n }\n }\n if (this.subMeshes) {\n for (let index = 0; index < this.subMeshes.length; index++) {\n this.subMeshes[index].refreshBoundingInfo(data);\n }\n }\n this._updateBoundingInfo();\n }\n /**\n * Internal function to get buffer data and possibly apply morphs and normals\n * @param applySkeleton\n * @param applyMorph\n * @param data\n * @param kind the kind of data you want. Can be Normal or Position\n */\n _getData(applySkeleton = false, applyMorph = false, data, kind = VertexBuffer.PositionKind) {\n data = data !== null && data !== void 0 ? data : this.getVerticesData(kind).slice();\n if (data && applyMorph && this.morphTargetManager) {\n let faceIndexCount = 0;\n let positionIndex = 0;\n for (let vertexCount = 0; vertexCount < data.length; vertexCount++) {\n for (let targetCount = 0; targetCount < this.morphTargetManager.numTargets; targetCount++) {\n const targetMorph = this.morphTargetManager.getTarget(targetCount);\n const influence = targetMorph.influence;\n if (influence > 0.0) {\n const morphTargetPositions = targetMorph.getPositions();\n if (morphTargetPositions) {\n data[vertexCount] += (morphTargetPositions[vertexCount] - data[vertexCount]) * influence;\n }\n }\n }\n faceIndexCount++;\n if (kind === VertexBuffer.PositionKind) {\n if (this._positions && faceIndexCount === 3) {\n // We want to merge into positions every 3 indices starting (but not 0)\n faceIndexCount = 0;\n const index = positionIndex * 3;\n this._positions[positionIndex++].copyFromFloats(data[index], data[index + 1], data[index + 2]);\n }\n }\n }\n }\n if (data && applySkeleton && this.skeleton) {\n const matricesIndicesData = this.getVerticesData(VertexBuffer.MatricesIndicesKind);\n const matricesWeightsData = this.getVerticesData(VertexBuffer.MatricesWeightsKind);\n if (matricesWeightsData && matricesIndicesData) {\n const needExtras = this.numBoneInfluencers > 4;\n const matricesIndicesExtraData = needExtras ? this.getVerticesData(VertexBuffer.MatricesIndicesExtraKind) : null;\n const matricesWeightsExtraData = needExtras ? this.getVerticesData(VertexBuffer.MatricesWeightsExtraKind) : null;\n const skeletonMatrices = this.skeleton.getTransformMatrices(this);\n const tempVector = TmpVectors.Vector3[0];\n const finalMatrix = TmpVectors.Matrix[0];\n const tempMatrix = TmpVectors.Matrix[1];\n let matWeightIdx = 0;\n for (let index = 0; index < data.length; index += 3, matWeightIdx += 4) {\n finalMatrix.reset();\n let inf;\n let weight;\n for (inf = 0; inf < 4; inf++) {\n weight = matricesWeightsData[matWeightIdx + inf];\n if (weight > 0) {\n Matrix.FromFloat32ArrayToRefScaled(skeletonMatrices, Math.floor(matricesIndicesData[matWeightIdx + inf] * 16), weight, tempMatrix);\n finalMatrix.addToSelf(tempMatrix);\n }\n }\n if (needExtras) {\n for (inf = 0; inf < 4; inf++) {\n weight = matricesWeightsExtraData[matWeightIdx + inf];\n if (weight > 0) {\n Matrix.FromFloat32ArrayToRefScaled(skeletonMatrices, Math.floor(matricesIndicesExtraData[matWeightIdx + inf] * 16), weight, tempMatrix);\n finalMatrix.addToSelf(tempMatrix);\n }\n }\n }\n if (kind === VertexBuffer.NormalKind) {\n Vector3.TransformNormalFromFloatsToRef(data[index], data[index + 1], data[index + 2], finalMatrix, tempVector);\n }\n else {\n Vector3.TransformCoordinatesFromFloatsToRef(data[index], data[index + 1], data[index + 2], finalMatrix, tempVector);\n }\n tempVector.toArray(data, index);\n if (kind === VertexBuffer.PositionKind && this._positions) {\n this._positions[index / 3].copyFrom(tempVector);\n }\n }\n }\n }\n return data;\n }\n /**\n * Get the normals vertex data and optionally apply skeleton and morphing.\n * @param applySkeleton defines whether to apply the skeleton\n * @param applyMorph defines whether to apply the morph target\n * @returns the normals data\n */\n getNormalsData(applySkeleton = false, applyMorph = false) {\n return this._getData(applySkeleton, applyMorph, null, VertexBuffer.NormalKind);\n }\n /**\n * Get the position vertex data and optionally apply skeleton and morphing.\n * @param applySkeleton defines whether to apply the skeleton\n * @param applyMorph defines whether to apply the morph target\n * @param data defines the position data to apply the skeleton and morph to\n * @returns the position data\n */\n getPositionData(applySkeleton = false, applyMorph = false, data) {\n return this._getData(applySkeleton, applyMorph, data, VertexBuffer.PositionKind);\n }\n /**\n * @internal\n */\n _getPositionData(applySkeleton, applyMorph) {\n var _a;\n let data = this.getVerticesData(VertexBuffer.PositionKind);\n if (this._internalAbstractMeshDataInfo._positions) {\n this._internalAbstractMeshDataInfo._positions = null;\n }\n if (data && ((applySkeleton && this.skeleton) || (applyMorph && this.morphTargetManager))) {\n data = data.slice();\n this._generatePointsArray();\n if (this._positions) {\n const pos = this._positions;\n this._internalAbstractMeshDataInfo._positions = new Array(pos.length);\n for (let i = 0; i < pos.length; i++) {\n this._internalAbstractMeshDataInfo._positions[i] = ((_a = pos[i]) === null || _a === void 0 ? void 0 : _a.clone()) || new Vector3();\n }\n }\n return this.getPositionData(applySkeleton, applyMorph, data);\n }\n return data;\n }\n /** @internal */\n _updateBoundingInfo() {\n if (this._boundingInfo) {\n this._boundingInfo.update(this.worldMatrixFromCache);\n }\n else {\n this._boundingInfo = new BoundingInfo(Vector3.Zero(), Vector3.Zero(), this.worldMatrixFromCache);\n }\n this._updateSubMeshesBoundingInfo(this.worldMatrixFromCache);\n return this;\n }\n /**\n * @internal\n */\n _updateSubMeshesBoundingInfo(matrix) {\n if (!this.subMeshes) {\n return this;\n }\n const count = this.subMeshes.length;\n for (let subIndex = 0; subIndex < count; subIndex++) {\n const subMesh = this.subMeshes[subIndex];\n if (count > 1 || !subMesh.IsGlobal) {\n subMesh.updateBoundingInfo(matrix);\n }\n }\n return this;\n }\n /** @internal */\n _afterComputeWorldMatrix() {\n if (this.doNotSyncBoundingInfo) {\n return;\n }\n // Bounding info\n this._boundingInfoIsDirty = true;\n }\n /**\n * Returns `true` if the mesh is within the frustum defined by the passed array of planes.\n * A mesh is in the frustum if its bounding box intersects the frustum\n * @param frustumPlanes defines the frustum to test\n * @returns true if the mesh is in the frustum planes\n */\n isInFrustum(frustumPlanes) {\n return this.getBoundingInfo().isInFrustum(frustumPlanes, this.cullingStrategy);\n }\n /**\n * Returns `true` if the mesh is completely in the frustum defined be the passed array of planes.\n * A mesh is completely in the frustum if its bounding box it completely inside the frustum.\n * @param frustumPlanes defines the frustum to test\n * @returns true if the mesh is completely in the frustum planes\n */\n isCompletelyInFrustum(frustumPlanes) {\n return this.getBoundingInfo().isCompletelyInFrustum(frustumPlanes);\n }\n /**\n * True if the mesh intersects another mesh or a SolidParticle object\n * @param mesh defines a target mesh or SolidParticle to test\n * @param precise Unless the parameter `precise` is set to `true` the intersection is computed according to Axis Aligned Bounding Boxes (AABB), else according to OBB (Oriented BBoxes)\n * @param includeDescendants Can be set to true to test if the mesh defined in parameters intersects with the current mesh or any child meshes\n * @returns true if there is an intersection\n */\n intersectsMesh(mesh, precise = false, includeDescendants) {\n const boundingInfo = this.getBoundingInfo();\n const otherBoundingInfo = mesh.getBoundingInfo();\n if (boundingInfo.intersects(otherBoundingInfo, precise)) {\n return true;\n }\n if (includeDescendants) {\n for (const child of this.getChildMeshes()) {\n if (child.intersectsMesh(mesh, precise, true)) {\n return true;\n }\n }\n }\n return false;\n }\n /**\n * Returns true if the passed point (Vector3) is inside the mesh bounding box\n * @param point defines the point to test\n * @returns true if there is an intersection\n */\n intersectsPoint(point) {\n return this.getBoundingInfo().intersectsPoint(point);\n }\n // Collisions\n /**\n * Gets or sets a boolean indicating that this mesh can be used in the collision engine\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions\n */\n get checkCollisions() {\n return this._internalAbstractMeshDataInfo._meshCollisionData._checkCollisions;\n }\n set checkCollisions(collisionEnabled) {\n this._internalAbstractMeshDataInfo._meshCollisionData._checkCollisions = collisionEnabled;\n }\n /**\n * Gets Collider object used to compute collisions (not physics)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions\n */\n get collider() {\n return this._internalAbstractMeshDataInfo._meshCollisionData._collider;\n }\n /**\n * Move the mesh using collision engine\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions\n * @param displacement defines the requested displacement vector\n * @returns the current mesh\n */\n moveWithCollisions(displacement) {\n const globalPosition = this.getAbsolutePosition();\n globalPosition.addToRef(this.ellipsoidOffset, this._internalAbstractMeshDataInfo._meshCollisionData._oldPositionForCollisions);\n const coordinator = this.getScene().collisionCoordinator;\n if (!this._internalAbstractMeshDataInfo._meshCollisionData._collider) {\n this._internalAbstractMeshDataInfo._meshCollisionData._collider = coordinator.createCollider();\n }\n this._internalAbstractMeshDataInfo._meshCollisionData._collider._radius = this.ellipsoid;\n coordinator.getNewPosition(this._internalAbstractMeshDataInfo._meshCollisionData._oldPositionForCollisions, displacement, this._internalAbstractMeshDataInfo._meshCollisionData._collider, this.collisionRetryCount, this, this._onCollisionPositionChange, this.uniqueId);\n return this;\n }\n // Collisions\n /**\n * @internal\n */\n _collideForSubMesh(subMesh, transformMatrix, collider) {\n var _a;\n this._generatePointsArray();\n if (!this._positions) {\n return this;\n }\n // Transformation\n if (!subMesh._lastColliderWorldVertices || !subMesh._lastColliderTransformMatrix.equals(transformMatrix)) {\n subMesh._lastColliderTransformMatrix = transformMatrix.clone();\n subMesh._lastColliderWorldVertices = [];\n subMesh._trianglePlanes = [];\n const start = subMesh.verticesStart;\n const end = subMesh.verticesStart + subMesh.verticesCount;\n for (let i = start; i < end; i++) {\n subMesh._lastColliderWorldVertices.push(Vector3.TransformCoordinates(this._positions[i], transformMatrix));\n }\n }\n // Collide\n collider._collide(subMesh._trianglePlanes, subMesh._lastColliderWorldVertices, this.getIndices(), subMesh.indexStart, subMesh.indexStart + subMesh.indexCount, subMesh.verticesStart, !!subMesh.getMaterial(), this, this._shouldConvertRHS(), ((_a = subMesh.getMaterial()) === null || _a === void 0 ? void 0 : _a.fillMode) === 7);\n return this;\n }\n /**\n * @internal\n */\n _processCollisionsForSubMeshes(collider, transformMatrix) {\n const subMeshes = this._scene.getCollidingSubMeshCandidates(this, collider);\n const len = subMeshes.length;\n for (let index = 0; index < len; index++) {\n const subMesh = subMeshes.data[index];\n // Bounding test\n if (len > 1 && !subMesh._checkCollision(collider)) {\n continue;\n }\n this._collideForSubMesh(subMesh, transformMatrix, collider);\n }\n return this;\n }\n /** @internal */\n _shouldConvertRHS() {\n return false;\n }\n /**\n * @internal\n */\n _checkCollision(collider) {\n // Bounding box test\n if (!this.getBoundingInfo()._checkCollision(collider)) {\n return this;\n }\n // Transformation matrix\n const collisionsScalingMatrix = TmpVectors.Matrix[0];\n const collisionsTransformMatrix = TmpVectors.Matrix[1];\n Matrix.ScalingToRef(1.0 / collider._radius.x, 1.0 / collider._radius.y, 1.0 / collider._radius.z, collisionsScalingMatrix);\n this.worldMatrixFromCache.multiplyToRef(collisionsScalingMatrix, collisionsTransformMatrix);\n this._processCollisionsForSubMeshes(collider, collisionsTransformMatrix);\n return this;\n }\n // Picking\n /** @internal */\n _generatePointsArray() {\n return false;\n }\n /**\n * Checks if the passed Ray intersects with the mesh. A mesh triangle can be picked both from its front and back sides,\n * irrespective of orientation.\n * @param ray defines the ray to use. It should be in the mesh's LOCAL coordinate space.\n * @param fastCheck defines if fast mode (but less precise) must be used (false by default)\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)\n * @param worldToUse defines the world matrix to use to get the world coordinate of the intersection point\n * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check\n * @returns the picking info\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/interactions/mesh_intersect\n */\n intersects(ray, fastCheck, trianglePredicate, onlyBoundingInfo = false, worldToUse, skipBoundingInfo = false) {\n const pickingInfo = new PickingInfo();\n const className = this.getClassName();\n const intersectionThreshold = className === \"InstancedLinesMesh\" || className === \"LinesMesh\" || className === \"GreasedLineMesh\" ? this.intersectionThreshold : 0;\n const boundingInfo = this.getBoundingInfo();\n if (!this.subMeshes) {\n return pickingInfo;\n }\n if (!skipBoundingInfo &&\n (!ray.intersectsSphere(boundingInfo.boundingSphere, intersectionThreshold) || !ray.intersectsBox(boundingInfo.boundingBox, intersectionThreshold))) {\n return pickingInfo;\n }\n if (onlyBoundingInfo) {\n pickingInfo.hit = skipBoundingInfo ? false : true;\n pickingInfo.pickedMesh = skipBoundingInfo ? null : this;\n pickingInfo.distance = skipBoundingInfo ? 0 : Vector3.Distance(ray.origin, boundingInfo.boundingSphere.center);\n pickingInfo.subMeshId = 0;\n return pickingInfo;\n }\n if (!this._generatePointsArray()) {\n return pickingInfo;\n }\n let intersectInfo = null;\n const subMeshes = this._scene.getIntersectingSubMeshCandidates(this, ray);\n const len = subMeshes.length;\n // Check if all submeshes are using a material that don't allow picking (point/lines rendering)\n // if no submesh can be picked that way, then fallback to BBox picking\n let anySubmeshSupportIntersect = false;\n for (let index = 0; index < len; index++) {\n const subMesh = subMeshes.data[index];\n const material = subMesh.getMaterial();\n if (!material) {\n continue;\n }\n if (material.fillMode == 7 ||\n material.fillMode == 0 ||\n material.fillMode == 1 ||\n material.fillMode == 2 ||\n material.fillMode == 4) {\n anySubmeshSupportIntersect = true;\n break;\n }\n }\n // no sub mesh support intersection, fallback to BBox that has already be done\n if (!anySubmeshSupportIntersect) {\n pickingInfo.hit = true;\n pickingInfo.pickedMesh = this;\n pickingInfo.distance = Vector3.Distance(ray.origin, boundingInfo.boundingSphere.center);\n pickingInfo.subMeshId = -1;\n return pickingInfo;\n }\n // at least 1 submesh supports intersection, keep going\n for (let index = 0; index < len; index++) {\n const subMesh = subMeshes.data[index];\n // Bounding test\n if (len > 1 && !skipBoundingInfo && !subMesh.canIntersects(ray)) {\n continue;\n }\n const currentIntersectInfo = subMesh.intersects(ray, this._positions, this.getIndices(), fastCheck, trianglePredicate);\n if (currentIntersectInfo) {\n if (fastCheck || !intersectInfo || currentIntersectInfo.distance < intersectInfo.distance) {\n intersectInfo = currentIntersectInfo;\n intersectInfo.subMeshId = index;\n if (fastCheck) {\n break;\n }\n }\n }\n }\n if (intersectInfo) {\n // Get picked point\n const world = worldToUse !== null && worldToUse !== void 0 ? worldToUse : this.getWorldMatrix();\n const worldOrigin = TmpVectors.Vector3[0];\n const direction = TmpVectors.Vector3[1];\n Vector3.TransformCoordinatesToRef(ray.origin, world, worldOrigin);\n ray.direction.scaleToRef(intersectInfo.distance, direction);\n const worldDirection = Vector3.TransformNormal(direction, world);\n const pickedPoint = worldDirection.addInPlace(worldOrigin);\n // Return result\n pickingInfo.hit = true;\n pickingInfo.distance = Vector3.Distance(worldOrigin, pickedPoint);\n pickingInfo.pickedPoint = pickedPoint;\n pickingInfo.pickedMesh = this;\n pickingInfo.bu = intersectInfo.bu || 0;\n pickingInfo.bv = intersectInfo.bv || 0;\n pickingInfo.subMeshFaceId = intersectInfo.faceId;\n pickingInfo.faceId = intersectInfo.faceId + subMeshes.data[intersectInfo.subMeshId].indexStart / (this.getClassName().indexOf(\"LinesMesh\") !== -1 ? 2 : 3);\n pickingInfo.subMeshId = intersectInfo.subMeshId;\n return pickingInfo;\n }\n return pickingInfo;\n }\n /**\n * Clones the current mesh\n * @param name defines the mesh name\n * @param newParent defines the new mesh parent\n * @param doNotCloneChildren defines a boolean indicating that children must not be cloned (false by default)\n * @returns the new mesh\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n clone(name, newParent, doNotCloneChildren) {\n return null;\n }\n /**\n * Disposes all the submeshes of the current meshnp\n * @returns the current mesh\n */\n releaseSubMeshes() {\n if (this.subMeshes) {\n while (this.subMeshes.length) {\n this.subMeshes[0].dispose();\n }\n }\n else {\n this.subMeshes = [];\n }\n return this;\n }\n /**\n * Releases resources associated with this abstract mesh.\n * @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)\n * @param disposeMaterialAndTextures Set to true to also dispose referenced materials and textures (false by default)\n */\n dispose(doNotRecurse, disposeMaterialAndTextures = false) {\n let index;\n const scene = this.getScene();\n // mesh map release.\n if (this._scene.useMaterialMeshMap) {\n // remove from material mesh map id needed\n if (this._internalAbstractMeshDataInfo._material && this._internalAbstractMeshDataInfo._material.meshMap) {\n this._internalAbstractMeshDataInfo._material.meshMap[this.uniqueId] = undefined;\n }\n }\n // Smart Array Retainers.\n scene.freeActiveMeshes();\n scene.freeRenderingGroups();\n if (scene.renderingManager.maintainStateBetweenFrames) {\n scene.renderingManager.restoreDispachedFlags();\n }\n // Action manager\n if (this.actionManager !== undefined && this.actionManager !== null) {\n // If it's the only mesh using the action manager, dispose of it.\n if (!this._scene.meshes.some((m) => m !== this && m.actionManager === this.actionManager)) {\n this.actionManager.dispose();\n }\n this.actionManager = null;\n }\n // Skeleton\n this._internalAbstractMeshDataInfo._skeleton = null;\n if (this._transformMatrixTexture) {\n this._transformMatrixTexture.dispose();\n this._transformMatrixTexture = null;\n }\n // Intersections in progress\n for (index = 0; index < this._intersectionsInProgress.length; index++) {\n const other = this._intersectionsInProgress[index];\n const pos = other._intersectionsInProgress.indexOf(this);\n other._intersectionsInProgress.splice(pos, 1);\n }\n this._intersectionsInProgress.length = 0;\n // Lights\n const lights = scene.lights;\n lights.forEach((light) => {\n let meshIndex = light.includedOnlyMeshes.indexOf(this);\n if (meshIndex !== -1) {\n light.includedOnlyMeshes.splice(meshIndex, 1);\n }\n meshIndex = light.excludedMeshes.indexOf(this);\n if (meshIndex !== -1) {\n light.excludedMeshes.splice(meshIndex, 1);\n }\n // Shadow generators\n const generators = light.getShadowGenerators();\n if (generators) {\n const iterator = generators.values();\n for (let key = iterator.next(); key.done !== true; key = iterator.next()) {\n const generator = key.value;\n const shadowMap = generator.getShadowMap();\n if (shadowMap && shadowMap.renderList) {\n meshIndex = shadowMap.renderList.indexOf(this);\n if (meshIndex !== -1) {\n shadowMap.renderList.splice(meshIndex, 1);\n }\n }\n }\n }\n });\n // SubMeshes\n if (this.getClassName() !== \"InstancedMesh\" || this.getClassName() !== \"InstancedLinesMesh\") {\n this.releaseSubMeshes();\n }\n // Query\n const engine = scene.getEngine();\n if (this._occlusionQuery !== null) {\n this.isOcclusionQueryInProgress = false;\n engine.deleteQuery(this._occlusionQuery);\n this._occlusionQuery = null;\n }\n // Engine\n engine.wipeCaches();\n // Remove from scene\n scene.removeMesh(this);\n if (this._parentContainer) {\n const index = this._parentContainer.meshes.indexOf(this);\n if (index > -1) {\n this._parentContainer.meshes.splice(index, 1);\n }\n this._parentContainer = null;\n }\n if (disposeMaterialAndTextures) {\n if (this.material) {\n if (this.material.getClassName() === \"MultiMaterial\") {\n this.material.dispose(false, true, true);\n }\n else {\n this.material.dispose(false, true);\n }\n }\n }\n if (!doNotRecurse) {\n // Particles\n for (index = 0; index < scene.particleSystems.length; index++) {\n if (scene.particleSystems[index].emitter === this) {\n scene.particleSystems[index].dispose();\n index--;\n }\n }\n }\n // facet data\n if (this._internalAbstractMeshDataInfo._facetData.facetDataEnabled) {\n this.disableFacetData();\n }\n this._uniformBuffer.dispose();\n this.onAfterWorldMatrixUpdateObservable.clear();\n this.onCollideObservable.clear();\n this.onCollisionPositionChangeObservable.clear();\n this.onRebuildObservable.clear();\n super.dispose(doNotRecurse, disposeMaterialAndTextures);\n }\n /**\n * Adds the passed mesh as a child to the current mesh\n * @param mesh defines the child mesh\n * @param preserveScalingSign if true, keep scaling sign of child. Otherwise, scaling sign might change.\n * @returns the current mesh\n */\n addChild(mesh, preserveScalingSign = false) {\n mesh.setParent(this, preserveScalingSign);\n return this;\n }\n /**\n * Removes the passed mesh from the current mesh children list\n * @param mesh defines the child mesh\n * @param preserveScalingSign if true, keep scaling sign of child. Otherwise, scaling sign might change.\n * @returns the current mesh\n */\n removeChild(mesh, preserveScalingSign = false) {\n mesh.setParent(null, preserveScalingSign);\n return this;\n }\n // Facet data\n /** @internal */\n _initFacetData() {\n const data = this._internalAbstractMeshDataInfo._facetData;\n if (!data.facetNormals) {\n data.facetNormals = [];\n }\n if (!data.facetPositions) {\n data.facetPositions = [];\n }\n if (!data.facetPartitioning) {\n data.facetPartitioning = new Array();\n }\n data.facetNb = (this.getIndices().length / 3) | 0;\n data.partitioningSubdivisions = data.partitioningSubdivisions ? data.partitioningSubdivisions : 10; // default nb of partitioning subdivisions = 10\n data.partitioningBBoxRatio = data.partitioningBBoxRatio ? data.partitioningBBoxRatio : 1.01; // default ratio 1.01 = the partitioning is 1% bigger than the bounding box\n for (let f = 0; f < data.facetNb; f++) {\n data.facetNormals[f] = Vector3.Zero();\n data.facetPositions[f] = Vector3.Zero();\n }\n data.facetDataEnabled = true;\n return this;\n }\n /**\n * Updates the mesh facetData arrays and the internal partitioning when the mesh is morphed or updated.\n * This method can be called within the render loop.\n * You don't need to call this method by yourself in the render loop when you update/morph a mesh with the methods CreateXXX() as they automatically manage this computation\n * @returns the current mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n updateFacetData() {\n const data = this._internalAbstractMeshDataInfo._facetData;\n if (!data.facetDataEnabled) {\n this._initFacetData();\n }\n const positions = this.getVerticesData(VertexBuffer.PositionKind);\n const indices = this.getIndices();\n const normals = this.getVerticesData(VertexBuffer.NormalKind);\n const bInfo = this.getBoundingInfo();\n if (data.facetDepthSort && !data.facetDepthSortEnabled) {\n // init arrays, matrix and sort function on first call\n data.facetDepthSortEnabled = true;\n if (indices instanceof Uint16Array) {\n data.depthSortedIndices = new Uint16Array(indices);\n }\n else if (indices instanceof Uint32Array) {\n data.depthSortedIndices = new Uint32Array(indices);\n }\n else {\n let needs32bits = false;\n for (let i = 0; i < indices.length; i++) {\n if (indices[i] > 65535) {\n needs32bits = true;\n break;\n }\n }\n if (needs32bits) {\n data.depthSortedIndices = new Uint32Array(indices);\n }\n else {\n data.depthSortedIndices = new Uint16Array(indices);\n }\n }\n data.facetDepthSortFunction = function (f1, f2) {\n return f2.sqDistance - f1.sqDistance;\n };\n if (!data.facetDepthSortFrom) {\n const camera = this.getScene().activeCamera;\n data.facetDepthSortFrom = camera ? camera.position : Vector3.Zero();\n }\n data.depthSortedFacets = [];\n for (let f = 0; f < data.facetNb; f++) {\n const depthSortedFacet = { ind: f * 3, sqDistance: 0.0 };\n data.depthSortedFacets.push(depthSortedFacet);\n }\n data.invertedMatrix = Matrix.Identity();\n data.facetDepthSortOrigin = Vector3.Zero();\n }\n data.bbSize.x = bInfo.maximum.x - bInfo.minimum.x > Epsilon ? bInfo.maximum.x - bInfo.minimum.x : Epsilon;\n data.bbSize.y = bInfo.maximum.y - bInfo.minimum.y > Epsilon ? bInfo.maximum.y - bInfo.minimum.y : Epsilon;\n data.bbSize.z = bInfo.maximum.z - bInfo.minimum.z > Epsilon ? bInfo.maximum.z - bInfo.minimum.z : Epsilon;\n let bbSizeMax = data.bbSize.x > data.bbSize.y ? data.bbSize.x : data.bbSize.y;\n bbSizeMax = bbSizeMax > data.bbSize.z ? bbSizeMax : data.bbSize.z;\n data.subDiv.max = data.partitioningSubdivisions;\n data.subDiv.X = Math.floor((data.subDiv.max * data.bbSize.x) / bbSizeMax); // adjust the number of subdivisions per axis\n data.subDiv.Y = Math.floor((data.subDiv.max * data.bbSize.y) / bbSizeMax); // according to each bbox size per axis\n data.subDiv.Z = Math.floor((data.subDiv.max * data.bbSize.z) / bbSizeMax);\n data.subDiv.X = data.subDiv.X < 1 ? 1 : data.subDiv.X; // at least one subdivision\n data.subDiv.Y = data.subDiv.Y < 1 ? 1 : data.subDiv.Y;\n data.subDiv.Z = data.subDiv.Z < 1 ? 1 : data.subDiv.Z;\n // set the parameters for ComputeNormals()\n data.facetParameters.facetNormals = this.getFacetLocalNormals();\n data.facetParameters.facetPositions = this.getFacetLocalPositions();\n data.facetParameters.facetPartitioning = this.getFacetLocalPartitioning();\n data.facetParameters.bInfo = bInfo;\n data.facetParameters.bbSize = data.bbSize;\n data.facetParameters.subDiv = data.subDiv;\n data.facetParameters.ratio = this.partitioningBBoxRatio;\n data.facetParameters.depthSort = data.facetDepthSort;\n if (data.facetDepthSort && data.facetDepthSortEnabled) {\n this.computeWorldMatrix(true);\n this._worldMatrix.invertToRef(data.invertedMatrix);\n Vector3.TransformCoordinatesToRef(data.facetDepthSortFrom, data.invertedMatrix, data.facetDepthSortOrigin);\n data.facetParameters.distanceTo = data.facetDepthSortOrigin;\n }\n data.facetParameters.depthSortedFacets = data.depthSortedFacets;\n if (normals) {\n VertexData.ComputeNormals(positions, indices, normals, data.facetParameters);\n }\n if (data.facetDepthSort && data.facetDepthSortEnabled) {\n data.depthSortedFacets.sort(data.facetDepthSortFunction);\n const l = (data.depthSortedIndices.length / 3) | 0;\n for (let f = 0; f < l; f++) {\n const sind = data.depthSortedFacets[f].ind;\n data.depthSortedIndices[f * 3] = indices[sind];\n data.depthSortedIndices[f * 3 + 1] = indices[sind + 1];\n data.depthSortedIndices[f * 3 + 2] = indices[sind + 2];\n }\n this.updateIndices(data.depthSortedIndices, undefined, true);\n }\n return this;\n }\n /**\n * Returns the facetLocalNormals array.\n * The normals are expressed in the mesh local spac\n * @returns an array of Vector3\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n getFacetLocalNormals() {\n const facetData = this._internalAbstractMeshDataInfo._facetData;\n if (!facetData.facetNormals) {\n this.updateFacetData();\n }\n return facetData.facetNormals;\n }\n /**\n * Returns the facetLocalPositions array.\n * The facet positions are expressed in the mesh local space\n * @returns an array of Vector3\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n getFacetLocalPositions() {\n const facetData = this._internalAbstractMeshDataInfo._facetData;\n if (!facetData.facetPositions) {\n this.updateFacetData();\n }\n return facetData.facetPositions;\n }\n /**\n * Returns the facetLocalPartitioning array\n * @returns an array of array of numbers\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n getFacetLocalPartitioning() {\n const facetData = this._internalAbstractMeshDataInfo._facetData;\n if (!facetData.facetPartitioning) {\n this.updateFacetData();\n }\n return facetData.facetPartitioning;\n }\n /**\n * Returns the i-th facet position in the world system.\n * This method allocates a new Vector3 per call\n * @param i defines the facet index\n * @returns a new Vector3\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n getFacetPosition(i) {\n const pos = Vector3.Zero();\n this.getFacetPositionToRef(i, pos);\n return pos;\n }\n /**\n * Sets the reference Vector3 with the i-th facet position in the world system\n * @param i defines the facet index\n * @param ref defines the target vector\n * @returns the current mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n getFacetPositionToRef(i, ref) {\n const localPos = this.getFacetLocalPositions()[i];\n const world = this.getWorldMatrix();\n Vector3.TransformCoordinatesToRef(localPos, world, ref);\n return this;\n }\n /**\n * Returns the i-th facet normal in the world system.\n * This method allocates a new Vector3 per call\n * @param i defines the facet index\n * @returns a new Vector3\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n getFacetNormal(i) {\n const norm = Vector3.Zero();\n this.getFacetNormalToRef(i, norm);\n return norm;\n }\n /**\n * Sets the reference Vector3 with the i-th facet normal in the world system\n * @param i defines the facet index\n * @param ref defines the target vector\n * @returns the current mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n getFacetNormalToRef(i, ref) {\n const localNorm = this.getFacetLocalNormals()[i];\n Vector3.TransformNormalToRef(localNorm, this.getWorldMatrix(), ref);\n return this;\n }\n /**\n * Returns the facets (in an array) in the same partitioning block than the one the passed coordinates are located (expressed in the mesh local system)\n * @param x defines x coordinate\n * @param y defines y coordinate\n * @param z defines z coordinate\n * @returns the array of facet indexes\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n getFacetsAtLocalCoordinates(x, y, z) {\n const bInfo = this.getBoundingInfo();\n const data = this._internalAbstractMeshDataInfo._facetData;\n const ox = Math.floor(((x - bInfo.minimum.x * data.partitioningBBoxRatio) * data.subDiv.X * data.partitioningBBoxRatio) / data.bbSize.x);\n const oy = Math.floor(((y - bInfo.minimum.y * data.partitioningBBoxRatio) * data.subDiv.Y * data.partitioningBBoxRatio) / data.bbSize.y);\n const oz = Math.floor(((z - bInfo.minimum.z * data.partitioningBBoxRatio) * data.subDiv.Z * data.partitioningBBoxRatio) / data.bbSize.z);\n if (ox < 0 || ox > data.subDiv.max || oy < 0 || oy > data.subDiv.max || oz < 0 || oz > data.subDiv.max) {\n return null;\n }\n return data.facetPartitioning[ox + data.subDiv.max * oy + data.subDiv.max * data.subDiv.max * oz];\n }\n /**\n * Returns the closest mesh facet index at (x,y,z) World coordinates, null if not found\n * @param x defines x coordinate\n * @param y defines y coordinate\n * @param z defines z coordinate\n * @param projected sets as the (x,y,z) world projection on the facet\n * @param checkFace if true (default false), only the facet \"facing\" to (x,y,z) or only the ones \"turning their backs\", according to the parameter \"facing\" are returned\n * @param facing if facing and checkFace are true, only the facet \"facing\" to (x, y, z) are returned : positive dot (x, y, z) * facet position. If facing si false and checkFace is true, only the facet \"turning their backs\" to (x, y, z) are returned : negative dot (x, y, z) * facet position\n * @returns the face index if found (or null instead)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n getClosestFacetAtCoordinates(x, y, z, projected, checkFace = false, facing = true) {\n const world = this.getWorldMatrix();\n const invMat = TmpVectors.Matrix[5];\n world.invertToRef(invMat);\n const invVect = TmpVectors.Vector3[8];\n Vector3.TransformCoordinatesFromFloatsToRef(x, y, z, invMat, invVect); // transform (x,y,z) to coordinates in the mesh local space\n const closest = this.getClosestFacetAtLocalCoordinates(invVect.x, invVect.y, invVect.z, projected, checkFace, facing);\n if (projected) {\n // transform the local computed projected vector to world coordinates\n Vector3.TransformCoordinatesFromFloatsToRef(projected.x, projected.y, projected.z, world, projected);\n }\n return closest;\n }\n /**\n * Returns the closest mesh facet index at (x,y,z) local coordinates, null if not found\n * @param x defines x coordinate\n * @param y defines y coordinate\n * @param z defines z coordinate\n * @param projected sets as the (x,y,z) local projection on the facet\n * @param checkFace if true (default false), only the facet \"facing\" to (x,y,z) or only the ones \"turning their backs\", according to the parameter \"facing\" are returned\n * @param facing if facing and checkFace are true, only the facet \"facing\" to (x, y, z) are returned : positive dot (x, y, z) * facet position. If facing si false and checkFace is true, only the facet \"turning their backs\" to (x, y, z) are returned : negative dot (x, y, z) * facet position\n * @returns the face index if found (or null instead)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n getClosestFacetAtLocalCoordinates(x, y, z, projected, checkFace = false, facing = true) {\n let closest = null;\n let tmpx = 0.0;\n let tmpy = 0.0;\n let tmpz = 0.0;\n let d = 0.0; // tmp dot facet normal * facet position\n let t0 = 0.0;\n let projx = 0.0;\n let projy = 0.0;\n let projz = 0.0;\n // Get all the facets in the same partitioning block than (x, y, z)\n const facetPositions = this.getFacetLocalPositions();\n const facetNormals = this.getFacetLocalNormals();\n const facetsInBlock = this.getFacetsAtLocalCoordinates(x, y, z);\n if (!facetsInBlock) {\n return null;\n }\n // Get the closest facet to (x, y, z)\n let shortest = Number.MAX_VALUE; // init distance vars\n let tmpDistance = shortest;\n let fib; // current facet in the block\n let norm; // current facet normal\n let p0; // current facet barycenter position\n // loop on all the facets in the current partitioning block\n for (let idx = 0; idx < facetsInBlock.length; idx++) {\n fib = facetsInBlock[idx];\n norm = facetNormals[fib];\n p0 = facetPositions[fib];\n d = (x - p0.x) * norm.x + (y - p0.y) * norm.y + (z - p0.z) * norm.z;\n if (!checkFace || (checkFace && facing && d >= 0.0) || (checkFace && !facing && d <= 0.0)) {\n // compute (x,y,z) projection on the facet = (projx, projy, projz)\n d = norm.x * p0.x + norm.y * p0.y + norm.z * p0.z;\n t0 = -(norm.x * x + norm.y * y + norm.z * z - d) / (norm.x * norm.x + norm.y * norm.y + norm.z * norm.z);\n projx = x + norm.x * t0;\n projy = y + norm.y * t0;\n projz = z + norm.z * t0;\n tmpx = projx - x;\n tmpy = projy - y;\n tmpz = projz - z;\n tmpDistance = tmpx * tmpx + tmpy * tmpy + tmpz * tmpz; // compute length between (x, y, z) and its projection on the facet\n if (tmpDistance < shortest) {\n // just keep the closest facet to (x, y, z)\n shortest = tmpDistance;\n closest = fib;\n if (projected) {\n projected.x = projx;\n projected.y = projy;\n projected.z = projz;\n }\n }\n }\n }\n return closest;\n }\n /**\n * Returns the object \"parameter\" set with all the expected parameters for facetData computation by ComputeNormals()\n * @returns the parameters\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n getFacetDataParameters() {\n return this._internalAbstractMeshDataInfo._facetData.facetParameters;\n }\n /**\n * Disables the feature FacetData and frees the related memory\n * @returns the current mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData\n */\n disableFacetData() {\n const facetData = this._internalAbstractMeshDataInfo._facetData;\n if (facetData.facetDataEnabled) {\n facetData.facetDataEnabled = false;\n facetData.facetPositions = [];\n facetData.facetNormals = [];\n facetData.facetPartitioning = new Array();\n facetData.facetParameters = null;\n facetData.depthSortedIndices = new Uint32Array(0);\n }\n return this;\n }\n /**\n * Updates the AbstractMesh indices array\n * @param indices defines the data source\n * @param offset defines the offset in the index buffer where to store the new data (can be null)\n * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)\n * @returns the current mesh\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n updateIndices(indices, offset, gpuMemoryOnly = false) {\n return this;\n }\n /**\n * Creates new normals data for the mesh\n * @param updatable defines if the normal vertex buffer must be flagged as updatable\n * @returns the current mesh\n */\n createNormals(updatable) {\n const positions = this.getVerticesData(VertexBuffer.PositionKind);\n const indices = this.getIndices();\n let normals;\n if (this.isVerticesDataPresent(VertexBuffer.NormalKind)) {\n normals = this.getVerticesData(VertexBuffer.NormalKind);\n }\n else {\n normals = [];\n }\n VertexData.ComputeNormals(positions, indices, normals, { useRightHandedSystem: this.getScene().useRightHandedSystem });\n this.setVerticesData(VertexBuffer.NormalKind, normals, updatable);\n return this;\n }\n /**\n * Align the mesh with a normal\n * @param normal defines the normal to use\n * @param upDirection can be used to redefined the up vector to use (will use the (0, 1, 0) by default)\n * @returns the current mesh\n */\n alignWithNormal(normal, upDirection) {\n if (!upDirection) {\n upDirection = Axis.Y;\n }\n const axisX = TmpVectors.Vector3[0];\n const axisZ = TmpVectors.Vector3[1];\n Vector3.CrossToRef(upDirection, normal, axisZ);\n Vector3.CrossToRef(normal, axisZ, axisX);\n if (this.rotationQuaternion) {\n Quaternion.RotationQuaternionFromAxisToRef(axisX, normal, axisZ, this.rotationQuaternion);\n }\n else {\n Vector3.RotationFromAxisToRef(axisX, normal, axisZ, this.rotation);\n }\n return this;\n }\n /** @internal */\n _checkOcclusionQuery() {\n // Will be replaced by correct code if Occlusion queries are referenced\n return false;\n }\n /**\n * Disables the mesh edge rendering mode\n * @returns the currentAbstractMesh\n */\n disableEdgesRendering() {\n throw _WarnImport(\"EdgesRenderer\");\n }\n /**\n * Enables the edge rendering mode on the mesh.\n * This mode makes the mesh edges visible\n * @param epsilon defines the maximal distance between two angles to detect a face\n * @param checkVerticesInsteadOfIndices indicates that we should check vertex list directly instead of faces\n * @param options options to the edge renderer\n * @returns the currentAbstractMesh\n * @see https://www.babylonjs-playground.com/#19O9TU#0\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n enableEdgesRendering(epsilon, checkVerticesInsteadOfIndices, options) {\n throw _WarnImport(\"EdgesRenderer\");\n }\n /**\n * This function returns all of the particle systems in the scene that use the mesh as an emitter.\n * @returns an array of particle systems in the scene that use the mesh as an emitter\n */\n getConnectedParticleSystems() {\n return this._scene.particleSystems.filter((particleSystem) => particleSystem.emitter === this);\n }\n}\n/** No occlusion */\nAbstractMesh.OCCLUSION_TYPE_NONE = 0;\n/** Occlusion set to optimistic */\nAbstractMesh.OCCLUSION_TYPE_OPTIMISTIC = 1;\n/** Occlusion set to strict */\nAbstractMesh.OCCLUSION_TYPE_STRICT = 2;\n/** Use an accurate occlusion algorithm */\nAbstractMesh.OCCLUSION_ALGORITHM_TYPE_ACCURATE = 0;\n/** Use a conservative occlusion algorithm */\nAbstractMesh.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE = 1;\n/** Default culling strategy : this is an exclusion test and it's the more accurate.\n * Test order :\n * Is the bounding sphere outside the frustum ?\n * If not, are the bounding box vertices outside the frustum ?\n * It not, then the cullable object is in the frustum.\n */\nAbstractMesh.CULLINGSTRATEGY_STANDARD = 0;\n/** Culling strategy : Bounding Sphere Only.\n * This is an exclusion test. It's faster than the standard strategy because the bounding box is not tested.\n * It's also less accurate than the standard because some not visible objects can still be selected.\n * Test : is the bounding sphere outside the frustum ?\n * If not, then the cullable object is in the frustum.\n */\nAbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY = 1;\n/** Culling strategy : Optimistic Inclusion.\n * This in an inclusion test first, then the standard exclusion test.\n * This can be faster when a cullable object is expected to be almost always in the camera frustum.\n * This could also be a little slower than the standard test when the tested object center is not the frustum but one of its bounding box vertex is still inside.\n * Anyway, it's as accurate as the standard strategy.\n * Test :\n * Is the cullable object bounding sphere center in the frustum ?\n * If not, apply the default culling strategy.\n */\nAbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION = 2;\n/** Culling strategy : Optimistic Inclusion then Bounding Sphere Only.\n * This in an inclusion test first, then the bounding sphere only exclusion test.\n * This can be the fastest test when a cullable object is expected to be almost always in the camera frustum.\n * This could also be a little slower than the BoundingSphereOnly strategy when the tested object center is not in the frustum but its bounding sphere still intersects it.\n * It's less accurate than the standard strategy and as accurate as the BoundingSphereOnly strategy.\n * Test :\n * Is the cullable object bounding sphere center in the frustum ?\n * If not, apply the Bounding Sphere Only strategy. No Bounding Box is tested here.\n */\nAbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY = 3;\nRegisterClass(\"BABYLON.AbstractMesh\", AbstractMesh);\n//# sourceMappingURL=abstractMesh.js.map","\n/**\n * Class used to represent data loading progression\n */\nexport class SceneLoaderFlags {\n /**\n * Gets or sets a boolean indicating if entire scene must be loaded even if scene contains incremental data\n */\n static get ForceFullSceneLoadingForIncremental() {\n return SceneLoaderFlags._ForceFullSceneLoadingForIncremental;\n }\n static set ForceFullSceneLoadingForIncremental(value) {\n SceneLoaderFlags._ForceFullSceneLoadingForIncremental = value;\n }\n /**\n * Gets or sets a boolean indicating if loading screen must be displayed while loading a scene\n */\n static get ShowLoadingScreen() {\n return SceneLoaderFlags._ShowLoadingScreen;\n }\n static set ShowLoadingScreen(value) {\n SceneLoaderFlags._ShowLoadingScreen = value;\n }\n /**\n * Defines the current logging level (while loading the scene)\n * @ignorenaming\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static get loggingLevel() {\n return SceneLoaderFlags._LoggingLevel;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static set loggingLevel(value) {\n SceneLoaderFlags._LoggingLevel = value;\n }\n /**\n * Gets or set a boolean indicating if matrix weights must be cleaned upon loading\n */\n static get CleanBoneMatrixWeights() {\n return SceneLoaderFlags._CleanBoneMatrixWeights;\n }\n static set CleanBoneMatrixWeights(value) {\n SceneLoaderFlags._CleanBoneMatrixWeights = value;\n }\n}\n// Flags\nSceneLoaderFlags._ForceFullSceneLoadingForIncremental = false;\nSceneLoaderFlags._ShowLoadingScreen = true;\nSceneLoaderFlags._CleanBoneMatrixWeights = false;\nSceneLoaderFlags._LoggingLevel = 0;\n//# sourceMappingURL=sceneLoaderFlags.js.map","import { Vector3 } from \"../Maths/math.vector.js\";\nimport { Color4 } from \"../Maths/math.color.js\";\nimport { VertexData } from \"../Meshes/mesh.vertexData.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { SubMesh } from \"../Meshes/subMesh.js\";\nimport { SceneLoaderFlags } from \"../Loading/sceneLoaderFlags.js\";\nimport { BoundingInfo } from \"../Culling/boundingInfo.js\";\n\nimport { Tools } from \"../Misc/tools.js\";\nimport { Tags } from \"../Misc/tags.js\";\nimport { extractMinAndMax } from \"../Maths/math.functions.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { CompatibilityOptions } from \"../Compat/compatibilityOptions.js\";\n/**\n * Class used to store geometry data (vertex buffers + index buffer)\n */\nexport class Geometry {\n /**\n * Gets or sets the Bias Vector to apply on the bounding elements (box/sphere), the max extend is computed as v += v * bias.x + bias.y, the min is computed as v -= v * bias.x + bias.y\n */\n get boundingBias() {\n return this._boundingBias;\n }\n /**\n * Gets or sets the Bias Vector to apply on the bounding elements (box/sphere), the max extend is computed as v += v * bias.x + bias.y, the min is computed as v -= v * bias.x + bias.y\n */\n set boundingBias(value) {\n if (this._boundingBias) {\n this._boundingBias.copyFrom(value);\n }\n else {\n this._boundingBias = value.clone();\n }\n this._updateBoundingInfo(true, null);\n }\n /**\n * Static function used to attach a new empty geometry to a mesh\n * @param mesh defines the mesh to attach the geometry to\n * @returns the new Geometry\n */\n static CreateGeometryForMesh(mesh) {\n const geometry = new Geometry(Geometry.RandomId(), mesh.getScene());\n geometry.applyToMesh(mesh);\n return geometry;\n }\n /** Get the list of meshes using this geometry */\n get meshes() {\n return this._meshes;\n }\n /**\n * Creates a new geometry\n * @param id defines the unique ID\n * @param scene defines the hosting scene\n * @param vertexData defines the VertexData used to get geometry data\n * @param updatable defines if geometry must be updatable (false by default)\n * @param mesh defines the mesh that will be associated with the geometry\n */\n constructor(id, scene, vertexData, updatable = false, mesh = null) {\n /**\n * Gets the delay loading state of the geometry (none by default which means not delayed)\n */\n this.delayLoadState = 0;\n this._totalVertices = 0;\n this._isDisposed = false;\n this._indexBufferIsUpdatable = false;\n this._positionsCache = [];\n /** @internal */\n this._parentContainer = null;\n /**\n * If set to true (false by default), the bounding info applied to the meshes sharing this geometry will be the bounding info defined at the class level\n * and won't be computed based on the vertex positions (which is what we get when useBoundingInfoFromGeometry = false)\n */\n this.useBoundingInfoFromGeometry = false;\n this._scene = scene || EngineStore.LastCreatedScene;\n if (!this._scene) {\n return;\n }\n this.id = id;\n this.uniqueId = this._scene.getUniqueId();\n this._engine = this._scene.getEngine();\n this._meshes = [];\n //Init vertex buffer cache\n this._vertexBuffers = {};\n this._indices = [];\n this._updatable = updatable;\n // vertexData\n if (vertexData) {\n this.setAllVerticesData(vertexData, updatable);\n }\n else {\n this._totalVertices = 0;\n }\n if (this._engine.getCaps().vertexArrayObject) {\n this._vertexArrayObjects = {};\n }\n // applyToMesh\n if (mesh) {\n this.applyToMesh(mesh);\n mesh.computeWorldMatrix(true);\n }\n }\n /**\n * Gets the current extend of the geometry\n */\n get extend() {\n return this._extend;\n }\n /**\n * Gets the hosting scene\n * @returns the hosting Scene\n */\n getScene() {\n return this._scene;\n }\n /**\n * Gets the hosting engine\n * @returns the hosting Engine\n */\n getEngine() {\n return this._engine;\n }\n /**\n * Defines if the geometry is ready to use\n * @returns true if the geometry is ready to be used\n */\n isReady() {\n return this.delayLoadState === 1 || this.delayLoadState === 0;\n }\n /**\n * Gets a value indicating that the geometry should not be serialized\n */\n get doNotSerialize() {\n for (let index = 0; index < this._meshes.length; index++) {\n if (!this._meshes[index].doNotSerialize) {\n return false;\n }\n }\n return true;\n }\n /** @internal */\n _rebuild() {\n if (this._vertexArrayObjects) {\n this._vertexArrayObjects = {};\n }\n // Index buffer\n if (this._meshes.length !== 0 && this._indices) {\n this._indexBuffer = this._engine.createIndexBuffer(this._indices, this._updatable);\n }\n // Vertex buffers\n for (const key in this._vertexBuffers) {\n const vertexBuffer = this._vertexBuffers[key];\n vertexBuffer._rebuild();\n }\n }\n /**\n * Affects all geometry data in one call\n * @param vertexData defines the geometry data\n * @param updatable defines if the geometry must be flagged as updatable (false as default)\n */\n setAllVerticesData(vertexData, updatable) {\n vertexData.applyToGeometry(this, updatable);\n this._notifyUpdate();\n }\n /**\n * Set specific vertex data\n * @param kind defines the data kind (Position, normal, etc...)\n * @param data defines the vertex data to use\n * @param updatable defines if the vertex must be flagged as updatable (false as default)\n * @param stride defines the stride to use (0 by default). This value is deduced from the kind value if not specified\n */\n setVerticesData(kind, data, updatable = false, stride) {\n if (updatable && Array.isArray(data)) {\n // to avoid converting to Float32Array at each draw call in engine.updateDynamicVertexBuffer, we make the conversion a single time here\n data = new Float32Array(data);\n }\n const buffer = new VertexBuffer(this._engine, data, kind, {\n updatable,\n postponeInternalCreation: this._meshes.length === 0,\n stride,\n label: \"Geometry_\" + this.id + \"_\" + kind,\n });\n this.setVerticesBuffer(buffer);\n }\n /**\n * Removes a specific vertex data\n * @param kind defines the data kind (Position, normal, etc...)\n */\n removeVerticesData(kind) {\n if (this._vertexBuffers[kind]) {\n this._vertexBuffers[kind].dispose();\n delete this._vertexBuffers[kind];\n }\n if (this._vertexArrayObjects) {\n this._disposeVertexArrayObjects();\n }\n }\n /**\n * Affect a vertex buffer to the geometry. the vertexBuffer.getKind() function is used to determine where to store the data\n * @param buffer defines the vertex buffer to use\n * @param totalVertices defines the total number of vertices for position kind (could be null)\n * @param disposeExistingBuffer disposes the existing buffer, if any (default: true)\n */\n setVerticesBuffer(buffer, totalVertices = null, disposeExistingBuffer = true) {\n const kind = buffer.getKind();\n if (this._vertexBuffers[kind] && disposeExistingBuffer) {\n this._vertexBuffers[kind].dispose();\n }\n if (buffer._buffer) {\n buffer._buffer._increaseReferences();\n }\n this._vertexBuffers[kind] = buffer;\n const meshes = this._meshes;\n const numOfMeshes = meshes.length;\n if (kind === VertexBuffer.PositionKind) {\n this._totalVertices = totalVertices !== null && totalVertices !== void 0 ? totalVertices : buffer.totalVertices;\n this._updateExtend(buffer.getFloatData());\n this._resetPointsArrayCache();\n // this._extend can be empty if buffer.getFloatData() returned null\n const minimum = (this._extend && this._extend.minimum) || new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\n const maximum = (this._extend && this._extend.maximum) || new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n for (let index = 0; index < numOfMeshes; index++) {\n const mesh = meshes[index];\n mesh.buildBoundingInfo(minimum, maximum);\n mesh._createGlobalSubMesh(mesh.isUnIndexed);\n mesh.computeWorldMatrix(true);\n mesh.synchronizeInstances();\n }\n }\n this._notifyUpdate(kind);\n }\n /**\n * Update a specific vertex buffer\n * This function will directly update the underlying DataBuffer according to the passed numeric array or Float32Array\n * It will do nothing if the buffer is not updatable\n * @param kind defines the data kind (Position, normal, etc...)\n * @param data defines the data to use\n * @param offset defines the offset in the target buffer where to store the data\n * @param useBytes set to true if the offset is in bytes\n */\n updateVerticesDataDirectly(kind, data, offset, useBytes = false) {\n const vertexBuffer = this.getVertexBuffer(kind);\n if (!vertexBuffer) {\n return;\n }\n vertexBuffer.updateDirectly(data, offset, useBytes);\n this._notifyUpdate(kind);\n }\n /**\n * Update a specific vertex buffer\n * This function will create a new buffer if the current one is not updatable\n * @param kind defines the data kind (Position, normal, etc...)\n * @param data defines the data to use\n * @param updateExtends defines if the geometry extends must be recomputed (false by default)\n */\n updateVerticesData(kind, data, updateExtends = false) {\n const vertexBuffer = this.getVertexBuffer(kind);\n if (!vertexBuffer) {\n return;\n }\n vertexBuffer.update(data);\n if (kind === VertexBuffer.PositionKind) {\n this._updateBoundingInfo(updateExtends, data);\n }\n this._notifyUpdate(kind);\n }\n _updateBoundingInfo(updateExtends, data) {\n if (updateExtends) {\n this._updateExtend(data);\n }\n this._resetPointsArrayCache();\n if (updateExtends) {\n const meshes = this._meshes;\n for (const mesh of meshes) {\n if (mesh.hasBoundingInfo) {\n mesh.getBoundingInfo().reConstruct(this._extend.minimum, this._extend.maximum);\n }\n else {\n mesh.buildBoundingInfo(this._extend.minimum, this._extend.maximum);\n }\n const subMeshes = mesh.subMeshes;\n for (const subMesh of subMeshes) {\n subMesh.refreshBoundingInfo();\n }\n }\n }\n }\n /**\n * @internal\n */\n _bind(effect, indexToBind, overrideVertexBuffers, overrideVertexArrayObjects) {\n if (!effect) {\n return;\n }\n if (indexToBind === undefined) {\n indexToBind = this._indexBuffer;\n }\n const vbs = this.getVertexBuffers();\n if (!vbs) {\n return;\n }\n if (indexToBind != this._indexBuffer || (!this._vertexArrayObjects && !overrideVertexArrayObjects)) {\n this._engine.bindBuffers(vbs, indexToBind, effect, overrideVertexBuffers);\n return;\n }\n const vaos = overrideVertexArrayObjects ? overrideVertexArrayObjects : this._vertexArrayObjects;\n // Using VAO\n if (!vaos[effect.key]) {\n vaos[effect.key] = this._engine.recordVertexArrayObject(vbs, indexToBind, effect, overrideVertexBuffers);\n }\n this._engine.bindVertexArrayObject(vaos[effect.key], indexToBind);\n }\n /**\n * Gets total number of vertices\n * @returns the total number of vertices\n */\n getTotalVertices() {\n if (!this.isReady()) {\n return 0;\n }\n return this._totalVertices;\n }\n /**\n * Gets a specific vertex data attached to this geometry. Float data is constructed if the vertex buffer data cannot be returned directly.\n * @param kind defines the data kind (Position, normal, etc...)\n * @param copyWhenShared defines if the returned array must be cloned upon returning it if the current geometry is shared between multiple meshes\n * @param forceCopy defines a boolean indicating that the returned array must be cloned upon returning it\n * @returns a float array containing vertex data\n */\n getVerticesData(kind, copyWhenShared, forceCopy) {\n const vertexBuffer = this.getVertexBuffer(kind);\n if (!vertexBuffer) {\n return null;\n }\n return vertexBuffer.getFloatData(this._totalVertices, forceCopy || (copyWhenShared && this._meshes.length !== 1));\n }\n /**\n * Returns a boolean defining if the vertex data for the requested `kind` is updatable\n * @param kind defines the data kind (Position, normal, etc...)\n * @returns true if the vertex buffer with the specified kind is updatable\n */\n isVertexBufferUpdatable(kind) {\n const vb = this._vertexBuffers[kind];\n if (!vb) {\n return false;\n }\n return vb.isUpdatable();\n }\n /**\n * Gets a specific vertex buffer\n * @param kind defines the data kind (Position, normal, etc...)\n * @returns a VertexBuffer\n */\n getVertexBuffer(kind) {\n if (!this.isReady()) {\n return null;\n }\n return this._vertexBuffers[kind];\n }\n /**\n * Returns all vertex buffers\n * @returns an object holding all vertex buffers indexed by kind\n */\n getVertexBuffers() {\n if (!this.isReady()) {\n return null;\n }\n return this._vertexBuffers;\n }\n /**\n * Gets a boolean indicating if specific vertex buffer is present\n * @param kind defines the data kind (Position, normal, etc...)\n * @returns true if data is present\n */\n isVerticesDataPresent(kind) {\n if (!this._vertexBuffers) {\n if (this._delayInfo) {\n return this._delayInfo.indexOf(kind) !== -1;\n }\n return false;\n }\n return this._vertexBuffers[kind] !== undefined;\n }\n /**\n * Gets a list of all attached data kinds (Position, normal, etc...)\n * @returns a list of string containing all kinds\n */\n getVerticesDataKinds() {\n const result = [];\n let kind;\n if (!this._vertexBuffers && this._delayInfo) {\n for (kind in this._delayInfo) {\n result.push(kind);\n }\n }\n else {\n for (kind in this._vertexBuffers) {\n result.push(kind);\n }\n }\n return result;\n }\n /**\n * Update index buffer\n * @param indices defines the indices to store in the index buffer\n * @param offset defines the offset in the target buffer where to store the data\n * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)\n */\n updateIndices(indices, offset, gpuMemoryOnly = false) {\n if (!this._indexBuffer) {\n return;\n }\n if (!this._indexBufferIsUpdatable) {\n this.setIndices(indices, null, true);\n }\n else {\n const needToUpdateSubMeshes = indices.length !== this._indices.length;\n if (!gpuMemoryOnly) {\n this._indices = indices.slice();\n }\n this._engine.updateDynamicIndexBuffer(this._indexBuffer, indices, offset);\n if (needToUpdateSubMeshes) {\n for (const mesh of this._meshes) {\n mesh._createGlobalSubMesh(true);\n }\n }\n }\n }\n /**\n * Creates a new index buffer\n * @param indices defines the indices to store in the index buffer\n * @param totalVertices defines the total number of vertices (could be null)\n * @param updatable defines if the index buffer must be flagged as updatable (false by default)\n */\n setIndices(indices, totalVertices = null, updatable = false) {\n if (this._indexBuffer) {\n this._engine._releaseBuffer(this._indexBuffer);\n }\n this._indices = indices;\n this._indexBufferIsUpdatable = updatable;\n if (this._meshes.length !== 0 && this._indices) {\n this._indexBuffer = this._engine.createIndexBuffer(this._indices, updatable);\n }\n if (totalVertices != undefined) {\n // including null and undefined\n this._totalVertices = totalVertices;\n }\n for (const mesh of this._meshes) {\n mesh._createGlobalSubMesh(true);\n mesh.synchronizeInstances();\n }\n this._notifyUpdate();\n }\n /**\n * Return the total number of indices\n * @returns the total number of indices\n */\n getTotalIndices() {\n if (!this.isReady()) {\n return 0;\n }\n return this._indices.length;\n }\n /**\n * Gets the index buffer array\n * @param copyWhenShared defines if the returned array must be cloned upon returning it if the current geometry is shared between multiple meshes\n * @param forceCopy defines a boolean indicating that the returned array must be cloned upon returning it\n * @returns the index buffer array\n */\n getIndices(copyWhenShared, forceCopy) {\n if (!this.isReady()) {\n return null;\n }\n const orig = this._indices;\n if (!forceCopy && (!copyWhenShared || this._meshes.length === 1)) {\n return orig;\n }\n else {\n return orig.slice();\n }\n }\n /**\n * Gets the index buffer\n * @returns the index buffer\n */\n getIndexBuffer() {\n if (!this.isReady()) {\n return null;\n }\n return this._indexBuffer;\n }\n /**\n * @internal\n */\n _releaseVertexArrayObject(effect = null) {\n if (!effect || !this._vertexArrayObjects) {\n return;\n }\n if (this._vertexArrayObjects[effect.key]) {\n this._engine.releaseVertexArrayObject(this._vertexArrayObjects[effect.key]);\n delete this._vertexArrayObjects[effect.key];\n }\n }\n /**\n * Release the associated resources for a specific mesh\n * @param mesh defines the source mesh\n * @param shouldDispose defines if the geometry must be disposed if there is no more mesh pointing to it\n */\n releaseForMesh(mesh, shouldDispose) {\n const meshes = this._meshes;\n const index = meshes.indexOf(mesh);\n if (index === -1) {\n return;\n }\n meshes.splice(index, 1);\n if (this._vertexArrayObjects) {\n mesh._invalidateInstanceVertexArrayObject();\n }\n mesh._geometry = null;\n if (meshes.length === 0 && shouldDispose) {\n this.dispose();\n }\n }\n /**\n * Apply current geometry to a given mesh\n * @param mesh defines the mesh to apply geometry to\n */\n applyToMesh(mesh) {\n if (mesh._geometry === this) {\n return;\n }\n const previousGeometry = mesh._geometry;\n if (previousGeometry) {\n previousGeometry.releaseForMesh(mesh);\n }\n if (this._vertexArrayObjects) {\n mesh._invalidateInstanceVertexArrayObject();\n }\n const meshes = this._meshes;\n // must be done before setting vertexBuffers because of mesh._createGlobalSubMesh()\n mesh._geometry = this;\n mesh._internalAbstractMeshDataInfo._positions = null;\n this._scene.pushGeometry(this);\n meshes.push(mesh);\n if (this.isReady()) {\n this._applyToMesh(mesh);\n }\n else if (this._boundingInfo) {\n mesh.setBoundingInfo(this._boundingInfo);\n }\n }\n _updateExtend(data = null) {\n if (this.useBoundingInfoFromGeometry && this._boundingInfo) {\n this._extend = {\n minimum: this._boundingInfo.minimum.clone(),\n maximum: this._boundingInfo.maximum.clone(),\n };\n }\n else {\n if (!data) {\n data = this.getVerticesData(VertexBuffer.PositionKind);\n // This can happen if the buffer comes from a Hardware Buffer where\n // The data have not been uploaded by Babylon. (ex: Compute Shaders and Storage Buffers)\n if (!data) {\n return;\n }\n }\n this._extend = extractMinAndMax(data, 0, this._totalVertices, this.boundingBias, 3);\n }\n }\n _applyToMesh(mesh) {\n const numOfMeshes = this._meshes.length;\n // vertexBuffers\n for (const kind in this._vertexBuffers) {\n if (numOfMeshes === 1) {\n this._vertexBuffers[kind].create();\n }\n if (kind === VertexBuffer.PositionKind) {\n if (!this._extend) {\n this._updateExtend();\n }\n mesh.buildBoundingInfo(this._extend.minimum, this._extend.maximum);\n mesh._createGlobalSubMesh(mesh.isUnIndexed);\n //bounding info was just created again, world matrix should be applied again.\n mesh._updateBoundingInfo();\n }\n }\n // indexBuffer\n if (numOfMeshes === 1 && this._indices && this._indices.length > 0) {\n this._indexBuffer = this._engine.createIndexBuffer(this._indices, this._updatable);\n }\n // morphTargets\n mesh._syncGeometryWithMorphTargetManager();\n // instances\n mesh.synchronizeInstances();\n }\n _notifyUpdate(kind) {\n if (this.onGeometryUpdated) {\n this.onGeometryUpdated(this, kind);\n }\n if (this._vertexArrayObjects) {\n this._disposeVertexArrayObjects();\n }\n for (const mesh of this._meshes) {\n mesh._markSubMeshesAsAttributesDirty();\n }\n }\n /**\n * Load the geometry if it was flagged as delay loaded\n * @param scene defines the hosting scene\n * @param onLoaded defines a callback called when the geometry is loaded\n */\n load(scene, onLoaded) {\n if (this.delayLoadState === 2) {\n return;\n }\n if (this.isReady()) {\n if (onLoaded) {\n onLoaded();\n }\n return;\n }\n this.delayLoadState = 2;\n this._queueLoad(scene, onLoaded);\n }\n _queueLoad(scene, onLoaded) {\n if (!this.delayLoadingFile) {\n return;\n }\n scene.addPendingData(this);\n scene._loadFile(this.delayLoadingFile, (data) => {\n if (!this._delayLoadingFunction) {\n return;\n }\n this._delayLoadingFunction(JSON.parse(data), this);\n this.delayLoadState = 1;\n this._delayInfo = [];\n scene.removePendingData(this);\n const meshes = this._meshes;\n const numOfMeshes = meshes.length;\n for (let index = 0; index < numOfMeshes; index++) {\n this._applyToMesh(meshes[index]);\n }\n if (onLoaded) {\n onLoaded();\n }\n }, undefined, true);\n }\n /**\n * Invert the geometry to move from a right handed system to a left handed one.\n */\n toLeftHanded() {\n // Flip faces\n const tIndices = this.getIndices(false);\n if (tIndices != null && tIndices.length > 0) {\n for (let i = 0; i < tIndices.length; i += 3) {\n const tTemp = tIndices[i + 0];\n tIndices[i + 0] = tIndices[i + 2];\n tIndices[i + 2] = tTemp;\n }\n this.setIndices(tIndices);\n }\n // Negate position.z\n const tPositions = this.getVerticesData(VertexBuffer.PositionKind, false);\n if (tPositions != null && tPositions.length > 0) {\n for (let i = 0; i < tPositions.length; i += 3) {\n tPositions[i + 2] = -tPositions[i + 2];\n }\n this.setVerticesData(VertexBuffer.PositionKind, tPositions, false);\n }\n // Negate normal.z\n const tNormals = this.getVerticesData(VertexBuffer.NormalKind, false);\n if (tNormals != null && tNormals.length > 0) {\n for (let i = 0; i < tNormals.length; i += 3) {\n tNormals[i + 2] = -tNormals[i + 2];\n }\n this.setVerticesData(VertexBuffer.NormalKind, tNormals, false);\n }\n }\n // Cache\n /** @internal */\n _resetPointsArrayCache() {\n this._positions = null;\n }\n /** @internal */\n _generatePointsArray() {\n if (this._positions) {\n return true;\n }\n const data = this.getVerticesData(VertexBuffer.PositionKind);\n if (!data || data.length === 0) {\n return false;\n }\n for (let index = this._positionsCache.length * 3, arrayIdx = this._positionsCache.length; index < data.length; index += 3, ++arrayIdx) {\n this._positionsCache[arrayIdx] = Vector3.FromArray(data, index);\n }\n for (let index = 0, arrayIdx = 0; index < data.length; index += 3, ++arrayIdx) {\n this._positionsCache[arrayIdx].set(data[0 + index], data[1 + index], data[2 + index]);\n }\n // just in case the number of positions was reduced, splice the array\n this._positionsCache.length = data.length / 3;\n this._positions = this._positionsCache;\n return true;\n }\n /**\n * Gets a value indicating if the geometry is disposed\n * @returns true if the geometry was disposed\n */\n isDisposed() {\n return this._isDisposed;\n }\n _disposeVertexArrayObjects() {\n if (this._vertexArrayObjects) {\n for (const kind in this._vertexArrayObjects) {\n this._engine.releaseVertexArrayObject(this._vertexArrayObjects[kind]);\n }\n this._vertexArrayObjects = {}; // Will trigger a rebuild of the VAO if supported\n const meshes = this._meshes;\n const numOfMeshes = meshes.length;\n for (let index = 0; index < numOfMeshes; index++) {\n meshes[index]._invalidateInstanceVertexArrayObject();\n }\n }\n }\n /**\n * Free all associated resources\n */\n dispose() {\n const meshes = this._meshes;\n const numOfMeshes = meshes.length;\n let index;\n for (index = 0; index < numOfMeshes; index++) {\n this.releaseForMesh(meshes[index]);\n }\n this._meshes.length = 0;\n this._disposeVertexArrayObjects();\n for (const kind in this._vertexBuffers) {\n this._vertexBuffers[kind].dispose();\n }\n this._vertexBuffers = {};\n this._totalVertices = 0;\n if (this._indexBuffer) {\n this._engine._releaseBuffer(this._indexBuffer);\n }\n this._indexBuffer = null;\n this._indices = [];\n this.delayLoadState = 0;\n this.delayLoadingFile = null;\n this._delayLoadingFunction = null;\n this._delayInfo = [];\n this._boundingInfo = null;\n this._scene.removeGeometry(this);\n if (this._parentContainer) {\n const index = this._parentContainer.geometries.indexOf(this);\n if (index > -1) {\n this._parentContainer.geometries.splice(index, 1);\n }\n this._parentContainer = null;\n }\n this._isDisposed = true;\n }\n /**\n * Clone the current geometry into a new geometry\n * @param id defines the unique ID of the new geometry\n * @returns a new geometry object\n */\n copy(id) {\n const vertexData = new VertexData();\n vertexData.indices = [];\n const indices = this.getIndices();\n if (indices) {\n for (let index = 0; index < indices.length; index++) {\n vertexData.indices.push(indices[index]);\n }\n }\n let updatable = false;\n let stopChecking = false;\n let kind;\n for (kind in this._vertexBuffers) {\n // using slice() to make a copy of the array and not just reference it\n const data = this.getVerticesData(kind);\n if (data) {\n if (data instanceof Float32Array) {\n vertexData.set(new Float32Array(data), kind);\n }\n else {\n vertexData.set(data.slice(0), kind);\n }\n if (!stopChecking) {\n const vb = this.getVertexBuffer(kind);\n if (vb) {\n updatable = vb.isUpdatable();\n stopChecking = !updatable;\n }\n }\n }\n }\n const geometry = new Geometry(id, this._scene, vertexData, updatable);\n geometry.delayLoadState = this.delayLoadState;\n geometry.delayLoadingFile = this.delayLoadingFile;\n geometry._delayLoadingFunction = this._delayLoadingFunction;\n for (kind in this._delayInfo) {\n geometry._delayInfo = geometry._delayInfo || [];\n geometry._delayInfo.push(kind);\n }\n // Bounding info\n geometry._boundingInfo = new BoundingInfo(this._extend.minimum, this._extend.maximum);\n return geometry;\n }\n /**\n * Serialize the current geometry info (and not the vertices data) into a JSON object\n * @returns a JSON representation of the current geometry data (without the vertices data)\n */\n serialize() {\n const serializationObject = {};\n serializationObject.id = this.id;\n serializationObject.uniqueId = this.uniqueId;\n serializationObject.updatable = this._updatable;\n if (Tags && Tags.HasTags(this)) {\n serializationObject.tags = Tags.GetTags(this);\n }\n return serializationObject;\n }\n _toNumberArray(origin) {\n if (Array.isArray(origin)) {\n return origin;\n }\n else {\n return Array.prototype.slice.call(origin);\n }\n }\n /**\n * Release any memory retained by the cached data on the Geometry.\n *\n * Call this function to reduce memory footprint of the mesh.\n * Vertex buffers will not store CPU data anymore (this will prevent picking, collisions or physics to work correctly)\n */\n clearCachedData() {\n this._indices = [];\n this._resetPointsArrayCache();\n for (const vbName in this._vertexBuffers) {\n if (!Object.prototype.hasOwnProperty.call(this._vertexBuffers, vbName)) {\n continue;\n }\n this._vertexBuffers[vbName]._buffer._data = null;\n }\n }\n /**\n * Serialize all vertices data into a JSON object\n * @returns a JSON representation of the current geometry data\n */\n serializeVerticeData() {\n const serializationObject = this.serialize();\n if (this.isVerticesDataPresent(VertexBuffer.PositionKind)) {\n serializationObject.positions = this._toNumberArray(this.getVerticesData(VertexBuffer.PositionKind));\n if (this.isVertexBufferUpdatable(VertexBuffer.PositionKind)) {\n serializationObject.positions._updatable = true;\n }\n }\n if (this.isVerticesDataPresent(VertexBuffer.NormalKind)) {\n serializationObject.normals = this._toNumberArray(this.getVerticesData(VertexBuffer.NormalKind));\n if (this.isVertexBufferUpdatable(VertexBuffer.NormalKind)) {\n serializationObject.normals._updatable = true;\n }\n }\n if (this.isVerticesDataPresent(VertexBuffer.TangentKind)) {\n serializationObject.tangents = this._toNumberArray(this.getVerticesData(VertexBuffer.TangentKind));\n if (this.isVertexBufferUpdatable(VertexBuffer.TangentKind)) {\n serializationObject.tangents._updatable = true;\n }\n }\n if (this.isVerticesDataPresent(VertexBuffer.UVKind)) {\n serializationObject.uvs = this._toNumberArray(this.getVerticesData(VertexBuffer.UVKind));\n if (this.isVertexBufferUpdatable(VertexBuffer.UVKind)) {\n serializationObject.uvs._updatable = true;\n }\n }\n if (this.isVerticesDataPresent(VertexBuffer.UV2Kind)) {\n serializationObject.uvs2 = this._toNumberArray(this.getVerticesData(VertexBuffer.UV2Kind));\n if (this.isVertexBufferUpdatable(VertexBuffer.UV2Kind)) {\n serializationObject.uvs2._updatable = true;\n }\n }\n if (this.isVerticesDataPresent(VertexBuffer.UV3Kind)) {\n serializationObject.uvs3 = this._toNumberArray(this.getVerticesData(VertexBuffer.UV3Kind));\n if (this.isVertexBufferUpdatable(VertexBuffer.UV3Kind)) {\n serializationObject.uvs3._updatable = true;\n }\n }\n if (this.isVerticesDataPresent(VertexBuffer.UV4Kind)) {\n serializationObject.uvs4 = this._toNumberArray(this.getVerticesData(VertexBuffer.UV4Kind));\n if (this.isVertexBufferUpdatable(VertexBuffer.UV4Kind)) {\n serializationObject.uvs4._updatable = true;\n }\n }\n if (this.isVerticesDataPresent(VertexBuffer.UV5Kind)) {\n serializationObject.uvs5 = this._toNumberArray(this.getVerticesData(VertexBuffer.UV5Kind));\n if (this.isVertexBufferUpdatable(VertexBuffer.UV5Kind)) {\n serializationObject.uvs5._updatable = true;\n }\n }\n if (this.isVerticesDataPresent(VertexBuffer.UV6Kind)) {\n serializationObject.uvs6 = this._toNumberArray(this.getVerticesData(VertexBuffer.UV6Kind));\n if (this.isVertexBufferUpdatable(VertexBuffer.UV6Kind)) {\n serializationObject.uvs6._updatable = true;\n }\n }\n if (this.isVerticesDataPresent(VertexBuffer.ColorKind)) {\n serializationObject.colors = this._toNumberArray(this.getVerticesData(VertexBuffer.ColorKind));\n if (this.isVertexBufferUpdatable(VertexBuffer.ColorKind)) {\n serializationObject.colors._updatable = true;\n }\n }\n if (this.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind)) {\n serializationObject.matricesIndices = this._toNumberArray(this.getVerticesData(VertexBuffer.MatricesIndicesKind));\n serializationObject.matricesIndices._isExpanded = true;\n if (this.isVertexBufferUpdatable(VertexBuffer.MatricesIndicesKind)) {\n serializationObject.matricesIndices._updatable = true;\n }\n }\n if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) {\n serializationObject.matricesWeights = this._toNumberArray(this.getVerticesData(VertexBuffer.MatricesWeightsKind));\n if (this.isVertexBufferUpdatable(VertexBuffer.MatricesWeightsKind)) {\n serializationObject.matricesWeights._updatable = true;\n }\n }\n serializationObject.indices = this._toNumberArray(this.getIndices());\n return serializationObject;\n }\n // Statics\n /**\n * Extracts a clone of a mesh geometry\n * @param mesh defines the source mesh\n * @param id defines the unique ID of the new geometry object\n * @returns the new geometry object\n */\n static ExtractFromMesh(mesh, id) {\n const geometry = mesh._geometry;\n if (!geometry) {\n return null;\n }\n return geometry.copy(id);\n }\n /**\n * You should now use Tools.RandomId(), this method is still here for legacy reasons.\n * Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523\n * Be aware Math.random() could cause collisions, but:\n * \"All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide\"\n * @returns a string containing a new GUID\n */\n static RandomId() {\n return Tools.RandomId();\n }\n static _GetGeometryByLoadedUniqueId(uniqueId, scene) {\n for (let index = 0; index < scene.geometries.length; index++) {\n if (scene.geometries[index]._loadedUniqueId === uniqueId) {\n return scene.geometries[index];\n }\n }\n return null;\n }\n /**\n * @internal\n */\n static _ImportGeometry(parsedGeometry, mesh) {\n const scene = mesh.getScene();\n // Geometry\n const geometryUniqueId = parsedGeometry.geometryUniqueId;\n const geometryId = parsedGeometry.geometryId;\n if (geometryUniqueId || geometryId) {\n const geometry = geometryUniqueId ? this._GetGeometryByLoadedUniqueId(geometryUniqueId, scene) : scene.getGeometryById(geometryId);\n if (geometry) {\n geometry.applyToMesh(mesh);\n }\n }\n else if (parsedGeometry instanceof ArrayBuffer) {\n const binaryInfo = mesh._binaryInfo;\n if (binaryInfo.positionsAttrDesc && binaryInfo.positionsAttrDesc.count > 0) {\n const positionsData = new Float32Array(parsedGeometry, binaryInfo.positionsAttrDesc.offset, binaryInfo.positionsAttrDesc.count);\n mesh.setVerticesData(VertexBuffer.PositionKind, positionsData, false);\n }\n if (binaryInfo.normalsAttrDesc && binaryInfo.normalsAttrDesc.count > 0) {\n const normalsData = new Float32Array(parsedGeometry, binaryInfo.normalsAttrDesc.offset, binaryInfo.normalsAttrDesc.count);\n mesh.setVerticesData(VertexBuffer.NormalKind, normalsData, false);\n }\n if (binaryInfo.tangetsAttrDesc && binaryInfo.tangetsAttrDesc.count > 0) {\n const tangentsData = new Float32Array(parsedGeometry, binaryInfo.tangetsAttrDesc.offset, binaryInfo.tangetsAttrDesc.count);\n mesh.setVerticesData(VertexBuffer.TangentKind, tangentsData, false);\n }\n if (binaryInfo.uvsAttrDesc && binaryInfo.uvsAttrDesc.count > 0) {\n const uvsData = new Float32Array(parsedGeometry, binaryInfo.uvsAttrDesc.offset, binaryInfo.uvsAttrDesc.count);\n if (CompatibilityOptions.UseOpenGLOrientationForUV) {\n for (let index = 1; index < uvsData.length; index += 2) {\n uvsData[index] = 1 - uvsData[index];\n }\n }\n mesh.setVerticesData(VertexBuffer.UVKind, uvsData, false);\n }\n if (binaryInfo.uvs2AttrDesc && binaryInfo.uvs2AttrDesc.count > 0) {\n const uvs2Data = new Float32Array(parsedGeometry, binaryInfo.uvs2AttrDesc.offset, binaryInfo.uvs2AttrDesc.count);\n if (CompatibilityOptions.UseOpenGLOrientationForUV) {\n for (let index = 1; index < uvs2Data.length; index += 2) {\n uvs2Data[index] = 1 - uvs2Data[index];\n }\n }\n mesh.setVerticesData(VertexBuffer.UV2Kind, uvs2Data, false);\n }\n if (binaryInfo.uvs3AttrDesc && binaryInfo.uvs3AttrDesc.count > 0) {\n const uvs3Data = new Float32Array(parsedGeometry, binaryInfo.uvs3AttrDesc.offset, binaryInfo.uvs3AttrDesc.count);\n if (CompatibilityOptions.UseOpenGLOrientationForUV) {\n for (let index = 1; index < uvs3Data.length; index += 2) {\n uvs3Data[index] = 1 - uvs3Data[index];\n }\n }\n mesh.setVerticesData(VertexBuffer.UV3Kind, uvs3Data, false);\n }\n if (binaryInfo.uvs4AttrDesc && binaryInfo.uvs4AttrDesc.count > 0) {\n const uvs4Data = new Float32Array(parsedGeometry, binaryInfo.uvs4AttrDesc.offset, binaryInfo.uvs4AttrDesc.count);\n if (CompatibilityOptions.UseOpenGLOrientationForUV) {\n for (let index = 1; index < uvs4Data.length; index += 2) {\n uvs4Data[index] = 1 - uvs4Data[index];\n }\n }\n mesh.setVerticesData(VertexBuffer.UV4Kind, uvs4Data, false);\n }\n if (binaryInfo.uvs5AttrDesc && binaryInfo.uvs5AttrDesc.count > 0) {\n const uvs5Data = new Float32Array(parsedGeometry, binaryInfo.uvs5AttrDesc.offset, binaryInfo.uvs5AttrDesc.count);\n if (CompatibilityOptions.UseOpenGLOrientationForUV) {\n for (let index = 1; index < uvs5Data.length; index += 2) {\n uvs5Data[index] = 1 - uvs5Data[index];\n }\n }\n mesh.setVerticesData(VertexBuffer.UV5Kind, uvs5Data, false);\n }\n if (binaryInfo.uvs6AttrDesc && binaryInfo.uvs6AttrDesc.count > 0) {\n const uvs6Data = new Float32Array(parsedGeometry, binaryInfo.uvs6AttrDesc.offset, binaryInfo.uvs6AttrDesc.count);\n if (CompatibilityOptions.UseOpenGLOrientationForUV) {\n for (let index = 1; index < uvs6Data.length; index += 2) {\n uvs6Data[index] = 1 - uvs6Data[index];\n }\n }\n mesh.setVerticesData(VertexBuffer.UV6Kind, uvs6Data, false);\n }\n if (binaryInfo.colorsAttrDesc && binaryInfo.colorsAttrDesc.count > 0) {\n const colorsData = new Float32Array(parsedGeometry, binaryInfo.colorsAttrDesc.offset, binaryInfo.colorsAttrDesc.count);\n mesh.setVerticesData(VertexBuffer.ColorKind, colorsData, false, binaryInfo.colorsAttrDesc.stride);\n }\n if (binaryInfo.matricesIndicesAttrDesc && binaryInfo.matricesIndicesAttrDesc.count > 0) {\n const matricesIndicesData = new Int32Array(parsedGeometry, binaryInfo.matricesIndicesAttrDesc.offset, binaryInfo.matricesIndicesAttrDesc.count);\n const floatIndices = [];\n for (let i = 0; i < matricesIndicesData.length; i++) {\n const index = matricesIndicesData[i];\n floatIndices.push(index & 0x000000ff);\n floatIndices.push((index & 0x0000ff00) >> 8);\n floatIndices.push((index & 0x00ff0000) >> 16);\n floatIndices.push((index >> 24) & 0xff); // & 0xFF to convert to v + 256 if v < 0\n }\n mesh.setVerticesData(VertexBuffer.MatricesIndicesKind, floatIndices, false);\n }\n if (binaryInfo.matricesIndicesExtraAttrDesc && binaryInfo.matricesIndicesExtraAttrDesc.count > 0) {\n const matricesIndicesData = new Int32Array(parsedGeometry, binaryInfo.matricesIndicesExtraAttrDesc.offset, binaryInfo.matricesIndicesExtraAttrDesc.count);\n const floatIndices = [];\n for (let i = 0; i < matricesIndicesData.length; i++) {\n const index = matricesIndicesData[i];\n floatIndices.push(index & 0x000000ff);\n floatIndices.push((index & 0x0000ff00) >> 8);\n floatIndices.push((index & 0x00ff0000) >> 16);\n floatIndices.push((index >> 24) & 0xff); // & 0xFF to convert to v + 256 if v < 0\n }\n mesh.setVerticesData(VertexBuffer.MatricesIndicesExtraKind, floatIndices, false);\n }\n if (binaryInfo.matricesWeightsAttrDesc && binaryInfo.matricesWeightsAttrDesc.count > 0) {\n const matricesWeightsData = new Float32Array(parsedGeometry, binaryInfo.matricesWeightsAttrDesc.offset, binaryInfo.matricesWeightsAttrDesc.count);\n mesh.setVerticesData(VertexBuffer.MatricesWeightsKind, matricesWeightsData, false);\n }\n if (binaryInfo.indicesAttrDesc && binaryInfo.indicesAttrDesc.count > 0) {\n const indicesData = new Int32Array(parsedGeometry, binaryInfo.indicesAttrDesc.offset, binaryInfo.indicesAttrDesc.count);\n mesh.setIndices(indicesData, null);\n }\n if (binaryInfo.subMeshesAttrDesc && binaryInfo.subMeshesAttrDesc.count > 0) {\n const subMeshesData = new Int32Array(parsedGeometry, binaryInfo.subMeshesAttrDesc.offset, binaryInfo.subMeshesAttrDesc.count * 5);\n mesh.subMeshes = [];\n for (let i = 0; i < binaryInfo.subMeshesAttrDesc.count; i++) {\n const materialIndex = subMeshesData[i * 5 + 0];\n const verticesStart = subMeshesData[i * 5 + 1];\n const verticesCount = subMeshesData[i * 5 + 2];\n const indexStart = subMeshesData[i * 5 + 3];\n const indexCount = subMeshesData[i * 5 + 4];\n SubMesh.AddToMesh(materialIndex, verticesStart, verticesCount, indexStart, indexCount, mesh);\n }\n }\n }\n else if (parsedGeometry.positions && parsedGeometry.normals && parsedGeometry.indices) {\n mesh.setVerticesData(VertexBuffer.PositionKind, parsedGeometry.positions, parsedGeometry.positions._updatable);\n mesh.setVerticesData(VertexBuffer.NormalKind, parsedGeometry.normals, parsedGeometry.normals._updatable);\n if (parsedGeometry.tangents) {\n mesh.setVerticesData(VertexBuffer.TangentKind, parsedGeometry.tangents, parsedGeometry.tangents._updatable);\n }\n if (parsedGeometry.uvs) {\n mesh.setVerticesData(VertexBuffer.UVKind, parsedGeometry.uvs, parsedGeometry.uvs._updatable);\n }\n if (parsedGeometry.uvs2) {\n mesh.setVerticesData(VertexBuffer.UV2Kind, parsedGeometry.uvs2, parsedGeometry.uvs2._updatable);\n }\n if (parsedGeometry.uvs3) {\n mesh.setVerticesData(VertexBuffer.UV3Kind, parsedGeometry.uvs3, parsedGeometry.uvs3._updatable);\n }\n if (parsedGeometry.uvs4) {\n mesh.setVerticesData(VertexBuffer.UV4Kind, parsedGeometry.uvs4, parsedGeometry.uvs4._updatable);\n }\n if (parsedGeometry.uvs5) {\n mesh.setVerticesData(VertexBuffer.UV5Kind, parsedGeometry.uvs5, parsedGeometry.uvs5._updatable);\n }\n if (parsedGeometry.uvs6) {\n mesh.setVerticesData(VertexBuffer.UV6Kind, parsedGeometry.uvs6, parsedGeometry.uvs6._updatable);\n }\n if (parsedGeometry.colors) {\n mesh.setVerticesData(VertexBuffer.ColorKind, Color4.CheckColors4(parsedGeometry.colors, parsedGeometry.positions.length / 3), parsedGeometry.colors._updatable);\n }\n if (parsedGeometry.matricesIndices) {\n if (!parsedGeometry.matricesIndices._isExpanded) {\n const floatIndices = [];\n for (let i = 0; i < parsedGeometry.matricesIndices.length; i++) {\n const matricesIndex = parsedGeometry.matricesIndices[i];\n floatIndices.push(matricesIndex & 0x000000ff);\n floatIndices.push((matricesIndex & 0x0000ff00) >> 8);\n floatIndices.push((matricesIndex & 0x00ff0000) >> 16);\n floatIndices.push((matricesIndex >> 24) & 0xff); // & 0xFF to convert to v + 256 if v < 0\n }\n mesh.setVerticesData(VertexBuffer.MatricesIndicesKind, floatIndices, parsedGeometry.matricesIndices._updatable);\n }\n else {\n delete parsedGeometry.matricesIndices._isExpanded;\n mesh.setVerticesData(VertexBuffer.MatricesIndicesKind, parsedGeometry.matricesIndices, parsedGeometry.matricesIndices._updatable);\n }\n }\n if (parsedGeometry.matricesIndicesExtra) {\n if (!parsedGeometry.matricesIndicesExtra._isExpanded) {\n const floatIndices = [];\n for (let i = 0; i < parsedGeometry.matricesIndicesExtra.length; i++) {\n const matricesIndex = parsedGeometry.matricesIndicesExtra[i];\n floatIndices.push(matricesIndex & 0x000000ff);\n floatIndices.push((matricesIndex & 0x0000ff00) >> 8);\n floatIndices.push((matricesIndex & 0x00ff0000) >> 16);\n floatIndices.push((matricesIndex >> 24) & 0xff); // & 0xFF to convert to v + 256 if v < 0\n }\n mesh.setVerticesData(VertexBuffer.MatricesIndicesExtraKind, floatIndices, parsedGeometry.matricesIndicesExtra._updatable);\n }\n else {\n delete parsedGeometry.matricesIndices._isExpanded;\n mesh.setVerticesData(VertexBuffer.MatricesIndicesExtraKind, parsedGeometry.matricesIndicesExtra, parsedGeometry.matricesIndicesExtra._updatable);\n }\n }\n if (parsedGeometry.matricesWeights) {\n Geometry._CleanMatricesWeights(parsedGeometry, mesh);\n mesh.setVerticesData(VertexBuffer.MatricesWeightsKind, parsedGeometry.matricesWeights, parsedGeometry.matricesWeights._updatable);\n }\n if (parsedGeometry.matricesWeightsExtra) {\n mesh.setVerticesData(VertexBuffer.MatricesWeightsExtraKind, parsedGeometry.matricesWeightsExtra, parsedGeometry.matricesWeights._updatable);\n }\n mesh.setIndices(parsedGeometry.indices, null);\n }\n // SubMeshes\n if (parsedGeometry.subMeshes) {\n mesh.subMeshes = [];\n for (let subIndex = 0; subIndex < parsedGeometry.subMeshes.length; subIndex++) {\n const parsedSubMesh = parsedGeometry.subMeshes[subIndex];\n SubMesh.AddToMesh(parsedSubMesh.materialIndex, parsedSubMesh.verticesStart, parsedSubMesh.verticesCount, parsedSubMesh.indexStart, parsedSubMesh.indexCount, mesh);\n }\n }\n // Flat shading\n if (mesh._shouldGenerateFlatShading) {\n mesh.convertToFlatShadedMesh();\n mesh._shouldGenerateFlatShading = false;\n }\n // Update\n mesh.computeWorldMatrix(true);\n scene.onMeshImportedObservable.notifyObservers(mesh);\n }\n static _CleanMatricesWeights(parsedGeometry, mesh) {\n const epsilon = 1e-3;\n if (!SceneLoaderFlags.CleanBoneMatrixWeights) {\n return;\n }\n let noInfluenceBoneIndex = 0.0;\n if (parsedGeometry.skeletonId > -1) {\n const skeleton = mesh.getScene().getLastSkeletonById(parsedGeometry.skeletonId);\n if (!skeleton) {\n return;\n }\n noInfluenceBoneIndex = skeleton.bones.length;\n }\n else {\n return;\n }\n const matricesIndices = mesh.getVerticesData(VertexBuffer.MatricesIndicesKind);\n const matricesIndicesExtra = mesh.getVerticesData(VertexBuffer.MatricesIndicesExtraKind);\n const matricesWeights = parsedGeometry.matricesWeights;\n const matricesWeightsExtra = parsedGeometry.matricesWeightsExtra;\n const influencers = parsedGeometry.numBoneInfluencer;\n const size = matricesWeights.length;\n for (let i = 0; i < size; i += 4) {\n let weight = 0.0;\n let firstZeroWeight = -1;\n for (let j = 0; j < 4; j++) {\n const w = matricesWeights[i + j];\n weight += w;\n if (w < epsilon && firstZeroWeight < 0) {\n firstZeroWeight = j;\n }\n }\n if (matricesWeightsExtra) {\n for (let j = 0; j < 4; j++) {\n const w = matricesWeightsExtra[i + j];\n weight += w;\n if (w < epsilon && firstZeroWeight < 0) {\n firstZeroWeight = j + 4;\n }\n }\n }\n if (firstZeroWeight < 0 || firstZeroWeight > influencers - 1) {\n firstZeroWeight = influencers - 1;\n }\n if (weight > epsilon) {\n const mweight = 1.0 / weight;\n for (let j = 0; j < 4; j++) {\n matricesWeights[i + j] *= mweight;\n }\n if (matricesWeightsExtra) {\n for (let j = 0; j < 4; j++) {\n matricesWeightsExtra[i + j] *= mweight;\n }\n }\n }\n else {\n if (firstZeroWeight >= 4) {\n matricesWeightsExtra[i + firstZeroWeight - 4] = 1.0 - weight;\n matricesIndicesExtra[i + firstZeroWeight - 4] = noInfluenceBoneIndex;\n }\n else {\n matricesWeights[i + firstZeroWeight] = 1.0 - weight;\n matricesIndices[i + firstZeroWeight] = noInfluenceBoneIndex;\n }\n }\n }\n mesh.setVerticesData(VertexBuffer.MatricesIndicesKind, matricesIndices);\n if (parsedGeometry.matricesWeightsExtra) {\n mesh.setVerticesData(VertexBuffer.MatricesIndicesExtraKind, matricesIndicesExtra);\n }\n }\n /**\n * Create a new geometry from persisted data (Using .babylon file format)\n * @param parsedVertexData defines the persisted data\n * @param scene defines the hosting scene\n * @param rootUrl defines the root url to use to load assets (like delayed data)\n * @returns the new geometry object\n */\n static Parse(parsedVertexData, scene, rootUrl) {\n const geometry = new Geometry(parsedVertexData.id, scene, undefined, parsedVertexData.updatable);\n geometry._loadedUniqueId = parsedVertexData.uniqueId;\n if (Tags) {\n Tags.AddTagsTo(geometry, parsedVertexData.tags);\n }\n if (parsedVertexData.delayLoadingFile) {\n geometry.delayLoadState = 4;\n geometry.delayLoadingFile = rootUrl + parsedVertexData.delayLoadingFile;\n geometry._boundingInfo = new BoundingInfo(Vector3.FromArray(parsedVertexData.boundingBoxMinimum), Vector3.FromArray(parsedVertexData.boundingBoxMaximum));\n geometry._delayInfo = [];\n if (parsedVertexData.hasUVs) {\n geometry._delayInfo.push(VertexBuffer.UVKind);\n }\n if (parsedVertexData.hasUVs2) {\n geometry._delayInfo.push(VertexBuffer.UV2Kind);\n }\n if (parsedVertexData.hasUVs3) {\n geometry._delayInfo.push(VertexBuffer.UV3Kind);\n }\n if (parsedVertexData.hasUVs4) {\n geometry._delayInfo.push(VertexBuffer.UV4Kind);\n }\n if (parsedVertexData.hasUVs5) {\n geometry._delayInfo.push(VertexBuffer.UV5Kind);\n }\n if (parsedVertexData.hasUVs6) {\n geometry._delayInfo.push(VertexBuffer.UV6Kind);\n }\n if (parsedVertexData.hasColors) {\n geometry._delayInfo.push(VertexBuffer.ColorKind);\n }\n if (parsedVertexData.hasMatricesIndices) {\n geometry._delayInfo.push(VertexBuffer.MatricesIndicesKind);\n }\n if (parsedVertexData.hasMatricesWeights) {\n geometry._delayInfo.push(VertexBuffer.MatricesWeightsKind);\n }\n geometry._delayLoadingFunction = VertexData.ImportVertexData;\n }\n else {\n VertexData.ImportVertexData(parsedVertexData, geometry);\n }\n scene.pushGeometry(geometry, true);\n return geometry;\n }\n}\n//# sourceMappingURL=geometry.js.map","import { __decorate } from \"../tslib.es6.js\";\n\nimport { SerializationHelper, serialize } from \"../Misc/decorators.js\";\n/**\n * Class that holds the different stencil states of a material\n * Usage example: https://playground.babylonjs.com/#CW5PRI#10\n */\nexport class MaterialStencilState {\n /**\n * Creates a material stencil state instance\n */\n constructor() {\n this.reset();\n }\n /**\n * Resets all the stencil states to default values\n */\n reset() {\n this.enabled = false;\n this.mask = 0xff;\n this.func = 519;\n this.funcRef = 1;\n this.funcMask = 0xff;\n this.opStencilFail = 7680;\n this.opDepthFail = 7680;\n this.opStencilDepthPass = 7681;\n }\n /**\n * Gets or sets the stencil function\n */\n get func() {\n return this._func;\n }\n set func(value) {\n this._func = value;\n }\n /**\n * Gets or sets the stencil function reference\n */\n get funcRef() {\n return this._funcRef;\n }\n set funcRef(value) {\n this._funcRef = value;\n }\n /**\n * Gets or sets the stencil function mask\n */\n get funcMask() {\n return this._funcMask;\n }\n set funcMask(value) {\n this._funcMask = value;\n }\n /**\n * Gets or sets the operation when the stencil test fails\n */\n get opStencilFail() {\n return this._opStencilFail;\n }\n set opStencilFail(value) {\n this._opStencilFail = value;\n }\n /**\n * Gets or sets the operation when the depth test fails\n */\n get opDepthFail() {\n return this._opDepthFail;\n }\n set opDepthFail(value) {\n this._opDepthFail = value;\n }\n /**\n * Gets or sets the operation when the stencil+depth test succeeds\n */\n get opStencilDepthPass() {\n return this._opStencilDepthPass;\n }\n set opStencilDepthPass(value) {\n this._opStencilDepthPass = value;\n }\n /**\n * Gets or sets the stencil mask\n */\n get mask() {\n return this._mask;\n }\n set mask(value) {\n this._mask = value;\n }\n /**\n * Enables or disables the stencil test\n */\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n this._enabled = value;\n }\n /**\n * Get the current class name, useful for serialization or dynamic coding.\n * @returns \"MaterialStencilState\"\n */\n getClassName() {\n return \"MaterialStencilState\";\n }\n /**\n * Makes a duplicate of the current configuration into another one.\n * @param stencilState defines stencil state where to copy the info\n */\n copyTo(stencilState) {\n SerializationHelper.Clone(() => stencilState, this);\n }\n /**\n * Serializes this stencil configuration.\n * @returns - An object with the serialized config.\n */\n serialize() {\n return SerializationHelper.Serialize(this);\n }\n /**\n * Parses a stencil state configuration from a serialized object.\n * @param source - Serialized object.\n * @param scene Defines the scene we are parsing for\n * @param rootUrl Defines the rootUrl to load from\n */\n parse(source, scene, rootUrl) {\n SerializationHelper.Parse(() => this, source, scene, rootUrl);\n }\n}\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"func\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"funcRef\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"funcMask\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"opStencilFail\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"opDepthFail\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"opStencilDepthPass\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"mask\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"enabled\", null);\n//# sourceMappingURL=materialStencilState.js.map","/**\n * @internal\n */\nexport var MaterialPluginEvent;\n(function (MaterialPluginEvent) {\n MaterialPluginEvent[MaterialPluginEvent[\"Created\"] = 1] = \"Created\";\n MaterialPluginEvent[MaterialPluginEvent[\"Disposed\"] = 2] = \"Disposed\";\n MaterialPluginEvent[MaterialPluginEvent[\"GetDefineNames\"] = 4] = \"GetDefineNames\";\n MaterialPluginEvent[MaterialPluginEvent[\"PrepareUniformBuffer\"] = 8] = \"PrepareUniformBuffer\";\n MaterialPluginEvent[MaterialPluginEvent[\"IsReadyForSubMesh\"] = 16] = \"IsReadyForSubMesh\";\n MaterialPluginEvent[MaterialPluginEvent[\"PrepareDefines\"] = 32] = \"PrepareDefines\";\n MaterialPluginEvent[MaterialPluginEvent[\"BindForSubMesh\"] = 64] = \"BindForSubMesh\";\n MaterialPluginEvent[MaterialPluginEvent[\"PrepareEffect\"] = 128] = \"PrepareEffect\";\n MaterialPluginEvent[MaterialPluginEvent[\"GetAnimatables\"] = 256] = \"GetAnimatables\";\n MaterialPluginEvent[MaterialPluginEvent[\"GetActiveTextures\"] = 512] = \"GetActiveTextures\";\n MaterialPluginEvent[MaterialPluginEvent[\"HasTexture\"] = 1024] = \"HasTexture\";\n MaterialPluginEvent[MaterialPluginEvent[\"FillRenderTargetTextures\"] = 2048] = \"FillRenderTargetTextures\";\n MaterialPluginEvent[MaterialPluginEvent[\"HasRenderTargetTextures\"] = 4096] = \"HasRenderTargetTextures\";\n MaterialPluginEvent[MaterialPluginEvent[\"HardBindForSubMesh\"] = 8192] = \"HardBindForSubMesh\";\n})(MaterialPluginEvent || (MaterialPluginEvent = {}));\n//# sourceMappingURL=materialPluginEvent.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serialize, SerializationHelper } from \"../Misc/decorators.js\";\nimport { Tools } from \"../Misc/tools.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { SubMesh } from \"../Meshes/subMesh.js\";\nimport { UniformBuffer } from \"./uniformBuffer.js\";\n\nimport { Logger } from \"../Misc/logger.js\";\nimport { Plane } from \"../Maths/math.plane.js\";\nimport { MaterialHelper } from \"./materialHelper.js\";\nimport { DrawWrapper } from \"./drawWrapper.js\";\nimport { MaterialStencilState } from \"./materialStencilState.js\";\nimport { ScenePerformancePriority } from \"../scene.js\";\nimport { MaterialPluginEvent } from \"./materialPluginEvent.js\";\n/**\n * Base class for the main features of a material in Babylon.js\n */\nexport class Material {\n /**\n * If the material can be rendered to several textures with MRT extension\n */\n get canRenderToMRT() {\n // By default, shaders are not compatible with MRTs\n // Base classes should override that if their shader supports MRT\n return false;\n }\n /**\n * Sets the alpha value of the material\n */\n set alpha(value) {\n if (this._alpha === value) {\n return;\n }\n const oldValue = this._alpha;\n this._alpha = value;\n // Only call dirty when there is a state change (no alpha / alpha)\n if (oldValue === 1 || value === 1) {\n this.markAsDirty(Material.MiscDirtyFlag + Material.PrePassDirtyFlag);\n }\n }\n /**\n * Gets the alpha value of the material\n */\n get alpha() {\n return this._alpha;\n }\n /**\n * Sets the culling state (true to enable culling, false to disable)\n */\n set backFaceCulling(value) {\n if (this._backFaceCulling === value) {\n return;\n }\n this._backFaceCulling = value;\n this.markAsDirty(Material.TextureDirtyFlag);\n }\n /**\n * Gets the culling state\n */\n get backFaceCulling() {\n return this._backFaceCulling;\n }\n /**\n * Sets the type of faces that should be culled (true for back faces, false for front faces)\n */\n set cullBackFaces(value) {\n if (this._cullBackFaces === value) {\n return;\n }\n this._cullBackFaces = value;\n this.markAsDirty(Material.TextureDirtyFlag);\n }\n /**\n * Gets the type of faces that should be culled\n */\n get cullBackFaces() {\n return this._cullBackFaces;\n }\n /**\n * Block the dirty-mechanism for this specific material\n * When set to false after being true the material will be marked as dirty.\n */\n get blockDirtyMechanism() {\n return this._blockDirtyMechanism;\n }\n set blockDirtyMechanism(value) {\n if (this._blockDirtyMechanism === value) {\n return;\n }\n this._blockDirtyMechanism = value;\n if (!value) {\n this.markDirty();\n }\n }\n /**\n * This allows you to modify the material without marking it as dirty after every change.\n * This function should be used if you need to make more than one dirty-enabling change to the material - adding a texture, setting a new fill mode and so on.\n * The callback will pass the material as an argument, so you can make your changes to it.\n * @param callback the callback to be executed that will update the material\n */\n atomicMaterialsUpdate(callback) {\n this.blockDirtyMechanism = true;\n try {\n callback(this);\n }\n finally {\n this.blockDirtyMechanism = false;\n }\n }\n /**\n * Gets a boolean indicating that current material needs to register RTT\n */\n get hasRenderTargetTextures() {\n this._eventInfo.hasRenderTargetTextures = false;\n this._callbackPluginEventHasRenderTargetTextures(this._eventInfo);\n return this._eventInfo.hasRenderTargetTextures;\n }\n /**\n * Called during a dispose event\n */\n set onDispose(callback) {\n if (this._onDisposeObserver) {\n this.onDisposeObservable.remove(this._onDisposeObserver);\n }\n this._onDisposeObserver = this.onDisposeObservable.add(callback);\n }\n /**\n * An event triggered when the material is bound\n */\n get onBindObservable() {\n if (!this._onBindObservable) {\n this._onBindObservable = new Observable();\n }\n return this._onBindObservable;\n }\n /**\n * Called during a bind event\n */\n set onBind(callback) {\n if (this._onBindObserver) {\n this.onBindObservable.remove(this._onBindObserver);\n }\n this._onBindObserver = this.onBindObservable.add(callback);\n }\n /**\n * An event triggered when the material is unbound\n */\n get onUnBindObservable() {\n if (!this._onUnBindObservable) {\n this._onUnBindObservable = new Observable();\n }\n return this._onUnBindObservable;\n }\n /**\n * An event triggered when the effect is (re)created\n */\n get onEffectCreatedObservable() {\n if (!this._onEffectCreatedObservable) {\n this._onEffectCreatedObservable = new Observable();\n }\n return this._onEffectCreatedObservable;\n }\n /**\n * Sets the value of the alpha mode.\n *\n * | Value | Type | Description |\n * | --- | --- | --- |\n * | 0 | ALPHA_DISABLE | |\n * | 1 | ALPHA_ADD | |\n * | 2 | ALPHA_COMBINE | |\n * | 3 | ALPHA_SUBTRACT | |\n * | 4 | ALPHA_MULTIPLY | |\n * | 5 | ALPHA_MAXIMIZED | |\n * | 6 | ALPHA_ONEONE | |\n * | 7 | ALPHA_PREMULTIPLIED | |\n * | 8 | ALPHA_PREMULTIPLIED_PORTERDUFF | |\n * | 9 | ALPHA_INTERPOLATE | |\n * | 10 | ALPHA_SCREENMODE | |\n *\n */\n set alphaMode(value) {\n if (this._alphaMode === value) {\n return;\n }\n this._alphaMode = value;\n this.markAsDirty(Material.TextureDirtyFlag);\n }\n /**\n * Gets the value of the alpha mode\n */\n get alphaMode() {\n return this._alphaMode;\n }\n /**\n * Sets the need depth pre-pass value\n */\n set needDepthPrePass(value) {\n if (this._needDepthPrePass === value) {\n return;\n }\n this._needDepthPrePass = value;\n if (this._needDepthPrePass) {\n this.checkReadyOnEveryCall = true;\n }\n }\n /**\n * Gets the depth pre-pass value\n */\n get needDepthPrePass() {\n return this._needDepthPrePass;\n }\n /**\n * Can this material render to prepass\n */\n get isPrePassCapable() {\n return false;\n }\n /**\n * Sets the state for enabling fog\n */\n set fogEnabled(value) {\n if (this._fogEnabled === value) {\n return;\n }\n this._fogEnabled = value;\n this.markAsDirty(Material.MiscDirtyFlag);\n }\n /**\n * Gets the value of the fog enabled state\n */\n get fogEnabled() {\n return this._fogEnabled;\n }\n get wireframe() {\n switch (this._fillMode) {\n case Material.WireFrameFillMode:\n case Material.LineListDrawMode:\n case Material.LineLoopDrawMode:\n case Material.LineStripDrawMode:\n return true;\n }\n return this._scene.forceWireframe;\n }\n /**\n * Sets the state of wireframe mode\n */\n set wireframe(value) {\n this.fillMode = value ? Material.WireFrameFillMode : Material.TriangleFillMode;\n }\n /**\n * Gets the value specifying if point clouds are enabled\n */\n get pointsCloud() {\n switch (this._fillMode) {\n case Material.PointFillMode:\n case Material.PointListDrawMode:\n return true;\n }\n return this._scene.forcePointsCloud;\n }\n /**\n * Sets the state of point cloud mode\n */\n set pointsCloud(value) {\n this.fillMode = value ? Material.PointFillMode : Material.TriangleFillMode;\n }\n /**\n * Gets the material fill mode\n */\n get fillMode() {\n return this._fillMode;\n }\n /**\n * Sets the material fill mode\n */\n set fillMode(value) {\n if (this._fillMode === value) {\n return;\n }\n this._fillMode = value;\n this.markAsDirty(Material.MiscDirtyFlag);\n }\n /** @internal */\n _getDrawWrapper() {\n return this._drawWrapper;\n }\n /**\n * @internal\n */\n _setDrawWrapper(drawWrapper) {\n this._drawWrapper = drawWrapper;\n }\n /**\n * Creates a material instance\n * @param name defines the name of the material\n * @param scene defines the scene to reference\n * @param doNotAdd specifies if the material should be added to the scene\n */\n constructor(name, scene, doNotAdd) {\n /**\n * Custom shadow depth material to use for shadow rendering instead of the in-built one\n */\n this.shadowDepthWrapper = null;\n /**\n * Gets or sets a boolean indicating that the material is allowed (if supported) to do shader hot swapping.\n * This means that the material can keep using a previous shader while a new one is being compiled.\n * This is mostly used when shader parallel compilation is supported (true by default)\n */\n this.allowShaderHotSwapping = true;\n /**\n * Gets or sets user defined metadata\n */\n this.metadata = null;\n /**\n * For internal use only. Please do not use.\n */\n this.reservedDataStore = null;\n /**\n * Specifies if the ready state should be checked on each call\n */\n this.checkReadyOnEveryCall = false;\n /**\n * Specifies if the ready state should be checked once\n */\n this.checkReadyOnlyOnce = false;\n /**\n * The state of the material\n */\n this.state = \"\";\n /**\n * The alpha value of the material\n */\n this._alpha = 1.0;\n /**\n * Specifies if back face culling is enabled\n */\n this._backFaceCulling = true;\n /**\n * Specifies if back or front faces should be culled (when culling is enabled)\n */\n this._cullBackFaces = true;\n this._blockDirtyMechanism = false;\n /**\n * Callback triggered when the material is compiled\n */\n this.onCompiled = null;\n /**\n * Callback triggered when an error occurs\n */\n this.onError = null;\n /**\n * Callback triggered to get the render target textures\n */\n this.getRenderTargetTextures = null;\n /**\n * Specifies if the material should be serialized\n */\n this.doNotSerialize = false;\n /**\n * @internal\n */\n this._storeEffectOnSubMeshes = false;\n /**\n * Stores the animations for the material\n */\n this.animations = null;\n /**\n * An event triggered when the material is disposed\n */\n this.onDisposeObservable = new Observable();\n /**\n * An observer which watches for dispose events\n */\n this._onDisposeObserver = null;\n this._onUnBindObservable = null;\n /**\n * An observer which watches for bind events\n */\n this._onBindObserver = null;\n /**\n * Stores the value of the alpha mode\n */\n this._alphaMode = 2;\n /**\n * Stores the state of the need depth pre-pass value\n */\n this._needDepthPrePass = false;\n /**\n * Specifies if depth writing should be disabled\n */\n this.disableDepthWrite = false;\n /**\n * Specifies if color writing should be disabled\n */\n this.disableColorWrite = false;\n /**\n * Specifies if depth writing should be forced\n */\n this.forceDepthWrite = false;\n /**\n * Specifies the depth function that should be used. 0 means the default engine function\n */\n this.depthFunction = 0;\n /**\n * Specifies if there should be a separate pass for culling\n */\n this.separateCullingPass = false;\n /**\n * Stores the state specifying if fog should be enabled\n */\n this._fogEnabled = true;\n /**\n * Stores the size of points\n */\n this.pointSize = 1.0;\n /**\n * Stores the z offset Factor value\n */\n this.zOffset = 0;\n /**\n * Stores the z offset Units value\n */\n this.zOffsetUnits = 0;\n /**\n * Gives access to the stencil properties of the material\n */\n this.stencil = new MaterialStencilState();\n /**\n * Specifies if uniform buffers should be used\n */\n this._useUBO = false;\n /**\n * Stores the fill mode state\n */\n this._fillMode = Material.TriangleFillMode;\n /**\n * Specifies if the depth write state should be cached\n */\n this._cachedDepthWriteState = false;\n /**\n * Specifies if the color write state should be cached\n */\n this._cachedColorWriteState = false;\n /**\n * Specifies if the depth function state should be cached\n */\n this._cachedDepthFunctionState = 0;\n /** @internal */\n this._indexInSceneMaterialArray = -1;\n /** @internal */\n this.meshMap = null;\n /** @internal */\n this._parentContainer = null;\n /** @internal */\n this._uniformBufferLayoutBuilt = false;\n this._eventInfo = {}; // will be initialized before each event notification\n /** @internal */\n this._callbackPluginEventGeneric = () => void 0;\n /** @internal */\n this._callbackPluginEventIsReadyForSubMesh = () => void 0;\n /** @internal */\n this._callbackPluginEventPrepareDefines = () => void 0;\n /** @internal */\n this._callbackPluginEventPrepareDefinesBeforeAttributes = () => void 0;\n /** @internal */\n this._callbackPluginEventHardBindForSubMesh = () => void 0;\n /** @internal */\n this._callbackPluginEventBindForSubMesh = () => void 0;\n /** @internal */\n this._callbackPluginEventHasRenderTargetTextures = () => void 0;\n /** @internal */\n this._callbackPluginEventFillRenderTargetTextures = () => void 0;\n /**\n * Enforces alpha test in opaque or blend mode in order to improve the performances of some situations.\n */\n this._forceAlphaTest = false;\n /**\n * The transparency mode of the material.\n */\n this._transparencyMode = null;\n this.name = name;\n const setScene = scene || EngineStore.LastCreatedScene;\n if (!setScene) {\n return;\n }\n this._scene = setScene;\n this._dirtyCallbacks = {};\n this._dirtyCallbacks[1] = this._markAllSubMeshesAsTexturesDirty.bind(this);\n this._dirtyCallbacks[2] = this._markAllSubMeshesAsLightsDirty.bind(this);\n this._dirtyCallbacks[4] = this._markAllSubMeshesAsFresnelDirty.bind(this);\n this._dirtyCallbacks[8] = this._markAllSubMeshesAsAttributesDirty.bind(this);\n this._dirtyCallbacks[16] = this._markAllSubMeshesAsMiscDirty.bind(this);\n this._dirtyCallbacks[32] = this._markAllSubMeshesAsPrePassDirty.bind(this);\n this._dirtyCallbacks[63] = this._markAllSubMeshesAsAllDirty.bind(this);\n this.id = name || Tools.RandomId();\n this.uniqueId = this._scene.getUniqueId();\n this._materialContext = this._scene.getEngine().createMaterialContext();\n this._drawWrapper = new DrawWrapper(this._scene.getEngine(), false);\n this._drawWrapper.materialContext = this._materialContext;\n if (this._scene.useRightHandedSystem) {\n this.sideOrientation = Material.ClockWiseSideOrientation;\n }\n else {\n this.sideOrientation = Material.CounterClockWiseSideOrientation;\n }\n this._uniformBuffer = new UniformBuffer(this._scene.getEngine(), undefined, undefined, name);\n this._useUBO = this.getScene().getEngine().supportsUniformBuffers;\n if (!doNotAdd) {\n this._scene.addMaterial(this);\n }\n if (this._scene.useMaterialMeshMap) {\n this.meshMap = {};\n }\n Material.OnEventObservable.notifyObservers(this, MaterialPluginEvent.Created);\n }\n /**\n * Returns a string representation of the current material\n * @param fullDetails defines a boolean indicating which levels of logging is desired\n * @returns a string with material information\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n toString(fullDetails) {\n const ret = \"Name: \" + this.name;\n return ret;\n }\n /**\n * Gets the class name of the material\n * @returns a string with the class name of the material\n */\n getClassName() {\n return \"Material\";\n }\n /** @internal */\n get _isMaterial() {\n return true;\n }\n /**\n * Specifies if updates for the material been locked\n */\n get isFrozen() {\n return this.checkReadyOnlyOnce;\n }\n /**\n * Locks updates for the material\n */\n freeze() {\n this.markDirty();\n this.checkReadyOnlyOnce = true;\n }\n /**\n * Unlocks updates for the material\n */\n unfreeze() {\n this.markDirty();\n this.checkReadyOnlyOnce = false;\n }\n /**\n * Specifies if the material is ready to be used\n * @param mesh defines the mesh to check\n * @param useInstances specifies if instances should be used\n * @returns a boolean indicating if the material is ready to be used\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isReady(mesh, useInstances) {\n return true;\n }\n /**\n * Specifies that the submesh is ready to be used\n * @param mesh defines the mesh to check\n * @param subMesh defines which submesh to check\n * @param useInstances specifies that instances should be used\n * @returns a boolean indicating that the submesh is ready or not\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isReadyForSubMesh(mesh, subMesh, useInstances) {\n const defines = subMesh.materialDefines;\n if (!defines) {\n return false;\n }\n this._eventInfo.isReadyForSubMesh = true;\n this._eventInfo.defines = defines;\n this._callbackPluginEventIsReadyForSubMesh(this._eventInfo);\n return this._eventInfo.isReadyForSubMesh;\n }\n /**\n * Returns the material effect\n * @returns the effect associated with the material\n */\n getEffect() {\n return this._drawWrapper.effect;\n }\n /**\n * Returns the current scene\n * @returns a Scene\n */\n getScene() {\n return this._scene;\n }\n /**\n * Gets the current transparency mode.\n */\n get transparencyMode() {\n return this._transparencyMode;\n }\n /**\n * Sets the transparency mode of the material.\n *\n * | Value | Type | Description |\n * | ----- | ----------------------------------- | ----------- |\n * | 0 | OPAQUE | |\n * | 1 | ALPHATEST | |\n * | 2 | ALPHABLEND | |\n * | 3 | ALPHATESTANDBLEND | |\n *\n */\n set transparencyMode(value) {\n if (this._transparencyMode === value) {\n return;\n }\n this._transparencyMode = value;\n this._forceAlphaTest = value === Material.MATERIAL_ALPHATESTANDBLEND;\n this._markAllSubMeshesAsTexturesAndMiscDirty();\n }\n /**\n * Returns true if alpha blending should be disabled.\n */\n get _disableAlphaBlending() {\n return this._transparencyMode === Material.MATERIAL_OPAQUE || this._transparencyMode === Material.MATERIAL_ALPHATEST;\n }\n /**\n * Specifies whether or not this material should be rendered in alpha blend mode.\n * @returns a boolean specifying if alpha blending is needed\n */\n needAlphaBlending() {\n if (this._disableAlphaBlending) {\n return false;\n }\n return this.alpha < 1.0;\n }\n /**\n * Specifies if the mesh will require alpha blending\n * @param mesh defines the mesh to check\n * @returns a boolean specifying if alpha blending is needed for the mesh\n */\n needAlphaBlendingForMesh(mesh) {\n if (mesh.visibility < 1.0) {\n return true;\n }\n if (this._disableAlphaBlending) {\n return false;\n }\n return mesh.hasVertexAlpha || this.needAlphaBlending();\n }\n /**\n * Specifies whether or not this material should be rendered in alpha test mode.\n * @returns a boolean specifying if an alpha test is needed.\n */\n needAlphaTesting() {\n if (this._forceAlphaTest) {\n return true;\n }\n return false;\n }\n /**\n * Specifies if material alpha testing should be turned on for the mesh\n * @param mesh defines the mesh to check\n */\n _shouldTurnAlphaTestOn(mesh) {\n return !this.needAlphaBlendingForMesh(mesh) && this.needAlphaTesting();\n }\n /**\n * Gets the texture used for the alpha test\n * @returns the texture to use for alpha testing\n */\n getAlphaTestTexture() {\n return null;\n }\n /**\n * Marks the material to indicate that it needs to be re-calculated\n * @param forceMaterialDirty - Forces the material to be marked as dirty for all components (same as this.markAsDirty(Material.AllDirtyFlag)). You should use this flag if the material is frozen and you want to force a recompilation.\n */\n markDirty(forceMaterialDirty = false) {\n const meshes = this.getScene().meshes;\n for (const mesh of meshes) {\n if (!mesh.subMeshes) {\n continue;\n }\n for (const subMesh of mesh.subMeshes) {\n if (subMesh.getMaterial() !== this) {\n continue;\n }\n if (!subMesh.effect) {\n continue;\n }\n subMesh.effect._wasPreviouslyReady = false;\n subMesh.effect._wasPreviouslyUsingInstances = null;\n subMesh.effect._forceRebindOnNextCall = forceMaterialDirty;\n }\n }\n if (forceMaterialDirty) {\n this.markAsDirty(Material.AllDirtyFlag);\n }\n }\n /**\n * @internal\n */\n _preBind(effect, overrideOrientation = null) {\n const engine = this._scene.getEngine();\n const orientation = overrideOrientation == null ? this.sideOrientation : overrideOrientation;\n const reverse = orientation === Material.ClockWiseSideOrientation;\n engine.enableEffect(effect ? effect : this._getDrawWrapper());\n engine.setState(this.backFaceCulling, this.zOffset, false, reverse, this._scene._mirroredCameraPosition ? !this.cullBackFaces : this.cullBackFaces, this.stencil, this.zOffsetUnits);\n return reverse;\n }\n /**\n * Binds the material to the mesh\n * @param world defines the world transformation matrix\n * @param mesh defines the mesh to bind the material to\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n bind(world, mesh) { }\n /**\n * Initializes the uniform buffer layout for the shader.\n */\n buildUniformLayout() {\n const ubo = this._uniformBuffer;\n this._eventInfo.ubo = ubo;\n this._callbackPluginEventGeneric(MaterialPluginEvent.PrepareUniformBuffer, this._eventInfo);\n ubo.create();\n this._uniformBufferLayoutBuilt = true;\n }\n /**\n * Binds the submesh to the material\n * @param world defines the world transformation matrix\n * @param mesh defines the mesh containing the submesh\n * @param subMesh defines the submesh to bind the material to\n */\n bindForSubMesh(world, mesh, subMesh) {\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventBindForSubMesh(this._eventInfo);\n effect._forceRebindOnNextCall = false;\n }\n /**\n * Binds the world matrix to the material\n * @param world defines the world transformation matrix\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n bindOnlyWorldMatrix(world) { }\n /**\n * Binds the view matrix to the effect\n * @param effect defines the effect to bind the view matrix to\n */\n bindView(effect) {\n if (!this._useUBO) {\n effect.setMatrix(\"view\", this.getScene().getViewMatrix());\n }\n else {\n this._needToBindSceneUbo = true;\n }\n }\n /**\n * Binds the view projection and projection matrices to the effect\n * @param effect defines the effect to bind the view projection and projection matrices to\n */\n bindViewProjection(effect) {\n if (!this._useUBO) {\n effect.setMatrix(\"viewProjection\", this.getScene().getTransformMatrix());\n effect.setMatrix(\"projection\", this.getScene().getProjectionMatrix());\n }\n else {\n this._needToBindSceneUbo = true;\n }\n }\n /**\n * Binds the view matrix to the effect\n * @param effect defines the effect to bind the view matrix to\n * @param variableName name of the shader variable that will hold the eye position\n */\n bindEyePosition(effect, variableName) {\n if (!this._useUBO) {\n this._scene.bindEyePosition(effect, variableName);\n }\n else {\n this._needToBindSceneUbo = true;\n }\n }\n /**\n * Processes to execute after binding the material to a mesh\n * @param mesh defines the rendered mesh\n * @param effect\n */\n _afterBind(mesh, effect = null) {\n this._scene._cachedMaterial = this;\n if (this._needToBindSceneUbo) {\n if (effect) {\n this._needToBindSceneUbo = false;\n MaterialHelper.BindSceneUniformBuffer(effect, this.getScene().getSceneUniformBuffer());\n this._scene.finalizeSceneUbo();\n }\n }\n if (mesh) {\n this._scene._cachedVisibility = mesh.visibility;\n }\n else {\n this._scene._cachedVisibility = 1;\n }\n if (this._onBindObservable && mesh) {\n this._onBindObservable.notifyObservers(mesh);\n }\n if (this.disableDepthWrite) {\n const engine = this._scene.getEngine();\n this._cachedDepthWriteState = engine.getDepthWrite();\n engine.setDepthWrite(false);\n }\n if (this.disableColorWrite) {\n const engine = this._scene.getEngine();\n this._cachedColorWriteState = engine.getColorWrite();\n engine.setColorWrite(false);\n }\n if (this.depthFunction !== 0) {\n const engine = this._scene.getEngine();\n this._cachedDepthFunctionState = engine.getDepthFunction() || 0;\n engine.setDepthFunction(this.depthFunction);\n }\n }\n /**\n * Unbinds the material from the mesh\n */\n unbind() {\n if (this._onUnBindObservable) {\n this._onUnBindObservable.notifyObservers(this);\n }\n if (this.depthFunction !== 0) {\n const engine = this._scene.getEngine();\n engine.setDepthFunction(this._cachedDepthFunctionState);\n }\n if (this.disableDepthWrite) {\n const engine = this._scene.getEngine();\n engine.setDepthWrite(this._cachedDepthWriteState);\n }\n if (this.disableColorWrite) {\n const engine = this._scene.getEngine();\n engine.setColorWrite(this._cachedColorWriteState);\n }\n }\n /**\n * Returns the animatable textures.\n * @returns - Array of animatable textures.\n */\n getAnimatables() {\n this._eventInfo.animatables = [];\n this._callbackPluginEventGeneric(MaterialPluginEvent.GetAnimatables, this._eventInfo);\n return this._eventInfo.animatables;\n }\n /**\n * Gets the active textures from the material\n * @returns an array of textures\n */\n getActiveTextures() {\n this._eventInfo.activeTextures = [];\n this._callbackPluginEventGeneric(MaterialPluginEvent.GetActiveTextures, this._eventInfo);\n return this._eventInfo.activeTextures;\n }\n /**\n * Specifies if the material uses a texture\n * @param texture defines the texture to check against the material\n * @returns a boolean specifying if the material uses the texture\n */\n hasTexture(texture) {\n this._eventInfo.hasTexture = false;\n this._eventInfo.texture = texture;\n this._callbackPluginEventGeneric(MaterialPluginEvent.HasTexture, this._eventInfo);\n return this._eventInfo.hasTexture;\n }\n /**\n * Makes a duplicate of the material, and gives it a new name\n * @param name defines the new name for the duplicated material\n * @returns the cloned material\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n clone(name) {\n return null;\n }\n _clonePlugins(targetMaterial, rootUrl) {\n const serializationObject = {};\n // Create plugins in targetMaterial in case they don't exist\n this._serializePlugins(serializationObject);\n Material._parsePlugins(serializationObject, targetMaterial, this._scene, rootUrl);\n // Copy the properties of the current plugins to the cloned material's plugins\n if (this.pluginManager) {\n for (const plugin of this.pluginManager._plugins) {\n const targetPlugin = targetMaterial.pluginManager.getPlugin(plugin.name);\n plugin.copyTo(targetPlugin);\n }\n }\n }\n /**\n * Gets the meshes bound to the material\n * @returns an array of meshes bound to the material\n */\n getBindedMeshes() {\n if (this.meshMap) {\n const result = [];\n for (const meshId in this.meshMap) {\n const mesh = this.meshMap[meshId];\n if (mesh) {\n result.push(mesh);\n }\n }\n return result;\n }\n else {\n const meshes = this._scene.meshes;\n return meshes.filter((mesh) => mesh.material === this);\n }\n }\n /**\n * Force shader compilation\n * @param mesh defines the mesh associated with this material\n * @param onCompiled defines a function to execute once the material is compiled\n * @param options defines the options to configure the compilation\n * @param onError defines a function to execute if the material fails compiling\n */\n forceCompilation(mesh, onCompiled, options, onError) {\n const localOptions = Object.assign({ clipPlane: false, useInstances: false }, options);\n const scene = this.getScene();\n const currentHotSwapingState = this.allowShaderHotSwapping;\n this.allowShaderHotSwapping = false; // Turned off to let us evaluate the real compilation state\n const checkReady = () => {\n if (!this._scene || !this._scene.getEngine()) {\n return;\n }\n const clipPlaneState = scene.clipPlane;\n if (localOptions.clipPlane) {\n scene.clipPlane = new Plane(0, 0, 0, 1);\n }\n if (this._storeEffectOnSubMeshes) {\n let allDone = true, lastError = null;\n if (mesh.subMeshes) {\n const tempSubMesh = new SubMesh(0, 0, 0, 0, 0, mesh, undefined, false, false);\n if (tempSubMesh.materialDefines) {\n tempSubMesh.materialDefines._renderId = -1;\n }\n if (!this.isReadyForSubMesh(mesh, tempSubMesh, localOptions.useInstances)) {\n if (tempSubMesh.effect && tempSubMesh.effect.getCompilationError() && tempSubMesh.effect.allFallbacksProcessed()) {\n lastError = tempSubMesh.effect.getCompilationError();\n }\n else {\n allDone = false;\n setTimeout(checkReady, 16);\n }\n }\n }\n if (allDone) {\n this.allowShaderHotSwapping = currentHotSwapingState;\n if (lastError) {\n if (onError) {\n onError(lastError);\n }\n }\n if (onCompiled) {\n onCompiled(this);\n }\n }\n }\n else {\n if (this.isReady()) {\n this.allowShaderHotSwapping = currentHotSwapingState;\n if (onCompiled) {\n onCompiled(this);\n }\n }\n else {\n setTimeout(checkReady, 16);\n }\n }\n if (localOptions.clipPlane) {\n scene.clipPlane = clipPlaneState;\n }\n };\n checkReady();\n }\n /**\n * Force shader compilation\n * @param mesh defines the mesh that will use this material\n * @param options defines additional options for compiling the shaders\n * @returns a promise that resolves when the compilation completes\n */\n forceCompilationAsync(mesh, options) {\n return new Promise((resolve, reject) => {\n this.forceCompilation(mesh, () => {\n resolve();\n }, options, (reason) => {\n reject(reason);\n });\n });\n }\n /**\n * Marks a define in the material to indicate that it needs to be re-computed\n * @param flag defines a flag used to determine which parts of the material have to be marked as dirty\n */\n markAsDirty(flag) {\n if (this.getScene().blockMaterialDirtyMechanism || this._blockDirtyMechanism) {\n return;\n }\n Material._DirtyCallbackArray.length = 0;\n if (flag & Material.TextureDirtyFlag) {\n Material._DirtyCallbackArray.push(Material._TextureDirtyCallBack);\n }\n if (flag & Material.LightDirtyFlag) {\n Material._DirtyCallbackArray.push(Material._LightsDirtyCallBack);\n }\n if (flag & Material.FresnelDirtyFlag) {\n Material._DirtyCallbackArray.push(Material._FresnelDirtyCallBack);\n }\n if (flag & Material.AttributesDirtyFlag) {\n Material._DirtyCallbackArray.push(Material._AttributeDirtyCallBack);\n }\n if (flag & Material.MiscDirtyFlag) {\n Material._DirtyCallbackArray.push(Material._MiscDirtyCallBack);\n }\n if (flag & Material.PrePassDirtyFlag) {\n Material._DirtyCallbackArray.push(Material._PrePassDirtyCallBack);\n }\n if (Material._DirtyCallbackArray.length) {\n this._markAllSubMeshesAsDirty(Material._RunDirtyCallBacks);\n }\n this.getScene().resetCachedMaterial();\n }\n /**\n * Resets the draw wrappers cache for all submeshes that are using this material\n */\n resetDrawCache() {\n const meshes = this.getScene().meshes;\n for (const mesh of meshes) {\n if (!mesh.subMeshes) {\n continue;\n }\n for (const subMesh of mesh.subMeshes) {\n if (subMesh.getMaterial() !== this) {\n continue;\n }\n subMesh.resetDrawCache();\n }\n }\n }\n /**\n * Marks all submeshes of a material to indicate that their material defines need to be re-calculated\n * @param func defines a function which checks material defines against the submeshes\n */\n _markAllSubMeshesAsDirty(func) {\n if (this.getScene().blockMaterialDirtyMechanism || this._blockDirtyMechanism) {\n return;\n }\n const meshes = this.getScene().meshes;\n for (const mesh of meshes) {\n if (!mesh.subMeshes) {\n continue;\n }\n for (const subMesh of mesh.subMeshes) {\n // We want to skip the submeshes which are not using this material or which have not yet rendered at least once\n if (subMesh.getMaterial(false) !== this) {\n continue;\n }\n for (const drawWrapper of subMesh._drawWrappers) {\n if (!drawWrapper || !drawWrapper.defines || !drawWrapper.defines.markAllAsDirty) {\n continue;\n }\n if (this._materialContext === drawWrapper.materialContext) {\n func(drawWrapper.defines);\n }\n }\n }\n }\n }\n /**\n * Indicates that the scene should check if the rendering now needs a prepass\n */\n _markScenePrePassDirty() {\n if (this.getScene().blockMaterialDirtyMechanism || this._blockDirtyMechanism) {\n return;\n }\n const prePassRenderer = this.getScene().enablePrePassRenderer();\n if (prePassRenderer) {\n prePassRenderer.markAsDirty();\n }\n }\n /**\n * Indicates that we need to re-calculated for all submeshes\n */\n _markAllSubMeshesAsAllDirty() {\n this._markAllSubMeshesAsDirty(Material._AllDirtyCallBack);\n }\n /**\n * Indicates that image processing needs to be re-calculated for all submeshes\n */\n _markAllSubMeshesAsImageProcessingDirty() {\n this._markAllSubMeshesAsDirty(Material._ImageProcessingDirtyCallBack);\n }\n /**\n * Indicates that textures need to be re-calculated for all submeshes\n */\n _markAllSubMeshesAsTexturesDirty() {\n this._markAllSubMeshesAsDirty(Material._TextureDirtyCallBack);\n }\n /**\n * Indicates that fresnel needs to be re-calculated for all submeshes\n */\n _markAllSubMeshesAsFresnelDirty() {\n this._markAllSubMeshesAsDirty(Material._FresnelDirtyCallBack);\n }\n /**\n * Indicates that fresnel and misc need to be re-calculated for all submeshes\n */\n _markAllSubMeshesAsFresnelAndMiscDirty() {\n this._markAllSubMeshesAsDirty(Material._FresnelAndMiscDirtyCallBack);\n }\n /**\n * Indicates that lights need to be re-calculated for all submeshes\n */\n _markAllSubMeshesAsLightsDirty() {\n this._markAllSubMeshesAsDirty(Material._LightsDirtyCallBack);\n }\n /**\n * Indicates that attributes need to be re-calculated for all submeshes\n */\n _markAllSubMeshesAsAttributesDirty() {\n this._markAllSubMeshesAsDirty(Material._AttributeDirtyCallBack);\n }\n /**\n * Indicates that misc needs to be re-calculated for all submeshes\n */\n _markAllSubMeshesAsMiscDirty() {\n this._markAllSubMeshesAsDirty(Material._MiscDirtyCallBack);\n }\n /**\n * Indicates that prepass needs to be re-calculated for all submeshes\n */\n _markAllSubMeshesAsPrePassDirty() {\n this._markAllSubMeshesAsDirty(Material._MiscDirtyCallBack);\n }\n /**\n * Indicates that textures and misc need to be re-calculated for all submeshes\n */\n _markAllSubMeshesAsTexturesAndMiscDirty() {\n this._markAllSubMeshesAsDirty(Material._TextureAndMiscDirtyCallBack);\n }\n _checkScenePerformancePriority() {\n if (this._scene.performancePriority !== ScenePerformancePriority.BackwardCompatible) {\n this.checkReadyOnlyOnce = true;\n // re-set the flag when the perf priority changes\n const observer = this._scene.onScenePerformancePriorityChangedObservable.addOnce(() => {\n this.checkReadyOnlyOnce = false;\n });\n // if this material is disposed before the scene is disposed, cleanup the observer\n this.onDisposeObservable.add(() => {\n this._scene.onScenePerformancePriorityChangedObservable.remove(observer);\n });\n }\n }\n /**\n * Sets the required values to the prepass renderer.\n * @param prePassRenderer defines the prepass renderer to setup.\n * @returns true if the pre pass is needed.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n setPrePassRenderer(prePassRenderer) {\n // Do Nothing by default\n return false;\n }\n /**\n * Disposes the material\n * @param forceDisposeEffect specifies if effects should be forcefully disposed\n * @param forceDisposeTextures specifies if textures should be forcefully disposed\n * @param notBoundToMesh specifies if the material that is being disposed is known to be not bound to any mesh\n */\n dispose(forceDisposeEffect, forceDisposeTextures, notBoundToMesh) {\n const scene = this.getScene();\n // Animations\n scene.stopAnimation(this);\n scene.freeProcessedMaterials();\n // Remove from scene\n scene.removeMaterial(this);\n this._eventInfo.forceDisposeTextures = forceDisposeTextures;\n this._callbackPluginEventGeneric(MaterialPluginEvent.Disposed, this._eventInfo);\n if (this._parentContainer) {\n const index = this._parentContainer.materials.indexOf(this);\n if (index > -1) {\n this._parentContainer.materials.splice(index, 1);\n }\n this._parentContainer = null;\n }\n if (notBoundToMesh !== true) {\n // Remove from meshes\n if (this.meshMap) {\n for (const meshId in this.meshMap) {\n const mesh = this.meshMap[meshId];\n if (mesh) {\n mesh.material = null; // will set the entry in the map to undefined\n this.releaseVertexArrayObject(mesh, forceDisposeEffect);\n }\n }\n }\n else {\n const meshes = scene.meshes;\n for (const mesh of meshes) {\n if (mesh.material === this && !mesh.sourceMesh) {\n mesh.material = null;\n this.releaseVertexArrayObject(mesh, forceDisposeEffect);\n }\n }\n }\n }\n this._uniformBuffer.dispose();\n // Shader are kept in cache for further use but we can get rid of this by using forceDisposeEffect\n if (forceDisposeEffect && this._drawWrapper.effect) {\n if (!this._storeEffectOnSubMeshes) {\n this._drawWrapper.effect.dispose();\n }\n this._drawWrapper.effect = null;\n }\n this.metadata = null;\n // Callback\n this.onDisposeObservable.notifyObservers(this);\n this.onDisposeObservable.clear();\n if (this._onBindObservable) {\n this._onBindObservable.clear();\n }\n if (this._onUnBindObservable) {\n this._onUnBindObservable.clear();\n }\n if (this._onEffectCreatedObservable) {\n this._onEffectCreatedObservable.clear();\n }\n if (this._eventInfo) {\n this._eventInfo = {};\n }\n }\n /**\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n releaseVertexArrayObject(mesh, forceDisposeEffect) {\n const geometry = mesh.geometry;\n if (geometry) {\n if (this._storeEffectOnSubMeshes) {\n if (mesh.subMeshes) {\n for (const subMesh of mesh.subMeshes) {\n geometry._releaseVertexArrayObject(subMesh.effect);\n if (forceDisposeEffect && subMesh.effect) {\n subMesh.effect.dispose();\n }\n }\n }\n }\n else {\n geometry._releaseVertexArrayObject(this._drawWrapper.effect);\n }\n }\n }\n /**\n * Serializes this material\n * @returns the serialized material object\n */\n serialize() {\n const serializationObject = SerializationHelper.Serialize(this);\n serializationObject.stencil = this.stencil.serialize();\n serializationObject.uniqueId = this.uniqueId;\n this._serializePlugins(serializationObject);\n return serializationObject;\n }\n _serializePlugins(serializationObject) {\n serializationObject.plugins = {};\n if (this.pluginManager) {\n for (const plugin of this.pluginManager._plugins) {\n serializationObject.plugins[plugin.getClassName()] = plugin.serialize();\n }\n }\n }\n /**\n * Creates a material from parsed material data\n * @param parsedMaterial defines parsed material data\n * @param scene defines the hosting scene\n * @param rootUrl defines the root URL to use to load textures\n * @returns a new material\n */\n static Parse(parsedMaterial, scene, rootUrl) {\n if (!parsedMaterial.customType) {\n parsedMaterial.customType = \"BABYLON.StandardMaterial\";\n }\n else if (parsedMaterial.customType === \"BABYLON.PBRMaterial\" && parsedMaterial.overloadedAlbedo) {\n parsedMaterial.customType = \"BABYLON.LegacyPBRMaterial\";\n if (!BABYLON.LegacyPBRMaterial) {\n Logger.Error(\"Your scene is trying to load a legacy version of the PBRMaterial, please, include it from the materials library.\");\n return null;\n }\n }\n const materialType = Tools.Instantiate(parsedMaterial.customType);\n const material = materialType.Parse(parsedMaterial, scene, rootUrl);\n material._loadedUniqueId = parsedMaterial.uniqueId;\n return material;\n }\n static _parsePlugins(serializationObject, material, scene, rootUrl) {\n var _a;\n if (!serializationObject.plugins) {\n return;\n }\n for (const pluginClassName in serializationObject.plugins) {\n const pluginData = serializationObject.plugins[pluginClassName];\n let plugin = (_a = material.pluginManager) === null || _a === void 0 ? void 0 : _a.getPlugin(pluginData.name);\n if (!plugin) {\n const pluginClassType = Tools.Instantiate(\"BABYLON.\" + pluginClassName);\n if (pluginClassType) {\n plugin = new pluginClassType(material);\n }\n }\n plugin === null || plugin === void 0 ? void 0 : plugin.parse(pluginData, scene, rootUrl);\n }\n }\n}\n/**\n * Returns the triangle fill mode\n */\nMaterial.TriangleFillMode = 0;\n/**\n * Returns the wireframe mode\n */\nMaterial.WireFrameFillMode = 1;\n/**\n * Returns the point fill mode\n */\nMaterial.PointFillMode = 2;\n/**\n * Returns the point list draw mode\n */\nMaterial.PointListDrawMode = 3;\n/**\n * Returns the line list draw mode\n */\nMaterial.LineListDrawMode = 4;\n/**\n * Returns the line loop draw mode\n */\nMaterial.LineLoopDrawMode = 5;\n/**\n * Returns the line strip draw mode\n */\nMaterial.LineStripDrawMode = 6;\n/**\n * Returns the triangle strip draw mode\n */\nMaterial.TriangleStripDrawMode = 7;\n/**\n * Returns the triangle fan draw mode\n */\nMaterial.TriangleFanDrawMode = 8;\n/**\n * Stores the clock-wise side orientation\n */\nMaterial.ClockWiseSideOrientation = 0;\n/**\n * Stores the counter clock-wise side orientation\n */\nMaterial.CounterClockWiseSideOrientation = 1;\n/**\n * The dirty texture flag value\n */\nMaterial.TextureDirtyFlag = 1;\n/**\n * The dirty light flag value\n */\nMaterial.LightDirtyFlag = 2;\n/**\n * The dirty fresnel flag value\n */\nMaterial.FresnelDirtyFlag = 4;\n/**\n * The dirty attribute flag value\n */\nMaterial.AttributesDirtyFlag = 8;\n/**\n * The dirty misc flag value\n */\nMaterial.MiscDirtyFlag = 16;\n/**\n * The dirty prepass flag value\n */\nMaterial.PrePassDirtyFlag = 32;\n/**\n * The all dirty flag value\n */\nMaterial.AllDirtyFlag = 63;\n/**\n * MaterialTransparencyMode: No transparency mode, Alpha channel is not use.\n */\nMaterial.MATERIAL_OPAQUE = 0;\n/**\n * MaterialTransparencyMode: Alpha Test mode, pixel are discarded below a certain threshold defined by the alpha cutoff value.\n */\nMaterial.MATERIAL_ALPHATEST = 1;\n/**\n * MaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\n */\nMaterial.MATERIAL_ALPHABLEND = 2;\n/**\n * MaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\n * They are also discarded below the alpha cutoff threshold to improve performances.\n */\nMaterial.MATERIAL_ALPHATESTANDBLEND = 3;\n/**\n * The Whiteout method is used to blend normals.\n * Details of the algorithm can be found here: https://blog.selfshadow.com/publications/blending-in-detail/\n */\nMaterial.MATERIAL_NORMALBLENDMETHOD_WHITEOUT = 0;\n/**\n * The Reoriented Normal Mapping method is used to blend normals.\n * Details of the algorithm can be found here: https://blog.selfshadow.com/publications/blending-in-detail/\n */\nMaterial.MATERIAL_NORMALBLENDMETHOD_RNM = 1;\n/**\n * Event observable which raises global events common to all materials (like MaterialPluginEvent.Created)\n */\nMaterial.OnEventObservable = new Observable();\nMaterial._AllDirtyCallBack = (defines) => defines.markAllAsDirty();\nMaterial._ImageProcessingDirtyCallBack = (defines) => defines.markAsImageProcessingDirty();\nMaterial._TextureDirtyCallBack = (defines) => defines.markAsTexturesDirty();\nMaterial._FresnelDirtyCallBack = (defines) => defines.markAsFresnelDirty();\nMaterial._MiscDirtyCallBack = (defines) => defines.markAsMiscDirty();\nMaterial._PrePassDirtyCallBack = (defines) => defines.markAsPrePassDirty();\nMaterial._LightsDirtyCallBack = (defines) => defines.markAsLightDirty();\nMaterial._AttributeDirtyCallBack = (defines) => defines.markAsAttributesDirty();\nMaterial._FresnelAndMiscDirtyCallBack = (defines) => {\n Material._FresnelDirtyCallBack(defines);\n Material._MiscDirtyCallBack(defines);\n};\nMaterial._TextureAndMiscDirtyCallBack = (defines) => {\n Material._TextureDirtyCallBack(defines);\n Material._MiscDirtyCallBack(defines);\n};\nMaterial._DirtyCallbackArray = [];\nMaterial._RunDirtyCallBacks = (defines) => {\n for (const cb of Material._DirtyCallbackArray) {\n cb(defines);\n }\n};\n__decorate([\n serialize()\n], Material.prototype, \"id\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"uniqueId\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"name\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"metadata\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"checkReadyOnEveryCall\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"checkReadyOnlyOnce\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"state\", void 0);\n__decorate([\n serialize(\"alpha\")\n], Material.prototype, \"_alpha\", void 0);\n__decorate([\n serialize(\"backFaceCulling\")\n], Material.prototype, \"_backFaceCulling\", void 0);\n__decorate([\n serialize(\"cullBackFaces\")\n], Material.prototype, \"_cullBackFaces\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"sideOrientation\", void 0);\n__decorate([\n serialize(\"alphaMode\")\n], Material.prototype, \"_alphaMode\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"_needDepthPrePass\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"disableDepthWrite\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"disableColorWrite\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"forceDepthWrite\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"depthFunction\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"separateCullingPass\", void 0);\n__decorate([\n serialize(\"fogEnabled\")\n], Material.prototype, \"_fogEnabled\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"pointSize\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"zOffset\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"zOffsetUnits\", void 0);\n__decorate([\n serialize()\n], Material.prototype, \"pointsCloud\", null);\n__decorate([\n serialize()\n], Material.prototype, \"fillMode\", null);\n__decorate([\n serialize()\n], Material.prototype, \"transparencyMode\", null);\n//# sourceMappingURL=material.js.map","import { Material } from \"../Materials/material.js\";\nimport { Tags } from \"../Misc/tags.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\n/**\n * A multi-material is used to apply different materials to different parts of the same object without the need of\n * separate meshes. This can be use to improve performances.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/multiMaterials\n */\nexport class MultiMaterial extends Material {\n /**\n * Gets or Sets the list of Materials used within the multi material.\n * They need to be ordered according to the submeshes order in the associated mesh\n */\n get subMaterials() {\n return this._subMaterials;\n }\n set subMaterials(value) {\n this._subMaterials = value;\n this._hookArray(value);\n }\n /**\n * Function used to align with Node.getChildren()\n * @returns the list of Materials used within the multi material\n */\n getChildren() {\n return this.subMaterials;\n }\n /**\n * Instantiates a new Multi Material\n * A multi-material is used to apply different materials to different parts of the same object without the need of\n * separate meshes. This can be use to improve performances.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/multiMaterials\n * @param name Define the name in the scene\n * @param scene Define the scene the material belongs to\n */\n constructor(name, scene) {\n super(name, scene, true);\n /** @internal */\n this._waitingSubMaterialsUniqueIds = [];\n this.getScene().addMultiMaterial(this);\n this.subMaterials = [];\n this._storeEffectOnSubMeshes = true; // multimaterial is considered like a push material\n }\n _hookArray(array) {\n const oldPush = array.push;\n array.push = (...items) => {\n const result = oldPush.apply(array, items);\n this._markAllSubMeshesAsTexturesDirty();\n return result;\n };\n const oldSplice = array.splice;\n array.splice = (index, deleteCount) => {\n const deleted = oldSplice.apply(array, [index, deleteCount]);\n this._markAllSubMeshesAsTexturesDirty();\n return deleted;\n };\n }\n /**\n * Get one of the submaterial by its index in the submaterials array\n * @param index The index to look the sub material at\n * @returns The Material if the index has been defined\n */\n getSubMaterial(index) {\n if (index < 0 || index >= this.subMaterials.length) {\n return this.getScene().defaultMaterial;\n }\n return this.subMaterials[index];\n }\n /**\n * Get the list of active textures for the whole sub materials list.\n * @returns All the textures that will be used during the rendering\n */\n getActiveTextures() {\n return super.getActiveTextures().concat(...this.subMaterials.map((subMaterial) => {\n if (subMaterial) {\n return subMaterial.getActiveTextures();\n }\n else {\n return [];\n }\n }));\n }\n /**\n * Specifies if any sub-materials of this multi-material use a given texture.\n * @param texture Defines the texture to check against this multi-material's sub-materials.\n * @returns A boolean specifying if any sub-material of this multi-material uses the texture.\n */\n hasTexture(texture) {\n var _a;\n if (super.hasTexture(texture)) {\n return true;\n }\n for (let i = 0; i < this.subMaterials.length; i++) {\n if ((_a = this.subMaterials[i]) === null || _a === void 0 ? void 0 : _a.hasTexture(texture)) {\n return true;\n }\n }\n return false;\n }\n /**\n * Gets the current class name of the material e.g. \"MultiMaterial\"\n * Mainly use in serialization.\n * @returns the class name\n */\n getClassName() {\n return \"MultiMaterial\";\n }\n /**\n * Checks if the material is ready to render the requested sub mesh\n * @param mesh Define the mesh the submesh belongs to\n * @param subMesh Define the sub mesh to look readiness for\n * @param useInstances Define whether or not the material is used with instances\n * @returns true if ready, otherwise false\n */\n isReadyForSubMesh(mesh, subMesh, useInstances) {\n for (let index = 0; index < this.subMaterials.length; index++) {\n const subMaterial = this.subMaterials[index];\n if (subMaterial) {\n if (subMaterial._storeEffectOnSubMeshes) {\n if (!subMaterial.isReadyForSubMesh(mesh, subMesh, useInstances)) {\n return false;\n }\n continue;\n }\n if (!subMaterial.isReady(mesh)) {\n return false;\n }\n }\n }\n return true;\n }\n /**\n * Clones the current material and its related sub materials\n * @param name Define the name of the newly cloned material\n * @param cloneChildren Define if submaterial will be cloned or shared with the parent instance\n * @returns the cloned material\n */\n clone(name, cloneChildren) {\n const newMultiMaterial = new MultiMaterial(name, this.getScene());\n for (let index = 0; index < this.subMaterials.length; index++) {\n let subMaterial = null;\n const current = this.subMaterials[index];\n if (cloneChildren && current) {\n subMaterial = current.clone(name + \"-\" + current.name);\n }\n else {\n subMaterial = this.subMaterials[index];\n }\n newMultiMaterial.subMaterials.push(subMaterial);\n }\n return newMultiMaterial;\n }\n /**\n * Serializes the materials into a JSON representation.\n * @returns the JSON representation\n */\n serialize() {\n const serializationObject = {};\n serializationObject.name = this.name;\n serializationObject.id = this.id;\n serializationObject.uniqueId = this.uniqueId;\n if (Tags) {\n serializationObject.tags = Tags.GetTags(this);\n }\n serializationObject.materialsUniqueIds = [];\n serializationObject.materials = [];\n for (let matIndex = 0; matIndex < this.subMaterials.length; matIndex++) {\n const subMat = this.subMaterials[matIndex];\n if (subMat) {\n serializationObject.materialsUniqueIds.push(subMat.uniqueId);\n serializationObject.materials.push(subMat.id);\n }\n else {\n serializationObject.materialsUniqueIds.push(null);\n serializationObject.materials.push(null);\n }\n }\n return serializationObject;\n }\n /**\n * Dispose the material and release its associated resources\n * @param forceDisposeEffect Define if we want to force disposing the associated effect (if false the shader is not released and could be reuse later on)\n * @param forceDisposeTextures Define if we want to force disposing the associated textures (if false, they will not be disposed and can still be use elsewhere in the app)\n * @param forceDisposeChildren Define if we want to force disposing the associated submaterials (if false, they will not be disposed and can still be use elsewhere in the app)\n */\n dispose(forceDisposeEffect, forceDisposeTextures, forceDisposeChildren) {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n if (forceDisposeChildren) {\n for (let index = 0; index < this.subMaterials.length; index++) {\n const subMaterial = this.subMaterials[index];\n if (subMaterial) {\n subMaterial.dispose(forceDisposeEffect, forceDisposeTextures);\n }\n }\n }\n const index = scene.multiMaterials.indexOf(this);\n if (index >= 0) {\n scene.multiMaterials.splice(index, 1);\n }\n super.dispose(forceDisposeEffect, forceDisposeTextures);\n }\n /**\n * Creates a MultiMaterial from parsed MultiMaterial data.\n * @param parsedMultiMaterial defines parsed MultiMaterial data.\n * @param scene defines the hosting scene\n * @returns a new MultiMaterial\n */\n static ParseMultiMaterial(parsedMultiMaterial, scene) {\n const multiMaterial = new MultiMaterial(parsedMultiMaterial.name, scene);\n multiMaterial.id = parsedMultiMaterial.id;\n multiMaterial._loadedUniqueId = parsedMultiMaterial.uniqueId;\n if (Tags) {\n Tags.AddTagsTo(multiMaterial, parsedMultiMaterial.tags);\n }\n if (parsedMultiMaterial.materialsUniqueIds) {\n multiMaterial._waitingSubMaterialsUniqueIds = parsedMultiMaterial.materialsUniqueIds;\n }\n else {\n parsedMultiMaterial.materials.forEach((subMatId) => multiMaterial.subMaterials.push(scene.getLastMaterialById(subMatId)));\n }\n return multiMaterial;\n }\n}\nRegisterClass(\"BABYLON.MultiMaterial\", MultiMaterial);\n//# sourceMappingURL=multiMaterial.js.map","/**\n * Class used to represent a specific level of detail of a mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/LOD\n */\nexport class MeshLODLevel {\n /**\n * Creates a new LOD level\n * @param distanceOrScreenCoverage defines either the distance or the screen coverage where this level should start being displayed\n * @param mesh defines the mesh to use to render this level\n */\n constructor(\n /** Either distance from the center of the object to show this level or the screen coverage if `useLODScreenCoverage` is set to `true` on the mesh*/\n distanceOrScreenCoverage, \n /** Defines the mesh to use to render this level */\n mesh) {\n this.distanceOrScreenCoverage = distanceOrScreenCoverage;\n this.mesh = mesh;\n }\n}\n//# sourceMappingURL=meshLODLevel.js.map","import { Observable } from \"../Misc/observable.js\";\nimport { Tools, AsyncLoop } from \"../Misc/tools.js\";\nimport { DeepCopier } from \"../Misc/deepCopier.js\";\nimport { Tags } from \"../Misc/tags.js\";\nimport { runCoroutineSync, runCoroutineAsync, createYieldingScheduler } from \"../Misc/coroutine.js\";\nimport { Camera } from \"../Cameras/camera.js\";\nimport { ScenePerformancePriority } from \"../scene.js\";\nimport { Quaternion, Matrix, Vector3, Vector2 } from \"../Maths/math.vector.js\";\nimport { Color3 } from \"../Maths/math.color.js\";\nimport { Node } from \"../node.js\";\nimport { VertexBuffer, Buffer } from \"../Buffers/buffer.js\";\nimport { VertexData } from \"./mesh.vertexData.js\";\nimport { Geometry } from \"./geometry.js\";\nimport { AbstractMesh } from \"./abstractMesh.js\";\nimport { SubMesh } from \"./subMesh.js\";\nimport { Material } from \"../Materials/material.js\";\nimport { MultiMaterial } from \"../Materials/multiMaterial.js\";\nimport { SceneLoaderFlags } from \"../Loading/sceneLoaderFlags.js\";\n\nimport { SerializationHelper } from \"../Misc/decorators.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { GetClass, RegisterClass } from \"../Misc/typeStore.js\";\nimport { _WarnImport } from \"../Misc/devTools.js\";\nimport { SceneComponentConstants } from \"../sceneComponent.js\";\nimport { MeshLODLevel } from \"./meshLODLevel.js\";\n/**\n * @internal\n **/\nexport class _CreationDataStorage {\n}\n/**\n * @internal\n **/\nclass _InstanceDataStorage {\n constructor() {\n this.visibleInstances = {};\n this.batchCache = new _InstancesBatch();\n this.batchCacheReplacementModeInFrozenMode = new _InstancesBatch();\n this.instancesBufferSize = 32 * 16 * 4; // let's start with a maximum of 32 instances\n }\n}\n/**\n * @internal\n **/\nexport class _InstancesBatch {\n constructor() {\n this.mustReturn = false;\n this.visibleInstances = new Array();\n this.renderSelf = [];\n this.hardwareInstancedRendering = [];\n }\n}\n/**\n * @internal\n **/\nclass _ThinInstanceDataStorage {\n constructor() {\n this.instancesCount = 0;\n this.matrixBuffer = null;\n this.previousMatrixBuffer = null;\n this.matrixBufferSize = 32 * 16; // let's start with a maximum of 32 thin instances\n this.matrixData = null;\n this.boundingVectors = [];\n this.worldMatrices = null;\n }\n}\n/**\n * @internal\n **/\nclass _InternalMeshDataInfo {\n constructor() {\n this._areNormalsFrozen = false; // Will be used by ribbons mainly\n // Will be used to save a source mesh reference, If any\n this._source = null;\n // Will be used to for fast cloned mesh lookup\n this.meshMap = null;\n this._preActivateId = -1;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n this._LODLevels = new Array();\n /** Alternative definition of LOD level, using screen coverage instead of distance */\n this._useLODScreenCoverage = false;\n this._effectiveMaterial = null;\n this._forcedInstanceCount = 0;\n this._overrideRenderingFillMode = null;\n }\n}\n/**\n * Class used to represent renderable models\n */\nexport class Mesh extends AbstractMesh {\n /**\n * Gets the default side orientation.\n * @param orientation the orientation to value to attempt to get\n * @returns the default orientation\n * @internal\n */\n static _GetDefaultSideOrientation(orientation) {\n return orientation || Mesh.FRONTSIDE; // works as Mesh.FRONTSIDE is 0\n }\n /**\n * Determines if the LOD levels are intended to be calculated using screen coverage (surface area ratio) instead of distance.\n */\n get useLODScreenCoverage() {\n return this._internalMeshDataInfo._useLODScreenCoverage;\n }\n set useLODScreenCoverage(value) {\n this._internalMeshDataInfo._useLODScreenCoverage = value;\n this._sortLODLevels();\n }\n get computeBonesUsingShaders() {\n return this._internalAbstractMeshDataInfo._computeBonesUsingShaders;\n }\n set computeBonesUsingShaders(value) {\n if (this._internalAbstractMeshDataInfo._computeBonesUsingShaders === value) {\n return;\n }\n if (value && this._internalMeshDataInfo._sourcePositions) {\n // switch from software to GPU computation: we need to reset the vertex and normal buffers that have been updated by the software process\n this.setVerticesData(VertexBuffer.PositionKind, this._internalMeshDataInfo._sourcePositions, true);\n if (this._internalMeshDataInfo._sourceNormals) {\n this.setVerticesData(VertexBuffer.NormalKind, this._internalMeshDataInfo._sourceNormals, true);\n }\n this._internalMeshDataInfo._sourcePositions = null;\n this._internalMeshDataInfo._sourceNormals = null;\n }\n this._internalAbstractMeshDataInfo._computeBonesUsingShaders = value;\n this._markSubMeshesAsAttributesDirty();\n }\n /**\n * An event triggered before rendering the mesh\n */\n get onBeforeRenderObservable() {\n if (!this._internalMeshDataInfo._onBeforeRenderObservable) {\n this._internalMeshDataInfo._onBeforeRenderObservable = new Observable();\n }\n return this._internalMeshDataInfo._onBeforeRenderObservable;\n }\n /**\n * An event triggered before binding the mesh\n */\n get onBeforeBindObservable() {\n if (!this._internalMeshDataInfo._onBeforeBindObservable) {\n this._internalMeshDataInfo._onBeforeBindObservable = new Observable();\n }\n return this._internalMeshDataInfo._onBeforeBindObservable;\n }\n /**\n * An event triggered after rendering the mesh\n */\n get onAfterRenderObservable() {\n if (!this._internalMeshDataInfo._onAfterRenderObservable) {\n this._internalMeshDataInfo._onAfterRenderObservable = new Observable();\n }\n return this._internalMeshDataInfo._onAfterRenderObservable;\n }\n /**\n * An event triggeredbetween rendering pass when using separateCullingPass = true\n */\n get onBetweenPassObservable() {\n if (!this._internalMeshDataInfo._onBetweenPassObservable) {\n this._internalMeshDataInfo._onBetweenPassObservable = new Observable();\n }\n return this._internalMeshDataInfo._onBetweenPassObservable;\n }\n /**\n * An event triggered before drawing the mesh\n */\n get onBeforeDrawObservable() {\n if (!this._internalMeshDataInfo._onBeforeDrawObservable) {\n this._internalMeshDataInfo._onBeforeDrawObservable = new Observable();\n }\n return this._internalMeshDataInfo._onBeforeDrawObservable;\n }\n /**\n * Sets a callback to call before drawing the mesh. It is recommended to use onBeforeDrawObservable instead\n */\n set onBeforeDraw(callback) {\n if (this._onBeforeDrawObserver) {\n this.onBeforeDrawObservable.remove(this._onBeforeDrawObserver);\n }\n this._onBeforeDrawObserver = this.onBeforeDrawObservable.add(callback);\n }\n get hasInstances() {\n return this.instances.length > 0;\n }\n get hasThinInstances() {\n var _a;\n return ((_a = this._thinInstanceDataStorage.instancesCount) !== null && _a !== void 0 ? _a : 0) > 0;\n }\n /**\n * Gets or sets the forced number of instances to display.\n * If 0 (default value), the number of instances is not forced and depends on the draw type\n * (regular / instance / thin instances mesh)\n */\n get forcedInstanceCount() {\n return this._internalMeshDataInfo._forcedInstanceCount;\n }\n set forcedInstanceCount(count) {\n this._internalMeshDataInfo._forcedInstanceCount = count;\n }\n /**\n * Use this property to override the Material's fillMode value\n */\n get overrideRenderingFillMode() {\n return this._internalMeshDataInfo._overrideRenderingFillMode;\n }\n set overrideRenderingFillMode(fillMode) {\n this._internalMeshDataInfo._overrideRenderingFillMode = fillMode;\n }\n /**\n * Gets the source mesh (the one used to clone this one from)\n */\n get source() {\n return this._internalMeshDataInfo._source;\n }\n /**\n * Gets the list of clones of this mesh\n * The scene must have been constructed with useClonedMeshMap=true for this to work!\n * Note that useClonedMeshMap=true is the default setting\n */\n get cloneMeshMap() {\n return this._internalMeshDataInfo.meshMap;\n }\n /**\n * Gets or sets a boolean indicating that this mesh does not use index buffer\n */\n get isUnIndexed() {\n return this._unIndexed;\n }\n set isUnIndexed(value) {\n if (this._unIndexed !== value) {\n this._unIndexed = value;\n this._markSubMeshesAsAttributesDirty();\n }\n }\n /** Gets the array buffer used to store the instanced buffer used for instances' world matrices */\n get worldMatrixInstancedBuffer() {\n return this._instanceDataStorage.instancesData;\n }\n /** Gets the array buffer used to store the instanced buffer used for instances' previous world matrices */\n get previousWorldMatrixInstancedBuffer() {\n return this._instanceDataStorage.instancesPreviousData;\n }\n /** Gets or sets a boolean indicating that the update of the instance buffer of the world matrices is manual */\n get manualUpdateOfWorldMatrixInstancedBuffer() {\n return this._instanceDataStorage.manualUpdate;\n }\n set manualUpdateOfWorldMatrixInstancedBuffer(value) {\n this._instanceDataStorage.manualUpdate = value;\n }\n /** Gets or sets a boolean indicating that the update of the instance buffer of the world matrices is manual */\n get manualUpdateOfPreviousWorldMatrixInstancedBuffer() {\n return this._instanceDataStorage.previousManualUpdate;\n }\n set manualUpdateOfPreviousWorldMatrixInstancedBuffer(value) {\n this._instanceDataStorage.previousManualUpdate = value;\n }\n /** Gets or sets a boolean indicating that the update of the instance buffer of the world matrices must be performed in all cases (and notably even in frozen mode) */\n get forceWorldMatrixInstancedBufferUpdate() {\n return this._instanceDataStorage.forceMatrixUpdates;\n }\n set forceWorldMatrixInstancedBufferUpdate(value) {\n this._instanceDataStorage.forceMatrixUpdates = value;\n }\n /**\n * @constructor\n * @param name The value used by scene.getMeshByName() to do a lookup.\n * @param scene The scene to add this mesh to.\n * @param parent The parent of this mesh, if it has one\n * @param source An optional Mesh from which geometry is shared, cloned.\n * @param doNotCloneChildren When cloning, skip cloning child meshes of source, default False.\n * When false, achieved by calling a clone(), also passing False.\n * This will make creation of children, recursive.\n * @param clonePhysicsImpostor When cloning, include cloning mesh physics impostor, default True.\n */\n constructor(name, scene = null, parent = null, source = null, doNotCloneChildren, clonePhysicsImpostor = true) {\n super(name, scene);\n // Internal data\n this._internalMeshDataInfo = new _InternalMeshDataInfo();\n // Members\n /**\n * Gets the delay loading state of the mesh (when delay loading is turned on)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/importers/incrementalLoading\n */\n this.delayLoadState = 0;\n /**\n * Gets the list of instances created from this mesh\n * it is not supposed to be modified manually.\n * Note also that the order of the InstancedMesh wihin the array is not significant and might change.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/copies/instances\n */\n this.instances = [];\n // Private\n /** @internal */\n this._creationDataStorage = null;\n /** @internal */\n this._geometry = null;\n /** @internal */\n this._instanceDataStorage = new _InstanceDataStorage();\n /** @internal */\n this._thinInstanceDataStorage = new _ThinInstanceDataStorage();\n /** @internal */\n this._shouldGenerateFlatShading = false;\n // Use by builder only to know what orientation were the mesh build in.\n /** @internal */\n this._originalBuilderSideOrientation = Mesh.DEFAULTSIDE;\n /**\n * Use this property to change the original side orientation defined at construction time\n */\n this.overrideMaterialSideOrientation = null;\n /**\n * Gets or sets a boolean indicating whether to render ignoring the active camera's max z setting. (false by default)\n * You should not mix meshes that have this property set to true with meshes that have it set to false if they all write\n * to the depth buffer, because the z-values are not comparable in the two cases and you will get rendering artifacts if you do.\n * You can set the property to true for meshes that do not write to the depth buffer, or set the same value (either false or true) otherwise.\n * Note this will reduce performance when set to true.\n */\n this.ignoreCameraMaxZ = false;\n scene = this.getScene();\n this._onBeforeDraw = (isInstance, world, effectiveMaterial) => {\n if (isInstance && effectiveMaterial) {\n if (this._uniformBuffer) {\n this.transferToEffect(world);\n }\n else {\n effectiveMaterial.bindOnlyWorldMatrix(world);\n }\n }\n };\n if (source) {\n // Geometry\n if (source._geometry) {\n source._geometry.applyToMesh(this);\n }\n // Deep copy\n DeepCopier.DeepCopy(source, this, [\n \"name\",\n \"material\",\n \"skeleton\",\n \"instances\",\n \"parent\",\n \"uniqueId\",\n \"source\",\n \"metadata\",\n \"morphTargetManager\",\n \"hasInstances\",\n \"worldMatrixInstancedBuffer\",\n \"previousWorldMatrixInstancedBuffer\",\n \"hasLODLevels\",\n \"geometry\",\n \"isBlocked\",\n \"areNormalsFrozen\",\n \"facetNb\",\n \"isFacetDataEnabled\",\n \"lightSources\",\n \"useBones\",\n \"isAnInstance\",\n \"collider\",\n \"edgesRenderer\",\n \"forward\",\n \"up\",\n \"right\",\n \"absolutePosition\",\n \"absoluteScaling\",\n \"absoluteRotationQuaternion\",\n \"isWorldMatrixFrozen\",\n \"nonUniformScaling\",\n \"behaviors\",\n \"worldMatrixFromCache\",\n \"hasThinInstances\",\n \"cloneMeshMap\",\n \"hasBoundingInfo\",\n \"physicsBody\",\n \"physicsImpostor\",\n ], [\"_poseMatrix\"]);\n // Source mesh\n this._internalMeshDataInfo._source = source;\n if (scene.useClonedMeshMap) {\n if (!source._internalMeshDataInfo.meshMap) {\n source._internalMeshDataInfo.meshMap = {};\n }\n source._internalMeshDataInfo.meshMap[this.uniqueId] = this;\n }\n // Construction Params\n // Clone parameters allowing mesh to be updated in case of parametric shapes.\n this._originalBuilderSideOrientation = source._originalBuilderSideOrientation;\n this._creationDataStorage = source._creationDataStorage;\n // Animation ranges\n if (source._ranges) {\n const ranges = source._ranges;\n for (const name in ranges) {\n if (!Object.prototype.hasOwnProperty.call(ranges, name)) {\n continue;\n }\n if (!ranges[name]) {\n continue;\n }\n this.createAnimationRange(name, ranges[name].from, ranges[name].to);\n }\n }\n // Metadata\n if (source.metadata && source.metadata.clone) {\n this.metadata = source.metadata.clone();\n }\n else {\n this.metadata = source.metadata;\n }\n this._internalMetadata = source._internalMetadata;\n // Tags\n if (Tags && Tags.HasTags(source)) {\n Tags.AddTagsTo(this, Tags.GetTags(source, true));\n }\n // Enabled. We shouldn't need to check the source's ancestors, as this mesh\n // will have the same ones.\n this.setEnabled(source.isEnabled(false));\n // Parent\n this.parent = source.parent;\n // Pivot\n this.setPivotMatrix(source.getPivotMatrix());\n this.id = name + \".\" + source.id;\n // Material\n this.material = source.material;\n if (!doNotCloneChildren) {\n // Children\n const directDescendants = source.getDescendants(true);\n for (let index = 0; index < directDescendants.length; index++) {\n const child = directDescendants[index];\n if (child.clone) {\n child.clone(name + \".\" + child.name, this);\n }\n }\n }\n // Morphs\n if (source.morphTargetManager) {\n this.morphTargetManager = source.morphTargetManager;\n }\n // Physics clone\n if (scene.getPhysicsEngine) {\n const physicsEngine = scene.getPhysicsEngine();\n if (clonePhysicsImpostor && physicsEngine) {\n if (physicsEngine.getPluginVersion() === 1) {\n const impostor = physicsEngine.getImpostorForPhysicsObject(source);\n if (impostor) {\n this.physicsImpostor = impostor.clone(this);\n }\n }\n else if (physicsEngine.getPluginVersion() === 2) {\n if (source.physicsBody) {\n source.physicsBody.clone(this);\n }\n }\n }\n }\n // Particles\n for (let index = 0; index < scene.particleSystems.length; index++) {\n const system = scene.particleSystems[index];\n if (system.emitter === source) {\n system.clone(system.name, this);\n }\n }\n // Skeleton\n this.skeleton = source.skeleton;\n this.refreshBoundingInfo(true, true);\n this.computeWorldMatrix(true);\n }\n // Parent\n if (parent !== null) {\n this.parent = parent;\n }\n this._instanceDataStorage.hardwareInstancedRendering = this.getEngine().getCaps().instancedArrays;\n this._internalMeshDataInfo._onMeshReadyObserverAdded = (observer) => {\n // only notify once! then unregister the observer\n observer.unregisterOnNextCall = true;\n if (this.isReady(true)) {\n this.onMeshReadyObservable.notifyObservers(this);\n }\n else {\n if (!this._internalMeshDataInfo._checkReadinessObserver) {\n this._internalMeshDataInfo._checkReadinessObserver = this._scene.onBeforeRenderObservable.add(() => {\n // check for complete readiness\n if (this.isReady(true)) {\n this._scene.onBeforeRenderObservable.remove(this._internalMeshDataInfo._checkReadinessObserver);\n this._internalMeshDataInfo._checkReadinessObserver = null;\n this.onMeshReadyObservable.notifyObservers(this);\n }\n });\n }\n }\n };\n this.onMeshReadyObservable = new Observable(this._internalMeshDataInfo._onMeshReadyObserverAdded);\n if (source) {\n source.onClonedObservable.notifyObservers(this);\n }\n }\n instantiateHierarchy(newParent = null, options, onNewNodeCreated) {\n const instance = this.getTotalVertices() === 0 || (options && options.doNotInstantiate && (options.doNotInstantiate === true || options.doNotInstantiate(this)))\n ? this.clone(\"Clone of \" + (this.name || this.id), newParent || this.parent, true)\n : this.createInstance(\"instance of \" + (this.name || this.id));\n instance.parent = newParent || this.parent;\n instance.position = this.position.clone();\n instance.scaling = this.scaling.clone();\n if (this.rotationQuaternion) {\n instance.rotationQuaternion = this.rotationQuaternion.clone();\n }\n else {\n instance.rotation = this.rotation.clone();\n }\n if (onNewNodeCreated) {\n onNewNodeCreated(this, instance);\n }\n for (const child of this.getChildTransformNodes(true)) {\n // instancedMesh should have a different sourced mesh\n if (child.getClassName() === \"InstancedMesh\" && instance.getClassName() === \"Mesh\" && child.sourceMesh === this) {\n child.instantiateHierarchy(instance, {\n doNotInstantiate: (options && options.doNotInstantiate) || false,\n newSourcedMesh: instance,\n }, onNewNodeCreated);\n }\n else {\n child.instantiateHierarchy(instance, options, onNewNodeCreated);\n }\n }\n return instance;\n }\n /**\n * Gets the class name\n * @returns the string \"Mesh\".\n */\n getClassName() {\n return \"Mesh\";\n }\n /** @internal */\n get _isMesh() {\n return true;\n }\n /**\n * Returns a description of this mesh\n * @param fullDetails define if full details about this mesh must be used\n * @returns a descriptive string representing this mesh\n */\n toString(fullDetails) {\n let ret = super.toString(fullDetails);\n ret += \", n vertices: \" + this.getTotalVertices();\n ret += \", parent: \" + (this._waitingParentId ? this._waitingParentId : this.parent ? this.parent.name : \"NONE\");\n if (this.animations) {\n for (let i = 0; i < this.animations.length; i++) {\n ret += \", animation[0]: \" + this.animations[i].toString(fullDetails);\n }\n }\n if (fullDetails) {\n if (this._geometry) {\n const ib = this.getIndices();\n const vb = this.getVerticesData(VertexBuffer.PositionKind);\n if (vb && ib) {\n ret += \", flat shading: \" + (vb.length / 3 === ib.length ? \"YES\" : \"NO\");\n }\n }\n else {\n ret += \", flat shading: UNKNOWN\";\n }\n }\n return ret;\n }\n /** @internal */\n _unBindEffect() {\n super._unBindEffect();\n for (const instance of this.instances) {\n instance._unBindEffect();\n }\n }\n /**\n * Gets a boolean indicating if this mesh has LOD\n */\n get hasLODLevels() {\n return this._internalMeshDataInfo._LODLevels.length > 0;\n }\n /**\n * Gets the list of MeshLODLevel associated with the current mesh\n * @returns an array of MeshLODLevel\n */\n getLODLevels() {\n return this._internalMeshDataInfo._LODLevels;\n }\n _sortLODLevels() {\n const sortingOrderFactor = this._internalMeshDataInfo._useLODScreenCoverage ? -1 : 1;\n this._internalMeshDataInfo._LODLevels.sort((a, b) => {\n if (a.distanceOrScreenCoverage < b.distanceOrScreenCoverage) {\n return sortingOrderFactor;\n }\n if (a.distanceOrScreenCoverage > b.distanceOrScreenCoverage) {\n return -sortingOrderFactor;\n }\n return 0;\n });\n }\n /**\n * Add a mesh as LOD level triggered at the given distance.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/LOD\n * @param distanceOrScreenCoverage Either distance from the center of the object to show this level or the screen coverage if `useScreenCoverage` is set to `true`.\n * If screen coverage, value is a fraction of the screen's total surface, between 0 and 1.\n * Example Playground for distance https://playground.babylonjs.com/#QE7KM#197\n * Example Playground for screen coverage https://playground.babylonjs.com/#QE7KM#196\n * @param mesh The mesh to be added as LOD level (can be null)\n * @returns This mesh (for chaining)\n */\n addLODLevel(distanceOrScreenCoverage, mesh) {\n if (mesh && mesh._masterMesh) {\n Logger.Warn(\"You cannot use a mesh as LOD level twice\");\n return this;\n }\n const level = new MeshLODLevel(distanceOrScreenCoverage, mesh);\n this._internalMeshDataInfo._LODLevels.push(level);\n if (mesh) {\n mesh._masterMesh = this;\n }\n this._sortLODLevels();\n return this;\n }\n /**\n * Returns the LOD level mesh at the passed distance or null if not found.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/LOD\n * @param distance The distance from the center of the object to show this level\n * @returns a Mesh or `null`\n */\n getLODLevelAtDistance(distance) {\n const internalDataInfo = this._internalMeshDataInfo;\n for (let index = 0; index < internalDataInfo._LODLevels.length; index++) {\n const level = internalDataInfo._LODLevels[index];\n if (level.distanceOrScreenCoverage === distance) {\n return level.mesh;\n }\n }\n return null;\n }\n /**\n * Remove a mesh from the LOD array\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/LOD\n * @param mesh defines the mesh to be removed\n * @returns This mesh (for chaining)\n */\n removeLODLevel(mesh) {\n const internalDataInfo = this._internalMeshDataInfo;\n for (let index = 0; index < internalDataInfo._LODLevels.length; index++) {\n if (internalDataInfo._LODLevels[index].mesh === mesh) {\n internalDataInfo._LODLevels.splice(index, 1);\n if (mesh) {\n mesh._masterMesh = null;\n }\n }\n }\n this._sortLODLevels();\n return this;\n }\n /**\n * Returns the registered LOD mesh distant from the parameter `camera` position if any, else returns the current mesh.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/LOD\n * @param camera defines the camera to use to compute distance\n * @param boundingSphere defines a custom bounding sphere to use instead of the one from this mesh\n * @returns This mesh (for chaining)\n */\n getLOD(camera, boundingSphere) {\n const internalDataInfo = this._internalMeshDataInfo;\n if (!internalDataInfo._LODLevels || internalDataInfo._LODLevels.length === 0) {\n return this;\n }\n const bSphere = boundingSphere || this.getBoundingInfo().boundingSphere;\n const distanceToCamera = camera.mode === Camera.ORTHOGRAPHIC_CAMERA ? camera.minZ : bSphere.centerWorld.subtract(camera.globalPosition).length();\n let compareValue = distanceToCamera;\n let compareSign = 1;\n if (internalDataInfo._useLODScreenCoverage) {\n const screenArea = camera.screenArea;\n let meshArea = (bSphere.radiusWorld * camera.minZ) / distanceToCamera;\n meshArea = meshArea * meshArea * Math.PI;\n compareValue = meshArea / screenArea;\n compareSign = -1;\n }\n if (compareSign * internalDataInfo._LODLevels[internalDataInfo._LODLevels.length - 1].distanceOrScreenCoverage > compareSign * compareValue) {\n if (this.onLODLevelSelection) {\n this.onLODLevelSelection(compareValue, this, this);\n }\n return this;\n }\n for (let index = 0; index < internalDataInfo._LODLevels.length; index++) {\n const level = internalDataInfo._LODLevels[index];\n if (compareSign * level.distanceOrScreenCoverage < compareSign * compareValue) {\n if (level.mesh) {\n if (level.mesh.delayLoadState === 4) {\n level.mesh._checkDelayState();\n return this;\n }\n if (level.mesh.delayLoadState === 2) {\n return this;\n }\n level.mesh._preActivate();\n level.mesh._updateSubMeshesBoundingInfo(this.worldMatrixFromCache);\n }\n if (this.onLODLevelSelection) {\n this.onLODLevelSelection(compareValue, this, level.mesh);\n }\n return level.mesh;\n }\n }\n if (this.onLODLevelSelection) {\n this.onLODLevelSelection(compareValue, this, this);\n }\n return this;\n }\n /**\n * Gets the mesh internal Geometry object\n */\n get geometry() {\n return this._geometry;\n }\n /**\n * Returns the total number of vertices within the mesh geometry or zero if the mesh has no geometry.\n * @returns the total number of vertices\n */\n getTotalVertices() {\n if (this._geometry === null || this._geometry === undefined) {\n return 0;\n }\n return this._geometry.getTotalVertices();\n }\n /**\n * Returns the content of an associated vertex buffer\n * @param kind defines which buffer to read from (positions, indices, normals, etc). Possible `kind` values :\n * - VertexBuffer.PositionKind\n * - VertexBuffer.UVKind\n * - VertexBuffer.UV2Kind\n * - VertexBuffer.UV3Kind\n * - VertexBuffer.UV4Kind\n * - VertexBuffer.UV5Kind\n * - VertexBuffer.UV6Kind\n * - VertexBuffer.ColorKind\n * - VertexBuffer.MatricesIndicesKind\n * - VertexBuffer.MatricesIndicesExtraKind\n * - VertexBuffer.MatricesWeightsKind\n * - VertexBuffer.MatricesWeightsExtraKind\n * @param copyWhenShared defines a boolean indicating that if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one\n * @param forceCopy defines a boolean forcing the copy of the buffer no matter what the value of copyWhenShared is\n * @param bypassInstanceData defines a boolean indicating that the function should not take into account the instance data (applies only if the mesh has instances). Default: false\n * @returns a FloatArray or null if the mesh has no geometry or no vertex buffer for this kind.\n */\n getVerticesData(kind, copyWhenShared, forceCopy, bypassInstanceData) {\n var _a, _b;\n if (!this._geometry) {\n return null;\n }\n let data = bypassInstanceData\n ? undefined\n : (_b = (_a = this._userInstancedBuffersStorage) === null || _a === void 0 ? void 0 : _a.vertexBuffers[kind]) === null || _b === void 0 ? void 0 : _b.getFloatData(this.instances.length + 1, // +1 because the master mesh is not included in the instances array\n forceCopy || (copyWhenShared && this._geometry.meshes.length !== 1));\n if (!data) {\n data = this._geometry.getVerticesData(kind, copyWhenShared, forceCopy);\n }\n return data;\n }\n /**\n * Returns the mesh VertexBuffer object from the requested `kind`\n * @param kind defines which buffer to read from (positions, indices, normals, etc). Possible `kind` values :\n * - VertexBuffer.PositionKind\n * - VertexBuffer.NormalKind\n * - VertexBuffer.UVKind\n * - VertexBuffer.UV2Kind\n * - VertexBuffer.UV3Kind\n * - VertexBuffer.UV4Kind\n * - VertexBuffer.UV5Kind\n * - VertexBuffer.UV6Kind\n * - VertexBuffer.ColorKind\n * - VertexBuffer.MatricesIndicesKind\n * - VertexBuffer.MatricesIndicesExtraKind\n * - VertexBuffer.MatricesWeightsKind\n * - VertexBuffer.MatricesWeightsExtraKind\n * @param bypassInstanceData defines a boolean indicating that the function should not take into account the instance data (applies only if the mesh has instances). Default: false\n * @returns a FloatArray or null if the mesh has no vertex buffer for this kind.\n */\n getVertexBuffer(kind, bypassInstanceData) {\n var _a, _b;\n if (!this._geometry) {\n return null;\n }\n return (_b = (bypassInstanceData ? undefined : (_a = this._userInstancedBuffersStorage) === null || _a === void 0 ? void 0 : _a.vertexBuffers[kind])) !== null && _b !== void 0 ? _b : this._geometry.getVertexBuffer(kind);\n }\n /**\n * Tests if a specific vertex buffer is associated with this mesh\n * @param kind defines which buffer to check (positions, indices, normals, etc). Possible `kind` values :\n * - VertexBuffer.PositionKind\n * - VertexBuffer.NormalKind\n * - VertexBuffer.UVKind\n * - VertexBuffer.UV2Kind\n * - VertexBuffer.UV3Kind\n * - VertexBuffer.UV4Kind\n * - VertexBuffer.UV5Kind\n * - VertexBuffer.UV6Kind\n * - VertexBuffer.ColorKind\n * - VertexBuffer.MatricesIndicesKind\n * - VertexBuffer.MatricesIndicesExtraKind\n * - VertexBuffer.MatricesWeightsKind\n * - VertexBuffer.MatricesWeightsExtraKind\n * @param bypassInstanceData defines a boolean indicating that the function should not take into account the instance data (applies only if the mesh has instances). Default: false\n * @returns a boolean\n */\n isVerticesDataPresent(kind, bypassInstanceData) {\n var _a;\n if (!this._geometry) {\n if (this._delayInfo) {\n return this._delayInfo.indexOf(kind) !== -1;\n }\n return false;\n }\n return (!bypassInstanceData && ((_a = this._userInstancedBuffersStorage) === null || _a === void 0 ? void 0 : _a.vertexBuffers[kind]) !== undefined) || this._geometry.isVerticesDataPresent(kind);\n }\n /**\n * Returns a boolean defining if the vertex data for the requested `kind` is updatable.\n * @param kind defines which buffer to check (positions, indices, normals, etc). Possible `kind` values :\n * - VertexBuffer.PositionKind\n * - VertexBuffer.UVKind\n * - VertexBuffer.UV2Kind\n * - VertexBuffer.UV3Kind\n * - VertexBuffer.UV4Kind\n * - VertexBuffer.UV5Kind\n * - VertexBuffer.UV6Kind\n * - VertexBuffer.ColorKind\n * - VertexBuffer.MatricesIndicesKind\n * - VertexBuffer.MatricesIndicesExtraKind\n * - VertexBuffer.MatricesWeightsKind\n * - VertexBuffer.MatricesWeightsExtraKind\n * @param bypassInstanceData defines a boolean indicating that the function should not take into account the instance data (applies only if the mesh has instances). Default: false\n * @returns a boolean\n */\n isVertexBufferUpdatable(kind, bypassInstanceData) {\n var _a;\n if (!this._geometry) {\n if (this._delayInfo) {\n return this._delayInfo.indexOf(kind) !== -1;\n }\n return false;\n }\n if (!bypassInstanceData) {\n const buffer = (_a = this._userInstancedBuffersStorage) === null || _a === void 0 ? void 0 : _a.vertexBuffers[kind];\n if (buffer) {\n return buffer.isUpdatable();\n }\n }\n return this._geometry.isVertexBufferUpdatable(kind);\n }\n /**\n * Returns a string which contains the list of existing `kinds` of Vertex Data associated with this mesh.\n * @param bypassInstanceData defines a boolean indicating that the function should not take into account the instance data (applies only if the mesh has instances). Default: false\n * @returns an array of strings\n */\n getVerticesDataKinds(bypassInstanceData) {\n if (!this._geometry) {\n const result = [];\n if (this._delayInfo) {\n this._delayInfo.forEach(function (kind) {\n result.push(kind);\n });\n }\n return result;\n }\n const kinds = this._geometry.getVerticesDataKinds();\n if (!bypassInstanceData && this._userInstancedBuffersStorage) {\n for (const kind in this._userInstancedBuffersStorage.vertexBuffers) {\n if (kinds.indexOf(kind) === -1) {\n kinds.push(kind);\n }\n }\n }\n return kinds;\n }\n /**\n * Returns a positive integer : the total number of indices in this mesh geometry.\n * @returns the numner of indices or zero if the mesh has no geometry.\n */\n getTotalIndices() {\n if (!this._geometry) {\n return 0;\n }\n return this._geometry.getTotalIndices();\n }\n /**\n * Returns an array of integers or a typed array (Int32Array, Uint32Array, Uint16Array) populated with the mesh indices.\n * @param copyWhenShared If true (default false) and and if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one.\n * @param forceCopy defines a boolean indicating that the returned array must be cloned upon returning it\n * @returns the indices array or an empty array if the mesh has no geometry\n */\n getIndices(copyWhenShared, forceCopy) {\n if (!this._geometry) {\n return [];\n }\n return this._geometry.getIndices(copyWhenShared, forceCopy);\n }\n get isBlocked() {\n return this._masterMesh !== null && this._masterMesh !== undefined;\n }\n /**\n * Determine if the current mesh is ready to be rendered\n * @param completeCheck defines if a complete check (including materials and lights) has to be done (false by default)\n * @param forceInstanceSupport will check if the mesh will be ready when used with instances (false by default)\n * @returns true if all associated assets are ready (material, textures, shaders)\n */\n isReady(completeCheck = false, forceInstanceSupport = false) {\n var _a, _b, _c, _d, _e, _f, _g;\n if (this.delayLoadState === 2) {\n return false;\n }\n if (!super.isReady(completeCheck)) {\n return false;\n }\n if (!this.subMeshes || this.subMeshes.length === 0) {\n return true;\n }\n if (!completeCheck) {\n return true;\n }\n const engine = this.getEngine();\n const scene = this.getScene();\n const hardwareInstancedRendering = forceInstanceSupport || (engine.getCaps().instancedArrays && (this.instances.length > 0 || this.hasThinInstances));\n this.computeWorldMatrix();\n const mat = this.material || scene.defaultMaterial;\n if (mat) {\n if (mat._storeEffectOnSubMeshes) {\n for (const subMesh of this.subMeshes) {\n const effectiveMaterial = subMesh.getMaterial();\n if (effectiveMaterial) {\n if (effectiveMaterial._storeEffectOnSubMeshes) {\n if (!effectiveMaterial.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {\n return false;\n }\n }\n else {\n if (!effectiveMaterial.isReady(this, hardwareInstancedRendering)) {\n return false;\n }\n }\n }\n }\n }\n else {\n if (!mat.isReady(this, hardwareInstancedRendering)) {\n return false;\n }\n }\n }\n // Shadows\n const currentRenderPassId = engine.currentRenderPassId;\n for (const light of this.lightSources) {\n const generators = light.getShadowGenerators();\n if (!generators) {\n continue;\n }\n const iterator = generators.values();\n for (let key = iterator.next(); key.done !== true; key = iterator.next()) {\n const generator = key.value;\n if (generator && (!((_a = generator.getShadowMap()) === null || _a === void 0 ? void 0 : _a.renderList) || (((_b = generator.getShadowMap()) === null || _b === void 0 ? void 0 : _b.renderList) && ((_d = (_c = generator.getShadowMap()) === null || _c === void 0 ? void 0 : _c.renderList) === null || _d === void 0 ? void 0 : _d.indexOf(this)) !== -1))) {\n const shadowMap = generator.getShadowMap();\n const renderPassIds = (_e = shadowMap.renderPassIds) !== null && _e !== void 0 ? _e : [engine.currentRenderPassId];\n for (let p = 0; p < renderPassIds.length; ++p) {\n engine.currentRenderPassId = renderPassIds[p];\n for (const subMesh of this.subMeshes) {\n if (!generator.isReady(subMesh, hardwareInstancedRendering, (_g = (_f = subMesh.getMaterial()) === null || _f === void 0 ? void 0 : _f.needAlphaBlendingForMesh(this)) !== null && _g !== void 0 ? _g : false)) {\n engine.currentRenderPassId = currentRenderPassId;\n return false;\n }\n }\n }\n engine.currentRenderPassId = currentRenderPassId;\n }\n }\n }\n // LOD\n for (const lod of this._internalMeshDataInfo._LODLevels) {\n if (lod.mesh && !lod.mesh.isReady(hardwareInstancedRendering)) {\n return false;\n }\n }\n return true;\n }\n /**\n * Gets a boolean indicating if the normals aren't to be recomputed on next mesh `positions` array update. This property is pertinent only for updatable parametric shapes.\n */\n get areNormalsFrozen() {\n return this._internalMeshDataInfo._areNormalsFrozen;\n }\n /**\n * This function affects parametric shapes on vertex position update only : ribbons, tubes, etc. It has no effect at all on other shapes. It prevents the mesh normals from being recomputed on next `positions` array update.\n * @returns the current mesh\n */\n freezeNormals() {\n this._internalMeshDataInfo._areNormalsFrozen = true;\n return this;\n }\n /**\n * This function affects parametric shapes on vertex position update only : ribbons, tubes, etc. It has no effect at all on other shapes. It reactivates the mesh normals computation if it was previously frozen\n * @returns the current mesh\n */\n unfreezeNormals() {\n this._internalMeshDataInfo._areNormalsFrozen = false;\n return this;\n }\n /**\n * Sets a value overriding the instance count. Only applicable when custom instanced InterleavedVertexBuffer are used rather than InstancedMeshs\n */\n set overridenInstanceCount(count) {\n this._instanceDataStorage.overridenInstanceCount = count;\n }\n // Methods\n /** @internal */\n _preActivate() {\n const internalDataInfo = this._internalMeshDataInfo;\n const sceneRenderId = this.getScene().getRenderId();\n if (internalDataInfo._preActivateId === sceneRenderId) {\n return this;\n }\n internalDataInfo._preActivateId = sceneRenderId;\n this._instanceDataStorage.visibleInstances = null;\n return this;\n }\n /**\n * @internal\n */\n _preActivateForIntermediateRendering(renderId) {\n if (this._instanceDataStorage.visibleInstances) {\n this._instanceDataStorage.visibleInstances.intermediateDefaultRenderId = renderId;\n }\n return this;\n }\n /**\n * @internal\n */\n _registerInstanceForRenderId(instance, renderId) {\n if (!this._instanceDataStorage.visibleInstances) {\n this._instanceDataStorage.visibleInstances = {\n defaultRenderId: renderId,\n selfDefaultRenderId: this._renderId,\n };\n }\n if (!this._instanceDataStorage.visibleInstances[renderId]) {\n if (this._instanceDataStorage.previousRenderId !== undefined && this._instanceDataStorage.isFrozen) {\n this._instanceDataStorage.visibleInstances[this._instanceDataStorage.previousRenderId] = null;\n }\n this._instanceDataStorage.previousRenderId = renderId;\n this._instanceDataStorage.visibleInstances[renderId] = new Array();\n }\n this._instanceDataStorage.visibleInstances[renderId].push(instance);\n return this;\n }\n _afterComputeWorldMatrix() {\n super._afterComputeWorldMatrix();\n if (!this.hasThinInstances) {\n return;\n }\n if (!this.doNotSyncBoundingInfo) {\n this.thinInstanceRefreshBoundingInfo(false);\n }\n }\n /** @internal */\n _postActivate() {\n if (this.edgesShareWithInstances && this.edgesRenderer && this.edgesRenderer.isEnabled && this._renderingGroup) {\n this._renderingGroup._edgesRenderers.pushNoDuplicate(this.edgesRenderer);\n this.edgesRenderer.customInstances.push(this.getWorldMatrix());\n }\n }\n /**\n * This method recomputes and sets a new BoundingInfo to the mesh unless it is locked.\n * This means the mesh underlying bounding box and sphere are recomputed.\n * @param applySkeleton defines whether to apply the skeleton before computing the bounding info\n * @param applyMorph defines whether to apply the morph target before computing the bounding info\n * @returns the current mesh\n */\n refreshBoundingInfo(applySkeleton = false, applyMorph = false) {\n if (this.hasBoundingInfo && this.getBoundingInfo().isLocked) {\n return this;\n }\n const bias = this.geometry ? this.geometry.boundingBias : null;\n this._refreshBoundingInfo(this._getPositionData(applySkeleton, applyMorph), bias);\n return this;\n }\n /**\n * @internal\n */\n _createGlobalSubMesh(force) {\n const totalVertices = this.getTotalVertices();\n if (!totalVertices || !this.getIndices()) {\n return null;\n }\n // Check if we need to recreate the submeshes\n if (this.subMeshes && this.subMeshes.length > 0) {\n const ib = this.getIndices();\n if (!ib) {\n return null;\n }\n const totalIndices = ib.length;\n let needToRecreate = false;\n if (force) {\n needToRecreate = true;\n }\n else {\n for (const submesh of this.subMeshes) {\n if (submesh.indexStart + submesh.indexCount > totalIndices) {\n needToRecreate = true;\n break;\n }\n if (submesh.verticesStart + submesh.verticesCount > totalVertices) {\n needToRecreate = true;\n break;\n }\n }\n }\n if (!needToRecreate) {\n return this.subMeshes[0];\n }\n }\n this.releaseSubMeshes();\n return new SubMesh(0, 0, totalVertices, 0, this.getTotalIndices(), this);\n }\n /**\n * This function will subdivide the mesh into multiple submeshes\n * @param count defines the expected number of submeshes\n */\n subdivide(count) {\n if (count < 1) {\n return;\n }\n const totalIndices = this.getTotalIndices();\n let subdivisionSize = (totalIndices / count) | 0;\n let offset = 0;\n // Ensure that subdivisionSize is a multiple of 3\n while (subdivisionSize % 3 !== 0) {\n subdivisionSize++;\n }\n this.releaseSubMeshes();\n for (let index = 0; index < count; index++) {\n if (offset >= totalIndices) {\n break;\n }\n SubMesh.CreateFromIndices(0, offset, index === count - 1 ? totalIndices - offset : subdivisionSize, this, undefined, false);\n offset += subdivisionSize;\n }\n this.refreshBoundingInfo();\n this.synchronizeInstances();\n }\n /**\n * Copy a FloatArray into a specific associated vertex buffer\n * @param kind defines which buffer to write to (positions, indices, normals, etc). Possible `kind` values :\n * - VertexBuffer.PositionKind\n * - VertexBuffer.UVKind\n * - VertexBuffer.UV2Kind\n * - VertexBuffer.UV3Kind\n * - VertexBuffer.UV4Kind\n * - VertexBuffer.UV5Kind\n * - VertexBuffer.UV6Kind\n * - VertexBuffer.ColorKind\n * - VertexBuffer.MatricesIndicesKind\n * - VertexBuffer.MatricesIndicesExtraKind\n * - VertexBuffer.MatricesWeightsKind\n * - VertexBuffer.MatricesWeightsExtraKind\n * @param data defines the data source\n * @param updatable defines if the updated vertex buffer must be flagged as updatable\n * @param stride defines the data stride size (can be null)\n * @returns the current mesh\n */\n setVerticesData(kind, data, updatable = false, stride) {\n if (!this._geometry) {\n const vertexData = new VertexData();\n vertexData.set(data, kind);\n const scene = this.getScene();\n new Geometry(Geometry.RandomId(), scene, vertexData, updatable, this);\n }\n else {\n this._geometry.setVerticesData(kind, data, updatable, stride);\n }\n return this;\n }\n /**\n * Delete a vertex buffer associated with this mesh\n * @param kind defines which buffer to delete (positions, indices, normals, etc). Possible `kind` values :\n * - VertexBuffer.PositionKind\n * - VertexBuffer.UVKind\n * - VertexBuffer.UV2Kind\n * - VertexBuffer.UV3Kind\n * - VertexBuffer.UV4Kind\n * - VertexBuffer.UV5Kind\n * - VertexBuffer.UV6Kind\n * - VertexBuffer.ColorKind\n * - VertexBuffer.MatricesIndicesKind\n * - VertexBuffer.MatricesIndicesExtraKind\n * - VertexBuffer.MatricesWeightsKind\n * - VertexBuffer.MatricesWeightsExtraKind\n */\n removeVerticesData(kind) {\n if (!this._geometry) {\n return;\n }\n this._geometry.removeVerticesData(kind);\n }\n /**\n * Flags an associated vertex buffer as updatable\n * @param kind defines which buffer to use (positions, indices, normals, etc). Possible `kind` values :\n * - VertexBuffer.PositionKind\n * - VertexBuffer.UVKind\n * - VertexBuffer.UV2Kind\n * - VertexBuffer.UV3Kind\n * - VertexBuffer.UV4Kind\n * - VertexBuffer.UV5Kind\n * - VertexBuffer.UV6Kind\n * - VertexBuffer.ColorKind\n * - VertexBuffer.MatricesIndicesKind\n * - VertexBuffer.MatricesIndicesExtraKind\n * - VertexBuffer.MatricesWeightsKind\n * - VertexBuffer.MatricesWeightsExtraKind\n * @param updatable defines if the updated vertex buffer must be flagged as updatable\n */\n markVerticesDataAsUpdatable(kind, updatable = true) {\n const vb = this.getVertexBuffer(kind);\n if (!vb || vb.isUpdatable() === updatable) {\n return;\n }\n this.setVerticesData(kind, this.getVerticesData(kind), updatable);\n }\n /**\n * Sets the mesh global Vertex Buffer\n * @param buffer defines the buffer to use\n * @param disposeExistingBuffer disposes the existing buffer, if any (default: true)\n * @returns the current mesh\n */\n setVerticesBuffer(buffer, disposeExistingBuffer = true) {\n if (!this._geometry) {\n this._geometry = Geometry.CreateGeometryForMesh(this);\n }\n this._geometry.setVerticesBuffer(buffer, null, disposeExistingBuffer);\n return this;\n }\n /**\n * Update a specific associated vertex buffer\n * @param kind defines which buffer to write to (positions, indices, normals, etc). Possible `kind` values :\n * - VertexBuffer.PositionKind\n * - VertexBuffer.UVKind\n * - VertexBuffer.UV2Kind\n * - VertexBuffer.UV3Kind\n * - VertexBuffer.UV4Kind\n * - VertexBuffer.UV5Kind\n * - VertexBuffer.UV6Kind\n * - VertexBuffer.ColorKind\n * - VertexBuffer.MatricesIndicesKind\n * - VertexBuffer.MatricesIndicesExtraKind\n * - VertexBuffer.MatricesWeightsKind\n * - VertexBuffer.MatricesWeightsExtraKind\n * @param data defines the data source\n * @param updateExtends defines if extends info of the mesh must be updated (can be null). This is mostly useful for \"position\" kind\n * @param makeItUnique defines if the geometry associated with the mesh must be cloned to make the change only for this mesh (and not all meshes associated with the same geometry)\n * @returns the current mesh\n */\n updateVerticesData(kind, data, updateExtends, makeItUnique) {\n if (!this._geometry) {\n return this;\n }\n if (!makeItUnique) {\n this._geometry.updateVerticesData(kind, data, updateExtends);\n }\n else {\n this.makeGeometryUnique();\n this.updateVerticesData(kind, data, updateExtends, false);\n }\n return this;\n }\n /**\n * This method updates the vertex positions of an updatable mesh according to the `positionFunction` returned values.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#other-shapes-updatemeshpositions\n * @param positionFunction is a simple JS function what is passed the mesh `positions` array. It doesn't need to return anything\n * @param computeNormals is a boolean (default true) to enable/disable the mesh normal recomputation after the vertex position update\n * @returns the current mesh\n */\n updateMeshPositions(positionFunction, computeNormals = true) {\n const positions = this.getVerticesData(VertexBuffer.PositionKind);\n if (!positions) {\n return this;\n }\n positionFunction(positions);\n this.updateVerticesData(VertexBuffer.PositionKind, positions, false, false);\n if (computeNormals) {\n const indices = this.getIndices();\n const normals = this.getVerticesData(VertexBuffer.NormalKind);\n if (!normals) {\n return this;\n }\n VertexData.ComputeNormals(positions, indices, normals);\n this.updateVerticesData(VertexBuffer.NormalKind, normals, false, false);\n }\n return this;\n }\n /**\n * Creates a un-shared specific occurence of the geometry for the mesh.\n * @returns the current mesh\n */\n makeGeometryUnique() {\n if (!this._geometry) {\n return this;\n }\n if (this._geometry.meshes.length === 1) {\n return this;\n }\n const oldGeometry = this._geometry;\n const geometry = this._geometry.copy(Geometry.RandomId());\n oldGeometry.releaseForMesh(this, true);\n geometry.applyToMesh(this);\n return this;\n }\n /**\n * Set the index buffer of this mesh\n * @param indices defines the source data\n * @param totalVertices defines the total number of vertices referenced by this index data (can be null)\n * @param updatable defines if the updated index buffer must be flagged as updatable (default is false)\n * @returns the current mesh\n */\n setIndices(indices, totalVertices = null, updatable = false) {\n if (!this._geometry) {\n const vertexData = new VertexData();\n vertexData.indices = indices;\n const scene = this.getScene();\n new Geometry(Geometry.RandomId(), scene, vertexData, updatable, this);\n }\n else {\n this._geometry.setIndices(indices, totalVertices, updatable);\n }\n return this;\n }\n /**\n * Update the current index buffer\n * @param indices defines the source data\n * @param offset defines the offset in the index buffer where to store the new data (can be null)\n * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)\n * @returns the current mesh\n */\n updateIndices(indices, offset, gpuMemoryOnly = false) {\n if (!this._geometry) {\n return this;\n }\n this._geometry.updateIndices(indices, offset, gpuMemoryOnly);\n return this;\n }\n /**\n * Invert the geometry to move from a right handed system to a left handed one.\n * @returns the current mesh\n */\n toLeftHanded() {\n if (!this._geometry) {\n return this;\n }\n this._geometry.toLeftHanded();\n return this;\n }\n /**\n * @internal\n */\n _bind(subMesh, effect, fillMode, allowInstancedRendering = true) {\n if (!this._geometry) {\n return this;\n }\n const engine = this.getScene().getEngine();\n // Morph targets\n if (this.morphTargetManager && this.morphTargetManager.isUsingTextureForTargets) {\n this.morphTargetManager._bind(effect);\n }\n // Wireframe\n let indexToBind;\n if (this._unIndexed) {\n indexToBind = null;\n }\n else {\n switch (this._getRenderingFillMode(fillMode)) {\n case Material.PointFillMode:\n indexToBind = null;\n break;\n case Material.WireFrameFillMode:\n indexToBind = subMesh._getLinesIndexBuffer(this.getIndices(), engine);\n break;\n default:\n case Material.TriangleFillMode:\n indexToBind = this._geometry.getIndexBuffer();\n break;\n }\n }\n // VBOs\n if (!allowInstancedRendering || !this._userInstancedBuffersStorage || this.hasThinInstances) {\n this._geometry._bind(effect, indexToBind);\n }\n else {\n this._geometry._bind(effect, indexToBind, this._userInstancedBuffersStorage.vertexBuffers, this._userInstancedBuffersStorage.vertexArrayObjects);\n }\n return this;\n }\n /**\n * @internal\n */\n _draw(subMesh, fillMode, instancesCount) {\n if (!this._geometry || !this._geometry.getVertexBuffers() || (!this._unIndexed && !this._geometry.getIndexBuffer())) {\n return this;\n }\n if (this._internalMeshDataInfo._onBeforeDrawObservable) {\n this._internalMeshDataInfo._onBeforeDrawObservable.notifyObservers(this);\n }\n const scene = this.getScene();\n const engine = scene.getEngine();\n if (this._unIndexed || fillMode == Material.PointFillMode) {\n // or triangles as points\n engine.drawArraysType(fillMode, subMesh.verticesStart, subMesh.verticesCount, this.forcedInstanceCount || instancesCount);\n }\n else if (fillMode == Material.WireFrameFillMode) {\n // Triangles as wireframe\n engine.drawElementsType(fillMode, 0, subMesh._linesIndexCount, this.forcedInstanceCount || instancesCount);\n }\n else {\n engine.drawElementsType(fillMode, subMesh.indexStart, subMesh.indexCount, this.forcedInstanceCount || instancesCount);\n }\n return this;\n }\n /**\n * Registers for this mesh a javascript function called just before the rendering process\n * @param func defines the function to call before rendering this mesh\n * @returns the current mesh\n */\n registerBeforeRender(func) {\n this.onBeforeRenderObservable.add(func);\n return this;\n }\n /**\n * Disposes a previously registered javascript function called before the rendering\n * @param func defines the function to remove\n * @returns the current mesh\n */\n unregisterBeforeRender(func) {\n this.onBeforeRenderObservable.removeCallback(func);\n return this;\n }\n /**\n * Registers for this mesh a javascript function called just after the rendering is complete\n * @param func defines the function to call after rendering this mesh\n * @returns the current mesh\n */\n registerAfterRender(func) {\n this.onAfterRenderObservable.add(func);\n return this;\n }\n /**\n * Disposes a previously registered javascript function called after the rendering.\n * @param func defines the function to remove\n * @returns the current mesh\n */\n unregisterAfterRender(func) {\n this.onAfterRenderObservable.removeCallback(func);\n return this;\n }\n /**\n * @internal\n */\n _getInstancesRenderList(subMeshId, isReplacementMode = false) {\n if (this._instanceDataStorage.isFrozen) {\n if (isReplacementMode) {\n this._instanceDataStorage.batchCacheReplacementModeInFrozenMode.hardwareInstancedRendering[subMeshId] = false;\n this._instanceDataStorage.batchCacheReplacementModeInFrozenMode.renderSelf[subMeshId] = true;\n return this._instanceDataStorage.batchCacheReplacementModeInFrozenMode;\n }\n if (this._instanceDataStorage.previousBatch) {\n return this._instanceDataStorage.previousBatch;\n }\n }\n const scene = this.getScene();\n const isInIntermediateRendering = scene._isInIntermediateRendering();\n const onlyForInstances = isInIntermediateRendering\n ? this._internalAbstractMeshDataInfo._onlyForInstancesIntermediate\n : this._internalAbstractMeshDataInfo._onlyForInstances;\n const batchCache = this._instanceDataStorage.batchCache;\n batchCache.mustReturn = false;\n batchCache.renderSelf[subMeshId] = isReplacementMode || (!onlyForInstances && this.isEnabled() && this.isVisible);\n batchCache.visibleInstances[subMeshId] = null;\n if (this._instanceDataStorage.visibleInstances && !isReplacementMode) {\n const visibleInstances = this._instanceDataStorage.visibleInstances;\n const currentRenderId = scene.getRenderId();\n const defaultRenderId = isInIntermediateRendering ? visibleInstances.intermediateDefaultRenderId : visibleInstances.defaultRenderId;\n batchCache.visibleInstances[subMeshId] = visibleInstances[currentRenderId];\n if (!batchCache.visibleInstances[subMeshId] && defaultRenderId) {\n batchCache.visibleInstances[subMeshId] = visibleInstances[defaultRenderId];\n }\n }\n batchCache.hardwareInstancedRendering[subMeshId] =\n !isReplacementMode &&\n this._instanceDataStorage.hardwareInstancedRendering &&\n batchCache.visibleInstances[subMeshId] !== null &&\n batchCache.visibleInstances[subMeshId] !== undefined;\n this._instanceDataStorage.previousBatch = batchCache;\n return batchCache;\n }\n /**\n * @internal\n */\n _renderWithInstances(subMesh, fillMode, batch, effect, engine) {\n var _a;\n const visibleInstances = batch.visibleInstances[subMesh._id];\n const visibleInstanceCount = visibleInstances ? visibleInstances.length : 0;\n const instanceStorage = this._instanceDataStorage;\n const currentInstancesBufferSize = instanceStorage.instancesBufferSize;\n let instancesBuffer = instanceStorage.instancesBuffer;\n let instancesPreviousBuffer = instanceStorage.instancesPreviousBuffer;\n const matricesCount = visibleInstanceCount + 1;\n const bufferSize = matricesCount * 16 * 4;\n while (instanceStorage.instancesBufferSize < bufferSize) {\n instanceStorage.instancesBufferSize *= 2;\n }\n if (!instanceStorage.instancesData || currentInstancesBufferSize != instanceStorage.instancesBufferSize) {\n instanceStorage.instancesData = new Float32Array(instanceStorage.instancesBufferSize / 4);\n }\n if ((this._scene.needsPreviousWorldMatrices && !instanceStorage.instancesPreviousData) || currentInstancesBufferSize != instanceStorage.instancesBufferSize) {\n instanceStorage.instancesPreviousData = new Float32Array(instanceStorage.instancesBufferSize / 4);\n }\n let offset = 0;\n let instancesCount = 0;\n const renderSelf = batch.renderSelf[subMesh._id];\n const needUpdateBuffer = !instancesBuffer ||\n currentInstancesBufferSize !== instanceStorage.instancesBufferSize ||\n (this._scene.needsPreviousWorldMatrices && !instanceStorage.instancesPreviousBuffer);\n if (!this._instanceDataStorage.manualUpdate && (!instanceStorage.isFrozen || needUpdateBuffer)) {\n const world = this.getWorldMatrix();\n if (renderSelf) {\n if (this._scene.needsPreviousWorldMatrices) {\n if (!instanceStorage.masterMeshPreviousWorldMatrix) {\n instanceStorage.masterMeshPreviousWorldMatrix = world.clone();\n instanceStorage.masterMeshPreviousWorldMatrix.copyToArray(instanceStorage.instancesPreviousData, offset);\n }\n else {\n instanceStorage.masterMeshPreviousWorldMatrix.copyToArray(instanceStorage.instancesPreviousData, offset);\n instanceStorage.masterMeshPreviousWorldMatrix.copyFrom(world);\n }\n }\n world.copyToArray(instanceStorage.instancesData, offset);\n offset += 16;\n instancesCount++;\n }\n if (visibleInstances) {\n if (Mesh.INSTANCEDMESH_SORT_TRANSPARENT && this._scene.activeCamera && ((_a = subMesh.getMaterial()) === null || _a === void 0 ? void 0 : _a.needAlphaBlendingForMesh(subMesh.getRenderingMesh()))) {\n const cameraPosition = this._scene.activeCamera.globalPosition;\n for (let instanceIndex = 0; instanceIndex < visibleInstances.length; instanceIndex++) {\n const instanceMesh = visibleInstances[instanceIndex];\n instanceMesh._distanceToCamera = Vector3.Distance(instanceMesh.getBoundingInfo().boundingSphere.centerWorld, cameraPosition);\n }\n visibleInstances.sort((m1, m2) => {\n return m1._distanceToCamera > m2._distanceToCamera ? -1 : m1._distanceToCamera < m2._distanceToCamera ? 1 : 0;\n });\n }\n for (let instanceIndex = 0; instanceIndex < visibleInstances.length; instanceIndex++) {\n const instance = visibleInstances[instanceIndex];\n const matrix = instance.getWorldMatrix();\n matrix.copyToArray(instanceStorage.instancesData, offset);\n if (this._scene.needsPreviousWorldMatrices) {\n if (!instance._previousWorldMatrix) {\n instance._previousWorldMatrix = matrix.clone();\n instance._previousWorldMatrix.copyToArray(instanceStorage.instancesPreviousData, offset);\n }\n else {\n instance._previousWorldMatrix.copyToArray(instanceStorage.instancesPreviousData, offset);\n instance._previousWorldMatrix.copyFrom(matrix);\n }\n }\n offset += 16;\n instancesCount++;\n }\n }\n }\n else {\n instancesCount = (renderSelf ? 1 : 0) + visibleInstanceCount;\n }\n if (needUpdateBuffer) {\n if (instancesBuffer) {\n instancesBuffer.dispose();\n }\n if (instancesPreviousBuffer) {\n instancesPreviousBuffer.dispose();\n }\n instancesBuffer = new Buffer(engine, instanceStorage.instancesData, true, 16, false, true);\n instanceStorage.instancesBuffer = instancesBuffer;\n if (!this._userInstancedBuffersStorage) {\n this._userInstancedBuffersStorage = {\n data: {},\n vertexBuffers: {},\n strides: {},\n sizes: {},\n vertexArrayObjects: this.getEngine().getCaps().vertexArrayObject ? {} : undefined,\n };\n }\n this._userInstancedBuffersStorage.vertexBuffers[\"world0\"] = instancesBuffer.createVertexBuffer(\"world0\", 0, 4);\n this._userInstancedBuffersStorage.vertexBuffers[\"world1\"] = instancesBuffer.createVertexBuffer(\"world1\", 4, 4);\n this._userInstancedBuffersStorage.vertexBuffers[\"world2\"] = instancesBuffer.createVertexBuffer(\"world2\", 8, 4);\n this._userInstancedBuffersStorage.vertexBuffers[\"world3\"] = instancesBuffer.createVertexBuffer(\"world3\", 12, 4);\n if (this._scene.needsPreviousWorldMatrices) {\n instancesPreviousBuffer = new Buffer(engine, instanceStorage.instancesPreviousData, true, 16, false, true);\n instanceStorage.instancesPreviousBuffer = instancesPreviousBuffer;\n this._userInstancedBuffersStorage.vertexBuffers[\"previousWorld0\"] = instancesPreviousBuffer.createVertexBuffer(\"previousWorld0\", 0, 4);\n this._userInstancedBuffersStorage.vertexBuffers[\"previousWorld1\"] = instancesPreviousBuffer.createVertexBuffer(\"previousWorld1\", 4, 4);\n this._userInstancedBuffersStorage.vertexBuffers[\"previousWorld2\"] = instancesPreviousBuffer.createVertexBuffer(\"previousWorld2\", 8, 4);\n this._userInstancedBuffersStorage.vertexBuffers[\"previousWorld3\"] = instancesPreviousBuffer.createVertexBuffer(\"previousWorld3\", 12, 4);\n }\n this._invalidateInstanceVertexArrayObject();\n }\n else {\n if (!this._instanceDataStorage.isFrozen || this._instanceDataStorage.forceMatrixUpdates) {\n instancesBuffer.updateDirectly(instanceStorage.instancesData, 0, instancesCount);\n if (this._scene.needsPreviousWorldMatrices && (!this._instanceDataStorage.manualUpdate || this._instanceDataStorage.previousManualUpdate)) {\n instancesPreviousBuffer.updateDirectly(instanceStorage.instancesPreviousData, 0, instancesCount);\n }\n }\n }\n this._processInstancedBuffers(visibleInstances, renderSelf);\n // Stats\n this.getScene()._activeIndices.addCount(subMesh.indexCount * instancesCount, false);\n // Draw\n if (engine._currentDrawContext) {\n engine._currentDrawContext.useInstancing = true;\n }\n this._bind(subMesh, effect, fillMode);\n this._draw(subMesh, fillMode, instancesCount);\n // Write current matrices as previous matrices in case of manual update\n // Default behaviour when previous matrices are not specified explicitly\n // Will break if instances number/order changes\n if (this._scene.needsPreviousWorldMatrices &&\n !needUpdateBuffer &&\n this._instanceDataStorage.manualUpdate &&\n (!this._instanceDataStorage.isFrozen || this._instanceDataStorage.forceMatrixUpdates) &&\n !this._instanceDataStorage.previousManualUpdate) {\n instancesPreviousBuffer.updateDirectly(instanceStorage.instancesData, 0, instancesCount);\n }\n engine.unbindInstanceAttributes();\n return this;\n }\n /**\n * @internal\n */\n _renderWithThinInstances(subMesh, fillMode, effect, engine) {\n var _a, _b;\n // Stats\n const instancesCount = (_b = (_a = this._thinInstanceDataStorage) === null || _a === void 0 ? void 0 : _a.instancesCount) !== null && _b !== void 0 ? _b : 0;\n this.getScene()._activeIndices.addCount(subMesh.indexCount * instancesCount, false);\n // Draw\n if (engine._currentDrawContext) {\n engine._currentDrawContext.useInstancing = true;\n }\n this._bind(subMesh, effect, fillMode);\n this._draw(subMesh, fillMode, instancesCount);\n // Write current matrices as previous matrices\n // Default behaviour when previous matrices are not specified explicitly\n // Will break if instances number/order changes\n if (this._scene.needsPreviousWorldMatrices && !this._thinInstanceDataStorage.previousMatrixData && this._thinInstanceDataStorage.matrixData) {\n if (!this._thinInstanceDataStorage.previousMatrixBuffer) {\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", this._thinInstanceDataStorage.matrixData, false);\n }\n else {\n this._thinInstanceDataStorage.previousMatrixBuffer.updateDirectly(this._thinInstanceDataStorage.matrixData, 0, instancesCount);\n }\n }\n engine.unbindInstanceAttributes();\n }\n /**\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _processInstancedBuffers(visibleInstances, renderSelf) {\n // Do nothing\n }\n /**\n * @internal\n */\n _processRendering(renderingMesh, subMesh, effect, fillMode, batch, hardwareInstancedRendering, onBeforeDraw, effectiveMaterial) {\n const scene = this.getScene();\n const engine = scene.getEngine();\n fillMode = this._getRenderingFillMode(fillMode);\n if (hardwareInstancedRendering && subMesh.getRenderingMesh().hasThinInstances) {\n this._renderWithThinInstances(subMesh, fillMode, effect, engine);\n return this;\n }\n if (hardwareInstancedRendering) {\n this._renderWithInstances(subMesh, fillMode, batch, effect, engine);\n }\n else {\n if (engine._currentDrawContext) {\n engine._currentDrawContext.useInstancing = false;\n }\n let instanceCount = 0;\n if (batch.renderSelf[subMesh._id]) {\n // Draw\n if (onBeforeDraw) {\n onBeforeDraw(false, renderingMesh.getWorldMatrix(), effectiveMaterial);\n }\n instanceCount++;\n this._draw(subMesh, fillMode, this._instanceDataStorage.overridenInstanceCount);\n }\n const visibleInstancesForSubMesh = batch.visibleInstances[subMesh._id];\n if (visibleInstancesForSubMesh) {\n const visibleInstanceCount = visibleInstancesForSubMesh.length;\n instanceCount += visibleInstanceCount;\n // Stats\n for (let instanceIndex = 0; instanceIndex < visibleInstanceCount; instanceIndex++) {\n const instance = visibleInstancesForSubMesh[instanceIndex];\n // World\n const world = instance.getWorldMatrix();\n if (onBeforeDraw) {\n onBeforeDraw(true, world, effectiveMaterial);\n }\n // Draw\n this._draw(subMesh, fillMode);\n }\n }\n // Stats\n scene._activeIndices.addCount(subMesh.indexCount * instanceCount, false);\n }\n return this;\n }\n /**\n * @internal\n */\n _rebuild(dispose = false) {\n if (this._instanceDataStorage.instancesBuffer) {\n // Dispose instance buffer to be recreated in _renderWithInstances when rendered\n if (dispose) {\n this._instanceDataStorage.instancesBuffer.dispose();\n }\n this._instanceDataStorage.instancesBuffer = null;\n }\n if (this._userInstancedBuffersStorage) {\n for (const kind in this._userInstancedBuffersStorage.vertexBuffers) {\n const buffer = this._userInstancedBuffersStorage.vertexBuffers[kind];\n if (buffer) {\n // Dispose instance buffer to be recreated in _renderWithInstances when rendered\n if (dispose) {\n buffer.dispose();\n }\n this._userInstancedBuffersStorage.vertexBuffers[kind] = null;\n }\n }\n if (this._userInstancedBuffersStorage.vertexArrayObjects) {\n this._userInstancedBuffersStorage.vertexArrayObjects = {};\n }\n }\n this._internalMeshDataInfo._effectiveMaterial = null;\n super._rebuild(dispose);\n }\n /** @internal */\n _freeze() {\n if (!this.subMeshes) {\n return;\n }\n // Prepare batches\n for (let index = 0; index < this.subMeshes.length; index++) {\n this._getInstancesRenderList(index);\n }\n this._internalMeshDataInfo._effectiveMaterial = null;\n this._instanceDataStorage.isFrozen = true;\n }\n /** @internal */\n _unFreeze() {\n this._instanceDataStorage.isFrozen = false;\n this._instanceDataStorage.previousBatch = null;\n }\n /**\n * Triggers the draw call for the mesh (or a submesh), for a specific render pass id\n * @param renderPassId defines the render pass id to use to draw the mesh / submesh. If not provided, use the current renderPassId of the engine.\n * @param enableAlphaMode defines if alpha mode can be changed (default: false)\n * @param effectiveMeshReplacement defines an optional mesh used to provide info for the rendering (default: undefined)\n * @param subMesh defines the subMesh to render. If not provided, draw all mesh submeshes (default: undefined)\n * @param checkFrustumCulling defines if frustum culling must be checked (default: true). If you know the mesh is in the frustum (or if you don't care!), you can pass false to optimize.\n * @returns the current mesh\n */\n renderWithRenderPassId(renderPassId, enableAlphaMode, effectiveMeshReplacement, subMesh, checkFrustumCulling = true) {\n const engine = this._scene.getEngine();\n const currentRenderPassId = engine.currentRenderPassId;\n if (renderPassId !== undefined) {\n engine.currentRenderPassId = renderPassId;\n }\n if (subMesh) {\n if (!checkFrustumCulling || (checkFrustumCulling && subMesh.isInFrustum(this._scene._frustumPlanes))) {\n this.render(subMesh, !!enableAlphaMode, effectiveMeshReplacement);\n }\n }\n else {\n for (let s = 0; s < this.subMeshes.length; s++) {\n const subMesh = this.subMeshes[s];\n if (!checkFrustumCulling || (checkFrustumCulling && subMesh.isInFrustum(this._scene._frustumPlanes))) {\n this.render(subMesh, !!enableAlphaMode, effectiveMeshReplacement);\n }\n }\n }\n if (renderPassId !== undefined) {\n engine.currentRenderPassId = currentRenderPassId;\n }\n return this;\n }\n /**\n * Triggers the draw call for the mesh. Usually, you don't need to call this method by your own because the mesh rendering is handled by the scene rendering manager\n * @param subMesh defines the subMesh to render\n * @param enableAlphaMode defines if alpha mode can be changed\n * @param effectiveMeshReplacement defines an optional mesh used to provide info for the rendering\n * @returns the current mesh\n */\n render(subMesh, enableAlphaMode, effectiveMeshReplacement) {\n var _a, _b, _c, _d, _e;\n const scene = this.getScene();\n if (this._internalAbstractMeshDataInfo._isActiveIntermediate) {\n this._internalAbstractMeshDataInfo._isActiveIntermediate = false;\n }\n else {\n this._internalAbstractMeshDataInfo._isActive = false;\n }\n const numActiveCameras = (_b = (_a = scene.activeCameras) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n const canCheckOcclusionQuery = (numActiveCameras > 1 && scene.activeCamera === scene.activeCameras[0]) || numActiveCameras <= 1;\n if (canCheckOcclusionQuery && this._checkOcclusionQuery() && !this._occlusionDataStorage.forceRenderingWhenOccluded) {\n return this;\n }\n // Managing instances\n const batch = this._getInstancesRenderList(subMesh._id, !!effectiveMeshReplacement);\n if (batch.mustReturn) {\n return this;\n }\n // Checking geometry state\n if (!this._geometry || !this._geometry.getVertexBuffers() || (!this._unIndexed && !this._geometry.getIndexBuffer())) {\n return this;\n }\n const engine = scene.getEngine();\n let oldCameraMaxZ = 0;\n let oldCamera = null;\n if (this.ignoreCameraMaxZ && scene.activeCamera && !scene._isInIntermediateRendering()) {\n oldCameraMaxZ = scene.activeCamera.maxZ;\n oldCamera = scene.activeCamera;\n scene.activeCamera.maxZ = 0;\n scene.updateTransformMatrix(true);\n }\n if (this._internalMeshDataInfo._onBeforeRenderObservable) {\n this._internalMeshDataInfo._onBeforeRenderObservable.notifyObservers(this);\n }\n const renderingMesh = subMesh.getRenderingMesh();\n const hardwareInstancedRendering = batch.hardwareInstancedRendering[subMesh._id] ||\n renderingMesh.hasThinInstances ||\n (!!this._userInstancedBuffersStorage && !subMesh.getMesh()._internalAbstractMeshDataInfo._actAsRegularMesh);\n const instanceDataStorage = this._instanceDataStorage;\n const material = subMesh.getMaterial();\n if (!material) {\n if (oldCamera) {\n oldCamera.maxZ = oldCameraMaxZ;\n scene.updateTransformMatrix(true);\n }\n return this;\n }\n // Material\n if (!instanceDataStorage.isFrozen || !this._internalMeshDataInfo._effectiveMaterial || this._internalMeshDataInfo._effectiveMaterial !== material) {\n if (material._storeEffectOnSubMeshes) {\n if (!material.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {\n if (oldCamera) {\n oldCamera.maxZ = oldCameraMaxZ;\n scene.updateTransformMatrix(true);\n }\n return this;\n }\n }\n else if (!material.isReady(this, hardwareInstancedRendering)) {\n if (oldCamera) {\n oldCamera.maxZ = oldCameraMaxZ;\n scene.updateTransformMatrix(true);\n }\n return this;\n }\n this._internalMeshDataInfo._effectiveMaterial = material;\n }\n else if ((material._storeEffectOnSubMeshes && !((_c = subMesh.effect) === null || _c === void 0 ? void 0 : _c._wasPreviouslyReady)) ||\n (!material._storeEffectOnSubMeshes && !((_d = material.getEffect()) === null || _d === void 0 ? void 0 : _d._wasPreviouslyReady))) {\n if (oldCamera) {\n oldCamera.maxZ = oldCameraMaxZ;\n scene.updateTransformMatrix(true);\n }\n return this;\n }\n // Alpha mode\n if (enableAlphaMode) {\n engine.setAlphaMode(this._internalMeshDataInfo._effectiveMaterial.alphaMode);\n }\n let drawWrapper;\n if (this._internalMeshDataInfo._effectiveMaterial._storeEffectOnSubMeshes) {\n drawWrapper = subMesh._drawWrapper;\n }\n else {\n drawWrapper = this._internalMeshDataInfo._effectiveMaterial._getDrawWrapper();\n }\n const effect = (_e = drawWrapper === null || drawWrapper === void 0 ? void 0 : drawWrapper.effect) !== null && _e !== void 0 ? _e : null;\n for (const step of scene._beforeRenderingMeshStage) {\n step.action(this, subMesh, batch, effect);\n }\n if (!drawWrapper || !effect) {\n if (oldCamera) {\n oldCamera.maxZ = oldCameraMaxZ;\n scene.updateTransformMatrix(true);\n }\n return this;\n }\n const effectiveMesh = effectiveMeshReplacement || this;\n let sideOrientation;\n if (!instanceDataStorage.isFrozen &&\n (this._internalMeshDataInfo._effectiveMaterial.backFaceCulling ||\n this.overrideMaterialSideOrientation !== null ||\n this._internalMeshDataInfo._effectiveMaterial.twoSidedLighting)) {\n // Note: if two sided lighting is enabled, we need to ensure that the normal will point in the right direction even if the determinant of the world matrix is negative\n const mainDeterminant = effectiveMesh._getWorldMatrixDeterminant();\n sideOrientation = this.overrideMaterialSideOrientation;\n if (sideOrientation == null) {\n sideOrientation = this._internalMeshDataInfo._effectiveMaterial.sideOrientation;\n }\n if (mainDeterminant < 0) {\n sideOrientation = sideOrientation === Material.ClockWiseSideOrientation ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation;\n }\n instanceDataStorage.sideOrientation = sideOrientation;\n }\n else {\n sideOrientation = instanceDataStorage.sideOrientation;\n }\n const reverse = this._internalMeshDataInfo._effectiveMaterial._preBind(drawWrapper, sideOrientation);\n if (this._internalMeshDataInfo._effectiveMaterial.forceDepthWrite) {\n engine.setDepthWrite(true);\n }\n // Bind\n const effectiveMaterial = this._internalMeshDataInfo._effectiveMaterial;\n const fillMode = effectiveMaterial.fillMode;\n if (this._internalMeshDataInfo._onBeforeBindObservable) {\n this._internalMeshDataInfo._onBeforeBindObservable.notifyObservers(this);\n }\n if (!hardwareInstancedRendering) {\n // Binding will be done later because we need to add more info to the VB\n this._bind(subMesh, effect, fillMode, false);\n }\n const world = effectiveMesh.getWorldMatrix();\n if (effectiveMaterial._storeEffectOnSubMeshes) {\n effectiveMaterial.bindForSubMesh(world, this, subMesh);\n }\n else {\n effectiveMaterial.bind(world, this);\n }\n if (!effectiveMaterial.backFaceCulling && effectiveMaterial.separateCullingPass) {\n engine.setState(true, effectiveMaterial.zOffset, false, !reverse, effectiveMaterial.cullBackFaces, effectiveMaterial.stencil, effectiveMaterial.zOffsetUnits);\n this._processRendering(this, subMesh, effect, fillMode, batch, hardwareInstancedRendering, this._onBeforeDraw, this._internalMeshDataInfo._effectiveMaterial);\n engine.setState(true, effectiveMaterial.zOffset, false, reverse, effectiveMaterial.cullBackFaces, effectiveMaterial.stencil, effectiveMaterial.zOffsetUnits);\n if (this._internalMeshDataInfo._onBetweenPassObservable) {\n this._internalMeshDataInfo._onBetweenPassObservable.notifyObservers(subMesh);\n }\n }\n // Draw\n this._processRendering(this, subMesh, effect, fillMode, batch, hardwareInstancedRendering, this._onBeforeDraw, this._internalMeshDataInfo._effectiveMaterial);\n // Unbind\n this._internalMeshDataInfo._effectiveMaterial.unbind();\n for (const step of scene._afterRenderingMeshStage) {\n step.action(this, subMesh, batch, effect);\n }\n if (this._internalMeshDataInfo._onAfterRenderObservable) {\n this._internalMeshDataInfo._onAfterRenderObservable.notifyObservers(this);\n }\n if (oldCamera) {\n oldCamera.maxZ = oldCameraMaxZ;\n scene.updateTransformMatrix(true);\n }\n if (scene.performancePriority === ScenePerformancePriority.Aggressive && !instanceDataStorage.isFrozen) {\n this._freeze();\n }\n return this;\n }\n /**\n * Renormalize the mesh and patch it up if there are no weights\n * Similar to normalization by adding the weights compute the reciprocal and multiply all elements, this wil ensure that everything adds to 1.\n * However in the case of zero weights then we set just a single influence to 1.\n * We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version.\n */\n cleanMatrixWeights() {\n if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) {\n if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsExtraKind)) {\n this._normalizeSkinWeightsAndExtra();\n }\n else {\n this._normalizeSkinFourWeights();\n }\n }\n }\n // faster 4 weight version.\n _normalizeSkinFourWeights() {\n const matricesWeights = this.getVerticesData(VertexBuffer.MatricesWeightsKind);\n const numWeights = matricesWeights.length;\n for (let a = 0; a < numWeights; a += 4) {\n // accumulate weights\n const t = matricesWeights[a] + matricesWeights[a + 1] + matricesWeights[a + 2] + matricesWeights[a + 3];\n // check for invalid weight and just set it to 1.\n if (t === 0) {\n matricesWeights[a] = 1;\n }\n else {\n // renormalize so everything adds to 1 use reciprocal\n const recip = 1 / t;\n matricesWeights[a] *= recip;\n matricesWeights[a + 1] *= recip;\n matricesWeights[a + 2] *= recip;\n matricesWeights[a + 3] *= recip;\n }\n }\n this.setVerticesData(VertexBuffer.MatricesWeightsKind, matricesWeights);\n }\n // handle special case of extra verts. (in theory gltf can handle 12 influences)\n _normalizeSkinWeightsAndExtra() {\n const matricesWeightsExtra = this.getVerticesData(VertexBuffer.MatricesWeightsExtraKind);\n const matricesWeights = this.getVerticesData(VertexBuffer.MatricesWeightsKind);\n const numWeights = matricesWeights.length;\n for (let a = 0; a < numWeights; a += 4) {\n // accumulate weights\n let t = matricesWeights[a] + matricesWeights[a + 1] + matricesWeights[a + 2] + matricesWeights[a + 3];\n t += matricesWeightsExtra[a] + matricesWeightsExtra[a + 1] + matricesWeightsExtra[a + 2] + matricesWeightsExtra[a + 3];\n // check for invalid weight and just set it to 1.\n if (t === 0) {\n matricesWeights[a] = 1;\n }\n else {\n // renormalize so everything adds to 1 use reciprocal\n const recip = 1 / t;\n matricesWeights[a] *= recip;\n matricesWeights[a + 1] *= recip;\n matricesWeights[a + 2] *= recip;\n matricesWeights[a + 3] *= recip;\n // same goes for extras\n matricesWeightsExtra[a] *= recip;\n matricesWeightsExtra[a + 1] *= recip;\n matricesWeightsExtra[a + 2] *= recip;\n matricesWeightsExtra[a + 3] *= recip;\n }\n }\n this.setVerticesData(VertexBuffer.MatricesWeightsKind, matricesWeights);\n this.setVerticesData(VertexBuffer.MatricesWeightsKind, matricesWeightsExtra);\n }\n /**\n * ValidateSkinning is used to determine that a mesh has valid skinning data along with skin metrics, if missing weights,\n * or not normalized it is returned as invalid mesh the string can be used for console logs, or on screen messages to let\n * the user know there was an issue with importing the mesh\n * @returns a validation object with skinned, valid and report string\n */\n validateSkinning() {\n const matricesWeightsExtra = this.getVerticesData(VertexBuffer.MatricesWeightsExtraKind);\n const matricesWeights = this.getVerticesData(VertexBuffer.MatricesWeightsKind);\n if (matricesWeights === null || this.skeleton == null) {\n return { skinned: false, valid: true, report: \"not skinned\" };\n }\n const numWeights = matricesWeights.length;\n let numberNotSorted = 0;\n let missingWeights = 0;\n let maxUsedWeights = 0;\n let numberNotNormalized = 0;\n const numInfluences = matricesWeightsExtra === null ? 4 : 8;\n const usedWeightCounts = [];\n for (let a = 0; a <= numInfluences; a++) {\n usedWeightCounts[a] = 0;\n }\n const toleranceEpsilon = 0.001;\n for (let a = 0; a < numWeights; a += 4) {\n let lastWeight = matricesWeights[a];\n let t = lastWeight;\n let usedWeights = t === 0 ? 0 : 1;\n for (let b = 1; b < numInfluences; b++) {\n const d = b < 4 ? matricesWeights[a + b] : matricesWeightsExtra[a + b - 4];\n if (d > lastWeight) {\n numberNotSorted++;\n }\n if (d !== 0) {\n usedWeights++;\n }\n t += d;\n lastWeight = d;\n }\n // count the buffer weights usage\n usedWeightCounts[usedWeights]++;\n // max influences\n if (usedWeights > maxUsedWeights) {\n maxUsedWeights = usedWeights;\n }\n // check for invalid weight and just set it to 1.\n if (t === 0) {\n missingWeights++;\n }\n else {\n // renormalize so everything adds to 1 use reciprocal\n const recip = 1 / t;\n let tolerance = 0;\n for (let b = 0; b < numInfluences; b++) {\n if (b < 4) {\n tolerance += Math.abs(matricesWeights[a + b] - matricesWeights[a + b] * recip);\n }\n else {\n tolerance += Math.abs(matricesWeightsExtra[a + b - 4] - matricesWeightsExtra[a + b - 4] * recip);\n }\n }\n // arbitrary epsilon value for dictating not normalized\n if (tolerance > toleranceEpsilon) {\n numberNotNormalized++;\n }\n }\n }\n // validate bone indices are in range of the skeleton\n const numBones = this.skeleton.bones.length;\n const matricesIndices = this.getVerticesData(VertexBuffer.MatricesIndicesKind);\n const matricesIndicesExtra = this.getVerticesData(VertexBuffer.MatricesIndicesExtraKind);\n let numBadBoneIndices = 0;\n for (let a = 0; a < numWeights; a += 4) {\n for (let b = 0; b < numInfluences; b++) {\n const index = b < 4 ? matricesIndices[a + b] : matricesIndicesExtra[a + b - 4];\n if (index >= numBones || index < 0) {\n numBadBoneIndices++;\n }\n }\n }\n // log mesh stats\n const output = \"Number of Weights = \" +\n numWeights / 4 +\n \"\\nMaximum influences = \" +\n maxUsedWeights +\n \"\\nMissing Weights = \" +\n missingWeights +\n \"\\nNot Sorted = \" +\n numberNotSorted +\n \"\\nNot Normalized = \" +\n numberNotNormalized +\n \"\\nWeightCounts = [\" +\n usedWeightCounts +\n \"]\" +\n \"\\nNumber of bones = \" +\n numBones +\n \"\\nBad Bone Indices = \" +\n numBadBoneIndices;\n return { skinned: true, valid: missingWeights === 0 && numberNotNormalized === 0 && numBadBoneIndices === 0, report: output };\n }\n /** @internal */\n _checkDelayState() {\n const scene = this.getScene();\n if (this._geometry) {\n this._geometry.load(scene);\n }\n else if (this.delayLoadState === 4) {\n this.delayLoadState = 2;\n this._queueLoad(scene);\n }\n return this;\n }\n _queueLoad(scene) {\n scene.addPendingData(this);\n const getBinaryData = this.delayLoadingFile.indexOf(\".babylonbinarymeshdata\") !== -1;\n Tools.LoadFile(this.delayLoadingFile, (data) => {\n if (data instanceof ArrayBuffer) {\n this._delayLoadingFunction(data, this);\n }\n else {\n this._delayLoadingFunction(JSON.parse(data), this);\n }\n this.instances.forEach((instance) => {\n instance.refreshBoundingInfo();\n instance._syncSubMeshes();\n });\n this.delayLoadState = 1;\n scene.removePendingData(this);\n }, () => { }, scene.offlineProvider, getBinaryData);\n return this;\n }\n /**\n * Returns `true` if the mesh is within the frustum defined by the passed array of planes.\n * A mesh is in the frustum if its bounding box intersects the frustum\n * @param frustumPlanes defines the frustum to test\n * @returns true if the mesh is in the frustum planes\n */\n isInFrustum(frustumPlanes) {\n if (this.delayLoadState === 2) {\n return false;\n }\n if (!super.isInFrustum(frustumPlanes)) {\n return false;\n }\n this._checkDelayState();\n return true;\n }\n /**\n * Sets the mesh material by the material or multiMaterial `id` property\n * @param id is a string identifying the material or the multiMaterial\n * @returns the current mesh\n */\n setMaterialById(id) {\n const materials = this.getScene().materials;\n let index;\n for (index = materials.length - 1; index > -1; index--) {\n if (materials[index].id === id) {\n this.material = materials[index];\n return this;\n }\n }\n // Multi\n const multiMaterials = this.getScene().multiMaterials;\n for (index = multiMaterials.length - 1; index > -1; index--) {\n if (multiMaterials[index].id === id) {\n this.material = multiMaterials[index];\n return this;\n }\n }\n return this;\n }\n /**\n * Returns as a new array populated with the mesh material and/or skeleton, if any.\n * @returns an array of IAnimatable\n */\n getAnimatables() {\n const results = [];\n if (this.material) {\n results.push(this.material);\n }\n if (this.skeleton) {\n results.push(this.skeleton);\n }\n return results;\n }\n /**\n * Modifies the mesh geometry according to the passed transformation matrix.\n * This method returns nothing, but it really modifies the mesh even if it's originally not set as updatable.\n * The mesh normals are modified using the same transformation.\n * Note that, under the hood, this method sets a new VertexBuffer each call.\n * @param transform defines the transform matrix to use\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/center_origin/bakingTransforms\n * @returns the current mesh\n */\n bakeTransformIntoVertices(transform) {\n // Position\n if (!this.isVerticesDataPresent(VertexBuffer.PositionKind)) {\n return this;\n }\n const submeshes = this.subMeshes.splice(0);\n this._resetPointsArrayCache();\n let data = this.getVerticesData(VertexBuffer.PositionKind);\n const temp = Vector3.Zero();\n let index;\n for (index = 0; index < data.length; index += 3) {\n Vector3.TransformCoordinatesFromFloatsToRef(data[index], data[index + 1], data[index + 2], transform, temp).toArray(data, index);\n }\n this.setVerticesData(VertexBuffer.PositionKind, data, this.getVertexBuffer(VertexBuffer.PositionKind).isUpdatable());\n // Normals\n if (this.isVerticesDataPresent(VertexBuffer.NormalKind)) {\n data = this.getVerticesData(VertexBuffer.NormalKind);\n for (index = 0; index < data.length; index += 3) {\n Vector3.TransformNormalFromFloatsToRef(data[index], data[index + 1], data[index + 2], transform, temp)\n .normalize()\n .toArray(data, index);\n }\n this.setVerticesData(VertexBuffer.NormalKind, data, this.getVertexBuffer(VertexBuffer.NormalKind).isUpdatable());\n }\n // flip faces?\n if (transform.determinant() < 0) {\n this.flipFaces();\n }\n // Restore submeshes\n this.releaseSubMeshes();\n this.subMeshes = submeshes;\n return this;\n }\n /**\n * Modifies the mesh geometry according to its own current World Matrix.\n * The mesh World Matrix is then reset.\n * This method returns nothing but really modifies the mesh even if it's originally not set as updatable.\n * Note that, under the hood, this method sets a new VertexBuffer each call.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/center_origin/bakingTransforms\n * @param bakeIndependentlyOfChildren indicates whether to preserve all child nodes' World Matrix during baking\n * @returns the current mesh\n */\n bakeCurrentTransformIntoVertices(bakeIndependentlyOfChildren = true) {\n this.bakeTransformIntoVertices(this.computeWorldMatrix(true));\n this.resetLocalMatrix(bakeIndependentlyOfChildren);\n return this;\n }\n // Cache\n /** @internal */\n get _positions() {\n if (this._internalAbstractMeshDataInfo._positions) {\n return this._internalAbstractMeshDataInfo._positions;\n }\n if (this._geometry) {\n return this._geometry._positions;\n }\n return null;\n }\n /** @internal */\n _resetPointsArrayCache() {\n if (this._geometry) {\n this._geometry._resetPointsArrayCache();\n }\n return this;\n }\n /** @internal */\n _generatePointsArray() {\n if (this._geometry) {\n return this._geometry._generatePointsArray();\n }\n return false;\n }\n /**\n * Returns a new Mesh object generated from the current mesh properties.\n * This method must not get confused with createInstance()\n * @param name is a string, the name given to the new mesh\n * @param newParent can be any Node object (default `null`)\n * @param doNotCloneChildren allows/denies the recursive cloning of the original mesh children if any (default `false`)\n * @param clonePhysicsImpostor allows/denies the cloning in the same time of the original mesh `body` used by the physics engine, if any (default `true`)\n * @returns a new mesh\n */\n clone(name = \"\", newParent = null, doNotCloneChildren, clonePhysicsImpostor = true) {\n return new Mesh(name, this.getScene(), newParent, this, doNotCloneChildren, clonePhysicsImpostor);\n }\n /**\n * Releases resources associated with this mesh.\n * @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)\n * @param disposeMaterialAndTextures Set to true to also dispose referenced materials and textures (false by default)\n */\n dispose(doNotRecurse, disposeMaterialAndTextures = false) {\n this.morphTargetManager = null;\n if (this._geometry) {\n this._geometry.releaseForMesh(this, true);\n }\n const internalDataInfo = this._internalMeshDataInfo;\n if (internalDataInfo._onBeforeDrawObservable) {\n internalDataInfo._onBeforeDrawObservable.clear();\n }\n if (internalDataInfo._onBeforeBindObservable) {\n internalDataInfo._onBeforeBindObservable.clear();\n }\n if (internalDataInfo._onBeforeRenderObservable) {\n internalDataInfo._onBeforeRenderObservable.clear();\n }\n if (internalDataInfo._onAfterRenderObservable) {\n internalDataInfo._onAfterRenderObservable.clear();\n }\n if (internalDataInfo._onBetweenPassObservable) {\n internalDataInfo._onBetweenPassObservable.clear();\n }\n // Sources\n if (this._scene.useClonedMeshMap) {\n if (internalDataInfo.meshMap) {\n for (const uniqueId in internalDataInfo.meshMap) {\n const mesh = internalDataInfo.meshMap[uniqueId];\n if (mesh) {\n mesh._internalMeshDataInfo._source = null;\n internalDataInfo.meshMap[uniqueId] = undefined;\n }\n }\n }\n if (internalDataInfo._source && internalDataInfo._source._internalMeshDataInfo.meshMap) {\n internalDataInfo._source._internalMeshDataInfo.meshMap[this.uniqueId] = undefined;\n }\n }\n else {\n const meshes = this.getScene().meshes;\n for (const abstractMesh of meshes) {\n const mesh = abstractMesh;\n if (mesh._internalMeshDataInfo && mesh._internalMeshDataInfo._source && mesh._internalMeshDataInfo._source === this) {\n mesh._internalMeshDataInfo._source = null;\n }\n }\n }\n internalDataInfo._source = null;\n this._instanceDataStorage.visibleInstances = {};\n // Instances\n this._disposeInstanceSpecificData();\n // Thin instances\n this._disposeThinInstanceSpecificData();\n if (this._internalMeshDataInfo._checkReadinessObserver) {\n this._scene.onBeforeRenderObservable.remove(this._internalMeshDataInfo._checkReadinessObserver);\n }\n super.dispose(doNotRecurse, disposeMaterialAndTextures);\n }\n /** @internal */\n _disposeInstanceSpecificData() {\n // Do nothing\n }\n /** @internal */\n _disposeThinInstanceSpecificData() {\n // Do nothing\n }\n /** @internal */\n _invalidateInstanceVertexArrayObject() {\n // Do nothing\n }\n /**\n * Modifies the mesh geometry according to a displacement map.\n * A displacement map is a colored image. Each pixel color value (actually a gradient computed from red, green, blue values) will give the displacement to apply to each mesh vertex.\n * The mesh must be set as updatable. Its internal geometry is directly modified, no new buffer are allocated.\n * @param url is a string, the URL from the image file is to be downloaded.\n * @param minHeight is the lower limit of the displacement.\n * @param maxHeight is the upper limit of the displacement.\n * @param onSuccess is an optional Javascript function to be called just after the mesh is modified. It is passed the modified mesh and must return nothing.\n * @param uvOffset is an optional vector2 used to offset UV.\n * @param uvScale is an optional vector2 used to scale UV.\n * @param forceUpdate defines whether or not to force an update of the generated buffers. This is useful to apply on a deserialized model for instance.\n * @returns the Mesh.\n */\n applyDisplacementMap(url, minHeight, maxHeight, onSuccess, uvOffset, uvScale, forceUpdate = false) {\n const scene = this.getScene();\n const onload = (img) => {\n // Getting height map data\n const heightMapWidth = img.width;\n const heightMapHeight = img.height;\n const canvas = this.getEngine().createCanvas(heightMapWidth, heightMapHeight);\n const context = canvas.getContext(\"2d\");\n context.drawImage(img, 0, 0);\n // Create VertexData from map data\n //Cast is due to wrong definition in lib.d.ts from ts 1.3 - https://github.com/Microsoft/TypeScript/issues/949\n const buffer = context.getImageData(0, 0, heightMapWidth, heightMapHeight).data;\n this.applyDisplacementMapFromBuffer(buffer, heightMapWidth, heightMapHeight, minHeight, maxHeight, uvOffset, uvScale, forceUpdate);\n //execute success callback, if set\n if (onSuccess) {\n onSuccess(this);\n }\n };\n Tools.LoadImage(url, onload, () => { }, scene.offlineProvider);\n return this;\n }\n /**\n * Modifies the mesh geometry according to a displacementMap buffer.\n * A displacement map is a colored image. Each pixel color value (actually a gradient computed from red, green, blue values) will give the displacement to apply to each mesh vertex.\n * The mesh must be set as updatable. Its internal geometry is directly modified, no new buffer are allocated.\n * @param buffer is a `Uint8Array` buffer containing series of `Uint8` lower than 255, the red, green, blue and alpha values of each successive pixel.\n * @param heightMapWidth is the width of the buffer image.\n * @param heightMapHeight is the height of the buffer image.\n * @param minHeight is the lower limit of the displacement.\n * @param maxHeight is the upper limit of the displacement.\n * @param uvOffset is an optional vector2 used to offset UV.\n * @param uvScale is an optional vector2 used to scale UV.\n * @param forceUpdate defines whether or not to force an update of the generated buffers. This is useful to apply on a deserialized model for instance.\n * @returns the Mesh.\n */\n applyDisplacementMapFromBuffer(buffer, heightMapWidth, heightMapHeight, minHeight, maxHeight, uvOffset, uvScale, forceUpdate = false) {\n if (!this.isVerticesDataPresent(VertexBuffer.PositionKind) || !this.isVerticesDataPresent(VertexBuffer.NormalKind) || !this.isVerticesDataPresent(VertexBuffer.UVKind)) {\n Logger.Warn(\"Cannot call applyDisplacementMap: Given mesh is not complete. Position, Normal or UV are missing\");\n return this;\n }\n const positions = this.getVerticesData(VertexBuffer.PositionKind, true, true);\n const normals = this.getVerticesData(VertexBuffer.NormalKind);\n const uvs = this.getVerticesData(VertexBuffer.UVKind);\n let position = Vector3.Zero();\n const normal = Vector3.Zero();\n const uv = Vector2.Zero();\n uvOffset = uvOffset || Vector2.Zero();\n uvScale = uvScale || new Vector2(1, 1);\n for (let index = 0; index < positions.length; index += 3) {\n Vector3.FromArrayToRef(positions, index, position);\n Vector3.FromArrayToRef(normals, index, normal);\n Vector2.FromArrayToRef(uvs, (index / 3) * 2, uv);\n // Compute height\n const u = (Math.abs(uv.x * uvScale.x + (uvOffset.x % 1)) * (heightMapWidth - 1)) % heightMapWidth | 0;\n const v = (Math.abs(uv.y * uvScale.y + (uvOffset.y % 1)) * (heightMapHeight - 1)) % heightMapHeight | 0;\n const pos = (u + v * heightMapWidth) * 4;\n const r = buffer[pos] / 255.0;\n const g = buffer[pos + 1] / 255.0;\n const b = buffer[pos + 2] / 255.0;\n const gradient = r * 0.3 + g * 0.59 + b * 0.11;\n normal.normalize();\n normal.scaleInPlace(minHeight + (maxHeight - minHeight) * gradient);\n position = position.add(normal);\n position.toArray(positions, index);\n }\n VertexData.ComputeNormals(positions, this.getIndices(), normals);\n if (forceUpdate) {\n this.setVerticesData(VertexBuffer.PositionKind, positions);\n this.setVerticesData(VertexBuffer.NormalKind, normals);\n this.setVerticesData(VertexBuffer.UVKind, uvs);\n }\n else {\n this.updateVerticesData(VertexBuffer.PositionKind, positions);\n this.updateVerticesData(VertexBuffer.NormalKind, normals);\n }\n return this;\n }\n _getFlattenedNormals(indices, positions) {\n const normals = new Float32Array(indices.length * 3);\n let normalsCount = 0;\n // Decide if normals should be flipped\n const flipNormalGeneration = this.overrideMaterialSideOrientation ===\n (this._scene.useRightHandedSystem ? 1 : 0);\n // Generate new normals\n for (let index = 0; index < indices.length; index += 3) {\n const p1 = Vector3.FromArray(positions, indices[index] * 3);\n const p2 = Vector3.FromArray(positions, indices[index + 1] * 3);\n const p3 = Vector3.FromArray(positions, indices[index + 2] * 3);\n const p1p2 = p1.subtract(p2);\n const p3p2 = p3.subtract(p2);\n const normal = Vector3.Normalize(Vector3.Cross(p1p2, p3p2));\n if (flipNormalGeneration) {\n normal.scaleInPlace(-1);\n }\n // Store same normals for every vertex\n for (let localIndex = 0; localIndex < 3; localIndex++) {\n normals[normalsCount++] = normal.x;\n normals[normalsCount++] = normal.y;\n normals[normalsCount++] = normal.z;\n }\n }\n return normals;\n }\n _convertToUnIndexedMesh(flattenNormals = false) {\n const kinds = this.getVerticesDataKinds();\n const indices = this.getIndices();\n const data = {};\n const separateVertices = (data, stride) => {\n const newData = new Float32Array(indices.length * stride);\n let count = 0;\n for (let index = 0; index < indices.length; index++) {\n for (let offset = 0; offset < stride; offset++) {\n newData[count++] = data[indices[index] * stride + offset];\n }\n }\n return newData;\n };\n // Save previous submeshes\n const previousSubmeshes = this.geometry ? this.subMeshes.slice(0) : [];\n // Cache vertex data\n for (const kind of kinds) {\n data[kind] = this.getVerticesData(kind);\n }\n // Update vertex data\n for (const kind of kinds) {\n const vertexBuffer = this.getVertexBuffer(kind);\n const stride = vertexBuffer.getStrideSize();\n if (flattenNormals && kind === VertexBuffer.NormalKind) {\n const normals = this._getFlattenedNormals(indices, data[VertexBuffer.PositionKind]);\n this.setVerticesData(VertexBuffer.NormalKind, normals, vertexBuffer.isUpdatable(), stride);\n }\n else {\n this.setVerticesData(kind, separateVertices(data[kind], stride), vertexBuffer.isUpdatable(), stride);\n }\n }\n // Update morph targets\n if (this.morphTargetManager) {\n for (let targetIndex = 0; targetIndex < this.morphTargetManager.numTargets; targetIndex++) {\n const target = this.morphTargetManager.getTarget(targetIndex);\n const positions = target.getPositions();\n target.setPositions(separateVertices(positions, 3));\n const normals = target.getNormals();\n if (normals) {\n target.setNormals(flattenNormals ? this._getFlattenedNormals(indices, positions) : separateVertices(normals, 3));\n }\n const tangents = target.getTangents();\n if (tangents) {\n target.setTangents(separateVertices(tangents, 3));\n }\n const uvs = target.getUVs();\n if (uvs) {\n target.setUVs(separateVertices(uvs, 2));\n }\n }\n this.morphTargetManager.synchronize();\n }\n // Update indices\n for (let index = 0; index < indices.length; index++) {\n indices[index] = index;\n }\n this.setIndices(indices);\n this._unIndexed = true;\n // Update submeshes\n this.releaseSubMeshes();\n for (const previousOne of previousSubmeshes) {\n SubMesh.AddToMesh(previousOne.materialIndex, previousOne.indexStart, previousOne.indexCount, previousOne.indexStart, previousOne.indexCount, this);\n }\n this.synchronizeInstances();\n return this;\n }\n /**\n * Modify the mesh to get a flat shading rendering.\n * This means each mesh facet will then have its own normals. Usually new vertices are added in the mesh geometry to get this result.\n * Warning : the mesh is really modified even if not set originally as updatable and, under the hood, a new VertexBuffer is allocated.\n * @returns current mesh\n */\n convertToFlatShadedMesh() {\n return this._convertToUnIndexedMesh(true);\n }\n /**\n * This method removes all the mesh indices and add new vertices (duplication) in order to unfold facets into buffers.\n * In other words, more vertices, no more indices and a single bigger VBO.\n * The mesh is really modified even if not set originally as updatable. Under the hood, a new VertexBuffer is allocated.\n * @returns current mesh\n */\n convertToUnIndexedMesh() {\n return this._convertToUnIndexedMesh();\n }\n /**\n * Inverses facet orientations.\n * Warning : the mesh is really modified even if not set originally as updatable. A new VertexBuffer is created under the hood each call.\n * @param flipNormals will also inverts the normals\n * @returns current mesh\n */\n flipFaces(flipNormals = false) {\n const vertex_data = VertexData.ExtractFromMesh(this);\n let i;\n if (flipNormals && this.isVerticesDataPresent(VertexBuffer.NormalKind) && vertex_data.normals) {\n for (i = 0; i < vertex_data.normals.length; i++) {\n vertex_data.normals[i] *= -1;\n }\n }\n if (vertex_data.indices) {\n let temp;\n for (i = 0; i < vertex_data.indices.length; i += 3) {\n // reassign indices\n temp = vertex_data.indices[i + 1];\n vertex_data.indices[i + 1] = vertex_data.indices[i + 2];\n vertex_data.indices[i + 2] = temp;\n }\n }\n vertex_data.applyToMesh(this, this.isVertexBufferUpdatable(VertexBuffer.PositionKind));\n return this;\n }\n /**\n * Increase the number of facets and hence vertices in a mesh\n * Vertex normals are interpolated from existing vertex normals\n * Warning : the mesh is really modified even if not set originally as updatable. A new VertexBuffer is created under the hood each call.\n * @param numberPerEdge the number of new vertices to add to each edge of a facet, optional default 1\n */\n increaseVertices(numberPerEdge = 1) {\n const vertex_data = VertexData.ExtractFromMesh(this);\n const currentIndices = vertex_data.indices && !Array.isArray(vertex_data.indices) && Array.from ? Array.from(vertex_data.indices) : vertex_data.indices;\n const positions = vertex_data.positions && !Array.isArray(vertex_data.positions) && Array.from ? Array.from(vertex_data.positions) : vertex_data.positions;\n const uvs = vertex_data.uvs && !Array.isArray(vertex_data.uvs) && Array.from ? Array.from(vertex_data.uvs) : vertex_data.uvs;\n const normals = vertex_data.normals && !Array.isArray(vertex_data.normals) && Array.from ? Array.from(vertex_data.normals) : vertex_data.normals;\n if (!currentIndices || !positions) {\n Logger.Warn(\"Couldn't increase number of vertices : VertexData must contain at least indices and positions\");\n }\n else {\n vertex_data.indices = currentIndices;\n vertex_data.positions = positions;\n if (uvs) {\n vertex_data.uvs = uvs;\n }\n if (normals) {\n vertex_data.normals = normals;\n }\n const segments = numberPerEdge + 1; //segments per current facet edge, become sides of new facets\n const tempIndices = new Array();\n for (let i = 0; i < segments + 1; i++) {\n tempIndices[i] = new Array();\n }\n let a; //vertex index of one end of a side\n let b; //vertex index of other end of the side\n const deltaPosition = new Vector3(0, 0, 0);\n const deltaNormal = new Vector3(0, 0, 0);\n const deltaUV = new Vector2(0, 0);\n const indices = new Array();\n const vertexIndex = new Array();\n const side = new Array();\n let len;\n let positionPtr = positions.length;\n let uvPtr;\n if (uvs) {\n uvPtr = uvs.length;\n }\n let normalsPtr;\n if (normals) {\n normalsPtr = normals.length;\n }\n for (let i = 0; i < currentIndices.length; i += 3) {\n vertexIndex[0] = currentIndices[i];\n vertexIndex[1] = currentIndices[i + 1];\n vertexIndex[2] = currentIndices[i + 2];\n for (let j = 0; j < 3; j++) {\n a = vertexIndex[j];\n b = vertexIndex[(j + 1) % 3];\n if (side[a] === undefined && side[b] === undefined) {\n side[a] = new Array();\n side[b] = new Array();\n }\n else {\n if (side[a] === undefined) {\n side[a] = new Array();\n }\n if (side[b] === undefined) {\n side[b] = new Array();\n }\n }\n if (side[a][b] === undefined && side[b][a] === undefined) {\n side[a][b] = [];\n deltaPosition.x = (positions[3 * b] - positions[3 * a]) / segments;\n deltaPosition.y = (positions[3 * b + 1] - positions[3 * a + 1]) / segments;\n deltaPosition.z = (positions[3 * b + 2] - positions[3 * a + 2]) / segments;\n if (normals) {\n deltaNormal.x = (normals[3 * b] - normals[3 * a]) / segments;\n deltaNormal.y = (normals[3 * b + 1] - normals[3 * a + 1]) / segments;\n deltaNormal.z = (normals[3 * b + 2] - normals[3 * a + 2]) / segments;\n }\n if (uvs) {\n deltaUV.x = (uvs[2 * b] - uvs[2 * a]) / segments;\n deltaUV.y = (uvs[2 * b + 1] - uvs[2 * a + 1]) / segments;\n }\n side[a][b].push(a);\n for (let k = 1; k < segments; k++) {\n side[a][b].push(positions.length / 3);\n positions[positionPtr++] = positions[3 * a] + k * deltaPosition.x;\n positions[positionPtr++] = positions[3 * a + 1] + k * deltaPosition.y;\n positions[positionPtr++] = positions[3 * a + 2] + k * deltaPosition.z;\n if (normals) {\n normals[normalsPtr++] = normals[3 * a] + k * deltaNormal.x;\n normals[normalsPtr++] = normals[3 * a + 1] + k * deltaNormal.y;\n normals[normalsPtr++] = normals[3 * a + 2] + k * deltaNormal.z;\n }\n if (uvs) {\n uvs[uvPtr++] = uvs[2 * a] + k * deltaUV.x;\n uvs[uvPtr++] = uvs[2 * a + 1] + k * deltaUV.y;\n }\n }\n side[a][b].push(b);\n side[b][a] = new Array();\n len = side[a][b].length;\n for (let idx = 0; idx < len; idx++) {\n side[b][a][idx] = side[a][b][len - 1 - idx];\n }\n }\n }\n //Calculate positions, normals and uvs of new internal vertices\n tempIndices[0][0] = currentIndices[i];\n tempIndices[1][0] = side[currentIndices[i]][currentIndices[i + 1]][1];\n tempIndices[1][1] = side[currentIndices[i]][currentIndices[i + 2]][1];\n for (let k = 2; k < segments; k++) {\n tempIndices[k][0] = side[currentIndices[i]][currentIndices[i + 1]][k];\n tempIndices[k][k] = side[currentIndices[i]][currentIndices[i + 2]][k];\n deltaPosition.x = (positions[3 * tempIndices[k][k]] - positions[3 * tempIndices[k][0]]) / k;\n deltaPosition.y = (positions[3 * tempIndices[k][k] + 1] - positions[3 * tempIndices[k][0] + 1]) / k;\n deltaPosition.z = (positions[3 * tempIndices[k][k] + 2] - positions[3 * tempIndices[k][0] + 2]) / k;\n if (normals) {\n deltaNormal.x = (normals[3 * tempIndices[k][k]] - normals[3 * tempIndices[k][0]]) / k;\n deltaNormal.y = (normals[3 * tempIndices[k][k] + 1] - normals[3 * tempIndices[k][0] + 1]) / k;\n deltaNormal.z = (normals[3 * tempIndices[k][k] + 2] - normals[3 * tempIndices[k][0] + 2]) / k;\n }\n if (uvs) {\n deltaUV.x = (uvs[2 * tempIndices[k][k]] - uvs[2 * tempIndices[k][0]]) / k;\n deltaUV.y = (uvs[2 * tempIndices[k][k] + 1] - uvs[2 * tempIndices[k][0] + 1]) / k;\n }\n for (let j = 1; j < k; j++) {\n tempIndices[k][j] = positions.length / 3;\n positions[positionPtr++] = positions[3 * tempIndices[k][0]] + j * deltaPosition.x;\n positions[positionPtr++] = positions[3 * tempIndices[k][0] + 1] + j * deltaPosition.y;\n positions[positionPtr++] = positions[3 * tempIndices[k][0] + 2] + j * deltaPosition.z;\n if (normals) {\n normals[normalsPtr++] = normals[3 * tempIndices[k][0]] + j * deltaNormal.x;\n normals[normalsPtr++] = normals[3 * tempIndices[k][0] + 1] + j * deltaNormal.y;\n normals[normalsPtr++] = normals[3 * tempIndices[k][0] + 2] + j * deltaNormal.z;\n }\n if (uvs) {\n uvs[uvPtr++] = uvs[2 * tempIndices[k][0]] + j * deltaUV.x;\n uvs[uvPtr++] = uvs[2 * tempIndices[k][0] + 1] + j * deltaUV.y;\n }\n }\n }\n tempIndices[segments] = side[currentIndices[i + 1]][currentIndices[i + 2]];\n // reform indices\n indices.push(tempIndices[0][0], tempIndices[1][0], tempIndices[1][1]);\n for (let k = 1; k < segments; k++) {\n let j;\n for (j = 0; j < k; j++) {\n indices.push(tempIndices[k][j], tempIndices[k + 1][j], tempIndices[k + 1][j + 1]);\n indices.push(tempIndices[k][j], tempIndices[k + 1][j + 1], tempIndices[k][j + 1]);\n }\n indices.push(tempIndices[k][j], tempIndices[k + 1][j], tempIndices[k + 1][j + 1]);\n }\n }\n vertex_data.indices = indices;\n vertex_data.applyToMesh(this, this.isVertexBufferUpdatable(VertexBuffer.PositionKind));\n }\n }\n /**\n * Force adjacent facets to share vertices and remove any facets that have all vertices in a line\n * This will undo any application of covertToFlatShadedMesh\n * Warning : the mesh is really modified even if not set originally as updatable. A new VertexBuffer is created under the hood each call.\n */\n forceSharedVertices() {\n const vertex_data = VertexData.ExtractFromMesh(this);\n const currentUVs = vertex_data.uvs;\n const currentIndices = vertex_data.indices;\n const currentPositions = vertex_data.positions;\n const currentColors = vertex_data.colors;\n const currentMatrixIndices = vertex_data.matricesIndices;\n const currentMatrixWeights = vertex_data.matricesWeights;\n const currentMatrixIndicesExtra = vertex_data.matricesIndicesExtra;\n const currentMatrixWeightsExtra = vertex_data.matricesWeightsExtra;\n if (currentIndices === void 0 || currentPositions === void 0 || currentIndices === null || currentPositions === null) {\n Logger.Warn(\"VertexData contains empty entries\");\n }\n else {\n const positions = new Array();\n const indices = new Array();\n const uvs = new Array();\n const colors = new Array();\n const matrixIndices = new Array();\n const matrixWeights = new Array();\n const matrixIndicesExtra = new Array();\n const matrixWeightsExtra = new Array();\n let pstring = new Array(); //lists facet vertex positions (a,b,c) as string \"a|b|c\"\n let indexPtr = 0; // pointer to next available index value\n const uniquePositions = {}; // unique vertex positions\n let ptr; // pointer to element in uniquePositions\n let facet;\n for (let i = 0; i < currentIndices.length; i += 3) {\n facet = [currentIndices[i], currentIndices[i + 1], currentIndices[i + 2]]; //facet vertex indices\n pstring = [];\n for (let j = 0; j < 3; j++) {\n pstring[j] = \"\";\n for (let k = 0; k < 3; k++) {\n //small values make 0\n if (Math.abs(currentPositions[3 * facet[j] + k]) < 0.00000001) {\n currentPositions[3 * facet[j] + k] = 0;\n }\n pstring[j] += currentPositions[3 * facet[j] + k] + \"|\";\n }\n }\n //check facet vertices to see that none are repeated\n // do not process any facet that has a repeated vertex, ie is a line\n if (!(pstring[0] == pstring[1] || pstring[0] == pstring[2] || pstring[1] == pstring[2])) {\n //for each facet position check if already listed in uniquePositions\n // if not listed add to uniquePositions and set index pointer\n // if listed use its index in uniquePositions and new index pointer\n for (let j = 0; j < 3; j++) {\n ptr = uniquePositions[pstring[j]];\n if (ptr === undefined) {\n uniquePositions[pstring[j]] = indexPtr;\n ptr = indexPtr++;\n //not listed so add individual x, y, z coordinates to positions\n for (let k = 0; k < 3; k++) {\n positions.push(currentPositions[3 * facet[j] + k]);\n }\n if (currentColors !== null && currentColors !== void 0) {\n for (let k = 0; k < 4; k++) {\n colors.push(currentColors[4 * facet[j] + k]);\n }\n }\n if (currentUVs !== null && currentUVs !== void 0) {\n for (let k = 0; k < 2; k++) {\n uvs.push(currentUVs[2 * facet[j] + k]);\n }\n }\n if (currentMatrixIndices !== null && currentMatrixIndices !== void 0) {\n for (let k = 0; k < 4; k++) {\n matrixIndices.push(currentMatrixIndices[4 * facet[j] + k]);\n }\n }\n if (currentMatrixWeights !== null && currentMatrixWeights !== void 0) {\n for (let k = 0; k < 4; k++) {\n matrixWeights.push(currentMatrixWeights[4 * facet[j] + k]);\n }\n }\n if (currentMatrixIndicesExtra !== null && currentMatrixIndicesExtra !== void 0) {\n for (let k = 0; k < 4; k++) {\n matrixIndicesExtra.push(currentMatrixIndicesExtra[4 * facet[j] + k]);\n }\n }\n if (currentMatrixWeightsExtra !== null && currentMatrixWeightsExtra !== void 0) {\n for (let k = 0; k < 4; k++) {\n matrixWeightsExtra.push(currentMatrixWeightsExtra[4 * facet[j] + k]);\n }\n }\n }\n // add new index pointer to indices array\n indices.push(ptr);\n }\n }\n }\n const normals = new Array();\n VertexData.ComputeNormals(positions, indices, normals);\n //create new vertex data object and update\n vertex_data.positions = positions;\n vertex_data.indices = indices;\n vertex_data.normals = normals;\n if (currentUVs !== null && currentUVs !== void 0) {\n vertex_data.uvs = uvs;\n }\n if (currentColors !== null && currentColors !== void 0) {\n vertex_data.colors = colors;\n }\n if (currentMatrixIndices !== null && currentMatrixIndices !== void 0) {\n vertex_data.matricesIndices = matrixIndices;\n }\n if (currentMatrixWeights !== null && currentMatrixWeights !== void 0) {\n vertex_data.matricesWeights = matrixWeights;\n }\n if (currentMatrixIndicesExtra !== null && currentMatrixIndicesExtra !== void 0) {\n vertex_data.matricesIndicesExtra = matrixIndicesExtra;\n }\n if (currentMatrixWeights !== null && currentMatrixWeights !== void 0) {\n vertex_data.matricesWeightsExtra = matrixWeightsExtra;\n }\n vertex_data.applyToMesh(this, this.isVertexBufferUpdatable(VertexBuffer.PositionKind));\n }\n }\n // Instances\n /**\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/naming-convention\n static _instancedMeshFactory(name, mesh) {\n throw _WarnImport(\"InstancedMesh\");\n }\n /**\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static _PhysicsImpostorParser(scene, physicObject, jsonObject) {\n throw _WarnImport(\"PhysicsImpostor\");\n }\n /**\n * Creates a new InstancedMesh object from the mesh model.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/copies/instances\n * @param name defines the name of the new instance\n * @returns a new InstancedMesh\n */\n createInstance(name) {\n return Mesh._instancedMeshFactory(name, this);\n }\n /**\n * Synchronises all the mesh instance submeshes to the current mesh submeshes, if any.\n * After this call, all the mesh instances have the same submeshes than the current mesh.\n * @returns the current mesh\n */\n synchronizeInstances() {\n for (let instanceIndex = 0; instanceIndex < this.instances.length; instanceIndex++) {\n const instance = this.instances[instanceIndex];\n instance._syncSubMeshes();\n }\n return this;\n }\n /**\n * Optimization of the mesh's indices, in case a mesh has duplicated vertices.\n * The function will only reorder the indices and will not remove unused vertices to avoid problems with submeshes.\n * This should be used together with the simplification to avoid disappearing triangles.\n * @param successCallback an optional success callback to be called after the optimization finished.\n * @returns the current mesh\n */\n optimizeIndices(successCallback) {\n const indices = this.getIndices();\n const positions = this.getVerticesData(VertexBuffer.PositionKind);\n if (!positions || !indices) {\n return this;\n }\n const vectorPositions = [];\n for (let pos = 0; pos < positions.length; pos = pos + 3) {\n vectorPositions.push(Vector3.FromArray(positions, pos));\n }\n const dupes = [];\n AsyncLoop.SyncAsyncForLoop(vectorPositions.length, 40, (iteration) => {\n const realPos = vectorPositions.length - 1 - iteration;\n const testedPosition = vectorPositions[realPos];\n for (let j = 0; j < realPos; ++j) {\n const againstPosition = vectorPositions[j];\n if (testedPosition.equals(againstPosition)) {\n dupes[realPos] = j;\n break;\n }\n }\n }, () => {\n for (let i = 0; i < indices.length; ++i) {\n indices[i] = dupes[indices[i]] || indices[i];\n }\n //indices are now reordered\n const originalSubMeshes = this.subMeshes.slice(0);\n this.setIndices(indices);\n this.subMeshes = originalSubMeshes;\n if (successCallback) {\n successCallback(this);\n }\n });\n return this;\n }\n /**\n * Serialize current mesh\n * @param serializationObject defines the object which will receive the serialization data\n */\n serialize(serializationObject = {}) {\n serializationObject.name = this.name;\n serializationObject.id = this.id;\n serializationObject.uniqueId = this.uniqueId;\n serializationObject.type = this.getClassName();\n if (Tags && Tags.HasTags(this)) {\n serializationObject.tags = Tags.GetTags(this);\n }\n serializationObject.position = this.position.asArray();\n if (this.rotationQuaternion) {\n serializationObject.rotationQuaternion = this.rotationQuaternion.asArray();\n }\n else if (this.rotation) {\n serializationObject.rotation = this.rotation.asArray();\n }\n serializationObject.scaling = this.scaling.asArray();\n if (this._postMultiplyPivotMatrix) {\n serializationObject.pivotMatrix = this.getPivotMatrix().asArray();\n }\n else {\n serializationObject.localMatrix = this.getPivotMatrix().asArray();\n }\n serializationObject.isEnabled = this.isEnabled(false);\n serializationObject.isVisible = this.isVisible;\n serializationObject.infiniteDistance = this.infiniteDistance;\n serializationObject.pickable = this.isPickable;\n serializationObject.receiveShadows = this.receiveShadows;\n serializationObject.billboardMode = this.billboardMode;\n serializationObject.visibility = this.visibility;\n serializationObject.checkCollisions = this.checkCollisions;\n serializationObject.isBlocker = this.isBlocker;\n serializationObject.overrideMaterialSideOrientation = this.overrideMaterialSideOrientation;\n // Parent\n if (this.parent) {\n this.parent._serializeAsParent(serializationObject);\n }\n // Geometry\n serializationObject.isUnIndexed = this.isUnIndexed;\n const geometry = this._geometry;\n if (geometry && this.subMeshes) {\n serializationObject.geometryUniqueId = geometry.uniqueId;\n serializationObject.geometryId = geometry.id;\n // SubMeshes\n serializationObject.subMeshes = [];\n for (let subIndex = 0; subIndex < this.subMeshes.length; subIndex++) {\n const subMesh = this.subMeshes[subIndex];\n serializationObject.subMeshes.push({\n materialIndex: subMesh.materialIndex,\n verticesStart: subMesh.verticesStart,\n verticesCount: subMesh.verticesCount,\n indexStart: subMesh.indexStart,\n indexCount: subMesh.indexCount,\n });\n }\n }\n // Material\n if (this.material) {\n if (!this.material.doNotSerialize) {\n serializationObject.materialUniqueId = this.material.uniqueId;\n serializationObject.materialId = this.material.id; // back compat\n }\n }\n else {\n this.material = null;\n serializationObject.materialUniqueId = this._scene.defaultMaterial.uniqueId;\n serializationObject.materialId = this._scene.defaultMaterial.id; // back compat\n }\n // Morph targets\n if (this.morphTargetManager) {\n serializationObject.morphTargetManagerId = this.morphTargetManager.uniqueId;\n }\n // Skeleton\n if (this.skeleton) {\n serializationObject.skeletonId = this.skeleton.id;\n serializationObject.numBoneInfluencers = this.numBoneInfluencers;\n }\n // Physics\n //TODO implement correct serialization for physics impostors.\n if (this.getScene()._getComponent(SceneComponentConstants.NAME_PHYSICSENGINE)) {\n const impostor = this.getPhysicsImpostor();\n if (impostor) {\n serializationObject.physicsMass = impostor.getParam(\"mass\");\n serializationObject.physicsFriction = impostor.getParam(\"friction\");\n serializationObject.physicsRestitution = impostor.getParam(\"mass\");\n serializationObject.physicsImpostor = impostor.type;\n }\n }\n // Metadata\n if (this.metadata) {\n serializationObject.metadata = this.metadata;\n }\n // Instances\n serializationObject.instances = [];\n for (let index = 0; index < this.instances.length; index++) {\n const instance = this.instances[index];\n if (instance.doNotSerialize) {\n continue;\n }\n const serializationInstance = {\n name: instance.name,\n id: instance.id,\n isEnabled: instance.isEnabled(false),\n isVisible: instance.isVisible,\n isPickable: instance.isPickable,\n checkCollisions: instance.checkCollisions,\n position: instance.position.asArray(),\n scaling: instance.scaling.asArray(),\n };\n if (instance.parent) {\n instance.parent._serializeAsParent(serializationInstance);\n }\n if (instance.rotationQuaternion) {\n serializationInstance.rotationQuaternion = instance.rotationQuaternion.asArray();\n }\n else if (instance.rotation) {\n serializationInstance.rotation = instance.rotation.asArray();\n }\n // Physics\n //TODO implement correct serialization for physics impostors.\n if (this.getScene()._getComponent(SceneComponentConstants.NAME_PHYSICSENGINE)) {\n const impostor = instance.getPhysicsImpostor();\n if (impostor) {\n serializationInstance.physicsMass = impostor.getParam(\"mass\");\n serializationInstance.physicsFriction = impostor.getParam(\"friction\");\n serializationInstance.physicsRestitution = impostor.getParam(\"mass\");\n serializationInstance.physicsImpostor = impostor.type;\n }\n }\n // Metadata\n if (instance.metadata) {\n serializationInstance.metadata = instance.metadata;\n }\n // Action Manager\n if (instance.actionManager) {\n serializationInstance.actions = instance.actionManager.serialize(instance.name);\n }\n serializationObject.instances.push(serializationInstance);\n // Animations\n SerializationHelper.AppendSerializedAnimations(instance, serializationInstance);\n serializationInstance.ranges = instance.serializeAnimationRanges();\n }\n // Thin instances\n if (this._thinInstanceDataStorage.instancesCount && this._thinInstanceDataStorage.matrixData) {\n serializationObject.thinInstances = {\n instancesCount: this._thinInstanceDataStorage.instancesCount,\n matrixData: Array.from(this._thinInstanceDataStorage.matrixData),\n matrixBufferSize: this._thinInstanceDataStorage.matrixBufferSize,\n enablePicking: this.thinInstanceEnablePicking,\n };\n if (this._userThinInstanceBuffersStorage) {\n const userThinInstance = {\n data: {},\n sizes: {},\n strides: {},\n };\n for (const kind in this._userThinInstanceBuffersStorage.data) {\n userThinInstance.data[kind] = Array.from(this._userThinInstanceBuffersStorage.data[kind]);\n userThinInstance.sizes[kind] = this._userThinInstanceBuffersStorage.sizes[kind];\n userThinInstance.strides[kind] = this._userThinInstanceBuffersStorage.strides[kind];\n }\n serializationObject.thinInstances.userThinInstance = userThinInstance;\n }\n }\n // Animations\n SerializationHelper.AppendSerializedAnimations(this, serializationObject);\n serializationObject.ranges = this.serializeAnimationRanges();\n // Layer mask\n serializationObject.layerMask = this.layerMask;\n // Alpha\n serializationObject.alphaIndex = this.alphaIndex;\n serializationObject.hasVertexAlpha = this.hasVertexAlpha;\n // Overlay\n serializationObject.overlayAlpha = this.overlayAlpha;\n serializationObject.overlayColor = this.overlayColor.asArray();\n serializationObject.renderOverlay = this.renderOverlay;\n // Fog\n serializationObject.applyFog = this.applyFog;\n // Action Manager\n if (this.actionManager) {\n serializationObject.actions = this.actionManager.serialize(this.name);\n }\n return serializationObject;\n }\n /** @internal */\n _syncGeometryWithMorphTargetManager() {\n if (!this.geometry) {\n return;\n }\n this._markSubMeshesAsAttributesDirty();\n const morphTargetManager = this._internalAbstractMeshDataInfo._morphTargetManager;\n if (morphTargetManager && morphTargetManager.vertexCount) {\n if (morphTargetManager.vertexCount !== this.getTotalVertices()) {\n Logger.Error(\"Mesh is incompatible with morph targets. Targets and mesh must all have the same vertices count.\");\n this.morphTargetManager = null;\n return;\n }\n if (morphTargetManager.isUsingTextureForTargets) {\n return;\n }\n for (let index = 0; index < morphTargetManager.numInfluencers; index++) {\n const morphTarget = morphTargetManager.getActiveTarget(index);\n const positions = morphTarget.getPositions();\n if (!positions) {\n Logger.Error(\"Invalid morph target. Target must have positions.\");\n return;\n }\n this.geometry.setVerticesData(VertexBuffer.PositionKind + index, positions, false, 3);\n const normals = morphTarget.getNormals();\n if (normals) {\n this.geometry.setVerticesData(VertexBuffer.NormalKind + index, normals, false, 3);\n }\n const tangents = morphTarget.getTangents();\n if (tangents) {\n this.geometry.setVerticesData(VertexBuffer.TangentKind + index, tangents, false, 3);\n }\n const uvs = morphTarget.getUVs();\n if (uvs) {\n this.geometry.setVerticesData(VertexBuffer.UVKind + \"_\" + index, uvs, false, 2);\n }\n }\n }\n else {\n let index = 0;\n // Positions\n while (this.geometry.isVerticesDataPresent(VertexBuffer.PositionKind + index)) {\n this.geometry.removeVerticesData(VertexBuffer.PositionKind + index);\n if (this.geometry.isVerticesDataPresent(VertexBuffer.NormalKind + index)) {\n this.geometry.removeVerticesData(VertexBuffer.NormalKind + index);\n }\n if (this.geometry.isVerticesDataPresent(VertexBuffer.TangentKind + index)) {\n this.geometry.removeVerticesData(VertexBuffer.TangentKind + index);\n }\n if (this.geometry.isVerticesDataPresent(VertexBuffer.UVKind + index)) {\n this.geometry.removeVerticesData(VertexBuffer.UVKind + \"_\" + index);\n }\n index++;\n }\n }\n }\n /**\n * Returns a new Mesh object parsed from the source provided.\n * @param parsedMesh is the source\n * @param scene defines the hosting scene\n * @param rootUrl is the root URL to prefix the `delayLoadingFile` property with\n * @returns a new Mesh\n */\n static Parse(parsedMesh, scene, rootUrl) {\n let mesh;\n if (parsedMesh.type && parsedMesh.type === \"LinesMesh\") {\n mesh = Mesh._LinesMeshParser(parsedMesh, scene);\n }\n else if (parsedMesh.type && parsedMesh.type === \"GroundMesh\") {\n mesh = Mesh._GroundMeshParser(parsedMesh, scene);\n }\n else if (parsedMesh.type && parsedMesh.type === \"GoldbergMesh\") {\n mesh = Mesh._GoldbergMeshParser(parsedMesh, scene);\n }\n else if (parsedMesh.type && parsedMesh.type === \"GreasedLineMesh\") {\n mesh = Mesh._GreasedLineMeshParser(parsedMesh, scene);\n }\n else if (parsedMesh.type && parsedMesh.type === \"TrailMesh\") {\n mesh = Mesh._TrailMeshParser(parsedMesh, scene);\n }\n else {\n mesh = new Mesh(parsedMesh.name, scene);\n }\n mesh.id = parsedMesh.id;\n mesh._waitingParsedUniqueId = parsedMesh.uniqueId;\n if (Tags) {\n Tags.AddTagsTo(mesh, parsedMesh.tags);\n }\n mesh.position = Vector3.FromArray(parsedMesh.position);\n if (parsedMesh.metadata !== undefined) {\n mesh.metadata = parsedMesh.metadata;\n }\n if (parsedMesh.rotationQuaternion) {\n mesh.rotationQuaternion = Quaternion.FromArray(parsedMesh.rotationQuaternion);\n }\n else if (parsedMesh.rotation) {\n mesh.rotation = Vector3.FromArray(parsedMesh.rotation);\n }\n mesh.scaling = Vector3.FromArray(parsedMesh.scaling);\n if (parsedMesh.localMatrix) {\n mesh.setPreTransformMatrix(Matrix.FromArray(parsedMesh.localMatrix));\n }\n else if (parsedMesh.pivotMatrix) {\n mesh.setPivotMatrix(Matrix.FromArray(parsedMesh.pivotMatrix));\n }\n mesh.setEnabled(parsedMesh.isEnabled);\n mesh.isVisible = parsedMesh.isVisible;\n mesh.infiniteDistance = parsedMesh.infiniteDistance;\n mesh.showBoundingBox = parsedMesh.showBoundingBox;\n mesh.showSubMeshesBoundingBox = parsedMesh.showSubMeshesBoundingBox;\n if (parsedMesh.applyFog !== undefined) {\n mesh.applyFog = parsedMesh.applyFog;\n }\n if (parsedMesh.pickable !== undefined) {\n mesh.isPickable = parsedMesh.pickable;\n }\n if (parsedMesh.alphaIndex !== undefined) {\n mesh.alphaIndex = parsedMesh.alphaIndex;\n }\n mesh.receiveShadows = parsedMesh.receiveShadows;\n if (parsedMesh.billboardMode !== undefined) {\n mesh.billboardMode = parsedMesh.billboardMode;\n }\n if (parsedMesh.visibility !== undefined) {\n mesh.visibility = parsedMesh.visibility;\n }\n mesh.checkCollisions = parsedMesh.checkCollisions;\n if (parsedMesh.overrideMaterialSideOrientation !== undefined) {\n mesh.overrideMaterialSideOrientation = parsedMesh.overrideMaterialSideOrientation;\n }\n if (parsedMesh.isBlocker !== undefined) {\n mesh.isBlocker = parsedMesh.isBlocker;\n }\n mesh._shouldGenerateFlatShading = parsedMesh.useFlatShading;\n // freezeWorldMatrix\n if (parsedMesh.freezeWorldMatrix) {\n mesh._waitingData.freezeWorldMatrix = parsedMesh.freezeWorldMatrix;\n }\n // Parent\n if (parsedMesh.parentId !== undefined) {\n mesh._waitingParentId = parsedMesh.parentId;\n }\n if (parsedMesh.parentInstanceIndex !== undefined) {\n mesh._waitingParentInstanceIndex = parsedMesh.parentInstanceIndex;\n }\n // Actions\n if (parsedMesh.actions !== undefined) {\n mesh._waitingData.actions = parsedMesh.actions;\n }\n // Overlay\n if (parsedMesh.overlayAlpha !== undefined) {\n mesh.overlayAlpha = parsedMesh.overlayAlpha;\n }\n if (parsedMesh.overlayColor !== undefined) {\n mesh.overlayColor = Color3.FromArray(parsedMesh.overlayColor);\n }\n if (parsedMesh.renderOverlay !== undefined) {\n mesh.renderOverlay = parsedMesh.renderOverlay;\n }\n // Geometry\n mesh.isUnIndexed = !!parsedMesh.isUnIndexed;\n mesh.hasVertexAlpha = parsedMesh.hasVertexAlpha;\n if (parsedMesh.delayLoadingFile) {\n mesh.delayLoadState = 4;\n mesh.delayLoadingFile = rootUrl + parsedMesh.delayLoadingFile;\n mesh.buildBoundingInfo(Vector3.FromArray(parsedMesh.boundingBoxMinimum), Vector3.FromArray(parsedMesh.boundingBoxMaximum));\n if (parsedMesh._binaryInfo) {\n mesh._binaryInfo = parsedMesh._binaryInfo;\n }\n mesh._delayInfo = [];\n if (parsedMesh.hasUVs) {\n mesh._delayInfo.push(VertexBuffer.UVKind);\n }\n if (parsedMesh.hasUVs2) {\n mesh._delayInfo.push(VertexBuffer.UV2Kind);\n }\n if (parsedMesh.hasUVs3) {\n mesh._delayInfo.push(VertexBuffer.UV3Kind);\n }\n if (parsedMesh.hasUVs4) {\n mesh._delayInfo.push(VertexBuffer.UV4Kind);\n }\n if (parsedMesh.hasUVs5) {\n mesh._delayInfo.push(VertexBuffer.UV5Kind);\n }\n if (parsedMesh.hasUVs6) {\n mesh._delayInfo.push(VertexBuffer.UV6Kind);\n }\n if (parsedMesh.hasColors) {\n mesh._delayInfo.push(VertexBuffer.ColorKind);\n }\n if (parsedMesh.hasMatricesIndices) {\n mesh._delayInfo.push(VertexBuffer.MatricesIndicesKind);\n }\n if (parsedMesh.hasMatricesWeights) {\n mesh._delayInfo.push(VertexBuffer.MatricesWeightsKind);\n }\n mesh._delayLoadingFunction = Geometry._ImportGeometry;\n if (SceneLoaderFlags.ForceFullSceneLoadingForIncremental) {\n mesh._checkDelayState();\n }\n }\n else {\n Geometry._ImportGeometry(parsedMesh, mesh);\n }\n // Material\n if (parsedMesh.materialUniqueId) {\n mesh._waitingMaterialId = parsedMesh.materialUniqueId;\n }\n else if (parsedMesh.materialId) {\n mesh._waitingMaterialId = parsedMesh.materialId;\n }\n // Morph targets\n if (parsedMesh.morphTargetManagerId > -1) {\n mesh.morphTargetManager = scene.getMorphTargetManagerById(parsedMesh.morphTargetManagerId);\n }\n // Skeleton\n if (parsedMesh.skeletonId !== undefined && parsedMesh.skeletonId !== null) {\n mesh.skeleton = scene.getLastSkeletonById(parsedMesh.skeletonId);\n if (parsedMesh.numBoneInfluencers) {\n mesh.numBoneInfluencers = parsedMesh.numBoneInfluencers;\n }\n }\n // Animations\n if (parsedMesh.animations) {\n for (let animationIndex = 0; animationIndex < parsedMesh.animations.length; animationIndex++) {\n const parsedAnimation = parsedMesh.animations[animationIndex];\n const internalClass = GetClass(\"BABYLON.Animation\");\n if (internalClass) {\n mesh.animations.push(internalClass.Parse(parsedAnimation));\n }\n }\n Node.ParseAnimationRanges(mesh, parsedMesh, scene);\n }\n if (parsedMesh.autoAnimate) {\n scene.beginAnimation(mesh, parsedMesh.autoAnimateFrom, parsedMesh.autoAnimateTo, parsedMesh.autoAnimateLoop, parsedMesh.autoAnimateSpeed || 1.0);\n }\n // Layer Mask\n if (parsedMesh.layerMask && !isNaN(parsedMesh.layerMask)) {\n mesh.layerMask = Math.abs(parseInt(parsedMesh.layerMask));\n }\n else {\n mesh.layerMask = 0x0fffffff;\n }\n // Physics\n if (parsedMesh.physicsImpostor) {\n Mesh._PhysicsImpostorParser(scene, mesh, parsedMesh);\n }\n // Levels\n if (parsedMesh.lodMeshIds) {\n mesh._waitingData.lods = {\n ids: parsedMesh.lodMeshIds,\n distances: parsedMesh.lodDistances ? parsedMesh.lodDistances : null,\n coverages: parsedMesh.lodCoverages ? parsedMesh.lodCoverages : null,\n };\n }\n // Instances\n if (parsedMesh.instances) {\n for (let index = 0; index < parsedMesh.instances.length; index++) {\n const parsedInstance = parsedMesh.instances[index];\n const instance = mesh.createInstance(parsedInstance.name);\n if (parsedInstance.id) {\n instance.id = parsedInstance.id;\n }\n if (Tags) {\n if (parsedInstance.tags) {\n Tags.AddTagsTo(instance, parsedInstance.tags);\n }\n else {\n Tags.AddTagsTo(instance, parsedMesh.tags);\n }\n }\n instance.position = Vector3.FromArray(parsedInstance.position);\n if (parsedInstance.metadata !== undefined) {\n instance.metadata = parsedInstance.metadata;\n }\n if (parsedInstance.parentId !== undefined) {\n instance._waitingParentId = parsedInstance.parentId;\n }\n if (parsedInstance.parentInstanceIndex !== undefined) {\n instance._waitingParentInstanceIndex = parsedInstance.parentInstanceIndex;\n }\n if (parsedInstance.isEnabled !== undefined && parsedInstance.isEnabled !== null) {\n instance.setEnabled(parsedInstance.isEnabled);\n }\n if (parsedInstance.isVisible !== undefined && parsedInstance.isVisible !== null) {\n instance.isVisible = parsedInstance.isVisible;\n }\n if (parsedInstance.isPickable !== undefined && parsedInstance.isPickable !== null) {\n instance.isPickable = parsedInstance.isPickable;\n }\n if (parsedInstance.rotationQuaternion) {\n instance.rotationQuaternion = Quaternion.FromArray(parsedInstance.rotationQuaternion);\n }\n else if (parsedInstance.rotation) {\n instance.rotation = Vector3.FromArray(parsedInstance.rotation);\n }\n instance.scaling = Vector3.FromArray(parsedInstance.scaling);\n if (parsedInstance.checkCollisions != undefined && parsedInstance.checkCollisions != null) {\n instance.checkCollisions = parsedInstance.checkCollisions;\n }\n if (parsedInstance.pickable != undefined && parsedInstance.pickable != null) {\n instance.isPickable = parsedInstance.pickable;\n }\n if (parsedInstance.showBoundingBox != undefined && parsedInstance.showBoundingBox != null) {\n instance.showBoundingBox = parsedInstance.showBoundingBox;\n }\n if (parsedInstance.showSubMeshesBoundingBox != undefined && parsedInstance.showSubMeshesBoundingBox != null) {\n instance.showSubMeshesBoundingBox = parsedInstance.showSubMeshesBoundingBox;\n }\n if (parsedInstance.alphaIndex != undefined && parsedInstance.showSubMeshesBoundingBox != null) {\n instance.alphaIndex = parsedInstance.alphaIndex;\n }\n // Physics\n if (parsedInstance.physicsImpostor) {\n Mesh._PhysicsImpostorParser(scene, instance, parsedInstance);\n }\n // Actions\n if (parsedInstance.actions !== undefined) {\n instance._waitingData.actions = parsedInstance.actions;\n }\n // Animation\n if (parsedInstance.animations) {\n for (let animationIndex = 0; animationIndex < parsedInstance.animations.length; animationIndex++) {\n const parsedAnimation = parsedInstance.animations[animationIndex];\n const internalClass = GetClass(\"BABYLON.Animation\");\n if (internalClass) {\n instance.animations.push(internalClass.Parse(parsedAnimation));\n }\n }\n Node.ParseAnimationRanges(instance, parsedInstance, scene);\n if (parsedInstance.autoAnimate) {\n scene.beginAnimation(instance, parsedInstance.autoAnimateFrom, parsedInstance.autoAnimateTo, parsedInstance.autoAnimateLoop, parsedInstance.autoAnimateSpeed || 1.0);\n }\n }\n }\n }\n // Thin instances\n if (parsedMesh.thinInstances) {\n const thinInstances = parsedMesh.thinInstances;\n mesh.thinInstanceEnablePicking = !!thinInstances.enablePicking;\n if (thinInstances.matrixData) {\n mesh.thinInstanceSetBuffer(\"matrix\", new Float32Array(thinInstances.matrixData), 16, false);\n mesh._thinInstanceDataStorage.matrixBufferSize = thinInstances.matrixBufferSize;\n mesh._thinInstanceDataStorage.instancesCount = thinInstances.instancesCount;\n }\n else {\n mesh._thinInstanceDataStorage.matrixBufferSize = thinInstances.matrixBufferSize;\n }\n if (parsedMesh.thinInstances.userThinInstance) {\n const userThinInstance = parsedMesh.thinInstances.userThinInstance;\n for (const kind in userThinInstance.data) {\n mesh.thinInstanceSetBuffer(kind, new Float32Array(userThinInstance.data[kind]), userThinInstance.strides[kind], false);\n mesh._userThinInstanceBuffersStorage.sizes[kind] = userThinInstance.sizes[kind];\n }\n }\n }\n return mesh;\n }\n // Skeletons\n /**\n * Prepare internal position array for software CPU skinning\n * @returns original positions used for CPU skinning. Useful for integrating Morphing with skeletons in same mesh\n */\n setPositionsForCPUSkinning() {\n const internalDataInfo = this._internalMeshDataInfo;\n if (!internalDataInfo._sourcePositions) {\n const source = this.getVerticesData(VertexBuffer.PositionKind);\n if (!source) {\n return internalDataInfo._sourcePositions;\n }\n internalDataInfo._sourcePositions = new Float32Array(source);\n if (!this.isVertexBufferUpdatable(VertexBuffer.PositionKind)) {\n this.setVerticesData(VertexBuffer.PositionKind, source, true);\n }\n }\n return internalDataInfo._sourcePositions;\n }\n /**\n * Prepare internal normal array for software CPU skinning\n * @returns original normals used for CPU skinning. Useful for integrating Morphing with skeletons in same mesh.\n */\n setNormalsForCPUSkinning() {\n const internalDataInfo = this._internalMeshDataInfo;\n if (!internalDataInfo._sourceNormals) {\n const source = this.getVerticesData(VertexBuffer.NormalKind);\n if (!source) {\n return internalDataInfo._sourceNormals;\n }\n internalDataInfo._sourceNormals = new Float32Array(source);\n if (!this.isVertexBufferUpdatable(VertexBuffer.NormalKind)) {\n this.setVerticesData(VertexBuffer.NormalKind, source, true);\n }\n }\n return internalDataInfo._sourceNormals;\n }\n /**\n * Updates the vertex buffer by applying transformation from the bones\n * @param skeleton defines the skeleton to apply to current mesh\n * @returns the current mesh\n */\n applySkeleton(skeleton) {\n if (!this.geometry) {\n return this;\n }\n if (this.geometry._softwareSkinningFrameId == this.getScene().getFrameId()) {\n return this;\n }\n this.geometry._softwareSkinningFrameId = this.getScene().getFrameId();\n if (!this.isVerticesDataPresent(VertexBuffer.PositionKind)) {\n return this;\n }\n if (!this.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind)) {\n return this;\n }\n if (!this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) {\n return this;\n }\n const hasNormals = this.isVerticesDataPresent(VertexBuffer.NormalKind);\n const internalDataInfo = this._internalMeshDataInfo;\n if (!internalDataInfo._sourcePositions) {\n const submeshes = this.subMeshes.slice();\n this.setPositionsForCPUSkinning();\n this.subMeshes = submeshes;\n }\n if (hasNormals && !internalDataInfo._sourceNormals) {\n this.setNormalsForCPUSkinning();\n }\n // positionsData checks for not being Float32Array will only pass at most once\n let positionsData = this.getVerticesData(VertexBuffer.PositionKind);\n if (!positionsData) {\n return this;\n }\n if (!(positionsData instanceof Float32Array)) {\n positionsData = new Float32Array(positionsData);\n }\n // normalsData checks for not being Float32Array will only pass at most once\n let normalsData = this.getVerticesData(VertexBuffer.NormalKind);\n if (hasNormals) {\n if (!normalsData) {\n return this;\n }\n if (!(normalsData instanceof Float32Array)) {\n normalsData = new Float32Array(normalsData);\n }\n }\n const matricesIndicesData = this.getVerticesData(VertexBuffer.MatricesIndicesKind);\n const matricesWeightsData = this.getVerticesData(VertexBuffer.MatricesWeightsKind);\n if (!matricesWeightsData || !matricesIndicesData) {\n return this;\n }\n const needExtras = this.numBoneInfluencers > 4;\n const matricesIndicesExtraData = needExtras ? this.getVerticesData(VertexBuffer.MatricesIndicesExtraKind) : null;\n const matricesWeightsExtraData = needExtras ? this.getVerticesData(VertexBuffer.MatricesWeightsExtraKind) : null;\n const skeletonMatrices = skeleton.getTransformMatrices(this);\n const tempVector3 = Vector3.Zero();\n const finalMatrix = new Matrix();\n const tempMatrix = new Matrix();\n let matWeightIdx = 0;\n let inf;\n for (let index = 0; index < positionsData.length; index += 3, matWeightIdx += 4) {\n let weight;\n for (inf = 0; inf < 4; inf++) {\n weight = matricesWeightsData[matWeightIdx + inf];\n if (weight > 0) {\n Matrix.FromFloat32ArrayToRefScaled(skeletonMatrices, Math.floor(matricesIndicesData[matWeightIdx + inf] * 16), weight, tempMatrix);\n finalMatrix.addToSelf(tempMatrix);\n }\n }\n if (needExtras) {\n for (inf = 0; inf < 4; inf++) {\n weight = matricesWeightsExtraData[matWeightIdx + inf];\n if (weight > 0) {\n Matrix.FromFloat32ArrayToRefScaled(skeletonMatrices, Math.floor(matricesIndicesExtraData[matWeightIdx + inf] * 16), weight, tempMatrix);\n finalMatrix.addToSelf(tempMatrix);\n }\n }\n }\n Vector3.TransformCoordinatesFromFloatsToRef(internalDataInfo._sourcePositions[index], internalDataInfo._sourcePositions[index + 1], internalDataInfo._sourcePositions[index + 2], finalMatrix, tempVector3);\n tempVector3.toArray(positionsData, index);\n if (hasNormals) {\n Vector3.TransformNormalFromFloatsToRef(internalDataInfo._sourceNormals[index], internalDataInfo._sourceNormals[index + 1], internalDataInfo._sourceNormals[index + 2], finalMatrix, tempVector3);\n tempVector3.toArray(normalsData, index);\n }\n finalMatrix.reset();\n }\n this.updateVerticesData(VertexBuffer.PositionKind, positionsData);\n if (hasNormals) {\n this.updateVerticesData(VertexBuffer.NormalKind, normalsData);\n }\n return this;\n }\n // Tools\n /**\n * Returns an object containing a min and max Vector3 which are the minimum and maximum vectors of each mesh bounding box from the passed array, in the world coordinates\n * @param meshes defines the list of meshes to scan\n * @returns an object `{min:` Vector3`, max:` Vector3`}`\n */\n static MinMax(meshes) {\n let minVector = null;\n let maxVector = null;\n meshes.forEach(function (mesh) {\n const boundingInfo = mesh.getBoundingInfo();\n const boundingBox = boundingInfo.boundingBox;\n if (!minVector || !maxVector) {\n minVector = boundingBox.minimumWorld;\n maxVector = boundingBox.maximumWorld;\n }\n else {\n minVector.minimizeInPlace(boundingBox.minimumWorld);\n maxVector.maximizeInPlace(boundingBox.maximumWorld);\n }\n });\n if (!minVector || !maxVector) {\n return {\n min: Vector3.Zero(),\n max: Vector3.Zero(),\n };\n }\n return {\n min: minVector,\n max: maxVector,\n };\n }\n /**\n * Returns the center of the `{min:` Vector3`, max:` Vector3`}` or the center of MinMax vector3 computed from a mesh array\n * @param meshesOrMinMaxVector could be an array of meshes or a `{min:` Vector3`, max:` Vector3`}` object\n * @returns a vector3\n */\n static Center(meshesOrMinMaxVector) {\n const minMaxVector = meshesOrMinMaxVector instanceof Array ? Mesh.MinMax(meshesOrMinMaxVector) : meshesOrMinMaxVector;\n return Vector3.Center(minMaxVector.min, minMaxVector.max);\n }\n /**\n * Merge the array of meshes into a single mesh for performance reasons.\n * @param meshes array of meshes with the vertices to merge. Entries cannot be empty meshes.\n * @param disposeSource when true (default), dispose of the vertices from the source meshes.\n * @param allow32BitsIndices when the sum of the vertices > 64k, this must be set to true.\n * @param meshSubclass (optional) can be set to a Mesh where the merged vertices will be inserted.\n * @param subdivideWithSubMeshes when true (false default), subdivide mesh into subMeshes.\n * @param multiMultiMaterials when true (false default), subdivide mesh into subMeshes with multiple materials, ignores subdivideWithSubMeshes.\n * @returns a new mesh\n */\n static MergeMeshes(meshes, disposeSource = true, allow32BitsIndices, meshSubclass, subdivideWithSubMeshes, multiMultiMaterials) {\n return runCoroutineSync(Mesh._MergeMeshesCoroutine(meshes, disposeSource, allow32BitsIndices, meshSubclass, subdivideWithSubMeshes, multiMultiMaterials, false));\n }\n /**\n * Merge the array of meshes into a single mesh for performance reasons.\n * @param meshes array of meshes with the vertices to merge. Entries cannot be empty meshes.\n * @param disposeSource when true (default), dispose of the vertices from the source meshes.\n * @param allow32BitsIndices when the sum of the vertices > 64k, this must be set to true.\n * @param meshSubclass (optional) can be set to a Mesh where the merged vertices will be inserted.\n * @param subdivideWithSubMeshes when true (false default), subdivide mesh into subMeshes.\n * @param multiMultiMaterials when true (false default), subdivide mesh into subMeshes with multiple materials, ignores subdivideWithSubMeshes.\n * @returns a new mesh\n */\n static MergeMeshesAsync(meshes, disposeSource = true, allow32BitsIndices, meshSubclass, subdivideWithSubMeshes, multiMultiMaterials) {\n return runCoroutineAsync(Mesh._MergeMeshesCoroutine(meshes, disposeSource, allow32BitsIndices, meshSubclass, subdivideWithSubMeshes, multiMultiMaterials, true), createYieldingScheduler());\n }\n static *_MergeMeshesCoroutine(meshes, disposeSource = true, allow32BitsIndices, meshSubclass, subdivideWithSubMeshes, multiMultiMaterials, isAsync) {\n // Remove any null/undefined entries from the mesh array\n meshes = meshes.filter(Boolean);\n if (meshes.length === 0) {\n return null;\n }\n let index;\n if (!allow32BitsIndices) {\n let totalVertices = 0;\n // Counting vertices\n for (index = 0; index < meshes.length; index++) {\n totalVertices += meshes[index].getTotalVertices();\n if (totalVertices >= 65536) {\n Logger.Warn(\"Cannot merge meshes because resulting mesh will have more than 65536 vertices. Please use allow32BitsIndices = true to use 32 bits indices\");\n return null;\n }\n }\n }\n if (multiMultiMaterials) {\n subdivideWithSubMeshes = false;\n }\n const materialArray = new Array();\n const materialIndexArray = new Array();\n // Merge\n const indiceArray = new Array();\n const currentOverrideMaterialSideOrientation = meshes[0].overrideMaterialSideOrientation;\n for (index = 0; index < meshes.length; index++) {\n const mesh = meshes[index];\n if (mesh.isAnInstance) {\n Logger.Warn(\"Cannot merge instance meshes.\");\n return null;\n }\n if (currentOverrideMaterialSideOrientation !== mesh.overrideMaterialSideOrientation) {\n Logger.Warn(\"Cannot merge meshes with different overrideMaterialSideOrientation values.\");\n return null;\n }\n if (subdivideWithSubMeshes) {\n indiceArray.push(mesh.getTotalIndices());\n }\n if (multiMultiMaterials) {\n if (mesh.material) {\n const material = mesh.material;\n if (material instanceof MultiMaterial) {\n for (let matIndex = 0; matIndex < material.subMaterials.length; matIndex++) {\n if (materialArray.indexOf(material.subMaterials[matIndex]) < 0) {\n materialArray.push(material.subMaterials[matIndex]);\n }\n }\n for (let subIndex = 0; subIndex < mesh.subMeshes.length; subIndex++) {\n materialIndexArray.push(materialArray.indexOf(material.subMaterials[mesh.subMeshes[subIndex].materialIndex]));\n indiceArray.push(mesh.subMeshes[subIndex].indexCount);\n }\n }\n else {\n if (materialArray.indexOf(material) < 0) {\n materialArray.push(material);\n }\n for (let subIndex = 0; subIndex < mesh.subMeshes.length; subIndex++) {\n materialIndexArray.push(materialArray.indexOf(material));\n indiceArray.push(mesh.subMeshes[subIndex].indexCount);\n }\n }\n }\n else {\n for (let subIndex = 0; subIndex < mesh.subMeshes.length; subIndex++) {\n materialIndexArray.push(0);\n indiceArray.push(mesh.subMeshes[subIndex].indexCount);\n }\n }\n }\n }\n const source = meshes[0];\n const getVertexDataFromMesh = (mesh) => {\n const wm = mesh.computeWorldMatrix(true);\n const vertexData = VertexData.ExtractFromMesh(mesh, false, false);\n return { vertexData, transform: wm };\n };\n const { vertexData: sourceVertexData, transform: sourceTransform } = getVertexDataFromMesh(source);\n if (isAsync) {\n yield;\n }\n const meshVertexDatas = new Array(meshes.length - 1);\n for (let i = 1; i < meshes.length; i++) {\n meshVertexDatas[i - 1] = getVertexDataFromMesh(meshes[i]);\n if (isAsync) {\n yield;\n }\n }\n const mergeCoroutine = sourceVertexData._mergeCoroutine(sourceTransform, meshVertexDatas, allow32BitsIndices, isAsync, !disposeSource);\n let mergeCoroutineStep = mergeCoroutine.next();\n while (!mergeCoroutineStep.done) {\n if (isAsync) {\n yield;\n }\n mergeCoroutineStep = mergeCoroutine.next();\n }\n const vertexData = mergeCoroutineStep.value;\n if (!meshSubclass) {\n meshSubclass = new Mesh(source.name + \"_merged\", source.getScene());\n }\n const applyToCoroutine = vertexData._applyToCoroutine(meshSubclass, undefined, isAsync);\n let applyToCoroutineStep = applyToCoroutine.next();\n while (!applyToCoroutineStep.done) {\n if (isAsync) {\n yield;\n }\n applyToCoroutineStep = applyToCoroutine.next();\n }\n // Setting properties\n meshSubclass.checkCollisions = source.checkCollisions;\n meshSubclass.overrideMaterialSideOrientation = source.overrideMaterialSideOrientation;\n // Cleaning\n if (disposeSource) {\n for (index = 0; index < meshes.length; index++) {\n meshes[index].dispose();\n }\n }\n // Subdivide\n if (subdivideWithSubMeshes || multiMultiMaterials) {\n //-- removal of global submesh\n meshSubclass.releaseSubMeshes();\n index = 0;\n let offset = 0;\n //-- apply subdivision according to index table\n while (index < indiceArray.length) {\n SubMesh.CreateFromIndices(0, offset, indiceArray[index], meshSubclass, undefined, false);\n offset += indiceArray[index];\n index++;\n }\n for (const subMesh of meshSubclass.subMeshes) {\n subMesh.refreshBoundingInfo();\n }\n meshSubclass.computeWorldMatrix(true);\n }\n if (multiMultiMaterials) {\n const newMultiMaterial = new MultiMaterial(source.name + \"_merged\", source.getScene());\n newMultiMaterial.subMaterials = materialArray;\n for (let subIndex = 0; subIndex < meshSubclass.subMeshes.length; subIndex++) {\n meshSubclass.subMeshes[subIndex].materialIndex = materialIndexArray[subIndex];\n }\n meshSubclass.material = newMultiMaterial;\n }\n else {\n meshSubclass.material = source.material;\n }\n return meshSubclass;\n }\n /**\n * @internal\n */\n addInstance(instance) {\n instance._indexInSourceMeshInstanceArray = this.instances.length;\n this.instances.push(instance);\n }\n /**\n * @internal\n */\n removeInstance(instance) {\n // Remove from mesh\n const index = instance._indexInSourceMeshInstanceArray;\n if (index != -1) {\n if (index !== this.instances.length - 1) {\n const last = this.instances[this.instances.length - 1];\n this.instances[index] = last;\n last._indexInSourceMeshInstanceArray = index;\n }\n instance._indexInSourceMeshInstanceArray = -1;\n this.instances.pop();\n }\n }\n /** @internal */\n _shouldConvertRHS() {\n return this.overrideMaterialSideOrientation === Material.CounterClockWiseSideOrientation;\n }\n /** @internal */\n _getRenderingFillMode(fillMode) {\n var _a;\n const scene = this.getScene();\n if (scene.forcePointsCloud)\n return Material.PointFillMode;\n if (scene.forceWireframe)\n return Material.WireFrameFillMode;\n return (_a = this.overrideRenderingFillMode) !== null && _a !== void 0 ? _a : fillMode;\n }\n // deprecated methods\n /**\n * Sets the mesh material by the material or multiMaterial `id` property\n * @param id is a string identifying the material or the multiMaterial\n * @returns the current mesh\n * @deprecated Please use MeshBuilder instead Please use setMaterialById instead\n */\n setMaterialByID(id) {\n return this.setMaterialById(id);\n }\n /**\n * Creates a ribbon mesh.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n * @param name defines the name of the mesh to create\n * @param pathArray is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry.\n * @param closeArray creates a seam between the first and the last paths of the path array (default is false)\n * @param closePath creates a seam between the first and the last points of each path of the path array\n * @param offset is taken in account only if the `pathArray` is containing a single path\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @param instance defines an instance of an existing Ribbon object to be updated with the passed `pathArray` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#ribbon)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateRibbon(name, pathArray, closeArray, closePath, offset, scene, updatable, sideOrientation, instance) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a plane polygonal mesh. By default, this is a disc.\n * @param name defines the name of the mesh to create\n * @param radius sets the radius size (float) of the polygon (default 0.5)\n * @param tessellation sets the number of polygon sides (positive integer, default 64). So a tessellation valued to 3 will build a triangle, to 4 a square, etc\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateDisc(name, radius, tessellation, scene, updatable, sideOrientation) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a box mesh.\n * @param name defines the name of the mesh to create\n * @param size sets the size (float) of each box side (default 1)\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateBox(name, size, scene, updatable, sideOrientation) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a sphere mesh.\n * @param name defines the name of the mesh to create\n * @param segments sets the sphere number of horizontal stripes (positive integer, default 32)\n * @param diameter sets the diameter size (float) of the sphere (default 1)\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateSphere(name, segments, diameter, scene, updatable, sideOrientation) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a hemisphere mesh.\n * @param name defines the name of the mesh to create\n * @param segments sets the sphere number of horizontal stripes (positive integer, default 32)\n * @param diameter sets the diameter size (float) of the sphere (default 1)\n * @param scene defines the hosting scene\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateHemisphere(name, segments, diameter, scene) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a cylinder or a cone mesh.\n * @param name defines the name of the mesh to create\n * @param height sets the height size (float) of the cylinder/cone (float, default 2)\n * @param diameterTop set the top cap diameter (floats, default 1)\n * @param diameterBottom set the bottom cap diameter (floats, default 1). This value can't be zero\n * @param tessellation sets the number of cylinder sides (positive integer, default 24). Set it to 3 to get a prism for instance\n * @param subdivisions sets the number of rings along the cylinder height (positive integer, default 1)\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateCylinder(name, height, diameterTop, diameterBottom, tessellation, subdivisions, scene, updatable, sideOrientation) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n // Torus (Code from SharpDX.org)\n /**\n * Creates a torus mesh.\n * @param name defines the name of the mesh to create\n * @param diameter sets the diameter size (float) of the torus (default 1)\n * @param thickness sets the diameter size of the tube of the torus (float, default 0.5)\n * @param tessellation sets the number of torus sides (positive integer, default 16)\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateTorus(name, diameter, thickness, tessellation, scene, updatable, sideOrientation) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a torus knot mesh.\n * @param name defines the name of the mesh to create\n * @param radius sets the global radius size (float) of the torus knot (default 2)\n * @param tube sets the diameter size of the tube of the torus (float, default 0.5)\n * @param radialSegments sets the number of sides on each tube segments (positive integer, default 32)\n * @param tubularSegments sets the number of tubes to decompose the knot into (positive integer, default 32)\n * @param p the number of windings on X axis (positive integers, default 2)\n * @param q the number of windings on Y axis (positive integers, default 3)\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateTorusKnot(name, radius, tube, radialSegments, tubularSegments, p, q, scene, updatable, sideOrientation) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a line mesh..\n * @param name defines the name of the mesh to create\n * @param points is an array successive Vector3\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param instance is an instance of an existing LineMesh object to be updated with the passed `points` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#lines-and-dashedlines).\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateLines(name, points, scene, updatable, instance) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a dashed line mesh.\n * @param name defines the name of the mesh to create\n * @param points is an array successive Vector3\n * @param dashSize is the size of the dashes relatively the dash number (positive float, default 3)\n * @param gapSize is the size of the gap between two successive dashes relatively the dash number (positive float, default 1)\n * @param dashNb is the intended total number of dashes (positive integer, default 200)\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param instance is an instance of an existing LineMesh object to be updated with the passed `points` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#lines-and-dashedlines)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateDashedLines(name, points, dashSize, gapSize, dashNb, scene, updatable, instance) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a polygon mesh.Please consider using the same method from the MeshBuilder class instead\n * The polygon's shape will depend on the input parameters and is constructed parallel to a ground mesh.\n * The parameter `shape` is a required array of successive Vector3 representing the corners of the polygon in th XoZ plane, that is y = 0 for all vectors.\n * You can set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.\n * Remember you can only change the shape positions, not their number when updating a polygon.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#non-regular-polygon\n * @param name defines the name of the mesh to create\n * @param shape is a required array of successive Vector3 representing the corners of the polygon in th XoZ plane, that is y = 0 for all vectors\n * @param scene defines the hosting scene\n * @param holes is a required array of arrays of successive Vector3 used to defines holes in the polygon\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @param earcutInjection can be used to inject your own earcut reference\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreatePolygon(name, shape, scene, holes, updatable, sideOrientation, earcutInjection) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates an extruded polygon mesh, with depth in the Y direction..\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-non-regular-polygon\n * @param name defines the name of the mesh to create\n * @param shape is a required array of successive Vector3 representing the corners of the polygon in th XoZ plane, that is y = 0 for all vectors\n * @param depth defines the height of extrusion\n * @param scene defines the hosting scene\n * @param holes is a required array of arrays of successive Vector3 used to defines holes in the polygon\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @param earcutInjection can be used to inject your own earcut reference\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static ExtrudePolygon(name, shape, depth, scene, holes, updatable, sideOrientation, earcutInjection) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates an extruded shape mesh.\n * The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\n * @param name defines the name of the mesh to create\n * @param shape is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis\n * @param path is a required array of successive Vector3. This is the axis curve the shape is extruded along\n * @param scale is the value to scale the shape\n * @param rotation is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve\n * @param cap sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @param instance is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#extruded-shape)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static ExtrudeShape(name, shape, path, scale, rotation, cap, scene, updatable, sideOrientation, instance) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates an custom extruded shape mesh.\n * The custom extrusion is a parametric shape.\n * It has no predefined shape. Its final shape will depend on the input parameters.\n *\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\n * @param name defines the name of the mesh to create\n * @param shape is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis\n * @param path is a required array of successive Vector3. This is the axis curve the shape is extruded along\n * @param scaleFunction is a custom Javascript function called on each path point\n * @param rotationFunction is a custom Javascript function called on each path point\n * @param ribbonCloseArray forces the extrusion underlying ribbon to close all the paths in its `pathArray`\n * @param ribbonClosePath forces the extrusion underlying ribbon to close its `pathArray`\n * @param cap sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @param instance is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters (https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static ExtrudeShapeCustom(name, shape, path, scaleFunction, rotationFunction, ribbonCloseArray, ribbonClosePath, cap, scene, updatable, sideOrientation, instance) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates lathe mesh.\n * The lathe is a shape with a symmetry axis : a 2D model shape is rotated around this axis to design the lathe.\n * @param name defines the name of the mesh to create\n * @param shape is a required array of successive Vector3. This array depicts the shape to be rotated in its local space : the shape must be designed in the xOy plane and will be rotated around the Y axis. It's usually a 2D shape, so the Vector3 z coordinates are often set to zero\n * @param radius is the radius value of the lathe\n * @param tessellation is the side number of the lathe.\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateLathe(name, shape, radius, tessellation, scene, updatable, sideOrientation) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a plane mesh.\n * @param name defines the name of the mesh to create\n * @param size sets the size (float) of both sides of the plane at once (default 1)\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreatePlane(name, size, scene, updatable, sideOrientation) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a ground mesh.\n * @param name defines the name of the mesh to create\n * @param width set the width of the ground\n * @param height set the height of the ground\n * @param subdivisions sets the number of subdivisions per side\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateGround(name, width, height, subdivisions, scene, updatable) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a tiled ground mesh.\n * @param name defines the name of the mesh to create\n * @param xmin set the ground minimum X coordinate\n * @param zmin set the ground minimum Y coordinate\n * @param xmax set the ground maximum X coordinate\n * @param zmax set the ground maximum Z coordinate\n * @param subdivisions is an object `{w: positive integer, h: positive integer}` (default `{w: 6, h: 6}`). `w` and `h` are the numbers of subdivisions on the ground width and height. Each subdivision is called a tile\n * @param precision is an object `{w: positive integer, h: positive integer}` (default `{w: 2, h: 2}`). `w` and `h` are the numbers of subdivisions on the ground width and height of each tile\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateTiledGround(name, xmin, zmin, xmax, zmax, subdivisions, precision, scene, updatable) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a ground mesh from a height map.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/height_map\n * @param name defines the name of the mesh to create\n * @param url sets the URL of the height map image resource\n * @param width set the ground width size\n * @param height set the ground height size\n * @param subdivisions sets the number of subdivision per side\n * @param minHeight is the minimum altitude on the ground\n * @param maxHeight is the maximum altitude on the ground\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param onReady is a callback function that will be called once the mesh is built (the height map download can last some time)\n * @param alphaFilter will filter any data where the alpha channel is below this value, defaults 0 (all data visible)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateGroundFromHeightMap(name, url, width, height, subdivisions, minHeight, maxHeight, scene, updatable, onReady, alphaFilter) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a tube mesh.\n * The tube is a parametric shape.\n * It has no predefined shape. Its final shape will depend on the input parameters.\n *\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n * @param name defines the name of the mesh to create\n * @param path is a required array of successive Vector3. It is the curve used as the axis of the tube\n * @param radius sets the tube radius size\n * @param tessellation is the number of sides on the tubular surface\n * @param radiusFunction is a custom function. If it is not null, it overrides the parameter `radius`. This function is called on each point of the tube path and is passed the index `i` of the i-th point and the distance of this point from the first point of the path\n * @param cap sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL\n * @param scene defines the hosting scene\n * @param updatable defines if the mesh must be flagged as updatable\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)\n * @param instance is an instance of an existing Tube object to be updated with the passed `pathArray` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#tube)\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateTube(name, path, radius, tessellation, radiusFunction, cap, scene, updatable, sideOrientation, instance) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a polyhedron mesh.\n *.\n * * The parameter `type` (positive integer, max 14, default 0) sets the polyhedron type to build among the 15 embedded types. Please refer to the type sheet in the tutorial to choose the wanted type\n * * The parameter `size` (positive float, default 1) sets the polygon size\n * * You can overwrite the `size` on each dimension bu using the parameters `sizeX`, `sizeY` or `sizeZ` (positive floats, default to `size` value)\n * * You can build other polyhedron types than the 15 embbeded ones by setting the parameter `custom` (`polyhedronObject`, default null). If you set the parameter `custom`, this overwrittes the parameter `type`\n * * A `polyhedronObject` is a formatted javascript object. You'll find a full file with pre-set polyhedra here : https://github.com/BabylonJS/Extensions/tree/master/Polyhedron\n * * You can set the color and the UV of each side of the polyhedron with the parameters `faceColors` (Color4, default `(1, 1, 1, 1)`) and faceUV (Vector4, default `(0, 0, 1, 1)`)\n * * To understand how to set `faceUV` or `faceColors`, please read this by considering the right number of faces of your polyhedron, instead of only 6 for the box : https://doc.babylonjs.com/features/featuresDeepDive/materials/using/texturePerBoxFace\n * * The parameter `flat` (boolean, default true). If set to false, it gives the polyhedron a single global face, so less vertices and shared normals. In this case, `faceColors` and `faceUV` are ignored\n * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @param name defines the name of the mesh to create\n * @param options defines the options used to create the mesh\n * @param scene defines the hosting scene\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreatePolyhedron(name, options, scene) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a sphere based upon an icosahedron with 20 triangular faces which can be subdivided\n * * The parameter `radius` sets the radius size (float) of the icosphere (default 1)\n * * You can set some different icosphere dimensions, for instance to build an ellipsoid, by using the parameters `radiusX`, `radiusY` and `radiusZ` (all by default have the same value than `radius`)\n * * The parameter `subdivisions` sets the number of subdivisions (positive integer, default 4). The more subdivisions, the more faces on the icosphere whatever its size\n * * The parameter `flat` (boolean, default true) gives each side its own normals. Set it to false to get a smooth continuous light reflection on the surface\n * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/polyhedra#icosphere\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param scene defines the hosting scene\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateIcoSphere(name, options, scene) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Creates a decal mesh.\n *.\n * A decal is a mesh usually applied as a model onto the surface of another mesh\n * @param name defines the name of the mesh\n * @param sourceMesh defines the mesh receiving the decal\n * @param position sets the position of the decal in world coordinates\n * @param normal sets the normal of the mesh where the decal is applied onto in world coordinates\n * @param size sets the decal scaling\n * @param angle sets the angle to rotate the decal\n * @returns a new Mesh\n * @deprecated Please use MeshBuilder instead\n */\n static CreateDecal(name, sourceMesh, position, normal, size, angle) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /** Creates a Capsule Mesh\n * @param name defines the name of the mesh.\n * @param options the constructors options used to shape the mesh.\n * @param scene defines the scene the mesh is scoped to.\n * @returns the capsule mesh\n * @see https://doc.babylonjs.com/how_to/capsule_shape\n * @deprecated Please use MeshBuilder instead\n */\n static CreateCapsule(name, options, scene) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n /**\n * Extends a mesh to a Goldberg mesh\n * Warning the mesh to convert MUST be an import of a perviously exported Goldberg mesh\n * @param mesh the mesh to convert\n * @returns the extended mesh\n * @deprecated Please use ExtendMeshToGoldberg instead\n */\n static ExtendToGoldberg(mesh) {\n throw new Error(\"Import MeshBuilder to populate this function\");\n }\n}\n// Consts\n/**\n * Mesh side orientation : usually the external or front surface\n */\nMesh.FRONTSIDE = VertexData.FRONTSIDE;\n/**\n * Mesh side orientation : usually the internal or back surface\n */\nMesh.BACKSIDE = VertexData.BACKSIDE;\n/**\n * Mesh side orientation : both internal and external or front and back surfaces\n */\nMesh.DOUBLESIDE = VertexData.DOUBLESIDE;\n/**\n * Mesh side orientation : by default, `FRONTSIDE`\n */\nMesh.DEFAULTSIDE = VertexData.DEFAULTSIDE;\n/**\n * Mesh cap setting : no cap\n */\nMesh.NO_CAP = 0;\n/**\n * Mesh cap setting : one cap at the beginning of the mesh\n */\nMesh.CAP_START = 1;\n/**\n * Mesh cap setting : one cap at the end of the mesh\n */\nMesh.CAP_END = 2;\n/**\n * Mesh cap setting : two caps, one at the beginning and one at the end of the mesh\n */\nMesh.CAP_ALL = 3;\n/**\n * Mesh pattern setting : no flip or rotate\n */\nMesh.NO_FLIP = 0;\n/**\n * Mesh pattern setting : flip (reflect in y axis) alternate tiles on each row or column\n */\nMesh.FLIP_TILE = 1;\n/**\n * Mesh pattern setting : rotate (180degs) alternate tiles on each row or column\n */\nMesh.ROTATE_TILE = 2;\n/**\n * Mesh pattern setting : flip (reflect in y axis) all tiles on alternate rows\n */\nMesh.FLIP_ROW = 3;\n/**\n * Mesh pattern setting : rotate (180degs) all tiles on alternate rows\n */\nMesh.ROTATE_ROW = 4;\n/**\n * Mesh pattern setting : flip and rotate alternate tiles on each row or column\n */\nMesh.FLIP_N_ROTATE_TILE = 5;\n/**\n * Mesh pattern setting : rotate pattern and rotate\n */\nMesh.FLIP_N_ROTATE_ROW = 6;\n/**\n * Mesh tile positioning : part tiles same on left/right or top/bottom\n */\nMesh.CENTER = 0;\n/**\n * Mesh tile positioning : part tiles on left\n */\nMesh.LEFT = 1;\n/**\n * Mesh tile positioning : part tiles on right\n */\nMesh.RIGHT = 2;\n/**\n * Mesh tile positioning : part tiles on top\n */\nMesh.TOP = 3;\n/**\n * Mesh tile positioning : part tiles on bottom\n */\nMesh.BOTTOM = 4;\n/**\n * Indicates that the instanced meshes should be sorted from back to front before rendering if their material is transparent\n */\nMesh.INSTANCEDMESH_SORT_TRANSPARENT = false;\n// Statics\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nMesh._GroundMeshParser = (parsedMesh, scene) => {\n throw _WarnImport(\"GroundMesh\");\n};\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nMesh._GoldbergMeshParser = (parsedMesh, scene) => {\n throw _WarnImport(\"GoldbergMesh\");\n};\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nMesh._LinesMeshParser = (parsedMesh, scene) => {\n throw _WarnImport(\"LinesMesh\");\n};\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nMesh._GreasedLineMeshParser = (parsedMesh, scene) => {\n throw _WarnImport(\"GreasedLineMesh\");\n};\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nMesh._GreasedLineRibbonMeshParser = (parsedMesh, scene) => {\n throw _WarnImport(\"GreasedLineRibbonMesh\");\n};\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nMesh._TrailMeshParser = (parsedMesh, scene) => {\n throw _WarnImport(\"TrailMesh\");\n};\nRegisterClass(\"BABYLON.Mesh\", Mesh);\n//# sourceMappingURL=mesh.js.map","import { Matrix, TmpVectors } from \"../Maths/math.vector.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { AbstractMesh } from \"../Meshes/abstractMesh.js\";\nimport { Mesh } from \"../Meshes/mesh.js\";\nimport { DeepCopier } from \"../Misc/deepCopier.js\";\nimport { TransformNode } from \"./transformNode.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { Tools } from \"../Misc/tools.js\";\nMesh._instancedMeshFactory = (name, mesh) => {\n const instance = new InstancedMesh(name, mesh);\n if (mesh.instancedBuffers) {\n instance.instancedBuffers = {};\n for (const key in mesh.instancedBuffers) {\n instance.instancedBuffers[key] = mesh.instancedBuffers[key];\n }\n }\n return instance;\n};\n/**\n * Creates an instance based on a source mesh.\n */\nexport class InstancedMesh extends AbstractMesh {\n /**\n * Creates a new InstancedMesh object from the mesh source.\n * @param name defines the name of the instance\n * @param source the mesh to create the instance from\n */\n constructor(name, source) {\n super(name, source.getScene());\n /** @internal */\n this._indexInSourceMeshInstanceArray = -1;\n /** @internal */\n this._distanceToCamera = 0;\n source.addInstance(this);\n this._sourceMesh = source;\n this._unIndexed = source._unIndexed;\n this.position.copyFrom(source.position);\n this.rotation.copyFrom(source.rotation);\n this.scaling.copyFrom(source.scaling);\n if (source.rotationQuaternion) {\n this.rotationQuaternion = source.rotationQuaternion.clone();\n }\n this.animations = source.animations.slice();\n for (const range of source.getAnimationRanges()) {\n if (range != null) {\n this.createAnimationRange(range.name, range.from, range.to);\n }\n }\n this.infiniteDistance = source.infiniteDistance;\n this.setPivotMatrix(source.getPivotMatrix());\n this.refreshBoundingInfo(true, true);\n this._syncSubMeshes();\n }\n /**\n * Returns the string \"InstancedMesh\".\n */\n getClassName() {\n return \"InstancedMesh\";\n }\n /** Gets the list of lights affecting that mesh */\n get lightSources() {\n return this._sourceMesh._lightSources;\n }\n _resyncLightSources() {\n // Do nothing as all the work will be done by source mesh\n }\n _resyncLightSource() {\n // Do nothing as all the work will be done by source mesh\n }\n _removeLightSource() {\n // Do nothing as all the work will be done by source mesh\n }\n // Methods\n /**\n * If the source mesh receives shadows\n */\n get receiveShadows() {\n return this._sourceMesh.receiveShadows;\n }\n set receiveShadows(_value) {\n var _a;\n if (((_a = this._sourceMesh) === null || _a === void 0 ? void 0 : _a.receiveShadows) !== _value) {\n Tools.Warn(\"Setting receiveShadows on an instanced mesh has no effect\");\n }\n }\n /**\n * The material of the source mesh\n */\n get material() {\n return this._sourceMesh.material;\n }\n set material(_value) {\n var _a;\n if (((_a = this._sourceMesh) === null || _a === void 0 ? void 0 : _a.material) !== _value) {\n Tools.Warn(\"Setting material on an instanced mesh has no effect\");\n }\n }\n /**\n * Visibility of the source mesh\n */\n get visibility() {\n return this._sourceMesh.visibility;\n }\n set visibility(_value) {\n var _a;\n if (((_a = this._sourceMesh) === null || _a === void 0 ? void 0 : _a.visibility) !== _value) {\n Tools.Warn(\"Setting visibility on an instanced mesh has no effect\");\n }\n }\n /**\n * Skeleton of the source mesh\n */\n get skeleton() {\n return this._sourceMesh.skeleton;\n }\n set skeleton(_value) {\n var _a;\n if (((_a = this._sourceMesh) === null || _a === void 0 ? void 0 : _a.skeleton) !== _value) {\n Tools.Warn(\"Setting skeleton on an instanced mesh has no effect\");\n }\n }\n /**\n * Rendering ground id of the source mesh\n */\n get renderingGroupId() {\n return this._sourceMesh.renderingGroupId;\n }\n set renderingGroupId(value) {\n if (!this._sourceMesh || value === this._sourceMesh.renderingGroupId) {\n return;\n }\n //no-op with warning\n Logger.Warn(\"Note - setting renderingGroupId of an instanced mesh has no effect on the scene\");\n }\n /**\n * Returns the total number of vertices (integer).\n */\n getTotalVertices() {\n return this._sourceMesh ? this._sourceMesh.getTotalVertices() : 0;\n }\n /**\n * Returns a positive integer : the total number of indices in this mesh geometry.\n * @returns the number of indices or zero if the mesh has no geometry.\n */\n getTotalIndices() {\n return this._sourceMesh.getTotalIndices();\n }\n /**\n * The source mesh of the instance\n */\n get sourceMesh() {\n return this._sourceMesh;\n }\n /**\n * Creates a new InstancedMesh object from the mesh model.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/copies/instances\n * @param name defines the name of the new instance\n * @returns a new InstancedMesh\n */\n createInstance(name) {\n return this._sourceMesh.createInstance(name);\n }\n /**\n * Is this node ready to be used/rendered\n * @param completeCheck defines if a complete check (including materials and lights) has to be done (false by default)\n * @returns {boolean} is it ready\n */\n isReady(completeCheck = false) {\n return this._sourceMesh.isReady(completeCheck, true);\n }\n /**\n * Returns an array of integers or a typed array (Int32Array, Uint32Array, Uint16Array) populated with the mesh indices.\n * @param kind kind of verticies to retrieve (eg. positions, normals, uvs, etc.)\n * @param copyWhenShared If true (default false) and and if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one.\n * @param forceCopy defines a boolean forcing the copy of the buffer no matter what the value of copyWhenShared is\n * @returns a float array or a Float32Array of the requested kind of data : positions, normals, uvs, etc.\n */\n getVerticesData(kind, copyWhenShared, forceCopy) {\n return this._sourceMesh.getVerticesData(kind, copyWhenShared, forceCopy);\n }\n /**\n * Sets the vertex data of the mesh geometry for the requested `kind`.\n * If the mesh has no geometry, a new Geometry object is set to the mesh and then passed this vertex data.\n * The `data` are either a numeric array either a Float32Array.\n * The parameter `updatable` is passed as is to the underlying Geometry object constructor (if initially none) or updater.\n * The parameter `stride` is an optional positive integer, it is usually automatically deducted from the `kind` (3 for positions or normals, 2 for UV, etc).\n * Note that a new underlying VertexBuffer object is created each call.\n * If the `kind` is the `PositionKind`, the mesh BoundingInfo is renewed, so the bounding box and sphere, and the mesh World Matrix is recomputed.\n *\n * Possible `kind` values :\n * - VertexBuffer.PositionKind\n * - VertexBuffer.UVKind\n * - VertexBuffer.UV2Kind\n * - VertexBuffer.UV3Kind\n * - VertexBuffer.UV4Kind\n * - VertexBuffer.UV5Kind\n * - VertexBuffer.UV6Kind\n * - VertexBuffer.ColorKind\n * - VertexBuffer.MatricesIndicesKind\n * - VertexBuffer.MatricesIndicesExtraKind\n * - VertexBuffer.MatricesWeightsKind\n * - VertexBuffer.MatricesWeightsExtraKind\n *\n * Returns the Mesh.\n * @param kind\n * @param data\n * @param updatable\n * @param stride\n */\n setVerticesData(kind, data, updatable, stride) {\n if (this.sourceMesh) {\n this.sourceMesh.setVerticesData(kind, data, updatable, stride);\n }\n return this.sourceMesh;\n }\n /**\n * Updates the existing vertex data of the mesh geometry for the requested `kind`.\n * If the mesh has no geometry, it is simply returned as it is.\n * The `data` are either a numeric array either a Float32Array.\n * No new underlying VertexBuffer object is created.\n * If the `kind` is the `PositionKind` and if `updateExtends` is true, the mesh BoundingInfo is renewed, so the bounding box and sphere, and the mesh World Matrix is recomputed.\n * If the parameter `makeItUnique` is true, a new global geometry is created from this positions and is set to the mesh.\n *\n * Possible `kind` values :\n * - VertexBuffer.PositionKind\n * - VertexBuffer.UVKind\n * - VertexBuffer.UV2Kind\n * - VertexBuffer.UV3Kind\n * - VertexBuffer.UV4Kind\n * - VertexBuffer.UV5Kind\n * - VertexBuffer.UV6Kind\n * - VertexBuffer.ColorKind\n * - VertexBuffer.MatricesIndicesKind\n * - VertexBuffer.MatricesIndicesExtraKind\n * - VertexBuffer.MatricesWeightsKind\n * - VertexBuffer.MatricesWeightsExtraKind\n *\n * Returns the Mesh.\n * @param kind\n * @param data\n * @param updateExtends\n * @param makeItUnique\n */\n updateVerticesData(kind, data, updateExtends, makeItUnique) {\n if (this.sourceMesh) {\n this.sourceMesh.updateVerticesData(kind, data, updateExtends, makeItUnique);\n }\n return this.sourceMesh;\n }\n /**\n * Sets the mesh indices.\n * Expects an array populated with integers or a typed array (Int32Array, Uint32Array, Uint16Array).\n * If the mesh has no geometry, a new Geometry object is created and set to the mesh.\n * This method creates a new index buffer each call.\n * Returns the Mesh.\n * @param indices\n * @param totalVertices\n */\n setIndices(indices, totalVertices = null) {\n if (this.sourceMesh) {\n this.sourceMesh.setIndices(indices, totalVertices);\n }\n return this.sourceMesh;\n }\n /**\n * Boolean : True if the mesh owns the requested kind of data.\n * @param kind\n */\n isVerticesDataPresent(kind) {\n return this._sourceMesh.isVerticesDataPresent(kind);\n }\n /**\n * Returns an array of indices (IndicesArray).\n */\n getIndices() {\n return this._sourceMesh.getIndices();\n }\n get _positions() {\n return this._sourceMesh._positions;\n }\n /**\n * This method recomputes and sets a new BoundingInfo to the mesh unless it is locked.\n * This means the mesh underlying bounding box and sphere are recomputed.\n * @param applySkeleton defines whether to apply the skeleton before computing the bounding info\n * @param applyMorph defines whether to apply the morph target before computing the bounding info\n * @returns the current mesh\n */\n refreshBoundingInfo(applySkeleton = false, applyMorph = false) {\n if (this.hasBoundingInfo && this.getBoundingInfo().isLocked) {\n return this;\n }\n const bias = this._sourceMesh.geometry ? this._sourceMesh.geometry.boundingBias : null;\n this._refreshBoundingInfo(this._sourceMesh._getPositionData(applySkeleton, applyMorph), bias);\n return this;\n }\n /** @internal */\n _preActivate() {\n if (this._currentLOD) {\n this._currentLOD._preActivate();\n }\n return this;\n }\n /**\n * @internal\n */\n _activate(renderId, intermediateRendering) {\n super._activate(renderId, intermediateRendering);\n if (!this._sourceMesh.subMeshes) {\n Logger.Warn(\"Instances should only be created for meshes with geometry.\");\n }\n if (this._currentLOD) {\n const differentSign = this._currentLOD._getWorldMatrixDeterminant() >= 0 !== this._getWorldMatrixDeterminant() >= 0;\n if (differentSign) {\n this._internalAbstractMeshDataInfo._actAsRegularMesh = true;\n return true;\n }\n this._internalAbstractMeshDataInfo._actAsRegularMesh = false;\n this._currentLOD._registerInstanceForRenderId(this, renderId);\n if (intermediateRendering) {\n if (!this._currentLOD._internalAbstractMeshDataInfo._isActiveIntermediate) {\n this._currentLOD._internalAbstractMeshDataInfo._onlyForInstancesIntermediate = true;\n return true;\n }\n }\n else {\n if (!this._currentLOD._internalAbstractMeshDataInfo._isActive) {\n this._currentLOD._internalAbstractMeshDataInfo._onlyForInstances = true;\n return true;\n }\n }\n }\n return false;\n }\n /** @internal */\n _postActivate() {\n if (this._sourceMesh.edgesShareWithInstances && this._sourceMesh._edgesRenderer && this._sourceMesh._edgesRenderer.isEnabled && this._sourceMesh._renderingGroup) {\n // we are using the edge renderer of the source mesh\n this._sourceMesh._renderingGroup._edgesRenderers.pushNoDuplicate(this._sourceMesh._edgesRenderer);\n this._sourceMesh._edgesRenderer.customInstances.push(this.getWorldMatrix());\n }\n else if (this._edgesRenderer && this._edgesRenderer.isEnabled && this._sourceMesh._renderingGroup) {\n // we are using the edge renderer defined for this instance\n this._sourceMesh._renderingGroup._edgesRenderers.push(this._edgesRenderer);\n }\n }\n getWorldMatrix() {\n if (this._currentLOD && this._currentLOD.billboardMode !== TransformNode.BILLBOARDMODE_NONE && this._currentLOD._masterMesh !== this) {\n if (!this._billboardWorldMatrix) {\n this._billboardWorldMatrix = new Matrix();\n }\n const tempMaster = this._currentLOD._masterMesh;\n this._currentLOD._masterMesh = this;\n TmpVectors.Vector3[7].copyFrom(this._currentLOD.position);\n this._currentLOD.position.set(0, 0, 0);\n this._billboardWorldMatrix.copyFrom(this._currentLOD.computeWorldMatrix(true));\n this._currentLOD.position.copyFrom(TmpVectors.Vector3[7]);\n this._currentLOD._masterMesh = tempMaster;\n return this._billboardWorldMatrix;\n }\n return super.getWorldMatrix();\n }\n get isAnInstance() {\n return true;\n }\n /**\n * Returns the current associated LOD AbstractMesh.\n * @param camera\n */\n getLOD(camera) {\n if (!camera) {\n return this;\n }\n const sourceMeshLODLevels = this.sourceMesh.getLODLevels();\n if (!sourceMeshLODLevels || sourceMeshLODLevels.length === 0) {\n this._currentLOD = this.sourceMesh;\n }\n else {\n const boundingInfo = this.getBoundingInfo();\n this._currentLOD = this.sourceMesh.getLOD(camera, boundingInfo.boundingSphere);\n }\n return this._currentLOD;\n }\n /**\n * @internal\n */\n _preActivateForIntermediateRendering(renderId) {\n return this.sourceMesh._preActivateForIntermediateRendering(renderId);\n }\n /** @internal */\n _syncSubMeshes() {\n this.releaseSubMeshes();\n if (this._sourceMesh.subMeshes) {\n for (let index = 0; index < this._sourceMesh.subMeshes.length; index++) {\n this._sourceMesh.subMeshes[index].clone(this, this._sourceMesh);\n }\n }\n return this;\n }\n /** @internal */\n _generatePointsArray() {\n return this._sourceMesh._generatePointsArray();\n }\n /** @internal */\n _updateBoundingInfo() {\n if (this.hasBoundingInfo) {\n this.getBoundingInfo().update(this.worldMatrixFromCache);\n }\n else {\n this.buildBoundingInfo(this.absolutePosition, this.absolutePosition, this.worldMatrixFromCache);\n }\n this._updateSubMeshesBoundingInfo(this.worldMatrixFromCache);\n return this;\n }\n /**\n * Creates a new InstancedMesh from the current mesh.\n *\n * Returns the clone.\n * @param name the cloned mesh name\n * @param newParent the optional Node to parent the clone to.\n * @param doNotCloneChildren if `true` the model children aren't cloned.\n * @param newSourceMesh if set this mesh will be used as the source mesh instead of ths instance's one\n * @returns the clone\n */\n clone(name, newParent = null, doNotCloneChildren, newSourceMesh) {\n const result = (newSourceMesh || this._sourceMesh).createInstance(name);\n // Deep copy\n DeepCopier.DeepCopy(this, result, [\n \"name\",\n \"subMeshes\",\n \"uniqueId\",\n \"parent\",\n \"lightSources\",\n \"receiveShadows\",\n \"material\",\n \"visibility\",\n \"skeleton\",\n \"sourceMesh\",\n \"isAnInstance\",\n \"facetNb\",\n \"isFacetDataEnabled\",\n \"isBlocked\",\n \"useBones\",\n \"hasInstances\",\n \"collider\",\n \"edgesRenderer\",\n \"forward\",\n \"up\",\n \"right\",\n \"absolutePosition\",\n \"absoluteScaling\",\n \"absoluteRotationQuaternion\",\n \"isWorldMatrixFrozen\",\n \"nonUniformScaling\",\n \"behaviors\",\n \"worldMatrixFromCache\",\n \"hasThinInstances\",\n \"hasBoundingInfo\",\n ], []);\n // Bounding info\n this.refreshBoundingInfo();\n // Parent\n if (newParent) {\n result.parent = newParent;\n }\n if (!doNotCloneChildren) {\n // Children\n for (let index = 0; index < this.getScene().meshes.length; index++) {\n const mesh = this.getScene().meshes[index];\n if (mesh.parent === this) {\n mesh.clone(mesh.name, result);\n }\n }\n }\n result.computeWorldMatrix(true);\n this.onClonedObservable.notifyObservers(result);\n return result;\n }\n /**\n * Disposes the InstancedMesh.\n * Returns nothing.\n * @param doNotRecurse\n * @param disposeMaterialAndTextures\n */\n dispose(doNotRecurse, disposeMaterialAndTextures = false) {\n // Remove from mesh\n this._sourceMesh.removeInstance(this);\n super.dispose(doNotRecurse, disposeMaterialAndTextures);\n }\n /**\n * @internal\n */\n _serializeAsParent(serializationObject) {\n super._serializeAsParent(serializationObject);\n serializationObject.parentId = this._sourceMesh.uniqueId;\n serializationObject.parentInstanceIndex = this._indexInSourceMeshInstanceArray;\n }\n /**\n * Instantiate (when possible) or clone that node with its hierarchy\n * @param newParent defines the new parent to use for the instance (or clone)\n * @param options defines options to configure how copy is done\n * @param options.doNotInstantiate defines if the model must be instantiated or just cloned\n * @param options.newSourcedMesh newSourcedMesh the new source mesh for the instance (or clone)\n * @param onNewNodeCreated defines an option callback to call when a clone or an instance is created\n * @returns an instance (or a clone) of the current node with its hierarchy\n */\n instantiateHierarchy(newParent = null, options, onNewNodeCreated) {\n const clone = this.clone(\"Clone of \" + (this.name || this.id), newParent || this.parent, true, options && options.newSourcedMesh);\n if (clone) {\n if (onNewNodeCreated) {\n onNewNodeCreated(this, clone);\n }\n }\n for (const child of this.getChildTransformNodes(true)) {\n child.instantiateHierarchy(clone, options, onNewNodeCreated);\n }\n return clone;\n }\n}\nMesh.prototype.registerInstancedBuffer = function (kind, stride) {\n var _a, _b;\n // Remove existing one\n (_b = (_a = this._userInstancedBuffersStorage) === null || _a === void 0 ? void 0 : _a.vertexBuffers[kind]) === null || _b === void 0 ? void 0 : _b.dispose();\n // Creates the instancedBuffer field if not present\n if (!this.instancedBuffers) {\n this.instancedBuffers = {};\n for (const instance of this.instances) {\n instance.instancedBuffers = {};\n }\n }\n if (!this._userInstancedBuffersStorage) {\n this._userInstancedBuffersStorage = {\n data: {},\n vertexBuffers: {},\n strides: {},\n sizes: {},\n vertexArrayObjects: this.getEngine().getCaps().vertexArrayObject ? {} : undefined,\n };\n }\n // Creates an empty property for this kind\n this.instancedBuffers[kind] = null;\n this._userInstancedBuffersStorage.strides[kind] = stride;\n this._userInstancedBuffersStorage.sizes[kind] = stride * 32; // Initial size\n this._userInstancedBuffersStorage.data[kind] = new Float32Array(this._userInstancedBuffersStorage.sizes[kind]);\n this._userInstancedBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), this._userInstancedBuffersStorage.data[kind], kind, true, false, stride, true);\n for (const instance of this.instances) {\n instance.instancedBuffers[kind] = null;\n }\n this._invalidateInstanceVertexArrayObject();\n this._markSubMeshesAsAttributesDirty();\n};\nMesh.prototype._processInstancedBuffers = function (visibleInstances, renderSelf) {\n const instanceCount = visibleInstances ? visibleInstances.length : 0;\n for (const kind in this.instancedBuffers) {\n let size = this._userInstancedBuffersStorage.sizes[kind];\n const stride = this._userInstancedBuffersStorage.strides[kind];\n // Resize if required\n const expectedSize = (instanceCount + 1) * stride;\n while (size < expectedSize) {\n size *= 2;\n }\n if (this._userInstancedBuffersStorage.data[kind].length != size) {\n this._userInstancedBuffersStorage.data[kind] = new Float32Array(size);\n this._userInstancedBuffersStorage.sizes[kind] = size;\n if (this._userInstancedBuffersStorage.vertexBuffers[kind]) {\n this._userInstancedBuffersStorage.vertexBuffers[kind].dispose();\n this._userInstancedBuffersStorage.vertexBuffers[kind] = null;\n }\n }\n const data = this._userInstancedBuffersStorage.data[kind];\n // Update data buffer\n let offset = 0;\n if (renderSelf) {\n const value = this.instancedBuffers[kind];\n if (value.toArray) {\n value.toArray(data, offset);\n }\n else if (value.copyToArray) {\n value.copyToArray(data, offset);\n }\n else {\n data[offset] = value;\n }\n offset += stride;\n }\n for (let instanceIndex = 0; instanceIndex < instanceCount; instanceIndex++) {\n const instance = visibleInstances[instanceIndex];\n const value = instance.instancedBuffers[kind];\n if (value.toArray) {\n value.toArray(data, offset);\n }\n else if (value.copyToArray) {\n value.copyToArray(data, offset);\n }\n else {\n data[offset] = value;\n }\n offset += stride;\n }\n // Update vertex buffer\n if (!this._userInstancedBuffersStorage.vertexBuffers[kind]) {\n this._userInstancedBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), this._userInstancedBuffersStorage.data[kind], kind, true, false, stride, true);\n this._invalidateInstanceVertexArrayObject();\n }\n else {\n this._userInstancedBuffersStorage.vertexBuffers[kind].updateDirectly(data, 0);\n }\n }\n};\nMesh.prototype._invalidateInstanceVertexArrayObject = function () {\n if (!this._userInstancedBuffersStorage || this._userInstancedBuffersStorage.vertexArrayObjects === undefined) {\n return;\n }\n for (const kind in this._userInstancedBuffersStorage.vertexArrayObjects) {\n this.getEngine().releaseVertexArrayObject(this._userInstancedBuffersStorage.vertexArrayObjects[kind]);\n }\n this._userInstancedBuffersStorage.vertexArrayObjects = {};\n};\nMesh.prototype._disposeInstanceSpecificData = function () {\n if (this._instanceDataStorage.instancesBuffer) {\n this._instanceDataStorage.instancesBuffer.dispose();\n this._instanceDataStorage.instancesBuffer = null;\n }\n while (this.instances.length) {\n this.instances[0].dispose();\n }\n for (const kind in this.instancedBuffers) {\n if (this._userInstancedBuffersStorage.vertexBuffers[kind]) {\n this._userInstancedBuffersStorage.vertexBuffers[kind].dispose();\n }\n }\n this._invalidateInstanceVertexArrayObject();\n this.instancedBuffers = {};\n};\n//# sourceMappingURL=instancedMesh.js.map","/**\n * Helper class to push actions to a pool of workers.\n */\nexport class WorkerPool {\n /**\n * Constructor\n * @param workers Array of workers to use for actions\n */\n constructor(workers) {\n this._pendingActions = new Array();\n this._workerInfos = workers.map((worker) => ({\n workerPromise: Promise.resolve(worker),\n idle: true,\n }));\n }\n /**\n * Terminates all workers and clears any pending actions.\n */\n dispose() {\n for (const workerInfo of this._workerInfos) {\n workerInfo.workerPromise.then((worker) => {\n worker.terminate();\n });\n }\n this._workerInfos.length = 0;\n this._pendingActions.length = 0;\n }\n /**\n * Pushes an action to the worker pool. If all the workers are active, the action will be\n * pended until a worker has completed its action.\n * @param action The action to perform. Call onComplete when the action is complete.\n */\n push(action) {\n if (!this._executeOnIdleWorker(action)) {\n this._pendingActions.push(action);\n }\n }\n _executeOnIdleWorker(action) {\n for (const workerInfo of this._workerInfos) {\n if (workerInfo.idle) {\n this._execute(workerInfo, action);\n return true;\n }\n }\n return false;\n }\n _execute(workerInfo, action) {\n workerInfo.idle = false;\n workerInfo.workerPromise.then((worker) => {\n action(worker, () => {\n const nextAction = this._pendingActions.shift();\n if (nextAction) {\n this._execute(workerInfo, nextAction);\n }\n else {\n workerInfo.idle = true;\n }\n });\n });\n }\n}\n/**\n * Similar to the WorkerPool class except it creates and destroys workers automatically with a maximum of `maxWorkers` workers.\n * Workers are terminated when it is idle for at least `idleTimeElapsedBeforeRelease` milliseconds.\n */\nexport class AutoReleaseWorkerPool extends WorkerPool {\n constructor(maxWorkers, createWorkerAsync, options = AutoReleaseWorkerPool.DefaultOptions) {\n super([]);\n this._maxWorkers = maxWorkers;\n this._createWorkerAsync = createWorkerAsync;\n this._options = options;\n }\n push(action) {\n if (!this._executeOnIdleWorker(action)) {\n if (this._workerInfos.length < this._maxWorkers) {\n const workerInfo = {\n workerPromise: this._createWorkerAsync(),\n idle: false,\n };\n this._workerInfos.push(workerInfo);\n this._execute(workerInfo, action);\n }\n else {\n this._pendingActions.push(action);\n }\n }\n }\n _execute(workerInfo, action) {\n // Reset the idle timeout.\n if (workerInfo.timeoutId) {\n clearTimeout(workerInfo.timeoutId);\n delete workerInfo.timeoutId;\n }\n super._execute(workerInfo, (worker, onComplete) => {\n action(worker, () => {\n onComplete();\n if (workerInfo.idle) {\n // Schedule the worker to be terminated after the elapsed time.\n workerInfo.timeoutId = setTimeout(() => {\n workerInfo.workerPromise.then((worker) => {\n worker.terminate();\n });\n const indexOf = this._workerInfos.indexOf(workerInfo);\n if (indexOf !== -1) {\n this._workerInfos.splice(indexOf, 1);\n }\n }, this._options.idleTimeElapsedBeforeRelease);\n }\n });\n });\n }\n}\n/**\n * Default options for the constructor.\n * Override to change the defaults.\n */\nAutoReleaseWorkerPool.DefaultOptions = {\n idleTimeElapsedBeforeRelease: 1000,\n};\n//# sourceMappingURL=workerPool.js.map","var buffer = {};\n\nvar base64Js = {};\n\nbase64Js.byteLength = byteLength;\nbase64Js.toByteArray = toByteArray;\nbase64Js.fromByteArray = fromByteArray;\n\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62;\nrevLookup['_'.charCodeAt(0)] = 63;\n\nfunction getLens (b64) {\n var len = b64.length;\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=');\n if (validLen === -1) validLen = len;\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4);\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n\n var curByte = 0;\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen;\n\n var i;\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)];\n arr[curByte++] = (tmp >> 16) & 0xFF;\n arr[curByte++] = (tmp >> 8) & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4);\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2);\n arr[curByte++] = (tmp >> 8) & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp;\n var output = [];\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF);\n output.push(tripletToBase64(tmp));\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n var parts = [];\n var maxChunkLength = 16383; // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n );\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n );\n }\n\n return parts.join('')\n}\n\nvar ieee754 = {};\n\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\n\nieee754.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? (nBytes - 1) : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n\n i += d;\n\n e = s & ((1 << (-nBits)) - 1);\n s >>= (-nBits);\n nBits += eLen;\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1);\n e >>= (-nBits);\n nBits += mLen;\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n};\n\nieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);\n var i = isLE ? 0 : (nBytes - 1);\n var d = isLE ? 1 : -1;\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n};\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n(function (exports) {\n\n\tconst base64 = base64Js;\n\tconst ieee754$1 = ieee754;\n\tconst customInspectSymbol =\n\t (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n\t ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n\t : null;\n\n\texports.Buffer = Buffer;\n\texports.SlowBuffer = SlowBuffer;\n\texports.INSPECT_MAX_BYTES = 50;\n\n\tconst K_MAX_LENGTH = 0x7fffffff;\n\texports.kMaxLength = K_MAX_LENGTH;\n\tconst { Uint8Array: GlobalUint8Array, ArrayBuffer: GlobalArrayBuffer, SharedArrayBuffer: GlobalSharedArrayBuffer } = globalThis;\n\n\t/**\n\t * If `Buffer.TYPED_ARRAY_SUPPORT`:\n\t * === true Use Uint8Array implementation (fastest)\n\t * === false Print warning and recommend using `buffer` v4.x which has an Object\n\t * implementation (most compatible, even IE6)\n\t *\n\t * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n\t * Opera 11.6+, iOS 4.2+.\n\t *\n\t * We report that the browser does not support typed arrays if the are not subclassable\n\t * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n\t * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n\t * for __proto__ and has a buggy typed array implementation.\n\t */\n\tBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport();\n\n\tif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n\t typeof console.error === 'function') {\n\t console.error(\n\t 'This browser lacks typed array (Uint8Array) support which is required by ' +\n\t '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n\t );\n\t}\n\n\tfunction typedArraySupport () {\n\t // Can typed array instances can be augmented?\n\t try {\n\t const arr = new GlobalUint8Array(1);\n\t const proto = { foo: function () { return 42 } };\n\t Object.setPrototypeOf(proto, GlobalUint8Array.prototype);\n\t Object.setPrototypeOf(arr, proto);\n\t return arr.foo() === 42\n\t } catch (e) {\n\t return false\n\t }\n\t}\n\n\tObject.defineProperty(Buffer.prototype, 'parent', {\n\t enumerable: true,\n\t get: function () {\n\t if (!Buffer.isBuffer(this)) return undefined\n\t return this.buffer\n\t }\n\t});\n\n\tObject.defineProperty(Buffer.prototype, 'offset', {\n\t enumerable: true,\n\t get: function () {\n\t if (!Buffer.isBuffer(this)) return undefined\n\t return this.byteOffset\n\t }\n\t});\n\n\tfunction createBuffer (length) {\n\t if (length > K_MAX_LENGTH) {\n\t throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n\t }\n\t // Return an augmented `Uint8Array` instance\n\t const buf = new GlobalUint8Array(length);\n\t Object.setPrototypeOf(buf, Buffer.prototype);\n\t return buf\n\t}\n\n\t/**\n\t * The Buffer constructor returns instances of `Uint8Array` that have their\n\t * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n\t * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n\t * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n\t * returns a single octet.\n\t *\n\t * The `Uint8Array` prototype remains unmodified.\n\t */\n\n\tfunction Buffer (arg, encodingOrOffset, length) {\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new TypeError(\n\t 'The \"string\" argument must be of type string. Received type number'\n\t )\n\t }\n\t return allocUnsafe(arg)\n\t }\n\t return from(arg, encodingOrOffset, length)\n\t}\n\n\tBuffer.poolSize = 8192; // not used by this implementation\n\n\tfunction from (value, encodingOrOffset, length) {\n\t if (typeof value === 'string') {\n\t return fromString(value, encodingOrOffset)\n\t }\n\n\t if (GlobalArrayBuffer.isView(value)) {\n\t return fromArrayView(value)\n\t }\n\n\t if (value == null) {\n\t throw new TypeError(\n\t 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n\t 'or Array-like Object. Received type ' + (typeof value)\n\t )\n\t }\n\n\t if (isInstance(value, GlobalArrayBuffer) ||\n\t (value && isInstance(value.buffer, GlobalArrayBuffer))) {\n\t return fromArrayBuffer(value, encodingOrOffset, length)\n\t }\n\n\t if (typeof GlobalSharedArrayBuffer !== 'undefined' &&\n\t (isInstance(value, GlobalSharedArrayBuffer) ||\n\t (value && isInstance(value.buffer, GlobalSharedArrayBuffer)))) {\n\t return fromArrayBuffer(value, encodingOrOffset, length)\n\t }\n\n\t if (typeof value === 'number') {\n\t throw new TypeError(\n\t 'The \"value\" argument must not be of type number. Received type number'\n\t )\n\t }\n\n\t const valueOf = value.valueOf && value.valueOf();\n\t if (valueOf != null && valueOf !== value) {\n\t return Buffer.from(valueOf, encodingOrOffset, length)\n\t }\n\n\t const b = fromObject(value);\n\t if (b) return b\n\n\t if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n\t typeof value[Symbol.toPrimitive] === 'function') {\n\t return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n\t }\n\n\t throw new TypeError(\n\t 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n\t 'or Array-like Object. Received type ' + (typeof value)\n\t )\n\t}\n\n\t/**\n\t * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n\t * if value is a number.\n\t * Buffer.from(str[, encoding])\n\t * Buffer.from(array)\n\t * Buffer.from(buffer)\n\t * Buffer.from(arrayBuffer[, byteOffset[, length]])\n\t **/\n\tBuffer.from = function (value, encodingOrOffset, length) {\n\t return from(value, encodingOrOffset, length)\n\t};\n\n\t// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n\t// https://github.com/feross/buffer/pull/148\n\tObject.setPrototypeOf(Buffer.prototype, GlobalUint8Array.prototype);\n\tObject.setPrototypeOf(Buffer, GlobalUint8Array);\n\n\tfunction assertSize (size) {\n\t if (typeof size !== 'number') {\n\t throw new TypeError('\"size\" argument must be of type number')\n\t } else if (size < 0) {\n\t throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n\t }\n\t}\n\n\tfunction alloc (size, fill, encoding) {\n\t assertSize(size);\n\t if (size <= 0) {\n\t return createBuffer(size)\n\t }\n\t if (fill !== undefined) {\n\t // Only pay attention to encoding if it's a string. This\n\t // prevents accidentally sending in a number that would\n\t // be interpreted as a start offset.\n\t return typeof encoding === 'string'\n\t ? createBuffer(size).fill(fill, encoding)\n\t : createBuffer(size).fill(fill)\n\t }\n\t return createBuffer(size)\n\t}\n\n\t/**\n\t * Creates a new filled Buffer instance.\n\t * alloc(size[, fill[, encoding]])\n\t **/\n\tBuffer.alloc = function (size, fill, encoding) {\n\t return alloc(size, fill, encoding)\n\t};\n\n\tfunction allocUnsafe (size) {\n\t assertSize(size);\n\t return createBuffer(size < 0 ? 0 : checked(size) | 0)\n\t}\n\n\t/**\n\t * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n\t * */\n\tBuffer.allocUnsafe = function (size) {\n\t return allocUnsafe(size)\n\t};\n\t/**\n\t * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n\t */\n\tBuffer.allocUnsafeSlow = function (size) {\n\t return allocUnsafe(size)\n\t};\n\n\tfunction fromString (string, encoding) {\n\t if (typeof encoding !== 'string' || encoding === '') {\n\t encoding = 'utf8';\n\t }\n\n\t if (!Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding)\n\t }\n\n\t const length = byteLength(string, encoding) | 0;\n\t let buf = createBuffer(length);\n\n\t const actual = buf.write(string, encoding);\n\n\t if (actual !== length) {\n\t // Writing a hex string, for example, that contains invalid characters will\n\t // cause everything after the first invalid character to be ignored. (e.g.\n\t // 'abxxcd' will be treated as 'ab')\n\t buf = buf.slice(0, actual);\n\t }\n\n\t return buf\n\t}\n\n\tfunction fromArrayLike (array) {\n\t const length = array.length < 0 ? 0 : checked(array.length) | 0;\n\t const buf = createBuffer(length);\n\t for (let i = 0; i < length; i += 1) {\n\t buf[i] = array[i] & 255;\n\t }\n\t return buf\n\t}\n\n\tfunction fromArrayView (arrayView) {\n\t if (isInstance(arrayView, GlobalUint8Array)) {\n\t const copy = new GlobalUint8Array(arrayView);\n\t return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n\t }\n\t return fromArrayLike(arrayView)\n\t}\n\n\tfunction fromArrayBuffer (array, byteOffset, length) {\n\t if (byteOffset < 0 || array.byteLength < byteOffset) {\n\t throw new RangeError('\"offset\" is outside of buffer bounds')\n\t }\n\n\t if (array.byteLength < byteOffset + (length || 0)) {\n\t throw new RangeError('\"length\" is outside of buffer bounds')\n\t }\n\n\t let buf;\n\t if (byteOffset === undefined && length === undefined) {\n\t buf = new GlobalUint8Array(array);\n\t } else if (length === undefined) {\n\t buf = new GlobalUint8Array(array, byteOffset);\n\t } else {\n\t buf = new GlobalUint8Array(array, byteOffset, length);\n\t }\n\n\t // Return an augmented `Uint8Array` instance\n\t Object.setPrototypeOf(buf, Buffer.prototype);\n\n\t return buf\n\t}\n\n\tfunction fromObject (obj) {\n\t if (Buffer.isBuffer(obj)) {\n\t const len = checked(obj.length) | 0;\n\t const buf = createBuffer(len);\n\n\t if (buf.length === 0) {\n\t return buf\n\t }\n\n\t obj.copy(buf, 0, 0, len);\n\t return buf\n\t }\n\n\t if (obj.length !== undefined) {\n\t if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n\t return createBuffer(0)\n\t }\n\t return fromArrayLike(obj)\n\t }\n\n\t if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n\t return fromArrayLike(obj.data)\n\t }\n\t}\n\n\tfunction checked (length) {\n\t // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n\t // length is NaN (which is otherwise coerced to zero.)\n\t if (length >= K_MAX_LENGTH) {\n\t throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n\t 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n\t }\n\t return length | 0\n\t}\n\n\tfunction SlowBuffer (length) {\n\t if (+length != length) { // eslint-disable-line eqeqeq\n\t length = 0;\n\t }\n\t return Buffer.alloc(+length)\n\t}\n\n\tBuffer.isBuffer = function isBuffer (b) {\n\t return b != null && b._isBuffer === true &&\n\t b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n\t};\n\n\tBuffer.compare = function compare (a, b) {\n\t if (isInstance(a, GlobalUint8Array)) a = Buffer.from(a, a.offset, a.byteLength);\n\t if (isInstance(b, GlobalUint8Array)) b = Buffer.from(b, b.offset, b.byteLength);\n\t if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n\t throw new TypeError(\n\t 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n\t )\n\t }\n\n\t if (a === b) return 0\n\n\t let x = a.length;\n\t let y = b.length;\n\n\t for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n\t if (a[i] !== b[i]) {\n\t x = a[i];\n\t y = b[i];\n\t break\n\t }\n\t }\n\n\t if (x < y) return -1\n\t if (y < x) return 1\n\t return 0\n\t};\n\n\tBuffer.isEncoding = function isEncoding (encoding) {\n\t switch (String(encoding).toLowerCase()) {\n\t case 'hex':\n\t case 'utf8':\n\t case 'utf-8':\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t case 'base64':\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return true\n\t default:\n\t return false\n\t }\n\t};\n\n\tBuffer.concat = function concat (list, length) {\n\t if (!Array.isArray(list)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers')\n\t }\n\n\t if (list.length === 0) {\n\t return Buffer.alloc(0)\n\t }\n\n\t let i;\n\t if (length === undefined) {\n\t length = 0;\n\t for (i = 0; i < list.length; ++i) {\n\t length += list[i].length;\n\t }\n\t }\n\n\t const buffer = Buffer.allocUnsafe(length);\n\t let pos = 0;\n\t for (i = 0; i < list.length; ++i) {\n\t let buf = list[i];\n\t if (isInstance(buf, GlobalUint8Array)) {\n\t if (pos + buf.length > buffer.length) {\n\t if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);\n\t buf.copy(buffer, pos);\n\t } else {\n\t GlobalUint8Array.prototype.set.call(\n\t buffer,\n\t buf,\n\t pos\n\t );\n\t }\n\t } else if (!Buffer.isBuffer(buf)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers')\n\t } else {\n\t buf.copy(buffer, pos);\n\t }\n\t pos += buf.length;\n\t }\n\t return buffer\n\t};\n\n\tfunction byteLength (string, encoding) {\n\t if (Buffer.isBuffer(string)) {\n\t return string.length\n\t }\n\t if (GlobalArrayBuffer.isView(string) || isInstance(string, GlobalArrayBuffer)) {\n\t return string.byteLength\n\t }\n\t if (typeof string !== 'string') {\n\t throw new TypeError(\n\t 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n\t 'Received type ' + typeof string\n\t )\n\t }\n\n\t const len = string.length;\n\t const mustMatch = (arguments.length > 2 && arguments[2] === true);\n\t if (!mustMatch && len === 0) return 0\n\n\t // Use a for loop to avoid recursion\n\t let loweredCase = false;\n\t for (;;) {\n\t switch (encoding) {\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t return len\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8ToBytes(string).length\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return len * 2\n\t case 'hex':\n\t return len >>> 1\n\t case 'base64':\n\t return base64ToBytes(string).length\n\t default:\n\t if (loweredCase) {\n\t return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n\t }\n\t encoding = ('' + encoding).toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t}\n\tBuffer.byteLength = byteLength;\n\n\tfunction slowToString (encoding, start, end) {\n\t let loweredCase = false;\n\n\t // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n\t // property of a typed array.\n\n\t // This behaves neither like String nor Uint8Array in that we set start/end\n\t // to their upper/lower bounds if the value passed is out of range.\n\t // undefined is handled specially as per ECMA-262 6th Edition,\n\t // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n\t if (start === undefined || start < 0) {\n\t start = 0;\n\t }\n\t // Return early if start > this.length. Done here to prevent potential uint32\n\t // coercion fail below.\n\t if (start > this.length) {\n\t return ''\n\t }\n\n\t if (end === undefined || end > this.length) {\n\t end = this.length;\n\t }\n\n\t if (end <= 0) {\n\t return ''\n\t }\n\n\t // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n\t end >>>= 0;\n\t start >>>= 0;\n\n\t if (end <= start) {\n\t return ''\n\t }\n\n\t if (!encoding) encoding = 'utf8';\n\n\t while (true) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexSlice(this, start, end)\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Slice(this, start, end)\n\n\t case 'ascii':\n\t return asciiSlice(this, start, end)\n\n\t case 'latin1':\n\t case 'binary':\n\t return latin1Slice(this, start, end)\n\n\t case 'base64':\n\t return base64Slice(this, start, end)\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return utf16leSlice(this, start, end)\n\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n\t encoding = (encoding + '').toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t}\n\n\t// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n\t// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n\t// reliably in a browserify context because there could be multiple different\n\t// copies of the 'buffer' package in use. This method works even for Buffer\n\t// instances that were created from another copy of the `buffer` package.\n\t// See: https://github.com/feross/buffer/issues/154\n\tBuffer.prototype._isBuffer = true;\n\n\tfunction swap (b, n, m) {\n\t const i = b[n];\n\t b[n] = b[m];\n\t b[m] = i;\n\t}\n\n\tBuffer.prototype.swap16 = function swap16 () {\n\t const len = this.length;\n\t if (len % 2 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 16-bits')\n\t }\n\t for (let i = 0; i < len; i += 2) {\n\t swap(this, i, i + 1);\n\t }\n\t return this\n\t};\n\n\tBuffer.prototype.swap32 = function swap32 () {\n\t const len = this.length;\n\t if (len % 4 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 32-bits')\n\t }\n\t for (let i = 0; i < len; i += 4) {\n\t swap(this, i, i + 3);\n\t swap(this, i + 1, i + 2);\n\t }\n\t return this\n\t};\n\n\tBuffer.prototype.swap64 = function swap64 () {\n\t const len = this.length;\n\t if (len % 8 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 64-bits')\n\t }\n\t for (let i = 0; i < len; i += 8) {\n\t swap(this, i, i + 7);\n\t swap(this, i + 1, i + 6);\n\t swap(this, i + 2, i + 5);\n\t swap(this, i + 3, i + 4);\n\t }\n\t return this\n\t};\n\n\tBuffer.prototype.toString = function toString () {\n\t const length = this.length;\n\t if (length === 0) return ''\n\t if (arguments.length === 0) return utf8Slice(this, 0, length)\n\t return slowToString.apply(this, arguments)\n\t};\n\n\tBuffer.prototype.toLocaleString = Buffer.prototype.toString;\n\n\tBuffer.prototype.equals = function equals (b) {\n\t if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n\t if (this === b) return true\n\t return Buffer.compare(this, b) === 0\n\t};\n\n\tBuffer.prototype.inspect = function inspect () {\n\t let str = '';\n\t const max = exports.INSPECT_MAX_BYTES;\n\t str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();\n\t if (this.length > max) str += ' ... ';\n\t return ''\n\t};\n\tif (customInspectSymbol) {\n\t Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;\n\t}\n\n\tBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n\t if (isInstance(target, GlobalUint8Array)) {\n\t target = Buffer.from(target, target.offset, target.byteLength);\n\t }\n\t if (!Buffer.isBuffer(target)) {\n\t throw new TypeError(\n\t 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n\t 'Received type ' + (typeof target)\n\t )\n\t }\n\n\t if (start === undefined) {\n\t start = 0;\n\t }\n\t if (end === undefined) {\n\t end = target ? target.length : 0;\n\t }\n\t if (thisStart === undefined) {\n\t thisStart = 0;\n\t }\n\t if (thisEnd === undefined) {\n\t thisEnd = this.length;\n\t }\n\n\t if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n\t throw new RangeError('out of range index')\n\t }\n\n\t if (thisStart >= thisEnd && start >= end) {\n\t return 0\n\t }\n\t if (thisStart >= thisEnd) {\n\t return -1\n\t }\n\t if (start >= end) {\n\t return 1\n\t }\n\n\t start >>>= 0;\n\t end >>>= 0;\n\t thisStart >>>= 0;\n\t thisEnd >>>= 0;\n\n\t if (this === target) return 0\n\n\t let x = thisEnd - thisStart;\n\t let y = end - start;\n\t const len = Math.min(x, y);\n\n\t const thisCopy = this.slice(thisStart, thisEnd);\n\t const targetCopy = target.slice(start, end);\n\n\t for (let i = 0; i < len; ++i) {\n\t if (thisCopy[i] !== targetCopy[i]) {\n\t x = thisCopy[i];\n\t y = targetCopy[i];\n\t break\n\t }\n\t }\n\n\t if (x < y) return -1\n\t if (y < x) return 1\n\t return 0\n\t};\n\n\t// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n\t// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n\t//\n\t// Arguments:\n\t// - buffer - a Buffer to search\n\t// - val - a string, Buffer, or number\n\t// - byteOffset - an index into `buffer`; will be clamped to an int32\n\t// - encoding - an optional encoding, relevant is val is a string\n\t// - dir - true for indexOf, false for lastIndexOf\n\tfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n\t // Empty buffer means no match\n\t if (buffer.length === 0) return -1\n\n\t // Normalize byteOffset\n\t if (typeof byteOffset === 'string') {\n\t encoding = byteOffset;\n\t byteOffset = 0;\n\t } else if (byteOffset > 0x7fffffff) {\n\t byteOffset = 0x7fffffff;\n\t } else if (byteOffset < -0x80000000) {\n\t byteOffset = -0x80000000;\n\t }\n\t byteOffset = +byteOffset; // Coerce to Number.\n\t if (numberIsNaN(byteOffset)) {\n\t // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n\t byteOffset = dir ? 0 : (buffer.length - 1);\n\t }\n\n\t // Normalize byteOffset: negative offsets start from the end of the buffer\n\t if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\t if (byteOffset >= buffer.length) {\n\t if (dir) return -1\n\t else byteOffset = buffer.length - 1;\n\t } else if (byteOffset < 0) {\n\t if (dir) byteOffset = 0;\n\t else return -1\n\t }\n\n\t // Normalize val\n\t if (typeof val === 'string') {\n\t val = Buffer.from(val, encoding);\n\t }\n\n\t // Finally, search either indexOf (if dir is true) or lastIndexOf\n\t if (Buffer.isBuffer(val)) {\n\t // Special case: looking for empty string/buffer always fails\n\t if (val.length === 0) {\n\t return -1\n\t }\n\t return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n\t } else if (typeof val === 'number') {\n\t val = val & 0xFF; // Search for a byte value [0-255]\n\t if (typeof GlobalUint8Array.prototype.indexOf === 'function') {\n\t if (dir) {\n\t return GlobalUint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n\t } else {\n\t return GlobalUint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n\t }\n\t }\n\t return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n\t }\n\n\t throw new TypeError('val must be string, number or Buffer')\n\t}\n\n\tfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n\t let indexSize = 1;\n\t let arrLength = arr.length;\n\t let valLength = val.length;\n\n\t if (encoding !== undefined) {\n\t encoding = String(encoding).toLowerCase();\n\t if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n\t encoding === 'utf16le' || encoding === 'utf-16le') {\n\t if (arr.length < 2 || val.length < 2) {\n\t return -1\n\t }\n\t indexSize = 2;\n\t arrLength /= 2;\n\t valLength /= 2;\n\t byteOffset /= 2;\n\t }\n\t }\n\n\t function read (buf, i) {\n\t if (indexSize === 1) {\n\t return buf[i]\n\t } else {\n\t return buf.readUInt16BE(i * indexSize)\n\t }\n\t }\n\n\t let i;\n\t if (dir) {\n\t let foundIndex = -1;\n\t for (i = byteOffset; i < arrLength; i++) {\n\t if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n\t if (foundIndex === -1) foundIndex = i;\n\t if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n\t } else {\n\t if (foundIndex !== -1) i -= i - foundIndex;\n\t foundIndex = -1;\n\t }\n\t }\n\t } else {\n\t if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n\t for (i = byteOffset; i >= 0; i--) {\n\t let found = true;\n\t for (let j = 0; j < valLength; j++) {\n\t if (read(arr, i + j) !== read(val, j)) {\n\t found = false;\n\t break\n\t }\n\t }\n\t if (found) return i\n\t }\n\t }\n\n\t return -1\n\t}\n\n\tBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n\t return this.indexOf(val, byteOffset, encoding) !== -1\n\t};\n\n\tBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n\t};\n\n\tBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n\t};\n\n\tfunction hexWrite (buf, string, offset, length) {\n\t offset = Number(offset) || 0;\n\t const remaining = buf.length - offset;\n\t if (!length) {\n\t length = remaining;\n\t } else {\n\t length = Number(length);\n\t if (length > remaining) {\n\t length = remaining;\n\t }\n\t }\n\n\t const strLen = string.length;\n\n\t if (length > strLen / 2) {\n\t length = strLen / 2;\n\t }\n\t let i;\n\t for (i = 0; i < length; ++i) {\n\t const parsed = parseInt(string.substr(i * 2, 2), 16);\n\t if (numberIsNaN(parsed)) return i\n\t buf[offset + i] = parsed;\n\t }\n\t return i\n\t}\n\n\tfunction utf8Write (buf, string, offset, length) {\n\t return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n\t}\n\n\tfunction asciiWrite (buf, string, offset, length) {\n\t return blitBuffer(asciiToBytes(string), buf, offset, length)\n\t}\n\n\tfunction base64Write (buf, string, offset, length) {\n\t return blitBuffer(base64ToBytes(string), buf, offset, length)\n\t}\n\n\tfunction ucs2Write (buf, string, offset, length) {\n\t return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n\t}\n\n\tBuffer.prototype.write = function write (string, offset, length, encoding) {\n\t // Buffer#write(string)\n\t if (offset === undefined) {\n\t encoding = 'utf8';\n\t length = this.length;\n\t offset = 0;\n\t // Buffer#write(string, encoding)\n\t } else if (length === undefined && typeof offset === 'string') {\n\t encoding = offset;\n\t length = this.length;\n\t offset = 0;\n\t // Buffer#write(string, offset[, length][, encoding])\n\t } else if (isFinite(offset)) {\n\t offset = offset >>> 0;\n\t if (isFinite(length)) {\n\t length = length >>> 0;\n\t if (encoding === undefined) encoding = 'utf8';\n\t } else {\n\t encoding = length;\n\t length = undefined;\n\t }\n\t } else {\n\t throw new Error(\n\t 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n\t )\n\t }\n\n\t const remaining = this.length - offset;\n\t if (length === undefined || length > remaining) length = remaining;\n\n\t if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n\t throw new RangeError('Attempt to write outside buffer bounds')\n\t }\n\n\t if (!encoding) encoding = 'utf8';\n\n\t let loweredCase = false;\n\t for (;;) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexWrite(this, string, offset, length)\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Write(this, string, offset, length)\n\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t return asciiWrite(this, string, offset, length)\n\n\t case 'base64':\n\t // Warning: maxLength not taken into account in base64Write\n\t return base64Write(this, string, offset, length)\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return ucs2Write(this, string, offset, length)\n\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n\t encoding = ('' + encoding).toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t};\n\n\tBuffer.prototype.toJSON = function toJSON () {\n\t return {\n\t type: 'Buffer',\n\t data: Array.prototype.slice.call(this._arr || this, 0)\n\t }\n\t};\n\n\tfunction base64Slice (buf, start, end) {\n\t if (start === 0 && end === buf.length) {\n\t return base64.fromByteArray(buf)\n\t } else {\n\t return base64.fromByteArray(buf.slice(start, end))\n\t }\n\t}\n\n\tfunction utf8Slice (buf, start, end) {\n\t end = Math.min(buf.length, end);\n\t const res = [];\n\n\t let i = start;\n\t while (i < end) {\n\t const firstByte = buf[i];\n\t let codePoint = null;\n\t let bytesPerSequence = (firstByte > 0xEF)\n\t ? 4\n\t : (firstByte > 0xDF)\n\t ? 3\n\t : (firstByte > 0xBF)\n\t ? 2\n\t : 1;\n\n\t if (i + bytesPerSequence <= end) {\n\t let secondByte, thirdByte, fourthByte, tempCodePoint;\n\n\t switch (bytesPerSequence) {\n\t case 1:\n\t if (firstByte < 0x80) {\n\t codePoint = firstByte;\n\t }\n\t break\n\t case 2:\n\t secondByte = buf[i + 1];\n\t if ((secondByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);\n\t if (tempCodePoint > 0x7F) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\t break\n\t case 3:\n\t secondByte = buf[i + 1];\n\t thirdByte = buf[i + 2];\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);\n\t if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\t break\n\t case 4:\n\t secondByte = buf[i + 1];\n\t thirdByte = buf[i + 2];\n\t fourthByte = buf[i + 3];\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);\n\t if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\t }\n\t }\n\n\t if (codePoint === null) {\n\t // we did not generate a valid codePoint so insert a\n\t // replacement char (U+FFFD) and advance only 1 byte\n\t codePoint = 0xFFFD;\n\t bytesPerSequence = 1;\n\t } else if (codePoint > 0xFFFF) {\n\t // encode to utf16 (surrogate pair dance)\n\t codePoint -= 0x10000;\n\t res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n\t codePoint = 0xDC00 | codePoint & 0x3FF;\n\t }\n\n\t res.push(codePoint);\n\t i += bytesPerSequence;\n\t }\n\n\t return decodeCodePointsArray(res)\n\t}\n\n\t// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n\t// the lowest limit is Chrome, with 0x10000 args.\n\t// We go 1 magnitude less, for safety\n\tconst MAX_ARGUMENTS_LENGTH = 0x1000;\n\n\tfunction decodeCodePointsArray (codePoints) {\n\t const len = codePoints.length;\n\t if (len <= MAX_ARGUMENTS_LENGTH) {\n\t return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n\t }\n\n\t // Decode in chunks to avoid \"call stack size exceeded\".\n\t let res = '';\n\t let i = 0;\n\t while (i < len) {\n\t res += String.fromCharCode.apply(\n\t String,\n\t codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n\t );\n\t }\n\t return res\n\t}\n\n\tfunction asciiSlice (buf, start, end) {\n\t let ret = '';\n\t end = Math.min(buf.length, end);\n\n\t for (let i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i] & 0x7F);\n\t }\n\t return ret\n\t}\n\n\tfunction latin1Slice (buf, start, end) {\n\t let ret = '';\n\t end = Math.min(buf.length, end);\n\n\t for (let i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i]);\n\t }\n\t return ret\n\t}\n\n\tfunction hexSlice (buf, start, end) {\n\t const len = buf.length;\n\n\t if (!start || start < 0) start = 0;\n\t if (!end || end < 0 || end > len) end = len;\n\n\t let out = '';\n\t for (let i = start; i < end; ++i) {\n\t out += hexSliceLookupTable[buf[i]];\n\t }\n\t return out\n\t}\n\n\tfunction utf16leSlice (buf, start, end) {\n\t const bytes = buf.slice(start, end);\n\t let res = '';\n\t // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n\t for (let i = 0; i < bytes.length - 1; i += 2) {\n\t res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256));\n\t }\n\t return res\n\t}\n\n\tBuffer.prototype.slice = function slice (start, end) {\n\t const len = this.length;\n\t start = ~~start;\n\t end = end === undefined ? len : ~~end;\n\n\t if (start < 0) {\n\t start += len;\n\t if (start < 0) start = 0;\n\t } else if (start > len) {\n\t start = len;\n\t }\n\n\t if (end < 0) {\n\t end += len;\n\t if (end < 0) end = 0;\n\t } else if (end > len) {\n\t end = len;\n\t }\n\n\t if (end < start) end = start;\n\n\t const newBuf = this.subarray(start, end);\n\t // Return an augmented `Uint8Array` instance\n\t Object.setPrototypeOf(newBuf, Buffer.prototype);\n\n\t return newBuf\n\t};\n\n\t/*\n\t * Need to make sure that buffer isn't trying to write out of bounds.\n\t */\n\tfunction checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}\n\n\tBuffer.prototype.readUintLE =\n\tBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n\t let val = this[offset];\n\t let mul = 1;\n\t let i = 0;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul;\n\t }\n\n\t return val\n\t};\n\n\tBuffer.prototype.readUintBE =\n\tBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) {\n\t checkOffset(offset, byteLength, this.length);\n\t }\n\n\t let val = this[offset + --byteLength];\n\t let mul = 1;\n\t while (byteLength > 0 && (mul *= 0x100)) {\n\t val += this[offset + --byteLength] * mul;\n\t }\n\n\t return val\n\t};\n\n\tBuffer.prototype.readUint8 =\n\tBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 1, this.length);\n\t return this[offset]\n\t};\n\n\tBuffer.prototype.readUint16LE =\n\tBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t return this[offset] | (this[offset + 1] << 8)\n\t};\n\n\tBuffer.prototype.readUint16BE =\n\tBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t return (this[offset] << 8) | this[offset + 1]\n\t};\n\n\tBuffer.prototype.readUint32LE =\n\tBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return ((this[offset]) |\n\t (this[offset + 1] << 8) |\n\t (this[offset + 2] << 16)) +\n\t (this[offset + 3] * 0x1000000)\n\t};\n\n\tBuffer.prototype.readUint32BE =\n\tBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return (this[offset] * 0x1000000) +\n\t ((this[offset + 1] << 16) |\n\t (this[offset + 2] << 8) |\n\t this[offset + 3])\n\t};\n\n\tBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const lo = first +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 24;\n\n\t const hi = this[++offset] +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset] * 2 ** 16 +\n\t last * 2 ** 24;\n\n\t return BigInt(lo) + (BigInt(hi) << BigInt(32))\n\t});\n\n\tBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const hi = first * 2 ** 24 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset];\n\n\t const lo = this[++offset] * 2 ** 24 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t last;\n\n\t return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n\t});\n\n\tBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n\t let val = this[offset];\n\t let mul = 1;\n\t let i = 0;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul;\n\t }\n\t mul *= 0x80;\n\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n\t return val\n\t};\n\n\tBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n\t let i = byteLength;\n\t let mul = 1;\n\t let val = this[offset + --i];\n\t while (i > 0 && (mul *= 0x100)) {\n\t val += this[offset + --i] * mul;\n\t }\n\t mul *= 0x80;\n\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n\t return val\n\t};\n\n\tBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 1, this.length);\n\t if (!(this[offset] & 0x80)) return (this[offset])\n\t return ((0xff - this[offset] + 1) * -1)\n\t};\n\n\tBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t const val = this[offset] | (this[offset + 1] << 8);\n\t return (val & 0x8000) ? val | 0xFFFF0000 : val\n\t};\n\n\tBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t const val = this[offset + 1] | (this[offset] << 8);\n\t return (val & 0x8000) ? val | 0xFFFF0000 : val\n\t};\n\n\tBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return (this[offset]) |\n\t (this[offset + 1] << 8) |\n\t (this[offset + 2] << 16) |\n\t (this[offset + 3] << 24)\n\t};\n\n\tBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return (this[offset] << 24) |\n\t (this[offset + 1] << 16) |\n\t (this[offset + 2] << 8) |\n\t (this[offset + 3])\n\t};\n\n\tBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const val = this[offset + 4] +\n\t this[offset + 5] * 2 ** 8 +\n\t this[offset + 6] * 2 ** 16 +\n\t (last << 24); // Overflow\n\n\t return (BigInt(val) << BigInt(32)) +\n\t BigInt(first +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 24)\n\t});\n\n\tBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const val = (first << 24) + // Overflow\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset];\n\n\t return (BigInt(val) << BigInt(32)) +\n\t BigInt(this[++offset] * 2 ** 24 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t last)\n\t});\n\n\tBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return ieee754$1.read(this, offset, true, 23, 4)\n\t};\n\n\tBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return ieee754$1.read(this, offset, false, 23, 4)\n\t};\n\n\tBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 8, this.length);\n\t return ieee754$1.read(this, offset, true, 52, 8)\n\t};\n\n\tBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 8, this.length);\n\t return ieee754$1.read(this, offset, false, 52, 8)\n\t};\n\n\tfunction checkInt (buf, value, offset, ext, max, min) {\n\t if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n\t if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range')\n\t}\n\n\tBuffer.prototype.writeUintLE =\n\tBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) {\n\t const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n\t checkInt(this, value, offset, byteLength, maxBytes, 0);\n\t }\n\n\t let mul = 1;\n\t let i = 0;\n\t this[offset] = value & 0xFF;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t this[offset + i] = (value / mul) & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeUintBE =\n\tBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) {\n\t const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n\t checkInt(this, value, offset, byteLength, maxBytes, 0);\n\t }\n\n\t let i = byteLength - 1;\n\t let mul = 1;\n\t this[offset + i] = value & 0xFF;\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t this[offset + i] = (value / mul) & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeUint8 =\n\tBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n\t this[offset] = (value & 0xff);\n\t return offset + 1\n\t};\n\n\tBuffer.prototype.writeUint16LE =\n\tBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\t this[offset] = (value & 0xff);\n\t this[offset + 1] = (value >>> 8);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeUint16BE =\n\tBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\t this[offset] = (value >>> 8);\n\t this[offset + 1] = (value & 0xff);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeUint32LE =\n\tBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\t this[offset + 3] = (value >>> 24);\n\t this[offset + 2] = (value >>> 16);\n\t this[offset + 1] = (value >>> 8);\n\t this[offset] = (value & 0xff);\n\t return offset + 4\n\t};\n\n\tBuffer.prototype.writeUint32BE =\n\tBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\t this[offset] = (value >>> 24);\n\t this[offset + 1] = (value >>> 16);\n\t this[offset + 2] = (value >>> 8);\n\t this[offset + 3] = (value & 0xff);\n\t return offset + 4\n\t};\n\n\tfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n\t checkIntBI(value, min, max, buf, offset, 7);\n\n\t let lo = Number(value & BigInt(0xffffffff));\n\t buf[offset++] = lo;\n\t lo = lo >> 8;\n\t buf[offset++] = lo;\n\t lo = lo >> 8;\n\t buf[offset++] = lo;\n\t lo = lo >> 8;\n\t buf[offset++] = lo;\n\t let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n\t buf[offset++] = hi;\n\t hi = hi >> 8;\n\t buf[offset++] = hi;\n\t hi = hi >> 8;\n\t buf[offset++] = hi;\n\t hi = hi >> 8;\n\t buf[offset++] = hi;\n\t return offset\n\t}\n\n\tfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n\t checkIntBI(value, min, max, buf, offset, 7);\n\n\t let lo = Number(value & BigInt(0xffffffff));\n\t buf[offset + 7] = lo;\n\t lo = lo >> 8;\n\t buf[offset + 6] = lo;\n\t lo = lo >> 8;\n\t buf[offset + 5] = lo;\n\t lo = lo >> 8;\n\t buf[offset + 4] = lo;\n\t let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n\t buf[offset + 3] = hi;\n\t hi = hi >> 8;\n\t buf[offset + 2] = hi;\n\t hi = hi >> 8;\n\t buf[offset + 1] = hi;\n\t hi = hi >> 8;\n\t buf[offset] = hi;\n\t return offset + 8\n\t}\n\n\tBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n\t return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n\t});\n\n\tBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n\t return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n\t});\n\n\tBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t const limit = Math.pow(2, (8 * byteLength) - 1);\n\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit);\n\t }\n\n\t let i = 0;\n\t let mul = 1;\n\t let sub = 0;\n\t this[offset] = value & 0xFF;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n\t sub = 1;\n\t }\n\t this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t const limit = Math.pow(2, (8 * byteLength) - 1);\n\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit);\n\t }\n\n\t let i = byteLength - 1;\n\t let mul = 1;\n\t let sub = 0;\n\t this[offset + i] = value & 0xFF;\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n\t sub = 1;\n\t }\n\t this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n\t if (value < 0) value = 0xff + value + 1;\n\t this[offset] = (value & 0xff);\n\t return offset + 1\n\t};\n\n\tBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\t this[offset] = (value & 0xff);\n\t this[offset + 1] = (value >>> 8);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\t this[offset] = (value >>> 8);\n\t this[offset + 1] = (value & 0xff);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\t this[offset] = (value & 0xff);\n\t this[offset + 1] = (value >>> 8);\n\t this[offset + 2] = (value >>> 16);\n\t this[offset + 3] = (value >>> 24);\n\t return offset + 4\n\t};\n\n\tBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\t if (value < 0) value = 0xffffffff + value + 1;\n\t this[offset] = (value >>> 24);\n\t this[offset + 1] = (value >>> 16);\n\t this[offset + 2] = (value >>> 8);\n\t this[offset + 3] = (value & 0xff);\n\t return offset + 4\n\t};\n\n\tBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n\t return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n\t});\n\n\tBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n\t return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n\t});\n\n\tfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range')\n\t if (offset < 0) throw new RangeError('Index out of range')\n\t}\n\n\tfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 4);\n\t }\n\t ieee754$1.write(buf, value, offset, littleEndian, 23, 4);\n\t return offset + 4\n\t}\n\n\tBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n\t return writeFloat(this, value, offset, true, noAssert)\n\t};\n\n\tBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n\t return writeFloat(this, value, offset, false, noAssert)\n\t};\n\n\tfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 8);\n\t }\n\t ieee754$1.write(buf, value, offset, littleEndian, 52, 8);\n\t return offset + 8\n\t}\n\n\tBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n\t return writeDouble(this, value, offset, true, noAssert)\n\t};\n\n\tBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n\t return writeDouble(this, value, offset, false, noAssert)\n\t};\n\n\t// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\n\tBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n\t if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n\t if (!start) start = 0;\n\t if (!end && end !== 0) end = this.length;\n\t if (targetStart >= target.length) targetStart = target.length;\n\t if (!targetStart) targetStart = 0;\n\t if (end > 0 && end < start) end = start;\n\n\t // Copy 0 bytes; we're done\n\t if (end === start) return 0\n\t if (target.length === 0 || this.length === 0) return 0\n\n\t // Fatal error conditions\n\t if (targetStart < 0) {\n\t throw new RangeError('targetStart out of bounds')\n\t }\n\t if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n\t if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n\t // Are we oob?\n\t if (end > this.length) end = this.length;\n\t if (target.length - targetStart < end - start) {\n\t end = target.length - targetStart + start;\n\t }\n\n\t const len = end - start;\n\n\t if (this === target && typeof GlobalUint8Array.prototype.copyWithin === 'function') {\n\t // Use built-in when available, missing from IE11\n\t this.copyWithin(targetStart, start, end);\n\t } else {\n\t GlobalUint8Array.prototype.set.call(\n\t target,\n\t this.subarray(start, end),\n\t targetStart\n\t );\n\t }\n\n\t return len\n\t};\n\n\t// Usage:\n\t// buffer.fill(number[, offset[, end]])\n\t// buffer.fill(buffer[, offset[, end]])\n\t// buffer.fill(string[, offset[, end]][, encoding])\n\tBuffer.prototype.fill = function fill (val, start, end, encoding) {\n\t // Handle string cases:\n\t if (typeof val === 'string') {\n\t if (typeof start === 'string') {\n\t encoding = start;\n\t start = 0;\n\t end = this.length;\n\t } else if (typeof end === 'string') {\n\t encoding = end;\n\t end = this.length;\n\t }\n\t if (encoding !== undefined && typeof encoding !== 'string') {\n\t throw new TypeError('encoding must be a string')\n\t }\n\t if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding)\n\t }\n\t if (val.length === 1) {\n\t const code = val.charCodeAt(0);\n\t if ((encoding === 'utf8' && code < 128) ||\n\t encoding === 'latin1') {\n\t // Fast path: If `val` fits into a single byte, use that numeric value.\n\t val = code;\n\t }\n\t }\n\t } else if (typeof val === 'number') {\n\t val = val & 255;\n\t } else if (typeof val === 'boolean') {\n\t val = Number(val);\n\t }\n\n\t // Invalid ranges are not set to a default, so can range check early.\n\t if (start < 0 || this.length < start || this.length < end) {\n\t throw new RangeError('Out of range index')\n\t }\n\n\t if (end <= start) {\n\t return this\n\t }\n\n\t start = start >>> 0;\n\t end = end === undefined ? this.length : end >>> 0;\n\n\t if (!val) val = 0;\n\n\t let i;\n\t if (typeof val === 'number') {\n\t for (i = start; i < end; ++i) {\n\t this[i] = val;\n\t }\n\t } else {\n\t const bytes = Buffer.isBuffer(val)\n\t ? val\n\t : Buffer.from(val, encoding);\n\t const len = bytes.length;\n\t if (len === 0) {\n\t throw new TypeError('The value \"' + val +\n\t '\" is invalid for argument \"value\"')\n\t }\n\t for (i = 0; i < end - start; ++i) {\n\t this[i + start] = bytes[i % len];\n\t }\n\t }\n\n\t return this\n\t};\n\n\t// CUSTOM ERRORS\n\t// =============\n\n\t// Simplified versions from Node, changed for Buffer-only usage\n\tconst errors = {};\n\tfunction E (sym, getMessage, Base) {\n\t errors[sym] = class NodeError extends Base {\n\t constructor () {\n\t super();\n\n\t Object.defineProperty(this, 'message', {\n\t value: getMessage.apply(this, arguments),\n\t writable: true,\n\t configurable: true\n\t });\n\n\t // Add the error code to the name to include it in the stack trace.\n\t this.name = `${this.name} [${sym}]`;\n\t // Access the stack to generate the error message including the error code\n\t // from the name.\n\t this.stack; // eslint-disable-line no-unused-expressions\n\t // Reset the name to the actual name.\n\t delete this.name;\n\t }\n\n\t get code () {\n\t return sym\n\t }\n\n\t set code (value) {\n\t Object.defineProperty(this, 'code', {\n\t configurable: true,\n\t enumerable: true,\n\t value,\n\t writable: true\n\t });\n\t }\n\n\t toString () {\n\t return `${this.name} [${sym}]: ${this.message}`\n\t }\n\t };\n\t}\n\n\tE('ERR_BUFFER_OUT_OF_BOUNDS',\n\t function (name) {\n\t if (name) {\n\t return `${name} is outside of buffer bounds`\n\t }\n\n\t return 'Attempt to access memory outside buffer bounds'\n\t }, RangeError);\n\tE('ERR_INVALID_ARG_TYPE',\n\t function (name, actual) {\n\t return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n\t }, TypeError);\n\tE('ERR_OUT_OF_RANGE',\n\t function (str, range, input) {\n\t let msg = `The value of \"${str}\" is out of range.`;\n\t let received = input;\n\t if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n\t received = addNumericalSeparator(String(input));\n\t } else if (typeof input === 'bigint') {\n\t received = String(input);\n\t if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n\t received = addNumericalSeparator(received);\n\t }\n\t received += 'n';\n\t }\n\t msg += ` It must be ${range}. Received ${received}`;\n\t return msg\n\t }, RangeError);\n\n\tfunction addNumericalSeparator (val) {\n\t let res = '';\n\t let i = val.length;\n\t const start = val[0] === '-' ? 1 : 0;\n\t for (; i >= start + 4; i -= 3) {\n\t res = `_${val.slice(i - 3, i)}${res}`;\n\t }\n\t return `${val.slice(0, i)}${res}`\n\t}\n\n\t// CHECK FUNCTIONS\n\t// ===============\n\n\tfunction checkBounds (buf, offset, byteLength) {\n\t validateNumber(offset, 'offset');\n\t if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n\t boundsError(offset, buf.length - (byteLength + 1));\n\t }\n\t}\n\n\tfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n\t if (value > max || value < min) {\n\t const n = typeof min === 'bigint' ? 'n' : '';\n\t let range;\n\t if (byteLength > 3) {\n\t if (min === 0 || min === BigInt(0)) {\n\t range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;\n\t } else {\n\t range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n\t `${(byteLength + 1) * 8 - 1}${n}`;\n\t }\n\t } else {\n\t range = `>= ${min}${n} and <= ${max}${n}`;\n\t }\n\t throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n\t }\n\t checkBounds(buf, offset, byteLength);\n\t}\n\n\tfunction validateNumber (value, name) {\n\t if (typeof value !== 'number') {\n\t throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n\t }\n\t}\n\n\tfunction boundsError (value, length, type) {\n\t if (Math.floor(value) !== value) {\n\t validateNumber(value, type);\n\t throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n\t }\n\n\t if (length < 0) {\n\t throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n\t }\n\n\t throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n\t `>= ${type ? 1 : 0} and <= ${length}`,\n\t value)\n\t}\n\n\t// HELPER FUNCTIONS\n\t// ================\n\n\tconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n\n\tfunction base64clean (str) {\n\t // Node takes equal signs as end of the Base64 encoding\n\t str = str.split('=')[0];\n\t // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n\t str = str.trim().replace(INVALID_BASE64_RE, '');\n\t // Node converts strings with length < 2 to ''\n\t if (str.length < 2) return ''\n\t // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n\t while (str.length % 4 !== 0) {\n\t str = str + '=';\n\t }\n\t return str\n\t}\n\n\tfunction utf8ToBytes (string, units) {\n\t units = units || Infinity;\n\t let codePoint;\n\t const length = string.length;\n\t let leadSurrogate = null;\n\t const bytes = [];\n\n\t for (let i = 0; i < length; ++i) {\n\t codePoint = string.charCodeAt(i);\n\n\t // is surrogate component\n\t if (codePoint > 0xD7FF && codePoint < 0xE000) {\n\t // last char was a lead\n\t if (!leadSurrogate) {\n\t // no lead yet\n\t if (codePoint > 0xDBFF) {\n\t // unexpected trail\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t continue\n\t } else if (i + 1 === length) {\n\t // unpaired lead\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t continue\n\t }\n\n\t // valid lead\n\t leadSurrogate = codePoint;\n\n\t continue\n\t }\n\n\t // 2 leads in a row\n\t if (codePoint < 0xDC00) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t leadSurrogate = codePoint;\n\t continue\n\t }\n\n\t // valid surrogate pair\n\t codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n\t } else if (leadSurrogate) {\n\t // valid bmp char, but last char was a lead\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t }\n\n\t leadSurrogate = null;\n\n\t // encode utf8\n\t if (codePoint < 0x80) {\n\t if ((units -= 1) < 0) break\n\t bytes.push(codePoint);\n\t } else if (codePoint < 0x800) {\n\t if ((units -= 2) < 0) break\n\t bytes.push(\n\t codePoint >> 0x6 | 0xC0,\n\t codePoint & 0x3F | 0x80\n\t );\n\t } else if (codePoint < 0x10000) {\n\t if ((units -= 3) < 0) break\n\t bytes.push(\n\t codePoint >> 0xC | 0xE0,\n\t codePoint >> 0x6 & 0x3F | 0x80,\n\t codePoint & 0x3F | 0x80\n\t );\n\t } else if (codePoint < 0x110000) {\n\t if ((units -= 4) < 0) break\n\t bytes.push(\n\t codePoint >> 0x12 | 0xF0,\n\t codePoint >> 0xC & 0x3F | 0x80,\n\t codePoint >> 0x6 & 0x3F | 0x80,\n\t codePoint & 0x3F | 0x80\n\t );\n\t } else {\n\t throw new Error('Invalid code point')\n\t }\n\t }\n\n\t return bytes\n\t}\n\n\tfunction asciiToBytes (str) {\n\t const byteArray = [];\n\t for (let i = 0; i < str.length; ++i) {\n\t // Node's code seems to be doing this and not & 0x7F..\n\t byteArray.push(str.charCodeAt(i) & 0xFF);\n\t }\n\t return byteArray\n\t}\n\n\tfunction utf16leToBytes (str, units) {\n\t let c, hi, lo;\n\t const byteArray = [];\n\t for (let i = 0; i < str.length; ++i) {\n\t if ((units -= 2) < 0) break\n\n\t c = str.charCodeAt(i);\n\t hi = c >> 8;\n\t lo = c % 256;\n\t byteArray.push(lo);\n\t byteArray.push(hi);\n\t }\n\n\t return byteArray\n\t}\n\n\tfunction base64ToBytes (str) {\n\t return base64.toByteArray(base64clean(str))\n\t}\n\n\tfunction blitBuffer (src, dst, offset, length) {\n\t let i;\n\t for (i = 0; i < length; ++i) {\n\t if ((i + offset >= dst.length) || (i >= src.length)) break\n\t dst[i + offset] = src[i];\n\t }\n\t return i\n\t}\n\n\t// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n\t// the `instanceof` check but they should be treated as of that type.\n\t// See: https://github.com/feross/buffer/issues/166\n\tfunction isInstance (obj, type) {\n\t return obj instanceof type ||\n\t (obj != null && obj.constructor != null && obj.constructor.name != null &&\n\t obj.constructor.name === type.name)\n\t}\n\tfunction numberIsNaN (obj) {\n\t // For IE11 support\n\t return obj !== obj // eslint-disable-line no-self-compare\n\t}\n\n\t// Create lookup table for `toString('hex')`\n\t// See: https://github.com/feross/buffer/issues/219\n\tconst hexSliceLookupTable = (function () {\n\t const alphabet = '0123456789abcdef';\n\t const table = new Array(256);\n\t for (let i = 0; i < 16; ++i) {\n\t const i16 = i * 16;\n\t for (let j = 0; j < 16; ++j) {\n\t table[i16 + j] = alphabet[i] + alphabet[j];\n\t }\n\t }\n\t return table\n\t})();\n\n\t// Return not function with Error if BigInt not supported\n\tfunction defineBigIntMethod (fn) {\n\t return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n\t}\n\n\tfunction BufferBigIntNotDefined () {\n\t throw new Error('BigInt not supported')\n\t} \n} (buffer));\n\nconst Buffer = buffer.Buffer;\n\nconst Blob = buffer.Blob;\nconst BlobOptions = buffer.BlobOptions;\nconst Buffer$1 = buffer.Buffer;\nconst File = buffer.File;\nconst FileOptions = buffer.FileOptions;\nconst INSPECT_MAX_BYTES = buffer.INSPECT_MAX_BYTES;\nconst SlowBuffer = buffer.SlowBuffer;\nconst TranscodeEncoding = buffer.TranscodeEncoding;\nconst atob = buffer.atob;\nconst btoa = buffer.btoa;\nconst constants = buffer.constants;\nconst isAscii = buffer.isAscii;\nconst isUtf8 = buffer.isUtf8;\nconst kMaxLength = buffer.kMaxLength;\nconst kStringMaxLength = buffer.kStringMaxLength;\nconst resolveObjectURL = buffer.resolveObjectURL;\nconst transcode = buffer.transcode;\nexport { Blob, BlobOptions, Buffer$1 as Buffer, File, FileOptions, INSPECT_MAX_BYTES, SlowBuffer, TranscodeEncoding, atob, btoa, constants, Buffer as default, isAscii, isUtf8, kMaxLength, kStringMaxLength, resolveObjectURL, transcode };\n//# sourceMappingURL=index.js.map\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport { Tools } from \"../../Misc/tools.js\";\nimport { AutoReleaseWorkerPool } from \"../../Misc/workerPool.js\";\nimport { Geometry } from \"../geometry.js\";\nimport { VertexBuffer } from \"../buffer.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nfunction createDecoderAsync(wasmBinary) {\n return new Promise((resolve) => {\n DracoDecoderModule({ wasmBinary: wasmBinary }).then((module) => {\n resolve({ module: module });\n });\n });\n}\nfunction decodeMesh(decoderModule, data, attributes, onIndicesData, onAttributeData) {\n let decoder = null;\n let buffer = null;\n let geometry = null;\n try {\n decoder = new decoderModule.Decoder();\n buffer = new decoderModule.DecoderBuffer();\n buffer.Init(data, data.byteLength);\n let status;\n const type = decoder.GetEncodedGeometryType(buffer);\n switch (type) {\n case decoderModule.TRIANGULAR_MESH: {\n const mesh = new decoderModule.Mesh();\n status = decoder.DecodeBufferToMesh(buffer, mesh);\n if (!status.ok() || mesh.ptr === 0) {\n throw new Error(status.error_msg());\n }\n const numFaces = mesh.num_faces();\n const numIndices = numFaces * 3;\n const byteLength = numIndices * 4;\n const ptr = decoderModule._malloc(byteLength);\n try {\n decoder.GetTrianglesUInt32Array(mesh, byteLength, ptr);\n const indices = new Uint32Array(numIndices);\n indices.set(new Uint32Array(decoderModule.HEAPF32.buffer, ptr, numIndices));\n onIndicesData(indices);\n }\n finally {\n decoderModule._free(ptr);\n }\n geometry = mesh;\n break;\n }\n case decoderModule.POINT_CLOUD: {\n const pointCloud = new decoderModule.PointCloud();\n status = decoder.DecodeBufferToPointCloud(buffer, pointCloud);\n if (!status.ok() || !pointCloud.ptr) {\n throw new Error(status.error_msg());\n }\n geometry = pointCloud;\n break;\n }\n default: {\n throw new Error(`Invalid geometry type ${type}`);\n }\n }\n const numPoints = geometry.num_points();\n const processAttribute = (decoder, geometry, kind, attribute) => {\n const dataType = attribute.data_type();\n const numComponents = attribute.num_components();\n const normalized = attribute.normalized();\n const byteStride = attribute.byte_stride();\n const byteOffset = attribute.byte_offset();\n const dataTypeInfo = {\n [decoderModule.DT_FLOAT32]: { typedArrayConstructor: Float32Array, heap: decoderModule.HEAPF32 },\n [decoderModule.DT_INT8]: { typedArrayConstructor: Int8Array, heap: decoderModule.HEAP8 },\n [decoderModule.DT_INT16]: { typedArrayConstructor: Int16Array, heap: decoderModule.HEAP16 },\n [decoderModule.DT_INT32]: { typedArrayConstructor: Int32Array, heap: decoderModule.HEAP32 },\n [decoderModule.DT_UINT8]: { typedArrayConstructor: Uint8Array, heap: decoderModule.HEAPU8 },\n [decoderModule.DT_UINT16]: { typedArrayConstructor: Uint16Array, heap: decoderModule.HEAPU16 },\n [decoderModule.DT_UINT32]: { typedArrayConstructor: Uint32Array, heap: decoderModule.HEAPU32 },\n };\n const info = dataTypeInfo[dataType];\n if (!info) {\n throw new Error(`Invalid data type ${dataType}`);\n }\n const numValues = numPoints * numComponents;\n const byteLength = numValues * info.typedArrayConstructor.BYTES_PER_ELEMENT;\n const ptr = decoderModule._malloc(byteLength);\n try {\n decoder.GetAttributeDataArrayForAllPoints(geometry, attribute, dataType, byteLength, ptr);\n const data = new info.typedArrayConstructor(info.heap.buffer, ptr, numValues);\n onAttributeData(kind, data.slice(), numComponents, byteOffset, byteStride, normalized);\n }\n finally {\n decoderModule._free(ptr);\n }\n };\n if (attributes) {\n for (const kind in attributes) {\n const id = attributes[kind];\n const attribute = decoder.GetAttributeByUniqueId(geometry, id);\n processAttribute(decoder, geometry, kind, attribute);\n }\n }\n else {\n const dracoAttributeTypes = {\n position: decoderModule.POSITION,\n normal: decoderModule.NORMAL,\n color: decoderModule.COLOR,\n uv: decoderModule.TEX_COORD,\n };\n for (const kind in dracoAttributeTypes) {\n const id = decoder.GetAttributeId(geometry, dracoAttributeTypes[kind]);\n if (id !== -1) {\n const attribute = decoder.GetAttribute(geometry, id);\n processAttribute(decoder, geometry, kind, attribute);\n }\n }\n }\n return numPoints;\n }\n finally {\n if (geometry) {\n decoderModule.destroy(geometry);\n }\n if (buffer) {\n decoderModule.destroy(buffer);\n }\n if (decoder) {\n decoderModule.destroy(decoder);\n }\n }\n}\n/**\n * The worker function that gets converted to a blob url to pass into a worker.\n */\nfunction worker() {\n let decoderPromise;\n onmessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"init\": {\n const decoder = message.decoder;\n if (decoder.url) {\n importScripts(decoder.url);\n decoderPromise = DracoDecoderModule({ wasmBinary: decoder.wasmBinary });\n }\n postMessage({ id: \"initDone\" });\n break;\n }\n case \"decodeMesh\": {\n if (!decoderPromise) {\n throw new Error(\"Draco decoder module is not available\");\n }\n decoderPromise.then((decoder) => {\n const numPoints = decodeMesh(decoder, message.dataView, message.attributes, (indices) => {\n postMessage({ id: \"indices\", data: indices }, [indices.buffer]);\n }, (kind, data, size, offset, stride, normalized) => {\n postMessage({ id: \"attribute\", kind, data, size, byteOffset: offset, byteStride: stride, normalized }, [data.buffer]);\n });\n postMessage({ id: \"decodeMeshDone\", totalVertices: numPoints });\n });\n break;\n }\n }\n };\n}\n/**\n * Draco compression (https://google.github.io/draco/)\n *\n * This class wraps the Draco module.\n *\n * **Encoder**\n *\n * The encoder is not currently implemented.\n *\n * **Decoder**\n *\n * By default, the configuration points to a copy of the Draco decoder files for glTF from the babylon.js preview cdn https://preview.babylonjs.com/draco_wasm_wrapper_gltf.js.\n *\n * To update the configuration, use the following code:\n * ```javascript\n * DracoCompression.Configuration = {\n * decoder: {\n * wasmUrl: \"\",\n * wasmBinaryUrl: \"\",\n * fallbackUrl: \"\",\n * }\n * };\n * ```\n *\n * Draco has two versions, one for WebAssembly and one for JavaScript. The decoder configuration can be set to only support WebAssembly or only support the JavaScript version.\n * Decoding will automatically fallback to the JavaScript version if WebAssembly version is not configured or if WebAssembly is not supported by the browser.\n * Use `DracoCompression.DecoderAvailable` to determine if the decoder configuration is available for the current context.\n *\n * To decode Draco compressed data, get the default DracoCompression object and call decodeMeshToGeometryAsync:\n * ```javascript\n * var geometry = await DracoCompression.Default.decodeMeshToGeometryAsync(data);\n * ```\n *\n * @see https://playground.babylonjs.com/#DMZIBD#0\n */\nexport class DracoCompression {\n /**\n * Returns true if the decoder configuration is available.\n */\n static get DecoderAvailable() {\n const decoder = DracoCompression.Configuration.decoder;\n return !!((decoder.wasmUrl && decoder.wasmBinaryUrl && typeof WebAssembly === \"object\") || decoder.fallbackUrl);\n }\n static GetDefaultNumWorkers() {\n if (typeof navigator !== \"object\" || !navigator.hardwareConcurrency) {\n return 1;\n }\n // Use 50% of the available logical processors but capped at 4.\n return Math.min(Math.floor(navigator.hardwareConcurrency * 0.5), 4);\n }\n /**\n * Default instance for the draco compression object.\n */\n static get Default() {\n if (!DracoCompression._Default) {\n DracoCompression._Default = new DracoCompression();\n }\n return DracoCompression._Default;\n }\n /**\n * Constructor\n * @param numWorkers The number of workers for async operations. Specify `0` to disable web workers and run synchronously in the current context.\n */\n constructor(numWorkers = DracoCompression.DefaultNumWorkers) {\n const decoder = DracoCompression.Configuration.decoder;\n const decoderInfo = decoder.wasmUrl && decoder.wasmBinaryUrl && typeof WebAssembly === \"object\"\n ? {\n url: Tools.GetBabylonScriptURL(decoder.wasmUrl, true),\n wasmBinaryPromise: Tools.LoadFileAsync(Tools.GetBabylonScriptURL(decoder.wasmBinaryUrl, true)),\n }\n : {\n url: Tools.GetBabylonScriptURL(decoder.fallbackUrl),\n wasmBinaryPromise: Promise.resolve(undefined),\n };\n if (numWorkers && typeof Worker === \"function\" && typeof URL === \"function\") {\n this._workerPoolPromise = decoderInfo.wasmBinaryPromise.then((decoderWasmBinary) => {\n const workerContent = `${decodeMesh}(${worker})()`;\n const workerBlobUrl = URL.createObjectURL(new Blob([workerContent], { type: \"application/javascript\" }));\n return new AutoReleaseWorkerPool(numWorkers, () => {\n return new Promise((resolve, reject) => {\n const worker = new Worker(workerBlobUrl);\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n };\n const onMessage = (event) => {\n if (event.data.id === \"initDone\") {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve(worker);\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n worker.postMessage({\n id: \"init\",\n decoder: {\n url: decoderInfo.url,\n wasmBinary: decoderWasmBinary,\n },\n });\n });\n });\n });\n }\n else {\n this._decoderModulePromise = decoderInfo.wasmBinaryPromise.then((decoderWasmBinary) => {\n if (!decoderInfo.url) {\n throw new Error(\"Draco decoder module is not available\");\n }\n return Tools.LoadBabylonScriptAsync(decoderInfo.url).then(() => {\n return createDecoderAsync(decoderWasmBinary);\n });\n });\n }\n }\n /**\n * Stop all async operations and release resources.\n */\n dispose() {\n if (this._workerPoolPromise) {\n this._workerPoolPromise.then((workerPool) => {\n workerPool.dispose();\n });\n }\n delete this._workerPoolPromise;\n delete this._decoderModulePromise;\n }\n /**\n * Returns a promise that resolves when ready. Call this manually to ensure draco compression is ready before use.\n * @returns a promise that resolves when ready\n */\n whenReadyAsync() {\n if (this._workerPoolPromise) {\n return this._workerPoolPromise.then(() => { });\n }\n if (this._decoderModulePromise) {\n return this._decoderModulePromise.then(() => { });\n }\n return Promise.resolve();\n }\n _decodeMeshAsync(data, attributes, gltfNormalizedOverride) {\n const dataView = data instanceof ArrayBuffer ? new Int8Array(data) : new Int8Array(data.buffer, data.byteOffset, data.byteLength);\n const applyGltfNormalizedOverride = (kind, normalized) => {\n if (gltfNormalizedOverride && gltfNormalizedOverride[kind] !== undefined) {\n if (normalized !== gltfNormalizedOverride[kind]) {\n Logger.Warn(`Normalized flag from Draco data (${normalized}) does not match normalized flag from glTF accessor (${gltfNormalizedOverride[kind]}). Using flag from glTF accessor.`);\n }\n return gltfNormalizedOverride[kind];\n }\n else {\n return normalized;\n }\n };\n if (this._workerPoolPromise) {\n return this._workerPoolPromise.then((workerPool) => {\n return new Promise((resolve, reject) => {\n workerPool.push((worker, onComplete) => {\n let resultIndices = null;\n const resultAttributes = [];\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n onComplete();\n };\n const onMessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"decodeMeshDone\": {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve({ indices: resultIndices, attributes: resultAttributes, totalVertices: message.totalVertices });\n onComplete();\n break;\n }\n case \"indices\": {\n resultIndices = message.data;\n break;\n }\n case \"attribute\": {\n resultAttributes.push({\n kind: message.kind,\n data: message.data,\n size: message.size,\n byteOffset: message.byteOffset,\n byteStride: message.byteStride,\n normalized: applyGltfNormalizedOverride(message.kind, message.normalized),\n });\n break;\n }\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n const dataViewCopy = dataView.slice();\n worker.postMessage({ id: \"decodeMesh\", dataView: dataViewCopy, attributes: attributes }, [dataViewCopy.buffer]);\n });\n });\n });\n }\n if (this._decoderModulePromise) {\n return this._decoderModulePromise.then((decoder) => {\n let resultIndices = null;\n const resultAttributes = [];\n const numPoints = decodeMesh(decoder.module, dataView, attributes, (indices) => {\n resultIndices = indices;\n }, (kind, data, size, byteOffset, byteStride, normalized) => {\n resultAttributes.push({\n kind,\n data,\n size,\n byteOffset,\n byteStride,\n normalized,\n });\n });\n return { indices: resultIndices, attributes: resultAttributes, totalVertices: numPoints };\n });\n }\n throw new Error(\"Draco decoder module is not available\");\n }\n /**\n * Decode Draco compressed mesh data to Babylon geometry.\n * @param name The name to use when creating the geometry\n * @param scene The scene to use when creating the geometry\n * @param data The ArrayBuffer or ArrayBufferView for the Draco compression data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @returns A promise that resolves with the decoded geometry\n */\n decodeMeshToGeometryAsync(name, scene, data, attributes) {\n return this._decodeMeshAsync(data, attributes).then((meshData) => {\n const geometry = new Geometry(name, scene);\n if (meshData.indices) {\n geometry.setIndices(meshData.indices);\n }\n for (const attribute of meshData.attributes) {\n geometry.setVerticesBuffer(new VertexBuffer(scene.getEngine(), attribute.data, attribute.kind, false, undefined, attribute.byteStride, undefined, attribute.byteOffset, attribute.size, undefined, attribute.normalized, true), meshData.totalVertices);\n }\n return geometry;\n });\n }\n /** @internal */\n _decodeMeshToGeometryForGltfAsync(name, scene, data, attributes, gltfNormalizedOverride) {\n return this._decodeMeshAsync(data, attributes, gltfNormalizedOverride).then((meshData) => {\n const geometry = new Geometry(name, scene);\n if (meshData.indices) {\n geometry.setIndices(meshData.indices);\n }\n for (const attribute of meshData.attributes) {\n geometry.setVerticesBuffer(new VertexBuffer(scene.getEngine(), attribute.data, attribute.kind, false, undefined, attribute.byteStride, undefined, attribute.byteOffset, attribute.size, undefined, attribute.normalized, true), meshData.totalVertices);\n }\n return geometry;\n });\n }\n /**\n * Decode Draco compressed mesh data to Babylon vertex data.\n * @param data The ArrayBuffer or ArrayBufferView for the Draco compression data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @returns A promise that resolves with the decoded vertex data\n * @deprecated Use {@link decodeMeshToGeometryAsync} for better performance in some cases\n */\n decodeMeshAsync(data, attributes) {\n return this._decodeMeshAsync(data, attributes).then((meshData) => {\n const vertexData = new VertexData();\n if (meshData.indices) {\n vertexData.indices = meshData.indices;\n }\n for (const attribute of meshData.attributes) {\n const floatData = VertexBuffer.GetFloatData(attribute.data, attribute.size, VertexBuffer.GetDataType(attribute.data), attribute.byteOffset, attribute.byteStride, attribute.normalized, meshData.totalVertices);\n vertexData.set(floatData, attribute.kind);\n }\n return vertexData;\n });\n }\n}\n/**\n * The configuration. Defaults to the following urls:\n * - wasmUrl: \"https://cdn.babylonjs.com/draco_wasm_wrapper_gltf.js\"\n * - wasmBinaryUrl: \"https://cdn.babylonjs.com/draco_decoder_gltf.wasm\"\n * - fallbackUrl: \"https://cdn.babylonjs.com/draco_decoder_gltf.js\"\n */\nDracoCompression.Configuration = {\n decoder: {\n wasmUrl: `${Tools._DefaultCdnUrl}/draco_wasm_wrapper_gltf.js`,\n wasmBinaryUrl: `${Tools._DefaultCdnUrl}/draco_decoder_gltf.wasm`,\n fallbackUrl: `${Tools._DefaultCdnUrl}/draco_decoder_gltf.js`,\n },\n};\n/**\n * Default number of workers to create when creating the draco compression object.\n */\nDracoCompression.DefaultNumWorkers = DracoCompression.GetDefaultNumWorkers();\nDracoCompression._Default = null;\n//# sourceMappingURL=dracoCompression.js.map","import { Matrix } from \"../Maths/math.vector.js\";\nimport { Material } from \"../Materials/material.js\";\n/**\n * Base class of materials working in push mode in babylon JS\n * @internal\n */\nexport class PushMaterial extends Material {\n constructor(name, scene, storeEffectOnSubMeshes = true) {\n super(name, scene);\n this._normalMatrix = new Matrix();\n this._storeEffectOnSubMeshes = storeEffectOnSubMeshes;\n }\n getEffect() {\n return this._storeEffectOnSubMeshes ? this._activeEffect : super.getEffect();\n }\n isReady(mesh, useInstances) {\n if (!mesh) {\n return false;\n }\n if (!this._storeEffectOnSubMeshes) {\n return true;\n }\n if (!mesh.subMeshes || mesh.subMeshes.length === 0) {\n return true;\n }\n return this.isReadyForSubMesh(mesh, mesh.subMeshes[0], useInstances);\n }\n _isReadyForSubMesh(subMesh) {\n const defines = subMesh.materialDefines;\n if (!this.checkReadyOnEveryCall && subMesh.effect && defines) {\n if (defines._renderId === this.getScene().getRenderId()) {\n return true;\n }\n }\n return false;\n }\n /**\n * Binds the given world matrix to the active effect\n *\n * @param world the matrix to bind\n */\n bindOnlyWorldMatrix(world) {\n this._activeEffect.setMatrix(\"world\", world);\n }\n /**\n * Binds the given normal matrix to the active effect\n *\n * @param normalMatrix the matrix to bind\n */\n bindOnlyNormalMatrix(normalMatrix) {\n this._activeEffect.setMatrix(\"normalMatrix\", normalMatrix);\n }\n bind(world, mesh) {\n if (!mesh) {\n return;\n }\n this.bindForSubMesh(world, mesh, mesh.subMeshes[0]);\n }\n _afterBind(mesh, effect = null) {\n super._afterBind(mesh, effect);\n this.getScene()._cachedEffect = effect;\n if (effect) {\n effect._forceRebindOnNextCall = false;\n }\n }\n _mustRebind(scene, effect, visibility = 1) {\n return scene.isCachedMaterialInvalid(this, effect, visibility);\n }\n dispose(forceDisposeEffect, forceDisposeTextures, notBoundToMesh) {\n this._activeEffect = undefined;\n super.dispose(forceDisposeEffect, forceDisposeTextures, notBoundToMesh);\n }\n}\n//# sourceMappingURL=pushMaterial.js.map","import { ArrayTools } from \"../Misc/arrayTools.js\";\nimport { Matrix, Vector3, TmpVectors } from \"../Maths/math.vector.js\";\nimport { PickingInfo } from \"../Collisions/pickingInfo.js\";\nimport { IntersectionInfo } from \"../Collisions/intersectionInfo.js\";\nimport { Scene } from \"../scene.js\";\nimport { Camera } from \"../Cameras/camera.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\n/**\n * Class representing a ray with position and direction\n */\nexport class Ray {\n /**\n * Creates a new ray\n * @param origin origin point\n * @param direction direction\n * @param length length of the ray\n */\n constructor(\n /** origin point */\n origin, \n /** direction */\n direction, \n /** length of the ray */\n length = Number.MAX_VALUE) {\n this.origin = origin;\n this.direction = direction;\n this.length = length;\n }\n // Methods\n /**\n * Clone the current ray\n * @returns a new ray\n */\n clone() {\n return new Ray(this.origin.clone(), this.direction.clone(), this.length);\n }\n /**\n * Checks if the ray intersects a box\n * This does not account for the ray length by design to improve perfs.\n * @param minimum bound of the box\n * @param maximum bound of the box\n * @param intersectionTreshold extra extend to be added to the box in all direction\n * @returns if the box was hit\n */\n intersectsBoxMinMax(minimum, maximum, intersectionTreshold = 0) {\n const newMinimum = Ray._TmpVector3[0].copyFromFloats(minimum.x - intersectionTreshold, minimum.y - intersectionTreshold, minimum.z - intersectionTreshold);\n const newMaximum = Ray._TmpVector3[1].copyFromFloats(maximum.x + intersectionTreshold, maximum.y + intersectionTreshold, maximum.z + intersectionTreshold);\n let d = 0.0;\n let maxValue = Number.MAX_VALUE;\n let inv;\n let min;\n let max;\n let temp;\n if (Math.abs(this.direction.x) < 0.0000001) {\n if (this.origin.x < newMinimum.x || this.origin.x > newMaximum.x) {\n return false;\n }\n }\n else {\n inv = 1.0 / this.direction.x;\n min = (newMinimum.x - this.origin.x) * inv;\n max = (newMaximum.x - this.origin.x) * inv;\n if (max === -Infinity) {\n max = Infinity;\n }\n if (min > max) {\n temp = min;\n min = max;\n max = temp;\n }\n d = Math.max(min, d);\n maxValue = Math.min(max, maxValue);\n if (d > maxValue) {\n return false;\n }\n }\n if (Math.abs(this.direction.y) < 0.0000001) {\n if (this.origin.y < newMinimum.y || this.origin.y > newMaximum.y) {\n return false;\n }\n }\n else {\n inv = 1.0 / this.direction.y;\n min = (newMinimum.y - this.origin.y) * inv;\n max = (newMaximum.y - this.origin.y) * inv;\n if (max === -Infinity) {\n max = Infinity;\n }\n if (min > max) {\n temp = min;\n min = max;\n max = temp;\n }\n d = Math.max(min, d);\n maxValue = Math.min(max, maxValue);\n if (d > maxValue) {\n return false;\n }\n }\n if (Math.abs(this.direction.z) < 0.0000001) {\n if (this.origin.z < newMinimum.z || this.origin.z > newMaximum.z) {\n return false;\n }\n }\n else {\n inv = 1.0 / this.direction.z;\n min = (newMinimum.z - this.origin.z) * inv;\n max = (newMaximum.z - this.origin.z) * inv;\n if (max === -Infinity) {\n max = Infinity;\n }\n if (min > max) {\n temp = min;\n min = max;\n max = temp;\n }\n d = Math.max(min, d);\n maxValue = Math.min(max, maxValue);\n if (d > maxValue) {\n return false;\n }\n }\n return true;\n }\n /**\n * Checks if the ray intersects a box\n * This does not account for the ray lenght by design to improve perfs.\n * @param box the bounding box to check\n * @param intersectionTreshold extra extend to be added to the BoundingBox in all direction\n * @returns if the box was hit\n */\n intersectsBox(box, intersectionTreshold = 0) {\n return this.intersectsBoxMinMax(box.minimum, box.maximum, intersectionTreshold);\n }\n /**\n * If the ray hits a sphere\n * @param sphere the bounding sphere to check\n * @param intersectionTreshold extra extend to be added to the BoundingSphere in all direction\n * @returns true if it hits the sphere\n */\n intersectsSphere(sphere, intersectionTreshold = 0) {\n const x = sphere.center.x - this.origin.x;\n const y = sphere.center.y - this.origin.y;\n const z = sphere.center.z - this.origin.z;\n const pyth = x * x + y * y + z * z;\n const radius = sphere.radius + intersectionTreshold;\n const rr = radius * radius;\n if (pyth <= rr) {\n return true;\n }\n const dot = x * this.direction.x + y * this.direction.y + z * this.direction.z;\n if (dot < 0.0) {\n return false;\n }\n const temp = pyth - dot * dot;\n return temp <= rr;\n }\n /**\n * If the ray hits a triange\n * @param vertex0 triangle vertex\n * @param vertex1 triangle vertex\n * @param vertex2 triangle vertex\n * @returns intersection information if hit\n */\n intersectsTriangle(vertex0, vertex1, vertex2) {\n const edge1 = Ray._TmpVector3[0];\n const edge2 = Ray._TmpVector3[1];\n const pvec = Ray._TmpVector3[2];\n const tvec = Ray._TmpVector3[3];\n const qvec = Ray._TmpVector3[4];\n vertex1.subtractToRef(vertex0, edge1);\n vertex2.subtractToRef(vertex0, edge2);\n Vector3.CrossToRef(this.direction, edge2, pvec);\n const det = Vector3.Dot(edge1, pvec);\n if (det === 0) {\n return null;\n }\n const invdet = 1 / det;\n this.origin.subtractToRef(vertex0, tvec);\n const bv = Vector3.Dot(tvec, pvec) * invdet;\n if (bv < 0 || bv > 1.0) {\n return null;\n }\n Vector3.CrossToRef(tvec, edge1, qvec);\n const bw = Vector3.Dot(this.direction, qvec) * invdet;\n if (bw < 0 || bv + bw > 1.0) {\n return null;\n }\n //check if the distance is longer than the predefined length.\n const distance = Vector3.Dot(edge2, qvec) * invdet;\n if (distance > this.length) {\n return null;\n }\n return new IntersectionInfo(1 - bv - bw, bv, distance);\n }\n /**\n * Checks if ray intersects a plane\n * @param plane the plane to check\n * @returns the distance away it was hit\n */\n intersectsPlane(plane) {\n let distance;\n const result1 = Vector3.Dot(plane.normal, this.direction);\n if (Math.abs(result1) < 9.99999997475243e-7) {\n return null;\n }\n else {\n const result2 = Vector3.Dot(plane.normal, this.origin);\n distance = (-plane.d - result2) / result1;\n if (distance < 0.0) {\n if (distance < -9.99999997475243e-7) {\n return null;\n }\n else {\n return 0;\n }\n }\n return distance;\n }\n }\n /**\n * Calculate the intercept of a ray on a given axis\n * @param axis to check 'x' | 'y' | 'z'\n * @param offset from axis interception (i.e. an offset of 1y is intercepted above ground)\n * @returns a vector containing the coordinates where 'axis' is equal to zero (else offset), or null if there is no intercept.\n */\n intersectsAxis(axis, offset = 0) {\n switch (axis) {\n case \"y\": {\n const t = (this.origin.y - offset) / this.direction.y;\n if (t > 0) {\n return null;\n }\n return new Vector3(this.origin.x + this.direction.x * -t, offset, this.origin.z + this.direction.z * -t);\n }\n case \"x\": {\n const t = (this.origin.x - offset) / this.direction.x;\n if (t > 0) {\n return null;\n }\n return new Vector3(offset, this.origin.y + this.direction.y * -t, this.origin.z + this.direction.z * -t);\n }\n case \"z\": {\n const t = (this.origin.z - offset) / this.direction.z;\n if (t > 0) {\n return null;\n }\n return new Vector3(this.origin.x + this.direction.x * -t, this.origin.y + this.direction.y * -t, offset);\n }\n default:\n return null;\n }\n }\n /**\n * Checks if ray intersects a mesh. The ray is defined in WORLD space. A mesh triangle can be picked both from its front and back sides,\n * irrespective of orientation.\n * @param mesh the mesh to check\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)\n * @param worldToUse defines the world matrix to use to get the world coordinate of the intersection point\n * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check\n * @returns picking info of the intersection\n */\n intersectsMesh(mesh, fastCheck, trianglePredicate, onlyBoundingInfo = false, worldToUse, skipBoundingInfo = false) {\n const tm = TmpVectors.Matrix[0];\n mesh.getWorldMatrix().invertToRef(tm);\n if (this._tmpRay) {\n Ray.TransformToRef(this, tm, this._tmpRay);\n }\n else {\n this._tmpRay = Ray.Transform(this, tm);\n }\n return mesh.intersects(this._tmpRay, fastCheck, trianglePredicate, onlyBoundingInfo, worldToUse, skipBoundingInfo);\n }\n /**\n * Checks if ray intersects a mesh\n * @param meshes the meshes to check\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param results array to store result in\n * @returns Array of picking infos\n */\n intersectsMeshes(meshes, fastCheck, results) {\n if (results) {\n results.length = 0;\n }\n else {\n results = [];\n }\n for (let i = 0; i < meshes.length; i++) {\n const pickInfo = this.intersectsMesh(meshes[i], fastCheck);\n if (pickInfo.hit) {\n results.push(pickInfo);\n }\n }\n results.sort(this._comparePickingInfo);\n return results;\n }\n _comparePickingInfo(pickingInfoA, pickingInfoB) {\n if (pickingInfoA.distance < pickingInfoB.distance) {\n return -1;\n }\n else if (pickingInfoA.distance > pickingInfoB.distance) {\n return 1;\n }\n else {\n return 0;\n }\n }\n /**\n * Intersection test between the ray and a given segment within a given tolerance (threshold)\n * @param sega the first point of the segment to test the intersection against\n * @param segb the second point of the segment to test the intersection against\n * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful\n * @returns the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection\n */\n intersectionSegment(sega, segb, threshold) {\n const o = this.origin;\n const u = TmpVectors.Vector3[0];\n const rsegb = TmpVectors.Vector3[1];\n const v = TmpVectors.Vector3[2];\n const w = TmpVectors.Vector3[3];\n segb.subtractToRef(sega, u);\n this.direction.scaleToRef(Ray._Rayl, v);\n o.addToRef(v, rsegb);\n sega.subtractToRef(o, w);\n const a = Vector3.Dot(u, u); // always >= 0\n const b = Vector3.Dot(u, v);\n const c = Vector3.Dot(v, v); // always >= 0\n const d = Vector3.Dot(u, w);\n const e = Vector3.Dot(v, w);\n const D = a * c - b * b; // always >= 0\n let sN, sD = D; // sc = sN / sD, default sD = D >= 0\n let tN, tD = D; // tc = tN / tD, default tD = D >= 0\n // compute the line parameters of the two closest points\n if (D < Ray._Smallnum) {\n // the lines are almost parallel\n sN = 0.0; // force using point P0 on segment S1\n sD = 1.0; // to prevent possible division by 0.0 later\n tN = e;\n tD = c;\n }\n else {\n // get the closest points on the infinite lines\n sN = b * e - c * d;\n tN = a * e - b * d;\n if (sN < 0.0) {\n // sc < 0 => the s=0 edge is visible\n sN = 0.0;\n tN = e;\n tD = c;\n }\n else if (sN > sD) {\n // sc > 1 => the s=1 edge is visible\n sN = sD;\n tN = e + b;\n tD = c;\n }\n }\n if (tN < 0.0) {\n // tc < 0 => the t=0 edge is visible\n tN = 0.0;\n // recompute sc for this edge\n if (-d < 0.0) {\n sN = 0.0;\n }\n else if (-d > a) {\n sN = sD;\n }\n else {\n sN = -d;\n sD = a;\n }\n }\n else if (tN > tD) {\n // tc > 1 => the t=1 edge is visible\n tN = tD;\n // recompute sc for this edge\n if (-d + b < 0.0) {\n sN = 0;\n }\n else if (-d + b > a) {\n sN = sD;\n }\n else {\n sN = -d + b;\n sD = a;\n }\n }\n // finally do the division to get sc and tc\n const sc = Math.abs(sN) < Ray._Smallnum ? 0.0 : sN / sD;\n const tc = Math.abs(tN) < Ray._Smallnum ? 0.0 : tN / tD;\n // get the difference of the two closest points\n const qtc = TmpVectors.Vector3[4];\n v.scaleToRef(tc, qtc);\n const qsc = TmpVectors.Vector3[5];\n u.scaleToRef(sc, qsc);\n qsc.addInPlace(w);\n const dP = TmpVectors.Vector3[6];\n qsc.subtractToRef(qtc, dP); // = S1(sc) - S2(tc)\n const isIntersected = tc > 0 && tc <= this.length && dP.lengthSquared() < threshold * threshold; // return intersection result\n if (isIntersected) {\n return qsc.length();\n }\n return -1;\n }\n /**\n * Update the ray from viewport position\n * @param x position\n * @param y y position\n * @param viewportWidth viewport width\n * @param viewportHeight viewport height\n * @param world world matrix\n * @param view view matrix\n * @param projection projection matrix\n * @param enableDistantPicking defines if picking should handle large values for mesh position/scaling (false by default)\n * @returns this ray updated\n */\n update(x, y, viewportWidth, viewportHeight, world, view, projection, enableDistantPicking = false) {\n if (enableDistantPicking) {\n // With world matrices having great values (like 8000000000 on 1 or more scaling or position axis),\n // multiplying view/projection/world and doing invert will result in loss of float precision in the matrix.\n // One way to fix it is to compute the ray with world at identity then transform the ray in object space.\n // This is slower (2 matrix inverts instead of 1) but precision is preserved.\n // This is hidden behind `EnableDistantPicking` flag (default is false)\n if (!Ray._RayDistant) {\n Ray._RayDistant = Ray.Zero();\n }\n Ray._RayDistant.unprojectRayToRef(x, y, viewportWidth, viewportHeight, Matrix.IdentityReadOnly, view, projection);\n const tm = TmpVectors.Matrix[0];\n world.invertToRef(tm);\n Ray.TransformToRef(Ray._RayDistant, tm, this);\n }\n else {\n this.unprojectRayToRef(x, y, viewportWidth, viewportHeight, world, view, projection);\n }\n return this;\n }\n // Statics\n /**\n * Creates a ray with origin and direction of 0,0,0\n * @returns the new ray\n */\n static Zero() {\n return new Ray(Vector3.Zero(), Vector3.Zero());\n }\n /**\n * Creates a new ray from screen space and viewport\n * @param x position\n * @param y y position\n * @param viewportWidth viewport width\n * @param viewportHeight viewport height\n * @param world world matrix\n * @param view view matrix\n * @param projection projection matrix\n * @returns new ray\n */\n static CreateNew(x, y, viewportWidth, viewportHeight, world, view, projection) {\n const result = Ray.Zero();\n return result.update(x, y, viewportWidth, viewportHeight, world, view, projection);\n }\n /**\n * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be\n * transformed to the given world matrix.\n * @param origin The origin point\n * @param end The end point\n * @param world a matrix to transform the ray to. Default is the identity matrix.\n * @returns the new ray\n */\n static CreateNewFromTo(origin, end, world = Matrix.IdentityReadOnly) {\n const direction = end.subtract(origin);\n const length = Math.sqrt(direction.x * direction.x + direction.y * direction.y + direction.z * direction.z);\n direction.normalize();\n return Ray.Transform(new Ray(origin, direction, length), world);\n }\n /**\n * Transforms a ray by a matrix\n * @param ray ray to transform\n * @param matrix matrix to apply\n * @returns the resulting new ray\n */\n static Transform(ray, matrix) {\n const result = new Ray(new Vector3(0, 0, 0), new Vector3(0, 0, 0));\n Ray.TransformToRef(ray, matrix, result);\n return result;\n }\n /**\n * Transforms a ray by a matrix\n * @param ray ray to transform\n * @param matrix matrix to apply\n * @param result ray to store result in\n */\n static TransformToRef(ray, matrix, result) {\n Vector3.TransformCoordinatesToRef(ray.origin, matrix, result.origin);\n Vector3.TransformNormalToRef(ray.direction, matrix, result.direction);\n result.length = ray.length;\n const dir = result.direction;\n const len = dir.length();\n if (!(len === 0 || len === 1)) {\n const num = 1.0 / len;\n dir.x *= num;\n dir.y *= num;\n dir.z *= num;\n result.length *= len;\n }\n }\n /**\n * Unproject a ray from screen space to object space\n * @param sourceX defines the screen space x coordinate to use\n * @param sourceY defines the screen space y coordinate to use\n * @param viewportWidth defines the current width of the viewport\n * @param viewportHeight defines the current height of the viewport\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\n * @param view defines the view matrix to use\n * @param projection defines the projection matrix to use\n */\n unprojectRayToRef(sourceX, sourceY, viewportWidth, viewportHeight, world, view, projection) {\n const matrix = TmpVectors.Matrix[0];\n world.multiplyToRef(view, matrix);\n matrix.multiplyToRef(projection, matrix);\n matrix.invert();\n const engine = EngineStore.LastCreatedEngine;\n const nearScreenSource = TmpVectors.Vector3[0];\n nearScreenSource.x = (sourceX / viewportWidth) * 2 - 1;\n nearScreenSource.y = -((sourceY / viewportHeight) * 2 - 1);\n nearScreenSource.z = (engine === null || engine === void 0 ? void 0 : engine.useReverseDepthBuffer) ? 1 : (engine === null || engine === void 0 ? void 0 : engine.isNDCHalfZRange) ? 0 : -1;\n // far Z need to be close but < to 1 or camera projection matrix with maxZ = 0 will NaN\n const farScreenSource = TmpVectors.Vector3[1].copyFromFloats(nearScreenSource.x, nearScreenSource.y, 1.0 - 1e-8);\n const nearVec3 = TmpVectors.Vector3[2];\n const farVec3 = TmpVectors.Vector3[3];\n Vector3._UnprojectFromInvertedMatrixToRef(nearScreenSource, matrix, nearVec3);\n Vector3._UnprojectFromInvertedMatrixToRef(farScreenSource, matrix, farVec3);\n this.origin.copyFrom(nearVec3);\n farVec3.subtractToRef(nearVec3, this.direction);\n this.direction.normalize();\n }\n}\nRay._TmpVector3 = ArrayTools.BuildArray(6, Vector3.Zero);\nRay._RayDistant = Ray.Zero();\nRay._Smallnum = 0.00000001;\nRay._Rayl = 10e8;\nScene.prototype.createPickingRay = function (x, y, world, camera, cameraViewSpace = false) {\n const result = Ray.Zero();\n this.createPickingRayToRef(x, y, world, result, camera, cameraViewSpace);\n return result;\n};\nScene.prototype.createPickingRayToRef = function (x, y, world, result, camera, cameraViewSpace = false, enableDistantPicking = false) {\n const engine = this.getEngine();\n if (!camera && !(camera = this.activeCamera)) {\n return this;\n }\n const cameraViewport = camera.viewport;\n const renderHeight = engine.getRenderHeight();\n const { x: vx, y: vy, width, height } = cameraViewport.toGlobal(engine.getRenderWidth(), renderHeight);\n // Moving coordinates to local viewport world\n const levelInv = 1 / engine.getHardwareScalingLevel();\n x = x * levelInv - vx;\n y = y * levelInv - (renderHeight - vy - height);\n result.update(x, y, width, height, world ? world : Matrix.IdentityReadOnly, cameraViewSpace ? Matrix.IdentityReadOnly : camera.getViewMatrix(), camera.getProjectionMatrix(), enableDistantPicking);\n return this;\n};\nScene.prototype.createPickingRayInCameraSpace = function (x, y, camera) {\n const result = Ray.Zero();\n this.createPickingRayInCameraSpaceToRef(x, y, result, camera);\n return result;\n};\nScene.prototype.createPickingRayInCameraSpaceToRef = function (x, y, result, camera) {\n if (!PickingInfo) {\n return this;\n }\n const engine = this.getEngine();\n if (!camera && !(camera = this.activeCamera)) {\n throw new Error(\"Active camera not set\");\n }\n const cameraViewport = camera.viewport;\n const renderHeight = engine.getRenderHeight();\n const { x: vx, y: vy, width, height } = cameraViewport.toGlobal(engine.getRenderWidth(), renderHeight);\n const identity = Matrix.Identity();\n // Moving coordinates to local viewport world\n const levelInv = 1 / engine.getHardwareScalingLevel();\n x = x * levelInv - vx;\n y = y * levelInv - (renderHeight - vy - height);\n result.update(x, y, width, height, identity, identity, camera.getProjectionMatrix());\n return this;\n};\nScene.prototype._internalPickForMesh = function (pickingInfo, rayFunction, mesh, world, fastCheck, onlyBoundingInfo, trianglePredicate, skipBoundingInfo) {\n const ray = rayFunction(world, mesh.enableDistantPicking);\n const result = mesh.intersects(ray, fastCheck, trianglePredicate, onlyBoundingInfo, world, skipBoundingInfo);\n if (!result || !result.hit) {\n return null;\n }\n if (!fastCheck && pickingInfo != null && result.distance >= pickingInfo.distance) {\n return null;\n }\n return result;\n};\nScene.prototype._internalPick = function (rayFunction, predicate, fastCheck, onlyBoundingInfo, trianglePredicate) {\n let pickingInfo = null;\n const computeWorldMatrixForCamera = !!(this.activeCameras && this.activeCameras.length > 1 && this.cameraToUseForPointers !== this.activeCamera);\n const currentCamera = this.cameraToUseForPointers || this.activeCamera;\n for (let meshIndex = 0; meshIndex < this.meshes.length; meshIndex++) {\n const mesh = this.meshes[meshIndex];\n if (predicate) {\n if (!predicate(mesh)) {\n continue;\n }\n }\n else if (!mesh.isEnabled() || !mesh.isVisible || !mesh.isPickable) {\n continue;\n }\n const forceCompute = computeWorldMatrixForCamera && mesh.isWorldMatrixCameraDependent();\n const world = mesh.computeWorldMatrix(forceCompute, currentCamera);\n if (mesh.hasThinInstances && mesh.thinInstanceEnablePicking) {\n // first check if the ray intersects the whole bounding box/sphere of the mesh\n const result = this._internalPickForMesh(pickingInfo, rayFunction, mesh, world, true, true, trianglePredicate);\n if (result) {\n if (onlyBoundingInfo) {\n // the user only asked for a bounding info check so we can return\n return result;\n }\n const tmpMatrix = TmpVectors.Matrix[1];\n const thinMatrices = mesh.thinInstanceGetWorldMatrices();\n for (let index = 0; index < thinMatrices.length; index++) {\n const thinMatrix = thinMatrices[index];\n thinMatrix.multiplyToRef(world, tmpMatrix);\n const result = this._internalPickForMesh(pickingInfo, rayFunction, mesh, tmpMatrix, fastCheck, onlyBoundingInfo, trianglePredicate, true);\n if (result) {\n pickingInfo = result;\n pickingInfo.thinInstanceIndex = index;\n if (fastCheck) {\n return pickingInfo;\n }\n }\n }\n }\n }\n else {\n const result = this._internalPickForMesh(pickingInfo, rayFunction, mesh, world, fastCheck, onlyBoundingInfo, trianglePredicate);\n if (result) {\n pickingInfo = result;\n if (fastCheck) {\n return pickingInfo;\n }\n }\n }\n }\n return pickingInfo || new PickingInfo();\n};\nScene.prototype._internalMultiPick = function (rayFunction, predicate, trianglePredicate) {\n if (!PickingInfo) {\n return null;\n }\n const pickingInfos = [];\n const computeWorldMatrixForCamera = !!(this.activeCameras && this.activeCameras.length > 1 && this.cameraToUseForPointers !== this.activeCamera);\n const currentCamera = this.cameraToUseForPointers || this.activeCamera;\n for (let meshIndex = 0; meshIndex < this.meshes.length; meshIndex++) {\n const mesh = this.meshes[meshIndex];\n if (predicate) {\n if (!predicate(mesh)) {\n continue;\n }\n }\n else if (!mesh.isEnabled() || !mesh.isVisible || !mesh.isPickable) {\n continue;\n }\n const forceCompute = computeWorldMatrixForCamera && mesh.isWorldMatrixCameraDependent();\n const world = mesh.computeWorldMatrix(forceCompute, currentCamera);\n if (mesh.hasThinInstances && mesh.thinInstanceEnablePicking) {\n const result = this._internalPickForMesh(null, rayFunction, mesh, world, true, true, trianglePredicate);\n if (result) {\n const tmpMatrix = TmpVectors.Matrix[1];\n const thinMatrices = mesh.thinInstanceGetWorldMatrices();\n for (let index = 0; index < thinMatrices.length; index++) {\n const thinMatrix = thinMatrices[index];\n thinMatrix.multiplyToRef(world, tmpMatrix);\n const result = this._internalPickForMesh(null, rayFunction, mesh, tmpMatrix, false, false, trianglePredicate, true);\n if (result) {\n result.thinInstanceIndex = index;\n pickingInfos.push(result);\n }\n }\n }\n }\n else {\n const result = this._internalPickForMesh(null, rayFunction, mesh, world, false, false, trianglePredicate);\n if (result) {\n pickingInfos.push(result);\n }\n }\n }\n return pickingInfos;\n};\nScene.prototype.pickWithBoundingInfo = function (x, y, predicate, fastCheck, camera) {\n if (!PickingInfo) {\n return null;\n }\n const result = this._internalPick((world) => {\n if (!this._tempPickingRay) {\n this._tempPickingRay = Ray.Zero();\n }\n this.createPickingRayToRef(x, y, world, this._tempPickingRay, camera || null);\n return this._tempPickingRay;\n }, predicate, fastCheck, true);\n if (result) {\n result.ray = this.createPickingRay(x, y, Matrix.Identity(), camera || null);\n }\n return result;\n};\nObject.defineProperty(Scene.prototype, \"_pickingAvailable\", {\n get: () => true,\n enumerable: false,\n configurable: false,\n});\nScene.prototype.pick = function (x, y, predicate, fastCheck, camera, trianglePredicate, _enableDistantPicking = false) {\n const result = this._internalPick((world, enableDistantPicking) => {\n if (!this._tempPickingRay) {\n this._tempPickingRay = Ray.Zero();\n }\n this.createPickingRayToRef(x, y, world, this._tempPickingRay, camera || null, false, enableDistantPicking);\n return this._tempPickingRay;\n }, predicate, fastCheck, false, trianglePredicate);\n if (result) {\n result.ray = this.createPickingRay(x, y, Matrix.Identity(), camera || null);\n }\n return result;\n};\nScene.prototype.pickWithRay = function (ray, predicate, fastCheck, trianglePredicate) {\n const result = this._internalPick((world) => {\n if (!this._pickWithRayInverseMatrix) {\n this._pickWithRayInverseMatrix = Matrix.Identity();\n }\n world.invertToRef(this._pickWithRayInverseMatrix);\n if (!this._cachedRayForTransform) {\n this._cachedRayForTransform = Ray.Zero();\n }\n Ray.TransformToRef(ray, this._pickWithRayInverseMatrix, this._cachedRayForTransform);\n return this._cachedRayForTransform;\n }, predicate, fastCheck, false, trianglePredicate);\n if (result) {\n result.ray = ray;\n }\n return result;\n};\nScene.prototype.multiPick = function (x, y, predicate, camera, trianglePredicate) {\n return this._internalMultiPick((world) => this.createPickingRay(x, y, world, camera || null), predicate, trianglePredicate);\n};\nScene.prototype.multiPickWithRay = function (ray, predicate, trianglePredicate) {\n return this._internalMultiPick((world) => {\n if (!this._pickWithRayInverseMatrix) {\n this._pickWithRayInverseMatrix = Matrix.Identity();\n }\n world.invertToRef(this._pickWithRayInverseMatrix);\n if (!this._cachedRayForTransform) {\n this._cachedRayForTransform = Ray.Zero();\n }\n Ray.TransformToRef(ray, this._pickWithRayInverseMatrix, this._cachedRayForTransform);\n return this._cachedRayForTransform;\n }, predicate, trianglePredicate);\n};\nCamera.prototype.getForwardRay = function (length = 100, transform, origin) {\n return this.getForwardRayToRef(new Ray(Vector3.Zero(), Vector3.Zero(), length), length, transform, origin);\n};\nCamera.prototype.getForwardRayToRef = function (refRay, length = 100, transform, origin) {\n if (!transform) {\n transform = this.getWorldMatrix();\n }\n refRay.length = length;\n if (origin) {\n refRay.origin.copyFrom(origin);\n }\n else {\n refRay.origin.copyFrom(this.position);\n }\n const forward = TmpVectors.Vector3[2];\n forward.set(0, 0, this._scene.useRightHandedSystem ? -1 : 1);\n const worldForward = TmpVectors.Vector3[3];\n Vector3.TransformNormalToRef(forward, transform, worldForward);\n Vector3.NormalizeToRef(worldForward, refRay.direction);\n return refRay;\n};\n//# sourceMappingURL=ray.js.map","import { Engine } from \"../Engines/engine.js\";\n\n/**\n * This groups all the flags used to control the materials channel.\n */\nexport class MaterialFlags {\n /**\n * Are diffuse textures enabled in the application.\n */\n static get DiffuseTextureEnabled() {\n return this._DiffuseTextureEnabled;\n }\n static set DiffuseTextureEnabled(value) {\n if (this._DiffuseTextureEnabled === value) {\n return;\n }\n this._DiffuseTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are detail textures enabled in the application.\n */\n static get DetailTextureEnabled() {\n return this._DetailTextureEnabled;\n }\n static set DetailTextureEnabled(value) {\n if (this._DetailTextureEnabled === value) {\n return;\n }\n this._DetailTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are decal maps enabled in the application.\n */\n static get DecalMapEnabled() {\n return this._DecalMapEnabled;\n }\n static set DecalMapEnabled(value) {\n if (this._DecalMapEnabled === value) {\n return;\n }\n this._DecalMapEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are ambient textures enabled in the application.\n */\n static get AmbientTextureEnabled() {\n return this._AmbientTextureEnabled;\n }\n static set AmbientTextureEnabled(value) {\n if (this._AmbientTextureEnabled === value) {\n return;\n }\n this._AmbientTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are opacity textures enabled in the application.\n */\n static get OpacityTextureEnabled() {\n return this._OpacityTextureEnabled;\n }\n static set OpacityTextureEnabled(value) {\n if (this._OpacityTextureEnabled === value) {\n return;\n }\n this._OpacityTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are reflection textures enabled in the application.\n */\n static get ReflectionTextureEnabled() {\n return this._ReflectionTextureEnabled;\n }\n static set ReflectionTextureEnabled(value) {\n if (this._ReflectionTextureEnabled === value) {\n return;\n }\n this._ReflectionTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are emissive textures enabled in the application.\n */\n static get EmissiveTextureEnabled() {\n return this._EmissiveTextureEnabled;\n }\n static set EmissiveTextureEnabled(value) {\n if (this._EmissiveTextureEnabled === value) {\n return;\n }\n this._EmissiveTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are specular textures enabled in the application.\n */\n static get SpecularTextureEnabled() {\n return this._SpecularTextureEnabled;\n }\n static set SpecularTextureEnabled(value) {\n if (this._SpecularTextureEnabled === value) {\n return;\n }\n this._SpecularTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are bump textures enabled in the application.\n */\n static get BumpTextureEnabled() {\n return this._BumpTextureEnabled;\n }\n static set BumpTextureEnabled(value) {\n if (this._BumpTextureEnabled === value) {\n return;\n }\n this._BumpTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are lightmap textures enabled in the application.\n */\n static get LightmapTextureEnabled() {\n return this._LightmapTextureEnabled;\n }\n static set LightmapTextureEnabled(value) {\n if (this._LightmapTextureEnabled === value) {\n return;\n }\n this._LightmapTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are refraction textures enabled in the application.\n */\n static get RefractionTextureEnabled() {\n return this._RefractionTextureEnabled;\n }\n static set RefractionTextureEnabled(value) {\n if (this._RefractionTextureEnabled === value) {\n return;\n }\n this._RefractionTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are color grading textures enabled in the application.\n */\n static get ColorGradingTextureEnabled() {\n return this._ColorGradingTextureEnabled;\n }\n static set ColorGradingTextureEnabled(value) {\n if (this._ColorGradingTextureEnabled === value) {\n return;\n }\n this._ColorGradingTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are fresnels enabled in the application.\n */\n static get FresnelEnabled() {\n return this._FresnelEnabled;\n }\n static set FresnelEnabled(value) {\n if (this._FresnelEnabled === value) {\n return;\n }\n this._FresnelEnabled = value;\n Engine.MarkAllMaterialsAsDirty(4);\n }\n /**\n * Are clear coat textures enabled in the application.\n */\n static get ClearCoatTextureEnabled() {\n return this._ClearCoatTextureEnabled;\n }\n static set ClearCoatTextureEnabled(value) {\n if (this._ClearCoatTextureEnabled === value) {\n return;\n }\n this._ClearCoatTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are clear coat bump textures enabled in the application.\n */\n static get ClearCoatBumpTextureEnabled() {\n return this._ClearCoatBumpTextureEnabled;\n }\n static set ClearCoatBumpTextureEnabled(value) {\n if (this._ClearCoatBumpTextureEnabled === value) {\n return;\n }\n this._ClearCoatBumpTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are clear coat tint textures enabled in the application.\n */\n static get ClearCoatTintTextureEnabled() {\n return this._ClearCoatTintTextureEnabled;\n }\n static set ClearCoatTintTextureEnabled(value) {\n if (this._ClearCoatTintTextureEnabled === value) {\n return;\n }\n this._ClearCoatTintTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are sheen textures enabled in the application.\n */\n static get SheenTextureEnabled() {\n return this._SheenTextureEnabled;\n }\n static set SheenTextureEnabled(value) {\n if (this._SheenTextureEnabled === value) {\n return;\n }\n this._SheenTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are anisotropic textures enabled in the application.\n */\n static get AnisotropicTextureEnabled() {\n return this._AnisotropicTextureEnabled;\n }\n static set AnisotropicTextureEnabled(value) {\n if (this._AnisotropicTextureEnabled === value) {\n return;\n }\n this._AnisotropicTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are thickness textures enabled in the application.\n */\n static get ThicknessTextureEnabled() {\n return this._ThicknessTextureEnabled;\n }\n static set ThicknessTextureEnabled(value) {\n if (this._ThicknessTextureEnabled === value) {\n return;\n }\n this._ThicknessTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are refraction intensity textures enabled in the application.\n */\n static get RefractionIntensityTextureEnabled() {\n return this._ThicknessTextureEnabled;\n }\n static set RefractionIntensityTextureEnabled(value) {\n if (this._RefractionIntensityTextureEnabled === value) {\n return;\n }\n this._RefractionIntensityTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are translucency intensity textures enabled in the application.\n */\n static get TranslucencyIntensityTextureEnabled() {\n return this._ThicknessTextureEnabled;\n }\n static set TranslucencyIntensityTextureEnabled(value) {\n if (this._TranslucencyIntensityTextureEnabled === value) {\n return;\n }\n this._TranslucencyIntensityTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n /**\n * Are translucency intensity textures enabled in the application.\n */\n static get IridescenceTextureEnabled() {\n return this._IridescenceTextureEnabled;\n }\n static set IridescenceTextureEnabled(value) {\n if (this._IridescenceTextureEnabled === value) {\n return;\n }\n this._IridescenceTextureEnabled = value;\n Engine.MarkAllMaterialsAsDirty(1);\n }\n}\n// Flags used to enable or disable a type of texture for all Standard Materials\nMaterialFlags._DiffuseTextureEnabled = true;\nMaterialFlags._DetailTextureEnabled = true;\nMaterialFlags._DecalMapEnabled = true;\nMaterialFlags._AmbientTextureEnabled = true;\nMaterialFlags._OpacityTextureEnabled = true;\nMaterialFlags._ReflectionTextureEnabled = true;\nMaterialFlags._EmissiveTextureEnabled = true;\nMaterialFlags._SpecularTextureEnabled = true;\nMaterialFlags._BumpTextureEnabled = true;\nMaterialFlags._LightmapTextureEnabled = true;\nMaterialFlags._RefractionTextureEnabled = true;\nMaterialFlags._ColorGradingTextureEnabled = true;\nMaterialFlags._FresnelEnabled = true;\nMaterialFlags._ClearCoatTextureEnabled = true;\nMaterialFlags._ClearCoatBumpTextureEnabled = true;\nMaterialFlags._ClearCoatTintTextureEnabled = true;\nMaterialFlags._SheenTextureEnabled = true;\nMaterialFlags._AnisotropicTextureEnabled = true;\nMaterialFlags._ThicknessTextureEnabled = true;\nMaterialFlags._RefractionIntensityTextureEnabled = true;\nMaterialFlags._TranslucencyIntensityTextureEnabled = true;\nMaterialFlags._IridescenceTextureEnabled = true;\n//# sourceMappingURL=materialFlags.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"lightFragmentDeclaration\";\nconst shader = `#ifdef LIGHT{X}\nuniform vec4 vLightData{X};uniform vec4 vLightDiffuse{X};\n#ifdef SPECULARTERM\nuniform vec4 vLightSpecular{X};\n#else\nvec4 vLightSpecular{X}=vec4(0.);\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];uniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}];uniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}];uniform float cascadeBlendFactor{X};varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};uniform highp sampler2DArray depthSampler{X};uniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}];uniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}];uniform float penumbraDarkness{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};\n#else\nuniform highp sampler2DArray shadowSampler{X};\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nconst vec3 vCascadeColorsMultiplier{X}[8]=vec3[8]\n(\nvec3 ( 1.5,0.0,0.0 ),\nvec3 ( 0.0,1.5,0.0 ),\nvec3 ( 0.0,0.0,5.5 ),\nvec3 ( 1.5,0.0,5.5 ),\nvec3 ( 1.5,1.5,0.0 ),\nvec3 ( 1.0,1.0,1.0 ),\nvec3 ( 0.0,1.0,5.5 ),\nvec3 ( 0.5,3.5,0.75 )\n);vec3 shadowDebug{X};\n#endif\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nint index{X}=-1;\n#else\nint index{X}=SHADOWCSMNUM_CASCADES{X}-1;\n#endif\nfloat diff{X}=0.;\n#elif defined(SHADOWCUBE{X})\nuniform samplerCube shadowSampler{X};\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DShadow shadowSampler{X};uniform highp sampler2D depthSampler{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DShadow shadowSampler{X};\n#else\nuniform sampler2D shadowSampler{X};\n#endif\nuniform mat4 lightMatrix{X};\n#endif\nuniform vec4 shadowsInfo{X};uniform vec2 depthValues{X};\n#endif\n#ifdef SPOTLIGHT{X}\nuniform vec4 vLightDirection{X};uniform vec4 vLightFalloff{X};\n#elif defined(POINTLIGHT{X})\nuniform vec4 vLightFalloff{X};\n#elif defined(HEMILIGHT{X})\nuniform vec3 vLightGround{X};\n#endif\n#ifdef PROJECTEDLIGHTTEXTURE{X}\nuniform mat4 textureProjectionMatrix{X};uniform sampler2D projectionLightSampler{X};\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const lightFragmentDeclaration = { name, shader };\n//# sourceMappingURL=lightFragmentDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"lightUboDeclaration\";\nconst shader = `#ifdef LIGHT{X}\nuniform Light{X}\n{vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular;\n#ifdef SPOTLIGHT{X}\nvec4 vLightDirection;vec4 vLightFalloff;\n#elif defined(POINTLIGHT{X})\nvec4 vLightFalloff;\n#elif defined(HEMILIGHT{X})\nvec3 vLightGround;\n#endif\nvec4 shadowsInfo;vec2 depthValues;} light{X};\n#ifdef PROJECTEDLIGHTTEXTURE{X}\nuniform mat4 textureProjectionMatrix{X};uniform sampler2D projectionLightSampler{X};\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];uniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}];uniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}];uniform float cascadeBlendFactor{X};varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};uniform highp sampler2DArray depthSampler{X};uniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}];uniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}];uniform float penumbraDarkness{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};\n#else\nuniform highp sampler2DArray shadowSampler{X};\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nconst vec3 vCascadeColorsMultiplier{X}[8]=vec3[8]\n(\nvec3 ( 1.5,0.0,0.0 ),\nvec3 ( 0.0,1.5,0.0 ),\nvec3 ( 0.0,0.0,5.5 ),\nvec3 ( 1.5,0.0,5.5 ),\nvec3 ( 1.5,1.5,0.0 ),\nvec3 ( 1.0,1.0,1.0 ),\nvec3 ( 0.0,1.0,5.5 ),\nvec3 ( 0.5,3.5,0.75 )\n);vec3 shadowDebug{X};\n#endif\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nint index{X}=-1;\n#else\nint index{X}=SHADOWCSMNUM_CASCADES{X}-1;\n#endif\nfloat diff{X}=0.;\n#elif defined(SHADOWCUBE{X})\nuniform samplerCube shadowSampler{X}; \n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DShadow shadowSampler{X};uniform highp sampler2D depthSampler{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DShadow shadowSampler{X};\n#else\nuniform sampler2D shadowSampler{X};\n#endif\nuniform mat4 lightMatrix{X};\n#endif\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const lightUboDeclaration = { name, shader };\n//# sourceMappingURL=lightUboDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"lightsFragmentFunctions\";\nconst shader = `struct lightingInfo\n{vec3 diffuse;\n#ifdef SPECULARTERM\nvec3 specular;\n#endif\n#ifdef NDOTL\nfloat ndl;\n#endif\n};lightingInfo computeLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) {lightingInfo result;vec3 lightVectorW;float attenuation=1.0;if (lightData.w==0.)\n{vec3 direction=lightData.xyz-vPositionW;attenuation=max(0.,1.0-length(direction)/range);lightVectorW=normalize(direction);}\nelse\n{lightVectorW=normalize(-lightData.xyz);}\nfloat ndl=max(0.,dot(vNormal,lightVectorW));\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=ndl*diffuseColor*attenuation;\n#ifdef SPECULARTERM\nvec3 angleW=normalize(viewDirectionW+lightVectorW);float specComp=max(0.,dot(vNormal,angleW));specComp=pow(specComp,max(1.,glossiness));result.specular=specComp*specularColor*attenuation;\n#endif\nreturn result;}\nlightingInfo computeSpotLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec4 lightDirection,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) {lightingInfo result;vec3 direction=lightData.xyz-vPositionW;vec3 lightVectorW=normalize(direction);float attenuation=max(0.,1.0-length(direction)/range);float cosAngle=max(0.,dot(lightDirection.xyz,-lightVectorW));if (cosAngle>=lightDirection.w)\n{cosAngle=max(0.,pow(cosAngle,lightData.w));attenuation*=cosAngle;float ndl=max(0.,dot(vNormal,lightVectorW));\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=ndl*diffuseColor*attenuation;\n#ifdef SPECULARTERM\nvec3 angleW=normalize(viewDirectionW+lightVectorW);float specComp=max(0.,dot(vNormal,angleW));specComp=pow(specComp,max(1.,glossiness));result.specular=specComp*specularColor*attenuation;\n#endif\nreturn result;}\nresult.diffuse=vec3(0.);\n#ifdef SPECULARTERM\nresult.specular=vec3(0.);\n#endif\n#ifdef NDOTL\nresult.ndl=0.;\n#endif\nreturn result;}\nlightingInfo computeHemisphericLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,vec3 groundColor,float glossiness) {lightingInfo result;float ndl=dot(vNormal,lightData.xyz)*0.5+0.5;\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=mix(groundColor,diffuseColor,ndl);\n#ifdef SPECULARTERM\nvec3 angleW=normalize(viewDirectionW+lightData.xyz);float specComp=max(0.,dot(vNormal,angleW));specComp=pow(specComp,max(1.,glossiness));result.specular=specComp*specularColor;\n#endif\nreturn result;}\n#define inline\nvec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){vec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0);strq/=strq.w;vec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb;return textureColor;}`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const lightsFragmentFunctions = { name, shader };\n//# sourceMappingURL=lightsFragmentFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"shadowsFragmentFunctions\";\nconst shader = `#ifdef SHADOWS\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\n#define TEXTUREFUNC(s,c,l) texture2DLodEXT(s,c,l)\n#else\n#define TEXTUREFUNC(s,c,b) texture2D(s,c,b)\n#endif\n#ifndef SHADOWFLOAT\nfloat unpack(vec4 color)\n{const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(color,bit_shift);}\n#endif\nfloat computeFallOff(float value,vec2 clipSpace,float frustumEdgeFalloff)\n{float mask=smoothstep(1.0-frustumEdgeFalloff,1.00000012,clamp(dot(clipSpace,clipSpace),0.,1.));return mix(value,1.0,mask);}\n#define inline\nfloat computeShadowCube(vec3 worldPos,vec3 lightPosition,samplerCube shadowSampler,float darkness,vec2 depthValues)\n{vec3 directionToLight=worldPos-lightPosition;float depth=length(directionToLight);depth=(depth+depthValues.x)/(depthValues.y);depth=clamp(depth,0.,1.0);directionToLight=normalize(directionToLight);directionToLight.y=-directionToLight.y;\n#ifndef SHADOWFLOAT\nfloat shadow=unpack(textureCube(shadowSampler,directionToLight));\n#else\nfloat shadow=textureCube(shadowSampler,directionToLight).x;\n#endif\nreturn depth>shadow ? darkness : 1.0;}\n#define inline\nfloat computeShadowWithPoissonSamplingCube(vec3 worldPos,vec3 lightPosition,samplerCube shadowSampler,float mapSize,float darkness,vec2 depthValues)\n{vec3 directionToLight=worldPos-lightPosition;float depth=length(directionToLight);depth=(depth+depthValues.x)/(depthValues.y);depth=clamp(depth,0.,1.0);directionToLight=normalize(directionToLight);directionToLight.y=-directionToLight.y;float visibility=1.;vec3 poissonDisk[4];poissonDisk[0]=vec3(-1.0,1.0,-1.0);poissonDisk[1]=vec3(1.0,-1.0,-1.0);poissonDisk[2]=vec3(-1.0,-1.0,-1.0);poissonDisk[3]=vec3(1.0,-1.0,1.0);\n#ifndef SHADOWFLOAT\nif (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[0]*mapSize))shadow ? computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff) : 1.;}\n#endif\n#define inline\nfloat computeShadow(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec2 uv=0.5*clipSpace.xy+vec2(0.5);if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{float shadowPixelDepth=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nfloat shadow=unpack(TEXTUREFUNC(shadowSampler,uv,0.));\n#else\nfloat shadow=TEXTUREFUNC(shadowSampler,uv,0.).x;\n#endif\nreturn shadowPixelDepth>shadow ? computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff) : 1.;}}\n#define inline\nfloat computeShadowWithPoissonSampling(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float mapSize,float darkness,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec2 uv=0.5*clipSpace.xy+vec2(0.5);if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{float shadowPixelDepth=clamp(depthMetric,0.,1.0);float visibility=1.;vec2 poissonDisk[4];poissonDisk[0]=vec2(-0.94201624,-0.39906216);poissonDisk[1]=vec2(0.94558609,-0.76890725);poissonDisk[2]=vec2(-0.094184101,-0.92938870);poissonDisk[3]=vec2(0.34495938,0.29387760);\n#ifndef SHADOWFLOAT\nif (unpack(TEXTUREFUNC(shadowSampler,uv+poissonDisk[0]*mapSize,0.))1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{float shadowPixelDepth=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(TEXTUREFUNC(shadowSampler,uv,0.));\n#else\nfloat shadowMapSample=TEXTUREFUNC(shadowSampler,uv,0.).x;\n#endif\nfloat esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness);return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);}}\n#define inline\nfloat computeShadowWithCloseESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec2 uv=0.5*clipSpace.xy+vec2(0.5);if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{float shadowPixelDepth=clamp(depthMetric,0.,1.0); \n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(TEXTUREFUNC(shadowSampler,uv,0.));\n#else\nfloat shadowMapSample=TEXTUREFUNC(shadowSampler,uv,0.).x;\n#endif\nfloat esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.);return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);}}\n#ifdef IS_NDC_HALF_ZRANGE\n#define ZINCLIP clipSpace.z\n#else\n#define ZINCLIP uvDepth.z\n#endif\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\n#define GREATEST_LESS_THAN_ONE 0.99999994\n/* disable_uniformity_analysis */\n#define inline\nfloat computeShadowWithCSMPCF1(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,float darkness,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=clamp(ZINCLIP,0.,GREATEST_LESS_THAN_ONE);vec4 uvDepthLayer=vec4(uvDepth.x,uvDepth.y,layer,uvDepth.z);float shadow=texture2D(shadowSampler,uvDepthLayer);shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}\n#define inline\nfloat computeShadowWithCSMPCF3(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=clamp(ZINCLIP,0.,GREATEST_LESS_THAN_ONE);vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvec2 st=fract(uv); \nvec2 base_uv=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvec2 uvw0=3.-2.*st;vec2 uvw1=1.+2.*st;vec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y;vec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y;float shadow=0.;shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[0]),layer,uvDepth.z));shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[0]),layer,uvDepth.z));shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[1]),layer,uvDepth.z));shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[1]),layer,uvDepth.z));shadow=shadow/16.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}\n#define inline\nfloat computeShadowWithCSMPCF5(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=clamp(ZINCLIP,0.,GREATEST_LESS_THAN_ONE);vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvec2 st=fract(uv); \nvec2 base_uv=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvec2 uvw0=4.-3.*st;vec2 uvw1=vec2(7.);vec2 uvw2=1.+3.*st;vec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y;vec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y;float shadow=0.;shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[0]),layer,uvDepth.z));shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[0]),layer,uvDepth.z));shadow+=uvw2.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[0]),layer,uvDepth.z));shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[1]),layer,uvDepth.z));shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[1]),layer,uvDepth.z));shadow+=uvw2.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[1]),layer,uvDepth.z));shadow+=uvw0.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[2]),layer,uvDepth.z));shadow+=uvw1.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[2]),layer,uvDepth.z));shadow+=uvw2.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[2]),layer,uvDepth.z));shadow=shadow/144.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}\n#define inline\nfloat computeShadowWithPCF1(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,float darkness,float frustumEdgeFalloff)\n{if (depthMetric>1.0 || depthMetric<0.0) {return 1.0;}\nelse\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=ZINCLIP;float shadow=TEXTUREFUNC(shadowSampler,uvDepth,0.);shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}}\n#define inline\nfloat computeShadowWithPCF3(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{if (depthMetric>1.0 || depthMetric<0.0) {return 1.0;}\nelse\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=ZINCLIP;vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvec2 st=fract(uv); \nvec2 base_uv=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvec2 uvw0=3.-2.*st;vec2 uvw1=1.+2.*st;vec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y;vec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y;float shadow=0.;shadow+=uvw0.x*uvw0.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z),0.);shadow+=uvw1.x*uvw0.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z),0.);shadow+=uvw0.x*uvw1.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z),0.);shadow+=uvw1.x*uvw1.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z),0.);shadow=shadow/16.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}}\n#define inline\nfloat computeShadowWithPCF5(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{if (depthMetric>1.0 || depthMetric<0.0) {return 1.0;}\nelse\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=ZINCLIP;vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvec2 st=fract(uv); \nvec2 base_uv=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvec2 uvw0=4.-3.*st;vec2 uvw1=vec2(7.);vec2 uvw2=1.+3.*st;vec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y;vec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y;float shadow=0.;shadow+=uvw0.x*uvw0.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z),0.);shadow+=uvw1.x*uvw0.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z),0.);shadow+=uvw2.x*uvw0.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[0]),uvDepth.z),0.);shadow+=uvw0.x*uvw1.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z),0.);shadow+=uvw1.x*uvw1.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z),0.);shadow+=uvw2.x*uvw1.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[1]),uvDepth.z),0.);shadow+=uvw0.x*uvw2.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[2]),uvDepth.z),0.);shadow+=uvw1.x*uvw2.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[2]),uvDepth.z),0.);shadow+=uvw2.x*uvw2.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[2]),uvDepth.z),0.);shadow=shadow/144.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}}\nconst vec3 PoissonSamplers32[64]=vec3[64](\nvec3(0.06407013,0.05409927,0.),\nvec3(0.7366577,0.5789394,0.),\nvec3(-0.6270542,-0.5320278,0.),\nvec3(-0.4096107,0.8411095,0.),\nvec3(0.6849564,-0.4990818,0.),\nvec3(-0.874181,-0.04579735,0.),\nvec3(0.9989998,0.0009880066,0.),\nvec3(-0.004920578,-0.9151649,0.),\nvec3(0.1805763,0.9747483,0.),\nvec3(-0.2138451,0.2635818,0.),\nvec3(0.109845,0.3884785,0.),\nvec3(0.06876755,-0.3581074,0.),\nvec3(0.374073,-0.7661266,0.),\nvec3(0.3079132,-0.1216763,0.),\nvec3(-0.3794335,-0.8271583,0.),\nvec3(-0.203878,-0.07715034,0.),\nvec3(0.5912697,0.1469799,0.),\nvec3(-0.88069,0.3031784,0.),\nvec3(0.5040108,0.8283722,0.),\nvec3(-0.5844124,0.5494877,0.),\nvec3(0.6017799,-0.1726654,0.),\nvec3(-0.5554981,0.1559997,0.),\nvec3(-0.3016369,-0.3900928,0.),\nvec3(-0.5550632,-0.1723762,0.),\nvec3(0.925029,0.2995041,0.),\nvec3(-0.2473137,0.5538505,0.),\nvec3(0.9183037,-0.2862392,0.),\nvec3(0.2469421,0.6718712,0.),\nvec3(0.3916397,-0.4328209,0.),\nvec3(-0.03576927,-0.6220032,0.),\nvec3(-0.04661255,0.7995201,0.),\nvec3(0.4402924,0.3640312,0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.)\n);const vec3 PoissonSamplers64[64]=vec3[64](\nvec3(-0.613392,0.617481,0.),\nvec3(0.170019,-0.040254,0.),\nvec3(-0.299417,0.791925,0.),\nvec3(0.645680,0.493210,0.),\nvec3(-0.651784,0.717887,0.),\nvec3(0.421003,0.027070,0.),\nvec3(-0.817194,-0.271096,0.),\nvec3(-0.705374,-0.668203,0.),\nvec3(0.977050,-0.108615,0.),\nvec3(0.063326,0.142369,0.),\nvec3(0.203528,0.214331,0.),\nvec3(-0.667531,0.326090,0.),\nvec3(-0.098422,-0.295755,0.),\nvec3(-0.885922,0.215369,0.),\nvec3(0.566637,0.605213,0.),\nvec3(0.039766,-0.396100,0.),\nvec3(0.751946,0.453352,0.),\nvec3(0.078707,-0.715323,0.),\nvec3(-0.075838,-0.529344,0.),\nvec3(0.724479,-0.580798,0.),\nvec3(0.222999,-0.215125,0.),\nvec3(-0.467574,-0.405438,0.),\nvec3(-0.248268,-0.814753,0.),\nvec3(0.354411,-0.887570,0.),\nvec3(0.175817,0.382366,0.),\nvec3(0.487472,-0.063082,0.),\nvec3(-0.084078,0.898312,0.),\nvec3(0.488876,-0.783441,0.),\nvec3(0.470016,0.217933,0.),\nvec3(-0.696890,-0.549791,0.),\nvec3(-0.149693,0.605762,0.),\nvec3(0.034211,0.979980,0.),\nvec3(0.503098,-0.308878,0.),\nvec3(-0.016205,-0.872921,0.),\nvec3(0.385784,-0.393902,0.),\nvec3(-0.146886,-0.859249,0.),\nvec3(0.643361,0.164098,0.),\nvec3(0.634388,-0.049471,0.),\nvec3(-0.688894,0.007843,0.),\nvec3(0.464034,-0.188818,0.),\nvec3(-0.440840,0.137486,0.),\nvec3(0.364483,0.511704,0.),\nvec3(0.034028,0.325968,0.),\nvec3(0.099094,-0.308023,0.),\nvec3(0.693960,-0.366253,0.),\nvec3(0.678884,-0.204688,0.),\nvec3(0.001801,0.780328,0.),\nvec3(0.145177,-0.898984,0.),\nvec3(0.062655,-0.611866,0.),\nvec3(0.315226,-0.604297,0.),\nvec3(-0.780145,0.486251,0.),\nvec3(-0.371868,0.882138,0.),\nvec3(0.200476,0.494430,0.),\nvec3(-0.494552,-0.711051,0.),\nvec3(0.612476,0.705252,0.),\nvec3(-0.578845,-0.768792,0.),\nvec3(-0.772454,-0.090976,0.),\nvec3(0.504440,0.372295,0.),\nvec3(0.155736,0.065157,0.),\nvec3(0.391522,0.849605,0.),\nvec3(-0.620106,-0.328104,0.),\nvec3(0.789239,-0.419965,0.),\nvec3(-0.545396,0.538133,0.),\nvec3(-0.178564,-0.596057,0.)\n);\n#define inline\nfloat computeShadowWithCSMPCSS(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArray depthSampler,highp sampler2DArrayShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,int searchTapCount,int pcfTapCount,vec3[64] poissonSamplers,vec2 lightSizeUVCorrection,float depthCorrection,float penumbraDarkness)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=clamp(ZINCLIP,0.,GREATEST_LESS_THAN_ONE);vec4 uvDepthLayer=vec4(uvDepth.x,uvDepth.y,layer,uvDepth.z);float blockerDepth=0.0;float sumBlockerDepth=0.0;float numBlocker=0.0;for (int i=0; i1.0 || depthMetric<0.0) {return 1.0;}\nelse\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=ZINCLIP;float blockerDepth=0.0;float sumBlockerDepth=0.0;float numBlocker=0.0;for (int i=0; i=0.) {index{X}=i;break;}}\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nif (index{X}>=0)\n#endif\n{\n#if defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithCSMPCF1(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithCSMPCF3(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithCSMPCF5(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithCSMPCSS16(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithCSMPCSS32(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#else\nshadow=computeShadowWithCSMPCSS64(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#endif\n#else\nshadow=computeShadowCSM(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nshadowDebug{X}=vec3(shadow)*vCascadeColorsMultiplier{X}[index{X}];\n#endif\n#ifndef SHADOWCSMNOBLEND{X}\nfloat frustumLength=frustumLengths{X}[index{X}];float diffRatio=clamp(diff{X}/frustumLength,0.,1.)*cascadeBlendFactor{X};if (index{X}<(SHADOWCSMNUM_CASCADES{X}-1) && diffRatio<1.)\n{index{X}+=1;float nextShadow=0.;\n#if defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nnextShadow=computeShadowWithCSMPCF1(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nnextShadow=computeShadowWithCSMPCF3(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nnextShadow=computeShadowWithCSMPCF5(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nnextShadow=computeShadowWithCSMPCSS16(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#elif defined(SHADOWMEDIUMQUALITY{X})\nnextShadow=computeShadowWithCSMPCSS32(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#else\nnextShadow=computeShadowWithCSMPCSS64(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#endif\n#else\nnextShadow=computeShadowCSM(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\nshadow=mix(nextShadow,shadow,diffRatio);\n#ifdef SHADOWCSMDEBUG{X}\nshadowDebug{X}=mix(vec3(nextShadow)*vCascadeColorsMultiplier{X}[index{X}],shadowDebug{X},diffRatio);\n#endif\n}\n#endif\n}\n#elif defined(SHADOWCLOSEESM{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithCloseESMCube(vPositionW,light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\n#else\nshadow=computeShadowWithCloseESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWESM{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithESMCube(vPositionW,light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\n#else\nshadow=computeShadowWithESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPOISSON{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithPoissonSamplingCube(vPositionW,light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.depthValues);\n#else\nshadow=computeShadowWithPoissonSampling(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithPCF1(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithPCF3(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithPCF5(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithPCSS16(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithPCSS32(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithPCSS64(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#else\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowCube(vPositionW,light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.depthValues);\n#else\nshadow=computeShadow(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#endif\n#ifdef SHADOWONLY\n#ifndef SHADOWINUSE\n#define SHADOWINUSE\n#endif\nglobalShadow+=shadow;shadowLightCount+=1.0;\n#endif\n#else\nshadow=1.;\n#endif\naggShadow+=shadow;numLights+=1.0;\n#ifndef SHADOWONLY\n#ifdef CUSTOMUSERLIGHTING\ndiffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow);\n#ifdef SPECULARTERM\nspecularBase+=computeCustomSpecularLighting(info,specularBase,shadow);\n#endif\n#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X})\ndiffuseBase+=lightmapColor.rgb*shadow;\n#ifdef SPECULARTERM\n#ifndef LIGHTMAPNOSPECULAR{X}\nspecularBase+=info.specular*shadow*lightmapColor.rgb;\n#endif\n#endif\n#ifdef CLEARCOAT\n#ifndef LIGHTMAPNOSPECULAR{X}\nclearCoatBase+=info.clearCoat.rgb*shadow*lightmapColor.rgb;\n#endif\n#endif\n#ifdef SHEEN\n#ifndef LIGHTMAPNOSPECULAR{X}\nsheenBase+=info.sheen.rgb*shadow;\n#endif\n#endif\n#else\n#ifdef SHADOWCSMDEBUG{X}\ndiffuseBase+=info.diffuse*shadowDebug{X};\n#else \ndiffuseBase+=info.diffuse*shadow;\n#endif\n#ifdef SPECULARTERM\nspecularBase+=info.specular*shadow;\n#endif\n#ifdef CLEARCOAT\nclearCoatBase+=info.clearCoat.rgb*shadow;\n#endif\n#ifdef SHEEN\nsheenBase+=info.sheen.rgb*shadow;\n#endif\n#endif\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const lightFragment = { name, shader };\n//# sourceMappingURL=lightFragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"fogFragment\";\nconst shader = `#ifdef FOG\nfloat fog=CalcFogFactor();\n#ifdef PBR\nfog=toLinearSpace(fog);\n#endif\ncolor.rgb=mix(vFogColor,color.rgb,fog);\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const fogFragment = { name, shader };\n//# sourceMappingURL=fogFragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"imageProcessingCompatibility\";\nconst shader = `#ifdef IMAGEPROCESSINGPOSTPROCESS\ngl_FragColor.rgb=pow(gl_FragColor.rgb,vec3(2.2));\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const imageProcessingCompatibility = { name, shader };\n//# sourceMappingURL=imageProcessingCompatibility.js.map","// Do not edit.\nimport { ShaderStore } from \"@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/helperFunctions.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/lightsFragmentFunctions.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/shadowsFragmentFunctions.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/depthPrePass.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/lightFragment.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/fogFragment.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js\";\nconst name = \"normalPixelShader\";\nconst shader = `precision highp float;uniform vec4 vEyePosition;uniform vec4 vDiffuseColor;varying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef LIGHTING\n#include\n#include<__decl__lightFragment>[0]\n#include<__decl__lightFragment>[1]\n#include<__decl__lightFragment>[2]\n#include<__decl__lightFragment>[3]\n#include\n#include\n#endif\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;uniform sampler2D diffuseSampler;uniform vec2 vDiffuseInfos;\n#endif\n#include\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);vec4 baseColor=vec4(1.,1.,1.,1.);vec3 diffuseColor=vDiffuseColor.rgb;float alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef NORMAL\nbaseColor=mix(baseColor,vec4(vNormalW,1.0),0.5);\n#endif\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n#ifdef LIGHTING\nvec3 diffuseBase=vec3(0.,0.,0.);lightingInfo info;float shadow=1.;float glossiness=0.;float aggShadow=0.;float numLights=0.;\n#include[0]\n#include[1]\n#include[2]\n#include[3]\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n#else\nvec3 finalDiffuse= baseColor.rgb;\n#endif\nvec4 color=vec4(finalDiffuse,alpha);\n#include\ngl_FragColor=color;\n#include\n#define CUSTOM_FRAGMENT_MAIN_END\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const normalPixelShader = { name, shader };\n//# sourceMappingURL=normal.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"instancesDeclaration\";\nconst shader = `#ifdef INSTANCES\nattribute vec4 world0;attribute vec4 world1;attribute vec4 world2;attribute vec4 world3;\n#ifdef INSTANCESCOLOR\nattribute vec4 instanceColor;\n#endif\n#if defined(THIN_INSTANCES) && !defined(WORLD_UBO)\nuniform mat4 world;\n#endif\n#if defined(VELOCITY) || defined(PREPASS_VELOCITY)\nattribute vec4 previousWorld0;attribute vec4 previousWorld1;attribute vec4 previousWorld2;attribute vec4 previousWorld3;\n#ifdef THIN_INSTANCES\nuniform mat4 previousWorld;\n#endif\n#endif\n#else\n#if !defined(WORLD_UBO)\nuniform mat4 world;\n#endif\n#if defined(VELOCITY) || defined(PREPASS_VELOCITY)\nuniform mat4 previousWorld;\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const instancesDeclaration = { name, shader };\n//# sourceMappingURL=instancesDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"fogVertexDeclaration\";\nconst shader = `#ifdef FOG\nvarying vec3 vFogDistance;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const fogVertexDeclaration = { name, shader };\n//# sourceMappingURL=fogVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"fogVertex\";\nconst shader = `#ifdef FOG\nvFogDistance=(view*worldPos).xyz;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const fogVertex = { name, shader };\n//# sourceMappingURL=fogVertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"shadowsVertex\";\nconst shader = `#ifdef SHADOWS\n#if defined(SHADOWCSM{X})\nvPositionFromCamera{X}=view*worldPos;for (int i=0; i\n#include\n#include\nuniform mat4 view;uniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;uniform mat4 diffuseMatrix;uniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);gl_Position=viewProjection*worldPos;vPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x==0.)\n{vDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));}\nelse\n{vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));}\n#endif\n#include\n#include\n#include[0..maxSimultaneousLights]\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#define CUSTOM_VERTEX_MAIN_END\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const normalVertexShader = { name, shader };\n//# sourceMappingURL=normal.vertex.js.map","import { __decorate } from \"@inter-ikea-betrakta-babylonjs/core/tslib.es6.js\";\nimport { serializeAsTexture, serialize, expandToProperty, serializeAsColor3, SerializationHelper } from \"@inter-ikea-betrakta-babylonjs/core/Misc/decorators.js\";\nimport { Color3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js\";\nimport { MaterialDefines } from \"@inter-ikea-betrakta-babylonjs/core/Materials/materialDefines.js\";\nimport { MaterialHelper } from \"@inter-ikea-betrakta-babylonjs/core/Materials/materialHelper.js\";\nimport { PushMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/pushMaterial.js\";\nimport { MaterialFlags } from \"@inter-ikea-betrakta-babylonjs/core/Materials/materialFlags.js\";\nimport { VertexBuffer } from \"@inter-ikea-betrakta-babylonjs/core/Buffers/buffer.js\";\nimport { Scene } from \"@inter-ikea-betrakta-babylonjs/core/scene.js\";\nimport { RegisterClass } from \"@inter-ikea-betrakta-babylonjs/core/Misc/typeStore.js\";\nimport \"./normal.fragment.js\";\nimport \"./normal.vertex.js\";\nimport { EffectFallbacks } from \"@inter-ikea-betrakta-babylonjs/core/Materials/effectFallbacks.js\";\nimport { addClipPlaneUniforms, bindClipPlane } from \"@inter-ikea-betrakta-babylonjs/core/Materials/clipPlaneMaterialHelper.js\";\nclass NormalMaterialDefines extends MaterialDefines {\n constructor() {\n super();\n this.DIFFUSE = false;\n this.CLIPPLANE = false;\n this.CLIPPLANE2 = false;\n this.CLIPPLANE3 = false;\n this.CLIPPLANE4 = false;\n this.CLIPPLANE5 = false;\n this.CLIPPLANE6 = false;\n this.ALPHATEST = false;\n this.DEPTHPREPASS = false;\n this.POINTSIZE = false;\n this.FOG = false;\n this.LIGHT0 = false;\n this.LIGHT1 = false;\n this.LIGHT2 = false;\n this.LIGHT3 = false;\n this.SPOTLIGHT0 = false;\n this.SPOTLIGHT1 = false;\n this.SPOTLIGHT2 = false;\n this.SPOTLIGHT3 = false;\n this.HEMILIGHT0 = false;\n this.HEMILIGHT1 = false;\n this.HEMILIGHT2 = false;\n this.HEMILIGHT3 = false;\n this.DIRLIGHT0 = false;\n this.DIRLIGHT1 = false;\n this.DIRLIGHT2 = false;\n this.DIRLIGHT3 = false;\n this.POINTLIGHT0 = false;\n this.POINTLIGHT1 = false;\n this.POINTLIGHT2 = false;\n this.POINTLIGHT3 = false;\n this.SHADOW0 = false;\n this.SHADOW1 = false;\n this.SHADOW2 = false;\n this.SHADOW3 = false;\n this.SHADOWS = false;\n this.SHADOWESM0 = false;\n this.SHADOWESM1 = false;\n this.SHADOWESM2 = false;\n this.SHADOWESM3 = false;\n this.SHADOWPOISSON0 = false;\n this.SHADOWPOISSON1 = false;\n this.SHADOWPOISSON2 = false;\n this.SHADOWPOISSON3 = false;\n this.SHADOWPCF0 = false;\n this.SHADOWPCF1 = false;\n this.SHADOWPCF2 = false;\n this.SHADOWPCF3 = false;\n this.SHADOWPCSS0 = false;\n this.SHADOWPCSS1 = false;\n this.SHADOWPCSS2 = false;\n this.SHADOWPCSS3 = false;\n this.NORMAL = false;\n this.UV1 = false;\n this.UV2 = false;\n this.NUM_BONE_INFLUENCERS = 0;\n this.BonesPerMesh = 0;\n this.INSTANCES = false;\n this.LIGHTING = false;\n this.IMAGEPROCESSINGPOSTPROCESS = false;\n this.SKIPFINALCOLORCLAMP = false;\n this.rebuild();\n }\n}\nexport class NormalMaterial extends PushMaterial {\n constructor(name, scene) {\n super(name, scene);\n this.diffuseColor = new Color3(1, 1, 1);\n this._disableLighting = false;\n this._maxSimultaneousLights = 4;\n }\n needAlphaBlending() {\n return this.alpha < 1.0;\n }\n needAlphaBlendingForMesh(mesh) {\n return this.needAlphaBlending() || mesh.visibility < 1.0;\n }\n needAlphaTesting() {\n return false;\n }\n getAlphaTestTexture() {\n return null;\n }\n // Methods\n isReadyForSubMesh(mesh, subMesh, useInstances) {\n if (this.isFrozen) {\n if (subMesh.effect && subMesh.effect._wasPreviouslyReady && subMesh.effect._wasPreviouslyUsingInstances === useInstances) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new NormalMaterialDefines();\n }\n const defines = subMesh.materialDefines;\n const scene = this.getScene();\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Textures\n if (defines._areTexturesDirty) {\n defines._needUVs = false;\n if (scene.texturesEnabled) {\n if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {\n if (!this._diffuseTexture.isReady()) {\n return false;\n }\n else {\n defines._needUVs = true;\n defines.DIFFUSE = true;\n }\n }\n }\n }\n // Misc.\n MaterialHelper.PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines);\n // Lights\n defines._needNormals = true;\n MaterialHelper.PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting);\n // Values that need to be evaluated on every frame\n MaterialHelper.PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances ? true : false);\n defines.LIGHTING = !this._disableLighting;\n // Attribs\n MaterialHelper.PrepareDefinesForAttributes(mesh, defines, true, true);\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n MaterialHelper.HandleFallbacksForShadows(defines, fallbacks);\n if (defines.NUM_BONE_INFLUENCERS > 0) {\n fallbacks.addCPUSkinningFallback(0, mesh);\n }\n defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.UV1) {\n attribs.push(VertexBuffer.UVKind);\n }\n if (defines.UV2) {\n attribs.push(VertexBuffer.UV2Kind);\n }\n MaterialHelper.PrepareAttributesForBones(attribs, mesh, defines, fallbacks);\n MaterialHelper.PrepareAttributesForInstances(attribs, defines);\n const shaderName = \"normal\";\n const join = defines.toString();\n const uniforms = [\n \"world\",\n \"view\",\n \"viewProjection\",\n \"vEyePosition\",\n \"vLightsType\",\n \"vDiffuseColor\",\n \"vFogInfos\",\n \"vFogColor\",\n \"pointSize\",\n \"vDiffuseInfos\",\n \"mBones\",\n \"diffuseMatrix\",\n ];\n const samplers = [\"diffuseSampler\"];\n const uniformBuffers = [];\n addClipPlaneUniforms(uniforms);\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: 4,\n });\n subMesh.setEffect(scene.getEngine().createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousLights: 4 },\n }, engine), defines, this._materialContext);\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = true;\n subMesh.effect._wasPreviouslyUsingInstances = !!useInstances;\n return true;\n }\n bindForSubMesh(world, mesh, subMesh) {\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n this._activeEffect.setMatrix(\"viewProjection\", scene.getTransformMatrix());\n // Bones\n MaterialHelper.BindBonesParameters(mesh, this._activeEffect);\n if (this._mustRebind(scene, effect)) {\n // Textures\n if (this.diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {\n this._activeEffect.setTexture(\"diffuseSampler\", this.diffuseTexture);\n this._activeEffect.setFloat2(\"vDiffuseInfos\", this.diffuseTexture.coordinatesIndex, this.diffuseTexture.level);\n this._activeEffect.setMatrix(\"diffuseMatrix\", this.diffuseTexture.getTextureMatrix());\n }\n // Clip plane\n bindClipPlane(effect, this, scene);\n // Point size\n if (this.pointsCloud) {\n this._activeEffect.setFloat(\"pointSize\", this.pointSize);\n }\n scene.bindEyePosition(effect);\n }\n this._activeEffect.setColor4(\"vDiffuseColor\", this.diffuseColor, this.alpha * mesh.visibility);\n // Lights\n if (scene.lightsEnabled && !this.disableLighting) {\n MaterialHelper.BindLights(scene, mesh, this._activeEffect, defines);\n }\n // View\n if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) {\n this._activeEffect.setMatrix(\"view\", scene.getViewMatrix());\n }\n // Fog\n MaterialHelper.BindFogParameters(scene, mesh, this._activeEffect);\n this._afterBind(mesh, this._activeEffect);\n }\n getAnimatables() {\n const results = [];\n if (this.diffuseTexture && this.diffuseTexture.animations && this.diffuseTexture.animations.length > 0) {\n results.push(this.diffuseTexture);\n }\n return results;\n }\n getActiveTextures() {\n const activeTextures = super.getActiveTextures();\n if (this._diffuseTexture) {\n activeTextures.push(this._diffuseTexture);\n }\n return activeTextures;\n }\n hasTexture(texture) {\n if (super.hasTexture(texture)) {\n return true;\n }\n if (this.diffuseTexture === texture) {\n return true;\n }\n return false;\n }\n dispose(forceDisposeEffect) {\n if (this.diffuseTexture) {\n this.diffuseTexture.dispose();\n }\n super.dispose(forceDisposeEffect);\n }\n clone(name) {\n return SerializationHelper.Clone(() => new NormalMaterial(name, this.getScene()), this);\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.customType = \"BABYLON.NormalMaterial\";\n return serializationObject;\n }\n getClassName() {\n return \"NormalMaterial\";\n }\n // Statics\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new NormalMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n__decorate([\n serializeAsTexture(\"diffuseTexture\")\n], NormalMaterial.prototype, \"_diffuseTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], NormalMaterial.prototype, \"diffuseTexture\", void 0);\n__decorate([\n serializeAsColor3()\n], NormalMaterial.prototype, \"diffuseColor\", void 0);\n__decorate([\n serialize(\"disableLighting\")\n], NormalMaterial.prototype, \"_disableLighting\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\n], NormalMaterial.prototype, \"disableLighting\", void 0);\n__decorate([\n serialize(\"maxSimultaneousLights\")\n], NormalMaterial.prototype, \"_maxSimultaneousLights\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\n], NormalMaterial.prototype, \"maxSimultaneousLights\", void 0);\nRegisterClass(\"BABYLON.NormalMaterial\", NormalMaterial);\n//# sourceMappingURL=normalMaterial.js.map","import { key_from_value_map } from './babylon/utility/utils.js';\nexport class AssetCollection {\n constructor() {\n this._collection = new Map();\n this._id_counter = 0;\n }\n contains(id) {\n return this._collection.has(id);\n }\n next_id() {\n return this._id_counter;\n }\n add(v) {\n const id = this._id_counter++;\n this._collection.set(id, v);\n return id;\n }\n remove(id) {\n if (this.contains(id)) {\n return this._collection.delete(id);\n }\n return false;\n }\n get(id) {\n if (!this.contains(id)) {\n throw new Error(`No entry with id: ${id}`);\n }\n return this._collection.get(id);\n }\n find_id(value) {\n const result = key_from_value_map(this._collection, value);\n return result !== null && result !== void 0 ? result : -1;\n }\n set(id, v) {\n this._collection.set(id, v);\n }\n length() {\n return this._collection.size;\n }\n ids() {\n return Array.from(this._collection.keys());\n }\n values() {\n return Array.from(this._collection.values());\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n forEach(func) {\n this._collection.forEach(func);\n }\n clear() {\n this._collection.clear();\n }\n /* Caution: Use with care. This can be used to force reset the Viewer's id_counter after removing all objects in a scene\n to enable recreating objects with the same IDs. */\n reset_object_id_counter() {\n this._id_counter = 0;\n }\n dispose() {\n for (const value of this._collection.values()) {\n if (value && typeof value === 'object' && 'dispose' in value && typeof value.dispose === 'function') {\n value.dispose();\n }\n }\n this._collection.clear();\n }\n}\n//# sourceMappingURL=AssetCollection.js.map","/* eslint-disable @typescript-eslint/naming-convention */\n/** Defines the cross module used constants to avoid circular dependencies */\nexport class Constants {\n}\n/** Defines that alpha blending is disabled */\nConstants.ALPHA_DISABLE = 0;\n/** Defines that alpha blending is SRC ALPHA * SRC + DEST */\nConstants.ALPHA_ADD = 1;\n/** Defines that alpha blending is SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */\nConstants.ALPHA_COMBINE = 2;\n/** Defines that alpha blending is DEST - SRC * DEST */\nConstants.ALPHA_SUBTRACT = 3;\n/** Defines that alpha blending is SRC * DEST */\nConstants.ALPHA_MULTIPLY = 4;\n/** Defines that alpha blending is SRC ALPHA * SRC + (1 - SRC) * DEST */\nConstants.ALPHA_MAXIMIZED = 5;\n/** Defines that alpha blending is SRC + DEST */\nConstants.ALPHA_ONEONE = 6;\n/** Defines that alpha blending is SRC + (1 - SRC ALPHA) * DEST */\nConstants.ALPHA_PREMULTIPLIED = 7;\n/**\n * Defines that alpha blending is SRC + (1 - SRC ALPHA) * DEST\n * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA\n */\nConstants.ALPHA_PREMULTIPLIED_PORTERDUFF = 8;\n/** Defines that alpha blending is CST * SRC + (1 - CST) * DEST */\nConstants.ALPHA_INTERPOLATE = 9;\n/**\n * Defines that alpha blending is SRC + (1 - SRC) * DEST\n * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA\n */\nConstants.ALPHA_SCREENMODE = 10;\n/**\n * Defines that alpha blending is SRC + DST\n * Alpha will be set to SRC ALPHA + DST ALPHA\n */\nConstants.ALPHA_ONEONE_ONEONE = 11;\n/**\n * Defines that alpha blending is SRC * DST ALPHA + DST\n * Alpha will be set to 0\n */\nConstants.ALPHA_ALPHATOCOLOR = 12;\n/**\n * Defines that alpha blending is SRC * (1 - DST) + DST * (1 - SRC)\n */\nConstants.ALPHA_REVERSEONEMINUS = 13;\n/**\n * Defines that alpha blending is SRC + DST * (1 - SRC ALPHA)\n * Alpha will be set to SRC ALPHA + DST ALPHA * (1 - SRC ALPHA)\n */\nConstants.ALPHA_SRC_DSTONEMINUSSRCALPHA = 14;\n/**\n * Defines that alpha blending is SRC + DST\n * Alpha will be set to SRC ALPHA\n */\nConstants.ALPHA_ONEONE_ONEZERO = 15;\n/**\n * Defines that alpha blending is SRC * (1 - DST) + DST * (1 - SRC)\n * Alpha will be set to DST ALPHA\n */\nConstants.ALPHA_EXCLUSION = 16;\n/**\n * Defines that alpha blending is SRC * SRC ALPHA + DST * (1 - SRC ALPHA)\n * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DST ALPHA\n */\nConstants.ALPHA_LAYER_ACCUMULATE = 17;\n/** Defines that alpha blending equation a SUM */\nConstants.ALPHA_EQUATION_ADD = 0;\n/** Defines that alpha blending equation a SUBSTRACTION */\nConstants.ALPHA_EQUATION_SUBSTRACT = 1;\n/** Defines that alpha blending equation a REVERSE SUBSTRACTION */\nConstants.ALPHA_EQUATION_REVERSE_SUBTRACT = 2;\n/** Defines that alpha blending equation a MAX operation */\nConstants.ALPHA_EQUATION_MAX = 3;\n/** Defines that alpha blending equation a MIN operation */\nConstants.ALPHA_EQUATION_MIN = 4;\n/**\n * Defines that alpha blending equation a DARKEN operation:\n * It takes the min of the src and sums the alpha channels.\n */\nConstants.ALPHA_EQUATION_DARKEN = 5;\n/** Defines that the resource is not delayed*/\nConstants.DELAYLOADSTATE_NONE = 0;\n/** Defines that the resource was successfully delay loaded */\nConstants.DELAYLOADSTATE_LOADED = 1;\n/** Defines that the resource is currently delay loading */\nConstants.DELAYLOADSTATE_LOADING = 2;\n/** Defines that the resource is delayed and has not started loading */\nConstants.DELAYLOADSTATE_NOTLOADED = 4;\n// Depth or Stencil test Constants.\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */\nConstants.NEVER = 0x0200;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */\nConstants.ALWAYS = 0x0207;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */\nConstants.LESS = 0x0201;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */\nConstants.EQUAL = 0x0202;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */\nConstants.LEQUAL = 0x0203;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */\nConstants.GREATER = 0x0204;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */\nConstants.GEQUAL = 0x0206;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */\nConstants.NOTEQUAL = 0x0205;\n// Stencil Actions Constants.\n/** Passed to stencilOperation to specify that stencil value must be kept */\nConstants.KEEP = 0x1e00;\n/** Passed to stencilOperation to specify that stencil value must be zero */\nConstants.ZERO = 0x0000;\n/** Passed to stencilOperation to specify that stencil value must be replaced */\nConstants.REPLACE = 0x1e01;\n/** Passed to stencilOperation to specify that stencil value must be incremented */\nConstants.INCR = 0x1e02;\n/** Passed to stencilOperation to specify that stencil value must be decremented */\nConstants.DECR = 0x1e03;\n/** Passed to stencilOperation to specify that stencil value must be inverted */\nConstants.INVERT = 0x150a;\n/** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */\nConstants.INCR_WRAP = 0x8507;\n/** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */\nConstants.DECR_WRAP = 0x8508;\n/** Texture is not repeating outside of 0..1 UVs */\nConstants.TEXTURE_CLAMP_ADDRESSMODE = 0;\n/** Texture is repeating outside of 0..1 UVs */\nConstants.TEXTURE_WRAP_ADDRESSMODE = 1;\n/** Texture is repeating and mirrored */\nConstants.TEXTURE_MIRROR_ADDRESSMODE = 2;\n/** Flag to create a storage texture */\nConstants.TEXTURE_CREATIONFLAG_STORAGE = 1;\n/** ALPHA */\nConstants.TEXTUREFORMAT_ALPHA = 0;\n/** LUMINANCE */\nConstants.TEXTUREFORMAT_LUMINANCE = 1;\n/** LUMINANCE_ALPHA */\nConstants.TEXTUREFORMAT_LUMINANCE_ALPHA = 2;\n/** RGB */\nConstants.TEXTUREFORMAT_RGB = 4;\n/** RGBA */\nConstants.TEXTUREFORMAT_RGBA = 5;\n/** RED */\nConstants.TEXTUREFORMAT_RED = 6;\n/** RED (2nd reference) */\nConstants.TEXTUREFORMAT_R = 6;\n/** RG */\nConstants.TEXTUREFORMAT_RG = 7;\n/** RED_INTEGER */\nConstants.TEXTUREFORMAT_RED_INTEGER = 8;\n/** RED_INTEGER (2nd reference) */\nConstants.TEXTUREFORMAT_R_INTEGER = 8;\n/** RG_INTEGER */\nConstants.TEXTUREFORMAT_RG_INTEGER = 9;\n/** RGB_INTEGER */\nConstants.TEXTUREFORMAT_RGB_INTEGER = 10;\n/** RGBA_INTEGER */\nConstants.TEXTUREFORMAT_RGBA_INTEGER = 11;\n/** BGRA */\nConstants.TEXTUREFORMAT_BGRA = 12;\n/** Depth 24 bits + Stencil 8 bits */\nConstants.TEXTUREFORMAT_DEPTH24_STENCIL8 = 13;\n/** Depth 32 bits float */\nConstants.TEXTUREFORMAT_DEPTH32_FLOAT = 14;\n/** Depth 16 bits */\nConstants.TEXTUREFORMAT_DEPTH16 = 15;\n/** Depth 24 bits */\nConstants.TEXTUREFORMAT_DEPTH24 = 16;\n/** Depth 24 bits unorm + Stencil 8 bits */\nConstants.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8 = 17;\n/** Depth 32 bits float + Stencil 8 bits */\nConstants.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8 = 18;\n/** Stencil 8 bits */\nConstants.TEXTUREFORMAT_STENCIL8 = 19;\n/** UNDEFINED */\nConstants.TEXTUREFORMAT_UNDEFINED = 0xffffffff;\n/** Compressed BC7 */\nConstants.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM = 36492;\n/** Compressed BC7 (SRGB) */\nConstants.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 36493;\n/** Compressed BC6 unsigned float */\nConstants.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = 36495;\n/** Compressed BC6 signed float */\nConstants.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT = 36494;\n/** Compressed BC3 */\nConstants.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5 = 33779;\n/** Compressed BC3 (SRGB) */\nConstants.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 35919;\n/** Compressed BC2 */\nConstants.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3 = 33778;\n/** Compressed BC2 (SRGB) */\nConstants.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 35918;\n/** Compressed BC1 (RGBA) */\nConstants.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1 = 33777;\n/** Compressed BC1 (RGB) */\nConstants.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1 = 33776;\n/** Compressed BC1 (SRGB+A) */\nConstants.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 35917;\n/** Compressed BC1 (SRGB) */\nConstants.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT = 35916;\n/** Compressed ASTC 4x4 */\nConstants.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4 = 37808;\n/** Compressed ASTC 4x4 (SRGB) */\nConstants.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 37840;\n/** Compressed ETC1 (RGB) */\nConstants.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL = 36196;\n/** Compressed ETC2 (RGB) */\nConstants.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2 = 37492;\n/** Compressed ETC2 (SRGB) */\nConstants.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2 = 37493;\n/** Compressed ETC2 (RGB+A1) */\nConstants.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37494;\n/** Compressed ETC2 (SRGB+A1)*/\nConstants.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37495;\n/** Compressed ETC2 (RGB+A) */\nConstants.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC = 37496;\n/** Compressed ETC2 (SRGB+1) */\nConstants.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 37497;\n/** UNSIGNED_BYTE */\nConstants.TEXTURETYPE_UNSIGNED_BYTE = 0;\n/** UNSIGNED_BYTE (2nd reference) */\nConstants.TEXTURETYPE_UNSIGNED_INT = 0;\n/** FLOAT */\nConstants.TEXTURETYPE_FLOAT = 1;\n/** HALF_FLOAT */\nConstants.TEXTURETYPE_HALF_FLOAT = 2;\n/** BYTE */\nConstants.TEXTURETYPE_BYTE = 3;\n/** SHORT */\nConstants.TEXTURETYPE_SHORT = 4;\n/** UNSIGNED_SHORT */\nConstants.TEXTURETYPE_UNSIGNED_SHORT = 5;\n/** INT */\nConstants.TEXTURETYPE_INT = 6;\n/** UNSIGNED_INT */\nConstants.TEXTURETYPE_UNSIGNED_INTEGER = 7;\n/** UNSIGNED_SHORT_4_4_4_4 */\nConstants.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 = 8;\n/** UNSIGNED_SHORT_5_5_5_1 */\nConstants.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 = 9;\n/** UNSIGNED_SHORT_5_6_5 */\nConstants.TEXTURETYPE_UNSIGNED_SHORT_5_6_5 = 10;\n/** UNSIGNED_INT_2_10_10_10_REV */\nConstants.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV = 11;\n/** UNSIGNED_INT_24_8 */\nConstants.TEXTURETYPE_UNSIGNED_INT_24_8 = 12;\n/** UNSIGNED_INT_10F_11F_11F_REV */\nConstants.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV = 13;\n/** UNSIGNED_INT_5_9_9_9_REV */\nConstants.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV = 14;\n/** FLOAT_32_UNSIGNED_INT_24_8_REV */\nConstants.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV = 15;\n/** UNDEFINED */\nConstants.TEXTURETYPE_UNDEFINED = 16;\n/** 2D Texture target*/\nConstants.TEXTURE_2D = 3553;\n/** 2D Array Texture target */\nConstants.TEXTURE_2D_ARRAY = 35866;\n/** Cube Map Texture target */\nConstants.TEXTURE_CUBE_MAP = 34067;\n/** Cube Map Array Texture target */\nConstants.TEXTURE_CUBE_MAP_ARRAY = 0xdeadbeef;\n/** 3D Texture target */\nConstants.TEXTURE_3D = 32879;\n/** nearest is mag = nearest and min = nearest and no mip */\nConstants.TEXTURE_NEAREST_SAMPLINGMODE = 1;\n/** mag = nearest and min = nearest and mip = none */\nConstants.TEXTURE_NEAREST_NEAREST = 1;\n/** Bilinear is mag = linear and min = linear and no mip */\nConstants.TEXTURE_BILINEAR_SAMPLINGMODE = 2;\n/** mag = linear and min = linear and mip = none */\nConstants.TEXTURE_LINEAR_LINEAR = 2;\n/** Trilinear is mag = linear and min = linear and mip = linear */\nConstants.TEXTURE_TRILINEAR_SAMPLINGMODE = 3;\n/** Trilinear is mag = linear and min = linear and mip = linear */\nConstants.TEXTURE_LINEAR_LINEAR_MIPLINEAR = 3;\n/** mag = nearest and min = nearest and mip = nearest */\nConstants.TEXTURE_NEAREST_NEAREST_MIPNEAREST = 4;\n/** mag = nearest and min = linear and mip = nearest */\nConstants.TEXTURE_NEAREST_LINEAR_MIPNEAREST = 5;\n/** mag = nearest and min = linear and mip = linear */\nConstants.TEXTURE_NEAREST_LINEAR_MIPLINEAR = 6;\n/** mag = nearest and min = linear and mip = none */\nConstants.TEXTURE_NEAREST_LINEAR = 7;\n/** nearest is mag = nearest and min = nearest and mip = linear */\nConstants.TEXTURE_NEAREST_NEAREST_MIPLINEAR = 8;\n/** mag = linear and min = nearest and mip = nearest */\nConstants.TEXTURE_LINEAR_NEAREST_MIPNEAREST = 9;\n/** mag = linear and min = nearest and mip = linear */\nConstants.TEXTURE_LINEAR_NEAREST_MIPLINEAR = 10;\n/** Bilinear is mag = linear and min = linear and mip = nearest */\nConstants.TEXTURE_LINEAR_LINEAR_MIPNEAREST = 11;\n/** mag = linear and min = nearest and mip = none */\nConstants.TEXTURE_LINEAR_NEAREST = 12;\n/** Explicit coordinates mode */\nConstants.TEXTURE_EXPLICIT_MODE = 0;\n/** Spherical coordinates mode */\nConstants.TEXTURE_SPHERICAL_MODE = 1;\n/** Planar coordinates mode */\nConstants.TEXTURE_PLANAR_MODE = 2;\n/** Cubic coordinates mode */\nConstants.TEXTURE_CUBIC_MODE = 3;\n/** Projection coordinates mode */\nConstants.TEXTURE_PROJECTION_MODE = 4;\n/** Skybox coordinates mode */\nConstants.TEXTURE_SKYBOX_MODE = 5;\n/** Inverse Cubic coordinates mode */\nConstants.TEXTURE_INVCUBIC_MODE = 6;\n/** Equirectangular coordinates mode */\nConstants.TEXTURE_EQUIRECTANGULAR_MODE = 7;\n/** Equirectangular Fixed coordinates mode */\nConstants.TEXTURE_FIXED_EQUIRECTANGULAR_MODE = 8;\n/** Equirectangular Fixed Mirrored coordinates mode */\nConstants.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;\n/** Offline (baking) quality for texture filtering */\nConstants.TEXTURE_FILTERING_QUALITY_OFFLINE = 4096;\n/** High quality for texture filtering */\nConstants.TEXTURE_FILTERING_QUALITY_HIGH = 64;\n/** Medium quality for texture filtering */\nConstants.TEXTURE_FILTERING_QUALITY_MEDIUM = 16;\n/** Low quality for texture filtering */\nConstants.TEXTURE_FILTERING_QUALITY_LOW = 8;\n// Texture rescaling mode\n/** Defines that texture rescaling will use a floor to find the closer power of 2 size */\nConstants.SCALEMODE_FLOOR = 1;\n/** Defines that texture rescaling will look for the nearest power of 2 size */\nConstants.SCALEMODE_NEAREST = 2;\n/** Defines that texture rescaling will use a ceil to find the closer power of 2 size */\nConstants.SCALEMODE_CEILING = 3;\n/**\n * The dirty texture flag value\n */\nConstants.MATERIAL_TextureDirtyFlag = 1;\n/**\n * The dirty light flag value\n */\nConstants.MATERIAL_LightDirtyFlag = 2;\n/**\n * The dirty fresnel flag value\n */\nConstants.MATERIAL_FresnelDirtyFlag = 4;\n/**\n * The dirty attribute flag value\n */\nConstants.MATERIAL_AttributesDirtyFlag = 8;\n/**\n * The dirty misc flag value\n */\nConstants.MATERIAL_MiscDirtyFlag = 16;\n/**\n * The dirty prepass flag value\n */\nConstants.MATERIAL_PrePassDirtyFlag = 32;\n/**\n * The all dirty flag value\n */\nConstants.MATERIAL_AllDirtyFlag = 63;\n/**\n * Returns the triangle fill mode\n */\nConstants.MATERIAL_TriangleFillMode = 0;\n/**\n * Returns the wireframe mode\n */\nConstants.MATERIAL_WireFrameFillMode = 1;\n/**\n * Returns the point fill mode\n */\nConstants.MATERIAL_PointFillMode = 2;\n/**\n * Returns the point list draw mode\n */\nConstants.MATERIAL_PointListDrawMode = 3;\n/**\n * Returns the line list draw mode\n */\nConstants.MATERIAL_LineListDrawMode = 4;\n/**\n * Returns the line loop draw mode\n */\nConstants.MATERIAL_LineLoopDrawMode = 5;\n/**\n * Returns the line strip draw mode\n */\nConstants.MATERIAL_LineStripDrawMode = 6;\n/**\n * Returns the triangle strip draw mode\n */\nConstants.MATERIAL_TriangleStripDrawMode = 7;\n/**\n * Returns the triangle fan draw mode\n */\nConstants.MATERIAL_TriangleFanDrawMode = 8;\n/**\n * Stores the clock-wise side orientation\n */\nConstants.MATERIAL_ClockWiseSideOrientation = 0;\n/**\n * Stores the counter clock-wise side orientation\n */\nConstants.MATERIAL_CounterClockWiseSideOrientation = 1;\n/**\n * Nothing\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_NothingTrigger = 0;\n/**\n * On pick\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnPickTrigger = 1;\n/**\n * On left pick\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnLeftPickTrigger = 2;\n/**\n * On right pick\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnRightPickTrigger = 3;\n/**\n * On center pick\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnCenterPickTrigger = 4;\n/**\n * On pick down\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnPickDownTrigger = 5;\n/**\n * On double pick\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnDoublePickTrigger = 6;\n/**\n * On pick up\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnPickUpTrigger = 7;\n/**\n * On pick out.\n * This trigger will only be raised if you also declared a OnPickDown\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnPickOutTrigger = 16;\n/**\n * On long press\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnLongPressTrigger = 8;\n/**\n * On pointer over\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnPointerOverTrigger = 9;\n/**\n * On pointer out\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnPointerOutTrigger = 10;\n/**\n * On every frame\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnEveryFrameTrigger = 11;\n/**\n * On intersection enter\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnIntersectionEnterTrigger = 12;\n/**\n * On intersection exit\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnIntersectionExitTrigger = 13;\n/**\n * On key down\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnKeyDownTrigger = 14;\n/**\n * On key up\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions#triggers\n */\nConstants.ACTION_OnKeyUpTrigger = 15;\n/**\n * Billboard mode will only apply to Y axis\n */\nConstants.PARTICLES_BILLBOARDMODE_Y = 2;\n/**\n * Billboard mode will apply to all axes\n */\nConstants.PARTICLES_BILLBOARDMODE_ALL = 7;\n/**\n * Special billboard mode where the particle will be biilboard to the camera but rotated to align with direction\n */\nConstants.PARTICLES_BILLBOARDMODE_STRETCHED = 8;\n/**\n * Special billboard mode where the particle will be billboard to the camera but only around the axis of the direction of particle emission\n */\nConstants.PARTICLES_BILLBOARDMODE_STRETCHED_LOCAL = 9;\n/** Default culling strategy : this is an exclusion test and it's the more accurate.\n * Test order :\n * Is the bounding sphere outside the frustum ?\n * If not, are the bounding box vertices outside the frustum ?\n * It not, then the cullable object is in the frustum.\n */\nConstants.MESHES_CULLINGSTRATEGY_STANDARD = 0;\n/** Culling strategy : Bounding Sphere Only.\n * This is an exclusion test. It's faster than the standard strategy because the bounding box is not tested.\n * It's also less accurate than the standard because some not visible objects can still be selected.\n * Test : is the bounding sphere outside the frustum ?\n * If not, then the cullable object is in the frustum.\n */\nConstants.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY = 1;\n/** Culling strategy : Optimistic Inclusion.\n * This in an inclusion test first, then the standard exclusion test.\n * This can be faster when a cullable object is expected to be almost always in the camera frustum.\n * This could also be a little slower than the standard test when the tested object center is not the frustum but one of its bounding box vertex is still inside.\n * Anyway, it's as accurate as the standard strategy.\n * Test :\n * Is the cullable object bounding sphere center in the frustum ?\n * If not, apply the default culling strategy.\n */\nConstants.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION = 2;\n/** Culling strategy : Optimistic Inclusion then Bounding Sphere Only.\n * This in an inclusion test first, then the bounding sphere only exclusion test.\n * This can be the fastest test when a cullable object is expected to be almost always in the camera frustum.\n * This could also be a little slower than the BoundingSphereOnly strategy when the tested object center is not in the frustum but its bounding sphere still intersects it.\n * It's less accurate than the standard strategy and as accurate as the BoundingSphereOnly strategy.\n * Test :\n * Is the cullable object bounding sphere center in the frustum ?\n * If not, apply the Bounding Sphere Only strategy. No Bounding Box is tested here.\n */\nConstants.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY = 3;\n/**\n * No logging while loading\n */\nConstants.SCENELOADER_NO_LOGGING = 0;\n/**\n * Minimal logging while loading\n */\nConstants.SCENELOADER_MINIMAL_LOGGING = 1;\n/**\n * Summary logging while loading\n */\nConstants.SCENELOADER_SUMMARY_LOGGING = 2;\n/**\n * Detailed logging while loading\n */\nConstants.SCENELOADER_DETAILED_LOGGING = 3;\n/**\n * Constant used to retrieve the irradiance texture index in the textures array in the prepass\n * using getIndex(Constants.PREPASS_IRRADIANCE_TEXTURE_TYPE)\n */\nConstants.PREPASS_IRRADIANCE_TEXTURE_TYPE = 0;\n/**\n * Constant used to retrieve the position texture index in the textures array in the prepass\n * using getIndex(Constants.PREPASS_POSITION_TEXTURE_INDEX)\n */\nConstants.PREPASS_POSITION_TEXTURE_TYPE = 1;\n/**\n * Constant used to retrieve the velocity texture index in the textures array in the prepass\n * using getIndex(Constants.PREPASS_VELOCITY_TEXTURE_INDEX)\n */\nConstants.PREPASS_VELOCITY_TEXTURE_TYPE = 2;\n/**\n * Constant used to retrieve the reflectivity texture index in the textures array in the prepass\n * using the getIndex(Constants.PREPASS_REFLECTIVITY_TEXTURE_TYPE)\n */\nConstants.PREPASS_REFLECTIVITY_TEXTURE_TYPE = 3;\n/**\n * Constant used to retrieve the lit color texture index in the textures array in the prepass\n * using the getIndex(Constants.PREPASS_COLOR_TEXTURE_TYPE)\n */\nConstants.PREPASS_COLOR_TEXTURE_TYPE = 4;\n/**\n * Constant used to retrieve depth index in the textures array in the prepass\n * using the getIndex(Constants.PREPASS_DEPTH_TEXTURE_TYPE)\n */\nConstants.PREPASS_DEPTH_TEXTURE_TYPE = 5;\n/**\n * Constant used to retrieve normal index in the textures array in the prepass\n * using the getIndex(Constants.PREPASS_NORMAL_TEXTURE_TYPE)\n */\nConstants.PREPASS_NORMAL_TEXTURE_TYPE = 6;\n/**\n * Constant used to retrieve albedo index in the textures array in the prepass\n * using the getIndex(Constants.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE)\n */\nConstants.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE = 7;\n/** Flag to create a readable buffer (the buffer can be the source of a copy) */\nConstants.BUFFER_CREATIONFLAG_READ = 1;\n/** Flag to create a writable buffer (the buffer can be the destination of a copy) */\nConstants.BUFFER_CREATIONFLAG_WRITE = 2;\n/** Flag to create a readable and writable buffer */\nConstants.BUFFER_CREATIONFLAG_READWRITE = 3;\n/** Flag to create a buffer suitable to be used as a uniform buffer */\nConstants.BUFFER_CREATIONFLAG_UNIFORM = 4;\n/** Flag to create a buffer suitable to be used as a vertex buffer */\nConstants.BUFFER_CREATIONFLAG_VERTEX = 8;\n/** Flag to create a buffer suitable to be used as an index buffer */\nConstants.BUFFER_CREATIONFLAG_INDEX = 16;\n/** Flag to create a buffer suitable to be used as a storage buffer */\nConstants.BUFFER_CREATIONFLAG_STORAGE = 32;\n/**\n * Prefixes used by the engine for sub mesh draw wrappers\n */\n/** @internal */\nConstants.RENDERPASS_MAIN = 0;\n/**\n * Constant used as key code for Alt key\n */\nConstants.INPUT_ALT_KEY = 18;\n/**\n * Constant used as key code for Ctrl key\n */\nConstants.INPUT_CTRL_KEY = 17;\n/**\n * Constant used as key code for Meta key (Left Win, Left Cmd)\n */\nConstants.INPUT_META_KEY1 = 91;\n/**\n * Constant used as key code for Meta key (Right Win)\n */\nConstants.INPUT_META_KEY2 = 92;\n/**\n * Constant used as key code for Meta key (Right Win, Right Cmd)\n */\nConstants.INPUT_META_KEY3 = 93;\n/**\n * Constant used as key code for Shift key\n */\nConstants.INPUT_SHIFT_KEY = 16;\n/** Standard snapshot rendering. In this mode, some form of dynamic behavior is possible (for eg, uniform buffers are still updated) */\nConstants.SNAPSHOTRENDERING_STANDARD = 0;\n/** Fast snapshot rendering. In this mode, everything is static and only some limited form of dynamic behaviour is possible */\nConstants.SNAPSHOTRENDERING_FAST = 1;\n/**\n * This is the default projection mode used by the cameras.\n * It helps recreating a feeling of perspective and better appreciate depth.\n * This is the best way to simulate real life cameras.\n */\nConstants.PERSPECTIVE_CAMERA = 0;\n/**\n * This helps creating camera with an orthographic mode.\n * Orthographic is commonly used in engineering as a means to produce object specifications that communicate dimensions unambiguously, each line of 1 unit length (cm, meter..whatever) will appear to have the same length everywhere on the drawing. This allows the drafter to dimension only a subset of lines and let the reader know that other lines of that length on the drawing are also that length in reality. Every parallel line in the drawing is also parallel in the object.\n */\nConstants.ORTHOGRAPHIC_CAMERA = 1;\n/**\n * This is the default FOV mode for perspective cameras.\n * This setting aligns the upper and lower bounds of the viewport to the upper and lower bounds of the camera frustum.\n */\nConstants.FOVMODE_VERTICAL_FIXED = 0;\n/**\n * This setting aligns the left and right bounds of the viewport to the left and right bounds of the camera frustum.\n */\nConstants.FOVMODE_HORIZONTAL_FIXED = 1;\n/**\n * This specifies there is no need for a camera rig.\n * Basically only one eye is rendered corresponding to the camera.\n */\nConstants.RIG_MODE_NONE = 0;\n/**\n * Simulates a camera Rig with one blue eye and one red eye.\n * This can be use with 3d blue and red glasses.\n */\nConstants.RIG_MODE_STEREOSCOPIC_ANAGLYPH = 10;\n/**\n * Defines that both eyes of the camera will be rendered side by side with a parallel target.\n */\nConstants.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL = 11;\n/**\n * Defines that both eyes of the camera will be rendered side by side with a none parallel target.\n */\nConstants.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED = 12;\n/**\n * Defines that both eyes of the camera will be rendered over under each other.\n */\nConstants.RIG_MODE_STEREOSCOPIC_OVERUNDER = 13;\n/**\n * Defines that both eyes of the camera will be rendered on successive lines interlaced for passive 3d monitors.\n */\nConstants.RIG_MODE_STEREOSCOPIC_INTERLACED = 14;\n/**\n * Defines that both eyes of the camera should be renderered in a VR mode (carbox).\n */\nConstants.RIG_MODE_VR = 20;\n/**\n * Custom rig mode allowing rig cameras to be populated manually with any number of cameras\n */\nConstants.RIG_MODE_CUSTOM = 22;\n/**\n * Maximum number of uv sets supported\n */\nConstants.MAX_SUPPORTED_UV_SETS = 6;\n/**\n * GL constants\n */\n/** Alpha blend equation: ADD */\nConstants.GL_ALPHA_EQUATION_ADD = 0x8006;\n/** Alpha equation: MIN */\nConstants.GL_ALPHA_EQUATION_MIN = 0x8007;\n/** Alpha equation: MAX */\nConstants.GL_ALPHA_EQUATION_MAX = 0x8008;\n/** Alpha equation: SUBTRACT */\nConstants.GL_ALPHA_EQUATION_SUBTRACT = 0x800a;\n/** Alpha equation: REVERSE_SUBTRACT */\nConstants.GL_ALPHA_EQUATION_REVERSE_SUBTRACT = 0x800b;\n/** Alpha blend function: SRC */\nConstants.GL_ALPHA_FUNCTION_SRC = 0x0300;\n/** Alpha blend function: ONE_MINUS_SRC */\nConstants.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR = 0x0301;\n/** Alpha blend function: SRC_ALPHA */\nConstants.GL_ALPHA_FUNCTION_SRC_ALPHA = 0x0302;\n/** Alpha blend function: ONE_MINUS_SRC_ALPHA */\nConstants.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA = 0x0303;\n/** Alpha blend function: DST_ALPHA */\nConstants.GL_ALPHA_FUNCTION_DST_ALPHA = 0x0304;\n/** Alpha blend function: ONE_MINUS_DST_ALPHA */\nConstants.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA = 0x0305;\n/** Alpha blend function: ONE_MINUS_DST */\nConstants.GL_ALPHA_FUNCTION_DST_COLOR = 0x0306;\n/** Alpha blend function: ONE_MINUS_DST */\nConstants.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR = 0x0307;\n/** Alpha blend function: SRC_ALPHA_SATURATED */\nConstants.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED = 0x0308;\n/** Alpha blend function: CONSTANT */\nConstants.GL_ALPHA_FUNCTION_CONSTANT_COLOR = 0x8001;\n/** Alpha blend function: ONE_MINUS_CONSTANT */\nConstants.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR = 0x8002;\n/** Alpha blend function: CONSTANT_ALPHA */\nConstants.GL_ALPHA_FUNCTION_CONSTANT_ALPHA = 0x8003;\n/** Alpha blend function: ONE_MINUS_CONSTANT_ALPHA */\nConstants.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA = 0x8004;\n/** URL to the snippet server. Points to the public snippet server by default */\nConstants.SnippetUrl = \"https://snippet.babylonjs.com\";\n//# sourceMappingURL=constants.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/helperFunctions.js\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nconst name = \"passCubePixelShader\";\nconst shader = `varying vec2 vUV;uniform samplerCube textureSampler;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{vec2 uv=vUV*2.0-1.0;\n#ifdef POSITIVEX\ngl_FragColor=textureCube(textureSampler,vec3(1.001,uv.y,uv.x));\n#endif\n#ifdef NEGATIVEX\ngl_FragColor=textureCube(textureSampler,vec3(-1.001,uv.y,uv.x));\n#endif\n#ifdef POSITIVEY\ngl_FragColor=textureCube(textureSampler,vec3(uv.y,1.001,uv.x));\n#endif\n#ifdef NEGATIVEY\ngl_FragColor=textureCube(textureSampler,vec3(uv.y,-1.001,uv.x));\n#endif\n#ifdef POSITIVEZ\ngl_FragColor=textureCube(textureSampler,vec3(uv,1.001));\n#endif\n#ifdef NEGATIVEZ\ngl_FragColor=textureCube(textureSampler,vec3(uv,-1.001));\n#endif\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const passCubePixelShader = { name, shader };\n//# sourceMappingURL=passCube.fragment.js.map","\nimport { PostProcess } from \"./postProcess.js\";\nimport { Engine } from \"../Engines/engine.js\";\nimport \"../Shaders/pass.fragment.js\";\nimport \"../Shaders/passCube.fragment.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { SerializationHelper } from \"../Misc/decorators.js\";\n/**\n * PassPostProcess which produces an output the same as it's input\n */\nexport class PassPostProcess extends PostProcess {\n /**\n * Gets a string identifying the name of the class\n * @returns \"PassPostProcess\" string\n */\n getClassName() {\n return \"PassPostProcess\";\n }\n /**\n * Creates the PassPostProcess\n * @param name The name of the effect.\n * @param options The required width/height ratio to downsize to before computing the render pass.\n * @param camera The camera to apply the render pass to.\n * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)\n * @param engine The engine which the post process will be applied. (default: current engine)\n * @param reusable If the post process can be reused on the same frame. (default: false)\n * @param textureType The type of texture to be used when performing the post processing.\n * @param blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)\n */\n constructor(name, options, camera = null, samplingMode, engine, reusable, textureType = 0, blockCompilation = false) {\n super(name, \"pass\", null, null, options, camera, samplingMode, engine, reusable, undefined, textureType, undefined, null, blockCompilation);\n }\n /**\n * @internal\n */\n static _Parse(parsedPostProcess, targetCamera, scene, rootUrl) {\n return SerializationHelper.Parse(() => {\n return new PassPostProcess(parsedPostProcess.name, parsedPostProcess.options, targetCamera, parsedPostProcess.renderTargetSamplingMode, parsedPostProcess._engine, parsedPostProcess.reusable);\n }, parsedPostProcess, scene, rootUrl);\n }\n}\nRegisterClass(\"BABYLON.PassPostProcess\", PassPostProcess);\n/**\n * PassCubePostProcess which produces an output the same as it's input (which must be a cube texture)\n */\nexport class PassCubePostProcess extends PostProcess {\n /**\n * Gets or sets the cube face to display.\n * * 0 is +X\n * * 1 is -X\n * * 2 is +Y\n * * 3 is -Y\n * * 4 is +Z\n * * 5 is -Z\n */\n get face() {\n return this._face;\n }\n set face(value) {\n if (value < 0 || value > 5) {\n return;\n }\n this._face = value;\n switch (this._face) {\n case 0:\n this.updateEffect(\"#define POSITIVEX\");\n break;\n case 1:\n this.updateEffect(\"#define NEGATIVEX\");\n break;\n case 2:\n this.updateEffect(\"#define POSITIVEY\");\n break;\n case 3:\n this.updateEffect(\"#define NEGATIVEY\");\n break;\n case 4:\n this.updateEffect(\"#define POSITIVEZ\");\n break;\n case 5:\n this.updateEffect(\"#define NEGATIVEZ\");\n break;\n }\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"PassCubePostProcess\" string\n */\n getClassName() {\n return \"PassCubePostProcess\";\n }\n /**\n * Creates the PassCubePostProcess\n * @param name The name of the effect.\n * @param options The required width/height ratio to downsize to before computing the render pass.\n * @param camera The camera to apply the render pass to.\n * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)\n * @param engine The engine which the post process will be applied. (default: current engine)\n * @param reusable If the post process can be reused on the same frame. (default: false)\n * @param textureType The type of texture to be used when performing the post processing.\n * @param blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)\n */\n constructor(name, options, camera = null, samplingMode, engine, reusable, textureType = 0, blockCompilation = false) {\n super(name, \"passCube\", null, null, options, camera, samplingMode, engine, reusable, \"#define POSITIVEX\", textureType, undefined, null, blockCompilation);\n this._face = 0;\n }\n /**\n * @internal\n */\n static _Parse(parsedPostProcess, targetCamera, scene, rootUrl) {\n return SerializationHelper.Parse(() => {\n return new PassCubePostProcess(parsedPostProcess.name, parsedPostProcess.options, targetCamera, parsedPostProcess.renderTargetSamplingMode, parsedPostProcess._engine, parsedPostProcess.reusable);\n }, parsedPostProcess, scene, rootUrl);\n }\n}\nEngine._RescalePostProcessFactory = (engine) => {\n return new PassPostProcess(\"rescale\", 1, null, 2, engine, false, 0);\n};\n//# sourceMappingURL=passPostProcess.js.map","import { Texture } from \"../Materials/Textures/texture.js\";\nimport { RenderTargetTexture } from \"../Materials/Textures/renderTargetTexture.js\";\nimport { PassPostProcess } from \"../PostProcesses/passPostProcess.js\";\n\nimport { PostProcess } from \"../PostProcesses/postProcess.js\";\n/**\n * Uses the GPU to create a copy texture rescaled at a given size\n * @param texture Texture to copy from\n * @param width defines the desired width\n * @param height defines the desired height\n * @param useBilinearMode defines if bilinear mode has to be used\n * @returns the generated texture\n */\nexport function CreateResizedCopy(texture, width, height, useBilinearMode = true) {\n const scene = texture.getScene();\n const engine = scene.getEngine();\n const rtt = new RenderTargetTexture(\"resized\" + texture.name, { width: width, height: height }, scene, !texture.noMipmap, true, texture._texture.type, false, texture.samplingMode, false);\n rtt.wrapU = texture.wrapU;\n rtt.wrapV = texture.wrapV;\n rtt.uOffset = texture.uOffset;\n rtt.vOffset = texture.vOffset;\n rtt.uScale = texture.uScale;\n rtt.vScale = texture.vScale;\n rtt.uAng = texture.uAng;\n rtt.vAng = texture.vAng;\n rtt.wAng = texture.wAng;\n rtt.coordinatesIndex = texture.coordinatesIndex;\n rtt.level = texture.level;\n rtt.anisotropicFilteringLevel = texture.anisotropicFilteringLevel;\n rtt._texture.isReady = false;\n texture.wrapU = Texture.CLAMP_ADDRESSMODE;\n texture.wrapV = Texture.CLAMP_ADDRESSMODE;\n const passPostProcess = new PassPostProcess(\"pass\", 1, null, useBilinearMode ? Texture.BILINEAR_SAMPLINGMODE : Texture.NEAREST_SAMPLINGMODE, engine, false, 0);\n passPostProcess.externalTextureSamplerBinding = true;\n passPostProcess.getEffect().executeWhenCompiled(() => {\n passPostProcess.onApply = function (effect) {\n effect.setTexture(\"textureSampler\", texture);\n };\n const internalTexture = rtt.renderTarget;\n if (internalTexture) {\n scene.postProcessManager.directRender([passPostProcess], internalTexture);\n engine.unBindFramebuffer(internalTexture);\n rtt.disposeFramebufferObjects();\n passPostProcess.dispose();\n rtt.getInternalTexture().isReady = true;\n }\n });\n return rtt;\n}\n/**\n * Apply a post process to a texture\n * @param postProcessName name of the fragment post process\n * @param internalTexture the texture to encode\n * @param scene the scene hosting the texture\n * @param type type of the output texture. If not provided, use the one from internalTexture\n * @param samplingMode sampling mode to use to sample the source texture. If not provided, use the one from internalTexture\n * @param format format of the output texture. If not provided, use the one from internalTexture\n * @returns a promise with the internalTexture having its texture replaced by the result of the processing\n */\nexport function ApplyPostProcess(postProcessName, internalTexture, scene, type, samplingMode, format, width, height) {\n // Gets everything ready.\n const engine = internalTexture.getEngine();\n internalTexture.isReady = false;\n samplingMode = samplingMode !== null && samplingMode !== void 0 ? samplingMode : internalTexture.samplingMode;\n type = type !== null && type !== void 0 ? type : internalTexture.type;\n format = format !== null && format !== void 0 ? format : internalTexture.format;\n width = width !== null && width !== void 0 ? width : internalTexture.width;\n height = height !== null && height !== void 0 ? height : internalTexture.height;\n if (type === -1) {\n type = 0;\n }\n return new Promise((resolve) => {\n // Create the post process\n const postProcess = new PostProcess(\"postprocess\", postProcessName, null, null, 1, null, samplingMode, engine, false, undefined, type, undefined, null, false, format);\n postProcess.externalTextureSamplerBinding = true;\n // Hold the output of the decoding.\n const encodedTexture = engine.createRenderTargetTexture({ width: width, height: height }, {\n generateDepthBuffer: false,\n generateMipMaps: false,\n generateStencilBuffer: false,\n samplingMode,\n type,\n format,\n });\n postProcess.getEffect().executeWhenCompiled(() => {\n // PP Render Pass\n postProcess.onApply = (effect) => {\n effect._bindTexture(\"textureSampler\", internalTexture);\n effect.setFloat2(\"scale\", 1, 1);\n };\n scene.postProcessManager.directRender([postProcess], encodedTexture, true);\n // Cleanup\n engine.restoreDefaultFramebuffer();\n engine._releaseTexture(internalTexture);\n if (postProcess) {\n postProcess.dispose();\n }\n // Internal Swap\n encodedTexture._swapAndDie(internalTexture);\n // Ready to get rolling again.\n internalTexture.type = type;\n internalTexture.format = 5;\n internalTexture.isReady = true;\n resolve(internalTexture);\n });\n });\n}\n// ref: http://stackoverflow.com/questions/32633585/how-do-you-convert-to-half-floats-in-javascript\nlet floatView;\nlet int32View;\n/**\n * Converts a number to half float\n * @param value number to convert\n * @returns converted number\n */\nexport function ToHalfFloat(value) {\n if (!floatView) {\n floatView = new Float32Array(1);\n int32View = new Int32Array(floatView.buffer);\n }\n floatView[0] = value;\n const x = int32View[0];\n let bits = (x >> 16) & 0x8000; /* Get the sign */\n let m = (x >> 12) & 0x07ff; /* Keep one extra bit for rounding */\n const e = (x >> 23) & 0xff; /* Using int is faster here */\n /* If zero, or denormal, or exponent underflows too much for a denormal\n * half, return signed zero. */\n if (e < 103) {\n return bits;\n }\n /* If NaN, return NaN. If Inf or exponent overflow, return Inf. */\n if (e > 142) {\n bits |= 0x7c00;\n /* If exponent was 0xff and one mantissa bit was set, it means NaN,\n * not Inf, so make sure we set one mantissa bit too. */\n bits |= (e == 255 ? 0 : 1) && x & 0x007fffff;\n return bits;\n }\n /* If exponent underflows but not too much, return a denormal */\n if (e < 113) {\n m |= 0x0800;\n /* Extra rounding may overflow and set mantissa to 0 and exponent\n * to 1, which is OK. */\n bits |= (m >> (114 - e)) + ((m >> (113 - e)) & 1);\n return bits;\n }\n bits |= ((e - 112) << 10) | (m >> 1);\n bits += m & 1;\n return bits;\n}\n/**\n * Converts a half float to a number\n * @param value half float to convert\n * @returns converted half float\n */\nexport function FromHalfFloat(value) {\n const s = (value & 0x8000) >> 15;\n const e = (value & 0x7c00) >> 10;\n const f = value & 0x03ff;\n if (e === 0) {\n return (s ? -1 : 1) * Math.pow(2, -14) * (f / Math.pow(2, 10));\n }\n else if (e == 0x1f) {\n return f ? NaN : (s ? -1 : 1) * Infinity;\n }\n return (s ? -1 : 1) * Math.pow(2, e - 15) * (1 + f / Math.pow(2, 10));\n}\nconst ProcessAsync = async (texture, width, height, face, lod) => {\n const scene = texture.getScene();\n const engine = scene.getEngine();\n let lodPostProcess;\n if (!texture.isCube) {\n lodPostProcess = new PostProcess(\"lod\", \"lod\", [\"lod\", \"gamma\"], null, 1.0, null, Texture.NEAREST_NEAREST_MIPNEAREST, engine);\n }\n else {\n const faceDefines = [\"#define POSITIVEX\", \"#define NEGATIVEX\", \"#define POSITIVEY\", \"#define NEGATIVEY\", \"#define POSITIVEZ\", \"#define NEGATIVEZ\"];\n lodPostProcess = new PostProcess(\"lodCube\", \"lodCube\", [\"lod\", \"gamma\"], null, 1.0, null, Texture.NEAREST_NEAREST_MIPNEAREST, engine, false, faceDefines[face]);\n }\n await new Promise((resolve) => {\n lodPostProcess.getEffect().executeWhenCompiled(() => {\n resolve(0);\n });\n });\n const rtt = new RenderTargetTexture(\"temp\", { width: width, height: height }, scene, false);\n lodPostProcess.onApply = function (effect) {\n effect.setTexture(\"textureSampler\", texture);\n effect.setFloat(\"lod\", lod);\n effect.setBool(\"gamma\", texture.gammaSpace);\n };\n const internalTexture = texture.getInternalTexture();\n try {\n if (rtt.renderTarget && internalTexture) {\n const samplingMode = internalTexture.samplingMode;\n if (lod !== 0) {\n texture.updateSamplingMode(Texture.NEAREST_NEAREST_MIPNEAREST);\n }\n else {\n texture.updateSamplingMode(Texture.NEAREST_NEAREST);\n }\n scene.postProcessManager.directRender([lodPostProcess], rtt.renderTarget, true);\n texture.updateSamplingMode(samplingMode);\n //Reading datas from WebGL\n const bufferView = await engine.readPixels(0, 0, width, height);\n const data = new Uint8Array(bufferView.buffer, 0, bufferView.byteLength);\n // Unbind\n engine.unBindFramebuffer(rtt.renderTarget);\n return data;\n }\n else {\n throw Error(\"Render to texture failed.\");\n }\n }\n finally {\n rtt.dispose();\n lodPostProcess.dispose();\n }\n};\n/**\n * Gets the data of the specified texture by rendering it to an intermediate RGBA texture and retrieving the bytes from it.\n * This is convienent to get 8-bit RGBA values for a texture in a GPU compressed format.\n * @param texture the source texture\n * @param width the width of the result, which does not have to match the source texture width\n * @param height the height of the result, which does not have to match the source texture height\n * @param face if the texture has multiple faces, the face index to use for the source\n * @param lod if the texture has multiple LODs, the lod index to use for the source\n * @returns the 8-bit texture data\n */\nexport async function GetTextureDataAsync(texture, width, height, face = 0, lod = 0) {\n if (!texture.isReady() && texture._texture) {\n await new Promise((resolve, reject) => {\n if (texture._texture === null) {\n reject(0);\n return;\n }\n texture._texture.onLoadedObservable.addOnce(() => {\n resolve(0);\n });\n });\n }\n return await ProcessAsync(texture, width, height, face, lod);\n}\n/**\n * Class used to host texture specific utilities\n */\nexport const TextureTools = {\n /**\n * Uses the GPU to create a copy texture rescaled at a given size\n * @param texture Texture to copy from\n * @param width defines the desired width\n * @param height defines the desired height\n * @param useBilinearMode defines if bilinear mode has to be used\n * @returns the generated texture\n */\n CreateResizedCopy,\n /**\n * Apply a post process to a texture\n * @param postProcessName name of the fragment post process\n * @param internalTexture the texture to encode\n * @param scene the scene hosting the texture\n * @param type type of the output texture. If not provided, use the one from internalTexture\n * @param samplingMode sampling mode to use to sample the source texture. If not provided, use the one from internalTexture\n * @param format format of the output texture. If not provided, use the one from internalTexture\n * @returns a promise with the internalTexture having its texture replaced by the result of the processing\n */\n ApplyPostProcess,\n /**\n * Converts a number to half float\n * @param value number to convert\n * @returns converted number\n */\n ToHalfFloat,\n /**\n * Converts a half float to a number\n * @param value half float to convert\n * @returns converted half float\n */\n FromHalfFloat,\n /**\n * Gets the data of the specified texture by rendering it to an intermediate RGBA texture and retrieving the bytes from it.\n * This is convienent to get 8-bit RGBA values for a texture in a GPU compressed format.\n * @param texture the source texture\n * @param width the width of the result, which does not have to match the source texture width\n * @param height the height of the result, which does not have to match the source texture height\n * @param face if the texture has multiple faces, the face index to use for the source\n * @param channels a filter for which of the RGBA channels to return in the result\n * @param lod if the texture has multiple LODs, the lod index to use for the source\n * @returns the 8-bit texture data\n */\n GetTextureDataAsync,\n};\n//# sourceMappingURL=textureTools.js.map","\nimport { PostProcess } from \"../PostProcesses/postProcess.js\";\nimport \"../Shaders/rgbdDecode.fragment.js\";\nimport \"../Engines/Extensions/engine.renderTarget.js\";\nimport { ApplyPostProcess } from \"./textureTools.js\";\n/**\n * Class used to host RGBD texture specific utilities\n */\nexport class RGBDTextureTools {\n /**\n * Expand the RGBD Texture from RGBD to Half Float if possible.\n * @param texture the texture to expand.\n */\n static ExpandRGBDTexture(texture) {\n const internalTexture = texture._texture;\n if (!internalTexture || !texture.isRGBD) {\n return;\n }\n // Gets everything ready.\n const engine = internalTexture.getEngine();\n const caps = engine.getCaps();\n const isReady = internalTexture.isReady;\n let expandTexture = false;\n // If half float available we can uncompress the texture\n if (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering) {\n expandTexture = true;\n internalTexture.type = 2;\n }\n // If full float available we can uncompress the texture\n else if (caps.textureFloatRender && caps.textureFloatLinearFiltering) {\n expandTexture = true;\n internalTexture.type = 1;\n }\n if (expandTexture) {\n // Do not use during decode.\n internalTexture.isReady = false;\n internalTexture._isRGBD = false;\n internalTexture.invertY = false;\n }\n const expandRGBDTexture = () => {\n // Expand the texture if possible\n if (expandTexture) {\n // Simply run through the decode PP.\n const rgbdPostProcess = new PostProcess(\"rgbdDecode\", \"rgbdDecode\", null, null, 1, null, 3, engine, false, undefined, internalTexture.type, undefined, null, false);\n rgbdPostProcess.externalTextureSamplerBinding = true;\n // Hold the output of the decoding.\n const expandedTexture = engine.createRenderTargetTexture(internalTexture.width, {\n generateDepthBuffer: false,\n generateMipMaps: false,\n generateStencilBuffer: false,\n samplingMode: internalTexture.samplingMode,\n type: internalTexture.type,\n format: 5,\n });\n rgbdPostProcess.getEffect().executeWhenCompiled(() => {\n // PP Render Pass\n rgbdPostProcess.onApply = (effect) => {\n effect._bindTexture(\"textureSampler\", internalTexture);\n effect.setFloat2(\"scale\", 1, 1);\n };\n texture.getScene().postProcessManager.directRender([rgbdPostProcess], expandedTexture, true);\n // Cleanup\n engine.restoreDefaultFramebuffer();\n engine._releaseTexture(internalTexture);\n if (rgbdPostProcess) {\n rgbdPostProcess.dispose();\n }\n // Internal Swap\n expandedTexture._swapAndDie(internalTexture);\n // Ready to get rolling again.\n internalTexture.isReady = true;\n });\n }\n };\n if (isReady) {\n expandRGBDTexture();\n }\n else {\n texture.onLoadObservable.addOnce(expandRGBDTexture);\n }\n }\n /**\n * Encode the texture to RGBD if possible.\n * @param internalTexture the texture to encode\n * @param scene the scene hosting the texture\n * @param outputTextureType type of the texture in which the encoding is performed\n * @returns a promise with the internalTexture having its texture replaced by the result of the processing\n */\n static EncodeTextureToRGBD(internalTexture, scene, outputTextureType = 0) {\n return ApplyPostProcess(\"rgbdEncode\", internalTexture, scene, outputTextureType, 1, 5);\n }\n}\n//# sourceMappingURL=rgbdTextureTools.js.map","import { Texture } from \"../Materials/Textures/texture.js\";\nimport { RGBDTextureTools } from \"./rgbdTextureTools.js\";\nimport { Tools } from \"./tools.js\";\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst _environmentBRDFBase64Texture = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAgAElEQVR42u29yY5tWXIlZnbuiSaTbZFUkZRKrCKhElASQA0EoQABgn6hJvoXzfUP+gP9hWb6Bg00IgRoQJaKqUxmZmTEe8/v0uB2u7Fm2T7HIyIrnz88uPvt3f2a2W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eTPl0jEZwIgP9gDEaogeg5IHWCF+1eoAhvEKPB/EAeTRsM/pSAP5wjWEUMM1/NJRhwJbpJSgK7S7zF3EOsI5jBQBK9DV80Z8Y0COzvmWzJXgDl40KEC6cqvqgi4OB5cpgLFYK/1CvDiItXqC6/S87wfAUfPtxqfGNzlYaOjlf1IsHPPvffHgDAoEeEST4ZLZUd/RSo91/BjXY5ggWgQ4In3fyj4mUqPrInHOCLKO3wUwRsfyXpt1nEIRLrqcWeTuk7bigsbid1zD4iDRQtnIdQsyIXnFCn1I9D7ADgxEhOvR5AJosoUbu1FkJyYCi9OhQERoIx+4AX/YqUXQhtYEwKN4Cy1HntLMmtaAQpqfrT/UCoLSxeswjA5UWPPi0mjajUWxMTdVusNvt/ChMdmILK5IRMFu90BMEzFYHdg2GAgeYVHMMJIBTA7EFTx/5fpgTFXz9w/en0ZjD8kCDoKPNGwlB01BmoWQbh+AxR689mBponGJOr9OwmMu3dtJ/ylW1Tik4ElUPmR9RqII+pVhD9ychABMQ51gOIZg+/G+5mGIzLB1JJC5WhzYjhJ7IWmLDpA8jzsAafUPkB2WnFBF4iSxkq1ty7f25rv/+EQLOxs2oUdTSA9HIR9swdBlCcFe9owPC3XWDDC0ISVzsEVbSCF/sWdA5Fu4HJqankp2SeQCYYrImNalfmhpVxYrGkUS4LeSUjg8dD7+D7w/ybIfy7vlB9/HJ978zr7/45Qgajzj+4EjIK/ULHPRAOlKr/aG0AFcqCyu0GcW45Igh6JMJmhA49/U+cEssHNJhtXDC1MOya3j/sAiAGcrEtqtgjBD6wEzSDc7D8o6C8rIqAZyPk+NQoNLAZ1hR64Yl1FBY648smUYKnSg1Xwk/0DyRyArByMUobyByhCcPnOaPyoegREFS4jNfYAw+IHCjdC1J2WDZBke/OyN85J24WiXwDYPoJyYuCD238ulvuzwt6KgHf0shWKsqCFFGjB/w8HU8eeTED9wAAAAABJRU5ErkJggg==\";\nlet _instanceNumber = 0;\n/**\n * Gets a default environment BRDF for MS-BRDF Height Correlated BRDF\n * @param scene defines the hosting scene\n * @returns the environment BRDF texture\n */\nexport const GetEnvironmentBRDFTexture = (scene) => {\n if (!scene.environmentBRDFTexture) {\n // Forces Delayed Texture Loading to prevent undefined error whilst setting RGBD values.\n const useDelayedTextureLoading = scene.useDelayedTextureLoading;\n scene.useDelayedTextureLoading = false;\n const previousState = scene._blockEntityCollection;\n scene._blockEntityCollection = false;\n const texture = Texture.CreateFromBase64String(_environmentBRDFBase64Texture, \"EnvironmentBRDFTexture\" + _instanceNumber++, scene, true, false, Texture.BILINEAR_SAMPLINGMODE);\n scene._blockEntityCollection = previousState;\n // BRDF Texture should not be cached here due to pre processing and redundant scene caches.\n const texturesCache = scene.getEngine().getLoadedTexturesCache();\n const index = texturesCache.indexOf(texture.getInternalTexture());\n if (index !== -1) {\n texturesCache.splice(index, 1);\n }\n texture.isRGBD = true;\n texture.wrapU = Texture.CLAMP_ADDRESSMODE;\n texture.wrapV = Texture.CLAMP_ADDRESSMODE;\n scene.environmentBRDFTexture = texture;\n scene.useDelayedTextureLoading = useDelayedTextureLoading;\n RGBDTextureTools.ExpandRGBDTexture(texture);\n const observer = scene.getEngine().onContextRestoredObservable.add(() => {\n texture.isRGBD = true;\n const checkReady = () => {\n if (texture.isReady()) {\n RGBDTextureTools.ExpandRGBDTexture(texture);\n }\n else {\n Tools.SetImmediate(checkReady);\n }\n };\n checkReady();\n });\n scene.onDisposeObservable.add(() => {\n scene.getEngine().onContextRestoredObservable.remove(observer);\n });\n }\n return scene.environmentBRDFTexture;\n};\n/**\n * Class used to host texture specific utilities\n */\nexport const BRDFTextureTools = {\n /**\n * Gets a default environment BRDF for MS-BRDF Height Correlated BRDF\n * @param scene defines the hosting scene\n * @returns the environment BRDF texture\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n GetEnvironmentBRDFTexture,\n};\n//# sourceMappingURL=brdfTextureTools.js.map","import { Material } from \"./material.js\";\nimport { MaterialPluginEvent } from \"./materialPluginEvent.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { ShaderProcessor } from \"../Engines/Processors/shaderProcessor.js\";\nimport { ShaderLanguage } from \"./shaderLanguage.js\";\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nconst rxOption = new RegExp(\"^([gimus]+)!\");\n/**\n * Class that manages the plugins of a material\n * @since 5.0\n */\nexport class MaterialPluginManager {\n /**\n * Creates a new instance of the plugin manager\n * @param material material that this manager will manage the plugins for\n */\n constructor(material) {\n /** @internal */\n this._plugins = [];\n this._activePlugins = [];\n this._activePluginsForExtraEvents = [];\n this._material = material;\n this._scene = material.getScene();\n this._engine = this._scene.getEngine();\n }\n /**\n * @internal\n */\n _addPlugin(plugin) {\n for (let i = 0; i < this._plugins.length; ++i) {\n if (this._plugins[i].name === plugin.name) {\n return false;\n }\n }\n if (this._material._uniformBufferLayoutBuilt) {\n throw `The plugin \"${plugin.name}\" can't be added to the material \"${this._material.name}\" because this material has already been used for rendering! Please add plugins to materials before any rendering with this material occurs.`;\n }\n const pluginClassName = plugin.getClassName();\n if (!MaterialPluginManager._MaterialPluginClassToMainDefine[pluginClassName]) {\n MaterialPluginManager._MaterialPluginClassToMainDefine[pluginClassName] = \"MATERIALPLUGIN_\" + ++MaterialPluginManager._MaterialPluginCounter;\n }\n this._material._callbackPluginEventGeneric = (id, info) => this._handlePluginEvent(id, info);\n this._plugins.push(plugin);\n this._plugins.sort((a, b) => a.priority - b.priority);\n this._codeInjectionPoints = {};\n const defineNamesFromPlugins = {};\n defineNamesFromPlugins[MaterialPluginManager._MaterialPluginClassToMainDefine[pluginClassName]] = {\n type: \"boolean\",\n default: true,\n };\n for (const plugin of this._plugins) {\n plugin.collectDefines(defineNamesFromPlugins);\n this._collectPointNames(\"vertex\", plugin.getCustomCode(\"vertex\"));\n this._collectPointNames(\"fragment\", plugin.getCustomCode(\"fragment\"));\n }\n this._defineNamesFromPlugins = defineNamesFromPlugins;\n return true;\n }\n /**\n * @internal\n */\n _activatePlugin(plugin) {\n if (this._activePlugins.indexOf(plugin) === -1) {\n this._activePlugins.push(plugin);\n this._activePlugins.sort((a, b) => a.priority - b.priority);\n this._material._callbackPluginEventIsReadyForSubMesh = this._handlePluginEventIsReadyForSubMesh.bind(this);\n this._material._callbackPluginEventPrepareDefinesBeforeAttributes = this._handlePluginEventPrepareDefinesBeforeAttributes.bind(this);\n this._material._callbackPluginEventPrepareDefines = this._handlePluginEventPrepareDefines.bind(this);\n this._material._callbackPluginEventBindForSubMesh = this._handlePluginEventBindForSubMesh.bind(this);\n if (plugin.registerForExtraEvents) {\n this._activePluginsForExtraEvents.push(plugin);\n this._activePluginsForExtraEvents.sort((a, b) => a.priority - b.priority);\n this._material._callbackPluginEventHasRenderTargetTextures = this._handlePluginEventHasRenderTargetTextures.bind(this);\n this._material._callbackPluginEventFillRenderTargetTextures = this._handlePluginEventFillRenderTargetTextures.bind(this);\n this._material._callbackPluginEventHardBindForSubMesh = this._handlePluginEventHardBindForSubMesh.bind(this);\n }\n }\n }\n /**\n * Gets a plugin from the list of plugins managed by this manager\n * @param name name of the plugin\n * @returns the plugin if found, else null\n */\n getPlugin(name) {\n for (let i = 0; i < this._plugins.length; ++i) {\n if (this._plugins[i].name === name) {\n return this._plugins[i];\n }\n }\n return null;\n }\n _handlePluginEventIsReadyForSubMesh(eventData) {\n let isReady = true;\n for (const plugin of this._activePlugins) {\n isReady = isReady && plugin.isReadyForSubMesh(eventData.defines, this._scene, this._engine, eventData.subMesh);\n }\n eventData.isReadyForSubMesh = isReady;\n }\n _handlePluginEventPrepareDefinesBeforeAttributes(eventData) {\n for (const plugin of this._activePlugins) {\n plugin.prepareDefinesBeforeAttributes(eventData.defines, this._scene, eventData.mesh);\n }\n }\n _handlePluginEventPrepareDefines(eventData) {\n for (const plugin of this._activePlugins) {\n plugin.prepareDefines(eventData.defines, this._scene, eventData.mesh);\n }\n }\n _handlePluginEventHardBindForSubMesh(eventData) {\n for (const plugin of this._activePluginsForExtraEvents) {\n plugin.hardBindForSubMesh(this._material._uniformBuffer, this._scene, this._engine, eventData.subMesh);\n }\n }\n _handlePluginEventBindForSubMesh(eventData) {\n for (const plugin of this._activePlugins) {\n plugin.bindForSubMesh(this._material._uniformBuffer, this._scene, this._engine, eventData.subMesh);\n }\n }\n _handlePluginEventHasRenderTargetTextures(eventData) {\n let hasRenderTargetTextures = false;\n for (const plugin of this._activePluginsForExtraEvents) {\n hasRenderTargetTextures = plugin.hasRenderTargetTextures();\n if (hasRenderTargetTextures) {\n break;\n }\n }\n eventData.hasRenderTargetTextures = hasRenderTargetTextures;\n }\n _handlePluginEventFillRenderTargetTextures(eventData) {\n for (const plugin of this._activePluginsForExtraEvents) {\n plugin.fillRenderTargetTextures(eventData.renderTargets);\n }\n }\n _handlePluginEvent(id, info) {\n var _a;\n switch (id) {\n case MaterialPluginEvent.GetActiveTextures: {\n const eventData = info;\n for (const plugin of this._activePlugins) {\n plugin.getActiveTextures(eventData.activeTextures);\n }\n break;\n }\n case MaterialPluginEvent.GetAnimatables: {\n const eventData = info;\n for (const plugin of this._activePlugins) {\n plugin.getAnimatables(eventData.animatables);\n }\n break;\n }\n case MaterialPluginEvent.HasTexture: {\n const eventData = info;\n let hasTexture = false;\n for (const plugin of this._activePlugins) {\n hasTexture = plugin.hasTexture(eventData.texture);\n if (hasTexture) {\n break;\n }\n }\n eventData.hasTexture = hasTexture;\n break;\n }\n case MaterialPluginEvent.Disposed: {\n const eventData = info;\n for (const plugin of this._plugins) {\n plugin.dispose(eventData.forceDisposeTextures);\n }\n break;\n }\n case MaterialPluginEvent.GetDefineNames: {\n const eventData = info;\n eventData.defineNames = this._defineNamesFromPlugins;\n break;\n }\n case MaterialPluginEvent.PrepareEffect: {\n const eventData = info;\n for (const plugin of this._activePlugins) {\n eventData.fallbackRank = plugin.addFallbacks(eventData.defines, eventData.fallbacks, eventData.fallbackRank);\n plugin.getAttributes(eventData.attributes, this._scene, eventData.mesh);\n }\n if (this._uniformList.length > 0) {\n eventData.uniforms.push(...this._uniformList);\n }\n if (this._samplerList.length > 0) {\n eventData.samplers.push(...this._samplerList);\n }\n if (this._uboList.length > 0) {\n eventData.uniformBuffersNames.push(...this._uboList);\n }\n eventData.customCode = this._injectCustomCode(eventData, eventData.customCode);\n break;\n }\n case MaterialPluginEvent.PrepareUniformBuffer: {\n const eventData = info;\n this._uboDeclaration = \"\";\n this._vertexDeclaration = \"\";\n this._fragmentDeclaration = \"\";\n this._uniformList = [];\n this._samplerList = [];\n this._uboList = [];\n for (const plugin of this._plugins) {\n const uniforms = plugin.getUniforms();\n if (uniforms) {\n if (uniforms.ubo) {\n for (const uniform of uniforms.ubo) {\n if (uniform.size && uniform.type) {\n const arraySize = (_a = uniform.arraySize) !== null && _a !== void 0 ? _a : 0;\n eventData.ubo.addUniform(uniform.name, uniform.size, arraySize);\n this._uboDeclaration += `${uniform.type} ${uniform.name}${arraySize > 0 ? `[${arraySize}]` : \"\"};\\n`;\n }\n this._uniformList.push(uniform.name);\n }\n }\n if (uniforms.vertex) {\n this._vertexDeclaration += uniforms.vertex + \"\\n\";\n }\n if (uniforms.fragment) {\n this._fragmentDeclaration += uniforms.fragment + \"\\n\";\n }\n }\n plugin.getSamplers(this._samplerList);\n plugin.getUniformBuffersNames(this._uboList);\n }\n break;\n }\n }\n }\n _collectPointNames(shaderType, customCode) {\n if (!customCode) {\n return;\n }\n for (const pointName in customCode) {\n if (!this._codeInjectionPoints[shaderType]) {\n this._codeInjectionPoints[shaderType] = {};\n }\n this._codeInjectionPoints[shaderType][pointName] = true;\n }\n }\n _injectCustomCode(eventData, existingCallback) {\n return (shaderType, code) => {\n var _a, _b;\n if (existingCallback) {\n code = existingCallback(shaderType, code);\n }\n if (this._uboDeclaration) {\n code = code.replace(\"#define ADDITIONAL_UBO_DECLARATION\", this._uboDeclaration);\n }\n if (this._vertexDeclaration) {\n code = code.replace(\"#define ADDITIONAL_VERTEX_DECLARATION\", this._vertexDeclaration);\n }\n if (this._fragmentDeclaration) {\n code = code.replace(\"#define ADDITIONAL_FRAGMENT_DECLARATION\", this._fragmentDeclaration);\n }\n const points = (_a = this._codeInjectionPoints) === null || _a === void 0 ? void 0 : _a[shaderType];\n if (!points) {\n return code;\n }\n let processorOptions = null;\n for (let pointName in points) {\n let injectedCode = \"\";\n for (const plugin of this._activePlugins) {\n let customCode = (_b = plugin.getCustomCode(shaderType)) === null || _b === void 0 ? void 0 : _b[pointName];\n if (!customCode) {\n continue;\n }\n if (plugin.resolveIncludes) {\n if (processorOptions === null) {\n const shaderLanguage = ShaderLanguage.GLSL;\n processorOptions = {\n defines: [],\n indexParameters: eventData.indexParameters,\n isFragment: false,\n shouldUseHighPrecisionShader: this._engine._shouldUseHighPrecisionShader,\n processor: undefined,\n supportsUniformBuffers: this._engine.supportsUniformBuffers,\n shadersRepository: ShaderStore.GetShadersRepository(shaderLanguage),\n includesShadersStore: ShaderStore.GetIncludesShadersStore(shaderLanguage),\n version: undefined,\n platformName: this._engine.shaderPlatformName,\n processingContext: undefined,\n isNDCHalfZRange: this._engine.isNDCHalfZRange,\n useReverseDepthBuffer: this._engine.useReverseDepthBuffer,\n processCodeAfterIncludes: undefined, // not used by _ProcessIncludes\n };\n }\n processorOptions.isFragment = shaderType === \"fragment\";\n ShaderProcessor._ProcessIncludes(customCode, processorOptions, (code) => (customCode = code));\n }\n injectedCode += customCode + \"\\n\";\n }\n if (injectedCode.length > 0) {\n if (pointName.charAt(0) === \"!\") {\n // pointName is a regular expression\n pointName = pointName.substring(1);\n let regexFlags = \"g\";\n if (pointName.charAt(0) === \"!\") {\n // no flags\n regexFlags = \"\";\n pointName = pointName.substring(1);\n }\n else {\n // get the flag(s)\n const matchOption = rxOption.exec(pointName);\n if (matchOption && matchOption.length >= 2) {\n regexFlags = matchOption[1];\n pointName = pointName.substring(regexFlags.length + 1);\n }\n }\n if (regexFlags.indexOf(\"g\") < 0) {\n // we force the \"g\" flag so that the regexp object is stateful!\n regexFlags += \"g\";\n }\n const sourceCode = code;\n const rx = new RegExp(pointName, regexFlags);\n let match = rx.exec(sourceCode);\n while (match !== null) {\n let newCode = injectedCode;\n for (let i = 0; i < match.length; ++i) {\n newCode = newCode.replace(\"$\" + i, match[i]);\n }\n code = code.replace(match[0], newCode);\n match = rx.exec(sourceCode);\n }\n }\n else {\n const fullPointName = \"#define \" + pointName;\n code = code.replace(fullPointName, \"\\n\" + injectedCode + \"\\n\" + fullPointName);\n }\n }\n }\n return code;\n };\n }\n}\n/** Map a plugin class name to a #define name (used in the vertex/fragment shaders as a marker of the plugin usage) */\nMaterialPluginManager._MaterialPluginClassToMainDefine = {};\nMaterialPluginManager._MaterialPluginCounter = 0;\n(() => {\n EngineStore.OnEnginesDisposedObservable.add(() => {\n UnregisterAllMaterialPlugins();\n });\n})();\nconst plugins = [];\nlet inited = false;\nlet observer = null;\n/**\n * Registers a new material plugin through a factory, or updates it. This makes the plugin available to all materials instantiated after its registration.\n * @param pluginName The plugin name\n * @param factory The factory function which allows to create the plugin\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function RegisterMaterialPlugin(pluginName, factory) {\n if (!inited) {\n observer = Material.OnEventObservable.add((material) => {\n for (const [, factory] of plugins) {\n factory(material);\n }\n }, MaterialPluginEvent.Created);\n inited = true;\n }\n const existing = plugins.filter(([name, _factory]) => name === pluginName);\n if (existing.length > 0) {\n existing[0][1] = factory;\n }\n else {\n plugins.push([pluginName, factory]);\n }\n}\n/**\n * Removes a material plugin from the list of global plugins.\n * @param pluginName The plugin name\n * @returns true if the plugin has been removed, else false\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function UnregisterMaterialPlugin(pluginName) {\n for (let i = 0; i < plugins.length; ++i) {\n if (plugins[i][0] === pluginName) {\n plugins.splice(i, 1);\n if (plugins.length === 0) {\n UnregisterAllMaterialPlugins();\n }\n return true;\n }\n }\n return false;\n}\n/**\n * Clear the list of global material plugins\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function UnregisterAllMaterialPlugins() {\n plugins.length = 0;\n inited = false;\n Material.OnEventObservable.remove(observer);\n observer = null;\n}\n//# sourceMappingURL=materialPluginManager.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { SerializationHelper, serialize } from \"../Misc/decorators.js\";\nimport { MaterialPluginManager } from \"./materialPluginManager.js\";\n\n/**\n * Base class for material plugins.\n * @since 5.0\n */\nexport class MaterialPluginBase {\n _enable(enable) {\n if (enable) {\n this._pluginManager._activatePlugin(this);\n }\n }\n /**\n * Creates a new material plugin\n * @param material parent material of the plugin\n * @param name name of the plugin\n * @param priority priority of the plugin\n * @param defines list of defines used by the plugin. The value of the property is the default value for this property\n * @param addToPluginList true to add the plugin to the list of plugins managed by the material plugin manager of the material (default: true)\n * @param enable true to enable the plugin (it is handy if the plugin does not handle properties to switch its current activation)\n * @param resolveIncludes Indicates that any #include directive in the plugin code must be replaced by the corresponding code (default: false)\n */\n constructor(material, name, priority, defines, addToPluginList = true, enable = false, resolveIncludes = false) {\n /**\n * Defines the priority of the plugin. Lower numbers run first.\n */\n this.priority = 500;\n /**\n * Indicates that any #include directive in the plugin code must be replaced by the corresponding code.\n */\n this.resolveIncludes = false;\n /**\n * Indicates that this plugin should be notified for the extra events (HasRenderTargetTextures / FillRenderTargetTextures / HardBindForSubMesh)\n */\n this.registerForExtraEvents = false;\n this._material = material;\n this.name = name;\n this.priority = priority;\n this.resolveIncludes = resolveIncludes;\n if (!material.pluginManager) {\n material.pluginManager = new MaterialPluginManager(material);\n material.onDisposeObservable.add(() => {\n material.pluginManager = undefined;\n });\n }\n this._pluginDefineNames = defines;\n this._pluginManager = material.pluginManager;\n if (addToPluginList) {\n this._pluginManager._addPlugin(this);\n }\n if (enable) {\n this._enable(true);\n }\n this.markAllDefinesAsDirty = material._dirtyCallbacks[63];\n }\n /**\n * Gets the current class name useful for serialization or dynamic coding.\n * @returns The class name.\n */\n getClassName() {\n return \"MaterialPluginBase\";\n }\n /**\n * Specifies that the submesh is ready to be used.\n * @param defines the list of \"defines\" to update.\n * @param scene defines the scene the material belongs to.\n * @param engine the engine this scene belongs to.\n * @param subMesh the submesh to check for readiness\n * @returns - boolean indicating that the submesh is ready or not.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isReadyForSubMesh(defines, scene, engine, subMesh) {\n return true;\n }\n /**\n * Binds the material data (this function is called even if mustRebind() returns false)\n * @param uniformBuffer defines the Uniform buffer to fill in.\n * @param scene defines the scene the material belongs to.\n * @param engine defines the engine the material belongs to.\n * @param subMesh the submesh to bind data for\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n hardBindForSubMesh(uniformBuffer, scene, engine, subMesh) { }\n /**\n * Binds the material data.\n * @param uniformBuffer defines the Uniform buffer to fill in.\n * @param scene defines the scene the material belongs to.\n * @param engine the engine this scene belongs to.\n * @param subMesh the submesh to bind data for\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n bindForSubMesh(uniformBuffer, scene, engine, subMesh) { }\n /**\n * Disposes the resources of the material.\n * @param forceDisposeTextures - Forces the disposal of all textures.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dispose(forceDisposeTextures) { }\n /**\n * Returns a list of custom shader code fragments to customize the shader.\n * @param shaderType \"vertex\" or \"fragment\"\n * @returns null if no code to be added, or a list of pointName =\\> code.\n * Note that `pointName` can also be a regular expression if it starts with a `!`.\n * In that case, the string found by the regular expression (if any) will be\n * replaced by the code provided.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getCustomCode(shaderType) {\n return null;\n }\n /**\n * Collects all defines.\n * @param defines The object to append to.\n */\n collectDefines(defines) {\n if (!this._pluginDefineNames) {\n return;\n }\n for (const key of Object.keys(this._pluginDefineNames)) {\n if (key[0] === \"_\") {\n continue;\n }\n const type = typeof this._pluginDefineNames[key];\n defines[key] = {\n type: type === \"number\" ? \"number\" : type === \"string\" ? \"string\" : type === \"boolean\" ? \"boolean\" : \"object\",\n default: this._pluginDefineNames[key],\n };\n }\n }\n /**\n * Sets the defines for the next rendering. Called before MaterialHelper.PrepareDefinesForAttributes is called.\n * @param defines the list of \"defines\" to update.\n * @param scene defines the scene to the material belongs to.\n * @param mesh the mesh being rendered\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n prepareDefinesBeforeAttributes(defines, scene, mesh) { }\n /**\n * Sets the defines for the next rendering\n * @param defines the list of \"defines\" to update.\n * @param scene defines the scene to the material belongs to.\n * @param mesh the mesh being rendered\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n prepareDefines(defines, scene, mesh) { }\n /**\n * Checks to see if a texture is used in the material.\n * @param texture - Base texture to use.\n * @returns - Boolean specifying if a texture is used in the material.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n hasTexture(texture) {\n return false;\n }\n /**\n * Gets a boolean indicating that current material needs to register RTT\n * @returns true if this uses a render target otherwise false.\n */\n hasRenderTargetTextures() {\n return false;\n }\n /**\n * Fills the list of render target textures.\n * @param renderTargets the list of render targets to update\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n fillRenderTargetTextures(renderTargets) { }\n /**\n * Returns an array of the actively used textures.\n * @param activeTextures Array of BaseTextures\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getActiveTextures(activeTextures) { }\n /**\n * Returns the animatable textures.\n * @param animatables Array of animatable textures.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getAnimatables(animatables) { }\n /**\n * Add fallbacks to the effect fallbacks list.\n * @param defines defines the Base texture to use.\n * @param fallbacks defines the current fallback list.\n * @param currentRank defines the current fallback rank.\n * @returns the new fallback rank.\n */\n addFallbacks(defines, fallbacks, currentRank) {\n return currentRank;\n }\n /**\n * Gets the samplers used by the plugin.\n * @param samplers list that the sampler names should be added to.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getSamplers(samplers) { }\n /**\n * Gets the attributes used by the plugin.\n * @param attributes list that the attribute names should be added to.\n * @param scene the scene that the material belongs to.\n * @param mesh the mesh being rendered.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getAttributes(attributes, scene, mesh) { }\n /**\n * Gets the uniform buffers names added by the plugin.\n * @param ubos list that the ubo names should be added to.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getUniformBuffersNames(ubos) { }\n /**\n * Gets the description of the uniforms to add to the ubo (if engine supports ubos) or to inject directly in the vertex/fragment shaders (if engine does not support ubos)\n * @returns the description of the uniforms\n */\n getUniforms() {\n return {};\n }\n /**\n * Makes a duplicate of the current configuration into another one.\n * @param plugin define the config where to copy the info\n */\n copyTo(plugin) {\n SerializationHelper.Clone(() => plugin, this);\n }\n /**\n * Serializes this plugin configuration.\n * @returns - An object with the serialized config.\n */\n serialize() {\n return SerializationHelper.Serialize(this);\n }\n /**\n * Parses a plugin configuration from a serialized object.\n * @param source - Serialized object.\n * @param scene Defines the scene we are parsing for\n * @param rootUrl Defines the rootUrl to load from\n */\n parse(source, scene, rootUrl) {\n SerializationHelper.Parse(() => this, source, scene, rootUrl);\n }\n}\n__decorate([\n serialize()\n], MaterialPluginBase.prototype, \"name\", void 0);\n__decorate([\n serialize()\n], MaterialPluginBase.prototype, \"priority\", void 0);\n__decorate([\n serialize()\n], MaterialPluginBase.prototype, \"resolveIncludes\", void 0);\n__decorate([\n serialize()\n], MaterialPluginBase.prototype, \"registerForExtraEvents\", void 0);\n//# sourceMappingURL=materialPluginBase.js.map","import { __decorate } from \"../../tslib.es6.js\";\n/* eslint-disable @typescript-eslint/naming-convention */\n\nimport { serialize, expandToProperty } from \"../../Misc/decorators.js\";\nimport { MaterialDefines } from \"../materialDefines.js\";\nimport { MaterialPluginBase } from \"../materialPluginBase.js\";\n/**\n * @internal\n */\nexport class MaterialBRDFDefines extends MaterialDefines {\n constructor() {\n super(...arguments);\n this.BRDF_V_HEIGHT_CORRELATED = false;\n this.MS_BRDF_ENERGY_CONSERVATION = false;\n this.SPHERICAL_HARMONICS = false;\n this.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION = false;\n }\n}\n/**\n * Plugin that implements the BRDF component of the PBR material\n */\nexport class PBRBRDFConfiguration extends MaterialPluginBase {\n /** @internal */\n _markAllSubMeshesAsMiscDirty() {\n this._internalMarkAllSubMeshesAsMiscDirty();\n }\n constructor(material, addToPluginList = true) {\n super(material, \"PBRBRDF\", 90, new MaterialBRDFDefines(), addToPluginList);\n this._useEnergyConservation = PBRBRDFConfiguration.DEFAULT_USE_ENERGY_CONSERVATION;\n /**\n * Defines if the material uses energy conservation.\n */\n this.useEnergyConservation = PBRBRDFConfiguration.DEFAULT_USE_ENERGY_CONSERVATION;\n this._useSmithVisibilityHeightCorrelated = PBRBRDFConfiguration.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED;\n /**\n * LEGACY Mode set to false\n * Defines if the material uses height smith correlated visibility term.\n * If you intent to not use our default BRDF, you need to load a separate BRDF Texture for the PBR\n * You can either load https://assets.babylonjs.com/environments/uncorrelatedBRDF.png\n * or https://assets.babylonjs.com/environments/uncorrelatedBRDF.dds to have more precision\n * Not relying on height correlated will also disable energy conservation.\n */\n this.useSmithVisibilityHeightCorrelated = PBRBRDFConfiguration.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED;\n this._useSphericalHarmonics = PBRBRDFConfiguration.DEFAULT_USE_SPHERICAL_HARMONICS;\n /**\n * LEGACY Mode set to false\n * Defines if the material uses spherical harmonics vs spherical polynomials for the\n * diffuse part of the IBL.\n * The harmonics despite a tiny bigger cost has been proven to provide closer results\n * to the ground truth.\n */\n this.useSphericalHarmonics = PBRBRDFConfiguration.DEFAULT_USE_SPHERICAL_HARMONICS;\n this._useSpecularGlossinessInputEnergyConservation = PBRBRDFConfiguration.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION;\n /**\n * Defines if the material uses energy conservation, when the specular workflow is active.\n * If activated, the albedo color is multiplied with (1. - maxChannel(specular color)).\n * If deactivated, a material is only physically plausible, when (albedo color + specular color) < 1.\n * In the deactivated case, the material author has to ensure energy conservation, for a physically plausible rendering.\n */\n this.useSpecularGlossinessInputEnergyConservation = PBRBRDFConfiguration.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION;\n this._internalMarkAllSubMeshesAsMiscDirty = material._dirtyCallbacks[16];\n this._enable(true);\n }\n prepareDefines(defines) {\n defines.BRDF_V_HEIGHT_CORRELATED = this._useSmithVisibilityHeightCorrelated;\n defines.MS_BRDF_ENERGY_CONSERVATION = this._useEnergyConservation && this._useSmithVisibilityHeightCorrelated;\n defines.SPHERICAL_HARMONICS = this._useSphericalHarmonics;\n defines.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION = this._useSpecularGlossinessInputEnergyConservation;\n }\n getClassName() {\n return \"PBRBRDFConfiguration\";\n }\n}\n/**\n * Default value used for the energy conservation.\n * This should only be changed to adapt to the type of texture in scene.environmentBRDFTexture.\n */\nPBRBRDFConfiguration.DEFAULT_USE_ENERGY_CONSERVATION = true;\n/**\n * Default value used for the Smith Visibility Height Correlated mode.\n * This should only be changed to adapt to the type of texture in scene.environmentBRDFTexture.\n */\nPBRBRDFConfiguration.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED = true;\n/**\n * Default value used for the IBL diffuse part.\n * This can help switching back to the polynomials mode globally which is a tiny bit\n * less GPU intensive at the drawback of a lower quality.\n */\nPBRBRDFConfiguration.DEFAULT_USE_SPHERICAL_HARMONICS = true;\n/**\n * Default value used for activating energy conservation for the specular workflow.\n * If activated, the albedo color is multiplied with (1. - maxChannel(specular color)).\n * If deactivated, a material is only physically plausible, when (albedo color + specular color) < 1.\n */\nPBRBRDFConfiguration.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION = true;\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\n], PBRBRDFConfiguration.prototype, \"useEnergyConservation\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\n], PBRBRDFConfiguration.prototype, \"useSmithVisibilityHeightCorrelated\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\n], PBRBRDFConfiguration.prototype, \"useSphericalHarmonics\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\n], PBRBRDFConfiguration.prototype, \"useSpecularGlossinessInputEnergyConservation\", void 0);\n//# sourceMappingURL=pbrBRDFConfiguration.js.map","\n/**\n * Configuration needed for prepass-capable materials\n */\nexport class PrePassConfiguration {\n constructor() {\n /**\n * Previous world matrices of meshes carrying this material\n * Used for computing velocity\n */\n this.previousWorldMatrices = {};\n /**\n * Previous bones of meshes carrying this material\n * Used for computing velocity\n */\n this.previousBones = {};\n }\n /**\n * Add the required uniforms to the current list.\n * @param uniforms defines the current uniform list.\n */\n static AddUniforms(uniforms) {\n uniforms.push(\"previousWorld\", \"previousViewProjection\", \"mPreviousBones\");\n }\n /**\n * Add the required samplers to the current list.\n * @param samplers defines the current sampler list.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static AddSamplers(samplers) {\n // pass\n }\n /**\n * Binds the material data.\n * @param effect defines the effect to update\n * @param scene defines the scene the material belongs to.\n * @param mesh The mesh\n * @param world World matrix of this mesh\n * @param isFrozen Is the material frozen\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n bindForSubMesh(effect, scene, mesh, world, isFrozen) {\n if (scene.prePassRenderer && scene.prePassRenderer.enabled && scene.prePassRenderer.currentRTisSceneRT) {\n if (scene.prePassRenderer.getIndex(2) !== -1) {\n if (!this.previousWorldMatrices[mesh.uniqueId]) {\n this.previousWorldMatrices[mesh.uniqueId] = world.clone();\n }\n if (!this.previousViewProjection) {\n this.previousViewProjection = scene.getTransformMatrix().clone();\n this.currentViewProjection = scene.getTransformMatrix().clone();\n }\n const engine = scene.getEngine();\n if (this.currentViewProjection.updateFlag !== scene.getTransformMatrix().updateFlag) {\n // First update of the prepass configuration for this rendering pass\n this._lastUpdateFrameId = engine.frameId;\n this.previousViewProjection.copyFrom(this.currentViewProjection);\n this.currentViewProjection.copyFrom(scene.getTransformMatrix());\n }\n else if (this._lastUpdateFrameId !== engine.frameId) {\n // The scene transformation did not change from the previous frame (so no camera motion), we must update previousViewProjection accordingly\n this._lastUpdateFrameId = engine.frameId;\n this.previousViewProjection.copyFrom(this.currentViewProjection);\n }\n effect.setMatrix(\"previousWorld\", this.previousWorldMatrices[mesh.uniqueId]);\n effect.setMatrix(\"previousViewProjection\", this.previousViewProjection);\n this.previousWorldMatrices[mesh.uniqueId] = world.clone();\n }\n }\n }\n}\n//# sourceMappingURL=prePassConfiguration.js.map","import { Scalar } from \"./math.scalar.js\";\nimport { Vector2, Vector3, Quaternion, Matrix } from \"./math.vector.js\";\nimport { Epsilon } from \"./math.constants.js\";\n/**\n * Defines potential orientation for back face culling\n */\nexport var Orientation;\n(function (Orientation) {\n /**\n * Clockwise\n */\n Orientation[Orientation[\"CW\"] = 0] = \"CW\";\n /** Counter clockwise */\n Orientation[Orientation[\"CCW\"] = 1] = \"CCW\";\n})(Orientation || (Orientation = {}));\n/** Class used to represent a Bezier curve */\nexport class BezierCurve {\n /**\n * Returns the cubic Bezier interpolated value (float) at \"t\" (float) from the given x1, y1, x2, y2 floats\n * @param t defines the time\n * @param x1 defines the left coordinate on X axis\n * @param y1 defines the left coordinate on Y axis\n * @param x2 defines the right coordinate on X axis\n * @param y2 defines the right coordinate on Y axis\n * @returns the interpolated value\n */\n static Interpolate(t, x1, y1, x2, y2) {\n // Extract X (which is equal to time here)\n const f0 = 1 - 3 * x2 + 3 * x1;\n const f1 = 3 * x2 - 6 * x1;\n const f2 = 3 * x1;\n let refinedT = t;\n for (let i = 0; i < 5; i++) {\n const refinedT2 = refinedT * refinedT;\n const refinedT3 = refinedT2 * refinedT;\n const x = f0 * refinedT3 + f1 * refinedT2 + f2 * refinedT;\n const slope = 1.0 / (3.0 * f0 * refinedT2 + 2.0 * f1 * refinedT + f2);\n refinedT -= (x - t) * slope;\n refinedT = Math.min(1, Math.max(0, refinedT));\n }\n // Resolve cubic bezier for the given x\n return 3 * Math.pow(1 - refinedT, 2) * refinedT * y1 + 3 * (1 - refinedT) * Math.pow(refinedT, 2) * y2 + Math.pow(refinedT, 3);\n }\n}\n/**\n * Defines angle representation\n */\nexport class Angle {\n /**\n * Creates an Angle object of \"radians\" radians (float).\n * @param radians the angle in radians\n */\n constructor(radians) {\n this._radians = radians;\n if (this._radians < 0.0) {\n this._radians += 2.0 * Math.PI;\n }\n }\n /**\n * Get value in degrees\n * @returns the Angle value in degrees (float)\n */\n degrees() {\n return (this._radians * 180.0) / Math.PI;\n }\n /**\n * Get value in radians\n * @returns the Angle value in radians (float)\n */\n radians() {\n return this._radians;\n }\n /**\n * Gets a new Angle object with a value of the angle (in radians) between the line connecting the two points and the x-axis\n * @param a defines first point as the origin\n * @param b defines point\n * @returns a new Angle\n */\n static BetweenTwoPoints(a, b) {\n const delta = b.subtract(a);\n const theta = Math.atan2(delta.y, delta.x);\n return new Angle(theta);\n }\n /**\n * Gets the angle between the two vectors\n * @param a defines first vector\n * @param b defines vector\n * @returns Returns an new Angle between 0 and PI\n */\n static BetweenTwoVectors(a, b) {\n let product = a.lengthSquared() * b.lengthSquared();\n if (product === 0)\n return new Angle(Math.PI / 2);\n product = Math.sqrt(product);\n let cosVal = a.dot(b) / product;\n cosVal = Scalar.Clamp(cosVal, -1, 1);\n const angle = Math.acos(cosVal);\n return new Angle(angle);\n }\n /**\n * Gets a new Angle object from the given float in radians\n * @param radians defines the angle value in radians\n * @returns a new Angle\n */\n static FromRadians(radians) {\n return new Angle(radians);\n }\n /**\n * Gets a new Angle object from the given float in degrees\n * @param degrees defines the angle value in degrees\n * @returns a new Angle\n */\n static FromDegrees(degrees) {\n return new Angle((degrees * Math.PI) / 180.0);\n }\n}\n/**\n * This represents an arc in a 2d space.\n */\nexport class Arc2 {\n /**\n * Creates an Arc object from the three given points : start, middle and end.\n * @param startPoint Defines the start point of the arc\n * @param midPoint Defines the middle point of the arc\n * @param endPoint Defines the end point of the arc\n */\n constructor(\n /** Defines the start point of the arc */\n startPoint, \n /** Defines the mid point of the arc */\n midPoint, \n /** Defines the end point of the arc */\n endPoint) {\n this.startPoint = startPoint;\n this.midPoint = midPoint;\n this.endPoint = endPoint;\n const temp = Math.pow(midPoint.x, 2) + Math.pow(midPoint.y, 2);\n const startToMid = (Math.pow(startPoint.x, 2) + Math.pow(startPoint.y, 2) - temp) / 2;\n const midToEnd = (temp - Math.pow(endPoint.x, 2) - Math.pow(endPoint.y, 2)) / 2;\n const det = (startPoint.x - midPoint.x) * (midPoint.y - endPoint.y) - (midPoint.x - endPoint.x) * (startPoint.y - midPoint.y);\n this.centerPoint = new Vector2((startToMid * (midPoint.y - endPoint.y) - midToEnd * (startPoint.y - midPoint.y)) / det, ((startPoint.x - midPoint.x) * midToEnd - (midPoint.x - endPoint.x) * startToMid) / det);\n this.radius = this.centerPoint.subtract(this.startPoint).length();\n this.startAngle = Angle.BetweenTwoPoints(this.centerPoint, this.startPoint);\n const a1 = this.startAngle.degrees();\n let a2 = Angle.BetweenTwoPoints(this.centerPoint, this.midPoint).degrees();\n let a3 = Angle.BetweenTwoPoints(this.centerPoint, this.endPoint).degrees();\n // angles correction\n if (a2 - a1 > +180.0) {\n a2 -= 360.0;\n }\n if (a2 - a1 < -180.0) {\n a2 += 360.0;\n }\n if (a3 - a2 > +180.0) {\n a3 -= 360.0;\n }\n if (a3 - a2 < -180.0) {\n a3 += 360.0;\n }\n this.orientation = a2 - a1 < 0 ? Orientation.CW : Orientation.CCW;\n this.angle = Angle.FromDegrees(this.orientation === Orientation.CW ? a1 - a3 : a3 - a1);\n }\n}\n/**\n * Represents a 2D path made up of multiple 2D points\n */\nexport class Path2 {\n /**\n * Creates a Path2 object from the starting 2D coordinates x and y.\n * @param x the starting points x value\n * @param y the starting points y value\n */\n constructor(x, y) {\n this._points = new Array();\n this._length = 0.0;\n /**\n * If the path start and end point are the same\n */\n this.closed = false;\n this._points.push(new Vector2(x, y));\n }\n /**\n * Adds a new segment until the given coordinates (x, y) to the current Path2.\n * @param x the added points x value\n * @param y the added points y value\n * @returns the updated Path2.\n */\n addLineTo(x, y) {\n if (this.closed) {\n return this;\n }\n const newPoint = new Vector2(x, y);\n const previousPoint = this._points[this._points.length - 1];\n this._points.push(newPoint);\n this._length += newPoint.subtract(previousPoint).length();\n return this;\n }\n /**\n * Adds _numberOfSegments_ segments according to the arc definition (middle point coordinates, end point coordinates, the arc start point being the current Path2 last point) to the current Path2.\n * @param midX middle point x value\n * @param midY middle point y value\n * @param endX end point x value\n * @param endY end point y value\n * @param numberOfSegments (default: 36)\n * @returns the updated Path2.\n */\n addArcTo(midX, midY, endX, endY, numberOfSegments = 36) {\n if (this.closed) {\n return this;\n }\n const startPoint = this._points[this._points.length - 1];\n const midPoint = new Vector2(midX, midY);\n const endPoint = new Vector2(endX, endY);\n const arc = new Arc2(startPoint, midPoint, endPoint);\n let increment = arc.angle.radians() / numberOfSegments;\n if (arc.orientation === Orientation.CW) {\n increment *= -1;\n }\n let currentAngle = arc.startAngle.radians() + increment;\n for (let i = 0; i < numberOfSegments; i++) {\n const x = Math.cos(currentAngle) * arc.radius + arc.centerPoint.x;\n const y = Math.sin(currentAngle) * arc.radius + arc.centerPoint.y;\n this.addLineTo(x, y);\n currentAngle += increment;\n }\n return this;\n }\n /**\n * Adds _numberOfSegments_ segments according to the quadratic curve definition to the current Path2.\n * @param controlX control point x value\n * @param controlY control point y value\n * @param endX end point x value\n * @param endY end point y value\n * @param numberOfSegments (default: 36)\n * @returns the updated Path2.\n */\n addQuadraticCurveTo(controlX, controlY, endX, endY, numberOfSegments = 36) {\n if (this.closed) {\n return this;\n }\n const equation = (t, val0, val1, val2) => {\n const res = (1.0 - t) * (1.0 - t) * val0 + 2.0 * t * (1.0 - t) * val1 + t * t * val2;\n return res;\n };\n const startPoint = this._points[this._points.length - 1];\n for (let i = 0; i <= numberOfSegments; i++) {\n const step = i / numberOfSegments;\n const x = equation(step, startPoint.x, controlX, endX);\n const y = equation(step, startPoint.y, controlY, endY);\n this.addLineTo(x, y);\n }\n return this;\n }\n /**\n * Adds _numberOfSegments_ segments according to the bezier curve definition to the current Path2.\n * @param originTangentX tangent vector at the origin point x value\n * @param originTangentY tangent vector at the origin point y value\n * @param destinationTangentX tangent vector at the destination point x value\n * @param destinationTangentY tangent vector at the destination point y value\n * @param endX end point x value\n * @param endY end point y value\n * @param numberOfSegments (default: 36)\n * @returns the updated Path2.\n */\n addBezierCurveTo(originTangentX, originTangentY, destinationTangentX, destinationTangentY, endX, endY, numberOfSegments = 36) {\n if (this.closed) {\n return this;\n }\n const equation = (t, val0, val1, val2, val3) => {\n const res = (1.0 - t) * (1.0 - t) * (1.0 - t) * val0 + 3.0 * t * (1.0 - t) * (1.0 - t) * val1 + 3.0 * t * t * (1.0 - t) * val2 + t * t * t * val3;\n return res;\n };\n const startPoint = this._points[this._points.length - 1];\n for (let i = 0; i <= numberOfSegments; i++) {\n const step = i / numberOfSegments;\n const x = equation(step, startPoint.x, originTangentX, destinationTangentX, endX);\n const y = equation(step, startPoint.y, originTangentY, destinationTangentY, endY);\n this.addLineTo(x, y);\n }\n return this;\n }\n /**\n * Defines if a given point is inside the polygon defines by the path\n * @param point defines the point to test\n * @returns true if the point is inside\n */\n isPointInside(point) {\n let isInside = false;\n const count = this._points.length;\n for (let p = count - 1, q = 0; q < count; p = q++) {\n let edgeLow = this._points[p];\n let edgeHigh = this._points[q];\n let edgeDx = edgeHigh.x - edgeLow.x;\n let edgeDy = edgeHigh.y - edgeLow.y;\n if (Math.abs(edgeDy) > Number.EPSILON) {\n // Not parallel\n if (edgeDy < 0) {\n edgeLow = this._points[q];\n edgeDx = -edgeDx;\n edgeHigh = this._points[p];\n edgeDy = -edgeDy;\n }\n if (point.y < edgeLow.y || point.y > edgeHigh.y) {\n continue;\n }\n if (point.y === edgeLow.y && point.x === edgeLow.x) {\n return true;\n }\n else {\n const perpEdge = edgeDy * (point.x - edgeLow.x) - edgeDx * (point.y - edgeLow.y);\n if (perpEdge === 0) {\n return true;\n }\n if (perpEdge < 0) {\n continue;\n }\n isInside = !isInside;\n }\n }\n else {\n // parallel or collinear\n if (point.y !== edgeLow.y) {\n continue;\n }\n if ((edgeHigh.x <= point.x && point.x <= edgeLow.x) || (edgeLow.x <= point.x && point.x <= edgeHigh.x)) {\n return true;\n }\n }\n }\n return isInside;\n }\n /**\n * Closes the Path2.\n * @returns the Path2.\n */\n close() {\n this.closed = true;\n return this;\n }\n /**\n * Gets the sum of the distance between each sequential point in the path\n * @returns the Path2 total length (float).\n */\n length() {\n let result = this._length;\n if (this.closed) {\n const lastPoint = this._points[this._points.length - 1];\n const firstPoint = this._points[0];\n result += firstPoint.subtract(lastPoint).length();\n }\n return result;\n }\n /**\n * Gets the area of the polygon defined by the path\n * @returns area value\n */\n area() {\n const n = this._points.length;\n let value = 0.0;\n for (let p = n - 1, q = 0; q < n; p = q++) {\n value += this._points[p].x * this._points[q].y - this._points[q].x * this._points[p].y;\n }\n return value * 0.5;\n }\n /**\n * Gets the points which construct the path\n * @returns the Path2 internal array of points.\n */\n getPoints() {\n return this._points;\n }\n /**\n * Retrieves the point at the distance aways from the starting point\n * @param normalizedLengthPosition the length along the path to retrieve the point from\n * @returns a new Vector2 located at a percentage of the Path2 total length on this path.\n */\n getPointAtLengthPosition(normalizedLengthPosition) {\n if (normalizedLengthPosition < 0 || normalizedLengthPosition > 1) {\n return Vector2.Zero();\n }\n const lengthPosition = normalizedLengthPosition * this.length();\n let previousOffset = 0;\n for (let i = 0; i < this._points.length; i++) {\n const j = (i + 1) % this._points.length;\n const a = this._points[i];\n const b = this._points[j];\n const bToA = b.subtract(a);\n const nextOffset = bToA.length() + previousOffset;\n if (lengthPosition >= previousOffset && lengthPosition <= nextOffset) {\n const dir = bToA.normalize();\n const localOffset = lengthPosition - previousOffset;\n return new Vector2(a.x + dir.x * localOffset, a.y + dir.y * localOffset);\n }\n previousOffset = nextOffset;\n }\n return Vector2.Zero();\n }\n /**\n * Creates a new path starting from an x and y position\n * @param x starting x value\n * @param y starting y value\n * @returns a new Path2 starting at the coordinates (x, y).\n */\n static StartingAt(x, y) {\n return new Path2(x, y);\n }\n}\n/**\n * Represents a 3D path made up of multiple 3D points\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/path3D\n */\nexport class Path3D {\n /**\n * new Path3D(path, normal, raw)\n * Creates a Path3D. A Path3D is a logical math object, so not a mesh.\n * please read the description in the tutorial : https://doc.babylonjs.com/features/featuresDeepDive/mesh/path3D\n * @param path an array of Vector3, the curve axis of the Path3D\n * @param firstNormal (options) Vector3, the first wanted normal to the curve. Ex (0, 1, 0) for a vertical normal.\n * @param raw (optional, default false) : boolean, if true the returned Path3D isn't normalized. Useful to depict path acceleration or speed.\n * @param alignTangentsWithPath (optional, default false) : boolean, if true the tangents will be aligned with the path.\n */\n constructor(\n /**\n * an array of Vector3, the curve axis of the Path3D\n */\n path, firstNormal = null, raw, alignTangentsWithPath = false) {\n this.path = path;\n this._curve = new Array();\n this._distances = new Array();\n this._tangents = new Array();\n this._normals = new Array();\n this._binormals = new Array();\n // holds interpolated point data\n this._pointAtData = {\n id: 0,\n point: Vector3.Zero(),\n previousPointArrayIndex: 0,\n position: 0,\n subPosition: 0,\n interpolateReady: false,\n interpolationMatrix: Matrix.Identity(),\n };\n for (let p = 0; p < path.length; p++) {\n this._curve[p] = path[p].clone(); // hard copy\n }\n this._raw = raw || false;\n this._alignTangentsWithPath = alignTangentsWithPath;\n this._compute(firstNormal, alignTangentsWithPath);\n }\n /**\n * Returns the Path3D array of successive Vector3 designing its curve.\n * @returns the Path3D array of successive Vector3 designing its curve.\n */\n getCurve() {\n return this._curve;\n }\n /**\n * Returns the Path3D array of successive Vector3 designing its curve.\n * @returns the Path3D array of successive Vector3 designing its curve.\n */\n getPoints() {\n return this._curve;\n }\n /**\n * @returns the computed length (float) of the path.\n */\n length() {\n return this._distances[this._distances.length - 1];\n }\n /**\n * Returns an array populated with tangent vectors on each Path3D curve point.\n * @returns an array populated with tangent vectors on each Path3D curve point.\n */\n getTangents() {\n return this._tangents;\n }\n /**\n * Returns an array populated with normal vectors on each Path3D curve point.\n * @returns an array populated with normal vectors on each Path3D curve point.\n */\n getNormals() {\n return this._normals;\n }\n /**\n * Returns an array populated with binormal vectors on each Path3D curve point.\n * @returns an array populated with binormal vectors on each Path3D curve point.\n */\n getBinormals() {\n return this._binormals;\n }\n /**\n * Returns an array populated with distances (float) of the i-th point from the first curve point.\n * @returns an array populated with distances (float) of the i-th point from the first curve point.\n */\n getDistances() {\n return this._distances;\n }\n /**\n * Returns an interpolated point along this path\n * @param position the position of the point along this path, from 0.0 to 1.0\n * @returns a new Vector3 as the point\n */\n getPointAt(position) {\n return this._updatePointAtData(position).point;\n }\n /**\n * Returns the tangent vector of an interpolated Path3D curve point at the specified position along this path.\n * @param position the position of the point along this path, from 0.0 to 1.0\n * @param interpolated (optional, default false) : boolean, if true returns an interpolated tangent instead of the tangent of the previous path point.\n * @returns a tangent vector corresponding to the interpolated Path3D curve point, if not interpolated, the tangent is taken from the precomputed tangents array.\n */\n getTangentAt(position, interpolated = false) {\n this._updatePointAtData(position, interpolated);\n return interpolated ? Vector3.TransformCoordinates(Vector3.Forward(), this._pointAtData.interpolationMatrix) : this._tangents[this._pointAtData.previousPointArrayIndex];\n }\n /**\n * Returns the tangent vector of an interpolated Path3D curve point at the specified position along this path.\n * @param position the position of the point along this path, from 0.0 to 1.0\n * @param interpolated (optional, default false) : boolean, if true returns an interpolated normal instead of the normal of the previous path point.\n * @returns a normal vector corresponding to the interpolated Path3D curve point, if not interpolated, the normal is taken from the precomputed normals array.\n */\n getNormalAt(position, interpolated = false) {\n this._updatePointAtData(position, interpolated);\n return interpolated ? Vector3.TransformCoordinates(Vector3.Right(), this._pointAtData.interpolationMatrix) : this._normals[this._pointAtData.previousPointArrayIndex];\n }\n /**\n * Returns the binormal vector of an interpolated Path3D curve point at the specified position along this path.\n * @param position the position of the point along this path, from 0.0 to 1.0\n * @param interpolated (optional, default false) : boolean, if true returns an interpolated binormal instead of the binormal of the previous path point.\n * @returns a binormal vector corresponding to the interpolated Path3D curve point, if not interpolated, the binormal is taken from the precomputed binormals array.\n */\n getBinormalAt(position, interpolated = false) {\n this._updatePointAtData(position, interpolated);\n return interpolated ? Vector3.TransformCoordinates(Vector3.UpReadOnly, this._pointAtData.interpolationMatrix) : this._binormals[this._pointAtData.previousPointArrayIndex];\n }\n /**\n * Returns the distance (float) of an interpolated Path3D curve point at the specified position along this path.\n * @param position the position of the point along this path, from 0.0 to 1.0\n * @returns the distance of the interpolated Path3D curve point at the specified position along this path.\n */\n getDistanceAt(position) {\n return this.length() * position;\n }\n /**\n * Returns the array index of the previous point of an interpolated point along this path\n * @param position the position of the point to interpolate along this path, from 0.0 to 1.0\n * @returns the array index\n */\n getPreviousPointIndexAt(position) {\n this._updatePointAtData(position);\n return this._pointAtData.previousPointArrayIndex;\n }\n /**\n * Returns the position of an interpolated point relative to the two path points it lies between, from 0.0 (point A) to 1.0 (point B)\n * @param position the position of the point to interpolate along this path, from 0.0 to 1.0\n * @returns the sub position\n */\n getSubPositionAt(position) {\n this._updatePointAtData(position);\n return this._pointAtData.subPosition;\n }\n /**\n * Returns the position of the closest virtual point on this path to an arbitrary Vector3, from 0.0 to 1.0\n * @param target the vector of which to get the closest position to\n * @returns the position of the closest virtual point on this path to the target vector\n */\n getClosestPositionTo(target) {\n let smallestDistance = Number.MAX_VALUE;\n let closestPosition = 0.0;\n for (let i = 0; i < this._curve.length - 1; i++) {\n const point = this._curve[i + 0];\n const tangent = this._curve[i + 1].subtract(point).normalize();\n const subLength = this._distances[i + 1] - this._distances[i + 0];\n const subPosition = Math.min((Math.max(Vector3.Dot(tangent, target.subtract(point).normalize()), 0.0) * Vector3.Distance(point, target)) / subLength, 1.0);\n const distance = Vector3.Distance(point.add(tangent.scale(subPosition * subLength)), target);\n if (distance < smallestDistance) {\n smallestDistance = distance;\n closestPosition = (this._distances[i + 0] + subLength * subPosition) / this.length();\n }\n }\n return closestPosition;\n }\n /**\n * Returns a sub path (slice) of this path\n * @param start the position of the fist path point, from 0.0 to 1.0, or a negative value, which will get wrapped around from the end of the path to 0.0 to 1.0 values\n * @param end the position of the last path point, from 0.0 to 1.0, or a negative value, which will get wrapped around from the end of the path to 0.0 to 1.0 values\n * @returns a sub path (slice) of this path\n */\n slice(start = 0.0, end = 1.0) {\n if (start < 0.0) {\n start = 1 - ((start * -1.0) % 1.0);\n }\n if (end < 0.0) {\n end = 1 - ((end * -1.0) % 1.0);\n }\n if (start > end) {\n const _start = start;\n start = end;\n end = _start;\n }\n const curvePoints = this.getCurve();\n const startPoint = this.getPointAt(start);\n let startIndex = this.getPreviousPointIndexAt(start);\n const endPoint = this.getPointAt(end);\n const endIndex = this.getPreviousPointIndexAt(end) + 1;\n const slicePoints = [];\n if (start !== 0.0) {\n startIndex++;\n slicePoints.push(startPoint);\n }\n slicePoints.push(...curvePoints.slice(startIndex, endIndex));\n if (end !== 1.0 || start === 1.0) {\n slicePoints.push(endPoint);\n }\n return new Path3D(slicePoints, this.getNormalAt(start), this._raw, this._alignTangentsWithPath);\n }\n /**\n * Forces the Path3D tangent, normal, binormal and distance recomputation.\n * @param path path which all values are copied into the curves points\n * @param firstNormal which should be projected onto the curve\n * @param alignTangentsWithPath (optional, default false) : boolean, if true the tangents will be aligned with the path\n * @returns the same object updated.\n */\n update(path, firstNormal = null, alignTangentsWithPath = false) {\n for (let p = 0; p < path.length; p++) {\n this._curve[p].x = path[p].x;\n this._curve[p].y = path[p].y;\n this._curve[p].z = path[p].z;\n }\n this._compute(firstNormal, alignTangentsWithPath);\n return this;\n }\n // private function compute() : computes tangents, normals and binormals\n _compute(firstNormal, alignTangentsWithPath = false) {\n const l = this._curve.length;\n if (l < 2) {\n return;\n }\n // first and last tangents\n this._tangents[0] = this._getFirstNonNullVector(0);\n if (!this._raw) {\n this._tangents[0].normalize();\n }\n this._tangents[l - 1] = this._curve[l - 1].subtract(this._curve[l - 2]);\n if (!this._raw) {\n this._tangents[l - 1].normalize();\n }\n // normals and binormals at first point : arbitrary vector with _normalVector()\n const tg0 = this._tangents[0];\n const pp0 = this._normalVector(tg0, firstNormal);\n this._normals[0] = pp0;\n if (!this._raw) {\n this._normals[0].normalize();\n }\n this._binormals[0] = Vector3.Cross(tg0, this._normals[0]);\n if (!this._raw) {\n this._binormals[0].normalize();\n }\n this._distances[0] = 0.0;\n // normals and binormals : next points\n let prev; // previous vector (segment)\n let cur; // current vector (segment)\n let curTang; // current tangent\n // previous normal\n let prevNor; // previous normal\n let prevBinor; // previous binormal\n for (let i = 1; i < l; i++) {\n // tangents\n prev = this._getLastNonNullVector(i);\n if (i < l - 1) {\n cur = this._getFirstNonNullVector(i);\n this._tangents[i] = alignTangentsWithPath ? cur : prev.add(cur);\n this._tangents[i].normalize();\n }\n this._distances[i] = this._distances[i - 1] + this._curve[i].subtract(this._curve[i - 1]).length();\n // normals and binormals\n // http://www.cs.cmu.edu/afs/andrew/scs/cs/15-462/web/old/asst2camera.html\n curTang = this._tangents[i];\n prevBinor = this._binormals[i - 1];\n this._normals[i] = Vector3.Cross(prevBinor, curTang);\n if (!this._raw) {\n if (this._normals[i].length() === 0) {\n prevNor = this._normals[i - 1];\n this._normals[i] = prevNor.clone();\n }\n else {\n this._normals[i].normalize();\n }\n }\n this._binormals[i] = Vector3.Cross(curTang, this._normals[i]);\n if (!this._raw) {\n this._binormals[i].normalize();\n }\n }\n this._pointAtData.id = NaN;\n }\n // private function getFirstNonNullVector(index)\n // returns the first non null vector from index : curve[index + N].subtract(curve[index])\n _getFirstNonNullVector(index) {\n let i = 1;\n let nNVector = this._curve[index + i].subtract(this._curve[index]);\n while (nNVector.length() === 0 && index + i + 1 < this._curve.length) {\n i++;\n nNVector = this._curve[index + i].subtract(this._curve[index]);\n }\n return nNVector;\n }\n // private function getLastNonNullVector(index)\n // returns the last non null vector from index : curve[index].subtract(curve[index - N])\n _getLastNonNullVector(index) {\n let i = 1;\n let nLVector = this._curve[index].subtract(this._curve[index - i]);\n while (nLVector.length() === 0 && index > i + 1) {\n i++;\n nLVector = this._curve[index].subtract(this._curve[index - i]);\n }\n return nLVector;\n }\n // private function normalVector(v0, vt, va) :\n // returns an arbitrary point in the plane defined by the point v0 and the vector vt orthogonal to this plane\n // if va is passed, it returns the va projection on the plane orthogonal to vt at the point v0\n _normalVector(vt, va) {\n let normal0;\n let tgl = vt.length();\n if (tgl === 0.0) {\n tgl = 1.0;\n }\n if (va === undefined || va === null) {\n let point;\n if (!Scalar.WithinEpsilon(Math.abs(vt.y) / tgl, 1.0, Epsilon)) {\n // search for a point in the plane\n point = new Vector3(0.0, -1.0, 0.0);\n }\n else if (!Scalar.WithinEpsilon(Math.abs(vt.x) / tgl, 1.0, Epsilon)) {\n point = new Vector3(1.0, 0.0, 0.0);\n }\n else if (!Scalar.WithinEpsilon(Math.abs(vt.z) / tgl, 1.0, Epsilon)) {\n point = new Vector3(0.0, 0.0, 1.0);\n }\n else {\n point = Vector3.Zero();\n }\n normal0 = Vector3.Cross(vt, point);\n }\n else {\n normal0 = Vector3.Cross(vt, va);\n Vector3.CrossToRef(normal0, vt, normal0);\n }\n normal0.normalize();\n return normal0;\n }\n /**\n * Updates the point at data for an interpolated point along this curve\n * @param position the position of the point along this curve, from 0.0 to 1.0\n * @param interpolateTNB\n * @interpolateTNB whether to compute the interpolated tangent, normal and binormal\n * @returns the (updated) point at data\n */\n _updatePointAtData(position, interpolateTNB = false) {\n // set an id for caching the result\n if (this._pointAtData.id === position) {\n if (!this._pointAtData.interpolateReady) {\n this._updateInterpolationMatrix();\n }\n return this._pointAtData;\n }\n else {\n this._pointAtData.id = position;\n }\n const curvePoints = this.getPoints();\n // clamp position between 0.0 and 1.0\n if (position <= 0.0) {\n return this._setPointAtData(0.0, 0.0, curvePoints[0], 0, interpolateTNB);\n }\n else if (position >= 1.0) {\n return this._setPointAtData(1.0, 1.0, curvePoints[curvePoints.length - 1], curvePoints.length - 1, interpolateTNB);\n }\n let previousPoint = curvePoints[0];\n let currentPoint;\n let currentLength = 0.0;\n const targetLength = position * this.length();\n for (let i = 1; i < curvePoints.length; i++) {\n currentPoint = curvePoints[i];\n const distance = Vector3.Distance(previousPoint, currentPoint);\n currentLength += distance;\n if (currentLength === targetLength) {\n return this._setPointAtData(position, 1.0, currentPoint, i, interpolateTNB);\n }\n else if (currentLength > targetLength) {\n const toLength = currentLength - targetLength;\n const diff = toLength / distance;\n const dir = previousPoint.subtract(currentPoint);\n const point = currentPoint.add(dir.scaleInPlace(diff));\n return this._setPointAtData(position, 1 - diff, point, i - 1, interpolateTNB);\n }\n previousPoint = currentPoint;\n }\n return this._pointAtData;\n }\n /**\n * Updates the point at data from the specified parameters\n * @param position where along the path the interpolated point is, from 0.0 to 1.0\n * @param subPosition\n * @param point the interpolated point\n * @param parentIndex the index of an existing curve point that is on, or else positionally the first behind, the interpolated point\n * @param interpolateTNB\n */\n _setPointAtData(position, subPosition, point, parentIndex, interpolateTNB) {\n this._pointAtData.point = point;\n this._pointAtData.position = position;\n this._pointAtData.subPosition = subPosition;\n this._pointAtData.previousPointArrayIndex = parentIndex;\n this._pointAtData.interpolateReady = interpolateTNB;\n if (interpolateTNB) {\n this._updateInterpolationMatrix();\n }\n return this._pointAtData;\n }\n /**\n * Updates the point at interpolation matrix for the tangents, normals and binormals\n */\n _updateInterpolationMatrix() {\n this._pointAtData.interpolationMatrix = Matrix.Identity();\n const parentIndex = this._pointAtData.previousPointArrayIndex;\n if (parentIndex !== this._tangents.length - 1) {\n const index = parentIndex + 1;\n const tangentFrom = this._tangents[parentIndex].clone();\n const normalFrom = this._normals[parentIndex].clone();\n const binormalFrom = this._binormals[parentIndex].clone();\n const tangentTo = this._tangents[index].clone();\n const normalTo = this._normals[index].clone();\n const binormalTo = this._binormals[index].clone();\n const quatFrom = Quaternion.RotationQuaternionFromAxis(normalFrom, binormalFrom, tangentFrom);\n const quatTo = Quaternion.RotationQuaternionFromAxis(normalTo, binormalTo, tangentTo);\n const quatAt = Quaternion.Slerp(quatFrom, quatTo, this._pointAtData.subPosition);\n quatAt.toRotationMatrix(this._pointAtData.interpolationMatrix);\n }\n }\n}\n/**\n * A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space.\n * A Curve3 is designed from a series of successive Vector3.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves\n */\nexport class Curve3 {\n /**\n * Returns a Curve3 object along a Quadratic Bezier curve : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#quadratic-bezier-curve\n * @param v0 (Vector3) the origin point of the Quadratic Bezier\n * @param v1 (Vector3) the control point\n * @param v2 (Vector3) the end point of the Quadratic Bezier\n * @param nbPoints (integer) the wanted number of points in the curve\n * @returns the created Curve3\n */\n static CreateQuadraticBezier(v0, v1, v2, nbPoints) {\n nbPoints = nbPoints > 2 ? nbPoints : 3;\n const bez = [];\n const equation = (t, val0, val1, val2) => {\n const res = (1.0 - t) * (1.0 - t) * val0 + 2.0 * t * (1.0 - t) * val1 + t * t * val2;\n return res;\n };\n for (let i = 0; i <= nbPoints; i++) {\n bez.push(new Vector3(equation(i / nbPoints, v0.x, v1.x, v2.x), equation(i / nbPoints, v0.y, v1.y, v2.y), equation(i / nbPoints, v0.z, v1.z, v2.z)));\n }\n return new Curve3(bez);\n }\n /**\n * Returns a Curve3 object along a Cubic Bezier curve : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#cubic-bezier-curve\n * @param v0 (Vector3) the origin point of the Cubic Bezier\n * @param v1 (Vector3) the first control point\n * @param v2 (Vector3) the second control point\n * @param v3 (Vector3) the end point of the Cubic Bezier\n * @param nbPoints (integer) the wanted number of points in the curve\n * @returns the created Curve3\n */\n static CreateCubicBezier(v0, v1, v2, v3, nbPoints) {\n nbPoints = nbPoints > 3 ? nbPoints : 4;\n const bez = [];\n const equation = (t, val0, val1, val2, val3) => {\n const res = (1.0 - t) * (1.0 - t) * (1.0 - t) * val0 + 3.0 * t * (1.0 - t) * (1.0 - t) * val1 + 3.0 * t * t * (1.0 - t) * val2 + t * t * t * val3;\n return res;\n };\n for (let i = 0; i <= nbPoints; i++) {\n bez.push(new Vector3(equation(i / nbPoints, v0.x, v1.x, v2.x, v3.x), equation(i / nbPoints, v0.y, v1.y, v2.y, v3.y), equation(i / nbPoints, v0.z, v1.z, v2.z, v3.z)));\n }\n return new Curve3(bez);\n }\n /**\n * Returns a Curve3 object along a Hermite Spline curve : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#hermite-spline\n * @param p1 (Vector3) the origin point of the Hermite Spline\n * @param t1 (Vector3) the tangent vector at the origin point\n * @param p2 (Vector3) the end point of the Hermite Spline\n * @param t2 (Vector3) the tangent vector at the end point\n * @param nSeg (integer) the number of curve segments or nSeg + 1 points in the array\n * @returns the created Curve3\n */\n static CreateHermiteSpline(p1, t1, p2, t2, nSeg) {\n const hermite = [];\n const step = 1.0 / nSeg;\n for (let i = 0; i <= nSeg; i++) {\n hermite.push(Vector3.Hermite(p1, t1, p2, t2, i * step));\n }\n return new Curve3(hermite);\n }\n /**\n * Returns a Curve3 object along a CatmullRom Spline curve :\n * @param points (array of Vector3) the points the spline must pass through. At least, four points required\n * @param nbPoints (integer) the wanted number of points between each curve control points\n * @param closed (boolean) optional with default false, when true forms a closed loop from the points\n * @returns the created Curve3\n */\n static CreateCatmullRomSpline(points, nbPoints, closed) {\n const catmullRom = [];\n const step = 1.0 / nbPoints;\n let amount = 0.0;\n if (closed) {\n const pointsCount = points.length;\n for (let i = 0; i < pointsCount; i++) {\n amount = 0;\n for (let c = 0; c < nbPoints; c++) {\n catmullRom.push(Vector3.CatmullRom(points[i % pointsCount], points[(i + 1) % pointsCount], points[(i + 2) % pointsCount], points[(i + 3) % pointsCount], amount));\n amount += step;\n }\n }\n catmullRom.push(catmullRom[0]);\n }\n else {\n const totalPoints = [];\n totalPoints.push(points[0].clone());\n Array.prototype.push.apply(totalPoints, points);\n totalPoints.push(points[points.length - 1].clone());\n let i = 0;\n for (; i < totalPoints.length - 3; i++) {\n amount = 0;\n for (let c = 0; c < nbPoints; c++) {\n catmullRom.push(Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount));\n amount += step;\n }\n }\n i--;\n catmullRom.push(Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount));\n }\n return new Curve3(catmullRom);\n }\n /**\n * Returns a Curve3 object along an arc through three vector3 points:\n * The three points should not be colinear. When they are the Curve3 is empty.\n * @param first (Vector3) the first point the arc must pass through.\n * @param second (Vector3) the second point the arc must pass through.\n * @param third (Vector3) the third point the arc must pass through.\n * @param steps (number) the larger the number of steps the more detailed the arc.\n * @param closed (boolean) optional with default false, when true forms the chord from the first and third point\n * @param fullCircle Circle (boolean) optional with default false, when true forms the complete circle through the three points\n * @returns the created Curve3\n */\n static ArcThru3Points(first, second, third, steps = 32, closed = false, fullCircle = false) {\n const arc = [];\n const vec1 = second.subtract(first);\n const vec2 = third.subtract(second);\n const vec3 = first.subtract(third);\n const zAxis = Vector3.Cross(vec1, vec2);\n const len4 = zAxis.length();\n if (len4 < Math.pow(10, -8)) {\n return new Curve3(arc); // colinear points arc is empty\n }\n const len1_sq = vec1.lengthSquared();\n const len2_sq = vec2.lengthSquared();\n const len3_sq = vec3.lengthSquared();\n const len4_sq = zAxis.lengthSquared();\n const len1 = vec1.length();\n const len2 = vec2.length();\n const len3 = vec3.length();\n const radius = (0.5 * len1 * len2 * len3) / len4;\n const dot1 = Vector3.Dot(vec1, vec3);\n const dot2 = Vector3.Dot(vec1, vec2);\n const dot3 = Vector3.Dot(vec2, vec3);\n const a = (-0.5 * len2_sq * dot1) / len4_sq;\n const b = (-0.5 * len3_sq * dot2) / len4_sq;\n const c = (-0.5 * len1_sq * dot3) / len4_sq;\n const center = first.scale(a).add(second.scale(b)).add(third.scale(c));\n const radiusVec = first.subtract(center);\n const xAxis = radiusVec.normalize();\n const yAxis = Vector3.Cross(zAxis, xAxis).normalize();\n if (fullCircle) {\n const dStep = (2 * Math.PI) / steps;\n for (let theta = 0; theta <= 2 * Math.PI; theta += dStep) {\n arc.push(center.add(xAxis.scale(radius * Math.cos(theta)).add(yAxis.scale(radius * Math.sin(theta)))));\n }\n arc.push(first);\n }\n else {\n const dStep = 1 / steps;\n let theta = 0;\n let point = Vector3.Zero();\n do {\n point = center.add(xAxis.scale(radius * Math.cos(theta)).add(yAxis.scale(radius * Math.sin(theta))));\n arc.push(point);\n theta += dStep;\n } while (!point.equalsWithEpsilon(third, radius * dStep * 1.1));\n arc.push(third);\n if (closed) {\n arc.push(first);\n }\n }\n return new Curve3(arc);\n }\n /**\n * A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space.\n * A Curve3 is designed from a series of successive Vector3.\n * Tuto : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#curve3-object\n * @param points points which make up the curve\n */\n constructor(points) {\n this._length = 0.0;\n this._points = points;\n this._length = this._computeLength(points);\n }\n /**\n * @returns the Curve3 stored array of successive Vector3\n */\n getPoints() {\n return this._points;\n }\n /**\n * @returns the computed length (float) of the curve.\n */\n length() {\n return this._length;\n }\n /**\n * Returns a new instance of Curve3 object : var curve = curveA.continue(curveB);\n * This new Curve3 is built by translating and sticking the curveB at the end of the curveA.\n * curveA and curveB keep unchanged.\n * @param curve the curve to continue from this curve\n * @returns the newly constructed curve\n */\n continue(curve) {\n const lastPoint = this._points[this._points.length - 1];\n const continuedPoints = this._points.slice();\n const curvePoints = curve.getPoints();\n for (let i = 1; i < curvePoints.length; i++) {\n continuedPoints.push(curvePoints[i].subtract(curvePoints[0]).add(lastPoint));\n }\n const continuedCurve = new Curve3(continuedPoints);\n return continuedCurve;\n }\n _computeLength(path) {\n let l = 0;\n for (let i = 1; i < path.length; i++) {\n l += path[i].subtract(path[i - 1]).length();\n }\n return l;\n }\n}\n//# sourceMappingURL=math.path.js.map","/* eslint-disable @typescript-eslint/naming-convention */\nimport { Vector3 } from \"../Maths/math.vector.js\";\nimport { TmpVectors } from \"./math.js\";\n// https://dickyjim.wordpress.com/2013/09/04/spherical-harmonics-for-beginners/\n// http://silviojemma.com/public/papers/lighting/spherical-harmonic-lighting.pdf\n// https://www.ppsloan.org/publications/StupidSH36.pdf\n// http://cseweb.ucsd.edu/~ravir/papers/envmap/envmap.pdf\n// https://www.ppsloan.org/publications/SHJCGT.pdf\n// https://www.ppsloan.org/publications/shdering.pdf\n// https://google.github.io/filament/Filament.md.html#annex/sphericalharmonics\n// https://patapom.com/blog/SHPortal/\n// https://imdoingitwrong.wordpress.com/2011/04/14/spherical-harmonics-wtf/\n// Using real SH basis:\n// m>0 m m\n// y = sqrt(2) * K * P * cos(m*phi) * cos(theta)\n// l l l\n//\n// m<0 m |m|\n// y = sqrt(2) * K * P * sin(m*phi) * cos(theta)\n// l l l\n//\n// m=0 0 0\n// y = K * P * trigono terms\n// l l l\n//\n// m (2l + 1)(l - |m|)!\n// K = sqrt(------------------)\n// l 4pi(l + |m|)!\n//\n// and P by recursion:\n//\n// P00(x) = 1\n// P01(x) = x\n// Pll(x) = (-1^l)(2l - 1)!!(1-x*x)^(1/2)\n// ((2l - 1)x[Pl-1/m]-(l + m - 1)[Pl-2/m])\n// Plm(x) = ---------------------------------------\n// l - m\n// Leaving the trigonometric terms aside we can precompute the constants to :\nconst SH3ylmBasisConstants = [\n Math.sqrt(1 / (4 * Math.PI)),\n -Math.sqrt(3 / (4 * Math.PI)),\n Math.sqrt(3 / (4 * Math.PI)),\n -Math.sqrt(3 / (4 * Math.PI)),\n Math.sqrt(15 / (4 * Math.PI)),\n -Math.sqrt(15 / (4 * Math.PI)),\n Math.sqrt(5 / (16 * Math.PI)),\n -Math.sqrt(15 / (4 * Math.PI)),\n Math.sqrt(15 / (16 * Math.PI)), // l22\n];\n// cm = cos(m * phi)\n// sm = sin(m * phi)\n// {x,y,z} = {cos(phi)sin(theta), sin(phi)sin(theta), cos(theta)}\n// By recursion on using trigo identities:\nconst SH3ylmBasisTrigonometricTerms = [\n () => 1,\n (direction) => direction.y,\n (direction) => direction.z,\n (direction) => direction.x,\n (direction) => direction.x * direction.y,\n (direction) => direction.y * direction.z,\n (direction) => 3 * direction.z * direction.z - 1,\n (direction) => direction.x * direction.z,\n (direction) => direction.x * direction.x - direction.y * direction.y, // l22\n];\n// Wrap the full compute\nconst applySH3 = (lm, direction) => {\n return SH3ylmBasisConstants[lm] * SH3ylmBasisTrigonometricTerms[lm](direction);\n};\n// Derived from the integration of the a kernel convolution to SH.\n// Great explanation here: https://patapom.com/blog/SHPortal/#about-distant-radiance-and-irradiance-environments\nconst SHCosKernelConvolution = [Math.PI, (2 * Math.PI) / 3, (2 * Math.PI) / 3, (2 * Math.PI) / 3, Math.PI / 4, Math.PI / 4, Math.PI / 4, Math.PI / 4, Math.PI / 4];\n/**\n * Class representing spherical harmonics coefficients to the 3rd degree\n */\nexport class SphericalHarmonics {\n constructor() {\n /**\n * Defines whether or not the harmonics have been prescaled for rendering.\n */\n this.preScaled = false;\n /**\n * The l0,0 coefficients of the spherical harmonics\n */\n this.l00 = Vector3.Zero();\n /**\n * The l1,-1 coefficients of the spherical harmonics\n */\n this.l1_1 = Vector3.Zero();\n /**\n * The l1,0 coefficients of the spherical harmonics\n */\n this.l10 = Vector3.Zero();\n /**\n * The l1,1 coefficients of the spherical harmonics\n */\n this.l11 = Vector3.Zero();\n /**\n * The l2,-2 coefficients of the spherical harmonics\n */\n this.l2_2 = Vector3.Zero();\n /**\n * The l2,-1 coefficients of the spherical harmonics\n */\n this.l2_1 = Vector3.Zero();\n /**\n * The l2,0 coefficients of the spherical harmonics\n */\n this.l20 = Vector3.Zero();\n /**\n * The l2,1 coefficients of the spherical harmonics\n */\n this.l21 = Vector3.Zero();\n /**\n * The l2,2 coefficients of the spherical harmonics\n */\n this.l22 = Vector3.Zero();\n }\n /**\n * Adds a light to the spherical harmonics\n * @param direction the direction of the light\n * @param color the color of the light\n * @param deltaSolidAngle the delta solid angle of the light\n */\n addLight(direction, color, deltaSolidAngle) {\n TmpVectors.Vector3[0].set(color.r, color.g, color.b);\n const colorVector = TmpVectors.Vector3[0];\n const c = TmpVectors.Vector3[1];\n colorVector.scaleToRef(deltaSolidAngle, c);\n c.scaleToRef(applySH3(0, direction), TmpVectors.Vector3[2]);\n this.l00.addInPlace(TmpVectors.Vector3[2]);\n c.scaleToRef(applySH3(1, direction), TmpVectors.Vector3[2]);\n this.l1_1.addInPlace(TmpVectors.Vector3[2]);\n c.scaleToRef(applySH3(2, direction), TmpVectors.Vector3[2]);\n this.l10.addInPlace(TmpVectors.Vector3[2]);\n c.scaleToRef(applySH3(3, direction), TmpVectors.Vector3[2]);\n this.l11.addInPlace(TmpVectors.Vector3[2]);\n c.scaleToRef(applySH3(4, direction), TmpVectors.Vector3[2]);\n this.l2_2.addInPlace(TmpVectors.Vector3[2]);\n c.scaleToRef(applySH3(5, direction), TmpVectors.Vector3[2]);\n this.l2_1.addInPlace(TmpVectors.Vector3[2]);\n c.scaleToRef(applySH3(6, direction), TmpVectors.Vector3[2]);\n this.l20.addInPlace(TmpVectors.Vector3[2]);\n c.scaleToRef(applySH3(7, direction), TmpVectors.Vector3[2]);\n this.l21.addInPlace(TmpVectors.Vector3[2]);\n c.scaleToRef(applySH3(8, direction), TmpVectors.Vector3[2]);\n this.l22.addInPlace(TmpVectors.Vector3[2]);\n }\n /**\n * Scales the spherical harmonics by the given amount\n * @param scale the amount to scale\n */\n scaleInPlace(scale) {\n this.l00.scaleInPlace(scale);\n this.l1_1.scaleInPlace(scale);\n this.l10.scaleInPlace(scale);\n this.l11.scaleInPlace(scale);\n this.l2_2.scaleInPlace(scale);\n this.l2_1.scaleInPlace(scale);\n this.l20.scaleInPlace(scale);\n this.l21.scaleInPlace(scale);\n this.l22.scaleInPlace(scale);\n }\n /**\n * Convert from incident radiance (Li) to irradiance (E) by applying convolution with the cosine-weighted hemisphere.\n *\n * ```\n * E_lm = A_l * L_lm\n * ```\n *\n * In spherical harmonics this convolution amounts to scaling factors for each frequency band.\n * This corresponds to equation 5 in \"An Efficient Representation for Irradiance Environment Maps\", where\n * the scaling factors are given in equation 9.\n */\n convertIncidentRadianceToIrradiance() {\n // Constant (Band 0)\n this.l00.scaleInPlace(SHCosKernelConvolution[0]);\n // Linear (Band 1)\n this.l1_1.scaleInPlace(SHCosKernelConvolution[1]);\n this.l10.scaleInPlace(SHCosKernelConvolution[2]);\n this.l11.scaleInPlace(SHCosKernelConvolution[3]);\n // Quadratic (Band 2)\n this.l2_2.scaleInPlace(SHCosKernelConvolution[4]);\n this.l2_1.scaleInPlace(SHCosKernelConvolution[5]);\n this.l20.scaleInPlace(SHCosKernelConvolution[6]);\n this.l21.scaleInPlace(SHCosKernelConvolution[7]);\n this.l22.scaleInPlace(SHCosKernelConvolution[8]);\n }\n /**\n * Convert from irradiance to outgoing radiance for Lambertian BDRF, suitable for efficient shader evaluation.\n *\n * ```\n * L = (1/pi) * E * rho\n * ```\n *\n * This is done by an additional scale by 1/pi, so is a fairly trivial operation but important conceptually.\n */\n convertIrradianceToLambertianRadiance() {\n this.scaleInPlace(1.0 / Math.PI);\n // The resultant SH now represents outgoing radiance, so includes the Lambert 1/pi normalisation factor but without albedo (rho) applied\n // (The pixel shader must apply albedo after texture fetches, etc).\n }\n /**\n * Integrates the reconstruction coefficients directly in to the SH preventing further\n * required operations at run time.\n *\n * This is simply done by scaling back the SH with Ylm constants parameter.\n * The trigonometric part being applied by the shader at run time.\n */\n preScaleForRendering() {\n this.preScaled = true;\n this.l00.scaleInPlace(SH3ylmBasisConstants[0]);\n this.l1_1.scaleInPlace(SH3ylmBasisConstants[1]);\n this.l10.scaleInPlace(SH3ylmBasisConstants[2]);\n this.l11.scaleInPlace(SH3ylmBasisConstants[3]);\n this.l2_2.scaleInPlace(SH3ylmBasisConstants[4]);\n this.l2_1.scaleInPlace(SH3ylmBasisConstants[5]);\n this.l20.scaleInPlace(SH3ylmBasisConstants[6]);\n this.l21.scaleInPlace(SH3ylmBasisConstants[7]);\n this.l22.scaleInPlace(SH3ylmBasisConstants[8]);\n }\n /**\n * update the spherical harmonics coefficients from the given array\n * @param data defines the 9x3 coefficients (l00, l1-1, l10, l11, l2-2, l2-1, l20, l21, l22)\n * @returns the spherical harmonics (this)\n */\n updateFromArray(data) {\n Vector3.FromArrayToRef(data[0], 0, this.l00);\n Vector3.FromArrayToRef(data[1], 0, this.l1_1);\n Vector3.FromArrayToRef(data[2], 0, this.l10);\n Vector3.FromArrayToRef(data[3], 0, this.l11);\n Vector3.FromArrayToRef(data[4], 0, this.l2_2);\n Vector3.FromArrayToRef(data[5], 0, this.l2_1);\n Vector3.FromArrayToRef(data[6], 0, this.l20);\n Vector3.FromArrayToRef(data[7], 0, this.l21);\n Vector3.FromArrayToRef(data[8], 0, this.l22);\n return this;\n }\n /**\n * update the spherical harmonics coefficients from the given floats array\n * @param data defines the 9x3 coefficients (l00, l1-1, l10, l11, l2-2, l2-1, l20, l21, l22)\n * @returns the spherical harmonics (this)\n */\n updateFromFloatsArray(data) {\n Vector3.FromFloatsToRef(data[0], data[1], data[2], this.l00);\n Vector3.FromFloatsToRef(data[3], data[4], data[5], this.l1_1);\n Vector3.FromFloatsToRef(data[6], data[7], data[8], this.l10);\n Vector3.FromFloatsToRef(data[9], data[10], data[11], this.l11);\n Vector3.FromFloatsToRef(data[12], data[13], data[14], this.l2_2);\n Vector3.FromFloatsToRef(data[15], data[16], data[17], this.l2_1);\n Vector3.FromFloatsToRef(data[18], data[19], data[20], this.l20);\n Vector3.FromFloatsToRef(data[21], data[22], data[23], this.l21);\n Vector3.FromFloatsToRef(data[24], data[25], data[26], this.l22);\n return this;\n }\n /**\n * Constructs a spherical harmonics from an array.\n * @param data defines the 9x3 coefficients (l00, l1-1, l10, l11, l2-2, l2-1, l20, l21, l22)\n * @returns the spherical harmonics\n */\n static FromArray(data) {\n const sh = new SphericalHarmonics();\n return sh.updateFromArray(data);\n }\n // Keep for references.\n /**\n * Gets the spherical harmonics from polynomial\n * @param polynomial the spherical polynomial\n * @returns the spherical harmonics\n */\n static FromPolynomial(polynomial) {\n const result = new SphericalHarmonics();\n result.l00 = polynomial.xx.scale(0.376127).add(polynomial.yy.scale(0.376127)).add(polynomial.zz.scale(0.376126));\n result.l1_1 = polynomial.y.scale(0.977204);\n result.l10 = polynomial.z.scale(0.977204);\n result.l11 = polynomial.x.scale(0.977204);\n result.l2_2 = polynomial.xy.scale(1.16538);\n result.l2_1 = polynomial.yz.scale(1.16538);\n result.l20 = polynomial.zz.scale(1.34567).subtract(polynomial.xx.scale(0.672834)).subtract(polynomial.yy.scale(0.672834));\n result.l21 = polynomial.zx.scale(1.16538);\n result.l22 = polynomial.xx.scale(1.16538).subtract(polynomial.yy.scale(1.16538));\n result.l1_1.scaleInPlace(-1);\n result.l11.scaleInPlace(-1);\n result.l2_1.scaleInPlace(-1);\n result.l21.scaleInPlace(-1);\n result.scaleInPlace(Math.PI);\n return result;\n }\n}\n/**\n * Class representing spherical polynomial coefficients to the 3rd degree\n */\nexport class SphericalPolynomial {\n constructor() {\n /**\n * The x coefficients of the spherical polynomial\n */\n this.x = Vector3.Zero();\n /**\n * The y coefficients of the spherical polynomial\n */\n this.y = Vector3.Zero();\n /**\n * The z coefficients of the spherical polynomial\n */\n this.z = Vector3.Zero();\n /**\n * The xx coefficients of the spherical polynomial\n */\n this.xx = Vector3.Zero();\n /**\n * The yy coefficients of the spherical polynomial\n */\n this.yy = Vector3.Zero();\n /**\n * The zz coefficients of the spherical polynomial\n */\n this.zz = Vector3.Zero();\n /**\n * The xy coefficients of the spherical polynomial\n */\n this.xy = Vector3.Zero();\n /**\n * The yz coefficients of the spherical polynomial\n */\n this.yz = Vector3.Zero();\n /**\n * The zx coefficients of the spherical polynomial\n */\n this.zx = Vector3.Zero();\n }\n /**\n * The spherical harmonics used to create the polynomials.\n */\n get preScaledHarmonics() {\n if (!this._harmonics) {\n this._harmonics = SphericalHarmonics.FromPolynomial(this);\n }\n if (!this._harmonics.preScaled) {\n this._harmonics.preScaleForRendering();\n }\n return this._harmonics;\n }\n /**\n * Adds an ambient color to the spherical polynomial\n * @param color the color to add\n */\n addAmbient(color) {\n TmpVectors.Vector3[0].copyFromFloats(color.r, color.g, color.b);\n const colorVector = TmpVectors.Vector3[0];\n this.xx.addInPlace(colorVector);\n this.yy.addInPlace(colorVector);\n this.zz.addInPlace(colorVector);\n }\n /**\n * Scales the spherical polynomial by the given amount\n * @param scale the amount to scale\n */\n scaleInPlace(scale) {\n this.x.scaleInPlace(scale);\n this.y.scaleInPlace(scale);\n this.z.scaleInPlace(scale);\n this.xx.scaleInPlace(scale);\n this.yy.scaleInPlace(scale);\n this.zz.scaleInPlace(scale);\n this.yz.scaleInPlace(scale);\n this.zx.scaleInPlace(scale);\n this.xy.scaleInPlace(scale);\n }\n /**\n * Updates the spherical polynomial from harmonics\n * @param harmonics the spherical harmonics\n * @returns the spherical polynomial\n */\n updateFromHarmonics(harmonics) {\n this._harmonics = harmonics;\n this.x.copyFrom(harmonics.l11);\n this.x.scaleInPlace(1.02333).scaleInPlace(-1);\n this.y.copyFrom(harmonics.l1_1);\n this.y.scaleInPlace(1.02333).scaleInPlace(-1);\n this.z.copyFrom(harmonics.l10);\n this.z.scaleInPlace(1.02333);\n this.xx.copyFrom(harmonics.l00);\n TmpVectors.Vector3[0].copyFrom(harmonics.l20).scaleInPlace(0.247708);\n TmpVectors.Vector3[1].copyFrom(harmonics.l22).scaleInPlace(0.429043);\n this.xx.scaleInPlace(0.886277).subtractInPlace(TmpVectors.Vector3[0]).addInPlace(TmpVectors.Vector3[1]);\n this.yy.copyFrom(harmonics.l00);\n this.yy.scaleInPlace(0.886277).subtractInPlace(TmpVectors.Vector3[0]).subtractInPlace(TmpVectors.Vector3[1]);\n this.zz.copyFrom(harmonics.l00);\n TmpVectors.Vector3[0].copyFrom(harmonics.l20).scaleInPlace(0.495417);\n this.zz.scaleInPlace(0.886277).addInPlace(TmpVectors.Vector3[0]);\n this.yz.copyFrom(harmonics.l2_1);\n this.yz.scaleInPlace(0.858086).scaleInPlace(-1);\n this.zx.copyFrom(harmonics.l21);\n this.zx.scaleInPlace(0.858086).scaleInPlace(-1);\n this.xy.copyFrom(harmonics.l2_2);\n this.xy.scaleInPlace(0.858086);\n this.scaleInPlace(1.0 / Math.PI);\n return this;\n }\n /**\n * Gets the spherical polynomial from harmonics\n * @param harmonics the spherical harmonics\n * @returns the spherical polynomial\n */\n static FromHarmonics(harmonics) {\n const result = new SphericalPolynomial();\n return result.updateFromHarmonics(harmonics);\n }\n /**\n * Constructs a spherical polynomial from an array.\n * @param data defines the 9x3 coefficients (x, y, z, xx, yy, zz, yz, zx, xy)\n * @returns the spherical polynomial\n */\n static FromArray(data) {\n const sp = new SphericalPolynomial();\n Vector3.FromArrayToRef(data[0], 0, sp.x);\n Vector3.FromArrayToRef(data[1], 0, sp.y);\n Vector3.FromArrayToRef(data[2], 0, sp.z);\n Vector3.FromArrayToRef(data[3], 0, sp.xx);\n Vector3.FromArrayToRef(data[4], 0, sp.yy);\n Vector3.FromArrayToRef(data[5], 0, sp.zz);\n Vector3.FromArrayToRef(data[6], 0, sp.yz);\n Vector3.FromArrayToRef(data[7], 0, sp.zx);\n Vector3.FromArrayToRef(data[8], 0, sp.xy);\n return sp;\n }\n}\n//# sourceMappingURL=sphericalPolynomial.js.map","import { Vector3 } from \"../../Maths/math.vector.js\";\nimport { Scalar } from \"../../Maths/math.scalar.js\";\nimport { SphericalPolynomial, SphericalHarmonics } from \"../../Maths/sphericalPolynomial.js\";\n\nimport { ToLinearSpace } from \"../../Maths/math.constants.js\";\nimport { Color3 } from \"../../Maths/math.color.js\";\nclass FileFaceOrientation {\n constructor(name, worldAxisForNormal, worldAxisForFileX, worldAxisForFileY) {\n this.name = name;\n this.worldAxisForNormal = worldAxisForNormal;\n this.worldAxisForFileX = worldAxisForFileX;\n this.worldAxisForFileY = worldAxisForFileY;\n }\n}\n/**\n * Helper class dealing with the extraction of spherical polynomial dataArray\n * from a cube map.\n */\nexport class CubeMapToSphericalPolynomialTools {\n /**\n * Converts a texture to the according Spherical Polynomial data.\n * This extracts the first 3 orders only as they are the only one used in the lighting.\n *\n * @param texture The texture to extract the information from.\n * @returns The Spherical Polynomial data.\n */\n static ConvertCubeMapTextureToSphericalPolynomial(texture) {\n var _a;\n if (!texture.isCube) {\n // Only supports cube Textures currently.\n return null;\n }\n (_a = texture.getScene()) === null || _a === void 0 ? void 0 : _a.getEngine().flushFramebuffer();\n const size = texture.getSize().width;\n const rightPromise = texture.readPixels(0, undefined, undefined, false);\n const leftPromise = texture.readPixels(1, undefined, undefined, false);\n let upPromise;\n let downPromise;\n if (texture.isRenderTarget) {\n upPromise = texture.readPixels(3, undefined, undefined, false);\n downPromise = texture.readPixels(2, undefined, undefined, false);\n }\n else {\n upPromise = texture.readPixels(2, undefined, undefined, false);\n downPromise = texture.readPixels(3, undefined, undefined, false);\n }\n const frontPromise = texture.readPixels(4, undefined, undefined, false);\n const backPromise = texture.readPixels(5, undefined, undefined, false);\n const gammaSpace = texture.gammaSpace;\n // Always read as RGBA.\n const format = 5;\n let type = 0;\n if (texture.textureType == 1 || texture.textureType == 2) {\n type = 1;\n }\n return new Promise((resolve) => {\n Promise.all([leftPromise, rightPromise, upPromise, downPromise, frontPromise, backPromise]).then(([left, right, up, down, front, back]) => {\n const cubeInfo = {\n size,\n right,\n left,\n up,\n down,\n front,\n back,\n format,\n type,\n gammaSpace,\n };\n resolve(this.ConvertCubeMapToSphericalPolynomial(cubeInfo));\n });\n });\n }\n /**\n * Compute the area on the unit sphere of the rectangle defined by (x,y) and the origin\n * See https://www.rorydriscoll.com/2012/01/15/cubemap-texel-solid-angle/\n * @param x\n * @param y\n */\n static _AreaElement(x, y) {\n return Math.atan2(x * y, Math.sqrt(x * x + y * y + 1));\n }\n /**\n * Converts a cubemap to the according Spherical Polynomial data.\n * This extracts the first 3 orders only as they are the only one used in the lighting.\n *\n * @param cubeInfo The Cube map to extract the information from.\n * @returns The Spherical Polynomial data.\n */\n static ConvertCubeMapToSphericalPolynomial(cubeInfo) {\n const sphericalHarmonics = new SphericalHarmonics();\n let totalSolidAngle = 0.0;\n // The (u,v) range is [-1,+1], so the distance between each texel is 2/Size.\n const du = 2.0 / cubeInfo.size;\n const dv = du;\n const halfTexel = 0.5 * du;\n // The (u,v) of the first texel is half a texel from the corner (-1,-1).\n const minUV = halfTexel - 1.0;\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\n const fileFace = this._FileFaces[faceIndex];\n const dataArray = cubeInfo[fileFace.name];\n let v = minUV;\n // TODO: we could perform the summation directly into a SphericalPolynomial (SP), which is more efficient than SphericalHarmonic (SH).\n // This is possible because during the summation we do not need the SH-specific properties, e.g. orthogonality.\n // Because SP is still linear, so summation is fine in that basis.\n const stride = cubeInfo.format === 5 ? 4 : 3;\n for (let y = 0; y < cubeInfo.size; y++) {\n let u = minUV;\n for (let x = 0; x < cubeInfo.size; x++) {\n // World direction (not normalised)\n const worldDirection = fileFace.worldAxisForFileX.scale(u).add(fileFace.worldAxisForFileY.scale(v)).add(fileFace.worldAxisForNormal);\n worldDirection.normalize();\n const deltaSolidAngle = this._AreaElement(u - halfTexel, v - halfTexel) -\n this._AreaElement(u - halfTexel, v + halfTexel) -\n this._AreaElement(u + halfTexel, v - halfTexel) +\n this._AreaElement(u + halfTexel, v + halfTexel);\n let r = dataArray[y * cubeInfo.size * stride + x * stride + 0];\n let g = dataArray[y * cubeInfo.size * stride + x * stride + 1];\n let b = dataArray[y * cubeInfo.size * stride + x * stride + 2];\n // Prevent NaN harmonics with extreme HDRI data.\n if (isNaN(r)) {\n r = 0;\n }\n if (isNaN(g)) {\n g = 0;\n }\n if (isNaN(b)) {\n b = 0;\n }\n // Handle Integer types.\n if (cubeInfo.type === 0) {\n r /= 255;\n g /= 255;\n b /= 255;\n }\n // Handle Gamma space textures.\n if (cubeInfo.gammaSpace) {\n r = Math.pow(Scalar.Clamp(r), ToLinearSpace);\n g = Math.pow(Scalar.Clamp(g), ToLinearSpace);\n b = Math.pow(Scalar.Clamp(b), ToLinearSpace);\n }\n // Prevent to explode in case of really high dynamic ranges.\n // sh 3 would not be enough to accurately represent it.\n const max = this.MAX_HDRI_VALUE;\n if (this.PRESERVE_CLAMPED_COLORS) {\n const currentMax = Math.max(r, g, b);\n if (currentMax > max) {\n const factor = max / currentMax;\n r *= factor;\n g *= factor;\n b *= factor;\n }\n }\n else {\n r = Scalar.Clamp(r, 0, max);\n g = Scalar.Clamp(g, 0, max);\n b = Scalar.Clamp(b, 0, max);\n }\n const color = new Color3(r, g, b);\n sphericalHarmonics.addLight(worldDirection, color, deltaSolidAngle);\n totalSolidAngle += deltaSolidAngle;\n u += du;\n }\n v += dv;\n }\n }\n // Solid angle for entire sphere is 4*pi\n const sphereSolidAngle = 4.0 * Math.PI;\n // Adjust the solid angle to allow for how many faces we processed.\n const facesProcessed = 6.0;\n const expectedSolidAngle = (sphereSolidAngle * facesProcessed) / 6.0;\n // Adjust the harmonics so that the accumulated solid angle matches the expected solid angle.\n // This is needed because the numerical integration over the cube uses a\n // small angle approximation of solid angle for each texel (see deltaSolidAngle),\n // and also to compensate for accumulative error due to float precision in the summation.\n const correctionFactor = expectedSolidAngle / totalSolidAngle;\n sphericalHarmonics.scaleInPlace(correctionFactor);\n sphericalHarmonics.convertIncidentRadianceToIrradiance();\n sphericalHarmonics.convertIrradianceToLambertianRadiance();\n return SphericalPolynomial.FromHarmonics(sphericalHarmonics);\n }\n}\nCubeMapToSphericalPolynomialTools._FileFaces = [\n new FileFaceOrientation(\"right\", new Vector3(1, 0, 0), new Vector3(0, 0, -1), new Vector3(0, -1, 0)),\n new FileFaceOrientation(\"left\", new Vector3(-1, 0, 0), new Vector3(0, 0, 1), new Vector3(0, -1, 0)),\n new FileFaceOrientation(\"up\", new Vector3(0, 1, 0), new Vector3(1, 0, 0), new Vector3(0, 0, 1)),\n new FileFaceOrientation(\"down\", new Vector3(0, -1, 0), new Vector3(1, 0, 0), new Vector3(0, 0, -1)),\n new FileFaceOrientation(\"front\", new Vector3(0, 0, 1), new Vector3(1, 0, 0), new Vector3(0, -1, 0)),\n new FileFaceOrientation(\"back\", new Vector3(0, 0, -1), new Vector3(-1, 0, 0), new Vector3(0, -1, 0)), // -Z bottom\n];\n/** @internal */\nCubeMapToSphericalPolynomialTools.MAX_HDRI_VALUE = 4096;\n/** @internal */\nCubeMapToSphericalPolynomialTools.PRESERVE_CLAMPED_COLORS = false;\n//# sourceMappingURL=cubemapToSphericalPolynomial.js.map","import { CubeMapToSphericalPolynomialTools } from \"../../Misc/HighDynamicRange/cubemapToSphericalPolynomial.js\";\nimport { BaseTexture } from \"./baseTexture.js\";\nBaseTexture.prototype.forceSphericalPolynomialsRecompute = function () {\n if (this._texture) {\n this._texture._sphericalPolynomial = null;\n this._texture._sphericalPolynomialPromise = null;\n this._texture._sphericalPolynomialComputed = false;\n }\n};\nObject.defineProperty(BaseTexture.prototype, \"sphericalPolynomial\", {\n get: function () {\n if (this._texture) {\n if (this._texture._sphericalPolynomial || this._texture._sphericalPolynomialComputed) {\n return this._texture._sphericalPolynomial;\n }\n if (this._texture.isReady) {\n if (!this._texture._sphericalPolynomialPromise) {\n this._texture._sphericalPolynomialPromise = CubeMapToSphericalPolynomialTools.ConvertCubeMapTextureToSphericalPolynomial(this);\n if (this._texture._sphericalPolynomialPromise === null) {\n this._texture._sphericalPolynomialComputed = true;\n }\n else {\n this._texture._sphericalPolynomialPromise.then((sphericalPolynomial) => {\n this._texture._sphericalPolynomial = sphericalPolynomial;\n this._texture._sphericalPolynomialComputed = true;\n });\n }\n }\n return null;\n }\n }\n return null;\n },\n set: function (value) {\n if (this._texture) {\n this._texture._sphericalPolynomial = value;\n }\n },\n enumerable: true,\n configurable: true,\n});\n//# sourceMappingURL=baseTexture.polynomial.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"prePassDeclaration\";\nconst shader = `#ifdef PREPASS\n#extension GL_EXT_draw_buffers : require\nlayout(location=0) out highp vec4 glFragData[{X}];highp vec4 gl_FragColor;\n#ifdef PREPASS_DEPTH\nvarying highp vec3 vViewPos;\n#endif\n#ifdef PREPASS_VELOCITY\nvarying highp vec4 vCurrentPosition;varying highp vec4 vPreviousPosition;\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const prePassDeclaration = { name, shader };\n//# sourceMappingURL=prePassDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"oitDeclaration\";\nconst shader = `#ifdef ORDER_INDEPENDENT_TRANSPARENCY\n#extension GL_EXT_draw_buffers : require\nlayout(location=0) out vec2 depth; \nlayout(location=1) out vec4 frontColor;layout(location=2) out vec4 backColor;\n#define MAX_DEPTH 99999.0\nhighp vec4 gl_FragColor;uniform sampler2D oitDepthSampler;uniform sampler2D oitFrontColorSampler;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const oitDeclaration = { name, shader };\n//# sourceMappingURL=oitDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"decalFragmentDeclaration\";\nconst shader = `#ifdef DECAL\nuniform vec4 vDecalInfos;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const decalFragmentDeclaration = { name, shader };\n//# sourceMappingURL=decalFragmentDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./decalFragmentDeclaration.js\";\nconst name = \"pbrFragmentDeclaration\";\nconst shader = `uniform vec4 vEyePosition;uniform vec3 vReflectionColor;uniform vec4 vAlbedoColor;uniform vec4 vLightingIntensity;uniform vec4 vReflectivityColor;uniform vec4 vMetallicReflectanceFactors;uniform vec3 vEmissiveColor;uniform float visibility;uniform vec3 vAmbientColor;\n#ifdef ALBEDO\nuniform vec2 vAlbedoInfos;\n#endif\n#ifdef AMBIENT\nuniform vec4 vAmbientInfos;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;uniform vec2 vTangentSpaceParams;\n#endif\n#ifdef OPACITY\nuniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;\n#endif\n#ifdef REFLECTIVITY\nuniform vec3 vReflectivityInfos;\n#endif\n#ifdef MICROSURFACEMAP\nuniform vec2 vMicroSurfaceSamplerInfos;\n#endif\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(SS_REFRACTION) || defined(PREPASS)\nuniform mat4 view;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\n#ifdef REALTIME_FILTERING\nuniform vec2 vReflectionFilteringInfo;\n#endif\nuniform mat4 reflectionMatrix;uniform vec3 vReflectionMicrosurfaceInfos;\n#if defined(USE_LOCAL_REFLECTIONMAP_CUBIC) && defined(REFLECTIONMAP_CUBIC)\nuniform vec3 vReflectionPosition;uniform vec3 vReflectionSize; \n#endif\n#endif\n#if defined(SS_REFRACTION) && defined(SS_USE_LOCAL_REFRACTIONMAP_CUBIC)\nuniform vec3 vRefractionPosition;uniform vec3 vRefractionSize; \n#endif\n#ifdef CLEARCOAT\nuniform vec2 vClearCoatParams;uniform vec4 vClearCoatRefractionParams;\n#if defined(CLEARCOAT_TEXTURE) || defined(CLEARCOAT_TEXTURE_ROUGHNESS)\nuniform vec4 vClearCoatInfos;\n#endif\n#ifdef CLEARCOAT_TEXTURE\nuniform mat4 clearCoatMatrix;\n#endif\n#ifdef CLEARCOAT_TEXTURE_ROUGHNESS\nuniform mat4 clearCoatRoughnessMatrix;\n#endif\n#ifdef CLEARCOAT_BUMP\nuniform vec2 vClearCoatBumpInfos;uniform vec2 vClearCoatTangentSpaceParams;uniform mat4 clearCoatBumpMatrix;\n#endif\n#ifdef CLEARCOAT_TINT\nuniform vec4 vClearCoatTintParams;uniform float clearCoatColorAtDistance;\n#ifdef CLEARCOAT_TINT_TEXTURE\nuniform vec2 vClearCoatTintInfos;uniform mat4 clearCoatTintMatrix;\n#endif\n#endif\n#endif\n#ifdef IRIDESCENCE\nuniform vec4 vIridescenceParams;\n#if defined(IRIDESCENCE_TEXTURE) || defined(IRIDESCENCE_THICKNESS_TEXTURE)\nuniform vec4 vIridescenceInfos;\n#endif\n#ifdef IRIDESCENCE_TEXTURE\nuniform mat4 iridescenceMatrix;\n#endif\n#ifdef IRIDESCENCE_THICKNESS_TEXTURE\nuniform mat4 iridescenceThicknessMatrix;\n#endif\n#endif\n#ifdef ANISOTROPIC\nuniform vec3 vAnisotropy;\n#ifdef ANISOTROPIC_TEXTURE\nuniform vec2 vAnisotropyInfos;uniform mat4 anisotropyMatrix;\n#endif\n#endif\n#ifdef SHEEN\nuniform vec4 vSheenColor;\n#ifdef SHEEN_ROUGHNESS\nuniform float vSheenRoughness;\n#endif\n#if defined(SHEEN_TEXTURE) || defined(SHEEN_TEXTURE_ROUGHNESS)\nuniform vec4 vSheenInfos;\n#endif\n#ifdef SHEEN_TEXTURE\nuniform mat4 sheenMatrix;\n#endif\n#ifdef SHEEN_TEXTURE_ROUGHNESS\nuniform mat4 sheenRoughnessMatrix;\n#endif\n#endif\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\nuniform vec4 vRefractionMicrosurfaceInfos;uniform vec4 vRefractionInfos;uniform mat4 refractionMatrix;\n#ifdef REALTIME_FILTERING\nuniform vec2 vRefractionFilteringInfo;\n#endif\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nuniform vec2 vThicknessInfos;uniform mat4 thicknessMatrix;\n#endif\n#ifdef SS_REFRACTIONINTENSITY_TEXTURE\nuniform vec2 vRefractionIntensityInfos;uniform mat4 refractionIntensityMatrix;\n#endif\n#ifdef SS_TRANSLUCENCYINTENSITY_TEXTURE\nuniform vec2 vTranslucencyIntensityInfos;uniform mat4 translucencyIntensityMatrix;\n#endif\nuniform vec2 vThicknessParam;uniform vec3 vDiffusionDistance;uniform vec4 vTintColor;uniform vec3 vSubSurfaceIntensity;\n#endif\n#ifdef PREPASS\n#ifdef SS_SCATTERING\nuniform float scatteringDiffusionProfile;\n#endif\n#endif\n#if DEBUGMODE>0\nuniform vec2 vDebugMode;\n#endif\n#ifdef DETAIL\nuniform vec4 vDetailInfos;\n#endif\n#include\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#ifdef SPHERICAL_HARMONICS\nuniform vec3 vSphericalL00;uniform vec3 vSphericalL1_1;uniform vec3 vSphericalL10;uniform vec3 vSphericalL11;uniform vec3 vSphericalL2_2;uniform vec3 vSphericalL2_1;uniform vec3 vSphericalL20;uniform vec3 vSphericalL21;uniform vec3 vSphericalL22;\n#else\nuniform vec3 vSphericalX;uniform vec3 vSphericalY;uniform vec3 vSphericalZ;uniform vec3 vSphericalXX_ZZ;uniform vec3 vSphericalYY_ZZ;uniform vec3 vSphericalZZ;uniform vec3 vSphericalXY;uniform vec3 vSphericalYZ;uniform vec3 vSphericalZX;\n#endif\n#endif\n#define ADDITIONAL_FRAGMENT_DECLARATION\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrFragmentDeclaration = { name, shader };\n//# sourceMappingURL=pbrFragmentDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./sceneUboDeclaration.js\";\nimport \"./meshUboDeclaration.js\";\nconst name = \"pbrUboDeclaration\";\nconst shader = `layout(std140,column_major) uniform;uniform Material {vec2 vAlbedoInfos;vec4 vAmbientInfos;vec2 vOpacityInfos;vec2 vEmissiveInfos;vec2 vLightmapInfos;vec3 vReflectivityInfos;vec2 vMicroSurfaceSamplerInfos;vec2 vReflectionInfos;vec2 vReflectionFilteringInfo;vec3 vReflectionPosition;vec3 vReflectionSize;vec3 vBumpInfos;mat4 albedoMatrix;mat4 ambientMatrix;mat4 opacityMatrix;mat4 emissiveMatrix;mat4 lightmapMatrix;mat4 reflectivityMatrix;mat4 microSurfaceSamplerMatrix;mat4 bumpMatrix;vec2 vTangentSpaceParams;mat4 reflectionMatrix;vec3 vReflectionColor;vec4 vAlbedoColor;vec4 vLightingIntensity;vec3 vReflectionMicrosurfaceInfos;float pointSize;vec4 vReflectivityColor;vec3 vEmissiveColor;vec3 vAmbientColor;vec2 vDebugMode;vec4 vMetallicReflectanceFactors;vec2 vMetallicReflectanceInfos;mat4 metallicReflectanceMatrix;vec2 vReflectanceInfos;mat4 reflectanceMatrix;vec3 vSphericalL00;vec3 vSphericalL1_1;vec3 vSphericalL10;vec3 vSphericalL11;vec3 vSphericalL2_2;vec3 vSphericalL2_1;vec3 vSphericalL20;vec3 vSphericalL21;vec3 vSphericalL22;vec3 vSphericalX;vec3 vSphericalY;vec3 vSphericalZ;vec3 vSphericalXX_ZZ;vec3 vSphericalYY_ZZ;vec3 vSphericalZZ;vec3 vSphericalXY;vec3 vSphericalYZ;vec3 vSphericalZX;\n#define ADDITIONAL_UBO_DECLARATION\n};\n#include\n#include\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrUboDeclaration = { name, shader };\n//# sourceMappingURL=pbrUboDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"mainUVVaryingDeclaration\";\nconst shader = `#ifdef MAINUV{X}\nvarying vec2 vMainUV{X};\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const mainUVVaryingDeclaration = { name, shader };\n//# sourceMappingURL=mainUVVaryingDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./mainUVVaryingDeclaration.js\";\nconst name = \"pbrFragmentExtraDeclaration\";\nconst shader = `varying vec3 vPositionW;\n#if DEBUGMODE>0\nvarying vec4 vClipSpacePosition;\n#endif\n#include[1..7]\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvarying vec3 vEnvironmentIrradiance;\n#endif\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrFragmentExtraDeclaration = { name, shader };\n//# sourceMappingURL=pbrFragmentExtraDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"samplerFragmentDeclaration\";\nconst shader = `#ifdef _DEFINENAME_\n#if _DEFINENAME_DIRECTUV==1\n#define v_VARYINGNAME_UV vMainUV1\n#elif _DEFINENAME_DIRECTUV==2\n#define v_VARYINGNAME_UV vMainUV2\n#elif _DEFINENAME_DIRECTUV==3\n#define v_VARYINGNAME_UV vMainUV3\n#elif _DEFINENAME_DIRECTUV==4\n#define v_VARYINGNAME_UV vMainUV4\n#elif _DEFINENAME_DIRECTUV==5\n#define v_VARYINGNAME_UV vMainUV5\n#elif _DEFINENAME_DIRECTUV==6\n#define v_VARYINGNAME_UV vMainUV6\n#else\nvarying vec2 v_VARYINGNAME_UV;\n#endif\nuniform sampler2D _SAMPLERNAME_Sampler;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const samplerFragmentDeclaration = { name, shader };\n//# sourceMappingURL=samplerFragmentDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"samplerFragmentAlternateDeclaration\";\nconst shader = `#ifdef _DEFINENAME_\n#if _DEFINENAME_DIRECTUV==1\n#define v_VARYINGNAME_UV vMainUV1\n#elif _DEFINENAME_DIRECTUV==2\n#define v_VARYINGNAME_UV vMainUV2\n#elif _DEFINENAME_DIRECTUV==3\n#define v_VARYINGNAME_UV vMainUV3\n#elif _DEFINENAME_DIRECTUV==4\n#define v_VARYINGNAME_UV vMainUV4\n#elif _DEFINENAME_DIRECTUV==5\n#define v_VARYINGNAME_UV vMainUV5\n#elif _DEFINENAME_DIRECTUV==6\n#define v_VARYINGNAME_UV vMainUV6\n#else\nvarying vec2 v_VARYINGNAME_UV;\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const samplerFragmentAlternateDeclaration = { name, shader };\n//# sourceMappingURL=samplerFragmentAlternateDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./samplerFragmentDeclaration.js\";\nimport \"./samplerFragmentAlternateDeclaration.js\";\nconst name = \"pbrFragmentSamplersDeclaration\";\nconst shader = `#include(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo,_SAMPLERNAME_,albedo)\n#include(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_SAMPLERNAME_,ambient)\n#include(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_SAMPLERNAME_,opacity)\n#include(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_SAMPLERNAME_,emissive)\n#include(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_SAMPLERNAME_,lightmap)\n#include(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity,_SAMPLERNAME_,reflectivity)\n#include(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler,_SAMPLERNAME_,microSurface)\n#include(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance,_SAMPLERNAME_,metallicReflectance)\n#include(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance,_SAMPLERNAME_,reflectance)\n#include(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_SAMPLERNAME_,decal)\n#ifdef CLEARCOAT\n#include(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat,_SAMPLERNAME_,clearCoat)\n#include(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness)\n#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL)\nuniform sampler2D clearCoatRoughnessSampler;\n#endif\n#include(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump,_SAMPLERNAME_,clearCoatBump)\n#include(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint,_SAMPLERNAME_,clearCoatTint)\n#endif\n#ifdef IRIDESCENCE\n#include(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence,_SAMPLERNAME_,iridescence)\n#include(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness,_SAMPLERNAME_,iridescenceThickness)\n#endif\n#ifdef SHEEN\n#include(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen,_SAMPLERNAME_,sheen)\n#include(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness)\n#if defined(SHEEN_ROUGHNESS) && defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL)\nuniform sampler2D sheenRoughnessSampler;\n#endif\n#endif\n#ifdef ANISOTROPIC\n#include(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy,_SAMPLERNAME_,anisotropy)\n#endif\n#ifdef REFLECTION\n#ifdef REFLECTIONMAP_3D\n#define sampleReflection(s,c) textureCube(s,c)\nuniform samplerCube reflectionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l)\n#else\nuniform samplerCube reflectionSamplerLow;uniform samplerCube reflectionSamplerHigh;\n#endif\n#ifdef USEIRRADIANCEMAP\nuniform samplerCube irradianceSampler;\n#endif\n#else\n#define sampleReflection(s,c) texture2D(s,c)\nuniform sampler2D reflectionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l)\n#else\nuniform sampler2D reflectionSamplerLow;uniform sampler2D reflectionSamplerHigh;\n#endif\n#ifdef USEIRRADIANCEMAP\nuniform sampler2D irradianceSampler;\n#endif\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#else\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#endif\n#endif\n#ifdef ENVIRONMENTBRDF\nuniform sampler2D environmentBrdfSampler;\n#endif\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\n#ifdef SS_REFRACTIONMAP_3D\n#define sampleRefraction(s,c) textureCube(s,c)\nuniform samplerCube refractionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleRefractionLod(s,c,l) textureCubeLodEXT(s,c,l)\n#else\nuniform samplerCube refractionSamplerLow;uniform samplerCube refractionSamplerHigh;\n#endif\n#else\n#define sampleRefraction(s,c) texture2D(s,c)\nuniform sampler2D refractionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleRefractionLod(s,c,l) texture2DLodEXT(s,c,l)\n#else\nuniform sampler2D refractionSamplerLow;uniform sampler2D refractionSamplerHigh;\n#endif\n#endif\n#endif\n#include(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness,_SAMPLERNAME_,thickness)\n#include(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity,_SAMPLERNAME_,refractionIntensity)\n#include(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity,_SAMPLERNAME_,translucencyIntensity)\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrFragmentSamplersDeclaration = { name, shader };\n//# sourceMappingURL=pbrFragmentSamplersDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"imageProcessingDeclaration\";\nconst shader = `#ifdef EXPOSURE\nuniform float exposureLinear;\n#endif\n#ifdef CONTRAST\nuniform float contrast;\n#endif\n#if defined(VIGNETTE) || defined(DITHER)\nuniform vec2 vInverseScreenSize;\n#endif\n#ifdef VIGNETTE\nuniform vec4 vignetteSettings1;uniform vec4 vignetteSettings2;\n#endif\n#ifdef COLORCURVES\nuniform vec4 vCameraColorCurveNegative;uniform vec4 vCameraColorCurveNeutral;uniform vec4 vCameraColorCurvePositive;\n#endif\n#ifdef COLORGRADING\n#ifdef COLORGRADING3D\nuniform highp sampler3D txColorTransform;\n#else\nuniform sampler2D txColorTransform;\n#endif\nuniform vec4 colorTransformSettings;\n#endif\n#ifdef DITHER\nuniform float ditherIntensity;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const imageProcessingDeclaration = { name, shader };\n//# sourceMappingURL=imageProcessingDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"logDepthDeclaration\";\nconst shader = `#ifdef LOGARITHMICDEPTH\nuniform float logarithmicDepthConstant;varying float vFragmentDepth;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const logDepthDeclaration = { name, shader };\n//# sourceMappingURL=logDepthDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"subSurfaceScatteringFunctions\";\nconst shader = `bool testLightingForSSS(float diffusionProfile)\n{return diffusionProfile<1.;}`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const subSurfaceScatteringFunctions = { name, shader };\n//# sourceMappingURL=subSurfaceScatteringFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"importanceSampling\";\nconst shader = `vec3 hemisphereCosSample(vec2 u) {float phi=2.*PI*u.x;float cosTheta2=1.-u.y;float cosTheta=sqrt(cosTheta2);float sinTheta=sqrt(1.-cosTheta2);return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}\nvec3 hemisphereImportanceSampleDggx(vec2 u,float a) {float phi=2.*PI*u.x;float cosTheta2=(1.-u.y)/(1.+(a+1.)*((a-1.)*u.y));float cosTheta=sqrt(cosTheta2);float sinTheta=sqrt(1.-cosTheta2);return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}\nvec3 hemisphereImportanceSampleDCharlie(vec2 u,float a) { \nfloat phi=2.*PI*u.x;float sinTheta=pow(u.y,a/(2.*a+1.));float cosTheta=sqrt(1.-sinTheta*sinTheta);return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const importanceSampling = { name, shader };\n//# sourceMappingURL=importanceSampling.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrHelperFunctions\";\nconst shader = `#define MINIMUMVARIANCE 0.0005\nfloat convertRoughnessToAverageSlope(float roughness)\n{return square(roughness)+MINIMUMVARIANCE;}\nfloat fresnelGrazingReflectance(float reflectance0) {float reflectance90=saturate(reflectance0*25.0);return reflectance90;}\nvec2 getAARoughnessFactors(vec3 normalVector) {\n#ifdef SPECULARAA\nvec3 nDfdx=dFdx(normalVector.xyz);vec3 nDfdy=dFdy(normalVector.xyz);float slopeSquare=max(dot(nDfdx,nDfdx),dot(nDfdy,nDfdy));float geometricRoughnessFactor=pow(saturate(slopeSquare),0.333);float geometricAlphaGFactor=sqrt(slopeSquare);geometricAlphaGFactor*=0.75;return vec2(geometricRoughnessFactor,geometricAlphaGFactor);\n#else\nreturn vec2(0.);\n#endif\n}\n#ifdef ANISOTROPIC\n#ifdef ANISOTROPIC_LEGACY\nvec2 getAnisotropicRoughness(float alphaG,float anisotropy) {float alphaT=max(alphaG*(1.0+anisotropy),MINIMUMVARIANCE);float alphaB=max(alphaG*(1.0-anisotropy),MINIMUMVARIANCE);return vec2(alphaT,alphaB);}\nvec3 getAnisotropicBentNormals(const vec3 T,const vec3 B,const vec3 N,const vec3 V,float anisotropy,float roughness) {vec3 anisotropicFrameDirection=anisotropy>=0.0 ? B : T;vec3 anisotropicFrameTangent=cross(normalize(anisotropicFrameDirection),V);vec3 anisotropicFrameNormal=cross(anisotropicFrameTangent,anisotropicFrameDirection);vec3 anisotropicNormal=normalize(mix(N,anisotropicFrameNormal,abs(anisotropy)));return anisotropicNormal;}\n#else\nvec2 getAnisotropicRoughness(float alphaG,float anisotropy) {float alphaT=max(mix(alphaG,1.0,anisotropy*anisotropy),MINIMUMVARIANCE);float alphaB=max(alphaG,MINIMUMVARIANCE);return vec2(alphaT,alphaB);}\nvec3 getAnisotropicBentNormals(const vec3 T,const vec3 B,const vec3 N,const vec3 V,float anisotropy,float roughness) {vec3 bentNormal=cross(B,V);bentNormal=normalize(cross(bentNormal,B));float a=square(square(1.0-anisotropy*(1.0-roughness)));bentNormal=normalize(mix(bentNormal,N,a));return bentNormal;}\n#endif\n#endif\n#if defined(CLEARCOAT) || defined(SS_REFRACTION)\nvec3 cocaLambert(vec3 alpha,float distance) {return exp(-alpha*distance);}\nvec3 cocaLambert(float NdotVRefract,float NdotLRefract,vec3 alpha,float thickness) {return cocaLambert(alpha,(thickness*((NdotLRefract+NdotVRefract)/(NdotLRefract*NdotVRefract))));}\nvec3 computeColorAtDistanceInMedia(vec3 color,float distance) {return -log(color)/distance;}\nvec3 computeClearCoatAbsorption(float NdotVRefract,float NdotLRefract,vec3 clearCoatColor,float clearCoatThickness,float clearCoatIntensity) {vec3 clearCoatAbsorption=mix(vec3(1.0),\ncocaLambert(NdotVRefract,NdotLRefract,clearCoatColor,clearCoatThickness),\nclearCoatIntensity);return clearCoatAbsorption;}\n#endif\n#ifdef MICROSURFACEAUTOMATIC\nfloat computeDefaultMicroSurface(float microSurface,vec3 reflectivityColor)\n{const float kReflectivityNoAlphaWorkflow_SmoothnessMax=0.95;float reflectivityLuminance=getLuminance(reflectivityColor);float reflectivityLuma=sqrt(reflectivityLuminance);microSurface=reflectivityLuma*kReflectivityNoAlphaWorkflow_SmoothnessMax;return microSurface;}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrHelperFunctions = { name, shader };\n//# sourceMappingURL=pbrHelperFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"imageProcessingFunctions\";\nconst shader = `#if defined(COLORGRADING) && !defined(COLORGRADING3D)\n/** \n* Polyfill for SAMPLE_TEXTURE_3D,which is unsupported in WebGL.\n* sampler3dSetting.x=textureOffset (0.5/textureSize).\n* sampler3dSetting.y=textureSize.\n*/\n#define inline\nvec3 sampleTexture3D(sampler2D colorTransform,vec3 color,vec2 sampler3dSetting)\n{float sliceSize=2.0*sampler3dSetting.x; \n#ifdef SAMPLER3DGREENDEPTH\nfloat sliceContinuous=(color.g-sampler3dSetting.x)*sampler3dSetting.y;\n#else\nfloat sliceContinuous=(color.b-sampler3dSetting.x)*sampler3dSetting.y;\n#endif\nfloat sliceInteger=floor(sliceContinuous);float sliceFraction=sliceContinuous-sliceInteger;\n#ifdef SAMPLER3DGREENDEPTH\nvec2 sliceUV=color.rb;\n#else\nvec2 sliceUV=color.rg;\n#endif\nsliceUV.x*=sliceSize;sliceUV.x+=sliceInteger*sliceSize;sliceUV=saturate(sliceUV);vec4 slice0Color=texture2D(colorTransform,sliceUV);sliceUV.x+=sliceSize;sliceUV=saturate(sliceUV);vec4 slice1Color=texture2D(colorTransform,sliceUV);vec3 result=mix(slice0Color.rgb,slice1Color.rgb,sliceFraction);\n#ifdef SAMPLER3DBGRMAP\ncolor.rgb=result.rgb;\n#else\ncolor.rgb=result.bgr;\n#endif\nreturn color;}\n#endif\n#ifdef TONEMAPPING_ACES\nconst mat3 ACESInputMat=mat3(\nvec3(0.59719,0.07600,0.02840),\nvec3(0.35458,0.90834,0.13383),\nvec3(0.04823,0.01566,0.83777)\n);const mat3 ACESOutputMat=mat3(\nvec3( 1.60475,-0.10208,-0.00327),\nvec3(-0.53108, 1.10813,-0.07276),\nvec3(-0.07367,-0.00605, 1.07602)\n);vec3 RRTAndODTFit(vec3 v)\n{vec3 a=v*(v+0.0245786)-0.000090537;vec3 b=v*(0.983729*v+0.4329510)+0.238081;return a/b;}\nvec3 ACESFitted(vec3 color)\n{color=ACESInputMat*color;color=RRTAndODTFit(color);color=ACESOutputMat*color;color=saturate(color);return color;}\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_DEFINITIONS\nvec4 applyImageProcessing(vec4 result) {\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATSTART\n#ifdef EXPOSURE\nresult.rgb*=exposureLinear;\n#endif\n#ifdef VIGNETTE\nvec2 viewportXY=gl_FragCoord.xy*vInverseScreenSize;viewportXY=viewportXY*2.0-1.0;vec3 vignetteXY1=vec3(viewportXY*vignetteSettings1.xy+vignetteSettings1.zw,1.0);float vignetteTerm=dot(vignetteXY1,vignetteXY1);float vignette=pow(vignetteTerm,vignetteSettings2.w);vec3 vignetteColor=vignetteSettings2.rgb;\n#ifdef VIGNETTEBLENDMODEMULTIPLY\nvec3 vignetteColorMultiplier=mix(vignetteColor,vec3(1,1,1),vignette);result.rgb*=vignetteColorMultiplier;\n#endif\n#ifdef VIGNETTEBLENDMODEOPAQUE\nresult.rgb=mix(vignetteColor,result.rgb,vignette);\n#endif\n#endif\n#ifdef TONEMAPPING\n#ifdef TONEMAPPING_ACES\nresult.rgb=ACESFitted(result.rgb);\n#else\nconst float tonemappingCalibration=1.590579;result.rgb=1.0-exp2(-tonemappingCalibration*result.rgb);\n#endif\n#endif\nresult.rgb=toGammaSpace(result.rgb);result.rgb=saturate(result.rgb);\n#ifdef CONTRAST\nvec3 resultHighContrast=result.rgb*result.rgb*(3.0-2.0*result.rgb);if (contrast<1.0) {result.rgb=mix(vec3(0.5,0.5,0.5),result.rgb,contrast);} else {result.rgb=mix(result.rgb,resultHighContrast,contrast-1.0);}\n#endif\n#ifdef COLORGRADING\nvec3 colorTransformInput=result.rgb*colorTransformSettings.xxx+colorTransformSettings.yyy;\n#ifdef COLORGRADING3D\nvec3 colorTransformOutput=texture(txColorTransform,colorTransformInput).rgb;\n#else\nvec3 colorTransformOutput=sampleTexture3D(txColorTransform,colorTransformInput,colorTransformSettings.yz).rgb;\n#endif\nresult.rgb=mix(result.rgb,colorTransformOutput,colorTransformSettings.www);\n#endif\n#ifdef COLORCURVES\nfloat luma=getLuminance(result.rgb);vec2 curveMix=clamp(vec2(luma*3.0-1.5,luma*-3.0+1.5),vec2(0.0),vec2(1.0));vec4 colorCurve=vCameraColorCurveNeutral+curveMix.x*vCameraColorCurvePositive-curveMix.y*vCameraColorCurveNegative;result.rgb*=colorCurve.rgb;result.rgb=mix(vec3(luma),result.rgb,colorCurve.a);\n#endif\n#ifdef DITHER\nfloat rand=getRand(gl_FragCoord.xy*vInverseScreenSize);float dither=mix(-ditherIntensity,ditherIntensity,rand);result.rgb=saturate(result.rgb+vec3(dither));\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATEND\nreturn result;}`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const imageProcessingFunctions = { name, shader };\n//# sourceMappingURL=imageProcessingFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"harmonicsFunctions\";\nconst shader = `#ifdef USESPHERICALFROMREFLECTIONMAP\n#ifdef SPHERICAL_HARMONICS\nvec3 computeEnvironmentIrradiance(vec3 normal) {return vSphericalL00\n+ vSphericalL1_1*(normal.y)\n+ vSphericalL10*(normal.z)\n+ vSphericalL11*(normal.x)\n+ vSphericalL2_2*(normal.y*normal.x)\n+ vSphericalL2_1*(normal.y*normal.z)\n+ vSphericalL20*((3.0*normal.z*normal.z)-1.0)\n+ vSphericalL21*(normal.z*normal.x)\n+ vSphericalL22*(normal.x*normal.x-(normal.y*normal.y));}\n#else\nvec3 computeEnvironmentIrradiance(vec3 normal) {float Nx=normal.x;float Ny=normal.y;float Nz=normal.z;vec3 C1=vSphericalZZ.rgb;vec3 Cx=vSphericalX.rgb;vec3 Cy=vSphericalY.rgb;vec3 Cz=vSphericalZ.rgb;vec3 Cxx_zz=vSphericalXX_ZZ.rgb;vec3 Cyy_zz=vSphericalYY_ZZ.rgb;vec3 Cxy=vSphericalXY.rgb;vec3 Cyz=vSphericalYZ.rgb;vec3 Czx=vSphericalZX.rgb;vec3 a1=Cyy_zz*Ny+Cy;vec3 a2=Cyz*Nz+a1;vec3 b1=Czx*Nz+Cx;vec3 b2=Cxy*Ny+b1;vec3 b3=Cxx_zz*Nx+b2;vec3 t1=Cz *Nz+C1;vec3 t2=a2 *Ny+t1;vec3 t3=b3 *Nx+t2;return t3;}\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const harmonicsFunctions = { name, shader };\n//# sourceMappingURL=harmonicsFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrDirectLightingSetupFunctions\";\nconst shader = `struct preLightingInfo\n{vec3 lightOffset;float lightDistanceSquared;float lightDistance;float attenuation;vec3 L;vec3 H;float NdotV;float NdotLUnclamped;float NdotL;float VdotH;float roughness;\n#ifdef IRIDESCENCE\nfloat iridescenceIntensity;\n#endif\n};preLightingInfo computePointAndSpotPreLightingInfo(vec4 lightData,vec3 V,vec3 N) {preLightingInfo result;result.lightOffset=lightData.xyz-vPositionW;result.lightDistanceSquared=dot(result.lightOffset,result.lightOffset);result.lightDistance=sqrt(result.lightDistanceSquared);result.L=normalize(result.lightOffset);result.H=normalize(V+result.L);result.VdotH=saturate(dot(V,result.H));result.NdotLUnclamped=dot(N,result.L);result.NdotL=saturateEps(result.NdotLUnclamped);return result;}\npreLightingInfo computeDirectionalPreLightingInfo(vec4 lightData,vec3 V,vec3 N) {preLightingInfo result;result.lightDistance=length(-lightData.xyz);result.L=normalize(-lightData.xyz);result.H=normalize(V+result.L);result.VdotH=saturate(dot(V,result.H));result.NdotLUnclamped=dot(N,result.L);result.NdotL=saturateEps(result.NdotLUnclamped);return result;}\npreLightingInfo computeHemisphericPreLightingInfo(vec4 lightData,vec3 V,vec3 N) {preLightingInfo result;result.NdotL=dot(N,lightData.xyz)*0.5+0.5;result.NdotL=saturateEps(result.NdotL);result.NdotLUnclamped=result.NdotL;\n#ifdef SPECULARTERM\nresult.L=normalize(lightData.xyz);result.H=normalize(V+result.L);result.VdotH=saturate(dot(V,result.H));\n#endif\nreturn result;}`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrDirectLightingSetupFunctions = { name, shader };\n//# sourceMappingURL=pbrDirectLightingSetupFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrDirectLightingFalloffFunctions\";\nconst shader = `float computeDistanceLightFalloff_Standard(vec3 lightOffset,float range)\n{return max(0.,1.0-length(lightOffset)/range);}\nfloat computeDistanceLightFalloff_Physical(float lightDistanceSquared)\n{return 1.0/maxEps(lightDistanceSquared);}\nfloat computeDistanceLightFalloff_GLTF(float lightDistanceSquared,float inverseSquaredRange)\n{float lightDistanceFalloff=1.0/maxEps(lightDistanceSquared);float factor=lightDistanceSquared*inverseSquaredRange;float attenuation=saturate(1.0-factor*factor);attenuation*=attenuation;lightDistanceFalloff*=attenuation;return lightDistanceFalloff;}\nfloat computeDistanceLightFalloff(vec3 lightOffset,float lightDistanceSquared,float range,float inverseSquaredRange)\n{\n#ifdef USEPHYSICALLIGHTFALLOFF\nreturn computeDistanceLightFalloff_Physical(lightDistanceSquared);\n#elif defined(USEGLTFLIGHTFALLOFF)\nreturn computeDistanceLightFalloff_GLTF(lightDistanceSquared,inverseSquaredRange);\n#else\nreturn computeDistanceLightFalloff_Standard(lightOffset,range);\n#endif\n}\nfloat computeDirectionalLightFalloff_Standard(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent)\n{float falloff=0.0;float cosAngle=maxEps(dot(-lightDirection,directionToLightCenterW));if (cosAngle>=cosHalfAngle)\n{falloff=max(0.,pow(cosAngle,exponent));}\nreturn falloff;}\nfloat computeDirectionalLightFalloff_Physical(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle)\n{const float kMinusLog2ConeAngleIntensityRatio=6.64385618977; \nfloat concentrationKappa=kMinusLog2ConeAngleIntensityRatio/(1.0-cosHalfAngle);vec4 lightDirectionSpreadSG=vec4(-lightDirection*concentrationKappa,-concentrationKappa);float falloff=exp2(dot(vec4(directionToLightCenterW,1.0),lightDirectionSpreadSG));return falloff;}\nfloat computeDirectionalLightFalloff_GLTF(vec3 lightDirection,vec3 directionToLightCenterW,float lightAngleScale,float lightAngleOffset)\n{float cd=dot(-lightDirection,directionToLightCenterW);float falloff=saturate(cd*lightAngleScale+lightAngleOffset);falloff*=falloff;return falloff;}\nfloat computeDirectionalLightFalloff(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent,float lightAngleScale,float lightAngleOffset)\n{\n#ifdef USEPHYSICALLIGHTFALLOFF\nreturn computeDirectionalLightFalloff_Physical(lightDirection,directionToLightCenterW,cosHalfAngle);\n#elif defined(USEGLTFLIGHTFALLOFF)\nreturn computeDirectionalLightFalloff_GLTF(lightDirection,directionToLightCenterW,lightAngleScale,lightAngleOffset);\n#else\nreturn computeDirectionalLightFalloff_Standard(lightDirection,directionToLightCenterW,cosHalfAngle,exponent);\n#endif\n}`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrDirectLightingFalloffFunctions = { name, shader };\n//# sourceMappingURL=pbrDirectLightingFalloffFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBRDFFunctions\";\nconst shader = `#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\n#ifdef MS_BRDF_ENERGY_CONSERVATION\nvec3 getEnergyConservationFactor(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) {return 1.0+specularEnvironmentR0*(1.0/environmentBrdf.y-1.0);}\n#endif\n#ifdef ENVIRONMENTBRDF\nvec3 getBRDFLookup(float NdotV,float perceptualRoughness) {vec2 UV=vec2(NdotV,perceptualRoughness);vec4 brdfLookup=texture2D(environmentBrdfSampler,UV);\n#ifdef ENVIRONMENTBRDF_RGBD\nbrdfLookup.rgb=fromRGBD(brdfLookup.rgba);\n#endif\nreturn brdfLookup.rgb;}\nvec3 getReflectanceFromBRDFLookup(const vec3 specularEnvironmentR0,const vec3 specularEnvironmentR90,const vec3 environmentBrdf) {\n#ifdef BRDF_V_HEIGHT_CORRELATED\nvec3 reflectance=(specularEnvironmentR90-specularEnvironmentR0)*environmentBrdf.x+specularEnvironmentR0*environmentBrdf.y;\n#else\nvec3 reflectance=specularEnvironmentR0*environmentBrdf.x+specularEnvironmentR90*environmentBrdf.y;\n#endif\nreturn reflectance;}\nvec3 getReflectanceFromBRDFLookup(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) {\n#ifdef BRDF_V_HEIGHT_CORRELATED\nvec3 reflectance=mix(environmentBrdf.xxx,environmentBrdf.yyy,specularEnvironmentR0);\n#else\nvec3 reflectance=specularEnvironmentR0*environmentBrdf.x+environmentBrdf.y;\n#endif\nreturn reflectance;}\n#endif\n/* NOT USED\n#if defined(SHEEN) && defined(SHEEN_SOFTER)\nfloat getBRDFLookupCharlieSheen(float NdotV,float perceptualRoughness)\n{float c=1.0-NdotV;float c3=c*c*c;return 0.65584461*c3+1.0/(4.16526551+exp(-7.97291361*perceptualRoughness+6.33516894));}\n#endif\n*/\n#if !defined(ENVIRONMENTBRDF) || defined(REFLECTIONMAP_SKYBOX) || defined(ALPHAFRESNEL)\nvec3 getReflectanceFromAnalyticalBRDFLookup_Jones(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness)\n{float weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);return reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN));}\n#endif\n#if defined(SHEEN) && defined(ENVIRONMENTBRDF)\n/**\n* The sheen BRDF not containing F can be easily stored in the blue channel of the BRDF texture.\n* The blue channel contains DCharlie*VAshikhmin*NdotL as a lokkup table\n*/\nvec3 getSheenReflectanceFromBRDFLookup(const vec3 reflectance0,const vec3 environmentBrdf) {vec3 sheenEnvironmentReflectance=reflectance0*environmentBrdf.b;return sheenEnvironmentReflectance;}\n#endif\nvec3 fresnelSchlickGGX(float VdotH,vec3 reflectance0,vec3 reflectance90)\n{return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);}\nfloat fresnelSchlickGGX(float VdotH,float reflectance0,float reflectance90)\n{return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);}\n#ifdef CLEARCOAT\nvec3 getR0RemappedForClearCoat(vec3 f0) {\n#ifdef CLEARCOAT_DEFAULTIOR\n#ifdef MOBILE\nreturn saturate(f0*(f0*0.526868+0.529324)-0.0482256);\n#else\nreturn saturate(f0*(f0*(0.941892-0.263008*f0)+0.346479)-0.0285998);\n#endif\n#else\nvec3 s=sqrt(f0);vec3 t=(vClearCoatRefractionParams.z+vClearCoatRefractionParams.w*s)/(vClearCoatRefractionParams.w+vClearCoatRefractionParams.z*s);return square(t);\n#endif\n}\n#endif\n#ifdef IRIDESCENCE\nconst mat3 XYZ_TO_REC709=mat3(\n3.2404542,-0.9692660, 0.0556434,\n-1.5371385, 1.8760108,-0.2040259,\n-0.4985314, 0.0415560, 1.0572252\n);vec3 getIORTfromAirToSurfaceR0(vec3 f0) {vec3 sqrtF0=sqrt(f0);return (1.+sqrtF0)/(1.-sqrtF0);}\nvec3 getR0fromIORs(vec3 iorT,float iorI) {return square((iorT-vec3(iorI))/(iorT+vec3(iorI)));}\nfloat getR0fromIORs(float iorT,float iorI) {return square((iorT-iorI)/(iorT+iorI));}\nvec3 evalSensitivity(float opd,vec3 shift) {float phase=2.0*PI*opd*1.0e-9;const vec3 val=vec3(5.4856e-13,4.4201e-13,5.2481e-13);const vec3 pos=vec3(1.6810e+06,1.7953e+06,2.2084e+06);const vec3 var=vec3(4.3278e+09,9.3046e+09,6.6121e+09);vec3 xyz=val*sqrt(2.0*PI*var)*cos(pos*phase+shift)*exp(-square(phase)*var);xyz.x+=9.7470e-14*sqrt(2.0*PI*4.5282e+09)*cos(2.2399e+06*phase+shift[0])*exp(-4.5282e+09*square(phase));xyz/=1.0685e-7;vec3 srgb=XYZ_TO_REC709*xyz;return srgb;}\nvec3 evalIridescence(float outsideIOR,float eta2,float cosTheta1,float thinFilmThickness,vec3 baseF0) {vec3 I=vec3(1.0);float iridescenceIOR=mix(outsideIOR,eta2,smoothstep(0.0,0.03,thinFilmThickness));float sinTheta2Sq=square(outsideIOR/iridescenceIOR)*(1.0-square(cosTheta1));float cosTheta2Sq=1.0-sinTheta2Sq;if (cosTheta2Sq<0.0) {return I;}\nfloat cosTheta2=sqrt(cosTheta2Sq);float R0=getR0fromIORs(iridescenceIOR,outsideIOR);float R12=fresnelSchlickGGX(cosTheta1,R0,1.);float R21=R12;float T121=1.0-R12;float phi12=0.0;if (iridescenceIOR0\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nfloat radicalInverse_VdC(uint bits) \n{bits=(bits<<16u) | (bits>>16u);bits=((bits & 0x55555555u)<<1u) | ((bits & 0xAAAAAAAAu)>>1u);bits=((bits & 0x33333333u)<<2u) | ((bits & 0xCCCCCCCCu)>>2u);bits=((bits & 0x0F0F0F0Fu)<<4u) | ((bits & 0xF0F0F0F0u)>>4u);bits=((bits & 0x00FF00FFu)<<8u) | ((bits & 0xFF00FF00u)>>8u);return float(bits)*2.3283064365386963e-10; }\nvec2 hammersley(uint i,uint N)\n{return vec2(float(i)/float(N),radicalInverse_VdC(i));}\n#else\nfloat vanDerCorpus(int n,int base)\n{float invBase=1.0/float(base);float denom =1.0;float result =0.0;for(int i=0; i<32; ++i)\n{if(n>0)\n{denom =mod(float(n),2.0);result+=denom*invBase;invBase=invBase/2.0;n =int(float(n)/2.0);}}\nreturn result;}\nvec2 hammersley(int i,int N)\n{return vec2(float(i)/float(N),vanDerCorpus(i,2));}\n#endif\nfloat log4(float x) {return log2(x)/2.;}\nconst float NUM_SAMPLES_FLOAT=float(NUM_SAMPLES);const float NUM_SAMPLES_FLOAT_INVERSED=1./NUM_SAMPLES_FLOAT;const float K=4.;\n#define inline\nvec3 irradiance(samplerCube inputTexture,vec3 inputN,vec2 filteringInfo)\n{vec3 n=normalize(inputN);vec3 result=vec3(0.0);vec3 tangent=abs(n.z)<0.999 ? vec3(0.,0.,1.) : vec3(1.,0.,0.);tangent=normalize(cross(tangent,n));vec3 bitangent=cross(n,tangent);mat3 tbn=mat3(tangent,bitangent,n);float maxLevel=filteringInfo.y;float dim0=filteringInfo.x;float omegaP=(4.*PI)/(6.*dim0*dim0);\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nfor(uint i=0u; i0.) {float pdf_inversed=PI/NoL;float omegaS=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed;float l=log4(omegaS)-log4(omegaP)+log4(K);float mipLevel=clamp(l,0.0,maxLevel);vec3 c=textureCubeLodEXT(inputTexture,tbn*Ls,mipLevel).rgb;\n#ifdef GAMMA_INPUT\nc=toLinearSpace(c);\n#endif\nresult+=c;}}\nresult=result*NUM_SAMPLES_FLOAT_INVERSED;return result;}\n#define inline\nvec3 radiance(float alphaG,samplerCube inputTexture,vec3 inputN,vec2 filteringInfo)\n{vec3 n=normalize(inputN);vec3 c=textureCube(inputTexture,n).rgb; \nif (alphaG==0.) {\n#ifdef GAMMA_INPUT\nc=toLinearSpace(c);\n#endif\nreturn c;} else {vec3 result=vec3(0.);vec3 tangent=abs(n.z)<0.999 ? vec3(0.,0.,1.) : vec3(1.,0.,0.);tangent=normalize(cross(tangent,n));vec3 bitangent=cross(n,tangent);mat3 tbn=mat3(tangent,bitangent,n);float maxLevel=filteringInfo.y;float dim0=filteringInfo.x;float omegaP=(4.*PI)/(6.*dim0*dim0);float weight=0.;\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nfor(uint i=0u; i0.) {float pdf_inversed=4./normalDistributionFunction_TrowbridgeReitzGGX(NoH,alphaG);float omegaS=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed;float l=log4(omegaS)-log4(omegaP)+log4(K);float mipLevel=clamp(float(l),0.0,maxLevel);weight+=NoL;vec3 c=textureCubeLodEXT(inputTexture,tbn*L,mipLevel).rgb;\n#ifdef GAMMA_INPUT\nc=toLinearSpace(c);\n#endif\nresult+=c*NoL;}}\nresult=result/weight;return result;}}\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const hdrFilteringFunctions = { name, shader };\n//# sourceMappingURL=hdrFilteringFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrDirectLightingFunctions\";\nconst shader = `#define CLEARCOATREFLECTANCE90 1.0\nstruct lightingInfo\n{vec3 diffuse;\n#ifdef SPECULARTERM\nvec3 specular;\n#endif\n#ifdef CLEARCOAT\nvec4 clearCoat;\n#endif\n#ifdef SHEEN\nvec3 sheen;\n#endif\n};float adjustRoughnessFromLightProperties(float roughness,float lightRadius,float lightDistance) {\n#if defined(USEPHYSICALLIGHTFALLOFF) || defined(USEGLTFLIGHTFALLOFF)\nfloat lightRoughness=lightRadius/lightDistance;float totalRoughness=saturate(lightRoughness+roughness);return totalRoughness;\n#else\nreturn roughness;\n#endif\n}\nvec3 computeHemisphericDiffuseLighting(preLightingInfo info,vec3 lightColor,vec3 groundColor) {return mix(groundColor,lightColor,info.NdotL);}\nvec3 computeDiffuseLighting(preLightingInfo info,vec3 lightColor) {float diffuseTerm=diffuseBRDF_Burley(info.NdotL,info.NdotV,info.VdotH,info.roughness);return diffuseTerm*info.attenuation*info.NdotL*lightColor;}\n#define inline\nvec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){vec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0);strq/=strq.w;vec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb;return toLinearSpace(textureColor);}\n#ifdef SS_TRANSLUCENCY\nvec3 computeDiffuseAndTransmittedLighting(preLightingInfo info,vec3 lightColor,vec3 transmittance) {float NdotL=absEps(info.NdotLUnclamped);float wrapNdotL=computeWrappedDiffuseNdotL(NdotL,0.02);float trAdapt=step(0.,info.NdotLUnclamped);vec3 transmittanceNdotL=mix(transmittance*wrapNdotL,vec3(wrapNdotL),trAdapt);float diffuseTerm=diffuseBRDF_Burley(NdotL,info.NdotV,info.VdotH,info.roughness);return diffuseTerm*transmittanceNdotL*info.attenuation*lightColor;}\n#endif\n#ifdef SPECULARTERM\nvec3 computeSpecularLighting(preLightingInfo info,vec3 N,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) {float NdotH=saturateEps(dot(N,info.H));float roughness=max(info.roughness,geometricRoughnessFactor);float alphaG=convertRoughnessToAverageSlope(roughness);vec3 fresnel=fresnelSchlickGGX(info.VdotH,reflectance0,reflectance90);\n#ifdef IRIDESCENCE\nfresnel=mix(fresnel,reflectance0,info.iridescenceIntensity);\n#endif\nfloat distribution=normalDistributionFunction_TrowbridgeReitzGGX(NdotH,alphaG);\n#ifdef BRDF_V_HEIGHT_CORRELATED\nfloat smithVisibility=smithVisibility_GGXCorrelated(info.NdotL,info.NdotV,alphaG);\n#else\nfloat smithVisibility=smithVisibility_TrowbridgeReitzGGXFast(info.NdotL,info.NdotV,alphaG);\n#endif\nvec3 specTerm=fresnel*distribution*smithVisibility;return specTerm*info.attenuation*info.NdotL*lightColor;}\n#endif\n#ifdef ANISOTROPIC\nvec3 computeAnisotropicSpecularLighting(preLightingInfo info,vec3 V,vec3 N,vec3 T,vec3 B,float anisotropy,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) {float NdotH=saturateEps(dot(N,info.H));float TdotH=dot(T,info.H);float BdotH=dot(B,info.H);float TdotV=dot(T,V);float BdotV=dot(B,V);float TdotL=dot(T,info.L);float BdotL=dot(B,info.L);float alphaG=convertRoughnessToAverageSlope(info.roughness);vec2 alphaTB=getAnisotropicRoughness(alphaG,anisotropy);alphaTB=max(alphaTB,square(geometricRoughnessFactor));vec3 fresnel=fresnelSchlickGGX(info.VdotH,reflectance0,reflectance90);\n#ifdef IRIDESCENCE\nfresnel=mix(fresnel,reflectance0,info.iridescenceIntensity);\n#endif\nfloat distribution=normalDistributionFunction_BurleyGGX_Anisotropic(NdotH,TdotH,BdotH,alphaTB);float smithVisibility=smithVisibility_GGXCorrelated_Anisotropic(info.NdotL,info.NdotV,TdotV,BdotV,TdotL,BdotL,alphaTB);vec3 specTerm=fresnel*distribution*smithVisibility;return specTerm*info.attenuation*info.NdotL*lightColor;}\n#endif\n#ifdef CLEARCOAT\nvec4 computeClearCoatLighting(preLightingInfo info,vec3 Ncc,float geometricRoughnessFactor,float clearCoatIntensity,vec3 lightColor) {float NccdotL=saturateEps(dot(Ncc,info.L));float NccdotH=saturateEps(dot(Ncc,info.H));float clearCoatRoughness=max(info.roughness,geometricRoughnessFactor);float alphaG=convertRoughnessToAverageSlope(clearCoatRoughness);float fresnel=fresnelSchlickGGX(info.VdotH,vClearCoatRefractionParams.x,CLEARCOATREFLECTANCE90);fresnel*=clearCoatIntensity;float distribution=normalDistributionFunction_TrowbridgeReitzGGX(NccdotH,alphaG);float kelemenVisibility=visibility_Kelemen(info.VdotH);float clearCoatTerm=fresnel*distribution*kelemenVisibility;return vec4(\nclearCoatTerm*info.attenuation*NccdotL*lightColor,\n1.0-fresnel\n);}\nvec3 computeClearCoatLightingAbsorption(float NdotVRefract,vec3 L,vec3 Ncc,vec3 clearCoatColor,float clearCoatThickness,float clearCoatIntensity) {vec3 LRefract=-refract(L,Ncc,vClearCoatRefractionParams.y);float NdotLRefract=saturateEps(dot(Ncc,LRefract));vec3 absorption=computeClearCoatAbsorption(NdotVRefract,NdotLRefract,clearCoatColor,clearCoatThickness,clearCoatIntensity);return absorption;}\n#endif\n#ifdef SHEEN\nvec3 computeSheenLighting(preLightingInfo info,vec3 N,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) {float NdotH=saturateEps(dot(N,info.H));float roughness=max(info.roughness,geometricRoughnessFactor);float alphaG=convertRoughnessToAverageSlope(roughness);float fresnel=1.;float distribution=normalDistributionFunction_CharlieSheen(NdotH,alphaG);/*#ifdef SHEEN_SOFTER\nfloat visibility=visibility_CharlieSheen(info.NdotL,info.NdotV,alphaG);\n#else */\nfloat visibility=visibility_Ashikhmin(info.NdotL,info.NdotV);/* #endif */\nfloat sheenTerm=fresnel*distribution*visibility;return sheenTerm*info.attenuation*info.NdotL*lightColor;}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrDirectLightingFunctions = { name, shader };\n//# sourceMappingURL=pbrDirectLightingFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrIBLFunctions\";\nconst shader = `#if defined(REFLECTION) || defined(SS_REFRACTION)\nfloat getLodFromAlphaG(float cubeMapDimensionPixels,float microsurfaceAverageSlope) {float microsurfaceAverageSlopeTexels=cubeMapDimensionPixels*microsurfaceAverageSlope;float lod=log2(microsurfaceAverageSlopeTexels);return lod;}\nfloat getLinearLodFromRoughness(float cubeMapDimensionPixels,float roughness) {float lod=log2(cubeMapDimensionPixels)*roughness;return lod;}\n#endif\n#if defined(ENVIRONMENTBRDF) && defined(RADIANCEOCCLUSION)\nfloat environmentRadianceOcclusion(float ambientOcclusion,float NdotVUnclamped) {float temp=NdotVUnclamped+ambientOcclusion;return saturate(square(temp)-1.0+ambientOcclusion);}\n#endif\n#if defined(ENVIRONMENTBRDF) && defined(HORIZONOCCLUSION)\nfloat environmentHorizonOcclusion(vec3 view,vec3 normal,vec3 geometricNormal) {vec3 reflection=reflect(view,normal);float temp=saturate(1.0+1.1*dot(reflection,geometricNormal));return square(temp);}\n#endif\n#if defined(LODINREFLECTIONALPHA) || defined(SS_LODINREFRACTIONALPHA)\n#define UNPACK_LOD(x) (1.0-x)*255.0\nfloat getLodFromAlphaG(float cubeMapDimensionPixels,float alphaG,float NdotV) {float microsurfaceAverageSlope=alphaG;microsurfaceAverageSlope*=sqrt(abs(NdotV));return getLodFromAlphaG(cubeMapDimensionPixels,microsurfaceAverageSlope);}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrIBLFunctions = { name, shader };\n//# sourceMappingURL=pbrIBLFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"bumpFragmentMainFunctions\";\nconst shader = `#if defined(BUMP) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC) || defined(DETAIL)\n#if defined(TANGENT) && defined(NORMAL) \nvarying mat3 vTBN;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\nuniform mat4 normalMatrix;\n#if defined(WEBGL2) || defined(WEBGPU)\nmat4 toNormalMatrix(mat4 wMatrix)\n{mat4 ret=inverse(wMatrix);ret=transpose(ret);ret[0][3]=0.;ret[1][3]=0.;ret[2][3]=0.;ret[3]=vec4(0.,0.,0.,1.);return ret;}\n#else\nmat4 toNormalMatrix(mat4 m)\n{float\na00=m[0][0],a01=m[0][1],a02=m[0][2],a03=m[0][3],\na10=m[1][0],a11=m[1][1],a12=m[1][2],a13=m[1][3],\na20=m[2][0],a21=m[2][1],a22=m[2][2],a23=m[2][3],\na30=m[3][0],a31=m[3][1],a32=m[3][2],a33=m[3][3],\nb00=a00*a11-a01*a10,\nb01=a00*a12-a02*a10,\nb02=a00*a13-a03*a10,\nb03=a01*a12-a02*a11,\nb04=a01*a13-a03*a11,\nb05=a02*a13-a03*a12,\nb06=a20*a31-a21*a30,\nb07=a20*a32-a22*a30,\nb08=a20*a33-a23*a30,\nb09=a21*a32-a22*a31,\nb10=a21*a33-a23*a31,\nb11=a22*a33-a23*a32,\ndet=b00*b11-b01*b10+b02*b09+b03*b08-b04*b07+b05*b06;mat4 mi=mat4(\na11*b11-a12*b10+a13*b09,\na02*b10-a01*b11-a03*b09,\na31*b05-a32*b04+a33*b03,\na22*b04-a21*b05-a23*b03,\na12*b08-a10*b11-a13*b07,\na00*b11-a02*b08+a03*b07,\na32*b02-a30*b05-a33*b01,\na20*b05-a22*b02+a23*b01,\na10*b10-a11*b08+a13*b06,\na01*b08-a00*b10-a03*b06,\na30*b04-a31*b02+a33*b00,\na21*b02-a20*b04-a23*b00,\na11*b07-a10*b09-a12*b06,\na00*b09-a01*b07+a02*b06,\na31*b01-a30*b03-a32*b00,\na20*b03-a21*b01+a22*b00)/det;return mat4(mi[0][0],mi[1][0],mi[2][0],mi[3][0],\nmi[0][1],mi[1][1],mi[2][1],mi[3][1],\nmi[0][2],mi[1][2],mi[2][2],mi[3][2],\nmi[0][3],mi[1][3],mi[2][3],mi[3][3]);}\n#endif\n#endif\nvec3 perturbNormalBase(mat3 cotangentFrame,vec3 normal,float scale)\n{\n#ifdef NORMALXYSCALE\nnormal=normalize(normal*vec3(scale,scale,1.0));\n#endif\nreturn normalize(cotangentFrame*normal);}\nvec3 perturbNormal(mat3 cotangentFrame,vec3 textureSample,float scale)\n{return perturbNormalBase(cotangentFrame,textureSample*2.0-1.0,scale);}\nmat3 cotangent_frame(vec3 normal,vec3 p,vec2 uv,vec2 tangentSpaceParams)\n{vec3 dp1=dFdx(p);vec3 dp2=dFdy(p);vec2 duv1=dFdx(uv);vec2 duv2=dFdy(uv);vec3 dp2perp=cross(dp2,normal);vec3 dp1perp=cross(normal,dp1);vec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;vec3 bitangent=dp2perp*duv1.y+dp1perp*duv2.y;tangent*=tangentSpaceParams.x;bitangent*=tangentSpaceParams.y;float det=max(dot(tangent,tangent),dot(bitangent,bitangent));float invmax=det==0.0 ? 0.0 : inversesqrt(det);return mat3(tangent*invmax,bitangent*invmax,normal);}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const bumpFragmentMainFunctions = { name, shader };\n//# sourceMappingURL=bumpFragmentMainFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./samplerFragmentDeclaration.js\";\nconst name = \"bumpFragmentFunctions\";\nconst shader = `#if defined(BUMP)\n#include(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_SAMPLERNAME_,bump)\n#endif\n#if defined(DETAIL)\n#include(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_SAMPLERNAME_,detail)\n#endif\n#if defined(BUMP) && defined(PARALLAX)\nconst float minSamples=4.;const float maxSamples=15.;const int iMaxSamples=15;vec2 parallaxOcclusion(vec3 vViewDirCoT,vec3 vNormalCoT,vec2 texCoord,float parallaxScale) {float parallaxLimit=length(vViewDirCoT.xy)/vViewDirCoT.z;parallaxLimit*=parallaxScale;vec2 vOffsetDir=normalize(vViewDirCoT.xy);vec2 vMaxOffset=vOffsetDir*parallaxLimit;float numSamples=maxSamples+(dot(vViewDirCoT,vNormalCoT)*(minSamples-maxSamples));float stepSize=1.0/numSamples;float currRayHeight=1.0;vec2 vCurrOffset=vec2(0,0);vec2 vLastOffset=vec2(0,0);float lastSampledHeight=1.0;float currSampledHeight=1.0;bool keepWorking=true;for (int i=0; icurrRayHeight)\n{float delta1=currSampledHeight-currRayHeight;float delta2=(currRayHeight+stepSize)-lastSampledHeight;float ratio=delta1/(delta1+delta2);vCurrOffset=(ratio)* vLastOffset+(1.0-ratio)*vCurrOffset;keepWorking=false;}\nelse\n{currRayHeight-=stepSize;vLastOffset=vCurrOffset;\n#ifdef PARALLAX_RHS\nvCurrOffset-=stepSize*vMaxOffset;\n#else\nvCurrOffset+=stepSize*vMaxOffset;\n#endif\nlastSampledHeight=currSampledHeight;}}\nreturn vCurrOffset;}\nvec2 parallaxOffset(vec3 viewDir,float heightScale)\n{float height=texture2D(bumpSampler,vBumpUV).w;vec2 texCoordOffset=heightScale*viewDir.xy*height;\n#ifdef PARALLAX_RHS\nreturn texCoordOffset;\n#else\nreturn -texCoordOffset;\n#endif\n}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const bumpFragmentFunctions = { name, shader };\n//# sourceMappingURL=bumpFragmentFunctions.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"reflectionFunction\";\nconst shader = `vec3 computeFixedEquirectangularCoords(vec4 worldPos,vec3 worldNormal,vec3 direction)\n{float lon=atan(direction.z,direction.x);float lat=acos(direction.y);vec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;float s=sphereCoords.x*0.5+0.5;float t=sphereCoords.y;return vec3(s,t,0); }\nvec3 computeMirroredFixedEquirectangularCoords(vec4 worldPos,vec3 worldNormal,vec3 direction)\n{float lon=atan(direction.z,direction.x);float lat=acos(direction.y);vec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;float s=sphereCoords.x*0.5+0.5;float t=sphereCoords.y;return vec3(1.0-s,t,0); }\nvec3 computeEquirectangularCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix)\n{vec3 cameraToVertex=normalize(worldPos.xyz-eyePosition);vec3 r=normalize(reflect(cameraToVertex,worldNormal));r=vec3(reflectionMatrix*vec4(r,0));float lon=atan(r.z,r.x);float lat=acos(r.y);vec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;float s=sphereCoords.x*0.5+0.5;float t=sphereCoords.y;return vec3(s,t,0);}\nvec3 computeSphericalCoords(vec4 worldPos,vec3 worldNormal,mat4 view,mat4 reflectionMatrix)\n{vec3 viewDir=normalize(vec3(view*worldPos));vec3 viewNormal=normalize(vec3(view*vec4(worldNormal,0.0)));vec3 r=reflect(viewDir,viewNormal);r=vec3(reflectionMatrix*vec4(r,0));r.z=r.z-1.0;float m=2.0*length(r);return vec3(r.x/m+0.5,1.0-r.y/m-0.5,0);}\nvec3 computePlanarCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix)\n{vec3 viewDir=worldPos.xyz-eyePosition;vec3 coords=normalize(reflect(viewDir,worldNormal));return vec3(reflectionMatrix*vec4(coords,1));}\nvec3 computeCubicCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix)\n{vec3 viewDir=normalize(worldPos.xyz-eyePosition);vec3 coords=reflect(viewDir,worldNormal);coords=vec3(reflectionMatrix*vec4(coords,0));\n#ifdef INVERTCUBICMAP\ncoords.y*=-1.0;\n#endif\nreturn coords;}\nvec3 computeCubicLocalCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix,vec3 reflectionSize,vec3 reflectionPosition)\n{vec3 viewDir=normalize(worldPos.xyz-eyePosition);vec3 coords=reflect(viewDir,worldNormal);coords=parallaxCorrectNormal(worldPos.xyz,coords,reflectionSize,reflectionPosition);coords=vec3(reflectionMatrix*vec4(coords,0));\n#ifdef INVERTCUBICMAP\ncoords.y*=-1.0;\n#endif\nreturn coords;}\nvec3 computeProjectionCoords(vec4 worldPos,mat4 view,mat4 reflectionMatrix)\n{return vec3(reflectionMatrix*(view*worldPos));}\nvec3 computeSkyBoxCoords(vec3 positionW,mat4 reflectionMatrix)\n{return vec3(reflectionMatrix*vec4(positionW,1.));}\n#ifdef REFLECTION\nvec3 computeReflectionCoords(vec4 worldPos,vec3 worldNormal)\n{\n#ifdef REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\nvec3 direction=normalize(vDirectionW);return computeMirroredFixedEquirectangularCoords(worldPos,worldNormal,direction);\n#endif\n#ifdef REFLECTIONMAP_EQUIRECTANGULAR_FIXED\nvec3 direction=normalize(vDirectionW);return computeFixedEquirectangularCoords(worldPos,worldNormal,direction);\n#endif\n#ifdef REFLECTIONMAP_EQUIRECTANGULAR\nreturn computeEquirectangularCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_SPHERICAL\nreturn computeSphericalCoords(worldPos,worldNormal,view,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_PLANAR\nreturn computePlanarCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_CUBIC\n#ifdef USE_LOCAL_REFLECTIONMAP_CUBIC\nreturn computeCubicLocalCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix,vReflectionSize,vReflectionPosition);\n#else\nreturn computeCubicCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix);\n#endif\n#endif\n#ifdef REFLECTIONMAP_PROJECTION\nreturn computeProjectionCoords(worldPos,view,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nreturn computeSkyBoxCoords(vPositionUVW,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_EXPLICIT\nreturn vec3(0,0,0);\n#endif\n}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const reflectionFunction = { name, shader };\n//# sourceMappingURL=reflectionFunction.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"decalFragment\";\nconst shader = `#ifdef DECAL\n#ifdef GAMMADECAL\ndecalColor.rgb=toLinearSpace(decalColor.rgb);\n#endif\n#ifdef DECAL_SMOOTHALPHA\ndecalColor.a*=decalColor.a;\n#endif\nsurfaceAlbedo.rgb=mix(surfaceAlbedo.rgb,decalColor.rgb,decalColor.a);\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const decalFragment = { name, shader };\n//# sourceMappingURL=decalFragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./decalFragment.js\";\nconst name = \"pbrBlockAlbedoOpacity\";\nconst shader = `struct albedoOpacityOutParams\n{vec3 surfaceAlbedo;float alpha;};\n#define pbr_inline\nvoid albedoOpacityBlock(\nin vec4 vAlbedoColor,\n#ifdef ALBEDO\nin vec4 albedoTexture,\nin vec2 albedoInfos,\n#endif\n#ifdef OPACITY\nin vec4 opacityMap,\nin vec2 vOpacityInfos,\n#endif\n#ifdef DETAIL\nin vec4 detailColor,\nin vec4 vDetailInfos,\n#endif\n#ifdef DECAL\nin vec4 decalColor,\nin vec4 vDecalInfos,\n#endif\nout albedoOpacityOutParams outParams\n)\n{vec3 surfaceAlbedo=vAlbedoColor.rgb;float alpha=vAlbedoColor.a;\n#ifdef ALBEDO\n#if defined(ALPHAFROMALBEDO) || defined(ALPHATEST)\nalpha*=albedoTexture.a;\n#endif\n#ifdef GAMMAALBEDO\nsurfaceAlbedo*=toLinearSpace(albedoTexture.rgb);\n#else\nsurfaceAlbedo*=albedoTexture.rgb;\n#endif\nsurfaceAlbedo*=albedoInfos.y;\n#endif\n#ifndef DECAL_AFTER_DETAIL\n#include\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nsurfaceAlbedo*=vColor.rgb;\n#endif\n#ifdef DETAIL\nfloat detailAlbedo=2.0*mix(0.5,detailColor.r,vDetailInfos.y);surfaceAlbedo.rgb=surfaceAlbedo.rgb*detailAlbedo*detailAlbedo; \n#endif\n#ifdef DECAL_AFTER_DETAIL\n#include\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_ALBEDO\n#ifdef OPACITY\n#ifdef OPACITYRGB\nalpha=getLuminance(opacityMap.rgb);\n#else\nalpha*=opacityMap.a;\n#endif\nalpha*=vOpacityInfos.y;\n#endif\n#if defined(VERTEXALPHA) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nalpha*=vColor.a;\n#endif\n#if !defined(SS_LINKREFRACTIONTOTRANSPARENCY) && !defined(ALPHAFRESNEL)\n#ifdef ALPHATEST \n#if DEBUGMODE != 88\nif (alpha0\n#ifdef METALLICWORKFLOW\nvec2 metallicRoughness;\n#ifdef REFLECTIVITY\nvec4 surfaceMetallicColorMap;\n#endif\n#ifndef FROSTBITE_REFLECTANCE\nvec3 metallicF0;\n#endif\n#else\n#ifdef REFLECTIVITY\nvec4 surfaceReflectivityColorMap;\n#endif\n#endif\n#endif\n};\n#define pbr_inline\nvoid reflectivityBlock(\nin vec4 vReflectivityColor,\n#ifdef METALLICWORKFLOW\nin vec3 surfaceAlbedo,\nin vec4 metallicReflectanceFactors,\n#endif\n#ifdef REFLECTIVITY\nin vec3 reflectivityInfos,\nin vec4 surfaceMetallicOrReflectivityColorMap,\n#endif\n#if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED)\nin vec3 ambientOcclusionColorIn,\n#endif\n#ifdef MICROSURFACEMAP\nin vec4 microSurfaceTexel,\n#endif\n#ifdef DETAIL\nin vec4 detailColor,\nin vec4 vDetailInfos,\n#endif\nout reflectivityOutParams outParams\n)\n{float microSurface=vReflectivityColor.a;vec3 surfaceReflectivityColor=vReflectivityColor.rgb;\n#ifdef METALLICWORKFLOW\nvec2 metallicRoughness=surfaceReflectivityColor.rg;\n#ifdef REFLECTIVITY\n#if DEBUGMODE>0\noutParams.surfaceMetallicColorMap=surfaceMetallicOrReflectivityColorMap;\n#endif\n#ifdef AOSTOREINMETALMAPRED\nvec3 aoStoreInMetalMap=vec3(surfaceMetallicOrReflectivityColorMap.r,surfaceMetallicOrReflectivityColorMap.r,surfaceMetallicOrReflectivityColorMap.r);outParams.ambientOcclusionColor=mix(ambientOcclusionColorIn,aoStoreInMetalMap,reflectivityInfos.z);\n#endif\n#ifdef METALLNESSSTOREINMETALMAPBLUE\nmetallicRoughness.r*=surfaceMetallicOrReflectivityColorMap.b;\n#else\nmetallicRoughness.r*=surfaceMetallicOrReflectivityColorMap.r;\n#endif\n#ifdef ROUGHNESSSTOREINMETALMAPALPHA\nmetallicRoughness.g*=surfaceMetallicOrReflectivityColorMap.a;\n#else\n#ifdef ROUGHNESSSTOREINMETALMAPGREEN\nmetallicRoughness.g*=surfaceMetallicOrReflectivityColorMap.g;\n#endif\n#endif\n#endif\n#ifdef DETAIL\nfloat detailRoughness=mix(0.5,detailColor.b,vDetailInfos.w);float loLerp=mix(0.,metallicRoughness.g,detailRoughness*2.);float hiLerp=mix(metallicRoughness.g,1.,(detailRoughness-0.5)*2.);metallicRoughness.g=mix(loLerp,hiLerp,step(detailRoughness,0.5));\n#endif\n#ifdef MICROSURFACEMAP\nmetallicRoughness.g*=microSurfaceTexel.r;\n#endif\n#if DEBUGMODE>0\noutParams.metallicRoughness=metallicRoughness;\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_METALLICROUGHNESS\nmicroSurface=1.0-metallicRoughness.g;vec3 baseColor=surfaceAlbedo;\n#ifdef FROSTBITE_REFLECTANCE\noutParams.surfaceAlbedo=baseColor.rgb*(1.0-metallicRoughness.r);surfaceReflectivityColor=mix(0.16*reflectance*reflectance,baseColor,metallicRoughness.r);\n#else\nvec3 metallicF0=metallicReflectanceFactors.rgb;\n#if DEBUGMODE>0\noutParams.metallicF0=metallicF0;\n#endif\noutParams.surfaceAlbedo=mix(baseColor.rgb*(1.0-metallicF0),vec3(0.,0.,0.),metallicRoughness.r);surfaceReflectivityColor=mix(metallicF0,baseColor,metallicRoughness.r);\n#endif\n#else\n#ifdef REFLECTIVITY\nsurfaceReflectivityColor*=surfaceMetallicOrReflectivityColorMap.rgb;\n#if DEBUGMODE>0\noutParams.surfaceReflectivityColorMap=surfaceMetallicOrReflectivityColorMap;\n#endif\n#ifdef MICROSURFACEFROMREFLECTIVITYMAP\nmicroSurface*=surfaceMetallicOrReflectivityColorMap.a;microSurface*=reflectivityInfos.z;\n#else\n#ifdef MICROSURFACEAUTOMATIC\nmicroSurface*=computeDefaultMicroSurface(microSurface,surfaceReflectivityColor);\n#endif\n#ifdef MICROSURFACEMAP\nmicroSurface*=microSurfaceTexel.r;\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_MICROSURFACE\n#endif\n#endif\n#endif\nmicroSurface=saturate(microSurface);float roughness=1.-microSurface;outParams.microSurface=microSurface;outParams.roughness=roughness;outParams.surfaceReflectivityColor=surfaceReflectivityColor;}\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockReflectivity = { name, shader };\n//# sourceMappingURL=pbrBlockReflectivity.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockAmbientOcclusion\";\nconst shader = `struct ambientOcclusionOutParams\n{vec3 ambientOcclusionColor;\n#if DEBUGMODE>0 && defined(AMBIENT)\nvec3 ambientOcclusionColorMap;\n#endif\n};\n#define pbr_inline\nvoid ambientOcclusionBlock(\n#ifdef AMBIENT\nin vec3 ambientOcclusionColorMap_,\nin vec4 vAmbientInfos,\n#endif\nout ambientOcclusionOutParams outParams\n)\n{vec3 ambientOcclusionColor=vec3(1.,1.,1.);\n#ifdef AMBIENT\nvec3 ambientOcclusionColorMap=ambientOcclusionColorMap_*vAmbientInfos.y;\n#ifdef AMBIENTINGRAYSCALE\nambientOcclusionColorMap=vec3(ambientOcclusionColorMap.r,ambientOcclusionColorMap.r,ambientOcclusionColorMap.r);\n#endif\nambientOcclusionColor=mix(ambientOcclusionColor,ambientOcclusionColorMap,vAmbientInfos.z);\n#if DEBUGMODE>0\noutParams.ambientOcclusionColorMap=ambientOcclusionColorMap;\n#endif\n#endif\noutParams.ambientOcclusionColor=ambientOcclusionColor;}\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockAmbientOcclusion = { name, shader };\n//# sourceMappingURL=pbrBlockAmbientOcclusion.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockAlphaFresnel\";\nconst shader = `#ifdef ALPHAFRESNEL\n#if defined(ALPHATEST) || defined(ALPHABLEND)\nstruct alphaFresnelOutParams\n{float alpha;};\n#define pbr_inline\nvoid alphaFresnelBlock(\nin vec3 normalW,\nin vec3 viewDirectionW,\nin float alpha,\nin float microSurface,\nout alphaFresnelOutParams outParams\n)\n{float opacityPerceptual=alpha;\n#ifdef LINEARALPHAFRESNEL\nfloat opacity0=opacityPerceptual;\n#else\nfloat opacity0=opacityPerceptual*opacityPerceptual;\n#endif\nfloat opacity90=fresnelGrazingReflectance(opacity0);vec3 normalForward=faceforward(normalW,-viewDirectionW,normalW);outParams.alpha=getReflectanceFromAnalyticalBRDFLookup_Jones(saturate(dot(viewDirectionW,normalForward)),vec3(opacity0),vec3(opacity90),sqrt(microSurface)).x;\n#ifdef ALPHATEST\nif (outParams.alpha0 && defined(ANISOTROPIC_TEXTURE)\nvec3 anisotropyMapData;\n#endif\n};\n#define pbr_inline\nvoid anisotropicBlock(\nin vec3 vAnisotropy,\nin float roughness,\n#ifdef ANISOTROPIC_TEXTURE\nin vec3 anisotropyMapData,\n#endif\nin mat3 TBN,\nin vec3 normalW,\nin vec3 viewDirectionW,\nout anisotropicOutParams outParams\n)\n{float anisotropy=vAnisotropy.b;vec3 anisotropyDirection=vec3(vAnisotropy.xy,0.);\n#ifdef ANISOTROPIC_TEXTURE\nanisotropy*=anisotropyMapData.b;\n#if DEBUGMODE>0\noutParams.anisotropyMapData=anisotropyMapData;\n#endif\nanisotropyMapData.rg=anisotropyMapData.rg*2.0-1.0;\n#ifdef ANISOTROPIC_LEGACY\nanisotropyDirection.rg*=anisotropyMapData.rg;\n#else\nanisotropyDirection.xy=mat2(anisotropyDirection.x,anisotropyDirection.y,-anisotropyDirection.y,anisotropyDirection.x)*normalize(anisotropyMapData.rg);\n#endif\n#endif\nmat3 anisoTBN=mat3(normalize(TBN[0]),normalize(TBN[1]),normalize(TBN[2]));vec3 anisotropicTangent=normalize(anisoTBN*anisotropyDirection);vec3 anisotropicBitangent=normalize(cross(anisoTBN[2],anisotropicTangent));outParams.anisotropy=anisotropy;outParams.anisotropicTangent=anisotropicTangent;outParams.anisotropicBitangent=anisotropicBitangent;outParams.anisotropicNormal=getAnisotropicBentNormals(anisotropicTangent,anisotropicBitangent,normalW,viewDirectionW,anisotropy,roughness);}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockAnisotropic = { name, shader };\n//# sourceMappingURL=pbrBlockAnisotropic.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockReflection\";\nconst shader = `#ifdef REFLECTION\nstruct reflectionOutParams\n{vec4 environmentRadiance;vec3 environmentIrradiance;\n#ifdef REFLECTIONMAP_3D\nvec3 reflectionCoords;\n#else\nvec2 reflectionCoords;\n#endif\n#ifdef SS_TRANSLUCENCY\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX)\nvec3 irradianceVector;\n#endif\n#endif\n#endif\n};\n#define pbr_inline\nvoid createReflectionCoords(\nin vec3 vPositionW,\nin vec3 normalW,\n#ifdef ANISOTROPIC\nin anisotropicOutParams anisotropicOut,\n#endif\n#ifdef REFLECTIONMAP_3D\nout vec3 reflectionCoords\n#else\nout vec2 reflectionCoords\n#endif\n)\n{\n#ifdef ANISOTROPIC\nvec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),anisotropicOut.anisotropicNormal);\n#else\nvec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),normalW);\n#endif\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\n#ifdef REFLECTIONMAP_3D\nreflectionCoords=reflectionVector;\n#else\nreflectionCoords=reflectionVector.xy;\n#ifdef REFLECTIONMAP_PROJECTION\nreflectionCoords/=reflectionVector.z;\n#endif\nreflectionCoords.y=1.0-reflectionCoords.y;\n#endif\n}\n#define pbr_inline\n#define inline\nvoid sampleReflectionTexture(\nin float alphaG,\nin vec3 vReflectionMicrosurfaceInfos,\nin vec2 vReflectionInfos,\nin vec3 vReflectionColor,\n#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)\nin float NdotVUnclamped,\n#endif\n#ifdef LINEARSPECULARREFLECTION\nin float roughness,\n#endif\n#ifdef REFLECTIONMAP_3D\nin samplerCube reflectionSampler,\nconst vec3 reflectionCoords,\n#else\nin sampler2D reflectionSampler,\nconst vec2 reflectionCoords,\n#endif\n#ifndef LODBASEDMICROSFURACE\n#ifdef REFLECTIONMAP_3D\nin samplerCube reflectionSamplerLow,\nin samplerCube reflectionSamplerHigh,\n#else\nin sampler2D reflectionSamplerLow,\nin sampler2D reflectionSamplerHigh,\n#endif\n#endif\n#ifdef REALTIME_FILTERING\nin vec2 vReflectionFilteringInfo,\n#endif\nout vec4 environmentRadiance\n)\n{\n#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)\nfloat reflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,alphaG,NdotVUnclamped);\n#elif defined(LINEARSPECULARREFLECTION)\nfloat reflectionLOD=getLinearLodFromRoughness(vReflectionMicrosurfaceInfos.x,roughness);\n#else\nfloat reflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,alphaG);\n#endif\n#ifdef LODBASEDMICROSFURACE\nreflectionLOD=reflectionLOD*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z;\n#ifdef LODINREFLECTIONALPHA\nfloat automaticReflectionLOD=UNPACK_LOD(sampleReflection(reflectionSampler,reflectionCoords).a);float requestedReflectionLOD=max(automaticReflectionLOD,reflectionLOD);\n#else\nfloat requestedReflectionLOD=reflectionLOD;\n#endif\n#ifdef REALTIME_FILTERING\nenvironmentRadiance=vec4(radiance(alphaG,reflectionSampler,reflectionCoords,vReflectionFilteringInfo),1.0);\n#else\nenvironmentRadiance=sampleReflectionLod(reflectionSampler,reflectionCoords,reflectionLOD);\n#endif\n#else\nfloat lodReflectionNormalized=saturate(reflectionLOD/log2(vReflectionMicrosurfaceInfos.x));float lodReflectionNormalizedDoubled=lodReflectionNormalized*2.0;vec4 environmentMid=sampleReflection(reflectionSampler,reflectionCoords);if (lodReflectionNormalizedDoubled<1.0){environmentRadiance=mix(\nsampleReflection(reflectionSamplerHigh,reflectionCoords),\nenvironmentMid,\nlodReflectionNormalizedDoubled\n);} else {environmentRadiance=mix(\nenvironmentMid,\nsampleReflection(reflectionSamplerLow,reflectionCoords),\nlodReflectionNormalizedDoubled-1.0\n);}\n#endif\n#ifdef RGBDREFLECTION\nenvironmentRadiance.rgb=fromRGBD(environmentRadiance);\n#endif\n#ifdef GAMMAREFLECTION\nenvironmentRadiance.rgb=toLinearSpace(environmentRadiance.rgb);\n#endif\nenvironmentRadiance.rgb*=vReflectionInfos.x;environmentRadiance.rgb*=vReflectionColor.rgb;}\n#define pbr_inline\n#define inline\nvoid reflectionBlock(\nin vec3 vPositionW,\nin vec3 normalW,\nin float alphaG,\nin vec3 vReflectionMicrosurfaceInfos,\nin vec2 vReflectionInfos,\nin vec3 vReflectionColor,\n#ifdef ANISOTROPIC\nin anisotropicOutParams anisotropicOut,\n#endif\n#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)\nin float NdotVUnclamped,\n#endif\n#ifdef LINEARSPECULARREFLECTION\nin float roughness,\n#endif\n#ifdef REFLECTIONMAP_3D\nin samplerCube reflectionSampler,\n#else\nin sampler2D reflectionSampler,\n#endif\n#if defined(NORMAL) && defined(USESPHERICALINVERTEX)\nin vec3 vEnvironmentIrradiance,\n#endif\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX)\nin mat4 reflectionMatrix,\n#endif\n#endif\n#ifdef USEIRRADIANCEMAP\n#ifdef REFLECTIONMAP_3D\nin samplerCube irradianceSampler,\n#else\nin sampler2D irradianceSampler,\n#endif\n#endif\n#ifndef LODBASEDMICROSFURACE\n#ifdef REFLECTIONMAP_3D\nin samplerCube reflectionSamplerLow,\nin samplerCube reflectionSamplerHigh,\n#else\nin sampler2D reflectionSamplerLow,\nin sampler2D reflectionSamplerHigh,\n#endif\n#endif\n#ifdef REALTIME_FILTERING\nin vec2 vReflectionFilteringInfo,\n#endif\nout reflectionOutParams outParams\n)\n{vec4 environmentRadiance=vec4(0.,0.,0.,0.);\n#ifdef REFLECTIONMAP_3D\nvec3 reflectionCoords=vec3(0.);\n#else\nvec2 reflectionCoords=vec2(0.);\n#endif\ncreateReflectionCoords(\nvPositionW,\nnormalW,\n#ifdef ANISOTROPIC\nanisotropicOut,\n#endif\nreflectionCoords\n);sampleReflectionTexture(\nalphaG,\nvReflectionMicrosurfaceInfos,\nvReflectionInfos,\nvReflectionColor,\n#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)\nNdotVUnclamped,\n#endif\n#ifdef LINEARSPECULARREFLECTION\nroughness,\n#endif\n#ifdef REFLECTIONMAP_3D\nreflectionSampler,\nreflectionCoords,\n#else\nreflectionSampler,\nreflectionCoords,\n#endif\n#ifndef LODBASEDMICROSFURACE\nreflectionSamplerLow,\nreflectionSamplerHigh,\n#endif\n#ifdef REALTIME_FILTERING\nvReflectionFilteringInfo,\n#endif\nenvironmentRadiance\n);vec3 environmentIrradiance=vec3(0.,0.,0.);\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#if defined(NORMAL) && defined(USESPHERICALINVERTEX)\nenvironmentIrradiance=vEnvironmentIrradiance;\n#else\n#ifdef ANISOTROPIC\nvec3 irradianceVector=vec3(reflectionMatrix*vec4(anisotropicOut.anisotropicNormal,0)).xyz;\n#else\nvec3 irradianceVector=vec3(reflectionMatrix*vec4(normalW,0)).xyz;\n#endif\n#ifdef REFLECTIONMAP_OPPOSITEZ\nirradianceVector.z*=-1.0;\n#endif\n#ifdef INVERTCUBICMAP\nirradianceVector.y*=-1.0;\n#endif\n#if defined(REALTIME_FILTERING)\nenvironmentIrradiance=irradiance(reflectionSampler,irradianceVector,vReflectionFilteringInfo);\n#else\nenvironmentIrradiance=computeEnvironmentIrradiance(irradianceVector);\n#endif\n#ifdef SS_TRANSLUCENCY\noutParams.irradianceVector=irradianceVector;\n#endif\n#endif\n#elif defined(USEIRRADIANCEMAP)\nvec4 environmentIrradiance4=sampleReflection(irradianceSampler,reflectionCoords);environmentIrradiance=environmentIrradiance4.rgb;\n#ifdef RGBDREFLECTION\nenvironmentIrradiance.rgb=fromRGBD(environmentIrradiance4);\n#endif\n#ifdef GAMMAREFLECTION\nenvironmentIrradiance.rgb=toLinearSpace(environmentIrradiance.rgb);\n#endif\n#endif\nenvironmentIrradiance*=vReflectionColor.rgb;outParams.environmentRadiance=environmentRadiance;outParams.environmentIrradiance=environmentIrradiance;outParams.reflectionCoords=reflectionCoords;}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockReflection = { name, shader };\n//# sourceMappingURL=pbrBlockReflection.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockSheen\";\nconst shader = `#ifdef SHEEN\nstruct sheenOutParams\n{float sheenIntensity;vec3 sheenColor;float sheenRoughness;\n#ifdef SHEEN_LINKWITHALBEDO\nvec3 surfaceAlbedo;\n#endif\n#if defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING)\nfloat sheenAlbedoScaling;\n#endif\n#if defined(REFLECTION) && defined(ENVIRONMENTBRDF)\nvec3 finalSheenRadianceScaled;\n#endif\n#if DEBUGMODE>0\n#ifdef SHEEN_TEXTURE\nvec4 sheenMapData;\n#endif\n#if defined(REFLECTION) && defined(ENVIRONMENTBRDF)\nvec3 sheenEnvironmentReflectance;\n#endif\n#endif\n};\n#define pbr_inline\n#define inline\nvoid sheenBlock(\nin vec4 vSheenColor,\n#ifdef SHEEN_ROUGHNESS\nin float vSheenRoughness,\n#if defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE)\nin vec4 sheenMapRoughnessData,\n#endif\n#endif\nin float roughness,\n#ifdef SHEEN_TEXTURE\nin vec4 sheenMapData,\nin float sheenMapLevel,\n#endif\nin float reflectance,\n#ifdef SHEEN_LINKWITHALBEDO\nin vec3 baseColor,\nin vec3 surfaceAlbedo,\n#endif\n#ifdef ENVIRONMENTBRDF\nin float NdotV,\nin vec3 environmentBrdf,\n#endif\n#if defined(REFLECTION) && defined(ENVIRONMENTBRDF)\nin vec2 AARoughnessFactors,\nin vec3 vReflectionMicrosurfaceInfos,\nin vec2 vReflectionInfos,\nin vec3 vReflectionColor,\nin vec4 vLightingIntensity,\n#ifdef REFLECTIONMAP_3D\nin samplerCube reflectionSampler,\nin vec3 reflectionCoords,\n#else\nin sampler2D reflectionSampler,\nin vec2 reflectionCoords,\n#endif\nin float NdotVUnclamped,\n#ifndef LODBASEDMICROSFURACE\n#ifdef REFLECTIONMAP_3D\nin samplerCube reflectionSamplerLow,\nin samplerCube reflectionSamplerHigh,\n#else\nin sampler2D reflectionSamplerLow,\nin sampler2D reflectionSamplerHigh,\n#endif\n#endif\n#ifdef REALTIME_FILTERING\nin vec2 vReflectionFilteringInfo,\n#endif\n#if !defined(REFLECTIONMAP_SKYBOX) && defined(RADIANCEOCCLUSION)\nin float seo,\n#endif\n#if !defined(REFLECTIONMAP_SKYBOX) && defined(HORIZONOCCLUSION) && defined(BUMP) && defined(REFLECTIONMAP_3D)\nin float eho,\n#endif\n#endif\nout sheenOutParams outParams\n)\n{float sheenIntensity=vSheenColor.a;\n#ifdef SHEEN_TEXTURE\n#if DEBUGMODE>0\noutParams.sheenMapData=sheenMapData;\n#endif\n#endif\n#ifdef SHEEN_LINKWITHALBEDO\nfloat sheenFactor=pow5(1.0-sheenIntensity);vec3 sheenColor=baseColor.rgb*(1.0-sheenFactor);float sheenRoughness=sheenIntensity;outParams.surfaceAlbedo=surfaceAlbedo*sheenFactor;\n#ifdef SHEEN_TEXTURE\nsheenIntensity*=sheenMapData.a;\n#endif\n#else\nvec3 sheenColor=vSheenColor.rgb;\n#ifdef SHEEN_TEXTURE\n#ifdef SHEEN_GAMMATEXTURE\nsheenColor.rgb*=toLinearSpace(sheenMapData.rgb);\n#else\nsheenColor.rgb*=sheenMapData.rgb;\n#endif\nsheenColor.rgb*=sheenMapLevel;\n#endif\n#ifdef SHEEN_ROUGHNESS\nfloat sheenRoughness=vSheenRoughness;\n#ifdef SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE\n#if defined(SHEEN_TEXTURE)\nsheenRoughness*=sheenMapData.a;\n#endif\n#elif defined(SHEEN_TEXTURE_ROUGHNESS)\n#ifdef SHEEN_TEXTURE_ROUGHNESS_IDENTICAL\nsheenRoughness*=sheenMapData.a;\n#else\nsheenRoughness*=sheenMapRoughnessData.a;\n#endif\n#endif\n#else\nfloat sheenRoughness=roughness;\n#ifdef SHEEN_TEXTURE\nsheenIntensity*=sheenMapData.a;\n#endif\n#endif\n#if !defined(SHEEN_ALBEDOSCALING)\nsheenIntensity*=(1.-reflectance);\n#endif\nsheenColor*=sheenIntensity;\n#endif\n#ifdef ENVIRONMENTBRDF\n/*#ifdef SHEEN_SOFTER\nvec3 environmentSheenBrdf=vec3(0.,0.,getBRDFLookupCharlieSheen(NdotV,sheenRoughness));\n#else*/\n#ifdef SHEEN_ROUGHNESS\nvec3 environmentSheenBrdf=getBRDFLookup(NdotV,sheenRoughness);\n#else\nvec3 environmentSheenBrdf=environmentBrdf;\n#endif\n/*#endif*/\n#endif\n#if defined(REFLECTION) && defined(ENVIRONMENTBRDF)\nfloat sheenAlphaG=convertRoughnessToAverageSlope(sheenRoughness);\n#ifdef SPECULARAA\nsheenAlphaG+=AARoughnessFactors.y;\n#endif\nvec4 environmentSheenRadiance=vec4(0.,0.,0.,0.);sampleReflectionTexture(\nsheenAlphaG,\nvReflectionMicrosurfaceInfos,\nvReflectionInfos,\nvReflectionColor,\n#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)\nNdotVUnclamped,\n#endif\n#ifdef LINEARSPECULARREFLECTION\nsheenRoughness,\n#endif\nreflectionSampler,\nreflectionCoords,\n#ifndef LODBASEDMICROSFURACE\nreflectionSamplerLow,\nreflectionSamplerHigh,\n#endif\n#ifdef REALTIME_FILTERING\nvReflectionFilteringInfo,\n#endif\nenvironmentSheenRadiance\n);vec3 sheenEnvironmentReflectance=getSheenReflectanceFromBRDFLookup(sheenColor,environmentSheenBrdf);\n#if !defined(REFLECTIONMAP_SKYBOX) && defined(RADIANCEOCCLUSION)\nsheenEnvironmentReflectance*=seo;\n#endif\n#if !defined(REFLECTIONMAP_SKYBOX) && defined(HORIZONOCCLUSION) && defined(BUMP) && defined(REFLECTIONMAP_3D)\nsheenEnvironmentReflectance*=eho;\n#endif\n#if DEBUGMODE>0\noutParams.sheenEnvironmentReflectance=sheenEnvironmentReflectance;\n#endif\noutParams.finalSheenRadianceScaled=\nenvironmentSheenRadiance.rgb *\nsheenEnvironmentReflectance *\nvLightingIntensity.z;\n#endif\n#if defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING)\noutParams.sheenAlbedoScaling=1.0-sheenIntensity*max(max(sheenColor.r,sheenColor.g),sheenColor.b)*environmentSheenBrdf.b;\n#endif\noutParams.sheenIntensity=sheenIntensity;outParams.sheenColor=sheenColor;outParams.sheenRoughness=sheenRoughness;}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockSheen = { name, shader };\n//# sourceMappingURL=pbrBlockSheen.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockClearcoat\";\nconst shader = `struct clearcoatOutParams\n{vec3 specularEnvironmentR0;float conservationFactor;vec3 clearCoatNormalW;vec2 clearCoatAARoughnessFactors;float clearCoatIntensity;float clearCoatRoughness;\n#ifdef REFLECTION\nvec3 finalClearCoatRadianceScaled;\n#endif\n#ifdef CLEARCOAT_TINT\nvec3 absorption;float clearCoatNdotVRefract;vec3 clearCoatColor;float clearCoatThickness;\n#endif\n#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)\nvec3 energyConservationFactorClearCoat;\n#endif\n#if DEBUGMODE>0\n#ifdef CLEARCOAT_BUMP\nmat3 TBNClearCoat;\n#endif\n#ifdef CLEARCOAT_TEXTURE\nvec2 clearCoatMapData;\n#endif\n#if defined(CLEARCOAT_TINT) && defined(CLEARCOAT_TINT_TEXTURE)\nvec4 clearCoatTintMapData;\n#endif\n#ifdef REFLECTION\nvec4 environmentClearCoatRadiance;vec3 clearCoatEnvironmentReflectance;\n#endif\nfloat clearCoatNdotV;\n#endif\n};\n#ifdef CLEARCOAT\n#define pbr_inline\n#define inline\nvoid clearcoatBlock(\nin vec3 vPositionW,\nin vec3 geometricNormalW,\nin vec3 viewDirectionW,\nin vec2 vClearCoatParams,\n#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE)\nin vec4 clearCoatMapRoughnessData,\n#endif\nin vec3 specularEnvironmentR0,\n#ifdef CLEARCOAT_TEXTURE\nin vec2 clearCoatMapData,\n#endif\n#ifdef CLEARCOAT_TINT\nin vec4 vClearCoatTintParams,\nin float clearCoatColorAtDistance,\nin vec4 vClearCoatRefractionParams,\n#ifdef CLEARCOAT_TINT_TEXTURE\nin vec4 clearCoatTintMapData,\n#endif\n#endif\n#ifdef CLEARCOAT_BUMP\nin vec2 vClearCoatBumpInfos,\nin vec4 clearCoatBumpMapData,\nin vec2 vClearCoatBumpUV,\n#if defined(TANGENT) && defined(NORMAL)\nin mat3 vTBN,\n#else\nin vec2 vClearCoatTangentSpaceParams,\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\nin mat4 normalMatrix,\n#endif\n#endif\n#if defined(FORCENORMALFORWARD) && defined(NORMAL)\nin vec3 faceNormal,\n#endif\n#ifdef REFLECTION\nin vec3 vReflectionMicrosurfaceInfos,\nin vec2 vReflectionInfos,\nin vec3 vReflectionColor,\nin vec4 vLightingIntensity,\n#ifdef REFLECTIONMAP_3D\nin samplerCube reflectionSampler,\n#else\nin sampler2D reflectionSampler,\n#endif\n#ifndef LODBASEDMICROSFURACE\n#ifdef REFLECTIONMAP_3D\nin samplerCube reflectionSamplerLow,\nin samplerCube reflectionSamplerHigh,\n#else\nin sampler2D reflectionSamplerLow,\nin sampler2D reflectionSamplerHigh,\n#endif\n#endif\n#ifdef REALTIME_FILTERING\nin vec2 vReflectionFilteringInfo,\n#endif\n#endif\n#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\n#ifdef RADIANCEOCCLUSION\nin float ambientMonochrome,\n#endif\n#endif\n#if defined(CLEARCOAT_BUMP) || defined(TWOSIDEDLIGHTING)\nin float frontFacingMultiplier,\n#endif\nout clearcoatOutParams outParams\n)\n{float clearCoatIntensity=vClearCoatParams.x;float clearCoatRoughness=vClearCoatParams.y;\n#ifdef CLEARCOAT_TEXTURE\nclearCoatIntensity*=clearCoatMapData.x;\n#ifdef CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE\nclearCoatRoughness*=clearCoatMapData.y;\n#endif\n#if DEBUGMODE>0\noutParams.clearCoatMapData=clearCoatMapData;\n#endif\n#endif\n#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE)\n#ifdef CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL\nclearCoatRoughness*=clearCoatMapData.y;\n#else\nclearCoatRoughness*=clearCoatMapRoughnessData.y;\n#endif\n#endif\noutParams.clearCoatIntensity=clearCoatIntensity;outParams.clearCoatRoughness=clearCoatRoughness;\n#ifdef CLEARCOAT_TINT\nvec3 clearCoatColor=vClearCoatTintParams.rgb;float clearCoatThickness=vClearCoatTintParams.a;\n#ifdef CLEARCOAT_TINT_TEXTURE\n#ifdef CLEARCOAT_TINT_GAMMATEXTURE\nclearCoatColor*=toLinearSpace(clearCoatTintMapData.rgb);\n#else\nclearCoatColor*=clearCoatTintMapData.rgb;\n#endif\nclearCoatThickness*=clearCoatTintMapData.a;\n#if DEBUGMODE>0\noutParams.clearCoatTintMapData=clearCoatTintMapData;\n#endif\n#endif\noutParams.clearCoatColor=computeColorAtDistanceInMedia(clearCoatColor,clearCoatColorAtDistance);outParams.clearCoatThickness=clearCoatThickness;\n#endif\n#ifdef CLEARCOAT_REMAP_F0\nvec3 specularEnvironmentR0Updated=getR0RemappedForClearCoat(specularEnvironmentR0);\n#else\nvec3 specularEnvironmentR0Updated=specularEnvironmentR0;\n#endif\noutParams.specularEnvironmentR0=mix(specularEnvironmentR0,specularEnvironmentR0Updated,clearCoatIntensity);vec3 clearCoatNormalW=geometricNormalW;\n#ifdef CLEARCOAT_BUMP\n#ifdef NORMALXYSCALE\nfloat clearCoatNormalScale=1.0;\n#else\nfloat clearCoatNormalScale=vClearCoatBumpInfos.y;\n#endif\n#if defined(TANGENT) && defined(NORMAL)\nmat3 TBNClearCoat=vTBN;\n#else\nvec2 TBNClearCoatUV=vClearCoatBumpUV*frontFacingMultiplier;mat3 TBNClearCoat=cotangent_frame(clearCoatNormalW*clearCoatNormalScale,vPositionW,TBNClearCoatUV,vClearCoatTangentSpaceParams);\n#endif\n#if DEBUGMODE>0\noutParams.TBNClearCoat=TBNClearCoat;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\nclearCoatNormalW=normalize(clearCoatBumpMapData.xyz *2.0-1.0);clearCoatNormalW=normalize(mat3(normalMatrix)*clearCoatNormalW);\n#else\nclearCoatNormalW=perturbNormal(TBNClearCoat,clearCoatBumpMapData.xyz,vClearCoatBumpInfos.y);\n#endif\n#endif\n#if defined(FORCENORMALFORWARD) && defined(NORMAL)\nclearCoatNormalW*=sign(dot(clearCoatNormalW,faceNormal));\n#endif\n#if defined(TWOSIDEDLIGHTING) && defined(NORMAL)\nclearCoatNormalW=clearCoatNormalW*frontFacingMultiplier;\n#endif\noutParams.clearCoatNormalW=clearCoatNormalW;outParams.clearCoatAARoughnessFactors=getAARoughnessFactors(clearCoatNormalW.xyz);float clearCoatNdotVUnclamped=dot(clearCoatNormalW,viewDirectionW);float clearCoatNdotV=absEps(clearCoatNdotVUnclamped);\n#if DEBUGMODE>0\noutParams.clearCoatNdotV=clearCoatNdotV;\n#endif\n#ifdef CLEARCOAT_TINT\nvec3 clearCoatVRefract=refract(-viewDirectionW,clearCoatNormalW,vClearCoatRefractionParams.y);outParams.clearCoatNdotVRefract=absEps(dot(clearCoatNormalW,clearCoatVRefract));\n#endif\n#if defined(ENVIRONMENTBRDF) && (!defined(REFLECTIONMAP_SKYBOX) || defined(MS_BRDF_ENERGY_CONSERVATION))\nvec3 environmentClearCoatBrdf=getBRDFLookup(clearCoatNdotV,clearCoatRoughness);\n#endif\n#if defined(REFLECTION)\nfloat clearCoatAlphaG=convertRoughnessToAverageSlope(clearCoatRoughness);\n#ifdef SPECULARAA\nclearCoatAlphaG+=outParams.clearCoatAARoughnessFactors.y;\n#endif\nvec4 environmentClearCoatRadiance=vec4(0.,0.,0.,0.);vec3 clearCoatReflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),clearCoatNormalW);\n#ifdef REFLECTIONMAP_OPPOSITEZ\nclearCoatReflectionVector.z*=-1.0;\n#endif\n#ifdef REFLECTIONMAP_3D\nvec3 clearCoatReflectionCoords=clearCoatReflectionVector;\n#else\nvec2 clearCoatReflectionCoords=clearCoatReflectionVector.xy;\n#ifdef REFLECTIONMAP_PROJECTION\nclearCoatReflectionCoords/=clearCoatReflectionVector.z;\n#endif\nclearCoatReflectionCoords.y=1.0-clearCoatReflectionCoords.y;\n#endif\nsampleReflectionTexture(\nclearCoatAlphaG,\nvReflectionMicrosurfaceInfos,\nvReflectionInfos,\nvReflectionColor,\n#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)\nclearCoatNdotVUnclamped,\n#endif\n#ifdef LINEARSPECULARREFLECTION\nclearCoatRoughness,\n#endif\nreflectionSampler,\nclearCoatReflectionCoords,\n#ifndef LODBASEDMICROSFURACE\nreflectionSamplerLow,\nreflectionSamplerHigh,\n#endif\n#ifdef REALTIME_FILTERING\nvReflectionFilteringInfo,\n#endif\nenvironmentClearCoatRadiance\n);\n#if DEBUGMODE>0\noutParams.environmentClearCoatRadiance=environmentClearCoatRadiance;\n#endif\n#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\nvec3 clearCoatEnvironmentReflectance=getReflectanceFromBRDFLookup(vec3(vClearCoatRefractionParams.x),environmentClearCoatBrdf);\n#ifdef HORIZONOCCLUSION\n#ifdef BUMP\n#ifdef REFLECTIONMAP_3D\nfloat clearCoatEho=environmentHorizonOcclusion(-viewDirectionW,clearCoatNormalW,geometricNormalW);clearCoatEnvironmentReflectance*=clearCoatEho;\n#endif\n#endif\n#endif\n#else\nvec3 clearCoatEnvironmentReflectance=getReflectanceFromAnalyticalBRDFLookup_Jones(clearCoatNdotV,vec3(1.),vec3(1.),sqrt(1.-clearCoatRoughness));\n#endif\nclearCoatEnvironmentReflectance*=clearCoatIntensity;\n#if DEBUGMODE>0\noutParams.clearCoatEnvironmentReflectance=clearCoatEnvironmentReflectance;\n#endif\noutParams.finalClearCoatRadianceScaled=\nenvironmentClearCoatRadiance.rgb *\nclearCoatEnvironmentReflectance *\nvLightingIntensity.z;\n#endif\n#if defined(CLEARCOAT_TINT)\noutParams.absorption=computeClearCoatAbsorption(outParams.clearCoatNdotVRefract,outParams.clearCoatNdotVRefract,outParams.clearCoatColor,clearCoatThickness,clearCoatIntensity);\n#endif\nfloat fresnelIBLClearCoat=fresnelSchlickGGX(clearCoatNdotV,vClearCoatRefractionParams.x,CLEARCOATREFLECTANCE90);fresnelIBLClearCoat*=clearCoatIntensity;outParams.conservationFactor=(1.-fresnelIBLClearCoat);\n#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)\noutParams.energyConservationFactorClearCoat=getEnergyConservationFactor(outParams.specularEnvironmentR0,environmentClearCoatBrdf);\n#endif\n}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockClearcoat = { name, shader };\n//# sourceMappingURL=pbrBlockClearcoat.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockIridescence\";\nconst shader = `struct iridescenceOutParams\n{float iridescenceIntensity;float iridescenceIOR;float iridescenceThickness;vec3 specularEnvironmentR0;};\n#ifdef IRIDESCENCE\n#define pbr_inline\n#define inline\nvoid iridescenceBlock(\nin vec4 vIridescenceParams,\nin float viewAngle,\nin vec3 specularEnvironmentR0,\n#ifdef IRIDESCENCE_TEXTURE\nin vec2 iridescenceMapData,\n#endif\n#ifdef IRIDESCENCE_THICKNESS_TEXTURE\nin vec2 iridescenceThicknessMapData,\n#endif\n#ifdef CLEARCOAT\nin float NdotVUnclamped,\n#ifdef CLEARCOAT_TEXTURE\nin vec2 clearCoatMapData,\n#endif\n#endif\nout iridescenceOutParams outParams\n)\n{float iridescenceIntensity=vIridescenceParams.x;float iridescenceIOR=vIridescenceParams.y;float iridescenceThicknessMin=vIridescenceParams.z;float iridescenceThicknessMax=vIridescenceParams.w;float iridescenceThicknessWeight=1.;\n#ifdef IRIDESCENCE_TEXTURE\niridescenceIntensity*=iridescenceMapData.x;\n#ifdef IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE\niridescenceThicknessWeight=iridescenceMapData.g;\n#endif\n#endif\n#if defined(IRIDESCENCE_THICKNESS_TEXTURE)\niridescenceThicknessWeight=iridescenceThicknessMapData.g;\n#endif\nfloat iridescenceThickness=mix(iridescenceThicknessMin,iridescenceThicknessMax,iridescenceThicknessWeight);float topIor=1.; \n#ifdef CLEARCOAT\nfloat clearCoatIntensity=vClearCoatParams.x;\n#ifdef CLEARCOAT_TEXTURE\nclearCoatIntensity*=clearCoatMapData.x;\n#endif\ntopIor=mix(1.0,vClearCoatRefractionParams.w-1.,clearCoatIntensity);viewAngle=sqrt(1.0+square(1.0/topIor)*(square(NdotVUnclamped)-1.0));\n#endif\nvec3 iridescenceFresnel=evalIridescence(topIor,iridescenceIOR,viewAngle,iridescenceThickness,specularEnvironmentR0);outParams.specularEnvironmentR0=mix(specularEnvironmentR0,iridescenceFresnel,iridescenceIntensity);outParams.iridescenceIntensity=iridescenceIntensity;outParams.iridescenceThickness=iridescenceThickness;outParams.iridescenceIOR=iridescenceIOR;}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockIridescence = { name, shader };\n//# sourceMappingURL=pbrBlockIridescence.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockSubSurface\";\nconst shader = `struct subSurfaceOutParams\n{vec3 specularEnvironmentReflectance;\n#ifdef SS_REFRACTION\nvec3 finalRefraction;vec3 surfaceAlbedo;\n#ifdef SS_LINKREFRACTIONTOTRANSPARENCY\nfloat alpha;\n#endif\n#ifdef REFLECTION\nfloat refractionFactorForIrradiance;\n#endif\n#endif\n#ifdef SS_TRANSLUCENCY\nvec3 transmittance;float translucencyIntensity;\n#ifdef REFLECTION\nvec3 refractionIrradiance;\n#endif\n#endif\n#if DEBUGMODE>0\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nvec4 thicknessMap;\n#endif\n#ifdef SS_REFRACTION\nvec4 environmentRefraction;vec3 refractionTransmittance;\n#endif\n#endif\n};\n#ifdef SUBSURFACE\n#define pbr_inline\n#define inline\nvoid subSurfaceBlock(\nin vec3 vSubSurfaceIntensity,\nin vec2 vThicknessParam,\nin vec4 vTintColor,\nin vec3 normalW,\nin vec3 specularEnvironmentReflectance,\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nin vec4 thicknessMap,\n#endif\n#ifdef SS_REFRACTIONINTENSITY_TEXTURE\nin vec4 refractionIntensityMap,\n#endif\n#ifdef SS_TRANSLUCENCYINTENSITY_TEXTURE\nin vec4 translucencyIntensityMap,\n#endif\n#ifdef REFLECTION\n#ifdef SS_TRANSLUCENCY\nin mat4 reflectionMatrix,\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX)\nin vec3 irradianceVector_,\n#endif\n#if defined(REALTIME_FILTERING)\nin samplerCube reflectionSampler,\nin vec2 vReflectionFilteringInfo,\n#endif\n#endif\n#ifdef USEIRRADIANCEMAP\n#ifdef REFLECTIONMAP_3D\nin samplerCube irradianceSampler,\n#else\nin sampler2D irradianceSampler,\n#endif\n#endif\n#endif\n#endif\n#if defined(SS_REFRACTION) || defined(SS_TRANSLUCENCY)\nin vec3 surfaceAlbedo,\n#endif\n#ifdef SS_REFRACTION\nin vec3 vPositionW,\nin vec3 viewDirectionW,\nin mat4 view,\nin vec4 vRefractionInfos,\nin mat4 refractionMatrix,\nin vec4 vRefractionMicrosurfaceInfos,\nin vec4 vLightingIntensity,\n#ifdef SS_LINKREFRACTIONTOTRANSPARENCY\nin float alpha,\n#endif\n#ifdef SS_LODINREFRACTIONALPHA\nin float NdotVUnclamped,\n#endif\n#ifdef SS_LINEARSPECULARREFRACTION\nin float roughness,\n#endif\nin float alphaG,\n#ifdef SS_REFRACTIONMAP_3D\nin samplerCube refractionSampler,\n#ifndef LODBASEDMICROSFURACE\nin samplerCube refractionSamplerLow,\nin samplerCube refractionSamplerHigh,\n#endif\n#else\nin sampler2D refractionSampler,\n#ifndef LODBASEDMICROSFURACE\nin sampler2D refractionSamplerLow,\nin sampler2D refractionSamplerHigh,\n#endif\n#endif\n#ifdef ANISOTROPIC\nin anisotropicOutParams anisotropicOut,\n#endif\n#ifdef REALTIME_FILTERING\nin vec2 vRefractionFilteringInfo,\n#endif\n#ifdef SS_USE_LOCAL_REFRACTIONMAP_CUBIC\nin vec3 refractionPosition,\nin vec3 refractionSize,\n#endif\n#endif\n#ifdef SS_TRANSLUCENCY\nin vec3 vDiffusionDistance,\n#endif\nout subSurfaceOutParams outParams\n)\n{outParams.specularEnvironmentReflectance=specularEnvironmentReflectance;\n#ifdef SS_REFRACTION\nfloat refractionIntensity=vSubSurfaceIntensity.x;\n#ifdef SS_LINKREFRACTIONTOTRANSPARENCY\nrefractionIntensity*=(1.0-alpha);outParams.alpha=1.0;\n#endif\n#endif\n#ifdef SS_TRANSLUCENCY\nfloat translucencyIntensity=vSubSurfaceIntensity.y;\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\n#if defined(SS_USE_GLTF_TEXTURES)\nfloat thickness=thicknessMap.g*vThicknessParam.y+vThicknessParam.x;\n#else\nfloat thickness=thicknessMap.r*vThicknessParam.y+vThicknessParam.x;\n#endif\n#if DEBUGMODE>0\noutParams.thicknessMap=thicknessMap;\n#endif\n#ifdef SS_MASK_FROM_THICKNESS_TEXTURE\n#if defined(SS_REFRACTION) && defined(SS_REFRACTION_USE_INTENSITY_FROM_TEXTURE)\n#if defined(SS_USE_GLTF_TEXTURES)\nrefractionIntensity*=thicknessMap.r;\n#else\nrefractionIntensity*=thicknessMap.g;\n#endif\n#endif\n#if defined(SS_TRANSLUCENCY) && defined(SS_TRANSLUCENCY_USE_INTENSITY_FROM_TEXTURE)\ntranslucencyIntensity*=thicknessMap.b;\n#endif\n#endif\n#else\nfloat thickness=vThicknessParam.y;\n#endif\n#ifdef SS_REFRACTIONINTENSITY_TEXTURE\n#ifdef SS_USE_GLTF_TEXTURES\nrefractionIntensity*=refractionIntensityMap.r;\n#else\nrefractionIntensity*=refractionIntensityMap.g;\n#endif\n#endif\n#ifdef SS_TRANSLUCENCYINTENSITY_TEXTURE\ntranslucencyIntensity*=translucencyIntensityMap.b;\n#endif\n#ifdef SS_TRANSLUCENCY\nthickness=maxEps(thickness);vec3 transmittance=transmittanceBRDF_Burley(vTintColor.rgb,vDiffusionDistance,thickness);transmittance*=translucencyIntensity;outParams.transmittance=transmittance;outParams.translucencyIntensity=translucencyIntensity;\n#endif\n#ifdef SS_REFRACTION\nvec4 environmentRefraction=vec4(0.,0.,0.,0.);\n#ifdef ANISOTROPIC\nvec3 refractionVector=refract(-viewDirectionW,anisotropicOut.anisotropicNormal,vRefractionInfos.y);\n#else\nvec3 refractionVector=refract(-viewDirectionW,normalW,vRefractionInfos.y);\n#endif\n#ifdef SS_REFRACTIONMAP_OPPOSITEZ\nrefractionVector.z*=-1.0;\n#endif\n#ifdef SS_REFRACTIONMAP_3D\n#ifdef SS_USE_LOCAL_REFRACTIONMAP_CUBIC\nrefractionVector=parallaxCorrectNormal(vPositionW,refractionVector,refractionSize,refractionPosition);\n#endif\nrefractionVector.y=refractionVector.y*vRefractionInfos.w;vec3 refractionCoords=refractionVector;refractionCoords=vec3(refractionMatrix*vec4(refractionCoords,0));\n#else\n#ifdef SS_USE_THICKNESS_AS_DEPTH\nvec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*thickness,1.0)));\n#else\nvec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0)));\n#endif\nvec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z;refractionCoords.y=1.0-refractionCoords.y;\n#endif\n#ifdef SS_HAS_THICKNESS\nfloat ior=vRefractionInfos.y;\n#else\nfloat ior=vRefractionMicrosurfaceInfos.w;\n#endif\n#ifdef SS_LODINREFRACTIONALPHA\nfloat refractionAlphaG=alphaG;refractionAlphaG=mix(alphaG,0.0,clamp(ior*3.0-2.0,0.0,1.0));float refractionLOD=getLodFromAlphaG(vRefractionMicrosurfaceInfos.x,refractionAlphaG,NdotVUnclamped);\n#elif defined(SS_LINEARSPECULARREFRACTION)\nfloat refractionRoughness=alphaG;refractionRoughness=mix(alphaG,0.0,clamp(ior*3.0-2.0,0.0,1.0));float refractionLOD=getLinearLodFromRoughness(vRefractionMicrosurfaceInfos.x,refractionRoughness);\n#else\nfloat refractionAlphaG=alphaG;refractionAlphaG=mix(alphaG,0.0,clamp(ior*3.0-2.0,0.0,1.0));float refractionLOD=getLodFromAlphaG(vRefractionMicrosurfaceInfos.x,refractionAlphaG);\n#endif\n#ifdef LODBASEDMICROSFURACE\nrefractionLOD=refractionLOD*vRefractionMicrosurfaceInfos.y+vRefractionMicrosurfaceInfos.z;\n#ifdef SS_LODINREFRACTIONALPHA\nfloat automaticRefractionLOD=UNPACK_LOD(sampleRefraction(refractionSampler,refractionCoords).a);float requestedRefractionLOD=max(automaticRefractionLOD,refractionLOD);\n#else\nfloat requestedRefractionLOD=refractionLOD;\n#endif\n#if defined(REALTIME_FILTERING) && defined(SS_REFRACTIONMAP_3D)\nenvironmentRefraction=vec4(radiance(alphaG,refractionSampler,refractionCoords,vRefractionFilteringInfo),1.0);\n#else\nenvironmentRefraction=sampleRefractionLod(refractionSampler,refractionCoords,requestedRefractionLOD);\n#endif\n#else\nfloat lodRefractionNormalized=saturate(refractionLOD/log2(vRefractionMicrosurfaceInfos.x));float lodRefractionNormalizedDoubled=lodRefractionNormalized*2.0;vec4 environmentRefractionMid=sampleRefraction(refractionSampler,refractionCoords);if (lodRefractionNormalizedDoubled<1.0){environmentRefraction=mix(\nsampleRefraction(refractionSamplerHigh,refractionCoords),\nenvironmentRefractionMid,\nlodRefractionNormalizedDoubled\n);} else {environmentRefraction=mix(\nenvironmentRefractionMid,\nsampleRefraction(refractionSamplerLow,refractionCoords),\nlodRefractionNormalizedDoubled-1.0\n);}\n#endif\n#ifdef SS_RGBDREFRACTION\nenvironmentRefraction.rgb=fromRGBD(environmentRefraction);\n#endif\n#ifdef SS_GAMMAREFRACTION\nenvironmentRefraction.rgb=toLinearSpace(environmentRefraction.rgb);\n#endif\nenvironmentRefraction.rgb*=vRefractionInfos.x;\n#endif\n#ifdef SS_REFRACTION\nvec3 refractionTransmittance=vec3(refractionIntensity);\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nvec3 volumeAlbedo=computeColorAtDistanceInMedia(vTintColor.rgb,vTintColor.w);refractionTransmittance*=cocaLambert(volumeAlbedo,thickness);\n#elif defined(SS_LINKREFRACTIONTOTRANSPARENCY)\nfloat maxChannel=max(max(surfaceAlbedo.r,surfaceAlbedo.g),surfaceAlbedo.b);vec3 volumeAlbedo=saturate(maxChannel*surfaceAlbedo);environmentRefraction.rgb*=volumeAlbedo;\n#else\nvec3 volumeAlbedo=computeColorAtDistanceInMedia(vTintColor.rgb,vTintColor.w);refractionTransmittance*=cocaLambert(volumeAlbedo,vThicknessParam.y);\n#endif\n#ifdef SS_ALBEDOFORREFRACTIONTINT\nenvironmentRefraction.rgb*=surfaceAlbedo.rgb;\n#endif\noutParams.surfaceAlbedo=surfaceAlbedo*(1.-refractionIntensity);\n#ifdef REFLECTION\noutParams.refractionFactorForIrradiance=(1.-refractionIntensity);\n#endif\n#ifdef UNUSED_MULTIPLEBOUNCES\nvec3 bounceSpecularEnvironmentReflectance=(2.0*specularEnvironmentReflectance)/(1.0+specularEnvironmentReflectance);outParams.specularEnvironmentReflectance=mix(bounceSpecularEnvironmentReflectance,specularEnvironmentReflectance,refractionIntensity);\n#endif\nrefractionTransmittance*=1.0-outParams.specularEnvironmentReflectance;\n#if DEBUGMODE>0\noutParams.refractionTransmittance=refractionTransmittance;\n#endif\noutParams.finalRefraction=environmentRefraction.rgb*refractionTransmittance*vLightingIntensity.z;\n#if DEBUGMODE>0\noutParams.environmentRefraction=environmentRefraction;\n#endif\n#endif\n#if defined(REFLECTION) && defined(SS_TRANSLUCENCY)\n#if defined(NORMAL) && defined(USESPHERICALINVERTEX) || !defined(USESPHERICALFROMREFLECTIONMAP)\nvec3 irradianceVector=vec3(reflectionMatrix*vec4(normalW,0)).xyz;\n#ifdef REFLECTIONMAP_OPPOSITEZ\nirradianceVector.z*=-1.0;\n#endif\n#ifdef INVERTCUBICMAP\nirradianceVector.y*=-1.0;\n#endif\n#else\nvec3 irradianceVector=irradianceVector_;\n#endif\n#if defined(USESPHERICALFROMREFLECTIONMAP)\n#if defined(REALTIME_FILTERING)\nvec3 refractionIrradiance=irradiance(reflectionSampler,-irradianceVector,vReflectionFilteringInfo);\n#else\nvec3 refractionIrradiance=computeEnvironmentIrradiance(-irradianceVector);\n#endif\n#elif defined(USEIRRADIANCEMAP)\n#ifdef REFLECTIONMAP_3D\nvec3 irradianceCoords=irradianceVector;\n#else\nvec2 irradianceCoords=irradianceVector.xy;\n#ifdef REFLECTIONMAP_PROJECTION\nirradianceCoords/=irradianceVector.z;\n#endif\nirradianceCoords.y=1.0-irradianceCoords.y;\n#endif\nvec4 refractionIrradiance=sampleReflection(irradianceSampler,-irradianceCoords);\n#ifdef RGBDREFLECTION\nrefractionIrradiance.rgb=fromRGBD(refractionIrradiance);\n#endif\n#ifdef GAMMAREFLECTION\nrefractionIrradiance.rgb=toLinearSpace(refractionIrradiance.rgb);\n#endif\n#else\nvec4 refractionIrradiance=vec4(0.);\n#endif\nrefractionIrradiance.rgb*=transmittance;\n#ifdef SS_ALBEDOFORTRANSLUCENCYTINT\nrefractionIrradiance.rgb*=surfaceAlbedo.rgb;\n#endif\noutParams.refractionIrradiance=refractionIrradiance.rgb;\n#endif\n}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockSubSurface = { name, shader };\n//# sourceMappingURL=pbrBlockSubSurface.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockNormalGeometric\";\nconst shader = `vec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w;\n#endif\nvec3 geometricNormalW=normalW;\n#if defined(TWOSIDEDLIGHTING) && defined(NORMAL)\ngeometricNormalW=gl_FrontFacing ? geometricNormalW : -geometricNormalW;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockNormalGeometric = { name, shader };\n//# sourceMappingURL=pbrBlockNormalGeometric.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"bumpFragment\";\nconst shader = `vec2 uvOffset=vec2(0.0,0.0);\n#if defined(BUMP) || defined(PARALLAX) || defined(DETAIL)\n#ifdef NORMALXYSCALE\nfloat normalScale=1.0;\n#elif defined(BUMP)\nfloat normalScale=vBumpInfos.y;\n#else\nfloat normalScale=1.0;\n#endif\n#if defined(TANGENT) && defined(NORMAL)\nmat3 TBN=vTBN;\n#elif defined(BUMP)\nvec2 TBNUV=gl_FrontFacing ? vBumpUV : -vBumpUV;mat3 TBN=cotangent_frame(normalW*normalScale,vPositionW,TBNUV,vTangentSpaceParams);\n#else\nvec2 TBNUV=gl_FrontFacing ? vDetailUV : -vDetailUV;mat3 TBN=cotangent_frame(normalW*normalScale,vPositionW,TBNUV,vec2(1.,1.));\n#endif\n#elif defined(ANISOTROPIC)\n#if defined(TANGENT) && defined(NORMAL)\nmat3 TBN=vTBN;\n#else\nvec2 TBNUV=gl_FrontFacing ? vMainUV1 : -vMainUV1;mat3 TBN=cotangent_frame(normalW,vPositionW,TBNUV,vec2(1.,1.));\n#endif\n#endif\n#ifdef PARALLAX\nmat3 invTBN=transposeMat3(TBN);\n#ifdef PARALLAXOCCLUSION\nuvOffset=parallaxOcclusion(invTBN*-viewDirectionW,invTBN*normalW,vBumpUV,vBumpInfos.z);\n#else\nuvOffset=parallaxOffset(invTBN*viewDirectionW,vBumpInfos.z);\n#endif\n#endif\n#ifdef DETAIL\nvec4 detailColor=texture2D(detailSampler,vDetailUV+uvOffset);vec2 detailNormalRG=detailColor.wy*2.0-1.0;float detailNormalB=sqrt(1.-saturate(dot(detailNormalRG,detailNormalRG)));vec3 detailNormal=vec3(detailNormalRG,detailNormalB);\n#endif\n#ifdef BUMP\n#ifdef OBJECTSPACE_NORMALMAP\n#define CUSTOM_FRAGMENT_BUMP_FRAGMENT\nnormalW=normalize(texture2D(bumpSampler,vBumpUV).xyz *2.0-1.0);normalW=normalize(mat3(normalMatrix)*normalW);\n#elif !defined(DETAIL)\nnormalW=perturbNormal(TBN,texture2D(bumpSampler,vBumpUV+uvOffset).xyz,vBumpInfos.y);\n#else\nvec3 bumpNormal=texture2D(bumpSampler,vBumpUV+uvOffset).xyz*2.0-1.0;\n#if DETAIL_NORMALBLENDMETHOD==0 \ndetailNormal.xy*=vDetailInfos.z;vec3 blendedNormal=normalize(vec3(bumpNormal.xy+detailNormal.xy,bumpNormal.z*detailNormal.z));\n#elif DETAIL_NORMALBLENDMETHOD==1 \ndetailNormal.xy*=vDetailInfos.z;bumpNormal+=vec3(0.0,0.0,1.0);detailNormal*=vec3(-1.0,-1.0,1.0);vec3 blendedNormal=bumpNormal*dot(bumpNormal,detailNormal)/bumpNormal.z-detailNormal;\n#endif\nnormalW=perturbNormalBase(TBN,blendedNormal,vBumpInfos.y);\n#endif\n#elif defined(DETAIL)\ndetailNormal.xy*=vDetailInfos.z;normalW=perturbNormalBase(TBN,detailNormal,vDetailInfos.z);\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const bumpFragment = { name, shader };\n//# sourceMappingURL=bumpFragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockNormalFinal\";\nconst shader = `#if defined(FORCENORMALFORWARD) && defined(NORMAL)\nvec3 faceNormal=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w;\n#if defined(TWOSIDEDLIGHTING)\nfaceNormal=gl_FrontFacing ? faceNormal : -faceNormal;\n#endif\nnormalW*=sign(dot(normalW,faceNormal));\n#endif\n#if defined(TWOSIDEDLIGHTING) && defined(NORMAL)\nnormalW=gl_FrontFacing ? normalW : -normalW;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockNormalFinal = { name, shader };\n//# sourceMappingURL=pbrBlockNormalFinal.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockLightmapInit\";\nconst shader = `#ifdef LIGHTMAP\nvec4 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset);\n#ifdef RGBDLIGHTMAP\nlightmapColor.rgb=fromRGBD(lightmapColor);\n#endif\n#ifdef GAMMALIGHTMAP\nlightmapColor.rgb=toLinearSpace(lightmapColor.rgb);\n#endif\nlightmapColor.rgb*=vLightmapInfos.y;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockLightmapInit = { name, shader };\n//# sourceMappingURL=pbrBlockLightmapInit.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockGeometryInfo\";\nconst shader = `float NdotVUnclamped=dot(normalW,viewDirectionW);float NdotV=absEps(NdotVUnclamped);float alphaG=convertRoughnessToAverageSlope(roughness);vec2 AARoughnessFactors=getAARoughnessFactors(normalW.xyz);\n#ifdef SPECULARAA\nalphaG+=AARoughnessFactors.y;\n#endif\n#if defined(ENVIRONMENTBRDF)\nvec3 environmentBrdf=getBRDFLookup(NdotV,roughness);\n#endif\n#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\n#ifdef RADIANCEOCCLUSION\n#ifdef AMBIENTINGRAYSCALE\nfloat ambientMonochrome=aoOut.ambientOcclusionColor.r;\n#else\nfloat ambientMonochrome=getLuminance(aoOut.ambientOcclusionColor);\n#endif\nfloat seo=environmentRadianceOcclusion(ambientMonochrome,NdotVUnclamped);\n#endif\n#ifdef HORIZONOCCLUSION\n#ifdef BUMP\n#ifdef REFLECTIONMAP_3D\nfloat eho=environmentHorizonOcclusion(-viewDirectionW,normalW,geometricNormalW);\n#endif\n#endif\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockGeometryInfo = { name, shader };\n//# sourceMappingURL=pbrBlockGeometryInfo.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockReflectance0\";\nconst shader = `float reflectance=max(max(reflectivityOut.surfaceReflectivityColor.r,reflectivityOut.surfaceReflectivityColor.g),reflectivityOut.surfaceReflectivityColor.b);vec3 specularEnvironmentR0=reflectivityOut.surfaceReflectivityColor.rgb;\n#ifdef METALLICWORKFLOW\nvec3 specularEnvironmentR90=vec3(metallicReflectanceFactors.a);\n#else \nvec3 specularEnvironmentR90=vec3(1.0,1.0,1.0);\n#endif\n#ifdef ALPHAFRESNEL\nfloat reflectance90=fresnelGrazingReflectance(reflectance);specularEnvironmentR90=specularEnvironmentR90*reflectance90;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockReflectance0 = { name, shader };\n//# sourceMappingURL=pbrBlockReflectance0.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockReflectance\";\nconst shader = `#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\nvec3 specularEnvironmentReflectance=getReflectanceFromBRDFLookup(clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,environmentBrdf);\n#ifdef RADIANCEOCCLUSION\nspecularEnvironmentReflectance*=seo;\n#endif\n#ifdef HORIZONOCCLUSION\n#ifdef BUMP\n#ifdef REFLECTIONMAP_3D\nspecularEnvironmentReflectance*=eho;\n#endif\n#endif\n#endif\n#else\nvec3 specularEnvironmentReflectance=getReflectanceFromAnalyticalBRDFLookup_Jones(NdotV,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,sqrt(microSurface));\n#endif\n#ifdef CLEARCOAT\nspecularEnvironmentReflectance*=clearcoatOut.conservationFactor;\n#if defined(CLEARCOAT_TINT)\nspecularEnvironmentReflectance*=clearcoatOut.absorption;\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockReflectance = { name, shader };\n//# sourceMappingURL=pbrBlockReflectance.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockDirectLighting\";\nconst shader = `vec3 diffuseBase=vec3(0.,0.,0.);\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\n#ifdef CLEARCOAT\nvec3 clearCoatBase=vec3(0.,0.,0.);\n#endif\n#ifdef SHEEN\nvec3 sheenBase=vec3(0.,0.,0.);\n#endif\npreLightingInfo preInfo;lightingInfo info;float shadow=1.; \nfloat aggShadow=0.;float numLights=0.;\n#if defined(CLEARCOAT) && defined(CLEARCOAT_TINT)\nvec3 absorption=vec3(0.);\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockDirectLighting = { name, shader };\n//# sourceMappingURL=pbrBlockDirectLighting.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockFinalLitComponents\";\nconst shader = `aggShadow=aggShadow/numLights;\n#if defined(ENVIRONMENTBRDF)\n#ifdef MS_BRDF_ENERGY_CONSERVATION\nvec3 energyConservationFactor=getEnergyConservationFactor(clearcoatOut.specularEnvironmentR0,environmentBrdf);\n#endif\n#endif\n#ifndef METALLICWORKFLOW\n#ifdef SPECULAR_GLOSSINESS_ENERGY_CONSERVATION\nsurfaceAlbedo.rgb=(1.-reflectance)*surfaceAlbedo.rgb;\n#endif\n#endif\n#if defined(SHEEN) && defined(SHEEN_ALBEDOSCALING) && defined(ENVIRONMENTBRDF)\nsurfaceAlbedo.rgb=sheenOut.sheenAlbedoScaling*surfaceAlbedo.rgb;\n#endif\n#ifdef REFLECTION\nvec3 finalIrradiance=reflectionOut.environmentIrradiance;\n#if defined(CLEARCOAT)\nfinalIrradiance*=clearcoatOut.conservationFactor;\n#if defined(CLEARCOAT_TINT)\nfinalIrradiance*=clearcoatOut.absorption;\n#endif\n#endif\n#if defined(SS_REFRACTION)\nfinalIrradiance*=subSurfaceOut.refractionFactorForIrradiance;\n#endif\n#if defined(SS_TRANSLUCENCY)\nfinalIrradiance*=(1.0-subSurfaceOut.translucencyIntensity);finalIrradiance+=subSurfaceOut.refractionIrradiance;\n#endif\nfinalIrradiance*=surfaceAlbedo.rgb;finalIrradiance*=vLightingIntensity.z;finalIrradiance*=aoOut.ambientOcclusionColor;\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase;finalSpecular=max(finalSpecular,0.0);vec3 finalSpecularScaled=finalSpecular*vLightingIntensity.x*vLightingIntensity.w;\n#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)\nfinalSpecularScaled*=energyConservationFactor;\n#endif\n#if defined(SHEEN) && defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING)\nfinalSpecularScaled*=sheenOut.sheenAlbedoScaling;\n#endif\n#endif\n#ifdef REFLECTION\nvec3 finalRadiance=reflectionOut.environmentRadiance.rgb;finalRadiance*=subSurfaceOut.specularEnvironmentReflectance;vec3 finalRadianceScaled=finalRadiance*vLightingIntensity.z;\n#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)\nfinalRadianceScaled*=energyConservationFactor;\n#endif\n#if defined(SHEEN) && defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING)\nfinalRadianceScaled*=sheenOut.sheenAlbedoScaling;\n#endif\n#endif\n#ifdef SHEEN\nvec3 finalSheen=sheenBase*sheenOut.sheenColor;finalSheen=max(finalSheen,0.0);vec3 finalSheenScaled=finalSheen*vLightingIntensity.x*vLightingIntensity.w;\n#if defined(CLEARCOAT) && defined(REFLECTION) && defined(ENVIRONMENTBRDF)\nsheenOut.finalSheenRadianceScaled*=clearcoatOut.conservationFactor;\n#if defined(CLEARCOAT_TINT)\nsheenOut.finalSheenRadianceScaled*=clearcoatOut.absorption;\n#endif\n#endif\n#endif\n#ifdef CLEARCOAT\nvec3 finalClearCoat=clearCoatBase;finalClearCoat=max(finalClearCoat,0.0);vec3 finalClearCoatScaled=finalClearCoat*vLightingIntensity.x*vLightingIntensity.w;\n#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)\nfinalClearCoatScaled*=clearcoatOut.energyConservationFactorClearCoat;\n#endif\n#ifdef SS_REFRACTION\nsubSurfaceOut.finalRefraction*=clearcoatOut.conservationFactor;\n#ifdef CLEARCOAT_TINT\nsubSurfaceOut.finalRefraction*=clearcoatOut.absorption;\n#endif\n#endif\n#endif\n#ifdef ALPHABLEND\nfloat luminanceOverAlpha=0.0;\n#if defined(REFLECTION) && defined(RADIANCEOVERALPHA)\nluminanceOverAlpha+=getLuminance(finalRadianceScaled);\n#if defined(CLEARCOAT)\nluminanceOverAlpha+=getLuminance(clearcoatOut.finalClearCoatRadianceScaled);\n#endif\n#endif\n#if defined(SPECULARTERM) && defined(SPECULAROVERALPHA)\nluminanceOverAlpha+=getLuminance(finalSpecularScaled);\n#endif\n#if defined(CLEARCOAT) && defined(CLEARCOATOVERALPHA)\nluminanceOverAlpha+=getLuminance(finalClearCoatScaled);\n#endif\n#if defined(RADIANCEOVERALPHA) || defined(SPECULAROVERALPHA) || defined(CLEARCOATOVERALPHA)\nalpha=saturate(alpha+luminanceOverAlpha*luminanceOverAlpha);\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockFinalLitComponents = { name, shader };\n//# sourceMappingURL=pbrBlockFinalLitComponents.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockFinalUnlitComponents\";\nconst shader = `vec3 finalDiffuse=diffuseBase;finalDiffuse*=surfaceAlbedo.rgb;finalDiffuse=max(finalDiffuse,0.0);finalDiffuse*=vLightingIntensity.x;vec3 finalAmbient=vAmbientColor;finalAmbient*=surfaceAlbedo.rgb;vec3 finalEmissive=vEmissiveColor;\n#ifdef EMISSIVE\nvec3 emissiveColorTex=texture2D(emissiveSampler,vEmissiveUV+uvOffset).rgb;\n#ifdef GAMMAEMISSIVE\nfinalEmissive*=toLinearSpace(emissiveColorTex.rgb);\n#else\nfinalEmissive*=emissiveColorTex.rgb;\n#endif\nfinalEmissive*= vEmissiveInfos.y;\n#endif\nfinalEmissive*=vLightingIntensity.y;\n#ifdef AMBIENT\nvec3 ambientOcclusionForDirectDiffuse=mix(vec3(1.),aoOut.ambientOcclusionColor,vAmbientInfos.w);\n#else\nvec3 ambientOcclusionForDirectDiffuse=aoOut.ambientOcclusionColor;\n#endif\nfinalAmbient*=aoOut.ambientOcclusionColor;finalDiffuse*=ambientOcclusionForDirectDiffuse;\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockFinalUnlitComponents = { name, shader };\n//# sourceMappingURL=pbrBlockFinalUnlitComponents.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockFinalColorComposition\";\nconst shader = `vec4 finalColor=vec4(\n#ifndef UNLIT\n#ifdef REFLECTION\nfinalIrradiance +\n#endif\n#ifdef SPECULARTERM\nfinalSpecularScaled +\n#endif\n#ifdef SHEEN\nfinalSheenScaled +\n#endif\n#ifdef CLEARCOAT\nfinalClearCoatScaled +\n#endif\n#ifdef REFLECTION\nfinalRadianceScaled +\n#if defined(SHEEN) && defined(ENVIRONMENTBRDF)\nsheenOut.finalSheenRadianceScaled +\n#endif\n#ifdef CLEARCOAT\nclearcoatOut.finalClearCoatRadianceScaled +\n#endif\n#endif\n#ifdef SS_REFRACTION\nsubSurfaceOut.finalRefraction +\n#endif\n#endif\nfinalAmbient +\nfinalDiffuse,\nalpha);\n#ifdef LIGHTMAP\n#ifndef LIGHTMAPEXCLUDED\n#ifdef USELIGHTMAPASSHADOWMAP\nfinalColor.rgb*=lightmapColor.rgb;\n#else\nfinalColor.rgb+=lightmapColor.rgb;\n#endif\n#endif\n#endif\nfinalColor.rgb+=finalEmissive;\n#define CUSTOM_FRAGMENT_BEFORE_FOG\nfinalColor=max(finalColor,0.0);\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockFinalColorComposition = { name, shader };\n//# sourceMappingURL=pbrBlockFinalColorComposition.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"logDepthFragment\";\nconst shader = `#ifdef LOGARITHMICDEPTH\ngl_FragDepthEXT=log2(vFragmentDepth)*logarithmicDepthConstant*0.5;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const logDepthFragment = { name, shader };\n//# sourceMappingURL=logDepthFragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pbrBlockImageProcessing\";\nconst shader = `#if defined(IMAGEPROCESSINGPOSTPROCESS) || defined(SS_SCATTERING)\n#if !defined(SKIPFINALCOLORCLAMP)\nfinalColor.rgb=clamp(finalColor.rgb,0.,30.0);\n#endif\n#else\nfinalColor=applyImageProcessing(finalColor);\n#endif\nfinalColor.a*=visibility;\n#ifdef PREMULTIPLYALPHA\nfinalColor.rgb*=finalColor.a;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrBlockImageProcessing = { name, shader };\n//# sourceMappingURL=pbrBlockImageProcessing.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"oitFragment\";\nconst shader = `#ifdef ORDER_INDEPENDENT_TRANSPARENCY\nfloat fragDepth=gl_FragCoord.z; \n#ifdef ORDER_INDEPENDENT_TRANSPARENCY_16BITS\nuint halfFloat=packHalf2x16(vec2(fragDepth));vec2 full=unpackHalf2x16(halfFloat);fragDepth=full.x;\n#endif\nivec2 fragCoord=ivec2(gl_FragCoord.xy);vec2 lastDepth=texelFetch(oitDepthSampler,fragCoord,0).rg;vec4 lastFrontColor=texelFetch(oitFrontColorSampler,fragCoord,0);depth.rg=vec2(-MAX_DEPTH);frontColor=lastFrontColor;backColor=vec4(0.0);\n#ifdef USE_REVERSE_DEPTHBUFFER\nfloat furthestDepth=-lastDepth.x;float nearestDepth=lastDepth.y;\n#else\nfloat nearestDepth=-lastDepth.x;float furthestDepth=lastDepth.y;\n#endif\nfloat alphaMultiplier=1.0-lastFrontColor.a;\n#ifdef USE_REVERSE_DEPTHBUFFER\nif (fragDepth>nearestDepth || fragDepthfurthestDepth) {\n#endif\nreturn;}\n#ifdef USE_REVERSE_DEPTHBUFFER\nif (fragDepthfurthestDepth) {\n#else\nif (fragDepth>nearestDepth && fragDepth0\nif (vClipSpacePosition.x/vClipSpacePosition.w>=vDebugMode.x) {\n#if DEBUGMODE==1\ngl_FragColor.rgb=vPositionW.rgb;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE==2 && defined(NORMAL)\ngl_FragColor.rgb=vNormalW.rgb;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE==3 && defined(BUMP) || DEBUGMODE==3 && defined(PARALLAX) || DEBUGMODE==3 && defined(ANISOTROPIC)\ngl_FragColor.rgb=TBN[0];\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE==4 && defined(BUMP) || DEBUGMODE==4 && defined(PARALLAX) || DEBUGMODE==4 && defined(ANISOTROPIC)\ngl_FragColor.rgb=TBN[1];\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE==5\ngl_FragColor.rgb=normalW;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE==6 && defined(MAINUV1)\ngl_FragColor.rgb=vec3(vMainUV1,0.0);\n#elif DEBUGMODE==7 && defined(MAINUV2)\ngl_FragColor.rgb=vec3(vMainUV2,0.0);\n#elif DEBUGMODE==8 && defined(CLEARCOAT) && defined(CLEARCOAT_BUMP)\ngl_FragColor.rgb=clearcoatOut.TBNClearCoat[0];\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE==9 && defined(CLEARCOAT) && defined(CLEARCOAT_BUMP)\ngl_FragColor.rgb=clearcoatOut.TBNClearCoat[1];\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE==10 && defined(CLEARCOAT)\ngl_FragColor.rgb=clearcoatOut.clearCoatNormalW;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE==11 && defined(ANISOTROPIC)\ngl_FragColor.rgb=anisotropicOut.anisotropicNormal;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE==12 && defined(ANISOTROPIC)\ngl_FragColor.rgb=anisotropicOut.anisotropicTangent;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE==13 && defined(ANISOTROPIC)\ngl_FragColor.rgb=anisotropicOut.anisotropicBitangent;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE==20 && defined(ALBEDO)\ngl_FragColor.rgb=albedoTexture.rgb;\n#ifndef GAMMAALBEDO\n#define DEBUGMODE_GAMMA\n#endif\n#elif DEBUGMODE==21 && defined(AMBIENT)\ngl_FragColor.rgb=aoOut.ambientOcclusionColorMap.rgb;\n#elif DEBUGMODE==22 && defined(OPACITY)\ngl_FragColor.rgb=opacityMap.rgb;\n#elif DEBUGMODE==23 && defined(EMISSIVE)\ngl_FragColor.rgb=emissiveColorTex.rgb;\n#ifndef GAMMAEMISSIVE\n#define DEBUGMODE_GAMMA\n#endif\n#elif DEBUGMODE==24 && defined(LIGHTMAP)\ngl_FragColor.rgb=lightmapColor.rgb;\n#ifndef GAMMALIGHTMAP\n#define DEBUGMODE_GAMMA\n#endif\n#elif DEBUGMODE==25 && defined(REFLECTIVITY) && defined(METALLICWORKFLOW)\ngl_FragColor.rgb=reflectivityOut.surfaceMetallicColorMap.rgb;\n#elif DEBUGMODE==26 && defined(REFLECTIVITY) && !defined(METALLICWORKFLOW)\ngl_FragColor.rgb=reflectivityOut.surfaceReflectivityColorMap.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==27 && defined(CLEARCOAT) && defined(CLEARCOAT_TEXTURE)\ngl_FragColor.rgb=vec3(clearcoatOut.clearCoatMapData.rg,0.0);\n#elif DEBUGMODE==28 && defined(CLEARCOAT) && defined(CLEARCOAT_TINT) && defined(CLEARCOAT_TINT_TEXTURE)\ngl_FragColor.rgb=clearcoatOut.clearCoatTintMapData.rgb;\n#elif DEBUGMODE==29 && defined(SHEEN) && defined(SHEEN_TEXTURE)\ngl_FragColor.rgb=sheenOut.sheenMapData.rgb;\n#elif DEBUGMODE==30 && defined(ANISOTROPIC) && defined(ANISOTROPIC_TEXTURE)\ngl_FragColor.rgb=anisotropicOut.anisotropyMapData.rgb;\n#elif DEBUGMODE==31 && defined(SUBSURFACE) && defined(SS_THICKNESSANDMASK_TEXTURE)\ngl_FragColor.rgb=subSurfaceOut.thicknessMap.rgb;\n#elif DEBUGMODE==32 && defined(BUMP)\ngl_FragColor.rgb=texture2D(bumpSampler,vBumpUV).rgb;\n#elif DEBUGMODE==40 && defined(SS_REFRACTION)\ngl_FragColor.rgb=subSurfaceOut.environmentRefraction.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==41 && defined(REFLECTION)\ngl_FragColor.rgb=reflectionOut.environmentRadiance.rgb;\n#ifndef GAMMAREFLECTION\n#define DEBUGMODE_GAMMA\n#endif\n#elif DEBUGMODE==42 && defined(CLEARCOAT) && defined(REFLECTION)\ngl_FragColor.rgb=clearcoatOut.environmentClearCoatRadiance.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==50\ngl_FragColor.rgb=diffuseBase.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==51 && defined(SPECULARTERM)\ngl_FragColor.rgb=specularBase.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==52 && defined(CLEARCOAT)\ngl_FragColor.rgb=clearCoatBase.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==53 && defined(SHEEN)\ngl_FragColor.rgb=sheenBase.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==54 && defined(REFLECTION)\ngl_FragColor.rgb=reflectionOut.environmentIrradiance.rgb;\n#ifndef GAMMAREFLECTION\n#define DEBUGMODE_GAMMA\n#endif\n#elif DEBUGMODE==60\ngl_FragColor.rgb=surfaceAlbedo.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==61\ngl_FragColor.rgb=clearcoatOut.specularEnvironmentR0;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==62 && defined(METALLICWORKFLOW)\ngl_FragColor.rgb=vec3(reflectivityOut.metallicRoughness.r);\n#elif DEBUGMODE==71 && defined(METALLICWORKFLOW)\ngl_FragColor.rgb=reflectivityOut.metallicF0;\n#elif DEBUGMODE==63\ngl_FragColor.rgb=vec3(roughness);\n#elif DEBUGMODE==64\ngl_FragColor.rgb=vec3(alphaG);\n#elif DEBUGMODE==65\ngl_FragColor.rgb=vec3(NdotV);\n#elif DEBUGMODE==66 && defined(CLEARCOAT) && defined(CLEARCOAT_TINT)\ngl_FragColor.rgb=clearcoatOut.clearCoatColor.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==67 && defined(CLEARCOAT)\ngl_FragColor.rgb=vec3(clearcoatOut.clearCoatRoughness);\n#elif DEBUGMODE==68 && defined(CLEARCOAT)\ngl_FragColor.rgb=vec3(clearcoatOut.clearCoatNdotV);\n#elif DEBUGMODE==69 && defined(SUBSURFACE) && defined(SS_TRANSLUCENCY)\ngl_FragColor.rgb=subSurfaceOut.transmittance;\n#elif DEBUGMODE==70 && defined(SUBSURFACE) && defined(SS_REFRACTION)\ngl_FragColor.rgb=subSurfaceOut.refractionTransmittance;\n#elif DEBUGMODE==72\ngl_FragColor.rgb=vec3(microSurface);\n#elif DEBUGMODE==73\ngl_FragColor.rgb=vAlbedoColor.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==74 && !defined(METALLICWORKFLOW)\ngl_FragColor.rgb=vReflectivityColor.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==75\ngl_FragColor.rgb=vEmissiveColor.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==80 && defined(RADIANCEOCCLUSION)\ngl_FragColor.rgb=vec3(seo);\n#elif DEBUGMODE==81 && defined(HORIZONOCCLUSION)\ngl_FragColor.rgb=vec3(eho);\n#elif DEBUGMODE==82 && defined(MS_BRDF_ENERGY_CONSERVATION)\ngl_FragColor.rgb=vec3(energyConservationFactor);\n#elif DEBUGMODE==83 && defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\ngl_FragColor.rgb=specularEnvironmentReflectance;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==84 && defined(CLEARCOAT) && defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\ngl_FragColor.rgb=clearcoatOut.clearCoatEnvironmentReflectance;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==85 && defined(SHEEN) && defined(REFLECTION)\ngl_FragColor.rgb=sheenOut.sheenEnvironmentReflectance;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE==86 && defined(ALPHABLEND)\ngl_FragColor.rgb=vec3(luminanceOverAlpha);\n#elif DEBUGMODE==87\ngl_FragColor.rgb=vec3(alpha);\n#elif DEBUGMODE==88 && defined(ALBEDO)\ngl_FragColor.rgb=vec3(albedoTexture.a);\n#else\nfloat stripeWidth=30.;float stripePos=floor((gl_FragCoord.x+gl_FragCoord.y)/stripeWidth);float whichColor=mod(stripePos,2.);vec3 color1=vec3(.6,.2,.2);vec3 color2=vec3(.3,.1,.1);gl_FragColor.rgb=mix(color1,color2,whichColor);\n#endif\ngl_FragColor.rgb*=vDebugMode.y;\n#ifdef DEBUGMODE_NORMALIZE\ngl_FragColor.rgb=normalize(gl_FragColor.rgb)*0.5+0.5;\n#endif\n#ifdef DEBUGMODE_GAMMA\ngl_FragColor.rgb=toGammaSpace(gl_FragColor.rgb);\n#endif\ngl_FragColor.a=1.0;\n#ifdef PREPASS\ngl_FragData[0]=toLinearSpace(gl_FragColor); \ngl_FragData[1]=vec4(0.,0.,0.,0.); \n#endif\n#ifdef DEBUGMODE_FORCERETURN\nreturn;\n#endif\n}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrDebug = { name, shader };\n//# sourceMappingURL=pbrDebug.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/prePassDeclaration.js\";\nimport \"./ShadersInclude/oitDeclaration.js\";\nimport \"./ShadersInclude/pbrFragmentDeclaration.js\";\nimport \"./ShadersInclude/pbrUboDeclaration.js\";\nimport \"./ShadersInclude/pbrFragmentExtraDeclaration.js\";\nimport \"./ShadersInclude/lightFragmentDeclaration.js\";\nimport \"./ShadersInclude/lightUboDeclaration.js\";\nimport \"./ShadersInclude/pbrFragmentSamplersDeclaration.js\";\nimport \"./ShadersInclude/imageProcessingDeclaration.js\";\nimport \"./ShadersInclude/clipPlaneFragmentDeclaration.js\";\nimport \"./ShadersInclude/logDepthDeclaration.js\";\nimport \"./ShadersInclude/fogFragmentDeclaration.js\";\nimport \"./ShadersInclude/helperFunctions.js\";\nimport \"./ShadersInclude/subSurfaceScatteringFunctions.js\";\nimport \"./ShadersInclude/importanceSampling.js\";\nimport \"./ShadersInclude/pbrHelperFunctions.js\";\nimport \"./ShadersInclude/imageProcessingFunctions.js\";\nimport \"./ShadersInclude/shadowsFragmentFunctions.js\";\nimport \"./ShadersInclude/harmonicsFunctions.js\";\nimport \"./ShadersInclude/pbrDirectLightingSetupFunctions.js\";\nimport \"./ShadersInclude/pbrDirectLightingFalloffFunctions.js\";\nimport \"./ShadersInclude/pbrBRDFFunctions.js\";\nimport \"./ShadersInclude/hdrFilteringFunctions.js\";\nimport \"./ShadersInclude/pbrDirectLightingFunctions.js\";\nimport \"./ShadersInclude/pbrIBLFunctions.js\";\nimport \"./ShadersInclude/bumpFragmentMainFunctions.js\";\nimport \"./ShadersInclude/bumpFragmentFunctions.js\";\nimport \"./ShadersInclude/reflectionFunction.js\";\nimport \"./ShadersInclude/pbrBlockAlbedoOpacity.js\";\nimport \"./ShadersInclude/pbrBlockReflectivity.js\";\nimport \"./ShadersInclude/pbrBlockAmbientOcclusion.js\";\nimport \"./ShadersInclude/pbrBlockAlphaFresnel.js\";\nimport \"./ShadersInclude/pbrBlockAnisotropic.js\";\nimport \"./ShadersInclude/pbrBlockReflection.js\";\nimport \"./ShadersInclude/pbrBlockSheen.js\";\nimport \"./ShadersInclude/pbrBlockClearcoat.js\";\nimport \"./ShadersInclude/pbrBlockIridescence.js\";\nimport \"./ShadersInclude/pbrBlockSubSurface.js\";\nimport \"./ShadersInclude/clipPlaneFragment.js\";\nimport \"./ShadersInclude/pbrBlockNormalGeometric.js\";\nimport \"./ShadersInclude/bumpFragment.js\";\nimport \"./ShadersInclude/pbrBlockNormalFinal.js\";\nimport \"./ShadersInclude/depthPrePass.js\";\nimport \"./ShadersInclude/pbrBlockLightmapInit.js\";\nimport \"./ShadersInclude/pbrBlockGeometryInfo.js\";\nimport \"./ShadersInclude/pbrBlockReflectance0.js\";\nimport \"./ShadersInclude/pbrBlockReflectance.js\";\nimport \"./ShadersInclude/pbrBlockDirectLighting.js\";\nimport \"./ShadersInclude/lightFragment.js\";\nimport \"./ShadersInclude/pbrBlockFinalLitComponents.js\";\nimport \"./ShadersInclude/pbrBlockFinalUnlitComponents.js\";\nimport \"./ShadersInclude/pbrBlockFinalColorComposition.js\";\nimport \"./ShadersInclude/logDepthFragment.js\";\nimport \"./ShadersInclude/fogFragment.js\";\nimport \"./ShadersInclude/pbrBlockImageProcessing.js\";\nimport \"./ShadersInclude/oitFragment.js\";\nimport \"./ShadersInclude/pbrDebug.js\";\nconst name = \"pbrPixelShader\";\nconst shader = `#if defined(BUMP) || !defined(NORMAL) || defined(FORCENORMALFORWARD) || defined(SPECULARAA) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef LODBASEDMICROSFURACE\n#extension GL_EXT_shader_texture_lod : enable\n#endif\n#define CUSTOM_FRAGMENT_BEGIN\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include[SCENE_MRT_COUNT]\nprecision highp float;\n#include\n#ifndef FROMLINEARSPACE\n#define FROMLINEARSPACE\n#endif\n#include<__decl__pbrFragment>\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#ifdef REFLECTION\n#include\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include\n#include\n#include\n#include\nalbedoOpacityOutParams albedoOpacityOut;\n#ifdef ALBEDO\nvec4 albedoTexture=texture2D(albedoSampler,vAlbedoUV+uvOffset);\n#endif\n#ifdef OPACITY\nvec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset);\n#endif\n#ifdef DECAL\nvec4 decalColor=texture2D(decalSampler,vDecalUV+uvOffset);\n#endif\nalbedoOpacityBlock(\nvAlbedoColor,\n#ifdef ALBEDO\nalbedoTexture,\nvAlbedoInfos,\n#endif\n#ifdef OPACITY\nopacityMap,\nvOpacityInfos,\n#endif\n#ifdef DETAIL\ndetailColor,\nvDetailInfos,\n#endif\n#ifdef DECAL\ndecalColor,\nvDecalInfos,\n#endif\nalbedoOpacityOut\n);vec3 surfaceAlbedo=albedoOpacityOut.surfaceAlbedo;float alpha=albedoOpacityOut.alpha;\n#define CUSTOM_FRAGMENT_UPDATE_ALPHA\n#include\n#define CUSTOM_FRAGMENT_BEFORE_LIGHTS\nambientOcclusionOutParams aoOut;\n#ifdef AMBIENT\nvec3 ambientOcclusionColorMap=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb;\n#endif\nambientOcclusionBlock(\n#ifdef AMBIENT\nambientOcclusionColorMap,\nvAmbientInfos,\n#endif\naoOut\n);\n#include\n#ifdef UNLIT\nvec3 diffuseBase=vec3(1.,1.,1.);\n#else\nvec3 baseColor=surfaceAlbedo;reflectivityOutParams reflectivityOut;\n#if defined(REFLECTIVITY)\nvec4 surfaceMetallicOrReflectivityColorMap=texture2D(reflectivitySampler,vReflectivityUV+uvOffset);vec4 baseReflectivity=surfaceMetallicOrReflectivityColorMap;\n#ifndef METALLICWORKFLOW\n#ifdef REFLECTIVITY_GAMMA\nsurfaceMetallicOrReflectivityColorMap=toLinearSpace(surfaceMetallicOrReflectivityColorMap);\n#endif\nsurfaceMetallicOrReflectivityColorMap.rgb*=vReflectivityInfos.y;\n#endif\n#endif\n#if defined(MICROSURFACEMAP)\nvec4 microSurfaceTexel=texture2D(microSurfaceSampler,vMicroSurfaceSamplerUV+uvOffset)*vMicroSurfaceSamplerInfos.y;\n#endif\n#ifdef METALLICWORKFLOW\nvec4 metallicReflectanceFactors=vMetallicReflectanceFactors;\n#ifdef REFLECTANCE\nvec4 reflectanceFactorsMap=texture2D(reflectanceSampler,vReflectanceUV+uvOffset);\n#ifdef REFLECTANCE_GAMMA\nreflectanceFactorsMap=toLinearSpace(reflectanceFactorsMap);\n#endif\nmetallicReflectanceFactors.rgb*=reflectanceFactorsMap.rgb;\n#endif\n#ifdef METALLIC_REFLECTANCE\nvec4 metallicReflectanceFactorsMap=texture2D(metallicReflectanceSampler,vMetallicReflectanceUV+uvOffset);\n#ifdef METALLIC_REFLECTANCE_GAMMA\nmetallicReflectanceFactorsMap=toLinearSpace(metallicReflectanceFactorsMap);\n#endif\n#ifndef METALLIC_REFLECTANCE_USE_ALPHA_ONLY\nmetallicReflectanceFactors.rgb*=metallicReflectanceFactorsMap.rgb;\n#endif\nmetallicReflectanceFactors*=metallicReflectanceFactorsMap.a;\n#endif\n#endif\nreflectivityBlock(\nvReflectivityColor,\n#ifdef METALLICWORKFLOW\nsurfaceAlbedo,\nmetallicReflectanceFactors,\n#endif\n#ifdef REFLECTIVITY\nvReflectivityInfos,\nsurfaceMetallicOrReflectivityColorMap,\n#endif\n#if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED)\naoOut.ambientOcclusionColor,\n#endif\n#ifdef MICROSURFACEMAP\nmicroSurfaceTexel,\n#endif\n#ifdef DETAIL\ndetailColor,\nvDetailInfos,\n#endif\nreflectivityOut\n);float microSurface=reflectivityOut.microSurface;float roughness=reflectivityOut.roughness;\n#ifdef METALLICWORKFLOW\nsurfaceAlbedo=reflectivityOut.surfaceAlbedo;\n#endif\n#if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED)\naoOut.ambientOcclusionColor=reflectivityOut.ambientOcclusionColor;\n#endif\n#ifdef ALPHAFRESNEL\n#if defined(ALPHATEST) || defined(ALPHABLEND)\nalphaFresnelOutParams alphaFresnelOut;alphaFresnelBlock(\nnormalW,\nviewDirectionW,\nalpha,\nmicroSurface,\nalphaFresnelOut\n);alpha=alphaFresnelOut.alpha;\n#endif\n#endif\n#include\n#ifdef ANISOTROPIC\nanisotropicOutParams anisotropicOut;\n#ifdef ANISOTROPIC_TEXTURE\nvec3 anisotropyMapData=texture2D(anisotropySampler,vAnisotropyUV+uvOffset).rgb*vAnisotropyInfos.y;\n#endif\nanisotropicBlock(\nvAnisotropy,\nroughness,\n#ifdef ANISOTROPIC_TEXTURE\nanisotropyMapData,\n#endif\nTBN,\nnormalW,\nviewDirectionW,\nanisotropicOut\n);\n#endif\n#ifdef REFLECTION\nreflectionOutParams reflectionOut;\n#ifndef USE_CUSTOM_REFLECTION\nreflectionBlock(\nvPositionW,\nnormalW,\nalphaG,\nvReflectionMicrosurfaceInfos,\nvReflectionInfos,\nvReflectionColor,\n#ifdef ANISOTROPIC\nanisotropicOut,\n#endif\n#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)\nNdotVUnclamped,\n#endif\n#ifdef LINEARSPECULARREFLECTION\nroughness,\n#endif\nreflectionSampler,\n#if defined(NORMAL) && defined(USESPHERICALINVERTEX)\nvEnvironmentIrradiance,\n#endif\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX)\nreflectionMatrix,\n#endif\n#endif\n#ifdef USEIRRADIANCEMAP\nirradianceSampler,\n#endif\n#ifndef LODBASEDMICROSFURACE\nreflectionSamplerLow,\nreflectionSamplerHigh,\n#endif\n#ifdef REALTIME_FILTERING\nvReflectionFilteringInfo,\n#endif\nreflectionOut\n);\n#else\n#define CUSTOM_REFLECTION\n#endif\n#endif\n#include\n#ifdef SHEEN\nsheenOutParams sheenOut;\n#ifdef SHEEN_TEXTURE\nvec4 sheenMapData=texture2D(sheenSampler,vSheenUV+uvOffset);\n#endif\n#if defined(SHEEN_ROUGHNESS) && defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE)\nvec4 sheenMapRoughnessData=texture2D(sheenRoughnessSampler,vSheenRoughnessUV+uvOffset)*vSheenInfos.w;\n#endif\nsheenBlock(\nvSheenColor,\n#ifdef SHEEN_ROUGHNESS\nvSheenRoughness,\n#if defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE)\nsheenMapRoughnessData,\n#endif\n#endif\nroughness,\n#ifdef SHEEN_TEXTURE\nsheenMapData,\nvSheenInfos.y,\n#endif\nreflectance,\n#ifdef SHEEN_LINKWITHALBEDO\nbaseColor,\nsurfaceAlbedo,\n#endif\n#ifdef ENVIRONMENTBRDF\nNdotV,\nenvironmentBrdf,\n#endif\n#if defined(REFLECTION) && defined(ENVIRONMENTBRDF)\nAARoughnessFactors,\nvReflectionMicrosurfaceInfos,\nvReflectionInfos,\nvReflectionColor,\nvLightingIntensity,\nreflectionSampler,\nreflectionOut.reflectionCoords,\nNdotVUnclamped,\n#ifndef LODBASEDMICROSFURACE\nreflectionSamplerLow,\nreflectionSamplerHigh,\n#endif\n#ifdef REALTIME_FILTERING\nvReflectionFilteringInfo,\n#endif\n#if !defined(REFLECTIONMAP_SKYBOX) && defined(RADIANCEOCCLUSION)\nseo,\n#endif\n#if !defined(REFLECTIONMAP_SKYBOX) && defined(HORIZONOCCLUSION) && defined(BUMP) && defined(REFLECTIONMAP_3D)\neho,\n#endif\n#endif\nsheenOut\n);\n#ifdef SHEEN_LINKWITHALBEDO\nsurfaceAlbedo=sheenOut.surfaceAlbedo;\n#endif\n#endif\n#ifdef CLEARCOAT\n#ifdef CLEARCOAT_TEXTURE\nvec2 clearCoatMapData=texture2D(clearCoatSampler,vClearCoatUV+uvOffset).rg*vClearCoatInfos.y;\n#endif\n#endif\n#ifdef IRIDESCENCE\niridescenceOutParams iridescenceOut;\n#ifdef IRIDESCENCE_TEXTURE\nvec2 iridescenceMapData=texture2D(iridescenceSampler,vIridescenceUV+uvOffset).rg*vIridescenceInfos.y;\n#endif\n#ifdef IRIDESCENCE_THICKNESS_TEXTURE\nvec2 iridescenceThicknessMapData=texture2D(iridescenceThicknessSampler,vIridescenceThicknessUV+uvOffset).rg*vIridescenceInfos.w;\n#endif\niridescenceBlock(\nvIridescenceParams,\nNdotV,\nspecularEnvironmentR0,\n#ifdef IRIDESCENCE_TEXTURE\niridescenceMapData,\n#endif\n#ifdef IRIDESCENCE_THICKNESS_TEXTURE\niridescenceThicknessMapData,\n#endif\n#ifdef CLEARCOAT\nNdotVUnclamped,\n#ifdef CLEARCOAT_TEXTURE\nclearCoatMapData,\n#endif\n#endif\niridescenceOut\n);float iridescenceIntensity=iridescenceOut.iridescenceIntensity;specularEnvironmentR0=iridescenceOut.specularEnvironmentR0;\n#endif\nclearcoatOutParams clearcoatOut;\n#ifdef CLEARCOAT\n#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE)\nvec4 clearCoatMapRoughnessData=texture2D(clearCoatRoughnessSampler,vClearCoatRoughnessUV+uvOffset)*vClearCoatInfos.w;\n#endif\n#if defined(CLEARCOAT_TINT) && defined(CLEARCOAT_TINT_TEXTURE)\nvec4 clearCoatTintMapData=texture2D(clearCoatTintSampler,vClearCoatTintUV+uvOffset);\n#endif\n#ifdef CLEARCOAT_BUMP\nvec4 clearCoatBumpMapData=texture2D(clearCoatBumpSampler,vClearCoatBumpUV+uvOffset);\n#endif\nclearcoatBlock(\nvPositionW,\ngeometricNormalW,\nviewDirectionW,\nvClearCoatParams,\n#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE)\nclearCoatMapRoughnessData,\n#endif\nspecularEnvironmentR0,\n#ifdef CLEARCOAT_TEXTURE\nclearCoatMapData,\n#endif\n#ifdef CLEARCOAT_TINT\nvClearCoatTintParams,\nclearCoatColorAtDistance,\nvClearCoatRefractionParams,\n#ifdef CLEARCOAT_TINT_TEXTURE\nclearCoatTintMapData,\n#endif\n#endif\n#ifdef CLEARCOAT_BUMP\nvClearCoatBumpInfos,\nclearCoatBumpMapData,\nvClearCoatBumpUV,\n#if defined(TANGENT) && defined(NORMAL)\nvTBN,\n#else\nvClearCoatTangentSpaceParams,\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\nnormalMatrix,\n#endif\n#endif\n#if defined(FORCENORMALFORWARD) && defined(NORMAL)\nfaceNormal,\n#endif\n#ifdef REFLECTION\nvReflectionMicrosurfaceInfos,\nvReflectionInfos,\nvReflectionColor,\nvLightingIntensity,\nreflectionSampler,\n#ifndef LODBASEDMICROSFURACE\nreflectionSamplerLow,\nreflectionSamplerHigh,\n#endif\n#ifdef REALTIME_FILTERING\nvReflectionFilteringInfo,\n#endif\n#endif\n#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\n#ifdef RADIANCEOCCLUSION\nambientMonochrome,\n#endif\n#endif\n#if defined(CLEARCOAT_BUMP) || defined(TWOSIDEDLIGHTING)\n(gl_FrontFacing ? 1. : -1.),\n#endif\nclearcoatOut\n);\n#else\nclearcoatOut.specularEnvironmentR0=specularEnvironmentR0;\n#endif\n#include\nsubSurfaceOutParams subSurfaceOut;\n#ifdef SUBSURFACE\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nvec4 thicknessMap=texture2D(thicknessSampler,vThicknessUV+uvOffset);\n#endif\n#ifdef SS_REFRACTIONINTENSITY_TEXTURE\nvec4 refractionIntensityMap=texture2D(refractionIntensitySampler,vRefractionIntensityUV+uvOffset);\n#endif\n#ifdef SS_TRANSLUCENCYINTENSITY_TEXTURE\nvec4 translucencyIntensityMap=texture2D(translucencyIntensitySampler,vTranslucencyIntensityUV+uvOffset);\n#endif\nsubSurfaceBlock(\nvSubSurfaceIntensity,\nvThicknessParam,\nvTintColor,\nnormalW,\nspecularEnvironmentReflectance,\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nthicknessMap,\n#endif\n#ifdef SS_REFRACTIONINTENSITY_TEXTURE\nrefractionIntensityMap,\n#endif\n#ifdef SS_TRANSLUCENCYINTENSITY_TEXTURE\ntranslucencyIntensityMap,\n#endif\n#ifdef REFLECTION\n#ifdef SS_TRANSLUCENCY\nreflectionMatrix,\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX)\nreflectionOut.irradianceVector,\n#endif\n#if defined(REALTIME_FILTERING)\nreflectionSampler,\nvReflectionFilteringInfo,\n#endif\n#endif\n#ifdef USEIRRADIANCEMAP\nirradianceSampler,\n#endif\n#endif\n#endif\n#if defined(SS_REFRACTION) || defined(SS_TRANSLUCENCY)\nsurfaceAlbedo,\n#endif\n#ifdef SS_REFRACTION\nvPositionW,\nviewDirectionW,\nview,\nvRefractionInfos,\nrefractionMatrix,\nvRefractionMicrosurfaceInfos,\nvLightingIntensity,\n#ifdef SS_LINKREFRACTIONTOTRANSPARENCY\nalpha,\n#endif\n#ifdef SS_LODINREFRACTIONALPHA\nNdotVUnclamped,\n#endif\n#ifdef SS_LINEARSPECULARREFRACTION\nroughness,\n#endif\nalphaG,\nrefractionSampler,\n#ifndef LODBASEDMICROSFURACE\nrefractionSamplerLow,\nrefractionSamplerHigh,\n#endif\n#ifdef ANISOTROPIC\nanisotropicOut,\n#endif\n#ifdef REALTIME_FILTERING\nvRefractionFilteringInfo,\n#endif\n#ifdef SS_USE_LOCAL_REFRACTIONMAP_CUBIC\nvRefractionPosition,\nvRefractionSize,\n#endif\n#endif\n#ifdef SS_TRANSLUCENCY\nvDiffusionDistance,\n#endif\nsubSurfaceOut\n);\n#ifdef SS_REFRACTION\nsurfaceAlbedo=subSurfaceOut.surfaceAlbedo;\n#ifdef SS_LINKREFRACTIONTOTRANSPARENCY\nalpha=subSurfaceOut.alpha;\n#endif\n#endif\n#else\nsubSurfaceOut.specularEnvironmentReflectance=specularEnvironmentReflectance;\n#endif\n#include\n#include[0..maxSimultaneousLights]\n#include\n#endif \n#include\n#define CUSTOM_FRAGMENT_BEFORE_FINALCOLORCOMPOSITION\n#include\n#include\n#include(color,finalColor)\n#include\n#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR\n#ifdef PREPASS\nfloat writeGeometryInfo=finalColor.a>0.4 ? 1.0 : 0.0;\n#ifdef PREPASS_POSITION\ngl_FragData[PREPASS_POSITION_INDEX]=vec4(vPositionW,writeGeometryInfo);\n#endif\n#ifdef PREPASS_VELOCITY\nvec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5;vec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5;vec2 velocity=abs(a-b);velocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5;gl_FragData[PREPASS_VELOCITY_INDEX]=vec4(velocity,0.0,writeGeometryInfo);\n#endif\n#ifdef PREPASS_ALBEDO_SQRT\nvec3 sqAlbedo=sqrt(surfaceAlbedo); \n#endif\n#ifdef PREPASS_IRRADIANCE\nvec3 irradiance=finalDiffuse;\n#ifndef UNLIT\n#ifdef REFLECTION\nirradiance+=finalIrradiance;\n#endif\n#endif\n#ifdef SS_SCATTERING\ngl_FragData[0]=vec4(finalColor.rgb-irradiance,finalColor.a); \nirradiance/=sqAlbedo;\n#else\ngl_FragData[0]=finalColor; \nfloat scatteringDiffusionProfile=255.;\n#endif\ngl_FragData[PREPASS_IRRADIANCE_INDEX]=vec4(clamp(irradiance,vec3(0.),vec3(1.)),writeGeometryInfo*scatteringDiffusionProfile/255.); \n#else\ngl_FragData[0]=vec4(finalColor.rgb,finalColor.a);\n#endif\n#ifdef PREPASS_DEPTH\ngl_FragData[PREPASS_DEPTH_INDEX]=vec4(vViewPos.z,0.0,0.0,writeGeometryInfo); \n#endif\n#ifdef PREPASS_NORMAL\n#ifdef PREPASS_NORMAL_WORLDSPACE\ngl_FragData[PREPASS_NORMAL_INDEX]=vec4(normalW,writeGeometryInfo); \n#else\ngl_FragData[PREPASS_NORMAL_INDEX]=vec4(normalize((view*vec4(normalW,0.0)).rgb),writeGeometryInfo); \n#endif\n#endif\n#ifdef PREPASS_ALBEDO_SQRT\ngl_FragData[PREPASS_ALBEDO_SQRT_INDEX]=vec4(sqAlbedo,writeGeometryInfo); \n#endif\n#ifdef PREPASS_REFLECTIVITY\n#ifndef UNLIT\ngl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4(specularEnvironmentR0,microSurface)*writeGeometryInfo;\n#else\ngl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4( 0.0,0.0,0.0,1.0 )*writeGeometryInfo;\n#endif\n#endif\n#endif\n#if !defined(PREPASS) || defined(WEBGL2)\ngl_FragColor=finalColor;\n#endif\n#include\n#if ORDER_INDEPENDENT_TRANSPARENCY\nif (fragDepth==nearestDepth) {frontColor.rgb+=finalColor.rgb*finalColor.a*alphaMultiplier;frontColor.a=1.0-alphaMultiplier*(1.0-finalColor.a);} else {backColor+=finalColor;}\n#endif\n#include\n#define CUSTOM_FRAGMENT_MAIN_END\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const pbrPixelShader = { name, shader };\n//# sourceMappingURL=pbr.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"decalVertexDeclaration\";\nconst shader = `#ifdef DECAL\nuniform vec4 vDecalInfos;uniform mat4 decalMatrix;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const decalVertexDeclaration = { name, shader };\n//# sourceMappingURL=decalVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./decalVertexDeclaration.js\";\nconst name = \"pbrVertexDeclaration\";\nconst shader = `uniform mat4 view;uniform mat4 viewProjection;\n#ifdef ALBEDO\nuniform mat4 albedoMatrix;uniform vec2 vAlbedoInfos;\n#endif\n#ifdef AMBIENT\nuniform mat4 ambientMatrix;uniform vec4 vAmbientInfos;\n#endif\n#ifdef OPACITY\nuniform mat4 opacityMatrix;uniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;uniform mat4 emissiveMatrix;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;uniform mat4 lightmapMatrix;\n#endif\n#ifdef REFLECTIVITY \nuniform vec3 vReflectivityInfos;uniform mat4 reflectivityMatrix;\n#endif\n#ifdef METALLIC_REFLECTANCE\nuniform vec2 vMetallicReflectanceInfos;uniform mat4 metallicReflectanceMatrix;\n#endif\n#ifdef REFLECTANCE\nuniform vec2 vReflectanceInfos;uniform mat4 reflectanceMatrix;\n#endif\n#ifdef MICROSURFACEMAP\nuniform vec2 vMicroSurfaceSamplerInfos;uniform mat4 microSurfaceSamplerMatrix;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;uniform mat4 bumpMatrix;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;uniform mat4 reflectionMatrix;\n#endif\n#ifdef CLEARCOAT\n#if defined(CLEARCOAT_TEXTURE) || defined(CLEARCOAT_TEXTURE_ROUGHNESS)\nuniform vec4 vClearCoatInfos;\n#endif\n#ifdef CLEARCOAT_TEXTURE\nuniform mat4 clearCoatMatrix;\n#endif\n#ifdef CLEARCOAT_TEXTURE_ROUGHNESS\nuniform mat4 clearCoatRoughnessMatrix;\n#endif\n#ifdef CLEARCOAT_BUMP\nuniform vec2 vClearCoatBumpInfos;uniform mat4 clearCoatBumpMatrix;\n#endif\n#ifdef CLEARCOAT_TINT_TEXTURE\nuniform vec2 vClearCoatTintInfos;uniform mat4 clearCoatTintMatrix;\n#endif\n#endif\n#ifdef IRIDESCENCE\n#if defined(IRIDESCENCE_TEXTURE) || defined(IRIDESCENCE_THICKNESS_TEXTURE)\nuniform vec4 vIridescenceInfos;\n#endif\n#ifdef IRIDESCENCE_TEXTURE\nuniform mat4 iridescenceMatrix;\n#endif\n#ifdef IRIDESCENCE_THICKNESS_TEXTURE\nuniform mat4 iridescenceThicknessMatrix;\n#endif\n#endif\n#ifdef ANISOTROPIC\n#ifdef ANISOTROPIC_TEXTURE\nuniform vec2 vAnisotropyInfos;uniform mat4 anisotropyMatrix;\n#endif\n#endif\n#ifdef SHEEN\n#if defined(SHEEN_TEXTURE) || defined(SHEEN_TEXTURE_ROUGHNESS)\nuniform vec4 vSheenInfos;\n#endif\n#ifdef SHEEN_TEXTURE\nuniform mat4 sheenMatrix;\n#endif\n#ifdef SHEEN_TEXTURE_ROUGHNESS\nuniform mat4 sheenRoughnessMatrix;\n#endif\n#endif\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\nuniform vec4 vRefractionInfos;uniform mat4 refractionMatrix;\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nuniform vec2 vThicknessInfos;uniform mat4 thicknessMatrix;\n#endif\n#ifdef SS_REFRACTIONINTENSITY_TEXTURE\nuniform vec2 vRefractionIntensityInfos;uniform mat4 refractionIntensityMatrix;\n#endif\n#ifdef SS_TRANSLUCENCYINTENSITY_TEXTURE\nuniform vec2 vTranslucencyIntensityInfos;uniform mat4 translucencyIntensityMatrix;\n#endif\n#endif\n#ifdef NORMAL\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#ifdef SPHERICAL_HARMONICS\nuniform vec3 vSphericalL00;uniform vec3 vSphericalL1_1;uniform vec3 vSphericalL10;uniform vec3 vSphericalL11;uniform vec3 vSphericalL2_2;uniform vec3 vSphericalL2_1;uniform vec3 vSphericalL20;uniform vec3 vSphericalL21;uniform vec3 vSphericalL22;\n#else\nuniform vec3 vSphericalX;uniform vec3 vSphericalY;uniform vec3 vSphericalZ;uniform vec3 vSphericalXX_ZZ;uniform vec3 vSphericalYY_ZZ;uniform vec3 vSphericalZZ;uniform vec3 vSphericalXY;uniform vec3 vSphericalYZ;uniform vec3 vSphericalZX;\n#endif\n#endif\n#endif\n#endif\n#ifdef DETAIL\nuniform vec4 vDetailInfos;uniform mat4 detailMatrix;\n#endif\n#include\n#define ADDITIONAL_VERTEX_DECLARATION\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrVertexDeclaration = { name, shader };\n//# sourceMappingURL=pbrVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"uvAttributeDeclaration\";\nconst shader = `#ifdef UV{X}\nattribute vec2 uv{X};\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const uvAttributeDeclaration = { name, shader };\n//# sourceMappingURL=uvAttributeDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"prePassVertexDeclaration\";\nconst shader = `#ifdef PREPASS\n#ifdef PREPASS_DEPTH\nvarying vec3 vViewPos;\n#endif\n#ifdef PREPASS_VELOCITY\nuniform mat4 previousViewProjection;varying vec4 vCurrentPosition;varying vec4 vPreviousPosition;\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const prePassVertexDeclaration = { name, shader };\n//# sourceMappingURL=prePassVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"samplerVertexDeclaration\";\nconst shader = `#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0\nvarying vec2 v_VARYINGNAME_UV;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const samplerVertexDeclaration = { name, shader };\n//# sourceMappingURL=samplerVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"bumpVertexDeclaration\";\nconst shader = `#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)\n#if defined(TANGENT) && defined(NORMAL) \nvarying mat3 vTBN;\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const bumpVertexDeclaration = { name, shader };\n//# sourceMappingURL=bumpVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"lightVxFragmentDeclaration\";\nconst shader = `#ifdef LIGHT{X}\nuniform vec4 vLightData{X};uniform vec4 vLightDiffuse{X};\n#ifdef SPECULARTERM\nuniform vec4 vLightSpecular{X};\n#else\nvec4 vLightSpecular{X}=vec4(0.);\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};\n#endif\nuniform vec4 shadowsInfo{X};uniform vec2 depthValues{X};\n#endif\n#ifdef SPOTLIGHT{X}\nuniform vec4 vLightDirection{X};uniform vec4 vLightFalloff{X};\n#elif defined(POINTLIGHT{X})\nuniform vec4 vLightFalloff{X};\n#elif defined(HEMILIGHT{X})\nuniform vec3 vLightGround{X};\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const lightVxFragmentDeclaration = { name, shader };\n//# sourceMappingURL=lightVxFragmentDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"lightVxUboDeclaration\";\nconst shader = `#ifdef LIGHT{X}\nuniform Light{X}\n{vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular;\n#ifdef SPOTLIGHT{X}\nvec4 vLightDirection;vec4 vLightFalloff;\n#elif defined(POINTLIGHT{X})\nvec4 vLightFalloff;\n#elif defined(HEMILIGHT{X})\nvec3 vLightGround;\n#endif\nvec4 shadowsInfo;vec2 depthValues;} light{X};\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};\n#endif\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const lightVxUboDeclaration = { name, shader };\n//# sourceMappingURL=lightVxUboDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"prePassVertex\";\nconst shader = `#ifdef PREPASS_DEPTH\nvViewPos=(view*worldPos).rgb;\n#endif\n#if defined(PREPASS_VELOCITY) && defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*worldPos;\n#if NUM_BONE_INFLUENCERS>0\nmat4 previousInfluence;previousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\npreviousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1];\n#endif \n#if NUM_BONE_INFLUENCERS>2\npreviousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2];\n#endif \n#if NUM_BONE_INFLUENCERS>3\npreviousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];\n#endif \n#if NUM_BONE_INFLUENCERS>5\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];\n#endif \n#if NUM_BONE_INFLUENCERS>6\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];\n#endif \n#if NUM_BONE_INFLUENCERS>7\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];\n#endif\nvPreviousPosition=previousViewProjection*finalPreviousWorld*previousInfluence*vec4(positionUpdated,1.0);\n#else\nvPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const prePassVertex = { name, shader };\n//# sourceMappingURL=prePassVertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"uvVariableDeclaration\";\nconst shader = `#if !defined(UV{X}) && defined(MAINUV{X})\nvec2 uv{X}=vec2(0.,0.);\n#endif\n#ifdef MAINUV{X}\nvMainUV{X}=uv{X};\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const uvVariableDeclaration = { name, shader };\n//# sourceMappingURL=uvVariableDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"samplerVertexImplementation\";\nconst shader = `#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0\nif (v_INFONAME_==0.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uvUpdated,1.0,0.0));}\n#ifdef UV2\nelse if (v_INFONAME_==1.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv2,1.0,0.0));}\n#endif\n#ifdef UV3\nelse if (v_INFONAME_==2.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv3,1.0,0.0));}\n#endif\n#ifdef UV4\nelse if (v_INFONAME_==3.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv4,1.0,0.0));}\n#endif\n#ifdef UV5\nelse if (v_INFONAME_==4.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv5,1.0,0.0));}\n#endif\n#ifdef UV6\nelse if (v_INFONAME_==5.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv6,1.0,0.0));}\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const samplerVertexImplementation = { name, shader };\n//# sourceMappingURL=samplerVertexImplementation.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"bumpVertex\";\nconst shader = `#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)\n#if defined(TANGENT) && defined(NORMAL)\nvec3 tbnNormal=normalize(normalUpdated);vec3 tbnTangent=normalize(tangentUpdated.xyz);vec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w;vTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal);\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const bumpVertex = { name, shader };\n//# sourceMappingURL=bumpVertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"vertexColorMixing\";\nconst shader = `#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvColor=vec4(1.0);\n#ifdef VERTEXCOLOR\n#ifdef VERTEXALPHA\nvColor*=color;\n#else\nvColor.rgb*=color.rgb;\n#endif\n#endif\n#ifdef INSTANCESCOLOR\nvColor*=instanceColor;\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const vertexColorMixing = { name, shader };\n//# sourceMappingURL=vertexColorMixing.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"logDepthVertex\";\nconst shader = `#ifdef LOGARITHMICDEPTH\nvFragmentDepth=1.0+gl_Position.w;gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const logDepthVertex = { name, shader };\n//# sourceMappingURL=logDepthVertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/pbrVertexDeclaration.js\";\nimport \"./ShadersInclude/pbrUboDeclaration.js\";\nimport \"./ShadersInclude/uvAttributeDeclaration.js\";\nimport \"./ShadersInclude/mainUVVaryingDeclaration.js\";\nimport \"./ShadersInclude/helperFunctions.js\";\nimport \"./ShadersInclude/bonesDeclaration.js\";\nimport \"./ShadersInclude/bakedVertexAnimationDeclaration.js\";\nimport \"./ShadersInclude/instancesDeclaration.js\";\nimport \"./ShadersInclude/prePassVertexDeclaration.js\";\nimport \"./ShadersInclude/samplerVertexDeclaration.js\";\nimport \"./ShadersInclude/harmonicsFunctions.js\";\nimport \"./ShadersInclude/bumpVertexDeclaration.js\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration.js\";\nimport \"./ShadersInclude/fogVertexDeclaration.js\";\nimport \"./ShadersInclude/lightVxFragmentDeclaration.js\";\nimport \"./ShadersInclude/lightVxUboDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexGlobalDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexDeclaration.js\";\nimport \"./ShadersInclude/logDepthDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexGlobal.js\";\nimport \"./ShadersInclude/morphTargetsVertex.js\";\nimport \"./ShadersInclude/instancesVertex.js\";\nimport \"./ShadersInclude/bonesVertex.js\";\nimport \"./ShadersInclude/bakedVertexAnimation.js\";\nimport \"./ShadersInclude/prePassVertex.js\";\nimport \"./ShadersInclude/uvVariableDeclaration.js\";\nimport \"./ShadersInclude/samplerVertexImplementation.js\";\nimport \"./ShadersInclude/bumpVertex.js\";\nimport \"./ShadersInclude/clipPlaneVertex.js\";\nimport \"./ShadersInclude/fogVertex.js\";\nimport \"./ShadersInclude/shadowsVertex.js\";\nimport \"./ShadersInclude/vertexColorMixing.js\";\nimport \"./ShadersInclude/logDepthVertex.js\";\nconst name = \"pbrVertexShader\";\nconst shader = `precision highp float;\n#include<__decl__pbrVertex>\n#define CUSTOM_VERTEX_BEGIN\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef TANGENT\nattribute vec4 tangent;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#include[2..7]\n#include[1..7]\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n#include\n#include\n#include\n#include\n#include(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo)\n#include(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)\n#include(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient)\n#include(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity)\n#include(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive)\n#include(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap)\n#include(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity)\n#include(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler)\n#include(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance)\n#include(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance)\n#include(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump)\n#include(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)\n#ifdef CLEARCOAT\n#include(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat)\n#include(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness)\n#include(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump)\n#include(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint)\n#endif\n#ifdef IRIDESCENCE\n#include(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence)\n#include(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness)\n#endif\n#ifdef SHEEN\n#include(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen)\n#include(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness)\n#endif\n#ifdef ANISOTROPIC\n#include(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy)\n#endif\n#ifdef SUBSURFACE\n#include(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness)\n#include(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity)\n#include(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity)\n#endif\nvarying vec3 vPositionW;\n#if DEBUGMODE>0\nvarying vec4 vClipSpacePosition;\n#endif\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvarying vec3 vEnvironmentIrradiance;\n#include\n#endif\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include\n#include<__decl__lightVxFragment>[0..maxSimultaneousLights]\n#include\n#include[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec3 positionUpdated=position;\n#ifdef NORMAL\nvec3 normalUpdated=normal;\n#endif\n#ifdef TANGENT\nvec4 tangentUpdated=tangent;\n#endif\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include\n#include[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvPositionUVW=positionUpdated;\n#endif\n#define CUSTOM_VERTEX_UPDATE_POSITION\n#define CUSTOM_VERTEX_UPDATE_NORMAL\n#include\n#if defined(PREPASS) && defined(PREPASS_VELOCITY) && !defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);\n#endif\n#include\n#include\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);vPositionW=vec3(worldPos);\n#include\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#if defined(INSTANCES) && defined(THIN_INSTANCES)\nvNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vNormalW=normalize(normalWorld*vNormalW);\n#else\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normalUpdated);\n#endif\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvec3 reflectionVector=vec3(reflectionMatrix*vec4(vNormalW,0)).xyz;\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\nvEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector);\n#endif\n#endif\n#define CUSTOM_VERTEX_UPDATE_WORLDPOS\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;}\n#else\ngl_Position=viewProjection*worldPos;\n#endif\n#if DEBUGMODE>0\nvClipSpacePosition=gl_Position;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));\n#endif\n#ifndef UV1\nvec2 uvUpdated=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uvUpdated;\n#endif\n#include[2..7]\n#include(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo,_MATRIXNAME_,albedo,_INFONAME_,AlbedoInfos.x)\n#include(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)\n#include(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x)\n#include(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x)\n#include(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x)\n#include(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x)\n#include(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity,_MATRIXNAME_,reflectivity,_INFONAME_,ReflectivityInfos.x)\n#include(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler,_MATRIXNAME_,microSurfaceSampler,_INFONAME_,MicroSurfaceSamplerInfos.x)\n#include(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance,_MATRIXNAME_,metallicReflectance,_INFONAME_,MetallicReflectanceInfos.x)\n#include(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance,_MATRIXNAME_,reflectance,_INFONAME_,ReflectanceInfos.x)\n#include(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x)\n#include(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)\n#ifdef CLEARCOAT\n#include(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat,_MATRIXNAME_,clearCoat,_INFONAME_,ClearCoatInfos.x)\n#include(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness,_MATRIXNAME_,clearCoatRoughness,_INFONAME_,ClearCoatInfos.z)\n#include(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump,_MATRIXNAME_,clearCoatBump,_INFONAME_,ClearCoatBumpInfos.x)\n#include(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint,_MATRIXNAME_,clearCoatTint,_INFONAME_,ClearCoatTintInfos.x)\n#endif\n#ifdef IRIDESCENCE\n#include(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence,_MATRIXNAME_,iridescence,_INFONAME_,IridescenceInfos.x)\n#include(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness,_MATRIXNAME_,iridescenceThickness,_INFONAME_,IridescenceInfos.z)\n#endif\n#ifdef SHEEN\n#include(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen,_MATRIXNAME_,sheen,_INFONAME_,SheenInfos.x)\n#include(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness,_MATRIXNAME_,sheen,_INFONAME_,SheenInfos.z)\n#endif\n#ifdef ANISOTROPIC\n#include(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy,_MATRIXNAME_,anisotropy,_INFONAME_,AnisotropyInfos.x)\n#endif\n#ifdef SUBSURFACE\n#include(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness,_MATRIXNAME_,thickness,_INFONAME_,ThicknessInfos.x)\n#include(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity,_MATRIXNAME_,refractionIntensity,_INFONAME_,RefractionIntensityInfos.x)\n#include(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity,_MATRIXNAME_,translucencyIntensity,_INFONAME_,TranslucencyIntensityInfos.x)\n#endif\n#include\n#include\n#include\n#include[0..maxSimultaneousLights]\n#include\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#include\n#define CUSTOM_VERTEX_MAIN_END\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const pbrVertexShader = { name, shader };\n//# sourceMappingURL=pbr.vertex.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize, serializeAsTexture, expandToProperty, serializeAsColor3 } from \"../../Misc/decorators.js\";\nimport { Color3 } from \"../../Maths/math.color.js\";\nimport { MaterialFlags } from \"../materialFlags.js\";\nimport { MaterialHelper } from \"../../Materials/materialHelper.js\";\n\nimport { MaterialPluginBase } from \"../materialPluginBase.js\";\nimport { MaterialDefines } from \"../materialDefines.js\";\n/**\n * @internal\n */\nexport class MaterialClearCoatDefines extends MaterialDefines {\n constructor() {\n super(...arguments);\n this.CLEARCOAT = false;\n this.CLEARCOAT_DEFAULTIOR = false;\n this.CLEARCOAT_TEXTURE = false;\n this.CLEARCOAT_TEXTURE_ROUGHNESS = false;\n this.CLEARCOAT_TEXTUREDIRECTUV = 0;\n this.CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV = 0;\n this.CLEARCOAT_BUMP = false;\n this.CLEARCOAT_BUMPDIRECTUV = 0;\n this.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE = false;\n this.CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL = false;\n this.CLEARCOAT_REMAP_F0 = false;\n this.CLEARCOAT_TINT = false;\n this.CLEARCOAT_TINT_TEXTURE = false;\n this.CLEARCOAT_TINT_TEXTUREDIRECTUV = 0;\n this.CLEARCOAT_TINT_GAMMATEXTURE = false;\n }\n}\n/**\n * Plugin that implements the clear coat component of the PBR material\n */\nexport class PBRClearCoatConfiguration extends MaterialPluginBase {\n /** @internal */\n _markAllSubMeshesAsTexturesDirty() {\n this._enable(this._isEnabled);\n this._internalMarkAllSubMeshesAsTexturesDirty();\n }\n constructor(material, addToPluginList = true) {\n super(material, \"PBRClearCoat\", 100, new MaterialClearCoatDefines(), addToPluginList);\n this._isEnabled = false;\n /**\n * Defines if the clear coat is enabled in the material.\n */\n this.isEnabled = false;\n /**\n * Defines the clear coat layer strength (between 0 and 1) it defaults to 1.\n */\n this.intensity = 1;\n /**\n * Defines the clear coat layer roughness.\n */\n this.roughness = 0;\n this._indexOfRefraction = PBRClearCoatConfiguration._DefaultIndexOfRefraction;\n /**\n * Defines the index of refraction of the clear coat.\n * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence\n * The default fits with a polyurethane material.\n * Changing the default value is more performance intensive.\n */\n this.indexOfRefraction = PBRClearCoatConfiguration._DefaultIndexOfRefraction;\n this._texture = null;\n /**\n * Stores the clear coat values in a texture (red channel is intensity and green channel is roughness)\n * If useRoughnessFromMainTexture is false, the green channel of texture is not used and the green channel of textureRoughness is used instead\n * if textureRoughness is not empty, else no texture roughness is used\n */\n this.texture = null;\n this._useRoughnessFromMainTexture = true;\n /**\n * Indicates that the green channel of the texture property will be used for roughness (default: true)\n * If false, the green channel from textureRoughness is used for roughness\n */\n this.useRoughnessFromMainTexture = true;\n this._textureRoughness = null;\n /**\n * Stores the clear coat roughness in a texture (green channel)\n * Not used if useRoughnessFromMainTexture is true\n */\n this.textureRoughness = null;\n this._remapF0OnInterfaceChange = true;\n /**\n * Defines if the F0 value should be remapped to account for the interface change in the material.\n */\n this.remapF0OnInterfaceChange = true;\n this._bumpTexture = null;\n /**\n * Define the clear coat specific bump texture.\n */\n this.bumpTexture = null;\n this._isTintEnabled = false;\n /**\n * Defines if the clear coat tint is enabled in the material.\n */\n this.isTintEnabled = false;\n /**\n * Defines the clear coat tint of the material.\n * This is only use if tint is enabled\n */\n this.tintColor = Color3.White();\n /**\n * Defines the distance at which the tint color should be found in the\n * clear coat media.\n * This is only use if tint is enabled\n */\n this.tintColorAtDistance = 1;\n /**\n * Defines the clear coat layer thickness.\n * This is only use if tint is enabled\n */\n this.tintThickness = 1;\n this._tintTexture = null;\n /**\n * Stores the clear tint values in a texture.\n * rgb is tint\n * a is a thickness factor\n */\n this.tintTexture = null;\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];\n }\n isReadyForSubMesh(defines, scene, engine) {\n if (!this._isEnabled) {\n return true;\n }\n const disableBumpMap = this._material._disableBumpMap;\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.ClearCoatTextureEnabled) {\n if (!this._texture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (this._textureRoughness && MaterialFlags.ClearCoatTextureEnabled) {\n if (!this._textureRoughness.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (engine.getCaps().standardDerivatives && this._bumpTexture && MaterialFlags.ClearCoatBumpTextureEnabled && !disableBumpMap) {\n // Bump texture cannot be not blocking.\n if (!this._bumpTexture.isReady()) {\n return false;\n }\n }\n if (this._isTintEnabled && this._tintTexture && MaterialFlags.ClearCoatTintTextureEnabled) {\n if (!this._tintTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n }\n }\n return true;\n }\n prepareDefinesBeforeAttributes(defines, scene) {\n var _a;\n if (this._isEnabled) {\n defines.CLEARCOAT = true;\n defines.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE = this._useRoughnessFromMainTexture;\n defines.CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL =\n this._texture !== null && this._texture._texture === ((_a = this._textureRoughness) === null || _a === void 0 ? void 0 : _a._texture) && this._texture.checkTransformsAreIdentical(this._textureRoughness);\n defines.CLEARCOAT_REMAP_F0 = this._remapF0OnInterfaceChange;\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.ClearCoatTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._texture, defines, \"CLEARCOAT_TEXTURE\");\n }\n else {\n defines.CLEARCOAT_TEXTURE = false;\n }\n if (this._textureRoughness && MaterialFlags.ClearCoatTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._textureRoughness, defines, \"CLEARCOAT_TEXTURE_ROUGHNESS\");\n }\n else {\n defines.CLEARCOAT_TEXTURE_ROUGHNESS = false;\n }\n if (this._bumpTexture && MaterialFlags.ClearCoatBumpTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._bumpTexture, defines, \"CLEARCOAT_BUMP\");\n }\n else {\n defines.CLEARCOAT_BUMP = false;\n }\n defines.CLEARCOAT_DEFAULTIOR = this._indexOfRefraction === PBRClearCoatConfiguration._DefaultIndexOfRefraction;\n if (this._isTintEnabled) {\n defines.CLEARCOAT_TINT = true;\n if (this._tintTexture && MaterialFlags.ClearCoatTintTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._tintTexture, defines, \"CLEARCOAT_TINT_TEXTURE\");\n defines.CLEARCOAT_TINT_GAMMATEXTURE = this._tintTexture.gammaSpace;\n }\n else {\n defines.CLEARCOAT_TINT_TEXTURE = false;\n }\n }\n else {\n defines.CLEARCOAT_TINT = false;\n defines.CLEARCOAT_TINT_TEXTURE = false;\n }\n }\n }\n }\n else {\n defines.CLEARCOAT = false;\n defines.CLEARCOAT_TEXTURE = false;\n defines.CLEARCOAT_TEXTURE_ROUGHNESS = false;\n defines.CLEARCOAT_BUMP = false;\n defines.CLEARCOAT_TINT = false;\n defines.CLEARCOAT_TINT_TEXTURE = false;\n defines.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE = false;\n defines.CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL = false;\n defines.CLEARCOAT_DEFAULTIOR = false;\n defines.CLEARCOAT_TEXTUREDIRECTUV = 0;\n defines.CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV = 0;\n defines.CLEARCOAT_BUMPDIRECTUV = 0;\n defines.CLEARCOAT_REMAP_F0 = false;\n defines.CLEARCOAT_TINT_TEXTUREDIRECTUV = 0;\n defines.CLEARCOAT_TINT_GAMMATEXTURE = false;\n }\n }\n bindForSubMesh(uniformBuffer, scene, engine, subMesh) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (!this._isEnabled) {\n return;\n }\n const defines = subMesh.materialDefines;\n const isFrozen = this._material.isFrozen;\n const disableBumpMap = this._material._disableBumpMap;\n const invertNormalMapX = this._material._invertNormalMapX;\n const invertNormalMapY = this._material._invertNormalMapY;\n const identicalTextures = defines.CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL;\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\n if (identicalTextures && MaterialFlags.ClearCoatTextureEnabled) {\n uniformBuffer.updateFloat4(\"vClearCoatInfos\", this._texture.coordinatesIndex, this._texture.level, -1, -1);\n MaterialHelper.BindTextureMatrix(this._texture, uniformBuffer, \"clearCoat\");\n }\n else if ((this._texture || this._textureRoughness) && MaterialFlags.ClearCoatTextureEnabled) {\n uniformBuffer.updateFloat4(\"vClearCoatInfos\", (_b = (_a = this._texture) === null || _a === void 0 ? void 0 : _a.coordinatesIndex) !== null && _b !== void 0 ? _b : 0, (_d = (_c = this._texture) === null || _c === void 0 ? void 0 : _c.level) !== null && _d !== void 0 ? _d : 0, (_f = (_e = this._textureRoughness) === null || _e === void 0 ? void 0 : _e.coordinatesIndex) !== null && _f !== void 0 ? _f : 0, (_h = (_g = this._textureRoughness) === null || _g === void 0 ? void 0 : _g.level) !== null && _h !== void 0 ? _h : 0);\n if (this._texture) {\n MaterialHelper.BindTextureMatrix(this._texture, uniformBuffer, \"clearCoat\");\n }\n if (this._textureRoughness && !identicalTextures && !defines.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE) {\n MaterialHelper.BindTextureMatrix(this._textureRoughness, uniformBuffer, \"clearCoatRoughness\");\n }\n }\n if (this._bumpTexture && engine.getCaps().standardDerivatives && MaterialFlags.ClearCoatTextureEnabled && !disableBumpMap) {\n uniformBuffer.updateFloat2(\"vClearCoatBumpInfos\", this._bumpTexture.coordinatesIndex, this._bumpTexture.level);\n MaterialHelper.BindTextureMatrix(this._bumpTexture, uniformBuffer, \"clearCoatBump\");\n if (scene._mirroredCameraPosition) {\n uniformBuffer.updateFloat2(\"vClearCoatTangentSpaceParams\", invertNormalMapX ? 1.0 : -1.0, invertNormalMapY ? 1.0 : -1.0);\n }\n else {\n uniformBuffer.updateFloat2(\"vClearCoatTangentSpaceParams\", invertNormalMapX ? -1.0 : 1.0, invertNormalMapY ? -1.0 : 1.0);\n }\n }\n if (this._tintTexture && MaterialFlags.ClearCoatTintTextureEnabled) {\n uniformBuffer.updateFloat2(\"vClearCoatTintInfos\", this._tintTexture.coordinatesIndex, this._tintTexture.level);\n MaterialHelper.BindTextureMatrix(this._tintTexture, uniformBuffer, \"clearCoatTint\");\n }\n // Clear Coat General params\n uniformBuffer.updateFloat2(\"vClearCoatParams\", this.intensity, this.roughness);\n // Clear Coat Refraction params\n const a = 1 - this._indexOfRefraction;\n const b = 1 + this._indexOfRefraction;\n const f0 = Math.pow(-a / b, 2); // Schlicks approx: (ior1 - ior2) / (ior1 + ior2) where ior2 for air is close to vacuum = 1.\n const eta = 1 / this._indexOfRefraction;\n uniformBuffer.updateFloat4(\"vClearCoatRefractionParams\", f0, eta, a, b);\n if (this._isTintEnabled) {\n uniformBuffer.updateFloat4(\"vClearCoatTintParams\", this.tintColor.r, this.tintColor.g, this.tintColor.b, Math.max(0.00001, this.tintThickness));\n uniformBuffer.updateFloat(\"clearCoatColorAtDistance\", Math.max(0.00001, this.tintColorAtDistance));\n }\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.ClearCoatTextureEnabled) {\n uniformBuffer.setTexture(\"clearCoatSampler\", this._texture);\n }\n if (this._textureRoughness && !identicalTextures && !defines.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE && MaterialFlags.ClearCoatTextureEnabled) {\n uniformBuffer.setTexture(\"clearCoatRoughnessSampler\", this._textureRoughness);\n }\n if (this._bumpTexture && engine.getCaps().standardDerivatives && MaterialFlags.ClearCoatBumpTextureEnabled && !disableBumpMap) {\n uniformBuffer.setTexture(\"clearCoatBumpSampler\", this._bumpTexture);\n }\n if (this._isTintEnabled && this._tintTexture && MaterialFlags.ClearCoatTintTextureEnabled) {\n uniformBuffer.setTexture(\"clearCoatTintSampler\", this._tintTexture);\n }\n }\n }\n hasTexture(texture) {\n if (this._texture === texture) {\n return true;\n }\n if (this._textureRoughness === texture) {\n return true;\n }\n if (this._bumpTexture === texture) {\n return true;\n }\n if (this._tintTexture === texture) {\n return true;\n }\n return false;\n }\n getActiveTextures(activeTextures) {\n if (this._texture) {\n activeTextures.push(this._texture);\n }\n if (this._textureRoughness) {\n activeTextures.push(this._textureRoughness);\n }\n if (this._bumpTexture) {\n activeTextures.push(this._bumpTexture);\n }\n if (this._tintTexture) {\n activeTextures.push(this._tintTexture);\n }\n }\n getAnimatables(animatables) {\n if (this._texture && this._texture.animations && this._texture.animations.length > 0) {\n animatables.push(this._texture);\n }\n if (this._textureRoughness && this._textureRoughness.animations && this._textureRoughness.animations.length > 0) {\n animatables.push(this._textureRoughness);\n }\n if (this._bumpTexture && this._bumpTexture.animations && this._bumpTexture.animations.length > 0) {\n animatables.push(this._bumpTexture);\n }\n if (this._tintTexture && this._tintTexture.animations && this._tintTexture.animations.length > 0) {\n animatables.push(this._tintTexture);\n }\n }\n dispose(forceDisposeTextures) {\n var _a, _b, _c, _d;\n if (forceDisposeTextures) {\n (_a = this._texture) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._textureRoughness) === null || _b === void 0 ? void 0 : _b.dispose();\n (_c = this._bumpTexture) === null || _c === void 0 ? void 0 : _c.dispose();\n (_d = this._tintTexture) === null || _d === void 0 ? void 0 : _d.dispose();\n }\n }\n getClassName() {\n return \"PBRClearCoatConfiguration\";\n }\n addFallbacks(defines, fallbacks, currentRank) {\n if (defines.CLEARCOAT_BUMP) {\n fallbacks.addFallback(currentRank++, \"CLEARCOAT_BUMP\");\n }\n if (defines.CLEARCOAT_TINT) {\n fallbacks.addFallback(currentRank++, \"CLEARCOAT_TINT\");\n }\n if (defines.CLEARCOAT) {\n fallbacks.addFallback(currentRank++, \"CLEARCOAT\");\n }\n return currentRank;\n }\n getSamplers(samplers) {\n samplers.push(\"clearCoatSampler\", \"clearCoatRoughnessSampler\", \"clearCoatBumpSampler\", \"clearCoatTintSampler\");\n }\n getUniforms() {\n return {\n ubo: [\n { name: \"vClearCoatParams\", size: 2, type: \"vec2\" },\n { name: \"vClearCoatRefractionParams\", size: 4, type: \"vec4\" },\n { name: \"vClearCoatInfos\", size: 4, type: \"vec4\" },\n { name: \"clearCoatMatrix\", size: 16, type: \"mat4\" },\n { name: \"clearCoatRoughnessMatrix\", size: 16, type: \"mat4\" },\n { name: \"vClearCoatBumpInfos\", size: 2, type: \"vec2\" },\n { name: \"vClearCoatTangentSpaceParams\", size: 2, type: \"vec2\" },\n { name: \"clearCoatBumpMatrix\", size: 16, type: \"mat4\" },\n { name: \"vClearCoatTintParams\", size: 4, type: \"vec4\" },\n { name: \"clearCoatColorAtDistance\", size: 1, type: \"float\" },\n { name: \"vClearCoatTintInfos\", size: 2, type: \"vec2\" },\n { name: \"clearCoatTintMatrix\", size: 16, type: \"mat4\" },\n ],\n };\n }\n}\n/**\n * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence\n * The default fits with a polyurethane material.\n * @internal\n */\nPBRClearCoatConfiguration._DefaultIndexOfRefraction = 1.5;\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRClearCoatConfiguration.prototype, \"isEnabled\", void 0);\n__decorate([\n serialize()\n], PBRClearCoatConfiguration.prototype, \"intensity\", void 0);\n__decorate([\n serialize()\n], PBRClearCoatConfiguration.prototype, \"roughness\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRClearCoatConfiguration.prototype, \"indexOfRefraction\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRClearCoatConfiguration.prototype, \"texture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRClearCoatConfiguration.prototype, \"useRoughnessFromMainTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRClearCoatConfiguration.prototype, \"textureRoughness\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRClearCoatConfiguration.prototype, \"remapF0OnInterfaceChange\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRClearCoatConfiguration.prototype, \"bumpTexture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRClearCoatConfiguration.prototype, \"isTintEnabled\", void 0);\n__decorate([\n serializeAsColor3()\n], PBRClearCoatConfiguration.prototype, \"tintColor\", void 0);\n__decorate([\n serialize()\n], PBRClearCoatConfiguration.prototype, \"tintColorAtDistance\", void 0);\n__decorate([\n serialize()\n], PBRClearCoatConfiguration.prototype, \"tintThickness\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRClearCoatConfiguration.prototype, \"tintTexture\", void 0);\n//# sourceMappingURL=pbrClearCoatConfiguration.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize, serializeAsTexture, expandToProperty } from \"../../Misc/decorators.js\";\nimport { MaterialFlags } from \"../materialFlags.js\";\nimport { MaterialHelper } from \"../../Materials/materialHelper.js\";\n\nimport { MaterialPluginBase } from \"../materialPluginBase.js\";\nimport { MaterialDefines } from \"../materialDefines.js\";\n/**\n * @internal\n */\nexport class MaterialIridescenceDefines extends MaterialDefines {\n constructor() {\n super(...arguments);\n this.IRIDESCENCE = false;\n this.IRIDESCENCE_TEXTURE = false;\n this.IRIDESCENCE_TEXTUREDIRECTUV = 0;\n this.IRIDESCENCE_THICKNESS_TEXTURE = false;\n this.IRIDESCENCE_THICKNESS_TEXTUREDIRECTUV = 0;\n this.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE = false;\n }\n}\n/**\n * Plugin that implements the iridescence (thin film) component of the PBR material\n */\nexport class PBRIridescenceConfiguration extends MaterialPluginBase {\n /** @internal */\n _markAllSubMeshesAsTexturesDirty() {\n this._enable(this._isEnabled);\n this._internalMarkAllSubMeshesAsTexturesDirty();\n }\n constructor(material, addToPluginList = true) {\n super(material, \"PBRIridescence\", 110, new MaterialIridescenceDefines(), addToPluginList);\n this._isEnabled = false;\n /**\n * Defines if the iridescence is enabled in the material.\n */\n this.isEnabled = false;\n /**\n * Defines the iridescence layer strength (between 0 and 1) it defaults to 1.\n */\n this.intensity = 1;\n /**\n * Defines the minimum thickness of the thin-film layer given in nanometers (nm).\n */\n this.minimumThickness = PBRIridescenceConfiguration._DefaultMinimumThickness;\n /**\n * Defines the maximum thickness of the thin-film layer given in nanometers (nm). This will be the thickness used if not thickness texture has been set.\n */\n this.maximumThickness = PBRIridescenceConfiguration._DefaultMaximumThickness;\n /**\n * Defines the maximum thickness of the thin-film layer given in nanometers (nm).\n */\n this.indexOfRefraction = PBRIridescenceConfiguration._DefaultIndexOfRefraction;\n this._texture = null;\n /**\n * Stores the iridescence intensity in a texture (red channel)\n */\n this.texture = null;\n this._thicknessTexture = null;\n /**\n * Stores the iridescence thickness in a texture (green channel)\n */\n this.thicknessTexture = null;\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];\n }\n isReadyForSubMesh(defines, scene) {\n if (!this._isEnabled) {\n return true;\n }\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.IridescenceTextureEnabled) {\n if (!this._texture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (this._thicknessTexture && MaterialFlags.IridescenceTextureEnabled) {\n if (!this._thicknessTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n }\n }\n return true;\n }\n prepareDefinesBeforeAttributes(defines, scene) {\n var _a;\n if (this._isEnabled) {\n defines.IRIDESCENCE = true;\n defines.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE =\n this._texture !== null && this._texture._texture === ((_a = this._thicknessTexture) === null || _a === void 0 ? void 0 : _a._texture) && this._texture.checkTransformsAreIdentical(this._thicknessTexture);\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.IridescenceTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._texture, defines, \"IRIDESCENCE_TEXTURE\");\n }\n else {\n defines.IRIDESCENCE_TEXTURE = false;\n }\n if (!defines.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE && this._thicknessTexture && MaterialFlags.IridescenceTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._thicknessTexture, defines, \"IRIDESCENCE_THICKNESS_TEXTURE\");\n }\n else {\n defines.IRIDESCENCE_THICKNESS_TEXTURE = false;\n }\n }\n }\n }\n else {\n defines.IRIDESCENCE = false;\n defines.IRIDESCENCE_TEXTURE = false;\n defines.IRIDESCENCE_THICKNESS_TEXTURE = false;\n defines.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE = false;\n defines.IRIDESCENCE_TEXTUREDIRECTUV = 0;\n defines.IRIDESCENCE_THICKNESS_TEXTUREDIRECTUV = 0;\n }\n }\n bindForSubMesh(uniformBuffer, scene, engine, subMesh) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (!this._isEnabled) {\n return;\n }\n const defines = subMesh.materialDefines;\n const isFrozen = this._material.isFrozen;\n const identicalTextures = defines.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE;\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\n if (identicalTextures && MaterialFlags.IridescenceTextureEnabled) {\n uniformBuffer.updateFloat4(\"vIridescenceInfos\", this._texture.coordinatesIndex, this._texture.level, -1, -1);\n MaterialHelper.BindTextureMatrix(this._texture, uniformBuffer, \"iridescence\");\n }\n else if ((this._texture || this._thicknessTexture) && MaterialFlags.IridescenceTextureEnabled) {\n uniformBuffer.updateFloat4(\"vIridescenceInfos\", (_b = (_a = this._texture) === null || _a === void 0 ? void 0 : _a.coordinatesIndex) !== null && _b !== void 0 ? _b : 0, (_d = (_c = this._texture) === null || _c === void 0 ? void 0 : _c.level) !== null && _d !== void 0 ? _d : 0, (_f = (_e = this._thicknessTexture) === null || _e === void 0 ? void 0 : _e.coordinatesIndex) !== null && _f !== void 0 ? _f : 0, (_h = (_g = this._thicknessTexture) === null || _g === void 0 ? void 0 : _g.level) !== null && _h !== void 0 ? _h : 0);\n if (this._texture) {\n MaterialHelper.BindTextureMatrix(this._texture, uniformBuffer, \"iridescence\");\n }\n if (this._thicknessTexture && !identicalTextures && !defines.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE) {\n MaterialHelper.BindTextureMatrix(this._thicknessTexture, uniformBuffer, \"iridescenceThickness\");\n }\n }\n // Clear Coat General params\n uniformBuffer.updateFloat4(\"vIridescenceParams\", this.intensity, this.indexOfRefraction, this.minimumThickness, this.maximumThickness);\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.IridescenceTextureEnabled) {\n uniformBuffer.setTexture(\"iridescenceSampler\", this._texture);\n }\n if (this._thicknessTexture && !identicalTextures && !defines.IRIDESCENCE_USE_THICKNESS_FROM_MAINTEXTURE && MaterialFlags.IridescenceTextureEnabled) {\n uniformBuffer.setTexture(\"iridescenceThicknessSampler\", this._thicknessTexture);\n }\n }\n }\n hasTexture(texture) {\n if (this._texture === texture) {\n return true;\n }\n if (this._thicknessTexture === texture) {\n return true;\n }\n return false;\n }\n getActiveTextures(activeTextures) {\n if (this._texture) {\n activeTextures.push(this._texture);\n }\n if (this._thicknessTexture) {\n activeTextures.push(this._thicknessTexture);\n }\n }\n getAnimatables(animatables) {\n if (this._texture && this._texture.animations && this._texture.animations.length > 0) {\n animatables.push(this._texture);\n }\n if (this._thicknessTexture && this._thicknessTexture.animations && this._thicknessTexture.animations.length > 0) {\n animatables.push(this._thicknessTexture);\n }\n }\n dispose(forceDisposeTextures) {\n var _a, _b;\n if (forceDisposeTextures) {\n (_a = this._texture) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._thicknessTexture) === null || _b === void 0 ? void 0 : _b.dispose();\n }\n }\n getClassName() {\n return \"PBRIridescenceConfiguration\";\n }\n addFallbacks(defines, fallbacks, currentRank) {\n if (defines.IRIDESCENCE) {\n fallbacks.addFallback(currentRank++, \"IRIDESCENCE\");\n }\n return currentRank;\n }\n getSamplers(samplers) {\n samplers.push(\"iridescenceSampler\", \"iridescenceThicknessSampler\");\n }\n getUniforms() {\n return {\n ubo: [\n { name: \"vIridescenceParams\", size: 4, type: \"vec4\" },\n { name: \"vIridescenceInfos\", size: 4, type: \"vec4\" },\n { name: \"iridescenceMatrix\", size: 16, type: \"mat4\" },\n { name: \"iridescenceThicknessMatrix\", size: 16, type: \"mat4\" },\n ],\n };\n }\n}\n/**\n * The default minimum thickness of the thin-film layer given in nanometers (nm).\n * Defaults to 100 nm.\n * @internal\n */\nPBRIridescenceConfiguration._DefaultMinimumThickness = 100;\n/**\n * The default maximum thickness of the thin-film layer given in nanometers (nm).\n * Defaults to 400 nm.\n * @internal\n */\nPBRIridescenceConfiguration._DefaultMaximumThickness = 400;\n/**\n * The default index of refraction of the thin-film layer.\n * Defaults to 1.3\n * @internal\n */\nPBRIridescenceConfiguration._DefaultIndexOfRefraction = 1.3;\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRIridescenceConfiguration.prototype, \"isEnabled\", void 0);\n__decorate([\n serialize()\n], PBRIridescenceConfiguration.prototype, \"intensity\", void 0);\n__decorate([\n serialize()\n], PBRIridescenceConfiguration.prototype, \"minimumThickness\", void 0);\n__decorate([\n serialize()\n], PBRIridescenceConfiguration.prototype, \"maximumThickness\", void 0);\n__decorate([\n serialize()\n], PBRIridescenceConfiguration.prototype, \"indexOfRefraction\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRIridescenceConfiguration.prototype, \"texture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRIridescenceConfiguration.prototype, \"thicknessTexture\", void 0);\n//# sourceMappingURL=pbrIridescenceConfiguration.js.map","import { __decorate } from \"../../tslib.es6.js\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { serialize, expandToProperty, serializeAsVector2, serializeAsTexture } from \"../../Misc/decorators.js\";\nimport { VertexBuffer } from \"../../Buffers/buffer.js\";\nimport { Vector2 } from \"../../Maths/math.vector.js\";\nimport { MaterialFlags } from \"../../Materials/materialFlags.js\";\nimport { MaterialHelper } from \"../../Materials/materialHelper.js\";\nimport { MaterialPluginBase } from \"../materialPluginBase.js\";\n\nimport { MaterialDefines } from \"../materialDefines.js\";\n/**\n * @internal\n */\nexport class MaterialAnisotropicDefines extends MaterialDefines {\n constructor() {\n super(...arguments);\n this.ANISOTROPIC = false;\n this.ANISOTROPIC_TEXTURE = false;\n this.ANISOTROPIC_TEXTUREDIRECTUV = 0;\n this.ANISOTROPIC_LEGACY = false;\n this.MAINUV1 = false;\n }\n}\n/**\n * Plugin that implements the anisotropic component of the PBR material\n */\nexport class PBRAnisotropicConfiguration extends MaterialPluginBase {\n /**\n * Sets the anisotropy direction as an angle.\n */\n set angle(value) {\n this.direction.x = Math.cos(value);\n this.direction.y = Math.sin(value);\n }\n /**\n * Gets the anisotropy angle value in radians.\n * @returns the anisotropy angle value in radians.\n */\n get angle() {\n return Math.atan2(this.direction.y, this.direction.x);\n }\n /** @internal */\n _markAllSubMeshesAsTexturesDirty() {\n this._enable(this._isEnabled);\n this._internalMarkAllSubMeshesAsTexturesDirty();\n }\n /** @internal */\n _markAllSubMeshesAsMiscDirty() {\n this._enable(this._isEnabled);\n this._internalMarkAllSubMeshesAsMiscDirty();\n }\n constructor(material, addToPluginList = true) {\n super(material, \"PBRAnisotropic\", 110, new MaterialAnisotropicDefines(), addToPluginList);\n this._isEnabled = false;\n /**\n * Defines if the anisotropy is enabled in the material.\n */\n this.isEnabled = false;\n /**\n * Defines the anisotropy strength (between 0 and 1) it defaults to 1.\n */\n this.intensity = 1;\n /**\n * Defines if the effect is along the tangents, bitangents or in between.\n * By default, the effect is \"stretching\" the highlights along the tangents.\n */\n this.direction = new Vector2(1, 0);\n this._texture = null;\n /**\n * Stores the anisotropy values in a texture.\n * rg is direction (like normal from -1 to 1)\n * b is a intensity\n */\n this.texture = null;\n this._legacy = false;\n /**\n * Defines if the anisotropy is in legacy mode for backwards compatibility before 6.4.0.\n */\n this.legacy = false;\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];\n this._internalMarkAllSubMeshesAsMiscDirty = material._dirtyCallbacks[16];\n }\n isReadyForSubMesh(defines, scene) {\n if (!this._isEnabled) {\n return true;\n }\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.AnisotropicTextureEnabled) {\n if (!this._texture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n }\n }\n return true;\n }\n prepareDefinesBeforeAttributes(defines, scene, mesh) {\n if (this._isEnabled) {\n defines.ANISOTROPIC = this._isEnabled;\n if (this._isEnabled && !mesh.isVerticesDataPresent(VertexBuffer.TangentKind)) {\n defines._needUVs = true;\n defines.MAINUV1 = true;\n }\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.AnisotropicTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._texture, defines, \"ANISOTROPIC_TEXTURE\");\n }\n else {\n defines.ANISOTROPIC_TEXTURE = false;\n }\n }\n }\n if (defines._areMiscDirty) {\n defines.ANISOTROPIC_LEGACY = this._legacy;\n }\n }\n else {\n defines.ANISOTROPIC = false;\n defines.ANISOTROPIC_TEXTURE = false;\n defines.ANISOTROPIC_TEXTUREDIRECTUV = 0;\n defines.ANISOTROPIC_LEGACY = false;\n }\n }\n bindForSubMesh(uniformBuffer, scene) {\n if (!this._isEnabled) {\n return;\n }\n const isFrozen = this._material.isFrozen;\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\n if (this._texture && MaterialFlags.AnisotropicTextureEnabled) {\n uniformBuffer.updateFloat2(\"vAnisotropyInfos\", this._texture.coordinatesIndex, this._texture.level);\n MaterialHelper.BindTextureMatrix(this._texture, uniformBuffer, \"anisotropy\");\n }\n // Anisotropy\n uniformBuffer.updateFloat3(\"vAnisotropy\", this.direction.x, this.direction.y, this.intensity);\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.AnisotropicTextureEnabled) {\n uniformBuffer.setTexture(\"anisotropySampler\", this._texture);\n }\n }\n }\n hasTexture(texture) {\n if (this._texture === texture) {\n return true;\n }\n return false;\n }\n getActiveTextures(activeTextures) {\n if (this._texture) {\n activeTextures.push(this._texture);\n }\n }\n getAnimatables(animatables) {\n if (this._texture && this._texture.animations && this._texture.animations.length > 0) {\n animatables.push(this._texture);\n }\n }\n dispose(forceDisposeTextures) {\n if (forceDisposeTextures) {\n if (this._texture) {\n this._texture.dispose();\n }\n }\n }\n getClassName() {\n return \"PBRAnisotropicConfiguration\";\n }\n addFallbacks(defines, fallbacks, currentRank) {\n if (defines.ANISOTROPIC) {\n fallbacks.addFallback(currentRank++, \"ANISOTROPIC\");\n }\n return currentRank;\n }\n getSamplers(samplers) {\n samplers.push(\"anisotropySampler\");\n }\n getUniforms() {\n return {\n ubo: [\n { name: \"vAnisotropy\", size: 3, type: \"vec3\" },\n { name: \"vAnisotropyInfos\", size: 2, type: \"vec2\" },\n { name: \"anisotropyMatrix\", size: 16, type: \"mat4\" },\n ],\n };\n }\n /**\n * Parses a anisotropy Configuration from a serialized object.\n * @param source - Serialized object.\n * @param scene Defines the scene we are parsing for\n * @param rootUrl Defines the rootUrl to load from\n */\n parse(source, scene, rootUrl) {\n super.parse(source, scene, rootUrl);\n // Backward compatibility\n if (source.legacy === undefined) {\n this.legacy = true;\n }\n }\n}\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRAnisotropicConfiguration.prototype, \"isEnabled\", void 0);\n__decorate([\n serialize()\n], PBRAnisotropicConfiguration.prototype, \"intensity\", void 0);\n__decorate([\n serializeAsVector2()\n], PBRAnisotropicConfiguration.prototype, \"direction\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRAnisotropicConfiguration.prototype, \"texture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\n], PBRAnisotropicConfiguration.prototype, \"legacy\", void 0);\n//# sourceMappingURL=pbrAnisotropicConfiguration.js.map","import { __decorate } from \"../../tslib.es6.js\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { serialize, expandToProperty, serializeAsColor3, serializeAsTexture } from \"../../Misc/decorators.js\";\nimport { Color3 } from \"../../Maths/math.color.js\";\nimport { MaterialFlags } from \"../../Materials/materialFlags.js\";\nimport { MaterialHelper } from \"../../Materials/materialHelper.js\";\n\nimport { MaterialPluginBase } from \"../materialPluginBase.js\";\nimport { MaterialDefines } from \"../materialDefines.js\";\n/**\n * @internal\n */\nexport class MaterialSheenDefines extends MaterialDefines {\n constructor() {\n super(...arguments);\n this.SHEEN = false;\n this.SHEEN_TEXTURE = false;\n this.SHEEN_GAMMATEXTURE = false;\n this.SHEEN_TEXTURE_ROUGHNESS = false;\n this.SHEEN_TEXTUREDIRECTUV = 0;\n this.SHEEN_TEXTURE_ROUGHNESSDIRECTUV = 0;\n this.SHEEN_LINKWITHALBEDO = false;\n this.SHEEN_ROUGHNESS = false;\n this.SHEEN_ALBEDOSCALING = false;\n this.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE = false;\n this.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL = false;\n }\n}\n/**\n * Plugin that implements the sheen component of the PBR material.\n */\nexport class PBRSheenConfiguration extends MaterialPluginBase {\n /** @internal */\n _markAllSubMeshesAsTexturesDirty() {\n this._enable(this._isEnabled);\n this._internalMarkAllSubMeshesAsTexturesDirty();\n }\n constructor(material, addToPluginList = true) {\n super(material, \"Sheen\", 120, new MaterialSheenDefines(), addToPluginList);\n this._isEnabled = false;\n /**\n * Defines if the material uses sheen.\n */\n this.isEnabled = false;\n this._linkSheenWithAlbedo = false;\n /**\n * Defines if the sheen is linked to the sheen color.\n */\n this.linkSheenWithAlbedo = false;\n /**\n * Defines the sheen intensity.\n */\n this.intensity = 1;\n /**\n * Defines the sheen color.\n */\n this.color = Color3.White();\n this._texture = null;\n /**\n * Stores the sheen tint values in a texture.\n * rgb is tint\n * a is a intensity or roughness if the roughness property has been defined and useRoughnessFromTexture is true (in that case, textureRoughness won't be used)\n * If the roughness property has been defined and useRoughnessFromTexture is false then the alpha channel is not used to modulate roughness\n */\n this.texture = null;\n this._useRoughnessFromMainTexture = true;\n /**\n * Indicates that the alpha channel of the texture property will be used for roughness.\n * Has no effect if the roughness (and texture!) property is not defined\n */\n this.useRoughnessFromMainTexture = true;\n this._roughness = null;\n /**\n * Defines the sheen roughness.\n * It is not taken into account if linkSheenWithAlbedo is true.\n * To stay backward compatible, material roughness is used instead if sheen roughness = null\n */\n this.roughness = null;\n this._textureRoughness = null;\n /**\n * Stores the sheen roughness in a texture.\n * alpha channel is the roughness. This texture won't be used if the texture property is not empty and useRoughnessFromTexture is true\n */\n this.textureRoughness = null;\n this._albedoScaling = false;\n /**\n * If true, the sheen effect is layered above the base BRDF with the albedo-scaling technique.\n * It allows the strength of the sheen effect to not depend on the base color of the material,\n * making it easier to setup and tweak the effect\n */\n this.albedoScaling = false;\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];\n }\n isReadyForSubMesh(defines, scene) {\n if (!this._isEnabled) {\n return true;\n }\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.SheenTextureEnabled) {\n if (!this._texture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (this._textureRoughness && MaterialFlags.SheenTextureEnabled) {\n if (!this._textureRoughness.isReadyOrNotBlocking()) {\n return false;\n }\n }\n }\n }\n return true;\n }\n prepareDefinesBeforeAttributes(defines, scene) {\n var _a;\n if (this._isEnabled) {\n defines.SHEEN = true;\n defines.SHEEN_LINKWITHALBEDO = this._linkSheenWithAlbedo;\n defines.SHEEN_ROUGHNESS = this._roughness !== null;\n defines.SHEEN_ALBEDOSCALING = this._albedoScaling;\n defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE = this._useRoughnessFromMainTexture;\n defines.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL =\n this._texture !== null && this._texture._texture === ((_a = this._textureRoughness) === null || _a === void 0 ? void 0 : _a._texture) && this._texture.checkTransformsAreIdentical(this._textureRoughness);\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.SheenTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._texture, defines, \"SHEEN_TEXTURE\");\n defines.SHEEN_GAMMATEXTURE = this._texture.gammaSpace;\n }\n else {\n defines.SHEEN_TEXTURE = false;\n }\n if (this._textureRoughness && MaterialFlags.SheenTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._textureRoughness, defines, \"SHEEN_TEXTURE_ROUGHNESS\");\n }\n else {\n defines.SHEEN_TEXTURE_ROUGHNESS = false;\n }\n }\n }\n }\n else {\n defines.SHEEN = false;\n defines.SHEEN_TEXTURE = false;\n defines.SHEEN_TEXTURE_ROUGHNESS = false;\n defines.SHEEN_LINKWITHALBEDO = false;\n defines.SHEEN_ROUGHNESS = false;\n defines.SHEEN_ALBEDOSCALING = false;\n defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE = false;\n defines.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL = false;\n defines.SHEEN_GAMMATEXTURE = false;\n defines.SHEEN_TEXTUREDIRECTUV = 0;\n defines.SHEEN_TEXTURE_ROUGHNESSDIRECTUV = 0;\n }\n }\n bindForSubMesh(uniformBuffer, scene, engine, subMesh) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (!this._isEnabled) {\n return;\n }\n const defines = subMesh.materialDefines;\n const isFrozen = this._material.isFrozen;\n const identicalTextures = defines.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL;\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\n if (identicalTextures && MaterialFlags.SheenTextureEnabled) {\n uniformBuffer.updateFloat4(\"vSheenInfos\", this._texture.coordinatesIndex, this._texture.level, -1, -1);\n MaterialHelper.BindTextureMatrix(this._texture, uniformBuffer, \"sheen\");\n }\n else if ((this._texture || this._textureRoughness) && MaterialFlags.SheenTextureEnabled) {\n uniformBuffer.updateFloat4(\"vSheenInfos\", (_b = (_a = this._texture) === null || _a === void 0 ? void 0 : _a.coordinatesIndex) !== null && _b !== void 0 ? _b : 0, (_d = (_c = this._texture) === null || _c === void 0 ? void 0 : _c.level) !== null && _d !== void 0 ? _d : 0, (_f = (_e = this._textureRoughness) === null || _e === void 0 ? void 0 : _e.coordinatesIndex) !== null && _f !== void 0 ? _f : 0, (_h = (_g = this._textureRoughness) === null || _g === void 0 ? void 0 : _g.level) !== null && _h !== void 0 ? _h : 0);\n if (this._texture) {\n MaterialHelper.BindTextureMatrix(this._texture, uniformBuffer, \"sheen\");\n }\n if (this._textureRoughness && !identicalTextures && !defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE) {\n MaterialHelper.BindTextureMatrix(this._textureRoughness, uniformBuffer, \"sheenRoughness\");\n }\n }\n // Sheen\n uniformBuffer.updateFloat4(\"vSheenColor\", this.color.r, this.color.g, this.color.b, this.intensity);\n if (this._roughness !== null) {\n uniformBuffer.updateFloat(\"vSheenRoughness\", this._roughness);\n }\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.SheenTextureEnabled) {\n uniformBuffer.setTexture(\"sheenSampler\", this._texture);\n }\n if (this._textureRoughness && !identicalTextures && !defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE && MaterialFlags.SheenTextureEnabled) {\n uniformBuffer.setTexture(\"sheenRoughnessSampler\", this._textureRoughness);\n }\n }\n }\n hasTexture(texture) {\n if (this._texture === texture) {\n return true;\n }\n if (this._textureRoughness === texture) {\n return true;\n }\n return false;\n }\n getActiveTextures(activeTextures) {\n if (this._texture) {\n activeTextures.push(this._texture);\n }\n if (this._textureRoughness) {\n activeTextures.push(this._textureRoughness);\n }\n }\n getAnimatables(animatables) {\n if (this._texture && this._texture.animations && this._texture.animations.length > 0) {\n animatables.push(this._texture);\n }\n if (this._textureRoughness && this._textureRoughness.animations && this._textureRoughness.animations.length > 0) {\n animatables.push(this._textureRoughness);\n }\n }\n dispose(forceDisposeTextures) {\n var _a, _b;\n if (forceDisposeTextures) {\n (_a = this._texture) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._textureRoughness) === null || _b === void 0 ? void 0 : _b.dispose();\n }\n }\n getClassName() {\n return \"PBRSheenConfiguration\";\n }\n addFallbacks(defines, fallbacks, currentRank) {\n if (defines.SHEEN) {\n fallbacks.addFallback(currentRank++, \"SHEEN\");\n }\n return currentRank;\n }\n getSamplers(samplers) {\n samplers.push(\"sheenSampler\", \"sheenRoughnessSampler\");\n }\n getUniforms() {\n return {\n ubo: [\n { name: \"vSheenColor\", size: 4, type: \"vec4\" },\n { name: \"vSheenRoughness\", size: 1, type: \"float\" },\n { name: \"vSheenInfos\", size: 4, type: \"vec4\" },\n { name: \"sheenMatrix\", size: 16, type: \"mat4\" },\n { name: \"sheenRoughnessMatrix\", size: 16, type: \"mat4\" },\n ],\n };\n }\n}\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"isEnabled\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"linkSheenWithAlbedo\", void 0);\n__decorate([\n serialize()\n], PBRSheenConfiguration.prototype, \"intensity\", void 0);\n__decorate([\n serializeAsColor3()\n], PBRSheenConfiguration.prototype, \"color\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"texture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"useRoughnessFromMainTexture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"roughness\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"textureRoughness\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"albedoScaling\", void 0);\n//# sourceMappingURL=pbrSheenConfiguration.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize, serializeAsTexture, expandToProperty, serializeAsColor3 } from \"../../Misc/decorators.js\";\nimport { Color3 } from \"../../Maths/math.color.js\";\nimport { MaterialFlags } from \"../materialFlags.js\";\nimport { MaterialHelper } from \"../../Materials/materialHelper.js\";\nimport { Scalar } from \"../../Maths/math.scalar.js\";\nimport { TmpVectors } from \"../../Maths/math.vector.js\";\nimport { MaterialPluginBase } from \"../materialPluginBase.js\";\n\nimport { MaterialDefines } from \"../materialDefines.js\";\n/**\n * @internal\n */\nexport class MaterialSubSurfaceDefines extends MaterialDefines {\n constructor() {\n super(...arguments);\n this.SUBSURFACE = false;\n this.SS_REFRACTION = false;\n this.SS_REFRACTION_USE_INTENSITY_FROM_TEXTURE = false;\n this.SS_TRANSLUCENCY = false;\n this.SS_TRANSLUCENCY_USE_INTENSITY_FROM_TEXTURE = false;\n this.SS_SCATTERING = false;\n this.SS_THICKNESSANDMASK_TEXTURE = false;\n this.SS_THICKNESSANDMASK_TEXTUREDIRECTUV = 0;\n this.SS_HAS_THICKNESS = false;\n this.SS_REFRACTIONINTENSITY_TEXTURE = false;\n this.SS_REFRACTIONINTENSITY_TEXTUREDIRECTUV = 0;\n this.SS_TRANSLUCENCYINTENSITY_TEXTURE = false;\n this.SS_TRANSLUCENCYINTENSITY_TEXTUREDIRECTUV = 0;\n this.SS_REFRACTIONMAP_3D = false;\n this.SS_REFRACTIONMAP_OPPOSITEZ = false;\n this.SS_LODINREFRACTIONALPHA = false;\n this.SS_GAMMAREFRACTION = false;\n this.SS_RGBDREFRACTION = false;\n this.SS_LINEARSPECULARREFRACTION = false;\n this.SS_LINKREFRACTIONTOTRANSPARENCY = false;\n this.SS_ALBEDOFORREFRACTIONTINT = false;\n this.SS_ALBEDOFORTRANSLUCENCYTINT = false;\n this.SS_USE_LOCAL_REFRACTIONMAP_CUBIC = false;\n this.SS_USE_THICKNESS_AS_DEPTH = false;\n this.SS_MASK_FROM_THICKNESS_TEXTURE = false;\n this.SS_USE_GLTF_TEXTURES = false;\n }\n}\n/**\n * Plugin that implements the sub surface component of the PBR material\n */\nexport class PBRSubSurfaceConfiguration extends MaterialPluginBase {\n /**\n * Diffusion profile for subsurface scattering.\n * Useful for better scattering in the skins or foliages.\n */\n get scatteringDiffusionProfile() {\n if (!this._scene.subSurfaceConfiguration) {\n return null;\n }\n return this._scene.subSurfaceConfiguration.ssDiffusionProfileColors[this._scatteringDiffusionProfileIndex];\n }\n set scatteringDiffusionProfile(c) {\n if (!this._scene.enableSubSurfaceForPrePass()) {\n // Not supported\n return;\n }\n // addDiffusionProfile automatically checks for doubles\n if (c) {\n this._scatteringDiffusionProfileIndex = this._scene.subSurfaceConfiguration.addDiffusionProfile(c);\n }\n }\n /**\n * Index of refraction of the material's volume.\n * https://en.wikipedia.org/wiki/List_of_refractive_indices\n *\n * This ONLY impacts refraction. If not provided or given a non-valid value,\n * the volume will use the same IOR as the surface.\n */\n get volumeIndexOfRefraction() {\n if (this._volumeIndexOfRefraction >= 1.0) {\n return this._volumeIndexOfRefraction;\n }\n return this._indexOfRefraction;\n }\n set volumeIndexOfRefraction(value) {\n if (value >= 1.0) {\n this._volumeIndexOfRefraction = value;\n }\n else {\n this._volumeIndexOfRefraction = -1.0;\n }\n }\n /** @internal */\n _markAllSubMeshesAsTexturesDirty() {\n this._enable(this._isRefractionEnabled || this._isTranslucencyEnabled || this._isScatteringEnabled);\n this._internalMarkAllSubMeshesAsTexturesDirty();\n }\n /** @internal */\n _markScenePrePassDirty() {\n this._internalMarkAllSubMeshesAsTexturesDirty();\n this._internalMarkScenePrePassDirty();\n }\n constructor(material, addToPluginList = true) {\n super(material, \"PBRSubSurface\", 130, new MaterialSubSurfaceDefines(), addToPluginList);\n this._isRefractionEnabled = false;\n /**\n * Defines if the refraction is enabled in the material.\n */\n this.isRefractionEnabled = false;\n this._isTranslucencyEnabled = false;\n /**\n * Defines if the translucency is enabled in the material.\n */\n this.isTranslucencyEnabled = false;\n this._isScatteringEnabled = false;\n /**\n * Defines if the sub surface scattering is enabled in the material.\n */\n this.isScatteringEnabled = false;\n this._scatteringDiffusionProfileIndex = 0;\n /**\n * Defines the refraction intensity of the material.\n * The refraction when enabled replaces the Diffuse part of the material.\n * The intensity helps transitioning between diffuse and refraction.\n */\n this.refractionIntensity = 1;\n /**\n * Defines the translucency intensity of the material.\n * When translucency has been enabled, this defines how much of the \"translucency\"\n * is added to the diffuse part of the material.\n */\n this.translucencyIntensity = 1;\n /**\n * When enabled, transparent surfaces will be tinted with the albedo colour (independent of thickness)\n */\n this.useAlbedoToTintRefraction = false;\n /**\n * When enabled, translucent surfaces will be tinted with the albedo colour (independent of thickness)\n */\n this.useAlbedoToTintTranslucency = false;\n this._thicknessTexture = null;\n /**\n * Stores the average thickness of a mesh in a texture (The texture is holding the values linearly).\n * The red (or green if useGltfStyleTextures=true) channel of the texture should contain the thickness remapped between 0 and 1.\n * 0 would mean minimumThickness\n * 1 would mean maximumThickness\n * The other channels might be use as a mask to vary the different effects intensity.\n */\n this.thicknessTexture = null;\n this._refractionTexture = null;\n /**\n * Defines the texture to use for refraction.\n */\n this.refractionTexture = null;\n /** @internal */\n this._indexOfRefraction = 1.5;\n /**\n * Index of refraction of the material base layer.\n * https://en.wikipedia.org/wiki/List_of_refractive_indices\n *\n * This does not only impact refraction but also the Base F0 of Dielectric Materials.\n *\n * From dielectric fresnel rules: F0 = square((iorT - iorI) / (iorT + iorI))\n */\n this.indexOfRefraction = 1.5;\n this._volumeIndexOfRefraction = -1.0;\n this._invertRefractionY = false;\n /**\n * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.\n */\n this.invertRefractionY = false;\n /** @internal */\n this._linkRefractionWithTransparency = false;\n /**\n * This parameters will make the material used its opacity to control how much it is refracting against not.\n * Materials half opaque for instance using refraction could benefit from this control.\n */\n this.linkRefractionWithTransparency = false;\n /**\n * Defines the minimum thickness stored in the thickness map.\n * If no thickness map is defined, this value will be used to simulate thickness.\n */\n this.minimumThickness = 0;\n /**\n * Defines the maximum thickness stored in the thickness map.\n */\n this.maximumThickness = 1;\n /**\n * Defines that the thickness should be used as a measure of the depth volume.\n */\n this.useThicknessAsDepth = false;\n /**\n * Defines the volume tint of the material.\n * This is used for both translucency and scattering.\n */\n this.tintColor = Color3.White();\n /**\n * Defines the distance at which the tint color should be found in the media.\n * This is used for refraction only.\n */\n this.tintColorAtDistance = 1;\n /**\n * Defines how far each channel transmit through the media.\n * It is defined as a color to simplify it selection.\n */\n this.diffusionDistance = Color3.White();\n this._useMaskFromThicknessTexture = false;\n /**\n * Stores the intensity of the different subsurface effects in the thickness texture.\n * Note that if refractionIntensityTexture and/or translucencyIntensityTexture is provided it takes precedence over thicknessTexture + useMaskFromThicknessTexture\n * * the green (red if useGltfStyleTextures = true) channel is the refraction intensity.\n * * the blue channel is the translucency intensity.\n */\n this.useMaskFromThicknessTexture = false;\n this._refractionIntensityTexture = null;\n /**\n * Stores the intensity of the refraction. If provided, it takes precedence over thicknessTexture + useMaskFromThicknessTexture\n * * the green (red if useGltfStyleTextures = true) channel is the refraction intensity.\n */\n this.refractionIntensityTexture = null;\n this._translucencyIntensityTexture = null;\n /**\n * Stores the intensity of the translucency. If provided, it takes precedence over thicknessTexture + useMaskFromThicknessTexture\n * * the blue channel is the translucency intensity.\n */\n this.translucencyIntensityTexture = null;\n this._useGltfStyleTextures = false;\n /**\n * Use channels layout used by glTF:\n * * thicknessTexture: the green (instead of red) channel is the thickness\n * * thicknessTexture/refractionIntensityTexture: the red (instead of green) channel is the refraction intensity\n * * thicknessTexture/translucencyIntensityTexture: no change, use the blue channel for the translucency intensity\n */\n this.useGltfStyleTextures = false;\n this._scene = material.getScene();\n this.registerForExtraEvents = true;\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];\n this._internalMarkScenePrePassDirty = material._dirtyCallbacks[32];\n }\n isReadyForSubMesh(defines, scene) {\n if (!this._isRefractionEnabled && !this._isTranslucencyEnabled && !this._isScatteringEnabled) {\n return true;\n }\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._thicknessTexture && MaterialFlags.ThicknessTextureEnabled) {\n if (!this._thicknessTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n const refractionTexture = this._getRefractionTexture(scene);\n if (refractionTexture && MaterialFlags.RefractionTextureEnabled) {\n if (!refractionTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n }\n }\n return true;\n }\n prepareDefinesBeforeAttributes(defines, scene) {\n if (!this._isRefractionEnabled && !this._isTranslucencyEnabled && !this._isScatteringEnabled) {\n defines.SUBSURFACE = false;\n defines.SS_TRANSLUCENCY = false;\n defines.SS_SCATTERING = false;\n defines.SS_REFRACTION = false;\n defines.SS_REFRACTION_USE_INTENSITY_FROM_TEXTURE = false;\n defines.SS_TRANSLUCENCY_USE_INTENSITY_FROM_TEXTURE = false;\n defines.SS_THICKNESSANDMASK_TEXTURE = false;\n defines.SS_THICKNESSANDMASK_TEXTUREDIRECTUV = 0;\n defines.SS_HAS_THICKNESS = false;\n defines.SS_REFRACTIONINTENSITY_TEXTURE = false;\n defines.SS_REFRACTIONINTENSITY_TEXTUREDIRECTUV = 0;\n defines.SS_TRANSLUCENCYINTENSITY_TEXTURE = false;\n defines.SS_TRANSLUCENCYINTENSITY_TEXTUREDIRECTUV = 0;\n defines.SS_REFRACTIONMAP_3D = false;\n defines.SS_REFRACTIONMAP_OPPOSITEZ = false;\n defines.SS_LODINREFRACTIONALPHA = false;\n defines.SS_GAMMAREFRACTION = false;\n defines.SS_RGBDREFRACTION = false;\n defines.SS_LINEARSPECULARREFRACTION = false;\n defines.SS_LINKREFRACTIONTOTRANSPARENCY = false;\n defines.SS_ALBEDOFORREFRACTIONTINT = false;\n defines.SS_ALBEDOFORTRANSLUCENCYTINT = false;\n defines.SS_USE_LOCAL_REFRACTIONMAP_CUBIC = false;\n defines.SS_USE_THICKNESS_AS_DEPTH = false;\n defines.SS_MASK_FROM_THICKNESS_TEXTURE = false;\n defines.SS_USE_GLTF_TEXTURES = false;\n return;\n }\n if (defines._areTexturesDirty) {\n defines.SUBSURFACE = true;\n defines.SS_TRANSLUCENCY = this._isTranslucencyEnabled;\n defines.SS_TRANSLUCENCY_USE_INTENSITY_FROM_TEXTURE = false;\n defines.SS_SCATTERING = this._isScatteringEnabled;\n defines.SS_THICKNESSANDMASK_TEXTURE = false;\n defines.SS_REFRACTIONINTENSITY_TEXTURE = false;\n defines.SS_TRANSLUCENCYINTENSITY_TEXTURE = false;\n defines.SS_HAS_THICKNESS = false;\n defines.SS_MASK_FROM_THICKNESS_TEXTURE = false;\n defines.SS_USE_GLTF_TEXTURES = false;\n defines.SS_REFRACTION = false;\n defines.SS_REFRACTION_USE_INTENSITY_FROM_TEXTURE = false;\n defines.SS_REFRACTIONMAP_3D = false;\n defines.SS_GAMMAREFRACTION = false;\n defines.SS_RGBDREFRACTION = false;\n defines.SS_LINEARSPECULARREFRACTION = false;\n defines.SS_REFRACTIONMAP_OPPOSITEZ = false;\n defines.SS_LODINREFRACTIONALPHA = false;\n defines.SS_LINKREFRACTIONTOTRANSPARENCY = false;\n defines.SS_ALBEDOFORREFRACTIONTINT = false;\n defines.SS_ALBEDOFORTRANSLUCENCYTINT = false;\n defines.SS_USE_LOCAL_REFRACTIONMAP_CUBIC = false;\n defines.SS_USE_THICKNESS_AS_DEPTH = false;\n const refractionIntensityTextureIsThicknessTexture = !!this._thicknessTexture &&\n !!this._refractionIntensityTexture &&\n this._refractionIntensityTexture.checkTransformsAreIdentical(this._thicknessTexture) &&\n this._refractionIntensityTexture._texture === this._thicknessTexture._texture;\n const translucencyIntensityTextureIsThicknessTexture = !!this._thicknessTexture &&\n !!this._translucencyIntensityTexture &&\n this._translucencyIntensityTexture.checkTransformsAreIdentical(this._thicknessTexture) &&\n this._translucencyIntensityTexture._texture === this._thicknessTexture._texture;\n // if true, it means the refraction/translucency textures are the same than the thickness texture so there's no need to pass them to the shader, only thicknessTexture\n const useOnlyThicknessTexture = (refractionIntensityTextureIsThicknessTexture || !this._refractionIntensityTexture) &&\n (translucencyIntensityTextureIsThicknessTexture || !this._translucencyIntensityTexture);\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._thicknessTexture && MaterialFlags.ThicknessTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._thicknessTexture, defines, \"SS_THICKNESSANDMASK_TEXTURE\");\n }\n if (this._refractionIntensityTexture && MaterialFlags.RefractionIntensityTextureEnabled && !useOnlyThicknessTexture) {\n MaterialHelper.PrepareDefinesForMergedUV(this._refractionIntensityTexture, defines, \"SS_REFRACTIONINTENSITY_TEXTURE\");\n }\n if (this._translucencyIntensityTexture && MaterialFlags.TranslucencyIntensityTextureEnabled && !useOnlyThicknessTexture) {\n MaterialHelper.PrepareDefinesForMergedUV(this._translucencyIntensityTexture, defines, \"SS_TRANSLUCENCYINTENSITY_TEXTURE\");\n }\n }\n }\n defines.SS_HAS_THICKNESS = this.maximumThickness - this.minimumThickness !== 0.0;\n defines.SS_MASK_FROM_THICKNESS_TEXTURE =\n (this._useMaskFromThicknessTexture || !!this._refractionIntensityTexture || !!this._translucencyIntensityTexture) && useOnlyThicknessTexture;\n defines.SS_USE_GLTF_TEXTURES = this._useGltfStyleTextures;\n defines.SS_REFRACTION_USE_INTENSITY_FROM_TEXTURE = (this._useMaskFromThicknessTexture || !!this._refractionIntensityTexture) && useOnlyThicknessTexture;\n defines.SS_TRANSLUCENCY_USE_INTENSITY_FROM_TEXTURE = (this._useMaskFromThicknessTexture || !!this._translucencyIntensityTexture) && useOnlyThicknessTexture;\n if (this._isRefractionEnabled) {\n if (scene.texturesEnabled) {\n const refractionTexture = this._getRefractionTexture(scene);\n if (refractionTexture && MaterialFlags.RefractionTextureEnabled) {\n defines.SS_REFRACTION = true;\n defines.SS_REFRACTIONMAP_3D = refractionTexture.isCube;\n defines.SS_GAMMAREFRACTION = refractionTexture.gammaSpace;\n defines.SS_RGBDREFRACTION = refractionTexture.isRGBD;\n defines.SS_LINEARSPECULARREFRACTION = refractionTexture.linearSpecularLOD;\n defines.SS_REFRACTIONMAP_OPPOSITEZ = this._scene.useRightHandedSystem && refractionTexture.isCube ? !refractionTexture.invertZ : refractionTexture.invertZ;\n defines.SS_LODINREFRACTIONALPHA = refractionTexture.lodLevelInAlpha;\n defines.SS_LINKREFRACTIONTOTRANSPARENCY = this._linkRefractionWithTransparency;\n defines.SS_ALBEDOFORREFRACTIONTINT = this.useAlbedoToTintRefraction;\n defines.SS_USE_LOCAL_REFRACTIONMAP_CUBIC = refractionTexture.isCube && refractionTexture.boundingBoxSize;\n defines.SS_USE_THICKNESS_AS_DEPTH = this.useThicknessAsDepth;\n }\n }\n }\n if (this._isTranslucencyEnabled) {\n defines.SS_ALBEDOFORTRANSLUCENCYTINT = this.useAlbedoToTintTranslucency;\n }\n }\n }\n /**\n * Binds the material data (this function is called even if mustRebind() returns false)\n * @param uniformBuffer defines the Uniform buffer to fill in.\n * @param scene defines the scene the material belongs to.\n * @param engine defines the engine the material belongs to.\n * @param subMesh the submesh to bind data for\n */\n hardBindForSubMesh(uniformBuffer, scene, engine, subMesh) {\n if (!this._isRefractionEnabled && !this._isTranslucencyEnabled && !this._isScatteringEnabled) {\n return;\n }\n subMesh.getRenderingMesh().getWorldMatrix().decompose(TmpVectors.Vector3[0]);\n const thicknessScale = Math.max(Math.abs(TmpVectors.Vector3[0].x), Math.abs(TmpVectors.Vector3[0].y), Math.abs(TmpVectors.Vector3[0].z));\n uniformBuffer.updateFloat2(\"vThicknessParam\", this.minimumThickness * thicknessScale, (this.maximumThickness - this.minimumThickness) * thicknessScale);\n }\n bindForSubMesh(uniformBuffer, scene, engine, subMesh) {\n if (!this._isRefractionEnabled && !this._isTranslucencyEnabled && !this._isScatteringEnabled) {\n return;\n }\n const defines = subMesh.materialDefines;\n const isFrozen = this._material.isFrozen;\n const realTimeFiltering = this._material.realTimeFiltering;\n const lodBasedMicrosurface = defines.LODBASEDMICROSFURACE;\n const refractionTexture = this._getRefractionTexture(scene);\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\n if (this._thicknessTexture && MaterialFlags.ThicknessTextureEnabled) {\n uniformBuffer.updateFloat2(\"vThicknessInfos\", this._thicknessTexture.coordinatesIndex, this._thicknessTexture.level);\n MaterialHelper.BindTextureMatrix(this._thicknessTexture, uniformBuffer, \"thickness\");\n }\n if (this._refractionIntensityTexture && MaterialFlags.RefractionIntensityTextureEnabled && defines.SS_REFRACTIONINTENSITY_TEXTURE) {\n uniformBuffer.updateFloat2(\"vRefractionIntensityInfos\", this._refractionIntensityTexture.coordinatesIndex, this._refractionIntensityTexture.level);\n MaterialHelper.BindTextureMatrix(this._refractionIntensityTexture, uniformBuffer, \"refractionIntensity\");\n }\n if (this._translucencyIntensityTexture && MaterialFlags.TranslucencyIntensityTextureEnabled && defines.SS_TRANSLUCENCYINTENSITY_TEXTURE) {\n uniformBuffer.updateFloat2(\"vTranslucencyIntensityInfos\", this._translucencyIntensityTexture.coordinatesIndex, this._translucencyIntensityTexture.level);\n MaterialHelper.BindTextureMatrix(this._translucencyIntensityTexture, uniformBuffer, \"translucencyIntensity\");\n }\n if (refractionTexture && MaterialFlags.RefractionTextureEnabled) {\n uniformBuffer.updateMatrix(\"refractionMatrix\", refractionTexture.getRefractionTextureMatrix());\n let depth = 1.0;\n if (!refractionTexture.isCube) {\n if (refractionTexture.depth) {\n depth = refractionTexture.depth;\n }\n }\n const width = refractionTexture.getSize().width;\n const refractionIor = this.volumeIndexOfRefraction;\n uniformBuffer.updateFloat4(\"vRefractionInfos\", refractionTexture.level, 1 / refractionIor, depth, this._invertRefractionY ? -1 : 1);\n uniformBuffer.updateFloat4(\"vRefractionMicrosurfaceInfos\", width, refractionTexture.lodGenerationScale, refractionTexture.lodGenerationOffset, 1.0 / this.indexOfRefraction);\n if (realTimeFiltering) {\n uniformBuffer.updateFloat2(\"vRefractionFilteringInfo\", width, Scalar.Log2(width));\n }\n if (refractionTexture.boundingBoxSize) {\n const cubeTexture = refractionTexture;\n uniformBuffer.updateVector3(\"vRefractionPosition\", cubeTexture.boundingBoxPosition);\n uniformBuffer.updateVector3(\"vRefractionSize\", cubeTexture.boundingBoxSize);\n }\n }\n if (this._isScatteringEnabled) {\n uniformBuffer.updateFloat(\"scatteringDiffusionProfile\", this._scatteringDiffusionProfileIndex);\n }\n uniformBuffer.updateColor3(\"vDiffusionDistance\", this.diffusionDistance);\n uniformBuffer.updateFloat4(\"vTintColor\", this.tintColor.r, this.tintColor.g, this.tintColor.b, Math.max(0.00001, this.tintColorAtDistance));\n uniformBuffer.updateFloat3(\"vSubSurfaceIntensity\", this.refractionIntensity, this.translucencyIntensity, 0);\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._thicknessTexture && MaterialFlags.ThicknessTextureEnabled) {\n uniformBuffer.setTexture(\"thicknessSampler\", this._thicknessTexture);\n }\n if (this._refractionIntensityTexture && MaterialFlags.RefractionIntensityTextureEnabled && defines.SS_REFRACTIONINTENSITY_TEXTURE) {\n uniformBuffer.setTexture(\"refractionIntensitySampler\", this._refractionIntensityTexture);\n }\n if (this._translucencyIntensityTexture && MaterialFlags.TranslucencyIntensityTextureEnabled && defines.SS_TRANSLUCENCYINTENSITY_TEXTURE) {\n uniformBuffer.setTexture(\"translucencyIntensitySampler\", this._translucencyIntensityTexture);\n }\n if (refractionTexture && MaterialFlags.RefractionTextureEnabled) {\n if (lodBasedMicrosurface) {\n uniformBuffer.setTexture(\"refractionSampler\", refractionTexture);\n }\n else {\n uniformBuffer.setTexture(\"refractionSampler\", refractionTexture._lodTextureMid || refractionTexture);\n uniformBuffer.setTexture(\"refractionSamplerLow\", refractionTexture._lodTextureLow || refractionTexture);\n uniformBuffer.setTexture(\"refractionSamplerHigh\", refractionTexture._lodTextureHigh || refractionTexture);\n }\n }\n }\n }\n /**\n * Returns the texture used for refraction or null if none is used.\n * @param scene defines the scene the material belongs to.\n * @returns - Refraction texture if present. If no refraction texture and refraction\n * is linked with transparency, returns environment texture. Otherwise, returns null.\n */\n _getRefractionTexture(scene) {\n if (this._refractionTexture) {\n return this._refractionTexture;\n }\n if (this._isRefractionEnabled) {\n return scene.environmentTexture;\n }\n return null;\n }\n /**\n * Returns true if alpha blending should be disabled.\n */\n get disableAlphaBlending() {\n return this._isRefractionEnabled && this._linkRefractionWithTransparency;\n }\n /**\n * Fills the list of render target textures.\n * @param renderTargets the list of render targets to update\n */\n fillRenderTargetTextures(renderTargets) {\n if (MaterialFlags.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {\n renderTargets.push(this._refractionTexture);\n }\n }\n hasTexture(texture) {\n if (this._thicknessTexture === texture) {\n return true;\n }\n if (this._refractionTexture === texture) {\n return true;\n }\n return false;\n }\n hasRenderTargetTextures() {\n if (MaterialFlags.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {\n return true;\n }\n return false;\n }\n getActiveTextures(activeTextures) {\n if (this._thicknessTexture) {\n activeTextures.push(this._thicknessTexture);\n }\n if (this._refractionTexture) {\n activeTextures.push(this._refractionTexture);\n }\n }\n getAnimatables(animatables) {\n if (this._thicknessTexture && this._thicknessTexture.animations && this._thicknessTexture.animations.length > 0) {\n animatables.push(this._thicknessTexture);\n }\n if (this._refractionTexture && this._refractionTexture.animations && this._refractionTexture.animations.length > 0) {\n animatables.push(this._refractionTexture);\n }\n }\n dispose(forceDisposeTextures) {\n if (forceDisposeTextures) {\n if (this._thicknessTexture) {\n this._thicknessTexture.dispose();\n }\n if (this._refractionTexture) {\n this._refractionTexture.dispose();\n }\n }\n }\n getClassName() {\n return \"PBRSubSurfaceConfiguration\";\n }\n addFallbacks(defines, fallbacks, currentRank) {\n if (defines.SS_SCATTERING) {\n fallbacks.addFallback(currentRank++, \"SS_SCATTERING\");\n }\n if (defines.SS_TRANSLUCENCY) {\n fallbacks.addFallback(currentRank++, \"SS_TRANSLUCENCY\");\n }\n return currentRank;\n }\n getSamplers(samplers) {\n samplers.push(\"thicknessSampler\", \"refractionIntensitySampler\", \"translucencyIntensitySampler\", \"refractionSampler\", \"refractionSamplerLow\", \"refractionSamplerHigh\");\n }\n getUniforms() {\n return {\n ubo: [\n { name: \"vRefractionMicrosurfaceInfos\", size: 4, type: \"vec4\" },\n { name: \"vRefractionFilteringInfo\", size: 2, type: \"vec2\" },\n { name: \"vTranslucencyIntensityInfos\", size: 2, type: \"vec2\" },\n { name: \"vRefractionInfos\", size: 4, type: \"vec4\" },\n { name: \"refractionMatrix\", size: 16, type: \"mat4\" },\n { name: \"vThicknessInfos\", size: 2, type: \"vec2\" },\n { name: \"vRefractionIntensityInfos\", size: 2, type: \"vec2\" },\n { name: \"thicknessMatrix\", size: 16, type: \"mat4\" },\n { name: \"refractionIntensityMatrix\", size: 16, type: \"mat4\" },\n { name: \"translucencyIntensityMatrix\", size: 16, type: \"mat4\" },\n { name: \"vThicknessParam\", size: 2, type: \"vec2\" },\n { name: \"vDiffusionDistance\", size: 3, type: \"vec3\" },\n { name: \"vTintColor\", size: 4, type: \"vec4\" },\n { name: \"vSubSurfaceIntensity\", size: 3, type: \"vec3\" },\n { name: \"vRefractionPosition\", size: 3, type: \"vec3\" },\n { name: \"vRefractionSize\", size: 3, type: \"vec3\" },\n { name: \"scatteringDiffusionProfile\", size: 1, type: \"float\" },\n ],\n };\n }\n}\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"isRefractionEnabled\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"isTranslucencyEnabled\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markScenePrePassDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"isScatteringEnabled\", void 0);\n__decorate([\n serialize()\n], PBRSubSurfaceConfiguration.prototype, \"_scatteringDiffusionProfileIndex\", void 0);\n__decorate([\n serialize()\n], PBRSubSurfaceConfiguration.prototype, \"refractionIntensity\", void 0);\n__decorate([\n serialize()\n], PBRSubSurfaceConfiguration.prototype, \"translucencyIntensity\", void 0);\n__decorate([\n serialize()\n], PBRSubSurfaceConfiguration.prototype, \"useAlbedoToTintRefraction\", void 0);\n__decorate([\n serialize()\n], PBRSubSurfaceConfiguration.prototype, \"useAlbedoToTintTranslucency\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"thicknessTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"refractionTexture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"indexOfRefraction\", void 0);\n__decorate([\n serialize()\n], PBRSubSurfaceConfiguration.prototype, \"_volumeIndexOfRefraction\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"volumeIndexOfRefraction\", null);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"invertRefractionY\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"linkRefractionWithTransparency\", void 0);\n__decorate([\n serialize()\n], PBRSubSurfaceConfiguration.prototype, \"minimumThickness\", void 0);\n__decorate([\n serialize()\n], PBRSubSurfaceConfiguration.prototype, \"maximumThickness\", void 0);\n__decorate([\n serialize()\n], PBRSubSurfaceConfiguration.prototype, \"useThicknessAsDepth\", void 0);\n__decorate([\n serializeAsColor3()\n], PBRSubSurfaceConfiguration.prototype, \"tintColor\", void 0);\n__decorate([\n serialize()\n], PBRSubSurfaceConfiguration.prototype, \"tintColorAtDistance\", void 0);\n__decorate([\n serializeAsColor3()\n], PBRSubSurfaceConfiguration.prototype, \"diffusionDistance\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"useMaskFromThicknessTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"refractionIntensityTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"translucencyIntensityTexture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSubSurfaceConfiguration.prototype, \"useGltfStyleTextures\", void 0);\n//# sourceMappingURL=pbrSubSurfaceConfiguration.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { Material } from \"./material.js\";\nimport { serialize, expandToProperty, serializeAsTexture } from \"../Misc/decorators.js\";\nimport { MaterialFlags } from \"./materialFlags.js\";\nimport { MaterialHelper } from \"./materialHelper.js\";\nimport { MaterialDefines } from \"./materialDefines.js\";\nimport { MaterialPluginBase } from \"./materialPluginBase.js\";\n\n/**\n * @internal\n */\nexport class MaterialDetailMapDefines extends MaterialDefines {\n constructor() {\n super(...arguments);\n this.DETAIL = false;\n this.DETAILDIRECTUV = 0;\n this.DETAIL_NORMALBLENDMETHOD = 0;\n }\n}\n/**\n * Plugin that implements the detail map component of a material\n *\n * Inspired from:\n * Unity: https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@9.0/manual/Mask-Map-and-Detail-Map.html and https://docs.unity3d.com/Manual/StandardShaderMaterialParameterDetail.html\n * Unreal: https://docs.unrealengine.com/en-US/Engine/Rendering/Materials/HowTo/DetailTexturing/index.html\n * Cryengine: https://docs.cryengine.com/display/SDKDOC2/Detail+Maps\n */\nexport class DetailMapConfiguration extends MaterialPluginBase {\n /** @internal */\n _markAllSubMeshesAsTexturesDirty() {\n this._enable(this._isEnabled);\n this._internalMarkAllSubMeshesAsTexturesDirty();\n }\n constructor(material, addToPluginList = true) {\n super(material, \"DetailMap\", 140, new MaterialDetailMapDefines(), addToPluginList);\n this._texture = null;\n /**\n * Defines how strongly the detail diffuse/albedo channel is blended with the regular diffuse/albedo texture\n * Bigger values mean stronger blending\n */\n this.diffuseBlendLevel = 1;\n /**\n * Defines how strongly the detail roughness channel is blended with the regular roughness value\n * Bigger values mean stronger blending. Only used with PBR materials\n */\n this.roughnessBlendLevel = 1;\n /**\n * Defines how strong the bump effect from the detail map is\n * Bigger values mean stronger effect\n */\n this.bumpLevel = 1;\n this._normalBlendMethod = Material.MATERIAL_NORMALBLENDMETHOD_WHITEOUT;\n this._isEnabled = false;\n /**\n * Enable or disable the detail map on this material\n */\n this.isEnabled = false;\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];\n }\n isReadyForSubMesh(defines, scene, engine) {\n if (!this._isEnabled) {\n return true;\n }\n if (defines._areTexturesDirty && scene.texturesEnabled) {\n if (engine.getCaps().standardDerivatives && this._texture && MaterialFlags.DetailTextureEnabled) {\n // Detail texture cannot be not blocking.\n if (!this._texture.isReady()) {\n return false;\n }\n }\n }\n return true;\n }\n prepareDefines(defines, scene) {\n if (this._isEnabled) {\n defines.DETAIL_NORMALBLENDMETHOD = this._normalBlendMethod;\n const engine = scene.getEngine();\n if (defines._areTexturesDirty) {\n if (engine.getCaps().standardDerivatives && this._texture && MaterialFlags.DetailTextureEnabled && this._isEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._texture, defines, \"DETAIL\");\n defines.DETAIL_NORMALBLENDMETHOD = this._normalBlendMethod;\n }\n else {\n defines.DETAIL = false;\n }\n }\n }\n else {\n defines.DETAIL = false;\n }\n }\n bindForSubMesh(uniformBuffer, scene) {\n if (!this._isEnabled) {\n return;\n }\n const isFrozen = this._material.isFrozen;\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\n if (this._texture && MaterialFlags.DetailTextureEnabled) {\n uniformBuffer.updateFloat4(\"vDetailInfos\", this._texture.coordinatesIndex, this.diffuseBlendLevel, this.bumpLevel, this.roughnessBlendLevel);\n MaterialHelper.BindTextureMatrix(this._texture, uniformBuffer, \"detail\");\n }\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.DetailTextureEnabled) {\n uniformBuffer.setTexture(\"detailSampler\", this._texture);\n }\n }\n }\n hasTexture(texture) {\n if (this._texture === texture) {\n return true;\n }\n return false;\n }\n getActiveTextures(activeTextures) {\n if (this._texture) {\n activeTextures.push(this._texture);\n }\n }\n getAnimatables(animatables) {\n if (this._texture && this._texture.animations && this._texture.animations.length > 0) {\n animatables.push(this._texture);\n }\n }\n dispose(forceDisposeTextures) {\n var _a;\n if (forceDisposeTextures) {\n (_a = this._texture) === null || _a === void 0 ? void 0 : _a.dispose();\n }\n }\n getClassName() {\n return \"DetailMapConfiguration\";\n }\n getSamplers(samplers) {\n samplers.push(\"detailSampler\");\n }\n getUniforms() {\n return {\n ubo: [\n { name: \"vDetailInfos\", size: 4, type: \"vec4\" },\n { name: \"detailMatrix\", size: 16, type: \"mat4\" },\n ],\n };\n }\n}\n__decorate([\n serializeAsTexture(\"detailTexture\"),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], DetailMapConfiguration.prototype, \"texture\", void 0);\n__decorate([\n serialize()\n], DetailMapConfiguration.prototype, \"diffuseBlendLevel\", void 0);\n__decorate([\n serialize()\n], DetailMapConfiguration.prototype, \"roughnessBlendLevel\", void 0);\n__decorate([\n serialize()\n], DetailMapConfiguration.prototype, \"bumpLevel\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], DetailMapConfiguration.prototype, \"normalBlendMethod\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], DetailMapConfiguration.prototype, \"isEnabled\", void 0);\n//# sourceMappingURL=material.detailMapConfiguration.js.map","import { __decorate } from \"../../tslib.es6.js\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { serialize, serializeAsImageProcessingConfiguration, expandToProperty } from \"../../Misc/decorators.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nimport { SmartArray } from \"../../Misc/smartArray.js\";\nimport { GetEnvironmentBRDFTexture } from \"../../Misc/brdfTextureTools.js\";\nimport { Scene } from \"../../scene.js\";\nimport { Vector4 } from \"../../Maths/math.vector.js\";\nimport { VertexBuffer } from \"../../Buffers/buffer.js\";\nimport { PBRBRDFConfiguration } from \"./pbrBRDFConfiguration.js\";\nimport { PrePassConfiguration } from \"../prePassConfiguration.js\";\nimport { Color3, TmpColors } from \"../../Maths/math.color.js\";\nimport { Scalar } from \"../../Maths/math.scalar.js\";\nimport { ImageProcessingConfiguration } from \"../../Materials/imageProcessingConfiguration.js\";\nimport { Material } from \"../../Materials/material.js\";\nimport { MaterialPluginEvent } from \"../materialPluginEvent.js\";\nimport { MaterialDefines } from \"../../Materials/materialDefines.js\";\nimport { PushMaterial } from \"../../Materials/pushMaterial.js\";\nimport { MaterialHelper } from \"../../Materials/materialHelper.js\";\nimport { Texture } from \"../../Materials/Textures/texture.js\";\nimport { MaterialFlags } from \"../materialFlags.js\";\n\nimport \"../../Materials/Textures/baseTexture.polynomial.js\";\nimport \"../../Shaders/pbr.fragment.js\";\nimport \"../../Shaders/pbr.vertex.js\";\nimport { EffectFallbacks } from \"../effectFallbacks.js\";\nimport { PBRClearCoatConfiguration } from \"./pbrClearCoatConfiguration.js\";\nimport { PBRIridescenceConfiguration } from \"./pbrIridescenceConfiguration.js\";\nimport { PBRAnisotropicConfiguration } from \"./pbrAnisotropicConfiguration.js\";\nimport { PBRSheenConfiguration } from \"./pbrSheenConfiguration.js\";\nimport { PBRSubSurfaceConfiguration } from \"./pbrSubSurfaceConfiguration.js\";\nimport { DetailMapConfiguration } from \"../material.detailMapConfiguration.js\";\nimport { addClipPlaneUniforms, bindClipPlane } from \"../clipPlaneMaterialHelper.js\";\nconst onCreatedEffectParameters = { effect: null, subMesh: null };\n/**\n * Manages the defines for the PBR Material.\n * @internal\n */\nexport class PBRMaterialDefines extends MaterialDefines {\n /**\n * Initializes the PBR Material defines.\n * @param externalProperties The external properties\n */\n constructor(externalProperties) {\n super(externalProperties);\n this.PBR = true;\n this.NUM_SAMPLES = \"0\";\n this.REALTIME_FILTERING = false;\n this.MAINUV1 = false;\n this.MAINUV2 = false;\n this.MAINUV3 = false;\n this.MAINUV4 = false;\n this.MAINUV5 = false;\n this.MAINUV6 = false;\n this.UV1 = false;\n this.UV2 = false;\n this.UV3 = false;\n this.UV4 = false;\n this.UV5 = false;\n this.UV6 = false;\n this.ALBEDO = false;\n this.GAMMAALBEDO = false;\n this.ALBEDODIRECTUV = 0;\n this.VERTEXCOLOR = false;\n this.BAKED_VERTEX_ANIMATION_TEXTURE = false;\n this.AMBIENT = false;\n this.AMBIENTDIRECTUV = 0;\n this.AMBIENTINGRAYSCALE = false;\n this.OPACITY = false;\n this.VERTEXALPHA = false;\n this.OPACITYDIRECTUV = 0;\n this.OPACITYRGB = false;\n this.ALPHATEST = false;\n this.DEPTHPREPASS = false;\n this.ALPHABLEND = false;\n this.ALPHAFROMALBEDO = false;\n this.ALPHATESTVALUE = \"0.5\";\n this.SPECULAROVERALPHA = false;\n this.RADIANCEOVERALPHA = false;\n this.ALPHAFRESNEL = false;\n this.LINEARALPHAFRESNEL = false;\n this.PREMULTIPLYALPHA = false;\n this.EMISSIVE = false;\n this.EMISSIVEDIRECTUV = 0;\n this.GAMMAEMISSIVE = false;\n this.REFLECTIVITY = false;\n this.REFLECTIVITY_GAMMA = false;\n this.REFLECTIVITYDIRECTUV = 0;\n this.SPECULARTERM = false;\n this.MICROSURFACEFROMREFLECTIVITYMAP = false;\n this.MICROSURFACEAUTOMATIC = false;\n this.LODBASEDMICROSFURACE = false;\n this.MICROSURFACEMAP = false;\n this.MICROSURFACEMAPDIRECTUV = 0;\n this.METALLICWORKFLOW = false;\n this.ROUGHNESSSTOREINMETALMAPALPHA = false;\n this.ROUGHNESSSTOREINMETALMAPGREEN = false;\n this.METALLNESSSTOREINMETALMAPBLUE = false;\n this.AOSTOREINMETALMAPRED = false;\n this.METALLIC_REFLECTANCE = false;\n this.METALLIC_REFLECTANCE_GAMMA = false;\n this.METALLIC_REFLECTANCEDIRECTUV = 0;\n this.METALLIC_REFLECTANCE_USE_ALPHA_ONLY = false;\n this.REFLECTANCE = false;\n this.REFLECTANCE_GAMMA = false;\n this.REFLECTANCEDIRECTUV = 0;\n this.ENVIRONMENTBRDF = false;\n this.ENVIRONMENTBRDF_RGBD = false;\n this.NORMAL = false;\n this.TANGENT = false;\n this.BUMP = false;\n this.BUMPDIRECTUV = 0;\n this.OBJECTSPACE_NORMALMAP = false;\n this.PARALLAX = false;\n this.PARALLAX_RHS = false;\n this.PARALLAXOCCLUSION = false;\n this.NORMALXYSCALE = true;\n this.LIGHTMAP = false;\n this.LIGHTMAPDIRECTUV = 0;\n this.USELIGHTMAPASSHADOWMAP = false;\n this.GAMMALIGHTMAP = false;\n this.RGBDLIGHTMAP = false;\n this.REFLECTION = false;\n this.REFLECTIONMAP_3D = false;\n this.REFLECTIONMAP_SPHERICAL = false;\n this.REFLECTIONMAP_PLANAR = false;\n this.REFLECTIONMAP_CUBIC = false;\n this.USE_LOCAL_REFLECTIONMAP_CUBIC = false;\n this.REFLECTIONMAP_PROJECTION = false;\n this.REFLECTIONMAP_SKYBOX = false;\n this.REFLECTIONMAP_EXPLICIT = false;\n this.REFLECTIONMAP_EQUIRECTANGULAR = false;\n this.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = false;\n this.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = false;\n this.INVERTCUBICMAP = false;\n this.USESPHERICALFROMREFLECTIONMAP = false;\n this.USEIRRADIANCEMAP = false;\n this.USESPHERICALINVERTEX = false;\n this.REFLECTIONMAP_OPPOSITEZ = false;\n this.LODINREFLECTIONALPHA = false;\n this.GAMMAREFLECTION = false;\n this.RGBDREFLECTION = false;\n this.LINEARSPECULARREFLECTION = false;\n this.RADIANCEOCCLUSION = false;\n this.HORIZONOCCLUSION = false;\n this.INSTANCES = false;\n this.THIN_INSTANCES = false;\n this.INSTANCESCOLOR = false;\n this.PREPASS = false;\n this.PREPASS_IRRADIANCE = false;\n this.PREPASS_IRRADIANCE_INDEX = -1;\n this.PREPASS_ALBEDO_SQRT = false;\n this.PREPASS_ALBEDO_SQRT_INDEX = -1;\n this.PREPASS_DEPTH = false;\n this.PREPASS_DEPTH_INDEX = -1;\n this.PREPASS_NORMAL = false;\n this.PREPASS_NORMAL_INDEX = -1;\n this.PREPASS_NORMAL_WORLDSPACE = false;\n this.PREPASS_POSITION = false;\n this.PREPASS_POSITION_INDEX = -1;\n this.PREPASS_VELOCITY = false;\n this.PREPASS_VELOCITY_INDEX = -1;\n this.PREPASS_REFLECTIVITY = false;\n this.PREPASS_REFLECTIVITY_INDEX = -1;\n this.SCENE_MRT_COUNT = 0;\n this.NUM_BONE_INFLUENCERS = 0;\n this.BonesPerMesh = 0;\n this.BONETEXTURE = false;\n this.BONES_VELOCITY_ENABLED = false;\n this.NONUNIFORMSCALING = false;\n this.MORPHTARGETS = false;\n this.MORPHTARGETS_NORMAL = false;\n this.MORPHTARGETS_TANGENT = false;\n this.MORPHTARGETS_UV = false;\n this.NUM_MORPH_INFLUENCERS = 0;\n this.MORPHTARGETS_TEXTURE = false;\n this.IMAGEPROCESSING = false;\n this.VIGNETTE = false;\n this.VIGNETTEBLENDMODEMULTIPLY = false;\n this.VIGNETTEBLENDMODEOPAQUE = false;\n this.TONEMAPPING = false;\n this.TONEMAPPING_ACES = false;\n this.CONTRAST = false;\n this.COLORCURVES = false;\n this.COLORGRADING = false;\n this.COLORGRADING3D = false;\n this.SAMPLER3DGREENDEPTH = false;\n this.SAMPLER3DBGRMAP = false;\n this.DITHER = false;\n this.IMAGEPROCESSINGPOSTPROCESS = false;\n this.SKIPFINALCOLORCLAMP = false;\n this.EXPOSURE = false;\n this.MULTIVIEW = false;\n this.ORDER_INDEPENDENT_TRANSPARENCY = false;\n this.ORDER_INDEPENDENT_TRANSPARENCY_16BITS = false;\n this.USEPHYSICALLIGHTFALLOFF = false;\n this.USEGLTFLIGHTFALLOFF = false;\n this.TWOSIDEDLIGHTING = false;\n this.SHADOWFLOAT = false;\n this.CLIPPLANE = false;\n this.CLIPPLANE2 = false;\n this.CLIPPLANE3 = false;\n this.CLIPPLANE4 = false;\n this.CLIPPLANE5 = false;\n this.CLIPPLANE6 = false;\n this.POINTSIZE = false;\n this.FOG = false;\n this.LOGARITHMICDEPTH = false;\n this.CAMERA_ORTHOGRAPHIC = false;\n this.CAMERA_PERSPECTIVE = false;\n this.FORCENORMALFORWARD = false;\n this.SPECULARAA = false;\n this.UNLIT = false;\n this.DECAL_AFTER_DETAIL = false;\n this.DEBUGMODE = 0;\n this.rebuild();\n }\n /**\n * Resets the PBR Material defines.\n */\n reset() {\n super.reset();\n this.ALPHATESTVALUE = \"0.5\";\n this.PBR = true;\n this.NORMALXYSCALE = true;\n }\n}\n/**\n * The Physically based material base class of BJS.\n *\n * This offers the main features of a standard PBR material.\n * For more information, please refer to the documentation :\n * https://doc.babylonjs.com/features/featuresDeepDive/materials/using/introToPBR\n */\nexport class PBRBaseMaterial extends PushMaterial {\n /**\n * Enables realtime filtering on the texture.\n */\n get realTimeFiltering() {\n return this._realTimeFiltering;\n }\n set realTimeFiltering(b) {\n this._realTimeFiltering = b;\n this.markAsDirty(1);\n }\n /**\n * Quality switch for realtime filtering\n */\n get realTimeFilteringQuality() {\n return this._realTimeFilteringQuality;\n }\n set realTimeFilteringQuality(n) {\n this._realTimeFilteringQuality = n;\n this.markAsDirty(1);\n }\n /**\n * Can this material render to several textures at once\n */\n get canRenderToMRT() {\n return true;\n }\n /**\n * Attaches a new image processing configuration to the PBR Material.\n * @param configuration\n */\n _attachImageProcessingConfiguration(configuration) {\n if (configuration === this._imageProcessingConfiguration) {\n return;\n }\n // Detaches observer.\n if (this._imageProcessingConfiguration && this._imageProcessingObserver) {\n this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);\n }\n // Pick the scene configuration if needed.\n if (!configuration) {\n this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;\n }\n else {\n this._imageProcessingConfiguration = configuration;\n }\n // Attaches observer.\n if (this._imageProcessingConfiguration) {\n this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(() => {\n this._markAllSubMeshesAsImageProcessingDirty();\n });\n }\n }\n /**\n * Instantiates a new PBRMaterial instance.\n *\n * @param name The material name\n * @param scene The scene the material will be use in.\n */\n constructor(name, scene) {\n super(name, scene);\n /**\n * Intensity of the direct lights e.g. the four lights available in your scene.\n * This impacts both the direct diffuse and specular highlights.\n * @internal\n */\n this._directIntensity = 1.0;\n /**\n * Intensity of the emissive part of the material.\n * This helps controlling the emissive effect without modifying the emissive color.\n * @internal\n */\n this._emissiveIntensity = 1.0;\n /**\n * Intensity of the environment e.g. how much the environment will light the object\n * either through harmonics for rough material or through the reflection for shiny ones.\n * @internal\n */\n this._environmentIntensity = 1.0;\n /**\n * This is a special control allowing the reduction of the specular highlights coming from the\n * four lights of the scene. Those highlights may not be needed in full environment lighting.\n * @internal\n */\n this._specularIntensity = 1.0;\n /**\n * This stores the direct, emissive, environment, and specular light intensities into a Vector4.\n */\n this._lightingInfos = new Vector4(this._directIntensity, this._emissiveIntensity, this._environmentIntensity, this._specularIntensity);\n /**\n * Debug Control allowing disabling the bump map on this material.\n * @internal\n */\n this._disableBumpMap = false;\n /**\n * AKA Diffuse Texture in standard nomenclature.\n * @internal\n */\n this._albedoTexture = null;\n /**\n * AKA Occlusion Texture in other nomenclature.\n * @internal\n */\n this._ambientTexture = null;\n /**\n * AKA Occlusion Texture Intensity in other nomenclature.\n * @internal\n */\n this._ambientTextureStrength = 1.0;\n /**\n * Defines how much the AO map is occluding the analytical lights (point spot...).\n * 1 means it completely occludes it\n * 0 mean it has no impact\n * @internal\n */\n this._ambientTextureImpactOnAnalyticalLights = PBRBaseMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS;\n /**\n * Stores the alpha values in a texture.\n * @internal\n */\n this._opacityTexture = null;\n /**\n * Stores the reflection values in a texture.\n * @internal\n */\n this._reflectionTexture = null;\n /**\n * Stores the emissive values in a texture.\n * @internal\n */\n this._emissiveTexture = null;\n /**\n * AKA Specular texture in other nomenclature.\n * @internal\n */\n this._reflectivityTexture = null;\n /**\n * Used to switch from specular/glossiness to metallic/roughness workflow.\n * @internal\n */\n this._metallicTexture = null;\n /**\n * Specifies the metallic scalar of the metallic/roughness workflow.\n * Can also be used to scale the metalness values of the metallic texture.\n * @internal\n */\n this._metallic = null;\n /**\n * Specifies the roughness scalar of the metallic/roughness workflow.\n * Can also be used to scale the roughness values of the metallic texture.\n * @internal\n */\n this._roughness = null;\n /**\n * In metallic workflow, specifies an F0 factor to help configuring the material F0.\n * By default the indexOfrefraction is used to compute F0;\n *\n * This is used as a factor against the default reflectance at normal incidence to tweak it.\n *\n * F0 = defaultF0 * metallicF0Factor * metallicReflectanceColor;\n * F90 = metallicReflectanceColor;\n * @internal\n */\n this._metallicF0Factor = 1;\n /**\n * In metallic workflow, specifies an F0 color.\n * By default the F90 is always 1;\n *\n * Please note that this factor is also used as a factor against the default reflectance at normal incidence.\n *\n * F0 = defaultF0_from_IOR * metallicF0Factor * metallicReflectanceColor\n * F90 = metallicF0Factor;\n * @internal\n */\n this._metallicReflectanceColor = Color3.White();\n /**\n * Specifies that only the A channel from _metallicReflectanceTexture should be used.\n * If false, both RGB and A channels will be used\n * @internal\n */\n this._useOnlyMetallicFromMetallicReflectanceTexture = false;\n /**\n * Defines to store metallicReflectanceColor in RGB and metallicF0Factor in A\n * This is multiply against the scalar values defined in the material.\n * @internal\n */\n this._metallicReflectanceTexture = null;\n /**\n * Defines to store reflectanceColor in RGB\n * This is multiplied against the scalar values defined in the material.\n * If both _reflectanceTexture and _metallicReflectanceTexture textures are provided and _useOnlyMetallicFromMetallicReflectanceTexture\n * is false, _metallicReflectanceTexture takes precedence and _reflectanceTexture is not used\n * @internal\n */\n this._reflectanceTexture = null;\n /**\n * Used to enable roughness/glossiness fetch from a separate channel depending on the current mode.\n * Gray Scale represents roughness in metallic mode and glossiness in specular mode.\n * @internal\n */\n this._microSurfaceTexture = null;\n /**\n * Stores surface normal data used to displace a mesh in a texture.\n * @internal\n */\n this._bumpTexture = null;\n /**\n * Stores the pre-calculated light information of a mesh in a texture.\n * @internal\n */\n this._lightmapTexture = null;\n /**\n * The color of a material in ambient lighting.\n * @internal\n */\n this._ambientColor = new Color3(0, 0, 0);\n /**\n * AKA Diffuse Color in other nomenclature.\n * @internal\n */\n this._albedoColor = new Color3(1, 1, 1);\n /**\n * AKA Specular Color in other nomenclature.\n * @internal\n */\n this._reflectivityColor = new Color3(1, 1, 1);\n /**\n * The color applied when light is reflected from a material.\n * @internal\n */\n this._reflectionColor = new Color3(1, 1, 1);\n /**\n * The color applied when light is emitted from a material.\n * @internal\n */\n this._emissiveColor = new Color3(0, 0, 0);\n /**\n * AKA Glossiness in other nomenclature.\n * @internal\n */\n this._microSurface = 0.9;\n /**\n * Specifies that the material will use the light map as a show map.\n * @internal\n */\n this._useLightmapAsShadowmap = false;\n /**\n * This parameters will enable/disable Horizon occlusion to prevent normal maps to look shiny when the normal\n * makes the reflect vector face the model (under horizon).\n * @internal\n */\n this._useHorizonOcclusion = true;\n /**\n * This parameters will enable/disable radiance occlusion by preventing the radiance to lit\n * too much the area relying on ambient texture to define their ambient occlusion.\n * @internal\n */\n this._useRadianceOcclusion = true;\n /**\n * Specifies that the alpha is coming form the albedo channel alpha channel for alpha blending.\n * @internal\n */\n this._useAlphaFromAlbedoTexture = false;\n /**\n * Specifies that the material will keeps the specular highlights over a transparent surface (only the most luminous ones).\n * A car glass is a good example of that. When sun reflects on it you can not see what is behind.\n * @internal\n */\n this._useSpecularOverAlpha = true;\n /**\n * Specifies if the reflectivity texture contains the glossiness information in its alpha channel.\n * @internal\n */\n this._useMicroSurfaceFromReflectivityMapAlpha = false;\n /**\n * Specifies if the metallic texture contains the roughness information in its alpha channel.\n * @internal\n */\n this._useRoughnessFromMetallicTextureAlpha = true;\n /**\n * Specifies if the metallic texture contains the roughness information in its green channel.\n * @internal\n */\n this._useRoughnessFromMetallicTextureGreen = false;\n /**\n * Specifies if the metallic texture contains the metallness information in its blue channel.\n * @internal\n */\n this._useMetallnessFromMetallicTextureBlue = false;\n /**\n * Specifies if the metallic texture contains the ambient occlusion information in its red channel.\n * @internal\n */\n this._useAmbientOcclusionFromMetallicTextureRed = false;\n /**\n * Specifies if the ambient texture contains the ambient occlusion information in its red channel only.\n * @internal\n */\n this._useAmbientInGrayScale = false;\n /**\n * In case the reflectivity map does not contain the microsurface information in its alpha channel,\n * The material will try to infer what glossiness each pixel should be.\n * @internal\n */\n this._useAutoMicroSurfaceFromReflectivityMap = false;\n /**\n * Defines the falloff type used in this material.\n * It by default is Physical.\n * @internal\n */\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL;\n /**\n * Specifies that the material will keeps the reflection highlights over a transparent surface (only the most luminous ones).\n * A car glass is a good example of that. When the street lights reflects on it you can not see what is behind.\n * @internal\n */\n this._useRadianceOverAlpha = true;\n /**\n * Allows using an object space normal map (instead of tangent space).\n * @internal\n */\n this._useObjectSpaceNormalMap = false;\n /**\n * Allows using the bump map in parallax mode.\n * @internal\n */\n this._useParallax = false;\n /**\n * Allows using the bump map in parallax occlusion mode.\n * @internal\n */\n this._useParallaxOcclusion = false;\n /**\n * Controls the scale bias of the parallax mode.\n * @internal\n */\n this._parallaxScaleBias = 0.05;\n /**\n * If sets to true, disables all the lights affecting the material.\n * @internal\n */\n this._disableLighting = false;\n /**\n * Number of Simultaneous lights allowed on the material.\n * @internal\n */\n this._maxSimultaneousLights = 4;\n /**\n * If sets to true, x component of normal map value will be inverted (x = 1.0 - x).\n * @internal\n */\n this._invertNormalMapX = false;\n /**\n * If sets to true, y component of normal map value will be inverted (y = 1.0 - y).\n * @internal\n */\n this._invertNormalMapY = false;\n /**\n * If sets to true and backfaceCulling is false, normals will be flipped on the backside.\n * @internal\n */\n this._twoSidedLighting = false;\n /**\n * Defines the alpha limits in alpha test mode.\n * @internal\n */\n this._alphaCutOff = 0.4;\n /**\n * Enforces alpha test in opaque or blend mode in order to improve the performances of some situations.\n * @internal\n */\n this._forceAlphaTest = false;\n /**\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\n * And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)\n * @internal\n */\n this._useAlphaFresnel = false;\n /**\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\n * And/Or occlude the blended part. (alpha stays linear to compute the fresnel)\n * @internal\n */\n this._useLinearAlphaFresnel = false;\n /**\n * Specifies the environment BRDF texture used to compute the scale and offset roughness values\n * from cos theta and roughness:\n * http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf\n * @internal\n */\n this._environmentBRDFTexture = null;\n /**\n * Force the shader to compute irradiance in the fragment shader in order to take bump in account.\n * @internal\n */\n this._forceIrradianceInFragment = false;\n this._realTimeFiltering = false;\n this._realTimeFilteringQuality = 8;\n /**\n * Force normal to face away from face.\n * @internal\n */\n this._forceNormalForward = false;\n /**\n * Enables specular anti aliasing in the PBR shader.\n * It will both interacts on the Geometry for analytical and IBL lighting.\n * It also prefilter the roughness map based on the bump values.\n * @internal\n */\n this._enableSpecularAntiAliasing = false;\n /**\n * Keep track of the image processing observer to allow dispose and replace.\n */\n this._imageProcessingObserver = null;\n /**\n * Stores the available render targets.\n */\n this._renderTargets = new SmartArray(16);\n /**\n * Sets the global ambient color for the material used in lighting calculations.\n */\n this._globalAmbientColor = new Color3(0, 0, 0);\n /**\n * Enables the use of logarithmic depth buffers, which is good for wide depth buffers.\n */\n this._useLogarithmicDepth = false;\n /**\n * If set to true, no lighting calculations will be applied.\n */\n this._unlit = false;\n /**\n * If sets to true, the decal map will be applied after the detail map. Else, it is applied before (default: false)\n */\n this._applyDecalMapAfterDetailMap = false;\n this._debugMode = 0;\n /**\n * @internal\n * This is reserved for the inspector.\n * Defines the material debug mode.\n * It helps seeing only some components of the material while troubleshooting.\n */\n this.debugMode = 0;\n /**\n * @internal\n * This is reserved for the inspector.\n * Specify from where on screen the debug mode should start.\n * The value goes from -1 (full screen) to 1 (not visible)\n * It helps with side by side comparison against the final render\n * This defaults to -1\n */\n this.debugLimit = -1;\n /**\n * @internal\n * This is reserved for the inspector.\n * As the default viewing range might not be enough (if the ambient is really small for instance)\n * You can use the factor to better multiply the final value.\n */\n this.debugFactor = 1;\n this._cacheHasRenderTargetTextures = false;\n this.brdf = new PBRBRDFConfiguration(this);\n this.clearCoat = new PBRClearCoatConfiguration(this);\n this.iridescence = new PBRIridescenceConfiguration(this);\n this.anisotropy = new PBRAnisotropicConfiguration(this);\n this.sheen = new PBRSheenConfiguration(this);\n this.subSurface = new PBRSubSurfaceConfiguration(this);\n this.detailMap = new DetailMapConfiguration(this);\n // Setup the default processing configuration to the scene.\n this._attachImageProcessingConfiguration(null);\n this.getRenderTargetTextures = () => {\n this._renderTargets.reset();\n if (MaterialFlags.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n this._renderTargets.push(this._reflectionTexture);\n }\n this._eventInfo.renderTargets = this._renderTargets;\n this._callbackPluginEventFillRenderTargetTextures(this._eventInfo);\n return this._renderTargets;\n };\n this._environmentBRDFTexture = GetEnvironmentBRDFTexture(this.getScene());\n this.prePassConfiguration = new PrePassConfiguration();\n }\n /**\n * Gets a boolean indicating that current material needs to register RTT\n */\n get hasRenderTargetTextures() {\n if (MaterialFlags.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n return true;\n }\n return this._cacheHasRenderTargetTextures;\n }\n /**\n * Can this material render to prepass\n */\n get isPrePassCapable() {\n return !this.disableDepthWrite;\n }\n /**\n * Gets the name of the material class.\n */\n getClassName() {\n return \"PBRBaseMaterial\";\n }\n /**\n * Enabled the use of logarithmic depth buffers, which is good for wide depth buffers.\n */\n get useLogarithmicDepth() {\n return this._useLogarithmicDepth;\n }\n /**\n * Enabled the use of logarithmic depth buffers, which is good for wide depth buffers.\n */\n set useLogarithmicDepth(value) {\n this._useLogarithmicDepth = value && this.getScene().getEngine().getCaps().fragmentDepthSupported;\n }\n /**\n * Returns true if alpha blending should be disabled.\n */\n get _disableAlphaBlending() {\n var _a;\n return (this._transparencyMode === PBRBaseMaterial.PBRMATERIAL_OPAQUE ||\n this._transparencyMode === PBRBaseMaterial.PBRMATERIAL_ALPHATEST ||\n ((_a = this.subSurface) === null || _a === void 0 ? void 0 : _a.disableAlphaBlending));\n }\n /**\n * Specifies whether or not this material should be rendered in alpha blend mode.\n */\n needAlphaBlending() {\n if (this._disableAlphaBlending) {\n return false;\n }\n return this.alpha < 1.0 || this._opacityTexture != null || this._shouldUseAlphaFromAlbedoTexture();\n }\n /**\n * Specifies whether or not this material should be rendered in alpha test mode.\n */\n needAlphaTesting() {\n var _a;\n if (this._forceAlphaTest) {\n return true;\n }\n if ((_a = this.subSurface) === null || _a === void 0 ? void 0 : _a.disableAlphaBlending) {\n return false;\n }\n return this._hasAlphaChannel() && (this._transparencyMode == null || this._transparencyMode === PBRBaseMaterial.PBRMATERIAL_ALPHATEST);\n }\n /**\n * Specifies whether or not the alpha value of the albedo texture should be used for alpha blending.\n */\n _shouldUseAlphaFromAlbedoTexture() {\n return this._albedoTexture != null && this._albedoTexture.hasAlpha && this._useAlphaFromAlbedoTexture && this._transparencyMode !== PBRBaseMaterial.PBRMATERIAL_OPAQUE;\n }\n /**\n * Specifies whether or not there is a usable alpha channel for transparency.\n */\n _hasAlphaChannel() {\n return (this._albedoTexture != null && this._albedoTexture.hasAlpha) || this._opacityTexture != null;\n }\n /**\n * Gets the texture used for the alpha test.\n */\n getAlphaTestTexture() {\n return this._albedoTexture;\n }\n /**\n * Specifies that the submesh is ready to be used.\n * @param mesh - BJS mesh.\n * @param subMesh - A submesh of the BJS mesh. Used to check if it is ready.\n * @param useInstances - Specifies that instances should be used.\n * @returns - boolean indicating that the submesh is ready or not.\n */\n isReadyForSubMesh(mesh, subMesh, useInstances) {\n var _a;\n if (!this._uniformBufferLayoutBuilt) {\n this.buildUniformLayout();\n }\n if (subMesh.effect && this.isFrozen) {\n if (subMesh.effect._wasPreviouslyReady && subMesh.effect._wasPreviouslyUsingInstances === useInstances) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n this._callbackPluginEventGeneric(MaterialPluginEvent.GetDefineNames, this._eventInfo);\n subMesh.materialDefines = new PBRMaterialDefines(this._eventInfo.defineNames);\n }\n const defines = subMesh.materialDefines;\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const scene = this.getScene();\n const engine = scene.getEngine();\n if (defines._areTexturesDirty) {\n this._eventInfo.hasRenderTargetTextures = false;\n this._callbackPluginEventHasRenderTargetTextures(this._eventInfo);\n this._cacheHasRenderTargetTextures = this._eventInfo.hasRenderTargetTextures;\n if (scene.texturesEnabled) {\n if (this._albedoTexture && MaterialFlags.DiffuseTextureEnabled) {\n if (!this._albedoTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (this._ambientTexture && MaterialFlags.AmbientTextureEnabled) {\n if (!this._ambientTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (this._opacityTexture && MaterialFlags.OpacityTextureEnabled) {\n if (!this._opacityTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n const reflectionTexture = this._getReflectionTexture();\n if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {\n if (!reflectionTexture.isReadyOrNotBlocking()) {\n return false;\n }\n if (reflectionTexture.irradianceTexture) {\n if (!reflectionTexture.irradianceTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n else {\n // Not ready until spherical are ready too.\n if (!reflectionTexture.sphericalPolynomial && ((_a = reflectionTexture.getInternalTexture()) === null || _a === void 0 ? void 0 : _a._sphericalPolynomialPromise)) {\n return false;\n }\n }\n }\n if (this._lightmapTexture && MaterialFlags.LightmapTextureEnabled) {\n if (!this._lightmapTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (this._emissiveTexture && MaterialFlags.EmissiveTextureEnabled) {\n if (!this._emissiveTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (MaterialFlags.SpecularTextureEnabled) {\n if (this._metallicTexture) {\n if (!this._metallicTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n else if (this._reflectivityTexture) {\n if (!this._reflectivityTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (this._metallicReflectanceTexture) {\n if (!this._metallicReflectanceTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (this._reflectanceTexture) {\n if (!this._reflectanceTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (this._microSurfaceTexture) {\n if (!this._microSurfaceTexture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n }\n if (engine.getCaps().standardDerivatives && this._bumpTexture && MaterialFlags.BumpTextureEnabled && !this._disableBumpMap) {\n // Bump texture cannot be not blocking.\n if (!this._bumpTexture.isReady()) {\n return false;\n }\n }\n if (this._environmentBRDFTexture && MaterialFlags.ReflectionTextureEnabled) {\n // This is blocking.\n if (!this._environmentBRDFTexture.isReady()) {\n return false;\n }\n }\n }\n }\n this._eventInfo.isReadyForSubMesh = true;\n this._eventInfo.defines = defines;\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventIsReadyForSubMesh(this._eventInfo);\n if (!this._eventInfo.isReadyForSubMesh) {\n return false;\n }\n if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) {\n if (!this._imageProcessingConfiguration.isReady()) {\n return false;\n }\n }\n if (!engine.getCaps().standardDerivatives && !mesh.isVerticesDataPresent(VertexBuffer.NormalKind)) {\n mesh.createNormals(true);\n Logger.Warn(\"PBRMaterial: Normals have been created for the mesh: \" + mesh.name);\n }\n const previousEffect = subMesh.effect;\n const lightDisposed = defines._areLightsDisposed;\n let effect = this._prepareEffect(mesh, defines, this.onCompiled, this.onError, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);\n let forceWasNotReadyPreviously = false;\n if (effect) {\n if (this._onEffectCreatedObservable) {\n onCreatedEffectParameters.effect = effect;\n onCreatedEffectParameters.subMesh = subMesh;\n this._onEffectCreatedObservable.notifyObservers(onCreatedEffectParameters);\n }\n // Use previous effect while new one is compiling\n if (this.allowShaderHotSwapping && previousEffect && !effect.isReady()) {\n effect = previousEffect;\n defines.markAsUnprocessed();\n forceWasNotReadyPreviously = this.isFrozen;\n if (lightDisposed) {\n // re register in case it takes more than one frame.\n defines._areLightsDisposed = true;\n return false;\n }\n }\n else {\n scene.resetCachedMaterial();\n subMesh.setEffect(effect, defines, this._materialContext);\n }\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = forceWasNotReadyPreviously ? false : true;\n subMesh.effect._wasPreviouslyUsingInstances = !!useInstances;\n this._checkScenePerformancePriority();\n return true;\n }\n /**\n * Specifies if the material uses metallic roughness workflow.\n * @returns boolean specifying if the material uses metallic roughness workflow.\n */\n isMetallicWorkflow() {\n if (this._metallic != null || this._roughness != null || this._metallicTexture) {\n return true;\n }\n return false;\n }\n _prepareEffect(mesh, defines, onCompiled = null, onError = null, useInstances = null, useClipPlane = null, useThinInstances) {\n this._prepareDefines(mesh, defines, useInstances, useClipPlane, useThinInstances);\n if (!defines.isDirty) {\n return null;\n }\n defines.markAsProcessed();\n const scene = this.getScene();\n const engine = scene.getEngine();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n let fallbackRank = 0;\n if (defines.USESPHERICALINVERTEX) {\n fallbacks.addFallback(fallbackRank++, \"USESPHERICALINVERTEX\");\n }\n if (defines.FOG) {\n fallbacks.addFallback(fallbackRank, \"FOG\");\n }\n if (defines.SPECULARAA) {\n fallbacks.addFallback(fallbackRank, \"SPECULARAA\");\n }\n if (defines.POINTSIZE) {\n fallbacks.addFallback(fallbackRank, \"POINTSIZE\");\n }\n if (defines.LOGARITHMICDEPTH) {\n fallbacks.addFallback(fallbackRank, \"LOGARITHMICDEPTH\");\n }\n if (defines.PARALLAX) {\n fallbacks.addFallback(fallbackRank, \"PARALLAX\");\n }\n if (defines.PARALLAX_RHS) {\n fallbacks.addFallback(fallbackRank, \"PARALLAX_RHS\");\n }\n if (defines.PARALLAXOCCLUSION) {\n fallbacks.addFallback(fallbackRank++, \"PARALLAXOCCLUSION\");\n }\n if (defines.ENVIRONMENTBRDF) {\n fallbacks.addFallback(fallbackRank++, \"ENVIRONMENTBRDF\");\n }\n if (defines.TANGENT) {\n fallbacks.addFallback(fallbackRank++, \"TANGENT\");\n }\n if (defines.BUMP) {\n fallbacks.addFallback(fallbackRank++, \"BUMP\");\n }\n fallbackRank = MaterialHelper.HandleFallbacksForShadows(defines, fallbacks, this._maxSimultaneousLights, fallbackRank++);\n if (defines.SPECULARTERM) {\n fallbacks.addFallback(fallbackRank++, \"SPECULARTERM\");\n }\n if (defines.USESPHERICALFROMREFLECTIONMAP) {\n fallbacks.addFallback(fallbackRank++, \"USESPHERICALFROMREFLECTIONMAP\");\n }\n if (defines.USEIRRADIANCEMAP) {\n fallbacks.addFallback(fallbackRank++, \"USEIRRADIANCEMAP\");\n }\n if (defines.LIGHTMAP) {\n fallbacks.addFallback(fallbackRank++, \"LIGHTMAP\");\n }\n if (defines.NORMAL) {\n fallbacks.addFallback(fallbackRank++, \"NORMAL\");\n }\n if (defines.AMBIENT) {\n fallbacks.addFallback(fallbackRank++, \"AMBIENT\");\n }\n if (defines.EMISSIVE) {\n fallbacks.addFallback(fallbackRank++, \"EMISSIVE\");\n }\n if (defines.VERTEXCOLOR) {\n fallbacks.addFallback(fallbackRank++, \"VERTEXCOLOR\");\n }\n if (defines.MORPHTARGETS) {\n fallbacks.addFallback(fallbackRank++, \"MORPHTARGETS\");\n }\n if (defines.MULTIVIEW) {\n fallbacks.addFallback(0, \"MULTIVIEW\");\n }\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n for (let i = 1; i <= 6; ++i) {\n if (defines[\"UV\" + i]) {\n attribs.push(`uv${i === 1 ? \"\" : i}`);\n }\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n if (defines.INSTANCESCOLOR) {\n attribs.push(VertexBuffer.ColorInstanceKind);\n }\n MaterialHelper.PrepareAttributesForBones(attribs, mesh, defines, fallbacks);\n MaterialHelper.PrepareAttributesForInstances(attribs, defines);\n MaterialHelper.PrepareAttributesForMorphTargets(attribs, mesh, defines);\n MaterialHelper.PrepareAttributesForBakedVertexAnimation(attribs, mesh, defines);\n let shaderName = \"pbr\";\n const uniforms = [\n \"world\",\n \"view\",\n \"viewProjection\",\n \"vEyePosition\",\n \"vLightsType\",\n \"vAmbientColor\",\n \"vAlbedoColor\",\n \"vReflectivityColor\",\n \"vMetallicReflectanceFactors\",\n \"vEmissiveColor\",\n \"visibility\",\n \"vReflectionColor\",\n \"vFogInfos\",\n \"vFogColor\",\n \"pointSize\",\n \"vAlbedoInfos\",\n \"vAmbientInfos\",\n \"vOpacityInfos\",\n \"vReflectionInfos\",\n \"vReflectionPosition\",\n \"vReflectionSize\",\n \"vEmissiveInfos\",\n \"vReflectivityInfos\",\n \"vReflectionFilteringInfo\",\n \"vMetallicReflectanceInfos\",\n \"vReflectanceInfos\",\n \"vMicroSurfaceSamplerInfos\",\n \"vBumpInfos\",\n \"vLightmapInfos\",\n \"mBones\",\n \"albedoMatrix\",\n \"ambientMatrix\",\n \"opacityMatrix\",\n \"reflectionMatrix\",\n \"emissiveMatrix\",\n \"reflectivityMatrix\",\n \"normalMatrix\",\n \"microSurfaceSamplerMatrix\",\n \"bumpMatrix\",\n \"lightmapMatrix\",\n \"metallicReflectanceMatrix\",\n \"reflectanceMatrix\",\n \"vLightingIntensity\",\n \"logarithmicDepthConstant\",\n \"vSphericalX\",\n \"vSphericalY\",\n \"vSphericalZ\",\n \"vSphericalXX_ZZ\",\n \"vSphericalYY_ZZ\",\n \"vSphericalZZ\",\n \"vSphericalXY\",\n \"vSphericalYZ\",\n \"vSphericalZX\",\n \"vSphericalL00\",\n \"vSphericalL1_1\",\n \"vSphericalL10\",\n \"vSphericalL11\",\n \"vSphericalL2_2\",\n \"vSphericalL2_1\",\n \"vSphericalL20\",\n \"vSphericalL21\",\n \"vSphericalL22\",\n \"vReflectionMicrosurfaceInfos\",\n \"vTangentSpaceParams\",\n \"boneTextureWidth\",\n \"vDebugMode\",\n \"morphTargetTextureInfo\",\n \"morphTargetTextureIndices\",\n ];\n const samplers = [\n \"albedoSampler\",\n \"reflectivitySampler\",\n \"ambientSampler\",\n \"emissiveSampler\",\n \"bumpSampler\",\n \"lightmapSampler\",\n \"opacitySampler\",\n \"reflectionSampler\",\n \"reflectionSamplerLow\",\n \"reflectionSamplerHigh\",\n \"irradianceSampler\",\n \"microSurfaceSampler\",\n \"environmentBrdfSampler\",\n \"boneSampler\",\n \"metallicReflectanceSampler\",\n \"reflectanceSampler\",\n \"morphTargets\",\n \"oitDepthSampler\",\n \"oitFrontColorSampler\",\n ];\n const uniformBuffers = [\"Material\", \"Scene\", \"Mesh\"];\n const indexParameters = { maxSimultaneousLights: this._maxSimultaneousLights, maxSimultaneousMorphTargets: defines.NUM_MORPH_INFLUENCERS };\n this._eventInfo.fallbacks = fallbacks;\n this._eventInfo.fallbackRank = fallbackRank;\n this._eventInfo.defines = defines;\n this._eventInfo.uniforms = uniforms;\n this._eventInfo.attributes = attribs;\n this._eventInfo.samplers = samplers;\n this._eventInfo.uniformBuffersNames = uniformBuffers;\n this._eventInfo.customCode = undefined;\n this._eventInfo.mesh = mesh;\n this._eventInfo.indexParameters = indexParameters;\n this._callbackPluginEventGeneric(MaterialPluginEvent.PrepareEffect, this._eventInfo);\n PrePassConfiguration.AddUniforms(uniforms);\n PrePassConfiguration.AddSamplers(samplers);\n addClipPlaneUniforms(uniforms);\n if (ImageProcessingConfiguration) {\n ImageProcessingConfiguration.PrepareUniforms(uniforms, defines);\n ImageProcessingConfiguration.PrepareSamplers(samplers, defines);\n }\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: this._maxSimultaneousLights,\n });\n const csnrOptions = {};\n if (this.customShaderNameResolve) {\n shaderName = this.customShaderNameResolve(shaderName, uniforms, uniformBuffers, samplers, defines, attribs, csnrOptions);\n }\n const join = defines.toString();\n const effect = engine.createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: onCompiled,\n onError: onError,\n indexParameters,\n processFinalCode: csnrOptions.processFinalCode,\n processCodeAfterIncludes: this._eventInfo.customCode,\n multiTarget: defines.PREPASS,\n }, engine);\n this._eventInfo.customCode = undefined;\n return effect;\n }\n _prepareDefines(mesh, defines, useInstances = null, useClipPlane = null, useThinInstances = false) {\n var _a;\n const scene = this.getScene();\n const engine = scene.getEngine();\n // Lights\n MaterialHelper.PrepareDefinesForLights(scene, mesh, defines, true, this._maxSimultaneousLights, this._disableLighting);\n defines._needNormals = true;\n // Multiview\n MaterialHelper.PrepareDefinesForMultiview(scene, defines);\n // PrePass\n const oit = this.needAlphaBlendingForMesh(mesh) && this.getScene().useOrderIndependentTransparency;\n MaterialHelper.PrepareDefinesForPrePass(scene, defines, this.canRenderToMRT && !oit);\n // Order independant transparency\n MaterialHelper.PrepareDefinesForOIT(scene, defines, oit);\n // Textures\n defines.METALLICWORKFLOW = this.isMetallicWorkflow();\n if (defines._areTexturesDirty) {\n defines._needUVs = false;\n for (let i = 1; i <= 6; ++i) {\n defines[\"MAINUV\" + i] = false;\n }\n if (scene.texturesEnabled) {\n defines.ALBEDODIRECTUV = 0;\n defines.AMBIENTDIRECTUV = 0;\n defines.OPACITYDIRECTUV = 0;\n defines.EMISSIVEDIRECTUV = 0;\n defines.REFLECTIVITYDIRECTUV = 0;\n defines.MICROSURFACEMAPDIRECTUV = 0;\n defines.METALLIC_REFLECTANCEDIRECTUV = 0;\n defines.REFLECTANCEDIRECTUV = 0;\n defines.BUMPDIRECTUV = 0;\n defines.LIGHTMAPDIRECTUV = 0;\n if (engine.getCaps().textureLOD) {\n defines.LODBASEDMICROSFURACE = true;\n }\n if (this._albedoTexture && MaterialFlags.DiffuseTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._albedoTexture, defines, \"ALBEDO\");\n defines.GAMMAALBEDO = this._albedoTexture.gammaSpace;\n }\n else {\n defines.ALBEDO = false;\n }\n if (this._ambientTexture && MaterialFlags.AmbientTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._ambientTexture, defines, \"AMBIENT\");\n defines.AMBIENTINGRAYSCALE = this._useAmbientInGrayScale;\n }\n else {\n defines.AMBIENT = false;\n }\n if (this._opacityTexture && MaterialFlags.OpacityTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._opacityTexture, defines, \"OPACITY\");\n defines.OPACITYRGB = this._opacityTexture.getAlphaFromRGB;\n }\n else {\n defines.OPACITY = false;\n }\n const reflectionTexture = this._getReflectionTexture();\n if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {\n defines.REFLECTION = true;\n defines.GAMMAREFLECTION = reflectionTexture.gammaSpace;\n defines.RGBDREFLECTION = reflectionTexture.isRGBD;\n defines.LODINREFLECTIONALPHA = reflectionTexture.lodLevelInAlpha;\n defines.LINEARSPECULARREFLECTION = reflectionTexture.linearSpecularLOD;\n if (this.realTimeFiltering && this.realTimeFilteringQuality > 0) {\n defines.NUM_SAMPLES = \"\" + this.realTimeFilteringQuality;\n if (engine._features.needTypeSuffixInShaderConstants) {\n defines.NUM_SAMPLES = defines.NUM_SAMPLES + \"u\";\n }\n defines.REALTIME_FILTERING = true;\n }\n else {\n defines.REALTIME_FILTERING = false;\n }\n defines.INVERTCUBICMAP = reflectionTexture.coordinatesMode === Texture.INVCUBIC_MODE;\n defines.REFLECTIONMAP_3D = reflectionTexture.isCube;\n defines.REFLECTIONMAP_OPPOSITEZ = defines.REFLECTIONMAP_3D && this.getScene().useRightHandedSystem ? !reflectionTexture.invertZ : reflectionTexture.invertZ;\n defines.REFLECTIONMAP_CUBIC = false;\n defines.REFLECTIONMAP_EXPLICIT = false;\n defines.REFLECTIONMAP_PLANAR = false;\n defines.REFLECTIONMAP_PROJECTION = false;\n defines.REFLECTIONMAP_SKYBOX = false;\n defines.REFLECTIONMAP_SPHERICAL = false;\n defines.REFLECTIONMAP_EQUIRECTANGULAR = false;\n defines.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = false;\n defines.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = false;\n switch (reflectionTexture.coordinatesMode) {\n case Texture.EXPLICIT_MODE:\n defines.REFLECTIONMAP_EXPLICIT = true;\n break;\n case Texture.PLANAR_MODE:\n defines.REFLECTIONMAP_PLANAR = true;\n break;\n case Texture.PROJECTION_MODE:\n defines.REFLECTIONMAP_PROJECTION = true;\n break;\n case Texture.SKYBOX_MODE:\n defines.REFLECTIONMAP_SKYBOX = true;\n break;\n case Texture.SPHERICAL_MODE:\n defines.REFLECTIONMAP_SPHERICAL = true;\n break;\n case Texture.EQUIRECTANGULAR_MODE:\n defines.REFLECTIONMAP_EQUIRECTANGULAR = true;\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MODE:\n defines.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = true;\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:\n defines.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = true;\n break;\n case Texture.CUBIC_MODE:\n case Texture.INVCUBIC_MODE:\n default:\n defines.REFLECTIONMAP_CUBIC = true;\n defines.USE_LOCAL_REFLECTIONMAP_CUBIC = reflectionTexture.boundingBoxSize ? true : false;\n break;\n }\n if (reflectionTexture.coordinatesMode !== Texture.SKYBOX_MODE) {\n if (reflectionTexture.irradianceTexture) {\n defines.USEIRRADIANCEMAP = true;\n defines.USESPHERICALFROMREFLECTIONMAP = false;\n }\n // Assume using spherical polynomial if the reflection texture is a cube map\n else if (reflectionTexture.isCube) {\n defines.USESPHERICALFROMREFLECTIONMAP = true;\n defines.USEIRRADIANCEMAP = false;\n if (this._forceIrradianceInFragment || this.realTimeFiltering || this._twoSidedLighting || engine.getCaps().maxVaryingVectors <= 8) {\n defines.USESPHERICALINVERTEX = false;\n }\n else {\n defines.USESPHERICALINVERTEX = true;\n }\n }\n }\n }\n else {\n defines.REFLECTION = false;\n defines.REFLECTIONMAP_3D = false;\n defines.REFLECTIONMAP_SPHERICAL = false;\n defines.REFLECTIONMAP_PLANAR = false;\n defines.REFLECTIONMAP_CUBIC = false;\n defines.USE_LOCAL_REFLECTIONMAP_CUBIC = false;\n defines.REFLECTIONMAP_PROJECTION = false;\n defines.REFLECTIONMAP_SKYBOX = false;\n defines.REFLECTIONMAP_EXPLICIT = false;\n defines.REFLECTIONMAP_EQUIRECTANGULAR = false;\n defines.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = false;\n defines.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = false;\n defines.INVERTCUBICMAP = false;\n defines.USESPHERICALFROMREFLECTIONMAP = false;\n defines.USEIRRADIANCEMAP = false;\n defines.USESPHERICALINVERTEX = false;\n defines.REFLECTIONMAP_OPPOSITEZ = false;\n defines.LODINREFLECTIONALPHA = false;\n defines.GAMMAREFLECTION = false;\n defines.RGBDREFLECTION = false;\n defines.LINEARSPECULARREFLECTION = false;\n }\n if (this._lightmapTexture && MaterialFlags.LightmapTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._lightmapTexture, defines, \"LIGHTMAP\");\n defines.USELIGHTMAPASSHADOWMAP = this._useLightmapAsShadowmap;\n defines.GAMMALIGHTMAP = this._lightmapTexture.gammaSpace;\n defines.RGBDLIGHTMAP = this._lightmapTexture.isRGBD;\n }\n else {\n defines.LIGHTMAP = false;\n }\n if (this._emissiveTexture && MaterialFlags.EmissiveTextureEnabled) {\n MaterialHelper.PrepareDefinesForMergedUV(this._emissiveTexture, defines, \"EMISSIVE\");\n defines.GAMMAEMISSIVE = this._emissiveTexture.gammaSpace;\n }\n else {\n defines.EMISSIVE = false;\n }\n if (MaterialFlags.SpecularTextureEnabled) {\n if (this._metallicTexture) {\n MaterialHelper.PrepareDefinesForMergedUV(this._metallicTexture, defines, \"REFLECTIVITY\");\n defines.ROUGHNESSSTOREINMETALMAPALPHA = this._useRoughnessFromMetallicTextureAlpha;\n defines.ROUGHNESSSTOREINMETALMAPGREEN = !this._useRoughnessFromMetallicTextureAlpha && this._useRoughnessFromMetallicTextureGreen;\n defines.METALLNESSSTOREINMETALMAPBLUE = this._useMetallnessFromMetallicTextureBlue;\n defines.AOSTOREINMETALMAPRED = this._useAmbientOcclusionFromMetallicTextureRed;\n defines.REFLECTIVITY_GAMMA = false;\n }\n else if (this._reflectivityTexture) {\n MaterialHelper.PrepareDefinesForMergedUV(this._reflectivityTexture, defines, \"REFLECTIVITY\");\n defines.MICROSURFACEFROMREFLECTIVITYMAP = this._useMicroSurfaceFromReflectivityMapAlpha;\n defines.MICROSURFACEAUTOMATIC = this._useAutoMicroSurfaceFromReflectivityMap;\n defines.REFLECTIVITY_GAMMA = this._reflectivityTexture.gammaSpace;\n }\n else {\n defines.REFLECTIVITY = false;\n }\n if (this._metallicReflectanceTexture || this._reflectanceTexture) {\n const identicalTextures = this._metallicReflectanceTexture !== null &&\n this._metallicReflectanceTexture._texture === ((_a = this._reflectanceTexture) === null || _a === void 0 ? void 0 : _a._texture) &&\n this._metallicReflectanceTexture.checkTransformsAreIdentical(this._reflectanceTexture);\n defines.METALLIC_REFLECTANCE_USE_ALPHA_ONLY = this._useOnlyMetallicFromMetallicReflectanceTexture && !identicalTextures;\n if (this._metallicReflectanceTexture) {\n MaterialHelper.PrepareDefinesForMergedUV(this._metallicReflectanceTexture, defines, \"METALLIC_REFLECTANCE\");\n defines.METALLIC_REFLECTANCE_GAMMA = this._metallicReflectanceTexture.gammaSpace;\n }\n else {\n defines.METALLIC_REFLECTANCE = false;\n }\n if (this._reflectanceTexture &&\n !identicalTextures &&\n (!this._metallicReflectanceTexture || (this._metallicReflectanceTexture && this._useOnlyMetallicFromMetallicReflectanceTexture))) {\n MaterialHelper.PrepareDefinesForMergedUV(this._reflectanceTexture, defines, \"REFLECTANCE\");\n defines.REFLECTANCE_GAMMA = this._reflectanceTexture.gammaSpace;\n }\n else {\n defines.REFLECTANCE = false;\n }\n }\n else {\n defines.METALLIC_REFLECTANCE = false;\n defines.REFLECTANCE = false;\n }\n if (this._microSurfaceTexture) {\n MaterialHelper.PrepareDefinesForMergedUV(this._microSurfaceTexture, defines, \"MICROSURFACEMAP\");\n }\n else {\n defines.MICROSURFACEMAP = false;\n }\n }\n else {\n defines.REFLECTIVITY = false;\n defines.MICROSURFACEMAP = false;\n }\n if (engine.getCaps().standardDerivatives && this._bumpTexture && MaterialFlags.BumpTextureEnabled && !this._disableBumpMap) {\n MaterialHelper.PrepareDefinesForMergedUV(this._bumpTexture, defines, \"BUMP\");\n if (this._useParallax && this._albedoTexture && MaterialFlags.DiffuseTextureEnabled) {\n defines.PARALLAX = true;\n defines.PARALLAX_RHS = scene.useRightHandedSystem;\n defines.PARALLAXOCCLUSION = !!this._useParallaxOcclusion;\n }\n else {\n defines.PARALLAX = false;\n }\n defines.OBJECTSPACE_NORMALMAP = this._useObjectSpaceNormalMap;\n }\n else {\n defines.BUMP = false;\n defines.PARALLAX = false;\n defines.PARALLAX_RHS = false;\n defines.PARALLAXOCCLUSION = false;\n defines.OBJECTSPACE_NORMALMAP = false;\n }\n if (this._environmentBRDFTexture && MaterialFlags.ReflectionTextureEnabled) {\n defines.ENVIRONMENTBRDF = true;\n defines.ENVIRONMENTBRDF_RGBD = this._environmentBRDFTexture.isRGBD;\n }\n else {\n defines.ENVIRONMENTBRDF = false;\n defines.ENVIRONMENTBRDF_RGBD = false;\n }\n if (this._shouldUseAlphaFromAlbedoTexture()) {\n defines.ALPHAFROMALBEDO = true;\n }\n else {\n defines.ALPHAFROMALBEDO = false;\n }\n }\n defines.SPECULAROVERALPHA = this._useSpecularOverAlpha;\n if (this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_STANDARD) {\n defines.USEPHYSICALLIGHTFALLOFF = false;\n defines.USEGLTFLIGHTFALLOFF = false;\n }\n else if (this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_GLTF) {\n defines.USEPHYSICALLIGHTFALLOFF = false;\n defines.USEGLTFLIGHTFALLOFF = true;\n }\n else {\n defines.USEPHYSICALLIGHTFALLOFF = true;\n defines.USEGLTFLIGHTFALLOFF = false;\n }\n defines.RADIANCEOVERALPHA = this._useRadianceOverAlpha;\n if (!this.backFaceCulling && this._twoSidedLighting) {\n defines.TWOSIDEDLIGHTING = true;\n }\n else {\n defines.TWOSIDEDLIGHTING = false;\n }\n defines.SPECULARAA = engine.getCaps().standardDerivatives && this._enableSpecularAntiAliasing;\n }\n if (defines._areTexturesDirty || defines._areMiscDirty) {\n defines.ALPHATESTVALUE = `${this._alphaCutOff}${this._alphaCutOff % 1 === 0 ? \".\" : \"\"}`;\n defines.PREMULTIPLYALPHA = this.alphaMode === 7 || this.alphaMode === 8;\n defines.ALPHABLEND = this.needAlphaBlendingForMesh(mesh);\n defines.ALPHAFRESNEL = this._useAlphaFresnel || this._useLinearAlphaFresnel;\n defines.LINEARALPHAFRESNEL = this._useLinearAlphaFresnel;\n }\n if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) {\n this._imageProcessingConfiguration.prepareDefines(defines);\n }\n defines.FORCENORMALFORWARD = this._forceNormalForward;\n defines.RADIANCEOCCLUSION = this._useRadianceOcclusion;\n defines.HORIZONOCCLUSION = this._useHorizonOcclusion;\n // Misc.\n if (defines._areMiscDirty) {\n MaterialHelper.PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh) || this._forceAlphaTest, defines, this._applyDecalMapAfterDetailMap);\n defines.UNLIT = this._unlit || ((this.pointsCloud || this.wireframe) && !mesh.isVerticesDataPresent(VertexBuffer.NormalKind));\n defines.DEBUGMODE = this._debugMode;\n }\n // Values that need to be evaluated on every frame\n MaterialHelper.PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances ? true : false, useClipPlane, useThinInstances);\n // External config\n this._eventInfo.defines = defines;\n this._eventInfo.mesh = mesh;\n this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo);\n // Attribs\n MaterialHelper.PrepareDefinesForAttributes(mesh, defines, true, true, true, this._transparencyMode !== PBRBaseMaterial.PBRMATERIAL_OPAQUE);\n // External config\n this._callbackPluginEventPrepareDefines(this._eventInfo);\n }\n /**\n * Force shader compilation\n * @param mesh\n * @param onCompiled\n * @param options\n */\n forceCompilation(mesh, onCompiled, options) {\n const localOptions = Object.assign({ clipPlane: false, useInstances: false }, options);\n if (!this._uniformBufferLayoutBuilt) {\n this.buildUniformLayout();\n }\n this._callbackPluginEventGeneric(MaterialPluginEvent.GetDefineNames, this._eventInfo);\n const defines = new PBRMaterialDefines(this._eventInfo.defineNames);\n const effect = this._prepareEffect(mesh, defines, undefined, undefined, localOptions.useInstances, localOptions.clipPlane, mesh.hasThinInstances);\n if (this._onEffectCreatedObservable) {\n onCreatedEffectParameters.effect = effect;\n onCreatedEffectParameters.subMesh = null;\n this._onEffectCreatedObservable.notifyObservers(onCreatedEffectParameters);\n }\n if (effect.isReady()) {\n if (onCompiled) {\n onCompiled(this);\n }\n }\n else {\n effect.onCompileObservable.add(() => {\n if (onCompiled) {\n onCompiled(this);\n }\n });\n }\n }\n /**\n * Initializes the uniform buffer layout for the shader.\n */\n buildUniformLayout() {\n // Order is important !\n const ubo = this._uniformBuffer;\n ubo.addUniform(\"vAlbedoInfos\", 2);\n ubo.addUniform(\"vAmbientInfos\", 4);\n ubo.addUniform(\"vOpacityInfos\", 2);\n ubo.addUniform(\"vEmissiveInfos\", 2);\n ubo.addUniform(\"vLightmapInfos\", 2);\n ubo.addUniform(\"vReflectivityInfos\", 3);\n ubo.addUniform(\"vMicroSurfaceSamplerInfos\", 2);\n ubo.addUniform(\"vReflectionInfos\", 2);\n ubo.addUniform(\"vReflectionFilteringInfo\", 2);\n ubo.addUniform(\"vReflectionPosition\", 3);\n ubo.addUniform(\"vReflectionSize\", 3);\n ubo.addUniform(\"vBumpInfos\", 3);\n ubo.addUniform(\"albedoMatrix\", 16);\n ubo.addUniform(\"ambientMatrix\", 16);\n ubo.addUniform(\"opacityMatrix\", 16);\n ubo.addUniform(\"emissiveMatrix\", 16);\n ubo.addUniform(\"lightmapMatrix\", 16);\n ubo.addUniform(\"reflectivityMatrix\", 16);\n ubo.addUniform(\"microSurfaceSamplerMatrix\", 16);\n ubo.addUniform(\"bumpMatrix\", 16);\n ubo.addUniform(\"vTangentSpaceParams\", 2);\n ubo.addUniform(\"reflectionMatrix\", 16);\n ubo.addUniform(\"vReflectionColor\", 3);\n ubo.addUniform(\"vAlbedoColor\", 4);\n ubo.addUniform(\"vLightingIntensity\", 4);\n ubo.addUniform(\"vReflectionMicrosurfaceInfos\", 3);\n ubo.addUniform(\"pointSize\", 1);\n ubo.addUniform(\"vReflectivityColor\", 4);\n ubo.addUniform(\"vEmissiveColor\", 3);\n ubo.addUniform(\"vAmbientColor\", 3);\n ubo.addUniform(\"vDebugMode\", 2);\n ubo.addUniform(\"vMetallicReflectanceFactors\", 4);\n ubo.addUniform(\"vMetallicReflectanceInfos\", 2);\n ubo.addUniform(\"metallicReflectanceMatrix\", 16);\n ubo.addUniform(\"vReflectanceInfos\", 2);\n ubo.addUniform(\"reflectanceMatrix\", 16);\n ubo.addUniform(\"vSphericalL00\", 3);\n ubo.addUniform(\"vSphericalL1_1\", 3);\n ubo.addUniform(\"vSphericalL10\", 3);\n ubo.addUniform(\"vSphericalL11\", 3);\n ubo.addUniform(\"vSphericalL2_2\", 3);\n ubo.addUniform(\"vSphericalL2_1\", 3);\n ubo.addUniform(\"vSphericalL20\", 3);\n ubo.addUniform(\"vSphericalL21\", 3);\n ubo.addUniform(\"vSphericalL22\", 3);\n ubo.addUniform(\"vSphericalX\", 3);\n ubo.addUniform(\"vSphericalY\", 3);\n ubo.addUniform(\"vSphericalZ\", 3);\n ubo.addUniform(\"vSphericalXX_ZZ\", 3);\n ubo.addUniform(\"vSphericalYY_ZZ\", 3);\n ubo.addUniform(\"vSphericalZZ\", 3);\n ubo.addUniform(\"vSphericalXY\", 3);\n ubo.addUniform(\"vSphericalYZ\", 3);\n ubo.addUniform(\"vSphericalZX\", 3);\n super.buildUniformLayout();\n }\n /**\n * Binds the submesh data.\n * @param world - The world matrix.\n * @param mesh - The BJS mesh.\n * @param subMesh - A submesh of the BJS mesh.\n */\n bindForSubMesh(world, mesh, subMesh) {\n var _a, _b, _c, _d;\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices Mesh.\n mesh.getMeshUniformBuffer().bindToEffect(effect, \"Mesh\");\n mesh.transferToEffect(world);\n const engine = scene.getEngine();\n // Binding unconditionally\n this._uniformBuffer.bindToEffect(effect, \"Material\");\n this.prePassConfiguration.bindForSubMesh(this._activeEffect, scene, mesh, world, this.isFrozen);\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventHardBindForSubMesh(this._eventInfo);\n // Normal Matrix\n if (defines.OBJECTSPACE_NORMALMAP) {\n world.toNormalMatrix(this._normalMatrix);\n this.bindOnlyNormalMatrix(this._normalMatrix);\n }\n const mustRebind = effect._forceRebindOnNextCall || this._mustRebind(scene, effect, mesh.visibility);\n // Bones\n MaterialHelper.BindBonesParameters(mesh, this._activeEffect, this.prePassConfiguration);\n let reflectionTexture = null;\n const ubo = this._uniformBuffer;\n if (mustRebind) {\n this.bindViewProjection(effect);\n reflectionTexture = this._getReflectionTexture();\n if (!ubo.useUbo || !this.isFrozen || !ubo.isSync || effect._forceRebindOnNextCall) {\n // Texture uniforms\n if (scene.texturesEnabled) {\n if (this._albedoTexture && MaterialFlags.DiffuseTextureEnabled) {\n ubo.updateFloat2(\"vAlbedoInfos\", this._albedoTexture.coordinatesIndex, this._albedoTexture.level);\n MaterialHelper.BindTextureMatrix(this._albedoTexture, ubo, \"albedo\");\n }\n if (this._ambientTexture && MaterialFlags.AmbientTextureEnabled) {\n ubo.updateFloat4(\"vAmbientInfos\", this._ambientTexture.coordinatesIndex, this._ambientTexture.level, this._ambientTextureStrength, this._ambientTextureImpactOnAnalyticalLights);\n MaterialHelper.BindTextureMatrix(this._ambientTexture, ubo, \"ambient\");\n }\n if (this._opacityTexture && MaterialFlags.OpacityTextureEnabled) {\n ubo.updateFloat2(\"vOpacityInfos\", this._opacityTexture.coordinatesIndex, this._opacityTexture.level);\n MaterialHelper.BindTextureMatrix(this._opacityTexture, ubo, \"opacity\");\n }\n if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {\n ubo.updateMatrix(\"reflectionMatrix\", reflectionTexture.getReflectionTextureMatrix());\n ubo.updateFloat2(\"vReflectionInfos\", reflectionTexture.level, 0);\n if (reflectionTexture.boundingBoxSize) {\n const cubeTexture = reflectionTexture;\n ubo.updateVector3(\"vReflectionPosition\", cubeTexture.boundingBoxPosition);\n ubo.updateVector3(\"vReflectionSize\", cubeTexture.boundingBoxSize);\n }\n if (this.realTimeFiltering) {\n const width = reflectionTexture.getSize().width;\n ubo.updateFloat2(\"vReflectionFilteringInfo\", width, Scalar.Log2(width));\n }\n if (!defines.USEIRRADIANCEMAP) {\n const polynomials = reflectionTexture.sphericalPolynomial;\n if (defines.USESPHERICALFROMREFLECTIONMAP && polynomials) {\n if (defines.SPHERICAL_HARMONICS) {\n const preScaledHarmonics = polynomials.preScaledHarmonics;\n ubo.updateVector3(\"vSphericalL00\", preScaledHarmonics.l00);\n ubo.updateVector3(\"vSphericalL1_1\", preScaledHarmonics.l1_1);\n ubo.updateVector3(\"vSphericalL10\", preScaledHarmonics.l10);\n ubo.updateVector3(\"vSphericalL11\", preScaledHarmonics.l11);\n ubo.updateVector3(\"vSphericalL2_2\", preScaledHarmonics.l2_2);\n ubo.updateVector3(\"vSphericalL2_1\", preScaledHarmonics.l2_1);\n ubo.updateVector3(\"vSphericalL20\", preScaledHarmonics.l20);\n ubo.updateVector3(\"vSphericalL21\", preScaledHarmonics.l21);\n ubo.updateVector3(\"vSphericalL22\", preScaledHarmonics.l22);\n }\n else {\n ubo.updateFloat3(\"vSphericalX\", polynomials.x.x, polynomials.x.y, polynomials.x.z);\n ubo.updateFloat3(\"vSphericalY\", polynomials.y.x, polynomials.y.y, polynomials.y.z);\n ubo.updateFloat3(\"vSphericalZ\", polynomials.z.x, polynomials.z.y, polynomials.z.z);\n ubo.updateFloat3(\"vSphericalXX_ZZ\", polynomials.xx.x - polynomials.zz.x, polynomials.xx.y - polynomials.zz.y, polynomials.xx.z - polynomials.zz.z);\n ubo.updateFloat3(\"vSphericalYY_ZZ\", polynomials.yy.x - polynomials.zz.x, polynomials.yy.y - polynomials.zz.y, polynomials.yy.z - polynomials.zz.z);\n ubo.updateFloat3(\"vSphericalZZ\", polynomials.zz.x, polynomials.zz.y, polynomials.zz.z);\n ubo.updateFloat3(\"vSphericalXY\", polynomials.xy.x, polynomials.xy.y, polynomials.xy.z);\n ubo.updateFloat3(\"vSphericalYZ\", polynomials.yz.x, polynomials.yz.y, polynomials.yz.z);\n ubo.updateFloat3(\"vSphericalZX\", polynomials.zx.x, polynomials.zx.y, polynomials.zx.z);\n }\n }\n }\n ubo.updateFloat3(\"vReflectionMicrosurfaceInfos\", reflectionTexture.getSize().width, reflectionTexture.lodGenerationScale, reflectionTexture.lodGenerationOffset);\n }\n if (this._emissiveTexture && MaterialFlags.EmissiveTextureEnabled) {\n ubo.updateFloat2(\"vEmissiveInfos\", this._emissiveTexture.coordinatesIndex, this._emissiveTexture.level);\n MaterialHelper.BindTextureMatrix(this._emissiveTexture, ubo, \"emissive\");\n }\n if (this._lightmapTexture && MaterialFlags.LightmapTextureEnabled) {\n ubo.updateFloat2(\"vLightmapInfos\", this._lightmapTexture.coordinatesIndex, this._lightmapTexture.level);\n MaterialHelper.BindTextureMatrix(this._lightmapTexture, ubo, \"lightmap\");\n }\n if (MaterialFlags.SpecularTextureEnabled) {\n if (this._metallicTexture) {\n ubo.updateFloat3(\"vReflectivityInfos\", this._metallicTexture.coordinatesIndex, this._metallicTexture.level, this._ambientTextureStrength);\n MaterialHelper.BindTextureMatrix(this._metallicTexture, ubo, \"reflectivity\");\n }\n else if (this._reflectivityTexture) {\n ubo.updateFloat3(\"vReflectivityInfos\", this._reflectivityTexture.coordinatesIndex, this._reflectivityTexture.level, 1.0);\n MaterialHelper.BindTextureMatrix(this._reflectivityTexture, ubo, \"reflectivity\");\n }\n if (this._metallicReflectanceTexture) {\n ubo.updateFloat2(\"vMetallicReflectanceInfos\", this._metallicReflectanceTexture.coordinatesIndex, this._metallicReflectanceTexture.level);\n MaterialHelper.BindTextureMatrix(this._metallicReflectanceTexture, ubo, \"metallicReflectance\");\n }\n if (this._reflectanceTexture && defines.REFLECTANCE) {\n ubo.updateFloat2(\"vReflectanceInfos\", this._reflectanceTexture.coordinatesIndex, this._reflectanceTexture.level);\n MaterialHelper.BindTextureMatrix(this._reflectanceTexture, ubo, \"reflectance\");\n }\n if (this._microSurfaceTexture) {\n ubo.updateFloat2(\"vMicroSurfaceSamplerInfos\", this._microSurfaceTexture.coordinatesIndex, this._microSurfaceTexture.level);\n MaterialHelper.BindTextureMatrix(this._microSurfaceTexture, ubo, \"microSurfaceSampler\");\n }\n }\n if (this._bumpTexture && engine.getCaps().standardDerivatives && MaterialFlags.BumpTextureEnabled && !this._disableBumpMap) {\n ubo.updateFloat3(\"vBumpInfos\", this._bumpTexture.coordinatesIndex, this._bumpTexture.level, this._parallaxScaleBias);\n MaterialHelper.BindTextureMatrix(this._bumpTexture, ubo, \"bump\");\n if (scene._mirroredCameraPosition) {\n ubo.updateFloat2(\"vTangentSpaceParams\", this._invertNormalMapX ? 1.0 : -1.0, this._invertNormalMapY ? 1.0 : -1.0);\n }\n else {\n ubo.updateFloat2(\"vTangentSpaceParams\", this._invertNormalMapX ? -1.0 : 1.0, this._invertNormalMapY ? -1.0 : 1.0);\n }\n }\n }\n // Point size\n if (this.pointsCloud) {\n ubo.updateFloat(\"pointSize\", this.pointSize);\n }\n // Colors\n if (defines.METALLICWORKFLOW) {\n TmpColors.Color3[0].r = this._metallic === undefined || this._metallic === null ? 1 : this._metallic;\n TmpColors.Color3[0].g = this._roughness === undefined || this._roughness === null ? 1 : this._roughness;\n ubo.updateColor4(\"vReflectivityColor\", TmpColors.Color3[0], 1);\n const ior = (_b = (_a = this.subSurface) === null || _a === void 0 ? void 0 : _a._indexOfRefraction) !== null && _b !== void 0 ? _b : 1.5;\n const outsideIOR = 1; // consider air as clear coat and other layers would remap in the shader.\n // We are here deriving our default reflectance from a common value for none metallic surface.\n // Based of the schlick fresnel approximation model\n // for dielectrics.\n const f0 = Math.pow((ior - outsideIOR) / (ior + outsideIOR), 2);\n // Tweak the default F0 and F90 based on our given setup\n this._metallicReflectanceColor.scaleToRef(f0 * this._metallicF0Factor, TmpColors.Color3[0]);\n const metallicF90 = this._metallicF0Factor;\n ubo.updateColor4(\"vMetallicReflectanceFactors\", TmpColors.Color3[0], metallicF90);\n }\n else {\n ubo.updateColor4(\"vReflectivityColor\", this._reflectivityColor, this._microSurface);\n }\n ubo.updateColor3(\"vEmissiveColor\", MaterialFlags.EmissiveTextureEnabled ? this._emissiveColor : Color3.BlackReadOnly);\n ubo.updateColor3(\"vReflectionColor\", this._reflectionColor);\n if (!defines.SS_REFRACTION && ((_c = this.subSurface) === null || _c === void 0 ? void 0 : _c._linkRefractionWithTransparency)) {\n ubo.updateColor4(\"vAlbedoColor\", this._albedoColor, 1);\n }\n else {\n ubo.updateColor4(\"vAlbedoColor\", this._albedoColor, this.alpha);\n }\n // Misc\n this._lightingInfos.x = this._directIntensity;\n this._lightingInfos.y = this._emissiveIntensity;\n this._lightingInfos.z = this._environmentIntensity * scene.environmentIntensity;\n this._lightingInfos.w = this._specularIntensity;\n ubo.updateVector4(\"vLightingIntensity\", this._lightingInfos);\n // Colors\n scene.ambientColor.multiplyToRef(this._ambientColor, this._globalAmbientColor);\n ubo.updateColor3(\"vAmbientColor\", this._globalAmbientColor);\n ubo.updateFloat2(\"vDebugMode\", this.debugLimit, this.debugFactor);\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._albedoTexture && MaterialFlags.DiffuseTextureEnabled) {\n ubo.setTexture(\"albedoSampler\", this._albedoTexture);\n }\n if (this._ambientTexture && MaterialFlags.AmbientTextureEnabled) {\n ubo.setTexture(\"ambientSampler\", this._ambientTexture);\n }\n if (this._opacityTexture && MaterialFlags.OpacityTextureEnabled) {\n ubo.setTexture(\"opacitySampler\", this._opacityTexture);\n }\n if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {\n if (defines.LODBASEDMICROSFURACE) {\n ubo.setTexture(\"reflectionSampler\", reflectionTexture);\n }\n else {\n ubo.setTexture(\"reflectionSampler\", reflectionTexture._lodTextureMid || reflectionTexture);\n ubo.setTexture(\"reflectionSamplerLow\", reflectionTexture._lodTextureLow || reflectionTexture);\n ubo.setTexture(\"reflectionSamplerHigh\", reflectionTexture._lodTextureHigh || reflectionTexture);\n }\n if (defines.USEIRRADIANCEMAP) {\n ubo.setTexture(\"irradianceSampler\", reflectionTexture.irradianceTexture);\n }\n }\n if (defines.ENVIRONMENTBRDF) {\n ubo.setTexture(\"environmentBrdfSampler\", this._environmentBRDFTexture);\n }\n if (this._emissiveTexture && MaterialFlags.EmissiveTextureEnabled) {\n ubo.setTexture(\"emissiveSampler\", this._emissiveTexture);\n }\n if (this._lightmapTexture && MaterialFlags.LightmapTextureEnabled) {\n ubo.setTexture(\"lightmapSampler\", this._lightmapTexture);\n }\n if (MaterialFlags.SpecularTextureEnabled) {\n if (this._metallicTexture) {\n ubo.setTexture(\"reflectivitySampler\", this._metallicTexture);\n }\n else if (this._reflectivityTexture) {\n ubo.setTexture(\"reflectivitySampler\", this._reflectivityTexture);\n }\n if (this._metallicReflectanceTexture) {\n ubo.setTexture(\"metallicReflectanceSampler\", this._metallicReflectanceTexture);\n }\n if (this._reflectanceTexture && defines.REFLECTANCE) {\n ubo.setTexture(\"reflectanceSampler\", this._reflectanceTexture);\n }\n if (this._microSurfaceTexture) {\n ubo.setTexture(\"microSurfaceSampler\", this._microSurfaceTexture);\n }\n }\n if (this._bumpTexture && engine.getCaps().standardDerivatives && MaterialFlags.BumpTextureEnabled && !this._disableBumpMap) {\n ubo.setTexture(\"bumpSampler\", this._bumpTexture);\n }\n }\n // OIT with depth peeling\n if (this.getScene().useOrderIndependentTransparency && this.needAlphaBlendingForMesh(mesh)) {\n this.getScene().depthPeelingRenderer.bind(effect);\n }\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventBindForSubMesh(this._eventInfo);\n // Clip plane\n bindClipPlane(this._activeEffect, this, scene);\n this.bindEyePosition(effect);\n }\n else if (scene.getEngine()._features.needToAlwaysBindUniformBuffers) {\n this._needToBindSceneUbo = true;\n }\n if (mustRebind || !this.isFrozen) {\n // Lights\n if (scene.lightsEnabled && !this._disableLighting) {\n MaterialHelper.BindLights(scene, mesh, this._activeEffect, defines, this._maxSimultaneousLights);\n }\n // View\n if ((scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) ||\n reflectionTexture ||\n this.subSurface.refractionTexture ||\n mesh.receiveShadows ||\n defines.PREPASS) {\n this.bindView(effect);\n }\n // Fog\n MaterialHelper.BindFogParameters(scene, mesh, this._activeEffect, true);\n // Morph targets\n if (defines.NUM_MORPH_INFLUENCERS) {\n MaterialHelper.BindMorphTargetParameters(mesh, this._activeEffect);\n }\n if (defines.BAKED_VERTEX_ANIMATION_TEXTURE) {\n (_d = mesh.bakedVertexAnimationManager) === null || _d === void 0 ? void 0 : _d.bind(effect, defines.INSTANCES);\n }\n // image processing\n this._imageProcessingConfiguration.bind(this._activeEffect);\n // Log. depth\n MaterialHelper.BindLogDepth(defines, this._activeEffect, scene);\n }\n this._afterBind(mesh, this._activeEffect);\n ubo.update();\n }\n /**\n * Returns the animatable textures.\n * If material have animatable metallic texture, then reflectivity texture will not be returned, even if it has animations.\n * @returns - Array of animatable textures.\n */\n getAnimatables() {\n const results = super.getAnimatables();\n if (this._albedoTexture && this._albedoTexture.animations && this._albedoTexture.animations.length > 0) {\n results.push(this._albedoTexture);\n }\n if (this._ambientTexture && this._ambientTexture.animations && this._ambientTexture.animations.length > 0) {\n results.push(this._ambientTexture);\n }\n if (this._opacityTexture && this._opacityTexture.animations && this._opacityTexture.animations.length > 0) {\n results.push(this._opacityTexture);\n }\n if (this._reflectionTexture && this._reflectionTexture.animations && this._reflectionTexture.animations.length > 0) {\n results.push(this._reflectionTexture);\n }\n if (this._emissiveTexture && this._emissiveTexture.animations && this._emissiveTexture.animations.length > 0) {\n results.push(this._emissiveTexture);\n }\n if (this._metallicTexture && this._metallicTexture.animations && this._metallicTexture.animations.length > 0) {\n results.push(this._metallicTexture);\n }\n else if (this._reflectivityTexture && this._reflectivityTexture.animations && this._reflectivityTexture.animations.length > 0) {\n results.push(this._reflectivityTexture);\n }\n if (this._bumpTexture && this._bumpTexture.animations && this._bumpTexture.animations.length > 0) {\n results.push(this._bumpTexture);\n }\n if (this._lightmapTexture && this._lightmapTexture.animations && this._lightmapTexture.animations.length > 0) {\n results.push(this._lightmapTexture);\n }\n if (this._metallicReflectanceTexture && this._metallicReflectanceTexture.animations && this._metallicReflectanceTexture.animations.length > 0) {\n results.push(this._metallicReflectanceTexture);\n }\n if (this._reflectanceTexture && this._reflectanceTexture.animations && this._reflectanceTexture.animations.length > 0) {\n results.push(this._reflectanceTexture);\n }\n if (this._microSurfaceTexture && this._microSurfaceTexture.animations && this._microSurfaceTexture.animations.length > 0) {\n results.push(this._microSurfaceTexture);\n }\n return results;\n }\n /**\n * Returns the texture used for reflections.\n * @returns - Reflection texture if present. Otherwise, returns the environment texture.\n */\n _getReflectionTexture() {\n if (this._reflectionTexture) {\n return this._reflectionTexture;\n }\n return this.getScene().environmentTexture;\n }\n /**\n * Returns an array of the actively used textures.\n * @returns - Array of BaseTextures\n */\n getActiveTextures() {\n const activeTextures = super.getActiveTextures();\n if (this._albedoTexture) {\n activeTextures.push(this._albedoTexture);\n }\n if (this._ambientTexture) {\n activeTextures.push(this._ambientTexture);\n }\n if (this._opacityTexture) {\n activeTextures.push(this._opacityTexture);\n }\n if (this._reflectionTexture) {\n activeTextures.push(this._reflectionTexture);\n }\n if (this._emissiveTexture) {\n activeTextures.push(this._emissiveTexture);\n }\n if (this._reflectivityTexture) {\n activeTextures.push(this._reflectivityTexture);\n }\n if (this._metallicTexture) {\n activeTextures.push(this._metallicTexture);\n }\n if (this._metallicReflectanceTexture) {\n activeTextures.push(this._metallicReflectanceTexture);\n }\n if (this._reflectanceTexture) {\n activeTextures.push(this._reflectanceTexture);\n }\n if (this._microSurfaceTexture) {\n activeTextures.push(this._microSurfaceTexture);\n }\n if (this._bumpTexture) {\n activeTextures.push(this._bumpTexture);\n }\n if (this._lightmapTexture) {\n activeTextures.push(this._lightmapTexture);\n }\n return activeTextures;\n }\n /**\n * Checks to see if a texture is used in the material.\n * @param texture - Base texture to use.\n * @returns - Boolean specifying if a texture is used in the material.\n */\n hasTexture(texture) {\n if (super.hasTexture(texture)) {\n return true;\n }\n if (this._albedoTexture === texture) {\n return true;\n }\n if (this._ambientTexture === texture) {\n return true;\n }\n if (this._opacityTexture === texture) {\n return true;\n }\n if (this._reflectionTexture === texture) {\n return true;\n }\n if (this._emissiveTexture === texture) {\n return true;\n }\n if (this._reflectivityTexture === texture) {\n return true;\n }\n if (this._metallicTexture === texture) {\n return true;\n }\n if (this._metallicReflectanceTexture === texture) {\n return true;\n }\n if (this._reflectanceTexture === texture) {\n return true;\n }\n if (this._microSurfaceTexture === texture) {\n return true;\n }\n if (this._bumpTexture === texture) {\n return true;\n }\n if (this._lightmapTexture === texture) {\n return true;\n }\n return false;\n }\n /**\n * Sets the required values to the prepass renderer.\n * It can't be sets when subsurface scattering of this material is disabled.\n * When scene have ability to enable subsurface prepass effect, it will enable.\n */\n setPrePassRenderer() {\n var _a;\n if (!((_a = this.subSurface) === null || _a === void 0 ? void 0 : _a.isScatteringEnabled)) {\n return false;\n }\n const subSurfaceConfiguration = this.getScene().enableSubSurfaceForPrePass();\n if (subSurfaceConfiguration) {\n subSurfaceConfiguration.enabled = true;\n }\n return true;\n }\n /**\n * Disposes the resources of the material.\n * @param forceDisposeEffect - Forces the disposal of effects.\n * @param forceDisposeTextures - Forces the disposal of all textures.\n */\n dispose(forceDisposeEffect, forceDisposeTextures) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n if (forceDisposeTextures) {\n if (this._environmentBRDFTexture && this.getScene().environmentBRDFTexture !== this._environmentBRDFTexture) {\n this._environmentBRDFTexture.dispose();\n }\n (_a = this._albedoTexture) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._ambientTexture) === null || _b === void 0 ? void 0 : _b.dispose();\n (_c = this._opacityTexture) === null || _c === void 0 ? void 0 : _c.dispose();\n (_d = this._reflectionTexture) === null || _d === void 0 ? void 0 : _d.dispose();\n (_e = this._emissiveTexture) === null || _e === void 0 ? void 0 : _e.dispose();\n (_f = this._metallicTexture) === null || _f === void 0 ? void 0 : _f.dispose();\n (_g = this._reflectivityTexture) === null || _g === void 0 ? void 0 : _g.dispose();\n (_h = this._bumpTexture) === null || _h === void 0 ? void 0 : _h.dispose();\n (_j = this._lightmapTexture) === null || _j === void 0 ? void 0 : _j.dispose();\n (_k = this._metallicReflectanceTexture) === null || _k === void 0 ? void 0 : _k.dispose();\n (_l = this._reflectanceTexture) === null || _l === void 0 ? void 0 : _l.dispose();\n (_m = this._microSurfaceTexture) === null || _m === void 0 ? void 0 : _m.dispose();\n }\n this._renderTargets.dispose();\n if (this._imageProcessingConfiguration && this._imageProcessingObserver) {\n this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);\n }\n super.dispose(forceDisposeEffect, forceDisposeTextures);\n }\n}\n/**\n * PBRMaterialTransparencyMode: No transparency mode, Alpha channel is not use.\n */\nPBRBaseMaterial.PBRMATERIAL_OPAQUE = Material.MATERIAL_OPAQUE;\n/**\n * PBRMaterialTransparencyMode: Alpha Test mode, pixel are discarded below a certain threshold defined by the alpha cutoff value.\n */\nPBRBaseMaterial.PBRMATERIAL_ALPHATEST = Material.MATERIAL_ALPHATEST;\n/**\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\n */\nPBRBaseMaterial.PBRMATERIAL_ALPHABLEND = Material.MATERIAL_ALPHABLEND;\n/**\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\n * They are also discarded below the alpha cutoff threshold to improve performances.\n */\nPBRBaseMaterial.PBRMATERIAL_ALPHATESTANDBLEND = Material.MATERIAL_ALPHATESTANDBLEND;\n/**\n * Defines the default value of how much AO map is occluding the analytical lights\n * (point spot...).\n */\nPBRBaseMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS = 0;\n/**\n * PBRMaterialLightFalloff Physical: light is falling off following the inverse squared distance law.\n */\nPBRBaseMaterial.LIGHTFALLOFF_PHYSICAL = 0;\n/**\n * PBRMaterialLightFalloff gltf: light is falling off as described in the gltf moving to PBR document\n * to enhance interoperability with other engines.\n */\nPBRBaseMaterial.LIGHTFALLOFF_GLTF = 1;\n/**\n * PBRMaterialLightFalloff Standard: light is falling off like in the standard material\n * to enhance interoperability with other materials.\n */\nPBRBaseMaterial.LIGHTFALLOFF_STANDARD = 2;\n__decorate([\n serializeAsImageProcessingConfiguration()\n], PBRBaseMaterial.prototype, \"_imageProcessingConfiguration\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\n], PBRBaseMaterial.prototype, \"debugMode\", void 0);\n__decorate([\n serialize()\n], PBRBaseMaterial.prototype, \"useLogarithmicDepth\", null);\n//# sourceMappingURL=pbrBaseMaterial.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize, SerializationHelper, serializeAsColor3, expandToProperty, serializeAsTexture } from \"../../Misc/decorators.js\";\nimport { GetEnvironmentBRDFTexture } from \"../../Misc/brdfTextureTools.js\";\nimport { Color3 } from \"../../Maths/math.color.js\";\nimport { PBRBaseMaterial } from \"./pbrBaseMaterial.js\";\nimport { RegisterClass } from \"../../Misc/typeStore.js\";\nimport { Material } from \"../material.js\";\n/**\n * The Physically based material of BJS.\n *\n * This offers the main features of a standard PBR material.\n * For more information, please refer to the documentation :\n * https://doc.babylonjs.com/features/featuresDeepDive/materials/using/introToPBR\n */\nexport class PBRMaterial extends PBRBaseMaterial {\n /**\n * Stores the refracted light information in a texture.\n */\n get refractionTexture() {\n return this.subSurface.refractionTexture;\n }\n set refractionTexture(value) {\n this.subSurface.refractionTexture = value;\n if (value) {\n this.subSurface.isRefractionEnabled = true;\n }\n else if (!this.subSurface.linkRefractionWithTransparency) {\n this.subSurface.isRefractionEnabled = false;\n }\n }\n /**\n * Index of refraction of the material base layer.\n * https://en.wikipedia.org/wiki/List_of_refractive_indices\n *\n * This does not only impact refraction but also the Base F0 of Dielectric Materials.\n *\n * From dielectric fresnel rules: F0 = square((iorT - iorI) / (iorT + iorI))\n */\n get indexOfRefraction() {\n return this.subSurface.indexOfRefraction;\n }\n set indexOfRefraction(value) {\n this.subSurface.indexOfRefraction = value;\n }\n /**\n * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.\n */\n get invertRefractionY() {\n return this.subSurface.invertRefractionY;\n }\n set invertRefractionY(value) {\n this.subSurface.invertRefractionY = value;\n }\n /**\n * This parameters will make the material used its opacity to control how much it is refracting against not.\n * Materials half opaque for instance using refraction could benefit from this control.\n */\n get linkRefractionWithTransparency() {\n return this.subSurface.linkRefractionWithTransparency;\n }\n set linkRefractionWithTransparency(value) {\n this.subSurface.linkRefractionWithTransparency = value;\n if (value) {\n this.subSurface.isRefractionEnabled = true;\n }\n }\n /**\n * BJS is using an hardcoded light falloff based on a manually sets up range.\n * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.\n * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.\n */\n get usePhysicalLightFalloff() {\n return this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL;\n }\n /**\n * BJS is using an hardcoded light falloff based on a manually sets up range.\n * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.\n * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.\n */\n set usePhysicalLightFalloff(value) {\n if (value !== this.usePhysicalLightFalloff) {\n // Ensure the effect will be rebuilt.\n this._markAllSubMeshesAsTexturesDirty();\n if (value) {\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL;\n }\n else {\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_STANDARD;\n }\n }\n }\n /**\n * In order to support the falloff compatibility with gltf, a special mode has been added\n * to reproduce the gltf light falloff.\n */\n get useGLTFLightFalloff() {\n return this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_GLTF;\n }\n /**\n * In order to support the falloff compatibility with gltf, a special mode has been added\n * to reproduce the gltf light falloff.\n */\n set useGLTFLightFalloff(value) {\n if (value !== this.useGLTFLightFalloff) {\n // Ensure the effect will be rebuilt.\n this._markAllSubMeshesAsTexturesDirty();\n if (value) {\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_GLTF;\n }\n else {\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_STANDARD;\n }\n }\n }\n /**\n * Gets the image processing configuration used either in this material.\n */\n get imageProcessingConfiguration() {\n return this._imageProcessingConfiguration;\n }\n /**\n * Sets the Default image processing configuration used either in the this material.\n *\n * If sets to null, the scene one is in use.\n */\n set imageProcessingConfiguration(value) {\n this._attachImageProcessingConfiguration(value);\n // Ensure the effect will be rebuilt.\n this._markAllSubMeshesAsTexturesDirty();\n }\n /**\n * Gets whether the color curves effect is enabled.\n */\n get cameraColorCurvesEnabled() {\n return this.imageProcessingConfiguration.colorCurvesEnabled;\n }\n /**\n * Sets whether the color curves effect is enabled.\n */\n set cameraColorCurvesEnabled(value) {\n this.imageProcessingConfiguration.colorCurvesEnabled = value;\n }\n /**\n * Gets whether the color grading effect is enabled.\n */\n get cameraColorGradingEnabled() {\n return this.imageProcessingConfiguration.colorGradingEnabled;\n }\n /**\n * Gets whether the color grading effect is enabled.\n */\n set cameraColorGradingEnabled(value) {\n this.imageProcessingConfiguration.colorGradingEnabled = value;\n }\n /**\n * Gets whether tonemapping is enabled or not.\n */\n get cameraToneMappingEnabled() {\n return this._imageProcessingConfiguration.toneMappingEnabled;\n }\n /**\n * Sets whether tonemapping is enabled or not\n */\n set cameraToneMappingEnabled(value) {\n this._imageProcessingConfiguration.toneMappingEnabled = value;\n }\n /**\n * The camera exposure used on this material.\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\n * This corresponds to a photographic exposure.\n */\n get cameraExposure() {\n return this._imageProcessingConfiguration.exposure;\n }\n /**\n * The camera exposure used on this material.\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\n * This corresponds to a photographic exposure.\n */\n set cameraExposure(value) {\n this._imageProcessingConfiguration.exposure = value;\n }\n /**\n * Gets The camera contrast used on this material.\n */\n get cameraContrast() {\n return this._imageProcessingConfiguration.contrast;\n }\n /**\n * Sets The camera contrast used on this material.\n */\n set cameraContrast(value) {\n this._imageProcessingConfiguration.contrast = value;\n }\n /**\n * Gets the Color Grading 2D Lookup Texture.\n */\n get cameraColorGradingTexture() {\n return this._imageProcessingConfiguration.colorGradingTexture;\n }\n /**\n * Sets the Color Grading 2D Lookup Texture.\n */\n set cameraColorGradingTexture(value) {\n this._imageProcessingConfiguration.colorGradingTexture = value;\n }\n /**\n * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).\n * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.\n * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;\n * corresponding to low luminance, medium luminance, and high luminance areas respectively.\n */\n get cameraColorCurves() {\n return this._imageProcessingConfiguration.colorCurves;\n }\n /**\n * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).\n * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.\n * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;\n * corresponding to low luminance, medium luminance, and high luminance areas respectively.\n */\n set cameraColorCurves(value) {\n this._imageProcessingConfiguration.colorCurves = value;\n }\n /**\n * Instantiates a new PBRMaterial instance.\n *\n * @param name The material name\n * @param scene The scene the material will be use in.\n */\n constructor(name, scene) {\n super(name, scene);\n /**\n * Intensity of the direct lights e.g. the four lights available in your scene.\n * This impacts both the direct diffuse and specular highlights.\n */\n this.directIntensity = 1.0;\n /**\n * Intensity of the emissive part of the material.\n * This helps controlling the emissive effect without modifying the emissive color.\n */\n this.emissiveIntensity = 1.0;\n /**\n * Intensity of the environment e.g. how much the environment will light the object\n * either through harmonics for rough material or through the reflection for shiny ones.\n */\n this.environmentIntensity = 1.0;\n /**\n * This is a special control allowing the reduction of the specular highlights coming from the\n * four lights of the scene. Those highlights may not be needed in full environment lighting.\n */\n this.specularIntensity = 1.0;\n /**\n * Debug Control allowing disabling the bump map on this material.\n */\n this.disableBumpMap = false;\n /**\n * AKA Occlusion Texture Intensity in other nomenclature.\n */\n this.ambientTextureStrength = 1.0;\n /**\n * Defines how much the AO map is occluding the analytical lights (point spot...).\n * 1 means it completely occludes it\n * 0 mean it has no impact\n */\n this.ambientTextureImpactOnAnalyticalLights = PBRMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS;\n /**\n * In metallic workflow, specifies an F0 factor to help configuring the material F0.\n * By default the indexOfrefraction is used to compute F0;\n *\n * This is used as a factor against the default reflectance at normal incidence to tweak it.\n *\n * F0 = defaultF0 * metallicF0Factor * metallicReflectanceColor;\n * F90 = metallicReflectanceColor;\n */\n this.metallicF0Factor = 1;\n /**\n * In metallic workflow, specifies an F0 color.\n * By default the F90 is always 1;\n *\n * Please note that this factor is also used as a factor against the default reflectance at normal incidence.\n *\n * F0 = defaultF0_from_IOR * metallicF0Factor * metallicReflectanceColor\n * F90 = metallicF0Factor;\n */\n this.metallicReflectanceColor = Color3.White();\n /**\n * Specifies that only the A channel from metallicReflectanceTexture should be used.\n * If false, both RGB and A channels will be used\n */\n this.useOnlyMetallicFromMetallicReflectanceTexture = false;\n /**\n * The color of a material in ambient lighting.\n */\n this.ambientColor = new Color3(0, 0, 0);\n /**\n * AKA Diffuse Color in other nomenclature.\n */\n this.albedoColor = new Color3(1, 1, 1);\n /**\n * AKA Specular Color in other nomenclature.\n */\n this.reflectivityColor = new Color3(1, 1, 1);\n /**\n * The color reflected from the material.\n */\n this.reflectionColor = new Color3(1.0, 1.0, 1.0);\n /**\n * The color emitted from the material.\n */\n this.emissiveColor = new Color3(0, 0, 0);\n /**\n * AKA Glossiness in other nomenclature.\n */\n this.microSurface = 1.0;\n /**\n * If true, the light map contains occlusion information instead of lighting info.\n */\n this.useLightmapAsShadowmap = false;\n /**\n * Specifies that the alpha is coming form the albedo channel alpha channel for alpha blending.\n */\n this.useAlphaFromAlbedoTexture = false;\n /**\n * Enforces alpha test in opaque or blend mode in order to improve the performances of some situations.\n */\n this.forceAlphaTest = false;\n /**\n * Defines the alpha limits in alpha test mode.\n */\n this.alphaCutOff = 0.4;\n /**\n * Specifies that the material will keep the specular highlights over a transparent surface (only the most luminous ones).\n * A car glass is a good example of that. When sun reflects on it you can not see what is behind.\n */\n this.useSpecularOverAlpha = true;\n /**\n * Specifies if the reflectivity texture contains the glossiness information in its alpha channel.\n */\n this.useMicroSurfaceFromReflectivityMapAlpha = false;\n /**\n * Specifies if the metallic texture contains the roughness information in its alpha channel.\n */\n this.useRoughnessFromMetallicTextureAlpha = true;\n /**\n * Specifies if the metallic texture contains the roughness information in its green channel.\n */\n this.useRoughnessFromMetallicTextureGreen = false;\n /**\n * Specifies if the metallic texture contains the metallness information in its blue channel.\n */\n this.useMetallnessFromMetallicTextureBlue = false;\n /**\n * Specifies if the metallic texture contains the ambient occlusion information in its red channel.\n */\n this.useAmbientOcclusionFromMetallicTextureRed = false;\n /**\n * Specifies if the ambient texture contains the ambient occlusion information in its red channel only.\n */\n this.useAmbientInGrayScale = false;\n /**\n * In case the reflectivity map does not contain the microsurface information in its alpha channel,\n * The material will try to infer what glossiness each pixel should be.\n */\n this.useAutoMicroSurfaceFromReflectivityMap = false;\n /**\n * Specifies that the material will keeps the reflection highlights over a transparent surface (only the most luminous ones).\n * A car glass is a good example of that. When the street lights reflects on it you can not see what is behind.\n */\n this.useRadianceOverAlpha = true;\n /**\n * Allows using an object space normal map (instead of tangent space).\n */\n this.useObjectSpaceNormalMap = false;\n /**\n * Allows using the bump map in parallax mode.\n */\n this.useParallax = false;\n /**\n * Allows using the bump map in parallax occlusion mode.\n */\n this.useParallaxOcclusion = false;\n /**\n * Controls the scale bias of the parallax mode.\n */\n this.parallaxScaleBias = 0.05;\n /**\n * If sets to true, disables all the lights affecting the material.\n */\n this.disableLighting = false;\n /**\n * Force the shader to compute irradiance in the fragment shader in order to take bump in account.\n */\n this.forceIrradianceInFragment = false;\n /**\n * Number of Simultaneous lights allowed on the material.\n */\n this.maxSimultaneousLights = 4;\n /**\n * If sets to true, x component of normal map value will invert (x = 1.0 - x).\n */\n this.invertNormalMapX = false;\n /**\n * If sets to true, y component of normal map value will invert (y = 1.0 - y).\n */\n this.invertNormalMapY = false;\n /**\n * If sets to true and backfaceCulling is false, normals will be flipped on the backside.\n */\n this.twoSidedLighting = false;\n /**\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\n * And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)\n */\n this.useAlphaFresnel = false;\n /**\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\n * And/Or occlude the blended part. (alpha stays linear to compute the fresnel)\n */\n this.useLinearAlphaFresnel = false;\n /**\n * Let user defines the brdf lookup texture used for IBL.\n * A default 8bit version is embedded but you could point at :\n * * Default texture: https://assets.babylonjs.com/environments/correlatedMSBRDF_RGBD.png\n * * Default 16bit pixel depth texture: https://assets.babylonjs.com/environments/correlatedMSBRDF.dds\n * * LEGACY Default None correlated https://assets.babylonjs.com/environments/uncorrelatedBRDF_RGBD.png\n * * LEGACY Default None correlated 16bit pixel depth https://assets.babylonjs.com/environments/uncorrelatedBRDF.dds\n */\n this.environmentBRDFTexture = null;\n /**\n * Force normal to face away from face.\n */\n this.forceNormalForward = false;\n /**\n * Enables specular anti aliasing in the PBR shader.\n * It will both interacts on the Geometry for analytical and IBL lighting.\n * It also prefilter the roughness map based on the bump values.\n */\n this.enableSpecularAntiAliasing = false;\n /**\n * This parameters will enable/disable Horizon occlusion to prevent normal maps to look shiny when the normal\n * makes the reflect vector face the model (under horizon).\n */\n this.useHorizonOcclusion = true;\n /**\n * This parameters will enable/disable radiance occlusion by preventing the radiance to lit\n * too much the area relying on ambient texture to define their ambient occlusion.\n */\n this.useRadianceOcclusion = true;\n /**\n * If set to true, no lighting calculations will be applied.\n */\n this.unlit = false;\n /**\n * If sets to true, the decal map will be applied after the detail map. Else, it is applied before (default: false)\n */\n this.applyDecalMapAfterDetailMap = false;\n this._environmentBRDFTexture = GetEnvironmentBRDFTexture(this.getScene());\n }\n /**\n * Returns the name of this material class.\n */\n getClassName() {\n return \"PBRMaterial\";\n }\n /**\n * Makes a duplicate of the current material.\n * @param name - name to use for the new material.\n * @param cloneTexturesOnlyOnce - if a texture is used in more than one channel (e.g diffuse and opacity), only clone it once and reuse it on the other channels. Default false.\n * @param rootUrl defines the root URL to use to load textures\n */\n clone(name, cloneTexturesOnlyOnce = true, rootUrl = \"\") {\n const clone = SerializationHelper.Clone(() => new PBRMaterial(name, this.getScene()), this, { cloneTexturesOnlyOnce });\n clone.id = name;\n clone.name = name;\n this.stencil.copyTo(clone.stencil);\n this._clonePlugins(clone, rootUrl);\n return clone;\n }\n /**\n * Serializes this PBR Material.\n * @returns - An object with the serialized material.\n */\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.customType = \"BABYLON.PBRMaterial\";\n return serializationObject;\n }\n // Statics\n /**\n * Parses a PBR Material from a serialized object.\n * @param source - Serialized object.\n * @param scene - BJS scene instance.\n * @param rootUrl - url for the scene object\n * @returns - PBRMaterial\n */\n static Parse(source, scene, rootUrl) {\n const material = SerializationHelper.Parse(() => new PBRMaterial(source.name, scene), source, scene, rootUrl);\n if (source.stencil) {\n material.stencil.parse(source.stencil, scene, rootUrl);\n }\n Material._parsePlugins(source, material, scene, rootUrl);\n // The code block below ensures backward compatibility with serialized materials before plugins are automatically serialized.\n if (source.clearCoat) {\n material.clearCoat.parse(source.clearCoat, scene, rootUrl);\n }\n if (source.anisotropy) {\n material.anisotropy.parse(source.anisotropy, scene, rootUrl);\n }\n if (source.brdf) {\n material.brdf.parse(source.brdf, scene, rootUrl);\n }\n if (source.sheen) {\n material.sheen.parse(source.sheen, scene, rootUrl);\n }\n if (source.subSurface) {\n material.subSurface.parse(source.subSurface, scene, rootUrl);\n }\n if (source.iridescence) {\n material.iridescence.parse(source.iridescence, scene, rootUrl);\n }\n return material;\n }\n}\n/**\n * PBRMaterialTransparencyMode: No transparency mode, Alpha channel is not use.\n */\nPBRMaterial.PBRMATERIAL_OPAQUE = PBRBaseMaterial.PBRMATERIAL_OPAQUE;\n/**\n * PBRMaterialTransparencyMode: Alpha Test mode, pixel are discarded below a certain threshold defined by the alpha cutoff value.\n */\nPBRMaterial.PBRMATERIAL_ALPHATEST = PBRBaseMaterial.PBRMATERIAL_ALPHATEST;\n/**\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\n */\nPBRMaterial.PBRMATERIAL_ALPHABLEND = PBRBaseMaterial.PBRMATERIAL_ALPHABLEND;\n/**\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\n * They are also discarded below the alpha cutoff threshold to improve performances.\n */\nPBRMaterial.PBRMATERIAL_ALPHATESTANDBLEND = PBRBaseMaterial.PBRMATERIAL_ALPHATESTANDBLEND;\n/**\n * Defines the default value of how much AO map is occluding the analytical lights\n * (point spot...).\n */\nPBRMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS = PBRBaseMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS;\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"directIntensity\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"emissiveIntensity\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"environmentIntensity\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"specularIntensity\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"disableBumpMap\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"albedoTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"ambientTexture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"ambientTextureStrength\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"ambientTextureImpactOnAnalyticalLights\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\n], PBRMaterial.prototype, \"opacityTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"reflectionTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"emissiveTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"reflectivityTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"metallicTexture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"metallic\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"roughness\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"metallicF0Factor\", void 0);\n__decorate([\n serializeAsColor3(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"metallicReflectanceColor\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useOnlyMetallicFromMetallicReflectanceTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"metallicReflectanceTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"reflectanceTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"microSurfaceTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"bumpTexture\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", null)\n], PBRMaterial.prototype, \"lightmapTexture\", void 0);\n__decorate([\n serializeAsColor3(\"ambient\"),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"ambientColor\", void 0);\n__decorate([\n serializeAsColor3(\"albedo\"),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"albedoColor\", void 0);\n__decorate([\n serializeAsColor3(\"reflectivity\"),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"reflectivityColor\", void 0);\n__decorate([\n serializeAsColor3(\"reflection\"),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"reflectionColor\", void 0);\n__decorate([\n serializeAsColor3(\"emissive\"),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"emissiveColor\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"microSurface\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useLightmapAsShadowmap\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\n], PBRMaterial.prototype, \"useAlphaFromAlbedoTexture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\n], PBRMaterial.prototype, \"forceAlphaTest\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\n], PBRMaterial.prototype, \"alphaCutOff\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useSpecularOverAlpha\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useMicroSurfaceFromReflectivityMapAlpha\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useRoughnessFromMetallicTextureAlpha\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useRoughnessFromMetallicTextureGreen\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useMetallnessFromMetallicTextureBlue\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useAmbientOcclusionFromMetallicTextureRed\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useAmbientInGrayScale\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useAutoMicroSurfaceFromReflectivityMap\", void 0);\n__decorate([\n serialize()\n], PBRMaterial.prototype, \"usePhysicalLightFalloff\", null);\n__decorate([\n serialize()\n], PBRMaterial.prototype, \"useGLTFLightFalloff\", null);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useRadianceOverAlpha\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useObjectSpaceNormalMap\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useParallax\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useParallaxOcclusion\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"parallaxScaleBias\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\n], PBRMaterial.prototype, \"disableLighting\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"forceIrradianceInFragment\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\n], PBRMaterial.prototype, \"maxSimultaneousLights\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"invertNormalMapX\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"invertNormalMapY\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"twoSidedLighting\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useAlphaFresnel\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useLinearAlphaFresnel\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"environmentBRDFTexture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"forceNormalForward\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"enableSpecularAntiAliasing\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useHorizonOcclusion\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRMaterial.prototype, \"useRadianceOcclusion\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\n], PBRMaterial.prototype, \"unlit\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\n], PBRMaterial.prototype, \"applyDecalMapAfterDetailMap\", void 0);\nRegisterClass(\"BABYLON.PBRMaterial\", PBRMaterial);\n//# sourceMappingURL=pbrMaterial.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serialize, serializeAsVector3 } from \"../Misc/decorators.js\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector.js\";\nimport { Light } from \"./light.js\";\nimport { Axis } from \"../Maths/math.axis.js\";\n/**\n * Base implementation IShadowLight\n * It groups all the common behaviour in order to reduce duplication and better follow the DRY pattern.\n */\nexport class ShadowLight extends Light {\n constructor() {\n super(...arguments);\n this._needProjectionMatrixCompute = true;\n }\n _setPosition(value) {\n this._position = value;\n }\n /**\n * Sets the position the shadow will be casted from. Also use as the light position for both\n * point and spot lights.\n */\n get position() {\n return this._position;\n }\n /**\n * Sets the position the shadow will be casted from. Also use as the light position for both\n * point and spot lights.\n */\n set position(value) {\n this._setPosition(value);\n }\n _setDirection(value) {\n this._direction = value;\n }\n /**\n * In 2d mode (needCube being false), gets the direction used to cast the shadow.\n * Also use as the light direction on spot and directional lights.\n */\n get direction() {\n return this._direction;\n }\n /**\n * In 2d mode (needCube being false), sets the direction used to cast the shadow.\n * Also use as the light direction on spot and directional lights.\n */\n set direction(value) {\n this._setDirection(value);\n }\n /**\n * Gets the shadow projection clipping minimum z value.\n */\n get shadowMinZ() {\n return this._shadowMinZ;\n }\n /**\n * Sets the shadow projection clipping minimum z value.\n */\n set shadowMinZ(value) {\n this._shadowMinZ = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Sets the shadow projection clipping maximum z value.\n */\n get shadowMaxZ() {\n return this._shadowMaxZ;\n }\n /**\n * Gets the shadow projection clipping maximum z value.\n */\n set shadowMaxZ(value) {\n this._shadowMaxZ = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Computes the transformed information (transformedPosition and transformedDirection in World space) of the current light\n * @returns true if the information has been computed, false if it does not need to (no parenting)\n */\n computeTransformedInformation() {\n if (this.parent && this.parent.getWorldMatrix) {\n if (!this.transformedPosition) {\n this.transformedPosition = Vector3.Zero();\n }\n Vector3.TransformCoordinatesToRef(this.position, this.parent.getWorldMatrix(), this.transformedPosition);\n // In case the direction is present.\n if (this.direction) {\n if (!this.transformedDirection) {\n this.transformedDirection = Vector3.Zero();\n }\n Vector3.TransformNormalToRef(this.direction, this.parent.getWorldMatrix(), this.transformedDirection);\n }\n return true;\n }\n return false;\n }\n /**\n * Return the depth scale used for the shadow map.\n * @returns the depth scale.\n */\n getDepthScale() {\n return 50.0;\n }\n /**\n * Get the direction to use to render the shadow map. In case of cube texture, the face index can be passed.\n * @param faceIndex The index of the face we are computed the direction to generate shadow\n * @returns The set direction in 2d mode otherwise the direction to the cubemap face if needCube() is true\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getShadowDirection(faceIndex) {\n return this.transformedDirection ? this.transformedDirection : this.direction;\n }\n /**\n * Returns the ShadowLight absolute position in the World.\n * @returns the position vector in world space\n */\n getAbsolutePosition() {\n return this.transformedPosition ? this.transformedPosition : this.position;\n }\n /**\n * Sets the ShadowLight direction toward the passed target.\n * @param target The point to target in local space\n * @returns the updated ShadowLight direction\n */\n setDirectionToTarget(target) {\n this.direction = Vector3.Normalize(target.subtract(this.position));\n return this.direction;\n }\n /**\n * Returns the light rotation in euler definition.\n * @returns the x y z rotation in local space.\n */\n getRotation() {\n this.direction.normalize();\n const xaxis = Vector3.Cross(this.direction, Axis.Y);\n const yaxis = Vector3.Cross(xaxis, this.direction);\n return Vector3.RotationFromAxis(xaxis, yaxis, this.direction);\n }\n /**\n * Returns whether or not the shadow generation require a cube texture or a 2d texture.\n * @returns true if a cube texture needs to be use\n */\n needCube() {\n return false;\n }\n /**\n * Detects if the projection matrix requires to be recomputed this frame.\n * @returns true if it requires to be recomputed otherwise, false.\n */\n needProjectionMatrixCompute() {\n return this._needProjectionMatrixCompute;\n }\n /**\n * Forces the shadow generator to recompute the projection matrix even if position and direction did not changed.\n */\n forceProjectionMatrixCompute() {\n this._needProjectionMatrixCompute = true;\n }\n /** @internal */\n _initCache() {\n super._initCache();\n this._cache.position = Vector3.Zero();\n }\n /** @internal */\n _isSynchronized() {\n if (!this._cache.position.equals(this.position)) {\n return false;\n }\n return true;\n }\n /**\n * Computes the world matrix of the node\n * @param force defines if the cache version should be invalidated forcing the world matrix to be created from scratch\n * @returns the world matrix\n */\n computeWorldMatrix(force) {\n if (!force && this.isSynchronized()) {\n this._currentRenderId = this.getScene().getRenderId();\n return this._worldMatrix;\n }\n this._updateCache();\n this._cache.position.copyFrom(this.position);\n if (!this._worldMatrix) {\n this._worldMatrix = Matrix.Identity();\n }\n Matrix.TranslationToRef(this.position.x, this.position.y, this.position.z, this._worldMatrix);\n if (this.parent && this.parent.getWorldMatrix) {\n this._worldMatrix.multiplyToRef(this.parent.getWorldMatrix(), this._worldMatrix);\n this._markSyncedWithParent();\n }\n // Cache the determinant\n this._worldMatrixDeterminantIsDirty = true;\n return this._worldMatrix;\n }\n /**\n * Gets the minZ used for shadow according to both the scene and the light.\n * @param activeCamera The camera we are returning the min for\n * @returns the depth min z\n */\n getDepthMinZ(activeCamera) {\n return this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ;\n }\n /**\n * Gets the maxZ used for shadow according to both the scene and the light.\n * @param activeCamera The camera we are returning the max for\n * @returns the depth max z\n */\n getDepthMaxZ(activeCamera) {\n return this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ;\n }\n /**\n * Sets the shadow projection matrix in parameter to the generated projection matrix.\n * @param matrix The matrix to updated with the projection information\n * @param viewMatrix The transform matrix of the light\n * @param renderList The list of mesh to render in the map\n * @returns The current light\n */\n setShadowProjectionMatrix(matrix, viewMatrix, renderList) {\n if (this.customProjectionMatrixBuilder) {\n this.customProjectionMatrixBuilder(viewMatrix, renderList, matrix);\n }\n else {\n this._setDefaultShadowProjectionMatrix(matrix, viewMatrix, renderList);\n }\n return this;\n }\n /** @internal */\n _syncParentEnabledState() {\n super._syncParentEnabledState();\n if (!this.parent || !this.parent.getWorldMatrix) {\n this.transformedPosition = null;\n this.transformedDirection = null;\n }\n }\n}\n__decorate([\n serializeAsVector3()\n], ShadowLight.prototype, \"position\", null);\n__decorate([\n serializeAsVector3()\n], ShadowLight.prototype, \"direction\", null);\n__decorate([\n serialize()\n], ShadowLight.prototype, \"shadowMinZ\", null);\n__decorate([\n serialize()\n], ShadowLight.prototype, \"shadowMaxZ\", null);\n//# sourceMappingURL=shadowLight.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serialize } from \"../Misc/decorators.js\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector.js\";\nimport { Node } from \"../node.js\";\nimport { Light } from \"./light.js\";\nimport { ShadowLight } from \"./shadowLight.js\";\nNode.AddNodeConstructor(\"Light_Type_0\", (name, scene) => {\n return () => new PointLight(name, Vector3.Zero(), scene);\n});\n/**\n * A point light is a light defined by an unique point in world space.\n * The light is emitted in every direction from this point.\n * A good example of a point light is a standard light bulb.\n * Documentation: https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n */\nexport class PointLight extends ShadowLight {\n /**\n * Getter: In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n * This specifies what angle the shadow will use to be created.\n *\n * It default to 90 degrees to work nicely with the cube texture generation for point lights shadow maps.\n */\n get shadowAngle() {\n return this._shadowAngle;\n }\n /**\n * Setter: In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n * This specifies what angle the shadow will use to be created.\n *\n * It default to 90 degrees to work nicely with the cube texture generation for point lights shadow maps.\n */\n set shadowAngle(value) {\n this._shadowAngle = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Gets the direction if it has been set.\n * In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n */\n get direction() {\n return this._direction;\n }\n /**\n * In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n */\n set direction(value) {\n const previousNeedCube = this.needCube();\n this._direction = value;\n if (this.needCube() !== previousNeedCube && this._shadowGenerators) {\n const iterator = this._shadowGenerators.values();\n for (let key = iterator.next(); key.done !== true; key = iterator.next()) {\n const shadowGenerator = key.value;\n shadowGenerator.recreateShadowMap();\n }\n }\n }\n /**\n * Creates a PointLight object from the passed name and position (Vector3) and adds it in the scene.\n * A PointLight emits the light in every direction.\n * It can cast shadows.\n * If the scene camera is already defined and you want to set your PointLight at the camera position, just set it :\n * ```javascript\n * var pointLight = new PointLight(\"pl\", camera.position, scene);\n * ```\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n * @param name The light friendly name\n * @param position The position of the point light in the scene\n * @param scene The scene the lights belongs to\n */\n constructor(name, position, scene) {\n super(name, scene);\n this._shadowAngle = Math.PI / 2;\n this.position = position;\n }\n /**\n * Returns the string \"PointLight\"\n * @returns the class name\n */\n getClassName() {\n return \"PointLight\";\n }\n /**\n * Returns the integer 0.\n * @returns The light Type id as a constant defines in Light.LIGHTTYPEID_x\n */\n getTypeID() {\n return Light.LIGHTTYPEID_POINTLIGHT;\n }\n /**\n * Specifies whether or not the shadowmap should be a cube texture.\n * @returns true if the shadowmap needs to be a cube texture.\n */\n needCube() {\n return !this.direction;\n }\n /**\n * Returns a new Vector3 aligned with the PointLight cube system according to the passed cube face index (integer).\n * @param faceIndex The index of the face we are computed the direction to generate shadow\n * @returns The set direction in 2d mode otherwise the direction to the cubemap face if needCube() is true\n */\n getShadowDirection(faceIndex) {\n if (this.direction) {\n return super.getShadowDirection(faceIndex);\n }\n else {\n switch (faceIndex) {\n case 0:\n return new Vector3(1.0, 0.0, 0.0);\n case 1:\n return new Vector3(-1.0, 0.0, 0.0);\n case 2:\n return new Vector3(0.0, -1.0, 0.0);\n case 3:\n return new Vector3(0.0, 1.0, 0.0);\n case 4:\n return new Vector3(0.0, 0.0, 1.0);\n case 5:\n return new Vector3(0.0, 0.0, -1.0);\n }\n }\n return Vector3.Zero();\n }\n /**\n * Sets the passed matrix \"matrix\" as a left-handed perspective projection matrix with the following settings :\n * - fov = PI / 2\n * - aspect ratio : 1.0\n * - z-near and far equal to the active camera minZ and maxZ.\n * Returns the PointLight.\n * @param matrix\n * @param viewMatrix\n * @param renderList\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _setDefaultShadowProjectionMatrix(matrix, viewMatrix, renderList) {\n const activeCamera = this.getScene().activeCamera;\n if (!activeCamera) {\n return;\n }\n const minZ = this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ;\n const maxZ = this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ;\n const useReverseDepthBuffer = this.getScene().getEngine().useReverseDepthBuffer;\n Matrix.PerspectiveFovLHToRef(this.shadowAngle, 1.0, useReverseDepthBuffer ? maxZ : minZ, useReverseDepthBuffer ? minZ : maxZ, matrix, true, this._scene.getEngine().isNDCHalfZRange, undefined, useReverseDepthBuffer);\n }\n _buildUniformLayout() {\n this._uniformBuffer.addUniform(\"vLightData\", 4);\n this._uniformBuffer.addUniform(\"vLightDiffuse\", 4);\n this._uniformBuffer.addUniform(\"vLightSpecular\", 4);\n this._uniformBuffer.addUniform(\"vLightFalloff\", 4);\n this._uniformBuffer.addUniform(\"shadowsInfo\", 3);\n this._uniformBuffer.addUniform(\"depthValues\", 2);\n this._uniformBuffer.create();\n }\n /**\n * Sets the passed Effect \"effect\" with the PointLight transformed position (or position, if none) and passed name (string).\n * @param effect The effect to update\n * @param lightIndex The index of the light in the effect to update\n * @returns The point light\n */\n transferToEffect(effect, lightIndex) {\n if (this.computeTransformedInformation()) {\n this._uniformBuffer.updateFloat4(\"vLightData\", this.transformedPosition.x, this.transformedPosition.y, this.transformedPosition.z, 0.0, lightIndex);\n }\n else {\n this._uniformBuffer.updateFloat4(\"vLightData\", this.position.x, this.position.y, this.position.z, 0, lightIndex);\n }\n this._uniformBuffer.updateFloat4(\"vLightFalloff\", this.range, this._inverseSquaredRange, 0, 0, lightIndex);\n return this;\n }\n transferToNodeMaterialEffect(effect, lightDataUniformName) {\n if (this.computeTransformedInformation()) {\n effect.setFloat3(lightDataUniformName, this.transformedPosition.x, this.transformedPosition.y, this.transformedPosition.z);\n }\n else {\n effect.setFloat3(lightDataUniformName, this.position.x, this.position.y, this.position.z);\n }\n return this;\n }\n /**\n * Prepares the list of defines specific to the light type.\n * @param defines the list of defines\n * @param lightIndex defines the index of the light for the effect\n */\n prepareLightSpecificDefines(defines, lightIndex) {\n defines[\"POINTLIGHT\" + lightIndex] = true;\n }\n}\n__decorate([\n serialize()\n], PointLight.prototype, \"shadowAngle\", null);\n//# sourceMappingURL=pointLight.js.map","import { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { PointLight as BABYLON_PointLight } from '@inter-ikea-betrakta-babylonjs/core/Lights/pointLight.js';\nimport { IVector3 } from '../api.js';\n// TODO: Remove the \"Babylon\" prefix of class name after light system overhaul (right now there's already a class called LineLight)\nexport class BabylonLineLight extends BABYLON_PointLight {\n constructor(name, line_a, line_b, line_normal, angle_range_radians, scene, clip_plane) {\n const position = BABYLON_Vector3.Lerp(line_a, line_b, 0.5);\n super(name, position, scene);\n this.line_a = line_a;\n this.line_b = line_b;\n this.line_normal = line_normal;\n this.angle_range_radians = angle_range_radians;\n this.hard_side_cutoff = false;\n this._transformed_line_a = BABYLON_Vector3.Zero();\n this._transformed_line_b = BABYLON_Vector3.Zero();\n this._transformed_line_normal = BABYLON_Vector3.Zero();\n this.transformedPosition = BABYLON_Vector3.Zero();\n this.clip_plane = clip_plane;\n // this.range = 0.0\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n _buildUniformLayout() {\n /**\n * Adds an uniform in the buffer.\n * Warning : the subsequents calls of this function must be in the same order as declared in the shader\n * for the layout to be correct !\n */\n this._uniformBuffer.addUniform('vLightData', 4);\n this._uniformBuffer.addUniform('vLightDiffuse', 4);\n this._uniformBuffer.addUniform('vLightSpecular', 4);\n this._uniformBuffer.addUniform('vLightFalloff', 4);\n this._uniformBuffer.addUniform(BabylonLineLight.LINE_A_UNIFORM, 3);\n this._uniformBuffer.addUniform(BabylonLineLight.LINE_B_UNIFORM, 3);\n this._uniformBuffer.addUniform(BabylonLineLight.LINE_NORMAL_AND_ANGLE_RANGE_UNIFORM, 4);\n this._uniformBuffer.addUniform(BabylonLineLight.LINE_CLIP_PLANE_NORMAL_DISTANCE, 4);\n this._uniformBuffer.addUniform('depthValues', 2);\n this._uniformBuffer.create();\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n computeTransformedInformation() {\n if (this.parent && this.parent.getWorldMatrix) {\n super.computeTransformedInformation();\n BABYLON_Vector3.TransformCoordinatesToRef(this.line_a, this.parent.getWorldMatrix(), this._transformed_line_a);\n BABYLON_Vector3.TransformCoordinatesToRef(this.line_b, this.parent.getWorldMatrix(), this._transformed_line_b);\n BABYLON_Vector3.TransformCoordinatesToRef(this.line_normal, this.parent.getWorldMatrix(), this._transformed_line_normal);\n return true;\n }\n else {\n this._transformed_line_a.copyFrom(this.line_a);\n this._transformed_line_b.copyFrom(this.line_b);\n this._transformed_line_normal.copyFrom(this.line_normal);\n }\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n transferToEffect(effect, lightIndex) {\n this.computeTransformedInformation();\n // https://github.com/BabylonJS/Babylon.js/blob/5e6321d887637877d8b28b417410abbbeb651c6e/src/Shaders/ShadersInclude/pbrDirectLightingFalloffFunctions.fx\n // range and inverse squared range will not do anything because we use physical light falloff\n this._uniformBuffer.updateFloat4('vLightFalloff', this.range, this._inverseSquaredRange, this.hard_side_cutoff ? 1.0 : 0.0, 0.0, lightIndex);\n this._uniformBuffer.updateFloat4('vLightData', this.transformedPosition.x, this.transformedPosition.y, this.transformedPosition.z, 0.0, lightIndex);\n this._uniformBuffer.updateFloat3(BabylonLineLight.LINE_A_UNIFORM, this._transformed_line_a.x, this._transformed_line_a.y, this._transformed_line_a.z, lightIndex);\n this._uniformBuffer.updateFloat3(BabylonLineLight.LINE_B_UNIFORM, this._transformed_line_b.x, this._transformed_line_b.y, this._transformed_line_b.z, lightIndex);\n this._uniformBuffer.updateFloat4(BabylonLineLight.LINE_NORMAL_AND_ANGLE_RANGE_UNIFORM, this._transformed_line_normal.x, this._transformed_line_normal.y, this._transformed_line_normal.z, Math.cos(this.angle_range_radians * 0.5), lightIndex);\n if (this.clip_plane !== null) {\n this._uniformBuffer.updateFloat4(BabylonLineLight.LINE_CLIP_PLANE_NORMAL_DISTANCE, this.clip_plane.normal.x, this.clip_plane.normal.y, this.clip_plane.normal.z, IVector3.dot(this.clip_plane.normal, this.clip_plane.position), lightIndex);\n }\n else {\n // Set a zero-vector, this will cause the clipping test to always succeed in the shader.\n this._uniformBuffer.updateFloat4(BabylonLineLight.LINE_CLIP_PLANE_NORMAL_DISTANCE, 0, 0, 0, 0, lightIndex);\n }\n this._uniformBuffer.updateFloat2('depthValues', 0.0, 0.0, lightIndex);\n return this;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n prepareLightSpecificDefines(defines, lightIndex) {\n defines['LINELIGHT' + lightIndex] = true;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n get shadowEnabled() {\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-function\n set shadowEnabled(value) {\n console.error('[IPEX Viewer] Can\\'t set shadowEnable. Shadows is not supported for Line lights');\n }\n}\nBabylonLineLight.LINE_A_UNIFORM = 'vLineA';\nBabylonLineLight.LINE_B_UNIFORM = 'vLineB';\nBabylonLineLight.LINE_NORMAL_AND_ANGLE_RANGE_UNIFORM = 'vLineNormalAndAngleRange';\nBabylonLineLight.LINE_CLIP_PLANE_NORMAL_DISTANCE = 'vLineClipPlaneNormalDistance';\n//# sourceMappingURL=BabylonLineLight.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/lightUboDeclaration.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'lightUboDeclaration';\nconst shader = `#ifdef LIGHT{X}\nuniform Light{X}\n{\nvec4 vLightData;\nvec4 vLightDiffuse;\nvec4 vLightSpecular;\n#ifdef SPOTLIGHT{X}\nvec4 vLightDirection;\nvec4 vLightFalloff;\n#elif defined(POINTLIGHT{X})\nvec4 vLightFalloff;\n#elif defined(HEMILIGHT{X})\nvec3 vLightGround;\n#elif defined(LINELIGHT{X})\nvec4 vLightFalloff;\nvec3 vLineA;\nvec3 vLineB;\nvec4 vLineNormalAndAngleRange;\nvec4 vLineClipPlaneNormalDistance;\n#endif\n#if !defined(LINELIGHT{X})\nvec4 shadowsInfo;\n#endif\nvec2 depthValues;\n} light{X};\n#ifdef PROJECTEDLIGHTTEXTURE{X}\nuniform mat4 textureProjectionMatrix{X};\nuniform sampler2D projectionLightSampler{X};\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float cascadeBlendFactor{X};\nvarying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];\nvarying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];\nvarying vec4 vPositionFromCamera{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};\nuniform highp sampler2DArray depthSampler{X};\nuniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float penumbraDarkness{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};\n#else\nuniform highp sampler2DArray shadowSampler{X};\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nconst vec3 vCascadeColorsMultiplier{X}[8] = vec3[8]\n(\nvec3 ( 1.5, 0.0, 0.0 ),\nvec3 ( 0.0, 1.5, 0.0 ),\nvec3 ( 0.0, 0.0, 5.5 ),\nvec3 ( 1.5, 0.0, 5.5 ),\nvec3 ( 1.5, 1.5, 0.0 ),\nvec3 ( 1.0, 1.0, 1.0 ),\nvec3 ( 0.0, 1.0, 5.5 ),\nvec3 ( 0.5, 3.5, 0.75 )\n);\nvec3 shadowDebug{X};\n#endif\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nint index{X} = -1;\n#else\nint index{X} = SHADOWCSMNUM_CASCADES{X} - 1;\n#endif\nfloat diff{X} = 0.;\n#elif defined(SHADOWCUBE{X})\nuniform samplerCube shadowSampler{X};\n#else\nvarying vec4 vPositionFromLight{X};\nvarying float vDepthMetric{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DShadow shadowSampler{X};\nuniform highp sampler2D depthSampler{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DShadow shadowSampler{X};\n#else\nuniform sampler2D shadowSampler{X};\n#endif\nuniform mat4 lightMatrix{X};\n#endif\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const lightUboDeclaration = { name, shader };\n//# sourceMappingURL=lightUboDeclaration.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/lightVxUboDeclaration.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'lightVxUboDeclaration';\nconst shader = `#ifdef LIGHT{X}\nuniform Light{X}\n{\nvec4 vLightData;\nvec4 vLightDiffuse;\nvec4 vLightSpecular;\n#ifdef SPOTLIGHT{X}\nvec4 vLightDirection;\nvec4 vLightFalloff;\n#elif defined(POINTLIGHT{X})\nvec4 vLightFalloff;\n#elif defined(HEMILIGHT{X})\nvec3 vLightGround;\n#elif defined(LINELIGHT{X})\nvec4 vLightFalloff;\nvec3 vLineA;\nvec3 vLineB;\nvec4 vLineNormalAndAngleRange;\nvec4 vLineClipPlaneNormalDistance;\n#endif\n#if !defined(LINELIGHT{X})\nvec4 shadowsInfo;\n#endif\nvec2 depthValues;\n} light{X};\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];\nvarying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];\nvarying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];\nvarying vec4 vPositionFromCamera{X};\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vec4 vPositionFromLight{X};\nvarying float vDepthMetric{X};\nuniform mat4 lightMatrix{X};\n#endif\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const lightVxUboDeclaration = { name, shader };\n//# sourceMappingURL=lightVxUboDeclaration.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/lightFragmentDeclaration.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'lightFragmentDeclaration';\nconst shader = `#ifdef LIGHT{X}\nuniform vec4 vLightData{X};\nuniform vec4 vLightDiffuse{X};\n#ifdef SPECULARTERM\nuniform vec4 vLightSpecular{X};\n#else\nvec4 vLightSpecular{X} = vec4(0.);\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float cascadeBlendFactor{X};\nvarying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];\nvarying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];\nvarying vec4 vPositionFromCamera{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};\nuniform highp sampler2DArray depthSampler{X};\nuniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float penumbraDarkness{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};\n#else\nuniform highp sampler2DArray shadowSampler{X};\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nconst vec3 vCascadeColorsMultiplier{X}[8] = vec3[8]\n(\nvec3 ( 1.5, 0.0, 0.0 ),\nvec3 ( 0.0, 1.5, 0.0 ),\nvec3 ( 0.0, 0.0, 5.5 ),\nvec3 ( 1.5, 0.0, 5.5 ),\nvec3 ( 1.5, 1.5, 0.0 ),\nvec3 ( 1.0, 1.0, 1.0 ),\nvec3 ( 0.0, 1.0, 5.5 ),\nvec3 ( 0.5, 3.5, 0.75 )\n);\nvec3 shadowDebug{X};\n#endif\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nint index{X} = -1;\n#else\nint index{X} = SHADOWCSMNUM_CASCADES{X} - 1;\n#endif\nfloat diff{X} = 0.;\n#elif defined(SHADOWCUBE{X})\nuniform samplerCube shadowSampler{X};\n#else\nvarying vec4 vPositionFromLight{X};\nvarying float vDepthMetric{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DShadow shadowSampler{X};\nuniform highp sampler2D depthSampler{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DShadow shadowSampler{X};\n#else\nuniform sampler2D shadowSampler{X};\n#endif\nuniform mat4 lightMatrix{X};\n#endif\n#if !defined(LINELIGHT{X})\nuniform vec4 shadowsInfo{X};\n#endif\nuniform vec2 depthValues{X};\n#endif\n#ifdef SPOTLIGHT{X}\nuniform vec4 vLightDirection{X};\nuniform vec4 vLightFalloff{X};\n#elif defined(POINTLIGHT{X})\nuniform vec4 vLightFalloff{X};\n#elif defined(HEMILIGHT{X})\nuniform vec3 vLightGround{X};\n#elif defined(LINELIGHT{X})\nuniform vec4 vLightFalloff{X};\nuniform vec3 vLineA{X};\nuniform vec3 vLineB{X};\nuniform vec4 vLineNormalAndAngleRange{X};\nuniform vec4 vLineClipPlaneNormalDistance{X};\n#endif\n#ifdef PROJECTEDLIGHTTEXTURE{X}\nuniform mat4 textureProjectionMatrix{X};\nuniform sampler2D projectionLightSampler{X};\n#endif\n#endif`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const lightFragmentDeclaration = { name, shader };\n//# sourceMappingURL=lightFragmentDeclaration.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/lightFragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'lightFragment';\nconst shader = `#ifdef LIGHT{X}\n#if defined(SHADOWONLY) || defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X}) && defined(LIGHTMAPNOSPECULAR{X})\n#else\n#ifdef PBR\n#ifdef LINELIGHT{X}\nvec3 horizonAdjustedLineA{X} = light{X}.vLineA;\nvec3 horizonAdjustedLineB{X} = light{X}.vLineB;\nvec3 positionToLineA{X} = light{X}.vLineA - vPositionW;\nvec3 positionToLineB{X} = light{X}.vLineB - vPositionW;\nvec3 lineAtoLineB{X} = light{X}.vLineB - light{X}.vLineA;\nvec2 lineABRangeT{X} = vec2(0.0, 1.0);\nif ((dot(positionToLineA{X}, normalW) > 0.0) != (dot(positionToLineB{X}, normalW) > 0.0))\n{\nfloat t = -dot(positionToLineA{X}, normalW) / dot(lineAtoLineB{X}, normalW);\nvec3 intersectionPoint = light{X}.vLineA + t * lineAtoLineB{X};\nif (dot(positionToLineA{X}, normalW) > 0.0)\n{\nhorizonAdjustedLineB{X} = intersectionPoint;\nlineABRangeT{X}.y = t;\n}\nelse\n{\nhorizonAdjustedLineA{X} = intersectionPoint;\nlineABRangeT{X}.x = t;\n}\n}\n#elif defined(SPOTLIGHT{X})\npreInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData, viewDirectionW, normalW);\n#elif defined(POINTLIGHT{X})\npreInfo = computePointAndSpotPreLightingInfo(light{X}.vLightData, viewDirectionW, normalW);\n#elif defined(HEMILIGHT{X})\npreInfo = computeHemisphericPreLightingInfo(light{X}.vLightData, viewDirectionW, normalW);\n#elif defined(DIRLIGHT{X})\npreInfo = computeDirectionalPreLightingInfo(light{X}.vLightData, viewDirectionW, normalW);\n#endif\npreInfo.NdotV = NdotV;\n#ifdef SPOTLIGHT{X}\n#ifdef LIGHT_FALLOFF_GLTF{X}\npreInfo.attenuation = computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared, light{X}.vLightFalloff.y);\npreInfo.attenuation *= computeDirectionalLightFalloff_GLTF(light{X}.vLightDirection.xyz, preInfo.L, light{X}.vLightFalloff.z, light{X}.vLightFalloff.w);\n#elif defined(LIGHT_FALLOFF_PHYSICAL{X})\npreInfo.attenuation = computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);\npreInfo.attenuation *= computeDirectionalLightFalloff_Physical(light{X}.vLightDirection.xyz, preInfo.L, light{X}.vLightDirection.w);\n#elif defined(LIGHT_FALLOFF_STANDARD{X})\npreInfo.attenuation = computeDirectionalLightFalloff_GLTF(light{X}.vLightDirection.xyz, preInfo.L, light{X}.vLightFalloff.z, light{X}.vLightFalloff.w);\n#else\npreInfo.attenuation = computeDistanceLightFalloff(preInfo.lightOffset, preInfo.lightDistanceSquared, light{X}.vLightFalloff.x, light{X}.vLightFalloff.y);\npreInfo.attenuation *= computeDirectionalLightFalloff(light{X}.vLightDirection.xyz, preInfo.L, light{X}.vLightDirection.w, light{X}.vLightData.w, light{X}.vLightFalloff.z, light{X}.vLightFalloff.w);\n#endif\n#elif defined(POINTLIGHT{X})\n#ifdef LIGHT_FALLOFF_GLTF{X}\npreInfo.attenuation = computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared, light{X}.vLightFalloff.y);\n#elif defined(LIGHT_FALLOFF_PHYSICAL{X})\npreInfo.attenuation = computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);\n#elif defined(LIGHT_FALLOFF_STANDARD{X})\npreInfo.attenuation = computeDistanceLightFalloff_Standard(preInfo.lightOffset, light{X}.vLightFalloff.x);\n#else\npreInfo.attenuation = computeDistanceLightFalloff(preInfo.lightOffset, preInfo.lightDistanceSquared, light{X}.vLightFalloff.x, light{X}.vLightFalloff.y);\n#endif\n#else\npreInfo.attenuation = 1.0;\n#endif\n#ifdef HEMILIGHT{X}\npreInfo.roughness = roughness;\n#else\npreInfo.roughness = adjustRoughnessFromLightProperties(roughness, light{X}.vLightSpecular.a, preInfo.lightDistance);\n#endif\n#ifdef IRIDESCENCE\npreInfo.iridescenceIntensity = iridescenceIntensity;\n#endif\n#ifdef LINELIGHT{X}\nvec3 lineDirection{X} = light{X}.vLineB - light{X}.vLineA;\nfloat lineLength{X} = length(lineDirection{X});\nlineDirection{X} /= lineLength{X};\nfloat t{X} = dot(vPositionW - light{X}.vLineA, lineDirection{X}) / lineLength{X};\nt{X} = clamp(t{X}, lineABRangeT{X}.x, lineABRangeT{X}.y);\nvec3 lineLightPosition{X} = light{X}.vLineA + lineDirection{X} * lineLength{X} * t{X};\npreInfo = computeLineLightDiffusePreLightingInfo(lineLightPosition{X}, normalW);\npreInfo.NdotV = NdotV;\nfloat cosHalfAngle{X} = light{X}.vLineNormalAndAngleRange.w;\n#ifdef LIGHT_FALLOFF_GLTF{X}\npreInfo.attenuation = computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared, light{X}.vLightFalloff.y);\nfloat cosHalfAngleInverseScale{X} = 1.0 / (1.0 - cosHalfAngle{X});\nfloat lineLightIlluminance{X} = computeDirectionalLightFalloff_GLTF(light{X}.vLineNormalAndAngleRange.xyz, preInfo.L, cosHalfAngleInverseScale{X}, -cosHalfAngle{X} * cosHalfAngleInverseScale{X});\n#else\npreInfo.attenuation = computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);\nfloat lineLightIlluminance{X} = computeDirectionalLightFalloff_Physical(light{X}.vLineNormalAndAngleRange.xyz, preInfo.L, cosHalfAngle{X});\n#endif\nif (light{X}.vLightFalloff.z == 1.0 && (t{X} == 0.0 || t{X} == 1.0)) {\nlineLightIlluminance{X} = 0.0;\n}\nfloat clipPlaneCutoff{X} = (dot(lineLightPosition{X}, light{X}.vLineClipPlaneNormalDistance.xyz) - light{X}.vLineClipPlaneNormalDistance.w) < dot(preInfo.lightOffset, light{X}.vLineClipPlaneNormalDistance.xyz) ? 0.0 : 1.0;\nlineLightIlluminance{X} *= clipPlaneCutoff{X};\npreInfo.attenuation *= lineLightIlluminance{X};\n#endif\n#ifdef HEMILIGHT{X}\ninfo.diffuse = computeHemisphericDiffuseLighting(preInfo, light{X}.vLightDiffuse.rgb, light{X}.vLightGround);\n#elif defined(SS_TRANSLUCENCY)\ninfo.diffuse = computeDiffuseAndTransmittedLighting(preInfo, light{X}.vLightDiffuse.rgb, subSurfaceOut.transmittance);\n#else\ninfo.diffuse = computeDiffuseLighting(preInfo, light{X}.vLightDiffuse.rgb);\n#endif\n#ifdef SPECULARTERM\n#ifdef LINELIGHT{X}\n#ifdef LIGHT_FALLOFF_GLTF{X}\nfloat preAttenuation{X} = lineLightIlluminance{X} * computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared, light{X}.vLightFalloff.y);\n#else\nfloat preAttenuation{X} = lineLightIlluminance{X} * computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);\n#endif\npreInfo = computeLineLightSpecularPreLightingInfo(viewDirectionW, normalW, reflect(viewDirectionW, normalW), horizonAdjustedLineA{X}, horizonAdjustedLineB{X});\npreInfo.roughness = adjustRoughnessFromLightProperties(roughness, light{X}.vLightSpecular.a, preInfo.lightDistance);\npreInfo.NdotV = NdotV;\npreInfo.attenuation = preAttenuation{X};\n#endif\n#ifdef ANISOTROPIC\ninfo.specular = computeAnisotropicSpecularLighting(preInfo, viewDirectionW, normalW, anisotropicOut.anisotropicTangent, anisotropicOut.anisotropicBitangent, anisotropicOut.anisotropy, clearcoatOut.specularEnvironmentR0, specularEnvironmentR90, AARoughnessFactors.x, light{X}.vLightDiffuse.rgb);\n#else\ninfo.specular = computeSpecularLighting(preInfo, normalW, clearcoatOut.specularEnvironmentR0, specularEnvironmentR90, AARoughnessFactors.x, light{X}.vLightDiffuse.rgb);\n#endif\n#endif\n#ifdef SHEEN\n#ifdef SHEEN_LINKWITHALBEDO\npreInfo.roughness = sheenOut.sheenIntensity;\n#else\n#ifdef HEMILIGHT{X}\npreInfo.roughness = sheenOut.sheenRoughness;\n#else\npreInfo.roughness = adjustRoughnessFromLightProperties(sheenOut.sheenRoughness, light{X}.vLightSpecular.a, preInfo.lightDistance);\n#endif\n#endif\ninfo.sheen = computeSheenLighting(preInfo, normalW, sheenOut.sheenColor, specularEnvironmentR90, AARoughnessFactors.x, light{X}.vLightDiffuse.rgb);\n#endif\n#ifdef CLEARCOAT\n#ifdef HEMILIGHT{X}\npreInfo.roughness = clearcoatOut.clearCoatRoughness;\n#else\npreInfo.roughness = adjustRoughnessFromLightProperties(clearcoatOut.clearCoatRoughness, light{X}.vLightSpecular.a, preInfo.lightDistance);\n#endif\ninfo.clearCoat = computeClearCoatLighting(preInfo, clearcoatOut.clearCoatNormalW, clearcoatOut.clearCoatAARoughnessFactors.x, clearcoatOut.clearCoatIntensity, light{X}.vLightDiffuse.rgb);\n#ifdef CLEARCOAT_TINT\nabsorption = computeClearCoatLightingAbsorption(clearcoatOut.clearCoatNdotVRefract, preInfo.L, clearcoatOut.clearCoatNormalW, clearcoatOut.clearCoatColor, clearcoatOut.clearCoatThickness, clearcoatOut.clearCoatIntensity);\ninfo.diffuse *= absorption;\n#ifdef SPECULARTERM\ninfo.specular *= absorption;\n#endif\n#endif\ninfo.diffuse *= info.clearCoat.w;\n#ifdef SPECULARTERM\ninfo.specular *= info.clearCoat.w;\n#endif\n#ifdef SHEEN\ninfo.sheen *= info.clearCoat.w;\n#endif\n#endif\n#else\n#ifdef SPOTLIGHT{X}\ninfo = computeSpotLighting(viewDirectionW, normalW, light{X}.vLightData, light{X}.vLightDirection, light{X}.vLightDiffuse.rgb, light{X}.vLightSpecular.rgb, light{X}.vLightDiffuse.a, glossiness);\n#elif defined(HEMILIGHT{X})\ninfo = computeHemisphericLighting(viewDirectionW, normalW, light{X}.vLightData, light{X}.vLightDiffuse.rgb, light{X}.vLightSpecular.rgb, light{X}.vLightGround, glossiness);\n#elif defined(POINTLIGHT{X}) || defined(DIRLIGHT{X})\ninfo = computeLighting(viewDirectionW, normalW, light{X}.vLightData, light{X}.vLightDiffuse.rgb, light{X}.vLightSpecular.rgb, light{X}.vLightDiffuse.a, glossiness);\n#endif\n#endif\n#ifdef PROJECTEDLIGHTTEXTURE{X}\ninfo.diffuse *= computeProjectionTextureDiffuseLighting(projectionLightSampler{X}, textureProjectionMatrix{X});\n#endif\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nfor (int i = 0; i < SHADOWCSMNUM_CASCADES{X}; i++)\n{\n#ifdef SHADOWCSM_RIGHTHANDED{X}\ndiff{X} = viewFrustumZ{X}[i] + vPositionFromCamera{X}.z;\n#else\ndiff{X} = viewFrustumZ{X}[i] - vPositionFromCamera{X}.z;\n#endif\nif (diff{X} >= 0.) {\nindex{X} = i;\nbreak;\n}\n}\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nif (index{X} >= 0)\n#endif\n{\n#if defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow = computeShadowWithCSMPCF1(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow = computeShadowWithCSMPCF3(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.yz, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#else\nshadow = computeShadowWithCSMPCF5(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.yz, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow = computeShadowWithCSMPCSS16(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.z, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w, lightSizeUVCorrection{X}[index{X}], depthCorrection{X}[index{X}], penumbraDarkness{X});\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow = computeShadowWithCSMPCSS32(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.z, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w, lightSizeUVCorrection{X}[index{X}], depthCorrection{X}[index{X}], penumbraDarkness{X});\n#else\nshadow = computeShadowWithCSMPCSS64(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.z, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w, lightSizeUVCorrection{X}[index{X}], depthCorrection{X}[index{X}], penumbraDarkness{X});\n#endif\n#else\nshadow = computeShadowCSM(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nshadowDebug{X} = vec3(shadow) * vCascadeColorsMultiplier{X}[index{X}];\n#endif\n#ifndef SHADOWCSMNOBLEND{X}\nfloat frustumLength = frustumLengths{X}[index{X}];\nfloat diffRatio = clamp(diff{X} / frustumLength, 0., 1.) * cascadeBlendFactor{X};\nif (index{X} < (SHADOWCSMNUM_CASCADES{X} - 1) && diffRatio < 1.)\n{\nindex{X} += 1;\nfloat nextShadow = 0.;\n#if defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nnextShadow = computeShadowWithCSMPCF1(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nnextShadow = computeShadowWithCSMPCF3(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.yz, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#else\nnextShadow = computeShadowWithCSMPCF5(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.yz, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nnextShadow = computeShadowWithCSMPCSS16(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.z, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w, lightSizeUVCorrection{X}[index{X}], depthCorrection{X}[index{X}], penumbraDarkness{X});\n#elif defined(SHADOWMEDIUMQUALITY{X})\nnextShadow = computeShadowWithCSMPCSS32(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.z, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w, lightSizeUVCorrection{X}[index{X}], depthCorrection{X}[index{X}], penumbraDarkness{X});\n#else\nnextShadow = computeShadowWithCSMPCSS64(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.z, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w, lightSizeUVCorrection{X}[index{X}], depthCorrection{X}[index{X}], penumbraDarkness{X});\n#endif\n#else\nnextShadow = computeShadowCSM(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#endif\nshadow = mix(nextShadow, shadow, diffRatio);\n#ifdef SHADOWCSMDEBUG{X}\nshadowDebug{X} = mix(vec3(nextShadow) * vCascadeColorsMultiplier{X}[index{X}], shadowDebug{X}, diffRatio);\n#endif\n}\n#endif\n}\n#elif defined(SHADOWCLOSEESM{X})\n#if defined(SHADOWCUBE{X})\nshadow = computeShadowWithCloseESMCube(vPositionW, light{X}.vLightData.xyz, shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.z, light{X}.depthValues);\n#else\nshadow = computeShadowWithCloseESM(vPositionFromLight{X}, vDepthMetric{X}, shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.z, light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWESM{X})\n#if defined(SHADOWCUBE{X})\nshadow = computeShadowWithESMCube(vPositionW, light{X}.vLightData.xyz, shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.z, light{X}.depthValues);\n#else\nshadow = computeShadowWithESM(vPositionFromLight{X}, vDepthMetric{X}, shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.z, light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPOISSON{X})\n#if defined(SHADOWCUBE{X})\nshadow = computeShadowWithPoissonSamplingCube(vPositionW, light{X}.vLightData.xyz, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.x, light{X}.depthValues);\n#else\nshadow = computeShadowWithPoissonSampling(vPositionFromLight{X}, vDepthMetric{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow = computeShadowWithPCF1(vPositionFromLight{X}, vDepthMetric{X}, shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow = computeShadowWithPCF3(vPositionFromLight{X}, vDepthMetric{X}, shadowSampler{X}, light{X}.shadowsInfo.yz, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#else\nshadow = computeShadowWithPCF5(vPositionFromLight{X}, vDepthMetric{X}, shadowSampler{X}, light{X}.shadowsInfo.yz, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow = computeShadowWithPCSS16(vPositionFromLight{X}, vDepthMetric{X}, depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.z, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow = computeShadowWithPCSS32(vPositionFromLight{X}, vDepthMetric{X}, depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.z, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#else\nshadow = computeShadowWithPCSS64(vPositionFromLight{X}, vDepthMetric{X}, depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.z, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#endif\n#else\n#if defined(SHADOWCUBE{X})\nshadow = computeShadowCube(vPositionW, light{X}.vLightData.xyz, shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.depthValues);\n#else\nshadow = computeShadow(vPositionFromLight{X}, vDepthMetric{X}, shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);\n#endif\n#endif\n#ifdef SHADOWONLY\n#ifndef SHADOWINUSE\n#define SHADOWINUSE\n#endif\nglobalShadow += shadow;\nshadowLightCount += 1.0;\n#endif\n#else\nshadow = 1.;\n#endif\naggShadow += shadow;\nnumLights += 1.0;\n#ifndef SHADOWONLY\n#ifdef CUSTOMUSERLIGHTING\ndiffuseBase += computeCustomDiffuseLighting(info, diffuseBase, shadow);\n#ifdef SPECULARTERM\nspecularBase += computeCustomSpecularLighting(info, specularBase, shadow);\n#endif\n#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X})\ndiffuseBase += lightmapColor.rgb * shadow;\n#ifdef SPECULARTERM\n#ifndef LIGHTMAPNOSPECULAR{X}\nspecularBase += info.specular * shadow * lightmapColor.rgb;\n#endif\n#endif\n#ifdef CLEARCOAT\n#ifndef LIGHTMAPNOSPECULAR{X}\nclearCoatBase += info.clearCoat.rgb * shadow * lightmapColor.rgb;\n#endif\n#endif\n#ifdef SHEEN\n#ifndef LIGHTMAPNOSPECULAR{X}\nsheenBase += info.sheen.rgb * shadow;\n#endif\n#endif\n#else\n#ifdef SHADOWCSMDEBUG{X}\ndiffuseBase += info.diffuse * shadowDebug{X};\n#else\ndiffuseBase += info.diffuse * shadow;\n#endif\n#ifdef SPECULARTERM\nspecularBase += info.specular * shadow;\n#endif\n#ifdef CLEARCOAT\nclearCoatBase += info.clearCoat.rgb * shadow;\n#endif\n#ifdef SHEEN\nsheenBase += info.sheen.rgb * shadow;\n#endif\n#endif\n#endif\n#endif`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const lightFragment = { name, shader };\n//# sourceMappingURL=lightFragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/pbrDirectLightingSetupFunctions.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'pbrDirectLightingSetupFunctions';\nconst shader = `struct preLightingInfo\n{\nvec3 lightOffset;\nfloat lightDistanceSquared;\nfloat lightDistance;\nfloat attenuation;\nvec3 L;\nvec3 H;\nfloat NdotV;\nfloat NdotLUnclamped;\nfloat NdotL;\nfloat VdotH;\nfloat roughness;\n#ifdef IRIDESCENCE\nfloat iridescenceIntensity;\n#endif\n};\npreLightingInfo computePointAndSpotPreLightingInfo(vec4 lightData, vec3 V, vec3 N) {\npreLightingInfo result;\nresult.lightOffset = lightData.xyz - vPositionW;\nresult.lightDistanceSquared = dot(result.lightOffset, result.lightOffset);\nresult.lightDistance = sqrt(result.lightDistanceSquared);\nresult.L = normalize(result.lightOffset);\nresult.H = normalize(V + result.L);\nresult.VdotH = saturate(dot(V, result.H));\nresult.NdotLUnclamped = dot(N, result.L);\nresult.NdotL = saturateEps(result.NdotLUnclamped);\nreturn result;\n}\npreLightingInfo computeDirectionalPreLightingInfo(vec4 lightData, vec3 V, vec3 N) {\npreLightingInfo result;\nresult.lightDistance = length(-lightData.xyz);\nresult.L = normalize(-lightData.xyz);\nresult.H = normalize(V + result.L);\nresult.VdotH = saturate(dot(V, result.H));\nresult.NdotLUnclamped = dot(N, result.L);\nresult.NdotL = saturateEps(result.NdotLUnclamped);\nreturn result;\n}\npreLightingInfo computeHemisphericPreLightingInfo(vec4 lightData, vec3 V, vec3 N) {\npreLightingInfo result;\nresult.NdotL = dot(N, lightData.xyz) * 0.5 + 0.5;\nresult.NdotL = saturateEps(result.NdotL);\nresult.NdotLUnclamped = result.NdotL;\n#ifdef SPECULARTERM\nresult.L = normalize(lightData.xyz);\nresult.H = normalize(V + result.L);\nresult.VdotH = saturate(dot(V, result.H));\n#endif\nreturn result;\n}\nvec3 getMRPSpecular(vec3 fragmentPositionW, vec3 lineA, vec3 lineB, vec3 R)\n{\nvec3 positionToLineA = lineA - fragmentPositionW;\nvec3 lineAtoLineB = lineB - lineA;\nfloat tNum = dot(R, lineA) * dot(lineAtoLineB, R) + dot(lineAtoLineB, fragmentPositionW) * dot(R, R) - dot(R, fragmentPositionW) * dot(lineAtoLineB, R) - dot(lineAtoLineB, lineA) * dot(R, R);\nfloat tDenom = dot(lineAtoLineB, lineAtoLineB) * dot(R, R) - dot(lineAtoLineB, R) * dot(lineAtoLineB, R);\nfloat t = clamp((tNum / tDenom), 0.0, 1.0);\nreturn lineA + lineAtoLineB * t;\n}\nvec3 getClosestPointOnLine(vec3 pointW, vec3 lineA, vec3 lineB) {\nvec3 lineAToB = lineB - lineA;\nvec3 lineAToPoint = pointW - lineA;\nfloat t = dot(lineAToPoint, lineAToB) / dot(lineAToB, lineAToB);\nt = clamp(t, 0.0, 1.0);\nreturn lineA + lineAToB * t;\n}\nvec3 getMRPDiffuse(vec3 fragmentPositionW, vec3 lineA, vec3 lineB)\n{\nvec3 positionToLineA = lineA - fragmentPositionW;\nvec3 positionToLineB = lineB - fragmentPositionW;\nvec3 lineAtoLineB = lineB - lineA;\nfloat aLen = length(positionToLineA);\nfloat bLen = length(positionToLineB);\nfloat t = clamp((aLen / (bLen + aLen)), 0.0, 1.0);\nreturn lineA + lineAtoLineB * t;\n}\nfloat getLineLightFalloff(vec3 fragmentPositionW, vec3 closestLinePoint, vec3 lineA, vec3 lineB, vec3 lineNormal, float segmentAngle, float hardSideCuttoff) {\nvec3 pointLocalFrameB = lineB - fragmentPositionW;\nvec3 lineAToB = lineB - lineA;\nfloat projectionAToB = dot(normalize(lineAToB), pointLocalFrameB);\nvec3 pointToLine = normalize(fragmentPositionW - closestLinePoint);\nfloat pointToLineDot = dot(pointToLine, lineNormal);\nfloat hardCutoff = cos(segmentAngle * 2.0 * 3.1415 / 360.0);\nif ((projectionAToB < 0.0 || projectionAToB > length(lineAToB)) && hardSideCuttoff == 1.0 || pointToLineDot < hardCutoff) {\nreturn 0.0;\n} else {\nfloat smoothCutoff = cos((segmentAngle * 0.5) * 2.0 * 3.1415 / 360.0);\nreturn max(1.0 - smoothstep(smoothCutoff, hardCutoff, pointToLineDot), 0.0);\n}\n}\npreLightingInfo computeLineLightDiffusePreLightingInfo(vec3 mrpDiffuseLightPoint, vec3 N) {\npreLightingInfo result;\nresult.lightOffset = mrpDiffuseLightPoint - vPositionW;\nresult.lightDistanceSquared = dot(result.lightOffset, result.lightOffset);\nresult.lightDistance = sqrt(result.lightDistanceSquared);\nresult.L = normalize(result.lightOffset);\nresult.NdotLUnclamped = dot(N, result.L);\nresult.NdotL = saturateEps(result.NdotLUnclamped);\nreturn result;\n}\npreLightingInfo computeLineLightSpecularPreLightingInfo(vec3 V, vec3 N, vec3 R, vec3 lineA, vec3 lineB) {\npreLightingInfo result;\nvec3 mrpSpecularLightPoint = getMRPSpecular(vPositionW, lineA, lineB, R);\nresult.lightOffset = mrpSpecularLightPoint - vPositionW;\nresult.lightDistanceSquared = dot(result.lightOffset, result.lightOffset);\nresult.lightDistance = sqrt(result.lightDistanceSquared);\nresult.L = normalize(result.lightOffset);\nresult.H = normalize(V + result.L);\nresult.VdotH = saturate(dot(V, result.H));\nresult.NdotLUnclamped = dot(N, result.L);\nresult.NdotL = saturateEps(result.NdotLUnclamped);\nreturn result;\n}`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const pbrDirectLightingSetupFunctions = { name, shader };\n//# sourceMappingURL=pbrDirectLightingSetupFunctions.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/clipPlaneFragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'clipPlaneFragment';\nconst shader = `#ifdef CLIPPLANE\nif (fClipDistance > 0.0 && fInsideMesh > 0.5)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE2\nif (fClipDistance2 > 0.0 && fInsideMesh2 > 0.5)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE3\nif (fClipDistance3 > 0.0 && fInsideMesh3 > 0.5)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE4\nif (fClipDistance4 > 0.0 && fInsideMesh4 > 0.5)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE5\nif (fClipDistance5 > 0.0 && fInsideMesh5 > 0.5)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE6\nif (fClipDistance6 > 0.0 && fInsideMesh6 > 0.5)\n{\ndiscard;\n}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const clipPlaneFragment = { name, shader };\n//# sourceMappingURL=clipPlaneFragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/clipPlaneVertex.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'clipPlaneVertex';\nconst shader = `#ifdef CLIPPLANE\nfClipDistance = dot(worldPos, vClipPlane);\nfInsideMesh = isInsideMesh(worldPos, vMinWorldBBox, vMaxWorldBBox);\n#endif\n#ifdef CLIPPLANE2\nfClipDistance2 = dot(worldPos, vClipPlane2);\nfInsideMesh2 = isInsideMesh(worldPos, vMinWorldBBox2, vMaxWorldBBox2);\n#endif\n#ifdef CLIPPLANE3\nfClipDistance3 = dot(worldPos, vClipPlane3);\nfInsideMesh3 = isInsideMesh(worldPos, vMinWorldBBox3, vMaxWorldBBox3);\n#endif\n#ifdef CLIPPLANE4\nfClipDistance4 = dot(worldPos, vClipPlane4);\nfInsideMesh4 = isInsideMesh(worldPos, vMinWorldBBox4, vMaxWorldBBox4);\n#endif\n#ifdef CLIPPLANE5\nfClipDistance5 = dot(worldPos, vClipPlane5);\nfInsideMesh5 = isInsideMesh(worldPos, vMinWorldBBox5, vMaxWorldBBox5);\n#endif\n#ifdef CLIPPLANE6\nfClipDistance6 = dot(worldPos, vClipPlane6);\nfInsideMesh6 = isInsideMesh(worldPos, vMinWorldBBox6, vMaxWorldBBox6);\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const clipPlaneVertex = { name, shader };\n//# sourceMappingURL=clipPlaneVertex.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/clipPlaneFunctions.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'clipPlaneFunctions';\nconst shader = `#ifdef CLIPPLANE_FUNC\nfloat isInsideMesh(vec4 worldPos, vec4 vMinWorld, vec4 vMaxWorld) {\nreturn (worldPos.y >= vMinWorld.y && worldPos.y <= vMaxWorld.y &&\nworldPos.x >= vMinWorld.x && worldPos.x <= vMaxWorld.x &&\nworldPos.z >= vMinWorld.z && worldPos.z <= vMaxWorld.z)\n? 1.0\n: 0.0;\n}\n#endif CLIPPLANE_FUNC\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const clipPlaneFunctions = { name, shader };\n//# sourceMappingURL=clipPlaneFunctions.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/clipPlaneVertexDeclaration.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nimport './clipPlaneFunctions.js';\nconst name = 'clipPlaneVertexDeclaration';\nconst shader = `#ifdef CLIPPLANE\nuniform vec4 vClipPlane;\nuniform vec4 vMinWorldBBox;\nuniform vec4 vMaxWorldBBox;\nvarying float fClipDistance;\nvarying float fInsideMesh;\n#ifndef CLIPPLANE_FUNC\n#define CLIPPLANE_FUNC;\n#include\n#endif\n#endif\n#ifdef CLIPPLANE2\nuniform vec4 vClipPlane2;\nuniform vec4 vMinWorldBBox2;\nuniform vec4 vMaxWorldBBox2;\nvarying float fClipDistance2;\nvarying float fInsideMesh2;\n#ifndef CLIPPLANE_FUNC\n#define CLIPPLANE_FUNC;\n#include\n#endif\n#endif\n#ifdef CLIPPLANE3\nuniform vec4 vClipPlane3;\nuniform vec4 vMinWorldBBox3;\nuniform vec4 vMaxWorldBBox3;\nvarying float fClipDistance3;\nvarying float fInsideMesh3;\n#ifndef CLIPPLANE_FUNC\n#define CLIPPLANE_FUNC;\n#include\n#endif\n#endif\n#ifdef CLIPPLANE4\nuniform vec4 vClipPlane4;\nuniform vec4 vMinWorldBBox4;\nuniform vec4 vMaxWorldBBox4;\nvarying float fClipDistance4;\nvarying float fInsideMesh4;\n#ifndef CLIPPLANE_FUNC\n#define CLIPPLANE_FUNC;\n#include\n#endif\n#endif\n#ifdef CLIPPLANE5\nuniform vec4 vClipPlane5;\nuniform vec4 vMinWorldBBox5;\nuniform vec4 vMaxWorldBBox5;\nvarying float fClipDistance5;\nvarying float fInsideMesh5;\n#ifndef CLIPPLANE_FUNC\n#define CLIPPLANE_FUNC;\n#include\n#endif\n#endif\n#ifdef CLIPPLANE6\nuniform vec4 vClipPlane6;\nuniform vec4 vMinWorldBBox6;\nuniform vec4 vMaxWorldBBox6;\nvarying float fClipDistance6;\nvarying float fInsideMesh6;\n#ifndef CLIPPLANE_FUNC\n#define CLIPPLANE_FUNC;\n#include\n#endif\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const clipPlaneVertexDeclaration = { name, shader };\n//# sourceMappingURL=clipPlaneVertexDeclaration.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/clipPlaneVertexDeclaration2.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'clipPlaneVertexDeclaration2';\nconst shader = `#ifdef CLIPPLANE\nuniform vec4 vClipPlane;\nuniform vec3 vMinWorldBBox;\nuniform vec3 vMaxWorldBBox;\nout float fClipDistance;\nout float fInsideMesh;\n#endif\n#ifdef CLIPPLANE2\nuniform vec4 vClipPlane2;\nuniform vec3 vMinWorldBBox2;\nuniform vec3 vMaxWorldBBox2;\nout float fClipDistance2;\nout float fInsideMesh2;\n#endif\n#ifdef CLIPPLANE3\nuniform vec4 vClipPlane3;\nuniform vec3 vMinWorldBBox3;\nuniform vec3 vMaxWorldBBox3;\nout float fClipDistance3;\nout float fInsideMesh2;\n#endif\n#ifdef CLIPPLANE4\nuniform vec4 vClipPlane4;\nuniform vec3 vMinWorldBBox4;\nuniform vec3 vMaxWorldBBox4;\nout float fClipDistance4;\nout float fInsideMesh4;\n#endif\n#ifdef CLIPPLANE5\nuniform vec4 vClipPlane5;\nuniform vec3 vMinWorldBBox5;\nuniform vec3 vMaxWorldBBox5;\nout float fClipDistance5;\nout float fInsideMesh5;\n#endif\n#ifdef CLIPPLANE6\nuniform vec4 vClipPlane6;\nuniform vec3 vMinWorldBBox6;\nuniform vec3 vMaxWorldBBox6;\nout float fClipDistance6;\nout float fInsideMesh6;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const clipPlaneVertexDeclaration2 = { name, shader };\n//# sourceMappingURL=clipPlaneVertexDeclaration2.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/clipPlaneFragmentDeclaration.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'clipPlaneFragmentDeclaration';\nconst shader = `#ifdef CLIPPLANE\nvarying float fClipDistance;\nvarying float fInsideMesh;\n#endif\n#ifdef CLIPPLANE2\nvarying float fClipDistance2;\nvarying float fInsideMesh2;\n#endif\n#ifdef CLIPPLANE3\nvarying float fClipDistance3;\nvarying float fInsideMesh3;\n#endif\n#ifdef CLIPPLANE4\nvarying float fClipDistance4;\nvarying float fInsideMesh4;\n#endif\n#ifdef CLIPPLANE5\nvarying float fClipDistance5;\nvarying float fInsideMesh5;\n#endif\n#ifdef CLIPPLANE6\nvarying float fClipDistance6;\nvarying float fInsideMesh6;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const clipPlaneFragmentDeclaration = { name, shader };\n//# sourceMappingURL=clipPlaneFragmentDeclaration.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/clipPlaneFragmentDeclaration2.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'clipPlaneFragmentDeclaration2';\nconst shader = `#ifdef CLIPPLANE\nin float fClipDistance;\nin float fInsideMesh;\n#endif\n#ifdef CLIPPLANE2\nin float fClipDistance2;\nin float fInsideMesh2;\n#endif\n#ifdef CLIPPLANE3\nin float fClipDistance3;\nin float fInsideMesh3;\n#endif\n#ifdef CLIPPLANE4\nin float fClipDistance4;\nin float fInsideMesh4;\n#endif\n#ifdef CLIPPLANE5\nin float fClipDistance5;\nin float fInsideMesh5;\n#endif\n#ifdef CLIPPLANE6\nin float fClipDistance6;\nin float fInsideMesh6;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const clipPlaneFragmentDeclaration2 = { name, shader };\n//# sourceMappingURL=clipPlaneFragmentDeclaration2.js.map","import { Effect as BABYLON_Effect } from '@inter-ikea-betrakta-babylonjs/core/Materials/effect.js';\nimport { PBRMaterial as BABYLON_PBRMaterial } from '@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js';\nimport { SerializationHelper as BABYLON_SerializationHelper } from '@inter-ikea-betrakta-babylonjs/core/Misc/decorators.js';\nimport { Tools as BABYLON_Tools } from '@inter-ikea-betrakta-babylonjs/core/Misc/tools.js';\nimport { BabylonLineLight } from '../BabylonLineLight.js';\nimport '../shaders/ShadersInclude/lightUboDeclaration.js';\nimport '../shaders/ShadersInclude/lightVxUboDeclaration.js';\nimport '../shaders/ShadersInclude/lightFragmentDeclaration.js';\nimport '../shaders/ShadersInclude/lightFragment.js';\nimport '../shaders/ShadersInclude/pbrDirectLightingSetupFunctions.js';\nimport '../shaders/ShadersInclude/clipPlaneFragment.js';\nimport '../shaders/ShadersInclude/clipPlaneVertex.js';\nimport '../shaders/ShadersInclude/clipPlaneVertexDeclaration.js';\nimport '../shaders/ShadersInclude/clipPlaneVertexDeclaration2.js';\nimport '../shaders/ShadersInclude/clipPlaneFragmentDeclaration.js';\nimport '../shaders/ShadersInclude/clipPlaneFragmentDeclaration2.js';\nimport '../shaders/ShadersInclude/clipPlaneFunctions.js';\nimport { BoundingBox as BABYLON_BoundingBox } from '@inter-ikea-betrakta-babylonjs/core/Culling/boundingBox.js';\nimport { ClipPlane } from '../Viewer.js';\nexport const ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME = 'viewer_ar_atttribute';\nconst ALBEDO_ROUGHNESS_UNIFORM_NAME = 'viewer_ar';\nconst ALBEDO_ROUGHNESS_DEFINE = 'VIEWER_ALBEDO_ROUGHNESS';\nconst SHADER_NAME = 'viewer_pbr';\nexport class ViewerMaterial extends BABYLON_PBRMaterial {\n static create_shaders(ubo_support) {\n // We manipulate the standard shaders in a way such that they are the same unless new defines are set\n // Hence we don't change the shader name to a custom shader name\n let fs = BABYLON_Effect.ShadersStore['pbrPixelShader'];\n // We need to resolve some includes in order to be able to see/change their custom #define entrypoints\n fs = fs.replace(/#include/g, BABYLON_Effect.IncludesShadersStore['pbrBlockAlbedoOpacity']);\n fs = fs.replace(/#include/g, BABYLON_Effect.IncludesShadersStore['pbrBlockReflectivity']);\n let vs = BABYLON_Effect.ShadersStore['pbrVertexShader'];\n // NOTE: Webgl1 shaders!\n vs = vs.replace('#define CUSTOM_VERTEX_DEFINITIONS', `#ifdef ${ALBEDO_ROUGHNESS_DEFINE}\n #ifdef INSTANCES\n attribute vec4 ${ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME};\n varying vec4 ${ALBEDO_ROUGHNESS_UNIFORM_NAME};\n #endif\n#endif`);\n vs = vs.replace('#define CUSTOM_VERTEX_MAIN_BEGIN', `#ifdef ${ALBEDO_ROUGHNESS_DEFINE}\n #ifdef INSTANCES\n ${ALBEDO_ROUGHNESS_UNIFORM_NAME} = ${ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME};\n #endif\n#endif`);\n fs = fs.replace('#define CUSTOM_FRAGMENT_DEFINITIONS', `#ifdef ${ALBEDO_ROUGHNESS_DEFINE}\n #ifdef INSTANCES\n varying vec4 ${ALBEDO_ROUGHNESS_UNIFORM_NAME};\n #else\n uniform vec4 ${ALBEDO_ROUGHNESS_UNIFORM_NAME};\n #endif\n#endif`);\n fs = fs.replace('#define CUSTOM_FRAGMENT_UPDATE_ALBEDO', `#ifdef ${ALBEDO_ROUGHNESS_DEFINE}\n surfaceAlbedo *= ${ALBEDO_ROUGHNESS_UNIFORM_NAME}.xyz;\n#endif`);\n fs = fs.replace('#define CUSTOM_FRAGMENT_UPDATE_METALLICROUGHNESS', `#ifdef ${ALBEDO_ROUGHNESS_DEFINE}\n metallicRoughness.g *= ${ALBEDO_ROUGHNESS_UNIFORM_NAME}.w;\n#endif`);\n BABYLON_Effect.RegisterShader(SHADER_NAME, fs, vs);\n let linelight_vs = BABYLON_Effect.ShadersStore['pbrVertexShader'];\n const linelight_fs = BABYLON_Effect.ShadersStore['pbrPixelShader'];\n linelight_vs = linelight_vs.replace(/#include/g, BABYLON_Effect.IncludesShadersStore['lightsFragmentFunctions']);\n BABYLON_Effect.RegisterShader('pbrPixelShader', linelight_fs, linelight_vs);\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n _afterBind(mesh, effect = null) {\n super._afterBind(mesh, effect);\n if (effect) {\n this.set_clip_plane_uniforms(effect);\n }\n }\n set_clip_plane_uniforms(effect) {\n for (let i = 0; i < this._clip_plane_bboxes.length; i++) {\n const index = ViewerMaterial.get_bbox_index_string(i);\n // TODO: this is a workaround since setting the clip plane to null no longer clears it. will ask on babylon forum\n // https://forum.babylonjs.com/t/clipping-plane-potential-bug/37851\n // TODO: Check if needed with babylon version > 5.46.0\n if (this.getScene()['clipPlane' + index] === null) {\n // we put the plane 2^10-1 (1023) meters away since it's the largest int that can be stored in a half float (16-bit)\n effect.setFloat4('vClipPlane' + index, 1, 0, 0, -1023);\n }\n if (this._clip_plane_bboxes[i]) {\n const min_world = this._clip_plane_bboxes[i].minimumWorld;\n const max_world = this._clip_plane_bboxes[i].maximumWorld;\n effect.setFloat4('vMinWorldBBox' + index, min_world.x, min_world.y, min_world.z, 1);\n effect.setFloat4('vMaxWorldBBox' + index, max_world.x, max_world.y, max_world.z, 1);\n }\n }\n }\n static get_bbox_index_string(index) {\n return index === 0 ? '' : String(index + 1);\n }\n constructor(name, scene, viewer) {\n super(name, scene);\n this._enable_albedo_roughness_factor = false;\n this._clip_plane_bboxes = new Array(6);\n this._viewer = viewer;\n this.customShaderNameResolve = this.override_effect;\n // These are true by default - which utterly breaks alpha blending on reflections\n this.useRadianceOverAlpha = false;\n this.useSpecularOverAlpha = false;\n this.useAlphaFromAlbedoTexture = true;\n }\n override_effect(shader_name, uniforms, uniform_buffers, samplers, defines, attributes) {\n const d = defines;\n const current_albedo = defines[ALBEDO_ROUGHNESS_DEFINE];\n let light_exists = true;\n let light_index = 0;\n for (let i = 0; i < 6; i++) {\n uniforms.push('vMinWorldBBox' + ViewerMaterial.get_bbox_index_string(i));\n uniforms.push('vMaxWorldBBox' + ViewerMaterial.get_bbox_index_string(i));\n }\n // Test all lights if they are line lights\n // TODO Ask Babylon for list of active lights in scene and their respective lightindex and iterate over that instead\n while (light_exists) {\n light_exists = defines['LIGHT' + light_index];\n if (light_exists) {\n // Check if it's a linelight type of light\n if (defines['LINELIGHT' + light_index]) {\n // if so push all the uniforms needed for webgl1\n uniforms.push(BabylonLineLight.LINE_A_UNIFORM + light_index);\n uniforms.push(BabylonLineLight.LINE_B_UNIFORM + light_index);\n uniforms.push(BabylonLineLight.LINE_NORMAL_AND_ANGLE_RANGE_UNIFORM + light_index);\n uniforms.push(BabylonLineLight.LINE_CLIP_PLANE_NORMAL_DISTANCE + light_index);\n }\n }\n light_index++;\n }\n const use_instances = defines['INSTANCES'];\n if (current_albedo === undefined && !this._enable_albedo_roughness_factor) {\n // No need to change anything\n return shader_name;\n }\n if (this._enable_albedo_roughness_factor && attributes) {\n if (use_instances) {\n attributes.push(ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME);\n }\n else {\n uniforms.push(ALBEDO_ROUGHNESS_UNIFORM_NAME);\n }\n }\n // If same as last time we are happy\n if (current_albedo === this._enable_albedo_roughness_factor) {\n return this._enable_albedo_roughness_factor ? SHADER_NAME : shader_name;\n }\n if (current_albedo === undefined) {\n if (this._enable_albedo_roughness_factor) {\n // @ts-ignore\n d._keys.push(ALBEDO_ROUGHNESS_DEFINE); // I wish there was a better way to accomplish this without rebuilding it fully\n defines[ALBEDO_ROUGHNESS_DEFINE] = true;\n if (use_instances) {\n d.markAsAttributesDirty();\n }\n else {\n d.markAllAsDirty(); // TODO-NOTE: We want to mark uniforms as dirty but not sure how\n }\n }\n }\n else if (current_albedo !== this._enable_albedo_roughness_factor) {\n defines[ALBEDO_ROUGHNESS_DEFINE] = this._enable_albedo_roughness_factor; // When we turn it off we leave it in MaterialDefines so we are quicker to enable it next time\n if (use_instances) {\n d.markAsAttributesDirty();\n }\n else {\n d.markAllAsDirty(); // TODO-NOTE: We want to mark uniforms as dirty but not sure how\n }\n }\n return SHADER_NAME;\n }\n set enable_albedo_roughness_factor(value) {\n if (value !== this._enable_albedo_roughness_factor) {\n this._enable_albedo_roughness_factor = value;\n this.markDirty();\n }\n }\n get enable_albedo_roughness_factor() {\n return this._enable_albedo_roughness_factor;\n }\n clone(name) {\n const clone = BABYLON_SerializationHelper.Clone(() => new ViewerMaterial(name, this.getScene(), this._viewer), this);\n clone.id = BABYLON_Tools.RandomId();\n clone.name = name + ' clone';\n // NOTE: This is not forward-proof but we can't change the type being created in super.clone\n // Would be better if we could create the new material and then do super.copy\n this.clearCoat.copyTo(clone.clearCoat);\n this.anisotropy.copyTo(clone.anisotropy);\n this.brdf.copyTo(clone.brdf);\n this.sheen.copyTo(clone.sheen);\n this.subSurface.copyTo(clone.subSurface);\n return clone;\n }\n /**\n * Add a bounding box to specify parts of meshes, using this material, that should be clipped when clip planes are used.\n */\n add_clipping_bounding_info(min_world, max_world, clip_plane_index) {\n // Convert to zero-based index\n this._clip_plane_bboxes[(clip_plane_index || ClipPlane.ONE)] = new BABYLON_BoundingBox(min_world, max_world);\n this.markDirty();\n }\n dispose(force_dispose_effect, force_dispose_textures) {\n super.dispose(true, true);\n this._bumpTexture = null;\n this._albedoTexture = null;\n this._ambientTexture = null;\n this._opacityTexture = null;\n this._emissiveTexture = null;\n this._lightmapTexture = null;\n this._metallicTexture = null;\n this._reflectionTexture = null;\n this._reflectanceTexture = null;\n this._microSurfaceTexture = null;\n this._environmentBRDFTexture = null;\n this._metallicReflectanceTexture = null;\n // @ts-ignore\n this._eventInfo = {}; // This is needed or the ArrayBuffers will be prevented from being GCed.\n }\n}\nViewerMaterial.active_line_lights = new Array();\n// BABYLON__TypeStore.RegisteredTypes['PBRMaterial'] = PBRMaterial\n//# sourceMappingURL=ViewerMaterial.js.map","import { Light } from './lights/Light.js';\nimport { ColorMode } from './debug_visualizers/LightVisualizer.js';\nimport { assert } from '../../utility/Assert.js';\n/**\n * A system for managing lights in the viewer.\n * Contains the lights, shadow casters and functionality for visualizing lights\n */\nexport class LightSystem {\n constructor(max_shadowcasting_lights, viewer) {\n this.max_shadowcasting_lights = max_shadowcasting_lights;\n this.viewer = viewer;\n this._lights = [];\n this._shadow_casters = new Set();\n this._dirty_meshes_bounds = new Map();\n this._debug_enabled = false;\n this._debug_color_mode = ColorMode.DIFFERENTIATED;\n this._forced_dirty = false;\n this._object_removed_observer =\n this.viewer.viewer_scene.object_removed_observable\n .add((_, object) => this.on_object_removed(object));\n }\n add_light(light) {\n if (this.debug_enabled) {\n assert(light.debug_geomentry === null, 'Light already has debug geometry');\n light.create_debug_geometry();\n }\n this._lights.push(light);\n }\n remove_light(light) {\n if (!this._lights.includes(light)) {\n console.warn(`Not able to remove light with id: ${light.id}. Light not found`);\n return false;\n }\n this._lights.splice(this._lights.indexOf(light), 1);\n this._forced_dirty = true;\n return true;\n }\n has_light(light) {\n return this._lights.includes(light);\n }\n get_all_lights() {\n return [...this._lights];\n }\n dispose_all_lights() {\n this._lights.forEach(light => light.dispose());\n this._lights.length = 0;\n this._forced_dirty = true;\n }\n mark_all_shadowmaps_dirty() {\n this._lights.forEach((light) => {\n var _a;\n if (light.shadow !== null) {\n (_a = light.shadow) === null || _a === void 0 ? void 0 : _a.update_babylon_shadowmap();\n light.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n });\n }\n update() {\n const meshes_bounds_modifications = [...this._dirty_meshes_bounds.values()];\n this._lights.forEach(light => {\n var _a, _b, _c;\n light.update();\n (_a = light.shadow) === null || _a === void 0 ? void 0 : _a.update(meshes_bounds_modifications);\n (_b = light.shadow) === null || _b === void 0 ? void 0 : _b.render();\n if (light.is_dirty()) {\n light.update_observable.notify(light);\n (_c = light.debug_geomentry) === null || _c === void 0 ? void 0 : _c.update();\n this.viewer.mark_scene_dirty();\n }\n light.clear_dirty_flags();\n });\n this._dirty_meshes_bounds.clear();\n this._forced_dirty = false;\n }\n set_cast_shadow(object, cast_shadow) {\n if (cast_shadow) {\n this._shadow_casters.add(object);\n // This is a quick fix. We should have a better solution for adding shadow casters. TODO: IC3V-1677\n this._lights.forEach(light => { var _a; return (_a = light.shadow) === null || _a === void 0 ? void 0 : _a.add_shadowcaster(object); });\n }\n else {\n this._shadow_casters.delete(object);\n this._lights.forEach(light => { var _a; return (_a = light.shadow) === null || _a === void 0 ? void 0 : _a.remove_shadowcaster(object); });\n }\n }\n can_enable_shadow() {\n const shadowcasting_lights = this.viewer.scene.lights.filter((light) => light.shadowEnabled);\n return shadowcasting_lights.length < this.max_shadowcasting_lights;\n }\n get debug_enabled() {\n return this._debug_enabled;\n }\n set debug_enabled(debug) {\n this._debug_enabled = debug;\n this._lights.forEach(light => {\n if (debug) {\n assert(light.debug_geomentry === null, 'Light already has debug geometry');\n light.create_debug_geometry();\n }\n else {\n light.remove_debug_geometry();\n }\n });\n }\n set debug_color_mode(mode) {\n this._debug_color_mode = mode;\n this._lights.forEach(light => {\n const debug_geomentry = light.debug_geomentry;\n if (debug_geomentry) {\n debug_geomentry.color_mode = mode;\n }\n });\n }\n get debug_color_mode() {\n return this._debug_color_mode;\n }\n is_dirty() {\n return this._lights.some(light => light.is_dirty()) || this._forced_dirty;\n }\n get ready() {\n return Promise.all(this._lights.map(light => light.ready)).then(() => Promise.resolve());\n }\n dispose() {\n this.dispose_all_lights();\n this._shadow_casters.clear();\n this._dirty_meshes_bounds.clear();\n this.viewer.viewer_scene.object_removed_observable.remove(this._object_removed_observer);\n }\n get shadow_casters() {\n return this._shadow_casters;\n }\n /**\n * Notify the light system that a mesh has been modified.\n */\n on_mesh_modified(mesh_id, old_bounds, new_bounds) {\n if (this._dirty_meshes_bounds.has(mesh_id)) {\n // If we modify an object multiple times within a frame, we only want to process the composed result.\n // E.g. we only need to know where the object was located the previous frame, and where it will be located next frame.\n this._dirty_meshes_bounds.get(mesh_id).new_bounds = new_bounds;\n // TODO we never updat old bounds? Why we need them?\n }\n else {\n this._dirty_meshes_bounds.set(mesh_id, { old_bounds: old_bounds, new_bounds: new_bounds });\n }\n }\n /**\n * Notify the light system that a scene object has been modified.\n */\n on_object_modified(scene_object) {\n this._lights.forEach(light => {\n if (light.parent === scene_object.id) {\n light.mark_dirty(Light.DIRTY_PARENT_TRANSFORM);\n }\n });\n }\n on_object_removed(object) {\n this._lights.forEach(light => {\n if (light.parent === object.id) {\n light.mark_dirty(Light.DIRTY_PARENT_REMOVED);\n }\n });\n this._shadow_casters.delete(object);\n }\n}\nLightSystem.BABYLON_MATERIAL_MAXIMUM_LIGHT_COUNT = 64;\n//# sourceMappingURL=LightSystem.js.map","import { Color3 as BABYLON_Color3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js';\nimport { MultiMaterial as BABYLON_MultiMaterial } from '@inter-ikea-betrakta-babylonjs/core/Materials/multiMaterial.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nimport { ViewerMaterial } from './material/ViewerMaterial.js';\nimport { LightSystem } from './light-manager/light-system/LightSystem.js';\nexport function mark_material_rendered(material, rendered = true) {\n material.metadata = material.metadata || {};\n material.metadata.rendered = rendered;\n}\nexport function is_material_rendered(material) {\n return material.metadata && material.metadata.rendered;\n}\nexport class Material {\n constructor(material_id, texture_manager, freezing_manager, material) {\n this.freezing_manager = freezing_manager;\n this._material = null;\n this._multi_material = null;\n this.is_default_created_material = false;\n this._material_url = null;\n this._custom_base_color = null;\n this._original_base_color = new BABYLON_Color3(1.0, 1.0, 1.0);\n this._custom_emissive_color = null;\n this._original_emissive_color = BABYLON_Color3.Black();\n this._custom_emissive_intensity = -1;\n this._original_emissive_intensity = 0.5;\n this._custom_roughness = null;\n this._original_roughness = 1.0;\n this._custom_metallic = null;\n this._original_metallic = 1.0;\n this._custom_base_color_texture = null;\n this._original_base_color_texture = null;\n this._custom_normal_texture = null;\n this._original_normal_texture = null;\n this._custom_occlusion_roughness_metallic_texture = null;\n this._original_occlusion_roughness_metallic_texture = null;\n this._custom_lightmap_texture = null;\n this._original_lightmap_texture = null;\n this.ready = Promise.resolve();\n this.material_id = material_id;\n this._texture_manager = texture_manager;\n if (material instanceof ViewerMaterial) {\n this._material = material;\n this._material.maxSimultaneousLights = LightSystem.BABYLON_MATERIAL_MAXIMUM_LIGHT_COUNT;\n }\n else if (material instanceof BABYLON_MultiMaterial) {\n this._multi_material = material;\n this._multi_material.subMaterials.forEach(sub_material => {\n if (sub_material instanceof ViewerMaterial) {\n sub_material.maxSimultaneousLights = LightSystem.BABYLON_MATERIAL_MAXIMUM_LIGHT_COUNT;\n }\n });\n }\n }\n get multi_material() {\n return this._multi_material;\n }\n set multi_material(material) {\n if (material === this._multi_material) {\n return;\n }\n if (this._material) {\n this._material.dispose();\n this._material = null;\n }\n if (this._multi_material) {\n this._multi_material.dispose();\n }\n this._multi_material = material;\n this.set_dirty();\n }\n get material() {\n return this._material;\n }\n set material(material) {\n if (material === this._material) {\n return;\n }\n if (this._material) {\n this._material.dispose();\n }\n if (this._multi_material) {\n this._multi_material.dispose();\n this._multi_material = null;\n }\n this._material = material;\n if (material) {\n // Store original material values\n this._original_metallic = material.metallic === null ? 1.0 : material.metallic;\n this._original_roughness = material.roughness === null ? 1.0 : material.roughness;\n this._original_base_color = new BABYLON_Color3(Math.pow(material.albedoColor.r, 1 / 2.2), Math.pow(material.albedoColor.g, 1 / 2.2), Math.pow(material.albedoColor.b, 1 / 2.2));\n this._original_emissive_color = material.emissiveColor.clone();\n this._original_emissive_intensity = material.emissiveIntensity;\n if (material.albedoTexture) {\n this._original_base_color_texture = this.init_texture(material.albedoTexture);\n }\n if (material.bumpTexture) {\n this._original_normal_texture = this.init_texture(material.bumpTexture);\n }\n if (material.metallicTexture) {\n this._original_occlusion_roughness_metallic_texture = this.init_texture(material.metallicTexture);\n }\n if (material.lightmapTexture) {\n this._original_lightmap_texture = this.init_texture(material.lightmapTexture);\n }\n material.useLightmapAsShadowmap = true; // Lightmaps in viewer are always multiplicative\n // Apply custom values, if set\n if (this._custom_base_color !== null) {\n material.albedoColor.set(Math.pow(this._custom_base_color.r, 2.2), Math.pow(this._custom_base_color.g, 2.2), Math.pow(this._custom_base_color.b, 2.2));\n }\n if (this._custom_metallic !== null) {\n material.metallic = this._custom_metallic;\n }\n if (this._custom_roughness !== null) {\n material.roughness = this._custom_roughness;\n }\n if (this._custom_base_color_texture !== null) {\n material.albedoTexture = this._texture_manager.get(this._custom_base_color_texture);\n }\n if (this._custom_emissive_color !== null) {\n material.emissiveColor.set(Math.pow(this._custom_emissive_color.r, 2.2), Math.pow(this._custom_emissive_color.g, 2.2), Math.pow(this._custom_emissive_color.b, 2.2));\n }\n if (this._custom_emissive_intensity !== -1) {\n material.emissiveIntensity = this._custom_emissive_intensity;\n }\n if (this._custom_normal_texture !== null) {\n material.bumpTexture = this._texture_manager.get(this._custom_normal_texture);\n }\n if (this._custom_occlusion_roughness_metallic_texture !== null) {\n material.metallicTexture = this._texture_manager.get(this._custom_occlusion_roughness_metallic_texture);\n }\n if (this._custom_lightmap_texture !== null) {\n material.lightmapTexture = this._texture_manager.get(this._custom_lightmap_texture);\n }\n }\n this.set_dirty();\n }\n get roughness() {\n return this._custom_roughness !== null ? this._custom_roughness : this._original_roughness;\n }\n set roughness(v) {\n this._custom_roughness = v;\n if (this._material) {\n this._material.roughness = v;\n }\n this.set_dirty();\n }\n reset_roughness() {\n this._custom_roughness = null;\n if (this._material) {\n this._material.roughness = this._original_roughness;\n }\n this.set_dirty();\n }\n get metallic() {\n return this._custom_metallic !== null ? this._custom_metallic : this._original_metallic;\n }\n set metallic(v) {\n this._custom_metallic = v;\n if (this._material) {\n this._material.metallic = v;\n }\n this.set_dirty();\n }\n reset_metallic() {\n this._custom_metallic = null;\n if (this._material) {\n this._material.metallic = this._original_metallic;\n }\n this.set_dirty();\n }\n get base_color() {\n return this._custom_base_color !== null ? this._custom_base_color : this._original_base_color;\n }\n set base_color(v) {\n this._custom_base_color = v;\n if (this._material) {\n this._material.albedoColor.set(Math.pow(v.r, 2.2), Math.pow(v.g, 2.2), Math.pow(v.b, 2.2));\n }\n this.set_dirty();\n }\n get emissive_color() {\n return this._custom_emissive_color !== null ? this._custom_emissive_color : this._original_emissive_color;\n }\n set emissive_color(v) {\n this._custom_emissive_color = v;\n if (this._material) {\n this._material.emissiveColor.set(Math.pow(v.r, 2.2), Math.pow(v.g, 2.2), Math.pow(v.b, 2.2));\n }\n this.set_dirty();\n }\n reset_emissive_color() {\n this._custom_emissive_color = null;\n if (this._material) {\n this._material.emissiveColor.set(Math.pow(this._original_emissive_color.r, 2.2), Math.pow(this._original_emissive_color.g, 2.2), Math.pow(this._original_emissive_color.b, 2.2));\n }\n this.set_dirty();\n }\n set emissive_intensity(v) {\n this._custom_emissive_intensity = v;\n if (this._material) {\n this._material.emissiveIntensity = v;\n }\n this.set_dirty();\n }\n reset_emissive_intensity(v) {\n this._custom_emissive_intensity = -1;\n if (this._material) {\n this._material.emissiveIntensity = this._original_emissive_intensity;\n }\n this.set_dirty();\n }\n reset_base_color() {\n this._custom_base_color = null;\n if (this._material) {\n this._material.albedoColor.set(Math.pow(this._original_base_color.r, 2.2), Math.pow(this._original_base_color.g, 2.2), Math.pow(this._original_base_color.b, 2.2));\n }\n this.set_dirty();\n }\n get base_color_texture() {\n return this._custom_base_color_texture !== null ? this._custom_base_color_texture : this._original_base_color_texture;\n }\n set base_color_texture(v) {\n this._custom_base_color_texture = v;\n if (this._material) {\n this.set_texture('albedoTexture', v);\n }\n }\n reset_base_color_texture() {\n this._custom_base_color_texture = null;\n if (this.material) {\n this.set_texture('albedoTexture', this._original_base_color_texture);\n }\n }\n get normal_texture() {\n return this._custom_normal_texture !== null ? this._custom_normal_texture : this._original_normal_texture;\n }\n set normal_texture(v) {\n this._custom_normal_texture = v;\n if (this.material) {\n this.set_texture('bumpTexture', v);\n }\n }\n reset_normal_texture() {\n this._custom_normal_texture = null;\n if (this.material) {\n this.set_texture('bumpTexture', this._original_normal_texture);\n }\n }\n get occlusion_roughness_metallic_texture() {\n return this._custom_occlusion_roughness_metallic_texture !== null\n ? this._custom_occlusion_roughness_metallic_texture\n : this._original_occlusion_roughness_metallic_texture;\n }\n set occlusion_roughness_metallic_texture(v) {\n this._custom_occlusion_roughness_metallic_texture = v;\n if (this.material) {\n this.set_texture('metallicTexture', v);\n }\n }\n reset_occlusion_roughness_metallic_texture() {\n this._custom_occlusion_roughness_metallic_texture = null;\n if (this.material) {\n this.set_texture('metallicTexture', this._original_occlusion_roughness_metallic_texture);\n }\n }\n get lightmap_texture() {\n return this._custom_lightmap_texture !== null ? this._custom_lightmap_texture : this._original_lightmap_texture;\n }\n set lightmap_texture(v) {\n this._custom_lightmap_texture = v;\n if (this.material) {\n this.set_texture('lightmapTexture', v);\n }\n }\n get unlit() {\n return this.material.unlit;\n }\n set unlit(unlit) {\n this.material.unlit = unlit;\n }\n set_opacity(alpha) {\n if (this.material) {\n if (alpha < 1.0) {\n this.material.alphaMode = BABYLON_Constants.ALPHA_COMBINE;\n if (this.material.transparencyMode === ViewerMaterial.PBRMATERIAL_ALPHATEST) {\n this.material.transparencyMode = ViewerMaterial.PBRMATERIAL_ALPHATESTANDBLEND;\n }\n else {\n this.material.transparencyMode = ViewerMaterial.PBRMATERIAL_ALPHABLEND;\n }\n }\n else { // I see no case ever where a user would want to make a previously transparent material solid again, but might as well put it here so we can do that if we choose to\n this.material.alphaMode = BABYLON_Constants.ALPHA_DISABLE;\n if (this.material.transparencyMode === ViewerMaterial.PBRMATERIAL_ALPHATESTANDBLEND) {\n this.material.transparencyMode = ViewerMaterial.PBRMATERIAL_ALPHATEST;\n }\n else {\n this.material.transparencyMode = ViewerMaterial.PBRMATERIAL_OPAQUE;\n }\n }\n this.material.alpha = alpha;\n }\n }\n reset_lightmap_texture() {\n this._custom_lightmap_texture = null;\n if (this.material) {\n this.set_texture('lightmapTexture', this._original_lightmap_texture);\n }\n }\n set_texture(texture_property, id) {\n if (this.material) {\n if (id !== null) {\n this.material[texture_property] = this._texture_manager.get(id);\n }\n else {\n this.material[texture_property] = null;\n }\n this.set_dirty();\n }\n }\n init_texture(texture) {\n const id = this._texture_manager.find_id(texture);\n if (id >= 0) {\n return id;\n }\n return this._texture_manager.add(texture);\n }\n set_dirty() {\n if (this.material) {\n this.freezing_manager.set_material_dirty(this.material);\n }\n if (this.multi_material) {\n for (const submaterial of this.multi_material.subMaterials) {\n if (submaterial) {\n this.freezing_manager.set_material_dirty(submaterial);\n }\n }\n }\n }\n dispose() {\n this.ready.then(() => {\n if (this._material) {\n this._material.dispose();\n this._material = null;\n }\n if (this._multi_material) {\n this._multi_material.dispose();\n this._multi_material = null;\n }\n }, () => {\n console.warn('Material is not ready to be disposed.');\n });\n }\n}\n//# sourceMappingURL=Material.js.map","/**\n * Base class for creating specific constant reference wrappers\n */\nclass AbstractConstantReference {\n constructor(_target, _key) {\n this._target = _target;\n this._key = _key;\n }\n get_property(property_name) {\n return this._target[this._key][property_name];\n }\n set_property(property_name, value) {\n this._target[this._key][property_name] = value;\n }\n get_value() {\n return this._target[this._key];\n }\n set_value(value) {\n this._target[this._key] = value;\n }\n}\n/**\n * A constant reference is an object wrapping a property on another object,\n * letting the user interact with it as if it was a constant object (never assigned to a new object)\n * Even if the underlying implementation gives no such guarantees.\n */\nexport class Color3ConstantReference extends AbstractConstantReference {\n constructor(_target, _key, _mark_dirty) {\n super(_target, _key);\n this._mark_dirty = _mark_dirty;\n }\n get r() {\n return this.get_property('r');\n }\n set r(val) {\n var _a;\n if (this.get_property('r') !== val) {\n this.set_property('r', val);\n (_a = this._mark_dirty) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n }\n get g() {\n return this.get_property('g');\n }\n set g(val) {\n var _a;\n if (this.get_property('g') !== val) {\n this.set_property('g', val);\n (_a = this._mark_dirty) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n }\n get b() {\n return this.get_property('b');\n }\n set b(val) {\n var _a;\n if (this.get_property('b') !== val) {\n this.set_property('b', val);\n (_a = this._mark_dirty) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n }\n}\nexport class VectorColorConstantReference extends AbstractConstantReference {\n constructor(_target, _key, _mark_dirty) {\n super(_target, _key);\n this._mark_dirty = _mark_dirty;\n }\n get x() {\n return this.get_property('r');\n }\n set x(val) {\n var _a;\n if (this.get_property('r') !== val) {\n this.set_property('r', val);\n (_a = this._mark_dirty) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n }\n get y() {\n return this.get_property('g');\n }\n set y(val) {\n var _a;\n if (this.get_property('g') !== val) {\n this.set_property('g', val);\n (_a = this._mark_dirty) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n }\n get z() {\n return this.get_property('b');\n }\n set z(val) {\n var _a;\n if (this.get_property('b') !== val) {\n this.set_property('b', val);\n (_a = this._mark_dirty) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n }\n}\nexport class Vector3ConstantReference extends AbstractConstantReference {\n constructor(_target, _key, _mark_dirty) {\n super(_target, _key);\n this._mark_dirty = _mark_dirty;\n }\n get x() {\n return this.get_property('x');\n }\n set x(val) {\n var _a;\n if (this.get_property('x') !== val) {\n this.set_property('x', val);\n (_a = this._mark_dirty) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n }\n get y() {\n return this.get_property('y');\n }\n set y(val) {\n var _a;\n if (this.get_property('y') !== val) {\n this.set_property('y', val);\n (_a = this._mark_dirty) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n }\n get z() {\n return this.get_property('z');\n }\n set z(val) {\n var _a;\n if (this.get_property('z') !== val) {\n this.set_property('z', val);\n (_a = this._mark_dirty) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n }\n}\nexport class Vector3ConstantPropertyReference extends AbstractConstantReference {\n get x() {\n return this.get_property('x');\n }\n set x(val) {\n const { y, z } = this.get_value();\n this.set_value({ x: val, y: y, z: z });\n }\n get y() {\n return this.get_property('y');\n }\n set y(val) {\n const { x, z } = this.get_value();\n this.set_value({ x: x, y: val, z: z });\n }\n get z() {\n return this.get_property('z');\n }\n set z(val) {\n const { x, y } = this.get_value();\n this.set_value({ x: x, y: y, z: val });\n }\n}\n//# sourceMappingURL=PropertyWrappers.js.map","/**\n * The following code is copied and modified versions from\n * https://www.npmjs.com/package/uuid\n * Licensed under MIT license\n */\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nconst rnds8 = new Uint8Array(16);\nfunction rng() {\n return crypto.getRandomValues(rnds8);\n}\n// Regex used to validate that the final stringified regex conforms to the standard.\nconst validate_regex = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nfunction validate(uuid) {\n return validate_regex.test(uuid);\n}\n// LUT for converting byte to hex string\nconst byte_to_hex = [];\nfor (let i = 0; i < 256; ++i) {\n byte_to_hex.push((i + 0x100).toString(16).substring(1));\n}\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byte_to_hex[arr[offset + 0]] + byte_to_hex[arr[offset + 1]] + byte_to_hex[arr[offset + 2]] + byte_to_hex[arr[offset + 3]] + '-' + byte_to_hex[arr[offset + 4]] + byte_to_hex[arr[offset + 5]] + '-' + byte_to_hex[arr[offset + 6]] + byte_to_hex[arr[offset + 7]] + '-' + byte_to_hex[arr[offset + 8]] + byte_to_hex[arr[offset + 9]] + '-' + byte_to_hex[arr[offset + 10]] + byte_to_hex[arr[offset + 11]] + byte_to_hex[arr[offset + 12]] + byte_to_hex[arr[offset + 13]] + byte_to_hex[arr[offset + 14]] + byte_to_hex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport function uuidv4() {\n const rnds = rng();\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n return stringify(rnds);\n}\n//# sourceMappingURL=uuidv4.js.map","import { Color3ConstantReference, VectorColorConstantReference } from './PropertyWrappers.js';\nimport { uuidv4 } from '../../uuidv4.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\n/**\n * The ViewerMaterialWrapper handles all the logic for implementing out material interfaces\n * and translating the that to the underlying ViewerMaterial.\n * It would be possible to have ViewerMaterial implement the interfaces directly but\n * That lead to much messier code, so this setup was chosen.\n */\nexport class ViewerMaterialWrapper {\n constructor(material, is_applied_by_model_loader, asset_manager, _mark_scene_dirty) {\n this.is_applied_by_model_loader = is_applied_by_model_loader;\n this._mark_scene_dirty = _mark_scene_dirty;\n this._asset_manager = asset_manager;\n this._material = material;\n this._viewer_id = uuidv4();\n this._base_color_factor = new VectorColorConstantReference(material, 'albedoColor', _mark_scene_dirty);\n this._emissive_factor = new Color3ConstantReference(material, 'emissiveColor', _mark_scene_dirty);\n }\n // Wrapper properties\n get material() {\n return this._material;\n }\n get viewer_id() {\n return this._viewer_id;\n }\n get name() {\n return this._material.name;\n }\n // Start external properties\n // IMaterial properties\n get id() {\n return this._viewer_id;\n }\n get unlit() {\n return this._material.unlit;\n }\n set unlit(val) {\n this._material.unlit = true;\n }\n get metallic() {\n // We always use metallic roughness materials.\n return this._material.metallic;\n }\n set metallic(val) {\n this._material.metallic = val;\n }\n get roughness() {\n // We always use metallic roughness materials.\n return this._material.roughness;\n }\n set roughness(val) {\n this._material.roughness = val;\n }\n get opacity() {\n return this._material.alpha;\n }\n set opacity(val) {\n if (val < 1.0) {\n this._material.alphaMode = BABYLON_Constants.ALPHA_COMBINE;\n }\n else {\n this._material.alphaMode = BABYLON_Constants.ALPHA_DISABLE;\n }\n this._material.alpha = val;\n }\n get base_color_factor() {\n return this._base_color_factor;\n }\n set base_color_factor(val) {\n this._base_color_factor.x = val.x;\n this._base_color_factor.y = val.y;\n this._base_color_factor.z = val.z;\n }\n get base_color_texture() {\n var _a, _b;\n if (this._material.albedoTexture !== null) {\n return (_b = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.find_id(this._material.albedoTexture)) !== null && _b !== void 0 ? _b : null;\n }\n return null;\n }\n set base_color_texture(val) {\n var _a;\n if (val === null) {\n this._material.albedoTexture = val;\n return;\n }\n const texture = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.get(val);\n if (texture !== undefined) {\n this._material.albedoTexture = texture;\n }\n else {\n throw new Error('invalid texture id');\n }\n }\n get emissive_factor() {\n return this._emissive_factor;\n }\n set emissive_factor(val) {\n this._emissive_factor.r = val.r;\n this._emissive_factor.g = val.g;\n this._emissive_factor.b = val.b;\n }\n get emissive_strength() {\n return this._material.emissiveIntensity;\n }\n set emissive_strength(val) {\n if (this._material.emissiveIntensity !== val) {\n this._material.emissiveIntensity = val;\n this._mark_scene_dirty();\n }\n }\n get emissive_texture() {\n var _a, _b;\n if (this._material.emissiveTexture !== null) {\n return (_b = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.find_id(this._material.emissiveTexture)) !== null && _b !== void 0 ? _b : null;\n }\n return null;\n }\n set emissive_texture(val) {\n var _a;\n if (val === null) {\n this._material.emissiveTexture = val;\n return;\n }\n const texture = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.get(val);\n if (texture !== undefined) {\n this._material.emissiveTexture = texture;\n }\n else {\n throw new Error('invalid texture id');\n }\n }\n get normal_texture() {\n var _a, _b;\n if (this._material.bumpTexture !== null) {\n return (_b = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.find_id(this._material.bumpTexture)) !== null && _b !== void 0 ? _b : null;\n }\n return null;\n }\n set normal_texture(val) {\n var _a;\n if (val === null) {\n this._material.bumpTexture = val;\n return;\n }\n const texture = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.get(val);\n if (texture !== undefined) {\n this._material.bumpTexture = texture;\n }\n else {\n throw new Error('invalid texture id');\n }\n }\n get occlusion_roughness_metallic_texture() {\n var _a, _b;\n if (this._material.metallicTexture !== null) {\n return (_b = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.find_id(this._material.metallicTexture)) !== null && _b !== void 0 ? _b : null;\n }\n return null;\n }\n set occlusion_roughness_metallic_texture(val) {\n var _a;\n if (val === null) {\n this._material.metallicTexture = val;\n return;\n }\n const texture = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.get(val);\n if (texture !== undefined) {\n this._material.metallicTexture = texture;\n }\n else {\n throw new Error('invalid texture id');\n }\n }\n // IAdvanedMaterial properties\n get reflection_texture() {\n var _a, _b;\n if (this._material.reflectionTexture !== null) {\n return (_b = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.find_id(this._material.reflectionTexture)) !== null && _b !== void 0 ? _b : null;\n }\n return null;\n }\n set reflection_texture(val) {\n var _a;\n if (val === null) {\n this._material.reflectionTexture = val;\n return;\n }\n const texture = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.get(val);\n if (texture !== undefined) {\n this._material.reflectionTexture = texture;\n }\n else {\n throw new Error('invalid texture id');\n }\n }\n get lightmap_texture() {\n var _a, _b;\n if (this._material.lightmapTexture !== null) {\n return (_b = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.find_id(this._material.lightmapTexture)) !== null && _b !== void 0 ? _b : null;\n }\n return null;\n }\n set lightmap_texture(val) {\n var _a;\n if (val === null) {\n this._material.lightmapTexture = val;\n return;\n }\n const texture = (_a = this._asset_manager) === null || _a === void 0 ? void 0 : _a.textures.get(val);\n if (texture !== undefined) {\n this._material.lightmapTexture = texture;\n }\n else {\n throw new Error('invalid texture id');\n }\n }\n // End exposed properties\n clone(name_remapper = (s) => s) {\n return new ViewerMaterialWrapper(this._material.clone(name_remapper(this._material.name)), false, this._asset_manager, this._mark_scene_dirty);\n }\n edit() {\n return this;\n }\n dispose() {\n this._material.dispose();\n // Make sure that the material can get collected\n // @ts-ignore\n this._material = null;\n }\n}\n//# sourceMappingURL=ViewerMaterialWrapper.js.map","import { SerializationHelper } from \"../Misc/decorators.js\";\nimport { Matrix, Vector3, Vector2, Vector4, Quaternion } from \"../Maths/math.vector.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { Texture } from \"../Materials/Textures/texture.js\";\nimport { MaterialHelper } from \"./materialHelper.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { Color3, Color4 } from \"../Maths/math.color.js\";\nimport { EffectFallbacks } from \"./effectFallbacks.js\";\nimport { WebRequest } from \"../Misc/webRequest.js\";\nimport { PushMaterial } from \"./pushMaterial.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\n\nimport { addClipPlaneUniforms, bindClipPlane, prepareStringDefinesForClipPlanes } from \"./clipPlaneMaterialHelper.js\";\nconst onCreatedEffectParameters = { effect: null, subMesh: null };\n/**\n * The ShaderMaterial object has the necessary methods to pass data from your scene to the Vertex and Fragment Shaders and returns a material that can be applied to any mesh.\n *\n * This returned material effects how the mesh will look based on the code in the shaders.\n *\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/shaders/shaderMaterial\n */\nexport class ShaderMaterial extends PushMaterial {\n /**\n * Instantiate a new shader material.\n * The ShaderMaterial object has the necessary methods to pass data from your scene to the Vertex and Fragment Shaders and returns a material that can be applied to any mesh.\n * This returned material effects how the mesh will look based on the code in the shaders.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/shaders/shaderMaterial\n * @param name Define the name of the material in the scene\n * @param scene Define the scene the material belongs to\n * @param shaderPath Defines the route to the shader code in one of three ways:\n * * object: \\{ vertex: \"custom\", fragment: \"custom\" \\}, used with Effect.ShadersStore[\"customVertexShader\"] and Effect.ShadersStore[\"customFragmentShader\"]\n * * object: \\{ vertexElement: \"vertexShaderCode\", fragmentElement: \"fragmentShaderCode\" \\}, used with shader code in script tags\n * * object: \\{ vertexSource: \"vertex shader code string\", fragmentSource: \"fragment shader code string\" \\} using with strings containing the shaders code\n * * string: \"./COMMON_NAME\", used with external files COMMON_NAME.vertex.fx and COMMON_NAME.fragment.fx in index.html folder.\n * @param options Define the options used to create the shader\n * @param storeEffectOnSubMeshes true to store effect on submeshes, false to store the effect directly in the material class.\n */\n constructor(name, scene, shaderPath, options = {}, storeEffectOnSubMeshes = true) {\n super(name, scene, storeEffectOnSubMeshes);\n this._textures = {};\n this._textureArrays = {};\n this._externalTextures = {};\n this._floats = {};\n this._ints = {};\n this._uints = {};\n this._floatsArrays = {};\n this._colors3 = {};\n this._colors3Arrays = {};\n this._colors4 = {};\n this._colors4Arrays = {};\n this._vectors2 = {};\n this._vectors3 = {};\n this._vectors4 = {};\n this._quaternions = {};\n this._quaternionsArrays = {};\n this._matrices = {};\n this._matrixArrays = {};\n this._matrices3x3 = {};\n this._matrices2x2 = {};\n this._vectors2Arrays = {};\n this._vectors3Arrays = {};\n this._vectors4Arrays = {};\n this._uniformBuffers = {};\n this._textureSamplers = {};\n this._storageBuffers = {};\n this._cachedWorldViewMatrix = new Matrix();\n this._cachedWorldViewProjectionMatrix = new Matrix();\n this._multiview = false;\n /**\n * @internal\n */\n this._materialHelperNeedsPreviousMatrices = false;\n this._shaderPath = shaderPath;\n this._options = Object.assign({ needAlphaBlending: false, needAlphaTesting: false, attributes: [\"position\", \"normal\", \"uv\"], uniforms: [\"worldViewProjection\"], uniformBuffers: [], samplers: [], externalTextures: [], samplerObjects: [], storageBuffers: [], defines: [], useClipPlane: false }, options);\n }\n /**\n * Gets the shader path used to define the shader code\n * It can be modified to trigger a new compilation\n */\n get shaderPath() {\n return this._shaderPath;\n }\n /**\n * Sets the shader path used to define the shader code\n * It can be modified to trigger a new compilation\n */\n set shaderPath(shaderPath) {\n this._shaderPath = shaderPath;\n }\n /**\n * Gets the options used to compile the shader.\n * They can be modified to trigger a new compilation\n */\n get options() {\n return this._options;\n }\n /**\n * is multiview set to true?\n */\n get isMultiview() {\n return this._multiview;\n }\n /**\n * Gets the current class name of the material e.g. \"ShaderMaterial\"\n * Mainly use in serialization.\n * @returns the class name\n */\n getClassName() {\n return \"ShaderMaterial\";\n }\n /**\n * Specifies if the material will require alpha blending\n * @returns a boolean specifying if alpha blending is needed\n */\n needAlphaBlending() {\n return this.alpha < 1.0 || this._options.needAlphaBlending;\n }\n /**\n * Specifies if this material should be rendered in alpha test mode\n * @returns a boolean specifying if an alpha test is needed.\n */\n needAlphaTesting() {\n return this._options.needAlphaTesting;\n }\n _checkUniform(uniformName) {\n if (this._options.uniforms.indexOf(uniformName) === -1) {\n this._options.uniforms.push(uniformName);\n }\n }\n /**\n * Set a texture in the shader.\n * @param name Define the name of the uniform samplers as defined in the shader\n * @param texture Define the texture to bind to this sampler\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setTexture(name, texture) {\n if (this._options.samplers.indexOf(name) === -1) {\n this._options.samplers.push(name);\n }\n this._textures[name] = texture;\n return this;\n }\n /**\n * Set a texture array in the shader.\n * @param name Define the name of the uniform sampler array as defined in the shader\n * @param textures Define the list of textures to bind to this sampler\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setTextureArray(name, textures) {\n if (this._options.samplers.indexOf(name) === -1) {\n this._options.samplers.push(name);\n }\n this._checkUniform(name);\n this._textureArrays[name] = textures;\n return this;\n }\n /**\n * Set an internal texture in the shader.\n * @param name Define the name of the uniform samplers as defined in the shader\n * @param texture Define the texture to bind to this sampler\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setExternalTexture(name, texture) {\n if (this._options.externalTextures.indexOf(name) === -1) {\n this._options.externalTextures.push(name);\n }\n this._externalTextures[name] = texture;\n return this;\n }\n /**\n * Set a float in the shader.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setFloat(name, value) {\n this._checkUniform(name);\n this._floats[name] = value;\n return this;\n }\n /**\n * Set a int in the shader.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setInt(name, value) {\n this._checkUniform(name);\n this._ints[name] = value;\n return this;\n }\n /**\n * Set a unsigned int in the shader.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setUInt(name, value) {\n this._checkUniform(name);\n this._uints[name] = value;\n return this;\n }\n /**\n * Set an array of floats in the shader.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setFloats(name, value) {\n this._checkUniform(name);\n this._floatsArrays[name] = value;\n return this;\n }\n /**\n * Set a vec3 in the shader from a Color3.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setColor3(name, value) {\n this._checkUniform(name);\n this._colors3[name] = value;\n return this;\n }\n /**\n * Set a vec3 array in the shader from a Color3 array.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setColor3Array(name, value) {\n this._checkUniform(name);\n this._colors3Arrays[name] = value.reduce((arr, color) => {\n color.toArray(arr, arr.length);\n return arr;\n }, []);\n return this;\n }\n /**\n * Set a vec4 in the shader from a Color4.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setColor4(name, value) {\n this._checkUniform(name);\n this._colors4[name] = value;\n return this;\n }\n /**\n * Set a vec4 array in the shader from a Color4 array.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setColor4Array(name, value) {\n this._checkUniform(name);\n this._colors4Arrays[name] = value.reduce((arr, color) => {\n color.toArray(arr, arr.length);\n return arr;\n }, []);\n return this;\n }\n /**\n * Set a vec2 in the shader from a Vector2.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setVector2(name, value) {\n this._checkUniform(name);\n this._vectors2[name] = value;\n return this;\n }\n /**\n * Set a vec3 in the shader from a Vector3.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setVector3(name, value) {\n this._checkUniform(name);\n this._vectors3[name] = value;\n return this;\n }\n /**\n * Set a vec4 in the shader from a Vector4.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setVector4(name, value) {\n this._checkUniform(name);\n this._vectors4[name] = value;\n return this;\n }\n /**\n * Set a vec4 in the shader from a Quaternion.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setQuaternion(name, value) {\n this._checkUniform(name);\n this._quaternions[name] = value;\n return this;\n }\n /**\n * Set a vec4 array in the shader from a Quaternion array.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setQuaternionArray(name, value) {\n this._checkUniform(name);\n this._quaternionsArrays[name] = value.reduce((arr, quaternion) => {\n quaternion.toArray(arr, arr.length);\n return arr;\n }, []);\n return this;\n }\n /**\n * Set a mat4 in the shader from a Matrix.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setMatrix(name, value) {\n this._checkUniform(name);\n this._matrices[name] = value;\n return this;\n }\n /**\n * Set a float32Array in the shader from a matrix array.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setMatrices(name, value) {\n this._checkUniform(name);\n const float32Array = new Float32Array(value.length * 16);\n for (let index = 0; index < value.length; index++) {\n const matrix = value[index];\n matrix.copyToArray(float32Array, index * 16);\n }\n this._matrixArrays[name] = float32Array;\n return this;\n }\n /**\n * Set a mat3 in the shader from a Float32Array.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setMatrix3x3(name, value) {\n this._checkUniform(name);\n this._matrices3x3[name] = value;\n return this;\n }\n /**\n * Set a mat2 in the shader from a Float32Array.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setMatrix2x2(name, value) {\n this._checkUniform(name);\n this._matrices2x2[name] = value;\n return this;\n }\n /**\n * Set a vec2 array in the shader from a number array.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setArray2(name, value) {\n this._checkUniform(name);\n this._vectors2Arrays[name] = value;\n return this;\n }\n /**\n * Set a vec3 array in the shader from a number array.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setArray3(name, value) {\n this._checkUniform(name);\n this._vectors3Arrays[name] = value;\n return this;\n }\n /**\n * Set a vec4 array in the shader from a number array.\n * @param name Define the name of the uniform as defined in the shader\n * @param value Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setArray4(name, value) {\n this._checkUniform(name);\n this._vectors4Arrays[name] = value;\n return this;\n }\n /**\n * Set a uniform buffer in the shader\n * @param name Define the name of the uniform as defined in the shader\n * @param buffer Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setUniformBuffer(name, buffer) {\n if (this._options.uniformBuffers.indexOf(name) === -1) {\n this._options.uniformBuffers.push(name);\n }\n this._uniformBuffers[name] = buffer;\n return this;\n }\n /**\n * Set a texture sampler in the shader\n * @param name Define the name of the uniform as defined in the shader\n * @param sampler Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setTextureSampler(name, sampler) {\n if (this._options.samplerObjects.indexOf(name) === -1) {\n this._options.samplerObjects.push(name);\n }\n this._textureSamplers[name] = sampler;\n return this;\n }\n /**\n * Set a storage buffer in the shader\n * @param name Define the name of the storage buffer as defined in the shader\n * @param buffer Define the value to give to the uniform\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setStorageBuffer(name, buffer) {\n if (this._options.storageBuffers.indexOf(name) === -1) {\n this._options.storageBuffers.push(name);\n }\n this._storageBuffers[name] = buffer;\n return this;\n }\n /**\n * Adds, removes, or replaces the specified shader define and value.\n * * setDefine(\"MY_DEFINE\", true); // enables a boolean define\n * * setDefine(\"MY_DEFINE\", \"0.5\"); // adds \"#define MY_DEFINE 0.5\" to the shader (or sets and replaces the value of any existing define with that name)\n * * setDefine(\"MY_DEFINE\", false); // disables and removes the define\n * Note if the active defines do change, the shader will be recompiled and this can be expensive.\n * @param define the define name e.g., \"OUTPUT_TO_SRGB\" or \"#define OUTPUT_TO_SRGB\". If the define was passed into the constructor already, the version used should match that, and in either case, it should not include any appended value.\n * @param value either the value of the define (e.g. a numerical value) or for booleans, true if the define should be enabled or false if it should be disabled\n * @returns the material itself allowing \"fluent\" like uniform updates\n */\n setDefine(define, value) {\n // First remove any existing define with this name.\n const defineName = define.trimEnd() + \" \";\n const existingDefineIdx = this.options.defines.findIndex((x) => x === define || x.startsWith(defineName));\n if (existingDefineIdx >= 0) {\n this.options.defines.splice(existingDefineIdx, 1);\n }\n // Then add the new define value. (If it's a boolean value and false, don't add it.)\n if (typeof value !== \"boolean\" || value) {\n this.options.defines.push(defineName + value);\n }\n return this;\n }\n /**\n * Specifies that the submesh is ready to be used\n * @param mesh defines the mesh to check\n * @param subMesh defines which submesh to check\n * @param useInstances specifies that instances should be used\n * @returns a boolean indicating that the submesh is ready or not\n */\n isReadyForSubMesh(mesh, subMesh, useInstances) {\n return this.isReady(mesh, useInstances, subMesh);\n }\n /**\n * Checks if the material is ready to render the requested mesh\n * @param mesh Define the mesh to render\n * @param useInstances Define whether or not the material is used with instances\n * @param subMesh defines which submesh to render\n * @returns true if ready, otherwise false\n */\n isReady(mesh, useInstances, subMesh) {\n var _a, _b, _c, _d;\n const storeEffectOnSubMeshes = subMesh && this._storeEffectOnSubMeshes;\n if (this.isFrozen) {\n if (storeEffectOnSubMeshes) {\n if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {\n return true;\n }\n }\n else {\n const effect = this._drawWrapper.effect;\n if (effect && effect._wasPreviouslyReady && effect._wasPreviouslyUsingInstances === useInstances) {\n return true;\n }\n }\n }\n const scene = this.getScene();\n const engine = scene.getEngine();\n // Instances\n const defines = [];\n const attribs = [];\n const fallbacks = new EffectFallbacks();\n let shaderName = this._shaderPath, uniforms = this._options.uniforms, uniformBuffers = this._options.uniformBuffers, samplers = this._options.samplers;\n // global multiview\n if (engine.getCaps().multiview && scene.activeCamera && scene.activeCamera.outputRenderTarget && scene.activeCamera.outputRenderTarget.getViewCount() > 1) {\n this._multiview = true;\n defines.push(\"#define MULTIVIEW\");\n if (this._options.uniforms.indexOf(\"viewProjection\") !== -1 && this._options.uniforms.indexOf(\"viewProjectionR\") === -1) {\n this._options.uniforms.push(\"viewProjectionR\");\n }\n }\n for (let index = 0; index < this._options.defines.length; index++) {\n const defineToAdd = this._options.defines[index].indexOf(\"#define\") === 0 ? this._options.defines[index] : `#define ${this._options.defines[index]}`;\n defines.push(defineToAdd);\n }\n for (let index = 0; index < this._options.attributes.length; index++) {\n attribs.push(this._options.attributes[index]);\n }\n if (mesh && mesh.isVerticesDataPresent(VertexBuffer.ColorKind)) {\n if (attribs.indexOf(VertexBuffer.ColorKind) === -1) {\n attribs.push(VertexBuffer.ColorKind);\n }\n defines.push(\"#define VERTEXCOLOR\");\n }\n if (useInstances) {\n defines.push(\"#define INSTANCES\");\n MaterialHelper.PushAttributesForInstances(attribs, this._materialHelperNeedsPreviousMatrices);\n if (mesh === null || mesh === void 0 ? void 0 : mesh.hasThinInstances) {\n defines.push(\"#define THIN_INSTANCES\");\n if (mesh && mesh.isVerticesDataPresent(VertexBuffer.ColorInstanceKind)) {\n attribs.push(VertexBuffer.ColorInstanceKind);\n defines.push(\"#define INSTANCESCOLOR\");\n }\n }\n }\n // Bones\n if (mesh && mesh.useBones && mesh.computeBonesUsingShaders && mesh.skeleton) {\n attribs.push(VertexBuffer.MatricesIndicesKind);\n attribs.push(VertexBuffer.MatricesWeightsKind);\n if (mesh.numBoneInfluencers > 4) {\n attribs.push(VertexBuffer.MatricesIndicesExtraKind);\n attribs.push(VertexBuffer.MatricesWeightsExtraKind);\n }\n const skeleton = mesh.skeleton;\n defines.push(\"#define NUM_BONE_INFLUENCERS \" + mesh.numBoneInfluencers);\n fallbacks.addCPUSkinningFallback(0, mesh);\n if (skeleton.isUsingTextureForMatrices) {\n defines.push(\"#define BONETEXTURE\");\n if (this._options.uniforms.indexOf(\"boneTextureWidth\") === -1) {\n this._options.uniforms.push(\"boneTextureWidth\");\n }\n if (this._options.samplers.indexOf(\"boneSampler\") === -1) {\n this._options.samplers.push(\"boneSampler\");\n }\n }\n else {\n defines.push(\"#define BonesPerMesh \" + (skeleton.bones.length + 1));\n if (this._options.uniforms.indexOf(\"mBones\") === -1) {\n this._options.uniforms.push(\"mBones\");\n }\n }\n }\n else {\n defines.push(\"#define NUM_BONE_INFLUENCERS 0\");\n }\n // Morph\n let numInfluencers = 0;\n const manager = mesh ? mesh.morphTargetManager : null;\n if (manager) {\n const uv = manager.supportsUVs && defines.indexOf(\"#define UV1\") !== -1;\n const tangent = manager.supportsTangents && defines.indexOf(\"#define TANGENT\") !== -1;\n const normal = manager.supportsNormals && defines.indexOf(\"#define NORMAL\") !== -1;\n numInfluencers = manager.numInfluencers;\n if (uv) {\n defines.push(\"#define MORPHTARGETS_UV\");\n }\n if (tangent) {\n defines.push(\"#define MORPHTARGETS_TANGENT\");\n }\n if (normal) {\n defines.push(\"#define MORPHTARGETS_NORMAL\");\n }\n if (numInfluencers > 0) {\n defines.push(\"#define MORPHTARGETS\");\n }\n if (manager.isUsingTextureForTargets) {\n defines.push(\"#define MORPHTARGETS_TEXTURE\");\n if (this._options.uniforms.indexOf(\"morphTargetTextureIndices\") === -1) {\n this._options.uniforms.push(\"morphTargetTextureIndices\");\n }\n if (this._options.samplers.indexOf(\"morphTargets\") === -1) {\n this._options.samplers.push(\"morphTargets\");\n }\n }\n defines.push(\"#define NUM_MORPH_INFLUENCERS \" + numInfluencers);\n for (let index = 0; index < numInfluencers; index++) {\n attribs.push(VertexBuffer.PositionKind + index);\n if (normal) {\n attribs.push(VertexBuffer.NormalKind + index);\n }\n if (tangent) {\n attribs.push(VertexBuffer.TangentKind + index);\n }\n if (uv) {\n attribs.push(VertexBuffer.UVKind + \"_\" + index);\n }\n }\n if (numInfluencers > 0) {\n uniforms = uniforms.slice();\n uniforms.push(\"morphTargetInfluences\");\n uniforms.push(\"morphTargetTextureInfo\");\n uniforms.push(\"morphTargetTextureIndices\");\n }\n }\n else {\n defines.push(\"#define NUM_MORPH_INFLUENCERS 0\");\n }\n // Baked Vertex Animation\n if (mesh) {\n const bvaManager = mesh.bakedVertexAnimationManager;\n if (bvaManager && bvaManager.isEnabled) {\n defines.push(\"#define BAKED_VERTEX_ANIMATION_TEXTURE\");\n if (this._options.uniforms.indexOf(\"bakedVertexAnimationSettings\") === -1) {\n this._options.uniforms.push(\"bakedVertexAnimationSettings\");\n }\n if (this._options.uniforms.indexOf(\"bakedVertexAnimationTextureSizeInverted\") === -1) {\n this._options.uniforms.push(\"bakedVertexAnimationTextureSizeInverted\");\n }\n if (this._options.uniforms.indexOf(\"bakedVertexAnimationTime\") === -1) {\n this._options.uniforms.push(\"bakedVertexAnimationTime\");\n }\n if (this._options.samplers.indexOf(\"bakedVertexAnimationTexture\") === -1) {\n this._options.samplers.push(\"bakedVertexAnimationTexture\");\n }\n }\n MaterialHelper.PrepareAttributesForBakedVertexAnimation(attribs, mesh, defines);\n }\n // Textures\n for (const name in this._textures) {\n if (!this._textures[name].isReady()) {\n return false;\n }\n }\n // Alpha test\n if (mesh && this._shouldTurnAlphaTestOn(mesh)) {\n defines.push(\"#define ALPHATEST\");\n }\n // Clip planes\n if (this._options.useClipPlane !== false) {\n addClipPlaneUniforms(uniforms);\n prepareStringDefinesForClipPlanes(this, scene, defines);\n }\n if (this.customShaderNameResolve) {\n uniforms = uniforms.slice();\n uniformBuffers = uniformBuffers.slice();\n samplers = samplers.slice();\n shaderName = this.customShaderNameResolve(shaderName, uniforms, uniformBuffers, samplers, defines, attribs);\n }\n const drawWrapper = storeEffectOnSubMeshes ? subMesh._getDrawWrapper() : this._drawWrapper;\n const previousEffect = (_a = drawWrapper === null || drawWrapper === void 0 ? void 0 : drawWrapper.effect) !== null && _a !== void 0 ? _a : null;\n const previousDefines = (_b = drawWrapper === null || drawWrapper === void 0 ? void 0 : drawWrapper.defines) !== null && _b !== void 0 ? _b : null;\n const join = defines.join(\"\\n\");\n let effect = previousEffect;\n if (previousDefines !== join) {\n effect = engine.createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousMorphTargets: numInfluencers },\n shaderLanguage: this._options.shaderLanguage,\n }, engine);\n if (storeEffectOnSubMeshes) {\n subMesh.setEffect(effect, join, this._materialContext);\n }\n else if (drawWrapper) {\n drawWrapper.setEffect(effect, join);\n }\n if (this._onEffectCreatedObservable) {\n onCreatedEffectParameters.effect = effect;\n onCreatedEffectParameters.subMesh = (_c = subMesh !== null && subMesh !== void 0 ? subMesh : mesh === null || mesh === void 0 ? void 0 : mesh.subMeshes[0]) !== null && _c !== void 0 ? _c : null;\n this._onEffectCreatedObservable.notifyObservers(onCreatedEffectParameters);\n }\n }\n effect._wasPreviouslyUsingInstances = !!useInstances;\n if ((_d = !(effect === null || effect === void 0 ? void 0 : effect.isReady())) !== null && _d !== void 0 ? _d : true) {\n return false;\n }\n if (previousEffect !== effect) {\n scene.resetCachedMaterial();\n }\n effect._wasPreviouslyReady = true;\n return true;\n }\n /**\n * Binds the world matrix to the material\n * @param world defines the world transformation matrix\n * @param effectOverride - If provided, use this effect instead of internal effect\n */\n bindOnlyWorldMatrix(world, effectOverride) {\n const scene = this.getScene();\n const effect = effectOverride !== null && effectOverride !== void 0 ? effectOverride : this.getEffect();\n if (!effect) {\n return;\n }\n if (this._options.uniforms.indexOf(\"world\") !== -1) {\n effect.setMatrix(\"world\", world);\n }\n if (this._options.uniforms.indexOf(\"worldView\") !== -1) {\n world.multiplyToRef(scene.getViewMatrix(), this._cachedWorldViewMatrix);\n effect.setMatrix(\"worldView\", this._cachedWorldViewMatrix);\n }\n if (this._options.uniforms.indexOf(\"worldViewProjection\") !== -1) {\n world.multiplyToRef(scene.getTransformMatrix(), this._cachedWorldViewProjectionMatrix);\n effect.setMatrix(\"worldViewProjection\", this._cachedWorldViewProjectionMatrix);\n }\n }\n /**\n * Binds the submesh to this material by preparing the effect and shader to draw\n * @param world defines the world transformation matrix\n * @param mesh defines the mesh containing the submesh\n * @param subMesh defines the submesh to bind the material to\n */\n bindForSubMesh(world, mesh, subMesh) {\n var _a;\n this.bind(world, mesh, (_a = subMesh._drawWrapperOverride) === null || _a === void 0 ? void 0 : _a.effect, subMesh);\n }\n /**\n * Binds the material to the mesh\n * @param world defines the world transformation matrix\n * @param mesh defines the mesh to bind the material to\n * @param effectOverride - If provided, use this effect instead of internal effect\n * @param subMesh defines the submesh to bind the material to\n */\n bind(world, mesh, effectOverride, subMesh) {\n var _a;\n // Std values\n const storeEffectOnSubMeshes = subMesh && this._storeEffectOnSubMeshes;\n const effect = effectOverride !== null && effectOverride !== void 0 ? effectOverride : (storeEffectOnSubMeshes ? subMesh.effect : this.getEffect());\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n this.bindOnlyWorldMatrix(world, effectOverride);\n const uniformBuffers = this._options.uniformBuffers;\n let useSceneUBO = false;\n if (effect && uniformBuffers && uniformBuffers.length > 0 && this.getScene().getEngine().supportsUniformBuffers) {\n for (let i = 0; i < uniformBuffers.length; ++i) {\n const bufferName = uniformBuffers[i];\n switch (bufferName) {\n case \"Mesh\":\n if (mesh) {\n mesh.getMeshUniformBuffer().bindToEffect(effect, \"Mesh\");\n mesh.transferToEffect(world);\n }\n break;\n case \"Scene\":\n MaterialHelper.BindSceneUniformBuffer(effect, this.getScene().getSceneUniformBuffer());\n this.getScene().finalizeSceneUbo();\n useSceneUBO = true;\n break;\n }\n }\n }\n const mustRebind = mesh && storeEffectOnSubMeshes ? this._mustRebind(this.getScene(), effect, mesh.visibility) : this.getScene().getCachedMaterial() !== this;\n if (effect && mustRebind) {\n if (!useSceneUBO && this._options.uniforms.indexOf(\"view\") !== -1) {\n effect.setMatrix(\"view\", this.getScene().getViewMatrix());\n }\n if (!useSceneUBO && this._options.uniforms.indexOf(\"projection\") !== -1) {\n effect.setMatrix(\"projection\", this.getScene().getProjectionMatrix());\n }\n if (!useSceneUBO && this._options.uniforms.indexOf(\"viewProjection\") !== -1) {\n effect.setMatrix(\"viewProjection\", this.getScene().getTransformMatrix());\n if (this._multiview) {\n effect.setMatrix(\"viewProjectionR\", this.getScene()._transformMatrixR);\n }\n }\n if (this.getScene().activeCamera && this._options.uniforms.indexOf(\"cameraPosition\") !== -1) {\n effect.setVector3(\"cameraPosition\", this.getScene().activeCamera.globalPosition);\n }\n // Bones\n MaterialHelper.BindBonesParameters(mesh, effect);\n // Clip plane\n bindClipPlane(effect, this, this.getScene());\n let name;\n // Texture\n for (name in this._textures) {\n effect.setTexture(name, this._textures[name]);\n }\n // Texture arrays\n for (name in this._textureArrays) {\n effect.setTextureArray(name, this._textureArrays[name]);\n }\n // External texture\n for (name in this._externalTextures) {\n effect.setExternalTexture(name, this._externalTextures[name]);\n }\n // Int\n for (name in this._ints) {\n effect.setInt(name, this._ints[name]);\n }\n // UInt\n for (name in this._uints) {\n effect.setUInt(name, this._uints[name]);\n }\n // Float\n for (name in this._floats) {\n effect.setFloat(name, this._floats[name]);\n }\n // Floats\n for (name in this._floatsArrays) {\n effect.setArray(name, this._floatsArrays[name]);\n }\n // Color3\n for (name in this._colors3) {\n effect.setColor3(name, this._colors3[name]);\n }\n // Color3Array\n for (name in this._colors3Arrays) {\n effect.setArray3(name, this._colors3Arrays[name]);\n }\n // Color4\n for (name in this._colors4) {\n const color = this._colors4[name];\n effect.setFloat4(name, color.r, color.g, color.b, color.a);\n }\n // Color4Array\n for (name in this._colors4Arrays) {\n effect.setArray4(name, this._colors4Arrays[name]);\n }\n // Vector2\n for (name in this._vectors2) {\n effect.setVector2(name, this._vectors2[name]);\n }\n // Vector3\n for (name in this._vectors3) {\n effect.setVector3(name, this._vectors3[name]);\n }\n // Vector4\n for (name in this._vectors4) {\n effect.setVector4(name, this._vectors4[name]);\n }\n // Quaternion\n for (name in this._quaternions) {\n effect.setQuaternion(name, this._quaternions[name]);\n }\n // Matrix\n for (name in this._matrices) {\n effect.setMatrix(name, this._matrices[name]);\n }\n // MatrixArray\n for (name in this._matrixArrays) {\n effect.setMatrices(name, this._matrixArrays[name]);\n }\n // Matrix 3x3\n for (name in this._matrices3x3) {\n effect.setMatrix3x3(name, this._matrices3x3[name]);\n }\n // Matrix 2x2\n for (name in this._matrices2x2) {\n effect.setMatrix2x2(name, this._matrices2x2[name]);\n }\n // Vector2Array\n for (name in this._vectors2Arrays) {\n effect.setArray2(name, this._vectors2Arrays[name]);\n }\n // Vector3Array\n for (name in this._vectors3Arrays) {\n effect.setArray3(name, this._vectors3Arrays[name]);\n }\n // Vector4Array\n for (name in this._vectors4Arrays) {\n effect.setArray4(name, this._vectors4Arrays[name]);\n }\n // QuaternionArray\n for (name in this._quaternionsArrays) {\n effect.setArray4(name, this._quaternionsArrays[name]);\n }\n // Uniform buffers\n for (name in this._uniformBuffers) {\n const buffer = this._uniformBuffers[name].getBuffer();\n if (buffer) {\n effect.bindUniformBuffer(buffer, name);\n }\n }\n // Samplers\n for (name in this._textureSamplers) {\n effect.setTextureSampler(name, this._textureSamplers[name]);\n }\n // Storage buffers\n for (name in this._storageBuffers) {\n effect.setStorageBuffer(name, this._storageBuffers[name]);\n }\n }\n if (effect && mesh && (mustRebind || !this.isFrozen)) {\n // Morph targets\n const manager = mesh.morphTargetManager;\n if (manager && manager.numInfluencers > 0) {\n MaterialHelper.BindMorphTargetParameters(mesh, effect);\n }\n const bvaManager = mesh.bakedVertexAnimationManager;\n if (bvaManager && bvaManager.isEnabled) {\n (_a = mesh.bakedVertexAnimationManager) === null || _a === void 0 ? void 0 : _a.bind(effect, !!effect._wasPreviouslyUsingInstances);\n }\n }\n this._afterBind(mesh, effect);\n }\n /**\n * Gets the active textures from the material\n * @returns an array of textures\n */\n getActiveTextures() {\n const activeTextures = super.getActiveTextures();\n for (const name in this._textures) {\n activeTextures.push(this._textures[name]);\n }\n for (const name in this._textureArrays) {\n const array = this._textureArrays[name];\n for (let index = 0; index < array.length; index++) {\n activeTextures.push(array[index]);\n }\n }\n return activeTextures;\n }\n /**\n * Specifies if the material uses a texture\n * @param texture defines the texture to check against the material\n * @returns a boolean specifying if the material uses the texture\n */\n hasTexture(texture) {\n if (super.hasTexture(texture)) {\n return true;\n }\n for (const name in this._textures) {\n if (this._textures[name] === texture) {\n return true;\n }\n }\n for (const name in this._textureArrays) {\n const array = this._textureArrays[name];\n for (let index = 0; index < array.length; index++) {\n if (array[index] === texture) {\n return true;\n }\n }\n }\n return false;\n }\n /**\n * Makes a duplicate of the material, and gives it a new name\n * @param name defines the new name for the duplicated material\n * @returns the cloned material\n */\n clone(name) {\n const result = SerializationHelper.Clone(() => new ShaderMaterial(name, this.getScene(), this._shaderPath, this._options, this._storeEffectOnSubMeshes), this);\n result.name = name;\n result.id = name;\n // Shader code path\n if (typeof result._shaderPath === \"object\") {\n result._shaderPath = Object.assign({}, result._shaderPath);\n }\n // Options\n this._options = Object.assign({}, this._options);\n Object.keys(this._options).forEach((propName) => {\n const propValue = this._options[propName];\n if (Array.isArray(propValue)) {\n this._options[propName] = propValue.slice(0);\n }\n });\n // Stencil\n this.stencil.copyTo(result.stencil);\n // Texture\n for (const key in this._textures) {\n result.setTexture(key, this._textures[key]);\n }\n // TextureArray\n for (const key in this._textureArrays) {\n result.setTextureArray(key, this._textureArrays[key]);\n }\n // External texture\n for (const key in this._externalTextures) {\n result.setExternalTexture(key, this._externalTextures[key]);\n }\n // Int\n for (const key in this._ints) {\n result.setInt(key, this._ints[key]);\n }\n // UInt\n for (const key in this._uints) {\n result.setUInt(key, this._uints[key]);\n }\n // Float\n for (const key in this._floats) {\n result.setFloat(key, this._floats[key]);\n }\n // Floats\n for (const key in this._floatsArrays) {\n result.setFloats(key, this._floatsArrays[key]);\n }\n // Color3\n for (const key in this._colors3) {\n result.setColor3(key, this._colors3[key]);\n }\n // Color3Array\n for (const key in this._colors3Arrays) {\n result._colors3Arrays[key] = this._colors3Arrays[key];\n }\n // Color4\n for (const key in this._colors4) {\n result.setColor4(key, this._colors4[key]);\n }\n // Color4Array\n for (const key in this._colors4Arrays) {\n result._colors4Arrays[key] = this._colors4Arrays[key];\n }\n // Vector2\n for (const key in this._vectors2) {\n result.setVector2(key, this._vectors2[key]);\n }\n // Vector3\n for (const key in this._vectors3) {\n result.setVector3(key, this._vectors3[key]);\n }\n // Vector4\n for (const key in this._vectors4) {\n result.setVector4(key, this._vectors4[key]);\n }\n // Quaternion\n for (const key in this._quaternions) {\n result.setQuaternion(key, this._quaternions[key]);\n }\n // QuaternionArray\n for (const key in this._quaternionsArrays) {\n result._quaternionsArrays[key] = this._quaternionsArrays[key];\n }\n // Matrix\n for (const key in this._matrices) {\n result.setMatrix(key, this._matrices[key]);\n }\n // MatrixArray\n for (const key in this._matrixArrays) {\n result._matrixArrays[key] = this._matrixArrays[key].slice();\n }\n // Matrix 3x3\n for (const key in this._matrices3x3) {\n result.setMatrix3x3(key, this._matrices3x3[key]);\n }\n // Matrix 2x2\n for (const key in this._matrices2x2) {\n result.setMatrix2x2(key, this._matrices2x2[key]);\n }\n // Vector2Array\n for (const key in this._vectors2Arrays) {\n result.setArray2(key, this._vectors2Arrays[key]);\n }\n // Vector3Array\n for (const key in this._vectors3Arrays) {\n result.setArray3(key, this._vectors3Arrays[key]);\n }\n // Vector4Array\n for (const key in this._vectors4Arrays) {\n result.setArray4(key, this._vectors4Arrays[key]);\n }\n // Uniform buffers\n for (const key in this._uniformBuffers) {\n result.setUniformBuffer(key, this._uniformBuffers[key]);\n }\n // Samplers\n for (const key in this._textureSamplers) {\n result.setTextureSampler(key, this._textureSamplers[key]);\n }\n // Storag buffers\n for (const key in this._storageBuffers) {\n result.setStorageBuffer(key, this._storageBuffers[key]);\n }\n return result;\n }\n /**\n * Disposes the material\n * @param forceDisposeEffect specifies if effects should be forcefully disposed\n * @param forceDisposeTextures specifies if textures should be forcefully disposed\n * @param notBoundToMesh specifies if the material that is being disposed is known to be not bound to any mesh\n */\n dispose(forceDisposeEffect, forceDisposeTextures, notBoundToMesh) {\n if (forceDisposeTextures) {\n let name;\n for (name in this._textures) {\n this._textures[name].dispose();\n }\n for (name in this._textureArrays) {\n const array = this._textureArrays[name];\n for (let index = 0; index < array.length; index++) {\n array[index].dispose();\n }\n }\n }\n this._textures = {};\n super.dispose(forceDisposeEffect, forceDisposeTextures, notBoundToMesh);\n }\n /**\n * Serializes this material in a JSON representation\n * @returns the serialized material object\n */\n serialize() {\n const serializationObject = SerializationHelper.Serialize(this);\n serializationObject.customType = \"BABYLON.ShaderMaterial\";\n serializationObject.uniqueId = this.uniqueId;\n serializationObject.options = this._options;\n serializationObject.shaderPath = this._shaderPath;\n serializationObject.storeEffectOnSubMeshes = this._storeEffectOnSubMeshes;\n let name;\n // Stencil\n serializationObject.stencil = this.stencil.serialize();\n // Texture\n serializationObject.textures = {};\n for (name in this._textures) {\n serializationObject.textures[name] = this._textures[name].serialize();\n }\n // Texture arrays\n serializationObject.textureArrays = {};\n for (name in this._textureArrays) {\n serializationObject.textureArrays[name] = [];\n const array = this._textureArrays[name];\n for (let index = 0; index < array.length; index++) {\n serializationObject.textureArrays[name].push(array[index].serialize());\n }\n }\n // Int\n serializationObject.ints = {};\n for (name in this._ints) {\n serializationObject.ints[name] = this._ints[name];\n }\n // UInt\n serializationObject.uints = {};\n for (name in this._uints) {\n serializationObject.uints[name] = this._uints[name];\n }\n // Float\n serializationObject.floats = {};\n for (name in this._floats) {\n serializationObject.floats[name] = this._floats[name];\n }\n // Floats\n serializationObject.FloatArrays = {};\n for (name in this._floatsArrays) {\n serializationObject.FloatArrays[name] = this._floatsArrays[name];\n }\n // Color3\n serializationObject.colors3 = {};\n for (name in this._colors3) {\n serializationObject.colors3[name] = this._colors3[name].asArray();\n }\n // Color3 array\n serializationObject.colors3Arrays = {};\n for (name in this._colors3Arrays) {\n serializationObject.colors3Arrays[name] = this._colors3Arrays[name];\n }\n // Color4\n serializationObject.colors4 = {};\n for (name in this._colors4) {\n serializationObject.colors4[name] = this._colors4[name].asArray();\n }\n // Color4 array\n serializationObject.colors4Arrays = {};\n for (name in this._colors4Arrays) {\n serializationObject.colors4Arrays[name] = this._colors4Arrays[name];\n }\n // Vector2\n serializationObject.vectors2 = {};\n for (name in this._vectors2) {\n serializationObject.vectors2[name] = this._vectors2[name].asArray();\n }\n // Vector3\n serializationObject.vectors3 = {};\n for (name in this._vectors3) {\n serializationObject.vectors3[name] = this._vectors3[name].asArray();\n }\n // Vector4\n serializationObject.vectors4 = {};\n for (name in this._vectors4) {\n serializationObject.vectors4[name] = this._vectors4[name].asArray();\n }\n // Quaternion\n serializationObject.quaternions = {};\n for (name in this._quaternions) {\n serializationObject.quaternions[name] = this._quaternions[name].asArray();\n }\n // Matrix\n serializationObject.matrices = {};\n for (name in this._matrices) {\n serializationObject.matrices[name] = this._matrices[name].asArray();\n }\n // MatrixArray\n serializationObject.matrixArray = {};\n for (name in this._matrixArrays) {\n serializationObject.matrixArray[name] = this._matrixArrays[name];\n }\n // Matrix 3x3\n serializationObject.matrices3x3 = {};\n for (name in this._matrices3x3) {\n serializationObject.matrices3x3[name] = this._matrices3x3[name];\n }\n // Matrix 2x2\n serializationObject.matrices2x2 = {};\n for (name in this._matrices2x2) {\n serializationObject.matrices2x2[name] = this._matrices2x2[name];\n }\n // Vector2Array\n serializationObject.vectors2Arrays = {};\n for (name in this._vectors2Arrays) {\n serializationObject.vectors2Arrays[name] = this._vectors2Arrays[name];\n }\n // Vector3Array\n serializationObject.vectors3Arrays = {};\n for (name in this._vectors3Arrays) {\n serializationObject.vectors3Arrays[name] = this._vectors3Arrays[name];\n }\n // Vector4Array\n serializationObject.vectors4Arrays = {};\n for (name in this._vectors4Arrays) {\n serializationObject.vectors4Arrays[name] = this._vectors4Arrays[name];\n }\n // QuaternionArray\n serializationObject.quaternionsArrays = {};\n for (name in this._quaternionsArrays) {\n serializationObject.quaternionsArrays[name] = this._quaternionsArrays[name];\n }\n return serializationObject;\n }\n /**\n * Creates a shader material from parsed shader material data\n * @param source defines the JSON representation of the material\n * @param scene defines the hosting scene\n * @param rootUrl defines the root URL to use to load textures and relative dependencies\n * @returns a new material\n */\n static Parse(source, scene, rootUrl) {\n const material = SerializationHelper.Parse(() => new ShaderMaterial(source.name, scene, source.shaderPath, source.options, source.storeEffectOnSubMeshes), source, scene, rootUrl);\n let name;\n // Stencil\n if (source.stencil) {\n material.stencil.parse(source.stencil, scene, rootUrl);\n }\n // Texture\n for (name in source.textures) {\n material.setTexture(name, Texture.Parse(source.textures[name], scene, rootUrl));\n }\n // Texture arrays\n for (name in source.textureArrays) {\n const array = source.textureArrays[name];\n const textureArray = [];\n for (let index = 0; index < array.length; index++) {\n textureArray.push(Texture.Parse(array[index], scene, rootUrl));\n }\n material.setTextureArray(name, textureArray);\n }\n // Int\n for (name in source.ints) {\n material.setInt(name, source.ints[name]);\n }\n // UInt\n for (name in source.uints) {\n material.setUInt(name, source.uints[name]);\n }\n // Float\n for (name in source.floats) {\n material.setFloat(name, source.floats[name]);\n }\n // Floats\n for (name in source.floatsArrays) {\n material.setFloats(name, source.floatsArrays[name]);\n }\n // Color3\n for (name in source.colors3) {\n material.setColor3(name, Color3.FromArray(source.colors3[name]));\n }\n // Color3 arrays\n for (name in source.colors3Arrays) {\n const colors = source.colors3Arrays[name]\n .reduce((arr, num, i) => {\n if (i % 3 === 0) {\n arr.push([num]);\n }\n else {\n arr[arr.length - 1].push(num);\n }\n return arr;\n }, [])\n .map((color) => Color3.FromArray(color));\n material.setColor3Array(name, colors);\n }\n // Color4\n for (name in source.colors4) {\n material.setColor4(name, Color4.FromArray(source.colors4[name]));\n }\n // Color4 arrays\n for (name in source.colors4Arrays) {\n const colors = source.colors4Arrays[name]\n .reduce((arr, num, i) => {\n if (i % 4 === 0) {\n arr.push([num]);\n }\n else {\n arr[arr.length - 1].push(num);\n }\n return arr;\n }, [])\n .map((color) => Color4.FromArray(color));\n material.setColor4Array(name, colors);\n }\n // Vector2\n for (name in source.vectors2) {\n material.setVector2(name, Vector2.FromArray(source.vectors2[name]));\n }\n // Vector3\n for (name in source.vectors3) {\n material.setVector3(name, Vector3.FromArray(source.vectors3[name]));\n }\n // Vector4\n for (name in source.vectors4) {\n material.setVector4(name, Vector4.FromArray(source.vectors4[name]));\n }\n // Quaternion\n for (name in source.quaternions) {\n material.setQuaternion(name, Quaternion.FromArray(source.quaternions[name]));\n }\n // Matrix\n for (name in source.matrices) {\n material.setMatrix(name, Matrix.FromArray(source.matrices[name]));\n }\n // MatrixArray\n for (name in source.matrixArray) {\n material._matrixArrays[name] = new Float32Array(source.matrixArray[name]);\n }\n // Matrix 3x3\n for (name in source.matrices3x3) {\n material.setMatrix3x3(name, source.matrices3x3[name]);\n }\n // Matrix 2x2\n for (name in source.matrices2x2) {\n material.setMatrix2x2(name, source.matrices2x2[name]);\n }\n // Vector2Array\n for (name in source.vectors2Arrays) {\n material.setArray2(name, source.vectors2Arrays[name]);\n }\n // Vector3Array\n for (name in source.vectors3Arrays) {\n material.setArray3(name, source.vectors3Arrays[name]);\n }\n // Vector4Array\n for (name in source.vectors4Arrays) {\n material.setArray4(name, source.vectors4Arrays[name]);\n }\n // QuaternionArray\n for (name in source.quaternionsArrays) {\n material.setArray4(name, source.quaternionsArrays[name]);\n }\n return material;\n }\n /**\n * Creates a new ShaderMaterial from a snippet saved in a remote file\n * @param name defines the name of the ShaderMaterial to create (can be null or empty to use the one from the json data)\n * @param url defines the url to load from\n * @param scene defines the hosting scene\n * @param rootUrl defines the root URL to use to load textures and relative dependencies\n * @returns a promise that will resolve to the new ShaderMaterial\n */\n static ParseFromFileAsync(name, url, scene, rootUrl = \"\") {\n return new Promise((resolve, reject) => {\n const request = new WebRequest();\n request.addEventListener(\"readystatechange\", () => {\n if (request.readyState == 4) {\n if (request.status == 200) {\n const serializationObject = JSON.parse(request.responseText);\n const output = this.Parse(serializationObject, scene || EngineStore.LastCreatedScene, rootUrl);\n if (name) {\n output.name = name;\n }\n resolve(output);\n }\n else {\n reject(\"Unable to load the ShaderMaterial\");\n }\n }\n });\n request.open(\"GET\", url);\n request.send();\n });\n }\n /**\n * Creates a ShaderMaterial from a snippet saved by the Inspector\n * @param snippetId defines the snippet to load\n * @param scene defines the hosting scene\n * @param rootUrl defines the root URL to use to load textures and relative dependencies\n * @returns a promise that will resolve to the new ShaderMaterial\n */\n static ParseFromSnippetAsync(snippetId, scene, rootUrl = \"\") {\n return new Promise((resolve, reject) => {\n const request = new WebRequest();\n request.addEventListener(\"readystatechange\", () => {\n if (request.readyState == 4) {\n if (request.status == 200) {\n const snippet = JSON.parse(JSON.parse(request.responseText).jsonPayload);\n const serializationObject = JSON.parse(snippet.shaderMaterial);\n const output = this.Parse(serializationObject, scene || EngineStore.LastCreatedScene, rootUrl);\n output.snippetId = snippetId;\n resolve(output);\n }\n else {\n reject(\"Unable to load the snippet \" + snippetId);\n }\n }\n });\n request.open(\"GET\", this.SnippetUrl + \"/\" + snippetId.replace(/#/g, \"/\"));\n request.send();\n });\n }\n}\n/** Define the Url to load snippets */\nShaderMaterial.SnippetUrl = `https://snippet.babylonjs.com`;\n/**\n * Creates a ShaderMaterial from a snippet saved by the Inspector\n * @deprecated Please use ParseFromSnippetAsync instead\n * @param snippetId defines the snippet to load\n * @param scene defines the hosting scene\n * @param rootUrl defines the root URL to use to load textures and relative dependencies\n * @returns a promise that will resolve to the new ShaderMaterial\n */\nShaderMaterial.CreateFromSnippetAsync = ShaderMaterial.ParseFromSnippetAsync;\nRegisterClass(\"BABYLON.ShaderMaterial\", ShaderMaterial);\n//# sourceMappingURL=shaderMaterial.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/clipPlaneFragmentDeclaration.js\";\nimport \"./ShadersInclude/clipPlaneFragment.js\";\nconst name = \"colorPixelShader\";\nconst shader = `#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\n#define VERTEXCOLOR\nvarying vec4 vColor;\n#else\nuniform vec4 color;\n#endif\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\ngl_FragColor=vColor;\n#else\ngl_FragColor=color;\n#endif\n#define CUSTOM_FRAGMENT_MAIN_END\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const colorPixelShader = { name, shader };\n//# sourceMappingURL=color.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/bonesDeclaration.js\";\nimport \"./ShadersInclude/bakedVertexAnimationDeclaration.js\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration.js\";\nimport \"./ShadersInclude/instancesDeclaration.js\";\nimport \"./ShadersInclude/instancesVertex.js\";\nimport \"./ShadersInclude/bonesVertex.js\";\nimport \"./ShadersInclude/bakedVertexAnimation.js\";\nimport \"./ShadersInclude/clipPlaneVertex.js\";\nimport \"./ShadersInclude/vertexColorMixing.js\";\nconst name = \"colorVertexShader\";\nconst shader = `attribute vec3 position;\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n#include\n#include\n#include\nuniform mat4 viewProjection;\n#ifdef MULTIVIEW\nuniform mat4 viewProjectionR;\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;}\n#else\ngl_Position=viewProjection*worldPos;\n#endif\n#include\n#include\n#define CUSTOM_VERTEX_MAIN_END\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const colorVertexShader = { name, shader };\n//# sourceMappingURL=color.vertex.js.map","import { Color3, Color4 } from \"../Maths/math.color.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { Mesh } from \"../Meshes/mesh.js\";\nimport { InstancedMesh } from \"../Meshes/instancedMesh.js\";\nimport { Material } from \"../Materials/material.js\";\nimport { ShaderMaterial } from \"../Materials/shaderMaterial.js\";\nimport \"../Shaders/color.fragment.js\";\nimport \"../Shaders/color.vertex.js\";\nMesh._LinesMeshParser = (parsedMesh, scene) => {\n return LinesMesh.Parse(parsedMesh, scene);\n};\n/**\n * Line mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n */\nexport class LinesMesh extends Mesh {\n _isShaderMaterial(shader) {\n return shader.getClassName() === \"ShaderMaterial\";\n }\n /**\n * Creates a new LinesMesh\n * @param name defines the name\n * @param scene defines the hosting scene\n * @param parent defines the parent mesh if any\n * @param source defines the optional source LinesMesh used to clone data from\n * @param doNotCloneChildren When cloning, skip cloning child meshes of source, default False.\n * When false, achieved by calling a clone(), also passing False.\n * This will make creation of children, recursive.\n * @param useVertexColor defines if this LinesMesh supports vertex color\n * @param useVertexAlpha defines if this LinesMesh supports vertex alpha\n * @param material material to use to draw the line. If not provided, will create a new one\n */\n constructor(name, scene = null, parent = null, source = null, doNotCloneChildren, \n /**\n * If vertex color should be applied to the mesh\n */\n useVertexColor, \n /**\n * If vertex alpha should be applied to the mesh\n */\n useVertexAlpha, material) {\n super(name, scene, parent, source, doNotCloneChildren);\n this.useVertexColor = useVertexColor;\n this.useVertexAlpha = useVertexAlpha;\n /**\n * Color of the line (Default: White)\n */\n this.color = new Color3(1, 1, 1);\n /**\n * Alpha of the line (Default: 1)\n */\n this.alpha = 1;\n if (source) {\n this.color = source.color.clone();\n this.alpha = source.alpha;\n this.useVertexColor = source.useVertexColor;\n this.useVertexAlpha = source.useVertexAlpha;\n }\n this.intersectionThreshold = 0.1;\n const defines = [];\n const options = {\n attributes: [VertexBuffer.PositionKind],\n uniforms: [\"world\", \"viewProjection\"],\n needAlphaBlending: true,\n defines: defines,\n useClipPlane: null,\n };\n if (useVertexAlpha === false) {\n options.needAlphaBlending = false;\n }\n else {\n options.defines.push(\"#define VERTEXALPHA\");\n }\n if (!useVertexColor) {\n options.uniforms.push(\"color\");\n this._color4 = new Color4();\n }\n else {\n options.defines.push(\"#define VERTEXCOLOR\");\n options.attributes.push(VertexBuffer.ColorKind);\n }\n if (material) {\n this.material = material;\n }\n else {\n this.material = new ShaderMaterial(\"colorShader\", this.getScene(), \"color\", options, false);\n this.material.doNotSerialize = true;\n }\n }\n isReady() {\n if (!this._lineMaterial.isReady(this, !!this._userInstancedBuffersStorage || this.hasThinInstances)) {\n return false;\n }\n return super.isReady();\n }\n /**\n * Returns the string \"LineMesh\"\n */\n getClassName() {\n return \"LinesMesh\";\n }\n /**\n * @internal\n */\n get material() {\n return this._lineMaterial;\n }\n /**\n * @internal\n */\n set material(value) {\n this._lineMaterial = value;\n this._lineMaterial.fillMode = Material.LineListDrawMode;\n }\n /**\n * @internal\n */\n get checkCollisions() {\n return false;\n }\n set checkCollisions(value) {\n // Just ignore it\n }\n /**\n * @internal\n */\n _bind(_subMesh, colorEffect) {\n if (!this._geometry) {\n return this;\n }\n // VBOs\n const indexToBind = this.isUnIndexed ? null : this._geometry.getIndexBuffer();\n if (!this._userInstancedBuffersStorage || this.hasThinInstances) {\n this._geometry._bind(colorEffect, indexToBind);\n }\n else {\n this._geometry._bind(colorEffect, indexToBind, this._userInstancedBuffersStorage.vertexBuffers, this._userInstancedBuffersStorage.vertexArrayObjects);\n }\n // Color\n if (!this.useVertexColor && this._isShaderMaterial(this._lineMaterial)) {\n const { r, g, b } = this.color;\n this._color4.set(r, g, b, this.alpha);\n this._lineMaterial.setColor4(\"color\", this._color4);\n }\n return this;\n }\n /**\n * @internal\n */\n _draw(subMesh, fillMode, instancesCount) {\n if (!this._geometry || !this._geometry.getVertexBuffers() || (!this._unIndexed && !this._geometry.getIndexBuffer())) {\n return this;\n }\n const engine = this.getScene().getEngine();\n // Draw order\n if (this._unIndexed) {\n engine.drawArraysType(Material.LineListDrawMode, subMesh.verticesStart, subMesh.verticesCount, instancesCount);\n }\n else {\n engine.drawElementsType(Material.LineListDrawMode, subMesh.indexStart, subMesh.indexCount, instancesCount);\n }\n return this;\n }\n /**\n * Disposes of the line mesh\n * @param doNotRecurse If children should be disposed\n * @param disposeMaterialAndTextures This parameter is not used by the LineMesh class\n * @param doNotDisposeMaterial If the material should not be disposed (default: false, meaning the material is disposed)\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dispose(doNotRecurse, disposeMaterialAndTextures = false, doNotDisposeMaterial) {\n if (!doNotDisposeMaterial) {\n this._lineMaterial.dispose(false, false, true);\n }\n super.dispose(doNotRecurse);\n }\n /**\n * Returns a new LineMesh object cloned from the current one.\n * @param name\n * @param newParent\n * @param doNotCloneChildren\n */\n clone(name, newParent = null, doNotCloneChildren) {\n return new LinesMesh(name, this.getScene(), newParent, this, doNotCloneChildren);\n }\n /**\n * Creates a new InstancedLinesMesh object from the mesh model.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/copies/instances\n * @param name defines the name of the new instance\n * @returns a new InstancedLinesMesh\n */\n createInstance(name) {\n const instance = new InstancedLinesMesh(name, this);\n if (this.instancedBuffers) {\n instance.instancedBuffers = {};\n for (const key in this.instancedBuffers) {\n instance.instancedBuffers[key] = this.instancedBuffers[key];\n }\n }\n return instance;\n }\n /**\n * Serializes this ground mesh\n * @param serializationObject object to write serialization to\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n serializationObject.color = this.color.asArray();\n serializationObject.alpha = this.alpha;\n }\n /**\n * Parses a serialized ground mesh\n * @param parsedMesh the serialized mesh\n * @param scene the scene to create the ground mesh in\n * @returns the created ground mesh\n */\n static Parse(parsedMesh, scene) {\n const result = new LinesMesh(parsedMesh.name, scene);\n result.color = Color3.FromArray(parsedMesh.color);\n result.alpha = parsedMesh.alpha;\n return result;\n }\n}\n/**\n * Creates an instance based on a source LinesMesh\n */\nexport class InstancedLinesMesh extends InstancedMesh {\n constructor(name, source) {\n super(name, source);\n this.intersectionThreshold = source.intersectionThreshold;\n }\n /**\n * Returns the string \"InstancedLinesMesh\".\n */\n getClassName() {\n return \"InstancedLinesMesh\";\n }\n}\n//# sourceMappingURL=linesMesh.js.map","import { InternalTexture, InternalTextureSource } from \"../../Materials/Textures/internalTexture.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nimport { Tools } from \"../../Misc/tools.js\";\n\nimport { ThinEngine } from \"../thinEngine.js\";\nThinEngine.prototype.updateRawTexture = function (texture, data, format, invertY, compression = null, type = 0, useSRGBBuffer = false) {\n if (!texture) {\n return;\n }\n // Babylon's internalSizedFomat but gl's texImage2D internalFormat\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type, format, useSRGBBuffer);\n // Babylon's internalFormat but gl's texImage2D format\n const internalFormat = this._getInternalFormat(format);\n const textureType = this._getWebGLTextureType(type);\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);\n this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n texture.format = format;\n texture.type = type;\n texture.invertY = invertY;\n texture._compression = compression;\n }\n if (texture.width % 4 !== 0) {\n this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT, 1);\n }\n if (compression && data) {\n this._gl.compressedTexImage2D(this._gl.TEXTURE_2D, 0, this.getCaps().s3tc[compression], texture.width, texture.height, 0, data);\n }\n else {\n this._gl.texImage2D(this._gl.TEXTURE_2D, 0, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, data);\n }\n if (texture.generateMipMaps) {\n this._gl.generateMipmap(this._gl.TEXTURE_2D);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\n // this.resetTextureCache();\n texture.isReady = true;\n};\nThinEngine.prototype.createRawTexture = function (data, width, height, format, generateMipMaps, invertY, samplingMode, compression = null, type = 0, \n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ncreationFlags = 0, useSRGBBuffer = false) {\n const texture = new InternalTexture(this, InternalTextureSource.Raw);\n texture.baseWidth = width;\n texture.baseHeight = height;\n texture.width = width;\n texture.height = height;\n texture.format = format;\n texture.generateMipMaps = generateMipMaps;\n texture.samplingMode = samplingMode;\n texture.invertY = invertY;\n texture._compression = compression;\n texture.type = type;\n texture._useSRGBBuffer = this._getUseSRGBBuffer(useSRGBBuffer, !generateMipMaps);\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n }\n this.updateRawTexture(texture, data, format, invertY, compression, type, texture._useSRGBBuffer);\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);\n // Filters\n const filters = this._getSamplingParameters(samplingMode, generateMipMaps);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, filters.mag);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, filters.min);\n if (generateMipMaps) {\n this._gl.generateMipmap(this._gl.TEXTURE_2D);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\n this._internalTexturesCache.push(texture);\n return texture;\n};\nThinEngine.prototype.createRawCubeTexture = function (data, size, format, type, generateMipMaps, invertY, samplingMode, compression = null) {\n const gl = this._gl;\n const texture = new InternalTexture(this, InternalTextureSource.CubeRaw);\n texture.isCube = true;\n texture.format = format;\n texture.type = type;\n if (!this._doNotHandleContextLost) {\n texture._bufferViewArray = data;\n }\n const textureType = this._getWebGLTextureType(type);\n let internalFormat = this._getInternalFormat(format);\n if (internalFormat === gl.RGB) {\n internalFormat = gl.RGBA;\n }\n // Mipmap generation needs a sized internal format that is both color-renderable and texture-filterable\n if (textureType === gl.FLOAT && !this._caps.textureFloatLinearFiltering) {\n generateMipMaps = false;\n samplingMode = 1;\n Logger.Warn(\"Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\");\n }\n else if (textureType === this._gl.HALF_FLOAT_OES && !this._caps.textureHalfFloatLinearFiltering) {\n generateMipMaps = false;\n samplingMode = 1;\n Logger.Warn(\"Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\");\n }\n else if (textureType === gl.FLOAT && !this._caps.textureFloatRender) {\n generateMipMaps = false;\n Logger.Warn(\"Render to float textures is not supported. Mipmap generation forced to false.\");\n }\n else if (textureType === gl.HALF_FLOAT && !this._caps.colorBufferFloat) {\n generateMipMaps = false;\n Logger.Warn(\"Render to half float textures is not supported. Mipmap generation forced to false.\");\n }\n const width = size;\n const height = width;\n texture.width = width;\n texture.height = height;\n texture.invertY = invertY;\n texture._compression = compression;\n // Double check on POT to generate Mips.\n const isPot = !this.needPOTTextures || (Tools.IsExponentOfTwo(texture.width) && Tools.IsExponentOfTwo(texture.height));\n if (!isPot) {\n generateMipMaps = false;\n }\n // Upload data if needed. The texture won't be ready until then.\n if (data) {\n this.updateRawCubeTexture(texture, data, format, type, invertY, compression);\n }\n else {\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);\n const level = 0;\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\n if (compression) {\n gl.compressedTexImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, this.getCaps().s3tc[compression], texture.width, texture.height, 0, undefined);\n }\n else {\n gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, null);\n }\n }\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, texture, true);\n // Filters\n if (data && generateMipMaps) {\n this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);\n }\n const filters = this._getSamplingParameters(samplingMode, generateMipMaps);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, filters.mag);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, filters.min);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\n texture.generateMipMaps = generateMipMaps;\n texture.samplingMode = samplingMode;\n texture.isReady = true;\n return texture;\n};\nThinEngine.prototype.updateRawCubeTexture = function (texture, data, format, type, invertY, compression = null, level = 0) {\n texture._bufferViewArray = data;\n texture.format = format;\n texture.type = type;\n texture.invertY = invertY;\n texture._compression = compression;\n const gl = this._gl;\n const textureType = this._getWebGLTextureType(type);\n let internalFormat = this._getInternalFormat(format);\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);\n let needConversion = false;\n if (internalFormat === gl.RGB) {\n internalFormat = gl.RGBA;\n needConversion = true;\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);\n if (texture.width % 4 !== 0) {\n gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);\n }\n // Data are known to be in +X +Y +Z -X -Y -Z\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\n let faceData = data[faceIndex];\n if (compression) {\n gl.compressedTexImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, this.getCaps().s3tc[compression], texture.width, texture.height, 0, faceData);\n }\n else {\n if (needConversion) {\n faceData = _convertRGBtoRGBATextureData(faceData, texture.width, texture.height, type);\n }\n gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, faceData);\n }\n }\n const isPot = !this.needPOTTextures || (Tools.IsExponentOfTwo(texture.width) && Tools.IsExponentOfTwo(texture.height));\n if (isPot && texture.generateMipMaps && level === 0) {\n this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\n // this.resetTextureCache();\n texture.isReady = true;\n};\nThinEngine.prototype.createRawCubeTextureFromUrl = function (url, scene, size, format, type, noMipmap, callback, mipmapGenerator, onLoad = null, onError = null, samplingMode = 3, invertY = false) {\n const gl = this._gl;\n const texture = this.createRawCubeTexture(null, size, format, type, !noMipmap, invertY, samplingMode, null);\n scene === null || scene === void 0 ? void 0 : scene.addPendingData(texture);\n texture.url = url;\n texture.isReady = false;\n this._internalTexturesCache.push(texture);\n const onerror = (request, exception) => {\n scene === null || scene === void 0 ? void 0 : scene.removePendingData(texture);\n if (onError && request) {\n onError(request.status + \" \" + request.statusText, exception);\n }\n };\n const internalCallback = (data) => {\n const width = texture.width;\n const faceDataArrays = callback(data);\n if (!faceDataArrays) {\n return;\n }\n if (mipmapGenerator) {\n const textureType = this._getWebGLTextureType(type);\n let internalFormat = this._getInternalFormat(format);\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);\n let needConversion = false;\n if (internalFormat === gl.RGB) {\n internalFormat = gl.RGBA;\n needConversion = true;\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n this._unpackFlipY(false);\n const mipData = mipmapGenerator(faceDataArrays);\n for (let level = 0; level < mipData.length; level++) {\n const mipSize = width >> level;\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\n let mipFaceData = mipData[level][faceIndex];\n if (needConversion) {\n mipFaceData = _convertRGBtoRGBATextureData(mipFaceData, mipSize, mipSize, type);\n }\n gl.texImage2D(faceIndex, level, internalSizedFomat, mipSize, mipSize, 0, internalFormat, textureType, mipFaceData);\n }\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\n }\n else {\n this.updateRawCubeTexture(texture, faceDataArrays, format, type, invertY);\n }\n texture.isReady = true;\n // this.resetTextureCache();\n scene === null || scene === void 0 ? void 0 : scene.removePendingData(texture);\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n if (onLoad) {\n onLoad();\n }\n };\n this._loadFile(url, (data) => {\n internalCallback(data);\n }, undefined, scene === null || scene === void 0 ? void 0 : scene.offlineProvider, true, onerror);\n return texture;\n};\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction _convertRGBtoRGBATextureData(rgbData, width, height, textureType) {\n // Create new RGBA data container.\n let rgbaData;\n let val1 = 1;\n if (textureType === 1) {\n rgbaData = new Float32Array(width * height * 4);\n }\n else if (textureType === 2) {\n rgbaData = new Uint16Array(width * height * 4);\n val1 = 15360; // 15360 is the encoding of 1 in half float\n }\n else if (textureType === 7) {\n rgbaData = new Uint32Array(width * height * 4);\n }\n else {\n rgbaData = new Uint8Array(width * height * 4);\n }\n // Convert each pixel.\n for (let x = 0; x < width; x++) {\n for (let y = 0; y < height; y++) {\n const index = (y * width + x) * 3;\n const newIndex = (y * width + x) * 4;\n // Map Old Value to new value.\n rgbaData[newIndex + 0] = rgbData[index + 0];\n rgbaData[newIndex + 1] = rgbData[index + 1];\n rgbaData[newIndex + 2] = rgbData[index + 2];\n // Add fully opaque alpha channel.\n rgbaData[newIndex + 3] = val1;\n }\n }\n return rgbaData;\n}\n/**\n * Create a function for createRawTexture3D/createRawTexture2DArray\n * @param is3D true for TEXTURE_3D and false for TEXTURE_2D_ARRAY\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction _makeCreateRawTextureFunction(is3D) {\n return function (data, width, height, depth, format, generateMipMaps, invertY, samplingMode, compression = null, textureType = 0) {\n const target = is3D ? this._gl.TEXTURE_3D : this._gl.TEXTURE_2D_ARRAY;\n const source = is3D ? InternalTextureSource.Raw3D : InternalTextureSource.Raw2DArray;\n const texture = new InternalTexture(this, source);\n texture.baseWidth = width;\n texture.baseHeight = height;\n texture.baseDepth = depth;\n texture.width = width;\n texture.height = height;\n texture.depth = depth;\n texture.format = format;\n texture.type = textureType;\n texture.generateMipMaps = generateMipMaps;\n texture.samplingMode = samplingMode;\n if (is3D) {\n texture.is3D = true;\n }\n else {\n texture.is2DArray = true;\n }\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n }\n if (is3D) {\n this.updateRawTexture3D(texture, data, format, invertY, compression, textureType);\n }\n else {\n this.updateRawTexture2DArray(texture, data, format, invertY, compression, textureType);\n }\n this._bindTextureDirectly(target, texture, true);\n // Filters\n const filters = this._getSamplingParameters(samplingMode, generateMipMaps);\n this._gl.texParameteri(target, this._gl.TEXTURE_MAG_FILTER, filters.mag);\n this._gl.texParameteri(target, this._gl.TEXTURE_MIN_FILTER, filters.min);\n if (generateMipMaps) {\n this._gl.generateMipmap(target);\n }\n this._bindTextureDirectly(target, null);\n this._internalTexturesCache.push(texture);\n return texture;\n };\n}\nThinEngine.prototype.createRawTexture2DArray = _makeCreateRawTextureFunction(false);\nThinEngine.prototype.createRawTexture3D = _makeCreateRawTextureFunction(true);\n/**\n * Create a function for updateRawTexture3D/updateRawTexture2DArray\n * @param is3D true for TEXTURE_3D and false for TEXTURE_2D_ARRAY\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction _makeUpdateRawTextureFunction(is3D) {\n return function (texture, data, format, invertY, compression = null, textureType = 0) {\n const target = is3D ? this._gl.TEXTURE_3D : this._gl.TEXTURE_2D_ARRAY;\n const internalType = this._getWebGLTextureType(textureType);\n const internalFormat = this._getInternalFormat(format);\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(textureType, format);\n this._bindTextureDirectly(target, texture, true);\n this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n texture.format = format;\n texture.invertY = invertY;\n texture._compression = compression;\n }\n if (texture.width % 4 !== 0) {\n this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT, 1);\n }\n if (compression && data) {\n this._gl.compressedTexImage3D(target, 0, this.getCaps().s3tc[compression], texture.width, texture.height, texture.depth, 0, data);\n }\n else {\n this._gl.texImage3D(target, 0, internalSizedFomat, texture.width, texture.height, texture.depth, 0, internalFormat, internalType, data);\n }\n if (texture.generateMipMaps) {\n this._gl.generateMipmap(target);\n }\n this._bindTextureDirectly(target, null);\n // this.resetTextureCache();\n texture.isReady = true;\n };\n}\nThinEngine.prototype.updateRawTexture2DArray = _makeUpdateRawTextureFunction(false);\nThinEngine.prototype.updateRawTexture3D = _makeUpdateRawTextureFunction(true);\n//# sourceMappingURL=engine.rawTexture.js.map","import { Texture } from \"./texture.js\";\n\nimport \"../../Engines/Extensions/engine.rawTexture.js\";\n/**\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n */\nexport class RawTexture extends Texture {\n /**\n * Instantiates a new RawTexture.\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n * @param data define the array of data to use to create the texture (null to create an empty texture)\n * @param width define the width of the texture\n * @param height define the height of the texture\n * @param format define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps define whether mip maps should be generated or not\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (1 for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n */\n constructor(data, width, height, \n /**\n * Define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n */\n format, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = 3, type = 0, creationFlags, useSRGBBuffer) {\n super(null, sceneOrEngine, !generateMipMaps, invertY, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, creationFlags);\n this.format = format;\n if (!this._engine) {\n return;\n }\n if (!this._engine._caps.textureFloatLinearFiltering && type === 1) {\n samplingMode = 1;\n }\n if (!this._engine._caps.textureHalfFloatLinearFiltering && type === 2) {\n samplingMode = 1;\n }\n this._texture = this._engine.createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, null, type, creationFlags !== null && creationFlags !== void 0 ? creationFlags : 0, useSRGBBuffer !== null && useSRGBBuffer !== void 0 ? useSRGBBuffer : false);\n this.wrapU = Texture.CLAMP_ADDRESSMODE;\n this.wrapV = Texture.CLAMP_ADDRESSMODE;\n }\n /**\n * Updates the texture underlying data.\n * @param data Define the new data of the texture\n */\n update(data) {\n this._getEngine().updateRawTexture(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type, this._texture._useSRGBBuffer);\n }\n /**\n * Creates a luminance texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance texture\n */\n static CreateLuminanceTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = 3) {\n return new RawTexture(data, width, height, 1, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a luminance alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance alpha texture\n */\n static CreateLuminanceAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = 3) {\n return new RawTexture(data, width, height, 2, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates an alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the alpha texture\n */\n static CreateAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = 3) {\n return new RawTexture(data, width, height, 0, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a RGB texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (1 for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGB alpha texture\n */\n static CreateRGBTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = 3, type = 0, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, 4, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (1 for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBATexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = 3, type = 0, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, 5, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBAStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = 3, type = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, 5, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, 1, useSRGBBuffer);\n }\n /**\n * Creates a R texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = 1) {\n return new RawTexture(data, width, height, 6, sceneOrEngine, generateMipMaps, invertY, samplingMode, type);\n }\n /**\n * Creates a R storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = 1) {\n return new RawTexture(data, width, height, 6, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, 1);\n }\n}\n//# sourceMappingURL=rawTexture.js.map","import { Vector2 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js\";\nimport { Color3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js\";\nimport { Scalar } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.scalar.js\";\nimport { Tools } from \"@inter-ikea-betrakta-babylonjs/core/Misc/tools.js\";\nimport { TextureTools } from \"@inter-ikea-betrakta-babylonjs/core/Misc/textureTools.js\";\nimport { Texture } from \"@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js\";\nimport { RawTexture } from \"@inter-ikea-betrakta-babylonjs/core/Materials/Textures/rawTexture.js\";\nimport { Constants } from \"@inter-ikea-betrakta-babylonjs/core/Engines/constants.js\";\nimport { DumpTools } from \"@inter-ikea-betrakta-babylonjs/core/Misc/dumpTools.js\";\nfunction getFileExtensionFromMimeType(mimeType) {\n switch (mimeType) {\n case \"image/jpeg\" /* ImageMimeType.JPEG */:\n return \".jpg\";\n case \"image/png\" /* ImageMimeType.PNG */:\n return \".png\";\n case \"image/webp\" /* ImageMimeType.WEBP */:\n return \".webp\";\n }\n}\n/**\n * Utility methods for working with glTF material conversion properties. This class should only be used internally\n * @internal\n */\nexport class _GLTFMaterialExporter {\n constructor(exporter) {\n /**\n * Mapping to store textures\n */\n this._textureMap = {};\n // Mapping of internal textures to images to avoid exporting duplicate images.\n this._internalTextureToImage = {};\n this._textureMap = {};\n this._exporter = exporter;\n }\n /**\n * Specifies if two colors are approximately equal in value\n * @param color1 first color to compare to\n * @param color2 second color to compare to\n * @param epsilon threshold value\n */\n static _FuzzyEquals(color1, color2, epsilon) {\n return Scalar.WithinEpsilon(color1.r, color2.r, epsilon) && Scalar.WithinEpsilon(color1.g, color2.g, epsilon) && Scalar.WithinEpsilon(color1.b, color2.b, epsilon);\n }\n /**\n * Gets the materials from a Babylon scene and converts them to glTF materials\n * @param exportMaterials\n * @param mimeType texture mime type\n * @param hasTextureCoords specifies if texture coordinates are present on the material\n */\n _convertMaterialsToGLTFAsync(exportMaterials, mimeType, hasTextureCoords) {\n const promises = [];\n exportMaterials.forEach((material) => {\n if (material.getClassName() === \"StandardMaterial\") {\n promises.push(this._convertStandardMaterialAsync(material, mimeType, hasTextureCoords));\n }\n else if (material.getClassName().indexOf(\"PBR\") !== -1) {\n promises.push(this._convertPBRMaterialAsync(material, mimeType, hasTextureCoords));\n }\n else {\n Tools.Warn(`Unsupported material type: ${material.name}`);\n }\n });\n return Promise.all(promises).then(() => {\n /* do nothing */\n });\n }\n /**\n * Makes a copy of the glTF material without the texture parameters\n * @param originalMaterial original glTF material\n * @returns glTF material without texture parameters\n */\n _stripTexturesFromMaterial(originalMaterial) {\n const newMaterial = {};\n if (originalMaterial) {\n newMaterial.name = originalMaterial.name;\n newMaterial.doubleSided = originalMaterial.doubleSided;\n newMaterial.alphaMode = originalMaterial.alphaMode;\n newMaterial.alphaCutoff = originalMaterial.alphaCutoff;\n newMaterial.emissiveFactor = originalMaterial.emissiveFactor;\n const originalPBRMetallicRoughness = originalMaterial.pbrMetallicRoughness;\n if (originalPBRMetallicRoughness) {\n newMaterial.pbrMetallicRoughness = {};\n newMaterial.pbrMetallicRoughness.baseColorFactor = originalPBRMetallicRoughness.baseColorFactor;\n newMaterial.pbrMetallicRoughness.metallicFactor = originalPBRMetallicRoughness.metallicFactor;\n newMaterial.pbrMetallicRoughness.roughnessFactor = originalPBRMetallicRoughness.roughnessFactor;\n }\n }\n return newMaterial;\n }\n /**\n * Specifies if the material has any texture parameters present\n * @param material glTF Material\n * @returns boolean specifying if texture parameters are present\n */\n _hasTexturesPresent(material) {\n var _a;\n if (material.emissiveTexture || material.normalTexture || material.occlusionTexture) {\n return true;\n }\n const pbrMat = material.pbrMetallicRoughness;\n if (pbrMat) {\n if (pbrMat.baseColorTexture || pbrMat.metallicRoughnessTexture) {\n return true;\n }\n }\n if (material.extensions) {\n for (const extension in material.extensions) {\n const extensionObject = material.extensions[extension];\n if (extensionObject) {\n return (_a = extensionObject.hasTextures) === null || _a === void 0 ? void 0 : _a.call(extensionObject);\n }\n }\n }\n return false;\n }\n _getTextureInfo(babylonTexture) {\n if (babylonTexture) {\n const textureUid = babylonTexture.uid;\n if (textureUid in this._textureMap) {\n return this._textureMap[textureUid];\n }\n }\n return null;\n }\n /**\n * Converts a Babylon StandardMaterial to a glTF Metallic Roughness Material\n * @param babylonStandardMaterial\n * @returns glTF Metallic Roughness Material representation\n */\n _convertToGLTFPBRMetallicRoughness(babylonStandardMaterial) {\n // Defines a cubic bezier curve where x is specular power and y is roughness\n const P0 = new Vector2(0, 1);\n const P1 = new Vector2(0, 0.1);\n const P2 = new Vector2(0, 0.1);\n const P3 = new Vector2(1300, 0.1);\n /**\n * Given the control points, solve for x based on a given t for a cubic bezier curve\n * @param t a value between 0 and 1\n * @param p0 first control point\n * @param p1 second control point\n * @param p2 third control point\n * @param p3 fourth control point\n * @returns number result of cubic bezier curve at the specified t\n */\n function cubicBezierCurve(t, p0, p1, p2, p3) {\n return (1 - t) * (1 - t) * (1 - t) * p0 + 3 * (1 - t) * (1 - t) * t * p1 + 3 * (1 - t) * t * t * p2 + t * t * t * p3;\n }\n /**\n * Evaluates a specified specular power value to determine the appropriate roughness value,\n * based on a pre-defined cubic bezier curve with specular on the abscissa axis (x-axis)\n * and roughness on the ordinant axis (y-axis)\n * @param specularPower specular power of standard material\n * @returns Number representing the roughness value\n */\n function solveForRoughness(specularPower) {\n // Given P0.x = 0, P1.x = 0, P2.x = 0\n // x = t * t * t * P3.x\n // t = (x / P3.x)^(1/3)\n const t = Math.pow(specularPower / P3.x, 0.333333);\n return cubicBezierCurve(t, P0.y, P1.y, P2.y, P3.y);\n }\n const diffuse = babylonStandardMaterial.diffuseColor.toLinearSpace(babylonStandardMaterial.getScene().getEngine().useExactSrgbConversions).scale(0.5);\n const opacity = babylonStandardMaterial.alpha;\n const specularPower = Scalar.Clamp(babylonStandardMaterial.specularPower, 0, _GLTFMaterialExporter._MaxSpecularPower);\n const roughness = solveForRoughness(specularPower);\n const glTFPbrMetallicRoughness = {\n baseColorFactor: [diffuse.r, diffuse.g, diffuse.b, opacity],\n metallicFactor: 0,\n roughnessFactor: roughness,\n };\n return glTFPbrMetallicRoughness;\n }\n /**\n * Computes the metallic factor\n * @param diffuse diffused value\n * @param specular specular value\n * @param oneMinusSpecularStrength one minus the specular strength\n * @returns metallic value\n */\n static _SolveMetallic(diffuse, specular, oneMinusSpecularStrength) {\n if (specular < this._DielectricSpecular.r) {\n this._DielectricSpecular;\n return 0;\n }\n const a = this._DielectricSpecular.r;\n const b = (diffuse * oneMinusSpecularStrength) / (1.0 - this._DielectricSpecular.r) + specular - 2.0 * this._DielectricSpecular.r;\n const c = this._DielectricSpecular.r - specular;\n const D = b * b - 4.0 * a * c;\n return Scalar.Clamp((-b + Math.sqrt(D)) / (2.0 * a), 0, 1);\n }\n /**\n * Sets the glTF alpha mode to a glTF material from the Babylon Material\n * @param glTFMaterial glTF material\n * @param babylonMaterial Babylon material\n */\n static _SetAlphaMode(glTFMaterial, babylonMaterial) {\n if (babylonMaterial.needAlphaBlending()) {\n glTFMaterial.alphaMode = \"BLEND\" /* MaterialAlphaMode.BLEND */;\n }\n else if (babylonMaterial.needAlphaTesting()) {\n glTFMaterial.alphaMode = \"MASK\" /* MaterialAlphaMode.MASK */;\n glTFMaterial.alphaCutoff = babylonMaterial.alphaCutOff;\n }\n }\n /**\n * Converts a Babylon Standard Material to a glTF Material\n * @param babylonStandardMaterial BJS Standard Material\n * @param mimeType mime type to use for the textures\n * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied\n */\n _convertStandardMaterialAsync(babylonStandardMaterial, mimeType, hasTextureCoords) {\n const materialMap = this._exporter._materialMap;\n const materials = this._exporter._materials;\n const promises = [];\n const pbrMetallicRoughness = this._convertToGLTFPBRMetallicRoughness(babylonStandardMaterial);\n const material = { name: babylonStandardMaterial.name };\n if (babylonStandardMaterial.backFaceCulling != null && !babylonStandardMaterial.backFaceCulling) {\n if (!babylonStandardMaterial.twoSidedLighting) {\n Tools.Warn(babylonStandardMaterial.name + \": Back-face culling disabled and two-sided lighting disabled is not supported in glTF.\");\n }\n material.doubleSided = true;\n }\n if (hasTextureCoords) {\n if (babylonStandardMaterial.diffuseTexture) {\n promises.push(this._exportTextureAsync(babylonStandardMaterial.diffuseTexture, mimeType).then((textureInfo) => {\n if (textureInfo) {\n pbrMetallicRoughness.baseColorTexture = textureInfo;\n }\n }));\n }\n const bumpTexture = babylonStandardMaterial.bumpTexture;\n if (bumpTexture) {\n promises.push(this._exportTextureAsync(bumpTexture, mimeType).then((textureInfo) => {\n if (textureInfo) {\n material.normalTexture = textureInfo;\n if (bumpTexture.level !== 1) {\n material.normalTexture.scale = bumpTexture.level;\n }\n }\n }));\n }\n if (babylonStandardMaterial.emissiveTexture) {\n material.emissiveFactor = [1.0, 1.0, 1.0];\n promises.push(this._exportTextureAsync(babylonStandardMaterial.emissiveTexture, mimeType).then((textureInfo) => {\n if (textureInfo) {\n material.emissiveTexture = textureInfo;\n }\n }));\n }\n if (babylonStandardMaterial.ambientTexture) {\n promises.push(this._exportTextureAsync(babylonStandardMaterial.ambientTexture, mimeType).then((textureInfo) => {\n if (textureInfo) {\n const occlusionTexture = {\n index: textureInfo.index,\n };\n material.occlusionTexture = occlusionTexture;\n }\n }));\n }\n }\n if (babylonStandardMaterial.alpha < 1.0 || babylonStandardMaterial.opacityTexture) {\n if (babylonStandardMaterial.alphaMode === Constants.ALPHA_COMBINE) {\n material.alphaMode = \"BLEND\" /* MaterialAlphaMode.BLEND */;\n }\n else {\n Tools.Warn(babylonStandardMaterial.name + \": glTF 2.0 does not support alpha mode: \" + babylonStandardMaterial.alphaMode.toString());\n }\n }\n if (babylonStandardMaterial.emissiveColor && !_GLTFMaterialExporter._FuzzyEquals(babylonStandardMaterial.emissiveColor, Color3.Black(), _GLTFMaterialExporter._Epsilon)) {\n material.emissiveFactor = babylonStandardMaterial.emissiveColor.asArray();\n }\n material.pbrMetallicRoughness = pbrMetallicRoughness;\n _GLTFMaterialExporter._SetAlphaMode(material, babylonStandardMaterial);\n materials.push(material);\n materialMap[babylonStandardMaterial.uniqueId] = materials.length - 1;\n return this._finishMaterial(promises, material, babylonStandardMaterial, mimeType);\n }\n _finishMaterial(promises, glTFMaterial, babylonMaterial, mimeType) {\n return Promise.all(promises).then(() => {\n const textures = this._exporter._extensionsPostExportMaterialAdditionalTextures(\"exportMaterial\", glTFMaterial, babylonMaterial);\n let tasks = null;\n for (const texture of textures) {\n if (!tasks) {\n tasks = [];\n }\n tasks.push(this._exportTextureAsync(texture, mimeType));\n }\n if (!tasks) {\n tasks = [Promise.resolve(null)];\n }\n return Promise.all(tasks).then(() => {\n const extensionWork = this._exporter._extensionsPostExportMaterialAsync(\"exportMaterial\", glTFMaterial, babylonMaterial);\n if (!extensionWork) {\n return glTFMaterial;\n }\n return extensionWork.then(() => glTFMaterial);\n });\n });\n }\n /**\n * Converts an image typed array buffer to a base64 image\n * @param buffer typed array buffer\n * @param width width of the image\n * @param height height of the image\n * @param mimeType mimetype of the image\n * @returns base64 image string\n */\n async _getImageDataAsync(buffer, width, height, mimeType) {\n const textureType = Constants.TEXTURETYPE_UNSIGNED_INT;\n const hostingScene = this._exporter._babylonScene;\n const engine = hostingScene.getEngine();\n // Create a temporary texture with the texture buffer data\n const tempTexture = engine.createRawTexture(buffer, width, height, Constants.TEXTUREFORMAT_RGBA, false, true, Texture.NEAREST_SAMPLINGMODE, null, textureType);\n await TextureTools.ApplyPostProcess(\"pass\", tempTexture, hostingScene, textureType, Constants.TEXTURE_NEAREST_SAMPLINGMODE, Constants.TEXTUREFORMAT_RGBA);\n const data = await engine._readTexturePixels(tempTexture, width, height);\n return (await DumpTools.DumpDataAsync(width, height, data, mimeType, undefined, true, true));\n }\n /**\n * Generates a white texture based on the specified width and height\n * @param width width of the texture in pixels\n * @param height height of the texture in pixels\n * @param scene babylonjs scene\n * @returns white texture\n */\n _createWhiteTexture(width, height, scene) {\n const data = new Uint8Array(width * height * 4);\n for (let i = 0; i < data.length; i = i + 4) {\n data[i] = data[i + 1] = data[i + 2] = data[i + 3] = 0xff;\n }\n const rawTexture = RawTexture.CreateRGBATexture(data, width, height, scene);\n return rawTexture;\n }\n /**\n * Resizes the two source textures to the same dimensions. If a texture is null, a default white texture is generated. If both textures are null, returns null\n * @param texture1 first texture to resize\n * @param texture2 second texture to resize\n * @param scene babylonjs scene\n * @returns resized textures or null\n */\n _resizeTexturesToSameDimensions(texture1, texture2, scene) {\n const texture1Size = texture1 ? texture1.getSize() : { width: 0, height: 0 };\n const texture2Size = texture2 ? texture2.getSize() : { width: 0, height: 0 };\n let resizedTexture1;\n let resizedTexture2;\n if (texture1Size.width < texture2Size.width) {\n if (texture1 && texture1 instanceof Texture) {\n resizedTexture1 = TextureTools.CreateResizedCopy(texture1, texture2Size.width, texture2Size.height, true);\n }\n else {\n resizedTexture1 = this._createWhiteTexture(texture2Size.width, texture2Size.height, scene);\n }\n resizedTexture2 = texture2;\n }\n else if (texture1Size.width > texture2Size.width) {\n if (texture2 && texture2 instanceof Texture) {\n resizedTexture2 = TextureTools.CreateResizedCopy(texture2, texture1Size.width, texture1Size.height, true);\n }\n else {\n resizedTexture2 = this._createWhiteTexture(texture1Size.width, texture1Size.height, scene);\n }\n resizedTexture1 = texture1;\n }\n else {\n resizedTexture1 = texture1;\n resizedTexture2 = texture2;\n }\n return {\n texture1: resizedTexture1,\n texture2: resizedTexture2,\n };\n }\n /**\n * Converts an array of pixels to a Float32Array\n * Throws an error if the pixel format is not supported\n * @param pixels - array buffer containing pixel values\n * @returns Float32 of pixels\n */\n _convertPixelArrayToFloat32(pixels) {\n if (pixels instanceof Uint8Array) {\n const length = pixels.length;\n const buffer = new Float32Array(pixels.length);\n for (let i = 0; i < length; ++i) {\n buffer[i] = pixels[i] / 255;\n }\n return buffer;\n }\n else if (pixels instanceof Float32Array) {\n return pixels;\n }\n else {\n throw new Error(\"Unsupported pixel format!\");\n }\n }\n /**\n * Convert Specular Glossiness Textures to Metallic Roughness\n * See link below for info on the material conversions from PBR Metallic/Roughness and Specular/Glossiness\n * @link https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness/examples/convert-between-workflows-.js/babylon.pbrUtilities.js\n * @param diffuseTexture texture used to store diffuse information\n * @param specularGlossinessTexture texture used to store specular and glossiness information\n * @param factors specular glossiness material factors\n * @param mimeType the mime type to use for the texture\n * @returns pbr metallic roughness interface or null\n */\n async _convertSpecularGlossinessTexturesToMetallicRoughnessAsync(diffuseTexture, specularGlossinessTexture, factors, mimeType) {\n var _a;\n const promises = new Array();\n if (!(diffuseTexture || specularGlossinessTexture)) {\n return Promise.reject(\"_ConvertSpecularGlosinessTexturesToMetallicRoughness: diffuse and specular glossiness textures are not defined!\");\n }\n const scene = diffuseTexture ? diffuseTexture.getScene() : specularGlossinessTexture ? specularGlossinessTexture.getScene() : null;\n if (scene) {\n const resizedTextures = this._resizeTexturesToSameDimensions(diffuseTexture, specularGlossinessTexture, scene);\n const diffuseSize = (_a = resizedTextures.texture1) === null || _a === void 0 ? void 0 : _a.getSize();\n let diffuseBuffer;\n let specularGlossinessBuffer;\n const width = diffuseSize.width;\n const height = diffuseSize.height;\n const diffusePixels = await resizedTextures.texture1.readPixels();\n const specularPixels = await resizedTextures.texture2.readPixels();\n if (diffusePixels) {\n diffuseBuffer = this._convertPixelArrayToFloat32(diffusePixels);\n }\n else {\n return Promise.reject(\"Failed to retrieve pixels from diffuse texture!\");\n }\n if (specularPixels) {\n specularGlossinessBuffer = this._convertPixelArrayToFloat32(specularPixels);\n }\n else {\n return Promise.reject(\"Failed to retrieve pixels from specular glossiness texture!\");\n }\n const byteLength = specularGlossinessBuffer.byteLength;\n const metallicRoughnessBuffer = new Uint8Array(byteLength);\n const baseColorBuffer = new Uint8Array(byteLength);\n const strideSize = 4;\n const maxBaseColor = Color3.Black();\n let maxMetallic = 0;\n let maxRoughness = 0;\n for (let h = 0; h < height; ++h) {\n for (let w = 0; w < width; ++w) {\n const offset = (width * h + w) * strideSize;\n const diffuseColor = new Color3(diffuseBuffer[offset], diffuseBuffer[offset + 1], diffuseBuffer[offset + 2])\n .toLinearSpace(scene.getEngine().useExactSrgbConversions)\n .multiply(factors.diffuseColor);\n const specularColor = new Color3(specularGlossinessBuffer[offset], specularGlossinessBuffer[offset + 1], specularGlossinessBuffer[offset + 2])\n .toLinearSpace(scene.getEngine().useExactSrgbConversions)\n .multiply(factors.specularColor);\n const glossiness = specularGlossinessBuffer[offset + 3] * factors.glossiness;\n const specularGlossiness = {\n diffuseColor: diffuseColor,\n specularColor: specularColor,\n glossiness: glossiness,\n };\n const metallicRoughness = this._convertSpecularGlossinessToMetallicRoughness(specularGlossiness);\n maxBaseColor.r = Math.max(maxBaseColor.r, metallicRoughness.baseColor.r);\n maxBaseColor.g = Math.max(maxBaseColor.g, metallicRoughness.baseColor.g);\n maxBaseColor.b = Math.max(maxBaseColor.b, metallicRoughness.baseColor.b);\n maxMetallic = Math.max(maxMetallic, metallicRoughness.metallic);\n maxRoughness = Math.max(maxRoughness, metallicRoughness.roughness);\n baseColorBuffer[offset] = metallicRoughness.baseColor.r * 255;\n baseColorBuffer[offset + 1] = metallicRoughness.baseColor.g * 255;\n baseColorBuffer[offset + 2] = metallicRoughness.baseColor.b * 255;\n baseColorBuffer[offset + 3] = resizedTextures.texture1.hasAlpha ? diffuseBuffer[offset + 3] * 255 : 255;\n metallicRoughnessBuffer[offset] = 0;\n metallicRoughnessBuffer[offset + 1] = metallicRoughness.roughness * 255;\n metallicRoughnessBuffer[offset + 2] = metallicRoughness.metallic * 255;\n metallicRoughnessBuffer[offset + 3] = 255;\n }\n }\n // Retrieves the metallic roughness factors from the maximum texture values.\n const metallicRoughnessFactors = {\n baseColor: maxBaseColor,\n metallic: maxMetallic,\n roughness: maxRoughness,\n };\n let writeOutMetallicRoughnessTexture = false;\n let writeOutBaseColorTexture = false;\n for (let h = 0; h < height; ++h) {\n for (let w = 0; w < width; ++w) {\n const destinationOffset = (width * h + w) * strideSize;\n baseColorBuffer[destinationOffset] /= metallicRoughnessFactors.baseColor.r > _GLTFMaterialExporter._Epsilon ? metallicRoughnessFactors.baseColor.r : 1;\n baseColorBuffer[destinationOffset + 1] /= metallicRoughnessFactors.baseColor.g > _GLTFMaterialExporter._Epsilon ? metallicRoughnessFactors.baseColor.g : 1;\n baseColorBuffer[destinationOffset + 2] /= metallicRoughnessFactors.baseColor.b > _GLTFMaterialExporter._Epsilon ? metallicRoughnessFactors.baseColor.b : 1;\n const linearBaseColorPixel = Color3.FromInts(baseColorBuffer[destinationOffset], baseColorBuffer[destinationOffset + 1], baseColorBuffer[destinationOffset + 2]);\n const sRGBBaseColorPixel = linearBaseColorPixel.toGammaSpace(scene.getEngine().useExactSrgbConversions);\n baseColorBuffer[destinationOffset] = sRGBBaseColorPixel.r * 255;\n baseColorBuffer[destinationOffset + 1] = sRGBBaseColorPixel.g * 255;\n baseColorBuffer[destinationOffset + 2] = sRGBBaseColorPixel.b * 255;\n if (!_GLTFMaterialExporter._FuzzyEquals(sRGBBaseColorPixel, Color3.White(), _GLTFMaterialExporter._Epsilon)) {\n writeOutBaseColorTexture = true;\n }\n metallicRoughnessBuffer[destinationOffset + 1] /=\n metallicRoughnessFactors.roughness > _GLTFMaterialExporter._Epsilon ? metallicRoughnessFactors.roughness : 1;\n metallicRoughnessBuffer[destinationOffset + 2] /= metallicRoughnessFactors.metallic > _GLTFMaterialExporter._Epsilon ? metallicRoughnessFactors.metallic : 1;\n const metallicRoughnessPixel = Color3.FromInts(255, metallicRoughnessBuffer[destinationOffset + 1], metallicRoughnessBuffer[destinationOffset + 2]);\n if (!_GLTFMaterialExporter._FuzzyEquals(metallicRoughnessPixel, Color3.White(), _GLTFMaterialExporter._Epsilon)) {\n writeOutMetallicRoughnessTexture = true;\n }\n }\n }\n if (writeOutMetallicRoughnessTexture) {\n promises.push(this._getImageDataAsync(metallicRoughnessBuffer, width, height, mimeType).then((data) => {\n metallicRoughnessFactors.metallicRoughnessTextureData = data;\n }));\n }\n if (writeOutBaseColorTexture) {\n promises.push(this._getImageDataAsync(baseColorBuffer, width, height, mimeType).then((data) => {\n metallicRoughnessFactors.baseColorTextureData = data;\n }));\n }\n return Promise.all(promises).then(() => {\n return metallicRoughnessFactors;\n });\n }\n else {\n return Promise.reject(\"_ConvertSpecularGlossinessTexturesToMetallicRoughness: Scene from textures is missing!\");\n }\n }\n /**\n * Converts specular glossiness material properties to metallic roughness\n * @param specularGlossiness interface with specular glossiness material properties\n * @returns interface with metallic roughness material properties\n */\n _convertSpecularGlossinessToMetallicRoughness(specularGlossiness) {\n const diffusePerceivedBrightness = this._getPerceivedBrightness(specularGlossiness.diffuseColor);\n const specularPerceivedBrightness = this._getPerceivedBrightness(specularGlossiness.specularColor);\n const oneMinusSpecularStrength = 1 - this._getMaxComponent(specularGlossiness.specularColor);\n const metallic = _GLTFMaterialExporter._SolveMetallic(diffusePerceivedBrightness, specularPerceivedBrightness, oneMinusSpecularStrength);\n const baseColorFromDiffuse = specularGlossiness.diffuseColor.scale(oneMinusSpecularStrength / (1.0 - _GLTFMaterialExporter._DielectricSpecular.r) / Math.max(1 - metallic, _GLTFMaterialExporter._Epsilon));\n const baseColorFromSpecular = specularGlossiness.specularColor\n .subtract(_GLTFMaterialExporter._DielectricSpecular.scale(1 - metallic))\n .scale(1 / Math.max(metallic, _GLTFMaterialExporter._Epsilon));\n let baseColor = Color3.Lerp(baseColorFromDiffuse, baseColorFromSpecular, metallic * metallic);\n baseColor = baseColor.clampToRef(0, 1, baseColor);\n const metallicRoughness = {\n baseColor: baseColor,\n metallic: metallic,\n roughness: 1 - specularGlossiness.glossiness,\n };\n return metallicRoughness;\n }\n /**\n * Calculates the surface reflectance, independent of lighting conditions\n * @param color Color source to calculate brightness from\n * @returns number representing the perceived brightness, or zero if color is undefined\n */\n _getPerceivedBrightness(color) {\n if (color) {\n return Math.sqrt(0.299 * color.r * color.r + 0.587 * color.g * color.g + 0.114 * color.b * color.b);\n }\n return 0;\n }\n /**\n * Returns the maximum color component value\n * @param color\n * @returns maximum color component value, or zero if color is null or undefined\n */\n _getMaxComponent(color) {\n if (color) {\n return Math.max(color.r, Math.max(color.g, color.b));\n }\n return 0;\n }\n /**\n * Convert a PBRMaterial (Metallic/Roughness) to Metallic Roughness factors\n * @param babylonPBRMaterial BJS PBR Metallic Roughness Material\n * @param mimeType mime type to use for the textures\n * @param glTFPbrMetallicRoughness glTF PBR Metallic Roughness interface\n * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied\n * @returns glTF PBR Metallic Roughness factors\n */\n _convertMetalRoughFactorsToMetallicRoughnessAsync(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords) {\n const promises = [];\n const baseColor = babylonPBRMaterial._albedoColor;\n const metallic = babylonPBRMaterial._metallic;\n const roughness = babylonPBRMaterial._roughness;\n const metallicRoughness = {\n baseColor: baseColor,\n metallic: metallic,\n roughness: roughness,\n };\n if (hasTextureCoords) {\n const albedoTexture = babylonPBRMaterial._albedoTexture;\n if (albedoTexture) {\n promises.push(this._exportTextureAsync(babylonPBRMaterial._albedoTexture, mimeType).then((glTFTexture) => {\n if (glTFTexture) {\n glTFPbrMetallicRoughness.baseColorTexture = glTFTexture;\n }\n }));\n }\n const metallicTexture = babylonPBRMaterial._metallicTexture;\n if (metallicTexture) {\n promises.push(this._exportTextureAsync(metallicTexture, mimeType).then((glTFTexture) => {\n if (glTFTexture) {\n glTFPbrMetallicRoughness.metallicRoughnessTexture = glTFTexture;\n }\n }));\n }\n }\n return Promise.all(promises).then(() => {\n return metallicRoughness;\n });\n }\n _getTextureSampler(texture) {\n const sampler = {};\n if (!texture || !(texture instanceof Texture)) {\n return sampler;\n }\n const wrapS = this._getGLTFTextureWrapMode(texture.wrapU);\n if (wrapS !== 10497 /* TextureWrapMode.REPEAT */) {\n sampler.wrapS = wrapS;\n }\n const wrapT = this._getGLTFTextureWrapMode(texture.wrapV);\n if (wrapT !== 10497 /* TextureWrapMode.REPEAT */) {\n sampler.wrapT = wrapT;\n }\n switch (texture.samplingMode) {\n case Texture.LINEAR_LINEAR: {\n sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;\n sampler.minFilter = 9729 /* TextureMinFilter.LINEAR */;\n break;\n }\n case Texture.LINEAR_NEAREST: {\n sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;\n sampler.minFilter = 9728 /* TextureMinFilter.NEAREST */;\n break;\n }\n case Texture.NEAREST_LINEAR: {\n sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;\n sampler.minFilter = 9729 /* TextureMinFilter.LINEAR */;\n break;\n }\n case Texture.NEAREST_LINEAR_MIPLINEAR: {\n sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;\n sampler.minFilter = 9987 /* TextureMinFilter.LINEAR_MIPMAP_LINEAR */;\n break;\n }\n case Texture.NEAREST_NEAREST: {\n sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;\n sampler.minFilter = 9728 /* TextureMinFilter.NEAREST */;\n break;\n }\n case Texture.NEAREST_LINEAR_MIPNEAREST: {\n sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;\n sampler.minFilter = 9985 /* TextureMinFilter.LINEAR_MIPMAP_NEAREST */;\n break;\n }\n case Texture.LINEAR_NEAREST_MIPNEAREST: {\n sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;\n sampler.minFilter = 9984 /* TextureMinFilter.NEAREST_MIPMAP_NEAREST */;\n break;\n }\n case Texture.LINEAR_NEAREST_MIPLINEAR: {\n sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;\n sampler.minFilter = 9986 /* TextureMinFilter.NEAREST_MIPMAP_LINEAR */;\n break;\n }\n case Texture.NEAREST_NEAREST_MIPLINEAR: {\n sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;\n sampler.minFilter = 9986 /* TextureMinFilter.NEAREST_MIPMAP_LINEAR */;\n break;\n }\n case Texture.LINEAR_LINEAR_MIPLINEAR: {\n sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;\n sampler.minFilter = 9987 /* TextureMinFilter.LINEAR_MIPMAP_LINEAR */;\n break;\n }\n case Texture.LINEAR_LINEAR_MIPNEAREST: {\n sampler.magFilter = 9729 /* TextureMagFilter.LINEAR */;\n sampler.minFilter = 9985 /* TextureMinFilter.LINEAR_MIPMAP_NEAREST */;\n break;\n }\n case Texture.NEAREST_NEAREST_MIPNEAREST: {\n sampler.magFilter = 9728 /* TextureMagFilter.NEAREST */;\n sampler.minFilter = 9984 /* TextureMinFilter.NEAREST_MIPMAP_NEAREST */;\n break;\n }\n }\n return sampler;\n }\n _getGLTFTextureWrapMode(wrapMode) {\n switch (wrapMode) {\n case Texture.WRAP_ADDRESSMODE: {\n return 10497 /* TextureWrapMode.REPEAT */;\n }\n case Texture.CLAMP_ADDRESSMODE: {\n return 33071 /* TextureWrapMode.CLAMP_TO_EDGE */;\n }\n case Texture.MIRROR_ADDRESSMODE: {\n return 33648 /* TextureWrapMode.MIRRORED_REPEAT */;\n }\n default: {\n Tools.Error(`Unsupported Texture Wrap Mode ${wrapMode}!`);\n return 10497 /* TextureWrapMode.REPEAT */;\n }\n }\n }\n /**\n * Convert a PBRMaterial (Specular/Glossiness) to Metallic Roughness factors\n * @param babylonPBRMaterial BJS PBR Metallic Roughness Material\n * @param mimeType mime type to use for the textures\n * @param glTFPbrMetallicRoughness glTF PBR Metallic Roughness interface\n * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied\n * @returns glTF PBR Metallic Roughness factors\n */\n _convertSpecGlossFactorsToMetallicRoughnessAsync(babylonPBRMaterial, mimeType, pbrMetallicRoughness, hasTextureCoords) {\n return Promise.resolve().then(() => {\n const specGloss = {\n diffuseColor: babylonPBRMaterial._albedoColor,\n specularColor: babylonPBRMaterial._reflectivityColor,\n glossiness: babylonPBRMaterial._microSurface,\n };\n const albedoTexture = babylonPBRMaterial._albedoTexture;\n const reflectivityTexture = babylonPBRMaterial._reflectivityTexture;\n const useMicrosurfaceFromReflectivityMapAlpha = babylonPBRMaterial._useMicroSurfaceFromReflectivityMapAlpha;\n if (reflectivityTexture && !useMicrosurfaceFromReflectivityMapAlpha) {\n return Promise.reject(\"_ConvertPBRMaterial: Glossiness values not included in the reflectivity texture are currently not supported\");\n }\n if ((albedoTexture || reflectivityTexture) && hasTextureCoords) {\n const samplerIndex = this._exportTextureSampler(albedoTexture || reflectivityTexture);\n return this._convertSpecularGlossinessTexturesToMetallicRoughnessAsync(albedoTexture, reflectivityTexture, specGloss, mimeType).then((metallicRoughnessFactors) => {\n const textures = this._exporter._textures;\n if (metallicRoughnessFactors.baseColorTextureData) {\n const imageIndex = this._exportImage(`baseColor${textures.length}`, mimeType, metallicRoughnessFactors.baseColorTextureData);\n pbrMetallicRoughness.baseColorTexture = this._exportTextureInfo(imageIndex, samplerIndex, albedoTexture === null || albedoTexture === void 0 ? void 0 : albedoTexture.coordinatesIndex);\n }\n if (metallicRoughnessFactors.metallicRoughnessTextureData) {\n const imageIndex = this._exportImage(`metallicRoughness${textures.length}`, mimeType, metallicRoughnessFactors.metallicRoughnessTextureData);\n pbrMetallicRoughness.metallicRoughnessTexture = this._exportTextureInfo(imageIndex, samplerIndex, reflectivityTexture === null || reflectivityTexture === void 0 ? void 0 : reflectivityTexture.coordinatesIndex);\n }\n return metallicRoughnessFactors;\n });\n }\n else {\n return this._convertSpecularGlossinessToMetallicRoughness(specGloss);\n }\n });\n }\n /**\n * Converts a Babylon PBR Base Material to a glTF Material\n * @param babylonPBRMaterial BJS PBR Base Material\n * @param mimeType mime type to use for the textures\n * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied\n */\n _convertPBRMaterialAsync(babylonPBRMaterial, mimeType, hasTextureCoords) {\n const glTFPbrMetallicRoughness = {};\n const glTFMaterial = {\n name: babylonPBRMaterial.name,\n };\n const useMetallicRoughness = babylonPBRMaterial.isMetallicWorkflow();\n if (useMetallicRoughness) {\n const albedoColor = babylonPBRMaterial._albedoColor;\n const alpha = babylonPBRMaterial.alpha;\n if (albedoColor) {\n glTFPbrMetallicRoughness.baseColorFactor = [albedoColor.r, albedoColor.g, albedoColor.b, alpha];\n }\n return this._convertMetalRoughFactorsToMetallicRoughnessAsync(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords).then((metallicRoughness) => {\n return this._setMetallicRoughnessPbrMaterial(metallicRoughness, babylonPBRMaterial, glTFMaterial, glTFPbrMetallicRoughness, mimeType, hasTextureCoords);\n });\n }\n else {\n return this._convertSpecGlossFactorsToMetallicRoughnessAsync(babylonPBRMaterial, mimeType, glTFPbrMetallicRoughness, hasTextureCoords).then((metallicRoughness) => {\n return this._setMetallicRoughnessPbrMaterial(metallicRoughness, babylonPBRMaterial, glTFMaterial, glTFPbrMetallicRoughness, mimeType, hasTextureCoords);\n });\n }\n }\n _setMetallicRoughnessPbrMaterial(metallicRoughness, babylonPBRMaterial, glTFMaterial, glTFPbrMetallicRoughness, mimeType, hasTextureCoords) {\n const materialMap = this._exporter._materialMap;\n const materials = this._exporter._materials;\n const promises = [];\n if (metallicRoughness) {\n _GLTFMaterialExporter._SetAlphaMode(glTFMaterial, babylonPBRMaterial);\n if (!(_GLTFMaterialExporter._FuzzyEquals(metallicRoughness.baseColor, Color3.White(), _GLTFMaterialExporter._Epsilon) &&\n babylonPBRMaterial.alpha >= _GLTFMaterialExporter._Epsilon)) {\n glTFPbrMetallicRoughness.baseColorFactor = [metallicRoughness.baseColor.r, metallicRoughness.baseColor.g, metallicRoughness.baseColor.b, babylonPBRMaterial.alpha];\n }\n if (metallicRoughness.metallic != null && metallicRoughness.metallic !== 1) {\n glTFPbrMetallicRoughness.metallicFactor = metallicRoughness.metallic;\n }\n if (metallicRoughness.roughness != null && metallicRoughness.roughness !== 1) {\n glTFPbrMetallicRoughness.roughnessFactor = metallicRoughness.roughness;\n }\n if (babylonPBRMaterial.backFaceCulling != null && !babylonPBRMaterial.backFaceCulling) {\n if (!babylonPBRMaterial._twoSidedLighting) {\n Tools.Warn(babylonPBRMaterial.name + \": Back-face culling disabled and two-sided lighting disabled is not supported in glTF.\");\n }\n glTFMaterial.doubleSided = true;\n }\n if (hasTextureCoords) {\n const bumpTexture = babylonPBRMaterial._bumpTexture;\n if (bumpTexture) {\n const promise = this._exportTextureAsync(bumpTexture, mimeType).then((glTFTexture) => {\n if (glTFTexture) {\n glTFMaterial.normalTexture = glTFTexture;\n if (bumpTexture.level !== 1) {\n glTFMaterial.normalTexture.scale = bumpTexture.level;\n }\n }\n });\n promises.push(promise);\n }\n const ambientTexture = babylonPBRMaterial._ambientTexture;\n if (ambientTexture) {\n const promise = this._exportTextureAsync(ambientTexture, mimeType).then((glTFTexture) => {\n if (glTFTexture) {\n const occlusionTexture = {\n index: glTFTexture.index,\n texCoord: glTFTexture.texCoord,\n extensions: glTFTexture.extensions,\n };\n glTFMaterial.occlusionTexture = occlusionTexture;\n const ambientTextureStrength = babylonPBRMaterial._ambientTextureStrength;\n if (ambientTextureStrength) {\n occlusionTexture.strength = ambientTextureStrength;\n }\n }\n });\n promises.push(promise);\n }\n const emissiveTexture = babylonPBRMaterial._emissiveTexture;\n if (emissiveTexture) {\n const promise = this._exportTextureAsync(emissiveTexture, mimeType).then((glTFTexture) => {\n if (glTFTexture) {\n glTFMaterial.emissiveTexture = glTFTexture;\n }\n });\n promises.push(promise);\n }\n }\n const emissiveColor = babylonPBRMaterial._emissiveColor;\n if (!_GLTFMaterialExporter._FuzzyEquals(emissiveColor, Color3.Black(), _GLTFMaterialExporter._Epsilon)) {\n glTFMaterial.emissiveFactor = emissiveColor.asArray();\n }\n glTFMaterial.pbrMetallicRoughness = glTFPbrMetallicRoughness;\n materials.push(glTFMaterial);\n materialMap[babylonPBRMaterial.uniqueId] = materials.length - 1;\n }\n return this._finishMaterial(promises, glTFMaterial, babylonPBRMaterial, mimeType);\n }\n _getPixelsFromTexture(babylonTexture) {\n const pixels = babylonTexture.textureType === Constants.TEXTURETYPE_UNSIGNED_INT\n ? babylonTexture.readPixels()\n : babylonTexture.readPixels();\n return pixels;\n }\n /**\n * Extracts a texture from a Babylon texture into file data and glTF data\n * @param babylonTexture Babylon texture to extract\n * @param mimeType Mime Type of the babylonTexture\n * @returns glTF texture info, or null if the texture format is not supported\n */\n _exportTextureAsync(babylonTexture, mimeType) {\n const extensionPromise = this._exporter._extensionsPreExportTextureAsync(\"exporter\", babylonTexture, mimeType);\n if (!extensionPromise) {\n return this._exportTextureInfoAsync(babylonTexture, mimeType);\n }\n return extensionPromise.then((texture) => {\n if (!texture) {\n return this._exportTextureInfoAsync(babylonTexture, mimeType);\n }\n return this._exportTextureInfoAsync(texture, mimeType);\n });\n }\n async _exportTextureInfoAsync(babylonTexture, mimeType) {\n const textureUid = babylonTexture.uid;\n if (!(textureUid in this._textureMap)) {\n const pixels = await this._getPixelsFromTexture(babylonTexture);\n if (!pixels) {\n return null;\n }\n const samplerIndex = this._exportTextureSampler(babylonTexture);\n // Preserve texture mime type if defined\n const textureMimeType = babylonTexture.mimeType;\n if (textureMimeType) {\n switch (textureMimeType) {\n case \"image/jpeg\":\n case \"image/png\":\n case \"image/webp\":\n mimeType = textureMimeType;\n break;\n default:\n Tools.Warn(`Unsupported media type: ${textureMimeType}`);\n break;\n }\n }\n const internalTextureToImage = this._internalTextureToImage;\n const internalTextureUniqueId = babylonTexture.getInternalTexture().uniqueId;\n internalTextureToImage[internalTextureUniqueId] || (internalTextureToImage[internalTextureUniqueId] = {});\n let imageIndexPromise = internalTextureToImage[internalTextureUniqueId][mimeType];\n if (imageIndexPromise === undefined) {\n const size = babylonTexture.getSize();\n imageIndexPromise = (async () => {\n const data = await this._getImageDataAsync(pixels, size.width, size.height, mimeType);\n return this._exportImage(babylonTexture.name, mimeType, data);\n })();\n internalTextureToImage[internalTextureUniqueId][mimeType] = imageIndexPromise;\n }\n const textureInfo = this._exportTextureInfo(await imageIndexPromise, samplerIndex, babylonTexture.coordinatesIndex);\n this._textureMap[textureUid] = textureInfo;\n this._exporter._extensionsPostExportTextures(\"exporter\", this._textureMap[textureUid], babylonTexture);\n }\n return this._textureMap[textureUid];\n }\n _exportImage(name, mimeType, data) {\n const imageData = this._exporter._imageData;\n const baseName = name.replace(/\\.\\/|\\/|\\.\\\\|\\\\/g, \"_\");\n const extension = getFileExtensionFromMimeType(mimeType);\n let fileName = baseName + extension;\n if (fileName in imageData) {\n fileName = `${baseName}_${Tools.RandomId()}${extension}`;\n }\n imageData[fileName] = {\n data: data,\n mimeType: mimeType,\n };\n const images = this._exporter._images;\n images.push({\n name: name,\n uri: fileName,\n });\n return images.length - 1;\n }\n _exportTextureInfo(imageIndex, samplerIndex, coordinatesIndex) {\n const textures = this._exporter._textures;\n let textureIndex = textures.findIndex((t) => t.sampler == samplerIndex && t.source === imageIndex);\n if (textureIndex === -1) {\n textureIndex = textures.length;\n textures.push({\n source: imageIndex,\n sampler: samplerIndex,\n });\n }\n const textureInfo = { index: textureIndex };\n if (coordinatesIndex) {\n textureInfo.texCoord = coordinatesIndex;\n }\n return textureInfo;\n }\n _exportTextureSampler(texture) {\n const sampler = this._getTextureSampler(texture);\n // if a pre-existing sampler with identical parameters exists, then reuse the previous sampler\n const samplers = this._exporter._samplers;\n const samplerIndex = samplers.findIndex((s) => s.minFilter === sampler.minFilter && s.magFilter === sampler.magFilter && s.wrapS === sampler.wrapS && s.wrapT === sampler.wrapT);\n if (samplerIndex !== -1) {\n return samplerIndex;\n }\n samplers.push(sampler);\n return samplers.length - 1;\n }\n}\n/**\n * Represents the dielectric specular values for R, G and B\n */\n_GLTFMaterialExporter._DielectricSpecular = new Color3(0.04, 0.04, 0.04);\n/**\n * Allows the maximum specular power to be defined for material calculations\n */\n_GLTFMaterialExporter._MaxSpecularPower = 1024;\n/**\n * Numeric tolerance value\n */\n_GLTFMaterialExporter._Epsilon = 1e-6;\n//# sourceMappingURL=glTFMaterialExporter.js.map","import { Vector3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js\";\n/**\n * @internal\n */\nexport class _GLTFUtilities {\n /**\n * Creates a buffer view based on the supplied arguments\n * @param bufferIndex index value of the specified buffer\n * @param byteOffset byte offset value\n * @param byteLength byte length of the bufferView\n * @param byteStride byte distance between conequential elements\n * @param name name of the buffer view\n * @returns bufferView for glTF\n */\n static _CreateBufferView(bufferIndex, byteOffset, byteLength, byteStride, name) {\n const bufferview = { buffer: bufferIndex, byteLength: byteLength };\n if (byteOffset) {\n bufferview.byteOffset = byteOffset;\n }\n if (name) {\n bufferview.name = name;\n }\n if (byteStride) {\n bufferview.byteStride = byteStride;\n }\n return bufferview;\n }\n /**\n * Creates an accessor based on the supplied arguments\n * @param bufferviewIndex The index of the bufferview referenced by this accessor\n * @param name The name of the accessor\n * @param type The type of the accessor\n * @param componentType The datatype of components in the attribute\n * @param count The number of attributes referenced by this accessor\n * @param byteOffset The offset relative to the start of the bufferView in bytes\n * @param min Minimum value of each component in this attribute\n * @param max Maximum value of each component in this attribute\n * @returns accessor for glTF\n */\n static _CreateAccessor(bufferviewIndex, name, type, componentType, count, byteOffset, min, max) {\n const accessor = { name: name, bufferView: bufferviewIndex, componentType: componentType, count: count, type: type };\n if (min != null) {\n accessor.min = min;\n }\n if (max != null) {\n accessor.max = max;\n }\n if (byteOffset != null) {\n accessor.byteOffset = byteOffset;\n }\n return accessor;\n }\n /**\n * Calculates the minimum and maximum values of an array of position floats\n * @param positions Positions array of a mesh\n * @param vertexStart Starting vertex offset to calculate min and max values\n * @param vertexCount Number of vertices to check for min and max values\n * @returns min number array and max number array\n */\n static _CalculateMinMaxPositions(positions, vertexStart, vertexCount) {\n const min = [Infinity, Infinity, Infinity];\n const max = [-Infinity, -Infinity, -Infinity];\n const positionStrideSize = 3;\n let indexOffset;\n let position;\n let vector;\n if (vertexCount) {\n for (let i = vertexStart, length = vertexStart + vertexCount; i < length; ++i) {\n indexOffset = positionStrideSize * i;\n position = Vector3.FromArray(positions, indexOffset);\n vector = position.asArray();\n for (let j = 0; j < positionStrideSize; ++j) {\n const num = vector[j];\n if (num < min[j]) {\n min[j] = num;\n }\n if (num > max[j]) {\n max[j] = num;\n }\n ++indexOffset;\n }\n }\n }\n return { min, max };\n }\n static _NormalizeTangentFromRef(tangent) {\n const length = Math.sqrt(tangent.x * tangent.x + tangent.y * tangent.y + tangent.z * tangent.z);\n if (length > 0) {\n tangent.x /= length;\n tangent.y /= length;\n tangent.z /= length;\n }\n }\n static _GetDataAccessorElementCount(accessorType) {\n switch (accessorType) {\n case \"MAT2\" /* AccessorType.MAT2 */:\n return 4;\n case \"MAT3\" /* AccessorType.MAT3 */:\n return 9;\n case \"MAT4\" /* AccessorType.MAT4 */:\n return 16;\n case \"SCALAR\" /* AccessorType.SCALAR */:\n return 1;\n case \"VEC2\" /* AccessorType.VEC2 */:\n return 2;\n case \"VEC3\" /* AccessorType.VEC3 */:\n return 3;\n case \"VEC4\" /* AccessorType.VEC4 */:\n return 4;\n }\n }\n}\n//# sourceMappingURL=glTFUtilities.js.map","/**\n * Class for holding and downloading glTF file data\n */\nexport class GLTFData {\n /**\n * Initializes the glTF file object\n */\n constructor() {\n this.glTFFiles = {};\n }\n /**\n * Downloads the glTF data as files based on their names and data\n */\n downloadFiles() {\n /**\n * Checks for a matching suffix at the end of a string (for ES5 and lower)\n * @param str Source string\n * @param suffix Suffix to search for in the source string\n * @returns Boolean indicating whether the suffix was found (true) or not (false)\n */\n function endsWith(str, suffix) {\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\n }\n for (const key in this.glTFFiles) {\n const link = document.createElement(\"a\");\n document.body.appendChild(link);\n link.setAttribute(\"type\", \"hidden\");\n link.download = key;\n const blob = this.glTFFiles[key];\n let mimeType;\n if (endsWith(key, \".glb\")) {\n mimeType = { type: \"model/gltf-binary\" };\n }\n else if (endsWith(key, \".bin\")) {\n mimeType = { type: \"application/octet-stream\" };\n }\n else if (endsWith(key, \".gltf\")) {\n mimeType = { type: \"model/gltf+json\" };\n }\n else if (endsWith(key, \".jpeg\") || endsWith(key, \".jpg\")) {\n mimeType = { type: \"image/jpeg\" /* ImageMimeType.JPEG */ };\n }\n else if (endsWith(key, \".png\")) {\n mimeType = { type: \"image/png\" /* ImageMimeType.PNG */ };\n }\n link.href = window.URL.createObjectURL(new Blob([blob], mimeType));\n link.click();\n }\n }\n}\n//# sourceMappingURL=glTFData.js.map","/**\n * Enum for the animation key frame interpolation type\n */\nexport var AnimationKeyInterpolation;\n(function (AnimationKeyInterpolation) {\n /**\n * Use tangents to interpolate between start and end values.\n */\n AnimationKeyInterpolation[AnimationKeyInterpolation[\"NONE\"] = 0] = \"NONE\";\n /**\n * Do not interpolate between keys and use the start key value only. Tangents are ignored\n */\n AnimationKeyInterpolation[AnimationKeyInterpolation[\"STEP\"] = 1] = \"STEP\";\n})(AnimationKeyInterpolation || (AnimationKeyInterpolation = {}));\n//# sourceMappingURL=animationKey.js.map","/**\n * Represents the range of an animation\n */\nexport class AnimationRange {\n /**\n * Initializes the range of an animation\n * @param name The name of the animation range\n * @param from The starting frame of the animation\n * @param to The ending frame of the animation\n */\n constructor(\n /**The name of the animation range**/\n name, \n /**The starting frame of the animation */\n from, \n /**The ending frame of the animation*/\n to) {\n this.name = name;\n this.from = from;\n this.to = to;\n }\n /**\n * Makes a copy of the animation range\n * @returns A copy of the animation range\n */\n clone() {\n return new AnimationRange(this.name, this.from, this.to);\n }\n}\n//# sourceMappingURL=animationRange.js.map","import { Vector3, Quaternion, Vector2, Matrix, TmpVectors } from \"../Maths/math.vector.js\";\nimport { Color3, Color4 } from \"../Maths/math.color.js\";\nimport { Scalar } from \"../Maths/math.scalar.js\";\nimport { SerializationHelper } from \"../Misc/decorators.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { AnimationKeyInterpolation } from \"./animationKey.js\";\nimport { AnimationRange } from \"./animationRange.js\";\nimport { Node } from \"../node.js\";\nimport { Size } from \"../Maths/math.size.js\";\nimport { WebRequest } from \"../Misc/webRequest.js\";\n\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _IAnimationState {\n}\nconst evaluateAnimationState = {\n key: 0,\n repeatCount: 0,\n loopMode: 2 /*Animation.ANIMATIONLOOPMODE_CONSTANT*/,\n};\n/**\n * Class used to store any kind of animation\n */\nexport class Animation {\n /**\n * @internal Internal use\n */\n static _PrepareAnimation(name, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction) {\n let dataType = undefined;\n if (!isNaN(parseFloat(from)) && isFinite(from)) {\n dataType = Animation.ANIMATIONTYPE_FLOAT;\n }\n else if (from instanceof Quaternion) {\n dataType = Animation.ANIMATIONTYPE_QUATERNION;\n }\n else if (from instanceof Vector3) {\n dataType = Animation.ANIMATIONTYPE_VECTOR3;\n }\n else if (from instanceof Vector2) {\n dataType = Animation.ANIMATIONTYPE_VECTOR2;\n }\n else if (from instanceof Color3) {\n dataType = Animation.ANIMATIONTYPE_COLOR3;\n }\n else if (from instanceof Color4) {\n dataType = Animation.ANIMATIONTYPE_COLOR4;\n }\n else if (from instanceof Size) {\n dataType = Animation.ANIMATIONTYPE_SIZE;\n }\n if (dataType == undefined) {\n return null;\n }\n const animation = new Animation(name, targetProperty, framePerSecond, dataType, loopMode);\n const keys = [\n { frame: 0, value: from },\n { frame: totalFrame, value: to },\n ];\n animation.setKeys(keys);\n if (easingFunction !== undefined) {\n animation.setEasingFunction(easingFunction);\n }\n return animation;\n }\n /**\n * Sets up an animation\n * @param property The property to animate\n * @param animationType The animation type to apply\n * @param framePerSecond The frames per second of the animation\n * @param easingFunction The easing function used in the animation\n * @returns The created animation\n */\n static CreateAnimation(property, animationType, framePerSecond, easingFunction) {\n const animation = new Animation(property + \"Animation\", property, framePerSecond, animationType, Animation.ANIMATIONLOOPMODE_CONSTANT);\n animation.setEasingFunction(easingFunction);\n return animation;\n }\n /**\n * Create and start an animation on a node\n * @param name defines the name of the global animation that will be run on all nodes\n * @param target defines the target where the animation will take place\n * @param targetProperty defines property to animate\n * @param framePerSecond defines the number of frame per second yo use\n * @param totalFrame defines the number of frames in total\n * @param from defines the initial value\n * @param to defines the final value\n * @param loopMode defines which loop mode you want to use (off by default)\n * @param easingFunction defines the easing function to use (linear by default)\n * @param onAnimationEnd defines the callback to call when animation end\n * @param scene defines the hosting scene\n * @returns the animatable created for this animation\n */\n static CreateAndStartAnimation(name, target, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction, onAnimationEnd, scene) {\n const animation = Animation._PrepareAnimation(name, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction);\n if (!animation) {\n return null;\n }\n if (target.getScene) {\n scene = target.getScene();\n }\n if (!scene) {\n return null;\n }\n return scene.beginDirectAnimation(target, [animation], 0, totalFrame, animation.loopMode === 1, 1.0, onAnimationEnd);\n }\n /**\n * Create and start an animation on a node and its descendants\n * @param name defines the name of the global animation that will be run on all nodes\n * @param node defines the root node where the animation will take place\n * @param directDescendantsOnly if true only direct descendants will be used, if false direct and also indirect (children of children, an so on in a recursive manner) descendants will be used\n * @param targetProperty defines property to animate\n * @param framePerSecond defines the number of frame per second to use\n * @param totalFrame defines the number of frames in total\n * @param from defines the initial value\n * @param to defines the final value\n * @param loopMode defines which loop mode you want to use (off by default)\n * @param easingFunction defines the easing function to use (linear by default)\n * @param onAnimationEnd defines the callback to call when an animation ends (will be called once per node)\n * @returns the list of animatables created for all nodes\n * @example https://www.babylonjs-playground.com/#MH0VLI\n */\n static CreateAndStartHierarchyAnimation(name, node, directDescendantsOnly, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction, onAnimationEnd) {\n const animation = Animation._PrepareAnimation(name, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction);\n if (!animation) {\n return null;\n }\n const scene = node.getScene();\n return scene.beginDirectHierarchyAnimation(node, directDescendantsOnly, [animation], 0, totalFrame, animation.loopMode === 1, 1.0, onAnimationEnd);\n }\n /**\n * Creates a new animation, merges it with the existing animations and starts it\n * @param name Name of the animation\n * @param node Node which contains the scene that begins the animations\n * @param targetProperty Specifies which property to animate\n * @param framePerSecond The frames per second of the animation\n * @param totalFrame The total number of frames\n * @param from The frame at the beginning of the animation\n * @param to The frame at the end of the animation\n * @param loopMode Specifies the loop mode of the animation\n * @param easingFunction (Optional) The easing function of the animation, which allow custom mathematical formulas for animations\n * @param onAnimationEnd Callback to run once the animation is complete\n * @returns Nullable animation\n */\n static CreateMergeAndStartAnimation(name, node, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction, onAnimationEnd) {\n const animation = Animation._PrepareAnimation(name, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction);\n if (!animation) {\n return null;\n }\n node.animations.push(animation);\n return node.getScene().beginAnimation(node, 0, totalFrame, animation.loopMode === 1, 1.0, onAnimationEnd);\n }\n /** @internal */\n static MakeAnimationAdditive(sourceAnimation, referenceFrameOrOptions, range, cloneOriginal = false, clonedName) {\n var _a, _b;\n let options;\n if (typeof referenceFrameOrOptions === \"object\") {\n options = referenceFrameOrOptions;\n }\n else {\n options = {\n referenceFrame: referenceFrameOrOptions !== null && referenceFrameOrOptions !== void 0 ? referenceFrameOrOptions : 0,\n range: range,\n cloneOriginalAnimation: cloneOriginal,\n clonedAnimationName: clonedName,\n };\n }\n let animation = sourceAnimation;\n if (options.cloneOriginalAnimation) {\n animation = sourceAnimation.clone();\n animation.name = options.clonedAnimationName || animation.name;\n }\n if (!animation._keys.length) {\n return animation;\n }\n const referenceFrame = options.referenceFrame && options.referenceFrame >= 0 ? options.referenceFrame : 0;\n let startIndex = 0;\n const firstKey = animation._keys[0];\n let endIndex = animation._keys.length - 1;\n const lastKey = animation._keys[endIndex];\n const valueStore = {\n referenceValue: firstKey.value,\n referencePosition: TmpVectors.Vector3[0],\n referenceQuaternion: TmpVectors.Quaternion[0],\n referenceScaling: TmpVectors.Vector3[1],\n keyPosition: TmpVectors.Vector3[2],\n keyQuaternion: TmpVectors.Quaternion[1],\n keyScaling: TmpVectors.Vector3[3],\n };\n let from = firstKey.frame;\n let to = lastKey.frame;\n if (options.range) {\n const rangeValue = animation.getRange(options.range);\n if (rangeValue) {\n from = rangeValue.from;\n to = rangeValue.to;\n }\n }\n else {\n from = (_a = options.fromFrame) !== null && _a !== void 0 ? _a : from;\n to = (_b = options.toFrame) !== null && _b !== void 0 ? _b : to;\n }\n if (from !== firstKey.frame) {\n startIndex = animation.createKeyForFrame(from);\n }\n if (to !== lastKey.frame) {\n endIndex = animation.createKeyForFrame(to);\n }\n // There's only one key, so use it\n if (animation._keys.length === 1) {\n const value = animation._getKeyValue(animation._keys[0]);\n valueStore.referenceValue = value.clone ? value.clone() : value;\n }\n // Reference frame is before the first frame, so just use the first frame\n else if (referenceFrame <= firstKey.frame) {\n const value = animation._getKeyValue(firstKey.value);\n valueStore.referenceValue = value.clone ? value.clone() : value;\n }\n // Reference frame is after the last frame, so just use the last frame\n else if (referenceFrame >= lastKey.frame) {\n const value = animation._getKeyValue(lastKey.value);\n valueStore.referenceValue = value.clone ? value.clone() : value;\n }\n // Interpolate the reference value from the animation\n else {\n evaluateAnimationState.key = 0;\n const value = animation._interpolate(referenceFrame, evaluateAnimationState);\n valueStore.referenceValue = value.clone ? value.clone() : value;\n }\n // Conjugate the quaternion\n if (animation.dataType === Animation.ANIMATIONTYPE_QUATERNION) {\n valueStore.referenceValue.normalize().conjugateInPlace();\n }\n // Decompose matrix and conjugate the quaternion\n else if (animation.dataType === Animation.ANIMATIONTYPE_MATRIX) {\n valueStore.referenceValue.decompose(valueStore.referenceScaling, valueStore.referenceQuaternion, valueStore.referencePosition);\n valueStore.referenceQuaternion.normalize().conjugateInPlace();\n }\n let startFrame = Number.MAX_VALUE;\n const clippedKeys = options.clipKeys ? [] : null;\n // Subtract the reference value from all of the key values\n for (let index = startIndex; index <= endIndex; index++) {\n let key = animation._keys[index];\n if (clippedKeys) {\n key = {\n frame: key.frame,\n value: key.value.clone ? key.value.clone() : key.value,\n inTangent: key.inTangent,\n outTangent: key.outTangent,\n interpolation: key.interpolation,\n lockedTangent: key.lockedTangent,\n };\n if (startFrame === Number.MAX_VALUE) {\n startFrame = key.frame;\n }\n key.frame -= startFrame;\n clippedKeys.push(key);\n }\n // If this key was duplicated to create a frame 0 key, skip it because its value has already been updated\n if (index && animation.dataType !== Animation.ANIMATIONTYPE_FLOAT && key.value === firstKey.value) {\n continue;\n }\n switch (animation.dataType) {\n case Animation.ANIMATIONTYPE_MATRIX:\n key.value.decompose(valueStore.keyScaling, valueStore.keyQuaternion, valueStore.keyPosition);\n valueStore.keyPosition.subtractInPlace(valueStore.referencePosition);\n valueStore.keyScaling.divideInPlace(valueStore.referenceScaling);\n valueStore.referenceQuaternion.multiplyToRef(valueStore.keyQuaternion, valueStore.keyQuaternion);\n Matrix.ComposeToRef(valueStore.keyScaling, valueStore.keyQuaternion, valueStore.keyPosition, key.value);\n break;\n case Animation.ANIMATIONTYPE_QUATERNION:\n valueStore.referenceValue.multiplyToRef(key.value, key.value);\n break;\n case Animation.ANIMATIONTYPE_VECTOR2:\n case Animation.ANIMATIONTYPE_VECTOR3:\n case Animation.ANIMATIONTYPE_COLOR3:\n case Animation.ANIMATIONTYPE_COLOR4:\n key.value.subtractToRef(valueStore.referenceValue, key.value);\n break;\n case Animation.ANIMATIONTYPE_SIZE:\n key.value.width -= valueStore.referenceValue.width;\n key.value.height -= valueStore.referenceValue.height;\n break;\n default:\n key.value -= valueStore.referenceValue;\n }\n }\n if (clippedKeys) {\n animation.setKeys(clippedKeys, true);\n }\n return animation;\n }\n /**\n * Transition property of an host to the target Value\n * @param property The property to transition\n * @param targetValue The target Value of the property\n * @param host The object where the property to animate belongs\n * @param scene Scene used to run the animation\n * @param frameRate Framerate (in frame/s) to use\n * @param transition The transition type we want to use\n * @param duration The duration of the animation, in milliseconds\n * @param onAnimationEnd Callback trigger at the end of the animation\n * @returns Nullable animation\n */\n static TransitionTo(property, targetValue, host, scene, frameRate, transition, duration, onAnimationEnd = null) {\n if (duration <= 0) {\n host[property] = targetValue;\n if (onAnimationEnd) {\n onAnimationEnd();\n }\n return null;\n }\n const endFrame = frameRate * (duration / 1000);\n transition.setKeys([\n {\n frame: 0,\n value: host[property].clone ? host[property].clone() : host[property],\n },\n {\n frame: endFrame,\n value: targetValue,\n },\n ]);\n if (!host.animations) {\n host.animations = [];\n }\n host.animations.push(transition);\n const animation = scene.beginAnimation(host, 0, endFrame, false);\n animation.onAnimationEnd = onAnimationEnd;\n return animation;\n }\n /**\n * Return the array of runtime animations currently using this animation\n */\n get runtimeAnimations() {\n return this._runtimeAnimations;\n }\n /**\n * Specifies if any of the runtime animations are currently running\n */\n get hasRunningRuntimeAnimations() {\n for (const runtimeAnimation of this._runtimeAnimations) {\n if (!runtimeAnimation.isStopped()) {\n return true;\n }\n }\n return false;\n }\n /**\n * Initializes the animation\n * @param name Name of the animation\n * @param targetProperty Property to animate\n * @param framePerSecond The frames per second of the animation\n * @param dataType The data type of the animation\n * @param loopMode The loop mode of the animation\n * @param enableBlending Specifies if blending should be enabled\n */\n constructor(\n /**Name of the animation */\n name, \n /**Property to animate */\n targetProperty, \n /**The frames per second of the animation */\n framePerSecond, \n /**The data type of the animation */\n dataType, \n /**The loop mode of the animation */\n loopMode, \n /**Specifies if blending should be enabled */\n enableBlending) {\n this.name = name;\n this.targetProperty = targetProperty;\n this.framePerSecond = framePerSecond;\n this.dataType = dataType;\n this.loopMode = loopMode;\n this.enableBlending = enableBlending;\n /**\n * Stores the easing function of the animation\n */\n this._easingFunction = null;\n /**\n * @internal Internal use only\n */\n this._runtimeAnimations = new Array();\n /**\n * The set of event that will be linked to this animation\n */\n this._events = new Array();\n /**\n * Stores the blending speed of the animation\n */\n this.blendingSpeed = 0.01;\n /**\n * Stores the animation ranges for the animation\n */\n this._ranges = {};\n this.targetPropertyPath = targetProperty.split(\".\");\n this.dataType = dataType;\n this.loopMode = loopMode === undefined ? Animation.ANIMATIONLOOPMODE_CYCLE : loopMode;\n this.uniqueId = Animation._UniqueIdGenerator++;\n }\n // Methods\n /**\n * Converts the animation to a string\n * @param fullDetails support for multiple levels of logging within scene loading\n * @returns String form of the animation\n */\n toString(fullDetails) {\n let ret = \"Name: \" + this.name + \", property: \" + this.targetProperty;\n ret += \", datatype: \" + [\"Float\", \"Vector3\", \"Quaternion\", \"Matrix\", \"Color3\", \"Vector2\"][this.dataType];\n ret += \", nKeys: \" + (this._keys ? this._keys.length : \"none\");\n ret += \", nRanges: \" + (this._ranges ? Object.keys(this._ranges).length : \"none\");\n if (fullDetails) {\n ret += \", Ranges: {\";\n let first = true;\n for (const name in this._ranges) {\n if (first) {\n ret += \", \";\n first = false;\n }\n ret += name;\n }\n ret += \"}\";\n }\n return ret;\n }\n /**\n * Add an event to this animation\n * @param event Event to add\n */\n addEvent(event) {\n this._events.push(event);\n this._events.sort((a, b) => a.frame - b.frame);\n }\n /**\n * Remove all events found at the given frame\n * @param frame The frame to remove events from\n */\n removeEvents(frame) {\n for (let index = 0; index < this._events.length; index++) {\n if (this._events[index].frame === frame) {\n this._events.splice(index, 1);\n index--;\n }\n }\n }\n /**\n * Retrieves all the events from the animation\n * @returns Events from the animation\n */\n getEvents() {\n return this._events;\n }\n /**\n * Creates an animation range\n * @param name Name of the animation range\n * @param from Starting frame of the animation range\n * @param to Ending frame of the animation\n */\n createRange(name, from, to) {\n // check name not already in use; could happen for bones after serialized\n if (!this._ranges[name]) {\n this._ranges[name] = new AnimationRange(name, from, to);\n }\n }\n /**\n * Deletes an animation range by name\n * @param name Name of the animation range to delete\n * @param deleteFrames Specifies if the key frames for the range should also be deleted (true) or not (false)\n */\n deleteRange(name, deleteFrames = true) {\n const range = this._ranges[name];\n if (!range) {\n return;\n }\n if (deleteFrames) {\n const from = range.from;\n const to = range.to;\n // this loop MUST go high to low for multiple splices to work\n for (let key = this._keys.length - 1; key >= 0; key--) {\n if (this._keys[key].frame >= from && this._keys[key].frame <= to) {\n this._keys.splice(key, 1);\n }\n }\n }\n this._ranges[name] = null; // said much faster than 'delete this._range[name]'\n }\n /**\n * Gets the animation range by name, or null if not defined\n * @param name Name of the animation range\n * @returns Nullable animation range\n */\n getRange(name) {\n return this._ranges[name];\n }\n /**\n * Gets the key frames from the animation\n * @returns The key frames of the animation\n */\n getKeys() {\n return this._keys;\n }\n /**\n * Gets the highest frame rate of the animation\n * @returns Highest frame rate of the animation\n */\n getHighestFrame() {\n let ret = 0;\n for (let key = 0, nKeys = this._keys.length; key < nKeys; key++) {\n if (ret < this._keys[key].frame) {\n ret = this._keys[key].frame;\n }\n }\n return ret;\n }\n /**\n * Gets the easing function of the animation\n * @returns Easing function of the animation\n */\n getEasingFunction() {\n return this._easingFunction;\n }\n /**\n * Sets the easing function of the animation\n * @param easingFunction A custom mathematical formula for animation\n */\n setEasingFunction(easingFunction) {\n this._easingFunction = easingFunction;\n }\n /**\n * Interpolates a scalar linearly\n * @param startValue Start value of the animation curve\n * @param endValue End value of the animation curve\n * @param gradient Scalar amount to interpolate\n * @returns Interpolated scalar value\n */\n floatInterpolateFunction(startValue, endValue, gradient) {\n return Scalar.Lerp(startValue, endValue, gradient);\n }\n /**\n * Interpolates a scalar cubically\n * @param startValue Start value of the animation curve\n * @param outTangent End tangent of the animation\n * @param endValue End value of the animation curve\n * @param inTangent Start tangent of the animation curve\n * @param gradient Scalar amount to interpolate\n * @returns Interpolated scalar value\n */\n floatInterpolateFunctionWithTangents(startValue, outTangent, endValue, inTangent, gradient) {\n return Scalar.Hermite(startValue, outTangent, endValue, inTangent, gradient);\n }\n /**\n * Interpolates a quaternion using a spherical linear interpolation\n * @param startValue Start value of the animation curve\n * @param endValue End value of the animation curve\n * @param gradient Scalar amount to interpolate\n * @returns Interpolated quaternion value\n */\n quaternionInterpolateFunction(startValue, endValue, gradient) {\n return Quaternion.Slerp(startValue, endValue, gradient);\n }\n /**\n * Interpolates a quaternion cubically\n * @param startValue Start value of the animation curve\n * @param outTangent End tangent of the animation curve\n * @param endValue End value of the animation curve\n * @param inTangent Start tangent of the animation curve\n * @param gradient Scalar amount to interpolate\n * @returns Interpolated quaternion value\n */\n quaternionInterpolateFunctionWithTangents(startValue, outTangent, endValue, inTangent, gradient) {\n return Quaternion.Hermite(startValue, outTangent, endValue, inTangent, gradient).normalize();\n }\n /**\n * Interpolates a Vector3 linearly\n * @param startValue Start value of the animation curve\n * @param endValue End value of the animation curve\n * @param gradient Scalar amount to interpolate (value between 0 and 1)\n * @returns Interpolated scalar value\n */\n vector3InterpolateFunction(startValue, endValue, gradient) {\n return Vector3.Lerp(startValue, endValue, gradient);\n }\n /**\n * Interpolates a Vector3 cubically\n * @param startValue Start value of the animation curve\n * @param outTangent End tangent of the animation\n * @param endValue End value of the animation curve\n * @param inTangent Start tangent of the animation curve\n * @param gradient Scalar amount to interpolate (value between 0 and 1)\n * @returns InterpolatedVector3 value\n */\n vector3InterpolateFunctionWithTangents(startValue, outTangent, endValue, inTangent, gradient) {\n return Vector3.Hermite(startValue, outTangent, endValue, inTangent, gradient);\n }\n /**\n * Interpolates a Vector2 linearly\n * @param startValue Start value of the animation curve\n * @param endValue End value of the animation curve\n * @param gradient Scalar amount to interpolate (value between 0 and 1)\n * @returns Interpolated Vector2 value\n */\n vector2InterpolateFunction(startValue, endValue, gradient) {\n return Vector2.Lerp(startValue, endValue, gradient);\n }\n /**\n * Interpolates a Vector2 cubically\n * @param startValue Start value of the animation curve\n * @param outTangent End tangent of the animation\n * @param endValue End value of the animation curve\n * @param inTangent Start tangent of the animation curve\n * @param gradient Scalar amount to interpolate (value between 0 and 1)\n * @returns Interpolated Vector2 value\n */\n vector2InterpolateFunctionWithTangents(startValue, outTangent, endValue, inTangent, gradient) {\n return Vector2.Hermite(startValue, outTangent, endValue, inTangent, gradient);\n }\n /**\n * Interpolates a size linearly\n * @param startValue Start value of the animation curve\n * @param endValue End value of the animation curve\n * @param gradient Scalar amount to interpolate\n * @returns Interpolated Size value\n */\n sizeInterpolateFunction(startValue, endValue, gradient) {\n return Size.Lerp(startValue, endValue, gradient);\n }\n /**\n * Interpolates a Color3 linearly\n * @param startValue Start value of the animation curve\n * @param endValue End value of the animation curve\n * @param gradient Scalar amount to interpolate\n * @returns Interpolated Color3 value\n */\n color3InterpolateFunction(startValue, endValue, gradient) {\n return Color3.Lerp(startValue, endValue, gradient);\n }\n /**\n * Interpolates a Color3 cubically\n * @param startValue Start value of the animation curve\n * @param outTangent End tangent of the animation\n * @param endValue End value of the animation curve\n * @param inTangent Start tangent of the animation curve\n * @param gradient Scalar amount to interpolate\n * @returns interpolated value\n */\n color3InterpolateFunctionWithTangents(startValue, outTangent, endValue, inTangent, gradient) {\n return Color3.Hermite(startValue, outTangent, endValue, inTangent, gradient);\n }\n /**\n * Interpolates a Color4 linearly\n * @param startValue Start value of the animation curve\n * @param endValue End value of the animation curve\n * @param gradient Scalar amount to interpolate\n * @returns Interpolated Color3 value\n */\n color4InterpolateFunction(startValue, endValue, gradient) {\n return Color4.Lerp(startValue, endValue, gradient);\n }\n /**\n * Interpolates a Color4 cubically\n * @param startValue Start value of the animation curve\n * @param outTangent End tangent of the animation\n * @param endValue End value of the animation curve\n * @param inTangent Start tangent of the animation curve\n * @param gradient Scalar amount to interpolate\n * @returns interpolated value\n */\n color4InterpolateFunctionWithTangents(startValue, outTangent, endValue, inTangent, gradient) {\n return Color4.Hermite(startValue, outTangent, endValue, inTangent, gradient);\n }\n /**\n * @internal Internal use only\n */\n _getKeyValue(value) {\n if (typeof value === \"function\") {\n return value();\n }\n return value;\n }\n /**\n * Evaluate the animation value at a given frame\n * @param currentFrame defines the frame where we want to evaluate the animation\n * @returns the animation value\n */\n evaluate(currentFrame) {\n evaluateAnimationState.key = 0;\n return this._interpolate(currentFrame, evaluateAnimationState);\n }\n /**\n * @internal Internal use only\n */\n _interpolate(currentFrame, state, searchClosestKeyOnly = false) {\n if (state.loopMode === Animation.ANIMATIONLOOPMODE_CONSTANT && state.repeatCount > 0) {\n return state.highLimitValue.clone ? state.highLimitValue.clone() : state.highLimitValue;\n }\n const keys = this._keys;\n const keysLength = keys.length;\n let key = state.key;\n while (key >= 0 && currentFrame < keys[key].frame) {\n --key;\n }\n while (key + 1 <= keysLength - 1 && currentFrame >= keys[key + 1].frame) {\n ++key;\n }\n state.key = key;\n if (key < 0) {\n return searchClosestKeyOnly ? undefined : this._getKeyValue(keys[0].value);\n }\n else if (key + 1 > keysLength - 1) {\n return searchClosestKeyOnly ? undefined : this._getKeyValue(keys[keysLength - 1].value);\n }\n const startKey = keys[key];\n const endKey = keys[key + 1];\n if (searchClosestKeyOnly && (currentFrame === startKey.frame || currentFrame === endKey.frame)) {\n return undefined;\n }\n const startValue = this._getKeyValue(startKey.value);\n const endValue = this._getKeyValue(endKey.value);\n if (startKey.interpolation === AnimationKeyInterpolation.STEP) {\n if (endKey.frame > currentFrame) {\n return startValue;\n }\n else {\n return endValue;\n }\n }\n const useTangent = startKey.outTangent !== undefined && endKey.inTangent !== undefined;\n const frameDelta = endKey.frame - startKey.frame;\n // gradient : percent of currentFrame between the frame inf and the frame sup\n let gradient = (currentFrame - startKey.frame) / frameDelta;\n // check for easingFunction and correction of gradient\n const easingFunction = startKey.easingFunction || this.getEasingFunction();\n if (easingFunction !== null) {\n gradient = easingFunction.ease(gradient);\n }\n switch (this.dataType) {\n // Float\n case Animation.ANIMATIONTYPE_FLOAT: {\n const floatValue = useTangent\n ? this.floatInterpolateFunctionWithTangents(startValue, startKey.outTangent * frameDelta, endValue, endKey.inTangent * frameDelta, gradient)\n : this.floatInterpolateFunction(startValue, endValue, gradient);\n switch (state.loopMode) {\n case Animation.ANIMATIONLOOPMODE_CYCLE:\n case Animation.ANIMATIONLOOPMODE_CONSTANT:\n case Animation.ANIMATIONLOOPMODE_YOYO:\n return floatValue;\n case Animation.ANIMATIONLOOPMODE_RELATIVE:\n return state.offsetValue * state.repeatCount + floatValue;\n }\n break;\n }\n // Quaternion\n case Animation.ANIMATIONTYPE_QUATERNION: {\n const quatValue = useTangent\n ? this.quaternionInterpolateFunctionWithTangents(startValue, startKey.outTangent.scale(frameDelta), endValue, endKey.inTangent.scale(frameDelta), gradient)\n : this.quaternionInterpolateFunction(startValue, endValue, gradient);\n switch (state.loopMode) {\n case Animation.ANIMATIONLOOPMODE_CYCLE:\n case Animation.ANIMATIONLOOPMODE_CONSTANT:\n case Animation.ANIMATIONLOOPMODE_YOYO:\n return quatValue;\n case Animation.ANIMATIONLOOPMODE_RELATIVE:\n return quatValue.addInPlace(state.offsetValue.scale(state.repeatCount));\n }\n return quatValue;\n }\n // Vector3\n case Animation.ANIMATIONTYPE_VECTOR3: {\n const vec3Value = useTangent\n ? this.vector3InterpolateFunctionWithTangents(startValue, startKey.outTangent.scale(frameDelta), endValue, endKey.inTangent.scale(frameDelta), gradient)\n : this.vector3InterpolateFunction(startValue, endValue, gradient);\n switch (state.loopMode) {\n case Animation.ANIMATIONLOOPMODE_CYCLE:\n case Animation.ANIMATIONLOOPMODE_CONSTANT:\n case Animation.ANIMATIONLOOPMODE_YOYO:\n return vec3Value;\n case Animation.ANIMATIONLOOPMODE_RELATIVE:\n return vec3Value.add(state.offsetValue.scale(state.repeatCount));\n }\n break;\n }\n // Vector2\n case Animation.ANIMATIONTYPE_VECTOR2: {\n const vec2Value = useTangent\n ? this.vector2InterpolateFunctionWithTangents(startValue, startKey.outTangent.scale(frameDelta), endValue, endKey.inTangent.scale(frameDelta), gradient)\n : this.vector2InterpolateFunction(startValue, endValue, gradient);\n switch (state.loopMode) {\n case Animation.ANIMATIONLOOPMODE_CYCLE:\n case Animation.ANIMATIONLOOPMODE_CONSTANT:\n case Animation.ANIMATIONLOOPMODE_YOYO:\n return vec2Value;\n case Animation.ANIMATIONLOOPMODE_RELATIVE:\n return vec2Value.add(state.offsetValue.scale(state.repeatCount));\n }\n break;\n }\n // Size\n case Animation.ANIMATIONTYPE_SIZE: {\n switch (state.loopMode) {\n case Animation.ANIMATIONLOOPMODE_CYCLE:\n case Animation.ANIMATIONLOOPMODE_CONSTANT:\n case Animation.ANIMATIONLOOPMODE_YOYO:\n return this.sizeInterpolateFunction(startValue, endValue, gradient);\n case Animation.ANIMATIONLOOPMODE_RELATIVE:\n return this.sizeInterpolateFunction(startValue, endValue, gradient).add(state.offsetValue.scale(state.repeatCount));\n }\n break;\n }\n // Color3\n case Animation.ANIMATIONTYPE_COLOR3: {\n const color3Value = useTangent\n ? this.color3InterpolateFunctionWithTangents(startValue, startKey.outTangent.scale(frameDelta), endValue, endKey.inTangent.scale(frameDelta), gradient)\n : this.color3InterpolateFunction(startValue, endValue, gradient);\n switch (state.loopMode) {\n case Animation.ANIMATIONLOOPMODE_CYCLE:\n case Animation.ANIMATIONLOOPMODE_CONSTANT:\n case Animation.ANIMATIONLOOPMODE_YOYO:\n return color3Value;\n case Animation.ANIMATIONLOOPMODE_RELATIVE:\n return color3Value.add(state.offsetValue.scale(state.repeatCount));\n }\n break;\n }\n // Color4\n case Animation.ANIMATIONTYPE_COLOR4: {\n const color4Value = useTangent\n ? this.color4InterpolateFunctionWithTangents(startValue, startKey.outTangent.scale(frameDelta), endValue, endKey.inTangent.scale(frameDelta), gradient)\n : this.color4InterpolateFunction(startValue, endValue, gradient);\n switch (state.loopMode) {\n case Animation.ANIMATIONLOOPMODE_CYCLE:\n case Animation.ANIMATIONLOOPMODE_CONSTANT:\n case Animation.ANIMATIONLOOPMODE_YOYO:\n return color4Value;\n case Animation.ANIMATIONLOOPMODE_RELATIVE:\n return color4Value.add(state.offsetValue.scale(state.repeatCount));\n }\n break;\n }\n // Matrix\n case Animation.ANIMATIONTYPE_MATRIX: {\n switch (state.loopMode) {\n case Animation.ANIMATIONLOOPMODE_CYCLE:\n case Animation.ANIMATIONLOOPMODE_CONSTANT:\n case Animation.ANIMATIONLOOPMODE_YOYO: {\n if (Animation.AllowMatricesInterpolation) {\n return this.matrixInterpolateFunction(startValue, endValue, gradient, state.workValue);\n }\n return startValue;\n }\n case Animation.ANIMATIONLOOPMODE_RELATIVE: {\n return startValue;\n }\n }\n break;\n }\n }\n return 0;\n }\n /**\n * Defines the function to use to interpolate matrices\n * @param startValue defines the start matrix\n * @param endValue defines the end matrix\n * @param gradient defines the gradient between both matrices\n * @param result defines an optional target matrix where to store the interpolation\n * @returns the interpolated matrix\n */\n matrixInterpolateFunction(startValue, endValue, gradient, result) {\n if (Animation.AllowMatrixDecomposeForInterpolation) {\n if (result) {\n Matrix.DecomposeLerpToRef(startValue, endValue, gradient, result);\n return result;\n }\n return Matrix.DecomposeLerp(startValue, endValue, gradient);\n }\n if (result) {\n Matrix.LerpToRef(startValue, endValue, gradient, result);\n return result;\n }\n return Matrix.Lerp(startValue, endValue, gradient);\n }\n /**\n * Makes a copy of the animation\n * @returns Cloned animation\n */\n clone() {\n const clone = new Animation(this.name, this.targetPropertyPath.join(\".\"), this.framePerSecond, this.dataType, this.loopMode);\n clone.enableBlending = this.enableBlending;\n clone.blendingSpeed = this.blendingSpeed;\n if (this._keys) {\n clone.setKeys(this._keys);\n }\n if (this._ranges) {\n clone._ranges = {};\n for (const name in this._ranges) {\n const range = this._ranges[name];\n if (!range) {\n continue;\n }\n clone._ranges[name] = range.clone();\n }\n }\n return clone;\n }\n /**\n * Sets the key frames of the animation\n * @param values The animation key frames to set\n * @param dontClone Whether to clone the keys or not (default is false, so the array of keys is cloned)\n */\n setKeys(values, dontClone = false) {\n this._keys = !dontClone ? values.slice(0) : values;\n }\n /**\n * Creates a key for the frame passed as a parameter and adds it to the animation IF a key doesn't already exist for that frame\n * @param frame Frame number\n * @returns The key index if the key was added or the index of the pre existing key if the frame passed as parameter already has a corresponding key\n */\n createKeyForFrame(frame) {\n // Find the key corresponding to frame\n evaluateAnimationState.key = 0;\n const value = this._interpolate(frame, evaluateAnimationState, true);\n if (!value) {\n // A key corresponding to this frame already exists\n return evaluateAnimationState.key === frame ? evaluateAnimationState.key : evaluateAnimationState.key + 1;\n }\n // The frame is between two keys, so create a new key\n const newKey = {\n frame,\n value: value.clone ? value.clone() : value,\n };\n this._keys.splice(evaluateAnimationState.key + 1, 0, newKey);\n return evaluateAnimationState.key + 1;\n }\n /**\n * Serializes the animation to an object\n * @returns Serialized object\n */\n serialize() {\n const serializationObject = {};\n serializationObject.name = this.name;\n serializationObject.property = this.targetProperty;\n serializationObject.framePerSecond = this.framePerSecond;\n serializationObject.dataType = this.dataType;\n serializationObject.loopBehavior = this.loopMode;\n serializationObject.enableBlending = this.enableBlending;\n serializationObject.blendingSpeed = this.blendingSpeed;\n const dataType = this.dataType;\n serializationObject.keys = [];\n const keys = this.getKeys();\n for (let index = 0; index < keys.length; index++) {\n const animationKey = keys[index];\n const key = {};\n key.frame = animationKey.frame;\n switch (dataType) {\n case Animation.ANIMATIONTYPE_FLOAT:\n key.values = [animationKey.value];\n if (animationKey.inTangent !== undefined) {\n key.values.push(animationKey.inTangent);\n }\n if (animationKey.outTangent !== undefined) {\n if (animationKey.inTangent === undefined) {\n key.values.push(undefined);\n }\n key.values.push(animationKey.outTangent);\n }\n if (animationKey.interpolation !== undefined) {\n if (animationKey.inTangent === undefined) {\n key.values.push(undefined);\n }\n if (animationKey.outTangent === undefined) {\n key.values.push(undefined);\n }\n key.values.push(animationKey.interpolation);\n }\n break;\n case Animation.ANIMATIONTYPE_QUATERNION:\n case Animation.ANIMATIONTYPE_MATRIX:\n case Animation.ANIMATIONTYPE_VECTOR3:\n case Animation.ANIMATIONTYPE_COLOR3:\n case Animation.ANIMATIONTYPE_COLOR4:\n key.values = animationKey.value.asArray();\n if (animationKey.inTangent != undefined) {\n key.values.push(animationKey.inTangent.asArray());\n }\n if (animationKey.outTangent != undefined) {\n if (animationKey.inTangent === undefined) {\n key.values.push(undefined);\n }\n key.values.push(animationKey.outTangent.asArray());\n }\n if (animationKey.interpolation !== undefined) {\n if (animationKey.inTangent === undefined) {\n key.values.push(undefined);\n }\n if (animationKey.outTangent === undefined) {\n key.values.push(undefined);\n }\n key.values.push(animationKey.interpolation);\n }\n break;\n }\n serializationObject.keys.push(key);\n }\n serializationObject.ranges = [];\n for (const name in this._ranges) {\n const source = this._ranges[name];\n if (!source) {\n continue;\n }\n const range = {};\n range.name = name;\n range.from = source.from;\n range.to = source.to;\n serializationObject.ranges.push(range);\n }\n return serializationObject;\n }\n /**\n * @internal\n */\n static _UniversalLerp(left, right, amount) {\n const constructor = left.constructor;\n if (constructor.Lerp) {\n // Lerp supported\n return constructor.Lerp(left, right, amount);\n }\n else if (constructor.Slerp) {\n // Slerp supported\n return constructor.Slerp(left, right, amount);\n }\n else if (left.toFixed) {\n // Number\n return left * (1.0 - amount) + amount * right;\n }\n else {\n // Blending not supported\n return right;\n }\n }\n /**\n * Parses an animation object and creates an animation\n * @param parsedAnimation Parsed animation object\n * @returns Animation object\n */\n static Parse(parsedAnimation) {\n const animation = new Animation(parsedAnimation.name, parsedAnimation.property, parsedAnimation.framePerSecond, parsedAnimation.dataType, parsedAnimation.loopBehavior);\n const dataType = parsedAnimation.dataType;\n const keys = [];\n let data;\n let index;\n if (parsedAnimation.enableBlending) {\n animation.enableBlending = parsedAnimation.enableBlending;\n }\n if (parsedAnimation.blendingSpeed) {\n animation.blendingSpeed = parsedAnimation.blendingSpeed;\n }\n for (index = 0; index < parsedAnimation.keys.length; index++) {\n const key = parsedAnimation.keys[index];\n let inTangent = undefined;\n let outTangent = undefined;\n let interpolation = undefined;\n switch (dataType) {\n case Animation.ANIMATIONTYPE_FLOAT:\n data = key.values[0];\n if (key.values.length >= 2) {\n inTangent = key.values[1];\n }\n if (key.values.length >= 3) {\n outTangent = key.values[2];\n }\n if (key.values.length >= 4) {\n interpolation = key.values[3];\n }\n break;\n case Animation.ANIMATIONTYPE_QUATERNION:\n data = Quaternion.FromArray(key.values);\n if (key.values.length >= 8) {\n const _inTangent = Quaternion.FromArray(key.values.slice(4, 8));\n if (!_inTangent.equals(Quaternion.Zero())) {\n inTangent = _inTangent;\n }\n }\n if (key.values.length >= 12) {\n const _outTangent = Quaternion.FromArray(key.values.slice(8, 12));\n if (!_outTangent.equals(Quaternion.Zero())) {\n outTangent = _outTangent;\n }\n }\n if (key.values.length >= 13) {\n interpolation = key.values[12];\n }\n break;\n case Animation.ANIMATIONTYPE_MATRIX:\n data = Matrix.FromArray(key.values);\n if (key.values.length >= 17) {\n interpolation = key.values[16];\n }\n break;\n case Animation.ANIMATIONTYPE_COLOR3:\n data = Color3.FromArray(key.values);\n if (key.values[3]) {\n inTangent = Color3.FromArray(key.values[3]);\n }\n if (key.values[4]) {\n outTangent = Color3.FromArray(key.values[4]);\n }\n if (key.values[5]) {\n interpolation = key.values[5];\n }\n break;\n case Animation.ANIMATIONTYPE_COLOR4:\n data = Color4.FromArray(key.values);\n if (key.values[4]) {\n inTangent = Color4.FromArray(key.values[4]);\n }\n if (key.values[5]) {\n outTangent = Color4.FromArray(key.values[5]);\n }\n if (key.values[6]) {\n interpolation = Color4.FromArray(key.values[6]);\n }\n break;\n case Animation.ANIMATIONTYPE_VECTOR3:\n default:\n data = Vector3.FromArray(key.values);\n if (key.values[3]) {\n inTangent = Vector3.FromArray(key.values[3]);\n }\n if (key.values[4]) {\n outTangent = Vector3.FromArray(key.values[4]);\n }\n if (key.values[5]) {\n interpolation = key.values[5];\n }\n break;\n }\n const keyData = {};\n keyData.frame = key.frame;\n keyData.value = data;\n if (inTangent != undefined) {\n keyData.inTangent = inTangent;\n }\n if (outTangent != undefined) {\n keyData.outTangent = outTangent;\n }\n if (interpolation != undefined) {\n keyData.interpolation = interpolation;\n }\n keys.push(keyData);\n }\n animation.setKeys(keys);\n if (parsedAnimation.ranges) {\n for (index = 0; index < parsedAnimation.ranges.length; index++) {\n data = parsedAnimation.ranges[index];\n animation.createRange(data.name, data.from, data.to);\n }\n }\n return animation;\n }\n /**\n * Appends the serialized animations from the source animations\n * @param source Source containing the animations\n * @param destination Target to store the animations\n */\n static AppendSerializedAnimations(source, destination) {\n SerializationHelper.AppendSerializedAnimations(source, destination);\n }\n /**\n * Creates a new animation or an array of animations from a snippet saved in a remote file\n * @param name defines the name of the animation to create (can be null or empty to use the one from the json data)\n * @param url defines the url to load from\n * @returns a promise that will resolve to the new animation or an array of animations\n */\n static ParseFromFileAsync(name, url) {\n return new Promise((resolve, reject) => {\n const request = new WebRequest();\n request.addEventListener(\"readystatechange\", () => {\n if (request.readyState == 4) {\n if (request.status == 200) {\n let serializationObject = JSON.parse(request.responseText);\n if (serializationObject.animations) {\n serializationObject = serializationObject.animations;\n }\n if (serializationObject.length) {\n const output = [];\n for (const serializedAnimation of serializationObject) {\n output.push(this.Parse(serializedAnimation));\n }\n resolve(output);\n }\n else {\n const output = this.Parse(serializationObject);\n if (name) {\n output.name = name;\n }\n resolve(output);\n }\n }\n else {\n reject(\"Unable to load the animation\");\n }\n }\n });\n request.open(\"GET\", url);\n request.send();\n });\n }\n /**\n * Creates an animation or an array of animations from a snippet saved by the Inspector\n * @param snippetId defines the snippet to load\n * @returns a promise that will resolve to the new animation or a new array of animations\n */\n static ParseFromSnippetAsync(snippetId) {\n return new Promise((resolve, reject) => {\n const request = new WebRequest();\n request.addEventListener(\"readystatechange\", () => {\n if (request.readyState == 4) {\n if (request.status == 200) {\n const snippet = JSON.parse(JSON.parse(request.responseText).jsonPayload);\n if (snippet.animations) {\n const serializationObject = JSON.parse(snippet.animations);\n const outputs = [];\n for (const serializedAnimation of serializationObject.animations) {\n const output = this.Parse(serializedAnimation);\n output.snippetId = snippetId;\n outputs.push(output);\n }\n resolve(outputs);\n }\n else {\n const serializationObject = JSON.parse(snippet.animation);\n const output = this.Parse(serializationObject);\n output.snippetId = snippetId;\n resolve(output);\n }\n }\n else {\n reject(\"Unable to load the snippet \" + snippetId);\n }\n }\n });\n request.open(\"GET\", this.SnippetUrl + \"/\" + snippetId.replace(/#/g, \"/\"));\n request.send();\n });\n }\n}\nAnimation._UniqueIdGenerator = 0;\n/**\n * Use matrix interpolation instead of using direct key value when animating matrices\n */\nAnimation.AllowMatricesInterpolation = false;\n/**\n * When matrix interpolation is enabled, this boolean forces the system to use Matrix.DecomposeLerp instead of Matrix.Lerp. Interpolation is more precise but slower\n */\nAnimation.AllowMatrixDecomposeForInterpolation = true;\n/** Define the Url to load snippets */\nAnimation.SnippetUrl = `https://snippet.babylonjs.com`;\n// Statics\n/**\n * Float animation type\n */\nAnimation.ANIMATIONTYPE_FLOAT = 0;\n/**\n * Vector3 animation type\n */\nAnimation.ANIMATIONTYPE_VECTOR3 = 1;\n/**\n * Quaternion animation type\n */\nAnimation.ANIMATIONTYPE_QUATERNION = 2;\n/**\n * Matrix animation type\n */\nAnimation.ANIMATIONTYPE_MATRIX = 3;\n/**\n * Color3 animation type\n */\nAnimation.ANIMATIONTYPE_COLOR3 = 4;\n/**\n * Color3 animation type\n */\nAnimation.ANIMATIONTYPE_COLOR4 = 7;\n/**\n * Vector2 animation type\n */\nAnimation.ANIMATIONTYPE_VECTOR2 = 5;\n/**\n * Size animation type\n */\nAnimation.ANIMATIONTYPE_SIZE = 6;\n/**\n * Relative Loop Mode\n */\nAnimation.ANIMATIONLOOPMODE_RELATIVE = 0;\n/**\n * Cycle Loop Mode\n */\nAnimation.ANIMATIONLOOPMODE_CYCLE = 1;\n/**\n * Constant Loop Mode\n */\nAnimation.ANIMATIONLOOPMODE_CONSTANT = 2;\n/**\n * Yoyo Loop Mode\n */\nAnimation.ANIMATIONLOOPMODE_YOYO = 4;\n/**\n * Creates an animation or an array of animations from a snippet saved by the Inspector\n * @deprecated Please use ParseFromSnippetAsync instead\n * @param snippetId defines the snippet to load\n * @returns a promise that will resolve to the new animation or a new array of animations\n */\nAnimation.CreateFromSnippetAsync = Animation.ParseFromSnippetAsync;\nRegisterClass(\"BABYLON.Animation\", Animation);\nNode._AnimationRangeFactory = (name, from, to) => new AnimationRange(name, from, to);\n//# sourceMappingURL=animation.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { serialize, SerializationHelper } from \"../Misc/decorators.js\";\nimport { GetClass } from \"../Misc/typeStore.js\";\n/**\n * Defines a target to use with MorphTargetManager\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/morphTargets\n */\nexport class MorphTarget {\n /**\n * Gets or sets the influence of this target (ie. its weight in the overall morphing)\n */\n get influence() {\n return this._influence;\n }\n set influence(influence) {\n if (this._influence === influence) {\n return;\n }\n const previous = this._influence;\n this._influence = influence;\n if (this.onInfluenceChanged.hasObservers()) {\n this.onInfluenceChanged.notifyObservers(previous === 0 || influence === 0);\n }\n }\n /**\n * Gets or sets the animation properties override\n */\n get animationPropertiesOverride() {\n if (!this._animationPropertiesOverride && this._scene) {\n return this._scene.animationPropertiesOverride;\n }\n return this._animationPropertiesOverride;\n }\n set animationPropertiesOverride(value) {\n this._animationPropertiesOverride = value;\n }\n /**\n * Creates a new MorphTarget\n * @param name defines the name of the target\n * @param influence defines the influence to use\n * @param scene defines the scene the morphtarget belongs to\n */\n constructor(\n /** defines the name of the target */\n name, influence = 0, scene = null) {\n this.name = name;\n /**\n * Gets or sets the list of animations\n */\n this.animations = [];\n this._positions = null;\n this._normals = null;\n this._tangents = null;\n this._uvs = null;\n this._uniqueId = 0;\n /**\n * Observable raised when the influence changes\n */\n this.onInfluenceChanged = new Observable();\n /** @internal */\n this._onDataLayoutChanged = new Observable();\n this._animationPropertiesOverride = null;\n this._scene = scene || EngineStore.LastCreatedScene;\n this.influence = influence;\n if (this._scene) {\n this._uniqueId = this._scene.getUniqueId();\n }\n }\n /**\n * Gets the unique ID of this manager\n */\n get uniqueId() {\n return this._uniqueId;\n }\n /**\n * Gets a boolean defining if the target contains position data\n */\n get hasPositions() {\n return !!this._positions;\n }\n /**\n * Gets a boolean defining if the target contains normal data\n */\n get hasNormals() {\n return !!this._normals;\n }\n /**\n * Gets a boolean defining if the target contains tangent data\n */\n get hasTangents() {\n return !!this._tangents;\n }\n /**\n * Gets a boolean defining if the target contains texture coordinates data\n */\n get hasUVs() {\n return !!this._uvs;\n }\n /**\n * Affects position data to this target\n * @param data defines the position data to use\n */\n setPositions(data) {\n const hadPositions = this.hasPositions;\n this._positions = data;\n if (hadPositions !== this.hasPositions) {\n this._onDataLayoutChanged.notifyObservers(undefined);\n }\n }\n /**\n * Gets the position data stored in this target\n * @returns a FloatArray containing the position data (or null if not present)\n */\n getPositions() {\n return this._positions;\n }\n /**\n * Affects normal data to this target\n * @param data defines the normal data to use\n */\n setNormals(data) {\n const hadNormals = this.hasNormals;\n this._normals = data;\n if (hadNormals !== this.hasNormals) {\n this._onDataLayoutChanged.notifyObservers(undefined);\n }\n }\n /**\n * Gets the normal data stored in this target\n * @returns a FloatArray containing the normal data (or null if not present)\n */\n getNormals() {\n return this._normals;\n }\n /**\n * Affects tangent data to this target\n * @param data defines the tangent data to use\n */\n setTangents(data) {\n const hadTangents = this.hasTangents;\n this._tangents = data;\n if (hadTangents !== this.hasTangents) {\n this._onDataLayoutChanged.notifyObservers(undefined);\n }\n }\n /**\n * Gets the tangent data stored in this target\n * @returns a FloatArray containing the tangent data (or null if not present)\n */\n getTangents() {\n return this._tangents;\n }\n /**\n * Affects texture coordinates data to this target\n * @param data defines the texture coordinates data to use\n */\n setUVs(data) {\n const hadUVs = this.hasUVs;\n this._uvs = data;\n if (hadUVs !== this.hasUVs) {\n this._onDataLayoutChanged.notifyObservers(undefined);\n }\n }\n /**\n * Gets the texture coordinates data stored in this target\n * @returns a FloatArray containing the texture coordinates data (or null if not present)\n */\n getUVs() {\n return this._uvs;\n }\n /**\n * Clone the current target\n * @returns a new MorphTarget\n */\n clone() {\n const newOne = SerializationHelper.Clone(() => new MorphTarget(this.name, this.influence, this._scene), this);\n newOne._positions = this._positions;\n newOne._normals = this._normals;\n newOne._tangents = this._tangents;\n newOne._uvs = this._uvs;\n return newOne;\n }\n /**\n * Serializes the current target into a Serialization object\n * @returns the serialized object\n */\n serialize() {\n const serializationObject = {};\n serializationObject.name = this.name;\n serializationObject.influence = this.influence;\n serializationObject.positions = Array.prototype.slice.call(this.getPositions());\n if (this.id != null) {\n serializationObject.id = this.id;\n }\n if (this.hasNormals) {\n serializationObject.normals = Array.prototype.slice.call(this.getNormals());\n }\n if (this.hasTangents) {\n serializationObject.tangents = Array.prototype.slice.call(this.getTangents());\n }\n if (this.hasUVs) {\n serializationObject.uvs = Array.prototype.slice.call(this.getUVs());\n }\n // Animations\n SerializationHelper.AppendSerializedAnimations(this, serializationObject);\n return serializationObject;\n }\n /**\n * Returns the string \"MorphTarget\"\n * @returns \"MorphTarget\"\n */\n getClassName() {\n return \"MorphTarget\";\n }\n // Statics\n /**\n * Creates a new target from serialized data\n * @param serializationObject defines the serialized data to use\n * @param scene defines the hosting scene\n * @returns a new MorphTarget\n */\n static Parse(serializationObject, scene) {\n const result = new MorphTarget(serializationObject.name, serializationObject.influence);\n result.setPositions(serializationObject.positions);\n if (serializationObject.id != null) {\n result.id = serializationObject.id;\n }\n if (serializationObject.normals) {\n result.setNormals(serializationObject.normals);\n }\n if (serializationObject.tangents) {\n result.setTangents(serializationObject.tangents);\n }\n if (serializationObject.uvs) {\n result.setUVs(serializationObject.uvs);\n }\n // Animations\n if (serializationObject.animations) {\n for (let animationIndex = 0; animationIndex < serializationObject.animations.length; animationIndex++) {\n const parsedAnimation = serializationObject.animations[animationIndex];\n const internalClass = GetClass(\"BABYLON.Animation\");\n if (internalClass) {\n result.animations.push(internalClass.Parse(parsedAnimation));\n }\n }\n if (serializationObject.autoAnimate && scene) {\n scene.beginAnimation(result, serializationObject.autoAnimateFrom, serializationObject.autoAnimateTo, serializationObject.autoAnimateLoop, serializationObject.autoAnimateSpeed || 1.0);\n }\n }\n return result;\n }\n /**\n * Creates a MorphTarget from mesh data\n * @param mesh defines the source mesh\n * @param name defines the name to use for the new target\n * @param influence defines the influence to attach to the target\n * @returns a new MorphTarget\n */\n static FromMesh(mesh, name, influence) {\n if (!name) {\n name = mesh.name;\n }\n const result = new MorphTarget(name, influence, mesh.getScene());\n result.setPositions(mesh.getVerticesData(VertexBuffer.PositionKind));\n if (mesh.isVerticesDataPresent(VertexBuffer.NormalKind)) {\n result.setNormals(mesh.getVerticesData(VertexBuffer.NormalKind));\n }\n if (mesh.isVerticesDataPresent(VertexBuffer.TangentKind)) {\n result.setTangents(mesh.getVerticesData(VertexBuffer.TangentKind));\n }\n if (mesh.isVerticesDataPresent(VertexBuffer.UVKind)) {\n result.setUVs(mesh.getVerticesData(VertexBuffer.UVKind));\n }\n return result;\n }\n}\n__decorate([\n serialize()\n], MorphTarget.prototype, \"id\", void 0);\n//# sourceMappingURL=morphTarget.js.map","import { Vector3, Quaternion } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js\";\nimport { Tools } from \"@inter-ikea-betrakta-babylonjs/core/Misc/tools.js\";\nimport { Animation } from \"@inter-ikea-betrakta-babylonjs/core/Animations/animation.js\";\nimport { TransformNode } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/transformNode.js\";\nimport { MorphTarget } from \"@inter-ikea-betrakta-babylonjs/core/Morph/morphTarget.js\";\nimport { Mesh } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js\";\nimport { _GLTFUtilities } from \"./glTFUtilities.js\";\nimport { AnimationKeyInterpolation } from \"@inter-ikea-betrakta-babylonjs/core/Animations/animationKey.js\";\nimport { Camera } from \"@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js\";\nimport { Light } from \"@inter-ikea-betrakta-babylonjs/core/Lights/light.js\";\n/**\n * @internal\n * Enum for handling in tangent and out tangent.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nvar _TangentType;\n(function (_TangentType) {\n /**\n * Specifies that input tangents are used.\n */\n _TangentType[_TangentType[\"INTANGENT\"] = 0] = \"INTANGENT\";\n /**\n * Specifies that output tangents are used.\n */\n _TangentType[_TangentType[\"OUTTANGENT\"] = 1] = \"OUTTANGENT\";\n})(_TangentType || (_TangentType = {}));\n/**\n * @internal\n * Utility class for generating glTF animation data from BabylonJS.\n */\nexport class _GLTFAnimation {\n /**\n * Determine if a node is transformable - ie has properties it should be part of animation of transformation.\n * @param babylonNode the node to test\n * @returns true if can be animated, false otherwise. False if the parameter is null or undefined.\n */\n static _IsTransformable(babylonNode) {\n return babylonNode && (babylonNode instanceof TransformNode || babylonNode instanceof Camera || babylonNode instanceof Light);\n }\n /**\n * @ignore\n *\n * Creates glTF channel animation from BabylonJS animation.\n * @param babylonTransformNode - BabylonJS mesh.\n * @param animation - animation.\n * @param animationChannelTargetPath - The target animation channel.\n * @param useQuaternion - Specifies if quaternions are used.\n * @returns nullable IAnimationData\n */\n static _CreateNodeAnimation(babylonTransformNode, animation, animationChannelTargetPath, useQuaternion, animationSampleRate) {\n if (this._IsTransformable(babylonTransformNode)) {\n const inputs = [];\n const outputs = [];\n const keyFrames = animation.getKeys();\n const minMaxKeyFrames = _GLTFAnimation._CalculateMinMaxKeyFrames(keyFrames);\n const interpolationOrBake = _GLTFAnimation._DeduceInterpolation(keyFrames, animationChannelTargetPath, useQuaternion);\n const interpolation = interpolationOrBake.interpolationType;\n const shouldBakeAnimation = interpolationOrBake.shouldBakeAnimation;\n if (shouldBakeAnimation) {\n _GLTFAnimation._CreateBakedAnimation(babylonTransformNode, animation, animationChannelTargetPath, minMaxKeyFrames.min, minMaxKeyFrames.max, animation.framePerSecond, animationSampleRate, inputs, outputs, minMaxKeyFrames, useQuaternion);\n }\n else {\n if (interpolation === \"LINEAR\" /* AnimationSamplerInterpolation.LINEAR */ || interpolation === \"STEP\" /* AnimationSamplerInterpolation.STEP */) {\n _GLTFAnimation._CreateLinearOrStepAnimation(babylonTransformNode, animation, animationChannelTargetPath, inputs, outputs, useQuaternion);\n }\n else if (interpolation === \"CUBICSPLINE\" /* AnimationSamplerInterpolation.CUBICSPLINE */) {\n _GLTFAnimation._CreateCubicSplineAnimation(babylonTransformNode, animation, animationChannelTargetPath, inputs, outputs, useQuaternion);\n }\n else {\n _GLTFAnimation._CreateBakedAnimation(babylonTransformNode, animation, animationChannelTargetPath, minMaxKeyFrames.min, minMaxKeyFrames.max, animation.framePerSecond, animationSampleRate, inputs, outputs, minMaxKeyFrames, useQuaternion);\n }\n }\n if (inputs.length && outputs.length) {\n const result = {\n inputs: inputs,\n outputs: outputs,\n samplerInterpolation: interpolation,\n inputsMin: shouldBakeAnimation ? minMaxKeyFrames.min : Tools.FloatRound(minMaxKeyFrames.min / animation.framePerSecond),\n inputsMax: shouldBakeAnimation ? minMaxKeyFrames.max : Tools.FloatRound(minMaxKeyFrames.max / animation.framePerSecond),\n };\n return result;\n }\n }\n return null;\n }\n static _DeduceAnimationInfo(animation) {\n let animationChannelTargetPath = null;\n let dataAccessorType = \"VEC3\" /* AccessorType.VEC3 */;\n let useQuaternion = false;\n const property = animation.targetProperty.split(\".\");\n switch (property[0]) {\n case \"scaling\": {\n animationChannelTargetPath = \"scale\" /* AnimationChannelTargetPath.SCALE */;\n break;\n }\n case \"position\": {\n animationChannelTargetPath = \"translation\" /* AnimationChannelTargetPath.TRANSLATION */;\n break;\n }\n case \"rotation\": {\n dataAccessorType = \"VEC4\" /* AccessorType.VEC4 */;\n animationChannelTargetPath = \"rotation\" /* AnimationChannelTargetPath.ROTATION */;\n break;\n }\n case \"rotationQuaternion\": {\n dataAccessorType = \"VEC4\" /* AccessorType.VEC4 */;\n useQuaternion = true;\n animationChannelTargetPath = \"rotation\" /* AnimationChannelTargetPath.ROTATION */;\n break;\n }\n case \"influence\": {\n dataAccessorType = \"SCALAR\" /* AccessorType.SCALAR */;\n animationChannelTargetPath = \"weights\" /* AnimationChannelTargetPath.WEIGHTS */;\n break;\n }\n default: {\n Tools.Error(`Unsupported animatable property ${property[0]}`);\n }\n }\n if (animationChannelTargetPath) {\n return { animationChannelTargetPath: animationChannelTargetPath, dataAccessorType: dataAccessorType, useQuaternion: useQuaternion };\n }\n else {\n Tools.Error(\"animation channel target path and data accessor type could be deduced\");\n }\n return null;\n }\n /**\n * @ignore\n * Create node animations from the transform node animations\n * @param babylonNode\n * @param runtimeGLTFAnimation\n * @param idleGLTFAnimations\n * @param nodeMap\n * @param nodes\n * @param binaryWriter\n * @param bufferViews\n * @param accessors\n * @param animationSampleRate\n */\n static _CreateNodeAnimationFromNodeAnimations(babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, nodes, binaryWriter, bufferViews, accessors, animationSampleRate, shouldExportAnimation) {\n let glTFAnimation;\n if (_GLTFAnimation._IsTransformable(babylonNode)) {\n if (babylonNode.animations) {\n for (const animation of babylonNode.animations) {\n if (shouldExportAnimation && !shouldExportAnimation(animation)) {\n continue;\n }\n const animationInfo = _GLTFAnimation._DeduceAnimationInfo(animation);\n if (animationInfo) {\n glTFAnimation = {\n name: animation.name,\n samplers: [],\n channels: [],\n };\n _GLTFAnimation._AddAnimation(`${animation.name}`, animation.hasRunningRuntimeAnimations ? runtimeGLTFAnimation : glTFAnimation, babylonNode, animation, animationInfo.dataAccessorType, animationInfo.animationChannelTargetPath, nodeMap, binaryWriter, bufferViews, accessors, animationInfo.useQuaternion, animationSampleRate);\n if (glTFAnimation.samplers.length && glTFAnimation.channels.length) {\n idleGLTFAnimations.push(glTFAnimation);\n }\n }\n }\n }\n }\n }\n /**\n * @ignore\n * Create individual morph animations from the mesh's morph target animation tracks\n * @param babylonNode\n * @param runtimeGLTFAnimation\n * @param idleGLTFAnimations\n * @param nodeMap\n * @param nodes\n * @param binaryWriter\n * @param bufferViews\n * @param accessors\n * @param animationSampleRate\n */\n static _CreateMorphTargetAnimationFromMorphTargetAnimations(babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, nodes, binaryWriter, bufferViews, accessors, animationSampleRate, shouldExportAnimation) {\n let glTFAnimation;\n if (babylonNode instanceof Mesh) {\n const morphTargetManager = babylonNode.morphTargetManager;\n if (morphTargetManager) {\n for (let i = 0; i < morphTargetManager.numTargets; ++i) {\n const morphTarget = morphTargetManager.getTarget(i);\n for (const animation of morphTarget.animations) {\n if (shouldExportAnimation && !shouldExportAnimation(animation)) {\n continue;\n }\n const combinedAnimation = new Animation(`${animation.name}`, \"influence\", animation.framePerSecond, animation.dataType, animation.loopMode, animation.enableBlending);\n const combinedAnimationKeys = [];\n const animationKeys = animation.getKeys();\n for (let j = 0; j < animationKeys.length; ++j) {\n const animationKey = animationKeys[j];\n for (let k = 0; k < morphTargetManager.numTargets; ++k) {\n if (k == i) {\n combinedAnimationKeys.push(animationKey);\n }\n else {\n combinedAnimationKeys.push({ frame: animationKey.frame, value: 0 });\n }\n }\n }\n combinedAnimation.setKeys(combinedAnimationKeys);\n const animationInfo = _GLTFAnimation._DeduceAnimationInfo(combinedAnimation);\n if (animationInfo) {\n glTFAnimation = {\n name: combinedAnimation.name,\n samplers: [],\n channels: [],\n };\n _GLTFAnimation._AddAnimation(animation.name, animation.hasRunningRuntimeAnimations ? runtimeGLTFAnimation : glTFAnimation, babylonNode, combinedAnimation, animationInfo.dataAccessorType, animationInfo.animationChannelTargetPath, nodeMap, binaryWriter, bufferViews, accessors, animationInfo.useQuaternion, animationSampleRate, morphTargetManager.numTargets);\n if (glTFAnimation.samplers.length && glTFAnimation.channels.length) {\n idleGLTFAnimations.push(glTFAnimation);\n }\n }\n }\n }\n }\n }\n }\n /**\n * @ignore\n * Create node and morph animations from the animation groups\n * @param babylonScene\n * @param glTFAnimations\n * @param nodeMap\n * @param nodes\n * @param binaryWriter\n * @param bufferViews\n * @param accessors\n * @param animationSampleRate\n */\n static _CreateNodeAndMorphAnimationFromAnimationGroups(babylonScene, glTFAnimations, nodeMap, binaryWriter, bufferViews, accessors, animationSampleRate, shouldExportAnimation) {\n var _a;\n let glTFAnimation;\n if (babylonScene.animationGroups) {\n const animationGroups = babylonScene.animationGroups;\n for (const animationGroup of animationGroups) {\n const morphAnimations = new Map();\n const sampleAnimations = new Map();\n const morphAnimationMeshes = new Set();\n const animationGroupFrameDiff = animationGroup.to - animationGroup.from;\n glTFAnimation = {\n name: animationGroup.name,\n channels: [],\n samplers: [],\n };\n for (let i = 0; i < animationGroup.targetedAnimations.length; ++i) {\n const targetAnimation = animationGroup.targetedAnimations[i];\n const target = targetAnimation.target;\n const animation = targetAnimation.animation;\n if (shouldExportAnimation && !shouldExportAnimation(animation)) {\n continue;\n }\n if (this._IsTransformable(target) || (target.length === 1 && this._IsTransformable(target[0]))) {\n const animationInfo = _GLTFAnimation._DeduceAnimationInfo(targetAnimation.animation);\n if (animationInfo) {\n const babylonTransformNode = this._IsTransformable(target) ? target : this._IsTransformable(target[0]) ? target[0] : null;\n if (babylonTransformNode) {\n _GLTFAnimation._AddAnimation(`${animation.name}`, glTFAnimation, babylonTransformNode, animation, animationInfo.dataAccessorType, animationInfo.animationChannelTargetPath, nodeMap, binaryWriter, bufferViews, accessors, animationInfo.useQuaternion, animationSampleRate);\n }\n }\n }\n else if (target instanceof MorphTarget || (target.length === 1 && target[0] instanceof MorphTarget)) {\n const animationInfo = _GLTFAnimation._DeduceAnimationInfo(targetAnimation.animation);\n if (animationInfo) {\n const babylonMorphTarget = target instanceof MorphTarget ? target : target[0];\n if (babylonMorphTarget) {\n const babylonMorphTargetManager = babylonScene.morphTargetManagers.find((morphTargetManager) => {\n for (let j = 0; j < morphTargetManager.numTargets; ++j) {\n if (morphTargetManager.getTarget(j) === babylonMorphTarget) {\n return true;\n }\n }\n return false;\n });\n if (babylonMorphTargetManager) {\n const babylonMesh = babylonScene.meshes.find((mesh) => {\n return mesh.morphTargetManager === babylonMorphTargetManager;\n });\n if (babylonMesh) {\n if (!morphAnimations.has(babylonMesh)) {\n morphAnimations.set(babylonMesh, new Map());\n }\n (_a = morphAnimations.get(babylonMesh)) === null || _a === void 0 ? void 0 : _a.set(babylonMorphTarget, animation);\n morphAnimationMeshes.add(babylonMesh);\n sampleAnimations.set(babylonMesh, animation);\n }\n }\n }\n }\n }\n else {\n // this is the place for the KHR_animation_pointer.\n }\n }\n morphAnimationMeshes.forEach((mesh) => {\n const morphTargetManager = mesh.morphTargetManager;\n let combinedAnimationGroup = null;\n const animationKeys = [];\n const sampleAnimation = sampleAnimations.get(mesh);\n const sampleAnimationKeys = sampleAnimation.getKeys();\n const numAnimationKeys = sampleAnimationKeys.length;\n /*\n Due to how glTF expects morph target animation data to be formatted, we need to rearrange the individual morph target animation tracks,\n such that we have a single animation, where a given keyframe input value has successive output values for each morph target belonging to the manager.\n See: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#animations\n\n We do this via constructing a new Animation track, and interleaving the frames of each morph target animation track in the current Animation Group\n We reuse the Babylon Animation data structure for ease of handling export of cubic spline animation keys, and to reuse the\n existing _GLTFAnimation.AddAnimation codepath with minimal modification, however the constructed Babylon Animation is NOT intended for use in-engine.\n */\n for (let i = 0; i < numAnimationKeys; ++i) {\n for (let j = 0; j < morphTargetManager.numTargets; ++j) {\n const morphTarget = morphTargetManager.getTarget(j);\n const animationsByMorphTarget = morphAnimations.get(mesh);\n if (animationsByMorphTarget) {\n const morphTargetAnimation = animationsByMorphTarget.get(morphTarget);\n if (morphTargetAnimation) {\n if (!combinedAnimationGroup) {\n combinedAnimationGroup = new Animation(`${animationGroup.name}_${mesh.name}_MorphWeightAnimation`, \"influence\", morphTargetAnimation.framePerSecond, Animation.ANIMATIONTYPE_FLOAT, morphTargetAnimation.loopMode, morphTargetAnimation.enableBlending);\n }\n animationKeys.push(morphTargetAnimation.getKeys()[i]);\n }\n else {\n animationKeys.push({\n frame: animationGroup.from + (animationGroupFrameDiff / numAnimationKeys) * i,\n value: morphTarget.influence,\n inTangent: sampleAnimationKeys[0].inTangent ? 0 : undefined,\n outTangent: sampleAnimationKeys[0].outTangent ? 0 : undefined,\n });\n }\n }\n }\n }\n combinedAnimationGroup.setKeys(animationKeys);\n const animationInfo = _GLTFAnimation._DeduceAnimationInfo(combinedAnimationGroup);\n if (animationInfo) {\n _GLTFAnimation._AddAnimation(`${animationGroup.name}_${mesh.name}_MorphWeightAnimation`, glTFAnimation, mesh, combinedAnimationGroup, animationInfo.dataAccessorType, animationInfo.animationChannelTargetPath, nodeMap, binaryWriter, bufferViews, accessors, animationInfo.useQuaternion, animationSampleRate, morphTargetManager === null || morphTargetManager === void 0 ? void 0 : morphTargetManager.numTargets);\n }\n });\n if (glTFAnimation.channels.length && glTFAnimation.samplers.length) {\n glTFAnimations.push(glTFAnimation);\n }\n }\n }\n }\n static _AddAnimation(name, glTFAnimation, babylonTransformNode, animation, dataAccessorType, animationChannelTargetPath, nodeMap, binaryWriter, bufferViews, accessors, useQuaternion, animationSampleRate, morphAnimationChannels) {\n const animationData = _GLTFAnimation._CreateNodeAnimation(babylonTransformNode, animation, animationChannelTargetPath, useQuaternion, animationSampleRate);\n let bufferView;\n let accessor;\n let keyframeAccessorIndex;\n let dataAccessorIndex;\n let outputLength;\n let animationSampler;\n let animationChannel;\n if (animationData) {\n /*\n * Now that we have the glTF converted morph target animation data,\n * we can remove redundant input data so that we have n input frames,\n * and morphAnimationChannels * n output frames\n */\n if (morphAnimationChannels) {\n let index = 0;\n let currentInput = 0;\n const newInputs = [];\n while (animationData.inputs.length > 0) {\n currentInput = animationData.inputs.shift();\n if (index % morphAnimationChannels == 0) {\n newInputs.push(currentInput);\n }\n index++;\n }\n animationData.inputs = newInputs;\n }\n const nodeIndex = nodeMap[babylonTransformNode.uniqueId];\n // Creates buffer view and accessor for key frames.\n let byteLength = animationData.inputs.length * 4;\n bufferView = _GLTFUtilities._CreateBufferView(0, binaryWriter.getByteOffset(), byteLength, undefined, `${name} keyframe data view`);\n bufferViews.push(bufferView);\n animationData.inputs.forEach(function (input) {\n binaryWriter.setFloat32(input);\n });\n accessor = _GLTFUtilities._CreateAccessor(bufferViews.length - 1, `${name} keyframes`, \"SCALAR\" /* AccessorType.SCALAR */, 5126 /* AccessorComponentType.FLOAT */, animationData.inputs.length, null, [animationData.inputsMin], [animationData.inputsMax]);\n accessors.push(accessor);\n keyframeAccessorIndex = accessors.length - 1;\n // create bufferview and accessor for keyed values.\n outputLength = animationData.outputs.length;\n byteLength = _GLTFUtilities._GetDataAccessorElementCount(dataAccessorType) * 4 * animationData.outputs.length;\n // check for in and out tangents\n bufferView = _GLTFUtilities._CreateBufferView(0, binaryWriter.getByteOffset(), byteLength, undefined, `${name} data view`);\n bufferViews.push(bufferView);\n animationData.outputs.forEach(function (output) {\n output.forEach(function (entry) {\n binaryWriter.setFloat32(entry);\n });\n });\n accessor = _GLTFUtilities._CreateAccessor(bufferViews.length - 1, `${name} data`, dataAccessorType, 5126 /* AccessorComponentType.FLOAT */, outputLength, null, null, null);\n accessors.push(accessor);\n dataAccessorIndex = accessors.length - 1;\n // create sampler\n animationSampler = {\n interpolation: animationData.samplerInterpolation,\n input: keyframeAccessorIndex,\n output: dataAccessorIndex,\n };\n glTFAnimation.samplers.push(animationSampler);\n // create channel\n animationChannel = {\n sampler: glTFAnimation.samplers.length - 1,\n target: {\n node: nodeIndex,\n path: animationChannelTargetPath,\n },\n };\n glTFAnimation.channels.push(animationChannel);\n }\n }\n /**\n * Create a baked animation\n * @param babylonTransformNode BabylonJS mesh\n * @param animation BabylonJS animation corresponding to the BabylonJS mesh\n * @param animationChannelTargetPath animation target channel\n * @param minFrame minimum animation frame\n * @param maxFrame maximum animation frame\n * @param fps frames per second of the animation\n * @param sampleRate\n * @param inputs input key frames of the animation\n * @param outputs output key frame data of the animation\n * @param minMaxFrames\n * @param minMaxFrames.min\n * @param minMaxFrames.max\n * @param useQuaternion specifies if quaternions should be used\n */\n static _CreateBakedAnimation(babylonTransformNode, animation, animationChannelTargetPath, minFrame, maxFrame, fps, sampleRate, inputs, outputs, minMaxFrames, useQuaternion) {\n let value;\n const quaternionCache = Quaternion.Identity();\n let previousTime = null;\n let time;\n let maxUsedFrame = null;\n let currKeyFrame = null;\n let nextKeyFrame = null;\n let prevKeyFrame = null;\n let endFrame = null;\n minMaxFrames.min = Tools.FloatRound(minFrame / fps);\n const keyFrames = animation.getKeys();\n for (let i = 0, length = keyFrames.length; i < length; ++i) {\n endFrame = null;\n currKeyFrame = keyFrames[i];\n if (i + 1 < length) {\n nextKeyFrame = keyFrames[i + 1];\n if ((currKeyFrame.value.equals && currKeyFrame.value.equals(nextKeyFrame.value)) || currKeyFrame.value === nextKeyFrame.value) {\n if (i === 0) {\n // set the first frame to itself\n endFrame = currKeyFrame.frame;\n }\n else {\n continue;\n }\n }\n else {\n endFrame = nextKeyFrame.frame;\n }\n }\n else {\n // at the last key frame\n prevKeyFrame = keyFrames[i - 1];\n if ((currKeyFrame.value.equals && currKeyFrame.value.equals(prevKeyFrame.value)) || currKeyFrame.value === prevKeyFrame.value) {\n continue;\n }\n else {\n endFrame = maxFrame;\n }\n }\n if (endFrame) {\n for (let f = currKeyFrame.frame; f <= endFrame; f += sampleRate) {\n time = Tools.FloatRound(f / fps);\n if (time === previousTime) {\n continue;\n }\n previousTime = time;\n maxUsedFrame = time;\n const state = {\n key: 0,\n repeatCount: 0,\n loopMode: animation.loopMode,\n };\n value = animation._interpolate(f, state);\n _GLTFAnimation._SetInterpolatedValue(babylonTransformNode, value, time, animation, animationChannelTargetPath, quaternionCache, inputs, outputs, useQuaternion);\n }\n }\n }\n if (maxUsedFrame) {\n minMaxFrames.max = maxUsedFrame;\n }\n }\n static _ConvertFactorToVector3OrQuaternion(factor, babylonTransformNode, animation, animationChannelTargetPath, useQuaternion) {\n const basePositionRotationOrScale = _GLTFAnimation._GetBasePositionRotationOrScale(babylonTransformNode, animationChannelTargetPath, useQuaternion);\n // handles single component x, y, z or w component animation by using a base property and animating over a component.\n const property = animation.targetProperty.split(\".\");\n const componentName = property ? property[1] : \"\"; // x, y, z, or w component\n const value = useQuaternion ? Quaternion.FromArray(basePositionRotationOrScale).normalize() : Vector3.FromArray(basePositionRotationOrScale);\n switch (componentName) {\n case \"x\":\n case \"y\":\n case \"z\": {\n value[componentName] = factor;\n break;\n }\n case \"w\": {\n value.w = factor;\n break;\n }\n default: {\n Tools.Error(`glTFAnimation: Unsupported component name \"${componentName}\"!`);\n }\n }\n return value;\n }\n static _SetInterpolatedValue(babylonTransformNode, value, time, animation, animationChannelTargetPath, quaternionCache, inputs, outputs, useQuaternion) {\n let cacheValue;\n inputs.push(time);\n if (animationChannelTargetPath === \"weights\" /* AnimationChannelTargetPath.WEIGHTS */) {\n outputs.push([value]);\n return;\n }\n if (animation.dataType === Animation.ANIMATIONTYPE_FLOAT) {\n value = this._ConvertFactorToVector3OrQuaternion(value, babylonTransformNode, animation, animationChannelTargetPath, useQuaternion);\n }\n if (animationChannelTargetPath === \"rotation\" /* AnimationChannelTargetPath.ROTATION */) {\n if (useQuaternion) {\n quaternionCache = value;\n }\n else {\n cacheValue = value;\n Quaternion.RotationYawPitchRollToRef(cacheValue.y, cacheValue.x, cacheValue.z, quaternionCache);\n }\n outputs.push(quaternionCache.asArray());\n }\n else {\n // scaling and position animation\n cacheValue = value;\n outputs.push(cacheValue.asArray());\n }\n }\n /**\n * Creates linear animation from the animation key frames\n * @param babylonTransformNode BabylonJS mesh\n * @param animation BabylonJS animation\n * @param animationChannelTargetPath The target animation channel\n * @param inputs Array to store the key frame times\n * @param outputs Array to store the key frame data\n * @param useQuaternion Specifies if quaternions are used in the animation\n */\n static _CreateLinearOrStepAnimation(babylonTransformNode, animation, animationChannelTargetPath, inputs, outputs, useQuaternion) {\n for (const keyFrame of animation.getKeys()) {\n inputs.push(keyFrame.frame / animation.framePerSecond); // keyframes in seconds.\n _GLTFAnimation._AddKeyframeValue(keyFrame, animation, outputs, animationChannelTargetPath, babylonTransformNode, useQuaternion);\n }\n }\n /**\n * Creates cubic spline animation from the animation key frames\n * @param babylonTransformNode BabylonJS mesh\n * @param animation BabylonJS animation\n * @param animationChannelTargetPath The target animation channel\n * @param frameDelta The difference between the last and first frame of the animation\n * @param inputs Array to store the key frame times\n * @param outputs Array to store the key frame data\n * @param useQuaternion Specifies if quaternions are used in the animation\n */\n static _CreateCubicSplineAnimation(babylonTransformNode, animation, animationChannelTargetPath, inputs, outputs, useQuaternion) {\n animation.getKeys().forEach(function (keyFrame) {\n inputs.push(keyFrame.frame / animation.framePerSecond); // keyframes in seconds.\n _GLTFAnimation._AddSplineTangent(_TangentType.INTANGENT, outputs, animationChannelTargetPath, \"CUBICSPLINE\" /* AnimationSamplerInterpolation.CUBICSPLINE */, keyFrame, useQuaternion);\n _GLTFAnimation._AddKeyframeValue(keyFrame, animation, outputs, animationChannelTargetPath, babylonTransformNode, useQuaternion);\n _GLTFAnimation._AddSplineTangent(_TangentType.OUTTANGENT, outputs, animationChannelTargetPath, \"CUBICSPLINE\" /* AnimationSamplerInterpolation.CUBICSPLINE */, keyFrame, useQuaternion);\n });\n }\n static _GetBasePositionRotationOrScale(babylonTransformNode, animationChannelTargetPath, useQuaternion) {\n let basePositionRotationOrScale;\n if (animationChannelTargetPath === \"rotation\" /* AnimationChannelTargetPath.ROTATION */) {\n if (useQuaternion) {\n const q = babylonTransformNode.rotationQuaternion;\n basePositionRotationOrScale = (q !== null && q !== void 0 ? q : Quaternion.Identity()).asArray();\n }\n else {\n const r = babylonTransformNode.rotation;\n basePositionRotationOrScale = (r !== null && r !== void 0 ? r : Vector3.Zero()).asArray();\n }\n }\n else if (animationChannelTargetPath === \"translation\" /* AnimationChannelTargetPath.TRANSLATION */) {\n const p = babylonTransformNode.position;\n basePositionRotationOrScale = (p !== null && p !== void 0 ? p : Vector3.Zero()).asArray();\n }\n else {\n // scale\n const s = babylonTransformNode.scaling;\n basePositionRotationOrScale = (s !== null && s !== void 0 ? s : Vector3.One()).asArray();\n }\n return basePositionRotationOrScale;\n }\n /**\n * Adds a key frame value\n * @param keyFrame\n * @param animation\n * @param outputs\n * @param animationChannelTargetPath\n * @param babylonTransformNode\n * @param useQuaternion\n */\n static _AddKeyframeValue(keyFrame, animation, outputs, animationChannelTargetPath, babylonTransformNode, useQuaternion) {\n let newPositionRotationOrScale;\n const animationType = animation.dataType;\n if (animationType === Animation.ANIMATIONTYPE_VECTOR3) {\n let value = keyFrame.value.asArray();\n if (animationChannelTargetPath === \"rotation\" /* AnimationChannelTargetPath.ROTATION */) {\n const array = Vector3.FromArray(value);\n const rotationQuaternion = Quaternion.RotationYawPitchRoll(array.y, array.x, array.z);\n value = rotationQuaternion.asArray();\n }\n outputs.push(value); // scale vector.\n }\n else if (animationType === Animation.ANIMATIONTYPE_FLOAT) {\n if (animationChannelTargetPath === \"weights\" /* AnimationChannelTargetPath.WEIGHTS */) {\n outputs.push([keyFrame.value]);\n }\n else {\n // handles single component x, y, z or w component animation by using a base property and animating over a component.\n newPositionRotationOrScale = this._ConvertFactorToVector3OrQuaternion(keyFrame.value, babylonTransformNode, animation, animationChannelTargetPath, useQuaternion);\n if (newPositionRotationOrScale) {\n if (animationChannelTargetPath === \"rotation\" /* AnimationChannelTargetPath.ROTATION */) {\n const posRotScale = useQuaternion\n ? newPositionRotationOrScale\n : Quaternion.RotationYawPitchRoll(newPositionRotationOrScale.y, newPositionRotationOrScale.x, newPositionRotationOrScale.z).normalize();\n outputs.push(posRotScale.asArray());\n }\n outputs.push(newPositionRotationOrScale.asArray());\n }\n }\n }\n else if (animationType === Animation.ANIMATIONTYPE_QUATERNION) {\n outputs.push(keyFrame.value.normalize().asArray());\n }\n else {\n Tools.Error(\"glTFAnimation: Unsupported key frame values for animation!\");\n }\n }\n /**\n * Determine the interpolation based on the key frames\n * @param keyFrames\n * @param animationChannelTargetPath\n * @param useQuaternion\n */\n static _DeduceInterpolation(keyFrames, animationChannelTargetPath, useQuaternion) {\n let interpolationType;\n let shouldBakeAnimation = false;\n let key;\n if (animationChannelTargetPath === \"rotation\" /* AnimationChannelTargetPath.ROTATION */ && !useQuaternion) {\n return { interpolationType: \"LINEAR\" /* AnimationSamplerInterpolation.LINEAR */, shouldBakeAnimation: true };\n }\n for (let i = 0, length = keyFrames.length; i < length; ++i) {\n key = keyFrames[i];\n if (key.inTangent || key.outTangent) {\n if (interpolationType) {\n if (interpolationType !== \"CUBICSPLINE\" /* AnimationSamplerInterpolation.CUBICSPLINE */) {\n interpolationType = \"LINEAR\" /* AnimationSamplerInterpolation.LINEAR */;\n shouldBakeAnimation = true;\n break;\n }\n }\n else {\n interpolationType = \"CUBICSPLINE\" /* AnimationSamplerInterpolation.CUBICSPLINE */;\n }\n }\n else {\n if (interpolationType) {\n if (interpolationType === \"CUBICSPLINE\" /* AnimationSamplerInterpolation.CUBICSPLINE */ ||\n (key.interpolation && key.interpolation === AnimationKeyInterpolation.STEP && interpolationType !== \"STEP\" /* AnimationSamplerInterpolation.STEP */)) {\n interpolationType = \"LINEAR\" /* AnimationSamplerInterpolation.LINEAR */;\n shouldBakeAnimation = true;\n break;\n }\n }\n else {\n if (key.interpolation && key.interpolation === AnimationKeyInterpolation.STEP) {\n interpolationType = \"STEP\" /* AnimationSamplerInterpolation.STEP */;\n }\n else {\n interpolationType = \"LINEAR\" /* AnimationSamplerInterpolation.LINEAR */;\n }\n }\n }\n }\n if (!interpolationType) {\n interpolationType = \"LINEAR\" /* AnimationSamplerInterpolation.LINEAR */;\n }\n return { interpolationType: interpolationType, shouldBakeAnimation: shouldBakeAnimation };\n }\n /**\n * Adds an input tangent or output tangent to the output data\n * If an input tangent or output tangent is missing, it uses the zero vector or zero quaternion\n * @param babylonTransformNode\n * @param tangentType Specifies which type of tangent to handle (inTangent or outTangent)\n * @param outputs The animation data by keyframe\n * @param animationChannelTargetPath The target animation channel\n * @param interpolation The interpolation type\n * @param keyFrame The key frame with the animation data\n * @param frameDelta Time difference between two frames used to scale the tangent by the frame delta\n * @param useQuaternion Specifies if quaternions are used\n */\n static _AddSplineTangent(tangentType, outputs, animationChannelTargetPath, interpolation, keyFrame, useQuaternion) {\n let tangent;\n const tangentValue = tangentType === _TangentType.INTANGENT ? keyFrame.inTangent : keyFrame.outTangent;\n if (interpolation === \"CUBICSPLINE\" /* AnimationSamplerInterpolation.CUBICSPLINE */) {\n if (animationChannelTargetPath === \"rotation\" /* AnimationChannelTargetPath.ROTATION */) {\n if (tangentValue) {\n if (useQuaternion) {\n tangent = tangentValue.asArray();\n }\n else {\n const array = tangentValue;\n tangent = Quaternion.RotationYawPitchRoll(array.y, array.x, array.z).asArray();\n }\n }\n else {\n tangent = [0, 0, 0, 0];\n }\n }\n else if (animationChannelTargetPath === \"weights\" /* AnimationChannelTargetPath.WEIGHTS */) {\n if (tangentValue) {\n tangent = [tangentValue];\n }\n else {\n tangent = [0];\n }\n }\n else {\n if (tangentValue) {\n tangent = tangentValue.asArray();\n }\n else {\n tangent = [0, 0, 0];\n }\n }\n outputs.push(tangent);\n }\n }\n /**\n * Get the minimum and maximum key frames' frame values\n * @param keyFrames animation key frames\n * @returns the minimum and maximum key frame value\n */\n static _CalculateMinMaxKeyFrames(keyFrames) {\n let min = Infinity;\n let max = -Infinity;\n keyFrames.forEach(function (keyFrame) {\n min = Math.min(min, keyFrame.frame);\n max = Math.max(max, keyFrame.frame);\n });\n return { min: min, max: max };\n }\n}\n//# sourceMappingURL=glTFAnimation.js.map","import { Matrix, TmpVectors } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js\";\nimport { Vector2, Vector3, Vector4, Quaternion } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js\";\nimport { Color3, Color4 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js\";\nimport { Tools } from \"@inter-ikea-betrakta-babylonjs/core/Misc/tools.js\";\nimport { VertexBuffer } from \"@inter-ikea-betrakta-babylonjs/core/Buffers/buffer.js\";\nimport { TransformNode } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/transformNode.js\";\nimport { Mesh } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js\";\nimport { LinesMesh } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/linesMesh.js\";\nimport { InstancedMesh } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/instancedMesh.js\";\nimport { Material } from \"@inter-ikea-betrakta-babylonjs/core/Materials/material.js\";\nimport { Engine } from \"@inter-ikea-betrakta-babylonjs/core/Engines/engine.js\";\nimport { _GLTFMaterialExporter } from \"./glTFMaterialExporter.js\";\nimport { _GLTFUtilities } from \"./glTFUtilities.js\";\nimport { GLTFData } from \"./glTFData.js\";\nimport { _GLTFAnimation } from \"./glTFAnimation.js\";\nimport { Camera } from \"@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js\";\nimport { EngineStore } from \"@inter-ikea-betrakta-babylonjs/core/Engines/engineStore.js\";\nimport { MultiMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/multiMaterial.js\";\n// Matrix that converts handedness on the X-axis.\nconst convertHandednessMatrix = Matrix.Compose(new Vector3(-1, 1, 1), Quaternion.Identity(), Vector3.Zero());\nfunction isNoopNode(node, useRightHandedSystem) {\n if (!(node instanceof TransformNode)) {\n return false;\n }\n // Transform\n if (useRightHandedSystem) {\n const matrix = node.getWorldMatrix();\n if (!matrix.isIdentity()) {\n return false;\n }\n }\n else {\n const matrix = node.getWorldMatrix().multiplyToRef(convertHandednessMatrix, TmpVectors.Matrix[0]);\n if (!matrix.isIdentity()) {\n return false;\n }\n }\n // Geometry\n if ((node instanceof Mesh && node.geometry) || (node instanceof InstancedMesh && node.sourceMesh.geometry)) {\n return false;\n }\n return true;\n}\nfunction convertNodeHandedness(node) {\n const translation = Vector3.FromArrayToRef(node.translation || [0, 0, 0], 0, TmpVectors.Vector3[0]);\n const rotation = Quaternion.FromArrayToRef(node.rotation || [0, 0, 0, 1], 0, TmpVectors.Quaternion[0]);\n const scale = Vector3.FromArrayToRef(node.scale || [1, 1, 1], 0, TmpVectors.Vector3[1]);\n const matrix = Matrix.ComposeToRef(scale, rotation, translation, TmpVectors.Matrix[0]).multiplyToRef(convertHandednessMatrix, TmpVectors.Matrix[0]);\n matrix.decompose(scale, rotation, translation);\n if (translation.equalsToFloats(0, 0, 0)) {\n delete node.translation;\n }\n else {\n node.translation = translation.asArray();\n }\n if (Quaternion.IsIdentity(rotation)) {\n delete node.rotation;\n }\n else {\n node.rotation = rotation.asArray();\n }\n if (scale.equalsToFloats(1, 1, 1)) {\n delete node.scale;\n }\n else {\n node.scale = scale.asArray();\n }\n}\n/**\n * Converts Babylon Scene into glTF 2.0.\n * @internal\n */\nexport class _Exporter {\n _applyExtension(node, extensions, index, actionAsync) {\n if (index >= extensions.length) {\n return Promise.resolve(node);\n }\n const currentPromise = actionAsync(extensions[index], node);\n if (!currentPromise) {\n return this._applyExtension(node, extensions, index + 1, actionAsync);\n }\n return currentPromise.then((newNode) => this._applyExtension(newNode, extensions, index + 1, actionAsync));\n }\n _applyExtensions(node, actionAsync) {\n const extensions = [];\n for (const name of _Exporter._ExtensionNames) {\n extensions.push(this._extensions[name]);\n }\n return this._applyExtension(node, extensions, 0, actionAsync);\n }\n _extensionsPreExportTextureAsync(context, babylonTexture, mimeType) {\n return this._applyExtensions(babylonTexture, (extension, node) => extension.preExportTextureAsync && extension.preExportTextureAsync(context, node, mimeType));\n }\n _extensionsPostExportMeshPrimitiveAsync(context, meshPrimitive, babylonSubMesh, binaryWriter) {\n return this._applyExtensions(meshPrimitive, (extension, node) => extension.postExportMeshPrimitiveAsync && extension.postExportMeshPrimitiveAsync(context, node, babylonSubMesh, binaryWriter));\n }\n _extensionsPostExportNodeAsync(context, node, babylonNode, nodeMap, binaryWriter) {\n return this._applyExtensions(node, (extension, node) => extension.postExportNodeAsync && extension.postExportNodeAsync(context, node, babylonNode, nodeMap, binaryWriter));\n }\n _extensionsPostExportMaterialAsync(context, material, babylonMaterial) {\n return this._applyExtensions(material, (extension, node) => extension.postExportMaterialAsync && extension.postExportMaterialAsync(context, node, babylonMaterial));\n }\n _extensionsPostExportMaterialAdditionalTextures(context, material, babylonMaterial) {\n const output = [];\n for (const name of _Exporter._ExtensionNames) {\n const extension = this._extensions[name];\n if (extension.postExportMaterialAdditionalTextures) {\n output.push(...extension.postExportMaterialAdditionalTextures(context, material, babylonMaterial));\n }\n }\n return output;\n }\n _extensionsPostExportTextures(context, textureInfo, babylonTexture) {\n for (const name of _Exporter._ExtensionNames) {\n const extension = this._extensions[name];\n if (extension.postExportTexture) {\n extension.postExportTexture(context, textureInfo, babylonTexture);\n }\n }\n }\n _forEachExtensions(action) {\n for (const name of _Exporter._ExtensionNames) {\n const extension = this._extensions[name];\n if (extension.enabled) {\n action(extension);\n }\n }\n }\n _extensionsOnExporting() {\n this._forEachExtensions((extension) => {\n if (extension.wasUsed) {\n if (this._glTF.extensionsUsed == null) {\n this._glTF.extensionsUsed = [];\n }\n if (this._glTF.extensionsUsed.indexOf(extension.name) === -1) {\n this._glTF.extensionsUsed.push(extension.name);\n }\n if (extension.required) {\n if (this._glTF.extensionsRequired == null) {\n this._glTF.extensionsRequired = [];\n }\n if (this._glTF.extensionsRequired.indexOf(extension.name) === -1) {\n this._glTF.extensionsRequired.push(extension.name);\n }\n }\n if (this._glTF.extensions == null) {\n this._glTF.extensions = {};\n }\n if (extension.onExporting) {\n extension.onExporting();\n }\n }\n });\n }\n /**\n * Load glTF serializer extensions\n */\n _loadExtensions() {\n for (const name of _Exporter._ExtensionNames) {\n const extension = _Exporter._ExtensionFactories[name](this);\n this._extensions[name] = extension;\n }\n }\n /**\n * Creates a glTF Exporter instance, which can accept optional exporter options\n * @param babylonScene Babylon scene object\n * @param options Options to modify the behavior of the exporter\n */\n constructor(babylonScene, options) {\n this._extensions = {};\n this._glTF = {\n asset: { generator: `Babylon.js v${Engine.Version}`, version: \"2.0\" },\n };\n babylonScene = babylonScene || EngineStore.LastCreatedScene;\n if (!babylonScene) {\n return;\n }\n this._babylonScene = babylonScene;\n this._bufferViews = [];\n this._accessors = [];\n this._meshes = [];\n this._scenes = [];\n this._cameras = [];\n this._nodes = [];\n this._images = [];\n this._materials = [];\n this._materialMap = [];\n this._textures = [];\n this._samplers = [];\n this._skins = [];\n this._animations = [];\n this._imageData = {};\n this._orderedImageData = [];\n this._options = options || {};\n this._animationSampleRate = this._options.animationSampleRate || 1 / 60;\n this._glTFMaterialExporter = new _GLTFMaterialExporter(this);\n this._loadExtensions();\n }\n dispose() {\n for (const extensionKey in this._extensions) {\n const extension = this._extensions[extensionKey];\n extension.dispose();\n }\n }\n get options() {\n return this._options;\n }\n /**\n * Registers a glTF exporter extension\n * @param name Name of the extension to export\n * @param factory The factory function that creates the exporter extension\n */\n static RegisterExtension(name, factory) {\n if (_Exporter.UnregisterExtension(name)) {\n Tools.Warn(`Extension with the name ${name} already exists`);\n }\n _Exporter._ExtensionFactories[name] = factory;\n _Exporter._ExtensionNames.push(name);\n }\n /**\n * Un-registers an exporter extension\n * @param name The name fo the exporter extension\n * @returns A boolean indicating whether the extension has been un-registered\n */\n static UnregisterExtension(name) {\n if (!_Exporter._ExtensionFactories[name]) {\n return false;\n }\n delete _Exporter._ExtensionFactories[name];\n const index = _Exporter._ExtensionNames.indexOf(name);\n if (index !== -1) {\n _Exporter._ExtensionNames.splice(index, 1);\n }\n return true;\n }\n _reorderIndicesBasedOnPrimitiveMode(submesh, primitiveMode, babylonIndices, byteOffset, binaryWriter) {\n switch (primitiveMode) {\n case Material.TriangleFillMode: {\n if (!byteOffset) {\n byteOffset = 0;\n }\n for (let i = submesh.indexStart, length = submesh.indexStart + submesh.indexCount; i < length; i = i + 3) {\n const index = byteOffset + i * 4;\n // swap the second and third indices\n const secondIndex = binaryWriter.getUInt32(index + 4);\n const thirdIndex = binaryWriter.getUInt32(index + 8);\n binaryWriter.setUInt32(thirdIndex, index + 4);\n binaryWriter.setUInt32(secondIndex, index + 8);\n }\n break;\n }\n case Material.TriangleFanDrawMode: {\n for (let i = submesh.indexStart + submesh.indexCount - 1, start = submesh.indexStart; i >= start; --i) {\n binaryWriter.setUInt32(babylonIndices[i], byteOffset);\n byteOffset += 4;\n }\n break;\n }\n case Material.TriangleStripDrawMode: {\n if (submesh.indexCount >= 3) {\n binaryWriter.setUInt32(babylonIndices[submesh.indexStart + 2], byteOffset + 4);\n binaryWriter.setUInt32(babylonIndices[submesh.indexStart + 1], byteOffset + 8);\n }\n break;\n }\n }\n }\n /**\n * Reorders the vertex attribute data based on the primitive mode. This is necessary when indices are not available and the winding order is\n * clock-wise during export to glTF\n * @param submesh BabylonJS submesh\n * @param primitiveMode Primitive mode of the mesh\n * @param vertexBufferKind The type of vertex attribute\n * @param meshAttributeArray The vertex attribute data\n * @param byteOffset The offset to the binary data\n * @param binaryWriter The binary data for the glTF file\n */\n _reorderVertexAttributeDataBasedOnPrimitiveMode(submesh, primitiveMode, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter) {\n switch (primitiveMode) {\n case Material.TriangleFillMode: {\n this._reorderTriangleFillMode(submesh, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);\n break;\n }\n case Material.TriangleStripDrawMode: {\n this._reorderTriangleStripDrawMode(submesh, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);\n break;\n }\n case Material.TriangleFanDrawMode: {\n this._reorderTriangleFanMode(submesh, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter);\n break;\n }\n }\n }\n /**\n * Reorders the vertex attributes in the correct triangle mode order . This is necessary when indices are not available and the winding order is\n * clock-wise during export to glTF\n * @param submesh BabylonJS submesh\n * @param vertexBufferKind The type of vertex attribute\n * @param meshAttributeArray The vertex attribute data\n * @param byteOffset The offset to the binary data\n * @param binaryWriter The binary data for the glTF file\n */\n _reorderTriangleFillMode(submesh, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter) {\n const vertexBuffer = this._getVertexBufferFromMesh(vertexBufferKind, submesh.getMesh());\n if (vertexBuffer) {\n const stride = vertexBuffer.byteStride / VertexBuffer.GetTypeByteLength(vertexBuffer.type);\n if (submesh.verticesCount % 3 !== 0) {\n Tools.Error(\"The submesh vertices for the triangle fill mode is not divisible by 3!\");\n }\n else {\n const vertexData = [];\n let index = 0;\n switch (vertexBufferKind) {\n case VertexBuffer.PositionKind:\n case VertexBuffer.NormalKind: {\n for (let x = submesh.verticesStart; x < submesh.verticesStart + submesh.verticesCount; x = x + 3) {\n index = x * stride;\n vertexData.push(Vector3.FromArray(meshAttributeArray, index));\n vertexData.push(Vector3.FromArray(meshAttributeArray, index + 2 * stride));\n vertexData.push(Vector3.FromArray(meshAttributeArray, index + stride));\n }\n break;\n }\n case VertexBuffer.TangentKind: {\n for (let x = submesh.verticesStart; x < submesh.verticesStart + submesh.verticesCount; x = x + 3) {\n index = x * stride;\n vertexData.push(Vector4.FromArray(meshAttributeArray, index));\n vertexData.push(Vector4.FromArray(meshAttributeArray, index + 2 * stride));\n vertexData.push(Vector4.FromArray(meshAttributeArray, index + stride));\n }\n break;\n }\n case VertexBuffer.ColorKind: {\n const size = vertexBuffer.getSize();\n for (let x = submesh.verticesStart; x < submesh.verticesStart + submesh.verticesCount; x = x + size) {\n index = x * stride;\n if (size === 4) {\n vertexData.push(Vector4.FromArray(meshAttributeArray, index));\n vertexData.push(Vector4.FromArray(meshAttributeArray, index + 2 * stride));\n vertexData.push(Vector4.FromArray(meshAttributeArray, index + stride));\n }\n else {\n vertexData.push(Vector3.FromArray(meshAttributeArray, index));\n vertexData.push(Vector3.FromArray(meshAttributeArray, index + 2 * stride));\n vertexData.push(Vector3.FromArray(meshAttributeArray, index + stride));\n }\n }\n break;\n }\n case VertexBuffer.UVKind:\n case VertexBuffer.UV2Kind: {\n for (let x = submesh.verticesStart; x < submesh.verticesStart + submesh.verticesCount; x = x + 3) {\n index = x * stride;\n vertexData.push(Vector2.FromArray(meshAttributeArray, index));\n vertexData.push(Vector2.FromArray(meshAttributeArray, index + 2 * stride));\n vertexData.push(Vector2.FromArray(meshAttributeArray, index + stride));\n }\n break;\n }\n default: {\n Tools.Error(`Unsupported Vertex Buffer type: ${vertexBufferKind}`);\n }\n }\n this._writeVertexAttributeData(vertexData, byteOffset, vertexBufferKind, binaryWriter);\n }\n }\n else {\n Tools.Warn(`reorderTriangleFillMode: Vertex Buffer Kind ${vertexBufferKind} not present!`);\n }\n }\n /**\n * Reorders the vertex attributes in the correct triangle strip order. This is necessary when indices are not available and the winding order is\n * clock-wise during export to glTF\n * @param submesh BabylonJS submesh\n * @param vertexBufferKind The type of vertex attribute\n * @param meshAttributeArray The vertex attribute data\n * @param byteOffset The offset to the binary data\n * @param binaryWriter The binary data for the glTF file\n */\n _reorderTriangleStripDrawMode(submesh, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter) {\n const vertexBuffer = this._getVertexBufferFromMesh(vertexBufferKind, submesh.getMesh());\n if (vertexBuffer) {\n const stride = vertexBuffer.byteStride / VertexBuffer.GetTypeByteLength(vertexBuffer.type);\n const vertexData = [];\n let index = 0;\n switch (vertexBufferKind) {\n case VertexBuffer.PositionKind:\n case VertexBuffer.NormalKind: {\n index = submesh.verticesStart;\n vertexData.push(Vector3.FromArray(meshAttributeArray, index + 2 * stride));\n vertexData.push(Vector3.FromArray(meshAttributeArray, index + stride));\n break;\n }\n case VertexBuffer.TangentKind: {\n for (let x = submesh.verticesStart + submesh.verticesCount - 1; x >= submesh.verticesStart; --x) {\n index = x * stride;\n vertexData.push(Vector4.FromArray(meshAttributeArray, index));\n }\n break;\n }\n case VertexBuffer.ColorKind: {\n for (let x = submesh.verticesStart + submesh.verticesCount - 1; x >= submesh.verticesStart; --x) {\n index = x * stride;\n vertexBuffer.getSize() === 4\n ? vertexData.push(Vector4.FromArray(meshAttributeArray, index))\n : vertexData.push(Vector3.FromArray(meshAttributeArray, index));\n }\n break;\n }\n case VertexBuffer.UVKind:\n case VertexBuffer.UV2Kind: {\n for (let x = submesh.verticesStart + submesh.verticesCount - 1; x >= submesh.verticesStart; --x) {\n index = x * stride;\n vertexData.push(Vector2.FromArray(meshAttributeArray, index));\n }\n break;\n }\n default: {\n Tools.Error(`Unsupported Vertex Buffer type: ${vertexBufferKind}`);\n }\n }\n this._writeVertexAttributeData(vertexData, byteOffset + 12, vertexBufferKind, binaryWriter);\n }\n else {\n Tools.Warn(`reorderTriangleStripDrawMode: Vertex buffer kind ${vertexBufferKind} not present!`);\n }\n }\n /**\n * Reorders the vertex attributes in the correct triangle fan order. This is necessary when indices are not available and the winding order is\n * clock-wise during export to glTF\n * @param submesh BabylonJS submesh\n * @param vertexBufferKind The type of vertex attribute\n * @param meshAttributeArray The vertex attribute data\n * @param byteOffset The offset to the binary data\n * @param binaryWriter The binary data for the glTF file\n */\n _reorderTriangleFanMode(submesh, vertexBufferKind, meshAttributeArray, byteOffset, binaryWriter) {\n const vertexBuffer = this._getVertexBufferFromMesh(vertexBufferKind, submesh.getMesh());\n if (vertexBuffer) {\n const stride = vertexBuffer.byteStride / VertexBuffer.GetTypeByteLength(vertexBuffer.type);\n const vertexData = [];\n let index = 0;\n switch (vertexBufferKind) {\n case VertexBuffer.PositionKind:\n case VertexBuffer.NormalKind: {\n for (let x = submesh.verticesStart + submesh.verticesCount - 1; x >= submesh.verticesStart; --x) {\n index = x * stride;\n vertexData.push(Vector3.FromArray(meshAttributeArray, index));\n }\n break;\n }\n case VertexBuffer.TangentKind: {\n for (let x = submesh.verticesStart + submesh.verticesCount - 1; x >= submesh.verticesStart; --x) {\n index = x * stride;\n vertexData.push(Vector4.FromArray(meshAttributeArray, index));\n }\n break;\n }\n case VertexBuffer.ColorKind: {\n for (let x = submesh.verticesStart + submesh.verticesCount - 1; x >= submesh.verticesStart; --x) {\n index = x * stride;\n vertexData.push(Vector4.FromArray(meshAttributeArray, index));\n vertexBuffer.getSize() === 4\n ? vertexData.push(Vector4.FromArray(meshAttributeArray, index))\n : vertexData.push(Vector3.FromArray(meshAttributeArray, index));\n }\n break;\n }\n case VertexBuffer.UVKind:\n case VertexBuffer.UV2Kind: {\n for (let x = submesh.verticesStart + submesh.verticesCount - 1; x >= submesh.verticesStart; --x) {\n index = x * stride;\n vertexData.push(Vector2.FromArray(meshAttributeArray, index));\n }\n break;\n }\n default: {\n Tools.Error(`Unsupported Vertex Buffer type: ${vertexBufferKind}`);\n }\n }\n this._writeVertexAttributeData(vertexData, byteOffset, vertexBufferKind, binaryWriter);\n }\n else {\n Tools.Warn(`reorderTriangleFanMode: Vertex buffer kind ${vertexBufferKind} not present!`);\n }\n }\n /**\n * Writes the vertex attribute data to binary\n * @param vertices The vertices to write to the binary writer\n * @param byteOffset The offset into the binary writer to overwrite binary data\n * @param vertexAttributeKind The vertex attribute type\n * @param binaryWriter The writer containing the binary data\n */\n _writeVertexAttributeData(vertices, byteOffset, vertexAttributeKind, binaryWriter) {\n for (const vertex of vertices) {\n if (vertexAttributeKind === VertexBuffer.NormalKind) {\n vertex.normalize();\n }\n else if (vertexAttributeKind === VertexBuffer.TangentKind && vertex instanceof Vector4) {\n _GLTFUtilities._NormalizeTangentFromRef(vertex);\n }\n for (const component of vertex.asArray()) {\n binaryWriter.setFloat32(component, byteOffset);\n byteOffset += 4;\n }\n }\n }\n /**\n * Writes mesh attribute data to a data buffer\n * Returns the bytelength of the data\n * @param vertexBufferKind Indicates what kind of vertex data is being passed in\n * @param attributeComponentKind\n * @param meshAttributeArray Array containing the attribute data\n * @param stride Specifies the space between data\n * @param binaryWriter The buffer to write the binary data to\n * @param babylonTransformNode\n */\n _writeAttributeData(vertexBufferKind, attributeComponentKind, meshAttributeArray, stride, binaryWriter, babylonTransformNode) {\n let vertexAttributes = [];\n let index;\n switch (vertexBufferKind) {\n case VertexBuffer.PositionKind: {\n for (let k = 0, length = meshAttributeArray.length / stride; k < length; ++k) {\n index = k * stride;\n const vertexData = Vector3.FromArray(meshAttributeArray, index);\n vertexAttributes.push(vertexData.asArray());\n }\n break;\n }\n case VertexBuffer.NormalKind: {\n for (let k = 0, length = meshAttributeArray.length / stride; k < length; ++k) {\n index = k * stride;\n const vertexData = Vector3.FromArray(meshAttributeArray, index);\n vertexAttributes.push(vertexData.normalize().asArray());\n }\n break;\n }\n case VertexBuffer.TangentKind: {\n for (let k = 0, length = meshAttributeArray.length / stride; k < length; ++k) {\n index = k * stride;\n const vertexData = Vector4.FromArray(meshAttributeArray, index);\n _GLTFUtilities._NormalizeTangentFromRef(vertexData);\n vertexAttributes.push(vertexData.asArray());\n }\n break;\n }\n case VertexBuffer.ColorKind: {\n const meshMaterial = babylonTransformNode.material;\n const convertToLinear = meshMaterial ? meshMaterial.getClassName() === \"StandardMaterial\" : true;\n const vertexData = stride === 3 ? new Color3() : new Color4();\n const useExactSrgbConversions = this._babylonScene.getEngine().useExactSrgbConversions;\n for (let k = 0, length = meshAttributeArray.length / stride; k < length; ++k) {\n index = k * stride;\n if (stride === 3) {\n Color3.FromArrayToRef(meshAttributeArray, index, vertexData);\n if (convertToLinear) {\n vertexData.toLinearSpaceToRef(vertexData, useExactSrgbConversions);\n }\n }\n else {\n Color4.FromArrayToRef(meshAttributeArray, index, vertexData);\n if (convertToLinear) {\n vertexData.toLinearSpaceToRef(vertexData, useExactSrgbConversions);\n }\n }\n vertexAttributes.push(vertexData.asArray());\n }\n break;\n }\n case VertexBuffer.UVKind:\n case VertexBuffer.UV2Kind: {\n for (let k = 0, length = meshAttributeArray.length / stride; k < length; ++k) {\n index = k * stride;\n const vertexData = Vector2.FromArray(meshAttributeArray, index);\n vertexAttributes.push(vertexData.asArray());\n }\n break;\n }\n case VertexBuffer.MatricesIndicesKind:\n case VertexBuffer.MatricesIndicesExtraKind: {\n for (let k = 0, length = meshAttributeArray.length / stride; k < length; ++k) {\n index = k * stride;\n const vertexData = Vector4.FromArray(meshAttributeArray, index);\n vertexAttributes.push(vertexData.asArray());\n }\n break;\n }\n case VertexBuffer.MatricesWeightsKind:\n case VertexBuffer.MatricesWeightsExtraKind: {\n for (let k = 0, length = meshAttributeArray.length / stride; k < length; ++k) {\n index = k * stride;\n const vertexData = Vector4.FromArray(meshAttributeArray, index);\n vertexAttributes.push(vertexData.asArray());\n }\n break;\n }\n default: {\n Tools.Warn(\"Unsupported Vertex Buffer Type: \" + vertexBufferKind);\n vertexAttributes = [];\n }\n }\n let writeBinaryFunc;\n switch (attributeComponentKind) {\n case 5121 /* AccessorComponentType.UNSIGNED_BYTE */: {\n writeBinaryFunc = binaryWriter.setUInt8.bind(binaryWriter);\n break;\n }\n case 5123 /* AccessorComponentType.UNSIGNED_SHORT */: {\n writeBinaryFunc = binaryWriter.setUInt16.bind(binaryWriter);\n break;\n }\n case 5125 /* AccessorComponentType.UNSIGNED_INT */: {\n writeBinaryFunc = binaryWriter.setUInt32.bind(binaryWriter);\n break;\n }\n case 5126 /* AccessorComponentType.FLOAT */: {\n writeBinaryFunc = binaryWriter.setFloat32.bind(binaryWriter);\n break;\n }\n default: {\n Tools.Warn(\"Unsupported Attribute Component kind: \" + attributeComponentKind);\n return;\n }\n }\n for (const vertexAttribute of vertexAttributes) {\n for (const component of vertexAttribute) {\n writeBinaryFunc(component);\n }\n }\n }\n /**\n * Writes mesh attribute data to a data buffer\n * Returns the bytelength of the data\n * @param vertexBufferKind Indicates what kind of vertex data is being passed in\n * @param attributeComponentKind\n * @param meshPrimitive\n * @param morphTarget\n * @param meshAttributeArray Array containing the attribute data\n * @param morphTargetAttributeArray\n * @param stride Specifies the space between data\n * @param binaryWriter The buffer to write the binary data to\n * @param minMax\n */\n writeMorphTargetAttributeData(vertexBufferKind, attributeComponentKind, meshPrimitive, meshAttributeArray, morphTargetAttributeArray, stride, binaryWriter, minMax) {\n let vertexAttributes = [];\n let index;\n let difference = new Vector3();\n let difference4 = new Vector4(0, 0, 0, 0);\n switch (vertexBufferKind) {\n case VertexBuffer.PositionKind: {\n for (let k = meshPrimitive.verticesStart; k < meshPrimitive.verticesCount; ++k) {\n index = meshPrimitive.indexStart + k * stride;\n const vertexData = Vector3.FromArray(meshAttributeArray, index);\n const morphData = Vector3.FromArray(morphTargetAttributeArray, index);\n difference = morphData.subtractToRef(vertexData, difference);\n if (minMax) {\n minMax.min.copyFromFloats(Math.min(difference.x, minMax.min.x), Math.min(difference.y, minMax.min.y), Math.min(difference.z, minMax.min.z));\n minMax.max.copyFromFloats(Math.max(difference.x, minMax.max.x), Math.max(difference.y, minMax.max.y), Math.max(difference.z, minMax.max.z));\n }\n vertexAttributes.push(difference.asArray());\n }\n break;\n }\n case VertexBuffer.NormalKind: {\n for (let k = meshPrimitive.verticesStart; k < meshPrimitive.verticesCount; ++k) {\n index = meshPrimitive.indexStart + k * stride;\n const vertexData = Vector3.FromArray(meshAttributeArray, index).normalize();\n const morphData = Vector3.FromArray(morphTargetAttributeArray, index).normalize();\n difference = morphData.subtractToRef(vertexData, difference);\n vertexAttributes.push(difference.asArray());\n }\n break;\n }\n case VertexBuffer.TangentKind: {\n for (let k = meshPrimitive.verticesStart; k < meshPrimitive.verticesCount; ++k) {\n index = meshPrimitive.indexStart + k * (stride + 1);\n const vertexData = Vector4.FromArray(meshAttributeArray, index);\n _GLTFUtilities._NormalizeTangentFromRef(vertexData);\n const morphData = Vector4.FromArray(morphTargetAttributeArray, index);\n _GLTFUtilities._NormalizeTangentFromRef(morphData);\n difference4 = morphData.subtractToRef(vertexData, difference4);\n vertexAttributes.push([difference4.x, difference4.y, difference4.z]);\n }\n break;\n }\n default: {\n Tools.Warn(\"Unsupported Vertex Buffer Type: \" + vertexBufferKind);\n vertexAttributes = [];\n }\n }\n let writeBinaryFunc;\n switch (attributeComponentKind) {\n case 5121 /* AccessorComponentType.UNSIGNED_BYTE */: {\n writeBinaryFunc = binaryWriter.setUInt8.bind(binaryWriter);\n break;\n }\n case 5123 /* AccessorComponentType.UNSIGNED_SHORT */: {\n writeBinaryFunc = binaryWriter.setUInt16.bind(binaryWriter);\n break;\n }\n case 5125 /* AccessorComponentType.UNSIGNED_INT */: {\n writeBinaryFunc = binaryWriter.setUInt32.bind(binaryWriter);\n break;\n }\n case 5126 /* AccessorComponentType.FLOAT */: {\n writeBinaryFunc = binaryWriter.setFloat32.bind(binaryWriter);\n break;\n }\n default: {\n Tools.Warn(\"Unsupported Attribute Component kind: \" + attributeComponentKind);\n return;\n }\n }\n for (const vertexAttribute of vertexAttributes) {\n for (const component of vertexAttribute) {\n writeBinaryFunc(component);\n }\n }\n }\n /**\n * Generates glTF json data\n * @param shouldUseGlb Indicates whether the json should be written for a glb file\n * @param glTFPrefix Text to use when prefixing a glTF file\n * @param prettyPrint Indicates whether the json file should be pretty printed (true) or not (false)\n * @returns json data as string\n */\n _generateJSON(shouldUseGlb, glTFPrefix, prettyPrint) {\n const buffer = { byteLength: this._totalByteLength };\n let imageName;\n let imageData;\n let bufferView;\n let byteOffset = this._totalByteLength;\n if (buffer.byteLength) {\n this._glTF.buffers = [buffer];\n }\n if (this._nodes && this._nodes.length) {\n this._glTF.nodes = this._nodes;\n }\n if (this._meshes && this._meshes.length) {\n this._glTF.meshes = this._meshes;\n }\n if (this._scenes && this._scenes.length) {\n this._glTF.scenes = this._scenes;\n this._glTF.scene = 0;\n }\n if (this._cameras && this._cameras.length) {\n this._glTF.cameras = this._cameras;\n }\n if (this._bufferViews && this._bufferViews.length) {\n this._glTF.bufferViews = this._bufferViews;\n }\n if (this._accessors && this._accessors.length) {\n this._glTF.accessors = this._accessors;\n }\n if (this._animations && this._animations.length) {\n this._glTF.animations = this._animations;\n }\n if (this._materials && this._materials.length) {\n this._glTF.materials = this._materials;\n }\n if (this._textures && this._textures.length) {\n this._glTF.textures = this._textures;\n }\n if (this._samplers && this._samplers.length) {\n this._glTF.samplers = this._samplers;\n }\n if (this._skins && this._skins.length) {\n this._glTF.skins = this._skins;\n }\n if (this._images && this._images.length) {\n if (!shouldUseGlb) {\n this._glTF.images = this._images;\n }\n else {\n this._glTF.images = [];\n this._images.forEach((image) => {\n if (image.uri) {\n imageData = this._imageData[image.uri];\n this._orderedImageData.push(imageData);\n imageName = image.uri.split(\".\")[0] + \" image\";\n bufferView = _GLTFUtilities._CreateBufferView(0, byteOffset, imageData.data.byteLength, undefined, imageName);\n byteOffset += imageData.data.byteLength;\n this._bufferViews.push(bufferView);\n image.bufferView = this._bufferViews.length - 1;\n image.name = imageName;\n image.mimeType = imageData.mimeType;\n image.uri = undefined;\n if (!this._glTF.images) {\n this._glTF.images = [];\n }\n this._glTF.images.push(image);\n }\n });\n // Replace uri with bufferview and mime type for glb\n buffer.byteLength = byteOffset;\n }\n }\n if (!shouldUseGlb) {\n buffer.uri = glTFPrefix + \".bin\";\n }\n const jsonText = prettyPrint ? JSON.stringify(this._glTF, null, 2) : JSON.stringify(this._glTF);\n return jsonText;\n }\n /**\n * Generates data for .gltf and .bin files based on the glTF prefix string\n * @param glTFPrefix Text to use when prefixing a glTF file\n * @param dispose Dispose the exporter\n * @returns GLTFData with glTF file data\n */\n _generateGLTFAsync(glTFPrefix, dispose = true) {\n return this._generateBinaryAsync().then((binaryBuffer) => {\n this._extensionsOnExporting();\n const jsonText = this._generateJSON(false, glTFPrefix, true);\n const bin = new Blob([binaryBuffer], { type: \"application/octet-stream\" });\n const glTFFileName = glTFPrefix + \".gltf\";\n const glTFBinFile = glTFPrefix + \".bin\";\n const container = new GLTFData();\n container.glTFFiles[glTFFileName] = jsonText;\n container.glTFFiles[glTFBinFile] = bin;\n if (this._imageData) {\n for (const image in this._imageData) {\n container.glTFFiles[image] = new Blob([this._imageData[image].data], { type: this._imageData[image].mimeType });\n }\n }\n if (dispose) {\n this.dispose();\n }\n return container;\n });\n }\n /**\n * Creates a binary buffer for glTF\n * @returns array buffer for binary data\n */\n _generateBinaryAsync() {\n const binaryWriter = new _BinaryWriter(4);\n return this._createSceneAsync(binaryWriter).then(() => {\n if (this._localEngine) {\n this._localEngine.dispose();\n }\n return binaryWriter.getArrayBuffer();\n });\n }\n /**\n * Pads the number to a multiple of 4\n * @param num number to pad\n * @returns padded number\n */\n _getPadding(num) {\n const remainder = num % 4;\n const padding = remainder === 0 ? remainder : 4 - remainder;\n return padding;\n }\n /**\n * @internal\n */\n _generateGLBAsync(glTFPrefix, dispose = true) {\n return this._generateBinaryAsync().then((binaryBuffer) => {\n this._extensionsOnExporting();\n const jsonText = this._generateJSON(true);\n const glbFileName = glTFPrefix + \".glb\";\n const headerLength = 12;\n const chunkLengthPrefix = 8;\n let jsonLength = jsonText.length;\n let encodedJsonText;\n let imageByteLength = 0;\n // make use of TextEncoder when available\n if (typeof TextEncoder !== \"undefined\") {\n const encoder = new TextEncoder();\n encodedJsonText = encoder.encode(jsonText);\n jsonLength = encodedJsonText.length;\n }\n for (let i = 0; i < this._orderedImageData.length; ++i) {\n imageByteLength += this._orderedImageData[i].data.byteLength;\n }\n const jsonPadding = this._getPadding(jsonLength);\n const binPadding = this._getPadding(binaryBuffer.byteLength);\n const imagePadding = this._getPadding(imageByteLength);\n const byteLength = headerLength + 2 * chunkLengthPrefix + jsonLength + jsonPadding + binaryBuffer.byteLength + binPadding + imageByteLength + imagePadding;\n //header\n const headerBuffer = new ArrayBuffer(headerLength);\n const headerBufferView = new DataView(headerBuffer);\n headerBufferView.setUint32(0, 0x46546c67, true); //glTF\n headerBufferView.setUint32(4, 2, true); // version\n headerBufferView.setUint32(8, byteLength, true); // total bytes in file\n //json chunk\n const jsonChunkBuffer = new ArrayBuffer(chunkLengthPrefix + jsonLength + jsonPadding);\n const jsonChunkBufferView = new DataView(jsonChunkBuffer);\n jsonChunkBufferView.setUint32(0, jsonLength + jsonPadding, true);\n jsonChunkBufferView.setUint32(4, 0x4e4f534a, true);\n //json chunk bytes\n const jsonData = new Uint8Array(jsonChunkBuffer, chunkLengthPrefix);\n // if TextEncoder was available, we can simply copy the encoded array\n if (encodedJsonText) {\n jsonData.set(encodedJsonText);\n }\n else {\n const blankCharCode = \"_\".charCodeAt(0);\n for (let i = 0; i < jsonLength; ++i) {\n const charCode = jsonText.charCodeAt(i);\n // if the character doesn't fit into a single UTF-16 code unit, just put a blank character\n if (charCode != jsonText.codePointAt(i)) {\n jsonData[i] = blankCharCode;\n }\n else {\n jsonData[i] = charCode;\n }\n }\n }\n //json padding\n const jsonPaddingView = new Uint8Array(jsonChunkBuffer, chunkLengthPrefix + jsonLength);\n for (let i = 0; i < jsonPadding; ++i) {\n jsonPaddingView[i] = 0x20;\n }\n //binary chunk\n const binaryChunkBuffer = new ArrayBuffer(chunkLengthPrefix);\n const binaryChunkBufferView = new DataView(binaryChunkBuffer);\n binaryChunkBufferView.setUint32(0, binaryBuffer.byteLength + imageByteLength + imagePadding, true);\n binaryChunkBufferView.setUint32(4, 0x004e4942, true);\n // binary padding\n const binPaddingBuffer = new ArrayBuffer(binPadding);\n const binPaddingView = new Uint8Array(binPaddingBuffer);\n for (let i = 0; i < binPadding; ++i) {\n binPaddingView[i] = 0;\n }\n const imagePaddingBuffer = new ArrayBuffer(imagePadding);\n const imagePaddingView = new Uint8Array(imagePaddingBuffer);\n for (let i = 0; i < imagePadding; ++i) {\n imagePaddingView[i] = 0;\n }\n const glbData = [headerBuffer, jsonChunkBuffer, binaryChunkBuffer, binaryBuffer];\n // binary data\n for (let i = 0; i < this._orderedImageData.length; ++i) {\n glbData.push(this._orderedImageData[i].data);\n }\n glbData.push(binPaddingBuffer);\n glbData.push(imagePaddingBuffer);\n const glbFile = new Blob(glbData, { type: \"application/octet-stream\" });\n const container = new GLTFData();\n container.glTFFiles[glbFileName] = glbFile;\n if (this._localEngine != null) {\n this._localEngine.dispose();\n }\n if (dispose) {\n this.dispose();\n }\n return container;\n });\n }\n /**\n * Sets the TRS for each node\n * @param node glTF Node for storing the transformation data\n * @param babylonTransformNode Babylon mesh used as the source for the transformation data\n */\n _setNodeTransformation(node, babylonTransformNode) {\n if (!babylonTransformNode.getPivotPoint().equalsToFloats(0, 0, 0)) {\n Tools.Warn(\"Pivot points are not supported in the glTF serializer\");\n }\n if (!babylonTransformNode.position.equalsToFloats(0, 0, 0)) {\n node.translation = babylonTransformNode.position.asArray();\n }\n if (!babylonTransformNode.scaling.equalsToFloats(1, 1, 1)) {\n node.scale = babylonTransformNode.scaling.asArray();\n }\n const rotationQuaternion = Quaternion.RotationYawPitchRoll(babylonTransformNode.rotation.y, babylonTransformNode.rotation.x, babylonTransformNode.rotation.z);\n if (babylonTransformNode.rotationQuaternion) {\n rotationQuaternion.multiplyInPlace(babylonTransformNode.rotationQuaternion);\n }\n if (!Quaternion.IsIdentity(rotationQuaternion)) {\n node.rotation = rotationQuaternion.normalize().asArray();\n }\n }\n _setCameraTransformation(node, babylonCamera) {\n if (!babylonCamera.position.equalsToFloats(0, 0, 0)) {\n node.translation = babylonCamera.position.asArray();\n }\n const rotationQuaternion = babylonCamera.rotationQuaternion; // we target the local transformation if one.\n if (rotationQuaternion && !Quaternion.IsIdentity(rotationQuaternion)) {\n node.rotation = rotationQuaternion.normalize().asArray();\n }\n }\n _getVertexBufferFromMesh(attributeKind, bufferMesh) {\n if (bufferMesh.isVerticesDataPresent(attributeKind, true)) {\n const vertexBuffer = bufferMesh.getVertexBuffer(attributeKind, true);\n if (vertexBuffer) {\n return vertexBuffer;\n }\n }\n return null;\n }\n /**\n * Creates a bufferview based on the vertices type for the Babylon mesh\n * @param kind Indicates the type of vertices data\n * @param attributeComponentKind Indicates the numerical type used to store the data\n * @param babylonTransformNode The Babylon mesh to get the vertices data from\n * @param binaryWriter The buffer to write the bufferview data to\n * @param byteStride\n */\n _createBufferViewKind(kind, attributeComponentKind, babylonTransformNode, binaryWriter, byteStride) {\n const bufferMesh = babylonTransformNode instanceof Mesh\n ? babylonTransformNode\n : babylonTransformNode instanceof InstancedMesh\n ? babylonTransformNode.sourceMesh\n : null;\n if (bufferMesh) {\n const vertexBuffer = bufferMesh.getVertexBuffer(kind, true);\n const vertexData = bufferMesh.getVerticesData(kind, undefined, undefined, true);\n if (vertexBuffer && vertexData) {\n const typeByteLength = VertexBuffer.GetTypeByteLength(attributeComponentKind);\n const byteLength = vertexData.length * typeByteLength;\n const bufferView = _GLTFUtilities._CreateBufferView(0, binaryWriter.getByteOffset(), byteLength, byteStride, kind + \" - \" + bufferMesh.name);\n this._bufferViews.push(bufferView);\n this._writeAttributeData(kind, attributeComponentKind, vertexData, byteStride / typeByteLength, binaryWriter, babylonTransformNode);\n }\n }\n }\n /**\n * Creates a bufferview based on the vertices type for the Babylon mesh\n * @param babylonSubMesh The Babylon submesh that the morph target is applied to\n * @param meshPrimitive\n * @param babylonMorphTarget the morph target to be exported\n * @param binaryWriter The buffer to write the bufferview data to\n */\n _setMorphTargetAttributes(babylonSubMesh, meshPrimitive, babylonMorphTarget, binaryWriter) {\n if (babylonMorphTarget) {\n if (!meshPrimitive.targets) {\n meshPrimitive.targets = [];\n }\n const target = {};\n const mesh = babylonSubMesh.getMesh();\n if (babylonMorphTarget.hasNormals) {\n const vertexNormals = mesh.getVerticesData(VertexBuffer.NormalKind, undefined, undefined, true);\n const morphNormals = babylonMorphTarget.getNormals();\n const count = babylonSubMesh.verticesCount;\n const byteStride = 12; // 3 x 4 byte floats\n const byteLength = count * byteStride;\n const bufferView = _GLTFUtilities._CreateBufferView(0, binaryWriter.getByteOffset(), byteLength, byteStride, babylonMorphTarget.name + \"_NORMAL\");\n this._bufferViews.push(bufferView);\n const bufferViewIndex = this._bufferViews.length - 1;\n const accessor = _GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + \" - \" + \"NORMAL\", \"VEC3\" /* AccessorType.VEC3 */, 5126 /* AccessorComponentType.FLOAT */, count, 0, null, null);\n this._accessors.push(accessor);\n target.NORMAL = this._accessors.length - 1;\n this.writeMorphTargetAttributeData(VertexBuffer.NormalKind, 5126 /* AccessorComponentType.FLOAT */, babylonSubMesh, vertexNormals, morphNormals, byteStride / 4, binaryWriter);\n }\n if (babylonMorphTarget.hasPositions) {\n const vertexPositions = mesh.getVerticesData(VertexBuffer.PositionKind, undefined, undefined, true);\n const morphPositions = babylonMorphTarget.getPositions();\n const count = babylonSubMesh.verticesCount;\n const byteStride = 12; // 3 x 4 byte floats\n const byteLength = count * byteStride;\n const bufferView = _GLTFUtilities._CreateBufferView(0, binaryWriter.getByteOffset(), byteLength, byteStride, babylonMorphTarget.name + \"_POSITION\");\n this._bufferViews.push(bufferView);\n const bufferViewIndex = this._bufferViews.length - 1;\n const minMax = { min: new Vector3(Infinity, Infinity, Infinity), max: new Vector3(-Infinity, -Infinity, -Infinity) };\n const accessor = _GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + \" - \" + \"POSITION\", \"VEC3\" /* AccessorType.VEC3 */, 5126 /* AccessorComponentType.FLOAT */, count, 0, null, null);\n this._accessors.push(accessor);\n target.POSITION = this._accessors.length - 1;\n this.writeMorphTargetAttributeData(VertexBuffer.PositionKind, 5126 /* AccessorComponentType.FLOAT */, babylonSubMesh, vertexPositions, morphPositions, byteStride / 4, binaryWriter, minMax);\n accessor.min = minMax.min.asArray();\n accessor.max = minMax.max.asArray();\n }\n if (babylonMorphTarget.hasTangents) {\n const vertexTangents = mesh.getVerticesData(VertexBuffer.TangentKind, undefined, undefined, true);\n const morphTangents = babylonMorphTarget.getTangents();\n const count = babylonSubMesh.verticesCount;\n const byteStride = 12; // 3 x 4 byte floats\n const byteLength = count * byteStride;\n const bufferView = _GLTFUtilities._CreateBufferView(0, binaryWriter.getByteOffset(), byteLength, byteStride, babylonMorphTarget.name + \"_NORMAL\");\n this._bufferViews.push(bufferView);\n const bufferViewIndex = this._bufferViews.length - 1;\n const accessor = _GLTFUtilities._CreateAccessor(bufferViewIndex, babylonMorphTarget.name + \" - \" + \"TANGENT\", \"VEC3\" /* AccessorType.VEC3 */, 5126 /* AccessorComponentType.FLOAT */, count, 0, null, null);\n this._accessors.push(accessor);\n target.TANGENT = this._accessors.length - 1;\n this.writeMorphTargetAttributeData(VertexBuffer.TangentKind, 5126 /* AccessorComponentType.FLOAT */, babylonSubMesh, vertexTangents, morphTangents, byteStride / 4, binaryWriter);\n }\n meshPrimitive.targets.push(target);\n }\n }\n /**\n * The primitive mode of the Babylon mesh\n * @param babylonMesh The BabylonJS mesh\n */\n _getMeshPrimitiveMode(babylonMesh) {\n if (babylonMesh instanceof LinesMesh) {\n return Material.LineListDrawMode;\n }\n if (babylonMesh instanceof InstancedMesh || babylonMesh instanceof Mesh) {\n const baseMesh = babylonMesh instanceof Mesh ? babylonMesh : babylonMesh.sourceMesh;\n if (typeof baseMesh.overrideRenderingFillMode === \"number\") {\n return baseMesh.overrideRenderingFillMode;\n }\n }\n return babylonMesh.material ? babylonMesh.material.fillMode : Material.TriangleFillMode;\n }\n /**\n * Sets the primitive mode of the glTF mesh primitive\n * @param meshPrimitive glTF mesh primitive\n * @param primitiveMode The primitive mode\n */\n _setPrimitiveMode(meshPrimitive, primitiveMode) {\n switch (primitiveMode) {\n case Material.TriangleFillMode: {\n // glTF defaults to using Triangle Mode\n break;\n }\n case Material.TriangleStripDrawMode: {\n meshPrimitive.mode = 5 /* MeshPrimitiveMode.TRIANGLE_STRIP */;\n break;\n }\n case Material.TriangleFanDrawMode: {\n meshPrimitive.mode = 6 /* MeshPrimitiveMode.TRIANGLE_FAN */;\n break;\n }\n case Material.PointListDrawMode: {\n meshPrimitive.mode = 0 /* MeshPrimitiveMode.POINTS */;\n break;\n }\n case Material.PointFillMode: {\n meshPrimitive.mode = 0 /* MeshPrimitiveMode.POINTS */;\n break;\n }\n case Material.LineLoopDrawMode: {\n meshPrimitive.mode = 2 /* MeshPrimitiveMode.LINE_LOOP */;\n break;\n }\n case Material.LineListDrawMode: {\n meshPrimitive.mode = 1 /* MeshPrimitiveMode.LINES */;\n break;\n }\n case Material.LineStripDrawMode: {\n meshPrimitive.mode = 3 /* MeshPrimitiveMode.LINE_STRIP */;\n break;\n }\n }\n }\n /**\n * Sets the vertex attribute accessor based of the glTF mesh primitive\n * @param meshPrimitive glTF mesh primitive\n * @param attributeKind vertex attribute\n * @returns boolean specifying if uv coordinates are present\n */\n _setAttributeKind(meshPrimitive, attributeKind) {\n switch (attributeKind) {\n case VertexBuffer.PositionKind: {\n meshPrimitive.attributes.POSITION = this._accessors.length - 1;\n break;\n }\n case VertexBuffer.NormalKind: {\n meshPrimitive.attributes.NORMAL = this._accessors.length - 1;\n break;\n }\n case VertexBuffer.ColorKind: {\n meshPrimitive.attributes.COLOR_0 = this._accessors.length - 1;\n break;\n }\n case VertexBuffer.TangentKind: {\n meshPrimitive.attributes.TANGENT = this._accessors.length - 1;\n break;\n }\n case VertexBuffer.UVKind: {\n meshPrimitive.attributes.TEXCOORD_0 = this._accessors.length - 1;\n break;\n }\n case VertexBuffer.UV2Kind: {\n meshPrimitive.attributes.TEXCOORD_1 = this._accessors.length - 1;\n break;\n }\n case VertexBuffer.MatricesIndicesKind: {\n meshPrimitive.attributes.JOINTS_0 = this._accessors.length - 1;\n break;\n }\n case VertexBuffer.MatricesIndicesExtraKind: {\n meshPrimitive.attributes.JOINTS_1 = this._accessors.length - 1;\n break;\n }\n case VertexBuffer.MatricesWeightsKind: {\n meshPrimitive.attributes.WEIGHTS_0 = this._accessors.length - 1;\n break;\n }\n case VertexBuffer.MatricesWeightsExtraKind: {\n meshPrimitive.attributes.WEIGHTS_1 = this._accessors.length - 1;\n break;\n }\n default: {\n Tools.Warn(\"Unsupported Vertex Buffer Type: \" + attributeKind);\n }\n }\n }\n /**\n * Sets data for the primitive attributes of each submesh\n * @param mesh glTF Mesh object to store the primitive attribute information\n * @param babylonTransformNode Babylon mesh to get the primitive attribute data from\n * @param binaryWriter Buffer to write the attribute data to\n */\n _setPrimitiveAttributesAsync(mesh, babylonTransformNode, binaryWriter) {\n const promises = [];\n let bufferMesh = null;\n let bufferView;\n let minMax;\n if (babylonTransformNode instanceof Mesh) {\n bufferMesh = babylonTransformNode;\n }\n else if (babylonTransformNode instanceof InstancedMesh) {\n bufferMesh = babylonTransformNode.sourceMesh;\n }\n const attributeData = [\n { kind: VertexBuffer.PositionKind, accessorType: \"VEC3\" /* AccessorType.VEC3 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 12 },\n { kind: VertexBuffer.NormalKind, accessorType: \"VEC3\" /* AccessorType.VEC3 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 12 },\n { kind: VertexBuffer.ColorKind, accessorType: \"VEC4\" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },\n { kind: VertexBuffer.TangentKind, accessorType: \"VEC4\" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },\n { kind: VertexBuffer.UVKind, accessorType: \"VEC2\" /* AccessorType.VEC2 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 8 },\n { kind: VertexBuffer.UV2Kind, accessorType: \"VEC2\" /* AccessorType.VEC2 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 8 },\n { kind: VertexBuffer.MatricesIndicesKind, accessorType: \"VEC4\" /* AccessorType.VEC4 */, accessorComponentType: 5123 /* AccessorComponentType.UNSIGNED_SHORT */, byteStride: 8 },\n { kind: VertexBuffer.MatricesIndicesExtraKind, accessorType: \"VEC4\" /* AccessorType.VEC4 */, accessorComponentType: 5123 /* AccessorComponentType.UNSIGNED_SHORT */, byteStride: 8 },\n { kind: VertexBuffer.MatricesWeightsKind, accessorType: \"VEC4\" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },\n { kind: VertexBuffer.MatricesWeightsExtraKind, accessorType: \"VEC4\" /* AccessorType.VEC4 */, accessorComponentType: 5126 /* AccessorComponentType.FLOAT */, byteStride: 16 },\n ];\n if (bufferMesh) {\n let indexBufferViewIndex = null;\n const primitiveMode = this._getMeshPrimitiveMode(bufferMesh);\n const vertexAttributeBufferViews = {};\n const morphTargetManager = bufferMesh.morphTargetManager;\n // For each BabylonMesh, create bufferviews for each 'kind'\n for (const attribute of attributeData) {\n const attributeKind = attribute.kind;\n const attributeComponentKind = attribute.accessorComponentType;\n if (bufferMesh.isVerticesDataPresent(attributeKind, true)) {\n const vertexBuffer = this._getVertexBufferFromMesh(attributeKind, bufferMesh);\n attribute.byteStride = vertexBuffer\n ? vertexBuffer.getSize() * VertexBuffer.GetTypeByteLength(attribute.accessorComponentType)\n : VertexBuffer.DeduceStride(attributeKind) * 4;\n if (attribute.byteStride === 12) {\n attribute.accessorType = \"VEC3\" /* AccessorType.VEC3 */;\n }\n this._createBufferViewKind(attributeKind, attributeComponentKind, babylonTransformNode, binaryWriter, attribute.byteStride);\n attribute.bufferViewIndex = this._bufferViews.length - 1;\n vertexAttributeBufferViews[attributeKind] = attribute.bufferViewIndex;\n }\n }\n if (bufferMesh.getTotalIndices()) {\n const indices = bufferMesh.getIndices();\n if (indices) {\n const byteLength = indices.length * 4;\n bufferView = _GLTFUtilities._CreateBufferView(0, binaryWriter.getByteOffset(), byteLength, undefined, \"Indices - \" + bufferMesh.name);\n this._bufferViews.push(bufferView);\n indexBufferViewIndex = this._bufferViews.length - 1;\n for (let k = 0, length = indices.length; k < length; ++k) {\n binaryWriter.setUInt32(indices[k]);\n }\n }\n }\n if (bufferMesh.subMeshes) {\n // go through all mesh primitives (submeshes)\n for (const submesh of bufferMesh.subMeshes) {\n let babylonMaterial = submesh.getMaterial() || bufferMesh.getScene().defaultMaterial;\n let materialIndex = null;\n if (babylonMaterial) {\n if (bufferMesh instanceof LinesMesh) {\n // get the color from the lines mesh and set it in the material\n const material = {\n name: bufferMesh.name + \" material\",\n };\n if (!bufferMesh.color.equals(Color3.White()) || bufferMesh.alpha < 1) {\n material.pbrMetallicRoughness = {\n baseColorFactor: bufferMesh.color.asArray().concat([bufferMesh.alpha]),\n };\n }\n this._materials.push(material);\n materialIndex = this._materials.length - 1;\n }\n else if (babylonMaterial instanceof MultiMaterial) {\n const subMaterial = babylonMaterial.subMaterials[submesh.materialIndex];\n if (subMaterial) {\n babylonMaterial = subMaterial;\n materialIndex = this._materialMap[babylonMaterial.uniqueId];\n }\n }\n else {\n materialIndex = this._materialMap[babylonMaterial.uniqueId];\n }\n }\n const glTFMaterial = materialIndex != null ? this._materials[materialIndex] : null;\n const meshPrimitive = { attributes: {} };\n this._setPrimitiveMode(meshPrimitive, primitiveMode);\n for (const attribute of attributeData) {\n const attributeKind = attribute.kind;\n if ((attributeKind === VertexBuffer.UVKind || attributeKind === VertexBuffer.UV2Kind) && !this._options.exportUnusedUVs) {\n if (!glTFMaterial || !this._glTFMaterialExporter._hasTexturesPresent(glTFMaterial)) {\n continue;\n }\n }\n const vertexData = bufferMesh.getVerticesData(attributeKind, undefined, undefined, true);\n if (vertexData) {\n const vertexBuffer = this._getVertexBufferFromMesh(attributeKind, bufferMesh);\n if (vertexBuffer) {\n const stride = vertexBuffer.getSize();\n const bufferViewIndex = attribute.bufferViewIndex;\n if (bufferViewIndex != undefined) {\n // check to see if bufferviewindex has a numeric value assigned.\n minMax = { min: null, max: null };\n if (attributeKind == VertexBuffer.PositionKind) {\n minMax = _GLTFUtilities._CalculateMinMaxPositions(vertexData, 0, vertexData.length / stride);\n }\n const accessor = _GLTFUtilities._CreateAccessor(bufferViewIndex, attributeKind + \" - \" + babylonTransformNode.name, attribute.accessorType, attribute.accessorComponentType, vertexData.length / stride, 0, minMax.min, minMax.max);\n this._accessors.push(accessor);\n this._setAttributeKind(meshPrimitive, attributeKind);\n }\n }\n }\n }\n if (indexBufferViewIndex) {\n // Create accessor\n const accessor = _GLTFUtilities._CreateAccessor(indexBufferViewIndex, \"indices - \" + babylonTransformNode.name, \"SCALAR\" /* AccessorType.SCALAR */, 5125 /* AccessorComponentType.UNSIGNED_INT */, submesh.indexCount, submesh.indexStart * 4, null, null);\n this._accessors.push(accessor);\n meshPrimitive.indices = this._accessors.length - 1;\n }\n if (materialIndex != null && Object.keys(meshPrimitive.attributes).length > 0) {\n const sideOrientation = bufferMesh.overrideMaterialSideOrientation !== null ? bufferMesh.overrideMaterialSideOrientation : babylonMaterial.sideOrientation;\n if (sideOrientation === (this._babylonScene.useRightHandedSystem ? Material.ClockWiseSideOrientation : Material.CounterClockWiseSideOrientation)) {\n let byteOffset = indexBufferViewIndex != null ? this._bufferViews[indexBufferViewIndex].byteOffset : null;\n if (byteOffset == null) {\n byteOffset = 0;\n }\n let babylonIndices = null;\n if (indexBufferViewIndex != null) {\n babylonIndices = bufferMesh.getIndices();\n }\n if (babylonIndices) {\n this._reorderIndicesBasedOnPrimitiveMode(submesh, primitiveMode, babylonIndices, byteOffset, binaryWriter);\n }\n else {\n for (const attribute of attributeData) {\n const vertexData = bufferMesh.getVerticesData(attribute.kind, undefined, undefined, true);\n if (vertexData) {\n const byteOffset = this._bufferViews[vertexAttributeBufferViews[attribute.kind]].byteOffset || 0;\n this._reorderVertexAttributeDataBasedOnPrimitiveMode(submesh, primitiveMode, attribute.kind, vertexData, byteOffset, binaryWriter);\n }\n }\n }\n }\n meshPrimitive.material = materialIndex;\n }\n if (morphTargetManager) {\n // By convention, morph target names are stored in the mesh extras.\n if (!mesh.extras) {\n mesh.extras = {};\n }\n mesh.extras.targetNames = [];\n for (let i = 0; i < morphTargetManager.numTargets; ++i) {\n const target = morphTargetManager.getTarget(i);\n this._setMorphTargetAttributes(submesh, meshPrimitive, target, binaryWriter);\n mesh.extras.targetNames.push(target.name);\n }\n }\n mesh.primitives.push(meshPrimitive);\n this._extensionsPostExportMeshPrimitiveAsync(\"postExport\", meshPrimitive, submesh, binaryWriter);\n promises.push();\n }\n }\n }\n return Promise.all(promises).then(() => {\n /* do nothing */\n });\n }\n /**\n * Creates a glTF scene based on the array of meshes\n * Returns the total byte offset\n * @param babylonScene Babylon scene to get the mesh data from\n * @param binaryWriter Buffer to write binary data to\n */\n _createSceneAsync(binaryWriter) {\n var _a;\n const scene = { nodes: [] };\n let glTFNodeIndex;\n let glTFNode;\n let directDescendents;\n const nodes = [...this._babylonScene.transformNodes, ...this._babylonScene.meshes, ...this._babylonScene.lights, ...this._babylonScene.cameras];\n const removedRootNodes = new Set();\n // Scene metadata\n if (this._babylonScene.metadata) {\n if (this._options.metadataSelector) {\n scene.extras = this._options.metadataSelector(this._babylonScene.metadata);\n }\n else if (this._babylonScene.metadata.gltf) {\n scene.extras = this._babylonScene.metadata.gltf.extras;\n }\n }\n // Remove no-op root nodes\n if (((_a = this._options.removeNoopRootNodes) !== null && _a !== void 0 ? _a : true) && !this._options.includeCoordinateSystemConversionNodes) {\n for (const rootNode of this._babylonScene.rootNodes) {\n if (isNoopNode(rootNode, this._babylonScene.useRightHandedSystem)) {\n removedRootNodes.add(rootNode);\n // Exclude the node from list of nodes to export\n nodes.splice(nodes.indexOf(rootNode), 1);\n }\n }\n }\n // Export babylon cameras to glTFCamera\n const cameraMap = new Map();\n this._babylonScene.cameras.forEach((camera) => {\n if (!this._options.shouldExportNode || this._options.shouldExportNode(camera)) {\n const glTFCamera = {\n type: camera.mode === Camera.PERSPECTIVE_CAMERA ? \"perspective\" /* CameraType.PERSPECTIVE */ : \"orthographic\" /* CameraType.ORTHOGRAPHIC */,\n };\n if (camera.name) {\n glTFCamera.name = camera.name;\n }\n if (glTFCamera.type === \"perspective\" /* CameraType.PERSPECTIVE */) {\n glTFCamera.perspective = {\n aspectRatio: camera.getEngine().getAspectRatio(camera),\n yfov: camera.fovMode === Camera.FOVMODE_VERTICAL_FIXED ? camera.fov : camera.fov * camera.getEngine().getAspectRatio(camera),\n znear: camera.minZ,\n zfar: camera.maxZ,\n };\n }\n else if (glTFCamera.type === \"orthographic\" /* CameraType.ORTHOGRAPHIC */) {\n const halfWidth = camera.orthoLeft && camera.orthoRight ? 0.5 * (camera.orthoRight - camera.orthoLeft) : camera.getEngine().getRenderWidth() * 0.5;\n const halfHeight = camera.orthoBottom && camera.orthoTop ? 0.5 * (camera.orthoTop - camera.orthoBottom) : camera.getEngine().getRenderHeight() * 0.5;\n glTFCamera.orthographic = {\n xmag: halfWidth,\n ymag: halfHeight,\n znear: camera.minZ,\n zfar: camera.maxZ,\n };\n }\n cameraMap.set(camera, this._cameras.length);\n this._cameras.push(glTFCamera);\n }\n });\n const [exportNodes, exportMaterials] = this._getExportNodes(nodes);\n return this._glTFMaterialExporter._convertMaterialsToGLTFAsync(exportMaterials, \"image/png\" /* ImageMimeType.PNG */, true).then(() => {\n return this._createNodeMapAndAnimationsAsync(exportNodes, binaryWriter).then((nodeMap) => {\n return this._createSkinsAsync(nodeMap, binaryWriter).then((skinMap) => {\n this._nodeMap = nodeMap;\n this._totalByteLength = binaryWriter.getByteOffset();\n if (this._totalByteLength == undefined) {\n throw new Error(\"undefined byte length!\");\n }\n // Build Hierarchy with the node map.\n for (const babylonNode of nodes) {\n glTFNodeIndex = this._nodeMap[babylonNode.uniqueId];\n if (glTFNodeIndex !== undefined) {\n glTFNode = this._nodes[glTFNodeIndex];\n if (babylonNode.metadata) {\n if (this._options.metadataSelector) {\n glTFNode.extras = this._options.metadataSelector(babylonNode.metadata);\n }\n else if (babylonNode.metadata.gltf) {\n glTFNode.extras = babylonNode.metadata.gltf.extras;\n }\n }\n if (babylonNode instanceof Camera) {\n glTFNode.camera = cameraMap.get(babylonNode);\n }\n if (this._options.shouldExportNode && !this._options.shouldExportNode(babylonNode)) {\n Tools.Log(\"Omitting \" + babylonNode.name + \" from scene.\");\n }\n else {\n if (!babylonNode.parent && !this._babylonScene.useRightHandedSystem) {\n convertNodeHandedness(glTFNode);\n }\n if (!babylonNode.parent || removedRootNodes.has(babylonNode.parent)) {\n scene.nodes.push(glTFNodeIndex);\n }\n }\n if (babylonNode instanceof Mesh) {\n if (babylonNode.skeleton) {\n glTFNode.skin = skinMap[babylonNode.skeleton.uniqueId];\n }\n }\n directDescendents = babylonNode.getDescendants(true);\n if (!glTFNode.children && directDescendents && directDescendents.length) {\n const children = [];\n for (const descendent of directDescendents) {\n if (this._nodeMap[descendent.uniqueId] != null) {\n children.push(this._nodeMap[descendent.uniqueId]);\n }\n }\n if (children.length) {\n glTFNode.children = children;\n }\n }\n }\n }\n if (scene.nodes.length) {\n this._scenes.push(scene);\n }\n });\n });\n });\n }\n /**\n * Getting the nodes and materials that would be exported.\n * @param nodes Babylon transform nodes\n * @returns Array of nodes which would be exported.\n * @returns Set of materials which would be exported.\n */\n _getExportNodes(nodes) {\n const exportNodes = [];\n const exportMaterials = new Set();\n for (const babylonNode of nodes) {\n if (!this._options.shouldExportNode || this._options.shouldExportNode(babylonNode)) {\n exportNodes.push(babylonNode);\n const babylonMesh = babylonNode;\n if (babylonMesh.subMeshes && babylonMesh.subMeshes.length > 0) {\n const material = babylonMesh.material || babylonMesh.getScene().defaultMaterial;\n if (material instanceof MultiMaterial) {\n for (const subMaterial of material.subMaterials) {\n if (subMaterial) {\n exportMaterials.add(subMaterial);\n }\n }\n }\n else {\n exportMaterials.add(material);\n }\n }\n }\n else {\n `Excluding node ${babylonNode.name}`;\n }\n }\n return [exportNodes, exportMaterials];\n }\n /**\n * Creates a mapping of Node unique id to node index and handles animations\n * @param nodes Babylon transform nodes\n * @param binaryWriter Buffer to write binary data to\n * @returns Node mapping of unique id to index\n */\n _createNodeMapAndAnimationsAsync(nodes, binaryWriter) {\n let promiseChain = Promise.resolve();\n const nodeMap = {};\n let nodeIndex;\n const runtimeGLTFAnimation = {\n name: \"runtime animations\",\n channels: [],\n samplers: [],\n };\n const idleGLTFAnimations = [];\n for (const babylonNode of nodes) {\n promiseChain = promiseChain.then(() => {\n return this._createNodeAsync(babylonNode, binaryWriter).then((node) => {\n const promise = this._extensionsPostExportNodeAsync(\"createNodeAsync\", node, babylonNode, nodeMap, binaryWriter);\n if (promise == null) {\n Tools.Warn(`Not exporting node ${babylonNode.name}`);\n return Promise.resolve();\n }\n else {\n return promise.then((node) => {\n if (!node) {\n return;\n }\n this._nodes.push(node);\n nodeIndex = this._nodes.length - 1;\n nodeMap[babylonNode.uniqueId] = nodeIndex;\n if (!this._babylonScene.animationGroups.length) {\n _GLTFAnimation._CreateMorphTargetAnimationFromMorphTargetAnimations(babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, this._nodes, binaryWriter, this._bufferViews, this._accessors, this._animationSampleRate, this._options.shouldExportAnimation);\n if (babylonNode.animations.length) {\n _GLTFAnimation._CreateNodeAnimationFromNodeAnimations(babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, this._nodes, binaryWriter, this._bufferViews, this._accessors, this._animationSampleRate, this._options.shouldExportAnimation);\n }\n }\n });\n }\n });\n });\n }\n return promiseChain.then(() => {\n if (runtimeGLTFAnimation.channels.length && runtimeGLTFAnimation.samplers.length) {\n this._animations.push(runtimeGLTFAnimation);\n }\n idleGLTFAnimations.forEach((idleGLTFAnimation) => {\n if (idleGLTFAnimation.channels.length && idleGLTFAnimation.samplers.length) {\n this._animations.push(idleGLTFAnimation);\n }\n });\n if (this._babylonScene.animationGroups.length) {\n _GLTFAnimation._CreateNodeAndMorphAnimationFromAnimationGroups(this._babylonScene, this._animations, nodeMap, binaryWriter, this._bufferViews, this._accessors, this._animationSampleRate, this._options.shouldExportAnimation);\n }\n return nodeMap;\n });\n }\n /**\n * Creates a glTF node from a Babylon mesh\n * @param babylonNode Source Babylon mesh\n * @param binaryWriter Buffer for storing geometry data\n * @returns glTF node\n */\n _createNodeAsync(babylonNode, binaryWriter) {\n return Promise.resolve().then(() => {\n // create node to hold translation/rotation/scale and the mesh\n const node = {};\n // create mesh\n const mesh = { primitives: [] };\n if (babylonNode.name) {\n node.name = babylonNode.name;\n }\n if (babylonNode instanceof TransformNode) {\n // Set transformation\n this._setNodeTransformation(node, babylonNode);\n if (babylonNode instanceof Mesh) {\n const morphTargetManager = babylonNode.morphTargetManager;\n if (morphTargetManager && morphTargetManager.numTargets > 0) {\n mesh.weights = [];\n for (let i = 0; i < morphTargetManager.numTargets; ++i) {\n mesh.weights.push(morphTargetManager.getTarget(i).influence);\n }\n }\n }\n return this._setPrimitiveAttributesAsync(mesh, babylonNode, binaryWriter).then(() => {\n if (mesh.primitives.length) {\n this._meshes.push(mesh);\n node.mesh = this._meshes.length - 1;\n }\n return node;\n });\n }\n else if (babylonNode instanceof Camera) {\n this._setCameraTransformation(node, babylonNode);\n return node;\n }\n else {\n return node;\n }\n });\n }\n /**\n * Creates a glTF skin from a Babylon skeleton\n * @param babylonScene Babylon Scene\n * @param nodeMap Babylon transform nodes\n * @param binaryWriter Buffer to write binary data to\n * @returns Node mapping of unique id to index\n */\n _createSkinsAsync(nodeMap, binaryWriter) {\n var _a;\n const promiseChain = Promise.resolve();\n const skinMap = {};\n for (const skeleton of this._babylonScene.skeletons) {\n if (skeleton.bones.length <= 0) {\n continue;\n }\n // create skin\n const skin = { joints: [] };\n const inverseBindMatrices = [];\n const boneIndexMap = {};\n let maxBoneIndex = -1;\n for (let i = 0; i < skeleton.bones.length; ++i) {\n const bone = skeleton.bones[i];\n const boneIndex = (_a = bone.getIndex()) !== null && _a !== void 0 ? _a : i;\n if (boneIndex !== -1) {\n boneIndexMap[boneIndex] = bone;\n if (boneIndex > maxBoneIndex) {\n maxBoneIndex = boneIndex;\n }\n }\n }\n for (let boneIndex = 0; boneIndex <= maxBoneIndex; ++boneIndex) {\n const bone = boneIndexMap[boneIndex];\n inverseBindMatrices.push(bone.getInvertedAbsoluteTransform());\n const transformNode = bone.getTransformNode();\n if (transformNode && nodeMap[transformNode.uniqueId] !== null && nodeMap[transformNode.uniqueId] !== undefined) {\n skin.joints.push(nodeMap[transformNode.uniqueId]);\n }\n else {\n Tools.Warn(\"Exporting a bone without a linked transform node is currently unsupported\");\n }\n }\n if (skin.joints.length > 0) {\n // create buffer view for inverse bind matrices\n const byteStride = 64; // 4 x 4 matrix of 32 bit float\n const byteLength = inverseBindMatrices.length * byteStride;\n const bufferViewOffset = binaryWriter.getByteOffset();\n const bufferView = _GLTFUtilities._CreateBufferView(0, bufferViewOffset, byteLength, undefined, \"InverseBindMatrices\" + \" - \" + skeleton.name);\n this._bufferViews.push(bufferView);\n const bufferViewIndex = this._bufferViews.length - 1;\n const bindMatrixAccessor = _GLTFUtilities._CreateAccessor(bufferViewIndex, \"InverseBindMatrices\" + \" - \" + skeleton.name, \"MAT4\" /* AccessorType.MAT4 */, 5126 /* AccessorComponentType.FLOAT */, inverseBindMatrices.length, null, null, null);\n const inverseBindAccessorIndex = this._accessors.push(bindMatrixAccessor) - 1;\n skin.inverseBindMatrices = inverseBindAccessorIndex;\n this._skins.push(skin);\n skinMap[skeleton.uniqueId] = this._skins.length - 1;\n inverseBindMatrices.forEach((mat) => {\n mat.m.forEach((cell) => {\n binaryWriter.setFloat32(cell);\n });\n });\n }\n }\n return promiseChain.then(() => {\n return skinMap;\n });\n }\n}\n_Exporter._ExtensionNames = new Array();\n_Exporter._ExtensionFactories = {};\n/**\n * @internal\n *\n * Stores glTF binary data. If the array buffer byte length is exceeded, it doubles in size dynamically\n */\nexport class _BinaryWriter {\n /**\n * Initialize binary writer with an initial byte length\n * @param byteLength Initial byte length of the array buffer\n */\n constructor(byteLength) {\n this._arrayBuffer = new ArrayBuffer(byteLength);\n this._dataView = new DataView(this._arrayBuffer);\n this._byteOffset = 0;\n }\n /**\n * Resize the array buffer to the specified byte length\n * @param byteLength\n */\n _resizeBuffer(byteLength) {\n const newBuffer = new ArrayBuffer(byteLength);\n const copyOldBufferSize = Math.min(this._arrayBuffer.byteLength, byteLength);\n const oldUint8Array = new Uint8Array(this._arrayBuffer, 0, copyOldBufferSize);\n const newUint8Array = new Uint8Array(newBuffer);\n newUint8Array.set(oldUint8Array, 0);\n this._arrayBuffer = newBuffer;\n this._dataView = new DataView(this._arrayBuffer);\n return newBuffer;\n }\n /**\n * Get an array buffer with the length of the byte offset\n * @returns ArrayBuffer resized to the byte offset\n */\n getArrayBuffer() {\n return this._resizeBuffer(this.getByteOffset());\n }\n /**\n * Get the byte offset of the array buffer\n * @returns byte offset\n */\n getByteOffset() {\n if (this._byteOffset == undefined) {\n throw new Error(\"Byte offset is undefined!\");\n }\n return this._byteOffset;\n }\n /**\n * Stores an UInt8 in the array buffer\n * @param entry\n * @param byteOffset If defined, specifies where to set the value as an offset.\n */\n setUInt8(entry, byteOffset) {\n if (byteOffset != null) {\n if (byteOffset < this._byteOffset) {\n this._dataView.setUint8(byteOffset, entry);\n }\n else {\n Tools.Error(\"BinaryWriter: byteoffset is greater than the current binary buffer length!\");\n }\n }\n else {\n if (this._byteOffset + 1 > this._arrayBuffer.byteLength) {\n this._resizeBuffer(this._arrayBuffer.byteLength * 2);\n }\n this._dataView.setUint8(this._byteOffset, entry);\n this._byteOffset += 1;\n }\n }\n /**\n * Stores an UInt16 in the array buffer\n * @param entry\n * @param byteOffset If defined, specifies where to set the value as an offset.\n */\n setUInt16(entry, byteOffset) {\n if (byteOffset != null) {\n if (byteOffset < this._byteOffset) {\n this._dataView.setUint16(byteOffset, entry, true);\n }\n else {\n Tools.Error(\"BinaryWriter: byteoffset is greater than the current binary buffer length!\");\n }\n }\n else {\n if (this._byteOffset + 2 > this._arrayBuffer.byteLength) {\n this._resizeBuffer(this._arrayBuffer.byteLength * 2);\n }\n this._dataView.setUint16(this._byteOffset, entry, true);\n this._byteOffset += 2;\n }\n }\n /**\n * Gets an UInt32 in the array buffer\n * @param byteOffset If defined, specifies where to set the value as an offset.\n */\n getUInt32(byteOffset) {\n if (byteOffset < this._byteOffset) {\n return this._dataView.getUint32(byteOffset, true);\n }\n else {\n Tools.Error(\"BinaryWriter: byteoffset is greater than the current binary buffer length!\");\n throw new Error(\"BinaryWriter: byteoffset is greater than the current binary buffer length!\");\n }\n }\n getVector3Float32FromRef(vector3, byteOffset) {\n if (byteOffset + 8 > this._byteOffset) {\n Tools.Error(`BinaryWriter: byteoffset is greater than the current binary buffer length!`);\n }\n else {\n vector3.x = this._dataView.getFloat32(byteOffset, true);\n vector3.y = this._dataView.getFloat32(byteOffset + 4, true);\n vector3.z = this._dataView.getFloat32(byteOffset + 8, true);\n }\n }\n setVector3Float32FromRef(vector3, byteOffset) {\n if (byteOffset + 8 > this._byteOffset) {\n Tools.Error(`BinaryWriter: byteoffset is greater than the current binary buffer length!`);\n }\n else {\n this._dataView.setFloat32(byteOffset, vector3.x, true);\n this._dataView.setFloat32(byteOffset + 4, vector3.y, true);\n this._dataView.setFloat32(byteOffset + 8, vector3.z, true);\n }\n }\n getVector4Float32FromRef(vector4, byteOffset) {\n if (byteOffset + 12 > this._byteOffset) {\n Tools.Error(`BinaryWriter: byteoffset is greater than the current binary buffer length!`);\n }\n else {\n vector4.x = this._dataView.getFloat32(byteOffset, true);\n vector4.y = this._dataView.getFloat32(byteOffset + 4, true);\n vector4.z = this._dataView.getFloat32(byteOffset + 8, true);\n vector4.w = this._dataView.getFloat32(byteOffset + 12, true);\n }\n }\n setVector4Float32FromRef(vector4, byteOffset) {\n if (byteOffset + 12 > this._byteOffset) {\n Tools.Error(`BinaryWriter: byteoffset is greater than the current binary buffer length!`);\n }\n else {\n this._dataView.setFloat32(byteOffset, vector4.x, true);\n this._dataView.setFloat32(byteOffset + 4, vector4.y, true);\n this._dataView.setFloat32(byteOffset + 8, vector4.z, true);\n this._dataView.setFloat32(byteOffset + 12, vector4.w, true);\n }\n }\n /**\n * Stores a Float32 in the array buffer\n * @param entry\n * @param byteOffset\n */\n setFloat32(entry, byteOffset) {\n if (isNaN(entry)) {\n Tools.Error(\"Invalid data being written!\");\n }\n if (byteOffset != null) {\n if (byteOffset < this._byteOffset) {\n this._dataView.setFloat32(byteOffset, entry, true);\n }\n else {\n Tools.Error(\"BinaryWriter: byteoffset is greater than the current binary length!\");\n }\n }\n if (this._byteOffset + 4 > this._arrayBuffer.byteLength) {\n this._resizeBuffer(this._arrayBuffer.byteLength * 2);\n }\n this._dataView.setFloat32(this._byteOffset, entry, true);\n this._byteOffset += 4;\n }\n /**\n * Stores an UInt32 in the array buffer\n * @param entry\n * @param byteOffset If defined, specifies where to set the value as an offset.\n */\n setUInt32(entry, byteOffset) {\n if (byteOffset != null) {\n if (byteOffset < this._byteOffset) {\n this._dataView.setUint32(byteOffset, entry, true);\n }\n else {\n Tools.Error(\"BinaryWriter: byteoffset is greater than the current binary buffer length!\");\n }\n }\n else {\n if (this._byteOffset + 4 > this._arrayBuffer.byteLength) {\n this._resizeBuffer(this._arrayBuffer.byteLength * 2);\n }\n this._dataView.setUint32(this._byteOffset, entry, true);\n this._byteOffset += 4;\n }\n }\n /**\n * Stores an Int16 in the array buffer\n * @param entry\n * @param byteOffset If defined, specifies where to set the value as an offset.\n */\n setInt16(entry, byteOffset) {\n if (byteOffset != null) {\n if (byteOffset < this._byteOffset) {\n this._dataView.setInt16(byteOffset, entry, true);\n }\n else {\n Tools.Error(\"BinaryWriter: byteoffset is greater than the current binary buffer length!\");\n }\n }\n else {\n if (this._byteOffset + 2 > this._arrayBuffer.byteLength) {\n this._resizeBuffer(this._arrayBuffer.byteLength * 2);\n }\n this._dataView.setInt16(this._byteOffset, entry, true);\n this._byteOffset += 2;\n }\n }\n /**\n * Stores a byte in the array buffer\n * @param entry\n * @param byteOffset If defined, specifies where to set the value as an offset.\n */\n setByte(entry, byteOffset) {\n if (byteOffset != null) {\n if (byteOffset < this._byteOffset) {\n this._dataView.setInt8(byteOffset, entry);\n }\n else {\n Tools.Error(\"BinaryWriter: byteoffset is greater than the current binary buffer length!\");\n }\n }\n else {\n if (this._byteOffset + 1 > this._arrayBuffer.byteLength) {\n this._resizeBuffer(this._arrayBuffer.byteLength * 2);\n }\n this._dataView.setInt8(this._byteOffset, entry);\n this._byteOffset++;\n }\n }\n}\n//# sourceMappingURL=glTFExporter.js.map","import { _Exporter } from \"./glTFExporter.js\";\n/**\n * Class for generating glTF data from a Babylon scene.\n */\nexport class GLTF2Export {\n /**\n * Exports the geometry of the scene to .gltf file format asynchronously\n * @param scene Babylon scene with scene hierarchy information\n * @param filePrefix File prefix to use when generating the glTF file\n * @param options Exporter options\n * @returns Returns an object with a .gltf file and associates texture names\n * as keys and their data and paths as values\n */\n static GLTFAsync(scene, filePrefix, options) {\n return scene.whenReadyAsync().then(() => {\n const glTFPrefix = filePrefix.replace(/\\.[^/.]+$/, \"\");\n const gltfGenerator = new _Exporter(scene, options);\n return gltfGenerator._generateGLTFAsync(glTFPrefix);\n });\n }\n static _PreExportAsync(scene, options) {\n return Promise.resolve().then(() => {\n if (options && options.exportWithoutWaitingForScene) {\n return Promise.resolve();\n }\n else {\n return scene.whenReadyAsync();\n }\n });\n }\n static _PostExportAsync(scene, glTFData, options) {\n return Promise.resolve().then(() => {\n if (options && options.exportWithoutWaitingForScene) {\n return glTFData;\n }\n else {\n return glTFData;\n }\n });\n }\n /**\n * Exports the geometry of the scene to .glb file format asychronously\n * @param scene Babylon scene with scene hierarchy information\n * @param filePrefix File prefix to use when generating glb file\n * @param options Exporter options\n * @returns Returns an object with a .glb filename as key and data as value\n */\n static GLBAsync(scene, filePrefix, options) {\n return this._PreExportAsync(scene, options).then(() => {\n const glTFPrefix = filePrefix.replace(/\\.[^/.]+$/, \"\");\n const gltfGenerator = new _Exporter(scene, options);\n return gltfGenerator._generateGLBAsync(glTFPrefix).then((glTFData) => {\n return this._PostExportAsync(scene, glTFData, options);\n });\n });\n }\n}\n//# sourceMappingURL=glTFSerializer.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { AssetCollection } from '../AssetCollection.js';\nimport { Material } from './Material.js';\nimport { ViewerMaterial } from './material/ViewerMaterial.js';\nimport { ViewerMaterialWrapper } from './material/ViewerMaterialWrapper.js';\nimport { Material as BABYLON_Material } from '@inter-ikea-betrakta-babylonjs/core/Materials/material.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { GLTF2Export as BABYLON_GLTF2Export } from '@inter-ikea-betrakta-babylonjs/serializers/glTF/2.0/glTFSerializer.js';\nexport class AssetManager {\n constructor(scene, freezing_manager, mark_scene_dirty, viewer) {\n this.scene = scene;\n this.freezing_manager = freezing_manager;\n this.mark_scene_dirty = mark_scene_dirty;\n this.viewer = viewer;\n this.materials = new AssetCollection();\n this.textures = new AssetCollection();\n this.lines = new Set();\n this.ui_meshes = new Set();\n this.text_fields = new Set();\n // Gizmos are UI meshes, but we need to store a list of Gizmos as well, for input.\n // This set should not be used for rendering, as the gizmos will be in the ui_meshes set as well, which is used for rendering.\n this.gizmos = new Set();\n this.compiling_material_promises = new Map();\n this._material_to_material_wrapper = new WeakMap();\n this.default_material = new ViewerMaterial('VIEWER_DEFAULT', this.viewer.scene, this.viewer);\n this.default_material.albedoColor.set(1, 0, 1); // Ultra magenta\n this.default_material.unlit = true;\n this.default_material.sideOrientation = BABYLON_Material.CounterClockWiseSideOrientation;\n }\n get_or_create_material_wrapper(material) {\n let material_wrapper = this._material_to_material_wrapper.get(material);\n if (material_wrapper === undefined) {\n material_wrapper = new ViewerMaterialWrapper(material, false, this, this.mark_scene_dirty);\n this._material_to_material_wrapper.set(material, material_wrapper);\n }\n return material_wrapper;\n }\n generate_file_name() {\n const d = new Date();\n // creates filename as export-dd-mm-yyy-hh_mm_ss\n return `export-${d.getDate()}-${d.getMonth() + 1}-${d.getFullYear()}-${d.getHours()}_${d.getMinutes()}_${d.getSeconds()}`;\n }\n serialize_glb(filter, filename = this.generate_file_name(), center = false) {\n let export_translation = BABYLON_Vector3.Zero();\n const babylon_root_obj_ids = new Set();\n return Promise.all(filter.map(scene_object => scene_object.ready))\n .then(() => {\n const babylon_ids = new Set();\n // For each object, find all it's meshes and their hierarchy\n filter.forEach(object => {\n object.mesh_iterator(false, mesh => {\n babylon_ids.add(mesh.uniqueId);\n // Now go get its ancestors\n let current = mesh;\n while (current.parent && !babylon_ids.has(current.parent.uniqueId)) {\n babylon_ids.add(current.parent.uniqueId);\n current = current.parent;\n }\n });\n });\n if (center) {\n filter.forEach(object => {\n let node = object;\n while (node.parent) {\n node = node.parent;\n }\n babylon_root_obj_ids.add(node.id);\n });\n // Compute the AABB of the object set\n let min_world = new BABYLON_Vector3(Infinity, Infinity, Infinity);\n let max_world = new BABYLON_Vector3(-Infinity, -Infinity, -Infinity);\n filter.forEach(object => {\n object.mesh_iterator(true, mesh => {\n const bb = mesh.getBoundingInfo().boundingBox;\n min_world = new BABYLON_Vector3(Math.min(min_world.x, bb.minimumWorld.x), Math.min(min_world.y, bb.minimumWorld.y), Math.min(min_world.z, bb.minimumWorld.z));\n max_world = new BABYLON_Vector3(Math.max(max_world.x, bb.maximumWorld.x), Math.max(max_world.y, bb.maximumWorld.y), Math.max(max_world.z, bb.maximumWorld.z));\n });\n });\n const center_world = min_world.add(max_world).scale(0.5);\n export_translation = center_world.negate(); // Applying this translation to all objects will move the ceneter point to the global origin.\n // Apply export translation\n babylon_root_obj_ids.forEach(object_id => {\n const object = this.viewer.viewer_scene.objects.get(object_id);\n const pos = object.get_position().clone().add(export_translation);\n object.set_position(pos.x, pos.y, pos.z);\n });\n }\n // Disable viewer linting, follow BABYLON linting rules\n const options = {\n // eslint-disable-next-line\n shouldExportNode: (babylon_node) => babylon_ids.has(babylon_node.uniqueId)\n };\n return BABYLON_GLTF2Export.GLBAsync(this.scene, filename, options);\n })\n .then(gltf => {\n // Revert export translation\n if (center) {\n babylon_root_obj_ids.forEach(object_id => {\n const object = this.viewer.viewer_scene.objects.get(object_id);\n const pos = object.get_position().clone().subtract(export_translation);\n object.set_position(pos.x, pos.y, pos.z);\n });\n }\n return gltf.glTFFiles;\n });\n }\n create_material(name) {\n const new_material = new ViewerMaterial(`${name !== null && name !== void 0 ? name : 'material'}_${this.materials.length()}`, this.scene, this.viewer);\n new_material.sideOrientation = BABYLON_Material.CounterClockWiseSideOrientation;\n new_material.useLightmapAsShadowmap = true; // Lightmaps in viewer are always multiplicative\n new_material.roughness = 1.0;\n new_material.metallic = 1.0;\n return this.add_material_from_babylon(new_material);\n }\n add_material(v) {\n return this.materials.add(v || new Material(this.materials.next_id(), this.textures, this.freezing_manager));\n }\n add_material_from_babylon(v) {\n return this.materials.add(new Material(this.materials.next_id(), this.textures, this.freezing_manager, v));\n }\n /**\n * Returns true if any of the given nodes parents have any of the supplied names, false otherwise\n */\n has_parent_with_name(node, names) {\n let parent = node.parent;\n while (parent !== null) {\n for (let i = 0; i < names.length; i++) {\n const name = names[i];\n if (parent.name === name) {\n return true;\n }\n }\n parent = parent.parent;\n }\n return false;\n }\n /**\n * Checks if a given material is assigned to a mesh that is not used as a template.\n * @param material_id material to check\n * @returns true if the material is assigned to a mesh that is not used as a template\n */\n is_material_used(material_id) {\n var _a;\n const material = this.materials.get(material_id);\n const m = (_a = material.material) !== null && _a !== void 0 ? _a : material.multi_material;\n if (m !== null) {\n for (const key in m.meshMap) {\n const mesh = m.meshMap[key];\n if (mesh !== undefined) {\n if (mesh.isEnabled(true)) {\n return true;\n }\n else if (!this.has_parent_with_name(mesh, ['materials-templates', 'model-templates', 'source-meshes'])) {\n return true;\n }\n }\n }\n }\n return false;\n }\n delete_material(material_id) {\n if (!this.materials.contains(material_id)) {\n console.warn(`Not able to remove material with id: ${material_id}. The material ID provided does not exist.`);\n return false;\n }\n const material = this.materials.get(material_id);\n if (material.is_default_created_material) {\n console.error('Default materials will be deleted when their object is deleted. Do not call delete_material');\n return false;\n }\n if (material._material_url !== null) {\n console.error('Materials loaded from a gltf can not be deleted using delete_material, use unload_models instead');\n return false;\n }\n if (this.is_material_used(material_id)) {\n console.warn('delete_material; The material is in use!');\n }\n material.dispose();\n return this.materials.remove(material_id);\n }\n delete_material_if_default_created(material) {\n // NOTE: Shared materials are more or less assumed to be ready at construction\n if (material === null || !this.materials.contains(material)) {\n return;\n }\n const babylon_material = this.materials.get(material);\n if (!babylon_material.is_default_created_material) {\n return;\n }\n babylon_material.ready.then(() => {\n if (!this.materials.contains(material)) {\n return;\n }\n babylon_material.dispose();\n this.materials.remove(material);\n }, () => {\n console.warn('Babylon material is not ready to be disposed.');\n });\n }\n register_scene_lines(lines) {\n lines.disposed_observable.add_once(() => {\n this.lines.delete(lines);\n });\n this.lines.add(lines);\n }\n add_texture(v) {\n return this.textures.add(v);\n }\n dispose() {\n this.materials.dispose();\n this.textures.dispose();\n this.lines.forEach((line) => line.dispose());\n this.lines.clear();\n }\n}\nfunction texture_to_canvas(texture, flip_canvas) {\n return __awaiter(this, void 0, void 0, function* () {\n const pixels = yield texture.readPixels();\n const size = texture.getSize();\n const width = size.width;\n const height = size.height;\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n const ctx = canvas.getContext('2d');\n const image_data = ctx.createImageData(width, height);\n if (pixels instanceof Float32Array) {\n for (let i = 0; i < image_data.data.length; i++) {\n image_data.data[i] = Math.trunc(pixels[i] * 255);\n }\n }\n else {\n for (let i = 0; i < image_data.data.length; i++) {\n image_data.data[i] = pixels[i];\n }\n }\n ctx.putImageData(image_data, 0, 0);\n if (flip_canvas) {\n const flipped_canvas = document.createElement('canvas');\n flipped_canvas.width = width;\n flipped_canvas.height = height;\n const flipped_canvas_ctx = flipped_canvas.getContext('2d');\n flipped_canvas_ctx.save(); // Save the current state\n flipped_canvas_ctx.translate(0, height);\n flipped_canvas_ctx.scale(1.0, -1.0); // Set scale to flip the image\n flipped_canvas_ctx.drawImage(canvas, 0, 0, width, height); // draw the image\n flipped_canvas_ctx.restore(); // Restore the last saved state\n return flipped_canvas;\n }\n else {\n return canvas;\n }\n });\n}\nexport function debug_download_texture(texture) {\n return __awaiter(this, void 0, void 0, function* () {\n const canvas = yield texture_to_canvas(texture, false);\n const image = canvas.toDataURL('image/png');\n const link = document.createElement('a');\n link.href = image;\n link.download = `${texture.name || 'texture'}.png`;\n link.click();\n canvas.remove();\n });\n}\nexport function texture_to_base64(texture_1) {\n return __awaiter(this, arguments, void 0, function* (texture, mime_type = 'image/png', image_compression = 1.0) {\n const canvas = yield texture_to_canvas(texture, true);\n return canvas.toDataURL(mime_type, image_compression);\n });\n}\nexport function download_gltf_files(files) {\n function ends_with(str, suffix) {\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\n }\n for (const key in files) {\n const link = document.createElement('a');\n document.body.appendChild(link);\n link.setAttribute('type', 'hidden');\n link.download = key;\n const blob = files[key];\n let mime_type;\n if (ends_with(key, '.glb')) {\n mime_type = { type: 'model/gltf-binary' };\n }\n else if (ends_with(key, '.bin')) {\n mime_type = { type: 'application/octet-stream' };\n }\n else if (ends_with(key, '.gltf')) {\n mime_type = { type: 'model/gltf+json' };\n }\n else if (ends_with(key, '.jpeg') || ends_with(key, '.jpg')) {\n mime_type = { type: 'image/jpeg' };\n }\n else if (ends_with(key, '.png')) {\n mime_type = { type: 'image/png' };\n }\n link.href = window.URL.createObjectURL(new Blob([blob], mime_type));\n link.click();\n }\n}\n//# sourceMappingURL=AssetManager.js.map","import { RenderTargetTexture as BABYLON_RenderTargetTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/renderTargetTexture.js';\nimport { RenderingGroup as BABYLON_RenderingGroup } from '@inter-ikea-betrakta-babylonjs/core/Rendering/renderingGroup.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nimport { Texture as BABYLON_Texture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js';\nimport { IVector3 } from '../../api/IVector3.js';\n/**\n * This is an extension of Babylon' render target texture to provide some more lightweight rendering functionality.\n * It implements a function called \"render_lite\" which is a lighter version of just calling \"render\" on the render target,\n * and all it does is render the list of meshes you gave it.\n * No frustum culling or layer mask checks are performed, but transparent meshes are sorted back-to-front.\n */\nexport class LiteRenderTarget extends BABYLON_RenderTargetTexture {\n constructor(name, size, scene, generate_mipmaps = false, do_not_change_aspect_ratio = true, type = BABYLON_Constants.TEXTURETYPE_UNSIGNED_INT, is_cube = false, sampling_mode = BABYLON_Texture.TRILINEAR_SAMPLINGMODE, generate_depth_buffer = true, generate_stencil_buffer = false, is_multi = false, format = BABYLON_Constants.TEXTUREFORMAT_RGBA, delay_allocation = false, samples, creation_flags, no_color_attachment = false, use_srgb_buffer = false) {\n super(name, size, scene, generate_mipmaps, do_not_change_aspect_ratio, type, is_cube, sampling_mode, generate_depth_buffer, generate_stencil_buffer, is_multi, format, delay_allocation, samples, creation_flags, no_color_attachment, use_srgb_buffer);\n this._camera = null;\n this._opaque_render_list_part = [];\n this._transparent_render_list_part = [];\n this.lite_custom_render_function = (opaque, alpha_test, transparent, depth_only) => {\n const engine = this._scene.getEngine();\n // Depth only\n if (depth_only.length !== 0) {\n engine.setColorWrite(false);\n this.render_sorted(depth_only, BABYLON_RenderingGroup.PainterSortCompare, false);\n engine.setColorWrite(true);\n }\n // Opaque\n if (opaque.length !== 0) {\n this.render_sorted(opaque, BABYLON_RenderingGroup.PainterSortCompare, false);\n }\n // Alpha test\n if (alpha_test.length !== 0) {\n this.render_sorted(alpha_test, BABYLON_RenderingGroup.PainterSortCompare, false);\n }\n // Transparent\n if (transparent.length > 0) {\n // No sorting function as we sorted earlier, as sorting on submesh level is not sufficient.\n this.render_sorted(transparent, null, true);\n }\n };\n }\n prepare_render_list(render_list) {\n const scene = this.getScene();\n const current_scene_render_id = scene.getRenderId();\n for (let i = 0; i < render_list.length; i++) {\n const mesh = render_list[i];\n if (mesh && !mesh.isBlocked) {\n if (this.customIsReadyFunction) {\n if (!this.customIsReadyFunction(mesh, this.refreshRate, false)) {\n this.resetRefreshCounter();\n continue;\n }\n }\n else if (!mesh.isReady(this.refreshRate === 0)) {\n this.resetRefreshCounter();\n continue;\n }\n if (!mesh._internalAbstractMeshDataInfo._currentLODIsUpToDate && scene.activeCamera) {\n mesh._internalAbstractMeshDataInfo._currentLOD = scene.customLODSelector\n ? scene.customLODSelector(mesh, this.activeCamera || scene.activeCamera)\n : mesh.getLOD(this.activeCamera || scene.activeCamera);\n mesh._internalAbstractMeshDataInfo._currentLODIsUpToDate = true;\n }\n if (!mesh._internalAbstractMeshDataInfo._currentLOD) {\n continue;\n }\n let mesh_to_render = mesh._internalAbstractMeshDataInfo._currentLOD;\n mesh_to_render._preActivateForIntermediateRendering(current_scene_render_id);\n if (mesh.isEnabled() && mesh.isVisible && mesh.subMeshes) {\n if (mesh_to_render !== mesh) {\n mesh_to_render._activate(current_scene_render_id, true);\n }\n if (mesh._activate(current_scene_render_id, true) && mesh.subMeshes.length) {\n if (!mesh.isAnInstance) {\n mesh_to_render._internalAbstractMeshDataInfo._onlyForInstancesIntermediate = false;\n }\n else {\n if (mesh._internalAbstractMeshDataInfo._actAsRegularMesh) {\n mesh_to_render = mesh;\n }\n }\n mesh_to_render._internalAbstractMeshDataInfo._isActiveIntermediate = true;\n for (let sub_mesh_index = 0; sub_mesh_index < mesh_to_render.subMeshes.length; sub_mesh_index++) {\n const sub_mesh = mesh_to_render.subMeshes[sub_mesh_index];\n this._renderingManager.dispatch(sub_mesh, mesh_to_render);\n }\n }\n }\n }\n }\n }\n render_lite(camera, render_list) {\n var _a;\n this._camera = camera;\n // Split render list into opaque and transparent parts\n this._opaque_render_list_part.length = 0;\n this._transparent_render_list_part.length = 0;\n for (let i = 0; i < render_list.length; i++) {\n if ((_a = render_list[i].material) === null || _a === void 0 ? void 0 : _a.needAlphaBlending()) {\n this._transparent_render_list_part.push(render_list[i]);\n }\n else {\n this._opaque_render_list_part.push(render_list[i]);\n }\n }\n const view_z = camera.forward;\n for (let i = 0; i < this._transparent_render_list_part.length; i++) {\n this._transparent_render_list_part[i]['_viewer_lrt_distance_to_camera'] = IVector3.dot(view_z, this._transparent_render_list_part[i].getBoundingInfo().boundingSphere.centerWorld);\n }\n // We have to sort our transparent meshes before submitting to the rendering manager, otherwise we won't be able to sort our instances.\n this._transparent_render_list_part.sort((a, b) => {\n const k = Math.sign(a.alphaIndex - b.alphaIndex);\n return k + (1.0 - Math.abs(k)) * (b['_viewer_lrt_distance_to_camera'] - a['_viewer_lrt_distance_to_camera']);\n });\n this._renderingManager.reset();\n this.prepare_render_list(this._opaque_render_list_part);\n this.prepare_render_list(this._transparent_render_list_part);\n // @ts-ignore\n this._renderingManager.render(this.lite_custom_render_function, render_list, false, false);\n this._camera = null;\n }\n render_sorted(sub_meshes, sort_function, is_transparent) {\n const sorted_meshes = sub_meshes.length === sub_meshes.data.length ? sub_meshes.data : sub_meshes.data.slice(0, sub_meshes.length);\n if (sort_function) {\n sorted_meshes.sort(sort_function);\n }\n for (let i = 0; i < sorted_meshes.length; i++) {\n const sub_mesh = sorted_meshes[i];\n if (is_transparent) {\n const material = sub_mesh.getMaterial();\n if (material && material.needDepthPrePass) {\n const engine = material.getScene().getEngine();\n engine.setColorWrite(false);\n engine.setAlphaMode(BABYLON_Constants.ALPHA_DISABLE);\n sub_mesh.render(false);\n engine.setColorWrite(true);\n }\n }\n sub_mesh.render(is_transparent);\n }\n }\n}\n//# sourceMappingURL=LiteRenderTarget.js.map","import { Engine as BABYLON_Engine } from '@inter-ikea-betrakta-babylonjs/core/Engines/engine.js';\nimport { Texture as BABYLON_Texture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js';\nimport { PassPostProcess as BABYLON_PassPostProcess } from '@inter-ikea-betrakta-babylonjs/core/PostProcesses/passPostProcess.js';\nimport { Camera as BABYLON_Camera } from '@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { ThinTexture as BABYLON_ThinTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/thinTexture.js';\nimport { LiteRenderTarget } from './utility/LiteRenderTarget.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nexport var ViewerFramebufferType;\n(function (ViewerFramebufferType) {\n ViewerFramebufferType[ViewerFramebufferType[\"RGBA8\"] = 0] = \"RGBA8\";\n ViewerFramebufferType[ViewerFramebufferType[\"R11_G11_B10F\"] = 1] = \"R11_G11_B10F\";\n ViewerFramebufferType[ViewerFramebufferType[\"RGBA16F\"] = 2] = \"RGBA16F\";\n ViewerFramebufferType[ViewerFramebufferType[\"RGBA32F\"] = 3] = \"RGBA32F\";\n})(ViewerFramebufferType || (ViewerFramebufferType = {}));\nfunction get_babylon_texture_type(type) {\n if (type === ViewerFramebufferType.R11_G11_B10F) {\n return BABYLON_Engine.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV;\n }\n else if (type === ViewerFramebufferType.RGBA16F) {\n return BABYLON_Engine.TEXTURETYPE_HALF_FLOAT;\n }\n else if (type === ViewerFramebufferType.RGBA32F) {\n return BABYLON_Engine.TEXTURETYPE_FLOAT;\n }\n else if (type === ViewerFramebufferType.RGBA8) {\n return BABYLON_Engine.TEXTURETYPE_UNSIGNED_BYTE;\n }\n else {\n console.error('Missing format conversion for ViewerFramebufferType: ' + type);\n return BABYLON_Engine.TEXTURETYPE_UNSIGNED_BYTE;\n }\n}\nfunction get_babylon_texture_format(type) {\n if (type === ViewerFramebufferType.R11_G11_B10F) {\n return BABYLON_Engine.TEXTUREFORMAT_RGB;\n }\n else if (type === ViewerFramebufferType.RGBA8 ||\n type === ViewerFramebufferType.RGBA16F ||\n type === ViewerFramebufferType.RGBA32F) {\n return BABYLON_Engine.TEXTUREFORMAT_RGBA;\n }\n else {\n console.error('Missing format conversion for ViewerFramebufferType: ' + type);\n return BABYLON_Engine.TEXTUREFORMAT_RGBA;\n }\n}\nfunction get_opengl_texture_format_sized(gl, type) {\n if (type === ViewerFramebufferType.R11_G11_B10F) {\n return gl.R11F_G11F_B10F;\n }\n else if (type === ViewerFramebufferType.RGBA16F) {\n return gl.RGBA16F;\n }\n else if (type === ViewerFramebufferType.RGBA32F) {\n return gl.RGBA32F;\n }\n else if (type === ViewerFramebufferType.RGBA8) {\n return gl.RGBA8;\n }\n else {\n console.error('Missing format conversion for ViewerFramebufferType: ' + type);\n return gl.RGBA8;\n }\n}\n/**\n * A class used to bypass Babylon's depth renderer, to allow for much greater efficiency.\n * Babylon's depth renderer actually renders the entire scene into its own color buffer with depth data, which is very wasteful.\n * When rendering to an offscreen framebuffer (the point of the Framebuffer class), with WebGL 2 we can just use the depth data\n * from our forward pass, instead of re-rendering everything. And that's what this class does.\n *\n * With this class we can also choose depth format freely (settled for 24-bits for now). With Babylon's render targets you only get 16 bits or 32F, where the former is not enough, and the latter is wasteful.\n */\nexport class IntegratedDepthRenderer {\n constructor(engine, render_target, msaa_samples) {\n var _a;\n this._engine = engine;\n this._render_target = render_target;\n this._msaa_samples = msaa_samples;\n this._depth_sized_format = engine._gl.DEPTH_COMPONENT24;\n const gl = engine._gl;\n const width = render_target.getRenderWidth();\n const height = render_target.getRenderHeight();\n // Create and inject a depth renderbuffer into the Babylon render target (framebuffer).\n // According to the spec, createRenderbuffer can't return null.\n this._depth_render_buffer = gl.createRenderbuffer();\n gl.bindRenderbuffer(gl.RENDERBUFFER, this._depth_render_buffer);\n if (this._msaa_samples > 1) {\n gl.renderbufferStorageMultisample(gl.RENDERBUFFER, msaa_samples, this._depth_sized_format, width, height);\n }\n else {\n gl.renderbufferStorage(gl.RENDERBUFFER, this._depth_sized_format, width, height);\n }\n gl.bindRenderbuffer(gl.RENDERBUFFER, null);\n // Attaching the renderbuffer to Babylon's framebuffer\n engine.bindFramebuffer(this._render_target.renderTarget);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, this._depth_render_buffer);\n const opt = {};\n this._internal_depth_texture = engine._createInternalTexture({ width: width, height: height }, opt);\n this._depth_texture_wrapper = new BABYLON_ThinTexture(this._internal_depth_texture);\n // Create the depth texture meant to be read by shaders.\n gl.bindTexture(gl.TEXTURE_2D, this._internal_depth_texture._hardwareTexture.underlyingResource);\n gl.texImage2D(gl.TEXTURE_2D, 0, this._depth_sized_format, width, height, 0, gl.DEPTH_COMPONENT, gl.UNSIGNED_INT, null);\n // Set sampler parameters (filtering and wrapping), required for the texture to be complete.\n // Force nearest sampling as interpolating non-linear depth is not something you usually want to do. And not sure about hardware support.\n // It's useful for shadow mapping, but that's not what this is for.\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n // Clamp to edge, can't think of any case where you'd want a tiling depth texture.\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n // Attach the depth texture to a simple framebuffer (used so we have something to blit the renderbuffer onto)\n this._depth_blit_fbo = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, this._depth_blit_fbo);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_2D, (_a = this._internal_depth_texture._hardwareTexture) === null || _a === void 0 ? void 0 : _a.underlyingResource, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n }\n dispose() {\n const gl = this._engine._gl;\n gl.deleteFramebuffer(this._depth_blit_fbo);\n this._depth_texture_wrapper.dispose();\n this._internal_depth_texture.dispose();\n gl.deleteRenderbuffer(this._depth_render_buffer);\n }\n /**\n * This function makes the depth data from the forward pass readable from the depth texture.\n * Call after rendering the main render target, before needing the depth texture.\n */\n prepare_depth() {\n const width = this._render_target.getRenderWidth();\n const height = this._render_target.getRenderHeight();\n const gl = this._engine._gl;\n this._engine.bindFramebuffer(this._render_target.renderTarget);\n gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, this._depth_blit_fbo);\n gl.blitFramebuffer(0, 0, width, height, 0, 0, width, height, gl.DEPTH_BUFFER_BIT, gl.NEAREST);\n }\n resize(width, height) {\n const gl = this._engine._gl;\n gl.bindRenderbuffer(gl.RENDERBUFFER, this._depth_render_buffer);\n if (this._msaa_samples > 1) {\n gl.renderbufferStorageMultisample(gl.RENDERBUFFER, this._msaa_samples, this._depth_sized_format, width, height);\n }\n else {\n gl.renderbufferStorage(gl.RENDERBUFFER, this._depth_sized_format, width, height);\n }\n gl.bindRenderbuffer(gl.RENDERBUFFER, null);\n // This may seem odd, but Babylon kills its framebuffers on resize, so we must re-attach our custom render buffer.\n // If that ever changes in the future, this will error (can't attach a renderbuffer to multiple framebuffers simultaneously)\n // NOTE: Check for error on Babylon update\n this._engine.bindFramebuffer(this._render_target.renderTarget);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, this._depth_render_buffer);\n gl.bindTexture(gl.TEXTURE_2D, this._internal_depth_texture._hardwareTexture.underlyingResource);\n gl.texImage2D(gl.TEXTURE_2D, 0, this._depth_sized_format, width, height, 0, gl.DEPTH_COMPONENT, gl.UNSIGNED_INT, null);\n }\n get_depth_texture() {\n return this._depth_texture_wrapper;\n }\n}\nconst ext_webgl2_float_texture_color_buffer = 'EXT_color_buffer_float';\nexport class Framebuffer {\n static is_float_framebuffer_supported(engine) {\n const is_webgl_1 = engine.webGLVersion === 1;\n const gl = engine._gl;\n return !is_webgl_1 && gl.getExtension(ext_webgl2_float_texture_color_buffer) !== null;\n }\n static is_depth_renderer_supported(engine) {\n const is_webgl_1 = engine.webGLVersion === 1;\n // We could theoretically check for extensions here that would allow us to support our required depth precision and blitting.\n return !is_webgl_1;\n }\n /**\n * A function that helps you find the closest number of MSAA samples that is less or equal to the wanted samples.\n * @param wanted_msaa_samples How many MSAA samples you ideally want\n * @param use_float_buffer If you will be rendering to a float framebuffer (if true, assumes Framebuffer.is_float_framebuffer_supported() is true).\n * @returns The number of MSAA samples supported\n */\n static get_supported_msaa_samples(engine, wanted_msaa_samples, type) {\n const gl = engine._gl;\n // Check if supported format\n const is_webgl_1 = engine.webGLVersion === 1;\n if (!is_webgl_1) {\n const texture_format = get_opengl_texture_format_sized(gl, type);\n const supported_msaa_samples = gl.getInternalformatParameter(gl.RENDERBUFFER, texture_format, gl.SAMPLES);\n if (supported_msaa_samples !== null) {\n let supported_msaa = 1;\n for (let i = 0; i < supported_msaa_samples.length; i++) {\n if (supported_msaa_samples[i] <= wanted_msaa_samples) {\n supported_msaa = Math.max(supported_msaa, supported_msaa_samples[i]);\n }\n }\n return supported_msaa;\n }\n else {\n // This potentially means that this format is not supported at all. The documentation is vague on what getInternalformatParameter actually returns MSAA is not supported.\n // From testing, it seems that it returns an empty object when MSAA is not supported but it still is color-renderable, and returns null when it's not a supported color-renderable format.\n // But to be on the safe side, we assume that both null and empty object both mean that no MSAA is supported. It's not up to this function whether to determine if it's a color-renderable format or not.\n return 1;\n }\n }\n else {\n // If we're on WebGL 1, we have no way of checking supported MSAA samples other than creating framebuffers and looking for errors?\n // TODO? For now we just eat what the user gives us.\n return wanted_msaa_samples;\n }\n }\n /**\n *\n * @param scene The Babylon scene\n * @param width width of the framebuffer\n * @param height height of the framebuffer\n * @param camera the scene's camera to apply the framebuffer to (Babylon architecture)\n * @param msaa_samples Number of MSAA samples. 1 == no MSAA\n * @param use_float_buffer Whether to enable float buffer for HDR rendering. Check for support with Framebuffer.is_float_framebuffer_supported()\n * @param enable_depth_renderer Whether to enable the depth renderer or not. Check for support with Framebuffer.is_depth_renderer_supported\n */\n constructor(scene, type, width, height, camera, msaa_samples, enable_depth_renderer) {\n this._scene = scene;\n this.type = type;\n // Sanity check. Should have been assured by the user calling this constructor.\n if (this.is_float_render_target() && !Framebuffer.is_float_framebuffer_supported(scene.getEngine())) {\n console.error('Viewer Framebuffer created with unsupported float textures.');\n }\n // The caller of this constructor should have made sure the number of MSAA samples is supported.\n // But we do a sanity check just-in-case, and report an error.\n if (msaa_samples !== Framebuffer.get_supported_msaa_samples(this._scene.getEngine(), msaa_samples, type)) {\n console.error('Viewer Framebuffer created with unsupported number of MSAA samples.');\n }\n this._msaa_samples = msaa_samples;\n const texture_type = get_babylon_texture_type(type);\n const is_srgb = texture_type === BABYLON_Engine.TEXTURETYPE_UNSIGNED_BYTE;\n // WebGL1 doesn't guarantee RGB8 framebuffers, so we must use RGBA.\n const texture_format = get_babylon_texture_format(type);\n // WebGL1 doesn't seem to support bilinear sampling on framebuffer attachments, so here we branch!\n // It creates ugly pixels when sub-/super-sampling on Views, but that's okay since WebGL1 is on life support.\n const sampler_filter_type = scene.getEngine().webGLVersion === 2\n ? BABYLON_Texture.BILINEAR_SAMPLINGMODE\n : BABYLON_Texture.NEAREST_SAMPLINGMODE;\n // We don't use stencil buffers\n const generate_stencil = false;\n // The depth renderer injects its own depth render buffer into the render target,\n // so if we don't use the depth renderer, we let Babylon create its own depth buffer.\n const generate_depth = !enable_depth_renderer;\n this._render_target = new LiteRenderTarget('viewer-fbo', { width: width, height: height }, scene, false, undefined, texture_type, false, sampler_filter_type, generate_depth, generate_stencil, false, texture_format, false, msaa_samples, undefined, false, is_srgb);\n this._render_target.wrapU = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n this._render_target.wrapV = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n // We have to use a custom camera for our blit postprocess, for some Babylon reason. Otherwise it breaks.\n this.postprocess_camera = new BABYLON_Camera('viewer-fbo-postprocess', new BABYLON_Vector3());\n this._render_target.ignoreCameraViewport = true;\n camera.outputRenderTarget = this._render_target;\n this._render_target.activeCamera = camera;\n this._blit_effect = new BABYLON_PassPostProcess('viewer-fbo-blit', { width: width, height: height }, this.postprocess_camera);\n this._blit_effect.forceFullscreenViewport = true;\n this._blit_effect.onApply = (effect) => {\n effect.setTexture('textureSampler', this._render_target);\n };\n if (enable_depth_renderer) {\n // Sanity check, but should be assured by the caller of this constructor\n if (!Framebuffer.is_depth_renderer_supported(this._scene.getEngine())) {\n console.error('Viewer Framebuffer creating unsupported depth renderer');\n }\n this._depth_renderer = new IntegratedDepthRenderer(scene.getEngine(), this._render_target, msaa_samples);\n }\n else {\n this._depth_renderer = null;\n }\n }\n resize(width, height) {\n if (this._render_target.getRenderWidth() !== width || this._render_target.getRenderHeight() !== height) {\n this._render_target.resize({ width: width, height: height });\n if (this._depth_renderer !== null) {\n this._depth_renderer.resize(width, height);\n }\n }\n }\n is_float_render_target() {\n return this.type === ViewerFramebufferType.R11_G11_B10F ||\n this.type === ViewerFramebufferType.RGBA16F ||\n this.type === ViewerFramebufferType.RGBA32F;\n }\n get_texture() {\n return this._render_target;\n }\n get_depth_texture() {\n if (this._depth_renderer === null) {\n return null;\n }\n else {\n return this._depth_renderer.get_depth_texture();\n }\n }\n get_render_target() {\n return this._render_target;\n }\n get_msaa_samples() {\n return this._msaa_samples;\n }\n get_width() {\n return this._render_target.getRenderWidth();\n }\n get_height() {\n return this._render_target.getRenderHeight();\n }\n dispose() {\n var _a;\n this._render_target.dispose();\n this.postprocess_camera.dispose();\n this._blit_effect.dispose();\n (_a = this._depth_renderer) === null || _a === void 0 ? void 0 : _a.dispose();\n }\n prepare_depth_buffer_texture() {\n if (this._depth_renderer !== null) {\n this._depth_renderer.prepare_depth();\n }\n }\n blit(destination) {\n this._scene.postProcessManager.directRender([this._blit_effect], destination, true);\n }\n // TODO: Terrible design to render a list of objects through the framebuffer. But this is how babylon works, but needs rework for Views.\n // Used by screenshots.\n custom_render(render_list) {\n const previous_render_list = this._render_target.renderList;\n this._render_target.renderList = render_list;\n this._render_target.render();\n this._render_target.renderList = previous_render_list;\n }\n bind() {\n this._render_target._bindFrameBuffer();\n }\n}\n//# sourceMappingURL=Framebuffer.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/accumulation_buffer.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'accumulation_bufferPixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\n#ifdef USE_EXACT_SRGB_CONVERSIONS\n#undef USE_EXACT_SRGB_CONVERSIONS\n#endif\n#include \nuniform highp sampler2D textureSampler;\nuniform highp sampler2D previousFrames;\nuniform float accumulationBlend;\n#ifdef ENABLE_TONEMAPPING\nvec3 tonemap(vec3 color);\n#endif\n#ifdef ENABLE_BLOOM\nvec3 getBloom();\n#else\nvec3 getBloom() { return vec3(0.0); }\n#endif\n#ifdef ENABLE_LUT\nuniform highp sampler2DArray lutSampler;\n#endif\nconst float VIEWER_GAMMA = 2.2;\nvoid main(void)\n{\nvec4 currentFramePixelValue = texture2D(textureSampler, vUV);\n#ifndef ENABLE_TONEMAPPING\ncurrentFramePixelValue.rgb = pow(currentFramePixelValue.rgb, vec3(VIEWER_GAMMA));\n#endif\ncurrentFramePixelValue.rgb += getBloom();\n#ifdef ENABLE_TONEMAPPING\ncurrentFramePixelValue.rgb = tonemap(currentFramePixelValue.rgb);\n#endif\ncurrentFramePixelValue.rgb = clamp(currentFramePixelValue.rgb, 0.0, 1.0);\ncurrentFramePixelValue.rgb = pow(currentFramePixelValue.rgb, vec3(1.0 / VIEWER_GAMMA));\n#ifdef ENABLE_LUT\nfloat lutDepth = float(textureSize(lutSampler, 0).r);\nfloat lutLayer = (lutDepth - 1.0) * currentFramePixelValue.b;\nfloat inverseLutDepth = 1.0 / lutDepth;\nvec2 lutUV = currentFramePixelValue.rg * (1.0 - inverseLutDepth) + vec2(0.5 * inverseLutDepth);\nvec3 lutA = texture(lutSampler, vec3(lutUV, floor(lutLayer))).rgb;\nvec3 lutB = texture(lutSampler, vec3(lutUV, floor(lutLayer) + 1.0)).rgb;\ncurrentFramePixelValue.rgb = mix(lutA, lutB, fract(lutLayer));\n#endif\nvec4 accumulatedPixelValue = texture2D(previousFrames, vUV);\ngl_FragColor = mix(accumulatedPixelValue, currentFramePixelValue, accumulationBlend);\n}\n#ifdef ENABLE_TONEMAPPING\nconst mat3 ACESInputMat = mat3(\nvec3(0.59719, 0.07600, 0.02840),\nvec3(0.35458, 0.90834, 0.13383),\nvec3(0.04823, 0.01566, 0.83777)\n);\nconst mat3 ACESOutputMat = mat3(\nvec3( 1.60475, -0.10208, -0.00327),\nvec3(-0.53108, 1.10813, -0.07276),\nvec3(-0.07367, -0.00605, 1.07602)\n);\nvec3 RRTAndODTFit(vec3 v)\n{\nvec3 a = v * (v + 0.0245786) - 0.000090537;\nvec3 b = v * (0.983729 * v + 0.4329510) + 0.238081;\nreturn a / b;\n}\nvec3 tonemap(vec3 color)\n{\ncolor = ACESInputMat * color;\ncolor = RRTAndODTFit(color);\ncolor = ACESOutputMat * color;\nreturn color;\n}\n#endif\n#ifdef ENABLE_BLOOM\nuniform mediump sampler2D bloomSampler[BLOOM_LEVELS_COUNT];\nuniform float bloomIntensity;\nvec3 getBloom() {\nif (bloomIntensity == 0.0) return vec3(0.0);\nconst vec3 weights = vec3(0.25, 0.5, 2.5);\nvec3 bloom;\nbloom = texture2D(bloomSampler[0], vUV).rgb * weights[0];\nbloom += texture2D(bloomSampler[1], vUV).rgb * weights[1];\nbloom += texture2D(bloomSampler[2], vUV).rgb * weights[2];\nreturn (bloomIntensity / dot(weights, vec3(1.0))) * bloom;\n}\n#endif\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const accumulation_bufferPixelShader = { name, shader };\n//# sourceMappingURL=accumulation_buffer.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/bloom_downsample.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'bloom_downsamplePixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\nuniform mediump sampler2D sourceSampler;\nuniform vec2 direction;\nuniform float uvScale;\n#ifdef ENABLE_FILTERING\nuniform vec2 luminanceRange;\nuniform float luminanceRangeExponent;\nuniform mediump sampler2D depthInput;\n#endif\nfloat get_luminance(vec3 rgb) {\nreturn dot(rgb, vec3(0.2126, 0.7152, 0.0722));\n}\nvoid main(void)\n{\nvec2 baseUv = uvScale * gl_FragCoord.xy;\nvec4 result = vec4(0.0);\nfor (float x = 0.0; x < float(DOWNSAMPLE_FACTOR); x++) {\nivec2 texelUv = ivec2(baseUv + (x - float(DOWNSAMPLE_FACTOR) * 0.5) * direction);\nvec4 texel = texelFetch(sourceSampler, texelUv, 0);\n#ifdef ENABLE_FILTERING\nfloat luminance = get_luminance(texel.rgb);\ntexel *= pow(clamp((luminance - luminanceRange.x) / (luminanceRange.y - luminanceRange.x), 0.0, 1.0), luminanceRangeExponent);\ntexel /= max(1.0, luminance / luminanceRange.y);\ntexel *= 0.1;\ntexel *= 1.0 - step(1.0, texelFetch(depthInput, texelUv, 0).r);\n#endif\nresult += texel;\n}\ngl_FragColor = result / float(DOWNSAMPLE_FACTOR);\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const bloom_downsamplePixelShader = { name, shader };\n//# sourceMappingURL=bloom_downsample.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/bloom_blur.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'bloom_blurPixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\nuniform mediump sampler2D sourceSampler;\nuniform vec2 direction;\nconst float weights[] = float[](0.0092,\t0.0278,\t0.0656,\t0.1210,\t0.1747,\t0.1974,\t0.1747,\t0.1210,\t0.0656,\t0.0278,\t0.0092);\nconst float weightCount = 11.0;\nvoid main(void)\n{\nvec4 result = vec4(0.0);\nfor(float x = 0.0; x < weightCount; x++) {\nfloat k = x - (weightCount - 1.0) * 0.5;\nresult += weights[int(x)] * texelFetch(sourceSampler, ivec2(gl_FragCoord.xy + k * direction), 0);\n}\ngl_FragColor = result;\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const bloom_blurPixelShader = { name, shader };\n//# sourceMappingURL=bloom_blur.fragment.js.map","import { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Engine as BABYLON_Engine } from '@inter-ikea-betrakta-babylonjs/core/Engines/engine.js';\nimport { Camera as BABYLON_Camera } from '@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js';\nimport { RenderTargetTexture as BABYLON_RenderTargetTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/renderTargetTexture.js';\nimport { PostProcess as BABYLON_PostProcess } from '@inter-ikea-betrakta-babylonjs/core/PostProcesses/postProcess.js';\n// Side effect\nimport './shaders/bloom_downsample.fragment.js';\nimport './shaders/bloom_blur.fragment.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nconst LUMINANCE_CUT_RANGE = 'luminanceRange';\nconst LUMINANCE_RANGE_EXPONENT = 'luminanceRangeExponent';\nconst BLUR_DIRECTION = 'direction';\nconst SOURCE_TEXTURE = 'sourceSampler';\nconst BLURRED_INPUT_TEXTURE = 'blurredInput';\nconst DOWNSAMPLE_UV_SCALE = 'uvScale';\nconst DOWNSAMPLE_DEPTH_TEXTURE = 'depthInput';\nexport class BloomEffect {\n constructor(scene, framebuffer, gpu_profiler) {\n this._downsampled_textures = [];\n this._blur_input_texture = null;\n this._blur_input_direction = { x: 0, y: 0 };\n this._downsample_uv_scale = 1.0;\n this._shader_source_texture = null;\n this._downsample_factor = 5;\n this.intensity = 1.0;\n this.min_luminance = 0.5;\n this.max_luminance = 500.0;\n this.luminance_exponent = 0.25;\n this._profiling = null;\n if (gpu_profiler !== null) {\n this._profiling = {\n profiler: gpu_profiler,\n section_total: gpu_profiler.create_section('Bloom total'),\n section_downsample: gpu_profiler.create_section('Bloom downsample'),\n section_blur: gpu_profiler.create_section('Bloom blur'),\n section_composite: gpu_profiler.create_section('Bloom composite')\n };\n }\n this._input_framebuffer = framebuffer;\n this._post_process_camera = new BABYLON_Camera('bloom_postprocess_camera', new BABYLON_Vector3(0, 0, 0), scene);\n const downsampled_texture_count = BloomEffect.BLOOM_LEVELS_COUNT;\n const blurred_texture_names = [];\n for (let i = 1; i <= downsampled_texture_count; i++) {\n const downsampled_width = Math.max(1, framebuffer.get_width() / Math.pow(this._downsample_factor, i));\n const downsampled_height = Math.max(1, framebuffer.get_height() / Math.pow(this._downsample_factor, i));\n this._downsampled_textures.push(new BABYLON_RenderTargetTexture('bloom_downsampled_' + i, { width: downsampled_width, height: downsampled_height }, scene, false, undefined, BABYLON_Engine.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV, false, BABYLON_Engine.TEXTURE_BILINEAR_SAMPLINGMODE, false, false, false, BABYLON_Engine.TEXTUREFORMAT_RGB, false, 1));\n blurred_texture_names.push(BLURRED_INPUT_TEXTURE + '[' + (i - 1) + ']');\n }\n this._blur_backbuffer = new BABYLON_RenderTargetTexture('bloom_blur_backbuffer', { width: framebuffer.get_width() / this._downsample_factor, height: framebuffer.get_height() / this._downsample_factor }, scene, false, undefined, BABYLON_Engine.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV, false, BABYLON_Engine.TEXTURE_BILINEAR_SAMPLINGMODE, false, false, false, BABYLON_Engine.TEXTUREFORMAT_RGB, false, 1);\n this._downsampled_textures.forEach((render_target) => {\n render_target.wrapU = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n render_target.wrapV = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n });\n this._blur_backbuffer.wrapU = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n this._blur_backbuffer.wrapV = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n this._blur_effect = new BABYLON_PostProcess('bloom_blur', 'bloom_blur', [\n BLUR_DIRECTION\n ], [\n SOURCE_TEXTURE\n ], { width: 32, height: 32 }, // Dummy data\n this._post_process_camera, undefined, scene.getEngine(), true);\n this._blur_effect.onApply = (effect) => {\n effect.setFloat2(BLUR_DIRECTION, this._blur_input_direction.x, this._blur_input_direction.y);\n effect.setTexture(SOURCE_TEXTURE, this._blur_input_texture);\n };\n const downsample_on_apply = (effect) => {\n if (this._shader_source_texture == null) {\n console.error('Trying to render bloom blur without input texture.');\n }\n effect.setTexture(SOURCE_TEXTURE, this._shader_source_texture);\n effect.setFloat2(BLUR_DIRECTION, this._blur_input_direction.x, this._blur_input_direction.y);\n effect.setFloat(DOWNSAMPLE_UV_SCALE, this._downsample_uv_scale);\n };\n this._downsample_and_filter_effect = new BABYLON_PostProcess('bloom_downsample_and_filter', 'bloom_downsample', [\n LUMINANCE_CUT_RANGE,\n LUMINANCE_RANGE_EXPONENT,\n BLUR_DIRECTION,\n DOWNSAMPLE_UV_SCALE\n ], [\n SOURCE_TEXTURE, DOWNSAMPLE_DEPTH_TEXTURE\n ], { width: 32, height: 32 }, // Dummy data\n this._post_process_camera, undefined, scene.getEngine(), true, '#define DOWNSAMPLE_FACTOR ' + this._downsample_factor + '\\n#define ENABLE_FILTERING');\n this._downsample_and_filter_effect.externalTextureSamplerBinding = true;\n this._downsample_and_filter_effect.onApply = (effect) => {\n downsample_on_apply(effect);\n effect.setFloat2(LUMINANCE_CUT_RANGE, this.min_luminance, this.max_luminance);\n effect.setFloat(LUMINANCE_RANGE_EXPONENT, this.luminance_exponent);\n effect.setTexture(DOWNSAMPLE_DEPTH_TEXTURE, this._input_framebuffer.get_depth_texture());\n };\n this._downsample_effect = new BABYLON_PostProcess('bloom_downsample', 'bloom_downsample', [\n BLUR_DIRECTION,\n DOWNSAMPLE_UV_SCALE\n ], [\n SOURCE_TEXTURE\n ], { width: 32, height: 32 }, // Dummy data\n this._post_process_camera, undefined, scene.getEngine(), true, '#define DOWNSAMPLE_FACTOR ' + this._downsample_factor);\n this._downsample_effect.externalTextureSamplerBinding = true;\n this._downsample_effect.onApply = downsample_on_apply;\n }\n get result_textures() {\n return this._downsampled_textures;\n }\n render(scene) {\n var _a, _b, _c, _d, _e, _f;\n if (this.intensity === 0.0) {\n // If our effect will have no effect on the image, skip rendering.\n return;\n }\n (_a = this._profiling) === null || _a === void 0 ? void 0 : _a.section_total.start();\n (_b = this._profiling) === null || _b === void 0 ? void 0 : _b.section_downsample.start();\n for (let i = 0; i < this._downsampled_textures.length; i++) {\n this._shader_source_texture = i === 0 ? this._input_framebuffer.get_texture() : this._downsampled_textures[i - 1];\n const vertical_effect = i === 0 ? this._downsample_and_filter_effect : this._downsample_effect;\n const horizontal_effect = this._downsample_effect;\n this._blur_input_direction.x = 0;\n this._blur_input_direction.y = 1;\n this._downsample_uv_scale = this._downsample_factor;\n this._blur_backbuffer._bindFrameBuffer();\n scene.postProcessManager.directRender([vertical_effect], null, false, undefined, undefined, true);\n this._shader_source_texture = this._blur_backbuffer;\n this._downsample_uv_scale = 1.0;\n this._blur_input_direction.x = 1;\n this._blur_input_direction.y = 0;\n scene.postProcessManager.directRender([horizontal_effect], this._downsampled_textures[i].renderTarget, true);\n }\n (_c = this._profiling) === null || _c === void 0 ? void 0 : _c.section_downsample.stop();\n (_d = this._profiling) === null || _d === void 0 ? void 0 : _d.section_blur.start();\n // The for loop here is in reverse to accomodate that we want to start with the smallest render target,\n // as we use the same full-size \"backbuffer\" for all passes. If we do the biggest one first, we will get bleeding in the smaller render targets.\n for (let i = this._downsampled_textures.length - 1; i >= 0; i--) {\n this._blur_effect.width = this._downsampled_textures[i].getSize().width;\n this._blur_effect.height = this._downsampled_textures[i].getSize().height;\n this._blur_input_texture = this._downsampled_textures[i];\n this._blur_input_direction.x = 0;\n this._blur_input_direction.y = 1;\n this._blur_backbuffer._bindFrameBuffer();\n scene.getEngine()._gl.viewport(0, 0, this._blur_effect.width, this._blur_effect.height);\n scene.postProcessManager.directRender([this._blur_effect], null, false, undefined, undefined, true);\n this._blur_input_texture = this._blur_backbuffer;\n this._blur_input_direction.x = 1;\n this._blur_input_direction.y = 0;\n scene.postProcessManager.directRender([this._blur_effect], this._downsampled_textures[i].renderTarget, true);\n }\n (_e = this._profiling) === null || _e === void 0 ? void 0 : _e.section_blur.stop();\n (_f = this._profiling) === null || _f === void 0 ? void 0 : _f.section_total.stop();\n }\n resize(width, height) {\n for (let i = 0; i < this._downsampled_textures.length; i++) {\n const downsampled_width = Math.max(1, width / Math.pow(this._downsample_factor, i + 1));\n const downsampled_height = Math.max(1, height / Math.pow(this._downsample_factor, i + 1));\n this._downsampled_textures[i].resize({ width: downsampled_width, height: downsampled_height });\n }\n this._blur_backbuffer.resize({ width: width / this._downsample_factor, height: height / this._downsample_factor });\n }\n dispose() {\n this._downsample_effect.dispose();\n this._blur_effect.dispose();\n this._blur_backbuffer.dispose();\n this._downsampled_textures.forEach((render_target) => {\n render_target.dispose();\n });\n this._downsampled_textures.length = 0;\n this._post_process_camera.dispose();\n this._blur_input_texture = null;\n this._shader_source_texture = null;\n }\n}\nBloomEffect.BLOOM_LEVELS_COUNT = 3;\n//# sourceMappingURL=Bloom.js.map","import { PostProcess as BABYLON_PostProcess } from '@inter-ikea-betrakta-babylonjs/core/PostProcesses/postProcess.js';\nimport { IMatrix4, IVector2, IVector3, IVector4 } from '../../api.js';\nimport { Matrix as BABYLON_Matrix, Vector3 } from '../../Math.js';\nimport { Camera as BABYLON_Camera } from '@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js';\nexport var ShaderDescriptorType;\n(function (ShaderDescriptorType) {\n ShaderDescriptorType[ShaderDescriptorType[\"SAMPLER_2D\"] = 0] = \"SAMPLER_2D\";\n ShaderDescriptorType[ShaderDescriptorType[\"FLOAT\"] = 1] = \"FLOAT\";\n ShaderDescriptorType[ShaderDescriptorType[\"INT\"] = 2] = \"INT\";\n ShaderDescriptorType[ShaderDescriptorType[\"UINT\"] = 3] = \"UINT\";\n ShaderDescriptorType[ShaderDescriptorType[\"VEC2\"] = 4] = \"VEC2\";\n ShaderDescriptorType[ShaderDescriptorType[\"VEC3\"] = 5] = \"VEC3\";\n ShaderDescriptorType[ShaderDescriptorType[\"VEC4\"] = 6] = \"VEC4\";\n ShaderDescriptorType[ShaderDescriptorType[\"MAT4\"] = 7] = \"MAT4\";\n})(ShaderDescriptorType || (ShaderDescriptorType = {}));\nexport class ShaderDescription {\n constructor(shader_name) {\n this._descriptors = [];\n this.shader_name = shader_name;\n }\n add_descriptor(type, location) {\n const handle = {\n _descriptor_index: this._descriptors.length,\n type: type\n };\n this._descriptors.push({\n type: type,\n location: location,\n value: 0.0,\n has_been_set: false,\n uninitialized_data_has_warned: false\n });\n return handle;\n }\n /** @internal */\n get_descriptors() {\n return this._descriptors;\n }\n}\nexport class PostProcessShader {\n constructor(scene, description, defines = []) {\n // For Babylon when creating the shader\n this._uniform_names = [];\n this._sampler_names = [];\n // Internally we never store Babylon matrices, only IMatrix4\n this._descriptors = [];\n this._scene = scene;\n // Find all samplers and uniform names to give to Babylon\n const descriptors = description.get_descriptors();\n this._descriptors.length = descriptors.length;\n for (let i = 0; i < descriptors.length; i++) {\n const type = descriptors[i].type;\n this._descriptors[i] = Object.assign({}, descriptors[i]);\n if (type === ShaderDescriptorType.SAMPLER_2D) {\n this._sampler_names.push(descriptors[i].location);\n }\n else {\n this._uniform_names.push(descriptors[i].location);\n }\n }\n this._shader_name = description.shader_name;\n this._useless_camera = new BABYLON_Camera('Babylon why do you need a camera for a postprocess: ' + description.shader_name, Vector3.Zero(), scene, false);\n this._effect = this.create_effect(defines);\n // Initialize all descriptor values to their correct types so that we can update them in-place when the user sets them.\n for (let i = 0; i < this._descriptors.length; i++) {\n const descriptor = this._descriptors[i];\n descriptor.has_been_set = false;\n if (descriptor.type === ShaderDescriptorType.SAMPLER_2D) {\n descriptor.value = null;\n }\n else if (descriptor.type === ShaderDescriptorType.FLOAT ||\n descriptor.type === ShaderDescriptorType.INT ||\n descriptor.type === ShaderDescriptorType.UINT) {\n descriptor.value = 0;\n }\n else if (descriptor.type === ShaderDescriptorType.VEC2) {\n descriptor.value = new IVector2(0, 0);\n }\n else if (descriptor.type === ShaderDescriptorType.VEC3) {\n descriptor.value = new IVector3(0, 0, 0);\n }\n else if (descriptor.type === ShaderDescriptorType.VEC4) {\n descriptor.value = new IVector4();\n }\n else if (descriptor.type === ShaderDescriptorType.MAT4) {\n descriptor.value = new IMatrix4();\n }\n }\n }\n set_descriptor(handle, value) {\n if (handle._descriptor_index >= this._descriptors.length) {\n console.error('Shader descriptor index out of range.');\n return;\n }\n const descriptor = this._descriptors[handle._descriptor_index];\n if (descriptor.type !== handle.type) {\n console.error(\"Shader descriptor type doesn't match given descriptor handle type\");\n return;\n }\n if (handle.type === ShaderDescriptorType.SAMPLER_2D) {\n descriptor.value = value;\n }\n else if (handle.type === ShaderDescriptorType.FLOAT ||\n handle.type === ShaderDescriptorType.INT ||\n handle.type === ShaderDescriptorType.UINT) {\n descriptor.value = value;\n }\n else if (handle.type === ShaderDescriptorType.VEC2) {\n IVector2.copy_to_ref(value, descriptor.value);\n }\n else if (descriptor.type === ShaderDescriptorType.VEC3) {\n IVector3.copy_to_ref(value, descriptor.value);\n }\n else if (descriptor.type === ShaderDescriptorType.VEC4) {\n IVector4.copy_to_ref(value, descriptor.value);\n }\n else if (descriptor.type === ShaderDescriptorType.MAT4) {\n // Only ever store as IMatrix4\n const descriptor_matrix = descriptor.value;\n if (value instanceof BABYLON_Matrix) {\n value.toIMatrix4ToRef(descriptor_matrix);\n }\n else {\n IMatrix4.copy_to_ref(value, descriptor_matrix);\n }\n }\n else {\n console.error('Invalid type in descriptor value. Descriptor location: ' + descriptor.location);\n }\n descriptor.has_been_set = true;\n }\n get_descriptor(handle) {\n if (handle._descriptor_index >= this._descriptors.length) {\n throw new Error('Shader descriptor index out of range.');\n }\n const descriptor = this._descriptors[handle._descriptor_index];\n if (descriptor.type !== handle.type) {\n throw new Error(\"Shader descriptor type doesn't match given descriptor handle type\");\n }\n return descriptor.value;\n }\n create_effect(defines) {\n if (this._effect) {\n this._effect.dispose();\n }\n this._effect = new BABYLON_PostProcess(this._shader_name, this._shader_name, this._uniform_names, this._sampler_names, 1.0, this._useless_camera, undefined, this._scene.getEngine(), undefined, defines.join('\\n'));\n this._effect.onApply = this.on_apply.bind(this);\n return this._effect;\n }\n on_apply(effect) {\n for (let i = 0; i < this._descriptors.length; i++) {\n const descriptor = this._descriptors[i];\n if (!descriptor.has_been_set) {\n if (!descriptor.uninitialized_data_has_warned) {\n console.warn(\"PostProcessShader descriptor hasn't been set: \" + descriptor.location + '. This will result in junk in the shader.');\n descriptor.uninitialized_data_has_warned = true;\n }\n continue;\n }\n if (descriptor.type === ShaderDescriptorType.SAMPLER_2D) {\n effect.setTexture(descriptor.location, descriptor.value);\n }\n else if (descriptor.type === ShaderDescriptorType.FLOAT) {\n effect.setFloat(descriptor.location, descriptor.value);\n }\n else if (descriptor.type === ShaderDescriptorType.INT) {\n effect.setInt(descriptor.location, descriptor.value);\n }\n else if (descriptor.type === ShaderDescriptorType.UINT) {\n effect.setUInt(descriptor.location, descriptor.value);\n }\n else if (descriptor.type === ShaderDescriptorType.VEC2) {\n const v = descriptor.value;\n effect.setFloat2(descriptor.location, v.x, v.y);\n }\n else if (descriptor.type === ShaderDescriptorType.VEC3) {\n const v = descriptor.value;\n effect.setFloat3(descriptor.location, v.x, v.y, v.z);\n }\n else if (descriptor.type === ShaderDescriptorType.VEC4) {\n const v = descriptor.value;\n effect.setFloat4(descriptor.location, v.x, v.y, v.z, v.w);\n }\n else if (descriptor.type === ShaderDescriptorType.MAT4) {\n const matrix = descriptor.value;\n effect.setMatrix(descriptor.location, new BABYLON_Matrix().fromIMatrix4(matrix));\n }\n else {\n console.error('Unknown descriptor type');\n }\n }\n }\n render(target) {\n var _a;\n this._scene.postProcessManager.directRender([this._effect], (_a = target === null || target === void 0 ? void 0 : target.renderTarget) !== null && _a !== void 0 ? _a : null, true, 0, 0, target === null);\n }\n set_defines(defines) {\n this.create_effect(defines);\n }\n dispose() {\n this._effect.dispose();\n this._useless_camera.dispose();\n }\n}\n//# sourceMappingURL=PostProcessShader.js.map","import { Engine as BABYLON_Engine } from '@inter-ikea-betrakta-babylonjs/core/Engines/engine.js';\nimport { RenderTargetTexture as BABYLON_RenderTargetTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/renderTargetTexture.js';\nimport { Texture as BABYLON_Texture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js';\n// Side effect\nimport './shaders/accumulation_buffer.fragment.js';\nimport { BloomEffect } from './Bloom.js';\nimport { PostProcessShader, ShaderDescription, ShaderDescriptorType } from './utility/PostProcessShader.js';\nvar JitterSampleType;\n(function (JitterSampleType) {\n JitterSampleType[JitterSampleType[\"helix_4\"] = 1] = \"helix_4\";\n JitterSampleType[JitterSampleType[\"halton_2_3_16\"] = 2] = \"halton_2_3_16\";\n})(JitterSampleType || (JitterSampleType = {}));\nconst FEATURE_MASK_TONEMAPPING = 1;\nconst FEATURE_MASK_BLOOM = 2;\nconst FEATURE_MASK_LUT = 4;\nexport class AccumulationBuffer {\n constructor(scene, accumulation_frame_count, framebuffer) {\n this._accumulator_shader_feature_mask = 0;\n /**\n * Number of frames to render before we start the accumulation process.\n * Useful for the AO system which has its own accumulator that might need some extra frames from time to time.\n */\n this._queued_warmup_frames = 0;\n this._scene = scene;\n this._accumulation_frame_count = accumulation_frame_count;\n this._framebuffer = framebuffer;\n this._accumulation_index = 0;\n this._jitter_index = 0;\n this._jitter_samples = AccumulationBuffer.get_jitter_samples(JitterSampleType.halton_2_3_16, this._accumulation_frame_count);\n const width = framebuffer.get_width();\n const height = framebuffer.get_height();\n // Since we accumulate after tonemapping, RGBA8 texture is enough\n const type = BABYLON_Engine.TEXTURETYPE_UNSIGNED_BYTE;\n // Need to use NEAREST sampling mode in case we have not power of two texture sizes, and also because we want unfiltered texture lookups\n this.accumulation_buffer1 = new BABYLON_RenderTargetTexture('acc1', { width: width, height: height }, scene, undefined, undefined, type, undefined, BABYLON_Texture.NEAREST_SAMPLINGMODE, false, false, false, BABYLON_Engine.TEXTUREFORMAT_RGBA);\n this.accumulation_buffer2 = new BABYLON_RenderTargetTexture('acc2', { width: width, height: height }, scene, undefined, undefined, type, undefined, BABYLON_Texture.NEAREST_SAMPLINGMODE, false, false, false, BABYLON_Engine.TEXTUREFORMAT_RGBA);\n // This is needed for offset viewports to work properly with the temporal stack\n this.accumulation_buffer1.ignoreCameraViewport = true;\n this.accumulation_buffer2.ignoreCameraViewport = true;\n const { shader, descriptors } = this.create_accumulator_shader(0);\n this._shader = shader;\n this._descriptors = descriptors;\n this.reset_stable_frames();\n }\n create_accumulator_shader(feature_mask) {\n // Note: You may think it's a good idea to just use the PostProcessShader's functionality for hot-swapping defines, instead of re-creating it.\n // BUT, depending on bloom we can have different sampler counts, meaning we can get different descriptors, meaning we need to re-create.\n this._accumulator_shader_feature_mask = feature_mask;\n const enable_tonemapping = (feature_mask & FEATURE_MASK_TONEMAPPING) !== 0;\n const enable_bloom = (feature_mask & FEATURE_MASK_BLOOM) !== 0;\n const enable_lut = (feature_mask & FEATURE_MASK_LUT) !== 0;\n const bloom_texture_names = [];\n if (enable_bloom) {\n for (let i = 0; i < BloomEffect.BLOOM_LEVELS_COUNT; i++) {\n bloom_texture_names.push('bloomSampler[' + i + ']');\n }\n }\n const defines = [];\n if (enable_bloom) {\n defines.push('#define ENABLE_BLOOM');\n defines.push('#define BLOOM_LEVELS_COUNT ' + BloomEffect.BLOOM_LEVELS_COUNT);\n }\n if (enable_tonemapping) {\n defines.push('#define ENABLE_TONEMAPPING');\n }\n const shader_description = new ShaderDescription('accumulation_buffer');\n const bloom_sampler_descriptors = [];\n for (let i = 0; i < bloom_texture_names.length; i++) {\n bloom_sampler_descriptors.push(shader_description.add_descriptor(ShaderDescriptorType.SAMPLER_2D, bloom_texture_names[i]));\n }\n if (enable_lut) {\n defines.push('#define ENABLE_LUT');\n }\n const descriptors = {\n current_sampler: shader_description.add_descriptor(ShaderDescriptorType.SAMPLER_2D, 'textureSampler'),\n previous_sampler: shader_description.add_descriptor(ShaderDescriptorType.SAMPLER_2D, 'previousFrames'),\n accumulation_blend: shader_description.add_descriptor(ShaderDescriptorType.FLOAT, 'accumulationBlend'),\n bloom_samplers: bloom_sampler_descriptors,\n bloom_intensity: shader_description.add_descriptor(ShaderDescriptorType.FLOAT, 'bloomIntensity'),\n lut_sampler: shader_description.add_descriptor(ShaderDescriptorType.SAMPLER_2D, 'lutSampler')\n };\n const shader = new PostProcessShader(this._scene, shader_description, defines);\n this._shader = shader;\n this._descriptors = descriptors;\n // Set default values for descriptors we might not initialize when rendering to avoid warnings\n this._shader.set_descriptor(this._descriptors.lut_sampler, null);\n this._shader.set_descriptor(this._descriptors.bloom_intensity, 0.0);\n for (let i = 0; i < bloom_sampler_descriptors.length; i++) {\n this._shader.set_descriptor(bloom_sampler_descriptors[i], null);\n }\n return { shader: shader, descriptors: descriptors };\n }\n render(bloom, lut, tonemap) {\n const feature_mask = (bloom !== null ? FEATURE_MASK_BLOOM : 0) |\n (tonemap ? FEATURE_MASK_TONEMAPPING : 0) |\n ((lut !== null && lut.lut_texture !== null) ? FEATURE_MASK_LUT : 0);\n // If the feature mask has changed, or the number of bloom samplers, we need to re-compile.\n if (this._accumulator_shader_feature_mask !== feature_mask ||\n (bloom !== null && bloom.result_textures.length !== this._descriptors.bloom_samplers.length)) {\n this._shader.dispose();\n this.create_accumulator_shader(feature_mask);\n }\n this._shader.set_descriptor(this._descriptors.current_sampler, this._framebuffer.get_texture());\n this._shader.set_descriptor(this._descriptors.previous_sampler, this.accumulation_buffer2);\n this._shader.set_descriptor(this._descriptors.accumulation_blend, 1.0 / Math.max(1.0, 1.0 + this._accumulation_index));\n if (bloom !== null) {\n this._shader.set_descriptor(this._descriptors.bloom_intensity, bloom.intensity);\n for (let i = 0; i < this._descriptors.bloom_samplers.length; i++) {\n this._shader.set_descriptor(this._descriptors.bloom_samplers[i], bloom.result_textures[i]);\n }\n }\n if (lut !== null) {\n this._shader.set_descriptor(this._descriptors.lut_sampler, lut.lut_texture);\n }\n // accumulate (and optionally tonemap and add bloom)\n this._shader.render(this.accumulation_buffer1);\n // ping pong buffers\n this.flip_flop();\n }\n flip_flop() {\n const temp = this.accumulation_buffer1;\n this.accumulation_buffer1 = this.accumulation_buffer2;\n this.accumulation_buffer2 = temp;\n }\n resize(width, height) {\n const size = {\n width: width,\n height: height\n };\n this.accumulation_buffer1.resize(size);\n this.accumulation_buffer2.resize(size);\n this.reset_stable_frames();\n }\n // http://en.wikipedia.org/wiki/Halton_sequence\n static halton_seq(prime, index = 1 /* NOT! zero-based */) {\n let r = 0.0;\n let f = 1.0;\n let i = index;\n while (i > 0) {\n f /= prime;\n r += f * (i % prime);\n i = Math.floor(i / prime);\n }\n return r;\n }\n static initialize_halton_2_3(seq, samples_count) {\n for (let i = 0; i < samples_count; i++) {\n const u = (AccumulationBuffer.halton_seq(2, i + 1) - 0.5) * 2.0;\n const v = (AccumulationBuffer.halton_seq(3, i + 1) - 0.5) * 2.0;\n seq.push({ x: u, y: v });\n }\n }\n static get_jitter_samples(sample_type, halton_count) {\n const samples = new Array();\n switch (sample_type) {\n case JitterSampleType.helix_4:\n samples.push({ x: -0.25, y: -0.25 }); // ll 3 1\n samples.push({ x: 0.25, y: 0.25 }); // ur \\/|\n samples.push({ x: 0.25, y: -0.25 }); // lr /\\|\n samples.push({ x: 0.25, y: 0.25 }); // ul 0 2\n break;\n case JitterSampleType.halton_2_3_16:\n AccumulationBuffer.initialize_halton_2_3(samples, halton_count);\n break;\n }\n return samples;\n }\n jitter(viewport_width, viewport_height, engine_camera) {\n if (this._accumulation_frame_count <= 1) {\n engine_camera.set_jitter({ x: 0, y: 0 });\n this._jitter_index = 0;\n return;\n }\n const sample_offset = this._jitter_samples[this._jitter_index];\n engine_camera.set_jitter({\n x: sample_offset.x / viewport_width,\n y: sample_offset.y / viewport_height\n });\n if (this._accumulation_index >= 0) {\n // Only progress jitter index in case we've started the progressive rendering to prevent subpixel flickering.\n this._jitter_index = (this._jitter_index + 1) % this._jitter_samples.length;\n }\n }\n reset_stable_frames() {\n this._jitter_index = 0;\n this._accumulation_index = Math.min(this._accumulation_index, Math.min(0, -this._queued_warmup_frames));\n this._queued_warmup_frames = 0;\n }\n increase_stable_frames() {\n this._accumulation_index++;\n }\n queue_warmup_frame_count(warmup_frame_count) {\n if (this._queued_warmup_frames === warmup_frame_count)\n return;\n this._queued_warmup_frames = warmup_frame_count;\n }\n set_accumulation_frame_count(frame_count) {\n if (this._accumulation_frame_count === frame_count) {\n // No change, early out.\n return;\n }\n this._accumulation_frame_count = frame_count;\n // Recompute TAA jitter sequence\n this._jitter_samples = AccumulationBuffer.get_jitter_samples(JitterSampleType.halton_2_3_16, this._accumulation_frame_count);\n this.reset_stable_frames();\n }\n get_accumulation_frame_count() {\n return this._accumulation_frame_count;\n }\n keep_rendering() {\n return this._accumulation_index < this._accumulation_frame_count;\n }\n dispose() {\n this._shader.dispose();\n this.accumulation_buffer1.dispose();\n this.accumulation_buffer2.dispose();\n }\n}\n//# sourceMappingURL=Accumulator.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/edge_sketch.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'edge_sketchPixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\nuniform highp sampler2D depthSampler;\nuniform vec2 inverseDepthDimensions;\nuniform mat4 inverseProjectionMatrix;\nvec3 viewSpacePositionFromDepth(float z, float u, float v)\n{\nvec4 vProjectedPos = vec4(vec3(u, v, z) * 2.0 - 1.0, 1.0);\nvec4 viewspacePosition = inverseProjectionMatrix * vProjectedPos;\nreturn viewspacePosition.xyz / viewspacePosition.w;\n}\nvec3 improvedViewSpaceNormalFromNeighbours(vec3 center, float depthCenter) {\nvec2 right = (vUV + (vec2(1,0) * inverseDepthDimensions));\nvec2 up = (vUV + (vec2(0,1) * inverseDepthDimensions));\nvec2 down = (vUV + (vec2(0,-1) * inverseDepthDimensions));\nvec2 left = (vUV + (vec2(-1,0) * inverseDepthDimensions));\nfloat depthRight = texture2D(depthSampler, right).r;\nfloat depthUp = texture2D(depthSampler, up).r;\nfloat depthDown = texture2D(depthSampler, down).r;\nfloat depthLeft = texture2D(depthSampler, left).r;\nbool useDown = abs(depthDown - depthCenter) < abs(depthUp - depthCenter);\nbool useLeft = abs(depthLeft - depthCenter) < abs(depthRight - depthCenter);\nif (useDown && useLeft) {\nvec3 pDown = viewSpacePositionFromDepth(depthDown, down.x, down.y);\nvec3 pLeft = viewSpacePositionFromDepth(depthLeft, left.x, left.y);\nreturn normalize(cross(normalize(pLeft - center), normalize(pDown - center)));\n} else if (useDown) {\nvec3 pDown = viewSpacePositionFromDepth(depthDown, down.x, down.y);\nvec3 pRight = viewSpacePositionFromDepth(depthRight, right.x, right.y);\nreturn normalize(cross(normalize(pDown - center), normalize(pRight - center)));\n} else if (!useDown && useLeft) {\nvec3 pUp = viewSpacePositionFromDepth(depthUp, up.x, up.y);\nvec3 pLeft = viewSpacePositionFromDepth(depthLeft, left.x, left.y);\nreturn normalize(cross(normalize(pUp - center), normalize(pLeft - center)));\n} else {\nvec3 pRight = viewSpacePositionFromDepth(depthRight, right.x, right.y);\nvec3 pUp = viewSpacePositionFromDepth(depthUp, up.x, up.y);\nreturn normalize(cross(normalize(pRight - center), normalize(pUp - center)));\n}\n}\nfloat remap(float a, float b, float x) {\nreturn clamp((x - a) / (b - a), 0.0, 1.0);\n}\nvoid main() {\nfloat pixelDepthValue = texture2D(depthSampler, vUV).r;\nvec3 viewSpacePosition = viewSpacePositionFromDepth(pixelDepthValue, vUV.x, vUV.y);\nvec3 viewSpaceNormal = improvedViewSpaceNormalFromNeighbours(viewSpacePosition, pixelDepthValue);\nvec2 sobelDot = vec2(0.0);\nvec3 V = vec3(0, 0, -1);\nconst float sobelNorm = 0.25;\nconst float s0 = 1.0;\nconst float s1 = 3.0;\nconst float s2 = 9.0;\nconst float[] sobelKernel = float[](\n-s1, -s1, -s2, -s1, -s1,\n-s0, -s0, -s1, -s0, -s0,\n0.0, 0.0, 0.0, 0.0, 0.0,\ns0, s0, s1, s0, s0,\ns1, s1, s2, s1, s1\n);\nconst float minDot = sin(30.0 / 180.0 * 3.14159265354);\nfor (int x = 0; x < 5; x++) {\nfor (int y = 0; y < 5; y++) {\nvec2 uv = vUV + vec2(x - 2, y - 2) * inverseDepthDimensions;\nfloat z = texture2D(depthSampler, uv).r;\nvec3 P = viewSpacePositionFromDepth(z, uv.x, uv.y);\nvec3 D = P - viewSpacePosition;\nfloat L = length(D);\nfloat cosD = dot(viewSpaceNormal, D / L);\nfloat d = remap(minDot * abs(dot(V, viewSpaceNormal)), 1.0, abs(cosD));\nvec2 K = vec2(sobelKernel[x * 5 + y], sobelKernel[y * 5 + x]);\nsobelDot += L * d * K;\n}\n}\nfloat sD = abs(sobelDot.x) + abs(sobelDot.y);\nfloat sobel = smoothstep(0.015, 0.02, sD * sobelNorm);\ngl_FragColor.rgb = 32.0 * vec3(clamp(1.0 - sobel, 0.0, 1.0));\ngl_FragColor.a = 1.0;\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const edge_sketchPixelShader = { name, shader };\n//# sourceMappingURL=edge_sketch.fragment.js.map","import { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { PostProcess as BABYLON_PostProcess } from '@inter-ikea-betrakta-babylonjs/core/PostProcesses/postProcess.js';\nimport { Camera as BABYLON_Camera } from '@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js';\n// Side effect\nimport '../shaders/edge_sketch.fragment.js';\nimport { matrix_pool } from '../../Math.js';\nconst SAMPLER_DEPTH = 'depthSampler';\nconst INVERSE_DEPTH_DIMENSIONS = 'inverseDepthDimensions';\nconst INVERSE_PROJECTION_MATRIX = 'inverseProjectionMatrix';\n/**\n * This class is an experimental feature for space, where they wanted to render a \"printout\" of the scene.\n * It's just black and white image, with blacks on edges\n */\nexport class EdgeSketchEffect {\n constructor(scene) {\n this._postprocess_camera = new BABYLON_Camera('', BABYLON_Vector3.Zero(), scene, false);\n this._effect = new BABYLON_PostProcess('edge_sketch', 'edge_sketch', [INVERSE_DEPTH_DIMENSIONS, INVERSE_PROJECTION_MATRIX], [SAMPLER_DEPTH], 1, this._postprocess_camera);\n }\n render(projection_matrix, depth_texture, render_target) {\n this._effect.onApply = (effect) => {\n effect.setTexture(SAMPLER_DEPTH, depth_texture);\n effect.setFloat2(INVERSE_DEPTH_DIMENSIONS, 1.0 / depth_texture.getSize().width, 1.0 / depth_texture.getSize().height);\n const inverse_projection_matrix = projection_matrix.invertToRef(matrix_pool.fetch());\n effect.setMatrix(INVERSE_PROJECTION_MATRIX, inverse_projection_matrix);\n matrix_pool.return(inverse_projection_matrix);\n };\n this._postprocess_camera._scene.postProcessManager.directRender([this._effect], render_target, true, undefined, undefined, render_target === undefined);\n }\n dispose() {\n this._effect.dispose();\n this._postprocess_camera.dispose();\n }\n effects_compiled() {\n return new Promise((resolve) => {\n if (this._effect.isReady()) {\n resolve();\n }\n else {\n this._effect.getEffect().onCompileObservable.add(() => { resolve(); });\n }\n });\n }\n}\n//# sourceMappingURL=EdgeSketchEffect.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ao_half_depth.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'ao_half_depthPixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\nuniform highp sampler2D depthSampler;\nuniform mat4 invertedProjectionMatrix;\nfloat linearizeDepth(float z) {\nvec4 p = invertedProjectionMatrix * vec4(vUV * 2.0 - 1.0, z * 2.0 - 1.0, 1.0);\nreturn p.z / p.w;\n}\nfloat averageDepth(vec4 depth) {\nreturn dot(depth, vec4(0.25));\n}\nfloat minDepth(vec4 depth) {\nreturn min(depth.x, min(depth.y, min(depth.z, depth.w)));\n}\nfloat maxDepth(vec4 depth) {\nreturn max(depth.x, max(depth.y, max(depth.z, depth.w)));\n}\nfloat checkerboard(vec2 pos) {\nreturn mod(pos.x + mod(pos.y, 2.0), 2.0);\n}\nfloat checkeredDepth(vec4 depth) {\nreturn mix(minDepth(depth), maxDepth(depth), checkerboard(gl_FragCoord.xy));\n}\nvoid main(void)\n{\nvec4 depth;\ndepth.x = texelFetch(depthSampler, ivec2(2.0 * gl_FragCoord.xy) + ivec2(0, 0), 0).r;\ndepth.y = texelFetch(depthSampler, ivec2(2.0 * gl_FragCoord.xy) + ivec2(1, 0), 0).r;\ndepth.z = texelFetch(depthSampler, ivec2(2.0 * gl_FragCoord.xy) + ivec2(1, 1), 0).r;\ndepth.w = texelFetch(depthSampler, ivec2(2.0 * gl_FragCoord.xy) + ivec2(0, 1), 0).r;\nfloat z;\nz = minDepth(depth);\nif (z == 1.0 || z == 0.0) {\ngl_FragColor = vec4(-1.0, 0.0, 0.0, 1.0);\n} else {\ngl_FragColor = vec4(linearizeDepth(z), 0, 0, 1);\n}\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ao_half_depthPixelShader = { name, shader };\n//# sourceMappingURL=ao_half_depth.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ao_compute.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'ao_computePixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\nuniform highp sampler2D depthSampler;\nuniform sampler2D noiseSampler;\nuniform vec2 noiseScale;\nuniform vec3 sampleKernel[sampleKernelSize];\nuniform mat4 invertedProjectionMatrix;\nuniform mat4 projectionMatrix;\nuniform float radius;\nuniform vec2 noiseUvOffset;\nuniform vec2 inverseDepthDimensions;\nconst float ssaoDepthBias = 0.01;\n#define LINEAR_DEPTH\nvec3 viewSpacePositionFromDepth(float z, float u, float v)\n{\n#ifdef LINEAR_DEPTH\nfloat x = u * 2.0 - 1.0;\nfloat y = v * 2.0 - 1.0;\nvec4 vProjectedPos = vec4(x, y, 1.0, 1.0);\nvec4 farViewspacePosition = invertedProjectionMatrix * vProjectedPos;\nvec3 viewDirection = normalize(farViewspacePosition.xyz);\nreturn viewDirection * z / viewDirection.z;\n#else\nfloat x = u * 2.0 - 1.0;\nfloat y = v * 2.0 - 1.0;\nvec4 vProjectedPos = vec4(x, y, z * 2.0 - 1.0, 1.0);\nvec4 viewspacePosition = invertedProjectionMatrix * vProjectedPos;\nreturn viewspacePosition.xyz / viewspacePosition.w;\n#endif\n}\nvec3 viewSpaceNormalFromNeighbours(vec3 center, float fallbackDepth) {\nvec2 right = (vUV + (vec2(1,0) * inverseDepthDimensions));\nvec2 up = (vUV + (vec2(0,1) * inverseDepthDimensions));\nfloat depthRight = texelFetch(depthSampler, ivec2(gl_FragCoord.xy + vec2(1, 0)), 0).r;\nfloat depthUp = texelFetch(depthSampler, ivec2(gl_FragCoord.xy + vec2(0, 1)), 0).r;\ndepthRight = depthRight < 0.0 ? fallbackDepth : depthRight;\ndepthUp = depthUp < 0.0 ? fallbackDepth : depthUp;\nvec3 pRight = viewSpacePositionFromDepth(depthRight, right.x, right.y);\nvec3 pUp = viewSpacePositionFromDepth(depthUp, up.x, up.y);\nreturn normalize(cross(normalize(pUp - center), normalize(pRight - center)));\n}\nfloat ambientOcclusionValue(vec3 viewSpaceFragment, vec3 viewSpaceNormal, vec2 screenUV) {\nvec3 randSourceData = texture2D(noiseSampler, screenUV * noiseScale + noiseUvOffset).rgb;\nvec3 rVec;\nrVec.xy = randSourceData.rg * 2.0 - 1.0;\nrVec.z = 0.0;\nfloat occlusion = 0.0;\nvec3 tangent = normalize(rVec - viewSpaceNormal * dot(rVec, viewSpaceNormal));\nvec3 biTangent = cross(viewSpaceNormal, tangent);\nmat3 tbn = mat3(tangent, biTangent, viewSpaceNormal);\nfloat inverseRadiusSquared = 1.0 / (radius * radius);\nfor (int i = 0; i < sampleKernelSize; i++) {\nvec3 sampleViewDirection = tbn * sampleKernel[i];\nvec3 samplePosition = sampleViewDirection * radius * randSourceData.z + viewSpaceFragment;\nvec4 offset = vec4(samplePosition, 1.0);\noffset = projectionMatrix * offset;\noffset.xy /= offset.w;\nif (max(abs(offset.x), abs(offset.y)) >= 1.0) continue;\noffset.xy = offset.xy * 0.5 + vec2(0.5);\nfloat viewDepth = texture2D(depthSampler, offset.xy).r;\nvec4 viewSpaceSample = vec4(viewSpacePositionFromDepth(viewDepth, offset.x, offset.y), 1.0);\nfloat sampleDepth = viewSpaceSample.z;\nvec3 sampleDelta = viewSpaceSample.xyz - viewSpaceFragment;\nfloat sdd = dot(normalize(sampleDelta), sampleViewDirection);\nif (sampleDepth + ssaoDepthBias < samplePosition.z) {\nfloat weight = dot(sampleDelta, sampleDelta) * inverseRadiusSquared;\nweight = clamp(weight, 0.0, 1.0);\nweight = 1.0 - weight;\nocclusion += sampleKernel[i].z * 2.0 * min(0.5, radius * radius / dot(sampleDelta, sampleDelta));\n}\n}\nocclusion = 3.141592654 * occlusion / float(sampleKernelSize);\nocclusion = clamp(occlusion, 0.0, 1.0);\nreturn occlusion;\n}\nvoid main(void)\n{\nfloat pixelDepthValue = texelFetch(depthSampler, ivec2(gl_FragCoord.xy), 0).r;\nif (pixelDepthValue < 0.0) {\ngl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\nreturn;\n}\nvec3 viewSpacePosition = viewSpacePositionFromDepth(pixelDepthValue, vUV.x, vUV.y);\nvec3 viewSpaceNormal = viewSpaceNormalFromNeighbours(viewSpacePosition, pixelDepthValue);\nfloat ambientOcclusion = ambientOcclusionValue(viewSpacePosition, viewSpaceNormal, vUV);\ngl_FragColor = vec4(ambientOcclusion, 0, 0, 1);\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ao_computePixelShader = { name, shader };\n//# sourceMappingURL=ao_compute.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ao_temporal_filter.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'ao_temporal_filterPixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\nuniform highp sampler2D depthSampler;\nuniform sampler2D aoSampler;\nuniform highp sampler2D previousDepthSampler;\nuniform sampler2D previousAoSampler;\nuniform mat4 invertedProjectionMatrix;\nuniform mat4 previousProjectedToCurrentView;\nuniform mat4 viewToPreviousProjMatrix;\nuniform mat4 inverseViewMatrix;\nuniform vec2 projectionMatrixZ;\nuniform vec2 previousProjectionMatrixZ;\n#define LINEAR_DEPTH\nvec3 viewSpacePositionFromDepth(float z, float u, float v)\n{\n#ifdef LINEAR_DEPTH\nfloat x = u * 2.0 - 1.0;\nfloat y = v * 2.0 - 1.0;\nvec4 vProjectedPos = vec4(x, y, 1.0, 1.0);\nvec4 farViewspacePosition = invertedProjectionMatrix * vProjectedPos;\nvec3 viewDirection = normalize(farViewspacePosition.xyz);\nreturn viewDirection * z / viewDirection.z;\n#else\nfloat x = u * 2.0 - 1.0;\nfloat y = v * 2.0 - 1.0;\nvec4 vProjectedPos = vec4(x, y, z * 2.0 - 1.0, 1.0);\nvec4 viewspacePosition = invertedProjectionMatrix * vProjectedPos;\nreturn viewspacePosition.xyz / viewspacePosition.w;\n#endif\n}\nvoid main(void)\n{\nfloat pixelDepthValue = texture2D(depthSampler, vUV).r;\nif (pixelDepthValue < 0.0) {\ngl_FragColor = vec4(0, 0, 0, 1);\nreturn;\n}\nvec3 viewSpacePosition = viewSpacePositionFromDepth(pixelDepthValue, vUV.x, vUV.y);\nvec4 previousProjection = viewToPreviousProjMatrix * vec4(viewSpacePosition, 1.0);\nfloat ao = texture2D(aoSampler, vUV).r;\npreviousProjection = previousProjection / previousProjection.w;\nvec2 previousUv = previousProjection.xy * 0.5 + 0.5;\nif(previousUv.x < 0.0 || previousUv.y < 0.0 || previousUv.x >= 1.0 || previousUv.y >= 1.0) {\n} else {\nfloat previousDepthLinear = texture2D(previousDepthSampler, previousUv).r;\nif (previousDepthLinear > 0.0) {\nfloat A = previousProjectionMatrixZ.x;\nfloat B = previousProjectionMatrixZ.y;\nfloat previousDepthNonLinear = 0.5 * (A * previousDepthLinear + B) / previousDepthLinear + 0.5;\nvec4 reprojectedViewSpace = previousProjectedToCurrentView * vec4(previousProjection.xy, previousDepthNonLinear * 2.0 - 1.0, 1.0);\nreprojectedViewSpace /= reprojectedViewSpace.w;\nfloat weight = length(reprojectedViewSpace.xyz - viewSpacePosition.xyz) * 9.0;\nfloat previousAo = texture2D(previousAoSampler, previousUv).r;\nweight += abs(previousAo - ao) * 2.0;\nweight = clamp(weight, 1.0 / 16.0, 1.0);\nao = mix(previousAo, ao, weight);\n}\n}\ngl_FragColor = vec4(ao, 0, 0, 1);\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ao_temporal_filterPixelShader = { name, shader };\n//# sourceMappingURL=ao_temporal_filter.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ao_half_normals.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'ao_half_normalsPixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\nuniform highp sampler2D depthSampler;\nuniform mat4 invertedProjectionMatrix;\nuniform vec2 inverseDepthDimensions;\nvec3 viewSpacePositionFromDepth(float z, float u, float v)\n{\nfloat x = u * 2.0 - 1.0;\nfloat y = v * 2.0 - 1.0;\nvec4 vProjectedPos = vec4(x, y, z * 2.0 - 1.0, 1.0);\nvec4 viewspacePosition = invertedProjectionMatrix * vProjectedPos;\nreturn viewspacePosition.xyz / viewspacePosition.w;\n}\nvec3 viewSpaceNormalFromNeighbours(vec3 center) {\nvec2 right = (vUV + (vec2(1,0) * inverseDepthDimensions));\nvec2 up = (vUV + (vec2(0,1) * inverseDepthDimensions));\nfloat depthRight = texelFetch(depthSampler, ivec2(2.0 * gl_FragCoord.xy + vec2(1, 0)), 0).r;\nfloat depthUp = texelFetch(depthSampler, ivec2(2.0 * gl_FragCoord.xy + vec2(0, 1)), 0).r;\nvec3 pRight = viewSpacePositionFromDepth(depthRight, right.x, right.y);\nvec3 pUp = viewSpacePositionFromDepth(depthUp, up.x, up.y);\nreturn normalize(cross(normalize(pUp - center), normalize(pRight - center)));\n}\nvoid main(void)\n{\nfloat pixelDepthValue = texelFetch(depthSampler, ivec2(2.0 * gl_FragCoord.xy), 0).r;\nvec3 viewSpacePosition = viewSpacePositionFromDepth(pixelDepthValue, vUV.x, vUV.y);\nvec3 viewSpaceNormal = viewSpaceNormalFromNeighbours(viewSpacePosition);\ngl_FragColor = vec4(clamp(viewSpaceNormal.xy * 0.5 + 0.5, 0.0, 1.0), 0, 1.0);\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ao_half_normalsPixelShader = { name, shader };\n//# sourceMappingURL=ao_half_normals.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ao_apply.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'ao_applyPixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\nuniform highp sampler2D depthSampler;\nuniform highp sampler2D aoSampler;\nuniform highp sampler2D halfLinearDepthSampler;\nuniform float aoStrength;\nuniform vec2 inverseHalfResolution;\nuniform mat4 invertedProjectionMatrix;\nfloat linearizeDepth(float z) {\nvec4 p = invertedProjectionMatrix * vec4(vUV * 2.0 - 1.0, z * 2.0 - 1.0, 1.0);\nreturn p.z / p.w;\n}\nfloat getAo() {\nfloat mainDepth = linearizeDepth(texelFetch(depthSampler, ivec2(gl_FragCoord.xy), 0).r);\nvec2 downsampledBase = gl_FragCoord.xy / 2.0;\nvec2 closestHalf = floor(downsampledBase);\nfloat weightSum = 0.0;\nvec2 bottomTexelUv = max(vec2(0.0), gl_FragCoord.xy - 2.0) / 2.0;\nvec2 bottomBase = floor(bottomTexelUv);\nvec2 bilinearBase = 1.0 - fract(bottomTexelUv);\nconst float upsamplingMaxDepthError = 0.15;\nconst float upsamplingDepthWeight = 3.0 / upsamplingMaxDepthError;\nconst float upsamplingConstantMix = 0.05;\nconst float upsamplingBilinearWeight = 2.0;\nfloat ao = 0.0;\nfloat debugDepthError = 0.0;\nivec2 buv = ivec2(bottomTexelUv);\nvec4 sampleDepth;\nsampleDepth.x = texelFetchOffset(halfLinearDepthSampler, buv, 0, ivec2(0, 0)).r;\nsampleDepth.y = texelFetchOffset(halfLinearDepthSampler, buv, 0, ivec2(1, 0)).r;\nsampleDepth.z = texelFetchOffset(halfLinearDepthSampler, buv, 0, ivec2(1, 1)).r;\nsampleDepth.w = texelFetchOffset(halfLinearDepthSampler, buv, 0, ivec2(0, 1)).r;\nvec4 depthErrorWeight = max(vec4(0.0), upsamplingMaxDepthError - abs(sampleDepth - vec4(mainDepth))) * upsamplingDepthWeight;\nvec4 weight = depthErrorWeight + upsamplingConstantMix;\nweight += upsamplingBilinearWeight * abs((vec4(0, 1, 1, 0) - bilinearBase.x) * (vec4(0, 0, 1, 1) - bilinearBase.y));\nvec4 sampleAo;\nsampleAo.x = texelFetchOffset(aoSampler, buv, 0, ivec2(0, 0)).r;\nsampleAo.y = texelFetchOffset(aoSampler, buv, 0, ivec2(1, 0)).r;\nsampleAo.z = texelFetchOffset(aoSampler, buv, 0, ivec2(1, 1)).r;\nsampleAo.w = texelFetchOffset(aoSampler, buv, 0, ivec2(0, 1)).r;\nweightSum = dot(vec4(1), weight);\nao = dot(weight, sampleAo);\nao /= weightSum;\nao = 1.0 - ao * aoStrength;\nao = max(0.0, ao);\nreturn ao;\n}\nvoid main() {\ngl_FragColor = vec4(vec3(getAo()), 1.0);\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ao_applyPixelShader = { name, shader };\n//# sourceMappingURL=ao_apply.fragment.js.map","/**\n * 1-dimensional 64x64 blue noise data, generated from a texture.\n */\nexport const blue_noise_64x64x1 = new Uint8Array([\n 65, 170, 236, 191, 28, 248, 199, 80, 225, 106, 240, 191, 150, 245, 111, 185, 254, 29, 129, 90, 69, 249, 118, 236, 108, 213, 255, 93, 165, 69, 141, 125, 41, 2, 167, 103, 144, 238, 53, 180, 37, 160, 92, 46, 18, 145, 171, 28, 232, 43, 147, 125, 27, 255, 7, 228, 149, 203, 164, 138, 215, 179, 234, 39,\n 247, 140, 49, 104, 72, 147, 13, 51, 135, 165, 28, 122, 174, 22, 210, 158, 98, 57, 173, 225, 35, 158, 0, 175, 43, 73, 156, 4, 50, 193, 17, 89, 212, 148, 221, 121, 14, 209, 26, 73, 223, 190, 120, 211, 243, 99, 6, 117, 134, 184, 200, 71, 92, 56, 192, 112, 82, 55, 116, 252, 23, 108, 159, 98,\n 203, 24, 87, 213, 179, 115, 219, 186, 89, 205, 64, 42, 221, 93, 52, 11, 139, 206, 6, 111, 144, 189, 82, 224, 23, 198, 135, 120, 223, 240, 33, 107, 235, 61, 192, 48, 90, 227, 170, 98, 147, 11, 79, 232, 155, 52, 194, 252, 59, 162, 8, 237, 151, 209, 130, 176, 18, 218, 0, 69, 192, 48, 211, 8,\n 177, 127, 155, 3, 242, 59, 98, 37, 253, 2, 232, 143, 76, 131, 229, 193, 121, 233, 75, 244, 50, 216, 63, 125, 167, 243, 57, 97, 173, 76, 207, 157, 177, 82, 20, 248, 160, 64, 126, 196, 254, 58, 174, 25, 128, 72, 223, 88, 34, 215, 100, 115, 45, 168, 33, 234, 97, 188, 126, 171, 90, 144, 122, 75,\n 54, 109, 228, 42, 160, 133, 16, 171, 125, 152, 104, 199, 164, 33, 180, 65, 86, 40, 153, 178, 99, 15, 202, 103, 148, 85, 31, 187, 12, 147, 127, 45, 7, 136, 115, 182, 36, 140, 3, 111, 43, 135, 199, 106, 37, 168, 113, 178, 144, 77, 245, 21, 225, 86, 67, 142, 49, 241, 151, 40, 228, 244, 30, 223,\n 149, 255, 69, 197, 83, 207, 227, 73, 193, 49, 84, 12, 241, 114, 17, 247, 170, 21, 199, 127, 28, 137, 253, 39, 8, 230, 204, 111, 218, 60, 252, 100, 200, 239, 68, 95, 205, 243, 84, 230, 19, 217, 89, 245, 209, 139, 2, 23, 206, 50, 127, 174, 194, 3, 249, 162, 27, 75, 209, 103, 12, 64, 163, 187,\n 96, 35, 15, 182, 120, 26, 144, 110, 243, 24, 178, 218, 57, 95, 213, 144, 107, 221, 59, 238, 88, 164, 185, 76, 118, 179, 48, 137, 21, 90, 169, 29, 227, 53, 165, 217, 24, 153, 50, 184, 166, 151, 70, 13, 183, 60, 227, 242, 95, 190, 154, 60, 138, 101, 122, 198, 111, 180, 18, 135, 202, 115, 86, 5,\n 135, 210, 166, 104, 55, 248, 39, 161, 60, 206, 137, 119, 156, 190, 45, 72, 160, 7, 117, 190, 70, 47, 228, 215, 154, 65, 248, 162, 233, 193, 72, 121, 185, 149, 13, 129, 109, 74, 201, 123, 97, 33, 118, 49, 154, 101, 80, 161, 120, 32, 9, 221, 75, 211, 15, 230, 58, 221, 84, 252, 170, 51, 196, 239,\n 122, 79, 235, 147, 214, 91, 189, 9, 97, 232, 74, 35, 248, 2, 131, 204, 92, 250, 34, 210, 151, 10, 109, 132, 27, 96, 1, 78, 125, 37, 212, 5, 106, 82, 40, 192, 232, 172, 9, 62, 222, 248, 191, 232, 212, 128, 41, 200, 67, 234, 109, 253, 39, 182, 148, 91, 41, 158, 123, 33, 70, 145, 219, 42,\n 62, 193, 24, 1, 128, 67, 172, 220, 123, 150, 17, 108, 173, 84, 236, 26, 183, 54, 138, 100, 173, 22, 246, 57, 168, 209, 187, 104, 151, 55, 245, 158, 134, 220, 253, 58, 92, 33, 241, 146, 20, 79, 136, 5, 169, 28, 251, 11, 145, 180, 166, 88, 129, 54, 25, 172, 247, 140, 3, 214, 182, 101, 22, 161,\n 109, 178, 48, 223, 156, 31, 237, 81, 44, 183, 198, 54, 226, 140, 63, 122, 168, 228, 80, 218, 125, 193, 91, 201, 38, 240, 136, 226, 14, 177, 92, 203, 65, 17, 176, 117, 159, 212, 132, 106, 207, 174, 55, 94, 73, 110, 186, 220, 83, 48, 22, 199, 157, 235, 206, 117, 69, 97, 194, 48, 235, 129, 9, 247,\n 206, 141, 86, 252, 100, 202, 113, 140, 5, 251, 89, 159, 214, 40, 188, 105, 15, 152, 43, 2, 65, 235, 146, 77, 121, 19, 69, 46, 199, 114, 26, 235, 44, 99, 196, 138, 0, 49, 85, 188, 41, 157, 115, 201, 238, 149, 59, 135, 99, 125, 217, 66, 4, 102, 79, 188, 10, 239, 163, 112, 80, 154, 225, 74,\n 27, 168, 119, 60, 180, 13, 53, 164, 212, 66, 131, 23, 99, 9, 206, 255, 70, 198, 242, 112, 181, 31, 48, 159, 178, 219, 90, 165, 251, 131, 82, 145, 167, 226, 76, 22, 245, 179, 69, 231, 10, 254, 30, 222, 45, 20, 172, 242, 34, 189, 232, 112, 144, 245, 32, 133, 220, 61, 18, 204, 30, 57, 188, 95,\n 217, 11, 238, 34, 136, 78, 189, 241, 104, 34, 171, 240, 120, 146, 81, 158, 33, 133, 87, 165, 140, 222, 103, 253, 6, 111, 143, 30, 57, 214, 3, 188, 108, 31, 154, 202, 111, 219, 149, 123, 97, 65, 141, 181, 122, 89, 210, 7, 156, 77, 14, 173, 43, 214, 169, 50, 151, 180, 125, 93, 254, 175, 136, 41,\n 152, 69, 195, 161, 214, 229, 126, 25, 148, 203, 77, 219, 60, 179, 232, 52, 117, 215, 20, 56, 200, 14, 128, 209, 62, 195, 233, 183, 102, 157, 71, 244, 54, 126, 237, 60, 94, 38, 25, 165, 211, 196, 81, 4, 163, 230, 68, 103, 202, 255, 55, 128, 95, 195, 20, 87, 107, 228, 41, 145, 213, 2, 115, 233,\n 103, 130, 90, 45, 106, 16, 67, 95, 50, 185, 113, 0, 43, 194, 93, 12, 174, 245, 186, 98, 232, 70, 84, 28, 154, 43, 79, 10, 125, 224, 39, 208, 175, 8, 87, 169, 130, 250, 191, 54, 14, 130, 245, 107, 55, 193, 132, 42, 117, 141, 181, 224, 72, 158, 120, 249, 200, 75, 24, 167, 65, 84, 196, 52,\n 250, 182, 6, 244, 144, 201, 173, 253, 223, 20, 160, 143, 247, 130, 28, 223, 106, 75, 149, 35, 119, 163, 242, 175, 95, 135, 248, 203, 171, 92, 18, 116, 140, 193, 44, 216, 16, 144, 77, 103, 236, 42, 155, 217, 34, 145, 247, 26, 167, 88, 19, 36, 239, 0, 63, 139, 12, 234, 186, 97, 243, 128, 19, 170,\n 78, 27, 221, 61, 117, 82, 156, 38, 135, 86, 236, 100, 67, 210, 163, 141, 62, 204, 9, 48, 214, 142, 1, 188, 223, 117, 21, 66, 48, 239, 150, 78, 255, 100, 230, 68, 183, 205, 117, 223, 172, 87, 184, 72, 17, 175, 80, 220, 62, 236, 190, 110, 146, 202, 219, 174, 35, 155, 118, 48, 221, 159, 36, 204,\n 122, 147, 165, 208, 30, 183, 4, 215, 120, 57, 199, 177, 16, 80, 121, 40, 233, 169, 128, 249, 191, 60, 108, 37, 54, 208, 164, 145, 110, 196, 181, 61, 23, 160, 30, 109, 153, 9, 35, 63, 140, 26, 120, 233, 97, 203, 110, 3, 155, 210, 51, 78, 165, 96, 45, 84, 106, 59, 208, 5, 141, 109, 237, 63,\n 228, 47, 105, 133, 231, 52, 101, 194, 74, 10, 225, 36, 110, 191, 253, 6, 183, 101, 81, 156, 18, 91, 227, 132, 76, 12, 243, 83, 31, 229, 1, 129, 220, 204, 136, 52, 247, 84, 163, 242, 189, 1, 210, 149, 59, 129, 239, 183, 93, 122, 13, 134, 251, 27, 126, 241, 181, 134, 253, 193, 77, 16, 184, 96,\n 3, 191, 20, 89, 71, 240, 141, 170, 248, 150, 128, 166, 51, 219, 152, 92, 55, 22, 220, 114, 68, 168, 201, 254, 153, 101, 184, 217, 134, 98, 167, 46, 90, 185, 76, 122, 176, 211, 96, 129, 52, 109, 252, 39, 165, 11, 47, 138, 30, 199, 231, 176, 62, 213, 194, 11, 226, 72, 31, 92, 171, 57, 152, 213,\n 83, 170, 255, 199, 155, 18, 114, 43, 29, 96, 65, 243, 144, 25, 70, 207, 132, 244, 194, 34, 236, 146, 45, 26, 176, 124, 59, 44, 16, 206, 69, 249, 113, 16, 239, 5, 222, 44, 20, 198, 230, 69, 177, 85, 192, 218, 75, 249, 64, 150, 42, 102, 5, 154, 113, 52, 147, 19, 163, 116, 218, 244, 40, 135,\n 233, 66, 120, 37, 177, 221, 205, 85, 229, 186, 209, 15, 89, 119, 237, 172, 107, 44, 140, 177, 7, 121, 216, 85, 4, 233, 194, 159, 238, 119, 143, 192, 36, 148, 164, 64, 141, 106, 150, 79, 160, 30, 143, 101, 22, 116, 157, 174, 107, 225, 83, 190, 237, 74, 90, 170, 207, 101, 238, 46, 197, 127, 27, 112,\n 160, 13, 146, 56, 106, 7, 63, 125, 158, 3, 108, 173, 200, 41, 187, 1, 158, 66, 213, 78, 97, 57, 187, 107, 70, 141, 34, 93, 78, 177, 24, 57, 231, 209, 95, 195, 31, 254, 181, 8, 217, 123, 46, 227, 204, 237, 91, 14, 213, 24, 120, 163, 32, 133, 222, 38, 124, 186, 65, 140, 7, 80, 181, 208,\n 45, 187, 211, 245, 94, 139, 191, 250, 53, 137, 75, 224, 56, 139, 80, 31, 230, 124, 16, 250, 200, 133, 238, 164, 222, 201, 114, 252, 8, 215, 155, 105, 83, 127, 47, 227, 74, 118, 56, 203, 92, 246, 185, 4, 134, 54, 36, 127, 186, 56, 142, 252, 202, 16, 178, 246, 2, 85, 230, 155, 105, 251, 59, 96,\n 242, 76, 129, 29, 224, 163, 79, 21, 177, 234, 34, 123, 246, 163, 215, 102, 198, 88, 148, 166, 39, 19, 154, 30, 51, 15, 172, 65, 132, 49, 188, 246, 2, 172, 22, 183, 133, 233, 167, 25, 110, 60, 149, 81, 164, 68, 199, 149, 241, 1, 70, 95, 48, 108, 67, 143, 54, 213, 22, 37, 171, 203, 15, 138,\n 108, 0, 88, 174, 47, 202, 118, 40, 214, 102, 155, 19, 94, 11, 116, 252, 59, 180, 49, 110, 219, 65, 90, 247, 128, 101, 151, 208, 226, 96, 35, 116, 70, 219, 157, 102, 10, 86, 40, 138, 239, 172, 16, 211, 106, 255, 176, 100, 81, 206, 169, 219, 153, 188, 234, 117, 161, 97, 194, 129, 226, 70, 150, 223,\n 40, 197, 236, 152, 69, 12, 241, 149, 88, 63, 196, 183, 208, 70, 43, 142, 23, 226, 8, 241, 184, 119, 207, 76, 190, 231, 40, 85, 19, 166, 146, 235, 200, 136, 61, 250, 212, 191, 155, 221, 73, 197, 38, 229, 121, 28, 11, 47, 231, 111, 38, 127, 9, 87, 27, 206, 76, 250, 179, 49, 89, 118, 25, 178,\n 125, 161, 21, 114, 229, 134, 185, 108, 5, 254, 132, 49, 146, 239, 169, 191, 128, 157, 81, 99, 138, 13, 174, 147, 2, 60, 180, 243, 124, 197, 55, 178, 15, 93, 43, 113, 28, 67, 122, 0, 103, 131, 89, 53, 143, 190, 222, 137, 160, 26, 182, 245, 62, 227, 173, 41, 13, 136, 108, 5, 241, 165, 55, 216,\n 93, 66, 52, 190, 99, 32, 57, 208, 168, 221, 29, 82, 105, 219, 6, 91, 64, 212, 32, 199, 55, 230, 44, 107, 218, 117, 23, 140, 72, 5, 109, 82, 31, 242, 206, 167, 147, 236, 48, 181, 247, 20, 159, 179, 244, 74, 94, 62, 119, 196, 77, 139, 99, 198, 149, 123, 237, 62, 215, 146, 33, 191, 80, 251,\n 201, 146, 245, 212, 83, 164, 143, 76, 42, 119, 157, 15, 179, 124, 34, 234, 111, 175, 249, 123, 72, 161, 25, 252, 81, 195, 156, 99, 205, 255, 220, 158, 126, 143, 181, 6, 81, 197, 95, 164, 214, 64, 205, 112, 4, 40, 169, 208, 251, 5, 54, 215, 13, 110, 51, 84, 189, 25, 159, 74, 229, 102, 137, 7,\n 35, 172, 17, 127, 4, 224, 248, 21, 192, 232, 67, 244, 205, 57, 77, 197, 151, 47, 0, 143, 187, 213, 95, 132, 169, 48, 235, 30, 171, 44, 65, 185, 230, 52, 71, 103, 222, 133, 58, 24, 141, 35, 82, 237, 153, 217, 129, 24, 85, 152, 177, 237, 161, 32, 254, 167, 222, 96, 202, 127, 180, 15, 209, 116,\n 231, 104, 73, 179, 45, 198, 102, 130, 90, 174, 112, 141, 94, 162, 253, 135, 21, 102, 231, 88, 16, 241, 36, 202, 65, 12, 224, 89, 115, 135, 19, 98, 9, 214, 118, 244, 38, 15, 254, 114, 229, 188, 125, 18, 98, 56, 184, 105, 233, 37, 114, 91, 128, 203, 71, 138, 2, 113, 37, 52, 248, 67, 153, 49,\n 187, 134, 158, 238, 114, 63, 154, 12, 213, 53, 36, 3, 190, 44, 12, 182, 222, 68, 205, 172, 115, 58, 153, 109, 184, 125, 146, 57, 191, 239, 152, 202, 84, 164, 25, 192, 174, 156, 203, 100, 72, 170, 44, 197, 139, 228, 11, 201, 145, 68, 192, 16, 48, 228, 20, 182, 58, 241, 175, 90, 21, 166, 221, 86,\n 254, 58, 24, 216, 87, 33, 229, 183, 74, 148, 240, 217, 128, 228, 113, 87, 53, 127, 155, 39, 79, 137, 223, 22, 75, 206, 244, 1, 80, 216, 39, 122, 250, 47, 140, 64, 124, 86, 46, 144, 8, 216, 89, 250, 66, 163, 78, 45, 124, 220, 249, 166, 80, 148, 102, 120, 208, 152, 133, 231, 105, 196, 124, 26,\n 207, 97, 7, 195, 141, 170, 121, 252, 28, 202, 105, 81, 65, 152, 29, 211, 166, 246, 27, 194, 236, 177, 6, 249, 166, 101, 35, 160, 180, 23, 70, 173, 107, 197, 94, 237, 2, 217, 185, 234, 28, 155, 117, 179, 32, 113, 240, 176, 96, 0, 59, 132, 213, 190, 244, 42, 86, 30, 73, 211, 4, 142, 38, 75,\n 147, 182, 126, 246, 72, 51, 0, 94, 135, 162, 19, 185, 170, 97, 239, 138, 74, 106, 4, 217, 99, 51, 119, 88, 45, 139, 220, 113, 93, 131, 233, 145, 10, 32, 224, 150, 111, 74, 167, 61, 130, 241, 54, 3, 224, 133, 19, 212, 152, 29, 183, 108, 36, 7, 65, 170, 224, 14, 185, 161, 60, 242, 113, 170,\n 13, 232, 43, 109, 156, 224, 178, 210, 59, 115, 46, 250, 7, 56, 199, 16, 177, 46, 147, 125, 66, 160, 210, 193, 233, 25, 62, 199, 251, 50, 189, 61, 213, 78, 179, 54, 21, 245, 35, 106, 207, 79, 193, 98, 204, 159, 55, 85, 195, 243, 75, 157, 232, 92, 139, 197, 126, 249, 111, 44, 84, 190, 225, 53,\n 87, 162, 64, 26, 203, 101, 38, 241, 83, 195, 220, 142, 122, 209, 38, 116, 191, 226, 88, 255, 181, 33, 16, 149, 71, 127, 174, 7, 151, 103, 15, 166, 115, 247, 132, 162, 209, 194, 137, 91, 13, 172, 146, 39, 73, 107, 254, 36, 116, 138, 225, 50, 176, 115, 26, 156, 52, 94, 217, 147, 130, 10, 100, 213,\n 134, 115, 190, 240, 79, 19, 150, 129, 9, 173, 32, 73, 229, 156, 83, 248, 62, 158, 12, 204, 79, 134, 222, 107, 186, 245, 86, 214, 37, 77, 227, 205, 90, 41, 7, 97, 121, 44, 154, 226, 250, 26, 124, 237, 187, 11, 174, 148, 66, 8, 100, 16, 200, 253, 80, 236, 1, 67, 167, 201, 32, 251, 175, 21,\n 246, 34, 218, 170, 139, 116, 186, 68, 225, 154, 93, 106, 22, 180, 131, 98, 30, 136, 109, 24, 57, 240, 92, 40, 11, 54, 115, 163, 236, 123, 136, 28, 156, 235, 184, 67, 221, 84, 10, 181, 112, 50, 212, 63, 138, 219, 91, 230, 207, 186, 126, 216, 63, 145, 37, 209, 181, 104, 18, 232, 76, 120, 63, 149,\n 197, 73, 95, 51, 13, 211, 254, 44, 110, 203, 53, 246, 193, 66, 3, 212, 172, 242, 219, 194, 166, 118, 175, 231, 158, 141, 206, 20, 46, 178, 196, 55, 72, 144, 200, 20, 253, 171, 56, 72, 198, 150, 87, 168, 23, 120, 50, 26, 161, 41, 83, 169, 25, 97, 131, 163, 117, 226, 138, 41, 186, 158, 208, 46,\n 177, 2, 128, 155, 232, 61, 89, 165, 27, 235, 10, 124, 162, 42, 232, 146, 52, 77, 41, 96, 148, 1, 50, 211, 76, 98, 191, 66, 94, 254, 109, 0, 223, 102, 126, 34, 110, 143, 235, 131, 30, 222, 103, 6, 249, 201, 76, 132, 238, 107, 248, 151, 228, 193, 47, 70, 21, 195, 56, 91, 238, 9, 83, 103,\n 224, 238, 23, 108, 181, 198, 4, 127, 145, 79, 178, 137, 218, 85, 112, 201, 121, 9, 186, 128, 251, 71, 197, 23, 124, 247, 5, 221, 148, 26, 161, 85, 242, 173, 48, 163, 214, 188, 99, 1, 162, 242, 44, 185, 110, 156, 178, 96, 2, 197, 55, 73, 7, 109, 238, 213, 85, 250, 153, 129, 110, 216, 29, 142,\n 59, 162, 207, 81, 137, 36, 101, 242, 215, 189, 58, 99, 15, 253, 27, 182, 92, 155, 228, 61, 31, 216, 139, 105, 181, 35, 169, 129, 79, 187, 215, 121, 14, 205, 64, 90, 17, 77, 40, 210, 121, 80, 141, 68, 228, 36, 58, 217, 142, 30, 118, 176, 137, 184, 14, 146, 172, 32, 4, 179, 68, 166, 255, 119,\n 92, 188, 46, 249, 67, 226, 173, 47, 70, 114, 33, 156, 196, 71, 167, 59, 238, 19, 208, 164, 114, 90, 243, 154, 62, 227, 52, 112, 237, 39, 59, 140, 32, 183, 249, 134, 229, 150, 246, 60, 194, 171, 17, 209, 130, 12, 244, 187, 164, 88, 225, 207, 36, 246, 93, 60, 124, 103, 223, 205, 50, 14, 194, 37,\n 132, 6, 113, 28, 159, 121, 17, 152, 205, 6, 226, 240, 46, 143, 214, 131, 38, 105, 138, 77, 7, 189, 45, 18, 84, 208, 142, 11, 201, 103, 170, 231, 75, 152, 112, 6, 53, 117, 178, 22, 91, 226, 51, 100, 152, 87, 122, 71, 46, 255, 18, 129, 81, 51, 159, 230, 201, 43, 78, 244, 139, 98, 152, 73,\n 169, 243, 145, 195, 212, 93, 186, 82, 251, 131, 169, 86, 123, 103, 1, 82, 246, 198, 49, 234, 176, 221, 131, 166, 193, 96, 251, 160, 71, 20, 132, 210, 45, 99, 195, 168, 220, 203, 102, 138, 156, 34, 252, 200, 174, 231, 24, 211, 110, 151, 62, 101, 169, 218, 112, 25, 136, 187, 161, 116, 24, 234, 204, 227,\n 49, 218, 85, 60, 10, 236, 54, 142, 22, 105, 63, 202, 29, 224, 188, 153, 171, 118, 21, 97, 149, 32, 70, 237, 2, 118, 29, 180, 90, 242, 189, 3, 87, 238, 26, 69, 37, 81, 13, 240, 68, 129, 112, 2, 63, 43, 192, 135, 8, 180, 202, 240, 0, 192, 74, 11, 253, 65, 29, 89, 174, 61, 123, 17,\n 183, 31, 102, 175, 130, 38, 112, 223, 194, 43, 182, 10, 159, 248, 53, 17, 69, 225, 190, 59, 253, 121, 106, 51, 215, 137, 64, 44, 221, 147, 54, 118, 158, 216, 127, 142, 254, 159, 189, 47, 215, 164, 187, 78, 144, 243, 102, 168, 78, 230, 31, 137, 45, 148, 123, 210, 167, 100, 150, 219, 8, 188, 81, 108,\n 140, 69, 229, 153, 254, 200, 167, 71, 155, 91, 235, 135, 73, 113, 96, 207, 34, 142, 85, 212, 9, 162, 204, 82, 175, 153, 233, 198, 126, 105, 33, 249, 176, 17, 56, 182, 93, 120, 228, 107, 9, 88, 27, 222, 119, 160, 35, 218, 52, 94, 118, 68, 185, 228, 89, 56, 234, 42, 199, 242, 135, 38, 251, 159,\n 3, 193, 119, 19, 77, 97, 0, 28, 243, 118, 206, 35, 217, 178, 148, 241, 128, 105, 167, 42, 133, 184, 22, 246, 36, 100, 9, 76, 18, 171, 82, 200, 68, 108, 234, 201, 1, 30, 60, 148, 200, 175, 248, 55, 204, 89, 18, 125, 250, 197, 157, 21, 247, 104, 33, 179, 131, 3, 119, 71, 53, 209, 95, 216,\n 58, 244, 40, 208, 52, 141, 215, 179, 133, 59, 18, 170, 84, 44, 4, 63, 184, 229, 14, 243, 71, 94, 144, 61, 219, 114, 190, 255, 157, 209, 227, 8, 133, 151, 42, 78, 171, 212, 135, 75, 237, 123, 42, 139, 8, 234, 189, 64, 146, 5, 176, 84, 211, 164, 15, 206, 147, 85, 184, 105, 169, 151, 21, 125,\n 165, 87, 106, 177, 160, 123, 247, 86, 46, 226, 107, 143, 255, 124, 196, 91, 23, 153, 56, 201, 114, 226, 195, 6, 130, 165, 49, 92, 136, 58, 40, 98, 190, 28, 219, 124, 100, 247, 186, 38, 19, 101, 67, 155, 111, 74, 171, 210, 39, 108, 221, 48, 129, 61, 115, 75, 250, 23, 222, 238, 13, 196, 76, 233,\n 27, 146, 222, 15, 235, 33, 63, 189, 8, 162, 198, 69, 13, 224, 161, 238, 117, 215, 80, 175, 31, 157, 47, 86, 237, 207, 69, 27, 231, 111, 145, 246, 168, 86, 239, 162, 50, 14, 154, 89, 225, 168, 195, 217, 183, 24, 132, 98, 240, 76, 139, 236, 10, 151, 227, 191, 47, 160, 62, 36, 134, 113, 47, 181,\n 204, 130, 66, 187, 80, 102, 203, 150, 115, 95, 236, 182, 53, 104, 75, 32, 49, 138, 101, 0, 126, 252, 106, 179, 149, 15, 122, 175, 187, 11, 74, 215, 116, 61, 5, 142, 71, 232, 113, 209, 127, 2, 243, 31, 92, 251, 51, 14, 160, 185, 29, 94, 203, 175, 37, 88, 136, 100, 212, 176, 88, 255, 218, 99,\n 12, 248, 49, 114, 5, 139, 227, 24, 73, 213, 39, 27, 130, 150, 189, 205, 168, 246, 187, 230, 64, 204, 22, 77, 40, 223, 102, 245, 37, 162, 195, 50, 20, 181, 207, 104, 192, 26, 177, 62, 46, 142, 80, 58, 121, 149, 201, 225, 116, 58, 195, 123, 68, 245, 110, 5, 236, 197, 119, 153, 1, 67, 144, 38,\n 83, 172, 152, 211, 241, 165, 42, 176, 249, 136, 157, 87, 244, 216, 7, 96, 67, 17, 42, 150, 88, 166, 137, 240, 192, 60, 142, 83, 210, 124, 93, 234, 132, 154, 250, 39, 223, 134, 83, 255, 198, 161, 108, 176, 230, 41, 167, 84, 4, 145, 253, 17, 166, 50, 143, 182, 20, 73, 29, 53, 229, 186, 163, 118,\n 196, 225, 31, 93, 192, 58, 85, 122, 14, 55, 205, 109, 174, 23, 119, 144, 222, 130, 111, 210, 12, 53, 217, 112, 3, 161, 200, 19, 54, 150, 0, 220, 33, 78, 91, 123, 56, 168, 6, 99, 32, 239, 14, 205, 23, 136, 64, 105, 210, 172, 43, 216, 104, 79, 208, 224, 128, 168, 244, 204, 105, 24, 240, 58,\n 4, 104, 126, 72, 18, 133, 220, 104, 233, 194, 1, 66, 230, 81, 58, 250, 34, 176, 74, 192, 247, 98, 35, 185, 131, 90, 235, 116, 71, 252, 178, 107, 64, 171, 189, 12, 202, 148, 228, 120, 186, 70, 151, 218, 98, 192, 243, 33, 229, 72, 91, 132, 231, 31, 158, 57, 94, 39, 145, 77, 131, 91, 211, 137,\n 159, 235, 46, 178, 254, 157, 34, 184, 77, 163, 127, 147, 43, 185, 159, 198, 88, 229, 156, 25, 142, 122, 173, 68, 249, 47, 29, 168, 216, 134, 42, 199, 241, 143, 27, 233, 109, 74, 41, 214, 136, 50, 87, 126, 6, 78, 180, 119, 140, 22, 184, 153, 1, 189, 121, 11, 251, 113, 218, 191, 8, 173, 41, 71,\n 183, 21, 145, 203, 111, 4, 207, 141, 47, 94, 252, 30, 220, 101, 17, 126, 51, 3, 103, 61, 220, 82, 231, 10, 153, 104, 225, 188, 9, 99, 83, 158, 13, 116, 211, 49, 162, 245, 93, 20, 173, 234, 29, 165, 252, 56, 157, 11, 196, 51, 247, 114, 62, 239, 87, 199, 171, 66, 17, 157, 51, 227, 110, 251,\n 92, 218, 57, 82, 227, 96, 64, 239, 23, 212, 177, 115, 202, 137, 234, 169, 214, 116, 240, 180, 45, 164, 28, 193, 205, 79, 126, 61, 147, 206, 25, 56, 226, 95, 134, 66, 182, 8, 154, 206, 63, 104, 196, 225, 111, 38, 130, 239, 94, 165, 207, 81, 37, 139, 214, 45, 133, 184, 100, 242, 124, 200, 151, 29,\n 197, 117, 10, 162, 131, 41, 173, 120, 154, 10, 72, 53, 86, 6, 67, 39, 78, 148, 195, 16, 208, 134, 95, 55, 143, 18, 180, 36, 231, 112, 246, 175, 188, 75, 253, 32, 198, 83, 130, 114, 248, 0, 140, 68, 182, 204, 82, 216, 66, 107, 14, 224, 179, 161, 104, 73, 25, 235, 35, 86, 61, 12, 79, 133\n]);\n//# sourceMappingURL=BlueNoiseTexture64x64.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/bilateral_blur.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'bilateral_blurPixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\nuniform sampler2D depthSampler;\nuniform sampler2D textureSampler;\nuniform vec2 direction;\nuniform float depthThreshold;\n#ifdef ENABLE_NORMAL_FILTERING\nuniform sampler2D normalSampler;\nuniform float normalCosineThreshold;\n#endif\n#ifdef ENABLE_NORMAL_FILTERING\nvec3 getNormal(ivec2 uv) {\nvec3 normal;\nnormal.xy = texelFetch(normalSampler, uv, 0).rg * 2.0 - 1.0;\nnormal.z = sqrt(max(0.0, 1.0 - dot(normal.xy, normal.xy)));\nreturn normal;\n}\n#endif\nvoid main(void)\n{\nfloat sourceDepth = texelFetch(depthSampler, ivec2(gl_FragCoord.xy), 0).r;\nfloat result = texelFetch(textureSampler, ivec2(gl_FragCoord.xy), 0).r;\nfloat weightSum = 1.0;\nfloat effectiveDepthThreshold = depthThreshold;\n#ifdef ENABLE_NORMAL_FILTERING\nvec3 sourceNormal = getNormal(ivec2(gl_FragCoord.xy));\neffectiveDepthThreshold /= abs(sourceNormal.z);\n#endif\n#ifndef PASSTHROUGH\nfor(float x = -1.0; x >= -RADIUS; x -= 1.0) {\nvec2 uv = gl_FragCoord.xy + direction * x;\nfloat depth = texelFetch(depthSampler, ivec2(uv), 0).r;\nfloat value = texelFetch(textureSampler, ivec2(uv), 0).r;\n#ifdef ENABLE_NORMAL_FILTERING\nvec3 normal = getNormal(ivec2(uv));\nif (abs(depth - sourceDepth) < effectiveDepthThreshold && dot(sourceNormal, normal) > normalCosineThreshold)\n#else\nif (abs(depth - sourceDepth) < effectiveDepthThreshold)\n#endif\n{\nfloat w = 1.0;\nresult += value * w;\nweightSum += w;\n}\n}\nfor(float x = 1.0; x <= RADIUS; x += 1.0) {\nvec2 uv = gl_FragCoord.xy + direction * x;\nfloat depth = texelFetch(depthSampler, ivec2(uv), 0).r;\nfloat value = texelFetch(textureSampler, ivec2(uv), 0).r;\n#ifdef ENABLE_NORMAL_FILTERING\nvec3 normal = getNormal(ivec2(uv));\nif (abs(depth - sourceDepth) < effectiveDepthThreshold && dot(sourceNormal, normal) > normalCosineThreshold)\n#else\nif (abs(depth - sourceDepth) < effectiveDepthThreshold)\n#endif\n{\nfloat w = 1.0;\nresult += value * w;\nweightSum += w;\n}\n}\n#endif\ngl_FragColor = vec4(result / weightSum, 0, 0, 1);\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const bilateral_blurPixelShader = { name, shader };\n//# sourceMappingURL=bilateral_blur.fragment.js.map","// Side effect\nimport './shaders/bilateral_blur.fragment.js';\nimport { radians } from '../Math.js';\nimport { PostProcessShader, ShaderDescription, ShaderDescriptorType } from './utility/PostProcessShader.js';\nexport class BilateralBlur {\n constructor(radius, scene, enable_normal_filtering) {\n this.depth_threshold = 0.02;\n this.normal_angle_threshold = radians(30.0);\n this._enable_normal_filtering = enable_normal_filtering;\n const defines = [];\n defines.push('#define RADIUS ' + radius.toFixed(1));\n if (this._enable_normal_filtering) {\n defines.push('#define ENABLE_NORMAL_FILTERING');\n }\n const desc = new ShaderDescription('bilateral_blur');\n this._descriptors = {\n depth_threshold: desc.add_descriptor(ShaderDescriptorType.FLOAT, 'depthThreshold'),\n normal_cosine_threshold: desc.add_descriptor(ShaderDescriptorType.FLOAT, 'normalCosineThreshold'),\n direction: desc.add_descriptor(ShaderDescriptorType.VEC2, 'direction'),\n texture_sampler: desc.add_descriptor(ShaderDescriptorType.SAMPLER_2D, 'textureSampler'),\n depth_sampler: desc.add_descriptor(ShaderDescriptorType.SAMPLER_2D, 'depthSampler'),\n normal_sampler: desc.add_descriptor(ShaderDescriptorType.SAMPLER_2D, 'normalSampler')\n };\n this._shader = new PostProcessShader(scene, desc, defines);\n }\n render(scene, source, source_depth, source_normals, intermediate, destination) {\n this.render_separated_internal(scene, source, source_depth, source_normals, intermediate, { x: 1, y: 0 });\n this.render_separated_internal(scene, intermediate, source_depth, source_normals, destination, { x: 0, y: 1 });\n }\n render_separated_internal(event_data, source, source_depth, source_normals, destination, direction) {\n if (this._enable_normal_filtering && !source_normals) {\n console.error('Bilateral blur with normal filtering enabled was not given a normal sampler.');\n return;\n }\n else if (!this._enable_normal_filtering && source_normals) {\n console.warn(\"Normal sampler was given to bilateral filter, but it's unused. Did you mean to enable normal filtering on the Bilateral blur?\");\n }\n this._shader.set_descriptor(this._descriptors.depth_threshold, this.depth_threshold);\n this._shader.set_descriptor(this._descriptors.normal_cosine_threshold, Math.cos(this.normal_angle_threshold));\n this._shader.set_descriptor(this._descriptors.direction, direction);\n this._shader.set_descriptor(this._descriptors.texture_sampler, source);\n this._shader.set_descriptor(this._descriptors.depth_sampler, source_depth);\n this._shader.set_descriptor(this._descriptors.normal_sampler, source_normals);\n this._shader.render(destination);\n }\n dispose() {\n this._shader.dispose();\n }\n}\n//# sourceMappingURL=BilateralBlur.js.map","import { Vector3 as BABYLON_Vector3, Matrix as BABYLON_Matrix } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Engine as BABYLON_Engine } from '@inter-ikea-betrakta-babylonjs/core/Engines/engine.js';\nimport { RenderTargetTexture as BABYLON_RenderTargetTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/renderTargetTexture.js';\nimport { Texture as BABYLON_Texture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js';\nimport { PostProcess as BABYLON_PostProcess } from '@inter-ikea-betrakta-babylonjs/core/PostProcesses/postProcess.js';\n// Side effect\nimport './shaders/accumulation_buffer.fragment.js';\nimport './shaders/ao_half_depth.fragment.js';\nimport './shaders/ao_compute.fragment.js';\nimport './shaders/ao_temporal_filter.fragment.js';\nimport './shaders/ao_half_normals.fragment.js';\nimport './shaders/ao_apply.fragment.js';\nimport { blue_noise_64x64x1 } from './bin/BlueNoiseTexture64x64.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nimport { clamp, matrix_pool, radians } from '../Math.js';\nimport { RawTexture as BABYLON_RawTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/rawTexture.js';\nimport { BilateralBlur } from './BilateralBlur.js';\nconst DEPTH_SAMPLER = 'depthSampler';\nconst NOISE_SAMPLER = 'noiseSampler';\nconst SAMPLE_KERNEL = 'sampleKernel[0]';\nconst NOISE_SCALE = 'noiseScale';\nconst RADIUS = 'radius';\nconst INVERTED_PROJECTION_MATRIX = 'invertedProjectionMatrix';\nconst PROJECTION_MATRIX = 'projectionMatrix';\nconst NOISE_UV_OFFSET = 'noiseUvOffset';\nconst INVERSE_DEPTH_DIMENSIONS = 'inverseDepthDimensions';\nconst PROJECTION_MATRIX_Z_VALUES = 'projectionMatrixZ';\nconst PREVIOUS_PROJECTION_MATRIX_Z_VALUES = 'previousProjectionMatrixZ';\nconst PREVIOUS_AO_SAMPLER = 'previousAoSampler';\nconst PREVIOUS_DEPTH_SAMPLER = 'previousDepthSampler';\nconst AO_SAMPLER = 'aoSampler';\nconst CURRENT_VIEWSPACE_TO_PREVIOUS_PROJECTION_SPACE_MATRIX = 'viewToPreviousProjMatrix';\nconst PREVIOUS_PROJECTED_TO_CURRENT_VIEW = 'previousProjectedToCurrentView';\nconst INVERSE_VIEW_MATRIX = 'inverseViewMatrix';\n// For AO apply\nconst HALF_LINEAR_DEPTH_SAMPLER = 'halfLinearDepthSampler';\nconst INVERSE_PROJECTION_MATRIX = 'invertedProjectionMatrix';\nconst INVERSE_HALF_RESOLUTION = 'inverseHalfResolution';\nconst AO_STRENGTH = 'aoStrength';\nexport class AmbientOcclusion {\n constructor(scene, width, height, post_process_camera, camera, depth, samples, enable_normal_filtering, gpu_profiler) {\n this._ao_kernel_sample_cycle = 0;\n this._apply_ao_target = null;\n // This is just a helper variable to tell us if we really need to recompile the compute_ao shader when updating sample count.\n this._last_compiled_number_of_samples = -1;\n this._noise_offset_index = 0;\n this.ao_radius = 0.5;\n this.ao_strength = 1.0;\n // This can be used to generate more \"frames\" of AO samples.\n // But through testing, using the \"moving\" noise texture yielded better results.\n this._ao_kernel_frames = 1;\n this._profiling = null;\n this._scene = scene;\n this._camera = camera;\n this._depth = depth;\n this._post_process_camera = post_process_camera;\n this._enable_normal_filtering = enable_normal_filtering;\n if (gpu_profiler !== null) {\n this._profiling = {\n profiler: gpu_profiler,\n section_total: gpu_profiler.create_section('AO Total'),\n section_downscale_depth_normals: gpu_profiler.create_section('AO Downscale Depth/Normals'),\n section_compute: gpu_profiler.create_section('AO Compute'),\n section_bilateral_filter_0: gpu_profiler.create_section('AO Bilateral 0'),\n section_bilateral_filter_1: gpu_profiler.create_section('AO Bilateral 1'),\n section_temporal_filter: gpu_profiler.create_section('AO Temporal filter')\n };\n }\n const noise_offset_count = 16;\n this._noise_offsets = [];\n for (let i = 0; i < noise_offset_count; i++) {\n this._noise_offsets.push({\n x: Math.random(), y: Math.random()\n });\n }\n this._previous_projection_matrix = new BABYLON_Matrix();\n this._previous_view_matrix = new BABYLON_Matrix();\n this._ao_kernel = [];\n this._noise_size = 64;\n const noise_texture_data = new Uint8Array(this._noise_size * this._noise_size * 3);\n // Read blue noise data as angles, and calculate the vec2's from it for the shader to use.\n for (let i = 0; i < this._noise_size * this._noise_size; i++) {\n const angle = 2.0 * Math.PI * blue_noise_64x64x1[i] / 255.0;\n noise_texture_data[3 * i + 0] = clamp((Math.cos(angle) * 0.5 + 0.5) * 255.0, 0, 255);\n noise_texture_data[3 * i + 1] = clamp((Math.sin(angle) * 0.5 + 0.5) * 255.0, 0, 255);\n noise_texture_data[3 * i + 2] = clamp((Math.random() * 0.5 + 0.5) * 255.0, 0, 255);\n }\n this._noise_texture = new BABYLON_RawTexture(noise_texture_data, this._noise_size, this._noise_size, BABYLON_Engine.TEXTUREFORMAT_RGB, scene, false, false, BABYLON_RawTexture.NEAREST_SAMPLINGMODE, BABYLON_Engine.TEXTURETYPE_UNSIGNED_BYTE, BABYLON_Constants.TEXTURE_CREATIONFLAG_STORAGE, false);\n this._noise_texture.wrapU = BABYLON_Texture.WRAP_ADDRESSMODE;\n this._noise_texture.wrapV = BABYLON_Texture.WRAP_ADDRESSMODE;\n const downsampled_width = width / 2;\n const downsampled_height = height / 2;\n this._downsampled_depth = this.create_depth_buffer('downsampled_depth_0', downsampled_width, downsampled_height);\n this._previous_downsampled_depth = this.create_depth_buffer('downsampled_depth_1', downsampled_width, downsampled_height);\n this._bilateral_filter = this.create_bilateral_filter();\n this._ao_buffer_write = this.create_ao_buffer('ao_write', downsampled_width, downsampled_height);\n this._ao_buffer_accumulate = this.create_ao_buffer('ao_accumulate', downsampled_width, downsampled_height);\n this._ao_buffer_intermediate = this.create_ao_buffer('ao_intermediate', downsampled_width, downsampled_height);\n this._compute_ao = this.create_ao_compute_effect(samples);\n this._temporal_filter = new BABYLON_PostProcess('temporal_filter', 'ao_temporal_filter', [\n INVERTED_PROJECTION_MATRIX,\n CURRENT_VIEWSPACE_TO_PREVIOUS_PROJECTION_SPACE_MATRIX,\n PREVIOUS_PROJECTED_TO_CURRENT_VIEW,\n INVERSE_VIEW_MATRIX,\n PROJECTION_MATRIX_Z_VALUES,\n PREVIOUS_PROJECTION_MATRIX_Z_VALUES\n ], [\n PREVIOUS_AO_SAMPLER, PREVIOUS_DEPTH_SAMPLER,\n AO_SAMPLER, DEPTH_SAMPLER\n ], { width: 4, height: 4 }, post_process_camera);\n this._temporal_filter.forceFullscreenViewport = true;\n this._temporal_filter.onApply = (effect) => {\n this.bind_temporal_filter(effect);\n };\n this._downsample_depth = new BABYLON_PostProcess('downsample_depth', 'ao_half_depth', [\n INVERTED_PROJECTION_MATRIX\n ], [\n DEPTH_SAMPLER\n ], { width: 4, height: 4 }, post_process_camera);\n this._downsample_depth.forceFullscreenViewport = true;\n this._downsample_depth.onApply = (effect) => {\n effect.setTexture(DEPTH_SAMPLER, this._depth);\n const inverse_projection_matrix = this._camera.getProjectionMatrix().invertToRef(matrix_pool.fetch());\n effect.setMatrix(INVERTED_PROJECTION_MATRIX, inverse_projection_matrix);\n matrix_pool.return(inverse_projection_matrix);\n };\n this._downsample_normals = null;\n this._downsampled_normals = null;\n if (this.enable_normal_filtering) {\n this.initialize_normal_effect_and_render_target(downsampled_width, downsampled_height);\n }\n this._apply_ao = new BABYLON_PostProcess('ao_apply', 'ao_apply', [\n AO_STRENGTH, INVERSE_HALF_RESOLUTION, INVERSE_PROJECTION_MATRIX\n ], [\n DEPTH_SAMPLER, AO_SAMPLER, HALF_LINEAR_DEPTH_SAMPLER\n ], { width: 4, height: 4 }, post_process_camera);\n this._apply_ao.onApply = (effect) => {\n effect.setTexture(DEPTH_SAMPLER, this._apply_ao_target.get_depth_texture());\n effect.setTexture(AO_SAMPLER, this.get_ao_sampler());\n const half_depth_sampler = this.get_downsampled_linear_depth_sampler();\n effect.setTexture(HALF_LINEAR_DEPTH_SAMPLER, half_depth_sampler);\n effect.setFloat(AO_STRENGTH, this.ao_strength);\n effect.setFloat2(INVERSE_HALF_RESOLUTION, 1.0 / half_depth_sampler.getRenderWidth(), 1.0 / half_depth_sampler.getRenderHeight());\n const inverse_projection_matrix = this._camera.getProjectionMatrix().invertToRef(matrix_pool.fetch());\n effect.setMatrix(INVERSE_PROJECTION_MATRIX, inverse_projection_matrix);\n matrix_pool.return(inverse_projection_matrix);\n };\n this._apply_ao.alphaMode = BABYLON_Engine.ALPHA_MULTIPLY;\n }\n get enable_normal_filtering() {\n return this._enable_normal_filtering;\n }\n set enable_normal_filtering(value) {\n if (value === this._enable_normal_filtering)\n return;\n this._enable_normal_filtering = value;\n // Recreate bilateral filter to account for or ignore normals\n this._bilateral_filter.dispose();\n this._bilateral_filter = this.create_bilateral_filter();\n if (this._enable_normal_filtering) {\n this.initialize_normal_effect_and_render_target(this._downsampled_depth.getRenderWidth(), this._downsampled_depth.getRenderHeight());\n }\n else {\n this._downsample_normals.dispose();\n this._downsampled_normals.dispose();\n this._downsample_normals = null;\n this._downsampled_normals = null;\n }\n // Compute AO uses normal buffer, so it needs recompile\n this._compute_ao.dispose();\n this.create_ao_compute_effect(this._last_compiled_number_of_samples);\n }\n create_bilateral_filter() {\n const bilateral_filter = new BilateralBlur(2, this._scene, this._enable_normal_filtering);\n bilateral_filter.depth_threshold = 0.04;\n bilateral_filter.normal_angle_threshold = radians(30);\n return bilateral_filter;\n }\n initialize_normal_effect_and_render_target(width, height) {\n this._downsampled_normals = new BABYLON_RenderTargetTexture('downsampled_normals', { width: width, height: height }, this._scene, undefined, undefined, BABYLON_Constants.TEXTURETYPE_UNSIGNED_BYTE, false, BABYLON_Constants.TEXTURE_NEAREST_SAMPLINGMODE, false, false, false, BABYLON_Constants.TEXTUREFORMAT_RG, false);\n this._downsampled_normals.wrapU = BABYLON_Texture.CLAMP_ADDRESSMODE;\n this._downsampled_normals.wrapV = BABYLON_Texture.CLAMP_ADDRESSMODE;\n this._downsample_normals = new BABYLON_PostProcess('ao_half_normals', 'ao_half_normals', [INVERTED_PROJECTION_MATRIX, INVERSE_DEPTH_DIMENSIONS], [DEPTH_SAMPLER], { width: 4, height: 4 }, this._post_process_camera);\n this._downsample_normals.onApply = (effect) => {\n effect.setFloat2(INVERSE_DEPTH_DIMENSIONS, 1.0 / this._depth.getSize().width, 1.0 / this._depth.getSize().height);\n effect.setTexture(DEPTH_SAMPLER, this._depth);\n const inverse_projection_matrix = this._camera.getProjectionMatrix().invertToRef(matrix_pool.fetch());\n effect.setMatrix(INVERTED_PROJECTION_MATRIX, inverse_projection_matrix);\n matrix_pool.return(inverse_projection_matrix);\n };\n }\n set_ao_sample_count(samples) {\n if (this._last_compiled_number_of_samples === samples) {\n // Early out, no change.\n return;\n }\n this._compute_ao.dispose();\n this.create_ao_compute_effect(samples);\n }\n create_ao_compute_effect(samples) {\n const defines = [];\n defines.push('#define sampleKernelSize ' + samples);\n this._compute_ao = new BABYLON_PostProcess('compute_ao', 'ao_compute', [\n INVERTED_PROJECTION_MATRIX,\n PROJECTION_MATRIX,\n RADIUS,\n SAMPLE_KERNEL,\n NOISE_SCALE,\n NOISE_UV_OFFSET,\n INVERSE_DEPTH_DIMENSIONS,\n PROJECTION_MATRIX_Z_VALUES\n ], [\n DEPTH_SAMPLER,\n NOISE_SAMPLER\n ], { width: 4, height: 4 }, this._post_process_camera, undefined, undefined, false, defines.join('\\n'));\n this._compute_ao.forceFullscreenViewport = true;\n this._compute_ao.onApply = (effect) => {\n this.bind_compute_ao(effect);\n };\n // We also create the kernel here, as number of samples might have been updated.\n this.create_kernel(samples, this._ao_kernel_frames);\n // Store how many samples we compiled with\n this._last_compiled_number_of_samples = samples;\n return this._compute_ao;\n }\n bind_temporal_filter(effect) {\n const projection_matrix = this._camera.getProjectionMatrix();\n const view_matrix = this._camera.getViewMatrix();\n const inverse_projection_matrix = projection_matrix.invertToRef(matrix_pool.fetch());\n const inverse_view_matrix = view_matrix.invertToRef(matrix_pool.fetch());\n const previous_view_projection = this._previous_view_matrix.multiplyToRef(this._previous_projection_matrix, matrix_pool.fetch());\n const view_to_previous_projection_matrix = inverse_view_matrix.multiplyToRef(previous_view_projection, matrix_pool.fetch());\n const previous_projected_to_current_view = view_to_previous_projection_matrix.invertToRef(matrix_pool.fetch());\n effect.setMatrix(INVERTED_PROJECTION_MATRIX, inverse_projection_matrix);\n effect.setMatrix(CURRENT_VIEWSPACE_TO_PREVIOUS_PROJECTION_SPACE_MATRIX, view_to_previous_projection_matrix);\n effect.setMatrix(PREVIOUS_PROJECTED_TO_CURRENT_VIEW, previous_projected_to_current_view);\n effect.setMatrix(INVERSE_VIEW_MATRIX, inverse_view_matrix);\n effect.setFloat2(PROJECTION_MATRIX_Z_VALUES, projection_matrix.m[10], projection_matrix.m[14]);\n effect.setFloat2(PREVIOUS_PROJECTION_MATRIX_Z_VALUES, this._previous_projection_matrix.m[10], this._previous_projection_matrix.m[14]);\n this._previous_projection_matrix.copyFrom(projection_matrix);\n this._previous_view_matrix.copyFrom(view_matrix);\n matrix_pool.return(inverse_projection_matrix, view_to_previous_projection_matrix, previous_view_projection, inverse_view_matrix, previous_projected_to_current_view);\n effect.setTexture(DEPTH_SAMPLER, this._downsampled_depth);\n effect.setTexture(PREVIOUS_DEPTH_SAMPLER, this._previous_downsampled_depth);\n effect.setTexture(AO_SAMPLER, this._ao_buffer_write);\n effect.setTexture(PREVIOUS_AO_SAMPLER, this._ao_buffer_accumulate);\n }\n bind_compute_ao(effect) {\n const projection_matrix = this._camera.getProjectionMatrix();\n const inverse_projection_matrix = projection_matrix.invertToRef(matrix_pool.fetch());\n effect.setFloat2(INVERSE_DEPTH_DIMENSIONS, 1.0 / this._downsampled_depth.getRenderWidth(), 1.0 / this._downsampled_depth.getRenderHeight());\n effect.setMatrix(INVERTED_PROJECTION_MATRIX, inverse_projection_matrix);\n effect.setMatrix(PROJECTION_MATRIX, projection_matrix);\n effect.setTexture(DEPTH_SAMPLER, this._downsampled_depth);\n effect.setTexture(NOISE_SAMPLER, this._noise_texture);\n effect.setFloat2(NOISE_SCALE, this._ao_buffer_write.getRenderWidth() / this._noise_size, this._ao_buffer_write.getRenderHeight() / this._noise_size);\n // effect.setFloat2(NOISE_UV_OFFSET, this.noise_offsets[this.noise_offset_index].x, this.noise_offsets[this.noise_offset_index].y)\n effect.setFloat2(NOISE_UV_OFFSET, Math.random(), Math.random());\n this._noise_offset_index = (this._noise_offset_index + 1) % this._noise_offsets.length;\n effect.setFloatArray3(SAMPLE_KERNEL, this._ao_kernel[this._ao_kernel_sample_cycle]);\n this._ao_kernel_sample_cycle = (this._ao_kernel_sample_cycle + 1) % this._ao_kernel.length;\n effect.setFloat(RADIUS, this.ao_radius);\n effect.setFloat2(PROJECTION_MATRIX_Z_VALUES, projection_matrix.m[10], projection_matrix.m[14]);\n matrix_pool.return(inverse_projection_matrix);\n }\n render(scene) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;\n (_a = this._profiling) === null || _a === void 0 ? void 0 : _a.section_total.start();\n (_b = this._profiling) === null || _b === void 0 ? void 0 : _b.section_downscale_depth_normals.start();\n // Half resolution depth and linearize\n scene.postProcessManager.directRender([this._downsample_depth], this._downsampled_depth.renderTarget, true);\n if (this.enable_normal_filtering) {\n // Compute normals from full res depth\n scene.postProcessManager.directRender([this._downsample_normals], this._downsampled_normals.renderTarget, true);\n }\n (_c = this._profiling) === null || _c === void 0 ? void 0 : _c.section_downscale_depth_normals.stop();\n // Set to true for AO debugging. Disables the bilateral filter and the temporal reprojection.\n // Directly renders the computed AO from this frame. Note that it renders to a different target compared to normal AO compute\n const debug_skip_filters = false;\n if (debug_skip_filters) {\n (_d = this._profiling) === null || _d === void 0 ? void 0 : _d.section_compute.start();\n scene.postProcessManager.directRender([this._compute_ao], this._ao_buffer_accumulate.renderTarget, true);\n (_e = this._profiling) === null || _e === void 0 ? void 0 : _e.section_compute.stop();\n (_f = this._profiling) === null || _f === void 0 ? void 0 : _f.section_total.stop();\n return;\n }\n // Normal AO compute\n (_g = this._profiling) === null || _g === void 0 ? void 0 : _g.section_compute.start();\n scene.postProcessManager.directRender([this._compute_ao], this._ao_buffer_write.renderTarget, true);\n (_h = this._profiling) === null || _h === void 0 ? void 0 : _h.section_compute.stop();\n // Add bilateral blur x 2 (5x5) into ao_buffer_write (itself) (ao_buffer_write => intermediate => ao_buffer_write)\n (_j = this._profiling) === null || _j === void 0 ? void 0 : _j.section_bilateral_filter_0.start();\n this._bilateral_filter.render(scene, this._ao_buffer_write, this._downsampled_depth, this._downsampled_normals, this._ao_buffer_intermediate, this._ao_buffer_write);\n (_k = this._profiling) === null || _k === void 0 ? void 0 : _k.section_bilateral_filter_0.stop();\n // Add temporal filter (ao_buffer_write + ao_buffer_accum => intermediate)\n (_l = this._profiling) === null || _l === void 0 ? void 0 : _l.section_temporal_filter.start();\n scene.postProcessManager.directRender([this._temporal_filter], this._ao_buffer_intermediate.renderTarget, true);\n (_m = this._profiling) === null || _m === void 0 ? void 0 : _m.section_temporal_filter.stop();\n // Bilateral blur again (intermediate => ao_buffer_write => ao_buffer_accum)\n (_o = this._profiling) === null || _o === void 0 ? void 0 : _o.section_bilateral_filter_1.start();\n this._bilateral_filter.render(scene, this._ao_buffer_intermediate, this._downsampled_depth, this._downsampled_normals, this._ao_buffer_write, this._ao_buffer_accumulate);\n (_p = this._profiling) === null || _p === void 0 ? void 0 : _p.section_bilateral_filter_1.stop();\n (_q = this._profiling) === null || _q === void 0 ? void 0 : _q.section_total.stop();\n }\n apply(framebuffer) {\n this._apply_ao_target = framebuffer;\n const gl = this._scene.getEngine()._gl;\n gl.colorMask(true, true, true, false);\n this._scene.postProcessManager.directRender([this._apply_ao], framebuffer.get_render_target().renderTarget, true);\n gl.colorMask(true, true, true, true);\n this._scene.getEngine().setColorWrite(true);\n // For some reason, unless we change our alpha blend state, Babylon fails to apply other alpha blend state for materials later.\n // It seems that if it's set to anything other than DISABLE, Babylon doesn't apply blend state for the meshes/material's requested blend mode.\n this._scene.getEngine().setAlphaMode(BABYLON_Engine.ALPHA_DISABLE);\n }\n create_ao_buffer(name, width, height) {\n const texture_component_type = BABYLON_Engine.TEXTURETYPE_UNSIGNED_BYTE;\n const buffer = new BABYLON_RenderTargetTexture(name, { width: width, height: height }, this._scene, undefined, undefined, texture_component_type, false, BABYLON_Texture.BILINEAR_SAMPLINGMODE, false, false, false, BABYLON_Engine.TEXTUREFORMAT_RED);\n buffer.wrapU = BABYLON_Texture.CLAMP_ADDRESSMODE;\n buffer.wrapV = BABYLON_Texture.CLAMP_ADDRESSMODE;\n buffer.ignoreCameraViewport = true;\n return buffer;\n }\n create_depth_buffer(name, width, height) {\n const depth_component_type = BABYLON_Engine.TEXTURETYPE_FLOAT;\n const buffer = new BABYLON_RenderTargetTexture(name, { width: width, height: height }, this._scene, false, undefined, depth_component_type, false, BABYLON_Texture.NEAREST_SAMPLINGMODE, false, false, false, BABYLON_Engine.TEXTUREFORMAT_RED);\n buffer.wrapU = BABYLON_Texture.CLAMP_ADDRESSMODE;\n buffer.wrapV = BABYLON_Texture.CLAMP_ADDRESSMODE;\n buffer.ignoreCameraViewport = true;\n return buffer;\n }\n get_ao_sampler() {\n return this._ao_buffer_accumulate;\n }\n get_downsampled_linear_depth_sampler() {\n return this._downsampled_depth;\n }\n flip_flop() {\n const swap = this._downsampled_depth;\n this._downsampled_depth = this._previous_downsampled_depth;\n this._previous_downsampled_depth = swap;\n }\n resize(width, height) {\n var _a;\n const downsampled_width = width / 2;\n const downsampled_height = height / 2;\n const downsampled_size = { width: downsampled_width, height: downsampled_height };\n this._ao_buffer_write.resize(downsampled_size);\n this._ao_buffer_accumulate.resize(downsampled_size);\n this._ao_buffer_intermediate.resize(downsampled_size);\n this._downsampled_depth.resize(downsampled_size);\n this._previous_downsampled_depth.resize(downsampled_size);\n (_a = this._downsampled_normals) === null || _a === void 0 ? void 0 : _a.resize(downsampled_size);\n }\n dispose() {\n var _a, _b;\n // Dispose texture\n this._noise_texture.dispose();\n // Dispose render targets\n this._ao_buffer_write.dispose();\n this._ao_buffer_accumulate.dispose();\n this._ao_buffer_intermediate.dispose();\n this._downsampled_depth.dispose();\n this._previous_downsampled_depth.dispose();\n (_a = this._downsampled_normals) === null || _a === void 0 ? void 0 : _a.dispose();\n // Dispose effects\n this._bilateral_filter.dispose();\n this._compute_ao.dispose();\n this._temporal_filter.dispose();\n this._downsample_depth.dispose();\n (_b = this._downsample_normals) === null || _b === void 0 ? void 0 : _b.dispose();\n this._apply_ao.dispose();\n this._ao_kernel = [];\n }\n create_kernel(sample_count, frame_count) {\n this._ao_kernel = new Array(frame_count);\n const golden_ratio = (1.0 + Math.sqrt(5.0)) / 2.0;\n const total_sample_count = frame_count * sample_count;\n const cached_vector = new BABYLON_Vector3();\n for (let frame = 0; frame < frame_count; frame++) {\n this._ao_kernel[frame] = new Float32Array(3 * sample_count);\n const kernel = this._ao_kernel[frame];\n for (let i = 0; i < sample_count; i++) {\n // Generate a sampling vector using the \"Fibonacci Lattice\"\n const sample_index = i * frame_count + frame;\n const theta = 2.0 * Math.PI * sample_index / golden_ratio;\n const phi = Math.acos(1.0 - 2.0 * (sample_index + 0.5) / total_sample_count);\n cached_vector.x = Math.sin(phi) * Math.cos(theta);\n cached_vector.y = Math.sin(phi) * Math.sin(theta);\n cached_vector.z = Math.abs(Math.cos(phi));\n const scale = (1.0 + sample_index) / total_sample_count;\n cached_vector.scaleInPlace(scale * scale);\n kernel[3 * i + 0] = cached_vector.x;\n kernel[3 * i + 1] = cached_vector.y;\n kernel[3 * i + 2] = cached_vector.z;\n }\n }\n }\n}\n//# sourceMappingURL=AmbientOcclusion.js.map","import { Camera as BABYLON_Camera } from '@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js';\nimport { AOQualityPreset, ExposurePreset } from '../api.js';\nimport { AccumulationBuffer } from './Accumulator.js';\nimport * as Utils from './utility/utils.js';\nimport { BloomEffect } from './Bloom.js';\nimport { EdgeSketchEffect } from './utility/EdgeSketchEffect.js';\nimport { AmbientOcclusion } from './AmbientOcclusion.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nconst CD_PER_RGB = 1;\nconst AO_WARMUP_FRAME_COUNT = 16;\n/** Calculates an exposure value (EV) from camera settings.\n *\n * Parameters:\n * - aperture: AKA f-stop. Dimensionless number describing the size of the aperture. Half the value means four times brighter.\n * - shutter_speed: measured in s^-1, typically 50-500. Half the value means twice as bright.\n * - film_speed: AKA ISO; dimensionless number, typically 100-1600. Twice as high means twice as bright.\n */\nexport function exposure_value({ aperture, shutter_speed, sensitivity }) {\n return Math.log2(aperture * aperture * shutter_speed / sensitivity * 100);\n}\n/** Converts a log2 exposure value into a linear scale multiplier, normalized around\n * ev 0 = 1.\n */\nexport function ev_to_intensity(ev) {\n return CD_PER_RGB / Math.pow(2, ev);\n}\nexport const EXPOSURE_PRESETS = {\n // EV: 6\n [ExposurePreset.HOME_INTERIOR]: {\n aperture: 1.4,\n shutter_speed: 125,\n sensitivity: 400\n },\n // EV: 8\n [ExposurePreset.BRIGHTLY_LIT_OFFICE]: {\n aperture: 2.0,\n shutter_speed: 125,\n sensitivity: 200\n },\n // EV: 12\n [ExposurePreset.OUTDOOR_HEAVY_OVERCAST]: {\n aperture: 2.0,\n shutter_speed: 2000,\n sensitivity: 200\n },\n // EV: 15\n [ExposurePreset.OUTDOOR_CLEAR_DAY]: {\n aperture: 2.8,\n shutter_speed: 4000,\n sensitivity: 100\n }\n};\nexport class PostProcessManager {\n dispose() {\n var _a, _b;\n this._accumulation_buffer.dispose();\n (_a = this._bloom) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._ambient_occlusion) === null || _b === void 0 ? void 0 : _b.dispose();\n }\n constructor(_viewer, framebuffer, ao_supported, scene, engine_camera, mark_view_dirty) {\n this._viewer = _viewer;\n this.framebuffer = framebuffer;\n this.ao_supported = ao_supported;\n this.scene = scene;\n this.engine_camera = engine_camera;\n this.mark_view_dirty = mark_view_dirty;\n this._bloom = null;\n this._ambient_occlusion = null;\n this._gpu_profiling_section_tonemapping = null;\n this._gpu_profiling_section_acummulation_buffer = null;\n /**\n * This is an experimental feature only meant to be used by screenshots.\n * However this was left in here so that you can debug/develop the feature in realtime without using screenhots.\n */\n this.edge_sketch_effect = null;\n // We default to desktop here regardless of what device we're running on.\n // We leave it to the planners to change settings depending on device.\n const default_quality_preset = AOQualityPreset.DESKTOP_DEFAULT;\n const gpu_profiler = this._viewer.get_gpu_profiler();\n if (gpu_profiler !== null) {\n this._gpu_profiling_section_tonemapping = gpu_profiler.create_section('Tonemapping');\n this._gpu_profiling_section_acummulation_buffer = gpu_profiler.create_section('Accumulation');\n }\n this._post_process_camera = new BABYLON_Camera('full_screen_cam', new BABYLON_Vector3(0, 0, -1), scene);\n this.accumulation_frame_count = 16;\n this._accumulation_buffer = new AccumulationBuffer(this.scene, this.accumulation_frame_count, this.framebuffer);\n // Enable AO by default if supported\n this._ao_settings = {\n strength: 1.0,\n radius: 1.0,\n enabled: ao_supported,\n quality: default_quality_preset\n };\n // Enable Bloom by default\n this._bloom_settings = {\n enabled: this.framebuffer.is_float_render_target(), // Enable true by default where supported\n intensity: 1.0\n };\n // Enable bloom by default\n if (this._bloom_settings.enabled) {\n this._bloom = new BloomEffect(scene, this.framebuffer, this._viewer.get_gpu_profiler());\n }\n // Create the AO here instead of using our regular endpoint, as the regular endpoint for creating the AO breaks when called from this constructor.\n if (this._ao_settings.enabled) {\n this._ambient_occlusion = new AmbientOcclusion(scene, this.framebuffer.get_width(), this.framebuffer.get_height(), this._post_process_camera, engine_camera.camera, this.framebuffer.get_depth_texture(), PostProcessManager.create_accumulator_ao_settings(this._ao_settings).samples_per_frame, PostProcessManager.create_accumulator_ao_settings(this._ao_settings).improved_normals, this._viewer.get_gpu_profiler());\n this._ambient_occlusion.ao_radius = this._ao_settings.radius;\n this._accumulation_buffer.queue_warmup_frame_count(AO_WARMUP_FRAME_COUNT);\n }\n else {\n this._ambient_occlusion = null;\n }\n }\n render_ambient_occlusion() {\n if (this._ambient_occlusion) {\n this._ambient_occlusion.ao_radius = this._ao_settings.radius;\n this._ambient_occlusion.ao_strength = this._ao_settings.strength;\n this._ambient_occlusion.render(this.scene);\n this._ambient_occlusion.apply(this.framebuffer);\n }\n }\n render(render_target, depth_texture) {\n var _a, _b, _c;\n if (this._bloom) {\n this._bloom.render(this.scene);\n }\n if (this.edge_sketch_effect) {\n if (depth_texture === null) {\n console.error('No depth texture given for edge rendering - is it not supported?');\n }\n else {\n this.edge_sketch_effect.render(this.engine_camera.camera.getProjectionMatrix(), depth_texture, render_target);\n }\n }\n (_a = this._gpu_profiling_section_acummulation_buffer) === null || _a === void 0 ? void 0 : _a.start();\n // Enable tonemapping if our source data (this.framebuffer) is a float render target\n const enable_tonemapping = this.framebuffer.is_float_render_target();\n this._accumulation_buffer.render(this._bloom, this._viewer.lut_effect, enable_tonemapping);\n (_b = this._gpu_profiling_section_acummulation_buffer) === null || _b === void 0 ? void 0 : _b.stop();\n (_c = this._ambient_occlusion) === null || _c === void 0 ? void 0 : _c.flip_flop();\n }\n /**\n * @returns The texture where the final image was produced\n */\n get_destination_texture() {\n return this._accumulation_buffer.accumulation_buffer2;\n }\n blit_to_framebuffer(target) {\n var _a, _b;\n (_a = this._gpu_profiling_section_tonemapping) === null || _a === void 0 ? void 0 : _a.start();\n this.framebuffer.blit(target);\n (_b = this._gpu_profiling_section_tonemapping) === null || _b === void 0 ? void 0 : _b.stop();\n }\n get ao_settings() {\n return this._ao_settings;\n }\n get bloom_settings() {\n return this._bloom_settings;\n }\n get_active_accumulation_buffer() {\n return this._accumulation_buffer;\n }\n static get_accumulator_viewport_info(canvas_width, canvas_height, viewport_size, viewport_offset) {\n const normalized_pixel_width = viewport_size.x / canvas_width;\n const normalized_pixel_height = viewport_size.y / canvas_height;\n const normalized_pixel_x_offset = viewport_offset.x / canvas_width;\n let normalized_pixel_y_offset = -viewport_offset.y / canvas_height;\n normalized_pixel_y_offset += (canvas_height - viewport_size.y) / canvas_height;\n return {\n width: canvas_width,\n height: canvas_height,\n offset: { x: normalized_pixel_x_offset, y: normalized_pixel_y_offset },\n scale: { x: normalized_pixel_width, y: normalized_pixel_height }\n };\n }\n static create_accumulator_ao_settings(ao_settings) {\n const quality = PostProcessManager.get_ao_quality_preset_settings(ao_settings.quality);\n return {\n radius: ao_settings.radius,\n enabled: ao_settings.enabled,\n strength: ao_settings.strength,\n samples_per_frame: quality.samples_per_frame,\n improved_normals: quality.improved_normals\n };\n }\n // Updates all effects sizes based on the framebuffer.\n resize() {\n var _a;\n this._accumulation_buffer.resize(this.framebuffer.get_width(), this.framebuffer.get_height());\n (_a = this._bloom) === null || _a === void 0 ? void 0 : _a.resize(this.framebuffer.get_width(), this.framebuffer.get_height());\n if (this._ambient_occlusion !== null) {\n this._ambient_occlusion.resize(this.framebuffer.get_width(), this.framebuffer.get_height());\n this._accumulation_buffer.queue_warmup_frame_count(AO_WARMUP_FRAME_COUNT);\n }\n }\n reset_stable_frames() {\n this._accumulation_buffer.reset_stable_frames();\n }\n create_accumulation_buffer() {\n this._accumulation_buffer.set_accumulation_frame_count(this.accumulation_frame_count);\n this.mark_view_dirty();\n this.reset_stable_frames();\n }\n remove_accumulation_buffer() {\n this._accumulation_buffer.set_accumulation_frame_count(0);\n this.mark_view_dirty();\n }\n enable_temporal_effects(use_ambient_occlusion) {\n if (use_ambient_occlusion && !this.ao_supported) {\n use_ambient_occlusion = false;\n }\n this._ao_settings.enabled = use_ambient_occlusion;\n this.create_accumulation_buffer();\n this.set_temporal_ao_parameters(this._ao_settings);\n }\n disable_temporal_effects() {\n this.remove_accumulation_buffer();\n }\n /**\n * Enabled the experimental edge sketch effect\n */\n enable_edge_sketch_effect() {\n if (this.edge_sketch_effect !== null)\n return;\n this.edge_sketch_effect = new EdgeSketchEffect(this.scene);\n this.mark_view_dirty();\n }\n /**\n * Disables the experimental edge sketch effect\n */\n disable_edge_sketch_effect() {\n if (this.edge_sketch_effect === null)\n return;\n this.edge_sketch_effect.dispose();\n this.edge_sketch_effect = null;\n this.mark_view_dirty();\n }\n keep_rendering() {\n return this._accumulation_buffer.keep_rendering();\n }\n set_temporal_ao_parameters(ao_settings) {\n this._ao_settings = Utils.update_from_partial(this._ao_settings, ao_settings);\n if (ao_settings.enabled && !this.ao_supported) {\n console.warn('Ambient Occlusion is not supported on this device');\n return;\n }\n if (this._ao_settings.enabled && this._ambient_occlusion === null) {\n this._ambient_occlusion = new AmbientOcclusion(this.engine_camera.camera._scene, this.framebuffer.get_width(), this.framebuffer.get_height(), this._post_process_camera, this.engine_camera.camera, this.framebuffer.get_depth_texture(), PostProcessManager.create_accumulator_ao_settings(this._ao_settings).samples_per_frame, PostProcessManager.create_accumulator_ao_settings(this._ao_settings).improved_normals, this._viewer.get_gpu_profiler());\n this._accumulation_buffer.queue_warmup_frame_count(AO_WARMUP_FRAME_COUNT);\n }\n else if (!this._ao_settings.enabled && this._ambient_occlusion !== null) {\n this._ambient_occlusion.dispose();\n this._ambient_occlusion = null;\n }\n if (this._ambient_occlusion) {\n this._ambient_occlusion.enable_normal_filtering = PostProcessManager.create_accumulator_ao_settings(this._ao_settings).improved_normals;\n this._ambient_occlusion.set_ao_sample_count(PostProcessManager.create_accumulator_ao_settings(this._ao_settings).samples_per_frame);\n this._ambient_occlusion.ao_radius = this._ao_settings.radius;\n this._ambient_occlusion.ao_strength = this._ao_settings.strength;\n }\n this.mark_view_dirty();\n }\n on_scene_dirty() {\n if (this._ambient_occlusion !== null) {\n this._accumulation_buffer.queue_warmup_frame_count(AO_WARMUP_FRAME_COUNT);\n }\n }\n set_temporal_accumulation_frame_count(frame_count) {\n this.accumulation_frame_count = Math.max(1, frame_count);\n this._accumulation_buffer.set_accumulation_frame_count(this.accumulation_frame_count);\n this.mark_view_dirty();\n }\n jitter(viewport_width, viewport_height) {\n this._accumulation_buffer.jitter(viewport_width, viewport_height, this.engine_camera);\n }\n is_taa_enabled() {\n return this._accumulation_buffer.get_accumulation_frame_count() > 1;\n }\n increase_stable_frames() {\n this._accumulation_buffer.increase_stable_frames();\n }\n set_bloom(enable, intensity) {\n if (!enable && this._bloom === null)\n return false;\n if (enable && this._bloom !== null && (intensity === undefined || intensity === this._bloom.intensity))\n return false;\n this._bloom_settings.enabled = enable;\n if (intensity !== undefined) {\n this._bloom_settings.intensity = intensity;\n }\n if (!enable && this._bloom !== null) {\n this._bloom.dispose();\n this._bloom = null;\n }\n else if (enable && this._bloom === null) {\n if (!this.framebuffer.is_float_render_target()) {\n // Bloom isn't supported\n console.warn('Bloom required a float render target! It might not be supported on this device.');\n return false;\n }\n this._bloom = new BloomEffect(this.scene, this.framebuffer, this._viewer.get_gpu_profiler());\n if (intensity !== undefined) {\n this._bloom.intensity = intensity;\n }\n }\n else if (enable && this._bloom !== null) {\n // For some reason typescript doesn't understand that intensity is guaranteed to be defined.\n this._bloom.intensity = intensity;\n }\n this.mark_view_dirty();\n return true;\n }\n static get_ao_quality_preset_settings(preset) {\n // For some reason a map didn't work with the enum when declared and initialized outside of the class. That's why this is a function.\n switch (preset) {\n case AOQualityPreset.DESKTOP_LOW:\n return {\n samples_per_frame: 8,\n improved_normals: true\n };\n case AOQualityPreset.DESKTOP_DEFAULT:\n case AOQualityPreset.DESKTOP_MEDIUM:\n return {\n samples_per_frame: 12,\n improved_normals: true\n };\n case AOQualityPreset.DESKTOP_HIGH:\n return {\n samples_per_frame: 16,\n improved_normals: true\n };\n case AOQualityPreset.MOBILE_LOW:\n return {\n samples_per_frame: 6,\n improved_normals: false\n };\n case AOQualityPreset.MOBILE_DEFAULT: // Fallthrough\n case AOQualityPreset.MOBILE_MEDIUM:\n return {\n samples_per_frame: 8,\n improved_normals: false\n };\n case AOQualityPreset.MOBILE_HIGH:\n return {\n samples_per_frame: 12,\n improved_normals: true\n };\n case AOQualityPreset.SCREENSHOT:\n return {\n samples_per_frame: 32,\n improved_normals: true\n };\n default:\n console.warn('Failed to recognize AO quality preset: ' + preset + '. Returning medium desktop settings.');\n return {\n samples_per_frame: 12,\n improved_normals: true\n };\n }\n }\n}\n//# sourceMappingURL=PostProcessManager.js.map","import { IMatrix4, IVector2, CameraMode } from '../../api.js';\nimport { Camera as BABYLON_Camera } from '@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js';\nimport { Vector3 as BABYLON_Vector3, Matrix as BABYLON_Matrix } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { imatrix4_equals_babylon_matrix, matrix_pool, vector4_pool } from '../../Math.js';\n/**\n * This is a wrapper to easily supply custom projection and view matrices, through set_projection_matrix and set_view_matrix respectively.\n**/\nexport class BabylonEngineCamera extends BABYLON_Camera {\n constructor(name, scene, setActiveOnSceneIfNoneActive) {\n super(name, new BABYLON_Vector3(0, 0, 0), scene, setActiveOnSceneIfNoneActive);\n this._cached_view_matrix = BABYLON_Matrix.Identity();\n }\n _getViewMatrix() {\n return this._cached_view_matrix;\n }\n getViewMatrix(force) {\n return this._cached_view_matrix;\n }\n getProjectionMatrix(force) {\n return this._projectionMatrix;\n }\n process_new_view_matrix() {\n // Fixes issue with frustum planes not being updated from the beginning\n // @ts-expect-error\n this._refreshFrustumPlanes = true;\n // Call super function to calculate some internal fields\n super.getViewMatrix(true);\n // We need to manually update the _globalPosition field, otherwise reflections won't work.\n // We use the internal worldMatrix, calculated by getViewMatrix above (inverse of view matrix)\n this._globalPosition.x = this._worldMatrix.m[12];\n this._globalPosition.y = this._worldMatrix.m[13];\n this._globalPosition.z = this._worldMatrix.m[14];\n }\n set_view_matrix(matrix) {\n this._cached_view_matrix.copyFrom(matrix);\n this.process_new_view_matrix();\n }\n process_new_projection_matrix() {\n // Fixes issue with frustum planes not being updated from the beginning\n // @ts-expect-error\n this._refreshFrustumPlanes = true;\n this.freezeProjectionMatrix();\n }\n set_projection_matrix(matrix, projection_type) {\n this._projectionMatrix.copyFrom(matrix);\n if (projection_type === CameraMode.ORTHOGRAPHIC) {\n this.mode = BABYLON_Camera.ORTHOGRAPHIC_CAMERA;\n }\n else if (projection_type === CameraMode.PERSPECTIVE) {\n this.mode = BABYLON_Camera.PERSPECTIVE_CAMERA;\n }\n else {\n console.error('Unknown CameraMode enum: ' + projection_type + '. Expected ORTHOGRAPHIC or PERSPECTIVE');\n }\n this.process_new_projection_matrix();\n }\n}\nlet engine_camera_id_counter = 0;\n/**\n * The Engine camera is responsible for passing rendering properties to the rendering pipeline such as view and projection matrices.\n * It holds no understanding of the scene and is only usefull for passing properties to the rendering pipeline.\n */\nexport class EngineCamera {\n constructor(viewer) {\n this._current_jitter = { x: 0, y: 0 };\n this._view_matrix = IMatrix4.Identity();\n this._camera_mode = CameraMode.PERSPECTIVE;\n this._is_dirty = true;\n this._scene = viewer.scene;\n this._camera_id = engine_camera_id_counter++;\n this._viewer = viewer;\n // We can input any position since its not used for anything here.\n this._camera = new BabylonEngineCamera(`engine_camera_${this._camera_id}`, this._scene, true);\n this._non_jittered_projection_matrix = BABYLON_Matrix.Identity();\n this._jittered_projection_matrix = BABYLON_Matrix.Identity();\n // Set a default view and projection matrix so you can actually see something on screen if you don't load any camera\n const aspect_ratio = this._scene.getEngine().getRenderWidth() / this._scene.getEngine().getRenderHeight();\n const horizontal_fov = Math.PI / 4;\n const z_near = 0.05;\n const z_far = 100.0;\n const t = 1.0 / Math.tan(horizontal_fov * 0.5);\n const a = t;\n const b = t * aspect_ratio;\n const c = (z_far + z_near) / (z_far - z_near);\n const d = (-2 * z_far * z_near) / (z_far - z_near);\n const projection_matrix = IMatrix4.from_values(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0);\n this.set_projection_matrix(projection_matrix, CameraMode.PERSPECTIVE);\n const inverse_sqrt2 = 1.0 / Math.sqrt(2);\n this.set_view_matrix(IMatrix4.from_values(0, -inverse_sqrt2, -inverse_sqrt2, 0, 0, inverse_sqrt2, -inverse_sqrt2, 0, -1, 0, 0, 0, 0, 0, 9.8999, 1));\n }\n get projection_matrix() {\n return this._non_jittered_projection_matrix;\n }\n get view_matrix() {\n return this._camera.getViewMatrix();\n }\n get jittered_projection_matrix() {\n return this._jittered_projection_matrix;\n }\n get_view_matrix() {\n return IMatrix4.copy(this._view_matrix);\n }\n get_projection_matrix() {\n return this._non_jittered_projection_matrix.toIMatrix4ToRef([\n { x: 0, y: 0, z: 0, w: 0 },\n { x: 0, y: 0, z: 0, w: 0 },\n { x: 0, y: 0, z: 0, w: 0 },\n { x: 0, y: 0, z: 0, w: 0 }\n ]);\n }\n get_camera_mode() {\n return this._camera_mode;\n }\n set_view_matrix(matrix) {\n if (IMatrix4.equals(this._view_matrix, matrix))\n return;\n IMatrix4.copy_to_ref(matrix, this._view_matrix);\n const tmp_matrix = matrix_pool.fetch();\n this._camera.set_view_matrix(tmp_matrix.fromIMatrix4(matrix));\n matrix_pool.return(tmp_matrix);\n this._is_dirty = true;\n }\n update_projection_matrix(new_projection_matrix) {\n if (new_projection_matrix) {\n this._non_jittered_projection_matrix.fromIMatrix4(new_projection_matrix);\n }\n this._jittered_projection_matrix.copyFrom(this._non_jittered_projection_matrix);\n if (this._camera_mode === CameraMode.PERSPECTIVE) {\n const z_row = this._jittered_projection_matrix.getRowToRef(2, vector4_pool.fetch());\n this._jittered_projection_matrix.setRowFromFloats(2, this._current_jitter.x, this._current_jitter.y, z_row.z, z_row.w);\n vector4_pool.return(z_row);\n }\n else if (this._camera_mode === CameraMode.ORTHOGRAPHIC) {\n // Babylon's function getRowToRef silently fails if you supply it row index 3, which is a completely valid index. So we use getRow instead, which does work.\n const w_row = this._jittered_projection_matrix.getRow(3);\n this._jittered_projection_matrix.setRowFromFloats(3, w_row.x + this._current_jitter.x, w_row.y + this._current_jitter.y, w_row.z, w_row.w);\n }\n else {\n console.error('Missing jitter implementation for camera mode in engine camera!');\n }\n this._camera.set_projection_matrix(this._jittered_projection_matrix, this._camera_mode);\n }\n set_projection_matrix(matrix, projection_type) {\n // We only want to dirty if the given projection changed.\n this._is_dirty = this._is_dirty || !imatrix4_equals_babylon_matrix(matrix, this._non_jittered_projection_matrix) || this._camera_mode !== projection_type;\n this._camera_mode = projection_type;\n this.update_projection_matrix(matrix);\n }\n set_jitter(jitter) {\n if (this._current_jitter.x === jitter.x && this._current_jitter.y === jitter.y)\n return;\n this._current_jitter.x = jitter.x;\n this._current_jitter.y = jitter.y;\n this.update_projection_matrix();\n }\n get_jitter() {\n return IVector2.copy(this._current_jitter);\n }\n // TODO: This is leaking babylon\n get camera() {\n return this._camera;\n }\n is_dirty() {\n return this._is_dirty;\n }\n clear_dirty() {\n this._is_dirty = false;\n }\n dispose() {\n if (this._camera.isDisposed())\n return;\n this._camera.dispose();\n }\n get viewer() {\n return this._viewer;\n }\n get position() {\n return {\n x: this._camera.globalPosition.x,\n y: this._camera.globalPosition.y,\n z: this._camera.globalPosition.z\n };\n }\n // Helper functions to get basis vectors\n get forward() {\n const view_matrix = this._camera.getViewMatrix();\n return {\n x: view_matrix.m[4 * 0 + 2],\n y: view_matrix.m[4 * 1 + 2],\n z: view_matrix.m[4 * 2 + 2]\n };\n }\n get backward() {\n const view_matrix = this._camera.getViewMatrix();\n return {\n x: -view_matrix.m[4 * 0 + 2],\n y: -view_matrix.m[4 * 1 + 2],\n z: -view_matrix.m[4 * 2 + 2]\n };\n }\n get left() {\n const view_matrix = this._camera.getViewMatrix();\n return {\n x: -view_matrix.m[4 * 0 + 0],\n y: -view_matrix.m[4 * 1 + 0],\n z: -view_matrix.m[4 * 2 + 0]\n };\n }\n get right() {\n const view_matrix = this._camera.getViewMatrix();\n return {\n x: view_matrix.m[4 * 0 + 0],\n y: view_matrix.m[4 * 1 + 0],\n z: view_matrix.m[4 * 2 + 0]\n };\n }\n get up() {\n const view_matrix = this._camera.getViewMatrix();\n return {\n x: view_matrix.m[4 * 0 + 1],\n y: view_matrix.m[4 * 1 + 1],\n z: view_matrix.m[4 * 2 + 1]\n };\n }\n get down() {\n const view_matrix = this._camera.getViewMatrix();\n return {\n x: -view_matrix.m[4 * 0 + 1],\n y: -view_matrix.m[4 * 1 + 1],\n z: -view_matrix.m[4 * 2 + 1]\n };\n }\n}\n//# sourceMappingURL=EngineCamera.js.map","import { Framebuffer } from './Framebuffer.js';\nimport { PostProcessManager } from './PostProcessManager.js';\nimport { EngineCamera } from './camera/EngineCamera.js';\nimport { Observable } from '../Observable.js';\nimport { Ray as BABYLON_Ray } from '@inter-ikea-betrakta-babylonjs/core/Culling/ray.js';\nimport { Vector4 as BABYLON_Vector4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { matrix_pool, vector4_pool } from '../Math.js';\nimport { RENDER_LAYER_MASK_DEFAULT, RenderLayerMask } from './RenderLayer.js';\nimport { RenderingManager as BABYLON_RenderingManager } from '@inter-ikea-betrakta-babylonjs/core/Rendering/renderingManager.js';\nimport { Engine as BABYLON_Engine } from '@inter-ikea-betrakta-babylonjs/core/Engines/engine.js';\nexport class RenderView {\n constructor(viewer, interaction_system, render_width, render_height, framebuffer_type, wanted_msaa_samples) {\n this._is_dirty = false;\n // We keep our own render size which is what the user sets.\n // This lets us resize the actual framebuffer only when needed (just before we render)\n this._render_size = { x: 0, y: 0 };\n this._outlines_enabled = true;\n this._enabled = true;\n this.auto_capture_input_focus = true;\n this.viewport_changed_observable = new Observable();\n this.render_size_changed_observable = new Observable();\n this.before_render_observable = new Observable();\n this.after_render_observable = new Observable();\n this.camera_updated_observable = new Observable();\n this._render_layer_mask = RENDER_LAYER_MASK_DEFAULT;\n // Internal arrays for rendering\n this._opaque_render_list = [];\n this._transparent_and_unlit_render_list = [];\n this._draw_on_top_render_list = [];\n this.custom_clear_color = null;\n render_width = Math.floor(render_width);\n render_height = Math.floor(render_height);\n this._render_size.x = render_width;\n this._render_size.y = render_height;\n this.viewer = viewer;\n this.engine_camera = new EngineCamera(viewer);\n this.engine_camera.camera.layerMask = this._render_layer_mask.bitmap;\n const enable_depth_renderer = Framebuffer.is_depth_renderer_supported(this.viewer.scene.getEngine());\n const msaa_samples = Framebuffer.get_supported_msaa_samples(this.viewer.scene.getEngine(), wanted_msaa_samples, framebuffer_type);\n this.framebuffer = new Framebuffer(this.viewer.scene, framebuffer_type, render_width, render_height, this.engine_camera.camera, msaa_samples, enable_depth_renderer);\n this.framebuffer.get_render_target().renderList = [];\n this.postprocess_manager = new PostProcessManager(this.viewer, this.framebuffer, viewer.ao_supported(), this.viewer.scene, this.engine_camera, () => { this.set_view_dirty(); });\n for (let index = BABYLON_RenderingManager.MIN_RENDERINGGROUPS; index < BABYLON_RenderingManager.MAX_RENDERINGGROUPS; index++) {\n this.framebuffer.get_render_target().setRenderingAutoClearDepthStencil(index, false);\n }\n this.framebuffer.get_render_target().skipInitialClear = true;\n }\n get_aspect_ratio() {\n return this._render_size.x / this._render_size.y;\n }\n update(_) {\n if (!this._enabled)\n return;\n if (this.engine_camera.is_dirty()) {\n this.set_view_dirty();\n this.engine_camera.clear_dirty();\n this.camera_updated_observable.notify(this, this.engine_camera);\n }\n }\n set_view_dirty() {\n this._is_dirty = true;\n this.postprocess_manager.reset_stable_frames();\n }\n /**\n * Renders the View into its framebuffer, with all its postprocessing effects.\n * @param custom_render_list If set to null, the View renders any meshes that matches the View's layer mask.\n * However, if defined, those meshes will be rendered regardless of layer mask (needed for screenshots).\n */\n render(custom_render_list = null) {\n var _a;\n if (!this._enabled)\n return;\n if (this.is_framebuffer_size_dirty()) {\n this.framebuffer.resize(this._render_size.x, this._render_size.y);\n this.postprocess_manager.resize();\n this.render_size_changed_observable.notify(this, { x: this._render_size.x, y: this._render_size.y });\n }\n this.before_render_observable.notify(this);\n const previous_active_camera = this.viewer.scene._activeCamera;\n this.framebuffer.bind();\n // Clear color + depth\n const engine = this.viewer.scene.getEngine();\n engine.setColorWrite(true);\n engine.setDepthWrite(true);\n engine.clear((_a = this.custom_clear_color) !== null && _a !== void 0 ? _a : this.viewer.scene.clearColor, true, true, false);\n // Increment scene render id for good measure (sometimes Babylon doesn't render otherwise)\n this.viewer.scene.incrementRenderId();\n // Render forward pass (render geometry)\n const scene = this.viewer.scene;\n scene._activeCamera = this.engine_camera.camera;\n this.framebuffer.bind();\n // Jitter for TAA if applicable\n this.postprocess_manager.jitter(this._render_size.x, this._render_size.y);\n scene.resetCachedMaterial();\n scene.setTransformMatrix(this.engine_camera.view_matrix, this.engine_camera.jittered_projection_matrix);\n this._opaque_render_list.length = 0;\n this._transparent_and_unlit_render_list.length = 0;\n this._draw_on_top_render_list.length = 0;\n const all_meshes = custom_render_list === null ? this.viewer.get_meshes_by_layer_mask(this._render_layer_mask) : custom_render_list;\n for (let i = 0; i < all_meshes.length; i++) {\n const mesh = all_meshes[i];\n const material = mesh.material;\n // Perform frustum culling\n if (!this.engine_camera.camera.isInFrustum(mesh) || material === null)\n continue;\n if (material && material.depthFunction === BABYLON_Engine.ALWAYS) {\n this._draw_on_top_render_list.push(mesh);\n }\n else if ((material && material.unlit)) {\n this._transparent_and_unlit_render_list.push(mesh);\n }\n else {\n if ((material === null || material === void 0 ? void 0 : material.transparencyMode) === 2 || (material === null || material === void 0 ? void 0 : material.transparencyMode) === 3) {\n this._transparent_and_unlit_render_list.push(mesh);\n }\n else {\n this._opaque_render_list.push(mesh);\n }\n }\n }\n const render_target = this.framebuffer.get_render_target();\n render_target.activeCamera = this.engine_camera.camera;\n render_target.render_lite(this.engine_camera, this._opaque_render_list);\n // Render AO\n this.framebuffer.prepare_depth_buffer_texture();\n this.postprocess_manager.render_ambient_occlusion();\n // Re-bind framebuffer after AO has rendered and render the rest of the objects\n this.framebuffer.bind();\n render_target.render_lite(this.engine_camera, this._transparent_and_unlit_render_list);\n render_target.render_lite(this.engine_camera, this._draw_on_top_render_list);\n // Perform postprocessing (bloom, accumulation etc)\n this.postprocess_manager.render(render_target.renderTarget, this.framebuffer.get_depth_texture());\n this.viewer.scene._activeCamera = previous_active_camera;\n this.postprocess_manager.increase_stable_frames();\n if (!this.postprocess_manager.keep_rendering()) {\n this._is_dirty = false;\n }\n this.after_render_observable.notify(this);\n }\n get_render_layer_mask() {\n return this._render_layer_mask;\n }\n set_render_layer_mask(mask) {\n if (this._render_layer_mask.bitmap === mask.bitmap)\n return;\n this._render_layer_mask = RenderLayerMask.clone(mask);\n this.engine_camera.camera.layerMask = this._render_layer_mask.bitmap;\n this.set_view_dirty();\n }\n get_render_width() {\n return this._render_size.x;\n }\n get_render_height() {\n return this._render_size.y;\n }\n get_render_size() {\n return {\n x: this._render_size.x,\n y: this._render_size.y\n };\n }\n set_render_size(width_size, height) {\n if (typeof width_size === 'number') {\n this.resize(width_size, height);\n }\n else {\n this.resize(width_size.x, width_size.y);\n }\n }\n is_dirty() {\n return this._is_dirty;\n }\n get outlines_enabled() {\n return this._outlines_enabled;\n }\n set outlines_enabled(enabled) {\n if (this._outlines_enabled === enabled)\n return;\n this._outlines_enabled = enabled;\n this.viewer.mark_composite_dirty();\n }\n get enabled() {\n return this._enabled;\n }\n set enabled(enabled) {\n if (this._enabled && !enabled) {\n // We're disabling\n this.viewer.mark_composite_dirty();\n }\n else if (!this.enabled && enabled) {\n // We're enabling\n this.set_view_dirty();\n }\n this._enabled = enabled;\n }\n dispose() {\n const was_enabled = this.enabled;\n this._enabled = false;\n this.postprocess_manager.dispose();\n this.engine_camera.dispose();\n this.framebuffer.dispose();\n this.viewport_changed_observable.dispose();\n this.render_size_changed_observable.dispose();\n this.before_render_observable.dispose();\n this.after_render_observable.dispose();\n this.camera_updated_observable.dispose();\n if (was_enabled)\n this.viewer.mark_composite_dirty();\n }\n create_ray_from_normalized_coordinates(normalized_x, normalized_y) {\n const ray = BABYLON_Ray.Zero();\n this.create_ray_to_ref(normalized_x, normalized_y, ray);\n return { origin: ray.origin, direction: ray.direction, length: ray.length };\n }\n /**\n * Creates a ray originating from the image plane, towards the respective point on the far plane.\n * Useful for picking\n * @param normalized_x The normalized x coordinate in the viewport (range 0-1)\n * @param normalized_y The normalized y coordinate in the viewport (range 0-1)\n * @param ref The ray object to write into.\n */\n create_ray_to_ref(normalized_x, normalized_y, ref) {\n // Fetch the View's current view-projection matrix and invert it\n const inverse_view_projection_matrix = this.engine_camera.view_matrix.multiplyToRef(this.engine_camera.projection_matrix, matrix_pool.fetch());\n inverse_view_projection_matrix.invert();\n const ndc_x = normalized_x * 2.0 - 1.0;\n const ndc_y = -(normalized_y * 2.0 - 1.0);\n // Project the given normalized coordinates onto the image (near) and far plane.\n const near_projected = BABYLON_Vector4.TransformCoordinatesFromFloatsToRef(ndc_x, ndc_y, -1, inverse_view_projection_matrix, vector4_pool.fetch());\n const far_projected = BABYLON_Vector4.TransformCoordinatesFromFloatsToRef(ndc_x, ndc_y, 1, inverse_view_projection_matrix, vector4_pool.fetch());\n near_projected.scaleInPlace(1.0 / near_projected.w);\n far_projected.scaleInPlace(1.0 / far_projected.w);\n // Set the origin to the position on the near/image plane\n ref.origin.x = near_projected.x;\n ref.origin.y = near_projected.y;\n ref.origin.z = near_projected.z;\n // Calculate the direction as the vector from the point on the near plane to the point on the far plane\n ref.direction.x = far_projected.x - near_projected.x;\n ref.direction.y = far_projected.y - near_projected.y;\n ref.direction.z = far_projected.z - near_projected.z;\n const ray_length = ref.direction.length();\n ref.direction.normalizeFromLength(ray_length);\n vector4_pool.return(near_projected, far_projected);\n matrix_pool.return(inverse_view_projection_matrix);\n }\n /**\n * Resizes the render target for the view, updating its rendering resolution\n */\n resize(render_width, render_height) {\n render_width = Math.floor(render_width);\n render_height = Math.floor(render_height);\n if (this._render_size.x === render_width && this._render_size.y === render_height)\n return;\n this._render_size.x = render_width;\n this._render_size.y = render_height;\n this.set_view_dirty();\n }\n // Returns true if the framebuffer needs to update its size according to the set render size\n is_framebuffer_size_dirty() {\n return this.framebuffer.get_width() !== this._render_size.x || this.framebuffer.get_height() !== this._render_size.y;\n }\n project_world_position_to_ndc(world_position) {\n const view_projection_matrix = this.engine_camera.view_matrix.multiplyToRef(this.engine_camera.projection_matrix, matrix_pool.fetch());\n const projected = BABYLON_Vector4.TransformCoordinatesFromFloatsToRef(world_position.x, world_position.y, world_position.z, view_projection_matrix, vector4_pool.fetch());\n projected.scaleInPlace(1.0 / projected.w);\n const ndc = {\n x: projected.x,\n y: projected.y,\n z: projected.z\n };\n vector4_pool.return(projected);\n matrix_pool.return(view_projection_matrix);\n return ndc;\n }\n // EXPERIMENTAL\n set_experimental_edge_sketch_effect_enabled(enabled) {\n if (enabled) {\n this.postprocess_manager.enable_edge_sketch_effect();\n }\n else {\n this.postprocess_manager.disable_edge_sketch_effect();\n }\n }\n}\n//# sourceMappingURL=RenderView.js.map","import { Observable } from '../Observable.js'; // TODO: Moved observable in another PR\nimport { uuidv4 } from '../uuidv4.js';\n/**\n * The interaction is responsible for notifying listeners of when the scene enters and leaves a state of expected continues change.\n * For example when the user is moving the currently active camera or is dragging an object in the scene.\n * This is useful for turning of things like temporal effects and limit updating of things like reflection probes.\n * The interaction system can be disabled with the viewer creation config, this will stop cause begin_interaction and end_interaction to NOP\n */\nexport class InteractionSystem {\n get interaction_begin_observable() {\n return this._interaction_begin_observable;\n }\n get interaction_end_observable() {\n return this._interaction_end_observable;\n }\n get is_interacting() {\n return this._active_interactions.size > 0;\n }\n constructor(_viewer, enabled) {\n this._viewer = _viewer;\n this._active_interactions = new Set();\n this._interaction_begin_observable = new Observable();\n this._interaction_end_observable = new Observable();\n this._enabled = enabled;\n }\n begin_interaction() {\n if (!this._enabled)\n return '';\n const interaction_id = uuidv4();\n this._active_interactions.add(interaction_id);\n // This is the first active interaction so we need to signal begin.\n if (this._active_interactions.size === 1) {\n this.interaction_begin_observable.notify(this);\n }\n return interaction_id;\n }\n end_interaction(interaction_id) {\n if (!this._enabled)\n return false;\n const was_deleted = this._active_interactions.delete(interaction_id);\n // Something was deleted, and we no longer have any active interactions, signal end.\n if (was_deleted && this._active_interactions.size === 0) {\n this.interaction_end_observable.notify(this);\n }\n return was_deleted;\n }\n}\n//# sourceMappingURL=InteractionSystem.js.map","import { clamp } from '../Math.js';\nimport { AOQualityPreset, CameraMode } from '../api.js';\nimport { texture_to_base64 } from './AssetManager.js';\nimport { VIEWER_DEFAULT_COMPATIBILITY_FRAMEBUFFER_TYPE, VIEWER_DEFAULT_FLOAT_FRAMEBUFFER_TYPE, VIEWER_WANTED_MSAA_SAMPLES, Viewer } from './Viewer.js';\nimport * as Utils from './utility/utils.js';\nimport { RenderLayerMask, VIEWER_INTERNAL_RENDER_LAYER_SCREENSHOT } from './RenderLayer.js';\nimport { RenderView } from './RenderView.js';\nimport { InteractionSystem } from './InteractionSystem.js';\nfunction get_bitmap_of_render_layer(layer) {\n // We could in theory use all 32 bits, but Babylon doesn't support using the last bit.\n if (layer.bit < 0 || layer.bit >= 31) {\n console.error('Invalid render layer');\n return 0;\n }\n else {\n return 1 << layer.bit;\n }\n}\nfunction verify_aspect_ratio(aspect_ratio, projection_matrix, projection_type, max_error) {\n let projection_aspect = 0.0;\n if (projection_type === CameraMode.ORTHOGRAPHIC) {\n projection_aspect = projection_matrix[1].y / projection_matrix[0].x;\n }\n else if (projection_type === CameraMode.PERSPECTIVE) {\n const projection_width = 2.0 / projection_matrix[0].x;\n const projection_height = 2.0 / projection_matrix[1].y;\n projection_aspect = projection_width / projection_height;\n }\n else {\n // Should this be warned? Mostly for us I guess.\n console.warn('Missing case for given perspective mode.');\n return false;\n }\n const error = Math.abs(aspect_ratio / projection_aspect - 1.0);\n return error <= max_error;\n}\n// A list of screenshot promises to ensure we only run one screenshot at a time\nconst active_screenshots = new Set();\n// TODO: Improve configuration with better logging system\nconst enable_screenshot_debug_logging = false;\nlet debug_screenshot_counter = 0;\nexport function take_screenshot(viewer, projection_matrix, projection_type, view_matrix, width, height, settings, mesh_render_list, experimental_settings) {\n // Fetch a promise for the screenshot ahead of us\n const screenshot_queue = Promise.allSettled(active_screenshots);\n const debug_screenshot_number = debug_screenshot_counter++;\n if (enable_screenshot_debug_logging) {\n console.info('Queueing screenshot: ' + debug_screenshot_number);\n console.info(' width: ' + width + ', height: ' + height + ', # meshes: ' + (mesh_render_list === null || mesh_render_list === void 0 ? void 0 : mesh_render_list.length));\n }\n const screenshot_promise = new Promise((resolve) => {\n // Wait for previous screenshots to finish\n screenshot_queue.then(() => {\n var _a, _b;\n if (enable_screenshot_debug_logging) {\n console.info('Starting screenshot: ' + debug_screenshot_number);\n }\n const rendering_lock = viewer.acquire_rendering_pause_lock();\n if (viewer.get_config().verbose_warnings &&\n !verify_aspect_ratio(width / height, projection_matrix, projection_type, 2.0 / Math.min(width, height))) {\n console.warn('Capturing screenshot with non-square pixels (projection matrix aspect ratio mismatch from resolution).\\nThis results in a skewed/distorted image.');\n }\n if (settings.mime_type === 'image/jpg') {\n settings.mime_type = 'image/jpeg';\n console.warn('Change MIME type to correct spelling image/jpeg');\n }\n if (settings.image_compression !== undefined) {\n if (settings.image_compression < 0.0 || settings.image_compression > 1.0) {\n console.warn('Invalid image compression for screenshot: value needs to be in the range 0.0 - 1.0');\n settings.image_compression = clamp(settings.image_compression, 0.0, 1.0);\n }\n }\n const view = new RenderView(viewer, new InteractionSystem(viewer, false), width, height, viewer.is_rendering_to_float_framebuffer()\n ? VIEWER_DEFAULT_FLOAT_FRAMEBUFFER_TYPE\n : VIEWER_DEFAULT_COMPATIBILITY_FRAMEBUFFER_TYPE, VIEWER_WANTED_MSAA_SAMPLES);\n // Load the scene's AO settings as base, but if we have no active accumulation buffer, create defaults.\n const default_screenshot_ao_settings = Object.assign(Object.assign({}, view.postprocess_manager.ao_settings), { quality: AOQualityPreset.SCREENSHOT });\n const ao_settings = Utils.update_from_partial(viewer._default_view !== null ? Object.assign({}, viewer._default_view.postprocess_manager.ao_settings) : default_screenshot_ao_settings, (_a = settings.ao_settings) !== null && _a !== void 0 ? _a : {});\n const default_bloom_settings = Object.assign({}, view.postprocess_manager.bloom_settings);\n const bloom_settings = Utils.update_from_partial(viewer._default_view !== null ? Object.assign({}, viewer._default_view.postprocess_manager.bloom_settings) : default_bloom_settings, (_b = settings.bloom_settings) !== null && _b !== void 0 ? _b : {});\n view.engine_camera.set_view_matrix(view_matrix);\n view.engine_camera.set_projection_matrix(projection_matrix, projection_type);\n if (experimental_settings) {\n if (experimental_settings.edge_sketch) {\n view.postprocess_manager.enable_edge_sketch_effect();\n ao_settings.enabled = false;\n }\n }\n view.postprocess_manager.set_bloom(bloom_settings.enabled, bloom_settings.intensity);\n view.postprocess_manager.enable_temporal_effects(ao_settings.enabled);\n view.postprocess_manager.set_temporal_ao_parameters(ao_settings);\n const accumulator = view.postprocess_manager.get_active_accumulation_buffer();\n // Warm-up render to create any effects needed, so that we can wait for them to finish compiling in the next step.\n // Otherwise we might get unfinished or transparent screenshots.\n viewer.prepare_scene_for_setup();\n viewer.prepare_scene_for_render();\n view.engine_camera.set_view_matrix(view_matrix);\n view.engine_camera.set_projection_matrix(projection_matrix, projection_type);\n view.render(mesh_render_list);\n // Wait for any pending shaders to finish compiling.\n // It's important to have done a warm-up render before to create & initialize any shaders needed.\n const shader_compiled_promises = Promise.allSettled([viewer.get_effects_compiled_promise()]);\n shader_compiled_promises.then(() => {\n // Reset accumulator ahead of our actual rendering\n accumulator.reset_stable_frames();\n if (mesh_render_list !== null) {\n // Here we have an internal render layer for screenshots, to temporarily assign the objects to that layer, and render only it.\n // While the Views allow a custom render list, we still need this for shadows.\n // We restore the meshes further down.\n // IMPORTANT NOTE! This has to be done just before rendering, if we await anything after this but before rendering, we get synchhronization issues.\n view.set_render_layer_mask(new RenderLayerMask([VIEWER_INTERNAL_RENDER_LAYER_SCREENSHOT]));\n for (let i = 0; i < mesh_render_list.length; i++) {\n mesh_render_list[i].layerMask =\n mesh_render_list[i].layerMask |\n get_bitmap_of_render_layer(VIEWER_INTERNAL_RENDER_LAYER_SCREENSHOT);\n }\n }\n const restore_shadow_bitmask = viewer.get_shadows_render_layer_mask();\n viewer.set_shadows_render_layer_mask(new RenderLayerMask([VIEWER_INTERNAL_RENDER_LAYER_SCREENSHOT]));\n viewer.prepare_scene_for_setup();\n viewer.prepare_scene_for_render();\n view.engine_camera.set_view_matrix(view_matrix);\n view.engine_camera.set_projection_matrix(projection_matrix, projection_type);\n while (accumulator.keep_rendering()) {\n view.render(mesh_render_list);\n }\n if (mesh_render_list !== null) {\n // Restore the meshes so they don't have our internal render layer.\n // IMPORTANT NOTE! This has to be done just after rendering, if we await anything before doing this after rendering, we get synchhronization issues.\n for (let i = 0; i < mesh_render_list.length; i++) {\n mesh_render_list[i].layerMask =\n mesh_render_list[i].layerMask &\n (~get_bitmap_of_render_layer(VIEWER_INTERNAL_RENDER_LAYER_SCREENSHOT));\n }\n }\n viewer.set_shadows_render_layer_mask(restore_shadow_bitmask);\n // Needs to be done before the disposing the view\n // We intentionally use the accumulation buffer's render target here, as we need to create the texture from a resolved render target (no MSAA)\n // The accumulation buffer will be resolved, and it should also contain all postprocessing effects.\n // Thus, we use it here instead of the View's normal framebuffer, which would be the natural choice.\n const texture_base64_data = texture_to_base64(view.postprocess_manager.get_destination_texture(), settings.mime_type, settings.image_compression);\n texture_base64_data.then((data) => {\n Viewer.verify_screenshot_mime_type(data, settings.mime_type);\n view.dispose();\n viewer.release_rendering_pause_lock(rendering_lock);\n resolve(texture_base64_data);\n });\n });\n });\n });\n active_screenshots.add(screenshot_promise);\n screenshot_promise.then(() => {\n active_screenshots.delete(screenshot_promise);\n if (enable_screenshot_debug_logging) {\n console.info('Finished screenshot: ' + debug_screenshot_number);\n }\n });\n return screenshot_promise;\n}\n//# sourceMappingURL=Screenshots.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serializeAsMeshReference, serializeAsVector3, SerializationHelper } from \"../Misc/decorators.js\";\nimport { RenderTargetTexture } from \"../Materials/Textures/renderTargetTexture.js\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector.js\";\nimport { AbstractScene } from \"../abstractScene.js\";\n\nAbstractScene.prototype.removeReflectionProbe = function (toRemove) {\n if (!this.reflectionProbes) {\n return -1;\n }\n const index = this.reflectionProbes.indexOf(toRemove);\n if (index !== -1) {\n this.reflectionProbes.splice(index, 1);\n }\n return index;\n};\nAbstractScene.prototype.addReflectionProbe = function (newReflectionProbe) {\n if (!this.reflectionProbes) {\n this.reflectionProbes = [];\n }\n this.reflectionProbes.push(newReflectionProbe);\n};\n/**\n * Class used to generate realtime reflection / refraction cube textures\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/reflectionProbes\n */\nexport class ReflectionProbe {\n /**\n * Creates a new reflection probe\n * @param name defines the name of the probe\n * @param size defines the texture resolution (for each face)\n * @param scene defines the hosting scene\n * @param generateMipMaps defines if mip maps should be generated automatically (true by default)\n * @param useFloat defines if HDR data (float data) should be used to store colors (false by default)\n * @param linearSpace defines if the probe should be generated in linear space or not (false by default)\n */\n constructor(\n /** defines the name of the probe */\n name, size, scene, generateMipMaps = true, useFloat = false, linearSpace = false) {\n this.name = name;\n this._viewMatrix = Matrix.Identity();\n this._target = Vector3.Zero();\n this._add = Vector3.Zero();\n this._invertYAxis = false;\n /** Gets or sets probe position (center of the cube map) */\n this.position = Vector3.Zero();\n /**\n * Gets or sets an object used to store user defined information for the reflection probe.\n */\n this.metadata = null;\n /** @internal */\n this._parentContainer = null;\n this._scene = scene;\n if (scene.getEngine().supportsUniformBuffers) {\n this._sceneUBOs = [];\n for (let i = 0; i < 6; ++i) {\n this._sceneUBOs.push(scene.createSceneUniformBuffer(`Scene for Reflection Probe (name \"${name}\") face #${i}`));\n }\n }\n // Create the scene field if not exist.\n if (!this._scene.reflectionProbes) {\n this._scene.reflectionProbes = [];\n }\n this._scene.reflectionProbes.push(this);\n let textureType = 0;\n if (useFloat) {\n const caps = this._scene.getEngine().getCaps();\n if (caps.textureHalfFloatRender) {\n textureType = 2;\n }\n else if (caps.textureFloatRender) {\n textureType = 1;\n }\n }\n this._renderTargetTexture = new RenderTargetTexture(name, size, scene, generateMipMaps, true, textureType, true);\n this._renderTargetTexture.gammaSpace = !linearSpace;\n this._renderTargetTexture.invertZ = scene.useRightHandedSystem;\n const useReverseDepthBuffer = scene.getEngine().useReverseDepthBuffer;\n this._renderTargetTexture.onBeforeRenderObservable.add((faceIndex) => {\n if (this._sceneUBOs) {\n scene.setSceneUniformBuffer(this._sceneUBOs[faceIndex]);\n scene.getSceneUniformBuffer().unbindEffect();\n }\n switch (faceIndex) {\n case 0:\n this._add.copyFromFloats(1, 0, 0);\n break;\n case 1:\n this._add.copyFromFloats(-1, 0, 0);\n break;\n case 2:\n this._add.copyFromFloats(0, this._invertYAxis ? 1 : -1, 0);\n break;\n case 3:\n this._add.copyFromFloats(0, this._invertYAxis ? -1 : 1, 0);\n break;\n case 4:\n this._add.copyFromFloats(0, 0, scene.useRightHandedSystem ? -1 : 1);\n break;\n case 5:\n this._add.copyFromFloats(0, 0, scene.useRightHandedSystem ? 1 : -1);\n break;\n }\n if (this._attachedMesh) {\n this.position.copyFrom(this._attachedMesh.getAbsolutePosition());\n }\n this.position.addToRef(this._add, this._target);\n const lookAtFunction = scene.useRightHandedSystem ? Matrix.LookAtRHToRef : Matrix.LookAtLHToRef;\n const perspectiveFunction = scene.useRightHandedSystem ? Matrix.PerspectiveFovRH : Matrix.PerspectiveFovLH;\n lookAtFunction(this.position, this._target, Vector3.Up(), this._viewMatrix);\n if (scene.activeCamera) {\n this._projectionMatrix = perspectiveFunction(Math.PI / 2, 1, useReverseDepthBuffer ? scene.activeCamera.maxZ : scene.activeCamera.minZ, useReverseDepthBuffer ? scene.activeCamera.minZ : scene.activeCamera.maxZ, this._scene.getEngine().isNDCHalfZRange);\n scene.setTransformMatrix(this._viewMatrix, this._projectionMatrix);\n if (scene.activeCamera.isRigCamera && !this._renderTargetTexture.activeCamera) {\n this._renderTargetTexture.activeCamera = scene.activeCamera.rigParent || null;\n }\n }\n scene._forcedViewPosition = this.position;\n });\n let currentApplyByPostProcess;\n this._renderTargetTexture.onBeforeBindObservable.add(() => {\n var _a, _b;\n this._currentSceneUBO = scene.getSceneUniformBuffer();\n (_b = (_a = scene.getEngine())._debugPushGroup) === null || _b === void 0 ? void 0 : _b.call(_a, `reflection probe generation for ${name}`, 1);\n currentApplyByPostProcess = this._scene.imageProcessingConfiguration.applyByPostProcess;\n if (linearSpace) {\n scene.imageProcessingConfiguration.applyByPostProcess = true;\n }\n });\n this._renderTargetTexture.onAfterUnbindObservable.add(() => {\n var _a, _b;\n scene.imageProcessingConfiguration.applyByPostProcess = currentApplyByPostProcess;\n scene._forcedViewPosition = null;\n if (this._sceneUBOs) {\n scene.setSceneUniformBuffer(this._currentSceneUBO);\n }\n scene.updateTransformMatrix(true);\n (_b = (_a = scene.getEngine())._debugPopGroup) === null || _b === void 0 ? void 0 : _b.call(_a, 1);\n });\n }\n /** Gets or sets the number of samples to use for multi-sampling (0 by default). Required WebGL2 */\n get samples() {\n return this._renderTargetTexture.samples;\n }\n set samples(value) {\n this._renderTargetTexture.samples = value;\n }\n /** Gets or sets the refresh rate to use (on every frame by default) */\n get refreshRate() {\n return this._renderTargetTexture.refreshRate;\n }\n set refreshRate(value) {\n this._renderTargetTexture.refreshRate = value;\n }\n /**\n * Gets the hosting scene\n * @returns a Scene\n */\n getScene() {\n return this._scene;\n }\n /** Gets the internal CubeTexture used to render to */\n get cubeTexture() {\n return this._renderTargetTexture;\n }\n /** Gets or sets the list of meshes to render */\n get renderList() {\n return this._renderTargetTexture.renderList;\n }\n set renderList(value) {\n this._renderTargetTexture.renderList = value;\n }\n /**\n * Attach the probe to a specific mesh (Rendering will be done from attached mesh's position)\n * @param mesh defines the mesh to attach to\n */\n attachToMesh(mesh) {\n this._attachedMesh = mesh;\n }\n /**\n * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.\n */\n setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil) {\n this._renderTargetTexture.setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil);\n }\n /**\n * Clean all associated resources\n */\n dispose() {\n const index = this._scene.reflectionProbes.indexOf(this);\n if (index !== -1) {\n // Remove from the scene if found\n this._scene.reflectionProbes.splice(index, 1);\n }\n if (this._parentContainer) {\n const index = this._parentContainer.reflectionProbes.indexOf(this);\n if (index > -1) {\n this._parentContainer.reflectionProbes.splice(index, 1);\n }\n this._parentContainer = null;\n }\n if (this._renderTargetTexture) {\n this._renderTargetTexture.dispose();\n this._renderTargetTexture = null;\n }\n if (this._sceneUBOs) {\n for (const ubo of this._sceneUBOs) {\n ubo.dispose();\n }\n this._sceneUBOs = [];\n }\n }\n /**\n * Converts the reflection probe information to a readable string for debug purpose.\n * @param fullDetails Supports for multiple levels of logging within scene loading\n * @returns the human readable reflection probe info\n */\n toString(fullDetails) {\n let ret = \"Name: \" + this.name;\n if (fullDetails) {\n ret += \", position: \" + this.position.toString();\n if (this._attachedMesh) {\n ret += \", attached mesh: \" + this._attachedMesh.name;\n }\n }\n return ret;\n }\n /**\n * Get the class name of the refection probe.\n * @returns \"ReflectionProbe\"\n */\n getClassName() {\n return \"ReflectionProbe\";\n }\n /**\n * Serialize the reflection probe to a JSON representation we can easily use in the respective Parse function.\n * @returns The JSON representation of the texture\n */\n serialize() {\n const serializationObject = SerializationHelper.Serialize(this, this._renderTargetTexture.serialize());\n serializationObject.isReflectionProbe = true;\n serializationObject.metadata = this.metadata;\n return serializationObject;\n }\n /**\n * Parse the JSON representation of a reflection probe in order to recreate the reflection probe in the given scene.\n * @param parsedReflectionProbe Define the JSON representation of the reflection probe\n * @param scene Define the scene the parsed reflection probe should be instantiated in\n * @param rootUrl Define the root url of the parsing sequence in the case of relative dependencies\n * @returns The parsed reflection probe if successful\n */\n static Parse(parsedReflectionProbe, scene, rootUrl) {\n let reflectionProbe = null;\n if (scene.reflectionProbes) {\n for (let index = 0; index < scene.reflectionProbes.length; index++) {\n const rp = scene.reflectionProbes[index];\n if (rp.name === parsedReflectionProbe.name) {\n reflectionProbe = rp;\n break;\n }\n }\n }\n reflectionProbe = SerializationHelper.Parse(() => reflectionProbe || new ReflectionProbe(parsedReflectionProbe.name, parsedReflectionProbe.renderTargetSize, scene, parsedReflectionProbe._generateMipMaps), parsedReflectionProbe, scene, rootUrl);\n reflectionProbe.cubeTexture._waitingRenderList = parsedReflectionProbe.renderList;\n if (parsedReflectionProbe._attachedMesh) {\n reflectionProbe.attachToMesh(scene.getMeshById(parsedReflectionProbe._attachedMesh));\n }\n if (parsedReflectionProbe.metadata) {\n reflectionProbe.metadata = parsedReflectionProbe.metadata;\n }\n return reflectionProbe;\n }\n}\n__decorate([\n serializeAsMeshReference()\n], ReflectionProbe.prototype, \"_attachedMesh\", void 0);\n__decorate([\n serializeAsVector3()\n], ReflectionProbe.prototype, \"position\", void 0);\n//# sourceMappingURL=reflectionProbe.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ReflectionProbe as BABYLON_ReflectionProbe } from '@inter-ikea-betrakta-babylonjs/core/Probes/reflectionProbe.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { ViewerMaterial } from '../material/ViewerMaterial.js';\nimport { IBoundingBox, IVector3 } from '../../api.js';\nimport { Debug } from '../../utils/DebugLayer/utils/DebugDecorators.js';\nimport { Material } from '../Material.js';\nlet probe_count = 0;\nlet ReflectionProbe = class ReflectionProbe {\n constructor(size, viewer) {\n this._is_dirty = true;\n this._viewer = viewer;\n this._probe = new BABYLON_ReflectionProbe('reflection_probe_' + probe_count, size, viewer.scene);\n // For some reason our reflections gets inverted so we just invert it here...\n // @ts-expect-error\n this._probe._renderTargetTexture.invertZ = !this._probe._renderTargetTexture.invertZ;\n this._probe.position = new BABYLON_Vector3(0, 0, 0);\n this._probe.refreshRate = 0;\n probe_count++;\n this._viewer.reflection_probes.push(this);\n }\n get position() {\n return this._probe.position;\n }\n set position(val) {\n if (IVector3.equals(val, this._probe.position))\n return;\n this._probe.position.fromIVector3(val);\n this.mark_dirty();\n }\n add_models_as_source(object_ids) {\n object_ids.forEach(id => {\n // TODO: Asset manager has a get method in a PR, use that once merged\n // @ts-ignore\n const scene_object = this._viewer.viewer_scene.objects.get(id);\n scene_object.changed_observable.add(() => {\n this.mark_dirty();\n });\n scene_object.ready.then(() => {\n var _a;\n (_a = scene_object.mesh_nodes) === null || _a === void 0 ? void 0 : _a.forEach(mesh => {\n this._probe.renderList.push(mesh);\n this.mark_dirty();\n });\n }).catch(() => {\n // Silence?\n });\n });\n }\n add_models_as_target(object_ids) {\n object_ids.forEach(id => {\n const scene_object = this._viewer.viewer_scene.objects.get(id);\n scene_object.ready.then(() => {\n var _a;\n (_a = scene_object._asset_instance) === null || _a === void 0 ? void 0 : _a.instance_iterator((mesh) => {\n const custom_material = mesh.get_active_material();\n if (custom_material instanceof Material) {\n custom_material.ready.then(() => {\n if (custom_material.material !== null) {\n custom_material.material.reflectionTexture = this._probe.cubeTexture;\n }\n }).catch(() => { });\n }\n else if (custom_material !== null && custom_material instanceof ViewerMaterial) {\n custom_material.reflectionTexture = this._probe.cubeTexture;\n }\n else if (mesh.babylon_instance.sourceMesh.material instanceof ViewerMaterial) {\n mesh.babylon_instance.sourceMesh.material.reflectionTexture = this._probe.cubeTexture;\n }\n else {\n console.error('Error: no material to apply reflection probe to.');\n }\n });\n }).catch(() => {\n // Silence?\n });\n });\n }\n update(force_render = false) {\n if (!force_render && !this._is_dirty)\n return;\n this.render_internal();\n }\n render() {\n this._is_dirty = true;\n }\n mark_dirty() {\n this._is_dirty = true;\n this._viewer.mark_scene_dirty();\n }\n render_internal() {\n var _a;\n this._is_dirty = false;\n this._viewer.scene.incrementRenderId();\n this._probe.cubeTexture.render();\n this._probe.cubeTexture.boundingBoxPosition.copyFromFloats(this.position.x, this.position.y, this.position.z);\n const bounds = [];\n (_a = this._probe.renderList) === null || _a === void 0 ? void 0 : _a.forEach(mesh => {\n const bounding_info = mesh.getBoundingInfo();\n bounds.push({ min: bounding_info.minimum, max: bounding_info.maximum });\n });\n const size = IBoundingBox.size(IBoundingBox.union(...bounds));\n this._probe.cubeTexture.boundingBoxSize = new BABYLON_Vector3(size.x, size.y, size.z);\n }\n dispose() {\n this._probe.dispose();\n // To make sure probe can get GCed we set it to undefined, even though it should always be an object\n // @ts-ignore\n this._probe = undefined;\n const index = this._viewer.reflection_probes.indexOf(this);\n if (index >= 0) {\n this._viewer.reflection_probes.splice(index, 1);\n }\n }\n};\n__decorate([\n Debug.Button({ name: 'Update' })\n], ReflectionProbe.prototype, \"render\", null);\nReflectionProbe = __decorate([\n Debug.Selectable({\n name: 'ReflectionProbe',\n world_position: (i) => i.position\n })\n], ReflectionProbe);\nexport { ReflectionProbe };\n//# sourceMappingURL=ReflectionProbe.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ShadersInclude/imageProcessingFunctions.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'imageProcessingFunctions';\nconst shader = `float R2(vec2 f) {\nconst vec2 alpha = 1.0 / vec2(1.324717958, 1.324717958*1.324717958);\nfloat I = fract(alpha.x * f.x + alpha.y * f.y);\nreturn I;\n}\nvec3 ditherR11G11B10F(vec3 color) {\nfloat dither = R2(gl_FragCoord.xy) * 2.0 - 1.0;\nvec3 quantum = exp2(floor(log2(color)) - vec3(6.0, 6.0, 5.0));\nreturn color + quantum * dither;\n}\n#if defined(COLORGRADING) && !defined(COLORGRADING3D)\n#define inline\nvec3 sampleTexture3D(sampler2D colorTransform, vec3 color, vec2 sampler3dSetting)\n{\nfloat sliceSize = 2.0 * sampler3dSetting.x;\n#ifdef SAMPLER3DGREENDEPTH\nfloat sliceContinuous = (color.g - sampler3dSetting.x) * sampler3dSetting.y;\n#else\nfloat sliceContinuous = (color.b - sampler3dSetting.x) * sampler3dSetting.y;\n#endif\nfloat sliceInteger = floor(sliceContinuous);\nfloat sliceFraction = sliceContinuous - sliceInteger;\n#ifdef SAMPLER3DGREENDEPTH\nvec2 sliceUV = color.rb;\n#else\nvec2 sliceUV = color.rg;\n#endif\nsliceUV.x *= sliceSize;\nsliceUV.x += sliceInteger * sliceSize;\nsliceUV = saturate(sliceUV);\nvec4 slice0Color = texture2D(colorTransform, sliceUV);\nsliceUV.x += sliceSize;\nsliceUV = saturate(sliceUV);\nvec4 slice1Color = texture2D(colorTransform, sliceUV);\nvec3 result = mix(slice0Color.rgb, slice1Color.rgb, sliceFraction);\n#ifdef SAMPLER3DBGRMAP\ncolor.rgb = result.rgb;\n#else\ncolor.rgb = result.bgr;\n#endif\nreturn color;\n}\n#endif\n#ifdef TONEMAPPING_ACES\nconst mat3 ACESInputMat = mat3(\nvec3(0.59719, 0.07600, 0.02840),\nvec3(0.35458, 0.90834, 0.13383),\nvec3(0.04823, 0.01566, 0.83777)\n);\nconst mat3 ACESOutputMat = mat3(\nvec3( 1.60475, -0.10208, -0.00327),\nvec3(-0.53108, 1.10813, -0.07276),\nvec3(-0.07367, -0.00605, 1.07602)\n);\nvec3 RRTAndODTFit(vec3 v)\n{\nvec3 a = v * (v + 0.0245786) - 0.000090537;\nvec3 b = v * (0.983729 * v + 0.4329510) + 0.238081;\nreturn a / b;\n}\nvec3 ACESFitted(vec3 color)\n{\ncolor = ACESInputMat * color;\ncolor = RRTAndODTFit(color);\ncolor = ACESOutputMat * color;\ncolor = saturate(color);\nreturn color;\n}\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_DEFINITIONS\nvec4 applyImageProcessing(vec4 result) {\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATSTART\n#ifdef EXPOSURE\n#ifndef UNLIT\nresult.rgb *= exposureLinear;\n#endif\n#endif\n#ifdef VIGNETTE\nvec2 viewportXY = gl_FragCoord.xy * vInverseScreenSize;\nviewportXY = viewportXY * 2.0 - 1.0;\nvec3 vignetteXY1 = vec3(viewportXY * vignetteSettings1.xy + vignetteSettings1.zw, 1.0);\nfloat vignetteTerm = dot(vignetteXY1, vignetteXY1);\nfloat vignette = pow(vignetteTerm, vignetteSettings2.w);\nvec3 vignetteColor = vignetteSettings2.rgb;\n#ifdef VIGNETTEBLENDMODEMULTIPLY\nvec3 vignetteColorMultiplier = mix(vignetteColor, vec3(1, 1, 1), vignette);\nresult.rgb *= vignetteColorMultiplier;\n#endif\n#ifdef VIGNETTEBLENDMODEOPAQUE\nresult.rgb = mix(vignetteColor, result.rgb, vignette);\n#endif\n#endif\n#ifdef TONEMAPPING\n#ifdef TONEMAPPING_ACES\nresult.rgb = ACESFitted(result.rgb);\n#else\nconst float tonemappingCalibration = 1.590579;\nresult.rgb = 1.0 - exp2(-tonemappingCalibration * result.rgb);\n#endif\n#endif\n#ifdef TONEMAPPING\nresult.rgb = toGammaSpace(result.rgb);\nresult.rgb = saturate(result.rgb);\n#else\nconst float value_max = 65000.0;\nresult.rgb = min(result.rgb, vec3(value_max));\nresult.rgb = ditherR11G11B10F(result.rgb);\n#endif\n#ifdef CONTRAST\nvec3 resultHighContrast = result.rgb * result.rgb * (3.0 - 2.0 * result.rgb);\nif (contrast < 1.0) {\nresult.rgb = mix(vec3(0.5, 0.5, 0.5), result.rgb, contrast);\n} else {\nresult.rgb = mix(result.rgb, resultHighContrast, contrast - 1.0);\n}\n#endif\n#ifdef COLORGRADING\nvec3 colorTransformInput = result.rgb * colorTransformSettings.xxx + colorTransformSettings.yyy;\n#ifdef COLORGRADING3D\nvec3 colorTransformOutput = texture(txColorTransform, colorTransformInput).rgb;\n#else\nvec3 colorTransformOutput = sampleTexture3D(txColorTransform, colorTransformInput, colorTransformSettings.yz).rgb;\n#endif\nresult.rgb = mix(result.rgb, colorTransformOutput, colorTransformSettings.www);\n#endif\n#ifdef COLORCURVES\nfloat luma = getLuminance(result.rgb);\nvec2 curveMix = clamp(vec2(luma * 3.0 - 1.5, luma * -3.0 + 1.5), vec2(0.0), vec2(1.0));\nvec4 colorCurve = vCameraColorCurveNeutral + curveMix.x * vCameraColorCurvePositive - curveMix.y * vCameraColorCurveNegative;\nresult.rgb *= colorCurve.rgb;\nresult.rgb = mix(vec3(luma), result.rgb, colorCurve.a);\n#endif\n#ifdef DITHER\nfloat rand = getRand(gl_FragCoord.xy * vInverseScreenSize);\nfloat dither = mix(-ditherIntensity, ditherIntensity, rand);\nresult.rgb = saturate(result.rgb + vec3(dither));\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATEND\nreturn result;\n}\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const imageProcessingFunctions = { name, shader };\n//# sourceMappingURL=imageProcessingFunctions.js.map","import { Vector3 } from \"../Maths/math.vector.js\";\nimport { Plane } from \"../Maths/math.plane.js\";\nconst intersectBoxAASphere = (boxMin, boxMax, sphereCenter, sphereRadius) => {\n if (boxMin.x > sphereCenter.x + sphereRadius) {\n return false;\n }\n if (sphereCenter.x - sphereRadius > boxMax.x) {\n return false;\n }\n if (boxMin.y > sphereCenter.y + sphereRadius) {\n return false;\n }\n if (sphereCenter.y - sphereRadius > boxMax.y) {\n return false;\n }\n if (boxMin.z > sphereCenter.z + sphereRadius) {\n return false;\n }\n if (sphereCenter.z - sphereRadius > boxMax.z) {\n return false;\n }\n return true;\n};\nconst getLowestRoot = (function () {\n const result = { root: 0, found: false };\n return function (a, b, c, maxR) {\n result.root = 0;\n result.found = false;\n const determinant = b * b - 4.0 * a * c;\n if (determinant < 0) {\n return result;\n }\n const sqrtD = Math.sqrt(determinant);\n let r1 = (-b - sqrtD) / (2.0 * a);\n let r2 = (-b + sqrtD) / (2.0 * a);\n if (r1 > r2) {\n const temp = r2;\n r2 = r1;\n r1 = temp;\n }\n if (r1 > 0 && r1 < maxR) {\n result.root = r1;\n result.found = true;\n return result;\n }\n if (r2 > 0 && r2 < maxR) {\n result.root = r2;\n result.found = true;\n return result;\n }\n return result;\n };\n})();\n/** @internal */\nexport class Collider {\n constructor() {\n // Implementation of the \"Improved Collision detection and Response\" algorithm proposed by Kasper Fauerby\n // https://www.peroxide.dk/papers/collision/collision.pdf\n this._collisionPoint = Vector3.Zero();\n this._planeIntersectionPoint = Vector3.Zero();\n this._tempVector = Vector3.Zero();\n this._tempVector2 = Vector3.Zero();\n this._tempVector3 = Vector3.Zero();\n this._tempVector4 = Vector3.Zero();\n this._edge = Vector3.Zero();\n this._baseToVertex = Vector3.Zero();\n this._destinationPoint = Vector3.Zero();\n this._slidePlaneNormal = Vector3.Zero();\n this._displacementVector = Vector3.Zero();\n /** @internal */\n this._radius = Vector3.One();\n /** @internal */\n this._retry = 0;\n /** @internal */\n this._basePointWorld = Vector3.Zero();\n this._velocityWorld = Vector3.Zero();\n this._normalizedVelocity = Vector3.Zero();\n this._collisionMask = -1;\n }\n get collisionMask() {\n return this._collisionMask;\n }\n set collisionMask(mask) {\n this._collisionMask = !isNaN(mask) ? mask : -1;\n }\n /**\n * Gets the plane normal used to compute the sliding response (in local space)\n */\n get slidePlaneNormal() {\n return this._slidePlaneNormal;\n }\n // Methods\n /**\n * @internal\n */\n _initialize(source, dir, e) {\n this._velocity = dir;\n this._velocitySquaredLength = this._velocity.lengthSquared();\n const len = Math.sqrt(this._velocitySquaredLength);\n if (len === 0 || len === 1.0) {\n this._normalizedVelocity.copyFromFloats(dir._x, dir._y, dir._z);\n }\n else {\n dir.scaleToRef(1.0 / len, this._normalizedVelocity);\n }\n this._basePoint = source;\n source.multiplyToRef(this._radius, this._basePointWorld);\n dir.multiplyToRef(this._radius, this._velocityWorld);\n this._velocityWorldLength = this._velocityWorld.length();\n this._epsilon = e;\n this.collisionFound = false;\n }\n /**\n * @internal\n */\n _checkPointInTriangle(point, pa, pb, pc, n) {\n pa.subtractToRef(point, this._tempVector);\n pb.subtractToRef(point, this._tempVector2);\n Vector3.CrossToRef(this._tempVector, this._tempVector2, this._tempVector4);\n let d = Vector3.Dot(this._tempVector4, n);\n if (d < 0) {\n return false;\n }\n pc.subtractToRef(point, this._tempVector3);\n Vector3.CrossToRef(this._tempVector2, this._tempVector3, this._tempVector4);\n d = Vector3.Dot(this._tempVector4, n);\n if (d < 0) {\n return false;\n }\n Vector3.CrossToRef(this._tempVector3, this._tempVector, this._tempVector4);\n d = Vector3.Dot(this._tempVector4, n);\n return d >= 0;\n }\n /**\n * @internal\n */\n _canDoCollision(sphereCenter, sphereRadius, vecMin, vecMax) {\n const distance = Vector3.Distance(this._basePointWorld, sphereCenter);\n const max = Math.max(this._radius.x, this._radius.y, this._radius.z);\n if (distance > this._velocityWorldLength + max + sphereRadius) {\n return false;\n }\n if (!intersectBoxAASphere(vecMin, vecMax, this._basePointWorld, this._velocityWorldLength + max)) {\n return false;\n }\n return true;\n }\n /**\n * @internal\n */\n _testTriangle(faceIndex, trianglePlaneArray, p1, p2, p3, hasMaterial, hostMesh) {\n let t0;\n let embeddedInPlane = false;\n //defensive programming, actually not needed.\n if (!trianglePlaneArray) {\n trianglePlaneArray = [];\n }\n if (!trianglePlaneArray[faceIndex]) {\n trianglePlaneArray[faceIndex] = new Plane(0, 0, 0, 0);\n trianglePlaneArray[faceIndex].copyFromPoints(p1, p2, p3);\n }\n const trianglePlane = trianglePlaneArray[faceIndex];\n if (!hasMaterial && !trianglePlane.isFrontFacingTo(this._normalizedVelocity, 0)) {\n return;\n }\n const signedDistToTrianglePlane = trianglePlane.signedDistanceTo(this._basePoint);\n const normalDotVelocity = Vector3.Dot(trianglePlane.normal, this._velocity);\n // if DoubleSidedCheck is false(default), a double sided face will be consided 2 times.\n // if true, it discard the faces having normal not facing velocity\n if (Collider.DoubleSidedCheck && normalDotVelocity > 0.0001) {\n return;\n }\n if (normalDotVelocity == 0) {\n if (Math.abs(signedDistToTrianglePlane) >= 1.0) {\n return;\n }\n embeddedInPlane = true;\n t0 = 0;\n }\n else {\n t0 = (-1.0 - signedDistToTrianglePlane) / normalDotVelocity;\n let t1 = (1.0 - signedDistToTrianglePlane) / normalDotVelocity;\n if (t0 > t1) {\n const temp = t1;\n t1 = t0;\n t0 = temp;\n }\n if (t0 > 1.0 || t1 < 0.0) {\n return;\n }\n if (t0 < 0) {\n t0 = 0;\n }\n if (t0 > 1.0) {\n t0 = 1.0;\n }\n }\n this._collisionPoint.copyFromFloats(0, 0, 0);\n let found = false;\n let t = 1.0;\n if (!embeddedInPlane) {\n this._basePoint.subtractToRef(trianglePlane.normal, this._planeIntersectionPoint);\n this._velocity.scaleToRef(t0, this._tempVector);\n this._planeIntersectionPoint.addInPlace(this._tempVector);\n if (this._checkPointInTriangle(this._planeIntersectionPoint, p1, p2, p3, trianglePlane.normal)) {\n found = true;\n t = t0;\n this._collisionPoint.copyFrom(this._planeIntersectionPoint);\n }\n }\n if (!found) {\n let a = this._velocitySquaredLength;\n this._basePoint.subtractToRef(p1, this._tempVector);\n let b = 2.0 * Vector3.Dot(this._velocity, this._tempVector);\n let c = this._tempVector.lengthSquared() - 1.0;\n let lowestRoot = getLowestRoot(a, b, c, t);\n if (lowestRoot.found) {\n t = lowestRoot.root;\n found = true;\n this._collisionPoint.copyFrom(p1);\n }\n this._basePoint.subtractToRef(p2, this._tempVector);\n b = 2.0 * Vector3.Dot(this._velocity, this._tempVector);\n c = this._tempVector.lengthSquared() - 1.0;\n lowestRoot = getLowestRoot(a, b, c, t);\n if (lowestRoot.found) {\n t = lowestRoot.root;\n found = true;\n this._collisionPoint.copyFrom(p2);\n }\n this._basePoint.subtractToRef(p3, this._tempVector);\n b = 2.0 * Vector3.Dot(this._velocity, this._tempVector);\n c = this._tempVector.lengthSquared() - 1.0;\n lowestRoot = getLowestRoot(a, b, c, t);\n if (lowestRoot.found) {\n t = lowestRoot.root;\n found = true;\n this._collisionPoint.copyFrom(p3);\n }\n p2.subtractToRef(p1, this._edge);\n p1.subtractToRef(this._basePoint, this._baseToVertex);\n let edgeSquaredLength = this._edge.lengthSquared();\n let edgeDotVelocity = Vector3.Dot(this._edge, this._velocity);\n let edgeDotBaseToVertex = Vector3.Dot(this._edge, this._baseToVertex);\n a = edgeSquaredLength * -this._velocitySquaredLength + edgeDotVelocity * edgeDotVelocity;\n b = 2 * (edgeSquaredLength * Vector3.Dot(this._velocity, this._baseToVertex) - edgeDotVelocity * edgeDotBaseToVertex);\n c = edgeSquaredLength * (1.0 - this._baseToVertex.lengthSquared()) + edgeDotBaseToVertex * edgeDotBaseToVertex;\n lowestRoot = getLowestRoot(a, b, c, t);\n if (lowestRoot.found) {\n const f = (edgeDotVelocity * lowestRoot.root - edgeDotBaseToVertex) / edgeSquaredLength;\n if (f >= 0.0 && f <= 1.0) {\n t = lowestRoot.root;\n found = true;\n this._edge.scaleInPlace(f);\n p1.addToRef(this._edge, this._collisionPoint);\n }\n }\n p3.subtractToRef(p2, this._edge);\n p2.subtractToRef(this._basePoint, this._baseToVertex);\n edgeSquaredLength = this._edge.lengthSquared();\n edgeDotVelocity = Vector3.Dot(this._edge, this._velocity);\n edgeDotBaseToVertex = Vector3.Dot(this._edge, this._baseToVertex);\n a = edgeSquaredLength * -this._velocitySquaredLength + edgeDotVelocity * edgeDotVelocity;\n b = 2 * (edgeSquaredLength * Vector3.Dot(this._velocity, this._baseToVertex) - edgeDotVelocity * edgeDotBaseToVertex);\n c = edgeSquaredLength * (1.0 - this._baseToVertex.lengthSquared()) + edgeDotBaseToVertex * edgeDotBaseToVertex;\n lowestRoot = getLowestRoot(a, b, c, t);\n if (lowestRoot.found) {\n const f = (edgeDotVelocity * lowestRoot.root - edgeDotBaseToVertex) / edgeSquaredLength;\n if (f >= 0.0 && f <= 1.0) {\n t = lowestRoot.root;\n found = true;\n this._edge.scaleInPlace(f);\n p2.addToRef(this._edge, this._collisionPoint);\n }\n }\n p1.subtractToRef(p3, this._edge);\n p3.subtractToRef(this._basePoint, this._baseToVertex);\n edgeSquaredLength = this._edge.lengthSquared();\n edgeDotVelocity = Vector3.Dot(this._edge, this._velocity);\n edgeDotBaseToVertex = Vector3.Dot(this._edge, this._baseToVertex);\n a = edgeSquaredLength * -this._velocitySquaredLength + edgeDotVelocity * edgeDotVelocity;\n b = 2 * (edgeSquaredLength * Vector3.Dot(this._velocity, this._baseToVertex) - edgeDotVelocity * edgeDotBaseToVertex);\n c = edgeSquaredLength * (1.0 - this._baseToVertex.lengthSquared()) + edgeDotBaseToVertex * edgeDotBaseToVertex;\n lowestRoot = getLowestRoot(a, b, c, t);\n if (lowestRoot.found) {\n const f = (edgeDotVelocity * lowestRoot.root - edgeDotBaseToVertex) / edgeSquaredLength;\n if (f >= 0.0 && f <= 1.0) {\n t = lowestRoot.root;\n found = true;\n this._edge.scaleInPlace(f);\n p3.addToRef(this._edge, this._collisionPoint);\n }\n }\n }\n if (found) {\n const distToCollisionSquared = t * t * this._velocitySquaredLength;\n if (!this.collisionFound || distToCollisionSquared < this._nearestDistanceSquared) {\n // if collisionResponse is false, collision is not found but the collidedMesh is set anyway.\n // onCollide observable are triggered if collideMesh is set\n // this allow trigger volumes to be created.\n if (hostMesh.collisionResponse) {\n if (!this.intersectionPoint) {\n this.intersectionPoint = this._collisionPoint.clone();\n }\n else {\n this.intersectionPoint.copyFrom(this._collisionPoint);\n }\n this._nearestDistanceSquared = distToCollisionSquared;\n this._nearestDistance = Math.sqrt(distToCollisionSquared);\n this.collisionFound = true;\n }\n this.collidedMesh = hostMesh;\n }\n }\n }\n /**\n * @internal\n */\n _collide(trianglePlaneArray, pts, indices, indexStart, indexEnd, decal, hasMaterial, hostMesh, invertTriangles, triangleStrip = false) {\n if (triangleStrip) {\n if (!indices || indices.length === 0) {\n for (let i = 0; i < pts.length - 2; i += 1) {\n const p1 = pts[i];\n const p2 = pts[i + 1];\n const p3 = pts[i + 2];\n // stay defensive and don't check against undefined positions.\n if (!p1 || !p2 || !p3) {\n continue;\n }\n // Handles strip faces one on two is reversed\n if ((invertTriangles ? 1 : 0) ^ i % 2) {\n this._testTriangle(i, trianglePlaneArray, p1, p2, p3, hasMaterial, hostMesh);\n }\n else {\n this._testTriangle(i, trianglePlaneArray, p2, p1, p3, hasMaterial, hostMesh);\n }\n }\n }\n else {\n for (let i = indexStart; i < indexEnd - 2; i += 1) {\n const indexA = indices[i];\n const indexB = indices[i + 1];\n const indexC = indices[i + 2];\n if (indexC === 0xffffffff) {\n i += 2;\n continue;\n }\n const p1 = pts[indexA];\n const p2 = pts[indexB];\n const p3 = pts[indexC];\n // stay defensive and don't check against undefined positions.\n if (!p1 || !p2 || !p3) {\n continue;\n }\n // Handles strip faces one on two is reversed\n if ((invertTriangles ? 1 : 0) ^ i % 2) {\n this._testTriangle(i, trianglePlaneArray, p1, p2, p3, hasMaterial, hostMesh);\n }\n else {\n this._testTriangle(i, trianglePlaneArray, p2, p1, p3, hasMaterial, hostMesh);\n }\n }\n }\n }\n else if (!indices || indices.length === 0) {\n for (let i = 0; i < pts.length; i += 3) {\n const p1 = pts[i];\n const p2 = pts[i + 1];\n const p3 = pts[i + 2];\n if (invertTriangles) {\n this._testTriangle(i, trianglePlaneArray, p1, p2, p3, hasMaterial, hostMesh);\n }\n else {\n this._testTriangle(i, trianglePlaneArray, p3, p2, p1, hasMaterial, hostMesh);\n }\n }\n }\n else {\n for (let i = indexStart; i < indexEnd; i += 3) {\n const p1 = pts[indices[i] - decal];\n const p2 = pts[indices[i + 1] - decal];\n const p3 = pts[indices[i + 2] - decal];\n if (invertTriangles) {\n this._testTriangle(i, trianglePlaneArray, p1, p2, p3, hasMaterial, hostMesh);\n }\n else {\n this._testTriangle(i, trianglePlaneArray, p3, p2, p1, hasMaterial, hostMesh);\n }\n }\n }\n }\n /**\n * @internal\n */\n _getResponse(pos, vel) {\n pos.addToRef(vel, this._destinationPoint);\n vel.scaleInPlace(this._nearestDistance / vel.length());\n this._basePoint.addToRef(vel, pos);\n pos.subtractToRef(this.intersectionPoint, this._slidePlaneNormal);\n this._slidePlaneNormal.normalize();\n this._slidePlaneNormal.scaleToRef(this._epsilon, this._displacementVector);\n pos.addInPlace(this._displacementVector);\n this.intersectionPoint.addInPlace(this._displacementVector);\n this._slidePlaneNormal.scaleInPlace(Plane.SignedDistanceToPlaneFromPositionAndNormal(this.intersectionPoint, this._slidePlaneNormal, this._destinationPoint));\n this._destinationPoint.subtractInPlace(this._slidePlaneNormal);\n this._destinationPoint.subtractToRef(this.intersectionPoint, vel);\n }\n}\n/**\n * If true, it check for double sided faces and only returns 1 collision instead of 2\n */\nCollider.DoubleSidedCheck = false;\n//# sourceMappingURL=collider.js.map","import { Scene } from \"../scene.js\";\nimport { Vector3 } from \"../Maths/math.vector.js\";\nimport { Engine } from \"../Engines/engine.js\";\nimport { Collider } from \"./collider.js\";\n/** @internal */\nexport class DefaultCollisionCoordinator {\n constructor() {\n this._scaledPosition = Vector3.Zero();\n this._scaledVelocity = Vector3.Zero();\n this._finalPosition = Vector3.Zero();\n }\n getNewPosition(position, displacement, collider, maximumRetry, excludedMesh, onNewPosition, collisionIndex) {\n position.divideToRef(collider._radius, this._scaledPosition);\n displacement.divideToRef(collider._radius, this._scaledVelocity);\n collider.collidedMesh = null;\n collider._retry = 0;\n collider._initialVelocity = this._scaledVelocity;\n collider._initialPosition = this._scaledPosition;\n this._collideWithWorld(this._scaledPosition, this._scaledVelocity, collider, maximumRetry, this._finalPosition, excludedMesh);\n this._finalPosition.multiplyInPlace(collider._radius);\n //run the callback\n onNewPosition(collisionIndex, this._finalPosition, collider.collidedMesh);\n }\n createCollider() {\n return new Collider();\n }\n init(scene) {\n this._scene = scene;\n }\n _collideWithWorld(position, velocity, collider, maximumRetry, finalPosition, excludedMesh = null) {\n const closeDistance = Engine.CollisionsEpsilon * 10.0;\n if (collider._retry >= maximumRetry) {\n finalPosition.copyFrom(position);\n return;\n }\n // Check if this is a mesh else camera or -1\n const collisionMask = excludedMesh ? excludedMesh.collisionMask : collider.collisionMask;\n collider._initialize(position, velocity, closeDistance);\n // Check if collision detection should happen against specified list of meshes or,\n // if not specified, against all meshes in the scene\n const meshes = (excludedMesh && excludedMesh.surroundingMeshes) || this._scene.meshes;\n for (let index = 0; index < meshes.length; index++) {\n const mesh = meshes[index];\n if (mesh.isEnabled() && mesh.checkCollisions && mesh.subMeshes && mesh !== excludedMesh && (collisionMask & mesh.collisionGroup) !== 0) {\n mesh._checkCollision(collider);\n }\n }\n if (!collider.collisionFound) {\n position.addToRef(velocity, finalPosition);\n return;\n }\n if (velocity.x !== 0 || velocity.y !== 0 || velocity.z !== 0) {\n collider._getResponse(position, velocity);\n }\n if (velocity.length() <= closeDistance) {\n finalPosition.copyFrom(position);\n return;\n }\n collider._retry++;\n this._collideWithWorld(position, velocity, collider, maximumRetry, finalPosition, excludedMesh);\n }\n}\nScene.CollisionCoordinatorFactory = () => {\n return new DefaultCollisionCoordinator();\n};\n//# sourceMappingURL=collisionCoordinator.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/clipPlaneFragmentDeclaration.js\";\nimport \"./ShadersInclude/packingFunctions.js\";\nimport \"./ShadersInclude/clipPlaneFragment.js\";\nconst name = \"depthPixelShader\";\nconst shader = `#ifdef ALPHATEST\nvarying vec2 vUV;uniform sampler2D diffuseSampler;\n#endif\n#include\nvarying float vDepthMetric;\n#ifdef PACKED\n#include\n#endif\n#ifdef STORE_CAMERASPACE_Z\nvarying vec4 vViewPos;\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{\n#include\n#ifdef ALPHATEST\nif (texture2D(diffuseSampler,vUV).a<0.4)\ndiscard;\n#endif\n#ifdef STORE_CAMERASPACE_Z\n#ifdef PACKED\ngl_FragColor=pack(vViewPos.z);\n#else\ngl_FragColor=vec4(vViewPos.z,0.0,0.0,1.0);\n#endif\n#else\n#ifdef NONLINEARDEPTH\n#ifdef PACKED\ngl_FragColor=pack(gl_FragCoord.z);\n#else\ngl_FragColor=vec4(gl_FragCoord.z,0.0,0.0,0.0);\n#endif\n#else\n#ifdef PACKED\ngl_FragColor=pack(vDepthMetric);\n#else\ngl_FragColor=vec4(vDepthMetric,0.0,0.0,1.0);\n#endif\n#endif\n#endif\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const depthPixelShader = { name, shader };\n//# sourceMappingURL=depth.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pointCloudVertexDeclaration\";\nconst shader = `#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pointCloudVertexDeclaration = { name, shader };\n//# sourceMappingURL=pointCloudVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"pointCloudVertex\";\nconst shader = `#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pointCloudVertex = { name, shader };\n//# sourceMappingURL=pointCloudVertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/bonesDeclaration.js\";\nimport \"./ShadersInclude/bakedVertexAnimationDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexGlobalDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexDeclaration.js\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration.js\";\nimport \"./ShadersInclude/instancesDeclaration.js\";\nimport \"./ShadersInclude/pointCloudVertexDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexGlobal.js\";\nimport \"./ShadersInclude/morphTargetsVertex.js\";\nimport \"./ShadersInclude/instancesVertex.js\";\nimport \"./ShadersInclude/bonesVertex.js\";\nimport \"./ShadersInclude/bakedVertexAnimation.js\";\nimport \"./ShadersInclude/clipPlaneVertex.js\";\nimport \"./ShadersInclude/pointCloudVertex.js\";\nconst name = \"depthVertexShader\";\nconst shader = `attribute vec3 position;\n#include\n#include\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\nuniform mat4 viewProjection;uniform vec2 depthValues;\n#if defined(ALPHATEST) || defined(NEED_UV)\nvarying vec2 vUV;uniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\n#ifdef STORE_CAMERASPACE_Z\nuniform mat4 view;varying vec4 vViewPos;\n#endif\n#include\nvarying float vDepthMetric;\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void)\n{vec3 positionUpdated=position;\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\n#include\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\n#include\ngl_Position=viewProjection*worldPos;\n#ifdef STORE_CAMERASPACE_Z\nvViewPos=view*worldPos;\n#else\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetric=((-gl_Position.z+depthValues.x)/(depthValues.y));\n#else\nvDepthMetric=((gl_Position.z+depthValues.x)/(depthValues.y));\n#endif\n#endif\n#if defined(ALPHATEST) || defined(BASIC_RENDER)\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#include\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const depthVertexShader = { name, shader };\n//# sourceMappingURL=depth.vertex.js.map","import { Color4 } from \"../Maths/math.color.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { Texture } from \"../Materials/Textures/texture.js\";\nimport { RenderTargetTexture } from \"../Materials/Textures/renderTargetTexture.js\";\nimport { MaterialHelper } from \"../Materials/materialHelper.js\";\nimport { Camera } from \"../Cameras/camera.js\";\n\nimport \"../Shaders/depth.fragment.js\";\nimport \"../Shaders/depth.vertex.js\";\nimport { _WarnImport } from \"../Misc/devTools.js\";\nimport { addClipPlaneUniforms, bindClipPlane, prepareStringDefinesForClipPlanes } from \"../Materials/clipPlaneMaterialHelper.js\";\n/**\n * This represents a depth renderer in Babylon.\n * A depth renderer will render to it's depth map every frame which can be displayed or used in post processing\n */\nexport class DepthRenderer {\n /**\n * Sets a specific material to be used to render a mesh/a list of meshes by the depth renderer\n * @param mesh mesh or array of meshes\n * @param material material to use by the depth render when rendering the mesh(es). If undefined is passed, the specific material created by the depth renderer will be used.\n */\n setMaterialForRendering(mesh, material) {\n this._depthMap.setMaterialForRendering(mesh, material);\n }\n /**\n * Instantiates a depth renderer\n * @param scene The scene the renderer belongs to\n * @param type The texture type of the depth map (default: Engine.TEXTURETYPE_FLOAT)\n * @param camera The camera to be used to render the depth map (default: scene's active camera)\n * @param storeNonLinearDepth Defines whether the depth is stored linearly like in Babylon Shadows or directly like glFragCoord.z\n * @param samplingMode The sampling mode to be used with the render target (Linear, Nearest...) (default: TRILINEAR_SAMPLINGMODE)\n * @param storeCameraSpaceZ Defines whether the depth stored is the Z coordinate in camera space. If true, storeNonLinearDepth has no effect. (Default: false)\n * @param name Name of the render target (default: DepthRenderer)\n */\n constructor(scene, type = 1, camera = null, storeNonLinearDepth = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, storeCameraSpaceZ = false, name) {\n /** Enable or disable the depth renderer. When disabled, the depth texture is not updated */\n this.enabled = true;\n /** Force writing the transparent objects into the depth map */\n this.forceDepthWriteTransparentMeshes = false;\n /**\n * Specifies that the depth renderer will only be used within\n * the camera it is created for.\n * This can help forcing its rendering during the camera processing.\n */\n this.useOnlyInActiveCamera = false;\n /** If true, reverse the culling of materials before writing to the depth texture.\n * So, basically, when \"true\", back facing instead of front facing faces are rasterized into the texture\n */\n this.reverseCulling = false;\n this._scene = scene;\n this._storeNonLinearDepth = storeNonLinearDepth;\n this._storeCameraSpaceZ = storeCameraSpaceZ;\n this.isPacked = type === 0;\n if (this.isPacked) {\n this.clearColor = new Color4(1.0, 1.0, 1.0, 1.0);\n }\n else {\n this.clearColor = new Color4(storeCameraSpaceZ ? 1e8 : 1.0, 0.0, 0.0, 1.0);\n }\n DepthRenderer._SceneComponentInitialization(this._scene);\n const engine = scene.getEngine();\n this._camera = camera;\n if (samplingMode !== Texture.NEAREST_SAMPLINGMODE) {\n if (type === 1 && !engine._caps.textureFloatLinearFiltering) {\n samplingMode = Texture.NEAREST_SAMPLINGMODE;\n }\n if (type === 2 && !engine._caps.textureHalfFloatLinearFiltering) {\n samplingMode = Texture.NEAREST_SAMPLINGMODE;\n }\n }\n // Render target\n const format = this.isPacked || !engine._features.supportExtendedTextureFormats ? 5 : 6;\n this._depthMap = new RenderTargetTexture(name !== null && name !== void 0 ? name : \"DepthRenderer\", { width: engine.getRenderWidth(), height: engine.getRenderHeight() }, this._scene, false, true, type, false, samplingMode, undefined, undefined, undefined, format);\n this._depthMap.wrapU = Texture.CLAMP_ADDRESSMODE;\n this._depthMap.wrapV = Texture.CLAMP_ADDRESSMODE;\n this._depthMap.refreshRate = 1;\n this._depthMap.renderParticles = false;\n this._depthMap.renderList = null;\n this._depthMap.noPrePassRenderer = true;\n // Camera to get depth map from to support multiple concurrent cameras\n this._depthMap.activeCamera = this._camera;\n this._depthMap.ignoreCameraViewport = true;\n this._depthMap.useCameraPostProcesses = false;\n // set default depth value to 1.0 (far away)\n this._depthMap.onClearObservable.add((engine) => {\n engine.clear(this.clearColor, true, true, true);\n });\n this._depthMap.onBeforeBindObservable.add(() => {\n var _a;\n (_a = engine._debugPushGroup) === null || _a === void 0 ? void 0 : _a.call(engine, \"depth renderer\", 1);\n });\n this._depthMap.onAfterUnbindObservable.add(() => {\n var _a;\n (_a = engine._debugPopGroup) === null || _a === void 0 ? void 0 : _a.call(engine, 1);\n });\n this._depthMap.customIsReadyFunction = (mesh, refreshRate, preWarm) => {\n if ((preWarm || refreshRate === 0) && mesh.subMeshes) {\n for (let i = 0; i < mesh.subMeshes.length; ++i) {\n const subMesh = mesh.subMeshes[i];\n const renderingMesh = subMesh.getRenderingMesh();\n const batch = renderingMesh._getInstancesRenderList(subMesh._id, !!subMesh.getReplacementMesh());\n const hardwareInstancedRendering = engine.getCaps().instancedArrays &&\n ((batch.visibleInstances[subMesh._id] !== null && batch.visibleInstances[subMesh._id] !== undefined) || renderingMesh.hasThinInstances);\n if (!this.isReady(subMesh, hardwareInstancedRendering)) {\n return false;\n }\n }\n }\n return true;\n };\n // Custom render function\n const renderSubMesh = (subMesh) => {\n var _a, _b;\n const renderingMesh = subMesh.getRenderingMesh();\n const effectiveMesh = subMesh.getEffectiveMesh();\n const scene = this._scene;\n const engine = scene.getEngine();\n const material = subMesh.getMaterial();\n effectiveMesh._internalAbstractMeshDataInfo._isActiveIntermediate = false;\n if (!material || effectiveMesh.infiniteDistance || material.disableDepthWrite || subMesh.verticesCount === 0 || subMesh._renderId === scene.getRenderId()) {\n return;\n }\n // Culling\n const detNeg = effectiveMesh._getWorldMatrixDeterminant() < 0;\n let sideOrientation = (_a = renderingMesh.overrideMaterialSideOrientation) !== null && _a !== void 0 ? _a : material.sideOrientation;\n if (detNeg) {\n sideOrientation =\n sideOrientation === 0\n ? 1\n : 0;\n }\n const reverseSideOrientation = sideOrientation === 0;\n engine.setState(material.backFaceCulling, 0, false, reverseSideOrientation, this.reverseCulling ? !material.cullBackFaces : material.cullBackFaces);\n // Managing instances\n const batch = renderingMesh._getInstancesRenderList(subMesh._id, !!subMesh.getReplacementMesh());\n if (batch.mustReturn) {\n return;\n }\n const hardwareInstancedRendering = engine.getCaps().instancedArrays &&\n ((batch.visibleInstances[subMesh._id] !== null && batch.visibleInstances[subMesh._id] !== undefined) || renderingMesh.hasThinInstances);\n const camera = this._camera || scene.activeCamera;\n if (this.isReady(subMesh, hardwareInstancedRendering) && camera) {\n subMesh._renderId = scene.getRenderId();\n const renderingMaterial = (_b = effectiveMesh._internalAbstractMeshDataInfo._materialForRenderPass) === null || _b === void 0 ? void 0 : _b[engine.currentRenderPassId];\n let drawWrapper = subMesh._getDrawWrapper();\n if (!drawWrapper && renderingMaterial) {\n drawWrapper = renderingMaterial._getDrawWrapper();\n }\n const cameraIsOrtho = camera.mode === Camera.ORTHOGRAPHIC_CAMERA;\n if (!drawWrapper) {\n return;\n }\n const effect = drawWrapper.effect;\n engine.enableEffect(drawWrapper);\n if (!hardwareInstancedRendering) {\n renderingMesh._bind(subMesh, effect, material.fillMode);\n }\n if (!renderingMaterial) {\n effect.setMatrix(\"viewProjection\", scene.getTransformMatrix());\n effect.setMatrix(\"world\", effectiveMesh.getWorldMatrix());\n if (this._storeCameraSpaceZ) {\n effect.setMatrix(\"view\", scene.getViewMatrix());\n }\n }\n else {\n renderingMaterial.bindForSubMesh(effectiveMesh.getWorldMatrix(), effectiveMesh, subMesh);\n }\n let minZ, maxZ;\n if (cameraIsOrtho) {\n minZ = !engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : 1;\n maxZ = engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : 1;\n }\n else {\n minZ = engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? camera.minZ : engine.isNDCHalfZRange ? 0 : camera.minZ;\n maxZ = engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : camera.maxZ;\n }\n effect.setFloat2(\"depthValues\", minZ, minZ + maxZ);\n if (!renderingMaterial) {\n // Alpha test\n if (material.needAlphaTesting()) {\n const alphaTexture = material.getAlphaTestTexture();\n if (alphaTexture) {\n effect.setTexture(\"diffuseSampler\", alphaTexture);\n effect.setMatrix(\"diffuseMatrix\", alphaTexture.getTextureMatrix());\n }\n }\n // Bones\n if (renderingMesh.useBones && renderingMesh.computeBonesUsingShaders && renderingMesh.skeleton) {\n const skeleton = renderingMesh.skeleton;\n if (skeleton.isUsingTextureForMatrices) {\n const boneTexture = skeleton.getTransformMatrixTexture(renderingMesh);\n if (!boneTexture) {\n return;\n }\n effect.setTexture(\"boneSampler\", boneTexture);\n effect.setFloat(\"boneTextureWidth\", 4.0 * (skeleton.bones.length + 1));\n }\n else {\n effect.setMatrices(\"mBones\", skeleton.getTransformMatrices(renderingMesh));\n }\n }\n // Clip planes\n bindClipPlane(effect, material, scene);\n // Morph targets\n MaterialHelper.BindMorphTargetParameters(renderingMesh, effect);\n if (renderingMesh.morphTargetManager && renderingMesh.morphTargetManager.isUsingTextureForTargets) {\n renderingMesh.morphTargetManager._bind(effect);\n }\n // Points cloud rendering\n if (material.pointsCloud) {\n effect.setFloat(\"pointSize\", material.pointSize);\n }\n }\n // Draw\n renderingMesh._processRendering(effectiveMesh, subMesh, effect, material.fillMode, batch, hardwareInstancedRendering, (isInstance, world) => effect.setMatrix(\"world\", world));\n }\n };\n this._depthMap.customRenderFunction = (opaqueSubMeshes, alphaTestSubMeshes, transparentSubMeshes, depthOnlySubMeshes) => {\n let index;\n if (depthOnlySubMeshes.length) {\n for (index = 0; index < depthOnlySubMeshes.length; index++) {\n renderSubMesh(depthOnlySubMeshes.data[index]);\n }\n }\n for (index = 0; index < opaqueSubMeshes.length; index++) {\n renderSubMesh(opaqueSubMeshes.data[index]);\n }\n for (index = 0; index < alphaTestSubMeshes.length; index++) {\n renderSubMesh(alphaTestSubMeshes.data[index]);\n }\n if (this.forceDepthWriteTransparentMeshes) {\n for (index = 0; index < transparentSubMeshes.length; index++) {\n renderSubMesh(transparentSubMeshes.data[index]);\n }\n }\n else {\n for (index = 0; index < transparentSubMeshes.length; index++) {\n transparentSubMeshes.data[index].getEffectiveMesh()._internalAbstractMeshDataInfo._isActiveIntermediate = false;\n }\n }\n };\n }\n /**\n * Creates the depth rendering effect and checks if the effect is ready.\n * @param subMesh The submesh to be used to render the depth map of\n * @param useInstances If multiple world instances should be used\n * @returns if the depth renderer is ready to render the depth map\n */\n isReady(subMesh, useInstances) {\n var _a;\n const engine = this._scene.getEngine();\n const mesh = subMesh.getMesh();\n const scene = mesh.getScene();\n const renderingMaterial = (_a = mesh._internalAbstractMeshDataInfo._materialForRenderPass) === null || _a === void 0 ? void 0 : _a[engine.currentRenderPassId];\n if (renderingMaterial) {\n return renderingMaterial.isReadyForSubMesh(mesh, subMesh, useInstances);\n }\n const material = subMesh.getMaterial();\n if (!material || material.disableDepthWrite) {\n return false;\n }\n const defines = [];\n const attribs = [VertexBuffer.PositionKind];\n // Alpha test\n if (material && material.needAlphaTesting() && material.getAlphaTestTexture()) {\n defines.push(\"#define ALPHATEST\");\n if (mesh.isVerticesDataPresent(VertexBuffer.UVKind)) {\n attribs.push(VertexBuffer.UVKind);\n defines.push(\"#define UV1\");\n }\n if (mesh.isVerticesDataPresent(VertexBuffer.UV2Kind)) {\n attribs.push(VertexBuffer.UV2Kind);\n defines.push(\"#define UV2\");\n }\n }\n // Bones\n if (mesh.useBones && mesh.computeBonesUsingShaders) {\n attribs.push(VertexBuffer.MatricesIndicesKind);\n attribs.push(VertexBuffer.MatricesWeightsKind);\n if (mesh.numBoneInfluencers > 4) {\n attribs.push(VertexBuffer.MatricesIndicesExtraKind);\n attribs.push(VertexBuffer.MatricesWeightsExtraKind);\n }\n defines.push(\"#define NUM_BONE_INFLUENCERS \" + mesh.numBoneInfluencers);\n defines.push(\"#define BonesPerMesh \" + (mesh.skeleton ? mesh.skeleton.bones.length + 1 : 0));\n const skeleton = subMesh.getRenderingMesh().skeleton;\n if (skeleton === null || skeleton === void 0 ? void 0 : skeleton.isUsingTextureForMatrices) {\n defines.push(\"#define BONETEXTURE\");\n }\n }\n else {\n defines.push(\"#define NUM_BONE_INFLUENCERS 0\");\n }\n // Morph targets\n const morphTargetManager = mesh.morphTargetManager;\n let numMorphInfluencers = 0;\n if (morphTargetManager) {\n if (morphTargetManager.numInfluencers > 0) {\n numMorphInfluencers = morphTargetManager.numInfluencers;\n defines.push(\"#define MORPHTARGETS\");\n defines.push(\"#define NUM_MORPH_INFLUENCERS \" + numMorphInfluencers);\n if (morphTargetManager.isUsingTextureForTargets) {\n defines.push(\"#define MORPHTARGETS_TEXTURE\");\n }\n MaterialHelper.PrepareAttributesForMorphTargetsInfluencers(attribs, mesh, numMorphInfluencers);\n }\n }\n // Points cloud rendering\n if (material.pointsCloud) {\n defines.push(\"#define POINTSIZE\");\n }\n // Instances\n if (useInstances) {\n defines.push(\"#define INSTANCES\");\n MaterialHelper.PushAttributesForInstances(attribs);\n if (subMesh.getRenderingMesh().hasThinInstances) {\n defines.push(\"#define THIN_INSTANCES\");\n }\n }\n // None linear depth\n if (this._storeNonLinearDepth) {\n defines.push(\"#define NONLINEARDEPTH\");\n }\n // Store camera space Z coordinate instead of NDC Z\n if (this._storeCameraSpaceZ) {\n defines.push(\"#define STORE_CAMERASPACE_Z\");\n }\n // Float Mode\n if (this.isPacked) {\n defines.push(\"#define PACKED\");\n }\n // Clip planes\n prepareStringDefinesForClipPlanes(material, scene, defines);\n // Get correct effect\n const drawWrapper = subMesh._getDrawWrapper(undefined, true);\n const cachedDefines = drawWrapper.defines;\n const join = defines.join(\"\\n\");\n if (cachedDefines !== join) {\n const uniforms = [\n \"world\",\n \"mBones\",\n \"boneTextureWidth\",\n \"pointSize\",\n \"viewProjection\",\n \"view\",\n \"diffuseMatrix\",\n \"depthValues\",\n \"morphTargetInfluences\",\n \"morphTargetTextureInfo\",\n \"morphTargetTextureIndices\",\n ];\n addClipPlaneUniforms(uniforms);\n drawWrapper.setEffect(engine.createEffect(\"depth\", attribs, uniforms, [\"diffuseSampler\", \"morphTargets\", \"boneSampler\"], join, undefined, undefined, undefined, {\n maxSimultaneousMorphTargets: numMorphInfluencers,\n }), join);\n }\n return drawWrapper.effect.isReady();\n }\n /**\n * Gets the texture which the depth map will be written to.\n * @returns The depth map texture\n */\n getDepthMap() {\n return this._depthMap;\n }\n /**\n * Disposes of the depth renderer.\n */\n dispose() {\n const keysToDelete = [];\n for (const key in this._scene._depthRenderer) {\n const depthRenderer = this._scene._depthRenderer[key];\n if (depthRenderer === this) {\n keysToDelete.push(key);\n }\n }\n if (keysToDelete.length > 0) {\n this._depthMap.dispose();\n for (const key of keysToDelete) {\n delete this._scene._depthRenderer[key];\n }\n }\n }\n}\n/**\n * @internal\n */\nDepthRenderer._SceneComponentInitialization = (_) => {\n throw _WarnImport(\"DepthRendererSceneComponent\");\n};\n//# sourceMappingURL=depthRenderer.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nconst name = \"minmaxReduxPixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#if defined(INITIAL)\nuniform sampler2D sourceTexture;uniform vec2 texSize;void main(void)\n{ivec2 coord=ivec2(vUV*(texSize-1.0));float f1=texelFetch(sourceTexture,coord,0).r;float f2=texelFetch(sourceTexture,coord+ivec2(1,0),0).r;float f3=texelFetch(sourceTexture,coord+ivec2(1,1),0).r;float f4=texelFetch(sourceTexture,coord+ivec2(0,1),0).r;float minz=min(min(min(f1,f2),f3),f4);\n#ifdef DEPTH_REDUX\nfloat maxz=max(max(max(sign(1.0-f1)*f1,sign(1.0-f2)*f2),sign(1.0-f3)*f3),sign(1.0-f4)*f4);\n#else\nfloat maxz=max(max(max(f1,f2),f3),f4);\n#endif\nglFragColor=vec4(minz,maxz,0.,0.);}\n#elif defined(MAIN)\nuniform vec2 texSize;void main(void)\n{ivec2 coord=ivec2(vUV*(texSize-1.0));vec2 f1=texelFetch(textureSampler,coord,0).rg;vec2 f2=texelFetch(textureSampler,coord+ivec2(1,0),0).rg;vec2 f3=texelFetch(textureSampler,coord+ivec2(1,1),0).rg;vec2 f4=texelFetch(textureSampler,coord+ivec2(0,1),0).rg;float minz=min(min(min(f1.x,f2.x),f3.x),f4.x);float maxz=max(max(max(f1.y,f2.y),f3.y),f4.y);glFragColor=vec4(minz,maxz,0.,0.);}\n#elif defined(ONEBEFORELAST)\nuniform ivec2 texSize;void main(void)\n{ivec2 coord=ivec2(vUV*vec2(texSize-1));vec2 f1=texelFetch(textureSampler,coord % texSize,0).rg;vec2 f2=texelFetch(textureSampler,(coord+ivec2(1,0)) % texSize,0).rg;vec2 f3=texelFetch(textureSampler,(coord+ivec2(1,1)) % texSize,0).rg;vec2 f4=texelFetch(textureSampler,(coord+ivec2(0,1)) % texSize,0).rg;float minz=min(f1.x,f2.x);float maxz=max(f1.y,f2.y);glFragColor=vec4(minz,maxz,0.,0.);}\n#elif defined(LAST)\nvoid main(void)\n{glFragColor=vec4(0.);if (true) { \ndiscard;}}\n#endif\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const minmaxReduxPixelShader = { name, shader };\n//# sourceMappingURL=minmaxRedux.fragment.js.map","\nimport { Observable } from \"./observable.js\";\nimport { PostProcess } from \"../PostProcesses/postProcess.js\";\nimport { PostProcessManager } from \"../PostProcesses/postProcessManager.js\";\nimport \"../Shaders/minmaxRedux.fragment.js\";\n/**\n * This class computes a min/max reduction from a texture: it means it computes the minimum\n * and maximum values from all values of the texture.\n * It is performed on the GPU for better performances, thanks to a succession of post processes.\n * The source values are read from the red channel of the texture.\n */\nexport class MinMaxReducer {\n /**\n * Creates a min/max reducer\n * @param camera The camera to use for the post processes\n */\n constructor(camera) {\n /**\n * Observable triggered when the computation has been performed\n */\n this.onAfterReductionPerformed = new Observable();\n this._forceFullscreenViewport = true;\n this._activated = false;\n this._camera = camera;\n this._postProcessManager = new PostProcessManager(camera.getScene());\n this._onContextRestoredObserver = camera.getEngine().onContextRestoredObservable.add(() => {\n this._postProcessManager._rebuild();\n });\n }\n /**\n * Gets the texture used to read the values from.\n */\n get sourceTexture() {\n return this._sourceTexture;\n }\n /**\n * Sets the source texture to read the values from.\n * One must indicate if the texture is a depth texture or not through the depthRedux parameter\n * because in such textures '1' value must not be taken into account to compute the maximum\n * as this value is used to clear the texture.\n * Note that the computation is not activated by calling this function, you must call activate() for that!\n * @param sourceTexture The texture to read the values from. The values should be in the red channel.\n * @param depthRedux Indicates if the texture is a depth texture or not\n * @param type The type of the textures created for the reduction (defaults to TEXTURETYPE_HALF_FLOAT)\n * @param forceFullscreenViewport Forces the post processes used for the reduction to be applied without taking into account viewport (defaults to true)\n */\n setSourceTexture(sourceTexture, depthRedux, type = 2, forceFullscreenViewport = true) {\n if (sourceTexture === this._sourceTexture) {\n return;\n }\n this.dispose(false);\n this._sourceTexture = sourceTexture;\n this._reductionSteps = [];\n this._forceFullscreenViewport = forceFullscreenViewport;\n const scene = this._camera.getScene();\n // create the first step\n const reductionInitial = new PostProcess(\"Initial reduction phase\", \"minmaxRedux\", // shader\n [\"texSize\"], [\"sourceTexture\"], // textures\n 1.0, // options\n null, // camera\n 1, // sampling\n scene.getEngine(), // engine\n false, // reusable\n \"#define INITIAL\" + (depthRedux ? \"\\n#define DEPTH_REDUX\" : \"\"), // defines\n type, undefined, undefined, undefined, 7);\n reductionInitial.autoClear = false;\n reductionInitial.forceFullscreenViewport = forceFullscreenViewport;\n let w = this._sourceTexture.getRenderWidth(), h = this._sourceTexture.getRenderHeight();\n reductionInitial.onApply = ((w, h) => {\n return (effect) => {\n effect.setTexture(\"sourceTexture\", this._sourceTexture);\n effect.setFloat2(\"texSize\", w, h);\n };\n })(w, h);\n this._reductionSteps.push(reductionInitial);\n let index = 1;\n // create the additional steps\n while (w > 1 || h > 1) {\n w = Math.max(Math.round(w / 2), 1);\n h = Math.max(Math.round(h / 2), 1);\n const reduction = new PostProcess(\"Reduction phase \" + index, \"minmaxRedux\", // shader\n [\"texSize\"], null, { width: w, height: h }, // options\n null, // camera\n 1, // sampling\n scene.getEngine(), // engine\n false, // reusable\n \"#define \" + (w == 1 && h == 1 ? \"LAST\" : w == 1 || h == 1 ? \"ONEBEFORELAST\" : \"MAIN\"), // defines\n type, undefined, undefined, undefined, 7);\n reduction.autoClear = false;\n reduction.forceFullscreenViewport = forceFullscreenViewport;\n reduction.onApply = ((w, h) => {\n return (effect) => {\n if (w == 1 || h == 1) {\n effect.setInt2(\"texSize\", w, h);\n }\n else {\n effect.setFloat2(\"texSize\", w, h);\n }\n };\n })(w, h);\n this._reductionSteps.push(reduction);\n index++;\n if (w == 1 && h == 1) {\n const func = (w, h, reduction) => {\n const buffer = new Float32Array(4 * w * h), minmax = { min: 0, max: 0 };\n return () => {\n scene.getEngine()._readTexturePixels(reduction.inputTexture.texture, w, h, -1, 0, buffer, false);\n minmax.min = buffer[0];\n minmax.max = buffer[1];\n this.onAfterReductionPerformed.notifyObservers(minmax);\n };\n };\n reduction.onAfterRenderObservable.add(func(w, h, reduction));\n }\n }\n }\n /**\n * Defines the refresh rate of the computation.\n * Use 0 to compute just once, 1 to compute on every frame, 2 to compute every two frames and so on...\n */\n get refreshRate() {\n return this._sourceTexture ? this._sourceTexture.refreshRate : -1;\n }\n set refreshRate(value) {\n if (this._sourceTexture) {\n this._sourceTexture.refreshRate = value;\n }\n }\n /**\n * Gets the activation status of the reducer\n */\n get activated() {\n return this._activated;\n }\n /**\n * Activates the reduction computation.\n * When activated, the observers registered in onAfterReductionPerformed are\n * called after the computation is performed\n */\n activate() {\n if (this._onAfterUnbindObserver || !this._sourceTexture) {\n return;\n }\n this._onAfterUnbindObserver = this._sourceTexture.onAfterUnbindObservable.add(() => {\n var _a, _b;\n const engine = this._camera.getScene().getEngine();\n (_a = engine._debugPushGroup) === null || _a === void 0 ? void 0 : _a.call(engine, `min max reduction`, 1);\n this._reductionSteps[0].activate(this._camera);\n this._postProcessManager.directRender(this._reductionSteps, this._reductionSteps[0].inputTexture, this._forceFullscreenViewport);\n engine.unBindFramebuffer(this._reductionSteps[0].inputTexture, false);\n (_b = engine._debugPopGroup) === null || _b === void 0 ? void 0 : _b.call(engine, 1);\n });\n this._activated = true;\n }\n /**\n * Deactivates the reduction computation.\n */\n deactivate() {\n if (!this._onAfterUnbindObserver || !this._sourceTexture) {\n return;\n }\n this._sourceTexture.onAfterUnbindObservable.remove(this._onAfterUnbindObserver);\n this._onAfterUnbindObserver = null;\n this._activated = false;\n }\n /**\n * Disposes the min/max reducer\n * @param disposeAll true to dispose all the resources. You should always call this function with true as the parameter (or without any parameter as it is the default one). This flag is meant to be used internally.\n */\n dispose(disposeAll = true) {\n if (disposeAll) {\n this.onAfterReductionPerformed.clear();\n if (this._onContextRestoredObserver) {\n this._camera.getEngine().onContextRestoredObservable.remove(this._onContextRestoredObserver);\n this._onContextRestoredObserver = null;\n }\n }\n this.deactivate();\n if (this._reductionSteps) {\n for (let i = 0; i < this._reductionSteps.length; ++i) {\n this._reductionSteps[i].dispose();\n }\n this._reductionSteps = null;\n }\n if (this._postProcessManager && disposeAll) {\n this._postProcessManager.dispose();\n }\n this._sourceTexture = null;\n }\n}\n//# sourceMappingURL=minMaxReducer.js.map","\nimport { DepthRenderer } from \"../Rendering/depthRenderer.js\";\nimport { MinMaxReducer } from \"./minMaxReducer.js\";\n/**\n * This class is a small wrapper around the MinMaxReducer class to compute the min/max values of a depth texture\n */\nexport class DepthReducer extends MinMaxReducer {\n /**\n * Gets the depth renderer used for the computation.\n * Note that the result is null if you provide your own renderer when calling setDepthRenderer.\n */\n get depthRenderer() {\n return this._depthRenderer;\n }\n /**\n * Creates a depth reducer\n * @param camera The camera used to render the depth texture\n */\n constructor(camera) {\n super(camera);\n }\n /**\n * Sets the depth renderer to use to generate the depth map\n * @param depthRenderer The depth renderer to use. If not provided, a new one will be created automatically\n * @param type The texture type of the depth map (default: TEXTURETYPE_HALF_FLOAT)\n * @param forceFullscreenViewport Forces the post processes used for the reduction to be applied without taking into account viewport (defaults to true)\n */\n setDepthRenderer(depthRenderer = null, type = 2, forceFullscreenViewport = true) {\n const scene = this._camera.getScene();\n if (this._depthRenderer) {\n delete scene._depthRenderer[this._depthRendererId];\n this._depthRenderer.dispose();\n this._depthRenderer = null;\n }\n if (depthRenderer === null) {\n if (!scene._depthRenderer) {\n scene._depthRenderer = {};\n }\n depthRenderer = this._depthRenderer = new DepthRenderer(scene, type, this._camera, false, 1);\n depthRenderer.enabled = false;\n this._depthRendererId = \"minmax\" + this._camera.id;\n scene._depthRenderer[this._depthRendererId] = depthRenderer;\n }\n super.setSourceTexture(depthRenderer.getDepthMap(), true, type, forceFullscreenViewport);\n }\n /**\n * @internal\n */\n setSourceTexture(sourceTexture, depthRedux, type = 2, forceFullscreenViewport = true) {\n super.setSourceTexture(sourceTexture, depthRedux, type, forceFullscreenViewport);\n }\n /**\n * Activates the reduction computation.\n * When activated, the observers registered in onAfterReductionPerformed are\n * called after the computation is performed\n */\n activate() {\n if (this._depthRenderer) {\n this._depthRenderer.enabled = true;\n }\n super.activate();\n }\n /**\n * Deactivates the reduction computation.\n */\n deactivate() {\n super.deactivate();\n if (this._depthRenderer) {\n this._depthRenderer.enabled = false;\n }\n }\n /**\n * Disposes the depth reducer\n * @param disposeAll true to dispose all the resources. You should always call this function with true as the parameter (or without any parameter as it is the default one). This flag is meant to be used internally.\n */\n dispose(disposeAll = true) {\n super.dispose(disposeAll);\n if (this._depthRenderer && disposeAll) {\n const scene = this._depthRenderer.getDepthMap().getScene();\n if (scene) {\n delete scene._depthRenderer[this._depthRendererId];\n }\n this._depthRenderer.dispose();\n this._depthRenderer = null;\n }\n }\n}\n//# sourceMappingURL=depthReducer.js.map","import { Matrix, Vector3 } from \"../../Maths/math.vector.js\";\nimport { RenderTargetTexture } from \"../../Materials/Textures/renderTargetTexture.js\";\n\nimport \"../../Shaders/shadowMap.fragment.js\";\nimport \"../../Shaders/shadowMap.vertex.js\";\nimport \"../../Shaders/depthBoxBlur.fragment.js\";\nimport { _WarnImport } from \"../../Misc/devTools.js\";\nimport { ShadowGenerator } from \"./shadowGenerator.js\";\nimport { BoundingInfo } from \"../../Culling/boundingInfo.js\";\nimport { DepthReducer } from \"../../Misc/depthReducer.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nimport { EngineStore } from \"../../Engines/engineStore.js\";\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst UpDir = Vector3.Up();\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst ZeroVec = Vector3.Zero();\nconst tmpv1 = new Vector3(), tmpv2 = new Vector3(), tmpMatrix = new Matrix();\n/**\n * A CSM implementation allowing casting shadows on large scenes.\n * Documentation : https://doc.babylonjs.com/babylon101/cascadedShadows\n * Based on: https://github.com/TheRealMJP/Shadows and https://johanmedestrom.wordpress.com/2016/03/18/opengl-cascaded-shadow-maps/\n */\nexport class CascadedShadowGenerator extends ShadowGenerator {\n _validateFilter(filter) {\n if (filter === ShadowGenerator.FILTER_NONE || filter === ShadowGenerator.FILTER_PCF || filter === ShadowGenerator.FILTER_PCSS) {\n return filter;\n }\n console.error('Unsupported filter \"' + filter + '\"!');\n return ShadowGenerator.FILTER_NONE;\n }\n /**\n * Gets or set the number of cascades used by the CSM.\n */\n get numCascades() {\n return this._numCascades;\n }\n set numCascades(value) {\n value = Math.min(Math.max(value, CascadedShadowGenerator.MIN_CASCADES_COUNT), CascadedShadowGenerator.MAX_CASCADES_COUNT);\n if (value === this._numCascades) {\n return;\n }\n this._numCascades = value;\n this.recreateShadowMap();\n this._recreateSceneUBOs();\n }\n /**\n * Enables or disables the shadow casters bounding info computation.\n * If your shadow casters don't move, you can disable this feature.\n * If it is enabled, the bounding box computation is done every frame.\n */\n get freezeShadowCastersBoundingInfo() {\n return this._freezeShadowCastersBoundingInfo;\n }\n set freezeShadowCastersBoundingInfo(freeze) {\n if (this._freezeShadowCastersBoundingInfoObservable && freeze) {\n this._scene.onBeforeRenderObservable.remove(this._freezeShadowCastersBoundingInfoObservable);\n this._freezeShadowCastersBoundingInfoObservable = null;\n }\n if (!this._freezeShadowCastersBoundingInfoObservable && !freeze) {\n this._freezeShadowCastersBoundingInfoObservable = this._scene.onBeforeRenderObservable.add(() => this._computeShadowCastersBoundingInfo());\n }\n this._freezeShadowCastersBoundingInfo = freeze;\n if (freeze) {\n this._computeShadowCastersBoundingInfo();\n }\n }\n _computeShadowCastersBoundingInfo() {\n this._scbiMin.copyFromFloats(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n this._scbiMax.copyFromFloats(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\n if (this._shadowMap && this._shadowMap.renderList) {\n const renderList = this._shadowMap.renderList;\n for (let meshIndex = 0; meshIndex < renderList.length; meshIndex++) {\n const mesh = renderList[meshIndex];\n if (!mesh) {\n continue;\n }\n const boundingInfo = mesh.getBoundingInfo(), boundingBox = boundingInfo.boundingBox;\n this._scbiMin.minimizeInPlace(boundingBox.minimumWorld);\n this._scbiMax.maximizeInPlace(boundingBox.maximumWorld);\n }\n const meshes = this._scene.meshes;\n for (let meshIndex = 0; meshIndex < meshes.length; meshIndex++) {\n const mesh = meshes[meshIndex];\n if (!mesh || !mesh.isVisible || !mesh.isEnabled || !mesh.receiveShadows) {\n continue;\n }\n const boundingInfo = mesh.getBoundingInfo(), boundingBox = boundingInfo.boundingBox;\n this._scbiMin.minimizeInPlace(boundingBox.minimumWorld);\n this._scbiMax.maximizeInPlace(boundingBox.maximumWorld);\n }\n }\n this._shadowCastersBoundingInfo.reConstruct(this._scbiMin, this._scbiMax);\n }\n /**\n * Gets or sets the shadow casters bounding info.\n * If you provide your own shadow casters bounding info, first enable freezeShadowCastersBoundingInfo\n * so that the system won't overwrite the bounds you provide\n */\n get shadowCastersBoundingInfo() {\n return this._shadowCastersBoundingInfo;\n }\n set shadowCastersBoundingInfo(boundingInfo) {\n this._shadowCastersBoundingInfo = boundingInfo;\n }\n /**\n * Sets the minimal and maximal distances to use when computing the cascade breaks.\n *\n * The values of min / max are typically the depth zmin and zmax values of your scene, for a given frame.\n * If you don't know these values, simply leave them to their defaults and don't call this function.\n * @param min minimal distance for the breaks (default to 0.)\n * @param max maximal distance for the breaks (default to 1.)\n */\n setMinMaxDistance(min, max) {\n if (this._minDistance === min && this._maxDistance === max) {\n return;\n }\n if (min > max) {\n min = 0;\n max = 1;\n }\n if (min < 0) {\n min = 0;\n }\n if (max > 1) {\n max = 1;\n }\n this._minDistance = min;\n this._maxDistance = max;\n this._breaksAreDirty = true;\n }\n /** Gets the minimal distance used in the cascade break computation */\n get minDistance() {\n return this._minDistance;\n }\n /** Gets the maximal distance used in the cascade break computation */\n get maxDistance() {\n return this._maxDistance;\n }\n /**\n * Gets the class name of that object\n * @returns \"CascadedShadowGenerator\"\n */\n getClassName() {\n return CascadedShadowGenerator.CLASSNAME;\n }\n /**\n * Gets a cascade minimum extents\n * @param cascadeIndex index of the cascade\n * @returns the minimum cascade extents\n */\n getCascadeMinExtents(cascadeIndex) {\n return cascadeIndex >= 0 && cascadeIndex < this._numCascades ? this._cascadeMinExtents[cascadeIndex] : null;\n }\n /**\n * Gets a cascade maximum extents\n * @param cascadeIndex index of the cascade\n * @returns the maximum cascade extents\n */\n getCascadeMaxExtents(cascadeIndex) {\n return cascadeIndex >= 0 && cascadeIndex < this._numCascades ? this._cascadeMaxExtents[cascadeIndex] : null;\n }\n /**\n * Gets the shadow max z distance. It's the limit beyond which shadows are not displayed.\n * It defaults to camera.maxZ\n */\n get shadowMaxZ() {\n if (!this._getCamera()) {\n return 0;\n }\n return this._shadowMaxZ;\n }\n /**\n * Sets the shadow max z distance.\n */\n set shadowMaxZ(value) {\n const camera = this._getCamera();\n if (!camera) {\n this._shadowMaxZ = value;\n return;\n }\n if (this._shadowMaxZ === value || value < camera.minZ || (value > camera.maxZ && camera.maxZ !== 0)) {\n return;\n }\n this._shadowMaxZ = value;\n this._light._markMeshesAsLightDirty();\n this._breaksAreDirty = true;\n }\n /**\n * Gets or sets the debug flag.\n * When enabled, the cascades are materialized by different colors on the screen.\n */\n get debug() {\n return this._debug;\n }\n set debug(dbg) {\n this._debug = dbg;\n this._light._markMeshesAsLightDirty();\n }\n /**\n * Gets or sets the depth clamping value.\n *\n * When enabled, it improves the shadow quality because the near z plane of the light frustum don't need to be adjusted\n * to account for the shadow casters far away.\n *\n * Note that this property is incompatible with PCSS filtering, so it won't be used in that case.\n */\n get depthClamp() {\n return this._depthClamp;\n }\n set depthClamp(value) {\n this._depthClamp = value;\n }\n /**\n * Gets or sets the percentage of blending between two cascades (value between 0. and 1.).\n * It defaults to 0.1 (10% blending).\n */\n get cascadeBlendPercentage() {\n return this._cascadeBlendPercentage;\n }\n set cascadeBlendPercentage(value) {\n this._cascadeBlendPercentage = value;\n this._light._markMeshesAsLightDirty();\n }\n /**\n * Gets or set the lambda parameter.\n * This parameter is used to split the camera frustum and create the cascades.\n * It's a value between 0. and 1.: If 0, the split is a uniform split of the frustum, if 1 it is a logarithmic split.\n * For all values in-between, it's a linear combination of the uniform and logarithm split algorithm.\n */\n get lambda() {\n return this._lambda;\n }\n set lambda(value) {\n const lambda = Math.min(Math.max(value, 0), 1);\n if (this._lambda == lambda) {\n return;\n }\n this._lambda = lambda;\n this._breaksAreDirty = true;\n }\n /**\n * Gets the view matrix corresponding to a given cascade\n * @param cascadeNum cascade to retrieve the view matrix from\n * @returns the cascade view matrix\n */\n getCascadeViewMatrix(cascadeNum) {\n return cascadeNum >= 0 && cascadeNum < this._numCascades ? this._viewMatrices[cascadeNum] : null;\n }\n /**\n * Gets the projection matrix corresponding to a given cascade\n * @param cascadeNum cascade to retrieve the projection matrix from\n * @returns the cascade projection matrix\n */\n getCascadeProjectionMatrix(cascadeNum) {\n return cascadeNum >= 0 && cascadeNum < this._numCascades ? this._projectionMatrices[cascadeNum] : null;\n }\n /**\n * Gets the transformation matrix corresponding to a given cascade\n * @param cascadeNum cascade to retrieve the transformation matrix from\n * @returns the cascade transformation matrix\n */\n getCascadeTransformMatrix(cascadeNum) {\n return cascadeNum >= 0 && cascadeNum < this._numCascades ? this._transformMatrices[cascadeNum] : null;\n }\n /**\n * Sets the depth renderer to use when autoCalcDepthBounds is enabled.\n *\n * Note that if no depth renderer is set, a new one will be automatically created internally when necessary.\n *\n * You should call this function if you already have a depth renderer enabled in your scene, to avoid\n * doing multiple depth rendering each frame. If you provide your own depth renderer, make sure it stores linear depth!\n * @param depthRenderer The depth renderer to use when autoCalcDepthBounds is enabled. If you pass null or don't call this function at all, a depth renderer will be automatically created\n */\n setDepthRenderer(depthRenderer) {\n this._depthRenderer = depthRenderer;\n if (this._depthReducer) {\n this._depthReducer.setDepthRenderer(this._depthRenderer);\n }\n }\n /**\n * Gets or sets the autoCalcDepthBounds property.\n *\n * When enabled, a depth rendering pass is first performed (with an internally created depth renderer or with the one\n * you provide by calling setDepthRenderer). Then, a min/max reducing is applied on the depth map to compute the\n * minimal and maximal depth of the map and those values are used as inputs for the setMinMaxDistance() function.\n * It can greatly enhance the shadow quality, at the expense of more GPU works.\n * When using this option, you should increase the value of the lambda parameter, and even set it to 1 for best results.\n */\n get autoCalcDepthBounds() {\n return this._autoCalcDepthBounds;\n }\n set autoCalcDepthBounds(value) {\n const camera = this._getCamera();\n if (!camera) {\n return;\n }\n this._autoCalcDepthBounds = value;\n if (!value) {\n if (this._depthReducer) {\n this._depthReducer.deactivate();\n }\n this.setMinMaxDistance(0, 1);\n return;\n }\n if (!this._depthReducer) {\n this._depthReducer = new DepthReducer(camera);\n this._depthReducer.onAfterReductionPerformed.add((minmax) => {\n let min = minmax.min, max = minmax.max;\n if (min >= max) {\n min = 0;\n max = 1;\n }\n if (min != this._minDistance || max != this._maxDistance) {\n this.setMinMaxDistance(min, max);\n }\n });\n this._depthReducer.setDepthRenderer(this._depthRenderer);\n }\n this._depthReducer.activate();\n }\n /**\n * Defines the refresh rate of the min/max computation used when autoCalcDepthBounds is set to true\n * Use 0 to compute just once, 1 to compute on every frame, 2 to compute every two frames and so on...\n * Note that if you provided your own depth renderer through a call to setDepthRenderer, you are responsible\n * for setting the refresh rate on the renderer yourself!\n */\n get autoCalcDepthBoundsRefreshRate() {\n var _a, _b, _c;\n return (_c = (_b = (_a = this._depthReducer) === null || _a === void 0 ? void 0 : _a.depthRenderer) === null || _b === void 0 ? void 0 : _b.getDepthMap().refreshRate) !== null && _c !== void 0 ? _c : -1;\n }\n set autoCalcDepthBoundsRefreshRate(value) {\n var _a;\n if ((_a = this._depthReducer) === null || _a === void 0 ? void 0 : _a.depthRenderer) {\n this._depthReducer.depthRenderer.getDepthMap().refreshRate = value;\n }\n }\n /**\n * Create the cascade breaks according to the lambda, shadowMaxZ and min/max distance properties, as well as the camera near and far planes.\n * This function is automatically called when updating lambda, shadowMaxZ and min/max distances, however you should call it yourself if\n * you change the camera near/far planes!\n */\n splitFrustum() {\n this._breaksAreDirty = true;\n }\n _splitFrustum() {\n const camera = this._getCamera();\n if (!camera) {\n return;\n }\n const near = camera.minZ, far = camera.maxZ || this._shadowMaxZ, // account for infinite far plane (ie. maxZ = 0)\n cameraRange = far - near, minDistance = this._minDistance, maxDistance = this._shadowMaxZ < far && this._shadowMaxZ >= near ? Math.min((this._shadowMaxZ - near) / (far - near), this._maxDistance) : this._maxDistance;\n const minZ = near + minDistance * cameraRange, maxZ = near + maxDistance * cameraRange;\n const range = maxZ - minZ, ratio = maxZ / minZ;\n for (let cascadeIndex = 0; cascadeIndex < this._cascades.length; ++cascadeIndex) {\n const p = (cascadeIndex + 1) / this._numCascades, log = minZ * ratio ** p, uniform = minZ + range * p;\n const d = this._lambda * (log - uniform) + uniform;\n this._cascades[cascadeIndex].prevBreakDistance = cascadeIndex === 0 ? minDistance : this._cascades[cascadeIndex - 1].breakDistance;\n this._cascades[cascadeIndex].breakDistance = (d - near) / cameraRange;\n this._viewSpaceFrustumsZ[cascadeIndex] = d;\n this._frustumLengths[cascadeIndex] = (this._cascades[cascadeIndex].breakDistance - this._cascades[cascadeIndex].prevBreakDistance) * cameraRange;\n }\n this._breaksAreDirty = false;\n }\n _computeMatrices() {\n const scene = this._scene;\n const camera = this._getCamera();\n if (!camera) {\n return;\n }\n Vector3.NormalizeToRef(this._light.getShadowDirection(0), this._lightDirection);\n if (Math.abs(Vector3.Dot(this._lightDirection, Vector3.Up())) === 1.0) {\n this._lightDirection.z = 0.0000000000001; // Required to avoid perfectly perpendicular light\n }\n this._cachedDirection.copyFrom(this._lightDirection);\n const useReverseDepthBuffer = scene.getEngine().useReverseDepthBuffer;\n for (let cascadeIndex = 0; cascadeIndex < this._numCascades; ++cascadeIndex) {\n this._computeFrustumInWorldSpace(cascadeIndex);\n this._computeCascadeFrustum(cascadeIndex);\n this._cascadeMaxExtents[cascadeIndex].subtractToRef(this._cascadeMinExtents[cascadeIndex], tmpv1); // tmpv1 = cascadeExtents\n // Get position of the shadow camera\n this._frustumCenter[cascadeIndex].addToRef(this._lightDirection.scale(this._cascadeMinExtents[cascadeIndex].z), this._shadowCameraPos[cascadeIndex]);\n // Come up with a new orthographic camera for the shadow caster\n Matrix.LookAtLHToRef(this._shadowCameraPos[cascadeIndex], this._frustumCenter[cascadeIndex], UpDir, this._viewMatrices[cascadeIndex]);\n let minZ = 0, maxZ = tmpv1.z;\n // Try to tighten minZ and maxZ based on the bounding box of the shadow casters\n const boundingInfo = this._shadowCastersBoundingInfo;\n boundingInfo.update(this._viewMatrices[cascadeIndex]);\n maxZ = Math.min(maxZ, boundingInfo.boundingBox.maximumWorld.z);\n if (!this._depthClamp || this.filter === ShadowGenerator.FILTER_PCSS) {\n // If we don't use depth clamping, we must set minZ so that all shadow casters are in the light frustum\n minZ = Math.min(minZ, boundingInfo.boundingBox.minimumWorld.z);\n }\n else {\n // If using depth clamping, we can adjust minZ to reduce the [minZ, maxZ] range (and get some additional precision in the shadow map)\n minZ = Math.max(minZ, boundingInfo.boundingBox.minimumWorld.z);\n }\n Matrix.OrthoOffCenterLHToRef(this._cascadeMinExtents[cascadeIndex].x, this._cascadeMaxExtents[cascadeIndex].x, this._cascadeMinExtents[cascadeIndex].y, this._cascadeMaxExtents[cascadeIndex].y, useReverseDepthBuffer ? maxZ : minZ, useReverseDepthBuffer ? minZ : maxZ, this._projectionMatrices[cascadeIndex], scene.getEngine().isNDCHalfZRange);\n this._cascadeMinExtents[cascadeIndex].z = minZ;\n this._cascadeMaxExtents[cascadeIndex].z = maxZ;\n this._viewMatrices[cascadeIndex].multiplyToRef(this._projectionMatrices[cascadeIndex], this._transformMatrices[cascadeIndex]);\n // Create the rounding matrix, by projecting the world-space origin and determining\n // the fractional offset in texel space\n Vector3.TransformCoordinatesToRef(ZeroVec, this._transformMatrices[cascadeIndex], tmpv1); // tmpv1 = shadowOrigin\n tmpv1.scaleInPlace(this._mapSize / 2);\n tmpv2.copyFromFloats(Math.round(tmpv1.x), Math.round(tmpv1.y), Math.round(tmpv1.z)); // tmpv2 = roundedOrigin\n tmpv2.subtractInPlace(tmpv1).scaleInPlace(2 / this._mapSize); // tmpv2 = roundOffset\n Matrix.TranslationToRef(tmpv2.x, tmpv2.y, 0.0, tmpMatrix);\n this._projectionMatrices[cascadeIndex].multiplyToRef(tmpMatrix, this._projectionMatrices[cascadeIndex]);\n this._viewMatrices[cascadeIndex].multiplyToRef(this._projectionMatrices[cascadeIndex], this._transformMatrices[cascadeIndex]);\n this._transformMatrices[cascadeIndex].copyToArray(this._transformMatricesAsArray, cascadeIndex * 16);\n }\n }\n // Get the 8 points of the view frustum in world space\n _computeFrustumInWorldSpace(cascadeIndex) {\n const camera = this._getCamera();\n if (!camera) {\n return;\n }\n const prevSplitDist = this._cascades[cascadeIndex].prevBreakDistance, splitDist = this._cascades[cascadeIndex].breakDistance;\n const isNDCHalfZRange = this._scene.getEngine().isNDCHalfZRange;\n camera.getViewMatrix(); // make sure the transformation matrix we get when calling 'getTransformationMatrix()' is calculated with an up to date view matrix\n const cameraInfiniteFarPlane = camera.maxZ === 0;\n const saveCameraMaxZ = camera.maxZ;\n if (cameraInfiniteFarPlane) {\n camera.maxZ = this._shadowMaxZ;\n camera.getProjectionMatrix(true);\n }\n const invViewProj = Matrix.Invert(camera.getTransformationMatrix());\n if (cameraInfiniteFarPlane) {\n camera.maxZ = saveCameraMaxZ;\n camera.getProjectionMatrix(true);\n }\n const cornerIndexOffset = this._scene.getEngine().useReverseDepthBuffer ? 4 : 0;\n for (let cornerIndex = 0; cornerIndex < CascadedShadowGenerator._FrustumCornersNDCSpace.length; ++cornerIndex) {\n tmpv1.copyFrom(CascadedShadowGenerator._FrustumCornersNDCSpace[(cornerIndex + cornerIndexOffset) % CascadedShadowGenerator._FrustumCornersNDCSpace.length]);\n if (isNDCHalfZRange && tmpv1.z === -1) {\n tmpv1.z = 0;\n }\n Vector3.TransformCoordinatesToRef(tmpv1, invViewProj, this._frustumCornersWorldSpace[cascadeIndex][cornerIndex]);\n }\n // Get the corners of the current cascade slice of the view frustum\n for (let cornerIndex = 0; cornerIndex < CascadedShadowGenerator._FrustumCornersNDCSpace.length / 2; ++cornerIndex) {\n tmpv1.copyFrom(this._frustumCornersWorldSpace[cascadeIndex][cornerIndex + 4]).subtractInPlace(this._frustumCornersWorldSpace[cascadeIndex][cornerIndex]);\n tmpv2.copyFrom(tmpv1).scaleInPlace(prevSplitDist); // near corner ray\n tmpv1.scaleInPlace(splitDist); // far corner ray\n tmpv1.addInPlace(this._frustumCornersWorldSpace[cascadeIndex][cornerIndex]);\n this._frustumCornersWorldSpace[cascadeIndex][cornerIndex + 4].copyFrom(tmpv1);\n this._frustumCornersWorldSpace[cascadeIndex][cornerIndex].addInPlace(tmpv2);\n }\n }\n _computeCascadeFrustum(cascadeIndex) {\n this._cascadeMinExtents[cascadeIndex].copyFromFloats(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n this._cascadeMaxExtents[cascadeIndex].copyFromFloats(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\n this._frustumCenter[cascadeIndex].copyFromFloats(0, 0, 0);\n const camera = this._getCamera();\n if (!camera) {\n return;\n }\n // Calculate the centroid of the view frustum slice\n for (let cornerIndex = 0; cornerIndex < this._frustumCornersWorldSpace[cascadeIndex].length; ++cornerIndex) {\n this._frustumCenter[cascadeIndex].addInPlace(this._frustumCornersWorldSpace[cascadeIndex][cornerIndex]);\n }\n this._frustumCenter[cascadeIndex].scaleInPlace(1 / this._frustumCornersWorldSpace[cascadeIndex].length);\n if (this.stabilizeCascades) {\n // Calculate the radius of a bounding sphere surrounding the frustum corners\n let sphereRadius = 0;\n for (let cornerIndex = 0; cornerIndex < this._frustumCornersWorldSpace[cascadeIndex].length; ++cornerIndex) {\n const dist = this._frustumCornersWorldSpace[cascadeIndex][cornerIndex].subtractToRef(this._frustumCenter[cascadeIndex], tmpv1).length();\n sphereRadius = Math.max(sphereRadius, dist);\n }\n sphereRadius = Math.ceil(sphereRadius * 16) / 16;\n this._cascadeMaxExtents[cascadeIndex].copyFromFloats(sphereRadius, sphereRadius, sphereRadius);\n this._cascadeMinExtents[cascadeIndex].copyFromFloats(-sphereRadius, -sphereRadius, -sphereRadius);\n }\n else {\n // Create a temporary view matrix for the light\n const lightCameraPos = this._frustumCenter[cascadeIndex];\n this._frustumCenter[cascadeIndex].addToRef(this._lightDirection, tmpv1); // tmpv1 = look at\n Matrix.LookAtLHToRef(lightCameraPos, tmpv1, UpDir, tmpMatrix); // matrix = lightView\n // Calculate an AABB around the frustum corners\n for (let cornerIndex = 0; cornerIndex < this._frustumCornersWorldSpace[cascadeIndex].length; ++cornerIndex) {\n Vector3.TransformCoordinatesToRef(this._frustumCornersWorldSpace[cascadeIndex][cornerIndex], tmpMatrix, tmpv1);\n this._cascadeMinExtents[cascadeIndex].minimizeInPlace(tmpv1);\n this._cascadeMaxExtents[cascadeIndex].maximizeInPlace(tmpv1);\n }\n }\n }\n _recreateSceneUBOs() {\n this._disposeSceneUBOs();\n if (this._sceneUBOs) {\n for (let i = 0; i < this._numCascades; ++i) {\n this._sceneUBOs.push(this._scene.createSceneUniformBuffer(`Scene for CSM Shadow Generator (light \"${this._light.name}\" cascade #${i})`));\n }\n }\n }\n /**\n * Support test.\n */\n static get IsSupported() {\n const engine = EngineStore.LastCreatedEngine;\n if (!engine) {\n return false;\n }\n return engine._features.supportCSM;\n }\n /**\n * Creates a Cascaded Shadow Generator object.\n * A ShadowGenerator is the required tool to use the shadows.\n * Each directional light casting shadows needs to use its own ShadowGenerator.\n * Documentation : https://doc.babylonjs.com/babylon101/cascadedShadows\n * @param mapSize The size of the texture what stores the shadows. Example : 1024.\n * @param light The directional light object generating the shadows.\n * @param usefulFloatFirst By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.\n * @param camera Camera associated with this shadow generator (default: null). If null, takes the scene active camera at the time we need to access it\n * @param useRedTextureType Forces the generator to use a Red instead of a RGBA type for the shadow map texture format (default: true)\n */\n constructor(mapSize, light, usefulFloatFirst, camera, useRedTextureType = true) {\n if (!CascadedShadowGenerator.IsSupported) {\n Logger.Error(\"CascadedShadowMap is not supported by the current engine.\");\n return;\n }\n super(mapSize, light, usefulFloatFirst, camera, useRedTextureType);\n this.usePercentageCloserFiltering = true;\n }\n _initializeGenerator() {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;\n this.penumbraDarkness = (_a = this.penumbraDarkness) !== null && _a !== void 0 ? _a : 1.0;\n this._numCascades = (_b = this._numCascades) !== null && _b !== void 0 ? _b : CascadedShadowGenerator.DEFAULT_CASCADES_COUNT;\n this.stabilizeCascades = (_c = this.stabilizeCascades) !== null && _c !== void 0 ? _c : false;\n this._freezeShadowCastersBoundingInfoObservable = (_d = this._freezeShadowCastersBoundingInfoObservable) !== null && _d !== void 0 ? _d : null;\n this.freezeShadowCastersBoundingInfo = (_e = this.freezeShadowCastersBoundingInfo) !== null && _e !== void 0 ? _e : false;\n this._scbiMin = (_f = this._scbiMin) !== null && _f !== void 0 ? _f : new Vector3(0, 0, 0);\n this._scbiMax = (_g = this._scbiMax) !== null && _g !== void 0 ? _g : new Vector3(0, 0, 0);\n this._shadowCastersBoundingInfo = (_h = this._shadowCastersBoundingInfo) !== null && _h !== void 0 ? _h : new BoundingInfo(new Vector3(0, 0, 0), new Vector3(0, 0, 0));\n this._breaksAreDirty = (_j = this._breaksAreDirty) !== null && _j !== void 0 ? _j : true;\n this._minDistance = (_k = this._minDistance) !== null && _k !== void 0 ? _k : 0;\n this._maxDistance = (_l = this._maxDistance) !== null && _l !== void 0 ? _l : 1;\n this._currentLayer = (_m = this._currentLayer) !== null && _m !== void 0 ? _m : 0;\n this._shadowMaxZ = (_q = (_o = this._shadowMaxZ) !== null && _o !== void 0 ? _o : (_p = this._getCamera()) === null || _p === void 0 ? void 0 : _p.maxZ) !== null && _q !== void 0 ? _q : 10000;\n this._debug = (_r = this._debug) !== null && _r !== void 0 ? _r : false;\n this._depthClamp = (_s = this._depthClamp) !== null && _s !== void 0 ? _s : true;\n this._cascadeBlendPercentage = (_t = this._cascadeBlendPercentage) !== null && _t !== void 0 ? _t : 0.1;\n this._lambda = (_u = this._lambda) !== null && _u !== void 0 ? _u : 0.5;\n this._autoCalcDepthBounds = (_v = this._autoCalcDepthBounds) !== null && _v !== void 0 ? _v : false;\n this._recreateSceneUBOs();\n super._initializeGenerator();\n }\n _createTargetRenderTexture() {\n const engine = this._scene.getEngine();\n const size = { width: this._mapSize, height: this._mapSize, layers: this.numCascades };\n this._shadowMap = new RenderTargetTexture(this._light.name + \"_CSMShadowMap\", size, this._scene, false, true, this._textureType, false, undefined, false, false, undefined, this._useRedTextureType ? 6 : 5);\n this._shadowMap.createDepthStencilTexture(engine.useReverseDepthBuffer ? 516 : 513, true);\n this._shadowMap.noPrePassRenderer = true;\n }\n _initializeShadowMap() {\n super._initializeShadowMap();\n if (this._shadowMap === null) {\n return;\n }\n this._transformMatricesAsArray = new Float32Array(this._numCascades * 16);\n this._viewSpaceFrustumsZ = new Array(this._numCascades);\n this._frustumLengths = new Array(this._numCascades);\n this._lightSizeUVCorrection = new Array(this._numCascades * 2);\n this._depthCorrection = new Array(this._numCascades);\n this._cascades = [];\n this._viewMatrices = [];\n this._projectionMatrices = [];\n this._transformMatrices = [];\n this._cascadeMinExtents = [];\n this._cascadeMaxExtents = [];\n this._frustumCenter = [];\n this._shadowCameraPos = [];\n this._frustumCornersWorldSpace = [];\n for (let cascadeIndex = 0; cascadeIndex < this._numCascades; ++cascadeIndex) {\n this._cascades[cascadeIndex] = {\n prevBreakDistance: 0,\n breakDistance: 0,\n };\n this._viewMatrices[cascadeIndex] = Matrix.Zero();\n this._projectionMatrices[cascadeIndex] = Matrix.Zero();\n this._transformMatrices[cascadeIndex] = Matrix.Zero();\n this._cascadeMinExtents[cascadeIndex] = new Vector3();\n this._cascadeMaxExtents[cascadeIndex] = new Vector3();\n this._frustumCenter[cascadeIndex] = new Vector3();\n this._shadowCameraPos[cascadeIndex] = new Vector3();\n this._frustumCornersWorldSpace[cascadeIndex] = new Array(CascadedShadowGenerator._FrustumCornersNDCSpace.length);\n for (let i = 0; i < CascadedShadowGenerator._FrustumCornersNDCSpace.length; ++i) {\n this._frustumCornersWorldSpace[cascadeIndex][i] = new Vector3();\n }\n }\n const engine = this._scene.getEngine();\n this._shadowMap.onBeforeBindObservable.clear();\n this._shadowMap.onBeforeRenderObservable.clear();\n this._shadowMap.onBeforeRenderObservable.add((layer) => {\n if (this._sceneUBOs) {\n this._scene.setSceneUniformBuffer(this._sceneUBOs[layer]);\n }\n this._currentLayer = layer;\n if (this._filter === ShadowGenerator.FILTER_PCF) {\n engine.setColorWrite(false);\n }\n this._scene.setTransformMatrix(this.getCascadeViewMatrix(layer), this.getCascadeProjectionMatrix(layer));\n if (this._useUBO) {\n this._scene.getSceneUniformBuffer().unbindEffect();\n this._scene.finalizeSceneUbo();\n }\n });\n this._shadowMap.onBeforeBindObservable.add(() => {\n var _a;\n this._currentSceneUBO = this._scene.getSceneUniformBuffer();\n (_a = engine._debugPushGroup) === null || _a === void 0 ? void 0 : _a.call(engine, `cascaded shadow map generation for pass id ${engine.currentRenderPassId}`, 1);\n if (this._breaksAreDirty) {\n this._splitFrustum();\n }\n this._computeMatrices();\n });\n this._splitFrustum();\n }\n _bindCustomEffectForRenderSubMeshForShadowMap(subMesh, effect) {\n effect.setMatrix(\"viewProjection\", this.getCascadeTransformMatrix(this._currentLayer));\n }\n _isReadyCustomDefines(defines) {\n defines.push(\"#define SM_DEPTHCLAMP \" + (this._depthClamp && this._filter !== ShadowGenerator.FILTER_PCSS ? \"1\" : \"0\"));\n }\n /**\n * Prepare all the defines in a material relying on a shadow map at the specified light index.\n * @param defines Defines of the material we want to update\n * @param lightIndex Index of the light in the enabled light list of the material\n */\n prepareDefines(defines, lightIndex) {\n super.prepareDefines(defines, lightIndex);\n const scene = this._scene;\n const light = this._light;\n if (!scene.shadowsEnabled || !light.shadowEnabled) {\n return;\n }\n defines[\"SHADOWCSM\" + lightIndex] = true;\n defines[\"SHADOWCSMDEBUG\" + lightIndex] = this.debug;\n defines[\"SHADOWCSMNUM_CASCADES\" + lightIndex] = this.numCascades;\n defines[\"SHADOWCSM_RIGHTHANDED\" + lightIndex] = scene.useRightHandedSystem;\n const camera = this._getCamera();\n if (camera && this._shadowMaxZ <= (camera.maxZ || this._shadowMaxZ)) {\n defines[\"SHADOWCSMUSESHADOWMAXZ\" + lightIndex] = true;\n }\n if (this.cascadeBlendPercentage === 0) {\n defines[\"SHADOWCSMNOBLEND\" + lightIndex] = true;\n }\n }\n /**\n * Binds the shadow related information inside of an effect (information like near, far, darkness...\n * defined in the generator but impacting the effect).\n * @param lightIndex Index of the light in the enabled light list of the material owning the effect\n * @param effect The effect we are binfing the information for\n */\n bindShadowLight(lightIndex, effect) {\n const light = this._light;\n const scene = this._scene;\n if (!scene.shadowsEnabled || !light.shadowEnabled) {\n return;\n }\n const camera = this._getCamera();\n if (!camera) {\n return;\n }\n const shadowMap = this.getShadowMap();\n if (!shadowMap) {\n return;\n }\n const width = shadowMap.getSize().width;\n effect.setMatrices(\"lightMatrix\" + lightIndex, this._transformMatricesAsArray);\n effect.setArray(\"viewFrustumZ\" + lightIndex, this._viewSpaceFrustumsZ);\n effect.setFloat(\"cascadeBlendFactor\" + lightIndex, this.cascadeBlendPercentage === 0 ? 10000 : 1 / this.cascadeBlendPercentage);\n effect.setArray(\"frustumLengths\" + lightIndex, this._frustumLengths);\n // Only PCF uses depth stencil texture.\n if (this._filter === ShadowGenerator.FILTER_PCF) {\n effect.setDepthStencilTexture(\"shadowSampler\" + lightIndex, shadowMap);\n light._uniformBuffer.updateFloat4(\"shadowsInfo\", this.getDarkness(), width, 1 / width, this.frustumEdgeFalloff, lightIndex);\n }\n else if (this._filter === ShadowGenerator.FILTER_PCSS) {\n for (let cascadeIndex = 0; cascadeIndex < this._numCascades; ++cascadeIndex) {\n this._lightSizeUVCorrection[cascadeIndex * 2 + 0] =\n cascadeIndex === 0\n ? 1\n : (this._cascadeMaxExtents[0].x - this._cascadeMinExtents[0].x) / (this._cascadeMaxExtents[cascadeIndex].x - this._cascadeMinExtents[cascadeIndex].x); // x correction\n this._lightSizeUVCorrection[cascadeIndex * 2 + 1] =\n cascadeIndex === 0\n ? 1\n : (this._cascadeMaxExtents[0].y - this._cascadeMinExtents[0].y) / (this._cascadeMaxExtents[cascadeIndex].y - this._cascadeMinExtents[cascadeIndex].y); // y correction\n this._depthCorrection[cascadeIndex] =\n cascadeIndex === 0\n ? 1\n : (this._cascadeMaxExtents[cascadeIndex].z - this._cascadeMinExtents[cascadeIndex].z) / (this._cascadeMaxExtents[0].z - this._cascadeMinExtents[0].z);\n }\n effect.setDepthStencilTexture(\"shadowSampler\" + lightIndex, shadowMap);\n effect.setTexture(\"depthSampler\" + lightIndex, shadowMap);\n effect.setArray2(\"lightSizeUVCorrection\" + lightIndex, this._lightSizeUVCorrection);\n effect.setArray(\"depthCorrection\" + lightIndex, this._depthCorrection);\n effect.setFloat(\"penumbraDarkness\" + lightIndex, this.penumbraDarkness);\n light._uniformBuffer.updateFloat4(\"shadowsInfo\", this.getDarkness(), 1 / width, this._contactHardeningLightSizeUVRatio * width, this.frustumEdgeFalloff, lightIndex);\n }\n else {\n effect.setTexture(\"shadowSampler\" + lightIndex, shadowMap);\n light._uniformBuffer.updateFloat4(\"shadowsInfo\", this.getDarkness(), width, 1 / width, this.frustumEdgeFalloff, lightIndex);\n }\n light._uniformBuffer.updateFloat2(\"depthValues\", this.getLight().getDepthMinZ(camera), this.getLight().getDepthMinZ(camera) + this.getLight().getDepthMaxZ(camera), lightIndex);\n }\n /**\n * Gets the transformation matrix of the first cascade used to project the meshes into the map from the light point of view.\n * (eq to view projection * shadow projection matrices)\n * @returns The transform matrix used to create the shadow map\n */\n getTransformMatrix() {\n return this.getCascadeTransformMatrix(0);\n }\n /**\n * Disposes the ShadowGenerator.\n * Returns nothing.\n */\n dispose() {\n super.dispose();\n if (this._freezeShadowCastersBoundingInfoObservable) {\n this._scene.onBeforeRenderObservable.remove(this._freezeShadowCastersBoundingInfoObservable);\n this._freezeShadowCastersBoundingInfoObservable = null;\n }\n if (this._depthReducer) {\n this._depthReducer.dispose();\n this._depthReducer = null;\n }\n }\n /**\n * Serializes the shadow generator setup to a json object.\n * @returns The serialized JSON object\n */\n serialize() {\n const serializationObject = super.serialize();\n const shadowMap = this.getShadowMap();\n if (!shadowMap) {\n return serializationObject;\n }\n serializationObject.numCascades = this._numCascades;\n serializationObject.debug = this._debug;\n serializationObject.stabilizeCascades = this.stabilizeCascades;\n serializationObject.lambda = this._lambda;\n serializationObject.cascadeBlendPercentage = this.cascadeBlendPercentage;\n serializationObject.depthClamp = this._depthClamp;\n serializationObject.autoCalcDepthBounds = this.autoCalcDepthBounds;\n serializationObject.shadowMaxZ = this._shadowMaxZ;\n serializationObject.penumbraDarkness = this.penumbraDarkness;\n serializationObject.freezeShadowCastersBoundingInfo = this._freezeShadowCastersBoundingInfo;\n serializationObject.minDistance = this.minDistance;\n serializationObject.maxDistance = this.maxDistance;\n serializationObject.renderList = [];\n if (shadowMap.renderList) {\n for (let meshIndex = 0; meshIndex < shadowMap.renderList.length; meshIndex++) {\n const mesh = shadowMap.renderList[meshIndex];\n serializationObject.renderList.push(mesh.id);\n }\n }\n return serializationObject;\n }\n /**\n * Parses a serialized ShadowGenerator and returns a new ShadowGenerator.\n * @param parsedShadowGenerator The JSON object to parse\n * @param scene The scene to create the shadow map for\n * @returns The parsed shadow generator\n */\n static Parse(parsedShadowGenerator, scene) {\n const shadowGenerator = ShadowGenerator.Parse(parsedShadowGenerator, scene, (mapSize, light, camera) => new CascadedShadowGenerator(mapSize, light, undefined, camera));\n if (parsedShadowGenerator.numCascades !== undefined) {\n shadowGenerator.numCascades = parsedShadowGenerator.numCascades;\n }\n if (parsedShadowGenerator.debug !== undefined) {\n shadowGenerator.debug = parsedShadowGenerator.debug;\n }\n if (parsedShadowGenerator.stabilizeCascades !== undefined) {\n shadowGenerator.stabilizeCascades = parsedShadowGenerator.stabilizeCascades;\n }\n if (parsedShadowGenerator.lambda !== undefined) {\n shadowGenerator.lambda = parsedShadowGenerator.lambda;\n }\n if (parsedShadowGenerator.cascadeBlendPercentage !== undefined) {\n shadowGenerator.cascadeBlendPercentage = parsedShadowGenerator.cascadeBlendPercentage;\n }\n if (parsedShadowGenerator.depthClamp !== undefined) {\n shadowGenerator.depthClamp = parsedShadowGenerator.depthClamp;\n }\n if (parsedShadowGenerator.autoCalcDepthBounds !== undefined) {\n shadowGenerator.autoCalcDepthBounds = parsedShadowGenerator.autoCalcDepthBounds;\n }\n if (parsedShadowGenerator.shadowMaxZ !== undefined) {\n shadowGenerator.shadowMaxZ = parsedShadowGenerator.shadowMaxZ;\n }\n if (parsedShadowGenerator.penumbraDarkness !== undefined) {\n shadowGenerator.penumbraDarkness = parsedShadowGenerator.penumbraDarkness;\n }\n if (parsedShadowGenerator.freezeShadowCastersBoundingInfo !== undefined) {\n shadowGenerator.freezeShadowCastersBoundingInfo = parsedShadowGenerator.freezeShadowCastersBoundingInfo;\n }\n if (parsedShadowGenerator.minDistance !== undefined && parsedShadowGenerator.maxDistance !== undefined) {\n shadowGenerator.setMinMaxDistance(parsedShadowGenerator.minDistance, parsedShadowGenerator.maxDistance);\n }\n return shadowGenerator;\n }\n}\nCascadedShadowGenerator._FrustumCornersNDCSpace = [\n new Vector3(-1.0, +1.0, -1.0),\n new Vector3(+1.0, +1.0, -1.0),\n new Vector3(+1.0, -1.0, -1.0),\n new Vector3(-1.0, -1.0, -1.0),\n new Vector3(-1.0, +1.0, +1.0),\n new Vector3(+1.0, +1.0, +1.0),\n new Vector3(+1.0, -1.0, +1.0),\n new Vector3(-1.0, -1.0, +1.0),\n];\n/**\n * Name of the CSM class\n */\nCascadedShadowGenerator.CLASSNAME = \"CascadedShadowGenerator\";\n/**\n * Defines the default number of cascades used by the CSM.\n */\nCascadedShadowGenerator.DEFAULT_CASCADES_COUNT = 4;\n/**\n * Defines the minimum number of cascades used by the CSM.\n */\nCascadedShadowGenerator.MIN_CASCADES_COUNT = 2;\n/**\n * Defines the maximum number of cascades used by the CSM.\n */\nCascadedShadowGenerator.MAX_CASCADES_COUNT = 4;\n/**\n * @internal\n */\nCascadedShadowGenerator._SceneComponentInitialization = (_) => {\n throw _WarnImport(\"ShadowGeneratorSceneComponent\");\n};\n//# sourceMappingURL=cascadedShadowGenerator.js.map","import { ShadowGenerator } from \"./shadowGenerator.js\";\nimport { CascadedShadowGenerator } from \"./cascadedShadowGenerator.js\";\nimport { SceneComponentConstants } from \"../../sceneComponent.js\";\nimport { AbstractScene } from \"../../abstractScene.js\";\n// Adds the parser to the scene parsers.\nAbstractScene.AddParser(SceneComponentConstants.NAME_SHADOWGENERATOR, (parsedData, scene) => {\n // Shadows\n if (parsedData.shadowGenerators !== undefined && parsedData.shadowGenerators !== null) {\n for (let index = 0, cache = parsedData.shadowGenerators.length; index < cache; index++) {\n const parsedShadowGenerator = parsedData.shadowGenerators[index];\n if (parsedShadowGenerator.className === CascadedShadowGenerator.CLASSNAME) {\n CascadedShadowGenerator.Parse(parsedShadowGenerator, scene);\n }\n else {\n ShadowGenerator.Parse(parsedShadowGenerator, scene);\n }\n // SG would be available on their associated lights\n }\n }\n});\n/**\n * Defines the shadow generator component responsible to manage any shadow generators\n * in a given scene.\n */\nexport class ShadowGeneratorSceneComponent {\n /**\n * Creates a new instance of the component for the given scene\n * @param scene Defines the scene to register the component in\n */\n constructor(scene) {\n /**\n * The component name helpful to identify the component in the list of scene components.\n */\n this.name = SceneComponentConstants.NAME_SHADOWGENERATOR;\n this.scene = scene;\n }\n /**\n * Registers the component in a given scene\n */\n register() {\n this.scene._gatherRenderTargetsStage.registerStep(SceneComponentConstants.STEP_GATHERRENDERTARGETS_SHADOWGENERATOR, this, this._gatherRenderTargets);\n }\n /**\n * Rebuilds the elements related to this component in case of\n * context lost for instance.\n */\n rebuild() {\n // Nothing To Do Here.\n }\n /**\n * Serializes the component data to the specified json object\n * @param serializationObject The object to serialize to\n */\n serialize(serializationObject) {\n // Shadows\n serializationObject.shadowGenerators = [];\n const lights = this.scene.lights;\n for (const light of lights) {\n const shadowGenerators = light.getShadowGenerators();\n if (shadowGenerators) {\n const iterator = shadowGenerators.values();\n for (let key = iterator.next(); key.done !== true; key = iterator.next()) {\n const shadowGenerator = key.value;\n serializationObject.shadowGenerators.push(shadowGenerator.serialize());\n }\n }\n }\n }\n /**\n * Adds all the elements from the container to the scene\n * @param container the container holding the elements\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n addFromContainer(container) {\n // Nothing To Do Here. (directly attached to a light)\n }\n /**\n * Removes all the elements in the container from the scene\n * @param container contains the elements to remove\n * @param dispose if the removed element should be disposed (default: false)\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n removeFromContainer(container, dispose) {\n // Nothing To Do Here. (directly attached to a light)\n }\n /**\n * Rebuilds the elements related to this component in case of\n * context lost for instance.\n */\n dispose() {\n // Nothing To Do Here.\n }\n _gatherRenderTargets(renderTargets) {\n // Shadows\n const scene = this.scene;\n if (this.scene.shadowsEnabled) {\n for (let lightIndex = 0; lightIndex < scene.lights.length; lightIndex++) {\n const light = scene.lights[lightIndex];\n const shadowGenerators = light.getShadowGenerators();\n if (light.isEnabled() && light.shadowEnabled && shadowGenerators) {\n const iterator = shadowGenerators.values();\n for (let key = iterator.next(); key.done !== true; key = iterator.next()) {\n const shadowGenerator = key.value;\n const shadowMap = shadowGenerator.getShadowMap();\n if (scene.textures.indexOf(shadowMap) !== -1) {\n renderTargets.push(shadowMap);\n }\n }\n }\n }\n }\n }\n}\nShadowGenerator._SceneComponentInitialization = (scene) => {\n let component = scene._getComponent(SceneComponentConstants.NAME_SHADOWGENERATOR);\n if (!component) {\n component = new ShadowGeneratorSceneComponent(scene);\n scene._addComponent(component);\n }\n};\n//# sourceMappingURL=shadowGeneratorSceneComponent.js.map","import { Scene } from \"../scene.js\";\nimport { DepthRenderer } from \"./depthRenderer.js\";\n\nimport { SceneComponentConstants } from \"../sceneComponent.js\";\nScene.prototype.enableDepthRenderer = function (camera, storeNonLinearDepth = false, force32bitsFloat = false, samplingMode = 3, storeCameraSpaceZ = false) {\n camera = camera || this.activeCamera;\n if (!camera) {\n throw \"No camera available to enable depth renderer\";\n }\n if (!this._depthRenderer) {\n this._depthRenderer = {};\n }\n if (!this._depthRenderer[camera.id]) {\n const supportFullfloat = !!this.getEngine().getCaps().textureFloatRender;\n let textureType = 0;\n if (this.getEngine().getCaps().textureHalfFloatRender && (!force32bitsFloat || !supportFullfloat)) {\n textureType = 2;\n }\n else if (supportFullfloat) {\n textureType = 1;\n }\n else {\n textureType = 0;\n }\n this._depthRenderer[camera.id] = new DepthRenderer(this, textureType, camera, storeNonLinearDepth, samplingMode, storeCameraSpaceZ);\n }\n return this._depthRenderer[camera.id];\n};\nScene.prototype.disableDepthRenderer = function (camera) {\n camera = camera || this.activeCamera;\n if (!camera || !this._depthRenderer || !this._depthRenderer[camera.id]) {\n return;\n }\n this._depthRenderer[camera.id].dispose();\n};\n/**\n * Defines the Depth Renderer scene component responsible to manage a depth buffer useful\n * in several rendering techniques.\n */\nexport class DepthRendererSceneComponent {\n /**\n * Creates a new instance of the component for the given scene\n * @param scene Defines the scene to register the component in\n */\n constructor(scene) {\n /**\n * The component name helpful to identify the component in the list of scene components.\n */\n this.name = SceneComponentConstants.NAME_DEPTHRENDERER;\n this.scene = scene;\n }\n /**\n * Registers the component in a given scene\n */\n register() {\n this.scene._gatherRenderTargetsStage.registerStep(SceneComponentConstants.STEP_GATHERRENDERTARGETS_DEPTHRENDERER, this, this._gatherRenderTargets);\n this.scene._gatherActiveCameraRenderTargetsStage.registerStep(SceneComponentConstants.STEP_GATHERACTIVECAMERARENDERTARGETS_DEPTHRENDERER, this, this._gatherActiveCameraRenderTargets);\n }\n /**\n * Rebuilds the elements related to this component in case of\n * context lost for instance.\n */\n rebuild() {\n // Nothing to do for this component\n }\n /**\n * Disposes the component and the associated resources\n */\n dispose() {\n for (const key in this.scene._depthRenderer) {\n this.scene._depthRenderer[key].dispose();\n }\n }\n _gatherRenderTargets(renderTargets) {\n if (this.scene._depthRenderer) {\n for (const key in this.scene._depthRenderer) {\n const depthRenderer = this.scene._depthRenderer[key];\n if (depthRenderer.enabled && !depthRenderer.useOnlyInActiveCamera) {\n renderTargets.push(depthRenderer.getDepthMap());\n }\n }\n }\n }\n _gatherActiveCameraRenderTargets(renderTargets) {\n if (this.scene._depthRenderer) {\n for (const key in this.scene._depthRenderer) {\n const depthRenderer = this.scene._depthRenderer[key];\n if (depthRenderer.enabled && depthRenderer.useOnlyInActiveCamera && this.scene.activeCamera.id === key) {\n renderTargets.push(depthRenderer.getDepthMap());\n }\n }\n }\n }\n}\nDepthRenderer._SceneComponentInitialization = (scene) => {\n // Register the G Buffer component to the scene.\n let component = scene._getComponent(SceneComponentConstants.NAME_DEPTHRENDERER);\n if (!component) {\n component = new DepthRendererSceneComponent(scene);\n scene._addComponent(component);\n }\n};\n//# sourceMappingURL=depthRendererSceneComponent.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nconst name = \"fxaaPixelShader\";\nconst shader = `#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\n#define TEXTUREFUNC(s,c,l) texture2DLodEXT(s,c,l)\n#else\n#define TEXTUREFUNC(s,c,b) texture2D(s,c,b)\n#endif\nuniform sampler2D textureSampler;uniform vec2 texelSize;varying vec2 vUV;varying vec2 sampleCoordS;varying vec2 sampleCoordE;varying vec2 sampleCoordN;varying vec2 sampleCoordW;varying vec2 sampleCoordNW;varying vec2 sampleCoordSE;varying vec2 sampleCoordNE;varying vec2 sampleCoordSW;const float fxaaQualitySubpix=1.0;const float fxaaQualityEdgeThreshold=0.166;const float fxaaQualityEdgeThresholdMin=0.0833;const vec3 kLumaCoefficients=vec3(0.2126,0.7152,0.0722);\n#define FxaaLuma(rgba) dot(rgba.rgb,kLumaCoefficients)\nvoid main(){vec2 posM;posM.x=vUV.x;posM.y=vUV.y;vec4 rgbyM=TEXTUREFUNC(textureSampler,vUV,0.0);float lumaM=FxaaLuma(rgbyM);float lumaS=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordS,0.0));float lumaE=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordE,0.0));float lumaN=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordN,0.0));float lumaW=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordW,0.0));float maxSM=max(lumaS,lumaM);float minSM=min(lumaS,lumaM);float maxESM=max(lumaE,maxSM);float minESM=min(lumaE,minSM);float maxWN=max(lumaN,lumaW);float minWN=min(lumaN,lumaW);float rangeMax=max(maxWN,maxESM);float rangeMin=min(minWN,minESM);float rangeMaxScaled=rangeMax*fxaaQualityEdgeThreshold;float range=rangeMax-rangeMin;float rangeMaxClamped=max(fxaaQualityEdgeThresholdMin,rangeMaxScaled);\n#ifndef MALI\nif(range=edgeVert;float subpixA=subpixNSWE*2.0+subpixNWSWNESE;if (!horzSpan)\n{lumaN=lumaW;}\nif (!horzSpan) \n{lumaS=lumaE;}\nif (horzSpan) \n{lengthSign=texelSize.y;}\nfloat subpixB=(subpixA*(1.0/12.0))-lumaM;float gradientN=lumaN-lumaM;float gradientS=lumaS-lumaM;float lumaNN=lumaN+lumaM;float lumaSS=lumaS+lumaM;bool pairN=abs(gradientN)>=abs(gradientS);float gradient=max(abs(gradientN),abs(gradientS));if (pairN)\n{lengthSign=-lengthSign;}\nfloat subpixC=clamp(abs(subpixB)*subpixRcpRange,0.0,1.0);vec2 posB;posB.x=posM.x;posB.y=posM.y;vec2 offNP;offNP.x=(!horzSpan) ? 0.0 : texelSize.x;offNP.y=(horzSpan) ? 0.0 : texelSize.y;if (!horzSpan) \n{posB.x+=lengthSign*0.5;}\nif (horzSpan)\n{posB.y+=lengthSign*0.5;}\nvec2 posN;posN.x=posB.x-offNP.x*1.5;posN.y=posB.y-offNP.y*1.5;vec2 posP;posP.x=posB.x+offNP.x*1.5;posP.y=posB.y+offNP.y*1.5;float subpixD=((-2.0)*subpixC)+3.0;float lumaEndN=FxaaLuma(TEXTUREFUNC(textureSampler,posN,0.0));float subpixE=subpixC*subpixC;float lumaEndP=FxaaLuma(TEXTUREFUNC(textureSampler,posP,0.0));if (!pairN) \n{lumaNN=lumaSS;}\nfloat gradientScaled=gradient*1.0/4.0;float lumaMM=lumaM-lumaNN*0.5;float subpixF=subpixD*subpixE;bool lumaMLTZero=lumaMM<0.0;lumaEndN-=lumaNN*0.5;lumaEndP-=lumaNN*0.5;bool doneN=abs(lumaEndN)>=gradientScaled;bool doneP=abs(lumaEndP)>=gradientScaled;if (!doneN) \n{posN.x-=offNP.x*3.0;}\nif (!doneN) \n{posN.y-=offNP.y*3.0;}\nbool doneNP=(!doneN) || (!doneP);if (!doneP) \n{posP.x+=offNP.x*3.0;}\nif (!doneP)\n{posP.y+=offNP.y*3.0;}\nif (doneNP)\n{if (!doneN) lumaEndN=FxaaLuma(TEXTUREFUNC(textureSampler,posN.xy,0.0));if (!doneP) lumaEndP=FxaaLuma(TEXTUREFUNC(textureSampler,posP.xy,0.0));if (!doneN) lumaEndN=lumaEndN-lumaNN*0.5;if (!doneP) lumaEndP=lumaEndP-lumaNN*0.5;doneN=abs(lumaEndN)>=gradientScaled;doneP=abs(lumaEndP)>=gradientScaled;if (!doneN) posN.x-=offNP.x*12.0;if (!doneN) posN.y-=offNP.y*12.0;doneNP=(!doneN) || (!doneP);if (!doneP) posP.x+=offNP.x*12.0;if (!doneP) posP.y+=offNP.y*12.0;}\nfloat dstN=posM.x-posN.x;float dstP=posP.x-posM.x;if (!horzSpan)\n{dstN=posM.y-posN.y;}\nif (!horzSpan) \n{dstP=posP.y-posM.y;}\nbool goodSpanN=(lumaEndN<0.0) != lumaMLTZero;float spanLength=(dstP+dstN);bool goodSpanP=(lumaEndP<0.0) != lumaMLTZero;float spanLengthRcp=1.0/spanLength;bool directionN=dstN {\n const texelSize = this.texelSize;\n effect.setFloat2(\"texelSize\", texelSize.x, texelSize.y);\n });\n }\n _getDefines() {\n const engine = this.getEngine();\n if (!engine) {\n return null;\n }\n const glInfo = engine.getGlInfo();\n if (glInfo && glInfo.renderer && glInfo.renderer.toLowerCase().indexOf(\"mali\") > -1) {\n return \"#define MALI 1\\n\";\n }\n return null;\n }\n /**\n * @internal\n */\n static _Parse(parsedPostProcess, targetCamera, scene, rootUrl) {\n return SerializationHelper.Parse(() => {\n return new FxaaPostProcess(parsedPostProcess.name, parsedPostProcess.options, targetCamera, parsedPostProcess.renderTargetSamplingMode, scene.getEngine(), parsedPostProcess.reusable);\n }, parsedPostProcess, scene, rootUrl);\n }\n}\nRegisterClass(\"BABYLON.FxaaPostProcess\", FxaaPostProcess);\n//# sourceMappingURL=fxaaPostProcess.js.map","import { Texture } from \"../Materials/Textures/texture.js\";\nimport { RenderTargetTexture } from \"../Materials/Textures/renderTargetTexture.js\";\nimport { FxaaPostProcess } from \"../PostProcesses/fxaaPostProcess.js\";\n\nimport { Logger } from \"./logger.js\";\nimport { Tools } from \"./tools.js\";\nimport { DumpTools } from \"./dumpTools.js\";\nimport { ApplyPostProcess } from \"./textureTools.js\";\nlet screenshotCanvas = null;\n/**\n * Captures a screenshot of the current rendering\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine defines the rendering engine\n * @param camera defines the source camera\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height. If a single number is passed,\n * it will be used for both width and height. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param successCallback defines the callback receives a single parameter which contains the\n * screenshot as a string of base64-encoded characters. This string can be assigned to the\n * src parameter of an to display it\n * @param mimeType defines the MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param forceDownload force the system to download the image even if a successCallback is provided\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\nexport function CreateScreenshot(engine, camera, size, successCallback, mimeType = \"image/png\", forceDownload = false, quality) {\n const { height, width } = _GetScreenshotSize(engine, camera, size);\n if (!(height && width)) {\n Logger.Error(\"Invalid 'size' parameter !\");\n return;\n }\n if (!screenshotCanvas) {\n screenshotCanvas = document.createElement(\"canvas\");\n }\n screenshotCanvas.width = width;\n screenshotCanvas.height = height;\n const renderContext = screenshotCanvas.getContext(\"2d\");\n const ratio = engine.getRenderWidth() / engine.getRenderHeight();\n let newWidth = width;\n let newHeight = newWidth / ratio;\n if (newHeight > height) {\n newHeight = height;\n newWidth = newHeight * ratio;\n }\n const offsetX = Math.max(0, width - newWidth) / 2;\n const offsetY = Math.max(0, height - newHeight) / 2;\n const scene = camera.getScene();\n if (scene.activeCamera !== camera) {\n CreateScreenshotUsingRenderTarget(engine, camera, size, (data) => {\n if (forceDownload) {\n const blob = new Blob([data]);\n Tools.DownloadBlob(blob);\n if (successCallback) {\n successCallback(\"\");\n }\n }\n else if (successCallback) {\n successCallback(data);\n }\n }, mimeType, 1.0, engine.getCreationOptions().antialias, undefined, undefined, undefined, undefined, quality);\n }\n else {\n engine.onEndFrameObservable.addOnce(() => {\n const renderingCanvas = engine.getRenderingCanvas();\n if (renderContext && renderingCanvas) {\n renderContext.drawImage(renderingCanvas, offsetX, offsetY, newWidth, newHeight);\n }\n if (screenshotCanvas) {\n if (forceDownload) {\n Tools.EncodeScreenshotCanvasData(screenshotCanvas, undefined, mimeType, undefined, quality);\n if (successCallback) {\n successCallback(\"\");\n }\n }\n else {\n Tools.EncodeScreenshotCanvasData(screenshotCanvas, successCallback, mimeType, undefined, quality);\n }\n }\n });\n }\n}\n/**\n * Captures a screenshot of the current rendering\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine defines the rendering engine\n * @param camera defines the source camera\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height. If a single number is passed,\n * it will be used for both width and height. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param mimeType defines the MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns screenshot as a string of base64-encoded characters. This string can be assigned\n * to the src parameter of an to display it\n */\nexport function CreateScreenshotAsync(engine, camera, size, mimeType = \"image/png\", quality) {\n return new Promise((resolve, reject) => {\n CreateScreenshot(engine, camera, size, (data) => {\n if (typeof data !== \"undefined\") {\n resolve(data);\n }\n else {\n reject(new Error(\"Data is undefined\"));\n }\n }, mimeType, undefined, quality);\n });\n}\n/**\n * Captures a screenshot of the current rendering for a specific size. This will render the entire canvas but will generate a blink (due to canvas resize)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine defines the rendering engine\n * @param camera defines the source camera\n * @param width defines the expected width\n * @param height defines the expected height\n * @param mimeType defines the MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns screenshot as a string of base64-encoded characters. This string can be assigned\n * to the src parameter of an to display it\n */\nexport function CreateScreenshotWithResizeAsync(engine, camera, width, height, mimeType = \"image/png\", quality) {\n return new Promise((resolve) => {\n CreateScreenshot(engine, camera, { width: width, height: height }, () => {\n resolve();\n }, mimeType, true, quality);\n });\n}\n/**\n * Generates an image screenshot from the specified camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine The engine to use for rendering\n * @param camera The camera to use for rendering\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height, finalWidth, finalHeight. If a single number is passed,\n * it will be used for both width and height, as well as finalWidth, finalHeight. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param successCallback The callback receives a single parameter which contains the\n * screenshot as a string of base64-encoded characters. This string can be assigned to the\n * src parameter of an to display it\n * @param mimeType The MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param samples Texture samples (default: 1)\n * @param antialiasing Whether antialiasing should be turned on or not (default: false)\n * @param fileName A name for for the downloaded file.\n * @param renderSprites Whether the sprites should be rendered or not (default: false)\n * @param enableStencilBuffer Whether the stencil buffer should be enabled or not (default: false)\n * @param useLayerMask if the camera's layer mask should be used to filter what should be rendered (default: true)\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @param customizeTexture An optional callback that can be used to modify the render target texture before taking the screenshot. This can be used, for instance, to enable camera post-processes before taking the screenshot.\n */\nexport function CreateScreenshotUsingRenderTarget(engine, camera, size, successCallback, mimeType = \"image/png\", samples = 1, antialiasing = false, fileName, renderSprites = false, enableStencilBuffer = false, useLayerMask = true, quality, customizeTexture) {\n const { height, width, finalWidth, finalHeight } = _GetScreenshotSize(engine, camera, size);\n const targetTextureSize = { width, height };\n if (!(height && width)) {\n Logger.Error(\"Invalid 'size' parameter !\");\n return;\n }\n const originalSize = { width: engine.getRenderWidth(), height: engine.getRenderHeight() };\n engine.setSize(width, height); // we need this call to trigger onResizeObservable with the screenshot width/height on all the subsystems that are observing this event and that needs to (re)create some resources with the right dimensions\n const scene = camera.getScene();\n // At this point size can be a number, or an object (according to engine.prototype.createRenderTargetTexture method)\n const texture = new RenderTargetTexture(\"screenShot\", targetTextureSize, scene, false, false, 0, false, Texture.BILINEAR_SAMPLINGMODE, undefined, enableStencilBuffer, undefined, undefined, undefined, samples);\n texture.renderList = scene.meshes.slice();\n texture.samples = samples;\n texture.renderSprites = renderSprites;\n texture.activeCamera = camera;\n texture.forceLayerMaskCheck = useLayerMask;\n customizeTexture === null || customizeTexture === void 0 ? void 0 : customizeTexture(texture);\n const renderWhenReady = () => {\n if (texture.isReadyForRendering() && camera.isReady(true)) {\n engine.onEndFrameObservable.addOnce(() => {\n if (finalWidth === width && finalHeight === height) {\n texture.readPixels(undefined, undefined, undefined, false).then((data) => {\n DumpTools.DumpData(width, height, data, successCallback, mimeType, fileName, true, undefined, quality);\n texture.dispose();\n });\n }\n else {\n ApplyPostProcess(\"pass\", texture.getInternalTexture(), scene, undefined, undefined, undefined, finalWidth, finalHeight).then((texture) => {\n engine._readTexturePixels(texture, finalWidth, finalHeight, -1, 0, null, true, false, 0, 0).then((data) => {\n DumpTools.DumpData(finalWidth, finalHeight, data, successCallback, mimeType, fileName, true, undefined, quality);\n texture.dispose();\n });\n });\n }\n });\n texture.render(true);\n // re-render the scene after the camera has been reset to the original camera to avoid a flicker that could occur\n // if the camera used for the RTT rendering stays in effect for the next frame (and if that camera was different from the original camera)\n scene.incrementRenderId();\n scene.resetCachedMaterial();\n engine.setSize(originalSize.width, originalSize.height);\n camera.getProjectionMatrix(true); // Force cache refresh;\n scene.render();\n }\n else {\n setTimeout(renderWhenReady, 16);\n }\n };\n const renderToTexture = () => {\n // render the RTT\n scene.incrementRenderId();\n scene.resetCachedMaterial();\n renderWhenReady();\n };\n if (antialiasing) {\n const fxaaPostProcess = new FxaaPostProcess(\"antialiasing\", 1.0, scene.activeCamera);\n texture.addPostProcess(fxaaPostProcess);\n // Async Shader Compilation can lead to none ready effects in synchronous code\n if (!fxaaPostProcess.getEffect().isReady()) {\n fxaaPostProcess.getEffect().onCompiled = () => {\n renderToTexture();\n };\n }\n // The effect is ready we can render\n else {\n renderToTexture();\n }\n }\n else {\n // No need to wait for extra resources to be ready\n renderToTexture();\n }\n}\n/**\n * Generates an image screenshot from the specified camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine The engine to use for rendering\n * @param camera The camera to use for rendering\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height. If a single number is passed,\n * it will be used for both width and height. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param mimeType The MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param samples Texture samples (default: 1)\n * @param antialiasing Whether antialiasing should be turned on or not (default: false)\n * @param fileName A name for for the downloaded file.\n * @param renderSprites Whether the sprites should be rendered or not (default: false)\n * @param enableStencilBuffer Whether the stencil buffer should be enabled or not (default: false)\n * @param useLayerMask if the camera's layer mask should be used to filter what should be rendered (default: true)\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns screenshot as a string of base64-encoded characters. This string can be assigned\n * to the src parameter of an to display it\n */\nexport function CreateScreenshotUsingRenderTargetAsync(engine, camera, size, mimeType = \"image/png\", samples = 1, antialiasing = false, fileName, renderSprites = false, enableStencilBuffer = false, useLayerMask = true, quality) {\n return new Promise((resolve, reject) => {\n CreateScreenshotUsingRenderTarget(engine, camera, size, (data) => {\n if (typeof data !== \"undefined\") {\n resolve(data);\n }\n else {\n reject(new Error(\"Data is undefined\"));\n }\n }, mimeType, samples, antialiasing, fileName, renderSprites, enableStencilBuffer, useLayerMask, quality);\n });\n}\n/**\n * Gets height and width for screenshot size\n * @param engine\n * @param camera\n * @param size\n * @private\n */\nfunction _GetScreenshotSize(engine, camera, size) {\n let height = 0;\n let width = 0;\n let finalWidth = 0;\n let finalHeight = 0;\n //If a size value defined as object\n if (typeof size === \"object\") {\n const precision = size.precision\n ? Math.abs(size.precision) // prevent GL_INVALID_VALUE : glViewport: negative width/height\n : 1;\n //If a width and height values is specified\n if (size.width && size.height) {\n height = size.height * precision;\n width = size.width * precision;\n }\n //If passing only width, computing height to keep display canvas ratio.\n else if (size.width && !size.height) {\n width = size.width * precision;\n height = Math.round(width / engine.getAspectRatio(camera));\n }\n //If passing only height, computing width to keep display canvas ratio.\n else if (size.height && !size.width) {\n height = size.height * precision;\n width = Math.round(height * engine.getAspectRatio(camera));\n }\n else {\n width = Math.round(engine.getRenderWidth() * precision);\n height = Math.round(width / engine.getAspectRatio(camera));\n }\n //If a finalWidth and finalHeight values is specified\n if (size.finalWidth && size.finalHeight) {\n finalHeight = size.finalHeight;\n finalWidth = size.finalWidth;\n }\n //If passing only finalWidth, computing finalHeight to keep display canvas ratio.\n else if (size.finalWidth && !size.finalHeight) {\n finalWidth = size.finalWidth;\n finalHeight = Math.round(finalWidth / engine.getAspectRatio(camera));\n }\n //If passing only finalHeight, computing finalWidth to keep display canvas ratio.\n else if (size.finalHeight && !size.finalWidth) {\n finalHeight = size.finalHeight;\n finalWidth = Math.round(finalHeight * engine.getAspectRatio(camera));\n }\n else {\n finalWidth = width;\n finalHeight = height;\n }\n }\n //Assuming here that \"size\" parameter is a number\n else if (!isNaN(size)) {\n height = size;\n width = size;\n finalWidth = size;\n finalHeight = size;\n }\n // When creating the image data from the CanvasRenderingContext2D, the width and height is clamped to the size of the _gl context\n // On certain GPUs, it seems as if the _gl context truncates to an integer automatically. Therefore, if a user tries to pass the width of their canvas element\n // and it happens to be a float (1000.5 x 600.5 px), the engine.readPixels will return a different size array than context.createImageData\n // to resolve this, we truncate the floats here to ensure the same size\n if (width) {\n width = Math.floor(width);\n }\n if (height) {\n height = Math.floor(height);\n }\n if (finalWidth) {\n finalWidth = Math.floor(finalWidth);\n }\n if (finalHeight) {\n finalHeight = Math.floor(finalHeight);\n }\n return { height: height | 0, width: width | 0, finalWidth: finalWidth | 0, finalHeight: finalHeight | 0 };\n}\n/**\n * Class containing a set of static utilities functions for screenshots\n */\nexport const ScreenshotTools = {\n /**\n * Captures a screenshot of the current rendering\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine defines the rendering engine\n * @param camera defines the source camera\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height. If a single number is passed,\n * it will be used for both width and height. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param successCallback defines the callback receives a single parameter which contains the\n * screenshot as a string of base64-encoded characters. This string can be assigned to the\n * src parameter of an to display it\n * @param mimeType defines the MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param forceDownload force the system to download the image even if a successCallback is provided\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\n CreateScreenshot,\n /**\n * Captures a screenshot of the current rendering\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine defines the rendering engine\n * @param camera defines the source camera\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height. If a single number is passed,\n * it will be used for both width and height. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param mimeType defines the MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns screenshot as a string of base64-encoded characters. This string can be assigned\n * to the src parameter of an to display it\n */\n CreateScreenshotAsync,\n /**\n * Captures a screenshot of the current rendering for a specific size. This will render the entire canvas but will generate a blink (due to canvas resize)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine defines the rendering engine\n * @param camera defines the source camera\n * @param width defines the expected width\n * @param height defines the expected height\n * @param mimeType defines the MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns screenshot as a string of base64-encoded characters. This string can be assigned\n * to the src parameter of an to display it\n */\n CreateScreenshotWithResizeAsync,\n /**\n * Generates an image screenshot from the specified camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine The engine to use for rendering\n * @param camera The camera to use for rendering\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height. If a single number is passed,\n * it will be used for both width and height. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param successCallback The callback receives a single parameter which contains the\n * screenshot as a string of base64-encoded characters. This string can be assigned to the\n * src parameter of an to display it\n * @param mimeType The MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param samples Texture samples (default: 1)\n * @param antialiasing Whether antialiasing should be turned on or not (default: false)\n * @param fileName A name for for the downloaded file.\n * @param renderSprites Whether the sprites should be rendered or not (default: false)\n * @param enableStencilBuffer Whether the stencil buffer should be enabled or not (default: false)\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\n CreateScreenshotUsingRenderTarget,\n /**\n * Generates an image screenshot from the specified camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/renderToPNG\n * @param engine The engine to use for rendering\n * @param camera The camera to use for rendering\n * @param size This parameter can be set to a single number or to an object with the\n * following (optional) properties: precision, width, height. If a single number is passed,\n * it will be used for both width and height. If an object is passed, the screenshot size\n * will be derived from the parameters. The precision property is a multiplier allowing\n * rendering at a higher or lower resolution\n * @param mimeType The MIME type of the screenshot image (default: image/png).\n * Check your browser for supported MIME types\n * @param samples Texture samples (default: 1)\n * @param antialiasing Whether antialiasing should be turned on or not (default: false)\n * @param fileName A name for for the downloaded file.\n * @param renderSprites Whether the sprites should be rendered or not (default: false)\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns screenshot as a string of base64-encoded characters. This string can be assigned\n * to the src parameter of an to display it\n */\n CreateScreenshotUsingRenderTargetAsync,\n};\n/**\n * This will be executed automatically for UMD and es5.\n * If esm dev wants the side effects to execute they will have to run it manually\n * Once we build native modules those need to be exported.\n * @internal\n */\nconst initSideEffects = () => {\n // References the dependencies.\n Tools.CreateScreenshot = CreateScreenshot;\n Tools.CreateScreenshotAsync = CreateScreenshotAsync;\n Tools.CreateScreenshotUsingRenderTarget = CreateScreenshotUsingRenderTarget;\n Tools.CreateScreenshotUsingRenderTargetAsync = CreateScreenshotUsingRenderTargetAsync;\n};\ninitSideEffects();\n//# sourceMappingURL=screenshotTools.js.map","import { ThinEngine } from \"../../Engines/thinEngine.js\";\nimport { InternalTexture, InternalTextureSource } from \"../../Materials/Textures/internalTexture.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nimport { LoadImage } from \"../../Misc/fileTools.js\";\nimport { RandomGUID } from \"../../Misc/guid.js\";\n\nThinEngine.prototype._createDepthStencilCubeTexture = function (size, options, rtWrapper) {\n const internalTexture = new InternalTexture(this, InternalTextureSource.DepthStencil);\n internalTexture.isCube = true;\n if (this.webGLVersion === 1) {\n Logger.Error(\"Depth cube texture is not supported by WebGL 1.\");\n return internalTexture;\n }\n const internalOptions = Object.assign({ bilinearFiltering: false, comparisonFunction: 0, generateStencil: false }, options);\n const gl = this._gl;\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, internalTexture, true);\n this._setupDepthStencilTexture(internalTexture, size, internalOptions.generateStencil, internalOptions.bilinearFiltering, internalOptions.comparisonFunction);\n rtWrapper._depthStencilTexture = internalTexture;\n rtWrapper._depthStencilTextureWithStencil = internalOptions.generateStencil;\n // Create the depth/stencil buffer\n for (let face = 0; face < 6; face++) {\n if (internalOptions.generateStencil) {\n gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + face, 0, gl.DEPTH24_STENCIL8, size, size, 0, gl.DEPTH_STENCIL, gl.UNSIGNED_INT_24_8, null);\n }\n else {\n gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + face, 0, gl.DEPTH_COMPONENT24, size, size, 0, gl.DEPTH_COMPONENT, gl.UNSIGNED_INT, null);\n }\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\n this._internalTexturesCache.push(internalTexture);\n return internalTexture;\n};\nThinEngine.prototype._partialLoadFile = function (url, index, loadedFiles, onfinish, onErrorCallBack = null) {\n const onload = (data) => {\n loadedFiles[index] = data;\n loadedFiles._internalCount++;\n if (loadedFiles._internalCount === 6) {\n onfinish(loadedFiles);\n }\n };\n const onerror = (request, exception) => {\n if (onErrorCallBack && request) {\n onErrorCallBack(request.status + \" \" + request.statusText, exception);\n }\n };\n this._loadFile(url, onload, undefined, undefined, true, onerror);\n};\nThinEngine.prototype._cascadeLoadFiles = function (scene, onfinish, files, onError = null) {\n const loadedFiles = [];\n loadedFiles._internalCount = 0;\n for (let index = 0; index < 6; index++) {\n this._partialLoadFile(files[index], index, loadedFiles, onfinish, onError);\n }\n};\nThinEngine.prototype._cascadeLoadImgs = function (scene, texture, onfinish, files, onError = null, mimeType) {\n const loadedImages = [];\n loadedImages._internalCount = 0;\n for (let index = 0; index < 6; index++) {\n this._partialLoadImg(files[index], index, loadedImages, scene, texture, onfinish, onError, mimeType);\n }\n};\nThinEngine.prototype._partialLoadImg = function (url, index, loadedImages, scene, texture, onfinish, onErrorCallBack = null, mimeType) {\n const tokenPendingData = RandomGUID();\n const onload = (img) => {\n loadedImages[index] = img;\n loadedImages._internalCount++;\n if (scene) {\n scene.removePendingData(tokenPendingData);\n }\n if (loadedImages._internalCount === 6 && onfinish) {\n onfinish(texture, loadedImages);\n }\n };\n const onerror = (message, exception) => {\n if (scene) {\n scene.removePendingData(tokenPendingData);\n }\n if (onErrorCallBack) {\n onErrorCallBack(message, exception);\n }\n };\n LoadImage(url, onload, onerror, scene ? scene.offlineProvider : null, mimeType);\n if (scene) {\n scene.addPendingData(tokenPendingData);\n }\n};\nThinEngine.prototype._setCubeMapTextureParams = function (texture, loadMipmap, maxLevel) {\n const gl = this._gl;\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, loadMipmap ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n texture.samplingMode = loadMipmap ? 3 : 2;\n if (loadMipmap && this.getCaps().textureMaxLevel && maxLevel !== undefined && maxLevel > 0) {\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAX_LEVEL, maxLevel);\n texture._maxLodLevel = maxLevel;\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\n};\nThinEngine.prototype.createCubeTextureBase = function (rootUrl, scene, files, noMipmap, onLoad = null, onError = null, format, forcedExtension = null, createPolynomials = false, lodScale = 0, lodOffset = 0, fallback = null, beforeLoadCubeDataCallback = null, imageHandler = null, useSRGBBuffer = false) {\n const texture = fallback ? fallback : new InternalTexture(this, InternalTextureSource.Cube);\n texture.isCube = true;\n texture.url = rootUrl;\n texture.generateMipMaps = !noMipmap;\n texture._lodGenerationScale = lodScale;\n texture._lodGenerationOffset = lodOffset;\n texture._useSRGBBuffer = !!useSRGBBuffer && this._caps.supportSRGBBuffers && (this.webGLVersion > 1 || this.isWebGPU || !!noMipmap);\n if (texture !== fallback) {\n texture.label = rootUrl.substring(0, 60); // default label, can be overriden by the caller\n }\n if (!this._doNotHandleContextLost) {\n texture._extension = forcedExtension;\n texture._files = files;\n }\n const originalRootUrl = rootUrl;\n if (this._transformTextureUrl && !fallback) {\n rootUrl = this._transformTextureUrl(rootUrl);\n }\n const rootUrlWithoutUriParams = rootUrl.split(\"?\")[0];\n const lastDot = rootUrlWithoutUriParams.lastIndexOf(\".\");\n const extension = forcedExtension ? forcedExtension : lastDot > -1 ? rootUrlWithoutUriParams.substring(lastDot).toLowerCase() : \"\";\n let loader = null;\n for (const availableLoader of ThinEngine._TextureLoaders) {\n if (availableLoader.canLoad(extension)) {\n loader = availableLoader;\n break;\n }\n }\n const onInternalError = (request, exception) => {\n if (rootUrl === originalRootUrl) {\n if (onError && request) {\n onError(request.status + \" \" + request.statusText, exception);\n }\n }\n else {\n // fall back to the original url if the transformed url fails to load\n Logger.Warn(`Failed to load ${rootUrl}, falling back to the ${originalRootUrl}`);\n this.createCubeTextureBase(originalRootUrl, scene, files, !!noMipmap, onLoad, onError, format, forcedExtension, createPolynomials, lodScale, lodOffset, texture, beforeLoadCubeDataCallback, imageHandler, useSRGBBuffer);\n }\n };\n if (loader) {\n const onloaddata = (data) => {\n if (beforeLoadCubeDataCallback) {\n beforeLoadCubeDataCallback(texture, data);\n }\n loader.loadCubeData(data, texture, createPolynomials, onLoad, onError);\n };\n if (files && files.length === 6) {\n if (loader.supportCascades) {\n this._cascadeLoadFiles(scene, (images) => onloaddata(images.map((image) => new Uint8Array(image))), files, onError);\n }\n else {\n if (onError) {\n onError(\"Textures type does not support cascades.\");\n }\n else {\n Logger.Warn(\"Texture loader does not support cascades.\");\n }\n }\n }\n else {\n this._loadFile(rootUrl, (data) => onloaddata(new Uint8Array(data)), undefined, undefined, true, onInternalError);\n }\n }\n else {\n if (!files) {\n throw new Error(\"Cannot load cubemap because files were not defined\");\n }\n this._cascadeLoadImgs(scene, texture, (texture, imgs) => {\n if (imageHandler) {\n imageHandler(texture, imgs);\n }\n }, files, onError);\n }\n this._internalTexturesCache.push(texture);\n return texture;\n};\nThinEngine.prototype.createCubeTexture = function (rootUrl, scene, files, noMipmap, onLoad = null, onError = null, format, forcedExtension = null, createPolynomials = false, lodScale = 0, lodOffset = 0, fallback = null, loaderOptions, useSRGBBuffer = false) {\n const gl = this._gl;\n return this.createCubeTextureBase(rootUrl, scene, files, !!noMipmap, onLoad, onError, format, forcedExtension, createPolynomials, lodScale, lodOffset, fallback, (texture) => this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true), (texture, imgs) => {\n const width = this.needPOTTextures ? ThinEngine.GetExponentOfTwo(imgs[0].width, this._caps.maxCubemapTextureSize) : imgs[0].width;\n const height = width;\n const faces = [\n gl.TEXTURE_CUBE_MAP_POSITIVE_X,\n gl.TEXTURE_CUBE_MAP_POSITIVE_Y,\n gl.TEXTURE_CUBE_MAP_POSITIVE_Z,\n gl.TEXTURE_CUBE_MAP_NEGATIVE_X,\n gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,\n gl.TEXTURE_CUBE_MAP_NEGATIVE_Z,\n ];\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n this._unpackFlipY(false);\n const internalFormat = format ? this._getInternalFormat(format, texture._useSRGBBuffer) : texture._useSRGBBuffer ? this._glSRGBExtensionValues.SRGB8_ALPHA8 : gl.RGBA;\n let texelFormat = format ? this._getInternalFormat(format) : gl.RGBA;\n if (texture._useSRGBBuffer && this.webGLVersion === 1) {\n texelFormat = internalFormat;\n }\n for (let index = 0; index < faces.length; index++) {\n if (imgs[index].width !== width || imgs[index].height !== height) {\n this._prepareWorkingCanvas();\n if (!this._workingCanvas || !this._workingContext) {\n Logger.Warn(\"Cannot create canvas to resize texture.\");\n return;\n }\n this._workingCanvas.width = width;\n this._workingCanvas.height = height;\n this._workingContext.drawImage(imgs[index], 0, 0, imgs[index].width, imgs[index].height, 0, 0, width, height);\n gl.texImage2D(faces[index], 0, internalFormat, texelFormat, gl.UNSIGNED_BYTE, this._workingCanvas);\n }\n else {\n gl.texImage2D(faces[index], 0, internalFormat, texelFormat, gl.UNSIGNED_BYTE, imgs[index]);\n }\n }\n if (!noMipmap) {\n gl.generateMipmap(gl.TEXTURE_CUBE_MAP);\n }\n this._setCubeMapTextureParams(texture, !noMipmap);\n texture.width = width;\n texture.height = height;\n texture.isReady = true;\n if (format) {\n texture.format = format;\n }\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n if (onLoad) {\n onLoad();\n }\n }, !!useSRGBBuffer);\n};\n//# sourceMappingURL=engine.cubeTexture.js.map","/* eslint-disable @typescript-eslint/naming-convention */\nimport { Scalar } from \"../Maths/math.scalar.js\";\nimport { SphericalPolynomial } from \"../Maths/sphericalPolynomial.js\";\n\nimport { InternalTexture, InternalTextureSource } from \"../Materials/Textures/internalTexture.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { CubeMapToSphericalPolynomialTools } from \"../Misc/HighDynamicRange/cubemapToSphericalPolynomial.js\";\nimport { BaseTexture } from \"../Materials/Textures/baseTexture.js\";\nimport { ThinEngine } from \"../Engines/thinEngine.js\";\nimport { FromHalfFloat, ToHalfFloat } from \"./textureTools.js\";\nimport \"../Engines/Extensions/engine.cubeTexture.js\";\n// Based on demo done by Brandon Jones - http://media.tojicode.com/webgl-samples/dds.html\n// All values and structures referenced from:\n// http://msdn.microsoft.com/en-us/library/bb943991.aspx/\nconst DDS_MAGIC = 0x20534444;\nconst //DDSD_CAPS = 0x1,\n//DDSD_HEIGHT = 0x2,\n//DDSD_WIDTH = 0x4,\n//DDSD_PITCH = 0x8,\n//DDSD_PIXELFORMAT = 0x1000,\nDDSD_MIPMAPCOUNT = 0x20000;\n//DDSD_LINEARSIZE = 0x80000,\n//DDSD_DEPTH = 0x800000;\n// var DDSCAPS_COMPLEX = 0x8,\n// DDSCAPS_MIPMAP = 0x400000,\n// DDSCAPS_TEXTURE = 0x1000;\nconst DDSCAPS2_CUBEMAP = 0x200;\n// DDSCAPS2_CUBEMAP_POSITIVEX = 0x400,\n// DDSCAPS2_CUBEMAP_NEGATIVEX = 0x800,\n// DDSCAPS2_CUBEMAP_POSITIVEY = 0x1000,\n// DDSCAPS2_CUBEMAP_NEGATIVEY = 0x2000,\n// DDSCAPS2_CUBEMAP_POSITIVEZ = 0x4000,\n// DDSCAPS2_CUBEMAP_NEGATIVEZ = 0x8000,\n// DDSCAPS2_VOLUME = 0x200000;\nconst //DDPF_ALPHAPIXELS = 0x1,\n//DDPF_ALPHA = 0x2,\nDDPF_FOURCC = 0x4, DDPF_RGB = 0x40, \n//DDPF_YUV = 0x200,\nDDPF_LUMINANCE = 0x20000;\nfunction FourCCToInt32(value) {\n return value.charCodeAt(0) + (value.charCodeAt(1) << 8) + (value.charCodeAt(2) << 16) + (value.charCodeAt(3) << 24);\n}\nfunction Int32ToFourCC(value) {\n return String.fromCharCode(value & 0xff, (value >> 8) & 0xff, (value >> 16) & 0xff, (value >> 24) & 0xff);\n}\nconst FOURCC_DXT1 = FourCCToInt32(\"DXT1\");\nconst FOURCC_DXT3 = FourCCToInt32(\"DXT3\");\nconst FOURCC_DXT5 = FourCCToInt32(\"DXT5\");\nconst FOURCC_DX10 = FourCCToInt32(\"DX10\");\nconst FOURCC_D3DFMT_R16G16B16A16F = 113;\nconst FOURCC_D3DFMT_R32G32B32A32F = 116;\nconst DXGI_FORMAT_R32G32B32A32_FLOAT = 2;\nconst DXGI_FORMAT_R16G16B16A16_FLOAT = 10;\nconst DXGI_FORMAT_B8G8R8X8_UNORM = 88;\nconst headerLengthInt = 31; // The header length in 32 bit ints\n// Offsets into the header array\nconst off_magic = 0;\nconst off_size = 1;\nconst off_flags = 2;\nconst off_height = 3;\nconst off_width = 4;\nconst off_mipmapCount = 7;\nconst off_pfFlags = 20;\nconst off_pfFourCC = 21;\nconst off_RGBbpp = 22;\nconst off_RMask = 23;\nconst off_GMask = 24;\nconst off_BMask = 25;\nconst off_AMask = 26;\n// var off_caps1 = 27;\nconst off_caps2 = 28;\n// var off_caps3 = 29;\n// var off_caps4 = 30;\nconst off_dxgiFormat = 32;\n/**\n * Class used to provide DDS decompression tools\n */\nexport class DDSTools {\n /**\n * Gets DDS information from an array buffer\n * @param data defines the array buffer view to read data from\n * @returns the DDS information\n */\n static GetDDSInfo(data) {\n const header = new Int32Array(data.buffer, data.byteOffset, headerLengthInt);\n const extendedHeader = new Int32Array(data.buffer, data.byteOffset, headerLengthInt + 4);\n let mipmapCount = 1;\n if (header[off_flags] & DDSD_MIPMAPCOUNT) {\n mipmapCount = Math.max(1, header[off_mipmapCount]);\n }\n const fourCC = header[off_pfFourCC];\n const dxgiFormat = fourCC === FOURCC_DX10 ? extendedHeader[off_dxgiFormat] : 0;\n let textureType = 0;\n switch (fourCC) {\n case FOURCC_D3DFMT_R16G16B16A16F:\n textureType = 2;\n break;\n case FOURCC_D3DFMT_R32G32B32A32F:\n textureType = 1;\n break;\n case FOURCC_DX10:\n if (dxgiFormat === DXGI_FORMAT_R16G16B16A16_FLOAT) {\n textureType = 2;\n break;\n }\n if (dxgiFormat === DXGI_FORMAT_R32G32B32A32_FLOAT) {\n textureType = 1;\n break;\n }\n }\n return {\n width: header[off_width],\n height: header[off_height],\n mipmapCount: mipmapCount,\n isFourCC: (header[off_pfFlags] & DDPF_FOURCC) === DDPF_FOURCC,\n isRGB: (header[off_pfFlags] & DDPF_RGB) === DDPF_RGB,\n isLuminance: (header[off_pfFlags] & DDPF_LUMINANCE) === DDPF_LUMINANCE,\n isCube: (header[off_caps2] & DDSCAPS2_CUBEMAP) === DDSCAPS2_CUBEMAP,\n isCompressed: fourCC === FOURCC_DXT1 || fourCC === FOURCC_DXT3 || fourCC === FOURCC_DXT5,\n dxgiFormat: dxgiFormat,\n textureType: textureType,\n };\n }\n static _GetHalfFloatAsFloatRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, lod) {\n const destArray = new Float32Array(dataLength);\n const srcData = new Uint16Array(arrayBuffer, dataOffset);\n let index = 0;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const srcPos = (x + y * width) * 4;\n destArray[index] = FromHalfFloat(srcData[srcPos]);\n destArray[index + 1] = FromHalfFloat(srcData[srcPos + 1]);\n destArray[index + 2] = FromHalfFloat(srcData[srcPos + 2]);\n if (DDSTools.StoreLODInAlphaChannel) {\n destArray[index + 3] = lod;\n }\n else {\n destArray[index + 3] = FromHalfFloat(srcData[srcPos + 3]);\n }\n index += 4;\n }\n }\n return destArray;\n }\n static _GetHalfFloatRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, lod) {\n if (DDSTools.StoreLODInAlphaChannel) {\n const destArray = new Uint16Array(dataLength);\n const srcData = new Uint16Array(arrayBuffer, dataOffset);\n let index = 0;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const srcPos = (x + y * width) * 4;\n destArray[index] = srcData[srcPos];\n destArray[index + 1] = srcData[srcPos + 1];\n destArray[index + 2] = srcData[srcPos + 2];\n destArray[index + 3] = ToHalfFloat(lod);\n index += 4;\n }\n }\n return destArray;\n }\n return new Uint16Array(arrayBuffer, dataOffset, dataLength);\n }\n static _GetFloatRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, lod) {\n if (DDSTools.StoreLODInAlphaChannel) {\n const destArray = new Float32Array(dataLength);\n const srcData = new Float32Array(arrayBuffer, dataOffset);\n let index = 0;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const srcPos = (x + y * width) * 4;\n destArray[index] = srcData[srcPos];\n destArray[index + 1] = srcData[srcPos + 1];\n destArray[index + 2] = srcData[srcPos + 2];\n destArray[index + 3] = lod;\n index += 4;\n }\n }\n return destArray;\n }\n return new Float32Array(arrayBuffer, dataOffset, dataLength);\n }\n static _GetFloatAsHalfFloatRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, lod) {\n const destArray = new Uint16Array(dataLength);\n const srcData = new Float32Array(arrayBuffer, dataOffset);\n let index = 0;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n destArray[index] = ToHalfFloat(srcData[index]);\n destArray[index + 1] = ToHalfFloat(srcData[index + 1]);\n destArray[index + 2] = ToHalfFloat(srcData[index + 2]);\n if (DDSTools.StoreLODInAlphaChannel) {\n destArray[index + 3] = ToHalfFloat(lod);\n }\n else {\n destArray[index + 3] = ToHalfFloat(srcData[index + 3]);\n }\n index += 4;\n }\n }\n return destArray;\n }\n static _GetFloatAsUIntRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, lod) {\n const destArray = new Uint8Array(dataLength);\n const srcData = new Float32Array(arrayBuffer, dataOffset);\n let index = 0;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const srcPos = (x + y * width) * 4;\n destArray[index] = Scalar.Clamp(srcData[srcPos]) * 255;\n destArray[index + 1] = Scalar.Clamp(srcData[srcPos + 1]) * 255;\n destArray[index + 2] = Scalar.Clamp(srcData[srcPos + 2]) * 255;\n if (DDSTools.StoreLODInAlphaChannel) {\n destArray[index + 3] = lod;\n }\n else {\n destArray[index + 3] = Scalar.Clamp(srcData[srcPos + 3]) * 255;\n }\n index += 4;\n }\n }\n return destArray;\n }\n static _GetHalfFloatAsUIntRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, lod) {\n const destArray = new Uint8Array(dataLength);\n const srcData = new Uint16Array(arrayBuffer, dataOffset);\n let index = 0;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const srcPos = (x + y * width) * 4;\n destArray[index] = Scalar.Clamp(FromHalfFloat(srcData[srcPos])) * 255;\n destArray[index + 1] = Scalar.Clamp(FromHalfFloat(srcData[srcPos + 1])) * 255;\n destArray[index + 2] = Scalar.Clamp(FromHalfFloat(srcData[srcPos + 2])) * 255;\n if (DDSTools.StoreLODInAlphaChannel) {\n destArray[index + 3] = lod;\n }\n else {\n destArray[index + 3] = Scalar.Clamp(FromHalfFloat(srcData[srcPos + 3])) * 255;\n }\n index += 4;\n }\n }\n return destArray;\n }\n static _GetRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, rOffset, gOffset, bOffset, aOffset) {\n const byteArray = new Uint8Array(dataLength);\n const srcData = new Uint8Array(arrayBuffer, dataOffset);\n let index = 0;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const srcPos = (x + y * width) * 4;\n byteArray[index] = srcData[srcPos + rOffset];\n byteArray[index + 1] = srcData[srcPos + gOffset];\n byteArray[index + 2] = srcData[srcPos + bOffset];\n byteArray[index + 3] = srcData[srcPos + aOffset];\n index += 4;\n }\n }\n return byteArray;\n }\n static _ExtractLongWordOrder(value) {\n if (value === 0 || value === 255 || value === -16777216) {\n return 0;\n }\n return 1 + DDSTools._ExtractLongWordOrder(value >> 8);\n }\n static _GetRGBArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, rOffset, gOffset, bOffset) {\n const byteArray = new Uint8Array(dataLength);\n const srcData = new Uint8Array(arrayBuffer, dataOffset);\n let index = 0;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const srcPos = (x + y * width) * 3;\n byteArray[index] = srcData[srcPos + rOffset];\n byteArray[index + 1] = srcData[srcPos + gOffset];\n byteArray[index + 2] = srcData[srcPos + bOffset];\n index += 3;\n }\n }\n return byteArray;\n }\n static _GetLuminanceArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer) {\n const byteArray = new Uint8Array(dataLength);\n const srcData = new Uint8Array(arrayBuffer, dataOffset);\n let index = 0;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const srcPos = x + y * width;\n byteArray[index] = srcData[srcPos];\n index++;\n }\n }\n return byteArray;\n }\n /**\n * Uploads DDS Levels to a Babylon Texture\n * @internal\n */\n static UploadDDSLevels(engine, texture, data, info, loadMipmaps, faces, lodIndex = -1, currentFace, destTypeMustBeFilterable = true) {\n let sphericalPolynomialFaces = null;\n if (info.sphericalPolynomial) {\n sphericalPolynomialFaces = [];\n }\n const ext = !!engine.getCaps().s3tc;\n // TODO WEBGPU Once generateMipMaps is split into generateMipMaps + hasMipMaps in InternalTexture this line can be removed\n texture.generateMipMaps = loadMipmaps;\n const header = new Int32Array(data.buffer, data.byteOffset, headerLengthInt);\n let fourCC, width, height, dataLength = 0, dataOffset;\n let byteArray, mipmapCount, mip;\n let internalCompressedFormat = 0;\n let blockBytes = 1;\n if (header[off_magic] !== DDS_MAGIC) {\n Logger.Error(\"Invalid magic number in DDS header\");\n return;\n }\n if (!info.isFourCC && !info.isRGB && !info.isLuminance) {\n Logger.Error(\"Unsupported format, must contain a FourCC, RGB or LUMINANCE code\");\n return;\n }\n if (info.isCompressed && !ext) {\n Logger.Error(\"Compressed textures are not supported on this platform.\");\n return;\n }\n let bpp = header[off_RGBbpp];\n dataOffset = header[off_size] + 4;\n let computeFormats = false;\n if (info.isFourCC) {\n fourCC = header[off_pfFourCC];\n switch (fourCC) {\n case FOURCC_DXT1:\n blockBytes = 8;\n internalCompressedFormat = 33777;\n break;\n case FOURCC_DXT3:\n blockBytes = 16;\n internalCompressedFormat = 33778;\n break;\n case FOURCC_DXT5:\n blockBytes = 16;\n internalCompressedFormat = 33779;\n break;\n case FOURCC_D3DFMT_R16G16B16A16F:\n computeFormats = true;\n bpp = 64;\n break;\n case FOURCC_D3DFMT_R32G32B32A32F:\n computeFormats = true;\n bpp = 128;\n break;\n case FOURCC_DX10: {\n // There is an additionnal header so dataOffset need to be changed\n dataOffset += 5 * 4; // 5 uints\n let supported = false;\n switch (info.dxgiFormat) {\n case DXGI_FORMAT_R16G16B16A16_FLOAT:\n computeFormats = true;\n bpp = 64;\n supported = true;\n break;\n case DXGI_FORMAT_R32G32B32A32_FLOAT:\n computeFormats = true;\n bpp = 128;\n supported = true;\n break;\n case DXGI_FORMAT_B8G8R8X8_UNORM:\n info.isRGB = true;\n info.isFourCC = false;\n bpp = 32;\n supported = true;\n break;\n }\n if (supported) {\n break;\n }\n }\n // eslint-disable-next-line no-fallthrough\n default:\n console.error(\"Unsupported FourCC code:\", Int32ToFourCC(fourCC));\n return;\n }\n }\n const rOffset = DDSTools._ExtractLongWordOrder(header[off_RMask]);\n const gOffset = DDSTools._ExtractLongWordOrder(header[off_GMask]);\n const bOffset = DDSTools._ExtractLongWordOrder(header[off_BMask]);\n const aOffset = DDSTools._ExtractLongWordOrder(header[off_AMask]);\n if (computeFormats) {\n internalCompressedFormat = engine._getRGBABufferInternalSizedFormat(info.textureType);\n }\n mipmapCount = 1;\n if (header[off_flags] & DDSD_MIPMAPCOUNT && loadMipmaps !== false) {\n mipmapCount = Math.max(1, header[off_mipmapCount]);\n }\n const startFace = currentFace || 0;\n const caps = engine.getCaps();\n for (let face = startFace; face < faces; face++) {\n width = header[off_width];\n height = header[off_height];\n for (mip = 0; mip < mipmapCount; ++mip) {\n if (lodIndex === -1 || lodIndex === mip) {\n // In case of fixed LOD, if the lod has just been uploaded, early exit.\n const i = lodIndex === -1 ? mip : 0;\n if (!info.isCompressed && info.isFourCC) {\n texture.format = 5;\n dataLength = width * height * 4;\n let floatArray = null;\n if (engine._badOS || engine._badDesktopOS || (!caps.textureHalfFloat && !caps.textureFloat)) {\n // Required because iOS has many issues with float and half float generation\n if (bpp === 128) {\n floatArray = DDSTools._GetFloatAsUIntRGBAArrayBuffer(width, height, data.byteOffset + dataOffset, dataLength, data.buffer, i);\n if (sphericalPolynomialFaces && i == 0) {\n sphericalPolynomialFaces.push(DDSTools._GetFloatRGBAArrayBuffer(width, height, data.byteOffset + dataOffset, dataLength, data.buffer, i));\n }\n }\n else if (bpp === 64) {\n floatArray = DDSTools._GetHalfFloatAsUIntRGBAArrayBuffer(width, height, data.byteOffset + dataOffset, dataLength, data.buffer, i);\n if (sphericalPolynomialFaces && i == 0) {\n sphericalPolynomialFaces.push(DDSTools._GetHalfFloatAsFloatRGBAArrayBuffer(width, height, data.byteOffset + dataOffset, dataLength, data.buffer, i));\n }\n }\n texture.type = 0;\n }\n else {\n const floatAvailable = caps.textureFloat && ((destTypeMustBeFilterable && caps.textureFloatLinearFiltering) || !destTypeMustBeFilterable);\n const halfFloatAvailable = caps.textureHalfFloat && ((destTypeMustBeFilterable && caps.textureHalfFloatLinearFiltering) || !destTypeMustBeFilterable);\n const destType = (bpp === 128 || (bpp === 64 && !halfFloatAvailable)) && floatAvailable\n ? 1\n : (bpp === 64 || (bpp === 128 && !floatAvailable)) && halfFloatAvailable\n ? 2\n : 0;\n let dataGetter;\n let dataGetterPolynomial = null;\n switch (bpp) {\n case 128: {\n switch (destType) {\n case 1:\n dataGetter = DDSTools._GetFloatRGBAArrayBuffer;\n dataGetterPolynomial = null;\n break;\n case 2:\n dataGetter = DDSTools._GetFloatAsHalfFloatRGBAArrayBuffer;\n dataGetterPolynomial = DDSTools._GetFloatRGBAArrayBuffer;\n break;\n case 0:\n dataGetter = DDSTools._GetFloatAsUIntRGBAArrayBuffer;\n dataGetterPolynomial = DDSTools._GetFloatRGBAArrayBuffer;\n break;\n }\n break;\n }\n default: {\n // 64 bpp\n switch (destType) {\n case 1:\n dataGetter = DDSTools._GetHalfFloatAsFloatRGBAArrayBuffer;\n dataGetterPolynomial = null;\n break;\n case 2:\n dataGetter = DDSTools._GetHalfFloatRGBAArrayBuffer;\n dataGetterPolynomial = DDSTools._GetHalfFloatAsFloatRGBAArrayBuffer;\n break;\n case 0:\n dataGetter = DDSTools._GetHalfFloatAsUIntRGBAArrayBuffer;\n dataGetterPolynomial = DDSTools._GetHalfFloatAsFloatRGBAArrayBuffer;\n break;\n }\n break;\n }\n }\n texture.type = destType;\n floatArray = dataGetter(width, height, data.byteOffset + dataOffset, dataLength, data.buffer, i);\n if (sphericalPolynomialFaces && i == 0) {\n sphericalPolynomialFaces.push(dataGetterPolynomial ? dataGetterPolynomial(width, height, data.byteOffset + dataOffset, dataLength, data.buffer, i) : floatArray);\n }\n }\n if (floatArray) {\n engine._uploadDataToTextureDirectly(texture, floatArray, face, i);\n }\n }\n else if (info.isRGB) {\n texture.type = 0;\n if (bpp === 24) {\n texture.format = 4;\n dataLength = width * height * 3;\n byteArray = DDSTools._GetRGBArrayBuffer(width, height, data.byteOffset + dataOffset, dataLength, data.buffer, rOffset, gOffset, bOffset);\n engine._uploadDataToTextureDirectly(texture, byteArray, face, i);\n }\n else {\n // 32\n texture.format = 5;\n dataLength = width * height * 4;\n byteArray = DDSTools._GetRGBAArrayBuffer(width, height, data.byteOffset + dataOffset, dataLength, data.buffer, rOffset, gOffset, bOffset, aOffset);\n engine._uploadDataToTextureDirectly(texture, byteArray, face, i);\n }\n }\n else if (info.isLuminance) {\n const unpackAlignment = engine._getUnpackAlignement();\n const unpaddedRowSize = width;\n const paddedRowSize = Math.floor((width + unpackAlignment - 1) / unpackAlignment) * unpackAlignment;\n dataLength = paddedRowSize * (height - 1) + unpaddedRowSize;\n byteArray = DDSTools._GetLuminanceArrayBuffer(width, height, data.byteOffset + dataOffset, dataLength, data.buffer);\n texture.format = 1;\n texture.type = 0;\n engine._uploadDataToTextureDirectly(texture, byteArray, face, i);\n }\n else {\n dataLength = (((Math.max(4, width) / 4) * Math.max(4, height)) / 4) * blockBytes;\n byteArray = new Uint8Array(data.buffer, data.byteOffset + dataOffset, dataLength);\n texture.type = 0;\n engine._uploadCompressedDataToTextureDirectly(texture, internalCompressedFormat, width, height, byteArray, face, i);\n }\n }\n dataOffset += bpp ? width * height * (bpp / 8) : dataLength;\n width *= 0.5;\n height *= 0.5;\n width = Math.max(1.0, width);\n height = Math.max(1.0, height);\n }\n if (currentFace !== undefined) {\n // Loading a single face\n break;\n }\n }\n if (sphericalPolynomialFaces && sphericalPolynomialFaces.length > 0) {\n info.sphericalPolynomial = CubeMapToSphericalPolynomialTools.ConvertCubeMapToSphericalPolynomial({\n size: header[off_width],\n right: sphericalPolynomialFaces[0],\n left: sphericalPolynomialFaces[1],\n up: sphericalPolynomialFaces[2],\n down: sphericalPolynomialFaces[3],\n front: sphericalPolynomialFaces[4],\n back: sphericalPolynomialFaces[5],\n format: 5,\n type: 1,\n gammaSpace: false,\n });\n }\n else {\n info.sphericalPolynomial = undefined;\n }\n }\n}\n/**\n * Gets or sets a boolean indicating that LOD info is stored in alpha channel (false by default)\n */\nDDSTools.StoreLODInAlphaChannel = false;\n/**\n * Create a cube texture from prefiltered data (ie. the mipmaps contain ready to use data for PBR reflection)\n * @param rootUrl defines the url where the file to load is located\n * @param scene defines the current scene\n * @param lodScale defines scale to apply to the mip map selection\n * @param lodOffset defines offset to apply to the mip map selection\n * @param onLoad defines an optional callback raised when the texture is loaded\n * @param onError defines an optional callback raised if there is an issue to load the texture\n * @param format defines the format of the data\n * @param forcedExtension defines the extension to use to pick the right loader\n * @param createPolynomials defines wheter or not to create polynomails harmonics for the texture\n * @returns the cube texture as an InternalTexture\n */\nThinEngine.prototype.createPrefilteredCubeTexture = function (rootUrl, scene, lodScale, lodOffset, onLoad = null, onError = null, format, forcedExtension = null, createPolynomials = true) {\n const callback = (loadData) => {\n if (!loadData) {\n if (onLoad) {\n onLoad(null);\n }\n return;\n }\n const texture = loadData.texture;\n if (!createPolynomials) {\n texture._sphericalPolynomial = new SphericalPolynomial();\n }\n else if (loadData.info.sphericalPolynomial) {\n texture._sphericalPolynomial = loadData.info.sphericalPolynomial;\n }\n texture._source = InternalTextureSource.CubePrefiltered;\n if (this.getCaps().textureLOD) {\n // Do not add extra process if texture lod is supported.\n if (onLoad) {\n onLoad(texture);\n }\n return;\n }\n const mipSlices = 3;\n const gl = this._gl;\n const width = loadData.width;\n if (!width) {\n return;\n }\n const textures = [];\n for (let i = 0; i < mipSlices; i++) {\n //compute LOD from even spacing in smoothness (matching shader calculation)\n const smoothness = i / (mipSlices - 1);\n const roughness = 1 - smoothness;\n const minLODIndex = lodOffset; // roughness = 0\n const maxLODIndex = Scalar.Log2(width) * lodScale + lodOffset; // roughness = 1\n const lodIndex = minLODIndex + (maxLODIndex - minLODIndex) * roughness;\n const mipmapIndex = Math.round(Math.min(Math.max(lodIndex, 0), maxLODIndex));\n const glTextureFromLod = new InternalTexture(this, InternalTextureSource.Temp);\n glTextureFromLod.type = texture.type;\n glTextureFromLod.format = texture.format;\n glTextureFromLod.width = Math.pow(2, Math.max(Scalar.Log2(width) - mipmapIndex, 0));\n glTextureFromLod.height = glTextureFromLod.width;\n glTextureFromLod.isCube = true;\n glTextureFromLod._cachedWrapU = 0;\n glTextureFromLod._cachedWrapV = 0;\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, glTextureFromLod, true);\n glTextureFromLod.samplingMode = 2;\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n if (loadData.isDDS) {\n const info = loadData.info;\n const data = loadData.data;\n this._unpackFlipY(info.isCompressed);\n DDSTools.UploadDDSLevels(this, glTextureFromLod, data, info, true, 6, mipmapIndex);\n }\n else {\n Logger.Warn(\"DDS is the only prefiltered cube map supported so far.\");\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\n // Wrap in a base texture for easy binding.\n const lodTexture = new BaseTexture(scene);\n lodTexture._isCube = true;\n lodTexture._texture = glTextureFromLod;\n glTextureFromLod.isReady = true;\n textures.push(lodTexture);\n }\n texture._lodTextureHigh = textures[2];\n texture._lodTextureMid = textures[1];\n texture._lodTextureLow = textures[0];\n if (onLoad) {\n onLoad(texture);\n }\n };\n return this.createCubeTexture(rootUrl, scene, null, false, callback, onError, format, forcedExtension, createPolynomials, lodScale, lodOffset);\n};\n//# sourceMappingURL=dds.js.map","import { SphericalPolynomial } from \"../../../Maths/sphericalPolynomial.js\";\nimport { Engine } from \"../../../Engines/engine.js\";\nimport { DDSTools } from \"../../../Misc/dds.js\";\n/**\n * Implementation of the DDS Texture Loader.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _DDSTextureLoader {\n constructor() {\n /**\n * Defines whether the loader supports cascade loading the different faces.\n */\n this.supportCascades = true;\n }\n /**\n * This returns if the loader support the current file information.\n * @param extension defines the file extension of the file being loaded\n * @returns true if the loader can load the specified file\n */\n canLoad(extension) {\n return extension.endsWith(\".dds\");\n }\n /**\n * Uploads the cube texture data to the WebGL texture. It has already been bound.\n * @param imgs contains the cube maps\n * @param texture defines the BabylonJS internal texture\n * @param createPolynomials will be true if polynomials have been requested\n * @param onLoad defines the callback to trigger once the texture is ready\n */\n loadCubeData(imgs, texture, createPolynomials, onLoad) {\n const engine = texture.getEngine();\n let info;\n let loadMipmap = false;\n let maxLevel = 1000;\n if (Array.isArray(imgs)) {\n for (let index = 0; index < imgs.length; index++) {\n const data = imgs[index];\n info = DDSTools.GetDDSInfo(data);\n texture.width = info.width;\n texture.height = info.height;\n loadMipmap = (info.isRGB || info.isLuminance || info.mipmapCount > 1) && texture.generateMipMaps;\n engine._unpackFlipY(info.isCompressed);\n DDSTools.UploadDDSLevels(engine, texture, data, info, loadMipmap, 6, -1, index);\n if (!info.isFourCC && info.mipmapCount === 1) {\n engine.generateMipMapsForCubemap(texture);\n }\n else {\n maxLevel = info.mipmapCount - 1;\n }\n }\n }\n else {\n const data = imgs;\n info = DDSTools.GetDDSInfo(data);\n texture.width = info.width;\n texture.height = info.height;\n if (createPolynomials) {\n info.sphericalPolynomial = new SphericalPolynomial();\n }\n loadMipmap = (info.isRGB || info.isLuminance || info.mipmapCount > 1) && texture.generateMipMaps;\n engine._unpackFlipY(info.isCompressed);\n DDSTools.UploadDDSLevels(engine, texture, data, info, loadMipmap, 6);\n if (!info.isFourCC && info.mipmapCount === 1) {\n // Do not unbind as we still need to set the parameters.\n engine.generateMipMapsForCubemap(texture, false);\n }\n else {\n maxLevel = info.mipmapCount - 1;\n }\n }\n engine._setCubeMapTextureParams(texture, loadMipmap, maxLevel);\n texture.isReady = true;\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n if (onLoad) {\n onLoad({ isDDS: true, width: texture.width, info, data: imgs, texture });\n }\n }\n /**\n * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.\n * @param data contains the texture data\n * @param texture defines the BabylonJS internal texture\n * @param callback defines the method to call once ready to upload\n */\n loadData(data, texture, callback) {\n const info = DDSTools.GetDDSInfo(data);\n const loadMipmap = (info.isRGB || info.isLuminance || info.mipmapCount > 1) && texture.generateMipMaps && info.width >> (info.mipmapCount - 1) === 1;\n callback(info.width, info.height, loadMipmap, info.isFourCC, () => {\n DDSTools.UploadDDSLevels(texture.getEngine(), texture, data, info, loadMipmap, 1);\n });\n }\n}\n// Register the loader.\nEngine._TextureLoaders.push(new _DDSTextureLoader());\n//# sourceMappingURL=ddsTextureLoader.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/helperFunctions.js\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map","import { Tools } from \"./tools.js\";\nimport { Vector3 } from \"../Maths/math.vector.js\";\nimport { Scalar } from \"../Maths/math.scalar.js\";\nimport { SphericalPolynomial } from \"../Maths/sphericalPolynomial.js\";\nimport { InternalTexture, InternalTextureSource } from \"../Materials/Textures/internalTexture.js\";\nimport { BaseTexture } from \"../Materials/Textures/baseTexture.js\";\n\nimport { Scene } from \"../scene.js\";\nimport { PostProcess } from \"../PostProcesses/postProcess.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { RGBDTextureTools } from \"./rgbdTextureTools.js\";\nimport \"../Engines/Extensions/engine.renderTargetCube.js\";\nimport \"../Engines/Extensions/engine.readTexture.js\";\nimport \"../Materials/Textures/baseTexture.polynomial.js\";\nimport \"../Shaders/rgbdEncode.fragment.js\";\nimport \"../Shaders/rgbdDecode.fragment.js\";\nimport { DumpTools } from \"../Misc/dumpTools.js\";\nconst DefaultEnvironmentTextureImageType = \"image/png\";\nconst CurrentVersion = 2;\n/**\n * Magic number identifying the env file.\n */\nconst MagicBytes = [0x86, 0x16, 0x87, 0x96, 0xf6, 0xd6, 0x96, 0x36];\n/**\n * Gets the environment info from an env file.\n * @param data The array buffer containing the .env bytes.\n * @returns the environment file info (the json header) if successfully parsed, normalized to the latest supported version.\n */\nexport function GetEnvInfo(data) {\n const dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);\n let pos = 0;\n for (let i = 0; i < MagicBytes.length; i++) {\n if (dataView.getUint8(pos++) !== MagicBytes[i]) {\n Logger.Error(\"Not a babylon environment map\");\n return null;\n }\n }\n // Read json manifest - collect characters up to null terminator\n let manifestString = \"\";\n let charCode = 0x00;\n while ((charCode = dataView.getUint8(pos++))) {\n manifestString += String.fromCharCode(charCode);\n }\n let manifest = JSON.parse(manifestString);\n manifest = normalizeEnvInfo(manifest);\n if (manifest.specular) {\n // Extend the header with the position of the payload.\n manifest.specular.specularDataPosition = pos;\n // Fallback to 0.8 exactly if lodGenerationScale is not defined for backward compatibility.\n manifest.specular.lodGenerationScale = manifest.specular.lodGenerationScale || 0.8;\n }\n return manifest;\n}\n/**\n * Normalizes any supported version of the environment file info to the latest version\n * @param info environment file info on any supported version\n * @returns environment file info in the latest supported version\n * @private\n */\nexport function normalizeEnvInfo(info) {\n if (info.version > CurrentVersion) {\n throw new Error(`Unsupported babylon environment map version \"${info.version}\". Latest supported version is \"${CurrentVersion}\".`);\n }\n if (info.version === 2) {\n return info;\n }\n // Migrate a v1 info to v2\n info = Object.assign(Object.assign({}, info), { version: 2, imageType: DefaultEnvironmentTextureImageType });\n return info;\n}\n/**\n * Creates an environment texture from a loaded cube texture.\n * @param texture defines the cube texture to convert in env file\n * @param options options for the conversion process\n * @param options.imageType the mime type for the encoded images, with support for \"image/png\" (default) and \"image/webp\"\n * @param options.imageQuality the image quality of encoded WebP images.\n * @returns a promise containing the environment data if successful.\n */\nexport async function CreateEnvTextureAsync(texture, options = {}) {\n var _a, _b;\n const internalTexture = texture.getInternalTexture();\n if (!internalTexture) {\n return Promise.reject(\"The cube texture is invalid.\");\n }\n const imageType = (_a = options.imageType) !== null && _a !== void 0 ? _a : DefaultEnvironmentTextureImageType;\n const engine = internalTexture.getEngine();\n if (texture.textureType !== 2 &&\n texture.textureType !== 1 &&\n texture.textureType !== 0 &&\n texture.textureType !== 0 &&\n texture.textureType !== 7 &&\n texture.textureType !== -1) {\n return Promise.reject(\"The cube texture should allow HDR (Full Float or Half Float).\");\n }\n let textureType = 1;\n if (!engine.getCaps().textureFloatRender) {\n textureType = 2;\n if (!engine.getCaps().textureHalfFloatRender) {\n return Promise.reject(\"Env texture can only be created when the browser supports half float or full float rendering.\");\n }\n }\n // sphericalPolynomial is lazy loaded so simply accessing it should trigger the computation.\n texture.sphericalPolynomial;\n // Lets keep track of the polynomial promise so we can wait for it to be ready before generating the pixels.\n const sphericalPolynomialPromise = (_b = texture.getInternalTexture()) === null || _b === void 0 ? void 0 : _b._sphericalPolynomialPromise;\n const cubeWidth = internalTexture.width;\n const hostingScene = new Scene(engine);\n const specularTextures = {};\n // As we are going to readPixels the faces of the cube, make sure the drawing/update commands for the cube texture are fully sent to the GPU in case it is drawn for the first time in this very frame!\n engine.flushFramebuffer();\n // Read and collect all mipmaps data from the cube.\n const mipmapsCount = Scalar.ILog2(internalTexture.width);\n for (let i = 0; i <= mipmapsCount; i++) {\n const faceWidth = Math.pow(2, mipmapsCount - i);\n // All faces of the cube.\n for (let face = 0; face < 6; face++) {\n let faceData = await texture.readPixels(face, i, undefined, false);\n if (faceData && faceData.byteLength === faceData.length) {\n const faceDataFloat = new Float32Array(faceData.byteLength * 4);\n for (let i = 0; i < faceData.byteLength; i++) {\n faceDataFloat[i] = faceData[i] / 255;\n // Gamma to linear\n faceDataFloat[i] = Math.pow(faceDataFloat[i], 2.2);\n }\n faceData = faceDataFloat;\n }\n else if (faceData && texture.gammaSpace) {\n const floatData = faceData;\n for (let i = 0; i < floatData.length; i++) {\n // Gamma to linear\n floatData[i] = Math.pow(floatData[i], 2.2);\n }\n }\n const tempTexture = engine.createRawTexture(faceData, faceWidth, faceWidth, 5, false, true, 1, null, textureType);\n await RGBDTextureTools.EncodeTextureToRGBD(tempTexture, hostingScene, textureType);\n const rgbdEncodedData = await engine._readTexturePixels(tempTexture, faceWidth, faceWidth);\n const imageEncodedData = await DumpTools.DumpDataAsync(faceWidth, faceWidth, rgbdEncodedData, imageType, undefined, false, true, options.imageQuality);\n specularTextures[i * 6 + face] = imageEncodedData;\n tempTexture.dispose();\n }\n }\n // We can delete the hosting scene keeping track of all the creation objects\n hostingScene.dispose();\n // Ensure completion of the polynomial creation promise.\n if (sphericalPolynomialPromise) {\n await sphericalPolynomialPromise;\n }\n // Creates the json header for the env texture\n const info = {\n version: CurrentVersion,\n width: cubeWidth,\n imageType,\n irradiance: _CreateEnvTextureIrradiance(texture),\n specular: {\n mipmaps: [],\n lodGenerationScale: texture.lodGenerationScale,\n },\n };\n // Sets the specular image data information\n let position = 0;\n for (let i = 0; i <= mipmapsCount; i++) {\n for (let face = 0; face < 6; face++) {\n const byteLength = specularTextures[i * 6 + face].byteLength;\n info.specular.mipmaps.push({\n length: byteLength,\n position: position,\n });\n position += byteLength;\n }\n }\n // Encode the JSON as an array buffer\n const infoString = JSON.stringify(info);\n const infoBuffer = new ArrayBuffer(infoString.length + 1);\n const infoView = new Uint8Array(infoBuffer); // Limited to ascii subset matching unicode.\n for (let i = 0, strLen = infoString.length; i < strLen; i++) {\n infoView[i] = infoString.charCodeAt(i);\n }\n // Ends up with a null terminator for easier parsing\n infoView[infoString.length] = 0x00;\n // Computes the final required size and creates the storage\n const totalSize = MagicBytes.length + position + infoBuffer.byteLength;\n const finalBuffer = new ArrayBuffer(totalSize);\n const finalBufferView = new Uint8Array(finalBuffer);\n const dataView = new DataView(finalBuffer);\n // Copy the magic bytes identifying the file in\n let pos = 0;\n for (let i = 0; i < MagicBytes.length; i++) {\n dataView.setUint8(pos++, MagicBytes[i]);\n }\n // Add the json info\n finalBufferView.set(new Uint8Array(infoBuffer), pos);\n pos += infoBuffer.byteLength;\n // Finally inserts the texture data\n for (let i = 0; i <= mipmapsCount; i++) {\n for (let face = 0; face < 6; face++) {\n const dataBuffer = specularTextures[i * 6 + face];\n finalBufferView.set(new Uint8Array(dataBuffer), pos);\n pos += dataBuffer.byteLength;\n }\n }\n // Voila\n return finalBuffer;\n}\n/**\n * Creates a JSON representation of the spherical data.\n * @param texture defines the texture containing the polynomials\n * @returns the JSON representation of the spherical info\n */\nfunction _CreateEnvTextureIrradiance(texture) {\n const polynmials = texture.sphericalPolynomial;\n if (polynmials == null) {\n return null;\n }\n return {\n x: [polynmials.x.x, polynmials.x.y, polynmials.x.z],\n y: [polynmials.y.x, polynmials.y.y, polynmials.y.z],\n z: [polynmials.z.x, polynmials.z.y, polynmials.z.z],\n xx: [polynmials.xx.x, polynmials.xx.y, polynmials.xx.z],\n yy: [polynmials.yy.x, polynmials.yy.y, polynmials.yy.z],\n zz: [polynmials.zz.x, polynmials.zz.y, polynmials.zz.z],\n yz: [polynmials.yz.x, polynmials.yz.y, polynmials.yz.z],\n zx: [polynmials.zx.x, polynmials.zx.y, polynmials.zx.z],\n xy: [polynmials.xy.x, polynmials.xy.y, polynmials.xy.z],\n };\n}\n/**\n * Creates the ArrayBufferViews used for initializing environment texture image data.\n * @param data the image data\n * @param info parameters that determine what views will be created for accessing the underlying buffer\n * @returns the views described by info providing access to the underlying buffer\n */\nexport function CreateImageDataArrayBufferViews(data, info) {\n info = normalizeEnvInfo(info);\n const specularInfo = info.specular;\n // Double checks the enclosed info\n let mipmapsCount = Scalar.Log2(info.width);\n mipmapsCount = Math.round(mipmapsCount) + 1;\n if (specularInfo.mipmaps.length !== 6 * mipmapsCount) {\n throw new Error(`Unsupported specular mipmaps number \"${specularInfo.mipmaps.length}\"`);\n }\n const imageData = new Array(mipmapsCount);\n for (let i = 0; i < mipmapsCount; i++) {\n imageData[i] = new Array(6);\n for (let face = 0; face < 6; face++) {\n const imageInfo = specularInfo.mipmaps[i * 6 + face];\n imageData[i][face] = new Uint8Array(data.buffer, data.byteOffset + specularInfo.specularDataPosition + imageInfo.position, imageInfo.length);\n }\n }\n return imageData;\n}\n/**\n * Uploads the texture info contained in the env file to the GPU.\n * @param texture defines the internal texture to upload to\n * @param data defines the data to load\n * @param info defines the texture info retrieved through the GetEnvInfo method\n * @returns a promise\n */\nexport function UploadEnvLevelsAsync(texture, data, info) {\n info = normalizeEnvInfo(info);\n const specularInfo = info.specular;\n if (!specularInfo) {\n // Nothing else parsed so far\n return Promise.resolve();\n }\n texture._lodGenerationScale = specularInfo.lodGenerationScale;\n const imageData = CreateImageDataArrayBufferViews(data, info);\n return UploadLevelsAsync(texture, imageData, info.imageType);\n}\nfunction _OnImageReadyAsync(image, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture) {\n return new Promise((resolve, reject) => {\n if (expandTexture) {\n const tempTexture = engine.createTexture(null, true, true, null, 1, null, (message) => {\n reject(message);\n }, image);\n rgbdPostProcess.getEffect().executeWhenCompiled(() => {\n // Uncompress the data to a RTT\n rgbdPostProcess.externalTextureSamplerBinding = true;\n rgbdPostProcess.onApply = (effect) => {\n effect._bindTexture(\"textureSampler\", tempTexture);\n effect.setFloat2(\"scale\", 1, engine._features.needsInvertingBitmap && image instanceof ImageBitmap ? -1 : 1);\n };\n if (!engine.scenes.length) {\n return;\n }\n engine.scenes[0].postProcessManager.directRender([rgbdPostProcess], cubeRtt, true, face, i);\n // Cleanup\n engine.restoreDefaultFramebuffer();\n tempTexture.dispose();\n URL.revokeObjectURL(url);\n resolve();\n });\n }\n else {\n engine._uploadImageToTexture(texture, image, face, i);\n // Upload the face to the non lod texture support\n if (generateNonLODTextures) {\n const lodTexture = lodTextures[i];\n if (lodTexture) {\n engine._uploadImageToTexture(lodTexture._texture, image, face, 0);\n }\n }\n resolve();\n }\n });\n}\n/**\n * Uploads the levels of image data to the GPU.\n * @param texture defines the internal texture to upload to\n * @param imageData defines the array buffer views of image data [mipmap][face]\n * @param imageType the mime type of the image data\n * @returns a promise\n */\nexport function UploadLevelsAsync(texture, imageData, imageType = DefaultEnvironmentTextureImageType) {\n if (!Tools.IsExponentOfTwo(texture.width)) {\n throw new Error(\"Texture size must be a power of two\");\n }\n const mipmapsCount = Scalar.ILog2(texture.width) + 1;\n // Gets everything ready.\n const engine = texture.getEngine();\n let expandTexture = false;\n let generateNonLODTextures = false;\n let rgbdPostProcess = null;\n let cubeRtt = null;\n let lodTextures = null;\n const caps = engine.getCaps();\n texture.format = 5;\n texture.type = 0;\n texture.generateMipMaps = true;\n texture._cachedAnisotropicFilteringLevel = null;\n engine.updateTextureSamplingMode(3, texture);\n // Add extra process if texture lod is not supported\n if (!caps.textureLOD) {\n expandTexture = false;\n generateNonLODTextures = true;\n lodTextures = {};\n }\n // in webgl 1 there are no ways to either render or copy lod level information for float textures.\n else if (!engine._features.supportRenderAndCopyToLodForFloatTextures) {\n expandTexture = false;\n }\n // If half float available we can uncompress the texture\n else if (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering) {\n expandTexture = true;\n texture.type = 2;\n }\n // If full float available we can uncompress the texture\n else if (caps.textureFloatRender && caps.textureFloatLinearFiltering) {\n expandTexture = true;\n texture.type = 1;\n }\n // Expand the texture if possible\n if (expandTexture) {\n // Simply run through the decode PP\n rgbdPostProcess = new PostProcess(\"rgbdDecode\", \"rgbdDecode\", null, null, 1, null, 3, engine, false, undefined, texture.type, undefined, null, false);\n texture._isRGBD = false;\n texture.invertY = false;\n cubeRtt = engine.createRenderTargetCubeTexture(texture.width, {\n generateDepthBuffer: false,\n generateMipMaps: true,\n generateStencilBuffer: false,\n samplingMode: 3,\n type: texture.type,\n format: 5,\n });\n }\n else {\n texture._isRGBD = true;\n texture.invertY = true;\n // In case of missing support, applies the same patch than DDS files.\n if (generateNonLODTextures) {\n const mipSlices = 3;\n const scale = texture._lodGenerationScale;\n const offset = texture._lodGenerationOffset;\n for (let i = 0; i < mipSlices; i++) {\n //compute LOD from even spacing in smoothness (matching shader calculation)\n const smoothness = i / (mipSlices - 1);\n const roughness = 1 - smoothness;\n const minLODIndex = offset; // roughness = 0\n const maxLODIndex = (mipmapsCount - 1) * scale + offset; // roughness = 1 (mipmaps start from 0)\n const lodIndex = minLODIndex + (maxLODIndex - minLODIndex) * roughness;\n const mipmapIndex = Math.round(Math.min(Math.max(lodIndex, 0), maxLODIndex));\n const glTextureFromLod = new InternalTexture(engine, InternalTextureSource.Temp);\n glTextureFromLod.isCube = true;\n glTextureFromLod.invertY = true;\n glTextureFromLod.generateMipMaps = false;\n engine.updateTextureSamplingMode(2, glTextureFromLod);\n // Wrap in a base texture for easy binding.\n const lodTexture = new BaseTexture(null);\n lodTexture._isCube = true;\n lodTexture._texture = glTextureFromLod;\n lodTextures[mipmapIndex] = lodTexture;\n switch (i) {\n case 0:\n texture._lodTextureLow = lodTexture;\n break;\n case 1:\n texture._lodTextureMid = lodTexture;\n break;\n case 2:\n texture._lodTextureHigh = lodTexture;\n break;\n }\n }\n }\n }\n const promises = [];\n // All mipmaps up to provided number of images\n for (let i = 0; i < imageData.length; i++) {\n // All faces\n for (let face = 0; face < 6; face++) {\n // Constructs an image element from image data\n const bytes = imageData[i][face];\n const blob = new Blob([bytes], { type: imageType });\n const url = URL.createObjectURL(blob);\n let promise;\n if (typeof Image === \"undefined\" || engine._features.forceBitmapOverHTMLImageElement) {\n promise = engine.createImageBitmap(blob, { premultiplyAlpha: \"none\" }).then((img) => {\n return _OnImageReadyAsync(img, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture);\n });\n }\n else {\n const image = new Image();\n image.src = url;\n // Enqueue promise to upload to the texture.\n promise = new Promise((resolve, reject) => {\n image.onload = () => {\n _OnImageReadyAsync(image, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture)\n .then(() => resolve())\n .catch((reason) => {\n reject(reason);\n });\n };\n image.onerror = (error) => {\n reject(error);\n };\n });\n }\n promises.push(promise);\n }\n }\n // Fill remaining mipmaps with black textures.\n if (imageData.length < mipmapsCount) {\n let data;\n const size = Math.pow(2, mipmapsCount - 1 - imageData.length);\n const dataLength = size * size * 4;\n switch (texture.type) {\n case 0: {\n data = new Uint8Array(dataLength);\n break;\n }\n case 2: {\n data = new Uint16Array(dataLength);\n break;\n }\n case 1: {\n data = new Float32Array(dataLength);\n break;\n }\n }\n for (let i = imageData.length; i < mipmapsCount; i++) {\n for (let face = 0; face < 6; face++) {\n engine._uploadArrayBufferViewToTexture(texture, data, face, i);\n }\n }\n }\n // Once all done, finishes the cleanup and return\n return Promise.all(promises).then(() => {\n // Release temp RTT.\n if (cubeRtt) {\n engine._releaseTexture(texture);\n cubeRtt._swapAndDie(texture);\n }\n // Release temp Post Process.\n if (rgbdPostProcess) {\n rgbdPostProcess.dispose();\n }\n // Flag internal texture as ready in case they are in use.\n if (generateNonLODTextures) {\n if (texture._lodTextureHigh && texture._lodTextureHigh._texture) {\n texture._lodTextureHigh._texture.isReady = true;\n }\n if (texture._lodTextureMid && texture._lodTextureMid._texture) {\n texture._lodTextureMid._texture.isReady = true;\n }\n if (texture._lodTextureLow && texture._lodTextureLow._texture) {\n texture._lodTextureLow._texture.isReady = true;\n }\n }\n });\n}\n/**\n * Uploads spherical polynomials information to the texture.\n * @param texture defines the texture we are trying to upload the information to\n * @param info defines the environment texture info retrieved through the GetEnvInfo method\n */\nexport function UploadEnvSpherical(texture, info) {\n info = normalizeEnvInfo(info);\n const irradianceInfo = info.irradiance;\n if (!irradianceInfo) {\n return;\n }\n const sp = new SphericalPolynomial();\n Vector3.FromArrayToRef(irradianceInfo.x, 0, sp.x);\n Vector3.FromArrayToRef(irradianceInfo.y, 0, sp.y);\n Vector3.FromArrayToRef(irradianceInfo.z, 0, sp.z);\n Vector3.FromArrayToRef(irradianceInfo.xx, 0, sp.xx);\n Vector3.FromArrayToRef(irradianceInfo.yy, 0, sp.yy);\n Vector3.FromArrayToRef(irradianceInfo.zz, 0, sp.zz);\n Vector3.FromArrayToRef(irradianceInfo.yz, 0, sp.yz);\n Vector3.FromArrayToRef(irradianceInfo.zx, 0, sp.zx);\n Vector3.FromArrayToRef(irradianceInfo.xy, 0, sp.xy);\n texture._sphericalPolynomial = sp;\n}\n/**\n * @internal\n */\nexport function _UpdateRGBDAsync(internalTexture, data, sphericalPolynomial, lodScale, lodOffset) {\n const proxy = internalTexture\n .getEngine()\n .createRawCubeTexture(null, internalTexture.width, internalTexture.format, internalTexture.type, internalTexture.generateMipMaps, internalTexture.invertY, internalTexture.samplingMode, internalTexture._compression);\n const proxyPromise = UploadLevelsAsync(proxy, data).then(() => internalTexture);\n internalTexture.onRebuildCallback = (_internalTexture) => {\n return {\n proxy: proxyPromise,\n isReady: true,\n isAsync: true,\n };\n };\n internalTexture._source = InternalTextureSource.CubeRawRGBD;\n internalTexture._bufferViewArrayArray = data;\n internalTexture._lodGenerationScale = lodScale;\n internalTexture._lodGenerationOffset = lodOffset;\n internalTexture._sphericalPolynomial = sphericalPolynomial;\n return UploadLevelsAsync(internalTexture, data).then(() => {\n internalTexture.isReady = true;\n return internalTexture;\n });\n}\n/**\n * Sets of helpers addressing the serialization and deserialization of environment texture\n * stored in a BabylonJS env file.\n * Those files are usually stored as .env files.\n */\nexport const EnvironmentTextureTools = {\n /**\n * Gets the environment info from an env file.\n * @param data The array buffer containing the .env bytes.\n * @returns the environment file info (the json header) if successfully parsed, normalized to the latest supported version.\n */\n GetEnvInfo,\n /**\n * Creates an environment texture from a loaded cube texture.\n * @param texture defines the cube texture to convert in env file\n * @param options options for the conversion process\n * @param options.imageType the mime type for the encoded images, with support for \"image/png\" (default) and \"image/webp\"\n * @param options.imageQuality the image quality of encoded WebP images.\n * @returns a promise containing the environment data if successful.\n */\n CreateEnvTextureAsync,\n /**\n * Creates the ArrayBufferViews used for initializing environment texture image data.\n * @param data the image data\n * @param info parameters that determine what views will be created for accessing the underlying buffer\n * @returns the views described by info providing access to the underlying buffer\n */\n CreateImageDataArrayBufferViews,\n /**\n * Uploads the texture info contained in the env file to the GPU.\n * @param texture defines the internal texture to upload to\n * @param data defines the data to load\n * @param info defines the texture info retrieved through the GetEnvInfo method\n * @returns a promise\n */\n UploadEnvLevelsAsync,\n /**\n * Uploads the levels of image data to the GPU.\n * @param texture defines the internal texture to upload to\n * @param imageData defines the array buffer views of image data [mipmap][face]\n * @param imageType the mime type of the image data\n * @returns a promise\n */\n UploadLevelsAsync,\n /**\n * Uploads spherical polynomials information to the texture.\n * @param texture defines the texture we are trying to upload the information to\n * @param info defines the environment texture info retrieved through the GetEnvInfo method\n */\n UploadEnvSpherical,\n};\n//# sourceMappingURL=environmentTextureTools.js.map","import { GetEnvInfo, UploadEnvLevelsAsync, UploadEnvSpherical } from \"../../../Misc/environmentTextureTools.js\";\nimport { Engine } from \"../../../Engines/engine.js\";\n/**\n * Implementation of the ENV Texture Loader.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _ENVTextureLoader {\n constructor() {\n /**\n * Defines whether the loader supports cascade loading the different faces.\n */\n this.supportCascades = false;\n }\n /**\n * This returns if the loader support the current file information.\n * @param extension defines the file extension of the file being loaded\n * @returns true if the loader can load the specified file\n */\n canLoad(extension) {\n return extension.endsWith(\".env\");\n }\n /**\n * Uploads the cube texture data to the WebGL texture. It has already been bound.\n * @param data contains the texture data\n * @param texture defines the BabylonJS internal texture\n * @param createPolynomials will be true if polynomials have been requested\n * @param onLoad defines the callback to trigger once the texture is ready\n * @param onError defines the callback to trigger in case of error\n */\n loadCubeData(data, texture, createPolynomials, onLoad, onError) {\n if (Array.isArray(data)) {\n return;\n }\n const info = GetEnvInfo(data);\n if (info) {\n texture.width = info.width;\n texture.height = info.width;\n try {\n UploadEnvSpherical(texture, info);\n UploadEnvLevelsAsync(texture, data, info).then(() => {\n texture.isReady = true;\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n if (onLoad) {\n onLoad();\n }\n }, (reason) => {\n onError === null || onError === void 0 ? void 0 : onError(\"Can not upload environment levels\", reason);\n });\n }\n catch (e) {\n onError === null || onError === void 0 ? void 0 : onError(\"Can not upload environment file\", e);\n }\n }\n else if (onError) {\n onError(\"Can not parse the environment file\", null);\n }\n }\n /**\n * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.\n */\n loadData() {\n throw \".env not supported in 2d.\";\n }\n}\n// Register the loader.\nEngine._TextureLoaders.push(new _ENVTextureLoader());\n//# sourceMappingURL=envTextureLoader.js.map","/* eslint-disable @typescript-eslint/naming-convention */\nimport { Logger } from \"../Misc/logger.js\";\n/**\n * for description see https://www.khronos.org/opengles/sdk/tools/KTX/\n * for file layout see https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/\n */\nexport class KhronosTextureContainer {\n /**\n * Creates a new KhronosTextureContainer\n * @param data contents of the KTX container file\n * @param facesExpected should be either 1 or 6, based whether a cube texture or or\n */\n constructor(\n /** contents of the KTX container file */\n data, facesExpected) {\n this.data = data;\n /**\n * If the container has been made invalid (eg. constructor failed to correctly load array buffer)\n */\n this.isInvalid = false;\n if (!KhronosTextureContainer.IsValid(data)) {\n this.isInvalid = true;\n Logger.Error(\"texture missing KTX identifier\");\n return;\n }\n // load the reset of the header in native 32 bit uint\n const dataSize = Uint32Array.BYTES_PER_ELEMENT;\n const headerDataView = new DataView(this.data.buffer, this.data.byteOffset + 12, 13 * dataSize);\n const endianness = headerDataView.getUint32(0, true);\n const littleEndian = endianness === 0x04030201;\n this.glType = headerDataView.getUint32(1 * dataSize, littleEndian); // must be 0 for compressed textures\n this.glTypeSize = headerDataView.getUint32(2 * dataSize, littleEndian); // must be 1 for compressed textures\n this.glFormat = headerDataView.getUint32(3 * dataSize, littleEndian); // must be 0 for compressed textures\n this.glInternalFormat = headerDataView.getUint32(4 * dataSize, littleEndian); // the value of arg passed to gl.compressedTexImage2D(,,x,,,,)\n this.glBaseInternalFormat = headerDataView.getUint32(5 * dataSize, littleEndian); // specify GL_RGB, GL_RGBA, GL_ALPHA, etc (un-compressed only)\n this.pixelWidth = headerDataView.getUint32(6 * dataSize, littleEndian); // level 0 value of arg passed to gl.compressedTexImage2D(,,,x,,,)\n this.pixelHeight = headerDataView.getUint32(7 * dataSize, littleEndian); // level 0 value of arg passed to gl.compressedTexImage2D(,,,,x,,)\n this.pixelDepth = headerDataView.getUint32(8 * dataSize, littleEndian); // level 0 value of arg passed to gl.compressedTexImage3D(,,,,,x,,)\n this.numberOfArrayElements = headerDataView.getUint32(9 * dataSize, littleEndian); // used for texture arrays\n this.numberOfFaces = headerDataView.getUint32(10 * dataSize, littleEndian); // used for cubemap textures, should either be 1 or 6\n this.numberOfMipmapLevels = headerDataView.getUint32(11 * dataSize, littleEndian); // number of levels; disregard possibility of 0 for compressed textures\n this.bytesOfKeyValueData = headerDataView.getUint32(12 * dataSize, littleEndian); // the amount of space after the header for meta-data\n // Make sure we have a compressed type. Not only reduces work, but probably better to let dev know they are not compressing.\n if (this.glType !== 0) {\n Logger.Error(\"only compressed formats currently supported\");\n this.isInvalid = true;\n return;\n }\n else {\n // value of zero is an indication to generate mipmaps @ runtime. Not usually allowed for compressed, so disregard.\n this.numberOfMipmapLevels = Math.max(1, this.numberOfMipmapLevels);\n }\n if (this.pixelHeight === 0 || this.pixelDepth !== 0) {\n Logger.Error(\"only 2D textures currently supported\");\n this.isInvalid = true;\n return;\n }\n if (this.numberOfArrayElements !== 0) {\n Logger.Error(\"texture arrays not currently supported\");\n this.isInvalid = true;\n return;\n }\n if (this.numberOfFaces !== facesExpected) {\n Logger.Error(\"number of faces expected\" + facesExpected + \", but found \" + this.numberOfFaces);\n this.isInvalid = true;\n return;\n }\n // we now have a completely validated file, so could use existence of loadType as success\n // would need to make this more elaborate & adjust checks above to support more than one load type\n this.loadType = KhronosTextureContainer.COMPRESSED_2D;\n }\n /**\n * Uploads KTX content to a Babylon Texture.\n * It is assumed that the texture has already been created & is currently bound\n * @internal\n */\n uploadLevels(texture, loadMipmaps) {\n switch (this.loadType) {\n case KhronosTextureContainer.COMPRESSED_2D:\n this._upload2DCompressedLevels(texture, loadMipmaps);\n break;\n case KhronosTextureContainer.TEX_2D:\n case KhronosTextureContainer.COMPRESSED_3D:\n case KhronosTextureContainer.TEX_3D:\n }\n }\n _upload2DCompressedLevels(texture, loadMipmaps) {\n // initialize width & height for level 1\n let dataOffset = KhronosTextureContainer.HEADER_LEN + this.bytesOfKeyValueData;\n let width = this.pixelWidth;\n let height = this.pixelHeight;\n const mipmapCount = loadMipmaps ? this.numberOfMipmapLevels : 1;\n for (let level = 0; level < mipmapCount; level++) {\n const imageSize = new Int32Array(this.data.buffer, this.data.byteOffset + dataOffset, 1)[0]; // size per face, since not supporting array cubemaps\n dataOffset += 4; //image data starts from next multiple of 4 offset. Each face refers to same imagesize field above.\n for (let face = 0; face < this.numberOfFaces; face++) {\n const byteArray = new Uint8Array(this.data.buffer, this.data.byteOffset + dataOffset, imageSize);\n const engine = texture.getEngine();\n engine._uploadCompressedDataToTextureDirectly(texture, texture.format, width, height, byteArray, face, level);\n dataOffset += imageSize; // add size of the image for the next face/mipmap\n dataOffset += 3 - ((imageSize + 3) % 4); // add padding for odd sized image\n }\n width = Math.max(1.0, width * 0.5);\n height = Math.max(1.0, height * 0.5);\n }\n }\n /**\n * Checks if the given data starts with a KTX file identifier.\n * @param data the data to check\n * @returns true if the data is a KTX file or false otherwise\n */\n static IsValid(data) {\n if (data.byteLength >= 12) {\n // '«', 'K', 'T', 'X', ' ', '1', '1', '»', '\\r', '\\n', '\\x1A', '\\n'\n const identifier = new Uint8Array(data.buffer, data.byteOffset, 12);\n if (identifier[0] === 0xab &&\n identifier[1] === 0x4b &&\n identifier[2] === 0x54 &&\n identifier[3] === 0x58 &&\n identifier[4] === 0x20 &&\n identifier[5] === 0x31 &&\n identifier[6] === 0x31 &&\n identifier[7] === 0xbb &&\n identifier[8] === 0x0d &&\n identifier[9] === 0x0a &&\n identifier[10] === 0x1a &&\n identifier[11] === 0x0a) {\n return true;\n }\n }\n return false;\n }\n}\nKhronosTextureContainer.HEADER_LEN = 12 + 13 * 4; // identifier + header elements (not including key value meta-data pairs)\n// load types\nKhronosTextureContainer.COMPRESSED_2D = 0; // uses a gl.compressedTexImage2D()\nKhronosTextureContainer.COMPRESSED_3D = 1; // uses a gl.compressedTexImage3D()\nKhronosTextureContainer.TEX_2D = 2; // uses a gl.texImage2D()\nKhronosTextureContainer.TEX_3D = 3; // uses a gl.texImage3D()\n//# sourceMappingURL=khronosTextureContainer.js.map","export var SourceTextureFormat;\n(function (SourceTextureFormat) {\n SourceTextureFormat[SourceTextureFormat[\"ETC1S\"] = 0] = \"ETC1S\";\n SourceTextureFormat[SourceTextureFormat[\"UASTC4x4\"] = 1] = \"UASTC4x4\";\n})(SourceTextureFormat || (SourceTextureFormat = {}));\nexport var TranscodeTarget;\n(function (TranscodeTarget) {\n TranscodeTarget[TranscodeTarget[\"ASTC_4X4_RGBA\"] = 0] = \"ASTC_4X4_RGBA\";\n TranscodeTarget[TranscodeTarget[\"BC7_RGBA\"] = 1] = \"BC7_RGBA\";\n TranscodeTarget[TranscodeTarget[\"BC3_RGBA\"] = 2] = \"BC3_RGBA\";\n TranscodeTarget[TranscodeTarget[\"BC1_RGB\"] = 3] = \"BC1_RGB\";\n TranscodeTarget[TranscodeTarget[\"PVRTC1_4_RGBA\"] = 4] = \"PVRTC1_4_RGBA\";\n TranscodeTarget[TranscodeTarget[\"PVRTC1_4_RGB\"] = 5] = \"PVRTC1_4_RGB\";\n TranscodeTarget[TranscodeTarget[\"ETC2_RGBA\"] = 6] = \"ETC2_RGBA\";\n TranscodeTarget[TranscodeTarget[\"ETC1_RGB\"] = 7] = \"ETC1_RGB\";\n TranscodeTarget[TranscodeTarget[\"RGBA32\"] = 8] = \"RGBA32\";\n TranscodeTarget[TranscodeTarget[\"R8\"] = 9] = \"R8\";\n TranscodeTarget[TranscodeTarget[\"RG8\"] = 10] = \"RG8\";\n})(TranscodeTarget || (TranscodeTarget = {}));\nexport var EngineFormat;\n(function (EngineFormat) {\n EngineFormat[EngineFormat[\"COMPRESSED_RGBA_BPTC_UNORM_EXT\"] = 36492] = \"COMPRESSED_RGBA_BPTC_UNORM_EXT\";\n EngineFormat[EngineFormat[\"COMPRESSED_RGBA_ASTC_4X4_KHR\"] = 37808] = \"COMPRESSED_RGBA_ASTC_4X4_KHR\";\n EngineFormat[EngineFormat[\"COMPRESSED_RGB_S3TC_DXT1_EXT\"] = 33776] = \"COMPRESSED_RGB_S3TC_DXT1_EXT\";\n EngineFormat[EngineFormat[\"COMPRESSED_RGBA_S3TC_DXT5_EXT\"] = 33779] = \"COMPRESSED_RGBA_S3TC_DXT5_EXT\";\n EngineFormat[EngineFormat[\"COMPRESSED_RGBA_PVRTC_4BPPV1_IMG\"] = 35842] = \"COMPRESSED_RGBA_PVRTC_4BPPV1_IMG\";\n EngineFormat[EngineFormat[\"COMPRESSED_RGB_PVRTC_4BPPV1_IMG\"] = 35840] = \"COMPRESSED_RGB_PVRTC_4BPPV1_IMG\";\n EngineFormat[EngineFormat[\"COMPRESSED_RGBA8_ETC2_EAC\"] = 37496] = \"COMPRESSED_RGBA8_ETC2_EAC\";\n EngineFormat[EngineFormat[\"COMPRESSED_RGB8_ETC2\"] = 37492] = \"COMPRESSED_RGB8_ETC2\";\n EngineFormat[EngineFormat[\"COMPRESSED_RGB_ETC1_WEBGL\"] = 36196] = \"COMPRESSED_RGB_ETC1_WEBGL\";\n EngineFormat[EngineFormat[\"RGBA8Format\"] = 32856] = \"RGBA8Format\";\n EngineFormat[EngineFormat[\"R8Format\"] = 33321] = \"R8Format\";\n EngineFormat[EngineFormat[\"RG8Format\"] = 33323] = \"RG8Format\";\n})(EngineFormat || (EngineFormat = {}));\n//# sourceMappingURL=ktx2decoderTypes.js.map","\nimport { AutoReleaseWorkerPool } from \"./workerPool.js\";\nimport { Tools } from \"./tools.js\";\nimport { EngineFormat, TranscodeTarget } from \"@inter-ikea-betrakta-babylonjs/core/Materials/Textures/ktx2decoderTypes.js\";\nfunction applyConfig(urls) {\n if (urls.wasmUASTCToASTC) {\n KTX2DECODER.LiteTranscoder_UASTC_ASTC.WasmModuleURL = urls.wasmUASTCToASTC;\n }\n if (urls.wasmUASTCToBC7) {\n KTX2DECODER.LiteTranscoder_UASTC_BC7.WasmModuleURL = urls.wasmUASTCToBC7;\n }\n if (urls.wasmUASTCToRGBA_UNORM) {\n KTX2DECODER.LiteTranscoder_UASTC_RGBA_UNORM.WasmModuleURL = urls.wasmUASTCToRGBA_UNORM;\n }\n if (urls.wasmUASTCToRGBA_SRGB) {\n KTX2DECODER.LiteTranscoder_UASTC_RGBA_SRGB.WasmModuleURL = urls.wasmUASTCToRGBA_SRGB;\n }\n if (urls.wasmUASTCToR8_UNORM) {\n KTX2DECODER.LiteTranscoder_UASTC_R8_UNORM.WasmModuleURL = urls.wasmUASTCToR8_UNORM;\n }\n if (urls.wasmUASTCToRG8_UNORM) {\n KTX2DECODER.LiteTranscoder_UASTC_RG8_UNORM.WasmModuleURL = urls.wasmUASTCToRG8_UNORM;\n }\n if (urls.jsMSCTranscoder) {\n KTX2DECODER.MSCTranscoder.JSModuleURL = urls.jsMSCTranscoder;\n }\n if (urls.wasmMSCTranscoder) {\n KTX2DECODER.MSCTranscoder.WasmModuleURL = urls.wasmMSCTranscoder;\n }\n if (urls.wasmZSTDDecoder) {\n KTX2DECODER.ZSTDDecoder.WasmModuleURL = urls.wasmZSTDDecoder;\n }\n}\n/**\n * Class that defines the default KTX2 decoder options.\n *\n * This class is useful for providing options to the KTX2 decoder to control how the source data is transcoded.\n */\nexport class DefaultKTX2DecoderOptions {\n constructor() {\n this._isDirty = true;\n this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC = true;\n this._ktx2DecoderOptions = {};\n }\n /**\n * Gets the dirty flag\n */\n get isDirty() {\n return this._isDirty;\n }\n /**\n * force a (uncompressed) RGBA transcoded format if transcoding a UASTC source format and ASTC + BC7 are not available as a compressed transcoded format\n */\n get useRGBAIfASTCBC7NotAvailableWhenUASTC() {\n return this._useRGBAIfASTCBC7NotAvailableWhenUASTC;\n }\n set useRGBAIfASTCBC7NotAvailableWhenUASTC(value) {\n if (this._useRGBAIfASTCBC7NotAvailableWhenUASTC === value) {\n return;\n }\n this._useRGBAIfASTCBC7NotAvailableWhenUASTC = value;\n this._isDirty = true;\n }\n /**\n * force a (uncompressed) RGBA transcoded format if transcoding a UASTC source format and only BC1 or BC3 are available as a compressed transcoded format.\n * This property is true by default to favor speed over memory, because currently transcoding from UASTC to BC1/3 is slow because the transcoder transcodes\n * to uncompressed and then recompresses the texture\n */\n get useRGBAIfOnlyBC1BC3AvailableWhenUASTC() {\n return this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC;\n }\n set useRGBAIfOnlyBC1BC3AvailableWhenUASTC(value) {\n if (this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC === value) {\n return;\n }\n this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC = value;\n this._isDirty = true;\n }\n /**\n * force to always use (uncompressed) RGBA for transcoded format\n */\n get forceRGBA() {\n return this._forceRGBA;\n }\n set forceRGBA(value) {\n if (this._forceRGBA === value) {\n return;\n }\n this._forceRGBA = value;\n this._isDirty = true;\n }\n /**\n * force to always use (uncompressed) R8 for transcoded format\n */\n get forceR8() {\n return this._forceR8;\n }\n set forceR8(value) {\n if (this._forceR8 === value) {\n return;\n }\n this._forceR8 = value;\n this._isDirty = true;\n }\n /**\n * force to always use (uncompressed) RG8 for transcoded format\n */\n get forceRG8() {\n return this._forceRG8;\n }\n set forceRG8(value) {\n if (this._forceRG8 === value) {\n return;\n }\n this._forceRG8 = value;\n this._isDirty = true;\n }\n /**\n * list of transcoders to bypass when looking for a suitable transcoder. The available transcoders are:\n * UniversalTranscoder_UASTC_ASTC\n * UniversalTranscoder_UASTC_BC7\n * UniversalTranscoder_UASTC_RGBA_UNORM\n * UniversalTranscoder_UASTC_RGBA_SRGB\n * UniversalTranscoder_UASTC_R8_UNORM\n * UniversalTranscoder_UASTC_RG8_UNORM\n * MSCTranscoder\n */\n get bypassTranscoders() {\n return this._bypassTranscoders;\n }\n set bypassTranscoders(value) {\n if (this._bypassTranscoders === value) {\n return;\n }\n this._bypassTranscoders = value;\n this._isDirty = true;\n }\n /** @internal */\n _getKTX2DecoderOptions() {\n if (!this._isDirty) {\n return this._ktx2DecoderOptions;\n }\n this._isDirty = false;\n const options = {\n useRGBAIfASTCBC7NotAvailableWhenUASTC: this._useRGBAIfASTCBC7NotAvailableWhenUASTC,\n forceRGBA: this._forceRGBA,\n forceR8: this._forceR8,\n forceRG8: this._forceRG8,\n bypassTranscoders: this._bypassTranscoders,\n };\n if (this.useRGBAIfOnlyBC1BC3AvailableWhenUASTC) {\n options.transcodeFormatDecisionTree = {\n UASTC: {\n transcodeFormat: [TranscodeTarget.BC1_RGB, TranscodeTarget.BC3_RGBA],\n yes: {\n transcodeFormat: TranscodeTarget.RGBA32,\n engineFormat: EngineFormat.RGBA8Format,\n roundToMultiple4: false,\n },\n },\n };\n }\n this._ktx2DecoderOptions = options;\n return options;\n }\n}\n/**\n * Class for loading KTX2 files\n */\nexport class KhronosTextureContainer2 {\n static GetDefaultNumWorkers() {\n if (typeof navigator !== \"object\" || !navigator.hardwareConcurrency) {\n return 1;\n }\n // Use 50% of the available logical processors but capped at 4.\n return Math.min(Math.floor(navigator.hardwareConcurrency * 0.5), 4);\n }\n static _Initialize(numWorkers) {\n if (KhronosTextureContainer2._WorkerPoolPromise || KhronosTextureContainer2._DecoderModulePromise) {\n return;\n }\n const urls = {\n jsDecoderModule: Tools.GetBabylonScriptURL(this.URLConfig.jsDecoderModule, true),\n wasmUASTCToASTC: Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToASTC, true),\n wasmUASTCToBC7: Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToBC7, true),\n wasmUASTCToRGBA_UNORM: Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRGBA_UNORM, true),\n wasmUASTCToRGBA_SRGB: Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRGBA_SRGB, true),\n wasmUASTCToR8_UNORM: Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToR8_UNORM, true),\n wasmUASTCToRG8_UNORM: Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRG8_UNORM, true),\n jsMSCTranscoder: Tools.GetBabylonScriptURL(this.URLConfig.jsMSCTranscoder, true),\n wasmMSCTranscoder: Tools.GetBabylonScriptURL(this.URLConfig.wasmMSCTranscoder, true),\n wasmZSTDDecoder: Tools.GetBabylonScriptURL(this.URLConfig.wasmZSTDDecoder, true),\n };\n if (numWorkers && typeof Worker === \"function\" && typeof URL !== \"undefined\") {\n KhronosTextureContainer2._WorkerPoolPromise = new Promise((resolve) => {\n const workerContent = `${applyConfig}(${workerFunc})()`;\n const workerBlobUrl = URL.createObjectURL(new Blob([workerContent], { type: \"application/javascript\" }));\n resolve(new AutoReleaseWorkerPool(numWorkers, () => new Promise((resolve, reject) => {\n const worker = new Worker(workerBlobUrl);\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n };\n const onMessage = (message) => {\n if (message.data.action === \"init\") {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve(worker);\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n worker.postMessage({\n action: \"init\",\n urls: urls,\n });\n })));\n });\n }\n else if (typeof KTX2DECODER === \"undefined\") {\n KhronosTextureContainer2._DecoderModulePromise = Tools.LoadBabylonScriptAsync(urls.jsDecoderModule).then(() => {\n KTX2DECODER.MSCTranscoder.UseFromWorkerThread = false;\n KTX2DECODER.WASMMemoryManager.LoadBinariesFromCurrentThread = true;\n applyConfig(urls);\n return new KTX2DECODER.KTX2Decoder();\n });\n }\n else {\n KTX2DECODER.MSCTranscoder.UseFromWorkerThread = false;\n KTX2DECODER.WASMMemoryManager.LoadBinariesFromCurrentThread = true;\n KhronosTextureContainer2._DecoderModulePromise = Promise.resolve(new KTX2DECODER.KTX2Decoder());\n }\n }\n /**\n * Constructor\n * @param engine The engine to use\n * @param numWorkers The number of workers for async operations. Specify `0` to disable web workers and run synchronously in the current context.\n */\n constructor(engine, numWorkers = KhronosTextureContainer2.DefaultNumWorkers) {\n this._engine = engine;\n KhronosTextureContainer2._Initialize(numWorkers);\n }\n /**\n * @internal\n */\n uploadAsync(data, internalTexture, options) {\n const caps = this._engine.getCaps();\n const compressedTexturesCaps = {\n astc: !!caps.astc,\n bptc: !!caps.bptc,\n s3tc: !!caps.s3tc,\n pvrtc: !!caps.pvrtc,\n etc2: !!caps.etc2,\n etc1: !!caps.etc1,\n };\n if (KhronosTextureContainer2._WorkerPoolPromise) {\n return KhronosTextureContainer2._WorkerPoolPromise.then((workerPool) => {\n return new Promise((resolve, reject) => {\n workerPool.push((worker, onComplete) => {\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n onComplete();\n };\n const onMessage = (message) => {\n if (message.data.action === \"decoded\") {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n if (!message.data.success) {\n reject({ message: message.data.msg });\n }\n else {\n try {\n this._createTexture(message.data.decodedData, internalTexture, options);\n resolve();\n }\n catch (err) {\n reject({ message: err });\n }\n }\n onComplete();\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n worker.postMessage({ action: \"setDefaultDecoderOptions\", options: KhronosTextureContainer2.DefaultDecoderOptions._getKTX2DecoderOptions() });\n const dataCopy = new Uint8Array(data.byteLength);\n dataCopy.set(new Uint8Array(data.buffer, data.byteOffset, data.byteLength));\n worker.postMessage({ action: \"decode\", data: dataCopy, caps: compressedTexturesCaps, options }, [dataCopy.buffer]);\n });\n });\n });\n }\n else if (KhronosTextureContainer2._DecoderModulePromise) {\n return KhronosTextureContainer2._DecoderModulePromise.then((decoder) => {\n if (KhronosTextureContainer2.DefaultDecoderOptions.isDirty) {\n KTX2DECODER.KTX2Decoder.DefaultDecoderOptions = KhronosTextureContainer2.DefaultDecoderOptions._getKTX2DecoderOptions();\n }\n return new Promise((resolve, reject) => {\n decoder\n .decode(data, caps)\n .then((data) => {\n this._createTexture(data, internalTexture);\n resolve();\n })\n .catch((reason) => {\n reject({ message: reason });\n });\n });\n });\n }\n throw new Error(\"KTX2 decoder module is not available\");\n }\n _createTexture(data, internalTexture, options) {\n const oglTexture2D = 3553; // gl.TEXTURE_2D\n this._engine._bindTextureDirectly(oglTexture2D, internalTexture);\n if (options) {\n // return back some information about the decoded data\n options.transcodedFormat = data.transcodedFormat;\n options.isInGammaSpace = data.isInGammaSpace;\n options.hasAlpha = data.hasAlpha;\n options.transcoderName = data.transcoderName;\n }\n let isUncompressedFormat = true;\n switch (data.transcodedFormat) {\n case 0x8058 /* RGBA8 */:\n internalTexture.type = 0;\n internalTexture.format = 5;\n break;\n case 0x8229 /* R8 */:\n internalTexture.type = 0;\n internalTexture.format = 6;\n break;\n case 0x822b /* RG8 */:\n internalTexture.type = 0;\n internalTexture.format = 7;\n break;\n default:\n internalTexture.format = data.transcodedFormat;\n isUncompressedFormat = false;\n break;\n }\n internalTexture._gammaSpace = data.isInGammaSpace;\n internalTexture.generateMipMaps = data.mipmaps.length > 1;\n if (data.errors) {\n throw new Error(\"KTX2 container - could not transcode the data. \" + data.errors);\n }\n for (let t = 0; t < data.mipmaps.length; ++t) {\n const mipmap = data.mipmaps[t];\n if (!mipmap || !mipmap.data) {\n throw new Error(\"KTX2 container - could not transcode one of the image\");\n }\n if (isUncompressedFormat) {\n // uncompressed RGBA / R8 / RG8\n internalTexture.width = mipmap.width; // need to set width/height so that the call to _uploadDataToTextureDirectly uses the right dimensions\n internalTexture.height = mipmap.height;\n this._engine._uploadDataToTextureDirectly(internalTexture, mipmap.data, 0, t, undefined, true);\n }\n else {\n this._engine._uploadCompressedDataToTextureDirectly(internalTexture, data.transcodedFormat, mipmap.width, mipmap.height, mipmap.data, 0, t);\n }\n }\n internalTexture._extension = \".ktx2\";\n internalTexture.width = data.mipmaps[0].width;\n internalTexture.height = data.mipmaps[0].height;\n internalTexture.isReady = true;\n this._engine._bindTextureDirectly(oglTexture2D, null);\n }\n /**\n * Checks if the given data starts with a KTX2 file identifier.\n * @param data the data to check\n * @returns true if the data is a KTX2 file or false otherwise\n */\n static IsValid(data) {\n if (data.byteLength >= 12) {\n // '«', 'K', 'T', 'X', ' ', '2', '0', '»', '\\r', '\\n', '\\x1A', '\\n'\n const identifier = new Uint8Array(data.buffer, data.byteOffset, 12);\n if (identifier[0] === 0xab &&\n identifier[1] === 0x4b &&\n identifier[2] === 0x54 &&\n identifier[3] === 0x58 &&\n identifier[4] === 0x20 &&\n identifier[5] === 0x32 &&\n identifier[6] === 0x30 &&\n identifier[7] === 0xbb &&\n identifier[8] === 0x0d &&\n identifier[9] === 0x0a &&\n identifier[10] === 0x1a &&\n identifier[11] === 0x0a) {\n return true;\n }\n }\n return false;\n }\n}\n/**\n * URLs to use when loading the KTX2 decoder module as well as its dependencies\n * If a url is null, the default url is used (pointing to https://preview.babylonjs.com)\n * Note that jsDecoderModule can't be null and that the other dependencies will only be loaded if necessary\n * Urls you can change:\n * URLConfig.jsDecoderModule\n * URLConfig.wasmUASTCToASTC\n * URLConfig.wasmUASTCToBC7\n * URLConfig.wasmUASTCToRGBA_UNORM\n * URLConfig.wasmUASTCToRGBA_SRGB\n * URLConfig.wasmUASTCToR8_UNORM\n * URLConfig.wasmUASTCToRG8_UNORM\n * URLConfig.jsMSCTranscoder\n * URLConfig.wasmMSCTranscoder\n * URLConfig.wasmZSTDDecoder\n * You can see their default values in this PG: https://playground.babylonjs.com/#EIJH8L#29\n */\nKhronosTextureContainer2.URLConfig = {\n jsDecoderModule: \"https://cdn.babylonjs.com/babylon.ktx2Decoder.js\",\n wasmUASTCToASTC: null,\n wasmUASTCToBC7: null,\n wasmUASTCToRGBA_UNORM: null,\n wasmUASTCToRGBA_SRGB: null,\n wasmUASTCToR8_UNORM: null,\n wasmUASTCToRG8_UNORM: null,\n jsMSCTranscoder: null,\n wasmMSCTranscoder: null,\n wasmZSTDDecoder: null,\n};\n/**\n * Default number of workers used to handle data decoding\n */\nKhronosTextureContainer2.DefaultNumWorkers = KhronosTextureContainer2.GetDefaultNumWorkers();\n/**\n * Default configuration for the KTX2 decoder.\n * The options defined in this way have priority over those passed when creating a KTX2 texture with new Texture(...).\n */\nKhronosTextureContainer2.DefaultDecoderOptions = new DefaultKTX2DecoderOptions();\nfunction workerFunc() {\n let ktx2Decoder;\n onmessage = (event) => {\n if (!event.data) {\n return;\n }\n switch (event.data.action) {\n case \"init\": {\n const urls = event.data.urls;\n importScripts(urls.jsDecoderModule);\n applyConfig(urls);\n ktx2Decoder = new KTX2DECODER.KTX2Decoder();\n postMessage({ action: \"init\" });\n break;\n }\n case \"setDefaultDecoderOptions\": {\n KTX2DECODER.KTX2Decoder.DefaultDecoderOptions = event.data.options;\n break;\n }\n case \"decode\":\n ktx2Decoder\n .decode(event.data.data, event.data.caps, event.data.options)\n .then((data) => {\n const buffers = [];\n for (let mip = 0; mip < data.mipmaps.length; ++mip) {\n const mipmap = data.mipmaps[mip];\n if (mipmap && mipmap.data) {\n buffers.push(mipmap.data.buffer);\n }\n }\n postMessage({ action: \"decoded\", success: true, decodedData: data }, buffers);\n })\n .catch((reason) => {\n postMessage({ action: \"decoded\", success: false, msg: reason });\n });\n break;\n }\n };\n}\n//# sourceMappingURL=khronosTextureContainer2.js.map","import { KhronosTextureContainer } from \"../../../Misc/khronosTextureContainer.js\";\nimport { KhronosTextureContainer2 } from \"../../../Misc/khronosTextureContainer2.js\";\nimport { Engine } from \"../../../Engines/engine.js\";\nimport { Logger } from \"../../../Misc/logger.js\";\n\nfunction mapSRGBToLinear(format) {\n switch (format) {\n case 35916:\n return 33776;\n case 35918:\n return 33778;\n case 35919:\n return 33779;\n case 37493:\n return 37492;\n case 37497:\n return 37496;\n case 37495:\n return 37494;\n case 37840:\n return 37808;\n case 36493:\n return 36492;\n }\n return null;\n}\n/**\n * Implementation of the KTX Texture Loader.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _KTXTextureLoader {\n constructor() {\n /**\n * Defines whether the loader supports cascade loading the different faces.\n */\n this.supportCascades = false;\n }\n /**\n * This returns if the loader support the current file information.\n * @param extension defines the file extension of the file being loaded\n * @param mimeType defines the optional mime type of the file being loaded\n * @returns true if the loader can load the specified file\n */\n canLoad(extension, mimeType) {\n // The \".ktx2\" file extension is still up for debate: https://github.com/KhronosGroup/KTX-Specification/issues/18\n return extension.endsWith(\".ktx\") || extension.endsWith(\".ktx2\") || mimeType === \"image/ktx\" || mimeType === \"image/ktx2\";\n }\n /**\n * Uploads the cube texture data to the WebGL texture. It has already been bound.\n * @param data contains the texture data\n * @param texture defines the BabylonJS internal texture\n * @param createPolynomials will be true if polynomials have been requested\n * @param onLoad defines the callback to trigger once the texture is ready\n */\n loadCubeData(data, texture, createPolynomials, onLoad) {\n if (Array.isArray(data)) {\n return;\n }\n // Need to invert vScale as invertY via UNPACK_FLIP_Y_WEBGL is not supported by compressed texture\n texture._invertVScale = !texture.invertY;\n const engine = texture.getEngine();\n const ktx = new KhronosTextureContainer(data, 6);\n const loadMipmap = ktx.numberOfMipmapLevels > 1 && texture.generateMipMaps;\n engine._unpackFlipY(true);\n ktx.uploadLevels(texture, texture.generateMipMaps);\n texture.width = ktx.pixelWidth;\n texture.height = ktx.pixelHeight;\n engine._setCubeMapTextureParams(texture, loadMipmap, ktx.numberOfMipmapLevels - 1);\n texture.isReady = true;\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n if (onLoad) {\n onLoad();\n }\n }\n /**\n * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.\n * @param data contains the texture data\n * @param texture defines the BabylonJS internal texture\n * @param callback defines the method to call once ready to upload\n * @param options\n */\n loadData(data, texture, callback, options) {\n if (KhronosTextureContainer.IsValid(data)) {\n // Need to invert vScale as invertY via UNPACK_FLIP_Y_WEBGL is not supported by compressed texture\n texture._invertVScale = !texture.invertY;\n const ktx = new KhronosTextureContainer(data, 1);\n const mappedFormat = mapSRGBToLinear(ktx.glInternalFormat);\n if (mappedFormat) {\n texture.format = mappedFormat;\n texture._useSRGBBuffer = texture.getEngine()._getUseSRGBBuffer(true, texture.generateMipMaps);\n texture._gammaSpace = true;\n }\n else {\n texture.format = ktx.glInternalFormat;\n }\n callback(ktx.pixelWidth, ktx.pixelHeight, texture.generateMipMaps, true, () => {\n ktx.uploadLevels(texture, texture.generateMipMaps);\n }, ktx.isInvalid);\n }\n else if (KhronosTextureContainer2.IsValid(data)) {\n const ktx2 = new KhronosTextureContainer2(texture.getEngine());\n ktx2.uploadAsync(data, texture, options).then(() => {\n callback(texture.width, texture.height, texture.generateMipMaps, true, () => { }, false);\n }, (error) => {\n Logger.Warn(`Failed to load KTX2 texture data: ${error.message}`);\n callback(0, 0, false, false, () => { }, true);\n });\n }\n else {\n Logger.Error(\"texture missing KTX identifier\");\n callback(0, 0, false, false, () => { }, true);\n }\n }\n}\n// Register the loader.\nEngine._TextureLoaders.unshift(new _KTXTextureLoader());\n//# sourceMappingURL=ktxTextureLoader.js.map","import { Quaternion, Vector3, Vector2, Matrix } from \"../Maths/math.vector.js\";\nimport { Color3 } from \"../Maths/math.color.js\";\nimport { Animation } from \"./animation.js\";\nimport { Size } from \"../Maths/math.size.js\";\n// Static values to help the garbage collector\n// Quaternion\nconst _staticOffsetValueQuaternion = Object.freeze(new Quaternion(0, 0, 0, 0));\n// Vector3\nconst _staticOffsetValueVector3 = Object.freeze(Vector3.Zero());\n// Vector2\nconst _staticOffsetValueVector2 = Object.freeze(Vector2.Zero());\n// Size\nconst _staticOffsetValueSize = Object.freeze(Size.Zero());\n// Color3\nconst _staticOffsetValueColor3 = Object.freeze(Color3.Black());\n/**\n * Defines a runtime animation\n */\nexport class RuntimeAnimation {\n /**\n * Gets the current frame of the runtime animation\n */\n get currentFrame() {\n return this._currentFrame;\n }\n /**\n * Gets the weight of the runtime animation\n */\n get weight() {\n return this._weight;\n }\n /**\n * Gets the current value of the runtime animation\n */\n get currentValue() {\n return this._currentValue;\n }\n /**\n * Gets or sets the target path of the runtime animation\n */\n get targetPath() {\n return this._targetPath;\n }\n /**\n * Gets the actual target of the runtime animation\n */\n get target() {\n return this._currentActiveTarget;\n }\n /**\n * Gets the additive state of the runtime animation\n */\n get isAdditive() {\n return this._host && this._host.isAdditive;\n }\n /**\n * Create a new RuntimeAnimation object\n * @param target defines the target of the animation\n * @param animation defines the source animation object\n * @param scene defines the hosting scene\n * @param host defines the initiating Animatable\n */\n constructor(target, animation, scene, host) {\n this._events = new Array();\n /**\n * The current frame of the runtime animation\n */\n this._currentFrame = 0;\n /**\n * The original value of the runtime animation\n */\n this._originalValue = new Array();\n /**\n * The original blend value of the runtime animation\n */\n this._originalBlendValue = null;\n /**\n * The offsets cache of the runtime animation\n */\n this._offsetsCache = {};\n /**\n * The high limits cache of the runtime animation\n */\n this._highLimitsCache = {};\n /**\n * Specifies if the runtime animation has been stopped\n */\n this._stopped = false;\n /**\n * The blending factor of the runtime animation\n */\n this._blendingFactor = 0;\n /**\n * The current value of the runtime animation\n */\n this._currentValue = null;\n this._currentActiveTarget = null;\n this._directTarget = null;\n /**\n * The target path of the runtime animation\n */\n this._targetPath = \"\";\n /**\n * The weight of the runtime animation\n */\n this._weight = 1.0;\n /**\n * The absolute frame offset of the runtime animation\n */\n this._absoluteFrameOffset = 0;\n /**\n * The previous elapsed time (since start of animation) of the runtime animation\n */\n this._previousElapsedTime = 0;\n /**\n * The previous absolute frame of the runtime animation (meaning, without taking into account the from/to values, only the elapsed time and the fps)\n */\n this._previousAbsoluteFrame = 0;\n this._targetIsArray = false;\n this._animation = animation;\n this._target = target;\n this._scene = scene;\n this._host = host;\n this._activeTargets = [];\n animation._runtimeAnimations.push(this);\n // State\n this._animationState = {\n key: 0,\n repeatCount: 0,\n loopMode: this._getCorrectLoopMode(),\n };\n if (this._animation.dataType === Animation.ANIMATIONTYPE_MATRIX) {\n this._animationState.workValue = Matrix.Zero();\n }\n // Limits\n this._keys = this._animation.getKeys();\n this._minFrame = this._keys[0].frame;\n this._maxFrame = this._keys[this._keys.length - 1].frame;\n this._minValue = this._keys[0].value;\n this._maxValue = this._keys[this._keys.length - 1].value;\n // Add a start key at frame 0 if missing\n if (this._minFrame !== 0) {\n const newKey = { frame: 0, value: this._minValue };\n this._keys.splice(0, 0, newKey);\n }\n // Check data\n if (this._target instanceof Array) {\n let index = 0;\n for (const target of this._target) {\n this._preparePath(target, index);\n this._getOriginalValues(index);\n index++;\n }\n this._targetIsArray = true;\n }\n else {\n this._preparePath(this._target);\n this._getOriginalValues();\n this._targetIsArray = false;\n this._directTarget = this._activeTargets[0];\n }\n // Cloning events locally\n const events = animation.getEvents();\n if (events && events.length > 0) {\n events.forEach((e) => {\n this._events.push(e._clone());\n });\n }\n this._enableBlending = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.enableBlending : this._animation.enableBlending;\n }\n _preparePath(target, targetIndex = 0) {\n const targetPropertyPath = this._animation.targetPropertyPath;\n if (targetPropertyPath.length > 1) {\n let property = target[targetPropertyPath[0]];\n for (let index = 1; index < targetPropertyPath.length - 1; index++) {\n property = property[targetPropertyPath[index]];\n }\n this._targetPath = targetPropertyPath[targetPropertyPath.length - 1];\n this._activeTargets[targetIndex] = property;\n }\n else {\n this._targetPath = targetPropertyPath[0];\n this._activeTargets[targetIndex] = target;\n }\n }\n /**\n * Gets the animation from the runtime animation\n */\n get animation() {\n return this._animation;\n }\n /**\n * Resets the runtime animation to the beginning\n * @param restoreOriginal defines whether to restore the target property to the original value\n */\n reset(restoreOriginal = false) {\n if (restoreOriginal) {\n if (this._target instanceof Array) {\n let index = 0;\n for (const target of this._target) {\n if (this._originalValue[index] !== undefined) {\n this._setValue(target, this._activeTargets[index], this._originalValue[index], -1, index);\n }\n index++;\n }\n }\n else {\n if (this._originalValue[0] !== undefined) {\n this._setValue(this._target, this._directTarget, this._originalValue[0], -1, 0);\n }\n }\n }\n this._offsetsCache = {};\n this._highLimitsCache = {};\n this._currentFrame = 0;\n this._blendingFactor = 0;\n // Events\n for (let index = 0; index < this._events.length; index++) {\n this._events[index].isDone = false;\n }\n }\n /**\n * Specifies if the runtime animation is stopped\n * @returns Boolean specifying if the runtime animation is stopped\n */\n isStopped() {\n return this._stopped;\n }\n /**\n * Disposes of the runtime animation\n */\n dispose() {\n const index = this._animation.runtimeAnimations.indexOf(this);\n if (index > -1) {\n this._animation.runtimeAnimations.splice(index, 1);\n }\n }\n /**\n * Apply the interpolated value to the target\n * @param currentValue defines the value computed by the animation\n * @param weight defines the weight to apply to this value (Defaults to 1.0)\n */\n setValue(currentValue, weight) {\n if (this._targetIsArray) {\n for (let index = 0; index < this._target.length; index++) {\n const target = this._target[index];\n this._setValue(target, this._activeTargets[index], currentValue, weight, index);\n }\n return;\n }\n this._setValue(this._target, this._directTarget, currentValue, weight, 0);\n }\n _getOriginalValues(targetIndex = 0) {\n let originalValue;\n const target = this._activeTargets[targetIndex];\n if (target.getLocalMatrix && this._targetPath === \"_matrix\") {\n // For bones\n originalValue = target.getLocalMatrix();\n }\n else {\n originalValue = target[this._targetPath];\n }\n if (originalValue && originalValue.clone) {\n this._originalValue[targetIndex] = originalValue.clone();\n }\n else {\n this._originalValue[targetIndex] = originalValue;\n }\n }\n _setValue(target, destination, currentValue, weight, targetIndex) {\n // Set value\n this._currentActiveTarget = destination;\n this._weight = weight;\n if (this._enableBlending && this._blendingFactor <= 1.0) {\n if (!this._originalBlendValue) {\n const originalValue = destination[this._targetPath];\n if (originalValue.clone) {\n this._originalBlendValue = originalValue.clone();\n }\n else {\n this._originalBlendValue = originalValue;\n }\n }\n if (this._originalBlendValue.m) {\n // Matrix\n if (Animation.AllowMatrixDecomposeForInterpolation) {\n if (this._currentValue) {\n Matrix.DecomposeLerpToRef(this._originalBlendValue, currentValue, this._blendingFactor, this._currentValue);\n }\n else {\n this._currentValue = Matrix.DecomposeLerp(this._originalBlendValue, currentValue, this._blendingFactor);\n }\n }\n else {\n if (this._currentValue) {\n Matrix.LerpToRef(this._originalBlendValue, currentValue, this._blendingFactor, this._currentValue);\n }\n else {\n this._currentValue = Matrix.Lerp(this._originalBlendValue, currentValue, this._blendingFactor);\n }\n }\n }\n else {\n this._currentValue = Animation._UniversalLerp(this._originalBlendValue, currentValue, this._blendingFactor);\n }\n const blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;\n this._blendingFactor += blendingSpeed;\n }\n else {\n if (!this._currentValue) {\n if (currentValue === null || currentValue === void 0 ? void 0 : currentValue.clone) {\n this._currentValue = currentValue.clone();\n }\n else {\n this._currentValue = currentValue;\n }\n }\n else if (this._currentValue.copyFrom) {\n this._currentValue.copyFrom(currentValue);\n }\n else {\n this._currentValue = currentValue;\n }\n }\n if (weight !== -1.0) {\n this._scene._registerTargetForLateAnimationBinding(this, this._originalValue[targetIndex]);\n }\n else {\n destination[this._targetPath] = this._currentValue;\n }\n if (target.markAsDirty) {\n target.markAsDirty(this._animation.targetProperty);\n }\n }\n /**\n * Gets the loop pmode of the runtime animation\n * @returns Loop Mode\n */\n _getCorrectLoopMode() {\n if (this._target && this._target.animationPropertiesOverride) {\n return this._target.animationPropertiesOverride.loopMode;\n }\n return this._animation.loopMode;\n }\n /**\n * Move the current animation to a given frame\n * @param frame defines the frame to move to\n */\n goToFrame(frame) {\n const keys = this._animation.getKeys();\n if (frame < keys[0].frame) {\n frame = keys[0].frame;\n }\n else if (frame > keys[keys.length - 1].frame) {\n frame = keys[keys.length - 1].frame;\n }\n // Need to reset animation events\n const events = this._events;\n if (events.length) {\n for (let index = 0; index < events.length; index++) {\n if (!events[index].onlyOnce) {\n // reset events in the future\n events[index].isDone = events[index].frame < frame;\n }\n }\n }\n this._currentFrame = frame;\n const currentValue = this._animation._interpolate(frame, this._animationState);\n this.setValue(currentValue, -1);\n }\n /**\n * @internal Internal use only\n */\n _prepareForSpeedRatioChange(newSpeedRatio) {\n const newAbsoluteFrame = (this._previousElapsedTime * (this._animation.framePerSecond * newSpeedRatio)) / 1000.0;\n this._absoluteFrameOffset = this._previousAbsoluteFrame - newAbsoluteFrame;\n }\n /**\n * Execute the current animation\n * @param elapsedTimeSinceAnimationStart defines the elapsed time (in milliseconds) since the animation was started\n * @param from defines the lower frame of the animation range\n * @param to defines the upper frame of the animation range\n * @param loop defines if the current animation must loop\n * @param speedRatio defines the current speed ratio\n * @param weight defines the weight of the animation (default is -1 so no weight)\n * @returns a boolean indicating if the animation is running\n */\n animate(elapsedTimeSinceAnimationStart, from, to, loop, speedRatio, weight = -1.0) {\n const animation = this._animation;\n const targetPropertyPath = animation.targetPropertyPath;\n if (!targetPropertyPath || targetPropertyPath.length < 1) {\n this._stopped = true;\n return false;\n }\n let returnValue = true;\n // Check limits\n if (from < this._minFrame || from > this._maxFrame) {\n from = this._minFrame;\n }\n if (to < this._minFrame || to > this._maxFrame) {\n to = this._maxFrame;\n }\n const frameRange = to - from;\n let offsetValue;\n // Compute the frame according to the elapsed time and the fps of the animation (\"from\" and \"to\" are not factored in!)\n let absoluteFrame = (elapsedTimeSinceAnimationStart * (animation.framePerSecond * speedRatio)) / 1000.0 + this._absoluteFrameOffset;\n let highLimitValue = 0;\n // Apply the yoyo function if required\n if (loop && this._animationState.loopMode === Animation.ANIMATIONLOOPMODE_YOYO) {\n const position = (absoluteFrame - from) / frameRange;\n // Apply the yoyo curve\n const yoyoPosition = Math.abs(Math.sin(position * Math.PI));\n // Map the yoyo position back to the range\n absoluteFrame = yoyoPosition * frameRange + from;\n }\n this._previousElapsedTime = elapsedTimeSinceAnimationStart;\n this._previousAbsoluteFrame = absoluteFrame;\n if (!loop && to >= from && absoluteFrame >= frameRange) {\n // If we are out of range and not looping get back to caller\n returnValue = false;\n highLimitValue = animation._getKeyValue(this._maxValue);\n }\n else if (!loop && from >= to && absoluteFrame <= frameRange) {\n returnValue = false;\n highLimitValue = animation._getKeyValue(this._minValue);\n }\n else if (this._animationState.loopMode !== Animation.ANIMATIONLOOPMODE_CYCLE) {\n const keyOffset = to.toString() + from.toString();\n if (!this._offsetsCache[keyOffset]) {\n this._animationState.repeatCount = 0;\n this._animationState.loopMode = Animation.ANIMATIONLOOPMODE_CYCLE; // force a specific codepath in animation._interpolate()!\n const fromValue = animation._interpolate(from, this._animationState);\n const toValue = animation._interpolate(to, this._animationState);\n this._animationState.loopMode = this._getCorrectLoopMode();\n switch (animation.dataType) {\n // Float\n case Animation.ANIMATIONTYPE_FLOAT:\n this._offsetsCache[keyOffset] = toValue - fromValue;\n break;\n // Quaternion\n case Animation.ANIMATIONTYPE_QUATERNION:\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\n break;\n // Vector3\n case Animation.ANIMATIONTYPE_VECTOR3:\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\n break;\n // Vector2\n case Animation.ANIMATIONTYPE_VECTOR2:\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\n break;\n // Size\n case Animation.ANIMATIONTYPE_SIZE:\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\n break;\n // Color3\n case Animation.ANIMATIONTYPE_COLOR3:\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\n break;\n default:\n break;\n }\n this._highLimitsCache[keyOffset] = toValue;\n }\n highLimitValue = this._highLimitsCache[keyOffset];\n offsetValue = this._offsetsCache[keyOffset];\n }\n if (offsetValue === undefined) {\n switch (animation.dataType) {\n // Float\n case Animation.ANIMATIONTYPE_FLOAT:\n offsetValue = 0;\n break;\n // Quaternion\n case Animation.ANIMATIONTYPE_QUATERNION:\n offsetValue = _staticOffsetValueQuaternion;\n break;\n // Vector3\n case Animation.ANIMATIONTYPE_VECTOR3:\n offsetValue = _staticOffsetValueVector3;\n break;\n // Vector2\n case Animation.ANIMATIONTYPE_VECTOR2:\n offsetValue = _staticOffsetValueVector2;\n break;\n // Size\n case Animation.ANIMATIONTYPE_SIZE:\n offsetValue = _staticOffsetValueSize;\n break;\n // Color3\n case Animation.ANIMATIONTYPE_COLOR3:\n offsetValue = _staticOffsetValueColor3;\n }\n }\n // Compute value\n let currentFrame;\n if (this._host && this._host.syncRoot) {\n // If we must sync with an animatable, calculate the current frame based on the frame of the root animatable\n const syncRoot = this._host.syncRoot;\n const hostNormalizedFrame = (syncRoot.masterFrame - syncRoot.fromFrame) / (syncRoot.toFrame - syncRoot.fromFrame);\n currentFrame = from + frameRange * hostNormalizedFrame;\n }\n else {\n if ((absoluteFrame > 0 && from > to) || (absoluteFrame < 0 && from < to)) {\n currentFrame = returnValue && frameRange !== 0 ? to + (absoluteFrame % frameRange) : from;\n }\n else {\n currentFrame = returnValue && frameRange !== 0 ? from + (absoluteFrame % frameRange) : to;\n }\n }\n const events = this._events;\n // Reset event/state if looping\n if ((speedRatio > 0 && this.currentFrame > currentFrame) || (speedRatio < 0 && this.currentFrame < currentFrame)) {\n this._onLoop();\n // Need to reset animation events\n for (let index = 0; index < events.length; index++) {\n if (!events[index].onlyOnce) {\n // reset event, the animation is looping\n events[index].isDone = false;\n }\n }\n this._animationState.key = speedRatio > 0 ? 0 : animation.getKeys().length - 1;\n }\n this._currentFrame = currentFrame;\n this._animationState.repeatCount = frameRange === 0 ? 0 : (absoluteFrame / frameRange) >> 0;\n this._animationState.highLimitValue = highLimitValue;\n this._animationState.offsetValue = offsetValue;\n const currentValue = animation._interpolate(currentFrame, this._animationState);\n // Set value\n this.setValue(currentValue, weight);\n // Check events\n if (events.length) {\n for (let index = 0; index < events.length; index++) {\n // Make sure current frame has passed event frame and that event frame is within the current range\n // Also, handle both forward and reverse animations\n if ((frameRange > 0 && currentFrame >= events[index].frame && events[index].frame >= from) ||\n (frameRange < 0 && currentFrame <= events[index].frame && events[index].frame <= from)) {\n const event = events[index];\n if (!event.isDone) {\n // If event should be done only once, remove it.\n if (event.onlyOnce) {\n events.splice(index, 1);\n index--;\n }\n event.isDone = true;\n event.action(currentFrame);\n } // Don't do anything if the event has already been done.\n }\n }\n }\n if (!returnValue) {\n this._stopped = true;\n }\n return returnValue;\n }\n}\n//# sourceMappingURL=runtimeAnimation.js.map","import { Vector3, Quaternion, Matrix, TmpVectors } from \"../Maths/math.vector.js\";\nimport { ArrayTools } from \"../Misc/arrayTools.js\";\nimport { Node } from \"../node.js\";\nimport { Space } from \"../Maths/math.axis.js\";\n/**\n * Class used to store bone information\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons\n */\nexport class Bone extends Node {\n /** @internal */\n get _matrix() {\n this._compose();\n return this._localMatrix;\n }\n /** @internal */\n set _matrix(value) {\n // skip if the matrices are the same\n if (value.updateFlag === this._localMatrix.updateFlag && !this._needToCompose) {\n return;\n }\n this._needToCompose = false; // in case there was a pending compose\n this._localMatrix.copyFrom(value);\n this._markAsDirtyAndDecompose();\n }\n /**\n * Create a new bone\n * @param name defines the bone name\n * @param skeleton defines the parent skeleton\n * @param parentBone defines the parent (can be null if the bone is the root)\n * @param localMatrix defines the local matrix (default: identity)\n * @param restMatrix defines the rest matrix (default: localMatrix)\n * @param bindMatrix defines the bind matrix (default: localMatrix)\n * @param index defines index of the bone in the hierarchy (default: null)\n */\n constructor(\n /**\n * defines the bone name\n */\n name, skeleton, parentBone = null, localMatrix = null, restMatrix = null, bindMatrix = null, index = null) {\n var _a;\n super(name, skeleton.getScene());\n this.name = name;\n /**\n * Gets the list of child bones\n */\n this.children = [];\n /** Gets the animations associated with this bone */\n this.animations = [];\n /**\n * @internal Internal only\n * Set this value to map this bone to a different index in the transform matrices\n * Set this value to -1 to exclude the bone from the transform matrices\n */\n this._index = null;\n this._scalingDeterminant = 1;\n this._needToDecompose = true;\n this._needToCompose = false;\n /** @internal */\n this._linkedTransformNode = null;\n /** @internal */\n this._waitingTransformNodeId = null;\n this._skeleton = skeleton;\n this._localMatrix = (_a = localMatrix === null || localMatrix === void 0 ? void 0 : localMatrix.clone()) !== null && _a !== void 0 ? _a : Matrix.Identity();\n this._restMatrix = restMatrix !== null && restMatrix !== void 0 ? restMatrix : this._localMatrix.clone();\n this._bindMatrix = bindMatrix !== null && bindMatrix !== void 0 ? bindMatrix : this._localMatrix.clone();\n this._index = index;\n this._absoluteMatrix = new Matrix();\n this._absoluteBindMatrix = new Matrix();\n this._absoluteInverseBindMatrix = new Matrix();\n this._finalMatrix = new Matrix();\n skeleton.bones.push(this);\n this.setParent(parentBone, false);\n this._updateAbsoluteBindMatrices();\n }\n /**\n * Gets the current object class name.\n * @returns the class name\n */\n getClassName() {\n return \"Bone\";\n }\n // Members\n /**\n * Gets the parent skeleton\n * @returns a skeleton\n */\n getSkeleton() {\n return this._skeleton;\n }\n get parent() {\n return this._parentNode;\n }\n /**\n * Gets parent bone\n * @returns a bone or null if the bone is the root of the bone hierarchy\n */\n getParent() {\n return this.parent;\n }\n /**\n * Returns an array containing the children of the bone\n * @returns an array containing the children of the bone (can be empty if the bone has no children)\n */\n getChildren() {\n return this.children;\n }\n /**\n * Gets the node index in matrix array generated for rendering\n * @returns the node index\n */\n getIndex() {\n return this._index === null ? this.getSkeleton().bones.indexOf(this) : this._index;\n }\n set parent(newParent) {\n this.setParent(newParent);\n }\n /**\n * Sets the parent bone\n * @param parent defines the parent (can be null if the bone is the root)\n * @param updateAbsoluteBindMatrices defines if the absolute bind and absolute inverse bind matrices must be updated\n */\n setParent(parent, updateAbsoluteBindMatrices = true) {\n if (this.parent === parent) {\n return;\n }\n if (this.parent) {\n const index = this.parent.children.indexOf(this);\n if (index !== -1) {\n this.parent.children.splice(index, 1);\n }\n }\n this._parentNode = parent;\n if (this.parent) {\n this.parent.children.push(this);\n }\n if (updateAbsoluteBindMatrices) {\n this._updateAbsoluteBindMatrices();\n }\n this.markAsDirty();\n }\n /**\n * Gets the local matrix\n * @returns the local matrix\n */\n getLocalMatrix() {\n this._compose();\n return this._localMatrix;\n }\n /**\n * Gets the bind matrix\n * @returns the bind matrix\n */\n getBindMatrix() {\n return this._bindMatrix;\n }\n /**\n * Gets the bind matrix.\n * @returns the bind matrix\n * @deprecated Please use getBindMatrix instead\n */\n getBaseMatrix() {\n return this.getBindMatrix();\n }\n /**\n * Gets the rest matrix\n * @returns the rest matrix\n */\n getRestMatrix() {\n return this._restMatrix;\n }\n /**\n * Gets the rest matrix\n * @returns the rest matrix\n * @deprecated Please use getRestMatrix instead\n */\n getRestPose() {\n return this.getRestMatrix();\n }\n /**\n * Sets the rest matrix\n * @param matrix the local-space rest matrix to set for this bone\n */\n setRestMatrix(matrix) {\n this._restMatrix.copyFrom(matrix);\n }\n /**\n * Sets the rest matrix\n * @param matrix the local-space rest to set for this bone\n * @deprecated Please use setRestMatrix instead\n */\n setRestPose(matrix) {\n this.setRestMatrix(matrix);\n }\n /**\n * Gets the bind matrix\n * @returns the bind matrix\n * @deprecated Please use getBindMatrix instead\n */\n getBindPose() {\n return this.getBindMatrix();\n }\n /**\n * Sets the bind matrix\n * This will trigger a recomputation of the absolute bind and absolute inverse bind matrices for this bone and its children\n * Note that the local matrix will also be set with the matrix passed in parameter!\n * @param matrix the local-space bind matrix to set for this bone\n */\n setBindMatrix(matrix) {\n this.updateMatrix(matrix);\n }\n /**\n * Sets the bind matrix\n * @param matrix the local-space bind to set for this bone\n * @deprecated Please use setBindMatrix instead\n */\n setBindPose(matrix) {\n this.setBindMatrix(matrix);\n }\n /**\n * Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)\n */\n getFinalMatrix() {\n return this._finalMatrix;\n }\n /**\n * Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)\n * @deprecated Please use getFinalMatrix instead\n */\n getWorldMatrix() {\n return this.getFinalMatrix();\n }\n /**\n * Sets the local matrix to the rest matrix\n */\n returnToRest() {\n var _a;\n if (this._linkedTransformNode) {\n const localScaling = TmpVectors.Vector3[0];\n const localRotation = TmpVectors.Quaternion[0];\n const localPosition = TmpVectors.Vector3[1];\n this.getRestMatrix().decompose(localScaling, localRotation, localPosition);\n this._linkedTransformNode.position.copyFrom(localPosition);\n this._linkedTransformNode.rotationQuaternion = (_a = this._linkedTransformNode.rotationQuaternion) !== null && _a !== void 0 ? _a : Quaternion.Identity();\n this._linkedTransformNode.rotationQuaternion.copyFrom(localRotation);\n this._linkedTransformNode.scaling.copyFrom(localScaling);\n }\n else {\n this._matrix = this._restMatrix;\n }\n }\n /**\n * Gets the inverse of the bind matrix, in world space (relative to the skeleton root)\n * @returns the inverse bind matrix, in world space\n */\n getAbsoluteInverseBindMatrix() {\n return this._absoluteInverseBindMatrix;\n }\n /**\n * Gets the inverse of the bind matrix, in world space (relative to the skeleton root)\n * @returns the inverse bind matrix, in world space\n * @deprecated Please use getAbsoluteInverseBindMatrix instead\n */\n getInvertedAbsoluteTransform() {\n return this.getAbsoluteInverseBindMatrix();\n }\n /**\n * Gets the bone matrix, in world space (relative to the skeleton root)\n * @returns the bone matrix, in world space\n */\n getAbsoluteMatrix() {\n return this._absoluteMatrix;\n }\n /**\n * Gets the bone matrix, in world space (relative to the skeleton root)\n * @returns the bone matrix, in world space\n * @deprecated Please use getAbsoluteMatrix instead\n */\n getAbsoluteTransform() {\n return this._absoluteMatrix;\n }\n /**\n * Links with the given transform node.\n * The local matrix of this bone is overwritten by the transform of the node every frame.\n * @param transformNode defines the transform node to link to\n */\n linkTransformNode(transformNode) {\n if (this._linkedTransformNode) {\n this._skeleton._numBonesWithLinkedTransformNode--;\n }\n this._linkedTransformNode = transformNode;\n if (this._linkedTransformNode) {\n this._skeleton._numBonesWithLinkedTransformNode++;\n }\n }\n // Properties (matches TransformNode properties)\n /**\n * Gets the node used to drive the bone's transformation\n * @returns a transform node or null\n */\n getTransformNode() {\n return this._linkedTransformNode;\n }\n /** Gets or sets current position (in local space) */\n get position() {\n this._decompose();\n return this._localPosition;\n }\n set position(newPosition) {\n this._decompose();\n this._localPosition.copyFrom(newPosition);\n this._markAsDirtyAndCompose();\n }\n /** Gets or sets current rotation (in local space) */\n get rotation() {\n return this.getRotation();\n }\n set rotation(newRotation) {\n this.setRotation(newRotation);\n }\n /** Gets or sets current rotation quaternion (in local space) */\n get rotationQuaternion() {\n this._decompose();\n return this._localRotation;\n }\n set rotationQuaternion(newRotation) {\n this.setRotationQuaternion(newRotation);\n }\n /** Gets or sets current scaling (in local space) */\n get scaling() {\n return this.getScale();\n }\n set scaling(newScaling) {\n this.setScale(newScaling);\n }\n /**\n * Gets the animation properties override\n */\n get animationPropertiesOverride() {\n return this._skeleton.animationPropertiesOverride;\n }\n // Methods\n _decompose() {\n if (!this._needToDecompose) {\n return;\n }\n this._needToDecompose = false;\n if (!this._localScaling) {\n this._localScaling = Vector3.Zero();\n this._localRotation = Quaternion.Zero();\n this._localPosition = Vector3.Zero();\n }\n this._localMatrix.decompose(this._localScaling, this._localRotation, this._localPosition);\n }\n _compose() {\n if (!this._needToCompose) {\n return;\n }\n if (!this._localScaling) {\n this._needToCompose = false;\n return;\n }\n this._needToCompose = false;\n Matrix.ComposeToRef(this._localScaling, this._localRotation, this._localPosition, this._localMatrix);\n }\n /**\n * Update the bind (and optionally the local) matrix\n * @param bindMatrix defines the new matrix to set to the bind/local matrix, in local space\n * @param updateAbsoluteBindMatrices defines if the absolute bind and absolute inverse bind matrices must be recomputed (default: true)\n * @param updateLocalMatrix defines if the local matrix should also be updated with the matrix passed in parameter (default: true)\n */\n updateMatrix(bindMatrix, updateAbsoluteBindMatrices = true, updateLocalMatrix = true) {\n this._bindMatrix.copyFrom(bindMatrix);\n if (updateAbsoluteBindMatrices) {\n this._updateAbsoluteBindMatrices();\n }\n if (updateLocalMatrix) {\n this._matrix = bindMatrix;\n }\n else {\n this.markAsDirty();\n }\n }\n /**\n * @internal\n */\n _updateAbsoluteBindMatrices(bindMatrix, updateChildren = true) {\n if (!bindMatrix) {\n bindMatrix = this._bindMatrix;\n }\n if (this.parent) {\n bindMatrix.multiplyToRef(this.parent._absoluteBindMatrix, this._absoluteBindMatrix);\n }\n else {\n this._absoluteBindMatrix.copyFrom(bindMatrix);\n }\n this._absoluteBindMatrix.invertToRef(this._absoluteInverseBindMatrix);\n if (updateChildren) {\n for (let index = 0; index < this.children.length; index++) {\n this.children[index]._updateAbsoluteBindMatrices();\n }\n }\n this._scalingDeterminant = this._absoluteBindMatrix.determinant() < 0 ? -1 : 1;\n }\n /**\n * Flag the bone as dirty (Forcing it to update everything)\n * @returns this bone\n */\n markAsDirty() {\n this._currentRenderId++;\n this._childUpdateId++;\n this._skeleton._markAsDirty();\n return this;\n }\n /** @internal */\n _markAsDirtyAndCompose() {\n this.markAsDirty();\n this._needToCompose = true;\n }\n _markAsDirtyAndDecompose() {\n this.markAsDirty();\n this._needToDecompose = true;\n }\n _updatePosition(vec, space = Space.LOCAL, tNode, translationMode = true) {\n const lm = this.getLocalMatrix();\n if (space == Space.LOCAL) {\n if (translationMode) {\n lm.addAtIndex(12, vec.x);\n lm.addAtIndex(13, vec.y);\n lm.addAtIndex(14, vec.z);\n }\n else {\n lm.setTranslationFromFloats(vec.x, vec.y, vec.z);\n }\n }\n else {\n let wm = null;\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\n if (tNode) {\n wm = tNode.getWorldMatrix();\n }\n this._skeleton.computeAbsoluteMatrices();\n const tmat = Bone._TmpMats[0];\n const tvec = Bone._TmpVecs[0];\n if (this.parent) {\n if (tNode && wm) {\n tmat.copyFrom(this.parent.getAbsoluteMatrix());\n tmat.multiplyToRef(wm, tmat);\n }\n else {\n tmat.copyFrom(this.parent.getAbsoluteMatrix());\n }\n }\n else {\n Matrix.IdentityToRef(tmat);\n }\n if (translationMode) {\n tmat.setTranslationFromFloats(0, 0, 0);\n }\n tmat.invert();\n Vector3.TransformCoordinatesToRef(vec, tmat, tvec);\n if (translationMode) {\n lm.addAtIndex(12, tvec.x);\n lm.addAtIndex(13, tvec.y);\n lm.addAtIndex(14, tvec.z);\n }\n else {\n lm.setTranslationFromFloats(tvec.x, tvec.y, tvec.z);\n }\n }\n this._markAsDirtyAndDecompose();\n }\n /**\n * Translate the bone in local or world space\n * @param vec The amount to translate the bone\n * @param space The space that the translation is in (default: Space.LOCAL)\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n */\n translate(vec, space = Space.LOCAL, tNode) {\n this._updatePosition(vec, space, tNode, true);\n }\n /**\n * Set the position of the bone in local or world space\n * @param position The position to set the bone\n * @param space The space that the position is in (default: Space.LOCAL)\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n */\n setPosition(position, space = Space.LOCAL, tNode) {\n this._updatePosition(position, space, tNode, false);\n }\n /**\n * Set the absolute position of the bone (world space)\n * @param position The position to set the bone\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n */\n setAbsolutePosition(position, tNode) {\n this.setPosition(position, Space.WORLD, tNode);\n }\n /**\n * Scale the bone on the x, y and z axes (in local space)\n * @param x The amount to scale the bone on the x axis\n * @param y The amount to scale the bone on the y axis\n * @param z The amount to scale the bone on the z axis\n * @param scaleChildren sets this to true if children of the bone should be scaled as well (false by default)\n */\n scale(x, y, z, scaleChildren = false) {\n const locMat = this.getLocalMatrix();\n // Apply new scaling on top of current local matrix\n const scaleMat = Bone._TmpMats[0];\n Matrix.ScalingToRef(x, y, z, scaleMat);\n scaleMat.multiplyToRef(locMat, locMat);\n // Invert scaling matrix and apply the inverse to all children\n scaleMat.invert();\n for (const child of this.children) {\n const cm = child.getLocalMatrix();\n cm.multiplyToRef(scaleMat, cm);\n cm.multiplyAtIndex(12, x);\n cm.multiplyAtIndex(13, y);\n cm.multiplyAtIndex(14, z);\n child._markAsDirtyAndDecompose();\n }\n this._markAsDirtyAndDecompose();\n if (scaleChildren) {\n for (const child of this.children) {\n child.scale(x, y, z, scaleChildren);\n }\n }\n }\n /**\n * Set the bone scaling in local space\n * @param scale defines the scaling vector\n */\n setScale(scale) {\n this._decompose();\n this._localScaling.copyFrom(scale);\n this._markAsDirtyAndCompose();\n }\n /**\n * Gets the current scaling in local space\n * @returns the current scaling vector\n */\n getScale() {\n this._decompose();\n return this._localScaling;\n }\n /**\n * Gets the current scaling in local space and stores it in a target vector\n * @param result defines the target vector\n */\n getScaleToRef(result) {\n this._decompose();\n result.copyFrom(this._localScaling);\n }\n /**\n * Set the yaw, pitch, and roll of the bone in local or world space\n * @param yaw The rotation of the bone on the y axis\n * @param pitch The rotation of the bone on the x axis\n * @param roll The rotation of the bone on the z axis\n * @param space The space that the axes of rotation are in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n */\n setYawPitchRoll(yaw, pitch, roll, space = Space.LOCAL, tNode) {\n if (space === Space.LOCAL) {\n const quat = Bone._TmpQuat;\n Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, quat);\n this.setRotationQuaternion(quat, space, tNode);\n return;\n }\n const rotMatInv = Bone._TmpMats[0];\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\n return;\n }\n const rotMat = Bone._TmpMats[1];\n Matrix.RotationYawPitchRollToRef(yaw, pitch, roll, rotMat);\n rotMatInv.multiplyToRef(rotMat, rotMat);\n this._rotateWithMatrix(rotMat, space, tNode);\n }\n /**\n * Add a rotation to the bone on an axis in local or world space\n * @param axis The axis to rotate the bone on\n * @param amount The amount to rotate the bone\n * @param space The space that the axis is in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n */\n rotate(axis, amount, space = Space.LOCAL, tNode) {\n const rmat = Bone._TmpMats[0];\n rmat.setTranslationFromFloats(0, 0, 0);\n Matrix.RotationAxisToRef(axis, amount, rmat);\n this._rotateWithMatrix(rmat, space, tNode);\n }\n /**\n * Set the rotation of the bone to a particular axis angle in local or world space\n * @param axis The axis to rotate the bone on\n * @param angle The angle that the bone should be rotated to\n * @param space The space that the axis is in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n */\n setAxisAngle(axis, angle, space = Space.LOCAL, tNode) {\n if (space === Space.LOCAL) {\n const quat = Bone._TmpQuat;\n Quaternion.RotationAxisToRef(axis, angle, quat);\n this.setRotationQuaternion(quat, space, tNode);\n return;\n }\n const rotMatInv = Bone._TmpMats[0];\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\n return;\n }\n const rotMat = Bone._TmpMats[1];\n Matrix.RotationAxisToRef(axis, angle, rotMat);\n rotMatInv.multiplyToRef(rotMat, rotMat);\n this._rotateWithMatrix(rotMat, space, tNode);\n }\n /**\n * Set the euler rotation of the bone in local or world space\n * @param rotation The euler rotation that the bone should be set to\n * @param space The space that the rotation is in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n */\n setRotation(rotation, space = Space.LOCAL, tNode) {\n this.setYawPitchRoll(rotation.y, rotation.x, rotation.z, space, tNode);\n }\n /**\n * Set the quaternion rotation of the bone in local or world space\n * @param quat The quaternion rotation that the bone should be set to\n * @param space The space that the rotation is in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n */\n setRotationQuaternion(quat, space = Space.LOCAL, tNode) {\n if (space === Space.LOCAL) {\n this._decompose();\n this._localRotation.copyFrom(quat);\n this._markAsDirtyAndCompose();\n return;\n }\n const rotMatInv = Bone._TmpMats[0];\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\n return;\n }\n const rotMat = Bone._TmpMats[1];\n Matrix.FromQuaternionToRef(quat, rotMat);\n rotMatInv.multiplyToRef(rotMat, rotMat);\n this._rotateWithMatrix(rotMat, space, tNode);\n }\n /**\n * Set the rotation matrix of the bone in local or world space\n * @param rotMat The rotation matrix that the bone should be set to\n * @param space The space that the rotation is in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n */\n setRotationMatrix(rotMat, space = Space.LOCAL, tNode) {\n if (space === Space.LOCAL) {\n const quat = Bone._TmpQuat;\n Quaternion.FromRotationMatrixToRef(rotMat, quat);\n this.setRotationQuaternion(quat, space, tNode);\n return;\n }\n const rotMatInv = Bone._TmpMats[0];\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\n return;\n }\n const rotMat2 = Bone._TmpMats[1];\n rotMat2.copyFrom(rotMat);\n rotMatInv.multiplyToRef(rotMat, rotMat2);\n this._rotateWithMatrix(rotMat2, space, tNode);\n }\n _rotateWithMatrix(rmat, space = Space.LOCAL, tNode) {\n const lmat = this.getLocalMatrix();\n const lx = lmat.m[12];\n const ly = lmat.m[13];\n const lz = lmat.m[14];\n const parent = this.getParent();\n const parentScale = Bone._TmpMats[3];\n const parentScaleInv = Bone._TmpMats[4];\n if (parent && space == Space.WORLD) {\n if (tNode) {\n parentScale.copyFrom(tNode.getWorldMatrix());\n parent.getAbsoluteMatrix().multiplyToRef(parentScale, parentScale);\n }\n else {\n parentScale.copyFrom(parent.getAbsoluteMatrix());\n }\n parentScaleInv.copyFrom(parentScale);\n parentScaleInv.invert();\n lmat.multiplyToRef(parentScale, lmat);\n lmat.multiplyToRef(rmat, lmat);\n lmat.multiplyToRef(parentScaleInv, lmat);\n }\n else {\n if (space == Space.WORLD && tNode) {\n parentScale.copyFrom(tNode.getWorldMatrix());\n parentScaleInv.copyFrom(parentScale);\n parentScaleInv.invert();\n lmat.multiplyToRef(parentScale, lmat);\n lmat.multiplyToRef(rmat, lmat);\n lmat.multiplyToRef(parentScaleInv, lmat);\n }\n else {\n lmat.multiplyToRef(rmat, lmat);\n }\n }\n lmat.setTranslationFromFloats(lx, ly, lz);\n this.computeAbsoluteMatrices();\n this._markAsDirtyAndDecompose();\n }\n _getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode) {\n const scaleMatrix = Bone._TmpMats[2];\n rotMatInv.copyFrom(this.getAbsoluteMatrix());\n if (tNode) {\n rotMatInv.multiplyToRef(tNode.getWorldMatrix(), rotMatInv);\n Matrix.ScalingToRef(tNode.scaling.x, tNode.scaling.y, tNode.scaling.z, scaleMatrix);\n }\n else {\n Matrix.IdentityToRef(scaleMatrix);\n }\n rotMatInv.invert();\n if (isNaN(rotMatInv.m[0])) {\n // Matrix failed to invert.\n // This can happen if scale is zero for example.\n return false;\n }\n scaleMatrix.multiplyAtIndex(0, this._scalingDeterminant);\n rotMatInv.multiplyToRef(scaleMatrix, rotMatInv);\n return true;\n }\n /**\n * Get the position of the bone in local or world space\n * @param space The space that the returned position is in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @returns The position of the bone\n */\n getPosition(space = Space.LOCAL, tNode = null) {\n const pos = Vector3.Zero();\n this.getPositionToRef(space, tNode, pos);\n return pos;\n }\n /**\n * Copy the position of the bone to a vector3 in local or world space\n * @param space The space that the returned position is in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @param result The vector3 to copy the position to\n */\n getPositionToRef(space = Space.LOCAL, tNode, result) {\n if (space == Space.LOCAL) {\n const lm = this.getLocalMatrix();\n result.x = lm.m[12];\n result.y = lm.m[13];\n result.z = lm.m[14];\n }\n else {\n let wm = null;\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\n if (tNode) {\n wm = tNode.getWorldMatrix();\n }\n this._skeleton.computeAbsoluteMatrices();\n let tmat = Bone._TmpMats[0];\n if (tNode && wm) {\n tmat.copyFrom(this.getAbsoluteMatrix());\n tmat.multiplyToRef(wm, tmat);\n }\n else {\n tmat = this.getAbsoluteMatrix();\n }\n result.x = tmat.m[12];\n result.y = tmat.m[13];\n result.z = tmat.m[14];\n }\n }\n /**\n * Get the absolute position of the bone (world space)\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @returns The absolute position of the bone\n */\n getAbsolutePosition(tNode = null) {\n const pos = Vector3.Zero();\n this.getPositionToRef(Space.WORLD, tNode, pos);\n return pos;\n }\n /**\n * Copy the absolute position of the bone (world space) to the result param\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @param result The vector3 to copy the absolute position to\n */\n getAbsolutePositionToRef(tNode, result) {\n this.getPositionToRef(Space.WORLD, tNode, result);\n }\n /**\n * Compute the absolute matrices of this bone and its children\n */\n computeAbsoluteMatrices() {\n this._compose();\n if (this.parent) {\n this._localMatrix.multiplyToRef(this.parent._absoluteMatrix, this._absoluteMatrix);\n }\n else {\n this._absoluteMatrix.copyFrom(this._localMatrix);\n const poseMatrix = this._skeleton.getPoseMatrix();\n if (poseMatrix) {\n this._absoluteMatrix.multiplyToRef(poseMatrix, this._absoluteMatrix);\n }\n }\n const children = this.children;\n const len = children.length;\n for (let i = 0; i < len; i++) {\n children[i].computeAbsoluteMatrices();\n }\n }\n /**\n * Compute the absolute matrices of this bone and its children\n * @deprecated Please use computeAbsoluteMatrices instead\n */\n computeAbsoluteTransforms() {\n this.computeAbsoluteMatrices();\n }\n /**\n * Get the world direction from an axis that is in the local space of the bone\n * @param localAxis The local direction that is used to compute the world direction\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @returns The world direction\n */\n getDirection(localAxis, tNode = null) {\n const result = Vector3.Zero();\n this.getDirectionToRef(localAxis, tNode, result);\n return result;\n }\n /**\n * Copy the world direction to a vector3 from an axis that is in the local space of the bone\n * @param localAxis The local direction that is used to compute the world direction\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @param result The vector3 that the world direction will be copied to\n */\n getDirectionToRef(localAxis, tNode = null, result) {\n let wm = null;\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\n if (tNode) {\n wm = tNode.getWorldMatrix();\n }\n this._skeleton.computeAbsoluteMatrices();\n const mat = Bone._TmpMats[0];\n mat.copyFrom(this.getAbsoluteMatrix());\n if (tNode && wm) {\n mat.multiplyToRef(wm, mat);\n }\n Vector3.TransformNormalToRef(localAxis, mat, result);\n result.normalize();\n }\n /**\n * Get the euler rotation of the bone in local or world space\n * @param space The space that the rotation should be in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @returns The euler rotation\n */\n getRotation(space = Space.LOCAL, tNode = null) {\n const result = Vector3.Zero();\n this.getRotationToRef(space, tNode, result);\n return result;\n }\n /**\n * Copy the euler rotation of the bone to a vector3. The rotation can be in either local or world space\n * @param space The space that the rotation should be in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @param result The vector3 that the rotation should be copied to\n */\n getRotationToRef(space = Space.LOCAL, tNode = null, result) {\n const quat = Bone._TmpQuat;\n this.getRotationQuaternionToRef(space, tNode, quat);\n quat.toEulerAnglesToRef(result);\n }\n /**\n * Get the quaternion rotation of the bone in either local or world space\n * @param space The space that the rotation should be in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @returns The quaternion rotation\n */\n getRotationQuaternion(space = Space.LOCAL, tNode = null) {\n const result = Quaternion.Identity();\n this.getRotationQuaternionToRef(space, tNode, result);\n return result;\n }\n /**\n * Copy the quaternion rotation of the bone to a quaternion. The rotation can be in either local or world space\n * @param space The space that the rotation should be in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @param result The quaternion that the rotation should be copied to\n */\n getRotationQuaternionToRef(space = Space.LOCAL, tNode = null, result) {\n if (space == Space.LOCAL) {\n this._decompose();\n result.copyFrom(this._localRotation);\n }\n else {\n const mat = Bone._TmpMats[0];\n const amat = this.getAbsoluteMatrix();\n if (tNode) {\n amat.multiplyToRef(tNode.getWorldMatrix(), mat);\n }\n else {\n mat.copyFrom(amat);\n }\n mat.multiplyAtIndex(0, this._scalingDeterminant);\n mat.multiplyAtIndex(1, this._scalingDeterminant);\n mat.multiplyAtIndex(2, this._scalingDeterminant);\n mat.decompose(undefined, result, undefined);\n }\n }\n /**\n * Get the rotation matrix of the bone in local or world space\n * @param space The space that the rotation should be in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @returns The rotation matrix\n */\n getRotationMatrix(space = Space.LOCAL, tNode) {\n const result = Matrix.Identity();\n this.getRotationMatrixToRef(space, tNode, result);\n return result;\n }\n /**\n * Copy the rotation matrix of the bone to a matrix. The rotation can be in either local or world space\n * @param space The space that the rotation should be in\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @param result The quaternion that the rotation should be copied to\n */\n getRotationMatrixToRef(space = Space.LOCAL, tNode, result) {\n if (space == Space.LOCAL) {\n this.getLocalMatrix().getRotationMatrixToRef(result);\n }\n else {\n const mat = Bone._TmpMats[0];\n const amat = this.getAbsoluteMatrix();\n if (tNode) {\n amat.multiplyToRef(tNode.getWorldMatrix(), mat);\n }\n else {\n mat.copyFrom(amat);\n }\n mat.multiplyAtIndex(0, this._scalingDeterminant);\n mat.multiplyAtIndex(1, this._scalingDeterminant);\n mat.multiplyAtIndex(2, this._scalingDeterminant);\n mat.getRotationMatrixToRef(result);\n }\n }\n /**\n * Get the world position of a point that is in the local space of the bone\n * @param position The local position\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @returns The world position\n */\n getAbsolutePositionFromLocal(position, tNode = null) {\n const result = Vector3.Zero();\n this.getAbsolutePositionFromLocalToRef(position, tNode, result);\n return result;\n }\n /**\n * Get the world position of a point that is in the local space of the bone and copy it to the result param\n * @param position The local position\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @param result The vector3 that the world position should be copied to\n */\n getAbsolutePositionFromLocalToRef(position, tNode = null, result) {\n let wm = null;\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\n if (tNode) {\n wm = tNode.getWorldMatrix();\n }\n this._skeleton.computeAbsoluteMatrices();\n const tmat = Bone._TmpMats[0];\n tmat.copyFrom(this.getAbsoluteMatrix());\n if (tNode && wm) {\n tmat.multiplyToRef(wm, tmat);\n }\n Vector3.TransformCoordinatesToRef(position, tmat, result);\n }\n /**\n * Get the local position of a point that is in world space\n * @param position The world position\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @returns The local position\n */\n getLocalPositionFromAbsolute(position, tNode = null) {\n const result = Vector3.Zero();\n this.getLocalPositionFromAbsoluteToRef(position, tNode, result);\n return result;\n }\n /**\n * Get the local position of a point that is in world space and copy it to the result param\n * @param position The world position\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\n * @param result The vector3 that the local position should be copied to\n */\n getLocalPositionFromAbsoluteToRef(position, tNode = null, result) {\n let wm = null;\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\n if (tNode) {\n wm = tNode.getWorldMatrix();\n }\n this._skeleton.computeAbsoluteMatrices();\n const tmat = Bone._TmpMats[0];\n tmat.copyFrom(this.getAbsoluteMatrix());\n if (tNode && wm) {\n tmat.multiplyToRef(wm, tmat);\n }\n tmat.invert();\n Vector3.TransformCoordinatesToRef(position, tmat, result);\n }\n /**\n * Set the current local matrix as the restMatrix for this bone.\n */\n setCurrentPoseAsRest() {\n this.setRestMatrix(this.getLocalMatrix());\n }\n}\nBone._TmpVecs = ArrayTools.BuildArray(2, Vector3.Zero);\nBone._TmpQuat = Quaternion.Identity();\nBone._TmpMats = ArrayTools.BuildArray(5, Matrix.Identity);\n//# sourceMappingURL=bone.js.map","import { Animation } from \"./animation.js\";\nimport { RuntimeAnimation } from \"./runtimeAnimation.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { Scene } from \"../scene.js\";\nimport { Matrix, Quaternion, Vector3, TmpVectors } from \"../Maths/math.vector.js\";\nimport { PrecisionDate } from \"../Misc/precisionDate.js\";\nimport { Bone } from \"../Bones/bone.js\";\n/**\n * Class used to store an actual running animation\n */\nexport class Animatable {\n /**\n * Gets the root Animatable used to synchronize and normalize animations\n */\n get syncRoot() {\n return this._syncRoot;\n }\n /**\n * Gets the current frame of the first RuntimeAnimation\n * Used to synchronize Animatables\n */\n get masterFrame() {\n if (this._runtimeAnimations.length === 0) {\n return 0;\n }\n return this._runtimeAnimations[0].currentFrame;\n }\n /**\n * Gets or sets the animatable weight (-1.0 by default meaning not weighted)\n */\n get weight() {\n return this._weight;\n }\n set weight(value) {\n if (value === -1) {\n // -1 is ok and means no weight\n this._weight = -1;\n return;\n }\n // Else weight must be in [0, 1] range\n this._weight = Math.min(Math.max(value, 0), 1.0);\n }\n /**\n * Gets or sets the speed ratio to apply to the animatable (1.0 by default)\n */\n get speedRatio() {\n return this._speedRatio;\n }\n set speedRatio(value) {\n for (let index = 0; index < this._runtimeAnimations.length; index++) {\n const animation = this._runtimeAnimations[index];\n animation._prepareForSpeedRatioChange(value);\n }\n this._speedRatio = value;\n // Resync _manualJumpDelay in case goToFrame was called before speedRatio was set.\n if (this._goToFrame !== null) {\n this.goToFrame(this._goToFrame);\n }\n }\n /**\n * Gets the elapsed time since the animatable started in milliseconds\n */\n get elapsedTime() {\n return this._localDelayOffset === null ? 0 : this._scene._animationTime - this._localDelayOffset;\n }\n /**\n * Creates a new Animatable\n * @param scene defines the hosting scene\n * @param target defines the target object\n * @param fromFrame defines the starting frame number (default is 0)\n * @param toFrame defines the ending frame number (default is 100)\n * @param loopAnimation defines if the animation must loop (default is false)\n * @param speedRatio defines the factor to apply to animation speed (default is 1)\n * @param onAnimationEnd defines a callback to call when animation ends if it is not looping\n * @param animations defines a group of animation to add to the new Animatable\n * @param onAnimationLoop defines a callback to call when animation loops\n * @param isAdditive defines whether the animation should be evaluated additively\n * @param playOrder defines the order in which this animatable should be processed in the list of active animatables (default: 0)\n */\n constructor(scene, \n /** defines the target object */\n target, \n /** defines the starting frame number (default is 0) */\n fromFrame = 0, \n /** defines the ending frame number (default is 100) */\n toFrame = 100, \n /** defines if the animation must loop (default is false) */\n loopAnimation = false, speedRatio = 1.0, \n /** defines a callback to call when animation ends if it is not looping */\n onAnimationEnd, animations, \n /** defines a callback to call when animation loops */\n onAnimationLoop, \n /** defines whether the animation should be evaluated additively */\n isAdditive = false, \n /** defines the order in which this animatable should be processed in the list of active animatables (default: 0) */\n playOrder = 0) {\n this.target = target;\n this.fromFrame = fromFrame;\n this.toFrame = toFrame;\n this.loopAnimation = loopAnimation;\n this.onAnimationEnd = onAnimationEnd;\n this.onAnimationLoop = onAnimationLoop;\n this.isAdditive = isAdditive;\n this.playOrder = playOrder;\n this._localDelayOffset = null;\n this._pausedDelay = null;\n this._manualJumpDelay = null;\n /** @hidden */\n this._runtimeAnimations = new Array();\n this._paused = false;\n this._speedRatio = 1;\n this._weight = -1.0;\n this._syncRoot = null;\n this._frameToSyncFromJump = null;\n this._goToFrame = null;\n /**\n * Gets or sets a boolean indicating if the animatable must be disposed and removed at the end of the animation.\n * This will only apply for non looping animation (default is true)\n */\n this.disposeOnEnd = true;\n /**\n * Gets a boolean indicating if the animation has started\n */\n this.animationStarted = false;\n /**\n * Observer raised when the animation ends\n */\n this.onAnimationEndObservable = new Observable();\n /**\n * Observer raised when the animation loops\n */\n this.onAnimationLoopObservable = new Observable();\n this._scene = scene;\n if (animations) {\n this.appendAnimations(target, animations);\n }\n this._speedRatio = speedRatio;\n scene._activeAnimatables.push(this);\n }\n // Methods\n /**\n * Synchronize and normalize current Animatable with a source Animatable\n * This is useful when using animation weights and when animations are not of the same length\n * @param root defines the root Animatable to synchronize with (null to stop synchronizing)\n * @returns the current Animatable\n */\n syncWith(root) {\n this._syncRoot = root;\n if (root) {\n // Make sure this animatable will animate after the root\n const index = this._scene._activeAnimatables.indexOf(this);\n if (index > -1) {\n this._scene._activeAnimatables.splice(index, 1);\n this._scene._activeAnimatables.push(this);\n }\n }\n return this;\n }\n /**\n * Gets the list of runtime animations\n * @returns an array of RuntimeAnimation\n */\n getAnimations() {\n return this._runtimeAnimations;\n }\n /**\n * Adds more animations to the current animatable\n * @param target defines the target of the animations\n * @param animations defines the new animations to add\n */\n appendAnimations(target, animations) {\n for (let index = 0; index < animations.length; index++) {\n const animation = animations[index];\n const newRuntimeAnimation = new RuntimeAnimation(target, animation, this._scene, this);\n newRuntimeAnimation._onLoop = () => {\n this.onAnimationLoopObservable.notifyObservers(this);\n if (this.onAnimationLoop) {\n this.onAnimationLoop();\n }\n };\n this._runtimeAnimations.push(newRuntimeAnimation);\n }\n }\n /**\n * Gets the source animation for a specific property\n * @param property defines the property to look for\n * @returns null or the source animation for the given property\n */\n getAnimationByTargetProperty(property) {\n const runtimeAnimations = this._runtimeAnimations;\n for (let index = 0; index < runtimeAnimations.length; index++) {\n if (runtimeAnimations[index].animation.targetProperty === property) {\n return runtimeAnimations[index].animation;\n }\n }\n return null;\n }\n /**\n * Gets the runtime animation for a specific property\n * @param property defines the property to look for\n * @returns null or the runtime animation for the given property\n */\n getRuntimeAnimationByTargetProperty(property) {\n const runtimeAnimations = this._runtimeAnimations;\n for (let index = 0; index < runtimeAnimations.length; index++) {\n if (runtimeAnimations[index].animation.targetProperty === property) {\n return runtimeAnimations[index];\n }\n }\n return null;\n }\n /**\n * Resets the animatable to its original state\n */\n reset() {\n const runtimeAnimations = this._runtimeAnimations;\n for (let index = 0; index < runtimeAnimations.length; index++) {\n runtimeAnimations[index].reset(true);\n }\n this._localDelayOffset = null;\n this._pausedDelay = null;\n }\n /**\n * Allows the animatable to blend with current running animations\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-blending\n * @param blendingSpeed defines the blending speed to use\n */\n enableBlending(blendingSpeed) {\n const runtimeAnimations = this._runtimeAnimations;\n for (let index = 0; index < runtimeAnimations.length; index++) {\n runtimeAnimations[index].animation.enableBlending = true;\n runtimeAnimations[index].animation.blendingSpeed = blendingSpeed;\n }\n }\n /**\n * Disable animation blending\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-blending\n */\n disableBlending() {\n const runtimeAnimations = this._runtimeAnimations;\n for (let index = 0; index < runtimeAnimations.length; index++) {\n runtimeAnimations[index].animation.enableBlending = false;\n }\n }\n /**\n * Jump directly to a given frame\n * @param frame defines the frame to jump to\n */\n goToFrame(frame) {\n var _a;\n const runtimeAnimations = this._runtimeAnimations;\n if (runtimeAnimations[0]) {\n const fps = runtimeAnimations[0].animation.framePerSecond;\n this._frameToSyncFromJump = (_a = this._frameToSyncFromJump) !== null && _a !== void 0 ? _a : runtimeAnimations[0].currentFrame;\n const delay = this.speedRatio === 0 ? 0 : (((frame - this._frameToSyncFromJump) / fps) * 1000) / this.speedRatio;\n this._manualJumpDelay = -delay;\n }\n for (let index = 0; index < runtimeAnimations.length; index++) {\n runtimeAnimations[index].goToFrame(frame);\n }\n this._goToFrame = frame;\n }\n /**\n * Returns true if the animations for this animatable are paused\n */\n get paused() {\n return this._paused;\n }\n /**\n * Pause the animation\n */\n pause() {\n if (this._paused) {\n return;\n }\n this._paused = true;\n }\n /**\n * Restart the animation\n */\n restart() {\n this._paused = false;\n }\n _raiseOnAnimationEnd() {\n if (this.onAnimationEnd) {\n this.onAnimationEnd();\n }\n this.onAnimationEndObservable.notifyObservers(this);\n }\n /**\n * Stop and delete the current animation\n * @param animationName defines a string used to only stop some of the runtime animations instead of all\n * @param targetMask a function that determines if the animation should be stopped based on its target (all animations will be stopped if both this and animationName are empty)\n * @param useGlobalSplice if true, the animatables will be removed by the caller of this function (false by default)\n */\n stop(animationName, targetMask, useGlobalSplice = false) {\n if (animationName || targetMask) {\n const idx = this._scene._activeAnimatables.indexOf(this);\n if (idx > -1) {\n const runtimeAnimations = this._runtimeAnimations;\n for (let index = runtimeAnimations.length - 1; index >= 0; index--) {\n const runtimeAnimation = runtimeAnimations[index];\n if (animationName && runtimeAnimation.animation.name != animationName) {\n continue;\n }\n if (targetMask && !targetMask(runtimeAnimation.target)) {\n continue;\n }\n runtimeAnimation.dispose();\n runtimeAnimations.splice(index, 1);\n }\n if (runtimeAnimations.length == 0) {\n if (!useGlobalSplice) {\n this._scene._activeAnimatables.splice(idx, 1);\n }\n this._raiseOnAnimationEnd();\n }\n }\n }\n else {\n const index = this._scene._activeAnimatables.indexOf(this);\n if (index > -1) {\n if (!useGlobalSplice) {\n this._scene._activeAnimatables.splice(index, 1);\n }\n const runtimeAnimations = this._runtimeAnimations;\n for (let index = 0; index < runtimeAnimations.length; index++) {\n runtimeAnimations[index].dispose();\n }\n this._runtimeAnimations.length = 0;\n this._raiseOnAnimationEnd();\n }\n }\n }\n /**\n * Wait asynchronously for the animation to end\n * @returns a promise which will be fulfilled when the animation ends\n */\n waitAsync() {\n return new Promise((resolve) => {\n this.onAnimationEndObservable.add(() => {\n resolve(this);\n }, undefined, undefined, this, true);\n });\n }\n /**\n * @internal\n */\n _animate(delay) {\n if (this._paused) {\n this.animationStarted = false;\n if (this._pausedDelay === null) {\n this._pausedDelay = delay;\n }\n return true;\n }\n if (this._localDelayOffset === null) {\n this._localDelayOffset = delay;\n this._pausedDelay = null;\n }\n else if (this._pausedDelay !== null) {\n this._localDelayOffset += delay - this._pausedDelay;\n this._pausedDelay = null;\n }\n if (this._manualJumpDelay !== null) {\n this._localDelayOffset += this._manualJumpDelay;\n this._manualJumpDelay = null;\n this._frameToSyncFromJump = null;\n }\n this._goToFrame = null;\n if (this._weight === 0) {\n // We consider that an animatable with a weight === 0 is \"actively\" paused\n return true;\n }\n // Animating\n let running = false;\n const runtimeAnimations = this._runtimeAnimations;\n let index;\n for (index = 0; index < runtimeAnimations.length; index++) {\n const animation = runtimeAnimations[index];\n const isRunning = animation.animate(delay - this._localDelayOffset, this.fromFrame, this.toFrame, this.loopAnimation, this._speedRatio, this._weight);\n running = running || isRunning;\n }\n this.animationStarted = running;\n if (!running) {\n if (this.disposeOnEnd) {\n // Remove from active animatables\n index = this._scene._activeAnimatables.indexOf(this);\n this._scene._activeAnimatables.splice(index, 1);\n // Dispose all runtime animations\n for (index = 0; index < runtimeAnimations.length; index++) {\n runtimeAnimations[index].dispose();\n }\n }\n this._raiseOnAnimationEnd();\n if (this.disposeOnEnd) {\n this.onAnimationEnd = null;\n this.onAnimationLoop = null;\n this.onAnimationLoopObservable.clear();\n this.onAnimationEndObservable.clear();\n }\n }\n return running;\n }\n}\nScene.prototype._animate = function () {\n if (!this.animationsEnabled) {\n return;\n }\n // Getting time\n const now = PrecisionDate.Now;\n if (!this._animationTimeLast) {\n if (this._pendingData.length > 0) {\n return;\n }\n this._animationTimeLast = now;\n }\n this.deltaTime = this.useConstantAnimationDeltaTime ? 16.0 : (now - this._animationTimeLast) * this.animationTimeScale;\n this._animationTimeLast = now;\n const animatables = this._activeAnimatables;\n if (animatables.length === 0) {\n return;\n }\n this._animationTime += this.deltaTime;\n const animationTime = this._animationTime;\n for (let index = 0; index < animatables.length; index++) {\n const animatable = animatables[index];\n if (!animatable._animate(animationTime) && animatable.disposeOnEnd) {\n index--; // Array was updated\n }\n }\n // Late animation bindings\n this._processLateAnimationBindings();\n};\nScene.prototype.sortActiveAnimatables = function () {\n this._activeAnimatables.sort((a, b) => {\n return a.playOrder - b.playOrder;\n });\n};\nScene.prototype.beginWeightedAnimation = function (target, from, to, weight = 1.0, loop, speedRatio = 1.0, onAnimationEnd, animatable, targetMask, onAnimationLoop, isAdditive = false) {\n const returnedAnimatable = this.beginAnimation(target, from, to, loop, speedRatio, onAnimationEnd, animatable, false, targetMask, onAnimationLoop, isAdditive);\n returnedAnimatable.weight = weight;\n return returnedAnimatable;\n};\nScene.prototype.beginAnimation = function (target, from, to, loop, speedRatio = 1.0, onAnimationEnd, animatable, stopCurrent = true, targetMask, onAnimationLoop, isAdditive = false) {\n if (from > to && speedRatio > 0) {\n speedRatio *= -1;\n }\n if (stopCurrent) {\n this.stopAnimation(target, undefined, targetMask);\n }\n if (!animatable) {\n animatable = new Animatable(this, target, from, to, loop, speedRatio, onAnimationEnd, undefined, onAnimationLoop, isAdditive);\n }\n const shouldRunTargetAnimations = targetMask ? targetMask(target) : true;\n // Local animations\n if (target.animations && shouldRunTargetAnimations) {\n animatable.appendAnimations(target, target.animations);\n }\n // Children animations\n if (target.getAnimatables) {\n const animatables = target.getAnimatables();\n for (let index = 0; index < animatables.length; index++) {\n this.beginAnimation(animatables[index], from, to, loop, speedRatio, onAnimationEnd, animatable, stopCurrent, targetMask, onAnimationLoop);\n }\n }\n animatable.reset();\n return animatable;\n};\nScene.prototype.beginHierarchyAnimation = function (target, directDescendantsOnly, from, to, loop, speedRatio = 1.0, onAnimationEnd, animatable, stopCurrent = true, targetMask, onAnimationLoop, isAdditive = false) {\n const children = target.getDescendants(directDescendantsOnly);\n const result = [];\n result.push(this.beginAnimation(target, from, to, loop, speedRatio, onAnimationEnd, animatable, stopCurrent, targetMask, undefined, isAdditive));\n for (const child of children) {\n result.push(this.beginAnimation(child, from, to, loop, speedRatio, onAnimationEnd, animatable, stopCurrent, targetMask, undefined, isAdditive));\n }\n return result;\n};\nScene.prototype.beginDirectAnimation = function (target, animations, from, to, loop, speedRatio, onAnimationEnd, onAnimationLoop, isAdditive = false) {\n if (speedRatio === undefined) {\n speedRatio = 1.0;\n }\n if (from > to && speedRatio > 0) {\n speedRatio *= -1;\n }\n else if (to > from && speedRatio < 0) {\n const temp = to;\n to = from;\n from = temp;\n }\n const animatable = new Animatable(this, target, from, to, loop, speedRatio, onAnimationEnd, animations, onAnimationLoop, isAdditive);\n return animatable;\n};\nScene.prototype.beginDirectHierarchyAnimation = function (target, directDescendantsOnly, animations, from, to, loop, speedRatio, onAnimationEnd, onAnimationLoop, isAdditive = false) {\n const children = target.getDescendants(directDescendantsOnly);\n const result = [];\n result.push(this.beginDirectAnimation(target, animations, from, to, loop, speedRatio, onAnimationEnd, onAnimationLoop, isAdditive));\n for (const child of children) {\n result.push(this.beginDirectAnimation(child, animations, from, to, loop, speedRatio, onAnimationEnd, onAnimationLoop, isAdditive));\n }\n return result;\n};\nScene.prototype.getAnimatableByTarget = function (target) {\n for (let index = 0; index < this._activeAnimatables.length; index++) {\n if (this._activeAnimatables[index].target === target) {\n return this._activeAnimatables[index];\n }\n }\n return null;\n};\nScene.prototype.getAllAnimatablesByTarget = function (target) {\n const result = [];\n for (let index = 0; index < this._activeAnimatables.length; index++) {\n if (this._activeAnimatables[index].target === target) {\n result.push(this._activeAnimatables[index]);\n }\n }\n return result;\n};\n/**\n * Will stop the animation of the given target\n * @param target - the target\n * @param animationName - the name of the animation to stop (all animations will be stopped if both this and targetMask are empty)\n * @param targetMask - a function that determines if the animation should be stopped based on its target (all animations will be stopped if both this and animationName are empty)\n */\nScene.prototype.stopAnimation = function (target, animationName, targetMask) {\n const animatables = this.getAllAnimatablesByTarget(target);\n for (const animatable of animatables) {\n animatable.stop(animationName, targetMask);\n }\n};\n/**\n * Stops and removes all animations that have been applied to the scene\n */\nScene.prototype.stopAllAnimations = function () {\n if (this._activeAnimatables) {\n for (let i = 0; i < this._activeAnimatables.length; i++) {\n this._activeAnimatables[i].stop(undefined, undefined, true);\n }\n this._activeAnimatables.length = 0;\n }\n for (const group of this.animationGroups) {\n group.stop();\n }\n};\nScene.prototype._registerTargetForLateAnimationBinding = function (runtimeAnimation, originalValue) {\n const target = runtimeAnimation.target;\n this._registeredForLateAnimationBindings.pushNoDuplicate(target);\n if (!target._lateAnimationHolders) {\n target._lateAnimationHolders = {};\n }\n if (!target._lateAnimationHolders[runtimeAnimation.targetPath]) {\n target._lateAnimationHolders[runtimeAnimation.targetPath] = {\n totalWeight: 0,\n totalAdditiveWeight: 0,\n animations: [],\n additiveAnimations: [],\n originalValue: originalValue,\n };\n }\n if (runtimeAnimation.isAdditive) {\n target._lateAnimationHolders[runtimeAnimation.targetPath].additiveAnimations.push(runtimeAnimation);\n target._lateAnimationHolders[runtimeAnimation.targetPath].totalAdditiveWeight += runtimeAnimation.weight;\n }\n else {\n target._lateAnimationHolders[runtimeAnimation.targetPath].animations.push(runtimeAnimation);\n target._lateAnimationHolders[runtimeAnimation.targetPath].totalWeight += runtimeAnimation.weight;\n }\n};\nScene.prototype._processLateAnimationBindingsForMatrices = function (holder) {\n if (holder.totalWeight === 0 && holder.totalAdditiveWeight === 0) {\n return holder.originalValue;\n }\n let normalizer = 1.0;\n const finalPosition = TmpVectors.Vector3[0];\n const finalScaling = TmpVectors.Vector3[1];\n const finalQuaternion = TmpVectors.Quaternion[0];\n let startIndex = 0;\n const originalAnimation = holder.animations[0];\n const originalValue = holder.originalValue;\n let scale = 1;\n let skipOverride = false;\n if (holder.totalWeight < 1.0) {\n // We need to mix the original value in\n scale = 1.0 - holder.totalWeight;\n originalValue.decompose(finalScaling, finalQuaternion, finalPosition);\n }\n else {\n startIndex = 1;\n // We need to normalize the weights\n normalizer = holder.totalWeight;\n scale = originalAnimation.weight / normalizer;\n if (scale == 1) {\n if (holder.totalAdditiveWeight) {\n skipOverride = true;\n }\n else {\n return originalAnimation.currentValue;\n }\n }\n originalAnimation.currentValue.decompose(finalScaling, finalQuaternion, finalPosition);\n }\n // Add up the override animations\n if (!skipOverride) {\n finalScaling.scaleInPlace(scale);\n finalPosition.scaleInPlace(scale);\n finalQuaternion.scaleInPlace(scale);\n for (let animIndex = startIndex; animIndex < holder.animations.length; animIndex++) {\n const runtimeAnimation = holder.animations[animIndex];\n if (runtimeAnimation.weight === 0) {\n continue;\n }\n scale = runtimeAnimation.weight / normalizer;\n const currentPosition = TmpVectors.Vector3[2];\n const currentScaling = TmpVectors.Vector3[3];\n const currentQuaternion = TmpVectors.Quaternion[1];\n runtimeAnimation.currentValue.decompose(currentScaling, currentQuaternion, currentPosition);\n currentScaling.scaleAndAddToRef(scale, finalScaling);\n currentQuaternion.scaleAndAddToRef(Quaternion.Dot(finalQuaternion, currentQuaternion) > 0 ? scale : -scale, finalQuaternion);\n currentPosition.scaleAndAddToRef(scale, finalPosition);\n }\n finalQuaternion.normalize();\n }\n // Add up the additive animations\n for (let animIndex = 0; animIndex < holder.additiveAnimations.length; animIndex++) {\n const runtimeAnimation = holder.additiveAnimations[animIndex];\n if (runtimeAnimation.weight === 0) {\n continue;\n }\n const currentPosition = TmpVectors.Vector3[2];\n const currentScaling = TmpVectors.Vector3[3];\n const currentQuaternion = TmpVectors.Quaternion[1];\n runtimeAnimation.currentValue.decompose(currentScaling, currentQuaternion, currentPosition);\n currentScaling.multiplyToRef(finalScaling, currentScaling);\n Vector3.LerpToRef(finalScaling, currentScaling, runtimeAnimation.weight, finalScaling);\n finalQuaternion.multiplyToRef(currentQuaternion, currentQuaternion);\n Quaternion.SlerpToRef(finalQuaternion, currentQuaternion, runtimeAnimation.weight, finalQuaternion);\n currentPosition.scaleAndAddToRef(runtimeAnimation.weight, finalPosition);\n }\n const workValue = originalAnimation ? originalAnimation._animationState.workValue : TmpVectors.Matrix[0].clone();\n Matrix.ComposeToRef(finalScaling, finalQuaternion, finalPosition, workValue);\n return workValue;\n};\nScene.prototype._processLateAnimationBindingsForQuaternions = function (holder, refQuaternion) {\n if (holder.totalWeight === 0 && holder.totalAdditiveWeight === 0) {\n return refQuaternion;\n }\n const originalAnimation = holder.animations[0];\n const originalValue = holder.originalValue;\n let cumulativeQuaternion = refQuaternion;\n if (holder.totalWeight === 0 && holder.totalAdditiveWeight > 0) {\n cumulativeQuaternion.copyFrom(originalValue);\n }\n else if (holder.animations.length === 1) {\n Quaternion.SlerpToRef(originalValue, originalAnimation.currentValue, Math.min(1.0, holder.totalWeight), cumulativeQuaternion);\n if (holder.totalAdditiveWeight === 0) {\n return cumulativeQuaternion;\n }\n }\n else if (holder.animations.length > 1) {\n // Add up the override animations\n let normalizer = 1.0;\n let quaternions;\n let weights;\n if (holder.totalWeight < 1.0) {\n const scale = 1.0 - holder.totalWeight;\n quaternions = [];\n weights = [];\n quaternions.push(originalValue);\n weights.push(scale);\n }\n else {\n if (holder.animations.length === 2) {\n // Slerp as soon as we can\n Quaternion.SlerpToRef(holder.animations[0].currentValue, holder.animations[1].currentValue, holder.animations[1].weight / holder.totalWeight, refQuaternion);\n if (holder.totalAdditiveWeight === 0) {\n return refQuaternion;\n }\n }\n quaternions = [];\n weights = [];\n normalizer = holder.totalWeight;\n }\n for (let animIndex = 0; animIndex < holder.animations.length; animIndex++) {\n const runtimeAnimation = holder.animations[animIndex];\n quaternions.push(runtimeAnimation.currentValue);\n weights.push(runtimeAnimation.weight / normalizer);\n }\n // https://gamedev.stackexchange.com/questions/62354/method-for-interpolation-between-3-quaternions\n let cumulativeAmount = 0;\n for (let index = 0; index < quaternions.length;) {\n if (!index) {\n Quaternion.SlerpToRef(quaternions[index], quaternions[index + 1], weights[index + 1] / (weights[index] + weights[index + 1]), refQuaternion);\n cumulativeQuaternion = refQuaternion;\n cumulativeAmount = weights[index] + weights[index + 1];\n index += 2;\n continue;\n }\n cumulativeAmount += weights[index];\n Quaternion.SlerpToRef(cumulativeQuaternion, quaternions[index], weights[index] / cumulativeAmount, cumulativeQuaternion);\n index++;\n }\n }\n // Add up the additive animations\n for (let animIndex = 0; animIndex < holder.additiveAnimations.length; animIndex++) {\n const runtimeAnimation = holder.additiveAnimations[animIndex];\n if (runtimeAnimation.weight === 0) {\n continue;\n }\n cumulativeQuaternion.multiplyToRef(runtimeAnimation.currentValue, TmpVectors.Quaternion[0]);\n Quaternion.SlerpToRef(cumulativeQuaternion, TmpVectors.Quaternion[0], runtimeAnimation.weight, cumulativeQuaternion);\n }\n return cumulativeQuaternion;\n};\nScene.prototype._processLateAnimationBindings = function () {\n if (!this._registeredForLateAnimationBindings.length) {\n return;\n }\n for (let index = 0; index < this._registeredForLateAnimationBindings.length; index++) {\n const target = this._registeredForLateAnimationBindings.data[index];\n for (const path in target._lateAnimationHolders) {\n const holder = target._lateAnimationHolders[path];\n const originalAnimation = holder.animations[0];\n const originalValue = holder.originalValue;\n if (originalValue === undefined || originalValue === null) {\n continue;\n }\n const matrixDecomposeMode = Animation.AllowMatrixDecomposeForInterpolation && originalValue.m; // ie. data is matrix\n let finalValue = target[path];\n if (matrixDecomposeMode) {\n finalValue = this._processLateAnimationBindingsForMatrices(holder);\n }\n else {\n const quaternionMode = originalValue.w !== undefined;\n if (quaternionMode) {\n finalValue = this._processLateAnimationBindingsForQuaternions(holder, finalValue || Quaternion.Identity());\n }\n else {\n let startIndex = 0;\n let normalizer = 1.0;\n if (holder.totalWeight < 1.0) {\n // We need to mix the original value in\n if (originalAnimation && originalValue.scale) {\n finalValue = originalValue.scale(1.0 - holder.totalWeight);\n }\n else if (originalAnimation) {\n finalValue = originalValue * (1.0 - holder.totalWeight);\n }\n else if (originalValue.clone) {\n finalValue = originalValue.clone();\n }\n else {\n finalValue = originalValue;\n }\n }\n else if (originalAnimation) {\n // We need to normalize the weights\n normalizer = holder.totalWeight;\n const scale = originalAnimation.weight / normalizer;\n if (scale !== 1) {\n if (originalAnimation.currentValue.scale) {\n finalValue = originalAnimation.currentValue.scale(scale);\n }\n else {\n finalValue = originalAnimation.currentValue * scale;\n }\n }\n else {\n finalValue = originalAnimation.currentValue;\n }\n startIndex = 1;\n }\n // Add up the override animations\n for (let animIndex = startIndex; animIndex < holder.animations.length; animIndex++) {\n const runtimeAnimation = holder.animations[animIndex];\n const scale = runtimeAnimation.weight / normalizer;\n if (!scale) {\n continue;\n }\n else if (runtimeAnimation.currentValue.scaleAndAddToRef) {\n runtimeAnimation.currentValue.scaleAndAddToRef(scale, finalValue);\n }\n else {\n finalValue += runtimeAnimation.currentValue * scale;\n }\n }\n // Add up the additive animations\n for (let animIndex = 0; animIndex < holder.additiveAnimations.length; animIndex++) {\n const runtimeAnimation = holder.additiveAnimations[animIndex];\n const scale = runtimeAnimation.weight;\n if (!scale) {\n continue;\n }\n else if (runtimeAnimation.currentValue.scaleAndAddToRef) {\n runtimeAnimation.currentValue.scaleAndAddToRef(scale, finalValue);\n }\n else {\n finalValue += runtimeAnimation.currentValue * scale;\n }\n }\n }\n }\n target[path] = finalValue;\n }\n target._lateAnimationHolders = {};\n }\n this._registeredForLateAnimationBindings.reset();\n};\nBone.prototype.copyAnimationRange = function (source, rangeName, frameOffset, rescaleAsRequired = false, skelDimensionsRatio = null) {\n // all animation may be coming from a library skeleton, so may need to create animation\n if (this.animations.length === 0) {\n this.animations.push(new Animation(this.name, \"_matrix\", source.animations[0].framePerSecond, Animation.ANIMATIONTYPE_MATRIX, 0));\n this.animations[0].setKeys([]);\n }\n // get animation info / verify there is such a range from the source bone\n const sourceRange = source.animations[0].getRange(rangeName);\n if (!sourceRange) {\n return false;\n }\n const from = sourceRange.from;\n const to = sourceRange.to;\n const sourceKeys = source.animations[0].getKeys();\n // rescaling prep\n const sourceBoneLength = source.length;\n const sourceParent = source.getParent();\n const parent = this.getParent();\n const parentScalingReqd = rescaleAsRequired && sourceParent && sourceBoneLength && this.length && sourceBoneLength !== this.length;\n const parentRatio = parentScalingReqd && parent && sourceParent ? parent.length / sourceParent.length : 1;\n const dimensionsScalingReqd = rescaleAsRequired && !parent && skelDimensionsRatio && (skelDimensionsRatio.x !== 1 || skelDimensionsRatio.y !== 1 || skelDimensionsRatio.z !== 1);\n const destKeys = this.animations[0].getKeys();\n // loop vars declaration\n let orig;\n let origTranslation;\n let mat;\n for (let key = 0, nKeys = sourceKeys.length; key < nKeys; key++) {\n orig = sourceKeys[key];\n if (orig.frame >= from && orig.frame <= to) {\n if (rescaleAsRequired) {\n mat = orig.value.clone();\n // scale based on parent ratio, when bone has parent\n if (parentScalingReqd) {\n origTranslation = mat.getTranslation();\n mat.setTranslation(origTranslation.scaleInPlace(parentRatio));\n // scale based on skeleton dimension ratio when root bone, and value is passed\n }\n else if (dimensionsScalingReqd && skelDimensionsRatio) {\n origTranslation = mat.getTranslation();\n mat.setTranslation(origTranslation.multiplyInPlace(skelDimensionsRatio));\n // use original when root bone, and no data for skelDimensionsRatio\n }\n else {\n mat = orig.value;\n }\n }\n else {\n mat = orig.value;\n }\n destKeys.push({ frame: orig.frame + frameOffset, value: mat });\n }\n }\n this.animations[0].createRange(rangeName, from + frameOffset, to + frameOffset);\n return true;\n};\n//# sourceMappingURL=animatable.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serialize, serializeAsVector3, serializeAsMeshReference } from \"../Misc/decorators.js\";\nimport { Camera } from \"./camera.js\";\nimport { Quaternion, Matrix, Vector3, Vector2, TmpVectors } from \"../Maths/math.vector.js\";\nimport { Epsilon } from \"../Maths/math.constants.js\";\nimport { Axis } from \"../Maths/math.axis.js\";\n/**\n * A target camera takes a mesh or position as a target and continues to look at it while it moves.\n * This is the base of the follow, arc rotate cameras and Free camera\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras\n */\nexport class TargetCamera extends Camera {\n /**\n * Instantiates a target camera that takes a mesh or position as a target and continues to look at it while it moves.\n * This is the base of the follow, arc rotate cameras and Free camera\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras\n * @param name Defines the name of the camera in the scene\n * @param position Defines the start position of the camera in the scene\n * @param scene Defines the scene the camera belongs to\n * @param setActiveOnSceneIfNoneActive Defines whether the camera should be marked as active if not other active cameras have been defined\n */\n constructor(name, position, scene, setActiveOnSceneIfNoneActive = true) {\n super(name, position, scene, setActiveOnSceneIfNoneActive);\n this._tmpUpVector = Vector3.Zero();\n this._tmpTargetVector = Vector3.Zero();\n /**\n * Define the current direction the camera is moving to\n */\n this.cameraDirection = new Vector3(0, 0, 0);\n /**\n * Define the current rotation the camera is rotating to\n */\n this.cameraRotation = new Vector2(0, 0);\n /** Gets or sets a boolean indicating that the scaling of the parent hierarchy will not be taken in account by the camera */\n this.ignoreParentScaling = false;\n /**\n * When set, the up vector of the camera will be updated by the rotation of the camera\n */\n this.updateUpVectorFromRotation = false;\n this._tmpQuaternion = new Quaternion();\n /**\n * Define the current rotation of the camera\n */\n this.rotation = new Vector3(0, 0, 0);\n /**\n * Define the current speed of the camera\n */\n this.speed = 2.0;\n /**\n * Add constraint to the camera to prevent it to move freely in all directions and\n * around all axis.\n */\n this.noRotationConstraint = false;\n /**\n * Reverses mouselook direction to 'natural' panning as opposed to traditional direct\n * panning\n */\n this.invertRotation = false;\n /**\n * Speed multiplier for inverse camera panning\n */\n this.inverseRotationSpeed = 0.2;\n /**\n * Define the current target of the camera as an object or a position.\n * Please note that locking a target will disable panning.\n */\n this.lockedTarget = null;\n /** @internal */\n this._currentTarget = Vector3.Zero();\n /** @internal */\n this._initialFocalDistance = 1;\n /** @internal */\n this._viewMatrix = Matrix.Zero();\n /** @internal */\n this._camMatrix = Matrix.Zero();\n /** @internal */\n this._cameraTransformMatrix = Matrix.Zero();\n /** @internal */\n this._cameraRotationMatrix = Matrix.Zero();\n /** @internal */\n this._referencePoint = new Vector3(0, 0, 1);\n /** @internal */\n this._transformedReferencePoint = Vector3.Zero();\n this._deferredPositionUpdate = new Vector3();\n this._deferredRotationQuaternionUpdate = new Quaternion();\n this._deferredRotationUpdate = new Vector3();\n this._deferredUpdated = false;\n this._deferOnly = false;\n this._defaultUp = Vector3.Up();\n this._cachedRotationZ = 0;\n this._cachedQuaternionRotationZ = 0;\n }\n /**\n * Gets the position in front of the camera at a given distance.\n * @param distance The distance from the camera we want the position to be\n * @returns the position\n */\n getFrontPosition(distance) {\n this.getWorldMatrix();\n const direction = this.getTarget().subtract(this.position);\n direction.normalize();\n direction.scaleInPlace(distance);\n return this.globalPosition.add(direction);\n }\n /** @internal */\n _getLockedTargetPosition() {\n if (!this.lockedTarget) {\n return null;\n }\n if (this.lockedTarget.absolutePosition) {\n const lockedTarget = this.lockedTarget;\n const m = lockedTarget.computeWorldMatrix();\n // in some cases the absolute position resets externally, but doesn't update since the matrix is cached.\n m.getTranslationToRef(lockedTarget.absolutePosition);\n }\n return this.lockedTarget.absolutePosition || this.lockedTarget;\n }\n /**\n * Store current camera state of the camera (fov, position, rotation, etc..)\n * @returns the camera\n */\n storeState() {\n this._storedPosition = this.position.clone();\n this._storedRotation = this.rotation.clone();\n if (this.rotationQuaternion) {\n this._storedRotationQuaternion = this.rotationQuaternion.clone();\n }\n return super.storeState();\n }\n /**\n * Restored camera state. You must call storeState() first\n * @returns whether it was successful or not\n * @internal\n */\n _restoreStateValues() {\n if (!super._restoreStateValues()) {\n return false;\n }\n this.position = this._storedPosition.clone();\n this.rotation = this._storedRotation.clone();\n if (this.rotationQuaternion) {\n this.rotationQuaternion = this._storedRotationQuaternion.clone();\n }\n this.cameraDirection.copyFromFloats(0, 0, 0);\n this.cameraRotation.copyFromFloats(0, 0);\n return true;\n }\n /** @internal */\n _initCache() {\n super._initCache();\n this._cache.lockedTarget = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n this._cache.rotation = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n this._cache.rotationQuaternion = new Quaternion(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\n }\n /**\n * @internal\n */\n _updateCache(ignoreParentClass) {\n if (!ignoreParentClass) {\n super._updateCache();\n }\n const lockedTargetPosition = this._getLockedTargetPosition();\n if (!lockedTargetPosition) {\n this._cache.lockedTarget = null;\n }\n else {\n if (!this._cache.lockedTarget) {\n this._cache.lockedTarget = lockedTargetPosition.clone();\n }\n else {\n this._cache.lockedTarget.copyFrom(lockedTargetPosition);\n }\n }\n this._cache.rotation.copyFrom(this.rotation);\n if (this.rotationQuaternion) {\n this._cache.rotationQuaternion.copyFrom(this.rotationQuaternion);\n }\n }\n // Synchronized\n /** @internal */\n _isSynchronizedViewMatrix() {\n if (!super._isSynchronizedViewMatrix()) {\n return false;\n }\n const lockedTargetPosition = this._getLockedTargetPosition();\n return ((this._cache.lockedTarget ? this._cache.lockedTarget.equals(lockedTargetPosition) : !lockedTargetPosition) &&\n (this.rotationQuaternion ? this.rotationQuaternion.equals(this._cache.rotationQuaternion) : this._cache.rotation.equals(this.rotation)));\n }\n // Methods\n /** @internal */\n _computeLocalCameraSpeed() {\n const engine = this.getEngine();\n return this.speed * Math.sqrt(engine.getDeltaTime() / (engine.getFps() * 100.0));\n }\n // Target\n /**\n * Defines the target the camera should look at.\n * @param target Defines the new target as a Vector\n */\n setTarget(target) {\n this.upVector.normalize();\n this._initialFocalDistance = target.subtract(this.position).length();\n if (this.position.z === target.z) {\n this.position.z += Epsilon;\n }\n this._referencePoint.normalize().scaleInPlace(this._initialFocalDistance);\n Matrix.LookAtLHToRef(this.position, target, this._defaultUp, this._camMatrix);\n this._camMatrix.invert();\n this.rotation.x = Math.atan(this._camMatrix.m[6] / this._camMatrix.m[10]);\n const vDir = target.subtract(this.position);\n if (vDir.x >= 0.0) {\n this.rotation.y = -Math.atan(vDir.z / vDir.x) + Math.PI / 2.0;\n }\n else {\n this.rotation.y = -Math.atan(vDir.z / vDir.x) - Math.PI / 2.0;\n }\n this.rotation.z = 0;\n if (isNaN(this.rotation.x)) {\n this.rotation.x = 0;\n }\n if (isNaN(this.rotation.y)) {\n this.rotation.y = 0;\n }\n if (isNaN(this.rotation.z)) {\n this.rotation.z = 0;\n }\n if (this.rotationQuaternion) {\n Quaternion.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, this.rotationQuaternion);\n }\n }\n /**\n * Defines the target point of the camera.\n * The camera looks towards it form the radius distance.\n */\n get target() {\n return this.getTarget();\n }\n set target(value) {\n this.setTarget(value);\n }\n /**\n * Return the current target position of the camera. This value is expressed in local space.\n * @returns the target position\n */\n getTarget() {\n return this._currentTarget;\n }\n /** @internal */\n _decideIfNeedsToMove() {\n return Math.abs(this.cameraDirection.x) > 0 || Math.abs(this.cameraDirection.y) > 0 || Math.abs(this.cameraDirection.z) > 0;\n }\n /** @internal */\n _updatePosition() {\n if (this.parent) {\n this.parent.getWorldMatrix().invertToRef(TmpVectors.Matrix[0]);\n Vector3.TransformNormalToRef(this.cameraDirection, TmpVectors.Matrix[0], TmpVectors.Vector3[0]);\n this._deferredPositionUpdate.addInPlace(TmpVectors.Vector3[0]);\n if (!this._deferOnly) {\n this.position.copyFrom(this._deferredPositionUpdate);\n }\n else {\n this._deferredUpdated = true;\n }\n return;\n }\n this._deferredPositionUpdate.addInPlace(this.cameraDirection);\n if (!this._deferOnly) {\n this.position.copyFrom(this._deferredPositionUpdate);\n }\n else {\n this._deferredUpdated = true;\n }\n }\n /** @internal */\n _checkInputs() {\n const directionMultiplier = this.invertRotation ? -this.inverseRotationSpeed : 1.0;\n const needToMove = this._decideIfNeedsToMove();\n const needToRotate = this.cameraRotation.x || this.cameraRotation.y;\n this._deferredUpdated = false;\n this._deferredRotationUpdate.copyFrom(this.rotation);\n this._deferredPositionUpdate.copyFrom(this.position);\n if (this.rotationQuaternion) {\n this._deferredRotationQuaternionUpdate.copyFrom(this.rotationQuaternion);\n }\n // Move\n if (needToMove) {\n this._updatePosition();\n }\n // Rotate\n if (needToRotate) {\n //rotate, if quaternion is set and rotation was used\n if (this.rotationQuaternion) {\n this.rotationQuaternion.toEulerAnglesToRef(this._deferredRotationUpdate);\n }\n this._deferredRotationUpdate.x += this.cameraRotation.x * directionMultiplier;\n this._deferredRotationUpdate.y += this.cameraRotation.y * directionMultiplier;\n // Apply constraints\n if (!this.noRotationConstraint) {\n const limit = 1.570796;\n if (this._deferredRotationUpdate.x > limit) {\n this._deferredRotationUpdate.x = limit;\n }\n if (this._deferredRotationUpdate.x < -limit) {\n this._deferredRotationUpdate.x = -limit;\n }\n }\n if (!this._deferOnly) {\n this.rotation.copyFrom(this._deferredRotationUpdate);\n }\n else {\n this._deferredUpdated = true;\n }\n //rotate, if quaternion is set and rotation was used\n if (this.rotationQuaternion) {\n const len = this._deferredRotationUpdate.lengthSquared();\n if (len) {\n Quaternion.RotationYawPitchRollToRef(this._deferredRotationUpdate.y, this._deferredRotationUpdate.x, this._deferredRotationUpdate.z, this._deferredRotationQuaternionUpdate);\n if (!this._deferOnly) {\n this.rotationQuaternion.copyFrom(this._deferredRotationQuaternionUpdate);\n }\n else {\n this._deferredUpdated = true;\n }\n }\n }\n }\n // Inertia\n if (needToMove) {\n if (Math.abs(this.cameraDirection.x) < this.speed * Epsilon) {\n this.cameraDirection.x = 0;\n }\n if (Math.abs(this.cameraDirection.y) < this.speed * Epsilon) {\n this.cameraDirection.y = 0;\n }\n if (Math.abs(this.cameraDirection.z) < this.speed * Epsilon) {\n this.cameraDirection.z = 0;\n }\n this.cameraDirection.scaleInPlace(this.inertia);\n }\n if (needToRotate) {\n if (Math.abs(this.cameraRotation.x) < this.speed * Epsilon) {\n this.cameraRotation.x = 0;\n }\n if (Math.abs(this.cameraRotation.y) < this.speed * Epsilon) {\n this.cameraRotation.y = 0;\n }\n this.cameraRotation.scaleInPlace(this.inertia);\n }\n super._checkInputs();\n }\n _updateCameraRotationMatrix() {\n if (this.rotationQuaternion) {\n this.rotationQuaternion.toRotationMatrix(this._cameraRotationMatrix);\n }\n else {\n Matrix.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, this._cameraRotationMatrix);\n }\n }\n /**\n * Update the up vector to apply the rotation of the camera (So if you changed the camera rotation.z this will let you update the up vector as well)\n * @returns the current camera\n */\n _rotateUpVectorWithCameraRotationMatrix() {\n Vector3.TransformNormalToRef(this._defaultUp, this._cameraRotationMatrix, this.upVector);\n return this;\n }\n /** @internal */\n _getViewMatrix() {\n if (this.lockedTarget) {\n this.setTarget(this._getLockedTargetPosition());\n }\n // Compute\n this._updateCameraRotationMatrix();\n // Apply the changed rotation to the upVector\n if (this.rotationQuaternion && this._cachedQuaternionRotationZ != this.rotationQuaternion.z) {\n this._rotateUpVectorWithCameraRotationMatrix();\n this._cachedQuaternionRotationZ = this.rotationQuaternion.z;\n }\n else if (this._cachedRotationZ !== this.rotation.z) {\n this._rotateUpVectorWithCameraRotationMatrix();\n this._cachedRotationZ = this.rotation.z;\n }\n Vector3.TransformCoordinatesToRef(this._referencePoint, this._cameraRotationMatrix, this._transformedReferencePoint);\n // Computing target and final matrix\n this.position.addToRef(this._transformedReferencePoint, this._currentTarget);\n if (this.updateUpVectorFromRotation) {\n if (this.rotationQuaternion) {\n Axis.Y.rotateByQuaternionToRef(this.rotationQuaternion, this.upVector);\n }\n else {\n Quaternion.FromEulerVectorToRef(this.rotation, this._tmpQuaternion);\n Axis.Y.rotateByQuaternionToRef(this._tmpQuaternion, this.upVector);\n }\n }\n this._computeViewMatrix(this.position, this._currentTarget, this.upVector);\n return this._viewMatrix;\n }\n _computeViewMatrix(position, target, up) {\n if (this.ignoreParentScaling) {\n if (this.parent) {\n const parentWorldMatrix = this.parent.getWorldMatrix();\n Vector3.TransformCoordinatesToRef(position, parentWorldMatrix, this._globalPosition);\n Vector3.TransformCoordinatesToRef(target, parentWorldMatrix, this._tmpTargetVector);\n Vector3.TransformNormalToRef(up, parentWorldMatrix, this._tmpUpVector);\n this._markSyncedWithParent();\n }\n else {\n this._globalPosition.copyFrom(position);\n this._tmpTargetVector.copyFrom(target);\n this._tmpUpVector.copyFrom(up);\n }\n if (this.getScene().useRightHandedSystem) {\n Matrix.LookAtRHToRef(this._globalPosition, this._tmpTargetVector, this._tmpUpVector, this._viewMatrix);\n }\n else {\n Matrix.LookAtLHToRef(this._globalPosition, this._tmpTargetVector, this._tmpUpVector, this._viewMatrix);\n }\n return;\n }\n if (this.getScene().useRightHandedSystem) {\n Matrix.LookAtRHToRef(position, target, up, this._viewMatrix);\n }\n else {\n Matrix.LookAtLHToRef(position, target, up, this._viewMatrix);\n }\n if (this.parent) {\n const parentWorldMatrix = this.parent.getWorldMatrix();\n this._viewMatrix.invert();\n this._viewMatrix.multiplyToRef(parentWorldMatrix, this._viewMatrix);\n this._viewMatrix.getTranslationToRef(this._globalPosition);\n this._viewMatrix.invert();\n this._markSyncedWithParent();\n }\n else {\n this._globalPosition.copyFrom(position);\n }\n }\n /**\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n createRigCamera(name, cameraIndex) {\n if (this.cameraRigMode !== Camera.RIG_MODE_NONE) {\n const rigCamera = new TargetCamera(name, this.position.clone(), this.getScene());\n rigCamera.isRigCamera = true;\n rigCamera.rigParent = this;\n if (this.cameraRigMode === Camera.RIG_MODE_VR) {\n if (!this.rotationQuaternion) {\n this.rotationQuaternion = new Quaternion();\n }\n rigCamera._cameraRigParams = {};\n rigCamera.rotationQuaternion = new Quaternion();\n }\n rigCamera.mode = this.mode;\n rigCamera.orthoLeft = this.orthoLeft;\n rigCamera.orthoRight = this.orthoRight;\n rigCamera.orthoTop = this.orthoTop;\n rigCamera.orthoBottom = this.orthoBottom;\n return rigCamera;\n }\n return null;\n }\n /**\n * @internal\n */\n _updateRigCameras() {\n const camLeft = this._rigCameras[0];\n const camRight = this._rigCameras[1];\n this.computeWorldMatrix();\n switch (this.cameraRigMode) {\n case Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:\n case Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:\n case Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:\n case Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:\n case Camera.RIG_MODE_STEREOSCOPIC_INTERLACED: {\n //provisionnaly using _cameraRigParams.stereoHalfAngle instead of calculations based on _cameraRigParams.interaxialDistance:\n const leftSign = this.cameraRigMode === Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED ? 1 : -1;\n const rightSign = this.cameraRigMode === Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED ? -1 : 1;\n this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle * leftSign, camLeft);\n this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle * rightSign, camRight);\n break;\n }\n case Camera.RIG_MODE_VR:\n if (camLeft.rotationQuaternion) {\n camLeft.rotationQuaternion.copyFrom(this.rotationQuaternion);\n camRight.rotationQuaternion.copyFrom(this.rotationQuaternion);\n }\n else {\n camLeft.rotation.copyFrom(this.rotation);\n camRight.rotation.copyFrom(this.rotation);\n }\n camLeft.position.copyFrom(this.position);\n camRight.position.copyFrom(this.position);\n break;\n }\n super._updateRigCameras();\n }\n _getRigCamPositionAndTarget(halfSpace, rigCamera) {\n const target = this.getTarget();\n target.subtractToRef(this.position, TargetCamera._TargetFocalPoint);\n TargetCamera._TargetFocalPoint.normalize().scaleInPlace(this._initialFocalDistance);\n const newFocalTarget = TargetCamera._TargetFocalPoint.addInPlace(this.position);\n Matrix.TranslationToRef(-newFocalTarget.x, -newFocalTarget.y, -newFocalTarget.z, TargetCamera._TargetTransformMatrix);\n TargetCamera._TargetTransformMatrix.multiplyToRef(Matrix.RotationAxis(rigCamera.upVector, halfSpace), TargetCamera._RigCamTransformMatrix);\n Matrix.TranslationToRef(newFocalTarget.x, newFocalTarget.y, newFocalTarget.z, TargetCamera._TargetTransformMatrix);\n TargetCamera._RigCamTransformMatrix.multiplyToRef(TargetCamera._TargetTransformMatrix, TargetCamera._RigCamTransformMatrix);\n Vector3.TransformCoordinatesToRef(this.position, TargetCamera._RigCamTransformMatrix, rigCamera.position);\n rigCamera.setTarget(newFocalTarget);\n }\n /**\n * Gets the current object class name.\n * @returns the class name\n */\n getClassName() {\n return \"TargetCamera\";\n }\n}\nTargetCamera._RigCamTransformMatrix = new Matrix();\nTargetCamera._TargetTransformMatrix = new Matrix();\nTargetCamera._TargetFocalPoint = new Vector3();\n__decorate([\n serializeAsVector3()\n], TargetCamera.prototype, \"rotation\", void 0);\n__decorate([\n serialize()\n], TargetCamera.prototype, \"speed\", void 0);\n__decorate([\n serializeAsMeshReference(\"lockedTargetId\")\n], TargetCamera.prototype, \"lockedTarget\", void 0);\n//# sourceMappingURL=targetCamera.js.map","import { Logger } from \"../Misc/logger.js\";\nimport { SerializationHelper } from \"../Misc/decorators.js\";\nimport { Camera } from \"./camera.js\";\n/**\n * @ignore\n * This is a list of all the different input types that are available in the application.\n * Fo instance: ArcRotateCameraGamepadInput...\n */\n// eslint-disable-next-line no-var, @typescript-eslint/naming-convention\nexport var CameraInputTypes = {};\n/**\n * This represents the input manager used within a camera.\n * It helps dealing with all the different kind of input attached to a camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class CameraInputsManager {\n /**\n * Instantiate a new Camera Input Manager.\n * @param camera Defines the camera the input manager belongs to\n */\n constructor(camera) {\n /**\n * Defines the dom element the camera is collecting inputs from.\n * This is null if the controls have not been attached.\n */\n this.attachedToElement = false;\n this.attached = {};\n this.camera = camera;\n this.checkInputs = () => { };\n }\n /**\n * Add an input method to a camera\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n * @param input Camera input method\n */\n add(input) {\n const type = input.getSimpleName();\n if (this.attached[type]) {\n Logger.Warn(\"camera input of type \" + type + \" already exists on camera\");\n return;\n }\n this.attached[type] = input;\n input.camera = this.camera;\n // for checkInputs, we are dynamically creating a function\n // the goal is to avoid the performance penalty of looping for inputs in the render loop\n if (input.checkInputs) {\n this.checkInputs = this._addCheckInputs(input.checkInputs.bind(input));\n }\n if (this.attachedToElement) {\n input.attachControl(this.noPreventDefault);\n }\n }\n /**\n * Remove a specific input method from a camera\n * example: camera.inputs.remove(camera.inputs.attached.mouse);\n * @param inputToRemove camera input method\n */\n remove(inputToRemove) {\n for (const cam in this.attached) {\n const input = this.attached[cam];\n if (input === inputToRemove) {\n input.detachControl();\n input.camera = null;\n delete this.attached[cam];\n this.rebuildInputCheck();\n return;\n }\n }\n }\n /**\n * Remove a specific input type from a camera\n * example: camera.inputs.remove(\"ArcRotateCameraGamepadInput\");\n * @param inputType the type of the input to remove\n */\n removeByType(inputType) {\n for (const cam in this.attached) {\n const input = this.attached[cam];\n if (input.getClassName() === inputType) {\n input.detachControl();\n input.camera = null;\n delete this.attached[cam];\n this.rebuildInputCheck();\n }\n }\n }\n _addCheckInputs(fn) {\n const current = this.checkInputs;\n return () => {\n current();\n fn();\n };\n }\n /**\n * Attach the input controls to the currently attached dom element to listen the events from.\n * @param input Defines the input to attach\n */\n attachInput(input) {\n if (this.attachedToElement) {\n input.attachControl(this.noPreventDefault);\n }\n }\n /**\n * Attach the current manager inputs controls to a specific dom element to listen the events from.\n * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)\n */\n attachElement(noPreventDefault = false) {\n if (this.attachedToElement) {\n return;\n }\n noPreventDefault = Camera.ForceAttachControlToAlwaysPreventDefault ? false : noPreventDefault;\n this.attachedToElement = true;\n this.noPreventDefault = noPreventDefault;\n for (const cam in this.attached) {\n this.attached[cam].attachControl(noPreventDefault);\n }\n }\n /**\n * Detach the current manager inputs controls from a specific dom element.\n * @param disconnect Defines whether the input should be removed from the current list of attached inputs\n */\n detachElement(disconnect = false) {\n for (const cam in this.attached) {\n this.attached[cam].detachControl();\n if (disconnect) {\n this.attached[cam].camera = null;\n }\n }\n this.attachedToElement = false;\n }\n /**\n * Rebuild the dynamic inputCheck function from the current list of\n * defined inputs in the manager.\n */\n rebuildInputCheck() {\n this.checkInputs = () => { };\n for (const cam in this.attached) {\n const input = this.attached[cam];\n if (input.checkInputs) {\n this.checkInputs = this._addCheckInputs(input.checkInputs.bind(input));\n }\n }\n }\n /**\n * Remove all attached input methods from a camera\n */\n clear() {\n if (this.attachedToElement) {\n this.detachElement(true);\n }\n this.attached = {};\n this.attachedToElement = false;\n this.checkInputs = () => { };\n }\n /**\n * Serialize the current input manager attached to a camera.\n * This ensures than once parsed,\n * the input associated to the camera will be identical to the current ones\n * @param serializedCamera Defines the camera serialization JSON the input serialization should write to\n */\n serialize(serializedCamera) {\n const inputs = {};\n for (const cam in this.attached) {\n const input = this.attached[cam];\n const res = SerializationHelper.Serialize(input);\n inputs[input.getClassName()] = res;\n }\n serializedCamera.inputsmgr = inputs;\n }\n /**\n * Parses an input manager serialized JSON to restore the previous list of inputs\n * and states associated to a camera.\n * @param parsedCamera Defines the JSON to parse\n */\n parse(parsedCamera) {\n const parsedInputs = parsedCamera.inputsmgr;\n if (parsedInputs) {\n this.clear();\n for (const n in parsedInputs) {\n const construct = CameraInputTypes[n];\n if (construct) {\n const parsedinput = parsedInputs[n];\n const input = SerializationHelper.Parse(() => {\n return new construct();\n }, parsedinput, null);\n this.add(input);\n }\n }\n }\n else {\n //2016-03-08 this part is for managing backward compatibility\n for (const n in this.attached) {\n const construct = CameraInputTypes[this.attached[n].getClassName()];\n if (construct) {\n const input = SerializationHelper.Parse(() => {\n return new construct();\n }, parsedCamera, null);\n this.remove(this.attached[n]);\n this.add(input);\n }\n }\n }\n }\n}\n//# sourceMappingURL=cameraInputsManager.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize } from \"../../Misc/decorators.js\";\nimport { CameraInputTypes } from \"../../Cameras/cameraInputsManager.js\";\nimport { KeyboardEventTypes } from \"../../Events/keyboardEvents.js\";\nimport { Vector3 } from \"../../Maths/math.vector.js\";\nimport { Tools } from \"../../Misc/tools.js\";\n/**\n * Manage the keyboard inputs to control the movement of a free camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class FreeCameraKeyboardMoveInput {\n constructor() {\n /**\n * Gets or Set the list of keyboard keys used to control the forward move of the camera.\n */\n this.keysUp = [38];\n /**\n * Gets or Set the list of keyboard keys used to control the upward move of the camera.\n */\n this.keysUpward = [33];\n /**\n * Gets or Set the list of keyboard keys used to control the backward move of the camera.\n */\n this.keysDown = [40];\n /**\n * Gets or Set the list of keyboard keys used to control the downward move of the camera.\n */\n this.keysDownward = [34];\n /**\n * Gets or Set the list of keyboard keys used to control the left strafe move of the camera.\n */\n this.keysLeft = [37];\n /**\n * Gets or Set the list of keyboard keys used to control the right strafe move of the camera.\n */\n this.keysRight = [39];\n /**\n * Defines the pointer angular sensibility along the X and Y axis or how fast is the camera rotating.\n */\n this.rotationSpeed = 0.5;\n /**\n * Gets or Set the list of keyboard keys used to control the left rotation move of the camera.\n */\n this.keysRotateLeft = [];\n /**\n * Gets or Set the list of keyboard keys used to control the right rotation move of the camera.\n */\n this.keysRotateRight = [];\n /**\n * Gets or Set the list of keyboard keys used to control the up rotation move of the camera.\n */\n this.keysRotateUp = [];\n /**\n * Gets or Set the list of keyboard keys used to control the down rotation move of the camera.\n */\n this.keysRotateDown = [];\n this._keys = new Array();\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)\n */\n attachControl(noPreventDefault) {\n // eslint-disable-next-line prefer-rest-params\n noPreventDefault = Tools.BackCompatCameraNoPreventDefault(arguments);\n if (this._onCanvasBlurObserver) {\n return;\n }\n this._scene = this.camera.getScene();\n this._engine = this._scene.getEngine();\n this._onCanvasBlurObserver = this._engine.onCanvasBlurObservable.add(() => {\n this._keys.length = 0;\n });\n this._onKeyboardObserver = this._scene.onKeyboardObservable.add((info) => {\n const evt = info.event;\n if (!evt.metaKey) {\n if (info.type === KeyboardEventTypes.KEYDOWN) {\n if (this.keysUp.indexOf(evt.keyCode) !== -1 ||\n this.keysDown.indexOf(evt.keyCode) !== -1 ||\n this.keysLeft.indexOf(evt.keyCode) !== -1 ||\n this.keysRight.indexOf(evt.keyCode) !== -1 ||\n this.keysUpward.indexOf(evt.keyCode) !== -1 ||\n this.keysDownward.indexOf(evt.keyCode) !== -1 ||\n this.keysRotateLeft.indexOf(evt.keyCode) !== -1 ||\n this.keysRotateRight.indexOf(evt.keyCode) !== -1 ||\n this.keysRotateUp.indexOf(evt.keyCode) !== -1 ||\n this.keysRotateDown.indexOf(evt.keyCode) !== -1) {\n const index = this._keys.indexOf(evt.keyCode);\n if (index === -1) {\n this._keys.push(evt.keyCode);\n }\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n }\n }\n else {\n if (this.keysUp.indexOf(evt.keyCode) !== -1 ||\n this.keysDown.indexOf(evt.keyCode) !== -1 ||\n this.keysLeft.indexOf(evt.keyCode) !== -1 ||\n this.keysRight.indexOf(evt.keyCode) !== -1 ||\n this.keysUpward.indexOf(evt.keyCode) !== -1 ||\n this.keysDownward.indexOf(evt.keyCode) !== -1 ||\n this.keysRotateLeft.indexOf(evt.keyCode) !== -1 ||\n this.keysRotateRight.indexOf(evt.keyCode) !== -1 ||\n this.keysRotateUp.indexOf(evt.keyCode) !== -1 ||\n this.keysRotateDown.indexOf(evt.keyCode) !== -1) {\n const index = this._keys.indexOf(evt.keyCode);\n if (index >= 0) {\n this._keys.splice(index, 1);\n }\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n }\n }\n }\n });\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n if (this._scene) {\n if (this._onKeyboardObserver) {\n this._scene.onKeyboardObservable.remove(this._onKeyboardObserver);\n }\n if (this._onCanvasBlurObserver) {\n this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver);\n }\n this._onKeyboardObserver = null;\n this._onCanvasBlurObserver = null;\n }\n this._keys.length = 0;\n }\n /**\n * Update the current camera state depending on the inputs that have been used this frame.\n * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.\n */\n checkInputs() {\n if (this._onKeyboardObserver) {\n const camera = this.camera;\n // Keyboard\n for (let index = 0; index < this._keys.length; index++) {\n const keyCode = this._keys[index];\n const speed = camera._computeLocalCameraSpeed();\n if (this.keysLeft.indexOf(keyCode) !== -1) {\n camera._localDirection.copyFromFloats(-speed, 0, 0);\n }\n else if (this.keysUp.indexOf(keyCode) !== -1) {\n camera._localDirection.copyFromFloats(0, 0, speed);\n }\n else if (this.keysRight.indexOf(keyCode) !== -1) {\n camera._localDirection.copyFromFloats(speed, 0, 0);\n }\n else if (this.keysDown.indexOf(keyCode) !== -1) {\n camera._localDirection.copyFromFloats(0, 0, -speed);\n }\n else if (this.keysUpward.indexOf(keyCode) !== -1) {\n camera._localDirection.copyFromFloats(0, speed, 0);\n }\n else if (this.keysDownward.indexOf(keyCode) !== -1) {\n camera._localDirection.copyFromFloats(0, -speed, 0);\n }\n else if (this.keysRotateLeft.indexOf(keyCode) !== -1) {\n camera._localDirection.copyFromFloats(0, 0, 0);\n camera.cameraRotation.y -= this._getLocalRotation();\n }\n else if (this.keysRotateRight.indexOf(keyCode) !== -1) {\n camera._localDirection.copyFromFloats(0, 0, 0);\n camera.cameraRotation.y += this._getLocalRotation();\n }\n else if (this.keysRotateUp.indexOf(keyCode) !== -1) {\n camera._localDirection.copyFromFloats(0, 0, 0);\n camera.cameraRotation.x -= this._getLocalRotation();\n }\n else if (this.keysRotateDown.indexOf(keyCode) !== -1) {\n camera._localDirection.copyFromFloats(0, 0, 0);\n camera.cameraRotation.x += this._getLocalRotation();\n }\n if (camera.getScene().useRightHandedSystem) {\n camera._localDirection.z *= -1;\n }\n camera.getViewMatrix().invertToRef(camera._cameraTransformMatrix);\n Vector3.TransformNormalToRef(camera._localDirection, camera._cameraTransformMatrix, camera._transformedDirection);\n camera.cameraDirection.addInPlace(camera._transformedDirection);\n }\n }\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"FreeCameraKeyboardMoveInput\";\n }\n /** @internal */\n _onLostFocus() {\n this._keys.length = 0;\n }\n /**\n * Get the friendly name associated with the input class.\n * @returns the input friendly name\n */\n getSimpleName() {\n return \"keyboard\";\n }\n _getLocalRotation() {\n const handednessMultiplier = this.camera._calculateHandednessMultiplier();\n const rotation = ((this.rotationSpeed * this._engine.getDeltaTime()) / 1000) * handednessMultiplier;\n return rotation;\n }\n}\n__decorate([\n serialize()\n], FreeCameraKeyboardMoveInput.prototype, \"keysUp\", void 0);\n__decorate([\n serialize()\n], FreeCameraKeyboardMoveInput.prototype, \"keysUpward\", void 0);\n__decorate([\n serialize()\n], FreeCameraKeyboardMoveInput.prototype, \"keysDown\", void 0);\n__decorate([\n serialize()\n], FreeCameraKeyboardMoveInput.prototype, \"keysDownward\", void 0);\n__decorate([\n serialize()\n], FreeCameraKeyboardMoveInput.prototype, \"keysLeft\", void 0);\n__decorate([\n serialize()\n], FreeCameraKeyboardMoveInput.prototype, \"keysRight\", void 0);\n__decorate([\n serialize()\n], FreeCameraKeyboardMoveInput.prototype, \"rotationSpeed\", void 0);\n__decorate([\n serialize()\n], FreeCameraKeyboardMoveInput.prototype, \"keysRotateLeft\", void 0);\n__decorate([\n serialize()\n], FreeCameraKeyboardMoveInput.prototype, \"keysRotateRight\", void 0);\n__decorate([\n serialize()\n], FreeCameraKeyboardMoveInput.prototype, \"keysRotateUp\", void 0);\n__decorate([\n serialize()\n], FreeCameraKeyboardMoveInput.prototype, \"keysRotateDown\", void 0);\nCameraInputTypes[\"FreeCameraKeyboardMoveInput\"] = FreeCameraKeyboardMoveInput;\n//# sourceMappingURL=freeCameraKeyboardMoveInput.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { Observable } from \"../../Misc/observable.js\";\nimport { serialize } from \"../../Misc/decorators.js\";\nimport { CameraInputTypes } from \"../../Cameras/cameraInputsManager.js\";\nimport { PointerEventTypes } from \"../../Events/pointerEvents.js\";\nimport { Tools } from \"../../Misc/tools.js\";\n/**\n * Manage the mouse inputs to control the movement of a free camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class FreeCameraMouseInput {\n /**\n * Manage the mouse inputs to control the movement of a free camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n * @param touchEnabled Defines if touch is enabled or not\n */\n constructor(\n /**\n * Define if touch is enabled in the mouse input\n */\n touchEnabled = true) {\n this.touchEnabled = touchEnabled;\n /**\n * Defines the buttons associated with the input to handle camera move.\n */\n this.buttons = [0, 1, 2];\n /**\n * Defines the pointer angular sensibility along the X and Y axis or how fast is the camera rotating.\n */\n this.angularSensibility = 2000.0;\n this._previousPosition = null;\n /**\n * Observable for when a pointer move event occurs containing the move offset\n */\n this.onPointerMovedObservable = new Observable();\n /**\n * @internal\n * If the camera should be rotated automatically based on pointer movement\n */\n this._allowCameraRotation = true;\n this._currentActiveButton = -1;\n this._activePointerId = -1;\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)\n */\n attachControl(noPreventDefault) {\n // eslint-disable-next-line prefer-rest-params\n noPreventDefault = Tools.BackCompatCameraNoPreventDefault(arguments);\n const engine = this.camera.getEngine();\n const element = engine.getInputElement();\n if (!this._pointerInput) {\n this._pointerInput = (p) => {\n const evt = p.event;\n const isTouch = evt.pointerType === \"touch\";\n if (!this.touchEnabled && isTouch) {\n return;\n }\n if (p.type !== PointerEventTypes.POINTERMOVE && this.buttons.indexOf(evt.button) === -1) {\n return;\n }\n const srcElement = evt.target;\n if (p.type === PointerEventTypes.POINTERDOWN) {\n // If the input is touch with more than one touch OR if the input is mouse and there is already an active button, return\n if ((isTouch && this._activePointerId !== -1) || (!isTouch && this._currentActiveButton !== -1)) {\n return;\n }\n this._activePointerId = evt.pointerId;\n try {\n srcElement === null || srcElement === void 0 ? void 0 : srcElement.setPointerCapture(evt.pointerId);\n }\n catch (e) {\n //Nothing to do with the error. Execution will continue.\n }\n if (this._currentActiveButton === -1) {\n this._currentActiveButton = evt.button;\n }\n this._previousPosition = {\n x: evt.clientX,\n y: evt.clientY,\n };\n if (!noPreventDefault) {\n evt.preventDefault();\n element && element.focus();\n }\n // This is required to move while pointer button is down\n if (engine.isPointerLock && this._onMouseMove) {\n this._onMouseMove(p.event);\n }\n }\n else if (p.type === PointerEventTypes.POINTERUP) {\n // If input is touch with a different touch id OR if input is mouse with a different button, return\n if ((isTouch && this._activePointerId !== evt.pointerId) || (!isTouch && this._currentActiveButton !== evt.button)) {\n return;\n }\n try {\n srcElement === null || srcElement === void 0 ? void 0 : srcElement.releasePointerCapture(evt.pointerId);\n }\n catch (e) {\n //Nothing to do with the error.\n }\n this._currentActiveButton = -1;\n this._previousPosition = null;\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n this._activePointerId = -1;\n }\n else if (p.type === PointerEventTypes.POINTERMOVE && (this._activePointerId === evt.pointerId || !isTouch)) {\n if (engine.isPointerLock && this._onMouseMove) {\n this._onMouseMove(p.event);\n }\n else if (this._previousPosition) {\n const handednessMultiplier = this.camera._calculateHandednessMultiplier();\n const offsetX = (evt.clientX - this._previousPosition.x) * handednessMultiplier;\n const offsetY = evt.clientY - this._previousPosition.y;\n if (this._allowCameraRotation) {\n this.camera.cameraRotation.y += offsetX / this.angularSensibility;\n this.camera.cameraRotation.x += offsetY / this.angularSensibility;\n }\n this.onPointerMovedObservable.notifyObservers({ offsetX: offsetX, offsetY: offsetY });\n this._previousPosition = {\n x: evt.clientX,\n y: evt.clientY,\n };\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n }\n }\n };\n }\n this._onMouseMove = (evt) => {\n if (!engine.isPointerLock) {\n return;\n }\n const handednessMultiplier = this.camera._calculateHandednessMultiplier();\n const offsetX = evt.movementX * handednessMultiplier;\n this.camera.cameraRotation.y += offsetX / this.angularSensibility;\n const offsetY = evt.movementY;\n this.camera.cameraRotation.x += offsetY / this.angularSensibility;\n this._previousPosition = null;\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n };\n this._observer = this.camera\n .getScene()\n ._inputManager._addCameraPointerObserver(this._pointerInput, PointerEventTypes.POINTERDOWN | PointerEventTypes.POINTERUP | PointerEventTypes.POINTERMOVE);\n if (element) {\n this._contextMenuBind = (evt) => this.onContextMenu(evt);\n element.addEventListener(\"contextmenu\", this._contextMenuBind, false); // TODO: We need to figure out how to handle this for Native\n }\n }\n /**\n * Called on JS contextmenu event.\n * Override this method to provide functionality.\n * @param evt\n */\n onContextMenu(evt) {\n evt.preventDefault();\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n if (this._observer) {\n this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer);\n if (this._contextMenuBind) {\n const engine = this.camera.getEngine();\n const element = engine.getInputElement();\n element && element.removeEventListener(\"contextmenu\", this._contextMenuBind);\n }\n if (this.onPointerMovedObservable) {\n this.onPointerMovedObservable.clear();\n }\n this._observer = null;\n this._onMouseMove = null;\n this._previousPosition = null;\n }\n this._activePointerId = -1;\n this._currentActiveButton = -1;\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"FreeCameraMouseInput\";\n }\n /**\n * Get the friendly name associated with the input class.\n * @returns the input friendly name\n */\n getSimpleName() {\n return \"mouse\";\n }\n}\n__decorate([\n serialize()\n], FreeCameraMouseInput.prototype, \"buttons\", void 0);\n__decorate([\n serialize()\n], FreeCameraMouseInput.prototype, \"angularSensibility\", void 0);\nCameraInputTypes[\"FreeCameraMouseInput\"] = FreeCameraMouseInput;\n//# sourceMappingURL=freeCameraMouseInput.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize } from \"../../Misc/decorators.js\";\nimport { Observable } from \"../../Misc/observable.js\";\nimport { PointerEventTypes } from \"../../Events/pointerEvents.js\";\nimport { EventConstants } from \"../../Events/deviceInputEvents.js\";\nimport { Tools } from \"../../Misc/tools.js\";\n/**\n * Base class for mouse wheel input..\n * See FollowCameraMouseWheelInput in src/Cameras/Inputs/freeCameraMouseWheelInput.ts\n * for example usage.\n */\nexport class BaseCameraMouseWheelInput {\n constructor() {\n /**\n * How fast is the camera moves in relation to X axis mouseWheel events.\n * Use negative value to reverse direction.\n */\n this.wheelPrecisionX = 3.0;\n /**\n * How fast is the camera moves in relation to Y axis mouseWheel events.\n * Use negative value to reverse direction.\n */\n this.wheelPrecisionY = 3.0;\n /**\n * How fast is the camera moves in relation to Z axis mouseWheel events.\n * Use negative value to reverse direction.\n */\n this.wheelPrecisionZ = 3.0;\n /**\n * Observable for when a mouse wheel move event occurs.\n */\n this.onChangedObservable = new Observable();\n /**\n * Incremental value of multiple mouse wheel movements of the X axis.\n * Should be zero-ed when read.\n */\n this._wheelDeltaX = 0;\n /**\n * Incremental value of multiple mouse wheel movements of the Y axis.\n * Should be zero-ed when read.\n */\n this._wheelDeltaY = 0;\n /**\n * Incremental value of multiple mouse wheel movements of the Z axis.\n * Should be zero-ed when read.\n */\n this._wheelDeltaZ = 0;\n /**\n * Firefox uses a different scheme to report scroll distances to other\n * browsers. Rather than use complicated methods to calculate the exact\n * multiple we need to apply, let's just cheat and use a constant.\n * https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaMode\n * https://stackoverflow.com/questions/20110224/what-is-the-height-of-a-line-in-a-wheel-event-deltamode-dom-delta-line\n */\n this._ffMultiplier = 12;\n /**\n * Different event attributes for wheel data fall into a few set ranges.\n * Some relevant but dated date here:\n * https://stackoverflow.com/questions/5527601/normalizing-mousewheel-speed-across-browsers\n */\n this._normalize = 120;\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n * @param noPreventDefault Defines whether event caught by the controls\n * should call preventdefault().\n * (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)\n */\n attachControl(noPreventDefault) {\n noPreventDefault = Tools.BackCompatCameraNoPreventDefault(arguments);\n this._wheel = (pointer) => {\n // sanity check - this should be a PointerWheel event.\n if (pointer.type !== PointerEventTypes.POINTERWHEEL) {\n return;\n }\n const event = pointer.event;\n const platformScale = event.deltaMode === EventConstants.DOM_DELTA_LINE ? this._ffMultiplier : 1; // If this happens to be set to DOM_DELTA_LINE, adjust accordingly\n this._wheelDeltaX += (this.wheelPrecisionX * platformScale * event.deltaX) / this._normalize;\n this._wheelDeltaY -= (this.wheelPrecisionY * platformScale * event.deltaY) / this._normalize;\n this._wheelDeltaZ += (this.wheelPrecisionZ * platformScale * event.deltaZ) / this._normalize;\n if (event.preventDefault) {\n if (!noPreventDefault) {\n event.preventDefault();\n }\n }\n };\n this._observer = this.camera.getScene()._inputManager._addCameraPointerObserver(this._wheel, PointerEventTypes.POINTERWHEEL);\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n if (this._observer) {\n this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer);\n this._observer = null;\n this._wheel = null;\n }\n if (this.onChangedObservable) {\n this.onChangedObservable.clear();\n }\n }\n /**\n * Called for each rendered frame.\n */\n checkInputs() {\n this.onChangedObservable.notifyObservers({\n wheelDeltaX: this._wheelDeltaX,\n wheelDeltaY: this._wheelDeltaY,\n wheelDeltaZ: this._wheelDeltaZ,\n });\n // Clear deltas.\n this._wheelDeltaX = 0;\n this._wheelDeltaY = 0;\n this._wheelDeltaZ = 0;\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"BaseCameraMouseWheelInput\";\n }\n /**\n * Get the friendly name associated with the input class.\n * @returns the input friendly name\n */\n getSimpleName() {\n return \"mousewheel\";\n }\n}\n__decorate([\n serialize()\n], BaseCameraMouseWheelInput.prototype, \"wheelPrecisionX\", void 0);\n__decorate([\n serialize()\n], BaseCameraMouseWheelInput.prototype, \"wheelPrecisionY\", void 0);\n__decorate([\n serialize()\n], BaseCameraMouseWheelInput.prototype, \"wheelPrecisionZ\", void 0);\n//# sourceMappingURL=BaseCameraMouseWheelInput.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize } from \"../../Misc/decorators.js\";\nimport { CameraInputTypes } from \"../../Cameras/cameraInputsManager.js\";\nimport { BaseCameraMouseWheelInput } from \"../../Cameras/Inputs/BaseCameraMouseWheelInput.js\";\nimport { Matrix, Vector3 } from \"../../Maths/math.vector.js\";\nimport { Coordinate } from \"../../Maths/math.axis.js\";\n// eslint-disable-next-line @typescript-eslint/naming-convention\nvar _CameraProperty;\n(function (_CameraProperty) {\n _CameraProperty[_CameraProperty[\"MoveRelative\"] = 0] = \"MoveRelative\";\n _CameraProperty[_CameraProperty[\"RotateRelative\"] = 1] = \"RotateRelative\";\n _CameraProperty[_CameraProperty[\"MoveScene\"] = 2] = \"MoveScene\";\n})(_CameraProperty || (_CameraProperty = {}));\n/**\n * Manage the mouse wheel inputs to control a free camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class FreeCameraMouseWheelInput extends BaseCameraMouseWheelInput {\n constructor() {\n super(...arguments);\n this._moveRelative = Vector3.Zero();\n this._rotateRelative = Vector3.Zero();\n this._moveScene = Vector3.Zero();\n /**\n * These are set to the desired default behaviour.\n */\n this._wheelXAction = _CameraProperty.MoveRelative;\n this._wheelXActionCoordinate = Coordinate.X;\n this._wheelYAction = _CameraProperty.MoveRelative;\n this._wheelYActionCoordinate = Coordinate.Z;\n this._wheelZAction = null;\n this._wheelZActionCoordinate = null;\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"FreeCameraMouseWheelInput\";\n }\n /**\n * Set which movement axis (relative to camera's orientation) the mouse\n * wheel's X axis controls.\n * @param axis The axis to be moved. Set null to clear.\n */\n set wheelXMoveRelative(axis) {\n if (axis === null && this._wheelXAction !== _CameraProperty.MoveRelative) {\n // Attempting to clear different _wheelXAction.\n return;\n }\n this._wheelXAction = _CameraProperty.MoveRelative;\n this._wheelXActionCoordinate = axis;\n }\n /**\n * Get the configured movement axis (relative to camera's orientation) the\n * mouse wheel's X axis controls.\n * @returns The configured axis or null if none.\n */\n get wheelXMoveRelative() {\n if (this._wheelXAction !== _CameraProperty.MoveRelative) {\n return null;\n }\n return this._wheelXActionCoordinate;\n }\n /**\n * Set which movement axis (relative to camera's orientation) the mouse\n * wheel's Y axis controls.\n * @param axis The axis to be moved. Set null to clear.\n */\n set wheelYMoveRelative(axis) {\n if (axis === null && this._wheelYAction !== _CameraProperty.MoveRelative) {\n // Attempting to clear different _wheelYAction.\n return;\n }\n this._wheelYAction = _CameraProperty.MoveRelative;\n this._wheelYActionCoordinate = axis;\n }\n /**\n * Get the configured movement axis (relative to camera's orientation) the\n * mouse wheel's Y axis controls.\n * @returns The configured axis or null if none.\n */\n get wheelYMoveRelative() {\n if (this._wheelYAction !== _CameraProperty.MoveRelative) {\n return null;\n }\n return this._wheelYActionCoordinate;\n }\n /**\n * Set which movement axis (relative to camera's orientation) the mouse\n * wheel's Z axis controls.\n * @param axis The axis to be moved. Set null to clear.\n */\n set wheelZMoveRelative(axis) {\n if (axis === null && this._wheelZAction !== _CameraProperty.MoveRelative) {\n // Attempting to clear different _wheelZAction.\n return;\n }\n this._wheelZAction = _CameraProperty.MoveRelative;\n this._wheelZActionCoordinate = axis;\n }\n /**\n * Get the configured movement axis (relative to camera's orientation) the\n * mouse wheel's Z axis controls.\n * @returns The configured axis or null if none.\n */\n get wheelZMoveRelative() {\n if (this._wheelZAction !== _CameraProperty.MoveRelative) {\n return null;\n }\n return this._wheelZActionCoordinate;\n }\n /**\n * Set which rotation axis (relative to camera's orientation) the mouse\n * wheel's X axis controls.\n * @param axis The axis to be moved. Set null to clear.\n */\n set wheelXRotateRelative(axis) {\n if (axis === null && this._wheelXAction !== _CameraProperty.RotateRelative) {\n // Attempting to clear different _wheelXAction.\n return;\n }\n this._wheelXAction = _CameraProperty.RotateRelative;\n this._wheelXActionCoordinate = axis;\n }\n /**\n * Get the configured rotation axis (relative to camera's orientation) the\n * mouse wheel's X axis controls.\n * @returns The configured axis or null if none.\n */\n get wheelXRotateRelative() {\n if (this._wheelXAction !== _CameraProperty.RotateRelative) {\n return null;\n }\n return this._wheelXActionCoordinate;\n }\n /**\n * Set which rotation axis (relative to camera's orientation) the mouse\n * wheel's Y axis controls.\n * @param axis The axis to be moved. Set null to clear.\n */\n set wheelYRotateRelative(axis) {\n if (axis === null && this._wheelYAction !== _CameraProperty.RotateRelative) {\n // Attempting to clear different _wheelYAction.\n return;\n }\n this._wheelYAction = _CameraProperty.RotateRelative;\n this._wheelYActionCoordinate = axis;\n }\n /**\n * Get the configured rotation axis (relative to camera's orientation) the\n * mouse wheel's Y axis controls.\n * @returns The configured axis or null if none.\n */\n get wheelYRotateRelative() {\n if (this._wheelYAction !== _CameraProperty.RotateRelative) {\n return null;\n }\n return this._wheelYActionCoordinate;\n }\n /**\n * Set which rotation axis (relative to camera's orientation) the mouse\n * wheel's Z axis controls.\n * @param axis The axis to be moved. Set null to clear.\n */\n set wheelZRotateRelative(axis) {\n if (axis === null && this._wheelZAction !== _CameraProperty.RotateRelative) {\n // Attempting to clear different _wheelZAction.\n return;\n }\n this._wheelZAction = _CameraProperty.RotateRelative;\n this._wheelZActionCoordinate = axis;\n }\n /**\n * Get the configured rotation axis (relative to camera's orientation) the\n * mouse wheel's Z axis controls.\n * @returns The configured axis or null if none.\n */\n get wheelZRotateRelative() {\n if (this._wheelZAction !== _CameraProperty.RotateRelative) {\n return null;\n }\n return this._wheelZActionCoordinate;\n }\n /**\n * Set which movement axis (relative to the scene) the mouse wheel's X axis\n * controls.\n * @param axis The axis to be moved. Set null to clear.\n */\n set wheelXMoveScene(axis) {\n if (axis === null && this._wheelXAction !== _CameraProperty.MoveScene) {\n // Attempting to clear different _wheelXAction.\n return;\n }\n this._wheelXAction = _CameraProperty.MoveScene;\n this._wheelXActionCoordinate = axis;\n }\n /**\n * Get the configured movement axis (relative to the scene) the mouse wheel's\n * X axis controls.\n * @returns The configured axis or null if none.\n */\n get wheelXMoveScene() {\n if (this._wheelXAction !== _CameraProperty.MoveScene) {\n return null;\n }\n return this._wheelXActionCoordinate;\n }\n /**\n * Set which movement axis (relative to the scene) the mouse wheel's Y axis\n * controls.\n * @param axis The axis to be moved. Set null to clear.\n */\n set wheelYMoveScene(axis) {\n if (axis === null && this._wheelYAction !== _CameraProperty.MoveScene) {\n // Attempting to clear different _wheelYAction.\n return;\n }\n this._wheelYAction = _CameraProperty.MoveScene;\n this._wheelYActionCoordinate = axis;\n }\n /**\n * Get the configured movement axis (relative to the scene) the mouse wheel's\n * Y axis controls.\n * @returns The configured axis or null if none.\n */\n get wheelYMoveScene() {\n if (this._wheelYAction !== _CameraProperty.MoveScene) {\n return null;\n }\n return this._wheelYActionCoordinate;\n }\n /**\n * Set which movement axis (relative to the scene) the mouse wheel's Z axis\n * controls.\n * @param axis The axis to be moved. Set null to clear.\n */\n set wheelZMoveScene(axis) {\n if (axis === null && this._wheelZAction !== _CameraProperty.MoveScene) {\n // Attempting to clear different _wheelZAction.\n return;\n }\n this._wheelZAction = _CameraProperty.MoveScene;\n this._wheelZActionCoordinate = axis;\n }\n /**\n * Get the configured movement axis (relative to the scene) the mouse wheel's\n * Z axis controls.\n * @returns The configured axis or null if none.\n */\n get wheelZMoveScene() {\n if (this._wheelZAction !== _CameraProperty.MoveScene) {\n return null;\n }\n return this._wheelZActionCoordinate;\n }\n /**\n * Called for each rendered frame.\n */\n checkInputs() {\n if (this._wheelDeltaX === 0 && this._wheelDeltaY === 0 && this._wheelDeltaZ == 0) {\n return;\n }\n // Clear the camera properties that we might be updating.\n this._moveRelative.setAll(0);\n this._rotateRelative.setAll(0);\n this._moveScene.setAll(0);\n // Set the camera properties that are to be updated.\n this._updateCamera();\n if (this.camera.getScene().useRightHandedSystem) {\n // TODO: Does this need done for worldUpdate too?\n this._moveRelative.z *= -1;\n }\n // Convert updates relative to camera to world position update.\n const cameraTransformMatrix = Matrix.Zero();\n this.camera.getViewMatrix().invertToRef(cameraTransformMatrix);\n const transformedDirection = Vector3.Zero();\n Vector3.TransformNormalToRef(this._moveRelative, cameraTransformMatrix, transformedDirection);\n // Apply updates to camera position.\n this.camera.cameraRotation.x += this._rotateRelative.x / 200;\n this.camera.cameraRotation.y += this._rotateRelative.y / 200;\n this.camera.cameraDirection.addInPlace(transformedDirection);\n this.camera.cameraDirection.addInPlace(this._moveScene);\n // Call the base class implementation to handle observers and do cleanup.\n super.checkInputs();\n }\n /**\n * Update the camera according to any configured properties for the 3\n * mouse-wheel axis.\n */\n _updateCamera() {\n // Do the camera updates for each of the 3 touch-wheel axis.\n this._updateCameraProperty(this._wheelDeltaX, this._wheelXAction, this._wheelXActionCoordinate);\n this._updateCameraProperty(this._wheelDeltaY, this._wheelYAction, this._wheelYActionCoordinate);\n this._updateCameraProperty(this._wheelDeltaZ, this._wheelZAction, this._wheelZActionCoordinate);\n }\n /**\n * Update one property of the camera.\n * @param value\n * @param cameraProperty\n * @param coordinate\n */\n _updateCameraProperty(\n /* Mouse-wheel delta. */\n value, \n /* Camera property to be changed. */\n cameraProperty, \n /* Axis of Camera property to be changed. */\n coordinate) {\n if (value === 0) {\n // Mouse wheel has not moved.\n return;\n }\n if (cameraProperty === null || coordinate === null) {\n // Mouse wheel axis not configured.\n return;\n }\n let action = null;\n switch (cameraProperty) {\n case _CameraProperty.MoveRelative:\n action = this._moveRelative;\n break;\n case _CameraProperty.RotateRelative:\n action = this._rotateRelative;\n break;\n case _CameraProperty.MoveScene:\n action = this._moveScene;\n break;\n }\n switch (coordinate) {\n case Coordinate.X:\n action.set(value, 0, 0);\n break;\n case Coordinate.Y:\n action.set(0, value, 0);\n break;\n case Coordinate.Z:\n action.set(0, 0, value);\n break;\n }\n }\n}\n__decorate([\n serialize()\n], FreeCameraMouseWheelInput.prototype, \"wheelXMoveRelative\", null);\n__decorate([\n serialize()\n], FreeCameraMouseWheelInput.prototype, \"wheelYMoveRelative\", null);\n__decorate([\n serialize()\n], FreeCameraMouseWheelInput.prototype, \"wheelZMoveRelative\", null);\n__decorate([\n serialize()\n], FreeCameraMouseWheelInput.prototype, \"wheelXRotateRelative\", null);\n__decorate([\n serialize()\n], FreeCameraMouseWheelInput.prototype, \"wheelYRotateRelative\", null);\n__decorate([\n serialize()\n], FreeCameraMouseWheelInput.prototype, \"wheelZRotateRelative\", null);\n__decorate([\n serialize()\n], FreeCameraMouseWheelInput.prototype, \"wheelXMoveScene\", null);\n__decorate([\n serialize()\n], FreeCameraMouseWheelInput.prototype, \"wheelYMoveScene\", null);\n__decorate([\n serialize()\n], FreeCameraMouseWheelInput.prototype, \"wheelZMoveScene\", null);\nCameraInputTypes[\"FreeCameraMouseWheelInput\"] = FreeCameraMouseWheelInput;\n//# sourceMappingURL=freeCameraMouseWheelInput.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize } from \"../../Misc/decorators.js\";\nimport { CameraInputTypes } from \"../../Cameras/cameraInputsManager.js\";\nimport { PointerEventTypes } from \"../../Events/pointerEvents.js\";\nimport { Matrix, Vector3 } from \"../../Maths/math.vector.js\";\nimport { Tools } from \"../../Misc/tools.js\";\n/**\n * Manage the touch inputs to control the movement of a free camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class FreeCameraTouchInput {\n /**\n * Manage the touch inputs to control the movement of a free camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n * @param allowMouse Defines if mouse events can be treated as touch events\n */\n constructor(\n /**\n * Define if mouse events can be treated as touch events\n */\n allowMouse = false) {\n this.allowMouse = allowMouse;\n /**\n * Defines the touch sensibility for rotation.\n * The lower the faster.\n */\n this.touchAngularSensibility = 200000.0;\n /**\n * Defines the touch sensibility for move.\n * The lower the faster.\n */\n this.touchMoveSensibility = 250.0;\n /**\n * Swap touch actions so that one touch is used for rotation and multiple for movement\n */\n this.singleFingerRotate = false;\n this._offsetX = null;\n this._offsetY = null;\n this._pointerPressed = new Array();\n this._isSafari = Tools.IsSafari();\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)\n */\n attachControl(noPreventDefault) {\n // eslint-disable-next-line prefer-rest-params\n noPreventDefault = Tools.BackCompatCameraNoPreventDefault(arguments);\n let previousPosition = null;\n if (this._pointerInput === undefined) {\n this._onLostFocus = () => {\n this._offsetX = null;\n this._offsetY = null;\n };\n this._pointerInput = (p) => {\n const evt = p.event;\n const isMouseEvent = evt.pointerType === \"mouse\" || (this._isSafari && typeof evt.pointerType === \"undefined\");\n if (!this.allowMouse && isMouseEvent) {\n return;\n }\n if (p.type === PointerEventTypes.POINTERDOWN) {\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n this._pointerPressed.push(evt.pointerId);\n if (this._pointerPressed.length !== 1) {\n return;\n }\n previousPosition = {\n x: evt.clientX,\n y: evt.clientY,\n };\n }\n else if (p.type === PointerEventTypes.POINTERUP) {\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n const index = this._pointerPressed.indexOf(evt.pointerId);\n if (index === -1) {\n return;\n }\n this._pointerPressed.splice(index, 1);\n if (index != 0) {\n return;\n }\n previousPosition = null;\n this._offsetX = null;\n this._offsetY = null;\n }\n else if (p.type === PointerEventTypes.POINTERMOVE) {\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n if (!previousPosition) {\n return;\n }\n const index = this._pointerPressed.indexOf(evt.pointerId);\n if (index != 0) {\n return;\n }\n this._offsetX = evt.clientX - previousPosition.x;\n this._offsetY = -(evt.clientY - previousPosition.y);\n }\n };\n }\n this._observer = this.camera\n .getScene()\n ._inputManager._addCameraPointerObserver(this._pointerInput, PointerEventTypes.POINTERDOWN | PointerEventTypes.POINTERUP | PointerEventTypes.POINTERMOVE);\n if (this._onLostFocus) {\n const engine = this.camera.getEngine();\n const element = engine.getInputElement();\n element && element.addEventListener(\"blur\", this._onLostFocus);\n }\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n if (this._pointerInput) {\n if (this._observer) {\n this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer);\n this._observer = null;\n }\n if (this._onLostFocus) {\n const engine = this.camera.getEngine();\n const element = engine.getInputElement();\n element && element.removeEventListener(\"blur\", this._onLostFocus);\n this._onLostFocus = null;\n }\n this._pointerPressed.length = 0;\n this._offsetX = null;\n this._offsetY = null;\n }\n }\n /**\n * Update the current camera state depending on the inputs that have been used this frame.\n * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.\n */\n checkInputs() {\n if (this._offsetX === null || this._offsetY === null) {\n return;\n }\n if (this._offsetX === 0 && this._offsetY === 0) {\n return;\n }\n const camera = this.camera;\n const handednessMultiplier = camera._calculateHandednessMultiplier();\n camera.cameraRotation.y = (handednessMultiplier * this._offsetX) / this.touchAngularSensibility;\n const rotateCamera = (this.singleFingerRotate && this._pointerPressed.length === 1) || (!this.singleFingerRotate && this._pointerPressed.length > 1);\n if (rotateCamera) {\n camera.cameraRotation.x = -this._offsetY / this.touchAngularSensibility;\n }\n else {\n const speed = camera._computeLocalCameraSpeed();\n const direction = new Vector3(0, 0, this.touchMoveSensibility !== 0 ? (speed * this._offsetY) / this.touchMoveSensibility : 0);\n Matrix.RotationYawPitchRollToRef(camera.rotation.y, camera.rotation.x, 0, camera._cameraRotationMatrix);\n camera.cameraDirection.addInPlace(Vector3.TransformCoordinates(direction, camera._cameraRotationMatrix));\n }\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"FreeCameraTouchInput\";\n }\n /**\n * Get the friendly name associated with the input class.\n * @returns the input friendly name\n */\n getSimpleName() {\n return \"touch\";\n }\n}\n__decorate([\n serialize()\n], FreeCameraTouchInput.prototype, \"touchAngularSensibility\", void 0);\n__decorate([\n serialize()\n], FreeCameraTouchInput.prototype, \"touchMoveSensibility\", void 0);\nCameraInputTypes[\"FreeCameraTouchInput\"] = FreeCameraTouchInput;\n//# sourceMappingURL=freeCameraTouchInput.js.map","import { CameraInputsManager } from \"./cameraInputsManager.js\";\nimport { FreeCameraKeyboardMoveInput } from \"../Cameras/Inputs/freeCameraKeyboardMoveInput.js\";\nimport { FreeCameraMouseInput } from \"../Cameras/Inputs/freeCameraMouseInput.js\";\nimport { FreeCameraMouseWheelInput } from \"../Cameras/Inputs/freeCameraMouseWheelInput.js\";\nimport { FreeCameraTouchInput } from \"../Cameras/Inputs/freeCameraTouchInput.js\";\n/**\n * Default Inputs manager for the FreeCamera.\n * It groups all the default supported inputs for ease of use.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class FreeCameraInputsManager extends CameraInputsManager {\n /**\n * Instantiates a new FreeCameraInputsManager.\n * @param camera Defines the camera the inputs belong to\n */\n constructor(camera) {\n super(camera);\n /**\n * @internal\n */\n this._mouseInput = null;\n /**\n * @internal\n */\n this._mouseWheelInput = null;\n }\n /**\n * Add keyboard input support to the input manager.\n * @returns the current input manager\n */\n addKeyboard() {\n this.add(new FreeCameraKeyboardMoveInput());\n return this;\n }\n /**\n * Add mouse input support to the input manager.\n * @param touchEnabled if the FreeCameraMouseInput should support touch (default: true)\n * @returns the current input manager\n */\n addMouse(touchEnabled = true) {\n if (!this._mouseInput) {\n this._mouseInput = new FreeCameraMouseInput(touchEnabled);\n this.add(this._mouseInput);\n }\n return this;\n }\n /**\n * Removes the mouse input support from the manager\n * @returns the current input manager\n */\n removeMouse() {\n if (this._mouseInput) {\n this.remove(this._mouseInput);\n }\n return this;\n }\n /**\n * Add mouse wheel input support to the input manager.\n * @returns the current input manager\n */\n addMouseWheel() {\n if (!this._mouseWheelInput) {\n this._mouseWheelInput = new FreeCameraMouseWheelInput();\n this.add(this._mouseWheelInput);\n }\n return this;\n }\n /**\n * Removes the mouse wheel input support from the manager\n * @returns the current input manager\n */\n removeMouseWheel() {\n if (this._mouseWheelInput) {\n this.remove(this._mouseWheelInput);\n }\n return this;\n }\n /**\n * Add touch input support to the input manager.\n * @returns the current input manager\n */\n addTouch() {\n this.add(new FreeCameraTouchInput());\n return this;\n }\n /**\n * Remove all attached input methods from a camera\n */\n clear() {\n super.clear();\n this._mouseInput = null;\n }\n}\n//# sourceMappingURL=freeCameraInputsManager.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serializeAsVector3, serialize } from \"../Misc/decorators.js\";\nimport { Vector3, Vector2 } from \"../Maths/math.vector.js\";\nimport { Engine } from \"../Engines/engine.js\";\nimport { TargetCamera } from \"./targetCamera.js\";\nimport { FreeCameraInputsManager } from \"./freeCameraInputsManager.js\";\nimport { Tools } from \"../Misc/tools.js\";\n/**\n * This represents a free type of camera. It can be useful in First Person Shooter game for instance.\n * Please consider using the new UniversalCamera instead as it adds more functionality like the gamepad.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera\n */\nexport class FreeCamera extends TargetCamera {\n /**\n * Gets the input sensibility for a mouse input. (default is 2000.0)\n * Higher values reduce sensitivity.\n */\n get angularSensibility() {\n const mouse = this.inputs.attached[\"mouse\"];\n if (mouse) {\n return mouse.angularSensibility;\n }\n return 0;\n }\n /**\n * Sets the input sensibility for a mouse input. (default is 2000.0)\n * Higher values reduce sensitivity.\n */\n set angularSensibility(value) {\n const mouse = this.inputs.attached[\"mouse\"];\n if (mouse) {\n mouse.angularSensibility = value;\n }\n }\n /**\n * Gets or Set the list of keyboard keys used to control the forward move of the camera.\n */\n get keysUp() {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n return keyboard.keysUp;\n }\n return [];\n }\n set keysUp(value) {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n keyboard.keysUp = value;\n }\n }\n /**\n * Gets or Set the list of keyboard keys used to control the upward move of the camera.\n */\n get keysUpward() {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n return keyboard.keysUpward;\n }\n return [];\n }\n set keysUpward(value) {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n keyboard.keysUpward = value;\n }\n }\n /**\n * Gets or Set the list of keyboard keys used to control the backward move of the camera.\n */\n get keysDown() {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n return keyboard.keysDown;\n }\n return [];\n }\n set keysDown(value) {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n keyboard.keysDown = value;\n }\n }\n /**\n * Gets or Set the list of keyboard keys used to control the downward move of the camera.\n */\n get keysDownward() {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n return keyboard.keysDownward;\n }\n return [];\n }\n set keysDownward(value) {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n keyboard.keysDownward = value;\n }\n }\n /**\n * Gets or Set the list of keyboard keys used to control the left strafe move of the camera.\n */\n get keysLeft() {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n return keyboard.keysLeft;\n }\n return [];\n }\n set keysLeft(value) {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n keyboard.keysLeft = value;\n }\n }\n /**\n * Gets or Set the list of keyboard keys used to control the right strafe move of the camera.\n */\n get keysRight() {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n return keyboard.keysRight;\n }\n return [];\n }\n set keysRight(value) {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n keyboard.keysRight = value;\n }\n }\n /**\n * Gets or Set the list of keyboard keys used to control the left rotation move of the camera.\n */\n get keysRotateLeft() {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n return keyboard.keysRotateLeft;\n }\n return [];\n }\n set keysRotateLeft(value) {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n keyboard.keysRotateLeft = value;\n }\n }\n /**\n * Gets or Set the list of keyboard keys used to control the right rotation move of the camera.\n */\n get keysRotateRight() {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n return keyboard.keysRotateRight;\n }\n return [];\n }\n set keysRotateRight(value) {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n keyboard.keysRotateRight = value;\n }\n }\n /**\n * Gets or Set the list of keyboard keys used to control the up rotation move of the camera.\n */\n get keysRotateUp() {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n return keyboard.keysRotateUp;\n }\n return [];\n }\n set keysRotateUp(value) {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n keyboard.keysRotateUp = value;\n }\n }\n /**\n * Gets or Set the list of keyboard keys used to control the down rotation move of the camera.\n */\n get keysRotateDown() {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n return keyboard.keysRotateDown;\n }\n return [];\n }\n set keysRotateDown(value) {\n const keyboard = this.inputs.attached[\"keyboard\"];\n if (keyboard) {\n keyboard.keysRotateDown = value;\n }\n }\n /**\n * Instantiates a Free Camera.\n * This represents a free type of camera. It can be useful in First Person Shooter game for instance.\n * Please consider using the new UniversalCamera instead as it adds more functionality like touch to this camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera\n * @param name Define the name of the camera in the scene\n * @param position Define the start position of the camera in the scene\n * @param scene Define the scene the camera belongs to\n * @param setActiveOnSceneIfNoneActive Defines whether the camera should be marked as active if not other active cameras have been defined\n */\n constructor(name, position, scene, setActiveOnSceneIfNoneActive = true) {\n super(name, position, scene, setActiveOnSceneIfNoneActive);\n /**\n * Define the collision ellipsoid of the camera.\n * This is helpful to simulate a camera body like the player body around the camera\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions#arcrotatecamera\n */\n this.ellipsoid = new Vector3(0.5, 1, 0.5);\n /**\n * Define an offset for the position of the ellipsoid around the camera.\n * This can be helpful to determine the center of the body near the gravity center of the body\n * instead of its head.\n */\n this.ellipsoidOffset = new Vector3(0, 0, 0);\n /**\n * Enable or disable collisions of the camera with the rest of the scene objects.\n */\n this.checkCollisions = false;\n /**\n * Enable or disable gravity on the camera.\n */\n this.applyGravity = false;\n this._needMoveForGravity = false;\n this._oldPosition = Vector3.Zero();\n this._diffPosition = Vector3.Zero();\n this._newPosition = Vector3.Zero();\n // Collisions\n this._collisionMask = -1;\n this._onCollisionPositionChange = (collisionId, newPosition, collidedMesh = null) => {\n this._newPosition.copyFrom(newPosition);\n this._newPosition.subtractToRef(this._oldPosition, this._diffPosition);\n if (this._diffPosition.length() > Engine.CollisionsEpsilon) {\n this.position.addToRef(this._diffPosition, this._deferredPositionUpdate);\n if (!this._deferOnly) {\n this.position.copyFrom(this._deferredPositionUpdate);\n }\n else {\n this._deferredUpdated = true;\n }\n // call onCollide, if defined. Note that in case of deferred update, the actual position change might happen in the next frame.\n if (this.onCollide && collidedMesh) {\n this.onCollide(collidedMesh);\n }\n }\n };\n this.inputs = new FreeCameraInputsManager(this);\n this.inputs.addKeyboard().addMouse();\n }\n /**\n * Attached controls to the current camera.\n * @param ignored defines an ignored parameter kept for backward compatibility.\n * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)\n */\n attachControl(ignored, noPreventDefault) {\n // eslint-disable-next-line prefer-rest-params\n noPreventDefault = Tools.BackCompatCameraNoPreventDefault(arguments);\n this.inputs.attachElement(noPreventDefault);\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n this.inputs.detachElement();\n this.cameraDirection = new Vector3(0, 0, 0);\n this.cameraRotation = new Vector2(0, 0);\n }\n /**\n * Define a collision mask to limit the list of object the camera can collide with\n */\n get collisionMask() {\n return this._collisionMask;\n }\n set collisionMask(mask) {\n this._collisionMask = !isNaN(mask) ? mask : -1;\n }\n /**\n * @internal\n */\n _collideWithWorld(displacement) {\n let globalPosition;\n if (this.parent) {\n globalPosition = Vector3.TransformCoordinates(this.position, this.parent.getWorldMatrix());\n }\n else {\n globalPosition = this.position;\n }\n globalPosition.subtractFromFloatsToRef(0, this.ellipsoid.y, 0, this._oldPosition);\n this._oldPosition.addInPlace(this.ellipsoidOffset);\n const coordinator = this.getScene().collisionCoordinator;\n if (!this._collider) {\n this._collider = coordinator.createCollider();\n }\n this._collider._radius = this.ellipsoid;\n this._collider.collisionMask = this._collisionMask;\n //no need for clone, as long as gravity is not on.\n let actualDisplacement = displacement;\n //add gravity to the direction to prevent the dual-collision checking\n if (this.applyGravity) {\n //this prevents mending with cameraDirection, a global variable of the free camera class.\n actualDisplacement = displacement.add(this.getScene().gravity);\n }\n coordinator.getNewPosition(this._oldPosition, actualDisplacement, this._collider, 3, null, this._onCollisionPositionChange, this.uniqueId);\n }\n /** @internal */\n _checkInputs() {\n if (!this._localDirection) {\n this._localDirection = Vector3.Zero();\n this._transformedDirection = Vector3.Zero();\n }\n this.inputs.checkInputs();\n super._checkInputs();\n }\n /**\n * Enable movement without a user input. This allows gravity to always be applied.\n */\n set needMoveForGravity(value) {\n this._needMoveForGravity = value;\n }\n /**\n * When true, gravity is applied whether there is user input or not.\n */\n get needMoveForGravity() {\n return this._needMoveForGravity;\n }\n /** @internal */\n _decideIfNeedsToMove() {\n return this._needMoveForGravity || Math.abs(this.cameraDirection.x) > 0 || Math.abs(this.cameraDirection.y) > 0 || Math.abs(this.cameraDirection.z) > 0;\n }\n /** @internal */\n _updatePosition() {\n if (this.checkCollisions && this.getScene().collisionsEnabled) {\n this._collideWithWorld(this.cameraDirection);\n }\n else {\n super._updatePosition();\n }\n }\n /**\n * Destroy the camera and release the current resources hold by it.\n */\n dispose() {\n this.inputs.clear();\n super.dispose();\n }\n /**\n * Gets the current object class name.\n * @returns the class name\n */\n getClassName() {\n return \"FreeCamera\";\n }\n}\n__decorate([\n serializeAsVector3()\n], FreeCamera.prototype, \"ellipsoid\", void 0);\n__decorate([\n serializeAsVector3()\n], FreeCamera.prototype, \"ellipsoidOffset\", void 0);\n__decorate([\n serialize()\n], FreeCamera.prototype, \"checkCollisions\", void 0);\n__decorate([\n serialize()\n], FreeCamera.prototype, \"applyGravity\", void 0);\n//# sourceMappingURL=freeCamera.js.map","import { FreeCamera } from \"./freeCamera.js\";\nimport { Vector3 } from \"../Maths/math.vector.js\";\nimport { Node } from \"../node.js\";\nNode.AddNodeConstructor(\"TouchCamera\", (name, scene) => {\n return () => new TouchCamera(name, Vector3.Zero(), scene);\n});\n/**\n * This represents a FPS type of camera controlled by touch.\n * This is like a universal camera minus the Gamepad controls.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera\n */\nexport class TouchCamera extends FreeCamera {\n /**\n * Defines the touch sensibility for rotation.\n * The higher the faster.\n */\n get touchAngularSensibility() {\n const touch = this.inputs.attached[\"touch\"];\n if (touch) {\n return touch.touchAngularSensibility;\n }\n return 0;\n }\n set touchAngularSensibility(value) {\n const touch = this.inputs.attached[\"touch\"];\n if (touch) {\n touch.touchAngularSensibility = value;\n }\n }\n /**\n * Defines the touch sensibility for move.\n * The higher the faster.\n */\n get touchMoveSensibility() {\n const touch = this.inputs.attached[\"touch\"];\n if (touch) {\n return touch.touchMoveSensibility;\n }\n return 0;\n }\n set touchMoveSensibility(value) {\n const touch = this.inputs.attached[\"touch\"];\n if (touch) {\n touch.touchMoveSensibility = value;\n }\n }\n /**\n * Instantiates a new touch camera.\n * This represents a FPS type of camera controlled by touch.\n * This is like a universal camera minus the Gamepad controls.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera\n * @param name Define the name of the camera in the scene\n * @param position Define the start position of the camera in the scene\n * @param scene Define the scene the camera belongs to\n */\n constructor(name, position, scene) {\n super(name, position, scene);\n this.inputs.addTouch();\n this._setupInputs();\n }\n /**\n * Gets the current object class name.\n * @returns the class name\n */\n getClassName() {\n return \"TouchCamera\";\n }\n /** @internal */\n _setupInputs() {\n const touch = this.inputs.attached[\"touch\"];\n const mouse = this.inputs.attached[\"mouse\"];\n if (mouse) {\n mouse.touchEnabled = false;\n }\n else {\n touch.allowMouse = true;\n }\n }\n}\n//# sourceMappingURL=touchCamera.js.map","import { Observable } from \"../Misc/observable.js\";\n/**\n * Represents a gamepad control stick position\n */\nexport class StickValues {\n /**\n * Initializes the gamepad x and y control stick values\n * @param x The x component of the gamepad control stick value\n * @param y The y component of the gamepad control stick value\n */\n constructor(\n /**\n * The x component of the control stick\n */\n x, \n /**\n * The y component of the control stick\n */\n y) {\n this.x = x;\n this.y = y;\n }\n}\n/**\n * Represents a gamepad\n */\nexport class Gamepad {\n /**\n * Specifies if the gamepad has been connected\n */\n get isConnected() {\n return this._isConnected;\n }\n /**\n * Initializes the gamepad\n * @param id The id of the gamepad\n * @param index The index of the gamepad\n * @param browserGamepad The browser gamepad\n * @param leftStickX The x component of the left joystick\n * @param leftStickY The y component of the left joystick\n * @param rightStickX The x component of the right joystick\n * @param rightStickY The y component of the right joystick\n */\n constructor(\n /**\n * The id of the gamepad\n */\n id, \n /**\n * The index of the gamepad\n */\n index, \n /**\n * The browser gamepad\n */\n browserGamepad, leftStickX = 0, leftStickY = 1, rightStickX = 2, rightStickY = 3) {\n this.id = id;\n this.index = index;\n this.browserGamepad = browserGamepad;\n this._leftStick = { x: 0, y: 0 };\n this._rightStick = { x: 0, y: 0 };\n /** @internal */\n this._isConnected = true;\n /**\n * Specifies whether the left control stick should be Y-inverted\n */\n this._invertLeftStickY = false;\n this.type = Gamepad.GAMEPAD;\n this._leftStickAxisX = leftStickX;\n this._leftStickAxisY = leftStickY;\n this._rightStickAxisX = rightStickX;\n this._rightStickAxisY = rightStickY;\n if (this.browserGamepad.axes.length >= 2) {\n this._leftStick = { x: this.browserGamepad.axes[this._leftStickAxisX], y: this.browserGamepad.axes[this._leftStickAxisY] };\n }\n if (this.browserGamepad.axes.length >= 4) {\n this._rightStick = { x: this.browserGamepad.axes[this._rightStickAxisX], y: this.browserGamepad.axes[this._rightStickAxisY] };\n }\n }\n /**\n * Callback triggered when the left joystick has changed\n * @param callback\n */\n onleftstickchanged(callback) {\n this._onleftstickchanged = callback;\n }\n /**\n * Callback triggered when the right joystick has changed\n * @param callback\n */\n onrightstickchanged(callback) {\n this._onrightstickchanged = callback;\n }\n /**\n * Gets the left joystick\n */\n get leftStick() {\n return this._leftStick;\n }\n /**\n * Sets the left joystick values\n */\n set leftStick(newValues) {\n if (this._onleftstickchanged && (this._leftStick.x !== newValues.x || this._leftStick.y !== newValues.y)) {\n this._onleftstickchanged(newValues);\n }\n this._leftStick = newValues;\n }\n /**\n * Gets the right joystick\n */\n get rightStick() {\n return this._rightStick;\n }\n /**\n * Sets the right joystick value\n */\n set rightStick(newValues) {\n if (this._onrightstickchanged && (this._rightStick.x !== newValues.x || this._rightStick.y !== newValues.y)) {\n this._onrightstickchanged(newValues);\n }\n this._rightStick = newValues;\n }\n /**\n * Updates the gamepad joystick positions\n */\n update() {\n if (this._leftStick) {\n this.leftStick = { x: this.browserGamepad.axes[this._leftStickAxisX], y: this.browserGamepad.axes[this._leftStickAxisY] };\n if (this._invertLeftStickY) {\n this.leftStick.y *= -1;\n }\n }\n if (this._rightStick) {\n this.rightStick = { x: this.browserGamepad.axes[this._rightStickAxisX], y: this.browserGamepad.axes[this._rightStickAxisY] };\n }\n }\n /**\n * Disposes the gamepad\n */\n dispose() { }\n}\n/**\n * Represents a gamepad controller\n */\nGamepad.GAMEPAD = 0;\n/**\n * Represents a generic controller\n */\nGamepad.GENERIC = 1;\n/**\n * Represents an XBox controller\n */\nGamepad.XBOX = 2;\n/**\n * Represents a pose-enabled controller\n */\nGamepad.POSE_ENABLED = 3;\n/**\n * Represents an Dual Shock controller\n */\nGamepad.DUALSHOCK = 4;\n/**\n * Represents a generic gamepad\n */\nexport class GenericPad extends Gamepad {\n /**\n * Callback triggered when a button has been pressed\n * @param callback Called when a button has been pressed\n */\n onbuttondown(callback) {\n this._onbuttondown = callback;\n }\n /**\n * Callback triggered when a button has been released\n * @param callback Called when a button has been released\n */\n onbuttonup(callback) {\n this._onbuttonup = callback;\n }\n /**\n * Initializes the generic gamepad\n * @param id The id of the generic gamepad\n * @param index The index of the generic gamepad\n * @param browserGamepad The browser gamepad\n */\n constructor(id, index, browserGamepad) {\n super(id, index, browserGamepad);\n /**\n * Observable triggered when a button has been pressed\n */\n this.onButtonDownObservable = new Observable();\n /**\n * Observable triggered when a button has been released\n */\n this.onButtonUpObservable = new Observable();\n this.type = Gamepad.GENERIC;\n this._buttons = new Array(browserGamepad.buttons.length);\n }\n _setButtonValue(newValue, currentValue, buttonIndex) {\n if (newValue !== currentValue) {\n if (newValue === 1) {\n if (this._onbuttondown) {\n this._onbuttondown(buttonIndex);\n }\n this.onButtonDownObservable.notifyObservers(buttonIndex);\n }\n if (newValue === 0) {\n if (this._onbuttonup) {\n this._onbuttonup(buttonIndex);\n }\n this.onButtonUpObservable.notifyObservers(buttonIndex);\n }\n }\n return newValue;\n }\n /**\n * Updates the generic gamepad\n */\n update() {\n super.update();\n for (let index = 0; index < this._buttons.length; index++) {\n this._buttons[index] = this._setButtonValue(this.browserGamepad.buttons[index].value, this._buttons[index], index);\n }\n }\n /**\n * Disposes the generic gamepad\n */\n dispose() {\n super.dispose();\n this.onButtonDownObservable.clear();\n this.onButtonUpObservable.clear();\n }\n}\n//# sourceMappingURL=gamepad.js.map","import { Observable } from \"../Misc/observable.js\";\nimport { Gamepad } from \"../Gamepads/gamepad.js\";\n/**\n * Defines supported buttons for XBox360 compatible gamepads\n */\nexport var Xbox360Button;\n(function (Xbox360Button) {\n /** A */\n Xbox360Button[Xbox360Button[\"A\"] = 0] = \"A\";\n /** B */\n Xbox360Button[Xbox360Button[\"B\"] = 1] = \"B\";\n /** X */\n Xbox360Button[Xbox360Button[\"X\"] = 2] = \"X\";\n /** Y */\n Xbox360Button[Xbox360Button[\"Y\"] = 3] = \"Y\";\n /** Left button */\n Xbox360Button[Xbox360Button[\"LB\"] = 4] = \"LB\";\n /** Right button */\n Xbox360Button[Xbox360Button[\"RB\"] = 5] = \"RB\";\n /** Back */\n Xbox360Button[Xbox360Button[\"Back\"] = 8] = \"Back\";\n /** Start */\n Xbox360Button[Xbox360Button[\"Start\"] = 9] = \"Start\";\n /** Left stick */\n Xbox360Button[Xbox360Button[\"LeftStick\"] = 10] = \"LeftStick\";\n /** Right stick */\n Xbox360Button[Xbox360Button[\"RightStick\"] = 11] = \"RightStick\";\n})(Xbox360Button || (Xbox360Button = {}));\n/** Defines values for XBox360 DPad */\nexport var Xbox360Dpad;\n(function (Xbox360Dpad) {\n /** Up */\n Xbox360Dpad[Xbox360Dpad[\"Up\"] = 12] = \"Up\";\n /** Down */\n Xbox360Dpad[Xbox360Dpad[\"Down\"] = 13] = \"Down\";\n /** Left */\n Xbox360Dpad[Xbox360Dpad[\"Left\"] = 14] = \"Left\";\n /** Right */\n Xbox360Dpad[Xbox360Dpad[\"Right\"] = 15] = \"Right\";\n})(Xbox360Dpad || (Xbox360Dpad = {}));\n/**\n * Defines a XBox360 gamepad\n */\nexport class Xbox360Pad extends Gamepad {\n /**\n * Creates a new XBox360 gamepad object\n * @param id defines the id of this gamepad\n * @param index defines its index\n * @param gamepad defines the internal HTML gamepad object\n * @param xboxOne defines if it is a XBox One gamepad\n */\n constructor(id, index, gamepad, xboxOne = false) {\n super(id, index, gamepad, 0, 1, 2, 3);\n this._leftTrigger = 0;\n this._rightTrigger = 0;\n /** Observable raised when a button is pressed */\n this.onButtonDownObservable = new Observable();\n /** Observable raised when a button is released */\n this.onButtonUpObservable = new Observable();\n /** Observable raised when a pad is pressed */\n this.onPadDownObservable = new Observable();\n /** Observable raised when a pad is released */\n this.onPadUpObservable = new Observable();\n this._buttonA = 0;\n this._buttonB = 0;\n this._buttonX = 0;\n this._buttonY = 0;\n this._buttonBack = 0;\n this._buttonStart = 0;\n this._buttonLB = 0;\n this._buttonRB = 0;\n this._buttonLeftStick = 0;\n this._buttonRightStick = 0;\n this._dPadUp = 0;\n this._dPadDown = 0;\n this._dPadLeft = 0;\n this._dPadRight = 0;\n this._isXboxOnePad = false;\n this.type = Gamepad.XBOX;\n this._isXboxOnePad = xboxOne;\n }\n /**\n * Defines the callback to call when left trigger is pressed\n * @param callback defines the callback to use\n */\n onlefttriggerchanged(callback) {\n this._onlefttriggerchanged = callback;\n }\n /**\n * Defines the callback to call when right trigger is pressed\n * @param callback defines the callback to use\n */\n onrighttriggerchanged(callback) {\n this._onrighttriggerchanged = callback;\n }\n /**\n * Gets the left trigger value\n */\n get leftTrigger() {\n return this._leftTrigger;\n }\n /**\n * Sets the left trigger value\n */\n set leftTrigger(newValue) {\n if (this._onlefttriggerchanged && this._leftTrigger !== newValue) {\n this._onlefttriggerchanged(newValue);\n }\n this._leftTrigger = newValue;\n }\n /**\n * Gets the right trigger value\n */\n get rightTrigger() {\n return this._rightTrigger;\n }\n /**\n * Sets the right trigger value\n */\n set rightTrigger(newValue) {\n if (this._onrighttriggerchanged && this._rightTrigger !== newValue) {\n this._onrighttriggerchanged(newValue);\n }\n this._rightTrigger = newValue;\n }\n /**\n * Defines the callback to call when a button is pressed\n * @param callback defines the callback to use\n */\n onbuttondown(callback) {\n this._onbuttondown = callback;\n }\n /**\n * Defines the callback to call when a button is released\n * @param callback defines the callback to use\n */\n onbuttonup(callback) {\n this._onbuttonup = callback;\n }\n /**\n * Defines the callback to call when a pad is pressed\n * @param callback defines the callback to use\n */\n ondpaddown(callback) {\n this._ondpaddown = callback;\n }\n /**\n * Defines the callback to call when a pad is released\n * @param callback defines the callback to use\n */\n ondpadup(callback) {\n this._ondpadup = callback;\n }\n _setButtonValue(newValue, currentValue, buttonType) {\n if (newValue !== currentValue) {\n if (newValue === 1) {\n if (this._onbuttondown) {\n this._onbuttondown(buttonType);\n }\n this.onButtonDownObservable.notifyObservers(buttonType);\n }\n if (newValue === 0) {\n if (this._onbuttonup) {\n this._onbuttonup(buttonType);\n }\n this.onButtonUpObservable.notifyObservers(buttonType);\n }\n }\n return newValue;\n }\n _setDPadValue(newValue, currentValue, buttonType) {\n if (newValue !== currentValue) {\n if (newValue === 1) {\n if (this._ondpaddown) {\n this._ondpaddown(buttonType);\n }\n this.onPadDownObservable.notifyObservers(buttonType);\n }\n if (newValue === 0) {\n if (this._ondpadup) {\n this._ondpadup(buttonType);\n }\n this.onPadUpObservable.notifyObservers(buttonType);\n }\n }\n return newValue;\n }\n /**\n * Gets the value of the `A` button\n */\n get buttonA() {\n return this._buttonA;\n }\n /**\n * Sets the value of the `A` button\n */\n set buttonA(value) {\n this._buttonA = this._setButtonValue(value, this._buttonA, Xbox360Button.A);\n }\n /**\n * Gets the value of the `B` button\n */\n get buttonB() {\n return this._buttonB;\n }\n /**\n * Sets the value of the `B` button\n */\n set buttonB(value) {\n this._buttonB = this._setButtonValue(value, this._buttonB, Xbox360Button.B);\n }\n /**\n * Gets the value of the `X` button\n */\n get buttonX() {\n return this._buttonX;\n }\n /**\n * Sets the value of the `X` button\n */\n set buttonX(value) {\n this._buttonX = this._setButtonValue(value, this._buttonX, Xbox360Button.X);\n }\n /**\n * Gets the value of the `Y` button\n */\n get buttonY() {\n return this._buttonY;\n }\n /**\n * Sets the value of the `Y` button\n */\n set buttonY(value) {\n this._buttonY = this._setButtonValue(value, this._buttonY, Xbox360Button.Y);\n }\n /**\n * Gets the value of the `Start` button\n */\n get buttonStart() {\n return this._buttonStart;\n }\n /**\n * Sets the value of the `Start` button\n */\n set buttonStart(value) {\n this._buttonStart = this._setButtonValue(value, this._buttonStart, Xbox360Button.Start);\n }\n /**\n * Gets the value of the `Back` button\n */\n get buttonBack() {\n return this._buttonBack;\n }\n /**\n * Sets the value of the `Back` button\n */\n set buttonBack(value) {\n this._buttonBack = this._setButtonValue(value, this._buttonBack, Xbox360Button.Back);\n }\n /**\n * Gets the value of the `Left` button\n */\n get buttonLB() {\n return this._buttonLB;\n }\n /**\n * Sets the value of the `Left` button\n */\n set buttonLB(value) {\n this._buttonLB = this._setButtonValue(value, this._buttonLB, Xbox360Button.LB);\n }\n /**\n * Gets the value of the `Right` button\n */\n get buttonRB() {\n return this._buttonRB;\n }\n /**\n * Sets the value of the `Right` button\n */\n set buttonRB(value) {\n this._buttonRB = this._setButtonValue(value, this._buttonRB, Xbox360Button.RB);\n }\n /**\n * Gets the value of the Left joystick\n */\n get buttonLeftStick() {\n return this._buttonLeftStick;\n }\n /**\n * Sets the value of the Left joystick\n */\n set buttonLeftStick(value) {\n this._buttonLeftStick = this._setButtonValue(value, this._buttonLeftStick, Xbox360Button.LeftStick);\n }\n /**\n * Gets the value of the Right joystick\n */\n get buttonRightStick() {\n return this._buttonRightStick;\n }\n /**\n * Sets the value of the Right joystick\n */\n set buttonRightStick(value) {\n this._buttonRightStick = this._setButtonValue(value, this._buttonRightStick, Xbox360Button.RightStick);\n }\n /**\n * Gets the value of D-pad up\n */\n get dPadUp() {\n return this._dPadUp;\n }\n /**\n * Sets the value of D-pad up\n */\n set dPadUp(value) {\n this._dPadUp = this._setDPadValue(value, this._dPadUp, Xbox360Dpad.Up);\n }\n /**\n * Gets the value of D-pad down\n */\n get dPadDown() {\n return this._dPadDown;\n }\n /**\n * Sets the value of D-pad down\n */\n set dPadDown(value) {\n this._dPadDown = this._setDPadValue(value, this._dPadDown, Xbox360Dpad.Down);\n }\n /**\n * Gets the value of D-pad left\n */\n get dPadLeft() {\n return this._dPadLeft;\n }\n /**\n * Sets the value of D-pad left\n */\n set dPadLeft(value) {\n this._dPadLeft = this._setDPadValue(value, this._dPadLeft, Xbox360Dpad.Left);\n }\n /**\n * Gets the value of D-pad right\n */\n get dPadRight() {\n return this._dPadRight;\n }\n /**\n * Sets the value of D-pad right\n */\n set dPadRight(value) {\n this._dPadRight = this._setDPadValue(value, this._dPadRight, Xbox360Dpad.Right);\n }\n /**\n * Force the gamepad to synchronize with device values\n */\n update() {\n super.update();\n if (this._isXboxOnePad) {\n this.buttonA = this.browserGamepad.buttons[0].value;\n this.buttonB = this.browserGamepad.buttons[1].value;\n this.buttonX = this.browserGamepad.buttons[2].value;\n this.buttonY = this.browserGamepad.buttons[3].value;\n this.buttonLB = this.browserGamepad.buttons[4].value;\n this.buttonRB = this.browserGamepad.buttons[5].value;\n this.leftTrigger = this.browserGamepad.buttons[6].value;\n this.rightTrigger = this.browserGamepad.buttons[7].value;\n this.buttonBack = this.browserGamepad.buttons[8].value;\n this.buttonStart = this.browserGamepad.buttons[9].value;\n this.buttonLeftStick = this.browserGamepad.buttons[10].value;\n this.buttonRightStick = this.browserGamepad.buttons[11].value;\n this.dPadUp = this.browserGamepad.buttons[12].value;\n this.dPadDown = this.browserGamepad.buttons[13].value;\n this.dPadLeft = this.browserGamepad.buttons[14].value;\n this.dPadRight = this.browserGamepad.buttons[15].value;\n }\n else {\n this.buttonA = this.browserGamepad.buttons[0].value;\n this.buttonB = this.browserGamepad.buttons[1].value;\n this.buttonX = this.browserGamepad.buttons[2].value;\n this.buttonY = this.browserGamepad.buttons[3].value;\n this.buttonLB = this.browserGamepad.buttons[4].value;\n this.buttonRB = this.browserGamepad.buttons[5].value;\n this.leftTrigger = this.browserGamepad.buttons[6].value;\n this.rightTrigger = this.browserGamepad.buttons[7].value;\n this.buttonBack = this.browserGamepad.buttons[8].value;\n this.buttonStart = this.browserGamepad.buttons[9].value;\n this.buttonLeftStick = this.browserGamepad.buttons[10].value;\n this.buttonRightStick = this.browserGamepad.buttons[11].value;\n this.dPadUp = this.browserGamepad.buttons[12].value;\n this.dPadDown = this.browserGamepad.buttons[13].value;\n this.dPadLeft = this.browserGamepad.buttons[14].value;\n this.dPadRight = this.browserGamepad.buttons[15].value;\n }\n }\n /**\n * Disposes the gamepad\n */\n dispose() {\n super.dispose();\n this.onButtonDownObservable.clear();\n this.onButtonUpObservable.clear();\n this.onPadDownObservable.clear();\n this.onPadUpObservable.clear();\n }\n}\n//# sourceMappingURL=xboxGamepad.js.map","import { Observable } from \"../Misc/observable.js\";\nimport { Gamepad } from \"./gamepad.js\";\n/**\n * Defines supported buttons for DualShock compatible gamepads\n */\nexport var DualShockButton;\n(function (DualShockButton) {\n /** Cross */\n DualShockButton[DualShockButton[\"Cross\"] = 0] = \"Cross\";\n /** Circle */\n DualShockButton[DualShockButton[\"Circle\"] = 1] = \"Circle\";\n /** Square */\n DualShockButton[DualShockButton[\"Square\"] = 2] = \"Square\";\n /** Triangle */\n DualShockButton[DualShockButton[\"Triangle\"] = 3] = \"Triangle\";\n /** L1 */\n DualShockButton[DualShockButton[\"L1\"] = 4] = \"L1\";\n /** R1 */\n DualShockButton[DualShockButton[\"R1\"] = 5] = \"R1\";\n /** Share */\n DualShockButton[DualShockButton[\"Share\"] = 8] = \"Share\";\n /** Options */\n DualShockButton[DualShockButton[\"Options\"] = 9] = \"Options\";\n /** Left stick */\n DualShockButton[DualShockButton[\"LeftStick\"] = 10] = \"LeftStick\";\n /** Right stick */\n DualShockButton[DualShockButton[\"RightStick\"] = 11] = \"RightStick\";\n})(DualShockButton || (DualShockButton = {}));\n/** Defines values for DualShock DPad */\nexport var DualShockDpad;\n(function (DualShockDpad) {\n /** Up */\n DualShockDpad[DualShockDpad[\"Up\"] = 12] = \"Up\";\n /** Down */\n DualShockDpad[DualShockDpad[\"Down\"] = 13] = \"Down\";\n /** Left */\n DualShockDpad[DualShockDpad[\"Left\"] = 14] = \"Left\";\n /** Right */\n DualShockDpad[DualShockDpad[\"Right\"] = 15] = \"Right\";\n})(DualShockDpad || (DualShockDpad = {}));\n/**\n * Defines a DualShock gamepad\n */\nexport class DualShockPad extends Gamepad {\n /**\n * Creates a new DualShock gamepad object\n * @param id defines the id of this gamepad\n * @param index defines its index\n * @param gamepad defines the internal HTML gamepad object\n */\n constructor(id, index, gamepad) {\n super(id.replace(\"STANDARD GAMEPAD\", \"SONY PLAYSTATION DUALSHOCK\"), index, gamepad, 0, 1, 2, 3);\n this._leftTrigger = 0;\n this._rightTrigger = 0;\n /** Observable raised when a button is pressed */\n this.onButtonDownObservable = new Observable();\n /** Observable raised when a button is released */\n this.onButtonUpObservable = new Observable();\n /** Observable raised when a pad is pressed */\n this.onPadDownObservable = new Observable();\n /** Observable raised when a pad is released */\n this.onPadUpObservable = new Observable();\n this._buttonCross = 0;\n this._buttonCircle = 0;\n this._buttonSquare = 0;\n this._buttonTriangle = 0;\n this._buttonShare = 0;\n this._buttonOptions = 0;\n this._buttonL1 = 0;\n this._buttonR1 = 0;\n this._buttonLeftStick = 0;\n this._buttonRightStick = 0;\n this._dPadUp = 0;\n this._dPadDown = 0;\n this._dPadLeft = 0;\n this._dPadRight = 0;\n this.type = Gamepad.DUALSHOCK;\n }\n /**\n * Defines the callback to call when left trigger is pressed\n * @param callback defines the callback to use\n */\n onlefttriggerchanged(callback) {\n this._onlefttriggerchanged = callback;\n }\n /**\n * Defines the callback to call when right trigger is pressed\n * @param callback defines the callback to use\n */\n onrighttriggerchanged(callback) {\n this._onrighttriggerchanged = callback;\n }\n /**\n * Gets the left trigger value\n */\n get leftTrigger() {\n return this._leftTrigger;\n }\n /**\n * Sets the left trigger value\n */\n set leftTrigger(newValue) {\n if (this._onlefttriggerchanged && this._leftTrigger !== newValue) {\n this._onlefttriggerchanged(newValue);\n }\n this._leftTrigger = newValue;\n }\n /**\n * Gets the right trigger value\n */\n get rightTrigger() {\n return this._rightTrigger;\n }\n /**\n * Sets the right trigger value\n */\n set rightTrigger(newValue) {\n if (this._onrighttriggerchanged && this._rightTrigger !== newValue) {\n this._onrighttriggerchanged(newValue);\n }\n this._rightTrigger = newValue;\n }\n /**\n * Defines the callback to call when a button is pressed\n * @param callback defines the callback to use\n */\n onbuttondown(callback) {\n this._onbuttondown = callback;\n }\n /**\n * Defines the callback to call when a button is released\n * @param callback defines the callback to use\n */\n onbuttonup(callback) {\n this._onbuttonup = callback;\n }\n /**\n * Defines the callback to call when a pad is pressed\n * @param callback defines the callback to use\n */\n ondpaddown(callback) {\n this._ondpaddown = callback;\n }\n /**\n * Defines the callback to call when a pad is released\n * @param callback defines the callback to use\n */\n ondpadup(callback) {\n this._ondpadup = callback;\n }\n _setButtonValue(newValue, currentValue, buttonType) {\n if (newValue !== currentValue) {\n if (newValue === 1) {\n if (this._onbuttondown) {\n this._onbuttondown(buttonType);\n }\n this.onButtonDownObservable.notifyObservers(buttonType);\n }\n if (newValue === 0) {\n if (this._onbuttonup) {\n this._onbuttonup(buttonType);\n }\n this.onButtonUpObservable.notifyObservers(buttonType);\n }\n }\n return newValue;\n }\n _setDPadValue(newValue, currentValue, buttonType) {\n if (newValue !== currentValue) {\n if (newValue === 1) {\n if (this._ondpaddown) {\n this._ondpaddown(buttonType);\n }\n this.onPadDownObservable.notifyObservers(buttonType);\n }\n if (newValue === 0) {\n if (this._ondpadup) {\n this._ondpadup(buttonType);\n }\n this.onPadUpObservable.notifyObservers(buttonType);\n }\n }\n return newValue;\n }\n /**\n * Gets the value of the `Cross` button\n */\n get buttonCross() {\n return this._buttonCross;\n }\n /**\n * Sets the value of the `Cross` button\n */\n set buttonCross(value) {\n this._buttonCross = this._setButtonValue(value, this._buttonCross, DualShockButton.Cross);\n }\n /**\n * Gets the value of the `Circle` button\n */\n get buttonCircle() {\n return this._buttonCircle;\n }\n /**\n * Sets the value of the `Circle` button\n */\n set buttonCircle(value) {\n this._buttonCircle = this._setButtonValue(value, this._buttonCircle, DualShockButton.Circle);\n }\n /**\n * Gets the value of the `Square` button\n */\n get buttonSquare() {\n return this._buttonSquare;\n }\n /**\n * Sets the value of the `Square` button\n */\n set buttonSquare(value) {\n this._buttonSquare = this._setButtonValue(value, this._buttonSquare, DualShockButton.Square);\n }\n /**\n * Gets the value of the `Triangle` button\n */\n get buttonTriangle() {\n return this._buttonTriangle;\n }\n /**\n * Sets the value of the `Triangle` button\n */\n set buttonTriangle(value) {\n this._buttonTriangle = this._setButtonValue(value, this._buttonTriangle, DualShockButton.Triangle);\n }\n /**\n * Gets the value of the `Options` button\n */\n get buttonOptions() {\n return this._buttonOptions;\n }\n /**\n * Sets the value of the `Options` button\n */\n set buttonOptions(value) {\n this._buttonOptions = this._setButtonValue(value, this._buttonOptions, DualShockButton.Options);\n }\n /**\n * Gets the value of the `Share` button\n */\n get buttonShare() {\n return this._buttonShare;\n }\n /**\n * Sets the value of the `Share` button\n */\n set buttonShare(value) {\n this._buttonShare = this._setButtonValue(value, this._buttonShare, DualShockButton.Share);\n }\n /**\n * Gets the value of the `L1` button\n */\n get buttonL1() {\n return this._buttonL1;\n }\n /**\n * Sets the value of the `L1` button\n */\n set buttonL1(value) {\n this._buttonL1 = this._setButtonValue(value, this._buttonL1, DualShockButton.L1);\n }\n /**\n * Gets the value of the `R1` button\n */\n get buttonR1() {\n return this._buttonR1;\n }\n /**\n * Sets the value of the `R1` button\n */\n set buttonR1(value) {\n this._buttonR1 = this._setButtonValue(value, this._buttonR1, DualShockButton.R1);\n }\n /**\n * Gets the value of the Left joystick\n */\n get buttonLeftStick() {\n return this._buttonLeftStick;\n }\n /**\n * Sets the value of the Left joystick\n */\n set buttonLeftStick(value) {\n this._buttonLeftStick = this._setButtonValue(value, this._buttonLeftStick, DualShockButton.LeftStick);\n }\n /**\n * Gets the value of the Right joystick\n */\n get buttonRightStick() {\n return this._buttonRightStick;\n }\n /**\n * Sets the value of the Right joystick\n */\n set buttonRightStick(value) {\n this._buttonRightStick = this._setButtonValue(value, this._buttonRightStick, DualShockButton.RightStick);\n }\n /**\n * Gets the value of D-pad up\n */\n get dPadUp() {\n return this._dPadUp;\n }\n /**\n * Sets the value of D-pad up\n */\n set dPadUp(value) {\n this._dPadUp = this._setDPadValue(value, this._dPadUp, DualShockDpad.Up);\n }\n /**\n * Gets the value of D-pad down\n */\n get dPadDown() {\n return this._dPadDown;\n }\n /**\n * Sets the value of D-pad down\n */\n set dPadDown(value) {\n this._dPadDown = this._setDPadValue(value, this._dPadDown, DualShockDpad.Down);\n }\n /**\n * Gets the value of D-pad left\n */\n get dPadLeft() {\n return this._dPadLeft;\n }\n /**\n * Sets the value of D-pad left\n */\n set dPadLeft(value) {\n this._dPadLeft = this._setDPadValue(value, this._dPadLeft, DualShockDpad.Left);\n }\n /**\n * Gets the value of D-pad right\n */\n get dPadRight() {\n return this._dPadRight;\n }\n /**\n * Sets the value of D-pad right\n */\n set dPadRight(value) {\n this._dPadRight = this._setDPadValue(value, this._dPadRight, DualShockDpad.Right);\n }\n /**\n * Force the gamepad to synchronize with device values\n */\n update() {\n super.update();\n this.buttonCross = this.browserGamepad.buttons[0].value;\n this.buttonCircle = this.browserGamepad.buttons[1].value;\n this.buttonSquare = this.browserGamepad.buttons[2].value;\n this.buttonTriangle = this.browserGamepad.buttons[3].value;\n this.buttonL1 = this.browserGamepad.buttons[4].value;\n this.buttonR1 = this.browserGamepad.buttons[5].value;\n this.leftTrigger = this.browserGamepad.buttons[6].value;\n this.rightTrigger = this.browserGamepad.buttons[7].value;\n this.buttonShare = this.browserGamepad.buttons[8].value;\n this.buttonOptions = this.browserGamepad.buttons[9].value;\n this.buttonLeftStick = this.browserGamepad.buttons[10].value;\n this.buttonRightStick = this.browserGamepad.buttons[11].value;\n this.dPadUp = this.browserGamepad.buttons[12].value;\n this.dPadDown = this.browserGamepad.buttons[13].value;\n this.dPadLeft = this.browserGamepad.buttons[14].value;\n this.dPadRight = this.browserGamepad.buttons[15].value;\n }\n /**\n * Disposes the gamepad\n */\n dispose() {\n super.dispose();\n this.onButtonDownObservable.clear();\n this.onButtonUpObservable.clear();\n this.onPadDownObservable.clear();\n this.onPadUpObservable.clear();\n }\n}\n//# sourceMappingURL=dualShockGamepad.js.map","import { Observable } from \"../Misc/observable.js\";\nimport { IsWindowObjectExist } from \"../Misc/domManagement.js\";\nimport { Xbox360Pad } from \"./xboxGamepad.js\";\nimport { Gamepad, GenericPad } from \"./gamepad.js\";\nimport { Engine } from \"../Engines/engine.js\";\nimport { DualShockPad } from \"./dualShockGamepad.js\";\nimport { Tools } from \"../Misc/tools.js\";\n/**\n * Manager for handling gamepads\n */\nexport class GamepadManager {\n /**\n * Initializes the gamepad manager\n * @param _scene BabylonJS scene\n */\n constructor(_scene) {\n this._scene = _scene;\n this._babylonGamepads = [];\n this._oneGamepadConnected = false;\n /** @internal */\n this._isMonitoring = false;\n /**\n * observable to be triggered when the gamepad controller has been disconnected\n */\n this.onGamepadDisconnectedObservable = new Observable();\n if (!IsWindowObjectExist()) {\n this._gamepadEventSupported = false;\n }\n else {\n this._gamepadEventSupported = \"GamepadEvent\" in window;\n this._gamepadSupport = navigator && navigator.getGamepads;\n }\n this.onGamepadConnectedObservable = new Observable((observer) => {\n // This will be used to raise the onGamepadConnected for all gamepads ALREADY connected\n for (const i in this._babylonGamepads) {\n const gamepad = this._babylonGamepads[i];\n if (gamepad && gamepad._isConnected) {\n this.onGamepadConnectedObservable.notifyObserver(observer, gamepad);\n }\n }\n });\n this._onGamepadConnectedEvent = (evt) => {\n const gamepad = evt.gamepad;\n if (gamepad.index in this._babylonGamepads) {\n if (this._babylonGamepads[gamepad.index].isConnected) {\n return;\n }\n }\n let newGamepad;\n if (this._babylonGamepads[gamepad.index]) {\n newGamepad = this._babylonGamepads[gamepad.index];\n newGamepad.browserGamepad = gamepad;\n newGamepad._isConnected = true;\n }\n else {\n newGamepad = this._addNewGamepad(gamepad);\n }\n this.onGamepadConnectedObservable.notifyObservers(newGamepad);\n this._startMonitoringGamepads();\n };\n this._onGamepadDisconnectedEvent = (evt) => {\n const gamepad = evt.gamepad;\n // Remove the gamepad from the list of gamepads to monitor.\n for (const i in this._babylonGamepads) {\n if (this._babylonGamepads[i].index === gamepad.index) {\n const disconnectedGamepad = this._babylonGamepads[i];\n disconnectedGamepad._isConnected = false;\n this.onGamepadDisconnectedObservable.notifyObservers(disconnectedGamepad);\n disconnectedGamepad.dispose && disconnectedGamepad.dispose();\n break;\n }\n }\n };\n if (this._gamepadSupport) {\n //first add already-connected gamepads\n this._updateGamepadObjects();\n if (this._babylonGamepads.length) {\n this._startMonitoringGamepads();\n }\n // Checking if the gamepad connected event is supported (like in Firefox)\n if (this._gamepadEventSupported) {\n const hostWindow = this._scene ? this._scene.getEngine().getHostWindow() : window;\n if (hostWindow) {\n hostWindow.addEventListener(\"gamepadconnected\", this._onGamepadConnectedEvent, false);\n hostWindow.addEventListener(\"gamepaddisconnected\", this._onGamepadDisconnectedEvent, false);\n }\n }\n else {\n this._startMonitoringGamepads();\n }\n }\n }\n /**\n * The gamepads in the game pad manager\n */\n get gamepads() {\n return this._babylonGamepads;\n }\n /**\n * Get the gamepad controllers based on type\n * @param type The type of gamepad controller\n * @returns Nullable gamepad\n */\n getGamepadByType(type = Gamepad.XBOX) {\n for (const gamepad of this._babylonGamepads) {\n if (gamepad && gamepad.type === type) {\n return gamepad;\n }\n }\n return null;\n }\n /**\n * Disposes the gamepad manager\n */\n dispose() {\n if (this._gamepadEventSupported) {\n if (this._onGamepadConnectedEvent) {\n window.removeEventListener(\"gamepadconnected\", this._onGamepadConnectedEvent);\n }\n if (this._onGamepadDisconnectedEvent) {\n window.removeEventListener(\"gamepaddisconnected\", this._onGamepadDisconnectedEvent);\n }\n this._onGamepadConnectedEvent = null;\n this._onGamepadDisconnectedEvent = null;\n }\n this._babylonGamepads.forEach((gamepad) => {\n gamepad.dispose();\n });\n this.onGamepadConnectedObservable.clear();\n this.onGamepadDisconnectedObservable.clear();\n this._oneGamepadConnected = false;\n this._stopMonitoringGamepads();\n this._babylonGamepads = [];\n }\n _addNewGamepad(gamepad) {\n if (!this._oneGamepadConnected) {\n this._oneGamepadConnected = true;\n }\n let newGamepad;\n const dualShock = gamepad.id.search(\"054c\") !== -1 && gamepad.id.search(\"0ce6\") === -1;\n const xboxOne = gamepad.id.search(\"Xbox One\") !== -1;\n if (xboxOne ||\n gamepad.id.search(\"Xbox 360\") !== -1 ||\n gamepad.id.search(\"xinput\") !== -1 ||\n (gamepad.id.search(\"045e\") !== -1 && gamepad.id.search(\"Surface Dock\") === -1)) {\n // make sure the Surface Dock Extender is not detected as an xbox controller\n newGamepad = new Xbox360Pad(gamepad.id, gamepad.index, gamepad, xboxOne);\n }\n else if (dualShock) {\n newGamepad = new DualShockPad(gamepad.id, gamepad.index, gamepad);\n }\n else {\n newGamepad = new GenericPad(gamepad.id, gamepad.index, gamepad);\n }\n this._babylonGamepads[newGamepad.index] = newGamepad;\n return newGamepad;\n }\n _startMonitoringGamepads() {\n if (!this._isMonitoring) {\n this._isMonitoring = true;\n //back-comp\n this._checkGamepadsStatus();\n }\n }\n _stopMonitoringGamepads() {\n this._isMonitoring = false;\n }\n /** @internal */\n _checkGamepadsStatus() {\n // Hack to be compatible Chrome\n this._updateGamepadObjects();\n for (const i in this._babylonGamepads) {\n const gamepad = this._babylonGamepads[i];\n if (!gamepad || !gamepad.isConnected) {\n continue;\n }\n try {\n gamepad.update();\n }\n catch (_a) {\n if (this._loggedErrors.indexOf(gamepad.index) === -1) {\n Tools.Warn(`Error updating gamepad ${gamepad.id}`);\n this._loggedErrors.push(gamepad.index);\n }\n }\n }\n if (this._isMonitoring) {\n Engine.QueueNewFrame(() => {\n this._checkGamepadsStatus();\n });\n }\n }\n // This function is called only on Chrome, which does not properly support\n // connection/disconnection events and forces you to recopy again the gamepad object\n _updateGamepadObjects() {\n const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\n for (let i = 0; i < gamepads.length; i++) {\n const gamepad = gamepads[i];\n if (gamepad) {\n if (!this._babylonGamepads[gamepad.index]) {\n const newGamepad = this._addNewGamepad(gamepad);\n this.onGamepadConnectedObservable.notifyObservers(newGamepad);\n }\n else {\n // Forced to copy again this object for Chrome for unknown reason\n this._babylonGamepads[i].browserGamepad = gamepad;\n if (!this._babylonGamepads[i].isConnected) {\n this._babylonGamepads[i]._isConnected = true;\n this.onGamepadConnectedObservable.notifyObservers(this._babylonGamepads[i]);\n }\n }\n }\n }\n }\n}\n//# sourceMappingURL=gamepadManager.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize } from \"../../Misc/decorators.js\";\nimport { CameraInputTypes } from \"../../Cameras/cameraInputsManager.js\";\nimport { Matrix, Vector3, Vector2 } from \"../../Maths/math.vector.js\";\nimport { Gamepad } from \"../../Gamepads/gamepad.js\";\n/**\n * Manage the gamepad inputs to control a free camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class FreeCameraGamepadInput {\n constructor() {\n /**\n * Defines the gamepad rotation sensibility.\n * This is the threshold from when rotation starts to be accounted for to prevent jittering.\n */\n this.gamepadAngularSensibility = 200;\n /**\n * Defines the gamepad move sensibility.\n * This is the threshold from when moving starts to be accounted for for to prevent jittering.\n */\n this.gamepadMoveSensibility = 40;\n /**\n * Defines the minimum value at which any analog stick input is ignored.\n * Note: This value should only be a value between 0 and 1.\n */\n this.deadzoneDelta = 0.1;\n this._yAxisScale = 1.0;\n this._cameraTransform = Matrix.Identity();\n this._deltaTransform = Vector3.Zero();\n this._vector3 = Vector3.Zero();\n this._vector2 = Vector2.Zero();\n }\n /**\n * Gets or sets a boolean indicating that Yaxis (for right stick) should be inverted\n */\n get invertYAxis() {\n return this._yAxisScale !== 1.0;\n }\n set invertYAxis(value) {\n this._yAxisScale = value ? -1.0 : 1.0;\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n */\n attachControl() {\n const manager = this.camera.getScene().gamepadManager;\n this._onGamepadConnectedObserver = manager.onGamepadConnectedObservable.add((gamepad) => {\n if (gamepad.type !== Gamepad.POSE_ENABLED) {\n // prioritize XBOX gamepads.\n if (!this.gamepad || gamepad.type === Gamepad.XBOX) {\n this.gamepad = gamepad;\n }\n }\n });\n this._onGamepadDisconnectedObserver = manager.onGamepadDisconnectedObservable.add((gamepad) => {\n if (this.gamepad === gamepad) {\n this.gamepad = null;\n }\n });\n // check if there are already other controllers connected\n this.gamepad = manager.getGamepadByType(Gamepad.XBOX);\n // if no xbox controller was found, but there are gamepad controllers, take the first one\n if (!this.gamepad && manager.gamepads.length) {\n this.gamepad = manager.gamepads[0];\n }\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver);\n this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver);\n this.gamepad = null;\n }\n /**\n * Update the current camera state depending on the inputs that have been used this frame.\n * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.\n */\n checkInputs() {\n if (this.gamepad && this.gamepad.leftStick) {\n const camera = this.camera;\n const lsValues = this.gamepad.leftStick;\n if (this.gamepadMoveSensibility !== 0) {\n lsValues.x = Math.abs(lsValues.x) > this.deadzoneDelta ? lsValues.x / this.gamepadMoveSensibility : 0;\n lsValues.y = Math.abs(lsValues.y) > this.deadzoneDelta ? lsValues.y / this.gamepadMoveSensibility : 0;\n }\n let rsValues = this.gamepad.rightStick;\n if (rsValues && this.gamepadAngularSensibility !== 0) {\n rsValues.x = Math.abs(rsValues.x) > this.deadzoneDelta ? rsValues.x / this.gamepadAngularSensibility : 0;\n rsValues.y = (Math.abs(rsValues.y) > this.deadzoneDelta ? rsValues.y / this.gamepadAngularSensibility : 0) * this._yAxisScale;\n }\n else {\n rsValues = { x: 0, y: 0 };\n }\n if (!camera.rotationQuaternion) {\n Matrix.RotationYawPitchRollToRef(camera.rotation.y, camera.rotation.x, 0, this._cameraTransform);\n }\n else {\n camera.rotationQuaternion.toRotationMatrix(this._cameraTransform);\n }\n const speed = camera._computeLocalCameraSpeed() * 50.0;\n this._vector3.copyFromFloats(lsValues.x * speed, 0, -lsValues.y * speed);\n Vector3.TransformCoordinatesToRef(this._vector3, this._cameraTransform, this._deltaTransform);\n camera.cameraDirection.addInPlace(this._deltaTransform);\n this._vector2.copyFromFloats(rsValues.y, rsValues.x);\n camera.cameraRotation.addInPlace(this._vector2);\n }\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"FreeCameraGamepadInput\";\n }\n /**\n * Get the friendly name associated with the input class.\n * @returns the input friendly name\n */\n getSimpleName() {\n return \"gamepad\";\n }\n}\n__decorate([\n serialize()\n], FreeCameraGamepadInput.prototype, \"gamepadAngularSensibility\", void 0);\n__decorate([\n serialize()\n], FreeCameraGamepadInput.prototype, \"gamepadMoveSensibility\", void 0);\nCameraInputTypes[\"FreeCameraGamepadInput\"] = FreeCameraGamepadInput;\n//# sourceMappingURL=freeCameraGamepadInput.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize } from \"../../Misc/decorators.js\";\nimport { Tools } from \"../../Misc/tools.js\";\nimport { PointerEventTypes } from \"../../Events/pointerEvents.js\";\n/**\n * Base class for Camera Pointer Inputs.\n * See FollowCameraPointersInput in src/Cameras/Inputs/followCameraPointersInput.ts\n * for example usage.\n */\nexport class BaseCameraPointersInput {\n constructor() {\n this._currentActiveButton = -1;\n /**\n * Defines the buttons associated with the input to handle camera move.\n */\n this.buttons = [0, 1, 2];\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)\n */\n attachControl(noPreventDefault) {\n // eslint-disable-next-line prefer-rest-params\n noPreventDefault = Tools.BackCompatCameraNoPreventDefault(arguments);\n const engine = this.camera.getEngine();\n const element = engine.getInputElement();\n let previousPinchSquaredDistance = 0;\n let previousMultiTouchPanPosition = null;\n this._pointA = null;\n this._pointB = null;\n this._altKey = false;\n this._ctrlKey = false;\n this._metaKey = false;\n this._shiftKey = false;\n this._buttonsPressed = 0;\n this._pointerInput = (p) => {\n var _a, _b;\n const evt = p.event;\n const isTouch = evt.pointerType === \"touch\";\n if (p.type !== PointerEventTypes.POINTERMOVE && this.buttons.indexOf(evt.button) === -1) {\n return;\n }\n const srcElement = evt.target;\n this._altKey = evt.altKey;\n this._ctrlKey = evt.ctrlKey;\n this._metaKey = evt.metaKey;\n this._shiftKey = evt.shiftKey;\n this._buttonsPressed = evt.buttons;\n if (engine.isPointerLock) {\n const offsetX = evt.movementX;\n const offsetY = evt.movementY;\n this.onTouch(null, offsetX, offsetY);\n this._pointA = null;\n this._pointB = null;\n }\n else if (p.type !== PointerEventTypes.POINTERDOWN && isTouch && ((_a = this._pointA) === null || _a === void 0 ? void 0 : _a.pointerId) !== evt.pointerId && ((_b = this._pointB) === null || _b === void 0 ? void 0 : _b.pointerId) !== evt.pointerId) {\n return; // If we get a non-down event for a touch that we're not tracking, ignore it\n }\n else if (p.type === PointerEventTypes.POINTERDOWN && (this._currentActiveButton === -1 || isTouch)) {\n try {\n srcElement === null || srcElement === void 0 ? void 0 : srcElement.setPointerCapture(evt.pointerId);\n }\n catch (e) {\n //Nothing to do with the error. Execution will continue.\n }\n if (this._pointA === null) {\n this._pointA = {\n x: evt.clientX,\n y: evt.clientY,\n pointerId: evt.pointerId,\n type: evt.pointerType,\n };\n }\n else if (this._pointB === null) {\n this._pointB = {\n x: evt.clientX,\n y: evt.clientY,\n pointerId: evt.pointerId,\n type: evt.pointerType,\n };\n }\n else {\n return; // We are already tracking two pointers so ignore this one\n }\n if (this._currentActiveButton === -1 && !isTouch) {\n this._currentActiveButton = evt.button;\n }\n this.onButtonDown(evt);\n if (!noPreventDefault) {\n evt.preventDefault();\n element && element.focus();\n }\n }\n else if (p.type === PointerEventTypes.POINTERDOUBLETAP) {\n this.onDoubleTap(evt.pointerType);\n }\n else if (p.type === PointerEventTypes.POINTERUP && (this._currentActiveButton === evt.button || isTouch)) {\n try {\n srcElement === null || srcElement === void 0 ? void 0 : srcElement.releasePointerCapture(evt.pointerId);\n }\n catch (e) {\n //Nothing to do with the error.\n }\n if (!isTouch) {\n this._pointB = null; // Mouse and pen are mono pointer\n }\n //would be better to use pointers.remove(evt.pointerId) for multitouch gestures,\n //but emptying completely pointers collection is required to fix a bug on iPhone :\n //when changing orientation while pinching camera,\n //one pointer stay pressed forever if we don't release all pointers\n //will be ok to put back pointers.remove(evt.pointerId); when iPhone bug corrected\n if (engine._badOS) {\n this._pointA = this._pointB = null;\n }\n else {\n //only remove the impacted pointer in case of multitouch allowing on most\n //platforms switching from rotate to zoom and pan seamlessly.\n if (this._pointB && this._pointA && this._pointA.pointerId == evt.pointerId) {\n this._pointA = this._pointB;\n this._pointB = null;\n }\n else if (this._pointA && this._pointB && this._pointB.pointerId == evt.pointerId) {\n this._pointB = null;\n }\n else {\n this._pointA = this._pointB = null;\n }\n }\n if (previousPinchSquaredDistance !== 0 || previousMultiTouchPanPosition) {\n // Previous pinch data is populated but a button has been lifted\n // so pinch has ended.\n this.onMultiTouch(this._pointA, this._pointB, previousPinchSquaredDistance, 0, // pinchSquaredDistance\n previousMultiTouchPanPosition, null // multiTouchPanPosition\n );\n previousPinchSquaredDistance = 0;\n previousMultiTouchPanPosition = null;\n }\n this._currentActiveButton = -1;\n this.onButtonUp(evt);\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n }\n else if (p.type === PointerEventTypes.POINTERMOVE) {\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n // One button down\n if (this._pointA && this._pointB === null) {\n const offsetX = evt.clientX - this._pointA.x;\n const offsetY = evt.clientY - this._pointA.y;\n this.onTouch(this._pointA, offsetX, offsetY);\n this._pointA.x = evt.clientX;\n this._pointA.y = evt.clientY;\n }\n // Two buttons down: pinch\n else if (this._pointA && this._pointB) {\n const ed = this._pointA.pointerId === evt.pointerId ? this._pointA : this._pointB;\n ed.x = evt.clientX;\n ed.y = evt.clientY;\n const distX = this._pointA.x - this._pointB.x;\n const distY = this._pointA.y - this._pointB.y;\n const pinchSquaredDistance = distX * distX + distY * distY;\n const multiTouchPanPosition = {\n x: (this._pointA.x + this._pointB.x) / 2,\n y: (this._pointA.y + this._pointB.y) / 2,\n pointerId: evt.pointerId,\n type: p.type,\n };\n this.onMultiTouch(this._pointA, this._pointB, previousPinchSquaredDistance, pinchSquaredDistance, previousMultiTouchPanPosition, multiTouchPanPosition);\n previousMultiTouchPanPosition = multiTouchPanPosition;\n previousPinchSquaredDistance = pinchSquaredDistance;\n }\n }\n };\n this._observer = this.camera\n .getScene()\n ._inputManager._addCameraPointerObserver(this._pointerInput, PointerEventTypes.POINTERDOWN | PointerEventTypes.POINTERUP | PointerEventTypes.POINTERMOVE | PointerEventTypes.POINTERDOUBLETAP);\n this._onLostFocus = () => {\n this._pointA = this._pointB = null;\n previousPinchSquaredDistance = 0;\n previousMultiTouchPanPosition = null;\n this.onLostFocus();\n };\n this._contextMenuBind = (evt) => this.onContextMenu(evt);\n element && element.addEventListener(\"contextmenu\", this._contextMenuBind, false);\n const hostWindow = this.camera.getScene().getEngine().getHostWindow();\n if (hostWindow) {\n Tools.RegisterTopRootEvents(hostWindow, [{ name: \"blur\", handler: this._onLostFocus }]);\n }\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n if (this._onLostFocus) {\n const hostWindow = this.camera.getScene().getEngine().getHostWindow();\n if (hostWindow) {\n Tools.UnregisterTopRootEvents(hostWindow, [{ name: \"blur\", handler: this._onLostFocus }]);\n }\n }\n if (this._observer) {\n this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer);\n this._observer = null;\n if (this._contextMenuBind) {\n const inputElement = this.camera.getScene().getEngine().getInputElement();\n inputElement && inputElement.removeEventListener(\"contextmenu\", this._contextMenuBind);\n }\n this._onLostFocus = null;\n }\n this._altKey = false;\n this._ctrlKey = false;\n this._metaKey = false;\n this._shiftKey = false;\n this._buttonsPressed = 0;\n this._currentActiveButton = -1;\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"BaseCameraPointersInput\";\n }\n /**\n * Get the friendly name associated with the input class.\n * @returns the input friendly name\n */\n getSimpleName() {\n return \"pointers\";\n }\n /**\n * Called on pointer POINTERDOUBLETAP event.\n * Override this method to provide functionality on POINTERDOUBLETAP event.\n * @param type\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDoubleTap(type) { }\n /**\n * Called on pointer POINTERMOVE event if only a single touch is active.\n * Override this method to provide functionality.\n * @param point\n * @param offsetX\n * @param offsetY\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onTouch(point, offsetX, offsetY) { }\n /**\n * Called on pointer POINTERMOVE event if multiple touches are active.\n * Override this method to provide functionality.\n * @param _pointA\n * @param _pointB\n * @param previousPinchSquaredDistance\n * @param pinchSquaredDistance\n * @param previousMultiTouchPanPosition\n * @param multiTouchPanPosition\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onMultiTouch(_pointA, _pointB, previousPinchSquaredDistance, pinchSquaredDistance, previousMultiTouchPanPosition, multiTouchPanPosition) { }\n /**\n * Called on JS contextmenu event.\n * Override this method to provide functionality.\n * @param evt\n */\n onContextMenu(evt) {\n evt.preventDefault();\n }\n /**\n * Called each time a new POINTERDOWN event occurs. Ie, for each button\n * press.\n * Override this method to provide functionality.\n * @param _evt Defines the event to track\n */\n onButtonDown(_evt) { }\n /**\n * Called each time a new POINTERUP event occurs. Ie, for each button\n * release.\n * Override this method to provide functionality.\n * @param _evt Defines the event to track\n */\n onButtonUp(_evt) { }\n /**\n * Called when window becomes inactive.\n * Override this method to provide functionality.\n */\n onLostFocus() { }\n}\n__decorate([\n serialize()\n], BaseCameraPointersInput.prototype, \"buttons\", void 0);\n//# sourceMappingURL=BaseCameraPointersInput.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize } from \"../../Misc/decorators.js\";\nimport { CameraInputTypes } from \"../../Cameras/cameraInputsManager.js\";\nimport { BaseCameraPointersInput } from \"../../Cameras/Inputs/BaseCameraPointersInput.js\";\n/**\n * Manage the pointers inputs to control an arc rotate camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class ArcRotateCameraPointersInput extends BaseCameraPointersInput {\n constructor() {\n super(...arguments);\n /**\n * Defines the buttons associated with the input to handle camera move.\n */\n this.buttons = [0, 1, 2];\n /**\n * Defines the pointer angular sensibility along the X axis or how fast is\n * the camera rotating.\n */\n this.angularSensibilityX = 1000.0;\n /**\n * Defines the pointer angular sensibility along the Y axis or how fast is\n * the camera rotating.\n */\n this.angularSensibilityY = 1000.0;\n /**\n * Defines the pointer pinch precision or how fast is the camera zooming.\n */\n this.pinchPrecision = 12.0;\n /**\n * pinchDeltaPercentage will be used instead of pinchPrecision if different\n * from 0.\n * It defines the percentage of current camera.radius to use as delta when\n * pinch zoom is used.\n */\n this.pinchDeltaPercentage = 0;\n /**\n * When useNaturalPinchZoom is true, multi touch zoom will zoom in such\n * that any object in the plane at the camera's target point will scale\n * perfectly with finger motion.\n * Overrides pinchDeltaPercentage and pinchPrecision.\n */\n this.useNaturalPinchZoom = false;\n /**\n * Defines whether zoom (2 fingers pinch) is enabled through multitouch\n */\n this.pinchZoom = true;\n /**\n * Defines the pointer panning sensibility or how fast is the camera moving.\n */\n this.panningSensibility = 1000.0;\n /**\n * Defines whether panning (2 fingers swipe) is enabled through multitouch.\n */\n this.multiTouchPanning = true;\n /**\n * Defines whether panning is enabled for both pan (2 fingers swipe) and\n * zoom (pinch) through multitouch.\n */\n this.multiTouchPanAndZoom = true;\n /**\n * Revers pinch action direction.\n */\n this.pinchInwards = true;\n this._isPanClick = false;\n this._twoFingerActivityCount = 0;\n this._isPinching = false;\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"ArcRotateCameraPointersInput\";\n }\n /**\n * Move camera from multi touch panning positions.\n * @param previousMultiTouchPanPosition\n * @param multiTouchPanPosition\n */\n _computeMultiTouchPanning(previousMultiTouchPanPosition, multiTouchPanPosition) {\n if (this.panningSensibility !== 0 && previousMultiTouchPanPosition && multiTouchPanPosition) {\n const moveDeltaX = multiTouchPanPosition.x - previousMultiTouchPanPosition.x;\n const moveDeltaY = multiTouchPanPosition.y - previousMultiTouchPanPosition.y;\n this.camera.inertialPanningX += -moveDeltaX / this.panningSensibility;\n this.camera.inertialPanningY += moveDeltaY / this.panningSensibility;\n }\n }\n /**\n * Move camera from pinch zoom distances.\n * @param previousPinchSquaredDistance\n * @param pinchSquaredDistance\n */\n _computePinchZoom(previousPinchSquaredDistance, pinchSquaredDistance) {\n const radius = this.camera.radius || ArcRotateCameraPointersInput.MinimumRadiusForPinch;\n if (this.useNaturalPinchZoom) {\n this.camera.radius = (radius * Math.sqrt(previousPinchSquaredDistance)) / Math.sqrt(pinchSquaredDistance);\n }\n else if (this.pinchDeltaPercentage) {\n this.camera.inertialRadiusOffset += (pinchSquaredDistance - previousPinchSquaredDistance) * 0.001 * radius * this.pinchDeltaPercentage;\n }\n else {\n this.camera.inertialRadiusOffset +=\n (pinchSquaredDistance - previousPinchSquaredDistance) /\n ((this.pinchPrecision * (this.pinchInwards ? 1 : -1) * (this.angularSensibilityX + this.angularSensibilityY)) / 2);\n }\n }\n /**\n * Called on pointer POINTERMOVE event if only a single touch is active.\n * @param point\n * @param offsetX\n * @param offsetY\n */\n onTouch(point, offsetX, offsetY) {\n if (this.panningSensibility !== 0 && ((this._ctrlKey && this.camera._useCtrlForPanning) || this._isPanClick)) {\n this.camera.inertialPanningX += -offsetX / this.panningSensibility;\n this.camera.inertialPanningY += offsetY / this.panningSensibility;\n }\n else {\n this.camera.inertialAlphaOffset -= offsetX / this.angularSensibilityX;\n this.camera.inertialBetaOffset -= offsetY / this.angularSensibilityY;\n }\n }\n /**\n * Called on pointer POINTERDOUBLETAP event.\n */\n onDoubleTap() {\n if (this.camera.useInputToRestoreState) {\n this.camera.restoreState();\n }\n }\n /**\n * Called on pointer POINTERMOVE event if multiple touches are active.\n * @param pointA\n * @param pointB\n * @param previousPinchSquaredDistance\n * @param pinchSquaredDistance\n * @param previousMultiTouchPanPosition\n * @param multiTouchPanPosition\n */\n onMultiTouch(pointA, pointB, previousPinchSquaredDistance, pinchSquaredDistance, previousMultiTouchPanPosition, multiTouchPanPosition) {\n if (previousPinchSquaredDistance === 0 && previousMultiTouchPanPosition === null) {\n // First time this method is called for new pinch.\n // Next time this is called there will be a\n // previousPinchSquaredDistance and pinchSquaredDistance to compare.\n return;\n }\n if (pinchSquaredDistance === 0 && multiTouchPanPosition === null) {\n // Last time this method is called at the end of a pinch.\n return;\n }\n // Zoom and panning enabled together\n if (this.multiTouchPanAndZoom) {\n this._computePinchZoom(previousPinchSquaredDistance, pinchSquaredDistance);\n this._computeMultiTouchPanning(previousMultiTouchPanPosition, multiTouchPanPosition);\n // Zoom and panning enabled but only one at a time\n }\n else if (this.multiTouchPanning && this.pinchZoom) {\n this._twoFingerActivityCount++;\n if (this._isPinching ||\n (this._twoFingerActivityCount < 20 && Math.abs(Math.sqrt(pinchSquaredDistance) - Math.sqrt(previousPinchSquaredDistance)) > this.camera.pinchToPanMaxDistance)) {\n // Since pinch has not been active long, assume we intend to zoom.\n this._computePinchZoom(previousPinchSquaredDistance, pinchSquaredDistance);\n // Since we are pinching, remain pinching on next iteration.\n this._isPinching = true;\n }\n else {\n // Pause between pinch starting and moving implies not a zoom event. Pan instead.\n this._computeMultiTouchPanning(previousMultiTouchPanPosition, multiTouchPanPosition);\n }\n // Panning enabled, zoom disabled\n }\n else if (this.multiTouchPanning) {\n this._computeMultiTouchPanning(previousMultiTouchPanPosition, multiTouchPanPosition);\n // Zoom enabled, panning disabled\n }\n else if (this.pinchZoom) {\n this._computePinchZoom(previousPinchSquaredDistance, pinchSquaredDistance);\n }\n }\n /**\n * Called each time a new POINTERDOWN event occurs. Ie, for each button\n * press.\n * @param evt Defines the event to track\n */\n onButtonDown(evt) {\n this._isPanClick = evt.button === this.camera._panningMouseButton;\n }\n /**\n * Called each time a new POINTERUP event occurs. Ie, for each button\n * release.\n * @param _evt Defines the event to track\n */\n onButtonUp(_evt) {\n this._twoFingerActivityCount = 0;\n this._isPinching = false;\n }\n /**\n * Called when window becomes inactive.\n */\n onLostFocus() {\n this._isPanClick = false;\n this._twoFingerActivityCount = 0;\n this._isPinching = false;\n }\n}\n/**\n * The minimum radius used for pinch, to avoid radius lock at 0\n */\nArcRotateCameraPointersInput.MinimumRadiusForPinch = 0.001;\n__decorate([\n serialize()\n], ArcRotateCameraPointersInput.prototype, \"buttons\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraPointersInput.prototype, \"angularSensibilityX\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraPointersInput.prototype, \"angularSensibilityY\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraPointersInput.prototype, \"pinchPrecision\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraPointersInput.prototype, \"pinchDeltaPercentage\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraPointersInput.prototype, \"useNaturalPinchZoom\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraPointersInput.prototype, \"pinchZoom\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraPointersInput.prototype, \"panningSensibility\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraPointersInput.prototype, \"multiTouchPanning\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraPointersInput.prototype, \"multiTouchPanAndZoom\", void 0);\nCameraInputTypes[\"ArcRotateCameraPointersInput\"] = ArcRotateCameraPointersInput;\n//# sourceMappingURL=arcRotateCameraPointersInput.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize } from \"../../Misc/decorators.js\";\nimport { CameraInputTypes } from \"../../Cameras/cameraInputsManager.js\";\nimport { KeyboardEventTypes } from \"../../Events/keyboardEvents.js\";\nimport { Tools } from \"../../Misc/tools.js\";\n/**\n * Manage the keyboard inputs to control the movement of an arc rotate camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class ArcRotateCameraKeyboardMoveInput {\n constructor() {\n /**\n * Defines the list of key codes associated with the up action (increase alpha)\n */\n this.keysUp = [38];\n /**\n * Defines the list of key codes associated with the down action (decrease alpha)\n */\n this.keysDown = [40];\n /**\n * Defines the list of key codes associated with the left action (increase beta)\n */\n this.keysLeft = [37];\n /**\n * Defines the list of key codes associated with the right action (decrease beta)\n */\n this.keysRight = [39];\n /**\n * Defines the list of key codes associated with the reset action.\n * Those keys reset the camera to its last stored state (with the method camera.storeState())\n */\n this.keysReset = [220];\n /**\n * Defines the panning sensibility of the inputs.\n * (How fast is the camera panning)\n */\n this.panningSensibility = 50.0;\n /**\n * Defines the zooming sensibility of the inputs.\n * (How fast is the camera zooming)\n */\n this.zoomingSensibility = 25.0;\n /**\n * Defines whether maintaining the alt key down switch the movement mode from\n * orientation to zoom.\n */\n this.useAltToZoom = true;\n /**\n * Rotation speed of the camera\n */\n this.angularSpeed = 0.01;\n this._keys = new Array();\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)\n */\n attachControl(noPreventDefault) {\n // was there a second variable defined?\n // eslint-disable-next-line prefer-rest-params\n noPreventDefault = Tools.BackCompatCameraNoPreventDefault(arguments);\n if (this._onCanvasBlurObserver) {\n return;\n }\n this._scene = this.camera.getScene();\n this._engine = this._scene.getEngine();\n this._onCanvasBlurObserver = this._engine.onCanvasBlurObservable.add(() => {\n this._keys.length = 0;\n });\n this._onKeyboardObserver = this._scene.onKeyboardObservable.add((info) => {\n const evt = info.event;\n if (!evt.metaKey) {\n if (info.type === KeyboardEventTypes.KEYDOWN) {\n this._ctrlPressed = evt.ctrlKey;\n this._altPressed = evt.altKey;\n if (this.keysUp.indexOf(evt.keyCode) !== -1 ||\n this.keysDown.indexOf(evt.keyCode) !== -1 ||\n this.keysLeft.indexOf(evt.keyCode) !== -1 ||\n this.keysRight.indexOf(evt.keyCode) !== -1 ||\n this.keysReset.indexOf(evt.keyCode) !== -1) {\n const index = this._keys.indexOf(evt.keyCode);\n if (index === -1) {\n this._keys.push(evt.keyCode);\n }\n if (evt.preventDefault) {\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n }\n }\n }\n else {\n if (this.keysUp.indexOf(evt.keyCode) !== -1 ||\n this.keysDown.indexOf(evt.keyCode) !== -1 ||\n this.keysLeft.indexOf(evt.keyCode) !== -1 ||\n this.keysRight.indexOf(evt.keyCode) !== -1 ||\n this.keysReset.indexOf(evt.keyCode) !== -1) {\n const index = this._keys.indexOf(evt.keyCode);\n if (index >= 0) {\n this._keys.splice(index, 1);\n }\n if (evt.preventDefault) {\n if (!noPreventDefault) {\n evt.preventDefault();\n }\n }\n }\n }\n }\n });\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n if (this._scene) {\n if (this._onKeyboardObserver) {\n this._scene.onKeyboardObservable.remove(this._onKeyboardObserver);\n }\n if (this._onCanvasBlurObserver) {\n this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver);\n }\n this._onKeyboardObserver = null;\n this._onCanvasBlurObserver = null;\n }\n this._keys.length = 0;\n }\n /**\n * Update the current camera state depending on the inputs that have been used this frame.\n * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.\n */\n checkInputs() {\n if (this._onKeyboardObserver) {\n const camera = this.camera;\n for (let index = 0; index < this._keys.length; index++) {\n const keyCode = this._keys[index];\n if (this.keysLeft.indexOf(keyCode) !== -1) {\n if (this._ctrlPressed && this.camera._useCtrlForPanning) {\n camera.inertialPanningX -= 1 / this.panningSensibility;\n }\n else {\n camera.inertialAlphaOffset -= this.angularSpeed;\n }\n }\n else if (this.keysUp.indexOf(keyCode) !== -1) {\n if (this._ctrlPressed && this.camera._useCtrlForPanning) {\n camera.inertialPanningY += 1 / this.panningSensibility;\n }\n else if (this._altPressed && this.useAltToZoom) {\n camera.inertialRadiusOffset += 1 / this.zoomingSensibility;\n }\n else {\n camera.inertialBetaOffset -= this.angularSpeed;\n }\n }\n else if (this.keysRight.indexOf(keyCode) !== -1) {\n if (this._ctrlPressed && this.camera._useCtrlForPanning) {\n camera.inertialPanningX += 1 / this.panningSensibility;\n }\n else {\n camera.inertialAlphaOffset += this.angularSpeed;\n }\n }\n else if (this.keysDown.indexOf(keyCode) !== -1) {\n if (this._ctrlPressed && this.camera._useCtrlForPanning) {\n camera.inertialPanningY -= 1 / this.panningSensibility;\n }\n else if (this._altPressed && this.useAltToZoom) {\n camera.inertialRadiusOffset -= 1 / this.zoomingSensibility;\n }\n else {\n camera.inertialBetaOffset += this.angularSpeed;\n }\n }\n else if (this.keysReset.indexOf(keyCode) !== -1) {\n if (camera.useInputToRestoreState) {\n camera.restoreState();\n }\n }\n }\n }\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"ArcRotateCameraKeyboardMoveInput\";\n }\n /**\n * Get the friendly name associated with the input class.\n * @returns the input friendly name\n */\n getSimpleName() {\n return \"keyboard\";\n }\n}\n__decorate([\n serialize()\n], ArcRotateCameraKeyboardMoveInput.prototype, \"keysUp\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraKeyboardMoveInput.prototype, \"keysDown\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraKeyboardMoveInput.prototype, \"keysLeft\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraKeyboardMoveInput.prototype, \"keysRight\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraKeyboardMoveInput.prototype, \"keysReset\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraKeyboardMoveInput.prototype, \"panningSensibility\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraKeyboardMoveInput.prototype, \"zoomingSensibility\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraKeyboardMoveInput.prototype, \"useAltToZoom\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraKeyboardMoveInput.prototype, \"angularSpeed\", void 0);\nCameraInputTypes[\"ArcRotateCameraKeyboardMoveInput\"] = ArcRotateCameraKeyboardMoveInput;\n//# sourceMappingURL=arcRotateCameraKeyboardMoveInput.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize } from \"../../Misc/decorators.js\";\nimport { CameraInputTypes } from \"../../Cameras/cameraInputsManager.js\";\nimport { PointerEventTypes } from \"../../Events/pointerEvents.js\";\nimport { Plane } from \"../../Maths/math.plane.js\";\nimport { Vector3, Matrix, TmpVectors } from \"../../Maths/math.vector.js\";\nimport { Epsilon } from \"../../Maths/math.constants.js\";\nimport { EventConstants } from \"../../Events/deviceInputEvents.js\";\nimport { Scalar } from \"../../Maths/math.scalar.js\";\nimport { Tools } from \"../../Misc/tools.js\";\n/**\n * Firefox uses a different scheme to report scroll distances to other\n * browsers. Rather than use complicated methods to calculate the exact\n * multiple we need to apply, let's just cheat and use a constant.\n * https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaMode\n * https://stackoverflow.com/questions/20110224/what-is-the-height-of-a-line-in-a-wheel-event-deltamode-dom-delta-line\n */\nconst ffMultiplier = 40;\n/**\n * Manage the mouse wheel inputs to control an arc rotate camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class ArcRotateCameraMouseWheelInput {\n constructor() {\n /**\n * Gets or Set the mouse wheel precision or how fast is the camera zooming.\n */\n this.wheelPrecision = 3.0;\n /**\n * Gets or Set the boolean value that controls whether or not the mouse wheel\n * zooms to the location of the mouse pointer or not. The default is false.\n */\n this.zoomToMouseLocation = false;\n /**\n * wheelDeltaPercentage will be used instead of wheelPrecision if different from 0.\n * It defines the percentage of current camera.radius to use as delta when wheel is used.\n */\n this.wheelDeltaPercentage = 0;\n /**\n * If set, this function will be used to set the radius delta that will be added to the current camera radius\n */\n this.customComputeDeltaFromMouseWheel = null;\n this._viewOffset = new Vector3(0, 0, 0);\n this._globalOffset = new Vector3(0, 0, 0);\n this._inertialPanning = Vector3.Zero();\n }\n _computeDeltaFromMouseWheelLegacyEvent(mouseWheelDelta, radius) {\n let delta = 0;\n const wheelDelta = mouseWheelDelta * 0.01 * this.wheelDeltaPercentage * radius;\n if (mouseWheelDelta > 0) {\n delta = wheelDelta / (1.0 + this.wheelDeltaPercentage);\n }\n else {\n delta = wheelDelta * (1.0 + this.wheelDeltaPercentage);\n }\n return delta;\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)\n */\n attachControl(noPreventDefault) {\n noPreventDefault = Tools.BackCompatCameraNoPreventDefault(arguments);\n this._wheel = (p) => {\n //sanity check - this should be a PointerWheel event.\n if (p.type !== PointerEventTypes.POINTERWHEEL) {\n return;\n }\n const event = p.event;\n let delta = 0;\n const platformScale = event.deltaMode === EventConstants.DOM_DELTA_LINE ? ffMultiplier : 1; // If this happens to be set to DOM_DELTA_LINE, adjust accordingly\n const wheelDelta = -(event.deltaY * platformScale);\n if (this.customComputeDeltaFromMouseWheel) {\n delta = this.customComputeDeltaFromMouseWheel(wheelDelta, this, event);\n }\n else {\n if (this.wheelDeltaPercentage) {\n delta = this._computeDeltaFromMouseWheelLegacyEvent(wheelDelta, this.camera.radius);\n // If zooming in, estimate the target radius and use that to compute the delta for inertia\n // this will stop multiple scroll events zooming in from adding too much inertia\n if (delta > 0) {\n let estimatedTargetRadius = this.camera.radius;\n let targetInertia = this.camera.inertialRadiusOffset + delta;\n for (let i = 0; i < 20 && Math.abs(targetInertia) > 0.001; i++) {\n estimatedTargetRadius -= targetInertia;\n targetInertia *= this.camera.inertia;\n }\n estimatedTargetRadius = Scalar.Clamp(estimatedTargetRadius, 0, Number.MAX_VALUE);\n delta = this._computeDeltaFromMouseWheelLegacyEvent(wheelDelta, estimatedTargetRadius);\n }\n }\n else {\n delta = wheelDelta / (this.wheelPrecision * 40);\n }\n }\n if (delta) {\n if (this.zoomToMouseLocation) {\n // If we are zooming to the mouse location, then we need to get the hit plane at the start of the zoom gesture if it doesn't exist\n // The hit plane is normally calculated after the first motion and each time there's motion so if we don't do this first,\n // the first zoom will be to the center of the screen\n if (!this._hitPlane) {\n this._updateHitPlane();\n }\n this._zoomToMouse(delta);\n }\n else {\n this.camera.inertialRadiusOffset += delta;\n }\n }\n if (event.preventDefault) {\n if (!noPreventDefault) {\n event.preventDefault();\n }\n }\n };\n this._observer = this.camera.getScene()._inputManager._addCameraPointerObserver(this._wheel, PointerEventTypes.POINTERWHEEL);\n if (this.zoomToMouseLocation) {\n this._inertialPanning.setAll(0);\n }\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n if (this._observer) {\n this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer);\n this._observer = null;\n this._wheel = null;\n }\n }\n /**\n * Update the current camera state depending on the inputs that have been used this frame.\n * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.\n */\n checkInputs() {\n if (!this.zoomToMouseLocation) {\n return;\n }\n const camera = this.camera;\n const motion = 0.0 + camera.inertialAlphaOffset + camera.inertialBetaOffset + camera.inertialRadiusOffset;\n if (motion) {\n // if zooming is still happening as a result of inertia, then we also need to update\n // the hit plane.\n this._updateHitPlane();\n // Note we cannot use arcRotateCamera.inertialPlanning here because arcRotateCamera panning\n // uses a different panningInertia which could cause this panning to get out of sync with\n // the zooming, and for this to work they must be exactly in sync.\n camera.target.addInPlace(this._inertialPanning);\n this._inertialPanning.scaleInPlace(camera.inertia);\n this._zeroIfClose(this._inertialPanning);\n }\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"ArcRotateCameraMouseWheelInput\";\n }\n /**\n * Get the friendly name associated with the input class.\n * @returns the input friendly name\n */\n getSimpleName() {\n return \"mousewheel\";\n }\n _updateHitPlane() {\n const camera = this.camera;\n const direction = camera.target.subtract(camera.position);\n this._hitPlane = Plane.FromPositionAndNormal(camera.target, direction);\n }\n // Get position on the hit plane\n _getPosition() {\n var _a;\n const camera = this.camera;\n const scene = camera.getScene();\n // since the _hitPlane is always updated to be orthogonal to the camera position vector\n // we don't have to worry about this ray shooting off to infinity. This ray creates\n // a vector defining where we want to zoom to.\n const ray = scene.createPickingRay(scene.pointerX, scene.pointerY, Matrix.Identity(), camera, false);\n // Since the camera is the origin of the picking ray, we need to offset it by the camera's offset manually\n // Because the offset is in view space, we need to convert it to world space first\n if (camera.targetScreenOffset.x !== 0 || camera.targetScreenOffset.y !== 0) {\n this._viewOffset.set(camera.targetScreenOffset.x, camera.targetScreenOffset.y, 0);\n camera.getViewMatrix().invertToRef(camera._cameraTransformMatrix);\n this._globalOffset = Vector3.TransformNormal(this._viewOffset, camera._cameraTransformMatrix);\n ray.origin.addInPlace(this._globalOffset);\n }\n let distance = 0;\n if (this._hitPlane) {\n distance = (_a = ray.intersectsPlane(this._hitPlane)) !== null && _a !== void 0 ? _a : 0;\n }\n // not using this ray again, so modifying its vectors here is fine\n return ray.origin.addInPlace(ray.direction.scaleInPlace(distance));\n }\n _zoomToMouse(delta) {\n var _a, _b;\n const camera = this.camera;\n const inertiaComp = 1 - camera.inertia;\n if (camera.lowerRadiusLimit) {\n const lowerLimit = (_a = camera.lowerRadiusLimit) !== null && _a !== void 0 ? _a : 0;\n if (camera.radius - (camera.inertialRadiusOffset + delta) / inertiaComp < lowerLimit) {\n delta = (camera.radius - lowerLimit) * inertiaComp - camera.inertialRadiusOffset;\n }\n }\n if (camera.upperRadiusLimit) {\n const upperLimit = (_b = camera.upperRadiusLimit) !== null && _b !== void 0 ? _b : 0;\n if (camera.radius - (camera.inertialRadiusOffset + delta) / inertiaComp > upperLimit) {\n delta = (camera.radius - upperLimit) * inertiaComp - camera.inertialRadiusOffset;\n }\n }\n const zoomDistance = delta / inertiaComp;\n const ratio = zoomDistance / camera.radius;\n const vec = this._getPosition();\n // Now this vector tells us how much we also need to pan the camera\n // so the targeted mouse location becomes the center of zooming.\n const directionToZoomLocation = TmpVectors.Vector3[6];\n vec.subtractToRef(camera.target, directionToZoomLocation);\n directionToZoomLocation.scaleInPlace(ratio);\n directionToZoomLocation.scaleInPlace(inertiaComp);\n this._inertialPanning.addInPlace(directionToZoomLocation);\n camera.inertialRadiusOffset += delta;\n }\n // Sets x y or z of passed in vector to zero if less than Epsilon.\n _zeroIfClose(vec) {\n if (Math.abs(vec.x) < Epsilon) {\n vec.x = 0;\n }\n if (Math.abs(vec.y) < Epsilon) {\n vec.y = 0;\n }\n if (Math.abs(vec.z) < Epsilon) {\n vec.z = 0;\n }\n }\n}\n__decorate([\n serialize()\n], ArcRotateCameraMouseWheelInput.prototype, \"wheelPrecision\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraMouseWheelInput.prototype, \"zoomToMouseLocation\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraMouseWheelInput.prototype, \"wheelDeltaPercentage\", void 0);\nCameraInputTypes[\"ArcRotateCameraMouseWheelInput\"] = ArcRotateCameraMouseWheelInput;\n//# sourceMappingURL=arcRotateCameraMouseWheelInput.js.map","import { ArcRotateCameraPointersInput } from \"../Cameras/Inputs/arcRotateCameraPointersInput.js\";\nimport { ArcRotateCameraKeyboardMoveInput } from \"../Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js\";\nimport { ArcRotateCameraMouseWheelInput } from \"../Cameras/Inputs/arcRotateCameraMouseWheelInput.js\";\nimport { CameraInputsManager } from \"../Cameras/cameraInputsManager.js\";\n/**\n * Default Inputs manager for the ArcRotateCamera.\n * It groups all the default supported inputs for ease of use.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class ArcRotateCameraInputsManager extends CameraInputsManager {\n /**\n * Instantiates a new ArcRotateCameraInputsManager.\n * @param camera Defines the camera the inputs belong to\n */\n constructor(camera) {\n super(camera);\n }\n /**\n * Add mouse wheel input support to the input manager.\n * @returns the current input manager\n */\n addMouseWheel() {\n this.add(new ArcRotateCameraMouseWheelInput());\n return this;\n }\n /**\n * Add pointers input support to the input manager.\n * @returns the current input manager\n */\n addPointers() {\n this.add(new ArcRotateCameraPointersInput());\n return this;\n }\n /**\n * Add keyboard input support to the input manager.\n * @returns the current input manager\n */\n addKeyboard() {\n this.add(new ArcRotateCameraKeyboardMoveInput());\n return this;\n }\n}\n//# sourceMappingURL=arcRotateCameraInputsManager.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize } from \"../../Misc/decorators.js\";\nimport { CameraInputTypes } from \"../../Cameras/cameraInputsManager.js\";\nimport { Gamepad } from \"../../Gamepads/gamepad.js\";\n/**\n * Manage the gamepad inputs to control an arc rotate camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class ArcRotateCameraGamepadInput {\n constructor() {\n /**\n * Defines the gamepad rotation sensibility.\n * This is the threshold from when rotation starts to be accounted for to prevent jittering.\n */\n this.gamepadRotationSensibility = 80;\n /**\n * Defines the gamepad move sensibility.\n * This is the threshold from when moving starts to be accounted for for to prevent jittering.\n */\n this.gamepadMoveSensibility = 40;\n this._yAxisScale = 1.0;\n }\n /**\n * Gets or sets a boolean indicating that Yaxis (for right stick) should be inverted\n */\n get invertYAxis() {\n return this._yAxisScale !== 1.0;\n }\n set invertYAxis(value) {\n this._yAxisScale = value ? -1.0 : 1.0;\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n */\n attachControl() {\n const manager = this.camera.getScene().gamepadManager;\n this._onGamepadConnectedObserver = manager.onGamepadConnectedObservable.add((gamepad) => {\n if (gamepad.type !== Gamepad.POSE_ENABLED) {\n // prioritize XBOX gamepads.\n if (!this.gamepad || gamepad.type === Gamepad.XBOX) {\n this.gamepad = gamepad;\n }\n }\n });\n this._onGamepadDisconnectedObserver = manager.onGamepadDisconnectedObservable.add((gamepad) => {\n if (this.gamepad === gamepad) {\n this.gamepad = null;\n }\n });\n this.gamepad = manager.getGamepadByType(Gamepad.XBOX);\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver);\n this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver);\n this.gamepad = null;\n }\n /**\n * Update the current camera state depending on the inputs that have been used this frame.\n * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.\n */\n checkInputs() {\n if (this.gamepad) {\n const camera = this.camera;\n const rsValues = this.gamepad.rightStick;\n if (rsValues) {\n if (rsValues.x != 0) {\n const normalizedRX = rsValues.x / this.gamepadRotationSensibility;\n if (normalizedRX != 0 && Math.abs(normalizedRX) > 0.005) {\n camera.inertialAlphaOffset += normalizedRX;\n }\n }\n if (rsValues.y != 0) {\n const normalizedRY = (rsValues.y / this.gamepadRotationSensibility) * this._yAxisScale;\n if (normalizedRY != 0 && Math.abs(normalizedRY) > 0.005) {\n camera.inertialBetaOffset += normalizedRY;\n }\n }\n }\n const lsValues = this.gamepad.leftStick;\n if (lsValues && lsValues.y != 0) {\n const normalizedLY = lsValues.y / this.gamepadMoveSensibility;\n if (normalizedLY != 0 && Math.abs(normalizedLY) > 0.005) {\n this.camera.inertialRadiusOffset -= normalizedLY;\n }\n }\n }\n }\n /**\n * Gets the class name of the current intput.\n * @returns the class name\n */\n getClassName() {\n return \"ArcRotateCameraGamepadInput\";\n }\n /**\n * Get the friendly name associated with the input class.\n * @returns the input friendly name\n */\n getSimpleName() {\n return \"gamepad\";\n }\n}\n__decorate([\n serialize()\n], ArcRotateCameraGamepadInput.prototype, \"gamepadRotationSensibility\", void 0);\n__decorate([\n serialize()\n], ArcRotateCameraGamepadInput.prototype, \"gamepadMoveSensibility\", void 0);\nCameraInputTypes[\"ArcRotateCameraGamepadInput\"] = ArcRotateCameraGamepadInput;\n//# sourceMappingURL=arcRotateCameraGamepadInput.js.map","import { Scene } from \"../scene.js\";\nimport { SceneComponentConstants } from \"../sceneComponent.js\";\nimport { GamepadManager } from \"./gamepadManager.js\";\nimport { FreeCameraInputsManager } from \"../Cameras/freeCameraInputsManager.js\";\nimport { FreeCameraGamepadInput } from \"../Cameras/Inputs/freeCameraGamepadInput.js\";\nimport { ArcRotateCameraInputsManager } from \"../Cameras/arcRotateCameraInputsManager.js\";\nimport { ArcRotateCameraGamepadInput } from \"../Cameras/Inputs/arcRotateCameraGamepadInput.js\";\nObject.defineProperty(Scene.prototype, \"gamepadManager\", {\n get: function () {\n if (!this._gamepadManager) {\n this._gamepadManager = new GamepadManager(this);\n let component = this._getComponent(SceneComponentConstants.NAME_GAMEPAD);\n if (!component) {\n component = new GamepadSystemSceneComponent(this);\n this._addComponent(component);\n }\n }\n return this._gamepadManager;\n },\n enumerable: true,\n configurable: true,\n});\n/**\n * Adds a gamepad to the free camera inputs manager\n */\nFreeCameraInputsManager.prototype.addGamepad = function () {\n this.add(new FreeCameraGamepadInput());\n return this;\n};\n/**\n * Adds a gamepad to the arc rotate camera inputs manager\n */\nArcRotateCameraInputsManager.prototype.addGamepad = function () {\n this.add(new ArcRotateCameraGamepadInput());\n return this;\n};\n/**\n * Defines the gamepad scene component responsible to manage gamepads in a given scene\n */\nexport class GamepadSystemSceneComponent {\n /**\n * Creates a new instance of the component for the given scene\n * @param scene Defines the scene to register the component in\n */\n constructor(scene) {\n /**\n * The component name helpfull to identify the component in the list of scene components.\n */\n this.name = SceneComponentConstants.NAME_GAMEPAD;\n this.scene = scene;\n }\n /**\n * Registers the component in a given scene\n */\n register() {\n this.scene._beforeCameraUpdateStage.registerStep(SceneComponentConstants.STEP_BEFORECAMERAUPDATE_GAMEPAD, this, this._beforeCameraUpdate);\n }\n /**\n * Rebuilds the elements related to this component in case of\n * context lost for instance.\n */\n rebuild() {\n // Nothing to do for gamepads\n }\n /**\n * Disposes the component and the associated resources\n */\n dispose() {\n const gamepadManager = this.scene._gamepadManager;\n if (gamepadManager) {\n gamepadManager.dispose();\n this.scene._gamepadManager = null;\n }\n }\n _beforeCameraUpdate() {\n const gamepadManager = this.scene._gamepadManager;\n if (gamepadManager && gamepadManager._isMonitoring) {\n gamepadManager._checkGamepadsStatus();\n }\n }\n}\n//# sourceMappingURL=gamepadSceneComponent.js.map","import { TouchCamera } from \"./touchCamera.js\";\nimport { Node } from \"../node.js\";\nimport { Vector3 } from \"../Maths/math.vector.js\";\nimport { Camera } from \"./camera.js\";\nimport \"../Gamepads/gamepadSceneComponent.js\";\nNode.AddNodeConstructor(\"FreeCamera\", (name, scene) => {\n // Forcing to use the Universal camera\n return () => new UniversalCamera(name, Vector3.Zero(), scene);\n});\n/**\n * The Universal Camera is the one to choose for first person shooter type games, and works with all the keyboard, mouse, touch and gamepads. This replaces the earlier Free Camera,\n * which still works and will still be found in many Playgrounds.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera\n */\nexport class UniversalCamera extends TouchCamera {\n /**\n * Defines the gamepad rotation sensibility.\n * This is the threshold from when rotation starts to be accounted for to prevent jittering.\n */\n get gamepadAngularSensibility() {\n const gamepad = this.inputs.attached[\"gamepad\"];\n if (gamepad) {\n return gamepad.gamepadAngularSensibility;\n }\n return 0;\n }\n set gamepadAngularSensibility(value) {\n const gamepad = this.inputs.attached[\"gamepad\"];\n if (gamepad) {\n gamepad.gamepadAngularSensibility = value;\n }\n }\n /**\n * Defines the gamepad move sensibility.\n * This is the threshold from when moving starts to be accounted for to prevent jittering.\n */\n get gamepadMoveSensibility() {\n const gamepad = this.inputs.attached[\"gamepad\"];\n if (gamepad) {\n return gamepad.gamepadMoveSensibility;\n }\n return 0;\n }\n set gamepadMoveSensibility(value) {\n const gamepad = this.inputs.attached[\"gamepad\"];\n if (gamepad) {\n gamepad.gamepadMoveSensibility = value;\n }\n }\n /**\n * The Universal Camera is the one to choose for first person shooter type games, and works with all the keyboard, mouse, touch and gamepads. This replaces the earlier Free Camera,\n * which still works and will still be found in many Playgrounds.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera\n * @param name Define the name of the camera in the scene\n * @param position Define the start position of the camera in the scene\n * @param scene Define the scene the camera belongs to\n */\n constructor(name, position, scene) {\n super(name, position, scene);\n this.inputs.addGamepad();\n }\n /**\n * Gets the current object class name.\n * @returns the class name\n */\n getClassName() {\n return \"UniversalCamera\";\n }\n}\nCamera._CreateDefaultParsedCamera = (name, scene) => {\n return new UniversalCamera(name, Vector3.Zero(), scene);\n};\n//# sourceMappingURL=universalCamera.js.map","import { Vector3, Matrix } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Creates the VertexData for an ellipsoid, defaults to a sphere\n * @param options an object used to set the following optional parameters for the box, required but can be empty\n * * segments sets the number of horizontal strips optional, default 32\n * * diameter sets the axes dimensions, diameterX, diameterY and diameterZ to the value of diameter, optional default 1\n * * diameterX sets the diameterX (x direction) of the ellipsoid, overwrites the diameterX set by diameter, optional, default diameter\n * * diameterY sets the diameterY (y direction) of the ellipsoid, overwrites the diameterY set by diameter, optional, default diameter\n * * diameterZ sets the diameterZ (z direction) of the ellipsoid, overwrites the diameterZ set by diameter, optional, default diameter\n * * arc a number from 0 to 1, to create an unclosed ellipsoid based on the fraction of the circumference (latitude) given by the arc value, optional, default 1\n * * slice a number from 0 to 1, to create an unclosed ellipsoid based on the fraction of the height (latitude) given by the arc value, optional, default 1\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.segments\n * @param options.diameter\n * @param options.diameterX\n * @param options.diameterY\n * @param options.diameterZ\n * @param options.arc\n * @param options.slice\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.dedupTopBottomIndices\n * @returns the VertexData of the ellipsoid\n */\nexport function CreateSphereVertexData(options) {\n const segments = (options.segments || 32) | 0;\n const diameterX = options.diameterX || options.diameter || 1;\n const diameterY = options.diameterY || options.diameter || 1;\n const diameterZ = options.diameterZ || options.diameter || 1;\n const arc = options.arc && (options.arc <= 0 || options.arc > 1) ? 1.0 : options.arc || 1.0;\n const slice = options.slice && options.slice <= 0 ? 1.0 : options.slice || 1.0;\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n const dedupTopBottomIndices = !!options.dedupTopBottomIndices;\n const radius = new Vector3(diameterX / 2, diameterY / 2, diameterZ / 2);\n const totalZRotationSteps = 2 + segments;\n const totalYRotationSteps = 2 * totalZRotationSteps;\n const indices = [];\n const positions = [];\n const normals = [];\n const uvs = [];\n for (let zRotationStep = 0; zRotationStep <= totalZRotationSteps; zRotationStep++) {\n const normalizedZ = zRotationStep / totalZRotationSteps;\n const angleZ = normalizedZ * Math.PI * slice;\n for (let yRotationStep = 0; yRotationStep <= totalYRotationSteps; yRotationStep++) {\n const normalizedY = yRotationStep / totalYRotationSteps;\n const angleY = normalizedY * Math.PI * 2 * arc;\n const rotationZ = Matrix.RotationZ(-angleZ);\n const rotationY = Matrix.RotationY(angleY);\n const afterRotZ = Vector3.TransformCoordinates(Vector3.Up(), rotationZ);\n const complete = Vector3.TransformCoordinates(afterRotZ, rotationY);\n const vertex = complete.multiply(radius);\n const normal = complete.divide(radius).normalize();\n positions.push(vertex.x, vertex.y, vertex.z);\n normals.push(normal.x, normal.y, normal.z);\n uvs.push(normalizedY, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - normalizedZ : normalizedZ);\n }\n if (zRotationStep > 0) {\n const verticesCount = positions.length / 3;\n for (let firstIndex = verticesCount - 2 * (totalYRotationSteps + 1); firstIndex + totalYRotationSteps + 2 < verticesCount; firstIndex++) {\n if (dedupTopBottomIndices) {\n if (zRotationStep > 1) {\n indices.push(firstIndex);\n indices.push(firstIndex + 1);\n indices.push(firstIndex + totalYRotationSteps + 1);\n }\n if (zRotationStep < totalZRotationSteps || slice < 1.0) {\n indices.push(firstIndex + totalYRotationSteps + 1);\n indices.push(firstIndex + 1);\n indices.push(firstIndex + totalYRotationSteps + 2);\n }\n }\n else {\n indices.push(firstIndex);\n indices.push(firstIndex + 1);\n indices.push(firstIndex + totalYRotationSteps + 1);\n indices.push(firstIndex + totalYRotationSteps + 1);\n indices.push(firstIndex + 1);\n indices.push(firstIndex + totalYRotationSteps + 2);\n }\n }\n }\n }\n // Sides\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, options.frontUVs, options.backUVs);\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n return vertexData;\n}\n/**\n * Creates a sphere mesh\n * * The parameter `diameter` sets the diameter size (float) of the sphere (default 1)\n * * You can set some different sphere dimensions, for instance to build an ellipsoid, by using the parameters `diameterX`, `diameterY` and `diameterZ` (all by default have the same value of `diameter`)\n * * The parameter `segments` sets the sphere number of horizontal stripes (positive integer, default 32)\n * * You can create an unclosed sphere with the parameter `arc` (positive float, default 1), valued between 0 and 1, what is the ratio of the circumference (latitude) : 2 x PI x ratio\n * * You can create an unclosed sphere on its height with the parameter `slice` (positive float, default1), valued between 0 and 1, what is the height ratio (longitude)\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.segments\n * @param options.diameter\n * @param options.diameterX\n * @param options.diameterY\n * @param options.diameterZ\n * @param options.arc\n * @param options.slice\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.updatable\n * @param scene defines the hosting scene\n * @returns the sphere mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#sphere\n */\nexport function CreateSphere(name, options = {}, scene = null) {\n const sphere = new Mesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n sphere._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreateSphereVertexData(options);\n vertexData.applyToMesh(sphere, options.updatable);\n return sphere;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use CreateSphere directly\n */\nexport const SphereBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateSphere,\n};\nVertexData.CreateSphere = CreateSphereVertexData;\nMesh.CreateSphere = (name, segments, diameter, scene, updatable, sideOrientation) => {\n const options = {\n segments: segments,\n diameterX: diameter,\n diameterY: diameter,\n diameterZ: diameter,\n sideOrientation: sideOrientation,\n updatable: updatable,\n };\n return CreateSphere(name, options, scene);\n};\n//# sourceMappingURL=sphereBuilder.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/light_baker.vertex.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'light_bakerVertexShader';\nconst shader = `#ifdef GL_ES\nprecision highp float;\n#endif\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\nattribute vec2 uv2;\nuniform mat4 viewProjection;\nvarying vec2 vUV;\nvarying vec2 vUV2;\nvarying vec3 vPos;\nvarying vec3 vNormalW;\nvarying vec4 vWorldPos;\n#include\nvoid main(void) {\n#include\ngl_Position = vec4(uv2.x * 2.0 - 1.0, (-1.0 + uv2.y * 2.0), 0, 1.0);\nvWorldPos = finalWorld * vec4(position, 1.0);\nvPos = vec3(viewProjection * vWorldPos);\nvNormalW = normalize(vec3(finalWorld * vec4(normal, 0.0)));\nvUV = uv;\nvUV2 = uv2;\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const light_bakerVertexShader = { name, shader };\n//# sourceMappingURL=light_baker.vertex.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/light_baker_arealight.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'light_baker_arealightPixelShader';\nconst shader = `#ifdef GL_ES\nprecision highp float;\n#endif\nvarying vec2 vUV;\nvarying vec2 vUV2;\nvarying vec3 vPos;\nvarying vec3 vNormalW;\nvarying vec4 vWorldPos;\nuniform sampler2D previousTexture;\nuniform float num_samples_total;\nuniform float first_sample_index;\nuniform vec3 light_centers[NUM_AREA_LIGHTS];\nuniform vec3 light_colors[NUM_AREA_LIGHTS];\nuniform vec2 light_sizes[NUM_AREA_LIGHTS];\nuniform float light_intensities[NUM_AREA_LIGHTS];\nuniform float light_roty[NUM_AREA_LIGHTS];\nuniform float light_rotz[NUM_AREA_LIGHTS];\nfloat uniformNoise(vec2 n){\nreturn fract(sin(dot(n, vec2(12.9898, 78.233))) * 43758.5453);\n}\nvec4 pack(float depth)\n{\nconst vec4 bit_shift = vec4(255.0 * 255.0 * 255.0, 255.0 * 255.0, 255.0, 1.0);\nconst vec4 bit_mask = vec4(0.0, 1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0);\nvec4 res = fract(depth * bit_shift);\nres -= res.xxyz * bit_mask;\nreturn res;\n}\nfloat unpack(vec4 color)\n{\nconst vec4 bit_shift = vec4(1.0 / (255.0 * 255.0 * 255.0), 1.0 / (255.0 * 255.0), 1.0 / 255.0, 1.0);\nreturn dot(color, bit_shift);\n}\nfloat intersectPlane(vec3 p, vec3 dir, vec3 n, float d) {\nreturn -(dot(p, n) + d) / dot(dir, n);\n}\nvoid best(inout float t, float nt) {\nif (nt >= 0.0 && nt < t) {\nt = nt;\n}\n}\nconst float roughness = 1.0;\nconst vec3 dcolor = vec3(1.0, 1.0, 0.87);\nconst vec3 scolor = vec3(1);\nconst float LUT_SIZE = 64.0;\nconst float LUT_SCALE = (LUT_SIZE - 1.0)/LUT_SIZE;\nconst float LUT_BIAS = 0.5/LUT_SIZE;\nconst float pi = 3.14159265;\nstruct Ray\n{\nvec3 origin;\nvec3 dir;\n};\nstruct Rect\n{\nvec3 center;\nvec3 dirx;\nvec3 diry;\nfloat halfx;\nfloat halfy;\nvec4 plane;\n};\nvec3 mul(mat3 m, vec3 v)\n{\nreturn m * v;\n}\nmat3 mul(mat3 m1, mat3 m2)\n{\nreturn m1 * m2;\n}\nvec3 rotation_y(vec3 v, float a)\n{\nvec3 r;\nr.x = v.x*cos(a) + v.z*sin(a);\nr.y = v.y;\nr.z = -v.x*sin(a) + v.z*cos(a);\nreturn r;\n}\nvec3 rotation_z(vec3 v, float a)\n{\nvec3 r;\nr.x = v.x*cos(a) - v.y*sin(a);\nr.y = v.x*sin(a) + v.y*cos(a);\nr.z = v.z;\nreturn r;\n}\nvec3 rotation_yz(vec3 v, float ay, float az)\n{\nreturn rotation_z(rotation_y(v, ay), az);\n}\n#if __VERSION__ == 100\nmat3 transpose(mat3 v) {\nmat3 tmp;\ntmp[0] = vec3(v[0].x, v[1].x, v[2].x);\ntmp[1] = vec3(v[0].y, v[1].y, v[2].y);\ntmp[2] = vec3(v[0].z, v[1].z, v[2].z);\nreturn tmp;\n}\n#endif\nvec3 perpendicular(const vec3 v) {\nif (abs(v.x) <= abs(v.y)) {\nreturn vec3(0.0, -v.z, v.y);\n} else {\nreturn vec3(-v.z, 0.0, v.x);\n}\n}\nfloat IntegrateEdge(vec3 v1, vec3 v2)\n{\nfloat cosTheta = dot(v1, v2);\nfloat theta = acos(cosTheta);\nfloat res = cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 1.0);\nreturn res;\n}\nvoid ClipQuadToHorizon(inout vec3 L[5], out int n)\n{\nint config = 0;\nif (L[0].z > 0.0) config += 1;\nif (L[1].z > 0.0) config += 2;\nif (L[2].z > 0.0) config += 4;\nif (L[3].z > 0.0) config += 8;\nn = 0;\nif (config == 0)\n{\n}\nelse if (config == 1)\n{\nn = 3;\nL[1] = -L[1].z * L[0] + L[0].z * L[1];\nL[2] = -L[3].z * L[0] + L[0].z * L[3];\n}\nelse if (config == 2)\n{\nn = 3;\nL[0] = -L[0].z * L[1] + L[1].z * L[0];\nL[2] = -L[2].z * L[1] + L[1].z * L[2];\n}\nelse if (config == 3)\n{\nn = 4;\nL[2] = -L[2].z * L[1] + L[1].z * L[2];\nL[3] = -L[3].z * L[0] + L[0].z * L[3];\n}\nelse if (config == 4)\n{\nn = 3;\nL[0] = -L[3].z * L[2] + L[2].z * L[3];\nL[1] = -L[1].z * L[2] + L[2].z * L[1];\n}\nelse if (config == 5)\n{\nn = 0;\n}\nelse if (config == 6)\n{\nn = 4;\nL[0] = -L[0].z * L[1] + L[1].z * L[0];\nL[3] = -L[3].z * L[2] + L[2].z * L[3];\n}\nelse if (config == 7)\n{\nn = 5;\nL[4] = -L[3].z * L[0] + L[0].z * L[3];\nL[3] = -L[3].z * L[2] + L[2].z * L[3];\n}\nelse if (config == 8)\n{\nn = 3;\nL[0] = -L[0].z * L[3] + L[3].z * L[0];\nL[1] = -L[2].z * L[3] + L[3].z * L[2];\nL[2] = L[3];\n}\nelse if (config == 9)\n{\nn = 4;\nL[1] = -L[1].z * L[0] + L[0].z * L[1];\nL[2] = -L[2].z * L[3] + L[3].z * L[2];\n}\nelse if (config == 10)\n{\nn = 0;\n}\nelse if (config == 11)\n{\nn = 5;\nL[4] = L[3];\nL[3] = -L[2].z * L[3] + L[3].z * L[2];\nL[2] = -L[2].z * L[1] + L[1].z * L[2];\n}\nelse if (config == 12)\n{\nn = 4;\nL[1] = -L[1].z * L[2] + L[2].z * L[1];\nL[0] = -L[0].z * L[3] + L[3].z * L[0];\n}\nelse if (config == 13)\n{\nn = 5;\nL[4] = L[3];\nL[3] = L[2];\nL[2] = -L[1].z * L[2] + L[2].z * L[1];\nL[1] = -L[1].z * L[0] + L[0].z * L[1];\n}\nelse if (config == 14)\n{\nn = 5;\nL[4] = -L[0].z * L[3] + L[3].z * L[0];\nL[0] = -L[0].z * L[1] + L[1].z * L[0];\n}\nelse if (config == 15)\n{\nn = 4;\n}\nif (n == 3)\nL[3] = L[0];\nif (n == 4)\nL[4] = L[0];\n}\nvec3 LTC_Evaluate(\nvec3 N, vec3 P, mat3 Minv, vec3 points[4], bool twoSided)\n{\nvec3 T1, T2;\nT1 = normalize(perpendicular(N));\nT2 = cross(N, T1);\nMinv = mul(Minv, transpose(mat3(T1, T2, N)));\nvec3 L[5];\nL[0] = mul(Minv, points[0] - P);\nL[1] = mul(Minv, points[1] - P);\nL[2] = mul(Minv, points[2] - P);\nL[3] = mul(Minv, points[3] - P);\nint n;\nClipQuadToHorizon(L, n);\nif (n == 0)\nreturn vec3(0, 0, 0);\nL[0] = normalize(L[0]);\nL[1] = normalize(L[1]);\nL[2] = normalize(L[2]);\nL[3] = normalize(L[3]);\nL[4] = normalize(L[4]);\nfloat sum = 0.0;\nsum += IntegrateEdge(L[0], L[1]);\nsum += IntegrateEdge(L[1], L[2]);\nsum += IntegrateEdge(L[2], L[3]);\nif (n >= 4)\nsum += IntegrateEdge(L[3], L[4]);\nif (n == 5)\nsum += IntegrateEdge(L[4], L[0]);\nsum = max(0.0, sum);\nvec3 Lo_i = vec3(sum, sum, sum);\nreturn Lo_i;\n}\nvoid InitRect(vec3 center, vec2 size, float roty, float rotz, out Rect rect)\n{\nrect.dirx = rotation_yz(vec3(1, 0, 0), roty, rotz);\nrect.diry = rotation_yz(vec3(0, 1, 0), roty, rotz);\nrect.center = center;\nrect.halfx = 0.5*size.x;\nrect.halfy = 0.5*size.y;\nvec3 rectNormal = cross(rect.dirx, rect.diry);\nrect.plane = vec4(rectNormal, -dot(rectNormal, rect.center));\n}\nvoid InitRectPoints(Rect rect, out vec3 points[4])\n{\nvec3 ex = rect.halfx*rect.dirx;\nvec3 ey = rect.halfy*rect.diry;\npoints[0] = rect.center - ex - ey;\npoints[1] = rect.center + ex - ey;\npoints[2] = rect.center + ex + ey;\npoints[3] = rect.center - ex + ey;\n}\nfloat saturate(float v)\n{\nreturn clamp(v, 0.0, 1.0);\n}\nvec3 PowVec3(vec3 v, float p)\n{\nreturn vec3(pow(v.x, p), pow(v.y, p), pow(v.z, p));\n}\nconst float gamma = 2.2;\nvec3 ToLinear(vec3 v) { return PowVec3(v, gamma); }\nvec3 ToSRGB(vec3 v) { return PowVec3(v, 1.0/gamma); }\nfloat triangleNoise(const vec2 n) {\nvec2 p = fract(n * vec2(5.3987, 5.4421));\np += dot(p.yx, p.xy + vec2(21.5351, 14.3137));\nfloat xy = p.x * p.y;\nfloat noise = (fract(xy * 95.4307) + fract(xy * 75.04961) - 1.0);\nreturn noise;\n}\n#define RGB_TRIANGLE_NOISE 1\nvec4 Dither_TriangleNoise(vec4 rgba) {\n#if RGB_TRIANGLE_NOISE == 1\nvec3 noise = vec3(\ntriangleNoise(vUV ) / (255.0),\ntriangleNoise(vUV + 0.1337) / (255.0),\ntriangleNoise(vUV + 0.3141) / (255.0)\n);\n#else\nvec3 noise = vec3(triangleNoise(vUV) / (255.0));\n#endif\nreturn vec4(rgba.rgb + noise, rgba.a);\n}\nfloat srgb2lin(float v) {\nif (v <= 0.04045) {\nreturn v / 12.92;\n}\nreturn pow((v + 0.055) / 1.055, 2.4);\n}\nvec3 srgb2lin(vec3 col) {\nreturn vec3(\nsrgb2lin(col.r),\nsrgb2lin(col.g),\nsrgb2lin(col.b)\n);\n}\nvoid main(void) {\nivec2 pixel_index = ivec2(mod(gl_FragCoord.xy, 32.0));\nint seed = pixel_index.x + pixel_index.y * 32;\nfloat jit = float(seed) / (32.0*32.0) * 2.0 * 3.1415;\nfloat index = first_sample_index;\nvec3 normal = normalize(vNormalW.xyz);\nvec3 pos = vWorldPos.xyz + normal * 0.001;\nfloat total = 0.0;\nfloat num_samples_per_frame = index - first_sample_index;\nvec3 col = vec3(0);\nfor (int i = 0; i < NUM_AREA_LIGHTS; i++) {\nRect rect;\nInitRect(light_centers[i], light_sizes[i], light_roty[i], light_rotz[i], rect);\nvec3 points[4];\nInitRectPoints(rect, points);\nvec3 lcol = srgb2lin(light_colors[i]) * light_intensities[i];\nvec3 N = normal;\nvec3 diff = LTC_Evaluate(N, pos, mat3(1), points, false);\ncol += lcol*(diff) / (2.0*pi);\n}\ncol += vec3(0.05, 0.05, 0.07);\ngl_FragColor = Dither_TriangleNoise(vec4(pow(col.rgb, vec3(1.0/4.0)),1.0));\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const light_baker_arealightPixelShader = { name, shader };\n//# sourceMappingURL=light_baker_arealight.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/finalize_lightmap.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'finalize_lightmapPixelShader';\nconst shader = `#ifdef GL_ES\nprecision highp float;\n#endif\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform float final_frame;\nuniform float dilation_enable;\nuniform vec2 texel_size;\nfloat unpack(vec4 color)\n{\nconst vec4 bit_shift = vec4(1.0 / (255.0 * 255.0 * 255.0), 1.0 / (255.0 * 255.0), 1.0 / 255.0, 1.0);\nreturn dot(color, bit_shift);\n}\nvec4 texel(vec2 uv) {\nvec4 color = texture2D(textureSampler, uv);\nreturn vec4(color.rgb * color.a, color.a);\n}\nfloat triangleNoise(const vec2 n) {\nvec2 p = fract(n * vec2(5.3987, 5.4421));\np += dot(p.yx, p.xy + vec2(21.5351, 14.3137));\nfloat xy = p.x * p.y;\nfloat noise = (fract(xy * 95.4307) + fract(xy * 75.04961) - 1.0);\nreturn noise;\n}\n#define RGB_TRIANGLE_NOISE 1\nvec4 Dither_TriangleNoise(vec4 rgba) {\n#if RGB_TRIANGLE_NOISE == 1\nvec3 noise = vec3(\ntriangleNoise(vUV ) / (255.0),\ntriangleNoise(vUV + 0.1337) / (255.0),\ntriangleNoise(vUV + 0.3141) / (255.0)\n);\n#else\nvec3 noise = vec3(triangleNoise(vUV) / (255.0));\n#endif\nreturn vec4(rgba.rgb + noise, rgba.a);\n}\nvoid main(void)\n{\nvec4 color = vec4(0.0);\nif(final_frame > 0.0) {\ncolor = texel(vUV);\n} else {\ncolor = texture2D(textureSampler, vUV);\n}\nif (dilation_enable > 0.0 && color.a < 0.5) {\ncolor = vec4(0.0, 0.0, 0.0, 0.0);\nvec2 ts = texel_size;\ncolor += texel(vUV + vec2( ts.x, 0.0));\ncolor += texel(vUV + vec2(-ts.x, 0.0));\ncolor += texel(vUV + vec2 (0.0, ts.y));\ncolor += texel(vUV + vec2( 0.0, -ts.y));\ncolor += texel(vUV + vec2(-ts.x, -ts.y));\ncolor += texel(vUV + vec2( ts.x, -ts.y));\ncolor += texel(vUV + vec2(-ts.x, ts.y));\ncolor += texel(vUV + vec2( ts.x, ts.y));\n#if 1\ncolor += texel(vUV + vec2(-2.0 * ts.x, -2.0 * ts.y));\ncolor += texel(vUV + vec2( 2.0 * ts.x, -2.0 * ts.y));\ncolor += texel(vUV + vec2(-2.0 * ts.x, 2.0 * ts.y));\ncolor += texel(vUV + vec2( 2.0 * ts.x, 2.0 * ts.y));\ncolor += texel(vUV + vec2(-2.0 * ts.x, -ts.y));\ncolor += texel(vUV + vec2( 2.0 * ts.x, -ts.y));\ncolor += texel(vUV + vec2(-2.0 * ts.x, 0.0));\ncolor += texel(vUV + vec2( 2.0 * ts.x, 0.0));\ncolor += texel(vUV + vec2(-2.0 * ts.x, ts.y));\ncolor += texel(vUV + vec2( 2.0 * ts.x, ts.y));\ncolor += texel(vUV + vec2(-ts.x, -2.0 * ts.y));\ncolor += texel(vUV + vec2(-ts.x, 2.0 * ts.y));\ncolor += texel(vUV + vec2( 0.0, -2.0 * ts.y));\ncolor += texel(vUV + vec2( 0.0, 2.0 * ts.y));\ncolor += texel(vUV + vec2(ts.x, -2.0 * ts.y));\ncolor += texel(vUV + vec2(ts.x, 2.0 * ts.y));\n#endif\nif (color.a > 0.5) {\ncolor.rgb /= color.a;\ncolor.a = 1.0;\n} else {\ncolor = vec4(0.5, 0.5, 0.5, 0.0);\nif (final_frame > 0.0) {\ncolor = vec4(0.5, 0.5, 0.5, 1.0);\n}\n}\n}\nif (final_frame > 0.0) {\ncolor = Dither_TriangleNoise(color);\n}\ngl_FragColor = color;\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const finalize_lightmapPixelShader = { name, shader };\n//# sourceMappingURL=finalize_lightmap.fragment.js.map","import { Vector2 as BABYLON_Vector2, Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Color4 as BABYLON_Color4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js';\nimport { Material as BABYLON_Material } from '@inter-ikea-betrakta-babylonjs/core/Materials/material.js';\nimport { InstancedMesh as BABYLON_InstancedMesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/instancedMesh.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nimport { UniversalCamera as BABYLON_UniversalCamera } from '@inter-ikea-betrakta-babylonjs/core/Cameras/universalCamera.js';\nimport { RenderTargetTexture as BABYLON_RenderTargetTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/renderTargetTexture.js';\nimport { Texture as BABYLON_Texture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js';\nimport { PostProcess as BABYLON_PostProcess } from '@inter-ikea-betrakta-babylonjs/core/PostProcesses/postProcess.js';\nimport { ShaderMaterial as BABYLON_ShaderMaterial } from '@inter-ikea-betrakta-babylonjs/core/Materials/shaderMaterial.js';\nimport { SphereBuilder as BABYLON_SphereBuilder } from '@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/sphereBuilder.js';\n// Side effects\nimport './shaders/light_baker.vertex.js';\nimport './shaders/light_baker_arealight.fragment.js';\nimport './shaders/finalize_lightmap.fragment.js';\nexport class LightBaker {\n constructor(_viewer, job) {\n this._viewer = _viewer;\n this._sample_nr = 0;\n this._main_render_observer = null;\n this.running = false;\n this._on_stop = null;\n this._material_ready = false;\n this._restore_material_map = new Map();\n this._scene = _viewer.scene;\n this._asset_manager = _viewer.get_asset_manager();\n this._current_job = job;\n this._concurrent_samples = 1;\n // This is broken for even sample counts!\n this._total_samples = 1; // The current AreaLight based algorithm only need 1 sample. This member is left due to legacy reasons and may be used if another Lightbakeing algorithm is used.\n this.bake_objects = job.targets;\n this._uvset = job.uvset;\n this._float_rendering = this._scene.getEngine().getCaps().textureFloatRender;\n this._texture_format = BABYLON_Constants.TEXTURETYPE_UNSIGNED_INT;\n const bake_camera = new BABYLON_UniversalCamera('light_bake_camera', new BABYLON_Vector3(0, 0, 0), this._scene);\n bake_camera.setTarget(BABYLON_Vector3.Zero());\n this._bake_camera = bake_camera;\n this._bake_material = this.setup_bake_material(job.area_lights);\n const target_babylon_meshes = this.get_visible_babylon_meshes(job.targets);\n this._write_rt = this.create_render_target(target_babylon_meshes, this._uvset, job.texture_width, job.texture_height, '1');\n this._read_rt = this.create_render_target(target_babylon_meshes, this._uvset, job.texture_width, job.texture_height, '2');\n this._debug_sphere = BABYLON_SphereBuilder.CreateSphere('light_debug_sphere', { segments: 20, diameter: 0.1 }, this._scene);\n this._debug_sphere.setEnabled(false);\n this._debug_instances = [];\n this._debug_line_instances = [];\n }\n reconfigure(job) {\n this._sample_nr = 0;\n this._concurrent_samples = 1;\n // This is broken for even sample counts!\n // As noted in a comment in the constructor, only one sample is ever needed with the current baking system.\n this._total_samples = 1;\n this.bake_objects = job.targets;\n this._uvset = job.uvset;\n // Uneccesary to recompile the bake material if we can just update its parameters instead.\n if (job.area_lights.length === this._current_job.area_lights.length) {\n this.update_bake_material(this._bake_material, job.area_lights);\n }\n else {\n if (this._bake_material) {\n this._bake_material.dispose();\n }\n this._bake_material = this.setup_bake_material(job.area_lights);\n }\n this._material_ready = false;\n // Note, we need to recreate the RTTs every time becaue they might have been disposed or modified.\n const target_babylon_meshes = this.get_visible_babylon_meshes(job.targets);\n this._write_rt = this.create_render_target(target_babylon_meshes, this._uvset, job.texture_width, job.texture_height, '1');\n this._read_rt = this.create_render_target(target_babylon_meshes, this._uvset, job.texture_width, job.texture_height, '2');\n this._current_job = job;\n }\n bake() {\n this.running = true;\n this.create_bake_render_observer();\n // Which render target that contain the final image depends on how many samples we take\n return this._total_samples % 2 === 0 ? this._read_rt : this._write_rt;\n }\n async_bake() {\n return new Promise((resolve, reject) => {\n this.running = true;\n this._on_stop = (tex) => {\n if (this._sample_nr === this._total_samples) {\n resolve(tex);\n }\n else {\n reject(new Error('LightBaker was stopped before completion'));\n }\n };\n this.create_bake_render_observer();\n });\n }\n frames_needed_for_bake_job() {\n return this._total_samples;\n }\n dispose() {\n if (this.running) {\n this.stop_bake();\n }\n this._bake_material.dispose();\n this._bake_camera.dispose();\n this._debug_instances.forEach(instance => {\n instance.dispose();\n });\n this._debug_line_instances.forEach(line => {\n line.dispose();\n });\n this._debug_sphere.dispose();\n }\n create_bake_render_observer() {\n if (this._main_render_observer !== null) {\n console.warn('Light baking was incorrectly interrupted and started again.');\n this._viewer.get_before_render_scene_setup_observable().remove(this._main_render_observer);\n this._main_render_observer = null;\n }\n // TODO: Register bakers render loop after baking material have compiled.\n this._main_render_observer = this._viewer.get_before_render_scene_setup_observable().add(() => {\n this._scene.incrementRenderId();\n this._write_rt.render(false);\n this._viewer.mark_scene_dirty();\n });\n }\n last_frame() {\n return this._sample_nr === this._total_samples;\n }\n setup_bake_material(lights) {\n const defines = [];\n const uniforms = ['world', 'worldView', 'worldViewProjection', 'view', 'projection', 'previousTexture', 'first_sample_index', 'num_samples_total'];\n const samplers = [];\n defines.push(`#define NUM_AREA_LIGHTS ${lights.length}`);\n if (!this._float_rendering) {\n defines.push('#define PACKEDLIGHTMAP');\n }\n for (let i = 0; i < this._concurrent_samples; i++) {\n defines.push(`#define BAKELIGHT${i}`);\n }\n const bake_material = new BABYLON_ShaderMaterial('bake_material', this._scene, {\n vertex: 'light_baker',\n fragment: 'light_baker_arealight'\n }, {\n attributes: ['position', 'normal', 'uv', 'uv2'],\n uniforms: uniforms,\n samplers: samplers,\n defines: defines\n });\n this.update_bake_material(bake_material, lights);\n bake_material.sideOrientation = BABYLON_Material.CounterClockWiseSideOrientation;\n bake_material.backFaceCulling = false;\n return bake_material;\n }\n // Note, the new set of lights must be equal in amount to the amount of lights provided in the material's defines.\n update_bake_material(bake_material, lights) {\n const centers = [];\n const sizes = [];\n const colors = [];\n lights.forEach(l => {\n centers.push(l.center.x, l.center.y, l.center.z);\n sizes.push(l.size.x, l.size.y);\n if (l.color !== undefined) {\n colors.push(l.color.r, l.color.g, l.color.b);\n }\n else {\n colors.push(1.0, 1.0, 1.0);\n }\n });\n bake_material.setArray3('light_centers', centers);\n bake_material.setArray3('light_colors', colors);\n bake_material.setArray2('light_sizes', sizes);\n bake_material.setFloats('light_roty', lights.map(l => l.roty));\n bake_material.setFloats('light_rotz', lights.map(l => l.rotz));\n bake_material.setFloats('light_intensities', lights.map(l => l.intensity));\n }\n create_render_target(render_list, uvset, width, height, name) {\n const render_target = new BABYLON_RenderTargetTexture('rendertarget_' + name, { width: width, height: height }, this._scene, false, undefined, this._texture_format, undefined, BABYLON_RenderTargetTexture.LINEAR_LINEAR, false, false);\n render_target.wrapU = BABYLON_Texture.CLAMP_ADDRESSMODE;\n render_target.wrapV = BABYLON_Texture.CLAMP_ADDRESSMODE;\n render_target.anisotropicFilteringLevel = 1;\n render_target.clearColor = new BABYLON_Color4(0.5, 0.5, 0.5, 0.0);\n render_target.activeCamera = this._bake_camera;\n render_target.coordinatesIndex = uvset; // use uv2 when read as a lightmap\n render_target.renderList = render_list;\n const defines = this._float_rendering ? '' : '#define PACKEDLIGHTMAP';\n // You can add a number of extra dilation passes as follows.\n // for (let i = 0; i < 5; i++) {\n // const post = new BABYLON_PostProcess('finalize_lightmap1', 'finalize_lightmap', ['final_frame', 'dilation_enable', 'texel_size'], null, 1, render_target.activeCamera, BABYLON_Texture.NEAREST_SAMPLINGMODE, undefined, undefined, defines, this.texture_format)\n // post.onApply = (effect) => {\n // effect.setVector2('texel_size', new BABYLON_Vector2(1.0 / width, 1.0 / height))\n // effect.setFloat('final_frame', -1.0)\n // effect.setFloat('dilation_enable', 1.0)\n // }\n // render_target.addPostProcess(post)\n // }\n {\n const post = new BABYLON_PostProcess('finalize_lightmap', 'finalize_lightmap', ['final_frame', 'dilation_enable', 'texel_size'], null, 1, render_target.activeCamera, BABYLON_Texture.NEAREST_SAMPLINGMODE, undefined, undefined, defines, this._texture_format);\n post.onApply = (effect) => {\n effect.setVector2('texel_size', new BABYLON_Vector2(1.0 / width, 1.0 / height));\n effect.setFloat('final_frame', this.last_frame() ? 1.0 : -1.0);\n effect.setFloat('dilation_enable', 1.0);\n };\n render_target.addPostProcess(post);\n }\n render_target.onBeforeRenderObservable.add(this.on_before_render.bind(this));\n render_target.onAfterRenderObservable.add(this.on_after_render.bind(this));\n return render_target;\n }\n on_before_render() {\n this._restore_material_map.clear();\n if (this._write_rt.renderList) {\n let material_ready = true;\n this._write_rt.renderList.forEach(mesh => {\n if (mesh instanceof BABYLON_InstancedMesh) {\n this._restore_material_map.set(mesh, mesh.sourceMesh.material);\n mesh.sourceMesh.material = this._bake_material;\n }\n else {\n this._restore_material_map.set(mesh, mesh.material);\n mesh.material = this._bake_material;\n }\n material_ready = material_ready && this._bake_material.isReady(mesh);\n });\n this._material_ready = this._material_ready || material_ready;\n }\n if (this._material_ready) {\n this._sample_nr += this._concurrent_samples;\n }\n }\n on_after_render() {\n this._restore_material_map.forEach((material, mesh) => {\n if (mesh instanceof BABYLON_InstancedMesh) {\n mesh.sourceMesh.material = material;\n }\n else {\n mesh.material = material;\n }\n });\n if (this._material_ready) {\n // If baking is done, remove bake functions from render loop\n if (this._sample_nr >= this._total_samples) {\n this.stop_bake();\n }\n this.swap_rt();\n }\n }\n swap_rt() {\n const temp_rt = this._write_rt;\n this._write_rt = this._read_rt;\n this._read_rt = temp_rt;\n }\n stop_bake() {\n this.running = false;\n if (this._main_render_observer !== null) {\n this._viewer.get_before_render_scene_setup_observable().remove(this._main_render_observer);\n this._main_render_observer = null;\n }\n const rt_with_result = this._total_samples % 2 === 0 ? this._read_rt : this._write_rt;\n const the_other_rt = this._total_samples % 2 === 0 ? this._write_rt : this._read_rt;\n the_other_rt.dispose(); // Dispose the render target we don't return.\n if (this._on_stop !== null) {\n this._on_stop(rt_with_result);\n }\n this._viewer.mark_scene_dirty();\n }\n get_visible_babylon_meshes(object_ids) {\n const meshes = [];\n const objects = this._viewer.viewer_scene.get_objects(object_ids);\n objects.forEach(object => {\n object.mesh_iterator(true, m => {\n if (m.isVisible && m.isEnabled()) {\n meshes.push(m);\n }\n });\n });\n return meshes;\n }\n}\n//# sourceMappingURL=LightBaker.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nconst name = \"glowBlurPostProcessPixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;uniform vec2 screenSize;uniform vec2 direction;uniform float blurWidth;float getLuminance(vec3 color)\n{return dot(color,vec3(0.2126,0.7152,0.0722));}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{float weights[7];weights[0]=0.05;weights[1]=0.1;weights[2]=0.2;weights[3]=0.3;weights[4]=0.2;weights[5]=0.1;weights[6]=0.05;vec2 texelSize=vec2(1.0/screenSize.x,1.0/screenSize.y);vec2 texelStep=texelSize*direction*blurWidth;vec2 start=vUV-3.0*texelStep;vec4 baseColor=vec4(0.,0.,0.,0.);vec2 texelOffset=vec2(0.,0.);for (int i=0; i<7; i++)\n{vec4 texel=texture2D(textureSampler,start+texelOffset);baseColor.a+=texel.a*weights[i];float luminance=getLuminance(baseColor.rgb);float luminanceTexel=getLuminance(texel.rgb);float choice=step(luminanceTexel,luminance);baseColor.rgb=choice*baseColor.rgb+(1.0-choice)*texel.rgb;texelOffset+=texelStep;}\ngl_FragColor=baseColor;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const glowBlurPostProcessPixelShader = { name, shader };\n//# sourceMappingURL=glowBlurPostProcess.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/outline_id_map_generation.vertex.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'outline_id_map_generationVertexShader';\nconst shader = `attribute vec3 position;\n#include\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\nuniform mat4 viewProjection;\nvarying vec4 vPosition;\n#ifdef INSTANCES\nattribute vec4 outline_instance_data;\nvarying vec4 vOutlineColor;\n#endif\nvoid main(void)\n{\nvec3 positionUpdated = position;\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\n#ifdef CUBEMAP\nvPosition = finalWorld * vec4(positionUpdated, 1.0);\ngl_Position = viewProjection * finalWorld * vec4(position, 1.0);\n#else\nvPosition = viewProjection * finalWorld * vec4(positionUpdated, 1.0);\ngl_Position = vPosition;\n#endif\n#ifdef INSTANCES\nvOutlineColor = outline_instance_data;\n#endif\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const outline_id_map_generationVertexShader = { name, shader };\n//# sourceMappingURL=outline_id_map_generation.vertex.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/outline_id_map_generation.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'outline_id_map_generationPixelShader';\nconst shader = `#ifdef INSTANCES\nvarying vec4 vOutlineColor;\n#else\nuniform vec4 uOutlineColor;\n#endif\nvoid main(void)\n{\n#ifdef INSTANCES\ngl_FragColor = vOutlineColor;\n#else\ngl_FragColor = uOutlineColor;\n#endif\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const outline_id_map_generationPixelShader = { name, shader };\n//# sourceMappingURL=outline_id_map_generation.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/outline_combine.vertex.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'outline_combineVertexShader';\nconst shader = `attribute vec2 position;\nvarying vec2 vUV;\nconst vec2 madd = vec2(0.5, 0.5);\nvoid main(void) {\nvUV = position * madd + madd;\ngl_Position = vec4(position, 0.0, 1.0);\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const outline_combineVertexShader = { name, shader };\n//# sourceMappingURL=outline_combine.vertex.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/outline_combine.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'outline_combinePixelShader';\nconst shader = `#define MAX_COLORS 10\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform vec4 colors[MAX_COLORS];\nuniform vec2 uvScale;\nuniform vec2 halfSourcePixelSize;\nfloat remap(float x, float old_min, float old_max, float new_min, float new_max)\n{\nreturn (x - old_min) / (old_max - old_min) * (new_max - new_min) + new_min;\n}\nvoid main(void) {\nvec2 uv = vUV * uvScale;\nvec4 value = texture2D(textureSampler, uv);\nint index = int(remap(value.r, 1./float(MAX_COLORS + 1), 1., 0., float(MAX_COLORS)) + 0.5) - 1;\nvec4 color;\nif (index >= 0) {\nfor(int i = 0; i < MAX_COLORS; i++) {\nif(i == index) {\ncolor = colors[i];\nbreak;\n}\n}\nfloat width = 0.2 - 0.2 * value.b;\nfloat inside;\ninside = texture2D(textureSampler, uv + halfSourcePixelSize * vec2(-1, -1)).g;\ninside += texture2D(textureSampler, uv + halfSourcePixelSize * vec2(-1, 1)).g;\ninside += texture2D(textureSampler, uv + halfSourcePixelSize * vec2(1, 1)).g;\ninside += texture2D(textureSampler, uv + halfSourcePixelSize * vec2(1, -1)).g;\ninside /= 4.0;\nfloat gradient = value.a;\nfloat alpha = smoothstep(width, width + 0.15, gradient) - inside;\ngl_FragColor = vec4(color.rgb, max(0.0, alpha * color.a));\n} else {\ngl_FragColor = vec4(0, 0, 0, 0);\n}\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const outline_combinePixelShader = { name, shader };\n//# sourceMappingURL=outline_combine.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/outline_expand.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'outline_expandPixelShader';\nconst shader = `varying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform vec2 kernel;\nuniform vec2 direction;\nuniform vec2 uvScale;\n#define MAX_COLORS 10\nvoid main(void) {\nfloat weights[7];\nweights[0] = 0.05;\nweights[1] = 0.1;\nweights[2] = 0.2;\nweights[3] = 0.3;\nweights[4] = 0.2;\nweights[5] = 0.1;\nweights[6] = 0.05;\nvec2 delta = direction * kernel * uvScale;\nvec2 start = uvScale * vUV - 3.0 * delta;\nvec2 offset = vec2(0., 0.);\nvec4 outCol = vec4(0);\nfloat oldDist = 10000.;\nfor (int i = 0; i < 7; i++)\n{\nvec4 col = texture2D(textureSampler, start + offset);\nfloat newDist = length(offset - delta * 3.0);\nfloat isLess = float(col.r >= 1./float(MAX_COLORS + 1) && (newDist < oldDist || outCol.r == 0.));\noldDist = mix(oldDist, newDist, isLess);\noutCol.r = mix(outCol.r, col.r, isLess);\noutCol.b = mix(outCol.b, col.b, isLess);\noutCol.a += weights[i] * col.a;\noffset += delta;\n}\noutCol.g = texture2D(textureSampler, start + delta * 3.).g;\ngl_FragColor = outCol;\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const outline_expandPixelShader = { name, shader };\n//# sourceMappingURL=outline_expand.fragment.js.map","import { RenderTargetTexture as BABYLON_RenderTargetTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/renderTargetTexture.js';\nimport { Vector2 as BABYLON_Vector2 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\n/**\n * This class is meant to help with rendering to a smaller portion of a render target.\n * Traditionally, what you would do is bind your render target, and then use glViewport to only render to a portion. But Babylon doesn't expose a good way to do so.\n * - And you don't want to resize your render targets/textures often, as its a fairly expensive process.\n *\n * This class works by spoofing the resolution of the underlying texture of the render target in the Babylon data.\n *\n * This allows you to use one render target for multiple effects that are ran in different resolutions, for example using the same buffer for a half-resolution effect and a full-resolution effect.\n * It was added to let us render outlines using the same render targets for all Views (that potentially have different resolutions).\n */\nexport class PartialViewportRenderTarget {\n constructor(name, size, scene, generate_mipmaps, do_not_change_aspect_ratio, type, is_cube, sampling_mode, generate_depth_buffer, generate_stencil_buffer, is_multi, format, delay_allocation) {\n this.should_render = true;\n this._render_target = new BABYLON_RenderTargetTexture(name, size, scene, generate_mipmaps, do_not_change_aspect_ratio, type, is_cube, sampling_mode, generate_depth_buffer, generate_stencil_buffer, is_multi, format, delay_allocation);\n this._actual_width = this._render_target.getRenderWidth();\n this._actual_height = this._render_target.getRenderHeight();\n const original_should_render = this._render_target._shouldRender.bind(this._render_target);\n this._render_target._shouldRender = () => {\n return this.should_render && original_should_render();\n };\n }\n /**\n * Gets the render target at the specified size, ONLY FOR TEMPORARY USE!\n * Automatically increases the size if needed.\n * @param width The wanted dimensions\n * @param height The wanted dimensions\n * @returns\n */\n get_temporary_partial_render_target(width, height) {\n if (width > this._actual_width || height > this._actual_height) {\n // We need to increase our size.\n this.set_actual_size(width, height);\n }\n else {\n const size = { width: width, height: height };\n // @ts-ignore\n this._render_target._size = size;\n this._render_target._texture.width = width;\n this._render_target._texture.height = height;\n // @ts-ignore\n this._render_target.renderTarget._size = size;\n }\n return this._render_target;\n }\n /**\n * Can be seen as a resize or \"shrink to fit\" function. Useful if your future resolutions will be lower.\n * Should be used carefully, as it will reallocate GPU memory.\n * @param width\n * @param height\n */\n set_actual_size(width, height) {\n this._render_target.resize({ width: width, height: height });\n this._actual_width = width;\n this._actual_height = height;\n }\n get_actual_size() {\n return {\n x: this._actual_width,\n y: this._actual_height\n };\n }\n get render_target() {\n return this._render_target;\n }\n get_full_to_partial_scale() {\n const k = 0.0;\n return new BABYLON_Vector2((this.render_target.getSize().width - k) / (this._actual_width - k), (this.render_target.getSize().height - k) / (this._actual_height - k));\n }\n dispose() {\n this._render_target.dispose();\n }\n}\n//# sourceMappingURL=PartialViewportRenderTarget.js.map","// NOTE: This is an adapdation of HighlightLayer.ts from Babylon\nimport { Vector2 as BABYLON_Vector2 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Color3 as BABYLON_Color3, Color4 as BABYLON_Color4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js';\nimport { EffectFallbacks as BABYLON_EffectFallbacks } from '@inter-ikea-betrakta-babylonjs/core/Materials/effectFallbacks.js';\nimport { Material as BABYLON_Material } from '@inter-ikea-betrakta-babylonjs/core/Materials/material.js';\nimport { MaterialHelper as BABYLON_MaterialHelper } from '@inter-ikea-betrakta-babylonjs/core/Materials/materialHelper.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nimport { Texture as BABYLON_Texture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js';\nimport { PostProcess as BABYLON_PostProcess } from '@inter-ikea-betrakta-babylonjs/core/PostProcesses/postProcess.js';\nimport { VertexBuffer as BABYLON_VertexBuffer } from '@inter-ikea-betrakta-babylonjs/core/Meshes/buffer.js';\n// Make sure that the glowBlurPostProcess-shader we want is available\n// TODO: Maybe make a copy of it, this feels a bit hacky. Or maybe there is a better way to force it in the ShadersStore?\nimport '@inter-ikea-betrakta-babylonjs/core/Shaders/glowBlurPostProcess.fragment.js';\n// Side effects\nimport './shaders/outline_id_map_generation.vertex.js';\nimport './shaders/outline_id_map_generation.fragment.js';\nimport './shaders/outline_combine.vertex.js';\nimport './shaders/outline_combine.fragment.js';\nimport './shaders/outline_expand.fragment.js';\nimport { PartialViewportRenderTarget } from './utility/PartialViewportRenderTarget.js';\n/*\n Mostly adapted from hilightLayer.ts\n Reuses shaders that writes solid color and blur, with custom merge (for now).\n\n TODO:\n * Glow is only active in a small part of the screen (usually). Processing in a smaller viewport could help on mobile.\n * Currently there can be gap between selected mesh and outline due to anti-aliasing. Fix!\n*/\nconst DEFAULT_OUTLINE_COLOR = BABYLON_Color4.FromHexString('#1592E6');\nexport var OutlineState;\n(function (OutlineState) {\n OutlineState[OutlineState[\"NONE\"] = 0] = \"NONE\";\n OutlineState[OutlineState[\"OUTLINE\"] = 1] = \"OUTLINE\";\n OutlineState[OutlineState[\"BLOCK\"] = 2] = \"BLOCK\";\n OutlineState[OutlineState[\"OUTLINE_AND_BLOCK\"] = 3] = \"OUTLINE_AND_BLOCK\";\n})(OutlineState || (OutlineState = {}));\n/* This pass is responsible for generating the data used for the outline combine pass.\n * Input: The outline render target, where the red channel contains the outline ID remapped to the 0-1 range.\n * Output: A texture where the red channel contains the dilated outline ID, green contains a binary mask, blue contains the outline width and alpha contains a blurred mask.\n */\nclass ExpandPostProcess extends BABYLON_PostProcess {\n constructor(name, kernel, direction, options, camera, sampling_mode = BABYLON_Texture.BILINEAR_SAMPLINGMODE, engine, reusable) {\n super(name, 'outline_expand', ['kernel', 'direction', 'uvScale'], ['textureSampler'], options, camera, sampling_mode, engine, reusable);\n this.kernel = kernel;\n this.direction = direction;\n this.onApplyObservable.add((effect) => {\n effect.setVector2('kernel', this.kernel);\n effect.setVector2('direction', this.direction);\n });\n }\n}\nexport class OutlineLayer {\n get_effect_name() {\n return 'OutlineEffect';\n }\n constructor(name, scene) {\n this._vertexBuffers = {};\n this._cachedDefines = '';\n this._IDPassEffect = null; // Will be created in isReady func\n this._max_outline_colors = 10;\n this._blur_texture = null;\n this._post_processes = [];\n this._horizontal_blur_postprocess = null;\n this._vertical_blur_postprocess = null;\n this._clear_color = new BABYLON_Color4(0, 0, 0, 0);\n this._mainTextureDesiredSize = { width: 0, height: 0 };\n this._nr_of_objects_with_outline = 0;\n // TODO use weak maps instead? This needs to be done after or in conjunction with meterial-mesh rework.\n this._mesh_uid_to_outline_color = new Map();\n this._mesh_uid_to_outline_width = new Map();\n this._mesh_uid_to_outline_color_id = new Map();\n this._outline_colors = [];\n this._default_outline_color = DEFAULT_OUTLINE_COLOR;\n this._default_outline_width = 0.3;\n this._enabled = true;\n this._is_disposed = false;\n this._outlines_dirty = false;\n this._render_list = [];\n this.name = name;\n this._scene = scene;\n this._engine = this._scene.getEngine();\n this._mainTextureDesiredSize.width = this._engine.getRenderWidth();\n this._mainTextureDesiredSize.height = this._engine.getRenderHeight();\n this._mesh_outline_state = new Map();\n // Generate Buffers\n this._indexBuffer = this.generate_index_buffer();\n this._vertexBuffers[BABYLON_VertexBuffer.PositionKind] = this.generate_vertex_buffer();\n this._mainTexture = this.create_main_texture();\n this.create_texture_and_post_processes();\n this._merge_effect = this.create_merge_effect();\n this.rebuild_color_list();\n }\n /**\n * Generates the index buffer of the full screen quad blending to the main canvas.\n */\n generate_index_buffer() {\n const indices = [0, 1, 2, 0, 2, 3];\n return this._engine.createIndexBuffer(indices);\n }\n /**\n * Generates the vertex buffer of the full screen quad blending to the main canvas.\n */\n generate_vertex_buffer() {\n const vertices = [1, 1, -1, 1, -1, -1, 1, -1];\n return new BABYLON_VertexBuffer(this._engine, vertices, BABYLON_VertexBuffer.PositionKind, false, false, 2);\n }\n mark_outlines_dirty() {\n this._outlines_dirty = true;\n }\n clear_outlines_dirty() {\n this._outlines_dirty = false;\n }\n get_outlines_are_dirty() {\n return this._outlines_dirty;\n }\n should_render() {\n if (this.is_disposed) {\n console.error('Trying to call should_render on disposed outline layer');\n return false;\n }\n return this._enabled && this._nr_of_objects_with_outline > 0;\n }\n set enable(v) {\n if (this.is_disposed) {\n console.error('Trying to set enable on disposed outline layer');\n return;\n }\n this._enabled = v;\n this._mainTexture.should_render = this.should_render();\n this.mark_outlines_dirty();\n }\n get enable() {\n if (this.is_disposed) {\n console.error('Trying to get enable on disposed outline layer');\n return false;\n }\n return this._enabled;\n }\n /**\n * Creates the main texture for the effect layer.\n */\n create_main_texture() {\n const main_texture = new PartialViewportRenderTarget('HighlightLayerMainRTT', {\n width: this._scene.getEngine().getRenderWidth(),\n height: this._scene.getEngine().getRenderHeight()\n }, this._scene, false, true, \n // INT and BYTE are equivalent here. But it makes much more sense to use BYTE here.\n BABYLON_Constants.TEXTURETYPE_UNSIGNED_BYTE, false, \n // We enable bilinear filtering for efficient \"blurring\" in the combine shader.\n BABYLON_Constants.TEXTURE_BILINEAR_SAMPLINGMODE);\n main_texture.render_target.wrapU = BABYLON_Texture.CLAMP_ADDRESSMODE;\n main_texture.render_target.wrapV = BABYLON_Texture.CLAMP_ADDRESSMODE;\n main_texture.render_target.anisotropicFilteringLevel = 1;\n main_texture.render_target.updateSamplingMode(BABYLON_Texture.BILINEAR_SAMPLINGMODE);\n main_texture.render_target.renderParticles = false;\n main_texture.render_target.renderList = [];\n main_texture.render_target.ignoreCameraViewport = true; // NOTE: Even if we dont ignore camera Vieweport, we don't get frustum culling.\n // Custom render function\n main_texture.render_target.customRenderFunction = (opaque_sub_meshes, alpha_test_sub_meshes, transparent_sub_meshes, depth_only_sub_meshes) => {\n let index;\n const engine = this._engine;\n if (depth_only_sub_meshes.length) {\n engine.setColorWrite(false);\n for (index = 0; index < depth_only_sub_meshes.length; index++) {\n this.render_sub_mesh(depth_only_sub_meshes.data[index]);\n }\n engine.setColorWrite(true);\n }\n for (index = 0; index < opaque_sub_meshes.length; index++) {\n this.render_sub_mesh(opaque_sub_meshes.data[index]);\n }\n for (index = 0; index < alpha_test_sub_meshes.length; index++) {\n this.render_sub_mesh(alpha_test_sub_meshes.data[index]);\n }\n const previous_alpha_mode = engine.getAlphaMode();\n for (index = 0; index < transparent_sub_meshes.length; index++) {\n this.render_sub_mesh(transparent_sub_meshes.data[index]);\n }\n engine.setAlphaMode(previous_alpha_mode);\n this._outlines_dirty = false;\n };\n main_texture.render_target.onClearObservable.add((engine) => {\n engine.clear(this._clear_color, true, true, true);\n });\n return main_texture;\n }\n render_sub_mesh(sub_mesh) {\n var _a, _b;\n const material = sub_mesh.getMaterial();\n const mesh = sub_mesh.getRenderingMesh();\n mesh._internalAbstractMeshDataInfo._isActiveIntermediate = false;\n if (!material) {\n return;\n }\n // Culling\n const reverse_side = mesh._getWorldMatrixDeterminant() < 0;\n this._engine.setState(material.backFaceCulling, 0, false, reverse_side);\n // Managing instances\n const batch = mesh._getInstancesRenderList(sub_mesh._id);\n if (batch.mustReturn) {\n return;\n }\n const hardware_instanced_rendering = batch.hardwareInstancedRendering[sub_mesh._id];\n if (this.is_ready(sub_mesh, hardware_instanced_rendering)) {\n if (this._IDPassEffect === null) {\n console.error('This should never happend. isReady should make sure IDPassEffect exists.');\n return;\n }\n this._engine.enableEffect(this._IDPassEffect);\n mesh._bind(sub_mesh, this._IDPassEffect, BABYLON_Material.TriangleFillMode);\n this._IDPassEffect.setMatrix('viewProjection', this._scene.getTransformMatrix());\n const max_colors = this._max_outline_colors;\n // If there are no instances, we simply update the outline color uniform.\n if (mesh.instances.length === 0) {\n const outline_state = this._mesh_outline_state.get(mesh.uniqueId);\n if (outline_state === undefined) {\n return; // We should never get here, since we remove any meshes we dont want to render from the render list\n }\n const color_id = (_a = this._mesh_uid_to_outline_color_id.get(mesh.uniqueId)) !== null && _a !== void 0 ? _a : 0;\n let clip_mask = this.state_to_shader_value(outline_state);\n const color = this._mesh_uid_to_outline_color.get(mesh.uniqueId);\n if ((color === null || color === void 0 ? void 0 : color.a) === 0 && (outline_state === OutlineState.BLOCK || OutlineState.OUTLINE_AND_BLOCK)) {\n clip_mask = 0; // Treat the opacity 0 case as an outline block\n }\n const width = (_b = this._mesh_uid_to_outline_width.get(mesh.uniqueId)) !== null && _b !== void 0 ? _b : this._default_outline_width;\n // Remap color_id to range from 0.09 to 1\n const color_id_value = remap(color_id + 1, 0, max_colors, 1 / (max_colors + 1), 1);\n this._IDPassEffect.setColor4('uOutlineColor', new BABYLON_Color3(color_id_value * clip_mask, clip_mask, width), clip_mask);\n }\n else {\n // If this (sub)mesh is instanced, we need to update the per-instance data buffers directly.\n // We also need to fetch the uniqueId differently, because otherwise we get the ID of the wrapping model (and not of each specific instance).\n mesh.instances.forEach(instanced_mesh => {\n var _a, _b;\n const color_id = (_a = this._mesh_uid_to_outline_color_id.get(instanced_mesh.uniqueId)) !== null && _a !== void 0 ? _a : 0;\n const width = (_b = this._mesh_uid_to_outline_width.get(instanced_mesh.uniqueId)) !== null && _b !== void 0 ? _b : this._default_outline_width;\n let clip_mask = 1;\n const outline_state = this._mesh_outline_state.get(instanced_mesh.uniqueId);\n if (outline_state) {\n clip_mask = this.state_to_shader_value(outline_state);\n if ((outline_state === OutlineState.BLOCK || OutlineState.OUTLINE_AND_BLOCK)) {\n const color = this._mesh_uid_to_outline_color.get(instanced_mesh.uniqueId);\n if (color) {\n if (color.a === 0) {\n clip_mask = 0; // Treat the opacity 0 case as an outline block\n }\n }\n else if (this._outline_colors[0].a === 0) {\n clip_mask = 0; // Treat the opacity 0 case as an outline block\n }\n }\n }\n instanced_mesh.instancedBuffers[OutlineLayer.INSTANCE_DATA_ATTRIBUTE_NAME].x = clip_mask * remap(color_id + 1, 0, max_colors, 1 / (max_colors + 1), 1);\n instanced_mesh.instancedBuffers[OutlineLayer.INSTANCE_DATA_ATTRIBUTE_NAME].y = clip_mask; // We write the original mask to the y channel, to have a binary inside/outside value\n instanced_mesh.instancedBuffers[OutlineLayer.INSTANCE_DATA_ATTRIBUTE_NAME].z = width;\n instanced_mesh.instancedBuffers[OutlineLayer.INSTANCE_DATA_ATTRIBUTE_NAME].w = clip_mask; // The alpha component also starts out with a binary mask, but this gets blurred\n });\n }\n // Bones\n if (mesh.useBones && mesh.computeBonesUsingShaders && mesh.skeleton) {\n const skeleton = mesh.skeleton;\n if (skeleton.isUsingTextureForMatrices) {\n const bone_texture = skeleton.getTransformMatrixTexture(mesh);\n if (!bone_texture) {\n return;\n }\n this._IDPassEffect.setTexture('boneSampler', bone_texture);\n this._IDPassEffect.setFloat('boneTextureWidth', 4.0 * (skeleton.bones.length + 1));\n }\n else {\n this._IDPassEffect.setMatrices('mBones', skeleton.getTransformMatrices((mesh)));\n }\n }\n // Morph targets\n BABYLON_MaterialHelper.BindMorphTargetParameters(mesh, this._IDPassEffect);\n // Draw\n mesh._processRendering(mesh, sub_mesh, this._IDPassEffect, material.fillMode, batch, hardware_instanced_rendering, (is_instance, world) => {\n this._IDPassEffect.setMatrix('world', world);\n });\n }\n else {\n // Need to reset refresh rate of the main map\n this._mainTexture.render_target.resetRefreshCounter();\n }\n }\n create_merge_effect() {\n // Effect\n return this._engine.createEffect('outline_combine', [BABYLON_VertexBuffer.PositionKind], ['colors', 'halfSourcePixelSize', 'uvScale'], ['textureSampler', 'unblurredTextureSampler'], undefined);\n }\n create_texture_and_post_processes() {\n this._blur_texture = new PartialViewportRenderTarget('HighlightLayerBlurRTT', { width: this._mainTextureDesiredSize.width, height: this._mainTextureDesiredSize.height }, this._scene, false, true, BABYLON_Constants.TEXTURETYPE_UNSIGNED_INT);\n const bt = this._blur_texture.render_target;\n bt.wrapU = BABYLON_Texture.CLAMP_ADDRESSMODE;\n bt.wrapV = BABYLON_Texture.CLAMP_ADDRESSMODE;\n bt.renderParticles = false;\n bt.ignoreCameraViewport = true;\n // The pixel distance between the samples. Non-integer numbers seem to cause strange banding issues\n const size = 2;\n this._horizontal_blur_postprocess = new ExpandPostProcess('Expand Horizontal', new BABYLON_Vector2(), new BABYLON_Vector2(1, 0), 1, null, BABYLON_Texture.BILINEAR_SAMPLINGMODE, this._scene.getEngine());\n this._horizontal_blur_postprocess.onApplyObservable.add((effect) => {\n effect.setFloat2('kernel', size / this._mainTexture.render_target.getSize().width, size / this._mainTexture.render_target.getSize().height);\n effect.setFloat2('direction', 1, 0);\n effect.setTexture('textureSampler', this._mainTexture.render_target);\n effect.setVector2('uvScale', this._mainTexture.get_full_to_partial_scale());\n });\n this._vertical_blur_postprocess = new ExpandPostProcess('Expand Vertical', new BABYLON_Vector2(), new BABYLON_Vector2(0, 1), 1, null, BABYLON_Texture.BILINEAR_SAMPLINGMODE, this._scene.getEngine());\n this._vertical_blur_postprocess.onApplyObservable.add((effect) => {\n effect.setFloat2('kernel', size / this._mainTexture.render_target.getSize().width, size / this._mainTexture.render_target.getSize().height);\n effect.setFloat2('direction', 0, 1);\n effect.setTexture('textureSampler', this._blur_texture.render_target);\n effect.setVector2('uvScale', this._mainTexture.get_full_to_partial_scale());\n });\n this._post_processes = [this._horizontal_blur_postprocess, this._vertical_blur_postprocess];\n // Register Blur effect after main texture is rendered\n this._mainTexture.render_target.onAfterUnbindObservable.add(() => {\n const internal_texture = bt.renderTarget;\n if (internal_texture) {\n this._scene.postProcessManager.directRender([this._horizontal_blur_postprocess], bt.renderTarget, true);\n this._scene.postProcessManager.directRender([this._vertical_blur_postprocess], this._mainTexture.render_target.renderTarget, true);\n }\n });\n // Prevent autoClear.\n // Could this use forEach instead?\n // eslint-disable-next-line array-callback-return\n this._post_processes.map((pp) => { pp.autoClear = false; });\n }\n internal_render(effect) {\n // Texture\n effect.setTexture('textureSampler', this._mainTexture.render_target || null);\n // Cache\n const engine = this._engine;\n engine.drawElementsType(BABYLON_Material.TriangleFillMode, 0, 6);\n }\n render_outline_ontop_of_main(camera, target, width, height, offset_x, offset_y) {\n var _a;\n if (!this.should_render()) {\n return;\n }\n // Check\n if (!this._merge_effect.isReady()) {\n return;\n }\n for (let i = 0; i < this._post_processes.length; i++) {\n if (!this._post_processes[i].isReady()) {\n return;\n }\n }\n (_a = this._blur_texture) === null || _a === void 0 ? void 0 : _a.get_temporary_partial_render_target(width, height);\n this._mainTexture.get_temporary_partial_render_target(width, height);\n this._mainTexture.render_target.activeCamera = camera;\n // For some reason, unless we specify this flag to true, it skips the layer mask check when rendering.\n this._mainTexture.render_target.forceLayerMaskCheck = true;\n // If the outline alpha is 0 we dont want to render the mesh, unless we also told the object to block outlines.\n // That case is handled further in the render_sub_mesh method of this class.\n this._mainTexture.render_target.renderList = this._render_list.filter((mesh) => {\n const color = this._mesh_uid_to_outline_color.get(mesh.uniqueId);\n const state = this.get_outline_state(mesh);\n if (state !== OutlineState.BLOCK && state !== OutlineState.OUTLINE_AND_BLOCK) {\n return color ? color.a > 0 : this._outline_colors[0].a > 0; // If we dont have a color stored for the mesh, it means we check the default outline color at index 0.\n }\n else {\n return true;\n }\n });\n // Since we're calling a Babylon render function, we should increment the render id. Yes this is silly.\n this._scene.incrementRenderId();\n this._mainTexture.render_target.render(false, false);\n const engine = this._scene.getEngine();\n // Render\n engine.enableEffect(this._merge_effect);\n engine.setState(false);\n const flattened_colors = [];\n for (const color of this._outline_colors) {\n flattened_colors.push(color.r);\n flattened_colors.push(color.g);\n flattened_colors.push(color.b);\n flattened_colors.push(color.a);\n }\n this._merge_effect.setFloatArray4('colors', flattened_colors);\n this._merge_effect.setVector2('uvScale', this._mainTexture.get_full_to_partial_scale());\n if (this._blur_texture) {\n const actual_size = this._blur_texture.get_actual_size();\n this._merge_effect.setFloat2('halfSourcePixelSize', 0.5 / actual_size.x, 0.5 / actual_size.y);\n }\n // Cache\n const previous_alpha_mode = engine.getAlphaMode();\n // Go Blend.\n engine.setAlphaMode(BABYLON_Constants.ALPHA_COMBINE);\n if (target === null) {\n engine.restoreDefaultFramebuffer();\n }\n else {\n target._bindFrameBuffer();\n }\n // VBOs\n engine.bindBuffers(this._vertexBuffers, this._indexBuffer, this._merge_effect);\n this._engine._gl.viewport(offset_x, offset_y, width, height);\n // Blends the map on the main canvas.\n this.internal_render(this._merge_effect);\n // Restore Alpha\n engine.setAlphaMode(previous_alpha_mode);\n }\n /**\n * Checks for the readiness of the element composing the layer.\n * @param sub_mesh the mesh to check for\n * @param use_instances specify whether or not to use instances to render the mesh\n * @return true if ready otherwise, false\n */\n is_ready(sub_mesh, use_instances) {\n const material = sub_mesh.getMaterial();\n if (!material) {\n return false;\n }\n if (!material.isReadyForSubMesh(sub_mesh.getMesh(), sub_mesh, use_instances)) {\n return false;\n }\n const defines = [];\n const attribs = [BABYLON_VertexBuffer.PositionKind];\n const mesh = sub_mesh.getMesh();\n // Bones\n const fallbacks = new BABYLON_EffectFallbacks();\n if (mesh.useBones && mesh.computeBonesUsingShaders) {\n attribs.push(BABYLON_VertexBuffer.MatricesIndicesKind);\n attribs.push(BABYLON_VertexBuffer.MatricesWeightsKind);\n if (mesh.numBoneInfluencers > 4) {\n attribs.push(BABYLON_VertexBuffer.MatricesIndicesExtraKind);\n attribs.push(BABYLON_VertexBuffer.MatricesWeightsExtraKind);\n }\n defines.push('#define NUM_BONE_INFLUENCERS ' + mesh.numBoneInfluencers);\n const skeleton = mesh.skeleton;\n if (skeleton && skeleton.isUsingTextureForMatrices) {\n defines.push('#define BONETEXTURE');\n }\n else {\n defines.push('#define BonesPerMesh ' + (skeleton ? (skeleton.bones.length + 1) : 0));\n }\n if (mesh.numBoneInfluencers > 0) {\n fallbacks.addCPUSkinningFallback(0, mesh);\n }\n }\n else {\n defines.push('#define NUM_BONE_INFLUENCERS 0');\n }\n // Morph targets\n const manager = mesh.morphTargetManager;\n let morph_influencers = 0;\n if (manager) {\n if (manager.numInfluencers > 0) {\n defines.push('#define MORPHTARGETS');\n morph_influencers = manager.numInfluencers;\n defines.push('#define NUM_MORPH_INFLUENCERS ' + morph_influencers);\n BABYLON_MaterialHelper.PrepareAttributesForMorphTargetsInfluencers(attribs, mesh, morph_influencers);\n }\n }\n // Instances\n if (use_instances) {\n defines.push('#define INSTANCES');\n BABYLON_MaterialHelper.PushAttributesForInstances(attribs);\n attribs.push(OutlineLayer.INSTANCE_DATA_ATTRIBUTE_NAME);\n }\n // Get correct effect\n const join = defines.join('\\n');\n if (this._cachedDefines !== join || this._IDPassEffect === null) {\n this._cachedDefines = join;\n this._IDPassEffect = this._scene.getEngine().createEffect('outline_id_map_generation', attribs, ['world', 'mBones', 'viewProjection', 'morphTargetInfluences', 'boneTextureWidth', 'uOutlineColor'], ['boneSampler'], join, fallbacks, undefined, undefined, { maxSimultaneousMorphTargets: morph_influencers });\n }\n return this._IDPassEffect.isReady();\n }\n get is_disposed() {\n return this._is_disposed;\n }\n dispose() {\n if (!this.is_disposed) {\n this._render_list.length = 0;\n this._dispose_texture_and_post_processes();\n this._is_disposed = true;\n }\n }\n _dispose_texture_and_post_processes() {\n // Remove mainTexture from scenes rendertargets\n var _a;\n this._mainTexture.dispose();\n // Could this use forEach instead?\n this._post_processes.map(pp => pp.dispose());\n this._post_processes = [];\n (_a = this._blur_texture) === null || _a === void 0 ? void 0 : _a.dispose();\n }\n add_to_rendertarget(mesh) {\n const i = this._render_list.indexOf(mesh);\n if (i < 0) {\n this._render_list.push(mesh);\n }\n }\n remove_from_rendertarget(mesh) {\n const i = this._render_list.indexOf(mesh);\n if (i > -1) {\n this._render_list.splice(i, 1);\n }\n this.mark_outlines_dirty();\n }\n set_outline_state(mesh, state) {\n if (state === OutlineState.NONE) {\n this.remove_mesh(mesh);\n }\n else {\n this._mesh_outline_state.set(mesh.uniqueId, state);\n this.add_to_rendertarget(mesh);\n }\n this.mark_outlines_dirty();\n }\n // Send state to shader\n state_to_shader_value(state) {\n switch (state) {\n case OutlineState.OUTLINE:\n case OutlineState.OUTLINE_AND_BLOCK:\n return 1;\n case OutlineState.BLOCK:\n return 0;\n case OutlineState.NONE:\n return -1; // None is dont care, it should not be renderered. Nothing should depend on this, since we use a render list to keep track on what to render.\n default:\n throw new Error('OutlineEffect - Invalid OutlineState');\n }\n }\n get_outline_state(mesh) {\n const state_value = this._mesh_outline_state.get(mesh.uniqueId);\n return state_value === undefined ? OutlineState.NONE : state_value;\n }\n /**\n * Set if a SceneObject should block other object's outlines.\n * @param object SceneObject reference.\n * @param enabled\n */\n set_outline_block(object, enabled) {\n if (this.is_disposed) {\n console.error('Trying to call set_outline_block on disposed outline layer');\n return;\n }\n object.mesh_iterator(false, mesh => {\n const current = this.get_outline_state(mesh);\n if (!enabled) {\n if (current === OutlineState.BLOCK) {\n this.remove_mesh(mesh);\n }\n if (current === OutlineState.OUTLINE_AND_BLOCK) {\n this.set_outline_state(mesh, OutlineState.OUTLINE);\n }\n }\n else {\n if (current === OutlineState.OUTLINE) {\n this.set_outline_state(mesh, OutlineState.OUTLINE_AND_BLOCK);\n }\n if (current === OutlineState.NONE) {\n this.set_outline_state(mesh, OutlineState.BLOCK);\n }\n }\n });\n }\n /**\n * Set if a SceneObject should have outline enabled.\n * @param object SceneObject reference.\n * @param enabled\n */\n set_outline(object, enabled) {\n if (this.is_disposed) {\n console.error('Trying to call set_outline on disposed outline layer');\n return;\n }\n object.mesh_iterator(false, mesh => {\n const current = this.get_outline_state(mesh);\n if (!enabled) {\n if (current === OutlineState.OUTLINE) {\n this.remove_mesh(mesh); // remove_mesh will decrease nr_of_objects_with_outline if needed\n }\n if (current === OutlineState.OUTLINE_AND_BLOCK) {\n this.set_outline_state(mesh, OutlineState.BLOCK);\n this._nr_of_objects_with_outline--;\n this._mainTexture.should_render = this.should_render();\n }\n }\n else {\n if (current === OutlineState.BLOCK) {\n this.set_outline_state(mesh, OutlineState.OUTLINE_AND_BLOCK);\n this._nr_of_objects_with_outline++;\n this._mainTexture.should_render = this.should_render();\n }\n if (current === OutlineState.NONE) {\n this.set_outline_state(mesh, OutlineState.OUTLINE);\n this._nr_of_objects_with_outline++;\n this._mainTexture.should_render = this.should_render();\n }\n }\n });\n this.rebuild_color_list();\n }\n remove_mesh(mesh) {\n if (this.is_disposed) {\n console.error('Trying to call remove_mesh on disposed outline layer');\n return;\n }\n const state = this.get_outline_state(mesh);\n if (state === OutlineState.NONE) {\n return;\n } // Mesh is not part of effect\n this._mesh_uid_to_outline_color.delete(mesh.uniqueId);\n this._mesh_uid_to_outline_width.delete(mesh.uniqueId);\n // Check if number of objects with outline needs to be updated\n if (state === OutlineState.OUTLINE || state === OutlineState.OUTLINE_AND_BLOCK) {\n this._nr_of_objects_with_outline--;\n this._mainTexture.should_render = this.should_render();\n }\n this._mesh_outline_state.delete(mesh.uniqueId);\n this.remove_from_rendertarget(mesh);\n // We could also clean up instancebuffer value here, however, it does not matter for this effect since it will be overwritten if outline would be enabled again.\n }\n set_global_outline_color(color) {\n if (this.is_disposed) {\n console.error('Trying to call set_global_outline_color on disposed outline layer');\n return;\n }\n if (color === undefined) {\n color = DEFAULT_OUTLINE_COLOR;\n }\n this._default_outline_color = color;\n this.rebuild_color_list();\n this.mark_outlines_dirty();\n }\n set_global_outline_width(width) {\n this._default_outline_width = width;\n this.mark_outlines_dirty();\n }\n get_global_outline_width() {\n return this._default_outline_width;\n }\n set_object_outline_width(object, width) {\n object.mesh_iterator(false, mesh => {\n if (width !== null) {\n this._mesh_uid_to_outline_width.set(mesh.uniqueId, width);\n }\n else {\n this._mesh_uid_to_outline_width.delete(mesh.uniqueId);\n }\n });\n this.rebuild_color_list();\n this.mark_outlines_dirty();\n }\n get_global_outline_color() {\n if (this.is_disposed) {\n console.error('Trying to call get_global_outline_color on disposed outline layer');\n return new BABYLON_Color4(Number.NaN, Number.NaN, Number.NaN, Number.NaN);\n }\n return this._default_outline_color;\n }\n set_object_outline_color(object, color) {\n if (this.is_disposed) {\n console.error('Trying to call set_object_outline_color on disposed outline layer');\n return;\n }\n object.mesh_iterator(false, mesh => {\n if (color) {\n this._mesh_uid_to_outline_color.set(mesh.uniqueId, color);\n }\n else {\n this._mesh_uid_to_outline_color.delete(mesh.uniqueId);\n }\n });\n this.rebuild_color_list();\n this.mark_outlines_dirty();\n }\n rebuild_color_list() {\n var _a;\n this._outline_colors.length = 0;\n this._mesh_uid_to_outline_color_id.clear();\n // Set default color to index '0'\n this._outline_colors.push(this._default_outline_color);\n for (const mesh of (_a = this._render_list) !== null && _a !== void 0 ? _a : []) {\n // Check if we have stored outline info\n const color = this._mesh_uid_to_outline_color.get(mesh.uniqueId);\n if (color) {\n const outline_color = color !== null && color !== void 0 ? color : this._default_outline_color;\n // Find closest color4 stored\n let index = this._outline_colors.findIndex((color) => (Math.abs(color.r - outline_color.r) < 0.001 &&\n Math.abs(color.g - outline_color.g) < 0.001 &&\n Math.abs(color.b - outline_color.b) < 0.001 &&\n Math.abs(color.a - outline_color.a) < 0.001));\n if (index < 0) {\n // Add new color if not found\n index = this._outline_colors.push(outline_color) - 1;\n }\n // Store the index for this mesh\n this._mesh_uid_to_outline_color_id.set(mesh.uniqueId, index);\n }\n }\n }\n}\n/**\n * The name of the instancing attribute we use to pass outline data to the shader.\n * If the name is changed here, it must be updated in the outline vertex shader as well.\n */\nOutlineLayer.INSTANCE_DATA_ATTRIBUTE_NAME = 'outline_instance_data';\nOutlineLayer.INSTANCE_DATA_ATTRIBUTE_STRIDE = 4;\nfunction remap(value, old_min, old_max, new_min, new_max) {\n return (value - old_min) / (old_max - old_min) * (new_max - new_min) + new_min;\n}\n//# sourceMappingURL=OutlineEffect.js.map","import { Mesh as BABYLON_Mesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js';\nimport { VertexData as BABYLON_VertexData } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.vertexData.js';\nimport { LineType, IVector3, IBoundingBox } from '../api.js';\nimport { Engine as BABYLON_Engine } from '@inter-ikea-betrakta-babylonjs/core/Engines/engine.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { PBRMaterial as BABYLON_PBRMaterial } from '@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js';\nimport { RenderingGroupID } from './Viewer.js';\nimport { RenderLayerMask } from './RenderLayer.js';\n// The number of array elements we need to store vertecies, colour and indecies.\nconst NUMBER_OF_SIDES = 8;\nconst POSITIONS_PER_LINE = 2 * NUMBER_OF_SIDES * 3 + 2 * 3; // (2 vertices per side + 2 cap vertices) * 3 floats per vertex.\nconst COLORS_PER_LINE = 2 * NUMBER_OF_SIDES * 4 + 2 * 4; // - || - but 4 floats per vertex color.\nconst INDICES_PER_LINE = (2 * NUMBER_OF_SIDES + 2 * NUMBER_OF_SIDES) * 3; // 2 triangles for the sides, 2 triangles for each end of the caps, 3 indices per triangle\n/**\n * The line manager handles the creation and updating of the line mesh. The line mesh consists\n * of all lines in the scene (one drawcall). Lines are created as cylinders and can be either solid (one cylinder/sublineline)\n * or dashed (several cylinders/sublines).\n */\n// NOTE: The LineManager only ever expands the size of the internal storages for the mesh containing all lines.\n// So creating a ton of lines and then removing them would result in a lot of unused memory being blocked.\n// This is unlikely (as we don't expect users to ever have large number of lines) to be a practical issue but still important to be aware of.\nexport class LineManager {\n constructor(_viewer, render_layer, draw_on_top) {\n this._viewer = _viewer;\n this.render_layer = render_layer;\n this.draw_on_top = draw_on_top;\n this._dirty = false;\n this._number_of_lines_buffered = 0;\n this._line_id_to_line = new Map(); // This solution relies on insertion order. Line ids will increase as the map grows.\n this._line_to_subline_count = new Map();\n this._cos_and_sin_angles = new Array(); // The lines are built by using cylinders, defined by cos and sin theta angles\n this._vertex_data = new BABYLON_VertexData();\n this._mesh = new BABYLON_Mesh('custom_lines', this._viewer.scene); // We use one mesh for all lines\n for (let i = 0; i < NUMBER_OF_SIDES; i++) {\n this._cos_and_sin_angles.push([Math.cos(2.0 * Math.PI * (i / NUMBER_OF_SIDES)), Math.sin(2.0 * Math.PI * (i / NUMBER_OF_SIDES))]);\n }\n // Create a unlit material, so that the lines appear 2D (without depth), even though we draw them in 3D.\n // Changed from StandardMaterial (emissive and disabled lighting) to use PBR, as most other objects are drawn using PBR.\n this._material = new BABYLON_PBRMaterial('lines_mat', this._viewer.scene);\n this._material.unlit = true;\n this._material.depthFunction = this.draw_on_top ? BABYLON_Engine.ALWAYS : BABYLON_Engine.LESS;\n this._mesh.layerMask = new RenderLayerMask([render_layer]).bitmap;\n this._mesh.material = this._material;\n this._mesh.isPickable = false;\n this._mesh.renderingGroupId = RenderingGroupID.DEFAULT_RENDERING_GROUP;\n }\n new_line_id() {\n return LineManager._line_id_counter++;\n }\n dirty() {\n this._dirty = true;\n // rebuild_if_dirty is called from the render loop, so we need to make sure\n // the scene is dirty as well so we actually render.\n this._viewer.mark_scene_dirty();\n this._viewer.mark_world_bounds_dirty();\n }\n static calculate_number_of_sub_lines(api_line) {\n if (api_line.type === LineType.SOLID) {\n return 1; // Solid line means one line\n }\n let sub_line_count = 0;\n const length = api_line.p0.subtract(api_line.p1).length();\n const dash_frequency = api_line.thickness * 4.0; // Magic number\n sub_line_count = Math.ceil(length / dash_frequency);\n if (sub_line_count % 2 === 0) {\n sub_line_count += 1;\n }\n return sub_line_count;\n }\n get_mesh() {\n return this._mesh;\n }\n rebuild_if_dirty() {\n if (!this._dirty) {\n return;\n }\n // We need to know how many lines we need to account for due to sublines when building our data arrays\n let number_of_lines = 0;\n this._line_to_subline_count.clear();\n for (const line of this._line_id_to_line.values()) {\n if (!line.is_visible) {\n continue;\n }\n const sub_line_count = line.is_visible ? LineManager.calculate_number_of_sub_lines(line) : 0;\n number_of_lines += sub_line_count;\n this._line_to_subline_count.set(line, sub_line_count);\n }\n // If we're not rendering any lines, and we don't have any \"active\" lines from before, we can (and need to) early out.\n if (number_of_lines === 0 && this._number_of_lines_buffered === 0) {\n return;\n }\n // Create new buffers if needed\n if (number_of_lines > this._number_of_lines_buffered) {\n this._vertex_data.positions = new Float32Array(number_of_lines * POSITIONS_PER_LINE);\n this._vertex_data.colors = new Float32Array(number_of_lines * COLORS_PER_LINE);\n this._vertex_data.indices = new Uint32Array(number_of_lines * INDICES_PER_LINE);\n this._number_of_lines_buffered = number_of_lines;\n }\n const { positions, colors, indices } = this._vertex_data;\n // VertexData props can be number[] | Float32Array | Uint32Array. Since initiation is optional, we need to verify that correct instances were created\n const vertex_data_initialized = positions instanceof Float32Array && colors instanceof Float32Array && indices instanceof Uint32Array;\n if (!vertex_data_initialized) {\n throw new Error('VertexData buffers are not correctly initialized');\n }\n // Fill index data with 0. We might have removed or hidden lines.\n indices.fill(0, 0);\n this.populate_buffers(positions, colors, indices);\n // Only send the subarray of used indices\n const used_indices = indices.subarray(0, number_of_lines * INDICES_PER_LINE);\n this._vertex_data.indices = used_indices;\n // Babylon will create new buffers for this. So the moment we make a change, we will create new buffers.\n this._vertex_data.applyToMesh(this._mesh); // positions, colors and indices are applied to mesh\n this._mesh.setEnabled(this._vertex_data.indices.length !== 0); // Disable mesh when it is empty to avoid gl errors.\n // Reset to the original index array\n this._vertex_data.indices = indices;\n this._dirty = false;\n }\n populate_buffers(positions, colors, indices) {\n // Set the start indecies of the buffers\n let current_position = 0;\n let current_color = 0;\n let current_index = 0;\n let line_index = 0;\n for (const line of this._line_id_to_line.values()) {\n if (!line.is_visible) {\n continue;\n }\n const p0p1 = line.p1.subtract(line.p0);\n const tangent = p0p1.normalizeToNew();\n const perp = IVector3.perpendicular(tangent);\n const normal = new BABYLON_Vector3(perp.x, perp.y, perp.z).normalize();\n const binormal = tangent.cross(normal);\n const radius = line.thickness * 0.5;\n const sub_lines_needed = this._line_to_subline_count.get(line);\n line.sub_lines = 0;\n for (let sub_line_index = 0; sub_line_index < sub_lines_needed; sub_line_index++) {\n if (sub_line_index % 2 === 0) {\n const sub_line_p0 = BABYLON_Vector3.Lerp(line.p0, line.p1, sub_line_index / sub_lines_needed);\n const sub_line_p1 = BABYLON_Vector3.Lerp(line.p0, line.p1, (sub_line_index + 1) / sub_lines_needed);\n for (let i = 0; i < 2; i++) {\n const lerped_position = BABYLON_Vector3.Lerp(sub_line_p0, sub_line_p1, i);\n // Loop though all sides of the cylinder\n for (let side = 0; side < NUMBER_OF_SIDES; side++) {\n // We calculate the position offset of the vertex for this side\n const cos_theta = this._cos_and_sin_angles[side][0];\n const sin_theta = this._cos_and_sin_angles[side][1];\n const offset = normal.scale(cos_theta).addInPlace(binormal.scale(sin_theta)).scaleInPlace(radius);\n positions[current_position++] = lerped_position.x + offset.x;\n positions[current_position++] = lerped_position.y + offset.y;\n positions[current_position++] = lerped_position.z + offset.z;\n colors[current_color++] = line.color.r;\n colors[current_color++] = line.color.g;\n colors[current_color++] = line.color.b;\n colors[current_color++] = line.color.a;\n }\n positions[current_position++] = lerped_position.x;\n positions[current_position++] = lerped_position.y;\n positions[current_position++] = lerped_position.z;\n colors[current_color++] = line.color.r;\n colors[current_color++] = line.color.g;\n colors[current_color++] = line.color.b;\n colors[current_color++] = line.color.a;\n }\n const start_cap_index = line_index + NUMBER_OF_SIDES;\n const end_cap_index = start_cap_index + NUMBER_OF_SIDES + 1;\n // Push all the indices\n const previous_loop_first_index = line_index;\n const next_loop_first_index = line_index + NUMBER_OF_SIDES + 1;\n for (let i = 0; i < NUMBER_OF_SIDES; i++) {\n const top_left_index = previous_loop_first_index + i;\n const bottom_left_index = previous_loop_first_index + (i + 1) % NUMBER_OF_SIDES;\n const top_right_index = next_loop_first_index + i;\n const bottom_right_index = next_loop_first_index + (i + 1) % NUMBER_OF_SIDES;\n // Side quad\n indices[current_index++] = bottom_left_index;\n indices[current_index++] = top_left_index;\n indices[current_index++] = top_right_index;\n indices[current_index++] = top_right_index;\n indices[current_index++] = bottom_right_index;\n indices[current_index++] = bottom_left_index;\n // start cap\n indices[current_index++] = top_left_index;\n indices[current_index++] = bottom_left_index;\n indices[current_index++] = start_cap_index;\n // end cap\n indices[current_index++] = bottom_right_index;\n indices[current_index++] = top_right_index;\n indices[current_index++] = end_cap_index;\n }\n line_index = end_cap_index + 1;\n line.sub_lines++;\n }\n }\n }\n }\n create_line(type, p0, p1, color, thickness) {\n const id = this.new_line_id();\n this._line_id_to_line.set(id, {\n sub_lines: 0,\n type: type,\n id: id,\n p0: p0,\n p1: p1,\n color: color.toLinearSpace(),\n thickness: thickness,\n is_visible: true\n });\n this.dirty();\n return id;\n }\n update_line(line_id, p0, p1, color, thickness) {\n let dirty = false;\n const line = this._line_id_to_line.get(line_id);\n if (line === undefined) {\n console.warn('Cannot update line. Line with line id', line_id, 'does not exist.');\n return;\n }\n if (p0 && !line.p0.equals(p0)) {\n line.p0 = p0;\n dirty = true;\n }\n if (p1 && !line.p1.equals(p1)) {\n line.p1 = p1;\n dirty = true;\n }\n if (color && !line.color.equals(color)) {\n line.color = color.toLinearSpace();\n dirty = true;\n }\n if (thickness !== undefined && line.thickness !== thickness) {\n line.thickness = thickness;\n dirty = true;\n }\n if (dirty) {\n this.dirty();\n }\n }\n get_bounds() {\n const lines = this._line_id_to_line.values();\n const bound = IBoundingBox.Invalid();\n for (const line of lines) {\n const line_bound = IBoundingBox.Invalid();\n IBoundingBox.encapsulate_in_place(line_bound, line.p0, line.p1);\n // To make things easy, we just increase the bounds size with the lines thickness.\n // Not so nice, but it works.\n line_bound.min.x -= line.thickness;\n line_bound.min.y -= line.thickness;\n line_bound.min.z -= line.thickness;\n line_bound.max.x += line.thickness;\n line_bound.max.y += line.thickness;\n line_bound.max.z += line.thickness;\n IBoundingBox.encapsulate_in_place(bound, line_bound.min, line_bound.max);\n }\n return bound;\n }\n set_visible(line_id, line_visible) {\n const line = this._line_id_to_line.get(line_id);\n if (line === undefined) {\n console.warn('Cannot set line visibility. Line with line id', line_id, 'does not exist.');\n return;\n }\n if (line.is_visible !== line_visible) {\n line.is_visible = line_visible;\n this.dirty();\n }\n }\n get_visible(line_id) {\n const line = this._line_id_to_line.get(line_id);\n return !!(line === null || line === void 0 ? void 0 : line.is_visible);\n }\n remove_line(line_id) {\n const line = this._line_id_to_line.get(line_id);\n if (line === undefined) {\n // Trying to delete a line that does not exist.\n return false;\n }\n this._line_id_to_line.delete(line_id);\n this.dirty();\n return true;\n }\n contains(line_id) {\n return this._line_id_to_line.has(line_id);\n }\n}\nLineManager._line_id_counter = 1;\n//# sourceMappingURL=LineManager.js.map","import { TmpVectors } from \"../../Maths/math.vector.js\";\nimport { Mesh, _CreationDataStorage } from \"../mesh.js\";\nimport { VertexBuffer } from \"../../Buffers/buffer.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Creates the VertexData for a Ribbon\n * @param options an object used to set the following optional parameters for the ribbon, required but can be empty\n * * pathArray array of paths, each of which an array of successive Vector3\n * * closeArray creates a seam between the first and the last paths of the pathArray, optional, default false\n * * closePath creates a seam between the first and the last points of each path of the path array, optional, default false\n * * offset a positive integer, only used when pathArray contains a single path (offset = 10 means the point 1 is joined to the point 11), default rounded half size of the pathArray length\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * * invertUV swaps in the U and V coordinates when applying a texture, optional, default false\n * * uvs a linear array, of length 2 * number of vertices, of custom UV values, optional\n * * colors a linear array, of length 4 * number of vertices, of custom color values, optional\n * @param options.pathArray\n * @param options.closeArray\n * @param options.closePath\n * @param options.offset\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.invertUV\n * @param options.uvs\n * @param options.colors\n * @returns the VertexData of the ribbon\n */\nexport function CreateRibbonVertexData(options) {\n let pathArray = options.pathArray;\n const closeArray = options.closeArray || false;\n const closePath = options.closePath || false;\n const invertUV = options.invertUV || false;\n const defaultOffset = Math.floor(pathArray[0].length / 2);\n let offset = options.offset || defaultOffset;\n offset = offset > defaultOffset ? defaultOffset : Math.floor(offset); // offset max allowed : defaultOffset\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n const customUV = options.uvs;\n const customColors = options.colors;\n const positions = [];\n const indices = [];\n const normals = [];\n const uvs = [];\n const us = []; // us[path_id] = [uDist1, uDist2, uDist3 ... ] distances between points on path path_id\n const vs = []; // vs[i] = [vDist1, vDist2, vDist3, ... ] distances between points i of consecutive paths from pathArray\n const uTotalDistance = []; // uTotalDistance[p] : total distance of path p\n const vTotalDistance = []; // vTotalDistance[i] : total distance between points i of first and last path from pathArray\n let minlg; // minimal length among all paths from pathArray\n const lg = []; // array of path lengths : nb of vertex per path\n const idx = []; // array of path indexes : index of each path (first vertex) in the total vertex number\n let p; // path iterator\n let i; // point iterator\n let j; // point iterator\n // if single path in pathArray\n if (pathArray.length < 2) {\n const ar1 = [];\n const ar2 = [];\n for (i = 0; i < pathArray[0].length - offset; i++) {\n ar1.push(pathArray[0][i]);\n ar2.push(pathArray[0][i + offset]);\n }\n pathArray = [ar1, ar2];\n }\n // positions and horizontal distances (u)\n let idc = 0;\n const closePathCorr = closePath ? 1 : 0; // the final index will be +1 if closePath\n let path;\n let l;\n minlg = pathArray[0].length;\n let vectlg;\n let dist;\n for (p = 0; p < pathArray.length; p++) {\n uTotalDistance[p] = 0;\n us[p] = [0];\n path = pathArray[p];\n l = path.length;\n minlg = minlg < l ? minlg : l;\n j = 0;\n while (j < l) {\n positions.push(path[j].x, path[j].y, path[j].z);\n if (j > 0) {\n vectlg = path[j].subtract(path[j - 1]).length();\n dist = vectlg + uTotalDistance[p];\n us[p].push(dist);\n uTotalDistance[p] = dist;\n }\n j++;\n }\n if (closePath) {\n // an extra hidden vertex is added in the \"positions\" array\n j--;\n positions.push(path[0].x, path[0].y, path[0].z);\n vectlg = path[j].subtract(path[0]).length();\n dist = vectlg + uTotalDistance[p];\n us[p].push(dist);\n uTotalDistance[p] = dist;\n }\n lg[p] = l + closePathCorr;\n idx[p] = idc;\n idc += l + closePathCorr;\n }\n // vertical distances (v)\n let path1;\n let path2;\n let vertex1 = null;\n let vertex2 = null;\n for (i = 0; i < minlg + closePathCorr; i++) {\n vTotalDistance[i] = 0;\n vs[i] = [0];\n for (p = 0; p < pathArray.length - 1; p++) {\n path1 = pathArray[p];\n path2 = pathArray[p + 1];\n if (i === minlg) {\n // closePath\n vertex1 = path1[0];\n vertex2 = path2[0];\n }\n else {\n vertex1 = path1[i];\n vertex2 = path2[i];\n }\n vectlg = vertex2.subtract(vertex1).length();\n dist = vectlg + vTotalDistance[i];\n vs[i].push(dist);\n vTotalDistance[i] = dist;\n }\n if (closeArray && vertex2 && vertex1) {\n path1 = pathArray[p];\n path2 = pathArray[0];\n if (i === minlg) {\n // closePath\n vertex2 = path2[0];\n }\n vectlg = vertex2.subtract(vertex1).length();\n dist = vectlg + vTotalDistance[i];\n vTotalDistance[i] = dist;\n }\n }\n // uvs\n let u;\n let v;\n if (customUV) {\n for (p = 0; p < customUV.length; p++) {\n uvs.push(customUV[p].x, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - customUV[p].y : customUV[p].y);\n }\n }\n else {\n for (p = 0; p < pathArray.length; p++) {\n for (i = 0; i < minlg + closePathCorr; i++) {\n u = uTotalDistance[p] != 0.0 ? us[p][i] / uTotalDistance[p] : 0.0;\n v = vTotalDistance[i] != 0.0 ? vs[i][p] / vTotalDistance[i] : 0.0;\n if (invertUV) {\n uvs.push(v, u);\n }\n else {\n uvs.push(u, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - v : v);\n }\n }\n }\n }\n // indices\n p = 0; // path index\n let pi = 0; // positions array index\n let l1 = lg[p] - 1; // path1 length\n let l2 = lg[p + 1] - 1; // path2 length\n let min = l1 < l2 ? l1 : l2; // current path stop index\n let shft = idx[1] - idx[0]; // shift\n const path1nb = closeArray ? lg.length : lg.length - 1; // number of path1 to iterate\ton\n while (pi <= min && p < path1nb) {\n // stay under min and don't go over next to last path\n // draw two triangles between path1 (p1) and path2 (p2) : (p1.pi, p2.pi, p1.pi+1) and (p2.pi+1, p1.pi+1, p2.pi) clockwise\n indices.push(pi, pi + shft, pi + 1);\n indices.push(pi + shft + 1, pi + 1, pi + shft);\n pi += 1;\n if (pi === min) {\n // if end of one of two consecutive paths reached, go to next existing path\n p++;\n if (p === lg.length - 1) {\n // last path of pathArray reached <=> closeArray == true\n shft = idx[0] - idx[p];\n l1 = lg[p] - 1;\n l2 = lg[0] - 1;\n }\n else {\n shft = idx[p + 1] - idx[p];\n l1 = lg[p] - 1;\n l2 = lg[p + 1] - 1;\n }\n pi = idx[p];\n min = l1 < l2 ? l1 + pi : l2 + pi;\n }\n }\n // normals\n VertexData.ComputeNormals(positions, indices, normals);\n if (closePath) {\n // update both the first and last vertex normals to their average value\n let indexFirst = 0;\n let indexLast = 0;\n for (p = 0; p < pathArray.length; p++) {\n indexFirst = idx[p] * 3;\n if (p + 1 < pathArray.length) {\n indexLast = (idx[p + 1] - 1) * 3;\n }\n else {\n indexLast = normals.length - 3;\n }\n normals[indexFirst] = (normals[indexFirst] + normals[indexLast]) * 0.5;\n normals[indexFirst + 1] = (normals[indexFirst + 1] + normals[indexLast + 1]) * 0.5;\n normals[indexFirst + 2] = (normals[indexFirst + 2] + normals[indexLast + 2]) * 0.5;\n normals[indexLast] = normals[indexFirst];\n normals[indexLast + 1] = normals[indexFirst + 1];\n normals[indexLast + 2] = normals[indexFirst + 2];\n }\n }\n // sides\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, options.frontUVs, options.backUVs);\n // Colors\n let colors = null;\n if (customColors) {\n colors = new Float32Array(customColors.length * 4);\n for (let c = 0; c < customColors.length; c++) {\n colors[c * 4] = customColors[c].r;\n colors[c * 4 + 1] = customColors[c].g;\n colors[c * 4 + 2] = customColors[c].b;\n colors[c * 4 + 3] = customColors[c].a;\n }\n }\n // Result\n const vertexData = new VertexData();\n const positions32 = new Float32Array(positions);\n const normals32 = new Float32Array(normals);\n const uvs32 = new Float32Array(uvs);\n vertexData.indices = indices;\n vertexData.positions = positions32;\n vertexData.normals = normals32;\n vertexData.uvs = uvs32;\n if (colors) {\n vertexData.set(colors, VertexBuffer.ColorKind);\n }\n if (closePath) {\n vertexData._idx = idx;\n }\n return vertexData;\n}\n/**\n * Creates a ribbon mesh. The ribbon is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters\n * * The parameter `pathArray` is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry\n * * The parameter `closeArray` (boolean, default false) creates a seam between the first and the last paths of the path array\n * * The parameter `closePath` (boolean, default false) creates a seam between the first and the last points of each path of the path array\n * * The parameter `offset` (positive integer, default : rounded half size of the pathArray length), is taken in account only if the `pathArray` is containing a single path\n * * It's the offset to join the points from the same path. Ex : offset = 10 means the point 1 is joined to the point 11\n * * The optional parameter `instance` is an instance of an existing Ribbon object to be updated with the passed `pathArray` parameter : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#ribbon\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture\n * * The parameter `uvs` is an optional flat array of `Vector2` to update/set each ribbon vertex with its own custom UV values instead of the computed ones\n * * The parameters `colors` is an optional flat array of `Color4` to set/update each ribbon vertex with its own custom color values\n * * Note that if you use the parameters `uvs` or `colors`, the passed arrays must be populated with the right number of elements, it is to say the number of ribbon vertices. Remember that if you set `closePath` to `true`, there's one extra vertex per path in the geometry\n * * Moreover, you can use the parameter `color` with `instance` (to update the ribbon), only if you previously used it at creation time\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.pathArray\n * @param options.closeArray\n * @param options.closePath\n * @param options.offset\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.instance\n * @param options.invertUV\n * @param options.uvs\n * @param options.colors\n * @param scene defines the hosting scene\n * @returns the ribbon mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/ribbon_extra\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n */\nexport function CreateRibbon(name, options, scene = null) {\n const pathArray = options.pathArray;\n const closeArray = options.closeArray;\n const closePath = options.closePath;\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n const instance = options.instance;\n const updatable = options.updatable;\n if (instance) {\n // existing ribbon instance update\n // positionFunction : ribbon case\n // only pathArray and sideOrientation parameters are taken into account for positions update\n const minimum = TmpVectors.Vector3[0].setAll(Number.MAX_VALUE);\n const maximum = TmpVectors.Vector3[1].setAll(-Number.MAX_VALUE);\n const positionFunction = (positions) => {\n let minlg = pathArray[0].length;\n const mesh = instance;\n let i = 0;\n const ns = mesh._originalBuilderSideOrientation === Mesh.DOUBLESIDE ? 2 : 1;\n for (let si = 1; si <= ns; ++si) {\n for (let p = 0; p < pathArray.length; ++p) {\n const path = pathArray[p];\n const l = path.length;\n minlg = minlg < l ? minlg : l;\n for (let j = 0; j < minlg; ++j) {\n const pathPoint = path[j];\n positions[i] = pathPoint.x;\n positions[i + 1] = pathPoint.y;\n positions[i + 2] = pathPoint.z;\n minimum.minimizeInPlaceFromFloats(pathPoint.x, pathPoint.y, pathPoint.z);\n maximum.maximizeInPlaceFromFloats(pathPoint.x, pathPoint.y, pathPoint.z);\n i += 3;\n }\n if (mesh._creationDataStorage && mesh._creationDataStorage.closePath) {\n const pathPoint = path[0];\n positions[i] = pathPoint.x;\n positions[i + 1] = pathPoint.y;\n positions[i + 2] = pathPoint.z;\n i += 3;\n }\n }\n }\n };\n const positions = instance.getVerticesData(VertexBuffer.PositionKind);\n positionFunction(positions);\n if (instance.hasBoundingInfo) {\n instance.getBoundingInfo().reConstruct(minimum, maximum, instance._worldMatrix);\n }\n else {\n instance.buildBoundingInfo(minimum, maximum, instance._worldMatrix);\n }\n instance.updateVerticesData(VertexBuffer.PositionKind, positions, false, false);\n if (options.colors) {\n const colors = instance.getVerticesData(VertexBuffer.ColorKind);\n for (let c = 0, colorIndex = 0; c < options.colors.length; c++, colorIndex += 4) {\n const color = options.colors[c];\n colors[colorIndex] = color.r;\n colors[colorIndex + 1] = color.g;\n colors[colorIndex + 2] = color.b;\n colors[colorIndex + 3] = color.a;\n }\n instance.updateVerticesData(VertexBuffer.ColorKind, colors, false, false);\n }\n if (options.uvs) {\n const uvs = instance.getVerticesData(VertexBuffer.UVKind);\n for (let i = 0; i < options.uvs.length; i++) {\n uvs[i * 2] = options.uvs[i].x;\n uvs[i * 2 + 1] = CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - options.uvs[i].y : options.uvs[i].y;\n }\n instance.updateVerticesData(VertexBuffer.UVKind, uvs, false, false);\n }\n if (!instance.areNormalsFrozen || instance.isFacetDataEnabled) {\n const indices = instance.getIndices();\n const normals = instance.getVerticesData(VertexBuffer.NormalKind);\n const params = instance.isFacetDataEnabled ? instance.getFacetDataParameters() : null;\n VertexData.ComputeNormals(positions, indices, normals, params);\n if (instance._creationDataStorage && instance._creationDataStorage.closePath) {\n let indexFirst = 0;\n let indexLast = 0;\n for (let p = 0; p < pathArray.length; p++) {\n indexFirst = instance._creationDataStorage.idx[p] * 3;\n if (p + 1 < pathArray.length) {\n indexLast = (instance._creationDataStorage.idx[p + 1] - 1) * 3;\n }\n else {\n indexLast = normals.length - 3;\n }\n normals[indexFirst] = (normals[indexFirst] + normals[indexLast]) * 0.5;\n normals[indexFirst + 1] = (normals[indexFirst + 1] + normals[indexLast + 1]) * 0.5;\n normals[indexFirst + 2] = (normals[indexFirst + 2] + normals[indexLast + 2]) * 0.5;\n normals[indexLast] = normals[indexFirst];\n normals[indexLast + 1] = normals[indexFirst + 1];\n normals[indexLast + 2] = normals[indexFirst + 2];\n }\n }\n if (!instance.areNormalsFrozen) {\n instance.updateVerticesData(VertexBuffer.NormalKind, normals, false, false);\n }\n }\n return instance;\n }\n else {\n // new ribbon creation\n const ribbon = new Mesh(name, scene);\n ribbon._originalBuilderSideOrientation = sideOrientation;\n ribbon._creationDataStorage = new _CreationDataStorage();\n const vertexData = CreateRibbonVertexData(options);\n if (closePath) {\n ribbon._creationDataStorage.idx = vertexData._idx;\n }\n ribbon._creationDataStorage.closePath = closePath;\n ribbon._creationDataStorage.closeArray = closeArray;\n vertexData.applyToMesh(ribbon, updatable);\n return ribbon;\n }\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use CreateRibbon directly\n */\nexport const RibbonBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateRibbon,\n};\nVertexData.CreateRibbon = CreateRibbonVertexData;\nMesh.CreateRibbon = (name, pathArray, closeArray = false, closePath, offset, scene, updatable = false, sideOrientation, instance) => {\n return CreateRibbon(name, {\n pathArray: pathArray,\n closeArray: closeArray,\n closePath: closePath,\n offset: offset,\n updatable: updatable,\n sideOrientation: sideOrientation,\n instance: instance,\n }, scene);\n};\n//# sourceMappingURL=ribbonBuilder.js.map","import { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Creates the VertexData of the Disc or regular Polygon\n * @param options an object used to set the following optional parameters for the disc, required but can be empty\n * * radius the radius of the disc, optional default 0.5\n * * tessellation the number of polygon sides, optional, default 64\n * * arc a number from 0 to 1, to create an unclosed polygon based on the fraction of the circumference given by the arc value, optional, default 1\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.radius\n * @param options.tessellation\n * @param options.arc\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the box\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function CreateDiscVertexData(options) {\n const positions = [];\n const indices = [];\n const normals = [];\n const uvs = [];\n const radius = options.radius || 0.5;\n const tessellation = options.tessellation || 64;\n const arc = options.arc && (options.arc <= 0 || options.arc > 1) ? 1.0 : options.arc || 1.0;\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n // positions and uvs\n positions.push(0, 0, 0); // disc center first\n uvs.push(0.5, 0.5);\n const theta = Math.PI * 2 * arc;\n const step = arc === 1 ? theta / tessellation : theta / (tessellation - 1);\n let a = 0;\n for (let t = 0; t < tessellation; t++) {\n const x = Math.cos(a);\n const y = Math.sin(a);\n const u = (x + 1) / 2;\n const v = (1 - y) / 2;\n positions.push(radius * x, radius * y, 0);\n uvs.push(u, CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - v : v);\n a += step;\n }\n if (arc === 1) {\n positions.push(positions[3], positions[4], positions[5]); // close the circle\n uvs.push(uvs[2], CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - uvs[3] : uvs[3]);\n }\n //indices\n const vertexNb = positions.length / 3;\n for (let i = 1; i < vertexNb - 1; i++) {\n indices.push(i + 1, 0, i);\n }\n // result\n VertexData.ComputeNormals(positions, indices, normals);\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, options.frontUVs, options.backUVs);\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n return vertexData;\n}\n/**\n * Creates a plane polygonal mesh. By default, this is a disc\n * * The parameter `radius` sets the radius size (float) of the polygon (default 0.5)\n * * The parameter `tessellation` sets the number of polygon sides (positive integer, default 64). So a tessellation valued to 3 will build a triangle, to 4 a square, etc\n * * You can create an unclosed polygon with the parameter `arc` (positive float, default 1), valued between 0 and 1, what is the ratio of the circumference : 2 x PI x ratio\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.radius\n * @param options.tessellation\n * @param options.arc\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param scene defines the hosting scene\n * @returns the plane polygonal mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#disc-or-regular-polygon\n */\nexport function CreateDisc(name, options = {}, scene = null) {\n const disc = new Mesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n disc._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreateDiscVertexData(options);\n vertexData.applyToMesh(disc, options.updatable);\n return disc;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated please use CreateDisc directly\n */\nexport const DiscBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateDisc,\n};\nVertexData.CreateDisc = CreateDiscVertexData;\nMesh.CreateDisc = (name, radius, tessellation, scene = null, updatable, sideOrientation) => {\n const options = {\n radius,\n tessellation,\n sideOrientation,\n updatable,\n };\n return CreateDisc(name, options, scene);\n};\n//# sourceMappingURL=discBuilder.js.map","import { Vector3, Vector2, TmpVectors, Vector4 } from \"../Maths/math.vector.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { Mesh } from \"../Meshes/mesh.js\";\nMesh._GroundMeshParser = (parsedMesh, scene) => {\n return GroundMesh.Parse(parsedMesh, scene);\n};\n/**\n * Mesh representing the ground\n */\nexport class GroundMesh extends Mesh {\n constructor(name, scene) {\n super(name, scene);\n /** If octree should be generated */\n this.generateOctree = false;\n }\n /**\n * \"GroundMesh\"\n * @returns \"GroundMesh\"\n */\n getClassName() {\n return \"GroundMesh\";\n }\n /**\n * The minimum of x and y subdivisions\n */\n get subdivisions() {\n return Math.min(this._subdivisionsX, this._subdivisionsY);\n }\n /**\n * X subdivisions\n */\n get subdivisionsX() {\n return this._subdivisionsX;\n }\n /**\n * Y subdivisions\n */\n get subdivisionsY() {\n return this._subdivisionsY;\n }\n /**\n * This function will divide the mesh into submeshes and update an octree to help to select the right submeshes\n * for rendering, picking and collision computations. Please note that you must have a decent number of submeshes\n * to get performance improvements when using an octree.\n * @param chunksCount the number of submeshes the mesh will be divided into\n * @param octreeBlocksSize the maximum size of the octree blocks (Default: 32)\n */\n optimize(chunksCount, octreeBlocksSize = 32) {\n this._subdivisionsX = chunksCount;\n this._subdivisionsY = chunksCount;\n this.subdivide(chunksCount);\n // Call the octree system optimization if it is defined.\n const thisAsAny = this;\n if (thisAsAny.createOrUpdateSubmeshesOctree) {\n thisAsAny.createOrUpdateSubmeshesOctree(octreeBlocksSize);\n }\n }\n /**\n * Returns a height (y) value in the World system :\n * the ground altitude at the coordinates (x, z) expressed in the World system.\n * @param x x coordinate\n * @param z z coordinate\n * @returns the ground y position if (x, z) are outside the ground surface.\n */\n getHeightAtCoordinates(x, z) {\n const world = this.getWorldMatrix();\n const invMat = TmpVectors.Matrix[5];\n world.invertToRef(invMat);\n const tmpVect = TmpVectors.Vector3[8];\n Vector3.TransformCoordinatesFromFloatsToRef(x, 0.0, z, invMat, tmpVect); // transform x,z in the mesh local space\n x = tmpVect.x;\n z = tmpVect.z;\n if (x < this._minX || x >= this._maxX || z <= this._minZ || z > this._maxZ) {\n return this.position.y;\n }\n if (!this._heightQuads || this._heightQuads.length == 0) {\n this._initHeightQuads();\n this._computeHeightQuads();\n }\n const facet = this._getFacetAt(x, z);\n const y = -(facet.x * x + facet.z * z + facet.w) / facet.y;\n // return y in the World system\n Vector3.TransformCoordinatesFromFloatsToRef(0.0, y, 0.0, world, tmpVect);\n return tmpVect.y;\n }\n /**\n * Returns a normalized vector (Vector3) orthogonal to the ground\n * at the ground coordinates (x, z) expressed in the World system.\n * @param x x coordinate\n * @param z z coordinate\n * @returns Vector3(0.0, 1.0, 0.0) if (x, z) are outside the ground surface.\n */\n getNormalAtCoordinates(x, z) {\n const normal = new Vector3(0.0, 1.0, 0.0);\n this.getNormalAtCoordinatesToRef(x, z, normal);\n return normal;\n }\n /**\n * Updates the Vector3 passed a reference with a normalized vector orthogonal to the ground\n * at the ground coordinates (x, z) expressed in the World system.\n * Doesn't update the reference Vector3 if (x, z) are outside the ground surface.\n * @param x x coordinate\n * @param z z coordinate\n * @param ref vector to store the result\n * @returns the GroundMesh.\n */\n getNormalAtCoordinatesToRef(x, z, ref) {\n const world = this.getWorldMatrix();\n const tmpMat = TmpVectors.Matrix[5];\n world.invertToRef(tmpMat);\n const tmpVect = TmpVectors.Vector3[8];\n Vector3.TransformCoordinatesFromFloatsToRef(x, 0.0, z, tmpMat, tmpVect); // transform x,z in the mesh local space\n x = tmpVect.x;\n z = tmpVect.z;\n if (x < this._minX || x > this._maxX || z < this._minZ || z > this._maxZ) {\n return this;\n }\n if (!this._heightQuads || this._heightQuads.length == 0) {\n this._initHeightQuads();\n this._computeHeightQuads();\n }\n const facet = this._getFacetAt(x, z);\n Vector3.TransformNormalFromFloatsToRef(facet.x, facet.y, facet.z, world, ref);\n return this;\n }\n /**\n * Force the heights to be recomputed for getHeightAtCoordinates() or getNormalAtCoordinates()\n * if the ground has been updated.\n * This can be used in the render loop.\n * @returns the GroundMesh.\n */\n updateCoordinateHeights() {\n if (!this._heightQuads || this._heightQuads.length == 0) {\n this._initHeightQuads();\n }\n this._computeHeightQuads();\n return this;\n }\n // Returns the element \"facet\" from the heightQuads array relative to (x, z) local coordinates\n _getFacetAt(x, z) {\n // retrieve col and row from x, z coordinates in the ground local system\n const col = Math.floor(((x + this._maxX) * this._subdivisionsX) / this._width);\n const row = Math.floor((-(z + this._maxZ) * this._subdivisionsY) / this._height + this._subdivisionsY);\n const quad = this._heightQuads[row * this._subdivisionsX + col];\n let facet;\n if (z < quad.slope.x * x + quad.slope.y) {\n facet = quad.facet1;\n }\n else {\n facet = quad.facet2;\n }\n return facet;\n }\n // Creates and populates the heightMap array with \"facet\" elements :\n // a quad is two triangular facets separated by a slope, so a \"facet\" element is 1 slope + 2 facets\n // slope : Vector2(c, h) = 2D diagonal line equation setting apart two triangular facets in a quad : z = cx + h\n // facet1 : Vector4(a, b, c, d) = first facet 3D plane equation : ax + by + cz + d = 0\n // facet2 : Vector4(a, b, c, d) = second facet 3D plane equation : ax + by + cz + d = 0\n // Returns the GroundMesh.\n _initHeightQuads() {\n const subdivisionsX = this._subdivisionsX;\n const subdivisionsY = this._subdivisionsY;\n this._heightQuads = new Array();\n for (let row = 0; row < subdivisionsY; row++) {\n for (let col = 0; col < subdivisionsX; col++) {\n const quad = { slope: Vector2.Zero(), facet1: new Vector4(0.0, 0.0, 0.0, 0.0), facet2: new Vector4(0.0, 0.0, 0.0, 0.0) };\n this._heightQuads[row * subdivisionsX + col] = quad;\n }\n }\n return this;\n }\n // Compute each quad element values and update the heightMap array :\n // slope : Vector2(c, h) = 2D diagonal line equation setting apart two triangular facets in a quad : z = cx + h\n // facet1 : Vector4(a, b, c, d) = first facet 3D plane equation : ax + by + cz + d = 0\n // facet2 : Vector4(a, b, c, d) = second facet 3D plane equation : ax + by + cz + d = 0\n // Returns the GroundMesh.\n _computeHeightQuads() {\n const positions = this.getVerticesData(VertexBuffer.PositionKind);\n if (!positions) {\n return this;\n }\n const v1 = TmpVectors.Vector3[3];\n const v2 = TmpVectors.Vector3[2];\n const v3 = TmpVectors.Vector3[1];\n const v4 = TmpVectors.Vector3[0];\n const v1v2 = TmpVectors.Vector3[4];\n const v1v3 = TmpVectors.Vector3[5];\n const v1v4 = TmpVectors.Vector3[6];\n const norm1 = TmpVectors.Vector3[7];\n const norm2 = TmpVectors.Vector3[8];\n let i = 0;\n let j = 0;\n let k = 0;\n let cd = 0; // 2D slope coefficient : z = cd * x + h\n let h = 0;\n let d1 = 0; // facet plane equation : ax + by + cz + d = 0\n let d2 = 0;\n const subdivisionsX = this._subdivisionsX;\n const subdivisionsY = this._subdivisionsY;\n for (let row = 0; row < subdivisionsY; row++) {\n for (let col = 0; col < subdivisionsX; col++) {\n i = col * 3;\n j = row * (subdivisionsX + 1) * 3;\n k = (row + 1) * (subdivisionsX + 1) * 3;\n v1.x = positions[j + i];\n v1.y = positions[j + i + 1];\n v1.z = positions[j + i + 2];\n v2.x = positions[j + i + 3];\n v2.y = positions[j + i + 4];\n v2.z = positions[j + i + 5];\n v3.x = positions[k + i];\n v3.y = positions[k + i + 1];\n v3.z = positions[k + i + 2];\n v4.x = positions[k + i + 3];\n v4.y = positions[k + i + 4];\n v4.z = positions[k + i + 5];\n // 2D slope V1V4\n cd = (v4.z - v1.z) / (v4.x - v1.x);\n h = v1.z - cd * v1.x; // v1 belongs to the slope\n // facet equations :\n // we compute each facet normal vector\n // the equation of the facet plane is : norm.x * x + norm.y * y + norm.z * z + d = 0\n // we compute the value d by applying the equation to v1 which belongs to the plane\n // then we store the facet equation in a Vector4\n v2.subtractToRef(v1, v1v2);\n v3.subtractToRef(v1, v1v3);\n v4.subtractToRef(v1, v1v4);\n Vector3.CrossToRef(v1v4, v1v3, norm1); // caution : CrossToRef uses the Tmp class\n Vector3.CrossToRef(v1v2, v1v4, norm2);\n norm1.normalize();\n norm2.normalize();\n d1 = -(norm1.x * v1.x + norm1.y * v1.y + norm1.z * v1.z);\n d2 = -(norm2.x * v2.x + norm2.y * v2.y + norm2.z * v2.z);\n const quad = this._heightQuads[row * subdivisionsX + col];\n quad.slope.copyFromFloats(cd, h);\n quad.facet1.copyFromFloats(norm1.x, norm1.y, norm1.z, d1);\n quad.facet2.copyFromFloats(norm2.x, norm2.y, norm2.z, d2);\n }\n }\n return this;\n }\n /**\n * Serializes this ground mesh\n * @param serializationObject object to write serialization to\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n serializationObject.subdivisionsX = this._subdivisionsX;\n serializationObject.subdivisionsY = this._subdivisionsY;\n serializationObject.minX = this._minX;\n serializationObject.maxX = this._maxX;\n serializationObject.minZ = this._minZ;\n serializationObject.maxZ = this._maxZ;\n serializationObject.width = this._width;\n serializationObject.height = this._height;\n }\n /**\n * Parses a serialized ground mesh\n * @param parsedMesh the serialized mesh\n * @param scene the scene to create the ground mesh in\n * @returns the created ground mesh\n */\n static Parse(parsedMesh, scene) {\n const result = new GroundMesh(parsedMesh.name, scene);\n result._subdivisionsX = parsedMesh.subdivisionsX || 1;\n result._subdivisionsY = parsedMesh.subdivisionsY || 1;\n result._minX = parsedMesh.minX;\n result._maxX = parsedMesh.maxX;\n result._minZ = parsedMesh.minZ;\n result._maxZ = parsedMesh.maxZ;\n result._width = parsedMesh.width;\n result._height = parsedMesh.height;\n return result;\n }\n}\n//# sourceMappingURL=groundMesh.js.map","import { Vector3 } from \"../../Maths/math.vector.js\";\nimport { Color3 } from \"../../Maths/math.color.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { GroundMesh } from \"../groundMesh.js\";\nimport { Tools } from \"../../Misc/tools.js\";\nimport { EngineStore } from \"../../Engines/engineStore.js\";\nimport { Epsilon } from \"../../Maths/math.constants.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Creates the VertexData for a Ground\n * @param options an object used to set the following optional parameters for the Ground, required but can be empty\n * - width the width (x direction) of the ground, optional, default 1\n * - height the height (z direction) of the ground, optional, default 1\n * - subdivisions the number of subdivisions per side, optional, default 1\n * @param options.width\n * @param options.height\n * @param options.subdivisions\n * @param options.subdivisionsX\n * @param options.subdivisionsY\n * @returns the VertexData of the Ground\n */\nexport function CreateGroundVertexData(options) {\n const indices = [];\n const positions = [];\n const normals = [];\n const uvs = [];\n let row, col;\n const width = options.width || 1;\n const height = options.height || 1;\n const subdivisionsX = (options.subdivisionsX || options.subdivisions || 1) | 0;\n const subdivisionsY = (options.subdivisionsY || options.subdivisions || 1) | 0;\n for (row = 0; row <= subdivisionsY; row++) {\n for (col = 0; col <= subdivisionsX; col++) {\n const position = new Vector3((col * width) / subdivisionsX - width / 2.0, 0, ((subdivisionsY - row) * height) / subdivisionsY - height / 2.0);\n const normal = new Vector3(0, 1.0, 0);\n positions.push(position.x, position.y, position.z);\n normals.push(normal.x, normal.y, normal.z);\n uvs.push(col / subdivisionsX, CompatibilityOptions.UseOpenGLOrientationForUV ? row / subdivisionsY : 1.0 - row / subdivisionsY);\n }\n }\n for (row = 0; row < subdivisionsY; row++) {\n for (col = 0; col < subdivisionsX; col++) {\n indices.push(col + 1 + (row + 1) * (subdivisionsX + 1));\n indices.push(col + 1 + row * (subdivisionsX + 1));\n indices.push(col + row * (subdivisionsX + 1));\n indices.push(col + (row + 1) * (subdivisionsX + 1));\n indices.push(col + 1 + (row + 1) * (subdivisionsX + 1));\n indices.push(col + row * (subdivisionsX + 1));\n }\n }\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n return vertexData;\n}\n/**\n * Creates the VertexData for a TiledGround by subdividing the ground into tiles\n * @param options an object used to set the following optional parameters for the Ground, required but can be empty\n * * xmin the ground minimum X coordinate, optional, default -1\n * * zmin the ground minimum Z coordinate, optional, default -1\n * * xmax the ground maximum X coordinate, optional, default 1\n * * zmax the ground maximum Z coordinate, optional, default 1\n * * subdivisions a javascript object {w: positive integer, h: positive integer}, `w` and `h` are the numbers of subdivisions on the ground width and height creating 'tiles', default {w: 6, h: 6}\n * * precision a javascript object {w: positive integer, h: positive integer}, `w` and `h` are the numbers of subdivisions on the tile width and height, default {w: 2, h: 2}\n * @param options.xmin\n * @param options.zmin\n * @param options.xmax\n * @param options.zmax\n * @param options.subdivisions\n * @param options.subdivisions.w\n * @param options.subdivisions.h\n * @param options.precision\n * @param options.precision.w\n * @param options.precision.h\n * @returns the VertexData of the TiledGround\n */\nexport function CreateTiledGroundVertexData(options) {\n const xmin = options.xmin !== undefined && options.xmin !== null ? options.xmin : -1.0;\n const zmin = options.zmin !== undefined && options.zmin !== null ? options.zmin : -1.0;\n const xmax = options.xmax !== undefined && options.xmax !== null ? options.xmax : 1.0;\n const zmax = options.zmax !== undefined && options.zmax !== null ? options.zmax : 1.0;\n const subdivisions = options.subdivisions || { w: 1, h: 1 };\n const precision = options.precision || { w: 1, h: 1 };\n const indices = [];\n const positions = [];\n const normals = [];\n const uvs = [];\n let row, col, tileRow, tileCol;\n subdivisions.h = subdivisions.h < 1 ? 1 : subdivisions.h;\n subdivisions.w = subdivisions.w < 1 ? 1 : subdivisions.w;\n precision.w = precision.w < 1 ? 1 : precision.w;\n precision.h = precision.h < 1 ? 1 : precision.h;\n const tileSize = {\n w: (xmax - xmin) / subdivisions.w,\n h: (zmax - zmin) / subdivisions.h,\n };\n function applyTile(xTileMin, zTileMin, xTileMax, zTileMax) {\n // Indices\n const base = positions.length / 3;\n const rowLength = precision.w + 1;\n for (row = 0; row < precision.h; row++) {\n for (col = 0; col < precision.w; col++) {\n const square = [base + col + row * rowLength, base + (col + 1) + row * rowLength, base + (col + 1) + (row + 1) * rowLength, base + col + (row + 1) * rowLength];\n indices.push(square[1]);\n indices.push(square[2]);\n indices.push(square[3]);\n indices.push(square[0]);\n indices.push(square[1]);\n indices.push(square[3]);\n }\n }\n // Position, normals and uvs\n const position = Vector3.Zero();\n const normal = new Vector3(0, 1.0, 0);\n for (row = 0; row <= precision.h; row++) {\n position.z = (row * (zTileMax - zTileMin)) / precision.h + zTileMin;\n for (col = 0; col <= precision.w; col++) {\n position.x = (col * (xTileMax - xTileMin)) / precision.w + xTileMin;\n position.y = 0;\n positions.push(position.x, position.y, position.z);\n normals.push(normal.x, normal.y, normal.z);\n uvs.push(col / precision.w, row / precision.h);\n }\n }\n }\n for (tileRow = 0; tileRow < subdivisions.h; tileRow++) {\n for (tileCol = 0; tileCol < subdivisions.w; tileCol++) {\n applyTile(xmin + tileCol * tileSize.w, zmin + tileRow * tileSize.h, xmin + (tileCol + 1) * tileSize.w, zmin + (tileRow + 1) * tileSize.h);\n }\n }\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n return vertexData;\n}\n/**\n * Creates the VertexData of the Ground designed from a heightmap\n * @param options an object used to set the following parameters for the Ground, required and provided by CreateGroundFromHeightMap\n * * width the width (x direction) of the ground\n * * height the height (z direction) of the ground\n * * subdivisions the number of subdivisions per side\n * * minHeight the minimum altitude on the ground, optional, default 0\n * * maxHeight the maximum altitude on the ground, optional default 1\n * * colorFilter the filter to apply to the image pixel colors to compute the height, optional Color3, default (0.3, 0.59, 0.11)\n * * buffer the array holding the image color data\n * * bufferWidth the width of image\n * * bufferHeight the height of image\n * * alphaFilter Remove any data where the alpha channel is below this value, defaults 0 (all data visible)\n * @param options.width\n * @param options.height\n * @param options.subdivisions\n * @param options.minHeight\n * @param options.maxHeight\n * @param options.colorFilter\n * @param options.buffer\n * @param options.bufferWidth\n * @param options.bufferHeight\n * @param options.alphaFilter\n * @returns the VertexData of the Ground designed from a heightmap\n */\nexport function CreateGroundFromHeightMapVertexData(options) {\n const indices = [];\n const positions = [];\n const normals = [];\n const uvs = [];\n let row, col;\n const filter = options.colorFilter || new Color3(0.3, 0.59, 0.11);\n const alphaFilter = options.alphaFilter || 0.0;\n let invert = false;\n if (options.minHeight > options.maxHeight) {\n invert = true;\n const temp = options.maxHeight;\n options.maxHeight = options.minHeight;\n options.minHeight = temp;\n }\n // Vertices\n for (row = 0; row <= options.subdivisions; row++) {\n for (col = 0; col <= options.subdivisions; col++) {\n const position = new Vector3((col * options.width) / options.subdivisions - options.width / 2.0, 0, ((options.subdivisions - row) * options.height) / options.subdivisions - options.height / 2.0);\n // Compute height\n const heightMapX = (((position.x + options.width / 2) / options.width) * (options.bufferWidth - 1)) | 0;\n const heightMapY = ((1.0 - (position.z + options.height / 2) / options.height) * (options.bufferHeight - 1)) | 0;\n const pos = (heightMapX + heightMapY * options.bufferWidth) * 4;\n let r = options.buffer[pos] / 255.0;\n let g = options.buffer[pos + 1] / 255.0;\n let b = options.buffer[pos + 2] / 255.0;\n const a = options.buffer[pos + 3] / 255.0;\n if (invert) {\n r = 1.0 - r;\n g = 1.0 - g;\n b = 1.0 - b;\n }\n const gradient = r * filter.r + g * filter.g + b * filter.b;\n // If our alpha channel is not within our filter then we will assign a 'special' height\n // Then when building the indices, we will ignore any vertex that is using the special height\n if (a >= alphaFilter) {\n position.y = options.minHeight + (options.maxHeight - options.minHeight) * gradient;\n }\n else {\n position.y = options.minHeight - Epsilon; // We can't have a height below minHeight, normally.\n }\n // Add vertex\n positions.push(position.x, position.y, position.z);\n normals.push(0, 0, 0);\n uvs.push(col / options.subdivisions, 1.0 - row / options.subdivisions);\n }\n }\n // Indices\n for (row = 0; row < options.subdivisions; row++) {\n for (col = 0; col < options.subdivisions; col++) {\n // Calculate Indices\n const idx1 = col + 1 + (row + 1) * (options.subdivisions + 1);\n const idx2 = col + 1 + row * (options.subdivisions + 1);\n const idx3 = col + row * (options.subdivisions + 1);\n const idx4 = col + (row + 1) * (options.subdivisions + 1);\n // Check that all indices are visible (based on our special height)\n // Only display the vertex if all Indices are visible\n // Positions are stored x,y,z for each vertex, hence the * 3 and + 1 for height\n const isVisibleIdx1 = positions[idx1 * 3 + 1] >= options.minHeight;\n const isVisibleIdx2 = positions[idx2 * 3 + 1] >= options.minHeight;\n const isVisibleIdx3 = positions[idx3 * 3 + 1] >= options.minHeight;\n if (isVisibleIdx1 && isVisibleIdx2 && isVisibleIdx3) {\n indices.push(idx1);\n indices.push(idx2);\n indices.push(idx3);\n }\n const isVisibleIdx4 = positions[idx4 * 3 + 1] >= options.minHeight;\n if (isVisibleIdx4 && isVisibleIdx1 && isVisibleIdx3) {\n indices.push(idx4);\n indices.push(idx1);\n indices.push(idx3);\n }\n }\n }\n // Normals\n VertexData.ComputeNormals(positions, indices, normals);\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n return vertexData;\n}\n/**\n * Creates a ground mesh\n * * The parameters `width` and `height` (floats, default 1) set the width and height sizes of the ground\n * * The parameter `subdivisions` (positive integer) sets the number of subdivisions per side\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.width\n * @param options.height\n * @param options.subdivisions\n * @param options.subdivisionsX\n * @param options.subdivisionsY\n * @param options.updatable\n * @param scene defines the hosting scene\n * @returns the ground mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#ground\n */\nexport function CreateGround(name, options = {}, scene) {\n const ground = new GroundMesh(name, scene);\n ground._setReady(false);\n ground._subdivisionsX = options.subdivisionsX || options.subdivisions || 1;\n ground._subdivisionsY = options.subdivisionsY || options.subdivisions || 1;\n ground._width = options.width || 1;\n ground._height = options.height || 1;\n ground._maxX = ground._width / 2;\n ground._maxZ = ground._height / 2;\n ground._minX = -ground._maxX;\n ground._minZ = -ground._maxZ;\n const vertexData = CreateGroundVertexData(options);\n vertexData.applyToMesh(ground, options.updatable);\n ground._setReady(true);\n return ground;\n}\n/**\n * Creates a tiled ground mesh\n * * The parameters `xmin` and `xmax` (floats, default -1 and 1) set the ground minimum and maximum X coordinates\n * * The parameters `zmin` and `zmax` (floats, default -1 and 1) set the ground minimum and maximum Z coordinates\n * * The parameter `subdivisions` is a javascript object `{w: positive integer, h: positive integer}` (default `{w: 6, h: 6}`). `w` and `h` are the numbers of subdivisions on the ground width and height. Each subdivision is called a tile\n * * The parameter `precision` is a javascript object `{w: positive integer, h: positive integer}` (default `{w: 2, h: 2}`). `w` and `h` are the numbers of subdivisions on the ground width and height of each tile\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.xmin\n * @param options.zmin\n * @param options.xmax\n * @param options.zmax\n * @param options.subdivisions\n * @param options.subdivisions.w\n * @param options.subdivisions.h\n * @param options.precision\n * @param options.precision.w\n * @param options.precision.h\n * @param options.updatable\n * @param scene defines the hosting scene\n * @returns the tiled ground mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#tiled-ground\n */\nexport function CreateTiledGround(name, options, scene = null) {\n const tiledGround = new Mesh(name, scene);\n const vertexData = CreateTiledGroundVertexData(options);\n vertexData.applyToMesh(tiledGround, options.updatable);\n return tiledGround;\n}\n/**\n * Creates a ground mesh from a height map\n * * The parameter `url` sets the URL of the height map image resource.\n * * The parameters `width` and `height` (positive floats, default 10) set the ground width and height sizes.\n * * The parameter `subdivisions` (positive integer, default 1) sets the number of subdivision per side.\n * * The parameter `minHeight` (float, default 0) is the minimum altitude on the ground.\n * * The parameter `maxHeight` (float, default 1) is the maximum altitude on the ground.\n * * The parameter `colorFilter` (optional Color3, default (0.3, 0.59, 0.11) ) is the filter to apply to the image pixel colors to compute the height.\n * * The parameter `onReady` is a javascript callback function that will be called once the mesh is just built (the height map download can last some time).\n * * The parameter `alphaFilter` will filter any data where the alpha channel is below this value, defaults 0 (all data visible)\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.\n * @param name defines the name of the mesh\n * @param url defines the url to the height map\n * @param options defines the options used to create the mesh\n * @param options.width\n * @param options.height\n * @param options.subdivisions\n * @param options.minHeight\n * @param options.maxHeight\n * @param options.colorFilter\n * @param options.alphaFilter\n * @param options.updatable\n * @param options.onReady\n * @param scene defines the hosting scene\n * @returns the ground mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/height_map\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#ground-from-a-height-map\n */\nexport function CreateGroundFromHeightMap(name, url, options = {}, scene = null) {\n const width = options.width || 10.0;\n const height = options.height || 10.0;\n const subdivisions = options.subdivisions || 1 | 0;\n const minHeight = options.minHeight || 0.0;\n const maxHeight = options.maxHeight || 1.0;\n const filter = options.colorFilter || new Color3(0.3, 0.59, 0.11);\n const alphaFilter = options.alphaFilter || 0.0;\n const updatable = options.updatable;\n const onReady = options.onReady;\n scene = scene || EngineStore.LastCreatedScene;\n const ground = new GroundMesh(name, scene);\n ground._subdivisionsX = subdivisions;\n ground._subdivisionsY = subdivisions;\n ground._width = width;\n ground._height = height;\n ground._maxX = ground._width / 2.0;\n ground._maxZ = ground._height / 2.0;\n ground._minX = -ground._maxX;\n ground._minZ = -ground._maxZ;\n ground._setReady(false);\n const onload = (img) => {\n const bufferWidth = img.width;\n const bufferHeight = img.height;\n if (scene.isDisposed) {\n return;\n }\n const buffer = scene === null || scene === void 0 ? void 0 : scene.getEngine().resizeImageBitmap(img, bufferWidth, bufferHeight);\n const vertexData = CreateGroundFromHeightMapVertexData({\n width: width,\n height: height,\n subdivisions: subdivisions,\n minHeight: minHeight,\n maxHeight: maxHeight,\n colorFilter: filter,\n buffer: buffer,\n bufferWidth: bufferWidth,\n bufferHeight: bufferHeight,\n alphaFilter: alphaFilter,\n });\n vertexData.applyToMesh(ground, updatable);\n //execute ready callback, if set\n if (onReady) {\n onReady(ground);\n }\n ground._setReady(true);\n };\n Tools.LoadImage(url, onload, () => { }, scene.offlineProvider);\n return ground;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use the functions directly from the module\n */\nexport const GroundBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateGround,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateGroundFromHeightMap,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateTiledGround,\n};\nVertexData.CreateGround = CreateGroundVertexData;\nVertexData.CreateTiledGround = CreateTiledGroundVertexData;\nVertexData.CreateGroundFromHeightMap = CreateGroundFromHeightMapVertexData;\nMesh.CreateGround = (name, width, height, subdivisions, scene, updatable) => {\n const options = {\n width,\n height,\n subdivisions,\n updatable,\n };\n return CreateGround(name, options, scene);\n};\nMesh.CreateTiledGround = (name, xmin, zmin, xmax, zmax, subdivisions, precision, scene, updatable) => {\n const options = {\n xmin,\n zmin,\n xmax,\n zmax,\n subdivisions,\n precision,\n updatable,\n };\n return CreateTiledGround(name, options, scene);\n};\nMesh.CreateGroundFromHeightMap = (name, url, width, height, subdivisions, minHeight, maxHeight, scene, updatable, onReady, alphaFilter) => {\n const options = {\n width,\n height,\n subdivisions,\n minHeight,\n maxHeight,\n updatable,\n onReady,\n alphaFilter,\n };\n return CreateGroundFromHeightMap(name, url, options, scene);\n};\n//# sourceMappingURL=groundBuilder.js.map","import { Matrix, Vector4 } from \"../../Maths/math.vector.js\";\nimport { Color4 } from \"../../Maths/math.color.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\nimport { CreateGroundVertexData } from \"./groundBuilder.js\";\n/**\n * Creates the VertexData for a box\n * @param options an object used to set the following optional parameters for the box, required but can be empty\n * * size sets the width, height and depth of the box to the value of size, optional default 1\n * * width sets the width (x direction) of the box, overwrites the width set by size, optional, default size\n * * height sets the height (y direction) of the box, overwrites the height set by size, optional, default size\n * * depth sets the depth (z direction) of the box, overwrites the depth set by size, optional, default size\n * * faceUV an array of 6 Vector4 elements used to set different images to each box side\n * * faceColors an array of 6 Color3 elements used to set different colors to each box side\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.size\n * @param options.width\n * @param options.height\n * @param options.depth\n * @param options.faceUV\n * @param options.faceColors\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.wrap\n * @param options.topBaseAt\n * @param options.bottomBaseAt\n * @returns the VertexData of the box\n */\nexport function CreateBoxVertexData(options) {\n const nbFaces = 6;\n let indices = [0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23];\n const normals = [\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, 0, 1, 0, 0, 1, 0, 0,\n 1, 0, 0, 1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0,\n ];\n const uvs = [];\n let positions = [];\n const width = options.width || options.size || 1;\n const height = options.height || options.size || 1;\n const depth = options.depth || options.size || 1;\n const wrap = options.wrap || false;\n let topBaseAt = options.topBaseAt === void 0 ? 1 : options.topBaseAt;\n let bottomBaseAt = options.bottomBaseAt === void 0 ? 0 : options.bottomBaseAt;\n topBaseAt = (topBaseAt + 4) % 4; // places values as 0 to 3\n bottomBaseAt = (bottomBaseAt + 4) % 4; // places values as 0 to 3\n const topOrder = [2, 0, 3, 1];\n const bottomOrder = [2, 0, 1, 3];\n let topIndex = topOrder[topBaseAt];\n let bottomIndex = bottomOrder[bottomBaseAt];\n let basePositions = [\n 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1,\n 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1,\n ];\n if (wrap) {\n indices = [2, 3, 0, 2, 0, 1, 4, 5, 6, 4, 6, 7, 9, 10, 11, 9, 11, 8, 12, 14, 15, 12, 13, 14];\n basePositions = [\n -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1,\n ];\n let topFaceBase = [\n [1, 1, 1],\n [-1, 1, 1],\n [-1, 1, -1],\n [1, 1, -1],\n ];\n let bottomFaceBase = [\n [-1, -1, 1],\n [1, -1, 1],\n [1, -1, -1],\n [-1, -1, -1],\n ];\n const topFaceOrder = [17, 18, 19, 16];\n const bottomFaceOrder = [22, 23, 20, 21];\n while (topIndex > 0) {\n topFaceBase.unshift(topFaceBase.pop());\n topFaceOrder.unshift(topFaceOrder.pop());\n topIndex--;\n }\n while (bottomIndex > 0) {\n bottomFaceBase.unshift(bottomFaceBase.pop());\n bottomFaceOrder.unshift(bottomFaceOrder.pop());\n bottomIndex--;\n }\n topFaceBase = topFaceBase.flat();\n bottomFaceBase = bottomFaceBase.flat();\n basePositions = basePositions.concat(topFaceBase).concat(bottomFaceBase);\n indices.push(topFaceOrder[0], topFaceOrder[2], topFaceOrder[3], topFaceOrder[0], topFaceOrder[1], topFaceOrder[2]);\n indices.push(bottomFaceOrder[0], bottomFaceOrder[2], bottomFaceOrder[3], bottomFaceOrder[0], bottomFaceOrder[1], bottomFaceOrder[2]);\n }\n const scaleArray = [width / 2, height / 2, depth / 2];\n positions = basePositions.reduce((accumulator, currentValue, currentIndex) => accumulator.concat(currentValue * scaleArray[currentIndex % 3]), []);\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n const faceUV = options.faceUV || new Array(6);\n const faceColors = options.faceColors;\n const colors = [];\n // default face colors and UV if undefined\n for (let f = 0; f < 6; f++) {\n if (faceUV[f] === undefined) {\n faceUV[f] = new Vector4(0, 0, 1, 1);\n }\n if (faceColors && faceColors[f] === undefined) {\n faceColors[f] = new Color4(1, 1, 1, 1);\n }\n }\n // Create each face in turn.\n for (let index = 0; index < nbFaces; index++) {\n uvs.push(faceUV[index].z, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - faceUV[index].w : faceUV[index].w);\n uvs.push(faceUV[index].x, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - faceUV[index].w : faceUV[index].w);\n uvs.push(faceUV[index].x, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - faceUV[index].y : faceUV[index].y);\n uvs.push(faceUV[index].z, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - faceUV[index].y : faceUV[index].y);\n if (faceColors) {\n for (let c = 0; c < 4; c++) {\n colors.push(faceColors[index].r, faceColors[index].g, faceColors[index].b, faceColors[index].a);\n }\n }\n }\n // sides\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, options.frontUVs, options.backUVs);\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n if (faceColors) {\n const totalColors = sideOrientation === VertexData.DOUBLESIDE ? colors.concat(colors) : colors;\n vertexData.colors = totalColors;\n }\n return vertexData;\n}\n/**\n * Creates the VertexData for a segmented box\n * @param options an object used to set the following optional parameters for the box, required but can be empty\n * * size sets the width, height and depth of the box to the value of size, optional default 1\n * * width sets the width (x direction) of the box, overwrites the width set by size, optional, default size\n * * height sets the height (y direction) of the box, overwrites the height set by size, optional, default size\n * * depth sets the depth (z direction) of the box, overwrites the depth set by size, optional, default size\n * * segments sets the number of segments on the all axis (1 by default)\n * * widthSegments sets the number of segments on the x axis (1 by default)\n * * heightSegments sets the number of segments on the y axis (1 by default)\n * * depthSegments sets the number of segments on the z axis (1 by default)\n * @param options.size\n * @param options.width\n * @param options.height\n * @param options.depth\n * @param options.segments\n * @param options.widthSegments\n * @param options.heightSegments\n * @param options.depthSegments\n * @returns the VertexData of the box\n */\nexport function CreateSegmentedBoxVertexData(options) {\n const width = options.width || options.size || 1;\n const height = options.height || options.size || 1;\n const depth = options.depth || options.size || 1;\n const widthSegments = (options.widthSegments || options.segments || 1) | 0;\n const heightSegments = (options.heightSegments || options.segments || 1) | 0;\n const depthSegments = (options.depthSegments || options.segments || 1) | 0;\n const rotationMatrix = new Matrix();\n const translationMatrix = new Matrix();\n const transformMatrix = new Matrix();\n const bottomPlane = CreateGroundVertexData({ width: width, height: depth, subdivisionsX: widthSegments, subdivisionsY: depthSegments });\n Matrix.TranslationToRef(0, -height / 2, 0, translationMatrix);\n Matrix.RotationZToRef(Math.PI, rotationMatrix);\n rotationMatrix.multiplyToRef(translationMatrix, transformMatrix);\n bottomPlane.transform(transformMatrix);\n const topPlane = CreateGroundVertexData({ width: width, height: depth, subdivisionsX: widthSegments, subdivisionsY: depthSegments });\n Matrix.TranslationToRef(0, height / 2, 0, transformMatrix);\n topPlane.transform(transformMatrix);\n const negXPlane = CreateGroundVertexData({ width: height, height: depth, subdivisionsX: heightSegments, subdivisionsY: depthSegments });\n Matrix.TranslationToRef(-width / 2, 0, 0, translationMatrix);\n Matrix.RotationZToRef(Math.PI / 2, rotationMatrix);\n rotationMatrix.multiplyToRef(translationMatrix, transformMatrix);\n negXPlane.transform(transformMatrix);\n const posXPlane = CreateGroundVertexData({ width: height, height: depth, subdivisionsX: heightSegments, subdivisionsY: depthSegments });\n Matrix.TranslationToRef(width / 2, 0, 0, translationMatrix);\n Matrix.RotationZToRef(-Math.PI / 2, rotationMatrix);\n rotationMatrix.multiplyToRef(translationMatrix, transformMatrix);\n posXPlane.transform(transformMatrix);\n const negZPlane = CreateGroundVertexData({ width: width, height: height, subdivisionsX: widthSegments, subdivisionsY: heightSegments });\n Matrix.TranslationToRef(0, 0, -depth / 2, translationMatrix);\n Matrix.RotationXToRef(-Math.PI / 2, rotationMatrix);\n rotationMatrix.multiplyToRef(translationMatrix, transformMatrix);\n negZPlane.transform(transformMatrix);\n const posZPlane = CreateGroundVertexData({ width: width, height: height, subdivisionsX: widthSegments, subdivisionsY: heightSegments });\n Matrix.TranslationToRef(0, 0, depth / 2, translationMatrix);\n Matrix.RotationXToRef(Math.PI / 2, rotationMatrix);\n rotationMatrix.multiplyToRef(translationMatrix, transformMatrix);\n posZPlane.transform(transformMatrix);\n // Result\n bottomPlane.merge([topPlane, posXPlane, negXPlane, negZPlane, posZPlane], true);\n return bottomPlane;\n}\n/**\n * Creates a box mesh\n * * The parameter `size` sets the size (float) of each box side (default 1)\n * * You can set some different box dimensions by using the parameters `width`, `height` and `depth` (all by default have the same value of `size`)\n * * You can set different colors and different images to each box side by using the parameters `faceColors` (an array of 6 Color3 elements) and `faceUV` (an array of 6 Vector4 elements)\n * * Please read this tutorial : https://doc.babylonjs.com/features/featuresDeepDive/materials/using/texturePerBoxFace\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#box\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.size\n * @param options.width\n * @param options.height\n * @param options.depth\n * @param options.faceUV\n * @param options.faceColors\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.wrap\n * @param options.topBaseAt\n * @param options.bottomBaseAt\n * @param options.updatable\n * @param scene defines the hosting scene\n * @returns the box mesh\n */\nexport function CreateBox(name, options = {}, scene = null) {\n const box = new Mesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n box._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreateBoxVertexData(options);\n vertexData.applyToMesh(box, options.updatable);\n return box;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated please use CreateBox directly\n */\nexport const BoxBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateBox,\n};\n// Side effects\nVertexData.CreateBox = CreateBoxVertexData;\nMesh.CreateBox = (name, size, scene = null, updatable, sideOrientation) => {\n const options = {\n size,\n sideOrientation,\n updatable,\n };\n return CreateBox(name, options, scene);\n};\n//# sourceMappingURL=boxBuilder.js.map","import { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\n/**\n * Creates the VertexData for a tiled plane\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/tiled_plane\n * @param options an object used to set the following optional parameters for the tiled plane, required but can be empty\n * * pattern a limited pattern arrangement depending on the number\n * * size of the box\n * * width of the box, overwrites size\n * * height of the box, overwrites size\n * * tileSize sets the width, height and depth of the tile to the value of size, optional default 1\n * * tileWidth sets the width (x direction) of the tile, overwrites the width set by size, optional, default size\n * * tileHeight sets the height (y direction) of the tile, overwrites the height set by size, optional, default size\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * alignHorizontal places whole tiles aligned to the center, left or right of a row\n * * alignVertical places whole tiles aligned to the center, left or right of a column\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * @param options.pattern\n * @param options.tileSize\n * @param options.tileWidth\n * @param options.tileHeight\n * @param options.size\n * @param options.width\n * @param options.height\n * @param options.alignHorizontal\n * @param options.alignVertical\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @returns the VertexData of the tiled plane\n */\nexport function CreateTiledPlaneVertexData(options) {\n const flipTile = options.pattern || Mesh.NO_FLIP;\n const tileWidth = options.tileWidth || options.tileSize || 1;\n const tileHeight = options.tileHeight || options.tileSize || 1;\n const alignH = options.alignHorizontal || 0;\n const alignV = options.alignVertical || 0;\n const width = options.width || options.size || 1;\n const tilesX = Math.floor(width / tileWidth);\n let offsetX = width - tilesX * tileWidth;\n const height = options.height || options.size || 1;\n const tilesY = Math.floor(height / tileHeight);\n let offsetY = height - tilesY * tileHeight;\n const halfWidth = (tileWidth * tilesX) / 2;\n const halfHeight = (tileHeight * tilesY) / 2;\n let adjustX = 0;\n let adjustY = 0;\n let startX = 0;\n let startY = 0;\n let endX = 0;\n let endY = 0;\n //Part Tiles\n if (offsetX > 0 || offsetY > 0) {\n startX = -halfWidth;\n startY = -halfHeight;\n endX = halfWidth;\n endY = halfHeight;\n switch (alignH) {\n case Mesh.CENTER:\n offsetX /= 2;\n startX -= offsetX;\n endX += offsetX;\n break;\n case Mesh.LEFT:\n endX += offsetX;\n adjustX = -offsetX / 2;\n break;\n case Mesh.RIGHT:\n startX -= offsetX;\n adjustX = offsetX / 2;\n break;\n }\n switch (alignV) {\n case Mesh.CENTER:\n offsetY /= 2;\n startY -= offsetY;\n endY += offsetY;\n break;\n case Mesh.BOTTOM:\n endY += offsetY;\n adjustY = -offsetY / 2;\n break;\n case Mesh.TOP:\n startY -= offsetY;\n adjustY = offsetY / 2;\n break;\n }\n }\n const positions = [];\n const normals = [];\n const uvBase = [];\n uvBase[0] = [0, 0, 1, 0, 1, 1, 0, 1];\n uvBase[1] = [0, 0, 1, 0, 1, 1, 0, 1];\n if (flipTile === Mesh.ROTATE_TILE || flipTile === Mesh.ROTATE_ROW) {\n uvBase[1] = [1, 1, 0, 1, 0, 0, 1, 0];\n }\n if (flipTile === Mesh.FLIP_TILE || flipTile === Mesh.FLIP_ROW) {\n uvBase[1] = [1, 0, 0, 0, 0, 1, 1, 1];\n }\n if (flipTile === Mesh.FLIP_N_ROTATE_TILE || flipTile === Mesh.FLIP_N_ROTATE_ROW) {\n uvBase[1] = [0, 1, 1, 1, 1, 0, 0, 0];\n }\n let uvs = [];\n const colors = [];\n const indices = [];\n let index = 0;\n for (let y = 0; y < tilesY; y++) {\n for (let x = 0; x < tilesX; x++) {\n positions.push(-halfWidth + x * tileWidth + adjustX, -halfHeight + y * tileHeight + adjustY, 0);\n positions.push(-halfWidth + (x + 1) * tileWidth + adjustX, -halfHeight + y * tileHeight + adjustY, 0);\n positions.push(-halfWidth + (x + 1) * tileWidth + adjustX, -halfHeight + (y + 1) * tileHeight + adjustY, 0);\n positions.push(-halfWidth + x * tileWidth + adjustX, -halfHeight + (y + 1) * tileHeight + adjustY, 0);\n indices.push(index, index + 1, index + 3, index + 1, index + 2, index + 3);\n if (flipTile === Mesh.FLIP_TILE || flipTile === Mesh.ROTATE_TILE || flipTile === Mesh.FLIP_N_ROTATE_TILE) {\n uvs = uvs.concat(uvBase[((x % 2) + (y % 2)) % 2]);\n }\n else if (flipTile === Mesh.FLIP_ROW || flipTile === Mesh.ROTATE_ROW || flipTile === Mesh.FLIP_N_ROTATE_ROW) {\n uvs = uvs.concat(uvBase[y % 2]);\n }\n else {\n uvs = uvs.concat(uvBase[0]);\n }\n colors.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);\n normals.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1);\n index += 4;\n }\n }\n //Part Tiles\n if (offsetX > 0 || offsetY > 0) {\n const partialBottomRow = offsetY > 0 && (alignV === Mesh.CENTER || alignV === Mesh.TOP);\n const partialTopRow = offsetY > 0 && (alignV === Mesh.CENTER || alignV === Mesh.BOTTOM);\n const partialLeftCol = offsetX > 0 && (alignH === Mesh.CENTER || alignH === Mesh.RIGHT);\n const partialRightCol = offsetX > 0 && (alignH === Mesh.CENTER || alignH === Mesh.LEFT);\n let uvPart = [];\n let a, b, c, d;\n //corners\n if (partialBottomRow && partialLeftCol) {\n //bottom left corner\n positions.push(startX + adjustX, startY + adjustY, 0);\n positions.push(-halfWidth + adjustX, startY + adjustY, 0);\n positions.push(-halfWidth + adjustX, startY + offsetY + adjustY, 0);\n positions.push(startX + adjustX, startY + offsetY + adjustY, 0);\n indices.push(index, index + 1, index + 3, index + 1, index + 2, index + 3);\n index += 4;\n a = 1 - offsetX / tileWidth;\n b = 1 - offsetY / tileHeight;\n c = 1;\n d = 1;\n uvPart = [a, b, c, b, c, d, a, d];\n if (flipTile === Mesh.ROTATE_ROW) {\n uvPart = [1 - a, 1 - b, 1 - c, 1 - b, 1 - c, 1 - d, 1 - a, 1 - d];\n }\n if (flipTile === Mesh.FLIP_ROW) {\n uvPart = [1 - a, b, 1 - c, b, 1 - c, d, 1 - a, d];\n }\n if (flipTile === Mesh.FLIP_N_ROTATE_ROW) {\n uvPart = [a, 1 - b, c, 1 - b, c, 1 - d, a, 1 - d];\n }\n uvs = uvs.concat(uvPart);\n colors.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);\n normals.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1);\n }\n if (partialBottomRow && partialRightCol) {\n //bottom right corner\n positions.push(halfWidth + adjustX, startY + adjustY, 0);\n positions.push(endX + adjustX, startY + adjustY, 0);\n positions.push(endX + adjustX, startY + offsetY + adjustY, 0);\n positions.push(halfWidth + adjustX, startY + offsetY + adjustY, 0);\n indices.push(index, index + 1, index + 3, index + 1, index + 2, index + 3);\n index += 4;\n a = 0;\n b = 1 - offsetY / tileHeight;\n c = offsetX / tileWidth;\n d = 1;\n uvPart = [a, b, c, b, c, d, a, d];\n if (flipTile === Mesh.ROTATE_ROW || (flipTile === Mesh.ROTATE_TILE && tilesX % 2 === 0)) {\n uvPart = [1 - a, 1 - b, 1 - c, 1 - b, 1 - c, 1 - d, 1 - a, 1 - d];\n }\n if (flipTile === Mesh.FLIP_ROW || (flipTile === Mesh.FLIP_TILE && tilesX % 2 === 0)) {\n uvPart = [1 - a, b, 1 - c, b, 1 - c, d, 1 - a, d];\n }\n if (flipTile === Mesh.FLIP_N_ROTATE_ROW || (flipTile === Mesh.FLIP_N_ROTATE_TILE && tilesX % 2 === 0)) {\n uvPart = [a, 1 - b, c, 1 - b, c, 1 - d, a, 1 - d];\n }\n uvs = uvs.concat(uvPart);\n colors.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);\n normals.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1);\n }\n if (partialTopRow && partialLeftCol) {\n //top left corner\n positions.push(startX + adjustX, halfHeight + adjustY, 0);\n positions.push(-halfWidth + adjustX, halfHeight + adjustY, 0);\n positions.push(-halfWidth + adjustX, endY + adjustY, 0);\n positions.push(startX + adjustX, endY + adjustY, 0);\n indices.push(index, index + 1, index + 3, index + 1, index + 2, index + 3);\n index += 4;\n a = 1 - offsetX / tileWidth;\n b = 0;\n c = 1;\n d = offsetY / tileHeight;\n uvPart = [a, b, c, b, c, d, a, d];\n if ((flipTile === Mesh.ROTATE_ROW && tilesY % 2 === 1) || (flipTile === Mesh.ROTATE_TILE && tilesY % 1 === 0)) {\n uvPart = [1 - a, 1 - b, 1 - c, 1 - b, 1 - c, 1 - d, 1 - a, 1 - d];\n }\n if ((flipTile === Mesh.FLIP_ROW && tilesY % 2 === 1) || (flipTile === Mesh.FLIP_TILE && tilesY % 2 === 0)) {\n uvPart = [1 - a, b, 1 - c, b, 1 - c, d, 1 - a, d];\n }\n if ((flipTile === Mesh.FLIP_N_ROTATE_ROW && tilesY % 2 === 1) || (flipTile === Mesh.FLIP_N_ROTATE_TILE && tilesY % 2 === 0)) {\n uvPart = [a, 1 - b, c, 1 - b, c, 1 - d, a, 1 - d];\n }\n uvs = uvs.concat(uvPart);\n colors.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);\n normals.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1);\n }\n if (partialTopRow && partialRightCol) {\n //top right corner\n positions.push(halfWidth + adjustX, halfHeight + adjustY, 0);\n positions.push(endX + adjustX, halfHeight + adjustY, 0);\n positions.push(endX + adjustX, endY + adjustY, 0);\n positions.push(halfWidth + adjustX, endY + adjustY, 0);\n indices.push(index, index + 1, index + 3, index + 1, index + 2, index + 3);\n index += 4;\n a = 0;\n b = 0;\n c = offsetX / tileWidth;\n d = offsetY / tileHeight;\n uvPart = [a, b, c, b, c, d, a, d];\n if ((flipTile === Mesh.ROTATE_ROW && tilesY % 2 === 1) || (flipTile === Mesh.ROTATE_TILE && (tilesY + tilesX) % 2 === 1)) {\n uvPart = [1 - a, 1 - b, 1 - c, 1 - b, 1 - c, 1 - d, 1 - a, 1 - d];\n }\n if ((flipTile === Mesh.FLIP_ROW && tilesY % 2 === 1) || (flipTile === Mesh.FLIP_TILE && (tilesY + tilesX) % 2 === 1)) {\n uvPart = [1 - a, b, 1 - c, b, 1 - c, d, 1 - a, d];\n }\n if ((flipTile === Mesh.FLIP_N_ROTATE_ROW && tilesY % 2 === 1) || (flipTile === Mesh.FLIP_N_ROTATE_TILE && (tilesY + tilesX) % 2 === 1)) {\n uvPart = [a, 1 - b, c, 1 - b, c, 1 - d, a, 1 - d];\n }\n uvs = uvs.concat(uvPart);\n colors.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);\n normals.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1);\n }\n //part rows\n if (partialBottomRow) {\n const uvBaseBR = [];\n a = 0;\n b = 1 - offsetY / tileHeight;\n c = 1;\n d = 1;\n uvBaseBR[0] = [a, b, c, b, c, d, a, d];\n uvBaseBR[1] = [a, b, c, b, c, d, a, d];\n if (flipTile === Mesh.ROTATE_TILE || flipTile === Mesh.ROTATE_ROW) {\n uvBaseBR[1] = [1 - a, 1 - b, 1 - c, 1 - b, 1 - c, 1 - d, 1 - a, 1 - d];\n }\n if (flipTile === Mesh.FLIP_TILE || flipTile === Mesh.FLIP_ROW) {\n uvBaseBR[1] = [1 - a, b, 1 - c, b, 1 - c, d, 1 - a, d];\n }\n if (flipTile === Mesh.FLIP_N_ROTATE_TILE || flipTile === Mesh.FLIP_N_ROTATE_ROW) {\n uvBaseBR[1] = [a, 1 - b, c, 1 - b, c, 1 - d, a, 1 - d];\n }\n for (let x = 0; x < tilesX; x++) {\n positions.push(-halfWidth + x * tileWidth + adjustX, startY + adjustY, 0);\n positions.push(-halfWidth + (x + 1) * tileWidth + adjustX, startY + adjustY, 0);\n positions.push(-halfWidth + (x + 1) * tileWidth + adjustX, startY + offsetY + adjustY, 0);\n positions.push(-halfWidth + x * tileWidth + adjustX, startY + offsetY + adjustY, 0);\n indices.push(index, index + 1, index + 3, index + 1, index + 2, index + 3);\n index += 4;\n if (flipTile === Mesh.FLIP_TILE || flipTile === Mesh.ROTATE_TILE || flipTile === Mesh.FLIP_N_ROTATE_TILE) {\n uvs = uvs.concat(uvBaseBR[(x + 1) % 2]);\n }\n else if (flipTile === Mesh.FLIP_ROW || flipTile === Mesh.ROTATE_ROW || flipTile === Mesh.FLIP_N_ROTATE_ROW) {\n uvs = uvs.concat(uvBaseBR[1]);\n }\n else {\n uvs = uvs.concat(uvBaseBR[0]);\n }\n colors.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);\n normals.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1);\n }\n }\n if (partialTopRow) {\n const uvBaseTR = [];\n a = 0;\n b = 0;\n c = 1;\n d = offsetY / tileHeight;\n uvBaseTR[0] = [a, b, c, b, c, d, a, d];\n uvBaseTR[1] = [a, b, c, b, c, d, a, d];\n if (flipTile === Mesh.ROTATE_TILE || flipTile === Mesh.ROTATE_ROW) {\n uvBaseTR[1] = [1 - a, 1 - b, 1 - c, 1 - b, 1 - c, 1 - d, 1 - a, 1 - d];\n }\n if (flipTile === Mesh.FLIP_TILE || flipTile === Mesh.FLIP_ROW) {\n uvBaseTR[1] = [1 - a, b, 1 - c, b, 1 - c, d, 1 - a, d];\n }\n if (flipTile === Mesh.FLIP_N_ROTATE_TILE || flipTile === Mesh.FLIP_N_ROTATE_ROW) {\n uvBaseTR[1] = [a, 1 - b, c, 1 - b, c, 1 - d, a, 1 - d];\n }\n for (let x = 0; x < tilesX; x++) {\n positions.push(-halfWidth + x * tileWidth + adjustX, endY - offsetY + adjustY, 0);\n positions.push(-halfWidth + (x + 1) * tileWidth + adjustX, endY - offsetY + adjustY, 0);\n positions.push(-halfWidth + (x + 1) * tileWidth + adjustX, endY + adjustY, 0);\n positions.push(-halfWidth + x * tileWidth + adjustX, endY + adjustY, 0);\n indices.push(index, index + 1, index + 3, index + 1, index + 2, index + 3);\n index += 4;\n if (flipTile === Mesh.FLIP_TILE || flipTile === Mesh.ROTATE_TILE || flipTile === Mesh.FLIP_N_ROTATE_TILE) {\n uvs = uvs.concat(uvBaseTR[(x + tilesY) % 2]);\n }\n else if (flipTile === Mesh.FLIP_ROW || flipTile === Mesh.ROTATE_ROW || flipTile === Mesh.FLIP_N_ROTATE_ROW) {\n uvs = uvs.concat(uvBaseTR[tilesY % 2]);\n }\n else {\n uvs = uvs.concat(uvBaseTR[0]);\n }\n colors.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);\n normals.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1);\n }\n }\n if (partialLeftCol) {\n const uvBaseLC = [];\n a = 1 - offsetX / tileWidth;\n b = 0;\n c = 1;\n d = 1;\n uvBaseLC[0] = [a, b, c, b, c, d, a, d];\n uvBaseLC[1] = [a, b, c, b, c, d, a, d];\n if (flipTile === Mesh.ROTATE_TILE || flipTile === Mesh.ROTATE_ROW) {\n uvBaseLC[1] = [1 - a, 1 - b, 1 - c, 1 - b, 1 - c, 1 - d, 1 - a, 1 - d];\n }\n if (flipTile === Mesh.FLIP_TILE || flipTile === Mesh.FLIP_ROW) {\n uvBaseLC[1] = [1 - a, b, 1 - c, b, 1 - c, d, 1 - a, d];\n }\n if (flipTile === Mesh.FLIP_N_ROTATE_TILE || flipTile === Mesh.FLIP_N_ROTATE_ROW) {\n uvBaseLC[1] = [a, 1 - b, c, 1 - b, c, 1 - d, a, 1 - d];\n }\n for (let y = 0; y < tilesY; y++) {\n positions.push(startX + adjustX, -halfHeight + y * tileHeight + adjustY, 0);\n positions.push(startX + offsetX + adjustX, -halfHeight + y * tileHeight + adjustY, 0);\n positions.push(startX + offsetX + adjustX, -halfHeight + (y + 1) * tileHeight + adjustY, 0);\n positions.push(startX + adjustX, -halfHeight + (y + 1) * tileHeight + adjustY, 0);\n indices.push(index, index + 1, index + 3, index + 1, index + 2, index + 3);\n index += 4;\n if (flipTile === Mesh.FLIP_TILE || flipTile === Mesh.ROTATE_TILE || flipTile === Mesh.FLIP_N_ROTATE_TILE) {\n uvs = uvs.concat(uvBaseLC[(y + 1) % 2]);\n }\n else if (flipTile === Mesh.FLIP_ROW || flipTile === Mesh.ROTATE_ROW || flipTile === Mesh.FLIP_N_ROTATE_ROW) {\n uvs = uvs.concat(uvBaseLC[y % 2]);\n }\n else {\n uvs = uvs.concat(uvBaseLC[0]);\n }\n colors.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);\n normals.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1);\n }\n }\n if (partialRightCol) {\n const uvBaseRC = [];\n a = 0;\n b = 0;\n c = offsetX / tileHeight;\n d = 1;\n uvBaseRC[0] = [a, b, c, b, c, d, a, d];\n uvBaseRC[1] = [a, b, c, b, c, d, a, d];\n if (flipTile === Mesh.ROTATE_TILE || flipTile === Mesh.ROTATE_ROW) {\n uvBaseRC[1] = [1 - a, 1 - b, 1 - c, 1 - b, 1 - c, 1 - d, 1 - a, 1 - d];\n }\n if (flipTile === Mesh.FLIP_TILE || flipTile === Mesh.FLIP_ROW) {\n uvBaseRC[1] = [1 - a, b, 1 - c, b, 1 - c, d, 1 - a, d];\n }\n if (flipTile === Mesh.FLIP_N_ROTATE_TILE || flipTile === Mesh.FLIP_N_ROTATE_ROW) {\n uvBaseRC[1] = [a, 1 - b, c, 1 - b, c, 1 - d, a, 1 - d];\n }\n for (let y = 0; y < tilesY; y++) {\n positions.push(endX - offsetX + adjustX, -halfHeight + y * tileHeight + adjustY, 0);\n positions.push(endX + adjustX, -halfHeight + y * tileHeight + adjustY, 0);\n positions.push(endX + adjustX, -halfHeight + (y + 1) * tileHeight + adjustY, 0);\n positions.push(endX - offsetX + adjustX, -halfHeight + (y + 1) * tileHeight + adjustY, 0);\n indices.push(index, index + 1, index + 3, index + 1, index + 2, index + 3);\n index += 4;\n if (flipTile === Mesh.FLIP_TILE || flipTile === Mesh.ROTATE_TILE || flipTile === Mesh.FLIP_N_ROTATE_TILE) {\n uvs = uvs.concat(uvBaseRC[(y + tilesX) % 2]);\n }\n else if (flipTile === Mesh.FLIP_ROW || flipTile === Mesh.ROTATE_ROW || flipTile === Mesh.FLIP_N_ROTATE_ROW) {\n uvs = uvs.concat(uvBaseRC[y % 2]);\n }\n else {\n uvs = uvs.concat(uvBaseRC[0]);\n }\n colors.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);\n normals.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1);\n }\n }\n }\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n // sides\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, options.frontUVs, options.backUVs);\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n const totalColors = sideOrientation === VertexData.DOUBLESIDE ? colors.concat(colors) : colors;\n vertexData.colors = totalColors;\n return vertexData;\n}\n/**\n * Creates a tiled plane mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/tiled_plane\n * @param name defines the name of the mesh\n * @param options an object used to set the following optional parameters for the tiled plane, required but can be empty\n * * pattern a limited pattern arrangement depending on the number\n * * size of the box\n * * width of the box, overwrites size\n * * height of the box, overwrites size\n * * tileSize sets the width, height and depth of the tile to the value of size, optional default 1\n * * tileWidth sets the width (x direction) of the tile, overwrites the width set by size, optional, default size\n * * tileHeight sets the height (y direction) of the tile, overwrites the height set by size, optional, default size\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * alignHorizontal places whole tiles aligned to the center, left or right of a row\n * * alignVertical places whole tiles aligned to the center, left or right of a column\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.pattern\n * @param options.tileSize\n * @param options.tileWidth\n * @param options.tileHeight\n * @param options.size\n * @param options.width\n * @param options.height\n * @param options.alignHorizontal\n * @param options.alignVertical\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.updatable\n * @param scene defines the hosting scene\n * @returns the box mesh\n */\nexport function CreateTiledPlane(name, options, scene = null) {\n const plane = new Mesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n plane._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreateTiledPlaneVertexData(options);\n vertexData.applyToMesh(plane, options.updatable);\n return plane;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use CreateTiledPlane instead\n */\nexport const TiledPlaneBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateTiledPlane,\n};\nVertexData.CreateTiledPlane = CreateTiledPlaneVertexData;\n//# sourceMappingURL=tiledPlaneBuilder.js.map","import { Matrix, Vector3, Vector4 } from \"../../Maths/math.vector.js\";\nimport { Color4 } from \"../../Maths/math.color.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { CreateTiledPlaneVertexData } from \"./tiledPlaneBuilder.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Creates the VertexData for a tiled box\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/tiled_box\n * @param options an object used to set the following optional parameters for the tiled box, required but can be empty\n * * pattern sets the rotation or reflection pattern for the tiles,\n * * size of the box\n * * width of the box, overwrites size\n * * height of the box, overwrites size\n * * depth of the box, overwrites size\n * * tileSize sets the size of a tile\n * * tileWidth sets the tile width and overwrites tileSize\n * * tileHeight sets the tile width and overwrites tileSize\n * * faceUV an array of 6 Vector4 elements used to set different images to each box side\n * * faceColors an array of 6 Color3 elements used to set different colors to each box side\n * * alignHorizontal places whole tiles aligned to the center, left or right of a row\n * * alignVertical places whole tiles aligned to the center, left or right of a column\n * @param options.pattern\n * @param options.size\n * @param options.width\n * @param options.height\n * @param options.depth\n * @param options.tileSize\n * @param options.tileWidth\n * @param options.tileHeight\n * @param options.faceUV\n * @param options.faceColors\n * @param options.alignHorizontal\n * @param options.alignVertical\n * @param options.sideOrientation\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * @returns the VertexData of the TiledBox\n */\nexport function CreateTiledBoxVertexData(options) {\n const nbFaces = 6;\n const faceUV = options.faceUV || new Array(6);\n const faceColors = options.faceColors;\n const flipTile = options.pattern || Mesh.NO_FLIP;\n const width = options.width || options.size || 1;\n const height = options.height || options.size || 1;\n const depth = options.depth || options.size || 1;\n const tileWidth = options.tileWidth || options.tileSize || 1;\n const tileHeight = options.tileHeight || options.tileSize || 1;\n const alignH = options.alignHorizontal || 0;\n const alignV = options.alignVertical || 0;\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n // default face colors and UV if undefined\n for (let f = 0; f < nbFaces; f++) {\n if (faceUV[f] === undefined) {\n faceUV[f] = new Vector4(0, 0, 1, 1);\n }\n if (faceColors && faceColors[f] === undefined) {\n faceColors[f] = new Color4(1, 1, 1, 1);\n }\n }\n const halfWidth = width / 2;\n const halfHeight = height / 2;\n const halfDepth = depth / 2;\n const faceVertexData = [];\n for (let f = 0; f < 2; f++) {\n //front and back\n faceVertexData[f] = CreateTiledPlaneVertexData({\n pattern: flipTile,\n tileWidth: tileWidth,\n tileHeight: tileHeight,\n width: width,\n height: height,\n alignVertical: alignV,\n alignHorizontal: alignH,\n sideOrientation: sideOrientation,\n });\n }\n for (let f = 2; f < 4; f++) {\n //sides\n faceVertexData[f] = CreateTiledPlaneVertexData({\n pattern: flipTile,\n tileWidth: tileWidth,\n tileHeight: tileHeight,\n width: depth,\n height: height,\n alignVertical: alignV,\n alignHorizontal: alignH,\n sideOrientation: sideOrientation,\n });\n }\n let baseAlignV = alignV;\n if (alignV === Mesh.BOTTOM) {\n baseAlignV = Mesh.TOP;\n }\n else if (alignV === Mesh.TOP) {\n baseAlignV = Mesh.BOTTOM;\n }\n for (let f = 4; f < 6; f++) {\n //top and bottom\n faceVertexData[f] = CreateTiledPlaneVertexData({\n pattern: flipTile,\n tileWidth: tileWidth,\n tileHeight: tileHeight,\n width: width,\n height: depth,\n alignVertical: baseAlignV,\n alignHorizontal: alignH,\n sideOrientation: sideOrientation,\n });\n }\n let positions = [];\n let normals = [];\n let uvs = [];\n let indices = [];\n const colors = [];\n const facePositions = [];\n const faceNormals = [];\n const newFaceUV = [];\n let lu = 0;\n let li = 0;\n for (let f = 0; f < nbFaces; f++) {\n const len = faceVertexData[f].positions.length;\n facePositions[f] = [];\n faceNormals[f] = [];\n for (let p = 0; p < len / 3; p++) {\n facePositions[f].push(new Vector3(faceVertexData[f].positions[3 * p], faceVertexData[f].positions[3 * p + 1], faceVertexData[f].positions[3 * p + 2]));\n faceNormals[f].push(new Vector3(faceVertexData[f].normals[3 * p], faceVertexData[f].normals[3 * p + 1], faceVertexData[f].normals[3 * p + 2]));\n }\n // uvs\n lu = faceVertexData[f].uvs.length;\n newFaceUV[f] = [];\n for (let i = 0; i < lu; i += 2) {\n newFaceUV[f][i] = faceUV[f].x + (faceUV[f].z - faceUV[f].x) * faceVertexData[f].uvs[i];\n newFaceUV[f][i + 1] = faceUV[f].y + (faceUV[f].w - faceUV[f].y) * faceVertexData[f].uvs[i + 1];\n if (CompatibilityOptions.UseOpenGLOrientationForUV) {\n newFaceUV[f][i + 1] = 1.0 - newFaceUV[f][i + 1];\n }\n }\n uvs = uvs.concat(newFaceUV[f]);\n indices = indices.concat(faceVertexData[f].indices.map((x) => x + li));\n li += facePositions[f].length;\n if (faceColors) {\n for (let c = 0; c < 4; c++) {\n colors.push(faceColors[f].r, faceColors[f].g, faceColors[f].b, faceColors[f].a);\n }\n }\n }\n const vec0 = new Vector3(0, 0, halfDepth);\n const mtrx0 = Matrix.RotationY(Math.PI);\n positions = facePositions[0]\n .map((entry) => Vector3.TransformNormal(entry, mtrx0).add(vec0))\n .map((entry) => [entry.x, entry.y, entry.z])\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);\n normals = faceNormals[0]\n .map((entry) => Vector3.TransformNormal(entry, mtrx0))\n .map((entry) => [entry.x, entry.y, entry.z])\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);\n positions = positions.concat(facePositions[1]\n .map((entry) => entry.subtract(vec0))\n .map((entry) => [entry.x, entry.y, entry.z])\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []));\n normals = normals.concat(faceNormals[1].map((entry) => [entry.x, entry.y, entry.z]).reduce((accumulator, currentValue) => accumulator.concat(currentValue), []));\n const vec2 = new Vector3(halfWidth, 0, 0);\n const mtrx2 = Matrix.RotationY(-Math.PI / 2);\n positions = positions.concat(facePositions[2]\n .map((entry) => Vector3.TransformNormal(entry, mtrx2).add(vec2))\n .map((entry) => [entry.x, entry.y, entry.z])\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []));\n normals = normals.concat(faceNormals[2]\n .map((entry) => Vector3.TransformNormal(entry, mtrx2))\n .map((entry) => [entry.x, entry.y, entry.z])\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []));\n const mtrx3 = Matrix.RotationY(Math.PI / 2);\n positions = positions.concat(facePositions[3]\n .map((entry) => Vector3.TransformNormal(entry, mtrx3).subtract(vec2))\n .map((entry) => [entry.x, entry.y, entry.z])\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []));\n normals = normals.concat(faceNormals[3]\n .map((entry) => Vector3.TransformNormal(entry, mtrx3))\n .map((entry) => [entry.x, entry.y, entry.z])\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []));\n const vec4 = new Vector3(0, halfHeight, 0);\n const mtrx4 = Matrix.RotationX(Math.PI / 2);\n positions = positions.concat(facePositions[4]\n .map((entry) => Vector3.TransformNormal(entry, mtrx4).add(vec4))\n .map((entry) => [entry.x, entry.y, entry.z])\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []));\n normals = normals.concat(faceNormals[4]\n .map((entry) => Vector3.TransformNormal(entry, mtrx4))\n .map((entry) => [entry.x, entry.y, entry.z])\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []));\n const mtrx5 = Matrix.RotationX(-Math.PI / 2);\n positions = positions.concat(facePositions[5]\n .map((entry) => Vector3.TransformNormal(entry, mtrx5).subtract(vec4))\n .map((entry) => [entry.x, entry.y, entry.z])\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []));\n normals = normals.concat(faceNormals[5]\n .map((entry) => Vector3.TransformNormal(entry, mtrx5))\n .map((entry) => [entry.x, entry.y, entry.z])\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []));\n // sides\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs);\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n if (faceColors) {\n const totalColors = sideOrientation === VertexData.DOUBLESIDE ? colors.concat(colors) : colors;\n vertexData.colors = totalColors;\n }\n return vertexData;\n}\n/**\n * Creates a tiled box mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/tiled_box\n * @param name defines the name of the mesh\n * @param options an object used to set the following optional parameters for the tiled box, required but can be empty\n * * pattern sets the rotation or reflection pattern for the tiles,\n * * size of the box\n * * width of the box, overwrites size\n * * height of the box, overwrites size\n * * depth of the box, overwrites size\n * * tileSize sets the size of a tile\n * * tileWidth sets the tile width and overwrites tileSize\n * * tileHeight sets the tile width and overwrites tileSize\n * * faceUV an array of 6 Vector4 elements used to set different images to each box side\n * * faceColors an array of 6 Color3 elements used to set different colors to each box side\n * * alignHorizontal places whole tiles aligned to the center, left or right of a row\n * * alignVertical places whole tiles aligned to the center, left or right of a column\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * @param options.pattern\n * @param options.width\n * @param options.height\n * @param options.depth\n * @param options.tileSize\n * @param options.tileWidth\n * @param options.tileHeight\n * @param options.alignHorizontal\n * @param options.alignVertical\n * @param options.faceUV\n * @param options.faceColors\n * @param options.sideOrientation\n * @param options.updatable\n * @param scene defines the hosting scene\n * @returns the box mesh\n */\nexport function CreateTiledBox(name, options, scene = null) {\n const box = new Mesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n box._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreateTiledBoxVertexData(options);\n vertexData.applyToMesh(box, options.updatable);\n return box;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use CreateTiledBox instead\n */\nexport const TiledBoxBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateTiledBox,\n};\nVertexData.CreateTiledBox = CreateTiledBoxVertexData;\n//# sourceMappingURL=tiledBoxBuilder.js.map","import { Vector4, Vector3, Vector2 } from \"../../Maths/math.vector.js\";\nimport { Color4 } from \"../../Maths/math.color.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { Scene } from \"../../scene.js\";\nimport { Axis } from \"../../Maths/math.axis.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Creates the VertexData for a cylinder, cone or prism\n * @param options an object used to set the following optional parameters for the box, required but can be empty\n * * height sets the height (y direction) of the cylinder, optional, default 2\n * * diameterTop sets the diameter of the top of the cone, overwrites diameter, optional, default diameter\n * * diameterBottom sets the diameter of the bottom of the cone, overwrites diameter, optional, default diameter\n * * diameter sets the diameter of the top and bottom of the cone, optional default 1\n * * tessellation the number of prism sides, 3 for a triangular prism, optional, default 24\n * * subdivisions` the number of rings along the cylinder height, optional, default 1\n * * arc a number from 0 to 1, to create an unclosed cylinder based on the fraction of the circumference given by the arc value, optional, default 1\n * * faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\n * * faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\n * * hasRings when true makes each subdivision independently treated as a face for faceUV and faceColors, optional, default false\n * * enclose when true closes an open cylinder by adding extra flat faces between the height axis and vertical edges, think cut cake\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.height\n * @param options.diameterTop\n * @param options.diameterBottom\n * @param options.diameter\n * @param options.tessellation\n * @param options.subdivisions\n * @param options.arc\n * @param options.faceColors\n * @param options.faceUV\n * @param options.hasRings\n * @param options.enclose\n * @param options.cap\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the cylinder, cone or prism\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function CreateCylinderVertexData(options) {\n const height = options.height || 2;\n let diameterTop = options.diameterTop === 0 ? 0 : options.diameterTop || options.diameter || 1;\n let diameterBottom = options.diameterBottom === 0 ? 0 : options.diameterBottom || options.diameter || 1;\n diameterTop = diameterTop || 0.00001; // Prevent broken normals\n diameterBottom = diameterBottom || 0.00001; // Prevent broken normals\n const tessellation = (options.tessellation || 24) | 0;\n const subdivisions = (options.subdivisions || 1) | 0;\n const hasRings = options.hasRings ? true : false;\n const enclose = options.enclose ? true : false;\n const cap = options.cap === 0 ? 0 : options.cap || Mesh.CAP_ALL;\n const arc = options.arc && (options.arc <= 0 || options.arc > 1) ? 1.0 : options.arc || 1.0;\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n const faceUV = options.faceUV || new Array(3);\n const faceColors = options.faceColors;\n // default face colors and UV if undefined\n const quadNb = arc !== 1 && enclose ? 2 : 0;\n const ringNb = hasRings ? subdivisions : 1;\n const surfaceNb = 2 + (1 + quadNb) * ringNb;\n let f;\n for (f = 0; f < surfaceNb; f++) {\n if (faceColors && faceColors[f] === undefined) {\n faceColors[f] = new Color4(1, 1, 1, 1);\n }\n }\n for (f = 0; f < surfaceNb; f++) {\n if (faceUV && faceUV[f] === undefined) {\n faceUV[f] = new Vector4(0, 0, 1, 1);\n }\n }\n const indices = [];\n const positions = [];\n const normals = [];\n const uvs = [];\n const colors = [];\n const angleStep = (Math.PI * 2 * arc) / tessellation;\n let angle;\n let h;\n let radius;\n const tan = (diameterBottom - diameterTop) / 2 / height;\n const ringVertex = Vector3.Zero();\n const ringNormal = Vector3.Zero();\n const ringFirstVertex = Vector3.Zero();\n const ringFirstNormal = Vector3.Zero();\n const quadNormal = Vector3.Zero();\n const Y = Axis.Y;\n // positions, normals, uvs\n let i;\n let j;\n let r;\n let ringIdx = 1;\n let s = 1; // surface index\n let cs = 0;\n let v = 0;\n for (i = 0; i <= subdivisions; i++) {\n h = i / subdivisions;\n radius = (h * (diameterTop - diameterBottom) + diameterBottom) / 2;\n ringIdx = hasRings && i !== 0 && i !== subdivisions ? 2 : 1;\n for (r = 0; r < ringIdx; r++) {\n if (hasRings) {\n s += r;\n }\n if (enclose) {\n s += 2 * r;\n }\n for (j = 0; j <= tessellation; j++) {\n angle = j * angleStep;\n // position\n ringVertex.x = Math.cos(-angle) * radius;\n ringVertex.y = -height / 2 + h * height;\n ringVertex.z = Math.sin(-angle) * radius;\n // normal\n if (diameterTop === 0 && i === subdivisions) {\n // if no top cap, reuse former normals\n ringNormal.x = normals[normals.length - (tessellation + 1) * 3];\n ringNormal.y = normals[normals.length - (tessellation + 1) * 3 + 1];\n ringNormal.z = normals[normals.length - (tessellation + 1) * 3 + 2];\n }\n else {\n ringNormal.x = ringVertex.x;\n ringNormal.z = ringVertex.z;\n ringNormal.y = Math.sqrt(ringNormal.x * ringNormal.x + ringNormal.z * ringNormal.z) * tan;\n ringNormal.normalize();\n }\n // keep first ring vertex values for enclose\n if (j === 0) {\n ringFirstVertex.copyFrom(ringVertex);\n ringFirstNormal.copyFrom(ringNormal);\n }\n positions.push(ringVertex.x, ringVertex.y, ringVertex.z);\n normals.push(ringNormal.x, ringNormal.y, ringNormal.z);\n if (hasRings) {\n v = cs !== s ? faceUV[s].y : faceUV[s].w;\n }\n else {\n v = faceUV[s].y + (faceUV[s].w - faceUV[s].y) * h;\n }\n uvs.push(faceUV[s].x + ((faceUV[s].z - faceUV[s].x) * j) / tessellation, CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - v : v);\n if (faceColors) {\n colors.push(faceColors[s].r, faceColors[s].g, faceColors[s].b, faceColors[s].a);\n }\n }\n // if enclose, add four vertices and their dedicated normals\n if (arc !== 1 && enclose) {\n positions.push(ringVertex.x, ringVertex.y, ringVertex.z);\n positions.push(0, ringVertex.y, 0);\n positions.push(0, ringVertex.y, 0);\n positions.push(ringFirstVertex.x, ringFirstVertex.y, ringFirstVertex.z);\n Vector3.CrossToRef(Y, ringNormal, quadNormal);\n quadNormal.normalize();\n normals.push(quadNormal.x, quadNormal.y, quadNormal.z, quadNormal.x, quadNormal.y, quadNormal.z);\n Vector3.CrossToRef(ringFirstNormal, Y, quadNormal);\n quadNormal.normalize();\n normals.push(quadNormal.x, quadNormal.y, quadNormal.z, quadNormal.x, quadNormal.y, quadNormal.z);\n if (hasRings) {\n v = cs !== s ? faceUV[s + 1].y : faceUV[s + 1].w;\n }\n else {\n v = faceUV[s + 1].y + (faceUV[s + 1].w - faceUV[s + 1].y) * h;\n }\n uvs.push(faceUV[s + 1].x, CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - v : v);\n uvs.push(faceUV[s + 1].z, CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - v : v);\n if (hasRings) {\n v = cs !== s ? faceUV[s + 2].y : faceUV[s + 2].w;\n }\n else {\n v = faceUV[s + 2].y + (faceUV[s + 2].w - faceUV[s + 2].y) * h;\n }\n uvs.push(faceUV[s + 2].x, CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - v : v);\n uvs.push(faceUV[s + 2].z, CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - v : v);\n if (faceColors) {\n colors.push(faceColors[s + 1].r, faceColors[s + 1].g, faceColors[s + 1].b, faceColors[s + 1].a);\n colors.push(faceColors[s + 1].r, faceColors[s + 1].g, faceColors[s + 1].b, faceColors[s + 1].a);\n colors.push(faceColors[s + 2].r, faceColors[s + 2].g, faceColors[s + 2].b, faceColors[s + 2].a);\n colors.push(faceColors[s + 2].r, faceColors[s + 2].g, faceColors[s + 2].b, faceColors[s + 2].a);\n }\n }\n if (cs !== s) {\n cs = s;\n }\n }\n }\n // indices\n const e = arc !== 1 && enclose ? tessellation + 4 : tessellation; // correction of number of iteration if enclose\n i = 0;\n for (s = 0; s < subdivisions; s++) {\n let i0 = 0;\n let i1 = 0;\n let i2 = 0;\n let i3 = 0;\n for (j = 0; j < tessellation; j++) {\n i0 = i * (e + 1) + j;\n i1 = (i + 1) * (e + 1) + j;\n i2 = i * (e + 1) + (j + 1);\n i3 = (i + 1) * (e + 1) + (j + 1);\n indices.push(i0, i1, i2);\n indices.push(i3, i2, i1);\n }\n if (arc !== 1 && enclose) {\n // if enclose, add two quads\n indices.push(i0 + 2, i1 + 2, i2 + 2);\n indices.push(i3 + 2, i2 + 2, i1 + 2);\n indices.push(i0 + 4, i1 + 4, i2 + 4);\n indices.push(i3 + 4, i2 + 4, i1 + 4);\n }\n i = hasRings ? i + 2 : i + 1;\n }\n // Caps\n const createCylinderCap = (isTop) => {\n const radius = isTop ? diameterTop / 2 : diameterBottom / 2;\n if (radius === 0) {\n return;\n }\n // Cap positions, normals & uvs\n let angle;\n let circleVector;\n let i;\n const u = isTop ? faceUV[surfaceNb - 1] : faceUV[0];\n let c = null;\n if (faceColors) {\n c = isTop ? faceColors[surfaceNb - 1] : faceColors[0];\n }\n // cap center\n const vbase = positions.length / 3;\n const offset = isTop ? height / 2 : -height / 2;\n const center = new Vector3(0, offset, 0);\n positions.push(center.x, center.y, center.z);\n normals.push(0, isTop ? 1 : -1, 0);\n const v = u.y + (u.w - u.y) * 0.5;\n uvs.push(u.x + (u.z - u.x) * 0.5, CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - v : v);\n if (c) {\n colors.push(c.r, c.g, c.b, c.a);\n }\n const textureScale = new Vector2(0.5, 0.5);\n for (i = 0; i <= tessellation; i++) {\n angle = (Math.PI * 2 * i * arc) / tessellation;\n const cos = Math.cos(-angle);\n const sin = Math.sin(-angle);\n circleVector = new Vector3(cos * radius, offset, sin * radius);\n const textureCoordinate = new Vector2(cos * textureScale.x + 0.5, sin * textureScale.y + 0.5);\n positions.push(circleVector.x, circleVector.y, circleVector.z);\n normals.push(0, isTop ? 1 : -1, 0);\n const v = u.y + (u.w - u.y) * textureCoordinate.y;\n uvs.push(u.x + (u.z - u.x) * textureCoordinate.x, CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - v : v);\n if (c) {\n colors.push(c.r, c.g, c.b, c.a);\n }\n }\n // Cap indices\n for (i = 0; i < tessellation; i++) {\n if (!isTop) {\n indices.push(vbase);\n indices.push(vbase + (i + 1));\n indices.push(vbase + (i + 2));\n }\n else {\n indices.push(vbase);\n indices.push(vbase + (i + 2));\n indices.push(vbase + (i + 1));\n }\n }\n };\n // add caps to geometry based on cap parameter\n if (cap === Mesh.CAP_START || cap === Mesh.CAP_ALL) {\n createCylinderCap(false);\n }\n if (cap === Mesh.CAP_END || cap === Mesh.CAP_ALL) {\n createCylinderCap(true);\n }\n // Sides\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, options.frontUVs, options.backUVs);\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n if (faceColors) {\n vertexData.colors = colors;\n }\n return vertexData;\n}\n/**\n * Creates a cylinder or a cone mesh\n * * The parameter `height` sets the height size (float) of the cylinder/cone (float, default 2).\n * * The parameter `diameter` sets the diameter of the top and bottom cap at once (float, default 1).\n * * The parameters `diameterTop` and `diameterBottom` overwrite the parameter `diameter` and set respectively the top cap and bottom cap diameter (floats, default 1). The parameter \"diameterBottom\" can't be zero.\n * * The parameter `tessellation` sets the number of cylinder sides (positive integer, default 24). Set it to 3 to get a prism for instance.\n * * The parameter `subdivisions` sets the number of rings along the cylinder height (positive integer, default 1).\n * * The parameter `hasRings` (boolean, default false) makes the subdivisions independent from each other, so they become different faces.\n * * The parameter `enclose` (boolean, default false) adds two extra faces per subdivision to a sliced cylinder to close it around its height axis.\n * * The parameter `cap` sets the way the cylinder is capped. Possible values : BABYLON.Mesh.NO_CAP, BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL (default).\n * * The parameter `arc` (float, default 1) is the ratio (max 1) to apply to the circumference to slice the cylinder.\n * * You can set different colors and different images to each box side by using the parameters `faceColors` (an array of n Color3 elements) and `faceUV` (an array of n Vector4 elements).\n * * The value of n is the number of cylinder faces. If the cylinder has only 1 subdivisions, n equals : top face + cylinder surface + bottom face = 3\n * * Now, if the cylinder has 5 independent subdivisions (hasRings = true), n equals : top face + 5 stripe surfaces + bottom face = 2 + 5 = 7\n * * Finally, if the cylinder has 5 independent subdivisions and is enclose, n equals : top face + 5 x (stripe surface + 2 closing faces) + bottom face = 2 + 5 * 3 = 17\n * * Each array (color or UVs) is always ordered the same way : the first element is the bottom cap, the last element is the top cap. The other elements are each a ring surface.\n * * If `enclose` is false, a ring surface is one element.\n * * If `enclose` is true, a ring surface is 3 successive elements in the array : the tubular surface, then the two closing faces.\n * * Example how to set colors and textures on a sliced cylinder : https://www.html5gamedevs.com/topic/17945-creating-a-closed-slice-of-a-cylinder/#comment-106379\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.height\n * @param options.diameterTop\n * @param options.diameterBottom\n * @param options.diameter\n * @param options.tessellation\n * @param options.subdivisions\n * @param options.arc\n * @param options.faceColors\n * @param options.faceUV\n * @param options.updatable\n * @param options.hasRings\n * @param options.enclose\n * @param options.cap\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param scene defines the hosting scene\n * @returns the cylinder mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#cylinder-or-cone\n */\nexport function CreateCylinder(name, options = {}, scene) {\n const cylinder = new Mesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n cylinder._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreateCylinderVertexData(options);\n vertexData.applyToMesh(cylinder, options.updatable);\n return cylinder;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated Please use CreateCylinder directly\n */\nexport const CylinderBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateCylinder,\n};\nVertexData.CreateCylinder = CreateCylinderVertexData;\nMesh.CreateCylinder = (name, height, diameterTop, diameterBottom, tessellation, subdivisions, scene, updatable, sideOrientation) => {\n if (scene === undefined || !(scene instanceof Scene)) {\n if (scene !== undefined) {\n sideOrientation = updatable || Mesh.DEFAULTSIDE;\n updatable = scene;\n }\n scene = subdivisions;\n subdivisions = 1;\n }\n const options = {\n height,\n diameterTop,\n diameterBottom,\n tessellation,\n subdivisions,\n sideOrientation,\n updatable,\n };\n return CreateCylinder(name, options, scene);\n};\n//# sourceMappingURL=cylinderBuilder.js.map","import { Matrix, Vector3, Vector2 } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Creates the VertexData for a torus\n * @param options an object used to set the following optional parameters for the box, required but can be empty\n * * diameter the diameter of the torus, optional default 1\n * * thickness the diameter of the tube forming the torus, optional default 0.5\n * * tessellation the number of prism sides, 3 for a triangular prism, optional, default 24\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.diameter\n * @param options.thickness\n * @param options.tessellation\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the torus\n */\nexport function CreateTorusVertexData(options) {\n const indices = [];\n const positions = [];\n const normals = [];\n const uvs = [];\n const diameter = options.diameter || 1;\n const thickness = options.thickness || 0.5;\n const tessellation = (options.tessellation || 16) | 0;\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n const stride = tessellation + 1;\n for (let i = 0; i <= tessellation; i++) {\n const u = i / tessellation;\n const outerAngle = (i * Math.PI * 2.0) / tessellation - Math.PI / 2.0;\n const transform = Matrix.Translation(diameter / 2.0, 0, 0).multiply(Matrix.RotationY(outerAngle));\n for (let j = 0; j <= tessellation; j++) {\n const v = 1 - j / tessellation;\n const innerAngle = (j * Math.PI * 2.0) / tessellation + Math.PI;\n const dx = Math.cos(innerAngle);\n const dy = Math.sin(innerAngle);\n // Create a vertex.\n let normal = new Vector3(dx, dy, 0);\n let position = normal.scale(thickness / 2);\n const textureCoordinate = new Vector2(u, v);\n position = Vector3.TransformCoordinates(position, transform);\n normal = Vector3.TransformNormal(normal, transform);\n positions.push(position.x, position.y, position.z);\n normals.push(normal.x, normal.y, normal.z);\n uvs.push(textureCoordinate.x, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - textureCoordinate.y : textureCoordinate.y);\n // And create indices for two triangles.\n const nextI = (i + 1) % stride;\n const nextJ = (j + 1) % stride;\n indices.push(i * stride + j);\n indices.push(i * stride + nextJ);\n indices.push(nextI * stride + j);\n indices.push(i * stride + nextJ);\n indices.push(nextI * stride + nextJ);\n indices.push(nextI * stride + j);\n }\n }\n // Sides\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, options.frontUVs, options.backUVs);\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n return vertexData;\n}\n/**\n * Creates a torus mesh\n * * The parameter `diameter` sets the diameter size (float) of the torus (default 1)\n * * The parameter `thickness` sets the diameter size of the tube of the torus (float, default 0.5)\n * * The parameter `tessellation` sets the number of torus sides (positive integer, default 16)\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.diameter\n * @param options.thickness\n * @param options.tessellation\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param scene defines the hosting scene\n * @returns the torus mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#torus\n */\nexport function CreateTorus(name, options = {}, scene) {\n const torus = new Mesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n torus._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreateTorusVertexData(options);\n vertexData.applyToMesh(torus, options.updatable);\n return torus;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use CreateTorus instead\n */\nexport const TorusBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateTorus,\n};\nVertexData.CreateTorus = CreateTorusVertexData;\nMesh.CreateTorus = (name, diameter, thickness, tessellation, scene, updatable, sideOrientation) => {\n const options = {\n diameter,\n thickness,\n tessellation,\n sideOrientation,\n updatable,\n };\n return CreateTorus(name, options, scene);\n};\n//# sourceMappingURL=torusBuilder.js.map","import { Vector3 } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n// based on http://code.google.com/p/away3d/source/browse/trunk/fp10/Away3D/src/away3d/primitives/TorusKnot.as?spec=svn2473&r=2473\n/**\n * Creates the VertexData for a TorusKnot\n * @param options an object used to set the following optional parameters for the TorusKnot, required but can be empty\n * * radius the radius of the torus knot, optional, default 2\n * * tube the thickness of the tube, optional, default 0.5\n * * radialSegments the number of sides on each tube segments, optional, default 32\n * * tubularSegments the number of tubes to decompose the knot into, optional, default 32\n * * p the number of windings around the z axis, optional, default 2\n * * q the number of windings around the x axis, optional, default 3\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.radius\n * @param options.tube\n * @param options.radialSegments\n * @param options.tubularSegments\n * @param options.p\n * @param options.q\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the Torus Knot\n */\nexport function CreateTorusKnotVertexData(options) {\n const indices = [];\n const positions = [];\n const normals = [];\n const uvs = [];\n const radius = options.radius || 2;\n const tube = options.tube || 0.5;\n const radialSegments = options.radialSegments || 32;\n const tubularSegments = options.tubularSegments || 32;\n const p = options.p || 2;\n const q = options.q || 3;\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n // Helper\n const getPos = (angle) => {\n const cu = Math.cos(angle);\n const su = Math.sin(angle);\n const quOverP = (q / p) * angle;\n const cs = Math.cos(quOverP);\n const tx = radius * (2 + cs) * 0.5 * cu;\n const ty = radius * (2 + cs) * su * 0.5;\n const tz = radius * Math.sin(quOverP) * 0.5;\n return new Vector3(tx, ty, tz);\n };\n // Vertices\n let i;\n let j;\n for (i = 0; i <= radialSegments; i++) {\n const modI = i % radialSegments;\n const u = (modI / radialSegments) * 2 * p * Math.PI;\n const p1 = getPos(u);\n const p2 = getPos(u + 0.01);\n const tang = p2.subtract(p1);\n let n = p2.add(p1);\n const bitan = Vector3.Cross(tang, n);\n n = Vector3.Cross(bitan, tang);\n bitan.normalize();\n n.normalize();\n for (j = 0; j < tubularSegments; j++) {\n const modJ = j % tubularSegments;\n const v = (modJ / tubularSegments) * 2 * Math.PI;\n const cx = -tube * Math.cos(v);\n const cy = tube * Math.sin(v);\n positions.push(p1.x + cx * n.x + cy * bitan.x);\n positions.push(p1.y + cx * n.y + cy * bitan.y);\n positions.push(p1.z + cx * n.z + cy * bitan.z);\n uvs.push(i / radialSegments);\n uvs.push(CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - j / tubularSegments : j / tubularSegments);\n }\n }\n for (i = 0; i < radialSegments; i++) {\n for (j = 0; j < tubularSegments; j++) {\n const jNext = (j + 1) % tubularSegments;\n const a = i * tubularSegments + j;\n const b = (i + 1) * tubularSegments + j;\n const c = (i + 1) * tubularSegments + jNext;\n const d = i * tubularSegments + jNext;\n indices.push(d);\n indices.push(b);\n indices.push(a);\n indices.push(d);\n indices.push(c);\n indices.push(b);\n }\n }\n // Normals\n VertexData.ComputeNormals(positions, indices, normals);\n // Sides\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, options.frontUVs, options.backUVs);\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n return vertexData;\n}\n/**\n * Creates a torus knot mesh\n * * The parameter `radius` sets the global radius size (float) of the torus knot (default 2)\n * * The parameter `radialSegments` sets the number of sides on each tube segments (positive integer, default 32)\n * * The parameter `tubularSegments` sets the number of tubes to decompose the knot into (positive integer, default 32)\n * * The parameters `p` and `q` are the number of windings on each axis (positive integers, default 2 and 3)\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.radius\n * @param options.tube\n * @param options.radialSegments\n * @param options.tubularSegments\n * @param options.p\n * @param options.q\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param scene defines the hosting scene\n * @returns the torus knot mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#torus-knot\n */\nexport function CreateTorusKnot(name, options = {}, scene) {\n const torusKnot = new Mesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n torusKnot._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreateTorusKnotVertexData(options);\n vertexData.applyToMesh(torusKnot, options.updatable);\n return torusKnot;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use CreateTorusKnot instead\n */\nexport const TorusKnotBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateTorusKnot,\n};\nVertexData.CreateTorusKnot = CreateTorusKnotVertexData;\nMesh.CreateTorusKnot = (name, radius, tube, radialSegments, tubularSegments, p, q, scene, updatable, sideOrientation) => {\n const options = {\n radius,\n tube,\n radialSegments,\n tubularSegments,\n p,\n q,\n sideOrientation,\n updatable,\n };\n return CreateTorusKnot(name, options, scene);\n};\n//# sourceMappingURL=torusKnotBuilder.js.map","/* eslint-disable @typescript-eslint/naming-convention */\nimport { Vector3 } from \"../../Maths/math.vector.js\";\nimport { _CreationDataStorage, Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { LinesMesh } from \"../../Meshes/linesMesh.js\";\nimport { VertexBuffer } from \"../../Buffers/buffer.js\";\nimport { Logger } from \"../../Misc/logger.js\";\n/**\n * Creates the VertexData of the LineSystem\n * @param options an object used to set the following optional parameters for the LineSystem, required but can be empty\n * - lines an array of lines, each line being an array of successive Vector3\n * - colors an array of line colors, each of the line colors being an array of successive Color4, one per line point\n * @param options.lines\n * @param options.colors\n * @returns the VertexData of the LineSystem\n */\nexport function CreateLineSystemVertexData(options) {\n const indices = [];\n const positions = [];\n const lines = options.lines;\n const colors = options.colors;\n const vertexColors = [];\n let idx = 0;\n for (let l = 0; l < lines.length; l++) {\n const points = lines[l];\n for (let index = 0; index < points.length; index++) {\n const { x, y, z } = points[index];\n positions.push(x, y, z);\n if (colors) {\n const color = colors[l];\n const { r, g, b, a } = color[index];\n vertexColors.push(r, g, b, a);\n }\n if (index > 0) {\n indices.push(idx - 1);\n indices.push(idx);\n }\n idx++;\n }\n }\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n if (colors) {\n vertexData.colors = vertexColors;\n }\n return vertexData;\n}\n/**\n * Create the VertexData for a DashedLines\n * @param options an object used to set the following optional parameters for the DashedLines, required but can be empty\n * - points an array successive Vector3\n * - dashSize the size of the dashes relative to the dash number, optional, default 3\n * - gapSize the size of the gap between two successive dashes relative to the dash number, optional, default 1\n * - dashNb the intended total number of dashes, optional, default 200\n * @param options.points\n * @param options.dashSize\n * @param options.gapSize\n * @param options.dashNb\n * @returns the VertexData for the DashedLines\n */\nexport function CreateDashedLinesVertexData(options) {\n const dashSize = options.dashSize || 3;\n const gapSize = options.gapSize || 1;\n const dashNb = options.dashNb || 200;\n const points = options.points;\n const positions = [];\n const indices = [];\n const curvect = Vector3.Zero();\n let lg = 0;\n let nb = 0;\n let shft = 0;\n let dashshft = 0;\n let curshft = 0;\n let idx = 0;\n let i = 0;\n for (i = 0; i < points.length - 1; i++) {\n points[i + 1].subtractToRef(points[i], curvect);\n lg += curvect.length();\n }\n shft = lg / dashNb;\n dashshft = (dashSize * shft) / (dashSize + gapSize);\n for (i = 0; i < points.length - 1; i++) {\n points[i + 1].subtractToRef(points[i], curvect);\n nb = Math.floor(curvect.length() / shft);\n curvect.normalize();\n for (let j = 0; j < nb; j++) {\n curshft = shft * j;\n positions.push(points[i].x + curshft * curvect.x, points[i].y + curshft * curvect.y, points[i].z + curshft * curvect.z);\n positions.push(points[i].x + (curshft + dashshft) * curvect.x, points[i].y + (curshft + dashshft) * curvect.y, points[i].z + (curshft + dashshft) * curvect.z);\n indices.push(idx, idx + 1);\n idx += 2;\n }\n }\n // Result\n const vertexData = new VertexData();\n vertexData.positions = positions;\n vertexData.indices = indices;\n return vertexData;\n}\n/**\n * Creates a line system mesh. A line system is a pool of many lines gathered in a single mesh\n * * A line system mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of lines as an input parameter\n * * Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineSystem to this static function\n * * The parameter `lines` is an array of lines, each line being an array of successive Vector3\n * * The optional parameter `instance` is an instance of an existing LineSystem object to be updated with the passed `lines` parameter\n * * The optional parameter `colors` is an array of line colors, each line colors being an array of successive Color4, one per line point\n * * The optional parameter `useVertexAlpha` is to be set to `false` (default `true`) when you don't need the alpha blending (faster)\n * * The optional parameter `material` is the material to use to draw the lines if provided. If not, a default material will be created\n * * Updating a simple Line mesh, you just need to update every line in the `lines` array : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#lines-and-dashedlines\n * * When updating an instance, remember that only line point positions can change, not the number of points, neither the number of lines\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#line-system\n * @param name defines the name of the new line system\n * @param options defines the options used to create the line system\n * @param options.lines\n * @param options.updatable\n * @param options.instance\n * @param options.colors\n * @param options.useVertexAlpha\n * @param options.material\n * @param scene defines the hosting scene\n * @returns a new line system mesh\n */\nexport function CreateLineSystem(name, options, scene = null) {\n const instance = options.instance;\n const lines = options.lines;\n const colors = options.colors;\n if (instance) {\n // lines update\n const positions = instance.getVerticesData(VertexBuffer.PositionKind);\n let vertexColor;\n let lineColors;\n if (colors) {\n vertexColor = instance.getVerticesData(VertexBuffer.ColorKind);\n }\n let i = 0;\n let c = 0;\n for (let l = 0; l < lines.length; l++) {\n const points = lines[l];\n for (let p = 0; p < points.length; p++) {\n positions[i] = points[p].x;\n positions[i + 1] = points[p].y;\n positions[i + 2] = points[p].z;\n if (colors && vertexColor) {\n lineColors = colors[l];\n vertexColor[c] = lineColors[p].r;\n vertexColor[c + 1] = lineColors[p].g;\n vertexColor[c + 2] = lineColors[p].b;\n vertexColor[c + 3] = lineColors[p].a;\n c += 4;\n }\n i += 3;\n }\n }\n instance.updateVerticesData(VertexBuffer.PositionKind, positions, false, false);\n if (colors && vertexColor) {\n instance.updateVerticesData(VertexBuffer.ColorKind, vertexColor, false, false);\n }\n return instance;\n }\n // line system creation\n const useVertexColor = colors ? true : false;\n const lineSystem = new LinesMesh(name, scene, null, undefined, undefined, useVertexColor, options.useVertexAlpha, options.material);\n const vertexData = CreateLineSystemVertexData(options);\n vertexData.applyToMesh(lineSystem, options.updatable);\n return lineSystem;\n}\n/**\n * Creates a line mesh\n * A line mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of points as an input parameter\n * * Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineMesh to this static function\n * * The parameter `points` is an array successive Vector3\n * * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#lines-and-dashedlines\n * * The optional parameter `colors` is an array of successive Color4, one per line point\n * * The optional parameter `useVertexAlpha` is to be set to `false` (default `true`) when you don't need alpha blending (faster)\n * * The optional parameter `material` is the material to use to draw the lines if provided. If not, a default material will be created\n * * When updating an instance, remember that only point positions can change, not the number of points\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#lines\n * @param name defines the name of the new line system\n * @param options defines the options used to create the line system\n * @param options.points\n * @param options.updatable\n * @param options.instance\n * @param options.colors\n * @param options.useVertexAlpha\n * @param options.material\n * @param scene defines the hosting scene\n * @returns a new line mesh\n */\nexport function CreateLines(name, options, scene = null) {\n const colors = options.colors ? [options.colors] : null;\n const lines = CreateLineSystem(name, { lines: [options.points], updatable: options.updatable, instance: options.instance, colors: colors, useVertexAlpha: options.useVertexAlpha, material: options.material }, scene);\n return lines;\n}\n/**\n * Creates a dashed line mesh\n * * A dashed line mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of points as an input parameter\n * * Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineMesh to this static function\n * * The parameter `points` is an array successive Vector3\n * * The parameter `dashNb` is the intended total number of dashes (positive integer, default 200)\n * * The parameter `dashSize` is the size of the dashes relatively the dash number (positive float, default 3)\n * * The parameter `gapSize` is the size of the gap between two successive dashes relatively the dash number (positive float, default 1)\n * * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#lines-and-dashedlines\n * * The optional parameter `useVertexAlpha` is to be set to `false` (default `true`) when you don't need the alpha blending (faster)\n * * The optional parameter `material` is the material to use to draw the lines if provided. If not, a default material will be created\n * * When updating an instance, remember that only point positions can change, not the number of points\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.points\n * @param options.dashSize\n * @param options.gapSize\n * @param options.dashNb\n * @param options.updatable\n * @param options.instance\n * @param options.useVertexAlpha\n * @param options.material\n * @param scene defines the hosting scene\n * @returns the dashed line mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#dashed-lines\n */\nexport function CreateDashedLines(name, options, scene = null) {\n const points = options.points;\n const instance = options.instance;\n const gapSize = options.gapSize || 1;\n const dashSize = options.dashSize || 3;\n if (instance) {\n // dashed lines update\n const positionFunction = (positions) => {\n const curvect = Vector3.Zero();\n const nbSeg = positions.length / 6;\n let lg = 0;\n let nb = 0;\n let shft = 0;\n let dashshft = 0;\n let curshft = 0;\n let p = 0;\n let i = 0;\n let j = 0;\n for (i = 0; i < points.length - 1; i++) {\n points[i + 1].subtractToRef(points[i], curvect);\n lg += curvect.length();\n }\n shft = lg / nbSeg;\n const dashSize = instance._creationDataStorage.dashSize;\n const gapSize = instance._creationDataStorage.gapSize;\n dashshft = (dashSize * shft) / (dashSize + gapSize);\n for (i = 0; i < points.length - 1; i++) {\n points[i + 1].subtractToRef(points[i], curvect);\n nb = Math.floor(curvect.length() / shft);\n curvect.normalize();\n j = 0;\n while (j < nb && p < positions.length) {\n curshft = shft * j;\n positions[p] = points[i].x + curshft * curvect.x;\n positions[p + 1] = points[i].y + curshft * curvect.y;\n positions[p + 2] = points[i].z + curshft * curvect.z;\n positions[p + 3] = points[i].x + (curshft + dashshft) * curvect.x;\n positions[p + 4] = points[i].y + (curshft + dashshft) * curvect.y;\n positions[p + 5] = points[i].z + (curshft + dashshft) * curvect.z;\n p += 6;\n j++;\n }\n }\n while (p < positions.length) {\n positions[p] = points[i].x;\n positions[p + 1] = points[i].y;\n positions[p + 2] = points[i].z;\n p += 3;\n }\n };\n if (options.dashNb || options.dashSize || options.gapSize || options.useVertexAlpha || options.material) {\n Logger.Warn(\"You have used an option other than points with the instance option. Please be aware that these other options will be ignored.\");\n }\n instance.updateMeshPositions(positionFunction, false);\n return instance;\n }\n // dashed lines creation\n const dashedLines = new LinesMesh(name, scene, null, undefined, undefined, undefined, options.useVertexAlpha, options.material);\n const vertexData = CreateDashedLinesVertexData(options);\n vertexData.applyToMesh(dashedLines, options.updatable);\n dashedLines._creationDataStorage = new _CreationDataStorage();\n dashedLines._creationDataStorage.dashSize = dashSize;\n dashedLines._creationDataStorage.gapSize = gapSize;\n return dashedLines;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use the functions directly from the module\n */\nexport const LinesBuilder = {\n CreateDashedLines,\n CreateLineSystem,\n CreateLines,\n};\nVertexData.CreateLineSystem = CreateLineSystemVertexData;\nVertexData.CreateDashedLines = CreateDashedLinesVertexData;\nMesh.CreateLines = (name, points, scene = null, updatable = false, instance = null) => {\n const options = {\n points,\n updatable,\n instance,\n };\n return CreateLines(name, options, scene);\n};\nMesh.CreateDashedLines = (name, points, dashSize, gapSize, dashNb, scene = null, updatable, instance) => {\n const options = {\n points,\n dashSize,\n gapSize,\n dashNb,\n updatable,\n instance,\n };\n return CreateDashedLines(name, options, scene);\n};\n//# sourceMappingURL=linesBuilder.js.map","import { Logger } from \"../Misc/logger.js\";\nimport { Vector3, Vector2 } from \"../Maths/math.vector.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { Mesh } from \"../Meshes/mesh.js\";\nimport { VertexData } from \"../Meshes/mesh.vertexData.js\";\nimport { Path2 } from \"../Maths/math.path.js\";\nimport { Epsilon } from \"../Maths/math.constants.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\n/**\n * Vector2 wth index property\n */\nclass IndexedVector2 extends Vector2 {\n constructor(original, \n /** Index of the vector2 */\n index) {\n super(original.x, original.y);\n this.index = index;\n }\n}\n/**\n * Defines points to create a polygon\n */\nclass PolygonPoints {\n constructor() {\n this.elements = [];\n }\n add(originalPoints) {\n const result = [];\n originalPoints.forEach((point) => {\n const newPoint = new IndexedVector2(point, this.elements.length);\n result.push(newPoint);\n this.elements.push(newPoint);\n });\n return result;\n }\n computeBounds() {\n const lmin = new Vector2(this.elements[0].x, this.elements[0].y);\n const lmax = new Vector2(this.elements[0].x, this.elements[0].y);\n this.elements.forEach((point) => {\n // x\n if (point.x < lmin.x) {\n lmin.x = point.x;\n }\n else if (point.x > lmax.x) {\n lmax.x = point.x;\n }\n // y\n if (point.y < lmin.y) {\n lmin.y = point.y;\n }\n else if (point.y > lmax.y) {\n lmax.y = point.y;\n }\n });\n return {\n min: lmin,\n max: lmax,\n width: lmax.x - lmin.x,\n height: lmax.y - lmin.y,\n };\n }\n}\n/**\n * Polygon\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#non-regular-polygon\n */\nexport class Polygon {\n /**\n * Creates a rectangle\n * @param xmin bottom X coord\n * @param ymin bottom Y coord\n * @param xmax top X coord\n * @param ymax top Y coord\n * @returns points that make the resulting rectangle\n */\n static Rectangle(xmin, ymin, xmax, ymax) {\n return [new Vector2(xmin, ymin), new Vector2(xmax, ymin), new Vector2(xmax, ymax), new Vector2(xmin, ymax)];\n }\n /**\n * Creates a circle\n * @param radius radius of circle\n * @param cx scale in x\n * @param cy scale in y\n * @param numberOfSides number of sides that make up the circle\n * @returns points that make the resulting circle\n */\n static Circle(radius, cx = 0, cy = 0, numberOfSides = 32) {\n const result = [];\n let angle = 0;\n const increment = (Math.PI * 2) / numberOfSides;\n for (let i = 0; i < numberOfSides; i++) {\n result.push(new Vector2(cx + Math.cos(angle) * radius, cy + Math.sin(angle) * radius));\n angle -= increment;\n }\n return result;\n }\n /**\n * Creates a polygon from input string\n * @param input Input polygon data\n * @returns the parsed points\n */\n static Parse(input) {\n const floats = input\n .split(/[^-+eE.\\d]+/)\n .map(parseFloat)\n .filter((val) => !isNaN(val));\n let i;\n const result = [];\n for (i = 0; i < (floats.length & 0x7ffffffe); i += 2) {\n result.push(new Vector2(floats[i], floats[i + 1]));\n }\n return result;\n }\n /**\n * Starts building a polygon from x and y coordinates\n * @param x x coordinate\n * @param y y coordinate\n * @returns the started path2\n */\n static StartingAt(x, y) {\n return Path2.StartingAt(x, y);\n }\n}\n/**\n * Builds a polygon\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/polyMeshBuilder\n */\nexport class PolygonMeshBuilder {\n _addToepoint(points) {\n for (const p of points) {\n this._epoints.push(p.x, p.y);\n }\n }\n /**\n * Creates a PolygonMeshBuilder\n * @param name name of the builder\n * @param contours Path of the polygon\n * @param scene scene to add to when creating the mesh\n * @param earcutInjection can be used to inject your own earcut reference\n */\n constructor(name, contours, scene, earcutInjection = earcut) {\n this._points = new PolygonPoints();\n this._outlinepoints = new PolygonPoints();\n this._holes = new Array();\n this._epoints = new Array();\n this._eholes = new Array();\n this.bjsEarcut = earcutInjection;\n this._name = name;\n this._scene = scene || EngineStore.LastCreatedScene;\n let points;\n if (contours instanceof Path2) {\n points = contours.getPoints();\n }\n else {\n points = contours;\n }\n this._addToepoint(points);\n this._points.add(points);\n this._outlinepoints.add(points);\n if (typeof this.bjsEarcut === \"undefined\") {\n Logger.Warn(\"Earcut was not found, the polygon will not be built.\");\n }\n }\n /**\n * Adds a hole within the polygon\n * @param hole Array of points defining the hole\n * @returns this\n */\n addHole(hole) {\n this._points.add(hole);\n const holepoints = new PolygonPoints();\n holepoints.add(hole);\n this._holes.push(holepoints);\n this._eholes.push(this._epoints.length / 2);\n this._addToepoint(hole);\n return this;\n }\n /**\n * Creates the polygon\n * @param updatable If the mesh should be updatable\n * @param depth The depth of the mesh created\n * @param smoothingThreshold Dot product threshold for smoothed normals\n * @returns the created mesh\n */\n build(updatable = false, depth = 0, smoothingThreshold = 2) {\n const result = new Mesh(this._name, this._scene);\n const vertexData = this.buildVertexData(depth, smoothingThreshold);\n result.setVerticesData(VertexBuffer.PositionKind, vertexData.positions, updatable);\n result.setVerticesData(VertexBuffer.NormalKind, vertexData.normals, updatable);\n result.setVerticesData(VertexBuffer.UVKind, vertexData.uvs, updatable);\n result.setIndices(vertexData.indices);\n return result;\n }\n /**\n * Creates the polygon\n * @param depth The depth of the mesh created\n * @param smoothingThreshold Dot product threshold for smoothed normals\n * @returns the created VertexData\n */\n buildVertexData(depth = 0, smoothingThreshold = 2) {\n const result = new VertexData();\n const normals = [];\n const positions = [];\n const uvs = [];\n const bounds = this._points.computeBounds();\n this._points.elements.forEach((p) => {\n normals.push(0, 1.0, 0);\n positions.push(p.x, 0, p.y);\n uvs.push((p.x - bounds.min.x) / bounds.width, (p.y - bounds.min.y) / bounds.height);\n });\n const indices = [];\n const res = this.bjsEarcut(this._epoints, this._eholes, 2);\n for (let i = 0; i < res.length; i++) {\n indices.push(res[i]);\n }\n if (depth > 0) {\n const positionscount = positions.length / 3; //get the current pointcount\n this._points.elements.forEach((p) => {\n //add the elements at the depth\n normals.push(0, -1.0, 0);\n positions.push(p.x, -depth, p.y);\n uvs.push(1 - (p.x - bounds.min.x) / bounds.width, 1 - (p.y - bounds.min.y) / bounds.height);\n });\n const totalCount = indices.length;\n for (let i = 0; i < totalCount; i += 3) {\n const i0 = indices[i + 0];\n const i1 = indices[i + 1];\n const i2 = indices[i + 2];\n indices.push(i2 + positionscount);\n indices.push(i1 + positionscount);\n indices.push(i0 + positionscount);\n }\n //Add the sides\n this._addSide(positions, normals, uvs, indices, bounds, this._outlinepoints, depth, false, smoothingThreshold);\n this._holes.forEach((hole) => {\n this._addSide(positions, normals, uvs, indices, bounds, hole, depth, true, smoothingThreshold);\n });\n }\n result.indices = indices;\n result.positions = positions;\n result.normals = normals;\n result.uvs = uvs;\n return result;\n }\n /**\n * Adds a side to the polygon\n * @param positions points that make the polygon\n * @param normals normals of the polygon\n * @param uvs uvs of the polygon\n * @param indices indices of the polygon\n * @param bounds bounds of the polygon\n * @param points points of the polygon\n * @param depth depth of the polygon\n * @param flip flip of the polygon\n * @param smoothingThreshold\n */\n _addSide(positions, normals, uvs, indices, bounds, points, depth, flip, smoothingThreshold) {\n let startIndex = positions.length / 3;\n let ulength = 0;\n for (let i = 0; i < points.elements.length; i++) {\n const p = points.elements[i];\n const p1 = points.elements[(i + 1) % points.elements.length];\n positions.push(p.x, 0, p.y);\n positions.push(p.x, -depth, p.y);\n positions.push(p1.x, 0, p1.y);\n positions.push(p1.x, -depth, p1.y);\n const p0 = points.elements[(i + points.elements.length - 1) % points.elements.length];\n const p2 = points.elements[(i + 2) % points.elements.length];\n let vc = new Vector3(-(p1.y - p.y), 0, p1.x - p.x);\n let vp = new Vector3(-(p.y - p0.y), 0, p.x - p0.x);\n let vn = new Vector3(-(p2.y - p1.y), 0, p2.x - p1.x);\n if (!flip) {\n vc = vc.scale(-1);\n vp = vp.scale(-1);\n vn = vn.scale(-1);\n }\n const vc_norm = vc.normalizeToNew();\n let vp_norm = vp.normalizeToNew();\n let vn_norm = vn.normalizeToNew();\n const dotp = Vector3.Dot(vp_norm, vc_norm);\n if (dotp > smoothingThreshold) {\n if (dotp < Epsilon - 1) {\n vp_norm = new Vector3(p.x, 0, p.y).subtract(new Vector3(p1.x, 0, p1.y)).normalize();\n }\n else {\n // cheap average weighed by side length\n vp_norm = vp.add(vc).normalize();\n }\n }\n else {\n vp_norm = vc_norm;\n }\n const dotn = Vector3.Dot(vn, vc);\n if (dotn > smoothingThreshold) {\n if (dotn < Epsilon - 1) {\n // back to back\n vn_norm = new Vector3(p1.x, 0, p1.y).subtract(new Vector3(p.x, 0, p.y)).normalize();\n }\n else {\n // cheap average weighed by side length\n vn_norm = vn.add(vc).normalize();\n }\n }\n else {\n vn_norm = vc_norm;\n }\n uvs.push(ulength / bounds.width, 0);\n uvs.push(ulength / bounds.width, 1);\n ulength += vc.length();\n uvs.push(ulength / bounds.width, 0);\n uvs.push(ulength / bounds.width, 1);\n normals.push(vp_norm.x, vp_norm.y, vp_norm.z);\n normals.push(vp_norm.x, vp_norm.y, vp_norm.z);\n normals.push(vn_norm.x, vn_norm.y, vn_norm.z);\n normals.push(vn_norm.x, vn_norm.y, vn_norm.z);\n if (!flip) {\n indices.push(startIndex);\n indices.push(startIndex + 1);\n indices.push(startIndex + 2);\n indices.push(startIndex + 1);\n indices.push(startIndex + 3);\n indices.push(startIndex + 2);\n }\n else {\n indices.push(startIndex);\n indices.push(startIndex + 2);\n indices.push(startIndex + 1);\n indices.push(startIndex + 1);\n indices.push(startIndex + 2);\n indices.push(startIndex + 3);\n }\n startIndex += 4;\n }\n }\n}\n//# sourceMappingURL=polygonMesh.js.map","import { Vector2, Vector4 } from \"../../Maths/math.vector.js\";\nimport { Color4 } from \"../../Maths/math.color.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { PolygonMeshBuilder } from \"../polygonMesh.js\";\nimport { VertexBuffer } from \"../../Buffers/buffer.js\";\nimport { EngineStore } from \"../../Engines/engineStore.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Creates the VertexData for an irregular Polygon in the XoZ plane using a mesh built by polygonTriangulation.build()\n * All parameters are provided by CreatePolygon as needed\n * @param polygon a mesh built from polygonTriangulation.build()\n * @param sideOrientation takes the values Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * @param fUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\n * @param fColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\n * @param frontUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * @param backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param wrp a boolean, default false, when true and fUVs used texture is wrapped around all sides, when false texture is applied side\n * @returns the VertexData of the Polygon\n */\nexport function CreatePolygonVertexData(polygon, sideOrientation, fUV, fColors, frontUVs, backUVs, wrp) {\n const faceUV = fUV || new Array(3);\n const faceColors = fColors;\n const colors = [];\n const wrap = wrp || false;\n // default face colors and UV if undefined\n for (let f = 0; f < 3; f++) {\n if (faceUV[f] === undefined) {\n faceUV[f] = new Vector4(0, 0, 1, 1);\n }\n if (faceColors && faceColors[f] === undefined) {\n faceColors[f] = new Color4(1, 1, 1, 1);\n }\n }\n const positions = polygon.getVerticesData(VertexBuffer.PositionKind);\n const normals = polygon.getVerticesData(VertexBuffer.NormalKind);\n const uvs = polygon.getVerticesData(VertexBuffer.UVKind);\n const indices = polygon.getIndices();\n const startIndex = positions.length / 9;\n let disp = 0;\n let distX = 0;\n let distZ = 0;\n let dist = 0;\n let totalLen = 0;\n const cumulate = [0];\n if (wrap) {\n for (let idx = startIndex; idx < positions.length / 3; idx += 4) {\n distX = positions[3 * (idx + 2)] - positions[3 * idx];\n distZ = positions[3 * (idx + 2) + 2] - positions[3 * idx + 2];\n dist = Math.sqrt(distX * distX + distZ * distZ);\n totalLen += dist;\n cumulate.push(totalLen);\n }\n }\n // set face colours and textures\n let idx = 0;\n let face = 0;\n for (let index = 0; index < normals.length; index += 3) {\n //Edge Face no. 1\n if (Math.abs(normals[index + 1]) < 0.001) {\n face = 1;\n }\n //Top Face no. 0\n if (Math.abs(normals[index + 1] - 1) < 0.001) {\n face = 0;\n }\n //Bottom Face no. 2\n if (Math.abs(normals[index + 1] + 1) < 0.001) {\n face = 2;\n }\n idx = index / 3;\n if (face === 1) {\n disp = idx - startIndex;\n if (disp % 4 < 1.5) {\n if (wrap) {\n uvs[2 * idx] = faceUV[face].x + ((faceUV[face].z - faceUV[face].x) * cumulate[Math.floor(disp / 4)]) / totalLen;\n }\n else {\n uvs[2 * idx] = faceUV[face].x;\n }\n }\n else {\n if (wrap) {\n uvs[2 * idx] = faceUV[face].x + ((faceUV[face].z - faceUV[face].x) * cumulate[Math.floor(disp / 4) + 1]) / totalLen;\n }\n else {\n uvs[2 * idx] = faceUV[face].z;\n }\n }\n if (disp % 2 === 0) {\n uvs[2 * idx + 1] = CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - faceUV[face].w : faceUV[face].w;\n }\n else {\n uvs[2 * idx + 1] = CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - faceUV[face].y : faceUV[face].y;\n }\n }\n else {\n uvs[2 * idx] = (1 - uvs[2 * idx]) * faceUV[face].x + uvs[2 * idx] * faceUV[face].z;\n uvs[2 * idx + 1] = (1 - uvs[2 * idx + 1]) * faceUV[face].y + uvs[2 * idx + 1] * faceUV[face].w;\n if (CompatibilityOptions.UseOpenGLOrientationForUV) {\n uvs[2 * idx + 1] = 1.0 - uvs[2 * idx + 1];\n }\n }\n if (faceColors) {\n colors.push(faceColors[face].r, faceColors[face].g, faceColors[face].b, faceColors[face].a);\n }\n }\n // sides\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, frontUVs, backUVs);\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n if (faceColors) {\n const totalColors = sideOrientation === VertexData.DOUBLESIDE ? colors.concat(colors) : colors;\n vertexData.colors = totalColors;\n }\n return vertexData;\n}\n/**\n * Creates a polygon mesh\n * The polygon's shape will depend on the input parameters and is constructed parallel to a ground mesh\n * * The parameter `shape` is a required array of successive Vector3 representing the corners of the polygon in th XoZ plane, that is y = 0 for all vectors\n * * You can set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4)\n * * Remember you can only change the shape positions, not their number when updating a polygon\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.shape\n * @param options.holes\n * @param options.depth\n * @param options.smoothingThreshold\n * @param options.faceUV\n * @param options.faceColors\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.wrap\n * @param scene defines the hosting scene\n * @param earcutInjection can be used to inject your own earcut reference\n * @returns the polygon mesh\n */\nexport function CreatePolygon(name, options, scene = null, earcutInjection = earcut) {\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n const shape = options.shape;\n const holes = options.holes || [];\n const depth = options.depth || 0;\n const smoothingThreshold = options.smoothingThreshold || 2;\n const contours = [];\n let hole = [];\n for (let i = 0; i < shape.length; i++) {\n contours[i] = new Vector2(shape[i].x, shape[i].z);\n }\n const epsilon = 0.00000001;\n if (contours[0].equalsWithEpsilon(contours[contours.length - 1], epsilon)) {\n contours.pop();\n }\n const polygonTriangulation = new PolygonMeshBuilder(name, contours, scene || EngineStore.LastCreatedScene, earcutInjection);\n for (let hNb = 0; hNb < holes.length; hNb++) {\n hole = [];\n for (let hPoint = 0; hPoint < holes[hNb].length; hPoint++) {\n hole.push(new Vector2(holes[hNb][hPoint].x, holes[hNb][hPoint].z));\n }\n polygonTriangulation.addHole(hole);\n }\n //updatability is set during applyToMesh; setting to true in triangulation build produces errors\n const polygon = polygonTriangulation.build(false, depth, smoothingThreshold);\n polygon._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreatePolygonVertexData(polygon, options.sideOrientation, options.faceUV, options.faceColors, options.frontUVs, options.backUVs, options.wrap);\n vertexData.applyToMesh(polygon, options.updatable);\n return polygon;\n}\n/**\n * Creates an extruded polygon mesh, with depth in the Y direction.\n * * You can set different colors and different images to the top, bottom and extruded side by using the parameters `faceColors` (an array of 3 Color3 elements) and `faceUV` (an array of 3 Vector4 elements)\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/texturePerBoxFace\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.shape\n * @param options.holes\n * @param options.depth\n * @param options.faceUV\n * @param options.faceColors\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.wrap\n * @param scene defines the hosting scene\n * @param earcutInjection can be used to inject your own earcut reference\n * @returns the polygon mesh\n */\nexport function ExtrudePolygon(name, options, scene = null, earcutInjection = earcut) {\n return CreatePolygon(name, options, scene, earcutInjection);\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use the functions directly from the module\n */\nexport const PolygonBuilder = {\n ExtrudePolygon,\n CreatePolygon,\n};\nVertexData.CreatePolygon = CreatePolygonVertexData;\nMesh.CreatePolygon = (name, shape, scene, holes, updatable, sideOrientation, earcutInjection = earcut) => {\n const options = {\n shape: shape,\n holes: holes,\n updatable: updatable,\n sideOrientation: sideOrientation,\n };\n return CreatePolygon(name, options, scene, earcutInjection);\n};\nMesh.ExtrudePolygon = (name, shape, depth, scene, holes, updatable, sideOrientation, earcutInjection = earcut) => {\n const options = {\n shape: shape,\n holes: holes,\n depth: depth,\n updatable: updatable,\n sideOrientation: sideOrientation,\n };\n return ExtrudePolygon(name, options, scene, earcutInjection);\n};\n//# sourceMappingURL=polygonBuilder.js.map","import { Vector3, TmpVectors, Matrix } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { CreateRibbon } from \"./ribbonBuilder.js\";\nimport { Path3D } from \"../../Maths/math.path.js\";\n/**\n * Creates an extruded shape mesh. The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.\n * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.\n * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.\n * * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.\n * * The parameter `scale` (float, default 1) is the value to scale the shape.\n * * The parameter `closeShape` (boolean, default false) closes the shape when true, since v5.0.0.\n * * The parameter `closePath` (boolean, default false) closes the path when true and no caps, since v5.0.0.\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\n * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape\n * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.\n * * The optional parameter `firstNormal` (Vector3) defines the direction of the first normal of the supplied path. Consider using this for any path that is straight, and particular for paths in the xy plane.\n * * The optional `adjustFrame` (boolean, default false) will cause the internally generated Path3D tangents, normals, and binormals to be adjusted so that a) they are always well-defined, and b) they do not reverse from one path point to the next. This prevents the extruded shape from being flipped and/or rotated with resulting mesh self-intersections. This is primarily useful for straight paths that can reverse direction.\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.shape\n * @param options.path\n * @param options.scale\n * @param options.rotation\n * @param options.closeShape\n * @param options.closePath\n * @param options.cap\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.instance\n * @param options.invertUV\n * @param options.firstNormal\n * @param options.adjustFrame\n * @param scene defines the hosting scene\n * @returns the extruded shape mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\n */\nexport function ExtrudeShape(name, options, scene = null) {\n const path = options.path;\n const shape = options.shape;\n const scale = options.scale || 1;\n const rotation = options.rotation || 0;\n const cap = options.cap === 0 ? 0 : options.cap || Mesh.NO_CAP;\n const updatable = options.updatable;\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n const instance = options.instance || null;\n const invertUV = options.invertUV || false;\n const closeShape = options.closeShape || false;\n const closePath = options.closePath || false;\n return _ExtrudeShapeGeneric(name, shape, path, scale, rotation, null, null, closePath, closeShape, cap, false, scene, updatable ? true : false, sideOrientation, instance, invertUV, options.frontUVs || null, options.backUVs || null, options.firstNormal || null, options.adjustFrame ? true : false);\n}\n/**\n * Creates an custom extruded shape mesh.\n * The custom extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.\n * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.\n * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.\n * * The parameter `rotationFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path\n * * It must returns a float value that will be the rotation in radians applied to the shape on each path point.\n * * The parameter `scaleFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path\n * * It must returns a float value that will be the scale value applied to the shape on each path point\n * * The parameter `closeShape` (boolean, default false) closes the shape when true, since v5.0.0.\n * * The parameter `closePath` (boolean, default false) closes the path when true and no caps, since v5.0.0.\n * * The parameter `ribbonClosePath` (boolean, default false) forces the extrusion underlying ribbon to close all the paths in its `pathArray` - depreciated in favor of closeShape\n * * The parameter `ribbonCloseArray` (boolean, default false) forces the extrusion underlying ribbon to close its `pathArray` - depreciated in favor of closePath\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\n * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape\n * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * * The optional parameter `firstNormal` (Vector3) defines the direction of the first normal of the supplied path. It should be supplied when the path is in the xy plane, and particularly if these sections are straight, because the underlying Path3D object will pick a normal in the xy plane that causes the extrusion to be collapsed into the plane. This should be used for any path that is straight.\n * * The optional `adjustFrame` (boolean, default false) will cause the internally generated Path3D tangents, normals, and binormals to be adjusted so that a) they are always well-defined, and b) they do not reverse from one path point to the next. This prevents the extruded shape from being flipped and/or rotated with resulting mesh self-intersections. This is primarily useful for straight paths that can reverse direction.\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.shape\n * @param options.path\n * @param options.scaleFunction\n * @param options.rotationFunction\n * @param options.ribbonCloseArray\n * @param options.ribbonClosePath\n * @param options.closeShape\n * @param options.closePath\n * @param options.cap\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.instance\n * @param options.invertUV\n * @param options.firstNormal\n * @param options.adjustFrame\n * @param scene defines the hosting scene\n * @returns the custom extruded shape mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#custom-extruded-shapes\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\n */\nexport function ExtrudeShapeCustom(name, options, scene = null) {\n const path = options.path;\n const shape = options.shape;\n const scaleFunction = options.scaleFunction ||\n (() => {\n return 1;\n });\n const rotationFunction = options.rotationFunction ||\n (() => {\n return 0;\n });\n const ribbonCloseArray = options.closePath || options.ribbonCloseArray || false;\n const ribbonClosePath = options.closeShape || options.ribbonClosePath || false;\n const cap = options.cap === 0 ? 0 : options.cap || Mesh.NO_CAP;\n const updatable = options.updatable;\n const firstNormal = options.firstNormal || null;\n const adjustFrame = options.adjustFrame || false;\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n const instance = options.instance;\n const invertUV = options.invertUV || false;\n return _ExtrudeShapeGeneric(name, shape, path, null, null, scaleFunction, rotationFunction, ribbonCloseArray, ribbonClosePath, cap, true, scene, updatable ? true : false, sideOrientation, instance || null, invertUV, options.frontUVs || null, options.backUVs || null, firstNormal, adjustFrame);\n}\nfunction _ExtrudeShapeGeneric(name, shape, curve, scale, rotation, scaleFunction, rotateFunction, rbCA, rbCP, cap, custom, scene, updtbl, side, instance, invertUV, frontUVs, backUVs, firstNormal, adjustFrame) {\n // extrusion geometry\n const extrusionPathArray = (shape, curve, path3D, shapePaths, scale, rotation, scaleFunction, rotateFunction, cap, custom, adjustFrame) => {\n const tangents = path3D.getTangents();\n const normals = path3D.getNormals();\n const binormals = path3D.getBinormals();\n const distances = path3D.getDistances();\n if (adjustFrame) {\n /* fix tangents,normals, binormals */\n for (let i = 0; i < tangents.length; i++) {\n if (tangents[i].x == 0 && tangents[i].y == 0 && tangents[i].z == 0) {\n tangents[i].copyFrom(tangents[i - 1]);\n }\n if (normals[i].x == 0 && normals[i].y == 0 && normals[i].z == 0) {\n normals[i].copyFrom(normals[i - 1]);\n }\n if (binormals[i].x == 0 && binormals[i].y == 0 && binormals[i].z == 0) {\n binormals[i].copyFrom(binormals[i - 1]);\n }\n if (i > 0) {\n let v = tangents[i - 1];\n if (Vector3.Dot(v, tangents[i]) < 0) {\n tangents[i].scaleInPlace(-1);\n }\n v = normals[i - 1];\n if (Vector3.Dot(v, normals[i]) < 0) {\n normals[i].scaleInPlace(-1);\n }\n v = binormals[i - 1];\n if (Vector3.Dot(v, binormals[i]) < 0) {\n binormals[i].scaleInPlace(-1);\n }\n }\n }\n }\n let angle = 0;\n const returnScale = () => {\n return scale !== null ? scale : 1;\n };\n const returnRotation = () => {\n return rotation !== null ? rotation : 0;\n };\n const rotate = custom && rotateFunction ? rotateFunction : returnRotation;\n const scl = custom && scaleFunction ? scaleFunction : returnScale;\n let index = cap === Mesh.NO_CAP || cap === Mesh.CAP_END ? 0 : 2;\n const rotationMatrix = TmpVectors.Matrix[0];\n for (let i = 0; i < curve.length; i++) {\n const shapePath = [];\n const angleStep = rotate(i, distances[i]);\n const scaleRatio = scl(i, distances[i]);\n Matrix.RotationAxisToRef(tangents[i], angle, rotationMatrix);\n for (let p = 0; p < shape.length; p++) {\n const planed = tangents[i].scale(shape[p].z).add(normals[i].scale(shape[p].x)).add(binormals[i].scale(shape[p].y));\n const rotated = Vector3.Zero();\n Vector3.TransformCoordinatesToRef(planed, rotationMatrix, rotated);\n rotated.scaleInPlace(scaleRatio).addInPlace(curve[i]);\n shapePath[p] = rotated;\n }\n shapePaths[index] = shapePath;\n angle += angleStep;\n index++;\n }\n // cap\n const capPath = (shapePath) => {\n const pointCap = Array();\n const barycenter = Vector3.Zero();\n let i;\n for (i = 0; i < shapePath.length; i++) {\n barycenter.addInPlace(shapePath[i]);\n }\n barycenter.scaleInPlace(1.0 / shapePath.length);\n for (i = 0; i < shapePath.length; i++) {\n pointCap.push(barycenter);\n }\n return pointCap;\n };\n switch (cap) {\n case Mesh.NO_CAP:\n break;\n case Mesh.CAP_START:\n shapePaths[0] = capPath(shapePaths[2]);\n shapePaths[1] = shapePaths[2];\n break;\n case Mesh.CAP_END:\n shapePaths[index] = shapePaths[index - 1];\n shapePaths[index + 1] = capPath(shapePaths[index - 1]);\n break;\n case Mesh.CAP_ALL:\n shapePaths[0] = capPath(shapePaths[2]);\n shapePaths[1] = shapePaths[2];\n shapePaths[index] = shapePaths[index - 1];\n shapePaths[index + 1] = capPath(shapePaths[index - 1]);\n break;\n default:\n break;\n }\n return shapePaths;\n };\n let path3D;\n let pathArray;\n if (instance) {\n // instance update\n const storage = instance._creationDataStorage;\n path3D = firstNormal ? storage.path3D.update(curve, firstNormal) : storage.path3D.update(curve);\n pathArray = extrusionPathArray(shape, curve, storage.path3D, storage.pathArray, scale, rotation, scaleFunction, rotateFunction, storage.cap, custom, adjustFrame);\n instance = CreateRibbon(\"\", { pathArray, closeArray: false, closePath: false, offset: 0, updatable: false, sideOrientation: 0, instance }, scene || undefined);\n return instance;\n }\n // extruded shape creation\n path3D = firstNormal ? new Path3D(curve, firstNormal) : new Path3D(curve);\n const newShapePaths = new Array();\n cap = cap < 0 || cap > 3 ? 0 : cap;\n pathArray = extrusionPathArray(shape, curve, path3D, newShapePaths, scale, rotation, scaleFunction, rotateFunction, cap, custom, adjustFrame);\n const extrudedGeneric = CreateRibbon(name, {\n pathArray: pathArray,\n closeArray: rbCA,\n closePath: rbCP,\n updatable: updtbl,\n sideOrientation: side,\n invertUV: invertUV,\n frontUVs: frontUVs || undefined,\n backUVs: backUVs || undefined,\n }, scene);\n extrudedGeneric._creationDataStorage.pathArray = pathArray;\n extrudedGeneric._creationDataStorage.path3D = path3D;\n extrudedGeneric._creationDataStorage.cap = cap;\n return extrudedGeneric;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated please use the functions directly from the module\n */\nexport const ShapeBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n ExtrudeShape,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n ExtrudeShapeCustom,\n};\nMesh.ExtrudeShape = (name, shape, path, scale, rotation, cap, scene = null, updatable, sideOrientation, instance) => {\n const options = {\n shape: shape,\n path: path,\n scale: scale,\n rotation: rotation,\n cap: cap === 0 ? 0 : cap || Mesh.NO_CAP,\n sideOrientation: sideOrientation,\n instance: instance,\n updatable: updatable,\n };\n return ExtrudeShape(name, options, scene);\n};\nMesh.ExtrudeShapeCustom = (name, shape, path, scaleFunction, rotationFunction, ribbonCloseArray, ribbonClosePath, cap, scene, updatable, sideOrientation, instance) => {\n const options = {\n shape: shape,\n path: path,\n scaleFunction: scaleFunction,\n rotationFunction: rotationFunction,\n ribbonCloseArray: ribbonCloseArray,\n ribbonClosePath: ribbonClosePath,\n cap: cap === 0 ? 0 : cap || Mesh.NO_CAP,\n sideOrientation: sideOrientation,\n instance: instance,\n updatable: updatable,\n };\n return ExtrudeShapeCustom(name, options, scene);\n};\n//# sourceMappingURL=shapeBuilder.js.map","import { Vector3 } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { CreateRibbon } from \"./ribbonBuilder.js\";\n/**\n * Creates lathe mesh.\n * The lathe is a shape with a symmetry axis : a 2D model shape is rotated around this axis to design the lathe\n * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be rotated in its local space : the shape must be designed in the xOy plane and will be rotated around the Y axis. It's usually a 2D shape, so the Vector3 z coordinates are often set to zero\n * * The parameter `radius` (positive float, default 1) is the radius value of the lathe\n * * The parameter `tessellation` (positive integer, default 64) is the side number of the lathe\n * * The parameter `clip` (positive integer, default 0) is the number of sides to not create without effecting the general shape of the sides\n * * The parameter `arc` (positive float, default 1) is the ratio of the lathe. 0.5 builds for instance half a lathe, so an opened shape\n * * The parameter `closed` (boolean, default true) opens/closes the lathe circumference. This should be set to false when used with the parameter \"arc\"\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.shape\n * @param options.radius\n * @param options.tessellation\n * @param options.clip\n * @param options.arc\n * @param options.closed\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.cap\n * @param options.invertUV\n * @param scene defines the hosting scene\n * @returns the lathe mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#lathe\n */\nexport function CreateLathe(name, options, scene = null) {\n const arc = options.arc ? (options.arc <= 0 || options.arc > 1 ? 1.0 : options.arc) : 1.0;\n const closed = options.closed === undefined ? true : options.closed;\n const shape = options.shape;\n const radius = options.radius || 1;\n const tessellation = options.tessellation || 64;\n const clip = options.clip || 0;\n const updatable = options.updatable;\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n const cap = options.cap || Mesh.NO_CAP;\n const pi2 = Math.PI * 2;\n const paths = [];\n const invertUV = options.invertUV || false;\n let i = 0;\n let p = 0;\n const step = (pi2 / tessellation) * arc;\n let rotated;\n let path;\n for (i = 0; i <= tessellation - clip; i++) {\n path = [];\n if (cap == Mesh.CAP_START || cap == Mesh.CAP_ALL) {\n path.push(new Vector3(0, shape[0].y, 0));\n path.push(new Vector3(Math.cos(i * step) * shape[0].x * radius, shape[0].y, Math.sin(i * step) * shape[0].x * radius));\n }\n for (p = 0; p < shape.length; p++) {\n rotated = new Vector3(Math.cos(i * step) * shape[p].x * radius, shape[p].y, Math.sin(i * step) * shape[p].x * radius);\n path.push(rotated);\n }\n if (cap == Mesh.CAP_END || cap == Mesh.CAP_ALL) {\n path.push(new Vector3(Math.cos(i * step) * shape[shape.length - 1].x * radius, shape[shape.length - 1].y, Math.sin(i * step) * shape[shape.length - 1].x * radius));\n path.push(new Vector3(0, shape[shape.length - 1].y, 0));\n }\n paths.push(path);\n }\n // lathe ribbon\n const lathe = CreateRibbon(name, { pathArray: paths, closeArray: closed, sideOrientation: sideOrientation, updatable: updatable, invertUV: invertUV, frontUVs: options.frontUVs, backUVs: options.backUVs }, scene);\n return lathe;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use the function direction from the module\n */\nexport const LatheBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateLathe,\n};\nMesh.CreateLathe = (name, shape, radius, tessellation, scene, updatable, sideOrientation) => {\n const options = {\n shape: shape,\n radius: radius,\n tessellation: tessellation,\n sideOrientation: sideOrientation,\n updatable: updatable,\n };\n return CreateLathe(name, options, scene);\n};\n//# sourceMappingURL=latheBuilder.js.map","import { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Creates the VertexData for a Plane\n * @param options an object used to set the following optional parameters for the plane, required but can be empty\n * * size sets the width and height of the plane to the value of size, optional default 1\n * * width sets the width (x direction) of the plane, overwrites the width set by size, optional, default size\n * * height sets the height (y direction) of the plane, overwrites the height set by size, optional, default size\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.size\n * @param options.width\n * @param options.height\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the box\n */\nexport function CreatePlaneVertexData(options) {\n const indices = [];\n const positions = [];\n const normals = [];\n const uvs = [];\n const width = options.width || options.size || 1;\n const height = options.height || options.size || 1;\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n // Vertices\n const halfWidth = width / 2.0;\n const halfHeight = height / 2.0;\n positions.push(-halfWidth, -halfHeight, 0);\n normals.push(0, 0, -1.0);\n uvs.push(0.0, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 : 0.0);\n positions.push(halfWidth, -halfHeight, 0);\n normals.push(0, 0, -1.0);\n uvs.push(1.0, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 : 0.0);\n positions.push(halfWidth, halfHeight, 0);\n normals.push(0, 0, -1.0);\n uvs.push(1.0, CompatibilityOptions.UseOpenGLOrientationForUV ? 0.0 : 1.0);\n positions.push(-halfWidth, halfHeight, 0);\n normals.push(0, 0, -1.0);\n uvs.push(0.0, CompatibilityOptions.UseOpenGLOrientationForUV ? 0.0 : 1.0);\n // Indices\n indices.push(0);\n indices.push(1);\n indices.push(2);\n indices.push(0);\n indices.push(2);\n indices.push(3);\n // Sides\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, options.frontUVs, options.backUVs);\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n return vertexData;\n}\n/**\n * Creates a plane mesh\n * * The parameter `size` sets the size (float) of both sides of the plane at once (default 1)\n * * You can set some different plane dimensions by using the parameters `width` and `height` (both by default have the same value of `size`)\n * * The parameter `sourcePlane` is a Plane instance. It builds a mesh plane from a Math plane\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.size\n * @param options.width\n * @param options.height\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.updatable\n * @param options.sourcePlane\n * @param scene defines the hosting scene\n * @returns the plane mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#plane\n */\nexport function CreatePlane(name, options = {}, scene = null) {\n const plane = new Mesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n plane._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreatePlaneVertexData(options);\n vertexData.applyToMesh(plane, options.updatable);\n if (options.sourcePlane) {\n plane.translate(options.sourcePlane.normal, -options.sourcePlane.d);\n plane.setDirection(options.sourcePlane.normal.scale(-1));\n }\n return plane;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use the function directly from the module\n */\nexport const PlaneBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreatePlane,\n};\nVertexData.CreatePlane = CreatePlaneVertexData;\nMesh.CreatePlane = (name, size, scene, updatable, sideOrientation) => {\n const options = {\n size,\n width: size,\n height: size,\n sideOrientation,\n updatable,\n };\n return CreatePlane(name, options, scene);\n};\n//# sourceMappingURL=planeBuilder.js.map","import { Vector3, TmpVectors, Matrix } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { CreateRibbon } from \"./ribbonBuilder.js\";\nimport { Path3D } from \"../../Maths/math.path.js\";\n/**\n * Creates a tube mesh.\n * The tube is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters\n * * The parameter `path` is a required array of successive Vector3. It is the curve used as the axis of the tube\n * * The parameter `radius` (positive float, default 1) sets the tube radius size\n * * The parameter `tessellation` (positive float, default 64) is the number of sides on the tubular surface\n * * The parameter `radiusFunction` (javascript function, default null) is a vanilla javascript function. If it is not null, it overrides the parameter `radius`\n * * This function is called on each point of the tube path and is passed the index `i` of the i-th point and the distance of this point from the first point of the path. It must return a radius value (positive float)\n * * The parameter `arc` (positive float, maximum 1, default 1) is the ratio to apply to the tube circumference : 2 x PI x arc\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\n * * The optional parameter `instance` is an instance of an existing Tube object to be updated with the passed `pathArray` parameter. The `path`Array HAS to have the SAME number of points as the previous one: https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#tube\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created. The NUMBER of points CAN'T CHANGE, only their positions.\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.path\n * @param options.radius\n * @param options.tessellation\n * @param options.radiusFunction\n * @param options.cap\n * @param options.arc\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.instance\n * @param options.invertUV\n * @param scene defines the hosting scene\n * @returns the tube mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#tube\n */\nexport function CreateTube(name, options, scene = null) {\n const path = options.path;\n let instance = options.instance;\n let radius = 1.0;\n if (options.radius !== undefined) {\n radius = options.radius;\n }\n else if (instance) {\n radius = instance._creationDataStorage.radius;\n }\n const tessellation = options.tessellation || 64 | 0;\n const radiusFunction = options.radiusFunction || null;\n let cap = options.cap || Mesh.NO_CAP;\n const invertUV = options.invertUV || false;\n const updatable = options.updatable;\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n options.arc = options.arc && (options.arc <= 0.0 || options.arc > 1.0) ? 1.0 : options.arc || 1.0;\n // tube geometry\n const tubePathArray = (path, path3D, circlePaths, radius, tessellation, radiusFunction, cap, arc) => {\n const tangents = path3D.getTangents();\n const normals = path3D.getNormals();\n const distances = path3D.getDistances();\n const pi2 = Math.PI * 2;\n const step = (pi2 / tessellation) * arc;\n const returnRadius = () => radius;\n const radiusFunctionFinal = radiusFunction || returnRadius;\n let circlePath;\n let rad;\n let normal;\n let rotated;\n const rotationMatrix = TmpVectors.Matrix[0];\n let index = cap === Mesh.NO_CAP || cap === Mesh.CAP_END ? 0 : 2;\n for (let i = 0; i < path.length; i++) {\n rad = radiusFunctionFinal(i, distances[i]); // current radius\n circlePath = Array(); // current circle array\n normal = normals[i]; // current normal\n for (let t = 0; t < tessellation; t++) {\n Matrix.RotationAxisToRef(tangents[i], step * t, rotationMatrix);\n rotated = circlePath[t] ? circlePath[t] : Vector3.Zero();\n Vector3.TransformCoordinatesToRef(normal, rotationMatrix, rotated);\n rotated.scaleInPlace(rad).addInPlace(path[i]);\n circlePath[t] = rotated;\n }\n circlePaths[index] = circlePath;\n index++;\n }\n // cap\n const capPath = (nbPoints, pathIndex) => {\n const pointCap = Array();\n for (let i = 0; i < nbPoints; i++) {\n pointCap.push(path[pathIndex]);\n }\n return pointCap;\n };\n switch (cap) {\n case Mesh.NO_CAP:\n break;\n case Mesh.CAP_START:\n circlePaths[0] = capPath(tessellation, 0);\n circlePaths[1] = circlePaths[2].slice(0);\n break;\n case Mesh.CAP_END:\n circlePaths[index] = circlePaths[index - 1].slice(0);\n circlePaths[index + 1] = capPath(tessellation, path.length - 1);\n break;\n case Mesh.CAP_ALL:\n circlePaths[0] = capPath(tessellation, 0);\n circlePaths[1] = circlePaths[2].slice(0);\n circlePaths[index] = circlePaths[index - 1].slice(0);\n circlePaths[index + 1] = capPath(tessellation, path.length - 1);\n break;\n default:\n break;\n }\n return circlePaths;\n };\n let path3D;\n let pathArray;\n if (instance) {\n // tube update\n const storage = instance._creationDataStorage;\n const arc = options.arc || storage.arc;\n path3D = storage.path3D.update(path);\n pathArray = tubePathArray(path, path3D, storage.pathArray, radius, storage.tessellation, radiusFunction, storage.cap, arc);\n instance = CreateRibbon(\"\", { pathArray: pathArray, instance: instance });\n // Update mode, no need to recreate the storage.\n storage.path3D = path3D;\n storage.pathArray = pathArray;\n storage.arc = arc;\n storage.radius = radius;\n return instance;\n }\n // tube creation\n path3D = new Path3D(path);\n const newPathArray = new Array();\n cap = cap < 0 || cap > 3 ? 0 : cap;\n pathArray = tubePathArray(path, path3D, newPathArray, radius, tessellation, radiusFunction, cap, options.arc);\n const tube = CreateRibbon(name, {\n pathArray: pathArray,\n closePath: true,\n closeArray: false,\n updatable: updatable,\n sideOrientation: sideOrientation,\n invertUV: invertUV,\n frontUVs: options.frontUVs,\n backUVs: options.backUVs,\n }, scene);\n tube._creationDataStorage.pathArray = pathArray;\n tube._creationDataStorage.path3D = path3D;\n tube._creationDataStorage.tessellation = tessellation;\n tube._creationDataStorage.cap = cap;\n tube._creationDataStorage.arc = options.arc;\n tube._creationDataStorage.radius = radius;\n return tube;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use CreateTube directly\n */\nexport const TubeBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateTube,\n};\nMesh.CreateTube = (name, path, radius, tessellation, radiusFunction, cap, scene, updatable, sideOrientation, instance) => {\n const options = {\n path: path,\n radius: radius,\n tessellation: tessellation,\n radiusFunction: radiusFunction,\n arc: 1,\n cap: cap,\n updatable: updatable,\n sideOrientation: sideOrientation,\n instance: instance,\n };\n return CreateTube(name, options, scene);\n};\n//# sourceMappingURL=tubeBuilder.js.map","import { Vector4 } from \"../../Maths/math.vector.js\";\nimport { Color4 } from \"../../Maths/math.color.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n// inspired from // http://stemkoski.github.io/Three.js/Polyhedra.html\n/**\n * Creates the VertexData for a Polyhedron\n * @param options an object used to set the following optional parameters for the polyhedron, required but can be empty\n * * type provided types are:\n * * 0 : Tetrahedron, 1 : Octahedron, 2 : Dodecahedron, 3 : Icosahedron, 4 : Rhombicuboctahedron, 5 : Triangular Prism, 6 : Pentagonal Prism, 7 : Hexagonal Prism, 8 : Square Pyramid (J1)\n * * 9 : Pentagonal Pyramid (J2), 10 : Triangular Dipyramid (J12), 11 : Pentagonal Dipyramid (J13), 12 : Elongated Square Dipyramid (J15), 13 : Elongated Pentagonal Dipyramid (J16), 14 : Elongated Pentagonal Cupola (J20)\n * * size the size of the IcoSphere, optional default 1\n * * sizeX allows stretching in the x direction, optional, default size\n * * sizeY allows stretching in the y direction, optional, default size\n * * sizeZ allows stretching in the z direction, optional, default size\n * * custom a number that overwrites the type to create from an extended set of polyhedron from https://www.babylonjs-playground.com/#21QRSK#15 with minimised editor\n * * faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\n * * faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\n * * flat when true creates a flat shaded mesh, optional, default true\n * * subdivisions increasing the subdivisions increases the number of faces, optional, default 4\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.type\n * @param options.size\n * @param options.sizeX\n * @param options.sizeY\n * @param options.sizeZ\n * @param options.custom\n * @param options.faceUV\n * @param options.faceColors\n * @param options.flat\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the Polyhedron\n */\nexport function CreatePolyhedronVertexData(options) {\n // provided polyhedron types :\n // 0 : Tetrahedron, 1 : Octahedron, 2 : Dodecahedron, 3 : Icosahedron, 4 : Rhombicuboctahedron, 5 : Triangular Prism, 6 : Pentagonal Prism, 7 : Hexagonal Prism, 8 : Square Pyramid (J1)\n // 9 : Pentagonal Pyramid (J2), 10 : Triangular Dipyramid (J12), 11 : Pentagonal Dipyramid (J13), 12 : Elongated Square Dipyramid (J15), 13 : Elongated Pentagonal Dipyramid (J16), 14 : Elongated Pentagonal Cupola (J20)\n const polyhedra = [];\n polyhedra[0] = {\n vertex: [\n [0, 0, 1.732051],\n [1.632993, 0, -0.5773503],\n [-0.8164966, 1.414214, -0.5773503],\n [-0.8164966, -1.414214, -0.5773503],\n ],\n face: [\n [0, 1, 2],\n [0, 2, 3],\n [0, 3, 1],\n [1, 3, 2],\n ],\n };\n polyhedra[1] = {\n vertex: [\n [0, 0, 1.414214],\n [1.414214, 0, 0],\n [0, 1.414214, 0],\n [-1.414214, 0, 0],\n [0, -1.414214, 0],\n [0, 0, -1.414214],\n ],\n face: [\n [0, 1, 2],\n [0, 2, 3],\n [0, 3, 4],\n [0, 4, 1],\n [1, 4, 5],\n [1, 5, 2],\n [2, 5, 3],\n [3, 5, 4],\n ],\n };\n polyhedra[2] = {\n vertex: [\n [0, 0, 1.070466],\n [0.7136442, 0, 0.7978784],\n [-0.3568221, 0.618034, 0.7978784],\n [-0.3568221, -0.618034, 0.7978784],\n [0.7978784, 0.618034, 0.3568221],\n [0.7978784, -0.618034, 0.3568221],\n [-0.9341724, 0.381966, 0.3568221],\n [0.1362939, 1, 0.3568221],\n [0.1362939, -1, 0.3568221],\n [-0.9341724, -0.381966, 0.3568221],\n [0.9341724, 0.381966, -0.3568221],\n [0.9341724, -0.381966, -0.3568221],\n [-0.7978784, 0.618034, -0.3568221],\n [-0.1362939, 1, -0.3568221],\n [-0.1362939, -1, -0.3568221],\n [-0.7978784, -0.618034, -0.3568221],\n [0.3568221, 0.618034, -0.7978784],\n [0.3568221, -0.618034, -0.7978784],\n [-0.7136442, 0, -0.7978784],\n [0, 0, -1.070466],\n ],\n face: [\n [0, 1, 4, 7, 2],\n [0, 2, 6, 9, 3],\n [0, 3, 8, 5, 1],\n [1, 5, 11, 10, 4],\n [2, 7, 13, 12, 6],\n [3, 9, 15, 14, 8],\n [4, 10, 16, 13, 7],\n [5, 8, 14, 17, 11],\n [6, 12, 18, 15, 9],\n [10, 11, 17, 19, 16],\n [12, 13, 16, 19, 18],\n [14, 15, 18, 19, 17],\n ],\n };\n polyhedra[3] = {\n vertex: [\n [0, 0, 1.175571],\n [1.051462, 0, 0.5257311],\n [0.3249197, 1, 0.5257311],\n [-0.8506508, 0.618034, 0.5257311],\n [-0.8506508, -0.618034, 0.5257311],\n [0.3249197, -1, 0.5257311],\n [0.8506508, 0.618034, -0.5257311],\n [0.8506508, -0.618034, -0.5257311],\n [-0.3249197, 1, -0.5257311],\n [-1.051462, 0, -0.5257311],\n [-0.3249197, -1, -0.5257311],\n [0, 0, -1.175571],\n ],\n face: [\n [0, 1, 2],\n [0, 2, 3],\n [0, 3, 4],\n [0, 4, 5],\n [0, 5, 1],\n [1, 5, 7],\n [1, 7, 6],\n [1, 6, 2],\n [2, 6, 8],\n [2, 8, 3],\n [3, 8, 9],\n [3, 9, 4],\n [4, 9, 10],\n [4, 10, 5],\n [5, 10, 7],\n [6, 7, 11],\n [6, 11, 8],\n [7, 10, 11],\n [8, 11, 9],\n [9, 11, 10],\n ],\n };\n polyhedra[4] = {\n vertex: [\n [0, 0, 1.070722],\n [0.7148135, 0, 0.7971752],\n [-0.104682, 0.7071068, 0.7971752],\n [-0.6841528, 0.2071068, 0.7971752],\n [-0.104682, -0.7071068, 0.7971752],\n [0.6101315, 0.7071068, 0.5236279],\n [1.04156, 0.2071068, 0.1367736],\n [0.6101315, -0.7071068, 0.5236279],\n [-0.3574067, 1, 0.1367736],\n [-0.7888348, -0.5, 0.5236279],\n [-0.9368776, 0.5, 0.1367736],\n [-0.3574067, -1, 0.1367736],\n [0.3574067, 1, -0.1367736],\n [0.9368776, -0.5, -0.1367736],\n [0.7888348, 0.5, -0.5236279],\n [0.3574067, -1, -0.1367736],\n [-0.6101315, 0.7071068, -0.5236279],\n [-1.04156, -0.2071068, -0.1367736],\n [-0.6101315, -0.7071068, -0.5236279],\n [0.104682, 0.7071068, -0.7971752],\n [0.6841528, -0.2071068, -0.7971752],\n [0.104682, -0.7071068, -0.7971752],\n [-0.7148135, 0, -0.7971752],\n [0, 0, -1.070722],\n ],\n face: [\n [0, 2, 3],\n [1, 6, 5],\n [4, 9, 11],\n [7, 15, 13],\n [8, 16, 10],\n [12, 14, 19],\n [17, 22, 18],\n [20, 21, 23],\n [0, 1, 5, 2],\n [0, 3, 9, 4],\n [0, 4, 7, 1],\n [1, 7, 13, 6],\n [2, 5, 12, 8],\n [2, 8, 10, 3],\n [3, 10, 17, 9],\n [4, 11, 15, 7],\n [5, 6, 14, 12],\n [6, 13, 20, 14],\n [8, 12, 19, 16],\n [9, 17, 18, 11],\n [10, 16, 22, 17],\n [11, 18, 21, 15],\n [13, 15, 21, 20],\n [14, 20, 23, 19],\n [16, 19, 23, 22],\n [18, 22, 23, 21],\n ],\n };\n polyhedra[5] = {\n vertex: [\n [0, 0, 1.322876],\n [1.309307, 0, 0.1889822],\n [-0.9819805, 0.8660254, 0.1889822],\n [0.1636634, -1.299038, 0.1889822],\n [0.3273268, 0.8660254, -0.9449112],\n [-0.8183171, -0.4330127, -0.9449112],\n ],\n face: [\n [0, 3, 1],\n [2, 4, 5],\n [0, 1, 4, 2],\n [0, 2, 5, 3],\n [1, 3, 5, 4],\n ],\n };\n polyhedra[6] = {\n vertex: [\n [0, 0, 1.159953],\n [1.013464, 0, 0.5642542],\n [-0.3501431, 0.9510565, 0.5642542],\n [-0.7715208, -0.6571639, 0.5642542],\n [0.6633206, 0.9510565, -0.03144481],\n [0.8682979, -0.6571639, -0.3996071],\n [-1.121664, 0.2938926, -0.03144481],\n [-0.2348831, -1.063314, -0.3996071],\n [0.5181548, 0.2938926, -0.9953061],\n [-0.5850262, -0.112257, -0.9953061],\n ],\n face: [\n [0, 1, 4, 2],\n [0, 2, 6, 3],\n [1, 5, 8, 4],\n [3, 6, 9, 7],\n [5, 7, 9, 8],\n [0, 3, 7, 5, 1],\n [2, 4, 8, 9, 6],\n ],\n };\n polyhedra[7] = {\n vertex: [\n [0, 0, 1.118034],\n [0.8944272, 0, 0.6708204],\n [-0.2236068, 0.8660254, 0.6708204],\n [-0.7826238, -0.4330127, 0.6708204],\n [0.6708204, 0.8660254, 0.2236068],\n [1.006231, -0.4330127, -0.2236068],\n [-1.006231, 0.4330127, 0.2236068],\n [-0.6708204, -0.8660254, -0.2236068],\n [0.7826238, 0.4330127, -0.6708204],\n [0.2236068, -0.8660254, -0.6708204],\n [-0.8944272, 0, -0.6708204],\n [0, 0, -1.118034],\n ],\n face: [\n [0, 1, 4, 2],\n [0, 2, 6, 3],\n [1, 5, 8, 4],\n [3, 6, 10, 7],\n [5, 9, 11, 8],\n [7, 10, 11, 9],\n [0, 3, 7, 9, 5, 1],\n [2, 4, 8, 11, 10, 6],\n ],\n };\n polyhedra[8] = {\n vertex: [\n [-0.729665, 0.670121, 0.319155],\n [-0.655235, -0.29213, -0.754096],\n [-0.093922, -0.607123, 0.537818],\n [0.702196, 0.595691, 0.485187],\n [0.776626, -0.36656, -0.588064],\n ],\n face: [\n [1, 4, 2],\n [0, 1, 2],\n [3, 0, 2],\n [4, 3, 2],\n [4, 1, 0, 3],\n ],\n };\n polyhedra[9] = {\n vertex: [\n [-0.868849, -0.100041, 0.61257],\n [-0.329458, 0.976099, 0.28078],\n [-0.26629, -0.013796, -0.477654],\n [-0.13392, -1.034115, 0.229829],\n [0.738834, 0.707117, -0.307018],\n [0.859683, -0.535264, -0.338508],\n ],\n face: [\n [3, 0, 2],\n [5, 3, 2],\n [4, 5, 2],\n [1, 4, 2],\n [0, 1, 2],\n [0, 3, 5, 4, 1],\n ],\n };\n polyhedra[10] = {\n vertex: [\n [-0.610389, 0.243975, 0.531213],\n [-0.187812, -0.48795, -0.664016],\n [-0.187812, 0.9759, -0.664016],\n [0.187812, -0.9759, 0.664016],\n [0.798201, 0.243975, 0.132803],\n ],\n face: [\n [1, 3, 0],\n [3, 4, 0],\n [3, 1, 4],\n [0, 2, 1],\n [0, 4, 2],\n [2, 4, 1],\n ],\n };\n polyhedra[11] = {\n vertex: [\n [-1.028778, 0.392027, -0.048786],\n [-0.640503, -0.646161, 0.621837],\n [-0.125162, -0.395663, -0.540059],\n [0.004683, 0.888447, -0.651988],\n [0.125161, 0.395663, 0.540059],\n [0.632925, -0.791376, 0.433102],\n [1.031672, 0.157063, -0.354165],\n ],\n face: [\n [3, 2, 0],\n [2, 1, 0],\n [2, 5, 1],\n [0, 4, 3],\n [0, 1, 4],\n [4, 1, 5],\n [2, 3, 6],\n [3, 4, 6],\n [5, 2, 6],\n [4, 5, 6],\n ],\n };\n polyhedra[12] = {\n vertex: [\n [-0.669867, 0.334933, -0.529576],\n [-0.669867, 0.334933, 0.529577],\n [-0.4043, 1.212901, 0],\n [-0.334933, -0.669867, -0.529576],\n [-0.334933, -0.669867, 0.529577],\n [0.334933, 0.669867, -0.529576],\n [0.334933, 0.669867, 0.529577],\n [0.4043, -1.212901, 0],\n [0.669867, -0.334933, -0.529576],\n [0.669867, -0.334933, 0.529577],\n ],\n face: [\n [8, 9, 7],\n [6, 5, 2],\n [3, 8, 7],\n [5, 0, 2],\n [4, 3, 7],\n [0, 1, 2],\n [9, 4, 7],\n [1, 6, 2],\n [9, 8, 5, 6],\n [8, 3, 0, 5],\n [3, 4, 1, 0],\n [4, 9, 6, 1],\n ],\n };\n polyhedra[13] = {\n vertex: [\n [-0.931836, 0.219976, -0.264632],\n [-0.636706, 0.318353, 0.692816],\n [-0.613483, -0.735083, -0.264632],\n [-0.326545, 0.979634, 0],\n [-0.318353, -0.636706, 0.692816],\n [-0.159176, 0.477529, -0.856368],\n [0.159176, -0.477529, -0.856368],\n [0.318353, 0.636706, 0.692816],\n [0.326545, -0.979634, 0],\n [0.613482, 0.735082, -0.264632],\n [0.636706, -0.318353, 0.692816],\n [0.931835, -0.219977, -0.264632],\n ],\n face: [\n [11, 10, 8],\n [7, 9, 3],\n [6, 11, 8],\n [9, 5, 3],\n [2, 6, 8],\n [5, 0, 3],\n [4, 2, 8],\n [0, 1, 3],\n [10, 4, 8],\n [1, 7, 3],\n [10, 11, 9, 7],\n [11, 6, 5, 9],\n [6, 2, 0, 5],\n [2, 4, 1, 0],\n [4, 10, 7, 1],\n ],\n };\n polyhedra[14] = {\n vertex: [\n [-0.93465, 0.300459, -0.271185],\n [-0.838689, -0.260219, -0.516017],\n [-0.711319, 0.717591, 0.128359],\n [-0.710334, -0.156922, 0.080946],\n [-0.599799, 0.556003, -0.725148],\n [-0.503838, -0.004675, -0.969981],\n [-0.487004, 0.26021, 0.48049],\n [-0.460089, -0.750282, -0.512622],\n [-0.376468, 0.973135, -0.325605],\n [-0.331735, -0.646985, 0.084342],\n [-0.254001, 0.831847, 0.530001],\n [-0.125239, -0.494738, -0.966586],\n [0.029622, 0.027949, 0.730817],\n [0.056536, -0.982543, -0.262295],\n [0.08085, 1.087391, 0.076037],\n [0.125583, -0.532729, 0.485984],\n [0.262625, 0.599586, 0.780328],\n [0.391387, -0.726999, -0.716259],\n [0.513854, -0.868287, 0.139347],\n [0.597475, 0.85513, 0.326364],\n [0.641224, 0.109523, 0.783723],\n [0.737185, -0.451155, 0.538891],\n [0.848705, -0.612742, -0.314616],\n [0.976075, 0.365067, 0.32976],\n [1.072036, -0.19561, 0.084927],\n ],\n face: [\n [15, 18, 21],\n [12, 20, 16],\n [6, 10, 2],\n [3, 0, 1],\n [9, 7, 13],\n [2, 8, 4, 0],\n [0, 4, 5, 1],\n [1, 5, 11, 7],\n [7, 11, 17, 13],\n [13, 17, 22, 18],\n [18, 22, 24, 21],\n [21, 24, 23, 20],\n [20, 23, 19, 16],\n [16, 19, 14, 10],\n [10, 14, 8, 2],\n [15, 9, 13, 18],\n [12, 15, 21, 20],\n [6, 12, 16, 10],\n [3, 6, 2, 0],\n [9, 3, 1, 7],\n [9, 15, 12, 6, 3],\n [22, 17, 11, 5, 4, 8, 14, 19, 23, 24],\n ],\n };\n const type = options.type && (options.type < 0 || options.type >= polyhedra.length) ? 0 : options.type || 0;\n const size = options.size;\n const sizeX = options.sizeX || size || 1;\n const sizeY = options.sizeY || size || 1;\n const sizeZ = options.sizeZ || size || 1;\n const data = options.custom || polyhedra[type];\n const nbfaces = data.face.length;\n const faceUV = options.faceUV || new Array(nbfaces);\n const faceColors = options.faceColors;\n const flat = options.flat === undefined ? true : options.flat;\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n const positions = [];\n const indices = [];\n const normals = [];\n const uvs = [];\n const colors = [];\n let index = 0;\n let faceIdx = 0; // face cursor in the array \"indexes\"\n const indexes = [];\n let i = 0;\n let f = 0;\n let u, v, ang, x, y, tmp;\n // default face colors and UV if undefined\n if (flat) {\n for (f = 0; f < nbfaces; f++) {\n if (faceColors && faceColors[f] === undefined) {\n faceColors[f] = new Color4(1, 1, 1, 1);\n }\n if (faceUV && faceUV[f] === undefined) {\n faceUV[f] = new Vector4(0, 0, 1, 1);\n }\n }\n }\n if (!flat) {\n for (i = 0; i < data.vertex.length; i++) {\n positions.push(data.vertex[i][0] * sizeX, data.vertex[i][1] * sizeY, data.vertex[i][2] * sizeZ);\n uvs.push(0, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 : 0);\n }\n for (f = 0; f < nbfaces; f++) {\n for (i = 0; i < data.face[f].length - 2; i++) {\n indices.push(data.face[f][0], data.face[f][i + 2], data.face[f][i + 1]);\n }\n }\n }\n else {\n for (f = 0; f < nbfaces; f++) {\n const fl = data.face[f].length; // number of vertices of the current face\n ang = (2 * Math.PI) / fl;\n x = 0.5 * Math.tan(ang / 2);\n y = 0.5;\n // positions, uvs, colors\n for (i = 0; i < fl; i++) {\n // positions\n positions.push(data.vertex[data.face[f][i]][0] * sizeX, data.vertex[data.face[f][i]][1] * sizeY, data.vertex[data.face[f][i]][2] * sizeZ);\n indexes.push(index);\n index++;\n // uvs\n u = faceUV[f].x + (faceUV[f].z - faceUV[f].x) * (0.5 + x);\n v = faceUV[f].y + (faceUV[f].w - faceUV[f].y) * (y - 0.5);\n uvs.push(u, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - v : v);\n tmp = x * Math.cos(ang) - y * Math.sin(ang);\n y = x * Math.sin(ang) + y * Math.cos(ang);\n x = tmp;\n // colors\n if (faceColors) {\n colors.push(faceColors[f].r, faceColors[f].g, faceColors[f].b, faceColors[f].a);\n }\n }\n // indices from indexes\n for (i = 0; i < fl - 2; i++) {\n indices.push(indexes[0 + faceIdx], indexes[i + 2 + faceIdx], indexes[i + 1 + faceIdx]);\n }\n faceIdx += fl;\n }\n }\n VertexData.ComputeNormals(positions, indices, normals);\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, options.frontUVs, options.backUVs);\n const vertexData = new VertexData();\n vertexData.positions = positions;\n vertexData.indices = indices;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n if (faceColors && flat) {\n vertexData.colors = colors;\n }\n return vertexData;\n}\n/**\n * Creates a polyhedron mesh\n * * The parameter `type` (positive integer, max 14, default 0) sets the polyhedron type to build among the 15 embbeded types. Please refer to the type sheet in the tutorial to choose the wanted type\n * * The parameter `size` (positive float, default 1) sets the polygon size\n * * You can overwrite the `size` on each dimension bu using the parameters `sizeX`, `sizeY` or `sizeZ` (positive floats, default to `size` value)\n * * You can build other polyhedron types than the 15 embbeded ones by setting the parameter `custom` (`polyhedronObject`, default null). If you set the parameter `custom`, this overrides the parameter `type`\n * * A `polyhedronObject` is a formatted javascript object. You'll find a full file with pre-set polyhedra here : https://github.com/BabylonJS/Extensions/tree/master/Polyhedron\n * * You can set the color and the UV of each side of the polyhedron with the parameters `faceColors` (Color4, default `(1, 1, 1, 1)`) and faceUV (Vector4, default `(0, 0, 1, 1)`)\n * * To understand how to set `faceUV` or `faceColors`, please read this by considering the right number of faces of your polyhedron, instead of only 6 for the box : https://doc.babylonjs.com/features/featuresDeepDive/materials/using/texturePerBoxFace\n * * The parameter `flat` (boolean, default true). If set to false, it gives the polyhedron a single global face, so less vertices and shared normals. In this case, `faceColors` and `faceUV` are ignored\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.type\n * @param options.size\n * @param options.sizeX\n * @param options.sizeY\n * @param options.sizeZ\n * @param options.custom\n * @param options.faceUV\n * @param options.faceColors\n * @param options.flat\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param scene defines the hosting scene\n * @returns the polyhedron mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/polyhedra\n */\nexport function CreatePolyhedron(name, options = {}, scene = null) {\n const polyhedron = new Mesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n polyhedron._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreatePolyhedronVertexData(options);\n vertexData.applyToMesh(polyhedron, options.updatable);\n return polyhedron;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use the function directly from the module\n */\nexport const PolyhedronBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreatePolyhedron,\n};\nVertexData.CreatePolyhedron = CreatePolyhedronVertexData;\nMesh.CreatePolyhedron = (name, options, scene) => {\n return CreatePolyhedron(name, options, scene);\n};\n//# sourceMappingURL=polyhedronBuilder.js.map","import { Vector3, Vector2 } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Creates the VertexData of the IcoSphere\n * @param options an object used to set the following optional parameters for the IcoSphere, required but can be empty\n * * radius the radius of the IcoSphere, optional default 1\n * * radiusX allows stretching in the x direction, optional, default radius\n * * radiusY allows stretching in the y direction, optional, default radius\n * * radiusZ allows stretching in the z direction, optional, default radius\n * * flat when true creates a flat shaded mesh, optional, default true\n * * subdivisions increasing the subdivisions increases the number of faces, optional, default 4\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.radius\n * @param options.radiusX\n * @param options.radiusY\n * @param options.radiusZ\n * @param options.flat\n * @param options.subdivisions\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @returns the VertexData of the IcoSphere\n */\nexport function CreateIcoSphereVertexData(options) {\n const sideOrientation = options.sideOrientation || VertexData.DEFAULTSIDE;\n const radius = options.radius || 1;\n const flat = options.flat === undefined ? true : options.flat;\n const subdivisions = (options.subdivisions || 4) | 0;\n const radiusX = options.radiusX || radius;\n const radiusY = options.radiusY || radius;\n const radiusZ = options.radiusZ || radius;\n const t = (1 + Math.sqrt(5)) / 2;\n // 12 vertex x,y,z\n const icoVertices = [\n -1,\n t,\n -0,\n 1,\n t,\n 0,\n -1,\n -t,\n 0,\n 1,\n -t,\n 0,\n 0,\n -1,\n -t,\n 0,\n 1,\n -t,\n 0,\n -1,\n t,\n 0,\n 1,\n t,\n t,\n 0,\n 1,\n t,\n 0,\n -1,\n -t,\n 0,\n 1,\n -t,\n 0,\n -1, // v8-11\n ];\n // index of 3 vertex makes a face of icopshere\n const ico_indices = [\n 0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 12, 22, 23, 1, 5, 20, 5, 11, 4, 23, 22, 13, 22, 18, 6, 7, 1, 8, 14, 21, 4, 14, 4, 2, 16, 13, 6, 15, 6, 19, 3, 8, 9, 4, 21, 5, 13, 17,\n 23, 6, 13, 22, 19, 6, 18, 9, 8, 1,\n ];\n // vertex for uv have aliased position, not for UV\n const vertices_unalias_id = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n // vertex alias\n 0,\n 2,\n 3,\n 3,\n 3,\n 4,\n 7,\n 8,\n 9,\n 9,\n 10,\n 11, // 23: B + 12\n ];\n // uv as integer step (not pixels !)\n const ico_vertexuv = [\n 5,\n 1,\n 3,\n 1,\n 6,\n 4,\n 0,\n 0,\n 5,\n 3,\n 4,\n 2,\n 2,\n 2,\n 4,\n 0,\n 2,\n 0,\n 1,\n 1,\n 6,\n 0,\n 6,\n 2,\n // vertex alias (for same vertex on different faces)\n 0,\n 4,\n 3,\n 3,\n 4,\n 4,\n 3,\n 1,\n 4,\n 2,\n 4,\n 4,\n 0,\n 2,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 1,\n 3,\n 2,\n 4, // 23: B + 12\n ];\n // Vertices[0, 1, ...9, A, B] : position on UV plane\n // '+' indicate duplicate position to be fixed (3,9:0,2,3,4,7,8,A,B)\n // First island of uv mapping\n // v = 4h 3+ 2\n // v = 3h 9+ 4\n // v = 2h 9+ 5 B\n // v = 1h 9 1 0\n // v = 0h 3 8 7 A\n // u = 0 1 2 3 4 5 6 *a\n // Second island of uv mapping\n // v = 4h 0+ B+ 4+\n // v = 3h A+ 2+\n // v = 2h 7+ 6 3+\n // v = 1h 8+ 3+\n // v = 0h\n // u = 0 1 2 3 4 5 6 *a\n // Face layout on texture UV mapping\n // ============\n // \\ 4 /\\ 16 / ======\n // \\ / \\ / /\\ 11 /\n // \\/ 7 \\/ / \\ /\n // ======= / 10 \\/\n // /\\ 17 /\\ =======\n // / \\ / \\ \\ 15 /\\\n // / 8 \\/ 12 \\ \\ / \\\n // ============ \\/ 6 \\\n // \\ 18 /\\ ============\n // \\ / \\ \\ 5 /\\ 0 /\n // \\/ 13 \\ \\ / \\ /\n // ======= \\/ 1 \\/\n // =============\n // /\\ 19 /\\ 2 /\\\n // / \\ / \\ / \\\n // / 14 \\/ 9 \\/ 3 \\\n // ===================\n // uv step is u:1 or 0.5, v:cos(30)=sqrt(3)/2, ratio approx is 84/97\n const ustep = 138 / 1024;\n const vstep = 239 / 1024;\n const uoffset = 60 / 1024;\n const voffset = 26 / 1024;\n // Second island should have margin, not to touch the first island\n // avoid any borderline artefact in pixel rounding\n const island_u_offset = -40 / 1024;\n const island_v_offset = +20 / 1024;\n // face is either island 0 or 1 :\n // second island is for faces : [4, 7, 8, 12, 13, 16, 17, 18]\n const island = [\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 1,\n 1,\n 0,\n 0,\n 0,\n 1,\n 1,\n 0,\n 0,\n 1,\n 1,\n 1,\n 0, // 15 - 19\n ];\n const indices = [];\n const positions = [];\n const normals = [];\n const uvs = [];\n let current_indice = 0;\n // prepare array of 3 vector (empty) (to be worked in place, shared for each face)\n const face_vertex_pos = new Array(3);\n const face_vertex_uv = new Array(3);\n let v012;\n for (v012 = 0; v012 < 3; v012++) {\n face_vertex_pos[v012] = Vector3.Zero();\n face_vertex_uv[v012] = Vector2.Zero();\n }\n // create all with normals\n for (let face = 0; face < 20; face++) {\n // 3 vertex per face\n for (v012 = 0; v012 < 3; v012++) {\n // look up vertex 0,1,2 to its index in 0 to 11 (or 23 including alias)\n const v_id = ico_indices[3 * face + v012];\n // vertex have 3D position (x,y,z)\n face_vertex_pos[v012].copyFromFloats(icoVertices[3 * vertices_unalias_id[v_id]], icoVertices[3 * vertices_unalias_id[v_id] + 1], icoVertices[3 * vertices_unalias_id[v_id] + 2]);\n // Normalize to get normal\n face_vertex_pos[v012].normalize();\n // uv Coordinates from vertex ID\n face_vertex_uv[v012].copyFromFloats(ico_vertexuv[2 * v_id] * ustep + uoffset + island[face] * island_u_offset, ico_vertexuv[2 * v_id + 1] * vstep + voffset + island[face] * island_v_offset);\n }\n // Subdivide the face (interpolate pos, norm, uv)\n // - pos is linear interpolation, then projected to sphere (converge polyhedron to sphere)\n // - norm is linear interpolation of vertex corner normal\n // (to be checked if better to re-calc from face vertex, or if approximation is OK ??? )\n // - uv is linear interpolation\n //\n // Topology is as below for sub-divide by 2\n // vertex shown as v0,v1,v2\n // interp index is i1 to progress in range [v0,v1[\n // interp index is i2 to progress in range [v0,v2[\n // face index as (i1,i2) for /\\ : (i1,i2),(i1+1,i2),(i1,i2+1)\n // and (i1,i2)' for \\/ : (i1+1,i2),(i1+1,i2+1),(i1,i2+1)\n //\n //\n // i2 v2\n // ^ ^\n // / / \\\n // / / \\\n // / / \\\n // / / (0,1) \\\n // / #---------\\\n // / / \\ (0,0)'/ \\\n // / / \\ / \\\n // / / \\ / \\\n // / / (0,0) \\ / (1,0) \\\n // / #---------#---------\\\n // v0 v1\n //\n // --------------------> i1\n //\n // interp of (i1,i2):\n // along i2 : x0=lerp(v0,v2, i2/S) <---> x1=lerp(v1,v2, i2/S)\n // along i1 : lerp(x0,x1, i1/(S-i2))\n //\n // centroid of triangle is needed to get help normal computation\n // (c1,c2) are used for centroid location\n const interp_vertex = (i1, i2, c1, c2) => {\n // vertex is interpolated from\n // - face_vertex_pos[0..2]\n // - face_vertex_uv[0..2]\n const pos_x0 = Vector3.Lerp(face_vertex_pos[0], face_vertex_pos[2], i2 / subdivisions);\n const pos_x1 = Vector3.Lerp(face_vertex_pos[1], face_vertex_pos[2], i2 / subdivisions);\n const pos_interp = subdivisions === i2 ? face_vertex_pos[2] : Vector3.Lerp(pos_x0, pos_x1, i1 / (subdivisions - i2));\n pos_interp.normalize();\n let vertex_normal;\n if (flat) {\n // in flat mode, recalculate normal as face centroid normal\n const centroid_x0 = Vector3.Lerp(face_vertex_pos[0], face_vertex_pos[2], c2 / subdivisions);\n const centroid_x1 = Vector3.Lerp(face_vertex_pos[1], face_vertex_pos[2], c2 / subdivisions);\n vertex_normal = Vector3.Lerp(centroid_x0, centroid_x1, c1 / (subdivisions - c2));\n }\n else {\n // in smooth mode, recalculate normal from each single vertex position\n vertex_normal = new Vector3(pos_interp.x, pos_interp.y, pos_interp.z);\n }\n // Vertex normal need correction due to X,Y,Z radius scaling\n vertex_normal.x /= radiusX;\n vertex_normal.y /= radiusY;\n vertex_normal.z /= radiusZ;\n vertex_normal.normalize();\n const uv_x0 = Vector2.Lerp(face_vertex_uv[0], face_vertex_uv[2], i2 / subdivisions);\n const uv_x1 = Vector2.Lerp(face_vertex_uv[1], face_vertex_uv[2], i2 / subdivisions);\n const uv_interp = subdivisions === i2 ? face_vertex_uv[2] : Vector2.Lerp(uv_x0, uv_x1, i1 / (subdivisions - i2));\n positions.push(pos_interp.x * radiusX, pos_interp.y * radiusY, pos_interp.z * radiusZ);\n normals.push(vertex_normal.x, vertex_normal.y, vertex_normal.z);\n uvs.push(uv_interp.x, CompatibilityOptions.UseOpenGLOrientationForUV ? 1.0 - uv_interp.y : uv_interp.y);\n // push each vertex has member of a face\n // Same vertex can belong to multiple face, it is pushed multiple time (duplicate vertex are present)\n indices.push(current_indice);\n current_indice++;\n };\n for (let i2 = 0; i2 < subdivisions; i2++) {\n for (let i1 = 0; i1 + i2 < subdivisions; i1++) {\n // face : (i1,i2) for /\\ :\n // interp for : (i1,i2),(i1+1,i2),(i1,i2+1)\n interp_vertex(i1, i2, i1 + 1.0 / 3, i2 + 1.0 / 3);\n interp_vertex(i1 + 1, i2, i1 + 1.0 / 3, i2 + 1.0 / 3);\n interp_vertex(i1, i2 + 1, i1 + 1.0 / 3, i2 + 1.0 / 3);\n if (i1 + i2 + 1 < subdivisions) {\n // face : (i1,i2)' for \\/ :\n // interp for (i1+1,i2),(i1+1,i2+1),(i1,i2+1)\n interp_vertex(i1 + 1, i2, i1 + 2.0 / 3, i2 + 2.0 / 3);\n interp_vertex(i1 + 1, i2 + 1, i1 + 2.0 / 3, i2 + 2.0 / 3);\n interp_vertex(i1, i2 + 1, i1 + 2.0 / 3, i2 + 2.0 / 3);\n }\n }\n }\n }\n // Sides\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs, options.frontUVs, options.backUVs);\n // Result\n const vertexData = new VertexData();\n vertexData.indices = indices;\n vertexData.positions = positions;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n return vertexData;\n}\n/**\n * Creates a sphere based upon an icosahedron with 20 triangular faces which can be subdivided\n * * The parameter `radius` sets the radius size (float) of the icosphere (default 1)\n * * You can set some different icosphere dimensions, for instance to build an ellipsoid, by using the parameters `radiusX`, `radiusY` and `radiusZ` (all by default have the same value of `radius`)\n * * The parameter `subdivisions` sets the number of subdivisions (positive integer, default 4). The more subdivisions, the more faces on the icosphere whatever its size\n * * The parameter `flat` (boolean, default true) gives each side its own normals. Set it to false to get a smooth continuous light reflection on the surface\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param options.radius\n * @param options.radiusX\n * @param options.radiusY\n * @param options.radiusZ\n * @param options.flat\n * @param options.subdivisions\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.updatable\n * @param scene defines the hosting scene\n * @returns the icosahedron mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/polyhedra#icosphere\n */\nexport function CreateIcoSphere(name, options = {}, scene = null) {\n const sphere = new Mesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n sphere._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreateIcoSphereVertexData(options);\n vertexData.applyToMesh(sphere, options.updatable);\n return sphere;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use the function directly from the module\n */\nexport const IcoSphereBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateIcoSphere,\n};\nVertexData.CreateIcoSphere = CreateIcoSphereVertexData;\nMesh.CreateIcoSphere = (name, options, scene) => {\n return CreateIcoSphere(name, options, scene);\n};\n//# sourceMappingURL=icoSphereBuilder.js.map","import { Vector3, Matrix, Vector2, TmpVectors } from \"../../Maths/math.vector.js\";\nimport { Scalar } from \"../../Maths/math.scalar.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { VertexBuffer } from \"../../Buffers/buffer.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\nconst xpAxis = new Vector3(1, 0, 0);\nconst xnAxis = new Vector3(-1, 0, 0);\nconst ypAxis = new Vector3(0, 1, 0);\nconst ynAxis = new Vector3(0, -1, 0);\nconst zpAxis = new Vector3(0, 0, 1);\nconst znAxis = new Vector3(0, 0, -1);\n/** @internal */\nclass DecalVertex {\n constructor(position = Vector3.Zero(), normal = Vector3.Up(), uv = Vector2.Zero(), vertexIdx = 0, vertexIdxForBones = 0, localPositionOverride = null, localNormalOverride = null, matrixIndicesOverride = null, matrixWeightsOverride = null) {\n this.position = position;\n this.normal = normal;\n this.uv = uv;\n this.vertexIdx = vertexIdx;\n this.vertexIdxForBones = vertexIdxForBones;\n this.localPositionOverride = localPositionOverride;\n this.localNormalOverride = localNormalOverride;\n this.matrixIndicesOverride = matrixIndicesOverride;\n this.matrixWeightsOverride = matrixWeightsOverride;\n }\n clone() {\n var _a, _b, _c, _d;\n return new DecalVertex(this.position.clone(), this.normal.clone(), this.uv.clone(), this.vertexIdx, this.vertexIdxForBones, (_a = this.localPositionOverride) === null || _a === void 0 ? void 0 : _a.slice(), (_b = this.localNormalOverride) === null || _b === void 0 ? void 0 : _b.slice(), (_c = this.matrixIndicesOverride) === null || _c === void 0 ? void 0 : _c.slice(), (_d = this.matrixWeightsOverride) === null || _d === void 0 ? void 0 : _d.slice());\n }\n}\n/**\n * Creates a decal mesh.\n * A decal is a mesh usually applied as a model onto the surface of another mesh. So don't forget the parameter `sourceMesh` depicting the decal\n * * The parameter `position` (Vector3, default `(0, 0, 0)`) sets the position of the decal in World coordinates\n * * The parameter `normal` (Vector3, default `Vector3.Up`) sets the normal of the mesh where the decal is applied onto in World coordinates\n * * The parameter `size` (Vector3, default `(1, 1, 1)`) sets the decal scaling\n * * The parameter `angle` (float in radian, default 0) sets the angle to rotate the decal\n * * The parameter `captureUVS` defines if we need to capture the uvs or compute them\n * * The parameter `cullBackFaces` defines if the back faces should be removed from the decal mesh\n * * The parameter `localMode` defines that the computations should be done with the local mesh coordinates instead of the world space coordinates.\n * * Use this mode if you want the decal to be parented to the sourceMesh and move/rotate with it.\n * Note: Meshes with morph targets are not supported!\n * @param name defines the name of the mesh\n * @param sourceMesh defines the mesh where the decal must be applied\n * @param options defines the options used to create the mesh\n * @param options.position\n * @param options.normal\n * @param options.size\n * @param options.angle\n * @param options.captureUVS\n * @param options.cullBackFaces\n * @param options.localMode\n * @returns the decal mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/decals\n */\nexport function CreateDecal(name, sourceMesh, options) {\n var _a, _b, _c, _d;\n const hasSkeleton = !!sourceMesh.skeleton;\n const useLocalComputation = options.localMode || hasSkeleton;\n const meshHasOverridenMaterial = sourceMesh.overrideMaterialSideOrientation !== null && sourceMesh.overrideMaterialSideOrientation !== undefined;\n const indices = sourceMesh.getIndices();\n const positions = hasSkeleton ? sourceMesh.getPositionData(true, true) : sourceMesh.getVerticesData(VertexBuffer.PositionKind);\n const normals = hasSkeleton ? sourceMesh.getNormalsData(true, true) : sourceMesh.getVerticesData(VertexBuffer.NormalKind);\n const localPositions = useLocalComputation ? (hasSkeleton ? sourceMesh.getVerticesData(VertexBuffer.PositionKind) : positions) : null;\n const localNormals = useLocalComputation ? (hasSkeleton ? sourceMesh.getVerticesData(VertexBuffer.NormalKind) : normals) : null;\n const uvs = sourceMesh.getVerticesData(VertexBuffer.UVKind);\n const matIndices = hasSkeleton ? sourceMesh.getVerticesData(VertexBuffer.MatricesIndicesKind) : null;\n const matWeights = hasSkeleton ? sourceMesh.getVerticesData(VertexBuffer.MatricesWeightsKind) : null;\n const matIndicesExtra = hasSkeleton ? sourceMesh.getVerticesData(VertexBuffer.MatricesIndicesExtraKind) : null;\n const matWeightsExtra = hasSkeleton ? sourceMesh.getVerticesData(VertexBuffer.MatricesWeightsExtraKind) : null;\n const position = options.position || Vector3.Zero();\n let normal = options.normal || Vector3.Up();\n const size = options.size || Vector3.One();\n const angle = options.angle || 0;\n // Getting correct rotation\n if (!normal) {\n const target = new Vector3(0, 0, 1);\n const camera = sourceMesh.getScene().activeCamera;\n const cameraWorldTarget = Vector3.TransformCoordinates(target, camera.getWorldMatrix());\n normal = camera.globalPosition.subtract(cameraWorldTarget);\n }\n const yaw = -Math.atan2(normal.z, normal.x) - Math.PI / 2;\n const len = Math.sqrt(normal.x * normal.x + normal.z * normal.z);\n const pitch = Math.atan2(normal.y, len);\n const vertexData = new VertexData();\n vertexData.indices = [];\n vertexData.positions = [];\n vertexData.normals = [];\n vertexData.uvs = [];\n vertexData.matricesIndices = hasSkeleton ? [] : null;\n vertexData.matricesWeights = hasSkeleton ? [] : null;\n vertexData.matricesIndicesExtra = matIndicesExtra ? [] : null;\n vertexData.matricesWeightsExtra = matWeightsExtra ? [] : null;\n let currentVertexDataIndex = 0;\n const extractDecalVector3 = (indexId, transformMatrix) => {\n const result = new DecalVertex();\n if (!indices || !positions || !normals) {\n return result;\n }\n const vertexId = indices[indexId];\n result.vertexIdx = vertexId * 3;\n result.vertexIdxForBones = vertexId * 4;\n // Send vector to decal local world\n result.position = new Vector3(positions[vertexId * 3], positions[vertexId * 3 + 1], positions[vertexId * 3 + 2]);\n Vector3.TransformCoordinatesToRef(result.position, transformMatrix, result.position);\n // Get normal\n result.normal = new Vector3(normals[vertexId * 3], normals[vertexId * 3 + 1], normals[vertexId * 3 + 2]);\n Vector3.TransformNormalToRef(result.normal, transformMatrix, result.normal);\n if (options.captureUVS && uvs) {\n const v = uvs[vertexId * 2 + 1];\n result.uv = new Vector2(uvs[vertexId * 2], CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - v : v);\n }\n return result;\n };\n const emptyArray = [0, 0, 0, 0];\n // Inspired by https://github.com/mrdoob/three.js/blob/eee231960882f6f3b6113405f524956145148146/examples/js/geometries/DecalGeometry.js\n const clip = (vertices, axis) => {\n if (vertices.length === 0) {\n return vertices;\n }\n const clipSize = 0.5 * Math.abs(Vector3.Dot(size, axis));\n const indexOf = (arr, val, start, num) => {\n for (let i = 0; i < num; ++i) {\n if (arr[start + i] === val) {\n return start + i;\n }\n }\n return -1;\n };\n const clipVertices = (v0, v1) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;\n const clipFactor = Vector3.GetClipFactor(v0.position, v1.position, axis, clipSize);\n let indices = emptyArray;\n let weights = emptyArray;\n if (matIndices && matWeights) {\n const mat0Index = v0.matrixIndicesOverride ? 0 : v0.vertexIdxForBones;\n const v0Indices = (_a = v0.matrixIndicesOverride) !== null && _a !== void 0 ? _a : matIndices;\n const v0Weights = (_b = v0.matrixWeightsOverride) !== null && _b !== void 0 ? _b : matWeights;\n const mat1Index = v1.matrixIndicesOverride ? 0 : v1.vertexIdxForBones;\n const v1Indices = (_c = v1.matrixIndicesOverride) !== null && _c !== void 0 ? _c : matIndices;\n const v1Weights = (_d = v1.matrixWeightsOverride) !== null && _d !== void 0 ? _d : matWeights;\n indices = [0, 0, 0, 0];\n weights = [0, 0, 0, 0];\n let index = 0;\n for (let i = 0; i < 4; ++i) {\n if (v0Weights[mat0Index + i] > 0) {\n const idx = indexOf(v1Indices, v0Indices[mat0Index + i], mat1Index, 4);\n indices[index] = v0Indices[mat0Index + i];\n weights[index] = Scalar.Lerp(v0Weights[mat0Index + i], idx >= 0 ? v1Weights[idx] : 0, clipFactor);\n index++;\n }\n }\n for (let i = 0; i < 4 && index < 4; ++i) {\n const ind = v1Indices[mat1Index + i];\n if (indexOf(v0Indices, ind, mat0Index, 4) !== -1)\n continue;\n indices[index] = ind;\n weights[index] = Scalar.Lerp(0, v1Weights[mat1Index + i], clipFactor);\n index++;\n }\n const sumw = weights[0] + weights[1] + weights[2] + weights[3];\n weights[0] /= sumw;\n weights[1] /= sumw;\n weights[2] /= sumw;\n weights[3] /= sumw;\n }\n const v0LocalPositionX = v0.localPositionOverride ? v0.localPositionOverride[0] : (_e = localPositions === null || localPositions === void 0 ? void 0 : localPositions[v0.vertexIdx]) !== null && _e !== void 0 ? _e : 0;\n const v0LocalPositionY = v0.localPositionOverride ? v0.localPositionOverride[1] : (_f = localPositions === null || localPositions === void 0 ? void 0 : localPositions[v0.vertexIdx + 1]) !== null && _f !== void 0 ? _f : 0;\n const v0LocalPositionZ = v0.localPositionOverride ? v0.localPositionOverride[2] : (_g = localPositions === null || localPositions === void 0 ? void 0 : localPositions[v0.vertexIdx + 2]) !== null && _g !== void 0 ? _g : 0;\n const v1LocalPositionX = v1.localPositionOverride ? v1.localPositionOverride[0] : (_h = localPositions === null || localPositions === void 0 ? void 0 : localPositions[v1.vertexIdx]) !== null && _h !== void 0 ? _h : 0;\n const v1LocalPositionY = v1.localPositionOverride ? v1.localPositionOverride[1] : (_j = localPositions === null || localPositions === void 0 ? void 0 : localPositions[v1.vertexIdx + 1]) !== null && _j !== void 0 ? _j : 0;\n const v1LocalPositionZ = v1.localPositionOverride ? v1.localPositionOverride[2] : (_k = localPositions === null || localPositions === void 0 ? void 0 : localPositions[v1.vertexIdx + 2]) !== null && _k !== void 0 ? _k : 0;\n const v0LocalNormalX = v0.localNormalOverride ? v0.localNormalOverride[0] : (_l = localNormals === null || localNormals === void 0 ? void 0 : localNormals[v0.vertexIdx]) !== null && _l !== void 0 ? _l : 0;\n const v0LocalNormalY = v0.localNormalOverride ? v0.localNormalOverride[1] : (_m = localNormals === null || localNormals === void 0 ? void 0 : localNormals[v0.vertexIdx + 1]) !== null && _m !== void 0 ? _m : 0;\n const v0LocalNormalZ = v0.localNormalOverride ? v0.localNormalOverride[2] : (_o = localNormals === null || localNormals === void 0 ? void 0 : localNormals[v0.vertexIdx + 2]) !== null && _o !== void 0 ? _o : 0;\n const v1LocalNormalX = v1.localNormalOverride ? v1.localNormalOverride[0] : (_p = localNormals === null || localNormals === void 0 ? void 0 : localNormals[v1.vertexIdx]) !== null && _p !== void 0 ? _p : 0;\n const v1LocalNormalY = v1.localNormalOverride ? v1.localNormalOverride[1] : (_q = localNormals === null || localNormals === void 0 ? void 0 : localNormals[v1.vertexIdx + 1]) !== null && _q !== void 0 ? _q : 0;\n const v1LocalNormalZ = v1.localNormalOverride ? v1.localNormalOverride[2] : (_r = localNormals === null || localNormals === void 0 ? void 0 : localNormals[v1.vertexIdx + 2]) !== null && _r !== void 0 ? _r : 0;\n const interpNormalX = v0LocalNormalX + (v1LocalNormalX - v0LocalNormalX) * clipFactor;\n const interpNormalY = v0LocalNormalY + (v1LocalNormalY - v0LocalNormalY) * clipFactor;\n const interpNormalZ = v0LocalNormalZ + (v1LocalNormalZ - v0LocalNormalZ) * clipFactor;\n const norm = Math.sqrt(interpNormalX * interpNormalX + interpNormalY * interpNormalY + interpNormalZ * interpNormalZ);\n return new DecalVertex(Vector3.Lerp(v0.position, v1.position, clipFactor), Vector3.Lerp(v0.normal, v1.normal, clipFactor).normalize(), Vector2.Lerp(v0.uv, v1.uv, clipFactor), -1, -1, localPositions\n ? [\n v0LocalPositionX + (v1LocalPositionX - v0LocalPositionX) * clipFactor,\n v0LocalPositionY + (v1LocalPositionY - v0LocalPositionY) * clipFactor,\n v0LocalPositionZ + (v1LocalPositionZ - v0LocalPositionZ) * clipFactor,\n ]\n : null, localNormals ? [interpNormalX / norm, interpNormalY / norm, interpNormalZ / norm] : null, indices, weights);\n };\n let clipResult = null;\n if (vertices.length > 3) {\n clipResult = [];\n }\n for (let index = 0; index < vertices.length; index += 3) {\n let total = 0;\n let nV1 = null;\n let nV2 = null;\n let nV3 = null;\n let nV4 = null;\n const d1 = Vector3.Dot(vertices[index].position, axis) - clipSize;\n const d2 = Vector3.Dot(vertices[index + 1].position, axis) - clipSize;\n const d3 = Vector3.Dot(vertices[index + 2].position, axis) - clipSize;\n const v1Out = d1 > 0;\n const v2Out = d2 > 0;\n const v3Out = d3 > 0;\n total = (v1Out ? 1 : 0) + (v2Out ? 1 : 0) + (v3Out ? 1 : 0);\n switch (total) {\n case 0:\n if (vertices.length > 3) {\n clipResult.push(vertices[index]);\n clipResult.push(vertices[index + 1]);\n clipResult.push(vertices[index + 2]);\n }\n else {\n clipResult = vertices;\n }\n break;\n case 1:\n clipResult = clipResult !== null && clipResult !== void 0 ? clipResult : new Array();\n if (v1Out) {\n nV1 = vertices[index + 1];\n nV2 = vertices[index + 2];\n nV3 = clipVertices(vertices[index], nV1);\n nV4 = clipVertices(vertices[index], nV2);\n }\n if (v2Out) {\n nV1 = vertices[index];\n nV2 = vertices[index + 2];\n nV3 = clipVertices(vertices[index + 1], nV1);\n nV4 = clipVertices(vertices[index + 1], nV2);\n clipResult.push(nV3);\n clipResult.push(nV2.clone());\n clipResult.push(nV1.clone());\n clipResult.push(nV2.clone());\n clipResult.push(nV3.clone());\n clipResult.push(nV4);\n break;\n }\n if (v3Out) {\n nV1 = vertices[index];\n nV2 = vertices[index + 1];\n nV3 = clipVertices(vertices[index + 2], nV1);\n nV4 = clipVertices(vertices[index + 2], nV2);\n }\n if (nV1 && nV2 && nV3 && nV4) {\n clipResult.push(nV1.clone());\n clipResult.push(nV2.clone());\n clipResult.push(nV3);\n clipResult.push(nV4);\n clipResult.push(nV3.clone());\n clipResult.push(nV2.clone());\n }\n break;\n case 2:\n clipResult = clipResult !== null && clipResult !== void 0 ? clipResult : new Array();\n if (!v1Out) {\n nV1 = vertices[index].clone();\n nV2 = clipVertices(nV1, vertices[index + 1]);\n nV3 = clipVertices(nV1, vertices[index + 2]);\n clipResult.push(nV1);\n clipResult.push(nV2);\n clipResult.push(nV3);\n }\n if (!v2Out) {\n nV1 = vertices[index + 1].clone();\n nV2 = clipVertices(nV1, vertices[index + 2]);\n nV3 = clipVertices(nV1, vertices[index]);\n clipResult.push(nV1);\n clipResult.push(nV2);\n clipResult.push(nV3);\n }\n if (!v3Out) {\n nV1 = vertices[index + 2].clone();\n nV2 = clipVertices(nV1, vertices[index]);\n nV3 = clipVertices(nV1, vertices[index + 1]);\n clipResult.push(nV1);\n clipResult.push(nV2);\n clipResult.push(nV3);\n }\n break;\n case 3:\n break;\n }\n }\n return clipResult;\n };\n const sourceMeshAsMesh = sourceMesh instanceof Mesh ? sourceMesh : null;\n const matrixData = sourceMeshAsMesh === null || sourceMeshAsMesh === void 0 ? void 0 : sourceMeshAsMesh._thinInstanceDataStorage.matrixData;\n const numMatrices = (sourceMeshAsMesh === null || sourceMeshAsMesh === void 0 ? void 0 : sourceMeshAsMesh.thinInstanceCount) || 1;\n const thinInstanceMatrix = TmpVectors.Matrix[0];\n thinInstanceMatrix.copyFrom(Matrix.IdentityReadOnly);\n for (let m = 0; m < numMatrices; ++m) {\n if ((sourceMeshAsMesh === null || sourceMeshAsMesh === void 0 ? void 0 : sourceMeshAsMesh.hasThinInstances) && matrixData) {\n const ofst = m * 16;\n thinInstanceMatrix.setRowFromFloats(0, matrixData[ofst + 0], matrixData[ofst + 1], matrixData[ofst + 2], matrixData[ofst + 3]);\n thinInstanceMatrix.setRowFromFloats(1, matrixData[ofst + 4], matrixData[ofst + 5], matrixData[ofst + 6], matrixData[ofst + 7]);\n thinInstanceMatrix.setRowFromFloats(2, matrixData[ofst + 8], matrixData[ofst + 9], matrixData[ofst + 10], matrixData[ofst + 11]);\n thinInstanceMatrix.setRowFromFloats(3, matrixData[ofst + 12], matrixData[ofst + 13], matrixData[ofst + 14], matrixData[ofst + 15]);\n }\n // Matrix\n const decalWorldMatrix = Matrix.RotationYawPitchRoll(yaw, pitch, angle).multiply(Matrix.Translation(position.x, position.y, position.z));\n const inverseDecalWorldMatrix = Matrix.Invert(decalWorldMatrix);\n const meshWorldMatrix = sourceMesh.getWorldMatrix();\n const transformMatrix = thinInstanceMatrix.multiply(meshWorldMatrix).multiply(inverseDecalWorldMatrix);\n const oneFaceVertices = new Array(3);\n for (let index = 0; index < indices.length; index += 3) {\n let faceVertices = oneFaceVertices;\n faceVertices[0] = extractDecalVector3(index, transformMatrix);\n if (meshHasOverridenMaterial && useLocalComputation) {\n faceVertices[1] = extractDecalVector3(index + 2, transformMatrix);\n faceVertices[2] = extractDecalVector3(index + 1, transformMatrix);\n }\n else {\n faceVertices[1] = extractDecalVector3(index + 1, transformMatrix);\n faceVertices[2] = extractDecalVector3(index + 2, transformMatrix);\n }\n if (options.cullBackFaces) {\n // If all the normals of the vertices of the face are pointing away from the view direction we discard the face.\n // As computations are done in the decal coordinate space, the viewDirection is (0,0,1), so when dot(vertexNormal, -viewDirection) <= 0 the vertex is culled\n if (-faceVertices[0].normal.z <= 0 && -faceVertices[1].normal.z <= 0 && -faceVertices[2].normal.z <= 0) {\n continue;\n }\n }\n // Clip\n faceVertices = clip(faceVertices, xpAxis);\n if (!faceVertices)\n continue;\n faceVertices = clip(faceVertices, xnAxis);\n if (!faceVertices)\n continue;\n faceVertices = clip(faceVertices, ypAxis);\n if (!faceVertices)\n continue;\n faceVertices = clip(faceVertices, ynAxis);\n if (!faceVertices)\n continue;\n faceVertices = clip(faceVertices, zpAxis);\n if (!faceVertices)\n continue;\n faceVertices = clip(faceVertices, znAxis);\n if (!faceVertices)\n continue;\n // Add UVs and get back to world\n for (let vIndex = 0; vIndex < faceVertices.length; vIndex++) {\n const vertex = faceVertices[vIndex];\n //TODO check for Int32Array | Uint32Array | Uint16Array\n vertexData.indices.push(currentVertexDataIndex);\n if (useLocalComputation) {\n if (vertex.localPositionOverride) {\n vertexData.positions[currentVertexDataIndex * 3] = vertex.localPositionOverride[0];\n vertexData.positions[currentVertexDataIndex * 3 + 1] = vertex.localPositionOverride[1];\n vertexData.positions[currentVertexDataIndex * 3 + 2] = vertex.localPositionOverride[2];\n }\n else if (localPositions) {\n vertexData.positions[currentVertexDataIndex * 3] = localPositions[vertex.vertexIdx];\n vertexData.positions[currentVertexDataIndex * 3 + 1] = localPositions[vertex.vertexIdx + 1];\n vertexData.positions[currentVertexDataIndex * 3 + 2] = localPositions[vertex.vertexIdx + 2];\n }\n if (vertex.localNormalOverride) {\n vertexData.normals[currentVertexDataIndex * 3] = vertex.localNormalOverride[0];\n vertexData.normals[currentVertexDataIndex * 3 + 1] = vertex.localNormalOverride[1];\n vertexData.normals[currentVertexDataIndex * 3 + 2] = vertex.localNormalOverride[2];\n }\n else if (localNormals) {\n vertexData.normals[currentVertexDataIndex * 3] = localNormals[vertex.vertexIdx];\n vertexData.normals[currentVertexDataIndex * 3 + 1] = localNormals[vertex.vertexIdx + 1];\n vertexData.normals[currentVertexDataIndex * 3 + 2] = localNormals[vertex.vertexIdx + 2];\n }\n }\n else {\n vertex.position.toArray(vertexData.positions, currentVertexDataIndex * 3);\n vertex.normal.toArray(vertexData.normals, currentVertexDataIndex * 3);\n }\n if (vertexData.matricesIndices && vertexData.matricesWeights) {\n if (vertex.matrixIndicesOverride) {\n vertexData.matricesIndices[currentVertexDataIndex * 4] = vertex.matrixIndicesOverride[0];\n vertexData.matricesIndices[currentVertexDataIndex * 4 + 1] = vertex.matrixIndicesOverride[1];\n vertexData.matricesIndices[currentVertexDataIndex * 4 + 2] = vertex.matrixIndicesOverride[2];\n vertexData.matricesIndices[currentVertexDataIndex * 4 + 3] = vertex.matrixIndicesOverride[3];\n }\n else {\n if (matIndices) {\n vertexData.matricesIndices[currentVertexDataIndex * 4] = matIndices[vertex.vertexIdxForBones];\n vertexData.matricesIndices[currentVertexDataIndex * 4 + 1] = matIndices[vertex.vertexIdxForBones + 1];\n vertexData.matricesIndices[currentVertexDataIndex * 4 + 2] = matIndices[vertex.vertexIdxForBones + 2];\n vertexData.matricesIndices[currentVertexDataIndex * 4 + 3] = matIndices[vertex.vertexIdxForBones + 3];\n }\n if (matIndicesExtra && vertexData.matricesIndicesExtra) {\n vertexData.matricesIndicesExtra[currentVertexDataIndex * 4] = matIndicesExtra[vertex.vertexIdxForBones];\n vertexData.matricesIndicesExtra[currentVertexDataIndex * 4 + 1] = matIndicesExtra[vertex.vertexIdxForBones + 1];\n vertexData.matricesIndicesExtra[currentVertexDataIndex * 4 + 2] = matIndicesExtra[vertex.vertexIdxForBones + 2];\n vertexData.matricesIndicesExtra[currentVertexDataIndex * 4 + 3] = matIndicesExtra[vertex.vertexIdxForBones + 3];\n }\n }\n if (vertex.matrixWeightsOverride) {\n vertexData.matricesWeights[currentVertexDataIndex * 4] = vertex.matrixWeightsOverride[0];\n vertexData.matricesWeights[currentVertexDataIndex * 4 + 1] = vertex.matrixWeightsOverride[1];\n vertexData.matricesWeights[currentVertexDataIndex * 4 + 2] = vertex.matrixWeightsOverride[2];\n vertexData.matricesWeights[currentVertexDataIndex * 4 + 3] = vertex.matrixWeightsOverride[3];\n }\n else {\n if (matWeights) {\n vertexData.matricesWeights[currentVertexDataIndex * 4] = matWeights[vertex.vertexIdxForBones];\n vertexData.matricesWeights[currentVertexDataIndex * 4 + 1] = matWeights[vertex.vertexIdxForBones + 1];\n vertexData.matricesWeights[currentVertexDataIndex * 4 + 2] = matWeights[vertex.vertexIdxForBones + 2];\n vertexData.matricesWeights[currentVertexDataIndex * 4 + 3] = matWeights[vertex.vertexIdxForBones + 3];\n }\n if (matWeightsExtra && vertexData.matricesWeightsExtra) {\n vertexData.matricesWeightsExtra[currentVertexDataIndex * 4] = matWeightsExtra[vertex.vertexIdxForBones];\n vertexData.matricesWeightsExtra[currentVertexDataIndex * 4 + 1] = matWeightsExtra[vertex.vertexIdxForBones + 1];\n vertexData.matricesWeightsExtra[currentVertexDataIndex * 4 + 2] = matWeightsExtra[vertex.vertexIdxForBones + 2];\n vertexData.matricesWeightsExtra[currentVertexDataIndex * 4 + 3] = matWeightsExtra[vertex.vertexIdxForBones + 3];\n }\n }\n }\n if (!options.captureUVS) {\n vertexData.uvs.push(0.5 + vertex.position.x / size.x);\n const v = 0.5 + vertex.position.y / size.y;\n vertexData.uvs.push(CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - v : v);\n }\n else {\n vertex.uv.toArray(vertexData.uvs, currentVertexDataIndex * 2);\n }\n currentVertexDataIndex++;\n }\n }\n }\n // Avoid the \"Setting vertex data kind 'XXX' with an empty array\" warning when calling vertexData.applyToMesh\n if (vertexData.indices.length === 0)\n vertexData.indices = null;\n if (vertexData.positions.length === 0)\n vertexData.positions = null;\n if (vertexData.normals.length === 0)\n vertexData.normals = null;\n if (vertexData.uvs.length === 0)\n vertexData.uvs = null;\n if (((_a = vertexData.matricesIndices) === null || _a === void 0 ? void 0 : _a.length) === 0)\n vertexData.matricesIndices = null;\n if (((_b = vertexData.matricesWeights) === null || _b === void 0 ? void 0 : _b.length) === 0)\n vertexData.matricesWeights = null;\n if (((_c = vertexData.matricesIndicesExtra) === null || _c === void 0 ? void 0 : _c.length) === 0)\n vertexData.matricesIndicesExtra = null;\n if (((_d = vertexData.matricesWeightsExtra) === null || _d === void 0 ? void 0 : _d.length) === 0)\n vertexData.matricesWeightsExtra = null;\n // Return mesh\n const decal = new Mesh(name, sourceMesh.getScene());\n vertexData.applyToMesh(decal);\n if (useLocalComputation) {\n decal.skeleton = sourceMesh.skeleton;\n decal.parent = sourceMesh;\n }\n else {\n decal.position = position.clone();\n decal.rotation = new Vector3(pitch, yaw, angle);\n }\n decal.computeWorldMatrix(true);\n decal.refreshBoundingInfo(true, true);\n return decal;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated use the function directly from the module\n */\nexport const DecalBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateDecal,\n};\nMesh.CreateDecal = (name, sourceMesh, position, normal, size, angle) => {\n const options = {\n position,\n normal,\n size,\n angle,\n };\n return CreateDecal(name, sourceMesh, options);\n};\n//# sourceMappingURL=decalBuilder.js.map","import { VertexData } from \"../mesh.vertexData.js\";\nimport { Vector2, Vector3, Matrix } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Scripts based off of https://github.com/maximeq/three-js-capsule-geometry/blob/master/src/CapsuleBufferGeometry.js\n * @param options the constructors options used to shape the mesh.\n * @returns the capsule VertexData\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/capsule\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function CreateCapsuleVertexData(options = {\n subdivisions: 2,\n tessellation: 16,\n height: 1,\n radius: 0.25,\n capSubdivisions: 6,\n}) {\n const subdivisions = Math.max(options.subdivisions ? options.subdivisions : 2, 1) | 0;\n const tessellation = Math.max(options.tessellation ? options.tessellation : 16, 3) | 0;\n const height = Math.max(options.height ? options.height : 1, 0);\n const radius = Math.max(options.radius ? options.radius : 0.25, 0);\n const capDetail = Math.max(options.capSubdivisions ? options.capSubdivisions : 6, 1) | 0;\n const radialSegments = tessellation;\n const heightSegments = subdivisions;\n const radiusTop = Math.max(options.radiusTop ? options.radiusTop : radius, 0);\n const radiusBottom = Math.max(options.radiusBottom ? options.radiusBottom : radius, 0);\n const heightMinusCaps = height - (radiusTop + radiusBottom);\n const thetaStart = 0.0;\n const thetaLength = 2.0 * Math.PI;\n const capsTopSegments = Math.max(options.topCapSubdivisions ? options.topCapSubdivisions : capDetail, 1);\n const capsBottomSegments = Math.max(options.bottomCapSubdivisions ? options.bottomCapSubdivisions : capDetail, 1);\n const alpha = Math.acos((radiusBottom - radiusTop) / height);\n let indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n let index = 0;\n const indexArray = [], halfHeight = heightMinusCaps * 0.5;\n const pi2 = Math.PI * 0.5;\n let x, y;\n const normal = Vector3.Zero();\n const vertex = Vector3.Zero();\n const cosAlpha = Math.cos(alpha);\n const sinAlpha = Math.sin(alpha);\n const coneLength = new Vector2(radiusTop * sinAlpha, halfHeight + radiusTop * cosAlpha)\n .subtract(new Vector2(radiusBottom * sinAlpha, -halfHeight + radiusBottom * cosAlpha))\n .length();\n // Total length for v texture coord\n const vl = radiusTop * alpha + coneLength + radiusBottom * (pi2 - alpha);\n let v = 0;\n for (y = 0; y <= capsTopSegments; y++) {\n const indexRow = [];\n const a = pi2 - alpha * (y / capsTopSegments);\n v += (radiusTop * alpha) / capsTopSegments;\n const cosA = Math.cos(a);\n const sinA = Math.sin(a);\n // calculate the radius of the current row\n const _radius = cosA * radiusTop;\n for (x = 0; x <= radialSegments; x++) {\n const u = x / radialSegments;\n const theta = u * thetaLength + thetaStart;\n const sinTheta = Math.sin(theta);\n const cosTheta = Math.cos(theta);\n // vertex\n vertex.x = _radius * sinTheta;\n vertex.y = halfHeight + sinA * radiusTop;\n vertex.z = _radius * cosTheta;\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normal.set(cosA * sinTheta, sinA, cosA * cosTheta);\n normals.push(normal.x, normal.y, normal.z);\n // uv\n uvs.push(u, CompatibilityOptions.UseOpenGLOrientationForUV ? v / vl : 1 - v / vl);\n // save index of vertex in respective row\n indexRow.push(index);\n // increase index\n index++;\n }\n // now save vertices of the row in our index array\n indexArray.push(indexRow);\n }\n const coneHeight = height - radiusTop - radiusBottom + cosAlpha * radiusTop - cosAlpha * radiusBottom;\n const slope = (sinAlpha * (radiusBottom - radiusTop)) / coneHeight;\n for (y = 1; y <= heightSegments; y++) {\n const indexRow = [];\n v += coneLength / heightSegments;\n // calculate the radius of the current row\n const _radius = sinAlpha * ((y * (radiusBottom - radiusTop)) / heightSegments + radiusTop);\n for (x = 0; x <= radialSegments; x++) {\n const u = x / radialSegments;\n const theta = u * thetaLength + thetaStart;\n const sinTheta = Math.sin(theta);\n const cosTheta = Math.cos(theta);\n // vertex\n vertex.x = _radius * sinTheta;\n vertex.y = halfHeight + cosAlpha * radiusTop - (y * coneHeight) / heightSegments;\n vertex.z = _radius * cosTheta;\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normal.set(sinTheta, slope, cosTheta).normalize();\n normals.push(normal.x, normal.y, normal.z);\n // uv\n uvs.push(u, CompatibilityOptions.UseOpenGLOrientationForUV ? v / vl : 1 - v / vl);\n // save index of vertex in respective row\n indexRow.push(index);\n // increase index\n index++;\n }\n // now save vertices of the row in our index array\n indexArray.push(indexRow);\n }\n for (y = 1; y <= capsBottomSegments; y++) {\n const indexRow = [];\n const a = pi2 - alpha - (Math.PI - alpha) * (y / capsBottomSegments);\n v += (radiusBottom * alpha) / capsBottomSegments;\n const cosA = Math.cos(a);\n const sinA = Math.sin(a);\n // calculate the radius of the current row\n const _radius = cosA * radiusBottom;\n for (x = 0; x <= radialSegments; x++) {\n const u = x / radialSegments;\n const theta = u * thetaLength + thetaStart;\n const sinTheta = Math.sin(theta);\n const cosTheta = Math.cos(theta);\n // vertex\n vertex.x = _radius * sinTheta;\n vertex.y = -halfHeight + sinA * radiusBottom;\n vertex.z = _radius * cosTheta;\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normal.set(cosA * sinTheta, sinA, cosA * cosTheta);\n normals.push(normal.x, normal.y, normal.z);\n // uv\n uvs.push(u, CompatibilityOptions.UseOpenGLOrientationForUV ? v / vl : 1 - v / vl);\n // save index of vertex in respective row\n indexRow.push(index);\n // increase index\n index++;\n }\n // now save vertices of the row in our index array\n indexArray.push(indexRow);\n }\n // generate indices\n for (x = 0; x < radialSegments; x++) {\n for (y = 0; y < capsTopSegments + heightSegments + capsBottomSegments; y++) {\n // we use the index array to access the correct indices\n const i1 = indexArray[y][x];\n const i2 = indexArray[y + 1][x];\n const i3 = indexArray[y + 1][x + 1];\n const i4 = indexArray[y][x + 1];\n // face one\n indices.push(i1);\n indices.push(i2);\n indices.push(i4);\n // face two\n indices.push(i2);\n indices.push(i3);\n indices.push(i4);\n }\n }\n indices = indices.reverse();\n if (options.orientation && !options.orientation.equals(Vector3.Up())) {\n const m = new Matrix();\n options.orientation\n .clone()\n .scale(Math.PI * 0.5)\n .cross(Vector3.Up())\n .toQuaternion()\n .toRotationMatrix(m);\n const v = Vector3.Zero();\n for (let i = 0; i < vertices.length; i += 3) {\n v.set(vertices[i], vertices[i + 1], vertices[i + 2]);\n Vector3.TransformCoordinatesToRef(v.clone(), m, v);\n vertices[i] = v.x;\n vertices[i + 1] = v.y;\n vertices[i + 2] = v.z;\n }\n }\n const vDat = new VertexData();\n vDat.positions = vertices;\n vDat.normals = normals;\n vDat.uvs = uvs;\n vDat.indices = indices;\n return vDat;\n}\n/**\n * Creates a capsule or a pill mesh\n * @param name defines the name of the mesh\n * @param options The constructors options.\n * @param scene The scene the mesh is scoped to.\n * @returns Capsule Mesh\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function CreateCapsule(name, options = {\n orientation: Vector3.Up(),\n subdivisions: 2,\n tessellation: 16,\n height: 1,\n radius: 0.25,\n capSubdivisions: 6,\n updatable: false,\n}, scene = null) {\n const capsule = new Mesh(name, scene);\n const vertexData = CreateCapsuleVertexData(options);\n vertexData.applyToMesh(capsule, options.updatable);\n return capsule;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated please use CreateCapsule directly\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const CapsuleBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n CreateCapsule,\n};\n/**\n * Creates a capsule or a pill mesh\n * @param name defines the name of the mesh.\n * @param options the constructors options used to shape the mesh.\n * @param scene defines the scene the mesh is scoped to.\n * @returns the capsule mesh\n * @see https://doc.babylonjs.com/how_to/capsule_shape\n */\nMesh.CreateCapsule = (name, options, scene) => {\n return CreateCapsule(name, options, scene);\n};\nVertexData.CreateCapsule = CreateCapsuleVertexData;\n//# sourceMappingURL=capsuleBuilder.js.map","import { Logger } from \"../Misc/logger.js\";\nimport { Vector3 } from \"./math.vector.js\";\n/**\n * Class representing an isovector a vector containing 2 INTEGER coordinates\n * x axis is horizontal\n * y axis is 60 deg counter clockwise from positive y axis\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _IsoVector {\n /**\n * Creates a new isovector from the given x and y coordinates\n * @param x defines the first coordinate, must be an integer\n * @param y defines the second coordinate, must be an integer\n */\n constructor(\n /** defines the first coordinate */\n x = 0, \n /** defines the second coordinate */\n y = 0) {\n this.x = x;\n this.y = y;\n if (x !== Math.floor(x)) {\n x === Math.floor(x);\n Logger.Warn(\"x is not an integer, floor(x) used\");\n }\n if (y !== Math.floor(y)) {\n y === Math.floor(y);\n Logger.Warn(\"y is not an integer, floor(y) used\");\n }\n }\n // Operators\n /**\n * Gets a new IsoVector copied from the IsoVector\n * @returns a new IsoVector\n */\n clone() {\n return new _IsoVector(this.x, this.y);\n }\n /**\n * Rotates one IsoVector 60 degrees counter clockwise about another\n * Please note that this is an in place operation\n * @param other an IsoVector a center of rotation\n * @returns the rotated IsoVector\n */\n rotate60About(other) {\n //other IsoVector\n const x = this.x;\n this.x = other.x + other.y - this.y;\n this.y = x + this.y - other.x;\n return this;\n }\n /**\n * Rotates one IsoVector 60 degrees clockwise about another\n * Please note that this is an in place operation\n * @param other an IsoVector as center of rotation\n * @returns the rotated IsoVector\n */\n rotateNeg60About(other) {\n const x = this.x;\n this.x = x + this.y - other.y;\n this.y = other.x + other.y - x;\n return this;\n }\n /**\n * For an equilateral triangle OAB with O at isovector (0, 0) and A at isovector (m, n)\n * Rotates one IsoVector 120 degrees counter clockwise about the center of the triangle\n * Please note that this is an in place operation\n * @param m integer a measure a Primary triangle of order (m, n) m > n\n * @param n >= 0 integer a measure for a Primary triangle of order (m, n)\n * @returns the rotated IsoVector\n */\n rotate120(m, n) {\n //m, n integers\n if (m !== Math.floor(m)) {\n m === Math.floor(m);\n Logger.Warn(\"m not an integer only floor(m) used\");\n }\n if (n !== Math.floor(n)) {\n n === Math.floor(n);\n Logger.Warn(\"n not an integer only floor(n) used\");\n }\n const x = this.x;\n this.x = m - x - this.y;\n this.y = n + x;\n return this;\n }\n /**\n * For an equilateral triangle OAB with O at isovector (0, 0) and A at isovector (m, n)\n * Rotates one IsoVector 120 degrees clockwise about the center of the triangle\n * Please note that this is an in place operation\n * @param m integer a measure a Primary triangle of order (m, n) m > n\n * @param n >= 0 integer a measure for a Primary triangle of order (m, n)\n * @returns the rotated IsoVector\n */\n rotateNeg120(m, n) {\n //m, n integers\n if (m !== Math.floor(m)) {\n m === Math.floor(m);\n Logger.Warn(\"m is not an integer, floor(m) used\");\n }\n if (n !== Math.floor(n)) {\n n === Math.floor(n);\n Logger.Warn(\"n is not an integer, floor(n) used\");\n }\n const x = this.x;\n this.x = this.y - n;\n this.y = m + n - x - this.y;\n return this;\n }\n /**\n * Transforms an IsoVector to one in Cartesian 3D space based on an isovector\n * @param origin an IsoVector\n * @param isoGridSize\n * @returns Point as a Vector3\n */\n toCartesianOrigin(origin, isoGridSize) {\n const point = Vector3.Zero();\n point.x = origin.x + 2 * this.x * isoGridSize + this.y * isoGridSize;\n point.y = origin.y + Math.sqrt(3) * this.y * isoGridSize;\n return point;\n }\n // Statics\n /**\n * Gets a new IsoVector(0, 0)\n * @returns a new IsoVector\n */\n static Zero() {\n return new _IsoVector(0, 0);\n }\n}\n//# sourceMappingURL=math.isovector.js.map","import { Vector3, TmpVectors } from \"../Maths/math.vector.js\";\nimport { Scalar } from \"../Maths/math.scalar.js\";\nimport { PHI } from \"../Maths/math.constants.js\";\nimport { _IsoVector } from \"../Maths/math.isovector.js\";\n/**\n * Class representing data for one face OAB of an equilateral icosahedron\n * When O is the isovector (0, 0), A is isovector (m, n)\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _PrimaryIsoTriangle {\n constructor() {\n this.cartesian = [];\n this.vertices = [];\n this.max = [];\n this.min = [];\n this.closestTo = [];\n this.innerFacets = [];\n this.isoVecsABOB = [];\n this.isoVecsOBOA = [];\n this.isoVecsBAOA = [];\n this.vertexTypes = [];\n // eslint-disable-next-line @typescript-eslint/naming-convention\n this.IDATA = new PolyhedronData(\"icosahedron\", \"Regular\", [\n [0, PHI, -1],\n [-PHI, 1, 0],\n [-1, 0, -PHI],\n [1, 0, -PHI],\n [PHI, 1, 0],\n [0, PHI, 1],\n [-1, 0, PHI],\n [-PHI, -1, 0],\n [0, -PHI, -1],\n [PHI, -1, 0],\n [1, 0, PHI],\n [0, -PHI, 1],\n ], [\n [0, 2, 1],\n [0, 3, 2],\n [0, 4, 3],\n [0, 5, 4],\n [0, 1, 5],\n [7, 6, 1],\n [8, 7, 2],\n [9, 8, 3],\n [10, 9, 4],\n [6, 10, 5],\n [2, 7, 1],\n [3, 8, 2],\n [4, 9, 3],\n [5, 10, 4],\n [1, 6, 5],\n [11, 6, 7],\n [11, 7, 8],\n [11, 8, 9],\n [11, 9, 10],\n [11, 10, 6],\n ]);\n }\n /**\n * Creates the PrimaryIsoTriangle Triangle OAB\n * @param m an integer\n * @param n an integer\n */\n //operators\n setIndices() {\n let indexCount = 12; // 12 vertices already assigned\n const vecToidx = {}; //maps iso-vectors to indexCount;\n const m = this.m;\n const n = this.n;\n let g = m; // hcf of m, n when n != 0\n let m1 = 1;\n let n1 = 0;\n if (n !== 0) {\n g = Scalar.HCF(m, n);\n }\n m1 = m / g;\n n1 = n / g;\n let fr; //face to the right of current face\n let rot; //rotation about which vertex for fr\n let O;\n let A;\n let B;\n const oVec = _IsoVector.Zero();\n const aVec = new _IsoVector(m, n);\n const bVec = new _IsoVector(-n, m + n);\n const oaVec = _IsoVector.Zero();\n const abVec = _IsoVector.Zero();\n const obVec = _IsoVector.Zero();\n let verts = [];\n let idx;\n let idxR;\n let isoId;\n let isoIdR;\n const closestTo = [];\n const vDist = this.vertByDist;\n const matchIdx = (f, fr, isoId, isoIdR) => {\n idx = f + \"|\" + isoId;\n idxR = fr + \"|\" + isoIdR;\n if (!(idx in vecToidx || idxR in vecToidx)) {\n vecToidx[idx] = indexCount;\n vecToidx[idxR] = indexCount;\n indexCount++;\n }\n else if (idx in vecToidx && !(idxR in vecToidx)) {\n vecToidx[idxR] = vecToidx[idx];\n }\n else if (idxR in vecToidx && !(idx in vecToidx)) {\n vecToidx[idx] = vecToidx[idxR];\n }\n if (vDist[isoId][0] > 2) {\n closestTo[vecToidx[idx]] = [-vDist[isoId][0], vDist[isoId][1], vecToidx[idx]];\n }\n else {\n closestTo[vecToidx[idx]] = [verts[vDist[isoId][0]], vDist[isoId][1], vecToidx[idx]];\n }\n };\n this.IDATA.edgematch = [\n [1, \"B\"],\n [2, \"B\"],\n [3, \"B\"],\n [4, \"B\"],\n [0, \"B\"],\n [10, \"O\", 14, \"A\"],\n [11, \"O\", 10, \"A\"],\n [12, \"O\", 11, \"A\"],\n [13, \"O\", 12, \"A\"],\n [14, \"O\", 13, \"A\"],\n [0, \"O\"],\n [1, \"O\"],\n [2, \"O\"],\n [3, \"O\"],\n [4, \"O\"],\n [19, \"B\", 5, \"A\"],\n [15, \"B\", 6, \"A\"],\n [16, \"B\", 7, \"A\"],\n [17, \"B\", 8, \"A\"],\n [18, \"B\", 9, \"A\"],\n ];\n /***edges AB to OB***** rotation about B*/\n for (let f = 0; f < 20; f++) {\n //f current face\n verts = this.IDATA.face[f];\n O = verts[2];\n A = verts[1];\n B = verts[0];\n isoId = oVec.x + \"|\" + oVec.y;\n idx = f + \"|\" + isoId;\n if (!(idx in vecToidx)) {\n vecToidx[idx] = O;\n closestTo[O] = [verts[vDist[isoId][0]], vDist[isoId][1]];\n }\n isoId = aVec.x + \"|\" + aVec.y;\n idx = f + \"|\" + isoId;\n if (!(idx in vecToidx)) {\n vecToidx[idx] = A;\n closestTo[A] = [verts[vDist[isoId][0]], vDist[isoId][1]];\n }\n isoId = bVec.x + \"|\" + bVec.y;\n idx = f + \"|\" + isoId;\n if (!(idx in vecToidx)) {\n vecToidx[idx] = B;\n closestTo[B] = [verts[vDist[isoId][0]], vDist[isoId][1]];\n }\n //for edge vertices\n fr = this.IDATA.edgematch[f][0];\n rot = this.IDATA.edgematch[f][1];\n if (rot === \"B\") {\n for (let i = 1; i < g; i++) {\n abVec.x = m - i * (m1 + n1);\n abVec.y = n + i * m1;\n obVec.x = -i * n1;\n obVec.y = i * (m1 + n1);\n isoId = abVec.x + \"|\" + abVec.y;\n isoIdR = obVec.x + \"|\" + obVec.y;\n matchIdx(f, fr, isoId, isoIdR);\n }\n }\n if (rot === \"O\") {\n for (let i = 1; i < g; i++) {\n obVec.x = -i * n1;\n obVec.y = i * (m1 + n1);\n oaVec.x = i * m1;\n oaVec.y = i * n1;\n isoId = obVec.x + \"|\" + obVec.y;\n isoIdR = oaVec.x + \"|\" + oaVec.y;\n matchIdx(f, fr, isoId, isoIdR);\n }\n }\n fr = this.IDATA.edgematch[f][2];\n rot = this.IDATA.edgematch[f][3];\n if (rot && rot === \"A\") {\n for (let i = 1; i < g; i++) {\n oaVec.x = i * m1;\n oaVec.y = i * n1;\n abVec.x = m - (g - i) * (m1 + n1); //reversed for BA\n abVec.y = n + (g - i) * m1; //reversed for BA\n isoId = oaVec.x + \"|\" + oaVec.y;\n isoIdR = abVec.x + \"|\" + abVec.y;\n matchIdx(f, fr, isoId, isoIdR);\n }\n }\n for (let i = 0; i < this.vertices.length; i++) {\n isoId = this.vertices[i].x + \"|\" + this.vertices[i].y;\n idx = f + \"|\" + isoId;\n if (!(idx in vecToidx)) {\n vecToidx[idx] = indexCount++;\n if (vDist[isoId][0] > 2) {\n closestTo[vecToidx[idx]] = [-vDist[isoId][0], vDist[isoId][1], vecToidx[idx]];\n }\n else {\n closestTo[vecToidx[idx]] = [verts[vDist[isoId][0]], vDist[isoId][1], vecToidx[idx]];\n }\n }\n }\n }\n this.closestTo = closestTo;\n this.vecToidx = vecToidx;\n }\n calcCoeffs() {\n const m = this.m;\n const n = this.n;\n const thirdR3 = Math.sqrt(3) / 3;\n const LSQD = m * m + n * n + m * n;\n this.coau = (m + n) / LSQD;\n this.cobu = -n / LSQD;\n this.coav = (-thirdR3 * (m - n)) / LSQD;\n this.cobv = (thirdR3 * (2 * m + n)) / LSQD;\n }\n createInnerFacets() {\n const m = this.m;\n const n = this.n;\n for (let y = 0; y < n + m + 1; y++) {\n for (let x = this.min[y]; x < this.max[y] + 1; x++) {\n if (x < this.max[y] && x < this.max[y + 1] + 1) {\n this.innerFacets.push([\"|\" + x + \"|\" + y, \"|\" + x + \"|\" + (y + 1), \"|\" + (x + 1) + \"|\" + y]);\n }\n if (y > 0 && x < this.max[y - 1] && x + 1 < this.max[y] + 1) {\n this.innerFacets.push([\"|\" + x + \"|\" + y, \"|\" + (x + 1) + \"|\" + y, \"|\" + (x + 1) + \"|\" + (y - 1)]);\n }\n }\n }\n }\n edgeVecsABOB() {\n const m = this.m;\n const n = this.n;\n const B = new _IsoVector(-n, m + n);\n for (let y = 1; y < m + n; y++) {\n const point = new _IsoVector(this.min[y], y);\n const prev = new _IsoVector(this.min[y - 1], y - 1);\n const next = new _IsoVector(this.min[y + 1], y + 1);\n const pointR = point.clone();\n const prevR = prev.clone();\n const nextR = next.clone();\n pointR.rotate60About(B);\n prevR.rotate60About(B);\n nextR.rotate60About(B);\n const maxPoint = new _IsoVector(this.max[pointR.y], pointR.y);\n const maxPrev = new _IsoVector(this.max[pointR.y - 1], pointR.y - 1);\n const maxLeftPrev = new _IsoVector(this.max[pointR.y - 1] - 1, pointR.y - 1);\n if (pointR.x !== maxPoint.x || pointR.y !== maxPoint.y) {\n if (pointR.x !== maxPrev.x) {\n // type2\n //up\n this.vertexTypes.push([1, 0, 0]);\n this.isoVecsABOB.push([point, maxPrev, maxLeftPrev]);\n //down\n this.vertexTypes.push([1, 0, 0]);\n this.isoVecsABOB.push([point, maxLeftPrev, maxPoint]);\n }\n else if (pointR.y === nextR.y) {\n // type1\n //up\n this.vertexTypes.push([1, 1, 0]);\n this.isoVecsABOB.push([point, prev, maxPrev]);\n //down\n this.vertexTypes.push([1, 0, 1]);\n this.isoVecsABOB.push([point, maxPrev, next]);\n }\n else {\n // type 0\n //up\n this.vertexTypes.push([1, 1, 0]);\n this.isoVecsABOB.push([point, prev, maxPrev]);\n //down\n this.vertexTypes.push([1, 0, 0]);\n this.isoVecsABOB.push([point, maxPrev, maxPoint]);\n }\n }\n }\n }\n mapABOBtoOBOA() {\n const point = new _IsoVector(0, 0);\n for (let i = 0; i < this.isoVecsABOB.length; i++) {\n const temp = [];\n for (let j = 0; j < 3; j++) {\n point.x = this.isoVecsABOB[i][j].x;\n point.y = this.isoVecsABOB[i][j].y;\n if (this.vertexTypes[i][j] === 0) {\n point.rotateNeg120(this.m, this.n);\n }\n temp.push(point.clone());\n }\n this.isoVecsOBOA.push(temp);\n }\n }\n mapABOBtoBAOA() {\n const point = new _IsoVector(0, 0);\n for (let i = 0; i < this.isoVecsABOB.length; i++) {\n const temp = [];\n for (let j = 0; j < 3; j++) {\n point.x = this.isoVecsABOB[i][j].x;\n point.y = this.isoVecsABOB[i][j].y;\n if (this.vertexTypes[i][j] === 1) {\n point.rotate120(this.m, this.n);\n }\n temp.push(point.clone());\n }\n this.isoVecsBAOA.push(temp);\n }\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n MapToFace(faceNb, geodesicData) {\n const F = this.IDATA.face[faceNb];\n const oidx = F[2];\n const aidx = F[1];\n const bidx = F[0];\n const O = Vector3.FromArray(this.IDATA.vertex[oidx]);\n const A = Vector3.FromArray(this.IDATA.vertex[aidx]);\n const B = Vector3.FromArray(this.IDATA.vertex[bidx]);\n const OA = A.subtract(O);\n const OB = B.subtract(O);\n const x = OA.scale(this.coau).add(OB.scale(this.cobu));\n const y = OA.scale(this.coav).add(OB.scale(this.cobv));\n const mapped = [];\n let idx;\n let tempVec = TmpVectors.Vector3[0];\n for (let i = 0; i < this.cartesian.length; i++) {\n tempVec = x.scale(this.cartesian[i].x).add(y.scale(this.cartesian[i].y)).add(O);\n mapped[i] = [tempVec.x, tempVec.y, tempVec.z];\n idx = faceNb + \"|\" + this.vertices[i].x + \"|\" + this.vertices[i].y;\n geodesicData.vertex[this.vecToidx[idx]] = [tempVec.x, tempVec.y, tempVec.z];\n }\n }\n //statics\n /**Creates a primary triangle\n * @internal\n */\n build(m, n) {\n const vertices = [];\n const O = _IsoVector.Zero();\n const A = new _IsoVector(m, n);\n const B = new _IsoVector(-n, m + n);\n vertices.push(O, A, B);\n //max internal isoceles triangle vertices\n for (let y = n; y < m + 1; y++) {\n for (let x = 0; x < m + 1 - y; x++) {\n vertices.push(new _IsoVector(x, y));\n }\n }\n //shared vertices along edges when needed\n if (n > 0) {\n const g = Scalar.HCF(m, n);\n const m1 = m / g;\n const n1 = n / g;\n for (let i = 1; i < g; i++) {\n vertices.push(new _IsoVector(i * m1, i * n1)); //OA\n vertices.push(new _IsoVector(-i * n1, i * (m1 + n1))); //OB\n vertices.push(new _IsoVector(m - i * (m1 + n1), n + i * m1)); // AB\n }\n //lower rows vertices and their rotations\n const ratio = m / n;\n for (let y = 1; y < n; y++) {\n for (let x = 0; x < y * ratio; x++) {\n vertices.push(new _IsoVector(x, y));\n vertices.push(new _IsoVector(x, y).rotate120(m, n));\n vertices.push(new _IsoVector(x, y).rotateNeg120(m, n));\n }\n }\n }\n //order vertices by x and then y\n vertices.sort((a, b) => {\n return a.x - b.x;\n });\n vertices.sort((a, b) => {\n return a.y - b.y;\n });\n const min = new Array(m + n + 1);\n const max = new Array(m + n + 1);\n for (let i = 0; i < min.length; i++) {\n min[i] = Infinity;\n max[i] = -Infinity;\n }\n let y = 0;\n let x = 0;\n const len = vertices.length;\n for (let i = 0; i < len; i++) {\n x = vertices[i].x;\n y = vertices[i].y;\n min[y] = Math.min(x, min[y]);\n max[y] = Math.max(x, max[y]);\n }\n //calculates the distance of a vertex from a given primary vertex\n const distFrom = (vert, primVert) => {\n const v = vert.clone();\n if (primVert === \"A\") {\n v.rotateNeg120(m, n);\n }\n if (primVert === \"B\") {\n v.rotate120(m, n);\n }\n if (v.x < 0) {\n return v.y;\n }\n return v.x + v.y;\n };\n const cartesian = [];\n const distFromO = [];\n const distFromA = [];\n const distFromB = [];\n const vertByDist = {};\n const vertData = [];\n let closest = -1;\n let dist = -1;\n for (let i = 0; i < len; i++) {\n cartesian[i] = vertices[i].toCartesianOrigin(new _IsoVector(0, 0), 0.5);\n distFromO[i] = distFrom(vertices[i], \"O\");\n distFromA[i] = distFrom(vertices[i], \"A\");\n distFromB[i] = distFrom(vertices[i], \"B\");\n if (distFromO[i] === distFromA[i] && distFromA[i] === distFromB[i]) {\n closest = 3;\n dist = distFromO[i];\n }\n else if (distFromO[i] === distFromA[i]) {\n closest = 4;\n dist = distFromO[i];\n }\n else if (distFromA[i] === distFromB[i]) {\n closest = 5;\n dist = distFromA[i];\n }\n else if (distFromB[i] === distFromO[i]) {\n closest = 6;\n dist = distFromO[i];\n }\n if (distFromO[i] < distFromA[i] && distFromO[i] < distFromB[i]) {\n closest = 2;\n dist = distFromO[i];\n }\n if (distFromA[i] < distFromO[i] && distFromA[i] < distFromB[i]) {\n closest = 1;\n dist = distFromA[i];\n }\n if (distFromB[i] < distFromA[i] && distFromB[i] < distFromO[i]) {\n closest = 0;\n dist = distFromB[i];\n }\n vertData.push([closest, dist, vertices[i].x, vertices[i].y]);\n }\n vertData.sort((a, b) => {\n return a[2] - b[2];\n });\n vertData.sort((a, b) => {\n return a[3] - b[3];\n });\n vertData.sort((a, b) => {\n return a[1] - b[1];\n });\n vertData.sort((a, b) => {\n return a[0] - b[0];\n });\n for (let v = 0; v < vertData.length; v++) {\n vertByDist[vertData[v][2] + \"|\" + vertData[v][3]] = [vertData[v][0], vertData[v][1], v];\n }\n this.m = m;\n this.n = n;\n this.vertices = vertices;\n this.vertByDist = vertByDist;\n this.cartesian = cartesian;\n this.min = min;\n this.max = max;\n return this;\n }\n}\n/** Builds Polyhedron Data\n * @internal\n */\nexport class PolyhedronData {\n constructor(name, category, vertex, face) {\n this.name = name;\n this.category = category;\n this.vertex = vertex;\n this.face = face;\n }\n}\n/**\n * This class Extends the PolyhedronData Class to provide measures for a Geodesic Polyhedron\n */\nexport class GeodesicData extends PolyhedronData {\n /**\n * @internal\n */\n innerToData(face, primTri) {\n for (let i = 0; i < primTri.innerFacets.length; i++) {\n this.face.push(primTri.innerFacets[i].map((el) => primTri.vecToidx[face + el]));\n }\n }\n /**\n * @internal\n */\n mapABOBtoDATA(faceNb, primTri) {\n const fr = primTri.IDATA.edgematch[faceNb][0];\n for (let i = 0; i < primTri.isoVecsABOB.length; i++) {\n const temp = [];\n for (let j = 0; j < 3; j++) {\n if (primTri.vertexTypes[i][j] === 0) {\n temp.push(faceNb + \"|\" + primTri.isoVecsABOB[i][j].x + \"|\" + primTri.isoVecsABOB[i][j].y);\n }\n else {\n temp.push(fr + \"|\" + primTri.isoVecsABOB[i][j].x + \"|\" + primTri.isoVecsABOB[i][j].y);\n }\n }\n this.face.push([primTri.vecToidx[temp[0]], primTri.vecToidx[temp[1]], primTri.vecToidx[temp[2]]]);\n }\n }\n /**\n * @internal\n */\n mapOBOAtoDATA(faceNb, primTri) {\n const fr = primTri.IDATA.edgematch[faceNb][0];\n for (let i = 0; i < primTri.isoVecsOBOA.length; i++) {\n const temp = [];\n for (let j = 0; j < 3; j++) {\n if (primTri.vertexTypes[i][j] === 1) {\n temp.push(faceNb + \"|\" + primTri.isoVecsOBOA[i][j].x + \"|\" + primTri.isoVecsOBOA[i][j].y);\n }\n else {\n temp.push(fr + \"|\" + primTri.isoVecsOBOA[i][j].x + \"|\" + primTri.isoVecsOBOA[i][j].y);\n }\n }\n this.face.push([primTri.vecToidx[temp[0]], primTri.vecToidx[temp[1]], primTri.vecToidx[temp[2]]]);\n }\n }\n /**\n * @internal\n */\n mapBAOAtoDATA(faceNb, primTri) {\n const fr = primTri.IDATA.edgematch[faceNb][2];\n for (let i = 0; i < primTri.isoVecsBAOA.length; i++) {\n const temp = [];\n for (let j = 0; j < 3; j++) {\n if (primTri.vertexTypes[i][j] === 1) {\n temp.push(faceNb + \"|\" + primTri.isoVecsBAOA[i][j].x + \"|\" + primTri.isoVecsBAOA[i][j].y);\n }\n else {\n temp.push(fr + \"|\" + primTri.isoVecsBAOA[i][j].x + \"|\" + primTri.isoVecsBAOA[i][j].y);\n }\n }\n this.face.push([primTri.vecToidx[temp[0]], primTri.vecToidx[temp[1]], primTri.vecToidx[temp[2]]]);\n }\n }\n /**\n * @internal\n */\n orderData(primTri) {\n const nearTo = [];\n for (let i = 0; i < 13; i++) {\n nearTo[i] = [];\n }\n const close = primTri.closestTo;\n for (let i = 0; i < close.length; i++) {\n if (close[i][0] > -1) {\n if (close[i][1] > 0) {\n nearTo[close[i][0]].push([i, close[i][1]]);\n }\n }\n else {\n nearTo[12].push([i, close[i][0]]);\n }\n }\n const near = [];\n for (let i = 0; i < 12; i++) {\n near[i] = i;\n }\n let nearIndex = 12;\n for (let i = 0; i < 12; i++) {\n nearTo[i].sort((a, b) => {\n return a[1] - b[1];\n });\n for (let j = 0; j < nearTo[i].length; j++) {\n near[nearTo[i][j][0]] = nearIndex++;\n }\n }\n for (let j = 0; j < nearTo[12].length; j++) {\n near[nearTo[12][j][0]] = nearIndex++;\n }\n for (let i = 0; i < this.vertex.length; i++) {\n this.vertex[i].push(near[i]);\n }\n this.vertex.sort((a, b) => {\n return a[3] - b[3];\n });\n for (let i = 0; i < this.vertex.length; i++) {\n this.vertex[i].pop();\n }\n for (let i = 0; i < this.face.length; i++) {\n for (let j = 0; j < this.face[i].length; j++) {\n this.face[i][j] = near[this.face[i][j]];\n }\n }\n this.sharedNodes = nearTo[12].length;\n this.poleNodes = this.vertex.length - this.sharedNodes;\n }\n /**\n * @internal\n */\n setOrder(m, faces) {\n const adjVerts = [];\n const dualFaces = [];\n let face = faces.pop();\n dualFaces.push(face);\n let index = this.face[face].indexOf(m);\n index = (index + 2) % 3;\n let v = this.face[face][index];\n adjVerts.push(v);\n let f = 0;\n while (faces.length > 0) {\n face = faces[f];\n if (this.face[face].indexOf(v) > -1) {\n // v is a vertex of face f\n index = (this.face[face].indexOf(v) + 1) % 3;\n v = this.face[face][index];\n adjVerts.push(v);\n dualFaces.push(face);\n faces.splice(f, 1);\n f = 0;\n }\n else {\n f++;\n }\n }\n this.adjacentFaces.push(adjVerts);\n return dualFaces;\n }\n /**\n * @internal\n */\n toGoldbergPolyhedronData() {\n const goldbergPolyhedronData = new PolyhedronData(\"GeoDual\", \"Goldberg\", [], []);\n goldbergPolyhedronData.name = \"GD dual\";\n const verticesNb = this.vertex.length;\n const map = new Array(verticesNb);\n for (let v = 0; v < verticesNb; v++) {\n map[v] = [];\n }\n for (let f = 0; f < this.face.length; f++) {\n for (let i = 0; i < 3; i++) {\n map[this.face[f][i]].push(f);\n }\n }\n let cx = 0;\n let cy = 0;\n let cz = 0;\n let face = [];\n let vertex = [];\n this.adjacentFaces = [];\n for (let m = 0; m < map.length; m++) {\n goldbergPolyhedronData.face[m] = this.setOrder(m, map[m].concat([]));\n map[m].forEach((el) => {\n cx = 0;\n cy = 0;\n cz = 0;\n face = this.face[el];\n for (let i = 0; i < 3; i++) {\n vertex = this.vertex[face[i]];\n cx += vertex[0];\n cy += vertex[1];\n cz += vertex[2];\n }\n goldbergPolyhedronData.vertex[el] = [cx / 3, cy / 3, cz / 3];\n });\n }\n return goldbergPolyhedronData;\n }\n //statics\n /**Builds the data for a Geodesic Polyhedron from a primary triangle\n * @param primTri the primary triangle\n * @internal\n */\n static BuildGeodesicData(primTri) {\n const geodesicData = new GeodesicData(\"Geodesic-m-n\", \"Geodesic\", [\n [0, PHI, -1],\n [-PHI, 1, 0],\n [-1, 0, -PHI],\n [1, 0, -PHI],\n [PHI, 1, 0],\n [0, PHI, 1],\n [-1, 0, PHI],\n [-PHI, -1, 0],\n [0, -PHI, -1],\n [PHI, -1, 0],\n [1, 0, PHI],\n [0, -PHI, 1],\n ], []);\n primTri.setIndices();\n primTri.calcCoeffs();\n primTri.createInnerFacets();\n primTri.edgeVecsABOB();\n primTri.mapABOBtoOBOA();\n primTri.mapABOBtoBAOA();\n for (let f = 0; f < primTri.IDATA.face.length; f++) {\n primTri.MapToFace(f, geodesicData);\n geodesicData.innerToData(f, primTri);\n if (primTri.IDATA.edgematch[f][1] === \"B\") {\n geodesicData.mapABOBtoDATA(f, primTri);\n }\n if (primTri.IDATA.edgematch[f][1] === \"O\") {\n geodesicData.mapOBOAtoDATA(f, primTri);\n }\n if (primTri.IDATA.edgematch[f][3] === \"A\") {\n geodesicData.mapBAOAtoDATA(f, primTri);\n }\n }\n geodesicData.orderData(primTri);\n const radius = 1;\n geodesicData.vertex = geodesicData.vertex.map(function (el) {\n const a = el[0];\n const b = el[1];\n const c = el[2];\n const d = Math.sqrt(a * a + b * b + c * c);\n el[0] *= radius / d;\n el[1] *= radius / d;\n el[2] *= radius / d;\n return el;\n });\n return geodesicData;\n }\n}\n//# sourceMappingURL=geodesicMesh.js.map","import { CreatePolyhedron } from \"./polyhedronBuilder.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nimport { _PrimaryIsoTriangle, GeodesicData } from \"../geodesicMesh.js\";\n/**\n * Creates the Mesh for a Geodesic Polyhedron\n * @see https://en.wikipedia.org/wiki/Geodesic_polyhedron\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/polyhedra/geodesic_poly\n * @param name defines the name of the mesh\n * @param options an object used to set the following optional parameters for the polyhedron, required but can be empty\n * * m number of horizontal steps along an isogrid\n * * n number of angled steps along an isogrid\n * * size the size of the Geodesic, optional default 1\n * * sizeX allows stretching in the x direction, optional, default size\n * * sizeY allows stretching in the y direction, optional, default size\n * * sizeZ allows stretching in the z direction, optional, default size\n * * faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\n * * faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\n * * flat when true creates a flat shaded mesh, optional, default true\n * * subdivisions increasing the subdivisions increases the number of faces, optional, default 4\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\n * @param options.n\n * @param options.size\n * @param options.sizeX\n * @param options.sizeY\n * @param options.sizeZ\n * @param options.faceUV\n * @param options.faceColors\n * @param options.flat\n * @param options.updatable\n * @param options.sideOrientation\n * @param options.frontUVs\n * @param options.backUVs\n * @param options.m\n * @param scene defines the hosting scene\n * @returns Geodesic mesh\n */\nexport function CreateGeodesic(name, options, scene = null) {\n let m = options.m || 1;\n if (m !== Math.floor(m)) {\n m === Math.floor(m);\n Logger.Warn(\"m not an integer only floor(m) used\");\n }\n let n = options.n || 0;\n if (n !== Math.floor(n)) {\n n === Math.floor(n);\n Logger.Warn(\"n not an integer only floor(n) used\");\n }\n if (n > m) {\n const temp = n;\n n = m;\n m = temp;\n Logger.Warn(\"n > m therefore m and n swapped\");\n }\n const primTri = new _PrimaryIsoTriangle();\n primTri.build(m, n);\n const geodesicData = GeodesicData.BuildGeodesicData(primTri);\n const geoOptions = {\n custom: geodesicData,\n size: options.size,\n sizeX: options.sizeX,\n sizeY: options.sizeY,\n sizeZ: options.sizeZ,\n faceUV: options.faceUV,\n faceColors: options.faceColors,\n flat: options.flat,\n updatable: options.updatable,\n sideOrientation: options.sideOrientation,\n frontUVs: options.frontUVs,\n backUVs: options.backUVs,\n };\n const geodesic = CreatePolyhedron(name, geoOptions, scene);\n return geodesic;\n}\n//# sourceMappingURL=geodesicBuilder.js.map","import { Vector3 } from \"../Maths/math.vector.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { Mesh } from \"../Meshes/mesh.js\";\nimport { Color4 } from \"../Maths/math.color.js\";\nimport { Logger } from \"../Misc/logger.js\";\nMesh._GoldbergMeshParser = (parsedMesh, scene) => {\n return GoldbergMesh.Parse(parsedMesh, scene);\n};\n/**\n * Mesh for a Goldberg Polyhedron which is made from 12 pentagonal and the rest hexagonal faces\n * @see https://en.wikipedia.org/wiki/Goldberg_polyhedron\n */\nexport class GoldbergMesh extends Mesh {\n constructor() {\n super(...arguments);\n /**\n * Defines the specific Goldberg data used in this mesh construction.\n */\n this.goldbergData = {\n faceColors: [],\n faceCenters: [],\n faceZaxis: [],\n faceXaxis: [],\n faceYaxis: [],\n nbSharedFaces: 0,\n nbUnsharedFaces: 0,\n nbFaces: 0,\n nbFacesAtPole: 0,\n adjacentFaces: [],\n };\n }\n /**\n * Gets the related Goldberg face from pole infos\n * @param poleOrShared Defines the pole index or the shared face index if the fromPole parameter is passed in\n * @param fromPole Defines an optional pole index to find the related info from\n * @returns the goldberg face number\n */\n relatedGoldbergFace(poleOrShared, fromPole) {\n if (fromPole === void 0) {\n if (poleOrShared > this.goldbergData.nbUnsharedFaces - 1) {\n Logger.Warn(\"Maximum number of unshared faces used\");\n poleOrShared = this.goldbergData.nbUnsharedFaces - 1;\n }\n return this.goldbergData.nbUnsharedFaces + poleOrShared;\n }\n if (poleOrShared > 11) {\n Logger.Warn(\"Last pole used\");\n poleOrShared = 11;\n }\n if (fromPole > this.goldbergData.nbFacesAtPole - 1) {\n Logger.Warn(\"Maximum number of faces at a pole used\");\n fromPole = this.goldbergData.nbFacesAtPole - 1;\n }\n return 12 + poleOrShared * this.goldbergData.nbFacesAtPole + fromPole;\n }\n _changeGoldbergFaceColors(colorRange) {\n for (let i = 0; i < colorRange.length; i++) {\n const min = colorRange[i][0];\n const max = colorRange[i][1];\n const col = colorRange[i][2];\n for (let f = min; f < max + 1; f++) {\n this.goldbergData.faceColors[f] = col;\n }\n }\n const newCols = [];\n for (let f = 0; f < 12; f++) {\n for (let i = 0; i < 5; i++) {\n newCols.push(this.goldbergData.faceColors[f].r, this.goldbergData.faceColors[f].g, this.goldbergData.faceColors[f].b, this.goldbergData.faceColors[f].a);\n }\n }\n for (let f = 12; f < this.goldbergData.faceColors.length; f++) {\n for (let i = 0; i < 6; i++) {\n newCols.push(this.goldbergData.faceColors[f].r, this.goldbergData.faceColors[f].g, this.goldbergData.faceColors[f].b, this.goldbergData.faceColors[f].a);\n }\n }\n return newCols;\n }\n /**\n * Set new goldberg face colors\n * @param colorRange the new color to apply to the mesh\n */\n setGoldbergFaceColors(colorRange) {\n const newCols = this._changeGoldbergFaceColors(colorRange);\n this.setVerticesData(VertexBuffer.ColorKind, newCols);\n }\n /**\n * Updates new goldberg face colors\n * @param colorRange the new color to apply to the mesh\n */\n updateGoldbergFaceColors(colorRange) {\n const newCols = this._changeGoldbergFaceColors(colorRange);\n this.updateVerticesData(VertexBuffer.ColorKind, newCols);\n }\n _changeGoldbergFaceUVs(uvRange) {\n const uvs = this.getVerticesData(VertexBuffer.UVKind);\n for (let i = 0; i < uvRange.length; i++) {\n const min = uvRange[i][0];\n const max = uvRange[i][1];\n const center = uvRange[i][2];\n const radius = uvRange[i][3];\n const angle = uvRange[i][4];\n const points5 = [];\n const points6 = [];\n let u;\n let v;\n for (let p = 0; p < 5; p++) {\n u = center.x + radius * Math.cos(angle + (p * Math.PI) / 2.5);\n v = center.y + radius * Math.sin(angle + (p * Math.PI) / 2.5);\n if (u < 0) {\n u = 0;\n }\n if (u > 1) {\n u = 1;\n }\n points5.push(u, v);\n }\n for (let p = 0; p < 6; p++) {\n u = center.x + radius * Math.cos(angle + (p * Math.PI) / 3);\n v = center.y + radius * Math.sin(angle + (p * Math.PI) / 3);\n if (u < 0) {\n u = 0;\n }\n if (u > 1) {\n u = 1;\n }\n points6.push(u, v);\n }\n for (let f = min; f < Math.min(12, max + 1); f++) {\n for (let p = 0; p < 5; p++) {\n uvs[10 * f + 2 * p] = points5[2 * p];\n uvs[10 * f + 2 * p + 1] = points5[2 * p + 1];\n }\n }\n for (let f = Math.max(12, min); f < max + 1; f++) {\n for (let p = 0; p < 6; p++) {\n //120 + 12 * (f - 12) = 12 * f - 24\n uvs[12 * f - 24 + 2 * p] = points6[2 * p];\n uvs[12 * f - 23 + 2 * p] = points6[2 * p + 1];\n }\n }\n }\n return uvs;\n }\n /**\n * set new goldberg face UVs\n * @param uvRange the new UVs to apply to the mesh\n */\n setGoldbergFaceUVs(uvRange) {\n const newUVs = this._changeGoldbergFaceUVs(uvRange);\n this.setVerticesData(VertexBuffer.UVKind, newUVs);\n }\n /**\n * Updates new goldberg face UVs\n * @param uvRange the new UVs to apply to the mesh\n */\n updateGoldbergFaceUVs(uvRange) {\n const newUVs = this._changeGoldbergFaceUVs(uvRange);\n this.updateVerticesData(VertexBuffer.UVKind, newUVs);\n }\n /**\n * Places a mesh on a particular face of the goldberg polygon\n * @param mesh Defines the mesh to position\n * @param face Defines the face to position onto\n * @param position Defines the position relative to the face we are positioning the mesh onto\n */\n placeOnGoldbergFaceAt(mesh, face, position) {\n const orientation = Vector3.RotationFromAxis(this.goldbergData.faceXaxis[face], this.goldbergData.faceYaxis[face], this.goldbergData.faceZaxis[face]);\n mesh.rotation = orientation;\n mesh.position = this.goldbergData.faceCenters[face]\n .add(this.goldbergData.faceXaxis[face].scale(position.x))\n .add(this.goldbergData.faceYaxis[face].scale(position.y))\n .add(this.goldbergData.faceZaxis[face].scale(position.z));\n }\n /**\n * Serialize current mesh\n * @param serializationObject defines the object which will receive the serialization data\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n serializationObject.type = \"GoldbergMesh\";\n const goldbergData = {};\n goldbergData.adjacentFaces = this.goldbergData.adjacentFaces;\n goldbergData.nbSharedFaces = this.goldbergData.nbSharedFaces;\n goldbergData.nbUnsharedFaces = this.goldbergData.nbUnsharedFaces;\n goldbergData.nbFaces = this.goldbergData.nbFaces;\n goldbergData.nbFacesAtPole = this.goldbergData.nbFacesAtPole;\n if (this.goldbergData.faceColors) {\n goldbergData.faceColors = [];\n for (const color of this.goldbergData.faceColors) {\n goldbergData.faceColors.push(color.asArray());\n }\n }\n if (this.goldbergData.faceCenters) {\n goldbergData.faceCenters = [];\n for (const vector of this.goldbergData.faceCenters) {\n goldbergData.faceCenters.push(vector.asArray());\n }\n }\n if (this.goldbergData.faceZaxis) {\n goldbergData.faceZaxis = [];\n for (const vector of this.goldbergData.faceZaxis) {\n goldbergData.faceZaxis.push(vector.asArray());\n }\n }\n if (this.goldbergData.faceYaxis) {\n goldbergData.faceYaxis = [];\n for (const vector of this.goldbergData.faceYaxis) {\n goldbergData.faceYaxis.push(vector.asArray());\n }\n }\n if (this.goldbergData.faceXaxis) {\n goldbergData.faceXaxis = [];\n for (const vector of this.goldbergData.faceXaxis) {\n goldbergData.faceXaxis.push(vector.asArray());\n }\n }\n serializationObject.goldbergData = goldbergData;\n }\n /**\n * Parses a serialized goldberg mesh\n * @param parsedMesh the serialized mesh\n * @param scene the scene to create the goldberg mesh in\n * @returns the created goldberg mesh\n */\n static Parse(parsedMesh, scene) {\n const goldbergData = parsedMesh.goldbergData;\n goldbergData.faceColors = goldbergData.faceColors.map((el) => Color4.FromArray(el));\n goldbergData.faceCenters = goldbergData.faceCenters.map((el) => Vector3.FromArray(el));\n goldbergData.faceZaxis = goldbergData.faceZaxis.map((el) => Vector3.FromArray(el));\n goldbergData.faceXaxis = goldbergData.faceXaxis.map((el) => Vector3.FromArray(el));\n goldbergData.faceYaxis = goldbergData.faceYaxis.map((el) => Vector3.FromArray(el));\n const goldberg = new GoldbergMesh(parsedMesh.name, scene);\n goldberg.goldbergData = goldbergData;\n return goldberg;\n }\n}\n//# sourceMappingURL=goldbergMesh.js.map","import { Vector3 } from \"../../Maths/math.vector.js\";\nimport { Color4 } from \"../../Maths/math.color.js\";\nimport { Mesh } from \"../../Meshes/mesh.js\";\nimport { VertexData } from \"../mesh.vertexData.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nimport { _PrimaryIsoTriangle, GeodesicData } from \"../geodesicMesh.js\";\nimport { GoldbergMesh } from \"../goldbergMesh.js\";\nimport { CompatibilityOptions } from \"../../Compat/compatibilityOptions.js\";\n/**\n * Creates the Mesh for a Goldberg Polyhedron\n * @param options an object used to set the following optional parameters for the polyhedron, required but can be empty\n * @param goldbergData polyhedronData defining the Goldberg polyhedron\n * @returns GoldbergSphere mesh\n */\nexport function CreateGoldbergVertexData(options, goldbergData) {\n const size = options.size;\n const sizeX = options.sizeX || size || 1;\n const sizeY = options.sizeY || size || 1;\n const sizeZ = options.sizeZ || size || 1;\n const sideOrientation = options.sideOrientation === 0 ? 0 : options.sideOrientation || VertexData.DEFAULTSIDE;\n const positions = [];\n const indices = [];\n const normals = [];\n const uvs = [];\n let minX = Infinity;\n let maxX = -Infinity;\n let minY = Infinity;\n let maxY = -Infinity;\n for (let v = 0; v < goldbergData.vertex.length; v++) {\n minX = Math.min(minX, goldbergData.vertex[v][0] * sizeX);\n maxX = Math.max(maxX, goldbergData.vertex[v][0] * sizeX);\n minY = Math.min(minY, goldbergData.vertex[v][1] * sizeY);\n maxY = Math.max(maxY, goldbergData.vertex[v][1] * sizeY);\n }\n let index = 0;\n for (let f = 0; f < goldbergData.face.length; f++) {\n const verts = goldbergData.face[f];\n const a = Vector3.FromArray(goldbergData.vertex[verts[0]]);\n const b = Vector3.FromArray(goldbergData.vertex[verts[2]]);\n const c = Vector3.FromArray(goldbergData.vertex[verts[1]]);\n const ba = b.subtract(a);\n const ca = c.subtract(a);\n const norm = Vector3.Cross(ca, ba).normalize();\n for (let v = 0; v < verts.length; v++) {\n normals.push(norm.x, norm.y, norm.z);\n const pdata = goldbergData.vertex[verts[v]];\n positions.push(pdata[0] * sizeX, pdata[1] * sizeY, pdata[2] * sizeZ);\n const vCoord = (pdata[1] * sizeY - minY) / (maxY - minY);\n uvs.push((pdata[0] * sizeX - minX) / (maxX - minX), CompatibilityOptions.UseOpenGLOrientationForUV ? 1 - vCoord : vCoord);\n }\n for (let v = 0; v < verts.length - 2; v++) {\n indices.push(index, index + v + 2, index + v + 1);\n }\n index += verts.length;\n }\n VertexData._ComputeSides(sideOrientation, positions, indices, normals, uvs);\n const vertexData = new VertexData();\n vertexData.positions = positions;\n vertexData.indices = indices;\n vertexData.normals = normals;\n vertexData.uvs = uvs;\n return vertexData;\n}\n/**\n * Creates the Mesh for a Goldberg Polyhedron which is made from 12 pentagonal and the rest hexagonal faces\n * @see https://en.wikipedia.org/wiki/Goldberg_polyhedron\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/polyhedra/goldberg_poly\n * @param name defines the name of the mesh\n * @param options an object used to set the following optional parameters for the polyhedron, required but can be empty\n * @param scene defines the hosting scene\n * @returns Goldberg mesh\n */\nexport function CreateGoldberg(name, options, scene = null) {\n const size = options.size;\n const sizeX = options.sizeX || size || 1;\n const sizeY = options.sizeY || size || 1;\n const sizeZ = options.sizeZ || size || 1;\n let m = options.m || 1;\n if (m !== Math.floor(m)) {\n m === Math.floor(m);\n Logger.Warn(\"m not an integer only floor(m) used\");\n }\n let n = options.n || 0;\n if (n !== Math.floor(n)) {\n n === Math.floor(n);\n Logger.Warn(\"n not an integer only floor(n) used\");\n }\n if (n > m) {\n const temp = n;\n n = m;\n m = temp;\n Logger.Warn(\"n > m therefore m and n swapped\");\n }\n const primTri = new _PrimaryIsoTriangle();\n primTri.build(m, n);\n const geodesicData = GeodesicData.BuildGeodesicData(primTri);\n const goldbergData = geodesicData.toGoldbergPolyhedronData();\n const goldberg = new GoldbergMesh(name, scene);\n options.sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n goldberg._originalBuilderSideOrientation = options.sideOrientation;\n const vertexData = CreateGoldbergVertexData(options, goldbergData);\n vertexData.applyToMesh(goldberg, options.updatable);\n goldberg.goldbergData.nbSharedFaces = geodesicData.sharedNodes;\n goldberg.goldbergData.nbUnsharedFaces = geodesicData.poleNodes;\n goldberg.goldbergData.adjacentFaces = geodesicData.adjacentFaces;\n goldberg.goldbergData.nbFaces = goldberg.goldbergData.nbSharedFaces + goldberg.goldbergData.nbUnsharedFaces;\n goldberg.goldbergData.nbFacesAtPole = (goldberg.goldbergData.nbUnsharedFaces - 12) / 12;\n for (let f = 0; f < geodesicData.vertex.length; f++) {\n goldberg.goldbergData.faceCenters.push(Vector3.FromArray(geodesicData.vertex[f]));\n goldberg.goldbergData.faceCenters[f].x *= sizeX;\n goldberg.goldbergData.faceCenters[f].y *= sizeY;\n goldberg.goldbergData.faceCenters[f].z *= sizeZ;\n goldberg.goldbergData.faceColors.push(new Color4(1, 1, 1, 1));\n }\n for (let f = 0; f < goldbergData.face.length; f++) {\n const verts = goldbergData.face[f];\n const a = Vector3.FromArray(goldbergData.vertex[verts[0]]);\n const b = Vector3.FromArray(goldbergData.vertex[verts[2]]);\n const c = Vector3.FromArray(goldbergData.vertex[verts[1]]);\n const ba = b.subtract(a);\n const ca = c.subtract(a);\n const norm = Vector3.Cross(ca, ba).normalize();\n const z = Vector3.Cross(ca, norm).normalize();\n goldberg.goldbergData.faceXaxis.push(ca.normalize());\n goldberg.goldbergData.faceYaxis.push(norm);\n goldberg.goldbergData.faceZaxis.push(z);\n }\n return goldberg;\n}\n//# sourceMappingURL=goldbergBuilder.js.map","import { Path2 } from \"../../Maths/math.path.js\";\nimport { Vector3 } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { TransformNode } from \"../transformNode.js\";\nimport { ExtrudePolygon } from \"./polygonBuilder.js\";\n// Shape functions\nclass ShapePath {\n /** Create the ShapePath used to support glyphs */\n constructor(resolution) {\n this._paths = [];\n this._tempPaths = [];\n this._holes = [];\n this._resolution = resolution;\n }\n /** Move the virtual cursor to a coordinate */\n moveTo(x, y) {\n this._currentPath = new Path2(x, y);\n this._tempPaths.push(this._currentPath);\n }\n /** Draw a line from the virtual cursor to a given coordinate */\n lineTo(x, y) {\n this._currentPath.addLineTo(x, y);\n }\n /** Create a quadratic curve from the virtual cursor to a given coordinate */\n quadraticCurveTo(cpx, cpy, x, y) {\n this._currentPath.addQuadraticCurveTo(cpx, cpy, x, y, this._resolution);\n }\n /** Create a bezier curve from the virtual cursor to a given coordinate */\n bezierCurveTo(cpx1, cpy1, cpx2, cpy2, x, y) {\n this._currentPath.addBezierCurveTo(cpx1, cpy1, cpx2, cpy2, x, y, this._resolution);\n }\n /** Extract holes based on CW / CCW */\n extractHoles() {\n for (const path of this._tempPaths) {\n if (path.area() > 0) {\n this._holes.push(path);\n }\n else {\n this._paths.push(path);\n }\n }\n if (!this._paths.length && this._holes.length) {\n const temp = this._holes;\n this._holes = this._paths;\n this._paths = temp;\n }\n this._tempPaths.length = 0;\n }\n /** Gets the list of paths */\n get paths() {\n return this._paths;\n }\n /** Gets the list of holes */\n get holes() {\n return this._holes;\n }\n}\n// Utility functions\nfunction CreateShapePath(char, scale, offsetX, offsetY, resolution, fontData) {\n const glyph = fontData.glyphs[char] || fontData.glyphs[\"?\"];\n if (!glyph) {\n // return if there is no glyph data\n return null;\n }\n const shapePath = new ShapePath(resolution);\n if (glyph.o) {\n const outline = glyph.o.split(\" \");\n for (let i = 0, l = outline.length; i < l;) {\n const action = outline[i++];\n switch (action) {\n case \"m\": {\n // moveTo\n const x = parseInt(outline[i++]) * scale + offsetX;\n const y = parseInt(outline[i++]) * scale + offsetY;\n shapePath.moveTo(x, y);\n break;\n }\n case \"l\": {\n // lineTo\n const x = parseInt(outline[i++]) * scale + offsetX;\n const y = parseInt(outline[i++]) * scale + offsetY;\n shapePath.lineTo(x, y);\n break;\n }\n case \"q\": {\n // quadraticCurveTo\n const cpx = parseInt(outline[i++]) * scale + offsetX;\n const cpy = parseInt(outline[i++]) * scale + offsetY;\n const cpx1 = parseInt(outline[i++]) * scale + offsetX;\n const cpy1 = parseInt(outline[i++]) * scale + offsetY;\n shapePath.quadraticCurveTo(cpx1, cpy1, cpx, cpy);\n break;\n }\n case \"b\": {\n // bezierCurveTo\n const cpx = parseInt(outline[i++]) * scale + offsetX;\n const cpy = parseInt(outline[i++]) * scale + offsetY;\n const cpx1 = parseInt(outline[i++]) * scale + offsetX;\n const cpy1 = parseInt(outline[i++]) * scale + offsetY;\n const cpx2 = parseInt(outline[i++]) * scale + offsetX;\n const cpy2 = parseInt(outline[i++]) * scale + offsetY;\n shapePath.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, cpx, cpy);\n break;\n }\n }\n }\n }\n // Extract holes (based on clockwise data)\n shapePath.extractHoles();\n return { offsetX: glyph.ha * scale, shapePath: shapePath };\n}\n/**\n * Creates shape paths from a text and font\n * @param text the text\n * @param size size of the font\n * @param resolution resolution of the font\n * @param fontData defines the font data (can be generated with http://gero3.github.io/facetype.js/)\n * @returns array of ShapePath objects\n */\nexport function CreateTextShapePaths(text, size, resolution, fontData) {\n const chars = Array.from(text);\n const scale = size / fontData.resolution;\n const line_height = (fontData.boundingBox.yMax - fontData.boundingBox.yMin + fontData.underlineThickness) * scale;\n const shapePaths = [];\n let offsetX = 0, offsetY = 0;\n for (let i = 0; i < chars.length; i++) {\n const char = chars[i];\n if (char === \"\\n\") {\n offsetX = 0;\n offsetY -= line_height;\n }\n else {\n const ret = CreateShapePath(char, scale, offsetX, offsetY, resolution, fontData);\n if (ret) {\n offsetX += ret.offsetX;\n shapePaths.push(ret.shapePath);\n }\n }\n }\n return shapePaths;\n}\n/**\n * Create a text mesh\n * @param name defines the name of the mesh\n * @param text defines the text to use to build the mesh\n * @param fontData defines the font data (can be generated with http://gero3.github.io/facetype.js/)\n * @param options defines options used to create the mesh\n * @param scene defines the hosting scene\n * @param earcutInjection can be used to inject your own earcut reference\n * @returns a new Mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/text\n */\nexport function CreateText(name, text, fontData, options = {\n size: 50,\n resolution: 8,\n depth: 1.0,\n}, scene = null, earcutInjection = earcut) {\n var _a, _b;\n // First we need to generate the paths\n const shapePaths = CreateTextShapePaths(text, options.size || 50, options.resolution || 8, fontData);\n // And extrude them\n const meshes = [];\n let letterIndex = 0;\n for (const shapePath of shapePaths) {\n if (!shapePath.paths.length) {\n continue;\n }\n const holes = shapePath.holes.slice(); // Copy it as we will update the copy\n for (const path of shapePath.paths) {\n const holeVectors = [];\n const shapeVectors = [];\n const points = path.getPoints();\n for (const point of points) {\n shapeVectors.push(new Vector3(point.x, 0, point.y)); // ExtrudePolygon expects data on the xz plane\n }\n // Holes\n const localHolesCopy = holes.slice();\n for (const hole of localHolesCopy) {\n const points = hole.getPoints();\n let found = false;\n for (const point of points) {\n if (path.isPointInside(point)) {\n found = true;\n break;\n }\n }\n if (!found) {\n continue;\n }\n const holePoints = [];\n for (const point of points) {\n holePoints.push(new Vector3(point.x, 0, point.y)); // ExtrudePolygon expects data on the xz plane\n }\n holeVectors.push(holePoints);\n // Remove the hole as it was already used\n holes.splice(holes.indexOf(hole), 1);\n }\n // There is at least a hole but it was unaffected\n if (!holeVectors.length && holes.length) {\n for (const hole of holes) {\n const points = hole.getPoints();\n const holePoints = [];\n for (const point of points) {\n holePoints.push(new Vector3(point.x, 0, point.y)); // ExtrudePolygon expects data on the xz plane\n }\n holeVectors.push(holePoints);\n }\n }\n // Extrusion!\n const mesh = ExtrudePolygon(name, {\n shape: shapeVectors,\n holes: holeVectors.length ? holeVectors : undefined,\n depth: options.depth || 1.0,\n faceUV: options.faceUV || ((_a = options.perLetterFaceUV) === null || _a === void 0 ? void 0 : _a.call(options, letterIndex)),\n faceColors: options.faceColors || ((_b = options.perLetterFaceColors) === null || _b === void 0 ? void 0 : _b.call(options, letterIndex)),\n sideOrientation: Mesh._GetDefaultSideOrientation(options.sideOrientation || Mesh.DOUBLESIDE),\n }, scene, earcutInjection);\n meshes.push(mesh);\n letterIndex++;\n }\n }\n // Then we can merge everyone into one single mesh\n const newMesh = Mesh.MergeMeshes(meshes, true, true);\n if (newMesh) {\n // Move pivot to desired center / bottom / center position\n const bbox = newMesh.getBoundingInfo().boundingBox;\n newMesh.position.x += -(bbox.minimumWorld.x + bbox.maximumWorld.x) / 2; // Mid X\n newMesh.position.y += -(bbox.minimumWorld.y + bbox.maximumWorld.y) / 2; // Mid Z as it will rotate\n newMesh.position.z += -(bbox.minimumWorld.z + bbox.maximumWorld.z) / 2 + bbox.extendSize.z; // Bottom Y as it will rotate\n newMesh.name = name;\n // Rotate 90° Up\n const pivot = new TransformNode(\"pivot\", scene);\n pivot.rotation.x = -Math.PI / 2;\n newMesh.parent = pivot;\n newMesh.bakeCurrentTransformIntoVertices();\n // Remove the pivot\n newMesh.parent = null;\n pivot.dispose();\n }\n return newMesh;\n}\n//# sourceMappingURL=textBuilder.js.map","/* eslint-disable @typescript-eslint/naming-convention */\nimport { CreateRibbon } from \"./Builders/ribbonBuilder.js\";\nimport { CreateDisc } from \"./Builders/discBuilder.js\";\nimport { CreateBox } from \"./Builders/boxBuilder.js\";\nimport { CreateTiledBox } from \"./Builders/tiledBoxBuilder.js\";\nimport { CreateSphere } from \"./Builders/sphereBuilder.js\";\nimport { CreateCylinder } from \"./Builders/cylinderBuilder.js\";\nimport { CreateTorus } from \"./Builders/torusBuilder.js\";\nimport { CreateTorusKnot } from \"./Builders/torusKnotBuilder.js\";\nimport { CreateDashedLines, CreateLineSystem, CreateLines } from \"./Builders/linesBuilder.js\";\nimport { CreatePolygon, ExtrudePolygon } from \"./Builders/polygonBuilder.js\";\nimport { ExtrudeShape, ExtrudeShapeCustom } from \"./Builders/shapeBuilder.js\";\nimport { CreateLathe } from \"./Builders/latheBuilder.js\";\nimport { CreatePlane } from \"./Builders/planeBuilder.js\";\nimport { CreateTiledPlane } from \"./Builders/tiledPlaneBuilder.js\";\nimport { CreateGround, CreateGroundFromHeightMap, CreateTiledGround } from \"./Builders/groundBuilder.js\";\nimport { CreateTube } from \"./Builders/tubeBuilder.js\";\nimport { CreatePolyhedron } from \"./Builders/polyhedronBuilder.js\";\nimport { CreateIcoSphere } from \"./Builders/icoSphereBuilder.js\";\nimport { CreateDecal } from \"./Builders/decalBuilder.js\";\nimport { CreateCapsule } from \"./Builders/capsuleBuilder.js\";\nimport { CreateGeodesic } from \"./Builders/geodesicBuilder.js\";\nimport { CreateGoldberg } from \"./Builders/goldbergBuilder.js\";\nimport { CreateText } from \"./Builders/textBuilder.js\";\n/**\n * Class containing static functions to help procedurally build meshes\n */\nexport const MeshBuilder = {\n CreateBox,\n CreateTiledBox,\n CreateSphere,\n CreateDisc,\n CreateIcoSphere,\n CreateRibbon,\n CreateCylinder,\n CreateTorus,\n CreateTorusKnot,\n CreateLineSystem,\n CreateLines,\n CreateDashedLines,\n ExtrudeShape,\n ExtrudeShapeCustom,\n CreateLathe,\n CreateTiledPlane,\n CreatePlane,\n CreateGround,\n CreateTiledGround,\n CreateGroundFromHeightMap,\n CreatePolygon,\n ExtrudePolygon,\n CreateTube,\n CreatePolyhedron,\n CreateGeodesic,\n CreateGoldberg,\n CreateDecal,\n CreateCapsule,\n CreateText,\n};\n//# sourceMappingURL=meshBuilder.js.map","export function Disposable(constructor) {\n return class extends constructor {\n constructor(...args) {\n super(...args);\n this._is_disposed = false;\n return new Proxy(this, {\n get: (target, prop) => {\n if (this._is_disposed) {\n // We want to allow users to dispose an object multiple times since it would leave you with the desired state anyway\n if (prop === 'dispose') {\n return () => { };\n }\n throw new Error(`Attempt to access disposed object. Property: ${String(prop)}`);\n }\n return target[prop];\n }\n });\n }\n dispose() {\n if (!this._is_disposed) {\n super.dispose();\n this._is_disposed = true;\n }\n }\n };\n}\n//# sourceMappingURL=Disposable.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { IBoundingBox, IMatrix4, ITransformedBoundingBox, IVector3 } from '../api.js';\nimport { RENDER_LAYER_MASK_DEFAULT, RenderLayerMask } from '../babylon/RenderLayer.js';\nimport { Vector3ConstantReference } from './material/PropertyWrappers.js';\nimport { Disposable } from '../utils/Disposable.js';\nimport { Observable } from '../Observable.js';\n/**\n * Class for handling drawing vertex buffers using line primitives\n * Line primitives are not considered normal SceneObjects and can't be interacted with with raycasting or any other means.\n */\nlet SceneLines = class SceneLines {\n constructor(mesh, _viewer) {\n this.mesh = mesh;\n this._viewer = _viewer;\n this.disposed_observable = new Observable();\n this._render_layer_mask = RENDER_LAYER_MASK_DEFAULT;\n this._local_bounds = IBoundingBox.Invalid();\n const on_transform_update = () => {\n this._viewer.mark_scene_dirty();\n this._viewer.mark_world_bounds_dirty();\n };\n this._position_wrapper = new Vector3ConstantReference(mesh, 'position', on_transform_update);\n this._rotation_wrapper = new Vector3ConstantReference(mesh, 'rotation', on_transform_update);\n this._scale_wrapper = new Vector3ConstantReference(mesh, 'scaling', on_transform_update);\n }\n recalculate_local_bounds(description) {\n this._local_bounds.min = new IVector3(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);\n this._local_bounds.max = new IVector3(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);\n for (let i = 0; i < description.positions.length; i += 3) {\n const x = description.positions[i + 0];\n const y = description.positions[i + 1];\n const z = description.positions[i + 2];\n this._local_bounds.min.x = Math.min(this._local_bounds.min.x, x);\n this._local_bounds.min.y = Math.min(this._local_bounds.min.y, y);\n this._local_bounds.min.z = Math.min(this._local_bounds.min.z, z);\n this._local_bounds.max.x = Math.max(this._local_bounds.max.x, x);\n this._local_bounds.max.y = Math.max(this._local_bounds.max.y, y);\n this._local_bounds.max.z = Math.max(this._local_bounds.max.z, z);\n }\n }\n get_world_bounds() {\n return new ITransformedBoundingBox(this._local_bounds, this.mesh.getWorldMatrix().toIMatrix4ToRef(new IMatrix4()));\n }\n get position() {\n return this._position_wrapper;\n }\n set position(value) {\n this._position_wrapper.x = value.x;\n this._position_wrapper.y = value.y;\n this._position_wrapper.z = value.z;\n this._viewer.mark_scene_dirty();\n this._viewer.mark_world_bounds_dirty();\n }\n get rotation() {\n return this._rotation_wrapper;\n }\n set rotation(value) {\n this._rotation_wrapper.x = value.x;\n this._rotation_wrapper.y = value.y;\n this._rotation_wrapper.z = value.z;\n this._viewer.mark_scene_dirty();\n this._viewer.mark_world_bounds_dirty();\n }\n get scale() {\n return this._scale_wrapper;\n }\n set scale(value) {\n this._scale_wrapper.x = value.x;\n this._scale_wrapper.y = value.y;\n this._scale_wrapper.z = value.z;\n this._viewer.mark_scene_dirty();\n this._viewer.mark_world_bounds_dirty();\n }\n get visible() {\n // Visibility is a number from 0-1 but for LinesMesh any > 0 value is fully visible\n return this.mesh.visibility > 0;\n }\n set visible(value) {\n // Visibility is a number from 0-1 but for LinesMesh any > 0 value is fully visible\n if (value === this.visible)\n return;\n this.mesh.visibility = value ? 1 : 0;\n this._viewer.mark_scene_dirty();\n this._viewer.mark_world_bounds_dirty();\n }\n get render_layer_mask() {\n return this._render_layer_mask;\n }\n set render_layer_mask(value) {\n if (this._render_layer_mask === value)\n return;\n this._render_layer_mask = value;\n this.mesh.layerMask = this._render_layer_mask.bitmap;\n this._viewer.mark_scene_dirty();\n this._viewer.mark_world_bounds_dirty();\n }\n add_render_layer(layer) {\n this.render_layer_mask = RenderLayerMask.add_layer(this._render_layer_mask, layer);\n }\n remove_render_layer(layer) {\n this.render_layer_mask = RenderLayerMask.remove_layer(this._render_layer_mask, layer);\n }\n dispose() {\n this._viewer.mark_scene_dirty();\n this.disposed_observable.notify(this);\n // Disposes both mesh and material by default\n this.mesh.dispose();\n }\n};\nSceneLines = __decorate([\n Disposable\n], SceneLines);\nexport { SceneLines };\n//# sourceMappingURL=SceneLines.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Mesh as BABYLON_Mesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js';\nimport { LinesMesh as BABYLON_LinesMesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/linesMesh.js';\nimport { VertexData as BABYLON_VertexData } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.vertexData.js';\nimport { IVector3 } from '../api.js';\nimport { Vector4 as BABYLON_Vector4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { MeshBuilder as BABYLON_MeshBuilder } from '@inter-ikea-betrakta-babylonjs/core/Meshes/meshBuilder.js';\nimport { SceneLines } from './SceneLines.js';\nimport { RenderingGroupID } from './Viewer.js';\nimport { Deprecated } from '../utils/Deprecated.js';\nexport class MeshManager {\n constructor(viewer, asset_manager, light_system, mark_scene_dirty) {\n this.viewer = viewer;\n this.asset_manager = asset_manager;\n this.light_system = light_system;\n this.mark_scene_dirty = mark_scene_dirty;\n this._scene = viewer.scene;\n }\n create_plane(width, height, uv0, uv1, material_id) {\n var _a, _b;\n width = width || 1.0;\n height = height || 1.0;\n const half_width = width / 2.0;\n const half_height = height / 2.0;\n const positions = [\n -half_width, -half_height, 0,\n half_width, -half_height, 0,\n half_width, half_height, 0,\n -half_width, half_height, 0\n ];\n const normals = [\n 0, 0, -1.0,\n 0, 0, -1.0,\n 0, 0, -1.0,\n 0, 0, -1.0\n ];\n uv0 = uv0 || { x: 0.0, y: 0.0, z: 1.0, w: 1.0 };\n const uvs = [\n uv0.z, uv0.w,\n uv0.x, uv0.w,\n uv0.x, uv0.y,\n uv0.z, uv0.y\n ];\n let uvs2;\n if (uv1) {\n uvs2 = [\n uv1.z, uv1.w,\n uv1.x, uv1.w,\n uv1.x, uv1.y,\n uv1.z, uv1.y\n ];\n }\n const indices = [0, 3, 2, 0, 2, 1];\n const vertex_data = new BABYLON_VertexData();\n vertex_data.positions = positions;\n vertex_data.normals = normals;\n vertex_data.uvs = uvs;\n if (uv1) {\n vertex_data.uvs2 = uvs2;\n }\n vertex_data.indices = indices;\n const mesh = new BABYLON_Mesh('', this._scene);\n vertex_data.applyToMesh(mesh);\n const material = material_id === undefined ? null : ((_a = this.asset_manager.materials.get(material_id)) !== null && _a !== void 0 ? _a : null);\n if (material_id !== undefined) {\n mesh.material = (_b = material === null || material === void 0 ? void 0 : material.material) !== null && _b !== void 0 ? _b : null;\n }\n else {\n mesh.material = this.asset_manager.default_material;\n }\n const object = this.viewer.viewer_scene.load_mesh([mesh]);\n if (material_id !== undefined) {\n object.set_material(material_id);\n }\n return object.id;\n }\n create_sphere(segments, diameter, material_id) {\n var _a, _b;\n const mesh = BABYLON_MeshBuilder.CreateSphere('', { segments: segments, diameter: diameter }, this._scene);\n mesh.setIndices(mesh.getIndices().reverse()); // Reverse indices, BABYLON is CW as standard, we want to mirror glTF standard and be CCW\n const material = material_id === undefined ? null : ((_a = this.asset_manager.materials.get(material_id)) !== null && _a !== void 0 ? _a : null);\n if (material_id !== undefined) {\n mesh.material = (_b = material === null || material === void 0 ? void 0 : material.material) !== null && _b !== void 0 ? _b : null;\n }\n else {\n mesh.material = this.asset_manager.default_material;\n }\n const object = this.viewer.viewer_scene.load_mesh([mesh]);\n if (material_id !== undefined) {\n object.set_material(material_id);\n }\n return object.id;\n }\n create_ellipsoid(segments, diameter_x, diameter_y, diameter_z, slice, arc, material_id) {\n var _a, _b;\n const mesh = BABYLON_MeshBuilder.CreateSphere('', { slice: slice, arc: arc, segments: segments, diameterX: diameter_x, diameterY: diameter_y, diameterZ: diameter_z }, this._scene);\n mesh.setIndices(mesh.getIndices().reverse()); // Reverse indices, BABYLON is CW as standard, we want to mirror glTF standard and be CCW\n const material = material_id === undefined ? null : ((_a = this.asset_manager.materials.get(material_id)) !== null && _a !== void 0 ? _a : null);\n if (material_id !== undefined) {\n mesh.material = (_b = material === null || material === void 0 ? void 0 : material.material) !== null && _b !== void 0 ? _b : null;\n }\n else {\n mesh.material = this.asset_manager.default_material;\n }\n const object = this.viewer.viewer_scene.load_mesh([mesh]);\n if (material_id !== undefined) {\n object.set_material(material_id);\n }\n return object.id;\n }\n create_box(width, height, depth, material_id) {\n var _a;\n const options = {\n width: width,\n height: height,\n depth: depth,\n wrap: true, // This ensures that Babylon not \"optimize\" UV coords\n faceUV: [\n // Set UV-Faces to be compatible with glTF standard.\n // This is probably needed due to babylon being lefthanded by standard. Check if this is needed in a future babylon update (version of time of writing is 4.1)\n new BABYLON_Vector4(1, 1, 0, 0), // side\n new BABYLON_Vector4(1, 1, 0, 0), // side\n new BABYLON_Vector4(1, 1, 0, 0), // side\n new BABYLON_Vector4(1, 1, 0, 0), // side\n new BABYLON_Vector4(1, 1, 0, 0), // top\n new BABYLON_Vector4(1, 1, 0, 0)\n ] // bottom\n }; // options cast to any, since wrap keyword is missing from Babylon types.\n const mesh = BABYLON_MeshBuilder.CreateBox('', options, this._scene);\n mesh.setIndices(mesh.getIndices().reverse()); // Revrse indicies, BABYLON is CW as standard, we want to mirror glTF standard and be\n const material = material_id === undefined ? null : ((_a = this.asset_manager.materials.get(material_id)) !== null && _a !== void 0 ? _a : null);\n if (material !== null) {\n mesh.material = material.material;\n }\n else {\n mesh.material = this.asset_manager.default_material;\n }\n const object = this.viewer.viewer_scene.load_mesh([mesh]);\n if (material_id !== undefined) {\n object.set_material(material_id);\n }\n return object.id;\n }\n generate_mesh_buffers(description) {\n var _a, _b, _c, _d, _e;\n const vertex_data = new BABYLON_VertexData();\n vertex_data.positions = description.positions;\n vertex_data.indices = description.indices;\n vertex_data.colors = (_a = description.colors) !== null && _a !== void 0 ? _a : null;\n vertex_data.normals = (_b = description.normals) !== null && _b !== void 0 ? _b : null;\n vertex_data.tangents = (_c = description.tangents) !== null && _c !== void 0 ? _c : null;\n vertex_data.uvs = (_d = description.uv0) !== null && _d !== void 0 ? _d : null;\n vertex_data.uvs2 = (_e = description.uv1) !== null && _e !== void 0 ? _e : null;\n return vertex_data;\n }\n validate_mesh_description(description) {\n if (description.positions.length === 0) {\n throw Error('Bad IMeshDescription: description contains no position data (empty mesh not allowed)');\n }\n if (description.indices && description.indices.length % 3 !== 0) {\n throw Error('Bad IMeshDescription: indices length must be a multiple of 3');\n }\n if (description.positions.length % 3 !== 0) {\n throw Error('Bad IMeshDescription: positions length must be multiple of 3');\n }\n else if ((!description.indices) && description.positions.length % 9 !== 0) {\n // If we don't have indices our positions buffer needs to be a multiple of 9\n // 3 for xyz and 3 again since there are 3 verts for every trianlge\n throw Error('Bad IMeshDescription: positions length must be multiple of 9 when not using an index buffer');\n }\n if (description.normals && description.normals.length % 3 !== 0) {\n throw Error('Bad IMeshDescription: normals length must be multiple of 3');\n }\n if (description.tangents && description.tangents.length % 4 !== 0) {\n throw Error('Bad IMeshDescription: tangents length must be multiple of 4');\n }\n if (description.uv0 && description.uv0.length % 2 !== 0) {\n throw Error('Bad IMeshDescription: uv0 length must be multiple of 2');\n }\n if (description.uv1 && description.uv1.length % 2 !== 0) {\n throw Error('Bad IMeshDescription: uv1 length must be multiple of 2');\n }\n }\n create_custom_mesh_babylon(description) {\n // Make sure that the data we got makes sense, this function throws if it doesn't\n this.validate_mesh_description(description);\n // Create a single mesh\n const vertex_data = this.generate_mesh_buffers(description);\n const mesh = new BABYLON_Mesh('SourceMesh custom', this._scene);\n mesh.renderingGroupId = RenderingGroupID.DEFAULT_RENDERING_GROUP;\n // Fill the mesh with new data\n vertex_data.applyToMesh(mesh);\n return [mesh];\n }\n create_custom_mesh(description, material_id = null) {\n var _a, _b, _c, _d, _e;\n const desc = {\n positions: description.positions,\n indices: description.indices,\n colors: (_a = description.colors) !== null && _a !== void 0 ? _a : null,\n normals: (_b = description.normals) !== null && _b !== void 0 ? _b : null,\n tangents: (_c = description.tangents) !== null && _c !== void 0 ? _c : null,\n uv0: (_d = description.uv0) !== null && _d !== void 0 ? _d : null,\n uv1: (_e = description.uv1) !== null && _e !== void 0 ? _e : null\n };\n const meshes = this.create_custom_mesh_babylon(desc);\n meshes.forEach((mesh) => {\n var _a;\n const material = material_id === null ? null : ((_a = this.asset_manager.materials.get(material_id)) !== null && _a !== void 0 ? _a : null);\n if (material !== null) {\n mesh.material = material.material;\n }\n else {\n mesh.material = this.asset_manager.default_material;\n }\n });\n const object = this.viewer.viewer_scene.load_mesh(meshes);\n if (material_id !== undefined) {\n object.set_material(material_id);\n }\n return object;\n }\n validate_lines_description(description) {\n if (description.indices && description.indices.length % 2 !== 0) {\n throw Error('Bad ILinesDescription: indices is not a multiple of 2');\n }\n if (description.positions.length === 0) {\n throw Error('Bad ILinesDescription: positions must contain data');\n }\n if (description.positions.length % 3 !== 0) {\n throw Error('Bad ILinesDescription: positions length must be a multiple of 3');\n }\n if (description.indices === undefined && description.positions.length % 6 !== 0) {\n throw Error('Bad ILinesDescription: positions length must be a multiple of 6 if no indices are provided');\n }\n if (description.colors.length % 4 !== 0) {\n throw Error('Bad ILinesDescription: colors length must be a multiple of 4');\n }\n if (description.colors.length / 4 !== description.positions.length / 3) {\n throw Error('Bad ILinesDescription: there must be the same amount of primitives in positions and colors');\n }\n }\n generate_lines_buffer(description) {\n const vertex_data = new BABYLON_VertexData();\n vertex_data.positions = description.positions;\n vertex_data.indices = description.indices;\n vertex_data.colors = description.colors;\n return vertex_data;\n }\n create_custom_lines(description) {\n this.validate_lines_description(description);\n const mesh = new BABYLON_LinesMesh('viewer lines primitive', this._scene, undefined, undefined, undefined, true, true);\n mesh.renderingGroupId = RenderingGroupID.DEFAULT_RENDERING_GROUP;\n const vertex_data = this.generate_lines_buffer(description);\n vertex_data.applyToMesh(mesh);\n const object = new SceneLines(mesh, this.viewer);\n object.recalculate_local_bounds(description);\n this.asset_manager.register_scene_lines(object);\n return object;\n }\n update_custom_lines(scene_object, description) {\n if (scene_object instanceof SceneLines) {\n const vertex_data = this.generate_lines_buffer(description);\n vertex_data.applyToMesh(scene_object.mesh);\n scene_object.recalculate_local_bounds(description);\n }\n else {\n throw Error('Tried to custom lines object of the wrong base class');\n }\n }\n}\n__decorate([\n Deprecated({ new: 'PrimitiveBuilder.create_plane' })\n], MeshManager.prototype, \"create_plane\", null);\n__decorate([\n Deprecated({ new: 'PrimitiveBuilder.create_sphere' })\n], MeshManager.prototype, \"create_sphere\", null);\n__decorate([\n Deprecated({ new: 'PrimitiveBuilder.create_spherical_dome' })\n], MeshManager.prototype, \"create_ellipsoid\", null);\n__decorate([\n Deprecated({ new: 'PrimitiveBuilder.create_box' })\n], MeshManager.prototype, \"create_box\", null);\nexport function mark_mesh_dirty_for_lightsystem(light_system, mesh) {\n const bs = mesh.getBoundingInfo();\n const bs_center = bs.boundingSphere.centerWorld;\n const bs_radius = bs.boundingSphere.radiusWorld;\n const bounds = { position: new IVector3(bs_center.x, bs_center.y, bs_center.z), radius: bs_radius };\n if (!mesh.metadata) {\n mesh.metadata = {};\n }\n const prev_bounds = mesh.metadata.previous_bounds ? mesh.metadata.previous_bounds : bounds;\n light_system.on_mesh_modified(mesh.uniqueId, prev_bounds, bounds);\n mesh.metadata.previous_bounds = bounds;\n}\n//# sourceMappingURL=MeshManager.js.map","import { mark_material_rendered, is_material_rendered } from './Material.js';\nexport class MaterialFreezingManager {\n constructor(scene, _freezing_allowed) {\n this.scene = scene;\n this._freezing_allowed = _freezing_allowed;\n this._all_materials_dirty = false;\n this._dirty = new Set();\n this._unfrozen = new Set();\n this._on_new_light_added = null;\n this._on_light_removed = null;\n this._on_geometry_added = null;\n this._on_geometry_removed = null;\n this._on_mesh_added = null;\n this._on_texture_added = null;\n this._on_before_render = null;\n this._on_material_added = null;\n this._on_material_removed = null;\n this._material_to_on_on_material_bound = new Map();\n this._enabled = true;\n this.mark_materials_dirty = () => {\n this._all_materials_dirty = true;\n };\n if (this._enabled) {\n this.add_observables();\n }\n }\n add_observables() {\n this._on_new_light_added = this.scene.onNewLightAddedObservable.add(this.mark_materials_dirty);\n this._on_light_removed = this.scene.onLightRemovedObservable.add(this.mark_materials_dirty);\n // @Martin Figure out if we can remove any of the following callbacks. Unfreezing everything is expensive.\n this._on_geometry_added = this.scene.onNewGeometryAddedObservable.add(this.mark_materials_dirty);\n this._on_geometry_removed = this.scene.onGeometryRemovedObservable.add(this.mark_materials_dirty);\n this._on_mesh_added = this.scene.onNewMeshAddedObservable.add(this.mark_materials_dirty);\n this._on_texture_added = this.scene.onNewTextureAddedObservable.add(this.mark_materials_dirty);\n this._on_material_added = this.scene.onNewMaterialAddedObservable.add((material) => {\n this.on_new_material_added(material);\n });\n this._on_material_removed = this.scene.onMaterialRemovedObservable.add((material) => {\n this._material_to_on_on_material_bound.delete(material);\n });\n this._on_before_render = this.scene.onBeforeRenderObservable.add(() => {\n this.process_material_freezing();\n });\n }\n on_new_material_added(material) {\n material.onCompiled = () => {\n if (material.isFrozen) {\n this.set_material_dirty(material);\n }\n };\n const on_material_bound = material.onBindObservable.add(() => {\n mark_material_rendered(material);\n });\n this._material_to_on_on_material_bound.set(material, on_material_bound);\n this.set_material_dirty(material);\n }\n set_all_materials_dirty() {\n this._all_materials_dirty = true;\n }\n set_material_dirty(material) {\n if (!this._all_materials_dirty) {\n this._dirty.add(material);\n }\n }\n process_material_freezing() {\n const disable_freezing = this._freezing_allowed();\n if (this._all_materials_dirty) {\n // When all materials are dirty, we unfreeze all frozen materials and clear the dirty set.\n for (const mtl of this.scene.materials) {\n this.unfreeze(mtl);\n }\n this._all_materials_dirty = false;\n this._dirty.clear();\n // We can return early here since we know that we can't freeze any materials yet.\n return;\n }\n for (const material of this._dirty) {\n this.unfreeze(material);\n }\n this._dirty.clear();\n if (!disable_freezing) {\n for (const mtl of this._unfrozen) {\n if (is_material_rendered(mtl)) {\n mtl.freeze();\n this._unfrozen.delete(mtl);\n }\n }\n }\n }\n unfreeze(mtl) {\n if (mtl.isFrozen) {\n mtl.unfreeze();\n }\n mark_material_rendered(mtl, false);\n this._unfrozen.add(mtl);\n }\n get enabled() {\n return this._enabled;\n }\n set enabled(enable) {\n if (enable && !this._enabled) {\n this.add_observables();\n }\n else if (!enable && this._enabled) {\n this.remove_observables();\n }\n this._enabled = enable;\n }\n remove_observables() {\n if (this._on_new_light_added) {\n this.scene.onNewLightAddedObservable.remove(this._on_new_light_added);\n }\n if (this._on_new_light_added) {\n this.scene.onLightRemovedObservable.remove(this._on_new_light_added);\n }\n // @Martin Figure out if we can remove any of the following callbacks. Unfreezing everything is expensive.\n if (this._on_geometry_added) {\n this.scene.onNewGeometryAddedObservable.remove(this._on_geometry_added);\n }\n if (this._on_geometry_removed) {\n this.scene.onGeometryRemovedObservable.remove(this._on_geometry_removed);\n }\n if (this._on_mesh_added) {\n this.scene.onNewMeshAddedObservable.remove(this._on_mesh_added);\n }\n if (this._on_texture_added) {\n this.scene.onNewTextureAddedObservable.remove(this._on_texture_added);\n }\n if (this._on_material_added) {\n this.scene.onNewMaterialAddedObservable.remove(this._on_material_added);\n }\n if (this._on_material_removed) {\n this.scene.onMaterialRemovedObservable.remove(this._on_material_removed);\n }\n if (this._on_before_render) {\n this.scene.onBeforeRenderObservable.remove(this._on_before_render);\n }\n this._material_to_on_on_material_bound.forEach((callback, material) => {\n material.onCompiled = null;\n material.onBindObservable.remove(callback);\n });\n this._freezing_allowed = () => true;\n this._all_materials_dirty = true;\n this.process_material_freezing();\n }\n}\n//# sourceMappingURL=MaterialFreezingManager.js.map","import { Animation } from \"./animation.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { Tags } from \"../Misc/tags.js\";\n/**\n * This class defines the direct association between an animation and a target\n */\nexport class TargetedAnimation {\n /**\n * Returns the string \"TargetedAnimation\"\n * @returns \"TargetedAnimation\"\n */\n getClassName() {\n return \"TargetedAnimation\";\n }\n /**\n * Serialize the object\n * @returns the JSON object representing the current entity\n */\n serialize() {\n const serializationObject = {};\n serializationObject.animation = this.animation.serialize();\n serializationObject.targetId = this.target.id;\n return serializationObject;\n }\n}\n/**\n * Use this class to create coordinated animations on multiple targets\n */\nexport class AnimationGroup {\n /**\n * Makes sure that the animations are either played or stopped according to the animation group mask.\n * Note however that the call won't have any effect if the animation group has not been started yet.\n * You should call this function if you modify the mask after the animation group has been started.\n */\n syncWithMask() {\n if (!this.mask) {\n this._numActiveAnimatables = this._targetedAnimations.length;\n return;\n }\n this._numActiveAnimatables = 0;\n for (let i = 0; i < this._animatables.length; ++i) {\n const animatable = this._animatables[i];\n if (this.mask.retainsTarget(animatable.target.name)) {\n this._numActiveAnimatables++;\n if (animatable.paused) {\n animatable.restart();\n }\n }\n else {\n if (!animatable.paused) {\n animatable.pause();\n }\n }\n }\n }\n /**\n * Removes all animations for the targets not retained by the animation group mask.\n * Use this function if you know you won't need those animations anymore and if you want to free memory.\n */\n removeUnmaskedAnimations() {\n if (!this.mask) {\n return;\n }\n // Removes all animatables (in case the animation group has already been started)\n for (let i = 0; i < this._animatables.length; ++i) {\n const animatable = this._animatables[i];\n if (!this.mask.retainsTarget(animatable.target.name)) {\n animatable.stop();\n this._animatables.splice(i, 1);\n --i;\n }\n }\n // Removes the targeted animations\n for (let index = 0; index < this._targetedAnimations.length; index++) {\n const targetedAnimation = this._targetedAnimations[index];\n if (!this.mask.retainsTarget(targetedAnimation.target.name)) {\n this._targetedAnimations.splice(index, 1);\n --index;\n }\n }\n }\n /**\n * Gets the first frame\n */\n get from() {\n return this._from;\n }\n /**\n * Gets the last frame\n */\n get to() {\n return this._to;\n }\n /**\n * Define if the animations are started\n */\n get isStarted() {\n return this._isStarted;\n }\n /**\n * Gets a value indicating that the current group is playing\n */\n get isPlaying() {\n return this._isStarted && !this._isPaused;\n }\n /**\n * Gets or sets the speed ratio to use for all animations\n */\n get speedRatio() {\n return this._speedRatio;\n }\n /**\n * Gets or sets the speed ratio to use for all animations\n */\n set speedRatio(value) {\n if (this._speedRatio === value) {\n return;\n }\n this._speedRatio = value;\n for (let index = 0; index < this._animatables.length; index++) {\n const animatable = this._animatables[index];\n animatable.speedRatio = this._speedRatio;\n }\n }\n /**\n * Gets or sets if all animations should loop or not\n */\n get loopAnimation() {\n return this._loopAnimation;\n }\n set loopAnimation(value) {\n if (this._loopAnimation === value) {\n return;\n }\n this._loopAnimation = value;\n for (let index = 0; index < this._animatables.length; index++) {\n const animatable = this._animatables[index];\n animatable.loopAnimation = this._loopAnimation;\n }\n }\n /**\n * Gets or sets if all animations should be evaluated additively\n */\n get isAdditive() {\n return this._isAdditive;\n }\n set isAdditive(value) {\n if (this._isAdditive === value) {\n return;\n }\n this._isAdditive = value;\n for (let index = 0; index < this._animatables.length; index++) {\n const animatable = this._animatables[index];\n animatable.isAdditive = this._isAdditive;\n }\n }\n /**\n * Gets or sets the weight to apply to all animations of the group\n */\n get weight() {\n return this._weight;\n }\n set weight(value) {\n if (this._weight === value) {\n return;\n }\n this._weight = value;\n this.setWeightForAllAnimatables(this._weight);\n }\n /**\n * Gets the targeted animations for this animation group\n */\n get targetedAnimations() {\n return this._targetedAnimations;\n }\n /**\n * returning the list of animatables controlled by this animation group.\n */\n get animatables() {\n return this._animatables;\n }\n /**\n * Gets the list of target animations\n */\n get children() {\n return this._targetedAnimations;\n }\n /**\n * Gets or sets the order of play of the animation group (default: 0)\n */\n get playOrder() {\n return this._playOrder;\n }\n set playOrder(value) {\n if (this._playOrder === value) {\n return;\n }\n this._playOrder = value;\n if (this._animatables.length > 0) {\n for (let i = 0; i < this._animatables.length; i++) {\n this._animatables[i].playOrder = this._playOrder;\n }\n this._scene.sortActiveAnimatables();\n }\n }\n /**\n * Allows the animations of the animation group to blend with current running animations\n * Note that a null value means that each animation will use their own existing blending configuration (Animation.enableBlending)\n */\n get enableBlending() {\n return this._enableBlending;\n }\n set enableBlending(value) {\n if (this._enableBlending === value) {\n return;\n }\n this._enableBlending = value;\n if (value !== null) {\n for (let i = 0; i < this._targetedAnimations.length; ++i) {\n this._targetedAnimations[i].animation.enableBlending = value;\n }\n }\n }\n /**\n * Gets or sets the animation blending speed\n * Note that a null value means that each animation will use their own existing blending configuration (Animation.blendingSpeed)\n */\n get blendingSpeed() {\n return this._blendingSpeed;\n }\n set blendingSpeed(value) {\n if (this._blendingSpeed === value) {\n return;\n }\n this._blendingSpeed = value;\n if (value !== null) {\n for (let i = 0; i < this._targetedAnimations.length; ++i) {\n this._targetedAnimations[i].animation.blendingSpeed = value;\n }\n }\n }\n /**\n * Gets the length (in seconds) of the animation group\n * This function assumes that all animations are played at the same framePerSecond speed!\n * Note: you can only call this method after you've added at least one targeted animation!\n * @param from Starting frame range (default is AnimationGroup.from)\n * @param to Ending frame range (default is AnimationGroup.to)\n * @returns The length in seconds\n */\n getLength(from, to) {\n from = from !== null && from !== void 0 ? from : this._from;\n to = to !== null && to !== void 0 ? to : this._to;\n const fps = this.targetedAnimations[0].animation.framePerSecond * this._speedRatio;\n return (to - from) / fps;\n }\n /**\n * Merge the array of animation groups into a new animation group\n * @param animationGroups List of animation groups to merge\n * @param disposeSource If true, animation groups will be disposed after being merged (default: true)\n * @param normalize If true, animation groups will be normalized before being merged, so that all animations have the same \"from\" and \"to\" frame (default: false)\n * @param weight Weight for the new animation group. If not provided, it will inherit the weight from the first animation group of the array\n * @returns The new animation group or null if no animation groups were passed\n */\n static MergeAnimationGroups(animationGroups, disposeSource = true, normalize = false, weight) {\n if (animationGroups.length === 0) {\n return null;\n }\n weight = weight !== null && weight !== void 0 ? weight : animationGroups[0].weight;\n let beginFrame = Number.MAX_VALUE;\n let endFrame = -Number.MAX_VALUE;\n if (normalize) {\n for (const animationGroup of animationGroups) {\n if (animationGroup.from < beginFrame) {\n beginFrame = animationGroup.from;\n }\n if (animationGroup.to > endFrame) {\n endFrame = animationGroup.to;\n }\n }\n }\n const mergedAnimationGroup = new AnimationGroup(animationGroups[0].name + \"_merged\", animationGroups[0]._scene, weight);\n for (const animationGroup of animationGroups) {\n if (normalize) {\n animationGroup.normalize(beginFrame, endFrame);\n }\n for (const targetedAnimation of animationGroup.targetedAnimations) {\n mergedAnimationGroup.addTargetedAnimation(targetedAnimation.animation, targetedAnimation.target);\n }\n if (disposeSource) {\n animationGroup.dispose();\n }\n }\n return mergedAnimationGroup;\n }\n /**\n * Instantiates a new Animation Group.\n * This helps managing several animations at once.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/groupAnimations\n * @param name Defines the name of the group\n * @param scene Defines the scene the group belongs to\n * @param weight Defines the weight to use for animations in the group (-1.0 by default, meaning \"no weight\")\n * @param playOrder Defines the order of play of the animation group (default is 0)\n */\n constructor(\n /** The name of the animation group */\n name, scene = null, weight = -1, playOrder = 0) {\n this.name = name;\n this._targetedAnimations = new Array();\n this._animatables = new Array();\n this._from = Number.MAX_VALUE;\n this._to = -Number.MAX_VALUE;\n this._speedRatio = 1;\n this._loopAnimation = false;\n this._isAdditive = false;\n this._weight = -1;\n this._playOrder = 0;\n this._enableBlending = null;\n this._blendingSpeed = null;\n this._numActiveAnimatables = 0;\n /** @internal */\n this._parentContainer = null;\n /**\n * This observable will notify when one animation have ended\n */\n this.onAnimationEndObservable = new Observable();\n /**\n * Observer raised when one animation loops\n */\n this.onAnimationLoopObservable = new Observable();\n /**\n * Observer raised when all animations have looped\n */\n this.onAnimationGroupLoopObservable = new Observable();\n /**\n * This observable will notify when all animations have ended.\n */\n this.onAnimationGroupEndObservable = new Observable();\n /**\n * This observable will notify when all animations have paused.\n */\n this.onAnimationGroupPauseObservable = new Observable();\n /**\n * This observable will notify when all animations are playing.\n */\n this.onAnimationGroupPlayObservable = new Observable();\n /**\n * Gets or sets an object used to store user defined information for the node\n */\n this.metadata = null;\n this._animationLoopFlags = [];\n this._scene = scene || EngineStore.LastCreatedScene;\n this._weight = weight;\n this._playOrder = playOrder;\n this.uniqueId = this._scene.getUniqueId();\n this._scene.addAnimationGroup(this);\n }\n /**\n * Add an animation (with its target) in the group\n * @param animation defines the animation we want to add\n * @param target defines the target of the animation\n * @returns the TargetedAnimation object\n */\n addTargetedAnimation(animation, target) {\n const targetedAnimation = new TargetedAnimation();\n targetedAnimation.animation = animation;\n targetedAnimation.target = target;\n const keys = animation.getKeys();\n if (this._from > keys[0].frame) {\n this._from = keys[0].frame;\n }\n if (this._to < keys[keys.length - 1].frame) {\n this._to = keys[keys.length - 1].frame;\n }\n if (this._enableBlending !== null) {\n animation.enableBlending = this._enableBlending;\n }\n if (this._blendingSpeed !== null) {\n animation.blendingSpeed = this._blendingSpeed;\n }\n this._targetedAnimations.push(targetedAnimation);\n return targetedAnimation;\n }\n /**\n * Remove an animation from the group\n * @param animation defines the animation we want to remove\n */\n removeTargetedAnimation(animation) {\n for (let index = this._targetedAnimations.length - 1; index > -1; index--) {\n const targetedAnimation = this._targetedAnimations[index];\n if (targetedAnimation.animation === animation) {\n this._targetedAnimations.splice(index, 1);\n }\n }\n }\n /**\n * This function will normalize every animation in the group to make sure they all go from beginFrame to endFrame\n * It can add constant keys at begin or end\n * @param beginFrame defines the new begin frame for all animations or the smallest begin frame of all animations if null (defaults to null)\n * @param endFrame defines the new end frame for all animations or the largest end frame of all animations if null (defaults to null)\n * @returns the animation group\n */\n normalize(beginFrame = null, endFrame = null) {\n if (beginFrame == null) {\n beginFrame = this._from;\n }\n if (endFrame == null) {\n endFrame = this._to;\n }\n for (let index = 0; index < this._targetedAnimations.length; index++) {\n const targetedAnimation = this._targetedAnimations[index];\n const keys = targetedAnimation.animation.getKeys();\n const startKey = keys[0];\n const endKey = keys[keys.length - 1];\n if (startKey.frame > beginFrame) {\n const newKey = {\n frame: beginFrame,\n value: startKey.value,\n inTangent: startKey.inTangent,\n outTangent: startKey.outTangent,\n interpolation: startKey.interpolation,\n };\n keys.splice(0, 0, newKey);\n }\n if (endKey.frame < endFrame) {\n const newKey = {\n frame: endFrame,\n value: endKey.value,\n inTangent: endKey.inTangent,\n outTangent: endKey.outTangent,\n interpolation: endKey.interpolation,\n };\n keys.push(newKey);\n }\n }\n this._from = beginFrame;\n this._to = endFrame;\n return this;\n }\n _processLoop(animatable, targetedAnimation, index) {\n animatable.onAnimationLoop = () => {\n this.onAnimationLoopObservable.notifyObservers(targetedAnimation);\n if (this._animationLoopFlags[index]) {\n return;\n }\n this._animationLoopFlags[index] = true;\n this._animationLoopCount++;\n if (this._animationLoopCount === this._numActiveAnimatables) {\n this.onAnimationGroupLoopObservable.notifyObservers(this);\n this._animationLoopCount = 0;\n this._animationLoopFlags.length = 0;\n }\n };\n }\n /**\n * Start all animations on given targets\n * @param loop defines if animations must loop\n * @param speedRatio defines the ratio to apply to animation speed (1 by default)\n * @param from defines the from key (optional)\n * @param to defines the to key (optional)\n * @param isAdditive defines the additive state for the resulting animatables (optional)\n * @returns the current animation group\n */\n start(loop = false, speedRatio = 1, from, to, isAdditive) {\n if (this._isStarted || this._targetedAnimations.length === 0) {\n return this;\n }\n this._loopAnimation = loop;\n this._animationLoopCount = 0;\n this._animationLoopFlags.length = 0;\n for (let index = 0; index < this._targetedAnimations.length; index++) {\n const targetedAnimation = this._targetedAnimations[index];\n const animatable = this._scene.beginDirectAnimation(targetedAnimation.target, [targetedAnimation.animation], from !== undefined ? from : this._from, to !== undefined ? to : this._to, loop, speedRatio, undefined, undefined, isAdditive !== undefined ? isAdditive : this._isAdditive);\n animatable.weight = this._weight;\n animatable.playOrder = this._playOrder;\n animatable.onAnimationEnd = () => {\n this.onAnimationEndObservable.notifyObservers(targetedAnimation);\n this._checkAnimationGroupEnded(animatable);\n };\n this._processLoop(animatable, targetedAnimation, index);\n this._animatables.push(animatable);\n }\n this.syncWithMask();\n this._scene.sortActiveAnimatables();\n this._speedRatio = speedRatio;\n this._isStarted = true;\n this._isPaused = false;\n this.onAnimationGroupPlayObservable.notifyObservers(this);\n return this;\n }\n /**\n * Pause all animations\n * @returns the animation group\n */\n pause() {\n if (!this._isStarted) {\n return this;\n }\n this._isPaused = true;\n for (let index = 0; index < this._animatables.length; index++) {\n const animatable = this._animatables[index];\n animatable.pause();\n }\n this.onAnimationGroupPauseObservable.notifyObservers(this);\n return this;\n }\n /**\n * Play all animations to initial state\n * This function will start() the animations if they were not started or will restart() them if they were paused\n * @param loop defines if animations must loop\n * @returns the animation group\n */\n play(loop) {\n // only if all animatables are ready and exist\n if (this.isStarted && this._animatables.length === this._targetedAnimations.length) {\n if (loop !== undefined) {\n this.loopAnimation = loop;\n }\n this.restart();\n }\n else {\n this.stop();\n this.start(loop, this._speedRatio);\n }\n this._isPaused = false;\n return this;\n }\n /**\n * Reset all animations to initial state\n * @returns the animation group\n */\n reset() {\n if (!this._isStarted) {\n this.play();\n this.goToFrame(0);\n this.stop();\n return this;\n }\n for (let index = 0; index < this._animatables.length; index++) {\n const animatable = this._animatables[index];\n animatable.reset();\n }\n return this;\n }\n /**\n * Restart animations from key 0\n * @returns the animation group\n */\n restart() {\n if (!this._isStarted) {\n return this;\n }\n for (let index = 0; index < this._animatables.length; index++) {\n const animatable = this._animatables[index];\n animatable.restart();\n }\n this.onAnimationGroupPlayObservable.notifyObservers(this);\n return this;\n }\n /**\n * Stop all animations\n * @returns the animation group\n */\n stop() {\n if (!this._isStarted) {\n return this;\n }\n const list = this._animatables.slice();\n for (let index = 0; index < list.length; index++) {\n list[index].stop(undefined, undefined, true);\n }\n // We will take care of removing all stopped animatables\n let curIndex = 0;\n for (let index = 0; index < this._scene._activeAnimatables.length; index++) {\n const animatable = this._scene._activeAnimatables[index];\n if (animatable._runtimeAnimations.length > 0) {\n this._scene._activeAnimatables[curIndex++] = animatable;\n }\n }\n this._scene._activeAnimatables.length = curIndex;\n this._isStarted = false;\n return this;\n }\n /**\n * Set animation weight for all animatables\n *\n * @since 6.12.4\n * You can pass the weight to the AnimationGroup constructor, or use the weight property to set it after the group has been created,\n * making it easier to define the overall animation weight than calling setWeightForAllAnimatables() after the animation group has been started\n * @param weight defines the weight to use\n * @returns the animationGroup\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-weights\n */\n setWeightForAllAnimatables(weight) {\n for (let index = 0; index < this._animatables.length; index++) {\n const animatable = this._animatables[index];\n animatable.weight = weight;\n }\n return this;\n }\n /**\n * Synchronize and normalize all animatables with a source animatable\n * @param root defines the root animatable to synchronize with (null to stop synchronizing)\n * @returns the animationGroup\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-weights\n */\n syncAllAnimationsWith(root) {\n for (let index = 0; index < this._animatables.length; index++) {\n const animatable = this._animatables[index];\n animatable.syncWith(root);\n }\n return this;\n }\n /**\n * Goes to a specific frame in this animation group\n * @param frame the frame number to go to\n * @returns the animationGroup\n */\n goToFrame(frame) {\n if (!this._isStarted) {\n return this;\n }\n for (let index = 0; index < this._animatables.length; index++) {\n const animatable = this._animatables[index];\n animatable.goToFrame(frame);\n }\n return this;\n }\n /**\n * Dispose all associated resources\n */\n dispose() {\n this._targetedAnimations.length = 0;\n this._animatables.length = 0;\n // Remove from scene\n const index = this._scene.animationGroups.indexOf(this);\n if (index > -1) {\n this._scene.animationGroups.splice(index, 1);\n }\n if (this._parentContainer) {\n const index = this._parentContainer.animationGroups.indexOf(this);\n if (index > -1) {\n this._parentContainer.animationGroups.splice(index, 1);\n }\n this._parentContainer = null;\n }\n this.onAnimationEndObservable.clear();\n this.onAnimationGroupEndObservable.clear();\n this.onAnimationGroupPauseObservable.clear();\n this.onAnimationGroupPlayObservable.clear();\n this.onAnimationLoopObservable.clear();\n this.onAnimationGroupLoopObservable.clear();\n }\n _checkAnimationGroupEnded(animatable) {\n // animatable should be taken out of the array\n const idx = this._animatables.indexOf(animatable);\n if (idx > -1) {\n this._animatables.splice(idx, 1);\n }\n // all animatables were removed? animation group ended!\n if (this._animatables.length === 0) {\n this._isStarted = false;\n this.onAnimationGroupEndObservable.notifyObservers(this);\n }\n }\n /**\n * Clone the current animation group and returns a copy\n * @param newName defines the name of the new group\n * @param targetConverter defines an optional function used to convert current animation targets to new ones\n * @param cloneAnimations defines if the animations should be cloned or referenced\n * @returns the new animation group\n */\n clone(newName, targetConverter, cloneAnimations = false) {\n const newGroup = new AnimationGroup(newName || this.name, this._scene, this._weight, this._playOrder);\n newGroup._from = this.from;\n newGroup._to = this.to;\n newGroup._speedRatio = this.speedRatio;\n newGroup._loopAnimation = this.loopAnimation;\n newGroup._isAdditive = this.isAdditive;\n newGroup._enableBlending = this.enableBlending;\n newGroup._blendingSpeed = this.blendingSpeed;\n newGroup.metadata = this.metadata;\n newGroup.mask = this.mask;\n for (const targetAnimation of this._targetedAnimations) {\n newGroup.addTargetedAnimation(cloneAnimations ? targetAnimation.animation.clone() : targetAnimation.animation, targetConverter ? targetConverter(targetAnimation.target) : targetAnimation.target);\n }\n return newGroup;\n }\n /**\n * Serializes the animationGroup to an object\n * @returns Serialized object\n */\n serialize() {\n const serializationObject = {};\n serializationObject.name = this.name;\n serializationObject.from = this.from;\n serializationObject.to = this.to;\n serializationObject.speedRatio = this.speedRatio;\n serializationObject.loopAnimation = this.loopAnimation;\n serializationObject.isAdditive = this.isAdditive;\n serializationObject.weight = this.weight;\n serializationObject.playOrder = this.playOrder;\n serializationObject.enableBlending = this.enableBlending;\n serializationObject.blendingSpeed = this.blendingSpeed;\n serializationObject.targetedAnimations = [];\n for (let targetedAnimationIndex = 0; targetedAnimationIndex < this.targetedAnimations.length; targetedAnimationIndex++) {\n const targetedAnimation = this.targetedAnimations[targetedAnimationIndex];\n serializationObject.targetedAnimations[targetedAnimationIndex] = targetedAnimation.serialize();\n }\n if (Tags && Tags.HasTags(this)) {\n serializationObject.tags = Tags.GetTags(this);\n }\n // Metadata\n if (this.metadata) {\n serializationObject.metadata = this.metadata;\n }\n return serializationObject;\n }\n // Statics\n /**\n * Returns a new AnimationGroup object parsed from the source provided.\n * @param parsedAnimationGroup defines the source\n * @param scene defines the scene that will receive the animationGroup\n * @returns a new AnimationGroup\n */\n static Parse(parsedAnimationGroup, scene) {\n const animationGroup = new AnimationGroup(parsedAnimationGroup.name, scene, parsedAnimationGroup.weight, parsedAnimationGroup.playOrder);\n for (let i = 0; i < parsedAnimationGroup.targetedAnimations.length; i++) {\n const targetedAnimation = parsedAnimationGroup.targetedAnimations[i];\n const animation = Animation.Parse(targetedAnimation.animation);\n const id = targetedAnimation.targetId;\n if (targetedAnimation.animation.property === \"influence\") {\n // morph target animation\n const morphTarget = scene.getMorphTargetById(id);\n if (morphTarget) {\n animationGroup.addTargetedAnimation(animation, morphTarget);\n }\n }\n else {\n const targetNode = scene.getNodeById(id);\n if (targetNode != null) {\n animationGroup.addTargetedAnimation(animation, targetNode);\n }\n }\n }\n if (Tags) {\n Tags.AddTagsTo(animationGroup, parsedAnimationGroup.tags);\n }\n if (parsedAnimationGroup.from !== null && parsedAnimationGroup.to !== null) {\n animationGroup.normalize(parsedAnimationGroup.from, parsedAnimationGroup.to);\n }\n if (parsedAnimationGroup.speedRatio !== undefined) {\n animationGroup._speedRatio = parsedAnimationGroup.speedRatio;\n }\n if (parsedAnimationGroup.loopAnimation !== undefined) {\n animationGroup._loopAnimation = parsedAnimationGroup.loopAnimation;\n }\n if (parsedAnimationGroup.isAdditive !== undefined) {\n animationGroup._isAdditive = parsedAnimationGroup.isAdditive;\n }\n if (parsedAnimationGroup.weight !== undefined) {\n animationGroup._weight = parsedAnimationGroup.weight;\n }\n if (parsedAnimationGroup.playOrder !== undefined) {\n animationGroup._playOrder = parsedAnimationGroup.playOrder;\n }\n if (parsedAnimationGroup.enableBlending !== undefined) {\n animationGroup._enableBlending = parsedAnimationGroup.enableBlending;\n }\n if (parsedAnimationGroup.blendingSpeed !== undefined) {\n animationGroup._blendingSpeed = parsedAnimationGroup.blendingSpeed;\n }\n if (parsedAnimationGroup.metadata !== undefined) {\n animationGroup.metadata = parsedAnimationGroup.metadata;\n }\n return animationGroup;\n }\n /** @internal */\n static MakeAnimationAdditive(sourceAnimationGroup, referenceFrameOrOptions, range, cloneOriginal = false, clonedName) {\n let options;\n if (typeof referenceFrameOrOptions === \"object\") {\n options = referenceFrameOrOptions;\n }\n else {\n options = {\n referenceFrame: referenceFrameOrOptions,\n range: range,\n cloneOriginalAnimationGroup: cloneOriginal,\n clonedAnimationName: clonedName,\n };\n }\n let animationGroup = sourceAnimationGroup;\n if (options.cloneOriginalAnimationGroup) {\n animationGroup = sourceAnimationGroup.clone(options.clonedAnimationGroupName || animationGroup.name);\n }\n const targetedAnimations = animationGroup.targetedAnimations;\n for (let index = 0; index < targetedAnimations.length; index++) {\n const targetedAnimation = targetedAnimations[index];\n targetedAnimation.animation = Animation.MakeAnimationAdditive(targetedAnimation.animation, options);\n }\n animationGroup.isAdditive = true;\n if (options.clipKeys) {\n // We need to recalculate the from/to frames for the animation group because some keys may have been removed\n let from = Number.MAX_VALUE;\n let to = -Number.MAX_VALUE;\n const targetedAnimations = animationGroup.targetedAnimations;\n for (let index = 0; index < targetedAnimations.length; index++) {\n const targetedAnimation = targetedAnimations[index];\n const animation = targetedAnimation.animation;\n const keys = animation.getKeys();\n if (from > keys[0].frame) {\n from = keys[0].frame;\n }\n if (to < keys[keys.length - 1].frame) {\n to = keys[keys.length - 1].frame;\n }\n }\n animationGroup._from = from;\n animationGroup._to = to;\n }\n return animationGroup;\n }\n /**\n * Creates a new animation, keeping only the keys that are inside a given key range\n * @param sourceAnimationGroup defines the animation group on which to operate\n * @param fromKey defines the lower bound of the range\n * @param toKey defines the upper bound of the range\n * @param name defines the name of the new animation group. If not provided, use the same name as animationGroup\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the keys. Default is false, so animations will be cloned\n * @returns a new animation group stripped from all the keys outside the given range\n */\n static ClipKeys(sourceAnimationGroup, fromKey, toKey, name, dontCloneAnimations) {\n const animationGroup = sourceAnimationGroup.clone(name || sourceAnimationGroup.name);\n return AnimationGroup.ClipKeysInPlace(animationGroup, fromKey, toKey, dontCloneAnimations);\n }\n /**\n * Updates an existing animation, keeping only the keys that are inside a given key range\n * @param animationGroup defines the animation group on which to operate\n * @param fromKey defines the lower bound of the range\n * @param toKey defines the upper bound of the range\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the keys. Default is false, so animations will be cloned\n * @returns the animationGroup stripped from all the keys outside the given range\n */\n static ClipKeysInPlace(animationGroup, fromKey, toKey, dontCloneAnimations) {\n return AnimationGroup.ClipInPlace(animationGroup, fromKey, toKey, dontCloneAnimations, false);\n }\n /**\n * Creates a new animation, keeping only the frames that are inside a given frame range\n * @param sourceAnimationGroup defines the animation group on which to operate\n * @param fromFrame defines the lower bound of the range\n * @param toFrame defines the upper bound of the range\n * @param name defines the name of the new animation group. If not provided, use the same name as animationGroup\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the frames. Default is false, so animations will be cloned\n * @returns a new animation group stripped from all the frames outside the given range\n */\n static ClipFrames(sourceAnimationGroup, fromFrame, toFrame, name, dontCloneAnimations) {\n const animationGroup = sourceAnimationGroup.clone(name || sourceAnimationGroup.name);\n return AnimationGroup.ClipFramesInPlace(animationGroup, fromFrame, toFrame, dontCloneAnimations);\n }\n /**\n * Updates an existing animation, keeping only the frames that are inside a given frame range\n * @param animationGroup defines the animation group on which to operate\n * @param fromFrame defines the lower bound of the range\n * @param toFrame defines the upper bound of the range\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the frames. Default is false, so animations will be cloned\n * @returns the animationGroup stripped from all the frames outside the given range\n */\n static ClipFramesInPlace(animationGroup, fromFrame, toFrame, dontCloneAnimations) {\n return AnimationGroup.ClipInPlace(animationGroup, fromFrame, toFrame, dontCloneAnimations, true);\n }\n /**\n * Updates an existing animation, keeping only the keys that are inside a given key or frame range\n * @param animationGroup defines the animation group on which to operate\n * @param start defines the lower bound of the range\n * @param end defines the upper bound of the range\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the keys. Default is false, so animations will be cloned\n * @param useFrame defines if the range is defined by frame numbers or key indices (default is false which means use key indices)\n * @returns the animationGroup stripped from all the keys outside the given range\n */\n static ClipInPlace(animationGroup, start, end, dontCloneAnimations, useFrame = false) {\n let from = Number.MAX_VALUE;\n let to = -Number.MAX_VALUE;\n const targetedAnimations = animationGroup.targetedAnimations;\n for (let index = 0; index < targetedAnimations.length; index++) {\n const targetedAnimation = targetedAnimations[index];\n const animation = dontCloneAnimations ? targetedAnimation.animation : targetedAnimation.animation.clone();\n if (useFrame) {\n // Make sure we have keys corresponding to the bounds of the frame range\n animation.createKeyForFrame(start);\n animation.createKeyForFrame(end);\n }\n const keys = animation.getKeys();\n const newKeys = [];\n let startFrame = Number.MAX_VALUE;\n for (let k = 0; k < keys.length; k++) {\n const key = keys[k];\n if ((!useFrame && k >= start && k <= end) || (useFrame && key.frame >= start && key.frame <= end)) {\n const newKey = {\n frame: key.frame,\n value: key.value.clone ? key.value.clone() : key.value,\n inTangent: key.inTangent,\n outTangent: key.outTangent,\n interpolation: key.interpolation,\n lockedTangent: key.lockedTangent,\n };\n if (startFrame === Number.MAX_VALUE) {\n startFrame = newKey.frame;\n }\n newKey.frame -= startFrame;\n newKeys.push(newKey);\n }\n }\n if (newKeys.length === 0) {\n targetedAnimations.splice(index, 1);\n index--;\n continue;\n }\n if (from > newKeys[0].frame) {\n from = newKeys[0].frame;\n }\n if (to < newKeys[newKeys.length - 1].frame) {\n to = newKeys[newKeys.length - 1].frame;\n }\n animation.setKeys(newKeys, true);\n targetedAnimation.animation = animation; // in case the animation has been cloned\n }\n animationGroup._from = from;\n animationGroup._to = to;\n return animationGroup;\n }\n /**\n * Returns the string \"AnimationGroup\"\n * @returns \"AnimationGroup\"\n */\n getClassName() {\n return \"AnimationGroup\";\n }\n /**\n * Creates a detailed string about the object\n * @param fullDetails defines if the output string will support multiple levels of logging within scene loading\n * @returns a string representing the object\n */\n toString(fullDetails) {\n let ret = \"Name: \" + this.name;\n ret += \", type: \" + this.getClassName();\n if (fullDetails) {\n ret += \", from: \" + this._from;\n ret += \", to: \" + this._to;\n ret += \", isStarted: \" + this._isStarted;\n ret += \", speedRatio: \" + this._speedRatio;\n ret += \", targetedAnimations length: \" + this._targetedAnimations.length;\n ret += \", animatables length: \" + this._animatables;\n }\n return ret;\n }\n}\n//# sourceMappingURL=animationGroup.js.map","import { BezierCurve } from \"../Maths/math.path.js\";\n/**\n * Base class used for every default easing function.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class EasingFunction {\n constructor() {\n this._easingMode = EasingFunction.EASINGMODE_EASEIN;\n }\n /**\n * Sets the easing mode of the current function.\n * @param easingMode Defines the willing mode (EASINGMODE_EASEIN, EASINGMODE_EASEOUT or EASINGMODE_EASEINOUT)\n */\n setEasingMode(easingMode) {\n const n = Math.min(Math.max(easingMode, 0), 2);\n this._easingMode = n;\n }\n /**\n * Gets the current easing mode.\n * @returns the easing mode\n */\n getEasingMode() {\n return this._easingMode;\n }\n /**\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n easeInCore(gradient) {\n throw new Error(\"You must implement this method\");\n }\n /**\n * Given an input gradient between 0 and 1, this returns the corresponding value\n * of the easing function.\n * @param gradient Defines the value between 0 and 1 we want the easing value for\n * @returns the corresponding value on the curve defined by the easing function\n */\n ease(gradient) {\n switch (this._easingMode) {\n case EasingFunction.EASINGMODE_EASEIN:\n return this.easeInCore(gradient);\n case EasingFunction.EASINGMODE_EASEOUT:\n return 1 - this.easeInCore(1 - gradient);\n }\n if (gradient >= 0.5) {\n return (1 - this.easeInCore((1 - gradient) * 2)) * 0.5 + 0.5;\n }\n return this.easeInCore(gradient * 2) * 0.5;\n }\n}\n/**\n * Interpolation follows the mathematical formula associated with the easing function.\n */\nEasingFunction.EASINGMODE_EASEIN = 0;\n/**\n * Interpolation follows 100% interpolation minus the output of the formula associated with the easing function.\n */\nEasingFunction.EASINGMODE_EASEOUT = 1;\n/**\n * Interpolation uses EaseIn for the first half of the animation and EaseOut for the second half.\n */\nEasingFunction.EASINGMODE_EASEINOUT = 2;\n/**\n * Easing function with a circle shape (see link below).\n * @see https://easings.net/#easeInCirc\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class CircleEase extends EasingFunction {\n /**\n * @internal\n */\n easeInCore(gradient) {\n gradient = Math.max(0, Math.min(1, gradient));\n return 1.0 - Math.sqrt(1.0 - gradient * gradient);\n }\n}\n/**\n * Easing function with a ease back shape (see link below).\n * @see https://easings.net/#easeInBack\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class BackEase extends EasingFunction {\n /**\n * Instantiates a back ease easing\n * @see https://easings.net/#easeInBack\n * @param amplitude Defines the amplitude of the function\n */\n constructor(\n /** Defines the amplitude of the function */\n amplitude = 1) {\n super();\n this.amplitude = amplitude;\n }\n /**\n * @internal\n */\n easeInCore(gradient) {\n const num = Math.max(0, this.amplitude);\n return Math.pow(gradient, 3.0) - gradient * num * Math.sin(3.1415926535897931 * gradient);\n }\n}\n/**\n * Easing function with a bouncing shape (see link below).\n * @see https://easings.net/#easeInBounce\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class BounceEase extends EasingFunction {\n /**\n * Instantiates a bounce easing\n * @see https://easings.net/#easeInBounce\n * @param bounces Defines the number of bounces\n * @param bounciness Defines the amplitude of the bounce\n */\n constructor(\n /** Defines the number of bounces */\n bounces = 3, \n /** Defines the amplitude of the bounce */\n bounciness = 2) {\n super();\n this.bounces = bounces;\n this.bounciness = bounciness;\n }\n /**\n * @internal\n */\n easeInCore(gradient) {\n const y = Math.max(0.0, this.bounces);\n let bounciness = this.bounciness;\n if (bounciness <= 1.0) {\n bounciness = 1.001;\n }\n const num9 = Math.pow(bounciness, y);\n const num5 = 1.0 - bounciness;\n const num4 = (1.0 - num9) / num5 + num9 * 0.5;\n const num15 = gradient * num4;\n const num65 = Math.log(-num15 * (1.0 - bounciness) + 1.0) / Math.log(bounciness);\n const num3 = Math.floor(num65);\n const num13 = num3 + 1.0;\n const num8 = (1.0 - Math.pow(bounciness, num3)) / (num5 * num4);\n const num12 = (1.0 - Math.pow(bounciness, num13)) / (num5 * num4);\n const num7 = (num8 + num12) * 0.5;\n const num6 = gradient - num7;\n const num2 = num7 - num8;\n return (-Math.pow(1.0 / bounciness, y - num3) / (num2 * num2)) * (num6 - num2) * (num6 + num2);\n }\n}\n/**\n * Easing function with a power of 3 shape (see link below).\n * @see https://easings.net/#easeInCubic\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class CubicEase extends EasingFunction {\n /**\n * @internal\n */\n easeInCore(gradient) {\n return gradient * gradient * gradient;\n }\n}\n/**\n * Easing function with an elastic shape (see link below).\n * @see https://easings.net/#easeInElastic\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class ElasticEase extends EasingFunction {\n /**\n * Instantiates an elastic easing function\n * @see https://easings.net/#easeInElastic\n * @param oscillations Defines the number of oscillations\n * @param springiness Defines the amplitude of the oscillations\n */\n constructor(\n /** Defines the number of oscillations*/\n oscillations = 3, \n /** Defines the amplitude of the oscillations*/\n springiness = 3) {\n super();\n this.oscillations = oscillations;\n this.springiness = springiness;\n }\n /**\n * @internal\n */\n easeInCore(gradient) {\n let num2;\n const num3 = Math.max(0.0, this.oscillations);\n const num = Math.max(0.0, this.springiness);\n if (num == 0) {\n num2 = gradient;\n }\n else {\n num2 = (Math.exp(num * gradient) - 1.0) / (Math.exp(num) - 1.0);\n }\n return num2 * Math.sin((6.2831853071795862 * num3 + 1.5707963267948966) * gradient);\n }\n}\n/**\n * Easing function with an exponential shape (see link below).\n * @see https://easings.net/#easeInExpo\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class ExponentialEase extends EasingFunction {\n /**\n * Instantiates an exponential easing function\n * @see https://easings.net/#easeInExpo\n * @param exponent Defines the exponent of the function\n */\n constructor(\n /** Defines the exponent of the function */\n exponent = 2) {\n super();\n this.exponent = exponent;\n }\n /**\n * @internal\n */\n easeInCore(gradient) {\n if (this.exponent <= 0) {\n return gradient;\n }\n return (Math.exp(this.exponent * gradient) - 1.0) / (Math.exp(this.exponent) - 1.0);\n }\n}\n/**\n * Easing function with a power shape (see link below).\n * @see https://easings.net/#easeInQuad\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class PowerEase extends EasingFunction {\n /**\n * Instantiates an power base easing function\n * @see https://easings.net/#easeInQuad\n * @param power Defines the power of the function\n */\n constructor(\n /** Defines the power of the function */\n power = 2) {\n super();\n this.power = power;\n }\n /**\n * @internal\n */\n easeInCore(gradient) {\n const y = Math.max(0.0, this.power);\n return Math.pow(gradient, y);\n }\n}\n/**\n * Easing function with a power of 2 shape (see link below).\n * @see https://easings.net/#easeInQuad\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class QuadraticEase extends EasingFunction {\n /**\n * @internal\n */\n easeInCore(gradient) {\n return gradient * gradient;\n }\n}\n/**\n * Easing function with a power of 4 shape (see link below).\n * @see https://easings.net/#easeInQuart\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class QuarticEase extends EasingFunction {\n /**\n * @internal\n */\n easeInCore(gradient) {\n return gradient * gradient * gradient * gradient;\n }\n}\n/**\n * Easing function with a power of 5 shape (see link below).\n * @see https://easings.net/#easeInQuint\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class QuinticEase extends EasingFunction {\n /**\n * @internal\n */\n easeInCore(gradient) {\n return gradient * gradient * gradient * gradient * gradient;\n }\n}\n/**\n * Easing function with a sin shape (see link below).\n * @see https://easings.net/#easeInSine\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class SineEase extends EasingFunction {\n /**\n * @internal\n */\n easeInCore(gradient) {\n return 1.0 - Math.sin(1.5707963267948966 * (1.0 - gradient));\n }\n}\n/**\n * Easing function with a bezier shape (see link below).\n * @see http://cubic-bezier.com/#.17,.67,.83,.67\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\n */\nexport class BezierCurveEase extends EasingFunction {\n /**\n * Instantiates a bezier function\n * @see http://cubic-bezier.com/#.17,.67,.83,.67\n * @param x1 Defines the x component of the start tangent in the bezier curve\n * @param y1 Defines the y component of the start tangent in the bezier curve\n * @param x2 Defines the x component of the end tangent in the bezier curve\n * @param y2 Defines the y component of the end tangent in the bezier curve\n */\n constructor(\n /** Defines the x component of the start tangent in the bezier curve */\n x1 = 0, \n /** Defines the y component of the start tangent in the bezier curve */\n y1 = 0, \n /** Defines the x component of the end tangent in the bezier curve */\n x2 = 1, \n /** Defines the y component of the end tangent in the bezier curve */\n y2 = 1) {\n super();\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n }\n /**\n * @internal\n */\n easeInCore(gradient) {\n return BezierCurve.Interpolate(gradient, this.x1, this.y1, this.x2, this.y2);\n }\n}\n//# sourceMappingURL=easing.js.map","import { Vector3 as BABYLON_Vector3, Quaternion as BABYLON_Quaternion } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Animation as BABYLON_Animation } from '@inter-ikea-betrakta-babylonjs/core/Animations/animation.js';\nimport { AnimationGroup as BABYLON_AnimationGroup } from '@inter-ikea-betrakta-babylonjs/core/Animations/animationGroup.js';\nimport { EasingFunction as BABYLON_EasingFunction, CubicEase as BABYLON_CubicEase } from '@inter-ikea-betrakta-babylonjs/core/Animations/easing.js';\nimport { AnimationProperty, AnimationInterpolationFunction } from '../api.js';\nfunction convert_value(value, property) {\n if (property === AnimationProperty.POSITION || property === AnimationProperty.SCALE) {\n return new BABYLON_Vector3(value.x, value.y, value.z);\n }\n if (property === AnimationProperty.ROTATION) {\n return new BABYLON_Quaternion(value.x, value.y, value.z, value.w);\n }\n throw new Error(`AnimationSystem: Can't convert value ${value} for target propert '${property}'.`);\n}\nconst PROPERTY_TO_DATA_TYPE_TABLE = (() => {\n const table = {};\n table[AnimationProperty.POSITION] = BABYLON_Animation.ANIMATIONTYPE_VECTOR3;\n table[AnimationProperty.ROTATION] = BABYLON_Animation.ANIMATIONTYPE_QUATERNION;\n table[AnimationProperty.SCALE] = BABYLON_Animation.ANIMATIONTYPE_VECTOR3;\n return table;\n})();\nconst INTERPOLATION_MODE_TO_EASING_FUNCTION_TABLE = (() => {\n const table = {};\n table[AnimationInterpolationFunction.LINEAR] = null;\n table[AnimationInterpolationFunction.CUBIC] = new BABYLON_CubicEase();\n table[AnimationInterpolationFunction.CUBIC].setEasingMode(BABYLON_EasingFunction.EASINGMODE_EASEINOUT);\n return table;\n})();\nexport class AnimationSystem {\n constructor(scene, viewer_scene) {\n this.scene = scene;\n this.viewer_scene = viewer_scene;\n this._animation_groups = {};\n this._active_animations = 0;\n }\n register_animation(object, animation_group) {\n const count = (this._animation_groups[object] || []).length;\n if (!this._animation_groups[object]) {\n this._animation_groups[object] = [];\n }\n animation_group.onAnimationGroupEndObservable.add(() => {\n this._active_animations -= 1;\n });\n this._animation_groups[object].push(animation_group);\n return count;\n }\n create_animation(object, animation) {\n const babylon_animations = animation.channels.map((ch, idx) => {\n const anim_ch = new BABYLON_Animation(`${animation.name}_ch_${idx}`, ch.target_property, 30, PROPERTY_TO_DATA_TYPE_TABLE[ch.target_property]);\n anim_ch.setKeys(ch.key_frames.map(key => {\n key.value = convert_value(key.value, ch.target_property);\n return key;\n }));\n anim_ch.setEasingFunction(INTERPOLATION_MODE_TO_EASING_FUNCTION_TABLE[ch.interpolation]);\n return anim_ch;\n });\n const count = (this._animation_groups[object] || []).length;\n const group = new BABYLON_AnimationGroup(animation.name || `object_${object}_anim_${count}`, this.scene);\n for (let i = 0; i < babylon_animations.length; i++) {\n // Associate animations with their targets.\n const target_id = animation.channels[i].target === undefined ? object : animation.channels[i].target;\n group.addTargetedAnimation(babylon_animations[i], this.viewer_scene.objects.get(target_id).root);\n }\n return this.register_animation(object, group);\n }\n start_animation(object, animation, from, to) {\n this._animation_groups[object][animation].start(undefined, undefined, from, to);\n this._active_animations += 1;\n }\n stop_animation(object, animation) {\n const frame = this._animation_groups[object][animation].targetedAnimations[0].animation.runtimeAnimations[0].currentFrame;\n this._animation_groups[object][animation].stop();\n return frame;\n }\n animation_running(id, animation_idx) {\n return this._animation_groups[id][animation_idx].isPlaying;\n }\n animations_running() {\n return this._active_animations > 0;\n }\n get_animations(id) {\n return (this._animation_groups[id] || []).map((group, index) => {\n return {\n name: group.name,\n index: index\n };\n });\n }\n delete_animations(object, animations) {\n if (this._animation_groups[object] !== undefined) {\n const object_animations = this._animation_groups[object];\n const new_animations = [];\n for (let i = 0; i < object_animations.length; i++) {\n if (animations.indexOf(i) === -1) {\n new_animations.push(object_animations[i]);\n }\n else if (this.animation_running(object, i)) {\n this.stop_animation(object, i);\n }\n }\n this._animation_groups[object] = new_animations;\n }\n }\n}\n//# sourceMappingURL=AnimationSystem.js.map","/**\n * Implementation of a stack backed by an Array.\n * A stack is a LIFO (last in first out) container\n */\nexport class Stack {\n constructor() {\n this._backing_storage = [];\n }\n get size() {\n return this._backing_storage.length;\n }\n push(value) {\n this._backing_storage.push(value);\n }\n pop() {\n var _a;\n return (_a = this._backing_storage.pop()) !== null && _a !== void 0 ? _a : null;\n }\n peek() {\n var _a;\n return (_a = this._backing_storage[this._backing_storage.length - 1]) !== null && _a !== void 0 ? _a : null;\n }\n contains(value) {\n return this._backing_storage.includes(value);\n }\n clear() {\n this._backing_storage.length = 0;\n }\n}\n//# sourceMappingURL=Stack.js.map","export function linear(t) {\n return t;\n}\nexport function smooth_step(t) {\n return t * t * (3 - 2 * t);\n}\nexport function smoother_step(t) {\n return t * t * t * (t * (t * 6 - 15) + 10);\n}\n//# sourceMappingURL=Interpolation.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { IVector3 } from '../../api.js';\nimport { Vector3 as BABYLON_Vector3, Vector4 as BABYLON_Vector4, Matrix as BABYLON_Matrix } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nexport const aabb_corners = [\n new BABYLON_Vector3(0, 0, 0),\n new BABYLON_Vector3(1, 0, 0),\n new BABYLON_Vector3(0, 1, 0),\n new BABYLON_Vector3(1, 1, 0),\n new BABYLON_Vector3(0, 0, 1),\n new BABYLON_Vector3(1, 0, 1),\n new BABYLON_Vector3(0, 1, 1),\n new BABYLON_Vector3(1, 1, 1)\n];\nexport function is_aabb_nan(bounds) {\n return isNaN(bounds.min.x) ||\n isNaN(bounds.min.y) ||\n isNaN(bounds.min.z) ||\n isNaN(bounds.max.x) ||\n isNaN(bounds.max.y) ||\n isNaN(bounds.max.z);\n}\nexport function is_aabb_valid(bounds) {\n // Here we consider the bounds for something with triangles with 0 area to still have valid bounds.\n // A proper test would need to verify that min < max in two of the three axes\n return (!is_aabb_nan(bounds)) &&\n bounds.min.x <= bounds.max.x &&\n bounds.min.y <= bounds.max.y &&\n bounds.min.z <= bounds.max.z;\n}\nexport function update_aabb_by_transformed_aabb(in_out_bounds, object_bounds, object_transform) {\n const vertex = new BABYLON_Vector3(0, 0, 0);\n const transformed_vertex = new BABYLON_Vector4();\n const bounds_size = IVector3.subtract(object_bounds.max, object_bounds.min);\n for (let i = 0; i < aabb_corners.length; i++) {\n vertex.x = object_bounds.min.x + aabb_corners[i].x * bounds_size.x;\n vertex.y = object_bounds.min.y + aabb_corners[i].y * bounds_size.y;\n vertex.z = object_bounds.min.z + aabb_corners[i].z * bounds_size.z;\n BABYLON_Vector4.TransformCoordinatesToRef(vertex, object_transform, transformed_vertex);\n IVector3.min_to_ref(in_out_bounds.min, transformed_vertex, in_out_bounds.min);\n IVector3.max_to_ref(in_out_bounds.max, transformed_vertex, in_out_bounds.max);\n }\n}\nfunction get_object_bounds(root, root_transform, include_children) {\n return __awaiter(this, void 0, void 0, function* () {\n const transform_bounds_tuples = [];\n transform_bounds_tuples.push({\n object: root,\n bounds: root.get_local_space_bounding_info(),\n transform: root_transform\n });\n if (include_children) {\n for (let i = 0; i < transform_bounds_tuples.length; i++) {\n const parent = transform_bounds_tuples[i].object;\n parent.children_direct_descendants_iterator((child) => {\n transform_bounds_tuples.push({\n object: child,\n bounds: child.get_local_space_bounding_info(),\n transform: child.get_local_matrix().multiply(transform_bounds_tuples[i].transform)\n });\n });\n }\n }\n const bounds = yield Promise.all(transform_bounds_tuples.map(value => value.bounds));\n const total_bounds = {\n min: new BABYLON_Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE),\n max: new BABYLON_Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE)\n };\n for (let i = 0; i < transform_bounds_tuples.length; i++) {\n if (is_aabb_valid(bounds[i].aabb)) {\n update_aabb_by_transformed_aabb(total_bounds, bounds[i].aabb, transform_bounds_tuples[i].transform);\n }\n }\n return total_bounds;\n });\n}\nexport function get_object_bounds_world(objects) {\n return __awaiter(this, void 0, void 0, function* () {\n const promises = objects.map((object) => {\n return get_object_bounds(object, object.get_world_matrix(), true);\n });\n const bounds = yield Promise.all(promises);\n const total_bounds = {\n min: new BABYLON_Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE),\n max: new BABYLON_Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE)\n };\n for (let i = 0; i < bounds.length; i++) {\n if (is_aabb_valid(bounds[i])) {\n IVector3.min_to_ref(total_bounds.min, bounds[i].min, total_bounds.min);\n IVector3.max_to_ref(total_bounds.max, bounds[i].max, total_bounds.max);\n }\n }\n return validate_bounds(total_bounds);\n });\n}\nexport function get_object_bounds_local(object, include_children) {\n return __awaiter(this, void 0, void 0, function* () {\n const bounds = yield get_object_bounds(object, BABYLON_Matrix.Identity(), include_children);\n return validate_bounds(bounds);\n });\n}\nfunction validate_bounds(bounds) {\n if (is_aabb_valid(bounds)) {\n return bounds;\n }\n else if (is_aabb_nan(bounds)) {\n throw new Error('Calculated bounds contain NaN');\n }\n else {\n // This case is when we have nothing with bounds in the scene\n // This is most likely because nothing has loaded yet\n // We then consider the the world bounds to be all zeros\n return { min: BABYLON_Vector3.Zero(), max: BABYLON_Vector3.Zero() };\n }\n}\n/**\n * calculate center of aabb\n * @param aabb to check\n * @returns center of aabb\n */\nexport function aabb_center(aabb) {\n return IVector3.scale(IVector3.add(aabb.min, aabb.max), 0.5);\n}\n/**\n * calculate size of aabb\n * @param aabb to check\n * @returns size of aabb\n */\nexport function aabb_size(aabb) {\n return IVector3.subtract(aabb.max, aabb.min);\n}\n/**\n * Type narrow IBounds to IBoundingBox\n * @param bounds to check\n * @returns true if IBounds is IBoundingBox, false otherwise\n */\nexport function is_aabb(bounds) {\n const min = 'min';\n const max = 'max';\n return min in bounds && max in bounds;\n}\n/**\n * Type narrow IBounds to IboundingSphere\n * @param bounds to check\n * @returns true if IBounds is IBoundingSphere, false otherwise\n */\nexport function is_sphere(bounds) {\n const position = 'position';\n const radius = 'radius';\n return position in bounds && radius in bounds;\n}\nexport function clone_aabb(aabb) {\n const clone = {\n min: { x: aabb.min.x, y: aabb.min.y, z: aabb.min.z },\n max: { x: aabb.max.x, y: aabb.max.y, z: aabb.max.z }\n };\n return clone;\n}\nexport function clone_sphere(sphere) {\n const clone = {\n position: { x: sphere.position.x, y: sphere.position.y, z: sphere.position.z },\n radius: sphere.radius\n };\n return clone;\n}\nexport function clone_bounds(bounds) {\n if (is_aabb(bounds)) {\n return clone_aabb(bounds);\n }\n else if (is_sphere(bounds)) {\n return clone_sphere(bounds);\n }\n throw Error('Tried to clone bounds of unknown sub-type');\n}\nexport function is_valid_bounding_box(bounding_box) {\n if (bounding_box.maximum.x < bounding_box.minimum.x || bounding_box.maximum.y < bounding_box.minimum.y || bounding_box.maximum.z < bounding_box.minimum.z)\n return false;\n if (bounding_box.minimum.x === bounding_box.maximum.x && bounding_box.minimum.y === bounding_box.maximum.y && bounding_box.minimum.z === bounding_box.maximum.z)\n return false;\n return true;\n}\n//# sourceMappingURL=Bounds.js.map","/**\n * Helper class to index a string with a number if the value was used before.\n */\nexport class IndexName {\n constructor() { }\n static next(name) {\n let current_id = IndexName._ids.get(name);\n if (current_id !== undefined) {\n current_id++;\n return IndexName.index_name(name, current_id);\n }\n return IndexName.index_name(name, 0);\n }\n static index_name(name, index) {\n IndexName._ids.set(name, index);\n return index === 0 ? name : `${name} (${index})`;\n }\n}\nIndexName._ids = new Map();\n/**\n * Indexes a `string` property/accessor with a number if the value was used before.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function Indexed(target, property_key, descriptor) {\n return descriptor ? indexed_accessor(target, property_key, descriptor) : indexed_property(target, property_key);\n}\nconst indexed = new WeakMap();\nfunction indexed_property(target, property_key) {\n const getter = function () {\n var _a;\n return (_a = indexed.get(this)) !== null && _a !== void 0 ? _a : '';\n };\n const setter = function (new_value) {\n var _a;\n const current = (_a = indexed.get(this)) !== null && _a !== void 0 ? _a : '';\n if (current === new_value)\n return;\n indexed.set(this, IndexName.next(new_value));\n };\n Object.defineProperty(target, property_key, {\n get: getter,\n set: setter,\n enumerable: true,\n configurable: true\n });\n}\nfunction indexed_accessor(target, property_key, descriptor) {\n const original_setter = descriptor.set;\n descriptor.set = function (value) {\n if (descriptor.get && descriptor.get.call(this) === value)\n return;\n original_setter.call(this, IndexName.next(value));\n };\n}\n//# sourceMappingURL=IndexedName.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { matrix_pool, vector4_pool } from '../../Math.js';\nimport { Vector3 as BABYLON_Vector3, Vector4 as BABYLON_Vector4, Quaternion as BABYLON_Quaternion } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Observable } from '../../Observable.js';\nimport { RENDER_LAYER_MASK_DEFAULT } from '../RenderLayer.js';\nimport { Deprecated } from '../../utils/Deprecated.js';\nimport { Indexed } from '../../utils/IndexedName.js';\nimport { Debug } from '../../utils/DebugLayer/utils/DebugDecorators.js';\n/**\n * Defining ViwerCamera is a generic class allows us to define obesrvables as Observable\n * This prevents potential TS error on assigning any inherited camera as a ViewerCamera\n*/\nlet ViewerCamera = class ViewerCamera {\n constructor(viewer) {\n this.viewer = viewer;\n this._forward = new BABYLON_Vector3(0, 0, 0);\n this._backward = new BABYLON_Vector3(0, 0, 0);\n this._right = new BABYLON_Vector3(0, 0, 0);\n this._left = new BABYLON_Vector3(0, 0, 0);\n this._up = new BABYLON_Vector3(0, 0, 0);\n this._down = new BABYLON_Vector3(0, 0, 0);\n this._position = new BABYLON_Vector3(0, 0, 0);\n this._rotation = new BABYLON_Quaternion();\n this._view_matrix_cache = [\n { x: 1, y: 0, z: 0, w: 0 },\n { x: 0, y: 1, z: 0, w: 0 },\n { x: 0, y: 0, z: 1, w: 0 },\n { x: 0, y: 0, z: 0, w: 1 }\n ];\n this._disposed = false;\n this.dispose_observable = new Observable();\n /**\n * This observables needs to notify users whenever a user starts and stops interacting with a camera\n * It should however only be notified for continues changes and not when the user just sets a parameter\n */\n this.interaction_begin_observable = new Observable();\n this.interaction_end_observable = new Observable();\n /**\n * This observable notify users whenever a camera has been updated.\n * It should notify listeners only once per frame.\n */\n this.update_observable = new Observable();\n }\n /**\n * Note that this can point to the internal forward field and might not be a copy, must be normalized\n */\n get forward() {\n this.update_basis_and_position();\n return this._forward;\n }\n /**\n * Note that this can point to the internal backward field and might not be a copy, must be normalized\n */\n get backward() {\n this.update_basis_and_position();\n return this._backward;\n }\n /**\n * Note that this can point to the internal right field and might not be a copy, must be normalized\n */\n get right() {\n this.update_basis_and_position();\n return this._right;\n }\n /**\n * Note that this can point to the internal left field and might not be a copy, must be normalized\n */\n get left() {\n this.update_basis_and_position();\n return this._left;\n }\n /**\n * Note that this can point to the internal up field and might not be a copy, must be normalized\n */\n get up() {\n this.update_basis_and_position();\n return this._up;\n }\n /**\n * Note that this can point to the internal down field and might not be a copy, must be normalized\n */\n get down() {\n this.update_basis_and_position();\n return this._down;\n }\n /**\n * Note that this can point to the internal position field and might not be a copy\n * @important This is expected to give a correct value after dispose\n */\n get position() {\n this.update_basis_and_position();\n return this._position;\n }\n /**\n * Note that this can point to the internal rotation field and might not be a copy\n * The rotation is stored as a Quaternion\n */\n get rotation_quaternion() {\n this.update_basis_and_position();\n return this._rotation;\n }\n /**\n * @deprecated Use get_projection_matrix() instead\n */\n get projection_matrix() {\n return this.projection.get_projection_matrix();\n }\n get_projection_matrix(_custom_aspect_ratio) {\n // TODO: Make this function abstract in next breaking change (IC3V-1944)\n const advanced_viewer = this.viewer;\n if (advanced_viewer.get_config().verbose_warnings) {\n console.warn('get_projection_matrix not overloaded.');\n }\n return this.projection.get_projection_matrix();\n }\n get view_matrix() {\n this.update_basis_and_position(); // Make sure cache is up to date\n return this._view_matrix_cache;\n }\n get disposed() {\n return this._disposed;\n }\n dispose() {\n if (this.disposed)\n return;\n this._disposed = true;\n this.dispose_impl();\n this.dispose_observable.notify(this);\n // Clear observers\n this.dispose_observable.clear();\n }\n drag_start(evt) {\n // Does nothing by default\n }\n drag_end(evt) {\n // Does nothing by default\n }\n pan_start(evt) {\n // Does nothing by default\n }\n pan_end(evt) {\n // Does nothing by default\n }\n /** Called when camera is pushed to the Viewer camera stack. Useful for hooking up observers. */\n on_activation() {\n // Does nothing by default\n }\n /** Called when camera is popped from the Viewer camera stack. Use for example to unregister observers. */\n on_deactivation() {\n // Does nothing by default\n }\n /**\n * Takes a screenshot with the camera, using the camera's aspect ratio\n * @param vertical_resolution The vertical resolution of the screenshot. Width is calculated from the camera's aspect ratio.\n * @param settings General screenshot settings such as AO and output format. If no AO parameters are given the scene's current settings will be used.\n * @param layer_mask A RenderLayerMask describing which render layers to be included in the screenshot.\n * @returns A promise with the Base64-encoded screenshot data\n */\n take_screenshot(vertical_resolution, settings = {}, render_layer_mask = RENDER_LAYER_MASK_DEFAULT) {\n return this.viewer.take_screenshot(this.get_projection_matrix(), this.projection.get_camera_mode(), this.view_matrix, this.projection.get_aspect_ratio() * vertical_resolution, vertical_resolution, settings, render_layer_mask);\n }\n /**\n * Projects the given world position with the camera in its current state, and returns the x,y pixel coordinates with respect to the given width and height\n * @param world_position The world position to project\n * @param viewport_width The width of the viewport you're projecting on, such as the size of the canvas or resolution of a screenshot\n * @param viewport_height Same as viewport_width, but for height\n * @returns Returns null if the point is not visible to the camera's perspective, otherwise the pixel coordinates x,y (w.r.t. width & height)\n */\n project_world_position(world_position, viewport_width, viewport_height) {\n const view_matrix = matrix_pool.fetch();\n view_matrix.fromIMatrix4(this.view_matrix);\n const projection_matrix = matrix_pool.fetch();\n projection_matrix.fromIMatrix4(this.get_projection_matrix());\n const view_projection_matrix = view_matrix.multiplyToRef(projection_matrix, matrix_pool.fetch());\n const projected = BABYLON_Vector4.TransformCoordinatesFromFloatsToRef(world_position.x, world_position.y, world_position.z, view_projection_matrix, vector4_pool.fetch());\n projected.scaleInPlace(1.0 / projected.w);\n const ndc = {\n x: projected.x,\n y: projected.y,\n z: projected.z\n };\n matrix_pool.return(view_matrix, projection_matrix, view_projection_matrix);\n vector4_pool.return(projected);\n // Check if the position is outside the projection\n if (Math.abs(ndc.x) > 1.0 || Math.abs(ndc.y) > 1.0 || Math.abs(ndc.z) > 1.0) {\n return null;\n }\n return {\n x: (ndc.x * 0.5 + 0.5) * viewport_width,\n y: (1.0 - (ndc.y * 0.5 + 0.5)) * viewport_height\n };\n }\n};\nViewerCamera.FORWARD = new BABYLON_Vector3(0, 0, -1.0);\nViewerCamera.UP = new BABYLON_Vector3(0, 1.0, 0);\nViewerCamera.RIGHT = new BABYLON_Vector3(1.0, 0, 0);\n__decorate([\n Indexed\n], ViewerCamera.prototype, \"name\", void 0);\n__decorate([\n Deprecated({ new: 'ViewerCamera.get_projection_matrix()' })\n], ViewerCamera.prototype, \"projection_matrix\", null);\nViewerCamera = __decorate([\n Debug.Persistent({ name: 'ViewerCamera', is_enabled: false })\n], ViewerCamera);\nexport { ViewerCamera };\n/**\n * Projects the given world position with the camera in its current state, and returns the x,y pixel coordinates with respect to the given width and height\n * @deprecated Use camera.project_world_position instead\n * @param camera The camera used to project\n * @param world_position The world position to project\n * @param viewport_width The width of the viewport you're projecting on, such as the size of the canvas or resolution of a screenshot\n * @param viewport_height Same as viewport_width, but for height\n * @returns Returns null if the point is not visible to the camera's perspective, otherwise the pixel coordinates x,y (w.r.t. width & height)\n */\nexport function project_world_position_from_camera(camera, world_position, viewport_width, viewport_height) {\n console.warn('Warning: project_world_position_from_camera is deprecated. Use camera.project_world_position instead.');\n return camera.project_world_position(world_position, viewport_width, viewport_height);\n}\n//# sourceMappingURL=ViewerCamera.js.map","import { PARALLEL_DOT, clamp, lerp_float, vector3_pool } from '../../Math.js';\nimport { IVector3, IMatrix4, CameraMode, TransitionState, CameraTransition } from '../../api.js';\nimport { CameraManager } from './CameraManager.js';\nimport { ViewerCamera } from './ViewerCamera.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\n/**\n * A class holding and updating the interpolated state between two cameras\n * It works by linear interpolation of position and target of both cameras\n * And performing a look at using the interpolated values at each step\n */\nexport class LerpPositionTargetTransitionCamera {\n constructor(_from_camera, _to_camera) {\n this._from_camera = _from_camera;\n this._to_camera = _to_camera;\n this._interpolation = 0;\n this._position = new IVector3();\n this._blend_target = new IVector3();\n this._forward = new IVector3();\n this._backward = new IVector3();\n this._left = new IVector3();\n this._right = new IVector3();\n this._up = new IVector3();\n this._down = new IVector3();\n this._view_matrix = new IMatrix4();\n }\n get blend_target() {\n return this._blend_target;\n }\n get position() {\n return this._position;\n }\n get forward() {\n return this._forward;\n }\n get backward() {\n return this._backward;\n }\n get left() {\n return this._left;\n }\n get right() {\n return this._right;\n }\n get up() {\n return this._up;\n }\n get down() {\n return this._down;\n }\n get view_matrix() {\n return this._view_matrix;\n }\n /**\n * Updates the state of this camera using the supplied interpolation value\n * @param t interpolation value\n */\n update(t) {\n this._interpolation = t;\n IVector3.lerp_to_ref(this._from_camera.position, this._to_camera.position, t, this._position);\n IVector3.lerp_to_ref(this._from_camera.blend_target, this._to_camera.blend_target, t, this._blend_target);\n const from_forward = this._from_camera.forward;\n const to_forward = this._to_camera.forward;\n const cos_omega = IVector3.dot(from_forward, to_forward);\n const forward = IVector3.subtract_to_ref(this.blend_target, this._position, vector3_pool.fetch()).normalize();\n const right = vector3_pool.fetch();\n const up = vector3_pool.fetch();\n if (Math.abs(cos_omega) < PARALLEL_DOT) {\n const sin_omega = Math.sqrt(1.0 - cos_omega * cos_omega);\n const omega = Math.acos(cos_omega);\n const slerp_t_times_omega = Math.acos(IVector3.dot(from_forward, forward));\n const scaled_source_right = vector3_pool.fetch();\n const scaled_target_right = vector3_pool.fetch();\n const to_right = vector3_pool.fetch().fromIVector3(this._to_camera.right);\n IVector3.add_to_ref(IVector3.scale_to_ref(this._from_camera.right, Math.sin(omega - slerp_t_times_omega) / sin_omega, scaled_source_right), IVector3.scale_to_ref(this._to_camera.right, Math.sin(slerp_t_times_omega) / sin_omega, scaled_target_right), right);\n // Since it's not guaranteed the slerping path of the right vector during the transition is always orthogonal to the forward vector, we remove the forward component of the right vector to make sure they're orthogonal.\n const forward_component = vector3_pool.fetch();\n right.subtractInPlace(forward.scaleToRef(forward.dot(right), forward_component));\n right.normalize();\n vector3_pool.return(scaled_source_right, scaled_target_right, forward_component, to_right);\n }\n else {\n if (Math.abs(forward.y) > PARALLEL_DOT) {\n up.copyFrom(ViewerCamera.FORWARD);\n }\n else {\n up.copyFrom(BABYLON_Vector3.UpReadOnly);\n }\n BABYLON_Vector3.CrossToRef(forward, up, right);\n right.normalize();\n }\n BABYLON_Vector3.CrossToRef(right, forward, up);\n IVector3.normalize_in_place(forward);\n IVector3.normalize_in_place(right);\n IVector3.normalize_in_place(up);\n IVector3.copy_to_ref(forward, this._forward);\n IVector3.copy_to_ref(right, this._right);\n IVector3.copy_to_ref(up, this._up);\n IVector3.scale_to_ref(forward, -1, this._backward);\n IVector3.scale_to_ref(right, -1, this._left);\n IVector3.scale_to_ref(up, -1, this._down);\n BABYLON_Vector3.CrossToRef(right, forward, up);\n this._view_matrix[0].x = right.x;\n this._view_matrix[0].y = right.y;\n this._view_matrix[0].z = right.z;\n this._view_matrix[0].w = 0;\n this._view_matrix[1].x = up.x;\n this._view_matrix[1].y = up.y;\n this._view_matrix[1].z = up.z;\n this._view_matrix[1].w = 0;\n this._view_matrix[2].x = forward.x;\n this._view_matrix[2].y = forward.y;\n this._view_matrix[2].z = forward.z;\n this._view_matrix[2].w = 0;\n this._view_matrix[3].x = this._position.x;\n this._view_matrix[3].y = this._position.y;\n this._view_matrix[3].z = this._position.z;\n this._view_matrix[3].w = 1;\n IMatrix4.inverse_in_place(this._view_matrix);\n vector3_pool.return(forward, up, right);\n }\n get_projection_matrix(_custom_aspect_ratio) {\n const from_projection = this._from_camera.get_projection_matrix(_custom_aspect_ratio);\n const to_projection = this._to_camera.get_projection_matrix(_custom_aspect_ratio);\n return IMatrix4.lerp(from_projection, to_projection, this._interpolation);\n }\n}\n/**\n * Viewers default implementation for a camera transition\n * This transition works by interpolation of target and position of two cameras using a supplied interpolation function that can be used to describe a curve if smoothing is wanted\n * It uses the LerpTargetPositionTransitionCamera to calculate the interpolated camera at each step\n */\nexport class LerpTargetPositionCameraTransition extends CameraTransition {\n constructor(_from_camera, _to_camera, engine_camera, duration, interpolation) {\n super(_from_camera, _to_camera, engine_camera);\n this.duration = duration;\n this.interpolation = interpolation;\n this._has_started = false;\n this._current_state = TransitionState.NONE;\n this._transition_camera = new LerpPositionTargetTransitionCamera(this.from_camera, this.to_camera);\n this.transition_generator = this.step_generator(_to_camera, this._transition_camera, engine_camera, duration, interpolation);\n }\n get has_started() {\n return this._current_state !== TransitionState.NONE;\n }\n get has_ended() {\n return this._has_started && (this._current_state === TransitionState.COMPLETED);\n }\n get transition_camera() {\n return this._transition_camera;\n }\n step(time, aspect_ratio) {\n this._current_state = this.transition_generator.next({ time: time, aspect_ratio: aspect_ratio }).value;\n if (this._current_state === TransitionState.STARTED) {\n this._has_started = true;\n }\n return this._current_state;\n }\n /**\n * Generator function used to handle the transition, stepped one step each time step is called.\n * @param to_camera Camera to transition to\n * @param transition_camera Camera used for calculating the interpolated state\n * @param engine_camera The camera that this transition should update on each step\n * @param duration the time this transition takes\n * @param interpolation given a value in range 0->1 outputs a value in range 0->1\n * @returns The current state of this transition, STARTED on the first call and then CONTINUE until it has finished and then it returns COMPLETED\n */\n *step_generator(to_camera, transition_camera, engine_camera, duration, interpolation) {\n let timer = 0;\n transition_camera.update(0);\n let update_data = yield TransitionState.STARTED;\n while (timer < duration) {\n timer += update_data.time.seconds;\n // Interpolate position and targets for calculating the view matrix\n const t = interpolation(clamp(timer / duration, 0, 1));\n transition_camera.update(t);\n this.fix_interpolated_projection(update_data.aspect_ratio);\n engine_camera.set_projection_matrix(this.fix_interpolated_projection(update_data.aspect_ratio), CameraMode.PERSPECTIVE);\n engine_camera.set_view_matrix(transition_camera.view_matrix);\n update_data = yield TransitionState.CONTINUE;\n }\n engine_camera.set_projection_matrix(to_camera.get_projection_matrix(), to_camera.projection.get_camera_mode());\n engine_camera.set_view_matrix(to_camera.view_matrix);\n return TransitionState.COMPLETED;\n }\n}\n// Here we monkey patch our CameraTransition function so that the implementation doesn't end up in api.ts\nCameraTransition.prototype.fix_interpolated_projection = function (aspect_ratio) {\n const from_camera_frustum_world = CameraManager.get_frustum_vertices_world(this.from_camera);\n const to_camera_frustum_world = CameraManager.get_frustum_vertices_world(this.to_camera);\n const combined_frustum_world = from_camera_frustum_world.concat(to_camera_frustum_world);\n /**\n * Here we calculate the interpolated projection matrix in a few steps:\n * 1. We simply get the interpolated projection matrix\n * 2. Given the 2 cameras we're interpolating inbetween, calculating the extents of their frustums in world space\n * (done earlier), and for our current interpolated view matrix, calculate which z near and far values we need,\n * to not clip the scene no more than the original or new cameras do.\n * 3. Calculate the values in a projection related to z near/far values, for both a perspective and orthographic projection matrix,\n * using the calculated near/far.\n * Then, we utilize that in any perspective projection matrix, we have an element that is always equal to 1 or -1,\n * while it is always 0 in an orthographic projection.\n * So when interpolating the projection matrix, we can take the absolute value of this element to measure how\n * \"orthographic vs perspective\" we currently are in the interpolation, and then simply mix our z-related values\n * with this interpolant, to get good near/far values in our interpolated projection matrix.\n */\n const current_proj_matrix = this.transition_camera.get_projection_matrix(aspect_ratio);\n const current_view_matrix = this.transition_camera.view_matrix;\n // Arbitrary value to clamp to for perspective near\n const minimum_perspective_near = 0.01;\n let perspective_near = Number.MAX_VALUE;\n let perspective_far = -Number.MAX_VALUE;\n let orthographic_near = Number.MAX_VALUE;\n let orthographic_far = -Number.MAX_VALUE;\n // Calculate the required near/far values for our 2 camera's projections\n const projected = vector3_pool.fetch();\n for (let i = 0; i < combined_frustum_world.length; i++) {\n IMatrix4.transform_vector3_to_ref(current_view_matrix, combined_frustum_world[i], projected);\n perspective_near = Math.min(perspective_near, Math.max(minimum_perspective_near, projected.z));\n perspective_far = Math.max(perspective_far, projected.z);\n orthographic_near = Math.min(orthographic_near, projected.z);\n orthographic_far = Math.max(orthographic_far, projected.z);\n }\n vector3_pool.return(projected);\n // Our measure of how \"perspective\" our current matrix is\n const perspectiveness = Math.abs(current_proj_matrix[2].w);\n // The near/far related values for a perspective projection\n const perspective_c = (perspective_far + perspective_near) / (perspective_far - perspective_near);\n const perspective_d = -2.0 * perspective_far * perspective_near / (perspective_far - perspective_near);\n // The near/far related values for an orthographic projection\n const orthographic_c = 2.0 / (orthographic_far - orthographic_near);\n const orthographic_d = -(orthographic_near + orthographic_far) / (orthographic_far - orthographic_near);\n // Mix between orthographic and perspective in our interpolated matrix\n current_proj_matrix[2].z = lerp_float(orthographic_c, perspective_c, perspectiveness);\n current_proj_matrix[3].z = lerp_float(orthographic_d, perspective_d, perspectiveness);\n return current_proj_matrix;\n};\n//# sourceMappingURL=CameraTransition.js.map","const default_color_scheme = {\n log: { category_name: 'white', background: 'grey' },\n info: { category_name: 'white', background: 'blue' },\n debug: { category_name: 'white', background: 'violet' },\n warn: { category_name: 'white', background: 'orange' },\n error: { category_name: 'white', background: 'red' },\n default: { category_name: 'white', background: 'grey' }\n};\n/**\n * Console Decorator\n * @static\n *\n * Utility class to add some style to console logs.\n */\nexport class ConsoleDecorator {\n constructor() { }\n static get_style(type, color_scheme = default_color_scheme) {\n var _a;\n const color = (_a = color_scheme[type]) !== null && _a !== void 0 ? _a : color_scheme.default;\n return [ConsoleDecorator.create_header_style(color)];\n }\n static create_header_style(pin_color) {\n const { padding, border_radius } = ConsoleDecorator.pin_style;\n const { size, weight } = ConsoleDecorator.pin_font;\n const { category_name, background } = pin_color;\n const style = `padding: ${padding}; border-radius: ${border_radius}; `;\n const font = `font-weight: ${weight}; font-size: ${size}; `;\n const color = `color: ${category_name}; background-color: ${background}; `;\n return style + font + color;\n }\n}\nConsoleDecorator.pin_font = {\n size: '0.8rem',\n weight: 'bold'\n};\nConsoleDecorator.pin_style = {\n border_radius: '4px',\n padding: '1px 4px'\n};\n//# sourceMappingURL=ConsoleDecorator.js.map","import { ConsoleDecorator } from './ConsoleDecorator.js';\n/**\n * Console Logger\n *\n * Prints logs with a nice header.\n * @example\n * const console_logger = new ConsoleLogger(\"My Name\");\n * console_logger.log(\"My Message\");\n */\nexport class ConsoleLogger {\n constructor(name) {\n this.name = name;\n this.log = this._create_console_method('log');\n this.debug = this._create_console_method('debug');\n this.info = this._create_console_method('info');\n this.warn = this._create_console_method('warn');\n this.error = this._create_console_method('error');\n }\n _create_console_method(type) {\n const style = ConsoleDecorator.get_style(type);\n return Function.prototype.bind.apply(console[type], [console, `%c${this.name}`, ...style]);\n }\n}\n//# sourceMappingURL=ConsoleLogger.js.map","import { LoggerSettings } from './Logger.js';\nimport { ConsoleLogger } from './console/ConsoleLogger.js';\nconst empty = (...args) => { };\nconst types = ['log', 'debug', 'info', 'warn', 'error'];\n/**\n * Logging Service 🪵.\n */\nexport class LoggingService {\n constructor(category, rules) {\n this.category = category;\n this.rules = rules;\n this.log = empty;\n this.debug = empty;\n this.info = empty;\n this.warn = empty;\n this.error = empty;\n this.console_logger = new ConsoleLogger(category);\n this.setup();\n }\n update_methods() {\n if (!LoggerSettings.is_enabled) {\n this.set_empty_methods();\n return;\n }\n if (LoggerSettings.overrides) {\n const { only, exclude } = LoggerSettings.overrides;\n if ((only.size && !only.has(this.category)) || (exclude.size && exclude.has(this.category))) {\n this.set_empty_methods();\n return;\n }\n }\n const applicable_rules = this.rules.filter(rule => rule.categories.includes(this.category));\n types.forEach(type => {\n if (applicable_rules.length) {\n this[type] = applicable_rules.some(rule => types.indexOf(rule.type) <= types.indexOf(type)) ? this.console_logger[type] : empty;\n }\n else {\n this[type] = this.console_logger[type];\n }\n });\n }\n setup(rules) {\n if (rules) {\n this.rules = rules;\n }\n this.update_methods();\n }\n set_empty_methods() {\n types.forEach(type => {\n this[type] = empty;\n });\n }\n}\n//# sourceMappingURL=LoggingService.js.map","export function create_overrides() {\n const overrides = {\n only: new Set(),\n exclude: new Set(),\n clear: () => {\n overrides.only.clear();\n overrides.exclude.clear();\n }\n };\n return overrides;\n}\n//# sourceMappingURL=types.js.map","import { LoggingService } from './LoggingService.js';\nimport { create_overrides } from './types.js';\nexport var LoggingCategory;\n(function (LoggingCategory) {\n LoggingCategory[\"METADATA\"] = \"metadata\";\n})(LoggingCategory || (LoggingCategory = {}));\n/**\n * Logging System 🪵🪓.\n * @static\n * @example\n * Logger.setup(config);\n * Logger.debug('My message!');\n * Logger.as('My category').info('Another message');\n */\nexport class Logger {\n constructor() { }\n /**\n * Initiates `Logger` with a specified configuration.\n */\n static setup(config) {\n var _a;\n if (Logger._is_initialized) {\n console.warn('Logger is already initialized. Make sure to dispose Viewer/Logger before creating a new one.');\n }\n Logger._name = config.name;\n Logger._service = new LoggingService(Logger._name, (_a = config.rules) !== null && _a !== void 0 ? _a : []);\n Logger.setup_methods();\n Logger._is_initialized = true;\n }\n /**\n * Set `Logger` to be disabled or enabled.\n */\n static set_enabled(is_enabled) {\n LoggerSettings.is_enabled = is_enabled;\n Logger.setup_methods();\n }\n /**\n * Get `Logger` for a specified `category`.\n * @note Creates a new `category` if the `category` was not defined before.\n */\n static as(category) {\n let service = Logger._category_services.get(category);\n if (service) {\n return service;\n }\n service = new LoggingService(category, Logger._service.rules);\n Logger._category_services.set(category, service);\n return service;\n }\n /**\n * Create a new `category` and define new rules for it if necessary.\n * @example\n * Logger.add('My category').with_rules(category_rules);\n * Logger.as('My category').log('My message');\n */\n static add(category) {\n const service = new LoggingService(category, Logger._service.rules);\n if (this._category_services.has(category)) {\n throw new Error(`Category with name: ${category} already exists.`);\n }\n this._category_services.set(category, service);\n return {\n with_rules: (rules) => service.setup(rules)\n };\n }\n static only(category) {\n Logger.override(category, 'only');\n Logger.setup_methods();\n }\n static exclude(category) {\n Logger.override(category, 'exclude');\n Logger.setup_methods();\n }\n /**\n * Removes all existing overrides.\n */\n static clear_overrides() {\n LoggerSettings.overrides = null;\n Logger.setup_methods();\n }\n /**\n * Dispose the service.\n */\n static dispose() {\n Logger._category_services.clear();\n Logger._is_initialized = false;\n }\n static override(category, action) {\n category = Array.isArray(category) ? category : [category];\n if (!LoggerSettings.overrides) {\n LoggerSettings.overrides = create_overrides();\n }\n LoggerSettings.overrides.clear();\n LoggerSettings.overrides[action] = new Set(category);\n }\n static setup_methods() {\n this._service.update_methods();\n this._category_services.forEach(service => service.update_methods());\n Logger.log = Logger._service.log;\n Logger.debug = Logger._service.debug;\n Logger.info = Logger._service.info;\n Logger.warn = Logger._service.warn;\n Logger.error = Logger._service.error;\n }\n}\nLogger._is_initialized = false;\nLogger._name = '';\nLogger._category_services = new Map();\n/**\n * @internal\n */\nexport class LoggerSettings {\n constructor() { }\n}\nLoggerSettings.is_enabled = true;\nLoggerSettings.overrides = null;\n//# sourceMappingURL=Logger.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Observable } from '../../Observable.js';\nimport { Stack } from '../../Stack.js';\nimport { IMatrix4, CameraTransitionPreset, TransitionState, IVector3 } from '../../api.js';\nimport { matrix_pool, radians, vector4_pool } from '../../Math.js';\nimport { Vector3 as BABYLON_Vector3, Vector4 as BABYLON_Vector4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { smooth_step } from '../../Interpolation.js';\nimport { update_from_partial } from '../utility/utils.js';\nimport { assert } from '../utility/Assert.js';\nimport { aabb_corners } from '../utility/Bounds.js';\nimport { LerpTargetPositionCameraTransition as LerpPositionTargetCameraTransition } from './CameraTransition.js';\nimport { Logger } from '../../logging/Logger.js';\nimport { Debug } from '../../utils/DebugLayer/utils/DebugDecorators.js';\nconst ENGINE_CAMERA_DIRTY_ANGLE_EPSILON = radians(0.05);\nconst ENGINE_CAMERA_DIRTY_POSITION_EPSILON = 0.00005;\n// This is the default transition used by the viewer\nexport const SMOOTH_CAMERA_TRANSITION = {\n interpolation: smooth_step,\n duration_seconds: 2.0\n};\nObject.freeze(SMOOTH_CAMERA_TRANSITION);\nexport const SMOOTH_FAST_CAMERA_TRANSITION = {\n interpolation: smooth_step,\n duration_seconds: 0.3\n};\nObject.freeze(SMOOTH_FAST_CAMERA_TRANSITION);\nexport const LINEAR_CAMERA_TRANSITION = {\n interpolation: (t) => t,\n duration_seconds: 2.0\n};\nObject.freeze(LINEAR_CAMERA_TRANSITION);\nexport const LINEAR_FAST_CAMERA_TRANSITION = {\n interpolation: (t) => t,\n duration_seconds: 0.3\n};\nObject.freeze(LINEAR_FAST_CAMERA_TRANSITION);\nexport const TRANSITION_PRESETS = {\n [CameraTransitionPreset.SMOOTH]: SMOOTH_CAMERA_TRANSITION,\n [CameraTransitionPreset.SMOOTH_FAST]: SMOOTH_FAST_CAMERA_TRANSITION,\n [CameraTransitionPreset.LINEAR]: LINEAR_CAMERA_TRANSITION,\n [CameraTransitionPreset.LINEAR_FAST]: LINEAR_FAST_CAMERA_TRANSITION\n};\n/**\n * Class that is responsible for managing which camera is the active camera.\n * The active camera is the camera object that updated the rendering ViewerCamera.\n * It's also responsible for interpolating between cameras during transitions.\n */\nlet CameraManager = class CameraManager {\n constructor(engine_camera, _interaction_system, _viewer, initial_aspect_ratio) {\n this._interaction_system = _interaction_system;\n this._viewer = _viewer;\n this._camera_stack = new Stack();\n this._camera_dispose_observer = null;\n this._camera_transition = null;\n this._interaction_begin_observer = null;\n this._interaction_end_observer = null;\n this.active_camera_changed_observable = new Observable();\n this.camera_transition_begin_observable = new Observable();\n this.camera_transition_end_observable = new Observable();\n this._interaction_id = null;\n this._engine_camera = engine_camera;\n this._last_aspect_ratio = initial_aspect_ratio;\n this._camera_dispose_callback = () => {\n this.pop_camera_immediate();\n };\n this._interaction_begin_callback = () => {\n if (this._interaction_id) {\n // We already have a running interaction, lets keep that ID, nothing to do\n }\n else {\n this._interaction_id = this._interaction_system.begin_interaction();\n }\n };\n this._interaction_end_callback = () => {\n if (this._interaction_id) {\n this._interaction_system.end_interaction(this._interaction_id);\n this._interaction_id = null;\n }\n else {\n // We didn't have a running interaction, nothing to do.\n }\n };\n }\n set_engine_camera_view_matrix(matrix) {\n const current_inverse_view_matrix = this.engine_camera.get_view_matrix();\n IMatrix4.orthonormal_rotation_affine_transform_inverse_to_ref(current_inverse_view_matrix, current_inverse_view_matrix);\n const inverse_matrix = IMatrix4.orthonormal_rotation_affine_transform_inverse(matrix);\n if (IVector3.dot(inverse_matrix[0], current_inverse_view_matrix[0]) > Math.cos(ENGINE_CAMERA_DIRTY_ANGLE_EPSILON) &&\n IVector3.dot(inverse_matrix[1], current_inverse_view_matrix[1]) > Math.cos(ENGINE_CAMERA_DIRTY_ANGLE_EPSILON) &&\n IVector3.dot(inverse_matrix[2], current_inverse_view_matrix[2]) > Math.cos(ENGINE_CAMERA_DIRTY_ANGLE_EPSILON) &&\n Math.abs(inverse_matrix[3].x - current_inverse_view_matrix[3].x) < ENGINE_CAMERA_DIRTY_POSITION_EPSILON &&\n Math.abs(inverse_matrix[3].y - current_inverse_view_matrix[3].y) < ENGINE_CAMERA_DIRTY_POSITION_EPSILON &&\n Math.abs(inverse_matrix[3].z - current_inverse_view_matrix[3].z) < ENGINE_CAMERA_DIRTY_POSITION_EPSILON) {\n return;\n }\n this.engine_camera.set_view_matrix(matrix);\n }\n get active_camera() {\n return this._camera_stack.peek();\n }\n // Internal function to the Viewer\n get engine_camera() {\n return this._engine_camera;\n }\n is_transitioning() {\n return (!!this._camera_transition && !this._camera_transition.has_ended);\n }\n dispose() {\n // Does nothing. Required for Debug.Persistent()\n }\n update(delta_time) {\n var _a;\n const active_camera = this._camera_stack.peek();\n if (active_camera) {\n active_camera.update(delta_time);\n // The transition will update the engine camera while it's running.\n if (this.is_transitioning()) {\n // TODO: How should we handle aspect ratio? it's kinda hacky that we ask the camera about it.\n // We also talk about removing the storing of aspect from cameras making it a required param for functions that need it\n const state = (_a = this._camera_transition) === null || _a === void 0 ? void 0 : _a.step(delta_time, active_camera.projection.get_aspect_ratio());\n if (state === TransitionState.STARTED) {\n this.camera_transition_begin_observable.notify(this, {\n from_camera: null,\n to_camera: this._camera_transition.to_camera,\n canceled: false\n });\n }\n else if (state === TransitionState.COMPLETED) {\n this.camera_transition_end_observable.notify(this, {\n from_camera: null,\n to_camera: this._camera_transition.to_camera,\n canceled: false\n });\n this._camera_transition = null;\n }\n else if (state === TransitionState.CONTINUE) {\n // Nothing to do here, transition is still running\n }\n else {\n Logger.as('CameraManager').error('Camera transition: Stepping transition returned a bad state. Abort');\n this.camera_transition_end_observable.notify(this, {\n from_camera: null,\n to_camera: this._camera_transition.to_camera,\n canceled: true\n });\n this._camera_transition = null;\n }\n }\n else {\n this._engine_camera.camera.mode = active_camera.projection.get_camera_mode();\n this._engine_camera.set_projection_matrix(active_camera.projection.get_projection_matrix(), active_camera.projection.get_camera_mode());\n this.set_engine_camera_view_matrix(active_camera.view_matrix);\n }\n }\n }\n unregister_callbacks_from_camera(viewer_camera) {\n if (this._camera_dispose_observer !== null) {\n viewer_camera.dispose_observable.remove(this._camera_dispose_observer);\n }\n if (this._interaction_begin_observer !== null) {\n viewer_camera.interaction_begin_observable.remove(this._interaction_begin_observer);\n this._interaction_begin_observer = null;\n }\n if (this._interaction_end_observer !== null) {\n viewer_camera.interaction_end_observable.remove(this._interaction_end_observer);\n this._interaction_end_observer = null;\n }\n }\n setup_new_active_camera(viewer_camera) {\n this._camera_dispose_observer = viewer_camera.dispose_observable.add(this._camera_dispose_callback);\n this._interaction_begin_observer = viewer_camera.interaction_begin_observable.add(this._interaction_begin_callback);\n this._interaction_end_observer = viewer_camera.interaction_end_observable.add(this._interaction_end_callback);\n this.active_camera_changed_observable.notify(this, viewer_camera);\n }\n /**\n * This contains logic for either running a transition or performing an immediate transition if\n * we are missing a camera to transition from.\n * This function also cancels previous transitions if already running\n */\n start_camera_transition(factory, old_camera, new_camera, caller_name) {\n if (this._camera_transition && this._camera_transition.has_started && !this._camera_transition.has_ended) {\n this.camera_transition_end_observable.notify(this, {\n from_camera: null,\n to_camera: this._camera_transition.to_camera,\n canceled: true\n });\n old_camera = this._camera_transition.transition_camera;\n }\n if (old_camera !== null) {\n this._camera_transition = factory(old_camera, new_camera, this.engine_camera);\n }\n else {\n Logger.as('CameraManager').info(`${caller_name} was called with a transition but there was no camera to transition from. Performing immediate transition instead`);\n this._camera_transition = null;\n this.set_engine_camera_view_matrix(new_camera.view_matrix);\n this._engine_camera.set_projection_matrix(new_camera.get_projection_matrix(), new_camera.projection.get_camera_mode());\n this.camera_transition_begin_observable.notify(this, {\n canceled: true,\n to_camera: new_camera,\n from_camera: null\n });\n this.camera_transition_end_observable.notify(this, {\n canceled: true,\n to_camera: new_camera,\n from_camera: null\n });\n }\n }\n push_camera(viewer_camera, transition) {\n const _transition = update_from_partial(SMOOTH_CAMERA_TRANSITION, transition !== null && transition !== void 0 ? transition : {});\n this.push_camera_custom_transition(viewer_camera, (from_camera, to_camera, engine_camera) => {\n return new LerpPositionTargetCameraTransition(from_camera, to_camera, engine_camera, _transition.duration_seconds, _transition.interpolation);\n });\n }\n push_camera_immediate(viewer_camera) {\n // Make sure the camera is added with the correct aspect ratio\n viewer_camera.update_aspect_ratio(this._last_aspect_ratio);\n const prev_camera = this._camera_stack.peek();\n if (prev_camera) {\n this.unregister_callbacks_from_camera(prev_camera);\n }\n this._camera_stack.push(viewer_camera);\n this.setup_new_active_camera(viewer_camera);\n this._camera_transition = null;\n this.set_engine_camera_view_matrix(viewer_camera.view_matrix);\n this._engine_camera.set_projection_matrix(viewer_camera.get_projection_matrix(), viewer_camera.projection.get_camera_mode());\n viewer_camera.on_activation();\n }\n push_camera_custom_transition(viewer_camera, factory) {\n // Make sure the camera is added with the correct aspect ratio\n viewer_camera.update_aspect_ratio(this._last_aspect_ratio);\n const prev_camera = this._camera_stack.peek();\n if (prev_camera !== null) {\n this.unregister_callbacks_from_camera(prev_camera);\n }\n this._camera_stack.push(viewer_camera);\n this.setup_new_active_camera(viewer_camera);\n this.start_camera_transition(factory, prev_camera, viewer_camera, 'push_camera');\n viewer_camera.on_activation();\n }\n /**\n * When popping cameras, the stack can contain disposed entities.\n * This function makes sure that the camera on top of the stack is either alive\n * or the stack is empty\n */\n pop_to_living_camera() {\n var _a;\n do {\n const prev_camera = this._camera_stack.pop();\n if (prev_camera) {\n this.unregister_callbacks_from_camera(prev_camera);\n }\n const new_camera = this._camera_stack.peek();\n if (new_camera === null) {\n console.warn('Camera stack became empty, abort');\n return;\n }\n else if (new_camera.disposed) {\n // We poped to a disposed camera, continue loop\n continue;\n }\n this.setup_new_active_camera(new_camera);\n new_camera.on_deactivation();\n } while ((_a = this._camera_stack.peek()) === null || _a === void 0 ? void 0 : _a.disposed); // Pop camera until the camera is not disposed\n }\n pop_camera(transition) {\n const _transition = update_from_partial(SMOOTH_CAMERA_TRANSITION, transition !== null && transition !== void 0 ? transition : {});\n this.pop_camera_custom_transition((from_camera, to_camera, engine_camera) => {\n return new LerpPositionTargetCameraTransition(from_camera, to_camera, engine_camera, _transition.duration_seconds, _transition.interpolation);\n });\n }\n pop_camera_immediate() {\n this.pop_to_living_camera();\n const new_camera = this._camera_stack.peek();\n this._camera_transition = null;\n if (new_camera) {\n this.set_engine_camera_view_matrix(new_camera.view_matrix);\n this._engine_camera.set_projection_matrix(new_camera.get_projection_matrix(), new_camera.projection.get_camera_mode());\n }\n }\n pop_camera_custom_transition(factory) {\n const prev_camera = this._camera_stack.peek();\n assert(prev_camera !== null, 'Pop camera cant be performed on an empty camera stack');\n this.pop_to_living_camera();\n const new_camera = this._camera_stack.peek();\n if (new_camera === null)\n return; // Here we early out since we cant perform a transition when the stack became empty\n let old_camera = prev_camera;\n if (this._camera_transition && this._camera_transition.has_started && !this._camera_transition.has_ended) {\n this.camera_transition_end_observable.notify(this, {\n from_camera: null,\n to_camera: this._camera_transition.to_camera,\n canceled: true\n });\n old_camera = this._camera_transition.transition_camera;\n }\n this._camera_transition = factory(old_camera, new_camera, this.engine_camera);\n new_camera.on_activation();\n }\n replace_camera(viewer_camera, transition) {\n const _transition = update_from_partial(SMOOTH_CAMERA_TRANSITION, transition !== null && transition !== void 0 ? transition : {});\n this.replace_camera_custom_transition(viewer_camera, (from_camera, to_camera, engine_camera) => {\n return new LerpPositionTargetCameraTransition(from_camera, to_camera, engine_camera, _transition.duration_seconds, _transition.interpolation);\n });\n }\n replace_camera_immediate(viewer_camera) {\n const poped_camera = this._camera_stack.pop();\n if (poped_camera) {\n this.unregister_callbacks_from_camera(poped_camera);\n poped_camera.on_deactivation();\n }\n // Add camera to the camera stack\n this._camera_stack.push(viewer_camera);\n this.setup_new_active_camera(viewer_camera);\n this._camera_transition = null;\n this.set_engine_camera_view_matrix(viewer_camera.view_matrix);\n this._engine_camera.set_projection_matrix(viewer_camera.get_projection_matrix(), viewer_camera.projection.get_camera_mode());\n viewer_camera.on_activation();\n }\n replace_camera_custom_transition(viewer_camera, factory) {\n const prev_camera = this._camera_stack.pop();\n assert(prev_camera !== null, 'replace camera cant be performed on an empty camera stack, use immediate variant');\n if (prev_camera) {\n this.unregister_callbacks_from_camera(prev_camera);\n }\n // Add camera to the camera stack\n this._camera_stack.push(viewer_camera);\n this.setup_new_active_camera(viewer_camera);\n this.start_camera_transition(factory, prev_camera, viewer_camera, 'replace_camera');\n viewer_camera.on_activation();\n }\n set_camera_stack_internal(viewer_cameras) {\n const previous_camera = this.active_camera;\n if (previous_camera) {\n this.unregister_callbacks_from_camera(previous_camera);\n }\n this._camera_stack.clear();\n for (const camera of viewer_cameras) {\n this._camera_stack.push(camera);\n }\n this.setup_new_active_camera(this.active_camera);\n }\n set_camera_stack(viewer_cameras, transition) {\n const _transition = update_from_partial(SMOOTH_CAMERA_TRANSITION, transition !== null && transition !== void 0 ? transition : {});\n this.set_camera_stack_custom_transition(viewer_cameras, (from_camera, to_camera, engine_camera) => {\n return new LerpPositionTargetCameraTransition(from_camera, to_camera, engine_camera, _transition.duration_seconds, _transition.interpolation);\n });\n }\n set_camera_stack_immediate(viewer_cameras) {\n assert(viewer_cameras.length > 0, 'set_camera_stack can not set to an empty array');\n this.set_camera_stack_internal(viewer_cameras);\n assert(this.active_camera, 'No valid active camera');\n this._camera_transition = null;\n this.set_engine_camera_view_matrix(this.active_camera.view_matrix);\n this._engine_camera.set_projection_matrix(this.active_camera.get_projection_matrix(), this.active_camera.projection.get_camera_mode());\n }\n set_camera_stack_custom_transition(viewer_cameras, factory) {\n assert(viewer_cameras.length > 0, 'set_camera_stack can not set to an empty array');\n const prev_camera = this.active_camera;\n assert(prev_camera !== null, 'set camera stack cant be performed on an empty camera stack, use immediate variant');\n this.set_camera_stack_internal(viewer_cameras);\n assert(this.active_camera, 'No valid active camera');\n this.start_camera_transition(factory, prev_camera, this.active_camera, 'set_camera_stack');\n this.active_camera.on_activation();\n }\n static get_frustum_vertices_world(camera) {\n const vertices = [];\n if (camera === null)\n return vertices;\n const view_matrix = matrix_pool.fetch().fromIMatrix4(camera.view_matrix);\n const projection_matrix = matrix_pool.fetch().fromIMatrix4(camera.get_projection_matrix());\n const inverse_view_projection_matrix = view_matrix.multiplyToRef(projection_matrix, matrix_pool.fetch());\n inverse_view_projection_matrix.invert();\n const projected = vector4_pool.fetch();\n for (let i = 0; i < aabb_corners.length; i++) {\n BABYLON_Vector4.TransformCoordinatesFromFloatsToRef(aabb_corners[i].x * 2.0 - 1.0, aabb_corners[i].y * 2.0 - 1.0, aabb_corners[i].z * 2.0 - 1.0, inverse_view_projection_matrix, projected);\n projected.scaleInPlace(1.0 / projected.w);\n vertices.push(new BABYLON_Vector3(projected.x, projected.y, projected.z));\n }\n vector4_pool.return(projected);\n matrix_pool.return(inverse_view_projection_matrix, projection_matrix, view_matrix);\n return vertices;\n }\n /**\n * Update active camera's aspect ratio.\n * Since a camera can technically belong to multiple camera managers, this needs to be done as soon as the camera's are used.\n * It should be a light operation.\n * @param aspect_ratio\n */\n update_aspect_ratio(aspect_ratio) {\n var _a;\n (_a = this.active_camera) === null || _a === void 0 ? void 0 : _a.update_aspect_ratio(aspect_ratio);\n this._last_aspect_ratio = aspect_ratio;\n }\n};\nCameraManager = __decorate([\n Debug.Persistent({\n name: \"CameraManager\",\n is_enabled: false\n })\n], CameraManager);\nexport { CameraManager };\n//# sourceMappingURL=CameraManager.js.map","import { LineType } from '../api.js';\nimport { vector3_pool, matrix_pool } from '../Math.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Mesh as BABYLON_Mesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js';\nimport { TransformNode as BABYLON_TransformNode } from '@inter-ikea-betrakta-babylonjs/core/Meshes/transformNode.js';\n/**\n * @deprecated\n */\nexport class FocusBorder {\n constructor(_object, _viewer) {\n this._object = _object;\n this._viewer = _viewer;\n this.ui_lines = []; // This array should contain 12 entries, the first 6 are white inner lines while the last 6 are black outer lines.\n this.corners = new Array(8);\n this.extended_corners = new Array(8);\n this.transformed_corners = new Array(8);\n this.transformed_points = new Array(8);\n for (let i = 0; i < 12; i++) {\n // Create all the lines we could possibly need\n this.ui_lines.push(this._viewer.create_ui_line(LineType.SOLID, { x: 0, y: 0, z: 0 }, { x: 0, y: 0, z: 0 }, i >= 6 ? { r: 1, g: 1, b: 1 } : { r: 0, g: 0, b: 0 }, // TODO: Make white and black once testing is done.\n 0.015, true));\n }\n // Chache all vectors/points needed.\n for (let i = 0; i < 8; i++) {\n this.corners[i] = new BABYLON_Vector3();\n this.extended_corners[i] = new BABYLON_Vector3();\n this.transformed_corners[i] = new BABYLON_Vector3();\n this.transformed_points[i] = { x: 0, y: 0 };\n }\n }\n // Note: 1000 iterations seems to take ~3-10ms but generally < 5ms when testing\n update() {\n if (!this._object.is_loaded)\n return;\n const active_camera = this._viewer.get_active_camera();\n if (!active_camera)\n return;\n const camera_position = vector3_pool.fetch().fromIVector3(active_camera.position);\n // Here we force update world transform since MinMax function just uses the cached world transform without checking dirty.. Thanks Babylon.js\n this._object.mesh_nodes.forEach((mesh) => {\n // For some reason we arent allowed to call computeWorldMatrix on AbstractMesh even though it inherits from TransformNode\n if (mesh instanceof BABYLON_TransformNode) {\n mesh.computeWorldMatrix(true);\n }\n });\n const bounds = BABYLON_Mesh.MinMax(this._object.mesh_nodes);\n const center = vector3_pool.fetch().copyFrom(bounds.min).addInPlace(bounds.max).scaleInPlace(0.5);\n const distance = BABYLON_Vector3.Distance(camera_position, center);\n const thickness = 0.007 / (4 / distance);\n const offset = thickness * 0.66;\n // We can scale bounds now, since it wont effect center anyway\n bounds.min = bounds.min.subtractFromFloats(thickness * 2, thickness * 2, thickness * 2);\n bounds.max = bounds.max.subtractFromFloats(-thickness * 2, -thickness * 2, -thickness * 2); // There is no addFromFloats, so i subtract with negative value for now.\n // Lookup table that given the screenspace point gives the corresponding corners\n // Since we build a convex hull in screen space and FocusBorder in world space\n const point_to_corners = new Map();\n const camera_matrix = matrix_pool.fetch();\n const view_matrix = matrix_pool.fetch().fromIMatrix4(active_camera.view_matrix);\n const projection_matrix = matrix_pool.fetch().fromIMatrix4(active_camera.get_projection_matrix());\n view_matrix.multiplyToRef(projection_matrix, camera_matrix);\n for (let i = 0; i < 8; i++) {\n // 6___________7\n // /_________ /|\n // 2| 3| |\n // | | | | y\n // | | | | z\n // |4|_ _ _ _ |_|5 | /\n // |/_________|/ |/_____x\n // 0 1\n const corner = this.corners[i].copyFromFloats((i & 0b001) ? bounds.max.x : bounds.min.x, ((i & 0b010) >> 1) ? bounds.max.y : bounds.min.y, ((i & 0b100) >> 2) ? bounds.max.z : bounds.min.z);\n const extended_corner = this.extended_corners[i].copyFromFloats((i & 0b001) ? bounds.max.x - offset : bounds.min.x + offset, ((i & 0b010) >> 1) ? bounds.max.y - offset : bounds.min.y + offset, ((i & 0b100) >> 2) ? bounds.max.z - offset : bounds.min.z + offset);\n const transformed_corner = this.transformed_corners[i];\n BABYLON_Vector3.TransformCoordinatesToRef(corner, camera_matrix, transformed_corner);\n const transformed_point = this.transformed_points[i];\n transformed_point.x = transformed_corner.x;\n transformed_point.y = transformed_corner.y;\n point_to_corners.set(transformed_point, [corner, extended_corner]);\n }\n const hull_points = convex_hull(this.transformed_points);\n if (hull_points) {\n const len = hull_points.length;\n // Hull is never more than 6 points\n for (let i = 0; i < 6; i++) {\n if (i < len) { // Visible line\n this._viewer.update_ui_line(this.ui_lines[i], point_to_corners.get(hull_points[i])[0], point_to_corners.get(hull_points[(i + 1) % len])[0], undefined, thickness);\n this._viewer.update_ui_line(this.ui_lines[i + 6], point_to_corners.get(hull_points[i])[1], point_to_corners.get(hull_points[(i + 1) % len])[1], undefined, thickness);\n }\n else { // Hidden line\n this._viewer.update_ui_line(this.ui_lines[i], { x: 0, y: 0, z: 0 }, { x: 0, y: 0, z: 0 }, undefined, undefined);\n this._viewer.update_ui_line(this.ui_lines[i + 6], { x: 0, y: 0, z: 0 }, { x: 0, y: 0, z: 0 }, undefined, undefined);\n }\n }\n }\n vector3_pool.return(camera_position, center);\n matrix_pool.return(camera_matrix, view_matrix, projection_matrix);\n }\n dispose() {\n for (const line_id of this.ui_lines) {\n this._viewer.delete_ui_line(line_id);\n }\n this.ui_lines.length = 0;\n // @ts-ignore\n this._object = {};\n }\n}\n/**\n * Find relative orientation for vectors pointing from current -> next and next -> candidate.\n * Returns 0 if current -> next and next -> candidate are parallel\n * 1 if current -> next is clockwise of next -> candidate\n * 2 if current -> next is counterclockwise next -> candidate\n */\nfunction orientation(current, next, candidate) {\n const val = (next.y - current.y) * (candidate.x - next.x) - (next.x - current.x) * (candidate.y - next.y);\n if (val === 0)\n return 0;\n return (val > 0) ? 1 : 2;\n}\nfunction convex_hull(points) {\n const num_points = points.length;\n if (num_points < 3)\n return null;\n const hull = [];\n let leftmost_index = 0;\n for (let i = 1; i < num_points; i++) {\n if (points[i].x < points[leftmost_index].x) {\n leftmost_index = i;\n }\n }\n let current = leftmost_index;\n let candidate;\n do {\n hull.push(points[current]);\n candidate = (current + 1) % num_points;\n for (let i = 0; i < num_points; i++) {\n // If i is more counterclockwise than current candidate, then\n // update candidate\n if (orientation(points[current], points[i], points[candidate]) === 2) {\n candidate = i;\n }\n }\n // Now candidate is the most counterclockwise with respect to current\n // Set candidate as current for next iteration, so that candidate is added to\n // result 'hull'\n current = candidate;\n } while (current !== leftmost_index);\n return hull;\n}\n//# sourceMappingURL=FocusBorder.js.map","/**\n * A coroutine has two uses, one is to be able to cancel a coroutine\n * and the other is to check if a coroutine ran to completion.\n * When implementing a coroutine (generator function) the user can provide a token that is then checked between each tick,\n * if it has been canceled the coroutine should just return instead of yielding to stop futher execution.\n * If the coroutine accepts a token you should also make sure to complete the token at the end of the coroutine.\n */\nexport class CoroutineToken {\n constructor() {\n this._canceled = false;\n this._completed = false;\n }\n cancel() {\n this._canceled = true;\n }\n complete() {\n this._completed = true;\n }\n get is_canceled() {\n return this._canceled;\n }\n get is_completed() {\n return this._completed;\n }\n}\nexport class CoroutineManager {\n constructor() {\n /** Holds the coroutines that should currently be stepped */\n this._active_coroutines = new Set();\n /**\n * Table with child to parent lookup for coroutines that have yileded other coroutines.\n * @key the yielded coroutine that will run to completion before the parent is continued\n * @value the parent coroutine that yielded the nested coroutine\n */\n this._nested_coroutines = new Map();\n /** Array for storing coroutines that should be added to active coroutines after frame update */\n this._cached_array = [];\n }\n /**\n * This should only be called from the Viewer update loop.\n * @param timestep the time elapsed since the last frame in milliseconds\n */\n update(timestep) {\n this._cached_array.length = 0;\n this._active_coroutines.forEach(coroutine => {\n let result;\n try {\n result = coroutine.next(timestep);\n }\n catch (e) {\n console.error('Failed to run a coroutine: ', e);\n this.dispose_active_coroutine_chain(coroutine);\n return;\n }\n if (result.done) { // Remove coroutines that have finished\n this._active_coroutines.delete(coroutine);\n // Do we have a parent coroutine to push on the stack?\n const parent = this._nested_coroutines.get(coroutine);\n if (parent !== undefined) {\n this._nested_coroutines.delete(coroutine);\n // Readding during iteration will mean that we also step the parent once in this frame.\n // That is not what we want so we add it to a list to be pushed after iteration\n this._cached_array.push(parent);\n }\n }\n else if (result.value !== undefined) { // Nesting coroutine\n this._nested_coroutines.set(result.value, coroutine);\n this._active_coroutines.delete(coroutine);\n this._cached_array.push(result.value);\n }\n });\n for (let i = 0; i < this._cached_array.length; i++) {\n this._active_coroutines.add(this._cached_array[i]);\n }\n }\n start_coroutine(coroutine) {\n this._active_coroutines.add(coroutine);\n }\n stop_and_remove_all_coroutines() {\n this._active_coroutines.clear();\n this._nested_coroutines.clear();\n this._cached_array.length = 0;\n }\n dispose() {\n this.stop_and_remove_all_coroutines();\n }\n /**\n * Disposes an active coroutine and removes all its parents.\n * @param coroutine Active coroutine.\n */\n dispose_active_coroutine_chain(coroutine) {\n this._active_coroutines.delete(coroutine);\n let parent;\n while ((parent = this._nested_coroutines.get(coroutine))) {\n this._nested_coroutines.delete(coroutine);\n coroutine = parent;\n }\n }\n}\n//# sourceMappingURL=CoroutineManager.js.map","import { ThinEngine } from \"../../Engines/thinEngine.js\";\nimport { InternalTexture, InternalTextureSource } from \"../../Materials/Textures/internalTexture.js\";\nThinEngine.prototype.createDynamicTexture = function (width, height, generateMipMaps, samplingMode) {\n const texture = new InternalTexture(this, InternalTextureSource.Dynamic);\n texture.baseWidth = width;\n texture.baseHeight = height;\n if (generateMipMaps) {\n width = this.needPOTTextures ? ThinEngine.GetExponentOfTwo(width, this._caps.maxTextureSize) : width;\n height = this.needPOTTextures ? ThinEngine.GetExponentOfTwo(height, this._caps.maxTextureSize) : height;\n }\n // this.resetTextureCache();\n texture.width = width;\n texture.height = height;\n texture.isReady = false;\n texture.generateMipMaps = generateMipMaps;\n texture.samplingMode = samplingMode;\n this.updateTextureSamplingMode(samplingMode, texture);\n this._internalTexturesCache.push(texture);\n return texture;\n};\nThinEngine.prototype.updateDynamicTexture = function (texture, source, invertY, premulAlpha = false, format, forceBindTexture = false, \n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nallowGPUOptimization = false) {\n if (!texture) {\n return;\n }\n const gl = this._gl;\n const target = gl.TEXTURE_2D;\n const wasPreviouslyBound = this._bindTextureDirectly(target, texture, true, forceBindTexture);\n this._unpackFlipY(invertY === undefined ? texture.invertY : invertY);\n if (premulAlpha) {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1);\n }\n const textureType = this._getWebGLTextureType(texture.type);\n const glformat = this._getInternalFormat(format ? format : texture.format);\n const internalFormat = this._getRGBABufferInternalSizedFormat(texture.type, glformat);\n gl.texImage2D(target, 0, internalFormat, glformat, textureType, source);\n if (texture.generateMipMaps) {\n gl.generateMipmap(target);\n }\n if (!wasPreviouslyBound) {\n this._bindTextureDirectly(target, null);\n }\n if (premulAlpha) {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0);\n }\n texture.isReady = true;\n};\n//# sourceMappingURL=engine.dynamicTexture.js.map","import { Logger } from \"../../Misc/logger.js\";\nimport { Texture } from \"../../Materials/Textures/texture.js\";\n\nimport \"../../Engines/Extensions/engine.dynamicTexture.js\";\n/**\n * A class extending Texture allowing drawing on a texture\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/dynamicTexture\n */\nexport class DynamicTexture extends Texture {\n /**\n * Creates a DynamicTexture\n * @param name defines the name of the texture\n * @param options provides 3 alternatives for width and height of texture, a canvas, object with width and height properties, number for both width and height\n * @param scene defines the scene where you want the texture\n * @param generateMipMaps defines the use of MinMaps or not (default is false)\n * @param samplingMode defines the sampling mode to use (default is Texture.TRILINEAR_SAMPLINGMODE)\n * @param format defines the texture format to use (default is Engine.TEXTUREFORMAT_RGBA)\n * @param invertY defines if the texture needs to be inverted on the y axis during loading\n */\n constructor(name, options, scene = null, generateMipMaps = false, samplingMode = 3, format = 5, invertY) {\n super(null, scene, !generateMipMaps, invertY, samplingMode, undefined, undefined, undefined, undefined, format);\n this.name = name;\n this.wrapU = Texture.CLAMP_ADDRESSMODE;\n this.wrapV = Texture.CLAMP_ADDRESSMODE;\n this._generateMipMaps = generateMipMaps;\n const engine = this._getEngine();\n if (!engine) {\n return;\n }\n if (options.getContext) {\n this._canvas = options;\n this._texture = engine.createDynamicTexture(options.width, options.height, generateMipMaps, samplingMode);\n }\n else {\n this._canvas = engine.createCanvas(1, 1);\n if (options.width || options.width === 0) {\n this._texture = engine.createDynamicTexture(options.width, options.height, generateMipMaps, samplingMode);\n }\n else {\n this._texture = engine.createDynamicTexture(options, options, generateMipMaps, samplingMode);\n }\n }\n const textureSize = this.getSize();\n if (this._canvas.width !== textureSize.width) {\n this._canvas.width = textureSize.width;\n }\n if (this._canvas.height !== textureSize.height) {\n this._canvas.height = textureSize.height;\n }\n this._context = this._canvas.getContext(\"2d\");\n }\n /**\n * Get the current class name of the texture useful for serialization or dynamic coding.\n * @returns \"DynamicTexture\"\n */\n getClassName() {\n return \"DynamicTexture\";\n }\n /**\n * Gets the current state of canRescale\n */\n get canRescale() {\n return true;\n }\n _recreate(textureSize) {\n this._canvas.width = textureSize.width;\n this._canvas.height = textureSize.height;\n this.releaseInternalTexture();\n this._texture = this._getEngine().createDynamicTexture(textureSize.width, textureSize.height, this._generateMipMaps, this.samplingMode);\n }\n /**\n * Scales the texture\n * @param ratio the scale factor to apply to both width and height\n */\n scale(ratio) {\n const textureSize = this.getSize();\n textureSize.width *= ratio;\n textureSize.height *= ratio;\n this._recreate(textureSize);\n }\n /**\n * Resizes the texture\n * @param width the new width\n * @param height the new height\n */\n scaleTo(width, height) {\n const textureSize = this.getSize();\n textureSize.width = width;\n textureSize.height = height;\n this._recreate(textureSize);\n }\n /**\n * Gets the context of the canvas used by the texture\n * @returns the canvas context of the dynamic texture\n */\n getContext() {\n return this._context;\n }\n /**\n * Clears the texture\n * @param clearColor Defines the clear color to use\n */\n clear(clearColor) {\n const size = this.getSize();\n if (clearColor) {\n this._context.fillStyle = clearColor;\n }\n this._context.clearRect(0, 0, size.width, size.height);\n }\n /**\n * Updates the texture\n * @param invertY defines the direction for the Y axis (default is true - y increases downwards)\n * @param premulAlpha defines if alpha is stored as premultiplied (default is false)\n * @param allowGPUOptimization true to allow some specific GPU optimizations (subject to engine feature \"allowGPUOptimizationsForGUI\" being true)\n */\n update(invertY, premulAlpha = false, allowGPUOptimization = false) {\n this._getEngine().updateDynamicTexture(this._texture, this._canvas, invertY === undefined ? true : invertY, premulAlpha, this._format || undefined, undefined, allowGPUOptimization);\n }\n /**\n * Draws text onto the texture\n * @param text defines the text to be drawn\n * @param x defines the placement of the text from the left\n * @param y defines the placement of the text from the top when invertY is true and from the bottom when false\n * @param font defines the font to be used with font-style, font-size, font-name\n * @param color defines the color used for the text\n * @param fillColor defines the color for the canvas, use null to not overwrite canvas (this bleands with the background to replace, use the clear function)\n * @param invertY defines the direction for the Y axis (default is true - y increases downwards)\n * @param update defines whether texture is immediately update (default is true)\n */\n drawText(text, x, y, font, color, fillColor, invertY, update = true) {\n const size = this.getSize();\n if (fillColor) {\n this._context.fillStyle = fillColor;\n this._context.fillRect(0, 0, size.width, size.height);\n }\n this._context.font = font;\n if (x === null || x === undefined) {\n const textSize = this._context.measureText(text);\n x = (size.width - textSize.width) / 2;\n }\n if (y === null || y === undefined) {\n const fontSize = parseInt(font.replace(/\\D/g, \"\"));\n y = size.height / 2 + fontSize / 3.65;\n }\n this._context.fillStyle = color || \"\";\n this._context.fillText(text, x, y);\n if (update) {\n this.update(invertY);\n }\n }\n /**\n * Clones the texture\n * @returns the clone of the texture.\n */\n clone() {\n const scene = this.getScene();\n if (!scene) {\n return this;\n }\n const textureSize = this.getSize();\n const newTexture = new DynamicTexture(this.name, textureSize, scene, this._generateMipMaps);\n // Base texture\n newTexture.hasAlpha = this.hasAlpha;\n newTexture.level = this.level;\n // Dynamic Texture\n newTexture.wrapU = this.wrapU;\n newTexture.wrapV = this.wrapV;\n return newTexture;\n }\n /**\n * Serializes the dynamic texture. The scene should be ready before the dynamic texture is serialized\n * @returns a serialized dynamic texture object\n */\n serialize() {\n const scene = this.getScene();\n if (scene && !scene.isReady()) {\n Logger.Warn(\"The scene must be ready before serializing the dynamic texture\");\n }\n const serializationObject = super.serialize();\n if (DynamicTexture._IsCanvasElement(this._canvas)) {\n serializationObject.base64String = this._canvas.toDataURL();\n }\n serializationObject.invertY = this._invertY;\n serializationObject.samplingMode = this.samplingMode;\n return serializationObject;\n }\n static _IsCanvasElement(canvas) {\n return canvas.toDataURL !== undefined;\n }\n /** @internal */\n _rebuild() {\n this.update();\n }\n}\n//# sourceMappingURL=dynamicTexture.js.map","import { DynamicTexture as BABYLON_DynamicTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/dynamicTexture.js';\nimport { ViewerMaterial } from './material/ViewerMaterial.js';\nimport { Mesh as BABYLON_Mesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js';\nimport { VertexData as BABYLON_VertexData } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.vertexData.js';\nimport { Quaternion as BABYLON_Quaternion } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Engine as BABYLON_Engine } from '@inter-ikea-betrakta-babylonjs/core/Engines/engine.js';\nimport { IColor } from '../api.js';\nimport { RENDER_LAYER_UI, RenderLayerMask } from './RenderLayer.js';\nfunction hex_from_color(color) {\n const saturated_color = IColor.saturate(color);\n let r = Math.floor(saturated_color.r * 255).toString(16);\n r = r.length === 1 ? `0${r}` : r;\n let g = Math.floor(saturated_color.g * 255).toString(16);\n g = g.length === 1 ? `0${g}` : g;\n let b = Math.floor(saturated_color.b * 255).toString(16);\n b = b.length === 1 ? `0${b}` : b;\n return `#${r.length === 1 ? '0' : ''}${r}${g.length === 1 ? '0' : ''}${g}${b.length === 1 ? '0' : ''}${b}`;\n}\nexport class TextField {\n constructor(_viewer, _font_size, _max_length) {\n this._viewer = _viewer;\n this._font_size = _font_size;\n this._max_length = _max_length;\n this._text = '';\n this._render_layer_mask = new RenderLayerMask([RENDER_LAYER_UI]);\n this._width_height_ratio = 0.62;\n this._worldspace_height = 0.1;\n this.background_color = null;\n this.stroke_text = true;\n // With our monospace font, width is a radio of height, we add 20 pixels of extra padding (10+10)\n this._texture_width = 2048;\n this._texture = new BABYLON_DynamicTexture('TextFieldDynamicText', { width: Math.floor(this._font_size * this._max_length * this._width_height_ratio), height: this._font_size }, this._viewer.scene, true);\n this._material = new ViewerMaterial('TextFieldMaterial', this._viewer.scene, this._viewer);\n this._material.albedoTexture = this._texture;\n this._material.opacityTexture = this._texture;\n this._material.unlit = true;\n this._plane = new BABYLON_Mesh('TextFieldMesh', this._viewer.scene);\n this._plane.renderingGroupId = 3; // Same as lines (on top)\n this._plane.onAfterWorldMatrixUpdateObservable.add(() => {\n this._viewer.mark_scene_dirty();\n this._viewer.mark_world_bounds_dirty();\n });\n this._material.depthFunction = BABYLON_Engine.ALWAYS;\n this._vertex_data = new BABYLON_VertexData();\n this._plane.material = this._material;\n this._index_buffer = new Uint16Array(6);\n this._index_buffer[0] = 0;\n this._index_buffer[1] = 2;\n this._index_buffer[2] = 1;\n this._index_buffer[3] = 0;\n this._index_buffer[4] = 3;\n this._index_buffer[5] = 2;\n // There are 4 verts with 3 floats per position and 2 floats per uv\n this._position_buffer = new Float32Array(4 * 3);\n this._uv_buffer = new Float32Array(4 * 2);\n this._vertex_data.positions = this._position_buffer;\n this._vertex_data.uvs = this._uv_buffer;\n this._vertex_data.indices = this._index_buffer;\n this.update_mesh_buffers(this._worldspace_height);\n this._viewer.asset_manager.text_fields.add(this);\n }\n get_meshes() {\n return [this._plane];\n }\n get_width() {\n return this._worldspace_height * this._width_height_ratio * this._text.length;\n }\n set_position(x, y, z) {\n this._plane.position.set(x, y, z);\n }\n set_rotation(x, y, z) {\n if (!this._plane.rotationQuaternion) {\n this._plane.rotationQuaternion = new BABYLON_Quaternion();\n }\n BABYLON_Quaternion.FromEulerAnglesToRef(x, y, z, this._plane.rotationQuaternion);\n }\n update_render_layer_mask() {\n this._plane.layerMask = this._render_layer_mask.bitmap;\n this._viewer.mark_scene_dirty();\n }\n set_render_layer_mask(mask) {\n if (this._render_layer_mask.bitmap === mask.bitmap)\n return;\n this._render_layer_mask = Object.assign({}, mask);\n this.update_render_layer_mask();\n }\n get_render_layer_mask() {\n return this._render_layer_mask;\n }\n update_mesh_buffers(height) {\n const half_height = height * 0.5;\n const half_width = height * this._width_height_ratio * this._text.length * 0.5;\n // 1 _______2\n // | /|\n // | / |\n // |/______|\n // 0 3\n // 0\n // TODO: Fix better UVs\n this._position_buffer[0] = -half_width;\n this._position_buffer[1] = 0;\n this._position_buffer[2] = -half_height;\n this._uv_buffer[0] = 0;\n this._uv_buffer[1] = 1;\n // 1\n this._position_buffer[3] = -half_width;\n this._position_buffer[4] = 0;\n this._position_buffer[5] = half_height;\n this._uv_buffer[2] = 0;\n this._uv_buffer[3] = 0;\n // 2\n this._position_buffer[6] = half_width;\n this._position_buffer[7] = 0;\n this._position_buffer[8] = half_height;\n this._uv_buffer[4] = this._text.length / this._max_length;\n this._uv_buffer[5] = 0;\n // 3\n this._position_buffer[9] = half_width;\n this._position_buffer[10] = 0;\n this._position_buffer[11] = -half_height;\n this._uv_buffer[6] = this._text.length / this._max_length;\n this._uv_buffer[7] = 1;\n this._vertex_data.applyToMesh(this._plane);\n }\n set_text(text) {\n if (text.length > this._max_length) {\n console.error(`text is more than ${this._max_length} characters. this requires a larger buffer`);\n }\n this._text = text;\n const size = this._texture.getSize();\n const texture_context = this._texture.getContext();\n texture_context.clearRect(0, 0, size.width, size.height);\n if (this.background_color) {\n texture_context.fillStyle = hex_from_color(this.background_color);\n texture_context.fillRect(0, 0, size.width, size.height);\n }\n texture_context.font = `bold ${this._font_size}px arial`;\n texture_context.fillStyle = '#FFFFFF';\n texture_context.fillText(text, 0, this._font_size * 0.75);\n if (this.stroke_text) {\n texture_context.strokeStyle = '#000';\n texture_context.strokeText(text, 0, this._font_size * 0.75);\n }\n this._texture.update();\n this.update_mesh_buffers(this._worldspace_height);\n this._viewer.mark_scene_dirty();\n }\n dispose() {\n this._material.dispose();\n this._texture.dispose();\n this._plane.dispose();\n this._viewer.asset_manager.text_fields.delete(this);\n }\n}\n//# sourceMappingURL=TextField.js.map","import { IVector3 } from '../../api.js';\nimport { Vector3 as BABYLON_Vector3, Vector4 as BABYLON_Vector4, Matrix as BABYLON_Matrix } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { is_aabb_valid, update_aabb_by_transformed_aabb, aabb_corners } from '../utility/Bounds.js';\nexport function get_box_framed_perspective_camera_matrix(viewer, object_ids, projection, direction, loose_up, include_child_objects, margin_world, margin_viewport) {\n if (Math.abs(IVector3.dot(direction, loose_up)) > 0.999) {\n return Promise.reject(new Error(\"'direction' and 'up' parameters are parallel.\"));\n }\n // If the margin is => 0.5, there's no space left for the actual object.\n if (Math.abs(margin_viewport) >= 0.5) {\n return Promise.reject(new Error(\"'margin_viewport' for framing must be in the range -0.5 to 0.5 (exclusive)\"));\n }\n const camera_matrix = new BABYLON_Matrix();\n const direction_babylon = new BABYLON_Vector3();\n const up_babylon = new BABYLON_Vector3();\n const view_matrix = camera_matrix.clone();\n // Calculate our initla view + camera matrices\n BABYLON_Matrix.LookAtRHToRef(BABYLON_Vector3.ZeroReadOnly, direction_babylon.fromIVector3(direction), up_babylon.fromIVector3(loose_up), view_matrix);\n view_matrix.invertToRef(camera_matrix);\n // Fetch object references\n const objects = viewer.viewer_scene.get_objects(object_ids);\n if (include_child_objects) {\n const parent_objects_length = objects.length;\n for (let i = 0; i < parent_objects_length; i++) {\n objects[i].children_iterator(true, false, (object) => {\n objects.push(object);\n });\n }\n }\n // Fetch all object bounds for framing and camera positioning\n const all_objects_bounds = [];\n for (let i = 0; i < objects.length; i++) {\n all_objects_bounds.push(objects[i].get_local_space_bounding_info().then((bounds_local) => {\n return {\n bounds: bounds_local.aabb,\n transform: objects[i].get_world_matrix()\n };\n }));\n }\n return Promise.all(all_objects_bounds).then((all_bounds) => {\n // Calculate center of our total bounding volume for camera positioning\n const camera_position = new BABYLON_Vector3();\n const world_bounds = {\n min: new BABYLON_Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE),\n max: new BABYLON_Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE)\n };\n for (const data of all_bounds) {\n if (is_aabb_valid(data.bounds)) {\n update_aabb_by_transformed_aabb(world_bounds, data.bounds, data.transform);\n }\n }\n const world_center = IVector3.scale(IVector3.add(world_bounds.min, world_bounds.max), 0.5);\n camera_position.fromIVector3(world_center);\n // Set the camera position in both our camera and view matrices.\n camera_matrix.setTranslation(camera_position);\n camera_matrix.invertToRef(view_matrix);\n const vertex = new BABYLON_Vector3(0, 0, 0);\n const transformed_vertex = new BABYLON_Vector4();\n /*\n We will be calculating our framing as the distance required to move the camera from the center of the bounding volume.\n To calculate this distance, we need to consider our field of view, which is what these \"perspective_scaling\" variables are for.\n \n //Consider that we split our view frustum in half along a central plane (this is why we half our field of view).\n \n We simplify our problem by only considering half our view frustum, and thus only half of our field-of-view angle.\n We do that by \"splitting\" our frustom by a plane passing through the origin (in view space, so our camera's position in world space),\n and is a horizontal plane for our horizontal case, and vertical for our vertical case.\n This means that for our horizontal case, we will only be considering the absolute value of our view space vertices' x-components, and same for y-components in our vertical case.\n \n In view space, if we have a vertex V, then the field of view we need for horizontal fitting should satisfy the below equations:\n (V.x and V.y are known, V.z is the distance we need to calculate for framing)\n (length(V) is thus also unknown, and is the distance from the fitted camera to the vertex)\n \n 1) sin(horizontal_fov / 2) * length(V) = abs(V.x)\n 2) cos(horizontal_fov / 2) * length(V) = V.z\n \n Then we divide 2) by 1) and we get:\n \n cos(horizontal_fov / 2) * length(V)\n ----------------------------------- = V.z / abs(V.x)\n sin(horizontal_fov / 2) * length(V)\n \n Now our unknown expression length(V) is canceled out and we get:\n \n cos(horizontal_fov / 2) / sin(horizontal_fov / 2) = V.z / abs(V.x) =>\n cot(horizontal_fov / 2) * abs(V.x) = V.z\n \n and thus we have calculated our unknown V.z to satisfy that we fit the object!\n This solution is monotonic with regards to V.x, so we only need to calculate this for the \"extreme\" values of V, which means our AABB's vertices is enough.\n The solution is the same for vertical field of view, except you would use V.y instead of V.x.\n */\n // These are really cot(0.5 * fov), but javascript doesn't supply that.\n const horizontal_perspective_scaling = 1.0 / Math.tan(0.5 * projection.horizontal_fov);\n const vertical_perspective_scaling = 1.0 / Math.tan(0.5 * projection.vertical_fov);\n const viewport_margin_scale = 1.0 / (1.0 - 2.0 * margin_viewport);\n const viewspace_bounds = {\n min: new BABYLON_Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE),\n max: new BABYLON_Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE)\n };\n let distance = -Number.MAX_VALUE;\n const cache_model_view_matrix = new BABYLON_Matrix();\n // Calculate the maximum distance we need for the camera to fit all our vertices\n for (const data of all_bounds) {\n if (!is_aabb_valid(data.bounds)) {\n continue;\n }\n data.transform.multiplyToRef(view_matrix, cache_model_view_matrix);\n for (let i = 0; i < aabb_corners.length; i++) {\n vertex.x = data.bounds.min.x + aabb_corners[i].x * (data.bounds.max.x - data.bounds.min.x);\n vertex.y = data.bounds.min.y + aabb_corners[i].y * (data.bounds.max.y - data.bounds.min.y);\n vertex.z = data.bounds.min.z + aabb_corners[i].z * (data.bounds.max.z - data.bounds.min.z);\n BABYLON_Vector4.TransformCoordinatesToRef(vertex, cache_model_view_matrix, transformed_vertex);\n const to_near_plane = transformed_vertex.z;\n distance = Math.max(distance, to_near_plane + (Math.abs(transformed_vertex.x) + margin_world) * horizontal_perspective_scaling * viewport_margin_scale, to_near_plane + (Math.abs(transformed_vertex.y) + margin_world) * vertical_perspective_scaling * viewport_margin_scale);\n // Also calculate our viewspace bounds while we're at it.\n IVector3.min_to_ref(viewspace_bounds.min, transformed_vertex, viewspace_bounds.min);\n IVector3.max_to_ref(viewspace_bounds.max, transformed_vertex, viewspace_bounds.max);\n }\n }\n if (distance === -Number.MAX_VALUE) {\n return Promise.reject(new Error(\"'Failed to frame any objects.'\"));\n }\n camera_matrix.setTranslation(camera_position.add(direction_babylon.scale(-distance)));\n camera_matrix.invertToRef(view_matrix);\n // Make sure the given projection's near/far planes are sufficient for our framing.\n const bounds_z_range = (viewspace_bounds.max.z - viewspace_bounds.min.z);\n const framing = {\n camera_matrix: [\n new BABYLON_Vector4(),\n new BABYLON_Vector4(),\n new BABYLON_Vector4(),\n new BABYLON_Vector4()\n ],\n z_near: distance - 0.5 * bounds_z_range,\n z_far: distance + 0.5 * bounds_z_range,\n framing_target_position: camera_position\n };\n camera_matrix.toIMatrix4ToRef(framing.camera_matrix);\n return framing;\n });\n}\nexport function get_precise_framed_perspective_camera_matrix(viewer, object_ids, projection, direction, loose_up, include_child_objects, margin_world, margin_viewport) {\n /*\n This function is kind of a WIP, as I need to figure out how to fit the objects more tightly (not positioning camera from volume center).\n There is quite a lot of code duplication from get_box_framed_perspective_camera_matrix as it's pretty much the same algorithm,\n but this will probably change.\n As such I don't explain the algorithm here, but look at get_box_framed_perspective_camera_matrix for explanation.\n Difference is that we use the model's raw vertices, instead of just their AABB's vertices.\n --Tore\n */\n if (Math.abs(IVector3.dot(direction, loose_up)) > 0.999) {\n return Promise.reject(new Error(\"'direction' and 'up' parameters are parallel.\"));\n }\n // If the margin is => 0.5, there's no space left for the actual object.\n if (Math.abs(margin_viewport) >= 0.5) {\n return Promise.reject(new Error(\"'margin_viewport' for framing must be in the range -0.5 to 0.5 (exclusive)\"));\n }\n // TODO: Change algorithm to put the camera origin so that the objects are precisely framed, instead of putting camera origin on volume center.\n const camera_matrix = new BABYLON_Matrix();\n const direction_babylon = new BABYLON_Vector3();\n const up_babylon = new BABYLON_Vector3();\n const view_matrix = camera_matrix.clone();\n BABYLON_Matrix.LookAtRHToRef(BABYLON_Vector3.ZeroReadOnly, direction_babylon.fromIVector3(direction), up_babylon.fromIVector3(loose_up), view_matrix);\n view_matrix.invertToRef(camera_matrix);\n const all_objects_ready_promises = [];\n const objects = viewer.viewer_scene.get_objects(object_ids);\n if (include_child_objects) {\n const parent_objects_length = objects.length;\n for (let i = 0; i < parent_objects_length; i++) {\n objects[i].children_iterator(true, false, (object) => {\n objects.push(object);\n });\n }\n }\n for (let i = 0; i < objects.length; i++) {\n all_objects_ready_promises.push(objects[i].ready);\n }\n return Promise.all(all_objects_ready_promises).then(() => {\n const camera_position = new BABYLON_Vector3();\n const cache_model_view_matrix = new BABYLON_Matrix();\n const viewspace_bounds = {\n min: new BABYLON_Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE),\n max: new BABYLON_Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE)\n };\n for (let i = 0; i < objects.length; i++) {\n objects[i].get_world_matrix().multiplyToRef(view_matrix, cache_model_view_matrix);\n objects[i].traverse_vertices_local_space((vertex) => {\n IVector3.min_to_ref(viewspace_bounds.min, vertex, viewspace_bounds.min);\n IVector3.max_to_ref(viewspace_bounds.max, vertex, viewspace_bounds.max);\n }, cache_model_view_matrix);\n }\n const viewspace_center = IVector3.scale(IVector3.add(viewspace_bounds.min, viewspace_bounds.max), 0.5);\n BABYLON_Vector3.TransformCoordinatesFromFloatsToRef(viewspace_center.x, viewspace_center.y, viewspace_center.z, camera_matrix, camera_position);\n camera_matrix.setTranslation(camera_position);\n camera_matrix.invertToRef(view_matrix);\n const horizontal_perspective_scaling = Math.tan(0.5 * projection.horizontal_fov) * (1.0 - 2.0 * margin_viewport);\n const vertical_perspective_scaling = Math.tan(0.5 * projection.vertical_fov) * (1.0 - 2.0 * margin_viewport);\n let distance = -Number.MAX_VALUE;\n let min_z = Number.MAX_VALUE;\n let max_z = -Number.MAX_VALUE;\n for (let i = 0; i < objects.length; i++) {\n objects[i].get_world_matrix().multiplyToRef(view_matrix, cache_model_view_matrix);\n objects[i].traverse_vertices_local_space((vertex) => {\n const to_near_plane = vertex.z;\n distance = Math.max(distance, to_near_plane + (Math.abs(vertex.x) + margin_world) / horizontal_perspective_scaling, to_near_plane + (Math.abs(vertex.y) + margin_world) / vertical_perspective_scaling);\n min_z = Math.min(min_z, vertex.z);\n max_z = Math.max(max_z, vertex.z);\n }, cache_model_view_matrix);\n }\n if (distance === -Number.MAX_VALUE) {\n return Promise.reject(new Error(\"'Failed to frame any objects.'\"));\n }\n camera_matrix.setTranslation(camera_position.add(direction_babylon.scale(-distance)));\n camera_matrix.invertToRef(view_matrix);\n const bounds_z_range = max_z - min_z;\n const framing = {\n camera_matrix: [\n new BABYLON_Vector4(),\n new BABYLON_Vector4(),\n new BABYLON_Vector4(),\n new BABYLON_Vector4()\n ],\n z_near: distance - 0.5 * bounds_z_range,\n z_far: distance + 0.5 * bounds_z_range,\n framing_target_position: camera_position\n };\n camera_matrix.toIMatrix4ToRef(framing.camera_matrix);\n return framing;\n });\n}\n//# sourceMappingURL=ObjectFraming.js.map","let test_query_overload_failure = false;\n// The name of the WebGL extension\nconst extension_name = 'EXT_disjoint_timer_query_webgl2';\n/**\n * A helper class to create and manage GPU timer queries.\n * Since GPU interfacing is truly asynchronous (not javascript async), the usage might be different than you'd expect.\n * Usage:\n * - start_timer()\n * - [do GPU work...]\n * - stop_timer()\n * - [continue normal operations, make sure to render frames]\n * - if (has_result()) {\n * get_result()\n * clear_result()\n * }\n */\nexport class WebGLTimerQuery {\n static is_supported(gl) {\n return gl.getExtension(extension_name) !== null;\n }\n constructor(name, gl) {\n this._query = null;\n this._extension = null;\n this._gl = gl;\n this.name = name;\n this._extension = gl.getExtension(extension_name);\n if (!this._extension) {\n console.warn('WebGL2 timer query extension not available');\n return;\n }\n WebGLTimerQuery.overload_gl_timer_queries(this._gl, this._extension);\n }\n start_timer() {\n if (!this._extension) {\n console.error('Timer query not supported.');\n return;\n }\n if (this._query) {\n console.error('Timer query already created. Did you forget to call clear_result?');\n }\n this._query = this._gl.createQuery();\n if (!this._query) {\n console.error('Failed to create timer query');\n return;\n }\n // TS ignore here because we've added a (optional) parameter to this function.\n // @ts-ignore\n this._gl.beginQuery(this._extension.TIME_ELAPSED_EXT, this._query, this);\n }\n // Stops the timer. The result will be available later when the frame in flight has finished rendering.\n // See has_result and get_result\n stop_timer() {\n if (!this._query) {\n console.error('Timer query not created.');\n return;\n }\n // TS ignore here because we've added a (optional) parameter to this function.\n // 'this._extension' won't be null as it was required to create 'this._query'\n // @ts-ignore\n this._gl.endQuery(this._extension.TIME_ELAPSED_EXT, this);\n }\n // Check if we have a result to fetch.\n has_result() {\n if (!this._query) {\n console.error('Timer query not created');\n return false;\n }\n const available = this._gl.getQueryParameter(this._query, this._gl.QUERY_RESULT_AVAILABLE);\n return !!available;\n }\n // Returns the elapsed time in nanoseconds\n get_result() {\n if (!this._query) {\n console.error('Timer query not created');\n return null;\n }\n const time = this._gl.getQueryParameter(this._query, this._gl.QUERY_RESULT);\n if (typeof time === 'number') {\n return time;\n }\n else {\n console.error('Failed to fetch elapsed time.');\n return null;\n }\n }\n // Clears the result and deletes the query.\n clear_result() {\n if (this._query) {\n this._gl.deleteQuery(this._query);\n this._query = null;\n }\n }\n dispose() {\n this.clear_result();\n }\n // Disables anyone else from doing timer queries in any gl context\n static disable_external_timer_queries() {\n WebGLTimerQuery._block_external_timer_queries = true;\n }\n // Allows anyone to do timer queries in any gl context\n static enable_external_timer_queries() {\n WebGLTimerQuery._block_external_timer_queries = false;\n }\n // Ugly code to overload functions for beginning and ending WebGL queries, to keep track of state.\n // Allows us to block others (Babylon) from doing timer queries, to prioritize our own.\n // Also gives informational error messages.\n static overload_gl_timer_queries(_gl, _extension) {\n // Store to say that we've already overloaded these _query functions.\n // @ts-ignore\n if (_gl._viewer_overloaded_queries === true) {\n return;\n }\n // @ts-ignore\n _gl._viewer_overloaded_queries = true;\n // Store the current active timer _query\n let active_query = null;\n const original_begin_query_func = _gl.beginQuery.bind(_gl);\n const original_end_query_func = _gl.endQuery.bind(_gl);\n // Helper function for error messages.\n const get_active_query_name = () => {\n if (active_query === null) {\n return 'null';\n }\n else if (active_query === 'external') {\n return 'external';\n }\n else {\n return active_query.name;\n }\n };\n const new_begin = (target, _query, viewer_timer_query) => {\n // We only care about the TIME_ELAPSED _query.\n if (target === _extension.TIME_ELAPSED_EXT) {\n if (WebGLTimerQuery._block_external_timer_queries && viewer_timer_query === undefined) {\n // Blocked external _query!\n return;\n }\n // Make sure we have no active _query already running.\n if (active_query !== null) {\n console.error('Trying to begin query while another is running! Attempted _query: ' + ((viewer_timer_query === null || viewer_timer_query === void 0 ? void 0 : viewer_timer_query.name) || 'external') + ', already running query: ' + get_active_query_name() + '. Blocking query begin.');\n test_query_overload_failure = true;\n return;\n }\n active_query = viewer_timer_query !== null && viewer_timer_query !== void 0 ? viewer_timer_query : 'external';\n }\n // Pass-through to the original Web_gl function\n original_begin_query_func(target, _query);\n };\n const new_end = (target, viewer_timer_query) => {\n if (target === _extension.TIME_ELAPSED_EXT) {\n if (WebGLTimerQuery._block_external_timer_queries && viewer_timer_query === undefined) {\n // The begin should have been blocked, so no need to end.\n // But failsafe, in case someone blocked whilst an external _query was running.\n if (active_query === 'external') {\n console.error('Tracked query is not null. Did you disable external timer queries while one was running? Failsafe and ending the query, expect undefined timer behaviour/results.');\n test_query_overload_failure = true;\n }\n else {\n return;\n }\n }\n if (active_query === null) {\n // This shouldn't happen\n console.error('Tracked active query was null, did you enable external queries while an external query was running? Or did you double-end the query? Attempted query: ' + ((viewer_timer_query === null || viewer_timer_query === void 0 ? void 0 : viewer_timer_query.name) || 'external') + '. Blocking query end.');\n test_query_overload_failure = true;\n return;\n }\n else if (active_query !== 'external') {\n if (active_query !== viewer_timer_query) {\n console.error('Timer query collision. Trying to end query ' + (viewer_timer_query === null || viewer_timer_query === void 0 ? void 0 : viewer_timer_query.name) + ', but another is active: ' + active_query.name + '\\nBlocking query end.');\n test_query_overload_failure = true;\n return;\n }\n }\n else if (viewer_timer_query !== undefined) {\n console.error('Trying to end viewer query: ' + viewer_timer_query.name + ', while an external query is running. Blocking query end.');\n test_query_overload_failure = true;\n return;\n }\n active_query = null;\n }\n original_end_query_func(target);\n };\n _gl.beginQuery = new_begin.bind(_gl);\n _gl.endQuery = new_end.bind(_gl);\n }\n}\nWebGLTimerQuery._block_external_timer_queries = false;\n// Super ugly testing for error checking on our custom _glBegin_query, _glEnd_query function overwrites.ƒ\n// The console will spit out informational errors, but shouldn't say any Test failed: ...\nexport function test_web_gl_timer_queries(_gl) {\n const _extension = _gl.getExtension(extension_name);\n if (!_extension) {\n console.error(\"Can't test queries, extension is not supported.\");\n return;\n }\n let test = 'No test';\n const check_error = (expected) => {\n if (expected !== test_query_overload_failure) {\n console.error('Test failed: ' + test);\n }\n test = 'Unnamed test';\n test_query_overload_failure = false;\n };\n // Test block 1: No blocking of external queries\n WebGLTimerQuery.enable_external_timer_queries();\n const main_timer = new WebGLTimerQuery('primary', _gl);\n const secondary_timer = new WebGLTimerQuery('secondary', _gl);\n check_error(false);\n console.info('Running tests');\n // Test 1: Just a normal timer query\n main_timer.start_timer();\n check_error(false);\n main_timer.stop_timer();\n check_error(false);\n main_timer.clear_result();\n secondary_timer.clear_result();\n // Test 2: Run overlapping viewer queries\n main_timer.start_timer();\n check_error(false);\n secondary_timer.start_timer();\n check_error(true);\n main_timer.stop_timer();\n check_error(false);\n secondary_timer.stop_timer();\n check_error(true);\n main_timer.clear_result();\n secondary_timer.clear_result();\n // Test 3: Run external query inside internal query\n main_timer.start_timer();\n check_error(false);\n let external_query = _gl.createQuery();\n _gl.beginQuery(_extension.TIME_ELAPSED_EXT, external_query);\n check_error(true);\n main_timer.stop_timer();\n check_error(false);\n _gl.endQuery(_extension.TIME_ELAPSED_EXT);\n check_error(true);\n _gl.deleteQuery(external_query);\n main_timer.clear_result();\n secondary_timer.clear_result();\n // Test 4: Internal query inside external query\n external_query = _gl.createQuery();\n _gl.beginQuery(_extension.TIME_ELAPSED_EXT, external_query);\n check_error(false);\n main_timer.start_timer();\n check_error(true);\n main_timer.stop_timer();\n check_error(true);\n _gl.endQuery(_extension.TIME_ELAPSED_EXT);\n check_error(false);\n _gl.deleteQuery(external_query);\n main_timer.clear_result();\n secondary_timer.clear_result();\n // Test block 2: Block external queries\n WebGLTimerQuery.disable_external_timer_queries();\n // Test 1: Just a normal timer query\n main_timer.start_timer();\n check_error(false);\n main_timer.stop_timer();\n check_error(false);\n main_timer.clear_result();\n secondary_timer.clear_result();\n // Test 2: Run overlapping viewer queries\n main_timer.start_timer();\n check_error(false);\n secondary_timer.start_timer();\n check_error(true);\n main_timer.stop_timer();\n check_error(false);\n secondary_timer.stop_timer();\n check_error(true);\n main_timer.clear_result();\n secondary_timer.clear_result();\n // Test 3: Run external query inside internal query\n main_timer.start_timer();\n check_error(false);\n external_query = _gl.createQuery();\n _gl.beginQuery(_extension.TIME_ELAPSED_EXT, external_query);\n check_error(false);\n main_timer.stop_timer();\n check_error(false);\n _gl.endQuery(_extension.TIME_ELAPSED_EXT);\n check_error(false);\n _gl.deleteQuery(external_query);\n main_timer.clear_result();\n secondary_timer.clear_result();\n // Test 4: Internal query inside external query\n external_query = _gl.createQuery();\n _gl.beginQuery(_extension.TIME_ELAPSED_EXT, external_query);\n check_error(false);\n main_timer.start_timer();\n check_error(false);\n main_timer.stop_timer();\n check_error(false);\n _gl.endQuery(_extension.TIME_ELAPSED_EXT);\n check_error(false);\n _gl.deleteQuery(external_query);\n console.info('Tests finished.');\n}\n//# sourceMappingURL=WebGLTimerQuery.js.map","import { WebGLTimerQuery } from '../WebGLTimerQuery.js';\nexport class GpuProfilingSection {\n constructor(profiler, _handle, name) {\n this._last_sample_frame_id = -1;\n // This flag can be set to true if the section is unaffected by the normal viewport resolution, such as for shadow map rendering.\n this.is_resolution_independent = false;\n this.profiler = profiler;\n this._handle = _handle;\n this.name = name;\n }\n start() {\n var _a;\n (_a = this.profiler) === null || _a === void 0 ? void 0 : _a.start_section(this);\n }\n stop() {\n var _a;\n (_a = this.profiler) === null || _a === void 0 ? void 0 : _a.stop_section(this);\n }\n get_sample_count() {\n if (this.profiler === null)\n return NaN;\n let count = 0;\n const samples = this.profiler.get_samples(this);\n for (let i = 0; i < samples.length; i++) {\n if (samples[i] >= 0) {\n count += 1;\n }\n }\n return count;\n }\n get_average_duration() {\n if (this.profiler === null)\n return NaN;\n let sum = 0.0;\n let count = 0;\n const samples = this.profiler.get_samples(this);\n for (let i = 0; i < samples.length; i++) {\n if (samples[i] >= 0) {\n sum += samples[i];\n count += 1;\n }\n }\n return sum / Math.max(1, count);\n }\n get_average_cpu_duration() {\n if (this.profiler === null)\n return NaN;\n let sum = 0.0;\n let count = 0;\n const samples = this.profiler.get_cpu_samples(this);\n for (let i = 0; i < samples.length; i++) {\n if (samples[i] >= 0) {\n sum += samples[i];\n count += 1;\n }\n }\n return sum / Math.max(1, count);\n }\n get_average_cpu_load() {\n if (this.profiler === null)\n return NaN;\n let sum = 0.0;\n let count = 0;\n const samples_gpu = this.profiler.get_samples(this);\n const samples_cpu = this.profiler.get_cpu_samples(this);\n for (let i = 0; i < samples_gpu.length; i++) {\n if (samples_gpu[i] >= 0 && samples_cpu[i] >= 0) {\n sum += samples_cpu[i] / samples_gpu[i];\n count += 1;\n }\n }\n return sum / Math.max(1, count);\n }\n clear_results() {\n if (this.profiler === null)\n return;\n const samples = this.profiler.get_samples(this);\n const cpu = this.profiler.get_cpu_samples(this);\n for (let i = 0; i < samples.length; i++) {\n samples[i] = -1.0;\n cpu[i] = -1.0;\n }\n }\n}\nexport class GpuProfiler {\n // Returns the current CPU timestamp in nanoseconds\n _get_cpu_timestamp() {\n // Multiply by 1 million to get nanoseconds, the same unit as the WebGL timer queries\n return performance.now() * 1000000.0;\n }\n static is_supported(gl) {\n return WebGLTimerQuery.is_supported(gl);\n }\n constructor(gl, average_sample_count) {\n this._active_profiling_section = null;\n this._is_profiling = false;\n this._frame_id = 0;\n this._sections_in_frame = 0;\n this._last_render_width = 0;\n this._last_render_height = 0;\n this._update_visualizer_function_handle = null; // this makes sure fps_counters update loop is removed if not enabled.\n this._visualizer_element = null;\n this.visualizer_enable_debug_details = false;\n // How many seconds between visualizer updates\n this.visualizer_render_time_seconds = 1.0;\n this._last_visualizer_update_timestamp = 0;\n this._gl = gl;\n this._sections = [];\n this._timing_average_sampe_count = average_sample_count;\n }\n get_samples(section) {\n return this._sections[section._handle].timer_results;\n }\n get_cpu_samples(section) {\n return this._sections[section._handle].cpu_results;\n }\n create_section(name) {\n const user = new GpuProfilingSection(this, this._sections.length, name);\n const timing_samples = [];\n for (let i = 0; i < this._timing_average_sampe_count; i++) {\n timing_samples.push(-1);\n }\n const cpu_times = [];\n for (let i = 0; i < this._timing_average_sampe_count; i++) {\n cpu_times.push(-1);\n }\n this._sections.push({\n user: user,\n parent: null,\n sample_child_count_accumulator: 0,\n last_child_count: 0,\n timer: new WebGLTimerQuery('GpuProfilingSection_' + name, this._gl),\n timer_is_running: false,\n timer_is_awaiting_result: false,\n timer_results: timing_samples,\n cpu_results: cpu_times,\n cpu_start_timestamp: -1,\n cpu_awaiting_result: -1,\n timer_next_result: 0,\n timer_activated_frame_id: -1,\n last_requested_age: 0\n });\n return user;\n }\n start_frame(render_width, render_height) {\n if (this._last_render_width !== render_width || this._last_render_height !== render_height) {\n // Scrap any existing results to make sure we don't accidentaly read data from incorrect resolutions\n for (let i = 0; i < this._sections.length; i++) {\n if (this._sections[i].user.is_resolution_independent)\n continue;\n this._sections[i].user.clear_results();\n }\n }\n this._last_render_width = render_width;\n this._last_render_height = render_height;\n this._sections_in_frame = 0;\n this._active_profiling_section = null;\n for (let i = 0; i < this._sections.length; i++) {\n this._sections[i].sample_child_count_accumulator = 0;\n const section = this._sections[i];\n if (section.timer_is_awaiting_result && section.timer.has_result()) {\n section.timer_is_awaiting_result = false;\n const result = section.timer.get_result();\n if (result !== null && result > 0) {\n section.cpu_results[section.timer_next_result] = section.cpu_awaiting_result;\n section.timer_results[section.timer_next_result] = result;\n section.timer_next_result = (section.timer_next_result + 1) % section.timer_results.length;\n section.user._last_sample_frame_id = section.timer_activated_frame_id;\n }\n section.timer.clear_result();\n section.cpu_awaiting_result = -1;\n section.cpu_start_timestamp = -1;\n }\n }\n }\n end_frame() {\n if (this._sections_in_frame > 0) {\n this._frame_id += 1;\n }\n if (this._active_profiling_section !== null) {\n console.error('Not all profiling sections have ended: ' + this._active_profiling_section.user.name);\n }\n for (let i = 0; i < this._sections.length; i++) {\n this._sections[i].last_child_count = this._sections[i].sample_child_count_accumulator;\n }\n }\n get_summary() {\n let summary = 'GPU Profiler Summary:\\n';\n for (let i = 0; i < this._sections.length; i++) {\n summary += this._sections[i].user.name + ': ' + Math.floor(this._sections[i].user.get_average_duration() / 1000.0) + ' us\\n';\n }\n return summary;\n }\n start_section(user_section) {\n this._sections_in_frame += 1;\n const section = this._sections[user_section._handle];\n section.parent = this._active_profiling_section;\n this._active_profiling_section = section;\n if (section.timer_is_awaiting_result) {\n // We're already awaiting a result, so timer query is occupied.\n return;\n }\n const parent = section.parent;\n if (parent !== null) {\n parent.sample_child_count_accumulator += 1;\n }\n if (this._is_profiling) {\n return;\n }\n // Determine if we should profile, and if so start it.\n // Stochastically determine if we should profile ourselves, or if one of our children should get the chance.\n const profile = Math.random() < 1.0 / Math.max(1.0, section.last_child_count);\n if (profile) {\n this._is_profiling = true;\n section.timer_is_running = true;\n section.timer_activated_frame_id = this._frame_id;\n section.timer.start_timer();\n section.cpu_start_timestamp = this._get_cpu_timestamp();\n }\n }\n stop_section(user_section) {\n if (this._active_profiling_section !== null) {\n this._active_profiling_section = this._active_profiling_section.parent;\n }\n const section = this._sections[user_section._handle];\n if (section.timer_is_running) {\n section.cpu_awaiting_result = this._get_cpu_timestamp() - section.cpu_start_timestamp;\n section.timer_is_running = false;\n section.timer_is_awaiting_result = true;\n section.timer.stop_timer();\n this._is_profiling = false;\n }\n }\n dispose() {\n this._update_visualizer_function_handle = null;\n if (this._visualizer_element !== null) {\n this._visualizer_element.innerHTML = '';\n document.body.removeChild(this._visualizer_element);\n this._visualizer_element = null;\n }\n for (let i = 0; i < this._sections.length; i++) {\n this._sections[i].user.profiler = null;\n this._sections[i].timer.dispose();\n }\n this._sections = [];\n }\n get_data_as_csv() {\n let csv = '';\n csv += 'section,average,sample_count,age\\n';\n for (let i = 0; i < this._sections.length; i++) {\n const section = this._sections[i];\n const user = section.user;\n csv += user.name.replace(',', '') + ',' + user.get_average_duration() + ',' + user.get_sample_count() + ',' + (user._last_sample_frame_id >= 0 ? (this._frame_id - user._last_sample_frame_id).toFixed(0) : -1) + '\\n';\n }\n return csv;\n }\n enable_visualizer(viewer, enable) {\n if (this._visualizer_element === null) {\n this._visualizer_element = document.createElement('div');\n this._visualizer_element.style.zIndex = '10';\n this._visualizer_element.style.position = 'absolute';\n this._visualizer_element.style.left = '0.5em';\n this._visualizer_element.style.top = '3em';\n this._visualizer_element.style.textAlign = 'left';\n this._visualizer_element.style.fontFamily = 'monospace';\n this._visualizer_element.style.fontSize = '12px';\n this._visualizer_element.style.userSelect = 'none';\n this._visualizer_element.style.pointerEvents = 'none';\n this._visualizer_element.style.background = 'rgba(111, 222, 55, 0.95)';\n document.body.appendChild(this._visualizer_element);\n }\n if (enable) {\n this._visualizer_element.style.display = 'block';\n this._update_visualizer_function_handle = requestAnimationFrame(this.update_visualizer.bind(this));\n }\n else {\n this._visualizer_element.style.display = 'none';\n if (this._update_visualizer_function_handle !== null) {\n cancelAnimationFrame(this._update_visualizer_function_handle);\n }\n this._update_visualizer_function_handle = null;\n }\n }\n update_visualizer() {\n // This code is a real eye-sore, and we should find a better way to do this in the future.\n // Convert nanoseconds to seconds\n const timestamp = this._get_cpu_timestamp() / 1000000000.0;\n if (timestamp - this._last_visualizer_update_timestamp >= this.visualizer_render_time_seconds) {\n this._last_visualizer_update_timestamp = timestamp;\n const style = `\n border-spacing: 32px 6px;\n `;\n let html = '';\n html += '';\n if (this.visualizer_enable_debug_details) {\n html += '';\n }\n html += '';\n for (let i = 0; i < this._sections.length; i++) {\n html += '';\n html += '';\n const cpu_load = this._sections[i].user.get_average_cpu_load();\n html += '';\n const age = this._sections[i].user._last_sample_frame_id < 0 ? '?' : (this._frame_id - this._sections[i].user._last_sample_frame_id);\n html += '';\n if (this.visualizer_enable_debug_details) {\n html += '';\n }\n html += '';\n }\n html += '
GPU Profiler (' + this._last_render_width + 'x' + this._last_render_height + ')Avg GPUAvg CPU#/ALocal Rate
' + this._sections[i].user.name + '
' + Math.floor(this._sections[i].user.get_average_duration() / 1000.0) + '
μs
' + Math.floor(cpu_load * 100.0) + '
%
' + this._sections[i].user.get_sample_count() + '/' + age + '' + (100.0 / Math.max(1, this._sections[i].last_child_count)).toFixed(0) + ' %
';\n this._visualizer_element.innerHTML = html;\n }\n if (this._update_visualizer_function_handle) {\n this._update_visualizer_function_handle = requestAnimationFrame(this.update_visualizer.bind(this));\n }\n }\n}\n//# sourceMappingURL=GpuProfiler.js.map","/**\n * A factory that creates instances using a map of constructors that take a Viewer as a first parameter\n * OmitViewer is used to remove the Viewer from the constructor parameters list\n * @param T The type of the constructors map\n * @param _constructors_map The map of constructors\n * @param _viewer The viewer instance\n*/\nexport class ViewerFactory {\n constructor(_constructors_map, _viewer) {\n this._constructors_map = _constructors_map;\n this._viewer = _viewer;\n }\n create(type, ...args) {\n const instance = new this._constructors_map[type](this._viewer, ...args);\n return instance;\n }\n}\n//# sourceMappingURL=ViewerFactory.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serializeAsColor3, serializeAsVector3 } from \"../Misc/decorators.js\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector.js\";\nimport { Color3 } from \"../Maths/math.color.js\";\nimport { Node } from \"../node.js\";\nimport { Light } from \"./light.js\";\nNode.AddNodeConstructor(\"Light_Type_3\", (name, scene) => {\n return () => new HemisphericLight(name, Vector3.Zero(), scene);\n});\n/**\n * The HemisphericLight simulates the ambient environment light,\n * so the passed direction is the light reflection direction, not the incoming direction.\n */\nexport class HemisphericLight extends Light {\n /**\n * Creates a HemisphericLight object in the scene according to the passed direction (Vector3).\n * The HemisphericLight simulates the ambient environment light, so the passed direction is the light reflection direction, not the incoming direction.\n * The HemisphericLight can't cast shadows.\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n * @param name The friendly name of the light\n * @param direction The direction of the light reflection\n * @param scene The scene the light belongs to\n */\n constructor(name, direction, scene) {\n super(name, scene);\n /**\n * The groundColor is the light in the opposite direction to the one specified during creation.\n * You can think of the diffuse and specular light as coming from the centre of the object in the given direction and the groundColor light in the opposite direction.\n */\n this.groundColor = new Color3(0.0, 0.0, 0.0);\n this.direction = direction || Vector3.Up();\n }\n _buildUniformLayout() {\n this._uniformBuffer.addUniform(\"vLightData\", 4);\n this._uniformBuffer.addUniform(\"vLightDiffuse\", 4);\n this._uniformBuffer.addUniform(\"vLightSpecular\", 4);\n this._uniformBuffer.addUniform(\"vLightGround\", 3);\n this._uniformBuffer.addUniform(\"shadowsInfo\", 3);\n this._uniformBuffer.addUniform(\"depthValues\", 2);\n this._uniformBuffer.create();\n }\n /**\n * Returns the string \"HemisphericLight\".\n * @returns The class name\n */\n getClassName() {\n return \"HemisphericLight\";\n }\n /**\n * Sets the HemisphericLight direction towards the passed target (Vector3).\n * Returns the updated direction.\n * @param target The target the direction should point to\n * @returns The computed direction\n */\n setDirectionToTarget(target) {\n this.direction = Vector3.Normalize(target.subtract(Vector3.Zero()));\n return this.direction;\n }\n /**\n * Returns the shadow generator associated to the light.\n * @returns Always null for hemispheric lights because it does not support shadows.\n */\n getShadowGenerator() {\n return null;\n }\n /**\n * Sets the passed Effect object with the HemisphericLight normalized direction and color and the passed name (string).\n * @param _effect The effect to update\n * @param lightIndex The index of the light in the effect to update\n * @returns The hemispheric light\n */\n transferToEffect(_effect, lightIndex) {\n const normalizeDirection = Vector3.Normalize(this.direction);\n this._uniformBuffer.updateFloat4(\"vLightData\", normalizeDirection.x, normalizeDirection.y, normalizeDirection.z, 0.0, lightIndex);\n this._uniformBuffer.updateColor3(\"vLightGround\", this.groundColor.scale(this.intensity), lightIndex);\n return this;\n }\n transferToNodeMaterialEffect(effect, lightDataUniformName) {\n const normalizeDirection = Vector3.Normalize(this.direction);\n effect.setFloat3(lightDataUniformName, normalizeDirection.x, normalizeDirection.y, normalizeDirection.z);\n return this;\n }\n /**\n * Computes the world matrix of the node\n * @returns the world matrix\n */\n computeWorldMatrix() {\n if (!this._worldMatrix) {\n this._worldMatrix = Matrix.Identity();\n }\n return this._worldMatrix;\n }\n /**\n * Returns the integer 3.\n * @returns The light Type id as a constant defines in Light.LIGHTTYPEID_x\n */\n getTypeID() {\n return Light.LIGHTTYPEID_HEMISPHERICLIGHT;\n }\n /**\n * Prepares the list of defines specific to the light type.\n * @param defines the list of defines\n * @param lightIndex defines the index of the light for the effect\n */\n prepareLightSpecificDefines(defines, lightIndex) {\n defines[\"HEMILIGHT\" + lightIndex] = true;\n }\n}\n__decorate([\n serializeAsColor3()\n], HemisphericLight.prototype, \"groundColor\", void 0);\n__decorate([\n serializeAsVector3()\n], HemisphericLight.prototype, \"direction\", void 0);\n//# sourceMappingURL=hemisphericLight.js.map","import { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Light as BABYLON_Light } from '@inter-ikea-betrakta-babylonjs/core/Lights/light.js';\nimport { HemisphericLight as BABYLON_HemisphericLight } from '@inter-ikea-betrakta-babylonjs/core/Lights/hemisphericLight.js';\nimport { Color3 as BABYLON_Color3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js';\n// TODO: Should use ConstantReference in the future\n/**\n * A controller for the viewer's main light.\n */\nexport class AmbientLightController {\n constructor(_viewer) {\n this._viewer = _viewer;\n this.name = 'viewer ambient light';\n this._ambient_light = new BABYLON_HemisphericLight(this.name, new BABYLON_Vector3(0, 1, 0), this._viewer.scene);\n this._ambient_light.lightmapMode = BABYLON_Light.LIGHTMAP_DEFAULT;\n this._ambient_light.intensityMode = BABYLON_Light.INTENSITYMODE_ILLUMINANCE;\n this._ambient_light.diffuse = new BABYLON_Color3(1, 1, 1);\n this._ambient_light.shadowEnabled = false;\n this._ambient_light.groundColor = new BABYLON_Color3(0.25, 0.25, 0.25);\n }\n set_enabled(enabled) {\n this._ambient_light.setEnabled(enabled);\n this._viewer.freezing_manager.set_all_materials_dirty();\n this._viewer.mark_scene_dirty();\n }\n is_enabled() {\n return this._ambient_light.isEnabled();\n }\n set_intensity(intensity) {\n this._ambient_light.intensity = intensity;\n this._viewer.freezing_manager.set_all_materials_dirty();\n this._viewer.mark_scene_dirty();\n }\n set_color(color) {\n this._ambient_light.diffuse = new BABYLON_Color3(color.r, color.g, color.b);\n this._viewer.freezing_manager.set_all_materials_dirty();\n this._viewer.mark_scene_dirty();\n }\n set_ground_color(color) {\n this._ambient_light.groundColor = new BABYLON_Color3(color.r, color.g, color.b);\n this._viewer.freezing_manager.set_all_materials_dirty();\n this._viewer.mark_scene_dirty();\n }\n dispose() {\n this._ambient_light.dispose();\n }\n}\n//# sourceMappingURL=AmbientLightController.js.map","import { __decorate } from \"../../tslib.es6.js\";\nimport { serialize, serializeAsMatrix, SerializationHelper, serializeAsVector3 } from \"../../Misc/decorators.js\";\nimport { Tools } from \"../../Misc/tools.js\";\nimport { Matrix, TmpVectors, Vector3 } from \"../../Maths/math.vector.js\";\nimport { BaseTexture } from \"../../Materials/Textures/baseTexture.js\";\nimport { Texture } from \"../../Materials/Textures/texture.js\";\n\nimport { GetClass, RegisterClass } from \"../../Misc/typeStore.js\";\nimport \"../../Engines/Extensions/engine.cubeTexture.js\";\nimport { Observable } from \"../../Misc/observable.js\";\n/**\n * Class for creating a cube texture\n */\nexport class CubeTexture extends BaseTexture {\n /**\n * Gets or sets the size of the bounding box associated with the cube texture\n * When defined, the cubemap will switch to local mode\n * @see https://community.arm.com/graphics/b/blog/posts/reflections-based-on-local-cubemaps-in-unity\n * @example https://www.babylonjs-playground.com/#RNASML\n */\n set boundingBoxSize(value) {\n if (this._boundingBoxSize && this._boundingBoxSize.equals(value)) {\n return;\n }\n this._boundingBoxSize = value;\n const scene = this.getScene();\n if (scene) {\n scene.markAllMaterialsAsDirty(1);\n }\n }\n /**\n * Returns the bounding box size\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#using-local-cubemap-mode\n */\n get boundingBoxSize() {\n return this._boundingBoxSize;\n }\n /**\n * Sets texture matrix rotation angle around Y axis in radians.\n */\n set rotationY(value) {\n this._rotationY = value;\n this.setReflectionTextureMatrix(Matrix.RotationY(this._rotationY));\n }\n /**\n * Gets texture matrix rotation angle around Y axis radians.\n */\n get rotationY() {\n return this._rotationY;\n }\n /**\n * Are mip maps generated for this texture or not.\n */\n get noMipmap() {\n return this._noMipmap;\n }\n /**\n * Gets the forced extension (if any)\n */\n get forcedExtension() {\n return this._forcedExtension;\n }\n /**\n * Creates a cube texture from an array of image urls\n * @param files defines an array of image urls\n * @param scene defines the hosting scene\n * @param noMipmap specifies if mip maps are not used\n * @returns a cube texture\n */\n static CreateFromImages(files, scene, noMipmap) {\n let rootUrlKey = \"\";\n files.forEach((url) => (rootUrlKey += url));\n return new CubeTexture(rootUrlKey, scene, null, noMipmap, files);\n }\n /**\n * Creates and return a texture created from prefilterd data by tools like IBL Baker or Lys.\n * @param url defines the url of the prefiltered texture\n * @param scene defines the scene the texture is attached to\n * @param forcedExtension defines the extension of the file if different from the url\n * @param createPolynomials defines whether or not to create polynomial harmonics from the texture data if necessary\n * @returns the prefiltered texture\n */\n static CreateFromPrefilteredData(url, scene, forcedExtension = null, createPolynomials = true) {\n const oldValue = scene.useDelayedTextureLoading;\n scene.useDelayedTextureLoading = false;\n const result = new CubeTexture(url, scene, null, false, null, null, null, undefined, true, forcedExtension, createPolynomials);\n scene.useDelayedTextureLoading = oldValue;\n return result;\n }\n /**\n * Creates a cube texture to use with reflection for instance. It can be based upon dds or six images as well\n * as prefiltered data.\n * @param rootUrl defines the url of the texture or the root name of the six images\n * @param sceneOrEngine defines the scene or engine the texture is attached to\n * @param extensions defines the suffixes add to the picture name in case six images are in use like _px.jpg...\n * @param noMipmap defines if mipmaps should be created or not\n * @param files defines the six files to load for the different faces in that order: px, py, pz, nx, ny, nz\n * @param onLoad defines a callback triggered at the end of the file load if no errors occurred\n * @param onError defines a callback triggered in case of error during load\n * @param format defines the internal format to use for the texture once loaded\n * @param prefiltered defines whether or not the texture is created from prefiltered data\n * @param forcedExtension defines the extensions to use (force a special type of file to load) in case it is different from the file name\n * @param createPolynomials defines whether or not to create polynomial harmonics from the texture data if necessary\n * @param lodScale defines the scale applied to environment texture. This manages the range of LOD level used for IBL according to the roughness\n * @param lodOffset defines the offset applied to environment texture. This manages first LOD level used for IBL according to the roughness\n * @param loaderOptions options to be passed to the loader\n * @param useSRGBBuffer Defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU) (default: false)\n * @returns the cube texture\n */\n constructor(rootUrl, sceneOrEngine, extensions = null, noMipmap = false, files = null, onLoad = null, onError = null, format = 5, prefiltered = false, forcedExtension = null, createPolynomials = false, lodScale = 0.8, lodOffset = 0, loaderOptions, useSRGBBuffer) {\n var _a;\n super(sceneOrEngine);\n this._lodScale = 0.8;\n this._lodOffset = 0;\n /**\n * Observable triggered once the texture has been loaded.\n */\n this.onLoadObservable = new Observable();\n /**\n * Gets or sets the center of the bounding box associated with the cube texture.\n * It must define where the camera used to render the texture was set\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#using-local-cubemap-mode\n */\n this.boundingBoxPosition = Vector3.Zero();\n this._rotationY = 0;\n /** @internal */\n this._files = null;\n this._forcedExtension = null;\n this._extensions = null;\n this._textureMatrixRefraction = new Matrix();\n this.name = rootUrl;\n this.url = rootUrl;\n this._noMipmap = noMipmap;\n this.hasAlpha = false;\n this._format = format;\n this.isCube = true;\n this._textureMatrix = Matrix.Identity();\n this._createPolynomials = createPolynomials;\n this.coordinatesMode = Texture.CUBIC_MODE;\n this._extensions = extensions;\n this._files = files;\n this._forcedExtension = forcedExtension;\n this._loaderOptions = loaderOptions;\n this._useSRGBBuffer = useSRGBBuffer;\n this._lodScale = lodScale;\n this._lodOffset = lodOffset;\n if (!rootUrl && !files) {\n return;\n }\n this.updateURL(rootUrl, forcedExtension, onLoad, prefiltered, onError, extensions, (_a = this.getScene()) === null || _a === void 0 ? void 0 : _a.useDelayedTextureLoading, files);\n }\n /**\n * Get the current class name of the texture useful for serialization or dynamic coding.\n * @returns \"CubeTexture\"\n */\n getClassName() {\n return \"CubeTexture\";\n }\n /**\n * Update the url (and optional buffer) of this texture if url was null during construction.\n * @param url the url of the texture\n * @param forcedExtension defines the extension to use\n * @param onLoad callback called when the texture is loaded (defaults to null)\n * @param prefiltered Defines whether the updated texture is prefiltered or not\n * @param onError callback called if there was an error during the loading process (defaults to null)\n * @param extensions defines the suffixes add to the picture name in case six images are in use like _px.jpg...\n * @param delayLoad defines if the texture should be loaded now (false by default)\n * @param files defines the six files to load for the different faces in that order: px, py, pz, nx, ny, nz\n */\n updateURL(url, forcedExtension, onLoad = null, prefiltered = false, onError = null, extensions = null, delayLoad = false, files = null) {\n if (!this.name || this.name.startsWith(\"data:\")) {\n this.name = url;\n }\n this.url = url;\n if (forcedExtension) {\n this._forcedExtension = forcedExtension;\n }\n const lastDot = url.lastIndexOf(\".\");\n const extension = forcedExtension ? forcedExtension : lastDot > -1 ? url.substring(lastDot).toLowerCase() : \"\";\n const isDDS = extension.indexOf(\".dds\") === 0;\n const isEnv = extension.indexOf(\".env\") === 0;\n const isBasis = extension.indexOf(\".basis\") === 0;\n if (isEnv) {\n this.gammaSpace = false;\n this._prefiltered = false;\n this.anisotropicFilteringLevel = 1;\n }\n else {\n this._prefiltered = prefiltered;\n if (prefiltered) {\n this.gammaSpace = false;\n this.anisotropicFilteringLevel = 1;\n }\n }\n if (files) {\n this._files = files;\n }\n else {\n if (!isBasis && !isEnv && !isDDS && !extensions) {\n extensions = [\"_px.jpg\", \"_py.jpg\", \"_pz.jpg\", \"_nx.jpg\", \"_ny.jpg\", \"_nz.jpg\"];\n }\n this._files = this._files || [];\n this._files.length = 0;\n if (extensions) {\n for (let index = 0; index < extensions.length; index++) {\n this._files.push(url + extensions[index]);\n }\n this._extensions = extensions;\n }\n }\n if (delayLoad) {\n this.delayLoadState = 4;\n this._delayedOnLoad = onLoad;\n this._delayedOnError = onError;\n }\n else {\n this._loadTexture(onLoad, onError);\n }\n }\n /**\n * Delays loading of the cube texture\n * @param forcedExtension defines the extension to use\n */\n delayLoad(forcedExtension) {\n if (this.delayLoadState !== 4) {\n return;\n }\n if (forcedExtension) {\n this._forcedExtension = forcedExtension;\n }\n this.delayLoadState = 1;\n this._loadTexture(this._delayedOnLoad, this._delayedOnError);\n }\n /**\n * Returns the reflection texture matrix\n * @returns the reflection texture matrix\n */\n getReflectionTextureMatrix() {\n return this._textureMatrix;\n }\n /**\n * Sets the reflection texture matrix\n * @param value Reflection texture matrix\n */\n setReflectionTextureMatrix(value) {\n var _a, _b;\n if (value.updateFlag === this._textureMatrix.updateFlag) {\n return;\n }\n if (value.isIdentity() !== this._textureMatrix.isIdentity()) {\n (_a = this.getScene()) === null || _a === void 0 ? void 0 : _a.markAllMaterialsAsDirty(1, (mat) => mat.getActiveTextures().indexOf(this) !== -1);\n }\n this._textureMatrix = value;\n if (!((_b = this.getScene()) === null || _b === void 0 ? void 0 : _b.useRightHandedSystem)) {\n return;\n }\n const scale = TmpVectors.Vector3[0];\n const quat = TmpVectors.Quaternion[0];\n const trans = TmpVectors.Vector3[1];\n this._textureMatrix.decompose(scale, quat, trans);\n quat.z *= -1; // these two operations correspond to negating the x and y euler angles\n quat.w *= -1;\n Matrix.ComposeToRef(scale, quat, trans, this._textureMatrixRefraction);\n }\n /**\n * Gets a suitable rotate/transform matrix when the texture is used for refraction.\n * There's a separate function from getReflectionTextureMatrix because refraction requires a special configuration of the matrix in right-handed mode.\n * @returns The refraction matrix\n */\n getRefractionTextureMatrix() {\n var _a;\n return ((_a = this.getScene()) === null || _a === void 0 ? void 0 : _a.useRightHandedSystem) ? this._textureMatrixRefraction : this._textureMatrix;\n }\n _loadTexture(onLoad = null, onError = null) {\n var _a;\n const scene = this.getScene();\n const oldTexture = this._texture;\n this._texture = this._getFromCache(this.url, this._noMipmap, undefined, undefined, this._useSRGBBuffer, this.isCube);\n const onLoadProcessing = () => {\n var _a;\n this.onLoadObservable.notifyObservers(this);\n if (oldTexture) {\n oldTexture.dispose();\n (_a = this.getScene()) === null || _a === void 0 ? void 0 : _a.markAllMaterialsAsDirty(1);\n }\n if (onLoad) {\n onLoad();\n }\n };\n const errorHandler = (message, exception) => {\n this._loadingError = true;\n this._errorObject = { message, exception };\n if (onError) {\n onError(message, exception);\n }\n Texture.OnTextureLoadErrorObservable.notifyObservers(this);\n };\n if (!this._texture) {\n if (this._prefiltered) {\n this._texture = this._getEngine().createPrefilteredCubeTexture(this.url, scene, this._lodScale, this._lodOffset, onLoad, errorHandler, this._format, this._forcedExtension, this._createPolynomials);\n }\n else {\n this._texture = this._getEngine().createCubeTexture(this.url, scene, this._files, this._noMipmap, onLoad, errorHandler, this._format, this._forcedExtension, false, this._lodScale, this._lodOffset, null, this._loaderOptions, !!this._useSRGBBuffer);\n }\n (_a = this._texture) === null || _a === void 0 ? void 0 : _a.onLoadedObservable.add(() => this.onLoadObservable.notifyObservers(this));\n }\n else {\n if (this._texture.isReady) {\n Tools.SetImmediate(() => onLoadProcessing());\n }\n else {\n this._texture.onLoadedObservable.add(() => onLoadProcessing());\n }\n }\n }\n /**\n * Parses text to create a cube texture\n * @param parsedTexture define the serialized text to read from\n * @param scene defines the hosting scene\n * @param rootUrl defines the root url of the cube texture\n * @returns a cube texture\n */\n static Parse(parsedTexture, scene, rootUrl) {\n const texture = SerializationHelper.Parse(() => {\n var _a;\n let prefiltered = false;\n if (parsedTexture.prefiltered) {\n prefiltered = parsedTexture.prefiltered;\n }\n return new CubeTexture(rootUrl + ((_a = parsedTexture.url) !== null && _a !== void 0 ? _a : parsedTexture.name), scene, parsedTexture.extensions, false, parsedTexture.files || null, null, null, undefined, prefiltered, parsedTexture.forcedExtension);\n }, parsedTexture, scene);\n // Local Cubemaps\n if (parsedTexture.boundingBoxPosition) {\n texture.boundingBoxPosition = Vector3.FromArray(parsedTexture.boundingBoxPosition);\n }\n if (parsedTexture.boundingBoxSize) {\n texture.boundingBoxSize = Vector3.FromArray(parsedTexture.boundingBoxSize);\n }\n // Animations\n if (parsedTexture.animations) {\n for (let animationIndex = 0; animationIndex < parsedTexture.animations.length; animationIndex++) {\n const parsedAnimation = parsedTexture.animations[animationIndex];\n const internalClass = GetClass(\"BABYLON.Animation\");\n if (internalClass) {\n texture.animations.push(internalClass.Parse(parsedAnimation));\n }\n }\n }\n return texture;\n }\n /**\n * Makes a clone, or deep copy, of the cube texture\n * @returns a new cube texture\n */\n clone() {\n let uniqueId = 0;\n const newCubeTexture = SerializationHelper.Clone(() => {\n const cubeTexture = new CubeTexture(this.url, this.getScene() || this._getEngine(), this._extensions, this._noMipmap, this._files);\n uniqueId = cubeTexture.uniqueId;\n return cubeTexture;\n }, this);\n newCubeTexture.uniqueId = uniqueId;\n return newCubeTexture;\n }\n}\n__decorate([\n serialize()\n], CubeTexture.prototype, \"url\", void 0);\n__decorate([\n serializeAsVector3()\n], CubeTexture.prototype, \"boundingBoxPosition\", void 0);\n__decorate([\n serializeAsVector3()\n], CubeTexture.prototype, \"boundingBoxSize\", null);\n__decorate([\n serialize(\"rotationY\")\n], CubeTexture.prototype, \"rotationY\", null);\n__decorate([\n serialize(\"files\")\n], CubeTexture.prototype, \"_files\", void 0);\n__decorate([\n serialize(\"forcedExtension\")\n], CubeTexture.prototype, \"_forcedExtension\", void 0);\n__decorate([\n serialize(\"extensions\")\n], CubeTexture.prototype, \"_extensions\", void 0);\n__decorate([\n serializeAsMatrix(\"textureMatrix\")\n], CubeTexture.prototype, \"_textureMatrix\", void 0);\n__decorate([\n serializeAsMatrix(\"textureMatrixRefraction\")\n], CubeTexture.prototype, \"_textureMatrixRefraction\", void 0);\nTexture._CubeTextureParser = CubeTexture.Parse;\n// Some exporters relies on Tools.Instantiate\nRegisterClass(\"BABYLON.CubeTexture\", CubeTexture);\n//# sourceMappingURL=cubeTexture.js.map","import { Vector3 } from \"../../Maths/math.vector.js\";\n\n/**\n * Helper class useful to convert panorama picture to their cubemap representation in 6 faces.\n */\nexport class PanoramaToCubeMapTools {\n /**\n * Converts a panorama stored in RGB right to left up to down format into a cubemap (6 faces).\n *\n * @param float32Array The source data.\n * @param inputWidth The width of the input panorama.\n * @param inputHeight The height of the input panorama.\n * @param size The willing size of the generated cubemap (each faces will be size * size pixels)\n * @returns The cubemap data\n */\n static ConvertPanoramaToCubemap(float32Array, inputWidth, inputHeight, size, supersample = false) {\n if (!float32Array) {\n throw \"ConvertPanoramaToCubemap: input cannot be null\";\n }\n if (float32Array.length != inputWidth * inputHeight * 3) {\n throw \"ConvertPanoramaToCubemap: input size is wrong\";\n }\n const textureFront = this.CreateCubemapTexture(size, this.FACE_FRONT, float32Array, inputWidth, inputHeight, supersample);\n const textureBack = this.CreateCubemapTexture(size, this.FACE_BACK, float32Array, inputWidth, inputHeight, supersample);\n const textureLeft = this.CreateCubemapTexture(size, this.FACE_LEFT, float32Array, inputWidth, inputHeight, supersample);\n const textureRight = this.CreateCubemapTexture(size, this.FACE_RIGHT, float32Array, inputWidth, inputHeight, supersample);\n const textureUp = this.CreateCubemapTexture(size, this.FACE_UP, float32Array, inputWidth, inputHeight, supersample);\n const textureDown = this.CreateCubemapTexture(size, this.FACE_DOWN, float32Array, inputWidth, inputHeight, supersample);\n return {\n front: textureFront,\n back: textureBack,\n left: textureLeft,\n right: textureRight,\n up: textureUp,\n down: textureDown,\n size: size,\n type: 1,\n format: 4,\n gammaSpace: false,\n };\n }\n static CreateCubemapTexture(texSize, faceData, float32Array, inputWidth, inputHeight, supersample = false) {\n const buffer = new ArrayBuffer(texSize * texSize * 4 * 3);\n const textureArray = new Float32Array(buffer);\n // If supersampling, determine number of samples needed when source texture width is divided for 4 cube faces\n const samples = supersample ? Math.max(1, Math.round(inputWidth / 4 / texSize)) : 1;\n const sampleFactor = 1 / samples;\n const sampleFactorSqr = sampleFactor * sampleFactor;\n const rotDX1 = faceData[1].subtract(faceData[0]).scale(sampleFactor / texSize);\n const rotDX2 = faceData[3].subtract(faceData[2]).scale(sampleFactor / texSize);\n const dy = 1 / texSize;\n let fy = 0;\n for (let y = 0; y < texSize; y++) {\n for (let sy = 0; sy < samples; sy++) {\n let xv1 = faceData[0];\n let xv2 = faceData[2];\n for (let x = 0; x < texSize; x++) {\n for (let sx = 0; sx < samples; sx++) {\n const v = xv2.subtract(xv1).scale(fy).add(xv1);\n v.normalize();\n const color = this.CalcProjectionSpherical(v, float32Array, inputWidth, inputHeight);\n // 3 channels per pixels\n textureArray[y * texSize * 3 + x * 3 + 0] += color.r * sampleFactorSqr;\n textureArray[y * texSize * 3 + x * 3 + 1] += color.g * sampleFactorSqr;\n textureArray[y * texSize * 3 + x * 3 + 2] += color.b * sampleFactorSqr;\n xv1 = xv1.add(rotDX1);\n xv2 = xv2.add(rotDX2);\n }\n }\n fy += dy * sampleFactor;\n }\n }\n return textureArray;\n }\n static CalcProjectionSpherical(vDir, float32Array, inputWidth, inputHeight) {\n let theta = Math.atan2(vDir.z, vDir.x);\n const phi = Math.acos(vDir.y);\n while (theta < -Math.PI) {\n theta += 2 * Math.PI;\n }\n while (theta > Math.PI) {\n theta -= 2 * Math.PI;\n }\n let dx = theta / Math.PI;\n const dy = phi / Math.PI;\n // recenter.\n dx = dx * 0.5 + 0.5;\n let px = Math.round(dx * inputWidth);\n if (px < 0) {\n px = 0;\n }\n else if (px >= inputWidth) {\n px = inputWidth - 1;\n }\n let py = Math.round(dy * inputHeight);\n if (py < 0) {\n py = 0;\n }\n else if (py >= inputHeight) {\n py = inputHeight - 1;\n }\n const inputY = inputHeight - py - 1;\n const r = float32Array[inputY * inputWidth * 3 + px * 3 + 0];\n const g = float32Array[inputY * inputWidth * 3 + px * 3 + 1];\n const b = float32Array[inputY * inputWidth * 3 + px * 3 + 2];\n return {\n r: r,\n g: g,\n b: b,\n };\n }\n}\nPanoramaToCubeMapTools.FACE_LEFT = [new Vector3(-1.0, -1.0, -1.0), new Vector3(1.0, -1.0, -1.0), new Vector3(-1.0, 1.0, -1.0), new Vector3(1.0, 1.0, -1.0)];\nPanoramaToCubeMapTools.FACE_RIGHT = [new Vector3(1.0, -1.0, 1.0), new Vector3(-1.0, -1.0, 1.0), new Vector3(1.0, 1.0, 1.0), new Vector3(-1.0, 1.0, 1.0)];\nPanoramaToCubeMapTools.FACE_FRONT = [new Vector3(1.0, -1.0, -1.0), new Vector3(1.0, -1.0, 1.0), new Vector3(1.0, 1.0, -1.0), new Vector3(1.0, 1.0, 1.0)];\nPanoramaToCubeMapTools.FACE_BACK = [new Vector3(-1.0, -1.0, 1.0), new Vector3(-1.0, -1.0, -1.0), new Vector3(-1.0, 1.0, 1.0), new Vector3(-1.0, 1.0, -1.0)];\nPanoramaToCubeMapTools.FACE_DOWN = [new Vector3(1.0, 1.0, -1.0), new Vector3(1.0, 1.0, 1.0), new Vector3(-1.0, 1.0, -1.0), new Vector3(-1.0, 1.0, 1.0)];\nPanoramaToCubeMapTools.FACE_UP = [new Vector3(-1.0, -1.0, -1.0), new Vector3(-1.0, -1.0, 1.0), new Vector3(1.0, -1.0, -1.0), new Vector3(1.0, -1.0, 1.0)];\n//# sourceMappingURL=panoramaToCubemap.js.map","import { PanoramaToCubeMapTools } from \"./panoramaToCubemap.js\";\n/**\n * This groups tools to convert HDR texture to native colors array.\n */\nexport class HDRTools {\n static _Ldexp(mantissa, exponent) {\n if (exponent > 1023) {\n return mantissa * Math.pow(2, 1023) * Math.pow(2, exponent - 1023);\n }\n if (exponent < -1074) {\n return mantissa * Math.pow(2, -1074) * Math.pow(2, exponent + 1074);\n }\n return mantissa * Math.pow(2, exponent);\n }\n static _Rgbe2float(float32array, red, green, blue, exponent, index) {\n if (exponent > 0) {\n /*nonzero pixel*/\n exponent = this._Ldexp(1.0, exponent - (128 + 8));\n float32array[index + 0] = red * exponent;\n float32array[index + 1] = green * exponent;\n float32array[index + 2] = blue * exponent;\n }\n else {\n float32array[index + 0] = 0;\n float32array[index + 1] = 0;\n float32array[index + 2] = 0;\n }\n }\n static _ReadStringLine(uint8array, startIndex) {\n let line = \"\";\n let character = \"\";\n for (let i = startIndex; i < uint8array.length - startIndex; i++) {\n character = String.fromCharCode(uint8array[i]);\n if (character == \"\\n\") {\n break;\n }\n line += character;\n }\n return line;\n }\n /**\n * Reads header information from an RGBE texture stored in a native array.\n * More information on this format are available here:\n * https://en.wikipedia.org/wiki/RGBE_image_format\n *\n * @param uint8array The binary file stored in native array.\n * @returns The header information.\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static RGBE_ReadHeader(uint8array) {\n let height = 0;\n let width = 0;\n let line = this._ReadStringLine(uint8array, 0);\n if (line[0] != \"#\" || line[1] != \"?\") {\n throw \"Bad HDR Format.\";\n }\n let endOfHeader = false;\n let findFormat = false;\n let lineIndex = 0;\n do {\n lineIndex += line.length + 1;\n line = this._ReadStringLine(uint8array, lineIndex);\n if (line == \"FORMAT=32-bit_rle_rgbe\") {\n findFormat = true;\n }\n else if (line.length == 0) {\n endOfHeader = true;\n }\n } while (!endOfHeader);\n if (!findFormat) {\n throw \"HDR Bad header format, unsupported FORMAT\";\n }\n lineIndex += line.length + 1;\n line = this._ReadStringLine(uint8array, lineIndex);\n const sizeRegexp = /^-Y (.*) \\+X (.*)$/g;\n const match = sizeRegexp.exec(line);\n // TODO. Support +Y and -X if needed.\n if (!match || match.length < 3) {\n throw \"HDR Bad header format, no size\";\n }\n width = parseInt(match[2]);\n height = parseInt(match[1]);\n if (width < 8 || width > 0x7fff) {\n throw \"HDR Bad header format, unsupported size\";\n }\n lineIndex += line.length + 1;\n return {\n height: height,\n width: width,\n dataPosition: lineIndex,\n };\n }\n /**\n * Returns the cubemap information (each faces texture data) extracted from an RGBE texture.\n * This RGBE texture needs to store the information as a panorama.\n *\n * More information on this format are available here:\n * https://en.wikipedia.org/wiki/RGBE_image_format\n *\n * @param buffer The binary file stored in an array buffer.\n * @param size The expected size of the extracted cubemap.\n * @returns The Cube Map information.\n */\n static GetCubeMapTextureData(buffer, size, supersample = false) {\n const uint8array = new Uint8Array(buffer);\n const hdrInfo = this.RGBE_ReadHeader(uint8array);\n const data = this.RGBE_ReadPixels(uint8array, hdrInfo);\n const cubeMapData = PanoramaToCubeMapTools.ConvertPanoramaToCubemap(data, hdrInfo.width, hdrInfo.height, size, supersample);\n return cubeMapData;\n }\n /**\n * Returns the pixels data extracted from an RGBE texture.\n * This pixels will be stored left to right up to down in the R G B order in one array.\n *\n * More information on this format are available here:\n * https://en.wikipedia.org/wiki/RGBE_image_format\n *\n * @param uint8array The binary file stored in an array buffer.\n * @param hdrInfo The header information of the file.\n * @returns The pixels data in RGB right to left up to down order.\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static RGBE_ReadPixels(uint8array, hdrInfo) {\n return this._RGBEReadPixelsRLE(uint8array, hdrInfo);\n }\n static _RGBEReadPixelsRLE(uint8array, hdrInfo) {\n let num_scanlines = hdrInfo.height;\n const scanline_width = hdrInfo.width;\n let a, b, c, d, count;\n let dataIndex = hdrInfo.dataPosition;\n let index = 0, endIndex = 0, i = 0;\n const scanLineArrayBuffer = new ArrayBuffer(scanline_width * 4); // four channel R G B E\n const scanLineArray = new Uint8Array(scanLineArrayBuffer);\n // 3 channels of 4 bytes per pixel in float.\n const resultBuffer = new ArrayBuffer(hdrInfo.width * hdrInfo.height * 4 * 3);\n const resultArray = new Float32Array(resultBuffer);\n // read in each successive scanline\n while (num_scanlines > 0) {\n a = uint8array[dataIndex++];\n b = uint8array[dataIndex++];\n c = uint8array[dataIndex++];\n d = uint8array[dataIndex++];\n if (a != 2 || b != 2 || c & 0x80 || hdrInfo.width < 8 || hdrInfo.width > 32767) {\n return this._RGBEReadPixelsNOTRLE(uint8array, hdrInfo);\n }\n if (((c << 8) | d) != scanline_width) {\n throw \"HDR Bad header format, wrong scan line width\";\n }\n index = 0;\n // read each of the four channels for the scanline into the buffer\n for (i = 0; i < 4; i++) {\n endIndex = (i + 1) * scanline_width;\n while (index < endIndex) {\n a = uint8array[dataIndex++];\n b = uint8array[dataIndex++];\n if (a > 128) {\n // a run of the same value\n count = a - 128;\n if (count == 0 || count > endIndex - index) {\n throw \"HDR Bad Format, bad scanline data (run)\";\n }\n while (count-- > 0) {\n scanLineArray[index++] = b;\n }\n }\n else {\n // a non-run\n count = a;\n if (count == 0 || count > endIndex - index) {\n throw \"HDR Bad Format, bad scanline data (non-run)\";\n }\n scanLineArray[index++] = b;\n if (--count > 0) {\n for (let j = 0; j < count; j++) {\n scanLineArray[index++] = uint8array[dataIndex++];\n }\n }\n }\n }\n }\n // now convert data from buffer into floats\n for (i = 0; i < scanline_width; i++) {\n a = scanLineArray[i];\n b = scanLineArray[i + scanline_width];\n c = scanLineArray[i + 2 * scanline_width];\n d = scanLineArray[i + 3 * scanline_width];\n this._Rgbe2float(resultArray, a, b, c, d, (hdrInfo.height - num_scanlines) * scanline_width * 3 + i * 3);\n }\n num_scanlines--;\n }\n return resultArray;\n }\n static _RGBEReadPixelsNOTRLE(uint8array, hdrInfo) {\n // this file is not run length encoded\n // read values sequentially\n let num_scanlines = hdrInfo.height;\n const scanline_width = hdrInfo.width;\n let a, b, c, d, i;\n let dataIndex = hdrInfo.dataPosition;\n // 3 channels of 4 bytes per pixel in float.\n const resultBuffer = new ArrayBuffer(hdrInfo.width * hdrInfo.height * 4 * 3);\n const resultArray = new Float32Array(resultBuffer);\n // read in each successive scanline\n while (num_scanlines > 0) {\n for (i = 0; i < hdrInfo.width; i++) {\n a = uint8array[dataIndex++];\n b = uint8array[dataIndex++];\n c = uint8array[dataIndex++];\n d = uint8array[dataIndex++];\n this._Rgbe2float(resultArray, a, b, c, d, (hdrInfo.height - num_scanlines) * scanline_width * 3 + i * 3);\n }\n num_scanlines--;\n }\n return resultArray;\n }\n}\n//# sourceMappingURL=hdr.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nconst name = \"hdrFilteringVertexShader\";\nconst shader = `attribute vec2 position;varying vec3 direction;uniform vec3 up;uniform vec3 right;uniform vec3 front;\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nmat3 view=mat3(up,right,front);direction=view*vec3(position,1.0);gl_Position=vec4(position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const hdrFilteringVertexShader = { name, shader };\n//# sourceMappingURL=hdrFiltering.vertex.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/helperFunctions.js\";\nimport \"./ShadersInclude/importanceSampling.js\";\nimport \"./ShadersInclude/pbrBRDFFunctions.js\";\nimport \"./ShadersInclude/hdrFilteringFunctions.js\";\nconst name = \"hdrFilteringPixelShader\";\nconst shader = `#include\n#include\n#include\n#include\nuniform float alphaG;uniform samplerCube inputTexture;uniform vec2 vFilteringInfo;uniform float hdrScale;varying vec3 direction;void main() {vec3 color=radiance(alphaG,inputTexture,direction,vFilteringInfo);gl_FragColor=vec4(color*hdrScale,1.0);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const hdrFilteringPixelShader = { name, shader };\n//# sourceMappingURL=hdrFiltering.fragment.js.map","import { Vector3 } from \"../../../Maths/math.js\";\nimport { Scalar } from \"../../../Maths/math.scalar.js\";\n\nimport { EffectWrapper, EffectRenderer } from \"../../../Materials/effectRenderer.js\";\nimport \"../../../Shaders/hdrFiltering.vertex.js\";\nimport \"../../../Shaders/hdrFiltering.fragment.js\";\nimport { Logger } from \"../../../Misc/logger.js\";\n/**\n * Filters HDR maps to get correct renderings of PBR reflections\n */\nexport class HDRFiltering {\n /**\n * Instantiates HDR filter for reflection maps\n *\n * @param engine Thin engine\n * @param options Options\n */\n constructor(engine, options = {}) {\n this._lodGenerationOffset = 0;\n this._lodGenerationScale = 0.8;\n /**\n * Quality switch for prefiltering. Should be set to `4096` unless\n * you care about baking speed.\n */\n this.quality = 4096;\n /**\n * Scales pixel intensity for the input HDR map.\n */\n this.hdrScale = 1;\n // pass\n this._engine = engine;\n this.hdrScale = options.hdrScale || this.hdrScale;\n this.quality = options.quality || this.quality;\n }\n _createRenderTarget(size) {\n let textureType = 0;\n if (this._engine.getCaps().textureHalfFloatRender) {\n textureType = 2;\n }\n else if (this._engine.getCaps().textureFloatRender) {\n textureType = 1;\n }\n const rtWrapper = this._engine.createRenderTargetCubeTexture(size, {\n format: 5,\n type: textureType,\n createMipMaps: true,\n generateMipMaps: false,\n generateDepthBuffer: false,\n generateStencilBuffer: false,\n samplingMode: 1,\n });\n this._engine.updateTextureWrappingMode(rtWrapper.texture, 0, 0, 0);\n this._engine.updateTextureSamplingMode(3, rtWrapper.texture, true);\n return rtWrapper;\n }\n _prefilterInternal(texture) {\n const width = texture.getSize().width;\n const mipmapsCount = Scalar.ILog2(width) + 1;\n const effect = this._effectWrapper.effect;\n const outputTexture = this._createRenderTarget(width);\n this._effectRenderer.saveStates();\n this._effectRenderer.setViewport();\n const intTexture = texture.getInternalTexture();\n if (intTexture) {\n // Just in case generate fresh clean mips.\n this._engine.updateTextureSamplingMode(3, intTexture, true);\n }\n this._effectRenderer.applyEffectWrapper(this._effectWrapper);\n const directions = [\n [new Vector3(0, 0, -1), new Vector3(0, -1, 0), new Vector3(1, 0, 0)],\n [new Vector3(0, 0, 1), new Vector3(0, -1, 0), new Vector3(-1, 0, 0)],\n [new Vector3(1, 0, 0), new Vector3(0, 0, 1), new Vector3(0, 1, 0)],\n [new Vector3(1, 0, 0), new Vector3(0, 0, -1), new Vector3(0, -1, 0)],\n [new Vector3(1, 0, 0), new Vector3(0, -1, 0), new Vector3(0, 0, 1)],\n [new Vector3(-1, 0, 0), new Vector3(0, -1, 0), new Vector3(0, 0, -1)], // NegativeZ\n ];\n effect.setFloat(\"hdrScale\", this.hdrScale);\n effect.setFloat2(\"vFilteringInfo\", texture.getSize().width, mipmapsCount);\n effect.setTexture(\"inputTexture\", texture);\n for (let face = 0; face < 6; face++) {\n effect.setVector3(\"up\", directions[face][0]);\n effect.setVector3(\"right\", directions[face][1]);\n effect.setVector3(\"front\", directions[face][2]);\n for (let lod = 0; lod < mipmapsCount; lod++) {\n this._engine.bindFramebuffer(outputTexture, face, undefined, undefined, true, lod);\n this._effectRenderer.applyEffectWrapper(this._effectWrapper);\n let alpha = Math.pow(2, (lod - this._lodGenerationOffset) / this._lodGenerationScale) / width;\n if (lod === 0) {\n alpha = 0;\n }\n effect.setFloat(\"alphaG\", alpha);\n this._effectRenderer.draw();\n }\n }\n // Cleanup\n this._effectRenderer.restoreStates();\n this._engine.restoreDefaultFramebuffer();\n this._engine._releaseTexture(texture._texture);\n // Internal Swap\n const type = outputTexture.texture.type;\n const format = outputTexture.texture.format;\n outputTexture._swapAndDie(texture._texture);\n texture._texture.type = type;\n texture._texture.format = format;\n // New settings\n texture.gammaSpace = false;\n texture.lodGenerationOffset = this._lodGenerationOffset;\n texture.lodGenerationScale = this._lodGenerationScale;\n texture._prefiltered = true;\n return texture;\n }\n _createEffect(texture, onCompiled) {\n const defines = [];\n if (texture.gammaSpace) {\n defines.push(\"#define GAMMA_INPUT\");\n }\n defines.push(\"#define NUM_SAMPLES \" + this.quality + \"u\"); // unsigned int\n const effectWrapper = new EffectWrapper({\n engine: this._engine,\n name: \"hdrFiltering\",\n vertexShader: \"hdrFiltering\",\n fragmentShader: \"hdrFiltering\",\n samplerNames: [\"inputTexture\"],\n uniformNames: [\"vSampleDirections\", \"vWeights\", \"up\", \"right\", \"front\", \"vFilteringInfo\", \"hdrScale\", \"alphaG\"],\n useShaderStore: true,\n defines,\n onCompiled: onCompiled,\n });\n return effectWrapper;\n }\n /**\n * Get a value indicating if the filter is ready to be used\n * @param texture Texture to filter\n * @returns true if the filter is ready\n */\n isReady(texture) {\n return texture.isReady() && this._effectWrapper.effect.isReady();\n }\n /**\n * Prefilters a cube texture to have mipmap levels representing roughness values.\n * Prefiltering will be invoked at the end of next rendering pass.\n * This has to be done once the map is loaded, and has not been prefiltered by a third party software.\n * See http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf for more information\n * @param texture Texture to filter\n * @param onFinished Callback when filtering is done\n * @returns Promise called when prefiltering is done\n */\n prefilter(texture, onFinished = null) {\n if (!this._engine._features.allowTexturePrefiltering) {\n Logger.Warn(\"HDR prefiltering is not available in WebGL 1., you can use real time filtering instead.\");\n return Promise.reject(\"HDR prefiltering is not available in WebGL 1., you can use real time filtering instead.\");\n }\n return new Promise((resolve) => {\n this._effectRenderer = new EffectRenderer(this._engine);\n this._effectWrapper = this._createEffect(texture);\n this._effectWrapper.effect.executeWhenCompiled(() => {\n this._prefilterInternal(texture);\n this._effectRenderer.dispose();\n this._effectWrapper.dispose();\n resolve();\n if (onFinished) {\n onFinished();\n }\n });\n });\n }\n}\n//# sourceMappingURL=hdrFiltering.js.map","import { Matrix, Vector3 } from \"../../Maths/math.vector.js\";\nimport { BaseTexture } from \"../../Materials/Textures/baseTexture.js\";\nimport { Texture } from \"../../Materials/Textures/texture.js\";\n\nimport { HDRTools } from \"../../Misc/HighDynamicRange/hdr.js\";\nimport { CubeMapToSphericalPolynomialTools } from \"../../Misc/HighDynamicRange/cubemapToSphericalPolynomial.js\";\nimport { RegisterClass } from \"../../Misc/typeStore.js\";\nimport { Observable } from \"../../Misc/observable.js\";\nimport { Tools } from \"../../Misc/tools.js\";\nimport { ToGammaSpace } from \"../../Maths/math.constants.js\";\nimport { HDRFiltering } from \"../../Materials/Textures/Filtering/hdrFiltering.js\";\nimport { ToHalfFloat } from \"../../Misc/textureTools.js\";\nimport \"../../Engines/Extensions/engine.rawTexture.js\";\nimport \"../../Materials/Textures/baseTexture.polynomial.js\";\n/**\n * This represents a texture coming from an HDR input.\n *\n * The only supported format is currently panorama picture stored in RGBE format.\n * Example of such files can be found on Poly Haven: https://polyhaven.com/hdris\n */\nexport class HDRCubeTexture extends BaseTexture {\n /**\n * Sets whether or not the texture is blocking during loading.\n */\n set isBlocking(value) {\n this._isBlocking = value;\n }\n /**\n * Gets whether or not the texture is blocking during loading.\n */\n get isBlocking() {\n return this._isBlocking;\n }\n /**\n * Sets texture matrix rotation angle around Y axis in radians.\n */\n set rotationY(value) {\n this._rotationY = value;\n this.setReflectionTextureMatrix(Matrix.RotationY(this._rotationY));\n }\n /**\n * Gets texture matrix rotation angle around Y axis radians.\n */\n get rotationY() {\n return this._rotationY;\n }\n /**\n * Gets or sets the size of the bounding box associated with the cube texture\n * When defined, the cubemap will switch to local mode\n * @see https://community.arm.com/graphics/b/blog/posts/reflections-based-on-local-cubemaps-in-unity\n * @example https://www.babylonjs-playground.com/#RNASML\n */\n set boundingBoxSize(value) {\n if (this._boundingBoxSize && this._boundingBoxSize.equals(value)) {\n return;\n }\n this._boundingBoxSize = value;\n const scene = this.getScene();\n if (scene) {\n scene.markAllMaterialsAsDirty(1);\n }\n }\n get boundingBoxSize() {\n return this._boundingBoxSize;\n }\n /**\n * Instantiates an HDRTexture from the following parameters.\n *\n * @param url The location of the HDR raw data (Panorama stored in RGBE format)\n * @param sceneOrEngine The scene or engine the texture will be used in\n * @param size The cubemap desired size (the more it increases the longer the generation will be)\n * @param noMipmap Forces to not generate the mipmap if true\n * @param generateHarmonics Specifies whether you want to extract the polynomial harmonics during the generation process\n * @param gammaSpace Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space)\n * @param prefilterOnLoad Prefilters HDR texture to allow use of this texture as a PBR reflection texture.\n * @param onLoad\n * @param onError\n */\n constructor(url, sceneOrEngine, size, noMipmap = false, generateHarmonics = true, gammaSpace = false, prefilterOnLoad = false, onLoad = null, onError = null, supersample = false) {\n var _a;\n super(sceneOrEngine);\n this._generateHarmonics = true;\n this._onError = null;\n this._isBlocking = true;\n this._rotationY = 0;\n /**\n * Gets or sets the center of the bounding box associated with the cube texture\n * It must define where the camera used to render the texture was set\n */\n this.boundingBoxPosition = Vector3.Zero();\n /**\n * Observable triggered once the texture has been loaded.\n */\n this.onLoadObservable = new Observable();\n if (!url) {\n return;\n }\n this._coordinatesMode = Texture.CUBIC_MODE;\n this.name = url;\n this.url = url;\n this.hasAlpha = false;\n this.isCube = true;\n this._textureMatrix = Matrix.Identity();\n this._prefilterOnLoad = prefilterOnLoad;\n this._onLoad = () => {\n this.onLoadObservable.notifyObservers(this);\n if (onLoad) {\n onLoad();\n }\n };\n this._onError = onError;\n this.gammaSpace = gammaSpace;\n this._noMipmap = noMipmap;\n this._size = size;\n this._supersample = supersample;\n this._generateHarmonics = generateHarmonics;\n this._texture = this._getFromCache(url, this._noMipmap, undefined, undefined, undefined, this.isCube);\n if (!this._texture) {\n if (!((_a = this.getScene()) === null || _a === void 0 ? void 0 : _a.useDelayedTextureLoading)) {\n this._loadTexture();\n }\n else {\n this.delayLoadState = 4;\n }\n }\n else {\n if (this._texture.isReady) {\n Tools.SetImmediate(() => this._onLoad());\n }\n else {\n this._texture.onLoadedObservable.add(this._onLoad);\n }\n }\n }\n /**\n * Get the current class name of the texture useful for serialization or dynamic coding.\n * @returns \"HDRCubeTexture\"\n */\n getClassName() {\n return \"HDRCubeTexture\";\n }\n /**\n * Occurs when the file is raw .hdr file.\n */\n _loadTexture() {\n const engine = this._getEngine();\n const caps = engine.getCaps();\n let textureType = 0;\n if (caps.textureFloat && caps.textureFloatLinearFiltering) {\n textureType = 1;\n }\n else if (caps.textureHalfFloat && caps.textureHalfFloatLinearFiltering) {\n textureType = 2;\n }\n const callback = (buffer) => {\n this.lodGenerationOffset = 0.0;\n this.lodGenerationScale = 0.8;\n // Extract the raw linear data.\n const data = HDRTools.GetCubeMapTextureData(buffer, this._size, this._supersample);\n // Generate harmonics if needed.\n if (this._generateHarmonics) {\n const sphericalPolynomial = CubeMapToSphericalPolynomialTools.ConvertCubeMapToSphericalPolynomial(data);\n this.sphericalPolynomial = sphericalPolynomial;\n }\n const results = [];\n let byteArray = null;\n let shortArray = null;\n // Push each faces.\n for (let j = 0; j < 6; j++) {\n // Create fallback array\n if (textureType === 2) {\n shortArray = new Uint16Array(this._size * this._size * 3);\n }\n else if (textureType === 0) {\n // 3 channels of 1 bytes per pixel in bytes.\n byteArray = new Uint8Array(this._size * this._size * 3);\n }\n const dataFace = data[HDRCubeTexture._FacesMapping[j]];\n // If special cases.\n if (this.gammaSpace || shortArray || byteArray) {\n for (let i = 0; i < this._size * this._size; i++) {\n // Put in gamma space if requested.\n if (this.gammaSpace) {\n dataFace[i * 3 + 0] = Math.pow(dataFace[i * 3 + 0], ToGammaSpace);\n dataFace[i * 3 + 1] = Math.pow(dataFace[i * 3 + 1], ToGammaSpace);\n dataFace[i * 3 + 2] = Math.pow(dataFace[i * 3 + 2], ToGammaSpace);\n }\n // Convert to half float texture for fallback.\n if (shortArray) {\n shortArray[i * 3 + 0] = ToHalfFloat(dataFace[i * 3 + 0]);\n shortArray[i * 3 + 1] = ToHalfFloat(dataFace[i * 3 + 1]);\n shortArray[i * 3 + 2] = ToHalfFloat(dataFace[i * 3 + 2]);\n }\n // Convert to int texture for fallback.\n if (byteArray) {\n let r = Math.max(dataFace[i * 3 + 0] * 255, 0);\n let g = Math.max(dataFace[i * 3 + 1] * 255, 0);\n let b = Math.max(dataFace[i * 3 + 2] * 255, 0);\n // May use luminance instead if the result is not accurate.\n const max = Math.max(Math.max(r, g), b);\n if (max > 255) {\n const scale = 255 / max;\n r *= scale;\n g *= scale;\n b *= scale;\n }\n byteArray[i * 3 + 0] = r;\n byteArray[i * 3 + 1] = g;\n byteArray[i * 3 + 2] = b;\n }\n }\n }\n if (shortArray) {\n results.push(shortArray);\n }\n else if (byteArray) {\n results.push(byteArray);\n }\n else {\n results.push(dataFace);\n }\n }\n return results;\n };\n if (engine._features.allowTexturePrefiltering && this._prefilterOnLoad) {\n const previousOnLoad = this._onLoad;\n const hdrFiltering = new HDRFiltering(engine);\n this._onLoad = () => {\n hdrFiltering.prefilter(this, previousOnLoad);\n };\n }\n this._texture = engine.createRawCubeTextureFromUrl(this.url, this.getScene(), this._size, 4, textureType, this._noMipmap, callback, null, this._onLoad, this._onError);\n }\n clone() {\n const newTexture = new HDRCubeTexture(this.url, this.getScene() || this._getEngine(), this._size, this._noMipmap, this._generateHarmonics, this.gammaSpace);\n // Base texture\n newTexture.level = this.level;\n newTexture.wrapU = this.wrapU;\n newTexture.wrapV = this.wrapV;\n newTexture.coordinatesIndex = this.coordinatesIndex;\n newTexture.coordinatesMode = this.coordinatesMode;\n return newTexture;\n }\n // Methods\n delayLoad() {\n if (this.delayLoadState !== 4) {\n return;\n }\n this.delayLoadState = 1;\n this._texture = this._getFromCache(this.url, this._noMipmap);\n if (!this._texture) {\n this._loadTexture();\n }\n }\n /**\n * Get the texture reflection matrix used to rotate/transform the reflection.\n * @returns the reflection matrix\n */\n getReflectionTextureMatrix() {\n return this._textureMatrix;\n }\n /**\n * Set the texture reflection matrix used to rotate/transform the reflection.\n * @param value Define the reflection matrix to set\n */\n setReflectionTextureMatrix(value) {\n var _a;\n this._textureMatrix = value;\n if (value.updateFlag === this._textureMatrix.updateFlag) {\n return;\n }\n if (value.isIdentity() !== this._textureMatrix.isIdentity()) {\n (_a = this.getScene()) === null || _a === void 0 ? void 0 : _a.markAllMaterialsAsDirty(1, (mat) => mat.getActiveTextures().indexOf(this) !== -1);\n }\n }\n /**\n * Dispose the texture and release its associated resources.\n */\n dispose() {\n this.onLoadObservable.clear();\n super.dispose();\n }\n /**\n * Parses a JSON representation of an HDR Texture in order to create the texture\n * @param parsedTexture Define the JSON representation\n * @param scene Define the scene the texture should be created in\n * @param rootUrl Define the root url in case we need to load relative dependencies\n * @returns the newly created texture after parsing\n */\n static Parse(parsedTexture, scene, rootUrl) {\n let texture = null;\n if (parsedTexture.name && !parsedTexture.isRenderTarget) {\n texture = new HDRCubeTexture(rootUrl + parsedTexture.name, scene, parsedTexture.size, parsedTexture.noMipmap, parsedTexture.generateHarmonics, parsedTexture.useInGammaSpace);\n texture.name = parsedTexture.name;\n texture.hasAlpha = parsedTexture.hasAlpha;\n texture.level = parsedTexture.level;\n texture.coordinatesMode = parsedTexture.coordinatesMode;\n texture.isBlocking = parsedTexture.isBlocking;\n }\n if (texture) {\n if (parsedTexture.boundingBoxPosition) {\n texture.boundingBoxPosition = Vector3.FromArray(parsedTexture.boundingBoxPosition);\n }\n if (parsedTexture.boundingBoxSize) {\n texture.boundingBoxSize = Vector3.FromArray(parsedTexture.boundingBoxSize);\n }\n if (parsedTexture.rotationY) {\n texture.rotationY = parsedTexture.rotationY;\n }\n }\n return texture;\n }\n serialize() {\n if (!this.name) {\n return null;\n }\n const serializationObject = {};\n serializationObject.name = this.name;\n serializationObject.hasAlpha = this.hasAlpha;\n serializationObject.isCube = true;\n serializationObject.level = this.level;\n serializationObject.size = this._size;\n serializationObject.coordinatesMode = this.coordinatesMode;\n serializationObject.useInGammaSpace = this.gammaSpace;\n serializationObject.generateHarmonics = this._generateHarmonics;\n serializationObject.customType = \"BABYLON.HDRCubeTexture\";\n serializationObject.noMipmap = this._noMipmap;\n serializationObject.isBlocking = this._isBlocking;\n serializationObject.rotationY = this._rotationY;\n return serializationObject;\n }\n}\nHDRCubeTexture._FacesMapping = [\"right\", \"left\", \"up\", \"down\", \"front\", \"back\"];\nRegisterClass(\"BABYLON.HDRCubeTexture\", HDRCubeTexture);\n//# sourceMappingURL=hdrCubeTexture.js.map","import { CubeTexture as BABYLON_CubeTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/cubeTexture.js';\nimport { HDRCubeTexture as BABYLON_HDRCubeTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/hdrCubeTexture.js';\nimport { Texture as BABYLON_Texture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Material as BABYLON_Material } from '@inter-ikea-betrakta-babylonjs/core/Materials/material.js';\nimport { MeshBuilder as BABYLON_MeshBuilder } from '@inter-ikea-betrakta-babylonjs/core/Meshes/meshBuilder.js';\nimport { RenderingGroupID } from '../Viewer.js';\nimport { ViewerMaterial } from '../material/ViewerMaterial.js';\nimport { deep_equals } from '../utility/utils.js';\nimport { vector_3 } from '../utility/Conversion.js';\nconst CUBEMAP_SIZE = 512; // the size on the cubetexture, if given hdr or longlat envmap.\nconst DDS = 'dds';\nconst ENV = 'env';\nconst HDR = 'hdr';\nexport class EnvironmentManager {\n constructor(_viewer, _ambient_light_controller) {\n this._viewer = _viewer;\n this._ambient_light_controller = _ambient_light_controller;\n this._skybox = null;\n this._environment_map_local_mode_settings = null; // null in this case means no local mode, i.e BabylonJS default behaviour.\n this._environment_map_url = null;\n this._environment_map_file_type = null;\n this._ready = Promise.resolve();\n this._scene = _viewer.scene;\n this._freezing_manager = _viewer.freezing_manager;\n this._asset_manager = _viewer.asset_manager;\n this._mark_scene_dirty = _viewer.mark_scene_dirty.bind(_viewer);\n if (this._viewer.has_default_view()) {\n // Skybox only works with the default view (better than nothing)\n // So before rendering the default view, we need to mark it as dirty for it to recalculate its world transform,\n // as it is dependant on the camera.\n this._viewer.get_default_view().before_render_observable.add((view) => {\n if (this._skybox === null)\n return;\n this._skybox.position.fromIVector3(view.engine_camera.position);\n this._skybox._updateSubMeshesBoundingInfo(this._skybox.getWorldMatrix());\n });\n }\n }\n get ready() {\n return this._ready;\n }\n set_scene_environment(cubetexture) {\n const old_environment_map = this._scene.environmentTexture;\n this._scene.environmentTexture = cubetexture;\n // @Martin Disabling the light when there are no other lights in the scene causes webgl warnings.\n // TODO: Dispose instead. Cannot see this error. On what devices does this happen?\n this._ambient_light_controller.set_intensity(0);\n // Set cached local mode, relavant if user have tried to set it before envmap was loded\n this.set_environment_map_local_mode(this._environment_map_local_mode_settings);\n if (old_environment_map) {\n old_environment_map.dispose();\n }\n this._freezing_manager.set_all_materials_dirty();\n this._mark_scene_dirty();\n }\n /**\n * Get file extension from URL string, if it contains one.\n */\n static parse_file_extension(url) {\n // Match first string preceded by '.', containing none of characters '.?#', and followed by string starting with '?' or '#', or nothing\n const file_extension = url.match(/\\.([^.?#]+)($|\\?|#)/);\n return file_extension ? file_extension[1] : null;\n }\n set_environment_map(url, file_extension, filter_mips) {\n if (url === this.get_environment_map()) {\n // Nothing has changed, so we just early out\n return Promise.resolve();\n }\n if (url === null) {\n this.set_scene_environment(null);\n this._environment_map_url = null;\n this._environment_map_file_type = null;\n if (this._skybox) {\n this.set_skybox_material_texture(null, this._skybox.material);\n }\n this._mark_scene_dirty();\n this._ambient_light_controller.set_intensity(1);\n return Promise.resolve();\n }\n file_extension = file_extension || EnvironmentManager.parse_file_extension(url !== null && url !== void 0 ? url : '');\n if (file_extension === null || file_extension === void 0 ? void 0 : file_extension.startsWith('.')) {\n file_extension = file_extension.substring(1);\n }\n if (file_extension !== DDS && file_extension !== ENV && file_extension !== HDR) {\n throw new Error('Viewer: Unsupported environment map format. Please use: .env, .dds or .hdr');\n }\n const load_promise = new Promise((resolve, reject) => {\n const on_loaded = () => {\n // Set cached local mode, relavant if user have tried to set it before envmap was loded\n this.apply_environment_map_local_mode();\n if (this._skybox) {\n this.set_skybox_material_texture(url, this._skybox.material);\n this._mark_scene_dirty();\n }\n resolve();\n };\n const on_error = (message, exception) => {\n reject(new Error(message));\n };\n this._environment_map_url = url;\n this._environment_map_file_type = file_extension; // Need to remember file extension for when we save a serialized scene, since the url is converted to a dataurl\n if (file_extension === DDS || file_extension === ENV) {\n const cubetexture = new BABYLON_CubeTexture(url, this._scene, undefined, undefined, undefined, on_loaded, on_error, undefined, true, '.' + file_extension);\n this.set_scene_environment(cubetexture);\n }\n else if (file_extension === HDR) {\n const cubetexture = new BABYLON_HDRCubeTexture(url, this._scene, CUBEMAP_SIZE, undefined, undefined, undefined, filter_mips, on_loaded, on_error);\n this.set_scene_environment(cubetexture);\n }\n });\n this._ready = load_promise;\n return load_promise;\n }\n get_environment_map() {\n return this._environment_map_url;\n }\n set_environment_map_intensity(intensity) {\n if (intensity === this._scene.environmentIntensity)\n return;\n this._scene.environmentIntensity = intensity;\n this._freezing_manager.set_all_materials_dirty();\n this._mark_scene_dirty();\n }\n get_environment_map_intensity() {\n return this._scene.environmentIntensity;\n }\n get_environment_map_rotation() {\n let rotation = 0;\n if (this._scene.environmentTexture instanceof BABYLON_CubeTexture || this._scene.environmentTexture instanceof BABYLON_HDRCubeTexture) {\n rotation = this._scene.environmentTexture.rotationY;\n }\n return rotation;\n }\n set_environment_map_rotation(rotation) {\n if (this._scene.environmentTexture instanceof BABYLON_CubeTexture || this._scene.environmentTexture instanceof BABYLON_HDRCubeTexture) {\n if (rotation === this._scene.environmentTexture.rotationY)\n return;\n this._scene.environmentTexture.rotationY = rotation;\n if (this._skybox) {\n const skybox_pbr_material = this._skybox.material;\n const skybox_cube_texture = skybox_pbr_material.reflectionTexture;\n skybox_cube_texture.rotationY = rotation;\n }\n this._freezing_manager.set_all_materials_dirty();\n this._mark_scene_dirty();\n }\n }\n set_environment_map_local_mode(settings) {\n if (this._environment_map_local_mode_settings === null && settings === null)\n return;\n if (this._environment_map_local_mode_settings !== null &&\n settings !== null &&\n deep_equals(this._environment_map_local_mode_settings, settings)) {\n return;\n }\n if (settings === null) {\n this._environment_map_local_mode_settings = null;\n }\n else {\n // Make sure we don't copy any references\n this._environment_map_local_mode_settings = {\n position: Object.assign({}, settings.position),\n size: Object.assign({}, settings.size)\n };\n }\n this.apply_environment_map_local_mode();\n }\n apply_environment_map_local_mode() {\n // Apply settings if environment is loaded\n if (this._scene.environmentTexture instanceof BABYLON_CubeTexture || this._scene.environmentTexture instanceof BABYLON_HDRCubeTexture) {\n // if settings is null, no local mode, default babylon behaviour.\n if (this._environment_map_local_mode_settings === null) {\n // @ts-ignore\n this._scene.environmentTexture.boundingBoxSize = null; // Need to ignore TS compiler due to wrong types in BabylonJS\n // @ts-ignore\n this._scene.environmentTexture.boundingBoxPosition = null; // Need to ignore TS compiler due to wrong types in BabylonJS\n }\n else {\n this._scene.environmentTexture.boundingBoxSize = vector_3(this._environment_map_local_mode_settings.size);\n this._scene.environmentTexture.boundingBoxPosition = vector_3(this._environment_map_local_mode_settings.position);\n }\n // Update all materials and trigger new render\n this._freezing_manager.set_all_materials_dirty();\n this._mark_scene_dirty();\n }\n }\n get_environment_map_local_mode() {\n if (this._scene.environmentTexture instanceof BABYLON_CubeTexture || this._scene.environmentTexture instanceof BABYLON_HDRCubeTexture) {\n const size = this._scene.environmentTexture.boundingBoxSize; // BabylonJS 4.1 have wrong type for boundBox in a envmap, realtyp BABYLON_Nullable | undefined\n const position = this._scene.environmentTexture.boundingBoxPosition; // BabylonJS 4.1 have wrong type for boundBox in a envmap, realtyp BABYLON_Nullable | undefined\n if (size instanceof BABYLON_Vector3 && position instanceof BABYLON_Vector3) {\n return {\n size: { x: size.x, y: size.y, z: size.z },\n position: { x: position.x, y: position.y, z: position.z }\n };\n }\n }\n return null;\n }\n show_environment_map_as_a_skybox(mesh_manager) {\n if (!this._skybox) {\n const sky_box_material = new ViewerMaterial(`material_${this._asset_manager.materials.length()}`, this._scene, this._viewer);\n sky_box_material.sideOrientation = BABYLON_Material.CounterClockWiseSideOrientation;\n sky_box_material.backFaceCulling = false;\n sky_box_material.disableDepthWrite = true; // Do not write to depth, let all other rendered object overwrite the pixels rendered from this box, since this box represents somethings that's really far away\n if (this._environment_map_url) {\n this.set_skybox_material_texture(this._environment_map_url, sky_box_material);\n }\n // Create mesh\n const size = 2.0;\n const options = {\n width: size,\n height: size,\n depth: size\n };\n const skybox_object = BABYLON_MeshBuilder.CreateBox('skybox', options, this._scene);\n this._skybox = skybox_object;\n this._skybox.material = sky_box_material;\n this._skybox.renderingGroupId = RenderingGroupID.SKYBOX_RENDERING_GROUP;\n }\n else {\n if (this._environment_map_url) {\n this.set_skybox_material_texture(this._environment_map_url, this._skybox.material);\n }\n }\n }\n set_skybox_material_texture(environment_map_url, sky_box_material) {\n if (environment_map_url) {\n sky_box_material.reflectionTexture = new BABYLON_CubeTexture(environment_map_url, this._scene);\n sky_box_material.reflectionTexture.coordinatesMode = BABYLON_Texture.SKYBOX_MODE;\n }\n else {\n sky_box_material.reflectionTexture = null;\n }\n }\n get_environment_map_file_type() {\n return this._environment_map_file_type;\n }\n get_skybox() {\n return this._skybox;\n }\n dispose() {\n var _a, _b;\n if (this._skybox) {\n (_a = this._skybox.material) === null || _a === void 0 ? void 0 : _a.dispose();\n this._skybox.dispose();\n this._skybox = null;\n }\n (_b = this._scene.environmentTexture) === null || _b === void 0 ? void 0 : _b.dispose();\n }\n}\n//# sourceMappingURL=EnvironmentManager.js.map","import { ShadowController, SHADOW_DEFAULTS } from './ShadowController.js';\nimport { IVector3 } from '../../../../api.js';\nexport class PointLightShadowController extends ShadowController {\n constructor(_light, _babylon_light, _light_system) {\n const shadow_values = SHADOW_DEFAULTS.POINT_LIGHT;\n super(_light, _babylon_light, _light_system, shadow_values.resolution, shadow_values.near, shadow_values.far, _babylon_light.getEngine().webGLVersion === 1 ? shadow_values.webgl1_bias : shadow_values.webgl2_bias);\n }\n should_update_shadowmap(meshes_modifications) {\n // TODO rework to `some`? compare performance\n for (const mod of meshes_modifications) {\n // Checks if the moved object was or is in the bounds of the shadow.\n const light_affects_old_bounds = this.sphere_inside_pointlight_shadow(mod.old_bounds, this._light);\n const light_affects_new_bounds = this.sphere_inside_pointlight_shadow(mod.new_bounds, this._light);\n if (light_affects_old_bounds || light_affects_new_bounds) {\n return true;\n }\n }\n return false;\n }\n sphere_inside_pointlight_shadow(sphere, light) {\n const delta = IVector3.subtract(sphere.position, light.get_world_position());\n const maxc = Math.max(Math.abs(delta.x), Math.abs(delta.y), Math.abs(delta.z));\n // This check will result in some false positives since it doesn't \"round\" the corners.\n // E.g. an object on on a diagonal from the light might flag the shadowmap as dirty even though it is slightly outside\n // The shadow far plane.\n return maxc < (this.shadow_far + sphere.radius) && maxc > (this.shadow_near - sphere.radius);\n }\n}\n//# sourceMappingURL=PointLightShadowController.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./decalFragmentDeclaration.js\";\nconst name = \"defaultFragmentDeclaration\";\nconst shader = `uniform vec4 vEyePosition;uniform vec4 vDiffuseColor;\n#ifdef SPECULARTERM\nuniform vec4 vSpecularColor;\n#endif\nuniform vec3 vEmissiveColor;uniform vec3 vAmbientColor;uniform float visibility;\n#ifdef DIFFUSE\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef AMBIENT\nuniform vec2 vAmbientInfos;\n#endif\n#ifdef OPACITY \nuniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;uniform vec2 vTangentSpaceParams;\n#endif\n#ifdef ALPHATEST\nuniform float alphaCutOff;\n#endif\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(REFRACTION) || defined(PREPASS)\nuniform mat4 view;\n#endif\n#ifdef REFRACTION\nuniform vec4 vRefractionInfos;\n#ifndef REFRACTIONMAP_3D\nuniform mat4 refractionMatrix;\n#endif\n#ifdef REFRACTIONFRESNEL\nuniform vec4 refractionLeftColor;uniform vec4 refractionRightColor;\n#endif\n#if defined(USE_LOCAL_REFRACTIONMAP_CUBIC) && defined(REFRACTIONMAP_3D)\nuniform vec3 vRefractionPosition;uniform vec3 vRefractionSize; \n#endif\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM)\nuniform vec2 vSpecularInfos;\n#endif\n#ifdef DIFFUSEFRESNEL\nuniform vec4 diffuseLeftColor;uniform vec4 diffuseRightColor;\n#endif\n#ifdef OPACITYFRESNEL\nuniform vec4 opacityParts;\n#endif\n#ifdef EMISSIVEFRESNEL\nuniform vec4 emissiveLeftColor;uniform vec4 emissiveRightColor;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\n#if defined(REFLECTIONMAP_PLANAR) || defined(REFLECTIONMAP_CUBIC) || defined(REFLECTIONMAP_PROJECTION) || defined(REFLECTIONMAP_EQUIRECTANGULAR) || defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_SKYBOX)\nuniform mat4 reflectionMatrix;\n#endif\n#ifndef REFLECTIONMAP_SKYBOX\n#if defined(USE_LOCAL_REFLECTIONMAP_CUBIC) && defined(REFLECTIONMAP_CUBIC)\nuniform vec3 vReflectionPosition;uniform vec3 vReflectionSize; \n#endif\n#endif\n#ifdef REFLECTIONFRESNEL\nuniform vec4 reflectionLeftColor;uniform vec4 reflectionRightColor;\n#endif\n#endif\n#ifdef DETAIL\nuniform vec4 vDetailInfos;\n#endif\n#include\n#define ADDITIONAL_FRAGMENT_DECLARATION\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const defaultFragmentDeclaration = { name, shader };\n//# sourceMappingURL=defaultFragmentDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./sceneUboDeclaration.js\";\nimport \"./meshUboDeclaration.js\";\nconst name = \"defaultUboDeclaration\";\nconst shader = `layout(std140,column_major) uniform;uniform Material\n{vec4 diffuseLeftColor;vec4 diffuseRightColor;vec4 opacityParts;vec4 reflectionLeftColor;vec4 reflectionRightColor;vec4 refractionLeftColor;vec4 refractionRightColor;vec4 emissiveLeftColor;vec4 emissiveRightColor;vec2 vDiffuseInfos;vec2 vAmbientInfos;vec2 vOpacityInfos;vec2 vReflectionInfos;vec3 vReflectionPosition;vec3 vReflectionSize;vec2 vEmissiveInfos;vec2 vLightmapInfos;vec2 vSpecularInfos;vec3 vBumpInfos;mat4 diffuseMatrix;mat4 ambientMatrix;mat4 opacityMatrix;mat4 reflectionMatrix;mat4 emissiveMatrix;mat4 lightmapMatrix;mat4 specularMatrix;mat4 bumpMatrix;vec2 vTangentSpaceParams;float pointSize;float alphaCutOff;mat4 refractionMatrix;vec4 vRefractionInfos;vec3 vRefractionPosition;vec3 vRefractionSize;vec4 vSpecularColor;vec3 vEmissiveColor;vec4 vDiffuseColor;vec3 vAmbientColor;\n#define ADDITIONAL_UBO_DECLARATION\n};\n#include\n#include\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const defaultUboDeclaration = { name, shader };\n//# sourceMappingURL=defaultUboDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nconst name = \"fresnelFunction\";\nconst shader = `#ifdef FRESNEL\nfloat computeFresnelTerm(vec3 viewDirection,vec3 worldNormal,float bias,float power)\n{float fresnelTerm=pow(bias+abs(dot(viewDirection,worldNormal)),power);return clamp(fresnelTerm,0.,1.);}\n#endif\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const fresnelFunction = { name, shader };\n//# sourceMappingURL=fresnelFunction.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/defaultFragmentDeclaration.js\";\nimport \"./ShadersInclude/defaultUboDeclaration.js\";\nimport \"./ShadersInclude/prePassDeclaration.js\";\nimport \"./ShadersInclude/oitDeclaration.js\";\nimport \"./ShadersInclude/mainUVVaryingDeclaration.js\";\nimport \"./ShadersInclude/helperFunctions.js\";\nimport \"./ShadersInclude/lightFragmentDeclaration.js\";\nimport \"./ShadersInclude/lightUboDeclaration.js\";\nimport \"./ShadersInclude/lightsFragmentFunctions.js\";\nimport \"./ShadersInclude/shadowsFragmentFunctions.js\";\nimport \"./ShadersInclude/samplerFragmentDeclaration.js\";\nimport \"./ShadersInclude/fresnelFunction.js\";\nimport \"./ShadersInclude/reflectionFunction.js\";\nimport \"./ShadersInclude/imageProcessingDeclaration.js\";\nimport \"./ShadersInclude/imageProcessingFunctions.js\";\nimport \"./ShadersInclude/bumpFragmentMainFunctions.js\";\nimport \"./ShadersInclude/bumpFragmentFunctions.js\";\nimport \"./ShadersInclude/clipPlaneFragmentDeclaration.js\";\nimport \"./ShadersInclude/logDepthDeclaration.js\";\nimport \"./ShadersInclude/fogFragmentDeclaration.js\";\nimport \"./ShadersInclude/clipPlaneFragment.js\";\nimport \"./ShadersInclude/bumpFragment.js\";\nimport \"./ShadersInclude/decalFragment.js\";\nimport \"./ShadersInclude/depthPrePass.js\";\nimport \"./ShadersInclude/lightFragment.js\";\nimport \"./ShadersInclude/logDepthFragment.js\";\nimport \"./ShadersInclude/fogFragment.js\";\nimport \"./ShadersInclude/oitFragment.js\";\nconst name = \"defaultPixelShader\";\nconst shader = `#include<__decl__defaultFragment>\n#if defined(BUMP) || !defined(NORMAL)\n#extension GL_OES_standard_derivatives : enable\n#endif\n#include[SCENE_MRT_COUNT]\n#include\n#define CUSTOM_FRAGMENT_BEGIN\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\n#endif\n#include[1..7]\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n#include(_DEFINENAME_,DIFFUSE,_VARYINGNAME_,Diffuse,_SAMPLERNAME_,diffuse)\n#include(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_SAMPLERNAME_,ambient)\n#include(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_SAMPLERNAME_,opacity)\n#include(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_SAMPLERNAME_,emissive)\n#include(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_SAMPLERNAME_,lightmap)\n#include(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_SAMPLERNAME_,decal)\n#ifdef REFRACTION\n#ifdef REFRACTIONMAP_3D\nuniform samplerCube refractionCubeSampler;\n#else\nuniform sampler2D refraction2DSampler;\n#endif\n#endif\n#if defined(SPECULARTERM)\n#include(_DEFINENAME_,SPECULAR,_VARYINGNAME_,Specular,_SAMPLERNAME_,specular)\n#endif\n#include\n#ifdef REFLECTION\n#ifdef REFLECTIONMAP_3D\nuniform samplerCube reflectionCubeSampler;\n#else\nuniform sampler2D reflection2DSampler;\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#else\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#endif\n#include\n#endif\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);vec4 baseColor=vec4(1.,1.,1.,1.);vec3 diffuseColor=vDiffuseColor.rgb;float alpha=vDiffuseColor.a;\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=normalize(-cross(dFdx(vPositionW),dFdy(vPositionW)));\n#endif\n#include\n#ifdef TWOSIDEDLIGHTING\nnormalW=gl_FrontFacing ? normalW : -normalW;\n#endif\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV+uvOffset);\n#if defined(ALPHATEST) && !defined(ALPHATEST_AFTERALLALPHACOMPUTATIONS)\nif (baseColor.a(surfaceAlbedo,baseColor,GAMMADECAL,_GAMMADECAL_NOTUSED_)\n#endif\n#include\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nbaseColor.rgb*=vColor.rgb;\n#endif\n#ifdef DETAIL\nbaseColor.rgb=baseColor.rgb*2.0*mix(0.5,detailColor.r,vDetailInfos.y);\n#endif\n#if defined(DECAL) && defined(DECAL_AFTER_DETAIL)\nvec4 decalColor=texture2D(decalSampler,vDecalUV+uvOffset);\n#include(surfaceAlbedo,baseColor,GAMMADECAL,_GAMMADECAL_NOTUSED_)\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE\nvec3 baseAmbientColor=vec3(1.,1.,1.);\n#ifdef AMBIENT\nbaseAmbientColor=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y;\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_LIGHTS\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;vec3 specularColor=vSpecularColor.rgb;\n#ifdef SPECULAR\nvec4 specularMapColor=texture2D(specularSampler,vSpecularUV+uvOffset);specularColor=specularMapColor.rgb;\n#ifdef GLOSSINESS\nglossiness=glossiness*specularMapColor.a;\n#endif\n#endif\n#else\nfloat glossiness=0.;\n#endif\nvec3 diffuseBase=vec3(0.,0.,0.);lightingInfo info;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\nfloat shadow=1.;float aggShadow=0.;float numLights=0.;\n#ifdef LIGHTMAP\nvec4 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset);\n#ifdef RGBDLIGHTMAP\nlightmapColor.rgb=fromRGBD(lightmapColor);\n#endif\nlightmapColor.rgb*=vLightmapInfos.y;\n#endif\n#include[0..maxSimultaneousLights]\naggShadow=aggShadow/numLights;vec4 refractionColor=vec4(0.,0.,0.,1.);\n#ifdef REFRACTION\nvec3 refractionVector=normalize(refract(-viewDirectionW,normalW,vRefractionInfos.y));\n#ifdef REFRACTIONMAP_3D\n#ifdef USE_LOCAL_REFRACTIONMAP_CUBIC\nrefractionVector=parallaxCorrectNormal(vPositionW,refractionVector,vRefractionSize,vRefractionPosition);\n#endif\nrefractionVector.y=refractionVector.y*vRefractionInfos.w;vec4 refractionLookup=textureCube(refractionCubeSampler,refractionVector);if (dot(refractionVector,viewDirectionW)<1.0) {refractionColor=refractionLookup;}\n#else\nvec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0)));vec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z;refractionCoords.y=1.0-refractionCoords.y;refractionColor=texture2D(refraction2DSampler,refractionCoords);\n#endif\n#ifdef RGBDREFRACTION\nrefractionColor.rgb=fromRGBD(refractionColor);\n#endif\n#ifdef IS_REFRACTION_LINEAR\nrefractionColor.rgb=toGammaSpace(refractionColor.rgb);\n#endif\nrefractionColor.rgb*=vRefractionInfos.x;\n#endif\nvec4 reflectionColor=vec4(0.,0.,0.,1.);\n#ifdef REFLECTION\nvec3 vReflectionUVW=computeReflectionCoords(vec4(vPositionW,1.0),normalW);\n#ifdef REFLECTIONMAP_OPPOSITEZ\nvReflectionUVW.z*=-1.0;\n#endif\n#ifdef REFLECTIONMAP_3D\n#ifdef ROUGHNESS\nfloat bias=vReflectionInfos.y;\n#ifdef SPECULARTERM\n#ifdef SPECULAR\n#ifdef GLOSSINESS\nbias*=(1.0-specularMapColor.a);\n#endif\n#endif\n#endif\nreflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW,bias);\n#else\nreflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW);\n#endif\n#else\nvec2 coords=vReflectionUVW.xy;\n#ifdef REFLECTIONMAP_PROJECTION\ncoords/=vReflectionUVW.z;\n#endif\ncoords.y=1.0-coords.y;reflectionColor=texture2D(reflection2DSampler,coords);\n#endif\n#ifdef RGBDREFLECTION\nreflectionColor.rgb=fromRGBD(reflectionColor);\n#endif\n#ifdef IS_REFLECTION_LINEAR\nreflectionColor.rgb=toGammaSpace(reflectionColor.rgb);\n#endif\nreflectionColor.rgb*=vReflectionInfos.x;\n#ifdef REFLECTIONFRESNEL\nfloat reflectionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,reflectionRightColor.a,reflectionLeftColor.a);\n#ifdef REFLECTIONFRESNELFROMSPECULAR\n#ifdef SPECULARTERM\nreflectionColor.rgb*=specularColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\n#else\nreflectionColor.rgb*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\n#endif\n#else\nreflectionColor.rgb*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\n#endif\n#endif\n#endif\n#ifdef REFRACTIONFRESNEL\nfloat refractionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,refractionRightColor.a,refractionLeftColor.a);refractionColor.rgb*=refractionLeftColor.rgb*(1.0-refractionFresnelTerm)+refractionFresnelTerm*refractionRightColor.rgb;\n#endif\n#ifdef OPACITY\nvec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset);\n#ifdef OPACITYRGB\nopacityMap.rgb=opacityMap.rgb*vec3(0.3,0.59,0.11);alpha*=(opacityMap.x+opacityMap.y+opacityMap.z)* vOpacityInfos.y;\n#else\nalpha*=opacityMap.a*vOpacityInfos.y;\n#endif\n#endif\n#if defined(VERTEXALPHA) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nalpha*=vColor.a;\n#endif\n#ifdef OPACITYFRESNEL\nfloat opacityFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,opacityParts.z,opacityParts.w);alpha+=opacityParts.x*(1.0-opacityFresnelTerm)+opacityFresnelTerm*opacityParts.y;\n#endif\n#ifdef ALPHATEST\n#ifdef ALPHATEST_AFTERALLALPHACOMPUTATIONS\nif (alpha\n#include\n#ifdef IMAGEPROCESSINGPOSTPROCESS\ncolor.rgb=toLinearSpace(color.rgb);\n#else\n#ifdef IMAGEPROCESSING\ncolor.rgb=toLinearSpace(color.rgb);color=applyImageProcessing(color);\n#endif\n#endif\ncolor.a*=visibility;\n#ifdef PREMULTIPLYALPHA\ncolor.rgb*=color.a;\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR\n#ifdef PREPASS\nfloat writeGeometryInfo=color.a>0.4 ? 1.0 : 0.0;gl_FragData[0]=color; \n#ifdef PREPASS_POSITION\ngl_FragData[PREPASS_POSITION_INDEX]=vec4(vPositionW,writeGeometryInfo);\n#endif\n#ifdef PREPASS_VELOCITY\nvec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5;vec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5;vec2 velocity=abs(a-b);velocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5;gl_FragData[PREPASS_VELOCITY_INDEX]=vec4(velocity,0.0,writeGeometryInfo);\n#endif\n#ifdef PREPASS_IRRADIANCE\ngl_FragData[PREPASS_IRRADIANCE_INDEX]=vec4(0.0,0.0,0.0,writeGeometryInfo); \n#endif\n#ifdef PREPASS_DEPTH\ngl_FragData[PREPASS_DEPTH_INDEX]=vec4(vViewPos.z,0.0,0.0,writeGeometryInfo); \n#endif\n#ifdef PREPASS_NORMAL\n#ifdef PREPASS_NORMAL_WORLDSPACE\ngl_FragData[PREPASS_NORMAL_INDEX]=vec4(normalW,writeGeometryInfo); \n#else\ngl_FragData[PREPASS_NORMAL_INDEX]=vec4(normalize((view*vec4(normalW,0.0)).rgb),writeGeometryInfo); \n#endif\n#endif\n#ifdef PREPASS_ALBEDO_SQRT\ngl_FragData[PREPASS_ALBEDO_SQRT_INDEX]=vec4(0.0,0.0,0.0,writeGeometryInfo); \n#endif\n#ifdef PREPASS_REFLECTIVITY\n#if defined(SPECULARTERM)\n#if defined(SPECULAR)\ngl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4(toLinearSpace(specularMapColor))*writeGeometryInfo; \n#else\ngl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4(toLinearSpace(specularColor),1.0)*writeGeometryInfo;\n#endif\n#else\ngl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4(0.0,0.0,0.0,1.0)*writeGeometryInfo;\n#endif\n#endif\n#endif\n#if !defined(PREPASS) || defined(WEBGL2)\ngl_FragColor=color;\n#endif\n#include\n#if ORDER_INDEPENDENT_TRANSPARENCY\nif (fragDepth==nearestDepth) {frontColor.rgb+=color.rgb*color.a*alphaMultiplier;frontColor.a=1.0-alphaMultiplier*(1.0-color.a);} else {backColor+=color;}\n#endif\n#define CUSTOM_FRAGMENT_MAIN_END\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const defaultPixelShader = { name, shader };\n//# sourceMappingURL=default.fragment.js.map","// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore.js\";\nimport \"./decalVertexDeclaration.js\";\nconst name = \"defaultVertexDeclaration\";\nconst shader = `uniform mat4 viewProjection;uniform mat4 view;\n#ifdef DIFFUSE\nuniform mat4 diffuseMatrix;uniform vec2 vDiffuseInfos;\n#endif\n#ifdef AMBIENT\nuniform mat4 ambientMatrix;uniform vec2 vAmbientInfos;\n#endif\n#ifdef OPACITY\nuniform mat4 opacityMatrix;uniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;uniform mat4 emissiveMatrix;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;uniform mat4 lightmapMatrix;\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM)\nuniform vec2 vSpecularInfos;uniform mat4 specularMatrix;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;uniform mat4 bumpMatrix;\n#endif\n#ifdef REFLECTION\nuniform mat4 reflectionMatrix;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n#ifdef DETAIL\nuniform vec4 vDetailInfos;uniform mat4 detailMatrix;\n#endif\n#include\n#define ADDITIONAL_VERTEX_DECLARATION\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const defaultVertexDeclaration = { name, shader };\n//# sourceMappingURL=defaultVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport \"./ShadersInclude/defaultVertexDeclaration.js\";\nimport \"./ShadersInclude/defaultUboDeclaration.js\";\nimport \"./ShadersInclude/uvAttributeDeclaration.js\";\nimport \"./ShadersInclude/helperFunctions.js\";\nimport \"./ShadersInclude/bonesDeclaration.js\";\nimport \"./ShadersInclude/bakedVertexAnimationDeclaration.js\";\nimport \"./ShadersInclude/instancesDeclaration.js\";\nimport \"./ShadersInclude/prePassVertexDeclaration.js\";\nimport \"./ShadersInclude/mainUVVaryingDeclaration.js\";\nimport \"./ShadersInclude/samplerVertexDeclaration.js\";\nimport \"./ShadersInclude/bumpVertexDeclaration.js\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration.js\";\nimport \"./ShadersInclude/fogVertexDeclaration.js\";\nimport \"./ShadersInclude/lightVxFragmentDeclaration.js\";\nimport \"./ShadersInclude/lightVxUboDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexGlobalDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexDeclaration.js\";\nimport \"./ShadersInclude/logDepthDeclaration.js\";\nimport \"./ShadersInclude/morphTargetsVertexGlobal.js\";\nimport \"./ShadersInclude/morphTargetsVertex.js\";\nimport \"./ShadersInclude/instancesVertex.js\";\nimport \"./ShadersInclude/bonesVertex.js\";\nimport \"./ShadersInclude/bakedVertexAnimation.js\";\nimport \"./ShadersInclude/prePassVertex.js\";\nimport \"./ShadersInclude/uvVariableDeclaration.js\";\nimport \"./ShadersInclude/samplerVertexImplementation.js\";\nimport \"./ShadersInclude/bumpVertex.js\";\nimport \"./ShadersInclude/clipPlaneVertex.js\";\nimport \"./ShadersInclude/fogVertex.js\";\nimport \"./ShadersInclude/shadowsVertex.js\";\nimport \"./ShadersInclude/vertexColorMixing.js\";\nimport \"./ShadersInclude/pointCloudVertex.js\";\nimport \"./ShadersInclude/logDepthVertex.js\";\nconst name = \"defaultVertexShader\";\nconst shader = `#include<__decl__defaultVertex>\n#define CUSTOM_VERTEX_BEGIN\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef TANGENT\nattribute vec4 tangent;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#include[2..7]\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n#include\n#include\n#include\n#include\n#include[1..7]\n#include(_DEFINENAME_,DIFFUSE,_VARYINGNAME_,Diffuse)\n#include(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)\n#include(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient)\n#include(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity)\n#include(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive)\n#include(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap)\n#if defined(SPECULARTERM)\n#include(_DEFINENAME_,SPECULAR,_VARYINGNAME_,Specular)\n#endif\n#include(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump)\n#include(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include\n#include<__decl__lightVxFragment>[0..maxSimultaneousLights]\n#include\n#include[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec3 positionUpdated=position;\n#ifdef NORMAL\nvec3 normalUpdated=normal;\n#endif\n#ifdef TANGENT\nvec4 tangentUpdated=tangent;\n#endif\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include\n#include[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvPositionUVW=positionUpdated;\n#endif\n#define CUSTOM_VERTEX_UPDATE_POSITION\n#define CUSTOM_VERTEX_UPDATE_NORMAL\n#include\n#if defined(PREPASS) && defined(PREPASS_VELOCITY) && !defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);\n#endif\n#include\n#include\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#if defined(INSTANCES) && defined(THIN_INSTANCES)\nvNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vNormalW=normalize(normalWorld*vNormalW);\n#else\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normalUpdated);\n#endif\n#endif\n#define CUSTOM_VERTEX_UPDATE_WORLDPOS\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;}\n#else\ngl_Position=viewProjection*worldPos;\n#endif\nvPositionW=vec3(worldPos);\n#include\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));\n#endif\n#ifndef UV1\nvec2 uvUpdated=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uvUpdated;\n#endif\n#include[2..7]\n#include(_DEFINENAME_,DIFFUSE,_VARYINGNAME_,Diffuse,_MATRIXNAME_,diffuse,_INFONAME_,DiffuseInfos.x)\n#include(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)\n#include(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x)\n#include(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x)\n#include(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x)\n#include(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x)\n#if defined(SPECULARTERM)\n#include(_DEFINENAME_,SPECULAR,_VARYINGNAME_,Specular,_MATRIXNAME_,specular,_INFONAME_,SpecularInfos.x)\n#endif\n#include(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x)\n#include(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)\n#include\n#include\n#include\n#include[0..maxSimultaneousLights]\n#include\n#include\n#include\n#define CUSTOM_VERTEX_MAIN_END\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const defaultVertexShader = { name, shader };\n//# sourceMappingURL=default.vertex.js.map","import { __decorate } from \"../tslib.es6.js\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { serialize, SerializationHelper, serializeAsColor3, expandToProperty, serializeAsFresnelParameters, serializeAsTexture } from \"../Misc/decorators.js\";\nimport { SmartArray } from \"../Misc/smartArray.js\";\nimport { Scene } from \"../scene.js\";\nimport { Matrix } from \"../Maths/math.vector.js\";\nimport { Color3 } from \"../Maths/math.color.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { PrePassConfiguration } from \"./prePassConfiguration.js\";\nimport { ImageProcessingConfiguration } from \"./imageProcessingConfiguration.js\";\nimport { Material } from \"../Materials/material.js\";\nimport { MaterialPluginEvent } from \"./materialPluginEvent.js\";\nimport { MaterialDefines } from \"../Materials/materialDefines.js\";\nimport { PushMaterial } from \"./pushMaterial.js\";\nimport { MaterialHelper } from \"./materialHelper.js\";\nimport { Texture } from \"../Materials/Textures/texture.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { MaterialFlags } from \"./materialFlags.js\";\nimport \"../Shaders/default.fragment.js\";\nimport \"../Shaders/default.vertex.js\";\n\nimport { EffectFallbacks } from \"./effectFallbacks.js\";\nimport { DetailMapConfiguration } from \"./material.detailMapConfiguration.js\";\nimport { addClipPlaneUniforms, bindClipPlane } from \"./clipPlaneMaterialHelper.js\";\nconst onCreatedEffectParameters = { effect: null, subMesh: null };\n/** @internal */\nexport class StandardMaterialDefines extends MaterialDefines {\n /**\n * Initializes the Standard Material defines.\n * @param externalProperties The external properties\n */\n constructor(externalProperties) {\n super(externalProperties);\n this.MAINUV1 = false;\n this.MAINUV2 = false;\n this.MAINUV3 = false;\n this.MAINUV4 = false;\n this.MAINUV5 = false;\n this.MAINUV6 = false;\n this.DIFFUSE = false;\n this.DIFFUSEDIRECTUV = 0;\n this.BAKED_VERTEX_ANIMATION_TEXTURE = false;\n this.AMBIENT = false;\n this.AMBIENTDIRECTUV = 0;\n this.OPACITY = false;\n this.OPACITYDIRECTUV = 0;\n this.OPACITYRGB = false;\n this.REFLECTION = false;\n this.EMISSIVE = false;\n this.EMISSIVEDIRECTUV = 0;\n this.SPECULAR = false;\n this.SPECULARDIRECTUV = 0;\n this.BUMP = false;\n this.BUMPDIRECTUV = 0;\n this.PARALLAX = false;\n this.PARALLAX_RHS = false;\n this.PARALLAXOCCLUSION = false;\n this.SPECULAROVERALPHA = false;\n this.CLIPPLANE = false;\n this.CLIPPLANE2 = false;\n this.CLIPPLANE3 = false;\n this.CLIPPLANE4 = false;\n this.CLIPPLANE5 = false;\n this.CLIPPLANE6 = false;\n this.ALPHATEST = false;\n this.DEPTHPREPASS = false;\n this.ALPHAFROMDIFFUSE = false;\n this.POINTSIZE = false;\n this.FOG = false;\n this.SPECULARTERM = false;\n this.DIFFUSEFRESNEL = false;\n this.OPACITYFRESNEL = false;\n this.REFLECTIONFRESNEL = false;\n this.REFRACTIONFRESNEL = false;\n this.EMISSIVEFRESNEL = false;\n this.FRESNEL = false;\n this.NORMAL = false;\n this.TANGENT = false;\n this.UV1 = false;\n this.UV2 = false;\n this.UV3 = false;\n this.UV4 = false;\n this.UV5 = false;\n this.UV6 = false;\n this.VERTEXCOLOR = false;\n this.VERTEXALPHA = false;\n this.NUM_BONE_INFLUENCERS = 0;\n this.BonesPerMesh = 0;\n this.BONETEXTURE = false;\n this.BONES_VELOCITY_ENABLED = false;\n this.INSTANCES = false;\n this.THIN_INSTANCES = false;\n this.INSTANCESCOLOR = false;\n this.GLOSSINESS = false;\n this.ROUGHNESS = false;\n this.EMISSIVEASILLUMINATION = false;\n this.LINKEMISSIVEWITHDIFFUSE = false;\n this.REFLECTIONFRESNELFROMSPECULAR = false;\n this.LIGHTMAP = false;\n this.LIGHTMAPDIRECTUV = 0;\n this.OBJECTSPACE_NORMALMAP = false;\n this.USELIGHTMAPASSHADOWMAP = false;\n this.REFLECTIONMAP_3D = false;\n this.REFLECTIONMAP_SPHERICAL = false;\n this.REFLECTIONMAP_PLANAR = false;\n this.REFLECTIONMAP_CUBIC = false;\n this.USE_LOCAL_REFLECTIONMAP_CUBIC = false;\n this.USE_LOCAL_REFRACTIONMAP_CUBIC = false;\n this.REFLECTIONMAP_PROJECTION = false;\n this.REFLECTIONMAP_SKYBOX = false;\n this.REFLECTIONMAP_EXPLICIT = false;\n this.REFLECTIONMAP_EQUIRECTANGULAR = false;\n this.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = false;\n this.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = false;\n this.REFLECTIONMAP_OPPOSITEZ = false;\n this.INVERTCUBICMAP = false;\n this.LOGARITHMICDEPTH = false;\n this.REFRACTION = false;\n this.REFRACTIONMAP_3D = false;\n this.REFLECTIONOVERALPHA = false;\n this.TWOSIDEDLIGHTING = false;\n this.SHADOWFLOAT = false;\n this.MORPHTARGETS = false;\n this.MORPHTARGETS_NORMAL = false;\n this.MORPHTARGETS_TANGENT = false;\n this.MORPHTARGETS_UV = false;\n this.NUM_MORPH_INFLUENCERS = 0;\n this.MORPHTARGETS_TEXTURE = false;\n this.NONUNIFORMSCALING = false; // https://playground.babylonjs.com#V6DWIH\n this.PREMULTIPLYALPHA = false; // https://playground.babylonjs.com#LNVJJ7\n this.ALPHATEST_AFTERALLALPHACOMPUTATIONS = false;\n this.ALPHABLEND = true;\n this.PREPASS = false;\n this.PREPASS_IRRADIANCE = false;\n this.PREPASS_IRRADIANCE_INDEX = -1;\n this.PREPASS_ALBEDO_SQRT = false;\n this.PREPASS_ALBEDO_SQRT_INDEX = -1;\n this.PREPASS_DEPTH = false;\n this.PREPASS_DEPTH_INDEX = -1;\n this.PREPASS_NORMAL = false;\n this.PREPASS_NORMAL_INDEX = -1;\n this.PREPASS_NORMAL_WORLDSPACE = false;\n this.PREPASS_POSITION = false;\n this.PREPASS_POSITION_INDEX = -1;\n this.PREPASS_VELOCITY = false;\n this.PREPASS_VELOCITY_INDEX = -1;\n this.PREPASS_REFLECTIVITY = false;\n this.PREPASS_REFLECTIVITY_INDEX = -1;\n this.SCENE_MRT_COUNT = 0;\n this.RGBDLIGHTMAP = false;\n this.RGBDREFLECTION = false;\n this.RGBDREFRACTION = false;\n this.IMAGEPROCESSING = false;\n this.VIGNETTE = false;\n this.VIGNETTEBLENDMODEMULTIPLY = false;\n this.VIGNETTEBLENDMODEOPAQUE = false;\n this.TONEMAPPING = false;\n this.TONEMAPPING_ACES = false;\n this.CONTRAST = false;\n this.COLORCURVES = false;\n this.COLORGRADING = false;\n this.COLORGRADING3D = false;\n this.SAMPLER3DGREENDEPTH = false;\n this.SAMPLER3DBGRMAP = false;\n this.DITHER = false;\n this.IMAGEPROCESSINGPOSTPROCESS = false;\n this.SKIPFINALCOLORCLAMP = false;\n this.MULTIVIEW = false;\n this.ORDER_INDEPENDENT_TRANSPARENCY = false;\n this.ORDER_INDEPENDENT_TRANSPARENCY_16BITS = false;\n this.CAMERA_ORTHOGRAPHIC = false;\n this.CAMERA_PERSPECTIVE = false;\n /**\n * If the reflection texture on this material is in linear color space\n * @internal\n */\n this.IS_REFLECTION_LINEAR = false;\n /**\n * If the refraction texture on this material is in linear color space\n * @internal\n */\n this.IS_REFRACTION_LINEAR = false;\n this.EXPOSURE = false;\n this.DECAL_AFTER_DETAIL = false;\n this.rebuild();\n }\n setReflectionMode(modeToEnable) {\n const modes = [\n \"REFLECTIONMAP_CUBIC\",\n \"REFLECTIONMAP_EXPLICIT\",\n \"REFLECTIONMAP_PLANAR\",\n \"REFLECTIONMAP_PROJECTION\",\n \"REFLECTIONMAP_PROJECTION\",\n \"REFLECTIONMAP_SKYBOX\",\n \"REFLECTIONMAP_SPHERICAL\",\n \"REFLECTIONMAP_EQUIRECTANGULAR\",\n \"REFLECTIONMAP_EQUIRECTANGULAR_FIXED\",\n \"REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\",\n ];\n for (const mode of modes) {\n this[mode] = mode === modeToEnable;\n }\n }\n}\n/**\n * This is the default material used in Babylon. It is the best trade off between quality\n * and performances.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction\n */\nexport class StandardMaterial extends PushMaterial {\n /**\n * Gets the image processing configuration used either in this material.\n */\n get imageProcessingConfiguration() {\n return this._imageProcessingConfiguration;\n }\n /**\n * Sets the Default image processing configuration used either in the this material.\n *\n * If sets to null, the scene one is in use.\n */\n set imageProcessingConfiguration(value) {\n this._attachImageProcessingConfiguration(value);\n // Ensure the effect will be rebuilt.\n this._markAllSubMeshesAsTexturesDirty();\n }\n /**\n * Attaches a new image processing configuration to the Standard Material.\n * @param configuration\n */\n _attachImageProcessingConfiguration(configuration) {\n if (configuration === this._imageProcessingConfiguration) {\n return;\n }\n // Detaches observer\n if (this._imageProcessingConfiguration && this._imageProcessingObserver) {\n this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);\n }\n // Pick the scene configuration if needed\n if (!configuration) {\n this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;\n }\n else {\n this._imageProcessingConfiguration = configuration;\n }\n // Attaches observer\n if (this._imageProcessingConfiguration) {\n this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(() => {\n this._markAllSubMeshesAsImageProcessingDirty();\n });\n }\n }\n /**\n * Can this material render to prepass\n */\n get isPrePassCapable() {\n return !this.disableDepthWrite;\n }\n /**\n * Gets whether the color curves effect is enabled.\n */\n get cameraColorCurvesEnabled() {\n return this.imageProcessingConfiguration.colorCurvesEnabled;\n }\n /**\n * Sets whether the color curves effect is enabled.\n */\n set cameraColorCurvesEnabled(value) {\n this.imageProcessingConfiguration.colorCurvesEnabled = value;\n }\n /**\n * Gets whether the color grading effect is enabled.\n */\n get cameraColorGradingEnabled() {\n return this.imageProcessingConfiguration.colorGradingEnabled;\n }\n /**\n * Gets whether the color grading effect is enabled.\n */\n set cameraColorGradingEnabled(value) {\n this.imageProcessingConfiguration.colorGradingEnabled = value;\n }\n /**\n * Gets whether tonemapping is enabled or not.\n */\n get cameraToneMappingEnabled() {\n return this._imageProcessingConfiguration.toneMappingEnabled;\n }\n /**\n * Sets whether tonemapping is enabled or not\n */\n set cameraToneMappingEnabled(value) {\n this._imageProcessingConfiguration.toneMappingEnabled = value;\n }\n /**\n * The camera exposure used on this material.\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\n * This corresponds to a photographic exposure.\n */\n get cameraExposure() {\n return this._imageProcessingConfiguration.exposure;\n }\n /**\n * The camera exposure used on this material.\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\n * This corresponds to a photographic exposure.\n */\n set cameraExposure(value) {\n this._imageProcessingConfiguration.exposure = value;\n }\n /**\n * Gets The camera contrast used on this material.\n */\n get cameraContrast() {\n return this._imageProcessingConfiguration.contrast;\n }\n /**\n * Sets The camera contrast used on this material.\n */\n set cameraContrast(value) {\n this._imageProcessingConfiguration.contrast = value;\n }\n /**\n * Gets the Color Grading 2D Lookup Texture.\n */\n get cameraColorGradingTexture() {\n return this._imageProcessingConfiguration.colorGradingTexture;\n }\n /**\n * Sets the Color Grading 2D Lookup Texture.\n */\n set cameraColorGradingTexture(value) {\n this._imageProcessingConfiguration.colorGradingTexture = value;\n }\n /**\n * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).\n * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.\n * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;\n * corresponding to low luminance, medium luminance, and high luminance areas respectively.\n */\n get cameraColorCurves() {\n return this._imageProcessingConfiguration.colorCurves;\n }\n /**\n * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).\n * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.\n * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;\n * corresponding to low luminance, medium luminance, and high luminance areas respectively.\n */\n set cameraColorCurves(value) {\n this._imageProcessingConfiguration.colorCurves = value;\n }\n /**\n * Can this material render to several textures at once\n */\n get canRenderToMRT() {\n return true;\n }\n /**\n * Instantiates a new standard material.\n * This is the default material used in Babylon. It is the best trade off between quality\n * and performances.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction\n * @param name Define the name of the material in the scene\n * @param scene Define the scene the material belong to\n */\n constructor(name, scene) {\n super(name, scene);\n this._diffuseTexture = null;\n this._ambientTexture = null;\n this._opacityTexture = null;\n this._reflectionTexture = null;\n this._emissiveTexture = null;\n this._specularTexture = null;\n this._bumpTexture = null;\n this._lightmapTexture = null;\n this._refractionTexture = null;\n /**\n * The color of the material lit by the environmental background lighting.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#ambient-color-example\n */\n this.ambientColor = new Color3(0, 0, 0);\n /**\n * The basic color of the material as viewed under a light.\n */\n this.diffuseColor = new Color3(1, 1, 1);\n /**\n * Define how the color and intensity of the highlight given by the light in the material.\n */\n this.specularColor = new Color3(1, 1, 1);\n /**\n * Define the color of the material as if self lit.\n * This will be mixed in the final result even in the absence of light.\n */\n this.emissiveColor = new Color3(0, 0, 0);\n /**\n * Defines how sharp are the highlights in the material.\n * The bigger the value the sharper giving a more glossy feeling to the result.\n * Reversely, the smaller the value the blurrier giving a more rough feeling to the result.\n */\n this.specularPower = 64;\n this._useAlphaFromDiffuseTexture = false;\n this._useEmissiveAsIllumination = false;\n this._linkEmissiveWithDiffuse = false;\n this._useSpecularOverAlpha = false;\n this._useReflectionOverAlpha = false;\n this._disableLighting = false;\n this._useObjectSpaceNormalMap = false;\n this._useParallax = false;\n this._useParallaxOcclusion = false;\n /**\n * Apply a scaling factor that determine which \"depth\" the height map should reprensent. A value between 0.05 and 0.1 is reasonnable in Parallax, you can reach 0.2 using Parallax Occlusion.\n */\n this.parallaxScaleBias = 0.05;\n this._roughness = 0;\n /**\n * In case of refraction, define the value of the index of refraction.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions\n */\n this.indexOfRefraction = 0.98;\n /**\n * Invert the refraction texture alongside the y axis.\n * It can be useful with procedural textures or probe for instance.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions\n */\n this.invertRefractionY = true;\n /**\n * Defines the alpha limits in alpha test mode.\n */\n this.alphaCutOff = 0.4;\n this._useLightmapAsShadowmap = false;\n this._useReflectionFresnelFromSpecular = false;\n this._useGlossinessFromSpecularMapAlpha = false;\n this._maxSimultaneousLights = 4;\n this._invertNormalMapX = false;\n this._invertNormalMapY = false;\n this._twoSidedLighting = false;\n this._applyDecalMapAfterDetailMap = false;\n this._renderTargets = new SmartArray(16);\n this._worldViewProjectionMatrix = Matrix.Zero();\n this._globalAmbientColor = new Color3(0, 0, 0);\n this._cacheHasRenderTargetTextures = false;\n this.detailMap = new DetailMapConfiguration(this);\n // Setup the default processing configuration to the scene.\n this._attachImageProcessingConfiguration(null);\n this.prePassConfiguration = new PrePassConfiguration();\n this.getRenderTargetTextures = () => {\n this._renderTargets.reset();\n if (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n this._renderTargets.push(this._reflectionTexture);\n }\n if (StandardMaterial.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {\n this._renderTargets.push(this._refractionTexture);\n }\n this._eventInfo.renderTargets = this._renderTargets;\n this._callbackPluginEventFillRenderTargetTextures(this._eventInfo);\n return this._renderTargets;\n };\n }\n /**\n * Gets a boolean indicating that current material needs to register RTT\n */\n get hasRenderTargetTextures() {\n if (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n return true;\n }\n if (StandardMaterial.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {\n return true;\n }\n return this._cacheHasRenderTargetTextures;\n }\n /**\n * Gets the current class name of the material e.g. \"StandardMaterial\"\n * Mainly use in serialization.\n * @returns the class name\n */\n getClassName() {\n return \"StandardMaterial\";\n }\n /**\n * In case the depth buffer does not allow enough depth precision for your scene (might be the case in large scenes)\n * You can try switching to logarithmic depth.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/logarithmicDepthBuffer\n */\n get useLogarithmicDepth() {\n return this._useLogarithmicDepth;\n }\n set useLogarithmicDepth(value) {\n this._useLogarithmicDepth = value && this.getScene().getEngine().getCaps().fragmentDepthSupported;\n this._markAllSubMeshesAsMiscDirty();\n }\n /**\n * Specifies if the material will require alpha blending\n * @returns a boolean specifying if alpha blending is needed\n */\n needAlphaBlending() {\n if (this._disableAlphaBlending) {\n return false;\n }\n return (this.alpha < 1.0 ||\n this._opacityTexture != null ||\n this._shouldUseAlphaFromDiffuseTexture() ||\n (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled));\n }\n /**\n * Specifies if this material should be rendered in alpha test mode\n * @returns a boolean specifying if an alpha test is needed.\n */\n needAlphaTesting() {\n if (this._forceAlphaTest) {\n return true;\n }\n return this._hasAlphaChannel() && (this._transparencyMode == null || this._transparencyMode === Material.MATERIAL_ALPHATEST);\n }\n /**\n * Specifies whether or not the alpha value of the diffuse texture should be used for alpha blending.\n */\n _shouldUseAlphaFromDiffuseTexture() {\n return this._diffuseTexture != null && this._diffuseTexture.hasAlpha && this._useAlphaFromDiffuseTexture && this._transparencyMode !== Material.MATERIAL_OPAQUE;\n }\n /**\n * Specifies whether or not there is a usable alpha channel for transparency.\n */\n _hasAlphaChannel() {\n return (this._diffuseTexture != null && this._diffuseTexture.hasAlpha) || this._opacityTexture != null;\n }\n /**\n * Get the texture used for alpha test purpose.\n * @returns the diffuse texture in case of the standard material.\n */\n getAlphaTestTexture() {\n return this._diffuseTexture;\n }\n /**\n * Get if the submesh is ready to be used and all its information available.\n * Child classes can use it to update shaders\n * @param mesh defines the mesh to check\n * @param subMesh defines which submesh to check\n * @param useInstances specifies that instances should be used\n * @returns a boolean indicating that the submesh is ready or not\n */\n isReadyForSubMesh(mesh, subMesh, useInstances = false) {\n if (!this._uniformBufferLayoutBuilt) {\n this.buildUniformLayout();\n }\n if (subMesh.effect && this.isFrozen) {\n if (subMesh.effect._wasPreviouslyReady && subMesh.effect._wasPreviouslyUsingInstances === useInstances) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n this._callbackPluginEventGeneric(MaterialPluginEvent.GetDefineNames, this._eventInfo);\n subMesh.materialDefines = new StandardMaterialDefines(this._eventInfo.defineNames);\n }\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Lights\n defines._needNormals = MaterialHelper.PrepareDefinesForLights(scene, mesh, defines, true, this._maxSimultaneousLights, this._disableLighting);\n // Multiview\n MaterialHelper.PrepareDefinesForMultiview(scene, defines);\n // PrePass\n const oit = this.needAlphaBlendingForMesh(mesh) && this.getScene().useOrderIndependentTransparency;\n MaterialHelper.PrepareDefinesForPrePass(scene, defines, this.canRenderToMRT && !oit);\n // Order independant transparency\n MaterialHelper.PrepareDefinesForOIT(scene, defines, oit);\n // Textures\n if (defines._areTexturesDirty) {\n this._eventInfo.hasRenderTargetTextures = false;\n this._callbackPluginEventHasRenderTargetTextures(this._eventInfo);\n this._cacheHasRenderTargetTextures = this._eventInfo.hasRenderTargetTextures;\n defines._needUVs = false;\n for (let i = 1; i <= 6; ++i) {\n defines[\"MAINUV\" + i] = false;\n }\n if (scene.texturesEnabled) {\n defines.DIFFUSEDIRECTUV = 0;\n defines.BUMPDIRECTUV = 0;\n defines.AMBIENTDIRECTUV = 0;\n defines.OPACITYDIRECTUV = 0;\n defines.EMISSIVEDIRECTUV = 0;\n defines.SPECULARDIRECTUV = 0;\n defines.LIGHTMAPDIRECTUV = 0;\n if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {\n if (!this._diffuseTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n MaterialHelper.PrepareDefinesForMergedUV(this._diffuseTexture, defines, \"DIFFUSE\");\n }\n }\n else {\n defines.DIFFUSE = false;\n }\n if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {\n if (!this._ambientTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n MaterialHelper.PrepareDefinesForMergedUV(this._ambientTexture, defines, \"AMBIENT\");\n }\n }\n else {\n defines.AMBIENT = false;\n }\n if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {\n if (!this._opacityTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n MaterialHelper.PrepareDefinesForMergedUV(this._opacityTexture, defines, \"OPACITY\");\n defines.OPACITYRGB = this._opacityTexture.getAlphaFromRGB;\n }\n }\n else {\n defines.OPACITY = false;\n }\n if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {\n if (!this._reflectionTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n defines._needNormals = true;\n defines.REFLECTION = true;\n defines.ROUGHNESS = this._roughness > 0;\n defines.REFLECTIONOVERALPHA = this._useReflectionOverAlpha;\n defines.INVERTCUBICMAP = this._reflectionTexture.coordinatesMode === Texture.INVCUBIC_MODE;\n defines.REFLECTIONMAP_3D = this._reflectionTexture.isCube;\n defines.REFLECTIONMAP_OPPOSITEZ =\n defines.REFLECTIONMAP_3D && this.getScene().useRightHandedSystem ? !this._reflectionTexture.invertZ : this._reflectionTexture.invertZ;\n defines.RGBDREFLECTION = this._reflectionTexture.isRGBD;\n switch (this._reflectionTexture.coordinatesMode) {\n case Texture.EXPLICIT_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_EXPLICIT\");\n break;\n case Texture.PLANAR_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_PLANAR\");\n break;\n case Texture.PROJECTION_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_PROJECTION\");\n break;\n case Texture.SKYBOX_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_SKYBOX\");\n break;\n case Texture.SPHERICAL_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_SPHERICAL\");\n break;\n case Texture.EQUIRECTANGULAR_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_EQUIRECTANGULAR\");\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_EQUIRECTANGULAR_FIXED\");\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\");\n break;\n case Texture.CUBIC_MODE:\n case Texture.INVCUBIC_MODE:\n default:\n defines.setReflectionMode(\"REFLECTIONMAP_CUBIC\");\n break;\n }\n defines.USE_LOCAL_REFLECTIONMAP_CUBIC = this._reflectionTexture.boundingBoxSize ? true : false;\n }\n }\n else {\n defines.REFLECTION = false;\n defines.REFLECTIONMAP_OPPOSITEZ = false;\n }\n if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {\n if (!this._emissiveTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n MaterialHelper.PrepareDefinesForMergedUV(this._emissiveTexture, defines, \"EMISSIVE\");\n }\n }\n else {\n defines.EMISSIVE = false;\n }\n if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {\n if (!this._lightmapTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n MaterialHelper.PrepareDefinesForMergedUV(this._lightmapTexture, defines, \"LIGHTMAP\");\n defines.USELIGHTMAPASSHADOWMAP = this._useLightmapAsShadowmap;\n defines.RGBDLIGHTMAP = this._lightmapTexture.isRGBD;\n }\n }\n else {\n defines.LIGHTMAP = false;\n }\n if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {\n if (!this._specularTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n MaterialHelper.PrepareDefinesForMergedUV(this._specularTexture, defines, \"SPECULAR\");\n defines.GLOSSINESS = this._useGlossinessFromSpecularMapAlpha;\n }\n }\n else {\n defines.SPECULAR = false;\n }\n if (scene.getEngine().getCaps().standardDerivatives && this._bumpTexture && StandardMaterial.BumpTextureEnabled) {\n // Bump texture can not be not blocking.\n if (!this._bumpTexture.isReady()) {\n return false;\n }\n else {\n MaterialHelper.PrepareDefinesForMergedUV(this._bumpTexture, defines, \"BUMP\");\n defines.PARALLAX = this._useParallax;\n defines.PARALLAX_RHS = scene.useRightHandedSystem;\n defines.PARALLAXOCCLUSION = this._useParallaxOcclusion;\n }\n defines.OBJECTSPACE_NORMALMAP = this._useObjectSpaceNormalMap;\n }\n else {\n defines.BUMP = false;\n defines.PARALLAX = false;\n defines.PARALLAX_RHS = false;\n defines.PARALLAXOCCLUSION = false;\n }\n if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {\n if (!this._refractionTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n defines._needUVs = true;\n defines.REFRACTION = true;\n defines.REFRACTIONMAP_3D = this._refractionTexture.isCube;\n defines.RGBDREFRACTION = this._refractionTexture.isRGBD;\n defines.USE_LOCAL_REFRACTIONMAP_CUBIC = this._refractionTexture.boundingBoxSize ? true : false;\n }\n }\n else {\n defines.REFRACTION = false;\n }\n defines.TWOSIDEDLIGHTING = !this._backFaceCulling && this._twoSidedLighting;\n }\n else {\n defines.DIFFUSE = false;\n defines.AMBIENT = false;\n defines.OPACITY = false;\n defines.REFLECTION = false;\n defines.EMISSIVE = false;\n defines.LIGHTMAP = false;\n defines.BUMP = false;\n defines.REFRACTION = false;\n }\n defines.ALPHAFROMDIFFUSE = this._shouldUseAlphaFromDiffuseTexture();\n defines.EMISSIVEASILLUMINATION = this._useEmissiveAsIllumination;\n defines.LINKEMISSIVEWITHDIFFUSE = this._linkEmissiveWithDiffuse;\n defines.SPECULAROVERALPHA = this._useSpecularOverAlpha;\n defines.PREMULTIPLYALPHA = this.alphaMode === 7 || this.alphaMode === 8;\n defines.ALPHATEST_AFTERALLALPHACOMPUTATIONS = this.transparencyMode !== null;\n defines.ALPHABLEND = this.transparencyMode === null || this.needAlphaBlendingForMesh(mesh); // check on null for backward compatibility\n }\n this._eventInfo.isReadyForSubMesh = true;\n this._eventInfo.defines = defines;\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventIsReadyForSubMesh(this._eventInfo);\n if (!this._eventInfo.isReadyForSubMesh) {\n return false;\n }\n if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) {\n if (!this._imageProcessingConfiguration.isReady()) {\n return false;\n }\n this._imageProcessingConfiguration.prepareDefines(defines);\n defines.IS_REFLECTION_LINEAR = this.reflectionTexture != null && !this.reflectionTexture.gammaSpace;\n defines.IS_REFRACTION_LINEAR = this.refractionTexture != null && !this.refractionTexture.gammaSpace;\n }\n if (defines._areFresnelDirty) {\n if (StandardMaterial.FresnelEnabled) {\n // Fresnel\n if (this._diffuseFresnelParameters ||\n this._opacityFresnelParameters ||\n this._emissiveFresnelParameters ||\n this._refractionFresnelParameters ||\n this._reflectionFresnelParameters) {\n defines.DIFFUSEFRESNEL = this._diffuseFresnelParameters && this._diffuseFresnelParameters.isEnabled;\n defines.OPACITYFRESNEL = this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled;\n defines.REFLECTIONFRESNEL = this._reflectionFresnelParameters && this._reflectionFresnelParameters.isEnabled;\n defines.REFLECTIONFRESNELFROMSPECULAR = this._useReflectionFresnelFromSpecular;\n defines.REFRACTIONFRESNEL = this._refractionFresnelParameters && this._refractionFresnelParameters.isEnabled;\n defines.EMISSIVEFRESNEL = this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled;\n defines._needNormals = true;\n defines.FRESNEL = true;\n }\n }\n else {\n defines.FRESNEL = false;\n }\n }\n // Misc.\n MaterialHelper.PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh) || this._forceAlphaTest, defines, this._applyDecalMapAfterDetailMap);\n // Values that need to be evaluated on every frame\n MaterialHelper.PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);\n // External config\n this._eventInfo.defines = defines;\n this._eventInfo.mesh = mesh;\n this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo);\n // Attribs\n MaterialHelper.PrepareDefinesForAttributes(mesh, defines, true, true, true);\n // External config\n this._callbackPluginEventPrepareDefines(this._eventInfo);\n // Get correct effect\n let forceWasNotReadyPreviously = false;\n if (defines.isDirty) {\n const lightDisposed = defines._areLightsDisposed;\n defines.markAsProcessed();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.REFLECTION) {\n fallbacks.addFallback(0, \"REFLECTION\");\n }\n if (defines.SPECULAR) {\n fallbacks.addFallback(0, \"SPECULAR\");\n }\n if (defines.BUMP) {\n fallbacks.addFallback(0, \"BUMP\");\n }\n if (defines.PARALLAX) {\n fallbacks.addFallback(1, \"PARALLAX\");\n }\n if (defines.PARALLAX_RHS) {\n fallbacks.addFallback(1, \"PARALLAX_RHS\");\n }\n if (defines.PARALLAXOCCLUSION) {\n fallbacks.addFallback(0, \"PARALLAXOCCLUSION\");\n }\n if (defines.SPECULAROVERALPHA) {\n fallbacks.addFallback(0, \"SPECULAROVERALPHA\");\n }\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n if (defines.POINTSIZE) {\n fallbacks.addFallback(0, \"POINTSIZE\");\n }\n if (defines.LOGARITHMICDEPTH) {\n fallbacks.addFallback(0, \"LOGARITHMICDEPTH\");\n }\n MaterialHelper.HandleFallbacksForShadows(defines, fallbacks, this._maxSimultaneousLights);\n if (defines.SPECULARTERM) {\n fallbacks.addFallback(0, \"SPECULARTERM\");\n }\n if (defines.DIFFUSEFRESNEL) {\n fallbacks.addFallback(1, \"DIFFUSEFRESNEL\");\n }\n if (defines.OPACITYFRESNEL) {\n fallbacks.addFallback(2, \"OPACITYFRESNEL\");\n }\n if (defines.REFLECTIONFRESNEL) {\n fallbacks.addFallback(3, \"REFLECTIONFRESNEL\");\n }\n if (defines.EMISSIVEFRESNEL) {\n fallbacks.addFallback(4, \"EMISSIVEFRESNEL\");\n }\n if (defines.FRESNEL) {\n fallbacks.addFallback(4, \"FRESNEL\");\n }\n if (defines.MULTIVIEW) {\n fallbacks.addFallback(0, \"MULTIVIEW\");\n }\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n for (let i = 1; i <= 6; ++i) {\n if (defines[\"UV\" + i]) {\n attribs.push(`uv${i === 1 ? \"\" : i}`);\n }\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n MaterialHelper.PrepareAttributesForBones(attribs, mesh, defines, fallbacks);\n MaterialHelper.PrepareAttributesForInstances(attribs, defines);\n MaterialHelper.PrepareAttributesForMorphTargets(attribs, mesh, defines);\n MaterialHelper.PrepareAttributesForBakedVertexAnimation(attribs, mesh, defines);\n let shaderName = \"default\";\n const uniforms = [\n \"world\",\n \"view\",\n \"viewProjection\",\n \"vEyePosition\",\n \"vLightsType\",\n \"vAmbientColor\",\n \"vDiffuseColor\",\n \"vSpecularColor\",\n \"vEmissiveColor\",\n \"visibility\",\n \"vFogInfos\",\n \"vFogColor\",\n \"pointSize\",\n \"vDiffuseInfos\",\n \"vAmbientInfos\",\n \"vOpacityInfos\",\n \"vReflectionInfos\",\n \"vEmissiveInfos\",\n \"vSpecularInfos\",\n \"vBumpInfos\",\n \"vLightmapInfos\",\n \"vRefractionInfos\",\n \"mBones\",\n \"diffuseMatrix\",\n \"ambientMatrix\",\n \"opacityMatrix\",\n \"reflectionMatrix\",\n \"emissiveMatrix\",\n \"specularMatrix\",\n \"bumpMatrix\",\n \"normalMatrix\",\n \"lightmapMatrix\",\n \"refractionMatrix\",\n \"diffuseLeftColor\",\n \"diffuseRightColor\",\n \"opacityParts\",\n \"reflectionLeftColor\",\n \"reflectionRightColor\",\n \"emissiveLeftColor\",\n \"emissiveRightColor\",\n \"refractionLeftColor\",\n \"refractionRightColor\",\n \"vReflectionPosition\",\n \"vReflectionSize\",\n \"vRefractionPosition\",\n \"vRefractionSize\",\n \"logarithmicDepthConstant\",\n \"vTangentSpaceParams\",\n \"alphaCutOff\",\n \"boneTextureWidth\",\n \"morphTargetTextureInfo\",\n \"morphTargetTextureIndices\",\n ];\n const samplers = [\n \"diffuseSampler\",\n \"ambientSampler\",\n \"opacitySampler\",\n \"reflectionCubeSampler\",\n \"reflection2DSampler\",\n \"emissiveSampler\",\n \"specularSampler\",\n \"bumpSampler\",\n \"lightmapSampler\",\n \"refractionCubeSampler\",\n \"refraction2DSampler\",\n \"boneSampler\",\n \"morphTargets\",\n \"oitDepthSampler\",\n \"oitFrontColorSampler\",\n ];\n const uniformBuffers = [\"Material\", \"Scene\", \"Mesh\"];\n const indexParameters = { maxSimultaneousLights: this._maxSimultaneousLights, maxSimultaneousMorphTargets: defines.NUM_MORPH_INFLUENCERS };\n this._eventInfo.fallbacks = fallbacks;\n this._eventInfo.fallbackRank = 0;\n this._eventInfo.defines = defines;\n this._eventInfo.uniforms = uniforms;\n this._eventInfo.attributes = attribs;\n this._eventInfo.samplers = samplers;\n this._eventInfo.uniformBuffersNames = uniformBuffers;\n this._eventInfo.customCode = undefined;\n this._eventInfo.mesh = mesh;\n this._eventInfo.indexParameters = indexParameters;\n this._callbackPluginEventGeneric(MaterialPluginEvent.PrepareEffect, this._eventInfo);\n PrePassConfiguration.AddUniforms(uniforms);\n PrePassConfiguration.AddSamplers(samplers);\n if (ImageProcessingConfiguration) {\n ImageProcessingConfiguration.PrepareUniforms(uniforms, defines);\n ImageProcessingConfiguration.PrepareSamplers(samplers, defines);\n }\n MaterialHelper.PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: this._maxSimultaneousLights,\n });\n addClipPlaneUniforms(uniforms);\n const csnrOptions = {};\n if (this.customShaderNameResolve) {\n shaderName = this.customShaderNameResolve(shaderName, uniforms, uniformBuffers, samplers, defines, attribs, csnrOptions);\n }\n const join = defines.toString();\n const previousEffect = subMesh.effect;\n let effect = scene.getEngine().createEffect(shaderName, {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters,\n processFinalCode: csnrOptions.processFinalCode,\n processCodeAfterIncludes: this._eventInfo.customCode,\n multiTarget: defines.PREPASS,\n }, engine);\n this._eventInfo.customCode = undefined;\n if (effect) {\n if (this._onEffectCreatedObservable) {\n onCreatedEffectParameters.effect = effect;\n onCreatedEffectParameters.subMesh = subMesh;\n this._onEffectCreatedObservable.notifyObservers(onCreatedEffectParameters);\n }\n // Use previous effect while new one is compiling\n if (this.allowShaderHotSwapping && previousEffect && !effect.isReady()) {\n effect = previousEffect;\n defines.markAsUnprocessed();\n forceWasNotReadyPreviously = this.isFrozen;\n if (lightDisposed) {\n // re register in case it takes more than one frame.\n defines._areLightsDisposed = true;\n return false;\n }\n }\n else {\n scene.resetCachedMaterial();\n subMesh.setEffect(effect, defines, this._materialContext);\n }\n }\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n subMesh.effect._wasPreviouslyReady = forceWasNotReadyPreviously ? false : true;\n subMesh.effect._wasPreviouslyUsingInstances = useInstances;\n this._checkScenePerformancePriority();\n return true;\n }\n /**\n * Builds the material UBO layouts.\n * Used internally during the effect preparation.\n */\n buildUniformLayout() {\n // Order is important !\n const ubo = this._uniformBuffer;\n ubo.addUniform(\"diffuseLeftColor\", 4);\n ubo.addUniform(\"diffuseRightColor\", 4);\n ubo.addUniform(\"opacityParts\", 4);\n ubo.addUniform(\"reflectionLeftColor\", 4);\n ubo.addUniform(\"reflectionRightColor\", 4);\n ubo.addUniform(\"refractionLeftColor\", 4);\n ubo.addUniform(\"refractionRightColor\", 4);\n ubo.addUniform(\"emissiveLeftColor\", 4);\n ubo.addUniform(\"emissiveRightColor\", 4);\n ubo.addUniform(\"vDiffuseInfos\", 2);\n ubo.addUniform(\"vAmbientInfos\", 2);\n ubo.addUniform(\"vOpacityInfos\", 2);\n ubo.addUniform(\"vReflectionInfos\", 2);\n ubo.addUniform(\"vReflectionPosition\", 3);\n ubo.addUniform(\"vReflectionSize\", 3);\n ubo.addUniform(\"vEmissiveInfos\", 2);\n ubo.addUniform(\"vLightmapInfos\", 2);\n ubo.addUniform(\"vSpecularInfos\", 2);\n ubo.addUniform(\"vBumpInfos\", 3);\n ubo.addUniform(\"diffuseMatrix\", 16);\n ubo.addUniform(\"ambientMatrix\", 16);\n ubo.addUniform(\"opacityMatrix\", 16);\n ubo.addUniform(\"reflectionMatrix\", 16);\n ubo.addUniform(\"emissiveMatrix\", 16);\n ubo.addUniform(\"lightmapMatrix\", 16);\n ubo.addUniform(\"specularMatrix\", 16);\n ubo.addUniform(\"bumpMatrix\", 16);\n ubo.addUniform(\"vTangentSpaceParams\", 2);\n ubo.addUniform(\"pointSize\", 1);\n ubo.addUniform(\"alphaCutOff\", 1);\n ubo.addUniform(\"refractionMatrix\", 16);\n ubo.addUniform(\"vRefractionInfos\", 4);\n ubo.addUniform(\"vRefractionPosition\", 3);\n ubo.addUniform(\"vRefractionSize\", 3);\n ubo.addUniform(\"vSpecularColor\", 4);\n ubo.addUniform(\"vEmissiveColor\", 3);\n ubo.addUniform(\"vDiffuseColor\", 4);\n ubo.addUniform(\"vAmbientColor\", 3);\n super.buildUniformLayout();\n }\n /**\n * Binds the submesh to this material by preparing the effect and shader to draw\n * @param world defines the world transformation matrix\n * @param mesh defines the mesh containing the submesh\n * @param subMesh defines the submesh to bind the material to\n */\n bindForSubMesh(world, mesh, subMesh) {\n var _a;\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices Mesh.\n mesh.getMeshUniformBuffer().bindToEffect(effect, \"Mesh\");\n mesh.transferToEffect(world);\n // Binding unconditionally\n this._uniformBuffer.bindToEffect(effect, \"Material\");\n this.prePassConfiguration.bindForSubMesh(this._activeEffect, scene, mesh, world, this.isFrozen);\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventHardBindForSubMesh(this._eventInfo);\n // Normal Matrix\n if (defines.OBJECTSPACE_NORMALMAP) {\n world.toNormalMatrix(this._normalMatrix);\n this.bindOnlyNormalMatrix(this._normalMatrix);\n }\n const mustRebind = effect._forceRebindOnNextCall || this._mustRebind(scene, effect, mesh.visibility);\n // Bones\n MaterialHelper.BindBonesParameters(mesh, effect);\n const ubo = this._uniformBuffer;\n if (mustRebind) {\n this.bindViewProjection(effect);\n if (!ubo.useUbo || !this.isFrozen || !ubo.isSync || effect._forceRebindOnNextCall) {\n if (StandardMaterial.FresnelEnabled && defines.FRESNEL) {\n // Fresnel\n if (this.diffuseFresnelParameters && this.diffuseFresnelParameters.isEnabled) {\n ubo.updateColor4(\"diffuseLeftColor\", this.diffuseFresnelParameters.leftColor, this.diffuseFresnelParameters.power);\n ubo.updateColor4(\"diffuseRightColor\", this.diffuseFresnelParameters.rightColor, this.diffuseFresnelParameters.bias);\n }\n if (this.opacityFresnelParameters && this.opacityFresnelParameters.isEnabled) {\n ubo.updateColor4(\"opacityParts\", new Color3(this.opacityFresnelParameters.leftColor.toLuminance(), this.opacityFresnelParameters.rightColor.toLuminance(), this.opacityFresnelParameters.bias), this.opacityFresnelParameters.power);\n }\n if (this.reflectionFresnelParameters && this.reflectionFresnelParameters.isEnabled) {\n ubo.updateColor4(\"reflectionLeftColor\", this.reflectionFresnelParameters.leftColor, this.reflectionFresnelParameters.power);\n ubo.updateColor4(\"reflectionRightColor\", this.reflectionFresnelParameters.rightColor, this.reflectionFresnelParameters.bias);\n }\n if (this.refractionFresnelParameters && this.refractionFresnelParameters.isEnabled) {\n ubo.updateColor4(\"refractionLeftColor\", this.refractionFresnelParameters.leftColor, this.refractionFresnelParameters.power);\n ubo.updateColor4(\"refractionRightColor\", this.refractionFresnelParameters.rightColor, this.refractionFresnelParameters.bias);\n }\n if (this.emissiveFresnelParameters && this.emissiveFresnelParameters.isEnabled) {\n ubo.updateColor4(\"emissiveLeftColor\", this.emissiveFresnelParameters.leftColor, this.emissiveFresnelParameters.power);\n ubo.updateColor4(\"emissiveRightColor\", this.emissiveFresnelParameters.rightColor, this.emissiveFresnelParameters.bias);\n }\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {\n ubo.updateFloat2(\"vDiffuseInfos\", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);\n MaterialHelper.BindTextureMatrix(this._diffuseTexture, ubo, \"diffuse\");\n }\n if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {\n ubo.updateFloat2(\"vAmbientInfos\", this._ambientTexture.coordinatesIndex, this._ambientTexture.level);\n MaterialHelper.BindTextureMatrix(this._ambientTexture, ubo, \"ambient\");\n }\n if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {\n ubo.updateFloat2(\"vOpacityInfos\", this._opacityTexture.coordinatesIndex, this._opacityTexture.level);\n MaterialHelper.BindTextureMatrix(this._opacityTexture, ubo, \"opacity\");\n }\n if (this._hasAlphaChannel()) {\n ubo.updateFloat(\"alphaCutOff\", this.alphaCutOff);\n }\n if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {\n ubo.updateFloat2(\"vReflectionInfos\", this._reflectionTexture.level, this.roughness);\n ubo.updateMatrix(\"reflectionMatrix\", this._reflectionTexture.getReflectionTextureMatrix());\n if (this._reflectionTexture.boundingBoxSize) {\n const cubeTexture = this._reflectionTexture;\n ubo.updateVector3(\"vReflectionPosition\", cubeTexture.boundingBoxPosition);\n ubo.updateVector3(\"vReflectionSize\", cubeTexture.boundingBoxSize);\n }\n }\n if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {\n ubo.updateFloat2(\"vEmissiveInfos\", this._emissiveTexture.coordinatesIndex, this._emissiveTexture.level);\n MaterialHelper.BindTextureMatrix(this._emissiveTexture, ubo, \"emissive\");\n }\n if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {\n ubo.updateFloat2(\"vLightmapInfos\", this._lightmapTexture.coordinatesIndex, this._lightmapTexture.level);\n MaterialHelper.BindTextureMatrix(this._lightmapTexture, ubo, \"lightmap\");\n }\n if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {\n ubo.updateFloat2(\"vSpecularInfos\", this._specularTexture.coordinatesIndex, this._specularTexture.level);\n MaterialHelper.BindTextureMatrix(this._specularTexture, ubo, \"specular\");\n }\n if (this._bumpTexture && scene.getEngine().getCaps().standardDerivatives && StandardMaterial.BumpTextureEnabled) {\n ubo.updateFloat3(\"vBumpInfos\", this._bumpTexture.coordinatesIndex, 1.0 / this._bumpTexture.level, this.parallaxScaleBias);\n MaterialHelper.BindTextureMatrix(this._bumpTexture, ubo, \"bump\");\n if (scene._mirroredCameraPosition) {\n ubo.updateFloat2(\"vTangentSpaceParams\", this._invertNormalMapX ? 1.0 : -1.0, this._invertNormalMapY ? 1.0 : -1.0);\n }\n else {\n ubo.updateFloat2(\"vTangentSpaceParams\", this._invertNormalMapX ? -1.0 : 1.0, this._invertNormalMapY ? -1.0 : 1.0);\n }\n }\n if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {\n let depth = 1.0;\n if (!this._refractionTexture.isCube) {\n ubo.updateMatrix(\"refractionMatrix\", this._refractionTexture.getReflectionTextureMatrix());\n if (this._refractionTexture.depth) {\n depth = this._refractionTexture.depth;\n }\n }\n ubo.updateFloat4(\"vRefractionInfos\", this._refractionTexture.level, this.indexOfRefraction, depth, this.invertRefractionY ? -1 : 1);\n if (this._refractionTexture.boundingBoxSize) {\n const cubeTexture = this._refractionTexture;\n ubo.updateVector3(\"vRefractionPosition\", cubeTexture.boundingBoxPosition);\n ubo.updateVector3(\"vRefractionSize\", cubeTexture.boundingBoxSize);\n }\n }\n }\n // Point size\n if (this.pointsCloud) {\n ubo.updateFloat(\"pointSize\", this.pointSize);\n }\n if (defines.SPECULARTERM) {\n ubo.updateColor4(\"vSpecularColor\", this.specularColor, this.specularPower);\n }\n ubo.updateColor3(\"vEmissiveColor\", StandardMaterial.EmissiveTextureEnabled ? this.emissiveColor : Color3.BlackReadOnly);\n ubo.updateColor4(\"vDiffuseColor\", this.diffuseColor, this.alpha);\n scene.ambientColor.multiplyToRef(this.ambientColor, this._globalAmbientColor);\n ubo.updateColor3(\"vAmbientColor\", this._globalAmbientColor);\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {\n effect.setTexture(\"diffuseSampler\", this._diffuseTexture);\n }\n if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {\n effect.setTexture(\"ambientSampler\", this._ambientTexture);\n }\n if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {\n effect.setTexture(\"opacitySampler\", this._opacityTexture);\n }\n if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {\n if (this._reflectionTexture.isCube) {\n effect.setTexture(\"reflectionCubeSampler\", this._reflectionTexture);\n }\n else {\n effect.setTexture(\"reflection2DSampler\", this._reflectionTexture);\n }\n }\n if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {\n effect.setTexture(\"emissiveSampler\", this._emissiveTexture);\n }\n if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {\n effect.setTexture(\"lightmapSampler\", this._lightmapTexture);\n }\n if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {\n effect.setTexture(\"specularSampler\", this._specularTexture);\n }\n if (this._bumpTexture && scene.getEngine().getCaps().standardDerivatives && StandardMaterial.BumpTextureEnabled) {\n effect.setTexture(\"bumpSampler\", this._bumpTexture);\n }\n if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {\n if (this._refractionTexture.isCube) {\n effect.setTexture(\"refractionCubeSampler\", this._refractionTexture);\n }\n else {\n effect.setTexture(\"refraction2DSampler\", this._refractionTexture);\n }\n }\n }\n // OIT with depth peeling\n if (this.getScene().useOrderIndependentTransparency && this.needAlphaBlendingForMesh(mesh)) {\n this.getScene().depthPeelingRenderer.bind(effect);\n }\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventBindForSubMesh(this._eventInfo);\n // Clip plane\n bindClipPlane(effect, this, scene);\n // Colors\n this.bindEyePosition(effect);\n }\n else if (scene.getEngine()._features.needToAlwaysBindUniformBuffers) {\n this._needToBindSceneUbo = true;\n }\n if (mustRebind || !this.isFrozen) {\n // Lights\n if (scene.lightsEnabled && !this._disableLighting) {\n MaterialHelper.BindLights(scene, mesh, effect, defines, this._maxSimultaneousLights);\n }\n // View\n if ((scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) ||\n this._reflectionTexture ||\n this._refractionTexture ||\n mesh.receiveShadows ||\n defines.PREPASS) {\n this.bindView(effect);\n }\n // Fog\n MaterialHelper.BindFogParameters(scene, mesh, effect);\n // Morph targets\n if (defines.NUM_MORPH_INFLUENCERS) {\n MaterialHelper.BindMorphTargetParameters(mesh, effect);\n }\n if (defines.BAKED_VERTEX_ANIMATION_TEXTURE) {\n (_a = mesh.bakedVertexAnimationManager) === null || _a === void 0 ? void 0 : _a.bind(effect, defines.INSTANCES);\n }\n // Log. depth\n if (this.useLogarithmicDepth) {\n MaterialHelper.BindLogDepth(defines, effect, scene);\n }\n // image processing\n if (this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess) {\n this._imageProcessingConfiguration.bind(this._activeEffect);\n }\n }\n this._afterBind(mesh, this._activeEffect);\n ubo.update();\n }\n /**\n * Get the list of animatables in the material.\n * @returns the list of animatables object used in the material\n */\n getAnimatables() {\n const results = super.getAnimatables();\n if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) {\n results.push(this._diffuseTexture);\n }\n if (this._ambientTexture && this._ambientTexture.animations && this._ambientTexture.animations.length > 0) {\n results.push(this._ambientTexture);\n }\n if (this._opacityTexture && this._opacityTexture.animations && this._opacityTexture.animations.length > 0) {\n results.push(this._opacityTexture);\n }\n if (this._reflectionTexture && this._reflectionTexture.animations && this._reflectionTexture.animations.length > 0) {\n results.push(this._reflectionTexture);\n }\n if (this._emissiveTexture && this._emissiveTexture.animations && this._emissiveTexture.animations.length > 0) {\n results.push(this._emissiveTexture);\n }\n if (this._specularTexture && this._specularTexture.animations && this._specularTexture.animations.length > 0) {\n results.push(this._specularTexture);\n }\n if (this._bumpTexture && this._bumpTexture.animations && this._bumpTexture.animations.length > 0) {\n results.push(this._bumpTexture);\n }\n if (this._lightmapTexture && this._lightmapTexture.animations && this._lightmapTexture.animations.length > 0) {\n results.push(this._lightmapTexture);\n }\n if (this._refractionTexture && this._refractionTexture.animations && this._refractionTexture.animations.length > 0) {\n results.push(this._refractionTexture);\n }\n return results;\n }\n /**\n * Gets the active textures from the material\n * @returns an array of textures\n */\n getActiveTextures() {\n const activeTextures = super.getActiveTextures();\n if (this._diffuseTexture) {\n activeTextures.push(this._diffuseTexture);\n }\n if (this._ambientTexture) {\n activeTextures.push(this._ambientTexture);\n }\n if (this._opacityTexture) {\n activeTextures.push(this._opacityTexture);\n }\n if (this._reflectionTexture) {\n activeTextures.push(this._reflectionTexture);\n }\n if (this._emissiveTexture) {\n activeTextures.push(this._emissiveTexture);\n }\n if (this._specularTexture) {\n activeTextures.push(this._specularTexture);\n }\n if (this._bumpTexture) {\n activeTextures.push(this._bumpTexture);\n }\n if (this._lightmapTexture) {\n activeTextures.push(this._lightmapTexture);\n }\n if (this._refractionTexture) {\n activeTextures.push(this._refractionTexture);\n }\n return activeTextures;\n }\n /**\n * Specifies if the material uses a texture\n * @param texture defines the texture to check against the material\n * @returns a boolean specifying if the material uses the texture\n */\n hasTexture(texture) {\n if (super.hasTexture(texture)) {\n return true;\n }\n if (this._diffuseTexture === texture) {\n return true;\n }\n if (this._ambientTexture === texture) {\n return true;\n }\n if (this._opacityTexture === texture) {\n return true;\n }\n if (this._reflectionTexture === texture) {\n return true;\n }\n if (this._emissiveTexture === texture) {\n return true;\n }\n if (this._specularTexture === texture) {\n return true;\n }\n if (this._bumpTexture === texture) {\n return true;\n }\n if (this._lightmapTexture === texture) {\n return true;\n }\n if (this._refractionTexture === texture) {\n return true;\n }\n return false;\n }\n /**\n * Disposes the material\n * @param forceDisposeEffect specifies if effects should be forcefully disposed\n * @param forceDisposeTextures specifies if textures should be forcefully disposed\n */\n dispose(forceDisposeEffect, forceDisposeTextures) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n if (forceDisposeTextures) {\n (_a = this._diffuseTexture) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._ambientTexture) === null || _b === void 0 ? void 0 : _b.dispose();\n (_c = this._opacityTexture) === null || _c === void 0 ? void 0 : _c.dispose();\n (_d = this._reflectionTexture) === null || _d === void 0 ? void 0 : _d.dispose();\n (_e = this._emissiveTexture) === null || _e === void 0 ? void 0 : _e.dispose();\n (_f = this._specularTexture) === null || _f === void 0 ? void 0 : _f.dispose();\n (_g = this._bumpTexture) === null || _g === void 0 ? void 0 : _g.dispose();\n (_h = this._lightmapTexture) === null || _h === void 0 ? void 0 : _h.dispose();\n (_j = this._refractionTexture) === null || _j === void 0 ? void 0 : _j.dispose();\n }\n if (this._imageProcessingConfiguration && this._imageProcessingObserver) {\n this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);\n }\n super.dispose(forceDisposeEffect, forceDisposeTextures);\n }\n /**\n * Makes a duplicate of the material, and gives it a new name\n * @param name defines the new name for the duplicated material\n * @param cloneTexturesOnlyOnce - if a texture is used in more than one channel (e.g diffuse and opacity), only clone it once and reuse it on the other channels. Default false.\n * @param rootUrl defines the root URL to use to load textures\n * @returns the cloned material\n */\n clone(name, cloneTexturesOnlyOnce = true, rootUrl = \"\") {\n const result = SerializationHelper.Clone(() => new StandardMaterial(name, this.getScene()), this, { cloneTexturesOnlyOnce });\n result.name = name;\n result.id = name;\n this.stencil.copyTo(result.stencil);\n this._clonePlugins(result, rootUrl);\n return result;\n }\n /**\n * Creates a standard material from parsed material data\n * @param source defines the JSON representation of the material\n * @param scene defines the hosting scene\n * @param rootUrl defines the root URL to use to load textures and relative dependencies\n * @returns a new standard material\n */\n static Parse(source, scene, rootUrl) {\n const material = SerializationHelper.Parse(() => new StandardMaterial(source.name, scene), source, scene, rootUrl);\n if (source.stencil) {\n material.stencil.parse(source.stencil, scene, rootUrl);\n }\n Material._parsePlugins(source, material, scene, rootUrl);\n return material;\n }\n // Flags used to enable or disable a type of texture for all Standard Materials\n /**\n * Are diffuse textures enabled in the application.\n */\n static get DiffuseTextureEnabled() {\n return MaterialFlags.DiffuseTextureEnabled;\n }\n static set DiffuseTextureEnabled(value) {\n MaterialFlags.DiffuseTextureEnabled = value;\n }\n /**\n * Are detail textures enabled in the application.\n */\n static get DetailTextureEnabled() {\n return MaterialFlags.DetailTextureEnabled;\n }\n static set DetailTextureEnabled(value) {\n MaterialFlags.DetailTextureEnabled = value;\n }\n /**\n * Are ambient textures enabled in the application.\n */\n static get AmbientTextureEnabled() {\n return MaterialFlags.AmbientTextureEnabled;\n }\n static set AmbientTextureEnabled(value) {\n MaterialFlags.AmbientTextureEnabled = value;\n }\n /**\n * Are opacity textures enabled in the application.\n */\n static get OpacityTextureEnabled() {\n return MaterialFlags.OpacityTextureEnabled;\n }\n static set OpacityTextureEnabled(value) {\n MaterialFlags.OpacityTextureEnabled = value;\n }\n /**\n * Are reflection textures enabled in the application.\n */\n static get ReflectionTextureEnabled() {\n return MaterialFlags.ReflectionTextureEnabled;\n }\n static set ReflectionTextureEnabled(value) {\n MaterialFlags.ReflectionTextureEnabled = value;\n }\n /**\n * Are emissive textures enabled in the application.\n */\n static get EmissiveTextureEnabled() {\n return MaterialFlags.EmissiveTextureEnabled;\n }\n static set EmissiveTextureEnabled(value) {\n MaterialFlags.EmissiveTextureEnabled = value;\n }\n /**\n * Are specular textures enabled in the application.\n */\n static get SpecularTextureEnabled() {\n return MaterialFlags.SpecularTextureEnabled;\n }\n static set SpecularTextureEnabled(value) {\n MaterialFlags.SpecularTextureEnabled = value;\n }\n /**\n * Are bump textures enabled in the application.\n */\n static get BumpTextureEnabled() {\n return MaterialFlags.BumpTextureEnabled;\n }\n static set BumpTextureEnabled(value) {\n MaterialFlags.BumpTextureEnabled = value;\n }\n /**\n * Are lightmap textures enabled in the application.\n */\n static get LightmapTextureEnabled() {\n return MaterialFlags.LightmapTextureEnabled;\n }\n static set LightmapTextureEnabled(value) {\n MaterialFlags.LightmapTextureEnabled = value;\n }\n /**\n * Are refraction textures enabled in the application.\n */\n static get RefractionTextureEnabled() {\n return MaterialFlags.RefractionTextureEnabled;\n }\n static set RefractionTextureEnabled(value) {\n MaterialFlags.RefractionTextureEnabled = value;\n }\n /**\n * Are color grading textures enabled in the application.\n */\n static get ColorGradingTextureEnabled() {\n return MaterialFlags.ColorGradingTextureEnabled;\n }\n static set ColorGradingTextureEnabled(value) {\n MaterialFlags.ColorGradingTextureEnabled = value;\n }\n /**\n * Are fresnels enabled in the application.\n */\n static get FresnelEnabled() {\n return MaterialFlags.FresnelEnabled;\n }\n static set FresnelEnabled(value) {\n MaterialFlags.FresnelEnabled = value;\n }\n}\n__decorate([\n serializeAsTexture(\"diffuseTexture\")\n], StandardMaterial.prototype, \"_diffuseTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\n], StandardMaterial.prototype, \"diffuseTexture\", void 0);\n__decorate([\n serializeAsTexture(\"ambientTexture\")\n], StandardMaterial.prototype, \"_ambientTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"ambientTexture\", void 0);\n__decorate([\n serializeAsTexture(\"opacityTexture\")\n], StandardMaterial.prototype, \"_opacityTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\n], StandardMaterial.prototype, \"opacityTexture\", void 0);\n__decorate([\n serializeAsTexture(\"reflectionTexture\")\n], StandardMaterial.prototype, \"_reflectionTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"reflectionTexture\", void 0);\n__decorate([\n serializeAsTexture(\"emissiveTexture\")\n], StandardMaterial.prototype, \"_emissiveTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"emissiveTexture\", void 0);\n__decorate([\n serializeAsTexture(\"specularTexture\")\n], StandardMaterial.prototype, \"_specularTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"specularTexture\", void 0);\n__decorate([\n serializeAsTexture(\"bumpTexture\")\n], StandardMaterial.prototype, \"_bumpTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"bumpTexture\", void 0);\n__decorate([\n serializeAsTexture(\"lightmapTexture\")\n], StandardMaterial.prototype, \"_lightmapTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"lightmapTexture\", void 0);\n__decorate([\n serializeAsTexture(\"refractionTexture\")\n], StandardMaterial.prototype, \"_refractionTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"refractionTexture\", void 0);\n__decorate([\n serializeAsColor3(\"ambient\")\n], StandardMaterial.prototype, \"ambientColor\", void 0);\n__decorate([\n serializeAsColor3(\"diffuse\")\n], StandardMaterial.prototype, \"diffuseColor\", void 0);\n__decorate([\n serializeAsColor3(\"specular\")\n], StandardMaterial.prototype, \"specularColor\", void 0);\n__decorate([\n serializeAsColor3(\"emissive\")\n], StandardMaterial.prototype, \"emissiveColor\", void 0);\n__decorate([\n serialize()\n], StandardMaterial.prototype, \"specularPower\", void 0);\n__decorate([\n serialize(\"useAlphaFromDiffuseTexture\")\n], StandardMaterial.prototype, \"_useAlphaFromDiffuseTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\n], StandardMaterial.prototype, \"useAlphaFromDiffuseTexture\", void 0);\n__decorate([\n serialize(\"useEmissiveAsIllumination\")\n], StandardMaterial.prototype, \"_useEmissiveAsIllumination\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useEmissiveAsIllumination\", void 0);\n__decorate([\n serialize(\"linkEmissiveWithDiffuse\")\n], StandardMaterial.prototype, \"_linkEmissiveWithDiffuse\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"linkEmissiveWithDiffuse\", void 0);\n__decorate([\n serialize(\"useSpecularOverAlpha\")\n], StandardMaterial.prototype, \"_useSpecularOverAlpha\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useSpecularOverAlpha\", void 0);\n__decorate([\n serialize(\"useReflectionOverAlpha\")\n], StandardMaterial.prototype, \"_useReflectionOverAlpha\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useReflectionOverAlpha\", void 0);\n__decorate([\n serialize(\"disableLighting\")\n], StandardMaterial.prototype, \"_disableLighting\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\n], StandardMaterial.prototype, \"disableLighting\", void 0);\n__decorate([\n serialize(\"useObjectSpaceNormalMap\")\n], StandardMaterial.prototype, \"_useObjectSpaceNormalMap\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useObjectSpaceNormalMap\", void 0);\n__decorate([\n serialize(\"useParallax\")\n], StandardMaterial.prototype, \"_useParallax\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useParallax\", void 0);\n__decorate([\n serialize(\"useParallaxOcclusion\")\n], StandardMaterial.prototype, \"_useParallaxOcclusion\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useParallaxOcclusion\", void 0);\n__decorate([\n serialize()\n], StandardMaterial.prototype, \"parallaxScaleBias\", void 0);\n__decorate([\n serialize(\"roughness\")\n], StandardMaterial.prototype, \"_roughness\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"roughness\", void 0);\n__decorate([\n serialize()\n], StandardMaterial.prototype, \"indexOfRefraction\", void 0);\n__decorate([\n serialize()\n], StandardMaterial.prototype, \"invertRefractionY\", void 0);\n__decorate([\n serialize()\n], StandardMaterial.prototype, \"alphaCutOff\", void 0);\n__decorate([\n serialize(\"useLightmapAsShadowmap\")\n], StandardMaterial.prototype, \"_useLightmapAsShadowmap\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useLightmapAsShadowmap\", void 0);\n__decorate([\n serializeAsFresnelParameters(\"diffuseFresnelParameters\")\n], StandardMaterial.prototype, \"_diffuseFresnelParameters\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")\n], StandardMaterial.prototype, \"diffuseFresnelParameters\", void 0);\n__decorate([\n serializeAsFresnelParameters(\"opacityFresnelParameters\")\n], StandardMaterial.prototype, \"_opacityFresnelParameters\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelAndMiscDirty\")\n], StandardMaterial.prototype, \"opacityFresnelParameters\", void 0);\n__decorate([\n serializeAsFresnelParameters(\"reflectionFresnelParameters\")\n], StandardMaterial.prototype, \"_reflectionFresnelParameters\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")\n], StandardMaterial.prototype, \"reflectionFresnelParameters\", void 0);\n__decorate([\n serializeAsFresnelParameters(\"refractionFresnelParameters\")\n], StandardMaterial.prototype, \"_refractionFresnelParameters\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")\n], StandardMaterial.prototype, \"refractionFresnelParameters\", void 0);\n__decorate([\n serializeAsFresnelParameters(\"emissiveFresnelParameters\")\n], StandardMaterial.prototype, \"_emissiveFresnelParameters\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")\n], StandardMaterial.prototype, \"emissiveFresnelParameters\", void 0);\n__decorate([\n serialize(\"useReflectionFresnelFromSpecular\")\n], StandardMaterial.prototype, \"_useReflectionFresnelFromSpecular\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")\n], StandardMaterial.prototype, \"useReflectionFresnelFromSpecular\", void 0);\n__decorate([\n serialize(\"useGlossinessFromSpecularMapAlpha\")\n], StandardMaterial.prototype, \"_useGlossinessFromSpecularMapAlpha\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useGlossinessFromSpecularMapAlpha\", void 0);\n__decorate([\n serialize(\"maxSimultaneousLights\")\n], StandardMaterial.prototype, \"_maxSimultaneousLights\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\n], StandardMaterial.prototype, \"maxSimultaneousLights\", void 0);\n__decorate([\n serialize(\"invertNormalMapX\")\n], StandardMaterial.prototype, \"_invertNormalMapX\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"invertNormalMapX\", void 0);\n__decorate([\n serialize(\"invertNormalMapY\")\n], StandardMaterial.prototype, \"_invertNormalMapY\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"invertNormalMapY\", void 0);\n__decorate([\n serialize(\"twoSidedLighting\")\n], StandardMaterial.prototype, \"_twoSidedLighting\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"twoSidedLighting\", void 0);\n__decorate([\n serialize(\"applyDecalMapAfterDetailMap\")\n], StandardMaterial.prototype, \"_applyDecalMapAfterDetailMap\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\n], StandardMaterial.prototype, \"applyDecalMapAfterDetailMap\", void 0);\n__decorate([\n serialize()\n], StandardMaterial.prototype, \"useLogarithmicDepth\", null);\nRegisterClass(\"BABYLON.StandardMaterial\", StandardMaterial);\nScene.DefaultMaterialFactory = (scene) => {\n return new StandardMaterial(\"default material\", scene);\n};\n//# sourceMappingURL=standardMaterial.js.map","import { SphereBuilder as BABYLON_SphereBuilder } from '@inter-ikea-betrakta-babylonjs/core/Meshes/Builders/sphereBuilder.js';\nimport { StandardMaterial as BABYLON_StandardMaterial } from '@inter-ikea-betrakta-babylonjs/core/Materials/standardMaterial.js';\nimport { Color3 as BABYLON_Color3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js';\nimport { RenderingGroupID } from '../../../Viewer.js';\nexport class LightPositionSphere {\n constructor(light_name, scene) {\n this._sphere_size = 0.05;\n this._sphere_mesh = BABYLON_SphereBuilder.CreateSphere(light_name + ' position', { diameter: this._sphere_size }, scene);\n this._sphere_material = new BABYLON_StandardMaterial('sphere_mat', scene);\n this._sphere_material.disableLighting = true;\n this._sphere_mesh.renderingGroupId = RenderingGroupID.DEFAULT_RENDERING_GROUP;\n this._sphere_mesh.material = this._sphere_material;\n }\n update(position, line_color) {\n this._sphere_mesh.position = position;\n this._sphere_material.diffuseColor = new BABYLON_Color3(line_color.r, line_color.g, line_color.b);\n const sphere_brightness = 1;\n this._sphere_material.emissiveColor = new BABYLON_Color3(line_color.r, line_color.g, line_color.b).scale(sphere_brightness);\n }\n dispose() {\n this._sphere_mesh.dispose(true, true);\n if (this._sphere_light) {\n this._sphere_light.dispose();\n }\n }\n}\n//# sourceMappingURL=PositionSphere.js.map","import { LightVisualizer } from './LightVisualizer.js';\nimport { vector_3 } from '../../../utility/Conversion.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { LightPositionSphere } from './PositionSphere.js';\nimport { IVector3 } from '../../../../api.js';\nexport class PointLightVisualizer extends LightVisualizer {\n constructor(light, line_manager, color_mode, scene) {\n super(light, line_manager, color_mode, scene);\n this._minimum_line_length = 0;\n this._position_sphere = new LightPositionSphere('PointLight', scene);\n this.update();\n }\n update() {\n super.update_visualizer();\n const position = vector_3(this._light.get_world_position());\n this.draw_outer_bounds(position);\n this._position_sphere.update(position, this._line_color);\n }\n dispose(start_index = 0) {\n this._position_sphere.dispose();\n super.dispose(start_index);\n }\n draw_outer_bounds(position) {\n // Used to remove incorrect curve from first draw call, due to too early\n // light.get_world_position call\n this.remove_lines(0);\n const rotation_axes = [BABYLON_Vector3.Up(), BABYLON_Vector3.Right(), BABYLON_Vector3.Backward()];\n let line_index = 0;\n rotation_axes.forEach(axis => {\n const start_point = vector_3(IVector3.perpendicular(axis))\n .scale(this._light_range)\n .add(position);\n line_index += this.draw_curve(line_index, start_point, start_point, axis, position, Math.PI * 2);\n });\n }\n}\n//# sourceMappingURL=PointLightVisualizer.js.map","import { Light } from './Light.js';\nimport { PointLight as BABYLON_PointLight } from '@inter-ikea-betrakta-babylonjs/core/Lights/pointLight.js';\nimport { vector_3 } from '../../../utility/Conversion.js';\nimport { PointLightShadowController } from '../shadows/PointLightShadowController.js';\nimport { PointLightVisualizer } from '../debug_visualizers/PointLightVisualizer.js';\nimport { LightType } from '../../../../api.js';\nconst FOURPI = 12.5663706144;\nexport class PointLight extends Light {\n constructor(viewer, position = { x: 0, y: 0, z: 0 }) {\n super(viewer);\n this.type = LightType.POINT_LIGHT;\n this._expermiental_distance_falloff_enabled = true;\n this._babylon_light = new BABYLON_PointLight(`Light_${this.id} (PointLight)`, vector_3(position), this._viewer.scene);\n this.shadow = new PointLightShadowController(this, this._babylon_light, viewer.light_system);\n this.position = position;\n // Set the falloff type to GLTF, the default does not behave like we want it to.\n this._babylon_light.falloffType = BABYLON_PointLight.FALLOFF_GLTF;\n // This is to make sure Babylon's light's photometric scale is 1.0, i.e. we take all responsibility for setting intensity, and we get the intensity we set.\n this._babylon_light.intensityMode = BABYLON_PointLight.INTENSITYMODE_LUMINOUSINTENSITY;\n }\n set expermiental_distance_falloff_enabled(value) {\n if (this._expermiental_distance_falloff_enabled === value)\n return;\n this._expermiental_distance_falloff_enabled = value;\n // Note that we changed the lightFragment shader so FALLOFF_STANDARD does not take distance in consideration.\n this._babylon_light.falloffType = value ? BABYLON_PointLight.FALLOFF_GLTF : BABYLON_PointLight.FALLOFF_STANDARD;\n this._babylon_light._markMeshesAsLightDirty();\n this._viewer.mark_scene_dirty();\n }\n update() {\n this.update_color_and_intensity();\n this.update_parent_material();\n if (this._parent) {\n const parent_updated = this.is_dirty(Light.DIRTY_PARENT_ADDED |\n Light.DIRTY_PARENT_TRANSFORM |\n Light.DIRTY_POSITION);\n if (parent_updated) {\n this._babylon_light.position = vector_3(this.get_world_position());\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n }\n else {\n if (this.is_dirty(Light.DIRTY_POSITION)) {\n this._babylon_light.position.set(this.position.x, this.position.y, this.position.z);\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n }\n }\n set_intensity_lumen(lumen) {\n // We assume that the default light type is omnidirectional,\n // meaning it emits its lumen across the entire unit sphere\n // which has an area of 4*pi. So to convert lumen to candela,\n // we divide by 4*pi.\n this.intensity = lumen / FOURPI;\n }\n set_intensity_candela(cd) {\n this.intensity = cd;\n }\n create_debug_geometry() {\n const { line_manager, light_system, scene } = this._viewer;\n this._debug_geometry = new PointLightVisualizer(this, line_manager, light_system.debug_color_mode, scene);\n }\n}\n//# sourceMappingURL=PointLight.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serialize } from \"../Misc/decorators.js\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector.js\";\nimport { Node } from \"../node.js\";\nimport { Light } from \"./light.js\";\nimport { ShadowLight } from \"./shadowLight.js\";\nNode.AddNodeConstructor(\"Light_Type_1\", (name, scene) => {\n return () => new DirectionalLight(name, Vector3.Zero(), scene);\n});\n/**\n * A directional light is defined by a direction (what a surprise!).\n * The light is emitted from everywhere in the specified direction, and has an infinite range.\n * An example of a directional light is when a distance planet is lit by the apparently parallel lines of light from its sun. Light in a downward direction will light the top of an object.\n * Documentation: https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n */\nexport class DirectionalLight extends ShadowLight {\n /**\n * Fix frustum size for the shadow generation. This is disabled if the value is 0.\n */\n get shadowFrustumSize() {\n return this._shadowFrustumSize;\n }\n /**\n * Specifies a fix frustum size for the shadow generation.\n */\n set shadowFrustumSize(value) {\n this._shadowFrustumSize = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Gets the shadow projection scale against the optimal computed one.\n * 0.1 by default which means that the projection window is increase by 10% from the optimal size.\n * This does not impact in fixed frustum size (shadowFrustumSize being set)\n */\n get shadowOrthoScale() {\n return this._shadowOrthoScale;\n }\n /**\n * Sets the shadow projection scale against the optimal computed one.\n * 0.1 by default which means that the projection window is increase by 10% from the optimal size.\n * This does not impact in fixed frustum size (shadowFrustumSize being set)\n */\n set shadowOrthoScale(value) {\n this._shadowOrthoScale = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Gets or sets the orthoLeft property used to build the light frustum\n */\n get orthoLeft() {\n return this._orthoLeft;\n }\n set orthoLeft(left) {\n this._orthoLeft = left;\n }\n /**\n * Gets or sets the orthoRight property used to build the light frustum\n */\n get orthoRight() {\n return this._orthoRight;\n }\n set orthoRight(right) {\n this._orthoRight = right;\n }\n /**\n * Gets or sets the orthoTop property used to build the light frustum\n */\n get orthoTop() {\n return this._orthoTop;\n }\n set orthoTop(top) {\n this._orthoTop = top;\n }\n /**\n * Gets or sets the orthoBottom property used to build the light frustum\n */\n get orthoBottom() {\n return this._orthoBottom;\n }\n set orthoBottom(bottom) {\n this._orthoBottom = bottom;\n }\n /**\n * Creates a DirectionalLight object in the scene, oriented towards the passed direction (Vector3).\n * The directional light is emitted from everywhere in the given direction.\n * It can cast shadows.\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n * @param name The friendly name of the light\n * @param direction The direction of the light\n * @param scene The scene the light belongs to\n */\n constructor(name, direction, scene) {\n super(name, scene);\n this._shadowFrustumSize = 0;\n this._shadowOrthoScale = 0.1;\n /**\n * Automatically compute the projection matrix to best fit (including all the casters)\n * on each frame.\n */\n this.autoUpdateExtends = true;\n /**\n * Automatically compute the shadowMinZ and shadowMaxZ for the projection matrix to best fit (including all the casters)\n * on each frame. autoUpdateExtends must be set to true for this to work\n */\n this.autoCalcShadowZBounds = false;\n // Cache\n this._orthoLeft = Number.MAX_VALUE;\n this._orthoRight = Number.MIN_VALUE;\n this._orthoTop = Number.MIN_VALUE;\n this._orthoBottom = Number.MAX_VALUE;\n this.position = direction.scale(-1.0);\n this.direction = direction;\n }\n /**\n * Returns the string \"DirectionalLight\".\n * @returns The class name\n */\n getClassName() {\n return \"DirectionalLight\";\n }\n /**\n * Returns the integer 1.\n * @returns The light Type id as a constant defines in Light.LIGHTTYPEID_x\n */\n getTypeID() {\n return Light.LIGHTTYPEID_DIRECTIONALLIGHT;\n }\n /**\n * Sets the passed matrix \"matrix\" as projection matrix for the shadows cast by the light according to the passed view matrix.\n * Returns the DirectionalLight Shadow projection matrix.\n * @param matrix\n * @param viewMatrix\n * @param renderList\n */\n _setDefaultShadowProjectionMatrix(matrix, viewMatrix, renderList) {\n if (this.shadowFrustumSize > 0) {\n this._setDefaultFixedFrustumShadowProjectionMatrix(matrix);\n }\n else {\n this._setDefaultAutoExtendShadowProjectionMatrix(matrix, viewMatrix, renderList);\n }\n }\n /**\n * Sets the passed matrix \"matrix\" as fixed frustum projection matrix for the shadows cast by the light according to the passed view matrix.\n * Returns the DirectionalLight Shadow projection matrix.\n * @param matrix\n */\n _setDefaultFixedFrustumShadowProjectionMatrix(matrix) {\n const activeCamera = this.getScene().activeCamera;\n if (!activeCamera) {\n return;\n }\n Matrix.OrthoLHToRef(this.shadowFrustumSize, this.shadowFrustumSize, this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ, this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ, matrix, this.getScene().getEngine().isNDCHalfZRange);\n }\n /**\n * Sets the passed matrix \"matrix\" as auto extend projection matrix for the shadows cast by the light according to the passed view matrix.\n * Returns the DirectionalLight Shadow projection matrix.\n * @param matrix\n * @param viewMatrix\n * @param renderList\n */\n _setDefaultAutoExtendShadowProjectionMatrix(matrix, viewMatrix, renderList) {\n const activeCamera = this.getScene().activeCamera;\n if (!activeCamera) {\n return;\n }\n // Check extends\n if (this.autoUpdateExtends || this._orthoLeft === Number.MAX_VALUE) {\n const tempVector3 = Vector3.Zero();\n this._orthoLeft = Number.MAX_VALUE;\n this._orthoRight = -Number.MAX_VALUE;\n this._orthoTop = -Number.MAX_VALUE;\n this._orthoBottom = Number.MAX_VALUE;\n let shadowMinZ = Number.MAX_VALUE;\n let shadowMaxZ = -Number.MAX_VALUE;\n for (let meshIndex = 0; meshIndex < renderList.length; meshIndex++) {\n const mesh = renderList[meshIndex];\n if (!mesh) {\n continue;\n }\n const boundingInfo = mesh.getBoundingInfo();\n const boundingBox = boundingInfo.boundingBox;\n for (let index = 0; index < boundingBox.vectorsWorld.length; index++) {\n Vector3.TransformCoordinatesToRef(boundingBox.vectorsWorld[index], viewMatrix, tempVector3);\n if (tempVector3.x < this._orthoLeft) {\n this._orthoLeft = tempVector3.x;\n }\n if (tempVector3.y < this._orthoBottom) {\n this._orthoBottom = tempVector3.y;\n }\n if (tempVector3.x > this._orthoRight) {\n this._orthoRight = tempVector3.x;\n }\n if (tempVector3.y > this._orthoTop) {\n this._orthoTop = tempVector3.y;\n }\n if (this.autoCalcShadowZBounds) {\n if (tempVector3.z < shadowMinZ) {\n shadowMinZ = tempVector3.z;\n }\n if (tempVector3.z > shadowMaxZ) {\n shadowMaxZ = tempVector3.z;\n }\n }\n }\n }\n if (this.autoCalcShadowZBounds) {\n this._shadowMinZ = shadowMinZ;\n this._shadowMaxZ = shadowMaxZ;\n }\n }\n const xOffset = this._orthoRight - this._orthoLeft;\n const yOffset = this._orthoTop - this._orthoBottom;\n const minZ = this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ;\n const maxZ = this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ;\n const useReverseDepthBuffer = this.getScene().getEngine().useReverseDepthBuffer;\n Matrix.OrthoOffCenterLHToRef(this._orthoLeft - xOffset * this.shadowOrthoScale, this._orthoRight + xOffset * this.shadowOrthoScale, this._orthoBottom - yOffset * this.shadowOrthoScale, this._orthoTop + yOffset * this.shadowOrthoScale, useReverseDepthBuffer ? maxZ : minZ, useReverseDepthBuffer ? minZ : maxZ, matrix, this.getScene().getEngine().isNDCHalfZRange);\n }\n _buildUniformLayout() {\n this._uniformBuffer.addUniform(\"vLightData\", 4);\n this._uniformBuffer.addUniform(\"vLightDiffuse\", 4);\n this._uniformBuffer.addUniform(\"vLightSpecular\", 4);\n this._uniformBuffer.addUniform(\"shadowsInfo\", 3);\n this._uniformBuffer.addUniform(\"depthValues\", 2);\n this._uniformBuffer.create();\n }\n /**\n * Sets the passed Effect object with the DirectionalLight transformed position (or position if not parented) and the passed name.\n * @param effect The effect to update\n * @param lightIndex The index of the light in the effect to update\n * @returns The directional light\n */\n transferToEffect(effect, lightIndex) {\n if (this.computeTransformedInformation()) {\n this._uniformBuffer.updateFloat4(\"vLightData\", this.transformedDirection.x, this.transformedDirection.y, this.transformedDirection.z, 1, lightIndex);\n return this;\n }\n this._uniformBuffer.updateFloat4(\"vLightData\", this.direction.x, this.direction.y, this.direction.z, 1, lightIndex);\n return this;\n }\n transferToNodeMaterialEffect(effect, lightDataUniformName) {\n if (this.computeTransformedInformation()) {\n effect.setFloat3(lightDataUniformName, this.transformedDirection.x, this.transformedDirection.y, this.transformedDirection.z);\n return this;\n }\n effect.setFloat3(lightDataUniformName, this.direction.x, this.direction.y, this.direction.z);\n return this;\n }\n /**\n * Gets the minZ used for shadow according to both the scene and the light.\n *\n * Values are fixed on directional lights as it relies on an ortho projection hence the need to convert being\n * -1 and 1 to 0 and 1 doing (depth + min) / (min + max) -> (depth + 1) / (1 + 1) -> (depth * 0.5) + 0.5.\n * (when not using reverse depth buffer / NDC half Z range)\n * @param activeCamera The camera we are returning the min for\n * @returns the depth min z\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getDepthMinZ(activeCamera) {\n const engine = this._scene.getEngine();\n return !engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : 1;\n }\n /**\n * Gets the maxZ used for shadow according to both the scene and the light.\n *\n * Values are fixed on directional lights as it relies on an ortho projection hence the need to convert being\n * -1 and 1 to 0 and 1 doing (depth + min) / (min + max) -> (depth + 1) / (1 + 1) -> (depth * 0.5) + 0.5.\n * (when not using reverse depth buffer / NDC half Z range)\n * @param activeCamera The camera we are returning the max for\n * @returns the depth max z\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getDepthMaxZ(activeCamera) {\n const engine = this._scene.getEngine();\n return engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : 1;\n }\n /**\n * Prepares the list of defines specific to the light type.\n * @param defines the list of defines\n * @param lightIndex defines the index of the light for the effect\n */\n prepareLightSpecificDefines(defines, lightIndex) {\n defines[\"DIRLIGHT\" + lightIndex] = true;\n }\n}\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"shadowFrustumSize\", null);\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"shadowOrthoScale\", null);\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"autoUpdateExtends\", void 0);\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"autoCalcShadowZBounds\", void 0);\n__decorate([\n serialize(\"orthoLeft\")\n], DirectionalLight.prototype, \"_orthoLeft\", void 0);\n__decorate([\n serialize(\"orthoRight\")\n], DirectionalLight.prototype, \"_orthoRight\", void 0);\n__decorate([\n serialize(\"orthoTop\")\n], DirectionalLight.prototype, \"_orthoTop\", void 0);\n__decorate([\n serialize(\"orthoBottom\")\n], DirectionalLight.prototype, \"_orthoBottom\", void 0);\n//# sourceMappingURL=directionalLight.js.map","import { ShadowController, SHADOW_DEFAULTS } from './ShadowController.js';\nimport { IVector3 } from '../../../../api.js';\nexport class DirectionalLightShadowController extends ShadowController {\n constructor(_light, _babylon_light, _light_system) {\n const shadow_values = SHADOW_DEFAULTS.DIRECTIONAL_LIGHT;\n super(_light, _babylon_light, _light_system, shadow_values.resolution, shadow_values.near, shadow_values.far, _babylon_light.getEngine().webGLVersion === 1 ? shadow_values.webgl1_bias : shadow_values.webgl2_bias);\n }\n should_update_shadowmap(meshes_modifications) {\n // TODO rework to `some`? compare performance\n for (const mod of meshes_modifications) {\n // Checks if the moved object was or is in the bounds of the shadow.\n const light_affects_old_bounds = this.sphere_inside_dirlight_shadow(mod.old_bounds, this._light);\n const light_affects_new_bounds = this.sphere_inside_dirlight_shadow(mod.new_bounds, this._light);\n if (light_affects_old_bounds || light_affects_new_bounds) {\n return true;\n }\n }\n return false;\n }\n sphere_inside_dirlight_shadow(sphere, light) {\n // Right now the directional light frustum is automatically adjusted to contain all shadowcasters\n // which makes this check kind of useless. But we can still avoid drawing the shadowmap when\n // we move stuff outside the near and far plane.\n const offset = IVector3.subtract(sphere.position, light.position);\n const z = IVector3.dot(offset, light.get_direction());\n return (z - sphere.radius) < this.shadow_far && (z + sphere.radius) > this.shadow_near;\n }\n}\n//# sourceMappingURL=DirectionalLightShadowController.js.map","import { vector_3 } from '../../../utility/Conversion.js';\nimport { LightVisualizer } from './LightVisualizer.js';\nimport { LightPositionSphere } from './PositionSphere.js';\nexport class DirectionalLightVisualizer extends LightVisualizer {\n constructor(light, line_manager, color_mode, scene) {\n super(light, line_manager, color_mode, scene);\n this._max_length = 1.5;\n this._tube_radius = 0.15;\n this._num_lines = 8;\n this._minimum_line_length = 0;\n this._position_sphere = new LightPositionSphere('DirectionalLight', scene);\n this.update();\n }\n update() {\n super.update_visualizer();\n const position = vector_3(this._light.get_world_position());\n this._position_sphere.update(position, this._line_color);\n const direction = vector_3(this._light.get_direction());\n this.draw_directional_lines(this.get_line_length(), this._tube_radius, 'tube', this._num_lines, direction, position);\n }\n get_line_length() {\n // Cap line length to between 0 and max_length, with intensity 1 yielding length 1\n // Perhaps a more elegant way to do this exists\n const length = this._max_length * Math.log(this._light.intensity) / (Math.E * Math.E) + 1;\n return Math.max(0, length);\n }\n dispose(start_index = 0) {\n this._position_sphere.dispose();\n super.dispose(start_index);\n }\n}\n//# sourceMappingURL=DirectionalLightVisualizer.js.map","import { Light } from './Light.js';\nimport { DirectionalLight as BABYLON_DirectionalLight } from '@inter-ikea-betrakta-babylonjs/core/Lights/directionalLight.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { TrackedVec3 } from '../../../../Math.js';\nimport { IVector3, LightType } from '../../../../api.js';\nimport { DirectionalLightShadowController } from '../shadows/DirectionalLightShadowController.js';\nimport { DirectionalLightVisualizer } from '../debug_visualizers/DirectionalLightVisualizer.js';\nexport class DirectionalLight extends Light {\n constructor(viewer, position = { x: 0, y: 0, z: 0 }, target = { x: 0, y: 0, z: 0 }) {\n super(viewer);\n this._target = new TrackedVec3();\n this.type = LightType.DIRECTIONAL_LIGHT;\n const { x, y, z } = this.get_direction(position, target);\n this._babylon_light = new BABYLON_DirectionalLight(`Light_${this.id} (DirectionalLight)`, new BABYLON_Vector3(-x, -y, -z), this._viewer.scene);\n this.shadow = new DirectionalLightShadowController(this, this._babylon_light, this._light_system);\n this._target.onchange = () => this.mark_dirty(DirectionalLight.DIRTY_TARGET);\n this.position = position;\n this._target.set(target.x, target.y, target.z);\n }\n get target() {\n return this._target;\n }\n set target(value) {\n this._target.set(value.x, value.y, value.z);\n }\n get_direction(position = this.position, target = this._target) {\n return IVector3.normalize(IVector3.subtract(target, position));\n }\n update() {\n this.update_color_and_intensity();\n if (this.is_dirty(Light.DIRTY_POSITION)) {\n this._babylon_light.position.set(this.position.x, this.position.y, this.position.z);\n this.mark_dirty(DirectionalLight.DIRTY_TARGET);\n }\n if (this.is_dirty(DirectionalLight.DIRTY_TARGET)) {\n const { x, y, z } = this.get_direction();\n this._babylon_light.direction.set(x, y, z);\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n }\n set_intensity_lux(lux) {\n this._babylon_light.intensityMode = BABYLON_DirectionalLight.INTENSITYMODE_ILLUMINANCE;\n this.intensity = lux;\n }\n set parent(_) {\n console.warn(`Not able to set parent for light ${this._babylon_light.name}. DirectionalLights do not support parenting`);\n }\n create_debug_geometry() {\n const { line_manager, light_system, scene } = this._viewer;\n this._debug_geometry = new DirectionalLightVisualizer(this, line_manager, light_system.debug_color_mode, scene);\n }\n}\nDirectionalLight.DIRTY_TARGET = 16777216;\n//# sourceMappingURL=DirectionalLight.js.map","import { __decorate } from \"../tslib.es6.js\";\nimport { serialize, serializeAsTexture } from \"../Misc/decorators.js\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector.js\";\nimport { Node } from \"../node.js\";\nimport { Light } from \"./light.js\";\nimport { ShadowLight } from \"./shadowLight.js\";\nimport { Texture } from \"../Materials/Textures/texture.js\";\nNode.AddNodeConstructor(\"Light_Type_2\", (name, scene) => {\n return () => new SpotLight(name, Vector3.Zero(), Vector3.Zero(), 0, 0, scene);\n});\n/**\n * A spot light is defined by a position, a direction, an angle, and an exponent.\n * These values define a cone of light starting from the position, emitting toward the direction.\n * The angle, in radians, defines the size (field of illumination) of the spotlight's conical beam,\n * and the exponent defines the speed of the decay of the light with distance (reach).\n * Documentation: https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n */\nexport class SpotLight extends ShadowLight {\n /**\n * Gets the cone angle of the spot light in Radians.\n */\n get angle() {\n return this._angle;\n }\n /**\n * Sets the cone angle of the spot light in Radians.\n */\n set angle(value) {\n this._angle = value;\n this._cosHalfAngle = Math.cos(value * 0.5);\n this._projectionTextureProjectionLightDirty = true;\n this.forceProjectionMatrixCompute();\n this._computeAngleValues();\n }\n /**\n * Only used in gltf falloff mode, this defines the angle where\n * the directional falloff will start before cutting at angle which could be seen\n * as outer angle.\n */\n get innerAngle() {\n return this._innerAngle;\n }\n /**\n * Only used in gltf falloff mode, this defines the angle where\n * the directional falloff will start before cutting at angle which could be seen\n * as outer angle.\n */\n set innerAngle(value) {\n this._innerAngle = value;\n this._computeAngleValues();\n }\n /**\n * Allows scaling the angle of the light for shadow generation only.\n */\n get shadowAngleScale() {\n return this._shadowAngleScale;\n }\n /**\n * Allows scaling the angle of the light for shadow generation only.\n */\n set shadowAngleScale(value) {\n this._shadowAngleScale = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Allows reading the projection texture\n */\n get projectionTextureMatrix() {\n return this._projectionTextureMatrix;\n }\n /**\n * Gets the near clip of the Spotlight for texture projection.\n */\n get projectionTextureLightNear() {\n return this._projectionTextureLightNear;\n }\n /**\n * Sets the near clip of the Spotlight for texture projection.\n */\n set projectionTextureLightNear(value) {\n this._projectionTextureLightNear = value;\n this._projectionTextureProjectionLightDirty = true;\n }\n /**\n * Gets the far clip of the Spotlight for texture projection.\n */\n get projectionTextureLightFar() {\n return this._projectionTextureLightFar;\n }\n /**\n * Sets the far clip of the Spotlight for texture projection.\n */\n set projectionTextureLightFar(value) {\n this._projectionTextureLightFar = value;\n this._projectionTextureProjectionLightDirty = true;\n }\n /**\n * Gets the Up vector of the Spotlight for texture projection.\n */\n get projectionTextureUpDirection() {\n return this._projectionTextureUpDirection;\n }\n /**\n * Sets the Up vector of the Spotlight for texture projection.\n */\n set projectionTextureUpDirection(value) {\n this._projectionTextureUpDirection = value;\n this._projectionTextureProjectionLightDirty = true;\n }\n /**\n * Gets the projection texture of the light.\n */\n get projectionTexture() {\n return this._projectionTexture;\n }\n /**\n * Sets the projection texture of the light.\n */\n set projectionTexture(value) {\n if (this._projectionTexture === value) {\n return;\n }\n this._projectionTexture = value;\n this._projectionTextureDirty = true;\n if (this._projectionTexture && !this._projectionTexture.isReady()) {\n if (SpotLight._IsProceduralTexture(this._projectionTexture)) {\n this._projectionTexture.getEffect().executeWhenCompiled(() => {\n this._markMeshesAsLightDirty();\n });\n }\n else if (SpotLight._IsTexture(this._projectionTexture)) {\n this._projectionTexture.onLoadObservable.addOnce(() => {\n this._markMeshesAsLightDirty();\n });\n }\n }\n }\n static _IsProceduralTexture(texture) {\n return texture.onGeneratedObservable !== undefined;\n }\n static _IsTexture(texture) {\n return texture.onLoadObservable !== undefined;\n }\n /**\n * Gets or sets the light projection matrix as used by the projection texture\n */\n get projectionTextureProjectionLightMatrix() {\n return this._projectionTextureProjectionLightMatrix;\n }\n set projectionTextureProjectionLightMatrix(projection) {\n this._projectionTextureProjectionLightMatrix = projection;\n this._projectionTextureProjectionLightDirty = false;\n this._projectionTextureDirty = true;\n }\n /**\n * Creates a SpotLight object in the scene. A spot light is a simply light oriented cone.\n * It can cast shadows.\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n * @param name The light friendly name\n * @param position The position of the spot light in the scene\n * @param direction The direction of the light in the scene\n * @param angle The cone angle of the light in Radians\n * @param exponent The light decay speed with the distance from the emission spot\n * @param scene The scene the lights belongs to\n */\n constructor(name, position, direction, angle, exponent, scene) {\n super(name, scene);\n this._innerAngle = 0;\n this._projectionTextureMatrix = Matrix.Zero();\n this._projectionTextureLightNear = 1e-6;\n this._projectionTextureLightFar = 1000.0;\n this._projectionTextureUpDirection = Vector3.Up();\n this._projectionTextureViewLightDirty = true;\n this._projectionTextureProjectionLightDirty = true;\n this._projectionTextureDirty = true;\n this._projectionTextureViewTargetVector = Vector3.Zero();\n this._projectionTextureViewLightMatrix = Matrix.Zero();\n this._projectionTextureProjectionLightMatrix = Matrix.Zero();\n this._projectionTextureScalingMatrix = Matrix.FromValues(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);\n this.position = position;\n this.direction = direction;\n this.angle = angle;\n this.exponent = exponent;\n }\n /**\n * Returns the string \"SpotLight\".\n * @returns the class name\n */\n getClassName() {\n return \"SpotLight\";\n }\n /**\n * Returns the integer 2.\n * @returns The light Type id as a constant defines in Light.LIGHTTYPEID_x\n */\n getTypeID() {\n return Light.LIGHTTYPEID_SPOTLIGHT;\n }\n /**\n * Overrides the direction setter to recompute the projection texture view light Matrix.\n * @param value\n */\n _setDirection(value) {\n super._setDirection(value);\n this._projectionTextureViewLightDirty = true;\n }\n /**\n * Overrides the position setter to recompute the projection texture view light Matrix.\n * @param value\n */\n _setPosition(value) {\n super._setPosition(value);\n this._projectionTextureViewLightDirty = true;\n }\n /**\n * Sets the passed matrix \"matrix\" as perspective projection matrix for the shadows and the passed view matrix with the fov equal to the SpotLight angle and and aspect ratio of 1.0.\n * Returns the SpotLight.\n * @param matrix\n * @param viewMatrix\n * @param renderList\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _setDefaultShadowProjectionMatrix(matrix, viewMatrix, renderList) {\n const activeCamera = this.getScene().activeCamera;\n if (!activeCamera) {\n return;\n }\n this._shadowAngleScale = this._shadowAngleScale || 1;\n const angle = this._shadowAngleScale * this._angle;\n const minZ = this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ;\n const maxZ = this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ;\n const useReverseDepthBuffer = this.getScene().getEngine().useReverseDepthBuffer;\n Matrix.PerspectiveFovLHToRef(angle, 1.0, useReverseDepthBuffer ? maxZ : minZ, useReverseDepthBuffer ? minZ : maxZ, matrix, true, this._scene.getEngine().isNDCHalfZRange, undefined, useReverseDepthBuffer);\n }\n _computeProjectionTextureViewLightMatrix() {\n this._projectionTextureViewLightDirty = false;\n this._projectionTextureDirty = true;\n this.getAbsolutePosition().addToRef(this.direction, this._projectionTextureViewTargetVector);\n Matrix.LookAtLHToRef(this.getAbsolutePosition(), this._projectionTextureViewTargetVector, this._projectionTextureUpDirection, this._projectionTextureViewLightMatrix);\n }\n _computeProjectionTextureProjectionLightMatrix() {\n this._projectionTextureProjectionLightDirty = false;\n this._projectionTextureDirty = true;\n const lightFar = this.projectionTextureLightFar;\n const lightNear = this.projectionTextureLightNear;\n const P = lightFar / (lightFar - lightNear);\n const Q = -P * lightNear;\n const S = 1.0 / Math.tan(this._angle / 2.0);\n const A = 1.0;\n Matrix.FromValuesToRef(S / A, 0.0, 0.0, 0.0, 0.0, S, 0.0, 0.0, 0.0, 0.0, P, 1.0, 0.0, 0.0, Q, 0.0, this._projectionTextureProjectionLightMatrix);\n }\n /**\n * Main function for light texture projection matrix computing.\n */\n _computeProjectionTextureMatrix() {\n this._projectionTextureDirty = false;\n this._projectionTextureViewLightMatrix.multiplyToRef(this._projectionTextureProjectionLightMatrix, this._projectionTextureMatrix);\n if (this._projectionTexture instanceof Texture) {\n const u = this._projectionTexture.uScale / 2.0;\n const v = this._projectionTexture.vScale / 2.0;\n Matrix.FromValuesToRef(u, 0.0, 0.0, 0.0, 0.0, v, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0, this._projectionTextureScalingMatrix);\n }\n this._projectionTextureMatrix.multiplyToRef(this._projectionTextureScalingMatrix, this._projectionTextureMatrix);\n }\n _buildUniformLayout() {\n this._uniformBuffer.addUniform(\"vLightData\", 4);\n this._uniformBuffer.addUniform(\"vLightDiffuse\", 4);\n this._uniformBuffer.addUniform(\"vLightSpecular\", 4);\n this._uniformBuffer.addUniform(\"vLightDirection\", 3);\n this._uniformBuffer.addUniform(\"vLightFalloff\", 4);\n this._uniformBuffer.addUniform(\"shadowsInfo\", 3);\n this._uniformBuffer.addUniform(\"depthValues\", 2);\n this._uniformBuffer.create();\n }\n _computeAngleValues() {\n this._lightAngleScale = 1.0 / Math.max(0.001, Math.cos(this._innerAngle * 0.5) - this._cosHalfAngle);\n this._lightAngleOffset = -this._cosHalfAngle * this._lightAngleScale;\n }\n /**\n * Sets the passed Effect \"effect\" with the Light textures.\n * @param effect The effect to update\n * @param lightIndex The index of the light in the effect to update\n * @returns The light\n */\n transferTexturesToEffect(effect, lightIndex) {\n if (this.projectionTexture && this.projectionTexture.isReady()) {\n if (this._projectionTextureViewLightDirty) {\n this._computeProjectionTextureViewLightMatrix();\n }\n if (this._projectionTextureProjectionLightDirty) {\n this._computeProjectionTextureProjectionLightMatrix();\n }\n if (this._projectionTextureDirty) {\n this._computeProjectionTextureMatrix();\n }\n effect.setMatrix(\"textureProjectionMatrix\" + lightIndex, this._projectionTextureMatrix);\n effect.setTexture(\"projectionLightSampler\" + lightIndex, this.projectionTexture);\n }\n return this;\n }\n /**\n * Sets the passed Effect object with the SpotLight transformed position (or position if not parented) and normalized direction.\n * @param effect The effect to update\n * @param lightIndex The index of the light in the effect to update\n * @returns The spot light\n */\n transferToEffect(effect, lightIndex) {\n let normalizeDirection;\n if (this.computeTransformedInformation()) {\n this._uniformBuffer.updateFloat4(\"vLightData\", this.transformedPosition.x, this.transformedPosition.y, this.transformedPosition.z, this.exponent, lightIndex);\n normalizeDirection = Vector3.Normalize(this.transformedDirection);\n }\n else {\n this._uniformBuffer.updateFloat4(\"vLightData\", this.position.x, this.position.y, this.position.z, this.exponent, lightIndex);\n normalizeDirection = Vector3.Normalize(this.direction);\n }\n this._uniformBuffer.updateFloat4(\"vLightDirection\", normalizeDirection.x, normalizeDirection.y, normalizeDirection.z, this._cosHalfAngle, lightIndex);\n this._uniformBuffer.updateFloat4(\"vLightFalloff\", this.range, this._inverseSquaredRange, this._lightAngleScale, this._lightAngleOffset, lightIndex);\n return this;\n }\n transferToNodeMaterialEffect(effect, lightDataUniformName) {\n let normalizeDirection;\n if (this.computeTransformedInformation()) {\n normalizeDirection = Vector3.Normalize(this.transformedDirection);\n }\n else {\n normalizeDirection = Vector3.Normalize(this.direction);\n }\n if (this.getScene().useRightHandedSystem) {\n effect.setFloat3(lightDataUniformName, -normalizeDirection.x, -normalizeDirection.y, -normalizeDirection.z);\n }\n else {\n effect.setFloat3(lightDataUniformName, normalizeDirection.x, normalizeDirection.y, normalizeDirection.z);\n }\n return this;\n }\n /**\n * Disposes the light and the associated resources.\n */\n dispose() {\n super.dispose();\n if (this._projectionTexture) {\n this._projectionTexture.dispose();\n }\n }\n /**\n * Gets the minZ used for shadow according to both the scene and the light.\n * @param activeCamera The camera we are returning the min for\n * @returns the depth min z\n */\n getDepthMinZ(activeCamera) {\n const engine = this._scene.getEngine();\n const minZ = this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ;\n return engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? minZ : this._scene.getEngine().isNDCHalfZRange ? 0 : minZ;\n }\n /**\n * Gets the maxZ used for shadow according to both the scene and the light.\n * @param activeCamera The camera we are returning the max for\n * @returns the depth max z\n */\n getDepthMaxZ(activeCamera) {\n const engine = this._scene.getEngine();\n const maxZ = this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ;\n return engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : maxZ;\n }\n /**\n * Prepares the list of defines specific to the light type.\n * @param defines the list of defines\n * @param lightIndex defines the index of the light for the effect\n */\n prepareLightSpecificDefines(defines, lightIndex) {\n defines[\"SPOTLIGHT\" + lightIndex] = true;\n defines[\"PROJECTEDLIGHTTEXTURE\" + lightIndex] = this.projectionTexture && this.projectionTexture.isReady() ? true : false;\n }\n}\n__decorate([\n serialize()\n], SpotLight.prototype, \"angle\", null);\n__decorate([\n serialize()\n], SpotLight.prototype, \"innerAngle\", null);\n__decorate([\n serialize()\n], SpotLight.prototype, \"shadowAngleScale\", null);\n__decorate([\n serialize()\n], SpotLight.prototype, \"exponent\", void 0);\n__decorate([\n serialize()\n], SpotLight.prototype, \"projectionTextureLightNear\", null);\n__decorate([\n serialize()\n], SpotLight.prototype, \"projectionTextureLightFar\", null);\n__decorate([\n serialize()\n], SpotLight.prototype, \"projectionTextureUpDirection\", null);\n__decorate([\n serializeAsTexture(\"projectedLightTexture\")\n], SpotLight.prototype, \"_projectionTexture\", void 0);\n//# sourceMappingURL=spotLight.js.map","import { degrees, radians } from '../../../../Math.js';\nimport { ShadowController, SHADOW_DEFAULTS } from './ShadowController.js';\nimport { IVector3 } from '../../../../api.js';\nexport class SpotLightShadowController extends ShadowController {\n constructor(_light, _babylon_light, _light_system) {\n const shadow_values = SHADOW_DEFAULTS.SPOT_LIGHT;\n super(_light, _babylon_light, _light_system, shadow_values.resolution, shadow_values.near, shadow_values.far, _babylon_light.getEngine().webGLVersion === 1 ? shadow_values.webgl1_bias : shadow_values.webgl2_bias);\n }\n // We override the function for enabling the shadows to be able to verify that our given cone angle is valid.\n set enable_shadows(value) {\n super.enable_shadows = value;\n this.validate_and_warn_shadow_angle();\n }\n // We need to override the getter as well, otherwise the setter above is not overriden properly.\n get enable_shadows() {\n return super.enable_shadows;\n }\n get_shadow_angle() {\n return this._light.shadow_angle_radians;\n }\n validate_and_warn_shadow_angle() {\n if (super.enable_shadows && this.get_shadow_angle() > SpotLightShadowController.MAX_SHADOW_ANGLE_RADIANS) {\n console.warn('SpotLightShadowController cone angle is out of range for rendering shadows. Expect broken shadows. Maximum value allowed: ' +\n degrees(SpotLightShadowController.MAX_SHADOW_ANGLE_RADIANS).toFixed(1) + ' degrees / ' + SpotLightShadowController.MAX_SHADOW_ANGLE_RADIANS.toFixed(2) + ' radians.\\n' +\n 'If using a custom shadow angle, set it before setting the inner/outer angle of the light to get rid of this warning.');\n }\n }\n should_update_shadowmap(meshes_modifications) {\n // TODO rework to `some`? compare performance\n // TODO refactor\n const light_direction = this._light.get_world_direction();\n const light_position = this._light.get_world_position();\n const shadow_cone_angle = this.get_shadow_angle();\n const light_cone_angle_sine = Math.sin(shadow_cone_angle * 0.5);\n const light_cone_angle_cosine = Math.cos(shadow_cone_angle * 0.5);\n for (const mod of meshes_modifications) {\n const rel_old = IVector3.subtract(mod.old_bounds.position, light_position); // old position relative to light\n const rel_new = IVector3.subtract(mod.old_bounds.position, light_position); // new position relative to light\n const old_dot_dir = IVector3.dot(rel_old, light_direction);\n const new_dot_dir = IVector3.dot(rel_new, light_direction);\n const old_radius = mod.old_bounds.radius;\n const new_radius = mod.new_bounds.radius;\n // TODO: When the radius hasn't changed we could save a bunch of work here.\n // If both the old and the new bounding sphere are outside the shadow near and far plane we can skip this modification.\n if ((old_dot_dir > this.shadow_far + old_radius || old_dot_dir < this.shadow_near - old_radius) &&\n (new_dot_dir > this.shadow_far + new_radius || new_dot_dir < this.shadow_near - new_radius))\n continue;\n const old_sphere_swept_cone_adj = old_radius / light_cone_angle_sine; // The amount to move the cone \"backwards\" to compensate for the radius of the sphere.\n const old_cone_vertex = IVector3.subtract(light_position, IVector3.scale(light_direction, old_sphere_swept_cone_adj));\n const old_cosa = IVector3.dot(light_direction, IVector3.normalize(IVector3.subtract(mod.old_bounds.position, old_cone_vertex)));\n if (old_cosa >= light_cone_angle_cosine) {\n // We are inside cone\n return true;\n }\n const new_sphere_swept_cone_adj = new_radius / light_cone_angle_sine; // The amount to move the cone \"backwards\" to compensate for the radius of the sphere.\n const new_cone_vertex = IVector3.subtract(light_position, IVector3.scale(light_direction, new_sphere_swept_cone_adj));\n const new_cosa = IVector3.dot(light_direction, IVector3.normalize(IVector3.subtract(mod.new_bounds.position, new_cone_vertex)));\n if (new_cosa >= light_cone_angle_cosine) {\n // We are inside cone\n return true;\n }\n }\n return false;\n }\n}\n// The maximum angle we consider is feasible for a spotlight shadow to render.\n// At high angles, the shadow gets a lot of distortion and low quality. At 180 degrees, you get NaNs/INFs in the projection.\nSpotLightShadowController.MAX_SHADOW_ANGLE_RADIANS = radians(170);\n//# sourceMappingURL=SpotLightShadowController.js.map","import { LightVisualizer } from './LightVisualizer.js';\nimport { LightPositionSphere } from './PositionSphere.js';\nimport { vector_3 } from '../../../utility/Conversion.js';\nimport { clamp } from '../../../../Math.js';\nexport class SpotLightVisualizer extends LightVisualizer {\n constructor(light, line_manager, color_mode, scene) {\n super(light, line_manager, color_mode, scene);\n this._num_lines = 8;\n this._minimum_line_length = 0;\n this._position_sphere = new LightPositionSphere('SpotLight', scene);\n this.update();\n }\n update() {\n super.update_visualizer();\n // We clamp it to prevent a number close to infinity when we calculate the tangent of a 90 degree angle\n const cone_end_radius = clamp(Math.tan(this._light.outer_angle_radians * 0.5) * this._light_range, -100, 100);\n const position = vector_3(this._light.get_world_position());\n const direction = vector_3(this._light.get_world_direction()).normalize();\n this.draw_directional_lines(this._light_range, cone_end_radius, 'cone', this._num_lines, direction, position, true);\n this._position_sphere.update(position, this._line_color);\n }\n dispose(start_index = 0) {\n this._position_sphere.dispose();\n super.dispose(start_index);\n }\n}\n//# sourceMappingURL=SpotLightVisualizer.js.map","import { Light } from './Light.js';\nimport { SpotLight as BABYLON_SpotLight } from '@inter-ikea-betrakta-babylonjs/core/Lights/spotLight.js';\nimport { calculate_world_transform, calculate_direction_from_parent_world_transform } from '../../../utility/TransformHelper.js';\nimport { vector_3 } from '../../../utility/Conversion.js';\nimport { TrackedVec3, degrees, radians, vector3_pool, matrix_pool, clamp } from '../../../../Math.js';\nimport { IVector3, LightType } from '../../../../api.js';\nimport { SpotLightShadowController } from '../shadows/SpotLightShadowController.js';\nimport { SpotLightVisualizer } from '../debug_visualizers/SpotLightVisualizer.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nvar SpotLightIntensityMode;\n(function (SpotLightIntensityMode) {\n SpotLightIntensityMode[SpotLightIntensityMode[\"LUMEN\"] = 0] = \"LUMEN\";\n SpotLightIntensityMode[SpotLightIntensityMode[\"CANDELA\"] = 1] = \"CANDELA\";\n SpotLightIntensityMode[SpotLightIntensityMode[\"DIRECT\"] = 2] = \"DIRECT\";\n})(SpotLightIntensityMode || (SpotLightIntensityMode = {}));\nexport class SpotLight extends Light {\n constructor(viewer, position = { x: 0, y: 0, z: 0 }, direction = { x: 0, y: -1, z: 0 }, outer_angle = Math.PI / 3, inner_angle = 0.0) {\n super(viewer);\n this._direction = new TrackedVec3();\n this._expermiental_distance_falloff_enabled = true;\n this._shadow_angle_radians = null;\n this.type = LightType.SPOT_LIGHT;\n this._babylon_light = new BABYLON_SpotLight(`Light_${this.id} (SpotLight)`, vector_3(position), vector_3(direction), outer_angle, 2, this._viewer.scene);\n this.shadow = new SpotLightShadowController(this, this._babylon_light, this._light_system);\n this._direction.onchange = () => this.mark_dirty(Light.DIRTY_DIRECTION);\n this.position = position;\n this._direction.set(direction.x, direction.y, direction.z);\n this._babylon_light.innerAngle = inner_angle;\n // Set the falloff type to GLTF, the default does not behave like we want it to.\n this._babylon_light.falloffType = BABYLON_SpotLight.FALLOFF_GLTF;\n this._intensity_mode = SpotLightIntensityMode.DIRECT;\n this._physical_intensity = this.intensity;\n // This is to make sure Babylon's light's photometric scale is 1.0, i.e. we take all responsibility for setting intensity, and we get the intensity we set.\n this._babylon_light.intensityMode = BABYLON_SpotLight.INTENSITYMODE_LUMINOUSINTENSITY;\n }\n set expermiental_distance_falloff_enabled(value) {\n if (this._expermiental_distance_falloff_enabled === value)\n return;\n this._expermiental_distance_falloff_enabled = value;\n // Note that we changed the lightFragment shader so FALLOFF_STANDARD does not take distance into consideration.\n this._babylon_light.falloffType = value ? BABYLON_SpotLight.FALLOFF_GLTF : BABYLON_SpotLight.FALLOFF_STANDARD;\n this._babylon_light._markMeshesAsLightDirty();\n this._viewer.mark_scene_dirty();\n }\n get direction() {\n return this._direction;\n }\n set direction(value) {\n this._direction.set(value.x, value.y, value.z);\n }\n look_at_local(local_position, local_target) {\n const direction = IVector3.normalize(IVector3.subtract(local_target, local_position));\n this.position = local_position;\n this._direction.copy(direction);\n }\n look_at_world(world_position, world_target) {\n const local_position = vector3_pool.fetch();\n const local_target = vector3_pool.fetch();\n // If the SpotLight has a parent, convert the world position and target to local space\n if (this._parent) {\n const inverse_parent_world_matrix = matrix_pool.fetch();\n this._parent.get_world_matrix().invertToRef(inverse_parent_world_matrix);\n const world_pos_babylon = vector3_pool.fetch().fromIVector3(world_position);\n BABYLON_Vector3.TransformCoordinatesToRef(world_pos_babylon, inverse_parent_world_matrix, local_position);\n const world_target_babylon = vector3_pool.fetch().fromIVector3(world_target);\n BABYLON_Vector3.TransformCoordinatesToRef(world_target_babylon, inverse_parent_world_matrix, local_target);\n matrix_pool.return(inverse_parent_world_matrix);\n vector3_pool.return(world_pos_babylon, world_target_babylon);\n }\n else {\n local_position.set(world_position.x, world_position.y, world_position.z);\n local_target.set(world_target.x, world_target.y, world_target.z);\n }\n this.look_at_local(local_position, local_target);\n vector3_pool.return(local_position, local_target);\n }\n get inner_angle_radians() {\n return this._babylon_light.innerAngle;\n }\n set inner_angle_radians(angle) {\n if (this._babylon_light.innerAngle === angle)\n return;\n this.set_angles(angle, this.outer_angle_radians);\n }\n get outer_angle_radians() {\n return this._babylon_light.angle;\n }\n set outer_angle_radians(angle) {\n if (this._babylon_light.angle === angle)\n return;\n this.set_angles(this.inner_angle_radians, angle);\n }\n // This getter is here to provide compatibility with DirectedShadowPointLight for their commonly used SpotLightShadowController\n get shadow_angle_radians() {\n var _a;\n return Math.min(this.outer_angle_radians, (_a = this._shadow_angle_radians) !== null && _a !== void 0 ? _a : this.outer_angle_radians);\n }\n set_custom_shadow_angle_radians(angle) {\n if (angle === this._shadow_angle_radians)\n return;\n this._shadow_angle_radians = angle;\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n set_custom_shadow_angle_degrees(angle) {\n this.set_custom_shadow_angle_radians((angle === null) ? null : radians(angle));\n }\n get inner_angle_degrees() {\n return degrees(this.inner_angle_radians);\n }\n set inner_angle_degrees(angle) {\n this.inner_angle_radians = radians(angle);\n }\n get outer_angle_degrees() {\n return degrees(this.outer_angle_radians);\n }\n set outer_angle_degrees(angle) {\n this.outer_angle_radians = radians(angle);\n }\n get intensity() {\n return super.intensity;\n }\n set intensity(intensity) {\n this._intensity_mode = SpotLightIntensityMode.DIRECT;\n this._physical_intensity = intensity;\n super.intensity = intensity;\n }\n set_intensity_lumen(lumen) {\n // The same amount of lumen spread out over a narrower cone angle results\n // in higher intensity (Cd). When the cone angle is 2 PI, the spotlight\n // behaves like a point light.\n this._intensity_mode = SpotLightIntensityMode.LUMEN;\n this._physical_intensity = lumen;\n // Important to use super.intensity here, as otherwise we'd overwrite our intensity mode to \"direct\"\n super.intensity = lumen / SpotLight.calculate_light_weighted_surface_area(this.inner_angle_radians, this.outer_angle_radians);\n }\n set_intensity_candela(candela) {\n // Since we use candela as the internal unit,\n // we don't need to consider the cone angle when\n // setting the intensity in candela.\n this._intensity_mode = SpotLightIntensityMode.CANDELA;\n this._physical_intensity = candela;\n this.intensity = candela;\n }\n update() {\n this.update_color_and_intensity();\n this.update_parent_material();\n if (this._parent) {\n const parent_updated = this.is_dirty(Light.DIRTY_PARENT_ADDED |\n Light.DIRTY_PARENT_TRANSFORM |\n Light.DIRTY_POSITION);\n if (parent_updated) {\n const world_position = this.get_world_position();\n const world_direction = this.get_world_direction();\n this._babylon_light.position.set(world_position.x, world_position.y, world_position.z);\n this._babylon_light.direction.set(world_direction.x, world_direction.y, world_direction.z);\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n }\n else {\n if (this.is_dirty(Light.DIRTY_POSITION)) {\n this._babylon_light.position.set(this.position.x, this.position.y, this.position.z);\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n }\n if (this.is_dirty(Light.DIRTY_ANGLE)) {\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n if (this.is_dirty(Light.DIRTY_DIRECTION)) {\n // Negate direction here because Babylon flips spotlight direction when you change the handedness.\n const world_direction = this.get_world_direction();\n this._babylon_light.direction.set(world_direction.x, world_direction.y, world_direction.z);\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n if (this.is_dirty(Light.DIRTY_SHADOW_MAP)) {\n this._babylon_light.shadowAngleScale = this._shadow_angle_radians === null\n ? 1\n : Math.min(1.0, this._shadow_angle_radians / this.outer_angle_radians);\n }\n }\n get_world_direction() {\n if (!this._parent) {\n return this._direction;\n }\n const parent_world_transform = calculate_world_transform(this._parent);\n return calculate_direction_from_parent_world_transform(parent_world_transform, this._direction);\n }\n create_debug_geometry() {\n const { line_manager, light_system, scene } = this._viewer;\n this._debug_geometry = new SpotLightVisualizer(this, line_manager, light_system.debug_color_mode, scene);\n }\n set_angles(inner, outer) {\n if (Math.min(inner, outer) < 0.0 || Math.max(inner, outer) > 2.0 * Math.PI) {\n console.warn('SpotLight angles are out of range. Clamping to 0 to 2pi (0 to 360 degrees)');\n inner = clamp(inner, 0, 2.0 * Math.PI);\n outer = clamp(outer, 0, 2.0 * Math.PI);\n }\n this._babylon_light.innerAngle = inner;\n this._babylon_light.angle = outer;\n // Make sure to run this after setting the angles on the babylon light, as that is where they're read from when validating the shadow angle.\n this.shadow.validate_and_warn_shadow_angle();\n if (this._intensity_mode === SpotLightIntensityMode.LUMEN) {\n // If we change the cone angle of the spotlight and it was set to use lumen instead of\n // candela, we need to reapply the intensity.\n const lumen = this._physical_intensity;\n // As the inner cone angle becomes smaller, the patch of light in the middle will become more intense.\n super.intensity = lumen / SpotLight.calculate_light_weighted_surface_area(this.inner_angle_radians, this.outer_angle_radians);\n }\n this.mark_dirty(Light.DIRTY_ANGLE);\n }\n static calculate_light_weighted_surface_area(inner_angle_radians, outer_angle_radians) {\n const half_inner = inner_angle_radians / 2.0;\n const half_outer = outer_angle_radians / 2.0;\n const inner_area = 2.0 * Math.PI * (1.0 - Math.cos(half_inner));\n // The outer area weighted by the penumbra, assuming the penumbra fade is linear in relation to cos(theta):\n // fade = 1.0 - (cos(theta) - cos(half_outer)) / (cos(half_inner) - cos(half_outer))\n // thus the weighted area of the outer (penumbra) part is then:\n // integral of [cos(half_inner) - cos(x)] / [cos(half_inner) - cos(half_outer)] * 2pi * sin(x) dx from half_inner to half_outer\n // = PI * (cos(half_outer) - cos(half_inner))\n const outer_weighted_area = Math.PI * (Math.cos(half_inner) - Math.cos(half_outer));\n return inner_area + outer_weighted_area;\n }\n}\n//# sourceMappingURL=SpotLight.js.map","import { radians, rotate } from '../../../../Math.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { IVector3 } from '../../../../api.js';\nimport { vector_3 } from '../../../utility/Conversion.js';\nimport { LightVisualizer } from './LightVisualizer.js';\nexport class LineLightVisualizer extends LightVisualizer {\n constructor(light, line_mananger, color_mode, scene) {\n super(light, line_mananger, color_mode, scene);\n this._minimum_line_length = 0;\n this.update();\n }\n update() {\n super.update_visualizer();\n const { line_a, line_b } = this._light.get_world_endpoints();\n const main_axis_p1 = vector_3(line_a);\n const main_axis_p2 = vector_3(line_b);\n const main_axis = main_axis_p2.subtract(main_axis_p1);\n const far_endpoints = this.get_far_endpoints(main_axis, main_axis_p1, main_axis_p2);\n this.draw_main_lines(vector_3(main_axis_p1), vector_3(main_axis_p2), far_endpoints, this._line_color, this._line_thickness);\n this.draw_far_lines([main_axis_p1, main_axis_p2], far_endpoints, this._line_color, this._line_thickness, main_axis);\n }\n get_far_endpoints(main_axis, main_axis_p1, main_axis_p2) {\n const line_normal = this._light.get_world_line_normal();\n const beam_leg_angle = (this._light.angle_direction_radians + this._light.angle_range_degrees / 2) * Math.PI / 180;\n const rotated_1 = rotate(new IVector3(line_normal.x, line_normal.y, line_normal.z), beam_leg_angle, main_axis);\n const line_normal_rotated_1 = new BABYLON_Vector3(rotated_1.x, rotated_1.y, rotated_1.z);\n const rotated_2 = rotate(new IVector3(line_normal.x, line_normal.y, line_normal.z), -beam_leg_angle, main_axis);\n const line_normal_rotated_2 = new BABYLON_Vector3(rotated_2.x, rotated_2.y, rotated_2.z);\n const beam_vector_1 = line_normal_rotated_1.scale(this._light_range);\n const beam_vector_2 = line_normal_rotated_2.scale(this._light_range);\n return [beam_vector_1.add(main_axis_p1), beam_vector_2.add(main_axis_p1), beam_vector_1.add(main_axis_p2),\n beam_vector_2.add(main_axis_p2)];\n }\n draw_main_lines(main_axis_p1, main_axis_p2, far_endpoints, color, line_thickness) {\n this.draw_line(0, main_axis_p1, main_axis_p2, color, line_thickness);\n for (let i = 1; i < 5; i++) {\n this.draw_line(i, i < 3 ? main_axis_p1 : main_axis_p2, vector_3(far_endpoints[i - 1]), color, line_thickness);\n }\n }\n draw_far_lines(main_axis_points, far_endpoints, color, line_thickness, main_axis) {\n const vec_3_endpoints = far_endpoints.map(vec => vector_3(vec));\n this.draw_line(5, vec_3_endpoints[0], vec_3_endpoints[2], color, line_thickness);\n this.draw_line(6, vec_3_endpoints[1], vec_3_endpoints[3], color, line_thickness);\n // Draw curves\n this.dispose(7);\n const delta_angle = radians(this._light.angle_range_degrees);\n const line_index = this.draw_curve(7, vec_3_endpoints[0], vec_3_endpoints[1], main_axis, main_axis_points[0], delta_angle);\n this.draw_curve(line_index + 1, vec_3_endpoints[2], vec_3_endpoints[3], main_axis, main_axis_points[1], delta_angle);\n }\n}\n//# sourceMappingURL=LineLightVisualizer.js.map","import { BabylonLineLight } from '../../../BabylonLineLight.js';\nimport { Vector3 as BABYLON_Vector3, Quaternion as BABYLON_Quaternion } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Light } from './Light.js';\nimport { IVector3, LightType } from '../../../../api.js';\nimport { radians, degrees } from '../../../../Math.js';\nimport { LineLightVisualizer } from '../debug_visualizers/LineLightVisualizer.js';\nimport { vector_3 } from '../../../utility/Conversion.js';\nimport { calculate_world_transform, calculate_transform_from_parent_world_transform } from '../../../utility/TransformHelper.js';\nimport { ViewerMaterial } from '../../../material/ViewerMaterial.js';\nimport { SpotLight } from './SpotLight.js';\nvar LineLightIntensityMode;\n(function (LineLightIntensityMode) {\n LineLightIntensityMode[LineLightIntensityMode[\"LUMEN\"] = 0] = \"LUMEN\";\n LineLightIntensityMode[LineLightIntensityMode[\"LUMEN_PER_METER\"] = 1] = \"LUMEN_PER_METER\";\n LineLightIntensityMode[LineLightIntensityMode[\"CANDELA\"] = 2] = \"CANDELA\";\n LineLightIntensityMode[LineLightIntensityMode[\"DIRECT\"] = 3] = \"DIRECT\";\n})(LineLightIntensityMode || (LineLightIntensityMode = {}));\n// In the shader and in our calculations in here, we support separating inner and outer cone angles\n// But we don't support setting it, and we don't have any way to send it to the shader as well today.\nconst INNER_ANGLE_RADIANS = 0.0;\nexport class LineLight extends Light {\n constructor(viewer, position = { x: 0, y: 0, z: 0 }) {\n super(viewer);\n this.shadow = null;\n // The reason for these odd initialization values, is to properly dirty necessary things in the constructor when setting actual defaults\n this._angle_range = -1;\n this._angle_direction = -1;\n // The rotation around the y axis for the linelight\n this._rotation = -1;\n this._width = -1;\n this._hard_side_cutoff = false;\n this._clip_plane = null;\n this._line_a = new BABYLON_Vector3();\n this._line_b = new BABYLON_Vector3();\n this._line_normal = new BABYLON_Vector3();\n this.type = LightType.LINE_LIGHT;\n this._babylon_light = new BabylonLineLight(`Light_${this.id} (LineLight)`, vector_3(position), vector_3(this._line_a), vector_3(this._line_b), this.angle_range_radians, viewer.scene, this.clip_plane);\n this._intensity_mode = LineLightIntensityMode.DIRECT;\n this._physical_intensity = this.intensity;\n // Set actual defaults, also dirties and recalculates certain things\n this.angle_range_degrees = 60.0;\n this.angle_direction_degrees = 0.0;\n this.rotation_degrees = 0.0;\n this.width = 1.0;\n this.calculate_line_normal();\n this._babylon_light.falloffType = BabylonLineLight.FALLOFF_GLTF;\n ViewerMaterial.active_line_lights.push(this._babylon_light);\n this.position = position;\n }\n get intensity() {\n return super.intensity;\n }\n set intensity(intensity) {\n this._intensity_mode = LineLightIntensityMode.DIRECT;\n this._physical_intensity = intensity;\n super.intensity = intensity;\n }\n set_intensity_lumen(lumen) {\n this._intensity_mode = LineLightIntensityMode.LUMEN;\n this._physical_intensity = lumen;\n this.recalculate_intensity();\n }\n set_intensity_candela(candela) {\n // Since we use candela as the internal unit,\n // we don't need to consider the cone angle when\n // setting the intensity in candela.\n this._intensity_mode = LineLightIntensityMode.CANDELA;\n this._physical_intensity = candela;\n this.recalculate_intensity();\n }\n set_intensity_lumen_per_meter(lumen_per_meter) {\n this._intensity_mode = LineLightIntensityMode.LUMEN_PER_METER;\n this._physical_intensity = lumen_per_meter;\n this.recalculate_intensity();\n }\n recalculate_intensity() {\n if (this._intensity_mode === LineLightIntensityMode.DIRECT)\n return;\n if (this._intensity_mode === LineLightIntensityMode.CANDELA) {\n super.intensity = this._physical_intensity;\n }\n else if (this._intensity_mode === LineLightIntensityMode.LUMEN) {\n super.intensity =\n this._physical_intensity /\n LineLight.calculate_light_weighted_surface_area(this.width, INNER_ANGLE_RADIANS, this.angle_range_radians);\n }\n else if (this._intensity_mode === LineLightIntensityMode.LUMEN_PER_METER) {\n super.intensity =\n this._physical_intensity /\n LineLight.calculate_light_weighted_surface_area(1.0, INNER_ANGLE_RADIANS, this.angle_range_radians);\n }\n else {\n throw new Error('Unknown intensity mode for line light: ' + this._intensity_mode);\n }\n }\n set angle_range_radians(angle_range) {\n if (angle_range === this._angle_range)\n return;\n this._angle_range = angle_range;\n this.recalculate_intensity();\n this.mark_dirty(LineLight.DIRTY_ANGLE_RANGE);\n }\n get angle_range_radians() {\n return this._angle_range;\n }\n set angle_range_degrees(angle_range) {\n this.angle_range_radians = radians(angle_range);\n }\n get angle_range_degrees() {\n return degrees(this.angle_range_radians);\n }\n set angle_direction_radians(angle_direction) {\n if (angle_direction === this._angle_direction)\n return;\n this._angle_direction = angle_direction;\n this.calculate_line_normal();\n }\n get angle_direction_radians() {\n return this._angle_direction;\n }\n set angle_direction_degrees(angle_direction) {\n this.angle_direction_radians = radians(angle_direction);\n }\n get angle_direction_degrees() {\n return degrees(this.angle_direction_radians);\n }\n set rotation_radians(rotation) {\n if (rotation === this._rotation)\n return;\n this._rotation = rotation;\n this.recalculate_a_and_b_and_line_normal(LineLight.DIRTY_LINE_NORMAL);\n }\n get rotation_radians() {\n return this._rotation;\n }\n set rotation_degrees(rotation) {\n this.rotation_radians = radians(rotation);\n }\n get rotation_degrees() {\n return degrees(this.rotation_radians);\n }\n set width(width) {\n if (this._width === width)\n return;\n this._width = width;\n this.recalculate_intensity();\n this.recalculate_a_and_b_and_line_normal(LineLight.DIRTY_LINE_WIDTH);\n }\n get width() {\n return this._width;\n }\n get clip_plane() {\n return this._clip_plane;\n }\n set clip_plane(plane) {\n if (this._clip_plane !== null && plane !== null) {\n if (this._clip_plane.normal.x === plane.normal.x &&\n this._clip_plane.normal.y === plane.normal.y &&\n this._clip_plane.normal.z === plane.normal.z &&\n this._clip_plane.position.x === plane.position.x &&\n this._clip_plane.position.y === plane.position.y &&\n this._clip_plane.position.z === plane.position.z)\n return;\n }\n else if (this._clip_plane === null && plane === null)\n return;\n this._clip_plane = plane;\n this.mark_dirty(LineLight.DIRTY_CLIP_PLANE);\n }\n get hard_side_cutoff() {\n return this._hard_side_cutoff;\n }\n /*\n * Enables or disables hard side cutoff for this line light, which is whether the light contribution should stop\n * abruptly for geometry outside of the width of the linelight, or if it should fade out smoothly from the ends of the line\n */\n set hard_side_cutoff(hard_side_cutoff) {\n if (this._hard_side_cutoff === hard_side_cutoff)\n return;\n this._hard_side_cutoff = hard_side_cutoff;\n this.mark_dirty(LineLight.DIRTY_HARD_SIDE_CUTOFF);\n }\n get_world_endpoints() {\n const offset = this.position;\n const offseted_line_a = new BABYLON_Vector3(offset.x + this._line_a.x, offset.y + this._line_a.y, offset.z + this._line_a.z);\n const offseted_line_b = new BABYLON_Vector3(offset.x + this._line_b.x, offset.y + this._line_b.y, offset.z + this._line_b.z);\n if (!this._parent) {\n return {\n line_a: offseted_line_a,\n line_b: offseted_line_b\n };\n }\n const parent_world_transform = calculate_world_transform(this._parent);\n const line_a_transform = calculate_transform_from_parent_world_transform(parent_world_transform, offseted_line_a);\n const line_b_transform = calculate_transform_from_parent_world_transform(parent_world_transform, offseted_line_b);\n return {\n line_a: vector_3(line_a_transform.position),\n line_b: vector_3(line_b_transform.position)\n };\n }\n get_world_line_normal() {\n if (!this._parent) {\n return this.get_line_normal();\n }\n const parent_world_transform = calculate_world_transform(this._parent);\n const rotation = parent_world_transform.rotation;\n const rotation_quaternion = BABYLON_Quaternion.RotationYawPitchRoll(rotation.y, rotation.x, rotation.z);\n const current_line_normal = this.get_line_normal();\n const rotated_line_normal = new BABYLON_Vector3(current_line_normal.x, current_line_normal.y, current_line_normal.z);\n rotated_line_normal.rotateByQuaternionToRef(rotation_quaternion, rotated_line_normal);\n return rotated_line_normal;\n }\n update() {\n this.update_color_and_intensity();\n this.update_parent_material();\n if (this._parent) {\n const parent_updated = this.is_dirty(Light.DIRTY_PARENT_ADDED |\n Light.DIRTY_PARENT_TRANSFORM |\n Light.DIRTY_POSITION |\n LineLight.DIRTY_LINE_NORMAL |\n LineLight.DIRTY_LINE_WIDTH);\n if (parent_updated) {\n const { line_a, line_b } = this.get_world_endpoints();\n this._babylon_light.line_a = vector_3(line_a);\n this._babylon_light.line_b = vector_3(line_b);\n this._babylon_light.line_normal = vector_3(this.get_world_line_normal());\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n }\n else {\n if (this.is_dirty(Light.DIRTY_POSITION | LineLight.DIRTY_LINE_NORMAL | LineLight.DIRTY_LINE_WIDTH)) {\n this._babylon_light.position.set(this.position.x, this.position.y, this.position.z);\n const a = this._line_a;\n const b = this._line_b;\n this._babylon_light.line_a.set(a.x + this.position.x, a.y + this.position.y, a.z + this.position.z);\n this._babylon_light.line_b.set(b.x + this.position.x, b.y + this.position.y, b.z + this.position.z);\n this._babylon_light.line_normal = vector_3(this.get_line_normal());\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n }\n if (this.is_dirty(LineLight.DIRTY_ANGLE_RANGE)) {\n this._babylon_light.angle_range_radians = this.angle_range_radians;\n }\n if (this.is_dirty(LineLight.DIRTY_HARD_SIDE_CUTOFF)) {\n this._babylon_light.hard_side_cutoff = this.hard_side_cutoff;\n }\n if (this.is_dirty(LineLight.DIRTY_CLIP_PLANE)) {\n this._babylon_light.clip_plane = this.clip_plane;\n }\n }\n dispose() {\n const pbr_mat_active_line_lights = ViewerMaterial.active_line_lights;\n const index = pbr_mat_active_line_lights.indexOf(this._babylon_light);\n if (index !== -1) {\n ViewerMaterial.active_line_lights.splice(index, 1);\n }\n else {\n console.error('Tried to remove a Linelight that was not active');\n }\n super.dispose();\n }\n create_debug_geometry() {\n const { line_manager, light_system, scene } = this._viewer;\n this._debug_geometry = new LineLightVisualizer(this, line_manager, light_system.debug_color_mode, scene);\n }\n get_line_normal() {\n return new BABYLON_Vector3(this._line_normal.x, this._line_normal.y, this._line_normal.z);\n }\n calculate_line_normal() {\n const line_a_to_b = IVector3.subtract(this._line_b, this._line_a);\n const ideal_normal = new IVector3(0.0, 1.0, 0.0);\n // Make the ideal normal perpendicular to the line\n const ideal_crossed_with_line = IVector3.cross(line_a_to_b, ideal_normal);\n const ideal_crossed_with_line_crossed_again = IVector3.cross(ideal_crossed_with_line, line_a_to_b);\n this._line_normal = IVector3.normalize(ideal_crossed_with_line_crossed_again);\n this._line_normal.y = -this._line_normal.y;\n const rotation_quarternion = new BABYLON_Quaternion();\n BABYLON_Quaternion.RotationAxisToRef(new BABYLON_Vector3(line_a_to_b.x, line_a_to_b.y, line_a_to_b.z), this._angle_direction, rotation_quarternion);\n this._line_normal = new BABYLON_Vector3(this._line_normal.x, this._line_normal.y, this._line_normal.z).rotateByQuaternionToRef(rotation_quarternion, new BABYLON_Vector3(0.0, 0.0, 0.0));\n this.mark_dirty(LineLight.DIRTY_ANGLE_RANGE);\n }\n recalculate_a_and_b_and_line_normal(flags) {\n this._line_a.x = 0.0;\n this._line_a.y = 0.0;\n this._line_a.z = -this._width / 2.0;\n this._line_b.x = 0.0;\n this._line_b.y = 0.0;\n this._line_b.z = this._width / 2.0;\n const rotation_quarternion = new BABYLON_Quaternion();\n BABYLON_Quaternion.RotationYawPitchRollToRef(this._rotation, 0.0, 0.0, rotation_quarternion);\n this._line_a.rotateByQuaternionToRef(rotation_quarternion, this._line_a);\n this._line_b.rotateByQuaternionToRef(rotation_quarternion, this._line_b);\n this.calculate_line_normal();\n this.mark_dirty(flags);\n }\n static calculate_light_weighted_surface_area(length, inner_angle_radians, outer_angle_radians) {\n // To calculate the weighted surface area of this \"light\", we divide it into a cylinder that has 2 spherical caps on the ends, which is how the linelight works.\n // The caps (2 halves) is the same as one spotlight\n const caps_weighted_surface_area = SpotLight.calculate_light_weighted_surface_area(inner_angle_radians, outer_angle_radians);\n // For the cylindrical part, calculating the surface area would be as simple as length * angle_range_radians,\n // but since we have a penumbra on the light, we must weigh our surface area.\n // First we declare our half angles. We only want to calculate this for the half cylinder, otherwise our cosines and sines will be weird.\n // we compensate by multiplying the area by 2 at the end.\n const a = inner_angle_radians * 0.5;\n const b = outer_angle_radians * 0.5;\n // We approximate how Babylon calculates the penumbra (angle falloff) by saying the angle falloff.\n // angle_falloff(x) = saturate((x - cos(b)) / (cos(a) - cos(b)))\n //\n // thus we can solve the weighted surface area with the integral:\n // from 0 to b, integrate for x: angle_falloff(cos(x)) dx\n // integrating the saturation function is not trivial, so we can split the integral for the part where the falloff is always 1 (between 0 and a),\n // and for where the falloff goes from 1 to 0 (a to b).\n // The integral between 0 and a is just the surface area of the cylinder section with a cone angle of a, which means the \"inner\" cylinder part is just:\n const inner_constant_cylinder_surface_area = 2.0 * length * a;\n // (remember we multiply by 2 because we're working with our half-angles)\n // For the outer/penumbra part, our integral for the weighted surface area becomes:\n // from a to b, integrate for x: (cos x - cos b) / (cos a - cos b)\n // the solution for this integral, multiplied by 2 and the length of the cylinder, then becomes:\n const outer_weighted_cylinder_surface_area = 2.0 * length * ((Math.sin(b) - Math.sin(a)) - Math.cos(b) * (b - a)) / (Math.cos(a) - Math.cos(b));\n // combine the areas:\n return caps_weighted_surface_area + inner_constant_cylinder_surface_area + outer_weighted_cylinder_surface_area;\n }\n}\nLineLight.DIRTY_LINE_WIDTH = 134217728;\nLineLight.DIRTY_ANGLE_RANGE = 268435456;\nLineLight.DIRTY_LINE_NORMAL = 536870912;\nLineLight.DIRTY_HARD_SIDE_CUTOFF = 1073741824;\nLineLight.DIRTY_CLIP_PLANE = 2147483648;\n//# sourceMappingURL=LineLight.js.map","import { Light } from './Light.js';\nimport { PointLight as BABYLON_PointLight } from '@inter-ikea-betrakta-babylonjs/core/Lights/pointLight.js';\nimport { vector_3 } from '../../../utility/Conversion.js';\nimport { TrackedVec3, degrees, radians } from '../../../../Math.js';\nimport { LightType } from '../../../../api.js';\nimport { PointLightVisualizer } from '../debug_visualizers/PointLightVisualizer.js';\nimport { SpotLightShadowController } from '../shadows/SpotLightShadowController.js';\nimport { calculate_direction_from_parent_world_transform, calculate_world_transform } from '../../../utility/TransformHelper.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\n/**\n * DirectedShadowPointLight enables setting a direction for the shadow, effectivly making the shadow casting similar to that of a SpotLight,\n * while giving the same illumination as a PointLight. The shadow quality will be better due to support for percentage closer filtering (pcf).\n * The memory usage is lower since only one texture is needed instead of 6 for the regular PointLight.\n */\nexport class DirectedShadowPointLight extends Light {\n constructor(viewer, position = { x: 0, y: 0, z: 0 }) {\n super(viewer);\n this._direction = new TrackedVec3();\n this.type = LightType.DIRECTED_SHADOW_POINT_LIGHT;\n this._babylon_light = new BABYLON_PointLight(`Light_${this.id} (DirectedShadowPointLight)`, vector_3(position), this._viewer.scene);\n this.shadow = new SpotLightShadowController(this, this._babylon_light, this._light_system);\n // This is left undefined if we don't initialize it ourselves.\n this._babylon_light.direction = new BABYLON_Vector3(0, 0, 0);\n this._direction.onchange = () => this.mark_dirty(Light.DIRTY_DIRECTION);\n this._babylon_light.shadowAngle = Math.PI / 3;\n this.position = position;\n }\n get direction() {\n return this._direction;\n }\n set direction(value) {\n this._direction.set(value.x, value.y, value.z);\n }\n get shadow_angle_radians() {\n return this._babylon_light.shadowAngle;\n }\n set shadow_angle_radians(a) {\n if (this._babylon_light.shadowAngle === a)\n return;\n this._babylon_light.shadowAngle = a;\n this.shadow.validate_and_warn_shadow_angle();\n // Dirtying DIRTY_ANGLE might not have an effect today, but it does tell use the range of the light has changed, if useful in the future.\n this.mark_dirty(Light.DIRTY_ANGLE | Light.DIRTY_SHADOW_MAP);\n }\n get shadow_angle_degrees() {\n return degrees(this.shadow_angle_radians);\n }\n set shadow_angle_degrees(angle) {\n this.shadow_angle_radians = radians(angle);\n }\n update() {\n this.update_color_and_intensity();\n this.update_parent_material();\n if (this._parent) {\n const parent_updated = this.is_dirty(Light.DIRTY_PARENT_ADDED |\n Light.DIRTY_PARENT_TRANSFORM |\n Light.DIRTY_POSITION);\n if (parent_updated) {\n const world_position = this.get_world_position();\n const world_direction = this.get_world_direction();\n this._babylon_light.position.set(world_position.x, world_position.y, world_position.z);\n this._babylon_light.direction.set(world_direction.x, world_direction.y, world_direction.z);\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n }\n else {\n if (this.is_dirty(Light.DIRTY_POSITION)) {\n this._babylon_light.position.set(this.position.x, this.position.y, this.position.z);\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n }\n if (this.is_dirty(Light.DIRTY_DIRECTION)) {\n const world_direction = this.get_world_direction();\n this._babylon_light.direction.set(world_direction.x, world_direction.y, world_direction.z);\n this.mark_dirty(Light.DIRTY_SHADOW_MAP);\n }\n }\n get_world_direction() {\n if (!this._parent) {\n return this._direction;\n }\n const parent_world_transform = calculate_world_transform(this._parent);\n return calculate_direction_from_parent_world_transform(parent_world_transform, this._direction);\n }\n create_debug_geometry() {\n const { line_manager, scene, light_system } = this._viewer;\n this._debug_geometry = new PointLightVisualizer(this, line_manager, light_system.debug_color_mode, scene);\n }\n}\n//# sourceMappingURL=DirectedShadowPointLight.js.map","export function get_hardware_limits(viewer) {\n const limits = {\n MAX_LIGHTS: -1,\n MAX_SHADOWCASTING_LIGHTS: -1\n };\n // We check WebGL1 constants via Babylon's EngineCapabilities\n const capabilities = viewer.engine.getCaps();\n // Check WebGL2 constants\n let max_vertex_uniform_blocks = -1;\n const webgl2_context = viewer.engine._gl;\n if (webgl2_context && viewer.engine.webGLVersion === 2) {\n max_vertex_uniform_blocks = webgl2_context.getParameter(webgl2_context.MAX_VERTEX_UNIFORM_BLOCKS);\n }\n // Uniform inventory: https://i-p-e-x.atlassian.net/wiki/spaces/IV/pages/36263199561/Uniform+inventory\n // Calculate maximum number of lights and shadow casting lights based on hardware limitations.\n // When doing this we work with the following assumptions about uniform usage per light (without shadows):\n // Spotlights 5\n // Line lights 7.\n // Point light 4\n // Spot lights with shadows: 11\n // We currently ignore the fact that light can start having shadows during their lifetime when we calculate maximum lights.\n // Uniforms are not taken into account when deciding MAX_SHADOW_CASTING_LIGHTS\n // Current maximum lights that can affect a material is set in AssetManager to 64. However, the limits we set here are used in the LightSystem when adding lights.\n // Max lights are currently limited by the number of uniform blocks for webGL2. Each light adds a new block. Two other blocks exist; one for Material and one for Scene.\n // We also count on there being an hemispheric light taking up one UBO\n // The vertex and fragments blocks limit are the same.\n if (max_vertex_uniform_blocks !== -1) {\n limits.MAX_LIGHTS = max_vertex_uniform_blocks - 3;\n }\n else {\n // For WebGL1 max lights are limited by the number of fragment uniform vectors. 7 is the maximum number of uniforms that a light adds to the scene (line lights add the most).\n // Since this is calulated based on a worse case scenario, we usually have some headroom here if we use different kinds of lights with and without shadows.\n // 36 is the number of uniform vectors that we use in the fragment shader, not counting the lights.\n // This does not help on all Android devices, some of which fails anyway.\n // Each object clipping plane will add 3 additional uniforms (vec4 vClipPlane4; vec3 vMinWorldBBox4;vec3 vMaxWorldBBox4;)\n const worst_case_nr_of_uniforms_per_light = 7;\n const nr_of_clipping_plane_uniforms = 3;\n // The number of max fragment and vertex uniforms are the same.\n // eslint-disable-next-line max-len\n limits.MAX_LIGHTS = Math.floor((capabilities.maxFragmentUniformVectors - 36 - nr_of_clipping_plane_uniforms) / worst_case_nr_of_uniforms_per_light);\n }\n // (WebGL1) issue when many shadows: Too many varying vectors. Varying vectors other than lights (5): vPositionW, vNormalW, vAlbedoUV, vReflectivityUV, vBumpUV;\n // We currently add a maximum of 2 varyings per light: vPositionFromLight and vDepthMetric\n // For each clipping plane we potentially add 2 varyings: float fClipDistance and float fInsideMesh\n const nr_of_clipping_planes_varyings = 2;\n const nr_of_lights_based_on_varyings = Math.floor((capabilities.maxVaryingVectors - 5 - nr_of_clipping_planes_varyings) / 2);\n // Issue when many shadows: Too many image texture units. Texture image units other than shadows (4): albedoSampler; reflectivitySampler; environmentBrdfSampler; bumpSampler;\n // 2 is subtracted from the MAX_TEXTURE_IMAGE_UNITS since some Android devices use an additional 2 samplers for reflectivity, if lacking shader extension for texture LOD\n const nr_of_lights_based_on_image_units = capabilities.maxTexturesImageUnits - 4 - 2;\n limits.MAX_SHADOWCASTING_LIGHTS = Math.min(nr_of_lights_based_on_image_units, nr_of_lights_based_on_varyings);\n return limits;\n}\n//# sourceMappingURL=HardwareLimits.js.map","import { LightSystem } from './light-system/LightSystem.js';\nimport { ViewerFactory } from '../utility/ViewerFactory.js';\nimport { AmbientLightController } from './AmbientLightController.js';\nimport { EnvironmentManager } from './EnvironmentManager.js';\nimport { assert } from '../utility/Assert.js';\nimport { LightType } from './types/LightType.js';\nimport { PointLight } from './light-system/lights/PointLight.js';\nimport { DirectionalLight } from './light-system/lights/DirectionalLight.js';\nimport { SpotLight } from './light-system/lights/SpotLight.js';\nimport { LineLight } from './light-system/lights/LineLight.js';\nimport { DirectedShadowPointLight } from './light-system/lights/DirectedShadowPointLight.js';\nimport { get_hardware_limits } from '../utility/HardwareLimits.js';\nexport const LIGHT_CONSTRUCTORS = {\n [LightType.POINT_LIGHT]: PointLight,\n [LightType.DIRECTIONAL_LIGHT]: DirectionalLight,\n [LightType.SPOT_LIGHT]: SpotLight,\n [LightType.LINE_LIGHT]: LineLight,\n [LightType.DIRECTED_SHADOW_POINT_LIGHT]: DirectedShadowPointLight\n};\n/**\n * A manager for lights in the viewer.\n */\nexport class LightManager {\n constructor(_viewer) {\n this._viewer = _viewer;\n this.experimental_soft_shadow_renderers = new Set();\n const { MAX_LIGHTS, MAX_SHADOWCASTING_LIGHTS } = get_hardware_limits(_viewer);\n this._max_lights = MAX_LIGHTS;\n this.light_system = new LightSystem(MAX_SHADOWCASTING_LIGHTS, _viewer);\n this.ambient_light = new AmbientLightController(_viewer);\n this.environment = new EnvironmentManager(_viewer, this.ambient_light);\n this._factory = new ViewerFactory(LIGHT_CONSTRUCTORS, _viewer);\n }\n /**\n * Creates a light of the specified type.\n * @param type The type of light to create.\n * @param args The arguments to pass to the light constructor.\n * @throws An error if the maximum number of lights has been reached.\n */\n create_light(type, ...args) {\n assert(this.can_create_light(), `Maximum number of lights (${this._max_lights}) has been reached`);\n const light = this._factory.create(type, ...args);\n this.light_system.add_light(light);\n return light;\n }\n can_create_light() {\n const main_light_name = this.ambient_light.name;\n return this._viewer.scene.lights.filter(light => light.name !== main_light_name).length < this._max_lights;\n }\n remove_all_lights() {\n this.light_system.dispose_all_lights();\n }\n delete_light(light) {\n if (this.light_system.has_light(light)) {\n light.dispose();\n return true;\n }\n return false;\n }\n dispose() {\n this.light_system.dispose();\n this.ambient_light.dispose();\n this.environment.dispose();\n }\n}\n//# sourceMappingURL=LightManager.js.map","import { Quaternion, Matrix, Vector3, Vector2 } from \"../Maths/math.vector.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { SubMesh } from \"../Meshes/subMesh.js\";\nimport { Mesh } from \"../Meshes/mesh.js\";\nimport { Color4 } from \"../Maths/math.color.js\";\n\nimport { VertexData } from \"./mesh.vertexData.js\";\n/**\n * Unique ID when we import meshes from Babylon to CSG\n */\nlet currentCSGMeshId = 0;\n/**\n * Represents a vertex of a polygon. Use your own vertex class instead of this\n * one to provide additional features like texture coordinates and vertex\n * colors. Custom vertex classes need to provide a `pos` property and `clone()`,\n * `flip()`, and `interpolate()` methods that behave analogous to the ones\n * defined by `BABYLON.CSG.Vertex`. This class provides `normal` so convenience\n * functions like `BABYLON.CSG.sphere()` can return a smooth vertex normal, but `normal`\n * is not used anywhere else.\n * Same goes for uv, it allows to keep the original vertex uv coordinates of the 2 meshes\n */\nclass Vertex {\n /**\n * Initializes the vertex\n * @param pos The position of the vertex\n * @param normal The normal of the vertex\n * @param uv The texture coordinate of the vertex\n * @param vertColor The RGBA color of the vertex\n */\n constructor(\n /**\n * The position of the vertex\n */\n pos, \n /**\n * The normal of the vertex\n */\n normal, \n /**\n * The texture coordinate of the vertex\n */\n uv, \n /**\n * The texture coordinate of the vertex\n */\n vertColor) {\n this.pos = pos;\n this.normal = normal;\n this.uv = uv;\n this.vertColor = vertColor;\n }\n /**\n * Make a clone, or deep copy, of the vertex\n * @returns A new Vertex\n */\n clone() {\n var _a, _b;\n return new Vertex(this.pos.clone(), this.normal.clone(), (_a = this.uv) === null || _a === void 0 ? void 0 : _a.clone(), (_b = this.vertColor) === null || _b === void 0 ? void 0 : _b.clone());\n }\n /**\n * Invert all orientation-specific data (e.g. vertex normal). Called when the\n * orientation of a polygon is flipped.\n */\n flip() {\n this.normal = this.normal.scale(-1);\n }\n /**\n * Create a new vertex between this vertex and `other` by linearly\n * interpolating all properties using a parameter of `t`. Subclasses should\n * override this to interpolate additional properties.\n * @param other the vertex to interpolate against\n * @param t The factor used to linearly interpolate between the vertices\n */\n interpolate(other, t) {\n return new Vertex(Vector3.Lerp(this.pos, other.pos, t), Vector3.Lerp(this.normal, other.normal, t), this.uv && other.uv ? Vector2.Lerp(this.uv, other.uv, t) : undefined, this.vertColor && other.vertColor ? Color4.Lerp(this.vertColor, other.vertColor, t) : undefined);\n }\n}\n/**\n * Represents a plane in 3D space.\n */\nclass CSGPlane {\n /**\n * Initializes the plane\n * @param normal The normal for the plane\n * @param w\n */\n constructor(normal, w) {\n this.normal = normal;\n this.w = w;\n }\n /**\n * Construct a plane from three points\n * @param a Point a\n * @param b Point b\n * @param c Point c\n */\n static FromPoints(a, b, c) {\n const v0 = c.subtract(a);\n const v1 = b.subtract(a);\n if (v0.lengthSquared() === 0 || v1.lengthSquared() === 0) {\n return null;\n }\n const n = Vector3.Normalize(Vector3.Cross(v0, v1));\n return new CSGPlane(n, Vector3.Dot(n, a));\n }\n /**\n * Clone, or make a deep copy of the plane\n * @returns a new Plane\n */\n clone() {\n return new CSGPlane(this.normal.clone(), this.w);\n }\n /**\n * Flip the face of the plane\n */\n flip() {\n this.normal.scaleInPlace(-1);\n this.w = -this.w;\n }\n /**\n * Split `polygon` by this plane if needed, then put the polygon or polygon\n * fragments in the appropriate lists. Coplanar polygons go into either\n `* coplanarFront` or `coplanarBack` depending on their orientation with\n * respect to this plane. Polygons in front or in back of this plane go into\n * either `front` or `back`\n * @param polygon The polygon to be split\n * @param coplanarFront Will contain polygons coplanar with the plane that are oriented to the front of the plane\n * @param coplanarBack Will contain polygons coplanar with the plane that are oriented to the back of the plane\n * @param front Will contain the polygons in front of the plane\n * @param back Will contain the polygons begind the plane\n */\n splitPolygon(polygon, coplanarFront, coplanarBack, front, back) {\n const COPLANAR = 0;\n const FRONT = 1;\n const BACK = 2;\n const SPANNING = 3;\n // Classify each point as well as the entire polygon into one of the above\n // four classes.\n let polygonType = 0;\n const types = [];\n let i;\n let t;\n for (i = 0; i < polygon.vertices.length; i++) {\n t = Vector3.Dot(this.normal, polygon.vertices[i].pos) - this.w;\n const type = t < -CSGPlane.EPSILON ? BACK : t > CSGPlane.EPSILON ? FRONT : COPLANAR;\n polygonType |= type;\n types.push(type);\n }\n // Put the polygon in the correct list, splitting it when necessary\n switch (polygonType) {\n case COPLANAR:\n (Vector3.Dot(this.normal, polygon.plane.normal) > 0 ? coplanarFront : coplanarBack).push(polygon);\n break;\n case FRONT:\n front.push(polygon);\n break;\n case BACK:\n back.push(polygon);\n break;\n case SPANNING: {\n const f = [], b = [];\n for (i = 0; i < polygon.vertices.length; i++) {\n const j = (i + 1) % polygon.vertices.length;\n const ti = types[i], tj = types[j];\n const vi = polygon.vertices[i], vj = polygon.vertices[j];\n if (ti !== BACK) {\n f.push(vi);\n }\n if (ti !== FRONT) {\n b.push(ti !== BACK ? vi.clone() : vi);\n }\n if ((ti | tj) === SPANNING) {\n t = (this.w - Vector3.Dot(this.normal, vi.pos)) / Vector3.Dot(this.normal, vj.pos.subtract(vi.pos));\n const v = vi.interpolate(vj, t);\n f.push(v);\n b.push(v.clone());\n }\n }\n let poly;\n if (f.length >= 3) {\n poly = new CSGPolygon(f, polygon.shared);\n if (poly.plane) {\n front.push(poly);\n }\n }\n if (b.length >= 3) {\n poly = new CSGPolygon(b, polygon.shared);\n if (poly.plane) {\n back.push(poly);\n }\n }\n break;\n }\n }\n }\n}\n/**\n * `CSG.Plane.EPSILON` is the tolerance used by `splitPolygon()` to decide if a\n * point is on the plane\n */\nCSGPlane.EPSILON = 1e-5;\n/**\n * Represents a convex polygon. The vertices used to initialize a polygon must\n * be coplanar and form a convex loop.\n *\n * Each convex polygon has a `shared` property, which is shared between all\n * polygons that are clones of each other or were split from the same polygon.\n * This can be used to define per-polygon properties (such as surface color)\n */\nclass CSGPolygon {\n /**\n * Initializes the polygon\n * @param vertices The vertices of the polygon\n * @param shared The properties shared across all polygons\n */\n constructor(vertices, shared) {\n this.vertices = vertices;\n this.shared = shared;\n this.plane = CSGPlane.FromPoints(vertices[0].pos, vertices[1].pos, vertices[2].pos);\n }\n /**\n * Clones, or makes a deep copy, or the polygon\n */\n clone() {\n const vertices = this.vertices.map((v) => v.clone());\n return new CSGPolygon(vertices, this.shared);\n }\n /**\n * Flips the faces of the polygon\n */\n flip() {\n this.vertices.reverse().map((v) => {\n v.flip();\n });\n this.plane.flip();\n }\n}\n/**\n * Holds a node in a BSP tree. A BSP tree is built from a collection of polygons\n * by picking a polygon to split along. That polygon (and all other coplanar\n * polygons) are added directly to that node and the other polygons are added to\n * the front and/or back subtrees. This is not a leafy BSP tree since there is\n * no distinction between internal and leaf nodes\n */\nclass Node {\n /**\n * Initializes the node\n * @param polygons A collection of polygons held in the node\n */\n constructor(polygons) {\n this._plane = null;\n this._front = null;\n this._back = null;\n this._polygons = new Array();\n if (polygons) {\n this.build(polygons);\n }\n }\n /**\n * Clones, or makes a deep copy, of the node\n * @returns The cloned node\n */\n clone() {\n const node = new Node();\n node._plane = this._plane && this._plane.clone();\n node._front = this._front && this._front.clone();\n node._back = this._back && this._back.clone();\n node._polygons = this._polygons.map((p) => p.clone());\n return node;\n }\n /**\n * Convert solid space to empty space and empty space to solid space\n */\n invert() {\n for (let i = 0; i < this._polygons.length; i++) {\n this._polygons[i].flip();\n }\n if (this._plane) {\n this._plane.flip();\n }\n if (this._front) {\n this._front.invert();\n }\n if (this._back) {\n this._back.invert();\n }\n const temp = this._front;\n this._front = this._back;\n this._back = temp;\n }\n /**\n * Recursively remove all polygons in `polygons` that are inside this BSP\n * tree.\n * @param polygons Polygons to remove from the BSP\n * @returns Polygons clipped from the BSP\n */\n clipPolygons(polygons) {\n if (!this._plane) {\n return polygons.slice();\n }\n let front = [], back = [];\n for (let i = 0; i < polygons.length; i++) {\n this._plane.splitPolygon(polygons[i], front, back, front, back);\n }\n if (this._front) {\n front = this._front.clipPolygons(front);\n }\n if (this._back) {\n back = this._back.clipPolygons(back);\n }\n else {\n back = [];\n }\n return front.concat(back);\n }\n /**\n * Remove all polygons in this BSP tree that are inside the other BSP tree\n * `bsp`.\n * @param bsp BSP containing polygons to remove from this BSP\n */\n clipTo(bsp) {\n this._polygons = bsp.clipPolygons(this._polygons);\n if (this._front) {\n this._front.clipTo(bsp);\n }\n if (this._back) {\n this._back.clipTo(bsp);\n }\n }\n /**\n * Return a list of all polygons in this BSP tree\n * @returns List of all polygons in this BSP tree\n */\n allPolygons() {\n let polygons = this._polygons.slice();\n if (this._front) {\n polygons = polygons.concat(this._front.allPolygons());\n }\n if (this._back) {\n polygons = polygons.concat(this._back.allPolygons());\n }\n return polygons;\n }\n /**\n * Build a BSP tree out of `polygons`. When called on an existing tree, the\n * new polygons are filtered down to the bottom of the tree and become new\n * nodes there. Each set of polygons is partitioned using the first polygon\n * (no heuristic is used to pick a good split)\n * @param polygons Polygons used to construct the BSP tree\n */\n build(polygons) {\n if (!polygons.length) {\n return;\n }\n if (!this._plane) {\n this._plane = polygons[0].plane.clone();\n }\n const front = [], back = [];\n for (let i = 0; i < polygons.length; i++) {\n this._plane.splitPolygon(polygons[i], this._polygons, this._polygons, front, back);\n }\n if (front.length) {\n if (!this._front) {\n this._front = new Node();\n }\n this._front.build(front);\n }\n if (back.length) {\n if (!this._back) {\n this._back = new Node();\n }\n this._back.build(back);\n }\n }\n}\n/**\n * Class for building Constructive Solid Geometry\n */\nexport class CSG {\n constructor() {\n this._polygons = new Array();\n }\n /**\n * Convert a VertexData to CSG\n * @param mesh defines the VertexData to convert to CSG\n * @returns the new CSG\n */\n static FromVertexData(data) {\n let vertex, polygon, vertices;\n const polygons = [];\n const indices = data.indices;\n const positions = data.positions;\n const normals = data.normals;\n const uvs = data.uvs;\n const vertColors = data.colors;\n if (!indices || !positions) {\n throw \"BABYLON.CSG: VertexData must at least contain positions and indices\";\n }\n for (let i = 0; i < indices.length; i += 3) {\n vertices = [];\n for (let j = 0; j < 3; j++) {\n const indexIndices = i + j;\n const offset = indices[indexIndices];\n const normal = normals ? Vector3.FromArray(normals, offset * 3) : Vector3.Zero();\n const uv = uvs ? Vector2.FromArray(uvs, offset * 2) : undefined;\n const vertColor = vertColors ? Color4.FromArray(vertColors, offset * 4) : undefined;\n const position = Vector3.FromArray(positions, offset * 3);\n vertex = new Vertex(position, normal, uv, vertColor);\n vertices.push(vertex);\n }\n polygon = new CSGPolygon(vertices, { subMeshId: 0, meshId: currentCSGMeshId, materialIndex: 0 });\n // To handle the case of degenerated triangle\n // polygon.plane == null <=> the polygon does not represent 1 single plane <=> the triangle is degenerated\n if (polygon.plane) {\n polygons.push(polygon);\n }\n }\n const csg = CSG._FromPolygons(polygons);\n csg.matrix = Matrix.Identity();\n csg.position = Vector3.Zero();\n csg.rotation = Vector3.Zero();\n csg.scaling = Vector3.One();\n csg.rotationQuaternion = Quaternion.Identity();\n currentCSGMeshId++;\n return csg;\n }\n /**\n * Convert the Mesh to CSG\n * @param mesh The Mesh to convert to CSG\n * @param absolute If true, the final (local) matrix transformation is set to the identity and not to that of `mesh`. It can help when dealing with right-handed meshes (default: false)\n * @returns A new CSG from the Mesh\n */\n static FromMesh(mesh, absolute = false) {\n let vertex, normal, uv = undefined, position, vertColor = undefined, polygon, vertices;\n const polygons = [];\n let matrix, meshPosition, meshRotation, meshRotationQuaternion = null, meshScaling;\n let invertWinding = false;\n if (mesh instanceof Mesh) {\n mesh.computeWorldMatrix(true);\n matrix = mesh.getWorldMatrix();\n meshPosition = mesh.position.clone();\n meshRotation = mesh.rotation.clone();\n if (mesh.rotationQuaternion) {\n meshRotationQuaternion = mesh.rotationQuaternion.clone();\n }\n meshScaling = mesh.scaling.clone();\n if (mesh.material && absolute) {\n invertWinding = mesh.material.sideOrientation === 0;\n }\n }\n else {\n throw \"BABYLON.CSG: Wrong Mesh type, must be BABYLON.Mesh\";\n }\n const indices = mesh.getIndices(), positions = mesh.getVerticesData(VertexBuffer.PositionKind), normals = mesh.getVerticesData(VertexBuffer.NormalKind), uvs = mesh.getVerticesData(VertexBuffer.UVKind), vertColors = mesh.getVerticesData(VertexBuffer.ColorKind);\n const subMeshes = mesh.subMeshes;\n for (let sm = 0, sml = subMeshes.length; sm < sml; sm++) {\n for (let i = subMeshes[sm].indexStart, il = subMeshes[sm].indexCount + subMeshes[sm].indexStart; i < il; i += 3) {\n vertices = [];\n for (let j = 0; j < 3; j++) {\n const indexIndices = j === 0 ? i + j : invertWinding ? i + 3 - j : i + j;\n const sourceNormal = new Vector3(normals[indices[indexIndices] * 3], normals[indices[indexIndices] * 3 + 1], normals[indices[indexIndices] * 3 + 2]);\n if (uvs) {\n uv = new Vector2(uvs[indices[indexIndices] * 2], uvs[indices[indexIndices] * 2 + 1]);\n }\n if (vertColors) {\n vertColor = new Color4(vertColors[indices[indexIndices] * 4], vertColors[indices[indexIndices] * 4 + 1], vertColors[indices[indexIndices] * 4 + 2], vertColors[indices[indexIndices] * 4 + 3]);\n }\n const sourcePosition = new Vector3(positions[indices[indexIndices] * 3], positions[indices[indexIndices] * 3 + 1], positions[indices[indexIndices] * 3 + 2]);\n position = Vector3.TransformCoordinates(sourcePosition, matrix);\n normal = Vector3.TransformNormal(sourceNormal, matrix);\n vertex = new Vertex(position, normal, uv, vertColor);\n vertices.push(vertex);\n }\n polygon = new CSGPolygon(vertices, { subMeshId: sm, meshId: currentCSGMeshId, materialIndex: subMeshes[sm].materialIndex });\n // To handle the case of degenerated triangle\n // polygon.plane == null <=> the polygon does not represent 1 single plane <=> the triangle is degenerated\n if (polygon.plane) {\n polygons.push(polygon);\n }\n }\n }\n const csg = CSG._FromPolygons(polygons);\n csg.matrix = absolute ? Matrix.Identity() : matrix;\n csg.position = absolute ? Vector3.Zero() : meshPosition;\n csg.rotation = absolute ? Vector3.Zero() : meshRotation;\n csg.scaling = absolute ? Vector3.One() : meshScaling;\n csg.rotationQuaternion = absolute && meshRotationQuaternion ? Quaternion.Identity() : meshRotationQuaternion;\n currentCSGMeshId++;\n return csg;\n }\n /**\n * Construct a CSG solid from a list of `CSG.Polygon` instances.\n * @param polygons Polygons used to construct a CSG solid\n */\n static _FromPolygons(polygons) {\n const csg = new CSG();\n csg._polygons = polygons;\n return csg;\n }\n /**\n * Clones, or makes a deep copy, of the CSG\n * @returns A new CSG\n */\n clone() {\n const csg = new CSG();\n csg._polygons = this._polygons.map((p) => p.clone());\n csg.copyTransformAttributes(this);\n return csg;\n }\n /**\n * Unions this CSG with another CSG\n * @param csg The CSG to union against this CSG\n * @returns The unioned CSG\n */\n union(csg) {\n const a = new Node(this.clone()._polygons);\n const b = new Node(csg.clone()._polygons);\n a.clipTo(b);\n b.clipTo(a);\n b.invert();\n b.clipTo(a);\n b.invert();\n a.build(b.allPolygons());\n return CSG._FromPolygons(a.allPolygons()).copyTransformAttributes(this);\n }\n /**\n * Unions this CSG with another CSG in place\n * @param csg The CSG to union against this CSG\n */\n unionInPlace(csg) {\n const a = new Node(this._polygons);\n const b = new Node(csg._polygons);\n a.clipTo(b);\n b.clipTo(a);\n b.invert();\n b.clipTo(a);\n b.invert();\n a.build(b.allPolygons());\n this._polygons = a.allPolygons();\n }\n /**\n * Subtracts this CSG with another CSG\n * @param csg The CSG to subtract against this CSG\n * @returns A new CSG\n */\n subtract(csg) {\n const a = new Node(this.clone()._polygons);\n const b = new Node(csg.clone()._polygons);\n a.invert();\n a.clipTo(b);\n b.clipTo(a);\n b.invert();\n b.clipTo(a);\n b.invert();\n a.build(b.allPolygons());\n a.invert();\n return CSG._FromPolygons(a.allPolygons()).copyTransformAttributes(this);\n }\n /**\n * Subtracts this CSG with another CSG in place\n * @param csg The CSG to subtract against this CSG\n */\n subtractInPlace(csg) {\n const a = new Node(this._polygons);\n const b = new Node(csg._polygons);\n a.invert();\n a.clipTo(b);\n b.clipTo(a);\n b.invert();\n b.clipTo(a);\n b.invert();\n a.build(b.allPolygons());\n a.invert();\n this._polygons = a.allPolygons();\n }\n /**\n * Intersect this CSG with another CSG\n * @param csg The CSG to intersect against this CSG\n * @returns A new CSG\n */\n intersect(csg) {\n const a = new Node(this.clone()._polygons);\n const b = new Node(csg.clone()._polygons);\n a.invert();\n b.clipTo(a);\n b.invert();\n a.clipTo(b);\n b.clipTo(a);\n a.build(b.allPolygons());\n a.invert();\n return CSG._FromPolygons(a.allPolygons()).copyTransformAttributes(this);\n }\n /**\n * Intersects this CSG with another CSG in place\n * @param csg The CSG to intersect against this CSG\n */\n intersectInPlace(csg) {\n const a = new Node(this._polygons);\n const b = new Node(csg._polygons);\n a.invert();\n b.clipTo(a);\n b.invert();\n a.clipTo(b);\n b.clipTo(a);\n a.build(b.allPolygons());\n a.invert();\n this._polygons = a.allPolygons();\n }\n /**\n * Return a new CSG solid with solid and empty space switched. This solid is\n * not modified.\n * @returns A new CSG solid with solid and empty space switched\n */\n inverse() {\n const csg = this.clone();\n csg.inverseInPlace();\n return csg;\n }\n /**\n * Inverses the CSG in place\n */\n inverseInPlace() {\n this._polygons.map((p) => {\n p.flip();\n });\n }\n /**\n * This is used to keep meshes transformations so they can be restored\n * when we build back a Babylon Mesh\n * NB : All CSG operations are performed in world coordinates\n * @param csg The CSG to copy the transform attributes from\n * @returns This CSG\n */\n copyTransformAttributes(csg) {\n this.matrix = csg.matrix;\n this.position = csg.position;\n this.rotation = csg.rotation;\n this.scaling = csg.scaling;\n this.rotationQuaternion = csg.rotationQuaternion;\n return this;\n }\n /**\n * Build vertex data from CSG\n * Coordinates here are in world space\n * @returns the final vertex data\n */\n toVertexData(onBeforePolygonProcessing = null, onAfterPolygonProcessing = null) {\n const matrix = this.matrix.clone();\n matrix.invert();\n const polygons = this._polygons;\n const vertices = [];\n const indices = [];\n const normals = [];\n let uvs = null;\n let vertColors = null;\n const vertex = Vector3.Zero();\n const normal = Vector3.Zero();\n const uv = Vector2.Zero();\n const vertColor = new Color4(0, 0, 0, 0);\n const polygonIndices = [0, 0, 0];\n const vertice_dict = {};\n let vertex_idx;\n for (let i = 0, il = polygons.length; i < il; i++) {\n const polygon = polygons[i];\n if (onBeforePolygonProcessing) {\n onBeforePolygonProcessing(polygon);\n }\n for (let j = 2, jl = polygon.vertices.length; j < jl; j++) {\n polygonIndices[0] = 0;\n polygonIndices[1] = j - 1;\n polygonIndices[2] = j;\n for (let k = 0; k < 3; k++) {\n vertex.copyFrom(polygon.vertices[polygonIndices[k]].pos);\n normal.copyFrom(polygon.vertices[polygonIndices[k]].normal);\n if (polygon.vertices[polygonIndices[k]].uv) {\n if (!uvs) {\n uvs = [];\n }\n uv.copyFrom(polygon.vertices[polygonIndices[k]].uv);\n }\n if (polygon.vertices[polygonIndices[k]].vertColor) {\n if (!vertColors) {\n vertColors = [];\n }\n vertColor.copyFrom(polygon.vertices[polygonIndices[k]].vertColor);\n }\n const localVertex = Vector3.TransformCoordinates(vertex, matrix);\n const localNormal = Vector3.TransformNormal(normal, matrix);\n vertex_idx = vertice_dict[localVertex.x + \",\" + localVertex.y + \",\" + localVertex.z];\n let areUvsDifferent = false;\n if (uvs && !(uvs[vertex_idx * 2] === uv.x || uvs[vertex_idx * 2 + 1] === uv.y)) {\n areUvsDifferent = true;\n }\n let areColorsDifferent = false;\n if (vertColors &&\n !(vertColors[vertex_idx * 4] === vertColor.r ||\n vertColors[vertex_idx * 4 + 1] === vertColor.g ||\n vertColors[vertex_idx * 4 + 2] === vertColor.b ||\n vertColors[vertex_idx * 4 + 3] === vertColor.a)) {\n areColorsDifferent = true;\n }\n // Check if 2 points can be merged\n if (!(typeof vertex_idx !== \"undefined\" &&\n normals[vertex_idx * 3] === localNormal.x &&\n normals[vertex_idx * 3 + 1] === localNormal.y &&\n normals[vertex_idx * 3 + 2] === localNormal.z) ||\n areUvsDifferent ||\n areColorsDifferent) {\n vertices.push(localVertex.x, localVertex.y, localVertex.z);\n if (uvs) {\n uvs.push(uv.x, uv.y);\n }\n normals.push(normal.x, normal.y, normal.z);\n if (vertColors) {\n vertColors.push(vertColor.r, vertColor.g, vertColor.b, vertColor.a);\n }\n vertex_idx = vertice_dict[localVertex.x + \",\" + localVertex.y + \",\" + localVertex.z] = vertices.length / 3 - 1;\n }\n indices.push(vertex_idx);\n if (onAfterPolygonProcessing) {\n onAfterPolygonProcessing();\n }\n }\n }\n }\n const result = new VertexData();\n result.positions = vertices;\n result.normals = normals;\n if (uvs) {\n result.uvs = uvs;\n }\n if (vertColors) {\n result.colors = vertColors;\n }\n result.indices = indices;\n return result;\n }\n /**\n * Build Raw mesh from CSG\n * Coordinates here are in world space\n * @param name The name of the mesh geometry\n * @param scene The Scene\n * @param keepSubMeshes Specifies if the submeshes should be kept\n * @returns A new Mesh\n */\n buildMeshGeometry(name, scene, keepSubMeshes) {\n const mesh = new Mesh(name, scene);\n const polygons = this._polygons;\n let currentIndex = 0;\n const subMeshDict = {};\n let subMeshObj;\n if (keepSubMeshes) {\n // Sort Polygons, since subMeshes are indices range\n polygons.sort((a, b) => {\n if (a.shared.meshId === b.shared.meshId) {\n return a.shared.subMeshId - b.shared.subMeshId;\n }\n else {\n return a.shared.meshId - b.shared.meshId;\n }\n });\n }\n const vertexData = this.toVertexData((polygon) => {\n // Building SubMeshes\n if (!subMeshDict[polygon.shared.meshId]) {\n subMeshDict[polygon.shared.meshId] = {};\n }\n if (!subMeshDict[polygon.shared.meshId][polygon.shared.subMeshId]) {\n subMeshDict[polygon.shared.meshId][polygon.shared.subMeshId] = {\n indexStart: +Infinity,\n indexEnd: -Infinity,\n materialIndex: polygon.shared.materialIndex,\n };\n }\n subMeshObj = subMeshDict[polygon.shared.meshId][polygon.shared.subMeshId];\n }, () => {\n subMeshObj.indexStart = Math.min(currentIndex, subMeshObj.indexStart);\n subMeshObj.indexEnd = Math.max(currentIndex, subMeshObj.indexEnd);\n currentIndex++;\n });\n vertexData.applyToMesh(mesh);\n if (keepSubMeshes) {\n // We offset the materialIndex by the previous number of materials in the CSG mixed meshes\n let materialIndexOffset = 0, materialMaxIndex;\n mesh.subMeshes = [];\n for (const m in subMeshDict) {\n materialMaxIndex = -1;\n for (const sm in subMeshDict[m]) {\n subMeshObj = subMeshDict[m][sm];\n SubMesh.CreateFromIndices(subMeshObj.materialIndex + materialIndexOffset, subMeshObj.indexStart, subMeshObj.indexEnd - subMeshObj.indexStart + 1, mesh);\n materialMaxIndex = Math.max(subMeshObj.materialIndex, materialMaxIndex);\n }\n materialIndexOffset += ++materialMaxIndex;\n }\n }\n return mesh;\n }\n /**\n * Build Mesh from CSG taking material and transforms into account\n * @param name The name of the Mesh\n * @param material The material of the Mesh\n * @param scene The Scene\n * @param keepSubMeshes Specifies if submeshes should be kept\n * @returns The new Mesh\n */\n toMesh(name, material = null, scene, keepSubMeshes) {\n const mesh = this.buildMeshGeometry(name, scene, keepSubMeshes);\n mesh.material = material;\n mesh.position.copyFrom(this.position);\n mesh.rotation.copyFrom(this.rotation);\n if (this.rotationQuaternion) {\n mesh.rotationQuaternion = this.rotationQuaternion.clone();\n }\n mesh.scaling.copyFrom(this.scaling);\n mesh.computeWorldMatrix(true);\n return mesh;\n }\n}\n//# sourceMappingURL=csg.js.map","import { IBoundingBox, IRay, IVector2, IVector3 } from '../api.js';\nimport { RENDER_LAYER_IGNORE_RAYCAST, RENDER_LAYER_MASK_RAYCASTABLE, RenderLayerMask } from './RenderLayer.js';\nimport { Ray as BABYLON_Ray } from '@inter-ikea-betrakta-babylonjs/core/Culling/ray.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { InstancedMesh as BABYLON_InstancedMesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/instancedMesh.js';\nimport { lerp_float, matrix_pool, vector2_pool, vector3_pool } from '../Math.js';\nimport { is_aabb, is_sphere } from './utility/Bounds.js';\nimport { VertexBuffer as BABYLON_VertexBuffer } from '@inter-ikea-betrakta-babylonjs/core/Meshes/buffer.js';\nimport { assert } from './utility/Assert.js';\n/**\n * Raycast the scene using a ray, return the closest SceneObject if that object has any drag or click handler, otherwise return null\n * @param ray The ray to use for picking\n * @param layer_mask The layer mask to select which layers to include in the raycast\n * @returns The SceneObject behind the given ray if it is pickable, null otherwise\n */\nexport function raycast_interactable_object(viewer, ray, layer_mask) {\n const hits = raycast_all_internal(viewer, ray, layer_mask);\n const closest_hit = filter_closest_hit(hits);\n if (closest_hit) {\n const { object } = closest_hit;\n const is_gizmo = typeof object === 'object';\n // TODO casting should be removed once Scene Objects will get an API\n const interactable = is_gizmo ? object : viewer.viewer_scene.objects.get(object);\n if (viewer.get_input_handler_manager().interactable_is_pickable(interactable)) {\n return [interactable, closest_hit];\n }\n }\n return null;\n}\n/**\n * Raycast all SceneObjects meshes and extra bounds\n * @param viewer viewer reference\n * @param ray Ray to use\n * @param hits Optional Storage array to append hits to\n * @param filter_layer_mask Optional filter for which layers to raycast against\n * @returns Array with all hits appended, if @hits was not provided a new array with all hits\n */\nexport function raycast_all_internal(viewer, ray, filter_layer_mask = RENDER_LAYER_MASK_RAYCASTABLE) {\n const gizmo_hits = raycast_all_gizmos_internal(viewer, ray);\n const object_mesh_hits = raycast_all_scene_meshes_internal(viewer, ray, filter_layer_mask);\n const object_bound_hits = raycast_all_bounds_internal(viewer, ray, filter_layer_mask);\n const hits = [].concat(gizmo_hits, object_mesh_hits, object_bound_hits);\n return hits;\n}\nexport function raycast_all_objects_internal(viewer, ray, filter_layer_mask = RENDER_LAYER_MASK_RAYCASTABLE) {\n const object_mesh_hits = raycast_all_scene_meshes_internal(viewer, ray, filter_layer_mask);\n const object_bound_hits = raycast_all_bounds_internal(viewer, ray, filter_layer_mask);\n return object_mesh_hits.concat(object_bound_hits);\n}\n/**\n * Raycasts all gizmo meshes in the scene\n * @param ray The ray to use\n * @param hits optional result storage, pushes to the provided array if provided\n * @returns Array with one entry per mesh that was hit\n */\nexport function raycast_all_gizmos_internal(viewer, ray) {\n const hits = [];\n for (const instance of viewer.asset_manager.gizmos) {\n for (const mesh of instance.instances) {\n if (!mesh.isVisible)\n continue;\n const pick_info = ray.intersectsMesh(mesh, false, filter_backface_triangles);\n if (pick_info.hit && pick_info.pickedMesh && pick_info.pickedPoint) {\n hits.push({\n world_position: pick_info.pickedPoint,\n object: instance,\n distance: pick_info.distance\n });\n }\n }\n }\n return hits;\n}\n/**\n * Raycasts all meshes in the scene while skipping those on the ignore_raycast render layer\n * Note that this function can return several hits per scene object\n * @param ray The ray to use\n * @param hits optional result storage, pushes to the provided array if provided\n * @returns Array with one entry per mesh that was hit\n */\nexport function raycast_all_scene_meshes_internal(viewer, ray, filter_layer_mask = RENDER_LAYER_MASK_RAYCASTABLE) {\n var _a, _b;\n const meshes = [];\n const hits = [];\n for (const scene_object of viewer.viewer_scene.objects.values()) {\n const layer_mask = scene_object.get_render_layer_mask();\n if (scene_object.mesh_nodes &&\n scene_object.enabled &&\n scene_object.visible &&\n (layer_mask.bitmap & filter_layer_mask.bitmap) !== 0 &&\n !RenderLayerMask.has_layer(layer_mask, RENDER_LAYER_IGNORE_RAYCAST)) {\n for (let i = 0; i < scene_object.mesh_nodes.length; i++) {\n meshes.push(scene_object.mesh_nodes[i]);\n }\n }\n }\n const local_ray = new BABYLON_Ray(BABYLON_Vector3.Zero(), BABYLON_Vector3.Forward(true), Number.MAX_VALUE);\n for (let i = 0; i < meshes.length; i++) {\n const mesh = meshes[i];\n const positions = mesh.getVerticesData(BABYLON_VertexBuffer.PositionKind);\n const indices = mesh.getIndices();\n const world_matrix = mesh.getWorldMatrix();\n const world_matrix_inverse = world_matrix.invertToRef(matrix_pool.fetch());\n BABYLON_Ray.TransformToRef(ray, world_matrix_inverse, local_ray);\n matrix_pool.return(world_matrix_inverse);\n const hit = {\n distance: Number.POSITIVE_INFINITY,\n world_position: new IVector3(NaN, NaN, NaN),\n object: -1\n };\n const metadata = viewer.viewer_scene.get_metadata_from_babylon_mesh(mesh);\n if (metadata === null)\n continue;\n if (raycast_bvh(local_ray, metadata.raycast_acceleration_structure, positions, indices, hit, (_b = (_a = mesh.material) === null || _a === void 0 ? void 0 : _a.backFaceCulling) !== null && _b !== void 0 ? _b : true, false)) {\n const hit_object = metadata.asset_instance_metadata.owner;\n assert(hit_object !== null, 'Error: The mesh hit by raycast did not correspond to a viewer scene object');\n const local_hit_position = new BABYLON_Vector3().fromIVector3(hit.world_position);\n const world_hit_position = vector3_pool.fetch();\n BABYLON_Vector3.TransformCoordinatesToRef(local_hit_position, world_matrix, world_hit_position);\n IVector3.copy_to_ref(world_hit_position, hit.world_position);\n vector3_pool.return(world_hit_position);\n hit.object = hit_object.id;\n hit.distance = IVector3.distance(ray.origin, hit.world_position);\n hits.push(hit);\n }\n }\n return hits;\n}\nexport function raycast_all_bounds_internal(viewer, ray, filter_layer_mask = RENDER_LAYER_MASK_RAYCASTABLE) {\n const local_ray = new BABYLON_Ray(BABYLON_Vector3.Zero(), BABYLON_Vector3.Forward(true), Number.MAX_VALUE);\n const hits = [];\n viewer.viewer_scene.objects.forEach((scene_object) => {\n if (!scene_object.enabled ||\n !scene_object.visible ||\n RenderLayerMask.has_layer(scene_object.get_render_layer_mask(), RENDER_LAYER_IGNORE_RAYCAST) ||\n (scene_object.get_render_layer_mask().bitmap & filter_layer_mask.bitmap) === 0)\n return;\n const raycast_bounds = scene_object.get_raycast_bounds();\n if (raycast_bounds && raycast_bounds.length > 0) {\n // Transform ray to object local space\n const world_matrix = scene_object.get_world_matrix();\n const world_matrix_inverse = world_matrix.invertToRef(matrix_pool.fetch());\n BABYLON_Ray.TransformToRef(ray, world_matrix_inverse, local_ray);\n const hit = { world_position: { x: 0, y: 0, z: 0 }, object: -1, distance: Number.MAX_VALUE };\n const local_hit_position = vector3_pool.fetch();\n const world_hit_position = vector3_pool.fetch();\n const hit_cache = vector2_pool.fetch();\n for (const bound of raycast_bounds) {\n // Do the raycast in object local space\n let local_distance = -1;\n let world_distance = -1;\n // Find distance in local space\n if (is_aabb(bound)) {\n if (IRay.intersects_bounding_box(local_ray, bound, hit_cache)) {\n local_distance = hit_cache.x >= 0 ? hit_cache.x : hit_cache.y;\n }\n }\n else if (is_sphere(bound)) {\n if (IRay.intersects_sphere(local_ray, bound, hit_cache)) {\n local_distance = hit_cache.x >= 0 ? hit_cache.x : hit_cache.y;\n }\n }\n // If we have a hit in local space, transform it back to world\n if (local_distance >= 0) {\n local_hit_position.copyFrom(local_ray.origin);\n local_ray.direction.scaleAndAddToRef(local_distance, local_hit_position);\n BABYLON_Vector3.TransformCoordinatesToRef(local_hit_position, world_matrix, world_hit_position);\n world_distance = BABYLON_Vector3.Distance(world_hit_position, ray.origin);\n }\n // If the new hit is closer than the old one we store that hit instead\n if (world_distance >= 0 && world_distance <= ray.length && world_distance < hit.distance) {\n hit.world_position.x = world_hit_position.x;\n hit.world_position.y = world_hit_position.y;\n hit.world_position.z = world_hit_position.z;\n hit.object = scene_object.id;\n hit.distance = world_distance;\n }\n }\n matrix_pool.return(world_matrix_inverse);\n vector3_pool.return(local_hit_position, world_hit_position);\n vector2_pool.return(hit_cache);\n if (hit.object !== -1) {\n hits.push(hit);\n }\n }\n });\n return hits;\n}\n/**\n * Given a PickingInfo it returns null if no object was hit or a RaycastResult\n * @param pick_info babylon pick result\n * @returns RaycastResult if viewer object was hit, null otherwise\n */\nexport function convert_pick_info(viewer, pick_info) {\n if (pick_info.hit && pick_info.pickedMesh) {\n assert(pick_info.pickedMesh instanceof BABYLON_InstancedMesh, 'Error: raycast mesh is not an instanced mesh, this should never happen');\n const mesh_metadata = viewer.viewer_scene.get_metadata_from_babylon_mesh(pick_info.pickedMesh);\n if (mesh_metadata !== null && pick_info.pickedPoint !== null) {\n const object = mesh_metadata.asset_instance_metadata.owner;\n if (object !== null) {\n return {\n world_position: IVector3.copy_to_ref(pick_info.pickedPoint, new IVector3()),\n object: object.id,\n distance: pick_info.distance\n };\n }\n }\n }\n return null;\n}\nexport function filter_closest_hit(hits) {\n // If hit result contains draw-on-top gizmos - only use those to pick closest\n const draw_on_top_gizoms = hits.filter(({ object }) => typeof object !== 'number' && object.mesh_source.draw_on_top);\n if (draw_on_top_gizoms.length) {\n hits = draw_on_top_gizoms;\n }\n if (hits.length === 0)\n return null;\n let closest_hit = hits[0];\n for (let i = 1; i < hits.length; i++) {\n const hit = hits[i];\n if (hit.distance < closest_hit.distance) {\n closest_hit = hit;\n }\n }\n return closest_hit;\n}\nexport function filter_hits_to_one_per_interactable_in_place(hits) {\n // Find only the closest hit per object\n const interactable_to_hit = new Map();\n for (let i = 0; i < hits.length; i++) {\n const hit = hits[i];\n const old_hit = interactable_to_hit.get(hit.object);\n if (old_hit !== undefined && hit.distance < old_hit.distance) {\n interactable_to_hit.set(hit.object, hit);\n }\n else {\n interactable_to_hit.set(hit.object, hit);\n }\n }\n hits.length = 0;\n for (const hit of interactable_to_hit.values()) {\n hits.push(hit);\n }\n}\nexport function update_babylon_ray(ray, origin_or_ray, direction, length) {\n if ('origin' in origin_or_ray) { // TODO: Make IRay.is() type guard when we move to static classes\n ray.origin.fromIVector3(origin_or_ray.origin);\n ray.direction.fromIVector3(origin_or_ray.direction);\n ray.direction.normalize();\n ray.length = origin_or_ray.length;\n }\n else {\n ray.origin.fromIVector3(origin_or_ray);\n if (direction && 'x' in direction) {\n ray.direction.fromIVector3(direction);\n }\n ray.direction.normalize();\n ray.length = length !== null && length !== void 0 ? length : Number.MAX_VALUE;\n }\n}\n// Should perhaps be called is_backface_triangle or similar?\nexport function filter_backface_triangles(p0, p1, p2, ray) {\n const p0p1 = p0.subtract(p1);\n const p2p1 = p2.subtract(p1);\n const normal = BABYLON_Vector3.Cross(p0p1, p2p1);\n return (BABYLON_Vector3.Dot(ray.direction, normal) > 0);\n}\nconst BVH_MAX_DEPTH = 20;\nconst BVH_MAX_TRIANGLES = 20;\nconst BVH_MIN_BB_SIZE = 0.0001;\nexport function build_triangles_bvh(positions, indices) {\n assert(indices.length % 3 === 0, 'Error: bad data in index buffer, not devisable by 3');\n assert(positions.length % 3 === 0, 'Error: bad data in positions buffer, not devisable by 3');\n const triangles = [];\n const num_triangles = indices.length / 3;\n triangles.length = num_triangles;\n for (let i = 0; i < num_triangles; i++) {\n const index0 = indices[i * 3 + 0];\n const index1 = indices[i * 3 + 1];\n const index2 = indices[i * 3 + 2];\n const cx = (positions[index0 * 3 + 0] + positions[index1 * 3 + 0] + positions[index2 * 3 + 0]) / 3;\n const cy = (positions[index0 * 3 + 1] + positions[index1 * 3 + 1] + positions[index2 * 3 + 1]) / 3;\n const cz = (positions[index0 * 3 + 2] + positions[index1 * 3 + 2] + positions[index2 * 3 + 2]) / 3;\n triangles[i] = {\n centroid: { x: cx, y: cy, z: cz },\n triangle_index: i\n };\n }\n return triangles;\n}\nfunction find_split_axis(bound) {\n const sizex = bound.max.x - bound.min.x;\n const sizey = bound.max.y - bound.min.y;\n const sizez = bound.max.z - bound.min.z;\n if (sizex >= sizey && sizex >= sizez) {\n return 'x';\n }\n else if (sizey >= sizex && sizey >= sizez) {\n return 'y';\n }\n else {\n return 'z';\n }\n}\nexport function build_tree_bvh(triangles, positions, indices, depth = 0) {\n const left_triangles = [];\n const right_triangles = [];\n let left_node = null;\n let right_node = null;\n let node_triangles = [];\n const bounding_box = IBoundingBox.Invalid();\n for (const triangle of triangles) {\n IBoundingBox.encapsulate_in_place(bounding_box, triangle.centroid);\n }\n const split_axis = find_split_axis(bounding_box);\n const axis_length = bounding_box.max[split_axis] - bounding_box.min[split_axis];\n const split_value = lerp_float(bounding_box.min[split_axis], bounding_box.max[split_axis], 0.5);\n if (triangles.length <= BVH_MAX_TRIANGLES ||\n depth >= BVH_MAX_DEPTH ||\n axis_length < BVH_MIN_BB_SIZE) {\n node_triangles = triangles.map(t => { return { triangle_index: t.triangle_index }; });\n // Find actual bound size\n for (const triangle of node_triangles) {\n const index0 = indices[triangle.triangle_index * 3 + 0];\n const index1 = indices[triangle.triangle_index * 3 + 1];\n const index2 = indices[triangle.triangle_index * 3 + 2];\n const p0 = {\n x: positions[index0 * 3 + 0],\n y: positions[index0 * 3 + 1],\n z: positions[index0 * 3 + 2]\n };\n const p1 = {\n x: positions[index1 * 3 + 0],\n y: positions[index1 * 3 + 1],\n z: positions[index1 * 3 + 2]\n };\n const p2 = {\n x: positions[index2 * 3 + 0],\n y: positions[index2 * 3 + 1],\n z: positions[index2 * 3 + 2]\n };\n IBoundingBox.encapsulate_in_place(bounding_box, p0, p1, p2);\n }\n }\n else {\n for (const triangle of triangles) {\n if (triangle.centroid[split_axis] < split_value) {\n left_triangles.push(triangle);\n }\n else {\n right_triangles.push(triangle);\n }\n }\n left_node = build_tree_bvh(left_triangles, positions, indices, depth + 1);\n right_node = build_tree_bvh(right_triangles, positions, indices, depth + 1);\n IBoundingBox.encapsulate_in_place(bounding_box, left_node.bounding_box.min, left_node.bounding_box.max, right_node.bounding_box.min, right_node.bounding_box.max);\n }\n return {\n triangles: node_triangles,\n bounding_box: bounding_box,\n left: left_node,\n right: right_node\n };\n}\nconst normal = new IVector3();\nconst edge10 = new IVector3();\nconst edge20 = new IVector3();\nconst p0 = new IVector3();\nconst p1 = new IVector3();\nconst p2 = new IVector3();\nconst h = new IVector3();\nconst s = new IVector3();\nconst q = new IVector3();\nconst intersection_point = new IVector3();\n// Based on https://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm\nexport function intersect_ray_triangle(ray, triangle, positions, indices, hit, filter_backface) {\n const epsilon = 0.0000001;\n const index0 = indices[triangle.triangle_index * 3 + 0];\n const index1 = indices[triangle.triangle_index * 3 + 1];\n const index2 = indices[triangle.triangle_index * 3 + 2];\n IVector3.set(p0, positions[index0 * 3 + 0], positions[index0 * 3 + 1], positions[index0 * 3 + 2]);\n IVector3.set(p1, positions[index1 * 3 + 0], positions[index1 * 3 + 1], positions[index1 * 3 + 2]);\n IVector3.set(p2, positions[index2 * 3 + 0], positions[index2 * 3 + 1], positions[index2 * 3 + 2]);\n IVector3.subtract_to_ref(p1, p0, edge10);\n IVector3.subtract_to_ref(p2, p0, edge20);\n IVector3.cross_to_ref(ray.direction, edge20, h);\n const a = IVector3.dot(edge10, h);\n if (a > -epsilon && a < epsilon)\n return false;\n const f = 1.0 / a;\n IVector3.subtract_to_ref(ray.origin, p0, s);\n const u = f * (IVector3.dot(s, h));\n if (u < 0.0 || u > 1.0)\n return false;\n IVector3.cross_to_ref(s, edge10, q);\n const v = f * (IVector3.dot(ray.direction, q));\n if (v < 0.0 || (u + v) > 1.0)\n return false;\n const t = f * (IVector3.dot(edge20, q));\n if (t > epsilon) {\n IVector3.copy_to_ref(ray.origin, intersection_point);\n IVector3.add_scaled_in_place(intersection_point, t, ray.direction);\n const distance = IVector3.distance(intersection_point, ray.origin);\n if (filter_backface) {\n IVector3.cross_to_ref(edge20, edge10, normal);\n if (IVector3.dot(ray.direction, normal) < 0) {\n return false;\n }\n }\n if (hit.distance > distance) {\n hit.distance = distance;\n hit.world_position = IVector3.copy(intersection_point);\n return true;\n }\n }\n return false;\n}\nconst hit_distance_cache = new IVector2();\nexport function raycast_bvh(ray, node, positions, indices, hit, filter_backface, triangle_hit) {\n const intersects_bounds = IRay.intersects_bounding_box(ray, node.bounding_box, hit_distance_cache);\n if (!intersects_bounds)\n return triangle_hit;\n // Both hits are behind ray origin\n if (hit_distance_cache.x < 0 && hit_distance_cache.y < 0)\n return triangle_hit;\n // Bounds for this node is further away than our previous hit\n if (triangle_hit && hit_distance_cache.x > hit.distance)\n return triangle_hit;\n for (const triangle of node.triangles) {\n triangle_hit = intersect_ray_triangle(ray, triangle, positions, indices, hit, filter_backface) || triangle_hit;\n }\n if (node.left) {\n triangle_hit = raycast_bvh(ray, node.left, positions, indices, hit, filter_backface, triangle_hit) || triangle_hit;\n }\n if (node.right) {\n triangle_hit = raycast_bvh(ray, node.right, positions, indices, hit, filter_backface, triangle_hit) || triangle_hit;\n }\n return triangle_hit;\n}\nexport function build_bvh_from_mesh(mesh) {\n const positions = mesh.getVerticesData(BABYLON_VertexBuffer.PositionKind);\n const indices = mesh.getIndices();\n if (positions && positions.length > 0 && indices && indices.length > 0) {\n const triangles = build_triangles_bvh(positions, indices);\n return build_tree_bvh(triangles, positions, indices);\n }\n else {\n return {\n left: null,\n right: null,\n triangles: [],\n bounding_box: {\n min: { x: 0, y: 0, z: 0 },\n max: { x: 0, y: 0, z: 0 }\n }\n };\n }\n}\n//# sourceMappingURL=Raycast.js.map","import { VertexData as BABYLON_VertexData } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.vertexData.js';\nimport { Matrix as BABYLON_Matrix, Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Mesh as BABYLON_Mesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js';\nimport { CSG as BABYLON_CSG } from '@inter-ikea-betrakta-babylonjs/core/Meshes/csg.js';\nimport { MeshBuilder as BABYLON_MeshBuilder } from '@inter-ikea-betrakta-babylonjs/core/Meshes/meshBuilder.js';\nimport { IVector3 } from '../api.js';\nimport { EngineStore as BABYLON_EngineStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/engineStore.js';\nimport { PARALLEL_DOT, matrix_pool, vector3_pool } from '../Math.js';\nimport { build_bvh_from_mesh } from './Raycast.js';\nexport class CutoutShape {\n constructor(vertices, basis_x = { x: 1, y: 0, z: 0 }, basis_y = { x: 0, y: 0, z: 1 }) {\n var _a;\n if (vertices.length <= 2) {\n throw new Error('Not enough vertices provided for cutout shape');\n }\n const basis_x_length = IVector3.magnitude(basis_x);\n const basis_y_length = IVector3.magnitude(basis_y);\n if (basis_x_length === 0.0 || basis_y_length === 0.0) {\n throw new Error('One or both of basis vectors are zero-vectors');\n }\n if (Math.abs(IVector3.dot(basis_x, basis_y) / (basis_x_length * basis_y_length)) >= PARALLEL_DOT) {\n throw new Error('Basis vectors are parallel');\n }\n // We do not allow these to be set by the user as we consider the cut to be done in 2D\n const extent_low = 100000.0;\n const extent_high = -100000.0;\n this.basis_x = { x: basis_x.x, y: basis_x.y, z: basis_x.z };\n this.basis_y = { x: basis_y.x, y: basis_y.y, z: basis_y.z };\n const vertices_copy = [];\n for (let i = 0; i < vertices.length; i++) {\n vertices_copy.push({\n x: vertices[i].x,\n y: vertices[i].y\n });\n }\n this.vertices = vertices_copy;\n const is_closed = vertices[0].x === vertices[vertices.length - 1].x && vertices[0].y === vertices[vertices.length - 1].y;\n const shape = [];\n shape.length = vertices.length;\n const tmp_x = vector3_pool.fetch();\n const tmp_y = vector3_pool.fetch();\n const axis_x = vector3_pool.fetch().copyFromFloats(basis_x.x, basis_x.y, basis_x.z);\n const axis_y = vector3_pool.fetch().copyFromFloats(basis_y.x, basis_y.y, basis_y.z);\n const axis_z = BABYLON_Vector3.CrossToRef(axis_y, axis_x, vector3_pool.fetch());\n // In-place normalize. No point for our z-vector to not be normalized.\n axis_z.normalize();\n this.basis_z = { x: axis_z.x, y: axis_z.y, z: axis_z.z };\n for (let i = 0; i < shape.length; i++) {\n shape[i] = new BABYLON_Vector3(vertices[i].x, vertices[i].y, 0);\n }\n // These are not vector-pooled because we don't know what Babylon does with the references, hence we create new vectors for all data we pipe to Babylon.\n const z_low = new BABYLON_Vector3(0, extent_low, 0);\n const z_high = new BABYLON_Vector3(0, extent_high, 0);\n this.mesh = BABYLON_MeshBuilder.ExtrudeShape('a', {\n shape: shape,\n path: [z_low, z_high],\n closeShape: !is_closed,\n sideOrientation: BABYLON_Mesh.BACKSIDE\n });\n const transform = matrix_pool.fetch();\n // Very funky and unintuitive transform to align it with our basis vectors and be right-handed.\n // Babylon must be doing some strange things in the ExtrudeShape function, but this is tested to work.\n transform.setRowFromFloats(0, -axis_y.x, -axis_y.y, -axis_y.z, 0.0);\n transform.setRowFromFloats(1, axis_z.x, axis_z.y, axis_z.z, 0.0);\n transform.setRowFromFloats(2, axis_x.x, axis_x.y, axis_x.z, 0.0);\n transform.setRowFromFloats(3, 0.0, 0.0, 0.0, 1.0);\n this.mesh.bakeTransformIntoVertices(transform);\n vector3_pool.return(tmp_x, tmp_y, axis_x, axis_y, axis_z);\n matrix_pool.return(transform);\n // This is how Babylon forcefully adds the mesh to our scene even when we don't give it a scene. So this is how we remove it as well.\n (_a = BABYLON_EngineStore.LastCreatedScene) === null || _a === void 0 ? void 0 : _a.removeMesh(this.mesh);\n }\n clone() {\n return new CutoutShape(this.vertices, this.basis_x, this.basis_y);\n }\n dispose() {\n this.mesh.dispose();\n }\n}\nexport class CutoutObject {\n constructor(viewer, source_object) {\n this._cached_cut_object_meshes_csg = null;\n // A queue to put cutout shapes that couldn't cut immediately as the object hadn't loaded yet.\n this._async_cut_queue = [];\n this._is_ready = false;\n if (source_object.is_empty) {\n throw new Error('Tried to create CutoutObject from empty source object!');\n }\n this._viewer = viewer;\n this._source_object = source_object;\n this._cut_object = this._viewer.viewer_scene.objects.get(this._viewer.clone_object(source_object.id));\n // For backwards-compatibility, we need to set the object to be enabled & misc,\n // as we've instructed people to disable their source objects and now we use clone for simplicity.\n // Previously we created new objects.\n this._cut_object.enabled = true;\n this._cut_object.visible = true;\n const original_ready = this._cut_object.ready;\n this._cut_object.ready = new Promise((resolve, reject) => {\n original_ready.then(() => {\n this._is_ready = true;\n this._reset();\n this.cut(this._async_cut_queue);\n this.clear_async_queue();\n resolve();\n });\n original_ready.catch(reject);\n });\n }\n /*\n This internal function is for us to be able to reset the cutout mesh on load,\n which happens after source object is ready, but before its is_loaded flag has been set\n */\n _reset() {\n var _a;\n if (!this._is_ready) {\n throw new Error(\"Cutout object _reset was called on a non-loaded object. This is an internal error and shouldn't happen\");\n }\n (_a = this._cut_object._asset_instance) === null || _a === void 0 ? void 0 : _a.instance_iterator((instance) => {\n instance.unload_unique_vertex_source_data();\n this._cut_object.recalculate_local_bounds();\n instance.metadata.custom_raycast_acceleration_structure = null;\n });\n this._cached_cut_object_meshes_csg = null;\n }\n reset() {\n if (!this._is_ready) {\n // Resetting before we have loaded is equivalent to just not cutting anything when we do load\n this.clear_async_queue();\n }\n else {\n this._reset();\n }\n }\n get_cut_object() {\n return this._cut_object.id;\n }\n cut(shapes) {\n var _a, _b, _c;\n if (!this._is_ready) {\n // If we haven't loaded, we put clones of the shapes on the queue\n for (let i = 0; i < shapes.length; i++) {\n this._async_cut_queue.push(shapes[i].clone());\n }\n return;\n }\n if (shapes.length === 0)\n return;\n const cut_meshes = [];\n const cut_instances = [];\n (_a = this._cut_object._asset_instance) === null || _a === void 0 ? void 0 : _a.instance_iterator((instance) => {\n const m = instance.load_unique_vertex_source_data();\n cut_meshes.push(m);\n cut_instances.push(instance.babylon_instance);\n });\n if (cut_meshes.length === 0) {\n throw new Error(\"Can't cut cutout object - the cutout object has no meshes\");\n }\n if (this._cached_cut_object_meshes_csg === null || this._cached_cut_object_meshes_csg.length !== cut_meshes.length) {\n // We don't have any cached CSGs for our cut object, so we need to load them\n this._cached_cut_object_meshes_csg = [];\n for (let i = 0; i < cut_meshes.length; i++) {\n const mesh = cut_meshes[i];\n cut_instances[i].getWorldMatrix().decomposeToTransformNode(mesh);\n const csg = BABYLON_CSG.FromMesh(mesh);\n // We need to inverse the CSG, as we use right-handedness and Babylon's CSG library is fixed to left-handedness.\n csg.inverseInPlace();\n this._cached_cut_object_meshes_csg.push(csg);\n }\n }\n const cutting_csgs = [];\n for (let i = 0; i < shapes.length; i++) {\n const cutting_mesh = shapes[i].mesh;\n cutting_mesh.position = this._cut_object.get_position();\n cutting_mesh.rotation = this._cut_object.get_rotation();\n cutting_mesh.scaling = this._cut_object.get_scale();\n const csg = BABYLON_CSG.FromMesh(cutting_mesh, true);\n // We need to inverse the CSG, as we use right-handedness and Babylon's CSG library is fixed to left-handedness.\n csg.inverseInPlace();\n cutting_csgs.push(csg);\n }\n for (let i = 0; i < cut_meshes.length; i++) {\n const world_matrix = cut_instances[i].getWorldMatrix();\n const mesh = cut_meshes[i];\n const source_csg = this._cached_cut_object_meshes_csg[i];\n for (let i = 0; i < cutting_csgs.length; i++) {\n source_csg.subtractInPlace(cutting_csgs[i]);\n }\n const new_mesh = source_csg.toMesh('aaaaaa', undefined, undefined, false);\n new_mesh.setIndices(new_mesh.getIndices(true, true).reverse());\n const vertex_data = BABYLON_VertexData.ExtractFromMesh(new_mesh);\n for (const kind of mesh.getVerticesDataKinds()) {\n mesh.removeVerticesData(kind);\n }\n if (((_b = vertex_data.positions) === null || _b === void 0 ? void 0 : _b.length) === 0) {\n return;\n }\n if (vertex_data.normals) {\n // Babylon doesn't play nice with CSG and transforms so we need to recalculate our normals back to local space\n // We also flip the sign of the normal, as we've reversed the indices (due to our right-handedness and Babylon's left-handedness)\n const wm = world_matrix.invertToRef(new BABYLON_Matrix());\n const tmp = new BABYLON_Vector3();\n const tmp2 = new BABYLON_Vector3();\n for (let i = 0; i < vertex_data.normals.length; i += 3) {\n tmp.x = -vertex_data.normals[i + 0];\n tmp.y = -vertex_data.normals[i + 1];\n tmp.z = -vertex_data.normals[i + 2];\n tmp.normalize();\n BABYLON_Vector3.TransformNormalToRef(tmp, wm, tmp2);\n vertex_data.normals[i + 0] = tmp2.x;\n vertex_data.normals[i + 1] = tmp2.y;\n vertex_data.normals[i + 2] = tmp2.z;\n }\n }\n if (vertex_data.tangents) {\n // Same as with our normals, we need to transform them back to local space.\n const wm = world_matrix.invertToRef(new BABYLON_Matrix());\n const tmp = new BABYLON_Vector3();\n const tmp2 = new BABYLON_Vector3();\n for (let i = 0; i < vertex_data.tangents.length; i += 4) {\n tmp.x = -vertex_data.tangents[i + 0];\n tmp.y = -vertex_data.tangents[i + 1];\n tmp.z = -vertex_data.tangents[i + 2];\n tmp.normalize();\n BABYLON_Vector3.TransformNormalToRef(tmp, wm, tmp2);\n vertex_data.tangents[i + 0] = tmp2.x;\n vertex_data.tangents[i + 1] = tmp2.y;\n vertex_data.tangents[i + 2] = tmp2.z;\n }\n }\n vertex_data.applyToMesh(mesh);\n new_mesh.dispose();\n }\n this._cut_object.recalculate_local_bounds();\n // Since raycasting is based on the original source mesh, we override it here with new data so that we can raycast through the hole\n (_c = this._cut_object._asset_instance) === null || _c === void 0 ? void 0 : _c.instance_iterator((instance) => {\n instance.metadata.custom_raycast_acceleration_structure = build_bvh_from_mesh(instance.babylon_instance);\n });\n this._viewer.mark_scene_dirty();\n }\n dispose(dispose_source_object, dispose_cut_object) {\n if (dispose_source_object && this._viewer.viewer_scene.objects.contains(this._source_object.id)) {\n this._viewer.delete_object(this._source_object.id);\n }\n if (dispose_cut_object && this._viewer.viewer_scene.objects.contains(this._cut_object.id)) {\n this._viewer.delete_object(this._cut_object.id);\n }\n this._cached_cut_object_meshes_csg = null;\n }\n // Disposes all elements in the async cut queue and empties the array\n clear_async_queue() {\n for (let i = 0; i < this._async_cut_queue.length; i++) {\n this._async_cut_queue[i].dispose();\n }\n this._async_cut_queue.length = 0;\n }\n}\n//# sourceMappingURL=CutoutObject.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/view_compositor.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'view_compositorPixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\nuniform highp sampler2D viewTexture;\nuniform vec2 viewPosition, viewSize;\nvoid main() {\nvec2 viewUv = (vUV - viewPosition) / viewSize;\nif (viewUv.x < 0.0 || viewUv.y < 0.0 || viewUv.x >= 1.0|| viewUv.y >= 1.0) {\ndiscard;\n}\ngl_FragColor = texture2D(viewTexture, viewUv);\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const view_compositorPixelShader = { name, shader };\n//# sourceMappingURL=view_compositor.fragment.js.map","import { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { PostProcess as BABYLON_PostProcess } from '@inter-ikea-betrakta-babylonjs/core/PostProcesses/postProcess.js';\nimport { Camera as BABYLON_Camera } from '@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js';\n// Side effect\nimport '../shaders/view_compositor.fragment.js';\nimport { IVector2 } from '../../api.js';\nconst VIEW_POSITION = 'viewPosition';\nconst VIEW_SIZE = 'viewSize';\nconst VIEW_TEXTURE = 'viewTexture';\n/**\n * This is a class to assist the Viewer with compositing Views and their outlines onto a framebuffer (in the Viewer's case, the canvas)\n * Future use might be to assist with rendering borders, drop shadows etc for the Views compositing.\n */\nexport class ViewCompositor {\n constructor(scene) {\n this._current_view = null;\n this._scene = scene;\n this._post_process_camera = new BABYLON_Camera('ViewCompositorPP', new BABYLON_Vector3(), this._scene);\n this._effect = new BABYLON_PostProcess('view_compositor', 'view_compositor', [\n VIEW_POSITION, VIEW_SIZE\n ], [\n VIEW_TEXTURE\n ], { width: 4, height: 4 }, this._post_process_camera);\n this._effect.onApply = (effect) => {\n const target_width = this._scene.getEngine().getRenderWidth();\n const target_height = this._scene.getEngine().getRenderHeight();\n effect.setTexture(VIEW_TEXTURE, this._current_view.postprocess_manager.get_destination_texture());\n const viewport = this._current_view.get_canvas_viewport();\n const normalized_width = viewport.width / target_width;\n const normalized_height = viewport.height / target_height;\n const normalized_x = viewport.x / target_width;\n const normalized_y = viewport.y / target_height;\n effect.setFloat2(VIEW_POSITION, normalized_x, 1.0 - normalized_y - normalized_height);\n effect.setFloat2(VIEW_SIZE, normalized_width, normalized_height);\n };\n }\n render(view, outlines) {\n const canvas_viewport = view.get_canvas_viewport();\n if ((canvas_viewport.x >= this._scene.getEngine().getRenderWidth() ||\n canvas_viewport.x + canvas_viewport.width <= 0) &&\n (canvas_viewport.y >= this._scene.getEngine().getRenderHeight() ||\n canvas_viewport.y + canvas_viewport.height <= 0)) {\n // Early out as we're outside the target viewport\n return;\n }\n this._current_view = view;\n // It may feel wasteful to have the \"doNotBindFramebuffer\" set to false, as we don't want to swap around any framebuffers.\n // However, we got some issues with Babylon applying the incorrect GL viewport otherwise.\n // It felt nicer to let Babylon to do its thing, rather than messing with the GL state directly (reapplying glViewport between every draw)\n this._scene.postProcessManager.directRender([this._effect], null, true, undefined, undefined, false);\n this._current_view = null;\n if (outlines !== null && view.outlines_enabled) {\n // Remove all jitter from the engine camera temporarily for the outlines rendering.\n // This is a temporary fix until we move outlines rendering onto views (and thus give them TAA)\n const jitter = view.engine_camera.get_jitter();\n view.engine_camera.set_jitter(new IVector2(0, 0));\n outlines.render_outline_ontop_of_main(view.engine_camera.camera, null, canvas_viewport.width, canvas_viewport.height, canvas_viewport.x, this._scene.getEngine().getRenderHeight() - canvas_viewport.height - canvas_viewport.y);\n view.engine_camera.set_jitter(jitter);\n }\n }\n}\n//# sourceMappingURL=ViewCompositor.js.map","import { clamp } from '../Math.js';\nimport { ViewerFramebufferType } from '../babylon/Framebuffer.js';\n// Flags to change emulated behaviour of different rounding events.\n// We use this to emulate behaviour found on the GPU, but the exact GPU behaviour is device-dependant and not easy to figure out.\n// Thus we have to settle for something here.\nconst FLOAT_DOWNCAST_TRUNCATE = true;\nconst FLOAT_NORMALIZATION_TRUNCATE = false;\n// Flag to change how we emulate F32 in Javascript. Setting this to true will truncate instead of round to F32, but it's also very slow.\nconst USE_MANTISSA_TRUNCATION_F64_F32_EMULATION = false;\nconst R11_G11_B10F_COMPONENT_MAX_ERROR = 3;\n// INTERNALS\n// DO NOT CHANGE, change the FLOAT_DOWNCAST_TRUNCATE flag instead.\nconst f11_f10_round_bit_mask = FLOAT_DOWNCAST_TRUNCATE ? 0b0 : 0b1;\n// ONLY CHANGE IF WE CHANGE IN THE RENDERING PIPELINE\nconst GAMMA = 2.2;\n// Helper function for this file to emulate f32 from out f64's in javascript.\n// Can use a more precise but *much* slower method, or a faster method.\n// The precise method should only be needed for verification in development.\nfunction double_truncater(x) {\n if (USE_MANTISSA_TRUNCATION_F64_F32_EMULATION) {\n return truncate_mantissa_f64_f32(x);\n }\n else {\n return Math.fround(x);\n }\n}\n// Converts a double to 2 unsigned integers that have the bit pattern of the double, split into two parts.\nfunction double_to_ieee(f) {\n const buffer = new ArrayBuffer(8);\n const f64_buffer = new Float64Array(buffer);\n const u32_buffer = new Uint32Array(buffer);\n f64_buffer[0] = f;\n return u32_buffer;\n}\n// The reverse of the above function. Takes 2 unsigned integers that together form the bit pattern of a double, and returns the double.\nfunction ieee_to_double(f) {\n const buffer = new ArrayBuffer(8);\n (new Uint32Array(buffer))[0] = f[0];\n (new Uint32Array(buffer))[1] = f[1];\n return new Float64Array(buffer)[0];\n}\n// Truncates the mantissa of the given f64 to be of f32 precision\n// Does not affect exponent\nfunction truncate_mantissa_f64_f32(x) {\n const ieee_f64 = double_to_ieee(x);\n ieee_f64[0] = (ieee_f64[0] >> 29) << 29;\n return ieee_to_double(ieee_f64);\n}\n// Converts an IEE-754 double (a javascript 'number') to the OpenGL's specification of a 10-bit unsigned floating point number, and then back to a double.\n// if add_step is defined, truncating will be used when converting, and add_step number of bits will be added to the float in its compressed format\nfunction convert_f64_f10(x, add_step) {\n if (x <= 0 || x >= 65024)\n return clamp(x, 0, 65024);\n x = Math.max(0.0, x);\n const ieee_f64 = double_to_ieee(x);\n const f64_bias = 1023;\n const f11_bias = 15;\n const exponent_f64 = ((ieee_f64[1] >> 20) & 0b11111111111) - f64_bias;\n if (exponent_f64 === -f64_bias || exponent_f64 + f11_bias < 0) {\n // Subnormal number, or otherwise will be truncated to zero in F11\n return 0.0;\n }\n let exponent_f10 = ((clamp(exponent_f64 + f11_bias, 0, 30)) & 0b11111) - f11_bias;\n let mantissa_f10 = (ieee_f64[1] >> 15) & 0b11111;\n const round_bit = add_step === undefined ? ((ieee_f64[1] >> 14) & f11_f10_round_bit_mask) : add_step;\n const combined = ((exponent_f10 << 5) | mantissa_f10) + round_bit;\n exponent_f10 = combined >> 5;\n mantissa_f10 = combined & 0b11111;\n const packed = new Uint32Array(2);\n packed[0] = 0;\n packed[1] = ((exponent_f10 + f64_bias) << 20) | (mantissa_f10 << 15);\n const f10_as_f64 = ieee_to_double(packed);\n return f10_as_f64;\n}\n// Converts an IEE-754 double (a javascript 'number') to the OpenGL's specification of a 11-bit unsigned floating point number, and then back to a double.\n// if add_step is defined, truncating will be used when converting, and add_step number of bits will be added to the float in its compressed format\nfunction convert_f64_f11(x, add_step) {\n if (x <= 0 || x >= 65024)\n return clamp(x, 0, 65024);\n x = Math.max(0.0, x);\n const ieee_f64 = double_to_ieee(x);\n const f64_bias = 1023;\n const f11_bias = 15;\n const exponent_f64 = ((ieee_f64[1] >> 20) & 0b11111111111) - f64_bias;\n if (exponent_f64 === -f64_bias || exponent_f64 + f11_bias < 0) {\n // Subnormal number, or otherwise will be truncated to zero in F11\n return 0.0;\n }\n let exponent_f11 = ((clamp(exponent_f64 + f11_bias, 0, 30)) & 0b11111) - f11_bias;\n let mantissa_f11 = (ieee_f64[1] >> 14) & 0b111111;\n const round_bit = add_step === undefined ? ((ieee_f64[1] >> 13) & f11_f10_round_bit_mask) : add_step;\n const combined = ((exponent_f11 << 6) | mantissa_f11) + round_bit;\n exponent_f11 = combined >> 6;\n mantissa_f11 = combined & 0b111111;\n const packed = new Uint32Array(2);\n packed[0] = 0;\n packed[1] = ((exponent_f11 + f64_bias) << 20) | (mantissa_f11 << 14);\n const f11_as_f64 = ieee_to_double(packed);\n return f11_as_f64;\n}\n// Color compression and utils\n// Clamps the color (0-1) and converts it to sRGB.\nfunction to_srgb_and_clamp(linear_color) {\n return saturate({\n x: Math.pow(linear_color.x, 1.0 / GAMMA),\n y: Math.pow(linear_color.y, 1.0 / GAMMA),\n z: Math.pow(linear_color.z, 1.0 / GAMMA)\n });\n}\n// A function to emulate storing data in a R11F_G11F_B10F format, which we can use in the Viewer.\nfunction compress_r11g11b10f(color) {\n return {\n x: convert_f64_f11(color.x),\n y: convert_f64_f11(color.y),\n z: convert_f64_f10(color.z)\n };\n}\n// Clamp values to 0 - 1\nfunction saturate(color) {\n return {\n x: Math.min(1.0, Math.max(0.0, color.x)),\n y: Math.min(1.0, Math.max(0.0, color.y)),\n z: Math.min(1.0, Math.max(0.0, color.z))\n };\n}\n// Compresses the input float color to integers between 0 - 255\nfunction compress_rgba8ui(color_float) {\n if (FLOAT_NORMALIZATION_TRUNCATE) {\n return {\n x: clamp(Math.floor(color_float.x * 255.0), 0, 255),\n y: clamp(Math.floor(color_float.y * 255.0), 0, 255),\n z: clamp(Math.floor(color_float.z * 255.0), 0, 255)\n };\n }\n else {\n return {\n x: clamp(Math.round(color_float.x * 255.0), 0, 255),\n y: clamp(Math.round(color_float.y * 255.0), 0, 255),\n z: clamp(Math.round(color_float.z * 255.0), 0, 255)\n };\n }\n}\n// Compressed the input float color to normalized U8 (0 - 1 with 256 steps accuracy)\nfunction compress_rgba8_unorm(color_float) {\n const rgba8 = compress_rgba8ui(color_float);\n return saturate({\n x: rgba8.x / 255.0,\n y: rgba8.y / 255.0,\n z: rgba8.z / 255.0\n });\n}\n// Utilities for tonemapper\nconst rrt_and_odt_fit_params = new Float32Array([\n 0.0245786, // k = 0\n -0.000090537, // m = 1\n 0.983729, // n = 2\n 0.4329510, // p = 3\n 0.238081 // q = 4\n]);\n// A function used in our actual tonemapper\nfunction rrt_and_odt_fit(v) {\n v = double_truncater(v);\n const a = double_truncater(double_truncater(v * double_truncater(v + rrt_and_odt_fit_params[0])) + rrt_and_odt_fit_params[1]);\n const b = double_truncater(double_truncater(v * double_truncater(double_truncater(rrt_and_odt_fit_params[2] * v) + rrt_and_odt_fit_params[3])) + rrt_and_odt_fit_params[4]);\n return double_truncater(a / b);\n}\n// A fitted inverse of the function above.\nfunction fitted_inverse_rrt_and_odt_fit(x) {\n if (x < 0.16436) {\n const k = 6.8;\n const m = 0.33;\n const t = 1.48;\n const n = 0.00038;\n const ath = Math.atanh(clamp((x + n) / k, -0.999, 0.999));\n return 1.0 / m * Math.pow(Math.max(0.0, ath), 1.0 / t);\n }\n else {\n const a = 1.0 / (0.49 * 3.14159265356);\n const b = 1.52;\n const c = 0.1152;\n return (Math.tan(Math.min(Math.PI * 0.49, x / a)) + c) / b;\n }\n}\n// A fitted inverse of our tonemapper, which is not accurate enough to be used for colors on its own.\nfunction fitted_inverse_tonemapper(linear_r, linear_g, linear_b) {\n // Inverse \"ACES output mat\"\n const odt_sat_r = linear_r * 0.643038 + linear_g * 0.311187 + linear_b * 0.0457755;\n const odt_sat_g = linear_r * 0.0592687 + linear_g * 0.931436 + linear_b * 0.00929492;\n const odt_sat_b = linear_r * 0.0059619 + linear_g * 0.063929 + linear_b * 0.930118;\n const tmp_r = fitted_inverse_rrt_and_odt_fit(odt_sat_r);\n const tmp_g = fitted_inverse_rrt_and_odt_fit(odt_sat_g);\n const tmp_b = fitted_inverse_rrt_and_odt_fit(odt_sat_b);\n // Inverse \"ACES input mat\"\n const srgb_r = tmp_r * 1.76474 + tmp_g * -0.675778 + tmp_b * -0.0889633;\n const srgb_g = tmp_r * -0.147028 + tmp_g * 1.16025 + tmp_b * -0.0132237;\n const srgb_b = tmp_r * -0.0363368 + tmp_g * -0.162436 + tmp_b * 1.19877;\n return {\n x: double_truncater(srgb_r),\n y: double_truncater(srgb_g),\n z: double_truncater(srgb_b)\n };\n}\n/**\n * A function which performs our tonemapper for a given linear HDR color value, on CPU.\n * @param linear_r The red channel (linear, HDR)\n * @param linear_g The green channel (linear, HDR)\n * @param linear_b The blue channel (linear, HDR)\n * @returns The tonemapped color in linear space\n */\nexport function tonemapper(linear_r, linear_g, linear_b) {\n linear_r = double_truncater(linear_r);\n linear_g = double_truncater(linear_g);\n linear_b = double_truncater(linear_b);\n const aces_input = new Float32Array([\n 0.59719, 0.07600, 0.02840,\n 0.35458, 0.90834, 0.13383,\n 0.04823, 0.01566, 0.83777\n ]);\n const rrt_sat_r = double_truncater(double_truncater(double_truncater(linear_r * aces_input[0]) + double_truncater(linear_g * aces_input[3])) +\n double_truncater(linear_b * aces_input[6]));\n const rrt_sat_g = double_truncater(double_truncater(double_truncater(linear_r * aces_input[1]) + double_truncater(linear_g * aces_input[4])) +\n double_truncater(linear_b * aces_input[7]));\n const rrt_sat_b = double_truncater(double_truncater(double_truncater(linear_r * aces_input[2]) + double_truncater(linear_g * aces_input[5])) +\n double_truncater(linear_b * aces_input[8]));\n const fit_r = rrt_and_odt_fit(rrt_sat_r);\n const fit_g = rrt_and_odt_fit(rrt_sat_g);\n const fit_b = rrt_and_odt_fit(rrt_sat_b);\n const aces_output = new Float32Array([\n 1.60475, -0.10208, -0.00327,\n -0.53108, 1.10813, -0.07276,\n -0.07367, -0.00605, 1.07602\n ]);\n const srgb_r = double_truncater(double_truncater(double_truncater(fit_r * aces_output[0]) + double_truncater(fit_g * aces_output[3])) +\n double_truncater(fit_b * aces_output[6]));\n const srgb_g = double_truncater(double_truncater(double_truncater(fit_r * aces_output[1]) + double_truncater(fit_g * aces_output[4])) +\n double_truncater(fit_b * aces_output[7]));\n const srgb_b = double_truncater(double_truncater(double_truncater(fit_r * aces_output[2]) + double_truncater(fit_g * aces_output[5])) +\n double_truncater(fit_b * aces_output[8]));\n return {\n x: Math.max(0.0, srgb_r),\n y: Math.max(0.0, srgb_g),\n z: Math.max(0.0, srgb_b)\n };\n}\n/**\n * This function emulates the reverse process of HDR rendering in the Viewer,\n * i.e. the steps of rendering to the HDR (low-precision) framebuffer -> tonemap -> gamma conversion -> output to RGB8 framebuffer.\n * This is useful for things like background color, which is set in HDR space, but we want a certain RGB8 color in the output (to match things like browser UI).\n * So then you can take the inverse of the background color with this function, and apply that to the HDR framebuffer, and then get back the same, or almost the same, color to your canvas.\n * NOTE: This function does not take camera exposure into account, so that needs to be taken into consideration if applied.\n *\n * This operation is not super-precise, but as close as we can get with our limited bit-depth in our framebuffer (R11F_G11F_B10F).\n * We also limit this operation for reproducing RGB8 colors, i.e. not higher precision inputs.\n * For R,G,B in the range 0-255, you can expect the majority of colors to match, but certain colors will mismatch by at most 1/255, mostly in the blue channel due to its lower precision.\n *\n * This function assumes a few things about the Viewer's framebuffer stack:\n * - We use the simple gamma->linear conversion when tonemapping (happens in the accumulator), meaning that USE_EXACT_SRGB_CONVERSIONS is NOT defined in Babylon for that shader.\n * - We use a R11G11B10F (R11F_G11F_B10F) framebuffer (the low precision of this format requires us to take it into account when reversing)\n * @param r The red color channel (range: 0 to 1), in sRGB space\n * @param g The green color channel (range: 0 to 1), in sRGB space\n * @param b The blue color channel (range: 0 to 1), in sRGB space\n * @returns The linear HDR color which will resolve to approximately the input colors after the Viewer's HDR rendering pipeline.\n */\nexport function get_fitted_inverse_tonemap(framebuffer_type, r, g, b, enable_verbose_warnings) {\n const linear_r = Math.pow(r, GAMMA);\n const linear_g = Math.pow(g, GAMMA);\n const linear_b = Math.pow(b, GAMMA);\n // Start off with a guess from the fitted inverse tonemapper\n const guess = fitted_inverse_tonemapper(linear_r, linear_g, linear_b);\n const goal = compress_rgba8_unorm({ x: r, y: g, z: b });\n // Perform gradient descent until we find our goal in sRGB8\n // step size and iteration count were found by trial and error\n const step = 0.2;\n const iteration_count = 16384;\n for (let i = 0; i < iteration_count; i++) {\n guess.x = Math.min(guess.x, 65000.0);\n guess.y = Math.min(guess.y, 65000.0);\n guess.z = Math.min(guess.z, 65000.0);\n const tonemapped = tonemapper(guess.x, guess.y, guess.z);\n const srgba_compressed = compress_rgba8_unorm(to_srgb_and_clamp(tonemapper(guess.x, guess.y, guess.z)));\n if (srgba_compressed.x === goal.x && srgba_compressed.y === goal.y && srgba_compressed.z === goal.z) {\n // Early out if we've met our goal\n break;\n }\n // Calculate derivative dt/dx where t = tonemapper\n const dx = 0.01;\n const dt_dx = {\n x: (tonemapper(guess.x + dx, guess.y, guess.z).x - tonemapped.x) / dx,\n y: (tonemapper(guess.x, guess.y + dx, guess.z).y - tonemapped.y) / dx,\n z: (tonemapper(guess.x, guess.y, guess.z + dx).z - tonemapped.z) / dx\n };\n guess.x += step * (linear_r - tonemapped.x) * dt_dx.x;\n guess.y += step * (linear_g - tonemapped.y) * dt_dx.y;\n guess.z += step * (linear_b - tonemapped.z) * dt_dx.z;\n }\n if (framebuffer_type === ViewerFramebufferType.R11_G11_B10F) {\n const compressed_guess = compress_r11g11b10f(guess);\n /**\n * For the case or R11_G11_B10F, we need to take special considerations.\n * First of all, this section of code works, but needs some more tweaking when time allows.\n * Second, some quirks about R11_G11_B10F and our tonemapper needs to be established:\n *\n * * R11_G11_B10F is a great format, but has precision issues with a very small mantissa.\n * This means after doing reverse tonemapping, we might not actually be able to represent that value in R11_G11_B10F,\n * meaning the resulting color might be a few bits off for that reason. But it can be much more off, covered in later points.\n *\n * * We can't easily tell on the CPU side (this side) if we can represent a color fully accurately or not. We can however tell if we are\n * more than 1-2 bits off. The reason we can't tell precisely is because two precision demotion operations we use on the GPU can either\n * be done with rounding or truncating, decided by the physical device or driver.\n * 1. For float32 => float11 and float32 => float10, see section 2.1.3 and 2.1.4 (respectively) in the OpenGL ES 3.0.6 specification.\n * 2. For float? => normalized fixed-point (such as with RGBA8), see section 2.1.6.2 in the OpenGL ES 3.0.6 specification.\n * Both these sections describe that the implementation may decide to round or truncate for both conversions.\n * Thus, we can't tell with full precision in RGBA8 if the inverse tonemapped color we calculate will produce the exact value requested.\n * For testing purposes, at the top of this file you will find FLOAT_DOWNCAST_TRUNCATE and FLOAT_NORMALIZATION_TRUNCATE\n * where you can choose to use rounding or truncating mode for float downcasts and float to normalized fixed point conversion, respectively.\n *\n * * Our tonemapper is ran in a different color space, meaning that changing the red channel in the input affects red, green and blue output.\n * (This is what allows it to lower saturation in hotspots, which is a very nice look).\n *\n * * This means, in order to achieve certain colors after tonemapping, we might actually need negative input values.\n * One such example is cyan (0, 255, 255). Since G,B channels are so strong after the inverse tonemapper, they will \"spill over\"\n * into the red channel which we want to result in 0, thus we need negative values for R. It would be a similar case for (255, 0, 255), etc.\n * HOWEVER, 11 and 10-bit floats in the OpenGL standard do not have a sign bit and thus do not support negative values,\n * making colors such as (0, 255, 255) after inverse tonemapping IMPOSSIBLE to store in our framebuffer.\n *\n * But now, to get the best result with R11_G11_B10F, we emulate our postprocessing pipeline which includes a number of conversion steps (between different framebuffers).\n * We then use that evaluated result to try to nudge the result in R11_G11_B10F space, one bit by one, to get us closer to our wanted result.\n * This step is not fully accurate, and we can never make it fully accurate, as we don't know the device's FLOAT_DOWNCAST_TRUNCATE & FLOAT_NORMALIZATION_TRUNCATE\n * modes on the GPU, so we can't match our own flags to it. But it's better than nothing.\n */\n // Number of steps needs tweaking\n for (let i = 0; i < 256; i++) {\n const compressed_tonemapped = tonemapper(compressed_guess.x, compressed_guess.y, compressed_guess.z);\n const clamped = compress_rgba8_unorm(to_srgb_and_clamp(compressed_tonemapped));\n // If we're equal, we can break.\n // We can check for equality only because 'clamped' and 'guess' are both compressed through compress_rgba8 which rounds.\n if (clamped.x === goal.x && clamped.y === goal.y && clamped.z === goal.z) {\n break;\n }\n // Nudge components, bit by bit, to try to achieve the most accurate representation.\n if (clamped.x < goal.x) {\n compressed_guess.x = convert_f64_f11(compressed_guess.x, 1);\n }\n else if (clamped.x > goal.x) {\n compressed_guess.x = convert_f64_f11(compressed_guess.x, -1);\n }\n if (clamped.y < goal.y) {\n compressed_guess.y = convert_f64_f11(compressed_guess.y, 1);\n }\n else if (clamped.y > goal.y) {\n compressed_guess.y = convert_f64_f11(compressed_guess.y, -1);\n }\n if (clamped.z < goal.z) {\n compressed_guess.z = convert_f64_f10(compressed_guess.z, 1);\n }\n else if (clamped.z > goal.z) {\n compressed_guess.z = convert_f64_f10(compressed_guess.z, -1);\n }\n }\n if (enable_verbose_warnings) {\n /**\n * Due to aforementioned lack of reach for certain colors, we need to warn in case the user will a very incorrect color.\n * To do this, we simulate the pipeline used in Views when rendering, which goes as follows:\n * 1. apply color (what we're calculating) in shader or clear color [R11_G11_B10F] =>\n * 2. TONEMAP and accumulate into RGBA8 (Accumulator) =>\n * 3. post TONEMAPPED result back into R11_G11_B10F (View's framebuffer) for temporary storage until View composition\n * 4. composite view's framebuffer back into RGBA8\n * IMPORTANT NOTE:\n * - Screenshots actually have another flow as they're not composited: they only go through steps 1 & 2.\n * And yes, this affects the result. The additional RGBA8 (tonemapped) => R11_G11_B10F => RGBA8 steps for normal View make a difference.\n * Since the last 2 steps only affect the colors in tonemapped space, the effect will be very small and considered neglible here,\n * and thus we only simulate step 1 and 2 to verify we get the approximately correct tonemapped color.\n */\n const tonemapped_r11_g11_b10f = tonemapper(compressed_guess.x, compressed_guess.y, compressed_guess.z);\n const tonemapped_srgb8ui = compress_rgba8ui(to_srgb_and_clamp(tonemapped_r11_g11_b10f));\n const goal_srgb8ui = compress_rgba8ui({ x: r, y: g, z: b });\n // If the error of any component is greater than the treshold, we warn the user.\n if (Math.abs(tonemapped_srgb8ui.x - goal_srgb8ui.x) > R11_G11_B10F_COMPONENT_MAX_ERROR ||\n Math.abs(tonemapped_srgb8ui.y - goal_srgb8ui.y) > R11_G11_B10F_COMPONENT_MAX_ERROR ||\n Math.abs(tonemapped_srgb8ui.z - goal_srgb8ui.z) > R11_G11_B10F_COMPONENT_MAX_ERROR) {\n console.warn(`Viewer: The color you requested is not accurately representable with the Viewer's framebuffer configuration.\n Please try another color if perfect accuracy is required. High saturation colors are usually problematic, due to the R11_G11_B10F texture format used.\n Requested color: ${goal_srgb8ui.x}, ${goal_srgb8ui.y}, ${goal_srgb8ui.z} (exact)\n Resulting color: ${tonemapped_srgb8ui.x}, ${tonemapped_srgb8ui.y}, ${tonemapped_srgb8ui.z} (estimation)`);\n }\n }\n return {\n x: compressed_guess.x,\n y: compressed_guess.y,\n z: compressed_guess.z\n };\n }\n else {\n if (framebuffer_type === ViewerFramebufferType.RGBA16F) {\n // Clamp our guess to the maximum value supported by F16\n guess.x = Math.min(guess.x, 65000.0);\n guess.y = Math.min(guess.y, 65000.0);\n guess.z = Math.min(guess.z, 65000.0);\n }\n // For other formats, we consider that we don't need compression compensation\n return {\n x: guess.x,\n y: guess.y,\n z: guess.z\n };\n }\n}\n//# sourceMappingURL=InverseTonemapper.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/naming-convention */\nif (typeof WebGL2RenderingContext === 'undefined') {\n const target = typeof window !== 'undefined' ? window : global;\n // @ts-ignore\n target.WebGL2RenderingContext = {\n READ_BUFFER: 0x0C02,\n UNPACK_ROW_LENGTH: 0x0CF2,\n UNPACK_SKIP_ROWS: 0x0CF3,\n UNPACK_SKIP_PIXELS: 0x0CF4,\n PACK_ROW_LENGTH: 0x0D02,\n PACK_SKIP_ROWS: 0x0D03,\n PACK_SKIP_PIXELS: 0x0D04,\n COLOR: 0x1800,\n DEPTH: 0x1801,\n STENCIL: 0x1802,\n RED: 0x1903,\n RGB8: 0x8051,\n RGBA8: 0x8058,\n RGB10_A2: 0x8059,\n TEXTURE_BINDING_3D: 0x806A,\n UNPACK_SKIP_IMAGES: 0x806D,\n UNPACK_IMAGE_HEIGHT: 0x806E,\n TEXTURE_3D: 0x806F,\n TEXTURE_WRAP_R: 0x8072,\n MAX_3D_TEXTURE_SIZE: 0x8073,\n UNSIGNED_INT_2_10_10_10_REV: 0x8368,\n MAX_ELEMENTS_VERTICES: 0x80E8,\n MAX_ELEMENTS_INDICES: 0x80E9,\n TEXTURE_MIN_LOD: 0x813A,\n TEXTURE_MAX_LOD: 0x813B,\n TEXTURE_BASE_LEVEL: 0x813C,\n TEXTURE_MAX_LEVEL: 0x813D,\n MIN: 0x8007,\n MAX: 0x8008,\n DEPTH_COMPONENT24: 0x81A6,\n MAX_TEXTURE_LOD_BIAS: 0x84FD,\n TEXTURE_COMPARE_MODE: 0x884C,\n TEXTURE_COMPARE_FUNC: 0x884D,\n CURRENT_QUERY: 0x8865,\n QUERY_RESULT: 0x8866,\n QUERY_RESULT_AVAILABLE: 0x8867,\n STREAM_READ: 0x88E1,\n STREAM_COPY: 0x88E2,\n STATIC_READ: 0x88E5,\n STATIC_COPY: 0x88E6,\n DYNAMIC_READ: 0x88E9,\n DYNAMIC_COPY: 0x88EA,\n MAX_DRAW_BUFFERS: 0x8824,\n DRAW_BUFFER0: 0x8825,\n DRAW_BUFFER1: 0x8826,\n DRAW_BUFFER2: 0x8827,\n DRAW_BUFFER3: 0x8828,\n DRAW_BUFFER4: 0x8829,\n DRAW_BUFFER5: 0x882A,\n DRAW_BUFFER6: 0x882B,\n DRAW_BUFFER7: 0x882C,\n DRAW_BUFFER8: 0x882D,\n DRAW_BUFFER9: 0x882E,\n DRAW_BUFFER10: 0x882F,\n DRAW_BUFFER11: 0x8830,\n DRAW_BUFFER12: 0x8831,\n DRAW_BUFFER13: 0x8832,\n DRAW_BUFFER14: 0x8833,\n DRAW_BUFFER15: 0x8834,\n MAX_FRAGMENT_UNIFORM_COMPONENTS: 0x8B49,\n MAX_VERTEX_UNIFORM_COMPONENTS: 0x8B4A,\n SAMPLER_3D: 0x8B5F,\n SAMPLER_2D_SHADOW: 0x8B62,\n FRAGMENT_SHADER_DERIVATIVE_HINT: 0x8B8B,\n PIXEL_PACK_BUFFER: 0x88EB,\n PIXEL_UNPACK_BUFFER: 0x88EC,\n PIXEL_PACK_BUFFER_BINDING: 0x88ED,\n PIXEL_UNPACK_BUFFER_BINDING: 0x88EF,\n FLOAT_MAT2x3: 0x8B65,\n FLOAT_MAT2x4: 0x8B66,\n FLOAT_MAT3x2: 0x8B67,\n FLOAT_MAT3x4: 0x8B68,\n FLOAT_MAT4x2: 0x8B69,\n FLOAT_MAT4x3: 0x8B6A,\n SRGB: 0x8C40,\n SRGB8: 0x8C41,\n SRGB8_ALPHA8: 0x8C43,\n COMPARE_REF_TO_TEXTURE: 0x884E,\n RGBA32F: 0x8814,\n RGB32F: 0x8815,\n RGBA16F: 0x881A,\n RGB16F: 0x881B,\n VERTEX_ATTRIB_ARRAY_INTEGER: 0x88FD,\n MAX_ARRAY_TEXTURE_LAYERS: 0x88FF,\n MIN_PROGRAM_TEXEL_OFFSET: 0x8904,\n MAX_PROGRAM_TEXEL_OFFSET: 0x8905,\n MAX_VARYING_COMPONENTS: 0x8B4B,\n TEXTURE_2D_ARRAY: 0x8C1A,\n TEXTURE_BINDING_2D_ARRAY: 0x8C1D,\n R11F_G11F_B10F: 0x8C3A,\n UNSIGNED_INT_10F_11F_11F_REV: 0x8C3B,\n RGB9_E5: 0x8C3D,\n UNSIGNED_INT_5_9_9_9_REV: 0x8C3E,\n TRANSFORM_FEEDBACK_BUFFER_MODE: 0x8C7F,\n MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 0x8C80,\n TRANSFORM_FEEDBACK_VARYINGS: 0x8C83,\n TRANSFORM_FEEDBACK_BUFFER_START: 0x8C84,\n TRANSFORM_FEEDBACK_BUFFER_SIZE: 0x8C85,\n TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: 0x8C88,\n RASTERIZER_DISCARD: 0x8C89,\n MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 0x8C8A,\n MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 0x8C8B,\n INTERLEAVED_ATTRIBS: 0x8C8C,\n SEPARATE_ATTRIBS: 0x8C8D,\n TRANSFORM_FEEDBACK_BUFFER: 0x8C8E,\n TRANSFORM_FEEDBACK_BUFFER_BINDING: 0x8C8F,\n RGBA32UI: 0x8D70,\n RGB32UI: 0x8D71,\n RGBA16UI: 0x8D76,\n RGB16UI: 0x8D77,\n RGBA8UI: 0x8D7C,\n RGB8UI: 0x8D7D,\n RGBA32I: 0x8D82,\n RGB32I: 0x8D83,\n RGBA16I: 0x8D88,\n RGB16I: 0x8D89,\n RGBA8I: 0x8D8E,\n RGB8I: 0x8D8F,\n RED_INTEGER: 0x8D94,\n RGB_INTEGER: 0x8D98,\n RGBA_INTEGER: 0x8D99,\n SAMPLER_2D_ARRAY: 0x8DC1,\n SAMPLER_2D_ARRAY_SHADOW: 0x8DC4,\n SAMPLER_CUBE_SHADOW: 0x8DC5,\n UNSIGNED_INT_VEC2: 0x8DC6,\n UNSIGNED_INT_VEC3: 0x8DC7,\n UNSIGNED_INT_VEC4: 0x8DC8,\n INT_SAMPLER_2D: 0x8DCA,\n INT_SAMPLER_3D: 0x8DCB,\n INT_SAMPLER_CUBE: 0x8DCC,\n INT_SAMPLER_2D_ARRAY: 0x8DCF,\n UNSIGNED_INT_SAMPLER_2D: 0x8DD2,\n UNSIGNED_INT_SAMPLER_3D: 0x8DD3,\n UNSIGNED_INT_SAMPLER_CUBE: 0x8DD4,\n UNSIGNED_INT_SAMPLER_2D_ARRAY: 0x8DD7,\n DEPTH_COMPONENT32F: 0x8CAC,\n DEPTH32F_STENCIL8: 0x8CAD,\n FLOAT_32_UNSIGNED_INT_24_8_REV: 0x8DAD,\n FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: 0x8210,\n FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: 0x8211,\n FRAMEBUFFER_ATTACHMENT_RED_SIZE: 0x8212,\n FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: 0x8213,\n FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: 0x8214,\n FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: 0x8215,\n FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: 0x8216,\n FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: 0x8217,\n FRAMEBUFFER_DEFAULT: 0x8218,\n UNSIGNED_INT_24_8: 0x84FA,\n DEPTH24_STENCIL8: 0x88F0,\n UNSIGNED_NORMALIZED: 0x8C17,\n DRAW_FRAMEBUFFER_BINDING: 0x8CA6,\n READ_FRAMEBUFFER: 0x8CA8,\n DRAW_FRAMEBUFFER: 0x8CA9,\n READ_FRAMEBUFFER_BINDING: 0x8CAA,\n RENDERBUFFER_SAMPLES: 0x8CAB,\n FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: 0x8CD4,\n MAX_COLOR_ATTACHMENTS: 0x8CDF,\n COLOR_ATTACHMENT1: 0x8CE1,\n COLOR_ATTACHMENT2: 0x8CE2,\n COLOR_ATTACHMENT3: 0x8CE3,\n COLOR_ATTACHMENT4: 0x8CE4,\n COLOR_ATTACHMENT5: 0x8CE5,\n COLOR_ATTACHMENT6: 0x8CE6,\n COLOR_ATTACHMENT7: 0x8CE7,\n COLOR_ATTACHMENT8: 0x8CE8,\n COLOR_ATTACHMENT9: 0x8CE9,\n COLOR_ATTACHMENT10: 0x8CEA,\n COLOR_ATTACHMENT11: 0x8CEB,\n COLOR_ATTACHMENT12: 0x8CEC,\n COLOR_ATTACHMENT13: 0x8CED,\n COLOR_ATTACHMENT14: 0x8CEE,\n COLOR_ATTACHMENT15: 0x8CEF,\n FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: 0x8D56,\n MAX_SAMPLES: 0x8D57,\n HALF_FLOAT: 0x140B,\n RG: 0x8227,\n RG_INTEGER: 0x8228,\n R8: 0x8229,\n RG8: 0x822B,\n R16F: 0x822D,\n R32F: 0x822E,\n RG16F: 0x822F,\n RG32F: 0x8230,\n R8I: 0x8231,\n R8UI: 0x8232,\n R16I: 0x8233,\n R16UI: 0x8234,\n R32I: 0x8235,\n R32UI: 0x8236,\n RG8I: 0x8237,\n RG8UI: 0x8238,\n RG16I: 0x8239,\n RG16UI: 0x823A,\n RG32I: 0x823B,\n RG32UI: 0x823C,\n VERTEX_ARRAY_BINDING: 0x85B5,\n R8_SNORM: 0x8F94,\n RG8_SNORM: 0x8F95,\n RGB8_SNORM: 0x8F96,\n RGBA8_SNORM: 0x8F97,\n SIGNED_NORMALIZED: 0x8F9C,\n COPY_READ_BUFFER: 0x8F36,\n COPY_WRITE_BUFFER: 0x8F37,\n COPY_READ_BUFFER_BINDING: 0x8F36,\n COPY_WRITE_BUFFER_BINDING: 0x8F37,\n UNIFORM_BUFFER: 0x8A11,\n UNIFORM_BUFFER_BINDING: 0x8A28,\n UNIFORM_BUFFER_START: 0x8A29,\n UNIFORM_BUFFER_SIZE: 0x8A2A,\n MAX_VERTEX_UNIFORM_BLOCKS: 0x8A2B,\n MAX_FRAGMENT_UNIFORM_BLOCKS: 0x8A2D,\n MAX_COMBINED_UNIFORM_BLOCKS: 0x8A2E,\n MAX_UNIFORM_BUFFER_BINDINGS: 0x8A2F,\n MAX_UNIFORM_BLOCK_SIZE: 0x8A30,\n MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 0x8A31,\n MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 0x8A33,\n UNIFORM_BUFFER_OFFSET_ALIGNMENT: 0x8A34,\n ACTIVE_UNIFORM_BLOCKS: 0x8A36,\n UNIFORM_TYPE: 0x8A37,\n UNIFORM_SIZE: 0x8A38,\n UNIFORM_BLOCK_INDEX: 0x8A3A,\n UNIFORM_OFFSET: 0x8A3B,\n UNIFORM_ARRAY_STRIDE: 0x8A3C,\n UNIFORM_MATRIX_STRIDE: 0x8A3D,\n UNIFORM_IS_ROW_MAJOR: 0x8A3E,\n UNIFORM_BLOCK_BINDING: 0x8A3F,\n UNIFORM_BLOCK_DATA_SIZE: 0x8A40,\n UNIFORM_BLOCK_ACTIVE_UNIFORMS: 0x8A42,\n UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: 0x8A43,\n UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: 0x8A44,\n UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: 0x8A46,\n INVALID_INDEX: 0xFFFFFFFF,\n MAX_VERTEX_OUTPUT_COMPONENTS: 0x9122,\n MAX_FRAGMENT_INPUT_COMPONENTS: 0x9125,\n MAX_SERVER_WAIT_TIMEOUT: 0x9111,\n OBJECT_TYPE: 0x9112,\n SYNC_CONDITION: 0x9113,\n SYNC_STATUS: 0x9114,\n SYNC_FLAGS: 0x9115,\n SYNC_FENCE: 0x9116,\n SYNC_GPU_COMMANDS_COMPLETE: 0x9117,\n UNSIGNALED: 0x9118,\n SIGNALED: 0x9119,\n ALREADY_SIGNALED: 0x911A,\n TIMEOUT_EXPIRED: 0x911B,\n CONDITION_SATISFIED: 0x911C,\n WAIT_FAILED: 0x911D,\n SYNC_FLUSH_COMMANDS_BIT: 0x00000001,\n VERTEX_ATTRIB_ARRAY_DIVISOR: 0x88FE,\n ANY_SAMPLES_PASSED: 0x8C2F,\n ANY_SAMPLES_PASSED_CONSERVATIVE: 0x8D6A,\n SAMPLER_BINDING: 0x8919,\n RGB10_A2UI: 0x906F,\n INT_2_10_10_10_REV: 0x8D9F,\n TRANSFORM_FEEDBACK: 0x8E22,\n TRANSFORM_FEEDBACK_PAUSED: 0x8E23,\n TRANSFORM_FEEDBACK_ACTIVE: 0x8E24,\n TRANSFORM_FEEDBACK_BINDING: 0x8E25,\n TEXTURE_IMMUTABLE_FORMAT: 0x912F,\n MAX_ELEMENT_INDEX: 0x8D6B,\n TEXTURE_IMMUTABLE_LEVELS: 0x82DF,\n TIMEOUT_IGNORED: -1,\n MAX_CLIENT_WAIT_TIMEOUT_WEBGL: 0x9247,\n DEPTH_BUFFER_BIT: 0x00000100,\n STENCIL_BUFFER_BIT: 0x00000400,\n COLOR_BUFFER_BIT: 0x00004000,\n POINTS: 0x0000,\n LINES: 0x0001,\n LINE_LOOP: 0x0002,\n LINE_STRIP: 0x0003,\n TRIANGLES: 0x0004,\n TRIANGLE_STRIP: 0x0005,\n TRIANGLE_FAN: 0x0006,\n ZERO: 0,\n ONE: 1,\n SRC_COLOR: 0x0300,\n ONE_MINUS_SRC_COLOR: 0x0301,\n SRC_ALPHA: 0x0302,\n ONE_MINUS_SRC_ALPHA: 0x0303,\n DST_ALPHA: 0x0304,\n ONE_MINUS_DST_ALPHA: 0x0305,\n DST_COLOR: 0x0306,\n ONE_MINUS_DST_COLOR: 0x0307,\n SRC_ALPHA_SATURATE: 0x0308,\n FUNC_ADD: 0x8006,\n BLEND_EQUATION: 0x8009,\n BLEND_EQUATION_RGB: 0x8009,\n BLEND_EQUATION_ALPHA: 0x883D,\n FUNC_SUBTRACT: 0x800A,\n FUNC_REVERSE_SUBTRACT: 0x800B,\n BLEND_DST_RGB: 0x80C8,\n BLEND_SRC_RGB: 0x80C9,\n BLEND_DST_ALPHA: 0x80CA,\n BLEND_SRC_ALPHA: 0x80CB,\n CONSTANT_COLOR: 0x8001,\n ONE_MINUS_CONSTANT_COLOR: 0x8002,\n CONSTANT_ALPHA: 0x8003,\n ONE_MINUS_CONSTANT_ALPHA: 0x8004,\n BLEND_COLOR: 0x8005,\n ARRAY_BUFFER: 0x8892,\n ELEMENT_ARRAY_BUFFER: 0x8893,\n ARRAY_BUFFER_BINDING: 0x8894,\n ELEMENT_ARRAY_BUFFER_BINDING: 0x8895,\n STREAM_DRAW: 0x88E0,\n STATIC_DRAW: 0x88E4,\n DYNAMIC_DRAW: 0x88E8,\n BUFFER_SIZE: 0x8764,\n BUFFER_USAGE: 0x8765,\n CURRENT_VERTEX_ATTRIB: 0x8626,\n FRONT: 0x0404,\n BACK: 0x0405,\n FRONT_AND_BACK: 0x0408,\n CULL_FACE: 0x0B44,\n BLEND: 0x0BE2,\n DITHER: 0x0BD0,\n STENCIL_TEST: 0x0B90,\n DEPTH_TEST: 0x0B71,\n SCISSOR_TEST: 0x0C11,\n POLYGON_OFFSET_FILL: 0x8037,\n SAMPLE_ALPHA_TO_COVERAGE: 0x809E,\n SAMPLE_COVERAGE: 0x80A0,\n NO_ERROR: 0,\n INVALID_ENUM: 0x0500,\n INVALID_VALUE: 0x0501,\n INVALID_OPERATION: 0x0502,\n OUT_OF_MEMORY: 0x0505,\n CW: 0x0900,\n CCW: 0x0901,\n LINE_WIDTH: 0x0B21,\n ALIASED_POINT_SIZE_RANGE: 0x846D,\n ALIASED_LINE_WIDTH_RANGE: 0x846E,\n CULL_FACE_MODE: 0x0B45,\n FRONT_FACE: 0x0B46,\n DEPTH_RANGE: 0x0B70,\n DEPTH_WRITEMASK: 0x0B72,\n DEPTH_CLEAR_VALUE: 0x0B73,\n DEPTH_FUNC: 0x0B74,\n STENCIL_CLEAR_VALUE: 0x0B91,\n STENCIL_FUNC: 0x0B92,\n STENCIL_FAIL: 0x0B94,\n STENCIL_PASS_DEPTH_FAIL: 0x0B95,\n STENCIL_PASS_DEPTH_PASS: 0x0B96,\n STENCIL_REF: 0x0B97,\n STENCIL_VALUE_MASK: 0x0B93,\n STENCIL_WRITEMASK: 0x0B98,\n STENCIL_BACK_FUNC: 0x8800,\n STENCIL_BACK_FAIL: 0x8801,\n STENCIL_BACK_PASS_DEPTH_FAIL: 0x8802,\n STENCIL_BACK_PASS_DEPTH_PASS: 0x8803,\n STENCIL_BACK_REF: 0x8CA3,\n STENCIL_BACK_VALUE_MASK: 0x8CA4,\n STENCIL_BACK_WRITEMASK: 0x8CA5,\n VIEWPORT: 0x0BA2,\n SCISSOR_BOX: 0x0C10,\n COLOR_CLEAR_VALUE: 0x0C22,\n COLOR_WRITEMASK: 0x0C23,\n UNPACK_ALIGNMENT: 0x0CF5,\n PACK_ALIGNMENT: 0x0D05,\n MAX_TEXTURE_SIZE: 0x0D33,\n MAX_VIEWPORT_DIMS: 0x0D3A,\n SUBPIXEL_BITS: 0x0D50,\n RED_BITS: 0x0D52,\n GREEN_BITS: 0x0D53,\n BLUE_BITS: 0x0D54,\n ALPHA_BITS: 0x0D55,\n DEPTH_BITS: 0x0D56,\n STENCIL_BITS: 0x0D57,\n POLYGON_OFFSET_UNITS: 0x2A00,\n POLYGON_OFFSET_FACTOR: 0x8038,\n TEXTURE_BINDING_2D: 0x8069,\n SAMPLE_BUFFERS: 0x80A8,\n SAMPLES: 0x80A9,\n SAMPLE_COVERAGE_VALUE: 0x80AA,\n SAMPLE_COVERAGE_INVERT: 0x80AB,\n COMPRESSED_TEXTURE_FORMATS: 0x86A3,\n DONT_CARE: 0x1100,\n FASTEST: 0x1101,\n NICEST: 0x1102,\n GENERATE_MIPMAP_HINT: 0x8192,\n BYTE: 0x1400,\n UNSIGNED_BYTE: 0x1401,\n SHORT: 0x1402,\n UNSIGNED_SHORT: 0x1403,\n INT: 0x1404,\n UNSIGNED_INT: 0x1405,\n FLOAT: 0x1406,\n DEPTH_COMPONENT: 0x1902,\n ALPHA: 0x1906,\n RGB: 0x1907,\n RGBA: 0x1908,\n LUMINANCE: 0x1909,\n LUMINANCE_ALPHA: 0x190A,\n UNSIGNED_SHORT_4_4_4_4: 0x8033,\n UNSIGNED_SHORT_5_5_5_1: 0x8034,\n UNSIGNED_SHORT_5_6_5: 0x8363,\n FRAGMENT_SHADER: 0x8B30,\n VERTEX_SHADER: 0x8B31,\n MAX_VERTEX_ATTRIBS: 0x8869,\n MAX_VERTEX_UNIFORM_VECTORS: 0x8DFB,\n MAX_VARYING_VECTORS: 0x8DFC,\n MAX_COMBINED_TEXTURE_IMAGE_UNITS: 0x8B4D,\n MAX_VERTEX_TEXTURE_IMAGE_UNITS: 0x8B4C,\n MAX_TEXTURE_IMAGE_UNITS: 0x8872,\n MAX_FRAGMENT_UNIFORM_VECTORS: 0x8DFD,\n SHADER_TYPE: 0x8B4F,\n DELETE_STATUS: 0x8B80,\n LINK_STATUS: 0x8B82,\n VALIDATE_STATUS: 0x8B83,\n ATTACHED_SHADERS: 0x8B85,\n ACTIVE_UNIFORMS: 0x8B86,\n ACTIVE_ATTRIBUTES: 0x8B89,\n SHADING_LANGUAGE_VERSION: 0x8B8C,\n CURRENT_PROGRAM: 0x8B8D,\n NEVER: 0x0200,\n LESS: 0x0201,\n EQUAL: 0x0202,\n LEQUAL: 0x0203,\n GREATER: 0x0204,\n NOTEQUAL: 0x0205,\n GEQUAL: 0x0206,\n ALWAYS: 0x0207,\n KEEP: 0x1E00,\n REPLACE: 0x1E01,\n INCR: 0x1E02,\n DECR: 0x1E03,\n INVERT: 0x150A,\n INCR_WRAP: 0x8507,\n DECR_WRAP: 0x8508,\n VENDOR: 0x1F00,\n RENDERER: 0x1F01,\n VERSION: 0x1F02,\n NEAREST: 0x2600,\n LINEAR: 0x2601,\n NEAREST_MIPMAP_NEAREST: 0x2700,\n LINEAR_MIPMAP_NEAREST: 0x2701,\n NEAREST_MIPMAP_LINEAR: 0x2702,\n LINEAR_MIPMAP_LINEAR: 0x2703,\n TEXTURE_MAG_FILTER: 0x2800,\n TEXTURE_MIN_FILTER: 0x2801,\n TEXTURE_WRAP_S: 0x2802,\n TEXTURE_WRAP_T: 0x2803,\n TEXTURE_2D: 0x0DE1,\n TEXTURE: 0x1702,\n TEXTURE_CUBE_MAP: 0x8513,\n TEXTURE_BINDING_CUBE_MAP: 0x8514,\n TEXTURE_CUBE_MAP_POSITIVE_X: 0x8515,\n TEXTURE_CUBE_MAP_NEGATIVE_X: 0x8516,\n TEXTURE_CUBE_MAP_POSITIVE_Y: 0x8517,\n TEXTURE_CUBE_MAP_NEGATIVE_Y: 0x8518,\n TEXTURE_CUBE_MAP_POSITIVE_Z: 0x8519,\n TEXTURE_CUBE_MAP_NEGATIVE_Z: 0x851A,\n MAX_CUBE_MAP_TEXTURE_SIZE: 0x851C,\n TEXTURE0: 0x84C0,\n TEXTURE1: 0x84C1,\n TEXTURE2: 0x84C2,\n TEXTURE3: 0x84C3,\n TEXTURE4: 0x84C4,\n TEXTURE5: 0x84C5,\n TEXTURE6: 0x84C6,\n TEXTURE7: 0x84C7,\n TEXTURE8: 0x84C8,\n TEXTURE9: 0x84C9,\n TEXTURE10: 0x84CA,\n TEXTURE11: 0x84CB,\n TEXTURE12: 0x84CC,\n TEXTURE13: 0x84CD,\n TEXTURE14: 0x84CE,\n TEXTURE15: 0x84CF,\n TEXTURE16: 0x84D0,\n TEXTURE17: 0x84D1,\n TEXTURE18: 0x84D2,\n TEXTURE19: 0x84D3,\n TEXTURE20: 0x84D4,\n TEXTURE21: 0x84D5,\n TEXTURE22: 0x84D6,\n TEXTURE23: 0x84D7,\n TEXTURE24: 0x84D8,\n TEXTURE25: 0x84D9,\n TEXTURE26: 0x84DA,\n TEXTURE27: 0x84DB,\n TEXTURE28: 0x84DC,\n TEXTURE29: 0x84DD,\n TEXTURE30: 0x84DE,\n TEXTURE31: 0x84DF,\n ACTIVE_TEXTURE: 0x84E0,\n REPEAT: 0x2901,\n CLAMP_TO_EDGE: 0x812F,\n MIRRORED_REPEAT: 0x8370,\n FLOAT_VEC2: 0x8B50,\n FLOAT_VEC3: 0x8B51,\n FLOAT_VEC4: 0x8B52,\n INT_VEC2: 0x8B53,\n INT_VEC3: 0x8B54,\n INT_VEC4: 0x8B55,\n BOOL: 0x8B56,\n BOOL_VEC2: 0x8B57,\n BOOL_VEC3: 0x8B58,\n BOOL_VEC4: 0x8B59,\n FLOAT_MAT2: 0x8B5A,\n FLOAT_MAT3: 0x8B5B,\n FLOAT_MAT4: 0x8B5C,\n SAMPLER_2D: 0x8B5E,\n SAMPLER_CUBE: 0x8B60,\n VERTEX_ATTRIB_ARRAY_ENABLED: 0x8622,\n VERTEX_ATTRIB_ARRAY_SIZE: 0x8623,\n VERTEX_ATTRIB_ARRAY_STRIDE: 0x8624,\n VERTEX_ATTRIB_ARRAY_TYPE: 0x8625,\n VERTEX_ATTRIB_ARRAY_NORMALIZED: 0x886A,\n VERTEX_ATTRIB_ARRAY_POINTER: 0x8645,\n VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 0x889F,\n IMPLEMENTATION_COLOR_READ_TYPE: 0x8B9A,\n IMPLEMENTATION_COLOR_READ_FORMAT: 0x8B9B,\n COMPILE_STATUS: 0x8B81,\n LOW_FLOAT: 0x8DF0,\n MEDIUM_FLOAT: 0x8DF1,\n HIGH_FLOAT: 0x8DF2,\n LOW_INT: 0x8DF3,\n MEDIUM_INT: 0x8DF4,\n HIGH_INT: 0x8DF5,\n FRAMEBUFFER: 0x8D40,\n RENDERBUFFER: 0x8D41,\n RGBA4: 0x8056,\n RGB5_A1: 0x8057,\n RGB565: 0x8D62,\n DEPTH_COMPONENT16: 0x81A5,\n STENCIL_INDEX8: 0x8D48,\n DEPTH_STENCIL: 0x84F9,\n RENDERBUFFER_WIDTH: 0x8D42,\n RENDERBUFFER_HEIGHT: 0x8D43,\n RENDERBUFFER_INTERNAL_FORMAT: 0x8D44,\n RENDERBUFFER_RED_SIZE: 0x8D50,\n RENDERBUFFER_GREEN_SIZE: 0x8D51,\n RENDERBUFFER_BLUE_SIZE: 0x8D52,\n RENDERBUFFER_ALPHA_SIZE: 0x8D53,\n RENDERBUFFER_DEPTH_SIZE: 0x8D54,\n RENDERBUFFER_STENCIL_SIZE: 0x8D55,\n FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 0x8CD0,\n FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 0x8CD1,\n FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 0x8CD2,\n FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 0x8CD3,\n COLOR_ATTACHMENT0: 0x8CE0,\n DEPTH_ATTACHMENT: 0x8D00,\n STENCIL_ATTACHMENT: 0x8D20,\n DEPTH_STENCIL_ATTACHMENT: 0x821A,\n NONE: 0,\n FRAMEBUFFER_COMPLETE: 0x8CD5,\n FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 0x8CD6,\n FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 0x8CD7,\n FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 0x8CD9,\n FRAMEBUFFER_UNSUPPORTED: 0x8CDD,\n FRAMEBUFFER_BINDING: 0x8CA6,\n RENDERBUFFER_BINDING: 0x8CA7,\n MAX_RENDERBUFFER_SIZE: 0x84E8,\n INVALID_FRAMEBUFFER_OPERATION: 0x0506,\n UNPACK_FLIP_Y_WEBGL: 0x9240,\n UNPACK_PREMULTIPLY_ALPHA_WEBGL: 0x9241,\n CONTEXT_LOST_WEBGL: 0x9242,\n UNPACK_COLORSPACE_CONVERSION_WEBGL: 0x9243,\n BROWSER_DEFAULT_WEBGL: 0x9244\n };\n}\n//# sourceMappingURL=WebGLPolyfill.js.map","import { assert } from './utility/Assert.js';\nimport './utility/WebGLPolyfill.js';\nconst webgl_capabilites_mock_zero = {\n MAX_TEXTURE_IMAGE_UNITS: 0,\n MAX_COMBINED_TEXTURE_IMAGE_UNITS: 0,\n MAX_VERTEX_TEXTURE_IMAGE_UNITS: 0,\n MAX_TEXTURE_SIZE: 0,\n MAX_SAMPLES: 0,\n MAX_CUBE_MAP_TEXTURE_SIZE: 0,\n MAX_RENDERBUFFER_SIZE: 0,\n MAX_VERTEX_ATTRIBS: 0,\n MAX_VARYING_VECTORS: 0,\n MAX_FRAGMENT_UNIFORM_VECTORS: 0,\n MAX_VERTEX_UNIFORM_VECTORS: 0,\n MAX_ARRAY_TEXTURE_LAYERS: 0,\n MAX_3D_TEXTURE_SIZE: 0,\n MAX_CLIENT_WAIT_TIMEOUT_WEBGL: 0,\n MAX_COLOR_ATTACHMENTS: 0,\n MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 0,\n MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 0,\n MAX_COMBINED_UNIFORM_BLOCKS: 0,\n MAX_DRAW_BUFFERS: 0,\n MAX_ELEMENT_INDEX: 0,\n MAX_ELEMENTS_INDICES: 0,\n MAX_ELEMENTS_VERTICES: 0,\n MAX_FRAGMENT_INPUT_COMPONENTS: 0,\n MAX_FRAGMENT_UNIFORM_BLOCKS: 0,\n MAX_FRAGMENT_UNIFORM_COMPONENTS: 0,\n MAX_PROGRAM_TEXEL_OFFSET: 0,\n MAX_SERVER_WAIT_TIMEOUT: 0,\n MAX_TEXTURE_LOD_BIAS: 0,\n MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 0,\n MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 0,\n MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 0,\n MAX_UNIFORM_BLOCK_SIZE: 0,\n MAX_UNIFORM_BUFFER_BINDINGS: 0,\n MAX_VARYING_COMPONENTS: 0,\n MAX_VERTEX_OUTPUT_COMPONENTS: 0,\n MAX_VERTEX_UNIFORM_BLOCKS: 0,\n MAX_VERTEX_UNIFORM_COMPONENTS: 0,\n MIN_PROGRAM_TEXEL_OFFSET: 0,\n UNIFORM_BUFFER_OFFSET_ALIGNMENT: 0,\n VERSION: '',\n VENDOR: '',\n RENDERER: '',\n IMPLEMENTATION_COLOR_READ_FORMAT: 0,\n IMPLEMENTATION_COLOR_READ_TYPE: 0,\n ALIASED_LINE_WIDTH_RANGE: new Float32Array([0, 0]), // size = 2\n ALIASED_POINT_SIZE_RANGE: new Float32Array([0, 0]), // size = 2\n RED_BITS: 0,\n GREEN_BITS: 0,\n BLUE_BITS: 0,\n ALPHA_BITS: 0,\n DEPTH_BITS: 0,\n STENCIL_BITS: 0,\n MAX_VIEWPORT_DIMS: new Int32Array([0, 0]), // size = 2\n SHADING_LANGUAGE_VERSION: '',\n SUBPIXEL_BITS: 0\n};\nexport function get_current_capability_parameters(gl) {\n const caps = Object.assign({}, webgl_capabilites_mock_zero);\n for (const k in caps) {\n const v = gl.getParameter(gl[k]);\n if (typeof v !== typeof caps[k]) {\n console.error('Error! Mismatching types: ' + k);\n }\n caps[k] = v;\n }\n return caps;\n}\nexport const webgl2_capabilities_mac_m2_chrome = {\n MAX_TEXTURE_IMAGE_UNITS: 16,\n MAX_COMBINED_TEXTURE_IMAGE_UNITS: 32,\n MAX_VERTEX_TEXTURE_IMAGE_UNITS: 16,\n MAX_TEXTURE_SIZE: 16384,\n MAX_SAMPLES: 4,\n MAX_CUBE_MAP_TEXTURE_SIZE: 16384,\n MAX_RENDERBUFFER_SIZE: 16384,\n MAX_VERTEX_ATTRIBS: 16,\n MAX_VARYING_VECTORS: 30,\n MAX_FRAGMENT_UNIFORM_VECTORS: 1024,\n MAX_VERTEX_UNIFORM_VECTORS: 1024,\n MAX_ARRAY_TEXTURE_LAYERS: 2048,\n MAX_3D_TEXTURE_SIZE: 2048,\n MAX_CLIENT_WAIT_TIMEOUT_WEBGL: 0,\n MAX_COLOR_ATTACHMENTS: 8,\n MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 53248,\n MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 53248,\n MAX_COMBINED_UNIFORM_BLOCKS: 24,\n MAX_DRAW_BUFFERS: 8,\n MAX_ELEMENT_INDEX: 4294967294,\n MAX_ELEMENTS_INDICES: 2147483647,\n MAX_ELEMENTS_VERTICES: 2147483647,\n MAX_FRAGMENT_INPUT_COMPONENTS: 120,\n MAX_FRAGMENT_UNIFORM_BLOCKS: 12,\n MAX_FRAGMENT_UNIFORM_COMPONENTS: 4096,\n MAX_PROGRAM_TEXEL_OFFSET: 7,\n MAX_SERVER_WAIT_TIMEOUT: 0,\n MAX_TEXTURE_LOD_BIAS: 15,\n MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 128,\n MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 4,\n MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 4,\n MAX_UNIFORM_BLOCK_SIZE: 16384,\n MAX_UNIFORM_BUFFER_BINDINGS: 24,\n MAX_VARYING_COMPONENTS: 120,\n MAX_VERTEX_OUTPUT_COMPONENTS: 120,\n MAX_VERTEX_UNIFORM_BLOCKS: 12,\n MAX_VERTEX_UNIFORM_COMPONENTS: 4096,\n MIN_PROGRAM_TEXEL_OFFSET: -8,\n UNIFORM_BUFFER_OFFSET_ALIGNMENT: 16,\n VERSION: 'WebGL 2.0 (OpenGL ES 3.0 Chromium)',\n VENDOR: 'WebKit',\n RENDERER: 'WebKit WebGL',\n IMPLEMENTATION_COLOR_READ_FORMAT: 6408,\n IMPLEMENTATION_COLOR_READ_TYPE: 5121,\n ALIASED_LINE_WIDTH_RANGE: new Float32Array([1, 1]),\n ALIASED_POINT_SIZE_RANGE: new Float32Array([1, 511]),\n RED_BITS: 8,\n GREEN_BITS: 8,\n BLUE_BITS: 8,\n ALPHA_BITS: 8,\n DEPTH_BITS: 24,\n STENCIL_BITS: 0,\n MAX_VIEWPORT_DIMS: new Int32Array([16384, 16384]),\n SHADING_LANGUAGE_VERSION: 'WebGL GLSL ES 3.00 (OpenGL ES GLSL ES 3.0 Chromium)',\n SUBPIXEL_BITS: 4\n};\nconst webgl_state_mock_zero = {\n ACTIVE_TEXTURE: 0,\n ARRAY_BUFFER_BINDING: null,\n BLEND: false,\n BLEND_COLOR: new Float32Array([0, 0, 0, 0]), // size = 4\n BLEND_DST_ALPHA: 0,\n BLEND_DST_RGB: 0,\n BLEND_EQUATION: 0,\n BLEND_EQUATION_ALPHA: 0,\n BLEND_EQUATION_RGB: 0,\n BLEND_SRC_ALPHA: 0,\n BLEND_SRC_RGB: 0,\n COLOR_CLEAR_VALUE: new Float32Array([0, 0, 0, 0]), // size = 4\n COLOR_WRITEMASK: [false, false, false, false], // size = 4\n CULL_FACE: false,\n CULL_FACE_MODE: 0,\n CURRENT_PROGRAM: null,\n DEPTH_CLEAR_VALUE: 0,\n DEPTH_FUNC: 0,\n DEPTH_RANGE: new Float32Array([0, 0]), // size = 2\n DEPTH_TEST: false,\n DEPTH_WRITEMASK: false,\n DITHER: false,\n ELEMENT_ARRAY_BUFFER_BINDING: null,\n FRAMEBUFFER_BINDING: null,\n FRONT_FACE: 0,\n GENERATE_MIPMAP_HINT: 0,\n LINE_WIDTH: 0,\n PACK_ALIGNMENT: 0,\n POLYGON_OFFSET_FACTOR: 0,\n POLYGON_OFFSET_FILL: false,\n POLYGON_OFFSET_UNITS: 0,\n RENDERBUFFER_BINDING: null,\n SAMPLE_BUFFERS: 0,\n SAMPLE_COVERAGE_INVERT: false,\n SAMPLE_COVERAGE_VALUE: 0,\n SAMPLES: 0,\n SCISSOR_BOX: new Int32Array([0, 0, 0, 0]), // size = 4\n SCISSOR_TEST: false,\n STENCIL_BACK_FAIL: 0,\n STENCIL_BACK_FUNC: 0,\n STENCIL_BACK_PASS_DEPTH_FAIL: 0,\n STENCIL_BACK_PASS_DEPTH_PASS: 0,\n STENCIL_BACK_REF: 0,\n STENCIL_BACK_VALUE_MASK: 0,\n STENCIL_BACK_WRITEMASK: 0,\n STENCIL_CLEAR_VALUE: 0,\n STENCIL_FAIL: 0,\n STENCIL_FUNC: 0,\n STENCIL_PASS_DEPTH_FAIL: 0,\n STENCIL_PASS_DEPTH_PASS: 0,\n STENCIL_REF: 0,\n STENCIL_TEST: false,\n STENCIL_VALUE_MASK: 0,\n STENCIL_WRITEMASK: 0,\n TEXTURE_BINDING_2D: null,\n TEXTURE_BINDING_CUBE_MAP: null,\n UNPACK_ALIGNMENT: 0,\n UNPACK_COLORSPACE_CONVERSION_WEBGL: 0,\n UNPACK_FLIP_Y_WEBGL: false,\n UNPACK_PREMULTIPLY_ALPHA_WEBGL: false,\n VIEWPORT: new Int32Array([0, 0, 0, 0]), // size = 4\n // WebGL2\n COPY_READ_BUFFER_BINDING: null,\n COPY_WRITE_BUFFER_BINDING: null,\n DRAW_BUFFER0: 0,\n DRAW_BUFFER1: 0,\n DRAW_BUFFER2: 0,\n DRAW_BUFFER3: 0,\n DRAW_BUFFER4: 0,\n DRAW_BUFFER5: 0,\n DRAW_BUFFER6: 0,\n DRAW_BUFFER7: 0,\n DRAW_BUFFER8: 0,\n DRAW_BUFFER9: 0,\n DRAW_BUFFER10: 0,\n DRAW_BUFFER11: 0,\n DRAW_BUFFER12: 0,\n DRAW_BUFFER13: 0,\n DRAW_BUFFER14: 0,\n DRAW_BUFFER15: 0,\n DRAW_FRAMEBUFFER_BINDING: null,\n FRAGMENT_SHADER_DERIVATIVE_HINT: 0,\n PACK_ROW_LENGTH: 0,\n PACK_SKIP_PIXELS: 0,\n PACK_SKIP_ROWS: 0,\n PIXEL_PACK_BUFFER_BINDING: null,\n PIXEL_UNPACK_BUFFER_BINDING: null,\n RASTERIZER_DISCARD: false,\n READ_BUFFER: 0,\n READ_FRAMEBUFFER_BINDING: null,\n SAMPLE_ALPHA_TO_COVERAGE: false,\n SAMPLE_COVERAGE: false,\n SAMPLER_BINDING: null,\n TEXTURE_BINDING_2D_ARRAY: null,\n TEXTURE_BINDING_3D: null,\n TRANSFORM_FEEDBACK_ACTIVE: false,\n TRANSFORM_FEEDBACK_BINDING: null,\n TRANSFORM_FEEDBACK_BUFFER_BINDING: null,\n TRANSFORM_FEEDBACK_PAUSED: false,\n UNIFORM_BUFFER_BINDING: null,\n UNIFORM_BUFFER_OFFSET_ALIGNMENT: 0,\n UNPACK_IMAGE_HEIGHT: 0,\n UNPACK_ROW_LENGTH: 0,\n UNPACK_SKIP_IMAGES: 0,\n UNPACK_SKIP_PIXELS: 0,\n UNPACK_SKIP_ROWS: 0,\n VERTEX_ARRAY_BINDING: null\n};\nexport function get_current_context_state(gl) {\n const state = Object.assign({}, webgl_state_mock_zero);\n for (const k in state) {\n const v = gl.getParameter(gl[k]);\n if (typeof v !== typeof state[k]) {\n console.error('Error! Mismatching types: ' + k + '\\n\\tGiven: ' + v + '(' + (typeof v) + ')' + '\\n\\tExpecting: ' + typeof state[k]);\n }\n state[k] = v;\n }\n return state;\n}\nexport function create_default_context_state(caps, viewport) {\n const state = {\n ACTIVE_TEXTURE: 33984,\n ARRAY_BUFFER_BINDING: null,\n BLEND: false,\n BLEND_COLOR: new Float32Array([0, 0, 0, 0]),\n BLEND_DST_ALPHA: 0,\n BLEND_DST_RGB: 0,\n BLEND_EQUATION: 32774,\n BLEND_EQUATION_ALPHA: 32774,\n BLEND_EQUATION_RGB: 32774,\n BLEND_SRC_ALPHA: 1,\n BLEND_SRC_RGB: 1,\n COLOR_CLEAR_VALUE: new Float32Array([0, 0, 0, 0]),\n COLOR_WRITEMASK: [\n true,\n true,\n true,\n true\n ],\n CULL_FACE: false,\n CULL_FACE_MODE: 1029,\n CURRENT_PROGRAM: null,\n DEPTH_CLEAR_VALUE: 1,\n DEPTH_FUNC: 513,\n DEPTH_RANGE: new Float32Array([0, 1]),\n DEPTH_TEST: false,\n DEPTH_WRITEMASK: true,\n DITHER: true,\n ELEMENT_ARRAY_BUFFER_BINDING: null,\n FRAMEBUFFER_BINDING: null,\n FRONT_FACE: 2305,\n GENERATE_MIPMAP_HINT: 4352,\n LINE_WIDTH: 1,\n PACK_ALIGNMENT: 4,\n POLYGON_OFFSET_FACTOR: 0,\n POLYGON_OFFSET_FILL: false,\n POLYGON_OFFSET_UNITS: 0,\n RENDERBUFFER_BINDING: null,\n SAMPLE_BUFFERS: 1,\n SAMPLE_COVERAGE_INVERT: false,\n SAMPLE_COVERAGE_VALUE: 1,\n SAMPLES: 4,\n SCISSOR_BOX: new Int32Array([viewport.x, viewport.y, viewport.width, viewport.height]),\n SCISSOR_TEST: false,\n STENCIL_BACK_FAIL: 7680,\n STENCIL_BACK_FUNC: 519,\n STENCIL_BACK_PASS_DEPTH_FAIL: 7680,\n STENCIL_BACK_PASS_DEPTH_PASS: 7680,\n STENCIL_BACK_REF: 0,\n STENCIL_BACK_VALUE_MASK: 2147483647,\n STENCIL_BACK_WRITEMASK: 2147483647,\n STENCIL_CLEAR_VALUE: 0,\n STENCIL_FAIL: 7680,\n STENCIL_FUNC: 519,\n STENCIL_PASS_DEPTH_FAIL: 7680,\n STENCIL_PASS_DEPTH_PASS: 7680,\n STENCIL_REF: 0,\n STENCIL_TEST: false,\n STENCIL_VALUE_MASK: 2147483647,\n STENCIL_WRITEMASK: 2147483647,\n TEXTURE_BINDING_2D: null,\n TEXTURE_BINDING_CUBE_MAP: null,\n UNPACK_ALIGNMENT: 4,\n UNPACK_COLORSPACE_CONVERSION_WEBGL: 37444,\n UNPACK_FLIP_Y_WEBGL: false,\n UNPACK_PREMULTIPLY_ALPHA_WEBGL: false,\n VIEWPORT: new Int32Array([viewport.x, viewport.y, viewport.width, viewport.height]),\n COPY_READ_BUFFER_BINDING: null,\n COPY_WRITE_BUFFER_BINDING: null,\n DRAW_BUFFER0: 1029,\n DRAW_BUFFER1: 1029,\n DRAW_BUFFER2: 1029,\n DRAW_BUFFER3: 1029,\n DRAW_BUFFER4: 1029,\n DRAW_BUFFER5: 1029,\n DRAW_BUFFER6: 1029,\n DRAW_BUFFER7: 1029,\n DRAW_BUFFER8: 1029,\n DRAW_BUFFER9: 1029,\n DRAW_BUFFER10: 1029,\n DRAW_BUFFER11: 1029,\n DRAW_BUFFER12: 1029,\n DRAW_BUFFER13: 1029,\n DRAW_BUFFER14: 1029,\n DRAW_BUFFER15: 1029,\n DRAW_FRAMEBUFFER_BINDING: null,\n FRAGMENT_SHADER_DERIVATIVE_HINT: 4352,\n PACK_ROW_LENGTH: 0,\n PACK_SKIP_PIXELS: 0,\n PACK_SKIP_ROWS: 0,\n PIXEL_PACK_BUFFER_BINDING: null,\n PIXEL_UNPACK_BUFFER_BINDING: null,\n RASTERIZER_DISCARD: false,\n READ_BUFFER: 1029,\n READ_FRAMEBUFFER_BINDING: null,\n SAMPLE_ALPHA_TO_COVERAGE: false,\n SAMPLE_COVERAGE: false,\n SAMPLER_BINDING: null,\n TEXTURE_BINDING_2D_ARRAY: null,\n TEXTURE_BINDING_3D: null,\n TRANSFORM_FEEDBACK_ACTIVE: false,\n TRANSFORM_FEEDBACK_BINDING: null,\n TRANSFORM_FEEDBACK_BUFFER_BINDING: null,\n TRANSFORM_FEEDBACK_PAUSED: false,\n UNIFORM_BUFFER_BINDING: null,\n UNIFORM_BUFFER_OFFSET_ALIGNMENT: 16,\n UNPACK_IMAGE_HEIGHT: 0,\n UNPACK_ROW_LENGTH: 0,\n UNPACK_SKIP_IMAGES: 0,\n UNPACK_SKIP_PIXELS: 0,\n UNPACK_SKIP_ROWS: 0,\n VERTEX_ARRAY_BINDING: null\n };\n // Fields of DRAW_BUFFFERi are capabilities-dependent\n for (let i = caps.MAX_DRAW_BUFFERS; i < 16; i++) {\n const field = 'DRAW_BUFFER' + i.toString();\n state[field] = null;\n }\n return state;\n}\n/**\n * This class is meant to mock WebGL2.\n * It can optionally forward the calls to an actual WebGL2 context by assigning the 'passthrough' member, to make sure the implementation works as it should.\n * Use case is for testing, where we don't have a drawing surface and thus can't create a real WebGL2 context.\n *\n * Future: Add verification/testing that the state is correct:\n * - Textures:\n * - createTexture\n * - deleteTexture\n * - bindTexture\n * - upload functions\n * - get functions\n * - Buffers:\n * - createBuffer\n * - deleteBuffer\n * - bufferData\n * - bufferSubData\n * - Framebuffers:\n * - createFramebuffer\n * - deleteFramebuffer\n * - checkFramebufferStatus\n * - bindFramebuffer\n * - attachment functions\n * - Renderbuffers:\n * - createRenderbuffer\n * - deleteRenderbuffer\n * - bindRenderbuffer\n * - attachment functions\n */\nexport class WebGL2Mock {\n create_state_reverse_lookup_map() {\n const map = new Map();\n for (const k in this.state) {\n if (k in this) {\n if (typeof (this[k]) !== 'number') {\n console.error('Incorrect type for enum for state field: ' + k);\n }\n else {\n map.set(this[k], k);\n }\n }\n else {\n console.error('Missing enum for state field: ' + k);\n }\n }\n return map;\n }\n create_capabilities_reverse_lookup_map() {\n const map = new Map();\n for (const k in this.capabilities) {\n if (k in this) {\n if (typeof (this[k]) !== 'number') {\n console.error('Incorrect type for enum for state field: ' + k);\n }\n else {\n map.set(this[k], k);\n }\n }\n else {\n console.error('Missing enum for state field: ' + k);\n }\n }\n return map;\n }\n get drawingBufferWidth() {\n return this.passthrough === null ? this.fake_drawing_buffer_width : this.passthrough.drawingBufferWidth;\n }\n get drawingBufferHeight() {\n return this.passthrough === null ? this.fake_drawing_buffer_height : this.passthrough.drawingBufferHeight;\n }\n get drawingBufferColorSpace() {\n return this.passthrough === null ? this.fake_drawing_buffer_color_space : this.passthrough.drawingBufferColorSpace;\n }\n makeXRCompatible() {\n var _a;\n if (this.passthrough === null) {\n return Promise.resolve();\n }\n else {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.makeXRCompatible();\n }\n }\n // Any draw call should call this function to fill any active queries with fake data\n fake_query_data_for_draw(index_count) {\n if (this.current_query_any_samples_passed !== null) {\n this.queries.get(this.current_query_any_samples_passed).value += Math.random() * 100.0 * index_count;\n }\n if (this.current_query_any_samples_passed_conservative !== null) {\n this.queries.get(this.current_query_any_samples_passed_conservative).value += Math.random() * 100.0 * index_count;\n }\n if (this.state.TRANSFORM_FEEDBACK_ACTIVE && !this.state.TRANSFORM_FEEDBACK_PAUSED) {\n if (this.current_query_transform_feedback_primitives_written !== null) {\n this.queries.get(this.current_query_transform_feedback_primitives_written).value += index_count * 3;\n }\n }\n }\n constructor(canvas, width, height, capabilities, context_attributes) {\n this.DEPTH_BUFFER_BIT = 256;\n this.STENCIL_BUFFER_BIT = 1024;\n this.COLOR_BUFFER_BIT = 16384;\n this.POINTS = 0;\n this.LINES = 1;\n this.LINE_LOOP = 2;\n this.LINE_STRIP = 3;\n this.TRIANGLES = 4;\n this.TRIANGLE_STRIP = 5;\n this.TRIANGLE_FAN = 6;\n this.ZERO = 0;\n this.ONE = 1;\n this.SRC_COLOR = 768;\n this.ONE_MINUS_SRC_COLOR = 769;\n this.SRC_ALPHA = 770;\n this.ONE_MINUS_SRC_ALPHA = 771;\n this.DST_ALPHA = 772;\n this.ONE_MINUS_DST_ALPHA = 773;\n this.DST_COLOR = 774;\n this.ONE_MINUS_DST_COLOR = 775;\n this.SRC_ALPHA_SATURATE = 776;\n this.FUNC_ADD = 32774;\n this.BLEND_EQUATION = 32777;\n this.BLEND_EQUATION_RGB = 32777;\n this.BLEND_EQUATION_ALPHA = 34877;\n this.FUNC_SUBTRACT = 32778;\n this.FUNC_REVERSE_SUBTRACT = 32779;\n this.BLEND_DST_RGB = 32968;\n this.BLEND_SRC_RGB = 32969;\n this.BLEND_DST_ALPHA = 32970;\n this.BLEND_SRC_ALPHA = 32971;\n this.CONSTANT_COLOR = 32769;\n this.ONE_MINUS_CONSTANT_COLOR = 32770;\n this.CONSTANT_ALPHA = 32771;\n this.ONE_MINUS_CONSTANT_ALPHA = 32772;\n this.BLEND_COLOR = 32773;\n this.ARRAY_BUFFER = 34962;\n this.ELEMENT_ARRAY_BUFFER = 34963;\n this.ARRAY_BUFFER_BINDING = 34964;\n this.ELEMENT_ARRAY_BUFFER_BINDING = 34965;\n this.STREAM_DRAW = 35040;\n this.STATIC_DRAW = 35044;\n this.DYNAMIC_DRAW = 35048;\n this.BUFFER_SIZE = 34660;\n this.BUFFER_USAGE = 34661;\n this.CURRENT_VERTEX_ATTRIB = 34342;\n this.FRONT = 1028;\n this.BACK = 1029;\n this.FRONT_AND_BACK = 1032;\n this.TEXTURE_2D = 3553;\n this.CULL_FACE = 2884;\n this.BLEND = 3042;\n this.DITHER = 3024;\n this.STENCIL_TEST = 2960;\n this.DEPTH_TEST = 2929;\n this.SCISSOR_TEST = 3089;\n this.POLYGON_OFFSET_FILL = 32823;\n this.SAMPLE_ALPHA_TO_COVERAGE = 32926;\n this.SAMPLE_COVERAGE = 32928;\n this.NO_ERROR = 0;\n this.INVALID_ENUM = 1280;\n this.INVALID_VALUE = 1281;\n this.INVALID_OPERATION = 1282;\n this.OUT_OF_MEMORY = 1285;\n this.CW = 2304;\n this.CCW = 2305;\n this.LINE_WIDTH = 2849;\n this.ALIASED_POINT_SIZE_RANGE = 33901;\n this.ALIASED_LINE_WIDTH_RANGE = 33902;\n this.CULL_FACE_MODE = 2885;\n this.FRONT_FACE = 2886;\n this.DEPTH_RANGE = 2928;\n this.DEPTH_WRITEMASK = 2930;\n this.DEPTH_CLEAR_VALUE = 2931;\n this.DEPTH_FUNC = 2932;\n this.STENCIL_CLEAR_VALUE = 2961;\n this.STENCIL_FUNC = 2962;\n this.STENCIL_FAIL = 2964;\n this.STENCIL_PASS_DEPTH_FAIL = 2965;\n this.STENCIL_PASS_DEPTH_PASS = 2966;\n this.STENCIL_REF = 2967;\n this.STENCIL_VALUE_MASK = 2963;\n this.STENCIL_WRITEMASK = 2968;\n this.STENCIL_BACK_FUNC = 34816;\n this.STENCIL_BACK_FAIL = 34817;\n this.STENCIL_BACK_PASS_DEPTH_FAIL = 34818;\n this.STENCIL_BACK_PASS_DEPTH_PASS = 34819;\n this.STENCIL_BACK_REF = 36003;\n this.STENCIL_BACK_VALUE_MASK = 36004;\n this.STENCIL_BACK_WRITEMASK = 36005;\n this.VIEWPORT = 2978;\n this.SCISSOR_BOX = 3088;\n this.COLOR_CLEAR_VALUE = 3106;\n this.COLOR_WRITEMASK = 3107;\n this.UNPACK_ALIGNMENT = 3317;\n this.PACK_ALIGNMENT = 3333;\n this.MAX_TEXTURE_SIZE = 3379;\n this.MAX_VIEWPORT_DIMS = 3386;\n this.SUBPIXEL_BITS = 3408;\n this.RED_BITS = 3410;\n this.GREEN_BITS = 3411;\n this.BLUE_BITS = 3412;\n this.ALPHA_BITS = 3413;\n this.DEPTH_BITS = 3414;\n this.STENCIL_BITS = 3415;\n this.POLYGON_OFFSET_UNITS = 10752;\n this.POLYGON_OFFSET_FACTOR = 32824;\n this.TEXTURE_BINDING_2D = 32873;\n this.SAMPLE_BUFFERS = 32936;\n this.SAMPLES = 32937;\n this.SAMPLE_COVERAGE_VALUE = 32938;\n this.SAMPLE_COVERAGE_INVERT = 32939;\n this.COMPRESSED_TEXTURE_FORMATS = 34467;\n this.DONT_CARE = 4352;\n this.FASTEST = 4353;\n this.NICEST = 4354;\n this.GENERATE_MIPMAP_HINT = 33170;\n this.BYTE = 5120;\n this.UNSIGNED_BYTE = 5121;\n this.SHORT = 5122;\n this.UNSIGNED_SHORT = 5123;\n this.INT = 5124;\n this.UNSIGNED_INT = 5125;\n this.FLOAT = 5126;\n this.DEPTH_COMPONENT = 6402;\n this.ALPHA = 6406;\n this.RGB = 6407;\n this.RGBA = 6408;\n this.LUMINANCE = 6409;\n this.LUMINANCE_ALPHA = 6410;\n this.UNSIGNED_SHORT_4_4_4_4 = 32819;\n this.UNSIGNED_SHORT_5_5_5_1 = 32820;\n this.UNSIGNED_SHORT_5_6_5 = 33635;\n this.FRAGMENT_SHADER = 35632;\n this.VERTEX_SHADER = 35633;\n this.MAX_VERTEX_ATTRIBS = 34921;\n this.MAX_VERTEX_UNIFORM_VECTORS = 36347;\n this.MAX_VARYING_VECTORS = 36348;\n this.MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661;\n this.MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660;\n this.MAX_TEXTURE_IMAGE_UNITS = 34930;\n this.MAX_FRAGMENT_UNIFORM_VECTORS = 36349;\n this.SHADER_TYPE = 35663;\n this.DELETE_STATUS = 35712;\n this.LINK_STATUS = 35714;\n this.VALIDATE_STATUS = 35715;\n this.ATTACHED_SHADERS = 35717;\n this.ACTIVE_UNIFORMS = 35718;\n this.ACTIVE_ATTRIBUTES = 35721;\n this.SHADING_LANGUAGE_VERSION = 35724;\n this.CURRENT_PROGRAM = 35725;\n this.NEVER = 512;\n this.LESS = 513;\n this.EQUAL = 514;\n this.LEQUAL = 515;\n this.GREATER = 516;\n this.NOTEQUAL = 517;\n this.GEQUAL = 518;\n this.ALWAYS = 519;\n this.KEEP = 7680;\n this.REPLACE = 7681;\n this.INCR = 7682;\n this.DECR = 7683;\n this.INVERT = 5386;\n this.INCR_WRAP = 34055;\n this.DECR_WRAP = 34056;\n this.VENDOR = 7936;\n this.RENDERER = 7937;\n this.VERSION = 7938;\n this.NEAREST = 9728;\n this.LINEAR = 9729;\n this.NEAREST_MIPMAP_NEAREST = 9984;\n this.LINEAR_MIPMAP_NEAREST = 9985;\n this.NEAREST_MIPMAP_LINEAR = 9986;\n this.LINEAR_MIPMAP_LINEAR = 9987;\n this.TEXTURE_MAG_FILTER = 10240;\n this.TEXTURE_MIN_FILTER = 10241;\n this.TEXTURE_WRAP_S = 10242;\n this.TEXTURE_WRAP_T = 10243;\n this.TEXTURE = 5890;\n this.TEXTURE_CUBE_MAP = 34067;\n this.TEXTURE_BINDING_CUBE_MAP = 34068;\n this.TEXTURE_CUBE_MAP_POSITIVE_X = 34069;\n this.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070;\n this.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071;\n this.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072;\n this.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073;\n this.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074;\n this.MAX_CUBE_MAP_TEXTURE_SIZE = 34076;\n this.TEXTURE0 = 33984;\n this.TEXTURE1 = 33985;\n this.TEXTURE2 = 33986;\n this.TEXTURE3 = 33987;\n this.TEXTURE4 = 33988;\n this.TEXTURE5 = 33989;\n this.TEXTURE6 = 33990;\n this.TEXTURE7 = 33991;\n this.TEXTURE8 = 33992;\n this.TEXTURE9 = 33993;\n this.TEXTURE10 = 33994;\n this.TEXTURE11 = 33995;\n this.TEXTURE12 = 33996;\n this.TEXTURE13 = 33997;\n this.TEXTURE14 = 33998;\n this.TEXTURE15 = 33999;\n this.TEXTURE16 = 34000;\n this.TEXTURE17 = 34001;\n this.TEXTURE18 = 34002;\n this.TEXTURE19 = 34003;\n this.TEXTURE20 = 34004;\n this.TEXTURE21 = 34005;\n this.TEXTURE22 = 34006;\n this.TEXTURE23 = 34007;\n this.TEXTURE24 = 34008;\n this.TEXTURE25 = 34009;\n this.TEXTURE26 = 34010;\n this.TEXTURE27 = 34011;\n this.TEXTURE28 = 34012;\n this.TEXTURE29 = 34013;\n this.TEXTURE30 = 34014;\n this.TEXTURE31 = 34015;\n this.ACTIVE_TEXTURE = 34016;\n this.REPEAT = 10497;\n this.CLAMP_TO_EDGE = 33071;\n this.MIRRORED_REPEAT = 33648;\n this.FLOAT_VEC2 = 35664;\n this.FLOAT_VEC3 = 35665;\n this.FLOAT_VEC4 = 35666;\n this.INT_VEC2 = 35667;\n this.INT_VEC3 = 35668;\n this.INT_VEC4 = 35669;\n this.BOOL = 35670;\n this.BOOL_VEC2 = 35671;\n this.BOOL_VEC3 = 35672;\n this.BOOL_VEC4 = 35673;\n this.FLOAT_MAT2 = 35674;\n this.FLOAT_MAT3 = 35675;\n this.FLOAT_MAT4 = 35676;\n this.SAMPLER_2D = 35678;\n this.SAMPLER_CUBE = 35680;\n this.VERTEX_ATTRIB_ARRAY_ENABLED = 34338;\n this.VERTEX_ATTRIB_ARRAY_SIZE = 34339;\n this.VERTEX_ATTRIB_ARRAY_STRIDE = 34340;\n this.VERTEX_ATTRIB_ARRAY_TYPE = 34341;\n this.VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922;\n this.VERTEX_ATTRIB_ARRAY_POINTER = 34373;\n this.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975;\n this.IMPLEMENTATION_COLOR_READ_TYPE = 35738;\n this.IMPLEMENTATION_COLOR_READ_FORMAT = 35739;\n this.COMPILE_STATUS = 35713;\n this.LOW_FLOAT = 36336;\n this.MEDIUM_FLOAT = 36337;\n this.HIGH_FLOAT = 36338;\n this.LOW_INT = 36339;\n this.MEDIUM_INT = 36340;\n this.HIGH_INT = 36341;\n this.FRAMEBUFFER = 36160;\n this.RENDERBUFFER = 36161;\n this.RGBA4 = 32854;\n this.RGB5_A1 = 32855;\n this.RGB565 = 36194;\n this.DEPTH_COMPONENT16 = 33189;\n this.STENCIL_INDEX8 = 36168;\n this.DEPTH_STENCIL = 34041;\n this.RENDERBUFFER_WIDTH = 36162;\n this.RENDERBUFFER_HEIGHT = 36163;\n this.RENDERBUFFER_INTERNAL_FORMAT = 36164;\n this.RENDERBUFFER_RED_SIZE = 36176;\n this.RENDERBUFFER_GREEN_SIZE = 36177;\n this.RENDERBUFFER_BLUE_SIZE = 36178;\n this.RENDERBUFFER_ALPHA_SIZE = 36179;\n this.RENDERBUFFER_DEPTH_SIZE = 36180;\n this.RENDERBUFFER_STENCIL_SIZE = 36181;\n this.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048;\n this.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049;\n this.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050;\n this.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051;\n this.COLOR_ATTACHMENT0 = 36064;\n this.DEPTH_ATTACHMENT = 36096;\n this.STENCIL_ATTACHMENT = 36128;\n this.DEPTH_STENCIL_ATTACHMENT = 33306;\n this.NONE = 0;\n this.FRAMEBUFFER_COMPLETE = 36053;\n this.FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054;\n this.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055;\n this.FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057;\n this.FRAMEBUFFER_UNSUPPORTED = 36061;\n this.FRAMEBUFFER_BINDING = 36006;\n this.RENDERBUFFER_BINDING = 36007;\n this.MAX_RENDERBUFFER_SIZE = 34024;\n this.INVALID_FRAMEBUFFER_OPERATION = 1286;\n this.UNPACK_FLIP_Y_WEBGL = 37440;\n this.UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441;\n this.CONTEXT_LOST_WEBGL = 37442;\n this.UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443;\n this.BROWSER_DEFAULT_WEBGL = 37444;\n this.READ_BUFFER = 3074;\n this.UNPACK_ROW_LENGTH = 3314;\n this.UNPACK_SKIP_ROWS = 3315;\n this.UNPACK_SKIP_PIXELS = 3316;\n this.PACK_ROW_LENGTH = 3330;\n this.PACK_SKIP_ROWS = 3331;\n this.PACK_SKIP_PIXELS = 3332;\n this.COLOR = 6144;\n this.DEPTH = 6145;\n this.STENCIL = 6146;\n this.RED = 6403;\n this.RGB8 = 32849;\n this.RGBA8 = 32856;\n this.RGB10_A2 = 32857;\n this.TEXTURE_BINDING_3D = 32874;\n this.UNPACK_SKIP_IMAGES = 32877;\n this.UNPACK_IMAGE_HEIGHT = 32878;\n this.TEXTURE_3D = 32879;\n this.TEXTURE_WRAP_R = 32882;\n this.MAX_3D_TEXTURE_SIZE = 32883;\n this.UNSIGNED_INT_2_10_10_10_REV = 33640;\n this.MAX_ELEMENTS_VERTICES = 33000;\n this.MAX_ELEMENTS_INDICES = 33001;\n this.TEXTURE_MIN_LOD = 33082;\n this.TEXTURE_MAX_LOD = 33083;\n this.TEXTURE_BASE_LEVEL = 33084;\n this.TEXTURE_MAX_LEVEL = 33085;\n this.MIN = 32775;\n this.MAX = 32776;\n this.DEPTH_COMPONENT24 = 33190;\n this.MAX_TEXTURE_LOD_BIAS = 34045;\n this.TEXTURE_COMPARE_MODE = 34892;\n this.TEXTURE_COMPARE_FUNC = 34893;\n this.CURRENT_QUERY = 34917;\n this.QUERY_RESULT = 34918;\n this.QUERY_RESULT_AVAILABLE = 34919;\n this.STREAM_READ = 35041;\n this.STREAM_COPY = 35042;\n this.STATIC_READ = 35045;\n this.STATIC_COPY = 35046;\n this.DYNAMIC_READ = 35049;\n this.DYNAMIC_COPY = 35050;\n this.MAX_DRAW_BUFFERS = 34852;\n this.DRAW_BUFFER0 = 34853;\n this.DRAW_BUFFER1 = 34854;\n this.DRAW_BUFFER2 = 34855;\n this.DRAW_BUFFER3 = 34856;\n this.DRAW_BUFFER4 = 34857;\n this.DRAW_BUFFER5 = 34858;\n this.DRAW_BUFFER6 = 34859;\n this.DRAW_BUFFER7 = 34860;\n this.DRAW_BUFFER8 = 34861;\n this.DRAW_BUFFER9 = 34862;\n this.DRAW_BUFFER10 = 34863;\n this.DRAW_BUFFER11 = 34864;\n this.DRAW_BUFFER12 = 34865;\n this.DRAW_BUFFER13 = 34866;\n this.DRAW_BUFFER14 = 34867;\n this.DRAW_BUFFER15 = 34868;\n this.MAX_FRAGMENT_UNIFORM_COMPONENTS = 35657;\n this.MAX_VERTEX_UNIFORM_COMPONENTS = 35658;\n this.SAMPLER_3D = 35679;\n this.SAMPLER_2D_SHADOW = 35682;\n this.FRAGMENT_SHADER_DERIVATIVE_HINT = 35723;\n this.PIXEL_PACK_BUFFER = 35051;\n this.PIXEL_UNPACK_BUFFER = 35052;\n this.PIXEL_PACK_BUFFER_BINDING = 35053;\n this.PIXEL_UNPACK_BUFFER_BINDING = 35055;\n this.FLOAT_MAT2x3 = 35685;\n this.FLOAT_MAT2x4 = 35686;\n this.FLOAT_MAT3x2 = 35687;\n this.FLOAT_MAT3x4 = 35688;\n this.FLOAT_MAT4x2 = 35689;\n this.FLOAT_MAT4x3 = 35690;\n this.SRGB = 35904;\n this.SRGB8 = 35905;\n this.SRGB8_ALPHA8 = 35907;\n this.COMPARE_REF_TO_TEXTURE = 34894;\n this.RGBA32F = 34836;\n this.RGB32F = 34837;\n this.RGBA16F = 34842;\n this.RGB16F = 34843;\n this.VERTEX_ATTRIB_ARRAY_INTEGER = 35069;\n this.MAX_ARRAY_TEXTURE_LAYERS = 35071;\n this.MIN_PROGRAM_TEXEL_OFFSET = 35076;\n this.MAX_PROGRAM_TEXEL_OFFSET = 35077;\n this.MAX_VARYING_COMPONENTS = 35659;\n this.TEXTURE_2D_ARRAY = 35866;\n this.TEXTURE_BINDING_2D_ARRAY = 35869;\n this.R11F_G11F_B10F = 35898;\n this.UNSIGNED_INT_10F_11F_11F_REV = 35899;\n this.RGB9_E5 = 35901;\n this.UNSIGNED_INT_5_9_9_9_REV = 35902;\n this.TRANSFORM_FEEDBACK_BUFFER_MODE = 35967;\n this.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 35968;\n this.TRANSFORM_FEEDBACK_VARYINGS = 35971;\n this.TRANSFORM_FEEDBACK_BUFFER_START = 35972;\n this.TRANSFORM_FEEDBACK_BUFFER_SIZE = 35973;\n this.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 35976;\n this.RASTERIZER_DISCARD = 35977;\n this.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 35978;\n this.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 35979;\n this.INTERLEAVED_ATTRIBS = 35980;\n this.SEPARATE_ATTRIBS = 35981;\n this.TRANSFORM_FEEDBACK_BUFFER = 35982;\n this.TRANSFORM_FEEDBACK_BUFFER_BINDING = 35983;\n this.RGBA32UI = 36208;\n this.RGB32UI = 36209;\n this.RGBA16UI = 36214;\n this.RGB16UI = 36215;\n this.RGBA8UI = 36220;\n this.RGB8UI = 36221;\n this.RGBA32I = 36226;\n this.RGB32I = 36227;\n this.RGBA16I = 36232;\n this.RGB16I = 36233;\n this.RGBA8I = 36238;\n this.RGB8I = 36239;\n this.RED_INTEGER = 36244;\n this.RGB_INTEGER = 36248;\n this.RGBA_INTEGER = 36249;\n this.SAMPLER_2D_ARRAY = 36289;\n this.SAMPLER_2D_ARRAY_SHADOW = 36292;\n this.SAMPLER_CUBE_SHADOW = 36293;\n this.UNSIGNED_INT_VEC2 = 36294;\n this.UNSIGNED_INT_VEC3 = 36295;\n this.UNSIGNED_INT_VEC4 = 36296;\n this.INT_SAMPLER_2D = 36298;\n this.INT_SAMPLER_3D = 36299;\n this.INT_SAMPLER_CUBE = 36300;\n this.INT_SAMPLER_2D_ARRAY = 36303;\n this.UNSIGNED_INT_SAMPLER_2D = 36306;\n this.UNSIGNED_INT_SAMPLER_3D = 36307;\n this.UNSIGNED_INT_SAMPLER_CUBE = 36308;\n this.UNSIGNED_INT_SAMPLER_2D_ARRAY = 36311;\n this.DEPTH_COMPONENT32F = 36012;\n this.DEPTH32F_STENCIL8 = 36013;\n this.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269;\n this.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 33296;\n this.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 33297;\n this.FRAMEBUFFER_ATTACHMENT_RED_SIZE = 33298;\n this.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 33299;\n this.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 33300;\n this.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 33301;\n this.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 33302;\n this.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 33303;\n this.FRAMEBUFFER_DEFAULT = 33304;\n this.UNSIGNED_INT_24_8 = 34042;\n this.DEPTH24_STENCIL8 = 35056;\n this.UNSIGNED_NORMALIZED = 35863;\n this.DRAW_FRAMEBUFFER_BINDING = 36006;\n this.READ_FRAMEBUFFER = 36008;\n this.DRAW_FRAMEBUFFER = 36009;\n this.READ_FRAMEBUFFER_BINDING = 36010;\n this.RENDERBUFFER_SAMPLES = 36011;\n this.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 36052;\n this.MAX_COLOR_ATTACHMENTS = 36063;\n this.COLOR_ATTACHMENT1 = 36065;\n this.COLOR_ATTACHMENT2 = 36066;\n this.COLOR_ATTACHMENT3 = 36067;\n this.COLOR_ATTACHMENT4 = 36068;\n this.COLOR_ATTACHMENT5 = 36069;\n this.COLOR_ATTACHMENT6 = 36070;\n this.COLOR_ATTACHMENT7 = 36071;\n this.COLOR_ATTACHMENT8 = 36072;\n this.COLOR_ATTACHMENT9 = 36073;\n this.COLOR_ATTACHMENT10 = 36074;\n this.COLOR_ATTACHMENT11 = 36075;\n this.COLOR_ATTACHMENT12 = 36076;\n this.COLOR_ATTACHMENT13 = 36077;\n this.COLOR_ATTACHMENT14 = 36078;\n this.COLOR_ATTACHMENT15 = 36079;\n this.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 36182;\n this.MAX_SAMPLES = 36183;\n this.HALF_FLOAT = 5131;\n this.RG = 33319;\n this.RG_INTEGER = 33320;\n this.R8 = 33321;\n this.RG8 = 33323;\n this.R16F = 33325;\n this.R32F = 33326;\n this.RG16F = 33327;\n this.RG32F = 33328;\n this.R8I = 33329;\n this.R8UI = 33330;\n this.R16I = 33331;\n this.R16UI = 33332;\n this.R32I = 33333;\n this.R32UI = 33334;\n this.RG8I = 33335;\n this.RG8UI = 33336;\n this.RG16I = 33337;\n this.RG16UI = 33338;\n this.RG32I = 33339;\n this.RG32UI = 33340;\n this.VERTEX_ARRAY_BINDING = 34229;\n this.R8_SNORM = 36756;\n this.RG8_SNORM = 36757;\n this.RGB8_SNORM = 36758;\n this.RGBA8_SNORM = 36759;\n this.SIGNED_NORMALIZED = 36764;\n this.COPY_READ_BUFFER = 36662;\n this.COPY_WRITE_BUFFER = 36663;\n this.COPY_READ_BUFFER_BINDING = 36662;\n this.COPY_WRITE_BUFFER_BINDING = 36663;\n this.UNIFORM_BUFFER = 35345;\n this.UNIFORM_BUFFER_BINDING = 35368;\n this.UNIFORM_BUFFER_START = 35369;\n this.UNIFORM_BUFFER_SIZE = 35370;\n this.MAX_VERTEX_UNIFORM_BLOCKS = 35371;\n this.MAX_FRAGMENT_UNIFORM_BLOCKS = 35373;\n this.MAX_COMBINED_UNIFORM_BLOCKS = 35374;\n this.MAX_UNIFORM_BUFFER_BINDINGS = 35375;\n this.MAX_UNIFORM_BLOCK_SIZE = 35376;\n this.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 35377;\n this.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 35379;\n this.UNIFORM_BUFFER_OFFSET_ALIGNMENT = 35380;\n this.ACTIVE_UNIFORM_BLOCKS = 35382;\n this.UNIFORM_TYPE = 35383;\n this.UNIFORM_SIZE = 35384;\n this.UNIFORM_BLOCK_INDEX = 35386;\n this.UNIFORM_OFFSET = 35387;\n this.UNIFORM_ARRAY_STRIDE = 35388;\n this.UNIFORM_MATRIX_STRIDE = 35389;\n this.UNIFORM_IS_ROW_MAJOR = 35390;\n this.UNIFORM_BLOCK_BINDING = 35391;\n this.UNIFORM_BLOCK_DATA_SIZE = 35392;\n this.UNIFORM_BLOCK_ACTIVE_UNIFORMS = 35394;\n this.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 35395;\n this.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 35396;\n this.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 35398;\n this.INVALID_INDEX = 4294967295;\n this.MAX_VERTEX_OUTPUT_COMPONENTS = 37154;\n this.MAX_FRAGMENT_INPUT_COMPONENTS = 37157;\n this.MAX_SERVER_WAIT_TIMEOUT = 37137;\n this.OBJECT_TYPE = 37138;\n this.SYNC_CONDITION = 37139;\n this.SYNC_STATUS = 37140;\n this.SYNC_FLAGS = 37141;\n this.SYNC_FENCE = 37142;\n this.SYNC_GPU_COMMANDS_COMPLETE = 37143;\n this.UNSIGNALED = 37144;\n this.SIGNALED = 37145;\n this.ALREADY_SIGNALED = 37146;\n this.TIMEOUT_EXPIRED = 37147;\n this.CONDITION_SATISFIED = 37148;\n this.WAIT_FAILED = 37149;\n this.SYNC_FLUSH_COMMANDS_BIT = 1;\n this.VERTEX_ATTRIB_ARRAY_DIVISOR = 35070;\n this.ANY_SAMPLES_PASSED = 35887;\n this.ANY_SAMPLES_PASSED_CONSERVATIVE = 36202;\n this.SAMPLER_BINDING = 35097;\n this.RGB10_A2UI = 36975;\n this.INT_2_10_10_10_REV = 36255;\n this.TRANSFORM_FEEDBACK = 36386;\n this.TRANSFORM_FEEDBACK_PAUSED = 36387;\n this.TRANSFORM_FEEDBACK_ACTIVE = 36388;\n this.TRANSFORM_FEEDBACK_BINDING = 36389;\n this.TEXTURE_IMMUTABLE_FORMAT = 37167;\n this.MAX_ELEMENT_INDEX = 36203;\n this.TEXTURE_IMMUTABLE_LEVELS = 33503;\n this.TIMEOUT_IGNORED = -1;\n this.MAX_CLIENT_WAIT_TIMEOUT_WEBGL = 37447;\n this.passthrough = null;\n this.programs = new Map();\n this.shaders = new Map();\n this.buffers = new Map();\n this.textures = new Map();\n this.framebuffers = new Map();\n this.renderbuffers = new Map();\n this.queries = new Map();\n this.samplers = new Map();\n this.transform_feedbacks = new Map();\n this.currently_bound_buffers = new Map();\n this.currently_bound_textures = new Map();\n this.active_samplers = [];\n this.current_query_any_samples_passed = null;\n this.current_query_any_samples_passed_conservative = null;\n this.current_query_transform_feedback_primitives_written = null;\n this.fake_drawing_buffer_color_space = 'srgb';\n this.supported_extension = [\n 'EXT_color_buffer_float'\n ];\n this.canvas = canvas;\n this.fake_drawing_buffer_width = width;\n this.fake_drawing_buffer_height = height;\n this.capabilities = capabilities;\n this.context_attributes = context_attributes;\n this.state = create_default_context_state(this.capabilities, { x: 0, y: 0, width: width, height: height });\n this.default_sampler_configuration = {\n min_filter: this.NEAREST_MIPMAP_LINEAR,\n mag_filter: this.LINEAR,\n wrap_s: this.REPEAT,\n wrap_t: this.REPEAT,\n wrap_r: this.REPEAT,\n min_lod: 0,\n max_lod: 1000,\n compare_func: this.LEQUAL,\n compare_mode: this.NONE\n };\n this.state_field_reverse_lookup_map = this.create_state_reverse_lookup_map();\n this.capabilities_field_reverse_lookup_map = this.create_capabilities_reverse_lookup_map();\n for (let i = 0; i < 32; i++) {\n this.active_samplers.push(null);\n }\n const GLsizeiptr_v = 0;\n const GLenum_v = 0;\n const GLbitfield_v = 0;\n const GLuint_v = 0;\n const GLclampf_v = 0;\n assert(typeof GLsizeiptr_v === 'number', 'GLsizeiptr is not a number');\n assert(typeof GLenum_v === 'number', 'GLenum is not a number');\n assert(typeof GLbitfield_v === 'number', 'GLbitfield is not a number');\n assert(typeof GLuint_v === 'number', 'GLuint is not a number');\n assert(typeof GLclampf_v === 'number', 'GLclampf is not a number');\n const GLboolean_v = true;\n assert(typeof GLboolean_v === 'boolean', 'GLboolean_v is not a boolean');\n }\n getExtension(name) {\n if (this.passthrough !== null) {\n // Block extensions that we do not support\n if (this.supported_extension.indexOf(name) >= 0) {\n return this.passthrough.getExtension(name);\n }\n else {\n return null;\n }\n }\n else {\n // TODO: Remove with WebGL2 support\n if (name === 'EXT_color_buffer_float') {\n const ext = {};\n return ext;\n }\n else if (this.supported_extension.indexOf(name) >= 0) {\n console.error('WebGL Mock: missing supported extension mock implementation');\n }\n }\n return null;\n }\n getSupportedExtensions() {\n return this.supported_extension;\n }\n activeTexture(textureUnit) {\n var _a;\n this.state.ACTIVE_TEXTURE = textureUnit;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.activeTexture(textureUnit);\n }\n attachShader(program, shader) {\n var _a;\n if (this.programs.has(program) && this.shaders.has(shader)) {\n this.programs.get(program).attached_shaders.push(this.shaders.get(shader));\n }\n else {\n console.error('Invalid program or shader.');\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.attachShader(program, shader);\n }\n bindAttribLocation(program, index, name) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.bindAttribLocation(program, index, name);\n }\n internal_update_buffer_binding_state(target, buffer) {\n this.currently_bound_buffers.set(target, buffer);\n if (target === this.ARRAY_BUFFER) {\n this.state.ARRAY_BUFFER_BINDING = buffer;\n }\n else if (target === this.ELEMENT_ARRAY_BUFFER) {\n this.state.ELEMENT_ARRAY_BUFFER_BINDING = buffer;\n }\n else if (target === this.COPY_READ_BUFFER) {\n this.state.COPY_READ_BUFFER_BINDING = buffer;\n }\n else if (target === this.COPY_WRITE_BUFFER) {\n this.state.COPY_WRITE_BUFFER_BINDING = buffer;\n }\n else if (target === this.PIXEL_PACK_BUFFER) {\n this.state.PIXEL_PACK_BUFFER_BINDING = buffer;\n }\n else if (target === this.PIXEL_UNPACK_BUFFER) {\n this.state.PIXEL_UNPACK_BUFFER_BINDING = buffer;\n }\n else if (target === this.TRANSFORM_FEEDBACK_BUFFER) {\n this.state.TRANSFORM_FEEDBACK_BUFFER_BINDING = buffer;\n }\n else if (target === this.UNIFORM_BUFFER) {\n this.state.UNIFORM_BUFFER_BINDING = buffer;\n }\n }\n bindBuffer(target, buffer) {\n var _a;\n this.internal_update_buffer_binding_state(target, buffer);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.bindBuffer(target, buffer);\n }\n bindBufferBase(target, index, buffer) {\n var _a;\n this.internal_update_buffer_binding_state(target, buffer);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.bindBufferBase(target, index, buffer);\n }\n bindBufferRange(target, index, buffer, offset, size) {\n var _a;\n this.internal_update_buffer_binding_state(target, buffer);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.bindBufferRange(target, index, buffer, offset, size);\n }\n blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);\n }\n clearBufferfi(buffer, drawbuffer, depth, stencil) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.clearBufferfi(buffer, drawbuffer, depth, stencil);\n }\n clearBufferfv(buffer, drawbuffer, values, srcOffset) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.clearBufferfv(buffer, drawbuffer, values, srcOffset);\n }\n clearBufferiv(buffer, drawbuffer, values, srcOffset) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.clearBufferiv(buffer, drawbuffer, values, srcOffset);\n }\n clearBufferuiv(buffer, drawbuffer, values, srcOffset) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.clearBufferuiv(buffer, drawbuffer, values, srcOffset);\n }\n bindFramebuffer(target, framebuffer) {\n var _a;\n if (target === this.FRAMEBUFFER) {\n this.state.FRAMEBUFFER_BINDING = framebuffer;\n this.state.READ_FRAMEBUFFER_BINDING = framebuffer;\n this.state.DRAW_FRAMEBUFFER_BINDING = framebuffer;\n }\n else if (target === this.DRAW_FRAMEBUFFER) {\n this.state.FRAMEBUFFER_BINDING = framebuffer;\n this.state.DRAW_FRAMEBUFFER_BINDING = framebuffer;\n }\n else if (target === this.READ_FRAMEBUFFER) {\n this.state.READ_FRAMEBUFFER_BINDING = framebuffer;\n }\n if (framebuffer !== null) {\n const found_framebuffer = this.framebuffers.get(framebuffer);\n // Make sure the framebuffer wasn't deleted.\n if (found_framebuffer) {\n found_framebuffer.is_framebuffer = true;\n }\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.bindFramebuffer(target, framebuffer);\n }\n bindRenderbuffer(target, renderbuffer) {\n var _a;\n this.state.RENDERBUFFER_BINDING = renderbuffer;\n if (renderbuffer !== null) {\n const found_renderbuffer = this.renderbuffers.get(renderbuffer);\n if (found_renderbuffer) {\n found_renderbuffer.is_renderbuffer = true;\n }\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.bindRenderbuffer(target, renderbuffer);\n }\n bindTexture(target, texture) {\n var _a;\n if (target === this.TEXTURE_2D) {\n this.state.TEXTURE_BINDING_2D = texture;\n }\n if (target === this.TEXTURE_2D_ARRAY) {\n this.state.TEXTURE_BINDING_2D_ARRAY = texture;\n }\n if (target === this.TEXTURE_CUBE_MAP) {\n this.state.TEXTURE_BINDING_CUBE_MAP = texture;\n }\n if (target === this.TEXTURE_3D) {\n this.state.TEXTURE_BINDING_3D = texture;\n }\n this.currently_bound_textures.set(target, texture);\n if (texture !== null) {\n this.textures.get(texture).is_texture = true;\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.bindTexture(target, texture);\n }\n blendColor(red, green, blue, alpha) {\n var _a;\n this.state.BLEND_COLOR.set([red, green, blue, alpha]);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.blendColor(red, green, blue, alpha);\n }\n blendEquation(mode) {\n var _a;\n this.state.BLEND_EQUATION = mode;\n this.state.BLEND_EQUATION_RGB = mode;\n this.state.BLEND_EQUATION_ALPHA = mode;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.blendEquation(mode);\n }\n blendEquationSeparate(modeRGB, modeAlpha) {\n var _a;\n this.state.BLEND_EQUATION = modeRGB;\n this.state.BLEND_EQUATION_RGB = modeRGB;\n this.state.BLEND_EQUATION_ALPHA = modeAlpha;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.blendEquationSeparate(modeRGB, modeAlpha);\n }\n blendFunc(sfactor, dfactor) {\n var _a;\n this.state.BLEND_SRC_RGB = sfactor;\n this.state.BLEND_SRC_ALPHA = sfactor;\n this.state.BLEND_DST_RGB = dfactor;\n this.state.BLEND_DST_ALPHA = dfactor;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.blendFunc(sfactor, dfactor);\n }\n blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha) {\n var _a;\n this.state.BLEND_SRC_RGB = srcRGB;\n this.state.BLEND_SRC_ALPHA = srcAlpha;\n this.state.BLEND_DST_RGB = dstRGB;\n this.state.BLEND_DST_ALPHA = dstAlpha;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);\n }\n bufferData(target, srcData_or_size, usage, srcOffset, length) {\n var _a, _b, _c, _d;\n const buffer = (_a = this.currently_bound_buffers.get(target)) !== null && _a !== void 0 ? _a : null;\n let mock_buffer = null;\n if (buffer === null) {\n console.error('bufferData: No buffer bound');\n }\n else {\n if (this.buffers.has(buffer)) {\n mock_buffer = this.buffers.get(buffer);\n }\n else {\n console.error('bufferData: Missing buffer in mock');\n }\n }\n if (mock_buffer !== null) {\n mock_buffer.is_initialized = true;\n mock_buffer.buffer_usage = usage;\n let size = 0;\n if (typeof srcData_or_size === 'number') {\n size = srcData_or_size;\n }\n else if (length !== undefined) {\n size = length;\n }\n else if (srcData_or_size === null) {\n // Fetch previous state\n size = mock_buffer.buffer_size;\n }\n else {\n size = srcData_or_size.byteLength - (srcOffset !== null && srcOffset !== void 0 ? srcOffset : 0);\n }\n mock_buffer.buffer_size = size;\n }\n if (typeof srcData_or_size === 'number') {\n return (_b = this.passthrough) === null || _b === void 0 ? void 0 : _b.bufferData(target, srcData_or_size, usage);\n }\n else if (srcOffset !== undefined && srcData_or_size !== null) {\n return (_c = this.passthrough) === null || _c === void 0 ? void 0 : _c.bufferData(target, srcData_or_size, usage, srcOffset, length);\n }\n else {\n return (_d = this.passthrough) === null || _d === void 0 ? void 0 : _d.bufferData(target, srcData_or_size, usage);\n }\n }\n bufferSubData(target, dstByteOffset, srcData, srcOffset, length) {\n var _a, _b;\n if (srcOffset === undefined) {\n (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.bufferSubData(target, dstByteOffset, srcData);\n }\n else {\n (_b = this.passthrough) === null || _b === void 0 ? void 0 : _b.bufferSubData(target, dstByteOffset, srcData, srcOffset, length);\n }\n }\n checkFramebufferStatus(target) {\n if (this.passthrough === null) {\n // Always succeed. VERIFY\n return this.FRAMEBUFFER_COMPLETE;\n }\n else {\n return this.passthrough.checkFramebufferStatus(target);\n }\n }\n clear(mask) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.clear(mask);\n }\n clearColor(red, green, blue, alpha) {\n var _a;\n this.state.COLOR_CLEAR_VALUE.set([red, green, blue, alpha]);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.clearColor(red, green, blue, alpha);\n }\n clearDepth(depth) {\n var _a;\n this.state.DEPTH_CLEAR_VALUE = depth;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.clearDepth(depth);\n }\n clearStencil(s) {\n var _a;\n this.state.STENCIL_CLEAR_VALUE = s;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.clearStencil(s);\n }\n colorMask(red, green, blue, alpha) {\n var _a;\n this.state.COLOR_WRITEMASK[0] = red;\n this.state.COLOR_WRITEMASK[1] = green;\n this.state.COLOR_WRITEMASK[2] = blue;\n this.state.COLOR_WRITEMASK[3] = alpha;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.colorMask(red, green, blue, alpha);\n }\n compileShader(shader) {\n var _a;\n (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.compileShader(shader);\n }\n compressedTexImage2D(target, level, internalformat, width, height, border, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride) {\n var _a, _b;\n assert(border === 0, \"compressedTexImage2D: 'border' parameter is not zero.\");\n if (typeof srcData_or_imageSize === 'number' && srcOffset_or_offset !== undefined) {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.compressedTexImage2D(target, level, internalformat, width, height, border, srcData_or_imageSize, srcOffset_or_offset);\n }\n else if (typeof srcData_or_imageSize !== 'number') {\n return (_b = this.passthrough) === null || _b === void 0 ? void 0 : _b.compressedTexImage2D(target, level, internalformat, width, height, border, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride);\n }\n else {\n throw new Error('Incorrect overload resoluton in WebGLMock');\n }\n }\n compressedTexImage3D(target, level, internalformat, width, height, depth, border, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride) {\n var _a, _b;\n assert(border === 0, \"compressedTexImage3D: 'border' parameter is not zero.\");\n if (typeof srcData_or_imageSize === 'number' && srcOffset_or_offset !== undefined) {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.compressedTexImage3D(target, level, internalformat, width, height, depth, border, srcData_or_imageSize, srcOffset_or_offset);\n }\n else if (typeof srcData_or_imageSize !== 'number') {\n return (_b = this.passthrough) === null || _b === void 0 ? void 0 : _b.compressedTexImage3D(target, level, internalformat, width, height, depth, border, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride);\n }\n else {\n throw new Error('Incorrect overload resoluton in WebGLMock');\n }\n }\n compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride) {\n var _a, _b;\n if (typeof srcData_or_imageSize === 'number' && srcOffset_or_offset !== undefined) {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, srcData_or_imageSize, srcOffset_or_offset);\n }\n else if (typeof srcData_or_imageSize !== 'number') {\n return (_b = this.passthrough) === null || _b === void 0 ? void 0 : _b.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride);\n }\n else {\n throw new Error('Incorrect overload resoluton in WebGLMock');\n }\n }\n compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride) {\n var _a, _b;\n if (typeof srcData_or_imageSize === 'number' && srcOffset_or_offset !== undefined) {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, srcData_or_imageSize, srcOffset_or_offset);\n }\n else if (typeof srcData_or_imageSize !== 'number') {\n return (_b = this.passthrough) === null || _b === void 0 ? void 0 : _b.compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride);\n }\n else {\n throw new Error('Incorrect overload resoluton in WebGLMock');\n }\n }\n copyTexImage2D(target, level, internalformat, x, y, width, height, border) {\n var _a;\n assert(border === 0, \"copyTexImage2D: 'border' parameter is not zero.\");\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.copyTexImage2D(target, level, internalformat, x, y, width, height, border);\n }\n copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);\n }\n copyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height) {\n var _a;\n (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.copyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);\n }\n createBuffer() {\n let buffer;\n if (this.passthrough === null) {\n buffer = {};\n }\n else {\n buffer = this.passthrough.createBuffer();\n }\n if (buffer === null)\n return null;\n this.buffers.set(buffer, {\n actual_buffer: buffer,\n is_initialized: false,\n // Initial values according to docs\n buffer_size: 0,\n buffer_usage: this.STATIC_DRAW\n });\n return buffer;\n }\n createFramebuffer() {\n let framebuffer;\n if (this.passthrough === null) {\n framebuffer = {};\n }\n else {\n framebuffer = this.passthrough.createFramebuffer();\n }\n if (framebuffer === null)\n return null;\n this.framebuffers.set(framebuffer, {\n actual_framebuffer: framebuffer,\n is_framebuffer: false\n });\n return framebuffer;\n }\n createProgram() {\n let program;\n if (this.passthrough === null) {\n program = {};\n }\n else {\n program = this.passthrough.createProgram();\n }\n if (program === null)\n return null;\n this.programs.set(program, {\n actual_program: program,\n attached_shaders: [],\n fake_attrib_indices: new Map(),\n fake_uniform_indices: new Map(),\n fake_uniform_block_indices: new Map(),\n is_program: false,\n validate_status: false,\n link_status: false\n });\n return program;\n }\n createRenderbuffer() {\n let renderbuffer;\n if (this.passthrough === null) {\n renderbuffer = {};\n }\n else {\n renderbuffer = this.passthrough.createRenderbuffer();\n }\n if (renderbuffer === null)\n return null;\n this.renderbuffers.set(renderbuffer, {\n actual_renderbuffer: renderbuffer,\n is_renderbuffer: false\n });\n return renderbuffer;\n }\n createShader(type) {\n let shader;\n if (this.passthrough === null) {\n shader = {};\n }\n else {\n shader = this.passthrough.createShader(type);\n }\n if (shader === null)\n return null;\n this.shaders.set(shader, {\n actual_shader: shader,\n source: null,\n type: type\n });\n return shader;\n }\n createTexture() {\n let texture;\n if (this.passthrough === null) {\n texture = {};\n }\n else {\n texture = this.passthrough.createTexture();\n }\n if (texture === null)\n return null;\n this.textures.set(texture, {\n actual_texture: texture,\n immutable_format: false,\n immutable_levels: 0,\n base_level: 0,\n max_level: 1000,\n sampler_configuration: Object.assign({}, this.default_sampler_configuration),\n is_texture: false\n });\n return texture;\n }\n cullFace(mode) {\n var _a;\n this.state.CULL_FACE_MODE = mode;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.cullFace(mode);\n }\n deleteBuffer(buffer) {\n var _a;\n if (buffer !== null) {\n this.buffers.delete(buffer);\n for (const [target, bound_buffer] of this.currently_bound_buffers.entries()) {\n if (bound_buffer === buffer) {\n this.currently_bound_buffers.set(target, null);\n }\n }\n if (this.state.ARRAY_BUFFER_BINDING === buffer) {\n this.state.ARRAY_BUFFER_BINDING = null;\n }\n else if (buffer === this.state.ELEMENT_ARRAY_BUFFER_BINDING) {\n this.state.ELEMENT_ARRAY_BUFFER_BINDING = null;\n }\n else if (buffer === this.state.COPY_READ_BUFFER_BINDING) {\n this.state.COPY_READ_BUFFER_BINDING = null;\n }\n else if (buffer === this.state.COPY_WRITE_BUFFER_BINDING) {\n this.state.COPY_WRITE_BUFFER_BINDING = null;\n }\n else if (buffer === this.state.PIXEL_PACK_BUFFER_BINDING) {\n this.state.PIXEL_PACK_BUFFER_BINDING = null;\n }\n else if (buffer === this.state.PIXEL_UNPACK_BUFFER_BINDING) {\n this.state.PIXEL_UNPACK_BUFFER_BINDING = null;\n }\n else if (buffer === this.state.TRANSFORM_FEEDBACK_BUFFER_BINDING) {\n this.state.TRANSFORM_FEEDBACK_BUFFER_BINDING = null;\n }\n else if (buffer === this.state.UNIFORM_BUFFER_BINDING) {\n this.state.UNIFORM_BUFFER_BINDING = null;\n }\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.deleteBuffer(buffer);\n }\n deleteFramebuffer(framebuffer) {\n var _a;\n if (this.state.FRAMEBUFFER_BINDING === framebuffer) {\n this.state.FRAMEBUFFER_BINDING = null;\n }\n if (this.state.DRAW_FRAMEBUFFER_BINDING === framebuffer) {\n this.state.DRAW_FRAMEBUFFER_BINDING = null;\n }\n if (this.state.READ_FRAMEBUFFER_BINDING === framebuffer) {\n this.state.READ_FRAMEBUFFER_BINDING = null;\n }\n if (framebuffer != null)\n this.framebuffers.delete(framebuffer);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.deleteFramebuffer(framebuffer);\n }\n deleteProgram(program) {\n var _a;\n if (program !== null)\n this.programs.delete(program);\n if (this.state.CURRENT_PROGRAM === program) {\n this.state.CURRENT_PROGRAM = null;\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.deleteProgram(program);\n }\n deleteRenderbuffer(renderbuffer) {\n var _a;\n if (this.state.RENDERBUFFER_BINDING === renderbuffer) {\n this.state.RENDERBUFFER_BINDING = null;\n }\n if (renderbuffer != null)\n this.renderbuffers.delete(renderbuffer);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.deleteRenderbuffer(renderbuffer);\n }\n deleteShader(shader) {\n var _a;\n if (shader !== null)\n this.shaders.delete(shader);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.deleteShader(shader);\n }\n deleteTexture(texture) {\n var _a;\n if (this.state.TEXTURE_BINDING_2D === texture) {\n this.state.TEXTURE_BINDING_2D = null;\n }\n if (this.state.TEXTURE_BINDING_2D_ARRAY === texture) {\n this.state.TEXTURE_BINDING_2D_ARRAY = null;\n }\n if (this.state.TEXTURE_BINDING_CUBE_MAP === texture) {\n this.state.TEXTURE_BINDING_CUBE_MAP = null;\n }\n if (this.state.TEXTURE_BINDING_3D === texture) {\n this.state.TEXTURE_BINDING_3D = null;\n }\n if (texture !== null && this.textures.has(texture)) {\n this.textures.delete(texture);\n for (const [target, bound_texture] of this.currently_bound_textures.entries()) {\n if (bound_texture === texture) {\n this.currently_bound_textures.set(target, null);\n }\n }\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.deleteTexture(texture);\n }\n drawBuffers(buffers) {\n var _a;\n for (let i = 0; i < buffers.length; i++) {\n this.state['DRAW_BUFFER' + i.toString()] = buffers[i];\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.drawBuffers(buffers);\n }\n readBuffer(src) {\n var _a;\n this.state.READ_BUFFER = src;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.readBuffer(src);\n }\n depthFunc(func) {\n var _a;\n this.state.DEPTH_FUNC = func;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.depthFunc(func);\n }\n depthMask(flag) {\n var _a;\n this.state.DEPTH_WRITEMASK = flag;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.depthMask(flag);\n }\n depthRange(zNear, zFar) {\n var _a;\n this.state.DEPTH_RANGE.set([zNear, zFar]);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.depthRange(zNear, zFar);\n }\n detachShader(program, shader) {\n var _a;\n if (this.programs.has(program) && this.shaders.has(shader)) {\n const mock_program = this.programs.get(program);\n const mock_shader = this.shaders.get(shader);\n const shader_index = mock_program.attached_shaders.indexOf(mock_shader);\n if (shader_index !== -1) {\n mock_program.attached_shaders = mock_program.attached_shaders.splice(shader_index, 1);\n }\n else {\n console.error(\"Program does not have shader. Can't detach.\");\n }\n }\n else {\n console.error('Invalid program or shader');\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.detachShader(program, shader);\n }\n disableVertexAttribArray(index) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.disableVertexAttribArray(index);\n }\n drawArrays(mode, first, count) {\n var _a;\n this.fake_query_data_for_draw(count);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.drawArrays(mode, first, count);\n }\n drawElements(mode, count, type, offset) {\n var _a;\n this.fake_query_data_for_draw(count);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.drawElements(mode, count, type, offset);\n }\n drawRangeElements(mode, start, end, count, type, offset) {\n var _a;\n this.fake_query_data_for_draw(count);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.drawRangeElements(mode, start, end, count, type, offset);\n }\n update_cap(cap, enabled) {\n if (!this.state_field_reverse_lookup_map.has(cap)) {\n console.error('Invalid cap: not found: ' + cap);\n return;\n }\n const v = this.state_field_reverse_lookup_map.get(cap);\n if (typeof this.state[v] !== 'boolean') {\n console.error('Invalid cap: cap is not boolean: ' + cap);\n return;\n }\n this.state[v] = enabled;\n }\n enable(cap) {\n var _a;\n this.update_cap(cap, true);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.enable(cap);\n }\n disable(cap) {\n var _a;\n this.update_cap(cap, false);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.disable(cap);\n }\n isEnabled(cap) {\n let value;\n if (!this.state_field_reverse_lookup_map.has(cap)) {\n console.error('Invalid cap: not found: ' + cap);\n value = false;\n }\n else {\n const v = this.state_field_reverse_lookup_map.get(cap);\n if (typeof this.state[v] !== 'boolean') {\n console.error('Invalid cap: cap is not boolean: ' + cap);\n value = false;\n }\n else {\n value = this.state[v];\n }\n }\n if (this.passthrough) {\n const real_value = this.passthrough.isEnabled(cap);\n if (real_value !== value) {\n console.error('Cap mock mismatch: cap not the same: ' + cap);\n value = real_value;\n }\n }\n return value;\n }\n enableVertexAttribArray(index) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.enableVertexAttribArray(index);\n }\n finish() {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.finish();\n }\n flush() {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.flush();\n }\n framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);\n }\n framebufferTexture2D(target, attachment, textarget, texture, level) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.framebufferTexture2D(target, attachment, textarget, texture, level);\n }\n framebufferTextureLayer(target, attachment, texture, level, layer) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.framebufferTextureLayer(target, attachment, texture, level, layer);\n }\n invalidateFramebuffer(target, attachments) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.invalidateFramebuffer(target, attachments);\n }\n invalidateSubFramebuffer(target, attachments, x, y, width, height) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.invalidateSubFramebuffer(target, attachments, x, y, width, height);\n }\n frontFace(mode) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.frontFace(mode);\n }\n generateMipmap(target) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.generateMipmap(target);\n }\n getActiveAttrib(program, index) {\n if (this.passthrough === null) {\n // TODO: Figure out what to actually return here.\n // Not used by Babylon.\n return null;\n }\n else {\n return this.passthrough.getActiveAttrib(program, index);\n }\n }\n getActiveUniform(program, index) {\n if (this.passthrough === null) {\n // TODO: Figure out what to actually return here.\n // Not used by Babylon.\n return null;\n }\n else {\n return this.passthrough.getActiveUniform(program, index);\n }\n }\n getAttachedShaders(program) {\n let result;\n if (!this.programs.has(program)) {\n result = null;\n }\n else {\n const mock_programs = this.programs.get(program).attached_shaders;\n result = mock_programs.map((value) => {\n return value.actual_shader;\n });\n }\n if (this.passthrough !== null) {\n // We have an actual context, make sure we are aligned\n const real_shaders = this.passthrough.getAttachedShaders(program);\n let errored = false;\n if ((real_shaders === null && result !== null) || (real_shaders !== null && result === null)) {\n console.error('Program mocking error: Mock & GL implementation have mismatching state: null vs non-null');\n errored = true;\n }\n else if (real_shaders !== null && result !== null) {\n if (real_shaders.length !== result.length) {\n console.error('Program mocking error: Mock & GL implementation have mismatching state: shader count');\n errored = true;\n }\n else {\n // Check that the references are matching up\n let missing_shaders = 0;\n real_shaders.forEach((real) => {\n if (result.indexOf(real) === -1) {\n missing_shaders++;\n }\n });\n if (missing_shaders > 0) {\n console.error('Program mocking error: Mock & GL implementation have mismatching state: ' + missing_shaders + ' mismatching shader references');\n errored = true;\n }\n }\n }\n if (errored) {\n // Correct result to make sure our runtime is correct.\n result = real_shaders;\n }\n }\n return result;\n }\n getAttribLocation(program, name) {\n let result;\n if (!this.programs.has(program)) {\n console.error('getAttribLocation: Invalid program');\n result = -1;\n }\n else {\n const mock_program = this.programs.get(program);\n if (mock_program.fake_attrib_indices.has(name)) {\n result = mock_program.fake_attrib_indices.get(name);\n }\n else {\n if (this.passthrough === null) {\n // Create a fake index\n // TODO: Generate from shader source\n result = mock_program.fake_attrib_indices.size;\n }\n else {\n // Fetch the real index\n result = this.passthrough.getAttribLocation(program, name);\n }\n mock_program.fake_attrib_indices.set(name, result);\n }\n }\n if (this.passthrough !== null) {\n // Verify our state matches the GL state\n const real_result = this.passthrough.getAttribLocation(program, name);\n if (real_result !== result) {\n console.error('Program mocking error: Mock & GL implementation have mismatching attrib locations.');\n // Correct the result to make sure our runtime is correct.\n result = real_result;\n }\n }\n return result;\n }\n getBufferSubData(target, srcByteOffset, dstBuffer, dstOffset, length) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.getBufferSubData(target, srcByteOffset, dstBuffer, dstOffset, length);\n }\n getBufferParameter(target, pname) {\n let result = 0;\n if (this.currently_bound_buffers.has(target)) {\n const real_buffer = this.currently_bound_buffers.get(target);\n if (this.buffers.has(real_buffer)) {\n const buffer = this.buffers.get(real_buffer);\n if (pname === this.BUFFER_SIZE) {\n result = buffer.buffer_size;\n }\n else if (pname === this.BUFFER_USAGE) {\n result = buffer.buffer_usage;\n }\n else {\n console.error('getBufferParameter: Invalid pname: ' + pname);\n }\n }\n else {\n console.error('getBufferParameter: Missing buffer');\n }\n }\n if (this.passthrough) {\n // Make sure we have the same result!\n const real_result = this.passthrough.getBufferParameter(target, pname);\n if (real_result !== result) {\n console.error('getBufferParameter: Mismatching state.');\n // Correct the result to make sure our runtime is correct.\n result = real_result;\n }\n }\n return result;\n }\n getContextAttributes() {\n // TODO: Implement faked data?\n return null;\n }\n getError() {\n if (this.passthrough === null) {\n return this.NO_ERROR;\n }\n else {\n return this.passthrough.getError();\n }\n }\n getFramebufferAttachmentParameter(target, attachment, pname) {\n throw new Error('Not implemented by mock');\n }\n getParameter(pname) {\n if (pname === this.SAMPLER_BINDING) {\n return this.active_samplers[this.state.ACTIVE_TEXTURE - this.TEXTURE0];\n }\n if (pname === this.TRANSFORM_FEEDBACK_PAUSED) {\n console.error(\"Mock doesn't implement TRANSFORM_FEEDBACK_X state\");\n return undefined;\n }\n if (this.state_field_reverse_lookup_map.has(pname)) {\n const field = this.state_field_reverse_lookup_map.get(pname);\n const value = this.state[field];\n return value;\n }\n else if (this.capabilities_field_reverse_lookup_map.has(pname)) {\n const field = this.capabilities_field_reverse_lookup_map.get(pname);\n const value = this.capabilities[field];\n return value;\n }\n else {\n console.error('Missing parameter field lookup for: ' + pname);\n }\n }\n isBuffer(buffer) {\n let result;\n if (buffer === null) {\n result = false;\n }\n else {\n if (this.buffers.has(buffer)) {\n const mock_buffer = this.buffers.get(buffer);\n result = mock_buffer.is_initialized;\n }\n else {\n result = false;\n }\n }\n if (this.passthrough !== null) {\n const real_result = this.passthrough.isBuffer(buffer);\n if (real_result !== result) {\n console.error('Buffer mocking error: Mock & GL implementation have mismatching state: isBuffer yields different values');\n result = real_result;\n }\n }\n return result;\n }\n getProgramInfoLog(program) {\n if (!this.programs.has(program)) {\n console.error('Invalid program!');\n }\n if (this.passthrough === null) {\n return null;\n }\n else {\n return this.passthrough.getProgramInfoLog(program);\n }\n }\n getProgramParameter(program, pname) {\n let result;\n if (pname === this.VALIDATE_STATUS) {\n result = this.programs.get(program).validate_status;\n }\n else if (pname === this.LINK_STATUS) {\n result = this.programs.get(program).link_status;\n }\n else {\n result = null;\n console.error('Invalid enum: ' + pname);\n }\n if (this.passthrough !== null) {\n const real_result = this.passthrough.getProgramParameter(program, pname);\n if (real_result !== result) {\n console.error('Mocking error: results mismatch!');\n result = real_result;\n }\n }\n return result;\n }\n getRenderbufferParameter(target, pname) {\n throw new Error('Not implemented by mock');\n }\n getShaderInfoLog(shader) {\n return null;\n }\n getShaderParameter(shader, pname) {\n if (pname === this.COMPILE_STATUS) {\n return true;\n }\n else if (pname === this.SHADER_TYPE) {\n return this.shaders.get(shader).type;\n }\n throw new Error('Case not implemented.');\n }\n getShaderPrecisionFormat(shadertype, precisiontype) {\n if (precisiontype === this.LOW_FLOAT || precisiontype === this.MEDIUM_FLOAT || precisiontype === this.HIGH_FLOAT) {\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGLShaderPrecisionFormat\n // Lets just return floats all the way around. This is what my M2 mac gives\n return {\n rangeMin: 127,\n rangeMax: 127,\n precision: 23\n };\n }\n else if (precisiontype === this.LOW_INT || precisiontype === this.MEDIUM_INT || precisiontype === this.HIGH_INT) {\n return {\n rangeMin: 31,\n rangeMax: 30,\n precision: 0\n };\n }\n else {\n console.error('Invalid shader precision format precisionType');\n return null;\n }\n }\n getShaderSource(shader) {\n return this.shaders.get(shader).source;\n }\n set_tex_parameter_internal(target, pname, param) {\n if (!this.currently_bound_textures.has(target)) {\n console.error('No texture bound to target: ' + target);\n }\n else {\n const tex = this.textures.get(this.currently_bound_textures.get(target));\n if (!this.set_sampler_configuration_parameter(tex.sampler_configuration, pname, param)) {\n // It wasn't a sampler parameter, check for texture parameters\n if (pname === this.TEXTURE_MAX_LEVEL) {\n tex.max_level = param;\n }\n else if (pname === this.TEXTURE_BASE_LEVEL) {\n tex.base_level = param;\n }\n else {\n console.error('Invalid texture parameter: ' + pname);\n }\n }\n }\n }\n /**\n * Sets the parameter of pname on sampler_configuration.\n * @returns Returns true if the parameter was set, false if it was an invalid parameter\n */\n set_sampler_configuration_parameter(sampler_configuration, pname, value) {\n if (pname === this.TEXTURE_MIN_FILTER) {\n sampler_configuration.min_filter = value;\n }\n else if (pname === this.TEXTURE_MAG_FILTER) {\n sampler_configuration.mag_filter = value;\n }\n else if (pname === this.TEXTURE_WRAP_S) {\n sampler_configuration.wrap_s = value;\n }\n else if (pname === this.TEXTURE_WRAP_T) {\n sampler_configuration.wrap_t = value;\n }\n else if (pname === this.TEXTURE_WRAP_R) {\n sampler_configuration.wrap_r = value;\n }\n else if (pname === this.TEXTURE_MIN_LOD) {\n sampler_configuration.min_lod = value;\n }\n else if (pname === this.TEXTURE_MAX_LOD) {\n sampler_configuration.max_lod = value;\n }\n else if (pname === this.TEXTURE_COMPARE_FUNC) {\n sampler_configuration.compare_func = value;\n }\n else if (pname === this.TEXTURE_COMPARE_MODE) {\n sampler_configuration.compare_mode = value;\n }\n else {\n return false;\n }\n return true;\n }\n get_sampler_configuration_parameter(sampler_configuration, pname) {\n if (pname === this.TEXTURE_MIN_FILTER) {\n return sampler_configuration.min_filter;\n }\n else if (pname === this.TEXTURE_MAG_FILTER) {\n return sampler_configuration.mag_filter;\n }\n else if (pname === this.TEXTURE_WRAP_S) {\n return sampler_configuration.wrap_s;\n }\n else if (pname === this.TEXTURE_WRAP_T) {\n return sampler_configuration.wrap_t;\n }\n else if (pname === this.TEXTURE_WRAP_R) {\n return sampler_configuration.wrap_r;\n }\n else if (pname === this.TEXTURE_MIN_LOD) {\n return sampler_configuration.min_lod;\n }\n else if (pname === this.TEXTURE_MAX_LOD) {\n return sampler_configuration.max_lod;\n }\n else if (pname === this.TEXTURE_COMPARE_FUNC) {\n return sampler_configuration.compare_func;\n }\n else if (pname === this.TEXTURE_COMPARE_MODE) {\n return sampler_configuration.compare_mode;\n }\n else {\n return null;\n }\n }\n getTexParameter(target, pname) {\n let result;\n if (!this.currently_bound_textures.get(target)) {\n console.error('No texture bound to target: ' + target);\n result = null;\n }\n else {\n const tex = this.textures.get(this.currently_bound_textures.get(target));\n result = this.get_sampler_configuration_parameter(tex.sampler_configuration, pname);\n if (result === null) {\n // It wasn't a sampler parameter, check for texture parameters\n if (pname === this.TEXTURE_IMMUTABLE_FORMAT) {\n result = tex.immutable_format;\n }\n else if (pname === this.TEXTURE_IMMUTABLE_LEVELS) {\n result = tex.immutable_levels;\n }\n else if (pname === this.TEXTURE_MAX_LEVEL) {\n result = tex.max_level;\n }\n else if (pname === this.TEXTURE_BASE_LEVEL) {\n result = tex.base_level;\n }\n }\n }\n if (this.passthrough !== null) {\n // Verify our results are matching\n const val = this.passthrough.getTexParameter(target, pname);\n if (val !== result) {\n console.error('WebGL Texture mocking error! Mismatching state. target: ' + target + ', pname: ' + pname);\n // Correct the results for good runtime\n result = val;\n }\n }\n return result;\n }\n getUniform(program, location) {\n if (this.passthrough === null) {\n return null;\n }\n else {\n return this.passthrough.getUniform(program, location);\n }\n }\n getUniformLocation(program, name) {\n let result;\n if (!this.programs.has(program)) {\n console.error('getUniformLocation: Invalid program');\n result = null;\n }\n else {\n const mock_program = this.programs.get(program);\n if (this.passthrough === null) {\n if (mock_program.fake_uniform_indices.has(name)) {\n // Create a fake index\n // TODO: Generate from shader source\n const fake_location = {\n _currentState: mock_program.fake_uniform_indices.size\n };\n result = fake_location;\n }\n else {\n result = mock_program.fake_uniform_indices.get(name);\n }\n }\n else {\n // Fetch the real index\n result = this.passthrough.getUniformLocation(program, name);\n }\n mock_program.fake_uniform_indices.set(name, result);\n }\n return result;\n }\n getUniformIndices(program, uniformNames) {\n if (this.passthrough === null) {\n if (!this.programs.has(program))\n return null;\n const mock_program = this.programs.get(program);\n const result = uniformNames.map((uniformName) => {\n var _a, _b;\n return (_b = (_a = mock_program.fake_uniform_indices.get(uniformName)) === null || _a === void 0 ? void 0 : _a._currentState) !== null && _b !== void 0 ? _b : -1;\n });\n return result;\n }\n else {\n return this.passthrough.getUniformIndices(program, uniformNames);\n }\n }\n getActiveUniformBlockName(program, uniformBlockIndex) {\n var _a;\n if (this.passthrough === null) {\n const mock_program = this.programs.get(program);\n // See if we have the index already\n let found_name = null;\n mock_program.fake_uniform_block_indices.forEach((value, key) => {\n if (value === uniformBlockIndex) {\n found_name = key;\n }\n });\n if (found_name !== null) {\n return found_name;\n }\n const fake_name = 'fake_generated_mock_name_' + uniformBlockIndex.toString();\n mock_program.fake_uniform_block_indices.set(fake_name, uniformBlockIndex);\n return fake_name;\n }\n else {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.getActiveUniformBlockName(program, uniformBlockIndex);\n }\n }\n getUniformBlockIndex(program, uniformBlockName) {\n if (this.passthrough === null) {\n const mock_program = this.programs.get(program);\n if (mock_program.fake_uniform_block_indices.has(uniformBlockName)) {\n return mock_program.fake_uniform_block_indices.get(uniformBlockName);\n }\n else {\n const fake_index = mock_program.fake_uniform_block_indices.size;\n mock_program.fake_uniform_block_indices.set(uniformBlockName, fake_index);\n return fake_index;\n }\n }\n else {\n return this.passthrough.getUniformBlockIndex(program, uniformBlockName);\n }\n }\n getActiveUniformBlockParameter(program, uniformBlockIndex, pname) {\n if (this.passthrough === null) {\n const fake_uniform_count = 8;\n if (pname === this.UNIFORM_BLOCK_BINDING) {\n return uniformBlockIndex;\n }\n else if (pname === this.UNIFORM_BLOCK_DATA_SIZE) {\n return fake_uniform_count * 16;\n }\n else if (pname === this.UNIFORM_BLOCK_ACTIVE_UNIFORMS) {\n return fake_uniform_count;\n }\n else if (pname === this.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES) {\n const indices = new Uint32Array(fake_uniform_count);\n for (let i = 0; i < fake_uniform_count; i++) {\n indices[i] = i;\n }\n return indices;\n }\n else if (pname === this.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER) {\n return true;\n }\n else if (pname === this.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER) {\n return true;\n }\n else {\n console.error('Invalid pname');\n return null;\n }\n }\n else {\n return this.passthrough.getActiveUniformBlockParameter(program, uniformBlockIndex, pname);\n }\n }\n getActiveUniforms(program, uniformIndices, pname) {\n throw new Error('Not implemented by mock');\n }\n getVertexAttrib(index, pname) {\n throw new Error('Not implemented by mock');\n }\n getVertexAttribOffset(index, pname) {\n throw new Error('Not implemented by mock');\n }\n hint(target, mode) {\n var _a;\n if (target === this.GENERATE_MIPMAP_HINT) {\n this.state.GENERATE_MIPMAP_HINT = mode;\n }\n else if (target === this.FRAGMENT_SHADER_DERIVATIVE_HINT) {\n this.state.FRAGMENT_SHADER_DERIVATIVE_HINT = mode;\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.hint(target, mode);\n }\n isContextLost() {\n return false;\n }\n isFramebuffer(framebuffer) {\n let result;\n if (framebuffer === null) {\n result = false;\n }\n else if (this.framebuffers.has(framebuffer)) {\n result = this.framebuffers.get(framebuffer).is_framebuffer;\n }\n else {\n result = false;\n }\n if (this.passthrough !== null) {\n const real_result = this.passthrough.isFramebuffer(framebuffer);\n if (real_result !== result) {\n console.error('WebGL mock error: isFramebuffer results differ between implementation and mock.');\n result = real_result;\n }\n }\n return result;\n }\n isProgram(program) {\n let result;\n if (program === null) {\n result = false;\n }\n else if (this.programs.has(program)) {\n result = this.programs.get(program).is_program;\n }\n else {\n result = false;\n }\n if (this.passthrough !== null) {\n const real_result = this.passthrough.isProgram(program);\n if (real_result !== result) {\n console.error('WebGL mock error: isRenderbuffer results differ between implementation and mock.');\n result = real_result;\n }\n }\n return result;\n }\n isRenderbuffer(renderbuffer) {\n let result;\n if (renderbuffer === null) {\n result = false;\n }\n else if (this.renderbuffers.has(renderbuffer)) {\n result = this.renderbuffers.get(renderbuffer).is_renderbuffer;\n }\n else {\n result = false;\n }\n if (this.passthrough !== null) {\n const real_result = this.passthrough.isRenderbuffer(renderbuffer);\n if (real_result !== result) {\n console.error('WebGL mock error: isRenderbuffer results differ between implementation and mock.');\n result = real_result;\n }\n }\n return result;\n }\n isShader(shader) {\n let result;\n if (shader === null) {\n result = false;\n }\n else {\n result = this.shaders.has(shader);\n }\n if (this.passthrough !== null) {\n const real_result = this.passthrough.isShader(shader);\n if (real_result !== result) {\n console.error('WebGL mock error: isShader results differ between implementation and mock.');\n result = real_result;\n }\n }\n return result;\n }\n isTexture(texture) {\n let result;\n if (texture === null) {\n result = false;\n }\n else if (this.textures.has(texture)) {\n result = this.textures.get(texture).is_texture;\n }\n else {\n result = false;\n }\n if (this.passthrough !== null) {\n const real_result = this.passthrough.isTexture(texture);\n if (real_result !== result) {\n console.error('WebGL mock error: isTexture results differ between implementation and mock.');\n result = real_result;\n }\n }\n return result;\n }\n lineWidth(width) {\n var _a;\n this.state.LINE_WIDTH = Math.min(this.capabilities.ALIASED_POINT_SIZE_RANGE.at(1), Math.max(this.capabilities.ALIASED_POINT_SIZE_RANGE.at(0), width));\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.lineWidth(width);\n }\n linkProgram(program) {\n if (this.passthrough === null) {\n this.programs.get(program).is_program = true;\n this.programs.get(program).link_status = true;\n }\n else {\n this.passthrough.linkProgram(program);\n this.programs.get(program).is_program = this.passthrough.isProgram(program);\n this.programs.get(program).link_status = this.passthrough.getProgramParameter(program, this.passthrough.LINK_STATUS);\n }\n }\n pixelStorei(pname, param) {\n var _a;\n const bool_value = typeof param === 'boolean' ? param : (!!param);\n if (pname === this.UNPACK_FLIP_Y_WEBGL) {\n this.state.UNPACK_FLIP_Y_WEBGL = bool_value;\n }\n else if (pname === this.UNPACK_PREMULTIPLY_ALPHA_WEBGL) {\n this.state.UNPACK_PREMULTIPLY_ALPHA_WEBGL = bool_value;\n }\n if (typeof param === 'number') {\n if (pname === this.PACK_ALIGNMENT) {\n this.state.PACK_ALIGNMENT = param;\n }\n else if (pname === this.UNPACK_ALIGNMENT) {\n this.state.UNPACK_ALIGNMENT = param;\n }\n else if (pname === this.UNPACK_COLORSPACE_CONVERSION_WEBGL) {\n this.state.UNPACK_COLORSPACE_CONVERSION_WEBGL = param;\n }\n else if (pname === this.PACK_ROW_LENGTH) {\n this.state.PACK_ROW_LENGTH = param;\n }\n else if (pname === this.PACK_SKIP_PIXELS) {\n this.state.PACK_SKIP_PIXELS = param;\n }\n else if (pname === this.PACK_SKIP_ROWS) {\n this.state.PACK_SKIP_ROWS = param;\n }\n else if (pname === this.UNPACK_ROW_LENGTH) {\n this.state.UNPACK_ROW_LENGTH = param;\n }\n else if (pname === this.UNPACK_IMAGE_HEIGHT) {\n this.state.UNPACK_IMAGE_HEIGHT = param;\n }\n else if (pname === this.UNPACK_SKIP_PIXELS) {\n this.state.UNPACK_SKIP_PIXELS = param;\n }\n else if (pname === this.UNPACK_SKIP_ROWS) {\n this.state.UNPACK_SKIP_ROWS = param;\n }\n else if (pname === this.UNPACK_SKIP_IMAGES) {\n this.state.UNPACK_SKIP_IMAGES = param;\n }\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.pixelStorei(pname, param);\n }\n polygonOffset(factor, units) {\n var _a;\n this.state.POLYGON_OFFSET_FACTOR = factor;\n this.state.POLYGON_OFFSET_UNITS = units;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.polygonOffset(factor, units);\n }\n renderbufferStorage(target, internalformat, width, height) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.renderbufferStorage(target, internalformat, width, height);\n }\n renderbufferStorageMultisample(target, samples, internalformat, width, height) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.renderbufferStorageMultisample(target, samples, internalformat, width, height);\n }\n sampleCoverage(value, invert) {\n var _a;\n this.state.SAMPLE_COVERAGE_VALUE = value;\n this.state.SAMPLE_COVERAGE_INVERT = invert;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.sampleCoverage(value, invert);\n }\n scissor(x, y, width, height) {\n var _a;\n this.state.SCISSOR_BOX.set([x, y, width, height]);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.scissor(x, y, width, height);\n }\n shaderSource(shader, source) {\n var _a;\n this.shaders.get(shader).source = source;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.shaderSource(shader, source);\n }\n stencilFunc(func, ref, mask) {\n var _a;\n this.state.STENCIL_FUNC = func;\n this.state.STENCIL_REF = ref;\n this.state.STENCIL_VALUE_MASK = mask;\n this.state.STENCIL_BACK_FUNC = func;\n this.state.STENCIL_BACK_REF = ref;\n this.state.STENCIL_BACK_VALUE_MASK = mask;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.stencilFunc(func, ref, mask);\n }\n stencilFuncSeparate(face, func, ref, mask) {\n var _a;\n if (face === this.FRONT || face === this.FRONT_AND_BACK) {\n this.state.STENCIL_FUNC = func;\n this.state.STENCIL_REF = ref;\n this.state.STENCIL_VALUE_MASK = mask;\n }\n if (face === this.BACK || face === this.FRONT_AND_BACK) {\n this.state.STENCIL_BACK_FUNC = func;\n this.state.STENCIL_BACK_REF = ref;\n this.state.STENCIL_BACK_VALUE_MASK = mask;\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.stencilFuncSeparate(face, func, ref, mask);\n }\n stencilMask(mask) {\n var _a;\n this.state.STENCIL_WRITEMASK = mask;\n this.state.STENCIL_BACK_WRITEMASK = mask;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.stencilMask(mask);\n }\n stencilMaskSeparate(face, mask) {\n var _a;\n if (face === this.FRONT || face === this.FRONT_AND_BACK) {\n this.state.STENCIL_WRITEMASK = mask;\n }\n if (face === this.BACK || face === this.FRONT_AND_BACK) {\n this.state.STENCIL_BACK_WRITEMASK = mask;\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.stencilMask(mask);\n }\n stencilOp(fail, zfail, zpass) {\n var _a;\n this.state.STENCIL_FAIL = fail;\n this.state.STENCIL_BACK_FAIL = fail;\n this.state.STENCIL_PASS_DEPTH_FAIL = zfail;\n this.state.STENCIL_BACK_PASS_DEPTH_FAIL = zfail;\n this.state.STENCIL_PASS_DEPTH_PASS = zpass;\n this.state.STENCIL_BACK_PASS_DEPTH_PASS = zpass;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.stencilOp(fail, zfail, zpass);\n }\n stencilOpSeparate(face, fail, zfail, zpass) {\n var _a;\n if (face === this.FRONT || face === this.FRONT_AND_BACK) {\n this.state.STENCIL_FAIL = fail;\n this.state.STENCIL_PASS_DEPTH_FAIL = zfail;\n this.state.STENCIL_PASS_DEPTH_PASS = zpass;\n }\n if (face === this.BACK || face === this.FRONT_AND_BACK) {\n this.state.STENCIL_BACK_FAIL = fail;\n this.state.STENCIL_BACK_PASS_DEPTH_FAIL = zfail;\n this.state.STENCIL_BACK_PASS_DEPTH_PASS = zpass;\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.stencilOpSeparate(face, fail, zfail, zpass);\n }\n texStorage2D(target, levels, internalformat, width, height) {\n var _a;\n if (this.currently_bound_textures.has(target) || this.currently_bound_textures.get(target) === null) {\n console.error('no texture bound to target: ' + target);\n }\n else if (!this.textures.has(this.currently_bound_textures.get(target))) {\n console.error('mock error, missing texture');\n }\n else {\n const texture = this.currently_bound_textures.get(target);\n const mock_texture = this.textures.get(texture);\n mock_texture.immutable_format = true;\n mock_texture.immutable_levels = levels;\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.texStorage2D(target, levels, internalformat, width, height);\n }\n texStorage3D(target, levels, internalformat, width, height, depth) {\n var _a;\n if (this.currently_bound_textures.has(target) || this.currently_bound_textures.get(target) === null) {\n console.error('no texture bound to target: ' + target);\n }\n else if (!this.textures.has(this.currently_bound_textures.get(target))) {\n console.error('mock error, missing texture');\n }\n else {\n const texture = this.currently_bound_textures.get(target);\n const mock_texture = this.textures.get(texture);\n mock_texture.immutable_format = true;\n mock_texture.immutable_levels = levels;\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.texStorage3D(target, levels, internalformat, width, height, depth);\n }\n texImage2D(target, level, internalformat, width_format, height_type, border_source, format, type, pboOffset_source_pixels, srcOffset) {\n var _a, _b, _c, _d;\n if (typeof border_source === 'number') {\n if (format === undefined || type === undefined || pboOffset_source_pixels === undefined) {\n console.error('Invalid mock overload implementation');\n }\n else if (srcOffset === undefined) {\n if (typeof pboOffset_source_pixels === 'number') {\n console.error('Invalid mock overload implementation');\n }\n else if (pboOffset_source_pixels !== undefined) {\n if (pboOffset_source_pixels === null) {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.texImage2D(target, level, internalformat, width_format, height_type, border_source, format, type, null);\n }\n else {\n // Here we have to cast as any because Typescript doesn't understand\n return (_b = this.passthrough) === null || _b === void 0 ? void 0 : _b.texImage2D(target, level, internalformat, width_format, height_type, border_source, format, type, pboOffset_source_pixels);\n }\n }\n }\n else {\n if (pboOffset_source_pixels === null) {\n console.error('Invalid mock overload implementation');\n }\n return (_c = this.passthrough) === null || _c === void 0 ? void 0 : _c.texImage2D(target, level, internalformat, width_format, height_type, border_source, format, type, pboOffset_source_pixels, srcOffset);\n }\n }\n else {\n return (_d = this.passthrough) === null || _d === void 0 ? void 0 : _d.texImage2D(target, level, internalformat, width_format, height_type, border_source);\n }\n }\n texSubImage2D(target, level, xoffset, yoffset, width_format, height_type, format_source, type, source_srcData_pboOffset_pixels, srcOffset) {\n var _a, _b, _c, _d;\n if (typeof format_source !== 'number') {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.texSubImage2D(target, level, xoffset, yoffset, width_format, height_type, format_source);\n }\n else {\n if (type === undefined) {\n console.error('Invalid mock overload implementation');\n }\n else if (srcOffset !== undefined) {\n if (source_srcData_pboOffset_pixels === null) {\n console.error('Invalid mock overload implementation');\n }\n return (_b = this.passthrough) === null || _b === void 0 ? void 0 : _b.texSubImage2D(target, level, xoffset, yoffset, width_format, height_type, format_source, type, source_srcData_pboOffset_pixels, srcOffset);\n }\n else if (typeof source_srcData_pboOffset_pixels === 'number') {\n return (_c = this.passthrough) === null || _c === void 0 ? void 0 : _c.texSubImage2D(target, level, xoffset, yoffset, width_format, height_type, format_source, type, source_srcData_pboOffset_pixels);\n }\n else {\n // Here we have to cast as any because Typescript doesn't understand\n return (_d = this.passthrough) === null || _d === void 0 ? void 0 : _d.texSubImage2D(target, level, xoffset, yoffset, width_format, height_type, format_source, type, source_srcData_pboOffset_pixels);\n }\n }\n }\n texImage3D(target, level, internalformat, width, height, depth, border, format, type, srcData, srcOffset) {\n var _a, _b;\n if (srcOffset !== undefined) {\n if (typeof srcData === 'number') {\n console.error('Invalid mock overload implementation');\n }\n else if (srcData === null) {\n console.error('Invalid mock overload implementation');\n }\n else {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.texImage3D(target, level, internalformat, width, height, depth, border, format, type, srcData, srcOffset);\n }\n }\n else {\n // Here we have to cast as any because Typescript doesn't understand\n return (_b = this.passthrough) === null || _b === void 0 ? void 0 : _b.texImage3D(target, level, internalformat, width, height, depth, border, format, type, srcData);\n }\n }\n texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData, srcOffset) {\n var _a, _b;\n if (srcOffset !== undefined) {\n if (typeof srcData === 'number') {\n console.error('Invalid mock overload implementation');\n }\n else {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData, srcOffset);\n }\n }\n else {\n // Here we have to cast as any because Typescript doesn't understand\n return (_b = this.passthrough) === null || _b === void 0 ? void 0 : _b.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData);\n }\n }\n texParameterf(target, pname, param) {\n var _a;\n this.set_tex_parameter_internal(target, pname, param);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.texParameterf(target, pname, param);\n }\n texParameteri(target, pname, param) {\n var _a;\n this.set_tex_parameter_internal(target, pname, param);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.texParameteri(target, pname, param);\n }\n uniform1f(location, x) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform1f(location, x);\n }\n uniform1fv(location, v, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform1fv(location, v, srcOffset, srcLength);\n }\n uniform1i(location, x) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform1i(location, x);\n }\n uniform1iv(location, v, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform1iv(location, v, srcOffset, srcLength);\n }\n uniform2f(location, x, y) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform2f(location, x, y);\n }\n uniform2fv(location, v, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform2fv(location, v, srcOffset, srcLength);\n }\n uniform2i(location, x, y) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform2i(location, x, y);\n }\n uniform2iv(location, v, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform2iv(location, v, srcOffset, srcLength);\n }\n uniform3f(location, x, y, z) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform3f(location, x, y, z);\n }\n uniform3fv(location, v, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform3fv(location, v, srcOffset, srcLength);\n }\n uniform3i(location, x, y, z) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform3i(location, x, y, z);\n }\n uniform3iv(location, v, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform3iv(location, v, srcOffset, srcLength);\n }\n uniform4f(location, x, y, z, w) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform4f(location, x, y, z, w);\n }\n uniform4fv(location, v, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform4fv(location, v, srcOffset, srcLength);\n }\n uniform4i(location, x, y, z, w) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform4i(location, x, y, z, w);\n }\n uniform4iv(location, v, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform4iv(location, v, srcOffset, srcLength);\n }\n uniformMatrix2fv(location, transpose, value, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniformMatrix2fv(location, transpose, value, srcOffset, srcLength);\n }\n uniformMatrix3fv(location, transpose, value, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniformMatrix3fv(location, transpose, value, srcOffset, srcLength);\n }\n uniformMatrix4fv(location, transpose, value, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniformMatrix4fv(location, transpose, value, srcOffset, srcLength);\n }\n uniform1ui(location, v0) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform1ui(location, v0);\n }\n uniform1uiv(location, data, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform1uiv(location, data, srcOffset, srcLength);\n }\n uniform2ui(location, v0, v1) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform2ui(location, v0, v1);\n }\n uniform2uiv(location, data, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform2uiv(location, data, srcOffset, srcLength);\n }\n uniform3ui(location, v0, v1, v2) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform3ui(location, v0, v1, v2);\n }\n uniform3uiv(location, data, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform3uiv(location, data, srcOffset, srcLength);\n }\n uniform4ui(location, v0, v1, v2, v3) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform4ui(location, v0, v1, v2, v3);\n }\n uniform4uiv(location, data, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniform4uiv(location, data, srcOffset, srcLength);\n }\n uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);\n }\n uniformMatrix2x3fv(location, transpose, data, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniformMatrix2x3fv(location, transpose, data, srcOffset, srcLength);\n }\n uniformMatrix2x4fv(location, transpose, data, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniformMatrix2x4fv(location, transpose, data, srcOffset, srcLength);\n }\n uniformMatrix3x2fv(location, transpose, data, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniformMatrix3x2fv(location, transpose, data, srcOffset, srcLength);\n }\n uniformMatrix3x4fv(location, transpose, data, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniformMatrix3x4fv(location, transpose, data, srcOffset, srcLength);\n }\n uniformMatrix4x2fv(location, transpose, data, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniformMatrix4x2fv(location, transpose, data, srcOffset, srcLength);\n }\n uniformMatrix4x3fv(location, transpose, data, srcOffset, srcLength) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.uniformMatrix4x3fv(location, transpose, data, srcOffset, srcLength);\n }\n useProgram(program) {\n var _a;\n this.state.CURRENT_PROGRAM = program;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.useProgram(program);\n }\n validateProgram(program) {\n if (this.passthrough === null) {\n this.programs.get(program).validate_status = true;\n }\n else {\n this.passthrough.validateProgram(program);\n this.programs.get(program).validate_status = !!this.passthrough.getProgramParameter(program, this.passthrough.VALIDATE_STATUS);\n }\n }\n vertexAttrib1f(index, x) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttrib1f(index, x);\n }\n vertexAttrib1fv(index, values) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttrib1fv(index, values);\n }\n vertexAttrib2f(index, x, y) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttrib2f(index, x, y);\n }\n vertexAttrib2fv(index, values) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttrib2fv(index, values);\n }\n vertexAttrib3f(index, x, y, z) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttrib3f(index, x, y, z);\n }\n vertexAttrib3fv(index, values) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttrib3fv(index, values);\n }\n vertexAttrib4f(index, x, y, z, w) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttrib4f(index, x, y, z, w);\n }\n vertexAttrib4fv(index, values) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttrib4fv(index, values);\n }\n vertexAttribPointer(index, size, type, normalized, stride, offset) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttribPointer(index, size, type, normalized, stride, offset);\n }\n vertexAttribI4i(index, x, y, z, w) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttribI4i(index, x, y, z, w);\n }\n vertexAttribI4iv(index, values) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttribI4iv(index, values);\n }\n vertexAttribI4ui(index, x, y, z, w) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttribI4ui(index, x, y, z, w);\n }\n vertexAttribI4uiv(index, values) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttribI4uiv(index, values);\n }\n vertexAttribIPointer(index, size, type, stride, offset) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttribIPointer(index, size, type, stride, offset);\n }\n viewport(x, y, width, height) {\n var _a;\n this.state.VIEWPORT.set([x, y, width, height]);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.viewport(x, y, width, height);\n }\n readPixels(x, y, width, height, format, type, dstData, dstOffset) {\n var _a, _b, _c;\n if (dstOffset !== undefined) {\n if (dstData === null || typeof dstData === 'number') {\n console.error('Invalid mock overload implementation');\n }\n else {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.readPixels(x, y, width, height, format, type, dstData, dstOffset);\n }\n }\n else if (typeof dstData === 'number') {\n return (_b = this.passthrough) === null || _b === void 0 ? void 0 : _b.readPixels(x, y, width, height, format, type, dstData);\n }\n else {\n return (_c = this.passthrough) === null || _c === void 0 ? void 0 : _c.readPixels(x, y, width, height, format, type, dstData);\n }\n }\n // WebGL 2\n /**\n * Progress checklist:\n * - Implement queries - check\n * - Implement samplers - check\n * - Implement transform feedback - check\n * - Implement sync - check\n * - Implement VAO - check\n * - Add missing forwarding functions\n */\n drawArraysInstanced(mode, first, count, instanceCount) {\n var _a;\n this.fake_query_data_for_draw(count * instanceCount);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.drawArraysInstanced(mode, first, count, instanceCount);\n }\n drawElementsInstanced(mode, count, type, offset, instanceCount) {\n var _a;\n this.fake_query_data_for_draw(count * instanceCount);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.drawElementsInstanced(mode, count, type, offset, instanceCount);\n }\n vertexAttribDivisor(index, divisor) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.vertexAttribDivisor(index, divisor);\n }\n createQuery() {\n let query;\n if (this.passthrough === null) {\n query = {};\n }\n else {\n query = this.passthrough.createQuery();\n }\n if (query === null)\n return null;\n this.queries.set(query, {\n actual_query: query,\n target: null,\n value: 0,\n is_query: false\n });\n return query;\n }\n deleteQuery(query) {\n var _a;\n if (query !== null) {\n if (this.current_query_any_samples_passed === query)\n this.current_query_any_samples_passed = null;\n if (this.current_query_any_samples_passed_conservative === query)\n this.current_query_any_samples_passed_conservative = null;\n if (this.current_query_transform_feedback_primitives_written === query)\n this.current_query_transform_feedback_primitives_written = null;\n this.queries.delete(query);\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.deleteQuery(query);\n }\n beginQuery(target, query) {\n var _a;\n // TODO: Make sure ANY_SAMPLES_PASSED and ANY_SAMPLES_PASSED_CONSERVATIVE can't run simultaneously\n if (target === this.ANY_SAMPLES_PASSED) {\n this.current_query_any_samples_passed = query;\n }\n else if (target === this.ANY_SAMPLES_PASSED_CONSERVATIVE) {\n this.current_query_any_samples_passed_conservative = query;\n }\n else if (target === this.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN) {\n this.current_query_transform_feedback_primitives_written = query;\n }\n else {\n console.error('Invalid query target!');\n }\n this.queries.get(query).target = target;\n this.queries.get(query).value = 0;\n this.queries.get(query).is_query = true;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.beginQuery(target, query);\n }\n endQuery(target) {\n var _a;\n if (target === this.ANY_SAMPLES_PASSED) {\n this.current_query_any_samples_passed = null;\n }\n else if (target === this.ANY_SAMPLES_PASSED_CONSERVATIVE) {\n this.current_query_any_samples_passed_conservative = null;\n }\n else if (target === this.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN) {\n this.current_query_transform_feedback_primitives_written = null;\n }\n else {\n console.error('Invalid query target!');\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.endQuery(target);\n }\n getQuery(target, pname) {\n if (pname !== this.CURRENT_QUERY) {\n console.error('Invalid pname: ' + pname);\n }\n let result;\n if (target === this.ANY_SAMPLES_PASSED) {\n result = this.current_query_any_samples_passed;\n }\n else if (target === this.ANY_SAMPLES_PASSED_CONSERVATIVE) {\n result = this.current_query_any_samples_passed_conservative;\n }\n else if (target === this.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN) {\n result = this.current_query_transform_feedback_primitives_written;\n }\n else {\n console.error('Invalid query target!');\n result = null;\n }\n if (this.passthrough !== null) {\n const real_result = this.passthrough.getQuery(target, pname);\n if (real_result !== result) {\n console.error('Mocking error: mismatching queries for target: ' + target);\n result = real_result;\n }\n }\n return result;\n }\n getQueryParameter(query, pname) {\n if (this.passthrough === null) {\n const our_query = this.queries.get(query);\n if (pname === this.QUERY_RESULT_AVAILABLE) {\n return our_query.is_query;\n }\n else if (pname === this.QUERY_RESULT) {\n return our_query.value;\n }\n else {\n console.error('Invalid query parameter');\n }\n }\n else {\n return this.passthrough.getQueryParameter(query, pname);\n }\n }\n isQuery(query) {\n let result;\n if (query === null || !this.queries.has(query)) {\n result = false;\n }\n else {\n result = this.queries.get(query).is_query;\n }\n if (this.passthrough !== null) {\n const real_result = this.passthrough.isQuery(query);\n if (real_result !== result) {\n console.error('Mock error! Mismatching between state.');\n result = real_result;\n }\n }\n return result;\n }\n createSampler() {\n let sampler;\n if (this.passthrough === null) {\n sampler = {};\n }\n else {\n sampler = this.passthrough.createSampler();\n }\n if (sampler === null)\n return null;\n this.samplers.set(sampler, {\n actual_sampler: sampler,\n sampler_configuration: Object.assign({}, this.default_sampler_configuration)\n });\n return sampler;\n }\n deleteSampler(sampler) {\n var _a;\n if (sampler !== null) {\n this.samplers.delete(sampler);\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.deleteSampler(sampler);\n }\n isSampler(sampler) {\n let result = sampler === null ? false : this.samplers.has(sampler);\n if (this.passthrough !== null) {\n const real_result = this.passthrough.isSampler(sampler);\n if (real_result !== result) {\n console.error('Mocking error: mismatching state');\n result = real_result;\n }\n }\n return result;\n }\n bindSampler(unit, sampler) {\n var _a;\n this.active_samplers[unit] = sampler;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.bindSampler(unit, sampler);\n }\n getSamplerParameter(sampler, pname) {\n let result;\n if (this.samplers.has(sampler)) {\n result = this.get_sampler_configuration_parameter(this.samplers.get(sampler).sampler_configuration, pname);\n }\n else {\n result = null;\n }\n if (this.passthrough !== null) {\n const real_result = this.passthrough.getSamplerParameter(sampler, pname);\n if (real_result !== result) {\n console.error('Mock error: mismatching state');\n result = real_result;\n }\n }\n return result;\n }\n samplerParameterf(sampler, pname, param) {\n var _a;\n if (!this.samplers.has(sampler)) {\n console.error('Invalid sampler object');\n }\n else {\n this.set_sampler_configuration_parameter(this.samplers.get(sampler).sampler_configuration, pname, param);\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.samplerParameterf(sampler, pname, param);\n }\n samplerParameteri(sampler, pname, param) {\n var _a;\n if (!this.samplers.has(sampler)) {\n console.error('Invalid sampler object');\n }\n else {\n this.set_sampler_configuration_parameter(this.samplers.get(sampler).sampler_configuration, pname, param);\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.samplerParameteri(sampler, pname, param);\n }\n createTransformFeedback() {\n let tf;\n if (this.passthrough === null) {\n tf = {};\n }\n else {\n tf = this.passthrough.createTransformFeedback();\n }\n if (tf === null)\n return null;\n this.transform_feedbacks.set(tf, {\n actual_tf: tf,\n is_tf: false,\n varyings: new Map()\n });\n return tf;\n }\n deleteTransformFeedback(tf) {\n if (tf !== null) {\n this.transform_feedbacks.delete(tf);\n if (tf === this.state.TRANSFORM_FEEDBACK_BINDING) {\n this.state.TRANSFORM_FEEDBACK_BINDING = null;\n }\n }\n }\n beginTransformFeedback(primitiveMode) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.beginTransformFeedback(primitiveMode);\n }\n endTransformFeedback() {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.endTransformFeedback();\n }\n isTransformFeedback(tf) {\n let result;\n if (tf === null || !this.transform_feedbacks.has(tf)) {\n result = false;\n }\n else {\n result = this.transform_feedbacks.get(tf).is_tf;\n }\n if (this.passthrough !== null) {\n const real_result = this.passthrough.isTransformFeedback(tf);\n if (real_result !== result) {\n console.error('Mock error: mismatching state');\n result = real_result;\n }\n }\n return result;\n }\n bindTransformFeedback(target, tf) {\n var _a;\n if (target === this.TRANSFORM_FEEDBACK) {\n this.state.TRANSFORM_FEEDBACK_BINDING = tf;\n if (tf !== null) {\n this.transform_feedbacks.get(tf).is_tf = true;\n }\n }\n else {\n console.error('Invalid target for bindTransformFeedback. Must be TRANSFORM_FEEDBACK');\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.bindTransformFeedback(target, tf);\n }\n transformFeedbackVaryings(program, varyings, bufferMode) {\n var _a;\n const program_state = {\n varyings: [...varyings],\n buffer_mode: bufferMode\n };\n this.transform_feedbacks.get(program).varyings.set(program, program_state);\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.transformFeedbackVaryings(program, varyings, bufferMode);\n }\n getTransformFeedbackVarying(program, index) {\n var _a;\n if (this.passthrough === null) {\n console.error('getTransformFeedbackVarying is not implemented by mock.');\n return null;\n }\n else {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.getTransformFeedbackVarying(program, index);\n }\n }\n pauseTransformFeedback() {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.pauseTransformFeedback();\n }\n resumeTransformFeedback() {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.resumeTransformFeedback();\n }\n fenceSync(condition, flags) {\n let sync;\n if (this.passthrough === null) {\n sync = {};\n }\n else {\n sync = this.passthrough.fenceSync(condition, flags);\n }\n return sync;\n }\n deleteSync(sync) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.deleteSync(sync);\n }\n clientWaitSync(sync, flags, timeout) {\n if (this.passthrough === null) {\n return this.CONDITION_SATISFIED;\n }\n else {\n return this.passthrough.clientWaitSync(sync, flags, timeout);\n }\n }\n waitSync(sync, flags, timeout) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.waitSync(sync, flags, timeout);\n }\n getSyncParameter(sync, pname) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.getSyncParameter(sync, pname);\n }\n isSync(sync) {\n if (this.passthrough === null) {\n return sync !== null;\n }\n else {\n return this.passthrough.isSync(sync);\n }\n }\n createVertexArray() {\n let vao;\n if (this.passthrough === null) {\n vao = {};\n }\n else {\n vao = this.passthrough.createVertexArray();\n }\n return vao;\n }\n deleteVertexArray(vertexArray) {\n var _a;\n if (this.state.VERTEX_ARRAY_BINDING === vertexArray) {\n this.state.VERTEX_ARRAY_BINDING = null;\n }\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.deleteVertexArray(vertexArray);\n }\n bindVertexArray(array) {\n var _a;\n this.state.VERTEX_ARRAY_BINDING = array;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.bindVertexArray(array);\n }\n isVertexArray(vertexArray) {\n if (this.passthrough === null) {\n return vertexArray !== null;\n }\n else {\n return this.passthrough.isVertexArray(vertexArray);\n }\n }\n copyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size) {\n var _a;\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.copyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);\n }\n getFragDataLocation(program, name) {\n var _a;\n if (this.passthrough === null) {\n return 0;\n }\n else {\n return (_a = this.passthrough) === null || _a === void 0 ? void 0 : _a.getFragDataLocation(program, name);\n }\n }\n getIndexedParameter(target, index) {\n throw new Error('Not implemented by mock.');\n }\n getInternalformatParameter(target, internalformat, pname) {\n if (target !== this.RENDERBUFFER) {\n console.error('Invalid target');\n }\n if (pname !== this.SAMPLES) {\n console.error('Invalid pname');\n }\n if (this.passthrough === null) {\n return new Int32Array([4, 2]);\n }\n else {\n return this.passthrough.getInternalformatParameter(target, internalformat, pname);\n }\n }\n}\n//# sourceMappingURL=WebGLMock.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ui_mesh.vertex.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'ui_meshVertexShader';\nconst shader = `precision mediump float;\nattribute vec3 position;\nattribute vec4 color;\nuniform mat4 viewProjection;\nattribute vec4 world0;\nattribute vec4 world1;\nattribute vec4 world2;\nattribute vec4 world3;\nattribute vec4 viewer_albedo_alpha_attribute;\nvarying vec4 vertexColor;\nvarying vec3 worldPosition;\nvoid main() {\nvertexColor = color * viewer_albedo_alpha_attribute;\nmat4 worldMatrix = mat4(world0, world1, world2, world3);\nworldPosition = (worldMatrix * vec4(position, 1.)).xyz;\ngl_Position = viewProjection * vec4(worldPosition, 1.);\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ui_meshVertexShader = { name, shader };\n//# sourceMappingURL=ui_mesh.vertex.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/ui_mesh.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'ui_meshPixelShader';\nconst shader = `precision mediump float;\nvarying vec4 vertexColor;\nvarying vec3 worldPosition;\nvoid main() {\n#ifdef WEBGL2\nvec3 X = dFdx(worldPosition);\nvec3 Y = dFdy(worldPosition);\nvec3 normal = normalize(cross(X,Y));\nvec3 shade = vertexColor.xyz * (normal.y * 0.25 + 0.75);\n#else\nvec3 shade = vertexColor.xyz;\n#endif\ngl_FragColor = vec4(shade, vertexColor.w);\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ui_meshPixelShader = { name, shader };\n//# sourceMappingURL=ui_mesh.fragment.js.map","import { ShaderMaterial as BABYLON_ShaderMaterial } from '@inter-ikea-betrakta-babylonjs/core/Materials/shaderMaterial.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nimport '../shaders/ui_mesh.vertex.js';\nimport '../shaders/ui_mesh.fragment.js';\nexport const ALBEDO_ALPHA_INSTANCE_ATTRIBUTE_NAME = 'viewer_albedo_alpha_attribute';\nexport class ViewerUiMeshMaterial extends BABYLON_ShaderMaterial {\n constructor(_viewer) {\n super('UiMesh material', _viewer.scene, 'ui_mesh', {\n attributes: ['position', 'color', ALBEDO_ALPHA_INSTANCE_ATTRIBUTE_NAME],\n uniforms: ['viewProjection'],\n needAlphaBlending: true,\n needAlphaTesting: true\n });\n this._viewer = _viewer;\n this.alphaMode = BABYLON_Constants.ALPHA_COMBINE;\n this.transparencyMode = BABYLON_ShaderMaterial.MATERIAL_ALPHABLEND;\n this.depthFunction = BABYLON_Constants.LEQUAL;\n this.backFaceCulling = true;\n this.cullBackFaces = false;\n this.forceDepthWrite = true;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n _afterBind(mesh, effect = null) {\n super._afterBind(mesh, effect);\n effect === null || effect === void 0 ? void 0 : effect.setMatrix('viewProjection', this.getScene().getTransformMatrix());\n }\n}\n//# sourceMappingURL=ViewerUiMeshMaterial.js.map","import { Mesh as BABYLON_Mesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js';\nimport { ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME } from '../material/ViewerMaterial.js';\nimport { Vector4 as BABYLON_Vector4, Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { OutlineLayer } from '../OutlineEffect.js';\nimport { build_bvh_from_mesh } from '../Raycast.js';\nexport function babylon_change_source_mesh(instance, new_source) {\n if (instance.sourceMesh === new_source)\n return;\n instance.sourceMesh.removeInstance(instance);\n instance._unIndexed = new_source._unIndexed;\n // @ts-expect-error\n instance._sourceMesh = new_source;\n new_source.addInstance(instance);\n instance.refreshBoundingInfo();\n instance._syncSubMeshes();\n}\nexport class SceneAssetMesh {\n constructor(viewer, source) {\n this._source_key_variant_meshes = new Map();\n this._instance_to_active_mesh_key = new Map();\n this._custom_geometry = new Map();\n this.viewer = viewer;\n this._source_mesh = source;\n this.source_material = source.material;\n this.setup_custom_instancing_buffers(this._source_mesh);\n // We need to do this, otherwise we don't get updates when certain things update (such as lights being removed)\n this.viewer.scene.addMesh(this._source_mesh, false);\n if (this.source_material !== null) {\n this.viewer.scene.addMaterial(this.source_material);\n }\n this.raycast_acceleration_structure = build_bvh_from_mesh(this._source_mesh);\n }\n dispose() {\n this._source_key_variant_meshes.forEach((mesh_variant) => {\n if (mesh_variant.hasInstances) {\n throw new Error('Mesh Variant disposed while still having instances');\n }\n mesh_variant.dispose(true, false);\n });\n this._source_key_variant_meshes.clear();\n // Do not dispose this._source_mesh, as its owned by our SceneAssetContainer\n this._custom_geometry.forEach((geometry) => {\n if (geometry !== null && !geometry.isDisposed()) {\n geometry.dispose();\n }\n });\n this._custom_geometry.clear();\n }\n /**\n * Will delete the variant source used by the instance if it no longer contains any instances.\n * Should be called after having removed 'instance.babylon_instance' from the list of instances in the given source.\n * The 'source' parameter is thus given manually, as we can't fetch the source mesh from the instance at that point.\n */\n dispose_unused_variant_source(instance, source) {\n if (!source.hasInstances) {\n // Find the source mesh key that this source was created as\n const existing_source_mesh_key = this._instance_to_active_mesh_key.get(instance);\n if (existing_source_mesh_key === undefined) {\n throw new Error('Invalid internal state: instance mesh key is not registered');\n }\n const existing_source = this._source_key_variant_meshes.get(existing_source_mesh_key);\n if (existing_source !== source) {\n throw new Error(this._source_mesh.uniqueId + ': Invalid internal state: variant does not exist or does not match the actual source. Given source: ' + source.name + ', found source: ' + (existing_source === null || existing_source === void 0 ? void 0 : existing_source.name));\n }\n if (existing_source !== this._source_mesh) {\n source.dispose(true, false);\n this._source_key_variant_meshes.delete(existing_source_mesh_key);\n }\n }\n else if (source.instances.length === 1 && source.instances[0] === instance.babylon_instance) {\n throw new Error('Function was called during an invalid state: The given instance is still an instance of the given source. Please delete the instance from the source first.');\n }\n }\n instantiate_mesh_instance(instance) {\n // If we will be the only instance, then we can use our source mesh. This is an optimization to not need to create a source mesh clone, which can be expensive.\n const is_only_instance = this._instance_to_active_mesh_key.size === 0;\n const can_use_source_as_source_mesh = is_only_instance && instance.mesh_variant_key.unique_source_vertex_data_id === null;\n const source_mesh = can_use_source_as_source_mesh ? this._source_mesh : this.get_babylon_source_mesh(instance.mesh_variant_key);\n if (can_use_source_as_source_mesh) {\n // Special case for when we use our source mesh\n this._source_key_variant_meshes.set(instance.mesh_variant_key.hash(), source_mesh);\n this.apply_source_mesh_key_to_mesh(instance.mesh_variant_key, this._source_mesh);\n }\n const babylon_instance = source_mesh.createInstance(source_mesh.name + SceneAssetMesh._unique_mesh_id_counter++);\n babylon_instance.parent = null;\n this._instance_to_active_mesh_key.set(instance, instance.mesh_variant_key.hash());\n babylon_instance.instancedBuffers[OutlineLayer.INSTANCE_DATA_ATTRIBUTE_NAME] = new BABYLON_Vector4(0, 0, 0, 0);\n babylon_instance.instancedBuffers[ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME] = new BABYLON_Vector4(1, 1, 1, 1);\n return babylon_instance;\n }\n update_source_mesh_key_for_instance(instance) {\n if (this._instance_to_active_mesh_key.get(instance) === instance.mesh_variant_key.hash())\n return;\n // If we're the sole instance of our source (which is guaranteed to have been created by us), and the variant we want is not cached, update our existing source instead.\n const try_update_source_in_place = instance.babylon_instance.sourceMesh.instances.length === 1 && !this._source_key_variant_meshes.has(instance.mesh_variant_key.hash());\n // Some in-place updates of source meshes are bad, so with this flag we can block it.\n let can_update_source_in_place = true;\n if (try_update_source_in_place) {\n // Check in-place update compatibility\n // For some reason, can't get this value to update properly in-place. So whenever there's a mismatch, we need to create a new source.\n if (instance.mesh_variant_key.receive_shadows !== instance.babylon_instance.sourceMesh.receiveShadows) {\n can_update_source_in_place = false;\n }\n }\n if (try_update_source_in_place && can_update_source_in_place) {\n if (instance.babylon_instance.sourceMesh.instances[0] !== instance.babylon_instance) {\n throw new Error('Invalid internal state: single source instance does not match our instance');\n }\n // Update the existing source mesh in place\n const existing_source_mesh_key = this._instance_to_active_mesh_key.get(instance);\n if (existing_source_mesh_key === undefined) {\n throw new Error('Invalid internal state: the instance is not registered');\n }\n const existing_source_mesh = instance.babylon_instance.sourceMesh;\n this.apply_source_mesh_key_to_mesh(instance.mesh_variant_key, existing_source_mesh);\n this._source_key_variant_meshes.delete(existing_source_mesh_key);\n this._source_key_variant_meshes.set(instance.mesh_variant_key.hash(), existing_source_mesh);\n }\n else {\n const source = this.get_babylon_source_mesh(instance.mesh_variant_key);\n if (source !== instance.babylon_instance.sourceMesh) {\n const previous_source = instance.babylon_instance.sourceMesh;\n babylon_change_source_mesh(instance.babylon_instance, source);\n this.dispose_unused_variant_source(instance, previous_source);\n }\n }\n this._instance_to_active_mesh_key.set(instance, instance.mesh_variant_key.hash());\n }\n get_babylon_source_mesh(source_mesh_key) {\n var _a;\n const hash = source_mesh_key.hash();\n if (this._source_key_variant_meshes.has(hash)) {\n return this._source_key_variant_meshes.get(hash);\n }\n // This is a lot faster than doing source_mesh.clone.\n const clone = new BABYLON_Mesh('', this._source_mesh._scene, null, null);\n (_a = this._source_mesh.geometry) === null || _a === void 0 ? void 0 : _a.applyToMesh(clone);\n clone.material = this._source_mesh.material;\n // Passing null to the as the parent to the clone function doesn't actually set the parent to null.\n // This causes this clone to show up in the SceneAssetContainer graph which it shouldn't.\n clone.parent = null;\n clone.renderingGroupId = this._source_mesh.renderingGroupId;\n clone.setEnabled(false);\n this.setup_custom_instancing_buffers(clone);\n this._source_key_variant_meshes.set(hash, clone);\n this.apply_source_mesh_key_to_mesh(source_mesh_key, clone);\n return clone;\n }\n apply_source_mesh_key_to_mesh(source_mesh_key, mesh) {\n var _a, _b, _c, _d, _e;\n if (source_mesh_key.custom_material) {\n // Typescript complains about Immutable material here, which is fair, but not sure what's the best solution\n mesh.material = source_mesh_key.custom_material;\n }\n else {\n mesh.material = this.source_material;\n }\n // Custom geometry handling. E.g Cutouts\n if (source_mesh_key.unique_source_vertex_data_id === null) {\n // We don't want custom geometry data\n if (mesh.geometry !== this._source_mesh.geometry) {\n // We had custom geometry, so release it and load our source's mesh data\n (_a = mesh.geometry) === null || _a === void 0 ? void 0 : _a.releaseForMesh(mesh, true);\n (_b = this._source_mesh.geometry) === null || _b === void 0 ? void 0 : _b.applyToMesh(mesh);\n }\n }\n else {\n // Make sure we aren't accidentaly trying to apply custom geometry to our source mesh\n if (mesh === this._source_mesh) {\n throw new Error(\"Invalid state: custom geometry requested on source mesh's data, which is impossible\");\n }\n // We want custom geometry\n const existing_custom_geometry = this._custom_geometry.get(source_mesh_key.unique_source_vertex_data_id);\n if (existing_custom_geometry) {\n // Make sure we haven't accidentaly disposed the existing geometry due to some sort of race condition\n if (existing_custom_geometry.isDisposed()) {\n throw new Error(\"Invalid state: existing custom geometry was disposed\");\n }\n // The custom geometry we want already exists\n if (mesh.geometry !== existing_custom_geometry) {\n // It doesn't match the mesh we have, so we need to apply it\n (_c = mesh.geometry) === null || _c === void 0 ? void 0 : _c.releaseForMesh(mesh, true);\n existing_custom_geometry.applyToMesh(mesh);\n }\n }\n else {\n // The custom geometry we want doesn't exist yet, meaning it should be a copy of our source meshes data\n (_d = mesh.geometry) === null || _d === void 0 ? void 0 : _d.releaseForMesh(mesh, true);\n (_e = this._source_mesh.geometry) === null || _e === void 0 ? void 0 : _e.applyToMesh(mesh);\n mesh.makeGeometryUnique();\n this._custom_geometry.set(source_mesh_key.unique_source_vertex_data_id, mesh.geometry);\n }\n }\n if (mesh.receiveShadows !== source_mesh_key.receive_shadows) {\n mesh.receiveShadows = source_mesh_key.receive_shadows;\n mesh._resyncLightSources(); // This removes some WebGL errors but it feels like there should be a better function to call (TODO: Recheck 4.2)\n }\n const source_matrix_sign = this._source_mesh._getWorldMatrixDeterminant() >= 0.0;\n const wanted_matrix_sign = source_mesh_key.transform_positive_determinant;\n if (source_matrix_sign !== wanted_matrix_sign) {\n mesh.scaling = new BABYLON_Vector3(-mesh.scaling.x, mesh.scaling.y, mesh.scaling.z);\n // If we don't force recompute the world matrix, the mesh can disappear when dealing with negative determinants\n mesh.computeWorldMatrix(true);\n mesh.markAsDirty('');\n }\n }\n setup_custom_instancing_buffers(mesh) {\n mesh.registerInstancedBuffer(OutlineLayer.INSTANCE_DATA_ATTRIBUTE_NAME, OutlineLayer.INSTANCE_DATA_ATTRIBUTE_STRIDE);\n mesh.registerInstancedBuffer(ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME, 4);\n mesh.instancedBuffers[OutlineLayer.INSTANCE_DATA_ATTRIBUTE_NAME] = new BABYLON_Vector4(0, 0, 0, 0);\n mesh.instancedBuffers[ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME] = new BABYLON_Vector4(1, 1, 1, 1);\n }\n}\nSceneAssetMesh._unique_mesh_id_counter = 0;\n//# sourceMappingURL=SceneAssetMesh.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Mesh as BABYLON_Mesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js';\nimport { TransformNode as BABYLON_TransformNode } from '@inter-ikea-betrakta-babylonjs/core/Meshes/transformNode.js';\nimport { IVector3, IMatrix4, IBoundingBox, ITransformedBoundingBox } from '../api.js';\nimport { ViewerUiMeshMaterial, ALBEDO_ALPHA_INSTANCE_ATTRIBUTE_NAME } from './material/ViewerUiMeshMaterial.js';\nimport { Vector4 as BABYLON_Vector4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Vector3ConstantReference } from './material/PropertyWrappers.js';\nimport { Disposable } from '../utils/Disposable.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nimport { determinant3x3 } from '../Math.js';\nimport { Observable } from '../Observable.js';\nimport { RENDER_LAYER_UI, RenderLayerMask } from './RenderLayer.js';\nimport { Deprecated } from '../utils/Deprecated.js';\nimport { babylon_change_source_mesh } from './scene/SceneAssetMesh.js';\nimport { ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME } from './material/ViewerMaterial.js';\nimport { OutlineLayer } from './OutlineEffect.js';\nlet UiMesh = class UiMesh {\n constructor(viewer) {\n this.viewer = viewer;\n this._instances = new Set();\n this._root = null;\n this._meshes = null;\n this._material = new ViewerUiMeshMaterial(this.viewer);\n this.draw_on_top = false;\n this._local_bounds = IBoundingBox.Invalid();\n }\n get draw_on_top() {\n return this._material.depthFunction === BABYLON_Constants.ALWAYS;\n }\n set draw_on_top(value) {\n const wanted_depth_function = value ? BABYLON_Constants.ALWAYS : BABYLON_Constants.LEQUAL;\n if (this._material.depthFunction !== wanted_depth_function) {\n this._material.depthFunction = wanted_depth_function;\n this.viewer.mark_scene_dirty();\n }\n }\n load_mesh(description) {\n var _a, _b;\n if (this._root !== null) {\n this._instances.forEach((instance) => {\n instance.dispose_meshes();\n });\n (_a = this._meshes) === null || _a === void 0 ? void 0 : _a.forEach((pair) => {\n pair.positive.dispose();\n pair.negative.dispose();\n });\n this._root.dispose();\n this._root = null;\n this._meshes = null;\n }\n this._root = new BABYLON_TransformNode('SourceMesh UiMesh :)');\n const meshes = this.viewer.mesh_manager.create_custom_mesh_babylon({\n positions: description.positions,\n indices: description.indices,\n colors: (_b = description.colors) !== null && _b !== void 0 ? _b : null,\n normals: null,\n tangents: null,\n uv0: null,\n uv1: null\n });\n meshes.forEach((mesh) => { mesh.parent = this._root; });\n this._local_bounds.min = new IVector3(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);\n this._local_bounds.max = new IVector3(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);\n for (let i = 0; i < description.positions.length; i += 3) {\n const x = description.positions[i + 0];\n const y = description.positions[i + 1];\n const z = description.positions[i + 2];\n this._local_bounds.min.x = Math.min(this._local_bounds.min.x, x);\n this._local_bounds.min.y = Math.min(this._local_bounds.min.y, y);\n this._local_bounds.min.z = Math.min(this._local_bounds.min.z, z);\n this._local_bounds.max.x = Math.max(this._local_bounds.max.x, x);\n this._local_bounds.max.y = Math.max(this._local_bounds.max.y, y);\n this._local_bounds.max.z = Math.max(this._local_bounds.max.z, z);\n }\n this._meshes = meshes.map((mesh) => {\n if (mesh instanceof BABYLON_Mesh) {\n mesh.registerInstancedBuffer(OutlineLayer.INSTANCE_DATA_ATTRIBUTE_NAME, OutlineLayer.INSTANCE_DATA_ATTRIBUTE_STRIDE);\n mesh.registerInstancedBuffer(ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME, 4);\n mesh.instancedBuffers[OutlineLayer.INSTANCE_DATA_ATTRIBUTE_NAME] = new BABYLON_Vector4(0, 0, 0, 0);\n mesh.instancedBuffers[ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME] = new BABYLON_Vector4(1, 1, 1, 1);\n }\n else {\n throw new Error('Invalid Babylon mesh type for gizmo mesh');\n }\n mesh.registerInstancedBuffer(ALBEDO_ALPHA_INSTANCE_ATTRIBUTE_NAME, 4);\n mesh.instancedBuffers[ALBEDO_ALPHA_INSTANCE_ATTRIBUTE_NAME] = BABYLON_Vector4.One();\n mesh.material = this._material;\n const negative_mesh = mesh.clone('Negative gizmo source mesh', null, false);\n negative_mesh.scaling.x *= -1.0; // Invert determinant by negating scaling on one axis\n negative_mesh.registerInstancedBuffer(ALBEDO_ALPHA_INSTANCE_ATTRIBUTE_NAME, 4);\n negative_mesh.instancedBuffers[ALBEDO_ALPHA_INSTANCE_ATTRIBUTE_NAME] = BABYLON_Vector4.One();\n return { positive: mesh, negative: negative_mesh };\n });\n this._instances.forEach((instance) => {\n this.load_instance(instance);\n });\n // Disable the mesh so Babylon doesn't see it as an active participant in the scene\n this._root.setEnabled(false);\n }\n dispose() {\n var _a;\n if (this._root !== null) {\n this._instances.forEach((instance) => {\n instance.dispose_meshes();\n });\n (_a = this._meshes) === null || _a === void 0 ? void 0 : _a.forEach((pair) => {\n pair.positive.dispose();\n pair.negative.dispose();\n this._meshes = null;\n });\n this._root.dispose();\n this._root = null;\n }\n this._material.dispose();\n }\n create_instance() {\n const instance = new UiMeshInstance(this);\n this._instances.add(instance);\n this.load_instance(instance);\n return instance;\n }\n dispose_instances() {\n for (const instance of this._instances) {\n instance.dispose();\n }\n }\n create_gizmo() {\n const instance = new Gizmo(this);\n this._instances.add(instance);\n this.load_instance(instance);\n return instance;\n }\n load_instance(instance) {\n var _a;\n instance.dispose_meshes();\n (_a = this._meshes) === null || _a === void 0 ? void 0 : _a.forEach((pair) => {\n if (pair.positive instanceof BABYLON_Mesh) {\n const instanced_mesh = pair.positive.createInstance('gizmo instance');\n instanced_mesh.instancedBuffers[ALBEDO_ALPHA_INSTANCE_ATTRIBUTE_NAME] = instance.color_alpha_factor;\n instance.instances.push(instanced_mesh);\n instanced_mesh.parent = instance.root;\n if (!instanced_mesh.metadata) {\n instanced_mesh.metadata = {};\n }\n instanced_mesh.metadata['gizmo_source_meshes'] = pair;\n }\n });\n instance.update_babylon_mesh_settings();\n this.viewer.mark_scene_dirty();\n }\n disconnect_instance(instance) {\n this._instances.delete(instance);\n }\n get local_bounds() {\n return this._local_bounds;\n }\n};\nUiMesh = __decorate([\n Disposable\n], UiMesh);\nexport { UiMesh };\nexport class UiMeshInstance {\n constructor(mesh) {\n this._parent = null;\n this._render_layer_mask = new RenderLayerMask([RENDER_LAYER_UI]);\n this._disposed_observable = new Observable();\n this.instances = [];\n this.mesh_source = mesh;\n this.root = new BABYLON_TransformNode('gizmo instance');\n this.color_alpha_factor = new BABYLON_Vector4(1, 1, 1, 1);\n this._position = new Vector3ConstantReference(this.root, 'position', this.mesh_source.viewer.mark_scene_dirty.bind(this.mesh_source.viewer));\n this._rotation = new Vector3ConstantReference(this.root, 'rotation', this.mesh_source.viewer.mark_scene_dirty.bind(this.mesh_source.viewer));\n this._scale = new Vector3ConstantReference(this.root, 'scaling', this.mesh_source.viewer.mark_scene_dirty.bind(this.mesh_source.viewer));\n this._color = new Vector3ConstantReference(this, 'color_alpha_factor', this.mesh_source.viewer.mark_scene_dirty.bind(this.mesh_source.viewer));\n this._visible = true;\n this._babylon_world_transform_changed_observable = this.root.onAfterWorldMatrixUpdateObservable.add(() => {\n this.mesh_source.viewer.mark_world_bounds_dirty();\n });\n this.mesh_source.viewer.asset_manager.ui_meshes.add(this);\n }\n update_babylon_mesh_settings() {\n const meshes = this.root.getChildMeshes(false);\n meshes.forEach((mesh) => {\n mesh.layerMask = this._render_layer_mask.bitmap;\n mesh.isVisible = this._visible;\n });\n this.mesh_source.viewer.mark_scene_dirty();\n }\n set_render_layer_mask(mask) {\n if (this._render_layer_mask.bitmap === mask.bitmap)\n return;\n this._render_layer_mask = Object.assign({}, mask);\n this.update_babylon_mesh_settings();\n }\n get_render_layer_mask() {\n return this._render_layer_mask;\n }\n get parent() {\n return this._parent;\n }\n // TODO: Will be changed to Nullable once SceneObject api is ready\n set_parent(gizmo_or_object) {\n if (gizmo_or_object === null) {\n this.root.parent = null;\n this._parent = null;\n // SceneObject\n }\n else if (typeof gizmo_or_object === 'number') {\n const object = this.mesh_source.viewer.viewer_scene.objects.get(gizmo_or_object);\n this.root.parent = object.root;\n this._parent = object;\n // GizmoMeshInstance\n }\n else if ('root' in gizmo_or_object && gizmo_or_object.root instanceof BABYLON_TransformNode) {\n this.root.parent = gizmo_or_object.root;\n this._parent = gizmo_or_object;\n }\n else {\n throw new Error('Invalid parent type for gizmo mesh instance');\n }\n }\n get position() {\n return this._position;\n }\n set position(value) {\n this._position.x = value.x;\n this._position.y = value.y;\n this._position.z = value.z;\n }\n get rotation() {\n return this._rotation;\n }\n set rotation(value) {\n this._rotation.x = value.x;\n this._rotation.y = value.y;\n this._rotation.z = value.z;\n }\n get scale() {\n return this._scale;\n }\n set scale(value) {\n this._scale.x = value.x;\n this._scale.y = value.y;\n this._scale.z = value.z;\n }\n get color_factor() {\n return this._color;\n }\n set color_factor(value) {\n this.color_alpha_factor.x = value.x;\n this.color_alpha_factor.y = value.y;\n this.color_alpha_factor.z = value.z;\n this.mesh_source.viewer.mark_scene_dirty();\n }\n get alpha_factor() {\n return this.color_alpha_factor.w;\n }\n set alpha_factor(value) {\n this.color_alpha_factor.w = value;\n this.mesh_source.viewer.mark_scene_dirty();\n }\n get_world_transform() {\n return this.root.getWorldMatrix().toIMatrix4ToRef(new IMatrix4());\n }\n prepare_for_rendering() {\n const matrix_determinant_sign = Math.sign(determinant3x3(this.root.computeWorldMatrix().m));\n this.instances.forEach((mesh) => {\n if (mesh.metadata) {\n if (mesh.metadata['gizmo_source_meshes']) {\n babylon_change_source_mesh(mesh, mesh.metadata['gizmo_source_meshes'][matrix_determinant_sign >= 0 ? 'positive' : 'negative']);\n }\n }\n });\n }\n set visible(visible) {\n if (this._visible === visible)\n return;\n this._visible = visible;\n if (this.instances.length === 0)\n return;\n this.instances.forEach((instance) => {\n instance.isVisible = this._visible;\n });\n this.mesh_source.viewer.mark_scene_dirty();\n }\n get visible() {\n return this._visible;\n }\n get disposed_observable() {\n return this._disposed_observable;\n }\n dispose_meshes() {\n if (this.instances.length === 0)\n return;\n this.mesh_source.viewer.mark_scene_dirty();\n this.instances.forEach((instance) => {\n instance.dispose(true, false);\n });\n this.instances.length = 0;\n }\n dispose() {\n this._babylon_world_transform_changed_observable.remove();\n this._disposed_observable.notify(this);\n this.dispose_meshes();\n this.mesh_source.disconnect_instance(this);\n const was_deleted = this.mesh_source.viewer.asset_manager.ui_meshes.delete(this);\n if (!was_deleted && this.mesh_source.viewer.get_config().verbose_warnings) {\n console.warn(\"Couldn't find reference to currently disposing UiMeshInstance in AssetManager\");\n }\n this._disposed_observable.dispose();\n }\n get_world_bounds() {\n return new ITransformedBoundingBox(this.mesh_source.local_bounds, this.get_world_transform());\n }\n}\nexport class Gizmo extends UiMeshInstance {\n constructor(mesh) {\n super(mesh);\n this.mesh_source.viewer.asset_manager.gizmos.add(this);\n this._input_handler = this.mesh_source.viewer.create_input_handler(this, [this]);\n }\n get click_observable() {\n return this._input_handler.click_observable;\n }\n get secondary_click_observable() {\n return this._input_handler.secondary_click_observable;\n }\n get drag_begin_observable() {\n return this._input_handler.drag_begin_observable;\n }\n get drag_observable() {\n return this._input_handler.drag_observable;\n }\n get drag_end_observable() {\n return this._input_handler.drag_end_observable;\n }\n get pointer_enter_observable() {\n return this._input_handler.pointer_enter_observable;\n }\n get pointer_leave_observable() {\n return this._input_handler.pointer_leave_observable;\n }\n get drag_interactable() {\n return this._input_handler.drag_begin_observable.has_active_observers ||\n this._input_handler.drag_observable.has_active_observers ||\n this._input_handler.drag_end_observable.has_active_observers;\n }\n get click_interactable() {\n return this._input_handler.click_observable.has_active_observers;\n }\n get hover_interactable() {\n return this._input_handler.pointer_enter_observable.has_active_observers ||\n this._input_handler.pointer_leave_observable.has_active_observers;\n }\n get is_pickable() {\n return this.drag_interactable || this.click_interactable || this.hover_interactable;\n }\n get has_input_handler() {\n return this.drag_interactable || this.click_interactable || this.hover_interactable;\n }\n dispose() {\n this.mesh_source.viewer.interactable_disposed_observable.notify(this);\n const was_deleted = this.mesh_source.viewer.asset_manager.gizmos.delete(this);\n if (!was_deleted && this.mesh_source.viewer.get_config().verbose_warnings) {\n console.warn(\"Couldn't find reference to currently disposing Gizmo in AssetManager\");\n }\n this._input_handler.dispose();\n super.dispose();\n }\n}\n__decorate([\n Deprecated({ new: 'has_input_handler' })\n], Gizmo.prototype, \"is_pickable\", null);\n//# sourceMappingURL=UiMesh.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/soft_shadow_transfer_depth.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'soft_shadow_transfer_depthPixelShader';\nconst shader = `precision highp float;\nvarying vec2 vUV;\nuniform highp sampler2D depthTexture;\nuniform mat4 inverseViewProjectionMatrix;\nvoid main()\n{\nvec3 P = vec3(vUV, texelFetch(depthTexture, ivec2(gl_FragCoord.xy), 0).r) * 2.0 - 1.0;\nvec4 reprojected = inverseViewProjectionMatrix * vec4(P, 1.0);\nreprojected /= reprojected.w;\nreprojected.y = max(reprojected.y, 0.0);\ngl_FragColor = vec4(reprojected.y, 0, 0, 1);\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const soft_shadow_transfer_depthPixelShader = { name, shader };\n//# sourceMappingURL=soft_shadow_transfer_depth.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/soft_shadow_blur.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'soft_shadow_blurPixelShader';\nconst shader = `precision highp float;\nvarying vec2 vUV;\nconst int SAMPLE_COUNT = 16;\nconst float OFFSETS[16] = float[16](\n-14.359376738854206,\n-12.377929569488517,\n-10.396849318746895,\n-8.41608382089975,\n-6.435576703455285,\n-4.455269417428358,\n-2.4751038298192056,\n-0.4950160492928827,\n1.485055021558738,\n3.465172537482815,\n5.445401742210555,\n7.425801606895373,\n9.406430666971303,\n11.38734672691729,\n13.368604221609049,\n15.0\n);\nconst float WEIGHTS[16] = float[16](\n0.0025041984018900386,\n0.00727113041385933,\n0.01802730143570455,\n0.03816459863275913,\n0.06899239816054603,\n0.10650359902176183,\n0.14039677865797573,\n0.15804511975825483,\n0.15192860221604398,\n0.12471881477578442,\n0.0874287482869619,\n0.05233640796478044,\n0.02675285116432407,\n0.011677277520458898,\n0.004352222933779603,\n0.0008999506551151568\n);\nuniform highp sampler2D sourceTexture;\nuniform vec2 direction;\nvoid main() {\nvec4 result = vec4(0.0);\nfor (int i = 0; i < SAMPLE_COUNT; i++) {\nresult += texture(sourceTexture, vUV + direction * OFFSETS[i]).r * WEIGHTS[i];\n}\ngl_FragColor = result;\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const soft_shadow_blurPixelShader = { name, shader };\n//# sourceMappingURL=soft_shadow_blur.fragment.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/soft_shadow_generate_texture.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'soft_shadow_generate_texturePixelShader';\nconst shader = `precision highp float;\nvarying vec2 vUV;\nuniform highp sampler2D sourceTexture;\nuniform float referenceHeight, intensity;\nvoid main()\n{\nfloat h = texture(sourceTexture, vec2(1.0 - vUV.x, vUV.y)).r;\nfloat dh = max(0.0, h - referenceHeight);\nfloat alpha = 1.0 - exp(-dh * intensity);\ngl_FragColor = vec4(0, 0, 0, alpha);\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const soft_shadow_generate_texturePixelShader = { name, shader };\n//# sourceMappingURL=soft_shadow_generate_texture.fragment.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { RenderTargetTexture as BABYLON_RenderTargetTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/renderTargetTexture.js';\nimport { IntegratedDepthRenderer } from './Framebuffer.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nimport { CameraMode, IMatrix4, IVector3 } from '../api.js';\nimport { LiteRenderTarget } from './utility/LiteRenderTarget.js';\nimport { RENDER_LAYER_SHADOW, RenderLayerMask } from './RenderLayer.js';\nimport { EngineCamera } from './camera/EngineCamera.js';\nimport { PostProcess as BABYLON_PostProcess } from '@inter-ikea-betrakta-babylonjs/core/PostProcesses/postProcess.js';\nimport { Camera as BABYLON_Camera } from '@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js';\nimport { TrackedVec3 } from '../Math.js';\nimport { Vector3 as BABYLON_Vector3, Matrix as BABYLON_Matrix } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport './shaders/soft_shadow_transfer_depth.fragment.js';\nimport './shaders/soft_shadow_blur.fragment.js';\nimport './shaders/soft_shadow_generate_texture.fragment.js';\nimport { Disposable } from '../utils/Disposable.js';\nfunction calculate_orthographic(left, right, bottom, top, near_z, far_z) {\n const n = near_z;\n const f = far_z;\n const a = 2.0 / (right - left);\n const b = 2.0 / (top - bottom);\n const c = 2.0 / (f - n);\n const d = (f + n) / (f - n);\n const i0 = (right + left) / (right - left);\n const i1 = (top + bottom) / (top - bottom);\n const projection_matrix = IMatrix4.from_values(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 0.0, -i0, -i1, -d, 1.0);\n return projection_matrix;\n}\nconst TRANSFER_DEPTH_TEXTURE = 'depthTexture';\nconst TRANSFER_INVERSE_VIEW_PROJECTION_MATRIX = 'inverseViewProjectionMatrix';\nconst BLUR_DIRECTION = 'direction';\nconst BLUR_SOURCE_TEXTURE = 'sourceTexture';\nconst SHADOW_PLANE_SOURCE_TEXTURE = 'sourceTexture';\nconst SHADOW_PLANE_REFERENCE_HEIGHT = 'referenceHeight';\nconst SHADOW_PLANE_INTENSITY = 'intensity';\nlet SoftShadowRenderer = class SoftShadowRenderer {\n create_postprocess_render_target(resolution) {\n const render_target = new BABYLON_RenderTargetTexture('', { width: resolution, height: resolution }, this._viewer.scene, false, true, BABYLON_Constants.TEXTURETYPE_HALF_FLOAT, false, BABYLON_Constants.TEXTURE_BILINEAR_SAMPLINGMODE, false, false, false, BABYLON_Constants.TEXTUREFORMAT_RED, false, 1, undefined, false, false);\n render_target.wrapU = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n render_target.wrapV = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n return render_target;\n }\n constructor(viewer, resolution) {\n this._render_layer_mask = new RenderLayerMask([RENDER_LAYER_SHADOW]);\n this._reference_height = 0.0;\n this._intensity = 1.0;\n resolution = Math.floor(resolution);\n this._viewer = viewer;\n this._postprocess_camera = new BABYLON_Camera('babylon why do you need a camera for postprocessing shaders', new BABYLON_Vector3(), this._viewer.scene, false);\n this._resolution = resolution;\n this._tracked_center_position = new TrackedVec3(0, 0, 0);\n this._tracked_size = new TrackedVec3(5, 5, 5);\n this._tracked_center_position.onchange = this.mark_dirty.bind(this);\n this._tracked_size.onchange = this.mark_dirty.bind(this);\n this._render_target = new LiteRenderTarget('soft shadow RT', { width: resolution, height: resolution }, this._viewer.scene, false, true, BABYLON_Constants.TEXTURETYPE_UNDEFINED, false, undefined, true, false, false, BABYLON_Constants.TEXTUREFORMAT_UNDEFINED, false, 1, undefined, true // No color attachment\n );\n this._depth_framebuffer = new IntegratedDepthRenderer(this._viewer.engine, this._render_target, 1);\n this._camera = new EngineCamera(this._viewer);\n this._postprocess_target = this.create_postprocess_render_target(resolution);\n this._postprocess_target_backbuffer = this.create_postprocess_render_target(resolution);\n this._transfer_depth_effect = new BABYLON_PostProcess('soft shadows transfer depth', 'soft_shadow_transfer_depth', [TRANSFER_INVERSE_VIEW_PROJECTION_MATRIX], [TRANSFER_DEPTH_TEXTURE], { width: 1, height: 1 }, this._postprocess_camera);\n this._blur_effect = new BABYLON_PostProcess('soft shadows blur', 'soft_shadow_blur', [BLUR_DIRECTION], [BLUR_SOURCE_TEXTURE], { width: 1, height: 1 }, this._postprocess_camera);\n this._generate_shadow_plane_texture_effect = new BABYLON_PostProcess('soft shadows generate shadow plane texture', 'soft_shadow_generate_texture', [SHADOW_PLANE_REFERENCE_HEIGHT, SHADOW_PLANE_INTENSITY], [SHADOW_PLANE_SOURCE_TEXTURE], { width: 1, height: 1 }, this._postprocess_camera);\n this._shadow_plane_target = new BABYLON_RenderTargetTexture('soft shadow plane', { width: this._render_target.getRenderWidth(), height: this._render_target.getRenderHeight() }, this._viewer.scene, false, true, BABYLON_Constants.TEXTURETYPE_UNSIGNED_BYTE, false, BABYLON_Constants.TEXTURE_BILINEAR_SAMPLINGMODE, false, false, false, BABYLON_Constants.TEXTUREFORMAT_RGBA, false, 1, undefined, false, false);\n this.texture_id = this._viewer.asset_manager.add_texture(this._shadow_plane_target);\n this._shadow_plane_target.wrapU = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n this._shadow_plane_target.wrapV = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n this._shadow_plane_target.hasAlpha = true;\n }\n dispose() {\n this._depth_framebuffer.dispose();\n this._render_target.dispose();\n this._postprocess_target.dispose();\n this._postprocess_target_backbuffer.dispose();\n this._shadow_plane_target.dispose();\n this._transfer_depth_effect.dispose();\n this._blur_effect.dispose();\n this._generate_shadow_plane_texture_effect.dispose();\n this._postprocess_camera.dispose();\n this._camera.dispose();\n this._viewer.asset_manager.textures.remove(this.texture_id);\n }\n render() {\n const half_extents = IVector3.scale(this._tracked_size, 0.5);\n const projection_matrix = calculate_orthographic(-half_extents.x, half_extents.x, -half_extents.z, half_extents.z, -half_extents.y, half_extents.y);\n const camera_matrix = IMatrix4.from_values(1, 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, 0, this.center.x, this.center.y, this.center.z, 1);\n const view_matrix = IMatrix4.inverse(camera_matrix);\n this._camera.set_view_matrix(view_matrix);\n this._camera.set_projection_matrix(projection_matrix, CameraMode.ORTHOGRAPHIC);\n this._viewer.scene.incrementRenderId();\n this._viewer.scene._activeCamera = this._camera.camera;\n this._viewer.scene.setTransformMatrix(this._camera.camera.getViewMatrix(), this._camera.camera.getProjectionMatrix());\n this._render_target._bindFrameBuffer();\n this._render_target.activeCamera = this._camera.camera;\n this._render_target.render_lite(this._camera, this._viewer.get_meshes_by_layer_mask(this._render_layer_mask));\n this._depth_framebuffer.prepare_depth();\n this._transfer_depth_effect.onApply = (effect) => {\n effect.setTexture(TRANSFER_DEPTH_TEXTURE, this._depth_framebuffer.get_depth_texture());\n const view_projection_matrix = IMatrix4.multiply(projection_matrix, view_matrix);\n const inverse_view_projection_matrix = IMatrix4.inverse(view_projection_matrix);\n effect.setMatrix(TRANSFER_INVERSE_VIEW_PROJECTION_MATRIX, new BABYLON_Matrix().fromIMatrix4(inverse_view_projection_matrix));\n };\n this._viewer.scene.postProcessManager.directRender([this._transfer_depth_effect], this._postprocess_target.renderTarget, true);\n this._blur_effect.onApply = (effect) => {\n effect.setTexture(BLUR_SOURCE_TEXTURE, this._postprocess_target);\n effect.setFloat2(BLUR_DIRECTION, 1 / this._postprocess_target.getRenderWidth(), 0);\n };\n this._viewer.scene.postProcessManager.directRender([this._blur_effect], this._postprocess_target_backbuffer.renderTarget, true);\n this._blur_effect.onApply = (effect) => {\n effect.setTexture(BLUR_SOURCE_TEXTURE, this._postprocess_target_backbuffer);\n effect.setFloat2(BLUR_DIRECTION, 0, 1.0 / this._postprocess_target_backbuffer.getRenderHeight());\n };\n this._viewer.scene.postProcessManager.directRender([this._blur_effect], this._postprocess_target.renderTarget, true);\n this.update_shadow_plane_texture();\n }\n update_shadow_plane_texture() {\n this._generate_shadow_plane_texture_effect.onApply = (effect) => {\n effect.setTexture(SHADOW_PLANE_SOURCE_TEXTURE, this._postprocess_target);\n effect.setFloat(SHADOW_PLANE_REFERENCE_HEIGHT, this._reference_height);\n effect.setFloat(SHADOW_PLANE_INTENSITY, this._intensity);\n };\n this._viewer.scene.postProcessManager.directRender([this._generate_shadow_plane_texture_effect], this._shadow_plane_target.renderTarget, true);\n }\n get center() {\n return this._tracked_center_position;\n }\n set center(center) {\n this._tracked_center_position.set(center.x, center.y, center.z);\n }\n get size() {\n return this._tracked_size;\n }\n set size(size) {\n this._tracked_size.set(size.x, size.y, size.z);\n }\n get reference_height() {\n return this._reference_height;\n }\n set reference_height(reference_height) {\n if (reference_height !== this._reference_height)\n this.mark_dirty();\n this._reference_height = reference_height;\n }\n get intensity() {\n return this._intensity;\n }\n set intensity(intensity) {\n if (intensity !== this._intensity)\n this.mark_dirty();\n this._intensity = intensity;\n }\n get render_layer_mask() {\n return this._render_layer_mask;\n }\n set render_layer_mask(mask) {\n if (this._render_layer_mask.bitmap !== mask.bitmap)\n this.mark_dirty();\n this._render_layer_mask = mask;\n }\n get resolution() {\n return this._resolution;\n }\n set resolution(resolution) {\n if (this._resolution === resolution)\n return;\n this._resolution = resolution;\n this._render_target.resize(resolution);\n this._postprocess_target.resize(resolution);\n this._postprocess_target_backbuffer.resize(resolution);\n this._shadow_plane_target.resize(resolution);\n this._depth_framebuffer.resize(resolution, resolution);\n this.mark_dirty();\n }\n mark_dirty() {\n this._viewer.mark_scene_dirty();\n }\n};\nSoftShadowRenderer = __decorate([\n Disposable\n], SoftShadowRenderer);\nexport { SoftShadowRenderer };\n//# sourceMappingURL=SoftShadowRenderer.js.map","/**\n * Exception Handler\n *\n * Adds event listeners on `window` to catch and handle specified errors.\n *\n * @example\n * // Handle specified error types\n * exception_handler.on(ErrorConstructor, callback)\n *\n * // Handle any unexpected error\n * exception_handler.on(callback)\n */\nexport class ExceptionHandler {\n constructor() {\n this._callbacks = new Map();\n this.handle_error = (e) => {\n const error = e instanceof ErrorEvent ? e.error : e.reason;\n const error_type = error === null || error === void 0 ? void 0 : error.constructor;\n let prevent = false;\n if (error_type) {\n const callbacks = this._callbacks.get(error_type);\n if (callbacks) {\n callbacks.forEach(callback => {\n const prevent_propagation = callback(error);\n if (prevent_propagation) {\n prevent = true;\n }\n });\n if (prevent) {\n this.prevent_error_propagation(e);\n }\n return;\n }\n }\n const unexpected_callbacks = this._callbacks.get('Unexpected');\n if (unexpected_callbacks) {\n unexpected_callbacks.forEach(callback => {\n const prevent_propagation = callback(error);\n if (prevent_propagation) {\n prevent = true;\n }\n });\n }\n if (prevent) {\n this.prevent_error_propagation(e);\n }\n };\n window.addEventListener('error', this.handle_error);\n window.addEventListener('unhandledrejection', this.handle_error);\n }\n on(item, callback) {\n if (arguments.length === 2 && callback) {\n this.register_callback(item, callback);\n }\n else {\n this.register_callback('Unexpected', item);\n }\n }\n dispose() {\n window.removeEventListener('error', this.handle_error);\n window.removeEventListener('unhandledrejection', this.handle_error);\n }\n prevent_error_propagation(error) {\n error.preventDefault();\n error.stopPropagation();\n }\n register_callback(error_type, callback) {\n var _a;\n if (this._callbacks.has(error_type)) {\n (_a = this._callbacks.get(error_type)) === null || _a === void 0 ? void 0 : _a.add(callback);\n }\n else {\n this._callbacks.set(error_type, new Set([callback]));\n }\n }\n}\n//# sourceMappingURL=ExceptionHandler.js.map","// -----------------------------------------\n// -------- GENERATED FROM .FX FILE --------\n// -----------------------------------------\n// Source: src/babylon/shaders/blit.fragment.fx\nimport { ShaderStore } from '@inter-ikea-betrakta-babylonjs/core/Engines/shaderStore.js';\nconst name = 'blitPixelShader';\nconst shader = `#ifdef GL_ES\n#endif\nprecision highp float;\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nvoid main(void)\n{\nvec4 currentFramePixelValue = texture2D(textureSampler, vUV);\ngl_FragColor = currentFramePixelValue;\n}\n`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const blitPixelShader = { name, shader };\n//# sourceMappingURL=blit.fragment.js.map","import { Camera as BABYLON_Camera } from '@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js';\nimport { CameraMode, IColor4, IMatrix4, IVector3 } from '../../api.js';\nimport { InteractionSystem } from '../InteractionSystem.js';\nimport { RenderView } from '../RenderView.js';\nimport { PostProcess as BABYLON_PostProcess } from '@inter-ikea-betrakta-babylonjs/core/PostProcesses/postProcess.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nimport { Observable } from '../../Observable.js';\nimport { ViewerFramebufferType } from '../Framebuffer.js';\nimport '../shaders/blit.fragment.js';\nconst TEXTURE_SAMPLER = 'textureSampler';\nexport class ViewerXRSession {\n constructor(viewer, session, layer, reference_space) {\n this.on_end_observable = new Observable();\n this._position_offset = new IVector3(0, 0, 0);\n this._yaw_offset_matrix = IMatrix4.Identity();\n this._last_time = 0.0;\n this._elapsed_frames = 0;\n this._silence_no_viewer_pose_warning = false;\n this.viewer = viewer;\n this._xr = session;\n this._layer = layer;\n this._reference_space = reference_space;\n this.view = new RenderView(this.viewer, new InteractionSystem(this.viewer, false), this.viewer.get_canvas_render_width(), this.viewer.get_canvas_render_height(), ViewerFramebufferType.RGBA16F, 1);\n this.view.custom_clear_color = new IColor4(0, 0, 0, 0);\n this._to_canvas_post_process = new BABYLON_PostProcess('To_canvas_frame_buffer_and_beeeeeyond', 'blit', [], [\n TEXTURE_SAMPLER\n ], { width: 1, height: 1 }, new BABYLON_Camera('', new BABYLON_Vector3(), this.viewer.scene));\n this._to_canvas_post_process.forceFullscreenViewport = true;\n this._to_canvas_post_process.alphaMode = BABYLON_Constants.ALPHA_COMBINE;\n this._to_canvas_post_process.onApply = (effect) => {\n effect.setTexture(TEXTURE_SAMPLER, this.view.postprocess_manager.get_active_accumulation_buffer().accumulation_buffer2);\n };\n session.addEventListener('end', () => {\n this.end_session();\n });\n session.requestAnimationFrame((time, frame) => {\n this.render(time, frame);\n });\n }\n end_session() {\n this.on_end_observable.notify(this);\n this._xr.end();\n this.dispose();\n }\n get position_offset() {\n return this._position_offset;\n }\n set position_offset(offset) {\n this._position_offset.x = offset.x;\n this._position_offset.y = offset.y;\n this._position_offset.z = offset.z;\n }\n /**\n * Sets a rotation offset along the vertical axis.\n * @param yaw_offset_radians The angle, in radians, to use as offset\n */\n set_yaw_offset(yaw_offset_radians) {\n IMatrix4.copy_to_ref(IMatrix4.Rotation_Y(yaw_offset_radians), this._yaw_offset_matrix);\n }\n dispose() {\n this.on_end_observable.dispose();\n this.view.dispose();\n }\n render(time, frame) {\n this._xr.requestAnimationFrame((time, frame) => {\n this.render(time, frame);\n });\n const viewer_pose = frame.getViewerPose(this._reference_space);\n if (!viewer_pose) {\n if (this.viewer.get_config().verbose_warnings && !this._silence_no_viewer_pose_warning) {\n console.warn('No Viewer Pose given by XR frame, skipping this frame. This warning will only show once until a frame as been rendered again.');\n this._silence_no_viewer_pose_warning = true;\n }\n // We can't render without any viewer pose, as we don't have any views to render into.\n return;\n }\n if (this._layer !== frame.session.renderState.baseLayer) {\n console.error('Unexpected base render layer in XR session');\n return;\n }\n // Since we have a good state now, warn again if we don't have a Viewer pose in any upcoming frames.\n this._silence_no_viewer_pose_warning = false;\n for (let i = 0; i < viewer_pose.views.length; i++) {\n const view = viewer_pose.views[i];\n const viewport = this._layer.getViewport(view);\n this.view.set_render_size(viewport.width, viewport.height);\n const camera = this.view.engine_camera;\n const projection_matrix = IMatrix4.from_array(view.projectionMatrix);\n const view_transform = IMatrix4.from_array(view.transform.matrix);\n const xr_camera_matrix = view_transform;\n // Offset camera\n IVector3.add_in_place(xr_camera_matrix[3], this._position_offset);\n const view_matrix = IMatrix4.inverse(IMatrix4.multiply(xr_camera_matrix, this._yaw_offset_matrix));\n const dt = {\n milliseconds: time - this._last_time,\n seconds: (time - this._last_time) / 1000.0,\n total_time_seconds: time / 1000.0,\n total_time_milliseconds: time,\n elapsed_frames: this._elapsed_frames\n };\n camera.set_view_matrix(view_matrix);\n camera.set_projection_matrix(projection_matrix, CameraMode.PERSPECTIVE);\n this.view.update(dt);\n this.view.render();\n const gl = this.viewer.engine._gl;\n this.viewer.engine.bindFramebuffer(this.view.framebuffer.get_render_target().renderTarget);\n gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, this._layer.framebuffer);\n gl.viewport(0, 0, this._layer.framebufferWidth, this._layer.framebufferHeight);\n gl.blitFramebuffer(0, 0, viewport.width, viewport.height, viewport.x, viewport.y, viewport.x + viewport.width, viewport.y + viewport.height, gl.COLOR_BUFFER_BIT, gl.NEAREST);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n this.viewer.engine.restoreDefaultFramebuffer();\n }\n this._elapsed_frames++;\n this._last_time = time;\n }\n}\n//# sourceMappingURL=ViewerXRSession.js.map","/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * The number of frames-in-flight we guess that our browser & driver uses.\n * We call them staging frames as we use it to decide how long staging/transient memory is alive for.\n */\nconst STAGING_FRAME_COUNT = 3;\nfunction zero_frame_allocation_data() {\n return {\n number_of_allocations: 0,\n total_size: 0\n };\n}\nclass TrackedMemoryResource {\n constructor() {\n this._persistent_size = 0;\n this._past_frame_allocations = [];\n this.deleted_at_frame_id = null;\n this._current_frame_allocations = zero_frame_allocation_data();\n for (let i = 0; i < STAGING_FRAME_COUNT; i++) {\n this._past_frame_allocations.push(zero_frame_allocation_data());\n }\n }\n new_frame() {\n for (let i = STAGING_FRAME_COUNT - 1; i >= 1; i--) {\n this._past_frame_allocations[i] = this._past_frame_allocations[i - 1];\n }\n this._past_frame_allocations[0] = this._current_frame_allocations;\n this._current_frame_allocations = zero_frame_allocation_data();\n }\n resize(new_size) {\n this._persistent_size = new_size;\n }\n register_upload(size) {\n if (size === 0) {\n // We can guess the driver will early out here, and thus we don't deem it an allocation.\n return;\n }\n this._current_frame_allocations.number_of_allocations += 1;\n this._current_frame_allocations.total_size += size;\n }\n get persistent_size() {\n return this._persistent_size;\n }\n get past_frame_allocations() {\n return this._past_frame_allocations;\n }\n get last_frame_allocation_data() {\n return this._past_frame_allocations[0];\n }\n // Does not include the current frame that's in progress on the CPU\n get_total_transient_size(max_frame_count = STAGING_FRAME_COUNT) {\n let total = 0;\n for (let i = 0; i < Math.min(max_frame_count, this._past_frame_allocations.length); i++) {\n total += this._past_frame_allocations[i].total_size;\n }\n return total;\n }\n get_total_transient_allocation_count(max_frame_count = STAGING_FRAME_COUNT) {\n let total = 0;\n for (let i = 0; i < Math.min(max_frame_count, this._past_frame_allocations.length); i++) {\n total += this._past_frame_allocations[i].number_of_allocations;\n }\n return total;\n }\n}\nclass TrackedTexture extends TrackedMemoryResource {\n constructor() {\n super(...arguments);\n this.levels = 0;\n this.layers = 1;\n this.width = 0;\n this.height = 0;\n this.depth = 1;\n this.dimensionality = 0;\n this.internal_format = 0;\n this.immutable_storage = false;\n this.storage_size_untrackable = false;\n }\n get persistent_size() {\n let levels_overhead = 1;\n for (let i = 1; i < this.levels; i++) {\n levels_overhead += 1.0 / (1 << (this.dimensionality * i));\n }\n return Math.floor(super.persistent_size * levels_overhead * this.layers);\n }\n}\nclass TrackedRenderbuffer extends TrackedMemoryResource {\n}\nclass TrackedBuffer extends TrackedMemoryResource {\n}\n/**\n * A class that wraps a WebGL context, to track memory usage and transfers.\n * The tracked memory usage is not exact, but should be a fairly good measure.\n * In cases of uncertainty it leans on being pessimistic and assume worst cases\n * 2 types of memory usages are tracked:\n * - Persistent storage: This is the storage size of your buffers, textures, etc.\n * - Transient memory: This is the memory used by the driver to queue memory uploads, such as bufferSubData. This memory is kept alive for a few frames, set by STAGING_FRAME_COUNT\n */\nexport class WebGLMemoryTracker {\n constructor(context, viewer, createBuffer = context.createBuffer.bind(context), deleteBuffer = context.deleteBuffer.bind(context), bindBuffer = context.bindBuffer.bind(context), bufferData = context.bufferData.bind(context), bufferSubData = context.bufferSubData.bind(context), createTexture = context.createTexture.bind(context), deleteTexture = context.deleteTexture.bind(context), bindTexture = context.bindTexture.bind(context), generateMipmap = context.generateMipmap.bind(context), texImage2D = context.texImage2D.bind(context), texSubImage2D = context.texSubImage2D.bind(context), texImage3D = context.texImage3D.bind(context), texSubImage3D = context.texSubImage3D.bind(context), texStorage2D = context.texStorage2D.bind(context), texStorage3D = context.texStorage3D.bind(context), compressedTexImage2D = context.compressedTexImage2D.bind(context), compressedTexImage3D = context.compressedTexImage3D.bind(context), compressedTexSubImage2D = context.compressedTexSubImage2D.bind(context), compressedTexSubImage3D = context.compressedTexSubImage3D.bind(context), createRenderbuffer = context.createRenderbuffer.bind(context), deleteRenderbuffer = context.deleteRenderbuffer.bind(context), bindRenderbuffer = context.bindRenderbuffer.bind(context), renderbufferStorage = context.renderbufferStorage.bind(context), renderbufferStorageMultisample = context.renderbufferStorageMultisample.bind(context)) {\n this.createBuffer = createBuffer;\n this.deleteBuffer = deleteBuffer;\n this.bindBuffer = bindBuffer;\n this.bufferData = bufferData;\n this.bufferSubData = bufferSubData;\n this.createTexture = createTexture;\n this.deleteTexture = deleteTexture;\n this.bindTexture = bindTexture;\n this.generateMipmap = generateMipmap;\n this.texImage2D = texImage2D;\n this.texSubImage2D = texSubImage2D;\n this.texImage3D = texImage3D;\n this.texSubImage3D = texSubImage3D;\n this.texStorage2D = texStorage2D;\n this.texStorage3D = texStorage3D;\n this.compressedTexImage2D = compressedTexImage2D;\n this.compressedTexImage3D = compressedTexImage3D;\n this.compressedTexSubImage2D = compressedTexSubImage2D;\n this.compressedTexSubImage3D = compressedTexSubImage3D;\n this.createRenderbuffer = createRenderbuffer;\n this.deleteRenderbuffer = deleteRenderbuffer;\n this.bindRenderbuffer = bindRenderbuffer;\n this.renderbufferStorage = renderbufferStorage;\n this.renderbufferStorageMultisample = renderbufferStorageMultisample;\n this._currently_bound_textures = new Map();\n this._textures = new Map();\n this._currently_bound_buffers = new Map();\n this._buffers = new Map();\n this._currently_bound_renderbuffers = new Map();\n this._renderbuffers = new Map();\n this._frame_id = 0;\n this._update_visualizer_function_handle = null;\n this._visualizer_element = null;\n // How many seconds between visualizer updates\n this.visualizer_render_time_seconds = 0.001;\n this._last_visualizer_update_timestamp = 0;\n this._context = context;\n this._viewer = viewer;\n viewer.get_viewer_dispose_observable().add_once(() => {\n this.set_visualizer_enabled(false);\n });\n context.createBuffer = this.create_buffer.bind(this);\n context.deleteBuffer = this.delete_buffer.bind(this);\n context.bindBuffer = this.bind_buffer.bind(this);\n context.bufferData = this.buffer_data.bind(this);\n context.bufferSubData = this.buffer_sub_data.bind(this);\n context.createTexture = this.create_texture.bind(this);\n context.deleteTexture = this.delete_texture.bind(this);\n context.bindTexture = this.bind_texture.bind(this);\n context.generateMipmap = this.generate_mipmap.bind(this);\n context.texImage2D = this.tex_image_2d.bind(this);\n context.texSubImage2D = this.tex_sub_image_2d.bind(this);\n context.texImage3D = this.tex_image_3d.bind(this);\n context.texSubImage3D = this.tex_sub_image_3d.bind(this);\n context.texStorage2D = this.tex_storage_2d.bind(this);\n context.texStorage3D = this.tex_storage_3d.bind(this);\n context.compressedTexImage2D = this.compressed_tex_image_2d.bind(this);\n context.compressedTexImage3D = this.compressed_tex_image_3d.bind(this);\n context.compressedTexSubImage2D = this.compressed_tex_sub_image_2d.bind(this);\n context.compressedTexSubImage3D = this.compressed_tex_sub_image_3d.bind(this);\n context.createRenderbuffer = this.create_renderbuffer.bind(this);\n context.deleteRenderbuffer = this.delete_renderbuffer.bind(this);\n context.bindRenderbuffer = this.bind_renderbuffer.bind(this);\n context.renderbufferStorage = this.renderbuffer_storage.bind(this);\n context.renderbufferStorageMultisample = this.renderbuffer_storage_multisample.bind(this);\n }\n new_frame() {\n this._buffers.forEach(buffer => buffer.new_frame());\n this._textures.forEach(texture => texture.new_frame());\n this._frame_id++;\n }\n get_memory_usage_report() {\n const report = {\n staging_frames_accounted_for: STAGING_FRAME_COUNT,\n buffers_count: 0,\n buffers_persistent_size: 0,\n buffers_staging_size: 0,\n buffers_staging_allocation_count: 0,\n textures_count: 0,\n untrackable_textures_count: 0,\n textures_persistent_size: 0,\n textures_staging_size: 0,\n textures_staging_allocation_count: 0,\n renderbuffers_count: 0,\n renderbuffers_persistent_size: 0\n };\n this._buffers.forEach((buffer) => {\n if (buffer.deleted_at_frame_id !== null)\n return;\n report.buffers_count++;\n report.buffers_persistent_size += buffer.persistent_size;\n report.buffers_staging_size += buffer.get_total_transient_size();\n report.buffers_staging_allocation_count += buffer.get_total_transient_allocation_count();\n });\n this._textures.forEach((texture) => {\n if (texture.deleted_at_frame_id !== null)\n return;\n if (texture.storage_size_untrackable) {\n report.untrackable_textures_count++;\n }\n report.textures_count++;\n report.textures_persistent_size += texture.persistent_size;\n report.textures_staging_size += texture.get_total_transient_size();\n report.textures_staging_allocation_count += texture.get_total_transient_allocation_count();\n });\n this._renderbuffers.forEach((renderbuffer) => {\n if (renderbuffer.deleted_at_frame_id !== null)\n return;\n report.renderbuffers_count++;\n report.renderbuffers_persistent_size += renderbuffer.persistent_size;\n });\n return report;\n }\n // Meant for JSON serializing\n get_readable_memory_usage_report() {\n const report = this.get_memory_usage_report();\n const formatter = new Intl.NumberFormat();\n const readable_report = Object.assign({}, report);\n for (const key in report) {\n if (typeof report[key] === 'number') {\n readable_report[key] = formatter.format(report[key]);\n }\n }\n return readable_report;\n }\n get_buffers_total_persistent_size() {\n let size = 0;\n this._buffers.forEach((buffer) => {\n if (buffer.deleted_at_frame_id === null) {\n size += buffer.persistent_size;\n }\n });\n return size;\n }\n get_textures_total_persistent_size() {\n let size = 0;\n this._textures.forEach((texture) => {\n if (texture.deleted_at_frame_id === null) {\n size += texture.persistent_size;\n }\n });\n return size;\n }\n get_renderbuffers_total_persistent_size() {\n let size = 0;\n this._renderbuffers.forEach((renderbuffer) => {\n if (renderbuffer.deleted_at_frame_id === null) {\n size += renderbuffer.persistent_size;\n }\n });\n return size;\n }\n get_buffers_persistent_count() {\n let count = 0;\n this._buffers.forEach((buffer) => {\n if (buffer.deleted_at_frame_id === null) {\n count += 1;\n }\n });\n return count;\n }\n get_textures_persistent_count() {\n let count = 0;\n this._textures.forEach((texture) => {\n if (texture.deleted_at_frame_id === null) {\n count += 1;\n }\n });\n return count;\n }\n get_renderbuffers_persistent_count() {\n let count = 0;\n this._renderbuffers.forEach((renderbuffer) => {\n if (renderbuffer.deleted_at_frame_id === null) {\n count += 1;\n }\n });\n return count;\n }\n create_buffer() {\n const buffer = this.createBuffer();\n if (buffer !== null) {\n this._buffers.set(buffer, new TrackedBuffer());\n }\n return buffer;\n }\n delete_buffer(buffer) {\n this.deleteBuffer(buffer);\n if (buffer !== null) {\n const tracked_buffer = this._buffers.get(buffer);\n if (tracked_buffer) {\n tracked_buffer.deleted_at_frame_id = this._frame_id;\n }\n }\n }\n bind_buffer(target, buffer) {\n this.bindBuffer(target, buffer);\n this._currently_bound_buffers.set(target, buffer);\n }\n buffer_data(target, srcData_or_size, usage, srcOffset, length) {\n var _a;\n // Run the actual function first\n if (typeof srcData_or_size === 'number') {\n this.bufferData(target, srcData_or_size, usage);\n }\n else if (srcOffset !== undefined && srcData_or_size !== null) {\n this.bufferData(target, srcData_or_size, usage, srcOffset, length);\n }\n else {\n this.bufferData(target, srcData_or_size, usage);\n }\n // New allocation that decides the buffer's persistent storage size\n let new_size;\n if (typeof srcData_or_size === 'number') {\n new_size = srcData_or_size;\n }\n else if (srcData_or_size !== null) {\n new_size = srcData_or_size.byteLength;\n }\n else if (length !== undefined) {\n new_size = length;\n }\n else {\n new_size = NaN;\n console.error('No data size given for bufferData');\n }\n const webgl_buffer = (_a = this._currently_bound_buffers.get(target)) !== null && _a !== void 0 ? _a : null;\n if (webgl_buffer !== null) {\n const tracked_buffer = this._buffers.get(webgl_buffer);\n tracked_buffer.resize(new_size);\n if (typeof srcData_or_size !== 'number' && srcData_or_size !== null) {\n tracked_buffer.register_upload(new_size);\n }\n }\n }\n buffer_sub_data(target, dstByteOffset, srcData, srcOffset, length) {\n var _a;\n // Run the actual functions first\n if (srcOffset === undefined) {\n this.bufferSubData(target, dstByteOffset, srcData);\n }\n else {\n this.bufferSubData(target, dstByteOffset, srcData, srcOffset, length);\n }\n const webgl_buffer = (_a = this._currently_bound_buffers.get(target)) !== null && _a !== void 0 ? _a : null;\n if (webgl_buffer !== null) {\n const tracked_buffer = this._buffers.get(webgl_buffer);\n if (srcOffset === undefined) {\n tracked_buffer.register_upload(srcData.byteLength);\n }\n else {\n tracked_buffer.register_upload(length !== null && length !== void 0 ? length : srcData.byteLength);\n }\n }\n }\n create_texture() {\n const result = this.createTexture();\n if (result !== null) {\n this._textures.set(result, new TrackedTexture());\n }\n return result;\n }\n delete_texture(texture) {\n this.deleteTexture(texture);\n if (texture !== null) {\n const tracked_texture = this._textures.get(texture);\n if (tracked_texture) {\n tracked_texture.deleted_at_frame_id = this._frame_id;\n }\n }\n }\n bind_texture(target, texture) {\n this.bindTexture(target, texture);\n this._currently_bound_textures.set(target, texture);\n }\n tex_image_2d(target, level, internalformat, width_format, height_type, border_source, format, type, pboOffset_source_pixels, srcOffset) {\n const current_texture = this._currently_bound_textures.get(target);\n const tracked_texture = current_texture ? this._textures.get(current_texture) : null;\n if (tracked_texture) {\n tracked_texture.internal_format = internalformat;\n if (target >= this._context.TEXTURE_CUBE_MAP_POSITIVE_X && target <= this._context.TEXTURE_CUBE_MAP_POSITIVE_Z) {\n tracked_texture.layers = 6;\n }\n else {\n tracked_texture.layers = 1;\n }\n tracked_texture.dimensionality = 2;\n tracked_texture.levels = Math.max(level + 1, tracked_texture.levels);\n if (typeof border_source === 'number') {\n const stored_data_size = get_pixel_size(this._context, internalformat) * width_format * height_type;\n if (level === 0) {\n tracked_texture.resize(stored_data_size);\n tracked_texture.width = width_format;\n tracked_texture.height = height_type;\n tracked_texture.depth = 1;\n }\n if (pboOffset_source_pixels !== null && typeof pboOffset_source_pixels !== 'number') {\n tracked_texture.register_upload(stored_data_size);\n }\n }\n else if (level === 0) {\n if (typeof border_source['width'] === 'number' && typeof border_source['height'] === 'number') {\n tracked_texture.resize(get_pixel_size(this._context, internalformat) * border_source['width'] * border_source['height']);\n }\n else {\n // Untrackable :(\n tracked_texture.storage_size_untrackable = true;\n tracked_texture.resize(0);\n tracked_texture.width = 0;\n tracked_texture.height = 0;\n }\n }\n }\n if (typeof border_source === 'number') {\n if (format === undefined || type === undefined || pboOffset_source_pixels === undefined) {\n console.error('Invalid memory tracker overload implementation');\n }\n else if (srcOffset === undefined) {\n if (typeof pboOffset_source_pixels === 'number') {\n console.error('Invalid memory tracker overload implementation');\n }\n else if (pboOffset_source_pixels !== undefined) {\n if (pboOffset_source_pixels === null) {\n this.texImage2D(target, level, internalformat, width_format, height_type, border_source, format, type, null);\n }\n else {\n // Here we have to cast as any because Typescript doesn't understand\n this.texImage2D(target, level, internalformat, width_format, height_type, border_source, format, type, pboOffset_source_pixels);\n }\n }\n }\n else {\n if (pboOffset_source_pixels === null) {\n console.error('Invalid memory tracker overload implementation');\n }\n this.texImage2D(target, level, internalformat, width_format, height_type, border_source, format, type, pboOffset_source_pixels, srcOffset);\n }\n }\n else {\n this.texImage2D(target, level, internalformat, width_format, height_type, border_source);\n }\n }\n tex_sub_image_2d(target, level, xoffset, yoffset, width_format, height_type, format_source, type, source_srcData_pboOffset_pixels, srcOffset) {\n const current_texture = this._currently_bound_textures.get(target);\n const tracked_texture = current_texture ? this._textures.get(current_texture) : null;\n if (tracked_texture) {\n if (typeof format_source === 'number') {\n tracked_texture.register_upload(get_pixel_size(this._context, tracked_texture.internal_format) * width_format * height_type);\n }\n else if (typeof format_source['width'] === 'number' && typeof format_source['height'] === 'number') {\n tracked_texture.register_upload(get_pixel_size(this._context, tracked_texture.internal_format) * format_source['width'] * format_source['height']);\n }\n else {\n // Untrackable :(\n }\n }\n if (typeof format_source !== 'number') {\n this.texSubImage2D(target, level, xoffset, yoffset, width_format, height_type, format_source);\n }\n else {\n if (type === undefined) {\n console.error('Invalid mock overload implementation');\n }\n else if (srcOffset !== undefined) {\n if (source_srcData_pboOffset_pixels === null) {\n console.error('Invalid mock overload implementation');\n }\n this.texSubImage2D(target, level, xoffset, yoffset, width_format, height_type, format_source, type, source_srcData_pboOffset_pixels, srcOffset);\n }\n else if (typeof source_srcData_pboOffset_pixels === 'number') {\n this.texSubImage2D(target, level, xoffset, yoffset, width_format, height_type, format_source, type, source_srcData_pboOffset_pixels);\n }\n else {\n // Here we have to cast as any because Typescript doesn't understand\n this.texSubImage2D(target, level, xoffset, yoffset, width_format, height_type, format_source, type, source_srcData_pboOffset_pixels);\n }\n }\n }\n tex_image_3d(target, level, internalformat, width, height, depth, border, format, type, srcData, srcOffset) {\n const current_texture = this._currently_bound_textures.get(target);\n const tracked_texture = current_texture ? this._textures.get(current_texture) : null;\n if (tracked_texture) {\n tracked_texture.internal_format = internalformat;\n tracked_texture.dimensionality = 3;\n tracked_texture.layers = 1;\n tracked_texture.levels = Math.max(level + 1, tracked_texture.levels);\n if (level === 0) {\n tracked_texture.width = width;\n tracked_texture.height = height;\n tracked_texture.depth = depth;\n tracked_texture.resize(get_pixel_size(this._context, internalformat) * width * height * depth);\n }\n }\n if (srcOffset !== undefined) {\n if (typeof srcData === 'number') {\n console.error('Invalid memory tracker overload implementation');\n }\n else if (srcData === null) {\n console.error('Invalid memory tracker overload implementation');\n }\n else {\n this.texImage3D(target, level, internalformat, width, height, depth, border, format, type, srcData, srcOffset);\n tracked_texture === null || tracked_texture === void 0 ? void 0 : tracked_texture.register_upload(get_pixel_size(this._context, internalformat) * width * height * depth);\n }\n }\n else {\n // Here we have to cast as any because Typescript doesn't understand\n this.texImage3D(target, level, internalformat, width, height, depth, border, format, type, srcData);\n }\n }\n tex_sub_image_3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData, srcOffset) {\n const current_texture = this._currently_bound_textures.get(target);\n const tracked_texture = current_texture ? this._textures.get(current_texture) : null;\n if (tracked_texture) {\n tracked_texture.register_upload(get_pixel_size(this._context, tracked_texture.internal_format) * width * height * depth);\n }\n if (srcOffset !== undefined) {\n if (typeof srcData === 'number') {\n console.error('Invalid mock overload implementation');\n }\n else {\n return this.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData, srcOffset);\n }\n }\n else {\n // Here we have to cast as any because Typescript doesn't understand\n return this.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData);\n }\n }\n tex_storage_2d(target, levels, internalformat, width, height) {\n this.texStorage2D(target, levels, internalformat, width, height);\n const current_texture = this._currently_bound_textures.get(target);\n const tracked_texture = current_texture ? this._textures.get(current_texture) : null;\n if (tracked_texture) {\n tracked_texture.internal_format = internalformat;\n tracked_texture.layers = target === this._context.TEXTURE_CUBE_MAP ? 6 : 1;\n tracked_texture.immutable_storage = true;\n tracked_texture.dimensionality = 2;\n tracked_texture.levels = levels;\n tracked_texture.width = width;\n tracked_texture.height = height;\n tracked_texture.depth = 1;\n tracked_texture.resize(get_pixel_size(this._context, internalformat) * width * height);\n }\n }\n tex_storage_3d(target, levels, internalformat, width, height, depth) {\n this.texStorage3D(target, levels, internalformat, width, height, depth);\n const current_texture = this._currently_bound_textures.get(target);\n const tracked_texture = current_texture ? this._textures.get(current_texture) : null;\n if (tracked_texture) {\n tracked_texture.internal_format = internalformat;\n tracked_texture.layers = 1;\n tracked_texture.immutable_storage = true;\n tracked_texture.dimensionality = 3;\n tracked_texture.levels = levels;\n tracked_texture.width = width;\n tracked_texture.height = height;\n tracked_texture.depth = depth;\n tracked_texture.resize(get_pixel_size(this._context, internalformat) * width * height * depth);\n }\n }\n compressed_tex_image_2d(target, level, internalformat, width, height, border, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride) {\n const current_texture = this._currently_bound_textures.get(target);\n const tracked_texture = current_texture ? this._textures.get(current_texture) : null;\n let image_size_bytes = 0;\n if (typeof srcData_or_imageSize === 'number' && srcOffset_or_offset !== undefined) {\n this.compressedTexImage2D(target, level, internalformat, width, height, border, srcData_or_imageSize, srcOffset_or_offset);\n image_size_bytes = srcData_or_imageSize;\n }\n else if (typeof srcData_or_imageSize !== 'number') {\n this.compressedTexImage2D(target, level, internalformat, width, height, border, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride);\n image_size_bytes = srcLengthOverride !== null && srcLengthOverride !== void 0 ? srcLengthOverride : srcData_or_imageSize.byteLength;\n }\n else {\n console.warn('WebGL memory tracker invalid overload');\n }\n if (level === 0 && tracked_texture) {\n tracked_texture.internal_format = internalformat;\n tracked_texture.width = width;\n tracked_texture.height = height;\n tracked_texture.depth = 1;\n tracked_texture.dimensionality = 2;\n if (target >= this._context.TEXTURE_CUBE_MAP_POSITIVE_X && target <= this._context.TEXTURE_CUBE_MAP_POSITIVE_Z) {\n tracked_texture.layers = 6;\n }\n else {\n tracked_texture.layers = 1;\n }\n tracked_texture.resize(image_size_bytes);\n }\n }\n compressed_tex_sub_image_2d(target, level, xoffset, yoffset, width, height, format, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride) {\n const current_texture = this._currently_bound_textures.get(target);\n const tracked_texture = current_texture ? this._textures.get(current_texture) : null;\n let transferred_image_size_bytes = 0;\n if (typeof srcData_or_imageSize === 'number' && srcOffset_or_offset !== undefined) {\n this.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, srcData_or_imageSize, srcOffset_or_offset);\n transferred_image_size_bytes = 0;\n }\n else if (typeof srcData_or_imageSize !== 'number') {\n this.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride);\n transferred_image_size_bytes = srcLengthOverride !== null && srcLengthOverride !== void 0 ? srcLengthOverride : srcData_or_imageSize.byteLength;\n }\n else {\n console.warn('WebGL memory tracker invalid overload');\n }\n if (tracked_texture) {\n tracked_texture.levels = Math.max(tracked_texture.levels, level + 1);\n tracked_texture.register_upload(transferred_image_size_bytes);\n }\n }\n compressed_tex_image_3d(target, level, internalformat, width, height, depth, border, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride) {\n const current_texture = this._currently_bound_textures.get(target);\n const tracked_texture = current_texture ? this._textures.get(current_texture) : null;\n let image_size_bytes = 0;\n if (typeof srcData_or_imageSize === 'number' && srcOffset_or_offset !== undefined) {\n this.compressedTexImage3D(target, level, internalformat, width, height, depth, border, srcData_or_imageSize, srcOffset_or_offset);\n image_size_bytes = srcData_or_imageSize;\n }\n else if (typeof srcData_or_imageSize !== 'number') {\n this.compressedTexImage3D(target, level, internalformat, width, height, depth, border, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride);\n image_size_bytes = srcLengthOverride !== null && srcLengthOverride !== void 0 ? srcLengthOverride : srcData_or_imageSize.byteLength;\n }\n else {\n console.warn('WebGL memory tracker invalid overload');\n }\n if (level === 0 && tracked_texture) {\n tracked_texture.internal_format = internalformat;\n tracked_texture.width = width;\n tracked_texture.height = height;\n tracked_texture.depth = depth;\n tracked_texture.dimensionality = 3;\n tracked_texture.layers = 1;\n tracked_texture.resize(image_size_bytes);\n }\n }\n compressed_tex_sub_image_3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride) {\n const current_texture = this._currently_bound_textures.get(target);\n const tracked_texture = current_texture ? this._textures.get(current_texture) : null;\n let transferred_image_size_bytes = 0;\n if (typeof srcData_or_imageSize === 'number' && srcOffset_or_offset !== undefined) {\n this.compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, srcData_or_imageSize, srcOffset_or_offset);\n transferred_image_size_bytes = 0;\n }\n else if (typeof srcData_or_imageSize !== 'number') {\n this.compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, srcData_or_imageSize, srcOffset_or_offset, srcLengthOverride);\n transferred_image_size_bytes = srcLengthOverride !== null && srcLengthOverride !== void 0 ? srcLengthOverride : srcData_or_imageSize.byteLength;\n }\n else {\n console.warn('WebGL memory tracker invalid overload');\n }\n if (tracked_texture) {\n tracked_texture.levels = Math.max(tracked_texture.levels, level + 1);\n tracked_texture.register_upload(transferred_image_size_bytes);\n }\n }\n generate_mipmap(target) {\n this.generateMipmap(target);\n const current_texture = this._currently_bound_textures.get(target);\n const tracked_texture = current_texture ? this._textures.get(current_texture) : null;\n if (tracked_texture && !tracked_texture.immutable_storage) {\n tracked_texture.levels = 0;\n let width = tracked_texture.width;\n let height = tracked_texture.height;\n let depth = tracked_texture.depth;\n while (width > 0 || height > 0 || depth > 0) {\n tracked_texture.levels++;\n width = Math.floor(width / 2);\n height = Math.floor(height / 2);\n depth = Math.floor(depth / 2);\n }\n }\n }\n create_renderbuffer() {\n const renderbuffer = this.createRenderbuffer();\n if (renderbuffer) {\n this._renderbuffers.set(renderbuffer, new TrackedRenderbuffer());\n }\n return renderbuffer;\n }\n delete_renderbuffer(renderbuffer) {\n this.deleteRenderbuffer(renderbuffer);\n if (renderbuffer !== null) {\n const tracked_renderbuffer = this._renderbuffers.get(renderbuffer);\n if (tracked_renderbuffer) {\n tracked_renderbuffer.deleted_at_frame_id = this._frame_id;\n }\n }\n }\n bind_renderbuffer(target, renderbuffer) {\n this.bindRenderbuffer(target, renderbuffer);\n this._currently_bound_renderbuffers.set(target, renderbuffer);\n }\n renderbuffer_storage(target, internalformat, width, height) {\n this.renderbufferStorage(target, internalformat, width, height);\n const current_renderbuffer = this._currently_bound_renderbuffers.get(target);\n const tracked_renderbuffer = current_renderbuffer ? this._renderbuffers.get(current_renderbuffer) : null;\n if (tracked_renderbuffer) {\n tracked_renderbuffer.resize(get_pixel_size(this._context, internalformat) * width * height);\n }\n }\n renderbuffer_storage_multisample(target, samples, internalformat, width, height) {\n this.renderbufferStorageMultisample(target, samples, internalformat, width, height);\n const current_renderbuffer = this._currently_bound_renderbuffers.get(target);\n const tracked_renderbuffer = current_renderbuffer ? this._renderbuffers.get(current_renderbuffer) : null;\n if (tracked_renderbuffer) {\n tracked_renderbuffer.resize(samples * get_pixel_size(this._context, internalformat) * width * height);\n }\n }\n set_visualizer_enabled(enabled) {\n if (this._visualizer_element === null) {\n this._visualizer_element = document.createElement('div');\n this._visualizer_element.style.zIndex = '10';\n this._visualizer_element.style.position = 'absolute';\n this._visualizer_element.style.left = '0.5em';\n this._visualizer_element.style.top = '3em';\n this._visualizer_element.style.textAlign = 'left';\n this._visualizer_element.style.fontFamily = 'monospace';\n this._visualizer_element.style.fontSize = '12px';\n this._visualizer_element.style.userSelect = 'none';\n this._visualizer_element.style.pointerEvents = 'none';\n this._visualizer_element.style.background = 'rgba(111, 222, 55, 0.95)';\n document.body.appendChild(this._visualizer_element);\n }\n if (enabled) {\n this._visualizer_element.style.display = 'block';\n this._update_visualizer_function_handle = requestAnimationFrame(this.update_visualizer.bind(this));\n }\n else {\n this._visualizer_element.style.display = 'none';\n if (this._update_visualizer_function_handle !== null) {\n cancelAnimationFrame(this._update_visualizer_function_handle);\n }\n this._update_visualizer_function_handle = null;\n }\n }\n update_visualizer() {\n // This code is a real eye-sore, and we should find a better way to do this in the future.\n // Convert milliseconds to seconds\n const timestamp = performance.now() / 1000.0;\n if (timestamp - this._last_visualizer_update_timestamp >= this.visualizer_render_time_seconds) {\n this._last_visualizer_update_timestamp = timestamp;\n const style = `\n border-spacing: 32px 6px;\n `;\n let html = '';\n html += '';\n html += '';\n const report = this.get_readable_memory_usage_report();\n for (const key in report) {\n const value = report[key];\n html += '';\n html += '';\n html += '';\n }\n html += '
WebGL Memory UsageValue
' + key + '' + value + '
';\n this._visualizer_element.innerHTML = html;\n }\n if (this._update_visualizer_function_handle) {\n this._update_visualizer_function_handle = requestAnimationFrame(this.update_visualizer.bind(this));\n }\n }\n}\n/**\n * Covers WebGL2 formats described:\n * here: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/renderbufferStorage\n * and here: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D\n * @returns The size of a pixel in the given sized format, in bytes.\n */\nfunction get_pixel_size(gl, internalformat) {\n switch (internalformat) {\n case gl.R8:\n case gl.R8_SNORM:\n case gl.R8I:\n case gl.R8UI:\n case gl.ALPHA:\n case gl.LUMINANCE:\n case gl.STENCIL_INDEX8:\n return 1;\n case gl.RG8:\n case gl.RG8_SNORM:\n case gl.RGBA4:\n case gl.RGB5_A1:\n case gl.RGB565:\n case gl.R16F:\n case gl.R16I:\n case gl.R16UI:\n case gl.RG8I:\n case gl.RG8UI:\n case gl.LUMINANCE_ALPHA:\n case gl.DEPTH_COMPONENT16:\n return 2;\n case gl.RGB:\n case gl.RGB8:\n case gl.RGB8_SNORM:\n case gl.SRGB8:\n case gl.SRGB:\n case gl.RGB8I:\n case gl.RGB8UI:\n case gl.DEPTH_COMPONENT24:\n return 4; // Disputable, this is either 3 or 4, depending on alignment\n case gl.RGBA:\n case gl.RGBA8:\n case gl.RGBA8_SNORM:\n case gl.RGB10_A2:\n case gl.RGB10_A2UI:\n case gl.SRGB8_ALPHA8:\n case gl.RG16F:\n case gl.R32F:\n case gl.R11F_G11F_B10F:\n case gl.RGB9_E5:\n case gl.R32I:\n case gl.R32UI:\n case gl.RG16I:\n case gl.RG16UI:\n case gl.RGBA8I:\n case gl.RGBA8UI:\n case gl.DEPTH_COMPONENT: // Actually unknown, but a good upper-bound guess\n case gl.DEPTH_STENCIL: // Actually unknown, but a good upper-bound guess\n case gl.DEPTH_COMPONENT32F:\n case gl.DEPTH24_STENCIL8:\n return 4;\n case gl.DEPTH32F_STENCIL8:\n return 5; // Really disputable (alignment). Assumption for 5 would be that the depth and stencil parts are stored separately.\n case gl.RGB16F:\n case gl.RGB16I:\n case gl.RGB16UI:\n return 8; // Disputable. Could be 6, but guessing 8 due to RGB usually being RGBA in real life.\n case gl.RGBA16F:\n case gl.RG32F:\n case gl.RG32I:\n case gl.RG32UI:\n case gl.RGBA16I:\n case gl.RGBA16UI:\n return 8;\n case gl.RGB32F:\n case gl.RGB32I:\n case gl.RGB32UI:\n return 16; // Disputable, could be 12 but probably 16 due to usually being RGBA in practice.\n case gl.RGBA32F:\n case gl.RGBA32I:\n case gl.RGBA32UI:\n return 16;\n }\n console.error('Unknown internalFormat parameter: ' + internalformat);\n return 0;\n}\n//# sourceMappingURL=WebGLMemoryTracker.js.map","import { IVector3 } from '../api.js';\nimport { clamp, matrix_pool } from '../Math.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Plane as BABYLON_Plane } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.plane.js';\nimport { Ray as BABYLON_Ray } from '@inter-ikea-betrakta-babylonjs/core/Culling/ray.js';\nimport { raycast_interactable_object } from '../babylon/Raycast.js';\nexport var InteractionType;\n(function (InteractionType) {\n InteractionType[InteractionType[\"INVALID\"] = -1] = \"INVALID\";\n InteractionType[InteractionType[\"TOUCH\"] = 0] = \"TOUCH\";\n InteractionType[InteractionType[\"PRIMARY\"] = 1] = \"PRIMARY\";\n InteractionType[InteractionType[\"SECONDARY\"] = 2] = \"SECONDARY\";\n})(InteractionType || (InteractionType = {}));\n/**\n * InputManagers responsibility is to handle the decision of which entity is to receive input sent to the viewer.\n * It receives normalized input, so gestures and such is expected to have already been handled.\n */\nexport class InputManager {\n get receiving_object() {\n if (this._pick_result) {\n return this._pick_result[0];\n }\n return null;\n }\n get pick_info() {\n if (this._pick_result) {\n return this._pick_result[1];\n }\n return null;\n }\n constructor(_view, _viewer, _click_void_observable, _secondary_click_void_observable) {\n this._view = _view;\n this._viewer = _viewer;\n this._click_void_observable = _click_void_observable;\n this._secondary_click_void_observable = _secondary_click_void_observable;\n // The SceneObject that a given input will act on, it is picked with interaction_begin event and kept for the entire action.\n // If it set to null, the camera becomes the target of the action.\n this._pick_result = null;\n // The objects that receive the input events from the initially picked interactable object.\n this._execute_objects = [];\n this._last_drag_point = new BABYLON_Vector3();\n this._new_drag_point = new BABYLON_Vector3();\n this._begin_drag_point = new BABYLON_Vector3(); // Note that this vector is only updated between calls\n this._drag_distance = 0;\n this._picking_ray = BABYLON_Ray.Zero();\n this._camera_input_enabled = true;\n this._last_mouse_position = { x: 0, y: 0 };\n this._received_mouse_move_event = false;\n this._last_hover_object = null;\n this._interactable_disposed_observer = this._viewer.interactable_disposed_observable.add((interactable) => {\n if (interactable === this._last_hover_object) {\n this.clear_hovering_interactable();\n }\n });\n }\n get camera_input_enabled() {\n return this._camera_input_enabled;\n }\n set camera_input_enabled(value) {\n this._camera_input_enabled = value;\n }\n /**\n * This event is used for things like picking so that you can pick a receiver before you know what kind of event it will be.\n * For example you might want to wait for the pointer to have moved over a threshold before making it a drag.\n * But you might still want to pick the object that was under the pointer when it was first pressed.\n * @param evt position for where the interaction began.\n */\n interaction_begin(evt) {\n const view_viewport = this._view.get_canvas_viewport();\n this._view.create_ray_to_ref(clamp((evt.canvas_x - view_viewport.x) / view_viewport.width, 0.0, 1.0), clamp((evt.canvas_y - view_viewport.y) / view_viewport.height, 0.0, 1.0), this._picking_ray);\n this._pick_result = raycast_interactable_object(this._viewer, this._picking_ray, this._view.get_render_layer_mask());\n if (this._pick_result !== null) {\n this._execute_objects = this._viewer.get_input_handler_manager().get_execute_objects(this._pick_result[0]);\n }\n else {\n this._execute_objects = [];\n }\n }\n interaction_end() {\n this._pick_result = null;\n this._execute_objects = [];\n }\n drag_begin(evt) {\n if (this._pick_result === null) {\n this.camera_drag_start(evt);\n return;\n }\n const [, interactable_raycast_result] = this._pick_result;\n if (this._execute_objects.length === 0) {\n this.interaction_end();\n return;\n }\n let execution_object_has_drag_interactable = false;\n this._execute_objects.forEach((execute_object) => {\n if (!execute_object.drag_interactable)\n return;\n execution_object_has_drag_interactable = true;\n this._drag_distance = 0;\n const drag_event = {\n canvas_x: evt.canvas_x,\n canvas_y: evt.canvas_y,\n plane_point: interactable_raycast_result.world_position, // The point in space where the collision happened\n plane_normal: this._view.engine_camera.backward,\n world_delta: { x: 0, y: 0, z: 0 },\n local_delta: { x: 0, y: 0, z: 0 },\n world_distance: 0,\n camera_position: this._view.engine_camera.position\n };\n this._begin_drag_point.fromIVector3(interactable_raycast_result.world_position);\n this._last_drag_point.fromIVector3(interactable_raycast_result.world_position);\n if ('id' in execute_object) {\n execute_object.drag_begin_observable.notify(execute_object.id, drag_event);\n }\n else if ('mesh_source' in execute_object) {\n execute_object.drag_begin_observable.notify(execute_object, drag_event);\n }\n else {\n console.error('Cannot notify observable from interactable', execute_object);\n }\n });\n if (!execution_object_has_drag_interactable) {\n // No excecution object was draggable, so we reset this drag action, so that the camera can consume it\n this._pick_result = null;\n this.camera_drag_start(evt);\n }\n }\n get_local_drag_event(world_drag_event, execute_object) {\n if (!execute_object.parent) {\n return Object.assign({}, world_drag_event);\n }\n const matrix = matrix_pool.fetch();\n execute_object.parent.root.getWorldMatrix().invertToRef(matrix);\n const local_delta = new BABYLON_Vector3(world_drag_event.world_delta.x, world_drag_event.world_delta.y, world_drag_event.world_delta.z);\n BABYLON_Vector3.TransformNormalToRef(local_delta, matrix, local_delta);\n matrix_pool.return(matrix);\n return Object.assign(Object.assign({}, world_drag_event), { local_delta: local_delta });\n }\n drag_move(evt) {\n if (this._pick_result === null) {\n this.camera_drag_move(evt);\n return;\n }\n const [, interactable_raycast_result] = this._pick_result;\n if (interactable_raycast_result) {\n const world_drag_event = this.generate_drag_event(evt.canvas_x, evt.canvas_y);\n this._execute_objects.forEach((execute_object) => {\n if (!execute_object.drag_interactable)\n return;\n const local_drag_event = this.get_local_drag_event(world_drag_event, execute_object);\n if ('id' in execute_object) {\n execute_object.drag_observable.notify(execute_object.id, local_drag_event);\n }\n else if ('mesh_source' in execute_object) {\n execute_object.drag_observable.notify(execute_object, local_drag_event);\n }\n else {\n console.error('Cannot notify observable from interactable', execute_object);\n }\n });\n }\n }\n drag_end(evt) {\n if (this._pick_result === null) {\n this.camera_drag_end(evt);\n return;\n }\n const [, interactable_raycast_result] = this._pick_result;\n if (interactable_raycast_result) {\n const world_drag_event = this.generate_drag_event(evt.canvas_x, evt.canvas_y);\n this._execute_objects.forEach((execute_object) => {\n if (!execute_object.drag_interactable)\n return;\n const local_drag_event = this.get_local_drag_event(world_drag_event, execute_object);\n if ('id' in execute_object) {\n execute_object.drag_end_observable.notify(execute_object.id, local_drag_event);\n }\n else if ('mesh_source' in execute_object) {\n execute_object.drag_end_observable.notify(execute_object, local_drag_event);\n }\n else {\n console.error('Cannot notify observable from interactable', execute_object);\n }\n this.interaction_end();\n this._last_drag_point.copyFromFloats(0, 0, 0);\n this._new_drag_point.copyFromFloats(0, 0, 0);\n });\n }\n }\n click(evt) {\n const click_event = {\n canvas_x: evt.canvas_x,\n canvas_y: evt.canvas_y,\n duration_ms: evt.duration_ms,\n world_point: null,\n camera_position: this._view.engine_camera.position\n };\n let called_observer = false;\n this._execute_objects.forEach((execute_object) => {\n if (!execute_object.click_interactable || this._pick_result === null)\n return;\n click_event.world_point = IVector3.copy(this._pick_result[1].world_position);\n if ('id' in execute_object) {\n const observable = evt.type === InteractionType.SECONDARY\n ? execute_object.secondary_click_observable\n : execute_object.click_observable;\n observable.notify(execute_object.id, click_event);\n if (observable.has_active_observers) {\n called_observer = true;\n }\n }\n else if ('mesh_source' in execute_object) {\n const observable = evt.type === InteractionType.SECONDARY\n ? execute_object.secondary_click_observable\n : execute_object.click_observable;\n observable.notify(execute_object, click_event);\n if (observable.has_active_observers) {\n called_observer = true;\n }\n }\n else {\n console.error('Cannot notify observable from interactable', execute_object);\n }\n });\n if (!called_observer) {\n const observable = evt.type === InteractionType.SECONDARY\n ? this._secondary_click_void_observable\n : this._click_void_observable;\n observable.notify(this._viewer, click_event);\n }\n this.interaction_end();\n }\n pan_move(evt) {\n var _a;\n if (!this._camera_input_enabled)\n return;\n (_a = this._view.camera_manager.active_camera) === null || _a === void 0 ? void 0 : _a.pan_input(evt);\n }\n pan_begin(evt) {\n var _a;\n if (!this._camera_input_enabled)\n return;\n (_a = this._view.camera_manager.active_camera) === null || _a === void 0 ? void 0 : _a.pan_start(evt);\n }\n pan_end(evt) {\n var _a;\n if (!this._camera_input_enabled)\n return;\n (_a = this._view.camera_manager.active_camera) === null || _a === void 0 ? void 0 : _a.pan_end(evt);\n }\n zoom(evt) {\n var _a;\n if (!this._camera_input_enabled)\n return;\n (_a = this._view.camera_manager.active_camera) === null || _a === void 0 ? void 0 : _a.zoom_input(evt);\n }\n camera_drag_move(evt) {\n var _a;\n if (!this._camera_input_enabled)\n return;\n (_a = this._view.camera_manager.active_camera) === null || _a === void 0 ? void 0 : _a.drag_input(evt);\n }\n camera_drag_start(evt) {\n var _a;\n if (!this._camera_input_enabled)\n return;\n (_a = this._view.camera_manager.active_camera) === null || _a === void 0 ? void 0 : _a.drag_start(evt);\n }\n camera_drag_end(evt) {\n var _a;\n if (!this._camera_input_enabled)\n return;\n (_a = this._view.camera_manager.active_camera) === null || _a === void 0 ? void 0 : _a.drag_end(evt);\n }\n generate_drag_event(client_x, client_y) {\n // We should be able to expect backwards to always be normalized.\n const normal = this._view.engine_camera.backward;\n const plane = new BABYLON_Plane(normal.x, normal.y, normal.z, -(normal.x * this._begin_drag_point.x + normal.y * this._begin_drag_point.y + normal.z * this._begin_drag_point.z));\n const view_viewport = this._view.get_canvas_viewport();\n this._view.create_ray_to_ref(clamp((client_x - view_viewport.x) / view_viewport.width, 0.0, 1.0), clamp((client_y - view_viewport.y) / view_viewport.height, 0.0, 1.0), this._picking_ray);\n const hit_distance = this._picking_ray.intersectsPlane(plane);\n const hit_point = this._new_drag_point\n .copyFrom(this._picking_ray.direction)\n .scaleInPlace(hit_distance)\n .addInPlace(this._picking_ray.origin);\n const world_delta = hit_point.subtract(this._last_drag_point);\n this._drag_distance += world_delta.length();\n const local_delta = world_delta.clone();\n const drag_event = {\n canvas_x: client_x,\n canvas_y: client_y,\n plane_point: hit_point,\n plane_normal: normal,\n world_delta: world_delta,\n local_delta: local_delta,\n world_distance: this._drag_distance,\n camera_position: this._view.engine_camera.position\n };\n this._last_drag_point.copyFrom(hit_point);\n return drag_event;\n }\n mouse_pointer_move(event) {\n this._last_mouse_position.x = event.canvas_x;\n this._last_mouse_position.y = event.canvas_y;\n this._received_mouse_move_event = true;\n }\n clear_hovering_interactable() {\n if (this._last_hover_object === null)\n return;\n const event = {\n canvas_x: this._last_mouse_position.x,\n canvas_y: this._last_mouse_position.y\n };\n const execute_objects = this._viewer.get_input_handler_manager().get_execute_objects(this._last_hover_object);\n execute_objects.forEach((execute_object) => {\n if (this._last_hover_object === null)\n return;\n if ('id' in execute_object) {\n execute_object.pointer_leave_observable.notify(execute_object.id, event);\n }\n else if ('mesh_source' in execute_object) {\n execute_object.pointer_leave_observable.notify(execute_object, event);\n }\n else {\n console.error('Cannot notify observable from interactable', execute_object);\n }\n });\n this._last_hover_object = null;\n }\n update_pointer_enter_leave() {\n if (!this._received_mouse_move_event) {\n return;\n }\n const view_viewport = this._view.get_canvas_viewport();\n this._view.create_ray_to_ref(clamp((this._last_mouse_position.x - view_viewport.x) / view_viewport.width, 0.0, 1.0), clamp((this._last_mouse_position.y - view_viewport.y) / view_viewport.height, 0.0, 1.0), this._picking_ray);\n const raycast_result = this._viewer.raycast_interactable_using_ray(this._picking_ray);\n if (raycast_result === null) {\n this.clear_hovering_interactable();\n return;\n }\n const picked_object = typeof raycast_result.object === 'number'\n ? this._viewer.viewer_scene.objects.get(raycast_result.object)\n : raycast_result.object;\n const execute_objects = this._viewer.get_input_handler_manager().get_execute_objects(picked_object);\n if (this._last_hover_object === null || this._last_hover_object !== picked_object) {\n this.clear_hovering_interactable();\n this._last_hover_object = picked_object;\n execute_objects.forEach((execute_object) => {\n if (this._last_hover_object === null) {\n return;\n }\n const event = {\n canvas_x: this._last_mouse_position.x,\n canvas_y: this._last_mouse_position.y\n };\n if ('id' in execute_object) {\n execute_object.pointer_enter_observable.notify(execute_object.id, event);\n }\n else if ('mesh_source' in execute_object) {\n execute_object.pointer_enter_observable.notify(execute_object, event);\n }\n else {\n console.error('Cannot notify observable from interactable', execute_object);\n }\n });\n }\n }\n dispose() {\n this._execute_objects.length = 0;\n this._pick_result = null;\n this._last_hover_object = null;\n }\n}\n//# sourceMappingURL=InputManager.js.map","import { InputManager } from '../input/InputManager.js';\nimport { RenderView } from './RenderView.js';\nimport { CameraManager } from './camera/CameraManager.js';\nimport { update_from_partial } from './utility/utils.js';\nexport class View extends RenderView {\n constructor(viewer, interaction_system, render_width, render_height, framebuffer_type, wanted_msaa_samples) {\n super(viewer, interaction_system, render_width, render_height, framebuffer_type, wanted_msaa_samples);\n // The position of the view when blitted on the canvas\n this._canvas_position = { x: 0, y: 0 };\n // The size of the view when blitted on the canvas (NOT the resolution we render in, that's set on the framebuffer)\n this._canvas_blit_size = { x: 0, y: 0 };\n this._canvas_blit_size.x = render_width;\n this._canvas_blit_size.y = render_height;\n this.camera_manager = new CameraManager(this.engine_camera, interaction_system, this.viewer, render_width / render_height);\n this.input_manager = new InputManager(this, this.viewer, this.viewer.get_click_void_observable(), this.viewer.get_secondary_click_void_observable());\n }\n get_aspect_ratio() {\n return this._canvas_blit_size.x / this._canvas_blit_size.y;\n }\n update(delta_time) {\n if (!this.enabled)\n return;\n // Always update aspect ratio, in case a camera is shared between Views.\n this.camera_manager.update_aspect_ratio(this.get_aspect_ratio());\n this.camera_manager.update(delta_time);\n super.update(delta_time);\n // An optimization would be for this function to only be evaluated if our view is dirty (i.e. in the render() function),\n // however we can't know in here if our view is dirty due to not knowing yet if the scene will dirty us.\n // This function may also dirty the view or scene, and thus it's not enough to evaluate only when rendering.\n // Thus, we always update it every frame.\n this.input_manager.update_pointer_enter_leave();\n }\n get_canvas_viewport() {\n return {\n x: this._canvas_position.x,\n y: this._canvas_position.y,\n width: this._canvas_blit_size.x,\n height: this._canvas_blit_size.y\n };\n }\n set_canvas_viewport(partial_viewport) {\n const current_viewport = this.get_canvas_viewport();\n const viewport = update_from_partial(current_viewport, partial_viewport);\n viewport.width = Math.floor(viewport.width);\n viewport.height = Math.floor(viewport.height);\n viewport.x = Math.floor(viewport.x);\n viewport.y = Math.floor(viewport.y);\n // Early out if nothing changed.\n if (viewport.x === current_viewport.x &&\n viewport.y === current_viewport.y &&\n viewport.width === current_viewport.width &&\n viewport.height === current_viewport.height) {\n return;\n }\n this._canvas_position.x = viewport.x;\n this._canvas_position.y = viewport.y;\n this._canvas_blit_size.x = viewport.width;\n this._canvas_blit_size.y = viewport.height;\n // We use the blit size instead of the render size\n // This is because if you want to animate the size of a view, you only want to animate the blit size.\n this.camera_manager.update_aspect_ratio(viewport.width / viewport.height);\n this.viewport_changed_observable.notify(this, viewport);\n this.viewer.mark_composite_dirty();\n this.viewer.mark_backbuffer_clear_dirty();\n }\n project_world_position_to_canvas(world_position) {\n const ndc = this.project_world_position_to_ndc(world_position);\n // The position is outside the projection\n if (Math.abs(ndc.x) > 1.0 || Math.abs(ndc.y) > 1.0 || Math.abs(ndc.z) > 1.0) {\n return null;\n }\n const canvas_position = {\n x: this._canvas_position.x + this._canvas_blit_size.x * (ndc.x * 0.5 + 0.5),\n y: this._canvas_position.y + this._canvas_blit_size.y * (1.0 - (ndc.y * 0.5 + 0.5))\n };\n return canvas_position;\n }\n}\n//# sourceMappingURL=View.js.map","/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * Simple decorator that binds a method to the instance of the class it belongs to.\n */\nexport function Bound(_, property_key, descriptor) {\n return {\n get: function () {\n const bound = descriptor.value.bind(this);\n Object.defineProperty(this, property_key, {\n value: bound,\n configurable: true,\n writable: true\n });\n return bound;\n },\n configurable: true\n };\n}\n//# sourceMappingURL=Bound.js.map","import { assert } from '../../babylon/utility/Assert.js';\n/**\n * Debug Overlay.\n * - Creates an overlay canvas above a render canvas.\n * - Contains methods to draw on the canvas.\n */\nexport class Overlay {\n constructor(_debug_layer) {\n this._debug_layer = _debug_layer;\n this._overlay = document.createElement('canvas');\n this._overlay.style.position = 'absolute';\n this._overlay.style.left = '0';\n this._overlay.style.top = '0';\n this._overlay.style.pointerEvents = 'none';\n this._overlay.addEventListener('contextmenu', event => event.preventDefault());\n this._container = this._debug_layer.get_container();\n const context = this._overlay.getContext('2d');\n assert(context, 'Overlay canvas should have RenderingContext2D');\n this._context = context;\n }\n show() {\n if (!this._overlay.parentElement) {\n this._container.appendChild(this._overlay);\n }\n this.update();\n }\n hide() {\n if (this._overlay.parentElement) {\n this._container.removeChild(this._overlay);\n }\n this.clear_overlay();\n }\n dispose() {\n this.hide();\n }\n update() {\n this.clear_overlay();\n }\n draw_circle(x, y, radius, color, line_width) {\n this._context.beginPath();\n this._context.arc(x, y, radius, 0, Math.PI * 2, false);\n this._context.strokeStyle = color;\n this._context.lineWidth = line_width;\n this._context.stroke();\n this._context.closePath();\n }\n draw_rectangle(x, y, width, height, color, line_width) {\n this._context.beginPath();\n this._context.rect(x - width / 2, y - height / 2, width, height);\n this._context.strokeStyle = color;\n this._context.lineWidth = line_width;\n this._context.stroke();\n this._context.closePath();\n }\n draw_line(x1, y1, x2, y2, color, line_width) {\n this._context.strokeStyle = color;\n this._context.lineWidth = line_width;\n this._context.beginPath();\n this._context.moveTo(x1, y1);\n this._context.lineTo(x2, y2);\n this._context.stroke();\n this._context.closePath();\n }\n draw_infinite_line(x, y, angle, color, line_width) {\n const canvas_width = this._context.canvas.width;\n const canvas_height = this._context.canvas.height;\n // Calculate the end points of the line\n const x1 = x - canvas_width * Math.cos(angle);\n const y1 = y - canvas_height * Math.sin(angle);\n const x2 = x + canvas_width * Math.cos(angle);\n const y2 = y + canvas_height * Math.sin(angle);\n this._context.strokeStyle = color;\n this._context.lineWidth = line_width;\n this._context.beginPath();\n this._context.moveTo(x1, y1);\n this._context.lineTo(x2, y2);\n this._context.stroke();\n this._context.closePath();\n }\n clear_overlay() {\n this._context.clearRect(0, 0, this._overlay.width, this._overlay.height);\n }\n resize_overlay(canvas) {\n this._overlay.width = canvas.width;\n this._overlay.height = canvas.height;\n }\n}\n//# sourceMappingURL=Overlay.js.map","/* eslint-disable @typescript-eslint/naming-convention */\nconst listeners_description_map = new WeakMap();\nconst listeners_instance_storage_map = new WeakMap();\n/**\n * Decorator used to define element as Custom Element with a specifed tag.\n * Handles attributes changes and attaches/reataches/detaches DOM listeners for the element.\n */\nexport function CustomElement(tag) {\n return function (constructor) {\n // Define observedAttributes\n Object.defineProperty(constructor, 'observedAttributes', {\n get: function () {\n return constructor['observedAttributesArray'] || [];\n }\n });\n // Wrap render\n const original_render = constructor.prototype.render;\n constructor.prototype.render = function () {\n // Call the original method\n if (!original_render) {\n throw new Error('render method must be defined');\n }\n original_render.call(this);\n // Create listeners storage\n let listeners_storage = listeners_instance_storage_map.get(this);\n if (!listeners_storage) {\n listeners_storage = new Map();\n listeners_instance_storage_map.set(this, listeners_storage);\n }\n // Unregister event listeners\n listeners_storage.forEach(({ element, type }, method) => element.removeEventListener(type, method));\n listeners_storage.clear();\n // Register event listeners\n const event_listeners = listeners_description_map.get(constructor);\n if (event_listeners && this.shadowRoot) {\n event_listeners.forEach(description => {\n const elements = this.shadowRoot.querySelectorAll(description.selector);\n elements.forEach(element => {\n const bound_method = this[description.method_name].bind(this);\n element.addEventListener(description.type, bound_method);\n listeners_storage.delete(bound_method);\n listeners_storage.set(bound_method, { element: element, type: description.type });\n });\n });\n }\n };\n // Wrap attributeChangedCallback\n const originalAttributeChangedCallback = constructor.prototype.attributeChangedCallback;\n constructor.prototype.attributeChangedCallback = function (name, oldValue, newValue) {\n // Call the original method if it was defined\n if (originalAttributeChangedCallback) {\n originalAttributeChangedCallback.call(this, name, oldValue, newValue);\n }\n if (oldValue !== newValue) {\n this[name] = newValue;\n this.render();\n }\n };\n // Define the custom element with the provided tag\n if (!window.customElements.get(tag)) {\n window.customElements.define(tag, constructor);\n }\n };\n}\n/**\n * Defines property as element attribute.\n * Changing the attribute via `element.setAttribute` or via DOM `` will cause element to rerender.\n */\nexport function Attribute(target, propertyKey) {\n if (!target.constructor.observedAttributesArray) {\n target.constructor.observedAttributesArray = [];\n }\n target.constructor.observedAttributesArray.push(propertyKey);\n}\n/**\n * Defines a method as a callback for a specified event on a DOM element.\n */\nexport function OnEvent(type, selector) {\n return function (target, method_name, descriptor) {\n let event_listeners = listeners_description_map.get(target.constructor);\n if (!event_listeners) {\n event_listeners = [];\n listeners_description_map.set(target.constructor, event_listeners);\n }\n event_listeners.push({ type: type, selector: selector, method_name: method_name });\n };\n}\n//# sourceMappingURL=CustomElement.js.map","import { IColor, IVector3 } from '../../../../../api.js';\nexport class ElementFactory {\n static create_container(label, config = {}) {\n const { is_collapsed } = config;\n const collapsed_label = '▶ ' + label;\n const uncollapsed_label = '▼ ' + label;\n const tool_container = ElementFactory.create_element(/* html */ `\n
\n \n
\n
\n `);\n const container_label = tool_container.querySelector('.container-label');\n const container_content = tool_container.querySelector('.container-content');\n if (is_collapsed) {\n container_content.style.display = 'none';\n }\n container_label.addEventListener('click', () => {\n if (container_content.style.display === 'none') {\n container_content.style.display = 'flex';\n container_label.innerText = uncollapsed_label;\n }\n else {\n container_content.style.display = 'none';\n container_label.innerText = collapsed_label;\n }\n });\n return {\n element: tool_container,\n content: container_content\n };\n }\n static create_button(label, config) {\n const { on_click } = config;\n const button = document.createElement('button');\n button.textContent = label;\n button.classList.add('tool', 'custom-button');\n button.addEventListener('click', on_click);\n return {\n element: button,\n set_enabled: (is_enabled) => {\n button.disabled = !is_enabled;\n }\n };\n }\n static create_label(label) {\n const label_element = document.createElement('label');\n label_element.appendChild(document.createTextNode(label));\n label_element.classList.add('custom-label');\n return {\n element: label_element\n };\n }\n static create_input(type, label, initial_value, config = {}) {\n const { on_change } = config;\n const tool_container = ElementFactory.create_element(/* html */ `\n
\n \n \n
\n
\n `);\n const input = tool_container.querySelector(`.${type}`);\n const tracker = tool_container.querySelector('.tracker');\n ElementFactory.set_input_value(input, initial_value, type, !!on_change);\n let current_value = initial_value;\n input.onchange = () => {\n current_value = ElementFactory.get_input_value(input, type);\n if (on_change)\n on_change(current_value);\n };\n if (type === 'number') {\n const drag_threshold = 5;\n input.addEventListener('mousedown', function (e) {\n let is_dragging = false;\n const start_x = e.pageX;\n const start_value = parseInt(input.value) || 0;\n const pointer_move = (e) => {\n const diff_x = e.pageX - start_x;\n if (!is_dragging && Math.abs(diff_x) > drag_threshold) {\n is_dragging = true;\n }\n if (is_dragging) {\n const new_value = start_value + diff_x * 0.1;\n const rounded = Math.round(new_value * 10) / 10;\n input.value = String(rounded);\n current_value = rounded;\n if (on_change)\n on_change(current_value);\n }\n };\n const pointer_down = () => {\n if (!is_dragging) {\n input.select();\n }\n document.removeEventListener('mousemove', pointer_move);\n document.removeEventListener('mouseup', pointer_down);\n };\n document.addEventListener('mousemove', pointer_move);\n document.addEventListener('mouseup', pointer_down);\n });\n }\n let tracker_enabled = false;\n tracker.addEventListener('click', () => {\n tracker_enabled = !tracker_enabled;\n if (tracker_enabled) {\n tracker.classList.add('tracking-enabled');\n }\n else {\n tracker.classList.remove('tracking-enabled');\n }\n });\n return {\n element: tool_container,\n handler: {\n get: () => current_value,\n set: (val, report = true) => {\n if (current_value !== val) {\n current_value = val;\n if (tracker_enabled) {\n console.info('[TRACKING]:', label, ' > ', val);\n }\n ElementFactory.set_input_value(input, current_value, type, !!on_change);\n if (report && on_change)\n on_change(val);\n }\n }\n },\n set_enabled: (is_enabled) => {\n input.disabled = !is_enabled;\n }\n };\n }\n static create_vector3(label, initial_value, config = {}) {\n var _a, _b, _c;\n const { on_change, is_collapsed } = config;\n let stored_value = initial_value ? IVector3.copy(initial_value) : initial_value;\n const report = (axis, value) => {\n if (!stored_value)\n return;\n stored_value[axis] = value;\n if (on_change) {\n on_change(IVector3.copy(stored_value));\n }\n };\n const { element, content } = ElementFactory.create_container(label, { is_collapsed: is_collapsed });\n const x = ElementFactory.create_input('number', 'x', (_a = stored_value === null || stored_value === void 0 ? void 0 : stored_value.x) !== null && _a !== void 0 ? _a : 0, { on_change: (v) => report('x', v) });\n const y = ElementFactory.create_input('number', 'y', (_b = stored_value === null || stored_value === void 0 ? void 0 : stored_value.y) !== null && _b !== void 0 ? _b : 0, { on_change: (v) => report('y', v) });\n const z = ElementFactory.create_input('number', 'z', (_c = stored_value === null || stored_value === void 0 ? void 0 : stored_value.z) !== null && _c !== void 0 ? _c : 0, { on_change: (v) => report('z', v) });\n const optional = ElementFactory.create_input('string', 'value', String(initial_value), { is_nullable: true });\n if (!stored_value) {\n hide(x.element, y.element, z.element);\n }\n else {\n hide(optional.element);\n }\n if (!on_change) {\n x.set_enabled(false);\n y.set_enabled(false);\n z.set_enabled(false);\n }\n content.appendChild(x.element);\n content.appendChild(y.element);\n content.appendChild(z.element);\n content.appendChild(optional.element);\n return {\n element: element,\n handler: {\n get: () => {\n if (!stored_value)\n return stored_value;\n return new IVector3(x.handler.get(), y.handler.get(), z.handler.get());\n },\n set: (val, report = true) => {\n if (!val) {\n if (stored_value === val)\n return;\n stored_value = val;\n optional.handler.set(val);\n show(optional.element);\n hide(x.element, y.element, z.element);\n }\n else {\n if (stored_value && IVector3.equals(val, stored_value))\n return;\n if (!stored_value)\n stored_value = new IVector3();\n IVector3.copy_to_ref(val, stored_value);\n x.handler.set(val.x, false);\n y.handler.set(val.y, false);\n z.handler.set(val.z, false);\n optional.handler.set(IVector3.to_string(val));\n hide(optional.element);\n show(x.element, y.element, z.element);\n }\n if (report && on_change)\n on_change(val);\n }\n },\n set_enabled: (is_enabled) => {\n x.set_enabled(is_enabled);\n y.set_enabled(is_enabled);\n z.set_enabled(is_enabled);\n }\n };\n }\n static create_color_picker(label, initial_value, config = {}) {\n const { on_change } = config;\n const tool_container = ElementFactory.create_element(/* html */ `\n
\n \n \n
\n
\n `);\n const input = tool_container.querySelector('.color');\n const tracker = tool_container.querySelector('.tracker');\n if (on_change) {\n input.onchange = () => {\n on_change(IColor.from_HEX(input.value));\n };\n }\n let tracker_enabled = false;\n tracker.addEventListener('click', () => {\n tracker_enabled = !tracker_enabled;\n if (tracker_enabled) {\n tracker.classList.add('tracking-enabled');\n }\n else {\n tracker.classList.remove('tracking-enabled');\n }\n });\n return {\n element: tool_container,\n handler: {\n get: () => IColor.from_HEX(input.value),\n set: (val, report = true) => {\n const new_val = to_hex(val);\n if (input.value !== new_val) {\n if (tracker_enabled) {\n console.info('[TRACKING]:', label, ' > ', val);\n }\n input.value = new_val;\n if (report && on_change)\n on_change(val);\n }\n }\n },\n set_enabled: (is_enabled) => {\n input.disabled = !is_enabled;\n }\n };\n }\n static create_color3(label, initial_value, config = {}) {\n var _a, _b, _c;\n const { on_change, is_collapsed, has_color_picker } = config;\n let stored_value = initial_value ? IColor.copy(initial_value) : initial_value;\n let picker;\n const report = (channel, value) => {\n if (!stored_value)\n return;\n stored_value[channel] = value;\n if (on_change) {\n on_change(IColor.copy(stored_value));\n }\n if (picker) {\n picker.handler.set(stored_value);\n }\n };\n const { element, content } = ElementFactory.create_container(label, { is_collapsed: is_collapsed });\n const r = ElementFactory.create_input('number', 'r', (_a = stored_value === null || stored_value === void 0 ? void 0 : stored_value.r) !== null && _a !== void 0 ? _a : 0, { on_change: (v) => report('r', v) });\n const g = ElementFactory.create_input('number', 'g', (_b = stored_value === null || stored_value === void 0 ? void 0 : stored_value.g) !== null && _b !== void 0 ? _b : 0, { on_change: (v) => report('g', v) });\n const b = ElementFactory.create_input('number', 'b', (_c = stored_value === null || stored_value === void 0 ? void 0 : stored_value.b) !== null && _c !== void 0 ? _c : 0, { on_change: (v) => report('b', v) });\n const optional = ElementFactory.create_input('string', 'value', String(initial_value), { is_nullable: true });\n if (!on_change) {\n r.set_enabled(false);\n g.set_enabled(false);\n b.set_enabled(false);\n }\n content.appendChild(r.element);\n content.appendChild(g.element);\n content.appendChild(b.element);\n if (has_color_picker !== false) {\n picker = ElementFactory.create_color_picker('', initial_value !== null && initial_value !== void 0 ? initial_value : new IColor(), {\n on_change: (value) => {\n if (!stored_value)\n stored_value = new IColor();\n IColor.copy_to_ref(value, stored_value);\n r.handler.set(value.r, false);\n g.handler.set(value.g, false);\n b.handler.set(value.b, false);\n if (on_change) {\n on_change(IColor.copy(stored_value));\n }\n }\n });\n content.appendChild(picker.element);\n }\n content.appendChild(optional.element);\n if (!stored_value) {\n hide(r.element, g.element, b.element);\n if (picker) {\n hide(picker.element);\n }\n }\n else {\n hide(optional.element);\n }\n return {\n element: element,\n handler: {\n get: () => {\n if (!stored_value)\n return stored_value;\n return new IColor(r.handler.get(), g.handler.get(), b.handler.get());\n },\n set: (val, report = true) => {\n if (!val) {\n if (stored_value === val)\n return;\n stored_value = val;\n optional.handler.set(val);\n show(optional.element);\n hide(r.element, g.element, b.element);\n if (picker) {\n hide(picker.element);\n }\n }\n else {\n if (stored_value && IColor.equals(val, stored_value))\n return;\n if (!stored_value)\n stored_value = new IColor();\n IColor.copy_to_ref(val, stored_value);\n r.handler.set(val.r, false);\n g.handler.set(val.g, false);\n b.handler.set(val.b, false);\n optional.handler.set(IColor.to_string(val));\n hide(optional.element);\n show(r.element, g.element, b.element);\n if (picker) {\n picker.handler.set(val, false);\n show(picker.element);\n }\n }\n if (report && on_change)\n on_change(val);\n }\n },\n set_enabled: (is_enabled) => {\n r.set_enabled(is_enabled);\n g.set_enabled(is_enabled);\n b.set_enabled(is_enabled);\n picker === null || picker === void 0 ? void 0 : picker.set_enabled(is_enabled);\n }\n };\n }\n static create_select_menu(label, options, initial_value, config = {}) {\n const { on_change } = config;\n const tool_container = ElementFactory.create_element(/* html */ `\n
\n \n \n
\n
\n `);\n const select = tool_container.querySelector('.select');\n const tracker = tool_container.querySelector('.tracker');\n options.forEach(option => {\n const option_element = document.createElement('option');\n option_element.value = option;\n option_element.textContent = option;\n if (option === initial_value) {\n option_element.selected = true;\n }\n select.appendChild(option_element);\n });\n if (on_change) {\n select.addEventListener('change', () => {\n on_change(select.value);\n });\n }\n let tracker_enabled = false;\n tracker.addEventListener('click', () => {\n tracker_enabled = !tracker_enabled;\n if (tracker_enabled) {\n tracker.classList.add('tracking-enabled');\n }\n else {\n tracker.classList.remove('tracking-enabled');\n }\n });\n return {\n element: tool_container,\n handler: {\n get: () => select.value,\n set: (val, report = true) => {\n if (select.value !== val) {\n if (tracker_enabled) {\n console.info('[TRACKING]:', label, ' > ', val);\n }\n select.value = val;\n if (report && on_change)\n on_change(val);\n }\n }\n },\n set_enabled: (is_enabled) => {\n select.disabled = !is_enabled;\n }\n };\n }\n static create_setter(type, label, initial_value, setter, config = {}) {\n var _a;\n const { value_label, button_text, is_collapsed } = config;\n const container = ElementFactory.create_container(label, { is_collapsed: is_collapsed });\n const input = ElementFactory.create_input(type, value_label !== null && value_label !== void 0 ? value_label : 'value', initial_value);\n (_a = input.set_enabled) === null || _a === void 0 ? void 0 : _a.call(input, true);\n const button = ElementFactory.create_button(button_text !== null && button_text !== void 0 ? button_text : 'Set', { on_click: () => setter(input.handler.get()) });\n container.content.appendChild(input.element);\n container.content.appendChild(button.element);\n return {\n element: container.element,\n set_enabled: (is_enabled) => {\n input.set_enabled(is_enabled);\n button.set_enabled(is_enabled);\n }\n };\n }\n static create_getter(type, label, initial_value, getter, config = {}) {\n const { value_label: value_text, button_text, is_collapsed } = config;\n const container = ElementFactory.create_container(label, { is_collapsed: is_collapsed });\n const input = ElementFactory.create_input(type, value_text !== null && value_text !== void 0 ? value_text : 'value', initial_value);\n const button = ElementFactory.create_button(button_text !== null && button_text !== void 0 ? button_text : 'Get', { on_click: () => input.handler.set(getter()) });\n container.content.appendChild(input.element);\n container.content.appendChild(button.element);\n return {\n element: container.element,\n set_enabled: (is_enabled) => {\n var _a;\n (_a = button.set_enabled) === null || _a === void 0 ? void 0 : _a.call(button, is_enabled);\n }\n };\n }\n static create_vector3_setter(label, initial_value, setter, config) {\n const { button_text, is_collapsed } = config;\n const stored_value = IVector3.copy(initial_value);\n const report = (axis, value) => {\n stored_value[axis] = value;\n };\n const { element, content } = ElementFactory.create_container(label, { is_collapsed: is_collapsed });\n const x = ElementFactory.create_input('number', 'x', stored_value.x, { on_change: (v) => report('x', v) });\n const y = ElementFactory.create_input('number', 'y', stored_value.y, { on_change: (v) => report('y', v) });\n const z = ElementFactory.create_input('number', 'z', stored_value.z, { on_change: (v) => report('z', v) });\n const button = ElementFactory.create_button(button_text !== null && button_text !== void 0 ? button_text : 'Set', { on_click: () => setter(stored_value) });\n content.appendChild(x.element);\n content.appendChild(y.element);\n content.appendChild(z.element);\n content.appendChild(button.element);\n return {\n element: element,\n set_enabled: (is_enabled) => {\n x.set_enabled(is_enabled);\n y.set_enabled(is_enabled);\n z.set_enabled(is_enabled);\n button.set_enabled(is_enabled);\n }\n };\n }\n static create_vector3_getter(label, initial_value, getter, config = {}) {\n const { button_text, is_collapsed } = config;\n const { element, content } = ElementFactory.create_container(label, { is_collapsed: is_collapsed });\n const x = ElementFactory.create_input('number', 'r', initial_value.x);\n const y = ElementFactory.create_input('number', 'g', initial_value.y);\n const z = ElementFactory.create_input('number', 'b', initial_value.z);\n const button = ElementFactory.create_button(button_text !== null && button_text !== void 0 ? button_text : 'Get', {\n on_click: () => {\n const value = getter();\n x.handler.set(value.x);\n y.handler.set(value.y);\n z.handler.set(value.z);\n }\n });\n content.appendChild(x.element);\n content.appendChild(y.element);\n content.appendChild(z.element);\n content.appendChild(button.element);\n return {\n element: element,\n set_enabled: (is_enabled) => {\n button.set_enabled(is_enabled);\n }\n };\n }\n static create_color3_setter(label, initial_value, setter, config = {}) {\n const { has_color_picker, button_text, is_collapsed } = config;\n const stored_value = IColor.copy(initial_value);\n let picker;\n const report = (channel, value) => {\n stored_value[channel] = value;\n if (picker) {\n picker.handler.set(stored_value);\n }\n };\n const { element, content } = ElementFactory.create_container(label, { is_collapsed: is_collapsed });\n const r = ElementFactory.create_input('number', 'r', stored_value.r, { on_change: (v) => report('r', v) });\n const g = ElementFactory.create_input('number', 'g', stored_value.g, { on_change: (v) => report('g', v) });\n const b = ElementFactory.create_input('number', 'b', stored_value.b, { on_change: (v) => report('b', v) });\n content.appendChild(r.element);\n content.appendChild(g.element);\n content.appendChild(b.element);\n if (has_color_picker !== false) {\n picker = ElementFactory.create_color_picker('color', initial_value, {\n on_change: (value) => {\n IColor.copy_to_ref(value, stored_value);\n r.handler.set(value.r, false);\n g.handler.set(value.g, false);\n b.handler.set(value.b, false);\n }\n });\n content.appendChild(picker.element);\n }\n const button = ElementFactory.create_button(button_text !== null && button_text !== void 0 ? button_text : 'Set', { on_click: () => setter(stored_value) });\n content.appendChild(button.element);\n return {\n element: element,\n set_enabled: (is_enabled) => {\n r.set_enabled(is_enabled);\n g.set_enabled(is_enabled);\n b.set_enabled(is_enabled);\n picker === null || picker === void 0 ? void 0 : picker.set_enabled(is_enabled);\n button.set_enabled(is_enabled);\n }\n };\n }\n static create_color3_getter(label, initial_value, getter, config = {}) {\n const { has_color_picker, button_text, is_collapsed } = config;\n let picker;\n const { element, content } = ElementFactory.create_container(label, { is_collapsed: is_collapsed });\n const r = ElementFactory.create_input('number', 'r', initial_value.r);\n const g = ElementFactory.create_input('number', 'g', initial_value.g);\n const b = ElementFactory.create_input('number', 'b', initial_value.b);\n content.appendChild(r.element);\n content.appendChild(g.element);\n content.appendChild(b.element);\n if (has_color_picker !== false) {\n picker = ElementFactory.create_color_picker('color', initial_value);\n content.appendChild(picker.element);\n }\n const button = ElementFactory.create_button(button_text !== null && button_text !== void 0 ? button_text : 'Get', {\n on_click: () => {\n const value = getter();\n r.handler.set(value.r);\n g.handler.set(value.g);\n b.handler.set(value.b);\n if (picker) {\n picker.handler.set(value, false);\n }\n }\n });\n content.appendChild(button.element);\n return {\n element: element,\n set_enabled: (is_enabled) => {\n button.set_enabled(is_enabled);\n }\n };\n }\n static set_input_value(input, value, original_type, is_readonly) {\n if (value === undefined || value === null) {\n input.classList.add('null');\n input.type = 'string';\n input.value = String(value);\n input.disabled = true;\n }\n else {\n if (input.type !== original_type) {\n input.classList.remove('null');\n input.type = original_type;\n input.disabled = !is_readonly;\n }\n if (typeof value === 'boolean') {\n input.checked = value;\n }\n else {\n input.value = String(value);\n }\n }\n }\n static get_input_value(input, type) {\n if (input.type !== type) {\n return null;\n }\n switch (type) {\n case 'string':\n return input.value;\n case 'number':\n return Number.parseFloat(input.value);\n case 'checkbox':\n return input.checked;\n }\n throw new Error('Unsupported type: ' + type);\n }\n static create_element(html) {\n const doc = ElementFactory._parser.parseFromString(html, 'text/html');\n return doc.body.firstChild;\n }\n}\nElementFactory._parser = new DOMParser();\nfunction to_hex(color) {\n const r = Math.round(color.r * 255);\n const g = Math.round(color.g * 255);\n const b = Math.round(color.b * 255);\n const hex = ((r << 16) | (g << 8) | b).toString(16).padStart(6, '0');\n return `#${hex}`;\n}\nfunction show(...elements) {\n elements.forEach(e => { e.style.display = 'flex'; });\n}\nfunction hide(...elements) {\n elements.forEach(e => { e.style.display = 'none'; });\n}\n//# sourceMappingURL=ElementFactory.js.map","import { ElementFactory } from './ElementFactory.js';\nimport { ContainerController } from './ContainerController.js';\nexport class ContentConstructor {\n constructor(_parent, _watcher) {\n this._parent = _parent;\n this._watcher = _watcher;\n }\n clear() {\n this._parent.innerHTML = '';\n }\n create_label(label) {\n const element = ElementFactory.create_label(label).element;\n this._parent.appendChild(element);\n }\n create_container(...args) {\n const { element, content } = ElementFactory.create_container(...args);\n this._parent.appendChild(element);\n return new ContainerController(content, this._watcher);\n }\n create_button(...args) {\n const { element, set_enabled } = ElementFactory.create_button(...args);\n this._parent.appendChild(element);\n return { set_enabled: set_enabled };\n }\n create_input(...args) {\n const { element, set_enabled, handler } = ElementFactory.create_input(...args);\n this._parent.appendChild(element);\n return { set_enabled: set_enabled, handler: handler };\n }\n create_vector3(...args) {\n const { element, set_enabled, handler } = ElementFactory.create_vector3(...args);\n this._parent.appendChild(element);\n return { set_enabled: set_enabled, handler: handler };\n }\n create_color3(...args) {\n const { element, set_enabled, handler } = ElementFactory.create_color3(...args);\n this._parent.appendChild(element);\n return { set_enabled: set_enabled, handler: handler };\n }\n create_select_menu(...args) {\n const { element, set_enabled, handler } = ElementFactory.create_select_menu(...args);\n this._parent.appendChild(element);\n return { set_enabled: set_enabled, handler: handler };\n }\n create_setter(...args) {\n const { element, set_enabled } = ElementFactory.create_setter(...args);\n this._parent.appendChild(element);\n return { set_enabled: set_enabled };\n }\n create_getter(...args) {\n const { element, set_enabled } = ElementFactory.create_getter(...args);\n this._parent.appendChild(element);\n return { set_enabled: set_enabled };\n }\n create_vector3_setter(...args) {\n const { element, set_enabled } = ElementFactory.create_vector3_setter(...args);\n this._parent.appendChild(element);\n return { set_enabled: set_enabled };\n }\n create_vector3_getter(...args) {\n const { element, set_enabled } = ElementFactory.create_vector3_getter(...args);\n this._parent.appendChild(element);\n return { set_enabled: set_enabled };\n }\n create_color3_setter(...args) {\n const { element, set_enabled } = ElementFactory.create_color3_setter(...args);\n this._parent.appendChild(element);\n return { set_enabled: set_enabled };\n }\n create_color3_getter(...args) {\n const { element, set_enabled } = ElementFactory.create_color3_getter(...args);\n this._parent.appendChild(element);\n return { set_enabled: set_enabled };\n }\n}\n//# sourceMappingURL=ContentConstructor.js.map","import { IColor, IVector3 } from '../../../../../api.js';\nimport { ContentConstructor } from './ContentConstructor.js';\nexport class ContainerController {\n constructor(_container, _watcher) {\n this._container = _container;\n this._watcher = _watcher;\n this._inner_containers = new Map();\n this.custom = {\n /**\n * Creates a custom watcher of a type:\n * `string` | `number` | `boolean` | `IVector3` | `IColor`\n *\n * @param type Type of watcher: `'number'` | `'string'` | `'checkbox'` | `'vector3'` | `'color'`.\n * @param config.name Watcher label name.\n * @param config.get Function that gets a value for the watcher.\n * @param config.set Function that sets a value for the watcher.\n * @example\n * tab.custom.watch('vector3', {\n * name: 'my_position',\n * get: () => object.get_position(),\n * set: (v: IVector3) => object.set_position(v)\n * });\n */\n watch: (...[type, config]) => {\n switch (type) {\n case 'number':\n this.watch_custom_primitive(type, config);\n break;\n case 'string':\n this.watch_custom_primitive(type, config);\n break;\n case 'checkbox':\n this.watch_custom_primitive(type, config);\n break;\n case 'vector3':\n this.watch_custom_vector3(config);\n break;\n case 'color':\n this.watch_custom_color(config);\n break;\n }\n },\n /**\n * Creates a custom setter of a type:\n * `string` | `number` | `boolean` | `IVector3` | `IColor`\n *\n * @param type Type of setter: `'number'` | `'string'` | `'checkbox'` | `'vector3'` | `'color'`.\n * @param config.name Setter label name.\n * @param config.initial_value Setter initial value.\n * @param config.set Function that sets a value.\n *\n * @example\n * tab.custom.setter('vector3', {\n * name: 'set_position',\n * initial_value: new IVector3()\n * set: (v: IVector3) => object.set_position(v)\n * });\n */\n setter: (...[type, config]) => {\n switch (type) {\n case 'number':\n this._content_creator.create_setter(type, config.name, config.initial_value, config.set, config);\n break;\n case 'string':\n this._content_creator.create_setter(type, config.name, config.initial_value, config.set, config);\n break;\n case 'checkbox':\n this._content_creator.create_setter(type, config.name, config.initial_value, config.set, config);\n break;\n case 'vector3':\n this._content_creator.create_vector3_setter(config.name, config.initial_value, config.set, config);\n break;\n case 'color':\n this._content_creator.create_color3_setter(config.name, config.initial_value, config.set, config);\n break;\n }\n },\n /**\n * Creates a custom getter of a type:\n * `string` | `number` | `boolean` | `IVector3` | `IColor`\n *\n * @param type Type of getter: `'number'` | `'string'` | `'checkbox'` | `'vector3'` | `'color'`.\n * @param config.name Getter label name.\n * @param config.get Function that gets a value.\n *\n * @example\n * tab.custom.setter('vector3', {\n * name: 'get_position',\n * set: () => object.get_position()\n * });\n */\n getter: (...[type, config]) => {\n switch (type) {\n case 'number':\n this._content_creator.create_getter(type, config.name, config.initial_value, config.get, config);\n break;\n case 'string':\n this._content_creator.create_getter(type, config.name, config.initial_value, config.get, config);\n break;\n case 'checkbox':\n this._content_creator.create_getter(type, config.name, config.initial_value, config.get, config);\n break;\n case 'vector3':\n this._content_creator.create_vector3_setter(config.name, config.initial_value, config.get, config);\n break;\n case 'color':\n this._content_creator.create_color3_setter(config.name, config.initial_value, config.get, config);\n break;\n }\n },\n /**\n * Creates a custom select menu:\n *\n * @param label Menu label.\n * @param ootions Array of options.\n * @param config.get Function that gets a value.\n * @param config.set Function that sets a value.\n *\n * @example\n * tab.custom.select(\n * 'my_menu',\n * ['option-1', 'option-2', 'option-3'],\n * {\n * get: () => object.get_value()\n * set: (v) => object.set_value(v)\n * }\n * );\n */\n select: (label, options, config) => {\n const { get, set } = config;\n const { handler } = this._content_creator.create_select_menu(label, options, get(), { on_change: set !== null && set !== void 0 ? set : undefined });\n this.add_watcher(get, handler.set);\n }\n };\n this._content_creator = new ContentConstructor(_container, _watcher);\n }\n clear() {\n this._watcher.remove(this);\n this._inner_containers.clear();\n this._container.innerHTML = '';\n }\n /**\n * Creates a simple label text.\n *\n * @example\n * tab.label('My Options:');\n */\n label(label) {\n this._content_creator.create_label(label);\n }\n /**\n * Creates a button with a `on_click` callback.\n *\n * @example\n * tab.button('Click Me', { on_click: () => ... });\n */\n button(...args) {\n this._content_creator.create_button(...args);\n }\n /**\n * Creates a new container to encapsulate some elements.\n *\n * @example\n * const container = tab.container('My Parameters');\n * constainer.button(...)\n */\n container(...args) {\n const container = this._content_creator.create_container(...args);\n this._inner_containers.set(args[0], container);\n return container;\n }\n /**\n * Gets existing or creates a new container to encapsulate some elements.\n *\n * @example\n * const container = tab.get_container('My Parameters');\n * constainer.button(...)\n */\n get_container(...args) {\n var _a;\n return (_a = this._inner_containers.get(args[0])) !== null && _a !== void 0 ? _a : this.container(...args);\n }\n watch(target, paremeter, config = {}) {\n if (this.is_of_type(target, paremeter, 'number')) {\n return this.watch_primitive('number', target, paremeter, config);\n }\n if (this.is_of_type(target, paremeter, 'string')) {\n return this.watch_primitive('string', target, paremeter, config);\n }\n if (this.is_of_type(target, paremeter, 'checkbox')) {\n return this.watch_primitive('checkbox', target, paremeter, config);\n }\n if (this.is_of_type(target, paremeter, 'vector3')) {\n return this.watch_vector3(target, paremeter, config);\n }\n if (this.is_of_type(target, paremeter, 'color')) {\n return this.watch_color3(target, paremeter, config);\n }\n }\n setter(target, paremeter, initial_value, config = {}) {\n var _a;\n const label = (_a = config.name) !== null && _a !== void 0 ? _a : paremeter;\n // Some unavoidable casting.\n if (typeof initial_value === 'number') {\n this._content_creator.create_setter('number', label, initial_value, (v) => target[paremeter](v), config);\n return;\n }\n if (typeof initial_value === 'string') {\n this._content_creator.create_setter('string', label, initial_value, (v) => target[paremeter](v), config);\n return;\n }\n if (typeof initial_value === 'boolean') {\n this._content_creator.create_setter('checkbox', label, initial_value, (v) => target[paremeter](v), config);\n return;\n }\n if (typeof initial_value === 'object' && IVector3.is(initial_value)) {\n this._content_creator.create_vector3_setter(label, initial_value, (v) => target[paremeter](v), config);\n return;\n }\n if (typeof initial_value === 'object' && IColor.is(initial_value)) {\n this._content_creator.create_color3_setter(label, initial_value, (v) => target[paremeter](v), config);\n }\n }\n getter(target, paremeter, config) {\n var _a;\n const label = (_a = config.name) !== null && _a !== void 0 ? _a : paremeter;\n const getter = () => target[paremeter]();\n if (this.is_getter_of_type(getter, 'number')) {\n this._content_creator.create_getter('number', label, getter(), getter, config);\n return;\n }\n if (this.is_getter_of_type(getter, 'string')) {\n this._content_creator.create_getter('string', label, getter(), getter, config);\n return;\n }\n if (this.is_getter_of_type(getter, 'checkbox')) {\n this._content_creator.create_getter('checkbox', label, getter(), getter, config);\n return;\n }\n if (this.is_getter_of_type(getter, 'vector3')) {\n this._content_creator.create_vector3_getter(label, getter(), getter, config);\n return;\n }\n if (this.is_getter_of_type(getter, 'color')) {\n this._content_creator.create_color3_getter(label, getter(), getter, config);\n }\n }\n watch_vector3(target, paremeter, config = {}) {\n const { name, is_readonly } = config;\n const get = () => target[paremeter];\n const { set } = this._content_creator.create_vector3(name !== null && name !== void 0 ? name : paremeter, get(), Object.assign({ on_change: is_readonly\n ? undefined\n : (value) => {\n target[paremeter] = value;\n } }, config)).handler;\n this.add_watcher(get, set);\n }\n watch_color3(target, paremeter, config = {}) {\n const { name, is_readonly } = config;\n const get = () => target[paremeter];\n const { set } = this._content_creator.create_color3(name !== null && name !== void 0 ? name : paremeter, get(), Object.assign({ on_change: is_readonly\n ? undefined\n : (value) => {\n target[paremeter] = value;\n } }, config)).handler;\n this.add_watcher(get, set);\n }\n watch_primitive(type, target, paremeter, config = {}) {\n const { name, is_readonly } = config;\n const get = () => target[paremeter];\n const { set } = this._content_creator.create_input(type, name !== null && name !== void 0 ? name : paremeter, get(), {\n on_change: is_readonly\n ? undefined\n : (value) => {\n target[paremeter] = value;\n }\n }).handler;\n this.add_watcher(get, set);\n }\n is_of_type(target, paremeter, type) {\n switch (type) {\n case 'number':\n return typeof target[paremeter] === 'number';\n case 'string':\n return typeof target[paremeter] === 'string';\n case 'checkbox':\n return typeof target[paremeter] === 'boolean';\n case 'vector3':\n return typeof target[paremeter] === 'object' && IVector3.is(target[paremeter]);\n case 'color':\n return typeof target[paremeter] === 'object' && IColor.is(target[paremeter]);\n default:\n return false;\n }\n }\n is_getter_of_type(getter, type) {\n const result = getter();\n switch (type) {\n case 'number':\n return typeof result === 'number';\n case 'string':\n return typeof result === 'string';\n case 'checkbox':\n return typeof result === 'boolean';\n case 'vector3': {\n return typeof result === 'object' && IVector3.is(result);\n }\n case 'color':\n return typeof result === 'object' && IColor.is(result);\n default:\n return false;\n }\n }\n watch_custom_primitive(type, config) {\n if ('is_nullable' in config) {\n const { name, get, set } = config;\n const { set: element_set } = this._content_creator.create_input(type, name, get(), { on_change: set !== null && set !== void 0 ? set : undefined, is_nullable: true })\n .handler;\n this.add_watcher(get, element_set);\n }\n else {\n const { name, get, set } = config;\n const { set: element_set } = this._content_creator.create_input(type, name, get(), { on_change: set !== null && set !== void 0 ? set : undefined })\n .handler;\n this.add_watcher(get, element_set);\n }\n }\n watch_custom_vector3(config) {\n if ('is_nullable' in config) {\n const { name, get, set, is_collapsed } = config;\n const { set: element_set } = this._content_creator.create_vector3(name, get(), { on_change: set !== null && set !== void 0 ? set : undefined, is_collapsed: is_collapsed, is_nullable: true }).handler;\n this.add_watcher(get, element_set);\n }\n else {\n const { name, get, set, is_collapsed } = config;\n const { set: element_set } = this._content_creator.create_vector3(name, get(), { on_change: set !== null && set !== void 0 ? set : undefined, is_collapsed: is_collapsed }).handler;\n this.add_watcher(get, element_set);\n }\n }\n watch_custom_color(config) {\n if ('is_nullable' in config) {\n const { name, get, set, is_collapsed, has_color_picker } = config;\n const { set: element_set } = this._content_creator.create_color3(name, get(), { on_change: set !== null && set !== void 0 ? set : undefined, is_collapsed: is_collapsed, has_color_picker: has_color_picker, is_nullable: true }).handler;\n this.add_watcher(get, element_set);\n }\n else {\n const { name, get, set, is_collapsed, has_color_picker } = config;\n const { set: element_set } = this._content_creator.create_color3(name, get(), { on_change: set !== null && set !== void 0 ? set : undefined, is_collapsed: is_collapsed, has_color_picker: has_color_picker }).handler;\n this.add_watcher(get, element_set);\n }\n }\n add_watcher(instance_get, element_set) {\n this._watcher.add(this, () => element_set(instance_get(), false));\n }\n}\n//# sourceMappingURL=ContainerController.js.map","export class TabWatcher {\n constructor() {\n this._map = new Map();\n }\n add(container, watcher) {\n let watchers = this._map.get(container);\n if (!watchers) {\n watchers = [];\n this._map.set(container, watchers);\n }\n watchers.push(watcher);\n }\n remove(container) {\n this._map.delete(container);\n }\n clear() {\n this._map.clear();\n }\n call() {\n this._map.forEach(watchers => {\n for (let i = 0; i < watchers.length; i++) {\n watchers[i]();\n }\n });\n }\n}\n//# sourceMappingURL=TabWatcher.js.map","import { ContainerController } from './ContainerController.js';\nimport { TabWatcher } from './TabWatcher.js';\nexport class TabController {\n constructor(tag, type, elements, _menu) {\n this.tag = tag;\n this.type = type;\n this.elements = elements;\n this._menu = _menu;\n this._build_functions = [];\n this._dependencies = [];\n this._tab_watcher = new TabWatcher();\n this._container_controller = new ContainerController(this.elements.container, this._tab_watcher);\n this._update_observer = this._menu.update_observable.add(() => {\n let is_dirty = false;\n for (let i = 0; i < this._dependencies.length; i++) {\n const dependency_record = this._dependencies[i];\n const result = dependency_record[0]();\n if (result !== dependency_record[1]) {\n dependency_record[1] = result;\n is_dirty = true;\n break;\n }\n }\n if (is_dirty) {\n this._tab_watcher.clear();\n this._container_controller.clear();\n this._build_functions.forEach(build => build(this._container_controller));\n }\n else {\n this._tab_watcher.call();\n }\n });\n }\n set name(value) {\n this.elements.button.innerText = value;\n }\n get name() {\n return this.elements.button.innerText;\n }\n build(build_function, dependencies) {\n this._build_functions.push(build_function);\n build_function(this._container_controller);\n if (dependencies) {\n dependencies.forEach(dep => this._dependencies.push([dep, dep()]));\n }\n }\n set_active() {\n this._menu.set_active_tab(this);\n }\n remove() {\n this._menu.remove_tab(this);\n }\n dispose() {\n this._update_observer.dispose();\n }\n}\n//# sourceMappingURL=TabController.js.map","export class ElementController {\n constructor(_parent, type) {\n this._parent = _parent;\n this._element = document.createElement(type);\n }\n get api() {\n return this._element;\n }\n get style() {\n return this._element.style;\n }\n set_attribute(attribute, value) {\n this._element.setAttribute(attribute, value);\n }\n get_attribute(attribute) {\n return this._element.getAttribute(attribute);\n }\n set_position(x, y) {\n this._element.setAttribute('x', x.toString());\n this._element.setAttribute('y', y.toString());\n }\n show() {\n if (!this._element.parentElement) {\n this._parent.appendChild(this._element);\n }\n }\n hide() {\n if (this._element.parentElement) {\n this._parent.removeChild(this._element);\n }\n }\n}\n//# sourceMappingURL=ElementController.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { CustomElement, Attribute, OnEvent } from '../../utils/CustomElement.js';\nimport { Observable } from '../../../../Observable.js';\nimport { TabController } from './components/TabController.js';\nimport { ElementController } from '../ElementController.js';\nimport { Bound } from '../../../Bound.js';\nimport { IVector2 } from '../../../../api.js';\nimport { assert } from '../../../../babylon/utility/Assert.js';\nimport { clamp } from '../../../../Math.js';\nexport var TabType;\n(function (TabType) {\n TabType[\"SELECTION\"] = \"selection\";\n TabType[\"PERSISTENT\"] = \"persistent\";\n TabType[\"CONFIG\"] = \"config\";\n})(TabType || (TabType = {}));\nconst DEBUG_MENU = 'debug-menu';\nlet DebugMenu = class DebugMenu extends HTMLElement {\n constructor() {\n super();\n this._active_tab_content_container = document.createElement('div');\n this._tabs_buttons_container = document.createElement('div');\n this._active_tab = null;\n this._tabs = {\n [TabType.SELECTION]: { container: document.createElement('div'), controllers: new Map() },\n [TabType.PERSISTENT]: { container: document.createElement('div'), controllers: new Map() },\n [TabType.CONFIG]: { container: document.createElement('div'), controllers: new Map() }\n };\n this._drag_start_position = new IVector2();\n this.x = '10';\n this.y = '80';\n this.update_observable = new Observable();\n this.selection = {\n get_tab: (tag) => this.get_or_create_tab(tag, TabType.SELECTION),\n clear: () => {\n const storage = this._tabs[TabType.SELECTION];\n storage.controllers.forEach(tab => tab.remove());\n storage.controllers.clear();\n storage.container.innerHTML = '';\n }\n };\n this.persistent = {\n get_tab: (tag) => this.get_or_create_tab(tag, TabType.PERSISTENT)\n };\n this.config = {\n get_tab: (tag) => this.get_or_create_tab(tag, TabType.CONFIG)\n };\n this._shadow = this.attachShadow({ mode: 'open' });\n this._tabs[TabType.SELECTION].container.classList.add('selection-tabs-container');\n this._tabs[TabType.PERSISTENT].container.classList.add('persistent-tabs-container');\n this._tabs[TabType.CONFIG].container.classList.add('config-tabs-container');\n this._active_tab_content_container.classList.add('tab-content');\n this._tabs_buttons_container.classList.add('tabs-container');\n this._tabs_buttons_container.appendChild(this._tabs[TabType.SELECTION].container);\n this._tabs_buttons_container.appendChild(this._tabs[TabType.PERSISTENT].container);\n this._tabs_buttons_container.appendChild(this._tabs[TabType.CONFIG].container);\n this.render();\n }\n drag_start(e) {\n this._drag_start_position.x = e.clientX;\n this._drag_start_position.y = e.clientY;\n window.addEventListener('pointermove', this.drag);\n window.addEventListener('pointerup', (e) => {\n const { x, y } = this.get_drag_position(e);\n this.x = String(x);\n this.y = String(y);\n window.removeEventListener('pointermove', this.drag);\n }, { once: true });\n }\n get_drag_position(e) {\n const { x, y } = this._drag_start_position;\n const delta_x = e.clientX - x;\n const delta_y = e.clientY - y;\n const parent = this.parentElement;\n assert(parent, 'Should have parent');\n return new IVector2(clamp(Number(this.x) - delta_x, 0, parent.offsetWidth - 40), clamp(Number(this.y) + delta_y, 20, parent.offsetHeight - 20));\n }\n drag(e) {\n const { x, y } = this.get_drag_position(e);\n this.style.right = `${x}px`;\n this.style.top = `${y}px`;\n }\n render() {\n this._shadow.innerHTML =\n /* html */\n `\n \n
\n
\n
\n `;\n this._shadow.appendChild(this._active_tab_content_container);\n this._shadow.appendChild(this._tabs_buttons_container);\n }\n update() {\n this.update_observable.notify(this);\n }\n set_active_tab(controller) {\n if (this._active_tab) {\n this._active_tab_content_container.removeChild(this._active_tab.elements.container);\n }\n if (controller) {\n this._active_tab_content_container.appendChild(controller.elements.container);\n }\n this._active_tab = controller;\n }\n get_active_tab() {\n var _a;\n return (_a = this._active_tab) !== null && _a !== void 0 ? _a : null;\n }\n remove_tab(controller) {\n controller.dispose();\n if (this._active_tab === controller) {\n this.set_active_tab(null);\n }\n try {\n this._tabs[controller.type].container.removeChild(controller.elements.button);\n this._tabs[controller.type].controllers.delete(controller.tag);\n }\n catch (_) {\n // Ignore if the tab is already removed\n }\n }\n get_or_create_tab(tag, type) {\n const { controllers, container } = this._tabs[type];\n const existing_controller = controllers.get(tag);\n if (existing_controller) {\n return existing_controller;\n }\n const elements = {\n button: this.create_tab_element(tag),\n container: this.create_tab_container(tag)\n };\n const controller = new TabController(tag, type, elements, this);\n elements.button.addEventListener('click', () => this.set_active_tab(controller));\n controllers.set(tag, controller);\n container.appendChild(elements.button);\n return controller;\n }\n create_tab_element(name) {\n const element = document.createElement('div');\n element.innerText = name;\n element.classList.add('tab');\n return element;\n }\n create_tab_container(name) {\n const element = document.createElement('div');\n element.classList.add('tab-container');\n return element;\n }\n};\n__decorate([\n Attribute\n], DebugMenu.prototype, \"x\", void 0);\n__decorate([\n Attribute\n], DebugMenu.prototype, \"y\", void 0);\n__decorate([\n OnEvent('pointerdown', '.move-bar')\n], DebugMenu.prototype, \"drag_start\", null);\n__decorate([\n Bound\n], DebugMenu.prototype, \"drag\", null);\nDebugMenu = __decorate([\n CustomElement(DEBUG_MENU)\n], DebugMenu);\nexport { DebugMenu };\nexport class DebugMenuController extends ElementController {\n constructor(parent) {\n super(parent, DEBUG_MENU);\n }\n}\n//# sourceMappingURL=DebugMenu.js.map","import { IColor4, IVector3 } from '../../../api.js';\nexport const GIZMO_AXIS_COLOR = {\n x: new IColor4(1.0, 0.2, 0.0, 1.0), // RED\n y: new IColor4(0.8, 1.0, 0.0, 1.0), // GREEN\n z: new IColor4(0.2, 0.2, 1.0, 1.0), // BLUE\n center: new IColor4(1, 1, 1, 1) // WHITE\n};\nexport const GIZMO_COLOR_FACTOR = {\n active: new IVector3(1.6),\n not_active: new IVector3(0.85)\n};\n//# sourceMappingURL=GizmoColors.js.map","import { IColor4 } from '../../../api.js';\nexport class MeshDescriptions {\n constructor() { }\n static create_arrow(shaft_length, shaft_radius, cone_height, cone_radius, shaft_color, cone_color) {\n const shaft_detail = 12; // Number of sides of the cylinder\n const cone_detail = 12; // Number of sides of the cone\n // Assemble the arrow by translating the cone above the cylinder\n const shaft = MeshDescriptions.create_cylinder(shaft_length, shaft_radius, shaft_color, shaft_detail);\n const cone = MeshDescriptions.create_cone(cone_height, cone_radius, cone_color, cone_detail);\n // Translate cone positions\n for (let i = 0; i < cone.positions.length; i += 3) {\n cone.positions[i + 1] += shaft_length / 2; // Shift along the y-axis\n }\n // Combine the geometries\n const positions = new Float32Array([...shaft.positions, ...cone.positions]);\n const colors = new Float32Array([...shaft.colors, ...cone.colors]);\n const indices = new Uint16Array([...shaft.indices, ...cone.indices.map(index => index + shaft.positions.length / 3)]);\n return {\n positions: positions,\n indices: indices,\n colors: colors\n };\n }\n static create_scale_arrow(shaft_length, shaft_radius, cube_side_size, shaft_color, cube_color) {\n const shaft_detail = 12; // Number of sides of the cylinder\n // Assemble the arrow by translating the cone above the cylinder\n const shaft = MeshDescriptions.create_cylinder(shaft_length, shaft_radius, shaft_color, shaft_detail);\n const cone = MeshDescriptions.create_cube(cube_side_size, cube_color);\n // Translate cone positions\n for (let i = 0; i < cone.positions.length; i += 3) {\n cone.positions[i + 1] += shaft_length / 2; // Shift along the y-axis\n }\n // Combine the geometries\n const positions = new Float32Array([...shaft.positions, ...cone.positions]);\n const colors = new Float32Array([...shaft.colors, ...cone.colors]);\n const indices = new Uint16Array([...shaft.indices, ...cone.indices.map(index => index + shaft.positions.length / 3)]);\n return {\n positions: positions,\n indices: indices,\n colors: colors\n };\n }\n static create_cylinder(height, radius, color, detail) {\n const positions = [];\n const colors = [];\n const indices = [];\n const angle_step = (Math.PI * 2) / detail;\n const color_array = IColor4.to_array(color);\n // Create top and bottom circle vertices\n for (let i = 0; i <= detail; i++) {\n const angle = i * angle_step;\n const x = Math.cos(angle) * radius;\n const z = Math.sin(angle) * radius;\n // Top circle vertex\n positions.push(x, height / 2, z);\n colors.push(...color_array);\n // Bottom circle vertex\n positions.push(x, -height / 2, z);\n colors.push(...color_array);\n }\n // Create indices for the top circle, bottom circle, and sides\n for (let i = 0; i < detail; i++) {\n const top1 = 2 * i;\n const bottom1 = 2 * i + 1;\n const top2 = 2 * i + 2;\n const bottom2 = 2 * i + 3;\n // Top circle triangle\n indices.push(detail * 2, top2, top1);\n // Bottom circle triangle\n indices.push(bottom1, bottom2, detail * 2 + 1);\n // Side faces\n indices.push(top1, top2, bottom1);\n indices.push(bottom1, top2, bottom2);\n }\n // Center vertices for the top and bottom circles\n positions.push(0, height / 2, 0); // top center vertex\n colors.push(...color_array);\n positions.push(0, -height / 2, 0); // bottom center vertex\n colors.push(...color_array);\n return {\n positions: new Float32Array(positions),\n indices: new Uint16Array(indices),\n colors: new Float32Array(colors)\n };\n }\n static create_cone(height, radius, color, detail) {\n const positions = [];\n const colors = [];\n const indices = [];\n const angle_step = (Math.PI * 2) / detail;\n const color_array = IColor4.to_array(color);\n // Base circle vertices and center vertex\n for (let i = 0; i <= detail; i++) {\n const angle = i * angle_step;\n const x = Math.cos(angle) * radius;\n const z = Math.sin(angle) * radius;\n positions.push(x, 0, z); // Base circle vertex\n colors.push(...color_array);\n }\n // Tip of the cone\n positions.push(0, height, 0); // Tip vertex at the center top\n colors.push(...color_array);\n // Base center vertex for easy base triangulation\n positions.push(0, 0, 0); // Center of the base circle\n colors.push(...color_array);\n // Create indices for the cone's surface and base\n const tip_index = detail + 1;\n const base_center_index = detail + 2;\n for (let i = 0; i < detail; i++) {\n const current = i;\n const next = (i + 1) % detail;\n // Side face triangle (tip, next, current)\n indices.push(tip_index, next, current);\n // Base triangle (current, next, baseCenterIndex)\n indices.push(current, next, base_center_index);\n }\n return {\n positions: new Float32Array(positions),\n indices: new Uint16Array(indices),\n colors: new Float32Array(colors)\n };\n }\n static create_plane(width, height, color) {\n const positions = [];\n const colors = [];\n const indices = [];\n // Vertex positions\n positions.push(-width / 2, 0, -height / 2); // Bottom left\n positions.push(width / 2, 0, -height / 2); // Bottom right\n positions.push(width / 2, 0, height / 2); // Top right\n positions.push(-width / 2, 0, height / 2); // Top left\n // Vertex colors\n for (let i = 0; i < 4; i++) {\n colors.push(...IColor4.to_array(color));\n }\n // Indices for two triangles for one side\n indices.push(0, 1, 2);\n indices.push(2, 3, 0);\n // Indices for two triangles for the opposite side\n indices.push(2, 1, 0);\n indices.push(0, 3, 2);\n return {\n positions: new Float32Array(positions.flat()),\n indices: new Uint16Array(indices),\n colors: new Float32Array(colors)\n };\n }\n static create_torus(major_radius, minor_radius, major_segments, minor_segments, color) {\n const positions = [];\n const colors = [];\n const indices = [];\n for (let i = 0; i <= major_segments; i++) {\n const theta = (i / major_segments) * 2 * Math.PI;\n const sin_theta = Math.sin(theta);\n const cos_theta = Math.cos(theta);\n for (let j = 0; j <= minor_segments; j++) {\n const phi = (j / minor_segments) * 2 * Math.PI;\n const sin_phi = Math.sin(phi);\n const cos_phi = Math.cos(phi);\n const x = (major_radius + minor_radius * cos_phi) * cos_theta;\n const y = minor_radius * sin_phi;\n const z = (major_radius + minor_radius * cos_phi) * sin_theta;\n positions.push(x, y, z);\n colors.push(...IColor4.to_array(color));\n }\n }\n for (let i = 0; i < major_segments; i++) {\n for (let j = 0; j < minor_segments; j++) {\n const first = (i * (minor_segments + 1)) + j;\n const second = first + minor_segments + 1;\n indices.push(first, second, first + 1);\n indices.push(second, second + 1, first + 1);\n }\n }\n return {\n positions: new Float32Array(positions),\n colors: new Float32Array(colors),\n indices: new Uint16Array(indices)\n };\n }\n static create_cube(side_length, color) {\n const half_side = side_length / 2;\n const positions = [\n // Front face\n -half_side, -half_side, half_side, // Bottom left\n half_side, -half_side, half_side, // Bottom right\n half_side, half_side, half_side, // Top right\n -half_side, half_side, half_side, // Top left\n // Back face\n half_side, -half_side, -half_side, // Bottom right\n -half_side, -half_side, -half_side, // Bottom left\n -half_side, half_side, -half_side, // Top left\n half_side, half_side, -half_side, // Top right\n // Top face\n -half_side, half_side, half_side, // Top left front\n half_side, half_side, half_side, // Top right front\n half_side, half_side, -half_side, // Top right back\n -half_side, half_side, -half_side, // Top left back\n // Bottom face\n -half_side, -half_side, -half_side, // Bottom left back\n half_side, -half_side, -half_side, // Bottom right back\n half_side, -half_side, half_side, // Bottom right front\n -half_side, -half_side, half_side, // Bottom left front\n // Right face\n half_side, -half_side, half_side, // Bottom right front\n half_side, -half_side, -half_side, // Bottom right back\n half_side, half_side, -half_side, // Top right back\n half_side, half_side, half_side, // Top right front\n // Left face\n -half_side, -half_side, -half_side, // Bottom left back\n -half_side, -half_side, half_side, // Bottom left front\n -half_side, half_side, half_side, // Top left front\n -half_side, half_side, -half_side // Top left back\n ];\n const colors = [];\n for (let i = 0; i < 24; i++) { // 24 vertices\n colors.push(...IColor4.to_array(color));\n }\n const indices = [\n // Front face\n 0, 1, 2, 0, 2, 3,\n // Back face\n 4, 5, 6, 4, 6, 7,\n // Top face\n 8, 9, 10, 8, 10, 11,\n // Bottom face\n 12, 13, 14, 12, 14, 15,\n // Right face\n 16, 17, 18, 16, 18, 19,\n // Left face\n 20, 21, 22, 20, 22, 23\n ];\n return {\n positions: new Float32Array(positions),\n indices: new Uint16Array(indices),\n colors: new Float32Array(colors)\n };\n }\n static create_circle(outer_radius, inner_radius, segments, color) {\n const positions = [];\n const colors = [];\n const indices = [];\n const angle_step = (Math.PI * 2) / segments;\n // Generate vertices for the outer circle\n for (let i = 0; i < segments; i++) {\n const angle = i * angle_step;\n const x = Math.cos(angle) * outer_radius;\n const z = Math.sin(angle) * outer_radius;\n positions.push(x, 0, z);\n colors.push(...IColor4.to_array(color));\n }\n // Generate vertices for the inner circle\n for (let i = 0; i < segments; i++) {\n const angle = i * angle_step;\n const x = Math.cos(angle) * inner_radius;\n const z = Math.sin(angle) * inner_radius;\n positions.push(x, 0, z);\n colors.push(...IColor4.to_array(color));\n }\n // Generate indices\n for (let i = 0; i < segments; i++) {\n const next_index = (i + 1) % segments;\n // Outer circle triangle\n indices.push(i, next_index, segments + i);\n indices.push(next_index, segments + next_index, segments + i);\n // Inner circle triangle (opposite side)\n indices.push(segments + i, next_index, i);\n indices.push(segments + i, segments + next_index, next_index);\n }\n return {\n positions: new Float32Array(positions.flat()),\n indices: new Uint16Array(indices),\n colors: new Float32Array(colors)\n };\n }\n}\n//# sourceMappingURL=MeshDescriptions.js.map","import { IMatrix4, IVector3 } from '../../../../api.js';\nimport { assert } from '../../../../babylon/utility/Assert.js';\nimport { GIZMO_AXIS_COLOR, GIZMO_COLOR_FACTOR } from '../GizmoColors.js';\nimport { MeshDescriptions } from '../MeshDescriptions.js';\nexport class MoveArrow {\n constructor(viewer, transform_handling, use_global_transform, axis) {\n this.transform_handling = transform_handling;\n this.use_global_transform = use_global_transform;\n this.axis = axis;\n this._viewer = viewer;\n const color = GIZMO_AXIS_COLOR[axis];\n const arrow_mesh_description = MeshDescriptions.create_arrow(0.5, // shaft length\n 0.015, // shaft radius\n 0.225, // cone height\n 0.05, // cone radius\n color, // shaft color\n color // cone color\n );\n this._ui_mesh = this._viewer.create_ui_mesh();\n this._ui_mesh.load_mesh(arrow_mesh_description);\n this.gizmo = this._ui_mesh.create_gizmo();\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.not_active;\n if (axis === 'x') {\n this.gizmo.rotation.z = -90 * (Math.PI / 180);\n }\n else if (axis === 'z') {\n this.gizmo.rotation.x = 90 * (Math.PI / 180);\n }\n this.gizmo.position[this.axis] += 0.25 + 0.05;\n this.add_event_listeners();\n this._ui_mesh.draw_on_top = true;\n }\n add_event_listeners() {\n this.gizmo.pointer_enter_observable.add(this.on_pointer_over.bind(this));\n this.gizmo.drag_observable.add(this.on_drag.bind(this));\n this.gizmo.pointer_leave_observable.add(this.on_pointer_leave.bind(this));\n }\n on_pointer_over() {\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.active;\n }\n on_drag(_, event) {\n if (!this.transform_handling.get_world_transform) {\n const pos = this.transform_handling.position.get();\n pos[this.axis] += event.world_delta[this.axis];\n this.transform_handling.position.set(pos);\n return;\n }\n if (this.use_global_transform) {\n this.handle_global_transform(event);\n }\n else {\n this.handle_local_transform(event);\n }\n }\n handle_global_transform(event) {\n const parent_transform = this.transform_handling.get_parent_world_transform ? this.transform_handling.get_parent_world_transform() : undefined;\n const position = parent_transform ? IMatrix4.transform_vector3(parent_transform, this.transform_handling.position.get()) : this.transform_handling.position.get();\n position[this.axis] += event.world_delta[this.axis];\n if (parent_transform) {\n const local_position = IMatrix4.transform_vector3(IMatrix4.inverse(parent_transform), position);\n this.transform_handling.position.set(local_position);\n }\n else {\n this.transform_handling.position.set(position);\n }\n }\n handle_local_transform(event) {\n assert(this.transform_handling.get_world_transform, 'Transform handling should contain world transform matrix getter');\n const parent_transform = this.transform_handling.get_parent_world_transform ? this.transform_handling.get_parent_world_transform() : undefined;\n const position = parent_transform ? IMatrix4.transform_vector3(parent_transform, this.transform_handling.position.get()) : this.transform_handling.position.get();\n const current_transform = this.transform_handling.get_world_transform();\n const rotation_matrix = IMatrix4.extractRotationMatrix(current_transform);\n let world_delta;\n switch (this.axis) {\n case 'x':\n world_delta = new IVector3(event.local_delta.x, 0, 0);\n break;\n case 'y':\n world_delta = new IVector3(0, event.local_delta.y, 0);\n break;\n case 'z':\n world_delta = new IVector3(0, 0, event.local_delta.z);\n break;\n }\n const local_delta = IMatrix4.transform_vector3(rotation_matrix, world_delta);\n const new_position = IVector3.add(position, local_delta);\n if (parent_transform) {\n const local_position = IMatrix4.transform_vector3(IMatrix4.inverse(parent_transform), new_position);\n this.transform_handling.position.set(local_position);\n }\n else {\n this.transform_handling.position.set(new_position);\n }\n }\n on_pointer_leave() {\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.not_active;\n }\n}\n//# sourceMappingURL=MoveArrow.js.map","import { IMatrix4, IVector3 } from '../../../../api.js';\nimport { assert } from '../../../../babylon/utility/Assert.js';\nimport { GIZMO_AXIS_COLOR, GIZMO_COLOR_FACTOR } from '../GizmoColors.js';\nimport { MeshDescriptions } from '../MeshDescriptions.js';\nexport class MovePlane {\n constructor(viewer, transform_handling, use_global_transform, plane) {\n this.transform_handling = transform_handling;\n this.use_global_transform = use_global_transform;\n this.plane = plane;\n this._viewer = viewer;\n const color = GIZMO_AXIS_COLOR[plane];\n const arrow_mesh_description = MeshDescriptions.create_plane(0.2, // width\n 0.2, // height\n color // color\n );\n this._ui_mesh = this._viewer.create_ui_mesh();\n this._ui_mesh.load_mesh(arrow_mesh_description);\n this.gizmo = this._ui_mesh.create_gizmo();\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.not_active;\n if (plane === 'x') {\n this.gizmo.rotation.z = -90 * (Math.PI / 180);\n this.gizmo.position.y += 0.25;\n this.gizmo.position.z += 0.25;\n }\n else if (plane === 'z') {\n this.gizmo.rotation.x = 90 * (Math.PI / 180);\n this.gizmo.position.y += 0.25;\n this.gizmo.position.x += 0.25;\n }\n else {\n this.gizmo.position.x += 0.25;\n this.gizmo.position.z += 0.25;\n }\n this.add_event_listeners();\n this._ui_mesh.draw_on_top = true;\n }\n add_event_listeners() {\n this.gizmo.pointer_enter_observable.add(this.on_pointer_over.bind(this));\n this.gizmo.drag_observable.add(this.on_drag.bind(this));\n this.gizmo.pointer_leave_observable.add(this.on_pointer_leave.bind(this));\n }\n on_pointer_over() {\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.active;\n }\n on_drag(_, event) {\n if (!this.transform_handling.get_world_transform) {\n const pos = this.transform_handling.position.get();\n if (this.plane === 'x') {\n pos.y += event.world_delta.y;\n pos.z += event.world_delta.z;\n }\n else if (this.plane === 'y') {\n pos.x += event.world_delta.x;\n pos.z += event.world_delta.z;\n }\n else {\n pos.x += event.world_delta.x;\n pos.y += event.world_delta.y;\n }\n this.transform_handling.position.set(pos);\n return;\n }\n if (this.use_global_transform) {\n this.handle_global_transform(event);\n }\n else {\n this.handle_local_transform(event);\n }\n }\n handle_global_transform(event) {\n const parent_transform = this.transform_handling.get_parent_world_transform ? this.transform_handling.get_parent_world_transform() : undefined;\n const position = parent_transform ? IMatrix4.transform_vector3(parent_transform, this.transform_handling.position.get()) : this.transform_handling.position.get();\n if (this.plane === 'x') {\n position.y += event.local_delta.y;\n position.z += event.local_delta.z;\n }\n else if (this.plane === 'y') {\n position.x += event.local_delta.x;\n position.z += event.local_delta.z;\n }\n else {\n position.x += event.local_delta.x;\n position.y += event.local_delta.y;\n }\n if (parent_transform) {\n const local_position = IMatrix4.transform_vector3(IMatrix4.inverse(parent_transform), position);\n this.transform_handling.position.set(local_position);\n }\n else {\n this.transform_handling.position.set(position);\n }\n }\n handle_local_transform(event) {\n assert(this.transform_handling.get_world_transform, 'Transform handling should contain world transform matrix getter');\n const parent_transform = this.transform_handling.get_parent_world_transform ? this.transform_handling.get_parent_world_transform() : undefined;\n const position = parent_transform ? IMatrix4.transform_vector3(parent_transform, this.transform_handling.position.get()) : this.transform_handling.position.get();\n const current_transform = this.transform_handling.get_world_transform();\n const rotation_matrix = IMatrix4.extractRotationMatrix(current_transform);\n let world_delta;\n switch (this.plane) {\n case 'x':\n world_delta = new IVector3(0, event.local_delta.y, event.local_delta.z);\n break;\n case 'y':\n world_delta = new IVector3(event.local_delta.x, 0, event.local_delta.z);\n break;\n case 'z':\n world_delta = new IVector3(event.local_delta.x, event.local_delta.y, 0);\n break;\n }\n const local_delta = IMatrix4.transform_vector3(rotation_matrix, world_delta);\n const new_position = IVector3.add(position, local_delta);\n if (parent_transform) {\n const local_position = IMatrix4.transform_vector3(IMatrix4.inverse(parent_transform), new_position);\n this.transform_handling.position.set(local_position);\n }\n else {\n this.transform_handling.position.set(new_position);\n }\n }\n on_pointer_leave() {\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.not_active;\n }\n}\n//# sourceMappingURL=MovePlane.js.map","import { IMatrix4, IVector3 } from '../../../../api.js';\nimport { get_euler_angles_from_rotation_matrix } from '../../../../Math.js';\nimport { MoveArrow } from './MoveArrow.js';\nimport { MovePlane } from './MovePlane.js';\nexport class MoveGizmo {\n constructor(viewer, transform_handling, use_global_transform) {\n this.transform_handling = transform_handling;\n this.use_global_transform = use_global_transform;\n this._viewer = viewer;\n this._ui_mesh = this._viewer.create_ui_mesh();\n this.gizmo = this._ui_mesh.create_gizmo();\n this.arrows = {\n x: new MoveArrow(this._viewer, this.transform_handling, use_global_transform, 'x'),\n y: new MoveArrow(this._viewer, this.transform_handling, use_global_transform, 'y'),\n z: new MoveArrow(this._viewer, this.transform_handling, use_global_transform, 'z')\n };\n this.arrows.x.gizmo.set_parent(this.gizmo);\n this.arrows.y.gizmo.set_parent(this.gizmo);\n this.arrows.z.gizmo.set_parent(this.gizmo);\n this.planes = {\n x: new MovePlane(this._viewer, this.transform_handling, use_global_transform, 'x'),\n y: new MovePlane(this._viewer, this.transform_handling, use_global_transform, 'y'),\n z: new MovePlane(this._viewer, this.transform_handling, use_global_transform, 'z')\n };\n this.planes.x.gizmo.set_parent(this.gizmo);\n this.planes.y.gizmo.set_parent(this.gizmo);\n this.planes.z.gizmo.set_parent(this.gizmo);\n }\n update_gizmo_rotation() {\n if (this.use_global_transform || !this.transform_handling.get_world_transform) {\n this.gizmo.rotation = IVector3.Zero();\n }\n else {\n const world_rotation = IMatrix4.extractRotationMatrix(this.transform_handling.get_world_transform());\n this.gizmo.rotation = get_euler_angles_from_rotation_matrix(world_rotation);\n }\n }\n dispose() {\n this.arrows.x.gizmo.dispose();\n this.arrows.y.gizmo.dispose();\n this.arrows.z.gizmo.dispose();\n this.planes.x.gizmo.dispose();\n this.planes.y.gizmo.dispose();\n this.planes.z.gizmo.dispose();\n this.gizmo.dispose();\n }\n}\n//# sourceMappingURL=MoveGizmo.js.map","import { get_euler_angles_from_rotation_matrix } from '../../../../Math.js';\nimport { IColor4, IMatrix4, IVector3 } from '../../../../api.js';\nimport { assert } from '../../../../babylon/utility/Assert.js';\nimport { GIZMO_AXIS_COLOR, GIZMO_COLOR_FACTOR } from '../GizmoColors.js';\nimport { MeshDescriptions } from '../MeshDescriptions.js';\nexport class RotationTorus {\n constructor(viewer, transform_handling, use_global_transorm, axis) {\n this.transform_handling = transform_handling;\n this.use_global_transorm = use_global_transorm;\n this.axis = axis;\n this._initial_plane_point = null;\n this._viewer = viewer;\n const color = GIZMO_AXIS_COLOR[axis];\n const torus_mesh_description = MeshDescriptions.create_torus(0.85, // Major radius\n 0.02, // Minor radius\n 60, // Major segments\n 8, // Minor Segments\n color);\n const input_mesh_description = MeshDescriptions.create_circle(1, 0.7, 30, new IColor4(0, 0, 0, 0));\n this._ui_mesh = this._viewer.create_ui_mesh();\n this._ui_mesh.load_mesh(input_mesh_description);\n this.gizmo = this._ui_mesh.create_gizmo();\n this._torus_mesh = this._viewer.create_ui_mesh();\n this._torus_mesh.load_mesh(torus_mesh_description);\n this._torus = this._torus_mesh.create_instance();\n this._torus.color_factor = GIZMO_COLOR_FACTOR.not_active;\n this._torus.set_parent(this.gizmo);\n if (axis === 'x') {\n this.gizmo.rotation.z = 90 * (Math.PI / 180);\n }\n else if (axis === 'z') {\n this.gizmo.rotation.x = -90 * (Math.PI / 180);\n }\n this.add_event_listeners();\n this._ui_mesh.draw_on_top = true;\n this._torus_mesh.draw_on_top = true;\n }\n dispose() {\n this._torus.dispose();\n this.gizmo.dispose();\n }\n add_event_listeners() {\n this.gizmo.pointer_enter_observable.add(this.on_pointer_over.bind(this));\n this.gizmo.drag_begin_observable.add(this.on_drag_start.bind(this));\n this.gizmo.drag_observable.add(this.on_drag.bind(this));\n this.gizmo.drag_end_observable.add(this.on_drag_end.bind(this));\n this.gizmo.pointer_leave_observable.add(this.on_pointer_leave.bind(this));\n }\n on_pointer_over() {\n if (this._initial_plane_point)\n return;\n this._torus.color_factor = GIZMO_COLOR_FACTOR.active;\n }\n on_pointer_leave() {\n if (this._initial_plane_point)\n return;\n this._torus.color_factor = GIZMO_COLOR_FACTOR.not_active;\n }\n on_drag_start(_, e) {\n this._initial_transform = this.transform_handling.get_world_transform();\n this._initial_plane_point = e.plane_point;\n this._torus.color_factor = GIZMO_COLOR_FACTOR.active;\n }\n on_drag(_, e) {\n if (!this._initial_plane_point || !this._initial_transform)\n return;\n const current_plane_point = e.plane_point;\n const center = this.get_parent().position;\n // Get the axis of rotation\n let rotation_axis;\n if (this.use_global_transorm) {\n switch (this.axis) {\n case 'x':\n rotation_axis = IVector3.Right();\n break;\n case 'y':\n rotation_axis = IVector3.Up();\n break;\n case 'z':\n rotation_axis = IVector3.Forward();\n break;\n }\n }\n else {\n const object_transform = IMatrix4.extractRotationMatrix(this._initial_transform);\n switch (this.axis) {\n case 'x':\n rotation_axis = IMatrix4.transform_vector3(object_transform, IVector3.Right());\n break;\n case 'y':\n rotation_axis = IMatrix4.transform_vector3(object_transform, IVector3.Up());\n break;\n case 'z':\n rotation_axis = IMatrix4.transform_vector3(object_transform, IVector3.Forward());\n break;\n }\n }\n // Project the points on plane\n const start_vector = IVector3.project_on_plane(IVector3.subtract(this._initial_plane_point, center), rotation_axis);\n const current_vector = IVector3.project_on_plane(IVector3.subtract(current_plane_point, center), rotation_axis);\n const angle = IVector3.angle(start_vector, current_vector);\n // Get the sign of the angle\n const cross_product = IVector3.cross(start_vector, current_vector);\n const sign = IVector3.dot(cross_product, rotation_axis) > 0 ? -1 : 1;\n const rotation_angle = angle * sign;\n this.apply_rotation(rotation_angle);\n }\n on_drag_end(_, e) {\n this._initial_plane_point = null;\n this._torus.color_factor = GIZMO_COLOR_FACTOR.not_active;\n }\n get_parent() {\n return this.gizmo['parent'];\n }\n apply_rotation(angle_delta) {\n var _a, _b;\n assert(this._initial_transform, 'Initial transform should be set');\n const world_matrix = this._initial_transform;\n const parent_matrix = (_b = (_a = this.transform_handling).get_parent_world_transform) === null || _b === void 0 ? void 0 : _b.call(_a);\n let rotation_matrix;\n switch (this.axis) {\n case 'x':\n rotation_matrix = IMatrix4.Rotation_X(angle_delta);\n break;\n case 'y':\n rotation_matrix = IMatrix4.Rotation_Y(angle_delta);\n break;\n case 'z':\n rotation_matrix = IMatrix4.Rotation_Z(angle_delta);\n break;\n }\n const new_rotation_matrix = this.use_global_transorm ? IMatrix4.multiply(rotation_matrix, world_matrix) : IMatrix4.multiply(world_matrix, rotation_matrix);\n if (parent_matrix) {\n const inverted_parent_transform = IMatrix4.inverse(parent_matrix);\n const local_rotation_matrix = IMatrix4.multiply(inverted_parent_transform, new_rotation_matrix);\n const new_rotation = get_euler_angles_from_rotation_matrix(local_rotation_matrix);\n this.transform_handling.rotation.set(new_rotation);\n return;\n }\n const new_rotation = get_euler_angles_from_rotation_matrix(new_rotation_matrix);\n this.transform_handling.rotation.set(new_rotation);\n }\n}\n//# sourceMappingURL=RotationTorus.js.map","import { IMatrix4, IVector3 } from '../../../../api.js';\nimport { get_euler_angles_from_rotation_matrix } from '../../../../Math.js';\nimport { RotationTorus } from './RotationTorus.js';\nexport class RotateGizmo {\n constructor(viewer, transform_handling, use_global_transorm) {\n this.transform_handling = transform_handling;\n this.use_global_transorm = use_global_transorm;\n this._viewer = viewer;\n this._ui_mesh = this._viewer.create_ui_mesh();\n this.gizmo = this._ui_mesh.create_gizmo();\n this.toruses = {\n x: this.create_rotation_torus('x'),\n y: this.create_rotation_torus('y'),\n z: this.create_rotation_torus('z')\n };\n }\n create_rotation_torus(axis) {\n const axes = new Set(['x', 'y', 'z']);\n const torus = new RotationTorus(this._viewer, this.transform_handling, this.use_global_transorm, axis);\n torus.gizmo.set_parent(this.gizmo);\n axes.delete(axis);\n torus.gizmo.drag_begin_observable.add(() => {\n axes.forEach(a => this.toruses[a].dispose());\n });\n torus.gizmo.drag_end_observable.add(() => {\n axes.forEach(a => { this.toruses[a] = this.create_rotation_torus(a); });\n });\n return torus;\n }\n update_gizmo_rotation() {\n if (this.use_global_transorm || !this.transform_handling.get_world_transform) {\n this.gizmo.rotation = IVector3.Zero();\n }\n else {\n const world_rotation = IMatrix4.extractRotationMatrix(this.transform_handling.get_world_transform());\n this.gizmo.rotation = get_euler_angles_from_rotation_matrix(world_rotation);\n }\n }\n dispose() {\n this.toruses.x.dispose();\n this.toruses.y.dispose();\n this.toruses.z.dispose();\n this.gizmo.dispose();\n }\n}\n//# sourceMappingURL=RotateGizmo.js.map","import { IMatrix4, IVector3 } from '../../../../api.js';\nimport { GIZMO_AXIS_COLOR, GIZMO_COLOR_FACTOR } from '../GizmoColors.js';\nimport { MeshDescriptions } from '../MeshDescriptions.js';\nexport class ScaleArrow {\n constructor(viewer, transform_handling, use_global_transorm, axis) {\n this.transform_handling = transform_handling;\n this.use_global_transorm = use_global_transorm;\n this.axis = axis;\n this._viewer = viewer;\n const color = GIZMO_AXIS_COLOR[axis];\n const arrow_mesh_description = MeshDescriptions.create_scale_arrow(0.5, // shaft length\n 0.015, // shaft radius\n 0.15, // cube size size\n color, color);\n this._ui_mesh = this._viewer.create_ui_mesh();\n this._ui_mesh.load_mesh(arrow_mesh_description);\n this.gizmo = this._ui_mesh.create_gizmo();\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.not_active;\n if (axis === 'x') {\n this.gizmo.rotation.z = -90 * (Math.PI / 180);\n }\n else if (axis === 'z') {\n this.gizmo.rotation.x = 90 * (Math.PI / 180);\n }\n this.gizmo.position[this.axis] += 0.25 + 0.05;\n this.add_event_listeners();\n this._ui_mesh.draw_on_top = true;\n }\n add_event_listeners() {\n this.gizmo.pointer_enter_observable.add(this.on_pointer_over.bind(this));\n this.gizmo.drag_begin_observable.add(this.on_drag_start.bind(this));\n this.gizmo.drag_observable.add(this.on_drag.bind(this));\n this.gizmo.pointer_leave_observable.add(this.on_pointer_leave.bind(this));\n }\n on_pointer_over() {\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.active;\n }\n on_drag_start() {\n this._initial_transform = this.transform_handling.get_world_transform();\n }\n on_drag(_, event) {\n if (!this._initial_transform)\n return;\n if (!this.use_global_transorm) {\n const scale = this.transform_handling.scale.get();\n scale[this.axis] += event.local_delta[this.axis];\n this.transform_handling.scale.set(scale);\n return;\n }\n const current_scale = this.transform_handling.scale.get();\n const current_transform = this._initial_transform;\n const rotation_matrix = IMatrix4.extractRotationMatrix(current_transform);\n const inverse_rotation_matrix = IMatrix4.inverse(rotation_matrix);\n let scale_matrix;\n switch (this.axis) {\n case 'x':\n scale_matrix = IMatrix4.Scale(1 + event.world_delta.x, 1, 1);\n break;\n case 'y':\n scale_matrix = IMatrix4.Scale(1, 1 + event.world_delta.y, 1);\n break;\n case 'z':\n scale_matrix = IMatrix4.Scale(1, 1, 1 + event.world_delta.z);\n break;\n }\n // Transform the scale matrix to object's local space\n let local_scale_matrix = IMatrix4.multiply(inverse_rotation_matrix, scale_matrix);\n local_scale_matrix = IMatrix4.multiply(local_scale_matrix, rotation_matrix);\n const scale_factors = IMatrix4.getScaleValues(local_scale_matrix);\n const new_scale = new IVector3(current_scale.x * scale_factors.x, current_scale.y * scale_factors.y, current_scale.z * scale_factors.z);\n this.transform_handling.scale.set(new_scale);\n }\n on_pointer_leave() {\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.not_active;\n }\n}\n//# sourceMappingURL=ScaleArrow.js.map","import { IVector2, IVector3 } from '../../../../api.js';\nimport { GIZMO_AXIS_COLOR, GIZMO_COLOR_FACTOR } from '../GizmoColors.js';\nimport { MeshDescriptions } from '../MeshDescriptions.js';\nexport class ScaleCenter {\n constructor(viewer, transform_handling) {\n this.transform_handling = transform_handling;\n this._viewer = viewer;\n const color = GIZMO_AXIS_COLOR.center;\n const box_mesh_description = MeshDescriptions.create_cube(0.20, color);\n this._ui_mesh = this._viewer.create_ui_mesh();\n this._ui_mesh.load_mesh(box_mesh_description);\n this.gizmo = this._ui_mesh.create_gizmo();\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.not_active;\n this.add_event_listeners();\n this._ui_mesh.draw_on_top = true;\n }\n add_event_listeners() {\n this.gizmo.pointer_enter_observable.add(this.on_pointer_over.bind(this));\n this.gizmo.drag_begin_observable.add(this.on_drag_start.bind(this));\n this.gizmo.drag_observable.add(this.on_drag.bind(this));\n this.gizmo.pointer_leave_observable.add(this.on_pointer_leave.bind(this));\n }\n on_pointer_over() {\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.active;\n }\n on_drag_start(_, event) {\n var _a, _b;\n this._initial_point = new IVector2(event.canvas_x, event.canvas_y);\n this._initial_scale = this.transform_handling.scale.get();\n if (this.transform_handling.get_world_transform) {\n const world_matrix = this.transform_handling.get_world_transform();\n this._object_on_canvas = (_a = this._viewer.project_world_position_to_canvas(world_matrix[3].x, world_matrix[3].y, world_matrix[3].z)) !== null && _a !== void 0 ? _a : undefined;\n }\n else {\n const { x, y, z } = this.transform_handling.position.get();\n this._object_on_canvas = (_b = this._viewer.project_world_position_to_canvas(x, y, z)) !== null && _b !== void 0 ? _b : undefined;\n }\n }\n on_drag(_, event) {\n if (!this._initial_point || !this._initial_scale || !this._object_on_canvas)\n return;\n const current_point = new IVector2(event.canvas_x, event.canvas_y);\n const initial_distance = IVector2.distance(this._initial_point, this._object_on_canvas);\n const current_distance = IVector2.distance(current_point, this._object_on_canvas);\n const factor = current_distance / initial_distance;\n const new_scale = IVector3.scale(this._initial_scale, factor);\n this.transform_handling.scale.set(new_scale);\n }\n on_pointer_leave() {\n this.gizmo.color_factor = GIZMO_COLOR_FACTOR.not_active;\n }\n}\n//# sourceMappingURL=ScaleCenter.js.map","import { IMatrix4, IVector3 } from '../../../../api.js';\nimport { get_euler_angles_from_rotation_matrix } from '../../../../Math.js';\nimport { ScaleArrow } from './ScaleArrow.js';\nimport { ScaleCenter } from './ScaleCenter.js';\nexport class ScaleGizmo {\n constructor(viewer, transform_handling, use_global_transorm) {\n this.transform_handling = transform_handling;\n this.use_global_transorm = use_global_transorm;\n this._viewer = viewer;\n this._ui_mesh = this._viewer.create_ui_mesh();\n this.gizmo = this._ui_mesh.create_gizmo();\n this.arrows = {\n x: new ScaleArrow(this._viewer, this.transform_handling, use_global_transorm, 'x'),\n y: new ScaleArrow(this._viewer, this.transform_handling, use_global_transorm, 'y'),\n z: new ScaleArrow(this._viewer, this.transform_handling, use_global_transorm, 'z')\n };\n this.center = new ScaleCenter(this._viewer, this.transform_handling);\n this.arrows.x.gizmo.set_parent(this.gizmo);\n this.arrows.y.gizmo.set_parent(this.gizmo);\n this.arrows.z.gizmo.set_parent(this.gizmo);\n this.center.gizmo.set_parent(this.gizmo);\n }\n update_gizmo_rotation() {\n if (this.use_global_transorm || !this.transform_handling.get_world_transform) {\n this.gizmo.rotation = IVector3.Zero();\n }\n else {\n const world_rotation = IMatrix4.extractRotationMatrix(this.transform_handling.get_world_transform());\n this.gizmo.rotation = get_euler_angles_from_rotation_matrix(world_rotation);\n }\n }\n dispose() {\n this.arrows.x.gizmo.dispose();\n this.arrows.y.gizmo.dispose();\n this.arrows.z.gizmo.dispose();\n this.center.gizmo.dispose();\n this.gizmo.dispose();\n }\n}\n//# sourceMappingURL=ScaleGizmo.js.map","/* eslint-disable @typescript-eslint/naming-convention */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ElementController } from './ElementController.js';\nimport { CustomElement, OnEvent, Attribute } from '../utils/CustomElement.js';\nimport { Observable } from '../../../Observable.js';\nimport { assert } from '../../../babylon/utility/Assert.js';\nexport var TransfomTool;\n(function (TransfomTool) {\n TransfomTool[\"SELECT\"] = \"select\";\n TransfomTool[\"MOVE\"] = \"move\";\n TransfomTool[\"ROTATE\"] = \"rotate\";\n TransfomTool[\"SCALE\"] = \"scale\";\n})(TransfomTool || (TransfomTool = {}));\nexport var TransformationOrientation;\n(function (TransformationOrientation) {\n TransformationOrientation[\"GLOBAL\"] = \"GLOBAL\";\n TransformationOrientation[\"LOCAL\"] = \"LOCAL\";\n})(TransformationOrientation || (TransformationOrientation = {}));\nvar Events;\n(function (Events) {\n Events[\"ACTIVE_CHANGED\"] = \"active_changed\";\n Events[\"ORIENTATION_CHANGED\"] = \"orientation_changed\";\n})(Events || (Events = {}));\nconst DEBUG_TRANSFORM_BAR = 'debug-transform-bar';\nlet DebugTransformBar = class DebugTransformBar extends HTMLElement {\n constructor() {\n super();\n this._available_tools = new Set([TransfomTool.SELECT]);\n this._show_orientation_switch = false;\n this._orientation = TransformationOrientation.GLOBAL;\n this.x = '10';\n this.y = '80';\n this.active = TransfomTool.SELECT;\n this._shadow = this.attachShadow({ mode: 'open' });\n this.render();\n }\n get use_global_transform() {\n return this._orientation === TransformationOrientation.GLOBAL && this._show_orientation_switch;\n }\n set_available_tools(value, show_orientation_switch) {\n this._available_tools = new Set(value);\n this._available_tools.add(TransfomTool.SELECT);\n this._show_orientation_switch = show_orientation_switch;\n if (!this._available_tools.has(this.active)) {\n this.setAttribute('active', TransfomTool.SELECT);\n }\n else {\n this.render();\n }\n }\n attributeChangedCallback(name, old_value, new_value) {\n if (name === 'active' && old_value !== new_value) {\n this.dispatchEvent(new CustomEvent(Events.ACTIVE_CHANGED, { detail: new_value }));\n }\n }\n on_select_click() {\n this.setAttribute('active', TransfomTool.SELECT);\n }\n on_move_click() {\n this.setAttribute('active', TransfomTool.MOVE);\n }\n on_rotate_click() {\n this.setAttribute('active', TransfomTool.ROTATE);\n }\n on_scale_click() {\n this.setAttribute('active', TransfomTool.SCALE);\n }\n on_orientation_change(e) {\n const checkbox = e.target;\n if (checkbox.checked) {\n this._orientation = TransformationOrientation.LOCAL;\n }\n else {\n this._orientation = TransformationOrientation.GLOBAL;\n }\n const text = this._shadow.querySelector('.text');\n assert(text, 'Text element should exist');\n text.innerHTML = this._orientation;\n this.dispatchEvent(new CustomEvent(Events.ORIENTATION_CHANGED, { detail: this._orientation }));\n }\n get_class(tool) {\n let class_string = tool === this.active ? `${tool} active` : tool;\n if (!this._available_tools.has(tool)) {\n class_string += ' disabled';\n }\n return class_string;\n }\n render() {\n this._shadow.innerHTML =\n /* html */\n `\n \n
\n
\n
\n
\n
\n\n
\n \n ${this._orientation}\n
\n
\n `;\n }\n};\n__decorate([\n Attribute\n], DebugTransformBar.prototype, \"x\", void 0);\n__decorate([\n Attribute\n], DebugTransformBar.prototype, \"y\", void 0);\n__decorate([\n Attribute\n], DebugTransformBar.prototype, \"active\", void 0);\n__decorate([\n OnEvent('click', `.${TransfomTool.SELECT}`)\n], DebugTransformBar.prototype, \"on_select_click\", null);\n__decorate([\n OnEvent('click', `.${TransfomTool.MOVE}`)\n], DebugTransformBar.prototype, \"on_move_click\", null);\n__decorate([\n OnEvent('click', `.${TransfomTool.ROTATE}`)\n], DebugTransformBar.prototype, \"on_rotate_click\", null);\n__decorate([\n OnEvent('click', `.${TransfomTool.SCALE}`)\n], DebugTransformBar.prototype, \"on_scale_click\", null);\n__decorate([\n OnEvent('change', 'input')\n], DebugTransformBar.prototype, \"on_orientation_change\", null);\nDebugTransformBar = __decorate([\n CustomElement(DEBUG_TRANSFORM_BAR)\n], DebugTransformBar);\nexport class DebugTransformBarController extends ElementController {\n constructor(parent) {\n super(parent, DEBUG_TRANSFORM_BAR);\n this.observables = {\n on_active_changed: new Observable(),\n on_orientation_changed: new Observable()\n };\n this._element.addEventListener(Events.ACTIVE_CHANGED, (e) => {\n const event = e;\n this.observables.on_active_changed.notify(this, event.detail);\n });\n this._element.addEventListener(Events.ORIENTATION_CHANGED, (e) => {\n const event = e;\n this.observables.on_orientation_changed.notify(this, event.detail);\n });\n }\n set_available_tools(tools, show_orientation_switch) {\n this._element.set_available_tools(tools, show_orientation_switch);\n }\n get active() {\n var _a;\n return (_a = this.get_attribute('active')) !== null && _a !== void 0 ? _a : '';\n }\n set active(value) {\n this.set_attribute('active', value);\n }\n get use_global_transform() {\n return this._element.use_global_transform;\n }\n}\n//# sourceMappingURL=DebugTransformBar.js.map","import { Watcher } from '../utils/Watcher.js';\n/**\n * Handler for persistance instances of a specified `type`.\n * - Accomulates applicable `PersistentDescription`'s.\n * - Watches when instance is created or disposed.\n * - Creates, populates and updates ui tabs that represent these instances.\n */\nexport class PersistentHandler {\n constructor(type, _viewer, _debug_layer, _config, descriptions = []) {\n var _a, _b;\n this.type = type;\n this._viewer = _viewer;\n this._debug_layer = _debug_layer;\n this._config = _config;\n this._instances = new Map();\n this._descriptions = [];\n this.name = (_a = this._config.name) !== null && _a !== void 0 ? _a : type.name;\n this._is_enabled = (_b = this._config.is_enabled) !== null && _b !== void 0 ? _b : true;\n this._descriptions = descriptions.map(description => this.to_applied_description(description));\n Watcher.subscriptions.add({ subscriber: this, watching: type });\n }\n on_object_created(instance) {\n this._instances.set(instance, this.create_tabs(instance));\n }\n on_object_disposed(instance) {\n const tabs = this._instances.get(instance);\n if (tabs) {\n tabs.forEach(tab => {\n tab.remove();\n });\n }\n this._instances.delete(instance);\n this.update_tabs();\n }\n set_enabled(is_enabled) {\n this._is_enabled = is_enabled;\n this.update_tabs();\n }\n is_enabled() {\n return this._is_enabled;\n }\n add_description(description) {\n this._descriptions.push(this.to_applied_description(description));\n this.update_tabs();\n }\n get_applied_descriptions() {\n return this._descriptions;\n }\n update_tabs() {\n this._instances.forEach((tabs, instance) => {\n tabs.forEach(tab => tab.remove());\n tabs.length = 0;\n if (this._is_enabled) {\n tabs.push(...this.create_tabs(instance));\n }\n });\n }\n dispose() {\n this._instances.clear();\n this._descriptions.length = 0;\n Watcher.subscriptions.remove(this);\n }\n get_initiators(instance) {\n const initiators = [];\n this._descriptions.forEach(applied_description => {\n if (!applied_description.is_enabled())\n return;\n const { type, initiate_tabs } = applied_description.description;\n if (initiate_tabs && instance instanceof type) {\n initiators.push(...initiate_tabs);\n }\n });\n return initiators;\n }\n create_tabs(instance) {\n return this._debug_layer.tools.persistent_tabs(instance, this.get_initiators(instance));\n }\n to_applied_description(description) {\n let { is_enabled } = description;\n return {\n description: description,\n is_enabled: () => is_enabled,\n set_enabled: (value) => {\n is_enabled = value;\n this.update_tabs();\n }\n };\n }\n}\n//# sourceMappingURL=PersistentHandler.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { ElementController } from './ElementController.js';\nimport { CustomElement, Attribute, OnEvent } from '../utils/CustomElement.js';\nconst icon_vertical_alignmment = {\n '?': 1,\n '💡': 0,\n '📦': 0,\n '🧩': 0,\n '🌎': 0,\n '⛅': 1,\n '☀': 0,\n '⊡': 2\n};\nconst DEBUG_LABEL = 'debug-label';\nlet DebugLabel = class DebugLabel extends HTMLElement {\n constructor() {\n super();\n this._context_menu = null;\n this.on_click = new Set();\n this.on_right_click = new Set();\n this.icon = '?';\n this.background = 'darkturquoise';\n this.x = '0';\n this.y = '0';\n this.squared = false;\n this._shadow = this.attachShadow({ mode: 'open' });\n this.render();\n }\n show_context_menu(content) {\n this.remove_context_menu();\n this._context_menu = document.createElement('ul');\n this._context_menu.classList.add('context-menu');\n this._context_menu.addEventListener('contextmenu', (e) => {\n e.preventDefault();\n this.remove_context_menu();\n });\n content.forEach(([name, callback]) => {\n var _a;\n const button = document.createElement('li');\n button.classList.add('context-menu-item');\n button.innerText = name;\n button.addEventListener('click', callback);\n (_a = this._context_menu) === null || _a === void 0 ? void 0 : _a.append(button);\n });\n this._shadow.append(this._context_menu);\n }\n remove_context_menu() {\n if (this._context_menu && this._shadow.contains(this._context_menu)) {\n this._shadow.removeChild(this._context_menu);\n this._context_menu = null;\n }\n }\n has_context_menu() {\n return !!this._context_menu;\n }\n on_click_handler() {\n this.on_click.forEach(callback => callback());\n }\n on_context_handler(e) {\n e.preventDefault();\n this.on_right_click.forEach(callback => callback());\n }\n render() {\n const left = Number(this.x) - 20;\n const top = Number(this.y) - 20;\n this._shadow.innerHTML =\n /* html */\n `\n \n
${this.icon}
\n `;\n }\n};\n__decorate([\n Attribute\n], DebugLabel.prototype, \"icon\", void 0);\n__decorate([\n Attribute\n], DebugLabel.prototype, \"background\", void 0);\n__decorate([\n Attribute\n], DebugLabel.prototype, \"x\", void 0);\n__decorate([\n Attribute\n], DebugLabel.prototype, \"y\", void 0);\n__decorate([\n Attribute\n], DebugLabel.prototype, \"squared\", void 0);\n__decorate([\n OnEvent('click', '.icon')\n], DebugLabel.prototype, \"on_click_handler\", null);\n__decorate([\n OnEvent('contextmenu', '.icon')\n], DebugLabel.prototype, \"on_context_handler\", null);\nDebugLabel = __decorate([\n CustomElement(DEBUG_LABEL)\n], DebugLabel);\nexport { DebugLabel };\nexport class DebugLabelController extends ElementController {\n constructor(parent) {\n super(parent, DEBUG_LABEL);\n }\n get on_click() {\n return this._element.on_click;\n }\n get on_right_click() {\n return this._element.on_right_click;\n }\n click() {\n this._element.on_click.forEach(callback => callback());\n }\n show_context_menu(...args) {\n this._element.show_context_menu(...args);\n }\n remove_context_menu() {\n this._element.remove_context_menu();\n }\n has_context_menu() {\n return this._element.has_context_menu();\n }\n set_position(x, y) {\n const left = (x - 20) + 'px';\n const top = (y - 20) + 'px';\n this.style.left = left;\n this.style.top = top;\n }\n set_title(title) {\n this._element.title = title;\n }\n set_icon(icon) {\n this.set_attribute('icon', icon);\n }\n}\n//# sourceMappingURL=DebugLabel.js.map","import { Watcher } from '../utils/Watcher.js';\nimport { DebugLabelController } from '../web-elements/DebugLabel.js';\n/**\n * Handler for selectable instances of a specified `type`.\n * - Accomulates applicable `SelectableDescription`'s.\n * - Watches when instance is created or disposed.\n * - Creates, populates and updates UI `DebugLabel`'s that represent these selectable instances.\n */\nexport class SelectableHandler {\n constructor(type, _viewer, _debug_layer, _config, descriptions = []) {\n var _a, _b;\n this.type = type;\n this._viewer = _viewer;\n this._debug_layer = _debug_layer;\n this._config = _config;\n this._cache = new Map();\n this._instances = new Map();\n this._is_visible = true;\n this.name = (_a = this._config.name) !== null && _a !== void 0 ? _a : type.name;\n this._is_enabled = (_b = this._config.is_enabled) !== null && _b !== void 0 ? _b : true;\n this._descriptions = descriptions.map(description => this.to_applied_description(description));\n Watcher.subscriptions.add({ subscriber: this, watching: type });\n }\n on_object_created(instance) {\n this._instances.set(instance, this.create_element(instance));\n }\n on_object_disposed(instance) {\n const label = this._instances.get(instance);\n if (label) {\n label.hide();\n }\n this._instances.delete(instance);\n this._instances.forEach(controller => controller.remove_context_menu());\n const selected = this._debug_layer.tools.get_selected();\n if (selected && selected.instance === instance) {\n this._debug_layer.tools.deselect();\n }\n }\n show() {\n this._is_visible = true;\n this.update();\n }\n hide() {\n this._is_visible = false;\n this.update();\n }\n set_enabled(is_enabled) {\n this._is_enabled = is_enabled;\n this.update();\n }\n is_enabled() {\n return this._is_enabled;\n }\n add_description(description) {\n this._descriptions.push(this.to_applied_description(description));\n this._cache.clear();\n }\n get_applied_descriptions() {\n return this._descriptions;\n }\n update() {\n var _a;\n for (const [instance, label] of this._instances) {\n const { world_position } = this.get_selectable(instance);\n const { x, y, z } = world_position(instance);\n const canvas_pos = this._viewer.project_world_position_to_canvas(x, y, z);\n if (canvas_pos && this._is_enabled && this._is_visible) {\n const { x, y } = canvas_pos;\n label.set_position(x, y);\n const tools = this._debug_layer.tools;\n if (((_a = tools.get_selected()) === null || _a === void 0 ? void 0 : _a.instance) === instance) {\n this._debug_layer.overlay.draw_circle(x, y, 15, 'green', 1);\n label.hide();\n }\n else {\n label.show();\n }\n }\n else {\n label.hide();\n }\n }\n }\n dispose() {\n this._instances.forEach(label => label.hide());\n this._instances.clear();\n this._cache.clear();\n this._descriptions.length = 0;\n Watcher.subscriptions.remove(this);\n }\n create_selectable() {\n const { icon, tooltip, world_position } = this._config;\n return {\n icon: icon !== null && icon !== void 0 ? icon : '?',\n tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : 'instance',\n world_position: world_position,\n on_select: [],\n on_deselect: [],\n transform: null,\n initiate_tabs: []\n };\n }\n get_selectable(instance) {\n let selectable = this._cache.get(instance);\n if (selectable) {\n return selectable;\n }\n selectable = this.create_selectable();\n this._descriptions.forEach(applied_description => {\n if (!applied_description.is_enabled())\n return;\n const { type } = applied_description.description;\n if (instance instanceof type) {\n const { transform, on_select, on_deselect, initiate_tabs } = applied_description.description;\n if (transform) {\n if (!selectable.transform) {\n selectable.transform = {};\n }\n selectable.transform = Object.assign(Object.assign({}, selectable.transform), transform);\n }\n if (on_select) {\n selectable.on_select.push(on_select);\n }\n if (on_deselect) {\n selectable.on_deselect.push(on_deselect);\n }\n if (initiate_tabs) {\n selectable.initiate_tabs.push(...initiate_tabs);\n }\n }\n });\n this._cache.set(instance, selectable);\n return selectable;\n }\n create_element(instance) {\n const { icon, tooltip } = this.get_selectable(instance);\n const label = new DebugLabelController(this._debug_layer.get_container());\n label.set_icon(typeof icon === 'function' ? icon(instance) : icon);\n label.set_title(typeof tooltip === 'function' ? tooltip(instance) : tooltip);\n label.on_click.add(() => {\n var _a, _b, _c;\n this._instances.forEach(controller => controller.remove_context_menu());\n const { transform, world_position, on_select, on_deselect, initiate_tabs } = this.get_selectable(instance);\n this._debug_layer.tools.set_selected({\n instance: instance,\n transform: transform\n ? {\n position: (_a = transform.position) === null || _a === void 0 ? void 0 : _a.call(transform, instance),\n rotation: (_b = transform.rotation) === null || _b === void 0 ? void 0 : _b.call(transform, instance),\n scale: (_c = transform.scale) === null || _c === void 0 ? void 0 : _c.call(transform, instance),\n get_world_transform: transform.get_world_transform ? () => transform.get_world_transform(instance) : undefined,\n get_parent_world_transform: transform.get_parent_world_transform ? () => transform.get_parent_world_transform(instance) : undefined\n }\n : null,\n world_position: () => world_position(instance),\n on_select: () => on_select.forEach(f => f(instance)),\n on_deselect: () => on_deselect.forEach(f => f(instance)),\n initiate_tabs: initiate_tabs\n });\n });\n label.on_right_click.add(() => {\n if (label.has_context_menu()) {\n label.remove_context_menu();\n }\n else {\n const content = [];\n this._instances.forEach((controller, instance) => {\n controller.remove_context_menu();\n if (label.style.left === controller.style.left && label.style.top === controller.style.top) {\n const { tooltip } = this.get_selectable(instance);\n const title = typeof tooltip === 'function' ? tooltip(instance) : tooltip;\n content.push([title, () => controller.click()]);\n }\n });\n label.show_context_menu(content);\n }\n });\n return label;\n }\n to_applied_description(description) {\n let { is_enabled } = description;\n return {\n description: description,\n is_enabled: () => is_enabled,\n set_enabled: (value) => {\n is_enabled = value;\n this._cache.clear();\n }\n };\n }\n}\n//# sourceMappingURL=SelectableHandler.js.map","import { PersistentHandler } from './description-handlers/PersistentHandler.js';\nimport { SelectableHandler } from './description-handlers/SelectableHandler.js';\n/**\n * Manager to create, populate and update handlers for `Selectable` and `Persistant` instances.\n */\nexport class DescriptionManager {\n constructor(_viewer, _debug_layer) {\n this._viewer = _viewer;\n this._debug_layer = _debug_layer;\n this._descriptions = [];\n this._selectable_handlers = [];\n this._persistent_handlers = [];\n }\n define_selectable(type, config) {\n const descriptions = this._descriptions.filter(description => this.is_applicable(type, description.type));\n const handler = new SelectableHandler(type, this._viewer, this._debug_layer, config, descriptions);\n this._selectable_handlers.push(handler);\n }\n define_persistent(type, config) {\n const descriptions = this._descriptions.filter(description => this.is_applicable(type, description.type));\n const handler = new PersistentHandler(type, this._viewer, this._debug_layer, config, descriptions);\n this._persistent_handlers.push(handler);\n }\n describe(description) {\n this._descriptions.push(description);\n const existing_handlers = this.get_applicable_handlers(description.type);\n existing_handlers.forEach(handler => handler.add_description(description));\n this.update();\n }\n get_selectable_handlers() {\n return this._selectable_handlers;\n }\n get_persistent_handlers() {\n return this._persistent_handlers;\n }\n update() {\n this._selectable_handlers.forEach(handler => handler.update());\n }\n hide_selectables() {\n this._selectable_handlers.forEach(handler => handler.hide());\n }\n show_selectables() {\n this._selectable_handlers.forEach(handler => handler.show());\n }\n dispose() {\n this._selectable_handlers.forEach(handler => handler.dispose());\n this._persistent_handlers.forEach(handler => handler.dispose());\n this._selectable_handlers.length = 0;\n this._persistent_handlers.length = 0;\n }\n get_applicable_handlers(type) {\n return [\n ...this._selectable_handlers.filter(handler => this.is_applicable(type, handler.type)),\n ...this._persistent_handlers.filter(handler => this.is_applicable(type, handler.type))\n ];\n }\n is_applicable(a, b) {\n return a === b || a.prototype === b || a.prototype instanceof b;\n }\n}\n//# sourceMappingURL=DescriptionManager.js.map","/**\n * Generic TypeGuard to verify that keys are defined in a specified object.\n */\nexport function has_required_keys(object, ...keys) {\n return keys.every(key => !!object[key]);\n}\n//# sourceMappingURL=HasRequiredKeys.js.map","import { IVector3 } from '../../api.js';\nimport { assert } from '../../babylon/utility/Assert.js';\nimport { SupportedObservers } from './DebugLayer.js';\nimport { DebugMenuController } from './web-elements/debug-menu/DebugMenu.js';\nimport { MoveGizmo } from './viewer-gizmos/move-gizmo/MoveGizmo.js';\nimport { RotateGizmo } from './viewer-gizmos/rotation-gizmo/RotateGizmo.js';\nimport { ScaleGizmo } from './viewer-gizmos/scale-gizmo/ScaleGizmo.js';\nimport { DebugTransformBarController, TransfomTool } from './web-elements/DebugTransformBar.js';\nimport { DescriptionManager } from './DescriptionManager.js';\nimport { has_required_keys } from '../HasRequiredKeys.js';\n/**\n * Debug UiTools.\n *\n * Contains all UI Elements.\n * - Creates and updates `DebugMenu` and `DebugTransformBar`.\n * - Creates and updates UI Gizmos.\n */\nexport class UiTools {\n constructor(_viewer, _debug_layer) {\n this._viewer = _viewer;\n this._debug_layer = _debug_layer;\n this._active_gizmo = null;\n this._selected = null;\n this._custom_modules = new Map();\n this._config_tab = null;\n this._description_manager = new DescriptionManager(this._viewer, this._debug_layer);\n this._transform_bar = new DebugTransformBarController(_debug_layer.get_container());\n this._transform_bar.observables.on_active_changed.add(() => this.update_gizmo());\n this._transform_bar.observables.on_orientation_changed.add(() => this.update_gizmo());\n this._menu = new DebugMenuController(_debug_layer.get_container());\n }\n show() {\n this._description_manager.show_selectables();\n this._menu.show();\n this._transform_bar.show();\n }\n hide() {\n this.deselect();\n this._description_manager.hide_selectables();\n this._menu.hide();\n this._transform_bar.hide();\n }\n dispose() {\n this._description_manager.dispose();\n this._menu.hide();\n this._transform_bar.hide();\n }\n /**\n * Used by Decorators to define selectable types.\n *\n * @internal\n */\n define_selectable(...args) {\n this._description_manager.define_selectable(...args);\n this.build_config();\n }\n /**\n * Used by Decorators to define persistant types.\n *\n * @internal\n */\n define_persistent(...args) {\n this._description_manager.define_persistent(...args);\n this.build_config();\n }\n add_description(...args) {\n this._description_manager.describe(...args);\n this.build_config();\n }\n /**\n * Gets currently selected instance.\n *\n * @internal\n */\n get_selected() {\n return this._selected;\n }\n /**\n * Sets currently selected instance.\n *\n * Initiates all described tabs for the selected instance and updates Gizmos\n *\n * @internal\n */\n set_selected(selected) {\n var _a, _b, _c, _d;\n (_b = (_a = this._selected) === null || _a === void 0 ? void 0 : _a.on_deselect) === null || _b === void 0 ? void 0 : _b.call(_a);\n this._selected = selected;\n const { transform, on_select, initiate_tabs, instance } = selected;\n const active_tab = this._menu.api.get_active_tab();\n let to_activate_tab = null;\n this._menu.api.selection.clear();\n // Transform tab\n const tools = [];\n if (transform) {\n const transform_tab = this._menu.api.selection.get_tab('Transform');\n transform_tab.build((tab) => {\n if (transform.position) {\n const { get, set } = transform.position;\n tab.custom.watch('vector3', {\n name: 'position',\n get: get,\n set: set\n });\n tools.push(TransfomTool.MOVE);\n }\n if (transform.rotation) {\n const { get, set } = transform.rotation;\n tab.custom.watch('vector3', {\n name: 'rotation',\n get: get,\n set: set\n });\n if (transform.get_world_transform) {\n tools.push(TransfomTool.ROTATE);\n }\n }\n if (transform.scale) {\n const { get, set } = transform.scale;\n tab.custom.watch('vector3', {\n name: 'scale',\n get: get,\n set: set\n });\n if (transform.position && transform.get_world_transform) {\n tools.push(TransfomTool.SCALE);\n }\n }\n });\n if (!to_activate_tab || (active_tab === null || active_tab === void 0 ? void 0 : active_tab.tag) === transform_tab.tag) {\n to_activate_tab = transform_tab;\n }\n }\n const show_orientation_switch = tools.length > 0 && !!((_c = this._selected.transform) === null || _c === void 0 ? void 0 : _c.get_world_transform) && !!((_d = this._selected.transform) === null || _d === void 0 ? void 0 : _d.get_parent_world_transform);\n this._transform_bar.set_available_tools(tools, show_orientation_switch);\n this.update_gizmo();\n // Other tabs\n initiate_tabs.forEach(initiator => {\n var _a;\n const tag = typeof initiator.tag === 'string' ? initiator.tag : initiator.tag(instance);\n const tab = this._menu.api.selection.get_tab(tag);\n if (initiator.custom_name) {\n tab.name = typeof initiator.custom_name === 'function'\n ? initiator.custom_name(instance)\n : initiator.custom_name;\n }\n tab.build((tab) => initiator.setup(tab, instance), (_a = initiator.dependencies) === null || _a === void 0 ? void 0 : _a.call(initiator, instance));\n if (!to_activate_tab || (active_tab === null || active_tab === void 0 ? void 0 : active_tab.tag) === tab.tag) {\n to_activate_tab = tab;\n }\n });\n if (to_activate_tab) {\n to_activate_tab.set_active();\n }\n on_select();\n this.update();\n }\n /**\n * Deselects current selection.\n *\n * Removes all selection tabs and Gizmos.\n */\n deselect() {\n var _a, _b;\n (_b = (_a = this._selected) === null || _a === void 0 ? void 0 : _a.on_deselect) === null || _b === void 0 ? void 0 : _b.call(_a);\n this._selected = null;\n this._transform_bar.set_available_tools([], false);\n this.update_gizmo();\n this._menu.api.set_active_tab(null);\n this._menu.api.selection.clear();\n }\n /**\n * Creates tabs for a persistent instance.\n *\n * @internal\n */\n persistent_tabs(instance, initiate_tabs) {\n const tabs = new Set();\n initiate_tabs.forEach(initiator => {\n var _a;\n const tag = typeof initiator.tag === 'string' ? initiator.tag : initiator.tag(instance);\n const tab = this._menu.api.persistent.get_tab(tag);\n if (initiator.custom_name) {\n tab.name = typeof initiator.custom_name === 'function'\n ? initiator.custom_name(instance)\n : initiator.custom_name;\n }\n tab.build((tab) => initiator.setup(tab, instance), (_a = initiator.dependencies) === null || _a === void 0 ? void 0 : _a.call(initiator, instance));\n tabs.add(tab);\n });\n return [...tabs];\n }\n /**\n * Creates a custom fully costumizeble tabs and defines them as a module in the config tab.\n */\n custom_module(tag, initiate_tabs, is_enabled = true) {\n assert(!this._custom_modules.has(tag), `Custom module with tag ${tag} already exists`);\n this._custom_modules.set(tag, { initiators: initiate_tabs, tabs: [], is_enabled: is_enabled });\n this.build_custom_modules();\n this.build_config();\n }\n update() {\n this.update_gizmo_position();\n this._description_manager.update();\n this._menu.api.update();\n }\n build_config() {\n if (this._config_tab) {\n this._config_tab.remove();\n }\n const tab = this._menu.api.config.get_tab('Config');\n const selectables = this._description_manager.get_selectable_handlers();\n const persistents = this._description_manager.get_persistent_handlers();\n tab.build((controller) => {\n controller.label('⚒ General');\n controller.custom.watch('checkbox', {\n name: 'render_on_demand',\n get: () => this._viewer.only_render_on_demand,\n set: (value) => { this._viewer.only_render_on_demand = value; }\n });\n let selected_observer = SupportedObservers.before_render;\n controller.custom.select('update watchers', Object.values(SupportedObservers), {\n get: () => selected_observer,\n set: (value) => {\n selected_observer = value;\n this._debug_layer.set_observer(value);\n }\n });\n if (selectables.length) {\n controller.label('⚙ Selectables');\n selectables.forEach(handler => {\n const container = controller.container(handler.name, { is_collapsed: true });\n container.custom.watch('checkbox', {\n name: 'enabled',\n get: () => handler.is_enabled(),\n set: (value) => handler.set_enabled(value)\n });\n const descriptions = handler.get_applied_descriptions();\n const decriptions_container = container.container('descriptions', { is_collapsed: true });\n descriptions.forEach(description => {\n decriptions_container.custom.watch('checkbox', {\n name: description.description.name,\n get: () => description.is_enabled(),\n set: (value) => description.set_enabled(value)\n });\n });\n });\n }\n if (persistents.length) {\n controller.label('⚛ Persistents');\n persistents.forEach(handler => {\n const container = controller.container(handler.name, { is_collapsed: true });\n container.custom.watch('checkbox', {\n name: 'enabled',\n get: () => handler.is_enabled(),\n set: (value) => handler.set_enabled(value)\n });\n const descriptions = handler.get_applied_descriptions();\n const decriptions_container = container.container('descriptions', { is_collapsed: true });\n descriptions.forEach(description => {\n decriptions_container.custom.watch('checkbox', {\n name: description.description.name,\n get: () => description.is_enabled(),\n set: (value) => description.set_enabled(value)\n });\n });\n });\n }\n if (this._custom_modules.size) {\n controller.label('Custom Modules');\n this._custom_modules.forEach((module, tag) => {\n controller.custom.watch('checkbox', {\n name: tag,\n get: () => module.is_enabled,\n set: (value) => {\n if (value !== module.is_enabled) {\n module.is_enabled = value;\n this.build_custom_modules();\n }\n }\n });\n });\n }\n });\n this._config_tab = tab;\n }\n build_custom_modules() {\n this._custom_modules.forEach((module, tag) => {\n module.tabs.forEach(tab => tab.remove());\n module.tabs.length = 0;\n if (module.is_enabled) {\n module.tabs.push(...module.initiators.map(initiator => {\n var _a;\n const tag = typeof initiator.tag === 'string' ? initiator.tag : initiator.tag();\n const tab = this._menu.api.persistent.get_tab(tag);\n tab.build((tab) => initiator.setup(tab), (_a = initiator.dependencies) === null || _a === void 0 ? void 0 : _a.call(initiator));\n return tab;\n }));\n }\n });\n }\n update_gizmo() {\n var _a;\n (_a = this._active_gizmo) === null || _a === void 0 ? void 0 : _a.dispose();\n this._active_gizmo = null;\n if (this._selected) {\n if (this._transform_bar.active === TransfomTool.MOVE) {\n this.create_transform_gizmo(this._selected);\n }\n if (this._transform_bar.active === TransfomTool.ROTATE) {\n this.create_rotation_gizmo(this._selected);\n }\n if (this._transform_bar.active === TransfomTool.SCALE) {\n this.create_scale_gizmo(this._selected);\n }\n this.update_gizmo_position();\n }\n }\n update_gizmo_position() {\n if (this._active_gizmo) {\n if (this._selected) {\n this._active_gizmo.gizmo.position = this._selected.world_position();\n }\n this._active_gizmo.update_gizmo_rotation();\n this.update_gizmo_scale(this._active_gizmo.gizmo);\n }\n }\n create_transform_gizmo(selected) {\n assert(selected.transform && has_required_keys(selected.transform, 'position'), 'Move gizmo expected to have position handling');\n this._active_gizmo = new MoveGizmo(this._viewer, selected.transform, this._transform_bar.use_global_transform);\n }\n create_rotation_gizmo(selected) {\n assert(selected.transform && has_required_keys(selected.transform, 'rotation', 'get_world_transform'), 'Rotate gizmo expected to have rotation and world transform handling');\n this._active_gizmo = new RotateGizmo(this._viewer, selected.transform, this._transform_bar.use_global_transform);\n }\n create_scale_gizmo(selected) {\n assert(selected.transform && has_required_keys(selected.transform, 'position', 'scale', 'get_world_transform'), 'Scale gizmo expected to have position, scale and world transform handling');\n this._active_gizmo = new ScaleGizmo(this._viewer, selected.transform, this._transform_bar.use_global_transform);\n }\n update_gizmo_scale(gizmo) {\n const camera_position = this._viewer.get_camera_manager().engine_camera.position;\n const distance = IVector3.distance(camera_position, gizmo.position);\n const desired_size = 0.1;\n const scale = desired_size * distance;\n gizmo.scale = new IVector3(scale);\n }\n}\n//# sourceMappingURL=UiTools.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { assert } from '../../babylon/utility/Assert.js';\nimport { Bound } from '../Bound.js';\nimport { Overlay } from './Overlay.js';\nimport { UiTools } from './UiTools.js';\nimport { PERSISTENT_DEFINITIONS, SELECTABLE_DEFINITIONS, DESCRIPTIONS } from './utils/DebugDecorators.js';\nimport { Watcher } from './utils/Watcher.js';\nexport var SupportedObservers;\n(function (SupportedObservers) {\n SupportedObservers[\"before_render\"] = \"before_render\";\n SupportedObservers[\"after_render\"] = \"after_render\";\n SupportedObservers[\"on_update\"] = \"on_update\";\n})(SupportedObservers || (SupportedObservers = {}));\n/**\n * Debug Layer.\n * Main container for debug tools.\n */\nexport class DebugLayer {\n constructor(_viewer, _render_canvas) {\n this._viewer = _viewer;\n this._render_canvas = _render_canvas;\n this._container = document.createElement('div');\n this._is_enabled = false;\n this._container.style.position = 'absolute';\n this._container.style.pointerEvents = 'none';\n this._render_canvas_parent = this.get_render_canvas_parent();\n this._resize_observer = new ResizeObserver(this.resize);\n this.overlay = new Overlay(this);\n this.tools = new UiTools(_viewer, this);\n this._update_observer = this._viewer.get_before_render_observable().add(this.update);\n SELECTABLE_DEFINITIONS.forEach(definition => this.tools.define_selectable(definition.type, definition.config));\n PERSISTENT_DEFINITIONS.forEach(definition => this.tools.define_persistent(definition.type, definition.config));\n DESCRIPTIONS.forEach(description => this.tools.add_description(description));\n }\n /**\n * Sets the observer type that is used to update layer components.\n */\n set_observer(type) {\n this._update_observer.dispose();\n switch (type) {\n case SupportedObservers.on_update:\n this._update_observer = this._viewer.get_update_observable().add(this.update);\n break;\n case SupportedObservers.after_render:\n this._update_observer = this._viewer.get_after_render_observable().add(this.update);\n break;\n case SupportedObservers.before_render:\n this._update_observer = this._viewer.get_before_render_observable().add(this.update);\n break;\n }\n }\n /**\n * Adds the layer to DOM and enables it.\n */\n show() {\n if (!this._container.parentElement) {\n this._render_canvas_parent.appendChild(this._container);\n this._resize_observer.observe(this._render_canvas);\n this._resize_observer.observe(this._render_canvas_parent);\n this.overlay.show();\n this.tools.show();\n this._is_enabled = true;\n }\n this.update();\n }\n /**\n * Remove the layer from DOM and disables it.\n */\n hide() {\n if (this._container.parentElement) {\n this._render_canvas_parent.removeChild(this._container);\n this._resize_observer.unobserve(this._render_canvas);\n this._resize_observer.unobserve(this._render_canvas_parent);\n this.overlay.hide();\n this.tools.hide();\n this._is_enabled = false;\n }\n }\n /**\n * Check if layer is enabled and attached to DOM.\n */\n is_enabled() {\n return this._is_enabled;\n }\n /**\n * Dispose the layer.\n */\n dispose() {\n this.hide();\n this._update_observer.dispose();\n this._resize_observer.disconnect();\n this.overlay.dispose();\n this.tools.dispose();\n Watcher.clear();\n }\n /**\n * @internal\n */\n update() {\n if (!this._is_enabled)\n return;\n this.overlay.update();\n this.tools.update();\n }\n /**\n * @internal\n */\n get_container() {\n return this._container;\n }\n get_render_canvas_parent() {\n const parent = this._render_canvas.parentElement;\n assert(parent, 'Render Canvas should have a parent');\n return parent;\n }\n resize() {\n this._container.style.width = this._render_canvas.width + 'px';\n this._container.style.height = this._render_canvas.height + 'px';\n this._container.style.left = this._render_canvas.offsetLeft + 'px';\n this._container.style.top = this._render_canvas.offsetTop + 'px';\n this.overlay.resize_overlay(this._render_canvas);\n }\n}\n__decorate([\n Bound\n], DebugLayer.prototype, \"update\", null);\n__decorate([\n Bound\n], DebugLayer.prototype, \"resize\", null);\n//# sourceMappingURL=DebugLayer.js.map","export function log_instance(target) {\n window['selected_instance'] = target;\n console.info('[DEBUG]: selected instance can be accessed by `window.selected_instance`', target);\n}\n//# sourceMappingURL=LogInstance.js.map","import { Light } from '../../../babylon/light-manager/light-system/lights/Light.js';\nimport { LightType } from '../../../api.js';\nimport { log_instance } from '../utils/LogInstance.js';\nexport const LIGHT_DESCRIPTION = {\n type: Light,\n name: 'default-light-description',\n is_enabled: true,\n on_select: (light) => {\n if (!light.debug_geomentry)\n light.create_debug_geometry();\n },\n on_deselect: (light) => {\n if (light.debug_geomentry)\n light.remove_debug_geometry();\n },\n transform: {\n position: (light) => ({\n get: () => light.position,\n set: (val) => { light.position = val; }\n })\n },\n initiate_tabs: [\n {\n tag: 'Light',\n custom_name: (light) => light.type,\n setup: (tab, light) => {\n tab.watch(light, 'id', { is_readonly: true });\n tab.watch(light, 'type', { is_readonly: true });\n tab.custom.watch('number', {\n name: 'parent',\n get: () => light.parent,\n is_nullable: true\n });\n // We need to use custom since type checking of TrackedVec3 statisfy both IColor and IVector3\n tab.custom.watch('color', {\n name: 'color',\n get: () => light.color,\n set: (v) => { light.color = v; }\n });\n tab.watch(light, 'intensity');\n // Spot Light\n if (is_spot_light(light)) {\n tab.watch(light, 'inner_angle_degrees');\n tab.watch(light, 'outer_angle_degrees');\n }\n // Directed Shadow Point Light\n if (is_directed_shadow_light(light)) {\n tab.watch(light, 'shadow_angle_degrees');\n }\n // Line Light\n if (is_line_light(light)) {\n tab.watch(light, 'width');\n tab.watch(light, 'angle_direction_degrees');\n tab.watch(light, 'angle_range_degrees');\n tab.watch(light, 'hard_side_cutoff');\n if (light.clip_plane) {\n const container = tab.container('clip plane');\n container.watch(light.clip_plane, 'normal');\n container.watch(light.clip_plane, 'position');\n }\n }\n tab.button('Dispose', {\n on_click: () => light.dispose()\n });\n tab.button('Log', {\n on_click: () => log_instance(light)\n });\n },\n dependencies: (light) => {\n const dependencies = [];\n if (is_line_light(light)) {\n dependencies.push(() => light.clip_plane);\n }\n return dependencies;\n }\n },\n {\n tag: 'Transform',\n setup: (tab, light) => {\n // Spot Light\n if (is_spot_light(light)) {\n tab.watch(light, 'direction');\n }\n // Directional Light\n if (is_directional_light(light)) {\n tab.watch(light, 'target');\n }\n // Directed Shadow Point Light\n if (is_directed_shadow_light(light)) {\n tab.watch(light, 'direction');\n }\n }\n },\n {\n tag: 'Physical',\n setup: (tab, light) => {\n tab.setter(light, 'set_color_temperature', 4000);\n // Point Light or Spot Light\n if (is_point_light(light) || is_spot_light(light)) {\n tab.setter(light, 'set_intensity_lumen', 0);\n tab.setter(light, 'set_intensity_candela', 0);\n }\n // Directional Light\n if (is_directional_light(light)) {\n tab.setter(light, 'set_intensity_lux', 0);\n }\n // Line Light\n if (is_line_light(light)) {\n tab.setter(light, 'set_intensity_lumen', 0);\n tab.setter(light, 'set_intensity_candela', 0);\n tab.setter(light, 'set_intensity_lumen_per_meter', 0);\n }\n }\n },\n {\n tag: 'Shadow',\n setup: (tab, light) => {\n tab.custom.watch('checkbox', {\n name: 'Has Shadows',\n get: () => !!light.shadow\n });\n if (light.shadow) {\n const shadow = light.shadow;\n tab.watch(shadow, 'enable_shadows');\n tab.watch(shadow, 'shadow_near');\n tab.watch(shadow, 'shadow_far');\n tab.watch(shadow, 'shadow_resolution');\n tab.button('Log', {\n on_click: () => log_instance(shadow)\n });\n }\n }\n }\n ]\n};\nfunction is_point_light(light) {\n return light.type === LightType.POINT_LIGHT;\n}\nfunction is_directional_light(light) {\n return light.type === LightType.DIRECTIONAL_LIGHT;\n}\nfunction is_spot_light(light) {\n return light.type === LightType.SPOT_LIGHT;\n}\nfunction is_line_light(light) {\n return light.type === LightType.LINE_LIGHT;\n}\nfunction is_directed_shadow_light(light) {\n return light.type === LightType.DIRECTED_SHADOW_POINT_LIGHT;\n}\n//# sourceMappingURL=LightDescription.js.map","import { ViewerMaterialWrapper } from './ViewerMaterialWrapper.js';\nexport class MaterialCollection {\n constructor(materials) {\n this._materials = new Map();\n materials.forEach((material) => {\n this._materials.set(material.viewer_id, material);\n });\n }\n /**\n * Returns a map of all of the Viewer Materials in the material collection\n */\n get materials() {\n const viewer_materials = new Map();\n this._materials.forEach((value, key) => {\n if (value instanceof ViewerMaterialWrapper) {\n viewer_materials.set(key, value);\n }\n });\n return viewer_materials;\n }\n get is_empty() {\n return this._materials.size === 0;\n }\n clone(name_remapper = (s) => s) {\n return new MaterialCollection([...this._materials.values()].map((material) => material.clone(name_remapper)));\n }\n}\n//# sourceMappingURL=MaterialCollection.js.map","/**\n * This class is meant to represent any custom (non-ViewerMaterialWrapper) material that can be applied to a SceneObject\n */\nexport class CustomMaterialWrapper {\n constructor(material) {\n this.material = material;\n }\n}\n//# sourceMappingURL=CustomMaterialWrapper.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Matrix as BABYLON_Matrix, Vector3 as BABYLON_Vector3, Vector4 as BABYLON_Vector4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { AbstractMesh as BABYLON_AbstractMesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/abstractMesh.js';\nimport { TransformNode as BABYLON_TransformNode } from '@inter-ikea-betrakta-babylonjs/core/Meshes/transformNode.js';\nimport { IColor, IVector3 } from '../api.js';\nimport { ViewerMaterial } from './material/ViewerMaterial.js';\nimport { MaterialCollection } from './material/MaterialCollection.js';\nimport { ViewerMaterialWrapper } from './material/ViewerMaterialWrapper.js';\nimport { Color4 as BABYLON_Color4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js';\nimport { Observable } from '../Observable.js';\nimport { VertexBuffer as BABYLON_VertexBuffer } from '@inter-ikea-betrakta-babylonjs/core/Buffers/buffer.js';\nimport { mark_mesh_dirty_for_lightsystem } from './MeshManager.js';\nimport { RENDER_LAYER_SHADOW, RENDER_LAYER_FORWARD, RenderLayerMask } from './RenderLayer.js';\nimport { assert } from './utility/Assert.js';\nimport { is_aabb, is_sphere, aabb_center, aabb_size, clone_bounds } from './utility/Bounds.js';\nimport { Debug } from '../utils/DebugLayer/utils/DebugDecorators.js';\nimport { CustomMaterialWrapper } from './material/CustomMaterialWrapper.js';\nlet SceneObject = class SceneObject {\n get mesh_nodes() {\n if (this._asset_instance === null) {\n return [];\n }\n else {\n return this._asset_instance.asset_root.getChildMeshes(false);\n }\n }\n get has_bounds() {\n return this._has_bounds;\n }\n get root_node() {\n return this._root_node;\n }\n get id() {\n return this._object_id;\n }\n get parent_id() {\n const parent = this._parent_object;\n if (parent === null)\n return null;\n return parent.id;\n }\n // This should be handled by a more flexible logging system in the long run\n // but for now we just check this since it is something that several users\n // had issues with.\n verbose_input_warning() {\n if (this.viewer.get_config().verbose_warnings &&\n this.is_empty &&\n (this._interaction_bounds === null || this._interaction_bounds.length === 0)) {\n console.warn('Input handlers for empty object without extra bounds will never trigger');\n }\n }\n get drag_begin_observable() {\n assert(this._input_handler.execution_object === this, 'SceneObject: Invalid execution object in input handler');\n this.verbose_input_warning();\n return this._input_handler.drag_begin_observable;\n }\n get drag_observable() {\n assert(this._input_handler.execution_object === this, 'SceneObject: Invalid execution object in input handler');\n this.verbose_input_warning();\n return this._input_handler.drag_observable;\n }\n get drag_end_observable() {\n assert(this._input_handler.execution_object === this, 'SceneObject: Invalid execution object in input handler');\n this.verbose_input_warning();\n return this._input_handler.drag_end_observable;\n }\n get pointer_enter_observable() {\n assert(this._input_handler.execution_object === this, 'SceneObject: Invalid execution object in input handler');\n this.verbose_input_warning();\n return this._input_handler.pointer_enter_observable;\n }\n get pointer_leave_observable() {\n assert(this._input_handler.execution_object === this, 'SceneObject: Invalid execution object in input handler');\n this.verbose_input_warning();\n return this._input_handler.pointer_leave_observable;\n }\n get is_loaded() {\n return this._is_loaded;\n }\n get click_observable() {\n assert(this._input_handler.execution_object === this, 'SceneObject: Invalid execution object in input handler');\n this.verbose_input_warning();\n return this._input_handler.click_observable;\n }\n get secondary_click_observable() {\n assert(this._input_handler.execution_object === this, 'SceneObject: Invalid execution object in input handler');\n this.verbose_input_warning();\n return this._input_handler.secondary_click_observable;\n }\n get changed_observable() {\n return this._changed_observable;\n }\n get disposed_observable() {\n return this._disposed_observable;\n }\n get child_added_observable() {\n return this._child_added_observable;\n }\n get child_removed_observable() {\n return this._child_removed_observable;\n }\n get show_interaction_bounds() {\n return this._show_interaction_bounds;\n }\n set show_interaction_bounds(value) {\n this._show_interaction_bounds = value;\n if (value && this._interaction_bounds_tint === null) {\n // w is for roughness but we run unlit so we just set it to something\n this._interaction_bounds_tint = { x: Math.random(), y: Math.random(), z: Math.random() };\n }\n this.update_raycast_bounds_visualization();\n }\n constructor(_asset_instance, id, viewer, viewer_scene, is_empty) {\n this.viewer = viewer;\n this.viewer_scene = viewer_scene;\n this.is_empty = is_empty;\n /**\n * @deprecated\n * This will be replaced with new material system\n */\n this.material = null; // This material might not be ready/used yet\n this._override_material = null;\n this._visible = true;\n this._mesh_url = null;\n this._base_color = new BABYLON_Vector4(1, 1, 1, 1);\n this._outline = false;\n this._outline_block = false;\n this._outline_color = null;\n this._outline_width = null;\n this._children_objects = null;\n this._parent_object = null;\n this._receive_shadow = true;\n // Crappy solution for cases where we create custom babylon meshes (MeshManager.create_custom_mesh), and need to be able to replace them (reuse_object)\n // Tabletop solution depends on this.\n this.babylon_custom_mesh_root = null;\n // Bounding volumes in local space (do NOT update with world matrix), that doesn't include child-objects.\n // Will be null when we can't cache the bounds, in case we have a skeletal mesh\n this._local_bounding_info = null;\n this._local_bounding_info_calculation_promise = null;\n // To note if our meshes (not including child objects) contain skeletal animations\n this._has_skeletal_animation = false;\n // Number.MAX_VALUE is the default for alpha_index in BabylonJS https://doc.babylonjs.com/divingDeeper/materials/advanced/transparent_rendering#alpha-index\n // We have chosen to change this to 10000 instead to make it easier to move objects both forward and backwards in the queue\n this._alpha_index = 10000;\n this._on_drag_enable = true;\n this._on_click_enable = true;\n this.ready = Promise.resolve();\n this._interaction_bounds = null;\n this._is_loaded = false;\n this._changed_observable = new Observable();\n this._disposed_observable = new Observable();\n this._child_added_observable = new Observable();\n this._child_removed_observable = new Observable();\n this._asset_instance_animations = [];\n // TODO: Remove with new asset manager\n this._has_bounds = false;\n this._interaction_bounds_tint = null;\n this._show_interaction_bounds = false;\n this.bounds_meshes = [];\n this._root_node = new BABYLON_TransformNode('', viewer.scene); // Need to provide scene, after exporting a gltf the default scene reference is null. The planner camera should always be in the main scene.\n this._changed_observable.add(() => {\n this.viewer_scene.object_changed_observable.notify(this.viewer_scene, this);\n });\n this._asset_instance = _asset_instance;\n if (this._asset_instance !== null) {\n this._asset_instance.set_parent(this._root_node);\n this._asset_instance.meshes_updated_observable.add(() => {\n this.on_mesh_update();\n });\n }\n this._object_id = id;\n this._render_layer_mask = new RenderLayerMask([RENDER_LAYER_FORWARD]);\n this._input_handler = viewer.create_input_handler(this, [this]);\n if (this._asset_instance) {\n const loaded_promise = this._asset_instance.asset.get_loaded_promise();\n loaded_promise.then(() => {\n this._is_loaded = true;\n this.on_mesh_update();\n }, () => {\n // Do nothing? But we need the catch otherwise we get errors in the console when failing to load.\n });\n }\n }\n on_mesh_update() {\n var _a, _b, _c;\n // Update mesh properties\n this.mesh_iterator(false, mesh => {\n mesh.overlayAlpha = 0.5;\n mesh.isPickable = false;\n mesh.isVisible = this._visible;\n mesh.alphaIndex = this._alpha_index;\n if (mesh.skeleton !== null) {\n this._has_skeletal_animation = true;\n }\n });\n this._update_meshes_render_mask();\n this.update_albedo_roughness_factor_internal();\n this.apply_outline_state();\n // TODO: Investigate how to get rid of this and put it in the asset system.\n this.mark_world_matrices_to_be_recomputed();\n this.recalculate_local_bounds();\n this._has_bounds = true;\n this.viewer.mark_world_bounds_dirty();\n (_a = this._asset_instance) === null || _a === void 0 ? void 0 : _a.instance_iterator((instance) => {\n instance.rendering_material_changed_observable.add(() => {\n this._changed_observable.notify(this, this);\n });\n });\n // Delete old animations coming from our asset\n if (this._asset_instance_animations.length > 0) {\n this.viewer.animation_system.delete_animations(this.id, this._asset_instance_animations);\n this._asset_instance_animations.length = 0;\n }\n // Load new animations from our asset\n (_c = (_b = this._asset_instance) === null || _b === void 0 ? void 0 : _b.animation_groups) === null || _c === void 0 ? void 0 : _c.forEach(animation => {\n this._asset_instance_animations.push(this.viewer.animation_system.register_animation(this.id, animation));\n });\n this._changed_observable.notify(this, this);\n }\n add_render_layer(layer) {\n this.set_render_layer_mask(RenderLayerMask.add_layer(this._render_layer_mask, layer));\n }\n remove_render_layer(layer) {\n this.set_render_layer_mask(RenderLayerMask.remove_layer(this._render_layer_mask, layer));\n }\n get_render_layer_mask() {\n return this._render_layer_mask;\n }\n set_render_layer_mask(mask) {\n const update_meshes = mask.bitmap !== this._render_layer_mask.bitmap;\n const new_mask_has_shadow_caster = RenderLayerMask.has_layer(mask, RENDER_LAYER_SHADOW);\n const old_mask_has_shadow_caster = RenderLayerMask.has_layer(this._render_layer_mask, RENDER_LAYER_SHADOW);\n this._render_layer_mask = RenderLayerMask.clone(mask);\n if (new_mask_has_shadow_caster !== old_mask_has_shadow_caster) {\n // We have to update shadow state\n this.viewer.light_system.set_cast_shadow(this, new_mask_has_shadow_caster);\n this.viewer.freezing_manager.set_all_materials_dirty();\n this.viewer.mark_scene_dirty();\n }\n if (update_meshes) {\n this._update_meshes_render_mask();\n }\n }\n has_render_layer(layer) {\n return RenderLayerMask.has_layer(this._render_layer_mask, layer);\n }\n _update_meshes_render_mask() {\n this.mesh_iterator(false, (mesh) => {\n mesh.layerMask = this._render_layer_mask.bitmap;\n });\n }\n /**\n * @deprecated Old material system\n */\n set_material(id) {\n return __awaiter(this, void 0, void 0, function* () {\n this.material = id;\n if (this._asset_instance === null)\n return;\n if (id === null) {\n this._asset_instance.set_override_material(null);\n }\n else {\n const material = this.viewer.asset_manager.materials.get(id);\n if (material.material !== null) {\n this._asset_instance.set_override_material(material.material);\n }\n else {\n yield material.ready;\n if (this.material === id) {\n // Only apply the material after awaiting if no one else as set a different material in the meantime\n this._asset_instance.set_override_material(material.material);\n }\n }\n }\n });\n }\n /**\n * @deprecated Old material system\n */\n get_material() {\n return this.material;\n }\n /**\n * New material system\n * Assignes an override material to all meshes of this scene object\n * @param material override material\n */\n set_override_material(material) {\n var _a, _b, _c;\n if (!this.viewer.get_optional_features().feature_gate_material_objects)\n throw Error('material objects feature gate is not enabled');\n if (material !== null && !(material instanceof ViewerMaterialWrapper || material instanceof CustomMaterialWrapper))\n throw Error('override material is of wrong backing type');\n this._override_material = material;\n (_a = this._asset_instance) === null || _a === void 0 ? void 0 : _a.set_override_material((_c = (_b = this._override_material) === null || _b === void 0 ? void 0 : _b.material) !== null && _c !== void 0 ? _c : null);\n }\n /**\n * This endpoint always returns the currently assigned materials to this model.\n * For models loaded from glTF this can be the material that is also applied to all future loaded versions of this model\n * This can be checked using the {@link IMaterial.is_applied_by_model_loader} on IMaterial\n * @returns A collection of all materials currently assigned to this model\n */\n get_shared_materials() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.viewer.get_optional_features().feature_gate_material_objects) {\n throw new Error('material objects feature gate is not enabled');\n }\n if (this._asset_instance === null)\n return new MaterialCollection([]);\n yield this._asset_instance.asset.get_loaded_promise();\n const materials = this.get_all_materials();\n if (materials.size === 0) {\n throw Error('could not find any materials');\n }\n else {\n return new MaterialCollection(materials);\n }\n });\n }\n /**\n * This endpoint always returns a collection of materials where this model is guaranteed to be the only user of each material when the promise resolves\n * @returns A collection of all materials assigned to this model, each material is only assigned to this model\n */\n get_unique_materials() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.viewer.get_optional_features().feature_gate_material_objects) {\n throw new Error('material objects feature gate is not enabled');\n }\n if (this._asset_instance === null)\n return new MaterialCollection([]);\n yield this._asset_instance.asset.get_loaded_promise();\n const materials = this.get_all_materials();\n if (materials.size === 0) {\n throw Error('could not find any materials');\n }\n else {\n // TODO: Here we only want to copy materials if they aren't unique?\n const new_materials = new Set();\n materials.forEach((material) => {\n const material_copy = material.clone();\n new_materials.add(material_copy);\n this.replace_material(material, material_copy);\n });\n return new MaterialCollection(new_materials);\n }\n });\n }\n get_all_materials() {\n const materials = new Set();\n if (this._asset_instance === null)\n return materials;\n this._asset_instance.instance_iterator((instance) => {\n const material = instance.get_active_material();\n // Objects with our default material assigned are considered to not have materials\n if (material === this.viewer.asset_manager.default_material)\n return;\n if (material === null) {\n console.error(`Mesh: ${instance.babylon_instance.name} has a null material`);\n throw Error('null material on one or more meshes');\n }\n else if (!(material instanceof ViewerMaterial)) {\n console.error(`Mesh: ${instance.babylon_instance.name} has a none viewer material`);\n throw Error('bad material type on one or more meshes');\n }\n materials.add(this.viewer.asset_manager.get_or_create_material_wrapper(material));\n });\n return materials;\n }\n // Note that you need to make sure that the object has finished loading before using this function for it to work\n // This function will just fail if the object has no mesh\n replace_material(current_material, new_material) {\n if (!this.viewer.get_optional_features().feature_gate_material_objects) {\n throw new Error('material objects feature gate is not enabled');\n }\n if (!(current_material instanceof ViewerMaterialWrapper) && !(current_material instanceof CustomMaterialWrapper)) {\n throw new Error('current_material backing object is of the wrong class');\n }\n if (!(new_material instanceof ViewerMaterialWrapper) && !(new_material instanceof CustomMaterialWrapper)) {\n throw new Error('current_material backing object is of the wrong class');\n }\n if (this._asset_instance === null)\n return false;\n let replaced_material = false;\n this._asset_instance.instance_iterator((instance) => {\n const custom_material = instance.get_active_material();\n // Check if we want to swap the material for this mesh\n if (custom_material === current_material.material) {\n instance.set_custom_material(new_material.material);\n replaced_material = true;\n }\n });\n return replaced_material;\n }\n apply_outline_state() {\n this.viewer.outline_layer.set_outline(this, this._outline);\n this.viewer.outline_layer.set_outline_block(this, this._outline_block);\n if (this._outline) {\n // Only necessary to set color and width if visible\n // TODO: See IC3V-1569 with regards to applying outline properties on non-outline objects\n this.viewer.outline_layer.set_object_outline_color(this, this._outline_color);\n this.viewer.outline_layer.set_object_outline_width(this, this._outline_width);\n }\n }\n // Iterate all mesh nodes in this object (recurse === false) or in all this object and all children objects (recurse===true)\n mesh_iterator(recurse, func) {\n this.children_iterator(recurse, true, (object) => {\n var _a;\n (_a = this._asset_instance) === null || _a === void 0 ? void 0 : _a.mesh_iterator(func);\n });\n }\n // Iterate the full hierarchy of objects. Note that these are not babylon scene object but rather SceneObject that can each wrap a small babylon graph of babylon nodes\n children_iterator(recurse, include_self, func) {\n if (include_self) {\n func(this);\n }\n if (recurse && this._children_objects) {\n this._children_objects.forEach(child => {\n child.children_iterator(recurse, true, func);\n });\n }\n }\n children_direct_descendants_iterator(func) {\n if (this._children_objects) {\n this._children_objects.forEach(child => {\n func(child);\n });\n }\n }\n replace(old_object) {\n const new_parent = old_object.parent;\n old_object.set_parent(null);\n // TODO: Do we want to move over any other attribute? All of them? None?\n const old_position = old_object.get_position();\n this.set_position(old_position.x, old_position.y, old_position.z);\n const old_scale = old_object.get_scale();\n this.set_scale(old_scale.x, old_scale.y, old_scale.z);\n const old_rotation = old_object.get_rotation();\n this.set_rotation(old_rotation.x, old_rotation.y, old_rotation.z);\n this._children_objects = old_object._children_objects;\n old_object._children_objects = null;\n if (this._children_objects) {\n this._children_objects.forEach(child => {\n child._parent_object = this;\n child._root_node.parent = this._root_node;\n });\n }\n this.set_parent(new_parent);\n }\n get parent() {\n return this._parent_object;\n }\n set_parent(new_parent) {\n // If we already had this parent (or no parent in the case of null) then do nothing\n if (this._parent_object === new_parent)\n return;\n const our_id = this._object_id;\n // Unparent from old parent and set our parent to null\n const old_parent = this._parent_object;\n if (old_parent !== null) {\n old_parent._child_removed_observable.notify(old_parent, this);\n const children = old_parent._children_objects;\n if (children === null) {\n console.error('Cannot remove child from object with no children');\n return; // TODO: Throw error?\n }\n if (children.length === 1) {\n old_parent._children_objects = null;\n }\n else {\n // Find us in the children list of the old parent\n const index = children.findIndex((obj) => { return obj.id === our_id; }); // TODO: This is expensive when deleting\n if (index === -1) {\n console.error('Could not remove child from object since it is not the parent');\n }\n else {\n children.splice(index, 1);\n }\n }\n this._parent_object = null;\n this._root_node.parent = null; // Remove babylon parent\n }\n if (new_parent !== null) {\n new_parent._child_added_observable.notify(new_parent, this);\n this._parent_object = new_parent;\n if (new_parent._children_objects === null) {\n new_parent._children_objects = []; // TODO: Set?\n }\n new_parent._children_objects.push(this);\n this._root_node.parent = new_parent._root_node; // Set new babylon parent\n }\n // we got a new parent for this object, so we need to recompute the world matrixes\n this.mark_world_matrices_to_be_recomputed();\n }\n dispose(delete_children, parent_is_disposing = false) {\n var _a;\n if (this._root_node.isDisposed())\n return;\n this.viewer.interactable_disposed_observable.notify(this);\n this._disposed_observable.notify(this._object_id);\n this._input_handler.dispose();\n this._changed_observable.dispose();\n this._disposed_observable.dispose();\n if (!parent_is_disposing) {\n this.set_parent(null);\n }\n // NOTE: We remove the babylon node here early so the hiarchy we are removing from become smaller\n this._root_node.parent = null;\n if (this._children_objects) {\n this._children_objects.forEach(child => {\n if (delete_children) {\n child.dispose(true, true);\n }\n else {\n child._parent_object = null; // No need to call set_parent since the old parent was this and this is going away\n child._root_node.parent = null;\n child.mark_world_matrices_to_be_recomputed();\n }\n });\n this._children_objects.length = 0;\n this._children_objects = null;\n }\n this._child_added_observable.dispose();\n this._child_removed_observable.dispose();\n this.viewer.get_input_handler_manager().remove_interactable(this);\n (_a = this._asset_instance) === null || _a === void 0 ? void 0 : _a.dispose();\n // Now our babylon _root_node has no parent and no children from other SceneObject that we want to keep. Dispose all babylon nodes\n this._root_node.dispose(false);\n this.viewer_scene.objects.remove(this.id);\n }\n get_scale() {\n return new BABYLON_Vector3().copyFrom(this._root_node.scaling);\n }\n set_scale(x, y, z) {\n const scale = this._root_node.scaling;\n if (scale.x === x && scale.y === y && scale.z === z)\n return;\n scale.set(x, y, z);\n this.mark_world_matrices_to_be_recomputed();\n this._changed_observable.notify(this, this);\n this.viewer.mark_scene_dirty();\n }\n get scale() {\n return this._root_node.scaling;\n }\n set scale(value) {\n this.set_scale(value.x, value.y, value.z);\n }\n get_rotation() {\n return new BABYLON_Vector3().copyFrom(this._root_node.rotation);\n }\n set_rotation(x, y, z) {\n const rotation = this._root_node.rotation;\n if (rotation.x === x && rotation.y === y && rotation.z === z)\n return;\n rotation.set(x, y, z);\n this.mark_world_matrices_to_be_recomputed();\n this._changed_observable.notify(this, this);\n this.viewer.mark_scene_dirty();\n }\n get rotation() {\n return this._root_node.rotation;\n }\n set rotation(value) {\n this.set_rotation(value.x, value.y, value.z);\n }\n get_position() {\n return new BABYLON_Vector3().copyFrom(this._root_node.position);\n }\n set_position(x, y, z) {\n const position = this._root_node.position;\n if (position.x === x && position.y === y && position.z === z)\n return;\n position.set(x, y, z);\n this.mark_world_matrices_to_be_recomputed();\n this._changed_observable.notify(this, this);\n this.viewer.mark_scene_dirty();\n }\n get position() {\n return this._root_node.position;\n }\n set position(value) {\n this.set_position(value.x, value.y, value.z);\n }\n set_outline_enabled(enabled, propagate_to_children) {\n this.children_iterator(!!propagate_to_children, true, (object) => {\n if (object._outline === enabled)\n return;\n object._outline = enabled;\n this.viewer.outline_layer.set_outline(object, object._outline);\n if (enabled) {\n // When enabling we need to set colors and width again, as the outline layer only keeps track of active outlines.\n // TODO: See IC3V-1569 with regards to applying outline properties on non-outline objects\n this.viewer.outline_layer.set_object_outline_color(object, object._outline_color);\n this.viewer.outline_layer.set_object_outline_width(object, object._outline_width);\n }\n });\n }\n is_outline_enabled() {\n return this._outline;\n }\n set_outline_block_enabled(enabled, propagate_to_children) {\n this.children_iterator(!!propagate_to_children, true, (object) => {\n if (object._outline_block === enabled)\n return;\n object._outline_block = enabled;\n this.viewer.outline_layer.set_outline_block(object, object._outline_block);\n });\n }\n is_outline_block_enabled() {\n return this._outline_block;\n }\n get outline_color() {\n var _a;\n return (_a = this._outline_color) !== null && _a !== void 0 ? _a : this.viewer.outline_layer.get_global_outline_color();\n }\n set outline_color(value) {\n if (this._outline_color === null && value === null)\n return;\n if (this._outline_color !== null &&\n value !== null &&\n value.r === this.outline_color.r &&\n value.g === this.outline_color.g &&\n value.b === this.outline_color.b &&\n value.a === this.outline_color.a)\n return;\n const babylon_color = value !== null ? new BABYLON_Color4(value.r, value.g, value.b, value.a) : null;\n this._outline_color = babylon_color;\n // TODO: See IC3V-1569 with regards to applying outline properties on non-outline objects\n if (this._outline) {\n this.viewer.outline_layer.set_object_outline_color(this, this._outline_color);\n }\n }\n get outline_width() {\n var _a;\n return (_a = this._outline_width) !== null && _a !== void 0 ? _a : this.viewer.outline_layer.get_global_outline_width();\n }\n set outline_width(value) {\n if (this._outline_width === value)\n return;\n this._outline_width = value;\n // TODO: See IC3V-1569 with regards to applying outline properties on non-outline objects\n if (this._outline) {\n this.viewer.outline_layer.set_object_outline_width(this, this._outline_width);\n }\n }\n mark_world_matrices_to_be_recomputed() {\n this.viewer.mark_world_bounds_dirty();\n this.children_iterator(true, true, (scene_object) => {\n scene_object._root_node.markAsDirty('');\n scene_object.mesh_iterator(true, (mesh) => {\n mesh.markAsDirty('');\n });\n this.viewer.light_system.on_object_modified(scene_object);\n });\n }\n traverse_nodes_internal(node, transform, block_child_objects, callback) {\n if (block_child_objects && this._children_objects !== null) {\n for (let j = 0; j < this._children_objects.length; j++) {\n if (node === this._children_objects[j]._root_node) {\n return;\n }\n }\n }\n if (node instanceof BABYLON_TransformNode) {\n const new_transform = new BABYLON_Matrix();\n // We need compute the world matrix to make Babylon update its local matrix, otherwise we get incorrect results.\n node.computeWorldMatrix();\n node._localMatrix.multiplyToRef(transform, new_transform);\n transform = new_transform;\n }\n callback(node, transform);\n const children = node.getChildren();\n for (let i = 0; i < children.length; i++) {\n this.traverse_nodes_internal(children[i], transform, block_child_objects, callback);\n }\n }\n /**\n * Traverses the vertices in local space in this object. Does not traverse child objects.\n * @param callback The callback to process the vertex\n * @param initial_transform Initial transform (defaults to the identity). For example, if intial_transform is the objects world matrix, we'd get the vertices in world space.\n */\n traverse_vertices_local_space(callback, initial_transform = BABYLON_Matrix.Identity()) {\n // Temp vectors to cache\n const vertex = new BABYLON_Vector3();\n const transformed_vertex = new BABYLON_Vector4();\n // Skip the root node as it contains this object's \"world transform\".\n // We want to say in \"local space\" to our object.\n const children = this._root_node.getChildren();\n for (let i = 0; i < children.length; i++) {\n this.traverse_nodes_internal(children[i], initial_transform, true, (node, transform) => {\n if (node instanceof BABYLON_AbstractMesh) {\n const mesh = node;\n // This check is needed, otherwise Babylon gives an error in getPositionData when there are no vertices.\n if (!mesh.isVerticesDataPresent(BABYLON_VertexBuffer.PositionKind))\n return;\n const data = mesh.getPositionData(true, true);\n if (data !== null) {\n for (let i = 0; i < data.length; i += 3) {\n vertex.x = data[i + 0];\n vertex.y = data[i + 1];\n vertex.z = data[i + 2];\n BABYLON_Vector4.TransformCoordinatesToRef(vertex, transform, transformed_vertex);\n callback(transformed_vertex);\n }\n }\n }\n });\n }\n }\n get_world_matrix() {\n return this.root_node.getWorldMatrix();\n }\n get_local_matrix() {\n // We tell Babylon to compute the world matrix, as it computes the local matrix if it was out-of-date.\n this._root_node.computeWorldMatrix();\n return this.root_node._localMatrix;\n }\n // Fetches or calculates the object's bounding volume\n get_local_space_bounding_info() {\n if (this._local_bounding_info_calculation_promise !== null)\n return this._local_bounding_info_calculation_promise;\n this._local_bounding_info_calculation_promise = this.ready.then(() => {\n if (this._local_bounding_info !== null) {\n this._local_bounding_info_calculation_promise = null;\n return this._local_bounding_info;\n }\n else {\n const bounds = {\n min: new BABYLON_Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE),\n max: new BABYLON_Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE)\n };\n this.traverse_vertices_local_space((vertex) => {\n IVector3.min_to_ref(bounds.min, vertex, bounds.min);\n IVector3.max_to_ref(bounds.max, vertex, bounds.max);\n });\n const sphere_center = new BABYLON_Vector3();\n sphere_center.x = 0.5 * (bounds.min.x + bounds.max.x);\n sphere_center.y = 0.5 * (bounds.min.y + bounds.max.y);\n sphere_center.z = 0.5 * (bounds.min.z + bounds.max.z);\n let sphere_radius_squared = 0.0;\n const tmp_delta = new BABYLON_Vector3();\n this.traverse_vertices_local_space((vertex) => {\n sphere_center.subtractFromFloatsToRef(vertex.x, vertex.y, vertex.z, tmp_delta);\n sphere_radius_squared = Math.max(sphere_radius_squared, tmp_delta.lengthSquared());\n });\n const sphere = {\n center: sphere_center,\n radius: Math.sqrt(sphere_radius_squared)\n };\n const info = {\n aabb: bounds,\n sphere: sphere\n };\n this._local_bounding_info_calculation_promise = null;\n if (this.can_cache_local_bounds()) {\n this._local_bounding_info = info;\n }\n return info;\n }\n });\n return this._local_bounding_info_calculation_promise;\n }\n // TODO: Once is_loaded becomes ready promise safe we should let the async endpoint just wrap this endpoint\n get_local_space_bounding_info_sync() {\n if (!this._has_bounds)\n throw Error('get_local_space_bounding_info_sync requires object to have loaded before calling');\n if (this._local_bounding_info !== null)\n return this._local_bounding_info;\n const bounds = {\n min: new BABYLON_Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE),\n max: new BABYLON_Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE)\n };\n this.traverse_vertices_local_space((vertex) => {\n IVector3.min_to_ref(bounds.min, vertex, bounds.min);\n IVector3.max_to_ref(bounds.max, vertex, bounds.max);\n });\n const sphere_center = new BABYLON_Vector3();\n sphere_center.x = 0.5 * (bounds.min.x + bounds.max.x);\n sphere_center.y = 0.5 * (bounds.min.y + bounds.max.y);\n sphere_center.z = 0.5 * (bounds.min.z + bounds.max.z);\n let sphere_radius_squared = 0.0;\n const tmp_delta = new BABYLON_Vector3();\n this.traverse_vertices_local_space((vertex) => {\n sphere_center.subtractFromFloatsToRef(vertex.x, vertex.y, vertex.z, tmp_delta);\n sphere_radius_squared = Math.max(sphere_radius_squared, tmp_delta.lengthSquared());\n });\n const sphere = {\n center: sphere_center,\n radius: Math.sqrt(sphere_radius_squared)\n };\n const info = {\n aabb: bounds,\n sphere: sphere\n };\n this._local_bounding_info_calculation_promise = null;\n if (this.can_cache_local_bounds()) {\n this._local_bounding_info = info;\n }\n return info;\n }\n transform_offset_with_world_matrix(offset) {\n const known_offset = offset ? new BABYLON_Vector3().fromIVector3(offset) : new BABYLON_Vector3();\n const world_matrix_transformed_point = BABYLON_Vector3.TransformCoordinatesToRef(known_offset, this._root_node.getWorldMatrix(), new BABYLON_Vector3());\n return world_matrix_transformed_point;\n }\n transform_direction_with_world_matrix(local_direction) {\n // Calculate local_dir to world dir\n const local_dir = new BABYLON_Vector3(local_direction.x, local_direction.y, local_direction.z);\n local_dir.normalize();\n return BABYLON_Vector3.TransformNormalToRef(local_dir, this._root_node.getWorldMatrix(), new BABYLON_Vector3());\n }\n recalculate_local_bounds() {\n this._local_bounding_info = null;\n if (this.can_cache_local_bounds()) {\n // Pre-heats the cache\n this.get_local_space_bounding_info();\n }\n this._changed_observable.notify(this, this);\n }\n get visible() {\n return this._visible;\n }\n set visible(v) {\n if (this._visible === v) {\n return;\n }\n this._visible = v;\n this.mesh_iterator(false, mesh => {\n mesh.isVisible = this._visible;\n mark_mesh_dirty_for_lightsystem(this.viewer.light_system, mesh);\n });\n this.changed_observable.notify(this, this);\n }\n get enabled() {\n return this._root_node.isEnabled();\n }\n set enabled(v) {\n const update_lights = v !== this.enabled;\n this._root_node.setEnabled(v);\n // Make sure to mark dirty for light system if we've switched between enabled/disabled\n if (update_lights) {\n this.mesh_iterator(true, mesh => {\n mark_mesh_dirty_for_lightsystem(this.viewer.light_system, mesh);\n });\n }\n }\n get receive_shadow() {\n return this._receive_shadow;\n }\n set receive_shadow(v) {\n if (this._asset_instance) {\n this._asset_instance.set_receive_shadows(v);\n }\n this._receive_shadow = v;\n }\n get alpha_index() {\n return this._alpha_index;\n }\n set alpha_index(v) {\n if (this._alpha_index === v)\n return;\n this._alpha_index = v;\n this.mesh_iterator(false, (mesh) => {\n mesh.alphaIndex = this._alpha_index;\n });\n }\n get on_drag_enable() {\n return this._on_drag_enable;\n }\n set on_drag_enable(enabled) {\n this._on_drag_enable = enabled;\n }\n get on_click_enable() {\n return this._on_click_enable;\n }\n set on_click_enable(enabled) {\n if (this._on_click_enable === enabled)\n return;\n this._on_click_enable = enabled;\n }\n get root() {\n return this._root_node;\n }\n set name(s) {\n this._root_node.name = this._root_node.id = s;\n }\n get name() {\n return this._root_node.name;\n }\n get drag_interactable() {\n return (this.drag_begin_observable.has_active_observers ||\n this.drag_observable.has_active_observers ||\n this.drag_end_observable.has_active_observers) &&\n this._on_drag_enable;\n }\n get click_interactable() {\n return this.click_observable.has_active_observers && this._on_click_enable;\n }\n get hover_interactable() {\n return this.pointer_enter_observable.has_active_observers || this.pointer_leave_observable.has_active_observers;\n }\n get has_input_handler() {\n return this.drag_interactable || this.click_interactable || this.hover_interactable;\n }\n update_albedo_roughness_factor_internal() {\n var _a;\n (_a = this._asset_instance) === null || _a === void 0 ? void 0 : _a.instance_iterator((instance) => {\n instance.set_color_roughness_factor(this._base_color);\n });\n }\n set_base_color(base_color) {\n const linear_color = IColor.to_linear_space(base_color);\n if (IVector3.equals(linear_color, this._base_color)) {\n return;\n }\n this._base_color.set(linear_color.x, linear_color.y, linear_color.z, this._base_color.w);\n this.changed_observable.notify(this, this);\n this.update_albedo_roughness_factor_internal();\n }\n set_roughness_factor(roughness_factor) {\n if (this._base_color.w === roughness_factor)\n return;\n this._base_color.w = roughness_factor;\n this.changed_observable.notify(this, this);\n this.update_albedo_roughness_factor_internal();\n }\n set_raycast_bounds(bounds) {\n let cloned_bounds = null;\n if (bounds !== null) {\n cloned_bounds = [];\n for (let i = 0; i < bounds.length; i++) {\n cloned_bounds.push(clone_bounds(bounds[i]));\n }\n }\n this._interaction_bounds = cloned_bounds;\n this.update_raycast_bounds_visualization();\n }\n get_raycast_bounds() {\n return this._interaction_bounds;\n }\n update_raycast_bounds_visualization() {\n if (this.bounds_meshes) {\n // Clean out old meshes\n for (const mesh of this.bounds_meshes) {\n mesh.dispose_instances();\n mesh.dispose();\n }\n }\n this.bounds_meshes.length = 0;\n if (this._show_interaction_bounds) {\n // Create new UiMeshes\n if (this._interaction_bounds) {\n for (const bound of this._interaction_bounds) {\n const mesh = this.viewer.create_ui_mesh();\n this.bounds_meshes.push(mesh);\n let instance = null;\n if (is_aabb(bound)) {\n const center = aabb_center(bound);\n const size = aabb_size(bound);\n const positions = new Float32Array([\n -0.5, -0.5, -0.5,\n 0.5, -0.5, -0.5,\n -0.5, -0.5, 0.5,\n 0.5, -0.5, 0.5,\n -0.5, 0.5, -0.5,\n 0.5, 0.5, -0.5,\n -0.5, 0.5, 0.5,\n 0.5, 0.5, 0.5\n ]);\n const indices = new Uint16Array([\n 0, 3, 2,\n 0, 1, 3,\n 0, 4, 5,\n 0, 5, 1,\n 1, 5, 7,\n 1, 7, 3,\n 2, 6, 4,\n 2, 4, 0,\n 2, 3, 7,\n 2, 7, 6,\n 4, 7, 5,\n 4, 6, 7\n ]);\n const colors = new Float32Array(8 * 4);\n colors.fill(1.0);\n for (let i = 3; i < colors.length; i += 4) {\n colors[i] = 0.4;\n }\n mesh.load_mesh({\n positions: positions,\n indices: indices,\n colors: colors\n });\n instance = mesh.create_instance();\n instance.position = center;\n instance.scale = size;\n }\n else if (is_sphere(bound)) {\n const positions = [];\n const indices = [];\n const colors = [];\n const radius = 1.0;\n const segments = 16;\n for (let i = 0; i <= segments; i++) {\n const longitude = i * Math.PI / segments;\n for (let j = 0; j <= segments; j++) {\n const latitude = j * 2 * Math.PI / segments;\n const x = Math.sin(longitude) * Math.cos(latitude);\n const y = Math.cos(longitude);\n const z = Math.sin(longitude) * Math.sin(latitude);\n positions.push(x * radius, y * radius, z * radius);\n colors.push(1, 1, 1, 0.4);\n }\n }\n for (let i = 0; i < segments; i++) {\n for (let j = 0; j < segments; j++) {\n const first = (i * (segments + 1)) + j;\n const second = first + segments + 1;\n indices.push(first, first + 1, second);\n indices.push(second, first + 1, second + 1);\n }\n }\n mesh.load_mesh({\n positions: new Float32Array(positions),\n indices: new Uint16Array(indices),\n colors: new Float32Array(colors)\n });\n instance = mesh.create_instance();\n instance.position = bound.position;\n instance.scale = new IVector3(bound.radius, bound.radius, bound.radius);\n }\n assert(mesh, `failed to create bounds visualization for bound: ${JSON.stringify(bound)}`);\n if (instance) {\n instance.set_parent(this.id);\n instance.color_factor = this._interaction_bounds_tint;\n }\n }\n }\n }\n this.viewer.mark_scene_dirty();\n }\n // Returns true if it's OK to cache local bounds.\n can_cache_local_bounds() {\n // If we have skeletal animation, we need to recalculate our bounds each time.\n return !this._has_skeletal_animation;\n }\n};\nSceneObject = __decorate([\n Debug.Selectable({\n icon: '⊡',\n name: 'SceneObject',\n tooltip: (object) => `SceneObject: ${object.id}`,\n world_position: (object) => object.transform_offset_with_world_matrix(),\n is_enabled: false\n })\n], SceneObject);\nexport { SceneObject };\n//# sourceMappingURL=SceneObject.js.map","import { IMatrix4, IVector3 } from '../../../api.js';\nimport { SceneObject } from '../../../babylon/SceneObject.js';\nimport { log_instance } from '../utils/LogInstance.js';\nexport const OBJECT_DESCRIPTION = {\n type: SceneObject,\n name: 'default-object-description',\n is_enabled: true,\n transform: {\n position: (object) => ({\n get: () => IVector3.copy(object.position),\n set: (val) => { object.position = val; }\n }),\n rotation: (object) => ({\n get: () => IVector3.copy(object.rotation),\n set: (val) => { object.rotation = val; }\n }),\n scale: (object) => ({\n get: () => IVector3.copy(object.scale),\n set: (val) => { object.scale = val; }\n }),\n get_world_transform: (object) => object.get_world_matrix().toIMatrix4ToRef(new IMatrix4()),\n get_parent_world_transform: (object) => object.parent ? object.parent.get_world_matrix().toIMatrix4ToRef(new IMatrix4()) : undefined\n },\n initiate_tabs: [\n {\n tag: 'Scene Object',\n setup: (tab, object) => {\n tab.watch(object, 'id', { is_readonly: true });\n tab.custom.watch('number', {\n name: 'parent',\n get: () => { var _a, _b; return (_b = (_a = object.parent) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null; },\n is_nullable: true\n });\n tab.watch(object, 'receive_shadow');\n tab.button('Dispose', { on_click: () => object.dispose(true) });\n tab.button('Log', { on_click: () => log_instance(object) });\n }\n }\n ]\n};\n//# sourceMappingURL=SceneObjectDescription.js.map","import { ViewerCamera } from '../../../babylon/camera/ViewerCamera.js';\nimport { log_instance } from '../utils/LogInstance.js';\nexport const CAMERA_DESCRIPTION = {\n type: ViewerCamera,\n name: 'viewer-camera-default-description',\n is_enabled: true,\n initiate_tabs: [\n {\n tag: 'Cameras',\n setup: (tab, camera) => {\n const container = tab.get_container('🎥 ' + camera.name, { is_collapsed: true });\n container.watch(camera, 'position', { is_readonly: true, is_collapsed: true });\n container.custom.watch('checkbox', {\n name: 'Is Active',\n get: () => camera.viewer.get_active_camera() === camera,\n set: () => {\n if (camera.viewer.get_active_camera() === camera) {\n camera.viewer.pop_camera();\n }\n else {\n camera.viewer.push_camera(camera);\n }\n }\n });\n container.button('Dispose', { on_click: () => camera.dispose() });\n container.button('Log', { on_click: () => log_instance(camera) });\n }\n }\n ]\n};\n//# sourceMappingURL=ViewerCameraDescription.js.map","import { Observable } from '../Observable.js';\nexport class InputHandler {\n constructor(_execution_object, initial_interaction_objects) {\n this._execution_object = _execution_object;\n this._click_observable = new Observable();\n this._secondary_click_observable = new Observable();\n this._drag_begin_observable = new Observable();\n this._drag_observable = new Observable();\n this._drag_end_observable = new Observable();\n this._pointer_enter_observable = new Observable();\n this._pointer_leave_observable = new Observable();\n this._input_handler_updated = new Observable();\n this._input_handler_disposed = new Observable();\n this.enabled = true;\n this._interaction_objects = [...initial_interaction_objects];\n }\n dispose() {\n this._click_observable.dispose();\n this._secondary_click_observable.dispose();\n this._drag_begin_observable.dispose();\n this._drag_observable.dispose();\n this._drag_end_observable.dispose();\n this._pointer_enter_observable.dispose();\n this._pointer_leave_observable.dispose();\n this._input_handler_disposed.notify(this._execution_object, this._interaction_objects);\n }\n get execution_object() {\n return this._execution_object;\n }\n set interaction_objects(objects) {\n this._interaction_objects.length = 0;\n for (let i = 0; i < objects.length; i++) {\n this._interaction_objects.push(objects[i]);\n }\n }\n get interaction_objects() {\n return this._interaction_objects;\n }\n add_interaction_object(object) {\n this._interaction_objects.push(object);\n this._input_handler_updated.notify(this._execution_object, this._interaction_objects);\n }\n remove_interaction_object(object) {\n const index = this._interaction_objects.indexOf(object);\n if (index !== -1) {\n this._interaction_objects.splice(index, 1);\n this._input_handler_updated.notify(this._execution_object, this._interaction_objects);\n }\n }\n get input_handler_updated() {\n return this._input_handler_updated;\n }\n get input_handler_disposed() {\n return this._input_handler_disposed;\n }\n get click_observable() {\n return this._click_observable;\n }\n get secondary_click_observable() {\n return this._secondary_click_observable;\n }\n get drag_begin_observable() {\n return this._drag_begin_observable;\n }\n get drag_observable() {\n return this._drag_observable;\n }\n get drag_end_observable() {\n return this._drag_end_observable;\n }\n get pointer_enter_observable() {\n return this._pointer_enter_observable;\n }\n get pointer_leave_observable() {\n return this._pointer_leave_observable;\n }\n}\n//# sourceMappingURL=InputHandler.js.map","import { InputHandler } from './InputHandler.js';\nexport class InputHandlerManager {\n constructor() {\n this._input_handlers = [];\n }\n create_input_handler(execution_object, interaction_objects) {\n const input_handler = new InputHandler(execution_object, interaction_objects);\n this._input_handlers.push(input_handler);\n input_handler.input_handler_disposed.add((_sender, _objects) => { this.remove_input_handler(input_handler, false); });\n return input_handler;\n }\n remove_input_handler(input_handler, call_dispose = true) {\n const index = this._input_handlers.indexOf(input_handler);\n if (index !== -1) {\n if (call_dispose)\n input_handler.dispose();\n this._input_handlers.splice(index, 1);\n }\n }\n interactable_is_pickable(interactable) {\n return this._input_handlers.some((input_handler) => input_handler.interaction_objects.includes(interactable) && input_handler.execution_object.has_input_handler);\n }\n count() {\n return this._input_handlers.length;\n }\n /**\n * Update/remove all input handlers that are associated with this object.\n * @param interactable The object to remove from the input handlers list.\n */\n remove_interactable(interactable) {\n /**\n * Notice: this might trigger a dispose or update observable while the list is still being iterated. If this causes\n * issues, could be changed so it notifies after the list has been updated.\n */\n for (let i = this._input_handlers.length - 1; i >= 0; i--) {\n const input_handler = this._input_handlers[i];\n if (input_handler.execution_object === interactable) {\n this._input_handlers.splice(i, 1);\n input_handler.dispose();\n }\n else {\n input_handler.remove_interaction_object(interactable);\n }\n }\n }\n get_execute_objects(interaction_object) {\n const execute_objects = [];\n for (let i = 0; i < this._input_handlers.length; i++) {\n const input_handler = this._input_handlers[i];\n if (input_handler.enabled && input_handler.interaction_objects.includes(interaction_object)) {\n execute_objects.push(input_handler.execution_object);\n }\n }\n return execute_objects;\n }\n to_string() {\n const get_object_id = (o) => 'id' in o ? '' + o.id : 'gizmo';\n let output = `InputHandlers[${this._input_handlers.length}]:`;\n this._input_handlers.forEach((ih, i) => {\n output += `\\n ${i}: ${get_object_id(ih.execution_object)} → ${ih.interaction_objects.map(get_object_id).join(', ')}`;\n });\n return output;\n }\n}\n//# sourceMappingURL=InputHandlerManager.js.map","class ViewerLockImplementation {\n constructor() {\n this._lock_id = Symbol('ViewerLockSystem');\n }\n}\nexport class ViewerLockSystem {\n constructor() {\n this._active_locks = new Set();\n }\n acquire_lock() {\n const lock = new ViewerLockImplementation();\n this._active_locks.add(lock._lock_id);\n return lock;\n }\n release_lock(lock) {\n if (!this._active_locks.has(lock._lock_id)) {\n throw new Error('Invalid lock');\n }\n this._active_locks.delete(lock._lock_id);\n }\n is_locked() {\n return this._active_locks.size > 0;\n }\n}\n//# sourceMappingURL=LockSystem.js.map","import { Tools } from \"../Misc/tools.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { Scene } from \"../scene.js\";\nimport { Engine } from \"../Engines/engine.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { Logger } from \"../Misc/logger.js\";\n\nimport { SceneLoaderFlags } from \"./sceneLoaderFlags.js\";\nimport { IsBase64DataUrl } from \"../Misc/fileTools.js\";\nimport { RuntimeError, ErrorCodes } from \"../Misc/error.js\";\n/**\n * Mode that determines how to handle old animation groups before loading new ones.\n */\nexport var SceneLoaderAnimationGroupLoadingMode;\n(function (SceneLoaderAnimationGroupLoadingMode) {\n /**\n * Reset all old animations to initial state then dispose them.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"Clean\"] = 0] = \"Clean\";\n /**\n * Stop all old animations.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"Stop\"] = 1] = \"Stop\";\n /**\n * Restart old animations from first frame.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"Sync\"] = 2] = \"Sync\";\n /**\n * Old animations remains untouched.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"NoSync\"] = 3] = \"NoSync\";\n})(SceneLoaderAnimationGroupLoadingMode || (SceneLoaderAnimationGroupLoadingMode = {}));\n/**\n * Class used to load scene from various file formats using registered plugins\n * @see https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes\n */\nexport class SceneLoader {\n /**\n * Gets or sets a boolean indicating if entire scene must be loaded even if scene contains incremental data\n */\n static get ForceFullSceneLoadingForIncremental() {\n return SceneLoaderFlags.ForceFullSceneLoadingForIncremental;\n }\n static set ForceFullSceneLoadingForIncremental(value) {\n SceneLoaderFlags.ForceFullSceneLoadingForIncremental = value;\n }\n /**\n * Gets or sets a boolean indicating if loading screen must be displayed while loading a scene\n */\n static get ShowLoadingScreen() {\n return SceneLoaderFlags.ShowLoadingScreen;\n }\n static set ShowLoadingScreen(value) {\n SceneLoaderFlags.ShowLoadingScreen = value;\n }\n /**\n * Defines the current logging level (while loading the scene)\n * @ignorenaming\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static get loggingLevel() {\n return SceneLoaderFlags.loggingLevel;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static set loggingLevel(value) {\n SceneLoaderFlags.loggingLevel = value;\n }\n /**\n * Gets or set a boolean indicating if matrix weights must be cleaned upon loading\n */\n static get CleanBoneMatrixWeights() {\n return SceneLoaderFlags.CleanBoneMatrixWeights;\n }\n static set CleanBoneMatrixWeights(value) {\n SceneLoaderFlags.CleanBoneMatrixWeights = value;\n }\n /**\n * Gets the default plugin (used to load Babylon files)\n * @returns the .babylon plugin\n */\n static GetDefaultPlugin() {\n return SceneLoader._RegisteredPlugins[\".babylon\"];\n }\n static _GetPluginForExtension(extension) {\n const registeredPlugin = SceneLoader._RegisteredPlugins[extension];\n if (registeredPlugin) {\n return registeredPlugin;\n }\n Logger.Warn(\"Unable to find a plugin to load \" +\n extension +\n \" files. Trying to use .babylon default plugin. To load from a specific filetype (eg. gltf) see: https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes\");\n return SceneLoader.GetDefaultPlugin();\n }\n static _GetPluginForDirectLoad(data) {\n for (const extension in SceneLoader._RegisteredPlugins) {\n const plugin = SceneLoader._RegisteredPlugins[extension].plugin;\n if (plugin.canDirectLoad && plugin.canDirectLoad(data)) {\n return SceneLoader._RegisteredPlugins[extension];\n }\n }\n return SceneLoader.GetDefaultPlugin();\n }\n static _GetPluginForFilename(sceneFilename) {\n const queryStringPosition = sceneFilename.indexOf(\"?\");\n if (queryStringPosition !== -1) {\n sceneFilename = sceneFilename.substring(0, queryStringPosition);\n }\n const dotPosition = sceneFilename.lastIndexOf(\".\");\n const extension = sceneFilename.substring(dotPosition, sceneFilename.length).toLowerCase();\n return SceneLoader._GetPluginForExtension(extension);\n }\n static _GetDirectLoad(sceneFilename) {\n if (sceneFilename.substr(0, 5) === \"data:\") {\n return sceneFilename.substr(5);\n }\n return null;\n }\n static _FormatErrorMessage(fileInfo, message, exception) {\n const fromLoad = fileInfo.rawData ? \"binary data\" : fileInfo.url;\n let errorMessage = \"Unable to load from \" + fromLoad;\n if (message) {\n errorMessage += `: ${message}`;\n }\n else if (exception) {\n errorMessage += `: ${exception}`;\n }\n return errorMessage;\n }\n static _LoadData(fileInfo, scene, onSuccess, onProgress, onError, onDispose, pluginExtension, name) {\n const directLoad = SceneLoader._GetDirectLoad(fileInfo.url);\n if (fileInfo.rawData && !pluginExtension) {\n throw \"When using ArrayBufferView to load data the file extension must be provided.\";\n }\n const registeredPlugin = pluginExtension\n ? SceneLoader._GetPluginForExtension(pluginExtension)\n : directLoad\n ? SceneLoader._GetPluginForDirectLoad(fileInfo.url)\n : SceneLoader._GetPluginForFilename(fileInfo.url);\n if (fileInfo.rawData && !registeredPlugin.isBinary) {\n throw \"Loading from ArrayBufferView can not be used with plugins that don't support binary loading.\";\n }\n let plugin;\n if (registeredPlugin.plugin.createPlugin !== undefined) {\n plugin = registeredPlugin.plugin.createPlugin();\n }\n else {\n plugin = registeredPlugin.plugin;\n }\n if (!plugin) {\n throw \"The loader plugin corresponding to the file type you are trying to load has not been found. If using es6, please import the plugin you wish to use before.\";\n }\n SceneLoader.OnPluginActivatedObservable.notifyObservers(plugin);\n // Check if we have a direct load url. If the plugin is registered to handle\n // it or it's not a base64 data url, then pass it through the direct load path.\n if (directLoad && ((plugin.canDirectLoad && plugin.canDirectLoad(fileInfo.url)) || !IsBase64DataUrl(fileInfo.url))) {\n if (plugin.directLoad) {\n const result = plugin.directLoad(scene, directLoad);\n if (result.then) {\n result\n .then((data) => {\n onSuccess(plugin, data);\n })\n .catch((error) => {\n onError(\"Error in directLoad of _loadData: \" + error, error);\n });\n }\n else {\n onSuccess(plugin, result);\n }\n }\n else {\n onSuccess(plugin, directLoad);\n }\n return plugin;\n }\n const useArrayBuffer = registeredPlugin.isBinary;\n const dataCallback = (data, responseURL) => {\n if (scene.isDisposed) {\n onError(\"Scene has been disposed\");\n return;\n }\n onSuccess(plugin, data, responseURL);\n };\n let request = null;\n let pluginDisposed = false;\n const onDisposeObservable = plugin.onDisposeObservable;\n if (onDisposeObservable) {\n onDisposeObservable.add(() => {\n pluginDisposed = true;\n if (request) {\n request.abort();\n request = null;\n }\n onDispose();\n });\n }\n const manifestChecked = () => {\n if (pluginDisposed) {\n return;\n }\n const errorCallback = (request, exception) => {\n onError(request === null || request === void 0 ? void 0 : request.statusText, exception);\n };\n if (!plugin.loadFile && fileInfo.rawData) {\n throw \"Plugin does not support loading ArrayBufferView.\";\n }\n request = plugin.loadFile\n ? plugin.loadFile(scene, fileInfo.rawData || fileInfo.file || fileInfo.url, fileInfo.rootUrl, dataCallback, onProgress, useArrayBuffer, errorCallback, name)\n : scene._loadFile(fileInfo.file || fileInfo.url, dataCallback, onProgress, true, useArrayBuffer, errorCallback);\n };\n const engine = scene.getEngine();\n let canUseOfflineSupport = engine.enableOfflineSupport;\n if (canUseOfflineSupport) {\n // Also check for exceptions\n let exceptionFound = false;\n for (const regex of scene.disableOfflineSupportExceptionRules) {\n if (regex.test(fileInfo.url)) {\n exceptionFound = true;\n break;\n }\n }\n canUseOfflineSupport = !exceptionFound;\n }\n if (canUseOfflineSupport && Engine.OfflineProviderFactory) {\n // Checking if a manifest file has been set for this scene and if offline mode has been requested\n scene.offlineProvider = Engine.OfflineProviderFactory(fileInfo.url, manifestChecked, engine.disableManifestCheck);\n }\n else {\n manifestChecked();\n }\n return plugin;\n }\n static _GetFileInfo(rootUrl, sceneFilename) {\n let url;\n let name;\n let file = null;\n let rawData = null;\n if (!sceneFilename) {\n url = rootUrl;\n name = Tools.GetFilename(rootUrl);\n rootUrl = Tools.GetFolderPath(rootUrl);\n }\n else if (sceneFilename.name) {\n const sceneFile = sceneFilename;\n url = `file:${sceneFile.name}`;\n name = sceneFile.name;\n file = sceneFile;\n }\n else if (ArrayBuffer.isView(sceneFilename)) {\n url = \"\";\n name = \"arrayBuffer\";\n rawData = sceneFilename;\n }\n else if (typeof sceneFilename === \"string\" && sceneFilename.startsWith(\"data:\")) {\n url = sceneFilename;\n name = \"\";\n }\n else {\n const filename = sceneFilename;\n if (filename.substr(0, 1) === \"/\") {\n Tools.Error(\"Wrong sceneFilename parameter\");\n return null;\n }\n url = rootUrl + filename;\n name = filename;\n }\n return {\n url: url,\n rootUrl: rootUrl,\n name: name,\n file: file,\n rawData,\n };\n }\n // Public functions\n /**\n * Gets a plugin that can load the given extension\n * @param extension defines the extension to load\n * @returns a plugin or null if none works\n */\n static GetPluginForExtension(extension) {\n return SceneLoader._GetPluginForExtension(extension).plugin;\n }\n /**\n * Gets a boolean indicating that the given extension can be loaded\n * @param extension defines the extension to load\n * @returns true if the extension is supported\n */\n static IsPluginForExtensionAvailable(extension) {\n return !!SceneLoader._RegisteredPlugins[extension];\n }\n /**\n * Adds a new plugin to the list of registered plugins\n * @param plugin defines the plugin to add\n */\n static RegisterPlugin(plugin) {\n if (typeof plugin.extensions === \"string\") {\n const extension = plugin.extensions;\n SceneLoader._RegisteredPlugins[extension.toLowerCase()] = {\n plugin: plugin,\n isBinary: false,\n };\n }\n else {\n const extensions = plugin.extensions;\n Object.keys(extensions).forEach((extension) => {\n SceneLoader._RegisteredPlugins[extension.toLowerCase()] = {\n plugin: plugin,\n isBinary: extensions[extension].isBinary,\n };\n });\n }\n }\n /**\n * Import meshes into a scene\n * @param meshNames an array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene the instance of BABYLON.Scene to append to\n * @param onSuccess a callback with a list of imported meshes, particleSystems, skeletons, and animationGroups when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @returns The loaded plugin\n */\n static ImportMesh(meshNames, rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\") {\n if (!scene) {\n Logger.Error(\"No scene available to import mesh to\");\n return null;\n }\n const fileInfo = SceneLoader._GetFileInfo(rootUrl, sceneFilename);\n if (!fileInfo) {\n return null;\n }\n const loadingToken = {};\n scene.addPendingData(loadingToken);\n const disposeHandler = () => {\n scene.removePendingData(loadingToken);\n };\n const errorHandler = (message, exception) => {\n const errorMessage = SceneLoader._FormatErrorMessage(fileInfo, message, exception);\n if (onError) {\n onError(scene, errorMessage, new RuntimeError(errorMessage, ErrorCodes.SceneLoaderError, exception));\n }\n else {\n Logger.Error(errorMessage);\n // should the exception be thrown?\n }\n disposeHandler();\n };\n const progressHandler = onProgress\n ? (event) => {\n try {\n onProgress(event);\n }\n catch (e) {\n errorHandler(\"Error in onProgress callback: \" + e, e);\n }\n }\n : undefined;\n const successHandler = (meshes, particleSystems, skeletons, animationGroups, transformNodes, geometries, lights) => {\n scene.importedMeshesFiles.push(fileInfo.url);\n if (onSuccess) {\n try {\n onSuccess(meshes, particleSystems, skeletons, animationGroups, transformNodes, geometries, lights);\n }\n catch (e) {\n errorHandler(\"Error in onSuccess callback: \" + e, e);\n }\n }\n scene.removePendingData(loadingToken);\n };\n return SceneLoader._LoadData(fileInfo, scene, (plugin, data, responseURL) => {\n if (plugin.rewriteRootURL) {\n fileInfo.rootUrl = plugin.rewriteRootURL(fileInfo.rootUrl, responseURL);\n }\n if (plugin.importMesh) {\n const syncedPlugin = plugin;\n const meshes = [];\n const particleSystems = [];\n const skeletons = [];\n if (!syncedPlugin.importMesh(meshNames, scene, data, fileInfo.rootUrl, meshes, particleSystems, skeletons, errorHandler)) {\n return;\n }\n scene.loadingPluginName = plugin.name;\n successHandler(meshes, particleSystems, skeletons, [], [], [], []);\n }\n else {\n const asyncedPlugin = plugin;\n asyncedPlugin\n .importMeshAsync(meshNames, scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name)\n .then((result) => {\n scene.loadingPluginName = plugin.name;\n successHandler(result.meshes, result.particleSystems, result.skeletons, result.animationGroups, result.transformNodes, result.geometries, result.lights);\n })\n .catch((error) => {\n errorHandler(error.message, error);\n });\n }\n }, progressHandler, errorHandler, disposeHandler, pluginExtension, name);\n }\n /**\n * Import meshes into a scene\n * @param meshNames an array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene the instance of BABYLON.Scene to append to\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @returns The loaded list of imported meshes, particle systems, skeletons, and animation groups\n */\n static ImportMeshAsync(meshNames, rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onProgress = null, pluginExtension = null, name = \"\") {\n return new Promise((resolve, reject) => {\n SceneLoader.ImportMesh(meshNames, rootUrl, sceneFilename, scene, (meshes, particleSystems, skeletons, animationGroups, transformNodes, geometries, lights) => {\n resolve({\n meshes: meshes,\n particleSystems: particleSystems,\n skeletons: skeletons,\n animationGroups: animationGroups,\n transformNodes: transformNodes,\n geometries: geometries,\n lights: lights,\n });\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name);\n });\n }\n /**\n * Load a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param engine is the instance of BABYLON.Engine to use to create the scene\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @returns The loaded plugin\n */\n static Load(rootUrl, sceneFilename = \"\", engine = EngineStore.LastCreatedEngine, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\") {\n if (!engine) {\n Tools.Error(\"No engine available\");\n return null;\n }\n return SceneLoader.Append(rootUrl, sceneFilename, new Scene(engine), onSuccess, onProgress, onError, pluginExtension, name);\n }\n /**\n * Load a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param engine is the instance of BABYLON.Engine to use to create the scene\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @returns The loaded scene\n */\n static LoadAsync(rootUrl, sceneFilename = \"\", engine = EngineStore.LastCreatedEngine, onProgress = null, pluginExtension = null, name = \"\") {\n return new Promise((resolve, reject) => {\n SceneLoader.Load(rootUrl, sceneFilename, engine, (scene) => {\n resolve(scene);\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name);\n });\n }\n /**\n * Append a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @returns The loaded plugin\n */\n static Append(rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\") {\n if (!scene) {\n Logger.Error(\"No scene available to append to\");\n return null;\n }\n const fileInfo = SceneLoader._GetFileInfo(rootUrl, sceneFilename);\n if (!fileInfo) {\n return null;\n }\n const loadingToken = {};\n scene.addPendingData(loadingToken);\n const disposeHandler = () => {\n scene.removePendingData(loadingToken);\n };\n if (SceneLoader.ShowLoadingScreen && !this._ShowingLoadingScreen) {\n this._ShowingLoadingScreen = true;\n scene.getEngine().displayLoadingUI();\n scene.executeWhenReady(() => {\n scene.getEngine().hideLoadingUI();\n this._ShowingLoadingScreen = false;\n });\n }\n const errorHandler = (message, exception) => {\n const errorMessage = SceneLoader._FormatErrorMessage(fileInfo, message, exception);\n if (onError) {\n onError(scene, errorMessage, new RuntimeError(errorMessage, ErrorCodes.SceneLoaderError, exception));\n }\n else {\n Logger.Error(errorMessage);\n // should the exception be thrown?\n }\n disposeHandler();\n };\n const progressHandler = onProgress\n ? (event) => {\n try {\n onProgress(event);\n }\n catch (e) {\n errorHandler(\"Error in onProgress callback\", e);\n }\n }\n : undefined;\n const successHandler = () => {\n if (onSuccess) {\n try {\n onSuccess(scene);\n }\n catch (e) {\n errorHandler(\"Error in onSuccess callback\", e);\n }\n }\n scene.removePendingData(loadingToken);\n };\n return SceneLoader._LoadData(fileInfo, scene, (plugin, data) => {\n if (plugin.load) {\n const syncedPlugin = plugin;\n if (!syncedPlugin.load(scene, data, fileInfo.rootUrl, errorHandler)) {\n return;\n }\n scene.loadingPluginName = plugin.name;\n successHandler();\n }\n else {\n const asyncedPlugin = plugin;\n asyncedPlugin\n .loadAsync(scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name)\n .then(() => {\n scene.loadingPluginName = plugin.name;\n successHandler();\n })\n .catch((error) => {\n errorHandler(error.message, error);\n });\n }\n }, progressHandler, errorHandler, disposeHandler, pluginExtension, name);\n }\n /**\n * Append a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @returns The given scene\n */\n static AppendAsync(rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onProgress = null, pluginExtension = null, name = \"\") {\n return new Promise((resolve, reject) => {\n SceneLoader.Append(rootUrl, sceneFilename, scene, (scene) => {\n resolve(scene);\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name);\n });\n }\n /**\n * Load a scene into an asset container\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to (default: last created scene)\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @returns The loaded plugin\n */\n static LoadAssetContainer(rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\") {\n if (!scene) {\n Logger.Error(\"No scene available to load asset container to\");\n return null;\n }\n const fileInfo = SceneLoader._GetFileInfo(rootUrl, sceneFilename);\n if (!fileInfo) {\n return null;\n }\n const loadingToken = {};\n scene.addPendingData(loadingToken);\n const disposeHandler = () => {\n scene.removePendingData(loadingToken);\n };\n const errorHandler = (message, exception) => {\n const errorMessage = SceneLoader._FormatErrorMessage(fileInfo, message, exception);\n if (onError) {\n onError(scene, errorMessage, new RuntimeError(errorMessage, ErrorCodes.SceneLoaderError, exception));\n }\n else {\n Logger.Error(errorMessage);\n // should the exception be thrown?\n }\n disposeHandler();\n };\n const progressHandler = onProgress\n ? (event) => {\n try {\n onProgress(event);\n }\n catch (e) {\n errorHandler(\"Error in onProgress callback\", e);\n }\n }\n : undefined;\n const successHandler = (assets) => {\n if (onSuccess) {\n try {\n onSuccess(assets);\n }\n catch (e) {\n errorHandler(\"Error in onSuccess callback\", e);\n }\n }\n scene.removePendingData(loadingToken);\n };\n return SceneLoader._LoadData(fileInfo, scene, (plugin, data) => {\n if (plugin.loadAssetContainer) {\n const syncedPlugin = plugin;\n const assetContainer = syncedPlugin.loadAssetContainer(scene, data, fileInfo.rootUrl, errorHandler);\n if (!assetContainer) {\n return;\n }\n assetContainer.populateRootNodes();\n scene.loadingPluginName = plugin.name;\n successHandler(assetContainer);\n }\n else if (plugin.loadAssetContainerAsync) {\n const asyncedPlugin = plugin;\n asyncedPlugin\n .loadAssetContainerAsync(scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name)\n .then((assetContainer) => {\n assetContainer.populateRootNodes();\n scene.loadingPluginName = plugin.name;\n successHandler(assetContainer);\n })\n .catch((error) => {\n errorHandler(error.message, error);\n });\n }\n else {\n errorHandler(\"LoadAssetContainer is not supported by this plugin. Plugin did not provide a loadAssetContainer or loadAssetContainerAsync method.\");\n }\n }, progressHandler, errorHandler, disposeHandler, pluginExtension, name);\n }\n /**\n * Load a scene into an asset container\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene (default: empty string)\n * @param scene is the instance of Scene to append to\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @returns The loaded asset container\n */\n static LoadAssetContainerAsync(rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onProgress = null, pluginExtension = null) {\n return new Promise((resolve, reject) => {\n SceneLoader.LoadAssetContainer(rootUrl, sceneFilename, scene, (assetContainer) => {\n resolve(assetContainer);\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension);\n });\n }\n /**\n * Import animations from a file into a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to (default: last created scene)\n * @param overwriteAnimations when true, animations are cleaned before importing new ones. Animations are appended otherwise\n * @param animationGroupLoadingMode defines how to handle old animations groups before importing new ones\n * @param targetConverter defines a function used to convert animation targets from loaded scene to current scene (default: search node by name)\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n */\n static ImportAnimations(rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, overwriteAnimations = true, animationGroupLoadingMode = SceneLoaderAnimationGroupLoadingMode.Clean, targetConverter = null, onSuccess = null, onProgress = null, onError = null, pluginExtension = null) {\n if (!scene) {\n Logger.Error(\"No scene available to load animations to\");\n return;\n }\n if (overwriteAnimations) {\n // Reset, stop and dispose all animations before loading new ones\n for (const animatable of scene.animatables) {\n animatable.reset();\n }\n scene.stopAllAnimations();\n scene.animationGroups.slice().forEach((animationGroup) => {\n animationGroup.dispose();\n });\n const nodes = scene.getNodes();\n nodes.forEach((node) => {\n if (node.animations) {\n node.animations = [];\n }\n });\n }\n else {\n switch (animationGroupLoadingMode) {\n case SceneLoaderAnimationGroupLoadingMode.Clean:\n scene.animationGroups.slice().forEach((animationGroup) => {\n animationGroup.dispose();\n });\n break;\n case SceneLoaderAnimationGroupLoadingMode.Stop:\n scene.animationGroups.forEach((animationGroup) => {\n animationGroup.stop();\n });\n break;\n case SceneLoaderAnimationGroupLoadingMode.Sync:\n scene.animationGroups.forEach((animationGroup) => {\n animationGroup.reset();\n animationGroup.restart();\n });\n break;\n case SceneLoaderAnimationGroupLoadingMode.NoSync:\n // nothing to do\n break;\n default:\n Logger.Error(\"Unknown animation group loading mode value '\" + animationGroupLoadingMode + \"'\");\n return;\n }\n }\n const startingIndexForNewAnimatables = scene.animatables.length;\n const onAssetContainerLoaded = (container) => {\n container.mergeAnimationsTo(scene, scene.animatables.slice(startingIndexForNewAnimatables), targetConverter);\n container.dispose();\n scene.onAnimationFileImportedObservable.notifyObservers(scene);\n if (onSuccess) {\n onSuccess(scene);\n }\n };\n this.LoadAssetContainer(rootUrl, sceneFilename, scene, onAssetContainerLoaded, onProgress, onError, pluginExtension);\n }\n /**\n * Import animations from a file into a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to (default: last created scene)\n * @param overwriteAnimations when true, animations are cleaned before importing new ones. Animations are appended otherwise\n * @param animationGroupLoadingMode defines how to handle old animations groups before importing new ones\n * @param targetConverter defines a function used to convert animation targets from loaded scene to current scene (default: search node by name)\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @returns the updated scene with imported animations\n */\n static ImportAnimationsAsync(rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, overwriteAnimations = true, animationGroupLoadingMode = SceneLoaderAnimationGroupLoadingMode.Clean, targetConverter = null, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onSuccess = null, onProgress = null, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onError = null, pluginExtension = null) {\n return new Promise((resolve, reject) => {\n SceneLoader.ImportAnimations(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, (_scene) => {\n resolve(_scene);\n }, onProgress, (_scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension);\n });\n }\n}\n/**\n * No logging while loading\n */\nSceneLoader.NO_LOGGING = 0;\n/**\n * Minimal logging while loading\n */\nSceneLoader.MINIMAL_LOGGING = 1;\n/**\n * Summary logging while loading\n */\nSceneLoader.SUMMARY_LOGGING = 2;\n/**\n * Detailed logging while loading\n */\nSceneLoader.DETAILED_LOGGING = 3;\n// Members\n/**\n * Event raised when a plugin is used to load a scene\n */\nSceneLoader.OnPluginActivatedObservable = new Observable();\nSceneLoader._RegisteredPlugins = {};\nSceneLoader._ShowingLoadingScreen = false;\n//# sourceMappingURL=sceneLoader.js.map","export class SceneAssetInstanceMetadata {\n constructor() {\n // TODO: Could be other things?\n this.owner = null;\n }\n}\nexport class SceneAssetMeshInstanceMetadata {\n constructor(asset_instance_metadata, source_mesh) {\n this.custom_raycast_acceleration_structure = null;\n this.asset_instance_metadata = asset_instance_metadata;\n this._source_mesh = source_mesh;\n }\n get raycast_acceleration_structure() {\n var _a;\n return (_a = this.custom_raycast_acceleration_structure) !== null && _a !== void 0 ? _a : this._source_mesh.raycast_acceleration_structure;\n }\n}\n//# sourceMappingURL=SceneAssetMetadata.js.map","import { InstancedMesh as BABYLON_InstancedMesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/instancedMesh.js';\nimport { TransformNode as BABYLON_TransformNode } from '@inter-ikea-betrakta-babylonjs/core/Meshes/transformNode.js';\nimport { Node as BABYLON_Node } from '@inter-ikea-betrakta-babylonjs/core/node.js';\nimport { Observable } from '../../Observable.js';\nimport { IMatrix4 } from '../../api.js';\nimport { SceneAssetInstanceMetadata } from './SceneAssetMetadata.js';\nimport { matrix_pool } from '../../Math.js';\nexport class SceneAssetInstance {\n constructor(scene, mesh, model_transform) {\n this._mesh_instances = [];\n this.meshes_updated_observable = new Observable();\n this.disposed_observable = new Observable();\n this._override_material = null;\n this.metadata = new SceneAssetInstanceMetadata();\n this._receive_shadows = true;\n this.animation_groups = null;\n this.scene = scene;\n this.asset = mesh;\n this.root = new BABYLON_TransformNode('instance', this.scene.babylon_scene);\n if (model_transform !== null) {\n this._model_transform = IMatrix4.copy(model_transform);\n const babylon_model_transform = matrix_pool.fetch().fromIMatrix4(model_transform);\n babylon_model_transform.decomposeToTransformNode(this.root);\n }\n else {\n this._model_transform = null;\n }\n this.asset_root = new BABYLON_Node('instance mesh root', this.scene.babylon_scene);\n this.asset_root.parent = this.root;\n }\n on_new_meshes(mesh_instances) {\n this._mesh_instances.length = mesh_instances.length;\n for (let i = 0; i < this._mesh_instances.length; i++) {\n this._mesh_instances[i] = mesh_instances[i];\n mesh_instances[i].set_custom_material(this._override_material);\n mesh_instances[i].set_receive_shadows(this._receive_shadows);\n }\n this.meshes_updated_observable.notify(this, { new_meshes: mesh_instances });\n }\n mesh_iterator(func) {\n this.asset_root.getChildMeshes(false).forEach((mesh) => {\n if (mesh instanceof BABYLON_InstancedMesh) {\n func(mesh);\n }\n else {\n throw new Error('SceneAssetInstance contains non-instanced meshes');\n }\n });\n }\n instance_iterator(func) {\n this._mesh_instances.forEach(func);\n }\n set_parent(parent) {\n this.root.parent = parent;\n }\n dispose_mesh() {\n this._mesh_instances.forEach(mesh => mesh.dispose());\n this.asset_root.dispose(false);\n this.asset_root = new BABYLON_TransformNode('instance mesh root', this.scene.babylon_scene);\n this.asset_root.parent = this.root;\n }\n dispose() {\n this.dispose_mesh();\n this.asset.instance_disposed(this);\n this.asset_root.dispose(false);\n this.disposed_observable.notify(this);\n this.meshes_updated_observable.dispose();\n this.disposed_observable.dispose();\n }\n set_override_material(material) {\n this._override_material = material;\n this._mesh_instances.forEach((mesh) => {\n mesh.set_custom_material(material);\n });\n }\n get_override_material() {\n return this._override_material;\n }\n set_receive_shadows(value) {\n if (value === this._receive_shadows)\n return;\n this._receive_shadows = value;\n this._mesh_instances.forEach(mesh => mesh.set_receive_shadows(value));\n }\n prepare_for_render() {\n this._mesh_instances.forEach((value) => {\n value.prepare_for_render();\n });\n }\n clone() {\n const clone = this.asset.create_instance(this._model_transform);\n clone.set_override_material(this._override_material);\n // Copy properties on the individual instances\n // This assumes the same ordering, TODO improve?\n if (this._mesh_instances.length !== clone._mesh_instances.length) {\n console.warn(\"Invalid state: Clone's instance count does not match the source's instance count\");\n }\n else {\n let has_warned_for_invalid_state = false;\n for (let i = 0; i < clone._mesh_instances.length; i++) {\n if (clone._mesh_instances[i].source === this._mesh_instances[i].source) {\n clone._mesh_instances[i].copy_settings_from(this._mesh_instances[i]);\n }\n else {\n if (!has_warned_for_invalid_state) {\n console.warn(\"Invalid state: Clone's instance's source does not match source's instance source\");\n has_warned_for_invalid_state = true;\n }\n }\n }\n }\n return clone;\n }\n}\n//# sourceMappingURL=SceneAssetInstance.js.map","import { AbstractScene } from \"./abstractScene.js\";\nimport { Mesh } from \"./Meshes/mesh.js\";\nimport { TransformNode } from \"./Meshes/transformNode.js\";\nimport { AbstractMesh } from \"./Meshes/abstractMesh.js\";\nimport { Logger } from \"./Misc/logger.js\";\nimport { EngineStore } from \"./Engines/engineStore.js\";\nimport { InstancedMesh } from \"./Meshes/instancedMesh.js\";\nimport { Light } from \"./Lights/light.js\";\nimport { Camera } from \"./Cameras/camera.js\";\nimport { Tools } from \"./Misc/tools.js\";\n/**\n * Set of assets to keep when moving a scene into an asset container.\n */\nexport class KeepAssets extends AbstractScene {\n}\n/**\n * Class used to store the output of the AssetContainer.instantiateAllMeshesToScene function\n */\nexport class InstantiatedEntries {\n constructor() {\n /**\n * List of new root nodes (eg. nodes with no parent)\n */\n this.rootNodes = [];\n /**\n * List of new skeletons\n */\n this.skeletons = [];\n /**\n * List of new animation groups\n */\n this.animationGroups = [];\n }\n /**\n * Disposes the instantiated entries from the scene\n */\n dispose() {\n this.rootNodes.slice(0).forEach((o) => {\n o.dispose();\n });\n this.rootNodes.length = 0;\n this.skeletons.slice(0).forEach((o) => {\n o.dispose();\n });\n this.skeletons.length = 0;\n this.animationGroups.slice(0).forEach((o) => {\n o.dispose();\n });\n this.animationGroups.length = 0;\n }\n}\n/**\n * Container with a set of assets that can be added or removed from a scene.\n */\nexport class AssetContainer extends AbstractScene {\n /**\n * Instantiates an AssetContainer.\n * @param scene The scene the AssetContainer belongs to.\n */\n constructor(scene) {\n super();\n this._wasAddedToScene = false;\n scene = scene || EngineStore.LastCreatedScene;\n if (!scene) {\n return;\n }\n this.scene = scene;\n this[\"sounds\"] = [];\n this[\"effectLayers\"] = [];\n this[\"layers\"] = [];\n this[\"lensFlareSystems\"] = [];\n this[\"proceduralTextures\"] = [];\n this[\"reflectionProbes\"] = [];\n scene.onDisposeObservable.add(() => {\n if (!this._wasAddedToScene) {\n this.dispose();\n }\n });\n this._onContextRestoredObserver = scene.getEngine().onContextRestoredObservable.add(() => {\n for (const geometry of this.geometries) {\n geometry._rebuild();\n }\n for (const mesh of this.meshes) {\n mesh._rebuild();\n }\n for (const system of this.particleSystems) {\n system.rebuild();\n }\n for (const texture of this.textures) {\n texture._rebuild();\n }\n });\n }\n /**\n * Given a list of nodes, return a topological sorting of them.\n * @param nodes\n */\n _topologicalSort(nodes) {\n const nodesUidMap = new Map();\n for (const node of nodes) {\n nodesUidMap.set(node.uniqueId, node);\n }\n const dependencyGraph = {\n dependsOn: new Map(),\n dependedBy: new Map(), // given a node id, what are the ids of the nodes that depend on it\n };\n // Build the dependency graph given the list of nodes\n // First pass: Initialize the empty dependency graph\n for (const node of nodes) {\n const nodeId = node.uniqueId;\n dependencyGraph.dependsOn.set(nodeId, new Set());\n dependencyGraph.dependedBy.set(nodeId, new Set());\n }\n // Second pass: Populate the dependency graph. We assume that we\n // don't need to check for cycles here, as the scene graph cannot\n // contain cycles. Our graph also already contains all transitive\n // dependencies because getDescendants returns the transitive\n // dependencies by default.\n for (const node of nodes) {\n const nodeId = node.uniqueId;\n const dependsOn = dependencyGraph.dependsOn.get(nodeId);\n if (node instanceof InstancedMesh) {\n const masterMesh = node.sourceMesh;\n if (nodesUidMap.has(masterMesh.uniqueId)) {\n dependsOn.add(masterMesh.uniqueId);\n dependencyGraph.dependedBy.get(masterMesh.uniqueId).add(nodeId);\n }\n }\n const dependedBy = dependencyGraph.dependedBy.get(nodeId);\n for (const child of node.getDescendants()) {\n const childId = child.uniqueId;\n if (nodesUidMap.has(childId)) {\n dependedBy.add(childId);\n const childDependsOn = dependencyGraph.dependsOn.get(childId);\n childDependsOn.add(nodeId);\n }\n }\n }\n // Third pass: Topological sort\n const sortedNodes = [];\n // First: Find all nodes that have no dependencies\n const leaves = [];\n for (const node of nodes) {\n const nodeId = node.uniqueId;\n if (dependencyGraph.dependsOn.get(nodeId).size === 0) {\n leaves.push(node);\n nodesUidMap.delete(nodeId);\n }\n }\n const visitList = leaves;\n while (visitList.length > 0) {\n const nodeToVisit = visitList.shift();\n sortedNodes.push(nodeToVisit);\n // Remove the node from the dependency graph\n // When a node is visited, we know that dependsOn is empty.\n // So we only need to remove the node from dependedBy.\n const dependedByVisitedNode = dependencyGraph.dependedBy.get(nodeToVisit.uniqueId);\n // Array.from(x.values()) is to make the TS compiler happy\n for (const dependedByVisitedNodeId of Array.from(dependedByVisitedNode.values())) {\n const dependsOnDependedByVisitedNode = dependencyGraph.dependsOn.get(dependedByVisitedNodeId);\n dependsOnDependedByVisitedNode.delete(nodeToVisit.uniqueId);\n if (dependsOnDependedByVisitedNode.size === 0 && nodesUidMap.get(dependedByVisitedNodeId)) {\n visitList.push(nodesUidMap.get(dependedByVisitedNodeId));\n nodesUidMap.delete(dependedByVisitedNodeId);\n }\n }\n }\n if (nodesUidMap.size > 0) {\n console.error(\"SceneSerializer._topologicalSort: There were unvisited nodes:\");\n nodesUidMap.forEach((node) => console.error(node.name));\n }\n return sortedNodes;\n }\n _addNodeAndDescendantsToList(list, addedIds, rootNode, predicate) {\n if (!rootNode || (predicate && !predicate(rootNode)) || addedIds.has(rootNode.uniqueId)) {\n return;\n }\n list.push(rootNode);\n addedIds.add(rootNode.uniqueId);\n for (const child of rootNode.getDescendants(true)) {\n this._addNodeAndDescendantsToList(list, addedIds, child, predicate);\n }\n }\n /**\n * Check if a specific node is contained in this asset container.\n * @param node\n */\n _isNodeInContainer(node) {\n if (node instanceof Mesh && this.meshes.indexOf(node) !== -1) {\n return true;\n }\n if (node instanceof TransformNode && this.transformNodes.indexOf(node) !== -1) {\n return true;\n }\n if (node instanceof Light && this.lights.indexOf(node) !== -1) {\n return true;\n }\n if (node instanceof Camera && this.cameras.indexOf(node) !== -1) {\n return true;\n }\n return false;\n }\n /**\n * For every node in the scene, check if its parent node is also in the scene.\n */\n _isValidHierarchy() {\n for (const node of this.meshes) {\n if (node.parent && !this._isNodeInContainer(node.parent)) {\n Logger.Warn(`Node ${node.name} has a parent that is not in the container.`);\n return false;\n }\n }\n for (const node of this.transformNodes) {\n if (node.parent && !this._isNodeInContainer(node.parent)) {\n Logger.Warn(`Node ${node.name} has a parent that is not in the container.`);\n return false;\n }\n }\n for (const node of this.lights) {\n if (node.parent && !this._isNodeInContainer(node.parent)) {\n Logger.Warn(`Node ${node.name} has a parent that is not in the container.`);\n return false;\n }\n }\n for (const node of this.cameras) {\n if (node.parent && !this._isNodeInContainer(node.parent)) {\n Logger.Warn(`Node ${node.name} has a parent that is not in the container.`);\n return false;\n }\n }\n return true;\n }\n /**\n * Instantiate or clone all meshes and add the new ones to the scene.\n * Skeletons and animation groups will all be cloned\n * @param nameFunction defines an optional function used to get new names for clones\n * @param cloneMaterials defines an optional boolean that defines if materials must be cloned as well (false by default)\n * @param options defines an optional list of options to control how to instantiate / clone models\n * @param options.doNotInstantiate defines if the model must be instantiated or just cloned\n * @param options.predicate defines a predicate used to filter whih mesh to instantiate/clone\n * @returns a list of rootNodes, skeletons and animation groups that were duplicated\n */\n instantiateModelsToScene(nameFunction, cloneMaterials = false, options) {\n if (!this._isValidHierarchy()) {\n Tools.Warn(\"SceneSerializer.InstantiateModelsToScene: The Asset Container hierarchy is not valid.\");\n }\n const conversionMap = {};\n const storeMap = {};\n const result = new InstantiatedEntries();\n const alreadySwappedSkeletons = [];\n const alreadySwappedMaterials = [];\n const localOptions = Object.assign({ doNotInstantiate: true }, options);\n const onClone = (source, clone) => {\n conversionMap[source.uniqueId] = clone.uniqueId;\n storeMap[clone.uniqueId] = clone;\n if (nameFunction) {\n clone.name = nameFunction(source.name);\n }\n if (clone instanceof Mesh) {\n const clonedMesh = clone;\n if (clonedMesh.morphTargetManager) {\n const oldMorphTargetManager = source.morphTargetManager;\n clonedMesh.morphTargetManager = oldMorphTargetManager.clone();\n for (let index = 0; index < oldMorphTargetManager.numTargets; index++) {\n const oldTarget = oldMorphTargetManager.getTarget(index);\n const newTarget = clonedMesh.morphTargetManager.getTarget(index);\n conversionMap[oldTarget.uniqueId] = newTarget.uniqueId;\n storeMap[newTarget.uniqueId] = newTarget;\n }\n }\n }\n };\n const nodesToSort = [];\n const idsOnSortList = new Set();\n for (const transformNode of this.transformNodes) {\n if (transformNode.parent === null) {\n this._addNodeAndDescendantsToList(nodesToSort, idsOnSortList, transformNode, localOptions.predicate);\n }\n }\n for (const mesh of this.meshes) {\n if (mesh.parent === null) {\n this._addNodeAndDescendantsToList(nodesToSort, idsOnSortList, mesh, localOptions.predicate);\n }\n }\n // Topologically sort nodes by parenting/instancing relationships so that all resources are in place\n // when a given node is instantiated.\n const sortedNodes = this._topologicalSort(nodesToSort);\n const onNewCreated = (source, clone) => {\n onClone(source, clone);\n if (source.parent) {\n const replicatedParentId = conversionMap[source.parent.uniqueId];\n const replicatedParent = storeMap[replicatedParentId];\n if (replicatedParent) {\n clone.parent = replicatedParent;\n }\n else {\n clone.parent = source.parent;\n }\n }\n if (clone.position && source.position) {\n clone.position.copyFrom(source.position);\n }\n if (clone.rotationQuaternion && source.rotationQuaternion) {\n clone.rotationQuaternion.copyFrom(source.rotationQuaternion);\n }\n if (clone.rotation && source.rotation) {\n clone.rotation.copyFrom(source.rotation);\n }\n if (clone.scaling && source.scaling) {\n clone.scaling.copyFrom(source.scaling);\n }\n if (clone.material) {\n const mesh = clone;\n if (mesh.material) {\n if (cloneMaterials) {\n const sourceMaterial = source.material;\n if (alreadySwappedMaterials.indexOf(sourceMaterial) === -1) {\n let swap = sourceMaterial.clone(nameFunction ? nameFunction(sourceMaterial.name) : \"Clone of \" + sourceMaterial.name);\n alreadySwappedMaterials.push(sourceMaterial);\n conversionMap[sourceMaterial.uniqueId] = swap.uniqueId;\n storeMap[swap.uniqueId] = swap;\n if (sourceMaterial.getClassName() === \"MultiMaterial\") {\n const multi = sourceMaterial;\n for (const material of multi.subMaterials) {\n if (!material) {\n continue;\n }\n swap = material.clone(nameFunction ? nameFunction(material.name) : \"Clone of \" + material.name);\n alreadySwappedMaterials.push(material);\n conversionMap[material.uniqueId] = swap.uniqueId;\n storeMap[swap.uniqueId] = swap;\n }\n multi.subMaterials = multi.subMaterials.map((m) => m && storeMap[conversionMap[m.uniqueId]]);\n }\n }\n if (mesh.getClassName() !== \"InstancedMesh\") {\n mesh.material = storeMap[conversionMap[sourceMaterial.uniqueId]];\n }\n }\n else {\n if (mesh.material.getClassName() === \"MultiMaterial\") {\n if (this.scene.multiMaterials.indexOf(mesh.material) === -1) {\n this.scene.addMultiMaterial(mesh.material);\n }\n }\n else {\n if (this.scene.materials.indexOf(mesh.material) === -1) {\n this.scene.addMaterial(mesh.material);\n }\n }\n }\n }\n }\n if (clone.parent === null) {\n result.rootNodes.push(clone);\n }\n };\n sortedNodes.forEach((node) => {\n if (node.getClassName() === \"InstancedMesh\") {\n const instancedNode = node;\n const sourceMesh = instancedNode.sourceMesh;\n const replicatedSourceId = conversionMap[sourceMesh.uniqueId];\n const replicatedSource = typeof replicatedSourceId === \"number\" ? storeMap[replicatedSourceId] : sourceMesh;\n const replicatedInstancedNode = replicatedSource.createInstance(instancedNode.name);\n onNewCreated(instancedNode, replicatedInstancedNode);\n }\n else {\n // Mesh or TransformNode\n let canInstance = true;\n if (node.getClassName() === \"TransformNode\" ||\n node.getClassName() === \"Node\" ||\n node.skeleton ||\n !node.getTotalVertices ||\n node.getTotalVertices() === 0) {\n // Transform nodes, skinned meshes, and meshes with no vertices can never be instanced!\n canInstance = false;\n }\n else if (localOptions.doNotInstantiate) {\n if (typeof localOptions.doNotInstantiate === \"function\") {\n canInstance = !localOptions.doNotInstantiate(node);\n }\n else {\n canInstance = !localOptions.doNotInstantiate;\n }\n }\n const replicatedNode = canInstance ? node.createInstance(`instance of ${node.name}`) : node.clone(`Clone of ${node.name}`, null, true);\n if (!replicatedNode) {\n throw new Error(`Could not clone or instantiate node on Asset Container ${node.name}`);\n }\n onNewCreated(node, replicatedNode);\n }\n });\n this.skeletons.forEach((s) => {\n if (localOptions.predicate && !localOptions.predicate(s)) {\n return;\n }\n const clone = s.clone(nameFunction ? nameFunction(s.name) : \"Clone of \" + s.name);\n for (const m of this.meshes) {\n if (m.skeleton === s && !m.isAnInstance) {\n const copy = storeMap[conversionMap[m.uniqueId]];\n if (!copy || copy.isAnInstance) {\n continue;\n }\n copy.skeleton = clone;\n if (alreadySwappedSkeletons.indexOf(clone) !== -1) {\n continue;\n }\n alreadySwappedSkeletons.push(clone);\n // Check if bones are mesh linked\n for (const bone of clone.bones) {\n if (bone._linkedTransformNode) {\n bone._linkedTransformNode = storeMap[conversionMap[bone._linkedTransformNode.uniqueId]];\n }\n }\n }\n }\n result.skeletons.push(clone);\n });\n this.animationGroups.forEach((o) => {\n if (localOptions.predicate && !localOptions.predicate(o)) {\n return;\n }\n const clone = o.clone(nameFunction ? nameFunction(o.name) : \"Clone of \" + o.name, (oldTarget) => {\n const newTarget = storeMap[conversionMap[oldTarget.uniqueId]];\n return newTarget || oldTarget;\n });\n result.animationGroups.push(clone);\n });\n return result;\n }\n /**\n * Adds all the assets from the container to the scene.\n */\n addAllToScene() {\n if (this._wasAddedToScene) {\n return;\n }\n if (!this._isValidHierarchy()) {\n Tools.Warn(\"SceneSerializer.addAllToScene: The Asset Container hierarchy is not valid.\");\n }\n this._wasAddedToScene = true;\n this.addToScene(null);\n if (this.environmentTexture) {\n this.scene.environmentTexture = this.environmentTexture;\n }\n for (const component of this.scene._serializableComponents) {\n component.addFromContainer(this);\n }\n this.scene.getEngine().onContextRestoredObservable.remove(this._onContextRestoredObserver);\n this._onContextRestoredObserver = null;\n }\n /**\n * Adds assets from the container to the scene.\n * @param predicate defines a predicate used to select which entity will be added (can be null)\n */\n addToScene(predicate = null) {\n const addedNodes = [];\n this.cameras.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addCamera(o);\n addedNodes.push(o);\n });\n this.lights.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addLight(o);\n addedNodes.push(o);\n });\n this.meshes.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addMesh(o);\n addedNodes.push(o);\n });\n this.skeletons.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addSkeleton(o);\n });\n this.animations.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addAnimation(o);\n });\n this.animationGroups.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addAnimationGroup(o);\n });\n this.multiMaterials.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addMultiMaterial(o);\n });\n this.materials.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addMaterial(o);\n });\n this.morphTargetManagers.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addMorphTargetManager(o);\n });\n this.geometries.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addGeometry(o);\n });\n this.transformNodes.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addTransformNode(o);\n addedNodes.push(o);\n });\n this.actionManagers.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addActionManager(o);\n });\n this.textures.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addTexture(o);\n });\n this.reflectionProbes.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.addReflectionProbe(o);\n });\n for (const addedNode of addedNodes) {\n // If node was added to the scene, but parent is not in the scene, break the relationship\n if (addedNode.parent && this.scene.getNodes().indexOf(addedNode.parent) === -1) {\n // Use setParent to keep transform if possible\n if (addedNode.setParent) {\n addedNode.setParent(null);\n }\n else {\n addedNode.parent = null;\n }\n }\n }\n }\n /**\n * Removes all the assets in the container from the scene\n */\n removeAllFromScene() {\n if (!this._isValidHierarchy()) {\n Tools.Warn(\"SceneSerializer.removeAllFromScene: The Asset Container hierarchy is not valid.\");\n }\n this._wasAddedToScene = false;\n this.removeFromScene(null);\n if (this.environmentTexture === this.scene.environmentTexture) {\n this.scene.environmentTexture = null;\n }\n for (const component of this.scene._serializableComponents) {\n component.removeFromContainer(this);\n }\n }\n /**\n * Removes assets in the container from the scene\n * @param predicate defines a predicate used to select which entity will be added (can be null)\n */\n removeFromScene(predicate = null) {\n this.cameras.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeCamera(o);\n });\n this.lights.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeLight(o);\n });\n this.meshes.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeMesh(o, true);\n });\n this.skeletons.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeSkeleton(o);\n });\n this.animations.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeAnimation(o);\n });\n this.animationGroups.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeAnimationGroup(o);\n });\n this.multiMaterials.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeMultiMaterial(o);\n });\n this.materials.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeMaterial(o);\n });\n this.morphTargetManagers.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeMorphTargetManager(o);\n });\n this.geometries.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeGeometry(o);\n });\n this.transformNodes.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeTransformNode(o);\n });\n this.actionManagers.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeActionManager(o);\n });\n this.textures.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeTexture(o);\n });\n this.reflectionProbes.forEach((o) => {\n if (predicate && !predicate(o)) {\n return;\n }\n this.scene.removeReflectionProbe(o);\n });\n }\n /**\n * Disposes all the assets in the container\n */\n dispose() {\n this.cameras.slice(0).forEach((o) => {\n o.dispose();\n });\n this.cameras.length = 0;\n this.lights.slice(0).forEach((o) => {\n o.dispose();\n });\n this.lights.length = 0;\n this.meshes.slice(0).forEach((o) => {\n o.dispose();\n });\n this.meshes.length = 0;\n this.skeletons.slice(0).forEach((o) => {\n o.dispose();\n });\n this.skeletons.length = 0;\n this.animationGroups.slice(0).forEach((o) => {\n o.dispose();\n });\n this.animationGroups.length = 0;\n this.multiMaterials.slice(0).forEach((o) => {\n o.dispose();\n });\n this.multiMaterials.length = 0;\n this.materials.slice(0).forEach((o) => {\n o.dispose();\n });\n this.materials.length = 0;\n this.geometries.slice(0).forEach((o) => {\n o.dispose();\n });\n this.geometries.length = 0;\n this.transformNodes.slice(0).forEach((o) => {\n o.dispose();\n });\n this.transformNodes.length = 0;\n this.actionManagers.slice(0).forEach((o) => {\n o.dispose();\n });\n this.actionManagers.length = 0;\n this.textures.slice(0).forEach((o) => {\n o.dispose();\n });\n this.textures.length = 0;\n this.reflectionProbes.slice(0).forEach((o) => {\n o.dispose();\n });\n this.reflectionProbes.length = 0;\n this.morphTargetManagers.slice(0).forEach((o) => {\n o.dispose();\n });\n this.morphTargetManagers.length = 0;\n if (this.environmentTexture) {\n this.environmentTexture.dispose();\n this.environmentTexture = null;\n }\n for (const component of this.scene._serializableComponents) {\n component.removeFromContainer(this, true);\n }\n if (this._onContextRestoredObserver) {\n this.scene.getEngine().onContextRestoredObservable.remove(this._onContextRestoredObserver);\n this._onContextRestoredObserver = null;\n }\n }\n _moveAssets(sourceAssets, targetAssets, keepAssets) {\n if (!sourceAssets || !targetAssets) {\n return;\n }\n for (const asset of sourceAssets) {\n let move = true;\n if (keepAssets) {\n for (const keepAsset of keepAssets) {\n if (asset === keepAsset) {\n move = false;\n break;\n }\n }\n }\n if (move) {\n targetAssets.push(asset);\n asset._parentContainer = this;\n }\n }\n }\n /**\n * Removes all the assets contained in the scene and adds them to the container.\n * @param keepAssets Set of assets to keep in the scene. (default: empty)\n */\n moveAllFromScene(keepAssets) {\n this._wasAddedToScene = false;\n if (keepAssets === undefined) {\n keepAssets = new KeepAssets();\n }\n for (const key in this) {\n if (Object.prototype.hasOwnProperty.call(this, key)) {\n this[key] = this[key] || (key === \"_environmentTexture\" ? null : []);\n this._moveAssets(this.scene[key], this[key], keepAssets[key]);\n }\n }\n this.environmentTexture = this.scene.environmentTexture;\n this.removeAllFromScene();\n }\n /**\n * Adds all meshes in the asset container to a root mesh that can be used to position all the contained meshes. The root mesh is then added to the front of the meshes in the assetContainer.\n * @returns the root mesh\n */\n createRootMesh() {\n const rootMesh = new Mesh(\"assetContainerRootMesh\", this.scene);\n this.meshes.forEach((m) => {\n if (!m.parent) {\n rootMesh.addChild(m);\n }\n });\n this.meshes.unshift(rootMesh);\n return rootMesh;\n }\n /**\n * Merge animations (direct and animation groups) from this asset container into a scene\n * @param scene is the instance of BABYLON.Scene to append to (default: last created scene)\n * @param animatables set of animatables to retarget to a node from the scene\n * @param targetConverter defines a function used to convert animation targets from the asset container to the scene (default: search node by name)\n * @returns an array of the new AnimationGroup added to the scene (empty array if none)\n */\n mergeAnimationsTo(scene = EngineStore.LastCreatedScene, animatables, targetConverter = null) {\n if (!scene) {\n Logger.Error(\"No scene available to merge animations to\");\n return [];\n }\n const _targetConverter = targetConverter\n ? targetConverter\n : (target) => {\n let node = null;\n const targetProperty = target.animations.length ? target.animations[0].targetProperty : \"\";\n /*\n BabylonJS adds special naming to targets that are children of nodes.\n This name attempts to remove that special naming to get the parent nodes name in case the target\n can't be found in the node tree\n\n Ex: Torso_primitive0 likely points to a Mesh primitive. We take away primitive0 and are left with \"Torso\" which is the name\n of the primitive's parent.\n */\n const name = target.name.split(\".\").join(\"\").split(\"_primitive\")[0];\n switch (targetProperty) {\n case \"position\":\n case \"rotationQuaternion\":\n node = scene.getTransformNodeByName(target.name) || scene.getTransformNodeByName(name);\n break;\n case \"influence\":\n node = scene.getMorphTargetByName(target.name) || scene.getMorphTargetByName(name);\n break;\n default:\n node = scene.getNodeByName(target.name) || scene.getNodeByName(name);\n }\n return node;\n };\n // Copy new node animations\n const nodesInAC = this.getNodes();\n nodesInAC.forEach((nodeInAC) => {\n const nodeInScene = _targetConverter(nodeInAC);\n if (nodeInScene !== null) {\n // Remove old animations with same target property as a new one\n for (const animationInAC of nodeInAC.animations) {\n // Doing treatment on an array for safety measure\n const animationsWithSameProperty = nodeInScene.animations.filter((animationInScene) => {\n return animationInScene.targetProperty === animationInAC.targetProperty;\n });\n for (const animationWithSameProperty of animationsWithSameProperty) {\n const index = nodeInScene.animations.indexOf(animationWithSameProperty, 0);\n if (index > -1) {\n nodeInScene.animations.splice(index, 1);\n }\n }\n }\n // Append new animations\n nodeInScene.animations = nodeInScene.animations.concat(nodeInAC.animations);\n }\n });\n const newAnimationGroups = [];\n // Copy new animation groups\n this.animationGroups.slice().forEach((animationGroupInAC) => {\n // Clone the animation group and all its animatables\n newAnimationGroups.push(animationGroupInAC.clone(animationGroupInAC.name, _targetConverter));\n // Remove animatables related to the asset container\n animationGroupInAC.animatables.forEach((animatable) => {\n animatable.stop();\n });\n });\n // Retarget animatables\n animatables.forEach((animatable) => {\n const target = _targetConverter(animatable.target);\n if (target) {\n // Clone the animatable and retarget it\n scene.beginAnimation(target, animatable.fromFrame, animatable.toFrame, animatable.loopAnimation, animatable.speedRatio, animatable.onAnimationEnd ? animatable.onAnimationEnd : undefined, undefined, true, undefined, animatable.onAnimationLoop ? animatable.onAnimationLoop : undefined);\n // Stop animation for the target in the asset container\n scene.stopAnimation(animatable.target);\n }\n });\n return newAnimationGroups;\n }\n /**\n * @since 6.15.0\n * This method checks for any node that has no parent\n * and is not in the rootNodes array, and adds the node\n * there, if so.\n */\n populateRootNodes() {\n this.rootNodes.length = 0;\n this.meshes.forEach((m) => {\n if (!m.parent && this.rootNodes.indexOf(m) === -1) {\n this.rootNodes.push(m);\n }\n });\n this.transformNodes.forEach((t) => {\n if (!t.parent && this.rootNodes.indexOf(t) === -1) {\n this.rootNodes.push(t);\n }\n });\n this.lights.forEach((l) => {\n if (!l.parent && this.rootNodes.indexOf(l) === -1) {\n this.rootNodes.push(l);\n }\n });\n this.cameras.forEach((c) => {\n if (!c.parent && this.rootNodes.indexOf(c) === -1) {\n this.rootNodes.push(c);\n }\n });\n }\n /**\n * @since 6.26.0\n * Given a root asset, this method will traverse its hierarchy and add it, its children and any materials/skeletons/animation groups to the container.\n * @param root\n */\n addAllAssetsToContainer(root) {\n if (!root) {\n return;\n }\n const nodesToVisit = [];\n const visitedNodes = new Set();\n nodesToVisit.push(root);\n while (nodesToVisit.length > 0) {\n const nodeToVisit = nodesToVisit.pop();\n if (nodeToVisit instanceof Mesh) {\n if (nodeToVisit.geometry && this.geometries.indexOf(nodeToVisit.geometry) === -1) {\n this.geometries.push(nodeToVisit.geometry);\n }\n this.meshes.push(nodeToVisit);\n }\n else if (nodeToVisit instanceof TransformNode) {\n this.transformNodes.push(nodeToVisit);\n }\n else if (nodeToVisit instanceof Light) {\n this.lights.push(nodeToVisit);\n }\n else if (nodeToVisit instanceof Camera) {\n this.cameras.push(nodeToVisit);\n }\n if (nodeToVisit instanceof AbstractMesh) {\n if (nodeToVisit.material && this.materials.indexOf(nodeToVisit.material) === -1) {\n this.materials.push(nodeToVisit.material);\n for (const texture of nodeToVisit.material.getActiveTextures()) {\n if (this.textures.indexOf(texture) === -1) {\n this.textures.push(texture);\n }\n }\n }\n if (nodeToVisit.skeleton && this.skeletons.indexOf(nodeToVisit.skeleton) === -1) {\n this.skeletons.push(nodeToVisit.skeleton);\n }\n if (nodeToVisit.morphTargetManager && this.morphTargetManagers.indexOf(nodeToVisit.morphTargetManager) === -1) {\n this.morphTargetManagers.push(nodeToVisit.morphTargetManager);\n }\n }\n for (const child of nodeToVisit.getChildren()) {\n if (!visitedNodes.has(child)) {\n nodesToVisit.push(child);\n }\n }\n visitedNodes.add(nodeToVisit);\n }\n this.populateRootNodes();\n }\n}\n//# sourceMappingURL=assetContainer.js.map","/**\n MeshVariantKey describes overrides on a mesh.\n We can have one per (url, mesh_index).\n If we have data that we want to vary per instance look at instance buffers instead!\n NOTE: transform_positive_determinant scales the source mesh to give it the same winding as the instances. The sourceMesh transform is not used so it doesn't change how the instances look.\n NOTE: Enabling base_color_roughness_override on an instance is really a modification of the currently assigned material! Needs a MaterialVariantKey instead and a similar system.\n*/\nexport class SceneAssetMeshVariantKey {\n constructor() {\n this.custom_material = null;\n this.receive_shadows = true;\n this.transform_positive_determinant = true; // TODO: Determine what is our default starting value\n this.transparent_model_id = null;\n this.unique_source_vertex_data_id = null;\n }\n hash() {\n let hash = '';\n if (this.custom_material === null) {\n // We don't have a material, we should never get here\n hash = '*';\n }\n else {\n // New material system place\n hash = this.custom_material.uniqueId.toString();\n }\n hash += '_' + (this.receive_shadows ? '1' : '0');\n hash += '_' + (this.transform_positive_determinant ? '1' : '0');\n hash += '_' + (this.transparent_model_id === null ? '*' : this.transparent_model_id);\n hash += '_' + (this.unique_source_vertex_data_id === null ? '*' : this.unique_source_vertex_data_id);\n return hash;\n }\n}\n//# sourceMappingURL=SceneAssetMeshVariantKey.js.map","import { IVector4 } from '../../api.js';\nimport { determinant3x3 } from '../../Math.js';\nimport { mark_mesh_dirty_for_lightsystem } from '../MeshManager.js';\nimport { SceneAssetMeshInstanceMetadata } from './SceneAssetMetadata.js';\nimport { ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME, ViewerMaterial } from '../material/ViewerMaterial.js';\nimport { Vector4 as BABYLON_Vector4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.js';\nimport { SceneAssetMeshVariantKey } from './SceneAssetMeshVariantKey.js';\nimport { Observable } from '../../Observable.js';\nimport { RenderingGroupID } from '../Viewer.js';\nlet unique_vertex_data_id_counter = 1;\nconst _TMP_ONE4 = BABYLON_Vector4.One();\nexport class SceneAssetMeshInstance {\n constructor(source, asset_instance_metadata) {\n this._mesh_variant_key_is_dirty = false;\n this._mesh_variant_key_world_transform_determinant_dirty = false;\n this._color_roughness_factor = new BABYLON_Vector4(1, 1, 1, 1);\n this.rendering_material_changed_observable = new Observable();\n this._has_last_rendering_material = false;\n this._last_rendering_material = null;\n this.source = source;\n this._mesh_variant_key = new SceneAssetMeshVariantKey();\n this.babylon_instance = this.source.instantiate_mesh_instance(this);\n this.babylon_instance.instancedBuffers[ALBEDO_ROUGHNESS_INSTANCE_ATTRIBUTE_NAME] = this._color_roughness_factor;\n this.babylon_instance.renderingGroupId = RenderingGroupID.DEFAULT_RENDERING_GROUP;\n this._on_world_transform_changed_callback = this.on_world_transform_changed.bind(this);\n this.babylon_instance.registerAfterWorldMatrixUpdate(this._on_world_transform_changed_callback);\n this.metadata = new SceneAssetMeshInstanceMetadata(asset_instance_metadata, source);\n this.source.viewer.viewer_scene.assign_metadata_to_babylon_mesh(this.babylon_instance, this.metadata);\n this._on_world_transform_changed_callback();\n this.update_material_color_roughness_factor_feature_enabled();\n this.mark_variant_key_dirty();\n }\n dispose() {\n this.rendering_material_changed_observable.dispose();\n this.source.viewer.outline_layer.remove_mesh(this.babylon_instance);\n mark_mesh_dirty_for_lightsystem(this.source.viewer.light_system, this.babylon_instance);\n this.source.viewer.freezing_manager.set_all_materials_dirty();\n this.source.viewer.mark_scene_dirty();\n const existing_source = this.babylon_instance.sourceMesh;\n this.babylon_instance.dispose(true, false);\n this.source.dispose_unused_variant_source(this, existing_source);\n }\n copy_settings_from(other) {\n this._mesh_variant_key.custom_material = other._mesh_variant_key.custom_material;\n this._mesh_variant_key.receive_shadows = other._mesh_variant_key.receive_shadows;\n this._mesh_variant_key.transform_positive_determinant = other._mesh_variant_key.transform_positive_determinant;\n this._mesh_variant_key.transparent_model_id = other._mesh_variant_key.transparent_model_id === null ? null : this.babylon_instance.uniqueId;\n this._mesh_variant_key.unique_source_vertex_data_id = other._mesh_variant_key.unique_source_vertex_data_id;\n this._mesh_variant_key_world_transform_determinant_dirty = true;\n this.mark_variant_key_dirty();\n }\n on_world_transform_changed() {\n this._mesh_variant_key_world_transform_determinant_dirty = true;\n this.mark_variant_key_dirty();\n mark_mesh_dirty_for_lightsystem(this.source.viewer.light_system, this.babylon_instance);\n }\n set_custom_material(material) {\n if (this._mesh_variant_key.custom_material === material)\n return;\n this._mesh_variant_key.custom_material = material;\n this.mark_variant_key_dirty();\n }\n get_custom_material() {\n return this._mesh_variant_key.custom_material;\n }\n get_active_material() {\n var _a;\n return (_a = this._mesh_variant_key.custom_material) !== null && _a !== void 0 ? _a : this.source.source_material;\n }\n set_receive_shadows(value) {\n if (this._mesh_variant_key.receive_shadows === value)\n return;\n this._mesh_variant_key.receive_shadows = value;\n this.mark_variant_key_dirty();\n }\n prepare_for_render() {\n var _a;\n if (this._mesh_variant_key_is_dirty) {\n this._mesh_variant_key_is_dirty = false;\n const rendering_material = (_a = this._mesh_variant_key.custom_material) !== null && _a !== void 0 ? _a : this.source.source_material;\n if (rendering_material !== null && (rendering_material.transparencyMode === 2 || rendering_material.transparencyMode === 3 || rendering_material.needAlphaBlending())) {\n this._mesh_variant_key.transparent_model_id = this.babylon_instance.uniqueId;\n }\n else {\n this._mesh_variant_key.transparent_model_id = null;\n }\n if (this._mesh_variant_key_world_transform_determinant_dirty) {\n this._mesh_variant_key.transform_positive_determinant = determinant3x3(this.babylon_instance.getWorldMatrix().m) >= 0.0;\n }\n if (this._has_last_rendering_material && this._last_rendering_material !== rendering_material) {\n this.rendering_material_changed_observable.notify(this, rendering_material);\n }\n this._last_rendering_material = rendering_material;\n this._has_last_rendering_material = true;\n this.source.update_source_mesh_key_for_instance(this);\n this.update_material_color_roughness_factor_feature_enabled();\n }\n }\n get mesh_variant_key() {\n return this._mesh_variant_key;\n }\n mark_variant_key_dirty() {\n this._mesh_variant_key_is_dirty = true;\n this.source.viewer.mark_scene_dirty();\n }\n set_color_roughness_factor(factor) {\n if (IVector4.equals_with_epsilon(factor, this._color_roughness_factor, 0.001)) {\n return;\n }\n this._color_roughness_factor.copyFromFloats(factor.x, factor.y, factor.z, factor.w);\n this.source.viewer.mark_scene_dirty();\n this.update_material_color_roughness_factor_feature_enabled();\n }\n update_material_color_roughness_factor_feature_enabled() {\n const material = this.get_active_material();\n if (material !== null && material instanceof ViewerMaterial) {\n if (!material.enable_albedo_roughness_factor && !IVector4.equals_with_epsilon(this._color_roughness_factor, _TMP_ONE4, 0.01)) {\n material.enable_albedo_roughness_factor = true;\n }\n }\n }\n load_unique_vertex_source_data() {\n if (this._mesh_variant_key.unique_source_vertex_data_id === null) {\n this._mesh_variant_key.unique_source_vertex_data_id = unique_vertex_data_id_counter++;\n this.mark_variant_key_dirty();\n this.prepare_for_render();\n }\n return this.babylon_instance.sourceMesh;\n }\n unload_unique_vertex_source_data() {\n if (this._mesh_variant_key.unique_source_vertex_data_id !== null) {\n this._mesh_variant_key.unique_source_vertex_data_id = null;\n this.mark_variant_key_dirty();\n }\n }\n}\n//# sourceMappingURL=SceneAssetMeshInstance.js.map","import { Mesh as BABYLON_Mesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js';\nimport { AbstractMesh as BABYLON_AbstractMesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/abstractMesh.js';\nimport { TransformNode as BABYLON_TransformNode } from '@inter-ikea-betrakta-babylonjs/core/Meshes/transformNode.js';\nimport { AssetContainer as BABYLON_AssetContainer } from '@inter-ikea-betrakta-babylonjs/core/assetContainer.js';\nimport { RenderingGroupID } from '../Viewer.js';\nimport { SceneAssetMesh } from './SceneAssetMesh.js';\nimport { SceneAssetMeshInstance } from './SceneAssetMeshInstance.js';\nimport { Camera as BABYLON_Camera } from '@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js';\nimport { InstancedMesh as BABYLON_InstancedMesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/instancedMesh.js';\nimport { Vector3 as BABYLON_Vector3, Quaternion as BABYLON_Quaternion } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nexport class SceneAssetContainer {\n constructor(viewer, babylon_container) {\n this.meshes = [];\n this.mesh_node_to_scene_mesh = new WeakMap();\n this.flattened_instances = [];\n this.babylon_container = babylon_container;\n this.iterate_meshes((mesh) => {\n mesh.renderingGroupId = RenderingGroupID.DEFAULT_RENDERING_GROUP;\n if (mesh instanceof BABYLON_Mesh) {\n const instance_mesh = new SceneAssetMesh(viewer, mesh);\n this.meshes.push(instance_mesh);\n this.mesh_node_to_scene_mesh.set(mesh, instance_mesh);\n }\n });\n this.iterate_meshes((mesh) => {\n if (mesh instanceof BABYLON_Mesh || mesh instanceof BABYLON_InstancedMesh) {\n const source_mesh = (mesh instanceof BABYLON_Mesh) ? mesh : mesh.sourceMesh;\n if (source_mesh.geometry === null)\n return;\n const asset_mesh = this.mesh_node_to_scene_mesh.get(source_mesh);\n const instance = {\n position: new BABYLON_Vector3(),\n scale: new BABYLON_Vector3(),\n rotation: new BABYLON_Quaternion(),\n mesh: asset_mesh\n };\n const flattened_transform = mesh.computeWorldMatrix(true);\n flattened_transform.decompose(instance.scale, instance.rotation, instance.position);\n this.flattened_instances.push(instance);\n }\n });\n this.iterate_asset_container_root_nodes((root) => {\n root.setEnabled(false);\n });\n }\n iterate_asset_container_root_nodes(func) {\n if (Array.isArray(this.babylon_container)) {\n this.babylon_container.forEach(func);\n }\n else {\n this.babylon_container.rootNodes.forEach(func);\n }\n }\n get_container_materials() {\n if (Array.isArray(this.babylon_container)) {\n const materials_set = new Set();\n this.iterate_meshes((mesh) => {\n if (mesh.material !== null) {\n materials_set.add(mesh.material);\n }\n });\n const materials = [];\n materials_set.forEach((material) => materials.push(material));\n return materials;\n }\n else {\n return this.babylon_container.materials;\n }\n }\n iterate_meshes(func) {\n this.iterate_asset_container_root_nodes((root_node) => {\n const meshes = root_node.getChildMeshes(false);\n if (root_node instanceof BABYLON_AbstractMesh) {\n func(root_node);\n }\n meshes.forEach(func);\n });\n }\n sync_instance(instance, flatten) {\n instance.dispose_mesh();\n instance.animation_groups = null;\n const created_asset_mesh_instances = [];\n if (this.babylon_container !== null) {\n if (flatten) {\n this.flattened_instances.forEach((source_instance) => {\n const mesh_instance = new SceneAssetMeshInstance(source_instance.mesh, instance.metadata);\n mesh_instance.babylon_instance.position.copyFrom(source_instance.position);\n mesh_instance.babylon_instance.scaling.copyFrom(source_instance.scale);\n mesh_instance.babylon_instance.rotationQuaternion = source_instance.rotation.clone();\n mesh_instance.babylon_instance.parent = instance.asset_root;\n created_asset_mesh_instances.push(mesh_instance);\n });\n }\n else {\n const source_to_instance_map = new Map();\n this.iterate_asset_container_root_nodes((root) => {\n const all_children = root.getChildren(undefined, false);\n const new_root = this.clone_babylon_node_for_asset_instance(root, created_asset_mesh_instances, instance);\n new_root.parent = instance.asset_root;\n source_to_instance_map.set(root, new_root);\n all_children.forEach((child_node) => {\n const clone = this.clone_babylon_node_for_asset_instance(child_node, created_asset_mesh_instances, instance);\n source_to_instance_map.set(child_node, clone);\n });\n // Assign new parents\n source_to_instance_map.forEach((new_node, source_node) => {\n new_node.setEnabled(true);\n new_node.markAsDirty('');\n if (source_node.parent !== null) {\n const found_parent = source_to_instance_map.get(source_node.parent);\n if (found_parent === undefined) {\n throw new Error('Illegal parent found.');\n }\n new_node.parent = found_parent;\n }\n else {\n new_node.parent = instance.asset_root;\n }\n });\n });\n if (this.babylon_container instanceof BABYLON_AssetContainer) {\n // Clone the animation groups and remap the target nodes.\n const animation_groups = this.babylon_container.animationGroups.map(animation_group => {\n const new_animation_group = animation_group.clone(animation_group.name, (old) => {\n const new_node = source_to_instance_map.get(old);\n return new_node;\n });\n return new_animation_group;\n });\n instance.animation_groups = animation_groups;\n }\n }\n }\n instance.on_new_meshes(created_asset_mesh_instances);\n }\n has_animations() {\n return this.babylon_container instanceof BABYLON_AssetContainer && this.babylon_container.animationGroups.length > 0;\n }\n clone_babylon_node_for_asset_instance(source_node, created_asset_mesh_instances, scene_asset_instance) {\n let clone;\n if (source_node instanceof BABYLON_Mesh) {\n if (source_node.geometry === null) {\n return new BABYLON_TransformNode('empty mesh placeholder', source_node._scene);\n }\n const asset_mesh = this.mesh_node_to_scene_mesh.get(source_node);\n if (asset_mesh === undefined) {\n console.error('Internal error: missing asset mesh with name ' + source_node.name);\n return new BABYLON_TransformNode('missing mesh placeholder', source_node._scene);\n }\n const asset_mesh_instance = new SceneAssetMeshInstance(asset_mesh, scene_asset_instance.metadata);\n asset_mesh_instance.babylon_instance.parent = null;\n asset_mesh_instance.babylon_instance.position = source_node.position.clone();\n asset_mesh_instance.babylon_instance.scaling = source_node.scaling.clone();\n if (source_node.rotationQuaternion !== null) {\n asset_mesh_instance.babylon_instance.rotationQuaternion = source_node.rotationQuaternion.clone();\n }\n else {\n asset_mesh_instance.babylon_instance.rotationQuaternion = source_node.rotation.toQuaternion();\n }\n asset_mesh_instance.babylon_instance.scalingDeterminant = source_node.scalingDeterminant;\n created_asset_mesh_instances.push(asset_mesh_instance);\n return asset_mesh_instance.babylon_instance;\n }\n else if (source_node instanceof BABYLON_InstancedMesh) {\n const asset_mesh = this.mesh_node_to_scene_mesh.get(source_node.sourceMesh);\n if (asset_mesh === undefined) {\n console.error('missing instance asset mesh: ' + source_node.name);\n return new BABYLON_TransformNode('missing mesh placeholder', source_node._scene);\n }\n const asset_mesh_instance = new SceneAssetMeshInstance(asset_mesh, scene_asset_instance.metadata);\n asset_mesh_instance.babylon_instance.parent = null;\n asset_mesh_instance.babylon_instance.position = source_node.position.clone();\n asset_mesh_instance.babylon_instance.scaling = source_node.scaling.clone();\n if (source_node.rotationQuaternion !== null) {\n asset_mesh_instance.babylon_instance.rotationQuaternion = source_node.rotationQuaternion.clone();\n }\n else {\n asset_mesh_instance.babylon_instance.rotationQuaternion = source_node.rotation.toQuaternion();\n }\n asset_mesh_instance.babylon_instance.scalingDeterminant = source_node.scalingDeterminant;\n asset_mesh_instance.mark_variant_key_dirty();\n created_asset_mesh_instances.push(asset_mesh_instance);\n return asset_mesh_instance.babylon_instance;\n }\n else if (source_node instanceof BABYLON_AbstractMesh) {\n console.error('Unexpected mesh type: ' + source_node.name + '(' + source_node.getClassName() + ')');\n clone = source_node.clone('bad mesh type placeholder', null, true);\n }\n else if (source_node instanceof BABYLON_TransformNode) {\n clone = source_node.clone('transform clone', null, true);\n }\n else if (source_node instanceof BABYLON_Camera) {\n return new BABYLON_TransformNode('camera placeholder', source_node._scene);\n }\n else {\n console.error('Unexpected babylon node type: ' + source_node.getClassName());\n clone = new BABYLON_TransformNode('unknown node placeholder', source_node._scene);\n }\n if (clone === null) {\n clone = new BABYLON_TransformNode('failed clone placeholder', source_node._scene);\n }\n return clone;\n }\n dispose() {\n this.meshes.forEach((mesh) => {\n mesh.dispose();\n });\n this.flattened_instances.length = 0;\n if (Array.isArray(this.babylon_container)) {\n this.babylon_container.forEach((mesh) => {\n mesh.dispose(true, false);\n });\n this.babylon_container.length = 0;\n }\n else {\n this.babylon_container.dispose();\n }\n }\n}\n//# sourceMappingURL=SceneAssetContainer.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { SceneLoader as BABYLON_SceneLoader } from '@inter-ikea-betrakta-babylonjs/core/Loading/sceneLoader.js';\nimport { SceneAssetInstance } from './SceneAssetInstance.js';\nimport { SceneAssetContainer } from './SceneAssetContainer.js';\nexport class SceneAsset {\n constructor(scene) {\n this._asset_container = null;\n this._instances = [];\n this._asset_generation = 0;\n // Custom promise setup. Just using a regular promise doesn't really work with multiple users.\n this._current_loading_promise = null;\n this._current_loading_promise_failed = false;\n this.scene = scene;\n }\n load_meshes(meshes) {\n this._asset_generation++;\n this._asset_container = new SceneAssetContainer(this.scene.viewer, meshes);\n this.update_instances();\n }\n load_mesh_from_url_internal(url, extension) {\n return __awaiter(this, void 0, void 0, function* () {\n // Increment generation and store the current generation\n this._asset_generation++;\n const generation_at_load_request = this._asset_generation;\n const asset_path = url.split('/');\n const asset_file = asset_path.pop();\n try {\n const loaded_asset = yield BABYLON_SceneLoader.LoadAssetContainerAsync(asset_path.join('/') + '/', asset_file, this.scene.babylon_scene, null, extension);\n // After await, if the generation we got when starting this function doesn't match up, disregard\n if (this._asset_generation !== generation_at_load_request) {\n loaded_asset.dispose();\n return;\n }\n this._asset_container = new SceneAssetContainer(this.scene.viewer, loaded_asset);\n this.update_instances();\n this.scene.viewer.mark_scene_dirty();\n this._current_loading_promise_failed = false;\n this._current_loading_promise_error = null;\n }\n catch (error) {\n this._current_loading_promise_error = error;\n this._current_loading_promise_failed = true;\n }\n });\n }\n load_mesh_from_url(url, extension) {\n return __awaiter(this, void 0, void 0, function* () {\n this._current_loading_promise = this.load_mesh_from_url_internal(url, extension);\n return this._current_loading_promise;\n });\n }\n get_loaded_promise() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._current_loading_promise === null)\n return Promise.resolve();\n yield this._current_loading_promise;\n if (this._current_loading_promise_failed) {\n return Promise.reject(this._current_loading_promise_error);\n }\n else {\n return Promise.resolve();\n }\n });\n }\n update_instances() {\n if (this._asset_container) {\n this._instances.forEach((instance) => this._asset_container.sync_instance(instance, this.use_flattened_gltfs));\n }\n }\n instance_disposed(instance) {\n const index = this._instances.indexOf(instance);\n if (index >= 0) {\n this._instances.splice(index, 1);\n }\n }\n dispose() {\n var _a;\n this._instances.forEach((instance) => {\n instance.dispose_mesh();\n });\n (_a = this._asset_container) === null || _a === void 0 ? void 0 : _a.dispose();\n this._asset_container = null;\n }\n /**\n * Creates a new instance of this SceneAsset which will be displayed in the scene.\n * @returns The created SceneAssetInstance\n */\n create_instance(model_transform) {\n var _a;\n const instance = new SceneAssetInstance(this.scene, this, model_transform);\n (_a = this._asset_container) === null || _a === void 0 ? void 0 : _a.sync_instance(instance, this.use_flattened_gltfs);\n this._instances.push(instance);\n return instance;\n }\n /**\n * @returns The number of instances of this SceneAsset that are in the scene\n */\n get_instance_count() {\n return this._instances.length;\n }\n /**\n * The container which holds the currently loaded source data (such as geometry, materials, etc) for this asset\n */\n get asset_container() {\n return this._asset_container;\n }\n get use_flattened_gltfs() {\n var _a;\n if ((_a = this._asset_container) === null || _a === void 0 ? void 0 : _a.has_animations()) {\n return false;\n }\n else {\n return true;\n }\n }\n}\n//# sourceMappingURL=SceneAsset.js.map","/**\n * An enum describing if and how a cached asset should be disposed when it's no longer in use.\n */\nexport var SceneAssetCachePurgeMode;\n(function (SceneAssetCachePurgeMode) {\n /**\n * Disable automatic deleting altogether (historically called persistent load in the API)\n */\n SceneAssetCachePurgeMode[SceneAssetCachePurgeMode[\"DISABLED\"] = 0] = \"DISABLED\";\n /**\n * Delayed deletion means there is a grace period decided by 'SceneAssetCache.ASSET_CACHE_PURGE_GRACE_PERIOD_SECONDS'\n * during which the asset will not be purged/disposed when being unused.\n * This allows users to delete the last instance of an asset and re-load it within a few frames.\n */\n SceneAssetCachePurgeMode[SceneAssetCachePurgeMode[\"DELAYED\"] = 1] = \"DELAYED\";\n /**\n * Instant delay means that as soon as the asset is unused, we delete it instantly if it's unused.\n * This is useful for things like custom meshes that a user can't possibly re-create if all of their instances have been removed.\n */\n SceneAssetCachePurgeMode[SceneAssetCachePurgeMode[\"INSTANT\"] = 2] = \"INSTANT\";\n})(SceneAssetCachePurgeMode || (SceneAssetCachePurgeMode = {}));\n/**\n * SceneAssetCache takes ownership of SceneAssets to allow caching for easier re-use between SceneAssetInstances.\n * It can also automatically dispose unused SceneAssets, if they've been unused and automatic deletion has been enabled for the asset.\n */\nexport class SceneAssetCache {\n constructor(scene) {\n this._url_to_asset = new Map();\n this.scene = scene;\n }\n get_cached_asset(url) {\n if (this._url_to_asset.has(url)) {\n return this._url_to_asset.get(url).asset;\n }\n else {\n return null;\n }\n }\n /**\n * Adds a scene asset to cache, and takes effective ownership of the asset.\n * @param url The 'url' of the asset, this is the key used identifying this asset in the cache.\n * @param asset The asset to cache.\n * @param purge_mode An enum describing which purge behaviour in the cache the asset should follow when no longer in use\n */\n add_to_cache(url, asset, purge_mode) {\n if (this._url_to_asset.has(url)) {\n throw new Error('SceneAssetCache already has URL: ' + url);\n }\n this._url_to_asset.set(url, {\n asset: asset,\n seconds_since_instances: 0.0,\n purge_mode: purge_mode\n });\n }\n set_asset_purge_mode(url, purge_mode) {\n if (this._url_to_asset.has(url)) {\n this._url_to_asset.get(url).purge_mode = purge_mode;\n }\n }\n get_asset_purge_mode(url) {\n if (this._url_to_asset.has(url)) {\n return this._url_to_asset.get(url).purge_mode;\n }\n else {\n return null;\n }\n }\n update_cache(dt) {\n this._url_to_asset.forEach((entry, url) => {\n if (entry.asset.get_instance_count() === 0 && entry.purge_mode !== SceneAssetCachePurgeMode.DISABLED) {\n if (entry.purge_mode === SceneAssetCachePurgeMode.INSTANT || (entry.purge_mode === SceneAssetCachePurgeMode.DELAYED && entry.seconds_since_instances >= SceneAssetCache.ASSET_CACHE_PURGE_GRACE_PERIOD_SECONDS)) {\n this.unload_from_cache(url);\n }\n else {\n entry.seconds_since_instances += dt.seconds;\n }\n }\n else {\n entry.seconds_since_instances = 0.0;\n }\n });\n }\n unload_from_cache(url) {\n if (!this._url_to_asset.has(url))\n return false;\n const entry = this._url_to_asset.get(url);\n if (entry.asset.get_instance_count() !== 0) {\n console.error('Unloading model in use by one or more object(s), unspecified behaviour may follow. Url of model: ' + url);\n }\n entry.asset.dispose();\n this._url_to_asset.delete(url);\n return true;\n }\n dispose() {\n this._url_to_asset.forEach((entry) => {\n entry.asset.dispose();\n });\n this._url_to_asset.clear();\n }\n}\nSceneAssetCache.ASSET_CACHE_PURGE_GRACE_PERIOD_SECONDS = 3;\n//# sourceMappingURL=SceneAssetCache.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { SceneAsset } from './SceneAsset.js';\nimport { SceneObject } from '../SceneObject.js';\nimport { AssetCollection } from '../../AssetCollection.js';\nimport { SceneAssetCache, SceneAssetCachePurgeMode } from './SceneAssetCache.js';\nimport { Observable } from '../../Observable.js';\nimport { uuidv4 } from '../../uuidv4.js';\nimport { Logger, LoggingCategory } from '../../logging/Logger.js';\nfunction get_cache_url(url, _extension) {\n return url;\n}\nexport class ViewerScene {\n constructor(viewer, babylon_scene) {\n this.objects = new AssetCollection();\n this.object_changed_observable = new Observable();\n this.object_removed_observable = new Observable();\n this._instanced_mesh_metadata_map = new WeakMap();\n this.viewer = viewer;\n this.babylon_scene = babylon_scene;\n this._asset_cache = new SceneAssetCache(this);\n }\n create_object(asset, name, model_transform) {\n const instance = asset === null ? null : (asset instanceof SceneAsset ? asset.create_instance(model_transform) : asset);\n const object = new SceneObject(instance, this.objects.next_id(), this.viewer, this, asset === null);\n if (instance) {\n instance.metadata.owner = object;\n }\n this.objects.add(object);\n object.name = name + ' (id: ' + object.id + ')';\n if (instance !== null) {\n object.ready = instance.asset.get_loaded_promise();\n }\n else {\n object.ready = Promise.resolve();\n }\n object.disposed_observable.add_once(() => {\n this.object_removed_observable.notify(this, object);\n });\n return object;\n }\n delete_object(object, delete_children) {\n object.dispose(delete_children);\n }\n preload_model_and_mark_persistent(url, extension) {\n return __awaiter(this, void 0, void 0, function* () {\n const cache_url = get_cache_url(url, extension);\n const cached_asset = this._asset_cache.get_cached_asset(cache_url);\n if (cached_asset !== null) {\n yield cached_asset.get_loaded_promise();\n return cached_asset;\n }\n else {\n const asset = new SceneAsset(this);\n this._asset_cache.add_to_cache(cache_url, asset, SceneAssetCachePurgeMode.DISABLED);\n yield asset.load_mesh_from_url(url, extension);\n return asset;\n }\n });\n }\n remove_persistent_marking(url, extension) {\n const cache_url = get_cache_url(url, extension);\n const cached_asset = this._asset_cache.get_cached_asset(cache_url);\n if (cached_asset !== null) {\n if (this.viewer.get_config().verbose_warnings) {\n console.warn(\"Can't remove persistent marking from model, does not exist in cache: \" + cache_url);\n }\n return;\n }\n this._asset_cache.set_asset_purge_mode(url, SceneAssetCachePurgeMode.DELAYED);\n }\n has_persistent_marking(url, extension) {\n const purge_mode = this._asset_cache.get_asset_purge_mode(get_cache_url(url, extension));\n return purge_mode !== null && purge_mode === SceneAssetCachePurgeMode.DISABLED;\n }\n unload_model(url, extension) {\n const cache_url = get_cache_url(url, extension);\n const unloaded = this._asset_cache.unload_from_cache(cache_url);\n if (!unloaded && this.viewer.get_config().verbose_warnings) {\n console.warn('Tried to unload url not present in model cache: ' + cache_url);\n }\n }\n load_mesh(meshes) {\n const asset = new SceneAsset(this);\n asset.load_meshes(meshes);\n const object = this.create_object(asset, 'custom meshes', null);\n // To make sure the asset gets disposed, we actually add it to the cache (with a unique id), and let the cache delete it when its out of users.\n // Unfortunately, it's not enough to dispose on the object's dispose observable as it may have been cloned.\n const cache_url = 'custom_mesh: ' + uuidv4();\n this._asset_cache.add_to_cache(cache_url, asset, SceneAssetCachePurgeMode.INSTANT);\n return object;\n }\n load_model(url, extension, model_transform) {\n const cache_url = get_cache_url(url, extension);\n const cached_asset = this._asset_cache.get_cached_asset(cache_url);\n let asset;\n if (cached_asset === null) {\n const new_asset = new SceneAsset(this);\n new_asset.load_mesh_from_url(url, extension);\n this._asset_cache.add_to_cache(cache_url, new_asset, SceneAssetCachePurgeMode.DELAYED);\n asset = new_asset;\n }\n else {\n asset = cached_asset;\n }\n const filename = url.substring(url.lastIndexOf('/') + 1);\n return this.create_object(asset, filename, model_transform !== null && model_transform !== void 0 ? model_transform : null);\n }\n get_metadata_from_babylon_mesh(mesh) {\n var _a;\n return (_a = this._instanced_mesh_metadata_map.get(mesh)) !== null && _a !== void 0 ? _a : null;\n }\n assign_metadata_to_babylon_mesh(mesh, metadata) {\n if (this._instanced_mesh_metadata_map.has(mesh)) {\n Logger.as(LoggingCategory.METADATA).error('Trying to assign metadata to the same babylon mesh multiple times');\n return;\n }\n this._instanced_mesh_metadata_map.set(mesh, metadata);\n }\n mark_dirty() {\n this.viewer.mark_scene_dirty();\n }\n get_objects(object_ids) {\n return object_ids.map(id => { return this.objects.get(id); });\n }\n update_source_mesh_keys() {\n this.objects.forEach((object) => {\n var _a;\n (_a = object._asset_instance) === null || _a === void 0 ? void 0 : _a.prepare_for_render();\n });\n }\n update(dt) {\n this._asset_cache.update_cache(dt);\n }\n dispose() {\n this._asset_cache.dispose();\n }\n}\n//# sourceMappingURL=ViewerScene.js.map","/**\n * Wrapper class for promise with external resolve and reject.\n */\nexport class Deferred {\n /**\n * The resolve method of the promise associated with this deferred object.\n */\n get resolve() {\n return this._resolve;\n }\n /**\n * The reject method of the promise associated with this deferred object.\n */\n get reject() {\n return this._reject;\n }\n /**\n * Constructor for this deferred object.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n}\n//# sourceMappingURL=deferred.js.map","import { Bone } from \"./bone.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { Vector3, Matrix, TmpVectors } from \"../Maths/math.vector.js\";\nimport { RawTexture } from \"../Materials/Textures/rawTexture.js\";\nimport { Animation } from \"../Animations/animation.js\";\nimport { AnimationRange } from \"../Animations/animationRange.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\n\nimport { Logger } from \"../Misc/logger.js\";\nimport { DeepCopier } from \"../Misc/deepCopier.js\";\n/**\n * Class used to handle skinning animations\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons\n */\nexport class Skeleton {\n /**\n * Gets or sets a boolean indicating that bone matrices should be stored as a texture instead of using shader uniforms (default is true).\n * Please note that this option is not available if the hardware does not support it\n */\n get useTextureToStoreBoneMatrices() {\n return this._useTextureToStoreBoneMatrices;\n }\n set useTextureToStoreBoneMatrices(value) {\n this._useTextureToStoreBoneMatrices = value;\n this._markAsDirty();\n }\n /**\n * Gets or sets the animation properties override\n */\n get animationPropertiesOverride() {\n if (!this._animationPropertiesOverride) {\n return this._scene.animationPropertiesOverride;\n }\n return this._animationPropertiesOverride;\n }\n set animationPropertiesOverride(value) {\n this._animationPropertiesOverride = value;\n }\n /**\n * Gets a boolean indicating that the skeleton effectively stores matrices into a texture\n */\n get isUsingTextureForMatrices() {\n return this.useTextureToStoreBoneMatrices && this._canUseTextureForBones;\n }\n /**\n * Gets the unique ID of this skeleton\n */\n get uniqueId() {\n return this._uniqueId;\n }\n /**\n * Creates a new skeleton\n * @param name defines the skeleton name\n * @param id defines the skeleton Id\n * @param scene defines the hosting scene\n */\n constructor(\n /** defines the skeleton name */\n name, \n /** defines the skeleton Id */\n id, scene) {\n this.name = name;\n this.id = id;\n /**\n * Defines the list of child bones\n */\n this.bones = [];\n /**\n * Defines a boolean indicating if the root matrix is provided by meshes or by the current skeleton (this is the default value)\n */\n this.needInitialSkinMatrix = false;\n this._isDirty = true;\n this._meshesWithPoseMatrix = new Array();\n this._identity = Matrix.Identity();\n this._currentRenderId = -1;\n this._ranges = {};\n this._absoluteTransformIsDirty = true;\n this._canUseTextureForBones = false;\n this._uniqueId = 0;\n /** @internal */\n this._numBonesWithLinkedTransformNode = 0;\n /** @internal */\n this._hasWaitingData = null;\n /** @internal */\n this._parentContainer = null;\n /**\n * Specifies if the skeleton should be serialized\n */\n this.doNotSerialize = false;\n this._useTextureToStoreBoneMatrices = true;\n this._animationPropertiesOverride = null;\n // Events\n /**\n * An observable triggered before computing the skeleton's matrices\n */\n this.onBeforeComputeObservable = new Observable();\n this.bones = [];\n this._scene = scene || EngineStore.LastCreatedScene;\n this._uniqueId = this._scene.getUniqueId();\n this._scene.addSkeleton(this);\n //make sure it will recalculate the matrix next time prepare is called.\n this._isDirty = true;\n const engineCaps = this._scene.getEngine().getCaps();\n this._canUseTextureForBones = engineCaps.textureFloat && engineCaps.maxVertexTextureImageUnits > 0;\n }\n /**\n * Gets the current object class name.\n * @returns the class name\n */\n getClassName() {\n return \"Skeleton\";\n }\n /**\n * Returns an array containing the root bones\n * @returns an array containing the root bones\n */\n getChildren() {\n return this.bones.filter((b) => !b.getParent());\n }\n // Members\n /**\n * Gets the list of transform matrices to send to shaders (one matrix per bone)\n * @param mesh defines the mesh to use to get the root matrix (if needInitialSkinMatrix === true)\n * @returns a Float32Array containing matrices data\n */\n getTransformMatrices(mesh) {\n if (this.needInitialSkinMatrix) {\n if (!mesh._bonesTransformMatrices) {\n this.prepare();\n }\n return mesh._bonesTransformMatrices;\n }\n if (!this._transformMatrices || this._isDirty) {\n this.prepare();\n }\n return this._transformMatrices;\n }\n /**\n * Gets the list of transform matrices to send to shaders inside a texture (one matrix per bone)\n * @param mesh defines the mesh to use to get the root matrix (if needInitialSkinMatrix === true)\n * @returns a raw texture containing the data\n */\n getTransformMatrixTexture(mesh) {\n if (this.needInitialSkinMatrix && mesh._transformMatrixTexture) {\n return mesh._transformMatrixTexture;\n }\n return this._transformMatrixTexture;\n }\n /**\n * Gets the current hosting scene\n * @returns a scene object\n */\n getScene() {\n return this._scene;\n }\n // Methods\n /**\n * Gets a string representing the current skeleton data\n * @param fullDetails defines a boolean indicating if we want a verbose version\n * @returns a string representing the current skeleton data\n */\n toString(fullDetails) {\n let ret = `Name: ${this.name}, nBones: ${this.bones.length}`;\n ret += `, nAnimationRanges: ${this._ranges ? Object.keys(this._ranges).length : \"none\"}`;\n if (fullDetails) {\n ret += \", Ranges: {\";\n let first = true;\n for (const name in this._ranges) {\n if (first) {\n ret += \", \";\n first = false;\n }\n ret += name;\n }\n ret += \"}\";\n }\n return ret;\n }\n /**\n * Get bone's index searching by name\n * @param name defines bone's name to search for\n * @returns the indice of the bone. Returns -1 if not found\n */\n getBoneIndexByName(name) {\n for (let boneIndex = 0, cache = this.bones.length; boneIndex < cache; boneIndex++) {\n if (this.bones[boneIndex].name === name) {\n return boneIndex;\n }\n }\n return -1;\n }\n /**\n * Create a new animation range\n * @param name defines the name of the range\n * @param from defines the start key\n * @param to defines the end key\n */\n createAnimationRange(name, from, to) {\n // check name not already in use\n if (!this._ranges[name]) {\n this._ranges[name] = new AnimationRange(name, from, to);\n for (let i = 0, nBones = this.bones.length; i < nBones; i++) {\n if (this.bones[i].animations[0]) {\n this.bones[i].animations[0].createRange(name, from, to);\n }\n }\n }\n }\n /**\n * Delete a specific animation range\n * @param name defines the name of the range\n * @param deleteFrames defines if frames must be removed as well\n */\n deleteAnimationRange(name, deleteFrames = true) {\n for (let i = 0, nBones = this.bones.length; i < nBones; i++) {\n if (this.bones[i].animations[0]) {\n this.bones[i].animations[0].deleteRange(name, deleteFrames);\n }\n }\n this._ranges[name] = null; // said much faster than 'delete this._range[name]'\n }\n /**\n * Gets a specific animation range\n * @param name defines the name of the range to look for\n * @returns the requested animation range or null if not found\n */\n getAnimationRange(name) {\n return this._ranges[name] || null;\n }\n /**\n * Gets the list of all animation ranges defined on this skeleton\n * @returns an array\n */\n getAnimationRanges() {\n const animationRanges = [];\n let name;\n for (name in this._ranges) {\n animationRanges.push(this._ranges[name]);\n }\n return animationRanges;\n }\n /**\n * Copy animation range from a source skeleton.\n * This is not for a complete retargeting, only between very similar skeleton's with only possible bone length differences\n * @param source defines the source skeleton\n * @param name defines the name of the range to copy\n * @param rescaleAsRequired defines if rescaling must be applied if required\n * @returns true if operation was successful\n */\n copyAnimationRange(source, name, rescaleAsRequired = false) {\n if (this._ranges[name] || !source.getAnimationRange(name)) {\n return false;\n }\n let ret = true;\n const frameOffset = this._getHighestAnimationFrame() + 1;\n // make a dictionary of source skeleton's bones, so exact same order or doubly nested loop is not required\n const boneDict = {};\n const sourceBones = source.bones;\n let nBones;\n let i;\n for (i = 0, nBones = sourceBones.length; i < nBones; i++) {\n boneDict[sourceBones[i].name] = sourceBones[i];\n }\n if (this.bones.length !== sourceBones.length) {\n Logger.Warn(`copyAnimationRange: this rig has ${this.bones.length} bones, while source as ${sourceBones.length}`);\n ret = false;\n }\n const skelDimensionsRatio = rescaleAsRequired && this.dimensionsAtRest && source.dimensionsAtRest ? this.dimensionsAtRest.divide(source.dimensionsAtRest) : null;\n for (i = 0, nBones = this.bones.length; i < nBones; i++) {\n const boneName = this.bones[i].name;\n const sourceBone = boneDict[boneName];\n if (sourceBone) {\n ret = ret && this.bones[i].copyAnimationRange(sourceBone, name, frameOffset, rescaleAsRequired, skelDimensionsRatio);\n }\n else {\n Logger.Warn(\"copyAnimationRange: not same rig, missing source bone \" + boneName);\n ret = false;\n }\n }\n // do not call createAnimationRange(), since it also is done to bones, which was already done\n const range = source.getAnimationRange(name);\n if (range) {\n this._ranges[name] = new AnimationRange(name, range.from + frameOffset, range.to + frameOffset);\n }\n return ret;\n }\n /**\n * Forces the skeleton to go to rest pose\n */\n returnToRest() {\n for (const bone of this.bones) {\n if (bone._index !== -1) {\n bone.returnToRest();\n }\n }\n }\n _getHighestAnimationFrame() {\n let ret = 0;\n for (let i = 0, nBones = this.bones.length; i < nBones; i++) {\n if (this.bones[i].animations[0]) {\n const highest = this.bones[i].animations[0].getHighestFrame();\n if (ret < highest) {\n ret = highest;\n }\n }\n }\n return ret;\n }\n /**\n * Begin a specific animation range\n * @param name defines the name of the range to start\n * @param loop defines if looping must be turned on (false by default)\n * @param speedRatio defines the speed ratio to apply (1 by default)\n * @param onAnimationEnd defines a callback which will be called when animation will end\n * @returns a new animatable\n */\n beginAnimation(name, loop, speedRatio, onAnimationEnd) {\n const range = this.getAnimationRange(name);\n if (!range) {\n return null;\n }\n return this._scene.beginAnimation(this, range.from, range.to, loop, speedRatio, onAnimationEnd);\n }\n /**\n * Convert the keyframes for a range of animation on a skeleton to be relative to a given reference frame.\n * @param skeleton defines the Skeleton containing the animation range to convert\n * @param referenceFrame defines the frame that keyframes in the range will be relative to\n * @param range defines the name of the AnimationRange belonging to the Skeleton to convert\n * @returns the original skeleton\n */\n static MakeAnimationAdditive(skeleton, referenceFrame = 0, range) {\n const rangeValue = skeleton.getAnimationRange(range);\n // We can't make a range additive if it doesn't exist\n if (!rangeValue) {\n return null;\n }\n // Find any current scene-level animatable belonging to the target that matches the range\n const sceneAnimatables = skeleton._scene.getAllAnimatablesByTarget(skeleton);\n let rangeAnimatable = null;\n for (let index = 0; index < sceneAnimatables.length; index++) {\n const sceneAnimatable = sceneAnimatables[index];\n if (sceneAnimatable.fromFrame === (rangeValue === null || rangeValue === void 0 ? void 0 : rangeValue.from) && sceneAnimatable.toFrame === (rangeValue === null || rangeValue === void 0 ? void 0 : rangeValue.to)) {\n rangeAnimatable = sceneAnimatable;\n break;\n }\n }\n // Convert the animations belonging to the skeleton to additive keyframes\n const animatables = skeleton.getAnimatables();\n for (let index = 0; index < animatables.length; index++) {\n const animatable = animatables[index];\n const animations = animatable.animations;\n if (!animations) {\n continue;\n }\n for (let animIndex = 0; animIndex < animations.length; animIndex++) {\n Animation.MakeAnimationAdditive(animations[animIndex], referenceFrame, range);\n }\n }\n // Mark the scene-level animatable as additive\n if (rangeAnimatable) {\n rangeAnimatable.isAdditive = true;\n }\n return skeleton;\n }\n /** @internal */\n _markAsDirty() {\n this._isDirty = true;\n this._absoluteTransformIsDirty = true;\n }\n /**\n * @internal\n */\n _registerMeshWithPoseMatrix(mesh) {\n this._meshesWithPoseMatrix.push(mesh);\n }\n /**\n * @internal\n */\n _unregisterMeshWithPoseMatrix(mesh) {\n const index = this._meshesWithPoseMatrix.indexOf(mesh);\n if (index > -1) {\n this._meshesWithPoseMatrix.splice(index, 1);\n }\n }\n _computeTransformMatrices(targetMatrix, initialSkinMatrix) {\n this.onBeforeComputeObservable.notifyObservers(this);\n for (let index = 0; index < this.bones.length; index++) {\n const bone = this.bones[index];\n bone._childUpdateId++;\n const parentBone = bone.getParent();\n if (parentBone) {\n bone.getLocalMatrix().multiplyToRef(parentBone.getFinalMatrix(), bone.getFinalMatrix());\n }\n else {\n if (initialSkinMatrix) {\n bone.getLocalMatrix().multiplyToRef(initialSkinMatrix, bone.getFinalMatrix());\n }\n else {\n bone.getFinalMatrix().copyFrom(bone.getLocalMatrix());\n }\n }\n if (bone._index !== -1) {\n const mappedIndex = bone._index === null ? index : bone._index;\n bone.getAbsoluteInverseBindMatrix().multiplyToArray(bone.getFinalMatrix(), targetMatrix, mappedIndex * 16);\n }\n }\n this._identity.copyToArray(targetMatrix, this.bones.length * 16);\n }\n /**\n * Build all resources required to render a skeleton\n * @param dontCheckFrameId defines a boolean indicating if prepare should be run without checking first the current frame id (default: false)\n */\n prepare(dontCheckFrameId = false) {\n if (!dontCheckFrameId) {\n const currentRenderId = this.getScene().getRenderId();\n if (this._currentRenderId === currentRenderId) {\n return;\n }\n this._currentRenderId = currentRenderId;\n }\n // Update the local matrix of bones with linked transform nodes.\n if (this._numBonesWithLinkedTransformNode > 0) {\n for (const bone of this.bones) {\n if (bone._linkedTransformNode) {\n const node = bone._linkedTransformNode;\n bone.position = node.position;\n if (node.rotationQuaternion) {\n bone.rotationQuaternion = node.rotationQuaternion;\n }\n else {\n bone.rotation = node.rotation;\n }\n bone.scaling = node.scaling;\n }\n }\n }\n if (this.needInitialSkinMatrix) {\n for (const mesh of this._meshesWithPoseMatrix) {\n const poseMatrix = mesh.getPoseMatrix();\n let needsUpdate = this._isDirty;\n if (!mesh._bonesTransformMatrices || mesh._bonesTransformMatrices.length !== 16 * (this.bones.length + 1)) {\n mesh._bonesTransformMatrices = new Float32Array(16 * (this.bones.length + 1));\n needsUpdate = true;\n }\n if (!needsUpdate) {\n continue;\n }\n if (this._synchronizedWithMesh !== mesh) {\n this._synchronizedWithMesh = mesh;\n // Prepare bones\n for (const bone of this.bones) {\n if (!bone.getParent()) {\n const matrix = bone.getBindMatrix();\n matrix.multiplyToRef(poseMatrix, TmpVectors.Matrix[1]);\n bone._updateAbsoluteBindMatrices(TmpVectors.Matrix[1]);\n }\n }\n if (this.isUsingTextureForMatrices) {\n const textureWidth = (this.bones.length + 1) * 4;\n if (!mesh._transformMatrixTexture || mesh._transformMatrixTexture.getSize().width !== textureWidth) {\n if (mesh._transformMatrixTexture) {\n mesh._transformMatrixTexture.dispose();\n }\n mesh._transformMatrixTexture = RawTexture.CreateRGBATexture(mesh._bonesTransformMatrices, (this.bones.length + 1) * 4, 1, this._scene, false, false, 1, 1);\n }\n }\n }\n this._computeTransformMatrices(mesh._bonesTransformMatrices, poseMatrix);\n if (this.isUsingTextureForMatrices && mesh._transformMatrixTexture) {\n mesh._transformMatrixTexture.update(mesh._bonesTransformMatrices);\n }\n }\n }\n else {\n if (!this._isDirty) {\n return;\n }\n if (!this._transformMatrices || this._transformMatrices.length !== 16 * (this.bones.length + 1)) {\n this._transformMatrices = new Float32Array(16 * (this.bones.length + 1));\n if (this.isUsingTextureForMatrices) {\n if (this._transformMatrixTexture) {\n this._transformMatrixTexture.dispose();\n }\n this._transformMatrixTexture = RawTexture.CreateRGBATexture(this._transformMatrices, (this.bones.length + 1) * 4, 1, this._scene, false, false, 1, 1);\n }\n }\n this._computeTransformMatrices(this._transformMatrices, null);\n if (this.isUsingTextureForMatrices && this._transformMatrixTexture) {\n this._transformMatrixTexture.update(this._transformMatrices);\n }\n }\n this._isDirty = false;\n }\n /**\n * Gets the list of animatables currently running for this skeleton\n * @returns an array of animatables\n */\n getAnimatables() {\n if (!this._animatables || this._animatables.length !== this.bones.length) {\n this._animatables = [];\n for (let index = 0; index < this.bones.length; index++) {\n this._animatables.push(this.bones[index]);\n }\n }\n return this._animatables;\n }\n /**\n * Clone the current skeleton\n * @param name defines the name of the new skeleton\n * @param id defines the id of the new skeleton\n * @returns the new skeleton\n */\n clone(name, id) {\n const result = new Skeleton(name, id || name, this._scene);\n result.needInitialSkinMatrix = this.needInitialSkinMatrix;\n for (let index = 0; index < this.bones.length; index++) {\n const source = this.bones[index];\n let parentBone = null;\n const parent = source.getParent();\n if (parent) {\n const parentIndex = this.bones.indexOf(parent);\n parentBone = result.bones[parentIndex];\n }\n const bone = new Bone(source.name, result, parentBone, source.getBindMatrix().clone(), source.getRestMatrix().clone());\n bone._index = source._index;\n if (source._linkedTransformNode) {\n bone.linkTransformNode(source._linkedTransformNode);\n }\n DeepCopier.DeepCopy(source.animations, bone.animations);\n }\n if (this._ranges) {\n result._ranges = {};\n for (const rangeName in this._ranges) {\n const range = this._ranges[rangeName];\n if (range) {\n result._ranges[rangeName] = range.clone();\n }\n }\n }\n this._isDirty = true;\n result.prepare(true);\n return result;\n }\n /**\n * Enable animation blending for this skeleton\n * @param blendingSpeed defines the blending speed to apply\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-blending\n */\n enableBlending(blendingSpeed = 0.01) {\n this.bones.forEach((bone) => {\n bone.animations.forEach((animation) => {\n animation.enableBlending = true;\n animation.blendingSpeed = blendingSpeed;\n });\n });\n }\n /**\n * Releases all resources associated with the current skeleton\n */\n dispose() {\n this._meshesWithPoseMatrix.length = 0;\n // Animations\n this.getScene().stopAnimation(this);\n // Remove from scene\n this.getScene().removeSkeleton(this);\n if (this._parentContainer) {\n const index = this._parentContainer.skeletons.indexOf(this);\n if (index > -1) {\n this._parentContainer.skeletons.splice(index, 1);\n }\n this._parentContainer = null;\n }\n if (this._transformMatrixTexture) {\n this._transformMatrixTexture.dispose();\n this._transformMatrixTexture = null;\n }\n }\n /**\n * Serialize the skeleton in a JSON object\n * @returns a JSON object\n */\n serialize() {\n var _a;\n const serializationObject = {};\n serializationObject.name = this.name;\n serializationObject.id = this.id;\n if (this.dimensionsAtRest) {\n serializationObject.dimensionsAtRest = this.dimensionsAtRest.asArray();\n }\n serializationObject.bones = [];\n serializationObject.needInitialSkinMatrix = this.needInitialSkinMatrix;\n for (let index = 0; index < this.bones.length; index++) {\n const bone = this.bones[index];\n const parent = bone.getParent();\n const serializedBone = {\n parentBoneIndex: parent ? this.bones.indexOf(parent) : -1,\n index: bone.getIndex(),\n name: bone.name,\n id: bone.id,\n matrix: bone.getBindMatrix().toArray(),\n rest: bone.getRestMatrix().toArray(),\n linkedTransformNodeId: (_a = bone.getTransformNode()) === null || _a === void 0 ? void 0 : _a.id,\n };\n serializationObject.bones.push(serializedBone);\n if (bone.length) {\n serializedBone.length = bone.length;\n }\n if (bone.metadata) {\n serializedBone.metadata = bone.metadata;\n }\n if (bone.animations && bone.animations.length > 0) {\n serializedBone.animation = bone.animations[0].serialize();\n }\n serializationObject.ranges = [];\n for (const name in this._ranges) {\n const source = this._ranges[name];\n if (!source) {\n continue;\n }\n const range = {};\n range.name = name;\n range.from = source.from;\n range.to = source.to;\n serializationObject.ranges.push(range);\n }\n }\n return serializationObject;\n }\n /**\n * Creates a new skeleton from serialized data\n * @param parsedSkeleton defines the serialized data\n * @param scene defines the hosting scene\n * @returns a new skeleton\n */\n static Parse(parsedSkeleton, scene) {\n const skeleton = new Skeleton(parsedSkeleton.name, parsedSkeleton.id, scene);\n if (parsedSkeleton.dimensionsAtRest) {\n skeleton.dimensionsAtRest = Vector3.FromArray(parsedSkeleton.dimensionsAtRest);\n }\n skeleton.needInitialSkinMatrix = parsedSkeleton.needInitialSkinMatrix;\n let index;\n for (index = 0; index < parsedSkeleton.bones.length; index++) {\n const parsedBone = parsedSkeleton.bones[index];\n const parsedBoneIndex = parsedSkeleton.bones[index].index;\n let parentBone = null;\n if (parsedBone.parentBoneIndex > -1) {\n parentBone = skeleton.bones[parsedBone.parentBoneIndex];\n }\n const rest = parsedBone.rest ? Matrix.FromArray(parsedBone.rest) : null;\n const bone = new Bone(parsedBone.name, skeleton, parentBone, Matrix.FromArray(parsedBone.matrix), rest, null, parsedBoneIndex);\n if (parsedBone.id !== undefined && parsedBone.id !== null) {\n bone.id = parsedBone.id;\n }\n if (parsedBone.length) {\n bone.length = parsedBone.length;\n }\n if (parsedBone.metadata) {\n bone.metadata = parsedBone.metadata;\n }\n if (parsedBone.animation) {\n bone.animations.push(Animation.Parse(parsedBone.animation));\n }\n if (parsedBone.linkedTransformNodeId !== undefined && parsedBone.linkedTransformNodeId !== null) {\n skeleton._hasWaitingData = true;\n bone._waitingTransformNodeId = parsedBone.linkedTransformNodeId;\n }\n }\n // placed after bones, so createAnimationRange can cascade down\n if (parsedSkeleton.ranges) {\n for (index = 0; index < parsedSkeleton.ranges.length; index++) {\n const data = parsedSkeleton.ranges[index];\n skeleton.createAnimationRange(data.name, data.from, data.to);\n }\n }\n return skeleton;\n }\n /**\n * Compute all node absolute matrices\n * @param forceUpdate defines if computation must be done even if cache is up to date\n */\n computeAbsoluteMatrices(forceUpdate = false) {\n if (this._absoluteTransformIsDirty || forceUpdate) {\n this.bones[0].computeAbsoluteMatrices();\n this._absoluteTransformIsDirty = false;\n }\n }\n /**\n * Compute all node absolute matrices\n * @param forceUpdate defines if computation must be done even if cache is up to date\n * @deprecated Please use computeAbsoluteMatrices instead\n */\n computeAbsoluteTransforms(forceUpdate = false) {\n this.computeAbsoluteMatrices(forceUpdate);\n }\n /**\n * Gets the root pose matrix\n * @returns a matrix\n */\n getPoseMatrix() {\n let poseMatrix = null;\n if (this._meshesWithPoseMatrix.length > 0) {\n poseMatrix = this._meshesWithPoseMatrix[0].getPoseMatrix();\n }\n return poseMatrix;\n }\n /**\n * Sorts bones per internal index\n */\n sortBones() {\n const bones = [];\n const visited = new Array(this.bones.length);\n for (let index = 0; index < this.bones.length; index++) {\n this._sortBones(index, bones, visited);\n }\n this.bones = bones;\n }\n _sortBones(index, bones, visited) {\n if (visited[index]) {\n return;\n }\n visited[index] = true;\n const bone = this.bones[index];\n if (!bone)\n return;\n if (bone._index === undefined) {\n bone._index = index;\n }\n const parentBone = bone.getParent();\n if (parentBone) {\n this._sortBones(this.bones.indexOf(parentBone), bones, visited);\n }\n bones.push(bone);\n }\n /**\n * Set the current local matrix as the restPose for all bones in the skeleton.\n */\n setCurrentPoseAsRest() {\n this.bones.forEach((b) => {\n b.setCurrentPoseAsRest();\n });\n }\n}\n//# sourceMappingURL=skeleton.js.map","import { Texture } from \"./texture.js\";\n\nimport \"../../Engines/Extensions/engine.rawTexture.js\";\n/**\n * Class used to store 2D array textures containing user data\n */\nexport class RawTexture2DArray extends Texture {\n /**\n * Gets the number of layers of the texture\n */\n get depth() {\n return this._depth;\n }\n /**\n * Create a new RawTexture2DArray\n * @param data defines the data of the texture\n * @param width defines the width of the texture\n * @param height defines the height of the texture\n * @param depth defines the number of layers of the texture\n * @param format defines the texture format to use\n * @param scene defines the hosting scene\n * @param generateMipMaps defines a boolean indicating if mip levels should be generated (true by default)\n * @param invertY defines if texture must be stored with Y axis inverted\n * @param samplingMode defines the sampling mode to use (Texture.TRILINEAR_SAMPLINGMODE by default)\n * @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_INT, Engine.TEXTURETYPE_FLOAT...)\n * @param creationFlags specific flags to use when creating the texture (1 for storage textures, for eg)\n */\n constructor(data, width, height, depth, \n /** Gets or sets the texture format to use */\n format, scene, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, textureType = 0, creationFlags) {\n super(null, scene, !generateMipMaps, invertY);\n this.format = format;\n this._texture = scene.getEngine().createRawTexture2DArray(data, width, height, depth, format, generateMipMaps, invertY, samplingMode, null, textureType, creationFlags);\n this._depth = depth;\n this.is2DArray = true;\n }\n /**\n * Update the texture with new data\n * @param data defines the data to store in the texture\n */\n update(data) {\n if (!this._texture) {\n return;\n }\n this._getEngine().updateRawTexture2DArray(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type);\n }\n /**\n * Creates a RGBA texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param depth defines the number of layers of the texture\n * @param scene defines the scene the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the RGBA texture\n */\n static CreateRGBATexture(data, width, height, depth, scene, generateMipMaps = true, invertY = false, samplingMode = 3, type = 0) {\n return new RawTexture2DArray(data, width, height, depth, 5, scene, generateMipMaps, invertY, samplingMode, type);\n }\n}\n//# sourceMappingURL=rawTexture2DArray.js.map","import { SmartArray } from \"../Misc/smartArray.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { MorphTarget } from \"./morphTarget.js\";\n\nimport { RawTexture2DArray } from \"../Materials/Textures/rawTexture2DArray.js\";\n/**\n * This class is used to deform meshes using morphing between different targets\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/morphTargets\n */\nexport class MorphTargetManager {\n /**\n * Sets a boolean indicating that adding new target or updating an existing target will not update the underlying data buffers\n */\n set areUpdatesFrozen(block) {\n if (block) {\n this._blockCounter++;\n }\n else {\n this._blockCounter--;\n if (this._blockCounter <= 0) {\n this._blockCounter = 0;\n this._syncActiveTargets(true);\n }\n }\n }\n get areUpdatesFrozen() {\n return this._blockCounter > 0;\n }\n /**\n * Creates a new MorphTargetManager\n * @param scene defines the current scene\n */\n constructor(scene = null) {\n this._targets = new Array();\n this._targetInfluenceChangedObservers = new Array();\n this._targetDataLayoutChangedObservers = new Array();\n this._activeTargets = new SmartArray(16);\n this._supportsNormals = false;\n this._supportsTangents = false;\n this._supportsUVs = false;\n this._vertexCount = 0;\n this._textureVertexStride = 0;\n this._textureWidth = 0;\n this._textureHeight = 1;\n this._uniqueId = 0;\n this._tempInfluences = new Array();\n this._canUseTextureForTargets = false;\n this._blockCounter = 0;\n /** @internal */\n this._parentContainer = null;\n /**\n * Gets or sets a boolean indicating if influencers must be optimized (eg. recompiling the shader if less influencers are used)\n */\n this.optimizeInfluencers = true;\n /**\n * Gets or sets a boolean indicating if normals must be morphed\n */\n this.enableNormalMorphing = true;\n /**\n * Gets or sets a boolean indicating if tangents must be morphed\n */\n this.enableTangentMorphing = true;\n /**\n * Gets or sets a boolean indicating if UV must be morphed\n */\n this.enableUVMorphing = true;\n this._useTextureToStoreTargets = true;\n if (!scene) {\n scene = EngineStore.LastCreatedScene;\n }\n this._scene = scene;\n if (this._scene) {\n this._scene.addMorphTargetManager(this);\n this._uniqueId = this._scene.getUniqueId();\n const engineCaps = this._scene.getEngine().getCaps();\n this._canUseTextureForTargets =\n engineCaps.canUseGLVertexID && engineCaps.textureFloat && engineCaps.maxVertexTextureImageUnits > 0 && engineCaps.texture2DArrayMaxLayerCount > 1;\n }\n }\n /**\n * Gets the unique ID of this manager\n */\n get uniqueId() {\n return this._uniqueId;\n }\n /**\n * Gets the number of vertices handled by this manager\n */\n get vertexCount() {\n return this._vertexCount;\n }\n /**\n * Gets a boolean indicating if this manager supports morphing of normals\n */\n get supportsNormals() {\n return this._supportsNormals && this.enableNormalMorphing;\n }\n /**\n * Gets a boolean indicating if this manager supports morphing of tangents\n */\n get supportsTangents() {\n return this._supportsTangents && this.enableTangentMorphing;\n }\n /**\n * Gets a boolean indicating if this manager supports morphing of texture coordinates\n */\n get supportsUVs() {\n return this._supportsUVs && this.enableUVMorphing;\n }\n /**\n * Gets the number of targets stored in this manager\n */\n get numTargets() {\n return this._targets.length;\n }\n /**\n * Gets the number of influencers (ie. the number of targets with influences > 0)\n */\n get numInfluencers() {\n return this._activeTargets.length;\n }\n /**\n * Gets the list of influences (one per target)\n */\n get influences() {\n return this._influences;\n }\n /**\n * Gets or sets a boolean indicating that targets should be stored as a texture instead of using vertex attributes (default is true).\n * Please note that this option is not available if the hardware does not support it\n */\n get useTextureToStoreTargets() {\n return this._useTextureToStoreTargets;\n }\n set useTextureToStoreTargets(value) {\n this._useTextureToStoreTargets = value;\n }\n /**\n * Gets a boolean indicating that the targets are stored into a texture (instead of as attributes)\n */\n get isUsingTextureForTargets() {\n var _a;\n return (MorphTargetManager.EnableTextureStorage &&\n this.useTextureToStoreTargets &&\n this._canUseTextureForTargets &&\n !((_a = this._scene) === null || _a === void 0 ? void 0 : _a.getEngine().getCaps().disableMorphTargetTexture));\n }\n /**\n * Gets the active target at specified index. An active target is a target with an influence > 0\n * @param index defines the index to check\n * @returns the requested target\n */\n getActiveTarget(index) {\n return this._activeTargets.data[index];\n }\n /**\n * Gets the target at specified index\n * @param index defines the index to check\n * @returns the requested target\n */\n getTarget(index) {\n return this._targets[index];\n }\n /**\n * Add a new target to this manager\n * @param target defines the target to add\n */\n addTarget(target) {\n this._targets.push(target);\n this._targetInfluenceChangedObservers.push(target.onInfluenceChanged.add((needUpdate) => {\n this._syncActiveTargets(needUpdate);\n }));\n this._targetDataLayoutChangedObservers.push(target._onDataLayoutChanged.add(() => {\n this._syncActiveTargets(true);\n }));\n this._syncActiveTargets(true);\n }\n /**\n * Removes a target from the manager\n * @param target defines the target to remove\n */\n removeTarget(target) {\n const index = this._targets.indexOf(target);\n if (index >= 0) {\n this._targets.splice(index, 1);\n target.onInfluenceChanged.remove(this._targetInfluenceChangedObservers.splice(index, 1)[0]);\n target._onDataLayoutChanged.remove(this._targetDataLayoutChangedObservers.splice(index, 1)[0]);\n this._syncActiveTargets(true);\n }\n if (this._scene) {\n this._scene.stopAnimation(target);\n }\n }\n /**\n * @internal\n */\n _bind(effect) {\n effect.setFloat3(\"morphTargetTextureInfo\", this._textureVertexStride, this._textureWidth, this._textureHeight);\n effect.setFloatArray(\"morphTargetTextureIndices\", this._morphTargetTextureIndices);\n effect.setTexture(\"morphTargets\", this._targetStoreTexture);\n }\n /**\n * Clone the current manager\n * @returns a new MorphTargetManager\n */\n clone() {\n const copy = new MorphTargetManager(this._scene);\n for (const target of this._targets) {\n copy.addTarget(target.clone());\n }\n copy.enableNormalMorphing = this.enableNormalMorphing;\n copy.enableTangentMorphing = this.enableTangentMorphing;\n copy.enableUVMorphing = this.enableUVMorphing;\n return copy;\n }\n /**\n * Serializes the current manager into a Serialization object\n * @returns the serialized object\n */\n serialize() {\n const serializationObject = {};\n serializationObject.id = this.uniqueId;\n serializationObject.targets = [];\n for (const target of this._targets) {\n serializationObject.targets.push(target.serialize());\n }\n return serializationObject;\n }\n _syncActiveTargets(needUpdate) {\n if (this.areUpdatesFrozen) {\n return;\n }\n let influenceCount = 0;\n this._activeTargets.reset();\n this._supportsNormals = true;\n this._supportsTangents = true;\n this._supportsUVs = true;\n this._vertexCount = 0;\n if (this._scene && this._targets.length > this._scene.getEngine().getCaps().texture2DArrayMaxLayerCount) {\n this.useTextureToStoreTargets = false;\n }\n if (!this._morphTargetTextureIndices || this._morphTargetTextureIndices.length !== this._targets.length) {\n this._morphTargetTextureIndices = new Float32Array(this._targets.length);\n }\n let targetIndex = -1;\n for (const target of this._targets) {\n targetIndex++;\n if (target.influence === 0 && this.optimizeInfluencers) {\n continue;\n }\n if (this._activeTargets.length >= MorphTargetManager.MaxActiveMorphTargetsInVertexAttributeMode && !this.isUsingTextureForTargets) {\n break;\n }\n this._activeTargets.push(target);\n this._morphTargetTextureIndices[influenceCount] = targetIndex;\n this._tempInfluences[influenceCount++] = target.influence;\n this._supportsNormals = this._supportsNormals && target.hasNormals;\n this._supportsTangents = this._supportsTangents && target.hasTangents;\n this._supportsUVs = this._supportsUVs && target.hasUVs;\n const positions = target.getPositions();\n if (positions) {\n const vertexCount = positions.length / 3;\n if (this._vertexCount === 0) {\n this._vertexCount = vertexCount;\n }\n else if (this._vertexCount !== vertexCount) {\n Logger.Error(\"Incompatible target. Targets must all have the same vertices count.\");\n return;\n }\n }\n }\n if (this._morphTargetTextureIndices.length !== influenceCount) {\n this._morphTargetTextureIndices = this._morphTargetTextureIndices.slice(0, influenceCount);\n }\n if (!this._influences || this._influences.length !== influenceCount) {\n this._influences = new Float32Array(influenceCount);\n }\n for (let index = 0; index < influenceCount; index++) {\n this._influences[index] = this._tempInfluences[index];\n }\n if (needUpdate) {\n this.synchronize();\n }\n }\n /**\n * Synchronize the targets with all the meshes using this morph target manager\n */\n synchronize() {\n if (!this._scene || this.areUpdatesFrozen) {\n return;\n }\n if (this.isUsingTextureForTargets && this._vertexCount) {\n this._textureVertexStride = 1;\n if (this._supportsNormals) {\n this._textureVertexStride++;\n }\n if (this._supportsTangents) {\n this._textureVertexStride++;\n }\n if (this._supportsUVs) {\n this._textureVertexStride++;\n }\n this._textureWidth = this._vertexCount * this._textureVertexStride;\n this._textureHeight = 1;\n const maxTextureSize = this._scene.getEngine().getCaps().maxTextureSize;\n if (this._textureWidth > maxTextureSize) {\n this._textureHeight = Math.ceil(this._textureWidth / maxTextureSize);\n this._textureWidth = maxTextureSize;\n }\n let mustUpdateTexture = true;\n if (this._targetStoreTexture) {\n const textureSize = this._targetStoreTexture.getSize();\n if (textureSize.width === this._textureWidth && textureSize.height === this._textureHeight && this._targetStoreTexture.depth === this._targets.length) {\n mustUpdateTexture = false;\n }\n }\n if (mustUpdateTexture) {\n if (this._targetStoreTexture) {\n this._targetStoreTexture.dispose();\n }\n const targetCount = this._targets.length;\n const data = new Float32Array(targetCount * this._textureWidth * this._textureHeight * 4);\n let offset = 0;\n for (let index = 0; index < targetCount; index++) {\n const target = this._targets[index];\n const positions = target.getPositions();\n const normals = target.getNormals();\n const uvs = target.getUVs();\n const tangents = target.getTangents();\n if (!positions) {\n if (index === 0) {\n Logger.Error(\"Invalid morph target. Target must have positions.\");\n }\n return;\n }\n offset = index * this._textureWidth * this._textureHeight * 4;\n for (let vertex = 0; vertex < this._vertexCount; vertex++) {\n data[offset] = positions[vertex * 3];\n data[offset + 1] = positions[vertex * 3 + 1];\n data[offset + 2] = positions[vertex * 3 + 2];\n offset += 4;\n if (this._supportsNormals && normals) {\n data[offset] = normals[vertex * 3];\n data[offset + 1] = normals[vertex * 3 + 1];\n data[offset + 2] = normals[vertex * 3 + 2];\n offset += 4;\n }\n if (this._supportsUVs && uvs) {\n data[offset] = uvs[vertex * 2];\n data[offset + 1] = uvs[vertex * 2 + 1];\n offset += 4;\n }\n if (this._supportsTangents && tangents) {\n data[offset] = tangents[vertex * 3];\n data[offset + 1] = tangents[vertex * 3 + 1];\n data[offset + 2] = tangents[vertex * 3 + 2];\n offset += 4;\n }\n }\n }\n this._targetStoreTexture = RawTexture2DArray.CreateRGBATexture(data, this._textureWidth, this._textureHeight, targetCount, this._scene, false, false, 1, 1);\n }\n }\n // Flag meshes as dirty to resync with the active targets\n for (const mesh of this._scene.meshes) {\n if (mesh.morphTargetManager === this) {\n mesh._syncGeometryWithMorphTargetManager();\n }\n }\n }\n /**\n * Release all resources\n */\n dispose() {\n if (this._targetStoreTexture) {\n this._targetStoreTexture.dispose();\n }\n this._targetStoreTexture = null;\n // Remove from scene\n if (this._scene) {\n this._scene.removeMorphTargetManager(this);\n if (this._parentContainer) {\n const index = this._parentContainer.morphTargetManagers.indexOf(this);\n if (index > -1) {\n this._parentContainer.morphTargetManagers.splice(index, 1);\n }\n this._parentContainer = null;\n }\n for (const morph of this._targets) {\n this._scene.stopAnimation(morph);\n }\n }\n }\n // Statics\n /**\n * Creates a new MorphTargetManager from serialized data\n * @param serializationObject defines the serialized data\n * @param scene defines the hosting scene\n * @returns the new MorphTargetManager\n */\n static Parse(serializationObject, scene) {\n const result = new MorphTargetManager(scene);\n result._uniqueId = serializationObject.id;\n for (const targetData of serializationObject.targets) {\n result.addTarget(MorphTarget.Parse(targetData, scene));\n }\n return result;\n }\n}\n/** Enable storing morph target data into textures when set to true (true by default) */\nMorphTargetManager.EnableTextureStorage = true;\n/** Maximum number of active morph targets supported in the \"vertex attribute\" mode (i.e., not the \"texture\" mode) */\nMorphTargetManager.MaxActiveMorphTargetsInVertexAttributeMode = 8;\n//# sourceMappingURL=morphTargetManager.js.map","import { Decode } from \"./stringTools.js\";\n/**\n * Utility class for reading from a data buffer\n */\nexport class DataReader {\n /**\n * Constructor\n * @param buffer The buffer to read\n */\n constructor(buffer) {\n /**\n * The current byte offset from the beginning of the data buffer.\n */\n this.byteOffset = 0;\n this.buffer = buffer;\n }\n /**\n * Loads the given byte length.\n * @param byteLength The byte length to load\n * @returns A promise that resolves when the load is complete\n */\n loadAsync(byteLength) {\n return this.buffer.readAsync(this.byteOffset, byteLength).then((data) => {\n this._dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);\n this._dataByteOffset = 0;\n });\n }\n /**\n * Read a unsigned 32-bit integer from the currently loaded data range.\n * @returns The 32-bit integer read\n */\n readUint32() {\n const value = this._dataView.getUint32(this._dataByteOffset, true);\n this._dataByteOffset += 4;\n this.byteOffset += 4;\n return value;\n }\n /**\n * Read a byte array from the currently loaded data range.\n * @param byteLength The byte length to read\n * @returns The byte array read\n */\n readUint8Array(byteLength) {\n const value = new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + this._dataByteOffset, byteLength);\n this._dataByteOffset += byteLength;\n this.byteOffset += byteLength;\n return value;\n }\n /**\n * Read a string from the currently loaded data range.\n * @param byteLength The byte length to read\n * @returns The string read\n */\n readString(byteLength) {\n return Decode(this.readUint8Array(byteLength));\n }\n /**\n * Skips the given byte length the currently loaded data range.\n * @param byteLength The byte length to skip\n */\n skipBytes(byteLength) {\n this._dataByteOffset += byteLength;\n this.byteOffset += byteLength;\n }\n}\n//# sourceMappingURL=dataReader.js.map","import { Tools } from \"@inter-ikea-betrakta-babylonjs/core/Misc/tools.js\";\nfunction validateAsync(data, rootUrl, fileName, getExternalResource) {\n const options = {\n externalResourceFunction: (uri) => getExternalResource(uri).then((value) => new Uint8Array(value)),\n };\n if (fileName) {\n options.uri = rootUrl === \"file:\" ? fileName : rootUrl + fileName;\n }\n return data instanceof ArrayBuffer ? GLTFValidator.validateBytes(new Uint8Array(data), options) : GLTFValidator.validateString(data, options);\n}\n/**\n * The worker function that gets converted to a blob url to pass into a worker.\n */\nfunction workerFunc() {\n const pendingExternalResources = [];\n onmessage = (message) => {\n const data = message.data;\n switch (data.id) {\n case \"init\": {\n importScripts(data.url);\n break;\n }\n case \"validate\": {\n validateAsync(data.data, data.rootUrl, data.fileName, (uri) => new Promise((resolve, reject) => {\n const index = pendingExternalResources.length;\n pendingExternalResources.push({ resolve, reject });\n postMessage({ id: \"getExternalResource\", index: index, uri: uri });\n })).then((value) => {\n postMessage({ id: \"validate.resolve\", value: value });\n }, (reason) => {\n postMessage({ id: \"validate.reject\", reason: reason });\n });\n break;\n }\n case \"getExternalResource.resolve\": {\n pendingExternalResources[data.index].resolve(data.value);\n break;\n }\n case \"getExternalResource.reject\": {\n pendingExternalResources[data.index].reject(data.reason);\n break;\n }\n }\n };\n}\n/**\n * glTF validation\n */\nexport class GLTFValidation {\n /**\n * Validate a glTF asset using the glTF-Validator.\n * @param data The JSON of a glTF or the array buffer of a binary glTF\n * @param rootUrl The root url for the glTF\n * @param fileName The file name for the glTF\n * @param getExternalResource The callback to get external resources for the glTF validator\n * @returns A promise that resolves with the glTF validation results once complete\n */\n static ValidateAsync(data, rootUrl, fileName, getExternalResource) {\n const dataCopy = ArrayBuffer.isView(data) ? data.slice().buffer : data;\n if (typeof Worker === \"function\") {\n return new Promise((resolve, reject) => {\n const workerContent = `${validateAsync}(${workerFunc})()`;\n const workerBlobUrl = URL.createObjectURL(new Blob([workerContent], { type: \"application/javascript\" }));\n const worker = new Worker(workerBlobUrl);\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n };\n const onMessage = (message) => {\n const data = message.data;\n switch (data.id) {\n case \"getExternalResource\": {\n getExternalResource(data.uri).then((value) => {\n worker.postMessage({ id: \"getExternalResource.resolve\", index: data.index, value: value }, [value]);\n }, (reason) => {\n worker.postMessage({ id: \"getExternalResource.reject\", index: data.index, reason: reason });\n });\n break;\n }\n case \"validate.resolve\": {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve(data.value);\n worker.terminate();\n break;\n }\n case \"validate.reject\": {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(data.reason);\n worker.terminate();\n }\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n worker.postMessage({ id: \"init\", url: Tools.GetBabylonScriptURL(this.Configuration.url) });\n worker.postMessage({ id: \"validate\", data: dataCopy, rootUrl: rootUrl, fileName: fileName });\n });\n }\n else {\n if (!this._LoadScriptPromise) {\n this._LoadScriptPromise = Tools.LoadBabylonScriptAsync(this.Configuration.url);\n }\n return this._LoadScriptPromise.then(() => {\n return validateAsync(dataCopy, rootUrl, fileName, getExternalResource);\n });\n }\n }\n}\n/**\n * The configuration. Defaults to `{ url: \"https://cdn.babylonjs.com/gltf_validator.js\" }`.\n */\nGLTFValidation.Configuration = {\n url: `${Tools._DefaultCdnUrl}/gltf_validator.js`,\n};\n//# sourceMappingURL=glTFValidation.js.map","import { Observable } from \"@inter-ikea-betrakta-babylonjs/core/Misc/observable.js\";\nimport { Tools } from \"@inter-ikea-betrakta-babylonjs/core/Misc/tools.js\";\nimport { SceneLoader } from \"@inter-ikea-betrakta-babylonjs/core/Loading/sceneLoader.js\";\nimport { AssetContainer } from \"@inter-ikea-betrakta-babylonjs/core/assetContainer.js\";\nimport { Logger } from \"@inter-ikea-betrakta-babylonjs/core/Misc/logger.js\";\nimport { DataReader } from \"@inter-ikea-betrakta-babylonjs/core/Misc/dataReader.js\";\nimport { GLTFValidation } from \"./glTFValidation.js\";\nimport { DecodeBase64UrlToBinary } from \"@inter-ikea-betrakta-babylonjs/core/Misc/fileTools.js\";\nimport { RuntimeError, ErrorCodes } from \"@inter-ikea-betrakta-babylonjs/core/Misc/error.js\";\nfunction readAsync(arrayBuffer, byteOffset, byteLength) {\n try {\n return Promise.resolve(new Uint8Array(arrayBuffer, byteOffset, byteLength));\n }\n catch (e) {\n return Promise.reject(e);\n }\n}\nfunction readViewAsync(arrayBufferView, byteOffset, byteLength) {\n try {\n if (arrayBufferView.byteOffset + byteOffset + byteLength > arrayBufferView.buffer.byteLength) {\n throw new Error(\"Array length out of bounds.\");\n }\n return Promise.resolve(new Uint8Array(arrayBufferView.buffer, arrayBufferView.byteOffset + byteOffset, byteLength));\n }\n catch (e) {\n return Promise.reject(e);\n }\n}\n/**\n * Mode that determines the coordinate system to use.\n */\nexport var GLTFLoaderCoordinateSystemMode;\n(function (GLTFLoaderCoordinateSystemMode) {\n /**\n * Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.\n */\n GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode[\"AUTO\"] = 0] = \"AUTO\";\n /**\n * Sets the useRightHandedSystem flag on the scene.\n */\n GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode[\"FORCE_RIGHT_HANDED\"] = 1] = \"FORCE_RIGHT_HANDED\";\n})(GLTFLoaderCoordinateSystemMode || (GLTFLoaderCoordinateSystemMode = {}));\n/**\n * Mode that determines what animations will start.\n */\nexport var GLTFLoaderAnimationStartMode;\n(function (GLTFLoaderAnimationStartMode) {\n /**\n * No animation will start.\n */\n GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode[\"NONE\"] = 0] = \"NONE\";\n /**\n * The first animation will start.\n */\n GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode[\"FIRST\"] = 1] = \"FIRST\";\n /**\n * All animations will start.\n */\n GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode[\"ALL\"] = 2] = \"ALL\";\n})(GLTFLoaderAnimationStartMode || (GLTFLoaderAnimationStartMode = {}));\n/**\n * Loader state.\n */\nexport var GLTFLoaderState;\n(function (GLTFLoaderState) {\n /**\n * The asset is loading.\n */\n GLTFLoaderState[GLTFLoaderState[\"LOADING\"] = 0] = \"LOADING\";\n /**\n * The asset is ready for rendering.\n */\n GLTFLoaderState[GLTFLoaderState[\"READY\"] = 1] = \"READY\";\n /**\n * The asset is completely loaded.\n */\n GLTFLoaderState[GLTFLoaderState[\"COMPLETE\"] = 2] = \"COMPLETE\";\n})(GLTFLoaderState || (GLTFLoaderState = {}));\n/**\n * File loader for loading glTF files into a scene.\n */\nexport class GLTFFileLoader {\n constructor() {\n // --------------\n // Common options\n // --------------\n /**\n * Raised when the asset has been parsed\n */\n this.onParsedObservable = new Observable();\n // ----------\n // V2 options\n // ----------\n /**\n * The coordinate system mode. Defaults to AUTO.\n */\n this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;\n /**\n * The animation start mode. Defaults to FIRST.\n */\n this.animationStartMode = GLTFLoaderAnimationStartMode.FIRST;\n /**\n * Defines if the loader should compile materials before raising the success callback. Defaults to false.\n */\n this.compileMaterials = false;\n /**\n * Defines if the loader should also compile materials with clip planes. Defaults to false.\n */\n this.useClipPlane = false;\n /**\n * Defines if the loader should compile shadow generators before raising the success callback. Defaults to false.\n */\n this.compileShadowGenerators = false;\n /**\n * Defines if the Alpha blended materials are only applied as coverage.\n * If false, (default) The luminance of each pixel will reduce its opacity to simulate the behaviour of most physical materials.\n * If true, no extra effects are applied to transparent pixels.\n */\n this.transparencyAsCoverage = false;\n /**\n * Defines if the loader should use range requests when load binary glTF files from HTTP.\n * Enabling will disable offline support and glTF validator.\n * Defaults to false.\n */\n this.useRangeRequests = false;\n /**\n * Defines if the loader should create instances when multiple glTF nodes point to the same glTF mesh. Defaults to true.\n */\n this.createInstances = true;\n /**\n * Defines if the loader should always compute the bounding boxes of meshes and not use the min/max values from the position accessor. Defaults to false.\n */\n this.alwaysComputeBoundingBox = false;\n /**\n * If true, load all materials defined in the file, even if not used by any mesh. Defaults to false.\n */\n this.loadAllMaterials = false;\n /**\n * If true, load only the materials defined in the file. Defaults to false.\n */\n this.loadOnlyMaterials = false;\n /**\n * If true, do not load any materials defined in the file. Defaults to false.\n */\n this.skipMaterials = false;\n /**\n * If true, load the color (gamma encoded) textures into sRGB buffers (if supported by the GPU), which will yield more accurate results when sampling the texture. Defaults to true.\n */\n this.useSRGBBuffers = true;\n /**\n * When loading glTF animations, which are defined in seconds, target them to this FPS. Defaults to 60.\n */\n this.targetFps = 60;\n /**\n * Defines if the loader should always compute the nearest common ancestor of the skeleton joints instead of using `skin.skeleton`. Defaults to false.\n * Set this to true if loading assets with invalid `skin.skeleton` values.\n */\n this.alwaysComputeSkeletonRootNode = false;\n /**\n * Function called before loading a url referenced by the asset.\n * @param url\n */\n this.preprocessUrlAsync = (url) => Promise.resolve(url);\n /**\n * Observable raised when the loader creates a mesh after parsing the glTF properties of the mesh.\n * Note that the observable is raised as soon as the mesh object is created, meaning some data may not have been setup yet for this mesh (vertex data, morph targets, material, ...)\n */\n this.onMeshLoadedObservable = new Observable();\n /**\n * Callback raised when the loader creates a skin after parsing the glTF properties of the skin node.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/importers/glTF/glTFSkinning#ignoring-the-transform-of-the-skinned-mesh\n * @param node - the transform node that corresponds to the original glTF skin node used for animations\n * @param skinnedNode - the transform node that is the skinned mesh itself or the parent of the skinned meshes\n */\n this.onSkinLoadedObservable = new Observable();\n /**\n * Observable raised when the loader creates a texture after parsing the glTF properties of the texture.\n */\n this.onTextureLoadedObservable = new Observable();\n /**\n * Observable raised when the loader creates a material after parsing the glTF properties of the material.\n */\n this.onMaterialLoadedObservable = new Observable();\n /**\n * Observable raised when the loader creates a camera after parsing the glTF properties of the camera.\n */\n this.onCameraLoadedObservable = new Observable();\n /**\n * Observable raised when the asset is completely loaded, immediately before the loader is disposed.\n * For assets with LODs, raised when all of the LODs are complete.\n * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.\n */\n this.onCompleteObservable = new Observable();\n /**\n * Observable raised when an error occurs.\n */\n this.onErrorObservable = new Observable();\n /**\n * Observable raised after the loader is disposed.\n */\n this.onDisposeObservable = new Observable();\n /**\n * Observable raised after a loader extension is created.\n * Set additional options for a loader extension in this event.\n */\n this.onExtensionLoadedObservable = new Observable();\n /**\n * Defines if the loader should validate the asset.\n */\n this.validate = false;\n /**\n * Observable raised after validation when validate is set to true. The event data is the result of the validation.\n */\n this.onValidatedObservable = new Observable();\n this._loader = null;\n this._state = null;\n this._requests = new Array();\n /**\n * Name of the loader (\"gltf\")\n */\n this.name = \"gltf\";\n /** @internal */\n this.extensions = {\n \".gltf\": { isBinary: false },\n \".glb\": { isBinary: true },\n };\n /**\n * Observable raised when the loader state changes.\n */\n this.onLoaderStateChangedObservable = new Observable();\n this._logIndentLevel = 0;\n this._loggingEnabled = false;\n /** @internal */\n this._log = this._logDisabled;\n this._capturePerformanceCounters = false;\n /** @internal */\n this._startPerformanceCounter = this._startPerformanceCounterDisabled;\n /** @internal */\n this._endPerformanceCounter = this._endPerformanceCounterDisabled;\n }\n /**\n * Raised when the asset has been parsed\n */\n set onParsed(callback) {\n if (this._onParsedObserver) {\n this.onParsedObservable.remove(this._onParsedObserver);\n }\n this._onParsedObserver = this.onParsedObservable.add(callback);\n }\n /**\n * Callback raised when the loader creates a mesh after parsing the glTF properties of the mesh.\n * Note that the callback is called as soon as the mesh object is created, meaning some data may not have been setup yet for this mesh (vertex data, morph targets, material, ...)\n */\n set onMeshLoaded(callback) {\n if (this._onMeshLoadedObserver) {\n this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);\n }\n this._onMeshLoadedObserver = this.onMeshLoadedObservable.add(callback);\n }\n /**\n * Callback raised when the loader creates a texture after parsing the glTF properties of the texture.\n */\n set onTextureLoaded(callback) {\n if (this._onTextureLoadedObserver) {\n this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);\n }\n this._onTextureLoadedObserver = this.onTextureLoadedObservable.add(callback);\n }\n /**\n * Callback raised when the loader creates a material after parsing the glTF properties of the material.\n */\n set onMaterialLoaded(callback) {\n if (this._onMaterialLoadedObserver) {\n this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);\n }\n this._onMaterialLoadedObserver = this.onMaterialLoadedObservable.add(callback);\n }\n /**\n * Callback raised when the loader creates a camera after parsing the glTF properties of the camera.\n */\n set onCameraLoaded(callback) {\n if (this._onCameraLoadedObserver) {\n this.onCameraLoadedObservable.remove(this._onCameraLoadedObserver);\n }\n this._onCameraLoadedObserver = this.onCameraLoadedObservable.add(callback);\n }\n /**\n * Callback raised when the asset is completely loaded, immediately before the loader is disposed.\n * For assets with LODs, raised when all of the LODs are complete.\n * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.\n */\n set onComplete(callback) {\n if (this._onCompleteObserver) {\n this.onCompleteObservable.remove(this._onCompleteObserver);\n }\n this._onCompleteObserver = this.onCompleteObservable.add(callback);\n }\n /**\n * Callback raised when an error occurs.\n */\n set onError(callback) {\n if (this._onErrorObserver) {\n this.onErrorObservable.remove(this._onErrorObserver);\n }\n this._onErrorObserver = this.onErrorObservable.add(callback);\n }\n /**\n * Callback raised after the loader is disposed.\n */\n set onDispose(callback) {\n if (this._onDisposeObserver) {\n this.onDisposeObservable.remove(this._onDisposeObserver);\n }\n this._onDisposeObserver = this.onDisposeObservable.add(callback);\n }\n /**\n * Callback raised after a loader extension is created.\n */\n set onExtensionLoaded(callback) {\n if (this._onExtensionLoadedObserver) {\n this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);\n }\n this._onExtensionLoadedObserver = this.onExtensionLoadedObservable.add(callback);\n }\n /**\n * Defines if the loader logging is enabled.\n */\n get loggingEnabled() {\n return this._loggingEnabled;\n }\n set loggingEnabled(value) {\n if (this._loggingEnabled === value) {\n return;\n }\n this._loggingEnabled = value;\n if (this._loggingEnabled) {\n this._log = this._logEnabled;\n }\n else {\n this._log = this._logDisabled;\n }\n }\n /**\n * Defines if the loader should capture performance counters.\n */\n get capturePerformanceCounters() {\n return this._capturePerformanceCounters;\n }\n set capturePerformanceCounters(value) {\n if (this._capturePerformanceCounters === value) {\n return;\n }\n this._capturePerformanceCounters = value;\n if (this._capturePerformanceCounters) {\n this._startPerformanceCounter = this._startPerformanceCounterEnabled;\n this._endPerformanceCounter = this._endPerformanceCounterEnabled;\n }\n else {\n this._startPerformanceCounter = this._startPerformanceCounterDisabled;\n this._endPerformanceCounter = this._endPerformanceCounterDisabled;\n }\n }\n /**\n * Callback raised after a loader extension is created.\n */\n set onValidated(callback) {\n if (this._onValidatedObserver) {\n this.onValidatedObservable.remove(this._onValidatedObserver);\n }\n this._onValidatedObserver = this.onValidatedObservable.add(callback);\n }\n /**\n * Disposes the loader, releases resources during load, and cancels any outstanding requests.\n */\n dispose() {\n if (this._loader) {\n this._loader.dispose();\n this._loader = null;\n }\n for (const request of this._requests) {\n request.abort();\n }\n this._requests.length = 0;\n delete this._progressCallback;\n this.preprocessUrlAsync = (url) => Promise.resolve(url);\n this.onMeshLoadedObservable.clear();\n this.onSkinLoadedObservable.clear();\n this.onTextureLoadedObservable.clear();\n this.onMaterialLoadedObservable.clear();\n this.onCameraLoadedObservable.clear();\n this.onCompleteObservable.clear();\n this.onExtensionLoadedObservable.clear();\n this.onDisposeObservable.notifyObservers(undefined);\n this.onDisposeObservable.clear();\n }\n /**\n * @internal\n */\n loadFile(scene, fileOrUrl, rootUrl, onSuccess, onProgress, useArrayBuffer, onError, name) {\n if (ArrayBuffer.isView(fileOrUrl)) {\n this._loadBinary(scene, fileOrUrl, rootUrl, onSuccess, onError, name);\n return null;\n }\n this._progressCallback = onProgress;\n const fileName = fileOrUrl.name || Tools.GetFilename(fileOrUrl);\n if (useArrayBuffer) {\n if (this.useRangeRequests) {\n if (this.validate) {\n Logger.Warn(\"glTF validation is not supported when range requests are enabled\");\n }\n const fileRequest = {\n abort: () => { },\n onCompleteObservable: new Observable(),\n };\n const dataBuffer = {\n readAsync: (byteOffset, byteLength) => {\n return new Promise((resolve, reject) => {\n this._loadFile(scene, fileOrUrl, (data) => {\n resolve(new Uint8Array(data));\n }, true, (error) => {\n reject(error);\n }, (webRequest) => {\n webRequest.setRequestHeader(\"Range\", `bytes=${byteOffset}-${byteOffset + byteLength - 1}`);\n });\n });\n },\n byteLength: 0,\n };\n this._unpackBinaryAsync(new DataReader(dataBuffer)).then((loaderData) => {\n fileRequest.onCompleteObservable.notifyObservers(fileRequest);\n onSuccess(loaderData);\n }, onError ? (error) => onError(undefined, error) : undefined);\n return fileRequest;\n }\n return this._loadFile(scene, fileOrUrl, (data) => {\n this._validate(scene, new Uint8Array(data), rootUrl, fileName);\n this._unpackBinaryAsync(new DataReader({\n readAsync: (byteOffset, byteLength) => readAsync(data, byteOffset, byteLength),\n byteLength: data.byteLength,\n })).then((loaderData) => {\n onSuccess(loaderData);\n }, onError ? (error) => onError(undefined, error) : undefined);\n }, true, onError);\n }\n return this._loadFile(scene, fileOrUrl, (data) => {\n this._validate(scene, new Uint8Array(data), rootUrl, fileName);\n onSuccess({ json: this._parseJson(data) });\n }, useArrayBuffer, onError);\n }\n /**\n * @internal\n */\n _loadBinary(scene, data, rootUrl, onSuccess, onError, fileName) {\n this._validate(scene, data, rootUrl, fileName);\n this._unpackBinaryAsync(new DataReader({\n readAsync: (byteOffset, byteLength) => readViewAsync(data, byteOffset, byteLength),\n byteLength: data.byteLength,\n })).then((loaderData) => {\n onSuccess(loaderData);\n }, onError ? (error) => onError(undefined, error) : undefined);\n }\n /**\n * @internal\n */\n importMeshAsync(meshesNames, scene, data, rootUrl, onProgress, fileName) {\n return Promise.resolve().then(() => {\n this.onParsedObservable.notifyObservers(data);\n this.onParsedObservable.clear();\n this._log(`Loading ${fileName || \"\"}`);\n this._loader = this._getLoader(data);\n return this._loader.importMeshAsync(meshesNames, scene, null, data, rootUrl, onProgress, fileName);\n });\n }\n /**\n * @internal\n */\n loadAsync(scene, data, rootUrl, onProgress, fileName) {\n return Promise.resolve().then(() => {\n this.onParsedObservable.notifyObservers(data);\n this.onParsedObservable.clear();\n this._log(`Loading ${fileName || \"\"}`);\n this._loader = this._getLoader(data);\n return this._loader.loadAsync(scene, data, rootUrl, onProgress, fileName);\n });\n }\n /**\n * @internal\n */\n loadAssetContainerAsync(scene, data, rootUrl, onProgress, fileName) {\n return Promise.resolve().then(() => {\n this.onParsedObservable.notifyObservers(data);\n this.onParsedObservable.clear();\n this._log(`Loading ${fileName || \"\"}`);\n this._loader = this._getLoader(data);\n // Prepare the asset container.\n const container = new AssetContainer(scene);\n // Get materials/textures when loading to add to container\n const materials = [];\n this.onMaterialLoadedObservable.add((material) => {\n materials.push(material);\n });\n const textures = [];\n this.onTextureLoadedObservable.add((texture) => {\n textures.push(texture);\n });\n const cameras = [];\n this.onCameraLoadedObservable.add((camera) => {\n cameras.push(camera);\n });\n const morphTargetManagers = [];\n this.onMeshLoadedObservable.add((mesh) => {\n if (mesh.morphTargetManager) {\n morphTargetManagers.push(mesh.morphTargetManager);\n }\n });\n return this._loader.importMeshAsync(null, scene, container, data, rootUrl, onProgress, fileName).then((result) => {\n Array.prototype.push.apply(container.geometries, result.geometries);\n Array.prototype.push.apply(container.meshes, result.meshes);\n Array.prototype.push.apply(container.particleSystems, result.particleSystems);\n Array.prototype.push.apply(container.skeletons, result.skeletons);\n Array.prototype.push.apply(container.animationGroups, result.animationGroups);\n Array.prototype.push.apply(container.materials, materials);\n Array.prototype.push.apply(container.textures, textures);\n Array.prototype.push.apply(container.lights, result.lights);\n Array.prototype.push.apply(container.transformNodes, result.transformNodes);\n Array.prototype.push.apply(container.cameras, cameras);\n Array.prototype.push.apply(container.morphTargetManagers, morphTargetManagers);\n return container;\n });\n });\n }\n /**\n * @internal\n */\n canDirectLoad(data) {\n return ((data.indexOf(\"asset\") !== -1 && data.indexOf(\"version\") !== -1) ||\n data.startsWith(\"data:base64,\" + GLTFFileLoader._MagicBase64Encoded) || // this is technically incorrect, but will continue to support for backcompat.\n data.startsWith(\"data:;base64,\" + GLTFFileLoader._MagicBase64Encoded) ||\n data.startsWith(\"data:application/octet-stream;base64,\" + GLTFFileLoader._MagicBase64Encoded) ||\n data.startsWith(\"data:model/gltf-binary;base64,\" + GLTFFileLoader._MagicBase64Encoded));\n }\n /**\n * @internal\n */\n directLoad(scene, data) {\n if (data.startsWith(\"base64,\" + GLTFFileLoader._MagicBase64Encoded) || // this is technically incorrect, but will continue to support for backcompat.\n data.startsWith(\";base64,\" + GLTFFileLoader._MagicBase64Encoded) ||\n data.startsWith(\"application/octet-stream;base64,\" + GLTFFileLoader._MagicBase64Encoded) ||\n data.startsWith(\"model/gltf-binary;base64,\" + GLTFFileLoader._MagicBase64Encoded)) {\n const arrayBuffer = DecodeBase64UrlToBinary(data);\n this._validate(scene, new Uint8Array(arrayBuffer));\n return this._unpackBinaryAsync(new DataReader({\n readAsync: (byteOffset, byteLength) => readAsync(arrayBuffer, byteOffset, byteLength),\n byteLength: arrayBuffer.byteLength,\n }));\n }\n this._validate(scene, data);\n return Promise.resolve({ json: this._parseJson(data) });\n }\n /** @internal */\n createPlugin() {\n return new GLTFFileLoader();\n }\n /**\n * The loader state or null if the loader is not active.\n */\n get loaderState() {\n return this._state;\n }\n /**\n * Returns a promise that resolves when the asset is completely loaded.\n * @returns a promise that resolves when the asset is completely loaded.\n */\n whenCompleteAsync() {\n return new Promise((resolve, reject) => {\n this.onCompleteObservable.addOnce(() => {\n resolve();\n });\n this.onErrorObservable.addOnce((reason) => {\n reject(reason);\n });\n });\n }\n /**\n * @internal\n */\n _setState(state) {\n if (this._state === state) {\n return;\n }\n this._state = state;\n this.onLoaderStateChangedObservable.notifyObservers(this._state);\n this._log(GLTFLoaderState[this._state]);\n }\n /**\n * @internal\n */\n _loadFile(scene, fileOrUrl, onSuccess, useArrayBuffer, onError, onOpened) {\n const request = scene._loadFile(fileOrUrl, onSuccess, (event) => {\n this._onProgress(event, request);\n }, true, useArrayBuffer, onError, onOpened);\n request.onCompleteObservable.add((request) => {\n this._requests.splice(this._requests.indexOf(request), 1);\n });\n this._requests.push(request);\n return request;\n }\n _onProgress(event, request) {\n if (!this._progressCallback) {\n return;\n }\n request._lengthComputable = event.lengthComputable;\n request._loaded = event.loaded;\n request._total = event.total;\n let lengthComputable = true;\n let loaded = 0;\n let total = 0;\n for (const request of this._requests) {\n if (request._lengthComputable === undefined || request._loaded === undefined || request._total === undefined) {\n return;\n }\n lengthComputable = lengthComputable && request._lengthComputable;\n loaded += request._loaded;\n total += request._total;\n }\n this._progressCallback({\n lengthComputable: lengthComputable,\n loaded: loaded,\n total: lengthComputable ? total : 0,\n });\n }\n _validate(scene, data, rootUrl = \"\", fileName = \"\") {\n if (!this.validate) {\n return;\n }\n this._startPerformanceCounter(\"Validate JSON\");\n GLTFValidation.ValidateAsync(data, rootUrl, fileName, (uri) => {\n return this.preprocessUrlAsync(rootUrl + uri).then((url) => scene._loadFileAsync(url, undefined, true, true));\n }).then((result) => {\n this._endPerformanceCounter(\"Validate JSON\");\n this.onValidatedObservable.notifyObservers(result);\n this.onValidatedObservable.clear();\n }, (reason) => {\n this._endPerformanceCounter(\"Validate JSON\");\n Tools.Warn(`Failed to validate: ${reason.message}`);\n this.onValidatedObservable.clear();\n });\n }\n _getLoader(loaderData) {\n const asset = loaderData.json.asset || {};\n this._log(`Asset version: ${asset.version}`);\n asset.minVersion && this._log(`Asset minimum version: ${asset.minVersion}`);\n asset.generator && this._log(`Asset generator: ${asset.generator}`);\n const version = GLTFFileLoader._parseVersion(asset.version);\n if (!version) {\n throw new Error(\"Invalid version: \" + asset.version);\n }\n if (asset.minVersion !== undefined) {\n const minVersion = GLTFFileLoader._parseVersion(asset.minVersion);\n if (!minVersion) {\n throw new Error(\"Invalid minimum version: \" + asset.minVersion);\n }\n if (GLTFFileLoader._compareVersion(minVersion, { major: 2, minor: 0 }) > 0) {\n throw new Error(\"Incompatible minimum version: \" + asset.minVersion);\n }\n }\n const createLoaders = {\n 1: GLTFFileLoader._CreateGLTF1Loader,\n 2: GLTFFileLoader._CreateGLTF2Loader,\n };\n const createLoader = createLoaders[version.major];\n if (!createLoader) {\n throw new Error(\"Unsupported version: \" + asset.version);\n }\n return createLoader(this);\n }\n _parseJson(json) {\n this._startPerformanceCounter(\"Parse JSON\");\n this._log(`JSON length: ${json.length}`);\n const parsed = JSON.parse(json);\n this._endPerformanceCounter(\"Parse JSON\");\n return parsed;\n }\n _unpackBinaryAsync(dataReader) {\n this._startPerformanceCounter(\"Unpack Binary\");\n // Read magic + version + length + json length + json format\n return dataReader.loadAsync(20).then(() => {\n const Binary = {\n Magic: 0x46546c67,\n };\n const magic = dataReader.readUint32();\n if (magic !== Binary.Magic) {\n throw new RuntimeError(\"Unexpected magic: \" + magic, ErrorCodes.GLTFLoaderUnexpectedMagicError);\n }\n const version = dataReader.readUint32();\n if (this.loggingEnabled) {\n this._log(`Binary version: ${version}`);\n }\n const length = dataReader.readUint32();\n if (!this.useRangeRequests && length !== dataReader.buffer.byteLength) {\n Logger.Warn(`Length in header does not match actual data length: ${length} != ${dataReader.buffer.byteLength}`);\n }\n let unpacked;\n switch (version) {\n case 1: {\n unpacked = this._unpackBinaryV1Async(dataReader, length);\n break;\n }\n case 2: {\n unpacked = this._unpackBinaryV2Async(dataReader, length);\n break;\n }\n default: {\n throw new Error(\"Unsupported version: \" + version);\n }\n }\n this._endPerformanceCounter(\"Unpack Binary\");\n return unpacked;\n });\n }\n _unpackBinaryV1Async(dataReader, length) {\n const ContentFormat = {\n JSON: 0,\n };\n const contentLength = dataReader.readUint32();\n const contentFormat = dataReader.readUint32();\n if (contentFormat !== ContentFormat.JSON) {\n throw new Error(`Unexpected content format: ${contentFormat}`);\n }\n const bodyLength = length - dataReader.byteOffset;\n const data = { json: this._parseJson(dataReader.readString(contentLength)), bin: null };\n if (bodyLength !== 0) {\n const startByteOffset = dataReader.byteOffset;\n data.bin = {\n readAsync: (byteOffset, byteLength) => dataReader.buffer.readAsync(startByteOffset + byteOffset, byteLength),\n byteLength: bodyLength,\n };\n }\n return Promise.resolve(data);\n }\n _unpackBinaryV2Async(dataReader, length) {\n const ChunkFormat = {\n JSON: 0x4e4f534a,\n BIN: 0x004e4942,\n };\n // Read the JSON chunk header.\n const chunkLength = dataReader.readUint32();\n const chunkFormat = dataReader.readUint32();\n if (chunkFormat !== ChunkFormat.JSON) {\n throw new Error(\"First chunk format is not JSON\");\n }\n // Bail if there are no other chunks.\n if (dataReader.byteOffset + chunkLength === length) {\n return dataReader.loadAsync(chunkLength).then(() => {\n return { json: this._parseJson(dataReader.readString(chunkLength)), bin: null };\n });\n }\n // Read the JSON chunk and the length and type of the next chunk.\n return dataReader.loadAsync(chunkLength + 8).then(() => {\n const data = { json: this._parseJson(dataReader.readString(chunkLength)), bin: null };\n const readAsync = () => {\n const chunkLength = dataReader.readUint32();\n const chunkFormat = dataReader.readUint32();\n switch (chunkFormat) {\n case ChunkFormat.JSON: {\n throw new Error(\"Unexpected JSON chunk\");\n }\n case ChunkFormat.BIN: {\n const startByteOffset = dataReader.byteOffset;\n data.bin = {\n readAsync: (byteOffset, byteLength) => dataReader.buffer.readAsync(startByteOffset + byteOffset, byteLength),\n byteLength: chunkLength,\n };\n dataReader.skipBytes(chunkLength);\n break;\n }\n default: {\n // ignore unrecognized chunkFormat\n dataReader.skipBytes(chunkLength);\n break;\n }\n }\n if (dataReader.byteOffset !== length) {\n return dataReader.loadAsync(8).then(readAsync);\n }\n return Promise.resolve(data);\n };\n return readAsync();\n });\n }\n static _parseVersion(version) {\n if (version === \"1.0\" || version === \"1.0.1\") {\n return {\n major: 1,\n minor: 0,\n };\n }\n const match = (version + \"\").match(/^(\\d+)\\.(\\d+)/);\n if (!match) {\n return null;\n }\n return {\n major: parseInt(match[1]),\n minor: parseInt(match[2]),\n };\n }\n static _compareVersion(a, b) {\n if (a.major > b.major) {\n return 1;\n }\n if (a.major < b.major) {\n return -1;\n }\n if (a.minor > b.minor) {\n return 1;\n }\n if (a.minor < b.minor) {\n return -1;\n }\n return 0;\n }\n /**\n * @internal\n */\n _logOpen(message) {\n this._log(message);\n this._logIndentLevel++;\n }\n /** @internal */\n _logClose() {\n --this._logIndentLevel;\n }\n _logEnabled(message) {\n const spaces = GLTFFileLoader._logSpaces.substr(0, this._logIndentLevel * 2);\n Logger.Log(`${spaces}${message}`);\n }\n _logDisabled(message) { }\n _startPerformanceCounterEnabled(counterName) {\n Tools.StartPerformanceCounter(counterName);\n }\n _startPerformanceCounterDisabled(counterName) { }\n _endPerformanceCounterEnabled(counterName) {\n Tools.EndPerformanceCounter(counterName);\n }\n _endPerformanceCounterDisabled(counterName) { }\n}\n// ----------\n// V1 options\n// ----------\n/**\n * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders.\n * Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled.\n * Defaults to true.\n * @internal\n */\nGLTFFileLoader.IncrementalLoading = true;\n/**\n * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters.\n * Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates.\n * @internal\n */\nGLTFFileLoader.HomogeneousCoordinates = false;\nGLTFFileLoader._MagicBase64Encoded = \"Z2xURg\"; // \"glTF\" base64 encoded (without the quotes!)\nGLTFFileLoader._logSpaces = \" \";\nif (SceneLoader) {\n SceneLoader.RegisterPlugin(new GLTFFileLoader());\n}\n//# sourceMappingURL=glTFFileLoader.js.map","import { Animation } from \"@inter-ikea-betrakta-babylonjs/core/Animations/animation.js\";\nimport { Quaternion, Vector3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js\";\n/** @internal */\nexport function getVector3(_target, source, offset, scale) {\n return Vector3.FromArray(source, offset).scaleInPlace(scale);\n}\n/** @internal */\nexport function getQuaternion(_target, source, offset, scale) {\n return Quaternion.FromArray(source, offset).scaleInPlace(scale);\n}\n/** @internal */\nexport function getWeights(target, source, offset, scale) {\n const value = new Array(target._numMorphTargets);\n for (let i = 0; i < value.length; i++) {\n value[i] = source[offset++] * scale;\n }\n return value;\n}\n/** @internal */\nexport class AnimationPropertyInfo {\n /** @internal */\n constructor(type, name, getValue, getStride) {\n this.type = type;\n this.name = name;\n this.getValue = getValue;\n this.getStride = getStride;\n }\n _buildAnimation(name, fps, keys) {\n const babylonAnimation = new Animation(name, this.name, fps, this.type);\n babylonAnimation.setKeys(keys);\n return babylonAnimation;\n }\n}\n/** @internal */\nexport class TransformNodeAnimationPropertyInfo extends AnimationPropertyInfo {\n /** @internal */\n buildAnimations(target, name, fps, keys, callback) {\n callback(target._babylonTransformNode, this._buildAnimation(name, fps, keys));\n }\n}\n/** @internal */\nexport class WeightAnimationPropertyInfo extends AnimationPropertyInfo {\n buildAnimations(target, name, fps, keys, callback) {\n if (target._numMorphTargets) {\n for (let targetIndex = 0; targetIndex < target._numMorphTargets; targetIndex++) {\n const babylonAnimation = new Animation(`${name}_${targetIndex}`, this.name, fps, this.type);\n babylonAnimation.setKeys(keys.map((key) => ({\n frame: key.frame,\n inTangent: key.inTangent ? key.inTangent[targetIndex] : undefined,\n value: key.value[targetIndex],\n outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined,\n interpolation: key.interpolation,\n })));\n if (target._primitiveBabylonMeshes) {\n for (const babylonMesh of target._primitiveBabylonMeshes) {\n if (babylonMesh.morphTargetManager) {\n const morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);\n const babylonAnimationClone = babylonAnimation.clone();\n morphTarget.animations.push(babylonAnimationClone);\n callback(morphTarget, babylonAnimationClone);\n }\n }\n }\n }\n }\n }\n}\n/** @internal */\nexport const nodeAnimationData = {\n translation: [new TransformNodeAnimationPropertyInfo(Animation.ANIMATIONTYPE_VECTOR3, \"position\", getVector3, () => 3)],\n rotation: [new TransformNodeAnimationPropertyInfo(Animation.ANIMATIONTYPE_QUATERNION, \"rotationQuaternion\", getQuaternion, () => 4)],\n scale: [new TransformNodeAnimationPropertyInfo(Animation.ANIMATIONTYPE_VECTOR3, \"scaling\", getVector3, () => 3)],\n weights: [new WeightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"influence\", getWeights, (target) => target._numMorphTargets)],\n};\n//# sourceMappingURL=glTFLoaderAnimation.js.map","import { Deferred } from \"@inter-ikea-betrakta-babylonjs/core/Misc/deferred.js\";\nimport { Quaternion, Vector3, Matrix, TmpVectors } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js\";\nimport { Color3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js\";\nimport { Tools } from \"@inter-ikea-betrakta-babylonjs/core/Misc/tools.js\";\nimport { Camera } from \"@inter-ikea-betrakta-babylonjs/core/Cameras/camera.js\";\nimport { FreeCamera } from \"@inter-ikea-betrakta-babylonjs/core/Cameras/freeCamera.js\";\nimport { AnimationKeyInterpolation } from \"@inter-ikea-betrakta-babylonjs/core/Animations/animationKey.js\";\nimport { AnimationGroup } from \"@inter-ikea-betrakta-babylonjs/core/Animations/animationGroup.js\";\nimport { Bone } from \"@inter-ikea-betrakta-babylonjs/core/Bones/bone.js\";\nimport { Skeleton } from \"@inter-ikea-betrakta-babylonjs/core/Bones/skeleton.js\";\nimport { Material } from \"@inter-ikea-betrakta-babylonjs/core/Materials/material.js\";\nimport { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { Texture } from \"@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js\";\nimport { TransformNode } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/transformNode.js\";\nimport { Buffer, VertexBuffer } from \"@inter-ikea-betrakta-babylonjs/core/Buffers/buffer.js\";\nimport { Geometry } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/geometry.js\";\nimport { Mesh } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js\";\nimport { MorphTarget } from \"@inter-ikea-betrakta-babylonjs/core/Morph/morphTarget.js\";\nimport { MorphTargetManager } from \"@inter-ikea-betrakta-babylonjs/core/Morph/morphTargetManager.js\";\nimport { GLTFFileLoader, GLTFLoaderState, GLTFLoaderCoordinateSystemMode, GLTFLoaderAnimationStartMode } from \"../glTFFileLoader.js\";\nimport { DecodeBase64UrlToBinary, IsBase64DataUrl, LoadFileError } from \"@inter-ikea-betrakta-babylonjs/core/Misc/fileTools.js\";\nimport { Logger } from \"@inter-ikea-betrakta-babylonjs/core/Misc/logger.js\";\nimport { BoundingInfo } from \"@inter-ikea-betrakta-babylonjs/core/Culling/boundingInfo.js\";\nimport { nodeAnimationData } from \"./glTFLoaderAnimation.js\";\n// https://stackoverflow.com/a/48218209\nfunction mergeDeep(...objects) {\n const isObject = (obj) => obj && typeof obj === \"object\";\n return objects.reduce((prev, obj) => {\n Object.keys(obj).forEach((key) => {\n const pVal = prev[key];\n const oVal = obj[key];\n if (Array.isArray(pVal) && Array.isArray(oVal)) {\n prev[key] = pVal.concat(...oVal);\n }\n else if (isObject(pVal) && isObject(oVal)) {\n prev[key] = mergeDeep(pVal, oVal);\n }\n else {\n prev[key] = oVal;\n }\n });\n return prev;\n }, {});\n}\n/**\n * Helper class for working with arrays when loading the glTF asset\n */\nexport class ArrayItem {\n /**\n * Gets an item from the given array.\n * @param context The context when loading the asset\n * @param array The array to get the item from\n * @param index The index to the array\n * @returns The array item\n */\n static Get(context, array, index) {\n if (!array || index == undefined || !array[index]) {\n throw new Error(`${context}: Failed to find index (${index})`);\n }\n return array[index];\n }\n /**\n * Gets an item from the given array or returns null if not available.\n * @param array The array to get the item from\n * @param index The index to the array\n * @returns The array item or null\n */\n static TryGet(array, index) {\n if (!array || index == undefined || !array[index]) {\n return null;\n }\n return array[index];\n }\n /**\n * Assign an `index` field to each item of the given array.\n * @param array The array of items\n */\n static Assign(array) {\n if (array) {\n for (let index = 0; index < array.length; index++) {\n array[index].index = index;\n }\n }\n }\n}\n/**\n * The glTF 2.0 loader\n */\nexport class GLTFLoader {\n /**\n * Registers a loader extension.\n * @param name The name of the loader extension.\n * @param factory The factory function that creates the loader extension.\n */\n static RegisterExtension(name, factory) {\n if (GLTFLoader.UnregisterExtension(name)) {\n Logger.Warn(`Extension with the name '${name}' already exists`);\n }\n GLTFLoader._RegisteredExtensions[name] = {\n factory: factory,\n };\n }\n /**\n * Unregisters a loader extension.\n * @param name The name of the loader extension.\n * @returns A boolean indicating whether the extension has been unregistered\n */\n static UnregisterExtension(name) {\n if (!GLTFLoader._RegisteredExtensions[name]) {\n return false;\n }\n delete GLTFLoader._RegisteredExtensions[name];\n return true;\n }\n /**\n * The object that represents the glTF JSON.\n */\n get gltf() {\n if (!this._gltf) {\n throw new Error(\"glTF JSON is not available\");\n }\n return this._gltf;\n }\n /**\n * The BIN chunk of a binary glTF.\n */\n get bin() {\n return this._bin;\n }\n /**\n * The parent file loader.\n */\n get parent() {\n return this._parent;\n }\n /**\n * The Babylon scene when loading the asset.\n */\n get babylonScene() {\n if (!this._babylonScene) {\n throw new Error(\"Scene is not available\");\n }\n return this._babylonScene;\n }\n /**\n * The root Babylon mesh when loading the asset.\n */\n get rootBabylonMesh() {\n return this._rootBabylonMesh;\n }\n /**\n * @internal\n */\n constructor(parent) {\n /** @internal */\n this._completePromises = new Array();\n /** @internal */\n this._assetContainer = null;\n /** Storage */\n this._babylonLights = [];\n /** @internal */\n this._disableInstancedMesh = 0;\n /** @internal */\n this._allMaterialsDirtyRequired = false;\n this._extensions = new Array();\n this._disposed = false;\n this._rootUrl = null;\n this._fileName = null;\n this._uniqueRootUrl = null;\n this._bin = null;\n this._rootBabylonMesh = null;\n this._defaultBabylonMaterialData = {};\n this._postSceneLoadActions = new Array();\n this._parent = parent;\n }\n /** @internal */\n dispose() {\n if (this._disposed) {\n return;\n }\n this._disposed = true;\n this._completePromises.length = 0;\n this._extensions.forEach((extension) => extension.dispose && extension.dispose());\n this._extensions.length = 0;\n this._gltf = null; // TODO\n this._bin = null;\n this._babylonScene = null; // TODO\n this._rootBabylonMesh = null;\n this._defaultBabylonMaterialData = {};\n this._postSceneLoadActions.length = 0;\n this._parent.dispose();\n }\n /**\n * @internal\n */\n importMeshAsync(meshesNames, scene, container, data, rootUrl, onProgress, fileName = \"\") {\n return Promise.resolve().then(() => {\n this._babylonScene = scene;\n this._assetContainer = container;\n this._loadData(data);\n let nodes = null;\n if (meshesNames) {\n const nodeMap = {};\n if (this._gltf.nodes) {\n for (const node of this._gltf.nodes) {\n if (node.name) {\n nodeMap[node.name] = node.index;\n }\n }\n }\n const names = meshesNames instanceof Array ? meshesNames : [meshesNames];\n nodes = names.map((name) => {\n const node = nodeMap[name];\n if (node === undefined) {\n throw new Error(`Failed to find node '${name}'`);\n }\n return node;\n });\n }\n return this._loadAsync(rootUrl, fileName, nodes, () => {\n return {\n meshes: this._getMeshes(),\n particleSystems: [],\n skeletons: this._getSkeletons(),\n animationGroups: this._getAnimationGroups(),\n lights: this._babylonLights,\n transformNodes: this._getTransformNodes(),\n geometries: this._getGeometries(),\n };\n });\n });\n }\n /**\n * @internal\n */\n loadAsync(scene, data, rootUrl, onProgress, fileName = \"\") {\n return Promise.resolve().then(() => {\n this._babylonScene = scene;\n this._loadData(data);\n return this._loadAsync(rootUrl, fileName, null, () => undefined);\n });\n }\n _loadAsync(rootUrl, fileName, nodes, resultFunc) {\n return Promise.resolve()\n .then(() => {\n this._rootUrl = rootUrl;\n this._uniqueRootUrl = !rootUrl.startsWith(\"file:\") && fileName ? rootUrl : `${rootUrl}${Date.now()}/`;\n this._fileName = fileName;\n this._allMaterialsDirtyRequired = false;\n this._loadExtensions();\n this._checkExtensions();\n const loadingToReadyCounterName = `${GLTFLoaderState[GLTFLoaderState.LOADING]} => ${GLTFLoaderState[GLTFLoaderState.READY]}`;\n const loadingToCompleteCounterName = `${GLTFLoaderState[GLTFLoaderState.LOADING]} => ${GLTFLoaderState[GLTFLoaderState.COMPLETE]}`;\n this._parent._startPerformanceCounter(loadingToReadyCounterName);\n this._parent._startPerformanceCounter(loadingToCompleteCounterName);\n this._parent._setState(GLTFLoaderState.LOADING);\n this._extensionsOnLoading();\n const promises = new Array();\n // Block the marking of materials dirty until the scene is loaded.\n const oldBlockMaterialDirtyMechanism = this._babylonScene.blockMaterialDirtyMechanism;\n this._babylonScene.blockMaterialDirtyMechanism = true;\n if (!this.parent.loadOnlyMaterials) {\n if (nodes) {\n promises.push(this.loadSceneAsync(\"/nodes\", { nodes: nodes, index: -1 }));\n }\n else if (this._gltf.scene != undefined || (this._gltf.scenes && this._gltf.scenes[0])) {\n const scene = ArrayItem.Get(`/scene`, this._gltf.scenes, this._gltf.scene || 0);\n promises.push(this.loadSceneAsync(`/scenes/${scene.index}`, scene));\n }\n }\n if (!this.parent.skipMaterials && this.parent.loadAllMaterials && this._gltf.materials) {\n for (let m = 0; m < this._gltf.materials.length; ++m) {\n const material = this._gltf.materials[m];\n const context = \"/materials/\" + m;\n const babylonDrawMode = Material.TriangleFillMode;\n promises.push(this._loadMaterialAsync(context, material, null, babylonDrawMode, () => { }));\n }\n }\n // Restore the blocking of material dirty.\n if (this._allMaterialsDirtyRequired) {\n // This can happen if we add a light for instance as it will impact the whole scene.\n // This automatically resets everything if needed.\n this._babylonScene.blockMaterialDirtyMechanism = oldBlockMaterialDirtyMechanism;\n }\n else {\n // By default a newly created material is dirty so there is no need to flag the full scene as dirty.\n // For perf reasons, we then bypass blockMaterialDirtyMechanism as this would \"dirty\" the entire scene.\n this._babylonScene._forceBlockMaterialDirtyMechanism(oldBlockMaterialDirtyMechanism);\n }\n if (this._parent.compileMaterials) {\n promises.push(this._compileMaterialsAsync());\n }\n if (this._parent.compileShadowGenerators) {\n promises.push(this._compileShadowGeneratorsAsync());\n }\n const resultPromise = Promise.all(promises).then(() => {\n if (this._rootBabylonMesh) {\n this._rootBabylonMesh.setEnabled(true);\n }\n this._extensionsOnReady();\n this._parent._setState(GLTFLoaderState.READY);\n this._startAnimations();\n return resultFunc();\n });\n return resultPromise.then((result) => {\n this._parent._endPerformanceCounter(loadingToReadyCounterName);\n Tools.SetImmediate(() => {\n if (!this._disposed) {\n Promise.all(this._completePromises).then(() => {\n this._parent._endPerformanceCounter(loadingToCompleteCounterName);\n this._parent._setState(GLTFLoaderState.COMPLETE);\n this._parent.onCompleteObservable.notifyObservers(undefined);\n this._parent.onCompleteObservable.clear();\n this.dispose();\n }, (error) => {\n this._parent.onErrorObservable.notifyObservers(error);\n this._parent.onErrorObservable.clear();\n this.dispose();\n });\n }\n });\n return result;\n });\n })\n .catch((error) => {\n if (!this._disposed) {\n this._parent.onErrorObservable.notifyObservers(error);\n this._parent.onErrorObservable.clear();\n this.dispose();\n }\n throw error;\n });\n }\n _loadData(data) {\n this._gltf = data.json;\n this._setupData();\n if (data.bin) {\n const buffers = this._gltf.buffers;\n if (buffers && buffers[0] && !buffers[0].uri) {\n const binaryBuffer = buffers[0];\n if (binaryBuffer.byteLength < data.bin.byteLength - 3 || binaryBuffer.byteLength > data.bin.byteLength) {\n Logger.Warn(`Binary buffer length (${binaryBuffer.byteLength}) from JSON does not match chunk length (${data.bin.byteLength})`);\n }\n this._bin = data.bin;\n }\n else {\n Logger.Warn(\"Unexpected BIN chunk\");\n }\n }\n }\n _setupData() {\n ArrayItem.Assign(this._gltf.accessors);\n ArrayItem.Assign(this._gltf.animations);\n ArrayItem.Assign(this._gltf.buffers);\n ArrayItem.Assign(this._gltf.bufferViews);\n ArrayItem.Assign(this._gltf.cameras);\n ArrayItem.Assign(this._gltf.images);\n ArrayItem.Assign(this._gltf.materials);\n ArrayItem.Assign(this._gltf.meshes);\n ArrayItem.Assign(this._gltf.nodes);\n ArrayItem.Assign(this._gltf.samplers);\n ArrayItem.Assign(this._gltf.scenes);\n ArrayItem.Assign(this._gltf.skins);\n ArrayItem.Assign(this._gltf.textures);\n if (this._gltf.nodes) {\n const nodeParents = {};\n for (const node of this._gltf.nodes) {\n if (node.children) {\n for (const index of node.children) {\n nodeParents[index] = node.index;\n }\n }\n }\n const rootNode = this._createRootNode();\n for (const node of this._gltf.nodes) {\n const parentIndex = nodeParents[node.index];\n node.parent = parentIndex === undefined ? rootNode : this._gltf.nodes[parentIndex];\n }\n }\n }\n _loadExtensions() {\n for (const name in GLTFLoader._RegisteredExtensions) {\n const extension = GLTFLoader._RegisteredExtensions[name].factory(this);\n if (extension.name !== name) {\n Logger.Warn(`The name of the glTF loader extension instance does not match the registered name: ${extension.name} !== ${name}`);\n }\n this._extensions.push(extension);\n this._parent.onExtensionLoadedObservable.notifyObservers(extension);\n }\n this._extensions.sort((a, b) => (a.order || Number.MAX_VALUE) - (b.order || Number.MAX_VALUE));\n this._parent.onExtensionLoadedObservable.clear();\n }\n _checkExtensions() {\n if (this._gltf.extensionsRequired) {\n for (const name of this._gltf.extensionsRequired) {\n const available = this._extensions.some((extension) => extension.name === name && extension.enabled);\n if (!available) {\n throw new Error(`Require extension ${name} is not available`);\n }\n }\n }\n }\n _createRootNode() {\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n this._rootBabylonMesh = new Mesh(\"__root__\", this._babylonScene);\n this._rootBabylonMesh._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n this._rootBabylonMesh.setEnabled(false);\n const rootNode = {\n _babylonTransformNode: this._rootBabylonMesh,\n index: -1,\n };\n switch (this._parent.coordinateSystemMode) {\n case GLTFLoaderCoordinateSystemMode.AUTO: {\n if (!this._babylonScene.useRightHandedSystem) {\n rootNode.rotation = [0, 1, 0, 0];\n rootNode.scale = [1, 1, -1];\n GLTFLoader._LoadTransform(rootNode, this._rootBabylonMesh);\n }\n break;\n }\n case GLTFLoaderCoordinateSystemMode.FORCE_RIGHT_HANDED: {\n this._babylonScene.useRightHandedSystem = true;\n break;\n }\n default: {\n throw new Error(`Invalid coordinate system mode (${this._parent.coordinateSystemMode})`);\n }\n }\n this._parent.onMeshLoadedObservable.notifyObservers(this._rootBabylonMesh);\n return rootNode;\n }\n /**\n * Loads a glTF scene.\n * @param context The context when loading the asset\n * @param scene The glTF scene property\n * @returns A promise that resolves when the load is complete\n */\n loadSceneAsync(context, scene) {\n const extensionPromise = this._extensionsLoadSceneAsync(context, scene);\n if (extensionPromise) {\n return extensionPromise;\n }\n const promises = new Array();\n this.logOpen(`${context} ${scene.name || \"\"}`);\n if (scene.nodes) {\n for (const index of scene.nodes) {\n const node = ArrayItem.Get(`${context}/nodes/${index}`, this._gltf.nodes, index);\n promises.push(this.loadNodeAsync(`/nodes/${node.index}`, node, (babylonMesh) => {\n babylonMesh.parent = this._rootBabylonMesh;\n }));\n }\n }\n for (const action of this._postSceneLoadActions) {\n action();\n }\n promises.push(this._loadAnimationsAsync());\n this.logClose();\n return Promise.all(promises).then(() => { });\n }\n _forEachPrimitive(node, callback) {\n if (node._primitiveBabylonMeshes) {\n for (const babylonMesh of node._primitiveBabylonMeshes) {\n callback(babylonMesh);\n }\n }\n }\n _getGeometries() {\n const geometries = [];\n const nodes = this._gltf.nodes;\n if (nodes) {\n for (const node of nodes) {\n this._forEachPrimitive(node, (babylonMesh) => {\n const geometry = babylonMesh.geometry;\n if (geometry && geometries.indexOf(geometry) === -1) {\n geometries.push(geometry);\n }\n });\n }\n }\n return geometries;\n }\n _getMeshes() {\n const meshes = [];\n // Root mesh is always first, if available.\n if (this._rootBabylonMesh) {\n meshes.push(this._rootBabylonMesh);\n }\n const nodes = this._gltf.nodes;\n if (nodes) {\n for (const node of nodes) {\n this._forEachPrimitive(node, (babylonMesh) => {\n meshes.push(babylonMesh);\n });\n }\n }\n return meshes;\n }\n _getTransformNodes() {\n const transformNodes = [];\n const nodes = this._gltf.nodes;\n if (nodes) {\n for (const node of nodes) {\n if (node._babylonTransformNode && node._babylonTransformNode.getClassName() === \"TransformNode\") {\n transformNodes.push(node._babylonTransformNode);\n }\n if (node._babylonTransformNodeForSkin) {\n transformNodes.push(node._babylonTransformNodeForSkin);\n }\n }\n }\n return transformNodes;\n }\n _getSkeletons() {\n const skeletons = [];\n const skins = this._gltf.skins;\n if (skins) {\n for (const skin of skins) {\n if (skin._data) {\n skeletons.push(skin._data.babylonSkeleton);\n }\n }\n }\n return skeletons;\n }\n _getAnimationGroups() {\n const animationGroups = [];\n const animations = this._gltf.animations;\n if (animations) {\n for (const animation of animations) {\n if (animation._babylonAnimationGroup) {\n animationGroups.push(animation._babylonAnimationGroup);\n }\n }\n }\n return animationGroups;\n }\n _startAnimations() {\n switch (this._parent.animationStartMode) {\n case GLTFLoaderAnimationStartMode.NONE: {\n // do nothing\n break;\n }\n case GLTFLoaderAnimationStartMode.FIRST: {\n const babylonAnimationGroups = this._getAnimationGroups();\n if (babylonAnimationGroups.length !== 0) {\n babylonAnimationGroups[0].start(true);\n }\n break;\n }\n case GLTFLoaderAnimationStartMode.ALL: {\n const babylonAnimationGroups = this._getAnimationGroups();\n for (const babylonAnimationGroup of babylonAnimationGroups) {\n babylonAnimationGroup.start(true);\n }\n break;\n }\n default: {\n Logger.Error(`Invalid animation start mode (${this._parent.animationStartMode})`);\n return;\n }\n }\n }\n /**\n * Loads a glTF node.\n * @param context The context when loading the asset\n * @param node The glTF node property\n * @param assign A function called synchronously after parsing the glTF properties\n * @returns A promise that resolves with the loaded Babylon mesh when the load is complete\n */\n loadNodeAsync(context, node, assign = () => { }) {\n const extensionPromise = this._extensionsLoadNodeAsync(context, node, assign);\n if (extensionPromise) {\n return extensionPromise;\n }\n if (node._babylonTransformNode) {\n throw new Error(`${context}: Invalid recursive node hierarchy`);\n }\n const promises = new Array();\n this.logOpen(`${context} ${node.name || \"\"}`);\n const loadNode = (babylonTransformNode) => {\n GLTFLoader.AddPointerMetadata(babylonTransformNode, context);\n GLTFLoader._LoadTransform(node, babylonTransformNode);\n if (node.camera != undefined) {\n const camera = ArrayItem.Get(`${context}/camera`, this._gltf.cameras, node.camera);\n promises.push(this.loadCameraAsync(`/cameras/${camera.index}`, camera, (babylonCamera) => {\n babylonCamera.parent = babylonTransformNode;\n }));\n }\n if (node.children) {\n for (const index of node.children) {\n const childNode = ArrayItem.Get(`${context}/children/${index}`, this._gltf.nodes, index);\n promises.push(this.loadNodeAsync(`/nodes/${childNode.index}`, childNode, (childBabylonMesh) => {\n childBabylonMesh.parent = babylonTransformNode;\n }));\n }\n }\n assign(babylonTransformNode);\n };\n if (node.mesh == undefined || node.skin != undefined) {\n const nodeName = node.name || `node${node.index}`;\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n const transformNode = new TransformNode(nodeName, this._babylonScene);\n transformNode._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n if (node.mesh == undefined) {\n node._babylonTransformNode = transformNode;\n }\n else {\n node._babylonTransformNodeForSkin = transformNode;\n }\n loadNode(transformNode);\n }\n if (node.mesh != undefined) {\n if (node.skin == undefined) {\n const mesh = ArrayItem.Get(`${context}/mesh`, this._gltf.meshes, node.mesh);\n promises.push(this._loadMeshAsync(`/meshes/${mesh.index}`, node, mesh, loadNode));\n }\n else {\n // See https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins (second implementation note)\n // This code path will place the skinned mesh as a sibling of the skeleton root node without loading the\n // transform, which effectively ignores the transform of the skinned mesh, as per spec.\n const mesh = ArrayItem.Get(`${context}/mesh`, this._gltf.meshes, node.mesh);\n promises.push(this._loadMeshAsync(`/meshes/${mesh.index}`, node, mesh, (babylonTransformNode) => {\n const babylonTransformNodeForSkin = node._babylonTransformNodeForSkin;\n // Merge the metadata from the skin node to the skinned mesh in case a loader extension added metadata.\n babylonTransformNode.metadata = mergeDeep(babylonTransformNodeForSkin.metadata, babylonTransformNode.metadata || {});\n const skin = ArrayItem.Get(`${context}/skin`, this._gltf.skins, node.skin);\n promises.push(this._loadSkinAsync(`/skins/${skin.index}`, node, skin, (babylonSkeleton) => {\n this._forEachPrimitive(node, (babylonMesh) => {\n babylonMesh.skeleton = babylonSkeleton;\n });\n // Wait until all the nodes are parented before parenting the skinned mesh.\n this._postSceneLoadActions.push(() => {\n if (skin.skeleton != undefined) {\n // Place the skinned mesh node as a sibling of the skeleton root node.\n // Handle special case when the parent of the skeleton root is the skinned mesh.\n const parentNode = ArrayItem.Get(`/skins/${skin.index}/skeleton`, this._gltf.nodes, skin.skeleton).parent;\n if (node.index === parentNode.index) {\n babylonTransformNode.parent = babylonTransformNodeForSkin.parent;\n }\n else {\n babylonTransformNode.parent = parentNode._babylonTransformNode;\n }\n }\n else {\n babylonTransformNode.parent = this._rootBabylonMesh;\n }\n this._parent.onSkinLoadedObservable.notifyObservers({ node: babylonTransformNodeForSkin, skinnedNode: babylonTransformNode });\n });\n }));\n }));\n }\n }\n this.logClose();\n return Promise.all(promises).then(() => {\n this._forEachPrimitive(node, (babylonMesh) => {\n if (babylonMesh.geometry && babylonMesh.geometry.useBoundingInfoFromGeometry) {\n // simply apply the world matrices to the bounding info - the extends are already ok\n babylonMesh._updateBoundingInfo();\n }\n else {\n babylonMesh.refreshBoundingInfo(true);\n }\n });\n return node._babylonTransformNode;\n });\n }\n _loadMeshAsync(context, node, mesh, assign) {\n const primitives = mesh.primitives;\n if (!primitives || !primitives.length) {\n throw new Error(`${context}: Primitives are missing`);\n }\n if (primitives[0].index == undefined) {\n ArrayItem.Assign(primitives);\n }\n const promises = new Array();\n this.logOpen(`${context} ${mesh.name || \"\"}`);\n const name = node.name || `node${node.index}`;\n if (primitives.length === 1) {\n const primitive = mesh.primitives[0];\n promises.push(this._loadMeshPrimitiveAsync(`${context}/primitives/${primitive.index}`, name, node, mesh, primitive, (babylonMesh) => {\n node._babylonTransformNode = babylonMesh;\n node._primitiveBabylonMeshes = [babylonMesh];\n }));\n }\n else {\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n node._babylonTransformNode = new TransformNode(name, this._babylonScene);\n node._babylonTransformNode._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n node._primitiveBabylonMeshes = [];\n for (const primitive of primitives) {\n promises.push(this._loadMeshPrimitiveAsync(`${context}/primitives/${primitive.index}`, `${name}_primitive${primitive.index}`, node, mesh, primitive, (babylonMesh) => {\n babylonMesh.parent = node._babylonTransformNode;\n node._primitiveBabylonMeshes.push(babylonMesh);\n }));\n }\n }\n assign(node._babylonTransformNode);\n this.logClose();\n return Promise.all(promises).then(() => {\n return node._babylonTransformNode;\n });\n }\n /**\n * @internal Define this method to modify the default behavior when loading data for mesh primitives.\n * @param context The context when loading the asset\n * @param name The mesh name when loading the asset\n * @param node The glTF node when loading the asset\n * @param mesh The glTF mesh when loading the asset\n * @param primitive The glTF mesh primitive property\n * @param assign A function called synchronously after parsing the glTF properties\n * @returns A promise that resolves with the loaded mesh when the load is complete or null if not handled\n */\n _loadMeshPrimitiveAsync(context, name, node, mesh, primitive, assign) {\n const extensionPromise = this._extensionsLoadMeshPrimitiveAsync(context, name, node, mesh, primitive, assign);\n if (extensionPromise) {\n return extensionPromise;\n }\n this.logOpen(`${context}`);\n const shouldInstance = this._disableInstancedMesh === 0 && this._parent.createInstances && node.skin == undefined && !mesh.primitives[0].targets;\n let babylonAbstractMesh;\n let promise;\n if (shouldInstance && primitive._instanceData) {\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n babylonAbstractMesh = primitive._instanceData.babylonSourceMesh.createInstance(name);\n babylonAbstractMesh._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n promise = primitive._instanceData.promise;\n }\n else {\n const promises = new Array();\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n const babylonMesh = new Mesh(name, this._babylonScene);\n babylonMesh._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n babylonMesh.overrideMaterialSideOrientation = this._babylonScene.useRightHandedSystem ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation;\n this._createMorphTargets(context, node, mesh, primitive, babylonMesh);\n promises.push(this._loadVertexDataAsync(context, primitive, babylonMesh).then((babylonGeometry) => {\n return this._loadMorphTargetsAsync(context, primitive, babylonMesh, babylonGeometry).then(() => {\n if (this._disposed) {\n return;\n }\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n babylonGeometry.applyToMesh(babylonMesh);\n babylonGeometry._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n });\n }));\n const babylonDrawMode = GLTFLoader._GetDrawMode(context, primitive.mode);\n if (primitive.material == undefined) {\n let babylonMaterial = this._defaultBabylonMaterialData[babylonDrawMode];\n if (!babylonMaterial) {\n babylonMaterial = this._createDefaultMaterial(\"__GLTFLoader._default\", babylonDrawMode);\n this._parent.onMaterialLoadedObservable.notifyObservers(babylonMaterial);\n this._defaultBabylonMaterialData[babylonDrawMode] = babylonMaterial;\n }\n babylonMesh.material = babylonMaterial;\n }\n else if (!this.parent.skipMaterials) {\n const material = ArrayItem.Get(`${context}/material`, this._gltf.materials, primitive.material);\n promises.push(this._loadMaterialAsync(`/materials/${material.index}`, material, babylonMesh, babylonDrawMode, (babylonMaterial) => {\n babylonMesh.material = babylonMaterial;\n }));\n }\n promise = Promise.all(promises);\n if (shouldInstance) {\n primitive._instanceData = {\n babylonSourceMesh: babylonMesh,\n promise: promise,\n };\n }\n babylonAbstractMesh = babylonMesh;\n }\n GLTFLoader.AddPointerMetadata(babylonAbstractMesh, context);\n this._parent.onMeshLoadedObservable.notifyObservers(babylonAbstractMesh);\n assign(babylonAbstractMesh);\n this.logClose();\n return promise.then(() => {\n return babylonAbstractMesh;\n });\n }\n _loadVertexDataAsync(context, primitive, babylonMesh) {\n const extensionPromise = this._extensionsLoadVertexDataAsync(context, primitive, babylonMesh);\n if (extensionPromise) {\n return extensionPromise;\n }\n const attributes = primitive.attributes;\n if (!attributes) {\n throw new Error(`${context}: Attributes are missing`);\n }\n const promises = new Array();\n const babylonGeometry = new Geometry(babylonMesh.name, this._babylonScene);\n if (primitive.indices == undefined) {\n babylonMesh.isUnIndexed = true;\n }\n else {\n const accessor = ArrayItem.Get(`${context}/indices`, this._gltf.accessors, primitive.indices);\n promises.push(this._loadIndicesAccessorAsync(`/accessors/${accessor.index}`, accessor).then((data) => {\n babylonGeometry.setIndices(data);\n }));\n }\n const loadAttribute = (name, kind, callback) => {\n if (attributes[name] == undefined) {\n return;\n }\n babylonMesh._delayInfo = babylonMesh._delayInfo || [];\n if (babylonMesh._delayInfo.indexOf(kind) === -1) {\n babylonMesh._delayInfo.push(kind);\n }\n const accessor = ArrayItem.Get(`${context}/attributes/${name}`, this._gltf.accessors, attributes[name]);\n promises.push(this._loadVertexAccessorAsync(`/accessors/${accessor.index}`, accessor, kind).then((babylonVertexBuffer) => {\n if (babylonVertexBuffer.getKind() === VertexBuffer.PositionKind && !this.parent.alwaysComputeBoundingBox && !babylonMesh.skeleton) {\n if (accessor.min && accessor.max) {\n const min = TmpVectors.Vector3[0].copyFromFloats(...accessor.min);\n const max = TmpVectors.Vector3[1].copyFromFloats(...accessor.max);\n if (accessor.normalized && accessor.componentType !== 5126 /* AccessorComponentType.FLOAT */) {\n let divider = 1;\n switch (accessor.componentType) {\n case 5120 /* AccessorComponentType.BYTE */:\n divider = 127.0;\n break;\n case 5121 /* AccessorComponentType.UNSIGNED_BYTE */:\n divider = 255.0;\n break;\n case 5122 /* AccessorComponentType.SHORT */:\n divider = 32767.0;\n break;\n case 5123 /* AccessorComponentType.UNSIGNED_SHORT */:\n divider = 65535.0;\n break;\n }\n const oneOverDivider = 1 / divider;\n min.scaleInPlace(oneOverDivider);\n max.scaleInPlace(oneOverDivider);\n }\n babylonGeometry._boundingInfo = new BoundingInfo(min, max);\n babylonGeometry.useBoundingInfoFromGeometry = true;\n }\n }\n babylonGeometry.setVerticesBuffer(babylonVertexBuffer, accessor.count);\n }));\n if (kind == VertexBuffer.MatricesIndicesExtraKind) {\n babylonMesh.numBoneInfluencers = 8;\n }\n if (callback) {\n callback(accessor);\n }\n };\n loadAttribute(\"POSITION\", VertexBuffer.PositionKind);\n loadAttribute(\"NORMAL\", VertexBuffer.NormalKind);\n loadAttribute(\"TANGENT\", VertexBuffer.TangentKind);\n loadAttribute(\"TEXCOORD_0\", VertexBuffer.UVKind);\n loadAttribute(\"TEXCOORD_1\", VertexBuffer.UV2Kind);\n loadAttribute(\"TEXCOORD_2\", VertexBuffer.UV3Kind);\n loadAttribute(\"TEXCOORD_3\", VertexBuffer.UV4Kind);\n loadAttribute(\"TEXCOORD_4\", VertexBuffer.UV5Kind);\n loadAttribute(\"TEXCOORD_5\", VertexBuffer.UV6Kind);\n loadAttribute(\"JOINTS_0\", VertexBuffer.MatricesIndicesKind);\n loadAttribute(\"WEIGHTS_0\", VertexBuffer.MatricesWeightsKind);\n loadAttribute(\"JOINTS_1\", VertexBuffer.MatricesIndicesExtraKind);\n loadAttribute(\"WEIGHTS_1\", VertexBuffer.MatricesWeightsExtraKind);\n loadAttribute(\"COLOR_0\", VertexBuffer.ColorKind, (accessor) => {\n if (accessor.type === \"VEC4\" /* AccessorType.VEC4 */) {\n babylonMesh.hasVertexAlpha = true;\n }\n });\n return Promise.all(promises).then(() => {\n return babylonGeometry;\n });\n }\n _createMorphTargets(context, node, mesh, primitive, babylonMesh) {\n if (!primitive.targets) {\n return;\n }\n if (node._numMorphTargets == undefined) {\n node._numMorphTargets = primitive.targets.length;\n }\n else if (primitive.targets.length !== node._numMorphTargets) {\n throw new Error(`${context}: Primitives do not have the same number of targets`);\n }\n const targetNames = mesh.extras ? mesh.extras.targetNames : null;\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n babylonMesh.morphTargetManager = new MorphTargetManager(this._babylonScene);\n babylonMesh.morphTargetManager._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n babylonMesh.morphTargetManager.areUpdatesFrozen = true;\n for (let index = 0; index < primitive.targets.length; index++) {\n const weight = node.weights ? node.weights[index] : mesh.weights ? mesh.weights[index] : 0;\n const name = targetNames ? targetNames[index] : `morphTarget${index}`;\n babylonMesh.morphTargetManager.addTarget(new MorphTarget(name, weight, babylonMesh.getScene()));\n // TODO: tell the target whether it has positions, normals, tangents\n }\n }\n _loadMorphTargetsAsync(context, primitive, babylonMesh, babylonGeometry) {\n if (!primitive.targets) {\n return Promise.resolve();\n }\n const promises = new Array();\n const morphTargetManager = babylonMesh.morphTargetManager;\n for (let index = 0; index < morphTargetManager.numTargets; index++) {\n const babylonMorphTarget = morphTargetManager.getTarget(index);\n promises.push(this._loadMorphTargetVertexDataAsync(`${context}/targets/${index}`, babylonGeometry, primitive.targets[index], babylonMorphTarget));\n }\n return Promise.all(promises).then(() => {\n morphTargetManager.areUpdatesFrozen = false;\n });\n }\n _loadMorphTargetVertexDataAsync(context, babylonGeometry, attributes, babylonMorphTarget) {\n const promises = new Array();\n const loadAttribute = (attribute, kind, setData) => {\n if (attributes[attribute] == undefined) {\n return;\n }\n const babylonVertexBuffer = babylonGeometry.getVertexBuffer(kind);\n if (!babylonVertexBuffer) {\n return;\n }\n const accessor = ArrayItem.Get(`${context}/${attribute}`, this._gltf.accessors, attributes[attribute]);\n promises.push(this._loadFloatAccessorAsync(`/accessors/${accessor.index}`, accessor).then((data) => {\n setData(babylonVertexBuffer, data);\n }));\n };\n loadAttribute(\"POSITION\", VertexBuffer.PositionKind, (babylonVertexBuffer, data) => {\n const positions = new Float32Array(data.length);\n babylonVertexBuffer.forEach(data.length, (value, index) => {\n positions[index] = data[index] + value;\n });\n babylonMorphTarget.setPositions(positions);\n });\n loadAttribute(\"NORMAL\", VertexBuffer.NormalKind, (babylonVertexBuffer, data) => {\n const normals = new Float32Array(data.length);\n babylonVertexBuffer.forEach(normals.length, (value, index) => {\n normals[index] = data[index] + value;\n });\n babylonMorphTarget.setNormals(normals);\n });\n loadAttribute(\"TANGENT\", VertexBuffer.TangentKind, (babylonVertexBuffer, data) => {\n const tangents = new Float32Array((data.length / 3) * 4);\n let dataIndex = 0;\n babylonVertexBuffer.forEach((data.length / 3) * 4, (value, index) => {\n // Tangent data for morph targets is stored as xyz delta.\n // The vertexData.tangent is stored as xyzw.\n // So we need to skip every fourth vertexData.tangent.\n if ((index + 1) % 4 !== 0) {\n tangents[dataIndex] = data[dataIndex] + value;\n dataIndex++;\n }\n });\n babylonMorphTarget.setTangents(tangents);\n });\n return Promise.all(promises).then(() => { });\n }\n static _LoadTransform(node, babylonNode) {\n // Ignore the TRS of skinned nodes.\n // See https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins (second implementation note)\n if (node.skin != undefined) {\n return;\n }\n let position = Vector3.Zero();\n let rotation = Quaternion.Identity();\n let scaling = Vector3.One();\n if (node.matrix) {\n const matrix = Matrix.FromArray(node.matrix);\n matrix.decompose(scaling, rotation, position);\n }\n else {\n if (node.translation) {\n position = Vector3.FromArray(node.translation);\n }\n if (node.rotation) {\n rotation = Quaternion.FromArray(node.rotation);\n }\n if (node.scale) {\n scaling = Vector3.FromArray(node.scale);\n }\n }\n babylonNode.position = position;\n babylonNode.rotationQuaternion = rotation;\n babylonNode.scaling = scaling;\n }\n _loadSkinAsync(context, node, skin, assign) {\n const extensionPromise = this._extensionsLoadSkinAsync(context, node, skin);\n if (extensionPromise) {\n return extensionPromise;\n }\n if (skin._data) {\n assign(skin._data.babylonSkeleton);\n return skin._data.promise;\n }\n const skeletonId = `skeleton${skin.index}`;\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n const babylonSkeleton = new Skeleton(skin.name || skeletonId, skeletonId, this._babylonScene);\n babylonSkeleton._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n this._loadBones(context, skin, babylonSkeleton);\n const promise = this._loadSkinInverseBindMatricesDataAsync(context, skin).then((inverseBindMatricesData) => {\n this._updateBoneMatrices(babylonSkeleton, inverseBindMatricesData);\n });\n skin._data = {\n babylonSkeleton: babylonSkeleton,\n promise: promise,\n };\n assign(babylonSkeleton);\n return promise;\n }\n _loadBones(context, skin, babylonSkeleton) {\n if (skin.skeleton == undefined || this._parent.alwaysComputeSkeletonRootNode) {\n const rootNode = this._findSkeletonRootNode(`${context}/joints`, skin.joints);\n if (rootNode) {\n if (skin.skeleton === undefined) {\n skin.skeleton = rootNode.index;\n }\n else {\n const isParent = (a, b) => {\n for (; b.parent; b = b.parent) {\n if (b.parent === a) {\n return true;\n }\n }\n return false;\n };\n const skeletonNode = ArrayItem.Get(`${context}/skeleton`, this._gltf.nodes, skin.skeleton);\n if (skeletonNode !== rootNode && !isParent(skeletonNode, rootNode)) {\n Logger.Warn(`${context}/skeleton: Overriding with nearest common ancestor as skeleton node is not a common root`);\n skin.skeleton = rootNode.index;\n }\n }\n }\n else {\n Logger.Warn(`${context}: Failed to find common root`);\n }\n }\n const babylonBones = {};\n for (const index of skin.joints) {\n const node = ArrayItem.Get(`${context}/joints/${index}`, this._gltf.nodes, index);\n this._loadBone(node, skin, babylonSkeleton, babylonBones);\n }\n }\n _findSkeletonRootNode(context, joints) {\n if (joints.length === 0) {\n return null;\n }\n const paths = {};\n for (const index of joints) {\n const path = [];\n let node = ArrayItem.Get(`${context}/${index}`, this._gltf.nodes, index);\n while (node.index !== -1) {\n path.unshift(node);\n node = node.parent;\n }\n paths[index] = path;\n }\n let rootNode = null;\n for (let i = 0;; ++i) {\n let path = paths[joints[0]];\n if (i >= path.length) {\n return rootNode;\n }\n const node = path[i];\n for (let j = 1; j < joints.length; ++j) {\n path = paths[joints[j]];\n if (i >= path.length || node !== path[i]) {\n return rootNode;\n }\n }\n rootNode = node;\n }\n }\n _loadBone(node, skin, babylonSkeleton, babylonBones) {\n let babylonBone = babylonBones[node.index];\n if (babylonBone) {\n return babylonBone;\n }\n let parentBabylonBone = null;\n if (node.index !== skin.skeleton) {\n if (node.parent && node.parent.index !== -1) {\n parentBabylonBone = this._loadBone(node.parent, skin, babylonSkeleton, babylonBones);\n }\n else if (skin.skeleton !== undefined) {\n Logger.Warn(`/skins/${skin.index}/skeleton: Skeleton node is not a common root`);\n }\n }\n const boneIndex = skin.joints.indexOf(node.index);\n babylonBone = new Bone(node.name || `joint${node.index}`, babylonSkeleton, parentBabylonBone, this._getNodeMatrix(node), null, null, boneIndex);\n babylonBones[node.index] = babylonBone;\n // Wait until the scene is loaded to ensure the transform nodes are loaded.\n this._postSceneLoadActions.push(() => {\n // Link the Babylon bone with the corresponding Babylon transform node.\n // A glTF joint is a pointer to a glTF node in the glTF node hierarchy similar to Unity3D.\n babylonBone.linkTransformNode(node._babylonTransformNode);\n });\n return babylonBone;\n }\n _loadSkinInverseBindMatricesDataAsync(context, skin) {\n if (skin.inverseBindMatrices == undefined) {\n return Promise.resolve(null);\n }\n const accessor = ArrayItem.Get(`${context}/inverseBindMatrices`, this._gltf.accessors, skin.inverseBindMatrices);\n return this._loadFloatAccessorAsync(`/accessors/${accessor.index}`, accessor);\n }\n _updateBoneMatrices(babylonSkeleton, inverseBindMatricesData) {\n for (const babylonBone of babylonSkeleton.bones) {\n const baseMatrix = Matrix.Identity();\n const boneIndex = babylonBone._index;\n if (inverseBindMatricesData && boneIndex !== -1) {\n Matrix.FromArrayToRef(inverseBindMatricesData, boneIndex * 16, baseMatrix);\n baseMatrix.invertToRef(baseMatrix);\n }\n const babylonParentBone = babylonBone.getParent();\n if (babylonParentBone) {\n baseMatrix.multiplyToRef(babylonParentBone.getAbsoluteInverseBindMatrix(), baseMatrix);\n }\n babylonBone.updateMatrix(baseMatrix, false, false);\n babylonBone._updateAbsoluteBindMatrices(undefined, false);\n }\n }\n _getNodeMatrix(node) {\n return node.matrix\n ? Matrix.FromArray(node.matrix)\n : Matrix.Compose(node.scale ? Vector3.FromArray(node.scale) : Vector3.One(), node.rotation ? Quaternion.FromArray(node.rotation) : Quaternion.Identity(), node.translation ? Vector3.FromArray(node.translation) : Vector3.Zero());\n }\n /**\n * Loads a glTF camera.\n * @param context The context when loading the asset\n * @param camera The glTF camera property\n * @param assign A function called synchronously after parsing the glTF properties\n * @returns A promise that resolves with the loaded Babylon camera when the load is complete\n */\n loadCameraAsync(context, camera, assign = () => { }) {\n const extensionPromise = this._extensionsLoadCameraAsync(context, camera, assign);\n if (extensionPromise) {\n return extensionPromise;\n }\n const promises = new Array();\n this.logOpen(`${context} ${camera.name || \"\"}`);\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n const babylonCamera = new FreeCamera(camera.name || `camera${camera.index}`, Vector3.Zero(), this._babylonScene, false);\n babylonCamera._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n babylonCamera.ignoreParentScaling = true;\n camera._babylonCamera = babylonCamera;\n babylonCamera.rotation = new Vector3(0, Math.PI, 0);\n switch (camera.type) {\n case \"perspective\" /* CameraType.PERSPECTIVE */: {\n const perspective = camera.perspective;\n if (!perspective) {\n throw new Error(`${context}: Camera perspective properties are missing`);\n }\n babylonCamera.fov = perspective.yfov;\n babylonCamera.minZ = perspective.znear;\n babylonCamera.maxZ = perspective.zfar || 0;\n break;\n }\n case \"orthographic\" /* CameraType.ORTHOGRAPHIC */: {\n if (!camera.orthographic) {\n throw new Error(`${context}: Camera orthographic properties are missing`);\n }\n babylonCamera.mode = Camera.ORTHOGRAPHIC_CAMERA;\n babylonCamera.orthoLeft = -camera.orthographic.xmag;\n babylonCamera.orthoRight = camera.orthographic.xmag;\n babylonCamera.orthoBottom = -camera.orthographic.ymag;\n babylonCamera.orthoTop = camera.orthographic.ymag;\n babylonCamera.minZ = camera.orthographic.znear;\n babylonCamera.maxZ = camera.orthographic.zfar;\n break;\n }\n default: {\n throw new Error(`${context}: Invalid camera type (${camera.type})`);\n }\n }\n GLTFLoader.AddPointerMetadata(babylonCamera, context);\n this._parent.onCameraLoadedObservable.notifyObservers(babylonCamera);\n assign(babylonCamera);\n this.logClose();\n return Promise.all(promises).then(() => {\n return babylonCamera;\n });\n }\n _loadAnimationsAsync() {\n const animations = this._gltf.animations;\n if (!animations) {\n return Promise.resolve();\n }\n const promises = new Array();\n for (let index = 0; index < animations.length; index++) {\n const animation = animations[index];\n promises.push(this.loadAnimationAsync(`/animations/${animation.index}`, animation).then((animationGroup) => {\n // Delete the animation group if it ended up not having any animations in it.\n if (animationGroup.targetedAnimations.length === 0) {\n animationGroup.dispose();\n }\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n /**\n * Loads a glTF animation.\n * @param context The context when loading the asset\n * @param animation The glTF animation property\n * @returns A promise that resolves with the loaded Babylon animation group when the load is complete\n */\n loadAnimationAsync(context, animation) {\n const promise = this._extensionsLoadAnimationAsync(context, animation);\n if (promise) {\n return promise;\n }\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n const babylonAnimationGroup = new AnimationGroup(animation.name || `animation${animation.index}`, this._babylonScene);\n babylonAnimationGroup._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n animation._babylonAnimationGroup = babylonAnimationGroup;\n const promises = new Array();\n ArrayItem.Assign(animation.channels);\n ArrayItem.Assign(animation.samplers);\n for (const channel of animation.channels) {\n promises.push(this._loadAnimationChannelAsync(`${context}/channels/${channel.index}`, context, animation, channel, (babylonTarget, babylonAnimation) => {\n babylonTarget.animations = babylonTarget.animations || [];\n babylonTarget.animations.push(babylonAnimation);\n babylonAnimationGroup.addTargetedAnimation(babylonAnimation, babylonTarget);\n }));\n }\n return Promise.all(promises).then(() => {\n babylonAnimationGroup.normalize(0);\n return babylonAnimationGroup;\n });\n }\n /**\n * @hidden\n * Loads a glTF animation channel.\n * @param context The context when loading the asset\n * @param animationContext The context of the animation when loading the asset\n * @param animation The glTF animation property\n * @param channel The glTF animation channel property\n * @param onLoad Called for each animation loaded\n * @returns A void promise that resolves when the load is complete\n */\n _loadAnimationChannelAsync(context, animationContext, animation, channel, onLoad) {\n const promise = this._extensionsLoadAnimationChannelAsync(context, animationContext, animation, channel, onLoad);\n if (promise) {\n return promise;\n }\n if (channel.target.node == undefined) {\n return Promise.resolve();\n }\n const targetNode = ArrayItem.Get(`${context}/target/node`, this._gltf.nodes, channel.target.node);\n // Ignore animations that have no animation targets.\n if ((channel.target.path === \"weights\" /* AnimationChannelTargetPath.WEIGHTS */ && !targetNode._numMorphTargets) ||\n (channel.target.path !== \"weights\" /* AnimationChannelTargetPath.WEIGHTS */ && !targetNode._babylonTransformNode)) {\n return Promise.resolve();\n }\n let properties;\n switch (channel.target.path) {\n case \"translation\" /* AnimationChannelTargetPath.TRANSLATION */: {\n properties = nodeAnimationData.translation;\n break;\n }\n case \"rotation\" /* AnimationChannelTargetPath.ROTATION */: {\n properties = nodeAnimationData.rotation;\n break;\n }\n case \"scale\" /* AnimationChannelTargetPath.SCALE */: {\n properties = nodeAnimationData.scale;\n break;\n }\n case \"weights\" /* AnimationChannelTargetPath.WEIGHTS */: {\n properties = nodeAnimationData.weights;\n break;\n }\n default: {\n throw new Error(`${context}/target/path: Invalid value (${channel.target.path})`);\n }\n }\n const targetInfo = {\n target: targetNode,\n properties: properties,\n };\n return this._loadAnimationChannelFromTargetInfoAsync(context, animationContext, animation, channel, targetInfo, onLoad);\n }\n /**\n * @hidden\n * Loads a glTF animation channel.\n * @param context The context when loading the asset\n * @param animationContext The context of the animation when loading the asset\n * @param animation The glTF animation property\n * @param channel The glTF animation channel property\n * @param targetInfo The glTF target and properties\n * @param onLoad Called for each animation loaded\n * @returns A void promise that resolves when the load is complete\n */\n _loadAnimationChannelFromTargetInfoAsync(context, animationContext, animation, channel, targetInfo, onLoad) {\n const fps = this.parent.targetFps;\n const invfps = 1 / fps;\n const sampler = ArrayItem.Get(`${context}/sampler`, animation.samplers, channel.sampler);\n return this._loadAnimationSamplerAsync(`${animationContext}/samplers/${channel.sampler}`, sampler).then((data) => {\n let numAnimations = 0;\n // Extract the corresponding values from the read value.\n // GLTF values may be dispatched to several Babylon properties.\n // For example, baseColorFactor [`r`, `g`, `b`, `a`] is dispatched to\n // - albedoColor as Color3(`r`, `g`, `b`)\n // - alpha as `a`\n for (const property of targetInfo.properties) {\n const stride = property.getStride(targetInfo.target);\n const input = data.input;\n const output = data.output;\n const keys = new Array(input.length);\n let outputOffset = 0;\n switch (data.interpolation) {\n case \"STEP\" /* AnimationSamplerInterpolation.STEP */: {\n for (let index = 0; index < input.length; index++) {\n const value = property.getValue(targetInfo.target, output, outputOffset, 1);\n outputOffset += stride;\n keys[index] = {\n frame: input[index] * fps,\n value: value,\n interpolation: AnimationKeyInterpolation.STEP,\n };\n }\n break;\n }\n case \"CUBICSPLINE\" /* AnimationSamplerInterpolation.CUBICSPLINE */: {\n for (let index = 0; index < input.length; index++) {\n const inTangent = property.getValue(targetInfo.target, output, outputOffset, invfps);\n outputOffset += stride;\n const value = property.getValue(targetInfo.target, output, outputOffset, 1);\n outputOffset += stride;\n const outTangent = property.getValue(targetInfo.target, output, outputOffset, invfps);\n outputOffset += stride;\n keys[index] = {\n frame: input[index] * fps,\n inTangent: inTangent,\n value: value,\n outTangent: outTangent,\n };\n }\n break;\n }\n case \"LINEAR\" /* AnimationSamplerInterpolation.LINEAR */: {\n for (let index = 0; index < input.length; index++) {\n const value = property.getValue(targetInfo.target, output, outputOffset, 1);\n outputOffset += stride;\n keys[index] = {\n frame: input[index] * fps,\n value: value,\n };\n }\n break;\n }\n }\n if (outputOffset > 0) {\n const name = `${animation.name || `animation${animation.index}`}_channel${channel.index}_${numAnimations}`;\n property.buildAnimations(targetInfo.target, name, fps, keys, (babylonAnimatable, babylonAnimation) => {\n ++numAnimations;\n onLoad(babylonAnimatable, babylonAnimation);\n });\n }\n }\n });\n }\n _loadAnimationSamplerAsync(context, sampler) {\n if (sampler._data) {\n return sampler._data;\n }\n const interpolation = sampler.interpolation || \"LINEAR\" /* AnimationSamplerInterpolation.LINEAR */;\n switch (interpolation) {\n case \"STEP\" /* AnimationSamplerInterpolation.STEP */:\n case \"LINEAR\" /* AnimationSamplerInterpolation.LINEAR */:\n case \"CUBICSPLINE\" /* AnimationSamplerInterpolation.CUBICSPLINE */: {\n break;\n }\n default: {\n throw new Error(`${context}/interpolation: Invalid value (${sampler.interpolation})`);\n }\n }\n const inputAccessor = ArrayItem.Get(`${context}/input`, this._gltf.accessors, sampler.input);\n const outputAccessor = ArrayItem.Get(`${context}/output`, this._gltf.accessors, sampler.output);\n sampler._data = Promise.all([\n this._loadFloatAccessorAsync(`/accessors/${inputAccessor.index}`, inputAccessor),\n this._loadFloatAccessorAsync(`/accessors/${outputAccessor.index}`, outputAccessor),\n ]).then(([inputData, outputData]) => {\n return {\n input: inputData,\n interpolation: interpolation,\n output: outputData,\n };\n });\n return sampler._data;\n }\n /**\n * Loads a glTF buffer.\n * @param context The context when loading the asset\n * @param buffer The glTF buffer property\n * @param byteOffset The byte offset to use\n * @param byteLength The byte length to use\n * @returns A promise that resolves with the loaded data when the load is complete\n */\n loadBufferAsync(context, buffer, byteOffset, byteLength) {\n const extensionPromise = this._extensionsLoadBufferAsync(context, buffer, byteOffset, byteLength);\n if (extensionPromise) {\n return extensionPromise;\n }\n if (!buffer._data) {\n if (buffer.uri) {\n buffer._data = this.loadUriAsync(`${context}/uri`, buffer, buffer.uri);\n }\n else {\n if (!this._bin) {\n throw new Error(`${context}: Uri is missing or the binary glTF is missing its binary chunk`);\n }\n buffer._data = this._bin.readAsync(0, buffer.byteLength);\n }\n }\n return buffer._data.then((data) => {\n try {\n return new Uint8Array(data.buffer, data.byteOffset + byteOffset, byteLength);\n }\n catch (e) {\n throw new Error(`${context}: ${e.message}`);\n }\n });\n }\n /**\n * Loads a glTF buffer view.\n * @param context The context when loading the asset\n * @param bufferView The glTF buffer view property\n * @returns A promise that resolves with the loaded data when the load is complete\n */\n loadBufferViewAsync(context, bufferView) {\n const extensionPromise = this._extensionsLoadBufferViewAsync(context, bufferView);\n if (extensionPromise) {\n return extensionPromise;\n }\n if (bufferView._data) {\n return bufferView._data;\n }\n const buffer = ArrayItem.Get(`${context}/buffer`, this._gltf.buffers, bufferView.buffer);\n bufferView._data = this.loadBufferAsync(`/buffers/${buffer.index}`, buffer, bufferView.byteOffset || 0, bufferView.byteLength);\n return bufferView._data;\n }\n _loadAccessorAsync(context, accessor, constructor) {\n if (accessor._data) {\n return accessor._data;\n }\n const numComponents = GLTFLoader._GetNumComponents(context, accessor.type);\n const byteStride = numComponents * VertexBuffer.GetTypeByteLength(accessor.componentType);\n const length = numComponents * accessor.count;\n if (accessor.bufferView == undefined) {\n accessor._data = Promise.resolve(new constructor(length));\n }\n else {\n const bufferView = ArrayItem.Get(`${context}/bufferView`, this._gltf.bufferViews, accessor.bufferView);\n accessor._data = this.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView).then((data) => {\n if (accessor.componentType === 5126 /* AccessorComponentType.FLOAT */ && !accessor.normalized && (!bufferView.byteStride || bufferView.byteStride === byteStride)) {\n return GLTFLoader._GetTypedArray(context, accessor.componentType, data, accessor.byteOffset, length);\n }\n else {\n const typedArray = new constructor(length);\n VertexBuffer.ForEach(data, accessor.byteOffset || 0, bufferView.byteStride || byteStride, numComponents, accessor.componentType, typedArray.length, accessor.normalized || false, (value, index) => {\n typedArray[index] = value;\n });\n return typedArray;\n }\n });\n }\n if (accessor.sparse) {\n const sparse = accessor.sparse;\n accessor._data = accessor._data.then((data) => {\n const typedArray = data;\n const indicesBufferView = ArrayItem.Get(`${context}/sparse/indices/bufferView`, this._gltf.bufferViews, sparse.indices.bufferView);\n const valuesBufferView = ArrayItem.Get(`${context}/sparse/values/bufferView`, this._gltf.bufferViews, sparse.values.bufferView);\n return Promise.all([\n this.loadBufferViewAsync(`/bufferViews/${indicesBufferView.index}`, indicesBufferView),\n this.loadBufferViewAsync(`/bufferViews/${valuesBufferView.index}`, valuesBufferView),\n ]).then(([indicesData, valuesData]) => {\n const indices = GLTFLoader._GetTypedArray(`${context}/sparse/indices`, sparse.indices.componentType, indicesData, sparse.indices.byteOffset, sparse.count);\n const sparseLength = numComponents * sparse.count;\n let values;\n if (accessor.componentType === 5126 /* AccessorComponentType.FLOAT */ && !accessor.normalized) {\n values = GLTFLoader._GetTypedArray(`${context}/sparse/values`, accessor.componentType, valuesData, sparse.values.byteOffset, sparseLength);\n }\n else {\n const sparseData = GLTFLoader._GetTypedArray(`${context}/sparse/values`, accessor.componentType, valuesData, sparse.values.byteOffset, sparseLength);\n values = new constructor(sparseLength);\n VertexBuffer.ForEach(sparseData, 0, byteStride, numComponents, accessor.componentType, values.length, accessor.normalized || false, (value, index) => {\n values[index] = value;\n });\n }\n let valuesIndex = 0;\n for (let indicesIndex = 0; indicesIndex < indices.length; indicesIndex++) {\n let dataIndex = indices[indicesIndex] * numComponents;\n for (let componentIndex = 0; componentIndex < numComponents; componentIndex++) {\n typedArray[dataIndex++] = values[valuesIndex++];\n }\n }\n return typedArray;\n });\n });\n }\n return accessor._data;\n }\n /**\n * @internal\n */\n _loadFloatAccessorAsync(context, accessor) {\n return this._loadAccessorAsync(context, accessor, Float32Array);\n }\n /**\n * @internal\n */\n _loadIndicesAccessorAsync(context, accessor) {\n if (accessor.type !== \"SCALAR\" /* AccessorType.SCALAR */) {\n throw new Error(`${context}/type: Invalid value ${accessor.type}`);\n }\n if (accessor.componentType !== 5121 /* AccessorComponentType.UNSIGNED_BYTE */ &&\n accessor.componentType !== 5123 /* AccessorComponentType.UNSIGNED_SHORT */ &&\n accessor.componentType !== 5125 /* AccessorComponentType.UNSIGNED_INT */) {\n throw new Error(`${context}/componentType: Invalid value ${accessor.componentType}`);\n }\n if (accessor._data) {\n return accessor._data;\n }\n if (accessor.sparse) {\n const constructor = GLTFLoader._GetTypedArrayConstructor(`${context}/componentType`, accessor.componentType);\n accessor._data = this._loadAccessorAsync(context, accessor, constructor);\n }\n else {\n const bufferView = ArrayItem.Get(`${context}/bufferView`, this._gltf.bufferViews, accessor.bufferView);\n accessor._data = this.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView).then((data) => {\n return GLTFLoader._GetTypedArray(context, accessor.componentType, data, accessor.byteOffset, accessor.count);\n });\n }\n return accessor._data;\n }\n /**\n * @internal\n */\n _loadVertexBufferViewAsync(bufferView) {\n if (bufferView._babylonBuffer) {\n return bufferView._babylonBuffer;\n }\n const engine = this._babylonScene.getEngine();\n bufferView._babylonBuffer = this.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView).then((data) => {\n return new Buffer(engine, data, false);\n });\n return bufferView._babylonBuffer;\n }\n /**\n * @internal\n */\n _loadVertexAccessorAsync(context, accessor, kind) {\n var _a;\n if ((_a = accessor._babylonVertexBuffer) === null || _a === void 0 ? void 0 : _a[kind]) {\n return accessor._babylonVertexBuffer[kind];\n }\n if (!accessor._babylonVertexBuffer) {\n accessor._babylonVertexBuffer = {};\n }\n const engine = this._babylonScene.getEngine();\n if (accessor.sparse || accessor.bufferView == undefined) {\n accessor._babylonVertexBuffer[kind] = this._loadFloatAccessorAsync(context, accessor).then((data) => {\n return new VertexBuffer(engine, data, kind, false);\n });\n }\n else {\n const bufferView = ArrayItem.Get(`${context}/bufferView`, this._gltf.bufferViews, accessor.bufferView);\n accessor._babylonVertexBuffer[kind] = this._loadVertexBufferViewAsync(bufferView).then((babylonBuffer) => {\n const numComponents = GLTFLoader._GetNumComponents(context, accessor.type);\n return new VertexBuffer(engine, babylonBuffer, kind, false, undefined, bufferView.byteStride, undefined, accessor.byteOffset, numComponents, accessor.componentType, accessor.normalized, true, undefined, true);\n });\n }\n return accessor._babylonVertexBuffer[kind];\n }\n _loadMaterialMetallicRoughnessPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n if (properties) {\n if (properties.baseColorFactor) {\n babylonMaterial.albedoColor = Color3.FromArray(properties.baseColorFactor);\n babylonMaterial.alpha = properties.baseColorFactor[3];\n }\n else {\n babylonMaterial.albedoColor = Color3.White();\n }\n babylonMaterial.metallic = properties.metallicFactor == undefined ? 1 : properties.metallicFactor;\n babylonMaterial.roughness = properties.roughnessFactor == undefined ? 1 : properties.roughnessFactor;\n if (properties.baseColorTexture) {\n promises.push(this.loadTextureInfoAsync(`${context}/baseColorTexture`, properties.baseColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Base Color)`;\n babylonMaterial.albedoTexture = texture;\n }));\n }\n if (properties.metallicRoughnessTexture) {\n properties.metallicRoughnessTexture.nonColorData = true;\n promises.push(this.loadTextureInfoAsync(`${context}/metallicRoughnessTexture`, properties.metallicRoughnessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Metallic Roughness)`;\n babylonMaterial.metallicTexture = texture;\n }));\n babylonMaterial.useMetallnessFromMetallicTextureBlue = true;\n babylonMaterial.useRoughnessFromMetallicTextureGreen = true;\n babylonMaterial.useRoughnessFromMetallicTextureAlpha = false;\n }\n }\n return Promise.all(promises).then(() => { });\n }\n /**\n * @internal\n */\n _loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign = () => { }) {\n const extensionPromise = this._extensionsLoadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign);\n if (extensionPromise) {\n return extensionPromise;\n }\n material._data = material._data || {};\n let babylonData = material._data[babylonDrawMode];\n if (!babylonData) {\n this.logOpen(`${context} ${material.name || \"\"}`);\n const babylonMaterial = this.createMaterial(context, material, babylonDrawMode);\n babylonData = {\n babylonMaterial: babylonMaterial,\n babylonMeshes: [],\n promise: this.loadMaterialPropertiesAsync(context, material, babylonMaterial),\n };\n material._data[babylonDrawMode] = babylonData;\n GLTFLoader.AddPointerMetadata(babylonMaterial, context);\n this._parent.onMaterialLoadedObservable.notifyObservers(babylonMaterial);\n this.logClose();\n }\n if (babylonMesh) {\n babylonData.babylonMeshes.push(babylonMesh);\n babylonMesh.onDisposeObservable.addOnce(() => {\n const index = babylonData.babylonMeshes.indexOf(babylonMesh);\n if (index !== -1) {\n babylonData.babylonMeshes.splice(index, 1);\n }\n });\n }\n assign(babylonData.babylonMaterial);\n return babylonData.promise.then(() => {\n return babylonData.babylonMaterial;\n });\n }\n _createDefaultMaterial(name, babylonDrawMode) {\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n const babylonMaterial = new PBRMaterial(name, this._babylonScene);\n babylonMaterial._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n // Moved to mesh so user can change materials on gltf meshes: babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation;\n babylonMaterial.fillMode = babylonDrawMode;\n babylonMaterial.enableSpecularAntiAliasing = true;\n babylonMaterial.useRadianceOverAlpha = !this._parent.transparencyAsCoverage;\n babylonMaterial.useSpecularOverAlpha = !this._parent.transparencyAsCoverage;\n babylonMaterial.transparencyMode = PBRMaterial.PBRMATERIAL_OPAQUE;\n babylonMaterial.metallic = 1;\n babylonMaterial.roughness = 1;\n return babylonMaterial;\n }\n /**\n * Creates a Babylon material from a glTF material.\n * @param context The context when loading the asset\n * @param material The glTF material property\n * @param babylonDrawMode The draw mode for the Babylon material\n * @returns The Babylon material\n */\n createMaterial(context, material, babylonDrawMode) {\n const extensionPromise = this._extensionsCreateMaterial(context, material, babylonDrawMode);\n if (extensionPromise) {\n return extensionPromise;\n }\n const name = material.name || `material${material.index}`;\n const babylonMaterial = this._createDefaultMaterial(name, babylonDrawMode);\n return babylonMaterial;\n }\n /**\n * Loads properties from a glTF material into a Babylon material.\n * @param context The context when loading the asset\n * @param material The glTF material property\n * @param babylonMaterial The Babylon material\n * @returns A promise that resolves when the load is complete\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n const extensionPromise = this._extensionsLoadMaterialPropertiesAsync(context, material, babylonMaterial);\n if (extensionPromise) {\n return extensionPromise;\n }\n const promises = new Array();\n promises.push(this.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));\n if (material.pbrMetallicRoughness) {\n promises.push(this._loadMaterialMetallicRoughnessPropertiesAsync(`${context}/pbrMetallicRoughness`, material.pbrMetallicRoughness, babylonMaterial));\n }\n this.loadMaterialAlphaProperties(context, material, babylonMaterial);\n return Promise.all(promises).then(() => { });\n }\n /**\n * Loads the normal, occlusion, and emissive properties from a glTF material into a Babylon material.\n * @param context The context when loading the asset\n * @param material The glTF material property\n * @param babylonMaterial The Babylon material\n * @returns A promise that resolves when the load is complete\n */\n loadMaterialBasePropertiesAsync(context, material, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.emissiveColor = material.emissiveFactor ? Color3.FromArray(material.emissiveFactor) : new Color3(0, 0, 0);\n if (material.doubleSided) {\n babylonMaterial.backFaceCulling = false;\n babylonMaterial.twoSidedLighting = true;\n }\n if (material.normalTexture) {\n material.normalTexture.nonColorData = true;\n promises.push(this.loadTextureInfoAsync(`${context}/normalTexture`, material.normalTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Normal)`;\n babylonMaterial.bumpTexture = texture;\n }));\n babylonMaterial.invertNormalMapX = !this._babylonScene.useRightHandedSystem;\n babylonMaterial.invertNormalMapY = this._babylonScene.useRightHandedSystem;\n if (material.normalTexture.scale != undefined && babylonMaterial.bumpTexture) {\n babylonMaterial.bumpTexture.level = material.normalTexture.scale;\n }\n babylonMaterial.forceIrradianceInFragment = true;\n }\n if (material.occlusionTexture) {\n material.occlusionTexture.nonColorData = true;\n promises.push(this.loadTextureInfoAsync(`${context}/occlusionTexture`, material.occlusionTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Occlusion)`;\n babylonMaterial.ambientTexture = texture;\n }));\n babylonMaterial.useAmbientInGrayScale = true;\n if (material.occlusionTexture.strength != undefined) {\n babylonMaterial.ambientTextureStrength = material.occlusionTexture.strength;\n }\n }\n if (material.emissiveTexture) {\n promises.push(this.loadTextureInfoAsync(`${context}/emissiveTexture`, material.emissiveTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Emissive)`;\n babylonMaterial.emissiveTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n /**\n * Loads the alpha properties from a glTF material into a Babylon material.\n * Must be called after the setting the albedo texture of the Babylon material when the material has an albedo texture.\n * @param context The context when loading the asset\n * @param material The glTF material property\n * @param babylonMaterial The Babylon material\n */\n loadMaterialAlphaProperties(context, material, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const alphaMode = material.alphaMode || \"OPAQUE\" /* MaterialAlphaMode.OPAQUE */;\n switch (alphaMode) {\n case \"OPAQUE\" /* MaterialAlphaMode.OPAQUE */: {\n babylonMaterial.transparencyMode = PBRMaterial.PBRMATERIAL_OPAQUE;\n break;\n }\n case \"MASK\" /* MaterialAlphaMode.MASK */: {\n babylonMaterial.transparencyMode = PBRMaterial.PBRMATERIAL_ALPHATEST;\n babylonMaterial.alphaCutOff = material.alphaCutoff == undefined ? 0.5 : material.alphaCutoff;\n if (babylonMaterial.albedoTexture) {\n babylonMaterial.albedoTexture.hasAlpha = true;\n }\n break;\n }\n case \"BLEND\" /* MaterialAlphaMode.BLEND */: {\n babylonMaterial.transparencyMode = PBRMaterial.PBRMATERIAL_ALPHABLEND;\n if (babylonMaterial.albedoTexture) {\n babylonMaterial.albedoTexture.hasAlpha = true;\n babylonMaterial.useAlphaFromAlbedoTexture = true;\n }\n break;\n }\n default: {\n throw new Error(`${context}/alphaMode: Invalid value (${material.alphaMode})`);\n }\n }\n }\n /**\n * Loads a glTF texture info.\n * @param context The context when loading the asset\n * @param textureInfo The glTF texture info property\n * @param assign A function called synchronously after parsing the glTF properties\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete\n */\n loadTextureInfoAsync(context, textureInfo, assign = () => { }) {\n const extensionPromise = this._extensionsLoadTextureInfoAsync(context, textureInfo, assign);\n if (extensionPromise) {\n return extensionPromise;\n }\n this.logOpen(`${context}`);\n if (textureInfo.texCoord >= 6) {\n throw new Error(`${context}/texCoord: Invalid value (${textureInfo.texCoord})`);\n }\n const texture = ArrayItem.Get(`${context}/index`, this._gltf.textures, textureInfo.index);\n texture._textureInfo = textureInfo;\n const promise = this._loadTextureAsync(`/textures/${textureInfo.index}`, texture, (babylonTexture) => {\n babylonTexture.coordinatesIndex = textureInfo.texCoord || 0;\n GLTFLoader.AddPointerMetadata(babylonTexture, context);\n this._parent.onTextureLoadedObservable.notifyObservers(babylonTexture);\n assign(babylonTexture);\n });\n this.logClose();\n return promise;\n }\n /**\n * @internal\n */\n _loadTextureAsync(context, texture, assign = () => { }) {\n const extensionPromise = this._extensionsLoadTextureAsync(context, texture, assign);\n if (extensionPromise) {\n return extensionPromise;\n }\n this.logOpen(`${context} ${texture.name || \"\"}`);\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._gltf.samplers, texture.sampler);\n const image = ArrayItem.Get(`${context}/source`, this._gltf.images, texture.source);\n const promise = this._createTextureAsync(context, sampler, image, assign, undefined, !texture._textureInfo.nonColorData);\n this.logClose();\n return promise;\n }\n /**\n * @internal\n */\n _createTextureAsync(context, sampler, image, assign = () => { }, textureLoaderOptions, useSRGBBuffer) {\n const samplerData = this._loadSampler(`/samplers/${sampler.index}`, sampler);\n const promises = new Array();\n const deferred = new Deferred();\n this._babylonScene._blockEntityCollection = !!this._assetContainer;\n const textureCreationOptions = {\n noMipmap: samplerData.noMipMaps,\n invertY: false,\n samplingMode: samplerData.samplingMode,\n onLoad: () => {\n if (!this._disposed) {\n deferred.resolve();\n }\n },\n onError: (message, exception) => {\n if (!this._disposed) {\n deferred.reject(new Error(`${context}: ${exception && exception.message ? exception.message : message || \"Failed to load texture\"}`));\n }\n },\n mimeType: image.mimeType,\n loaderOptions: textureLoaderOptions,\n useSRGBBuffer: !!useSRGBBuffer && this._parent.useSRGBBuffers,\n };\n const babylonTexture = new Texture(null, this._babylonScene, textureCreationOptions);\n babylonTexture._parentContainer = this._assetContainer;\n this._babylonScene._blockEntityCollection = false;\n promises.push(deferred.promise);\n promises.push(this.loadImageAsync(`/images/${image.index}`, image).then((data) => {\n const name = image.uri || `${this._fileName}#image${image.index}`;\n const dataUrl = `data:${this._uniqueRootUrl}${name}`;\n babylonTexture.updateURL(dataUrl, data);\n }));\n babylonTexture.wrapU = samplerData.wrapU;\n babylonTexture.wrapV = samplerData.wrapV;\n assign(babylonTexture);\n return Promise.all(promises).then(() => {\n return babylonTexture;\n });\n }\n _loadSampler(context, sampler) {\n if (!sampler._data) {\n sampler._data = {\n noMipMaps: sampler.minFilter === 9728 /* TextureMinFilter.NEAREST */ || sampler.minFilter === 9729 /* TextureMinFilter.LINEAR */,\n samplingMode: GLTFLoader._GetTextureSamplingMode(context, sampler),\n wrapU: GLTFLoader._GetTextureWrapMode(`${context}/wrapS`, sampler.wrapS),\n wrapV: GLTFLoader._GetTextureWrapMode(`${context}/wrapT`, sampler.wrapT),\n };\n }\n return sampler._data;\n }\n /**\n * Loads a glTF image.\n * @param context The context when loading the asset\n * @param image The glTF image property\n * @returns A promise that resolves with the loaded data when the load is complete\n */\n loadImageAsync(context, image) {\n if (!image._data) {\n this.logOpen(`${context} ${image.name || \"\"}`);\n if (image.uri) {\n image._data = this.loadUriAsync(`${context}/uri`, image, image.uri);\n }\n else {\n const bufferView = ArrayItem.Get(`${context}/bufferView`, this._gltf.bufferViews, image.bufferView);\n image._data = this.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView);\n }\n this.logClose();\n }\n return image._data;\n }\n /**\n * Loads a glTF uri.\n * @param context The context when loading the asset\n * @param property The glTF property associated with the uri\n * @param uri The base64 or relative uri\n * @returns A promise that resolves with the loaded data when the load is complete\n */\n loadUriAsync(context, property, uri) {\n const extensionPromise = this._extensionsLoadUriAsync(context, property, uri);\n if (extensionPromise) {\n return extensionPromise;\n }\n if (!GLTFLoader._ValidateUri(uri)) {\n throw new Error(`${context}: '${uri}' is invalid`);\n }\n if (IsBase64DataUrl(uri)) {\n const data = new Uint8Array(DecodeBase64UrlToBinary(uri));\n this.log(`${context}: Decoded ${uri.substr(0, 64)}... (${data.length} bytes)`);\n return Promise.resolve(data);\n }\n this.log(`${context}: Loading ${uri}`);\n return this._parent.preprocessUrlAsync(this._rootUrl + uri).then((url) => {\n return new Promise((resolve, reject) => {\n this._parent._loadFile(this._babylonScene, url, (data) => {\n if (!this._disposed) {\n this.log(`${context}: Loaded ${uri} (${data.byteLength} bytes)`);\n resolve(new Uint8Array(data));\n }\n }, true, (request) => {\n reject(new LoadFileError(`${context}: Failed to load '${uri}'${request ? \": \" + request.status + \" \" + request.statusText : \"\"}`, request));\n });\n });\n });\n }\n /**\n * Adds a JSON pointer to the _internalMetadata of the Babylon object at `._internalMetadata.gltf.pointers`.\n * @param babylonObject the Babylon object with _internalMetadata\n * @param pointer the JSON pointer\n */\n static AddPointerMetadata(babylonObject, pointer) {\n babylonObject.metadata = babylonObject.metadata || {};\n const metadata = (babylonObject._internalMetadata = babylonObject._internalMetadata || {});\n const gltf = (metadata.gltf = metadata.gltf || {});\n const pointers = (gltf.pointers = gltf.pointers || []);\n pointers.push(pointer);\n }\n static _GetTextureWrapMode(context, mode) {\n // Set defaults if undefined\n mode = mode == undefined ? 10497 /* TextureWrapMode.REPEAT */ : mode;\n switch (mode) {\n case 33071 /* TextureWrapMode.CLAMP_TO_EDGE */:\n return Texture.CLAMP_ADDRESSMODE;\n case 33648 /* TextureWrapMode.MIRRORED_REPEAT */:\n return Texture.MIRROR_ADDRESSMODE;\n case 10497 /* TextureWrapMode.REPEAT */:\n return Texture.WRAP_ADDRESSMODE;\n default:\n Logger.Warn(`${context}: Invalid value (${mode})`);\n return Texture.WRAP_ADDRESSMODE;\n }\n }\n static _GetTextureSamplingMode(context, sampler) {\n // Set defaults if undefined\n const magFilter = sampler.magFilter == undefined ? 9729 /* TextureMagFilter.LINEAR */ : sampler.magFilter;\n const minFilter = sampler.minFilter == undefined ? 9987 /* TextureMinFilter.LINEAR_MIPMAP_LINEAR */ : sampler.minFilter;\n if (magFilter === 9729 /* TextureMagFilter.LINEAR */) {\n switch (minFilter) {\n case 9728 /* TextureMinFilter.NEAREST */:\n return Texture.LINEAR_NEAREST;\n case 9729 /* TextureMinFilter.LINEAR */:\n return Texture.LINEAR_LINEAR;\n case 9984 /* TextureMinFilter.NEAREST_MIPMAP_NEAREST */:\n return Texture.LINEAR_NEAREST_MIPNEAREST;\n case 9985 /* TextureMinFilter.LINEAR_MIPMAP_NEAREST */:\n return Texture.LINEAR_LINEAR_MIPNEAREST;\n case 9986 /* TextureMinFilter.NEAREST_MIPMAP_LINEAR */:\n return Texture.LINEAR_NEAREST_MIPLINEAR;\n case 9987 /* TextureMinFilter.LINEAR_MIPMAP_LINEAR */:\n return Texture.LINEAR_LINEAR_MIPLINEAR;\n default:\n Logger.Warn(`${context}/minFilter: Invalid value (${minFilter})`);\n return Texture.LINEAR_LINEAR_MIPLINEAR;\n }\n }\n else {\n if (magFilter !== 9728 /* TextureMagFilter.NEAREST */) {\n Logger.Warn(`${context}/magFilter: Invalid value (${magFilter})`);\n }\n switch (minFilter) {\n case 9728 /* TextureMinFilter.NEAREST */:\n return Texture.NEAREST_NEAREST;\n case 9729 /* TextureMinFilter.LINEAR */:\n return Texture.NEAREST_LINEAR;\n case 9984 /* TextureMinFilter.NEAREST_MIPMAP_NEAREST */:\n return Texture.NEAREST_NEAREST_MIPNEAREST;\n case 9985 /* TextureMinFilter.LINEAR_MIPMAP_NEAREST */:\n return Texture.NEAREST_LINEAR_MIPNEAREST;\n case 9986 /* TextureMinFilter.NEAREST_MIPMAP_LINEAR */:\n return Texture.NEAREST_NEAREST_MIPLINEAR;\n case 9987 /* TextureMinFilter.LINEAR_MIPMAP_LINEAR */:\n return Texture.NEAREST_LINEAR_MIPLINEAR;\n default:\n Logger.Warn(`${context}/minFilter: Invalid value (${minFilter})`);\n return Texture.NEAREST_NEAREST_MIPNEAREST;\n }\n }\n }\n static _GetTypedArrayConstructor(context, componentType) {\n switch (componentType) {\n case 5120 /* AccessorComponentType.BYTE */:\n return Int8Array;\n case 5121 /* AccessorComponentType.UNSIGNED_BYTE */:\n return Uint8Array;\n case 5122 /* AccessorComponentType.SHORT */:\n return Int16Array;\n case 5123 /* AccessorComponentType.UNSIGNED_SHORT */:\n return Uint16Array;\n case 5125 /* AccessorComponentType.UNSIGNED_INT */:\n return Uint32Array;\n case 5126 /* AccessorComponentType.FLOAT */:\n return Float32Array;\n default:\n throw new Error(`${context}: Invalid component type ${componentType}`);\n }\n }\n static _GetTypedArray(context, componentType, bufferView, byteOffset, length) {\n const buffer = bufferView.buffer;\n byteOffset = bufferView.byteOffset + (byteOffset || 0);\n const constructor = GLTFLoader._GetTypedArrayConstructor(`${context}/componentType`, componentType);\n const componentTypeLength = VertexBuffer.GetTypeByteLength(componentType);\n if (byteOffset % componentTypeLength !== 0) {\n // HACK: Copy the buffer if byte offset is not a multiple of component type byte length.\n Logger.Warn(`${context}: Copying buffer as byte offset (${byteOffset}) is not a multiple of component type byte length (${componentTypeLength})`);\n return new constructor(buffer.slice(byteOffset, byteOffset + length * componentTypeLength), 0);\n }\n return new constructor(buffer, byteOffset, length);\n }\n static _GetNumComponents(context, type) {\n switch (type) {\n case \"SCALAR\":\n return 1;\n case \"VEC2\":\n return 2;\n case \"VEC3\":\n return 3;\n case \"VEC4\":\n return 4;\n case \"MAT2\":\n return 4;\n case \"MAT3\":\n return 9;\n case \"MAT4\":\n return 16;\n }\n throw new Error(`${context}: Invalid type (${type})`);\n }\n static _ValidateUri(uri) {\n return Tools.IsBase64(uri) || uri.indexOf(\"..\") === -1;\n }\n /**\n * @internal\n */\n static _GetDrawMode(context, mode) {\n if (mode == undefined) {\n mode = 4 /* MeshPrimitiveMode.TRIANGLES */;\n }\n switch (mode) {\n case 0 /* MeshPrimitiveMode.POINTS */:\n return Material.PointListDrawMode;\n case 1 /* MeshPrimitiveMode.LINES */:\n return Material.LineListDrawMode;\n case 2 /* MeshPrimitiveMode.LINE_LOOP */:\n return Material.LineLoopDrawMode;\n case 3 /* MeshPrimitiveMode.LINE_STRIP */:\n return Material.LineStripDrawMode;\n case 4 /* MeshPrimitiveMode.TRIANGLES */:\n return Material.TriangleFillMode;\n case 5 /* MeshPrimitiveMode.TRIANGLE_STRIP */:\n return Material.TriangleStripDrawMode;\n case 6 /* MeshPrimitiveMode.TRIANGLE_FAN */:\n return Material.TriangleFanDrawMode;\n }\n throw new Error(`${context}: Invalid mesh primitive mode (${mode})`);\n }\n _compileMaterialsAsync() {\n this._parent._startPerformanceCounter(\"Compile materials\");\n const promises = new Array();\n if (this._gltf.materials) {\n for (const material of this._gltf.materials) {\n if (material._data) {\n for (const babylonDrawMode in material._data) {\n const babylonData = material._data[babylonDrawMode];\n for (const babylonMesh of babylonData.babylonMeshes) {\n // Ensure nonUniformScaling is set if necessary.\n babylonMesh.computeWorldMatrix(true);\n const babylonMaterial = babylonData.babylonMaterial;\n promises.push(babylonMaterial.forceCompilationAsync(babylonMesh));\n promises.push(babylonMaterial.forceCompilationAsync(babylonMesh, { useInstances: true }));\n if (this._parent.useClipPlane) {\n promises.push(babylonMaterial.forceCompilationAsync(babylonMesh, { clipPlane: true }));\n promises.push(babylonMaterial.forceCompilationAsync(babylonMesh, { clipPlane: true, useInstances: true }));\n }\n }\n }\n }\n }\n }\n return Promise.all(promises).then(() => {\n this._parent._endPerformanceCounter(\"Compile materials\");\n });\n }\n _compileShadowGeneratorsAsync() {\n this._parent._startPerformanceCounter(\"Compile shadow generators\");\n const promises = new Array();\n const lights = this._babylonScene.lights;\n for (const light of lights) {\n const generator = light.getShadowGenerator();\n if (generator) {\n promises.push(generator.forceCompilationAsync());\n }\n }\n return Promise.all(promises).then(() => {\n this._parent._endPerformanceCounter(\"Compile shadow generators\");\n });\n }\n _forEachExtensions(action) {\n for (const extension of this._extensions) {\n if (extension.enabled) {\n action(extension);\n }\n }\n }\n _applyExtensions(property, functionName, actionAsync) {\n for (const extension of this._extensions) {\n if (extension.enabled) {\n const id = `${extension.name}.${functionName}`;\n const loaderProperty = property;\n loaderProperty._activeLoaderExtensionFunctions = loaderProperty._activeLoaderExtensionFunctions || {};\n const activeLoaderExtensionFunctions = loaderProperty._activeLoaderExtensionFunctions;\n if (!activeLoaderExtensionFunctions[id]) {\n activeLoaderExtensionFunctions[id] = true;\n try {\n const result = actionAsync(extension);\n if (result) {\n return result;\n }\n }\n finally {\n delete activeLoaderExtensionFunctions[id];\n }\n }\n }\n }\n return null;\n }\n _extensionsOnLoading() {\n this._forEachExtensions((extension) => extension.onLoading && extension.onLoading());\n }\n _extensionsOnReady() {\n this._forEachExtensions((extension) => extension.onReady && extension.onReady());\n }\n _extensionsLoadSceneAsync(context, scene) {\n return this._applyExtensions(scene, \"loadScene\", (extension) => extension.loadSceneAsync && extension.loadSceneAsync(context, scene));\n }\n _extensionsLoadNodeAsync(context, node, assign) {\n return this._applyExtensions(node, \"loadNode\", (extension) => extension.loadNodeAsync && extension.loadNodeAsync(context, node, assign));\n }\n _extensionsLoadCameraAsync(context, camera, assign) {\n return this._applyExtensions(camera, \"loadCamera\", (extension) => extension.loadCameraAsync && extension.loadCameraAsync(context, camera, assign));\n }\n _extensionsLoadVertexDataAsync(context, primitive, babylonMesh) {\n return this._applyExtensions(primitive, \"loadVertexData\", (extension) => extension._loadVertexDataAsync && extension._loadVertexDataAsync(context, primitive, babylonMesh));\n }\n _extensionsLoadMeshPrimitiveAsync(context, name, node, mesh, primitive, assign) {\n return this._applyExtensions(primitive, \"loadMeshPrimitive\", (extension) => extension._loadMeshPrimitiveAsync && extension._loadMeshPrimitiveAsync(context, name, node, mesh, primitive, assign));\n }\n _extensionsLoadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign) {\n return this._applyExtensions(material, \"loadMaterial\", (extension) => extension._loadMaterialAsync && extension._loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign));\n }\n _extensionsCreateMaterial(context, material, babylonDrawMode) {\n return this._applyExtensions(material, \"createMaterial\", (extension) => extension.createMaterial && extension.createMaterial(context, material, babylonDrawMode));\n }\n _extensionsLoadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return this._applyExtensions(material, \"loadMaterialProperties\", (extension) => extension.loadMaterialPropertiesAsync && extension.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n }\n _extensionsLoadTextureInfoAsync(context, textureInfo, assign) {\n return this._applyExtensions(textureInfo, \"loadTextureInfo\", (extension) => extension.loadTextureInfoAsync && extension.loadTextureInfoAsync(context, textureInfo, assign));\n }\n _extensionsLoadTextureAsync(context, texture, assign) {\n return this._applyExtensions(texture, \"loadTexture\", (extension) => extension._loadTextureAsync && extension._loadTextureAsync(context, texture, assign));\n }\n _extensionsLoadAnimationAsync(context, animation) {\n return this._applyExtensions(animation, \"loadAnimation\", (extension) => extension.loadAnimationAsync && extension.loadAnimationAsync(context, animation));\n }\n _extensionsLoadAnimationChannelAsync(context, animationContext, animation, channel, onLoad) {\n return this._applyExtensions(animation, \"loadAnimationChannel\", (extension) => extension._loadAnimationChannelAsync && extension._loadAnimationChannelAsync(context, animationContext, animation, channel, onLoad));\n }\n _extensionsLoadSkinAsync(context, node, skin) {\n return this._applyExtensions(skin, \"loadSkin\", (extension) => extension._loadSkinAsync && extension._loadSkinAsync(context, node, skin));\n }\n _extensionsLoadUriAsync(context, property, uri) {\n return this._applyExtensions(property, \"loadUri\", (extension) => extension._loadUriAsync && extension._loadUriAsync(context, property, uri));\n }\n _extensionsLoadBufferViewAsync(context, bufferView) {\n return this._applyExtensions(bufferView, \"loadBufferView\", (extension) => extension.loadBufferViewAsync && extension.loadBufferViewAsync(context, bufferView));\n }\n _extensionsLoadBufferAsync(context, buffer, byteOffset, byteLength) {\n return this._applyExtensions(buffer, \"loadBuffer\", (extension) => extension.loadBufferAsync && extension.loadBufferAsync(context, buffer, byteOffset, byteLength));\n }\n /**\n * Helper method called by a loader extension to load an glTF extension.\n * @param context The context when loading the asset\n * @param property The glTF property to load the extension from\n * @param extensionName The name of the extension to load\n * @param actionAsync The action to run\n * @returns The promise returned by actionAsync or null if the extension does not exist\n */\n static LoadExtensionAsync(context, property, extensionName, actionAsync) {\n if (!property.extensions) {\n return null;\n }\n const extensions = property.extensions;\n const extension = extensions[extensionName];\n if (!extension) {\n return null;\n }\n return actionAsync(`${context}/extensions/${extensionName}`, extension);\n }\n /**\n * Helper method called by a loader extension to load a glTF extra.\n * @param context The context when loading the asset\n * @param property The glTF property to load the extra from\n * @param extensionName The name of the extension to load\n * @param actionAsync The action to run\n * @returns The promise returned by actionAsync or null if the extra does not exist\n */\n static LoadExtraAsync(context, property, extensionName, actionAsync) {\n if (!property.extras) {\n return null;\n }\n const extras = property.extras;\n const extra = extras[extensionName];\n if (!extra) {\n return null;\n }\n return actionAsync(`${context}/extras/${extensionName}`, extra);\n }\n /**\n * Checks for presence of an extension.\n * @param name The name of the extension to check\n * @returns A boolean indicating the presence of the given extension name in `extensionsUsed`\n */\n isExtensionUsed(name) {\n return !!this._gltf.extensionsUsed && this._gltf.extensionsUsed.indexOf(name) !== -1;\n }\n /**\n * Increments the indentation level and logs a message.\n * @param message The message to log\n */\n logOpen(message) {\n this._parent._logOpen(message);\n }\n /**\n * Decrements the indentation level.\n */\n logClose() {\n this._parent._logClose();\n }\n /**\n * Logs a message\n * @param message The message to log\n */\n log(message) {\n this._parent._log(message);\n }\n /**\n * Starts a performance counter.\n * @param counterName The name of the performance counter\n */\n startPerformanceCounter(counterName) {\n this._parent._startPerformanceCounter(counterName);\n }\n /**\n * Ends a performance counter.\n * @param counterName The name of the performance counter\n */\n endPerformanceCounter(counterName) {\n this._parent._endPerformanceCounter(counterName);\n }\n}\nGLTFLoader._RegisteredExtensions = {};\n/**\n * The default glTF sampler.\n */\nGLTFLoader.DefaultSampler = { index: -1 };\nGLTFFileLoader._CreateGLTF2Loader = (parent) => new GLTFLoader(parent);\n//# sourceMappingURL=glTFLoader.js.map","import { SerializationHelper } from \"../../Misc/decorators.js\";\nimport { _UpdateRGBDAsync as UpdateRGBDAsyncEnvTools } from \"../../Misc/environmentTextureTools.js\";\nimport { InternalTextureSource } from \"./internalTexture.js\";\nimport { CubeTexture } from \"./cubeTexture.js\";\n\nimport \"../../Engines/Extensions/engine.rawTexture.js\";\n/**\n * Raw cube texture where the raw buffers are passed in\n */\nexport class RawCubeTexture extends CubeTexture {\n /**\n * Creates a cube texture where the raw buffers are passed in.\n * @param scene defines the scene the texture is attached to\n * @param data defines the array of data to use to create each face\n * @param size defines the size of the textures\n * @param format defines the format of the data\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\n * @param generateMipMaps defines if the engine should generate the mip levels\n * @param invertY defines if data must be stored with Y axis inverted\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\n * @param compression defines the compression used (null by default)\n */\n constructor(scene, data, size, format = 5, type = 0, generateMipMaps = false, invertY = false, samplingMode = 3, compression = null) {\n super(\"\", scene);\n this._texture = scene.getEngine().createRawCubeTexture(data, size, format, type, generateMipMaps, invertY, samplingMode, compression);\n }\n /**\n * Updates the raw cube texture.\n * @param data defines the data to store\n * @param format defines the data format\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\n * @param invertY defines if data must be stored with Y axis inverted\n * @param compression defines the compression used (null by default)\n */\n update(data, format, type, invertY, compression = null) {\n this._texture.getEngine().updateRawCubeTexture(this._texture, data, format, type, invertY, compression);\n }\n /**\n * Updates a raw cube texture with RGBD encoded data.\n * @param data defines the array of data [mipmap][face] to use to create each face\n * @param sphericalPolynomial defines the spherical polynomial for irradiance\n * @param lodScale defines the scale applied to environment texture. This manages the range of LOD level used for IBL according to the roughness\n * @param lodOffset defines the offset applied to environment texture. This manages first LOD level used for IBL according to the roughness\n * @returns a promise that resolves when the operation is complete\n */\n updateRGBDAsync(data, sphericalPolynomial = null, lodScale = 0.8, lodOffset = 0) {\n return UpdateRGBDAsyncEnvTools(this._texture, data, sphericalPolynomial, lodScale, lodOffset).then(() => { });\n }\n /**\n * Clones the raw cube texture.\n * @returns a new cube texture\n */\n clone() {\n return SerializationHelper.Clone(() => {\n const scene = this.getScene();\n const internalTexture = this._texture;\n const texture = new RawCubeTexture(scene, internalTexture._bufferViewArray, internalTexture.width, internalTexture.format, internalTexture.type, internalTexture.generateMipMaps, internalTexture.invertY, internalTexture.samplingMode, internalTexture._compression);\n if (internalTexture.source === InternalTextureSource.CubeRawRGBD) {\n texture.updateRGBDAsync(internalTexture._bufferViewArrayArray, internalTexture._sphericalPolynomial, internalTexture._lodGenerationScale, internalTexture._lodGenerationOffset);\n }\n return texture;\n }, this);\n }\n}\n//# sourceMappingURL=rawCubeTexture.js.map","import { Scalar } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.scalar.js\";\nimport { SphericalHarmonics, SphericalPolynomial } from \"@inter-ikea-betrakta-babylonjs/core/Maths/sphericalPolynomial.js\";\nimport { Quaternion, Matrix } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js\";\nimport { RawCubeTexture } from \"@inter-ikea-betrakta-babylonjs/core/Materials/Textures/rawCubeTexture.js\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader.js\";\nconst NAME = \"EXT_lights_image_based\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_lights_image_based/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_lights_image_based {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n delete this._lights;\n }\n /** @internal */\n onLoading() {\n const extensions = this._loader.gltf.extensions;\n if (extensions && extensions[this.name]) {\n const extension = extensions[this.name];\n this._lights = extension.lights;\n }\n }\n /**\n * @internal\n */\n loadSceneAsync(context, scene) {\n return GLTFLoader.LoadExtensionAsync(context, scene, this.name, (extensionContext, extension) => {\n this._loader._allMaterialsDirtyRequired = true;\n const promises = new Array();\n promises.push(this._loader.loadSceneAsync(context, scene));\n this._loader.logOpen(`${extensionContext}`);\n const light = ArrayItem.Get(`${extensionContext}/light`, this._lights, extension.light);\n promises.push(this._loadLightAsync(`/extensions/${this.name}/lights/${extension.light}`, light).then((texture) => {\n this._loader.babylonScene.environmentTexture = texture;\n }));\n this._loader.logClose();\n return Promise.all(promises).then(() => { });\n });\n }\n _loadLightAsync(context, light) {\n if (!light._loaded) {\n const promises = new Array();\n this._loader.logOpen(`${context}`);\n const imageData = new Array(light.specularImages.length);\n for (let mipmap = 0; mipmap < light.specularImages.length; mipmap++) {\n const faces = light.specularImages[mipmap];\n imageData[mipmap] = new Array(faces.length);\n for (let face = 0; face < faces.length; face++) {\n const specularImageContext = `${context}/specularImages/${mipmap}/${face}`;\n this._loader.logOpen(`${specularImageContext}`);\n const index = faces[face];\n const image = ArrayItem.Get(specularImageContext, this._loader.gltf.images, index);\n promises.push(this._loader.loadImageAsync(`/images/${index}`, image).then((data) => {\n imageData[mipmap][face] = data;\n }));\n this._loader.logClose();\n }\n }\n this._loader.logClose();\n light._loaded = Promise.all(promises).then(() => {\n const babylonTexture = new RawCubeTexture(this._loader.babylonScene, null, light.specularImageSize);\n babylonTexture.name = light.name || \"environment\";\n light._babylonTexture = babylonTexture;\n if (light.intensity != undefined) {\n babylonTexture.level = light.intensity;\n }\n if (light.rotation) {\n let rotation = Quaternion.FromArray(light.rotation);\n // Invert the rotation so that positive rotation is counter-clockwise.\n if (!this._loader.babylonScene.useRightHandedSystem) {\n rotation = Quaternion.Inverse(rotation);\n }\n Matrix.FromQuaternionToRef(rotation, babylonTexture.getReflectionTextureMatrix());\n }\n if (!light.irradianceCoefficients) {\n throw new Error(`${context}: Irradiance coefficients are missing`);\n }\n const sphericalHarmonics = SphericalHarmonics.FromArray(light.irradianceCoefficients);\n sphericalHarmonics.scaleInPlace(light.intensity);\n sphericalHarmonics.convertIrradianceToLambertianRadiance();\n const sphericalPolynomial = SphericalPolynomial.FromHarmonics(sphericalHarmonics);\n // Compute the lod generation scale to fit exactly to the number of levels available.\n const lodGenerationScale = (imageData.length - 1) / Scalar.Log2(light.specularImageSize);\n return babylonTexture.updateRGBDAsync(imageData, sphericalPolynomial, lodGenerationScale);\n });\n }\n return light._loaded.then(() => {\n return light._babylonTexture;\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new EXT_lights_image_based(loader));\n//# sourceMappingURL=EXT_lights_image_based.js.map","import { Mesh } from \"../Meshes/mesh.js\";\nimport { VertexBuffer, Buffer } from \"../Buffers/buffer.js\";\nimport { Matrix, Vector3, TmpVectors } from \"../Maths/math.vector.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { BoundingInfo } from \"@inter-ikea-betrakta-babylonjs/core/Culling/boundingInfo.js\";\nMesh.prototype.thinInstanceAdd = function (matrix, refresh = true) {\n if (!this.getScene().getEngine().getCaps().instancedArrays) {\n Logger.Error(\"Thin Instances are not supported on this device as Instanced Array extension not supported\");\n return -1;\n }\n this._thinInstanceUpdateBufferSize(\"matrix\", Array.isArray(matrix) ? matrix.length : 1);\n const index = this._thinInstanceDataStorage.instancesCount;\n if (Array.isArray(matrix)) {\n for (let i = 0; i < matrix.length; ++i) {\n this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++, matrix[i], i === matrix.length - 1 && refresh);\n }\n }\n else {\n this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++, matrix, refresh);\n }\n return index;\n};\nMesh.prototype.thinInstanceAddSelf = function (refresh = true) {\n return this.thinInstanceAdd(Matrix.IdentityReadOnly, refresh);\n};\nMesh.prototype.thinInstanceRegisterAttribute = function (kind, stride) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n this.removeVerticesData(kind);\n this._thinInstanceInitializeUserStorage();\n this._userThinInstanceBuffersStorage.strides[kind] = stride;\n this._userThinInstanceBuffersStorage.sizes[kind] = stride * Math.max(32, this._thinInstanceDataStorage.instancesCount); // Initial size\n this._userThinInstanceBuffersStorage.data[kind] = new Float32Array(this._userThinInstanceBuffersStorage.sizes[kind]);\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), this._userThinInstanceBuffersStorage.data[kind], kind, true, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n};\nMesh.prototype.thinInstanceSetMatrixAt = function (index, matrix, refresh = true) {\n if (!this._thinInstanceDataStorage.matrixData || index >= this._thinInstanceDataStorage.instancesCount) {\n return false;\n }\n const matrixData = this._thinInstanceDataStorage.matrixData;\n matrix.copyToArray(matrixData, index * 16);\n if (this._thinInstanceDataStorage.worldMatrices) {\n this._thinInstanceDataStorage.worldMatrices[index] = matrix;\n }\n if (refresh) {\n this.thinInstanceBufferUpdated(\"matrix\");\n if (!this.doNotSyncBoundingInfo) {\n this.thinInstanceRefreshBoundingInfo(false);\n }\n }\n return true;\n};\nMesh.prototype.thinInstanceSetAttributeAt = function (kind, index, value, refresh = true) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (!this._userThinInstanceBuffersStorage || !this._userThinInstanceBuffersStorage.data[kind] || index >= this._thinInstanceDataStorage.instancesCount) {\n return false;\n }\n this._thinInstanceUpdateBufferSize(kind, 0); // make sur the buffer for the kind attribute is big enough\n this._userThinInstanceBuffersStorage.data[kind].set(value, index * this._userThinInstanceBuffersStorage.strides[kind]);\n if (refresh) {\n this.thinInstanceBufferUpdated(kind);\n }\n return true;\n};\nObject.defineProperty(Mesh.prototype, \"thinInstanceCount\", {\n get: function () {\n return this._thinInstanceDataStorage.instancesCount;\n },\n set: function (value) {\n var _a, _b;\n const matrixData = (_a = this._thinInstanceDataStorage.matrixData) !== null && _a !== void 0 ? _a : (_b = this.source) === null || _b === void 0 ? void 0 : _b._thinInstanceDataStorage.matrixData;\n const numMaxInstances = matrixData ? matrixData.length / 16 : 0;\n if (value <= numMaxInstances) {\n this._thinInstanceDataStorage.instancesCount = value;\n }\n },\n enumerable: true,\n configurable: true,\n});\nMesh.prototype._thinInstanceCreateMatrixBuffer = function (kind, buffer, staticBuffer = false) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n const matrixBuffer = new Buffer(this.getEngine(), buffer, !staticBuffer, 16, false, true);\n for (let i = 0; i < 4; i++) {\n this.setVerticesBuffer(matrixBuffer.createVertexBuffer(kind + i, i * 4, 4));\n }\n return matrixBuffer;\n};\nMesh.prototype.thinInstanceSetBuffer = function (kind, buffer, stride = 0, staticBuffer = false) {\n var _a, _b, _c;\n stride = stride || 16;\n if (kind === \"matrix\") {\n (_a = this._thinInstanceDataStorage.matrixBuffer) === null || _a === void 0 ? void 0 : _a.dispose();\n this._thinInstanceDataStorage.matrixBuffer = null;\n this._thinInstanceDataStorage.matrixBufferSize = buffer ? buffer.length : 32 * stride;\n this._thinInstanceDataStorage.matrixData = buffer;\n this._thinInstanceDataStorage.worldMatrices = null;\n if (buffer !== null) {\n this._thinInstanceDataStorage.instancesCount = buffer.length / stride;\n this._thinInstanceDataStorage.matrixBuffer = this._thinInstanceCreateMatrixBuffer(\"world\", buffer, staticBuffer);\n if (!this.doNotSyncBoundingInfo) {\n this.thinInstanceRefreshBoundingInfo(false);\n }\n }\n else {\n this._thinInstanceDataStorage.instancesCount = 0;\n if (!this.doNotSyncBoundingInfo) {\n // mesh has no more thin instances, so need to recompute the bounding box because it's the regular mesh that will now be displayed\n this.refreshBoundingInfo();\n }\n }\n }\n else if (kind === \"previousMatrix\") {\n (_b = this._thinInstanceDataStorage.previousMatrixBuffer) === null || _b === void 0 ? void 0 : _b.dispose();\n this._thinInstanceDataStorage.previousMatrixBuffer = null;\n this._thinInstanceDataStorage.previousMatrixData = buffer;\n if (buffer !== null) {\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", buffer, staticBuffer);\n }\n }\n else {\n // color for instanced mesh is ColorInstanceKind and not ColorKind because of native that needs to do the differenciation\n // hot switching kind here to preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (buffer === null) {\n if ((_c = this._userThinInstanceBuffersStorage) === null || _c === void 0 ? void 0 : _c.data[kind]) {\n this.removeVerticesData(kind);\n delete this._userThinInstanceBuffersStorage.data[kind];\n delete this._userThinInstanceBuffersStorage.strides[kind];\n delete this._userThinInstanceBuffersStorage.sizes[kind];\n delete this._userThinInstanceBuffersStorage.vertexBuffers[kind];\n }\n }\n else {\n this._thinInstanceInitializeUserStorage();\n this._userThinInstanceBuffersStorage.data[kind] = buffer;\n this._userThinInstanceBuffersStorage.strides[kind] = stride;\n this._userThinInstanceBuffersStorage.sizes[kind] = buffer.length;\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), buffer, kind, !staticBuffer, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n }\n }\n};\nMesh.prototype.thinInstanceBufferUpdated = function (kind) {\n var _a, _b, _c;\n if (kind === \"matrix\") {\n (_a = this._thinInstanceDataStorage.matrixBuffer) === null || _a === void 0 ? void 0 : _a.updateDirectly(this._thinInstanceDataStorage.matrixData, 0, this._thinInstanceDataStorage.instancesCount);\n }\n else if (kind === \"previousMatrix\") {\n (_b = this._thinInstanceDataStorage.previousMatrixBuffer) === null || _b === void 0 ? void 0 : _b.updateDirectly(this._thinInstanceDataStorage.previousMatrixData, 0, this._thinInstanceDataStorage.instancesCount);\n }\n else {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if ((_c = this._userThinInstanceBuffersStorage) === null || _c === void 0 ? void 0 : _c.vertexBuffers[kind]) {\n this._userThinInstanceBuffersStorage.vertexBuffers[kind].updateDirectly(this._userThinInstanceBuffersStorage.data[kind], 0);\n }\n }\n};\nMesh.prototype.thinInstancePartialBufferUpdate = function (kind, data, offset) {\n var _a;\n if (kind === \"matrix\") {\n if (this._thinInstanceDataStorage.matrixBuffer) {\n this._thinInstanceDataStorage.matrixBuffer.updateDirectly(data, offset);\n }\n }\n else {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if ((_a = this._userThinInstanceBuffersStorage) === null || _a === void 0 ? void 0 : _a.vertexBuffers[kind]) {\n this._userThinInstanceBuffersStorage.vertexBuffers[kind].updateDirectly(data, offset);\n }\n }\n};\nMesh.prototype.thinInstanceGetWorldMatrices = function () {\n if (!this._thinInstanceDataStorage.matrixData || !this._thinInstanceDataStorage.matrixBuffer) {\n return [];\n }\n const matrixData = this._thinInstanceDataStorage.matrixData;\n if (!this._thinInstanceDataStorage.worldMatrices) {\n this._thinInstanceDataStorage.worldMatrices = [];\n for (let i = 0; i < this._thinInstanceDataStorage.instancesCount; ++i) {\n this._thinInstanceDataStorage.worldMatrices[i] = Matrix.FromArray(matrixData, i * 16);\n }\n }\n return this._thinInstanceDataStorage.worldMatrices;\n};\nMesh.prototype.thinInstanceRefreshBoundingInfo = function (forceRefreshParentInfo = false, applySkeleton = false, applyMorph = false) {\n if (!this._thinInstanceDataStorage.matrixData || !this._thinInstanceDataStorage.matrixBuffer) {\n return;\n }\n const vectors = this._thinInstanceDataStorage.boundingVectors;\n if (forceRefreshParentInfo || !this.rawBoundingInfo) {\n vectors.length = 0;\n this.refreshBoundingInfo(applySkeleton, applyMorph);\n const boundingInfo = this.getBoundingInfo();\n this.rawBoundingInfo = new BoundingInfo(boundingInfo.minimum, boundingInfo.maximum);\n }\n const boundingInfo = this.getBoundingInfo();\n const matrixData = this._thinInstanceDataStorage.matrixData;\n if (vectors.length === 0) {\n for (let v = 0; v < boundingInfo.boundingBox.vectors.length; ++v) {\n vectors.push(boundingInfo.boundingBox.vectors[v].clone());\n }\n }\n TmpVectors.Vector3[0].setAll(Number.POSITIVE_INFINITY); // min\n TmpVectors.Vector3[1].setAll(Number.NEGATIVE_INFINITY); // max\n for (let i = 0; i < this._thinInstanceDataStorage.instancesCount; ++i) {\n Matrix.FromArrayToRef(matrixData, i * 16, TmpVectors.Matrix[0]);\n for (let v = 0; v < vectors.length; ++v) {\n Vector3.TransformCoordinatesToRef(vectors[v], TmpVectors.Matrix[0], TmpVectors.Vector3[2]);\n TmpVectors.Vector3[0].minimizeInPlace(TmpVectors.Vector3[2]);\n TmpVectors.Vector3[1].maximizeInPlace(TmpVectors.Vector3[2]);\n }\n }\n boundingInfo.reConstruct(TmpVectors.Vector3[0], TmpVectors.Vector3[1]);\n this._updateBoundingInfo();\n};\nMesh.prototype._thinInstanceUpdateBufferSize = function (kind, numInstances = 1) {\n var _a, _b, _c;\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n const kindIsMatrix = kind === \"matrix\";\n if (!kindIsMatrix && (!this._userThinInstanceBuffersStorage || !this._userThinInstanceBuffersStorage.strides[kind])) {\n return;\n }\n const stride = kindIsMatrix ? 16 : this._userThinInstanceBuffersStorage.strides[kind];\n const currentSize = kindIsMatrix ? this._thinInstanceDataStorage.matrixBufferSize : this._userThinInstanceBuffersStorage.sizes[kind];\n let data = kindIsMatrix ? this._thinInstanceDataStorage.matrixData : this._userThinInstanceBuffersStorage.data[kind];\n const bufferSize = (this._thinInstanceDataStorage.instancesCount + numInstances) * stride;\n let newSize = currentSize;\n while (newSize < bufferSize) {\n newSize *= 2;\n }\n if (!data || currentSize != newSize) {\n if (!data) {\n data = new Float32Array(newSize);\n }\n else {\n const newData = new Float32Array(newSize);\n newData.set(data, 0);\n data = newData;\n }\n if (kindIsMatrix) {\n (_a = this._thinInstanceDataStorage.matrixBuffer) === null || _a === void 0 ? void 0 : _a.dispose();\n this._thinInstanceDataStorage.matrixBuffer = this._thinInstanceCreateMatrixBuffer(\"world\", data, false);\n this._thinInstanceDataStorage.matrixData = data;\n this._thinInstanceDataStorage.matrixBufferSize = newSize;\n if (this._scene.needsPreviousWorldMatrices && !this._thinInstanceDataStorage.previousMatrixData) {\n (_b = this._thinInstanceDataStorage.previousMatrixBuffer) === null || _b === void 0 ? void 0 : _b.dispose();\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", data, false);\n }\n }\n else {\n (_c = this._userThinInstanceBuffersStorage.vertexBuffers[kind]) === null || _c === void 0 ? void 0 : _c.dispose();\n this._userThinInstanceBuffersStorage.data[kind] = data;\n this._userThinInstanceBuffersStorage.sizes[kind] = newSize;\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), data, kind, true, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n }\n }\n};\nMesh.prototype._thinInstanceInitializeUserStorage = function () {\n if (!this._userThinInstanceBuffersStorage) {\n this._userThinInstanceBuffersStorage = {\n data: {},\n sizes: {},\n vertexBuffers: {},\n strides: {},\n };\n }\n};\nMesh.prototype._disposeThinInstanceSpecificData = function () {\n var _a;\n if ((_a = this._thinInstanceDataStorage) === null || _a === void 0 ? void 0 : _a.matrixBuffer) {\n this._thinInstanceDataStorage.matrixBuffer.dispose();\n this._thinInstanceDataStorage.matrixBuffer = null;\n }\n};\n//# sourceMappingURL=thinInstanceMesh.js.map","import { Vector3, Quaternion, Matrix, TmpVectors } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader.js\";\nimport \"@inter-ikea-betrakta-babylonjs/core/Meshes/thinInstanceMesh.js\";\nconst NAME = \"EXT_mesh_gpu_instancing\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md)\n * [Playground Sample](https://playground.babylonjs.com/#QFIGLW#9)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_mesh_gpu_instancing {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n this._loader._disableInstancedMesh++;\n const promise = this._loader.loadNodeAsync(`/nodes/${node.index}`, node, assign);\n this._loader._disableInstancedMesh--;\n if (!node._primitiveBabylonMeshes) {\n return promise;\n }\n const promises = new Array();\n let instanceCount = 0;\n const loadAttribute = (attribute) => {\n if (extension.attributes[attribute] == undefined) {\n promises.push(Promise.resolve(null));\n return;\n }\n const accessor = ArrayItem.Get(`${extensionContext}/attributes/${attribute}`, this._loader.gltf.accessors, extension.attributes[attribute]);\n promises.push(this._loader._loadFloatAccessorAsync(`/accessors/${accessor.bufferView}`, accessor));\n if (instanceCount === 0) {\n instanceCount = accessor.count;\n }\n else if (instanceCount !== accessor.count) {\n throw new Error(`${extensionContext}/attributes: Instance buffer accessors do not have the same count.`);\n }\n };\n loadAttribute(\"TRANSLATION\");\n loadAttribute(\"ROTATION\");\n loadAttribute(\"SCALE\");\n return promise.then((babylonTransformNode) => {\n return Promise.all(promises).then(([translationBuffer, rotationBuffer, scaleBuffer]) => {\n const matrices = new Float32Array(instanceCount * 16);\n TmpVectors.Vector3[0].copyFromFloats(0, 0, 0); // translation\n TmpVectors.Quaternion[0].copyFromFloats(0, 0, 0, 1); // rotation\n TmpVectors.Vector3[1].copyFromFloats(1, 1, 1); // scale\n for (let i = 0; i < instanceCount; ++i) {\n translationBuffer && Vector3.FromArrayToRef(translationBuffer, i * 3, TmpVectors.Vector3[0]);\n rotationBuffer && Quaternion.FromArrayToRef(rotationBuffer, i * 4, TmpVectors.Quaternion[0]);\n scaleBuffer && Vector3.FromArrayToRef(scaleBuffer, i * 3, TmpVectors.Vector3[1]);\n Matrix.ComposeToRef(TmpVectors.Vector3[1], TmpVectors.Quaternion[0], TmpVectors.Vector3[0], TmpVectors.Matrix[0]);\n TmpVectors.Matrix[0].copyToArray(matrices, i * 16);\n }\n for (const babylonMesh of node._primitiveBabylonMeshes) {\n babylonMesh.thinInstanceSetBuffer(\"matrix\", matrices, 16, true);\n }\n return babylonTransformNode;\n });\n });\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new EXT_mesh_gpu_instancing(loader));\n//# sourceMappingURL=EXT_mesh_gpu_instancing.js.map","import { Tools } from \"../../Misc/tools.js\";\n/**\n * Meshopt compression (https://github.com/zeux/meshoptimizer)\n *\n * This class wraps the meshopt library from https://github.com/zeux/meshoptimizer/tree/master/js.\n *\n * **Encoder**\n *\n * The encoder is not currently implemented.\n *\n * **Decoder**\n *\n * By default, the configuration points to a copy of the meshopt files on the Babylon.js preview CDN (e.g. https://preview.babylonjs.com/meshopt_decoder.js).\n *\n * To update the configuration, use the following code:\n * ```javascript\n * MeshoptCompression.Configuration = {\n * decoder: {\n * url: \"\"\n * }\n * };\n * ```\n */\nexport class MeshoptCompression {\n /**\n * Default instance for the meshoptimizer object.\n */\n static get Default() {\n if (!MeshoptCompression._Default) {\n MeshoptCompression._Default = new MeshoptCompression();\n }\n return MeshoptCompression._Default;\n }\n /**\n * Constructor\n */\n constructor() {\n const decoder = MeshoptCompression.Configuration.decoder;\n this._decoderModulePromise = Tools.LoadBabylonScriptAsync(decoder.url).then(() => {\n // Wait for WebAssembly compilation before resolving promise\n return MeshoptDecoder.ready;\n });\n }\n /**\n * Stop all async operations and release resources.\n */\n dispose() {\n delete this._decoderModulePromise;\n }\n /**\n * Decode meshopt data.\n * @see https://github.com/zeux/meshoptimizer/tree/master/js#decoder\n * @param source The input data.\n * @param count The number of elements.\n * @param stride The stride in bytes.\n * @param mode The compression mode.\n * @param filter The compression filter.\n * @returns a Promise that resolves to the decoded data\n */\n decodeGltfBufferAsync(source, count, stride, mode, filter) {\n return this._decoderModulePromise.then(() => {\n const result = new Uint8Array(count * stride);\n MeshoptDecoder.decodeGltfBuffer(result, count, stride, source, mode, filter);\n return result;\n });\n }\n}\n/**\n * The configuration. Defaults to the following:\n * ```javascript\n * decoder: {\n * url: \"https://cdn.babylonjs.com/meshopt_decoder.js\"\n * }\n * ```\n */\nMeshoptCompression.Configuration = {\n decoder: {\n url: `${Tools._DefaultCdnUrl}/meshopt_decoder.js`,\n },\n};\nMeshoptCompression._Default = null;\n//# sourceMappingURL=meshoptCompression.js.map","import { ArrayItem, GLTFLoader } from \"../glTFLoader.js\";\nimport { MeshoptCompression } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/Compression/meshoptCompression.js\";\nconst NAME = \"EXT_meshopt_compression\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md)\n *\n * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js\n * @since 5.0.0\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_meshopt_compression {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this.enabled = loader.isExtensionUsed(NAME);\n this._loader = loader;\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadBufferViewAsync(context, bufferView) {\n return GLTFLoader.LoadExtensionAsync(context, bufferView, this.name, (extensionContext, extension) => {\n const bufferViewMeshopt = bufferView;\n if (bufferViewMeshopt._meshOptData) {\n return bufferViewMeshopt._meshOptData;\n }\n const buffer = ArrayItem.Get(`${context}/buffer`, this._loader.gltf.buffers, extension.buffer);\n bufferViewMeshopt._meshOptData = this._loader.loadBufferAsync(`/buffers/${buffer.index}`, buffer, extension.byteOffset || 0, extension.byteLength).then((buffer) => {\n return MeshoptCompression.Default.decodeGltfBufferAsync(buffer, extension.count, extension.byteStride, extension.mode, extension.filter);\n });\n return bufferViewMeshopt._meshOptData;\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new EXT_meshopt_compression(loader));\n//# sourceMappingURL=EXT_meshopt_compression.js.map","import { GLTFLoader, ArrayItem } from \"../glTFLoader.js\";\nconst NAME = \"EXT_texture_webp\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_webp/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_texture_webp {\n /**\n * @internal\n */\n constructor(loader) {\n /** The name of this extension. */\n this.name = NAME;\n this._loader = loader;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n _loadTextureAsync(context, texture, assign) {\n return GLTFLoader.LoadExtensionAsync(context, texture, this.name, (extensionContext, extension) => {\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);\n const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);\n return this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {\n assign(babylonTexture);\n }, undefined, !texture._textureInfo.nonColorData);\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new EXT_texture_webp(loader));\n//# sourceMappingURL=EXT_texture_webp.js.map","import { DracoCompression } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/Compression/dracoCompression.js\";\nimport { VertexBuffer } from \"@inter-ikea-betrakta-babylonjs/core/Buffers/buffer.js\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader.js\";\nconst NAME = \"KHR_draco_mesh_compression\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_draco_mesh_compression {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines whether to use the normalized flag from the glTF accessor instead of the Draco data. Defaults to true.\n */\n this.useNormalizedFlagFromAccessor = true;\n this._loader = loader;\n this.enabled = DracoCompression.DecoderAvailable && this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n delete this.dracoCompression;\n this._loader = null;\n }\n /**\n * @internal\n */\n _loadVertexDataAsync(context, primitive, babylonMesh) {\n return GLTFLoader.LoadExtensionAsync(context, primitive, this.name, (extensionContext, extension) => {\n if (primitive.mode != undefined) {\n if (primitive.mode !== 5 /* MeshPrimitiveMode.TRIANGLE_STRIP */ && primitive.mode !== 4 /* MeshPrimitiveMode.TRIANGLES */) {\n throw new Error(`${context}: Unsupported mode ${primitive.mode}`);\n }\n // TODO: handle triangle strips\n if (primitive.mode === 5 /* MeshPrimitiveMode.TRIANGLE_STRIP */) {\n throw new Error(`${context}: Mode ${primitive.mode} is not currently supported`);\n }\n }\n const attributes = {};\n const normalized = {};\n const loadAttribute = (name, kind) => {\n const uniqueId = extension.attributes[name];\n if (uniqueId == undefined) {\n return;\n }\n babylonMesh._delayInfo = babylonMesh._delayInfo || [];\n if (babylonMesh._delayInfo.indexOf(kind) === -1) {\n babylonMesh._delayInfo.push(kind);\n }\n attributes[kind] = uniqueId;\n if (this.useNormalizedFlagFromAccessor) {\n const accessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[name]);\n if (accessor) {\n normalized[kind] = accessor.normalized || false;\n }\n }\n };\n loadAttribute(\"POSITION\", VertexBuffer.PositionKind);\n loadAttribute(\"NORMAL\", VertexBuffer.NormalKind);\n loadAttribute(\"TANGENT\", VertexBuffer.TangentKind);\n loadAttribute(\"TEXCOORD_0\", VertexBuffer.UVKind);\n loadAttribute(\"TEXCOORD_1\", VertexBuffer.UV2Kind);\n loadAttribute(\"TEXCOORD_2\", VertexBuffer.UV3Kind);\n loadAttribute(\"TEXCOORD_3\", VertexBuffer.UV4Kind);\n loadAttribute(\"TEXCOORD_4\", VertexBuffer.UV5Kind);\n loadAttribute(\"TEXCOORD_5\", VertexBuffer.UV6Kind);\n loadAttribute(\"JOINTS_0\", VertexBuffer.MatricesIndicesKind);\n loadAttribute(\"WEIGHTS_0\", VertexBuffer.MatricesWeightsKind);\n loadAttribute(\"COLOR_0\", VertexBuffer.ColorKind);\n const bufferView = ArrayItem.Get(extensionContext, this._loader.gltf.bufferViews, extension.bufferView);\n if (!bufferView._dracoBabylonGeometry) {\n bufferView._dracoBabylonGeometry = this._loader.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView).then((data) => {\n const dracoCompression = this.dracoCompression || DracoCompression.Default;\n return dracoCompression._decodeMeshToGeometryForGltfAsync(babylonMesh.name, this._loader.babylonScene, data, attributes, normalized).catch((error) => {\n throw new Error(`${context}: ${error.message}`);\n });\n });\n }\n return bufferView._dracoBabylonGeometry;\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_draco_mesh_compression(loader));\n//# sourceMappingURL=KHR_draco_mesh_compression.js.map","import { Vector3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js\";\nimport { Color3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js\";\nimport { DirectionalLight } from \"@inter-ikea-betrakta-babylonjs/core/Lights/directionalLight.js\";\nimport { PointLight } from \"@inter-ikea-betrakta-babylonjs/core/Lights/pointLight.js\";\nimport { SpotLight } from \"@inter-ikea-betrakta-babylonjs/core/Lights/spotLight.js\";\nimport { Light } from \"@inter-ikea-betrakta-babylonjs/core/Lights/light.js\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader.js\";\nconst NAME = \"KHR_lights_punctual\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_lights {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n delete this._lights;\n }\n /** @internal */\n onLoading() {\n const extensions = this._loader.gltf.extensions;\n if (extensions && extensions[this.name]) {\n const extension = extensions[this.name];\n this._lights = extension.lights;\n ArrayItem.Assign(this._lights);\n }\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n this._loader._allMaterialsDirtyRequired = true;\n return this._loader.loadNodeAsync(context, node, (babylonMesh) => {\n let babylonLight;\n const light = ArrayItem.Get(extensionContext, this._lights, extension.light);\n const name = light.name || babylonMesh.name;\n this._loader.babylonScene._blockEntityCollection = !!this._loader._assetContainer;\n switch (light.type) {\n case \"directional\" /* KHRLightsPunctual_LightType.DIRECTIONAL */: {\n const babylonDirectionalLight = new DirectionalLight(name, Vector3.Backward(), this._loader.babylonScene);\n babylonDirectionalLight.position.setAll(0);\n babylonLight = babylonDirectionalLight;\n break;\n }\n case \"point\" /* KHRLightsPunctual_LightType.POINT */: {\n babylonLight = new PointLight(name, Vector3.Zero(), this._loader.babylonScene);\n break;\n }\n case \"spot\" /* KHRLightsPunctual_LightType.SPOT */: {\n const babylonSpotLight = new SpotLight(name, Vector3.Zero(), Vector3.Backward(), 0, 1, this._loader.babylonScene);\n babylonSpotLight.angle = ((light.spot && light.spot.outerConeAngle) || Math.PI / 4) * 2;\n babylonSpotLight.innerAngle = ((light.spot && light.spot.innerConeAngle) || 0) * 2;\n babylonLight = babylonSpotLight;\n break;\n }\n default: {\n this._loader.babylonScene._blockEntityCollection = false;\n throw new Error(`${extensionContext}: Invalid light type (${light.type})`);\n }\n }\n babylonLight._parentContainer = this._loader._assetContainer;\n this._loader.babylonScene._blockEntityCollection = false;\n light._babylonLight = babylonLight;\n babylonLight.falloffType = Light.FALLOFF_GLTF;\n babylonLight.diffuse = light.color ? Color3.FromArray(light.color) : Color3.White();\n babylonLight.intensity = light.intensity == undefined ? 1 : light.intensity;\n babylonLight.range = light.range == undefined ? Number.MAX_VALUE : light.range;\n babylonLight.parent = babylonMesh;\n this._loader._babylonLights.push(babylonLight);\n GLTFLoader.AddPointerMetadata(babylonLight, extensionContext);\n assign(babylonMesh);\n });\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_lights(loader));\n//# sourceMappingURL=KHR_lights_punctual.js.map","import { Color3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js\";\nimport { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_materials_pbrSpecularGlossiness\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_pbrSpecularGlossiness {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 200;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, material, extension, babylonMaterial));\n this._loader.loadMaterialAlphaProperties(context, material, babylonMaterial);\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSpecularGlossinessPropertiesAsync(context, material, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.metallic = null;\n babylonMaterial.roughness = null;\n if (properties.diffuseFactor) {\n babylonMaterial.albedoColor = Color3.FromArray(properties.diffuseFactor);\n babylonMaterial.alpha = properties.diffuseFactor[3];\n }\n else {\n babylonMaterial.albedoColor = Color3.White();\n }\n babylonMaterial.reflectivityColor = properties.specularFactor ? Color3.FromArray(properties.specularFactor) : Color3.White();\n babylonMaterial.microSurface = properties.glossinessFactor == undefined ? 1 : properties.glossinessFactor;\n if (properties.diffuseTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTexture`, properties.diffuseTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse)`;\n babylonMaterial.albedoTexture = texture;\n }));\n }\n if (properties.specularGlossinessTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularGlossinessTexture`, properties.specularGlossinessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular Glossiness)`;\n babylonMaterial.reflectivityTexture = texture;\n babylonMaterial.reflectivityTexture.hasAlpha = true;\n }));\n babylonMaterial.useMicroSurfaceFromReflectivityMapAlpha = true;\n }\n return Promise.all(promises).then(() => { });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_pbrSpecularGlossiness(loader));\n//# sourceMappingURL=KHR_materials_pbrSpecularGlossiness.js.map","import { Color3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js\";\nimport { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_materials_unlit\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_unlit/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_unlit {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 210;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, () => {\n return this._loadUnlitPropertiesAsync(context, material, babylonMaterial);\n });\n }\n _loadUnlitPropertiesAsync(context, material, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.unlit = true;\n const properties = material.pbrMetallicRoughness;\n if (properties) {\n if (properties.baseColorFactor) {\n babylonMaterial.albedoColor = Color3.FromArray(properties.baseColorFactor);\n babylonMaterial.alpha = properties.baseColorFactor[3];\n }\n else {\n babylonMaterial.albedoColor = Color3.White();\n }\n if (properties.baseColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/baseColorTexture`, properties.baseColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Base Color)`;\n babylonMaterial.albedoTexture = texture;\n }));\n }\n }\n if (material.doubleSided) {\n babylonMaterial.backFaceCulling = false;\n babylonMaterial.twoSidedLighting = true;\n }\n this._loader.loadMaterialAlphaProperties(context, material, babylonMaterial);\n return Promise.all(promises).then(() => { });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_unlit(loader));\n//# sourceMappingURL=KHR_materials_unlit.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_materials_clearcoat\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_clearcoat/README.md)\n * [Playground Sample](https://www.babylonjs-playground.com/frame.html#7F7PN6#8)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_clearcoat {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 190;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadClearCoatPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadClearCoatPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.clearCoat.isEnabled = true;\n babylonMaterial.clearCoat.useRoughnessFromMainTexture = false;\n babylonMaterial.clearCoat.remapF0OnInterfaceChange = false;\n if (properties.clearcoatFactor != undefined) {\n babylonMaterial.clearCoat.intensity = properties.clearcoatFactor;\n }\n else {\n babylonMaterial.clearCoat.intensity = 0;\n }\n if (properties.clearcoatTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatTexture`, properties.clearcoatTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat Intensity)`;\n babylonMaterial.clearCoat.texture = texture;\n }));\n }\n if (properties.clearcoatRoughnessFactor != undefined) {\n babylonMaterial.clearCoat.roughness = properties.clearcoatRoughnessFactor;\n }\n else {\n babylonMaterial.clearCoat.roughness = 0;\n }\n if (properties.clearcoatRoughnessTexture) {\n properties.clearcoatRoughnessTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatRoughnessTexture`, properties.clearcoatRoughnessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat Roughness)`;\n babylonMaterial.clearCoat.textureRoughness = texture;\n }));\n }\n if (properties.clearcoatNormalTexture) {\n properties.clearcoatNormalTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatNormalTexture`, properties.clearcoatNormalTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat Normal)`;\n babylonMaterial.clearCoat.bumpTexture = texture;\n }));\n babylonMaterial.invertNormalMapX = !babylonMaterial.getScene().useRightHandedSystem;\n babylonMaterial.invertNormalMapY = babylonMaterial.getScene().useRightHandedSystem;\n if (properties.clearcoatNormalTexture.scale != undefined) {\n babylonMaterial.clearCoat.bumpTexture.level = properties.clearcoatNormalTexture.scale;\n }\n }\n return Promise.all(promises).then(() => { });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_clearcoat(loader));\n//# sourceMappingURL=KHR_materials_clearcoat.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_materials_iridescence\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_iridescence/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_iridescence {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 195;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadIridescencePropertiesAsync(context, properties, babylonMaterial) {\n var _a, _b, _c, _d, _e;\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.iridescence.isEnabled = true;\n babylonMaterial.iridescence.intensity = (_a = properties.iridescenceFactor) !== null && _a !== void 0 ? _a : 0;\n babylonMaterial.iridescence.indexOfRefraction = (_c = (_b = properties.iridescenceIor) !== null && _b !== void 0 ? _b : properties.iridescenceIOR) !== null && _c !== void 0 ? _c : 1.3;\n babylonMaterial.iridescence.minimumThickness = (_d = properties.iridescenceThicknessMinimum) !== null && _d !== void 0 ? _d : 100;\n babylonMaterial.iridescence.maximumThickness = (_e = properties.iridescenceThicknessMaximum) !== null && _e !== void 0 ? _e : 400;\n if (properties.iridescenceTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceTexture`, properties.iridescenceTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Iridescence Intensity)`;\n babylonMaterial.iridescence.texture = texture;\n }));\n }\n if (properties.iridescenceThicknessTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceThicknessTexture`, properties.iridescenceThicknessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Iridescence Thickness)`;\n babylonMaterial.iridescence.thicknessTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_iridescence(loader));\n//# sourceMappingURL=KHR_materials_iridescence.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_materials_anisotropy\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_anisotropy)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_anisotropy {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 195;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadIridescencePropertiesAsync(context, properties, babylonMaterial) {\n var _a, _b;\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.anisotropy.isEnabled = true;\n babylonMaterial.anisotropy.intensity = (_a = properties.anisotropyStrength) !== null && _a !== void 0 ? _a : 0;\n babylonMaterial.anisotropy.angle = (_b = properties.anisotropyRotation) !== null && _b !== void 0 ? _b : 0;\n if (properties.anisotropyTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/anisotropyTexture`, properties.anisotropyTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Anisotropy Intensity)`;\n babylonMaterial.anisotropy.texture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_anisotropy(loader));\n//# sourceMappingURL=KHR_materials_anisotropy.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_materials_emissive_strength\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_emissive_strength/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_emissive_strength {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 170;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n return this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial).then(() => {\n this._loadEmissiveProperties(extensionContext, extension, babylonMaterial);\n });\n });\n }\n _loadEmissiveProperties(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n if (properties.emissiveStrength !== undefined) {\n babylonMaterial.emissiveColor.scaleToRef(properties.emissiveStrength, babylonMaterial.emissiveColor);\n }\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_emissive_strength(loader));\n//# sourceMappingURL=KHR_materials_emissive_strength.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nimport { Color3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js\";\nconst NAME = \"KHR_materials_sheen\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_sheen/README.md)\n * [Playground Sample](https://www.babylonjs-playground.com/frame.html#BNIZX6#4)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_sheen {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 190;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadSheenPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSheenPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.sheen.isEnabled = true;\n babylonMaterial.sheen.intensity = 1;\n if (properties.sheenColorFactor != undefined) {\n babylonMaterial.sheen.color = Color3.FromArray(properties.sheenColorFactor);\n }\n else {\n babylonMaterial.sheen.color = Color3.Black();\n }\n if (properties.sheenColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenColorTexture`, properties.sheenColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Sheen Color)`;\n babylonMaterial.sheen.texture = texture;\n }));\n }\n if (properties.sheenRoughnessFactor !== undefined) {\n babylonMaterial.sheen.roughness = properties.sheenRoughnessFactor;\n }\n else {\n babylonMaterial.sheen.roughness = 0;\n }\n if (properties.sheenRoughnessTexture) {\n properties.sheenRoughnessTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenRoughnessTexture`, properties.sheenRoughnessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Sheen Roughness)`;\n babylonMaterial.sheen.textureRoughness = texture;\n }));\n }\n babylonMaterial.sheen.albedoScaling = true;\n babylonMaterial.sheen.useRoughnessFromMainTexture = false;\n return Promise.all(promises).then(() => { });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_sheen(loader));\n//# sourceMappingURL=KHR_materials_sheen.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nimport { Color3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js\";\nconst NAME = \"KHR_materials_specular\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_specular {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 190;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadSpecularPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSpecularPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n if (properties.specularFactor !== undefined) {\n babylonMaterial.metallicF0Factor = properties.specularFactor;\n }\n if (properties.specularColorFactor !== undefined) {\n babylonMaterial.metallicReflectanceColor = Color3.FromArray(properties.specularColorFactor);\n }\n if (properties.specularTexture) {\n properties.specularTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularTexture`, properties.specularTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular F0 Strength)`;\n babylonMaterial.metallicReflectanceTexture = texture;\n babylonMaterial.useOnlyMetallicFromMetallicReflectanceTexture = true;\n }));\n }\n if (properties.specularColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularColorTexture`, properties.specularColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular F0 Color)`;\n babylonMaterial.reflectanceTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_specular(loader));\n//# sourceMappingURL=KHR_materials_specular.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_materials_ior\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_ior/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_ior {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 180;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadIorPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadIorPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n if (properties.ior !== undefined) {\n babylonMaterial.indexOfRefraction = properties.ior;\n }\n else {\n babylonMaterial.indexOfRefraction = KHR_materials_ior._DEFAULT_IOR;\n }\n return Promise.resolve();\n }\n}\n/**\n * Default ior Value from the spec.\n */\nKHR_materials_ior._DEFAULT_IOR = 1.5;\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_ior(loader));\n//# sourceMappingURL=KHR_materials_ior.js.map","import { GLTFLoader, ArrayItem } from \"../glTFLoader.js\";\nimport { Mesh } from \"@inter-ikea-betrakta-babylonjs/core/Meshes/mesh.js\";\nconst NAME = \"KHR_materials_variants\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_variants/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_variants {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * Gets the list of available variant names for this asset.\n * @param rootMesh The glTF root mesh\n * @returns the list of all the variant names for this model\n */\n static GetAvailableVariants(rootMesh) {\n const extensionMetadata = this._GetExtensionMetadata(rootMesh);\n if (!extensionMetadata) {\n return [];\n }\n return Object.keys(extensionMetadata.variants);\n }\n /**\n * Gets the list of available variant names for this asset.\n * @param rootMesh The glTF root mesh\n * @returns the list of all the variant names for this model\n */\n getAvailableVariants(rootMesh) {\n return KHR_materials_variants.GetAvailableVariants(rootMesh);\n }\n /**\n * Select a variant given a variant name or a list of variant names.\n * @param rootMesh The glTF root mesh\n * @param variantName The variant name(s) to select.\n */\n static SelectVariant(rootMesh, variantName) {\n const extensionMetadata = this._GetExtensionMetadata(rootMesh);\n if (!extensionMetadata) {\n throw new Error(`Cannot select variant on a glTF mesh that does not have the ${NAME} extension`);\n }\n const select = (variantName) => {\n const entries = extensionMetadata.variants[variantName];\n if (entries) {\n for (const entry of entries) {\n entry.mesh.material = entry.material;\n }\n }\n };\n if (variantName instanceof Array) {\n for (const name of variantName) {\n select(name);\n }\n }\n else {\n select(variantName);\n }\n extensionMetadata.lastSelected = variantName;\n }\n /**\n * Select a variant given a variant name or a list of variant names.\n * @param rootMesh The glTF root mesh\n * @param variantName The variant name(s) to select.\n */\n selectVariant(rootMesh, variantName) {\n return KHR_materials_variants.SelectVariant(rootMesh, variantName);\n }\n /**\n * Reset back to the original before selecting a variant.\n * @param rootMesh The glTF root mesh\n */\n static Reset(rootMesh) {\n const extensionMetadata = this._GetExtensionMetadata(rootMesh);\n if (!extensionMetadata) {\n throw new Error(`Cannot reset on a glTF mesh that does not have the ${NAME} extension`);\n }\n for (const entry of extensionMetadata.original) {\n entry.mesh.material = entry.material;\n }\n extensionMetadata.lastSelected = null;\n }\n /**\n * Reset back to the original before selecting a variant.\n * @param rootMesh The glTF root mesh\n */\n reset(rootMesh) {\n return KHR_materials_variants.Reset(rootMesh);\n }\n /**\n * Gets the last selected variant name(s) or null if original.\n * @param rootMesh The glTF root mesh\n * @returns The selected variant name(s).\n */\n static GetLastSelectedVariant(rootMesh) {\n const extensionMetadata = this._GetExtensionMetadata(rootMesh);\n if (!extensionMetadata) {\n throw new Error(`Cannot get the last selected variant on a glTF mesh that does not have the ${NAME} extension`);\n }\n return extensionMetadata.lastSelected;\n }\n /**\n * Gets the last selected variant name(s) or null if original.\n * @param rootMesh The glTF root mesh\n * @returns The selected variant name(s).\n */\n getLastSelectedVariant(rootMesh) {\n return KHR_materials_variants.GetLastSelectedVariant(rootMesh);\n }\n static _GetExtensionMetadata(rootMesh) {\n var _a, _b;\n return ((_b = (_a = rootMesh === null || rootMesh === void 0 ? void 0 : rootMesh._internalMetadata) === null || _a === void 0 ? void 0 : _a.gltf) === null || _b === void 0 ? void 0 : _b[NAME]) || null;\n }\n /** @internal */\n onLoading() {\n const extensions = this._loader.gltf.extensions;\n if (extensions && extensions[this.name]) {\n const extension = extensions[this.name];\n this._variants = extension.variants;\n }\n }\n /**\n * @internal\n */\n _loadMeshPrimitiveAsync(context, name, node, mesh, primitive, assign) {\n return GLTFLoader.LoadExtensionAsync(context, primitive, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader._loadMeshPrimitiveAsync(context, name, node, mesh, primitive, (babylonMesh) => {\n assign(babylonMesh);\n if (babylonMesh instanceof Mesh) {\n const babylonDrawMode = GLTFLoader._GetDrawMode(context, primitive.mode);\n const root = this._loader.rootBabylonMesh;\n const metadata = root ? (root._internalMetadata = root._internalMetadata || {}) : {};\n const gltf = (metadata.gltf = metadata.gltf || {});\n const extensionMetadata = (gltf[NAME] = gltf[NAME] || { lastSelected: null, original: [], variants: {} });\n // Store the original material.\n extensionMetadata.original.push({ mesh: babylonMesh, material: babylonMesh.material });\n // For each mapping, look at the variants and make a new entry for them.\n for (let mappingIndex = 0; mappingIndex < extension.mappings.length; ++mappingIndex) {\n const mapping = extension.mappings[mappingIndex];\n const material = ArrayItem.Get(`${extensionContext}/mappings/${mappingIndex}/material`, this._loader.gltf.materials, mapping.material);\n promises.push(this._loader._loadMaterialAsync(`#/materials/${mapping.material}`, material, babylonMesh, babylonDrawMode, (babylonMaterial) => {\n for (let mappingVariantIndex = 0; mappingVariantIndex < mapping.variants.length; ++mappingVariantIndex) {\n const variantIndex = mapping.variants[mappingVariantIndex];\n const variant = ArrayItem.Get(`/extensions/${NAME}/variants/${variantIndex}`, this._variants, variantIndex);\n extensionMetadata.variants[variant.name] = extensionMetadata.variants[variant.name] || [];\n extensionMetadata.variants[variant.name].push({\n mesh: babylonMesh,\n material: babylonMaterial,\n });\n // Replace the target when original mesh is cloned\n babylonMesh.onClonedObservable.add((newOne) => {\n const newMesh = newOne;\n let metadata = null;\n let newRoot = newMesh;\n // Find root to get medata\n do {\n newRoot = newRoot.parent;\n if (!newRoot) {\n return;\n }\n metadata = KHR_materials_variants._GetExtensionMetadata(newRoot);\n } while (metadata === null);\n // Need to clone the metadata on the root (first time only)\n if (root && metadata === KHR_materials_variants._GetExtensionMetadata(root)) {\n // Copy main metadata\n newRoot._internalMetadata = {};\n for (const key in root._internalMetadata) {\n newRoot._internalMetadata[key] = root._internalMetadata[key];\n }\n // Copy the gltf metadata\n newRoot._internalMetadata.gltf = [];\n for (const key in root._internalMetadata.gltf) {\n newRoot._internalMetadata.gltf[key] = root._internalMetadata.gltf[key];\n }\n // Duplicate the extension specific metadata\n newRoot._internalMetadata.gltf[NAME] = { lastSelected: null, original: [], variants: {} };\n for (const original of metadata.original) {\n newRoot._internalMetadata.gltf[NAME].original.push({\n mesh: original.mesh,\n material: original.material,\n });\n }\n for (const key in metadata.variants) {\n if (Object.prototype.hasOwnProperty.call(metadata.variants, key)) {\n newRoot._internalMetadata.gltf[NAME].variants[key] = [];\n for (const variantEntry of metadata.variants[key]) {\n newRoot._internalMetadata.gltf[NAME].variants[key].push({\n mesh: variantEntry.mesh,\n material: variantEntry.material,\n });\n }\n }\n }\n metadata = newRoot._internalMetadata.gltf[NAME];\n }\n // Relocate\n for (const target of metadata.original) {\n if (target.mesh === babylonMesh) {\n target.mesh = newMesh;\n }\n }\n for (const target of metadata.variants[variant.name]) {\n if (target.mesh === babylonMesh) {\n target.mesh = newMesh;\n }\n }\n });\n }\n }));\n }\n }\n }));\n return Promise.all(promises).then(([babylonMesh]) => {\n return babylonMesh;\n });\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_variants(loader));\n//# sourceMappingURL=KHR_materials_variants.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nimport { RenderTargetTexture } from \"@inter-ikea-betrakta-babylonjs/core/Materials/Textures/renderTargetTexture.js\";\nimport { Observable } from \"@inter-ikea-betrakta-babylonjs/core/Misc/observable.js\";\nimport { Constants } from \"@inter-ikea-betrakta-babylonjs/core/Engines/constants.js\";\nimport { Tools } from \"@inter-ikea-betrakta-babylonjs/core/Misc/tools.js\";\n/**\n * A class to handle setting up the rendering of opaque objects to be shown through transmissive objects.\n */\nclass TransmissionHelper {\n /**\n * Creates the default options for the helper.\n */\n static _GetDefaultOptions() {\n return {\n renderSize: 1024,\n samples: 4,\n lodGenerationScale: 1,\n lodGenerationOffset: -4,\n renderTargetTextureType: Constants.TEXTURETYPE_HALF_FLOAT,\n generateMipmaps: true,\n };\n }\n /**\n * constructor\n * @param options Defines the options we want to customize the helper\n * @param scene The scene to add the material to\n */\n constructor(options, scene) {\n this._opaqueRenderTarget = null;\n this._opaqueMeshesCache = [];\n this._transparentMeshesCache = [];\n this._materialObservers = {};\n this._options = {\n ...TransmissionHelper._GetDefaultOptions(),\n ...options,\n };\n this._scene = scene;\n this._scene._transmissionHelper = this;\n this.onErrorObservable = new Observable();\n this._scene.onDisposeObservable.addOnce(() => {\n this.dispose();\n });\n this._parseScene();\n this._setupRenderTargets();\n }\n /**\n * Updates the background according to the new options\n * @param options\n */\n updateOptions(options) {\n // First check if any options are actually being changed. If not, exit.\n const newValues = Object.keys(options).filter((key) => this._options[key] !== options[key]);\n if (!newValues.length) {\n return;\n }\n const newOptions = {\n ...this._options,\n ...options,\n };\n const oldOptions = this._options;\n this._options = newOptions;\n // If size changes, recreate everything\n if (newOptions.renderSize !== oldOptions.renderSize ||\n newOptions.renderTargetTextureType !== oldOptions.renderTargetTextureType ||\n newOptions.generateMipmaps !== oldOptions.generateMipmaps ||\n !this._opaqueRenderTarget) {\n this._setupRenderTargets();\n }\n else {\n this._opaqueRenderTarget.samples = newOptions.samples;\n this._opaqueRenderTarget.lodGenerationScale = newOptions.lodGenerationScale;\n this._opaqueRenderTarget.lodGenerationOffset = newOptions.lodGenerationOffset;\n }\n }\n /**\n * Gets the opaque render target texture or null if not available.\n */\n getOpaqueTarget() {\n return this._opaqueRenderTarget;\n }\n _shouldRenderAsTransmission(material) {\n if (!material) {\n return false;\n }\n if (material instanceof PBRMaterial && material.subSurface.isRefractionEnabled) {\n return true;\n }\n return false;\n }\n _addMesh(mesh) {\n this._materialObservers[mesh.uniqueId] = mesh.onMaterialChangedObservable.add(this._onMeshMaterialChanged.bind(this));\n // we need to defer the processing because _addMesh may be called as part as an instance mesh creation, in which case some\n // internal properties are not setup yet, like _sourceMesh (needed when doing mesh.material below)\n Tools.SetImmediate(() => {\n if (this._shouldRenderAsTransmission(mesh.material)) {\n mesh.material.refractionTexture = this._opaqueRenderTarget;\n if (this._transparentMeshesCache.indexOf(mesh) === -1) {\n this._transparentMeshesCache.push(mesh);\n }\n }\n else {\n if (this._opaqueMeshesCache.indexOf(mesh) === -1) {\n this._opaqueMeshesCache.push(mesh);\n }\n }\n });\n }\n _removeMesh(mesh) {\n mesh.onMaterialChangedObservable.remove(this._materialObservers[mesh.uniqueId]);\n delete this._materialObservers[mesh.uniqueId];\n let idx = this._transparentMeshesCache.indexOf(mesh);\n if (idx !== -1) {\n this._transparentMeshesCache.splice(idx, 1);\n }\n idx = this._opaqueMeshesCache.indexOf(mesh);\n if (idx !== -1) {\n this._opaqueMeshesCache.splice(idx, 1);\n }\n }\n _parseScene() {\n this._scene.meshes.forEach(this._addMesh.bind(this));\n // Listen for when a mesh is added to the scene and add it to our cache lists.\n this._scene.onNewMeshAddedObservable.add(this._addMesh.bind(this));\n // Listen for when a mesh is removed from to the scene and remove it from our cache lists.\n this._scene.onMeshRemovedObservable.add(this._removeMesh.bind(this));\n }\n // When one of the meshes in the scene has its material changed, make sure that it's in the correct cache list.\n _onMeshMaterialChanged(mesh) {\n const transparentIdx = this._transparentMeshesCache.indexOf(mesh);\n const opaqueIdx = this._opaqueMeshesCache.indexOf(mesh);\n // If the material is transparent, make sure that it's added to the transparent list and removed from the opaque list\n const useTransmission = this._shouldRenderAsTransmission(mesh.material);\n if (useTransmission) {\n if (mesh.material instanceof PBRMaterial) {\n mesh.material.subSurface.refractionTexture = this._opaqueRenderTarget;\n }\n if (opaqueIdx !== -1) {\n this._opaqueMeshesCache.splice(opaqueIdx, 1);\n this._transparentMeshesCache.push(mesh);\n }\n else if (transparentIdx === -1) {\n this._transparentMeshesCache.push(mesh);\n }\n // If the material is opaque, make sure that it's added to the opaque list and removed from the transparent list\n }\n else {\n if (transparentIdx !== -1) {\n this._transparentMeshesCache.splice(transparentIdx, 1);\n this._opaqueMeshesCache.push(mesh);\n }\n else if (opaqueIdx === -1) {\n this._opaqueMeshesCache.push(mesh);\n }\n }\n }\n /**\n * @internal\n * Check if the opaque render target has not been disposed and can still be used.\n * @returns\n */\n _isRenderTargetValid() {\n var _a;\n return ((_a = this._opaqueRenderTarget) === null || _a === void 0 ? void 0 : _a.getInternalTexture()) !== null;\n }\n /**\n * @internal\n * Setup the render targets according to the specified options.\n */\n _setupRenderTargets() {\n var _a, _b;\n if (this._opaqueRenderTarget) {\n this._opaqueRenderTarget.dispose();\n }\n this._opaqueRenderTarget = new RenderTargetTexture(\"opaqueSceneTexture\", this._options.renderSize, this._scene, this._options.generateMipmaps, undefined, this._options.renderTargetTextureType);\n this._opaqueRenderTarget.ignoreCameraViewport = true;\n this._opaqueRenderTarget.renderList = this._opaqueMeshesCache;\n this._opaqueRenderTarget.clearColor = (_b = (_a = this._options.clearColor) === null || _a === void 0 ? void 0 : _a.clone()) !== null && _b !== void 0 ? _b : this._scene.clearColor.clone();\n this._opaqueRenderTarget.gammaSpace = false;\n this._opaqueRenderTarget.lodGenerationScale = this._options.lodGenerationScale;\n this._opaqueRenderTarget.lodGenerationOffset = this._options.lodGenerationOffset;\n this._opaqueRenderTarget.samples = this._options.samples;\n let sceneImageProcessingapplyByPostProcess;\n let saveSceneEnvIntensity;\n this._opaqueRenderTarget.onBeforeBindObservable.add((opaqueRenderTarget) => {\n saveSceneEnvIntensity = this._scene.environmentIntensity;\n this._scene.environmentIntensity = 1.0;\n sceneImageProcessingapplyByPostProcess = this._scene.imageProcessingConfiguration.applyByPostProcess;\n if (!this._options.clearColor) {\n this._scene.clearColor.toLinearSpaceToRef(opaqueRenderTarget.clearColor, this._scene.getEngine().useExactSrgbConversions);\n }\n else {\n opaqueRenderTarget.clearColor.copyFrom(this._options.clearColor);\n }\n // we do not use the applyByPostProcess setter to avoid flagging all the materials as \"image processing dirty\"!\n this._scene.imageProcessingConfiguration._applyByPostProcess = true;\n });\n this._opaqueRenderTarget.onAfterUnbindObservable.add(() => {\n this._scene.environmentIntensity = saveSceneEnvIntensity;\n this._scene.imageProcessingConfiguration._applyByPostProcess = sceneImageProcessingapplyByPostProcess;\n });\n this._transparentMeshesCache.forEach((mesh) => {\n if (this._shouldRenderAsTransmission(mesh.material)) {\n mesh.material.refractionTexture = this._opaqueRenderTarget;\n }\n });\n }\n /**\n * Dispose all the elements created by the Helper.\n */\n dispose() {\n this._scene._transmissionHelper = undefined;\n if (this._opaqueRenderTarget) {\n this._opaqueRenderTarget.dispose();\n this._opaqueRenderTarget = null;\n }\n this._transparentMeshesCache = [];\n this._opaqueMeshesCache = [];\n }\n}\nconst NAME = \"KHR_materials_transmission\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_transmission/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_transmission {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 175;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n if (this.enabled) {\n loader.parent.transparencyAsCoverage = true;\n }\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadTransparentPropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadTransparentPropertiesAsync(context, material, babylonMaterial, extension) {\n var _a, _b;\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const pbrMaterial = babylonMaterial;\n // Enables \"refraction\" texture which represents transmitted light.\n pbrMaterial.subSurface.isRefractionEnabled = true;\n // Since this extension models thin-surface transmission only, we must make IOR = 1.0\n pbrMaterial.subSurface.volumeIndexOfRefraction = 1.0;\n // Albedo colour will tint transmission.\n pbrMaterial.subSurface.useAlbedoToTintRefraction = true;\n if (extension.transmissionFactor !== undefined) {\n pbrMaterial.subSurface.refractionIntensity = extension.transmissionFactor;\n const scene = pbrMaterial.getScene();\n if (pbrMaterial.subSurface.refractionIntensity && !scene._transmissionHelper) {\n new TransmissionHelper({}, pbrMaterial.getScene());\n }\n else if (pbrMaterial.subSurface.refractionIntensity && !((_a = scene._transmissionHelper) === null || _a === void 0 ? void 0 : _a._isRenderTargetValid())) {\n // If the render target is not valid, recreate it.\n (_b = scene._transmissionHelper) === null || _b === void 0 ? void 0 : _b._setupRenderTargets();\n }\n }\n else {\n pbrMaterial.subSurface.refractionIntensity = 0.0;\n pbrMaterial.subSurface.isRefractionEnabled = false;\n return Promise.resolve();\n }\n pbrMaterial.subSurface.minimumThickness = 0.0;\n pbrMaterial.subSurface.maximumThickness = 0.0;\n if (extension.transmissionTexture) {\n extension.transmissionTexture.nonColorData = true;\n return this._loader.loadTextureInfoAsync(`${context}/transmissionTexture`, extension.transmissionTexture, undefined).then((texture) => {\n pbrMaterial.subSurface.refractionIntensityTexture = texture;\n pbrMaterial.subSurface.useGltfStyleTextures = true;\n });\n }\n else {\n return Promise.resolve();\n }\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_transmission(loader));\n//# sourceMappingURL=KHR_materials_transmission.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_materials_translucency\";\n/**\n * [Proposed Specification](https://github.com/KhronosGroup/glTF/pull/1825)\n * !!! Experimental Extension Subject to Changes !!!\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_translucency {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 174;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n if (this.enabled) {\n loader.parent.transparencyAsCoverage = true;\n }\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadTranslucentPropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadTranslucentPropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const pbrMaterial = babylonMaterial;\n // Enables \"translucency\" texture which represents diffusely-transmitted light.\n pbrMaterial.subSurface.isTranslucencyEnabled = true;\n // Since this extension models thin-surface transmission only, we must make the\n // internal IOR == 1.0 and set the thickness to 0.\n pbrMaterial.subSurface.volumeIndexOfRefraction = 1.0;\n pbrMaterial.subSurface.minimumThickness = 0.0;\n pbrMaterial.subSurface.maximumThickness = 0.0;\n // Albedo colour will tint transmission.\n pbrMaterial.subSurface.useAlbedoToTintTranslucency = true;\n if (extension.translucencyFactor !== undefined) {\n pbrMaterial.subSurface.translucencyIntensity = extension.translucencyFactor;\n }\n else {\n pbrMaterial.subSurface.translucencyIntensity = 0.0;\n pbrMaterial.subSurface.isTranslucencyEnabled = false;\n return Promise.resolve();\n }\n if (extension.translucencyTexture) {\n extension.translucencyTexture.nonColorData = true;\n return this._loader.loadTextureInfoAsync(`${context}/translucencyTexture`, extension.translucencyTexture).then((texture) => {\n pbrMaterial.subSurface.translucencyIntensityTexture = texture;\n });\n }\n else {\n return Promise.resolve();\n }\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_translucency(loader));\n//# sourceMappingURL=KHR_materials_translucency.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_materials_volume\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md)\n * @since 5.0.0\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_volume {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 173;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n if (this.enabled) {\n // We need to disable instance usage because the attenuation factor depends on the node scale of each individual mesh\n this._loader._disableInstancedMesh++;\n }\n }\n /** @internal */\n dispose() {\n if (this.enabled) {\n this._loader._disableInstancedMesh--;\n }\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadVolumePropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadVolumePropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n // If transparency isn't enabled already, this extension shouldn't do anything.\n // i.e. it requires either the KHR_materials_transmission or KHR_materials_translucency extensions.\n if ((!babylonMaterial.subSurface.isRefractionEnabled && !babylonMaterial.subSurface.isTranslucencyEnabled) || !extension.thicknessFactor) {\n return Promise.resolve();\n }\n // IOR in this extension only affects interior.\n babylonMaterial.subSurface.volumeIndexOfRefraction = babylonMaterial.indexOfRefraction;\n const attenuationDistance = extension.attenuationDistance !== undefined ? extension.attenuationDistance : Number.MAX_VALUE;\n babylonMaterial.subSurface.tintColorAtDistance = attenuationDistance;\n if (extension.attenuationColor !== undefined && extension.attenuationColor.length == 3) {\n babylonMaterial.subSurface.tintColor.copyFromFloats(extension.attenuationColor[0], extension.attenuationColor[1], extension.attenuationColor[2]);\n }\n babylonMaterial.subSurface.minimumThickness = 0.0;\n babylonMaterial.subSurface.maximumThickness = extension.thicknessFactor;\n babylonMaterial.subSurface.useThicknessAsDepth = true;\n if (extension.thicknessTexture) {\n extension.thicknessTexture.nonColorData = true;\n return this._loader.loadTextureInfoAsync(`${context}/thicknessTexture`, extension.thicknessTexture).then((texture) => {\n babylonMaterial.subSurface.thicknessTexture = texture;\n babylonMaterial.subSurface.useGltfStyleTextures = true;\n });\n }\n else {\n return Promise.resolve();\n }\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_volume(loader));\n//# sourceMappingURL=KHR_materials_volume.js.map","import { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_mesh_quantization\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_mesh_quantization/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_mesh_quantization {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() { }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_mesh_quantization(loader));\n//# sourceMappingURL=KHR_mesh_quantization.js.map","import { GLTFLoader, ArrayItem } from \"../glTFLoader.js\";\nconst NAME = \"KHR_texture_basisu\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_basisu/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_texture_basisu {\n /**\n * @internal\n */\n constructor(loader) {\n /** The name of this extension. */\n this.name = NAME;\n this._loader = loader;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n _loadTextureAsync(context, texture, assign) {\n return GLTFLoader.LoadExtensionAsync(context, texture, this.name, (extensionContext, extension) => {\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);\n const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);\n return this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {\n assign(babylonTexture);\n }, texture._textureInfo.nonColorData ? { useRGBAIfASTCBC7NotAvailableWhenUASTC: true } : undefined, !texture._textureInfo.nonColorData);\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_texture_basisu(loader));\n//# sourceMappingURL=KHR_texture_basisu.js.map","import { Texture } from \"@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_texture_transform\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_transform/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_texture_transform {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadTextureInfoAsync(context, textureInfo, assign) {\n return GLTFLoader.LoadExtensionAsync(context, textureInfo, this.name, (extensionContext, extension) => {\n return this._loader.loadTextureInfoAsync(context, textureInfo, (babylonTexture) => {\n if (!(babylonTexture instanceof Texture)) {\n throw new Error(`${extensionContext}: Texture type not supported`);\n }\n if (extension.offset) {\n babylonTexture.uOffset = extension.offset[0];\n babylonTexture.vOffset = extension.offset[1];\n }\n // Always rotate around the origin.\n babylonTexture.uRotationCenter = 0;\n babylonTexture.vRotationCenter = 0;\n if (extension.rotation) {\n babylonTexture.wAng = -extension.rotation;\n }\n if (extension.scale) {\n babylonTexture.uScale = extension.scale[0];\n babylonTexture.vScale = extension.scale[1];\n }\n if (extension.texCoord != undefined) {\n babylonTexture.coordinatesIndex = extension.texCoord;\n }\n assign(babylonTexture);\n });\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_texture_transform(loader));\n//# sourceMappingURL=KHR_texture_transform.js.map","import { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"KHR_xmp_json_ld\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_xmp_json_ld/README.md)\n * @since 5.0.0\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_xmp_json_ld {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 100;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * Called after the loader state changes to LOADING.\n */\n onLoading() {\n var _a, _b, _c;\n if (this._loader.rootBabylonMesh === null) {\n return;\n }\n const xmp_gltf = (_a = this._loader.gltf.extensions) === null || _a === void 0 ? void 0 : _a.KHR_xmp_json_ld;\n const xmp_node = (_c = (_b = this._loader.gltf.asset) === null || _b === void 0 ? void 0 : _b.extensions) === null || _c === void 0 ? void 0 : _c.KHR_xmp_json_ld;\n if (xmp_gltf && xmp_node) {\n const packet = +xmp_node.packet;\n if (xmp_gltf.packets && packet < xmp_gltf.packets.length) {\n this._loader.rootBabylonMesh.metadata = this._loader.rootBabylonMesh.metadata || {};\n this._loader.rootBabylonMesh.metadata.xmp = xmp_gltf.packets[packet];\n }\n }\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_xmp_json_ld(loader));\n//# sourceMappingURL=KHR_xmp_json_ld.js.map","/* eslint-disable @typescript-eslint/naming-convention */\nimport { Animation } from \"@inter-ikea-betrakta-babylonjs/core/Animations/animation.js\";\nimport { AnimationPropertyInfo, nodeAnimationData } from \"../glTFLoaderAnimation.js\";\nimport { Color3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js\";\nfunction getColor3(_target, source, offset, scale) {\n return Color3.FromArray(source, offset).scale(scale);\n}\nfunction getAlpha(_target, source, offset, scale) {\n return source[offset + 3] * scale;\n}\nfunction getFloat(_target, source, offset, scale) {\n return source[offset] * scale;\n}\nfunction getMinusFloat(_target, source, offset, scale) {\n return -source[offset] * scale;\n}\nfunction getNextFloat(_target, source, offset, scale) {\n return source[offset + 1] * scale;\n}\nfunction getFloatBy2(_target, source, offset, scale) {\n return source[offset] * scale * 2;\n}\nfunction getTextureTransformTree(textureName) {\n return {\n scale: [\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.uScale`, getFloat, () => 2),\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.vScale`, getNextFloat, () => 2),\n ],\n offset: [\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.uOffset`, getFloat, () => 2),\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.vOffset`, getNextFloat, () => 2),\n ],\n rotation: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.wAng`, getMinusFloat, () => 1)],\n };\n}\nclass CameraAnimationPropertyInfo extends AnimationPropertyInfo {\n /** @internal */\n buildAnimations(target, name, fps, keys, callback) {\n callback(target._babylonCamera, this._buildAnimation(name, fps, keys));\n }\n}\nclass MaterialAnimationPropertyInfo extends AnimationPropertyInfo {\n /** @internal */\n buildAnimations(target, name, fps, keys, callback) {\n for (const fillMode in target._data) {\n callback(target._data[fillMode].babylonMaterial, this._buildAnimation(name, fps, keys));\n }\n }\n}\nclass LightAnimationPropertyInfo extends AnimationPropertyInfo {\n /** @internal */\n buildAnimations(target, name, fps, keys, callback) {\n callback(target._babylonLight, this._buildAnimation(name, fps, keys));\n }\n}\nconst nodesTree = {\n __array__: {\n __target__: true,\n ...nodeAnimationData,\n },\n};\nconst camerasTree = {\n __array__: {\n __target__: true,\n orthographic: {\n xmag: [\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoLeft\", getMinusFloat, () => 1),\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoRight\", getNextFloat, () => 1),\n ],\n ymag: [\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoBottom\", getMinusFloat, () => 1),\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoTop\", getNextFloat, () => 1),\n ],\n zfar: [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"maxZ\", getFloat, () => 1)],\n znear: [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"minZ\", getFloat, () => 1)],\n },\n perspective: {\n yfov: [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"fov\", getFloat, () => 1)],\n zfar: [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"maxZ\", getFloat, () => 1)],\n znear: [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"minZ\", getFloat, () => 1)],\n },\n },\n};\nconst materialsTree = {\n __array__: {\n __target__: true,\n pbrMetallicRoughness: {\n baseColorFactor: [\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"albedoColor\", getColor3, () => 4),\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"alpha\", getAlpha, () => 4),\n ],\n metallicFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"metallic\", getFloat, () => 1)],\n roughnessFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"roughness\", getFloat, () => 1)],\n baseColorTexture: {\n extensions: {\n KHR_texture_transform: getTextureTransformTree(\"albedoTexture\"),\n },\n },\n },\n emissiveFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"emissiveColor\", getColor3, () => 3)],\n normalTexture: {\n scale: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"bumpTexture.level\", getFloat, () => 1)],\n },\n occlusionTexture: {\n strength: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"ambientTextureStrength\", getFloat, () => 1)],\n extensions: {\n KHR_texture_transform: getTextureTransformTree(\"ambientTexture\"),\n },\n },\n emissiveTexture: {\n extensions: {\n KHR_texture_transform: getTextureTransformTree(\"emissiveTexture\"),\n },\n },\n extensions: {\n KHR_materials_ior: {\n ior: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"indexOfRefraction\", getFloat, () => 1)],\n },\n KHR_materials_clearcoat: {\n clearcoatFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"clearCoat.intensity\", getFloat, () => 1)],\n clearcoatRoughnessFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"clearCoat.roughness\", getFloat, () => 1)],\n },\n KHR_materials_sheen: {\n sheenColorFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"sheen.color\", getColor3, () => 3)],\n sheenRoughnessFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"sheen.roughness\", getFloat, () => 1)],\n },\n KHR_materials_specular: {\n specularFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"metallicF0Factor\", getFloat, () => 1)],\n specularColorFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"metallicReflectanceColor\", getColor3, () => 3)],\n },\n KHR_materials_emissive_strength: {\n emissiveStrength: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"emissiveIntensity\", getFloat, () => 1)],\n },\n KHR_materials_transmission: {\n transmissionFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.refractionIntensity\", getFloat, () => 1)],\n },\n KHR_materials_volume: {\n attenuationColor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"subSurface.tintColor\", getColor3, () => 3)],\n attenuationDistance: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.tintColorAtDistance\", getFloat, () => 1)],\n thicknessFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.maximumThickness\", getFloat, () => 1)],\n },\n KHR_materials_iridescence: {\n iridescenceFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.intensity\", getFloat, () => 1)],\n iridescenceIor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.indexOfRefraction\", getFloat, () => 1)],\n iridescenceThicknessMinimum: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.minimumThickness\", getFloat, () => 1)],\n iridescenceThicknessMaximum: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.maximumThickness\", getFloat, () => 1)],\n },\n KHR_materials_anisotropy: {\n anisotropyStrength: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"anisotropy.intensity\", getFloat, () => 1)],\n anisotropyRotation: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"anisotropy.angle\", getFloat, () => 1)],\n },\n },\n },\n};\nconst extensionsTree = {\n KHR_lights_punctual: {\n lights: {\n __array__: {\n __target__: true,\n color: [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"diffuse\", getColor3, () => 3)],\n intensity: [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"intensity\", getFloat, () => 1)],\n range: [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"range\", getFloat, () => 1)],\n spot: {\n innerConeAngle: [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"innerAngle\", getFloatBy2, () => 1)],\n outerConeAngle: [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"angle\", getFloatBy2, () => 1)],\n },\n },\n },\n },\n};\n/** @internal */\nexport const animationPointerTree = {\n nodes: nodesTree,\n materials: materialsTree,\n cameras: camerasTree,\n extensions: extensionsTree,\n};\n//# sourceMappingURL=KHR_animation_pointer.data.js.map","import { GLTFLoader } from \"../glTFLoader.js\";\nimport { Logger } from \"@inter-ikea-betrakta-babylonjs/core/Misc/logger.js\";\nimport { animationPointerTree } from \"./KHR_animation_pointer.data.js\";\nconst NAME = \"KHR_animation_pointer\";\n/**\n * [Specification PR](https://github.com/KhronosGroup/glTF/pull/2147)\n * !!! Experimental Extension Subject to Changes !!!\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_animation_pointer {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n }\n /**\n * Defines whether this extension is enabled.\n */\n get enabled() {\n return this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * Loads a glTF animation channel.\n * @param context The context when loading the asset\n * @param animationContext The context of the animation when loading the asset\n * @param animation The glTF animation property\n * @param channel The glTF animation channel property\n * @param onLoad Called for each animation loaded\n * @returns A void promise that resolves when the load is complete or null if not handled\n */\n _loadAnimationChannelAsync(context, animationContext, animation, channel, onLoad) {\n var _a;\n const extension = (_a = channel.target.extensions) === null || _a === void 0 ? void 0 : _a.KHR_animation_pointer;\n if (!extension) {\n return null;\n }\n if (channel.target.path !== \"pointer\" /* AnimationChannelTargetPath.POINTER */) {\n Logger.Warn(`${context}/target/path: Value (${channel.target.path}) must be (${\"pointer\" /* AnimationChannelTargetPath.POINTER */}) when using the ${this.name} extension`);\n }\n if (channel.target.node != undefined) {\n Logger.Warn(`${context}/target/node: Value (${channel.target.node}) must not be present when using the ${this.name} extension`);\n }\n const extensionContext = `${context}/extensions/${this.name}`;\n const pointer = extension.pointer;\n if (!pointer) {\n throw new Error(`${extensionContext}: Pointer is missing`);\n }\n const targetInfo = this._parseAnimationPointer(`${extensionContext}/pointer`, pointer);\n if (!targetInfo) {\n Logger.Warn(`${extensionContext}/pointer: Invalid pointer (${pointer}) skipped`);\n return null;\n }\n return this._loader._loadAnimationChannelFromTargetInfoAsync(context, animationContext, animation, channel, targetInfo, onLoad);\n }\n /**\n * The pointer string is represented by a [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901).\n * := ///\n * := \"nodes\" | \"materials\" | \"meshes\" | \"cameras\" | \"extensions\"\n * := | \n * := | \n * := \"extensions\"//\n * := | /\n * := W+\n * := D+\n *\n * Examples:\n * - \"/nodes/0/rotation\"\n * - \"/materials/2/emissiveFactor\"\n * - \"/materials/2/pbrMetallicRoughness/baseColorFactor\"\n * - \"/materials/2/extensions/KHR_materials_emissive_strength/emissiveStrength\"\n */\n _parseAnimationPointer(context, pointer) {\n if (!pointer.startsWith(\"/\")) {\n Logger.Warn(`${context}: Value (${pointer}) must start with a slash`);\n return null;\n }\n const parts = pointer.split(\"/\");\n // Remove the first part since it will be empty string as pointers must start with a slash.\n parts.shift();\n let node = animationPointerTree;\n let gltfCurrentNode = this._loader.gltf;\n let gltfTargetNode = undefined;\n for (const part of parts) {\n if (node.__array__) {\n node = node.__array__;\n }\n else {\n node = node[part];\n if (!node) {\n return null;\n }\n }\n gltfCurrentNode = gltfCurrentNode && gltfCurrentNode[part];\n if (node.__target__) {\n gltfTargetNode = gltfCurrentNode;\n }\n }\n if (!gltfTargetNode || !Array.isArray(node)) {\n return null;\n }\n return {\n target: gltfTargetNode,\n properties: node,\n };\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_animation_pointer(loader));\n//# sourceMappingURL=KHR_animation_pointer.js.map","/**\n * Composed of a frame, and an action function\n */\nexport class AnimationEvent {\n /**\n * Initializes the animation event\n * @param frame The frame for which the event is triggered\n * @param action The event to perform when triggered\n * @param onlyOnce Specifies if the event should be triggered only once\n */\n constructor(\n /** The frame for which the event is triggered **/\n frame, \n /** The event to perform when triggered **/\n action, \n /** Specifies if the event should be triggered only once**/\n onlyOnce) {\n this.frame = frame;\n this.action = action;\n this.onlyOnce = onlyOnce;\n /**\n * Specifies if the animation event is done\n */\n this.isDone = false;\n }\n /** @internal */\n _clone() {\n return new AnimationEvent(this.frame, this.action, this.onlyOnce);\n }\n}\n//# sourceMappingURL=animationEvent.js.map","import { Tools } from \"../Misc/tools.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { Vector3 } from \"../Maths/math.vector.js\";\nimport { Engine } from \"../Engines/engine.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { _WarnImport } from \"../Misc/devTools.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\n/**\n * Defines a sound that can be played in the application.\n * The sound can either be an ambient track or a simple sound played in reaction to a user action.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic\n */\nexport class Sound {\n /**\n * Does the sound loop after it finishes playing once.\n */\n get loop() {\n return this._loop;\n }\n set loop(value) {\n if (value === this._loop) {\n return;\n }\n this._loop = value;\n this.updateOptions({ loop: value });\n }\n /**\n * Gets the current time for the sound.\n */\n get currentTime() {\n var _a;\n if (this._htmlAudioElement) {\n return this._htmlAudioElement.currentTime;\n }\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.audioContext) && (this.isPlaying || this.isPaused)) {\n // The `_currentTime` member is only updated when the sound is paused. Add the time since the last start\n // to get the actual current time.\n const timeSinceLastStart = this.isPaused ? 0 : Engine.audioEngine.audioContext.currentTime - this._startTime;\n return this._currentTime + timeSinceLastStart;\n }\n return 0;\n }\n /**\n * Does this sound enables spatial sound.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n get spatialSound() {\n return this._spatialSound;\n }\n /**\n * Does this sound enables spatial sound.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n set spatialSound(newValue) {\n if (newValue == this._spatialSound) {\n return;\n }\n const wasPlaying = this.isPlaying;\n this.pause();\n if (newValue) {\n this._spatialSound = newValue;\n this._updateSpatialParameters();\n }\n else {\n this._disableSpatialSound();\n }\n if (wasPlaying) {\n this.play();\n }\n }\n /**\n * Create a sound and attach it to a scene\n * @param name Name of your sound\n * @param urlOrArrayBuffer Url to the sound to load async or ArrayBuffer, it also works with MediaStreams and AudioBuffers\n * @param scene defines the scene the sound belongs to\n * @param readyToPlayCallback Provide a callback function if you'd like to load your code once the sound is ready to be played\n * @param options Objects to provide with the current available options: autoplay, loop, volume, spatialSound, maxDistance, rolloffFactor, refDistance, distanceModel, panningModel, streaming\n */\n constructor(name, urlOrArrayBuffer, scene, readyToPlayCallback = null, options) {\n var _a, _b, _c, _d, _e;\n /**\n * Does the sound autoplay once loaded.\n */\n this.autoplay = false;\n this._loop = false;\n /**\n * Does the sound use a custom attenuation curve to simulate the falloff\n * happening when the source gets further away from the camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-your-own-custom-attenuation-function\n */\n this.useCustomAttenuation = false;\n /**\n * Is this sound currently played.\n */\n this.isPlaying = false;\n /**\n * Is this sound currently paused.\n */\n this.isPaused = false;\n /**\n * Define the reference distance the sound should be heard perfectly.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n this.refDistance = 1;\n /**\n * Define the roll off factor of spatial sounds.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n this.rolloffFactor = 1;\n /**\n * Define the max distance the sound should be heard (intensity just became 0 at this point).\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n this.maxDistance = 100;\n /**\n * Define the distance attenuation model the sound will follow.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n this.distanceModel = \"linear\";\n /**\n * Gets or sets an object used to store user defined information for the sound.\n */\n this.metadata = null;\n /**\n * Observable event when the current playing sound finishes.\n */\n this.onEndedObservable = new Observable();\n this._spatialSound = false;\n this._panningModel = \"equalpower\";\n this._playbackRate = 1;\n this._streaming = false;\n this._startTime = 0;\n this._currentTime = 0;\n this._position = Vector3.Zero();\n this._localDirection = new Vector3(1, 0, 0);\n this._volume = 1;\n this._isReadyToPlay = false;\n this._isDirectional = false;\n // Used if you'd like to create a directional sound.\n // If not set, the sound will be omnidirectional\n this._coneInnerAngle = 360;\n this._coneOuterAngle = 360;\n this._coneOuterGain = 0;\n this._isOutputConnected = false;\n this._urlType = \"Unknown\";\n this.name = name;\n scene = scene || EngineStore.LastCreatedScene;\n if (!scene) {\n return;\n }\n this._scene = scene;\n Sound._SceneComponentInitialization(scene);\n this._readyToPlayCallback = readyToPlayCallback;\n // Default custom attenuation function is a linear attenuation\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._customAttenuationFunction = (currentVolume, currentDistance, maxDistance, refDistance, rolloffFactor) => {\n if (currentDistance < maxDistance) {\n return currentVolume * (1 - currentDistance / maxDistance);\n }\n else {\n return 0;\n }\n };\n if (options) {\n this.autoplay = options.autoplay || false;\n this._loop = options.loop || false;\n // if volume === 0, we need another way to check this option\n if (options.volume !== undefined) {\n this._volume = options.volume;\n }\n this._spatialSound = (_a = options.spatialSound) !== null && _a !== void 0 ? _a : false;\n this.maxDistance = (_b = options.maxDistance) !== null && _b !== void 0 ? _b : 100;\n this.useCustomAttenuation = (_c = options.useCustomAttenuation) !== null && _c !== void 0 ? _c : false;\n this.rolloffFactor = options.rolloffFactor || 1;\n this.refDistance = options.refDistance || 1;\n this.distanceModel = options.distanceModel || \"linear\";\n this._playbackRate = options.playbackRate || 1;\n this._streaming = (_d = options.streaming) !== null && _d !== void 0 ? _d : false;\n this._length = options.length;\n this._offset = options.offset;\n }\n if (((_e = Engine.audioEngine) === null || _e === void 0 ? void 0 : _e.canUseWebAudio) && Engine.audioEngine.audioContext) {\n this._soundGain = Engine.audioEngine.audioContext.createGain();\n this._soundGain.gain.value = this._volume;\n this._inputAudioNode = this._soundGain;\n this._outputAudioNode = this._soundGain;\n if (this._spatialSound) {\n this._createSpatialParameters();\n }\n this._scene.mainSoundTrack.addSound(this);\n let validParameter = true;\n // if no parameter is passed, you need to call setAudioBuffer yourself to prepare the sound\n if (urlOrArrayBuffer) {\n try {\n if (typeof urlOrArrayBuffer === \"string\") {\n this._urlType = \"String\";\n this._url = urlOrArrayBuffer;\n }\n else if (urlOrArrayBuffer instanceof ArrayBuffer) {\n this._urlType = \"ArrayBuffer\";\n }\n else if (urlOrArrayBuffer instanceof HTMLMediaElement) {\n this._urlType = \"MediaElement\";\n }\n else if (urlOrArrayBuffer instanceof MediaStream) {\n this._urlType = \"MediaStream\";\n }\n else if (urlOrArrayBuffer instanceof AudioBuffer) {\n this._urlType = \"AudioBuffer\";\n }\n else if (Array.isArray(urlOrArrayBuffer)) {\n this._urlType = \"Array\";\n }\n let urls = [];\n let codecSupportedFound = false;\n switch (this._urlType) {\n case \"MediaElement\":\n this._streaming = true;\n this._isReadyToPlay = true;\n this._streamingSource = Engine.audioEngine.audioContext.createMediaElementSource(urlOrArrayBuffer);\n if (this.autoplay) {\n this.play(0, this._offset, this._length);\n }\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n break;\n case \"MediaStream\":\n this._streaming = true;\n this._isReadyToPlay = true;\n this._streamingSource = Engine.audioEngine.audioContext.createMediaStreamSource(urlOrArrayBuffer);\n if (this.autoplay) {\n this.play(0, this._offset, this._length);\n }\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n break;\n case \"ArrayBuffer\":\n if (urlOrArrayBuffer.byteLength > 0) {\n codecSupportedFound = true;\n this._soundLoaded(urlOrArrayBuffer);\n }\n break;\n case \"AudioBuffer\":\n this._audioBufferLoaded(urlOrArrayBuffer);\n break;\n case \"String\":\n urls.push(urlOrArrayBuffer);\n // eslint-disable-next-line no-fallthrough\n case \"Array\":\n if (urls.length === 0) {\n urls = urlOrArrayBuffer;\n }\n // If we found a supported format, we load it immediately and stop the loop\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n codecSupportedFound =\n (options && options.skipCodecCheck) ||\n (url.indexOf(\".mp3\", url.length - 4) !== -1 && Engine.audioEngine.isMP3supported) ||\n (url.indexOf(\".ogg\", url.length - 4) !== -1 && Engine.audioEngine.isOGGsupported) ||\n url.indexOf(\".wav\", url.length - 4) !== -1 ||\n url.indexOf(\".m4a\", url.length - 4) !== -1 ||\n url.indexOf(\".mp4\", url.length - 4) !== -1 ||\n url.indexOf(\"blob:\") !== -1;\n if (codecSupportedFound) {\n // Loading sound\n if (!this._streaming) {\n this._scene._loadFile(url, (data) => {\n this._soundLoaded(data);\n }, undefined, true, true, (exception) => {\n if (exception) {\n Logger.Error(\"XHR \" + exception.status + \" error on: \" + url + \".\");\n }\n Logger.Error(\"Sound creation aborted.\");\n this._scene.mainSoundTrack.removeSound(this);\n });\n }\n // Streaming sound using HTML5 Audio tag\n else {\n this._htmlAudioElement = new Audio(url);\n this._htmlAudioElement.controls = false;\n this._htmlAudioElement.loop = this.loop;\n Tools.SetCorsBehavior(url, this._htmlAudioElement);\n this._htmlAudioElement.preload = \"auto\";\n this._htmlAudioElement.addEventListener(\"canplaythrough\", () => {\n this._isReadyToPlay = true;\n if (this.autoplay) {\n this.play(0, this._offset, this._length);\n }\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n });\n document.body.appendChild(this._htmlAudioElement);\n this._htmlAudioElement.load();\n }\n break;\n }\n }\n break;\n default:\n validParameter = false;\n break;\n }\n if (!validParameter) {\n Logger.Error(\"Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.\");\n }\n else {\n if (!codecSupportedFound) {\n this._isReadyToPlay = true;\n // Simulating a ready to play event to avoid breaking code path\n if (this._readyToPlayCallback) {\n setTimeout(() => {\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n }, 1000);\n }\n }\n }\n }\n catch (ex) {\n Logger.Error(\"Unexpected error. Sound creation aborted.\");\n this._scene.mainSoundTrack.removeSound(this);\n }\n }\n }\n else {\n // Adding an empty sound to avoid breaking audio calls for non Web Audio browsers\n this._scene.mainSoundTrack.addSound(this);\n if (Engine.audioEngine && !Engine.audioEngine.WarnedWebAudioUnsupported) {\n Logger.Error(\"Web Audio is not supported by your browser.\");\n Engine.audioEngine.WarnedWebAudioUnsupported = true;\n }\n // Simulating a ready to play event to avoid breaking code for non web audio browsers\n if (this._readyToPlayCallback) {\n setTimeout(() => {\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n }, 1000);\n }\n }\n }\n /**\n * Release the sound and its associated resources\n */\n dispose() {\n var _a;\n if ((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) {\n if (this.isPlaying) {\n this.stop();\n }\n this._isReadyToPlay = false;\n if (this.soundTrackId === -1) {\n this._scene.mainSoundTrack.removeSound(this);\n }\n else if (this._scene.soundTracks) {\n this._scene.soundTracks[this.soundTrackId].removeSound(this);\n }\n if (this._soundGain) {\n this._soundGain.disconnect();\n this._soundGain = null;\n }\n if (this._soundPanner) {\n this._soundPanner.disconnect();\n this._soundPanner = null;\n }\n if (this._soundSource) {\n this._soundSource.disconnect();\n this._soundSource = null;\n }\n this._audioBuffer = null;\n if (this._htmlAudioElement) {\n this._htmlAudioElement.pause();\n this._htmlAudioElement.src = \"\";\n document.body.removeChild(this._htmlAudioElement);\n }\n if (this._streamingSource) {\n this._streamingSource.disconnect();\n }\n if (this._connectedTransformNode && this._registerFunc) {\n this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc);\n this._connectedTransformNode = null;\n }\n this._clearTimeoutsAndObservers();\n }\n }\n /**\n * Gets if the sounds is ready to be played or not.\n * @returns true if ready, otherwise false\n */\n isReady() {\n return this._isReadyToPlay;\n }\n /**\n * Get the current class name.\n * @returns current class name\n */\n getClassName() {\n return \"Sound\";\n }\n _audioBufferLoaded(buffer) {\n var _a;\n if (!((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.audioContext)) {\n return;\n }\n this._audioBuffer = buffer;\n this._isReadyToPlay = true;\n if (this.autoplay) {\n this.play(0, this._offset, this._length);\n }\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n }\n _soundLoaded(audioData) {\n var _a;\n if (!((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.audioContext)) {\n return;\n }\n Engine.audioEngine.audioContext.decodeAudioData(audioData, (buffer) => {\n this._audioBufferLoaded(buffer);\n }, (err) => {\n Logger.Error(\"Error while decoding audio data for: \" + this.name + \" / Error: \" + err);\n });\n }\n /**\n * Sets the data of the sound from an audiobuffer\n * @param audioBuffer The audioBuffer containing the data\n */\n setAudioBuffer(audioBuffer) {\n var _a;\n if ((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) {\n this._audioBuffer = audioBuffer;\n this._isReadyToPlay = true;\n }\n }\n /**\n * Updates the current sounds options such as maxdistance, loop...\n * @param options A JSON object containing values named as the object properties\n */\n updateOptions(options) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n if (options) {\n this.loop = (_a = options.loop) !== null && _a !== void 0 ? _a : this.loop;\n this.maxDistance = (_b = options.maxDistance) !== null && _b !== void 0 ? _b : this.maxDistance;\n this.useCustomAttenuation = (_c = options.useCustomAttenuation) !== null && _c !== void 0 ? _c : this.useCustomAttenuation;\n this.rolloffFactor = (_d = options.rolloffFactor) !== null && _d !== void 0 ? _d : this.rolloffFactor;\n this.refDistance = (_e = options.refDistance) !== null && _e !== void 0 ? _e : this.refDistance;\n this.distanceModel = (_f = options.distanceModel) !== null && _f !== void 0 ? _f : this.distanceModel;\n this._playbackRate = (_g = options.playbackRate) !== null && _g !== void 0 ? _g : this._playbackRate;\n this._length = (_h = options.length) !== null && _h !== void 0 ? _h : undefined;\n this.spatialSound = (_j = options.spatialSound) !== null && _j !== void 0 ? _j : this._spatialSound;\n this._setOffset((_k = options.offset) !== null && _k !== void 0 ? _k : undefined);\n this.setVolume((_l = options.volume) !== null && _l !== void 0 ? _l : this._volume);\n this._updateSpatialParameters();\n if (this.isPlaying) {\n if (this._streaming && this._htmlAudioElement) {\n this._htmlAudioElement.playbackRate = this._playbackRate;\n if (this._htmlAudioElement.loop !== this.loop) {\n this._htmlAudioElement.loop = this.loop;\n }\n }\n else {\n if (this._soundSource) {\n this._soundSource.playbackRate.value = this._playbackRate;\n if (this._soundSource.loop !== this.loop) {\n this._soundSource.loop = this.loop;\n }\n if (this._offset !== undefined && this._soundSource.loopStart !== this._offset) {\n this._soundSource.loopStart = this._offset;\n }\n if (this._length !== undefined && this._length !== this._soundSource.loopEnd) {\n this._soundSource.loopEnd = (this._offset | 0) + this._length;\n }\n }\n }\n }\n }\n }\n _createSpatialParameters() {\n var _a, _b;\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) && Engine.audioEngine.audioContext) {\n if (this._scene.headphone) {\n this._panningModel = \"HRTF\";\n }\n this._soundPanner = (_b = this._soundPanner) !== null && _b !== void 0 ? _b : Engine.audioEngine.audioContext.createPanner();\n if (this._soundPanner && this._outputAudioNode) {\n this._updateSpatialParameters();\n this._soundPanner.connect(this._outputAudioNode);\n this._inputAudioNode = this._soundPanner;\n }\n }\n }\n _disableSpatialSound() {\n var _a;\n if (!this._spatialSound) {\n return;\n }\n this._inputAudioNode = this._soundGain;\n (_a = this._soundPanner) === null || _a === void 0 ? void 0 : _a.disconnect();\n this._soundPanner = null;\n this._spatialSound = false;\n }\n _updateSpatialParameters() {\n if (!this._spatialSound) {\n return;\n }\n if (this._soundPanner) {\n if (this.useCustomAttenuation) {\n // Tricks to disable in a way embedded Web Audio attenuation\n this._soundPanner.distanceModel = \"linear\";\n this._soundPanner.maxDistance = Number.MAX_VALUE;\n this._soundPanner.refDistance = 1;\n this._soundPanner.rolloffFactor = 1;\n this._soundPanner.panningModel = this._panningModel;\n }\n else {\n this._soundPanner.distanceModel = this.distanceModel;\n this._soundPanner.maxDistance = this.maxDistance;\n this._soundPanner.refDistance = this.refDistance;\n this._soundPanner.rolloffFactor = this.rolloffFactor;\n this._soundPanner.panningModel = this._panningModel;\n }\n }\n else {\n this._createSpatialParameters();\n }\n }\n /**\n * Switch the panning model to HRTF:\n * Renders a stereo output of higher quality than equalpower — it uses a convolution with measured impulse responses from human subjects.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n switchPanningModelToHRTF() {\n this._panningModel = \"HRTF\";\n this._switchPanningModel();\n }\n /**\n * Switch the panning model to Equal Power:\n * Represents the equal-power panning algorithm, generally regarded as simple and efficient. equalpower is the default value.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n switchPanningModelToEqualPower() {\n this._panningModel = \"equalpower\";\n this._switchPanningModel();\n }\n _switchPanningModel() {\n var _a;\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) && this._spatialSound && this._soundPanner) {\n this._soundPanner.panningModel = this._panningModel;\n }\n }\n /**\n * Connect this sound to a sound track audio node like gain...\n * @param soundTrackAudioNode the sound track audio node to connect to\n */\n connectToSoundTrackAudioNode(soundTrackAudioNode) {\n var _a;\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) && this._outputAudioNode) {\n if (this._isOutputConnected) {\n this._outputAudioNode.disconnect();\n }\n this._outputAudioNode.connect(soundTrackAudioNode);\n this._isOutputConnected = true;\n }\n }\n /**\n * Transform this sound into a directional source\n * @param coneInnerAngle Size of the inner cone in degree\n * @param coneOuterAngle Size of the outer cone in degree\n * @param coneOuterGain Volume of the sound outside the outer cone (between 0.0 and 1.0)\n */\n setDirectionalCone(coneInnerAngle, coneOuterAngle, coneOuterGain) {\n if (coneOuterAngle < coneInnerAngle) {\n Logger.Error(\"setDirectionalCone(): outer angle of the cone must be superior or equal to the inner angle.\");\n return;\n }\n this._coneInnerAngle = coneInnerAngle;\n this._coneOuterAngle = coneOuterAngle;\n this._coneOuterGain = coneOuterGain;\n this._isDirectional = true;\n if (this.isPlaying && this.loop) {\n this.stop();\n this.play(0, this._offset, this._length);\n }\n }\n /**\n * Gets or sets the inner angle for the directional cone.\n */\n get directionalConeInnerAngle() {\n return this._coneInnerAngle;\n }\n /**\n * Gets or sets the inner angle for the directional cone.\n */\n set directionalConeInnerAngle(value) {\n var _a;\n if (value != this._coneInnerAngle) {\n if (this._coneOuterAngle < value) {\n Logger.Error(\"directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.\");\n return;\n }\n this._coneInnerAngle = value;\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) && this._spatialSound && this._soundPanner) {\n this._soundPanner.coneInnerAngle = this._coneInnerAngle;\n }\n }\n }\n /**\n * Gets or sets the outer angle for the directional cone.\n */\n get directionalConeOuterAngle() {\n return this._coneOuterAngle;\n }\n /**\n * Gets or sets the outer angle for the directional cone.\n */\n set directionalConeOuterAngle(value) {\n var _a;\n if (value != this._coneOuterAngle) {\n if (value < this._coneInnerAngle) {\n Logger.Error(\"directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.\");\n return;\n }\n this._coneOuterAngle = value;\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) && this._spatialSound && this._soundPanner) {\n this._soundPanner.coneOuterAngle = this._coneOuterAngle;\n }\n }\n }\n /**\n * Sets the position of the emitter if spatial sound is enabled\n * @param newPosition Defines the new position\n */\n setPosition(newPosition) {\n var _a;\n if (newPosition.equals(this._position)) {\n return;\n }\n this._position.copyFrom(newPosition);\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) && this._spatialSound && this._soundPanner && !isNaN(this._position.x) && !isNaN(this._position.y) && !isNaN(this._position.z)) {\n this._soundPanner.positionX.value = this._position.x;\n this._soundPanner.positionY.value = this._position.y;\n this._soundPanner.positionZ.value = this._position.z;\n }\n }\n /**\n * Sets the local direction of the emitter if spatial sound is enabled\n * @param newLocalDirection Defines the new local direction\n */\n setLocalDirectionToMesh(newLocalDirection) {\n var _a;\n this._localDirection = newLocalDirection;\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) && this._connectedTransformNode && this.isPlaying) {\n this._updateDirection();\n }\n }\n _updateDirection() {\n if (!this._connectedTransformNode || !this._soundPanner) {\n return;\n }\n const mat = this._connectedTransformNode.getWorldMatrix();\n const direction = Vector3.TransformNormal(this._localDirection, mat);\n direction.normalize();\n this._soundPanner.orientationX.value = direction.x;\n this._soundPanner.orientationY.value = direction.y;\n this._soundPanner.orientationZ.value = direction.z;\n }\n /** @internal */\n updateDistanceFromListener() {\n var _a;\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) && this._connectedTransformNode && this.useCustomAttenuation && this._soundGain && this._scene.activeCamera) {\n const distance = this._scene.audioListenerPositionProvider\n ? this._connectedTransformNode.position.subtract(this._scene.audioListenerPositionProvider()).length()\n : this._connectedTransformNode.getDistanceToCamera(this._scene.activeCamera);\n this._soundGain.gain.value = this._customAttenuationFunction(this._volume, distance, this.maxDistance, this.refDistance, this.rolloffFactor);\n }\n }\n /**\n * Sets a new custom attenuation function for the sound.\n * @param callback Defines the function used for the attenuation\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-your-own-custom-attenuation-function\n */\n setAttenuationFunction(callback) {\n this._customAttenuationFunction = callback;\n }\n /**\n * Play the sound\n * @param time (optional) Start the sound after X seconds. Start immediately (0) by default.\n * @param offset (optional) Start the sound at a specific time in seconds\n * @param length (optional) Sound duration (in seconds)\n */\n play(time, offset, length) {\n var _a, _b, _c, _d;\n if (this._isReadyToPlay && this._scene.audioEnabled && ((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.audioContext)) {\n try {\n this._clearTimeoutsAndObservers();\n let startTime = time ? ((_b = Engine.audioEngine) === null || _b === void 0 ? void 0 : _b.audioContext.currentTime) + time : (_c = Engine.audioEngine) === null || _c === void 0 ? void 0 : _c.audioContext.currentTime;\n if (!this._soundSource || !this._streamingSource) {\n if (this._spatialSound && this._soundPanner) {\n if (!isNaN(this._position.x) && !isNaN(this._position.y) && !isNaN(this._position.z)) {\n this._soundPanner.positionX.value = this._position.x;\n this._soundPanner.positionY.value = this._position.y;\n this._soundPanner.positionZ.value = this._position.z;\n }\n if (this._isDirectional) {\n this._soundPanner.coneInnerAngle = this._coneInnerAngle;\n this._soundPanner.coneOuterAngle = this._coneOuterAngle;\n this._soundPanner.coneOuterGain = this._coneOuterGain;\n if (this._connectedTransformNode) {\n this._updateDirection();\n }\n else {\n this._soundPanner.setOrientation(this._localDirection.x, this._localDirection.y, this._localDirection.z);\n }\n }\n }\n }\n if (this._streaming) {\n if (!this._streamingSource) {\n this._streamingSource = Engine.audioEngine.audioContext.createMediaElementSource(this._htmlAudioElement);\n this._htmlAudioElement.onended = () => {\n this._onended();\n };\n this._htmlAudioElement.playbackRate = this._playbackRate;\n }\n this._streamingSource.disconnect();\n if (this._inputAudioNode) {\n this._streamingSource.connect(this._inputAudioNode);\n }\n if (this._htmlAudioElement) {\n // required to manage properly the new suspended default state of Chrome\n // When the option 'streaming: true' is used, we need first to wait for\n // the audio engine to be unlocked by a user gesture before trying to play\n // an HTML Audio element\n const tryToPlay = () => {\n var _a, _b;\n if ((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.unlocked) {\n const playPromise = this._htmlAudioElement.play();\n // In browsers that don’t yet support this functionality,\n // playPromise won’t be defined.\n if (playPromise !== undefined) {\n playPromise.catch(() => {\n var _a, _b;\n // Automatic playback failed.\n // Waiting for the audio engine to be unlocked by user click on unmute\n (_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.lock();\n if (this.loop || this.autoplay) {\n this._audioUnlockedObserver = (_b = Engine.audioEngine) === null || _b === void 0 ? void 0 : _b.onAudioUnlockedObservable.addOnce(() => {\n tryToPlay();\n });\n }\n });\n }\n }\n else {\n if (this.loop || this.autoplay) {\n this._audioUnlockedObserver = (_b = Engine.audioEngine) === null || _b === void 0 ? void 0 : _b.onAudioUnlockedObservable.addOnce(() => {\n tryToPlay();\n });\n }\n }\n };\n tryToPlay();\n }\n }\n else {\n const tryToPlay = () => {\n var _a, _b, _c, _d;\n if ((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.audioContext) {\n length = length || this._length;\n if (offset !== undefined) {\n this._setOffset(offset);\n }\n if (this._soundSource) {\n const oldSource = this._soundSource;\n oldSource.onended = () => {\n oldSource.disconnect();\n };\n }\n this._soundSource = (_b = Engine.audioEngine) === null || _b === void 0 ? void 0 : _b.audioContext.createBufferSource();\n if (this._soundSource && this._inputAudioNode) {\n this._soundSource.buffer = this._audioBuffer;\n this._soundSource.connect(this._inputAudioNode);\n this._soundSource.loop = this.loop;\n if (offset !== undefined) {\n this._soundSource.loopStart = offset;\n }\n if (length !== undefined) {\n this._soundSource.loopEnd = (offset | 0) + length;\n }\n this._soundSource.playbackRate.value = this._playbackRate;\n this._soundSource.onended = () => {\n this._onended();\n };\n startTime = time ? ((_c = Engine.audioEngine) === null || _c === void 0 ? void 0 : _c.audioContext.currentTime) + time : Engine.audioEngine.audioContext.currentTime;\n const actualOffset = ((this.isPaused ? this.currentTime : 0) + ((_d = this._offset) !== null && _d !== void 0 ? _d : 0)) % this._soundSource.buffer.duration;\n this._soundSource.start(startTime, actualOffset, this.loop ? undefined : length);\n }\n }\n };\n if (((_d = Engine.audioEngine) === null || _d === void 0 ? void 0 : _d.audioContext.state) === \"suspended\") {\n // Wait a bit for FF as context seems late to be ready.\n this._tryToPlayTimeout = setTimeout(() => {\n var _a;\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.audioContext.state) === \"suspended\") {\n // Automatic playback failed.\n // Waiting for the audio engine to be unlocked by user click on unmute\n Engine.audioEngine.lock();\n if (this.loop || this.autoplay) {\n this._audioUnlockedObserver = Engine.audioEngine.onAudioUnlockedObservable.addOnce(() => {\n tryToPlay();\n });\n }\n }\n else {\n tryToPlay();\n }\n }, 500);\n }\n else {\n tryToPlay();\n }\n }\n this._startTime = startTime;\n this.isPlaying = true;\n this.isPaused = false;\n }\n catch (ex) {\n Logger.Error(\"Error while trying to play audio: \" + this.name + \", \" + ex.message);\n }\n }\n }\n _onended() {\n this.isPlaying = false;\n this._startTime = 0;\n this._currentTime = 0;\n if (this.onended) {\n this.onended();\n }\n this.onEndedObservable.notifyObservers(this);\n }\n /**\n * Stop the sound\n * @param time (optional) Stop the sound after X seconds. Stop immediately (0) by default.\n */\n stop(time) {\n var _a;\n if (this.isPlaying) {\n this._clearTimeoutsAndObservers();\n if (this._streaming) {\n if (this._htmlAudioElement) {\n this._htmlAudioElement.pause();\n // Test needed for Firefox or it will generate an Invalid State Error\n if (this._htmlAudioElement.currentTime > 0) {\n this._htmlAudioElement.currentTime = 0;\n }\n }\n else {\n this._streamingSource.disconnect();\n }\n this.isPlaying = false;\n }\n else if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.audioContext) && this._soundSource) {\n const stopTime = time ? Engine.audioEngine.audioContext.currentTime + time : undefined;\n this._soundSource.onended = () => {\n this.isPlaying = false;\n this.isPaused = false;\n this._startTime = 0;\n this._currentTime = 0;\n if (this._soundSource) {\n this._soundSource.onended = () => void 0;\n }\n this._onended();\n };\n this._soundSource.stop(stopTime);\n }\n else {\n this.isPlaying = false;\n }\n }\n else if (this.isPaused) {\n this.isPaused = false;\n this._startTime = 0;\n this._currentTime = 0;\n }\n }\n /**\n * Put the sound in pause\n */\n pause() {\n var _a;\n if (this.isPlaying) {\n this._clearTimeoutsAndObservers();\n if (this._streaming) {\n if (this._htmlAudioElement) {\n this._htmlAudioElement.pause();\n }\n else {\n this._streamingSource.disconnect();\n }\n this.isPlaying = false;\n this.isPaused = true;\n }\n else if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.audioContext) && this._soundSource) {\n this._soundSource.onended = () => void 0;\n this._soundSource.stop();\n this.isPlaying = false;\n this.isPaused = true;\n this._currentTime += Engine.audioEngine.audioContext.currentTime - this._startTime;\n }\n }\n }\n /**\n * Sets a dedicated volume for this sounds\n * @param newVolume Define the new volume of the sound\n * @param time Define time for gradual change to new volume\n */\n setVolume(newVolume, time) {\n var _a;\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) && this._soundGain) {\n if (time && Engine.audioEngine.audioContext) {\n this._soundGain.gain.cancelScheduledValues(Engine.audioEngine.audioContext.currentTime);\n this._soundGain.gain.setValueAtTime(this._soundGain.gain.value, Engine.audioEngine.audioContext.currentTime);\n this._soundGain.gain.linearRampToValueAtTime(newVolume, Engine.audioEngine.audioContext.currentTime + time);\n }\n else {\n this._soundGain.gain.value = newVolume;\n }\n }\n this._volume = newVolume;\n }\n /**\n * Set the sound play back rate\n * @param newPlaybackRate Define the playback rate the sound should be played at\n */\n setPlaybackRate(newPlaybackRate) {\n this._playbackRate = newPlaybackRate;\n if (this.isPlaying) {\n if (this._streaming && this._htmlAudioElement) {\n this._htmlAudioElement.playbackRate = this._playbackRate;\n }\n else if (this._soundSource) {\n this._soundSource.playbackRate.value = this._playbackRate;\n }\n }\n }\n /**\n * Gets the sound play back rate.\n * @returns the play back rate of the sound\n */\n getPlaybackRate() {\n return this._playbackRate;\n }\n /**\n * Gets the volume of the sound.\n * @returns the volume of the sound\n */\n getVolume() {\n return this._volume;\n }\n /**\n * Attach the sound to a dedicated mesh\n * @param transformNode The transform node to connect the sound with\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#attaching-a-sound-to-a-mesh\n */\n attachToMesh(transformNode) {\n if (this._connectedTransformNode && this._registerFunc) {\n this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc);\n this._registerFunc = null;\n }\n this._connectedTransformNode = transformNode;\n if (!this._spatialSound) {\n this._spatialSound = true;\n this._createSpatialParameters();\n if (this.isPlaying && this.loop) {\n this.stop();\n this.play(0, this._offset, this._length);\n }\n }\n this._onRegisterAfterWorldMatrixUpdate(this._connectedTransformNode);\n this._registerFunc = (transformNode) => this._onRegisterAfterWorldMatrixUpdate(transformNode);\n this._connectedTransformNode.registerAfterWorldMatrixUpdate(this._registerFunc);\n }\n /**\n * Detach the sound from the previously attached mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#attaching-a-sound-to-a-mesh\n */\n detachFromMesh() {\n if (this._connectedTransformNode && this._registerFunc) {\n this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc);\n this._registerFunc = null;\n this._connectedTransformNode = null;\n }\n }\n _onRegisterAfterWorldMatrixUpdate(node) {\n var _a;\n if (!node.getBoundingInfo) {\n this.setPosition(node.absolutePosition);\n }\n else {\n const mesh = node;\n const boundingInfo = mesh.getBoundingInfo();\n this.setPosition(boundingInfo.boundingSphere.centerWorld);\n }\n if (((_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.canUseWebAudio) && this._isDirectional && this.isPlaying) {\n this._updateDirection();\n }\n }\n /**\n * Clone the current sound in the scene.\n * @returns the new sound clone\n */\n clone() {\n if (!this._streaming) {\n const setBufferAndRun = () => {\n if (this._isReadyToPlay) {\n clonedSound._audioBuffer = this.getAudioBuffer();\n clonedSound._isReadyToPlay = true;\n if (clonedSound.autoplay) {\n clonedSound.play(0, this._offset, this._length);\n }\n }\n else {\n setTimeout(setBufferAndRun, 300);\n }\n };\n const currentOptions = {\n autoplay: this.autoplay,\n loop: this.loop,\n volume: this._volume,\n spatialSound: this._spatialSound,\n maxDistance: this.maxDistance,\n useCustomAttenuation: this.useCustomAttenuation,\n rolloffFactor: this.rolloffFactor,\n refDistance: this.refDistance,\n distanceModel: this.distanceModel,\n };\n const clonedSound = new Sound(this.name + \"_cloned\", new ArrayBuffer(0), this._scene, null, currentOptions);\n if (this.useCustomAttenuation) {\n clonedSound.setAttenuationFunction(this._customAttenuationFunction);\n }\n clonedSound.setPosition(this._position);\n clonedSound.setPlaybackRate(this._playbackRate);\n setBufferAndRun();\n return clonedSound;\n }\n // Can't clone a streaming sound\n else {\n return null;\n }\n }\n /**\n * Gets the current underlying audio buffer containing the data\n * @returns the audio buffer\n */\n getAudioBuffer() {\n return this._audioBuffer;\n }\n /**\n * Gets the WebAudio AudioBufferSourceNode, lets you keep track of and stop instances of this Sound.\n * @returns the source node\n */\n getSoundSource() {\n return this._soundSource;\n }\n /**\n * Gets the WebAudio GainNode, gives you precise control over the gain of instances of this Sound.\n * @returns the gain node\n */\n getSoundGain() {\n return this._soundGain;\n }\n /**\n * Serializes the Sound in a JSON representation\n * @returns the JSON representation of the sound\n */\n serialize() {\n const serializationObject = {\n name: this.name,\n url: this._url,\n autoplay: this.autoplay,\n loop: this.loop,\n volume: this._volume,\n spatialSound: this._spatialSound,\n maxDistance: this.maxDistance,\n rolloffFactor: this.rolloffFactor,\n refDistance: this.refDistance,\n distanceModel: this.distanceModel,\n playbackRate: this._playbackRate,\n panningModel: this._panningModel,\n soundTrackId: this.soundTrackId,\n metadata: this.metadata,\n };\n if (this._spatialSound) {\n if (this._connectedTransformNode) {\n serializationObject.connectedMeshId = this._connectedTransformNode.id;\n }\n serializationObject.position = this._position.asArray();\n serializationObject.refDistance = this.refDistance;\n serializationObject.distanceModel = this.distanceModel;\n serializationObject.isDirectional = this._isDirectional;\n serializationObject.localDirectionToMesh = this._localDirection.asArray();\n serializationObject.coneInnerAngle = this._coneInnerAngle;\n serializationObject.coneOuterAngle = this._coneOuterAngle;\n serializationObject.coneOuterGain = this._coneOuterGain;\n }\n return serializationObject;\n }\n /**\n * Parse a JSON representation of a sound to instantiate in a given scene\n * @param parsedSound Define the JSON representation of the sound (usually coming from the serialize method)\n * @param scene Define the scene the new parsed sound should be created in\n * @param rootUrl Define the rooturl of the load in case we need to fetch relative dependencies\n * @param sourceSound Define a sound place holder if do not need to instantiate a new one\n * @returns the newly parsed sound\n */\n static Parse(parsedSound, scene, rootUrl, sourceSound) {\n const soundName = parsedSound.name;\n let soundUrl;\n if (parsedSound.url) {\n soundUrl = rootUrl + parsedSound.url;\n }\n else {\n soundUrl = rootUrl + soundName;\n }\n const options = {\n autoplay: parsedSound.autoplay,\n loop: parsedSound.loop,\n volume: parsedSound.volume,\n spatialSound: parsedSound.spatialSound,\n maxDistance: parsedSound.maxDistance,\n rolloffFactor: parsedSound.rolloffFactor,\n refDistance: parsedSound.refDistance,\n distanceModel: parsedSound.distanceModel,\n playbackRate: parsedSound.playbackRate,\n };\n let newSound;\n if (!sourceSound) {\n newSound = new Sound(soundName, soundUrl, scene, () => {\n scene.removePendingData(newSound);\n }, options);\n scene.addPendingData(newSound);\n }\n else {\n const setBufferAndRun = () => {\n if (sourceSound._isReadyToPlay) {\n newSound._audioBuffer = sourceSound.getAudioBuffer();\n newSound._isReadyToPlay = true;\n if (newSound.autoplay) {\n newSound.play(0, newSound._offset, newSound._length);\n }\n }\n else {\n setTimeout(setBufferAndRun, 300);\n }\n };\n newSound = new Sound(soundName, new ArrayBuffer(0), scene, null, options);\n setBufferAndRun();\n }\n if (parsedSound.position) {\n const soundPosition = Vector3.FromArray(parsedSound.position);\n newSound.setPosition(soundPosition);\n }\n if (parsedSound.isDirectional) {\n newSound.setDirectionalCone(parsedSound.coneInnerAngle || 360, parsedSound.coneOuterAngle || 360, parsedSound.coneOuterGain || 0);\n if (parsedSound.localDirectionToMesh) {\n const localDirectionToMesh = Vector3.FromArray(parsedSound.localDirectionToMesh);\n newSound.setLocalDirectionToMesh(localDirectionToMesh);\n }\n }\n if (parsedSound.connectedMeshId) {\n const connectedMesh = scene.getMeshById(parsedSound.connectedMeshId);\n if (connectedMesh) {\n newSound.attachToMesh(connectedMesh);\n }\n }\n if (parsedSound.metadata) {\n newSound.metadata = parsedSound.metadata;\n }\n return newSound;\n }\n _setOffset(value) {\n if (this._offset === value) {\n return;\n }\n if (this.isPaused) {\n this.stop();\n this.isPaused = false;\n }\n this._offset = value;\n }\n _clearTimeoutsAndObservers() {\n var _a;\n if (this._tryToPlayTimeout) {\n clearTimeout(this._tryToPlayTimeout);\n this._tryToPlayTimeout = null;\n }\n if (this._audioUnlockedObserver) {\n (_a = Engine.audioEngine) === null || _a === void 0 ? void 0 : _a.onAudioUnlockedObservable.remove(this._audioUnlockedObserver);\n this._audioUnlockedObserver = null;\n }\n }\n}\n/**\n * @internal\n */\nSound._SceneComponentInitialization = (_) => {\n throw _WarnImport(\"AudioSceneComponent\");\n};\n//# sourceMappingURL=sound.js.map","import { Logger } from \"../Misc/logger.js\";\n/**\n * Wraps one or more Sound objects and selects one with random weight for playback.\n */\nexport class WeightedSound {\n /**\n * Creates a new WeightedSound from the list of sounds given.\n * @param loop When true a Sound will be selected and played when the current playing Sound completes.\n * @param sounds Array of Sounds that will be selected from.\n * @param weights Array of number values for selection weights; length must equal sounds, values will be normalized to 1\n */\n constructor(loop, sounds, weights) {\n /** When true a Sound will be selected and played when the current playing Sound completes. */\n this.loop = false;\n this._coneInnerAngle = 360;\n this._coneOuterAngle = 360;\n this._volume = 1;\n /** A Sound is currently playing. */\n this.isPlaying = false;\n /** A Sound is currently paused. */\n this.isPaused = false;\n this._sounds = [];\n this._weights = [];\n if (sounds.length !== weights.length) {\n throw new Error(\"Sounds length does not equal weights length\");\n }\n this.loop = loop;\n this._weights = weights;\n // Normalize the weights\n let weightSum = 0;\n for (const weight of weights) {\n weightSum += weight;\n }\n const invWeightSum = weightSum > 0 ? 1 / weightSum : 0;\n for (let i = 0; i < this._weights.length; i++) {\n this._weights[i] *= invWeightSum;\n }\n this._sounds = sounds;\n for (const sound of this._sounds) {\n sound.onEndedObservable.add(() => {\n this._onended();\n });\n }\n }\n /**\n * The size of cone in degrees for a directional sound in which there will be no attenuation.\n */\n get directionalConeInnerAngle() {\n return this._coneInnerAngle;\n }\n /**\n * The size of cone in degrees for a directional sound in which there will be no attenuation.\n */\n set directionalConeInnerAngle(value) {\n if (value !== this._coneInnerAngle) {\n if (this._coneOuterAngle < value) {\n Logger.Error(\"directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.\");\n return;\n }\n this._coneInnerAngle = value;\n for (const sound of this._sounds) {\n sound.directionalConeInnerAngle = value;\n }\n }\n }\n /**\n * Size of cone in degrees for a directional sound outside of which there will be no sound.\n * Listener angles between innerAngle and outerAngle will falloff linearly.\n */\n get directionalConeOuterAngle() {\n return this._coneOuterAngle;\n }\n /**\n * Size of cone in degrees for a directional sound outside of which there will be no sound.\n * Listener angles between innerAngle and outerAngle will falloff linearly.\n */\n set directionalConeOuterAngle(value) {\n if (value !== this._coneOuterAngle) {\n if (value < this._coneInnerAngle) {\n Logger.Error(\"directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.\");\n return;\n }\n this._coneOuterAngle = value;\n for (const sound of this._sounds) {\n sound.directionalConeOuterAngle = value;\n }\n }\n }\n /**\n * Playback volume.\n */\n get volume() {\n return this._volume;\n }\n /**\n * Playback volume.\n */\n set volume(value) {\n if (value !== this._volume) {\n for (const sound of this._sounds) {\n sound.setVolume(value);\n }\n }\n }\n _onended() {\n if (this._currentIndex !== undefined) {\n this._sounds[this._currentIndex].autoplay = false;\n }\n if (this.loop && this.isPlaying) {\n this.play();\n }\n else {\n this.isPlaying = false;\n }\n }\n /**\n * Suspend playback\n */\n pause() {\n this.isPaused = true;\n if (this._currentIndex !== undefined) {\n this._sounds[this._currentIndex].pause();\n }\n }\n /**\n * Stop playback\n */\n stop() {\n this.isPlaying = false;\n if (this._currentIndex !== undefined) {\n this._sounds[this._currentIndex].stop();\n }\n }\n /**\n * Start playback.\n * @param startOffset Position the clip head at a specific time in seconds.\n */\n play(startOffset) {\n if (!this.isPaused) {\n this.stop();\n const randomValue = Math.random();\n let total = 0;\n for (let i = 0; i < this._weights.length; i++) {\n total += this._weights[i];\n if (randomValue <= total) {\n this._currentIndex = i;\n break;\n }\n }\n }\n const sound = this._sounds[this._currentIndex];\n if (sound.isReady()) {\n sound.play(0, this.isPaused ? undefined : startOffset);\n }\n else {\n sound.autoplay = true;\n }\n this.isPlaying = true;\n this.isPaused = false;\n }\n}\n//# sourceMappingURL=weightedsound.js.map","import { Vector3 } from \"@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js\";\nimport { Tools } from \"@inter-ikea-betrakta-babylonjs/core/Misc/tools.js\";\nimport { AnimationEvent } from \"@inter-ikea-betrakta-babylonjs/core/Animations/animationEvent.js\";\nimport { Sound } from \"@inter-ikea-betrakta-babylonjs/core/Audio/sound.js\";\nimport { WeightedSound } from \"@inter-ikea-betrakta-babylonjs/core/Audio/weightedsound.js\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader.js\";\nconst NAME = \"MSFT_audio_emitter\";\n/**\n * [Specification](https://github.com/najadojo/glTF/blob/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter/README.md)\n * !!! Experimental Extension Subject to Changes !!!\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class MSFT_audio_emitter {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n this._clips = null;\n this._emitters = null;\n }\n /** @internal */\n onLoading() {\n const extensions = this._loader.gltf.extensions;\n if (extensions && extensions[this.name]) {\n const extension = extensions[this.name];\n this._clips = extension.clips;\n this._emitters = extension.emitters;\n ArrayItem.Assign(this._clips);\n ArrayItem.Assign(this._emitters);\n }\n }\n /**\n * @internal\n */\n loadSceneAsync(context, scene) {\n return GLTFLoader.LoadExtensionAsync(context, scene, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadSceneAsync(context, scene));\n for (const emitterIndex of extension.emitters) {\n const emitter = ArrayItem.Get(`${extensionContext}/emitters`, this._emitters, emitterIndex);\n if (emitter.refDistance != undefined ||\n emitter.maxDistance != undefined ||\n emitter.rolloffFactor != undefined ||\n emitter.distanceModel != undefined ||\n emitter.innerAngle != undefined ||\n emitter.outerAngle != undefined) {\n throw new Error(`${extensionContext}: Direction or Distance properties are not allowed on emitters attached to a scene`);\n }\n promises.push(this._loadEmitterAsync(`${extensionContext}/emitters/${emitter.index}`, emitter));\n }\n return Promise.all(promises).then(() => { });\n });\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n const promises = new Array();\n return this._loader\n .loadNodeAsync(extensionContext, node, (babylonMesh) => {\n for (const emitterIndex of extension.emitters) {\n const emitter = ArrayItem.Get(`${extensionContext}/emitters`, this._emitters, emitterIndex);\n promises.push(this._loadEmitterAsync(`${extensionContext}/emitters/${emitter.index}`, emitter).then(() => {\n for (const sound of emitter._babylonSounds) {\n sound.attachToMesh(babylonMesh);\n if (emitter.innerAngle != undefined || emitter.outerAngle != undefined) {\n sound.setLocalDirectionToMesh(Vector3.Forward());\n sound.setDirectionalCone(2 * Tools.ToDegrees(emitter.innerAngle == undefined ? Math.PI : emitter.innerAngle), 2 * Tools.ToDegrees(emitter.outerAngle == undefined ? Math.PI : emitter.outerAngle), 0);\n }\n }\n }));\n }\n assign(babylonMesh);\n })\n .then((babylonMesh) => {\n return Promise.all(promises).then(() => {\n return babylonMesh;\n });\n });\n });\n }\n /**\n * @internal\n */\n loadAnimationAsync(context, animation) {\n return GLTFLoader.LoadExtensionAsync(context, animation, this.name, (extensionContext, extension) => {\n return this._loader.loadAnimationAsync(context, animation).then((babylonAnimationGroup) => {\n const promises = new Array();\n ArrayItem.Assign(extension.events);\n for (const event of extension.events) {\n promises.push(this._loadAnimationEventAsync(`${extensionContext}/events/${event.index}`, context, animation, event, babylonAnimationGroup));\n }\n return Promise.all(promises).then(() => {\n return babylonAnimationGroup;\n });\n });\n });\n }\n _loadClipAsync(context, clip) {\n if (clip._objectURL) {\n return clip._objectURL;\n }\n let promise;\n if (clip.uri) {\n promise = this._loader.loadUriAsync(context, clip, clip.uri);\n }\n else {\n const bufferView = ArrayItem.Get(`${context}/bufferView`, this._loader.gltf.bufferViews, clip.bufferView);\n promise = this._loader.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView);\n }\n clip._objectURL = promise.then((data) => {\n return URL.createObjectURL(new Blob([data], { type: clip.mimeType }));\n });\n return clip._objectURL;\n }\n _loadEmitterAsync(context, emitter) {\n emitter._babylonSounds = emitter._babylonSounds || [];\n if (!emitter._babylonData) {\n const clipPromises = new Array();\n const name = emitter.name || `emitter${emitter.index}`;\n const options = {\n loop: false,\n autoplay: false,\n volume: emitter.volume == undefined ? 1 : emitter.volume,\n };\n for (let i = 0; i < emitter.clips.length; i++) {\n const clipContext = `/extensions/${this.name}/clips`;\n const clip = ArrayItem.Get(clipContext, this._clips, emitter.clips[i].clip);\n clipPromises.push(this._loadClipAsync(`${clipContext}/${emitter.clips[i].clip}`, clip).then((objectURL) => {\n const sound = (emitter._babylonSounds[i] = new Sound(name, objectURL, this._loader.babylonScene, null, options));\n sound.refDistance = emitter.refDistance || 1;\n sound.maxDistance = emitter.maxDistance || 256;\n sound.rolloffFactor = emitter.rolloffFactor || 1;\n sound.distanceModel = emitter.distanceModel || \"exponential\";\n }));\n }\n const promise = Promise.all(clipPromises).then(() => {\n const weights = emitter.clips.map((clip) => {\n return clip.weight || 1;\n });\n const weightedSound = new WeightedSound(emitter.loop || false, emitter._babylonSounds, weights);\n if (emitter.innerAngle) {\n weightedSound.directionalConeInnerAngle = 2 * Tools.ToDegrees(emitter.innerAngle);\n }\n if (emitter.outerAngle) {\n weightedSound.directionalConeOuterAngle = 2 * Tools.ToDegrees(emitter.outerAngle);\n }\n if (emitter.volume) {\n weightedSound.volume = emitter.volume;\n }\n emitter._babylonData.sound = weightedSound;\n });\n emitter._babylonData = {\n loaded: promise,\n };\n }\n return emitter._babylonData.loaded;\n }\n _getEventAction(context, sound, action, time, startOffset) {\n switch (action) {\n case \"play\" /* IMSFTAudioEmitter_AnimationEventAction.play */: {\n return (currentFrame) => {\n const frameOffset = (startOffset || 0) + (currentFrame - time);\n sound.play(frameOffset);\n };\n }\n case \"stop\" /* IMSFTAudioEmitter_AnimationEventAction.stop */: {\n return () => {\n sound.stop();\n };\n }\n case \"pause\" /* IMSFTAudioEmitter_AnimationEventAction.pause */: {\n return () => {\n sound.pause();\n };\n }\n default: {\n throw new Error(`${context}: Unsupported action ${action}`);\n }\n }\n }\n _loadAnimationEventAsync(context, animationContext, animation, event, babylonAnimationGroup) {\n if (babylonAnimationGroup.targetedAnimations.length == 0) {\n return Promise.resolve();\n }\n const babylonAnimation = babylonAnimationGroup.targetedAnimations[0];\n const emitterIndex = event.emitter;\n const emitter = ArrayItem.Get(`/extensions/${this.name}/emitters`, this._emitters, emitterIndex);\n return this._loadEmitterAsync(context, emitter).then(() => {\n const sound = emitter._babylonData.sound;\n if (sound) {\n const babylonAnimationEvent = new AnimationEvent(event.time, this._getEventAction(context, sound, event.action, event.time, event.startOffset));\n babylonAnimation.animation.addEvent(babylonAnimationEvent);\n // Make sure all started audio stops when this animation is terminated.\n babylonAnimationGroup.onAnimationGroupEndObservable.add(() => {\n sound.stop();\n });\n babylonAnimationGroup.onAnimationGroupPauseObservable.add(() => {\n sound.pause();\n });\n }\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new MSFT_audio_emitter(loader));\n//# sourceMappingURL=MSFT_audio_emitter.js.map","import { Observable } from \"@inter-ikea-betrakta-babylonjs/core/Misc/observable.js\";\nimport { Deferred } from \"@inter-ikea-betrakta-babylonjs/core/Misc/deferred.js\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader.js\";\nconst NAME = \"MSFT_lod\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/MSFT_lod/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class MSFT_lod {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 100;\n /**\n * Maximum number of LODs to load, starting from the lowest LOD.\n */\n this.maxLODsToLoad = 10;\n /**\n * Observable raised when all node LODs of one level are loaded.\n * The event data is the index of the loaded LOD starting from zero.\n * Dispose the loader to cancel the loading of the next level of LODs.\n */\n this.onNodeLODsLoadedObservable = new Observable();\n /**\n * Observable raised when all material LODs of one level are loaded.\n * The event data is the index of the loaded LOD starting from zero.\n * Dispose the loader to cancel the loading of the next level of LODs.\n */\n this.onMaterialLODsLoadedObservable = new Observable();\n this._bufferLODs = new Array();\n this._nodeIndexLOD = null;\n this._nodeSignalLODs = new Array();\n this._nodePromiseLODs = new Array();\n this._nodeBufferLODs = new Array();\n this._materialIndexLOD = null;\n this._materialSignalLODs = new Array();\n this._materialPromiseLODs = new Array();\n this._materialBufferLODs = new Array();\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n this._nodeIndexLOD = null;\n this._nodeSignalLODs.length = 0;\n this._nodePromiseLODs.length = 0;\n this._nodeBufferLODs.length = 0;\n this._materialIndexLOD = null;\n this._materialSignalLODs.length = 0;\n this._materialPromiseLODs.length = 0;\n this._materialBufferLODs.length = 0;\n this.onMaterialLODsLoadedObservable.clear();\n this.onNodeLODsLoadedObservable.clear();\n }\n /** @internal */\n onReady() {\n for (let indexLOD = 0; indexLOD < this._nodePromiseLODs.length; indexLOD++) {\n const promise = Promise.all(this._nodePromiseLODs[indexLOD]).then(() => {\n if (indexLOD !== 0) {\n this._loader.endPerformanceCounter(`Node LOD ${indexLOD}`);\n this._loader.log(`Loaded node LOD ${indexLOD}`);\n }\n this.onNodeLODsLoadedObservable.notifyObservers(indexLOD);\n if (indexLOD !== this._nodePromiseLODs.length - 1) {\n this._loader.startPerformanceCounter(`Node LOD ${indexLOD + 1}`);\n this._loadBufferLOD(this._nodeBufferLODs, indexLOD + 1);\n if (this._nodeSignalLODs[indexLOD]) {\n this._nodeSignalLODs[indexLOD].resolve();\n }\n }\n });\n this._loader._completePromises.push(promise);\n }\n for (let indexLOD = 0; indexLOD < this._materialPromiseLODs.length; indexLOD++) {\n const promise = Promise.all(this._materialPromiseLODs[indexLOD]).then(() => {\n if (indexLOD !== 0) {\n this._loader.endPerformanceCounter(`Material LOD ${indexLOD}`);\n this._loader.log(`Loaded material LOD ${indexLOD}`);\n }\n this.onMaterialLODsLoadedObservable.notifyObservers(indexLOD);\n if (indexLOD !== this._materialPromiseLODs.length - 1) {\n this._loader.startPerformanceCounter(`Material LOD ${indexLOD + 1}`);\n this._loadBufferLOD(this._materialBufferLODs, indexLOD + 1);\n if (this._materialSignalLODs[indexLOD]) {\n this._materialSignalLODs[indexLOD].resolve();\n }\n }\n });\n this._loader._completePromises.push(promise);\n }\n }\n /**\n * @internal\n */\n loadSceneAsync(context, scene) {\n const promise = this._loader.loadSceneAsync(context, scene);\n this._loadBufferLOD(this._bufferLODs, 0);\n return promise;\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n let firstPromise;\n const nodeLODs = this._getLODs(extensionContext, node, this._loader.gltf.nodes, extension.ids);\n this._loader.logOpen(`${extensionContext}`);\n for (let indexLOD = 0; indexLOD < nodeLODs.length; indexLOD++) {\n const nodeLOD = nodeLODs[indexLOD];\n if (indexLOD !== 0) {\n this._nodeIndexLOD = indexLOD;\n this._nodeSignalLODs[indexLOD] = this._nodeSignalLODs[indexLOD] || new Deferred();\n }\n const assignWrap = (babylonTransformNode) => {\n assign(babylonTransformNode);\n babylonTransformNode.setEnabled(false);\n };\n const promise = this._loader.loadNodeAsync(`/nodes/${nodeLOD.index}`, nodeLOD, assignWrap).then((babylonMesh) => {\n if (indexLOD !== 0) {\n // TODO: should not rely on _babylonTransformNode\n const previousNodeLOD = nodeLODs[indexLOD - 1];\n if (previousNodeLOD._babylonTransformNode) {\n this._disposeTransformNode(previousNodeLOD._babylonTransformNode);\n delete previousNodeLOD._babylonTransformNode;\n }\n }\n babylonMesh.setEnabled(true);\n return babylonMesh;\n });\n this._nodePromiseLODs[indexLOD] = this._nodePromiseLODs[indexLOD] || [];\n if (indexLOD === 0) {\n firstPromise = promise;\n }\n else {\n this._nodeIndexLOD = null;\n this._nodePromiseLODs[indexLOD].push(promise);\n }\n }\n this._loader.logClose();\n return firstPromise;\n });\n }\n /**\n * @internal\n */\n _loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign) {\n // Don't load material LODs if already loading a node LOD.\n if (this._nodeIndexLOD) {\n return null;\n }\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n let firstPromise;\n const materialLODs = this._getLODs(extensionContext, material, this._loader.gltf.materials, extension.ids);\n this._loader.logOpen(`${extensionContext}`);\n for (let indexLOD = 0; indexLOD < materialLODs.length; indexLOD++) {\n const materialLOD = materialLODs[indexLOD];\n if (indexLOD !== 0) {\n this._materialIndexLOD = indexLOD;\n }\n const promise = this._loader\n ._loadMaterialAsync(`/materials/${materialLOD.index}`, materialLOD, babylonMesh, babylonDrawMode, (babylonMaterial) => {\n if (indexLOD === 0) {\n assign(babylonMaterial);\n }\n })\n .then((babylonMaterial) => {\n if (indexLOD !== 0) {\n assign(babylonMaterial);\n // TODO: should not rely on _data\n const previousDataLOD = materialLODs[indexLOD - 1]._data;\n if (previousDataLOD[babylonDrawMode]) {\n this._disposeMaterials([previousDataLOD[babylonDrawMode].babylonMaterial]);\n delete previousDataLOD[babylonDrawMode];\n }\n }\n return babylonMaterial;\n });\n this._materialPromiseLODs[indexLOD] = this._materialPromiseLODs[indexLOD] || [];\n if (indexLOD === 0) {\n firstPromise = promise;\n }\n else {\n this._materialIndexLOD = null;\n this._materialPromiseLODs[indexLOD].push(promise);\n }\n }\n this._loader.logClose();\n return firstPromise;\n });\n }\n /**\n * @internal\n */\n _loadUriAsync(context, property, uri) {\n // Defer the loading of uris if loading a node or material LOD.\n if (this._nodeIndexLOD !== null) {\n this._loader.log(`deferred`);\n const previousIndexLOD = this._nodeIndexLOD - 1;\n this._nodeSignalLODs[previousIndexLOD] = this._nodeSignalLODs[previousIndexLOD] || new Deferred();\n return this._nodeSignalLODs[this._nodeIndexLOD - 1].promise.then(() => {\n return this._loader.loadUriAsync(context, property, uri);\n });\n }\n else if (this._materialIndexLOD !== null) {\n this._loader.log(`deferred`);\n const previousIndexLOD = this._materialIndexLOD - 1;\n this._materialSignalLODs[previousIndexLOD] = this._materialSignalLODs[previousIndexLOD] || new Deferred();\n return this._materialSignalLODs[previousIndexLOD].promise.then(() => {\n return this._loader.loadUriAsync(context, property, uri);\n });\n }\n return null;\n }\n /**\n * @internal\n */\n loadBufferAsync(context, buffer, byteOffset, byteLength) {\n if (this._loader.parent.useRangeRequests && !buffer.uri) {\n if (!this._loader.bin) {\n throw new Error(`${context}: Uri is missing or the binary glTF is missing its binary chunk`);\n }\n const loadAsync = (bufferLODs, indexLOD) => {\n const start = byteOffset;\n const end = start + byteLength - 1;\n let bufferLOD = bufferLODs[indexLOD];\n if (bufferLOD) {\n bufferLOD.start = Math.min(bufferLOD.start, start);\n bufferLOD.end = Math.max(bufferLOD.end, end);\n }\n else {\n bufferLOD = { start: start, end: end, loaded: new Deferred() };\n bufferLODs[indexLOD] = bufferLOD;\n }\n return bufferLOD.loaded.promise.then((data) => {\n return new Uint8Array(data.buffer, data.byteOffset + byteOffset - bufferLOD.start, byteLength);\n });\n };\n this._loader.log(`deferred`);\n if (this._nodeIndexLOD !== null) {\n return loadAsync(this._nodeBufferLODs, this._nodeIndexLOD);\n }\n else if (this._materialIndexLOD !== null) {\n return loadAsync(this._materialBufferLODs, this._materialIndexLOD);\n }\n else {\n return loadAsync(this._bufferLODs, 0);\n }\n }\n return null;\n }\n _loadBufferLOD(bufferLODs, indexLOD) {\n const bufferLOD = bufferLODs[indexLOD];\n if (bufferLOD) {\n this._loader.log(`Loading buffer range [${bufferLOD.start}-${bufferLOD.end}]`);\n this._loader.bin.readAsync(bufferLOD.start, bufferLOD.end - bufferLOD.start + 1).then((data) => {\n bufferLOD.loaded.resolve(data);\n }, (error) => {\n bufferLOD.loaded.reject(error);\n });\n }\n }\n /**\n * Gets an array of LOD properties from lowest to highest.\n * @param context\n * @param property\n * @param array\n * @param ids\n */\n _getLODs(context, property, array, ids) {\n if (this.maxLODsToLoad <= 0) {\n throw new Error(\"maxLODsToLoad must be greater than zero\");\n }\n const properties = [];\n for (let i = ids.length - 1; i >= 0; i--) {\n properties.push(ArrayItem.Get(`${context}/ids/${ids[i]}`, array, ids[i]));\n if (properties.length === this.maxLODsToLoad) {\n return properties;\n }\n }\n properties.push(property);\n return properties;\n }\n _disposeTransformNode(babylonTransformNode) {\n const babylonMaterials = [];\n const babylonMaterial = babylonTransformNode.material;\n if (babylonMaterial) {\n babylonMaterials.push(babylonMaterial);\n }\n for (const babylonMesh of babylonTransformNode.getChildMeshes()) {\n if (babylonMesh.material) {\n babylonMaterials.push(babylonMesh.material);\n }\n }\n babylonTransformNode.dispose();\n const babylonMaterialsToDispose = babylonMaterials.filter((babylonMaterial) => this._loader.babylonScene.meshes.every((mesh) => mesh.material != babylonMaterial));\n this._disposeMaterials(babylonMaterialsToDispose);\n }\n _disposeMaterials(babylonMaterials) {\n const babylonTextures = {};\n for (const babylonMaterial of babylonMaterials) {\n for (const babylonTexture of babylonMaterial.getActiveTextures()) {\n babylonTextures[babylonTexture.uniqueId] = babylonTexture;\n }\n babylonMaterial.dispose();\n }\n for (const uniqueId in babylonTextures) {\n for (const babylonMaterial of this._loader.babylonScene.materials) {\n if (babylonMaterial.hasTexture(babylonTextures[uniqueId])) {\n delete babylonTextures[uniqueId];\n }\n }\n }\n for (const uniqueId in babylonTextures) {\n babylonTextures[uniqueId].dispose();\n }\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new MSFT_lod(loader));\n//# sourceMappingURL=MSFT_lod.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"MSFT_minecraftMesh\";\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class MSFT_minecraftMesh {\n /** @internal */\n constructor(loader) {\n /** @internal */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /** @internal */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtraAsync(context, material, this.name, (extraContext, extra) => {\n if (extra) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${extraContext}: Material type not supported`);\n }\n const promise = this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial);\n if (babylonMaterial.needAlphaBlending()) {\n babylonMaterial.forceDepthWrite = true;\n babylonMaterial.separateCullingPass = true;\n }\n babylonMaterial.backFaceCulling = babylonMaterial.forceDepthWrite;\n babylonMaterial.twoSidedLighting = true;\n return promise;\n }\n return null;\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new MSFT_minecraftMesh(loader));\n//# sourceMappingURL=MSFT_minecraftMesh.js.map","import { PBRMaterial } from \"@inter-ikea-betrakta-babylonjs/core/Materials/PBR/pbrMaterial.js\";\nimport { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"MSFT_sRGBFactors\";\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class MSFT_sRGBFactors {\n /** @internal */\n constructor(loader) {\n /** @internal */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /** @internal */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtraAsync(context, material, this.name, (extraContext, extra) => {\n if (extra) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${extraContext}: Material type not supported`);\n }\n const promise = this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial);\n const useExactSrgbConversions = babylonMaterial.getScene().getEngine().useExactSrgbConversions;\n if (!babylonMaterial.albedoTexture) {\n babylonMaterial.albedoColor.toLinearSpaceToRef(babylonMaterial.albedoColor, useExactSrgbConversions);\n }\n if (!babylonMaterial.reflectivityTexture) {\n babylonMaterial.reflectivityColor.toLinearSpaceToRef(babylonMaterial.reflectivityColor, useExactSrgbConversions);\n }\n return promise;\n }\n return null;\n });\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new MSFT_sRGBFactors(loader));\n//# sourceMappingURL=MSFT_sRGBFactors.js.map","import { GLTFLoader } from \"../glTFLoader.js\";\nconst NAME = \"ExtrasAsMetadata\";\n/**\n * Store glTF extras (if present) in BJS objects' metadata\n */\nexport class ExtrasAsMetadata {\n _assignExtras(babylonObject, gltfProp) {\n if (gltfProp.extras && Object.keys(gltfProp.extras).length > 0) {\n const metadata = (babylonObject.metadata = babylonObject.metadata || {});\n const gltf = (metadata.gltf = metadata.gltf || {});\n gltf.extras = gltfProp.extras;\n }\n }\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines whether this extension is enabled.\n */\n this.enabled = true;\n this._loader = loader;\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return this._loader.loadNodeAsync(context, node, (babylonTransformNode) => {\n this._assignExtras(babylonTransformNode, node);\n assign(babylonTransformNode);\n });\n }\n /**\n * @internal\n */\n loadCameraAsync(context, camera, assign) {\n return this._loader.loadCameraAsync(context, camera, (babylonCamera) => {\n this._assignExtras(babylonCamera, camera);\n assign(babylonCamera);\n });\n }\n /**\n * @internal\n */\n createMaterial(context, material, babylonDrawMode) {\n const babylonMaterial = this._loader.createMaterial(context, material, babylonDrawMode);\n this._assignExtras(babylonMaterial, material);\n return babylonMaterial;\n }\n}\nGLTFLoader.RegisterExtension(NAME, (loader) => new ExtrasAsMetadata(loader));\n//# sourceMappingURL=ExtrasAsMetadata.js.map","import { Material as BABYLON_Material } from '@inter-ikea-betrakta-babylonjs/core/Materials/material.js';\nimport { GLTFLoader as BABYLON_GLTF2_GLTFLoader } from '@inter-ikea-betrakta-babylonjs/loaders/glTF/2.0/index.js';\nimport { ViewerMaterial } from '../material/ViewerMaterial.js';\nimport { LightSystem } from '../light-manager/light-system/LightSystem.js';\nconst BETRAKTA_BABYLON_EXTENSION_ID = 'BetraktaGLTFLoaderExtension';\n// See https://babylonjs.medium.com/extending-the-gltf-loader-in-babylon-js-588e48fb692b for more information\n// We use a custom material loader so we can load our material (PBRMaterial) instead of BABYLON_PBRMaterial\nexport class BetraktaGLTFLoaderExtension {\n /**\n * Register the extension to Babylon\n * @param viewer The viewer currently in use.\n */\n static register_extension(viewer) {\n BABYLON_GLTF2_GLTFLoader.RegisterExtension(BETRAKTA_BABYLON_EXTENSION_ID, (loader) => {\n return new BetraktaGLTFLoaderExtension(loader, viewer);\n });\n }\n /**\n * Unregisters this extension from Babylon\n */\n static unregister_extension() {\n BABYLON_GLTF2_GLTFLoader.UnregisterExtension(BETRAKTA_BABYLON_EXTENSION_ID);\n }\n constructor(loader, viewer) {\n this.name = BETRAKTA_BABYLON_EXTENSION_ID;\n this.enabled = true;\n this._loader = loader;\n this._viewer = viewer;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n createMaterial(context, material, babylon_draw_mode) {\n this._loader.babylonScene._blockEntityCollection = true; // Since we are loading into asset container\n const babylon_material = new ViewerMaterial(material.name || 'material' + material.index, this._loader.babylonScene, this._viewer);\n this._loader.babylonScene._blockEntityCollection = false;\n // TODO: Maybe bring the next one in so we can support both clockwise/counterclockwise content\n // Moved to mesh so user can change materials on gltf meshes: babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation;\n babylon_material.fillMode = babylon_draw_mode;\n babylon_material.enableSpecularAntiAliasing = true;\n // babylonMaterial.useRadianceOverAlpha = !this._parent.transparencyAsCoverage\n // baylonMaterial.useSpecularOverAlpha = !this._parent.transparencyAsCoverage\n babylon_material.transparencyMode = ViewerMaterial.PBRMATERIAL_OPAQUE;\n babylon_material.metallic = 1;\n babylon_material.roughness = 1;\n babylon_material.maxSimultaneousLights = LightSystem.BABYLON_MATERIAL_MAXIMUM_LIGHT_COUNT;\n // Our own defaults\n babylon_material.sideOrientation = BABYLON_Material.CounterClockWiseSideOrientation; // See above\n babylon_material.useLightmapAsShadowmap = true;\n return babylon_material;\n }\n dispose() {\n // TODO: Should we dispose something?\n }\n}\n//# sourceMappingURL=BetraktaGLTFLoaderExtension.js.map","import { RawTexture2DArray as BABYLON_RawTexture2DArray } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/rawTexture2DArray.js';\nimport { IVector3 } from '../api.js';\nimport { Constants as BABYLON_Constants } from '@inter-ikea-betrakta-babylonjs/core/Engines/constants.js';\nimport { Texture as BABYLON_Texture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js';\nexport class LutEffect {\n constructor(viewer) {\n this._lut_texture = null;\n this._viewer = viewer;\n }\n /**\n * Load a .cube file\n * @param data The content of the cube file\n */\n load_cube_file_from_memory(data) {\n var _a;\n (_a = this._lut_texture) === null || _a === void 0 ? void 0 : _a.dispose();\n const lines = data.split('\\n');\n let lut_size = 0;\n let is_3d = false;\n const CUBE_LUT_3D_FIELD_NAME = 'LUT_3D_SIZE';\n const CUBE_LUT_1D_FIELD_NAME = 'LUT_1D_SIZE';\n const lut_data = [];\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n // Skip empty lines and comments\n if (line.length === 0 || line.substring(0, 1) === '#')\n continue;\n if (line.startsWith(CUBE_LUT_3D_FIELD_NAME)) {\n is_3d = true;\n lut_size = Number.parseInt(line.substring(CUBE_LUT_3D_FIELD_NAME.length + 1));\n }\n else if (line.startsWith(CUBE_LUT_1D_FIELD_NAME)) {\n is_3d = false;\n lut_size = Number.parseInt(line.substring(CUBE_LUT_3D_FIELD_NAME.length + 1));\n }\n else {\n const words = line.split(' ');\n if (words.length === 3) {\n const color = new IVector3(Number.parseFloat(words[0]), Number.parseFloat(words[1]), Number.parseFloat(words[2]));\n lut_data.push(color);\n }\n }\n }\n if (!is_3d) {\n throw new Error('1-Dimensional CUBE files are not supported, please use a 3D cube file.');\n }\n const expected_lut_data_size = is_3d ? (lut_size * lut_size * lut_size) : lut_size;\n if (lut_data.length !== expected_lut_data_size) {\n throw new Error('Invalid CUBE file: Expected ' + expected_lut_data_size + ' data entries, but got ' + lut_data.length);\n }\n const packed_data = new Float32Array(lut_data.length * 4);\n for (let i = 0; i < lut_data.length; i++) {\n packed_data[4 * i + 0] = lut_data[i].x;\n packed_data[4 * i + 1] = lut_data[i].y;\n packed_data[4 * i + 2] = lut_data[i].z;\n packed_data[4 * i + 3] = 1.0;\n }\n this._lut_texture = new BABYLON_RawTexture2DArray(packed_data, lut_size, lut_size, lut_size, BABYLON_Constants.TEXTUREFORMAT_RGBA, this._viewer.scene, false, false, BABYLON_Constants.TEXTURE_BILINEAR_SAMPLINGMODE, BABYLON_Constants.TEXTURETYPE_FLOAT);\n this._lut_texture.wrapU = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n this._lut_texture.wrapV = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n this._lut_texture.wrapR = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n this._viewer.mark_scene_dirty();\n }\n load_cube_file_from_url(url) {\n return new Promise((resolve, reject) => {\n fetch(new Request(url)).then((response) => {\n if (response.ok) {\n response.text().then((data) => {\n this.load_cube_file_from_memory(data);\n resolve();\n }, reject);\n }\n else {\n reject(new Error('Bad response: ' + response.statusText));\n }\n }, reject);\n });\n }\n load_lut_texture_from_url(url) {\n let texture_source = null;\n return new Promise((resolve, reject) => {\n texture_source = new BABYLON_Texture(url, this._viewer.scene, true, false, undefined, () => {\n var _a;\n const source = texture_source;\n (_a = source.readPixels()) === null || _a === void 0 ? void 0 : _a.then((data) => {\n const source_width = source.getSize().width;\n const source_height = source.getSize().height;\n if (source_height * source_height !== source_width) {\n reject(new Error('Invalid LUT texture dimensions'));\n return;\n }\n if (source.textureType !== BABYLON_Constants.TEXTURETYPE_UNSIGNED_BYTE) {\n reject(new Error('Invalid LUT texture format'));\n return;\n }\n if (source.textureFormat !== BABYLON_Constants.TEXTUREFORMAT_RGBA && source.textureFormat !== BABYLON_Constants.TEXTUREFORMAT_RGB) {\n reject(new Error('Invalid LUT texture channel count'));\n return;\n }\n const source_channels = source.textureFormat === BABYLON_Constants.TEXTUREFORMAT_RGBA ? 4 : 3;\n const lut_size = source_height;\n const pixels = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n const destination_data = new Uint8Array(source_width * source_height * 4);\n for (let slice = 0; slice < lut_size; slice++) {\n for (let y = 0; y < lut_size; y++) {\n for (let x = 0; x < lut_size; x++) {\n const src_x = x + slice * lut_size;\n const src_index = src_x + source_width * y;\n const dst_index = slice * lut_size * lut_size + y * lut_size + x;\n destination_data[4 * dst_index + 0] = pixels[source_channels * src_index + 0];\n destination_data[4 * dst_index + 1] = pixels[source_channels * src_index + 1];\n destination_data[4 * dst_index + 2] = pixels[source_channels * src_index + 2];\n destination_data[4 * dst_index + 3] = 255;\n }\n }\n }\n this._lut_texture = new BABYLON_RawTexture2DArray(destination_data, lut_size, lut_size, lut_size, BABYLON_Constants.TEXTUREFORMAT_RGBA, this._viewer.scene, false, false, BABYLON_Constants.TEXTURE_BILINEAR_SAMPLINGMODE, BABYLON_Constants.TEXTURETYPE_UNSIGNED_BYTE);\n this._lut_texture.wrapU = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n this._lut_texture.wrapV = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n this._lut_texture.wrapR = BABYLON_Constants.TEXTURE_CLAMP_ADDRESSMODE;\n this._viewer.mark_scene_dirty();\n resolve();\n }).catch(reject);\n }, (msg) => {\n reject(new Error(msg));\n });\n }).finally(() => {\n texture_source === null || texture_source === void 0 ? void 0 : texture_source.dispose();\n });\n }\n unload_lut() {\n var _a;\n if (this._lut_texture !== null) {\n (_a = this._lut_texture) === null || _a === void 0 ? void 0 : _a.dispose();\n this._lut_texture = null;\n this._viewer.mark_scene_dirty();\n }\n }\n get lut_texture() {\n return this._lut_texture;\n }\n dispose() {\n this.unload_lut();\n }\n static is_supported(engine) {\n if (engine._webGLVersion === 2) {\n return engine.getCaps().textureFloat && engine.getCaps().textureFloatLinearFiltering;\n }\n else {\n return false;\n }\n }\n}\n//# sourceMappingURL=LutEffect.js.map","/**\n * This is a function meant to be used by Babylon when we run with Jest to fake image loading in order to be able to test asset loading/unloading\n */\nexport function fake_image_loader(input, onLoad, onError, offlineProvider, mimeType, imageBitmapOptions) {\n const image = new Image(64, 64);\n image.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAABbmlDQ1BpY2MAACiRdZG/S0JRFMc/apGU4VBDhINDhYNBFERj2eAiEVbQr0VfPg388XjvSUhr0NIgNEQt/Rr6D2oNWguCoAgiGpv7tYS8zlVBCb2P886H773fw7nngjuW1XJWxzTk8rYZj0aCyyurwa53vAQkQngSmmXMzM/HaLt+HnGp/DCqarU/13L1bKQsDVxe4UnNMG1h6YbYlm0o3hPu1zKJDeET4bApDQrfKj1Z4zfF6Rp/KTYX47PgVjWD6SZONrGWMXPCIeGhXLao1ftRN/Gl8ksLkgclAljEiRIhSJIim2SxGZWcl5m19o1VfXMUxKPJ36CEKY40GfGGRS1K1ZRkXfSUfFlKau7/52npE+O16r4IdL46zucwdO1Dpew4v6eOUzkDzwtc5xv+gsxp6lv0ckMbOgb/DlzeNLTkAVztwsCzkTATVckj4dZ1+LiA3hXou4futdqs6vucP8HitjzRHRwewYic96//AfKsaAP5MQoMAAAACXBIWXMAABYlAAAWJQFJUiTwAAAB4HRFWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYACmV4aWYKICAgICAyMTgKNDU3ODY5NjYwMDAwNDk0OTJhMDAwODAwMDAwMDA3MDAxMjAxMDMwMDAxMDAwMDAwMDEwMDAwMDAxYTAxMDUwMDAxMDAwMDAwCjYyMDAwMDAwMWIwMTA1MDAwMTAwMDAwMDZhMDAwMDAwMjgwMTAzMDAwMTAwMDAwMDAyMDAwMDAwMzEwMTAyMDAyMzAwMDAwMAo3MjAwMDAwMDMyMDEwMjAwMTMwMDAwMDA5NjAwMDAwMDY5ODcwNDAwMDEwMDAwMDBhYTAwMDAwMDAwMDAwMDAwMDBmOTE1MDAKMTAyNzAwMDAwMGY5MTUwMDEwMjcwMDAwNDE2NDZmNjI2NTIwNTA2ODZmNzQ2ZjczNjg2ZjcwMjA0MzQzMjAzMjMwMzEzOTI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yzCtwAxc2O2aIahrFU1yFDOd7NFBB3WU7G0IBpTYJvPejadLrDYuXPR7/1GMH3fryc6gArLmp3JX9TXuC/Fm3hJFV4WeZP2x1VD5O+LL6tFXnR3Jtz/ye4z0OfQDfvP2l3+5fUr7LmgwtLszFj/5KgkX0sCG8rhuhkI1YHxppT1WfuQbBKr1Dcmuj5vGjY/SqHmiO1G2Y+pCj64j7/bTJ4sif2GR1bWvbaq9oOEodo/2vnt378CF7pnb5op4DjqHCXgF2YtlMKrACQnc4quoPjxVJ9cdWlC0slcIBYDX1KxEH1NxuePjICaX15f2Z3VXZff2Nr/yDe/apo9DfOAmDfs/ncswSeX4Bw2UmpD/vHeU+AfojalIZV2ZlR2mkrCYBFdYj1LlxCKAEjpT+FOqtO70f9t1+EN5w13tgz9ItVyzH/wMYCku27VQ9MgAAAABJRU5ErkJggg==';\n onLoad(image);\n return image;\n}\n//# sourceMappingURL=FakeImageLoader.js.map","import { CameraManager } from '../../../babylon/camera/CameraManager.js';\nimport { log_instance } from '../utils/LogInstance.js';\nexport const CAMERA_MANAGER_DESCRIPTION = {\n type: CameraManager,\n name: 'camera-manager-description',\n is_enabled: true,\n initiate_tabs: [\n {\n tag: 'Camera Manager',\n setup: (tab, manager) => {\n tab.label('☰ Cameras Stack');\n tab.watch(manager['_camera_stack'], 'size', { is_readonly: true });\n tab.custom.watch('string', {\n name: 'Peek',\n get: () => { var _a, _b; return (_b = (_a = manager.active_camera) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : null; },\n is_nullable: true\n });\n tab.button('Pop', { on_click: () => manager.pop_camera() });\n tab.label('📷 Engine Camera');\n tab.watch(manager.engine_camera, 'position', { is_readonly: true });\n tab.watch(manager.engine_camera, 'forward', { is_readonly: true });\n const jitter = tab.container('jitter');\n jitter.custom.watch('number', { name: 'x', get: () => manager.engine_camera.get_jitter().x });\n jitter.custom.watch('number', { name: 'y', get: () => manager.engine_camera.get_jitter().y });\n tab.button('Log Engine Camera', { on_click: () => log_instance(manager.engine_camera) });\n tab.button('Log Manager', { on_click: () => log_instance(manager) });\n }\n }\n ]\n};\n//# sourceMappingURL=CameraManagerDescription.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Quaternion as BABYLON_Quaternion, Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { Plane as BABYLON_Plane } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.plane.js';\nimport { Color4 as BABYLON_Color4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.color.js';\nimport { Engine as BABYLON_Engine } from '@inter-ikea-betrakta-babylonjs/core/Engines/engine.js';\nimport { Scene as BABYLON_Scene } from '@inter-ikea-betrakta-babylonjs/core/scene.js';\nimport { InstancedMesh as BABYLON_InstancedMesh } from '@inter-ikea-betrakta-babylonjs/core/Meshes/instancedMesh.js';\nimport { DracoCompression as BABYLON_DracoCompression } from '@inter-ikea-betrakta-babylonjs/core/Meshes/Compression/dracoCompression.js';\nimport { PushMaterial as BABYLON_PushMaterial } from '@inter-ikea-betrakta-babylonjs/core/Materials/pushMaterial.js';\nimport { Ray as BABYLON_Ray } from '@inter-ikea-betrakta-babylonjs/core/Culling/ray.js';\nimport { Texture as BABYLON_Texture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/texture.js';\nimport { NormalMaterial as BABYLON_NormalMaterial } from '@inter-ikea-betrakta-babylonjs/materials/normal/normalMaterial.js';\nimport { MaterialHelper as BABYLON_MaterialHelper } from '@inter-ikea-betrakta-babylonjs/core/Materials/materialHelper.js';\nimport { take_screenshot } from './Screenshots.js';\nimport { ReflectionProbe } from './experimental/ReflectionProbe.js';\n// The following imports are needed for side effects\nimport './shaders/ShadersInclude/imageProcessingFunctions.js';\nimport '@inter-ikea-betrakta-babylonjs/core/Collisions/collisionCoordinator.js';\nimport '@inter-ikea-betrakta-babylonjs/core/Lights/Shadows/shadowGeneratorSceneComponent.js';\nimport '@inter-ikea-betrakta-babylonjs/core/Rendering/depthRendererSceneComponent.js'; // Temporal Effects\nimport '@inter-ikea-betrakta-babylonjs/core/Misc/screenshotTools.js'; // Screenshots\nimport '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/Loaders/ddsTextureLoader.js'; // .DDS loader for Environment maps\nimport '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/Loaders/envTextureLoader.js'; // .ENV loader for Environment maps\nimport '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/Loaders/ktxTextureLoader.js'; // .KTX loader for basis textures in gltfs\nimport '@inter-ikea-betrakta-babylonjs/core/Animations/animatable.js'; // Animations\n// TODO: Here is where we could add KTX or BASIS-support by importing appropriate loaders\n// TODO: Not sure how to make .HDR-textures supported... Can't find a loader for it\nimport { CameraMode, IBoundingBox, IColor, IColor4, IMatrix4, IVector3, ViewerOptionalFeatures, RenderLayerAllocation, CameraTransitionPreset, ITransformedBoundingBox, LightType } from '../api.js';\nimport { AssetManager, debug_download_texture, download_gltf_files } from './AssetManager.js';\nimport { LightBaker } from './LightBaker.js';\nimport { OutlineLayer } from './OutlineEffect.js';\nimport { ViewerMaterial } from './material/ViewerMaterial.js';\nimport { LineManager } from './LineManager.js';\nimport { MeshManager } from './MeshManager.js';\nimport { MaterialFreezingManager } from './MaterialFreezingManager.js';\nimport { AnimationSystem } from './AnimationSystem.js';\nimport { clamp, degrees, radians } from '../Math.js';\nimport { EXPOSURE_PRESETS, ev_to_intensity, exposure_value } from './PostProcessManager.js';\nimport { icolor_to_col4, vector_3 } from './utility/Conversion.js';\nimport { get_or_set_map_value, update_from_partial } from './utility/utils.js';\nimport { BabylonEngineCamera } from './camera/EngineCamera.js';\nimport { TRANSITION_PRESETS } from './camera/CameraManager.js';\nimport { Observable } from '../Observable.js';\nimport { FocusBorder } from './FocusBorder.js';\nimport { InteractionSystem } from './InteractionSystem.js';\nimport { CoroutineManager } from '../CoroutineManager.js';\nimport { TextField } from './TextField.js';\nimport { get_box_framed_perspective_camera_matrix, get_precise_framed_perspective_camera_matrix } from './camera/ObjectFraming.js';\nimport { Framebuffer, ViewerFramebufferType } from './Framebuffer.js';\nimport { ImageProcessingConfiguration as BABYLON_ImageProcessingConfiguration } from '@inter-ikea-betrakta-babylonjs/core/Materials/imageProcessingConfiguration.js';\nimport { GpuProfiler } from './utility/GpuProfiler.js';\nimport { LightManager } from './light-manager/LightManager.js';\nimport { get_object_bounds_local, get_object_bounds_world, is_valid_bounding_box, update_aabb_by_transformed_aabb } from './utility/Bounds.js';\nimport { CutoutObject, CutoutShape } from './CutoutObject.js';\nimport { get_hardware_limits } from './utility/HardwareLimits.js';\nimport { RENDER_LAYER_MASK_ALL, RENDER_LAYER_MASK_DEFAULT, RENDER_LAYER_SHADOW, RENDER_LAYER_UI, RenderLayerMask } from './RenderLayer.js';\nimport { ViewCompositor } from './utility/ViewCompositor.js';\nimport { RenderTargetTexture as BABYLON_RenderTargetTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/renderTargetTexture.js';\nimport { ShaderLanguage as BABYLON_ShaderLanguage } from '@inter-ikea-betrakta-babylonjs/core/Materials/shaderLanguage.js';\nimport { ThinEngine as BABYLON_ThinEngine } from '@inter-ikea-betrakta-babylonjs/core/Engines/thinEngine.js';\nimport { assert } from './utility/Assert.js';\nimport { filter_closest_hit, filter_hits_to_one_per_interactable_in_place, raycast_all_internal, raycast_all_objects_internal, raycast_all_gizmos_internal, update_babylon_ray } from './Raycast.js';\nimport { get_fitted_inverse_tonemap } from '../utils/InverseTonemapper.js';\nimport { WebGL2Mock, webgl2_capabilities_mac_m2_chrome } from './WebGLMock.js';\nimport { Deprecated } from '../utils/Deprecated.js';\nimport { UiMesh } from './UiMesh.js';\nimport { SoftShadowRenderer } from './SoftShadowRenderer.js';\nimport { ExceptionHandler } from '../logging/exception_handler/ExceptionHandler.js';\nimport { Logger } from '../logging/Logger.js';\nimport { ViewerXRSession } from './webxr/ViewerXRSession.js';\nimport { WebGLMemoryTracker } from './WebGLMemoryTracker.js';\nimport { View } from './View.js';\nimport { DebugLayer } from '../utils/DebugLayer/DebugLayer.js';\nimport { LIGHT_DESCRIPTION } from '../utils/DebugLayer/descriptions/LightDescription.js';\nimport { OBJECT_DESCRIPTION } from '../utils/DebugLayer/descriptions/SceneObjectDescription.js';\nimport { CAMERA_DESCRIPTION } from '../utils/DebugLayer/descriptions/ViewerCameraDescription.js';\nimport { InputHandlerManager } from '../input/InputHandlerManager.js';\nimport { ViewerLockSystem } from './utility/LockSystem.js';\nimport { BaseTexture as BABYLON_BaseTexture } from '@inter-ikea-betrakta-babylonjs/core/Materials/Textures/baseTexture.js';\nimport { ViewerScene } from './scene/ViewerScene.js';\nimport { BetraktaGLTFLoaderExtension } from './scene/BetraktaGLTFLoaderExtension.js';\nimport { LutEffect } from './LutEffect.js';\nimport { fake_image_loader } from './utility/FakeImageLoader.js';\nimport { CAMERA_MANAGER_DESCRIPTION } from '../utils/DebugLayer/descriptions/CameraManagerDescription.js';\nexport const VIEWER_DEFAULT_FLOAT_FRAMEBUFFER_TYPE = ViewerFramebufferType.R11_G11_B10F;\nexport const VIEWER_DEFAULT_COMPATIBILITY_FRAMEBUFFER_TYPE = ViewerFramebufferType.RGBA8;\nexport const VIEWER_WANTED_MSAA_SAMPLES = 4;\n// Replaced by correct data at build-time\nconst VIEWER_VERSION = '10.6.0';\nconst COMMIT_HASH = '#1fd03e54d';\nconst PRINT_COMMIT_HASH = false; // Set to false if building release version\nexport var RenderingGroupID;\n(function (RenderingGroupID) {\n RenderingGroupID[RenderingGroupID[\"SKYBOX_RENDERING_GROUP\"] = 1] = \"SKYBOX_RENDERING_GROUP\";\n RenderingGroupID[RenderingGroupID[\"DEFAULT_RENDERING_GROUP\"] = 2] = \"DEFAULT_RENDERING_GROUP\";\n})(RenderingGroupID || (RenderingGroupID = {}));\nconst MAX_CLIP_PLANES = 6; // Max number of clipping planes that may be used simultaneously, per source mesh\nconst FRAMES_TO_COMPOSITE = 4;\nconst MAX_RENDER_SIZE = 16384;\nclass TimeDelta {\n constructor(seconds) {\n this._delta_seconds = seconds;\n this._total_time_seconds = 0;\n this._elapsed_frames = 0;\n }\n get milliseconds() {\n return this.seconds * 1000.0;\n }\n get seconds() {\n return this._delta_seconds;\n }\n set seconds(seconds) {\n this._delta_seconds = seconds;\n }\n get total_time_seconds() {\n return this._total_time_seconds;\n }\n get elapsed_frames() {\n return this._elapsed_frames;\n }\n increment_elapsed_frames() {\n this._elapsed_frames += 1;\n }\n increase_total_time(seconds) {\n this._total_time_seconds += seconds;\n }\n reset_total_time() {\n this._total_time_seconds = 0;\n }\n get total_time_milliseconds() {\n return this._total_time_seconds * 1000.0;\n }\n}\nexport var ClipPlane;\n(function (ClipPlane) {\n ClipPlane[ClipPlane[\"ONE\"] = 0] = \"ONE\";\n ClipPlane[ClipPlane[\"TWO\"] = 1] = \"TWO\";\n ClipPlane[ClipPlane[\"THREE\"] = 2] = \"THREE\";\n ClipPlane[ClipPlane[\"FOUR\"] = 3] = \"FOUR\";\n ClipPlane[ClipPlane[\"FIVE\"] = 4] = \"FIVE\";\n ClipPlane[ClipPlane[\"SIX\"] = 5] = \"SIX\";\n})(ClipPlane || (ClipPlane = {}));\nexport class Viewer {\n constructor(canvas_element, config, optional_features_partial) {\n var _a;\n this.canvas_element = canvas_element;\n this._option_enable_instances = true;\n this._debug_layer = null;\n this._picked_object = null;\n this._baker = null; // TODO: Only allow one baker for now. Add possibility to have multiple bakers later on...\n this._dom_event_listeners = [];\n // If this is false, all frames are rendered (overridden by _pause_rendering and _number_of_forced_frames_to_render)\n this.only_render_on_demand = true;\n // This should be marked true whenever we need to clear the backbuffer, such as after a resize or a View has changed its viewport on the canvas\n this._backbuffer_clear_dirty = true;\n this._id_to_before_render_observables = new Map();\n this._id_to_after_render_observables = new Map();\n // Source mesh mapped to its instances (or itself), in turn mapped a clip plane index\n this._mesh_to_clip_plane = new Map();\n this._coroutine_manager = new CoroutineManager();\n // TODO: This should be revisited when we implement none namespaced metadata handling\n this._object_metadata_store = new Map();\n this._object_focus_borders = new Map();\n this._scene_bounds = { min: { x: 0, y: 0, z: 0 }, max: { x: 0, y: 0, z: 0 } };\n this._scene_bounds_changed_observable = new Observable();\n this._objects_changed_observable = new Observable();\n this._object_deleted_observable = new Observable();\n this._update_observable = new Observable();\n // These are for forwarding the default view's observables, where we don't want the user to get the view as the parameter, and instead get the Viewer.\n this._default_view_before_render_observable = new Observable();\n this._default_view_after_render_observable = new Observable();\n this._default_view_camera_updated_observable = new Observable();\n this._default_view_active_camera_changed_observable = new Observable();\n this._default_view_camera_transition_begin_observable = new Observable();\n this._default_view_camera_transition_end_observable = new Observable();\n this._before_render_scene_setup_observable = new Observable();\n // For keeping track of all the objects which have had their transform updated since last frame. Cleared each frame.\n this._updated_objects_this_frame = new Set();\n this._object_changed_observables = new Map();\n this._gpu_profiler = null;\n this._scene_dirty = true;\n this._custom_views = [];\n this._view_composition = [];\n this._delta_time_object = new TimeDelta(0);\n this._optional_features = new ViewerOptionalFeatures();\n this._click_void_observable = new Observable();\n this._secondary_click_void_observable = new Observable();\n // Used when fetching current FPS to know if we should return 0, or our actual FPS.\n this._last_frame_was_composited = false;\n this._rendering_is_paused = false;\n this._forced_render_frame_count = 0;\n this._rendering_lock_system = new ViewerLockSystem();\n this._viewer_resize_observable = new Observable();\n this._viewer_dispose_observable = new Observable();\n this._shadowmap_render_layer_mask = RENDER_LAYER_MASK_ALL;\n this._exception_handler = new ExceptionHandler();\n this._background_color = { r: 0, g: 0, b: 0 };\n this.interactable_disposed_observable = new Observable();\n // State variable to know if we are currently trying to initialize an XR session\n this._is_initializing_xr = false;\n // Our XR session, if any.\n this.xr = null;\n this._webgl_memory_tracker = null;\n this._input_handler_manager = new InputHandlerManager();\n this._world_bounds_is_dirty = false;\n this._should_notify_world_bounds = false;\n this.reflection_probes = [];\n this._effect_compiled_promises = new Set();\n this._has_been_disposed = false;\n // TODO: Temporary cache before we fix Asset Manager stuff. Retains old behaviour.\n this._loaded_material_map = new Map();\n Logger.setup({\n name: 'Viewer'\n });\n Logger.set_enabled(false);\n if (Viewer._viewer_instances_running > 0) {\n console.warn('Multiple (' + Viewer._viewer_instances_running + ') simultaneous instances of Viewer already running, this is not supported and may fail.');\n }\n Viewer._viewer_instances_running++;\n // Workaround for inspector accessign NormalMaterial via CDN if it is not available\n if (typeof window !== 'undefined') {\n if (window.BABYLON === undefined) {\n window.BABYLON = {};\n }\n window.BABYLON.NormalMaterial = BABYLON_NormalMaterial;\n }\n this._optional_features = update_from_partial(new ViewerOptionalFeatures(), optional_features_partial !== null && optional_features_partial !== void 0 ? optional_features_partial : {});\n this._config = config;\n // Workaround for Chrome bug on Android\n // See: https://forum.babylonjs.com/t/problems-on-chrome-mobile-since-december-7th-2023/46288/15\n BABYLON_Engine.ExceptionList.push({ key: 'Chrome/12\\\\d\\\\..+?Mobile', capture: null, captureConstraint: null, targets: ['uniformBuffer'] });\n const original_prepare_defines_for_light = BABYLON_MaterialHelper.PrepareDefinesForLight;\n const light_defines_override = (scene, mesh, light, light_index, defines, specular_supported, state, ...args) => {\n defines['LINELIGHT' + light_index] = false;\n // @ts-ignore\n original_prepare_defines_for_light(scene, mesh, light, light_index, defines, specular_supported, state, ...args);\n };\n // @ts-ignore\n if (BABYLON_MaterialHelper.light_defines_override === undefined) {\n // @ts-ignore\n BABYLON_MaterialHelper.light_defines_override = light_defines_override;\n // Make calls to PrepareDefinesForLight call the new function\n // @ts-ignore\n BABYLON_MaterialHelper.PrepareDefinesForLight = BABYLON_MaterialHelper.light_defines_override;\n }\n if (this._optional_features.feature_gate_disable_webgl2_support) {\n // If someone has disabled WebGL2 explicitly, let them know.\n console.warn(\"WARNING: VIEWER WEBGL2 SUPPORT EXPLICITLY DISABLED.\\nDO NOTE USE IN PRODUCTION.\");\n }\n this.canvas_element = canvas_element;\n const disable_webgl2 = this._optional_features.feature_gate_disable_webgl2_support && !this._config.headless;\n if (this._optional_features.feature_gate_disable_webgl2_support && this._config.headless) {\n console.warn('Viewer was requested headless & without WebGL2 support, these options are incompatible. Viewer will be created headless with WebGL 2 support.');\n }\n let gl_context = null;\n // See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext\n const options = {\n xrCompatible: this._config.xr_compatible,\n antialias: false,\n alpha: true,\n depth: false,\n desynchronized: undefined,\n failIfMajorPerformanceCaveat: undefined,\n powerPreference: 'default',\n premultipliedAlpha: false,\n preserveDrawingBuffer: true,\n stencil: false\n };\n if (this._config.headless) {\n const mock = new WebGL2Mock(this.canvas_element, this.canvas_element.clientWidth, this.canvas_element.clientHeight, webgl2_capabilities_mac_m2_chrome, options);\n gl_context = mock;\n }\n else {\n if (!disable_webgl2) {\n const context = (this.canvas_element.getContext('webgl2', options) ||\n this.canvas_element.getContext('experimental-webgl2', options));\n if (context) {\n gl_context = context;\n }\n }\n if (gl_context === null) {\n gl_context = (this.canvas_element.getContext('webgl', options) ||\n this.canvas_element.getContext('experimental-webgl', options));\n }\n if (gl_context === null) {\n throw new Error('WebGL not supported');\n }\n }\n if (config.enable_webgl_memory_tracker) {\n this._webgl_memory_tracker = new WebGLMemoryTracker(gl_context, this);\n }\n // Since we use our own framebuffer, the canvas framebuffer doesn't need antialiasing.\n const engine_antialiasing = false;\n // mock as WebGLRenderingContext\n this._engine = new BABYLON_Engine(gl_context, engine_antialiasing, Object.assign(Object.assign({}, options), { disableWebGL2Support: disable_webgl2 })); // Babylon crashes on Safari 15 if xrCompatibility is enabled\n if (!this._config.use_parallel_shader_compile) {\n // Disable parallel shader compile extension (this is Babylon's recommended way of doing it)\n this._engine.getCaps().parallelShaderCompile = undefined;\n }\n // Workarounds for Babylon bugs.\n // See the links in the functions for their reports and maybe they have been fixed when you update Babylon :)\n this.fix_babylon_msaa_memory_leak();\n this.fix_babylon_msaa_texture_formats();\n // End of Babylon bug workarounds\n // Overload the engine's createEffect function to dirty the viewer whenever shaders finish compilation (an issue when we have parallel shader compilation)\n this.overload_babylon_create_effect();\n const scene_options = {\n // If this isn't set to false, we get some huge memory leaks that cause really big GC spikes in extreme cases.\n // Found when deleting & creating 50 custom meshes every frame.\n useMaterialMeshMap: false\n };\n this._scene = new BABYLON_Scene(this.engine, scene_options);\n this.scene.useRightHandedSystem = true;\n this.scene.preventDefaultOnPointerDown = false;\n this.scene.preventDefaultOnPointerUp = false;\n this.scene.doNotHandleCursors = true;\n this.scene.skipPointerDownPicking = true;\n this.scene.skipPointerMovePicking = true;\n this.scene.skipPointerUpPicking = true;\n this.scene.clearColor = new BABYLON_Color4(0.95, 0.95, 0.95, 1);\n this.freezing_manager = new MaterialFreezingManager(this.scene, () => !!(this._baker && this._baker.running));\n BetraktaGLTFLoaderExtension.register_extension(this);\n this.viewer_scene = new ViewerScene(this, this.scene);\n if (config.headless) {\n // With js-dom, it seems like it doesn't load image elements. This causes materials that load textures\n // (such as every PBR material, as they load a built-in environment map), to never be ready.\n // This blocks rendering, meaning we can't test any rendering.\n // So to work around it, we implement our own image loader that loads a simple image with fake data.\n BABYLON_ThinEngine._FileToolsLoadImage = fake_image_loader;\n }\n BABYLON_BaseTexture.DEFAULT_ANISOTROPIC_FILTERING_LEVEL = config.anisotropic_filtering_level;\n this._compositing_frames_remaining = FRAMES_TO_COMPOSITE;\n const canvas_width = this.engine.getRenderWidth(true);\n const canvas_height = this.engine.getRenderHeight(true);\n this._canvas_render_width = canvas_width;\n this._canvas_render_height = canvas_height;\n this._interaction_system = new InteractionSystem(this, (_a = this._config.interaction_system_enabled) !== null && _a !== void 0 ? _a : true);\n if (optional_features_partial === null || optional_features_partial === void 0 ? void 0 : optional_features_partial.debug_enable_gpu_profiler) {\n this.enable_gpu_profiler();\n }\n // Create our \"null\" camera and render target here to be able to call Babylon's scene.render() to perform shadow maps and other things, without actually rendering the scene.\n // See explanation at the declaration of these variables what this is for and how it works.\n // Create our \"null\" camera and assign it to the scene\n this._null_babylon_camera = new BabylonEngineCamera('', this.scene, false);\n this.scene.activeCamera = this._null_babylon_camera;\n this.scene.activeCamera.setEnabled(false);\n // Create the \"null\" render target and assign it to the \"null\" camera\n this._null_babylon_rendertarget = new BABYLON_RenderTargetTexture('null viewer rt', { width: 4, height: 4 }, this.scene);\n // Make sure it never renders\n this._null_babylon_rendertarget._shouldRender = () => { return false; };\n this.scene.activeCamera.outputRenderTarget = this._null_babylon_rendertarget;\n // Create the default view\n if (!this._optional_features.no_default_view) {\n const use_float_framebuffer_type = this._optional_features.feature_gate_use_float_framebuffer &&\n Framebuffer.is_float_framebuffer_supported(this._engine);\n this._default_view = new View(this, this._interaction_system, canvas_width, canvas_height, use_float_framebuffer_type ? VIEWER_DEFAULT_FLOAT_FRAMEBUFFER_TYPE : VIEWER_DEFAULT_COMPATIBILITY_FRAMEBUFFER_TYPE, VIEWER_WANTED_MSAA_SAMPLES);\n this._float_framebuffer_enabled = this._default_view.framebuffer.is_float_render_target();\n this._view_composition.push({ view: this._default_view, z_index: 0 });\n // In order to not expose the View for this seemingly \"Viewer\" observable, we create a \"bridge\" observable.\n this._default_view.before_render_observable.add(() => this._default_view_before_render_observable.notify(this));\n this._default_view.after_render_observable.add(() => this._default_view_after_render_observable.notify(this));\n this._default_view.camera_updated_observable.add((_, camera) => this._default_view_camera_updated_observable.notify(camera));\n this._default_view.camera_manager.active_camera_changed_observable.add((_, camera) => this._default_view_active_camera_changed_observable.notify(this, camera));\n this._default_view.camera_manager.camera_transition_begin_observable.add((_, event) => this._default_view_camera_transition_begin_observable.notify(this, event));\n this._default_view.camera_manager.camera_transition_end_observable.add((_, event) => this._default_view_camera_transition_end_observable.notify(this, event));\n }\n else {\n this._default_view = null;\n this._float_framebuffer_enabled =\n this._optional_features.feature_gate_use_float_framebuffer &&\n Framebuffer.is_float_framebuffer_supported(this._engine);\n }\n // Base exposure value to match the lighting we had before tonemapping\n this.scene.imageProcessingConfiguration.exposure = 1.4;\n /*\n Here we cover the case where we cannot use our Tonemapping effect post process,\n and instead use Babylons built-in functionality where tone mapping is done in the forward pass.\n If our custom tone mapping is supported it is applied in postprocess.\n */\n if (!this._float_framebuffer_enabled) {\n // We want tonemapping, but float framebuffer wasn't supported.\n this.scene.imageProcessingConfiguration.toneMappingEnabled = true;\n this.scene.imageProcessingConfiguration.toneMappingType = BABYLON_ImageProcessingConfiguration.TONEMAPPING_ACES;\n }\n // Set up render layer allocations\n // The Viewer reserves bits [0...7] for internal use\n // We purposefully \"underallocate\" and leave a lot of bits unused.\n // This is so we can give more allocations to different users in the future, without taking anyone else's away, depending on need.\n // IMPORTANT NOTE: Bit 31 does NOT work. Babylon doesn't like it as it produces a negative number.\n this._layer_allocation_map = new Map();\n this._layer_allocation_map.set(RenderLayerAllocation.IPEX_CORE, [8, 9, 10, 11]);\n this._layer_allocation_map.set(RenderLayerAllocation.IPEX_KVADRAT, [12, 13, 14]);\n this._layer_allocation_map.set(RenderLayerAllocation.IPEX_SPACE, [15, 16, 17]);\n this._layer_allocation_map.set(RenderLayerAllocation.IPEX_PLANNER, [18, 19, 20]);\n this._view_compositor = new ViewCompositor(this.scene);\n const ubo_supported = this._engine.supportsUniformBuffers;\n ViewerMaterial.create_shaders(ubo_supported);\n BABYLON_DracoCompression.Configuration = {\n decoder: this._config.draco_decoder\n };\n this.set_background_color(0.95, 0.95, 0.95);\n this.line_manager = new LineManager(this, RENDER_LAYER_UI, false);\n this._line_manager_on_top = new LineManager(this, RENDER_LAYER_UI, true);\n // NOTE: This ties our asset manager to one scene, but that is hard to avoid with the ownership model Babylon has anyway\n this.asset_manager = new AssetManager(this.scene, this.freezing_manager, () => this.mark_scene_dirty(), this);\n this._light_manager = new LightManager(this);\n this.mesh_manager = new MeshManager(this, this.asset_manager, this._light_manager.light_system, () => this.mark_scene_dirty());\n this.animation_system = new AnimationSystem(this.scene, this.viewer_scene);\n this.scene.onNewMaterialAddedObservable.add((material) => {\n // Enabling hot swapping will cause some non-critical webgl-warnings, but will reduce blinking glitches.\n // See https://forum.babylonjs.com/t/light-dispose-causes-webgl-errors/11176\n // We disable swapping for now.\n if (material instanceof BABYLON_PushMaterial) {\n material.allowShaderHotSwapping = false;\n }\n });\n this._object_changed_observer = this.viewer_scene.object_changed_observable.add((_, object) => {\n this._updated_objects_this_frame.add(object.id);\n this.mark_world_bounds_dirty();\n });\n this._object_removed_observer = this.viewer_scene.object_removed_observable.add((_, object) => {\n this.on_object_removed(object);\n this._object_deleted_observable.notify(this, object.id);\n this._object_changed_observables.delete(object.id);\n });\n this.outline_layer = new OutlineLayer('Outline layer', this.scene);\n if (config.run_render_loop) {\n this._engine.runRenderLoop(() => {\n this.update(this._engine.getDeltaTime() / 1000.0);\n });\n }\n // This disables frustum culling on submesh-level\n this.scene._activeMeshesFrozenButKeepClipping = false;\n if (LutEffect.is_supported(this._engine)) {\n this.lut_effect = new LutEffect(this);\n }\n else {\n this.lut_effect = null;\n }\n console.info(`betrakta viewer v${VIEWER_VERSION}${PRINT_COMMIT_HASH ? (' - ' + COMMIT_HASH) : ''}`);\n }\n get_lut_effect() {\n return this.lut_effect;\n }\n get_logger() {\n return Logger;\n }\n enter_xr_session(mode, reference_space_type) {\n if (this.xr !== null) {\n return Promise.reject(new Error('Viewer already has active XR session'));\n }\n if (this._is_initializing_xr) {\n return Promise.reject(new Error('Viewer is already initializing an XR session'));\n }\n if (!this._config.xr_compatible) {\n return Promise.reject(new Error('Viewer was not initialized with XR compatibility in ViewerConfiguration'));\n }\n if (!navigator.xr) {\n return Promise.reject(new Error('XR not available in this browser context.'));\n }\n this._is_initializing_xr = true;\n return new Promise((resolve, reject) => {\n navigator.xr.requestSession(mode).then((session) => {\n const gl = this._engine._gl;\n const layer = new XRWebGLLayer(session, gl);\n session.updateRenderState({\n baseLayer: layer\n });\n session.requestReferenceSpace(reference_space_type).then((reference_space) => {\n const xr = new ViewerXRSession(this, session, layer, reference_space);\n xr.on_end_observable.add_once(() => {\n if (this.xr === xr) {\n this.xr = null;\n }\n else {\n console.warn(\"Warning: Viewer's XR session was not the session that ended. This shouldn't be able to happen.\");\n }\n });\n this.xr = xr;\n this._is_initializing_xr = false;\n resolve(this.xr);\n }).catch((reason) => {\n this._is_initializing_xr = false;\n reject(reason);\n });\n }).catch((reason) => {\n this._is_initializing_xr = false;\n reject(reason);\n });\n });\n }\n is_xr_session_mode_supported(mode) {\n if (navigator.xr) {\n return navigator.xr.isSessionSupported(mode);\n }\n else {\n return Promise.resolve(false);\n }\n }\n fix_babylon_msaa_texture_formats() {\n // Silly hack to fix a Babylon function that wouldn't take the R11F_G11F_B10F format into account.\n // Used by the Framebuffer.\n // Bug reported here: https://forum.babylonjs.com/t/using-msaa-causes-opengl-errors-with-certain-color-renderable-formats/45994\n const gl = this._engine._gl;\n const original_engine_function = this._engine._getRGBAMultiSampleBufferFormat.bind(this._engine);\n this._engine._getRGBAMultiSampleBufferFormat = (type) => {\n if (type === BABYLON_Engine.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV) {\n return gl.R11F_G11F_B10F;\n }\n else {\n return original_engine_function(type);\n }\n };\n }\n fix_babylon_msaa_memory_leak() {\n // Reported here: https://forum.babylonjs.com/t/babylon-leaks-msaa-renderbuffers-on-resize-dispose-with-webgl/51228\n const original_release_texture = this._engine._releaseTexture.bind(this._engine);\n this._engine._releaseTexture = (texture) => {\n var _a;\n (_a = texture._hardwareTexture) === null || _a === void 0 ? void 0 : _a.release();\n original_release_texture(texture);\n };\n }\n get_effects_compiled_promise() {\n const promises = [];\n this._effect_compiled_promises.forEach(promise => {\n promises.push(promise);\n });\n return new Promise((resolve) => {\n Promise.allSettled(promises).then(() => resolve());\n });\n }\n overload_babylon_create_effect() {\n // Here we overload the Babylon engine's function 'createEffect', so that we can hook up on all onCompileObservable for all effects created in the engine.\n // This is so we can dirty the Viewer whenever ANY shader has finished compiling.\n // It's an ugly hack, but it's something we need for our 'render-on-demand' solution.\n const original_create_effect = this._engine.createEffect.bind(this._engine);\n // Keep track of which effects we're already tracking compilation on. Babylon may return a cached and already compiled effect if you request an effect of the same source code twice.\n const registered_effects = new Set();\n this._engine.createEffect = (\n /* eslint-disable */\n baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, defines, fallbacks, onCompiled, onError, indexParameters, shaderLanguage = BABYLON_ShaderLanguage.GLSL\n /* eslint-enable */\n ) => {\n const effect = original_create_effect(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, defines, fallbacks, onCompiled, onError, indexParameters, shaderLanguage);\n // Make sure we don't register twice for the same effect.\n if (registered_effects.has(effect))\n return effect;\n registered_effects.add(effect);\n // We need to be notified when that effect has finished compiling and dirty the Viewer.\n // If the effect is already ready, then dirty the Viewer immediately.\n if (effect.isReady()) {\n this.mark_scene_dirty();\n }\n else {\n // Create a promise to resolve once the shader has compiled or failed to compile.\n const effect_compiled_promise = new Promise((resolve, reject) => {\n effect.onCompileObservable.addOnce(() => {\n resolve();\n this._effect_compiled_promises.delete(effect_compiled_promise);\n });\n effect.onErrorObservable.add(() => {\n reject(new Error('Shader compilation failed.'));\n this._effect_compiled_promises.delete(effect_compiled_promise);\n });\n });\n this._effect_compiled_promises.add(effect_compiled_promise);\n }\n // Either way if it was already compiled or not, we want to dirty if the shader was recompiled.\n // Not sure if this actually ever happens, but see it as a failsafe.\n effect.onCompileObservable.add(() => this.mark_scene_dirty());\n effect.onErrorObservable.add(() => this.mark_scene_dirty());\n return effect;\n };\n }\n /**\n * Internal\n * @returns Babylon scene reference\n */\n get scene() {\n return this._scene;\n }\n get engine() {\n return this._engine;\n }\n get light_manager() {\n return this._light_manager;\n }\n get light_system() {\n return this._light_manager.light_system;\n }\n get_view_at_canvas_coordinates(x, y) {\n this.sort_view_composition();\n for (let i = this._view_composition.length - 1; i >= 0; i--) {\n const view = this._view_composition[i].view;\n const canvas_viewport = view.get_canvas_viewport();\n if (x > canvas_viewport.x &&\n y > canvas_viewport.y &&\n x < canvas_viewport.x + canvas_viewport.width &&\n y < canvas_viewport.y + canvas_viewport.height) {\n return view;\n }\n }\n return null;\n }\n create_view(width, height) {\n const view = new View(this, this._interaction_system, width, height, this._float_framebuffer_enabled ? VIEWER_DEFAULT_FLOAT_FRAMEBUFFER_TYPE : VIEWER_DEFAULT_COMPATIBILITY_FRAMEBUFFER_TYPE, 4);\n this._custom_views.push(view);\n // To mimic the old behaviour where composition was done default view first and then\n // custom_views in creation order. This will mimic that behaviour given that no z_index is changed.\n this._view_composition.push({ view: view, z_index: this._custom_views.length });\n return view;\n }\n has_default_view() {\n return this._default_view !== null;\n }\n get_default_view() {\n assert(this._default_view !== null, 'Default view is not created');\n return this._default_view;\n }\n delete_view(iview) {\n if (iview === null)\n return;\n if (iview === this._default_view) {\n console.warn(\"Can't delete default view. If you don't want it, use the optional feature: no_default_view when creating the Viewer.\");\n return;\n }\n const view = iview;\n const i = this._custom_views.indexOf(view);\n if (i >= 0) {\n this._custom_views.splice(i, 1);\n view.dispose();\n }\n else {\n console.warn('View not found in custom views.');\n }\n }\n get_view_composition_array() {\n return this._view_composition;\n }\n get_optional_features() {\n return this._optional_features;\n }\n get_config() {\n return this._config;\n }\n check_inside_viewport(client_x, client_y) {\n const rect = this.canvas_element.getBoundingClientRect();\n const default_view = this.get_default_view();\n const viewport = default_view.get_canvas_viewport();\n const client_scale_x = (rect.width / this.get_canvas_render_width());\n const client_scale_y = (rect.height / this.get_canvas_render_height());\n // Convert viewport to client space\n viewport.x = rect.x + viewport.x * client_scale_x;\n viewport.y = rect.y + viewport.y * client_scale_y;\n viewport.width *= client_scale_x;\n viewport.height *= client_scale_y;\n const inside_viewport_x = client_x >= viewport.x && client_x <= viewport.x + viewport.width;\n const inside_viewport_y = client_y >= viewport.y && client_y <= viewport.y + viewport.height;\n return inside_viewport_x && inside_viewport_y;\n }\n get_gpu_profiler() {\n if (this._gpu_profiler === null)\n return null;\n return this._gpu_profiler.profiler;\n }\n enable_gpu_profiler() {\n if (this._gpu_profiler !== null)\n return;\n if (GpuProfiler.is_supported(this.engine._gl)) {\n const profiler = new GpuProfiler(this.engine._gl, 32);\n this._gpu_profiler = {\n profiler: profiler,\n section_normal_frame: profiler.create_section('Normal frame'),\n section_composite_frame: profiler.create_section('Composite frame'),\n section_outlines: profiler.create_section('Outlines')\n };\n profiler.enable_visualizer(this, true);\n }\n else {\n console.warn(\"Viewer: Tried to enable GPU profiler, but it's not supported by this hardware and/or browser. As of writing, Chromium has best support, and phones lack support.\");\n }\n }\n disable_gpu_profiler() {\n if (this._gpu_profiler === null)\n return;\n this._gpu_profiler.profiler.dispose();\n this._gpu_profiler = null;\n }\n update(delta_time_seconds) {\n var _a;\n this.scene.incrementRenderId();\n this._delta_time_object.seconds = delta_time_seconds;\n this._delta_time_object.increase_total_time(this._delta_time_object.seconds);\n this._delta_time_object.increment_elapsed_frames();\n this.viewer_scene.update(this._delta_time_object);\n // Animate the scene, in case we're animating anything.\n // Previously this was done in scene.render(), but since we don't call that anymore for camera movements inside a view, we need to call it here.\n // We do this first, to allow any cameras to respond to anything animated in the scene.\n this.scene.animate();\n // Update cameras early so that update handlers and coroutines may depend on correct state\n (_a = this._default_view) === null || _a === void 0 ? void 0 : _a.update(this._delta_time_object);\n for (let i = 0; i < this._custom_views.length; i++) {\n this._custom_views[i].update(this._delta_time_object);\n }\n // This is a failsafe, in case someone has overwritten the activeCamera field in the scene without restoring it.\n // See declaration of these variables for explanation on what they're for.\n this.scene._activeCamera = this._null_babylon_camera;\n this.scene.customRenderTargets = [];\n if (this._default_view !== null) {\n // Copy over camera transforms to our \"null\" camera, as its the scene's active camera, meaning it's used for click/drag events.\n // This means we only get input for our default view though.\n // We could move to calculate click/drag/picking rays ourselves instead of relying on Babylon.\n // But maybe there's more internals using this that we need.\n this._null_babylon_camera.set_projection_matrix(this._default_view.engine_camera.camera.getProjectionMatrix(), CameraMode.PERSPECTIVE);\n this._null_babylon_camera.set_view_matrix(this._default_view.engine_camera.camera.getViewMatrix());\n }\n this._update_observable.notify(this, this._delta_time_object);\n // TODO: Run this before or after update?\n this._coroutine_manager.update(this._delta_time_object);\n // Notify observers on object changes\n if (this._updated_objects_this_frame.size > 0) {\n this._objects_changed_observable.notify(this, [...this._updated_objects_this_frame]);\n this._updated_objects_this_frame.forEach((object_id) => {\n const observable = this._object_changed_observables.get(object_id);\n if (observable !== undefined) {\n const state = this.get_object_transform(object_id);\n observable.notify(object_id, state);\n }\n });\n this._updated_objects_this_frame.clear();\n }\n this.update_bounds_cache();\n if (this._should_notify_world_bounds) {\n this._should_notify_world_bounds = false;\n this._scene_bounds_changed_observable.notify(this, this._scene_bounds);\n }\n const force_render = this._forced_render_frame_count > 0;\n this._forced_render_frame_count = Math.max(0, this._forced_render_frame_count - 1);\n // Forced render frames take precedent over paused rendering.\n if (force_render || !this.is_rendering_paused()) {\n this.render(force_render);\n }\n }\n /**\n * Prepares the data on the scene for render.\n * Should only be done if the scene was dirty.\n *\n * Does not clear the scene dirty.\n */\n prepare_scene_for_render() {\n // We use Babylon's onAfterWorldMatrixUpdateObservable, which usually gets fired when rendering your camera.\n // However, then we can get a one-frame lag of shadow maps, as the shadows might not have been dirtied by Babylon's observable.\n // So this fix makes sure world matrices are up-to-date and can dirty the light system before rendering shadow maps in the light system.\n this.viewer_scene.objects.forEach((object) => {\n if (object.has_render_layer(RENDER_LAYER_SHADOW)) {\n object.mesh_iterator(false, (mesh) => {\n mesh.computeWorldMatrix(false);\n });\n }\n });\n this.asset_manager.ui_meshes.forEach((gizmo) => {\n gizmo.prepare_for_rendering();\n });\n const light_system_was_dirty = this.light_system.is_dirty();\n // TODO: IC3V-536 Optimize shadows handling, move out of render block\n this.light_system.update();\n this._light_manager.experimental_soft_shadow_renderers.forEach((renderer) => {\n renderer.render();\n });\n // Update all focus borders only if we want to render\n for (const focus_border of this._object_focus_borders.values()) {\n focus_border.update();\n }\n // Make sure to rebuild UI lines before rendering.\n this.line_manager.rebuild_if_dirty();\n this._line_manager_on_top.rebuild_if_dirty();\n // Update the source mesh for all instances based on current state of scene object.\n this.viewer_scene.update_source_mesh_keys();\n // This is some setup needed to process something in Babylon, without it we get incorrect results with material switching when using our own render lists in Views.\n // First disable frustum culling, as we want to do this as lightly as possible.\n this.scene.skipFrustumClipping = true;\n // This function needs to be called for whatever reason, otherwise materials won't always apply/update.\n // Try commenting out and running test scene \"Transparency Sorting\" and press the assign materials button\n // @ts-ignore\n this.scene._evaluateActiveMeshes();\n // Calling incrementRenderId, because otherwise Babylon renders double instances for us due to the call above to _evaluateActiveMeshes\n this.scene.incrementRenderId();\n for (let i = 0; i < this.reflection_probes.length; i++) {\n this.reflection_probes[i].update(light_system_was_dirty);\n }\n }\n prepare_scene_for_setup() {\n // Fire this before checking scene dirty, to let it dirty the scene if needed\n this._before_render_scene_setup_observable.notify(this);\n // Update the source mesh for all instances based on current state of scene object.\n this.viewer_scene.update_source_mesh_keys();\n }\n render(force_render) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n this.prepare_scene_for_setup();\n (_a = this._gpu_profiler) === null || _a === void 0 ? void 0 : _a.profiler.start_frame(this._canvas_render_width, this._canvas_render_height);\n (_b = this._gpu_profiler) === null || _b === void 0 ? void 0 : _b.section_normal_frame.start();\n const scene_was_dirty = force_render ||\n this._scene_dirty ||\n this.animation_system.animations_running() ||\n this.light_system.is_dirty() ||\n !this.only_render_on_demand;\n this._scene_dirty = false;\n (_c = this._gpu_profiler) === null || _c === void 0 ? void 0 : _c.profiler.start_frame(this._canvas_render_width, this._canvas_render_height);\n (_d = this._gpu_profiler) === null || _d === void 0 ? void 0 : _d.section_normal_frame.start();\n if (scene_was_dirty) {\n this.prepare_scene_for_render();\n }\n if (scene_was_dirty) {\n // Need to set dirty in case the scene was dirty (for accumulator)\n (_e = this._default_view) === null || _e === void 0 ? void 0 : _e.set_view_dirty();\n (_f = this._default_view) === null || _f === void 0 ? void 0 : _f.postprocess_manager.on_scene_dirty();\n for (let i = 0; i < this._custom_views.length; i++) {\n this._custom_views[i].set_view_dirty();\n this._custom_views[i].postprocess_manager.on_scene_dirty();\n }\n }\n if (this.xr === null) {\n let require_composite = scene_was_dirty || this.outline_layer.get_outlines_are_dirty();\n if ((_g = this._default_view) === null || _g === void 0 ? void 0 : _g.is_dirty()) {\n (_h = this._webgl_memory_tracker) === null || _h === void 0 ? void 0 : _h.new_frame();\n // Update all focus borders only if we want to render default view, as they only work in the default for now.\n for (const focus_border of this._object_focus_borders.values()) {\n focus_border.update();\n }\n this._default_view.render();\n require_composite = true;\n }\n for (let i = 0; i < this._custom_views.length; i++) {\n if (this._custom_views[i].is_dirty()) {\n this._custom_views[i].render();\n require_composite = true;\n }\n }\n if (require_composite) {\n this._compositing_frames_remaining = FRAMES_TO_COMPOSITE;\n }\n if (this._compositing_frames_remaining > 0) {\n (_j = this._gpu_profiler) === null || _j === void 0 ? void 0 : _j.section_composite_frame.start();\n this.engine.restoreDefaultFramebuffer();\n this.engine.setViewport({\n x: 0,\n y: 0,\n width: 1.0,\n height: 1.0\n }, this.get_canvas_render_width(), this.get_canvas_render_height());\n if (this._backbuffer_clear_dirty) {\n this.engine.clear({\n r: this._background_color.r,\n g: this._background_color.g,\n b: this._background_color.b,\n a: 1.0\n }, true, false, false);\n }\n this.sort_view_composition();\n for (let i = 0; i < this._view_composition.length; i++) {\n this._view_compositor.render(this._view_composition[i].view, this.outline_layer);\n }\n this._compositing_frames_remaining--;\n if (this._compositing_frames_remaining === 0) {\n this._backbuffer_clear_dirty = false;\n }\n this.outline_layer.clear_outlines_dirty();\n this._last_frame_was_composited = true;\n (_k = this._gpu_profiler) === null || _k === void 0 ? void 0 : _k.section_composite_frame.stop();\n }\n else {\n this._last_frame_was_composited = false;\n }\n (_l = this._gpu_profiler) === null || _l === void 0 ? void 0 : _l.section_normal_frame.stop();\n (_m = this._gpu_profiler) === null || _m === void 0 ? void 0 : _m.profiler.end_frame();\n }\n }\n sort_view_composition() {\n this._view_composition.sort((a, b) => {\n return a.z_index > b.z_index ? 1 : a.z_index === b.z_index ? 0 : -1;\n });\n }\n dispose() {\n var _a, _b, _c, _d;\n // Early out in case we've already been disposed\n if (this._has_been_disposed)\n return;\n this._has_been_disposed = true;\n (_a = this._debug_layer) === null || _a === void 0 ? void 0 : _a.dispose();\n this._debug_layer = null;\n window['viewer_debug_layer'] = null;\n BetraktaGLTFLoaderExtension.unregister_extension();\n (_b = this.lut_effect) === null || _b === void 0 ? void 0 : _b.dispose();\n this._viewer_dispose_observable.notify(this);\n this._engine.stopRenderLoop();\n this._light_manager.experimental_soft_shadow_renderers.forEach((renderer) => {\n renderer.dispose();\n });\n this._light_manager.experimental_soft_shadow_renderers.clear();\n (_c = this._gpu_profiler) === null || _c === void 0 ? void 0 : _c.profiler.dispose();\n (_d = this._default_view) === null || _d === void 0 ? void 0 : _d.dispose();\n for (let i = 0; i < this._custom_views.length; i++) {\n this._custom_views[i].dispose();\n }\n this._custom_views = [];\n this.viewer_scene.object_changed_observable.remove(this._object_changed_observer);\n this.viewer_scene.object_removed_observable.remove(this._object_removed_observer);\n this.asset_manager.dispose();\n this.light_manager.dispose();\n this._scene_bounds_changed_observable.dispose();\n this._objects_changed_observable.dispose();\n this._update_observable.dispose();\n this._default_view_before_render_observable.dispose();\n this._default_view_after_render_observable.dispose();\n this._default_view_camera_updated_observable.dispose();\n this._before_render_scene_setup_observable.dispose();\n this._click_void_observable.dispose();\n this._secondary_click_void_observable.dispose();\n this._viewer_resize_observable.dispose();\n this._viewer_dispose_observable.dispose();\n this.interactable_disposed_observable.dispose();\n this.viewer_scene.dispose();\n // Sometimes scene.dispose() gets stuck in an infinite loop when disposing transformNodes\n // This seems similar to what was posted about here: https://forum.babylonjs.com/t/scene-dispose-hangs/14178\n // We apply the same workaround here.\n let i = 0;\n while (i < this.scene.transformNodes.length) {\n const transform_node = this.scene.transformNodes[i];\n if (!transform_node.isDisposed()) {\n transform_node.dispose(true);\n }\n else {\n i++;\n }\n }\n this.scene.transformNodes = [];\n this.scene.dispose();\n this._dom_event_listeners.forEach((dom_event_listener) => {\n this.canvas_element.removeEventListener(dom_event_listener[0], dom_event_listener[1]);\n });\n this._engine.dispose();\n Logger.dispose();\n this._exception_handler.dispose();\n Viewer._viewer_instances_running--;\n }\n get_shadows_render_layer_mask() {\n return this._shadowmap_render_layer_mask;\n }\n set_shadows_render_layer_mask(mask) {\n const effective_mask = mask === null ? RENDER_LAYER_MASK_ALL : mask;\n if (effective_mask.bitmap === this._shadowmap_render_layer_mask.bitmap)\n return;\n this._shadowmap_render_layer_mask = { bitmap: effective_mask.bitmap };\n this.light_system.mark_all_shadowmaps_dirty();\n }\n get_hardware_limits() {\n return get_hardware_limits(this);\n }\n ao_supported() {\n return Framebuffer.is_depth_renderer_supported(this._engine) && Framebuffer.is_float_framebuffer_supported(this._engine);\n }\n set_temporal_ao_parameters(ao_settings) {\n assert(this._default_view !== null, 'Default view is not created');\n this._default_view.postprocess_manager.set_temporal_ao_parameters(ao_settings);\n }\n set_temporal_accumulation_frame_count(frame_count) {\n assert(this._default_view !== null, 'Default view is not created');\n this._default_view.postprocess_manager.set_temporal_accumulation_frame_count(frame_count);\n }\n enable_temporal_effects(use_ambient_occlusion = true) {\n assert(this._default_view !== null, 'Default view is not created');\n this._default_view.postprocess_manager.enable_temporal_effects(use_ambient_occlusion);\n }\n disable_temporal_effects() {\n assert(this._default_view !== null, 'Default view is not created');\n this._default_view.postprocess_manager.disable_temporal_effects();\n }\n get_canvas_render_width() {\n return this._canvas_render_width;\n }\n get_canvas_render_height() {\n return this._canvas_render_height;\n }\n unload_models(url) {\n let urls_to_check;\n if (typeof url === 'string') {\n urls_to_check = [];\n urls_to_check.push(url);\n }\n else {\n urls_to_check = url;\n }\n for (let i = 0; i < urls_to_check.length; i++) {\n const url = urls_to_check[i];\n this.viewer_scene.unload_model(url);\n }\n }\n get_world_position(object_id, offset) {\n const object = this.viewer_scene.objects.get(object_id);\n return object.transform_offset_with_world_matrix(offset);\n }\n get_world_direction_from_local_direction(object_id, local_direction) {\n const object = this.viewer_scene.objects.get(object_id);\n return object.transform_direction_with_world_matrix(local_direction);\n }\n set_alpha_sorting_index(object_id, alpha_index) {\n const object = this.viewer_scene.objects.get(object_id);\n object.alpha_index = alpha_index;\n this.mark_scene_dirty();\n }\n get_alpha_sorting_index(object_id) {\n const object = this.viewer_scene.objects.get(object_id);\n return object.alpha_index;\n }\n load_model(url, extension, model_transform) {\n const object = this.viewer_scene.load_model(url, extension, model_transform);\n return object.id;\n }\n load_model_async(url, extension, model_transform) {\n const object = this.viewer_scene.load_model(url, extension, model_transform);\n return object.ready.then(() => { return object.id; });\n }\n show_wireframe(object_id, enable) {\n const object = this.viewer_scene.objects.get(object_id);\n object.mesh_iterator(true, mesh => {\n if (mesh.material) {\n mesh.material.wireframe = enable;\n }\n });\n this.mark_scene_dirty();\n }\n persistent_load_models(url, extension, progress_callback) {\n if (progress_callback !== undefined) {\n console.warn(\"Deprecated parameter 'progress_callback' given to Viewer.persistent_load_models. This will have no effect\");\n }\n const promises = [];\n if (typeof url === 'string') {\n promises.push(this.viewer_scene.preload_model_and_mark_persistent(url, extension));\n }\n else {\n url.forEach((single_url) => {\n promises.push(this.viewer_scene.preload_model_and_mark_persistent(single_url, extension));\n });\n }\n return Promise.allSettled(promises).then(() => { });\n }\n is_persistent_url(url) {\n return this.viewer_scene.has_persistent_marking(url, undefined);\n }\n remove_persistent_url(url) {\n if (typeof url === 'string') {\n url = [url];\n }\n for (const file_path of url) {\n this.viewer_scene.remove_persistent_marking(file_path);\n }\n }\n load_material(url, extension) {\n if (this._loaded_material_map.has(url)) {\n return this._loaded_material_map.get(url);\n }\n const id = this.asset_manager.add_material();\n this._loaded_material_map.set(url, id);\n const destination = this.asset_manager.materials.get(id);\n destination._material_url = url;\n destination.ready = new Promise((resolve, reject) => {\n this.viewer_scene.preload_model_and_mark_persistent(url, extension).then((asset) => {\n if (asset.asset_container === null) {\n reject(new Error('Failed to load any asset for material.'));\n return;\n }\n const asset_materials = asset.asset_container.get_container_materials();\n if (asset_materials.length !== 0) {\n const source_material = asset_materials[0];\n const destination = this.asset_manager.materials.get(id);\n if (destination === undefined) {\n reject(new Error('Destination for material load was deleted.'));\n return;\n }\n destination.material = source_material.clone('');\n resolve();\n }\n else {\n reject(new Error('Asset had no materials.'));\n }\n }).catch(reject);\n });\n return id;\n }\n object_ready(object_id) {\n return this.viewer_scene.objects.get(object_id).ready;\n }\n material_ready(material_id) {\n return this.asset_manager.materials.get(material_id).ready;\n }\n get_all_objects() {\n return this.viewer_scene.objects.ids();\n }\n get_all_objects_from_mask(mask) {\n return this.get_scene_objects_by_layer_mask(mask).map(obj => obj.id);\n }\n get_all_materials() {\n return this.asset_manager.materials.ids();\n }\n object_exists(object_id) {\n return this.viewer_scene.objects.contains(object_id);\n }\n material_exists(material_id) {\n return this.asset_manager.materials.contains(material_id);\n }\n ui_line_exists(line_id) {\n return this.line_manager.contains(line_id) || this._line_manager_on_top.contains(line_id);\n }\n recursive_object_iterator(object, f) {\n this.iterate_objects(object, true, (scene_object) => {\n f(scene_object.id);\n });\n }\n load_texture(url) {\n const t = new BABYLON_Texture(url, this.scene, false, false);\n t.onLoadObservable.addOnce(() => { this.mark_scene_dirty(); }); // When texture is loaded, mark frame as dirty.\n // TODO: Mark frame as dirty only if the texture is in use.\n return this.asset_manager.add_texture(t);\n }\n create_box(width, height, depth, material_id) {\n return this.mesh_manager.create_box(width, height, depth, material_id);\n }\n create_sphere(segments, diameter, material_id) {\n return this.mesh_manager.create_sphere(segments, diameter, material_id);\n }\n create_light_mesh(dimensions = { x: 1, y: 1, z: 1 }, cutoff = 0.5, flip_cutoff = true, segments = 8, material_id) {\n const object_id = this.mesh_manager.create_ellipsoid(segments, dimensions.x, dimensions.y, dimensions.z, cutoff, material_id);\n // Material needs to be set for the object to have a material id.\n const _material_id = (material_id === undefined) ? this.create_material() : material_id;\n this.set_material(object_id, _material_id);\n if (flip_cutoff) {\n // Since we slice (cutoff) the mesh, we want to make it face downwards rotating the mesh's transform node,\n // as opposed to the root node if the scene object.\n const object = this.viewer_scene.objects.get(object_id);\n object.mesh_iterator(false, (mesh) => {\n // We count on there only being one mesh. After all, we just created it.\n mesh.rotationQuaternion = BABYLON_Quaternion.FromLookDirectionRH(BABYLON_Vector3.RightHandedForwardReadOnly, BABYLON_Vector3.DownReadOnly);\n });\n }\n return object_id;\n }\n create_plane(width, height, uv0, uv1, material_id) {\n return this.mesh_manager.create_plane(width, height, uv0, uv1, material_id);\n }\n create_custom_mesh(description, material = null) {\n return this.mesh_manager.create_custom_mesh(description, material).id;\n }\n create_custom_lines(description) {\n return this.mesh_manager.create_custom_lines(description);\n }\n update_custom_lines(object, description) {\n this.mesh_manager.update_custom_lines(object, description);\n }\n get_all_custom_lines() {\n return [...this.asset_manager.lines];\n }\n remove_custom_lines(object) {\n object.dispose();\n }\n stop_and_remove_all_coroutines() {\n this._coroutine_manager.stop_and_remove_all_coroutines();\n }\n create_material(name) {\n return this.asset_manager.create_material(name);\n }\n get_material_from_material_id(material_id) {\n if (!this._optional_features.feature_gate_material_objects)\n throw Error('feature_gate_material_objects is not enabled');\n const material_wrapper = this.asset_manager.get_or_create_material_wrapper(this.asset_manager.materials.get(material_id).material);\n return material_wrapper;\n }\n get_scene_object_from_object_id(object_id) {\n return this.viewer_scene.objects.get(object_id);\n }\n create_empty_object() {\n return this.viewer_scene.create_object(null, 'empty', null).id;\n }\n create_text() {\n return new TextField(this, 100, 20);\n }\n create_reflection_probe() {\n const probe = new ReflectionProbe(64, this);\n return probe;\n }\n get_material(id) {\n const object = this.viewer_scene.objects.get(id);\n const material = object.get_material();\n return material === null ? -1 : material;\n }\n get_roughness(id) { return this.asset_manager.materials.get(id).roughness; }\n set_roughness(id, roughness) {\n this.asset_manager.materials.get(id).roughness = roughness;\n this.mark_scene_dirty();\n }\n get_metallic(id) { return this.asset_manager.materials.get(id).metallic; }\n set_metallic(id, metallic) {\n this.asset_manager.materials.get(id).metallic = metallic;\n this.mark_scene_dirty();\n }\n get_base_color(id) { return this.asset_manager.materials.get(id).base_color; }\n set_base_color(id, color) {\n if (this.get_config().verbose_warnings && !IColor.is_saturated(color)) {\n console.warn('Setting color with one or more channel not in range 0-1, this is generally a bad idea');\n }\n this.asset_manager.materials.get(id).base_color = color;\n this.mark_scene_dirty();\n }\n set_emissive_color(id, color, intensity) {\n if (intensity !== undefined) {\n const GAMMA = 2.2;\n this.asset_manager.materials.get(id).emissive_color = {\n r: Math.pow(Math.pow(color.r, GAMMA) * intensity, 1.0 / GAMMA),\n g: Math.pow(Math.pow(color.g, GAMMA) * intensity, 1.0 / GAMMA),\n b: Math.pow(Math.pow(color.b, GAMMA) * intensity, 1.0 / GAMMA)\n };\n }\n else {\n this.asset_manager.materials.get(id).emissive_color = color;\n }\n this.mark_scene_dirty();\n }\n get_emissive_color(id) {\n return this.asset_manager.materials.get(id).emissive_color;\n }\n set_opacity(id, alpha) {\n const material_handle = this.asset_manager.materials.get(id);\n if (!material_handle) {\n throw new Error('Tried to set opacity of unknown material');\n }\n material_handle.ready.then(() => {\n material_handle.set_opacity(alpha);\n this.freezing_manager.set_material_dirty(material_handle.material);\n this.mark_scene_dirty();\n }, () => {\n console.warn('Material handle is not ready to set opacity.');\n });\n }\n get_base_color_texture(id) {\n return this.asset_manager.materials.get(id).base_color_texture;\n }\n set_base_color_texture(id, texture_id) {\n this.asset_manager.materials.get(id).base_color_texture = texture_id;\n this.mark_scene_dirty();\n }\n get_normal_texture(id) {\n return this.asset_manager.materials.get(id).normal_texture;\n }\n set_normal_texture(id, texture_id) {\n this.asset_manager.materials.get(id).normal_texture = texture_id;\n this.mark_scene_dirty();\n }\n get_occlusion_roughness_metallic_texture(id) {\n return this.asset_manager.materials.get(id).occlusion_roughness_metallic_texture;\n }\n set_occlusion_roughness_metallic_texture(id, texture_id) {\n this.asset_manager.materials.get(id).occlusion_roughness_metallic_texture = texture_id;\n this.mark_scene_dirty();\n }\n get_lightmap_texture(id) {\n return this.asset_manager.materials.get(id).lightmap_texture;\n }\n set_lightmap_texture(id, texture_id) {\n this.asset_manager.materials.get(id).lightmap_texture = texture_id;\n this.mark_scene_dirty();\n }\n get_unlit(material_id) {\n const babylon_material = this.asset_manager.materials.get(material_id);\n return babylon_material.unlit;\n }\n set_unlit(material_id, unlit) {\n const babylon_material = this.asset_manager.materials.get(material_id);\n babylon_material.unlit = unlit;\n }\n set_material(object_id, material_id) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.viewer_scene.objects.contains(object_id)) {\n return Promise.reject(new Error('Object does not exist'));\n }\n const object = this.viewer_scene.objects.get(object_id);\n const promise_material = object.set_material(material_id);\n if (object._asset_instance !== null) {\n yield Promise.all([promise_material, object.ready]);\n }\n else {\n return Promise.resolve();\n }\n });\n }\n delete_texture(id) {\n if (!this.asset_manager.textures.contains(id)) {\n console.warn(`Not able to remove texture with id: ${id}. The texture ID provided does not exist.`);\n return false;\n }\n const texture = this.asset_manager.textures.get(id);\n texture.dispose();\n return this.asset_manager.textures.remove(id);\n }\n is_material_used(id) {\n return this.asset_manager.is_material_used(id);\n }\n delete_material(material_id) {\n return this.asset_manager.delete_material(material_id);\n }\n on_object_removed(object) {\n this.remove_object_clip_plane(object.id);\n // If the object being disposed is currently picked and it has a parent with the same drag event, continue with the drag event as if it was the parent being dragged all along\n if (object === this._picked_object) {\n if (object.parent && object.parent.drag_interactable) {\n this._picked_object = object.parent;\n }\n }\n this.mark_world_bounds_dirty();\n }\n delete_object(object_id, delete_children = false) {\n if (!this.viewer_scene.objects.contains(object_id)) {\n console.warn(`Not able to remove scene object with id: ${object_id}. The object ID provided does not exist.`);\n return false;\n }\n const object = this.viewer_scene.objects.get(object_id);\n this.viewer_scene.delete_object(object, delete_children);\n return true;\n }\n // TODO: (partly) move implementation somewhere else? AssetManager?\n clone_object(object_id) {\n var _a, _b;\n const old_object = this.viewer_scene.objects.get(object_id);\n // The SceneAssetInstance.clone function will clone the model transform, so we make sure to send null as our own model transform\n const model_transform = null;\n const new_object = this.viewer_scene.create_object((_b = (_a = old_object._asset_instance) === null || _a === void 0 ? void 0 : _a.clone()) !== null && _b !== void 0 ? _b : null, 'clone of ' + old_object.name, model_transform);\n const mesh_url = old_object._mesh_url;\n new_object.ready = old_object.ready.then();\n new_object._mesh_url = mesh_url;\n new_object.set_position(old_object.position.x, old_object.position.y, old_object.position.z);\n new_object.set_rotation(old_object.rotation.x, old_object.rotation.y, old_object.rotation.z);\n new_object.set_scale(old_object.scale.x, old_object.scale.y, old_object.scale.z);\n new_object.visible = old_object.visible;\n new_object.receive_shadow = old_object.receive_shadow;\n new_object.enabled = old_object.enabled;\n new_object.outline_color = Object.assign({}, old_object.outline_color);\n new_object.outline_width = old_object.outline_width;\n new_object.set_outline_enabled(old_object.is_outline_enabled());\n new_object.set_outline_block_enabled(old_object.is_outline_block_enabled());\n new_object.set_render_layer_mask(old_object.get_render_layer_mask());\n return new_object.id;\n }\n replace_object(old_object_id, new_object_id, delete_old_object) {\n const old_object = this.viewer_scene.objects.get(old_object_id);\n const new_object = this.viewer_scene.objects.get(new_object_id);\n new_object.replace(old_object);\n if (delete_old_object) {\n this.delete_object(old_object_id, false); // After a replace it has no children anyway\n }\n this.mark_scene_dirty();\n }\n create_debug_layer() {\n if (this._debug_layer)\n return;\n const layer = new DebugLayer(this, this.canvas_element);\n layer.tools.add_description(LIGHT_DESCRIPTION);\n layer.tools.add_description(OBJECT_DESCRIPTION);\n layer.tools.add_description(CAMERA_DESCRIPTION);\n layer.tools.add_description(CAMERA_MANAGER_DESCRIPTION);\n this._debug_layer = layer;\n layer.show();\n window['viewer_debug_layer'] = layer;\n layer.tools.custom_module('Light System', [\n {\n tag: 'Light System',\n setup: (tab) => {\n tab.label('Light System');\n tab.custom.watch('number', { name: 'Lights Count', get: () => this.light_manager.light_system.get_all_lights().length });\n const add_light_container = tab.container('Add a new light', { is_collapsed: true });\n let light_type = LightType.POINT_LIGHT;\n const light_position = new IVector3(0, 1, 0);\n add_light_container.custom.watch('vector3', { name: 'position', get: () => light_position, set: (v) => IVector3.copy_to_ref(v, light_position), is_collapsed: true });\n add_light_container.custom.select('type', Object.values(LightType), { get: () => light_type, set: (v) => { light_type = v; } });\n add_light_container.button('Create light', {\n on_click: () => {\n if (this.can_create_light()) {\n this.create_light(light_type, light_position);\n }\n else {\n console.error('Not able to create a new light, light limit reached!');\n }\n }\n });\n tab.label('Ambient Light');\n const ambient_light = this.light_manager.ambient_light;\n tab.custom.watch('checkbox', { name: 'enabled', get: () => ambient_light.is_enabled(), set: (v) => ambient_light.set_enabled(v) });\n if (ambient_light.is_enabled()) {\n tab.setter(ambient_light, 'set_intensity', 1, { is_collapsed: true });\n tab.setter(ambient_light, 'set_color', new IColor(1, 1, 1), { is_collapsed: true });\n tab.setter(ambient_light, 'set_ground_color', new IColor(1, 1, 1), { is_collapsed: true });\n }\n if (this.light_manager.environment.get_environment_map()) {\n tab.label('Environment Map');\n tab.custom.watch('number', {\n name: 'intensity',\n get: () => this.light_manager.environment.get_environment_map_intensity(),\n set: (v) => this.light_manager.environment.set_environment_map_intensity(v)\n });\n tab.custom.watch('number', {\n name: 'rotation',\n get: () => this.light_manager.environment.get_environment_map_rotation(),\n set: (v) => this.light_manager.environment.set_environment_map_rotation(v)\n });\n }\n },\n dependencies: () => {\n return [\n () => this.light_manager.ambient_light.is_enabled(),\n () => this.light_manager.environment.get_environment_map()\n ];\n }\n }\n ]);\n }\n create_cutout_object(source) {\n return new CutoutObject(this, this.viewer_scene.objects.get(source));\n }\n create_cutout_shape(vertices, basis_x, basis_y) {\n return new CutoutShape(vertices, basis_x, basis_y);\n }\n set_position(object_id, x, y, z) {\n const object = this.viewer_scene.objects.get(object_id);\n object.set_position(x, y, z);\n }\n get_position(object_id) {\n return this.viewer_scene.objects.get(object_id).get_position().clone();\n }\n set_rotation(object_id, x, y, z) {\n const object = this.viewer_scene.objects.get(object_id);\n object.set_rotation(x, y, z);\n }\n get_rotation(object_id) {\n return this.viewer_scene.objects.get(object_id).get_rotation().clone();\n }\n set_scale(object_id, x, y, z) {\n const object = this.viewer_scene.objects.get(object_id);\n object.set_scale(x, y, z);\n }\n get_scale(object_id) {\n return this.viewer_scene.objects.get(object_id).get_scale().clone();\n }\n set_object_name(object_id, name) {\n const object = this.viewer_scene.objects.get(object_id);\n object.name = name;\n }\n get_object_name(object_id) {\n return this.viewer_scene.objects.get(object_id).name;\n }\n get_scene_bounds_changed_observable() {\n return this._scene_bounds_changed_observable;\n }\n get_object_transform_changed_observable(object_id) {\n if (!this._object_changed_observables.has(object_id)) {\n this._object_changed_observables.set(object_id, new Observable());\n }\n return this._object_changed_observables.get(object_id);\n }\n get_object_transform(object_id) {\n const object = this.viewer_scene.objects.get(object_id);\n const state = {\n world_transform: object.get_world_matrix().toIMatrix4ToRef(new IMatrix4()),\n local_transform: object.get_local_matrix().toIMatrix4ToRef(new IMatrix4())\n };\n return state;\n }\n get_objects_changed_observable() {\n return this._objects_changed_observable;\n }\n get_object_deleted_observable() {\n return this._object_deleted_observable;\n }\n get_specific_object_deleted_observable(object_id) {\n return this.viewer_scene.objects.get(object_id).disposed_observable;\n }\n get_update_observable() {\n return this._update_observable;\n }\n get_before_render_observable() {\n return this._default_view_before_render_observable;\n }\n get_after_render_observable() {\n return this._default_view_after_render_observable;\n }\n get_before_render_scene_setup_observable() {\n return this._before_render_scene_setup_observable;\n }\n get_object_drag_begin_observable(id) {\n return this.viewer_scene.objects.get(id).drag_begin_observable;\n }\n get_object_drag_observable(id) {\n return this.viewer_scene.objects.get(id).drag_observable;\n }\n get_object_drag_end_observable(id) {\n return this.viewer_scene.objects.get(id).drag_end_observable;\n }\n get_object_click_observable(id) {\n return this.viewer_scene.objects.get(id).click_observable;\n }\n get_object_secondary_click_observable(id) {\n return this.viewer_scene.objects.get(id).secondary_click_observable;\n }\n get_click_void_observable() {\n return this._click_void_observable;\n }\n get_secondary_click_void_observable() {\n return this._secondary_click_void_observable;\n }\n get_object_pointer_enter_observable(id) {\n return this.viewer_scene.objects.get(id).pointer_enter_observable;\n }\n get_object_pointer_leave_observable(id) {\n return this.viewer_scene.objects.get(id).pointer_leave_observable;\n }\n set_enable_on_drag(id, enable, propagate_to_children) {\n this.iterate_objects(id, propagate_to_children, (object) => {\n object.on_drag_enable = enable;\n });\n }\n get_enable_on_drag(object_id) {\n return this.viewer_scene.objects.get(object_id).on_drag_enable;\n }\n set_parent(child_id, parent_id) {\n const child = this.viewer_scene.objects.get(child_id);\n if (child.parent_id === parent_id)\n return;\n // Check for null and pass null if we want to unparent.\n const parent = parent_id !== null ? this.viewer_scene.objects.get(parent_id) : null;\n child.set_parent(parent);\n this.mark_scene_dirty();\n }\n get_parent(id) {\n const o = this.viewer_scene.objects.get(id);\n return o.parent_id;\n }\n get_children(id, direct_descendants_only = false, include_self = false) {\n const result = [];\n const start_object = this.viewer_scene.objects.get(id);\n if (direct_descendants_only) {\n if (include_self)\n result.push(id);\n start_object.children_direct_descendants_iterator((object) => { result.push(object.id); });\n }\n else {\n // All children recursive, include self only if requested\n start_object.children_iterator(true, include_self, (object) => { result.push(object.id); });\n }\n return result;\n }\n iterate_objects(id, recurse, func) {\n // We needed to make func optional since recurse was optional and we want to function as the last parameter\n if (!func)\n return;\n // If recurse is undefined it will not recurse (since it will be false)\n const start_object = this.viewer_scene.objects.get(id);\n start_object.children_iterator(!!recurse, true, (object) => { func(object); });\n }\n set_outline(id, enabled, propagate_to_children) {\n this.viewer_scene.objects.get(id).set_outline_enabled(enabled, propagate_to_children);\n }\n get_outline(id) {\n return this.viewer_scene.objects.get(id).is_outline_enabled();\n }\n set_outline_block(id, enabled, propagate_to_children) {\n this.viewer_scene.objects.get(id).set_outline_block_enabled(enabled, propagate_to_children);\n }\n get_outline_block(id) {\n return this.viewer_scene.objects.get(id).is_outline_block_enabled();\n }\n set_global_outline_color(color) {\n let babylon_color;\n if (color) {\n babylon_color = new BABYLON_Color4(color.r, color.g, color.b, IColor4.is(color) ? color.a : 1); // Set alpha to 1 if not IColor4\n }\n else {\n // undefined or null color means it will be reset to default color\n }\n if (this.get_config().verbose_warnings && babylon_color !== undefined && !IColor4.is_saturated(babylon_color)) {\n console.warn('Setting color with one or more channel not in range 0-1, this is generally a bad idea');\n }\n this.outline_layer.set_global_outline_color(babylon_color);\n }\n set_global_outline_width(width) {\n this.outline_layer.set_global_outline_width(width);\n }\n set_object_outline_color(id, color) {\n let outline_color = null;\n if (color !== null) {\n outline_color = IColor4.is(color) ? color : { r: color.r, g: color.g, b: color.b, a: 1 };\n }\n else {\n // A null color means we reset to default color\n }\n if (this.get_config().verbose_warnings && outline_color !== null && !IColor4.is_saturated(outline_color)) {\n console.warn('Setting color with one or more channel not in range 0-1, this is generally a bad idea');\n }\n this.viewer_scene.objects.get(id).outline_color = outline_color;\n }\n get_object_outline_color(id) {\n return this.viewer_scene.objects.get(id).outline_color;\n }\n set_object_outline_width(id, width) {\n this.viewer_scene.objects.get(id).outline_width = width;\n }\n get_object_outline_width(id) {\n return this.viewer_scene.objects.get(id).outline_width;\n }\n set_visible(id, visible, propagate_to_children) {\n // Separate code paths depending on if we need to iterate or just work on one object\n if (!propagate_to_children) {\n const object = this.viewer_scene.objects.get(id);\n if (object.visible !== visible) {\n // Only update and mark dirty in case we actually change anything\n object.visible = visible;\n this.mark_scene_dirty();\n }\n }\n else {\n let visibility_changed = false;\n this.iterate_objects(id, propagate_to_children, (object) => {\n if (object.visible !== visible) {\n object.visible = visible;\n visibility_changed = true;\n }\n });\n if (visibility_changed) {\n // Only update and mark dirty in case we actually change anything\n this.mark_scene_dirty();\n }\n }\n }\n get_visible(object_id) {\n return this.viewer_scene.objects.get(object_id).visible;\n }\n add_to_layer(object_id, layer, add_to_children) {\n if (add_to_children) {\n this.iterate_objects(object_id, true, (object) => {\n object.add_render_layer(layer);\n });\n }\n else {\n this.viewer_scene.objects.get(object_id).add_render_layer(layer);\n }\n }\n remove_from_layer(object_id, layer, remove_from_children) {\n if (remove_from_children) {\n this.iterate_objects(object_id, true, (object) => {\n object.remove_render_layer(layer);\n });\n }\n else {\n this.viewer_scene.objects.get(object_id).remove_render_layer(layer);\n }\n }\n is_part_of_layer(object_id, layer) {\n return this.viewer_scene.objects.get(object_id).has_render_layer(layer);\n }\n create_render_layer(allocation) {\n if (!this._layer_allocation_map.has(allocation)) {\n console.error('Invalid layer allocation');\n return null;\n }\n const available_bits = this._layer_allocation_map.get(allocation);\n if (available_bits.length === 0) {\n console.error(\"Layer allocation is used up, can't create a new layer.\");\n return null;\n }\n const layer = {\n bit: available_bits.pop()\n };\n return layer;\n }\n set_focus_border(id, focus) {\n if (focus) {\n if (this._object_focus_borders.has(id))\n return;\n this._object_focus_borders.set(id, new FocusBorder(this.viewer_scene.objects.get(id), this));\n }\n else {\n // Remove focus border\n const focus_border = this._object_focus_borders.get(id);\n if (focus_border) {\n focus_border.dispose();\n }\n this._object_focus_borders.delete(id);\n }\n }\n get_focus_border(id) {\n return this._object_focus_borders.has(id);\n }\n set_enabled(id, enabled) {\n this.viewer_scene.objects.get(id).enabled = enabled;\n this.mark_scene_dirty();\n }\n get_enabled(object_id) {\n return this.viewer_scene.objects.get(object_id).enabled;\n }\n set_enable_on_click(id, enable, propagate_to_children) {\n this.iterate_objects(id, propagate_to_children, (object) => {\n object.on_click_enable = enable;\n });\n }\n get_enable_on_click(object_id) {\n return this.viewer_scene.objects.get(object_id).on_click_enable;\n }\n get_active_camera() {\n assert(this._default_view !== null, 'Default view is not created');\n return this._default_view.camera_manager.active_camera;\n }\n push_camera(viewer_camera, transition = CameraTransitionPreset.NONE) {\n assert(this._default_view !== null, 'Default view is not created');\n if (transition === CameraTransitionPreset.NONE) {\n this._default_view.camera_manager.push_camera_immediate(viewer_camera);\n }\n else {\n this._default_view.camera_manager.push_camera(viewer_camera, TRANSITION_PRESETS[transition]);\n }\n }\n pop_camera(transition = CameraTransitionPreset.NONE) {\n assert(this._default_view !== null, 'Default view is not created');\n if (transition === CameraTransitionPreset.NONE) {\n this._default_view.camera_manager.pop_camera_immediate();\n }\n else {\n this._default_view.camera_manager.pop_camera(TRANSITION_PRESETS[transition]);\n }\n }\n replace_camera(viewer_camera, transition = CameraTransitionPreset.NONE) {\n assert(this._default_view !== null, 'Default view is not created');\n if (transition === CameraTransitionPreset.NONE) {\n this._default_view.camera_manager.replace_camera_immediate(viewer_camera);\n }\n else {\n this._default_view.camera_manager.replace_camera(viewer_camera, TRANSITION_PRESETS[transition]);\n }\n }\n get_camera_transition_begin_observable() {\n return this._default_view_camera_transition_begin_observable;\n }\n get_camera_transition_end_observable() {\n return this._default_view_camera_transition_end_observable;\n }\n set_camera_input_enabled(value) {\n assert(this._default_view !== null, 'Default view is not created');\n this._default_view.input_manager.camera_input_enabled = value;\n }\n get_camera_input_enabled() {\n assert(this._default_view !== null, 'Default view is not created');\n return this._default_view.input_manager.camera_input_enabled;\n }\n get_active_camera_changed_observable() {\n return this._default_view_active_camera_changed_observable;\n }\n get_camera_updated_observable() {\n return this._default_view_camera_updated_observable;\n }\n get_camera_state() {\n assert(this._default_view !== null, 'Default view is not created');\n return this._default_view.engine_camera;\n }\n // -------- Lights --------\n create_light(type, ...args) {\n return this._light_manager.create_light(type, ...args);\n }\n can_create_light() {\n return this._light_manager.can_create_light();\n }\n delete_light(light) {\n return this._light_manager.delete_light(light);\n }\n get_all_lights() {\n return this._light_manager.light_system.get_all_lights();\n }\n clear_lights() {\n this._light_manager.remove_all_lights();\n }\n debug_light_visualizer_color_mode(mode) {\n this.light_system.debug_color_mode = mode;\n }\n is_ambient_light_enabled() {\n return this.light_manager.ambient_light.is_enabled();\n }\n set_ambient_light_enabled(v) {\n this.light_manager.ambient_light.set_enabled(v);\n }\n set_ambient_light_intensity(intensity) {\n this.light_manager.ambient_light.set_intensity(intensity);\n }\n set_ambient_light_diffuse_color(color) {\n if (this.get_config().verbose_warnings && !IColor.is_saturated(color)) {\n console.warn('Setting color with one or more channel not in range 0-1, this is generally a bad idea');\n }\n this.light_manager.ambient_light.set_color(color);\n }\n set_ambient_light_ground_color(color) {\n if (this.get_config().verbose_warnings && !IColor.is_saturated(color)) {\n console.warn('Setting color with one or more channel not in range 0-1, this is generally a bad idea');\n }\n this.light_manager.ambient_light.set_ground_color(color);\n }\n set_environment_map(url, file_extension) {\n var _a;\n const extension = ((_a = file_extension !== null && file_extension !== void 0 ? file_extension : url) !== null && _a !== void 0 ? _a : '').toLowerCase();\n if (!extension.endsWith('env') && !extension.endsWith('dds') && url) {\n console.warn('Loading an environment map that is not a DDS or ENV file, this usage is deprecated.');\n }\n return this.light_manager.environment.set_environment_map(url, file_extension !== null && file_extension !== void 0 ? file_extension : null, false);\n }\n load_and_filter_environment_map(url, file_extension) {\n const extension = (file_extension !== null && file_extension !== void 0 ? file_extension : url).toLowerCase();\n if (!extension.endsWith('hdr')) {\n return Promise.reject(new Error('Invalid format for environment map. Must be .hdr'));\n }\n return this.light_manager.environment.set_environment_map(url, file_extension !== null && file_extension !== void 0 ? file_extension : null, true);\n }\n get_environment_map() {\n return this.light_manager.environment.get_environment_map();\n }\n set_environment_map_local_mode(settings) {\n this.light_manager.environment.set_environment_map_local_mode(settings);\n }\n get_environment_map_local_mode() {\n return this.light_manager.environment.get_environment_map_local_mode();\n }\n set_environment_map_intensity(intensity) {\n this.light_manager.environment.set_environment_map_intensity(intensity);\n }\n set_environment_map_rotation_radians(rotation) {\n this.light_manager.environment.set_environment_map_rotation(rotation);\n }\n set_environment_map_rotation_degrees(rotation) {\n this.light_manager.environment.set_environment_map_rotation(radians(rotation));\n }\n get_environment_map_intensity() {\n return this.light_manager.environment.get_environment_map_intensity();\n }\n get_environment_map_rotation_radians() {\n return this.light_manager.environment.get_environment_map_rotation();\n }\n get_environment_map_rotation_degrees() {\n return degrees(this.light_manager.environment.get_environment_map_rotation());\n }\n get_environment_map_file_type() {\n return this.light_manager.environment.get_environment_map_file_type();\n }\n get_receive_shadow(id) {\n const object = this.viewer_scene.objects.get(id);\n return object.receive_shadow;\n }\n set_receive_shadow(id, receive_shadow, propagate_to_children) {\n this.iterate_objects(id, propagate_to_children, (object) => {\n object.receive_shadow = receive_shadow;\n if (object.material !== null) {\n const material = this.asset_manager.materials.get(object.material);\n material.set_dirty();\n }\n });\n this.freezing_manager.set_all_materials_dirty();\n this.mark_scene_dirty();\n }\n set_cast_shadow(id, cast_shadow, propagate_to_children) {\n if (this.viewer_scene.objects.contains(id)) { // check so that the user did not delete the object in the meanwhile\n this.iterate_objects(id, propagate_to_children, (object) => {\n if (cast_shadow) {\n object.add_render_layer(RENDER_LAYER_SHADOW);\n }\n else {\n object.remove_render_layer(RENDER_LAYER_SHADOW);\n }\n });\n }\n }\n get_cast_shadow(id) {\n return this.viewer_scene.objects.get(id).has_render_layer(RENDER_LAYER_SHADOW);\n }\n // 0 If no render\n debug_get_fps() {\n return this._last_frame_was_composited ? this._engine.getFps() : 0;\n }\n debug_get_updated_per_second() {\n return this._engine.getFps();\n }\n resize(render_width, render_height) {\n var _a, _b;\n if (render_width === undefined || render_height === undefined) {\n if (this.get_config().verbose_warnings) {\n console.warn('Using Viewer.resize without width & height parameters is deprecated. Use canvas.clientWidth and canvas.clientHeight for previous behaviour.');\n }\n }\n else {\n if (isNaN(render_width) || isNaN(render_height)) {\n throw new Error('Viewer.resize width and height need to be numbers.');\n }\n render_width = Math.floor(render_width);\n render_height = Math.floor(render_height);\n if (render_width <= 0 || render_height <= 0) {\n throw new Error('Viewer.resize width and height need to be greater than zero.');\n }\n if (render_width > MAX_RENDER_SIZE || render_height > MAX_RENDER_SIZE) {\n throw new Error(`Viewer.resize width and height cannot exceed ${MAX_RENDER_SIZE}.`);\n }\n }\n render_width = render_width !== null && render_width !== void 0 ? render_width : this.canvas_element.clientWidth;\n render_height = render_height !== null && render_height !== void 0 ? render_height : this.canvas_element.clientHeight;\n this.canvas_element.width = render_width;\n this.canvas_element.height = render_height;\n this._canvas_render_width = render_width;\n this._canvas_render_height = render_height;\n (_a = this._default_view) === null || _a === void 0 ? void 0 : _a.set_render_size(render_width, render_height);\n (_b = this._default_view) === null || _b === void 0 ? void 0 : _b.set_canvas_viewport({ x: 0, y: 0, width: render_width, height: render_height });\n this.mark_scene_dirty();\n this.mark_backbuffer_clear_dirty();\n this._viewer_resize_observable.notify(this, { width: render_width, height: render_height });\n }\n add_bake_job_progressive(job) {\n if (this._baker === null) {\n this._baker = new LightBaker(this, job);\n }\n else {\n this._baker.reconfigure(job);\n }\n return this.asset_manager.add_texture(this._baker.bake());\n }\n add_bake_job_async(job) {\n return new Promise((resolve, reject) => {\n if (this._baker === null) {\n this._baker = new LightBaker(this, job);\n }\n else {\n this._baker.reconfigure(job);\n }\n this._baker.async_bake().then(tex => {\n resolve(this.asset_manager.add_texture(tex));\n }).catch(err => {\n reject(err);\n });\n });\n }\n set_object_bounds_for_interaction(object_id, bounds) {\n this.viewer_scene.objects.get(object_id).set_raycast_bounds(bounds);\n }\n raycast_using_canvas_coordinate(x, y, filter) {\n return this.raycast_object_using_canvas_coordinate(x, y, filter);\n }\n raycast_using_ray(origin_or_ray, direction_or_filter, length, filter) {\n return this.raycast_object_using_ray(origin_or_ray, direction_or_filter, length, filter);\n }\n get_default_view_canvas_ray(x, y) {\n assert(this._default_view, 'get_default_view_canvas_ray requires the defualt view');\n // Normalize canvas coordinates to default view\n const ray = BABYLON_Ray.Zero();\n const view_viewport = this._default_view.get_canvas_viewport();\n this._default_view.create_ray_to_ref(clamp((x - view_viewport.x) / view_viewport.width, 0.0, 1.0), clamp((y - view_viewport.y) / view_viewport.height, 0.0, 1.0), ray);\n return ray;\n }\n raycast_object_using_canvas_coordinate(x, y, filter) {\n assert(this._default_view, 'raycast_using_canvas_coordinate requires the defualt view');\n return this.raycast_object_using_ray(this.get_default_view_canvas_ray(x, y), filter);\n }\n raycast_with_ray_and_filter_internal(func, origin_or_ray, direction_or_filter, length, filter) {\n const ray = BABYLON_Ray.Zero();\n if (direction_or_filter && 'x' in direction_or_filter) {\n // direction_or_filter is IVector3\n update_babylon_ray(ray, origin_or_ray, direction_or_filter, length);\n }\n else if ('origin' in ray && 'direction' in ray) { // TODO: Make IRay.is() type guard when we move to static classes\n // origin_or_ray is a ray\n update_babylon_ray(ray, origin_or_ray, undefined, length);\n }\n else {\n throw Error('Bad parameter combination for raycast_using_ray');\n }\n let hits = func(this, ray);\n if (Array.isArray(direction_or_filter)) {\n filter = direction_or_filter;\n }\n if (filter) {\n hits = hits.filter((raycast_result) => filter === null || filter === void 0 ? void 0 : filter.includes(raycast_result.object));\n }\n return filter_closest_hit(hits);\n }\n raycast_object_using_ray(origin_or_ray, direction_or_filter, length, filter) {\n return this.raycast_with_ray_and_filter_internal(raycast_all_objects_internal, origin_or_ray, direction_or_filter, length, filter);\n }\n raycast_gizmo_using_canvas_coordinate(x, y, filter) {\n assert(this._default_view, 'raycast_gizmo_using_canvas_coordinate requires the defualt view');\n return this.raycast_gizmo_using_ray(this.get_default_view_canvas_ray(x, y), filter);\n }\n raycast_gizmo_using_ray(origin_or_ray, direction_or_filter, length, filter) {\n return this.raycast_with_ray_and_filter_internal(raycast_all_gizmos_internal, origin_or_ray, direction_or_filter, length, filter);\n }\n raycast_interactable_using_canvas_coordinate(x, y, filter) {\n assert(this._default_view, 'raycast_interactable_using_canvas_coordinate requires the defualt view');\n return this.raycast_interactable_using_ray(this.get_default_view_canvas_ray(x, y), filter);\n }\n raycast_interactable_using_ray(origin_or_ray, direction_or_filter, length, filter) {\n return this.raycast_with_ray_and_filter_internal(raycast_all_internal, origin_or_ray, direction_or_filter, length, filter);\n }\n raycast_all_using_ray(origin_or_ray, direction, length) {\n const ray = BABYLON_Ray.Zero();\n update_babylon_ray(ray, origin_or_ray, direction, length);\n const hits = raycast_all_internal(this, ray);\n filter_hits_to_one_per_interactable_in_place(hits);\n return hits;\n }\n get_object_bounds_world_sync(object_id) {\n const object = this.viewer_scene.objects.get(object_id);\n assert(object.is_loaded, 'Object needs to have finished loading before getting bounds sync');\n const boundingbox = {\n min: { x: Number.POSITIVE_INFINITY, y: Number.POSITIVE_INFINITY, z: Number.POSITIVE_INFINITY },\n max: { x: Number.NEGATIVE_INFINITY, y: Number.NEGATIVE_INFINITY, z: Number.NEGATIVE_INFINITY }\n };\n update_aabb_by_transformed_aabb(boundingbox, object.get_local_space_bounding_info_sync().aabb, object.get_world_matrix());\n return boundingbox;\n }\n object_is_loaded(object_id) {\n return this.viewer_scene.objects.get(object_id).is_loaded;\n }\n object_is_empty(object_id) {\n return this.viewer_scene.objects.get(object_id).is_empty;\n }\n project_world_position_to_canvas(x, y, z) {\n assert(this._default_view !== null, 'Default view is not created');\n return this._default_view.project_world_position_to_canvas({ x: x, y: y, z: z });\n }\n // TODO: Make generic utility function?\n static verify_screenshot_mime_type(screenshot_data, expected_type) {\n // No need to check if MIME type isn't provided\n if (!expected_type) {\n return;\n }\n // Try to fetch and compare actual MIME type with expected\n const re_array = screenshot_data.match(/data:(image\\/\\w+)/);\n if (re_array && re_array.length > 1 && re_array[1] !== expected_type) {\n console.warn(`Created image has an unexpected MIME type. Expected: ${expected_type}. Actual: ${re_array[1]}.`);\n }\n }\n set_background_color(r, g, b) {\n if (this.get_config().verbose_warnings && !IColor.is_saturated({ r: r, g: g, b: b })) {\n console.warn('Setting color with one or more channel not in range 0-1, this is generally a bad idea');\n }\n if (this._background_color.r === r && this._background_color.g === g && this._background_color.b === b) {\n return;\n }\n this._background_color.r = r;\n this._background_color.g = g;\n this._background_color.b = b;\n if (this._float_framebuffer_enabled) {\n const inverse_tonemapped_color = get_fitted_inverse_tonemap(VIEWER_DEFAULT_FLOAT_FRAMEBUFFER_TYPE, r, g, b, this.get_config().verbose_warnings);\n this.scene.clearColor = new BABYLON_Color4(inverse_tonemapped_color.x, inverse_tonemapped_color.y, inverse_tonemapped_color.z, 1.0);\n }\n else {\n this.scene.clearColor = new BABYLON_Color4(r, g, b, 1.0);\n }\n this.mark_backbuffer_clear_dirty();\n this.mark_scene_dirty();\n }\n get_background_color() {\n return {\n r: this._background_color.r,\n g: this._background_color.g,\n b: this._background_color.b\n };\n }\n mark_scene_dirty() {\n this._scene_dirty = true;\n }\n mark_composite_dirty() {\n this._compositing_frames_remaining = FRAMES_TO_COMPOSITE;\n }\n mark_backbuffer_clear_dirty() {\n this._backbuffer_clear_dirty = true;\n this.mark_composite_dirty();\n }\n mark_world_bounds_dirty() {\n this._world_bounds_is_dirty = true;\n }\n create_ui_line(type, p0, p1, color, thickness, draw_on_top = false) {\n if (draw_on_top) {\n return this._line_manager_on_top.create_line(type, vector_3(p0), vector_3(p1), icolor_to_col4(color), thickness);\n }\n else {\n return this.line_manager.create_line(type, vector_3(p0), vector_3(p1), icolor_to_col4(color), thickness);\n }\n }\n update_ui_line(id, p0, p1, color, thickness) {\n if (this.line_manager.contains(id)) {\n this.line_manager.update_line(id, p0 ? vector_3(p0) : p0, p1 ? vector_3(p1) : p1, color ? icolor_to_col4(color) : color, thickness);\n }\n else {\n this._line_manager_on_top.update_line(id, p0 ? vector_3(p0) : p0, p1 ? vector_3(p1) : p1, color ? icolor_to_col4(color) : color, thickness);\n }\n }\n delete_ui_line(id) {\n const line_exists = this.line_manager.contains(id) || this._line_manager_on_top.contains(id);\n if (!line_exists && this.get_config().verbose_warnings) {\n console.warn(`Not able to remove ui line with id: ${id}. The line ID provided does not exist.`);\n }\n return this.line_manager.remove_line(id) || this._line_manager_on_top.remove_line(id);\n }\n set_ui_line_visible(id, line_visible) {\n if (this.line_manager.contains(id)) {\n this.line_manager.set_visible(id, line_visible);\n }\n else {\n this._line_manager_on_top.set_visible(id, line_visible);\n }\n }\n get_ui_line_visible(id) {\n // Lines that don't exists return false, so we just try if its in either set, otherwise both are false anyway.\n return this.line_manager.get_visible(id) || this._line_manager_on_top.get_visible(id);\n }\n on_current_scene_ready() {\n // Get all object ready promises\n // Get all material ready promises\n // Get all lights ready promises\n // Check environment ready\n // TODO: How do we handle things like proxy loader? guess we don't.\n return new Promise((resolve) => {\n const promises = [];\n this.viewer_scene.objects.forEach((scene_object) => promises.push(scene_object.ready));\n this.asset_manager.materials.forEach((material) => promises.push(material.ready));\n promises.push(this.light_system.ready);\n promises.push(this.light_manager.environment.ready);\n promises.push(this.get_effects_compiled_promise());\n Promise.allSettled(promises).then(() => resolve());\n });\n }\n set_object_base_color_factor(id, base_color) {\n if (this.get_config().verbose_warnings && !IColor.is_saturated(base_color)) {\n console.warn('Setting color with one or more channel not in range 0-1, this is generally a bad idea');\n }\n const propagate_to_children = false;\n this.iterate_objects(id, propagate_to_children, (object) => {\n object.set_base_color(base_color);\n });\n this.mark_scene_dirty();\n }\n set_object_roughness_factor(id, roughness_factor) {\n const propagate_to_children = false;\n this.iterate_objects(id, propagate_to_children, (object) => {\n object.set_roughness_factor(roughness_factor);\n });\n this.mark_scene_dirty();\n }\n get_object_bounds_world(...ids) {\n const objects = ids.map(id => this.viewer_scene.objects.get(id));\n return get_object_bounds_world(objects);\n }\n calculate_current_world_bounds() {\n const world_bounds = IBoundingBox.Invalid();\n const tmp_matrix = new IMatrix4();\n this.viewer_scene.objects.forEach((object) => {\n if (!object.has_bounds || object.is_empty)\n return;\n const local_bounds = object.get_local_space_bounding_info_sync();\n if (!IBoundingBox.is_valid(local_bounds.aabb))\n return;\n const transformed_bounds = new ITransformedBoundingBox(local_bounds.aabb, object.get_world_matrix().toIMatrix4ToRef(tmp_matrix));\n const object_world_bounds = ITransformedBoundingBox.get_encapsulating_axis_aligned_bounding_box(transformed_bounds);\n IBoundingBox.encapsulate_in_place(world_bounds, object_world_bounds.min, object_world_bounds.max);\n });\n this.asset_manager.ui_meshes.forEach((instance) => {\n const ui_mesh_aabb_transformed = instance.get_world_bounds();\n if (!IBoundingBox.is_valid(ui_mesh_aabb_transformed.local_bounding_box))\n return;\n const ui_mesh_aabb_world = ITransformedBoundingBox.get_encapsulating_axis_aligned_bounding_box(ui_mesh_aabb_transformed);\n IBoundingBox.encapsulate_in_place(world_bounds, ui_mesh_aabb_world.min, ui_mesh_aabb_world.max);\n });\n this.asset_manager.lines.forEach((lines) => {\n const aabb_transformed = lines.get_world_bounds();\n if (!IBoundingBox.is_valid(aabb_transformed.local_bounding_box))\n return;\n const aabb_world = ITransformedBoundingBox.get_encapsulating_axis_aligned_bounding_box(aabb_transformed);\n IBoundingBox.encapsulate_in_place(world_bounds, aabb_world.min, aabb_world.max);\n });\n this.asset_manager.text_fields.forEach((text_field) => {\n text_field.get_meshes().forEach((mesh) => {\n const text_field_aabb = mesh.getBoundingInfo().boundingBox;\n IBoundingBox.encapsulate_in_place(world_bounds, text_field_aabb.minimumWorld, text_field_aabb.maximumWorld);\n });\n });\n const ui_lines_bounds = this.line_manager.get_bounds();\n if (IBoundingBox.is_valid(ui_lines_bounds)) {\n IBoundingBox.encapsulate_in_place(world_bounds, ui_lines_bounds.min, ui_lines_bounds.max);\n }\n const ui_line_on_top_bounds = this._line_manager_on_top.get_mesh().getBoundingInfo().boundingBox;\n if (is_valid_bounding_box(ui_line_on_top_bounds)) {\n IBoundingBox.encapsulate_in_place(world_bounds, ui_line_on_top_bounds.minimumWorld, ui_line_on_top_bounds.maximumWorld);\n }\n return world_bounds;\n }\n get_object_bounds_local(id, include_child_objects = true) {\n const object = this.viewer_scene.objects.get(id);\n return get_object_bounds_local(object, include_child_objects);\n }\n update_bounds_cache() {\n if (this._world_bounds_is_dirty) {\n this._world_bounds_is_dirty = false;\n const world_bounds = this.calculate_current_world_bounds();\n // Setting flag here to avoid notifying multiple times per frame\n if (!IBoundingBox.equals(this._scene_bounds, world_bounds)) {\n this._should_notify_world_bounds = true;\n this._scene_bounds = world_bounds;\n }\n }\n }\n get_scene_bounds() {\n this.update_bounds_cache();\n return this._scene_bounds;\n }\n download_gltf_files(files) {\n download_gltf_files(files);\n }\n serialize_glb(filter, filename, center) {\n const objects = filter.map((id) => this.viewer_scene.objects.get(id));\n return this.asset_manager.serialize_glb(objects, filename, center);\n }\n create_animation(object, data) {\n return this.animation_system.create_animation(object, data);\n }\n start_animation(id, animation_idx, from, to) {\n this.animation_system.start_animation(id, animation_idx, from, to);\n }\n stop_animation(id, animation_idx) {\n return this.animation_system.stop_animation(id, animation_idx);\n }\n animation_running(id, animation_idx) {\n return this.animation_system.animation_running(id, animation_idx);\n }\n get_animations(object) {\n return this.animation_system.get_animations(object);\n }\n debug_download_texture(id) {\n debug_download_texture(this.asset_manager.textures.get(id));\n }\n // TODO: fix probable race condition when calling this\n // Note: in order to fix a bug where sometimes materials get darker when calling this, MaterialFreezingManager is disabled (and re-enabled when\n // no clipping planes are in use)\n add_object_clip_plane(object_id, direction, distance, clip_all_instances, bounds) {\n const object = this.viewer_scene.objects.get(object_id);\n const mesh = object.mesh_nodes[0];\n if (mesh) {\n // If clipping multiple instances and bounds are used, use bounds mid-point as position instead\n const position = (clip_all_instances && bounds)\n ? IVector3.scale(IVector3.add(bounds.max, bounds.min), 0.5)\n : mesh.getAbsolutePosition();\n const normalized_direction = new BABYLON_Vector3(direction.x, direction.y, direction.z).normalize();\n const d = IVector3.dot(normalized_direction, position);\n const distance_to_plane = d / IVector3.magnitude(normalized_direction);\n // noinspection SuspiciousTypeOfGuard\n const observable_mesh = (mesh instanceof BABYLON_InstancedMesh) ? mesh.sourceMesh : mesh;\n const clip_plane_index = this.get_and_set_clip_plane_index(observable_mesh, object_id);\n const plane = new BABYLON_Plane(direction.x, direction.y, direction.z, -distance_to_plane - distance);\n this._id_to_before_render_observables.set(object_id, observable_mesh.onBeforeRenderObservable.add(() => __awaiter(this, void 0, void 0, function* () {\n this.set_clip_plane(plane, clip_plane_index);\n Viewer.add_material_clipping_bounding(mesh, clip_all_instances, clip_plane_index, bounds);\n })));\n this._id_to_after_render_observables.set(object_id, observable_mesh.onAfterRenderObservable.add(() => {\n this.set_clip_plane(null, clip_plane_index);\n }));\n this.mark_scene_dirty();\n }\n else {\n console.error('Mesh is undefined');\n }\n }\n static add_material_clipping_bounding(mesh, clip_all_instances, clip_plane_index, bounds) {\n const material = mesh.material;\n if (material) {\n if (clip_all_instances) {\n // If clip_all_instances, clip material in whole scene (or inside bounds, if provided)\n const min_max = bounds || {\n min: new BABYLON_Vector3(-Infinity, -Infinity, -Infinity),\n max: new BABYLON_Vector3(Infinity, Infinity, Infinity)\n };\n material.add_clipping_bounding_info(vector_3(min_max.min), vector_3(min_max.max), clip_plane_index);\n }\n else {\n // Only clip material inside the the mesh extents\n const extend_size = mesh.getBoundingInfo().boundingBox.extendSizeWorld;\n const pos = mesh.getBoundingInfo().boundingBox.centerWorld;\n const min_world = new BABYLON_Vector3();\n pos.subtractToRef(extend_size, min_world);\n const max_world = new BABYLON_Vector3();\n pos.addToRef(extend_size, max_world);\n material.add_clipping_bounding_info(min_world, max_world, clip_plane_index);\n }\n }\n }\n set_clip_plane(clip_plane, clip_plane_index) {\n switch (clip_plane_index) {\n case 0:\n case undefined:\n this.scene.clipPlane = clip_plane;\n break;\n case 1:\n this.scene.clipPlane2 = clip_plane;\n break;\n case 2:\n this.scene.clipPlane3 = clip_plane;\n break;\n case 3:\n this.scene.clipPlane4 = clip_plane;\n break;\n case 4:\n this.scene.clipPlane5 = clip_plane;\n break;\n case 5:\n this.scene.clipPlane6 = clip_plane;\n break;\n }\n }\n remove_object_clip_plane(object_id) {\n // Checks probably not needed, but can't hurt\n const object = this.viewer_scene.objects.get(object_id);\n let mesh = undefined; // Conflicting linter rule\n if (object && object.mesh_nodes) {\n mesh = object.mesh_nodes[0];\n }\n if (mesh) {\n // noinspection SuspiciousTypeOfGuard\n const observable_mesh = (mesh instanceof BABYLON_InstancedMesh) ? mesh.sourceMesh : mesh;\n const before_observable = this._id_to_before_render_observables.get(object_id);\n observable_mesh.onBeforeRenderObservable.remove(before_observable);\n const after_observable = this._id_to_after_render_observables.get(object_id);\n observable_mesh.onAfterRenderObservable.remove(after_observable);\n this._id_to_before_render_observables.delete(object_id);\n this._id_to_after_render_observables.delete(object_id);\n const object_to_index = this._mesh_to_clip_plane.get(observable_mesh);\n if (object_to_index) {\n const index = object_to_index.get(object_id);\n if (index) {\n this.remove_material_clipping_bounding(observable_mesh, index);\n }\n object_to_index.delete(object_id);\n if (object_to_index.size === 0) {\n this._mesh_to_clip_plane.delete(observable_mesh);\n }\n }\n this.mark_scene_dirty();\n }\n else {\n // This is unexpected but seems to be safe so we will ignore this for now 2022-03-15\n // We never got here in our examples but we got here when testing on pax-planner\n }\n }\n remove_material_clipping_bounding(mesh, clip_plane_index) {\n const material = mesh.material;\n if (material) {\n material.add_clipping_bounding_info(BABYLON_Vector3.Zero(), BABYLON_Vector3.Zero(), clip_plane_index);\n }\n }\n get_and_set_clip_plane_index(mesh, object_id) {\n const indices = [...Array(MAX_CLIP_PLANES).keys()];\n let id_to_index = this._mesh_to_clip_plane.get(mesh);\n if (id_to_index && id_to_index.size === MAX_CLIP_PLANES) {\n console.error('Max number of clip planes reached, cannot use more');\n }\n const present_indices = id_to_index ? Array.from(id_to_index.values()) : [];\n // Filter out present indices and get the lowest of the remaining\n const index = indices.filter(item => present_indices.indexOf(item) < 0).sort()[0];\n if (id_to_index) {\n id_to_index.set(object_id, index);\n }\n else {\n id_to_index = new Map();\n id_to_index.set(object_id, index);\n this._mesh_to_clip_plane.set(mesh, id_to_index);\n }\n return index;\n }\n set_bloom(enable, intensity) {\n if (enable && !this.is_bloom_supported()) {\n console.warn('Bloom is not supported on this viewer instance. Requires WebGL2 and float render targets.');\n return;\n }\n this._default_view.postprocess_manager.set_bloom(enable, intensity);\n }\n is_bloom_supported() {\n // Bloom requires a float render target, both for its own rendering, but also for its HDR input.\n // The bloom shaders also required WebGL 2 (for texelFetch), which is implicitly required for float render targets.\n return this._optional_features.feature_gate_use_float_framebuffer && Framebuffer.is_float_framebuffer_supported(this._engine);\n }\n get_input_manager() {\n assert(this._default_view !== null, 'Default view is not created');\n return this._default_view.input_manager;\n }\n // Note that this returns null without the feature_gate_enable_input_manager\n get_camera_manager() {\n assert(this._default_view !== null, 'Default view is not created');\n return this._default_view.camera_manager;\n }\n get_asset_manager() {\n return this.asset_manager;\n }\n get_mesh_manager() {\n return this.mesh_manager;\n }\n get_viewer_resize_observable() {\n return this._viewer_resize_observable;\n }\n build_metadata_structure(object_id, namespace) {\n const namespace_map = get_or_set_map_value(this._object_metadata_store, object_id, new Map());\n const metadata_map = get_or_set_map_value(namespace_map, namespace, new Map());\n return metadata_map;\n }\n add_metadata(object_id, key, value, namespace) {\n // Early out if object_id is not a valid object\n if (!this.viewer_scene.objects.contains(object_id))\n return false;\n if (namespace === undefined) {\n console.error('metadata without namespace is currently not implemented');\n }\n else {\n // Get or create all the maps for the metadata storage\n const metadata_map = this.build_metadata_structure(object_id, namespace);\n // If we dont have any entry for key, we add it and return true\n if (!metadata_map.has(key)) {\n metadata_map.set(key, value);\n return true;\n }\n }\n return false;\n }\n update_metadata(object_id, key, value, namespace) {\n // Early out if object_id is not a valid object\n if (!this.viewer_scene.objects.contains(object_id))\n return false;\n if (namespace === undefined) {\n console.error('metadata without namespace is currently not implemented');\n }\n else {\n // Get or create all the maps for the metadata storage\n const metadata_map = this.build_metadata_structure(object_id, namespace);\n if (metadata_map.has(key)) {\n metadata_map.set(key, value);\n return true;\n }\n }\n return false;\n }\n get_metadata(object_id, key, namespace) {\n // Early out if object_id is not a valid object\n if (!this.viewer_scene.objects.contains(object_id))\n return undefined;\n if (namespace === undefined) {\n console.error('metadata without namespace is currently not implemented');\n }\n else {\n const metadata_map = this.build_metadata_structure(object_id, namespace);\n return metadata_map.get(key);\n }\n return undefined;\n }\n remove_metadata(object_id, key, namespace) {\n // Early out if object_id is not a valid object\n if (!this.viewer_scene.objects.contains(object_id))\n return false;\n if (namespace === undefined) {\n console.error('metadata without namespace is currently not implemented');\n }\n else {\n const metadata_map = this.build_metadata_structure(object_id, namespace);\n return metadata_map.delete(key);\n }\n return false;\n }\n set_canvas_tab_index(tab_index) {\n this._engine.canvasTabIndex = tab_index;\n }\n get_canvas_tab_index() {\n return this._engine.canvasTabIndex;\n }\n get_viewer_dispose_observable() {\n return this._viewer_dispose_observable;\n }\n start_coroutine(coroutine) {\n this._coroutine_manager.start_coroutine(coroutine);\n }\n get_version() {\n return VIEWER_VERSION;\n }\n get_debugger(display_help) {\n console.error('To use the debugger you must import \"@inter-ikea-betrakta/viewer/dist/babylon/debug/ViewerDebugger\"');\n return null;\n }\n get_interaction_system() {\n return this._interaction_system;\n }\n pause_rendering() {\n this._rendering_is_paused = true;\n }\n resume_rendering() {\n this._rendering_is_paused = false;\n }\n acquire_rendering_pause_lock() {\n return this._rendering_lock_system.acquire_lock();\n }\n release_rendering_pause_lock(lock) {\n this._rendering_lock_system.release_lock(lock);\n }\n is_rendering_paused() {\n return this._rendering_is_paused || this._rendering_lock_system.is_locked();\n }\n force_render_frame(number_of_frames) {\n this._forced_render_frame_count = number_of_frames;\n }\n is_rendering_to_float_framebuffer() {\n return this._float_framebuffer_enabled;\n }\n get_scene_objects_by_layer_mask(mask) {\n // This is just filtering the objects\n const objects = [];\n this.viewer_scene.objects.forEach((object) => {\n // Check for overlap of the object's mask and the mask we want to fetch\n if ((mask.bitmap & object.get_render_layer_mask().bitmap) !== 0) {\n objects.push(object);\n }\n });\n return objects;\n }\n get_babylon_meshes_from_objects(scene_objects) {\n const meshes = [];\n for (let i = 0; i < scene_objects.length; i++) {\n scene_objects[i].mesh_iterator(false, (mesh) => meshes.push(mesh));\n }\n return meshes;\n }\n /**\n * Returns an array of the Babylon meshes from scene objects and UI lines that have render layers included in the mask.\n * This function is meant to be used for rendering a special list of meshes, such as for screenshots.\n * Since UI lines (and possibly other items later down the road) are not scene objects, it's not enough to just provide the list of scene objects that the mask matches.\n * @param mask The mask to match for\n * @returns The Babylon meshes\n */\n get_meshes_by_layer_mask(mask) {\n // Fetch all scene objects that are included in our mask\n const scene_objects = this.get_scene_objects_by_layer_mask(mask);\n // Get the babylon meshes for all of those objects\n const meshes = this.get_babylon_meshes_from_objects(scene_objects);\n // Special case: Since UI lines are not part of the scene objects, we add them manually if their render layer is active.\n if (RenderLayerMask.has_layer(mask, this.line_manager.render_layer)) {\n meshes.push(this.line_manager.get_mesh());\n }\n if (RenderLayerMask.has_layer(mask, this._line_manager_on_top.render_layer)) {\n meshes.push(this._line_manager_on_top.get_mesh());\n }\n // Special case: TextFields are not scene objects so we need to handle them here\n this.asset_manager.text_fields.forEach((text_field) => {\n if ((text_field.get_render_layer_mask().bitmap & mask.bitmap) !== 0) {\n text_field.get_meshes().forEach(mesh => {\n meshes.push(mesh);\n });\n }\n });\n // Special case: ISceneLines\n this.asset_manager.lines.forEach((lines) => {\n if ((lines.render_layer_mask.bitmap & mask.bitmap) !== 0) {\n meshes.push(lines.mesh);\n }\n });\n // Special case: UiMeshInstances\n this.asset_manager.ui_meshes.forEach((ui_mesh) => {\n ui_mesh.instances.forEach((mesh) => {\n if ((mesh.layerMask & mask.bitmap) !== 0) {\n meshes.push(mesh);\n }\n });\n });\n // Special case: Skybox\n const skybox = this.light_manager.environment.get_skybox();\n if (skybox !== null) {\n if ((skybox.layerMask & mask.bitmap) !== 0) {\n meshes.push(skybox);\n }\n }\n return meshes;\n }\n take_screenshot(projection_matrix, projection_type, view_matrix, width, height, settings, layer_mask = RENDER_LAYER_MASK_DEFAULT) {\n return take_screenshot(this, projection_matrix, projection_type, view_matrix, width, height, settings, this.get_meshes_by_layer_mask(layer_mask));\n }\n take_edge_sketch_screenshot(projection_matrix, projection_type, view_matrix, width, height, settings, layer_mask = RENDER_LAYER_MASK_DEFAULT) {\n const experimental_settings = {\n edge_sketch: true\n };\n return take_screenshot(this, projection_matrix, projection_type, view_matrix, width, height, settings, this.get_meshes_by_layer_mask(layer_mask), experimental_settings);\n }\n get_object_bounds_plane_world(object_id, direction) {\n const object = this.viewer_scene.objects.get(object_id);\n const world_transform = object.get_world_matrix();\n return object.get_local_space_bounding_info().then((bounds) => {\n return ITransformedBoundingBox.get_face_plane(new ITransformedBoundingBox(bounds.aabb, world_transform.toIMatrix4ToRef(new IMatrix4())), direction);\n });\n }\n get_object_bounds_plane_local(object_id, direction) {\n const object = this.viewer_scene.objects.get(object_id);\n return object.get_local_space_bounding_info().then((bounds) => {\n return IBoundingBox.get_face_plane(bounds.aabb, direction);\n });\n }\n get_box_framed_perspective_camera_matrix(object_ids, projection, direction, loose_up, include_child_objects, margin_world, margin_viewport) {\n return get_box_framed_perspective_camera_matrix(this, object_ids, projection, direction, loose_up, include_child_objects, margin_world, margin_viewport);\n }\n get_precise_framed_perspective_camera_matrix(object_ids, projection, direction, loose_up, include_child_objects, margin_world, margin_viewport) {\n return get_precise_framed_perspective_camera_matrix(this, object_ids, projection, direction, loose_up, include_child_objects, margin_world, margin_viewport);\n }\n get_framed_perspective_camera_matrix(precise, object_ids, projection, direction, loose_up, include_child_objects, margin_world, margin_viewport) {\n if (precise) {\n return this.get_precise_framed_perspective_camera_matrix(object_ids, projection, direction, loose_up, include_child_objects, margin_world, margin_viewport);\n }\n else {\n return this.get_box_framed_perspective_camera_matrix(object_ids, projection, direction, loose_up, include_child_objects, margin_world, margin_viewport);\n }\n }\n /**\n * Sets the camera exposure on the scene without dirtying\n * @returns true if the value on the scene was changed\n */\n set_camera_exposure_internal(ev) {\n let exposure;\n if (typeof ev === 'number') {\n exposure = ev_to_intensity(ev);\n }\n else {\n const photographic_exposure = typeof ev === 'string' ? EXPOSURE_PRESETS[ev] : ev;\n exposure = ev_to_intensity(exposure_value(photographic_exposure));\n }\n if (this.scene.imageProcessingConfiguration.exposure !== exposure) {\n this.scene.imageProcessingConfiguration.exposure = exposure;\n return true;\n }\n else {\n return false;\n }\n }\n set_camera_exposure(ev) {\n if (this.set_camera_exposure_internal(ev)) {\n this.mark_scene_dirty();\n }\n }\n get_camera_exposure() {\n return -Math.log2(this.scene.imageProcessingConfiguration.exposure);\n }\n create_ui_mesh() {\n return new UiMesh(this);\n }\n create_soft_shadow_plane_renderer(resolution) {\n const renderer = new SoftShadowRenderer(this, resolution);\n this._light_manager.experimental_soft_shadow_renderers.add(renderer);\n return renderer;\n }\n delete_soft_shadow_plane_renderer(renderer) {\n const full_renderer = renderer;\n if (this._light_manager.experimental_soft_shadow_renderers.delete(full_renderer)) {\n full_renderer.dispose();\n }\n }\n get_webgl_memory_tracker() {\n return this._webgl_memory_tracker;\n }\n get_input_handler_manager() {\n return this._input_handler_manager;\n }\n create_input_handler(execute_object, interaction_objects) {\n return this._input_handler_manager.create_input_handler(execute_object, interaction_objects);\n }\n set_light_distance_falloff_enabled(light, enabled) {\n light.expermiental_distance_falloff_enabled = enabled;\n }\n}\n/**\n * Keep track of the number of Viewer instances running.\n * Will increment on constructor, and decrement in the dispose function.\n */\nViewer._viewer_instances_running = 0;\n__decorate([\n Deprecated({ new: 'PrimitiveBuilder.create_box' })\n], Viewer.prototype, \"create_box\", null);\n__decorate([\n Deprecated({ new: 'PrimitiveBuilder.create_sphere' })\n], Viewer.prototype, \"create_sphere\", null);\n__decorate([\n Deprecated({ new: 'PrimitiveBuilder.create_spherical_dome' })\n], Viewer.prototype, \"create_light_mesh\", null);\n__decorate([\n Deprecated({ new: 'PrimitiveBuilder.create_plane' })\n], Viewer.prototype, \"create_plane\", null);\n__decorate([\n Deprecated({ new: 'FocusBorder module' })\n], Viewer.prototype, \"set_focus_border\", null);\n__decorate([\n Deprecated({ new: 'FocusBorder module' })\n], Viewer.prototype, \"get_focus_border\", null);\n__decorate([\n Deprecated({ new: 'add_bake_job_async' })\n], Viewer.prototype, \"add_bake_job_progressive\", null);\n__decorate([\n Deprecated({ new: 'raycast_object_using_canvas_coordinate | raycast_interactable_using_canvas_coordinate' })\n], Viewer.prototype, \"raycast_using_canvas_coordinate\", null);\n__decorate([\n Deprecated({ new: 'raycast_object_using_ray | raycast_interactable_using_ray' })\n], Viewer.prototype, \"raycast_using_ray\", null);\n__decorate([\n Deprecated({ new: 'acquire_rendering_pause_lock' })\n], Viewer.prototype, \"pause_rendering\", null);\n__decorate([\n Deprecated({ new: 'release_rendering_pause_lock' })\n], Viewer.prototype, \"resume_rendering\", null);\n//# sourceMappingURL=Viewer.js.map","import { Vector3ConstantPropertyReference } from './babylon/material/PropertyWrappers.js';\nexport class MaterialHandle {\n constructor(id, viewer) {\n this.id = id;\n this.viewer = viewer;\n }\n get roughness() {\n return this.viewer.get_roughness(this.id);\n }\n set roughness(r) {\n this.viewer.set_roughness(this.id, r);\n }\n get metallic() {\n return this.viewer.get_metallic(this.id);\n }\n set metallic(m) {\n this.viewer.set_metallic(this.id, m);\n }\n get base_color() {\n return this.viewer.get_base_color(this.id);\n }\n set base_color(c) {\n this.viewer.set_base_color(this.id, c);\n }\n get base_color_texture() {\n return this.viewer.get_base_color_texture(this.id);\n }\n set base_color_texture(tex) {\n this.viewer.set_base_color_texture(this.id, tex);\n }\n get unlit() {\n return this.viewer.get_unlit(this.id);\n }\n set unlit(unlit) {\n this.viewer.set_unlit(this.id, unlit);\n }\n get light_map_texture() {\n return this.viewer.get_lightmap_texture(this.id);\n }\n set light_map_texture(tex) {\n this.viewer.set_lightmap_texture(this.id, tex);\n }\n}\nexport class ObjectHandle {\n constructor(id, viewer) {\n this.id = id;\n this.viewer = viewer;\n const v = viewer;\n const object = v.viewer_scene.objects.get(id);\n this._position = new Vector3ConstantPropertyReference(object, 'position');\n this._rotation = new Vector3ConstantPropertyReference(object, 'rotation');\n this._scale = new Vector3ConstantPropertyReference(object, 'scale');\n }\n get position() {\n return this._position;\n }\n set position(v) {\n this.viewer.set_position(this.id, v.x, v.y, v.z);\n }\n get rotation() {\n return this._rotation;\n }\n set rotation(v) {\n this.viewer.set_rotation(this.id, v.x, v.y, v.z);\n }\n get scale() {\n return this._scale;\n }\n set scale(v) {\n this.viewer.set_scale(this.id, v.x, v.y, v.z);\n }\n get material() {\n return this.viewer.get_material(this.id);\n }\n set material(mid) {\n this.viewer.set_material(this.id, mid);\n }\n get outline() {\n return this.viewer.get_outline(this.id);\n }\n set outline(enable) {\n this.viewer.set_outline(this.id, enable, false);\n }\n get outline_block() {\n return this.viewer.get_outline_block(this.id);\n }\n set outline_block(enable) {\n this.viewer.set_outline_block(this.id, enable, false);\n }\n get visible() {\n return this.viewer.get_visible(this.id);\n }\n set visible(v) {\n this.viewer.set_visible(this.id, v, false);\n }\n get enabled() {\n return this.viewer.get_enabled(this.id);\n }\n set enabled(v) {\n this.viewer.set_enabled(this.id, v);\n }\n get enable_on_click() {\n return this.viewer.get_enable_on_click(this.id);\n }\n set enable_on_click(enable) {\n this.viewer.set_enable_on_click(this.id, enable, false);\n }\n get enble_on_drag() {\n return this.viewer.get_enable_on_drag(this.id);\n }\n set enble_on_drag(enable) {\n this.viewer.set_enable_on_drag(this.id, enable, false);\n }\n set cast_shadow(v) {\n this.viewer.set_cast_shadow(this.id, v, false);\n }\n get cast_shadow() {\n return this.viewer.get_cast_shadow(this.id);\n }\n set receive_shadow(v) {\n this.viewer.set_receive_shadow(this.id, v, false);\n }\n get receive_shadow() {\n return this.viewer.get_receive_shadow(this.id);\n }\n // Only allow add child, skip implementing unparented_child\n // because its unclear what should happen to its parent.\n // Children can be unparented by setting their parent to either null or other parent\n add_child(child) {\n this.viewer.set_parent(child, this.id);\n }\n set parent(parent) {\n this.viewer.set_parent(this.id, parent);\n }\n get parent() {\n return this.viewer.get_parent(this.id);\n }\n get children() {\n return this.viewer.get_children(this.id);\n }\n get on_pointer_enter_observable() {\n return this.viewer.get_object_pointer_enter_observable(this.id);\n }\n get on_pointer_leave_observable() {\n return this.viewer.get_object_pointer_leave_observable(this.id);\n }\n}\n//# sourceMappingURL=common.js.map","import './Math.extension.js'; // polyfill Babylon math classes\nimport { DracoDecoderSource } from './api.js';\nimport { Viewer } from './babylon/Viewer.js';\nimport { update_from_partial } from './babylon/utility/utils.js';\nexport * from './api.js';\nexport * from './common.js';\nexport * from './Math.js';\nexport * from './Interpolation.js';\nexport { CoroutineToken } from './CoroutineManager.js';\nexport * from './Types.js';\nexport * from './babylon/RenderLayer.js';\nexport { Observer } from './Observable.js';\nconst default_viewer_config = {\n headless: false,\n run_render_loop: true,\n draco_decoder: {\n wasmUrl: 'error',\n wasmBinaryUrl: 'error',\n fallbackUrl: 'error'\n },\n interaction_system_enabled: true,\n verbose_warnings: true,\n use_parallel_shader_compile: true,\n xr_compatible: false,\n enable_webgl_memory_tracker: false,\n anisotropic_filtering_level: 4\n};\n/**\n * Creates an instance of the viewer, this should only be done once.\n * @param canvas The canvas that will be used when rendering\n * @param draco_decoders Union of enum or custom configuration for source of draco decoders\n * @param config Configuration object\n * @param optional_features Used to enable and disable optional and experimental features.\n * @returns IViewer\n */\nexport function create_viewer(canvas, draco_decoders, config, optional_features) {\n const real_config = update_from_partial(default_viewer_config, config !== null && config !== void 0 ? config : {});\n // The urls from config.draco_decoder always takes precedence\n if (typeof draco_decoders === 'object') {\n real_config.draco_decoder = Object.assign({}, draco_decoders);\n }\n else {\n if (draco_decoders === DracoDecoderSource.IKEA_COM) {\n real_config.draco_decoder = {\n wasmUrl: 'https://www.ikea.com/addon-app/viewer/v1/draco_wasm_wrapper_gltf.js',\n wasmBinaryUrl: 'https://www.ikea.com/addon-app/viewer/v1/draco_decoder_gltf.wasm',\n fallbackUrl: 'https://www.ikea.com/addon-app/viewer/v1/draco_decoder_gltf.js'\n };\n }\n else if (draco_decoders === DracoDecoderSource.UNIVERSAL) {\n real_config.draco_decoder = {\n wasmUrl: 'https://stoviwernonprddraco.z16.web.core.windows.net/draco_wasm_wrapper_gltf.js',\n wasmBinaryUrl: 'https://stoviwernonprddraco.z16.web.core.windows.net/draco_decoder_gltf.wasm',\n fallbackUrl: 'https://stoviwernonprddraco.z16.web.core.windows.net/draco_decoder_gltf.js'\n };\n }\n else {\n console.error('Unhandled DracoDecoderSource value');\n }\n }\n return new Viewer(canvas, real_config, optional_features);\n}\n//# sourceMappingURL=index.js.map","import { InteractionType } from '../input/InputManager.js';\n/**\n * Input gatherer is responsible for collecting user input such as mouse or touch events from the canvas.\n * Normalize this input and send it to the input manager.\n * The architecture is built on the asumption that a user of the viewer should be able to write there own gatherer.\n * This enables users to implement advanced input schemas while we can maintain simple interaction logic in the viewer.\n */\nexport class InputGatherer {\n constructor(_canvas, _viewer, active_view, config) {\n this._canvas = _canvas;\n this._viewer = _viewer;\n this._canvas_width_normalizer = 1;\n this._canvas_height_normalizer = 1;\n /**\n * Here we need to keep track of the two first pointers on touch setups (or mouse + touch on setups that support that)\n * This is so that we can support gestures such as pinch (zoom)\n */\n this._pointer_1 = null;\n this._pointer_2 = null;\n this._is_dragging = false;\n this._pinch_square_distance = 0;\n this._multi_touch_position = null;\n this._active_view = null;\n this._event_listeners = [];\n this.on_pointerenter = (evt) => {\n const pointer = this.get_active_pointer(evt);\n if (pointer === null) {\n this._is_dragging = false;\n }\n else {\n // Update pointer positions, to not get any \"jumps\" when the pointer re-enters\n pointer.start_position = { x: evt.offsetX, y: evt.offsetY };\n pointer.x = evt.offsetX;\n pointer.y = evt.offsetY;\n // Run the pointerup event handler to properly handle the case where the mouse button has been released.\n if ((pointer.type === InteractionType.PRIMARY && (evt.buttons & 1) === 0) ||\n (pointer.type === InteractionType.SECONDARY && (evt.buttons & 2) === 0)) {\n this.on_pointerup(evt);\n }\n }\n };\n this.on_pointerdown = (evt) => {\n var _a;\n if (this._pointer_1 && this._pointer_2)\n return;\n let type = InteractionType.INVALID;\n if (evt.pointerType === 'touch' || evt.pointerType === 'pen')\n type = InteractionType.TOUCH;\n else if (evt.pointerType === 'mouse') {\n if (evt.button === 0)\n type = InteractionType.PRIMARY;\n else if (evt.button === 2)\n type = InteractionType.SECONDARY;\n }\n if (type !== InteractionType.INVALID) {\n const { offsetX: x, offsetY: y } = evt;\n const pointer = {\n x: x,\n y: y,\n pointer_id: evt.pointerId,\n type: type,\n start_position: { x: x, y: y },\n start_time: Date.now()\n };\n const clicked_view = this._viewer.get_view_at_canvas_coordinates(x * this.client_to_canvas_ratio.x, y * this.client_to_canvas_ratio.y);\n if (clicked_view !== null && clicked_view.auto_capture_input_focus) {\n this.set_active_view(clicked_view);\n }\n if (!this._pointer_1) {\n this._pointer_1 = pointer;\n (_a = this._active_view) === null || _a === void 0 ? void 0 : _a.input_manager.interaction_begin({ canvas_x: x * this.client_to_canvas_ratio.x, canvas_y: y * this.client_to_canvas_ratio.y });\n }\n else if (!this._pointer_2) {\n this._pointer_2 = pointer;\n }\n }\n };\n this.on_pointerup = (evt) => {\n var _a, _b, _c, _d, _e, _f, _g;\n const pointer = this.get_active_pointer(evt);\n if (!pointer)\n return;\n // Handle multi-touch input\n if (this._pointer_1 && ((_a = this._pointer_2) === null || _a === void 0 ? void 0 : _a.pointer_id) === evt.pointerId) {\n if (this._is_dragging && this.config.enable_multitouch_pan && this._multi_touch_position) {\n (_b = this._active_view) === null || _b === void 0 ? void 0 : _b.input_manager.pan_end(this.make_drag_event(evt, this._pointer_1));\n }\n this._pointer_2 = null;\n }\n else if (this._pointer_2 && ((_c = this._pointer_1) === null || _c === void 0 ? void 0 : _c.pointer_id) === evt.pointerId) {\n if (this._is_dragging && this.config.enable_multitouch_pan && this._multi_touch_position) {\n (_d = this._active_view) === null || _d === void 0 ? void 0 : _d.input_manager.pan_end(this.make_drag_event(evt, this._pointer_2));\n }\n this._pointer_1 = this._pointer_2;\n this._pointer_2 = null;\n }\n else {\n // Handle single point input\n if (this._is_dragging) {\n if (pointer.type === InteractionType.TOUCH || pointer.type === InteractionType.PRIMARY) {\n (_e = this._active_view) === null || _e === void 0 ? void 0 : _e.input_manager.drag_end(this.make_drag_event(evt, pointer));\n }\n else if (this.config.enable_right_mouse_click && pointer.type === InteractionType.SECONDARY) {\n (_f = this._active_view) === null || _f === void 0 ? void 0 : _f.input_manager.pan_end(this.make_drag_event(evt, pointer));\n }\n }\n else if (!this.config.enable_right_mouse_click && pointer.type === InteractionType.SECONDARY) {\n return;\n }\n else {\n (_g = this._active_view) === null || _g === void 0 ? void 0 : _g.input_manager.click({\n type: pointer.type,\n canvas_x: evt.offsetX * this.client_to_canvas_ratio.x,\n canvas_y: evt.offsetY * this.client_to_canvas_ratio.y,\n duration_ms: Date.now() - pointer.start_time\n });\n }\n this._pointer_1 = null;\n this._pointer_2 = null;\n this._is_dragging = false;\n }\n this._multi_touch_position = null;\n this._pinch_square_distance = 0;\n };\n this.on_pointermove = (evt) => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (evt.pointerType === 'mouse') {\n (_a = this._active_view) === null || _a === void 0 ? void 0 : _a.input_manager.mouse_pointer_move({\n canvas_x: evt.offsetX * this.client_to_canvas_ratio.x,\n canvas_y: evt.offsetY * this.client_to_canvas_ratio.y\n });\n }\n const pointer = this.get_active_pointer(evt);\n if (!pointer) {\n if (evt.pointerType === 'touch') {\n // Fire on pointer down, for triple-finger gestures on touch\n this.on_pointerdown(evt);\n }\n return;\n }\n // Handle single point input\n if (this._pointer_1 && this._pointer_2 === null) {\n if (this._is_dragging) {\n if (pointer.type === InteractionType.TOUCH || pointer.type === InteractionType.PRIMARY) {\n (_b = this._active_view) === null || _b === void 0 ? void 0 : _b.input_manager.drag_move(this.make_drag_event(evt, pointer));\n }\n else if (pointer.type === InteractionType.SECONDARY && this.config.enable_right_mouse_pan) {\n (_c = this._active_view) === null || _c === void 0 ? void 0 : _c.input_manager.pan_move(this.make_drag_event(evt, pointer));\n }\n }\n else {\n const offset_x = evt.offsetX - pointer.start_position.x;\n const offset_y = evt.offsetY - pointer.start_position.y;\n const delta_move = Math.sqrt(offset_x * offset_x + offset_y * offset_y);\n if (delta_move > this.config.single_pointer_drag_threshold) {\n this._is_dragging = true;\n if (pointer.type === InteractionType.TOUCH || pointer.type === InteractionType.PRIMARY) {\n (_d = this._active_view) === null || _d === void 0 ? void 0 : _d.input_manager.drag_begin(this.make_drag_event(evt, pointer));\n }\n else if (pointer.type === InteractionType.SECONDARY && this.config.enable_right_mouse_pan) {\n (_e = this._active_view) === null || _e === void 0 ? void 0 : _e.input_manager.pan_begin(this.make_drag_event(evt, pointer));\n }\n }\n }\n // Update pointer data\n pointer.x = evt.offsetX;\n pointer.y = evt.offsetY;\n // Handle multi-touch input\n }\n else if (this._pointer_1 && this._pointer_2) {\n // Update pointer data\n pointer.x = evt.offsetX;\n pointer.y = evt.offsetY;\n // Handle multi-touch zoom\n const dist_x = this._pointer_1.x - this._pointer_2.x;\n const dist_y = this._pointer_1.y - this._pointer_2.y;\n const pinch_squared_distance = dist_x * dist_x + dist_y * dist_y;\n if (this._pinch_square_distance && this.config.enable_multitouch_zoom) {\n const diff = pinch_squared_distance - this._pinch_square_distance;\n const delta = diff / this.config.multitouch_zoom_sensitivity;\n (_f = this._active_view) === null || _f === void 0 ? void 0 : _f.input_manager.zoom({\n delta: -delta\n });\n }\n // Handle multi-touch pan\n const multi_touch_position = {\n x: (this._pointer_1.x + this._pointer_2.x) / 2,\n y: (this._pointer_1.y + this._pointer_2.y) / 2\n };\n if (this._multi_touch_position && this.config.enable_multitouch_pan) {\n const custom_event = { offsetX: multi_touch_position.x, offsetY: multi_touch_position.y };\n if (this._is_dragging) {\n (_g = this._active_view) === null || _g === void 0 ? void 0 : _g.input_manager.pan_move(this.make_drag_event(custom_event, this._multi_touch_position));\n }\n else {\n (_h = this._active_view) === null || _h === void 0 ? void 0 : _h.input_manager.pan_begin(this.make_drag_event(custom_event, this._multi_touch_position));\n }\n this._is_dragging = true;\n }\n this._pinch_square_distance = pinch_squared_distance;\n this._multi_touch_position = multi_touch_position;\n }\n };\n this.on_pointercancel = (evt) => {\n var _a, _b, _c, _d, _e;\n if (!this._multi_touch_position && this._is_dragging) {\n if (((_a = this._pointer_1) === null || _a === void 0 ? void 0 : _a.type) === InteractionType.TOUCH || ((_b = this._pointer_1) === null || _b === void 0 ? void 0 : _b.type) === InteractionType.PRIMARY) {\n (_c = this._active_view) === null || _c === void 0 ? void 0 : _c.input_manager.drag_end(this.make_drag_event(evt, this._pointer_1));\n }\n else if (((_d = this._pointer_1) === null || _d === void 0 ? void 0 : _d.type) === InteractionType.SECONDARY && this.config.enable_right_mouse_pan) {\n (_e = this._active_view) === null || _e === void 0 ? void 0 : _e.input_manager.pan_end(this.make_drag_event(evt, this._pointer_1));\n }\n }\n this._pointer_1 = null;\n this._pointer_2 = null;\n this._is_dragging = false;\n this._multi_touch_position = null;\n this._pinch_square_distance = 0;\n };\n this.on_wheel = (evt) => {\n var _a;\n const clicked_view = this._viewer.get_view_at_canvas_coordinates(evt.offsetX * this.client_to_canvas_ratio.x, evt.clientY * this.client_to_canvas_ratio.y);\n if (clicked_view !== null && clicked_view.auto_capture_input_focus) {\n this.set_active_view(clicked_view);\n }\n /**\n * Wheel events in browser has historically been very unstable in that the values given vary by browser/OS.\n * According to several sources browsers are converging on these values.\n * More on the issues can be found in the following links\n * https://github.com/goxjs/glfw/issues/10\n * https://github.com/facebookarchive/fixed-data-table/blob/master/src/vendor_upstream/dom/normalizeWheel.js Old but interesting\n * https://github.com/timmywil/panzoom/issues/560\n *\n * For now we will just forward value as is and try and fix as we find where it diverges\n */\n (_a = this._active_view) === null || _a === void 0 ? void 0 : _a.input_manager.zoom({\n delta: evt.deltaY\n });\n };\n this._active_view = active_view === undefined ? _viewer.get_default_view() : active_view;\n this.config = this.parse_config(config);\n // When sending the canvas to Babylon, which we did previously, they set some attributes to prevent site from zooming when pinching, among other things.\n // So here we do the same things manually.\n if (this._canvas.setAttribute) {\n this._canvas.setAttribute('touch-action', 'none');\n this._canvas.style.touchAction = 'none';\n this._canvas.style.webkitTapHighlightColor = 'transparent';\n }\n else {\n console.warn(\"Unable to use setAttribute on canvas. Pinching may not work on touch screens. Please set 'touch-action' to 'none' on the canvas\");\n }\n this.calcualte_canvas_size_normalizer();\n this.register_listeners();\n }\n register_listeners() {\n if (window.PointerEvent) {\n // Pointer events\n this._event_listeners.push({ type: 'pointerdown', handler: this.on_pointerdown });\n this._event_listeners.push({ type: 'pointerup', handler: this.on_pointerup });\n this._event_listeners.push({ type: 'pointermove', handler: this.on_pointermove });\n this._event_listeners.push({ type: 'pointercancel', handler: this.on_pointercancel });\n this._event_listeners.push({ type: 'pointerenter', handler: this.on_pointerenter });\n }\n else {\n // Mouse events\n this._event_listeners.push({ type: 'mousedown', handler: (evt) => this.on_pointerdown(this.make_pointer_input_event(evt)) });\n this._event_listeners.push({ type: 'mouseup', handler: (evt) => this.on_pointerup(this.make_pointer_input_event(evt)) });\n this._event_listeners.push({ type: 'mousemove', handler: (evt) => this.on_pointermove(this.make_pointer_input_event(evt)) });\n // Touch events\n this._event_listeners.push({ type: 'touchstart', handler: (evt) => this.on_pointerdown(this.make_pointer_input_event(evt)) });\n this._event_listeners.push({ type: 'touchend', handler: (evt) => this.on_pointerup(this.make_pointer_input_event(evt)) });\n this._event_listeners.push({ type: 'touchmove', handler: (evt) => this.on_pointermove(this.make_pointer_input_event(evt)) });\n this._event_listeners.push({ type: 'touchcancel', handler: (evt) => this.on_pointercancel(this.make_pointer_input_event(evt)) });\n }\n // Wheel event\n this._event_listeners.push({ type: 'wheel', handler: this.on_wheel });\n // Add event listeners\n this._event_listeners.forEach(pair => this.add_event_listener(pair));\n // Prevent the context menu from showing\n this._canvas.oncontextmenu = function (e) {\n e.preventDefault();\n };\n this._viewer.get_viewer_resize_observable().add(() => {\n this.calcualte_canvas_size_normalizer();\n });\n }\n set_active_view(view) {\n var _a, _b, _c, _d, _e, _f, _g;\n if (view === this._active_view)\n return;\n (_a = this._active_view) === null || _a === void 0 ? void 0 : _a.input_manager.clear_hovering_interactable();\n if (this._is_dragging && !this._multi_touch_position) {\n if (((_b = this._pointer_1) === null || _b === void 0 ? void 0 : _b.type) === InteractionType.TOUCH || ((_c = this._pointer_1) === null || _c === void 0 ? void 0 : _c.type) === InteractionType.PRIMARY) {\n (_d = this._active_view) === null || _d === void 0 ? void 0 : _d.input_manager.drag_end(this.make_drag_event({ offsetX: this._pointer_1.x, offsetY: this._pointer_1.y }, this._pointer_1));\n }\n else if (this.config.enable_right_mouse_click && ((_e = this._pointer_1) === null || _e === void 0 ? void 0 : _e.type) === InteractionType.SECONDARY) {\n (_f = this._active_view) === null || _f === void 0 ? void 0 : _f.input_manager.pan_end(this.make_drag_event({ offsetX: this._pointer_1.x, offsetY: this._pointer_1.y }, this._pointer_1));\n }\n }\n else if (this._is_dragging && this._multi_touch_position && this.config.enable_multitouch_pan) {\n (_g = this._active_view) === null || _g === void 0 ? void 0 : _g.input_manager.pan_end(this.make_drag_event({ offsetX: this._multi_touch_position.x, offsetY: this._multi_touch_position.y }, this._multi_touch_position));\n }\n this._is_dragging = false;\n this._pointer_1 = null;\n this._pointer_2 = null;\n this._is_dragging = false;\n this._multi_touch_position = null;\n this._pinch_square_distance = 0;\n this._active_view = view;\n }\n dispose() {\n // Set the active view to null to \"clear\" the old one and end any lingering events.\n this.set_active_view(null);\n this._event_listeners.forEach(pair => this.remove_event_listener(pair));\n this._event_listeners.length = 0;\n }\n parse_config(config = {}) {\n return {\n single_pointer_drag_threshold: config.single_pointer_drag_threshold || 3,\n multitouch_zoom_sensitivity: config.multitouch_zoom_sensitivity || 100,\n enable_right_mouse_pan: config.enable_right_mouse_pan !== false,\n enable_right_mouse_click: config.enable_right_mouse_click !== false,\n enable_multitouch_zoom: config.enable_multitouch_zoom !== false,\n enable_multitouch_pan: config.enable_multitouch_pan !== false\n };\n }\n calcualte_canvas_size_normalizer() {\n this._canvas_width_normalizer = 1.0 / this._canvas.clientWidth;\n this._canvas_height_normalizer = 1.0 / this._canvas.clientHeight;\n }\n get client_to_canvas_ratio() {\n return {\n x: this._canvas.width / this._canvas.clientWidth,\n y: this._canvas.height / this._canvas.clientHeight\n };\n }\n get_active_pointer(evt) {\n var _a, _b;\n if (((_a = this._pointer_1) === null || _a === void 0 ? void 0 : _a.pointer_id) === evt.pointerId) {\n return this._pointer_1;\n }\n else if (((_b = this._pointer_2) === null || _b === void 0 ? void 0 : _b.pointer_id) === evt.pointerId) {\n return this._pointer_2;\n }\n return null;\n }\n make_pointer_input_event(evt) {\n if (evt instanceof MouseEvent) {\n return {\n pointerType: 'mouse',\n pointerId: 1,\n button: evt.button,\n offsetX: evt.offsetX,\n offsetY: evt.offsetY\n };\n }\n else if (evt instanceof TouchEvent) {\n const touch = evt.changedTouches[0];\n const canvas_rect = this._canvas.getBoundingClientRect();\n return {\n pointerType: 'touch',\n pointerId: touch.identifier,\n button: 0,\n offsetX: touch.clientX - canvas_rect.left,\n offsetY: touch.clientY - canvas_rect.top\n };\n }\n else {\n throw new Error('Invalid event type. Expected MouseEvent or TouchEvent.');\n }\n }\n make_drag_event(evt, start) {\n return {\n canvas_x: evt.offsetX * this.client_to_canvas_ratio.x,\n canvas_y: evt.offsetY * this.client_to_canvas_ratio.y,\n delta_x: (evt.offsetX - start.x) * this._canvas_width_normalizer,\n delta_y: (evt.offsetY - start.y) * this._canvas_height_normalizer\n };\n }\n add_event_listener(pair) {\n this._canvas.addEventListener(pair.type, pair.handler, false);\n }\n remove_event_listener(pair) {\n this._canvas.removeEventListener(pair.type, pair.handler);\n }\n}\n//# sourceMappingURL=InputGatherer.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { horizontal_to_vertical_fov, vertical_to_horizontal_fov } from '../Math.js';\nimport { IMatrix4, CameraMode } from '../api.js';\nimport { Deprecated } from '../utils/Deprecated.js';\nexport var FieldOfViewDirection;\n(function (FieldOfViewDirection) {\n FieldOfViewDirection[FieldOfViewDirection[\"HORIZONTAL\"] = 0] = \"HORIZONTAL\";\n FieldOfViewDirection[FieldOfViewDirection[\"VERTICAL\"] = 1] = \"VERTICAL\";\n})(FieldOfViewDirection || (FieldOfViewDirection = {}));\nexport class PerspectiveProjection {\n constructor(field_of_view, aspect_ratio, near_z, far_z, field_of_view_direction = FieldOfViewDirection.HORIZONTAL) {\n this._projection_matrix = PerspectiveProjection.calculate_perspective(field_of_view, aspect_ratio, near_z, far_z, field_of_view_direction);\n this._is_dirty = false;\n this._field_of_view = field_of_view;\n this._field_of_view_direction = field_of_view_direction;\n this._aspect_ratio = aspect_ratio;\n this._near = near_z;\n this._far = far_z;\n }\n get_camera_mode() {\n return CameraMode.PERSPECTIVE;\n }\n get_aspect_ratio() {\n return this._aspect_ratio;\n }\n get_projection_matrix() {\n if (this.is_dirty) {\n this.is_dirty = false;\n // Make sure matrix is up to date\n this._projection_matrix = PerspectiveProjection.calculate_perspective(this._field_of_view, this._aspect_ratio, this._near, this._far, this._field_of_view_direction);\n }\n return this._projection_matrix;\n }\n get is_dirty() {\n return this._is_dirty;\n }\n set is_dirty(dirty) {\n this._is_dirty = dirty;\n }\n get vertical_fov() {\n if (this._field_of_view_direction === FieldOfViewDirection.HORIZONTAL) {\n return horizontal_to_vertical_fov(this._field_of_view, this._aspect_ratio);\n }\n return this._field_of_view;\n }\n get horizontal_fov() {\n if (this._field_of_view_direction === FieldOfViewDirection.VERTICAL) {\n return vertical_to_horizontal_fov(this._field_of_view, this._aspect_ratio);\n }\n return this._field_of_view;\n }\n /**\n * @deprecated Use field_of_view instead\n **/\n set horizontal_fov(val) {\n if (this._field_of_view_direction === FieldOfViewDirection.VERTICAL) {\n throw new Error(\"can't set horizontal_fov on a projection using vertical field of view\");\n }\n this.field_of_view = val;\n }\n get field_of_view() {\n return this._field_of_view;\n }\n set field_of_view(val) {\n if (val === this._field_of_view)\n return;\n this._field_of_view = val;\n this.is_dirty = true;\n }\n get field_of_view_direction() {\n return this._field_of_view_direction;\n }\n set field_of_view_direction(val) {\n if (val === this._field_of_view_direction)\n return;\n this._field_of_view_direction = val;\n this.is_dirty = true;\n }\n get aspect_ratio() {\n return this._aspect_ratio;\n }\n set aspect_ratio(val) {\n if (val === this._aspect_ratio)\n return;\n this._aspect_ratio = val;\n this.is_dirty = true;\n }\n get near() {\n return this._near;\n }\n set near(val) {\n val = Math.max(val, PerspectiveProjection.ALLOWED_PLANE.near);\n if (val === this._near)\n return;\n this._near = val;\n this.is_dirty = true;\n }\n get far() {\n return this._far;\n }\n set far(val) {\n val = Math.min(val, PerspectiveProjection.ALLOWED_PLANE.far);\n if (val === this._far)\n return;\n this._far = val;\n this.is_dirty = true;\n }\n clone() {\n return new PerspectiveProjection(this._field_of_view, this._aspect_ratio, this._near, this._far, this._field_of_view_direction);\n }\n /**\n * Calculate a right-handed perspective projection\n * @param field_of_view the field of view\n * @param aspect_ratio the aspect ratio\n * @param near_z the near clip plane\n * @param far_z the far clip plane\n * @param field_of_view_direction the direction of the field of view\n * @returns perspective projection matrix\n */\n static calculate_perspective(field_of_view, aspect_ratio, near_z, far_z, field_of_view_direction) {\n // TODO Consider Left handed system c *= -1.0; d *= -1.0;\n const t = 1.0 / Math.tan(field_of_view * 0.5);\n const a = field_of_view_direction === FieldOfViewDirection.HORIZONTAL ? t : t / aspect_ratio;\n const b = field_of_view_direction === FieldOfViewDirection.HORIZONTAL ? t * aspect_ratio : t;\n const c = (far_z + near_z) / (far_z - near_z);\n const d = (-2 * far_z * near_z) / (far_z - near_z);\n const projection_matrix = IMatrix4.from_values(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0);\n return projection_matrix;\n }\n}\nPerspectiveProjection.ALLOWED_PLANE = { near: 0.01, far: Number.POSITIVE_INFINITY };\n__decorate([\n Deprecated({ new: 'PerspectiveProjection.field_of_view' })\n], PerspectiveProjection.prototype, \"horizontal_fov\", null);\n//# sourceMappingURL=PerspectiveProjection.js.map","import { IVector4, IColor4 } from '../../api.js';\nexport class MeshDescriptions {\n constructor() {\n throw new Error('This is an utility class, cannot be instantiated');\n }\n static box(width = 1, height = 1, depth = 1, color = new IColor4(1, 1, 1, 1)) {\n const half_width = width / 2;\n const half_height = height / 2;\n const half_depth = depth / 2;\n const positions = [\n // Front face\n -half_width, -half_height, half_depth,\n +half_width, -half_height, half_depth,\n +half_width, +half_height, half_depth,\n -half_width, +half_height, half_depth,\n // Back face\n +half_width, -half_height, -half_depth,\n -half_width, -half_height, -half_depth,\n -half_width, +half_height, -half_depth,\n +half_width, +half_height, -half_depth,\n // Top face\n -half_width, +half_height, +half_depth,\n +half_width, +half_height, +half_depth,\n +half_width, +half_height, -half_depth,\n -half_width, +half_height, -half_depth,\n // Bottom face\n -half_width, -half_height, -half_depth,\n +half_width, -half_height, -half_depth,\n +half_width, -half_height, +half_depth,\n -half_width, -half_height, +half_depth,\n // Right face\n +half_width, -half_height, +half_depth,\n +half_width, -half_height, -half_depth,\n +half_width, +half_height, -half_depth,\n +half_width, +half_height, +half_depth,\n // Left face\n -half_width, -half_height, -half_depth,\n -half_width, -half_height, +half_depth,\n -half_width, +half_height, +half_depth,\n -half_width, +half_height, -half_depth\n ];\n const indices = [\n +0, +1, +2, +0, +2, +3, // Front face\n +4, +5, +6, +4, +6, +7, // Back face\n +8, +9, 10, +8, 10, 11, // Top face\n 12, 13, 14, 12, 14, 15, // Bottom face\n 16, 17, 18, 16, 18, 19, // Right face\n 20, 21, 22, 20, 22, 23 // Left face\n ];\n const colors = [];\n for (let i = 0; i < 24; i++) { // One color per each vertex\n colors.push(color.r, color.g, color.b, color.a);\n }\n const uv = [\n 0, 1, 1, 1, 1, 0, 0, 0,\n 0, 1, 1, 1, 1, 0, 0, 0,\n 1, 0, 0, 0, 0, 1, 1, 1,\n 1, 0, 0, 0, 0, 1, 1, 1,\n 0, 1, 1, 1, 1, 0, 0, 0,\n 0, 1, 1, 1, 1, 0, 0, 0\n ];\n return {\n positions: new Float32Array(positions),\n indices: new Uint16Array(indices),\n colors: new Float32Array(colors),\n uv0: new Float32Array(uv)\n };\n }\n static sphere(diameter = 1.0, segments = 32, smooth = true, color = new IColor4(1, 1, 1, 1)) {\n const positions = [];\n const indices = [];\n const normals = [];\n const colors = [];\n const uv = [];\n const radius = diameter / 2;\n for (let i = 0; i <= segments; i++) {\n const latitude = i * Math.PI / segments;\n for (let j = 0; j <= segments; j++) {\n const longitude = j * 2 * Math.PI / segments;\n const x = Math.sin(latitude) * Math.cos(longitude);\n const y = Math.cos(latitude);\n const z = Math.sin(latitude) * Math.sin(longitude);\n positions.push(x * radius, y * radius, z * radius);\n normals.push(x, y, z);\n uv.push(-j / segments, i / segments);\n colors.push(color.r, color.g, color.b, color.a);\n }\n }\n for (let i = 0; i < segments; i++) {\n for (let j = 0; j < segments; j++) {\n const first = (i * (segments + 1)) + j;\n const second = first + segments + 1;\n indices.push(first, first + 1, second);\n indices.push(second, first + 1, second + 1);\n }\n }\n return {\n positions: new Float32Array(positions),\n indices: new Uint16Array(indices),\n normals: smooth ? new Float32Array(normals) : null,\n colors: new Float32Array(colors),\n uv0: new Float32Array(uv)\n };\n }\n static spherical_dome(diameter = 1.0, cutoff = 0.5, segments = 32, smooth = true, flip = false, color = new IColor4(1, 1, 1, 1)) {\n const positions = [];\n const indices = [];\n const normals = [];\n const colors = [];\n const uv = [];\n const radius = diameter / 2;\n const vertical_segments = Math.ceil(segments * cutoff);\n for (let i = 0; i <= vertical_segments; i++) {\n const alpha = i / vertical_segments;\n const latitude = (flip ? 1 - (alpha * cutoff) : (alpha * cutoff)) * Math.PI;\n for (let j = 0; j <= segments; j++) {\n const longitude = j * 2 * Math.PI / segments;\n const x = Math.sin(latitude) * Math.cos(longitude);\n const y = Math.cos(latitude);\n const z = Math.sin(latitude) * Math.sin(longitude);\n positions.push(x * radius, y * radius, z * radius);\n normals.push(x, y, z);\n uv.push(-j / segments, i / vertical_segments);\n colors.push(color.r, color.g, color.b, color.a);\n }\n }\n for (let i = 0; i < vertical_segments; i++) {\n for (let j = 0; j < segments; j++) {\n const first = (i * (segments + 1)) + j;\n const second = first + segments + 1;\n indices.push(first, first + 1, second);\n indices.push(second, first + 1, second + 1);\n }\n }\n return {\n positions: new Float32Array(positions),\n indices: new Uint16Array(flip ? indices.reverse() : indices),\n normals: smooth ? new Float32Array(normals) : null,\n colors: new Float32Array(colors),\n uv0: new Float32Array(uv)\n };\n }\n static plane(width = 1, depth = 1, uv0 = new IVector4(0, 0, 1, 1), color = new IColor4(1, 1, 1, 1)) {\n const half_width = width / 2;\n const half_height = depth / 2;\n const positions = [\n -half_width, +half_height, 0,\n +half_width, +half_height, 0,\n +half_width, -half_height, 0,\n -half_width, -half_height, 0\n ];\n const colors = [\n color.r, color.g, color.b, color.a,\n color.r, color.g, color.b, color.a,\n color.r, color.g, color.b, color.a,\n color.r, color.g, color.b, color.a\n ];\n const uv0_vertex_values = [\n uv0.z, uv0.y,\n uv0.x, uv0.y,\n uv0.x, uv0.w,\n uv0.z, uv0.w\n ];\n return {\n positions: new Float32Array(positions),\n indices: new Uint16Array([0, 1, 2, 0, 2, 3]),\n colors: new Float32Array(colors),\n uv0: new Float32Array(uv0_vertex_values)\n };\n }\n static torus(major_radius, minor_radius, major_segments = 32, minor_segments = 16, smooth = true, color = new IColor4(1, 1, 1, 1)) {\n const positions = [];\n const colors = [];\n const indices = [];\n const normals = [];\n const uvs = [];\n for (let i = 0; i <= major_segments; i++) {\n const theta = (i / major_segments) * 2 * Math.PI;\n const sin_theta = Math.sin(theta);\n const cos_theta = Math.cos(theta);\n for (let j = 0; j <= minor_segments; j++) {\n const phi = (j / minor_segments) * 2 * Math.PI;\n const sin_phi = Math.sin(phi);\n const cos_phi = Math.cos(phi);\n const x = (major_radius + minor_radius * cos_phi) * cos_theta;\n const y = minor_radius * sin_phi;\n const z = (major_radius + minor_radius * cos_phi) * sin_theta;\n positions.push(x, y, z);\n colors.push(color.r, color.g, color.b, color.a);\n normals.push(cos_theta * cos_phi, sin_phi, sin_theta * cos_phi);\n uvs.push(i / major_segments, j / minor_segments);\n }\n }\n for (let i = 0; i < major_segments; i++) {\n for (let j = 0; j < minor_segments; j++) {\n const first = (i * (minor_segments + 1)) + j;\n const second = first + minor_segments + 1;\n indices.push(first, first + 1, second);\n indices.push(second, first + 1, second + 1);\n }\n }\n return {\n positions: new Float32Array(positions),\n indices: new Uint16Array(indices),\n colors: new Float32Array(colors),\n normals: smooth ? new Float32Array(normals) : null,\n uv0: new Float32Array(uvs)\n };\n }\n static cylinder(height, radius, segments = 32, smooth = true, color = new IColor4(1, 1, 1, 1)) {\n const positions = [];\n const colors = [];\n const indices = [];\n const normals = [];\n const uvs = [];\n const angle_step = (Math.PI * 2) / segments;\n // Generate positions and normals\n for (let i = 0; i < segments; i++) {\n const theta = i * angle_step;\n const cos = Math.cos(theta);\n const sin = Math.sin(theta);\n const x = radius * cos;\n const z = radius * sin;\n positions.push(x, 0, z);\n normals.push(0, -1, 0);\n uvs.push(x, z);\n positions.push(x, height, z);\n normals.push(0, 1, 0);\n uvs.push(x, z);\n positions.push(x, 0, z);\n normals.push(cos, 0, sin);\n uvs.push(i / segments, 0);\n positions.push(x, height, z);\n normals.push(cos, 0, sin);\n uvs.push(i / segments, 1);\n }\n // Top and bottom circles\n for (let i = 0; i < segments - 2; i++) {\n indices.push(0, (i + 1) * 4, (i + 2) * 4);\n indices.push(1, (i + 2) * 4 + 1, (i + 1) * 4 + 1);\n }\n // Side faces\n for (let i = 0; i < segments; i++) {\n indices.push(i * 4 + 2, i * 4 + 3, ((i + 1) * 4 + 2) % (segments * 4));\n indices.push(i * 4 + 3, ((i + 1) * 4 + 2) % (segments * 4) + 1, ((i + 1) * 4 + 2) % (segments * 4));\n }\n for (let i = 0; i < positions.length; i++) {\n colors.push(color.r, color.g, color.b, color.a);\n }\n return {\n positions: new Float32Array(positions),\n indices: new Uint16Array(indices),\n colors: new Float32Array(colors),\n normals: smooth ? new Float32Array(normals) : null,\n uv0: new Float32Array(uvs)\n };\n }\n static cone(height, radius, segments = 32, smooth = true, color = new IColor4(1, 1, 1, 1)) {\n const positions = [];\n const indices = [];\n const normals = [];\n const colors = [];\n const uvs = [];\n const angle_step = (Math.PI * 2) / segments;\n // Generate positions and normals for the base circle\n for (let i = 0; i < segments; i++) {\n const theta = i * angle_step;\n const cos = Math.cos(theta);\n const sin = Math.sin(theta);\n const x = radius * cos;\n const z = radius * sin;\n positions.push(x, 0, z);\n normals.push(0, -1, 0);\n uvs.push(x, z);\n positions.push(x, 0, z);\n normals.push(cos, Math.sqrt(x * x + z * z), sin);\n uvs.push(i / segments, 0);\n positions.push(0, height, 0);\n normals.push(cos, Math.sqrt(x * x + z * z), sin);\n uvs.push(i / segments, 1);\n }\n // Bottom\n for (let i = 0; i < segments - 2; i++) {\n indices.push(0, (i + 1) * 3, (i + 2) * 3);\n }\n // Side faces\n for (let i = 0; i < segments; i++) {\n indices.push(i * 3 + 1, i * 3 + 2, (i + 1) * 3 % (segments * 3) + 1);\n }\n for (let i = 0; i < positions.length; i++) {\n colors.push(color.r, color.g, color.b, color.a);\n }\n return {\n positions: new Float32Array(positions),\n indices: new Uint16Array(indices),\n normals: smooth ? new Float32Array(normals) : null,\n colors: new Float32Array(colors),\n uv0: new Float32Array(uvs)\n };\n }\n static circle(radius, segments = 32, color = new IColor4(1, 1, 1, 1)) {\n const positions = [];\n const indices = [];\n const normals = [];\n const colors = [];\n const uvs = [];\n const angle_step = (Math.PI * 2) / segments;\n for (let i = 0; i < segments; i++) {\n const x = radius * Math.cos(i * angle_step);\n const z = radius * Math.sin(i * angle_step);\n positions.push(x, 0, z);\n normals.push(0, 1, 0);\n uvs.push(x, z);\n }\n for (let i = 0; i < segments - 2; i++) {\n indices.push(0, i + 2, i + 1);\n }\n for (let i = 0; i < positions.length; i++) {\n colors.push(color.r, color.g, color.b, color.a);\n }\n return {\n positions: new Float32Array(positions),\n indices: new Uint16Array(indices),\n normals: new Float32Array(normals),\n colors: new Float32Array(colors),\n uv0: new Float32Array(uvs)\n };\n }\n}\n//# sourceMappingURL=MeshDescriptions.js.map","import { MeshDescriptions } from './MeshDescriptions.js';\nexport class PrimitiveBuilder {\n constructor(viewer) {\n this._viewer = viewer;\n }\n create_cube(size, options = {}) {\n var _a;\n const description = MeshDescriptions.box(size, size, size);\n options.name = (_a = options.name) !== null && _a !== void 0 ? _a : 'Custom Cube';\n return this.create_custom_mesh(description, options);\n }\n create_box(width, height, depth, options = {}) {\n var _a;\n const description = MeshDescriptions.box(width, height, depth);\n options.name = (_a = options.name) !== null && _a !== void 0 ? _a : 'Custom Box';\n return this.create_custom_mesh(description, options);\n }\n create_sphere(diameter, options = {}) {\n var _a;\n const description = MeshDescriptions.sphere(diameter, options.segments, options.smooth);\n options.name = (_a = options.name) !== null && _a !== void 0 ? _a : 'Custom Sphere';\n return this.create_custom_mesh(description, options);\n }\n create_spherical_dome(diameter, cutoff, options = {}) {\n const description = MeshDescriptions.spherical_dome(diameter, cutoff, options.segments, options.smooth, options.flip);\n return this.create_custom_mesh(description, options);\n }\n create_plane(width, depth, options = {}) {\n var _a;\n const description = MeshDescriptions.plane(width, depth, options.uv0);\n options.name = (_a = options.name) !== null && _a !== void 0 ? _a : 'Custom Plane';\n return this.create_custom_mesh(description, options);\n }\n create_torus(major_radius, minor_radius, options = {}) {\n var _a;\n const description = MeshDescriptions.torus(major_radius, minor_radius, options.major_segments, options.minor_segments, options.smooth);\n options.name = (_a = options.name) !== null && _a !== void 0 ? _a : 'Custom Torus';\n return this.create_custom_mesh(description, options);\n }\n create_cylinder(height, radius, options = {}) {\n var _a;\n const description = MeshDescriptions.cylinder(height, radius, options.segments, options.smooth);\n options.name = (_a = options.name) !== null && _a !== void 0 ? _a : 'Custom Cylinder';\n return this.create_custom_mesh(description, options);\n }\n create_cone(height, radius, options = {}) {\n var _a;\n const description = MeshDescriptions.cone(height, radius, options.segments, options.smooth);\n options.name = (_a = options.name) !== null && _a !== void 0 ? _a : 'Custom Cone';\n return this.create_custom_mesh(description, options);\n }\n create_circle(radius, options = {}) {\n var _a;\n const description = MeshDescriptions.circle(radius, options.segments);\n options.name = (_a = options.name) !== null && _a !== void 0 ? _a : 'Custom Circle';\n return this.create_custom_mesh(description, options);\n }\n create_custom_mesh(description, options) {\n var _a;\n const object_id = this._viewer.create_custom_mesh(description, options.material);\n options.name = (_a = options.name) !== null && _a !== void 0 ? _a : 'Custom Mesh';\n this._viewer.set_object_name(object_id, options.name + ' (id: ' + object_id + ')');\n return object_id;\n }\n}\n//# sourceMappingURL=PrimitiveBuilder.js.map","export const ORBIT_PLANNER_CAMERA_DESCRIPTION = {\n name: 'orbit-planner-camera-description',\n is_enabled: true,\n initiate_tabs: [\n {\n tag: 'Cameras',\n setup: (tab, camera) => {\n const container = tab.get_container('🎥 ' + camera.name, { is_collapsed: true });\n container.watch(camera, 'offset');\n container.watch(camera, 'target');\n const rotation = container.container('rotation');\n rotation.watch(camera, 'yaw_radians', { name: 'yaw' });\n rotation.watch(camera, 'pitch_radians', { name: 'pitch' });\n const projection = container.container('Projection');\n projection.watch(camera.projection, 'aspect_ratio', { is_readonly: true });\n projection.watch(camera.projection, 'near', { is_readonly: true });\n projection.watch(camera.projection, 'far', { is_readonly: true });\n const fov = projection.container('Field of View', { is_collapsed: true });\n fov.watch(camera.projection, 'field_of_view');\n fov.watch(camera.projection, 'horizontal_fov', { is_readonly: true });\n fov.watch(camera.projection, 'vertical_fov', { is_readonly: true });\n fov.watch(camera.projection, 'field_of_view_direction', { is_readonly: true });\n }\n }\n ]\n};\n//# sourceMappingURL=OrbitPlannerCameraDescription.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar OrbitPlannerCamera_1;\nimport { IVector3, LineType, IBoundingBox } from '../../api.js';\nimport { RAD2DEG, DEG2RAD, vector3_pool, quaternion_pool, matrix_pool, EPSILON_DISTANCE_SQUARED, clamp, lerp_float, EPSILON_DISTANCE, EPSILON_ANGLE_DEGREES } from '../../Math.js';\nimport { Vector3 as BABYLON_Vector3, Quaternion as BABYLON_Quaternion, Matrix as BABYLON_Matrix } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { update_from_partial } from '../../babylon/utility/utils.js';\nimport { FieldOfViewDirection, PerspectiveProjection } from '../PerspectiveProjection.js';\nimport { ViewerCamera } from '../../babylon/camera/ViewerCamera.js';\nimport { Observable } from '../../Observable.js';\nimport { Deprecated } from '../../utils/Deprecated.js';\nimport { PrimitiveBuilder } from '../PrimitiveBuilder/PrimitiveBuilder.js';\nimport { Debug } from '../../utils/DebugLayer/utils/DebugDecorators.js';\nimport { ORBIT_PLANNER_CAMERA_DESCRIPTION } from './debug/OrbitPlannerCameraDescription.js';\nconst MAX_PITCH = Math.PI / 2 - 0.01;\nconst DEFAULT_PAN_SENSITIVITY_RADIUS = 1;\nconst DEFAULT_OFFSET = { min: 0.5, max: 40 };\nconst ALLOWED_OFFSET = { min: 0.1, max: Infinity };\nconst DEFAULT_PLANE = { near: 0.1, far: 100 };\nconst DEBOUNCE_TIME = 0.3;\nconst INERTIA_SPEED_YAW_PITCH = 10;\nconst INERTIA_SPEED_PITCH_COLLISION = 30;\nconst INERTIA_SPEED_ZOOM = 10;\nconst INERTIA_SPEED_PAN = 10;\nconst ZOOM_DELTA_PERCENTAGE = 0.1;\nconst LIMIT_SPRING_STIFFNESS_YAW_PITCH = 8;\nconst LIMIT_SPRING_STIFFNESS_PAN = 5.0;\nlet OrbitPlannerCamera = OrbitPlannerCamera_1 = class OrbitPlannerCamera extends ViewerCamera {\n drag_start(evt) {\n this._is_dragging = true;\n }\n drag_end(evt) {\n this._is_dragging = false;\n }\n pan_start(evt) {\n this._is_panning = true;\n }\n pan_end(evt) {\n this._is_panning = false;\n }\n update_aspect_ratio(aspect_ratio) {\n this._projection.aspect_ratio = aspect_ratio;\n }\n constructor(position, target, viewer, field_of_view_direction = FieldOfViewDirection.HORIZONTAL) {\n super(viewer);\n this._pivot = new BABYLON_Vector3(0, 0, 0);\n this._target_pivot = new BABYLON_Vector3(0, 0, 0);\n this._yaw = 0;\n this._target_yaw = 0; // Used for inertia\n this._pitch = 0;\n this._target_pitch = 0; // Used for inertia\n this._offset = 3;\n this._target_offset = 3; // Used for inertia\n this._view_matrix = new BABYLON_Matrix();\n this._yaw_min = Number.NEGATIVE_INFINITY;\n this._yaw_max = Number.POSITIVE_INFINITY;\n this._pitch_min = -MAX_PITCH;\n this._pitch_max = MAX_PITCH;\n this._offset_min = DEFAULT_OFFSET.min;\n this._offset_max = DEFAULT_OFFSET.max;\n this._is_dragging = false;\n this._is_panning = false;\n this._pan_min = new BABYLON_Vector3(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);\n this._pan_max = new BABYLON_Vector3(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);\n this._is_dirty = true;\n this._notify_observers = false;\n this._input_debounce_timer = 0;\n this._debug_pan_bound_lines = null;\n this._debug_target_sphere = null;\n this._pan_input = new BABYLON_Vector3(0, 0, 0);\n this._pitch_input = 0.0;\n this._yaw_input = 0.0;\n this._zoom_input = 0.0;\n // The frame count for which this camera was last updated\n this._previous_update_frame = -1;\n this.pivot_position_change_observable = new Observable();\n this.name = 'OrbitPlannerCamera';\n this._projection = new PerspectiveProjection(Math.PI / 4, 2, DEFAULT_PLANE.near, DEFAULT_PLANE.far, field_of_view_direction);\n this._scene_sphere_bounds = IBoundingBox.to_bounding_sphere(this.viewer.get_scene_bounds());\n BABYLON_Matrix.IdentityToRef(this._view_matrix);\n this.look_at(position, target);\n }\n /**\n * Clones the camera to create an exact duplicate.\n * @returns A new Camera instance that is an exact copy of the original camera.\n */\n clone() {\n const clone = new OrbitPlannerCamera_1(this.position, this.target, this.viewer);\n clone._projection = this._projection.clone();\n // Limits\n clone._pan_max = this._pan_max;\n clone._pan_min = this._pan_min;\n clone._offset_max = this._offset_max;\n clone._offset_min = this._offset_min;\n clone._yaw_max = this._yaw_max;\n clone._yaw_min = this._yaw_min;\n clone._pitch_max = this._pitch_max;\n clone._pitch_min = this._pitch_min;\n return clone;\n }\n /**\n * Gets the rotation along the ground plane\n */\n get yaw_radians() {\n return this._yaw;\n }\n /**\n * Sets the rotation along the ground plane.\n * Clears any limits that have been set.\n */\n set yaw_radians(val) {\n this.clear_all_limits();\n this.limited_yaw_radians = this.limit_yaw(val);\n this.reset_inertia();\n }\n set limited_yaw_radians(val) {\n if (this._yaw === val)\n return;\n this._yaw = val;\n this.is_dirty = true;\n }\n /**\n * Gets the rotation along the ground plane\n */\n get yaw_degrees() {\n return this.yaw_radians * RAD2DEG;\n }\n /**\n * Sets the rotation along the ground plane.\n * Clears any limits that have been set.\n */\n set yaw_degrees(val) {\n this.yaw_radians = val * DEG2RAD;\n }\n /**\n * Gets the up / down rotation of the camera\n */\n get pitch_radians() {\n return this._pitch;\n }\n /**\n * Sets the up / down rotation of the camera.\n * Clears any limits that have been set.\n */\n set pitch_radians(val) {\n this.clear_all_limits();\n this.limited_pitch_radians = this.limit_pitch(val);\n this.reset_inertia();\n }\n set limited_pitch_radians(val) {\n if (this._pitch === val)\n return;\n this._pitch = val;\n this.is_dirty = true;\n }\n /**\n * Gets the up / down rotation of the camera\n */\n get pitch_degrees() {\n return this.pitch_radians * RAD2DEG;\n }\n /**\n * Sets the up / down rotation of the camera.\n * Clears any limits that have been set.\n */\n set pitch_degrees(val) {\n this.pitch_radians = val * DEG2RAD;\n }\n /**\n * Sets the up / down rotation of the camera while respecting current limits\n */\n set limited_pitch_degrees(val) {\n this.limited_pitch_radians = val * DEG2RAD;\n }\n /**\n * Gets the distance from the pivot/target to the cameras position\n */\n get offset() {\n return this._offset;\n }\n /**\n * Sets the distance from the pivot/target to the cameras position.\n * Clears any limits that have been set.\n */\n set offset(val) {\n this.clear_all_limits();\n this.limited_offset = this.limit_offset(val);\n this.reset_inertia();\n }\n /**\n * Sets the distance from the pivot/target to the cameras position respecting current limits\n */\n set limited_offset(val) {\n if (this._offset !== val) {\n this._offset = val;\n this.is_dirty = true;\n }\n }\n /**\n * Gets a copy of the oribiting position\n */\n get pivot() {\n return this._pivot.toIVector3ToRef({ x: 0, y: 0, z: 0 });\n }\n /**\n * Sets the orbiting position.\n * Clears any limits that have been set.\n */\n set pivot(val) {\n this.clear_all_limits();\n const vector = vector3_pool.fetch();\n this.limited_pivot = this.limit_pivot_to_ref(val, vector);\n this.reset_inertia();\n vector3_pool.return(vector);\n }\n set limited_pivot(val) {\n if (this._pivot.x !== val.x ||\n this._pivot.y !== val.y ||\n this._pivot.z !== val.z) {\n this._pivot.copyFrom(val);\n this.is_dirty = true;\n this.pivot_position_change_observable.notify(this, this._pivot); // For updating debug geometry, and similar.\n }\n }\n /**\n * Gets a copy of the oribiting position, alias for pivot\n */\n get target() {\n return this.pivot;\n }\n /**\n * Sets the orbiting position, alias for pivot.\n * Clears any limits that have been set.\n */\n set target(pos) {\n this.pivot = pos;\n }\n get blend_target() {\n return this._pivot;\n }\n get projection() {\n this.update_basis_and_position();\n // This function must be called after 'update_basis_and_position' as it depends on the correct forward vector state\n this.update_scene_sphere_bounds();\n return this._projection;\n }\n /**\n * Flag indicating if any of the prameters have changed since last generation of view matrix\n */\n get is_dirty() {\n return this._is_dirty;\n }\n set is_dirty(val) {\n this._is_dirty = val;\n }\n // ------------------------------\n // --------- Projection ---------\n // ------------------------------\n /**\n * Gets the horizontal field of view of the camera\n */\n get field_of_view_degrees() {\n return this._projection.field_of_view * RAD2DEG;\n }\n /**\n * Sets the horizontal field of view of the camera\n */\n set field_of_view_degrees(fov_degrees) {\n this._projection.field_of_view = fov_degrees * DEG2RAD;\n }\n /**\n * Gets the horizontal field of view of the camera\n */\n get field_of_view_radians() {\n return this._projection.field_of_view;\n }\n /**\n * Sets the horizontal field of view of the camera\n */\n set field_of_view_radians(fov_radians) {\n this._projection.field_of_view = fov_radians;\n }\n /**\n * Gets the near clipping distance\n * @deprecated\n */\n get near_clip_plane() {\n return this._projection.near;\n }\n /**\n * Sets the near clipping distance\n * @deprecated\n */\n set near_clip_plane(val) {\n this._projection.near = val;\n }\n /**\n * Gets the far clipping distance\n * @deprecated\n */\n get far_clip_plane() {\n return this._projection.far;\n }\n /**\n * Sets the far clipping distance\n * @deprecated\n */\n set far_clip_plane(val) {\n this._projection.far = val;\n }\n /**\n * Used to limit the yaw value based on yaw_min and yaw_max\n * @param yaw The value to limit\n */\n limit_yaw(yaw) {\n return clamp(yaw, this._yaw_min, this._yaw_max);\n }\n /**\n * Used to limit the pitch value based on pitch_min and pitch_max\n * @param pitch The value to limit\n */\n limit_pitch(pitch) {\n return clamp(pitch, this._pitch_min, this._pitch_max);\n }\n /**\n * Used to limit the offset (zoom) value based on offset_min and offset_max\n * @param offset The value to limit\n */\n limit_offset(offset) {\n return clamp(offset, this._offset_min, this._offset_max);\n }\n /**\n * Used to limit the pivot value based on pivot_min and pivot_max\n * @param pivot The vector to limit\n * @param result The Babylon vector which will contain the result\n */\n limit_pivot_to_ref(pivot, result) {\n return result.set(clamp(pivot.x, this._pan_min.x, this._pan_max.x), clamp(pivot.y, this._pan_min.y, this._pan_max.y), clamp(pivot.z, this._pan_min.z, this._pan_max.z));\n }\n /**\n * Called whenever InputManager decided that the camera is the received of a Drag action\n * This will update the target values for yaw, pitch and offset (zoom)\n * @param evt Event with the drag info\n */\n drag_input(evt) {\n this.reset_input_debounce();\n // full screen drag rotates one full turn\n const full_turn = Math.PI * 2;\n this._pitch_input += -evt.delta_y * full_turn;\n this._yaw_input += evt.delta_x * full_turn * this._projection.aspect_ratio;\n }\n pan_input(evt) {\n this.reset_input_debounce();\n const offset_y = vector3_pool.fetch();\n const offset_x = vector3_pool.fetch();\n const new_pivot = vector3_pool.fetch();\n this.update_basis_and_position(); // We need to make sure that internal vectors such as _up is up to date.\n const sensitivity_factor = DEFAULT_PAN_SENSITIVITY_RADIUS * this._offset;\n offset_y.copyFrom(this._up).scaleInPlace(evt.delta_y * sensitivity_factor * (1 / this._projection.aspect_ratio));\n offset_x.copyFrom(this._left).scaleInPlace(evt.delta_x * sensitivity_factor);\n new_pivot.copyFrom(this._target_pivot).addInPlace(offset_x).addInPlace(offset_y);\n const vector = vector3_pool.fetch();\n this._pan_input.addInPlace(offset_x).addInPlace(offset_y);\n vector3_pool.return(offset_x, offset_y, new_pivot, vector);\n }\n /**\n * Called whenever the InputManager decided that the camera is the receiver of a zoom action (scroll or pinch)\n * Updates the target value for the offset\n * @param evt Event with the zoom info\n */\n zoom_input(evt) {\n this.reset_input_debounce();\n const offset = Math.max(this._offset, 1);\n const zoom_value = evt.delta * 0.01 * offset * ZOOM_DELTA_PERCENTAGE;\n this._zoom_input += zoom_value;\n }\n get_ground_collision_radius() {\n return Math.max(0.1, 2.0 * PerspectiveProjection.ALLOWED_PLANE.near);\n }\n get_ground_collision_pitch(offset, pivot, yaw, pitch) {\n const radius = this.get_ground_collision_radius();\n return Math.asin(clamp((pivot.y - radius) / offset, -1.0, 1.0));\n }\n fix_ground(delta_time_in_seconds) {\n // Make sure to do collision math on data where the users inputs have been limited to their constraints.\n const limited_forward = vector3_pool.fetch();\n const limited_right = vector3_pool.fetch();\n const limited_up = vector3_pool.fetch();\n OrbitPlannerCamera_1.calculate_basis_vectors(this.limit_yaw(this._target_yaw), this.limit_pitch(this._target_pitch), limited_right, limited_up, limited_forward);\n const limited_pivot = this.limit_pivot_to_ref(this._target_pivot, vector3_pool.fetch());\n const limited_offset = this.limit_offset(this._target_offset);\n const limited_pitch = this.limit_pitch(this._target_pitch);\n const position = IVector3.add(limited_pivot, IVector3.scale(limited_forward, -limited_offset));\n const radius = this.get_ground_collision_radius();\n if (position.y < radius) {\n // Calculate the actual pitch needed with our new offset, to not cross the ground plane.\n const collide_pitch = Math.asin(clamp((limited_pivot.y - radius) / limited_offset, -1.0, 1.0));\n if (collide_pitch < limited_pitch) {\n const limited_collide_pitch = this.limit_pitch(collide_pitch);\n if (!this._is_dragging) {\n this._target_pitch = lerp_float(this._target_pitch, limited_collide_pitch, Math.min(1.0, delta_time_in_seconds * INERTIA_SPEED_PITCH_COLLISION));\n }\n if (this._is_dragging || limited_collide_pitch !== collide_pitch) {\n const sin_limited_collide_pitch = Math.sin(limited_collide_pitch);\n // Avoid NaNs by only doing this operation when there's some angle between us and our target position\n if (Math.abs(sin_limited_collide_pitch) > Math.sin(EPSILON_ANGLE_DEGREES)) {\n const new_target_offset = (limited_pivot.y - radius) / sin_limited_collide_pitch;\n const limited_new_offset = this.limit_offset(new_target_offset);\n this._target_offset = lerp_float(this._target_offset, limited_new_offset, Math.min(1.0, delta_time_in_seconds * INERTIA_SPEED_PITCH_COLLISION));\n }\n }\n }\n }\n vector3_pool.return(limited_forward, limited_right, limited_up, limited_pivot);\n }\n reset_input_debounce() {\n if (this._input_debounce_timer <= 0) {\n this.interaction_begin_observable.notify(this);\n }\n this._input_debounce_timer = DEBOUNCE_TIME;\n }\n calculate_position_to_ref(position) {\n const vector = vector3_pool.fetch();\n position.copyFrom(this._pivot);\n position.addInPlace(this._forward.scaleToRef(-this._offset, vector));\n vector3_pool.return(vector);\n }\n static calculate_basis_vectors(yaw, pitch, right_out, up_out, forward_out) {\n const horizontal_rotation = BABYLON_Quaternion.RotationAxisToRef(ViewerCamera.UP, -yaw, quaternion_pool.fetch());\n ViewerCamera.FORWARD.rotateByQuaternionToRef(horizontal_rotation, forward_out);\n BABYLON_Vector3.CrossToRef(forward_out, ViewerCamera.UP, right_out);\n right_out.normalize();\n const vertical_rotation = BABYLON_Quaternion.RotationAxisToRef(right_out, pitch, quaternion_pool.fetch());\n forward_out.rotateByQuaternionToRef(vertical_rotation, forward_out);\n forward_out.normalize();\n BABYLON_Vector3.CrossToRef(right_out, forward_out, up_out);\n up_out.normalize();\n quaternion_pool.return(horizontal_rotation, vertical_rotation);\n }\n update_basis_vectors() {\n OrbitPlannerCamera_1.calculate_basis_vectors(this._yaw, this._pitch, this._right, this._up, this._forward);\n this._up.scaleToRef(-1, this._down);\n this._right.scaleToRef(-1, this._left);\n this._forward.scaleToRef(-1, this._backward);\n }\n update_projection_near_far() {\n // Projected distance from the camera forward to the scene sphere bounds\n const distance = IVector3.dot(IVector3.subtract(this._scene_sphere_bounds.position, this._position), this._forward);\n this._projection.near = Math.max(PerspectiveProjection.ALLOWED_PLANE.near, distance - this._scene_sphere_bounds.radius);\n this._projection.far = clamp(distance + this._scene_sphere_bounds.radius, this._projection.near + EPSILON_DISTANCE, PerspectiveProjection.ALLOWED_PLANE.far);\n }\n /**\n * Recalculates and applies the cameras view matrix, direction vectors and projection\n */\n update_basis_and_position() {\n if (!this.is_dirty) {\n return; // If yaw, pitch, offset or pivot has not changes, neither has up, forward, right and position\n }\n this.update_basis_vectors();\n this.calculate_position_to_ref(this._position);\n const camera_matrix = matrix_pool.fetch();\n camera_matrix.setRowFromFloats(0, this._right.x, this._right.y, this._right.z, 0);\n camera_matrix.setRowFromFloats(1, this._up.x, this._up.y, this._up.z, 0);\n camera_matrix.setRowFromFloats(2, this._forward.x, this._forward.y, this._forward.z, 0);\n camera_matrix.setRowFromFloats(3, this._position.x, this._position.y, this._position.z, 1);\n camera_matrix.invertToRef(this._view_matrix);\n BABYLON_Quaternion.FromRotationMatrixToRef(camera_matrix, this._rotation);\n this._view_matrix.toIMatrix4ToRef(this._view_matrix_cache);\n this.update_projection_near_far();\n this._notify_observers = true;\n this.is_dirty = false;\n matrix_pool.return(camera_matrix);\n }\n update_scene_sphere_bounds() {\n const scene_bounding_sphere = IBoundingBox.to_bounding_sphere(this.viewer.get_scene_bounds());\n if (IVector3.equals(scene_bounding_sphere.position, this._scene_sphere_bounds.position) && scene_bounding_sphere.radius === this._scene_sphere_bounds.radius)\n return;\n this._scene_sphere_bounds = scene_bounding_sphere;\n this.update_projection_near_far();\n }\n /**\n * Called by the Viewer camera manager every frame once the camera has been added to the viewer (viewer.push_camera())\n * Updates yaw, pitch, offset (zoom) and pivot of the camera, based on the target value of each and the time since last frame (delta_time).\n * Also makes sure that the camera does not go below the ground, and then updates the actual camera with any changes.\n * @param delta_time The time in miliseconds since the last frame\n */\n update(delta_time) {\n // We only want to debounce/lerp once per frame even if we are the active camera for multiple views\n const delta_time_in_seconds = this._previous_update_frame !== delta_time.elapsed_frames ? delta_time.seconds : 0;\n this._previous_update_frame = delta_time.elapsed_frames;\n this._input_debounce_timer -= delta_time_in_seconds;\n if (this._input_debounce_timer <= 0 && this._input_debounce_timer + delta_time.seconds > 0) {\n this.interaction_end_observable.notify(this);\n }\n const collide_pitch = this.get_ground_collision_pitch(this._target_offset, this._target_pivot, this._target_yaw, this._target_pitch);\n this._target_pitch = this.integrate_springy_constrained_input(this._target_pitch, this._pitch_input, LIMIT_SPRING_STIFFNESS_YAW_PITCH, this._pitch_min, Math.min(this._pitch_max, collide_pitch));\n this._target_yaw = this.integrate_springy_constrained_input(this._target_yaw, this._yaw_input, LIMIT_SPRING_STIFFNESS_YAW_PITCH, this._yaw_min, this._yaw_max);\n this._target_pivot.x = this.integrate_springy_constrained_input(this._target_pivot.x, this._pan_input.x, LIMIT_SPRING_STIFFNESS_PAN, this._pan_min.x, this._pan_max.x);\n this._target_pivot.y = this.integrate_springy_constrained_input(this._target_pivot.y, this._pan_input.y, LIMIT_SPRING_STIFFNESS_PAN, this._pan_min.y, this._pan_max.y);\n this._target_pivot.z = this.integrate_springy_constrained_input(this._target_pivot.z, this._pan_input.z, LIMIT_SPRING_STIFFNESS_PAN, this._pan_min.z, this._pan_max.z);\n // Zero the accumulated input\n this._pitch_input = 0.0;\n this._yaw_input = 0;\n this._pan_input.scaleInPlace(0);\n // Apply zoom input. This has no spring effect.\n this._target_offset = (this._target_offset + this._zoom_input);\n this._zoom_input = 0;\n if (this._pitch_min === this._pitch_max) {\n this._target_pitch = this.limit_pitch(this._target_pitch);\n }\n else if (!this._is_dragging) {\n const collide_pitch = this.get_ground_collision_pitch(this.limit_offset(this._target_offset), this.limit_pivot_to_ref(this._target_pivot, new BABYLON_Vector3()), this.limit_yaw(this._target_yaw), this.limit_pitch(this._target_pitch));\n this._target_pitch = lerp_float(this._target_pitch, Math.min(collide_pitch, this.limit_pitch(this._target_pitch)), Math.min(1.0, 4.0 * delta_time_in_seconds * INERTIA_SPEED_YAW_PITCH));\n }\n if (this._yaw_min === this._yaw_max) {\n this._target_yaw = this.limit_yaw(this._target_yaw);\n }\n else if (!this._is_dragging) {\n this._target_yaw = lerp_float(this._target_yaw, this.limit_yaw(this._target_yaw), Math.min(1.0, 4.0 * delta_time_in_seconds * INERTIA_SPEED_YAW_PITCH));\n }\n const pivot_lerp_t = Math.min(1.0, 4.0 * delta_time_in_seconds * INERTIA_SPEED_PAN);\n const limited_pivot = this.limit_pivot_to_ref(this._target_pivot, new BABYLON_Vector3());\n if (this._pan_min.x === this._pan_max.x) {\n this._target_pivot.x = limited_pivot.x;\n }\n else if (!this._is_panning) {\n this._target_pivot.x = lerp_float(this._target_pivot.x, limited_pivot.x, pivot_lerp_t);\n }\n if (this._pan_min.y === this._pan_max.y) {\n this._target_pivot.y = limited_pivot.y;\n }\n else if (!this._is_panning) {\n this._target_pivot.y = lerp_float(this._target_pivot.y, limited_pivot.y, pivot_lerp_t);\n }\n if (this._pan_min.z === this._pan_max.z) {\n this._target_pivot.z = limited_pivot.z;\n }\n else if (!this._is_panning) {\n this._target_pivot.z = lerp_float(this._target_pivot.z, limited_pivot.z, pivot_lerp_t);\n }\n this._target_offset =\n (this._offset_min === this._offset_max)\n ? this.limit_offset(this._target_offset)\n : lerp_float(this._target_offset, this.limit_offset(this._target_offset), Math.min(1.0, 2.0 * delta_time_in_seconds * INERTIA_SPEED_ZOOM));\n this.fix_ground(delta_time_in_seconds);\n // target values are limited in the drag_input and zoom_input functions. Here we apply inertia, lerping towards out target value for smooth camera motion.\n // The limited_x property sets dirty if value has changed.\n this.limited_yaw_radians = lerp_float(this._yaw, this._target_yaw, Math.min(1.0, delta_time_in_seconds * INERTIA_SPEED_YAW_PITCH));\n this.limited_pitch_radians = lerp_float(this._pitch, this._target_pitch, Math.min(1.0, delta_time_in_seconds * INERTIA_SPEED_YAW_PITCH));\n this.limited_offset = lerp_float(this._offset, this._target_offset, Math.min(1.0, delta_time_in_seconds * INERTIA_SPEED_ZOOM)); // Zoom\n const vector = vector3_pool.fetch();\n this.limited_pivot = BABYLON_Vector3.LerpToRef(this._pivot, this._target_pivot, Math.min(1.0, delta_time_in_seconds * INERTIA_SPEED_PAN), vector); // Pan\n vector3_pool.return(vector);\n this.update_basis_and_position();\n if (this._notify_observers) {\n this.update_observable.notify(this);\n this._notify_observers = false;\n }\n }\n /**\n * Calculate the cameras parameters so that the camera looks at the target location from the position parameter.\n * Clears any limits that have been set.\n * @param position The position of the camera\n * @param target The target (pivot) position that the camera will orbit around\n * @param up The desired up direction of the camera, this will be recalculated to be orthogonal to forward and right vectors\n */\n look_at(position, target, up) {\n this.clear_all_limits();\n this.look_at_internal(position, target, up);\n this.reset_inertia();\n }\n look_at_internal(position, target, up) {\n const vector = vector3_pool.fetch();\n this.limited_pivot = this.limit_pivot_to_ref(target, vector);\n vector3_pool.return(vector);\n // Find yaw\n // Project position to target vector in xz plane, (handle special case if camera is looking up or down)\n // Default forward is { 0, 0, -1 }\n const look = new BABYLON_Vector3(this._pivot.x - position.x, this._pivot.y - position.y, this._pivot.z - position.z);\n const look_length = look.length();\n look.normalizeFromLength(look_length);\n const { yaw, pitch } = OrbitPlannerCamera_1.calculate_yaw_and_pitch(look);\n this.limited_yaw_radians = this.limit_yaw(yaw);\n this.limited_pitch_radians = this.limit_pitch(pitch);\n this.limited_offset = this.limit_offset(look_length);\n }\n /**\n * Note that this function does not normalize forward so it's very important that it receives a normalized vector.\n * @param forward Normalized forward vector for which to calculate yaw and pitch values\n * @returns The calculated Yaw and Pitch values\n */\n static calculate_yaw_and_pitch(forward) {\n const yaw = Math.atan2(forward.x, -forward.z);\n return {\n pitch: Math.asin(forward.y),\n yaw: yaw\n };\n }\n clear_all_limits() {\n this.set_orbit_limits({});\n this.set_pan_limits({\n min: { x: Number.NEGATIVE_INFINITY, y: Number.NEGATIVE_INFINITY, z: Number.NEGATIVE_INFINITY },\n max: { x: Number.POSITIVE_INFINITY, y: Number.POSITIVE_INFINITY, z: Number.POSITIVE_INFINITY }\n });\n this.set_zoom_limits({ near: ALLOWED_OFFSET.min, far: ALLOWED_OFFSET.max });\n }\n /*\n * Limits rotating the camera towards left, right, up, and down.\n * If the forward parameter is omitted the current camera forward will be used.\n * Note that calling this function always updates all orbit limits.\n * Omitting parameters set them to default values rather than keeping them.\n */\n set_orbit_limits(limits) {\n limits = update_from_partial({\n left: Number.POSITIVE_INFINITY,\n right: Number.POSITIVE_INFINITY,\n up: Number.POSITIVE_INFINITY,\n down: Number.POSITIVE_INFINITY,\n forward: this.forward\n }, limits);\n if (IVector3.dot(limits.forward, limits.forward) < EPSILON_DISTANCE_SQUARED) {\n console.error('Invalid forward parameter with a length of zero');\n return;\n }\n const { yaw, pitch } = OrbitPlannerCamera_1.calculate_yaw_and_pitch(limits.forward);\n // Since the yaw we calculated has a range of 0-2pi, remap our yaw to 0-2pi + 2xpi where x is the number of turns we've taken\n const turn = Math.floor((this._yaw + Math.PI) / (2.0 * Math.PI));\n const yaw_diff = (yaw + turn * 2.0 * Math.PI);\n this._yaw_min = yaw_diff - limits.left;\n this._yaw_max = yaw_diff + limits.right;\n // Clamp pitch so that its always in range -MAX_PITCH and MAX_PITCH.\n this._pitch_min = clamp(pitch - limits.down, -MAX_PITCH, MAX_PITCH);\n this._pitch_max = clamp(pitch + limits.up, -MAX_PITCH, MAX_PITCH);\n this.reset_inertia();\n }\n /**\n * Limits the minimum and maximum distance the camera can be from the target.\n * Note that calling this function will set all omitted parameters to default values\n */\n set_zoom_limits(limits) {\n limits = update_from_partial({\n near: DEFAULT_OFFSET.min,\n far: DEFAULT_OFFSET.max\n }, limits);\n this._offset_min = Math.max(limits.near, ALLOWED_OFFSET.min);\n this._offset_max = Math.min(limits.far, ALLOWED_OFFSET.max);\n this.limited_offset = this.limit_offset(this._offset);\n this.reset_inertia();\n }\n set_pan_limits(limits) {\n this._pan_min.set(limits.min.x, limits.min.y, limits.min.z);\n this._pan_max.set(limits.max.x, limits.max.y, limits.max.z);\n const vector = vector3_pool.fetch();\n this.limited_pivot = this.limit_pivot_to_ref(this._pivot, vector);\n vector3_pool.return(vector);\n this.reset_inertia();\n }\n /**\n * Set all target values to the current values for yaw, pitch, offset and pivot\n */\n reset_inertia() {\n this._target_yaw = this._yaw;\n this._target_pitch = this._pitch;\n this._target_offset = this._offset;\n this._target_pivot.copyFrom(this._pivot);\n }\n get_framing_up_vector(direction) {\n // We don't allow setting a custom up vector for framing with this camera, as we only allow setting the forward vector and calculating the rest ourselves\n // Technically, it should be enough in the current implementation to just supply (0, 1, 0) as the up vector for the framing function,\n // as we don't allow pure vertical looking angles anyway.\n // But for future proofing, let's calculate it given the functions we have so it can be re-used in the future.\n if (direction !== undefined) {\n const up = new BABYLON_Vector3();\n const { yaw, pitch } = OrbitPlannerCamera_1.calculate_yaw_and_pitch(direction !== null && direction !== void 0 ? direction : this.forward);\n const tmp_forward = vector3_pool.fetch();\n const tmp_right = vector3_pool.fetch();\n OrbitPlannerCamera_1.calculate_basis_vectors(yaw, pitch, tmp_right, up, tmp_forward);\n vector3_pool.return(tmp_forward, tmp_right);\n return up;\n }\n else {\n return this._up;\n }\n }\n /**\n * Positions the camera so that the given objects are framed.\n * @param objects The objects to frame\n * @param precise Enable to get precise framing (use only if non-precise is insufficient)\n * @param margin The viewport margin (guaranteed space around the objects) in normalized coordinates. Should be in the range 0 - 0.499\n * @param direction The direction to look in. If undefined, the camera's current direction will be used.\n * @param aspect_ratio The aspect ratio to use for framing. If undefined, the camera's last set aspect ratio is used.\n */\n frame_objects(objects, precise = false, margin = 0, direction, aspect_ratio) {\n const advanced_viewer = this.viewer;\n let projection = this._projection;\n if (aspect_ratio !== undefined) {\n projection = this._projection.clone();\n projection.aspect_ratio = aspect_ratio;\n }\n const up = this.get_framing_up_vector(direction);\n return advanced_viewer.get_framed_perspective_camera_matrix(precise, objects, projection, direction || this.forward, up, true, 0.0, margin).then((framing) => {\n this.look_at(framing.camera_matrix[3], framing.framing_target_position, framing.camera_matrix[1]);\n });\n }\n /**\n * Frame a sphere containing an axis-aligned bounding box.\n * @param bounds The box to frame in view.\n * @param direction The direction in which the camera should look. Defaults to the current camera direction\n */\n frame_consistent(bounds, direction, minimum_margin, aspect_ratio) {\n this.clear_all_limits();\n const center = new BABYLON_Vector3();\n center.set((bounds.max.x + bounds.min.x) * 0.5, (bounds.max.y + bounds.min.y) * 0.5, (bounds.max.z + bounds.min.z) * 0.5);\n const vector_1 = vector3_pool.fetch();\n const vector_2 = vector3_pool.fetch();\n const radius = Math.sqrt(Math.max(BABYLON_Vector3.DistanceSquared(center, vector_1.fromIVector3(bounds.min)), BABYLON_Vector3.DistanceSquared(center, vector_2.fromIVector3(bounds.max))));\n if (aspect_ratio === undefined) {\n aspect_ratio = this._projection.aspect_ratio;\n }\n // https://stackoverflow.com/a/44849975\n const horizontal = aspect_ratio > 1;\n const fov = horizontal ? this._projection.vertical_fov : this._projection.horizontal_fov;\n let pad = 1;\n // Normalize padding values from pixels to NDC\n // Currently per axis, not per side.\n const vertical_pad = 1.0 - (2.0 * (minimum_margin || 0));\n const horizontal_pad = 1.0 - (2.0 * (minimum_margin || 0));\n // Smaller value equals more padding (it's a divider).\n // Choose which padding depending on aspect ratio and bring\n // the other value into the same space.\n pad = horizontal ? Math.min(vertical_pad, horizontal_pad * aspect_ratio) : Math.min(horizontal_pad, vertical_pad / aspect_ratio);\n const distance = radius / pad / Math.sin(fov * 0.5);\n const dir = direction\n ? vector_1.fromIVector3(direction).normalize()\n : vector_1.fromIVector3(this.forward);\n const position = center.subtract(dir.scaleInPlace(distance));\n this.look_at(position, center);\n vector3_pool.return(vector_1, vector_2);\n }\n generate_debug_geometries() {\n const primitive_builder = new PrimitiveBuilder(this.viewer);\n const target_sphere = primitive_builder.create_sphere(0.06, { segments: 64 });\n /**\n * All required lines are\n * 0->1, 0->3, 0->4\n * 2->1, 2->3, 2->6\n * 5->1, 5->4, 5->6\n * 7->3, 7->4, 7->6\n */\n const indices = [\n 0, 1, 0, 3, 0, 4,\n 2, 1, 2, 3, 2, 6,\n 5, 1, 5, 4, 5, 6,\n 7, 3, 7, 4, 7, 6\n ];\n const color = { r: 1, g: 0.2, b: 0.2 };\n /**\n * 5_____6\n * /: /|\n * 1/_:__2/ |\n * |4:...|7/\n * 0|/___3|/\n * The following list has the corners depicted in this cube\n */\n const get_pan_limit_corners = () => [\n { x: this._pan_min.x, y: this._pan_min.y, z: this._pan_min.z },\n { x: this._pan_min.x, y: this._pan_max.y, z: this._pan_min.z },\n { x: this._pan_max.x, y: this._pan_max.y, z: this._pan_min.z },\n { x: this._pan_max.x, y: this._pan_min.y, z: this._pan_min.z },\n { x: this._pan_min.x, y: this._pan_min.y, z: this._pan_max.z },\n { x: this._pan_min.x, y: this._pan_max.y, z: this._pan_max.z },\n { x: this._pan_max.x, y: this._pan_max.y, z: this._pan_max.z },\n { x: this._pan_max.x, y: this._pan_min.y, z: this._pan_max.z }\n ];\n const ui_lines = [];\n const corners = get_pan_limit_corners();\n for (let i = 0; i < indices.length; i += 2) {\n ui_lines.push(this.viewer.create_ui_line(LineType.SOLID, corners[indices[i + 0]], corners[indices[i + 1]], color, 0.01));\n }\n this.pivot_position_change_observable.add((sender, pivot) => {\n this.viewer.set_position(target_sphere, pivot.x, pivot.y, pivot.z);\n });\n this.update_observable.add(() => {\n const corners = get_pan_limit_corners();\n for (let i = 0, line_index = 0; i < indices.length; i += 2, line_index++) {\n this.viewer.update_ui_line(ui_lines[line_index], corners[indices[i + 0]], corners[indices[i + 1]]);\n }\n });\n }\n dispose_impl() {\n // Do nothing\n }\n get_projection_matrix(_custom_aspect_ratio) {\n if (_custom_aspect_ratio === undefined) {\n return this.projection.get_projection_matrix();\n }\n else {\n const projection = this.projection.clone();\n projection.aspect_ratio = _custom_aspect_ratio;\n return projection.get_projection_matrix();\n }\n }\n /**\n * Helper function to integrate input gathered over a frame, with springy limits.\n * @param x The state of the input\n * @param delta The input delta gathered during the frame\n * @param stiffness The stiffness of the \"spring\" beyond the limits\n * @param limit_min The limit minimum\n * @param limit_max The limit maximum\n * @returns The new input's state value\n */\n integrate_springy_constrained_input(x, delta, stiffness, limit_min, limit_max) {\n const limited_after_input = clamp(x + delta, limit_min, limit_max);\n if (limited_after_input === x + delta) {\n return x + delta;\n }\n if ((limited_after_input - (x + delta)) * delta >= 0.0) {\n // The input is going away from the limit, so don't limit the sensitivity.\n return x + delta;\n }\n else if (clamp(x, limit_min, limit_max) !== x) {\n // We're outside of our limited range and we're moving further away\n if (x >= limit_max) {\n const c = stiffness * limit_max;\n return x - delta * Math.exp(c - stiffness * x) / -stiffness;\n }\n else {\n const c = stiffness * limit_min;\n return x + delta * Math.exp(stiffness * x - c) / stiffness;\n }\n }\n else {\n // We're not limited yet, but might be\n // Add the input like normal up until the point we hit the limit\n const input_used_up = Math.sign(delta) * Math.abs(limited_after_input - clamp(x, limit_min, limit_max));\n const input_left_after_limit = delta - input_used_up;\n // Update state\n x = limited_after_input;\n delta = input_left_after_limit;\n // Integrate the input with the springiness for the portion after the limit was exceeded.\n if (x >= limit_max) {\n const c = stiffness * limit_max;\n return x - delta * Math.exp(c - stiffness * x) / -stiffness;\n }\n else {\n const c = stiffness * limit_min;\n return x + delta * Math.exp(stiffness * x - c) / stiffness;\n }\n }\n }\n};\n__decorate([\n Deprecated\n], OrbitPlannerCamera.prototype, \"near_clip_plane\", null);\n__decorate([\n Deprecated\n], OrbitPlannerCamera.prototype, \"far_clip_plane\", null);\nOrbitPlannerCamera = OrbitPlannerCamera_1 = __decorate([\n Debug.Describe(ORBIT_PLANNER_CAMERA_DESCRIPTION)\n], OrbitPlannerCamera);\nexport { OrbitPlannerCamera };\n//# sourceMappingURL=OrbitPlannerCamera.js.map","//region block: polyfills\nif (typeof ArrayBuffer.isView === 'undefined') {\n ArrayBuffer.isView = function (a) {\n return a != null && a.__proto__ != null && a.__proto__.__proto__ === Int8Array.prototype.__proto__;\n };\n}\nif (typeof Array.prototype.fill === 'undefined') {\n // Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill#Polyfill\n Object.defineProperty(Array.prototype, 'fill', {value: function (value) {\n // Steps 1-2.\n if (this == null) {\n throw new TypeError('this is null or not defined');\n }\n var O = Object(this); // Steps 3-5.\n var len = O.length >>> 0; // Steps 6-7.\n var start = arguments[1];\n var relativeStart = start >> 0; // Step 8.\n var k = relativeStart < 0 ? Math.max(len + relativeStart, 0) : Math.min(relativeStart, len); // Steps 9-10.\n var end = arguments[2];\n var relativeEnd = end === undefined ? len : end >> 0; // Step 11.\n var finalValue = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : Math.min(relativeEnd, len); // Step 12.\n while (k < finalValue) {\n O[k] = value;\n k++;\n }\n ; // Step 13.\n return O;\n }});\n}\n[Int8Array, Int16Array, Uint16Array, Int32Array, Float32Array, Float64Array].forEach(function (TypedArray) {\n if (typeof TypedArray.prototype.fill === 'undefined') {\n Object.defineProperty(TypedArray.prototype, 'fill', {value: Array.prototype.fill});\n }\n});\nif (typeof Math.sign === 'undefined') {\n Math.sign = function (x) {\n x = +x; // convert to a number\n if (x === 0 || isNaN(x)) {\n return Number(x);\n }\n return x > 0 ? 1 : -1;\n };\n}\nif (typeof Math.clz32 === 'undefined') {\n Math.clz32 = function (log, LN2) {\n return function (x) {\n var asUint = x >>> 0;\n if (asUint === 0) {\n return 32;\n }\n return 31 - (log(asUint) / LN2 | 0) | 0; // the \"| 0\" acts like math.floor\n };\n }(Math.log, Math.LN2);\n}\nif (typeof String.prototype.startsWith === 'undefined') {\n Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {\n position = position || 0;\n return this.lastIndexOf(searchString, position) === position;\n }});\n}\nif (typeof String.prototype.endsWith === 'undefined') {\n Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {\n var subjectString = this.toString();\n if (position === undefined || position > subjectString.length) {\n position = subjectString.length;\n }\n position -= searchString.length;\n var lastIndex = subjectString.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n }});\n}\nif (typeof Math.imul === 'undefined') {\n Math.imul = function imul(a, b) {\n return (a & 4.29490176E9) * (b & 65535) + (a & 65535) * (b | 0) | 0;\n };\n}\n//endregion\n(function (root, factory) {\n if (typeof define === 'function' && define.amd)\n define(['exports'], factory);\n else if (typeof exports === 'object')\n factory(module.exports);\n else\n root['kotlin-kotlin-stdlib'] = factory(typeof this['kotlin-kotlin-stdlib'] === 'undefined' ? {} : this['kotlin-kotlin-stdlib']);\n}(this, function (_) {\n 'use strict';\n //region block: imports\n var clz32 = Math.clz32;\n var imul = Math.imul;\n var isView = ArrayBuffer.isView;\n //endregion\n //region block: pre-declaration\n setMetadataFor(CharSequence, 'CharSequence', interfaceMeta);\n setMetadataFor(Comparable, 'Comparable', interfaceMeta);\n setMetadataFor(Number_0, 'Number', classMeta);\n setMetadataFor(Unit, 'Unit', objectMeta);\n setMetadataFor(ByteCompanionObject, 'ByteCompanionObject', objectMeta);\n setMetadataFor(ShortCompanionObject, 'ShortCompanionObject', objectMeta);\n setMetadataFor(IntCompanionObject, 'IntCompanionObject', objectMeta);\n setMetadataFor(FloatCompanionObject, 'FloatCompanionObject', objectMeta);\n setMetadataFor(DoubleCompanionObject, 'DoubleCompanionObject', objectMeta);\n setMetadataFor(StringCompanionObject, 'StringCompanionObject', objectMeta);\n setMetadataFor(BooleanCompanionObject, 'BooleanCompanionObject', objectMeta);\n setMetadataFor(Comparator, 'Comparator', interfaceMeta);\n setMetadataFor(Collection, 'Collection', interfaceMeta);\n setMetadataFor(AbstractCollection, 'AbstractCollection', classMeta, VOID, [Collection]);\n setMetadataFor(MutableIterable, 'MutableIterable', interfaceMeta);\n setMetadataFor(AbstractMutableCollection, 'AbstractMutableCollection', classMeta, AbstractCollection, [AbstractCollection, MutableIterable, Collection]);\n setMetadataFor(IteratorImpl, 'IteratorImpl', classMeta);\n setMetadataFor(ListIteratorImpl, 'ListIteratorImpl', classMeta, IteratorImpl);\n setMetadataFor(List, 'List', interfaceMeta, VOID, [Collection]);\n setMetadataFor(MutableList, 'MutableList', interfaceMeta, VOID, [List, MutableIterable, Collection]);\n setMetadataFor(AbstractMutableList, 'AbstractMutableList', classMeta, AbstractMutableCollection, [AbstractMutableCollection, MutableList]);\n setMetadataFor(RandomAccess, 'RandomAccess', interfaceMeta);\n setMetadataFor(SubList, 'SubList', classMeta, AbstractMutableList, [AbstractMutableList, RandomAccess]);\n setMetadataFor(Map_0, 'Map', interfaceMeta);\n setMetadataFor(AbstractMap, 'AbstractMap', classMeta, VOID, [Map_0]);\n setMetadataFor(MutableMap, 'MutableMap', interfaceMeta, VOID, [Map_0]);\n setMetadataFor(AbstractMutableMap, 'AbstractMutableMap', classMeta, AbstractMap, [AbstractMap, MutableMap]);\n setMetadataFor(Set, 'Set', interfaceMeta, VOID, [Collection]);\n setMetadataFor(MutableSet, 'MutableSet', interfaceMeta, VOID, [Set, MutableIterable, Collection]);\n setMetadataFor(AbstractMutableSet, 'AbstractMutableSet', classMeta, AbstractMutableCollection, [AbstractMutableCollection, MutableSet]);\n setMetadataFor(Companion, 'Companion', objectMeta);\n setMetadataFor(ArrayList, 'ArrayList', classMeta, AbstractMutableList, [AbstractMutableList, MutableList, RandomAccess], ArrayList_init_$Create$);\n setMetadataFor(HashMap, 'HashMap', classMeta, AbstractMutableMap, [AbstractMutableMap, MutableMap], HashMap_init_$Create$);\n setMetadataFor(HashMapKeys, 'HashMapKeys', classMeta, AbstractMutableSet, [MutableSet, AbstractMutableSet]);\n setMetadataFor(HashMapValues, 'HashMapValues', classMeta, AbstractMutableCollection, [MutableIterable, Collection, AbstractMutableCollection]);\n setMetadataFor(HashMapEntrySetBase, 'HashMapEntrySetBase', classMeta, AbstractMutableSet, [MutableSet, AbstractMutableSet]);\n setMetadataFor(HashMapEntrySet, 'HashMapEntrySet', classMeta, HashMapEntrySetBase);\n setMetadataFor(HashMapKeysDefault$iterator$1, VOID, classMeta);\n setMetadataFor(HashMapKeysDefault, 'HashMapKeysDefault', classMeta, AbstractMutableSet);\n setMetadataFor(HashMapValuesDefault$iterator$1, VOID, classMeta);\n setMetadataFor(HashMapValuesDefault, 'HashMapValuesDefault', classMeta, AbstractMutableCollection);\n setMetadataFor(HashSet, 'HashSet', classMeta, AbstractMutableSet, [AbstractMutableSet, MutableSet], HashSet_init_$Create$);\n setMetadataFor(Companion_0, 'Companion', objectMeta);\n setMetadataFor(Itr, 'Itr', classMeta);\n setMetadataFor(KeysItr, 'KeysItr', classMeta, Itr);\n setMetadataFor(ValuesItr, 'ValuesItr', classMeta, Itr);\n setMetadataFor(EntriesItr, 'EntriesItr', classMeta, Itr);\n setMetadataFor(Entry, 'Entry', interfaceMeta);\n setMetadataFor(EntryRef, 'EntryRef', classMeta, VOID, [Entry]);\n function containsAllEntries(m) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var tmp;\n if (isInterface(m, Collection)) {\n tmp = m.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = m.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.InternalMap.containsAllEntries.' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var entry = element;\n var tmp_0;\n if (!(entry == null) ? isInterface(entry, Entry) : false) {\n tmp_0 = this.c6(entry);\n } else {\n tmp_0 = false;\n }\n if (!tmp_0) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n }\n setMetadataFor(InternalMap, 'InternalMap', interfaceMeta);\n setMetadataFor(InternalHashMap, 'InternalHashMap', classMeta, VOID, [InternalMap], InternalHashMap_init_$Create$);\n setMetadataFor(LinkedHashMap, 'LinkedHashMap', classMeta, HashMap, [HashMap, MutableMap], LinkedHashMap_init_$Create$);\n setMetadataFor(LinkedHashSet, 'LinkedHashSet', classMeta, HashSet, [HashSet, MutableSet], LinkedHashSet_init_$Create$);\n setMetadataFor(BaseOutput, 'BaseOutput', classMeta);\n setMetadataFor(NodeJsOutput, 'NodeJsOutput', classMeta, BaseOutput);\n setMetadataFor(BufferedOutput, 'BufferedOutput', classMeta, BaseOutput, VOID, BufferedOutput);\n setMetadataFor(BufferedOutputToConsoleLog, 'BufferedOutputToConsoleLog', classMeta, BufferedOutput, VOID, BufferedOutputToConsoleLog);\n setMetadataFor(KClass, 'KClass', interfaceMeta);\n setMetadataFor(KClassImpl, 'KClassImpl', classMeta, VOID, [KClass]);\n setMetadataFor(NothingKClassImpl, 'NothingKClassImpl', objectMeta, KClassImpl);\n setMetadataFor(ErrorKClass, 'ErrorKClass', classMeta, VOID, [KClass], ErrorKClass);\n setMetadataFor(PrimitiveKClassImpl, 'PrimitiveKClassImpl', classMeta, KClassImpl);\n setMetadataFor(SimpleKClassImpl, 'SimpleKClassImpl', classMeta, KClassImpl);\n setMetadataFor(KProperty1, 'KProperty1', interfaceMeta);\n setMetadataFor(KProperty0, 'KProperty0', interfaceMeta);\n setMetadataFor(KTypeImpl, 'KTypeImpl', classMeta);\n setMetadataFor(PrimitiveClasses, 'PrimitiveClasses', objectMeta);\n setMetadataFor(Sequence, 'Sequence', interfaceMeta);\n setMetadataFor(ConstrainedOnceSequence, 'ConstrainedOnceSequence', classMeta, VOID, [Sequence]);\n setMetadataFor(StringBuilder, 'StringBuilder', classMeta, VOID, [CharSequence], StringBuilder_init_$Create$_0);\n setMetadataFor(Companion_1, 'Companion', objectMeta);\n setMetadataFor(Regex, 'Regex', classMeta);\n setMetadataFor(MatchGroup, 'MatchGroup', classMeta);\n setMetadataFor(findNext$1$groups$1, VOID, classMeta, AbstractCollection, [Collection, AbstractCollection]);\n setMetadataFor(findNext$1, VOID, classMeta);\n setMetadataFor(Enum, 'Enum', classMeta, VOID, [Comparable]);\n setMetadataFor(DurationUnit, 'DurationUnit', classMeta, Enum);\n setMetadataFor(MonotonicTimeSource, 'MonotonicTimeSource', objectMeta);\n setMetadataFor(Reading, 'Reading', classMeta);\n setMetadataFor(HrTimeSource, 'HrTimeSource', classMeta);\n setMetadataFor(PerformanceTimeSource, 'PerformanceTimeSource', classMeta);\n setMetadataFor(DateNowTimeSource, 'DateNowTimeSource', objectMeta);\n setMetadataFor(_no_name_provided__qut3iv, VOID, classMeta, VOID, [Sequence]);\n setMetadataFor(_no_name_provided__qut3iv_0, VOID, classMeta);\n setMetadataFor(_no_name_provided__qut3iv_1, VOID, classMeta, VOID, [Sequence]);\n setMetadataFor(minus$1, VOID, classMeta, VOID, [Sequence]);\n setMetadataFor(_no_name_provided__qut3iv_2, VOID, classMeta);\n setMetadataFor(Companion_2, 'Companion', objectMeta);\n setMetadataFor(Char, 'Char', classMeta, VOID, [Comparable]);\n setMetadataFor(Companion_3, 'Companion', objectMeta);\n setMetadataFor(arrayIterator$1, VOID, classMeta);\n setMetadataFor(Companion_4, 'Companion', objectMeta);\n setMetadataFor(Long, 'Long', classMeta, Number_0, [Number_0, Comparable]);\n setMetadataFor(Digit, 'Digit', objectMeta);\n setMetadataFor(Letter, 'Letter', objectMeta);\n setMetadataFor(OtherLowercase, 'OtherLowercase', objectMeta);\n setMetadataFor(Continuation, 'Continuation', interfaceMeta);\n setMetadataFor(CoroutineImpl, 'CoroutineImpl', classMeta, VOID, [Continuation]);\n setMetadataFor(CompletedContinuation, 'CompletedContinuation', objectMeta, VOID, [Continuation]);\n setMetadataFor(_no_name_provided__qut3iv_3, VOID, classMeta, CoroutineImpl);\n setMetadataFor(Exception, 'Exception', classMeta, Error, VOID, Exception_init_$Create$);\n setMetadataFor(RuntimeException, 'RuntimeException', classMeta, Exception, VOID, RuntimeException_init_$Create$);\n setMetadataFor(IllegalArgumentException, 'IllegalArgumentException', classMeta, RuntimeException, VOID, IllegalArgumentException_init_$Create$);\n setMetadataFor(IndexOutOfBoundsException, 'IndexOutOfBoundsException', classMeta, RuntimeException, VOID, IndexOutOfBoundsException_init_$Create$);\n setMetadataFor(IllegalStateException, 'IllegalStateException', classMeta, RuntimeException, VOID, IllegalStateException_init_$Create$);\n setMetadataFor(UnsupportedOperationException, 'UnsupportedOperationException', classMeta, RuntimeException, VOID, UnsupportedOperationException_init_$Create$);\n setMetadataFor(NoSuchElementException, 'NoSuchElementException', classMeta, RuntimeException, VOID, NoSuchElementException_init_$Create$);\n setMetadataFor(Error_0, 'Error', classMeta, Error, VOID, Error_init_$Create$);\n setMetadataFor(AssertionError, 'AssertionError', classMeta, Error_0, VOID, AssertionError_init_$Create$);\n setMetadataFor(ConcurrentModificationException, 'ConcurrentModificationException', classMeta, RuntimeException, VOID, ConcurrentModificationException_init_$Create$);\n setMetadataFor(ArithmeticException, 'ArithmeticException', classMeta, RuntimeException, VOID, ArithmeticException_init_$Create$);\n setMetadataFor(NumberFormatException, 'NumberFormatException', classMeta, IllegalArgumentException, VOID, NumberFormatException_init_$Create$);\n setMetadataFor(NullPointerException, 'NullPointerException', classMeta, RuntimeException, VOID, NullPointerException_init_$Create$);\n setMetadataFor(NoWhenBranchMatchedException, 'NoWhenBranchMatchedException', classMeta, RuntimeException, VOID, NoWhenBranchMatchedException_init_$Create$);\n setMetadataFor(ClassCastException, 'ClassCastException', classMeta, RuntimeException, VOID, ClassCastException_init_$Create$);\n setMetadataFor(UninitializedPropertyAccessException, 'UninitializedPropertyAccessException', classMeta, RuntimeException, VOID, UninitializedPropertyAccessException_init_$Create$);\n setMetadataFor(AbstractIterator, 'AbstractIterator', classMeta);\n setMetadataFor(State, 'State', classMeta, Enum);\n setMetadataFor(IteratorImpl_0, 'IteratorImpl', classMeta);\n setMetadataFor(ListIteratorImpl_0, 'ListIteratorImpl', classMeta, IteratorImpl_0);\n setMetadataFor(Companion_5, 'Companion', objectMeta);\n setMetadataFor(AbstractList, 'AbstractList', classMeta, AbstractCollection, [AbstractCollection, List]);\n setMetadataFor(AbstractMap$keys$1$iterator$1, VOID, classMeta);\n setMetadataFor(AbstractMap$values$1$iterator$1, VOID, classMeta);\n setMetadataFor(Companion_6, 'Companion', objectMeta);\n setMetadataFor(AbstractSet, 'AbstractSet', classMeta, AbstractCollection, [AbstractCollection, Set]);\n setMetadataFor(AbstractMap$keys$1, VOID, classMeta, AbstractSet);\n setMetadataFor(AbstractMap$values$1, VOID, classMeta, AbstractCollection);\n setMetadataFor(Companion_7, 'Companion', objectMeta);\n setMetadataFor(EmptyList, 'EmptyList', objectMeta, VOID, [List, RandomAccess]);\n setMetadataFor(ArrayAsCollection, 'ArrayAsCollection', classMeta, VOID, [Collection]);\n setMetadataFor(EmptyIterator, 'EmptyIterator', objectMeta);\n setMetadataFor(IndexedValue, 'IndexedValue', classMeta);\n setMetadataFor(IndexingIterable, 'IndexingIterable', classMeta);\n setMetadataFor(IndexingIterator, 'IndexingIterator', classMeta);\n setMetadataFor(MapWithDefault, 'MapWithDefault', interfaceMeta, VOID, [Map_0]);\n setMetadataFor(EmptyMap, 'EmptyMap', objectMeta, VOID, [Map_0]);\n setMetadataFor(IntIterator, 'IntIterator', classMeta);\n setMetadataFor(SequenceScope, 'SequenceScope', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);\n setMetadataFor(SequenceBuilderIterator, 'SequenceBuilderIterator', classMeta, SequenceScope, [SequenceScope, Continuation], SequenceBuilderIterator, VOID, VOID, [1]);\n setMetadataFor(_no_name_provided__qut3iv_4, VOID, classMeta, VOID, [Sequence]);\n setMetadataFor(TransformingSequence$iterator$1, VOID, classMeta);\n setMetadataFor(TransformingSequence, 'TransformingSequence', classMeta, VOID, [Sequence]);\n setMetadataFor(FilteringSequence$iterator$1, VOID, classMeta);\n setMetadataFor(FilteringSequence, 'FilteringSequence', classMeta, VOID, [Sequence]);\n setMetadataFor(FlatteningSequence$iterator$1, VOID, classMeta);\n setMetadataFor(FlatteningSequence, 'FlatteningSequence', classMeta, VOID, [Sequence]);\n setMetadataFor(DistinctSequence, 'DistinctSequence', classMeta, VOID, [Sequence]);\n setMetadataFor(EmptySequence, 'EmptySequence', objectMeta, VOID, [Sequence]);\n setMetadataFor(DistinctIterator, 'DistinctIterator', classMeta, AbstractIterator);\n setMetadataFor(GeneratorSequence$iterator$1, VOID, classMeta);\n setMetadataFor(GeneratorSequence, 'GeneratorSequence', classMeta, VOID, [Sequence]);\n setMetadataFor(_no_name_provided__qut3iv_5, VOID, classMeta, VOID, [Sequence]);\n setMetadataFor(EmptySet, 'EmptySet', objectMeta, VOID, [Set]);\n setMetadataFor(NaturalOrderComparator, 'NaturalOrderComparator', objectMeta, VOID, [Comparator]);\n setMetadataFor(Key, 'Key', objectMeta);\n function releaseInterceptedContinuation(continuation) {\n }\n setMetadataFor(ContinuationInterceptor, 'ContinuationInterceptor', interfaceMeta);\n setMetadataFor(EmptyCoroutineContext, 'EmptyCoroutineContext', objectMeta);\n setMetadataFor(CoroutineSingletons, 'CoroutineSingletons', classMeta, Enum);\n setMetadataFor(EnumEntriesList, 'EnumEntriesList', classMeta, AbstractList, [List, AbstractList]);\n setMetadataFor(Random, 'Random', classMeta);\n setMetadataFor(Default, 'Default', objectMeta, Random);\n setMetadataFor(Companion_8, 'Companion', objectMeta);\n setMetadataFor(XorWowRandom, 'XorWowRandom', classMeta, Random);\n setMetadataFor(Companion_9, 'Companion', objectMeta);\n setMetadataFor(IntProgression, 'IntProgression', classMeta);\n function contains(value) {\n return compareTo_0(value, this.s9()) >= 0 ? compareTo_0(value, this.r9()) <= 0 : false;\n }\n setMetadataFor(ClosedRange, 'ClosedRange', interfaceMeta);\n setMetadataFor(IntRange, 'IntRange', classMeta, IntProgression, [IntProgression, ClosedRange]);\n setMetadataFor(IntProgressionIterator, 'IntProgressionIterator', classMeta, IntIterator);\n setMetadataFor(Companion_10, 'Companion', objectMeta);\n setMetadataFor(KTypeParameter, 'KTypeParameter', interfaceMeta);\n setMetadataFor(DelimitedRangesSequence$iterator$1, VOID, classMeta);\n setMetadataFor(DelimitedRangesSequence, 'DelimitedRangesSequence', classMeta, VOID, [Sequence]);\n setMetadataFor(Companion_11, 'Companion', objectMeta);\n setMetadataFor(Duration, 'Duration', classMeta, VOID, [Comparable]);\n function compareTo(other) {\n return Duration__compareTo_impl_pchp0f(this.ei(other), Companion_getInstance_11().ja_1);\n }\n setMetadataFor(ComparableTimeMark, 'ComparableTimeMark', interfaceMeta, VOID, [Comparable]);\n setMetadataFor(ValueTimeMark, 'ValueTimeMark', classMeta, VOID, [ComparableTimeMark]);\n setMetadataFor(Monotonic, 'Monotonic', objectMeta);\n setMetadataFor(DeepRecursiveScope, 'DeepRecursiveScope', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);\n setMetadataFor(DeepRecursiveFunction, 'DeepRecursiveFunction', classMeta);\n setMetadataFor(DeepRecursiveScopeImpl, 'DeepRecursiveScopeImpl', classMeta, DeepRecursiveScope, [DeepRecursiveScope, Continuation], VOID, VOID, VOID, [1]);\n setMetadataFor(LazyThreadSafetyMode, 'LazyThreadSafetyMode', classMeta, Enum);\n setMetadataFor(UnsafeLazyImpl, 'UnsafeLazyImpl', classMeta);\n setMetadataFor(UNINITIALIZED_VALUE, 'UNINITIALIZED_VALUE', objectMeta);\n setMetadataFor(Companion_12, 'Companion', objectMeta);\n setMetadataFor(Failure, 'Failure', classMeta);\n setMetadataFor(Result, 'Result', classMeta);\n setMetadataFor(NotImplementedError, 'NotImplementedError', classMeta, Error_0, VOID, NotImplementedError);\n setMetadataFor(Pair, 'Pair', classMeta);\n setMetadataFor(Triple, 'Triple', classMeta);\n setMetadataFor(Companion_13, 'Companion', objectMeta);\n setMetadataFor(UByte, 'UByte', classMeta, VOID, [Comparable]);\n setMetadataFor(Iterator, 'Iterator', classMeta);\n setMetadataFor(UByteArray, 'UByteArray', classMeta, VOID, [Collection]);\n setMetadataFor(Companion_14, 'Companion', objectMeta);\n setMetadataFor(UInt, 'UInt', classMeta, VOID, [Comparable]);\n setMetadataFor(Iterator_0, 'Iterator', classMeta);\n setMetadataFor(UIntArray, 'UIntArray', classMeta, VOID, [Collection]);\n setMetadataFor(Companion_15, 'Companion', objectMeta);\n setMetadataFor(ULong, 'ULong', classMeta, VOID, [Comparable]);\n setMetadataFor(Iterator_1, 'Iterator', classMeta);\n setMetadataFor(ULongArray, 'ULongArray', classMeta, VOID, [Collection]);\n setMetadataFor(Companion_16, 'Companion', objectMeta);\n setMetadataFor(UShort, 'UShort', classMeta, VOID, [Comparable]);\n setMetadataFor(Iterator_2, 'Iterator', classMeta);\n setMetadataFor(UShortArray, 'UShortArray', classMeta, VOID, [Collection]);\n //endregion\n function CharSequence() {\n }\n function Comparable() {\n }\n function Number_0() {\n }\n function Unit() {\n }\n protoOf(Unit).toString = function () {\n return 'kotlin.Unit';\n };\n var Unit_instance;\n function Unit_getInstance() {\n return Unit_instance;\n }\n function ByteCompanionObject() {\n this.MIN_VALUE = -128;\n this.MAX_VALUE = 127;\n this.SIZE_BYTES = 1;\n this.SIZE_BITS = 8;\n }\n protoOf(ByteCompanionObject).e = function () {\n return this.MIN_VALUE;\n };\n protoOf(ByteCompanionObject).f = function () {\n return this.MAX_VALUE;\n };\n protoOf(ByteCompanionObject).g = function () {\n return this.SIZE_BYTES;\n };\n protoOf(ByteCompanionObject).h = function () {\n return this.SIZE_BITS;\n };\n var ByteCompanionObject_instance;\n function ByteCompanionObject_getInstance() {\n return ByteCompanionObject_instance;\n }\n function ShortCompanionObject() {\n this.MIN_VALUE = -32768;\n this.MAX_VALUE = 32767;\n this.SIZE_BYTES = 2;\n this.SIZE_BITS = 16;\n }\n protoOf(ShortCompanionObject).e = function () {\n return this.MIN_VALUE;\n };\n protoOf(ShortCompanionObject).f = function () {\n return this.MAX_VALUE;\n };\n protoOf(ShortCompanionObject).g = function () {\n return this.SIZE_BYTES;\n };\n protoOf(ShortCompanionObject).h = function () {\n return this.SIZE_BITS;\n };\n var ShortCompanionObject_instance;\n function ShortCompanionObject_getInstance() {\n return ShortCompanionObject_instance;\n }\n function IntCompanionObject() {\n this.MIN_VALUE = -2147483648;\n this.MAX_VALUE = 2147483647;\n this.SIZE_BYTES = 4;\n this.SIZE_BITS = 32;\n }\n protoOf(IntCompanionObject).e = function () {\n return this.MIN_VALUE;\n };\n protoOf(IntCompanionObject).f = function () {\n return this.MAX_VALUE;\n };\n protoOf(IntCompanionObject).g = function () {\n return this.SIZE_BYTES;\n };\n protoOf(IntCompanionObject).h = function () {\n return this.SIZE_BITS;\n };\n var IntCompanionObject_instance;\n function IntCompanionObject_getInstance() {\n return IntCompanionObject_instance;\n }\n function FloatCompanionObject() {\n this.MIN_VALUE = 1.4E-45;\n this.MAX_VALUE = 3.4028235E38;\n this.POSITIVE_INFINITY = Infinity;\n this.NEGATIVE_INFINITY = -Infinity;\n this.NaN = NaN;\n this.SIZE_BYTES = 4;\n this.SIZE_BITS = 32;\n }\n protoOf(FloatCompanionObject).e = function () {\n return this.MIN_VALUE;\n };\n protoOf(FloatCompanionObject).f = function () {\n return this.MAX_VALUE;\n };\n protoOf(FloatCompanionObject).i = function () {\n return this.POSITIVE_INFINITY;\n };\n protoOf(FloatCompanionObject).j = function () {\n return this.NEGATIVE_INFINITY;\n };\n protoOf(FloatCompanionObject).k = function () {\n return this.NaN;\n };\n protoOf(FloatCompanionObject).g = function () {\n return this.SIZE_BYTES;\n };\n protoOf(FloatCompanionObject).h = function () {\n return this.SIZE_BITS;\n };\n var FloatCompanionObject_instance;\n function FloatCompanionObject_getInstance() {\n return FloatCompanionObject_instance;\n }\n function DoubleCompanionObject() {\n this.MIN_VALUE = 4.9E-324;\n this.MAX_VALUE = 1.7976931348623157E308;\n this.POSITIVE_INFINITY = Infinity;\n this.NEGATIVE_INFINITY = -Infinity;\n this.NaN = NaN;\n this.SIZE_BYTES = 8;\n this.SIZE_BITS = 64;\n }\n protoOf(DoubleCompanionObject).e = function () {\n return this.MIN_VALUE;\n };\n protoOf(DoubleCompanionObject).f = function () {\n return this.MAX_VALUE;\n };\n protoOf(DoubleCompanionObject).i = function () {\n return this.POSITIVE_INFINITY;\n };\n protoOf(DoubleCompanionObject).j = function () {\n return this.NEGATIVE_INFINITY;\n };\n protoOf(DoubleCompanionObject).k = function () {\n return this.NaN;\n };\n protoOf(DoubleCompanionObject).g = function () {\n return this.SIZE_BYTES;\n };\n protoOf(DoubleCompanionObject).h = function () {\n return this.SIZE_BITS;\n };\n var DoubleCompanionObject_instance;\n function DoubleCompanionObject_getInstance() {\n return DoubleCompanionObject_instance;\n }\n function StringCompanionObject() {\n }\n var StringCompanionObject_instance;\n function StringCompanionObject_getInstance() {\n return StringCompanionObject_instance;\n }\n function BooleanCompanionObject() {\n }\n var BooleanCompanionObject_instance;\n function BooleanCompanionObject_getInstance() {\n return BooleanCompanionObject_instance;\n }\n function Comparator() {\n }\n function isNaN_0(_this__u8e3s4) {\n return !(_this__u8e3s4 === _this__u8e3s4);\n }\n function isFinite(_this__u8e3s4) {\n return !isInfinite(_this__u8e3s4) ? !isNaN_0(_this__u8e3s4) : false;\n }\n function isInfinite(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4 === Infinity) {\n tmp = true;\n } else {\n tmp = _this__u8e3s4 === -Infinity;\n }\n return tmp;\n }\n function takeHighestOneBit(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4 === 0) {\n tmp = 0;\n } else {\n var tmp_0 = 32 - 1 | 0;\n // Inline function 'kotlin.countLeadingZeroBits' call\n tmp = 1 << (tmp_0 - clz32(_this__u8e3s4) | 0);\n }\n return tmp;\n }\n function isFinite_0(_this__u8e3s4) {\n return !isInfinite_0(_this__u8e3s4) ? !isNaN_1(_this__u8e3s4) : false;\n }\n function isInfinite_0(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4 === Infinity) {\n tmp = true;\n } else {\n tmp = _this__u8e3s4 === -Infinity;\n }\n return tmp;\n }\n function isNaN_1(_this__u8e3s4) {\n return !(_this__u8e3s4 === _this__u8e3s4);\n }\n function countTrailingZeroBits(_this__u8e3s4) {\n var low = _this__u8e3s4.l_1;\n var tmp;\n if (low === 0) {\n tmp = 32 + countTrailingZeroBits_0(_this__u8e3s4.m_1) | 0;\n } else {\n tmp = countTrailingZeroBits_0(low);\n }\n return tmp;\n }\n function countTrailingZeroBits_0(_this__u8e3s4) {\n // Inline function 'kotlin.countLeadingZeroBits' call\n var this_0 = ~(_this__u8e3s4 | (-_this__u8e3s4 | 0));\n return 32 - clz32(this_0) | 0;\n }\n function collectionToArray(collection) {\n return collectionToArrayCommonImpl(collection);\n }\n function arrayOfNulls(reference, size) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.arrayOfNulls' call\n // Inline function 'kotlin.js.asDynamic' call\n return fillArrayVal(Array(size), null);\n }\n function listOf(element) {\n return arrayListOf([element]);\n }\n function setOf(element) {\n return hashSetOf([element]);\n }\n function sort(_this__u8e3s4) {\n collectionsSort(_this__u8e3s4, naturalOrder());\n }\n function mapOf(pair) {\n return hashMapOf([pair]);\n }\n function mapCapacity(expectedSize) {\n return expectedSize;\n }\n function checkIndexOverflow(index) {\n if (index < 0) {\n throwIndexOverflow();\n }\n return index;\n }\n function sortWith(_this__u8e3s4, comparator) {\n collectionsSort(_this__u8e3s4, comparator);\n }\n function copyToArray(collection) {\n var tmp;\n // Inline function 'kotlin.js.asDynamic' call\n if (collection.toArray !== undefined) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = collection.toArray();\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = collectionToArray(collection);\n }\n return tmp;\n }\n function collectionsSort(list, comparator) {\n if (list.n() <= 1)\n return Unit_instance;\n var array = copyToArray(list);\n sortArrayWith(array, comparator);\n var inductionVariable = 0;\n var last = array.length;\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n list.o(i, array[i]);\n }\n while (inductionVariable < last);\n }\n function AbstractMutableCollection$removeAll$lambda($elements) {\n return function (it) {\n return $elements.p(it);\n };\n }\n function AbstractMutableCollection() {\n AbstractCollection.call(this);\n }\n protoOf(AbstractMutableCollection).r = function (element) {\n this.s();\n var iterator = this.t();\n while (iterator.u()) {\n if (equals_0(iterator.w(), element)) {\n iterator.v();\n return true;\n }\n }\n return false;\n };\n protoOf(AbstractMutableCollection).x = function (elements) {\n this.s();\n var modified = false;\n var tmp0_iterator = elements.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n if (this.q(element))\n modified = true;\n }\n return modified;\n };\n protoOf(AbstractMutableCollection).y = function (elements) {\n this.s();\n var tmp = isInterface(this, MutableIterable) ? this : THROW_CCE();\n return removeAll_1(tmp, AbstractMutableCollection$removeAll$lambda(elements));\n };\n protoOf(AbstractMutableCollection).z = function () {\n this.s();\n var iterator = this.t();\n while (iterator.u()) {\n iterator.w();\n iterator.v();\n }\n };\n protoOf(AbstractMutableCollection).toJSON = function () {\n return this.toArray();\n };\n protoOf(AbstractMutableCollection).s = function () {\n };\n function IteratorImpl($outer) {\n this.e1_1 = $outer;\n this.c1_1 = 0;\n this.d1_1 = -1;\n }\n protoOf(IteratorImpl).u = function () {\n return this.c1_1 < this.e1_1.n();\n };\n protoOf(IteratorImpl).w = function () {\n if (!this.u())\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.c1_1;\n this.c1_1 = tmp1 + 1 | 0;\n tmp.d1_1 = tmp1;\n return this.e1_1.f1(this.d1_1);\n };\n protoOf(IteratorImpl).v = function () {\n // Inline function 'kotlin.check' call\n // Inline function 'kotlin.contracts.contract' call\n if (!!(this.d1_1 === -1)) {\n // Inline function 'kotlin.collections.IteratorImpl.remove.' call\n var message = 'Call next() or previous() before removing element from the iterator.';\n throw IllegalStateException_init_$Create$_0(toString_1(message));\n }\n this.e1_1.h1(this.d1_1);\n this.c1_1 = this.d1_1;\n this.d1_1 = -1;\n };\n function ListIteratorImpl($outer, index) {\n this.l1_1 = $outer;\n IteratorImpl.call(this, $outer);\n Companion_instance_5.n1(index, this.l1_1.n());\n this.c1_1 = index;\n }\n protoOf(ListIteratorImpl).o1 = function () {\n return this.c1_1 > 0;\n };\n protoOf(ListIteratorImpl).p1 = function () {\n return this.c1_1;\n };\n protoOf(ListIteratorImpl).q1 = function () {\n if (!this.o1())\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n this.c1_1 = this.c1_1 - 1 | 0;\n tmp.d1_1 = this.c1_1;\n return this.l1_1.f1(this.d1_1);\n };\n function SubList(list, fromIndex, toIndex) {\n AbstractMutableList.call(this);\n this.s1_1 = list;\n this.t1_1 = fromIndex;\n this.u1_1 = 0;\n Companion_instance_5.v1(this.t1_1, toIndex, this.s1_1.n());\n this.u1_1 = toIndex - this.t1_1 | 0;\n }\n protoOf(SubList).w1 = function (index, element) {\n Companion_instance_5.n1(index, this.u1_1);\n this.s1_1.w1(this.t1_1 + index | 0, element);\n this.u1_1 = this.u1_1 + 1 | 0;\n };\n protoOf(SubList).f1 = function (index) {\n Companion_instance_5.x1(index, this.u1_1);\n return this.s1_1.f1(this.t1_1 + index | 0);\n };\n protoOf(SubList).h1 = function (index) {\n Companion_instance_5.x1(index, this.u1_1);\n var result = this.s1_1.h1(this.t1_1 + index | 0);\n this.u1_1 = this.u1_1 - 1 | 0;\n return result;\n };\n protoOf(SubList).o = function (index, element) {\n Companion_instance_5.x1(index, this.u1_1);\n return this.s1_1.o(this.t1_1 + index | 0, element);\n };\n protoOf(SubList).n = function () {\n return this.u1_1;\n };\n protoOf(SubList).s = function () {\n return this.s1_1.s();\n };\n function AbstractMutableList$removeAll$lambda($elements) {\n return function (it) {\n return $elements.p(it);\n };\n }\n function AbstractMutableList$retainAll$lambda($elements) {\n return function (it) {\n return !$elements.p(it);\n };\n }\n function AbstractMutableList() {\n AbstractMutableCollection.call(this);\n this.g1_1 = 0;\n }\n protoOf(AbstractMutableList).q = function (element) {\n this.s();\n this.w1(this.n(), element);\n return true;\n };\n protoOf(AbstractMutableList).y1 = function (index, elements) {\n Companion_instance_5.n1(index, this.n());\n this.s();\n var _index = index;\n var changed = false;\n var tmp0_iterator = elements.t();\n while (tmp0_iterator.u()) {\n var e = tmp0_iterator.w();\n var tmp1 = _index;\n _index = tmp1 + 1 | 0;\n this.w1(tmp1, e);\n changed = true;\n }\n return changed;\n };\n protoOf(AbstractMutableList).z = function () {\n this.s();\n this.f2(0, this.n());\n };\n protoOf(AbstractMutableList).y = function (elements) {\n this.s();\n return removeAll(this, AbstractMutableList$removeAll$lambda(elements));\n };\n protoOf(AbstractMutableList).z1 = function (elements) {\n this.s();\n return removeAll(this, AbstractMutableList$retainAll$lambda(elements));\n };\n protoOf(AbstractMutableList).t = function () {\n return new IteratorImpl(this);\n };\n protoOf(AbstractMutableList).p = function (element) {\n return this.a2(element) >= 0;\n };\n protoOf(AbstractMutableList).a2 = function (element) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.indexOfFirst' call\n var index = 0;\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'kotlin.collections.AbstractMutableList.indexOf.' call\n if (equals_0(item, element)) {\n tmp$ret$1 = index;\n break $l$block;\n }\n index = index + 1 | 0;\n }\n tmp$ret$1 = -1;\n }\n return tmp$ret$1;\n };\n protoOf(AbstractMutableList).b2 = function (element) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.indexOfLast' call\n var iterator = this.d2(this.n());\n while (iterator.o1()) {\n // Inline function 'kotlin.collections.AbstractMutableList.lastIndexOf.' call\n var it = iterator.q1();\n if (equals_0(it, element)) {\n tmp$ret$1 = iterator.p1();\n break $l$block;\n }\n }\n tmp$ret$1 = -1;\n }\n return tmp$ret$1;\n };\n protoOf(AbstractMutableList).c2 = function () {\n return this.d2(0);\n };\n protoOf(AbstractMutableList).d2 = function (index) {\n return new ListIteratorImpl(this, index);\n };\n protoOf(AbstractMutableList).e2 = function (fromIndex, toIndex) {\n return new SubList(this, fromIndex, toIndex);\n };\n protoOf(AbstractMutableList).f2 = function (fromIndex, toIndex) {\n var iterator = this.d2(fromIndex);\n // Inline function 'kotlin.repeat' call\n var times = toIndex - fromIndex | 0;\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable = 0;\n if (inductionVariable < times)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.AbstractMutableList.removeRange.' call\n iterator.w();\n iterator.v();\n }\n while (inductionVariable < times);\n };\n protoOf(AbstractMutableList).equals = function (other) {\n if (other === this)\n return true;\n if (!(!(other == null) ? isInterface(other, List) : false))\n return false;\n return Companion_instance_5.g2(this, other);\n };\n protoOf(AbstractMutableList).hashCode = function () {\n return Companion_instance_5.h2(this);\n };\n function AbstractMutableMap() {\n AbstractMap.call(this);\n this.k2_1 = null;\n this.l2_1 = null;\n }\n protoOf(AbstractMutableMap).m2 = function () {\n return new HashMapKeysDefault(this);\n };\n protoOf(AbstractMutableMap).n2 = function () {\n return new HashMapValuesDefault(this);\n };\n protoOf(AbstractMutableMap).o2 = function () {\n var tmp0_elvis_lhs = this.k2_1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n var this_0 = this.m2();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.AbstractMutableMap..' call\n this.k2_1 = this_0;\n tmp = this_0;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(AbstractMutableMap).p2 = function () {\n var tmp0_elvis_lhs = this.l2_1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n var this_0 = this.n2();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.AbstractMutableMap..' call\n this.l2_1 = this_0;\n tmp = this_0;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(AbstractMutableMap).z = function () {\n this.q2().z();\n };\n protoOf(AbstractMutableMap).s2 = function (from) {\n this.s();\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = from.q2().t();\n while (tmp0_iterator.u()) {\n var tmp1_loop_parameter = tmp0_iterator.w();\n // Inline function 'kotlin.collections.component1' call\n var key = tmp1_loop_parameter.t2();\n // Inline function 'kotlin.collections.component2' call\n var value = tmp1_loop_parameter.u2();\n this.r2(key, value);\n }\n };\n protoOf(AbstractMutableMap).v2 = function (key) {\n this.s();\n var iter = this.q2().t();\n while (iter.u()) {\n var entry = iter.w();\n var k = entry.t2();\n if (equals_0(key, k)) {\n var value = entry.u2();\n iter.v();\n return value;\n }\n }\n return null;\n };\n protoOf(AbstractMutableMap).s = function () {\n };\n function AbstractMutableSet() {\n AbstractMutableCollection.call(this);\n }\n protoOf(AbstractMutableSet).equals = function (other) {\n if (other === this)\n return true;\n if (!(!(other == null) ? isInterface(other, Set) : false))\n return false;\n return Companion_instance_7.c3(this, other);\n };\n protoOf(AbstractMutableSet).hashCode = function () {\n return Companion_instance_7.d3(this);\n };\n function arrayOfUninitializedElements(capacity) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(capacity >= 0)) {\n // Inline function 'kotlin.collections.arrayOfUninitializedElements.' call\n var message = 'capacity must be non-negative.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.arrayOfNulls' call\n // Inline function 'kotlin.js.asDynamic' call\n return fillArrayVal(Array(capacity), null);\n }\n function resetAt(_this__u8e3s4, index) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n _this__u8e3s4[index] = null;\n }\n function resetRange(_this__u8e3s4, fromIndex, toIndex) {\n // Inline function 'kotlin.js.nativeFill' call\n // Inline function 'kotlin.js.asDynamic' call\n _this__u8e3s4.fill(null, fromIndex, toIndex);\n }\n function copyOfUninitializedElements(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return copyOf_7(_this__u8e3s4, newSize);\n }\n function Companion() {\n Companion_instance = this;\n var tmp = this;\n // Inline function 'kotlin.also' call\n var this_0 = ArrayList_init_$Create$_0(0);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.Companion.Empty.' call\n this_0.g3_1 = true;\n tmp.h3_1 = this_0;\n }\n var Companion_instance;\n function Companion_getInstance() {\n if (Companion_instance == null)\n new Companion();\n return Companion_instance;\n }\n function ArrayList_init_$Init$($this) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n ArrayList.call($this, tmp$ret$0);\n return $this;\n }\n function ArrayList_init_$Create$() {\n return ArrayList_init_$Init$(objectCreate(protoOf(ArrayList)));\n }\n function ArrayList_init_$Init$_0(initialCapacity, $this) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n ArrayList.call($this, tmp$ret$0);\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(initialCapacity >= 0)) {\n // Inline function 'kotlin.collections.ArrayList..' call\n var message = 'Negative initial capacity: ' + initialCapacity;\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n return $this;\n }\n function ArrayList_init_$Create$_0(initialCapacity) {\n return ArrayList_init_$Init$_0(initialCapacity, objectCreate(protoOf(ArrayList)));\n }\n function ArrayList_init_$Init$_1(elements, $this) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$0 = copyToArray(elements);\n ArrayList.call($this, tmp$ret$0);\n return $this;\n }\n function ArrayList_init_$Create$_1(elements) {\n return ArrayList_init_$Init$_1(elements, objectCreate(protoOf(ArrayList)));\n }\n function increaseLength($this, amount) {\n var previous = $this.n();\n // Inline function 'kotlin.js.asDynamic' call\n $this.f3_1.length = $this.n() + amount | 0;\n return previous;\n }\n function rangeCheck($this, index) {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.ArrayList.rangeCheck.' call\n Companion_instance_5.x1(index, $this.n());\n return index;\n }\n function insertionRangeCheck($this, index) {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.ArrayList.insertionRangeCheck.' call\n Companion_instance_5.n1(index, $this.n());\n return index;\n }\n function ArrayList(array) {\n Companion_getInstance();\n AbstractMutableList.call(this);\n this.f3_1 = array;\n this.g3_1 = false;\n }\n protoOf(ArrayList).i3 = function (minCapacity) {\n };\n protoOf(ArrayList).n = function () {\n return this.f3_1.length;\n };\n protoOf(ArrayList).f1 = function (index) {\n var tmp = this.f3_1[rangeCheck(this, index)];\n return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n };\n protoOf(ArrayList).o = function (index, element) {\n this.s();\n rangeCheck(this, index);\n // Inline function 'kotlin.apply' call\n var this_0 = this.f3_1[index];\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.ArrayList.set.' call\n this.f3_1[index] = element;\n var tmp = this_0;\n return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n };\n protoOf(ArrayList).q = function (element) {\n this.s();\n // Inline function 'kotlin.js.asDynamic' call\n this.f3_1.push(element);\n this.g1_1 = this.g1_1 + 1 | 0;\n return true;\n };\n protoOf(ArrayList).w1 = function (index, element) {\n this.s();\n // Inline function 'kotlin.js.asDynamic' call\n this.f3_1.splice(insertionRangeCheck(this, index), 0, element);\n this.g1_1 = this.g1_1 + 1 | 0;\n };\n protoOf(ArrayList).x = function (elements) {\n this.s();\n if (elements.b1())\n return false;\n var offset = increaseLength(this, elements.n());\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var tmp0_iterator = elements.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'kotlin.collections.ArrayList.addAll.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var index_0 = checkIndexOverflow(tmp1);\n this.f3_1[offset + index_0 | 0] = item;\n }\n this.g1_1 = this.g1_1 + 1 | 0;\n return true;\n };\n protoOf(ArrayList).y1 = function (index, elements) {\n this.s();\n insertionRangeCheck(this, index);\n if (index === this.n())\n return this.x(elements);\n if (elements.b1())\n return false;\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tail = this.f3_1.splice(index);\n this.x(elements);\n var offset = increaseLength(this, tail.length);\n // Inline function 'kotlin.repeat' call\n var times = tail.length;\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable = 0;\n if (inductionVariable < times)\n do {\n var index_0 = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.ArrayList.addAll.' call\n this.f3_1[offset + index_0 | 0] = tail[index_0];\n }\n while (inductionVariable < times);\n this.g1_1 = this.g1_1 + 1 | 0;\n return true;\n };\n protoOf(ArrayList).h1 = function (index) {\n this.s();\n rangeCheck(this, index);\n this.g1_1 = this.g1_1 + 1 | 0;\n var tmp;\n if (index === get_lastIndex_2(this)) {\n // Inline function 'kotlin.js.asDynamic' call\n tmp = this.f3_1.pop();\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n tmp = this.f3_1.splice(index, 1)[0];\n }\n return tmp;\n };\n protoOf(ArrayList).r = function (element) {\n this.s();\n var inductionVariable = 0;\n var last = this.f3_1.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (equals_0(this.f3_1[index], element)) {\n // Inline function 'kotlin.js.asDynamic' call\n this.f3_1.splice(index, 1);\n this.g1_1 = this.g1_1 + 1 | 0;\n return true;\n }\n }\n while (inductionVariable <= last);\n return false;\n };\n protoOf(ArrayList).f2 = function (fromIndex, toIndex) {\n this.s();\n this.g1_1 = this.g1_1 + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n this.f3_1.splice(fromIndex, toIndex - fromIndex | 0);\n };\n protoOf(ArrayList).z = function () {\n this.s();\n var tmp = this;\n // Inline function 'kotlin.emptyArray' call\n tmp.f3_1 = [];\n this.g1_1 = this.g1_1 + 1 | 0;\n };\n protoOf(ArrayList).a2 = function (element) {\n return indexOf(this.f3_1, element);\n };\n protoOf(ArrayList).b2 = function (element) {\n return lastIndexOf(this.f3_1, element);\n };\n protoOf(ArrayList).toString = function () {\n return arrayToString(this.f3_1);\n };\n protoOf(ArrayList).j3 = function () {\n return [].slice.call(this.f3_1);\n };\n protoOf(ArrayList).toArray = function () {\n return this.j3();\n };\n protoOf(ArrayList).s = function () {\n if (this.g3_1)\n throw UnsupportedOperationException_init_$Create$();\n };\n var _stableSortingIsSupported;\n function sortArrayWith(array, comparator) {\n if (getStableSortingIsSupported()) {\n var comparison = sortArrayWith$lambda(comparator);\n // Inline function 'kotlin.js.asDynamic' call\n array.sort(comparison);\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n mergeSort(array, 0, get_lastIndex(array), comparator);\n }\n }\n function sortArray(array) {\n if (getStableSortingIsSupported()) {\n var comparison = sortArray$lambda;\n // Inline function 'kotlin.js.asDynamic' call\n array.sort(comparison);\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n mergeSort(array, 0, get_lastIndex(array), naturalOrder());\n }\n }\n function getStableSortingIsSupported() {\n var tmp0_safe_receiver = _stableSortingIsSupported;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp0_safe_receiver;\n }\n _stableSortingIsSupported = false;\n // Inline function 'kotlin.js.unsafeCast' call\n var array = [];\n var inductionVariable = 0;\n if (inductionVariable < 600)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n array.push(index);\n }\n while (inductionVariable < 600);\n var comparison = getStableSortingIsSupported$lambda;\n // Inline function 'kotlin.js.asDynamic' call\n array.sort(comparison);\n var inductionVariable_0 = 1;\n var last = array.length;\n if (inductionVariable_0 < last)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n var a = array[index_0 - 1 | 0];\n var b = array[index_0];\n if ((a & 3) === (b & 3) ? a >= b : false)\n return false;\n }\n while (inductionVariable_0 < last);\n _stableSortingIsSupported = true;\n return true;\n }\n function mergeSort(array, start, endInclusive, comparator) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.arrayOfNulls' call\n var size = array.length;\n // Inline function 'kotlin.js.asDynamic' call\n var buffer = fillArrayVal(Array(size), null);\n var result = mergeSort_0(array, buffer, start, endInclusive, comparator);\n if (!(result === array)) {\n var inductionVariable = start;\n if (inductionVariable <= endInclusive)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n array[i] = result[i];\n }\n while (!(i === endInclusive));\n }\n }\n function mergeSort_0(array, buffer, start, end, comparator) {\n if (start === end) {\n return array;\n }\n var median = (start + end | 0) / 2 | 0;\n var left = mergeSort_0(array, buffer, start, median, comparator);\n var right = mergeSort_0(array, buffer, median + 1 | 0, end, comparator);\n var target = left === buffer ? array : buffer;\n var leftIndex = start;\n var rightIndex = median + 1 | 0;\n var inductionVariable = start;\n if (inductionVariable <= end)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (leftIndex <= median ? rightIndex <= end : false) {\n var leftValue = left[leftIndex];\n var rightValue = right[rightIndex];\n if (comparator.compare(leftValue, rightValue) <= 0) {\n target[i] = leftValue;\n leftIndex = leftIndex + 1 | 0;\n } else {\n target[i] = rightValue;\n rightIndex = rightIndex + 1 | 0;\n }\n } else if (leftIndex <= median) {\n target[i] = left[leftIndex];\n leftIndex = leftIndex + 1 | 0;\n } else {\n target[i] = right[rightIndex];\n rightIndex = rightIndex + 1 | 0;\n }\n }\n while (!(i === end));\n return target;\n }\n function sortArrayWith$lambda($comparator) {\n return function (a, b) {\n return $comparator.compare(a, b);\n };\n }\n function sortArray$lambda(a, b) {\n return compareTo_0(a, b);\n }\n function getStableSortingIsSupported$lambda(a, b) {\n return (a & 3) - (b & 3) | 0;\n }\n function HashMap_init_$Init$(internalMap, $this) {\n AbstractMutableMap.call($this);\n HashMap.call($this);\n $this.o3_1 = internalMap;\n return $this;\n }\n function HashMap_init_$Init$_0($this) {\n HashMap_init_$Init$(InternalHashMap_init_$Create$(), $this);\n return $this;\n }\n function HashMap_init_$Create$() {\n return HashMap_init_$Init$_0(objectCreate(protoOf(HashMap)));\n }\n function HashMap_init_$Init$_1(initialCapacity, loadFactor, $this) {\n HashMap_init_$Init$(InternalHashMap_init_$Create$_2(initialCapacity, loadFactor), $this);\n return $this;\n }\n function HashMap_init_$Init$_2(initialCapacity, $this) {\n HashMap_init_$Init$_1(initialCapacity, 1.0, $this);\n return $this;\n }\n function HashMap_init_$Create$_0(initialCapacity) {\n return HashMap_init_$Init$_2(initialCapacity, objectCreate(protoOf(HashMap)));\n }\n function HashMap_init_$Init$_3(original, $this) {\n HashMap_init_$Init$(InternalHashMap_init_$Create$_1(original), $this);\n return $this;\n }\n function HashMap_init_$Create$_1(original) {\n return HashMap_init_$Init$_3(original, objectCreate(protoOf(HashMap)));\n }\n protoOf(HashMap).z = function () {\n this.o3_1.z();\n };\n protoOf(HashMap).y2 = function (key) {\n return this.o3_1.q3(key);\n };\n protoOf(HashMap).z2 = function (value) {\n return this.o3_1.z2(value);\n };\n protoOf(HashMap).m2 = function () {\n return new HashMapKeys(this.o3_1);\n };\n protoOf(HashMap).n2 = function () {\n return new HashMapValues(this.o3_1);\n };\n protoOf(HashMap).q2 = function () {\n var tmp0_elvis_lhs = this.p3_1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n var this_0 = new HashMapEntrySet(this.o3_1);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.HashMap..' call\n this.p3_1 = this_0;\n tmp = this_0;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(HashMap).b3 = function (key) {\n return this.o3_1.b3(key);\n };\n protoOf(HashMap).r2 = function (key, value) {\n return this.o3_1.r2(key, value);\n };\n protoOf(HashMap).v2 = function (key) {\n return this.o3_1.v2(key);\n };\n protoOf(HashMap).n = function () {\n return this.o3_1.n();\n };\n protoOf(HashMap).s2 = function (from) {\n return this.o3_1.s2(from);\n };\n function HashMap() {\n this.p3_1 = null;\n }\n function HashMapKeys(backing) {\n AbstractMutableSet.call(this);\n this.r3_1 = backing;\n }\n protoOf(HashMapKeys).n = function () {\n return this.r3_1.n();\n };\n protoOf(HashMapKeys).b1 = function () {\n return this.r3_1.n() === 0;\n };\n protoOf(HashMapKeys).p = function (element) {\n return this.r3_1.q3(element);\n };\n protoOf(HashMapKeys).z = function () {\n return this.r3_1.z();\n };\n protoOf(HashMapKeys).q = function (element) {\n throw UnsupportedOperationException_init_$Create$();\n };\n protoOf(HashMapKeys).x = function (elements) {\n throw UnsupportedOperationException_init_$Create$();\n };\n protoOf(HashMapKeys).r = function (element) {\n return !(this.r3_1.v2(element) == null);\n };\n protoOf(HashMapKeys).t = function () {\n return this.r3_1.s3();\n };\n protoOf(HashMapKeys).s = function () {\n return this.r3_1.s();\n };\n function HashMapValues(backing) {\n AbstractMutableCollection.call(this);\n this.t3_1 = backing;\n }\n protoOf(HashMapValues).n = function () {\n return this.t3_1.n();\n };\n protoOf(HashMapValues).b1 = function () {\n return this.t3_1.n() === 0;\n };\n protoOf(HashMapValues).u3 = function (element) {\n return this.t3_1.z2(element);\n };\n protoOf(HashMapValues).p = function (element) {\n if (!(element == null ? true : !(element == null)))\n return false;\n return this.u3((element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n protoOf(HashMapValues).v3 = function (element) {\n throw UnsupportedOperationException_init_$Create$();\n };\n protoOf(HashMapValues).q = function (element) {\n return this.v3((element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n protoOf(HashMapValues).w3 = function (elements) {\n throw UnsupportedOperationException_init_$Create$();\n };\n protoOf(HashMapValues).x = function (elements) {\n return this.w3(elements);\n };\n protoOf(HashMapValues).t = function () {\n return this.t3_1.x3();\n };\n protoOf(HashMapValues).s = function () {\n return this.t3_1.s();\n };\n function HashMapEntrySet(backing) {\n HashMapEntrySetBase.call(this, backing);\n }\n protoOf(HashMapEntrySet).t = function () {\n return this.z3_1.a4();\n };\n function HashMapEntrySetBase(backing) {\n AbstractMutableSet.call(this);\n this.z3_1 = backing;\n }\n protoOf(HashMapEntrySetBase).n = function () {\n return this.z3_1.n();\n };\n protoOf(HashMapEntrySetBase).b1 = function () {\n return this.z3_1.n() === 0;\n };\n protoOf(HashMapEntrySetBase).b4 = function (element) {\n return this.z3_1.e4(element);\n };\n protoOf(HashMapEntrySetBase).p = function (element) {\n if (!(!(element == null) ? isInterface(element, Entry) : false))\n return false;\n return this.b4((!(element == null) ? isInterface(element, Entry) : false) ? element : THROW_CCE());\n };\n protoOf(HashMapEntrySetBase).z = function () {\n return this.z3_1.z();\n };\n protoOf(HashMapEntrySetBase).c4 = function (element) {\n throw UnsupportedOperationException_init_$Create$();\n };\n protoOf(HashMapEntrySetBase).q = function (element) {\n return this.c4((!(element == null) ? isInterface(element, Entry) : false) ? element : THROW_CCE());\n };\n protoOf(HashMapEntrySetBase).x = function (elements) {\n throw UnsupportedOperationException_init_$Create$();\n };\n protoOf(HashMapEntrySetBase).d4 = function (element) {\n return this.z3_1.f4(element);\n };\n protoOf(HashMapEntrySetBase).r = function (element) {\n if (!(!(element == null) ? isInterface(element, Entry) : false))\n return false;\n return this.d4((!(element == null) ? isInterface(element, Entry) : false) ? element : THROW_CCE());\n };\n protoOf(HashMapEntrySetBase).a1 = function (elements) {\n return this.z3_1.g4(elements);\n };\n protoOf(HashMapEntrySetBase).s = function () {\n return this.z3_1.s();\n };\n function HashMapKeysDefault$iterator$1($entryIterator) {\n this.h4_1 = $entryIterator;\n }\n protoOf(HashMapKeysDefault$iterator$1).u = function () {\n return this.h4_1.u();\n };\n protoOf(HashMapKeysDefault$iterator$1).w = function () {\n return this.h4_1.w().t2();\n };\n protoOf(HashMapKeysDefault$iterator$1).v = function () {\n return this.h4_1.v();\n };\n function HashMapKeysDefault(backingMap) {\n AbstractMutableSet.call(this);\n this.i4_1 = backingMap;\n }\n protoOf(HashMapKeysDefault).j4 = function (element) {\n throw UnsupportedOperationException_init_$Create$_0('Add is not supported on keys');\n };\n protoOf(HashMapKeysDefault).q = function (element) {\n return this.j4((element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n protoOf(HashMapKeysDefault).z = function () {\n return this.i4_1.z();\n };\n protoOf(HashMapKeysDefault).q3 = function (element) {\n return this.i4_1.y2(element);\n };\n protoOf(HashMapKeysDefault).p = function (element) {\n if (!(element == null ? true : !(element == null)))\n return false;\n return this.q3((element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n protoOf(HashMapKeysDefault).t = function () {\n var entryIterator = this.i4_1.q2().t();\n return new HashMapKeysDefault$iterator$1(entryIterator);\n };\n protoOf(HashMapKeysDefault).v2 = function (element) {\n this.s();\n if (this.i4_1.y2(element)) {\n this.i4_1.v2(element);\n return true;\n }\n return false;\n };\n protoOf(HashMapKeysDefault).r = function (element) {\n if (!(element == null ? true : !(element == null)))\n return false;\n return this.v2((element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n protoOf(HashMapKeysDefault).n = function () {\n return this.i4_1.n();\n };\n protoOf(HashMapKeysDefault).s = function () {\n return this.i4_1.s();\n };\n function HashMapValuesDefault$iterator$1($entryIterator) {\n this.k4_1 = $entryIterator;\n }\n protoOf(HashMapValuesDefault$iterator$1).u = function () {\n return this.k4_1.u();\n };\n protoOf(HashMapValuesDefault$iterator$1).w = function () {\n return this.k4_1.w().u2();\n };\n protoOf(HashMapValuesDefault$iterator$1).v = function () {\n return this.k4_1.v();\n };\n function HashMapValuesDefault(backingMap) {\n AbstractMutableCollection.call(this);\n this.l4_1 = backingMap;\n }\n protoOf(HashMapValuesDefault).v3 = function (element) {\n throw UnsupportedOperationException_init_$Create$_0('Add is not supported on values');\n };\n protoOf(HashMapValuesDefault).q = function (element) {\n return this.v3((element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n protoOf(HashMapValuesDefault).u3 = function (element) {\n return this.l4_1.z2(element);\n };\n protoOf(HashMapValuesDefault).p = function (element) {\n if (!(element == null ? true : !(element == null)))\n return false;\n return this.u3((element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n protoOf(HashMapValuesDefault).t = function () {\n var entryIterator = this.l4_1.q2().t();\n return new HashMapValuesDefault$iterator$1(entryIterator);\n };\n protoOf(HashMapValuesDefault).n = function () {\n return this.l4_1.n();\n };\n protoOf(HashMapValuesDefault).s = function () {\n return this.l4_1.s();\n };\n function HashSet_init_$Init$(map, $this) {\n AbstractMutableSet.call($this);\n HashSet.call($this);\n $this.m4_1 = map;\n return $this;\n }\n function HashSet_init_$Init$_0($this) {\n HashSet_init_$Init$(InternalHashMap_init_$Create$(), $this);\n return $this;\n }\n function HashSet_init_$Create$() {\n return HashSet_init_$Init$_0(objectCreate(protoOf(HashSet)));\n }\n function HashSet_init_$Init$_1(elements, $this) {\n HashSet_init_$Init$(InternalHashMap_init_$Create$_0(elements.n()), $this);\n var tmp0_iterator = elements.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n $this.m4_1.r2(element, true);\n }\n return $this;\n }\n function HashSet_init_$Create$_0(elements) {\n return HashSet_init_$Init$_1(elements, objectCreate(protoOf(HashSet)));\n }\n function HashSet_init_$Init$_2(initialCapacity, loadFactor, $this) {\n HashSet_init_$Init$(InternalHashMap_init_$Create$_2(initialCapacity, loadFactor), $this);\n return $this;\n }\n function HashSet_init_$Init$_3(initialCapacity, $this) {\n HashSet_init_$Init$_2(initialCapacity, 1.0, $this);\n return $this;\n }\n function HashSet_init_$Create$_1(initialCapacity) {\n return HashSet_init_$Init$_3(initialCapacity, objectCreate(protoOf(HashSet)));\n }\n protoOf(HashSet).q = function (element) {\n return this.m4_1.r2(element, true) == null;\n };\n protoOf(HashSet).z = function () {\n this.m4_1.z();\n };\n protoOf(HashSet).p = function (element) {\n return this.m4_1.q3(element);\n };\n protoOf(HashSet).b1 = function () {\n return this.m4_1.n() === 0;\n };\n protoOf(HashSet).t = function () {\n return this.m4_1.s3();\n };\n protoOf(HashSet).r = function (element) {\n return !(this.m4_1.v2(element) == null);\n };\n protoOf(HashSet).n = function () {\n return this.m4_1.n();\n };\n function HashSet() {\n }\n function computeHashSize($this, capacity) {\n return takeHighestOneBit(imul(coerceAtLeast(capacity, 1), 3));\n }\n function computeShift($this, hashSize) {\n // Inline function 'kotlin.countLeadingZeroBits' call\n return clz32(hashSize) + 1 | 0;\n }\n function InternalHashMap_init_$Init$($this) {\n InternalHashMap_init_$Init$_0(8, $this);\n return $this;\n }\n function InternalHashMap_init_$Create$() {\n return InternalHashMap_init_$Init$(objectCreate(protoOf(InternalHashMap)));\n }\n function InternalHashMap_init_$Init$_0(initialCapacity, $this) {\n InternalHashMap.call($this, arrayOfUninitializedElements(initialCapacity), null, new Int32Array(initialCapacity), new Int32Array(computeHashSize(Companion_instance_0, initialCapacity)), 2, 0);\n return $this;\n }\n function InternalHashMap_init_$Create$_0(initialCapacity) {\n return InternalHashMap_init_$Init$_0(initialCapacity, objectCreate(protoOf(InternalHashMap)));\n }\n function InternalHashMap_init_$Init$_1(original, $this) {\n InternalHashMap_init_$Init$_0(original.n(), $this);\n $this.s2(original);\n return $this;\n }\n function InternalHashMap_init_$Create$_1(original) {\n return InternalHashMap_init_$Init$_1(original, objectCreate(protoOf(InternalHashMap)));\n }\n function InternalHashMap_init_$Init$_2(initialCapacity, loadFactor, $this) {\n InternalHashMap_init_$Init$_0(initialCapacity, $this);\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(loadFactor > 0.0)) {\n // Inline function 'kotlin.collections.InternalHashMap..' call\n var message = 'Non-positive load factor: ' + loadFactor;\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n return $this;\n }\n function InternalHashMap_init_$Create$_2(initialCapacity, loadFactor) {\n return InternalHashMap_init_$Init$_2(initialCapacity, loadFactor, objectCreate(protoOf(InternalHashMap)));\n }\n function _get_capacity__a9k9f3($this) {\n return $this.n4_1.length;\n }\n function _get_hashSize__tftcho($this) {\n return $this.q4_1.length;\n }\n function registerModification($this) {\n $this.u4_1 = $this.u4_1 + 1 | 0;\n }\n function ensureExtraCapacity($this, n) {\n if (shouldCompact($this, n)) {\n rehash($this, _get_hashSize__tftcho($this));\n } else {\n ensureCapacity($this, $this.s4_1 + n | 0);\n }\n }\n function shouldCompact($this, extraCapacity) {\n var spareCapacity = _get_capacity__a9k9f3($this) - $this.s4_1 | 0;\n var gaps = $this.s4_1 - $this.n() | 0;\n return (spareCapacity < extraCapacity ? (gaps + spareCapacity | 0) >= extraCapacity : false) ? gaps >= (_get_capacity__a9k9f3($this) / 4 | 0) : false;\n }\n function ensureCapacity($this, minCapacity) {\n if (minCapacity < 0)\n throw RuntimeException_init_$Create$_0('too many elements');\n if (minCapacity > _get_capacity__a9k9f3($this)) {\n var newSize = Companion_instance_5.x4(_get_capacity__a9k9f3($this), minCapacity);\n $this.n4_1 = copyOfUninitializedElements($this.n4_1, newSize);\n var tmp = $this;\n var tmp0_safe_receiver = $this.o4_1;\n tmp.o4_1 = tmp0_safe_receiver == null ? null : copyOfUninitializedElements(tmp0_safe_receiver, newSize);\n $this.p4_1 = copyOf_3($this.p4_1, newSize);\n var newHashSize = computeHashSize(Companion_instance_0, newSize);\n if (newHashSize > _get_hashSize__tftcho($this)) {\n rehash($this, newHashSize);\n }\n }\n }\n function allocateValuesArray($this) {\n var curValuesArray = $this.o4_1;\n if (!(curValuesArray == null))\n return curValuesArray;\n var newValuesArray = arrayOfUninitializedElements(_get_capacity__a9k9f3($this));\n $this.o4_1 = newValuesArray;\n return newValuesArray;\n }\n function hash($this, key) {\n return key == null ? 0 : imul(hashCode(key), -1640531527) >>> $this.t4_1 | 0;\n }\n function compact($this) {\n var i = 0;\n var j = 0;\n var valuesArray = $this.o4_1;\n while (i < $this.s4_1) {\n if ($this.p4_1[i] >= 0) {\n $this.n4_1[j] = $this.n4_1[i];\n if (!(valuesArray == null)) {\n valuesArray[j] = valuesArray[i];\n }\n j = j + 1 | 0;\n }\n i = i + 1 | 0;\n }\n resetRange($this.n4_1, j, $this.s4_1);\n if (valuesArray == null)\n null;\n else {\n resetRange(valuesArray, j, $this.s4_1);\n }\n $this.s4_1 = j;\n }\n function rehash($this, newHashSize) {\n registerModification($this);\n if ($this.s4_1 > $this.v4_1) {\n compact($this);\n }\n if (!(newHashSize === _get_hashSize__tftcho($this))) {\n $this.q4_1 = new Int32Array(newHashSize);\n $this.t4_1 = computeShift(Companion_instance_0, newHashSize);\n } else {\n fill($this.q4_1, 0, 0, _get_hashSize__tftcho($this));\n }\n var i = 0;\n while (i < $this.s4_1) {\n var tmp0 = i;\n i = tmp0 + 1 | 0;\n if (!putRehash($this, tmp0)) {\n throw IllegalStateException_init_$Create$_0('This cannot happen with fixed magic multiplier and grow-only hash array. Have object hashCodes changed?');\n }\n }\n }\n function putRehash($this, i) {\n var hash_0 = hash($this, $this.n4_1[i]);\n var probesLeft = $this.r4_1;\n while (true) {\n var index = $this.q4_1[hash_0];\n if (index === 0) {\n $this.q4_1[hash_0] = i + 1 | 0;\n $this.p4_1[i] = hash_0;\n return true;\n }\n probesLeft = probesLeft - 1 | 0;\n if (probesLeft < 0)\n return false;\n var tmp0 = hash_0;\n hash_0 = tmp0 - 1 | 0;\n if (tmp0 === 0)\n hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n }\n }\n function findKey($this, key) {\n var hash_0 = hash($this, key);\n var probesLeft = $this.r4_1;\n while (true) {\n var index = $this.q4_1[hash_0];\n if (index === 0)\n return -1;\n if (index > 0 ? equals_0($this.n4_1[index - 1 | 0], key) : false)\n return index - 1 | 0;\n probesLeft = probesLeft - 1 | 0;\n if (probesLeft < 0)\n return -1;\n var tmp0 = hash_0;\n hash_0 = tmp0 - 1 | 0;\n if (tmp0 === 0)\n hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n }\n }\n function findValue($this, value) {\n var i = $this.s4_1;\n $l$loop: while (true) {\n i = i - 1 | 0;\n if (!(i >= 0)) {\n break $l$loop;\n }\n if ($this.p4_1[i] >= 0 ? equals_0(ensureNotNull($this.o4_1)[i], value) : false)\n return i;\n }\n return -1;\n }\n function addKey($this, key) {\n $this.s();\n retry: while (true) {\n var hash_0 = hash($this, key);\n var tentativeMaxProbeDistance = coerceAtMost(imul($this.r4_1, 2), _get_hashSize__tftcho($this) / 2 | 0);\n var probeDistance = 0;\n while (true) {\n var index = $this.q4_1[hash_0];\n if (index <= 0) {\n if ($this.s4_1 >= _get_capacity__a9k9f3($this)) {\n ensureExtraCapacity($this, 1);\n continue retry;\n }\n var tmp1 = $this.s4_1;\n $this.s4_1 = tmp1 + 1 | 0;\n var putIndex = tmp1;\n $this.n4_1[putIndex] = key;\n $this.p4_1[putIndex] = hash_0;\n $this.q4_1[hash_0] = putIndex + 1 | 0;\n $this.v4_1 = $this.v4_1 + 1 | 0;\n registerModification($this);\n if (probeDistance > $this.r4_1)\n $this.r4_1 = probeDistance;\n return putIndex;\n }\n if (equals_0($this.n4_1[index - 1 | 0], key)) {\n return -index | 0;\n }\n probeDistance = probeDistance + 1 | 0;\n if (probeDistance > tentativeMaxProbeDistance) {\n rehash($this, imul(_get_hashSize__tftcho($this), 2));\n continue retry;\n }\n var tmp4 = hash_0;\n hash_0 = tmp4 - 1 | 0;\n if (tmp4 === 0)\n hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n }\n }\n }\n function removeKey($this, key) {\n $this.s();\n var index = findKey($this, key);\n if (index < 0)\n return -1;\n removeKeyAt($this, index);\n return index;\n }\n function removeKeyAt($this, index) {\n resetAt($this.n4_1, index);\n removeHashAt($this, $this.p4_1[index]);\n $this.p4_1[index] = -1;\n $this.v4_1 = $this.v4_1 - 1 | 0;\n registerModification($this);\n }\n function removeHashAt($this, removedHash) {\n var hash_0 = removedHash;\n var hole = removedHash;\n var probeDistance = 0;\n var patchAttemptsLeft = coerceAtMost(imul($this.r4_1, 2), _get_hashSize__tftcho($this) / 2 | 0);\n while (true) {\n var tmp0 = hash_0;\n hash_0 = tmp0 - 1 | 0;\n if (tmp0 === 0)\n hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n probeDistance = probeDistance + 1 | 0;\n if (probeDistance > $this.r4_1) {\n $this.q4_1[hole] = 0;\n return Unit_instance;\n }\n var index = $this.q4_1[hash_0];\n if (index === 0) {\n $this.q4_1[hole] = 0;\n return Unit_instance;\n }\n if (index < 0) {\n $this.q4_1[hole] = -1;\n hole = hash_0;\n probeDistance = 0;\n } else {\n var otherHash = hash($this, $this.n4_1[index - 1 | 0]);\n if (((otherHash - hash_0 | 0) & (_get_hashSize__tftcho($this) - 1 | 0)) >= probeDistance) {\n $this.q4_1[hole] = index;\n $this.p4_1[index - 1 | 0] = hole;\n hole = hash_0;\n probeDistance = 0;\n }\n }\n patchAttemptsLeft = patchAttemptsLeft - 1 | 0;\n if (patchAttemptsLeft < 0) {\n $this.q4_1[hole] = -1;\n return Unit_instance;\n }\n }\n }\n function contentEquals($this, other) {\n return $this.v4_1 === other.n() ? $this.g4(other.q2()) : false;\n }\n function putEntry($this, entry) {\n var index = addKey($this, entry.t2());\n var valuesArray = allocateValuesArray($this);\n if (index >= 0) {\n valuesArray[index] = entry.u2();\n return true;\n }\n var oldValue = valuesArray[(-index | 0) - 1 | 0];\n if (!equals_0(entry.u2(), oldValue)) {\n valuesArray[(-index | 0) - 1 | 0] = entry.u2();\n return true;\n }\n return false;\n }\n function putAllEntries($this, from) {\n if (from.b1())\n return false;\n ensureExtraCapacity($this, from.n());\n var it = from.t();\n var updated = false;\n while (it.u()) {\n if (putEntry($this, it.w()))\n updated = true;\n }\n return updated;\n }\n function Companion_0() {\n this.y4_1 = -1640531527;\n this.z4_1 = 8;\n this.a5_1 = 2;\n this.b5_1 = -1;\n }\n var Companion_instance_0;\n function Companion_getInstance_0() {\n return Companion_instance_0;\n }\n function Itr(map) {\n this.c5_1 = map;\n this.d5_1 = 0;\n this.e5_1 = -1;\n this.f5_1 = this.c5_1.u4_1;\n this.g5();\n }\n protoOf(Itr).g5 = function () {\n while (this.d5_1 < this.c5_1.s4_1 ? this.c5_1.p4_1[this.d5_1] < 0 : false) {\n this.d5_1 = this.d5_1 + 1 | 0;\n }\n };\n protoOf(Itr).u = function () {\n return this.d5_1 < this.c5_1.s4_1;\n };\n protoOf(Itr).v = function () {\n this.h5();\n // Inline function 'kotlin.check' call\n // Inline function 'kotlin.contracts.contract' call\n if (!!(this.e5_1 === -1)) {\n // Inline function 'kotlin.collections.Itr.remove.' call\n var message = 'Call next() before removing element from the iterator.';\n throw IllegalStateException_init_$Create$_0(toString_1(message));\n }\n this.c5_1.s();\n removeKeyAt(this.c5_1, this.e5_1);\n this.e5_1 = -1;\n this.f5_1 = this.c5_1.u4_1;\n };\n protoOf(Itr).h5 = function () {\n if (!(this.c5_1.u4_1 === this.f5_1))\n throw ConcurrentModificationException_init_$Create$();\n };\n function KeysItr(map) {\n Itr.call(this, map);\n }\n protoOf(KeysItr).w = function () {\n this.h5();\n if (this.d5_1 >= this.c5_1.s4_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.d5_1;\n this.d5_1 = tmp1 + 1 | 0;\n tmp.e5_1 = tmp1;\n var result = this.c5_1.n4_1[this.e5_1];\n this.g5();\n return result;\n };\n function ValuesItr(map) {\n Itr.call(this, map);\n }\n protoOf(ValuesItr).w = function () {\n this.h5();\n if (this.d5_1 >= this.c5_1.s4_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.d5_1;\n this.d5_1 = tmp1 + 1 | 0;\n tmp.e5_1 = tmp1;\n var result = ensureNotNull(this.c5_1.o4_1)[this.e5_1];\n this.g5();\n return result;\n };\n function EntriesItr(map) {\n Itr.call(this, map);\n }\n protoOf(EntriesItr).w = function () {\n this.h5();\n if (this.d5_1 >= this.c5_1.s4_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.d5_1;\n this.d5_1 = tmp1 + 1 | 0;\n tmp.e5_1 = tmp1;\n var result = new EntryRef(this.c5_1, this.e5_1);\n this.g5();\n return result;\n };\n protoOf(EntriesItr).u5 = function () {\n if (this.d5_1 >= this.c5_1.s4_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.d5_1;\n this.d5_1 = tmp1 + 1 | 0;\n tmp.e5_1 = tmp1;\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver = this.c5_1.n4_1[this.e5_1];\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n var tmp_0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver_0 = ensureNotNull(this.c5_1.o4_1)[this.e5_1];\n var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);\n var result = tmp_0 ^ (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0);\n this.g5();\n return result;\n };\n protoOf(EntriesItr).v5 = function (sb) {\n if (this.d5_1 >= this.c5_1.s4_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.d5_1;\n this.d5_1 = tmp1 + 1 | 0;\n tmp.e5_1 = tmp1;\n var key = this.c5_1.n4_1[this.e5_1];\n if (equals_0(key, this.c5_1)) {\n sb.y5('(this Map)');\n } else {\n sb.x5(key);\n }\n sb.z5(_Char___init__impl__6a9atx(61));\n var value = ensureNotNull(this.c5_1.o4_1)[this.e5_1];\n if (equals_0(value, this.c5_1)) {\n sb.y5('(this Map)');\n } else {\n sb.x5(value);\n }\n this.g5();\n };\n function EntryRef(map, index) {\n this.a6_1 = map;\n this.b6_1 = index;\n }\n protoOf(EntryRef).t2 = function () {\n return this.a6_1.n4_1[this.b6_1];\n };\n protoOf(EntryRef).u2 = function () {\n return ensureNotNull(this.a6_1.o4_1)[this.b6_1];\n };\n protoOf(EntryRef).equals = function (other) {\n var tmp;\n var tmp_0;\n if (!(other == null) ? isInterface(other, Entry) : false) {\n tmp_0 = equals_0(other.t2(), this.t2());\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = equals_0(other.u2(), this.u2());\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(EntryRef).hashCode = function () {\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver = this.t2();\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n var tmp = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver_0 = this.u2();\n var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);\n return tmp ^ (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0);\n };\n protoOf(EntryRef).toString = function () {\n return '' + this.t2() + '=' + this.u2();\n };\n function InternalHashMap(keysArray, valuesArray, presenceArray, hashArray, maxProbeDistance, length) {\n this.n4_1 = keysArray;\n this.o4_1 = valuesArray;\n this.p4_1 = presenceArray;\n this.q4_1 = hashArray;\n this.r4_1 = maxProbeDistance;\n this.s4_1 = length;\n this.t4_1 = computeShift(Companion_instance_0, _get_hashSize__tftcho(this));\n this.u4_1 = 0;\n this.v4_1 = 0;\n this.w4_1 = false;\n }\n protoOf(InternalHashMap).n = function () {\n return this.v4_1;\n };\n protoOf(InternalHashMap).z2 = function (value) {\n return findValue(this, value) >= 0;\n };\n protoOf(InternalHashMap).b3 = function (key) {\n var index = findKey(this, key);\n if (index < 0)\n return null;\n return ensureNotNull(this.o4_1)[index];\n };\n protoOf(InternalHashMap).q3 = function (key) {\n return findKey(this, key) >= 0;\n };\n protoOf(InternalHashMap).r2 = function (key, value) {\n var index = addKey(this, key);\n var valuesArray = allocateValuesArray(this);\n if (index < 0) {\n var oldValue = valuesArray[(-index | 0) - 1 | 0];\n valuesArray[(-index | 0) - 1 | 0] = value;\n return oldValue;\n } else {\n valuesArray[index] = value;\n return null;\n }\n };\n protoOf(InternalHashMap).s2 = function (from) {\n this.s();\n putAllEntries(this, from.q2());\n };\n protoOf(InternalHashMap).v2 = function (key) {\n var index = removeKey(this, key);\n if (index < 0)\n return null;\n var valuesArray = ensureNotNull(this.o4_1);\n var oldValue = valuesArray[index];\n resetAt(valuesArray, index);\n return oldValue;\n };\n protoOf(InternalHashMap).z = function () {\n this.s();\n var inductionVariable = 0;\n var last = this.s4_1 - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var hash = this.p4_1[i];\n if (hash >= 0) {\n this.q4_1[hash] = 0;\n this.p4_1[i] = -1;\n }\n }\n while (!(i === last));\n resetRange(this.n4_1, 0, this.s4_1);\n var tmp1_safe_receiver = this.o4_1;\n if (tmp1_safe_receiver == null)\n null;\n else {\n resetRange(tmp1_safe_receiver, 0, this.s4_1);\n }\n this.v4_1 = 0;\n this.s4_1 = 0;\n registerModification(this);\n };\n protoOf(InternalHashMap).equals = function (other) {\n var tmp;\n if (other === this) {\n tmp = true;\n } else {\n var tmp_0;\n if (!(other == null) ? isInterface(other, Map_0) : false) {\n tmp_0 = contentEquals(this, other);\n } else {\n tmp_0 = false;\n }\n tmp = tmp_0;\n }\n return tmp;\n };\n protoOf(InternalHashMap).hashCode = function () {\n var result = 0;\n var it = this.a4();\n while (it.u()) {\n result = result + it.u5() | 0;\n }\n return result;\n };\n protoOf(InternalHashMap).toString = function () {\n var sb = StringBuilder_init_$Create$(2 + imul(this.v4_1, 3) | 0);\n sb.y5('{');\n var i = 0;\n var it = this.a4();\n while (it.u()) {\n if (i > 0) {\n sb.y5(', ');\n }\n it.v5(sb);\n i = i + 1 | 0;\n }\n sb.y5('}');\n return sb.toString();\n };\n protoOf(InternalHashMap).s = function () {\n if (this.w4_1)\n throw UnsupportedOperationException_init_$Create$();\n };\n protoOf(InternalHashMap).e4 = function (entry) {\n var index = findKey(this, entry.t2());\n if (index < 0)\n return false;\n return equals_0(ensureNotNull(this.o4_1)[index], entry.u2());\n };\n protoOf(InternalHashMap).c6 = function (entry) {\n return this.e4(isInterface(entry, Entry) ? entry : THROW_CCE());\n };\n protoOf(InternalHashMap).f4 = function (entry) {\n this.s();\n var index = findKey(this, entry.t2());\n if (index < 0)\n return false;\n if (!equals_0(ensureNotNull(this.o4_1)[index], entry.u2()))\n return false;\n removeKeyAt(this, index);\n return true;\n };\n protoOf(InternalHashMap).s3 = function () {\n return new KeysItr(this);\n };\n protoOf(InternalHashMap).x3 = function () {\n return new ValuesItr(this);\n };\n protoOf(InternalHashMap).a4 = function () {\n return new EntriesItr(this);\n };\n function InternalMap() {\n }\n function LinkedHashMap_init_$Init$($this) {\n HashMap_init_$Init$_0($this);\n LinkedHashMap.call($this);\n return $this;\n }\n function LinkedHashMap_init_$Create$() {\n return LinkedHashMap_init_$Init$(objectCreate(protoOf(LinkedHashMap)));\n }\n function LinkedHashMap_init_$Init$_0(initialCapacity, $this) {\n HashMap_init_$Init$_2(initialCapacity, $this);\n LinkedHashMap.call($this);\n return $this;\n }\n function LinkedHashMap_init_$Create$_0(initialCapacity) {\n return LinkedHashMap_init_$Init$_0(initialCapacity, objectCreate(protoOf(LinkedHashMap)));\n }\n function LinkedHashMap_init_$Init$_1(original, $this) {\n HashMap_init_$Init$_3(original, $this);\n LinkedHashMap.call($this);\n return $this;\n }\n function LinkedHashMap_init_$Create$_1(original) {\n return LinkedHashMap_init_$Init$_1(original, objectCreate(protoOf(LinkedHashMap)));\n }\n protoOf(LinkedHashMap).s = function () {\n return this.o3_1.s();\n };\n function LinkedHashMap() {\n }\n function LinkedHashSet_init_$Init$($this) {\n HashSet_init_$Init$_0($this);\n LinkedHashSet.call($this);\n return $this;\n }\n function LinkedHashSet_init_$Create$() {\n return LinkedHashSet_init_$Init$(objectCreate(protoOf(LinkedHashSet)));\n }\n function LinkedHashSet_init_$Init$_0(elements, $this) {\n HashSet_init_$Init$_1(elements, $this);\n LinkedHashSet.call($this);\n return $this;\n }\n function LinkedHashSet_init_$Create$_0(elements) {\n return LinkedHashSet_init_$Init$_0(elements, objectCreate(protoOf(LinkedHashSet)));\n }\n function LinkedHashSet_init_$Init$_1(initialCapacity, loadFactor, $this) {\n HashSet_init_$Init$_2(initialCapacity, loadFactor, $this);\n LinkedHashSet.call($this);\n return $this;\n }\n function LinkedHashSet_init_$Init$_2(initialCapacity, $this) {\n LinkedHashSet_init_$Init$_1(initialCapacity, 1.0, $this);\n return $this;\n }\n function LinkedHashSet_init_$Create$_1(initialCapacity) {\n return LinkedHashSet_init_$Init$_2(initialCapacity, objectCreate(protoOf(LinkedHashSet)));\n }\n protoOf(LinkedHashSet).s = function () {\n return this.m4_1.s();\n };\n function LinkedHashSet() {\n }\n function RandomAccess() {\n }\n function get_output() {\n _init_properties_console_kt__rfg7jv();\n return output;\n }\n var output;\n function BaseOutput() {\n }\n protoOf(BaseOutput).k6 = function () {\n this.l6('\\n');\n };\n protoOf(BaseOutput).m6 = function (message) {\n this.l6(message);\n this.k6();\n };\n function NodeJsOutput(outputStream) {\n BaseOutput.call(this);\n this.n6_1 = outputStream;\n }\n protoOf(NodeJsOutput).l6 = function (message) {\n // Inline function 'kotlin.io.String' call\n var messageString = String(message);\n this.n6_1.write(messageString);\n };\n function BufferedOutputToConsoleLog() {\n BufferedOutput.call(this);\n }\n protoOf(BufferedOutputToConsoleLog).l6 = function (message) {\n // Inline function 'kotlin.io.String' call\n var s = String(message);\n // Inline function 'kotlin.text.nativeLastIndexOf' call\n // Inline function 'kotlin.js.asDynamic' call\n var i = s.lastIndexOf('\\n', 0);\n if (i >= 0) {\n var tmp = this;\n var tmp_0 = this.p6_1;\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.p6_1 = tmp_0 + s.substring(0, i);\n this.q6();\n // Inline function 'kotlin.text.substring' call\n var this_0 = s;\n var startIndex = i + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n s = this_0.substring(startIndex);\n }\n this.p6_1 = this.p6_1 + s;\n };\n protoOf(BufferedOutputToConsoleLog).q6 = function () {\n console.log(this.p6_1);\n this.p6_1 = '';\n };\n function BufferedOutput() {\n BaseOutput.call(this);\n this.p6_1 = '';\n }\n protoOf(BufferedOutput).l6 = function (message) {\n var tmp = this;\n var tmp_0 = this.p6_1;\n // Inline function 'kotlin.io.String' call\n tmp.p6_1 = tmp_0 + String(message);\n };\n function println(message) {\n _init_properties_console_kt__rfg7jv();\n get_output().m6(message);\n }\n var properties_initialized_console_kt_gll9dl;\n function _init_properties_console_kt__rfg7jv() {\n if (!properties_initialized_console_kt_gll9dl) {\n properties_initialized_console_kt_gll9dl = true;\n // Inline function 'kotlin.run' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.io.output.' call\n var isNode = typeof process !== 'undefined' && process.versions && !!process.versions.node;\n output = isNode ? new NodeJsOutput(process.stdout) : new BufferedOutputToConsoleLog();\n }\n }\n function round(x) {\n if (!(x % 0.5 === 0.0)) {\n return Math.round(x);\n }\n // Inline function 'kotlin.math.floor' call\n var floor = Math.floor(x);\n var tmp;\n if (floor % 2 === 0.0) {\n tmp = floor;\n } else {\n // Inline function 'kotlin.math.ceil' call\n tmp = Math.ceil(x);\n }\n return tmp;\n }\n function roundToInt(_this__u8e3s4) {\n var tmp;\n if (isNaN_0(_this__u8e3s4)) {\n throw IllegalArgumentException_init_$Create$_0('Cannot round NaN value.');\n } else if (_this__u8e3s4 > IntCompanionObject_instance.MAX_VALUE) {\n tmp = IntCompanionObject_instance.MAX_VALUE;\n } else if (_this__u8e3s4 < IntCompanionObject_instance.MIN_VALUE) {\n tmp = IntCompanionObject_instance.MIN_VALUE;\n } else {\n tmp = numberToInt(Math.round(_this__u8e3s4));\n }\n return tmp;\n }\n function roundToLong(_this__u8e3s4) {\n var tmp;\n if (isNaN_0(_this__u8e3s4)) {\n throw IllegalArgumentException_init_$Create$_0('Cannot round NaN value.');\n } else {\n Companion_getInstance_4();\n if (_this__u8e3s4 > (new Long(-1, 2147483647)).r6()) {\n Companion_getInstance_4();\n tmp = new Long(-1, 2147483647);\n } else {\n Companion_getInstance_4();\n if (_this__u8e3s4 < (new Long(0, -2147483648)).r6()) {\n Companion_getInstance_4();\n tmp = new Long(0, -2147483648);\n } else {\n tmp = numberToLong(Math.round(_this__u8e3s4));\n }\n }\n }\n return tmp;\n }\n function nextDown(_this__u8e3s4) {\n var tmp;\n var tmp_0;\n if (isNaN_0(_this__u8e3s4)) {\n tmp_0 = true;\n } else {\n tmp_0 = _this__u8e3s4 === -Infinity;\n }\n if (tmp_0) {\n tmp = _this__u8e3s4;\n } else {\n if (_this__u8e3s4 === 0.0) {\n tmp = -4.9E-324;\n } else {\n // Inline function 'kotlin.fromBits' call\n // Inline function 'kotlin.Long.plus' call\n var this_0 = toRawBits(_this__u8e3s4);\n var other = _this__u8e3s4 > 0.0 ? -1 : 1;\n var bits = this_0.s6(toLong_0(other));\n tmp = doubleFromBits(bits);\n }\n }\n return tmp;\n }\n function get_INV_2_26() {\n _init_properties_PlatformRandom_kt__6kjv62();\n return INV_2_26;\n }\n var INV_2_26;\n function get_INV_2_53() {\n _init_properties_PlatformRandom_kt__6kjv62();\n return INV_2_53;\n }\n var INV_2_53;\n function doubleFromParts(hi26, low27) {\n _init_properties_PlatformRandom_kt__6kjv62();\n return hi26 * get_INV_2_26() + low27 * get_INV_2_53();\n }\n function defaultPlatformRandom() {\n _init_properties_PlatformRandom_kt__6kjv62();\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp$ret$0 = Math.random() * Math.pow(2, 32) | 0;\n return Random_0(tmp$ret$0);\n }\n var properties_initialized_PlatformRandom_kt_uibhw8;\n function _init_properties_PlatformRandom_kt__6kjv62() {\n if (!properties_initialized_PlatformRandom_kt_uibhw8) {\n properties_initialized_PlatformRandom_kt_uibhw8 = true;\n // Inline function 'kotlin.math.pow' call\n INV_2_26 = Math.pow(2.0, -26);\n // Inline function 'kotlin.math.pow' call\n INV_2_53 = Math.pow(2.0, -53);\n }\n }\n function get_js(_this__u8e3s4) {\n return (_this__u8e3s4 instanceof KClassImpl ? _this__u8e3s4 : THROW_CCE()).u6();\n }\n function KClass() {\n }\n function KClassImpl(jClass) {\n this.t6_1 = jClass;\n }\n protoOf(KClassImpl).u6 = function () {\n return this.t6_1;\n };\n protoOf(KClassImpl).equals = function (other) {\n var tmp;\n if (other instanceof NothingKClassImpl) {\n tmp = false;\n } else {\n if (other instanceof ErrorKClass) {\n tmp = false;\n } else {\n if (other instanceof KClassImpl) {\n tmp = equals_0(this.u6(), other.u6());\n } else {\n tmp = false;\n }\n }\n }\n return tmp;\n };\n protoOf(KClassImpl).hashCode = function () {\n var tmp0_safe_receiver = this.v6();\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : getStringHashCode(tmp0_safe_receiver);\n return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n };\n protoOf(KClassImpl).toString = function () {\n return 'class ' + this.v6();\n };\n function NothingKClassImpl() {\n NothingKClassImpl_instance = this;\n KClassImpl.call(this, Object);\n this.y6_1 = 'Nothing';\n }\n protoOf(NothingKClassImpl).v6 = function () {\n return this.y6_1;\n };\n protoOf(NothingKClassImpl).w6 = function (value) {\n return false;\n };\n protoOf(NothingKClassImpl).u6 = function () {\n throw UnsupportedOperationException_init_$Create$_0(\"There's no native JS class for Nothing type\");\n };\n protoOf(NothingKClassImpl).equals = function (other) {\n return other === this;\n };\n protoOf(NothingKClassImpl).hashCode = function () {\n return 0;\n };\n var NothingKClassImpl_instance;\n function NothingKClassImpl_getInstance() {\n if (NothingKClassImpl_instance == null)\n new NothingKClassImpl();\n return NothingKClassImpl_instance;\n }\n function ErrorKClass() {\n }\n protoOf(ErrorKClass).v6 = function () {\n var message = 'Unknown simpleName for ErrorKClass';\n throw IllegalStateException_init_$Create$_0(toString_1(message));\n };\n protoOf(ErrorKClass).w6 = function (value) {\n var message = \"Can's check isInstance on ErrorKClass\";\n throw IllegalStateException_init_$Create$_0(toString_1(message));\n };\n protoOf(ErrorKClass).equals = function (other) {\n return other === this;\n };\n protoOf(ErrorKClass).hashCode = function () {\n return 0;\n };\n function PrimitiveKClassImpl(jClass, givenSimpleName, isInstanceFunction) {\n KClassImpl.call(this, jClass);\n this.a7_1 = givenSimpleName;\n this.b7_1 = isInstanceFunction;\n }\n protoOf(PrimitiveKClassImpl).equals = function (other) {\n if (!(other instanceof PrimitiveKClassImpl))\n return false;\n return protoOf(KClassImpl).equals.call(this, other) ? this.a7_1 === other.a7_1 : false;\n };\n protoOf(PrimitiveKClassImpl).v6 = function () {\n return this.a7_1;\n };\n protoOf(PrimitiveKClassImpl).w6 = function (value) {\n return this.b7_1(value);\n };\n function SimpleKClassImpl(jClass) {\n KClassImpl.call(this, jClass);\n var tmp = this;\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp0_safe_receiver = jClass.$metadata$;\n tmp.d7_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.simpleName;\n }\n protoOf(SimpleKClassImpl).v6 = function () {\n return this.d7_1;\n };\n protoOf(SimpleKClassImpl).w6 = function (value) {\n return jsIsType(value, this.u6());\n };\n function KProperty1() {\n }\n function KProperty0() {\n }\n function createKType(classifier, arguments_0, isMarkedNullable) {\n return new KTypeImpl(classifier, asList(arguments_0), isMarkedNullable);\n }\n function KTypeImpl(classifier, arguments_0, isMarkedNullable) {\n this.e7_1 = classifier;\n this.f7_1 = arguments_0;\n this.g7_1 = isMarkedNullable;\n }\n protoOf(KTypeImpl).h7 = function () {\n return this.e7_1;\n };\n protoOf(KTypeImpl).i7 = function () {\n return this.f7_1;\n };\n protoOf(KTypeImpl).j7 = function () {\n return this.g7_1;\n };\n protoOf(KTypeImpl).equals = function (other) {\n var tmp;\n var tmp_0;\n var tmp_1;\n if (other instanceof KTypeImpl) {\n tmp_1 = equals_0(this.e7_1, other.e7_1);\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp_0 = equals_0(this.f7_1, other.f7_1);\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = this.g7_1 === other.g7_1;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(KTypeImpl).hashCode = function () {\n return imul(imul(hashCode(this.e7_1), 31) + hashCode(this.f7_1) | 0, 31) + getBooleanHashCode(this.g7_1) | 0;\n };\n protoOf(KTypeImpl).toString = function () {\n var tmp = this.e7_1;\n var kClass = isInterface(tmp, KClass) ? tmp : null;\n var classifierName = kClass == null ? toString_1(this.e7_1) : !(kClass.v6() == null) ? kClass.v6() : '(non-denotable type)';\n var args = this.f7_1.b1() ? '' : joinToString_0(this.f7_1, ', ', '<', '>');\n var nullable = this.g7_1 ? '?' : '';\n return plus_4(classifierName, args) + nullable;\n };\n function get_functionClasses() {\n _init_properties_primitives_kt__3fums4();\n return functionClasses;\n }\n var functionClasses;\n function PrimitiveClasses$anyClass$lambda(it) {\n return !(it == null);\n }\n function PrimitiveClasses$numberClass$lambda(it) {\n return isNumber(it);\n }\n function PrimitiveClasses$booleanClass$lambda(it) {\n return !(it == null) ? typeof it === 'boolean' : false;\n }\n function PrimitiveClasses$byteClass$lambda(it) {\n return !(it == null) ? typeof it === 'number' : false;\n }\n function PrimitiveClasses$shortClass$lambda(it) {\n return !(it == null) ? typeof it === 'number' : false;\n }\n function PrimitiveClasses$intClass$lambda(it) {\n return !(it == null) ? typeof it === 'number' : false;\n }\n function PrimitiveClasses$floatClass$lambda(it) {\n return !(it == null) ? typeof it === 'number' : false;\n }\n function PrimitiveClasses$doubleClass$lambda(it) {\n return !(it == null) ? typeof it === 'number' : false;\n }\n function PrimitiveClasses$arrayClass$lambda(it) {\n return !(it == null) ? isArray(it) : false;\n }\n function PrimitiveClasses$stringClass$lambda(it) {\n return !(it == null) ? typeof it === 'string' : false;\n }\n function PrimitiveClasses$throwableClass$lambda(it) {\n return it instanceof Error;\n }\n function PrimitiveClasses$booleanArrayClass$lambda(it) {\n return !(it == null) ? isBooleanArray(it) : false;\n }\n function PrimitiveClasses$charArrayClass$lambda(it) {\n return !(it == null) ? isCharArray(it) : false;\n }\n function PrimitiveClasses$byteArrayClass$lambda(it) {\n return !(it == null) ? isByteArray(it) : false;\n }\n function PrimitiveClasses$shortArrayClass$lambda(it) {\n return !(it == null) ? isShortArray(it) : false;\n }\n function PrimitiveClasses$intArrayClass$lambda(it) {\n return !(it == null) ? isIntArray(it) : false;\n }\n function PrimitiveClasses$longArrayClass$lambda(it) {\n return !(it == null) ? isLongArray(it) : false;\n }\n function PrimitiveClasses$floatArrayClass$lambda(it) {\n return !(it == null) ? isFloatArray(it) : false;\n }\n function PrimitiveClasses$doubleArrayClass$lambda(it) {\n return !(it == null) ? isDoubleArray(it) : false;\n }\n function PrimitiveClasses$functionClass$lambda($arity) {\n return function (it) {\n var tmp;\n if (typeof it === 'function') {\n // Inline function 'kotlin.js.asDynamic' call\n tmp = it.length === $arity;\n } else {\n tmp = false;\n }\n return tmp;\n };\n }\n function PrimitiveClasses() {\n PrimitiveClasses_instance = this;\n var tmp = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_0 = Object;\n tmp.anyClass = new PrimitiveKClassImpl(tmp_0, 'Any', PrimitiveClasses$anyClass$lambda);\n var tmp_1 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_2 = Number;\n tmp_1.numberClass = new PrimitiveKClassImpl(tmp_2, 'Number', PrimitiveClasses$numberClass$lambda);\n this.nothingClass = NothingKClassImpl_getInstance();\n var tmp_3 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_4 = Boolean;\n tmp_3.booleanClass = new PrimitiveKClassImpl(tmp_4, 'Boolean', PrimitiveClasses$booleanClass$lambda);\n var tmp_5 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_6 = Number;\n tmp_5.byteClass = new PrimitiveKClassImpl(tmp_6, 'Byte', PrimitiveClasses$byteClass$lambda);\n var tmp_7 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_8 = Number;\n tmp_7.shortClass = new PrimitiveKClassImpl(tmp_8, 'Short', PrimitiveClasses$shortClass$lambda);\n var tmp_9 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_10 = Number;\n tmp_9.intClass = new PrimitiveKClassImpl(tmp_10, 'Int', PrimitiveClasses$intClass$lambda);\n var tmp_11 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_12 = Number;\n tmp_11.floatClass = new PrimitiveKClassImpl(tmp_12, 'Float', PrimitiveClasses$floatClass$lambda);\n var tmp_13 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_14 = Number;\n tmp_13.doubleClass = new PrimitiveKClassImpl(tmp_14, 'Double', PrimitiveClasses$doubleClass$lambda);\n var tmp_15 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_16 = Array;\n tmp_15.arrayClass = new PrimitiveKClassImpl(tmp_16, 'Array', PrimitiveClasses$arrayClass$lambda);\n var tmp_17 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_18 = String;\n tmp_17.stringClass = new PrimitiveKClassImpl(tmp_18, 'String', PrimitiveClasses$stringClass$lambda);\n var tmp_19 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_20 = Error;\n tmp_19.throwableClass = new PrimitiveKClassImpl(tmp_20, 'Throwable', PrimitiveClasses$throwableClass$lambda);\n var tmp_21 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_22 = Array;\n tmp_21.booleanArrayClass = new PrimitiveKClassImpl(tmp_22, 'BooleanArray', PrimitiveClasses$booleanArrayClass$lambda);\n var tmp_23 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_24 = Uint16Array;\n tmp_23.charArrayClass = new PrimitiveKClassImpl(tmp_24, 'CharArray', PrimitiveClasses$charArrayClass$lambda);\n var tmp_25 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_26 = Int8Array;\n tmp_25.byteArrayClass = new PrimitiveKClassImpl(tmp_26, 'ByteArray', PrimitiveClasses$byteArrayClass$lambda);\n var tmp_27 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_28 = Int16Array;\n tmp_27.shortArrayClass = new PrimitiveKClassImpl(tmp_28, 'ShortArray', PrimitiveClasses$shortArrayClass$lambda);\n var tmp_29 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_30 = Int32Array;\n tmp_29.intArrayClass = new PrimitiveKClassImpl(tmp_30, 'IntArray', PrimitiveClasses$intArrayClass$lambda);\n var tmp_31 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_32 = Array;\n tmp_31.longArrayClass = new PrimitiveKClassImpl(tmp_32, 'LongArray', PrimitiveClasses$longArrayClass$lambda);\n var tmp_33 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_34 = Float32Array;\n tmp_33.floatArrayClass = new PrimitiveKClassImpl(tmp_34, 'FloatArray', PrimitiveClasses$floatArrayClass$lambda);\n var tmp_35 = this;\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_36 = Float64Array;\n tmp_35.doubleArrayClass = new PrimitiveKClassImpl(tmp_36, 'DoubleArray', PrimitiveClasses$doubleArrayClass$lambda);\n }\n protoOf(PrimitiveClasses).k7 = function () {\n return this.anyClass;\n };\n protoOf(PrimitiveClasses).l7 = function () {\n return this.numberClass;\n };\n protoOf(PrimitiveClasses).m7 = function () {\n return this.nothingClass;\n };\n protoOf(PrimitiveClasses).n7 = function () {\n return this.booleanClass;\n };\n protoOf(PrimitiveClasses).o7 = function () {\n return this.byteClass;\n };\n protoOf(PrimitiveClasses).p7 = function () {\n return this.shortClass;\n };\n protoOf(PrimitiveClasses).q7 = function () {\n return this.intClass;\n };\n protoOf(PrimitiveClasses).r7 = function () {\n return this.floatClass;\n };\n protoOf(PrimitiveClasses).s7 = function () {\n return this.doubleClass;\n };\n protoOf(PrimitiveClasses).t7 = function () {\n return this.arrayClass;\n };\n protoOf(PrimitiveClasses).u7 = function () {\n return this.stringClass;\n };\n protoOf(PrimitiveClasses).v7 = function () {\n return this.throwableClass;\n };\n protoOf(PrimitiveClasses).w7 = function () {\n return this.booleanArrayClass;\n };\n protoOf(PrimitiveClasses).x7 = function () {\n return this.charArrayClass;\n };\n protoOf(PrimitiveClasses).y7 = function () {\n return this.byteArrayClass;\n };\n protoOf(PrimitiveClasses).z7 = function () {\n return this.shortArrayClass;\n };\n protoOf(PrimitiveClasses).a8 = function () {\n return this.intArrayClass;\n };\n protoOf(PrimitiveClasses).b8 = function () {\n return this.longArrayClass;\n };\n protoOf(PrimitiveClasses).c8 = function () {\n return this.floatArrayClass;\n };\n protoOf(PrimitiveClasses).d8 = function () {\n return this.doubleArrayClass;\n };\n protoOf(PrimitiveClasses).functionClass = function (arity) {\n var tmp0_elvis_lhs = get_functionClasses()[arity];\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.run' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.reflect.js.internal.PrimitiveClasses.functionClass.' call\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp_0 = Function;\n var tmp_1 = 'Function' + arity;\n var result = new PrimitiveKClassImpl(tmp_0, tmp_1, PrimitiveClasses$functionClass$lambda(arity));\n // Inline function 'kotlin.js.asDynamic' call\n get_functionClasses()[arity] = result;\n tmp = result;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n var PrimitiveClasses_instance;\n function PrimitiveClasses_getInstance() {\n if (PrimitiveClasses_instance == null)\n new PrimitiveClasses();\n return PrimitiveClasses_instance;\n }\n var properties_initialized_primitives_kt_jle18u;\n function _init_properties_primitives_kt__3fums4() {\n if (!properties_initialized_primitives_kt_jle18u) {\n properties_initialized_primitives_kt_jle18u = true;\n // Inline function 'kotlin.arrayOfNulls' call\n functionClasses = fillArrayVal(Array(0), null);\n }\n }\n function getKClass(jClass) {\n var tmp;\n if (Array.isArray(jClass)) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = getKClassM(jClass);\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = getKClass1(jClass);\n }\n return tmp;\n }\n function getKClassM(jClasses) {\n var tmp;\n switch (jClasses.length) {\n case 1:\n tmp = getKClass1(jClasses[0]);\n break;\n case 0:\n // Inline function 'kotlin.js.unsafeCast' call\n\n // Inline function 'kotlin.js.asDynamic' call\n\n tmp = NothingKClassImpl_getInstance();\n break;\n default:\n // Inline function 'kotlin.js.unsafeCast' call\n\n // Inline function 'kotlin.js.asDynamic' call\n\n tmp = new ErrorKClass();\n break;\n }\n return tmp;\n }\n function getKClass1(jClass) {\n if (jClass === String) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return PrimitiveClasses_getInstance().stringClass;\n }\n // Inline function 'kotlin.js.asDynamic' call\n var metadata = jClass.$metadata$;\n var tmp;\n if (metadata != null) {\n var tmp_0;\n if (metadata.$kClass$ == null) {\n var kClass = new SimpleKClassImpl(jClass);\n metadata.$kClass$ = kClass;\n tmp_0 = kClass;\n } else {\n tmp_0 = metadata.$kClass$;\n }\n tmp = tmp_0;\n } else {\n tmp = new SimpleKClassImpl(jClass);\n }\n return tmp;\n }\n function getKClassFromExpression(e) {\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp;\n switch (typeof e) {\n case 'string':\n tmp = PrimitiveClasses_getInstance().stringClass;\n break;\n case 'number':\n var tmp_0;\n // Inline function 'kotlin.js.asDynamic' call\n\n // Inline function 'kotlin.js.jsBitwiseOr' call\n\n if ((e | 0) === e) {\n tmp_0 = PrimitiveClasses_getInstance().intClass;\n } else {\n tmp_0 = PrimitiveClasses_getInstance().doubleClass;\n }\n\n tmp = tmp_0;\n break;\n case 'boolean':\n tmp = PrimitiveClasses_getInstance().booleanClass;\n break;\n case 'function':\n var tmp_1 = PrimitiveClasses_getInstance();\n // Inline function 'kotlin.js.asDynamic' call\n\n tmp = tmp_1.functionClass(e.length);\n break;\n default:\n var tmp_2;\n if (isBooleanArray(e)) {\n tmp_2 = PrimitiveClasses_getInstance().booleanArrayClass;\n } else {\n if (isCharArray(e)) {\n tmp_2 = PrimitiveClasses_getInstance().charArrayClass;\n } else {\n if (isByteArray(e)) {\n tmp_2 = PrimitiveClasses_getInstance().byteArrayClass;\n } else {\n if (isShortArray(e)) {\n tmp_2 = PrimitiveClasses_getInstance().shortArrayClass;\n } else {\n if (isIntArray(e)) {\n tmp_2 = PrimitiveClasses_getInstance().intArrayClass;\n } else {\n if (isLongArray(e)) {\n tmp_2 = PrimitiveClasses_getInstance().longArrayClass;\n } else {\n if (isFloatArray(e)) {\n tmp_2 = PrimitiveClasses_getInstance().floatArrayClass;\n } else {\n if (isDoubleArray(e)) {\n tmp_2 = PrimitiveClasses_getInstance().doubleArrayClass;\n } else {\n if (isInterface(e, KClass)) {\n tmp_2 = getKClass(KClass);\n } else {\n if (isArray(e)) {\n tmp_2 = PrimitiveClasses_getInstance().arrayClass;\n } else {\n var constructor = Object.getPrototypeOf(e).constructor;\n var tmp_3;\n if (constructor === Object) {\n tmp_3 = PrimitiveClasses_getInstance().anyClass;\n } else if (constructor === Error) {\n tmp_3 = PrimitiveClasses_getInstance().throwableClass;\n } else {\n var jsClass = constructor;\n tmp_3 = getKClass1(jsClass);\n }\n tmp_2 = tmp_3;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n tmp = tmp_2;\n break;\n }\n // Inline function 'kotlin.js.asDynamic' call\n return tmp;\n }\n function ConstrainedOnceSequence(sequence) {\n this.e8_1 = sequence;\n }\n protoOf(ConstrainedOnceSequence).t = function () {\n var tmp0_elvis_lhs = this.e8_1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw IllegalStateException_init_$Create$_0('This sequence can be consumed only once.');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var sequence = tmp;\n this.e8_1 = null;\n return sequence.t();\n };\n function StringBuilder_init_$Init$(capacity, $this) {\n StringBuilder_init_$Init$_0($this);\n return $this;\n }\n function StringBuilder_init_$Create$(capacity) {\n return StringBuilder_init_$Init$(capacity, objectCreate(protoOf(StringBuilder)));\n }\n function StringBuilder_init_$Init$_0($this) {\n StringBuilder.call($this, '');\n return $this;\n }\n function StringBuilder_init_$Create$_0() {\n return StringBuilder_init_$Init$_0(objectCreate(protoOf(StringBuilder)));\n }\n function StringBuilder(content) {\n this.w5_1 = !(content === undefined) ? content : '';\n }\n protoOf(StringBuilder).a = function () {\n // Inline function 'kotlin.js.asDynamic' call\n return this.w5_1.length;\n };\n protoOf(StringBuilder).b = function (index) {\n // Inline function 'kotlin.text.getOrElse' call\n var this_0 = this.w5_1;\n var tmp;\n if (index >= 0 ? index <= get_lastIndex_3(this_0) : false) {\n tmp = charSequenceGet(this_0, index);\n } else {\n throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', length: ' + this.a() + '}');\n }\n return tmp;\n };\n protoOf(StringBuilder).c = function (startIndex, endIndex) {\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n return this.w5_1.substring(startIndex, endIndex);\n };\n protoOf(StringBuilder).z5 = function (value) {\n this.w5_1 = this.w5_1 + toString(value);\n return this;\n };\n protoOf(StringBuilder).f8 = function (value) {\n this.w5_1 = this.w5_1 + toString_0(value);\n return this;\n };\n protoOf(StringBuilder).g8 = function (value, startIndex, endIndex) {\n return this.h8(value == null ? 'null' : value, startIndex, endIndex);\n };\n protoOf(StringBuilder).x5 = function (value) {\n this.w5_1 = this.w5_1 + toString_0(value);\n return this;\n };\n protoOf(StringBuilder).i8 = function (value) {\n return this.y5(value.toString());\n };\n protoOf(StringBuilder).j8 = function (value) {\n return this.y5(value.toString());\n };\n protoOf(StringBuilder).y5 = function (value) {\n var tmp = this;\n var tmp_0 = this.w5_1;\n tmp.w5_1 = tmp_0 + (value == null ? 'null' : value);\n return this;\n };\n protoOf(StringBuilder).k8 = function (index, value) {\n Companion_instance_5.n1(index, this.a());\n var tmp = this;\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = this.w5_1.substring(0, index) + toString(value);\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.w5_1 = tmp_0 + this.w5_1.substring(index);\n return this;\n };\n protoOf(StringBuilder).l8 = function (newLength) {\n if (newLength < 0) {\n throw IllegalArgumentException_init_$Create$_0('Negative new length: ' + newLength + '.');\n }\n if (newLength <= this.a()) {\n var tmp = this;\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.w5_1 = this.w5_1.substring(0, newLength);\n } else {\n var inductionVariable = this.a();\n if (inductionVariable < newLength)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n this.w5_1 = this.w5_1 + toString(_Char___init__impl__6a9atx(0));\n }\n while (inductionVariable < newLength);\n }\n };\n protoOf(StringBuilder).toString = function () {\n return this.w5_1;\n };\n protoOf(StringBuilder).m8 = function () {\n this.w5_1 = '';\n return this;\n };\n protoOf(StringBuilder).h8 = function (value, startIndex, endIndex) {\n var stringCsq = toString_1(value);\n Companion_instance_5.n8(startIndex, endIndex, stringCsq.length);\n var tmp = this;\n var tmp_0 = this.w5_1;\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.w5_1 = tmp_0 + stringCsq.substring(startIndex, endIndex);\n return this;\n };\n function uppercaseChar(_this__u8e3s4) {\n // Inline function 'kotlin.text.uppercase' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var uppercase = toString(_this__u8e3s4).toUpperCase();\n return uppercase.length > 1 ? _this__u8e3s4 : charSequenceGet(uppercase, 0);\n }\n function isWhitespace(_this__u8e3s4) {\n return isWhitespaceImpl(_this__u8e3s4);\n }\n function isLowerCase(_this__u8e3s4) {\n if (_Char___init__impl__6a9atx(97) <= _this__u8e3s4 ? _this__u8e3s4 <= _Char___init__impl__6a9atx(122) : false) {\n return true;\n }\n if (Char__compareTo_impl_ypi4mb(_this__u8e3s4, _Char___init__impl__6a9atx(128)) < 0) {\n return false;\n }\n return isLowerCaseImpl(_this__u8e3s4);\n }\n function titlecaseChar(_this__u8e3s4) {\n return titlecaseCharImpl(_this__u8e3s4);\n }\n function checkRadix(radix) {\n if (!(2 <= radix ? radix <= 36 : false)) {\n throw IllegalArgumentException_init_$Create$_0('radix ' + radix + ' was not in valid range 2..36');\n }\n return radix;\n }\n function toInt(_this__u8e3s4) {\n var tmp0_elvis_lhs = toIntOrNull(_this__u8e3s4);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n numberFormatError(_this__u8e3s4);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function toDouble(_this__u8e3s4) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var this_0 = +_this__u8e3s4;\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.text.toDouble.' call\n if ((isNaN_0(this_0) ? !isNaN_2(_this__u8e3s4) : false) ? true : this_0 === 0.0 ? isBlank(_this__u8e3s4) : false) {\n numberFormatError(_this__u8e3s4);\n }\n return this_0;\n }\n function toLong(_this__u8e3s4) {\n var tmp0_elvis_lhs = toLongOrNull(_this__u8e3s4);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n numberFormatError(_this__u8e3s4);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function digitOf(char, radix) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.text.digitOf.' call\n var it = (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(48)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(57)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(48)) : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(90)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65)) + 10 | 0 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(97)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(122)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(97)) + 10 | 0 : Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(128)) < 0 ? -1 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65313)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65338)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65313)) + 10 | 0 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65345)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65370)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65345)) + 10 | 0 : digitToIntImpl(char);\n return it >= radix ? -1 : it;\n }\n function isNaN_2(_this__u8e3s4) {\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n switch (_this__u8e3s4.toLowerCase()) {\n case 'nan':\n case '+nan':\n case '-nan':\n return true;\n default:\n return false;\n }\n }\n function toDoubleOrNull(_this__u8e3s4) {\n // Inline function 'kotlin.takeIf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var this_0 = +_this__u8e3s4;\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n // Inline function 'kotlin.text.toDoubleOrNull.' call\n if (!((isNaN_0(this_0) ? !isNaN_2(_this__u8e3s4) : false) ? true : this_0 === 0.0 ? isBlank(_this__u8e3s4) : false)) {\n tmp = this_0;\n } else {\n tmp = null;\n }\n return tmp;\n }\n function Regex_init_$Init$(pattern, $this) {\n Regex.call($this, pattern, emptySet());\n return $this;\n }\n function Regex_init_$Create$(pattern) {\n return Regex_init_$Init$(pattern, objectCreate(protoOf(Regex)));\n }\n function Companion_1() {\n Companion_instance_1 = this;\n this.o8_1 = new RegExp('[\\\\\\\\^$*+?.()|[\\\\]{}]', 'g');\n this.p8_1 = new RegExp('[\\\\\\\\$]', 'g');\n this.q8_1 = new RegExp('\\\\$', 'g');\n }\n protoOf(Companion_1).r8 = function (literal) {\n // Inline function 'kotlin.text.nativeReplace' call\n var pattern = this.o8_1;\n // Inline function 'kotlin.js.asDynamic' call\n return literal.replace(pattern, '\\\\$&');\n };\n protoOf(Companion_1).s8 = function (literal) {\n // Inline function 'kotlin.text.nativeReplace' call\n var pattern = this.q8_1;\n // Inline function 'kotlin.js.asDynamic' call\n return literal.replace(pattern, '$$$$');\n };\n var Companion_instance_1;\n function Companion_getInstance_1() {\n if (Companion_instance_1 == null)\n new Companion_1();\n return Companion_instance_1;\n }\n function Regex$findAll$lambda(this$0, $input, $startIndex) {\n return function () {\n return this$0.y8($input, $startIndex);\n };\n }\n function Regex$findAll$lambda_0(match) {\n return match.w();\n }\n function Regex(pattern, options) {\n Companion_getInstance_1();\n this.t8_1 = pattern;\n this.u8_1 = toSet_0(options);\n this.v8_1 = new RegExp(pattern, toFlags(options, 'gu'));\n this.w8_1 = null;\n this.x8_1 = null;\n }\n protoOf(Regex).y8 = function (input, startIndex) {\n if (startIndex < 0 ? true : startIndex > charSequenceLength(input)) {\n throw IndexOutOfBoundsException_init_$Create$_0('Start index out of bounds: ' + startIndex + ', input length: ' + charSequenceLength(input));\n }\n return findNext(this.v8_1, toString_1(input), startIndex, this.v8_1);\n };\n protoOf(Regex).z8 = function (input, startIndex) {\n if (startIndex < 0 ? true : startIndex > charSequenceLength(input)) {\n throw IndexOutOfBoundsException_init_$Create$_0('Start index out of bounds: ' + startIndex + ', input length: ' + charSequenceLength(input));\n }\n var tmp = Regex$findAll$lambda(this, input, startIndex);\n return generateSequence(tmp, Regex$findAll$lambda_0);\n };\n protoOf(Regex).a9 = function (input, startIndex, $super) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n return $super === VOID ? this.z8(input, startIndex) : $super.z8.call(this, input, startIndex);\n };\n protoOf(Regex).toString = function () {\n return this.v8_1.toString();\n };\n function MatchGroup(value) {\n this.b9_1 = value;\n }\n protoOf(MatchGroup).toString = function () {\n return 'MatchGroup(value=' + this.b9_1 + ')';\n };\n protoOf(MatchGroup).hashCode = function () {\n return getStringHashCode(this.b9_1);\n };\n protoOf(MatchGroup).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof MatchGroup))\n return false;\n var tmp0_other_with_cast = other instanceof MatchGroup ? other : THROW_CCE();\n if (!(this.b9_1 === tmp0_other_with_cast.b9_1))\n return false;\n return true;\n };\n function toFlags(_this__u8e3s4, prepend) {\n return joinToString_0(_this__u8e3s4, '', prepend, VOID, VOID, VOID, toFlags$lambda);\n }\n function findNext(_this__u8e3s4, input, from, nextPattern) {\n _this__u8e3s4.lastIndex = from;\n var match = _this__u8e3s4.exec(input);\n if (match == null)\n return null;\n var range = numberRangeToNumber(match.index, _this__u8e3s4.lastIndex - 1 | 0);\n return new findNext$1(range, match, nextPattern, input);\n }\n function toFlags$lambda(it) {\n return it.e9_1;\n }\n function findNext$o$groups$o$iterator$lambda(this$0) {\n return function (it) {\n return this$0.f1(it);\n };\n }\n function advanceToNextCharacter($this, index) {\n if (index < get_lastIndex_3($this.n9_1)) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var code1 = $this.n9_1.charCodeAt(index);\n if (55296 <= code1 ? code1 <= 56319 : false) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var code2 = $this.n9_1.charCodeAt(index + 1 | 0);\n if (56320 <= code2 ? code2 <= 57343 : false) {\n return index + 2 | 0;\n }\n }\n }\n return index + 1 | 0;\n }\n function findNext$1$groups$1($match, this$0) {\n this.f9_1 = $match;\n this.g9_1 = this$0;\n AbstractCollection.call(this);\n }\n protoOf(findNext$1$groups$1).n = function () {\n return this.f9_1.length;\n };\n protoOf(findNext$1$groups$1).t = function () {\n var tmp = asSequence_0(get_indices_1(this));\n return map(tmp, findNext$o$groups$o$iterator$lambda(this)).t();\n };\n protoOf(findNext$1$groups$1).f1 = function (index) {\n // Inline function 'kotlin.js.get' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp0_safe_receiver = this.f9_1[index];\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.text..get.' call\n tmp = new MatchGroup(tmp0_safe_receiver);\n }\n return tmp;\n };\n function findNext$1($range, $match, $nextPattern, $input) {\n this.k9_1 = $range;\n this.l9_1 = $match;\n this.m9_1 = $nextPattern;\n this.n9_1 = $input;\n this.h9_1 = $range;\n var tmp = this;\n tmp.i9_1 = new findNext$1$groups$1($match, this);\n this.j9_1 = null;\n }\n protoOf(findNext$1).u2 = function () {\n // Inline function 'kotlin.js.get' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$1 = this.l9_1[0];\n return ensureNotNull(tmp$ret$1);\n };\n protoOf(findNext$1).w = function () {\n return findNext(this.m9_1, this.n9_1, this.k9_1.b1() ? advanceToNextCharacter(this, this.k9_1.s9()) : this.k9_1.r9() + 1 | 0, this.m9_1);\n };\n function isBlank(_this__u8e3s4) {\n var tmp;\n if (charSequenceLength(_this__u8e3s4) === 0) {\n tmp = true;\n } else {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = get_indices_2(_this__u8e3s4);\n var tmp_0;\n if (isInterface(this_0, Collection)) {\n tmp_0 = this_0.b1();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.text.isBlank.' call\n if (!isWhitespace(charSequenceGet(_this__u8e3s4, element))) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n tmp = tmp$ret$0;\n }\n return tmp;\n }\n function startsWith(_this__u8e3s4, prefix, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (!ignoreCase) {\n // Inline function 'kotlin.text.nativeStartsWith' call\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.startsWith(prefix, 0);\n } else\n return regionMatches(_this__u8e3s4, 0, prefix, 0, prefix.length, ignoreCase);\n }\n function endsWith(_this__u8e3s4, suffix, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (!ignoreCase) {\n // Inline function 'kotlin.text.nativeEndsWith' call\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.endsWith(suffix);\n } else\n return regionMatches(_this__u8e3s4, _this__u8e3s4.length - suffix.length | 0, suffix, 0, suffix.length, ignoreCase);\n }\n function repeat(_this__u8e3s4, n) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(n >= 0)) {\n // Inline function 'kotlin.text.repeat.' call\n var message = \"Count 'n' must be non-negative, but was \" + n + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n var tmp;\n switch (n) {\n case 0:\n tmp = '';\n break;\n case 1:\n tmp = toString_1(_this__u8e3s4);\n break;\n default:\n var result = '';\n // Inline function 'kotlin.text.isEmpty' call\n\n if (!(charSequenceLength(_this__u8e3s4) === 0)) {\n var s = toString_1(_this__u8e3s4);\n var count = n;\n $l$loop: while (true) {\n if ((count & 1) === 1) {\n result = result + s;\n }\n count = count >>> 1 | 0;\n if (count === 0) {\n break $l$loop;\n }\n s = s + s;\n }\n }\n\n return result;\n }\n return tmp;\n }\n function replace(_this__u8e3s4, oldValue, newValue, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n // Inline function 'kotlin.text.nativeReplace' call\n var pattern = new RegExp(Companion_getInstance_1().r8(oldValue), ignoreCase ? 'gui' : 'gu');\n var replacement = Companion_getInstance_1().s8(newValue);\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.replace(pattern, replacement);\n }\n function regionMatches(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n return regionMatchesImpl(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase);\n }\n function equals(_this__u8e3s4, other, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (_this__u8e3s4 == null)\n return other == null;\n if (other == null)\n return false;\n if (!ignoreCase)\n return _this__u8e3s4 == other;\n if (!(_this__u8e3s4.length === other.length))\n return false;\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n if (inductionVariable < last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var thisChar = charSequenceGet(_this__u8e3s4, index);\n var otherChar = charSequenceGet(other, index);\n if (!equals_1(thisChar, otherChar, ignoreCase)) {\n return false;\n }\n }\n while (inductionVariable < last);\n return true;\n }\n var DurationUnit_NANOSECONDS_instance;\n var DurationUnit_MICROSECONDS_instance;\n var DurationUnit_MILLISECONDS_instance;\n var DurationUnit_SECONDS_instance;\n var DurationUnit_MINUTES_instance;\n var DurationUnit_HOURS_instance;\n var DurationUnit_DAYS_instance;\n var DurationUnit_entriesInitialized;\n function DurationUnit_initEntries() {\n if (DurationUnit_entriesInitialized)\n return Unit_instance;\n DurationUnit_entriesInitialized = true;\n DurationUnit_NANOSECONDS_instance = new DurationUnit('NANOSECONDS', 0, 1.0);\n DurationUnit_MICROSECONDS_instance = new DurationUnit('MICROSECONDS', 1, 1000.0);\n DurationUnit_MILLISECONDS_instance = new DurationUnit('MILLISECONDS', 2, 1000000.0);\n DurationUnit_SECONDS_instance = new DurationUnit('SECONDS', 3, 1.0E9);\n DurationUnit_MINUTES_instance = new DurationUnit('MINUTES', 4, 6.0E10);\n DurationUnit_HOURS_instance = new DurationUnit('HOURS', 5, 3.6E12);\n DurationUnit_DAYS_instance = new DurationUnit('DAYS', 6, 8.64E13);\n }\n function DurationUnit(name, ordinal, scale) {\n Enum.call(this, name, ordinal);\n this.v9_1 = scale;\n }\n function convertDurationUnit(value, sourceUnit, targetUnit) {\n var sourceCompareTarget = compareTo_0(sourceUnit.v9_1, targetUnit.v9_1);\n return sourceCompareTarget > 0 ? value * (sourceUnit.v9_1 / targetUnit.v9_1) : sourceCompareTarget < 0 ? value / (targetUnit.v9_1 / sourceUnit.v9_1) : value;\n }\n function convertDurationUnit_0(value, sourceUnit, targetUnit) {\n var sourceCompareTarget = compareTo_0(sourceUnit.v9_1, targetUnit.v9_1);\n var tmp;\n if (sourceCompareTarget > 0) {\n var scale = numberToLong(sourceUnit.v9_1 / targetUnit.v9_1);\n var result = value.aa(scale);\n var tmp_0;\n if (result.z9(scale).equals(value)) {\n tmp_0 = result;\n } else if (value.ba(new Long(0, 0)) > 0) {\n Companion_getInstance_4();\n tmp_0 = new Long(-1, 2147483647);\n } else {\n Companion_getInstance_4();\n tmp_0 = new Long(0, -2147483648);\n }\n tmp = tmp_0;\n } else if (sourceCompareTarget < 0) {\n tmp = value.z9(numberToLong(targetUnit.v9_1 / sourceUnit.v9_1));\n } else {\n tmp = value;\n }\n return tmp;\n }\n function convertDurationUnitOverflow(value, sourceUnit, targetUnit) {\n var sourceCompareTarget = compareTo_0(sourceUnit.v9_1, targetUnit.v9_1);\n return sourceCompareTarget > 0 ? value.aa(numberToLong(sourceUnit.v9_1 / targetUnit.v9_1)) : sourceCompareTarget < 0 ? value.z9(numberToLong(targetUnit.v9_1 / sourceUnit.v9_1)) : value;\n }\n function DurationUnit_NANOSECONDS_getInstance() {\n DurationUnit_initEntries();\n return DurationUnit_NANOSECONDS_instance;\n }\n function DurationUnit_MICROSECONDS_getInstance() {\n DurationUnit_initEntries();\n return DurationUnit_MICROSECONDS_instance;\n }\n function DurationUnit_MILLISECONDS_getInstance() {\n DurationUnit_initEntries();\n return DurationUnit_MILLISECONDS_instance;\n }\n function DurationUnit_SECONDS_getInstance() {\n DurationUnit_initEntries();\n return DurationUnit_SECONDS_instance;\n }\n function DurationUnit_MINUTES_getInstance() {\n DurationUnit_initEntries();\n return DurationUnit_MINUTES_instance;\n }\n function DurationUnit_HOURS_getInstance() {\n DurationUnit_initEntries();\n return DurationUnit_HOURS_instance;\n }\n function DurationUnit_DAYS_getInstance() {\n DurationUnit_initEntries();\n return DurationUnit_DAYS_instance;\n }\n function MonotonicTimeSource() {\n MonotonicTimeSource_instance = this;\n var tmp = this;\n // Inline function 'kotlin.run' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.time.MonotonicTimeSource.actualSource.' call\n var isNode = typeof process !== 'undefined' && process.versions && !!process.versions.node;\n var tmp_0;\n if (isNode) {\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp$ret$0 = process;\n tmp_0 = new HrTimeSource(tmp$ret$0);\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp0_safe_receiver = typeof self !== 'undefined' ? self : globalThis;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.performance;\n var tmp_1;\n if (tmp1_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n tmp_1 = new PerformanceTimeSource(tmp1_safe_receiver);\n }\n var tmp2_elvis_lhs = tmp_1;\n tmp_0 = tmp2_elvis_lhs == null ? DateNowTimeSource_instance : tmp2_elvis_lhs;\n }\n tmp.ca_1 = tmp_0;\n }\n protoOf(MonotonicTimeSource).da = function () {\n return this.ca_1.da();\n };\n protoOf(MonotonicTimeSource).ea = function () {\n return new ValueTimeMark(this.da());\n };\n protoOf(MonotonicTimeSource).fa = function (timeMark) {\n return this.ca_1.fa(timeMark);\n };\n protoOf(MonotonicTimeSource).ga = function (one, another) {\n return this.ca_1.ga(one, another);\n };\n var MonotonicTimeSource_instance;\n function MonotonicTimeSource_getInstance() {\n if (MonotonicTimeSource_instance == null)\n new MonotonicTimeSource();\n return MonotonicTimeSource_instance;\n }\n function Reading(components) {\n this.ha_1 = components;\n }\n protoOf(Reading).equals = function (other) {\n var tmp;\n if (other instanceof Reading) {\n tmp = contentEquals_4(this.ha_1, other.ha_1);\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(Reading).hashCode = function () {\n return contentHashCode(this.ha_1);\n };\n protoOf(Reading).toString = function () {\n return contentToString(this.ha_1);\n };\n function HrTimeSource(process) {\n this.ia_1 = process;\n }\n protoOf(HrTimeSource).da = function () {\n return _ValueTimeMark___init__impl__uyfl2m(new Reading(this.ia_1.hrtime()));\n };\n protoOf(HrTimeSource).ea = function () {\n return new ValueTimeMark(this.da());\n };\n protoOf(HrTimeSource).fa = function (timeMark) {\n // Inline function 'kotlin.let' call\n var tmp = _ValueTimeMark___get_reading__impl__5qz8rd(timeMark);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.time.HrTimeSource.elapsedFrom.' call\n var name_for_destructuring_parameter_0_fjsvno = this.ia_1.hrtime((tmp instanceof Reading ? tmp : THROW_CCE()).ha_1);\n // Inline function 'kotlin.collections.component1' call\n var seconds = name_for_destructuring_parameter_0_fjsvno[0];\n // Inline function 'kotlin.collections.component2' call\n var nanos = name_for_destructuring_parameter_0_fjsvno[1];\n return Duration__plus_impl_yu9v8f(toDuration_0(seconds, DurationUnit_SECONDS_getInstance()), toDuration_0(nanos, DurationUnit_NANOSECONDS_getInstance()));\n };\n protoOf(HrTimeSource).ga = function (one, another) {\n var tmp = _ValueTimeMark___get_reading__impl__5qz8rd(one);\n var tmp0_container = tmp instanceof Reading ? tmp : THROW_CCE();\n // Inline function 'kotlin.time.Reading.component1' call\n // Inline function 'kotlin.collections.component1' call\n var s1 = tmp0_container.ha_1[0];\n // Inline function 'kotlin.time.Reading.component2' call\n // Inline function 'kotlin.collections.component2' call\n var n1 = tmp0_container.ha_1[1];\n var tmp_0 = _ValueTimeMark___get_reading__impl__5qz8rd(another);\n var tmp1_container = tmp_0 instanceof Reading ? tmp_0 : THROW_CCE();\n // Inline function 'kotlin.time.Reading.component1' call\n // Inline function 'kotlin.collections.component1' call\n var s2 = tmp1_container.ha_1[0];\n // Inline function 'kotlin.time.Reading.component2' call\n // Inline function 'kotlin.collections.component2' call\n var n2 = tmp1_container.ha_1[1];\n return Duration__plus_impl_yu9v8f((s1 === s2 ? n1 === n2 : false) ? Companion_getInstance_11().ja_1 : toDuration_0(s1 - s2, DurationUnit_SECONDS_getInstance()), toDuration_0(n1 - n2, DurationUnit_NANOSECONDS_getInstance()));\n };\n protoOf(HrTimeSource).toString = function () {\n return 'TimeSource(process.hrtime())';\n };\n function read($this) {\n return $this.ma_1.now();\n }\n function PerformanceTimeSource(performance) {\n this.ma_1 = performance;\n }\n protoOf(PerformanceTimeSource).da = function () {\n return _ValueTimeMark___init__impl__uyfl2m(read(this));\n };\n protoOf(PerformanceTimeSource).ea = function () {\n return new ValueTimeMark(this.da());\n };\n protoOf(PerformanceTimeSource).fa = function (timeMark) {\n // Inline function 'kotlin.time.Companion.milliseconds' call\n Companion_getInstance_11();\n var tmp = read(this);\n var tmp_0 = _ValueTimeMark___get_reading__impl__5qz8rd(timeMark);\n var this_0 = tmp - (typeof tmp_0 === 'number' ? tmp_0 : THROW_CCE());\n return toDuration_0(this_0, DurationUnit_MILLISECONDS_getInstance());\n };\n protoOf(PerformanceTimeSource).ga = function (one, another) {\n var tmp = _ValueTimeMark___get_reading__impl__5qz8rd(one);\n var ms1 = typeof tmp === 'number' ? tmp : THROW_CCE();\n var tmp_0 = _ValueTimeMark___get_reading__impl__5qz8rd(another);\n var ms2 = typeof tmp_0 === 'number' ? tmp_0 : THROW_CCE();\n var tmp_1;\n if (ms1 === ms2) {\n tmp_1 = Companion_getInstance_11().ja_1;\n } else {\n // Inline function 'kotlin.time.Companion.milliseconds' call\n Companion_getInstance_11();\n var this_0 = ms1 - ms2;\n tmp_1 = toDuration_0(this_0, DurationUnit_MILLISECONDS_getInstance());\n }\n return tmp_1;\n };\n protoOf(PerformanceTimeSource).toString = function () {\n return 'TimeSource(self.performance.now())';\n };\n function read_0($this) {\n return Date.now();\n }\n function DateNowTimeSource() {\n }\n protoOf(DateNowTimeSource).da = function () {\n return _ValueTimeMark___init__impl__uyfl2m(read_0(this));\n };\n protoOf(DateNowTimeSource).ea = function () {\n return new ValueTimeMark(this.da());\n };\n protoOf(DateNowTimeSource).fa = function (timeMark) {\n // Inline function 'kotlin.time.Companion.milliseconds' call\n Companion_getInstance_11();\n var tmp = read_0(this);\n var tmp_0 = _ValueTimeMark___get_reading__impl__5qz8rd(timeMark);\n var this_0 = tmp - (typeof tmp_0 === 'number' ? tmp_0 : THROW_CCE());\n return toDuration_0(this_0, DurationUnit_MILLISECONDS_getInstance());\n };\n protoOf(DateNowTimeSource).ga = function (one, another) {\n var tmp = _ValueTimeMark___get_reading__impl__5qz8rd(one);\n var ms1 = typeof tmp === 'number' ? tmp : THROW_CCE();\n var tmp_0 = _ValueTimeMark___get_reading__impl__5qz8rd(another);\n var ms2 = typeof tmp_0 === 'number' ? tmp_0 : THROW_CCE();\n var tmp_1;\n if (ms1 === ms2) {\n tmp_1 = Companion_getInstance_11().ja_1;\n } else {\n // Inline function 'kotlin.time.Companion.milliseconds' call\n Companion_getInstance_11();\n var this_0 = ms1 - ms2;\n tmp_1 = toDuration_0(this_0, DurationUnit_MILLISECONDS_getInstance());\n }\n return tmp_1;\n };\n protoOf(DateNowTimeSource).toString = function () {\n return 'TimeSource(Date.now())';\n };\n var DateNowTimeSource_instance;\n function DateNowTimeSource_getInstance() {\n return DateNowTimeSource_instance;\n }\n function toList(_this__u8e3s4) {\n switch (_this__u8e3s4.length) {\n case 0:\n return emptyList();\n case 1:\n return listOf(_this__u8e3s4[0]);\n default:\n return toMutableList(_this__u8e3s4);\n }\n }\n function withIndex(_this__u8e3s4) {\n return new IndexingIterable(withIndex$lambda(_this__u8e3s4));\n }\n function get_indices(_this__u8e3s4) {\n return new IntRange(0, get_lastIndex(_this__u8e3s4));\n }\n function get_indices_0(_this__u8e3s4) {\n return new IntRange(0, get_lastIndex_0(_this__u8e3s4));\n }\n function joinToString(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n return joinTo(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString();\n }\n function firstOrNull(_this__u8e3s4) {\n var tmp;\n // Inline function 'kotlin.collections.isEmpty' call\n if (_this__u8e3s4.length === 0) {\n tmp = null;\n } else {\n tmp = _this__u8e3s4[0];\n }\n return tmp;\n }\n function asSequence(_this__u8e3s4) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (_this__u8e3s4.length === 0)\n return emptySequence();\n // Inline function 'kotlin.sequences.Sequence' call\n return new _no_name_provided__qut3iv(_this__u8e3s4);\n }\n function any(_this__u8e3s4) {\n // Inline function 'kotlin.collections.isEmpty' call\n return !(_this__u8e3s4.length === 0);\n }\n function subtract(_this__u8e3s4, other) {\n var set = toMutableSet(_this__u8e3s4);\n removeAll_0(set, other);\n return set;\n }\n function contains_0(_this__u8e3s4, element) {\n return indexOf(_this__u8e3s4, element) >= 0;\n }\n function asIterable(_this__u8e3s4) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (_this__u8e3s4.length === 0)\n return emptyList();\n // Inline function 'kotlin.collections.Iterable' call\n return new _no_name_provided__qut3iv_0(_this__u8e3s4);\n }\n function filterNotNull(_this__u8e3s4) {\n return filterNotNullTo(_this__u8e3s4, ArrayList_init_$Create$());\n }\n function reversedArray(_this__u8e3s4) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (_this__u8e3s4.length === 0)\n return _this__u8e3s4;\n var result = arrayOfNulls(_this__u8e3s4, _this__u8e3s4.length);\n var lastIndex = get_lastIndex(_this__u8e3s4);\n var inductionVariable = 0;\n if (inductionVariable <= lastIndex)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n result[lastIndex - i | 0] = _this__u8e3s4[i];\n }\n while (!(i === lastIndex));\n return result;\n }\n function first(_this__u8e3s4) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (_this__u8e3s4.length === 0)\n throw NoSuchElementException_init_$Create$_0('Array is empty.');\n return _this__u8e3s4[0];\n }\n function toMutableList(_this__u8e3s4) {\n return ArrayList_init_$Create$_1(asCollection(_this__u8e3s4));\n }\n function zip(_this__u8e3s4, other) {\n // Inline function 'kotlin.collections.zip' call\n // Inline function 'kotlin.comparisons.minOf' call\n var a = _this__u8e3s4.length;\n var b = other.length;\n var size = Math.min(a, b);\n var list = ArrayList_init_$Create$_0(size);\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.zip.' call\n var t1 = _this__u8e3s4[i];\n var t2 = other[i];\n var tmp$ret$1 = to(t1, t2);\n list.q(tmp$ret$1);\n }\n while (inductionVariable < size);\n return list;\n }\n function get_lastIndex(_this__u8e3s4) {\n return _this__u8e3s4.length - 1 | 0;\n }\n function lastOrNull(_this__u8e3s4) {\n var tmp;\n // Inline function 'kotlin.collections.isEmpty' call\n if (_this__u8e3s4.length === 0) {\n tmp = null;\n } else {\n tmp = _this__u8e3s4[_this__u8e3s4.length - 1 | 0];\n }\n return tmp;\n }\n function none(_this__u8e3s4) {\n // Inline function 'kotlin.collections.isEmpty' call\n return _this__u8e3s4.length === 0;\n }\n function distinct(_this__u8e3s4) {\n return toList_0(toMutableSet(_this__u8e3s4));\n }\n function last(_this__u8e3s4) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (_this__u8e3s4.length === 0)\n throw NoSuchElementException_init_$Create$_0('Array is empty.');\n return _this__u8e3s4[get_lastIndex(_this__u8e3s4)];\n }\n function sortedWith(_this__u8e3s4, comparator) {\n return asList(sortedArrayWith(_this__u8e3s4, comparator));\n }\n function contains_1(_this__u8e3s4, element) {\n return indexOf_0(_this__u8e3s4, element) >= 0;\n }\n function contains_2(_this__u8e3s4, element) {\n return indexOf_1(_this__u8e3s4, element) >= 0;\n }\n function contains_3(_this__u8e3s4, element) {\n return indexOf_2(_this__u8e3s4, element) >= 0;\n }\n function contains_4(_this__u8e3s4, element) {\n return indexOf_3(_this__u8e3s4, element) >= 0;\n }\n function indexOf(_this__u8e3s4, element) {\n if (element == null) {\n var inductionVariable = 0;\n var last = _this__u8e3s4.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (_this__u8e3s4[index] == null) {\n return index;\n }\n }\n while (inductionVariable <= last);\n } else {\n var inductionVariable_0 = 0;\n var last_0 = _this__u8e3s4.length - 1 | 0;\n if (inductionVariable_0 <= last_0)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n if (equals_0(element, _this__u8e3s4[index_0])) {\n return index_0;\n }\n }\n while (inductionVariable_0 <= last_0);\n }\n return -1;\n }\n function lastIndexOf(_this__u8e3s4, element) {\n if (element == null) {\n var inductionVariable = _this__u8e3s4.length - 1 | 0;\n if (0 <= inductionVariable)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + -1 | 0;\n if (_this__u8e3s4[index] == null) {\n return index;\n }\n }\n while (0 <= inductionVariable);\n } else {\n var inductionVariable_0 = _this__u8e3s4.length - 1 | 0;\n if (0 <= inductionVariable_0)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + -1 | 0;\n if (equals_0(element, _this__u8e3s4[index_0])) {\n return index_0;\n }\n }\n while (0 <= inductionVariable_0);\n }\n return -1;\n }\n function toSet(_this__u8e3s4) {\n switch (_this__u8e3s4.length) {\n case 0:\n return emptySet();\n case 1:\n return setOf(_this__u8e3s4[0]);\n default:\n return toCollection(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.length)));\n }\n }\n function toCollection(_this__u8e3s4, destination) {\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n while (inductionVariable < last) {\n var item = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n destination.q(item);\n }\n return destination;\n }\n function single(_this__u8e3s4) {\n var tmp;\n switch (_this__u8e3s4.length) {\n case 0:\n throw NoSuchElementException_init_$Create$_0('Array is empty.');\n case 1:\n tmp = _this__u8e3s4[0];\n break;\n default:\n throw IllegalArgumentException_init_$Create$_0('Array has more than one element.');\n }\n return tmp;\n }\n function get_lastIndex_0(_this__u8e3s4) {\n return _this__u8e3s4.length - 1 | 0;\n }\n function joinTo(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n buffer.f8(prefix);\n var count = 0;\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n $l$loop: while (inductionVariable < last) {\n var element = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n count = count + 1 | 0;\n if (count > 1) {\n buffer.f8(separator);\n }\n if (limit < 0 ? true : count <= limit) {\n appendElement(buffer, element, transform);\n } else\n break $l$loop;\n }\n if (limit >= 0 ? count > limit : false) {\n buffer.f8(truncated);\n }\n buffer.f8(postfix);\n return buffer;\n }\n function toMutableSet(_this__u8e3s4) {\n return toCollection(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.length)));\n }\n function filterNotNullTo(_this__u8e3s4, destination) {\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n while (inductionVariable < last) {\n var element = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n if (!(element == null)) {\n destination.q(element);\n }\n }\n return destination;\n }\n function sortedArrayWith(_this__u8e3s4, comparator) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (_this__u8e3s4.length === 0)\n return _this__u8e3s4;\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.collections.copyOf' call\n // Inline function 'kotlin.js.asDynamic' call\n var this_0 = _this__u8e3s4.slice();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sortedArrayWith.' call\n sortWith_0(this_0, comparator);\n return this_0;\n }\n function indexOf_0(_this__u8e3s4, element) {\n var inductionVariable = 0;\n var last = _this__u8e3s4.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (element.equals(_this__u8e3s4[index])) {\n return index;\n }\n }\n while (inductionVariable <= last);\n return -1;\n }\n function indexOf_1(_this__u8e3s4, element) {\n var inductionVariable = 0;\n var last = _this__u8e3s4.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (element === _this__u8e3s4[index]) {\n return index;\n }\n }\n while (inductionVariable <= last);\n return -1;\n }\n function indexOf_2(_this__u8e3s4, element) {\n var inductionVariable = 0;\n var last = _this__u8e3s4.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (element === _this__u8e3s4[index]) {\n return index;\n }\n }\n while (inductionVariable <= last);\n return -1;\n }\n function indexOf_3(_this__u8e3s4, element) {\n var inductionVariable = 0;\n var last = _this__u8e3s4.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (element === _this__u8e3s4[index]) {\n return index;\n }\n }\n while (inductionVariable <= last);\n return -1;\n }\n function get_lastIndex_1(_this__u8e3s4) {\n return _this__u8e3s4.length - 1 | 0;\n }\n function getOrNull(_this__u8e3s4, index) {\n return (index >= 0 ? index <= get_lastIndex(_this__u8e3s4) : false) ? _this__u8e3s4[index] : null;\n }\n function withIndex$lambda($this_withIndex) {\n return function () {\n return arrayIterator($this_withIndex);\n };\n }\n function _no_name_provided__qut3iv($this_asSequence) {\n this.na_1 = $this_asSequence;\n }\n protoOf(_no_name_provided__qut3iv).t = function () {\n // Inline function 'kotlin.collections.asSequence.' call\n return arrayIterator(this.na_1);\n };\n function _no_name_provided__qut3iv_0($this_asIterable) {\n this.oa_1 = $this_asIterable;\n }\n protoOf(_no_name_provided__qut3iv_0).t = function () {\n // Inline function 'kotlin.collections.asIterable.' call\n return arrayIterator(this.oa_1);\n };\n function joinToString_0(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n return joinTo_0(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString();\n }\n function joinTo_0(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n buffer.f8(prefix);\n var count = 0;\n var tmp0_iterator = _this__u8e3s4.t();\n $l$loop: while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n count = count + 1 | 0;\n if (count > 1) {\n buffer.f8(separator);\n }\n if (limit < 0 ? true : count <= limit) {\n appendElement(buffer, element, transform);\n } else\n break $l$loop;\n }\n if (limit >= 0 ? count > limit : false) {\n buffer.f8(truncated);\n }\n buffer.f8(postfix);\n return buffer;\n }\n function toHashSet(_this__u8e3s4) {\n return toCollection_0(_this__u8e3s4, HashSet_init_$Create$_1(mapCapacity(collectionSizeOrDefault(_this__u8e3s4, 12))));\n }\n function toBooleanArray(_this__u8e3s4) {\n var result = booleanArray(_this__u8e3s4.n());\n var index = 0;\n var tmp0_iterator = _this__u8e3s4.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n result[tmp1] = element;\n }\n return result;\n }\n function toList_0(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection)) {\n var tmp;\n switch (_this__u8e3s4.n()) {\n case 0:\n tmp = emptyList();\n break;\n case 1:\n var tmp_0;\n if (isInterface(_this__u8e3s4, List)) {\n tmp_0 = _this__u8e3s4.f1(0);\n } else {\n tmp_0 = _this__u8e3s4.t().w();\n }\n\n tmp = listOf(tmp_0);\n break;\n default:\n tmp = toMutableList_0(_this__u8e3s4);\n break;\n }\n return tmp;\n }\n return optimizeReadOnlyList(toMutableList_1(_this__u8e3s4));\n }\n function plus(_this__u8e3s4, elements) {\n if (isInterface(elements, Collection)) {\n var result = ArrayList_init_$Create$_0(_this__u8e3s4.n() + elements.n() | 0);\n result.x(_this__u8e3s4);\n result.x(elements);\n return result;\n } else {\n var result_0 = ArrayList_init_$Create$_1(_this__u8e3s4);\n addAll_0(result_0, elements);\n return result_0;\n }\n }\n function first_0(_this__u8e3s4) {\n if (_this__u8e3s4.b1())\n throw NoSuchElementException_init_$Create$_0('List is empty.');\n return _this__u8e3s4.f1(0);\n }\n function asSequence_0(_this__u8e3s4) {\n // Inline function 'kotlin.sequences.Sequence' call\n return new _no_name_provided__qut3iv_1(_this__u8e3s4);\n }\n function any_0(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection))\n return !_this__u8e3s4.b1();\n return _this__u8e3s4.t().u();\n }\n function none_0(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection))\n return _this__u8e3s4.b1();\n return !_this__u8e3s4.t().u();\n }\n function firstOrNull_0(_this__u8e3s4) {\n return _this__u8e3s4.b1() ? null : _this__u8e3s4.f1(0);\n }\n function minus(_this__u8e3s4, element) {\n var result = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));\n var removed = false;\n // Inline function 'kotlin.collections.filterTo' call\n var tmp0_iterator = _this__u8e3s4.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'kotlin.collections.minus.' call\n var tmp;\n if (!removed ? equals_0(element_0, element) : false) {\n removed = true;\n tmp = false;\n } else {\n tmp = true;\n }\n if (tmp) {\n result.q(element_0);\n }\n }\n return result;\n }\n function toMutableList_0(_this__u8e3s4) {\n return ArrayList_init_$Create$_1(_this__u8e3s4);\n }\n function plus_0(_this__u8e3s4, element) {\n var result = ArrayList_init_$Create$_0(_this__u8e3s4.n() + 1 | 0);\n result.x(_this__u8e3s4);\n result.q(element);\n return result;\n }\n function plus_1(_this__u8e3s4, elements) {\n var result = ArrayList_init_$Create$_0(_this__u8e3s4.n() + elements.length | 0);\n result.x(_this__u8e3s4);\n addAll(result, elements);\n return result;\n }\n function distinct_0(_this__u8e3s4) {\n return toList_0(toMutableSet_0(_this__u8e3s4));\n }\n function last_0(_this__u8e3s4) {\n if (_this__u8e3s4.b1())\n throw NoSuchElementException_init_$Create$_0('List is empty.');\n return _this__u8e3s4.f1(get_lastIndex_2(_this__u8e3s4));\n }\n function filterNotNull_0(_this__u8e3s4) {\n return filterNotNullTo_0(_this__u8e3s4, ArrayList_init_$Create$());\n }\n function toSet_0(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection)) {\n var tmp;\n switch (_this__u8e3s4.n()) {\n case 0:\n tmp = emptySet();\n break;\n case 1:\n var tmp_0;\n if (isInterface(_this__u8e3s4, List)) {\n tmp_0 = _this__u8e3s4.f1(0);\n } else {\n tmp_0 = _this__u8e3s4.t().w();\n }\n\n tmp = setOf(tmp_0);\n break;\n default:\n tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.n())));\n break;\n }\n return tmp;\n }\n return optimizeReadOnlySet(toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$()));\n }\n function sorted(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection)) {\n if (_this__u8e3s4.n() <= 1)\n return toList_0(_this__u8e3s4);\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = copyToArray(_this__u8e3s4);\n var this_0 = isArray(tmp) ? tmp : THROW_CCE();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sorted.' call\n sort_0(this_0);\n return asList(this_0);\n }\n // Inline function 'kotlin.apply' call\n var this_1 = toMutableList_1(_this__u8e3s4);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sorted.' call\n sort(this_1);\n return this_1;\n }\n function contains_5(_this__u8e3s4, element) {\n if (isInterface(_this__u8e3s4, Collection))\n return _this__u8e3s4.p(element);\n return indexOf_4(_this__u8e3s4, element) >= 0;\n }\n function toCollection_0(_this__u8e3s4, destination) {\n var tmp0_iterator = _this__u8e3s4.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n destination.q(item);\n }\n return destination;\n }\n function toMutableList_1(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection))\n return toMutableList_0(_this__u8e3s4);\n return toCollection_0(_this__u8e3s4, ArrayList_init_$Create$());\n }\n function sortedWith_0(_this__u8e3s4, comparator) {\n if (isInterface(_this__u8e3s4, Collection)) {\n if (_this__u8e3s4.n() <= 1)\n return toList_0(_this__u8e3s4);\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = copyToArray(_this__u8e3s4);\n var this_0 = isArray(tmp) ? tmp : THROW_CCE();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sortedWith.' call\n sortWith_0(this_0, comparator);\n return asList(this_0);\n }\n // Inline function 'kotlin.apply' call\n var this_1 = toMutableList_1(_this__u8e3s4);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sortedWith.' call\n sortWith(this_1, comparator);\n return this_1;\n }\n function toMutableSet_0(_this__u8e3s4) {\n var tmp;\n if (isInterface(_this__u8e3s4, Collection)) {\n tmp = LinkedHashSet_init_$Create$_0(_this__u8e3s4);\n } else {\n tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$());\n }\n return tmp;\n }\n function filterNotNullTo_0(_this__u8e3s4, destination) {\n var tmp0_iterator = _this__u8e3s4.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n if (!(element == null)) {\n destination.q(element);\n }\n }\n return destination;\n }\n function indexOf_4(_this__u8e3s4, element) {\n if (isInterface(_this__u8e3s4, List))\n return _this__u8e3s4.a2(element);\n var index = 0;\n var tmp0_iterator = _this__u8e3s4.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n checkIndexOverflow(index);\n if (equals_0(element, item))\n return index;\n index = index + 1 | 0;\n }\n return -1;\n }\n function minOrNull(_this__u8e3s4) {\n var iterator = _this__u8e3s4.t();\n if (!iterator.u())\n return null;\n var min = iterator.w();\n while (iterator.u()) {\n var e = iterator.w();\n if (compareTo_0(min, e) > 0)\n min = e;\n }\n return min;\n }\n function single_0(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, List))\n return single_1(_this__u8e3s4);\n else {\n var iterator = _this__u8e3s4.t();\n if (!iterator.u())\n throw NoSuchElementException_init_$Create$_0('Collection is empty.');\n var single = iterator.w();\n if (iterator.u())\n throw IllegalArgumentException_init_$Create$_0('Collection has more than one element.');\n return single;\n }\n }\n function single_1(_this__u8e3s4) {\n var tmp;\n switch (_this__u8e3s4.n()) {\n case 0:\n throw NoSuchElementException_init_$Create$_0('List is empty.');\n case 1:\n tmp = _this__u8e3s4.f1(0);\n break;\n default:\n throw IllegalArgumentException_init_$Create$_0('List has more than one element.');\n }\n return tmp;\n }\n function singleOrNull(_this__u8e3s4) {\n return _this__u8e3s4.n() === 1 ? _this__u8e3s4.f1(0) : null;\n }\n function lastOrNull_0(_this__u8e3s4) {\n return _this__u8e3s4.b1() ? null : _this__u8e3s4.f1(_this__u8e3s4.n() - 1 | 0);\n }\n function _no_name_provided__qut3iv_1($this_asSequence) {\n this.pa_1 = $this_asSequence;\n }\n protoOf(_no_name_provided__qut3iv_1).t = function () {\n // Inline function 'kotlin.collections.asSequence.' call\n return this.pa_1.t();\n };\n function titlecaseImpl(_this__u8e3s4) {\n // Inline function 'kotlin.text.uppercase' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var uppercase = toString(_this__u8e3s4).toUpperCase();\n if (uppercase.length > 1) {\n var tmp;\n if (_this__u8e3s4 === _Char___init__impl__6a9atx(329)) {\n tmp = uppercase;\n } else {\n // Inline function 'kotlin.text.plus' call\n var this_0 = charSequenceGet(uppercase, 0);\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.js.asDynamic' call\n var other = uppercase.substring(1).toLowerCase();\n tmp = toString(this_0) + other;\n }\n return tmp;\n }\n return toString(titlecaseChar(_this__u8e3s4));\n }\n function until(_this__u8e3s4, to) {\n if (to <= IntCompanionObject_instance.MIN_VALUE)\n return Companion_getInstance_9().qa_1;\n return numberRangeToNumber(_this__u8e3s4, to - 1 | 0);\n }\n function step(_this__u8e3s4, step) {\n checkStepIsPositive(step > 0, step);\n return Companion_instance_10.ua(_this__u8e3s4.ra_1, _this__u8e3s4.sa_1, _this__u8e3s4.ta_1 > 0 ? step : -step | 0);\n }\n function coerceAtLeast(_this__u8e3s4, minimumValue) {\n return _this__u8e3s4 < minimumValue ? minimumValue : _this__u8e3s4;\n }\n function reversed(_this__u8e3s4) {\n return Companion_instance_10.ua(_this__u8e3s4.sa_1, _this__u8e3s4.ra_1, -_this__u8e3s4.ta_1 | 0);\n }\n function downTo(_this__u8e3s4, to) {\n return Companion_instance_10.ua(_this__u8e3s4, to, -1);\n }\n function coerceIn(_this__u8e3s4, minimumValue, maximumValue) {\n if (minimumValue.ba(maximumValue) > 0)\n throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: maximum ' + maximumValue.toString() + ' is less than minimum ' + minimumValue.toString() + '.');\n if (_this__u8e3s4.ba(minimumValue) < 0)\n return minimumValue;\n if (_this__u8e3s4.ba(maximumValue) > 0)\n return maximumValue;\n return _this__u8e3s4;\n }\n function coerceAtMost(_this__u8e3s4, maximumValue) {\n return _this__u8e3s4 > maximumValue ? maximumValue : _this__u8e3s4;\n }\n function coerceIn_0(_this__u8e3s4, minimumValue, maximumValue) {\n if (minimumValue > maximumValue)\n throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: maximum ' + maximumValue + ' is less than minimum ' + minimumValue + '.');\n if (_this__u8e3s4 < minimumValue)\n return minimumValue;\n if (_this__u8e3s4 > maximumValue)\n return maximumValue;\n return _this__u8e3s4;\n }\n function contains_6(_this__u8e3s4, value) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.ranges.contains.' call\n var it = toIntExactOrNull(value);\n return !(it == null) ? _this__u8e3s4.va(it) : false;\n }\n function toIntExactOrNull(_this__u8e3s4) {\n var tmp;\n var containsLower = toLong_0(IntCompanionObject_instance.MIN_VALUE);\n if (_this__u8e3s4.ba(toLong_0(IntCompanionObject_instance.MAX_VALUE)) <= 0 ? containsLower.ba(_this__u8e3s4) <= 0 : false) {\n tmp = _this__u8e3s4.wa();\n } else {\n tmp = null;\n }\n return tmp;\n }\n function toList_1(_this__u8e3s4) {\n var it = _this__u8e3s4.t();\n if (!it.u())\n return emptyList();\n var element = it.w();\n if (!it.u())\n return listOf(element);\n var dst = ArrayList_init_$Create$();\n dst.q(element);\n while (it.u()) {\n dst.q(it.w());\n }\n return dst;\n }\n function mapNotNull(_this__u8e3s4, transform) {\n return filterNotNull_1(new TransformingSequence(_this__u8e3s4, transform));\n }\n function filter(_this__u8e3s4, predicate) {\n return new FilteringSequence(_this__u8e3s4, true, predicate);\n }\n function firstOrNull_1(_this__u8e3s4) {\n var iterator = _this__u8e3s4.t();\n if (!iterator.u())\n return null;\n return iterator.w();\n }\n function map(_this__u8e3s4, transform) {\n return new TransformingSequence(_this__u8e3s4, transform);\n }\n function toSet_1(_this__u8e3s4) {\n var it = _this__u8e3s4.t();\n if (!it.u())\n return emptySet();\n var element = it.w();\n if (!it.u())\n return setOf(element);\n var dst = LinkedHashSet_init_$Create$();\n dst.q(element);\n while (it.u()) {\n dst.q(it.w());\n }\n return dst;\n }\n function flatMap(_this__u8e3s4, transform) {\n return new FlatteningSequence(_this__u8e3s4, transform, Sequence$iterator$ref());\n }\n function distinct_1(_this__u8e3s4) {\n return distinctBy(_this__u8e3s4, distinct$lambda);\n }\n function onEach(_this__u8e3s4, action) {\n return map(_this__u8e3s4, onEach$lambda(action));\n }\n function any_1(_this__u8e3s4) {\n return _this__u8e3s4.t().u();\n }\n function plus_2(_this__u8e3s4, elements) {\n return flatten_1(sequenceOf([_this__u8e3s4, elements]));\n }\n function minus_0(_this__u8e3s4, element) {\n return new minus$1(_this__u8e3s4, element);\n }\n function asIterable_0(_this__u8e3s4) {\n // Inline function 'kotlin.collections.Iterable' call\n return new _no_name_provided__qut3iv_2(_this__u8e3s4);\n }\n function filterNotNull_1(_this__u8e3s4) {\n var tmp = filterNot(_this__u8e3s4, filterNotNull$lambda);\n return isInterface(tmp, Sequence) ? tmp : THROW_CCE();\n }\n function distinctBy(_this__u8e3s4, selector) {\n return new DistinctSequence(_this__u8e3s4, selector);\n }\n function filterNot(_this__u8e3s4, predicate) {\n return new FilteringSequence(_this__u8e3s4, false, predicate);\n }\n function Sequence$iterator$ref() {\n var l = function (p0) {\n return p0.t();\n };\n l.callableName = 'iterator';\n return l;\n }\n function distinct$lambda(it) {\n return it;\n }\n function onEach$lambda($action) {\n return function (it) {\n $action(it);\n return it;\n };\n }\n function minus$o$iterator$lambda($removed, $element) {\n return function (it) {\n var tmp;\n if (!$removed._v ? equals_0(it, $element) : false) {\n $removed._v = true;\n tmp = false;\n } else {\n tmp = true;\n }\n return tmp;\n };\n }\n function minus$1($this_minus, $element) {\n this.xa_1 = $this_minus;\n this.ya_1 = $element;\n }\n protoOf(minus$1).t = function () {\n var removed = {_v: false};\n return filter(this.xa_1, minus$o$iterator$lambda(removed, this.ya_1)).t();\n };\n function _no_name_provided__qut3iv_2($this_asIterable) {\n this.za_1 = $this_asIterable;\n }\n protoOf(_no_name_provided__qut3iv_2).t = function () {\n // Inline function 'kotlin.sequences.asIterable.' call\n return this.za_1.t();\n };\n function filterNotNull$lambda(it) {\n return it == null;\n }\n function plus_3(_this__u8e3s4, elements) {\n var tmp0_safe_receiver = collectionSizeOrNull(elements);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.plus.' call\n tmp = _this__u8e3s4.n() + tmp0_safe_receiver | 0;\n }\n var tmp1_elvis_lhs = tmp;\n var result = LinkedHashSet_init_$Create$_1(mapCapacity(tmp1_elvis_lhs == null ? imul(_this__u8e3s4.n(), 2) : tmp1_elvis_lhs));\n result.x(_this__u8e3s4);\n addAll_0(result, elements);\n return result;\n }\n function last_1(_this__u8e3s4) {\n // Inline function 'kotlin.text.isEmpty' call\n if (charSequenceLength(_this__u8e3s4) === 0)\n throw NoSuchElementException_init_$Create$_0('Char sequence is empty.');\n return charSequenceGet(_this__u8e3s4, get_lastIndex_3(_this__u8e3s4));\n }\n function drop(_this__u8e3s4, n) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(n >= 0)) {\n // Inline function 'kotlin.text.drop.' call\n var message = 'Requested character count ' + n + ' is less than zero.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n // Inline function 'kotlin.text.substring' call\n var startIndex = coerceAtMost(n, _this__u8e3s4.length);\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.substring(startIndex);\n }\n function single_2(_this__u8e3s4) {\n var tmp;\n switch (charSequenceLength(_this__u8e3s4)) {\n case 0:\n throw NoSuchElementException_init_$Create$_0('Char sequence is empty.');\n case 1:\n tmp = charSequenceGet(_this__u8e3s4, 0);\n break;\n default:\n throw IllegalArgumentException_init_$Create$_0('Char sequence has more than one element.');\n }\n return tmp;\n }\n function contentEquals_0(_this__u8e3s4, other) {\n var tmp;\n var tmp_0 = _this__u8e3s4;\n if ((tmp_0 == null ? null : new UByteArray(tmp_0)) == null) {\n tmp = null;\n } else {\n tmp = _UByteArray___get_storage__impl__d4kctt(_this__u8e3s4);\n }\n var tmp_1 = tmp;\n var tmp_2;\n var tmp_3 = other;\n if ((tmp_3 == null ? null : new UByteArray(tmp_3)) == null) {\n tmp_2 = null;\n } else {\n tmp_2 = _UByteArray___get_storage__impl__d4kctt(other);\n }\n return contentEquals_5(tmp_1, tmp_2);\n }\n function contentEquals_1(_this__u8e3s4, other) {\n var tmp;\n var tmp_0 = _this__u8e3s4;\n if ((tmp_0 == null ? null : new UShortArray(tmp_0)) == null) {\n tmp = null;\n } else {\n tmp = _UShortArray___get_storage__impl__t2jpv5(_this__u8e3s4);\n }\n var tmp_1 = tmp;\n var tmp_2;\n var tmp_3 = other;\n if ((tmp_3 == null ? null : new UShortArray(tmp_3)) == null) {\n tmp_2 = null;\n } else {\n tmp_2 = _UShortArray___get_storage__impl__t2jpv5(other);\n }\n return contentEquals_6(tmp_1, tmp_2);\n }\n function contentEquals_2(_this__u8e3s4, other) {\n var tmp;\n var tmp_0 = _this__u8e3s4;\n if ((tmp_0 == null ? null : new UIntArray(tmp_0)) == null) {\n tmp = null;\n } else {\n tmp = _UIntArray___get_storage__impl__92a0v0(_this__u8e3s4);\n }\n var tmp_1 = tmp;\n var tmp_2;\n var tmp_3 = other;\n if ((tmp_3 == null ? null : new UIntArray(tmp_3)) == null) {\n tmp_2 = null;\n } else {\n tmp_2 = _UIntArray___get_storage__impl__92a0v0(other);\n }\n return contentEquals_7(tmp_1, tmp_2);\n }\n function contentEquals_3(_this__u8e3s4, other) {\n var tmp;\n var tmp_0 = _this__u8e3s4;\n if ((tmp_0 == null ? null : new ULongArray(tmp_0)) == null) {\n tmp = null;\n } else {\n tmp = _ULongArray___get_storage__impl__28e64j(_this__u8e3s4);\n }\n var tmp_1 = tmp;\n var tmp_2;\n var tmp_3 = other;\n if ((tmp_3 == null ? null : new ULongArray(tmp_3)) == null) {\n tmp_2 = null;\n } else {\n tmp_2 = _ULongArray___get_storage__impl__28e64j(other);\n }\n return contentEquals_8(tmp_1, tmp_2);\n }\n function get_PI() {\n return PI;\n }\n var PI;\n function _Char___init__impl__6a9atx(value) {\n return value;\n }\n function _get_value__a43j40($this) {\n return $this;\n }\n function _Char___init__impl__6a9atx_0(code) {\n // Inline function 'kotlin.UShort.toInt' call\n var tmp$ret$0 = _UShort___get_data__impl__g0245(code) & 65535;\n return _Char___init__impl__6a9atx(tmp$ret$0);\n }\n function Char__compareTo_impl_ypi4mb($this, other) {\n return _get_value__a43j40($this) - _get_value__a43j40(other) | 0;\n }\n function Char__compareTo_impl_ypi4mb_0($this, other) {\n return Char__compareTo_impl_ypi4mb($this.ab_1, other instanceof Char ? other.ab_1 : THROW_CCE());\n }\n function Char__minus_impl_a2frrh($this, other) {\n return _get_value__a43j40($this) - _get_value__a43j40(other) | 0;\n }\n function Char__toInt_impl_vasixd($this) {\n return _get_value__a43j40($this);\n }\n function Char__equals_impl_x6719k($this, other) {\n if (!(other instanceof Char))\n return false;\n return _get_value__a43j40($this) === _get_value__a43j40(other.ab_1);\n }\n function Char__hashCode_impl_otmys($this) {\n return _get_value__a43j40($this);\n }\n function toString($this) {\n // Inline function 'kotlin.js.unsafeCast' call\n return String.fromCharCode(_get_value__a43j40($this));\n }\n function Companion_2() {\n Companion_instance_2 = this;\n this.bb_1 = _Char___init__impl__6a9atx(0);\n this.cb_1 = _Char___init__impl__6a9atx(65535);\n this.db_1 = _Char___init__impl__6a9atx(55296);\n this.eb_1 = _Char___init__impl__6a9atx(56319);\n this.fb_1 = _Char___init__impl__6a9atx(56320);\n this.gb_1 = _Char___init__impl__6a9atx(57343);\n this.hb_1 = _Char___init__impl__6a9atx(55296);\n this.ib_1 = _Char___init__impl__6a9atx(57343);\n this.jb_1 = 2;\n this.kb_1 = 16;\n }\n var Companion_instance_2;\n function Companion_getInstance_2() {\n if (Companion_instance_2 == null)\n new Companion_2();\n return Companion_instance_2;\n }\n function Char(value) {\n Companion_getInstance_2();\n this.ab_1 = value;\n }\n protoOf(Char).lb = function (other) {\n return Char__compareTo_impl_ypi4mb(this.ab_1, other);\n };\n protoOf(Char).d = function (other) {\n return Char__compareTo_impl_ypi4mb_0(this, other);\n };\n protoOf(Char).equals = function (other) {\n return Char__equals_impl_x6719k(this.ab_1, other);\n };\n protoOf(Char).hashCode = function () {\n return Char__hashCode_impl_otmys(this.ab_1);\n };\n protoOf(Char).toString = function () {\n return toString(this.ab_1);\n };\n function List() {\n }\n function Collection() {\n }\n function Set() {\n }\n function Entry() {\n }\n function Map_0() {\n }\n function MutableList() {\n }\n function MutableSet() {\n }\n function MutableMap() {\n }\n function MutableIterable() {\n }\n function Companion_3() {\n }\n var Companion_instance_3;\n function Companion_getInstance_3() {\n return Companion_instance_3;\n }\n function Enum(name, ordinal) {\n this.w9_1 = name;\n this.x9_1 = ordinal;\n }\n protoOf(Enum).mb = function () {\n return this.w9_1;\n };\n protoOf(Enum).nb = function () {\n return this.x9_1;\n };\n protoOf(Enum).y9 = function (other) {\n return compareTo_0(this.x9_1, other.x9_1);\n };\n protoOf(Enum).d = function (other) {\n return this.y9(other instanceof Enum ? other : THROW_CCE());\n };\n protoOf(Enum).equals = function (other) {\n return this === other;\n };\n protoOf(Enum).hashCode = function () {\n return identityHashCode(this);\n };\n protoOf(Enum).toString = function () {\n return this.w9_1;\n };\n function arrayOf(elements) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return elements;\n }\n function toString_0(_this__u8e3s4) {\n var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : toString_1(_this__u8e3s4);\n return tmp1_elvis_lhs == null ? 'null' : tmp1_elvis_lhs;\n }\n function plus_4(_this__u8e3s4, other) {\n var tmp3_elvis_lhs = _this__u8e3s4 == null ? null : toString_1(_this__u8e3s4);\n var tmp = tmp3_elvis_lhs == null ? 'null' : tmp3_elvis_lhs;\n var tmp1_elvis_lhs = other == null ? null : toString_1(other);\n return tmp + (tmp1_elvis_lhs == null ? 'null' : tmp1_elvis_lhs);\n }\n function implement(interfaces) {\n var maxSize = 1;\n var masks = [];\n var inductionVariable = 0;\n var last = interfaces.length;\n while (inductionVariable < last) {\n var i = interfaces[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var currentSize = maxSize;\n var tmp1_elvis_lhs = i.prototype.$imask$;\n var imask = tmp1_elvis_lhs == null ? i.$imask$ : tmp1_elvis_lhs;\n if (!(imask == null)) {\n masks.push(imask);\n currentSize = imask.length;\n }\n var iid = i.$metadata$.iid;\n var tmp;\n if (iid == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.js.implement.' call\n tmp = bitMaskWith(iid);\n }\n var iidImask = tmp;\n if (!(iidImask == null)) {\n masks.push(iidImask);\n currentSize = Math.max(currentSize, iidImask.length);\n }\n if (currentSize > maxSize) {\n maxSize = currentSize;\n }\n }\n return compositeBitMask(maxSize, masks);\n }\n function bitMaskWith(activeBit) {\n var numberIndex = activeBit >> 5;\n var intArray = new Int32Array(numberIndex + 1 | 0);\n var positionInNumber = activeBit & 31;\n var numberWithSettledBit = 1 << positionInNumber;\n intArray[numberIndex] = intArray[numberIndex] | numberWithSettledBit;\n return intArray;\n }\n function compositeBitMask(capacity, masks) {\n var tmp = 0;\n var tmp_0 = new Int32Array(capacity);\n while (tmp < capacity) {\n var tmp_1 = tmp;\n var result = 0;\n var inductionVariable = 0;\n var last = masks.length;\n while (inductionVariable < last) {\n var mask = masks[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n if (tmp_1 < mask.length) {\n result = result | mask[tmp_1];\n }\n }\n tmp_0[tmp_1] = result;\n tmp = tmp + 1 | 0;\n }\n return tmp_0;\n }\n function isBitSet(_this__u8e3s4, possibleActiveBit) {\n var numberIndex = possibleActiveBit >> 5;\n if (numberIndex > _this__u8e3s4.length)\n return false;\n var positionInNumber = possibleActiveBit & 31;\n var numberWithSettledBit = 1 << positionInNumber;\n return !((_this__u8e3s4[numberIndex] & numberWithSettledBit) === 0);\n }\n function fillArrayVal(array, initValue) {\n var inductionVariable = 0;\n var last = array.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n array[i] = initValue;\n }\n while (!(i === last));\n return array;\n }\n function arrayIterator(array) {\n return new arrayIterator$1(array);\n }\n function booleanArray(size) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'withType' call\n var type = 'BooleanArray';\n var array = fillArrayVal(Array(size), false);\n array.$type$ = type;\n return array;\n }\n function charArray(size) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'withType' call\n var type = 'CharArray';\n var array = new Uint16Array(size);\n array.$type$ = type;\n return array;\n }\n function longArray(size) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'withType' call\n var type = 'LongArray';\n var array = fillArrayVal(Array(size), new Long(0, 0));\n array.$type$ = type;\n return array;\n }\n function charArrayOf(arr) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'withType' call\n var type = 'CharArray';\n var array = new Uint16Array(arr);\n array.$type$ = type;\n return array;\n }\n function arrayIterator$1($array) {\n this.pb_1 = $array;\n this.ob_1 = 0;\n }\n protoOf(arrayIterator$1).u = function () {\n return !(this.ob_1 === this.pb_1.length);\n };\n protoOf(arrayIterator$1).w = function () {\n var tmp;\n if (!(this.ob_1 === this.pb_1.length)) {\n var tmp1 = this.ob_1;\n this.ob_1 = tmp1 + 1 | 0;\n tmp = this.pb_1[tmp1];\n } else {\n throw NoSuchElementException_init_$Create$_0('' + this.ob_1);\n }\n return tmp;\n };\n function get_buf() {\n _init_properties_bitUtils_kt__nfcg4k();\n return buf;\n }\n var buf;\n function get_bufFloat64() {\n _init_properties_bitUtils_kt__nfcg4k();\n return bufFloat64;\n }\n var bufFloat64;\n var bufFloat32;\n function get_bufInt32() {\n _init_properties_bitUtils_kt__nfcg4k();\n return bufInt32;\n }\n var bufInt32;\n function get_lowIndex() {\n _init_properties_bitUtils_kt__nfcg4k();\n return lowIndex;\n }\n var lowIndex;\n function get_highIndex() {\n _init_properties_bitUtils_kt__nfcg4k();\n return highIndex;\n }\n var highIndex;\n function getNumberHashCode(obj) {\n _init_properties_bitUtils_kt__nfcg4k();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.jsBitwiseOr' call\n // Inline function 'kotlin.js.asDynamic' call\n if ((obj | 0) === obj) {\n return numberToInt(obj);\n }\n get_bufFloat64()[0] = obj;\n return imul(get_bufInt32()[get_highIndex()], 31) + get_bufInt32()[get_lowIndex()] | 0;\n }\n function doubleFromBits(value) {\n _init_properties_bitUtils_kt__nfcg4k();\n get_bufInt32()[get_lowIndex()] = value.l_1;\n get_bufInt32()[get_highIndex()] = value.m_1;\n return get_bufFloat64()[0];\n }\n function doubleToRawBits(value) {\n _init_properties_bitUtils_kt__nfcg4k();\n get_bufFloat64()[0] = value;\n return new Long(get_bufInt32()[get_lowIndex()], get_bufInt32()[get_highIndex()]);\n }\n var properties_initialized_bitUtils_kt_i2bo3e;\n function _init_properties_bitUtils_kt__nfcg4k() {\n if (!properties_initialized_bitUtils_kt_i2bo3e) {\n properties_initialized_bitUtils_kt_i2bo3e = true;\n buf = new ArrayBuffer(8);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n bufFloat64 = new Float64Array(get_buf());\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n bufFloat32 = new Float32Array(get_buf());\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n bufInt32 = new Int32Array(get_buf());\n // Inline function 'kotlin.run' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.js.lowIndex.' call\n get_bufFloat64()[0] = -1.0;\n lowIndex = !(get_bufInt32()[0] === 0) ? 1 : 0;\n highIndex = 1 - get_lowIndex() | 0;\n }\n }\n function charSequenceGet(a, index) {\n var tmp;\n if (isString(a)) {\n // Inline function 'kotlin.Char' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var code = a.charCodeAt(index);\n var tmp_0;\n // Inline function 'kotlin.code' call\n Companion_getInstance_2();\n var this_0 = _Char___init__impl__6a9atx(0);\n if (code < Char__toInt_impl_vasixd(this_0)) {\n tmp_0 = true;\n } else {\n // Inline function 'kotlin.code' call\n Companion_getInstance_2();\n var this_1 = _Char___init__impl__6a9atx(65535);\n tmp_0 = code > Char__toInt_impl_vasixd(this_1);\n }\n if (tmp_0) {\n throw IllegalArgumentException_init_$Create$_0('Invalid Char code: ' + code);\n }\n tmp = numberToChar(code);\n } else {\n tmp = a.b(index);\n }\n return tmp;\n }\n function isString(a) {\n return typeof a === 'string';\n }\n function charSequenceLength(a) {\n var tmp;\n if (isString(a)) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = a.length;\n } else {\n tmp = a.a();\n }\n return tmp;\n }\n function charSequenceSubSequence(a, startIndex, endIndex) {\n var tmp;\n if (isString(a)) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = a.substring(startIndex, endIndex);\n } else {\n tmp = a.c(startIndex, endIndex);\n }\n return tmp;\n }\n function arrayToString(array) {\n return joinToString(array, ', ', '[', ']', VOID, VOID, arrayToString$lambda);\n }\n function contentEqualsInternal(_this__u8e3s4, other) {\n // Inline function 'kotlin.js.asDynamic' call\n var a = _this__u8e3s4;\n // Inline function 'kotlin.js.asDynamic' call\n var b = other;\n if (a === b)\n return true;\n if (((a == null ? true : b == null) ? true : !isArrayish(b)) ? true : a.length != b.length)\n return false;\n var inductionVariable = 0;\n var last = a.length;\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (!equals_0(a[i], b[i])) {\n return false;\n }\n }\n while (inductionVariable < last);\n return true;\n }\n function contentHashCodeInternal(_this__u8e3s4) {\n // Inline function 'kotlin.js.asDynamic' call\n var a = _this__u8e3s4;\n if (a == null)\n return 0;\n var result = 1;\n var inductionVariable = 0;\n var last = a.length;\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n result = imul(result, 31) + hashCode(a[i]) | 0;\n }\n while (inductionVariable < last);\n return result;\n }\n function arrayToString$lambda(it) {\n return toString_1(it);\n }\n function compareTo_0(a, b) {\n var tmp;\n switch (typeof a) {\n case 'number':\n var tmp_0;\n if (typeof b === 'number') {\n tmp_0 = doubleCompareTo(a, b);\n } else {\n if (b instanceof Long) {\n tmp_0 = doubleCompareTo(a, b.r6());\n } else {\n tmp_0 = primitiveCompareTo(a, b);\n }\n }\n\n tmp = tmp_0;\n break;\n case 'string':\n case 'boolean':\n tmp = primitiveCompareTo(a, b);\n break;\n default:\n tmp = compareToDoNotIntrinsicify(a, b);\n break;\n }\n return tmp;\n }\n function doubleCompareTo(a, b) {\n var tmp;\n if (a < b) {\n tmp = -1;\n } else if (a > b) {\n tmp = 1;\n } else if (a === b) {\n var tmp_0;\n if (a !== 0) {\n tmp_0 = 0;\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n var ia = 1 / a;\n var tmp_1;\n // Inline function 'kotlin.js.asDynamic' call\n if (ia === 1 / b) {\n tmp_1 = 0;\n } else {\n if (ia < 0) {\n tmp_1 = -1;\n } else {\n tmp_1 = 1;\n }\n }\n tmp_0 = tmp_1;\n }\n tmp = tmp_0;\n } else if (a !== a) {\n tmp = b !== b ? 0 : 1;\n } else {\n tmp = -1;\n }\n return tmp;\n }\n function primitiveCompareTo(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n }\n function compareToDoNotIntrinsicify(a, b) {\n return a.d(b);\n }\n function identityHashCode(obj) {\n return getObjectHashCode(obj);\n }\n function getObjectHashCode(obj) {\n // Inline function 'kotlin.js.jsIn' call\n if (!('kotlinHashCodeValue$' in obj)) {\n var hash = calculateRandomHash();\n var descriptor = new Object();\n descriptor.value = hash;\n descriptor.enumerable = false;\n Object.defineProperty(obj, 'kotlinHashCodeValue$', descriptor);\n }\n // Inline function 'kotlin.js.unsafeCast' call\n return obj['kotlinHashCodeValue$'];\n }\n function calculateRandomHash() {\n // Inline function 'kotlin.js.jsBitwiseOr' call\n return Math.random() * 4.294967296E9 | 0;\n }\n function toString_1(o) {\n var tmp;\n if (o == null) {\n tmp = 'null';\n } else if (isArrayish(o)) {\n tmp = '[...]';\n } else if (!(typeof o.toString === 'function')) {\n tmp = anyToString(o);\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n tmp = o.toString();\n }\n return tmp;\n }\n function equals_0(obj1, obj2) {\n if (obj1 == null) {\n return obj2 == null;\n }\n if (obj2 == null) {\n return false;\n }\n if (typeof obj1 === 'object' ? typeof obj1.equals === 'function' : false) {\n return obj1.equals(obj2);\n }\n if (obj1 !== obj1) {\n return obj2 !== obj2;\n }\n if (typeof obj1 === 'number' ? typeof obj2 === 'number' : false) {\n var tmp;\n if (obj1 === obj2) {\n var tmp_0;\n if (obj1 !== 0) {\n tmp_0 = true;\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_1 = 1 / obj1;\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = tmp_1 === 1 / obj2;\n }\n tmp = tmp_0;\n } else {\n tmp = false;\n }\n return tmp;\n }\n return obj1 === obj2;\n }\n function hashCode(obj) {\n if (obj == null)\n return 0;\n var typeOf = typeof obj;\n var tmp;\n switch (typeOf) {\n case 'object':\n tmp = 'function' === typeof obj.hashCode ? obj.hashCode() : getObjectHashCode(obj);\n break;\n case 'function':\n tmp = getObjectHashCode(obj);\n break;\n case 'number':\n tmp = getNumberHashCode(obj);\n break;\n case 'boolean':\n // Inline function 'kotlin.js.unsafeCast' call\n\n tmp = getBooleanHashCode(obj);\n break;\n case 'string':\n tmp = getStringHashCode(String(obj));\n break;\n case 'bigint':\n tmp = getBigIntHashCode(obj);\n break;\n case 'symbol':\n tmp = getSymbolHashCode(obj);\n break;\n default:\n tmp = function () {\n throw new Error('Unexpected typeof `' + typeOf + '`');\n }();\n break;\n }\n return tmp;\n }\n function anyToString(o) {\n return Object.prototype.toString.call(o);\n }\n function getBooleanHashCode(value) {\n return value ? 1231 : 1237;\n }\n function getStringHashCode(str) {\n var hash = 0;\n var length = str.length;\n var inductionVariable = 0;\n var last = length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n var code = str.charCodeAt(i);\n hash = imul(hash, 31) + code | 0;\n }\n while (!(i === last));\n return hash;\n }\n function getBigIntHashCode(value) {\n var shiftNumber = BigInt(32);\n var MASK = BigInt(4.294967295E9);\n var bigNumber = value < 0 ? -value : value;\n var hashCode = 0;\n var signum = value < 0 ? -1 : 1;\n while (bigNumber != 0) {\n // Inline function 'kotlin.js.unsafeCast' call\n var chunk = Number(bigNumber & MASK);\n hashCode = imul(31, hashCode) + chunk | 0;\n bigNumber = bigNumber >> shiftNumber;\n }\n return imul(hashCode, signum);\n }\n function getSymbolHashCode(value) {\n var hashCodeMap = symbolIsSharable(value) ? getSymbolMap() : getSymbolWeakMap();\n var cachedHashCode = hashCodeMap.get(value);\n if (cachedHashCode !== VOID)\n return cachedHashCode;\n var hash = calculateRandomHash();\n hashCodeMap.set(value, hash);\n return hash;\n }\n function symbolIsSharable(symbol) {\n return Symbol.keyFor(symbol) != VOID;\n }\n function getSymbolMap() {\n if (symbolMap === VOID) {\n symbolMap = new Map();\n }\n return symbolMap;\n }\n function getSymbolWeakMap() {\n if (symbolWeakMap === VOID) {\n symbolWeakMap = new WeakMap();\n }\n return symbolWeakMap;\n }\n var symbolMap;\n var symbolWeakMap;\n function boxIntrinsic(x) {\n var message = 'Should be lowered';\n throw IllegalStateException_init_$Create$_0(toString_1(message));\n }\n function unboxIntrinsic(x) {\n var message = 'Should be lowered';\n throw IllegalStateException_init_$Create$_0(toString_1(message));\n }\n function captureStack(instance, constructorFunction) {\n if (Error.captureStackTrace != null) {\n Error.captureStackTrace(instance, constructorFunction);\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n instance.stack = (new Error()).stack;\n }\n }\n function protoOf(constructor) {\n return constructor.prototype;\n }\n function defineProp(obj, name, getter, setter) {\n return Object.defineProperty(obj, name, {configurable: true, get: getter, set: setter});\n }\n function objectCreate(proto) {\n return Object.create(proto);\n }\n function extendThrowable(this_, message, cause) {\n Error.call(this_);\n setPropertiesToThrowableInstance(this_, message, cause);\n }\n function setPropertiesToThrowableInstance(this_, message, cause) {\n var errorInfo = calculateErrorInfo(Object.getPrototypeOf(this_));\n if ((errorInfo & 1) === 0) {\n var tmp;\n if (message == null) {\n var tmp_0;\n if (!(message === null)) {\n var tmp1_elvis_lhs = cause == null ? null : cause.toString();\n tmp_0 = tmp1_elvis_lhs == null ? VOID : tmp1_elvis_lhs;\n } else {\n tmp_0 = VOID;\n }\n tmp = tmp_0;\n } else {\n tmp = message;\n }\n this_.message = tmp;\n }\n if ((errorInfo & 2) === 0) {\n this_.cause = cause;\n }\n this_.name = Object.getPrototypeOf(this_).constructor.name;\n }\n function ensureNotNull(v) {\n var tmp;\n if (v == null) {\n THROW_NPE();\n } else {\n tmp = v;\n }\n return tmp;\n }\n function THROW_NPE() {\n throw NullPointerException_init_$Create$();\n }\n function noWhenBranchMatchedException() {\n throw NoWhenBranchMatchedException_init_$Create$();\n }\n function THROW_CCE() {\n throw ClassCastException_init_$Create$();\n }\n function throwUninitializedPropertyAccessException(name) {\n throw UninitializedPropertyAccessException_init_$Create$_0('lateinit property ' + name + ' has not been initialized');\n }\n function THROW_ISE() {\n throw IllegalStateException_init_$Create$();\n }\n function THROW_IAE(msg) {\n throw IllegalArgumentException_init_$Create$_0(msg);\n }\n function lazy(mode, initializer) {\n return new UnsafeLazyImpl(initializer);\n }\n function lazy_0(initializer) {\n return new UnsafeLazyImpl(initializer);\n }\n function fillFrom(src, dst) {\n var srcLen = src.length;\n var dstLen = dst.length;\n var index = 0;\n // Inline function 'kotlin.js.unsafeCast' call\n var arr = dst;\n while (index < srcLen ? index < dstLen : false) {\n var tmp = index;\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n arr[tmp] = src[tmp0];\n }\n return dst;\n }\n function arrayCopyResize(source, newSize, defaultValue) {\n // Inline function 'kotlin.js.unsafeCast' call\n var result = source.slice(0, newSize);\n // Inline function 'kotlin.copyArrayType' call\n if (source.$type$ !== undefined) {\n result.$type$ = source.$type$;\n }\n var index = source.length;\n if (newSize > index) {\n // Inline function 'kotlin.js.asDynamic' call\n result.length = newSize;\n while (index < newSize) {\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n result[tmp0] = defaultValue;\n }\n }\n return result;\n }\n function arrayPlusCollection(array, collection) {\n // Inline function 'kotlin.js.unsafeCast' call\n var result = array.slice();\n // Inline function 'kotlin.js.asDynamic' call\n result.length = result.length + collection.n() | 0;\n // Inline function 'kotlin.copyArrayType' call\n if (array.$type$ !== undefined) {\n result.$type$ = array.$type$;\n }\n var index = array.length;\n var tmp0_iterator = collection.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n result[tmp1] = element;\n }\n return result;\n }\n function Companion_4() {\n Companion_instance_4 = this;\n this.qb_1 = new Long(0, -2147483648);\n this.rb_1 = new Long(-1, 2147483647);\n this.sb_1 = 8;\n this.tb_1 = 64;\n }\n var Companion_instance_4;\n function Companion_getInstance_4() {\n if (Companion_instance_4 == null)\n new Companion_4();\n return Companion_instance_4;\n }\n function Long(low, high) {\n Companion_getInstance_4();\n Number_0.call(this);\n this.l_1 = low;\n this.m_1 = high;\n }\n protoOf(Long).ba = function (other) {\n return compare(this, other);\n };\n protoOf(Long).d = function (other) {\n return this.ba(other instanceof Long ? other : THROW_CCE());\n };\n protoOf(Long).s6 = function (other) {\n return add(this, other);\n };\n protoOf(Long).ub = function (other) {\n return subtract_0(this, other);\n };\n protoOf(Long).aa = function (other) {\n return multiply(this, other);\n };\n protoOf(Long).z9 = function (other) {\n return divide(this, other);\n };\n protoOf(Long).vb = function (other) {\n return modulo(this, other);\n };\n protoOf(Long).wb = function () {\n return this.xb().s6(new Long(1, 0));\n };\n protoOf(Long).yb = function (bitCount) {\n return shiftLeft(this, bitCount);\n };\n protoOf(Long).zb = function (bitCount) {\n return shiftRight(this, bitCount);\n };\n protoOf(Long).ac = function (bitCount) {\n return shiftRightUnsigned(this, bitCount);\n };\n protoOf(Long).bc = function (other) {\n return new Long(this.l_1 & other.l_1, this.m_1 & other.m_1);\n };\n protoOf(Long).cc = function (other) {\n return new Long(this.l_1 | other.l_1, this.m_1 | other.m_1);\n };\n protoOf(Long).dc = function (other) {\n return new Long(this.l_1 ^ other.l_1, this.m_1 ^ other.m_1);\n };\n protoOf(Long).xb = function () {\n return new Long(~this.l_1, ~this.m_1);\n };\n protoOf(Long).ec = function () {\n return toByte(this.l_1);\n };\n protoOf(Long).fc = function () {\n return toShort(this.l_1);\n };\n protoOf(Long).wa = function () {\n return this.l_1;\n };\n protoOf(Long).r6 = function () {\n return toNumber(this);\n };\n protoOf(Long).valueOf = function () {\n return this.r6();\n };\n protoOf(Long).equals = function (other) {\n var tmp;\n if (other instanceof Long) {\n tmp = equalsLong(this, other);\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(Long).hashCode = function () {\n return hashCode_0(this);\n };\n protoOf(Long).toString = function () {\n return toStringImpl(this, 10);\n };\n function get_ZERO() {\n _init_properties_longjs_kt__tqrzid();\n return ZERO;\n }\n var ZERO;\n function get_ONE() {\n _init_properties_longjs_kt__tqrzid();\n return ONE;\n }\n var ONE;\n function get_NEG_ONE() {\n _init_properties_longjs_kt__tqrzid();\n return NEG_ONE;\n }\n var NEG_ONE;\n function get_MAX_VALUE() {\n _init_properties_longjs_kt__tqrzid();\n return MAX_VALUE;\n }\n var MAX_VALUE;\n function get_MIN_VALUE() {\n _init_properties_longjs_kt__tqrzid();\n return MIN_VALUE;\n }\n var MIN_VALUE;\n function get_TWO_PWR_24_() {\n _init_properties_longjs_kt__tqrzid();\n return TWO_PWR_24_;\n }\n var TWO_PWR_24_;\n function compare(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n if (equalsLong(_this__u8e3s4, other)) {\n return 0;\n }\n var thisNeg = isNegative(_this__u8e3s4);\n var otherNeg = isNegative(other);\n return (thisNeg ? !otherNeg : false) ? -1 : (!thisNeg ? otherNeg : false) ? 1 : isNegative(subtract_0(_this__u8e3s4, other)) ? -1 : 1;\n }\n function add(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n var a48 = _this__u8e3s4.m_1 >>> 16 | 0;\n var a32 = _this__u8e3s4.m_1 & 65535;\n var a16 = _this__u8e3s4.l_1 >>> 16 | 0;\n var a00 = _this__u8e3s4.l_1 & 65535;\n var b48 = other.m_1 >>> 16 | 0;\n var b32 = other.m_1 & 65535;\n var b16 = other.l_1 >>> 16 | 0;\n var b00 = other.l_1 & 65535;\n var c48 = 0;\n var c32 = 0;\n var c16 = 0;\n var c00 = 0;\n c00 = c00 + (a00 + b00 | 0) | 0;\n c16 = c16 + (c00 >>> 16 | 0) | 0;\n c00 = c00 & 65535;\n c16 = c16 + (a16 + b16 | 0) | 0;\n c32 = c32 + (c16 >>> 16 | 0) | 0;\n c16 = c16 & 65535;\n c32 = c32 + (a32 + b32 | 0) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c48 = c48 + (a48 + b48 | 0) | 0;\n c48 = c48 & 65535;\n return new Long(c16 << 16 | c00, c48 << 16 | c32);\n }\n function subtract_0(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return add(_this__u8e3s4, other.wb());\n }\n function multiply(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n if (isZero(_this__u8e3s4)) {\n return get_ZERO();\n } else if (isZero(other)) {\n return get_ZERO();\n }\n if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n return isOdd(other) ? get_MIN_VALUE() : get_ZERO();\n } else if (equalsLong(other, get_MIN_VALUE())) {\n return isOdd(_this__u8e3s4) ? get_MIN_VALUE() : get_ZERO();\n }\n if (isNegative(_this__u8e3s4)) {\n var tmp;\n if (isNegative(other)) {\n tmp = multiply(negate(_this__u8e3s4), negate(other));\n } else {\n tmp = negate(multiply(negate(_this__u8e3s4), other));\n }\n return tmp;\n } else if (isNegative(other)) {\n return negate(multiply(_this__u8e3s4, negate(other)));\n }\n if (lessThan(_this__u8e3s4, get_TWO_PWR_24_()) ? lessThan(other, get_TWO_PWR_24_()) : false) {\n return fromNumber(toNumber(_this__u8e3s4) * toNumber(other));\n }\n var a48 = _this__u8e3s4.m_1 >>> 16 | 0;\n var a32 = _this__u8e3s4.m_1 & 65535;\n var a16 = _this__u8e3s4.l_1 >>> 16 | 0;\n var a00 = _this__u8e3s4.l_1 & 65535;\n var b48 = other.m_1 >>> 16 | 0;\n var b32 = other.m_1 & 65535;\n var b16 = other.l_1 >>> 16 | 0;\n var b00 = other.l_1 & 65535;\n var c48 = 0;\n var c32 = 0;\n var c16 = 0;\n var c00 = 0;\n c00 = c00 + imul(a00, b00) | 0;\n c16 = c16 + (c00 >>> 16 | 0) | 0;\n c00 = c00 & 65535;\n c16 = c16 + imul(a16, b00) | 0;\n c32 = c32 + (c16 >>> 16 | 0) | 0;\n c16 = c16 & 65535;\n c16 = c16 + imul(a00, b16) | 0;\n c32 = c32 + (c16 >>> 16 | 0) | 0;\n c16 = c16 & 65535;\n c32 = c32 + imul(a32, b00) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c32 = c32 + imul(a16, b16) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c32 = c32 + imul(a00, b32) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c48 = c48 + (((imul(a48, b00) + imul(a32, b16) | 0) + imul(a16, b32) | 0) + imul(a00, b48) | 0) | 0;\n c48 = c48 & 65535;\n return new Long(c16 << 16 | c00, c48 << 16 | c32);\n }\n function divide(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n if (isZero(other)) {\n throw Exception_init_$Create$_0('division by zero');\n } else if (isZero(_this__u8e3s4)) {\n return get_ZERO();\n }\n if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n if (equalsLong(other, get_ONE()) ? true : equalsLong(other, get_NEG_ONE())) {\n return get_MIN_VALUE();\n } else if (equalsLong(other, get_MIN_VALUE())) {\n return get_ONE();\n } else {\n var halfThis = shiftRight(_this__u8e3s4, 1);\n var approx = shiftLeft(halfThis.z9(other), 1);\n if (equalsLong(approx, get_ZERO())) {\n return isNegative(other) ? get_ONE() : get_NEG_ONE();\n } else {\n var rem = subtract_0(_this__u8e3s4, multiply(other, approx));\n return add(approx, rem.z9(other));\n }\n }\n } else if (equalsLong(other, get_MIN_VALUE())) {\n return get_ZERO();\n }\n if (isNegative(_this__u8e3s4)) {\n var tmp;\n if (isNegative(other)) {\n tmp = negate(_this__u8e3s4).z9(negate(other));\n } else {\n tmp = negate(negate(_this__u8e3s4).z9(other));\n }\n return tmp;\n } else if (isNegative(other)) {\n return negate(_this__u8e3s4.z9(negate(other)));\n }\n var res = get_ZERO();\n var rem_0 = _this__u8e3s4;\n while (greaterThanOrEqual(rem_0, other)) {\n var approxDouble = toNumber(rem_0) / toNumber(other);\n var approx2 = Math.max(1.0, Math.floor(approxDouble));\n var log2 = Math.ceil(Math.log(approx2) / Math.LN2);\n var delta = log2 <= 48.0 ? 1.0 : Math.pow(2.0, log2 - 48);\n var approxRes = fromNumber(approx2);\n var approxRem = multiply(approxRes, other);\n while (isNegative(approxRem) ? true : greaterThan(approxRem, rem_0)) {\n approx2 = approx2 - delta;\n approxRes = fromNumber(approx2);\n approxRem = multiply(approxRes, other);\n }\n if (isZero(approxRes)) {\n approxRes = get_ONE();\n }\n res = add(res, approxRes);\n rem_0 = subtract_0(rem_0, approxRem);\n }\n return res;\n }\n function modulo(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return subtract_0(_this__u8e3s4, multiply(_this__u8e3s4.z9(other), other));\n }\n function shiftLeft(_this__u8e3s4, numBits) {\n _init_properties_longjs_kt__tqrzid();\n var numBits_0 = numBits & 63;\n if (numBits_0 === 0) {\n return _this__u8e3s4;\n } else {\n if (numBits_0 < 32) {\n return new Long(_this__u8e3s4.l_1 << numBits_0, _this__u8e3s4.m_1 << numBits_0 | (_this__u8e3s4.l_1 >>> (32 - numBits_0 | 0) | 0));\n } else {\n return new Long(0, _this__u8e3s4.l_1 << (numBits_0 - 32 | 0));\n }\n }\n }\n function shiftRight(_this__u8e3s4, numBits) {\n _init_properties_longjs_kt__tqrzid();\n var numBits_0 = numBits & 63;\n if (numBits_0 === 0) {\n return _this__u8e3s4;\n } else {\n if (numBits_0 < 32) {\n return new Long(_this__u8e3s4.l_1 >>> numBits_0 | 0 | _this__u8e3s4.m_1 << (32 - numBits_0 | 0), _this__u8e3s4.m_1 >> numBits_0);\n } else {\n return new Long(_this__u8e3s4.m_1 >> (numBits_0 - 32 | 0), _this__u8e3s4.m_1 >= 0 ? 0 : -1);\n }\n }\n }\n function shiftRightUnsigned(_this__u8e3s4, numBits) {\n _init_properties_longjs_kt__tqrzid();\n var numBits_0 = numBits & 63;\n if (numBits_0 === 0) {\n return _this__u8e3s4;\n } else {\n if (numBits_0 < 32) {\n return new Long(_this__u8e3s4.l_1 >>> numBits_0 | 0 | _this__u8e3s4.m_1 << (32 - numBits_0 | 0), _this__u8e3s4.m_1 >>> numBits_0 | 0);\n } else {\n var tmp;\n if (numBits_0 === 32) {\n tmp = new Long(_this__u8e3s4.m_1, 0);\n } else {\n tmp = new Long(_this__u8e3s4.m_1 >>> (numBits_0 - 32 | 0) | 0, 0);\n }\n return tmp;\n }\n }\n }\n function toNumber(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.m_1 * 4.294967296E9 + getLowBitsUnsigned(_this__u8e3s4);\n }\n function equalsLong(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.m_1 === other.m_1 ? _this__u8e3s4.l_1 === other.l_1 : false;\n }\n function hashCode_0(l) {\n _init_properties_longjs_kt__tqrzid();\n return l.l_1 ^ l.m_1;\n }\n function toStringImpl(_this__u8e3s4, radix) {\n _init_properties_longjs_kt__tqrzid();\n if (radix < 2 ? true : 36 < radix) {\n throw Exception_init_$Create$_0('radix out of range: ' + radix);\n }\n if (isZero(_this__u8e3s4)) {\n return '0';\n }\n if (isNegative(_this__u8e3s4)) {\n if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n var radixLong = fromInt(radix);\n var div = _this__u8e3s4.z9(radixLong);\n var rem = subtract_0(multiply(div, radixLong), _this__u8e3s4).wa();\n var tmp = toStringImpl(div, radix);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return tmp + rem.toString(radix);\n } else {\n return '-' + toStringImpl(negate(_this__u8e3s4), radix);\n }\n }\n var digitsPerTime = radix === 2 ? 31 : radix <= 10 ? 9 : radix <= 21 ? 7 : radix <= 35 ? 6 : 5;\n var radixToPower = fromNumber(Math.pow(radix, digitsPerTime));\n var rem_0 = _this__u8e3s4;\n var result = '';\n while (true) {\n var remDiv = rem_0.z9(radixToPower);\n var intval = subtract_0(rem_0, multiply(remDiv, radixToPower)).wa();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var digits = intval.toString(radix);\n rem_0 = remDiv;\n if (isZero(rem_0)) {\n return digits + result;\n } else {\n while (digits.length < digitsPerTime) {\n digits = '0' + digits;\n }\n result = digits + result;\n }\n }\n }\n function fromInt(value) {\n _init_properties_longjs_kt__tqrzid();\n return new Long(value, value < 0 ? -1 : 0);\n }\n function isNegative(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.m_1 < 0;\n }\n function isZero(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.m_1 === 0 ? _this__u8e3s4.l_1 === 0 : false;\n }\n function isOdd(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return (_this__u8e3s4.l_1 & 1) === 1;\n }\n function negate(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.wb();\n }\n function lessThan(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return compare(_this__u8e3s4, other) < 0;\n }\n function fromNumber(value) {\n _init_properties_longjs_kt__tqrzid();\n if (isNaN_0(value)) {\n return get_ZERO();\n } else if (value <= -9.223372036854776E18) {\n return get_MIN_VALUE();\n } else if (value + 1 >= 9.223372036854776E18) {\n return get_MAX_VALUE();\n } else if (value < 0.0) {\n return negate(fromNumber(-value));\n } else {\n var twoPwr32 = 4.294967296E9;\n // Inline function 'kotlin.js.jsBitwiseOr' call\n var tmp = value % twoPwr32 | 0;\n // Inline function 'kotlin.js.jsBitwiseOr' call\n var tmp$ret$1 = value / twoPwr32 | 0;\n return new Long(tmp, tmp$ret$1);\n }\n }\n function greaterThan(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return compare(_this__u8e3s4, other) > 0;\n }\n function greaterThanOrEqual(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return compare(_this__u8e3s4, other) >= 0;\n }\n function getLowBitsUnsigned(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.l_1 >= 0 ? _this__u8e3s4.l_1 : 4.294967296E9 + _this__u8e3s4.l_1;\n }\n var properties_initialized_longjs_kt_5aju7t;\n function _init_properties_longjs_kt__tqrzid() {\n if (!properties_initialized_longjs_kt_5aju7t) {\n properties_initialized_longjs_kt_5aju7t = true;\n ZERO = fromInt(0);\n ONE = fromInt(1);\n NEG_ONE = fromInt(-1);\n MAX_VALUE = new Long(-1, 2147483647);\n MIN_VALUE = new Long(0, -2147483648);\n TWO_PWR_24_ = fromInt(16777216);\n }\n }\n function classMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n return createMetadata('class', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, null);\n }\n function createMetadata(kind, name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, iid) {\n var undef = VOID;\n return {kind: kind, simpleName: name, associatedObjectKey: associatedObjectKey, associatedObjects: associatedObjects, suspendArity: suspendArity, $kClass$: undef, defaultConstructor: defaultConstructor, iid: iid};\n }\n function setMetadataFor(ctor, name, metadataConstructor, parent, interfaces, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n if (!(parent == null)) {\n ctor.prototype = Object.create(parent.prototype);\n ctor.prototype.constructor = ctor;\n }\n var metadata = metadataConstructor(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity == null ? [] : suspendArity);\n ctor.$metadata$ = metadata;\n if (!(interfaces == null)) {\n var receiver = !(metadata.iid == null) ? ctor : ctor.prototype;\n receiver.$imask$ = implement(interfaces);\n }\n }\n function interfaceMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n return createMetadata('interface', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, generateInterfaceId());\n }\n function generateInterfaceId() {\n if (iid === VOID) {\n iid = 0;\n }\n // Inline function 'kotlin.js.unsafeCast' call\n iid = iid + 1 | 0;\n // Inline function 'kotlin.js.unsafeCast' call\n return iid;\n }\n var iid;\n function objectMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n return createMetadata('object', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, null);\n }\n function toByte(a) {\n // Inline function 'kotlin.js.unsafeCast' call\n return a << 24 >> 24;\n }\n function numberToInt(a) {\n var tmp;\n if (a instanceof Long) {\n tmp = a.wa();\n } else {\n tmp = doubleToInt(a);\n }\n return tmp;\n }\n function doubleToInt(a) {\n var tmp;\n if (a > 2.147483647E9) {\n tmp = 2147483647;\n } else if (a < -2.147483648E9) {\n tmp = -2147483648;\n } else {\n // Inline function 'kotlin.js.jsBitwiseOr' call\n tmp = a | 0;\n }\n return tmp;\n }\n function toShort(a) {\n // Inline function 'kotlin.js.unsafeCast' call\n return a << 16 >> 16;\n }\n function numberToLong(a) {\n var tmp;\n if (a instanceof Long) {\n tmp = a;\n } else {\n tmp = fromNumber(a);\n }\n return tmp;\n }\n function numberToChar(a) {\n // Inline function 'kotlin.toUShort' call\n var this_0 = numberToInt(a);\n var tmp$ret$0 = _UShort___init__impl__jigrne(toShort(this_0));\n return _Char___init__impl__6a9atx_0(tmp$ret$0);\n }\n function toLong_0(a) {\n return fromInt(a);\n }\n function numberRangeToNumber(start, endInclusive) {\n return new IntRange(start, endInclusive);\n }\n function get_propertyRefClassMetadataCache() {\n _init_properties_reflectRuntime_kt__5r4uu3();\n return propertyRefClassMetadataCache;\n }\n var propertyRefClassMetadataCache;\n function metadataObject() {\n _init_properties_reflectRuntime_kt__5r4uu3();\n return classMeta(VOID, VOID, VOID, VOID, VOID);\n }\n function getPropertyCallableRef(name, paramCount, superType, getter, setter) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n getter.get = getter;\n getter.set = setter;\n getter.callableName = name;\n // Inline function 'kotlin.js.unsafeCast' call\n return getPropertyRefClass(getter, getKPropMetadata(paramCount, setter), getInterfaceMaskFor(getter, superType));\n }\n function getPropertyRefClass(obj, metadata, imask) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n obj.$metadata$ = metadata;\n obj.constructor = obj;\n obj.$imask$ = imask;\n return obj;\n }\n function getKPropMetadata(paramCount, setter) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n return get_propertyRefClassMetadataCache()[paramCount][setter == null ? 0 : 1];\n }\n function getInterfaceMaskFor(obj, superType) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n var tmp0_elvis_lhs = obj.$imask$;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [superType];\n tmp = implement(tmp$ret$2);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function getLocalDelegateReference(name, superType, mutable, lambda) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n return getPropertyCallableRef(name, 0, superType, lambda, mutable ? lambda : null);\n }\n var properties_initialized_reflectRuntime_kt_inkhwd;\n function _init_properties_reflectRuntime_kt__5r4uu3() {\n if (!properties_initialized_reflectRuntime_kt_inkhwd) {\n properties_initialized_reflectRuntime_kt_inkhwd = true;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [metadataObject(), metadataObject()];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = [metadataObject(), metadataObject()];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n propertyRefClassMetadataCache = [tmp, tmp_0, [metadataObject(), metadataObject()]];\n }\n }\n function isArrayish(o) {\n return isJsArray(o) ? true : isView(o);\n }\n function isJsArray(obj) {\n // Inline function 'kotlin.js.unsafeCast' call\n return Array.isArray(obj);\n }\n function isInterface(obj, iface) {\n return isInterfaceImpl(obj, iface.$metadata$.iid);\n }\n function isInterfaceImpl(obj, iface) {\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp0_elvis_lhs = obj.$imask$;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var mask = tmp;\n return isBitSet(mask, iface);\n }\n function isArray(obj) {\n var tmp;\n if (isJsArray(obj)) {\n // Inline function 'kotlin.js.asDynamic' call\n tmp = !obj.$type$;\n } else {\n tmp = false;\n }\n return tmp;\n }\n function isSuspendFunction(obj, arity) {\n var objTypeOf = typeof obj;\n if (objTypeOf === 'function') {\n // Inline function 'kotlin.js.unsafeCast' call\n return obj.$arity === arity;\n }\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp1_safe_receiver = obj == null ? null : obj.constructor;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.$metadata$;\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.suspendArity;\n var tmp;\n if (tmp3_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp3_elvis_lhs;\n }\n var suspendArity = tmp;\n var result = false;\n var inductionVariable = 0;\n var last = suspendArity.length;\n $l$loop: while (inductionVariable < last) {\n var item = suspendArity[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n if (arity === item) {\n result = true;\n break $l$loop;\n }\n }\n return result;\n }\n function isNumber(a) {\n var tmp;\n if (typeof a === 'number') {\n tmp = true;\n } else {\n tmp = a instanceof Long;\n }\n return tmp;\n }\n function isComparable(value) {\n var type = typeof value;\n return ((type === 'string' ? true : type === 'boolean') ? true : isNumber(value)) ? true : isInterface(value, Comparable);\n }\n function isCharSequence(value) {\n return typeof value === 'string' ? true : isInterface(value, CharSequence);\n }\n function isBooleanArray(a) {\n return isJsArray(a) ? a.$type$ === 'BooleanArray' : false;\n }\n function isByteArray(a) {\n // Inline function 'kotlin.js.jsInstanceOf' call\n return a instanceof Int8Array;\n }\n function isShortArray(a) {\n // Inline function 'kotlin.js.jsInstanceOf' call\n return a instanceof Int16Array;\n }\n function isCharArray(a) {\n var tmp;\n // Inline function 'kotlin.js.jsInstanceOf' call\n if (a instanceof Uint16Array) {\n tmp = a.$type$ === 'CharArray';\n } else {\n tmp = false;\n }\n return tmp;\n }\n function isIntArray(a) {\n // Inline function 'kotlin.js.jsInstanceOf' call\n return a instanceof Int32Array;\n }\n function isFloatArray(a) {\n // Inline function 'kotlin.js.jsInstanceOf' call\n return a instanceof Float32Array;\n }\n function isLongArray(a) {\n return isJsArray(a) ? a.$type$ === 'LongArray' : false;\n }\n function isDoubleArray(a) {\n // Inline function 'kotlin.js.jsInstanceOf' call\n return a instanceof Float64Array;\n }\n function jsIsType(obj, jsClass) {\n if (jsClass === Object) {\n return obj != null;\n }\n var objType = typeof obj;\n var jsClassType = typeof jsClass;\n if ((obj == null ? true : jsClass == null) ? true : !(objType === 'object') ? !(objType === 'function') : false) {\n return false;\n }\n var constructor = jsClassType === 'object' ? jsGetPrototypeOf(jsClass) : jsClass;\n var klassMetadata = constructor.$metadata$;\n if ((klassMetadata == null ? null : klassMetadata.kind) === 'interface') {\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp1_elvis_lhs = klassMetadata.iid;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var iid = tmp;\n return isInterfaceImpl(obj, iid);\n }\n // Inline function 'kotlin.js.jsInstanceOf' call\n return obj instanceof constructor;\n }\n function jsGetPrototypeOf(jsClass) {\n return Object.getPrototypeOf(jsClass);\n }\n function calculateErrorInfo(proto) {\n var tmp0_safe_receiver = proto.constructor;\n var metadata = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.$metadata$;\n var tmp2_safe_receiver = metadata == null ? null : metadata.errorInfo;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp2_safe_receiver;\n }\n var result = 0;\n if (hasProp(proto, 'message'))\n result = result | 1;\n if (hasProp(proto, 'cause'))\n result = result | 2;\n if (!(result === 3)) {\n var parentProto = getPrototypeOf(proto);\n if (parentProto != Error.prototype) {\n result = result | calculateErrorInfo(parentProto);\n }\n }\n if (!(metadata == null)) {\n metadata.errorInfo = result;\n }\n return result;\n }\n function hasProp(proto, propName) {\n return proto.hasOwnProperty(propName);\n }\n function getPrototypeOf(obj) {\n return Object.getPrototypeOf(obj);\n }\n function get_VOID() {\n _init_properties_void_kt__3zg9as();\n return VOID;\n }\n var VOID;\n var properties_initialized_void_kt_e4ret2;\n function _init_properties_void_kt__3zg9as() {\n if (!properties_initialized_void_kt_e4ret2) {\n properties_initialized_void_kt_e4ret2 = true;\n VOID = void 0;\n }\n }\n function fill(_this__u8e3s4, element, fromIndex, toIndex) {\n fromIndex = fromIndex === VOID ? 0 : fromIndex;\n toIndex = toIndex === VOID ? _this__u8e3s4.length : toIndex;\n Companion_instance_5.v1(fromIndex, toIndex, _this__u8e3s4.length);\n // Inline function 'kotlin.js.nativeFill' call\n // Inline function 'kotlin.js.asDynamic' call\n _this__u8e3s4.fill(element, fromIndex, toIndex);\n }\n function asList(_this__u8e3s4) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return new ArrayList(_this__u8e3s4);\n }\n function copyOf(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n // Inline function 'withType' call\n var type = 'CharArray';\n var array = fillFrom(_this__u8e3s4, charArray(newSize));\n array.$type$ = type;\n return array;\n }\n function copyOf_0(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n return fillFrom(_this__u8e3s4, new Float64Array(newSize));\n }\n function copyOf_1(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n return fillFrom(_this__u8e3s4, new Float32Array(newSize));\n }\n function copyOf_2(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n // Inline function 'withType' call\n var type = 'LongArray';\n var array = arrayCopyResize(_this__u8e3s4, newSize, new Long(0, 0));\n array.$type$ = type;\n return array;\n }\n function copyOf_3(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n return fillFrom(_this__u8e3s4, new Int32Array(newSize));\n }\n function copyOf_4(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n return fillFrom(_this__u8e3s4, new Int16Array(newSize));\n }\n function copyOf_5(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n return fillFrom(_this__u8e3s4, new Int8Array(newSize));\n }\n function copyOf_6(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n // Inline function 'withType' call\n var type = 'BooleanArray';\n var array = arrayCopyResize(_this__u8e3s4, newSize, false);\n array.$type$ = type;\n return array;\n }\n function contentEquals_4(_this__u8e3s4, other) {\n return contentEqualsInternal(_this__u8e3s4, other);\n }\n function contentHashCode(_this__u8e3s4) {\n return contentHashCodeInternal(_this__u8e3s4);\n }\n function contentDeepEquals(_this__u8e3s4, other) {\n return contentDeepEqualsImpl(_this__u8e3s4, other);\n }\n function plus_5(_this__u8e3s4, elements) {\n return arrayPlusCollection(_this__u8e3s4, elements);\n }\n function sort_0(_this__u8e3s4) {\n if (_this__u8e3s4.length > 1) {\n sortArray(_this__u8e3s4);\n }\n }\n function sortWith_0(_this__u8e3s4, comparator) {\n if (_this__u8e3s4.length > 1) {\n sortArrayWith(_this__u8e3s4, comparator);\n }\n }\n function contentEquals_5(_this__u8e3s4, other) {\n return contentEqualsInternal(_this__u8e3s4, other);\n }\n function contentEquals_6(_this__u8e3s4, other) {\n return contentEqualsInternal(_this__u8e3s4, other);\n }\n function contentEquals_7(_this__u8e3s4, other) {\n return contentEqualsInternal(_this__u8e3s4, other);\n }\n function contentEquals_8(_this__u8e3s4, other) {\n return contentEqualsInternal(_this__u8e3s4, other);\n }\n function contentEquals_9(_this__u8e3s4, other) {\n return contentEqualsInternal(_this__u8e3s4, other);\n }\n function contentEquals_10(_this__u8e3s4, other) {\n return contentEqualsInternal(_this__u8e3s4, other);\n }\n function contentEquals_11(_this__u8e3s4, other) {\n return contentEqualsInternal(_this__u8e3s4, other);\n }\n function contentEquals_12(_this__u8e3s4, other) {\n return contentEqualsInternal(_this__u8e3s4, other);\n }\n function contentToString(_this__u8e3s4) {\n var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : joinToString(_this__u8e3s4, ', ', '[', ']');\n return tmp1_elvis_lhs == null ? 'null' : tmp1_elvis_lhs;\n }\n function copyOf_7(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n return arrayCopyResize(_this__u8e3s4, newSize, null);\n }\n function decodeVarLenBase64(base64, fromBase64, resultLength) {\n var result = new Int32Array(resultLength);\n var index = 0;\n var int = 0;\n var shift = 0;\n var inductionVariable = 0;\n var last = base64.length;\n while (inductionVariable < last) {\n var char = charSequenceGet(base64, inductionVariable);\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.code' call\n var sixBit = fromBase64[Char__toInt_impl_vasixd(char)];\n int = int | (sixBit & 31) << shift;\n if (sixBit < 32) {\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n result[tmp1] = int;\n int = 0;\n shift = 0;\n } else {\n shift = shift + 5 | 0;\n }\n }\n return result;\n }\n function digitToIntImpl(_this__u8e3s4) {\n // Inline function 'kotlin.code' call\n var ch = Char__toInt_impl_vasixd(_this__u8e3s4);\n var index = binarySearchRange(Digit_getInstance().gc_1, ch);\n var diff = ch - Digit_getInstance().gc_1[index] | 0;\n return diff < 10 ? diff : -1;\n }\n function binarySearchRange(array, needle) {\n var bottom = 0;\n var top = array.length - 1 | 0;\n var middle = -1;\n var value = 0;\n while (bottom <= top) {\n middle = (bottom + top | 0) / 2 | 0;\n value = array[middle];\n if (needle > value)\n bottom = middle + 1 | 0;\n else if (needle === value)\n return middle;\n else\n top = middle - 1 | 0;\n }\n return middle - (needle < value ? 1 : 0) | 0;\n }\n function Digit() {\n Digit_instance = this;\n var tmp = this;\n // Inline function 'kotlin.intArrayOf' call\n tmp.gc_1 = new Int32Array([48, 1632, 1776, 1984, 2406, 2534, 2662, 2790, 2918, 3046, 3174, 3302, 3430, 3558, 3664, 3792, 3872, 4160, 4240, 6112, 6160, 6470, 6608, 6784, 6800, 6992, 7088, 7232, 7248, 42528, 43216, 43264, 43472, 43504, 43600, 44016, 65296]);\n }\n var Digit_instance;\n function Digit_getInstance() {\n if (Digit_instance == null)\n new Digit();\n return Digit_instance;\n }\n function isLowerCaseImpl(_this__u8e3s4) {\n var tmp;\n if (getLetterType(_this__u8e3s4) === 1) {\n tmp = true;\n } else {\n // Inline function 'kotlin.code' call\n var tmp$ret$0 = Char__toInt_impl_vasixd(_this__u8e3s4);\n tmp = isOtherLowercase(tmp$ret$0);\n }\n return tmp;\n }\n function getLetterType(_this__u8e3s4) {\n // Inline function 'kotlin.code' call\n var ch = Char__toInt_impl_vasixd(_this__u8e3s4);\n var index = binarySearchRange(Letter_getInstance().hc_1, ch);\n var rangeStart = Letter_getInstance().hc_1[index];\n var rangeEnd = (rangeStart + Letter_getInstance().ic_1[index] | 0) - 1 | 0;\n var code = Letter_getInstance().jc_1[index];\n if (ch > rangeEnd) {\n return 0;\n }\n var lastTwoBits = code & 3;\n if (lastTwoBits === 0) {\n var shift = 2;\n var threshold = rangeStart;\n var inductionVariable = 0;\n if (inductionVariable <= 1)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n threshold = threshold + (code >> shift & 127) | 0;\n if (threshold > ch) {\n return 3;\n }\n shift = shift + 7 | 0;\n threshold = threshold + (code >> shift & 127) | 0;\n if (threshold > ch) {\n return 0;\n }\n shift = shift + 7 | 0;\n }\n while (inductionVariable <= 1);\n return 3;\n }\n if (code <= 7) {\n return lastTwoBits;\n }\n var distance = ch - rangeStart | 0;\n var shift_0 = code <= 31 ? distance % 2 | 0 : distance;\n return code >> imul(2, shift_0) & 3;\n }\n function Letter() {\n Letter_instance = this;\n var toBase64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n var fromBase64 = new Int32Array(128);\n var inductionVariable = 0;\n var last = charSequenceLength(toBase64) - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.code' call\n var this_0 = charSequenceGet(toBase64, i);\n fromBase64[Char__toInt_impl_vasixd(this_0)] = i;\n }\n while (inductionVariable <= last);\n var rangeStartDiff = 'hCgBpCQGYHZH5BRpBPPPPPPRMP5BPPlCPP6BkEPPPPcPXPzBvBrB3BOiDoBHwD+E3DauCnFmBmB2D6E1BlBTiBmBlBP5BhBiBrBvBjBqBnBPRtBiCmCtBlB0BmB5BiB7BmBgEmChBZgCoEoGVpBSfRhBPqKQ2BwBYoFgB4CJuTiEvBuCuDrF5DgEgFlJ1DgFmBQtBsBRGsB+BPiBlD1EIjDPRPPPQPPPPPGQSQS/DxENVNU+B9zCwBwBPPCkDPNnBPqDYY1R8B7FkFgTgwGgwUwmBgKwBuBScmEP/BPPPPPPrBP8B7F1B/ErBqC6B7BiBmBfQsBUwCw/KwqIwLwETPcPjQgJxFgBlBsD';\n var diff = decodeVarLenBase64(rangeStartDiff, fromBase64, 222);\n var start = new Int32Array(diff.length);\n var inductionVariable_0 = 0;\n var last_0 = diff.length - 1 | 0;\n if (inductionVariable_0 <= last_0)\n do {\n var i_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n if (i_0 === 0) {\n start[i_0] = diff[i_0];\n } else {\n start[i_0] = start[i_0 - 1 | 0] + diff[i_0] | 0;\n }\n }\n while (inductionVariable_0 <= last_0);\n this.hc_1 = start;\n var rangeLength = 'aaMBXHYH5BRpBPPPPPPRMP5BPPlCPPzBDOOPPcPXPzBvBjB3BOhDmBBpB7DoDYxB+EiBP1DoExBkBQhBekBPmBgBhBctBiBMWOOXhCsBpBkBUV3Ba4BkB0DlCgBXgBtD4FSdBfPhBPpKP0BvBXjEQ2CGsT8DhBtCqDpFvD1D3E0IrD2EkBJrBDOBsB+BPiBlB1EIjDPPPPPPPPPPPGPPMNLsBNPNPKCvBvBPPCkDPBmBPhDXXgD4B6FzEgDguG9vUtkB9JcuBSckEP/BPPPPPPBPf4FrBjEhBpC3B5BKaWPrBOwCk/KsCuLqDHPbPxPsFtEaaqDL';\n this.ic_1 = decodeVarLenBase64(rangeLength, fromBase64, 222);\n var rangeCategory = 'GFjgggUHGGFFZZZmzpz5qB6s6020B60ptltB6smt2sB60mz22B1+vv+8BZZ5s2850BW5q1ymtB506smzBF3q1q1qB1q1q1+Bgii4wDTm74g3KiggxqM60q1q1Bq1o1q1BF1qlrqrBZ2q5wprBGFZWWZGHFsjiooLowgmOowjkwCkgoiIk7ligGogiioBkwkiYkzj2oNoi+sbkwj04DghhkQ8wgiYkgoioDsgnkwC4gikQ//v+85BkwvoIsgoyI4yguI0whiwEowri4CoghsJowgqYowgm4DkwgsY/nwnzPowhmYkg6wI8yggZswikwHgxgmIoxgqYkwgk4DkxgmIkgoioBsgssoBgzgyI8g9gL8g9kI0wgwJoxgkoC0wgioFkw/wI0w53iF4gioYowjmgBHGq1qkgwBF1q1q8qBHwghuIwghyKk0goQkwgoQk3goQHGFHkyg0pBgxj6IoinkxDswno7Ikwhz9Bo0gioB8z48Rwli0xN0mpjoX8w78pDwltoqKHFGGwwgsIHFH3q1q16BFHWFZ1q10q1B2qlwq1B1q10q1B2q1yq1B6q1gq1Biq1qhxBir1qp1Bqt1q1qB1g1q1+B//3q16B///q1qBH/qlqq9Bholqq9B1i00a1q10qD1op1HkwmigEigiy6Cptogq1Bixo1kDq7/j00B2qgoBWGFm1lz50B6s5q1+BGWhggzhwBFFhgk4//Bo2jigE8wguI8wguI8wgugUog1qoB4qjmIwwi2KgkYHHH4lBgiFWkgIWoghssMmz5smrBZ3q1y50B5sm7gzBtz1smzB5smz50BqzqtmzB5sgzqzBF2/9//5BowgoIwmnkzPkwgk4C8ys65BkgoqI0wgy6FghquZo2giY0ghiIsgh24B4ghsQ8QF/v1q1OFs0O8iCHHF1qggz/B8wg6Iznv+//B08QgohsjK0QGFk7hsQ4gB';\n this.jc_1 = decodeVarLenBase64(rangeCategory, fromBase64, 222);\n }\n var Letter_instance;\n function Letter_getInstance() {\n if (Letter_instance == null)\n new Letter();\n return Letter_instance;\n }\n function isOtherLowercase(_this__u8e3s4) {\n var index = binarySearchRange(OtherLowercase_getInstance().kc_1, _this__u8e3s4);\n return index >= 0 ? _this__u8e3s4 < (OtherLowercase_getInstance().kc_1[index] + OtherLowercase_getInstance().lc_1[index] | 0) : false;\n }\n function OtherLowercase() {\n OtherLowercase_instance = this;\n var tmp = this;\n // Inline function 'kotlin.intArrayOf' call\n tmp.kc_1 = new Int32Array([170, 186, 688, 704, 736, 837, 890, 7468, 7544, 7579, 8305, 8319, 8336, 8560, 9424, 11388, 42652, 42864, 43000, 43868]);\n var tmp_0 = this;\n // Inline function 'kotlin.intArrayOf' call\n tmp_0.lc_1 = new Int32Array([1, 1, 9, 2, 5, 1, 1, 63, 1, 37, 1, 1, 13, 16, 26, 2, 2, 1, 2, 4]);\n }\n var OtherLowercase_instance;\n function OtherLowercase_getInstance() {\n if (OtherLowercase_instance == null)\n new OtherLowercase();\n return OtherLowercase_instance;\n }\n function titlecaseCharImpl(_this__u8e3s4) {\n // Inline function 'kotlin.code' call\n var code = Char__toInt_impl_vasixd(_this__u8e3s4);\n if ((452 <= code ? code <= 460 : false) ? true : 497 <= code ? code <= 499 : false) {\n return numberToChar(imul(3, (code + 1 | 0) / 3 | 0));\n }\n if ((4304 <= code ? code <= 4346 : false) ? true : 4349 <= code ? code <= 4351 : false) {\n return _this__u8e3s4;\n }\n return uppercaseChar(_this__u8e3s4);\n }\n function isWhitespaceImpl(_this__u8e3s4) {\n // Inline function 'kotlin.code' call\n var ch = Char__toInt_impl_vasixd(_this__u8e3s4);\n return (((9 <= ch ? ch <= 13 : false) ? true : 28 <= ch ? ch <= 32 : false) ? true : ch === 160) ? true : ch > 4096 ? (((((ch === 5760 ? true : 8192 <= ch ? ch <= 8202 : false) ? true : ch === 8232) ? true : ch === 8233) ? true : ch === 8239) ? true : ch === 8287) ? true : ch === 12288 : false;\n }\n function releaseIntercepted($this) {\n var intercepted = $this.tc_1;\n if (!(intercepted == null) ? !(intercepted === $this) : false) {\n ensureNotNull($this.uc().vc(Key_instance)).wc(intercepted);\n }\n $this.tc_1 = CompletedContinuation_instance;\n }\n function CoroutineImpl(resultContinuation) {\n this.mc_1 = resultContinuation;\n this.nc_1 = 0;\n this.oc_1 = 0;\n this.pc_1 = null;\n this.qc_1 = null;\n this.rc_1 = null;\n var tmp = this;\n var tmp0_safe_receiver = this.mc_1;\n tmp.sc_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uc();\n this.tc_1 = null;\n }\n protoOf(CoroutineImpl).uc = function () {\n return ensureNotNull(this.sc_1);\n };\n protoOf(CoroutineImpl).xc = function (result) {\n var current = this;\n // Inline function 'kotlin.Result.getOrNull' call\n var tmp;\n if (_Result___get_isFailure__impl__jpiriv(result)) {\n tmp = null;\n } else {\n var tmp_0 = _Result___get_value__impl__bjfvqg(result);\n tmp = (tmp_0 == null ? true : !(tmp_0 == null)) ? tmp_0 : THROW_CCE();\n }\n var currentResult = tmp;\n var currentException = Result__exceptionOrNull_impl_p6xea9(result);\n while (true) {\n // Inline function 'kotlin.with' call\n // Inline function 'kotlin.contracts.contract' call\n var $this$with = current;\n if (currentException == null) {\n $this$with.pc_1 = currentResult;\n } else {\n $this$with.nc_1 = $this$with.oc_1;\n $this$with.qc_1 = currentException;\n }\n try {\n var outcome = $this$with.yc();\n if (outcome === get_COROUTINE_SUSPENDED())\n return Unit_instance;\n currentResult = outcome;\n currentException = null;\n } catch ($p) {\n var exception = $p;\n currentResult = null;\n // Inline function 'kotlin.js.unsafeCast' call\n currentException = exception;\n }\n releaseIntercepted($this$with);\n var completion = ensureNotNull($this$with.mc_1);\n var tmp_1;\n if (completion instanceof CoroutineImpl) {\n current = completion;\n tmp_1 = Unit_instance;\n } else {\n if (!(currentException == null)) {\n // Inline function 'kotlin.coroutines.resumeWithException' call\n // Inline function 'kotlin.Companion.failure' call\n var exception_0 = ensureNotNull(currentException);\n var tmp$ret$2 = _Result___init__impl__xyqfz8(createFailure(exception_0));\n completion.zc(tmp$ret$2);\n } else {\n // Inline function 'kotlin.coroutines.resume' call\n // Inline function 'kotlin.Companion.success' call\n var value = currentResult;\n var tmp$ret$4 = _Result___init__impl__xyqfz8(value);\n completion.zc(tmp$ret$4);\n }\n return Unit_instance;\n }\n }\n };\n protoOf(CoroutineImpl).zc = function (result) {\n return this.xc(result);\n };\n function CompletedContinuation() {\n }\n protoOf(CompletedContinuation).uc = function () {\n var message = 'This continuation is already complete';\n throw IllegalStateException_init_$Create$_0(toString_1(message));\n };\n protoOf(CompletedContinuation).xc = function (result) {\n // Inline function 'kotlin.error' call\n var message = 'This continuation is already complete';\n throw IllegalStateException_init_$Create$_0(toString_1(message));\n };\n protoOf(CompletedContinuation).zc = function (result) {\n return this.xc(result);\n };\n protoOf(CompletedContinuation).toString = function () {\n return 'This continuation is already complete';\n };\n var CompletedContinuation_instance;\n function CompletedContinuation_getInstance() {\n return CompletedContinuation_instance;\n }\n function createCoroutineUnintercepted(_this__u8e3s4, receiver, completion) {\n // Inline function 'kotlin.coroutines.intrinsics.createCoroutineFromSuspendFunction' call\n return new _no_name_provided__qut3iv_3(completion, _this__u8e3s4, receiver, completion);\n }\n function invokeSuspendSuperTypeWithReceiver(_this__u8e3s4, receiver, completion) {\n throw new NotImplementedError('It is intrinsic method');\n }\n function invokeSuspendSuperTypeWithReceiverAndParam(_this__u8e3s4, receiver, param, completion) {\n throw new NotImplementedError('It is intrinsic method');\n }\n function _no_name_provided__qut3iv_3($completion, $this_createCoroutineUnintercepted, $receiver, $completion$1) {\n this.id_1 = $this_createCoroutineUnintercepted;\n this.jd_1 = $receiver;\n this.kd_1 = $completion$1;\n CoroutineImpl.call(this, isInterface($completion, Continuation) ? $completion : THROW_CCE());\n }\n protoOf(_no_name_provided__qut3iv_3).yc = function () {\n if (this.qc_1 != null)\n throw this.qc_1;\n // Inline function 'kotlin.coroutines.intrinsics.createCoroutineUnintercepted.' call\n // Inline function 'kotlin.js.asDynamic' call\n var a = this.id_1;\n return typeof a === 'function' ? a(this.jd_1, this.kd_1) : this.id_1.ld(this.jd_1, this.kd_1);\n };\n function Exception_init_$Init$($this) {\n extendThrowable($this);\n Exception.call($this);\n return $this;\n }\n function Exception_init_$Create$() {\n var tmp = Exception_init_$Init$(objectCreate(protoOf(Exception)));\n captureStack(tmp, Exception_init_$Create$);\n return tmp;\n }\n function Exception_init_$Init$_0(message, $this) {\n extendThrowable($this, message);\n Exception.call($this);\n return $this;\n }\n function Exception_init_$Create$_0(message) {\n var tmp = Exception_init_$Init$_0(message, objectCreate(protoOf(Exception)));\n captureStack(tmp, Exception_init_$Create$_0);\n return tmp;\n }\n function Exception_init_$Init$_1(message, cause, $this) {\n extendThrowable($this, message, cause);\n Exception.call($this);\n return $this;\n }\n function Exception() {\n captureStack(this, Exception);\n }\n function IllegalArgumentException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n IllegalArgumentException.call($this);\n return $this;\n }\n function IllegalArgumentException_init_$Create$() {\n var tmp = IllegalArgumentException_init_$Init$(objectCreate(protoOf(IllegalArgumentException)));\n captureStack(tmp, IllegalArgumentException_init_$Create$);\n return tmp;\n }\n function IllegalArgumentException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n IllegalArgumentException.call($this);\n return $this;\n }\n function IllegalArgumentException_init_$Create$_0(message) {\n var tmp = IllegalArgumentException_init_$Init$_0(message, objectCreate(protoOf(IllegalArgumentException)));\n captureStack(tmp, IllegalArgumentException_init_$Create$_0);\n return tmp;\n }\n function IllegalArgumentException_init_$Init$_1(message, cause, $this) {\n RuntimeException_init_$Init$_1(message, cause, $this);\n IllegalArgumentException.call($this);\n return $this;\n }\n function IllegalArgumentException_init_$Create$_1(message, cause) {\n var tmp = IllegalArgumentException_init_$Init$_1(message, cause, objectCreate(protoOf(IllegalArgumentException)));\n captureStack(tmp, IllegalArgumentException_init_$Create$_1);\n return tmp;\n }\n function IllegalArgumentException() {\n captureStack(this, IllegalArgumentException);\n }\n function IndexOutOfBoundsException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n IndexOutOfBoundsException.call($this);\n return $this;\n }\n function IndexOutOfBoundsException_init_$Create$() {\n var tmp = IndexOutOfBoundsException_init_$Init$(objectCreate(protoOf(IndexOutOfBoundsException)));\n captureStack(tmp, IndexOutOfBoundsException_init_$Create$);\n return tmp;\n }\n function IndexOutOfBoundsException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n IndexOutOfBoundsException.call($this);\n return $this;\n }\n function IndexOutOfBoundsException_init_$Create$_0(message) {\n var tmp = IndexOutOfBoundsException_init_$Init$_0(message, objectCreate(protoOf(IndexOutOfBoundsException)));\n captureStack(tmp, IndexOutOfBoundsException_init_$Create$_0);\n return tmp;\n }\n function IndexOutOfBoundsException() {\n captureStack(this, IndexOutOfBoundsException);\n }\n function IllegalStateException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n IllegalStateException.call($this);\n return $this;\n }\n function IllegalStateException_init_$Create$() {\n var tmp = IllegalStateException_init_$Init$(objectCreate(protoOf(IllegalStateException)));\n captureStack(tmp, IllegalStateException_init_$Create$);\n return tmp;\n }\n function IllegalStateException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n IllegalStateException.call($this);\n return $this;\n }\n function IllegalStateException_init_$Create$_0(message) {\n var tmp = IllegalStateException_init_$Init$_0(message, objectCreate(protoOf(IllegalStateException)));\n captureStack(tmp, IllegalStateException_init_$Create$_0);\n return tmp;\n }\n function IllegalStateException() {\n captureStack(this, IllegalStateException);\n }\n function UnsupportedOperationException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n UnsupportedOperationException.call($this);\n return $this;\n }\n function UnsupportedOperationException_init_$Create$() {\n var tmp = UnsupportedOperationException_init_$Init$(objectCreate(protoOf(UnsupportedOperationException)));\n captureStack(tmp, UnsupportedOperationException_init_$Create$);\n return tmp;\n }\n function UnsupportedOperationException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n UnsupportedOperationException.call($this);\n return $this;\n }\n function UnsupportedOperationException_init_$Create$_0(message) {\n var tmp = UnsupportedOperationException_init_$Init$_0(message, objectCreate(protoOf(UnsupportedOperationException)));\n captureStack(tmp, UnsupportedOperationException_init_$Create$_0);\n return tmp;\n }\n function UnsupportedOperationException() {\n captureStack(this, UnsupportedOperationException);\n }\n function RuntimeException_init_$Init$($this) {\n Exception_init_$Init$($this);\n RuntimeException.call($this);\n return $this;\n }\n function RuntimeException_init_$Create$() {\n var tmp = RuntimeException_init_$Init$(objectCreate(protoOf(RuntimeException)));\n captureStack(tmp, RuntimeException_init_$Create$);\n return tmp;\n }\n function RuntimeException_init_$Init$_0(message, $this) {\n Exception_init_$Init$_0(message, $this);\n RuntimeException.call($this);\n return $this;\n }\n function RuntimeException_init_$Create$_0(message) {\n var tmp = RuntimeException_init_$Init$_0(message, objectCreate(protoOf(RuntimeException)));\n captureStack(tmp, RuntimeException_init_$Create$_0);\n return tmp;\n }\n function RuntimeException_init_$Init$_1(message, cause, $this) {\n Exception_init_$Init$_1(message, cause, $this);\n RuntimeException.call($this);\n return $this;\n }\n function RuntimeException() {\n captureStack(this, RuntimeException);\n }\n function NoSuchElementException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n NoSuchElementException.call($this);\n return $this;\n }\n function NoSuchElementException_init_$Create$() {\n var tmp = NoSuchElementException_init_$Init$(objectCreate(protoOf(NoSuchElementException)));\n captureStack(tmp, NoSuchElementException_init_$Create$);\n return tmp;\n }\n function NoSuchElementException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n NoSuchElementException.call($this);\n return $this;\n }\n function NoSuchElementException_init_$Create$_0(message) {\n var tmp = NoSuchElementException_init_$Init$_0(message, objectCreate(protoOf(NoSuchElementException)));\n captureStack(tmp, NoSuchElementException_init_$Create$_0);\n return tmp;\n }\n function NoSuchElementException() {\n captureStack(this, NoSuchElementException);\n }\n function Error_init_$Init$($this) {\n extendThrowable($this);\n Error_0.call($this);\n return $this;\n }\n function Error_init_$Create$() {\n var tmp = Error_init_$Init$(objectCreate(protoOf(Error_0)));\n captureStack(tmp, Error_init_$Create$);\n return tmp;\n }\n function Error_init_$Init$_0(message, $this) {\n extendThrowable($this, message);\n Error_0.call($this);\n return $this;\n }\n function Error_init_$Create$_0(message) {\n var tmp = Error_init_$Init$_0(message, objectCreate(protoOf(Error_0)));\n captureStack(tmp, Error_init_$Create$_0);\n return tmp;\n }\n function Error_0() {\n captureStack(this, Error_0);\n }\n function AssertionError_init_$Init$($this) {\n Error_init_$Init$($this);\n AssertionError.call($this);\n return $this;\n }\n function AssertionError_init_$Create$() {\n var tmp = AssertionError_init_$Init$(objectCreate(protoOf(AssertionError)));\n captureStack(tmp, AssertionError_init_$Create$);\n return tmp;\n }\n function AssertionError_init_$Init$_0(message, $this) {\n Error_init_$Init$_0(message, $this);\n AssertionError.call($this);\n return $this;\n }\n function AssertionError_init_$Create$_0(message) {\n var tmp = AssertionError_init_$Init$_0(message, objectCreate(protoOf(AssertionError)));\n captureStack(tmp, AssertionError_init_$Create$_0);\n return tmp;\n }\n function AssertionError() {\n captureStack(this, AssertionError);\n }\n function ConcurrentModificationException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n ConcurrentModificationException.call($this);\n return $this;\n }\n function ConcurrentModificationException_init_$Create$() {\n var tmp = ConcurrentModificationException_init_$Init$(objectCreate(protoOf(ConcurrentModificationException)));\n captureStack(tmp, ConcurrentModificationException_init_$Create$);\n return tmp;\n }\n function ConcurrentModificationException() {\n captureStack(this, ConcurrentModificationException);\n }\n function ArithmeticException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n ArithmeticException.call($this);\n return $this;\n }\n function ArithmeticException_init_$Create$() {\n var tmp = ArithmeticException_init_$Init$(objectCreate(protoOf(ArithmeticException)));\n captureStack(tmp, ArithmeticException_init_$Create$);\n return tmp;\n }\n function ArithmeticException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n ArithmeticException.call($this);\n return $this;\n }\n function ArithmeticException_init_$Create$_0(message) {\n var tmp = ArithmeticException_init_$Init$_0(message, objectCreate(protoOf(ArithmeticException)));\n captureStack(tmp, ArithmeticException_init_$Create$_0);\n return tmp;\n }\n function ArithmeticException() {\n captureStack(this, ArithmeticException);\n }\n function NumberFormatException_init_$Init$($this) {\n IllegalArgumentException_init_$Init$($this);\n NumberFormatException.call($this);\n return $this;\n }\n function NumberFormatException_init_$Create$() {\n var tmp = NumberFormatException_init_$Init$(objectCreate(protoOf(NumberFormatException)));\n captureStack(tmp, NumberFormatException_init_$Create$);\n return tmp;\n }\n function NumberFormatException_init_$Init$_0(message, $this) {\n IllegalArgumentException_init_$Init$_0(message, $this);\n NumberFormatException.call($this);\n return $this;\n }\n function NumberFormatException_init_$Create$_0(message) {\n var tmp = NumberFormatException_init_$Init$_0(message, objectCreate(protoOf(NumberFormatException)));\n captureStack(tmp, NumberFormatException_init_$Create$_0);\n return tmp;\n }\n function NumberFormatException() {\n captureStack(this, NumberFormatException);\n }\n function NullPointerException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n NullPointerException.call($this);\n return $this;\n }\n function NullPointerException_init_$Create$() {\n var tmp = NullPointerException_init_$Init$(objectCreate(protoOf(NullPointerException)));\n captureStack(tmp, NullPointerException_init_$Create$);\n return tmp;\n }\n function NullPointerException() {\n captureStack(this, NullPointerException);\n }\n function NoWhenBranchMatchedException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n NoWhenBranchMatchedException.call($this);\n return $this;\n }\n function NoWhenBranchMatchedException_init_$Create$() {\n var tmp = NoWhenBranchMatchedException_init_$Init$(objectCreate(protoOf(NoWhenBranchMatchedException)));\n captureStack(tmp, NoWhenBranchMatchedException_init_$Create$);\n return tmp;\n }\n function NoWhenBranchMatchedException() {\n captureStack(this, NoWhenBranchMatchedException);\n }\n function ClassCastException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n ClassCastException.call($this);\n return $this;\n }\n function ClassCastException_init_$Create$() {\n var tmp = ClassCastException_init_$Init$(objectCreate(protoOf(ClassCastException)));\n captureStack(tmp, ClassCastException_init_$Create$);\n return tmp;\n }\n function ClassCastException() {\n captureStack(this, ClassCastException);\n }\n function UninitializedPropertyAccessException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n UninitializedPropertyAccessException.call($this);\n return $this;\n }\n function UninitializedPropertyAccessException_init_$Create$() {\n var tmp = UninitializedPropertyAccessException_init_$Init$(objectCreate(protoOf(UninitializedPropertyAccessException)));\n captureStack(tmp, UninitializedPropertyAccessException_init_$Create$);\n return tmp;\n }\n function UninitializedPropertyAccessException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n UninitializedPropertyAccessException.call($this);\n return $this;\n }\n function UninitializedPropertyAccessException_init_$Create$_0(message) {\n var tmp = UninitializedPropertyAccessException_init_$Init$_0(message, objectCreate(protoOf(UninitializedPropertyAccessException)));\n captureStack(tmp, UninitializedPropertyAccessException_init_$Create$_0);\n return tmp;\n }\n function UninitializedPropertyAccessException() {\n captureStack(this, UninitializedPropertyAccessException);\n }\n function toRawBits(_this__u8e3s4) {\n return doubleToRawBits(_this__u8e3s4);\n }\n function findAssociatedObject(_this__u8e3s4, annotationClass) {\n var tmp;\n var tmp_0;\n if (_this__u8e3s4 instanceof KClassImpl) {\n tmp_0 = annotationClass instanceof KClassImpl;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n // Inline function 'kotlin.js.asDynamic' call\n var tmp0_safe_receiver = annotationClass.u6().$metadata$;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.associatedObjectKey;\n var tmp_1;\n if (tmp1_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n tmp_1 = tmp1_safe_receiver;\n }\n var tmp2_elvis_lhs = tmp_1;\n var tmp_2;\n if (tmp2_elvis_lhs == null) {\n return null;\n } else {\n tmp_2 = tmp2_elvis_lhs;\n }\n var key = tmp_2;\n // Inline function 'kotlin.js.asDynamic' call\n var tmp3_safe_receiver = _this__u8e3s4.u6().$metadata$;\n var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.associatedObjects;\n var tmp_3;\n if (tmp4_elvis_lhs == null) {\n return null;\n } else {\n tmp_3 = tmp4_elvis_lhs;\n }\n var map = tmp_3;\n var tmp5_elvis_lhs = map[key];\n var tmp_4;\n if (tmp5_elvis_lhs == null) {\n return null;\n } else {\n tmp_4 = tmp5_elvis_lhs;\n }\n var factory = tmp_4;\n return factory();\n } else {\n tmp = null;\n }\n return tmp;\n }\n function toString_2(_this__u8e3s4, radix) {\n return toStringImpl(_this__u8e3s4, checkRadix(radix));\n }\n function AbstractCollection$toString$lambda(this$0) {\n return function (it) {\n return it === this$0 ? '(this Collection)' : toString_0(it);\n };\n }\n function AbstractCollection() {\n }\n protoOf(AbstractCollection).p = function (element) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var tmp;\n if (isInterface(this, Collection)) {\n tmp = this.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'kotlin.collections.AbstractCollection.contains.' call\n if (equals_0(element_0, element)) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n }\n tmp$ret$0 = false;\n }\n return tmp$ret$0;\n };\n protoOf(AbstractCollection).a1 = function (elements) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var tmp;\n if (isInterface(elements, Collection)) {\n tmp = elements.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = elements.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.AbstractCollection.containsAll.' call\n if (!this.p(element)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n };\n protoOf(AbstractCollection).b1 = function () {\n return this.n() === 0;\n };\n protoOf(AbstractCollection).toString = function () {\n return joinToString_0(this, ', ', '[', ']', VOID, VOID, AbstractCollection$toString$lambda(this));\n };\n protoOf(AbstractCollection).toArray = function () {\n return collectionToArray(this);\n };\n function tryToComputeNext($this) {\n $this.od_1 = State_Failed_getInstance();\n $this.qd();\n return $this.od_1.equals(State_Ready_getInstance());\n }\n function AbstractIterator() {\n this.od_1 = State_NotReady_getInstance();\n this.pd_1 = null;\n }\n protoOf(AbstractIterator).u = function () {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!!this.od_1.equals(State_Failed_getInstance())) {\n // Inline function 'kotlin.require.' call\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n switch (this.od_1.x9_1) {\n case 2:\n return false;\n case 0:\n return true;\n default:\n return tryToComputeNext(this);\n }\n };\n protoOf(AbstractIterator).w = function () {\n if (!this.u())\n throw NoSuchElementException_init_$Create$();\n this.od_1 = State_NotReady_getInstance();\n var tmp = this.pd_1;\n return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n };\n protoOf(AbstractIterator).rd = function (value) {\n this.pd_1 = value;\n this.od_1 = State_Ready_getInstance();\n };\n protoOf(AbstractIterator).sd = function () {\n this.od_1 = State_Done_getInstance();\n };\n var State_Ready_instance;\n var State_NotReady_instance;\n var State_Done_instance;\n var State_Failed_instance;\n var State_entriesInitialized;\n function State_initEntries() {\n if (State_entriesInitialized)\n return Unit_instance;\n State_entriesInitialized = true;\n State_Ready_instance = new State('Ready', 0);\n State_NotReady_instance = new State('NotReady', 1);\n State_Done_instance = new State('Done', 2);\n State_Failed_instance = new State('Failed', 3);\n }\n function State(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function State_Ready_getInstance() {\n State_initEntries();\n return State_Ready_instance;\n }\n function State_NotReady_getInstance() {\n State_initEntries();\n return State_NotReady_instance;\n }\n function State_Done_getInstance() {\n State_initEntries();\n return State_Done_instance;\n }\n function State_Failed_getInstance() {\n State_initEntries();\n return State_Failed_instance;\n }\n function IteratorImpl_0($outer) {\n this.ud_1 = $outer;\n this.td_1 = 0;\n }\n protoOf(IteratorImpl_0).u = function () {\n return this.td_1 < this.ud_1.n();\n };\n protoOf(IteratorImpl_0).w = function () {\n if (!this.u())\n throw NoSuchElementException_init_$Create$();\n var tmp1 = this.td_1;\n this.td_1 = tmp1 + 1 | 0;\n return this.ud_1.f1(tmp1);\n };\n function ListIteratorImpl_0($outer, index) {\n this.xd_1 = $outer;\n IteratorImpl_0.call(this, $outer);\n Companion_instance_5.n1(index, this.xd_1.n());\n this.td_1 = index;\n }\n protoOf(ListIteratorImpl_0).o1 = function () {\n return this.td_1 > 0;\n };\n protoOf(ListIteratorImpl_0).p1 = function () {\n return this.td_1;\n };\n protoOf(ListIteratorImpl_0).q1 = function () {\n if (!this.o1())\n throw NoSuchElementException_init_$Create$();\n this.td_1 = this.td_1 - 1 | 0;\n return this.xd_1.f1(this.td_1);\n };\n function Companion_5() {\n this.m1_1 = 2147483639;\n }\n protoOf(Companion_5).x1 = function (index, size) {\n if (index < 0 ? true : index >= size) {\n throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', size: ' + size);\n }\n };\n protoOf(Companion_5).n1 = function (index, size) {\n if (index < 0 ? true : index > size) {\n throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', size: ' + size);\n }\n };\n protoOf(Companion_5).v1 = function (fromIndex, toIndex, size) {\n if (fromIndex < 0 ? true : toIndex > size) {\n throw IndexOutOfBoundsException_init_$Create$_0('fromIndex: ' + fromIndex + ', toIndex: ' + toIndex + ', size: ' + size);\n }\n if (fromIndex > toIndex) {\n throw IllegalArgumentException_init_$Create$_0('fromIndex: ' + fromIndex + ' > toIndex: ' + toIndex);\n }\n };\n protoOf(Companion_5).n8 = function (startIndex, endIndex, size) {\n if (startIndex < 0 ? true : endIndex > size) {\n throw IndexOutOfBoundsException_init_$Create$_0('startIndex: ' + startIndex + ', endIndex: ' + endIndex + ', size: ' + size);\n }\n if (startIndex > endIndex) {\n throw IllegalArgumentException_init_$Create$_0('startIndex: ' + startIndex + ' > endIndex: ' + endIndex);\n }\n };\n protoOf(Companion_5).x4 = function (oldCapacity, minCapacity) {\n var newCapacity = oldCapacity + (oldCapacity >> 1) | 0;\n if ((newCapacity - minCapacity | 0) < 0)\n newCapacity = minCapacity;\n if ((newCapacity - 2147483639 | 0) > 0)\n newCapacity = minCapacity > 2147483639 ? IntCompanionObject_instance.MAX_VALUE : 2147483639;\n return newCapacity;\n };\n protoOf(Companion_5).h2 = function (c) {\n var hashCode_0 = 1;\n var tmp0_iterator = c.t();\n while (tmp0_iterator.u()) {\n var e = tmp0_iterator.w();\n var tmp = imul(31, hashCode_0);\n var tmp2_elvis_lhs = e == null ? null : hashCode(e);\n hashCode_0 = tmp + (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) | 0;\n }\n return hashCode_0;\n };\n protoOf(Companion_5).g2 = function (c, other) {\n if (!(c.n() === other.n()))\n return false;\n var otherIterator = other.t();\n var tmp0_iterator = c.t();\n while (tmp0_iterator.u()) {\n var elem = tmp0_iterator.w();\n var elemOther = otherIterator.w();\n if (!equals_0(elem, elemOther)) {\n return false;\n }\n }\n return true;\n };\n var Companion_instance_5;\n function Companion_getInstance_5() {\n return Companion_instance_5;\n }\n function AbstractList() {\n AbstractCollection.call(this);\n }\n protoOf(AbstractList).t = function () {\n return new IteratorImpl_0(this);\n };\n protoOf(AbstractList).a2 = function (element) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.indexOfFirst' call\n var index = 0;\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'kotlin.collections.AbstractList.indexOf.' call\n if (equals_0(item, element)) {\n tmp$ret$1 = index;\n break $l$block;\n }\n index = index + 1 | 0;\n }\n tmp$ret$1 = -1;\n }\n return tmp$ret$1;\n };\n protoOf(AbstractList).d2 = function (index) {\n return new ListIteratorImpl_0(this, index);\n };\n protoOf(AbstractList).equals = function (other) {\n if (other === this)\n return true;\n if (!(!(other == null) ? isInterface(other, List) : false))\n return false;\n return Companion_instance_5.g2(this, other);\n };\n protoOf(AbstractList).hashCode = function () {\n return Companion_instance_5.h2(this);\n };\n function AbstractMap$keys$1$iterator$1($entryIterator) {\n this.yd_1 = $entryIterator;\n }\n protoOf(AbstractMap$keys$1$iterator$1).u = function () {\n return this.yd_1.u();\n };\n protoOf(AbstractMap$keys$1$iterator$1).w = function () {\n return this.yd_1.w().t2();\n };\n function AbstractMap$values$1$iterator$1($entryIterator) {\n this.zd_1 = $entryIterator;\n }\n protoOf(AbstractMap$values$1$iterator$1).u = function () {\n return this.zd_1.u();\n };\n protoOf(AbstractMap$values$1$iterator$1).w = function () {\n return this.zd_1.w().u2();\n };\n function toString_3($this, o) {\n return o === $this ? '(this Map)' : toString_0(o);\n }\n function implFindEntry($this, key) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = $this.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.AbstractMap.implFindEntry.' call\n if (equals_0(element.t2(), key)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n }\n function Companion_6() {\n }\n var Companion_instance_6;\n function Companion_getInstance_6() {\n return Companion_instance_6;\n }\n function AbstractMap$keys$1(this$0) {\n this.ae_1 = this$0;\n AbstractSet.call(this);\n }\n protoOf(AbstractMap$keys$1).q3 = function (element) {\n return this.ae_1.y2(element);\n };\n protoOf(AbstractMap$keys$1).p = function (element) {\n if (!(element == null ? true : !(element == null)))\n return false;\n return this.q3((element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n protoOf(AbstractMap$keys$1).t = function () {\n var entryIterator = this.ae_1.q2().t();\n return new AbstractMap$keys$1$iterator$1(entryIterator);\n };\n protoOf(AbstractMap$keys$1).n = function () {\n return this.ae_1.n();\n };\n function AbstractMap$toString$lambda(this$0) {\n return function (it) {\n return this$0.be(it);\n };\n }\n function AbstractMap$values$1(this$0) {\n this.ce_1 = this$0;\n AbstractCollection.call(this);\n }\n protoOf(AbstractMap$values$1).u3 = function (element) {\n return this.ce_1.z2(element);\n };\n protoOf(AbstractMap$values$1).p = function (element) {\n if (!(element == null ? true : !(element == null)))\n return false;\n return this.u3((element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n protoOf(AbstractMap$values$1).t = function () {\n var entryIterator = this.ce_1.q2().t();\n return new AbstractMap$values$1$iterator$1(entryIterator);\n };\n protoOf(AbstractMap$values$1).n = function () {\n return this.ce_1.n();\n };\n function AbstractMap() {\n this.w2_1 = null;\n this.x2_1 = null;\n }\n protoOf(AbstractMap).y2 = function (key) {\n return !(implFindEntry(this, key) == null);\n };\n protoOf(AbstractMap).z2 = function (value) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var this_0 = this.q2();\n var tmp;\n if (isInterface(this_0, Collection)) {\n tmp = this_0.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.AbstractMap.containsValue.' call\n if (equals_0(element.u2(), value)) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n }\n tmp$ret$0 = false;\n }\n return tmp$ret$0;\n };\n protoOf(AbstractMap).a3 = function (entry) {\n if (!(!(entry == null) ? isInterface(entry, Entry) : false))\n return false;\n var key = entry.t2();\n var value = entry.u2();\n // Inline function 'kotlin.collections.get' call\n var ourValue = (isInterface(this, Map_0) ? this : THROW_CCE()).b3(key);\n if (!equals_0(value, ourValue)) {\n return false;\n }\n var tmp;\n if (ourValue == null) {\n // Inline function 'kotlin.collections.containsKey' call\n tmp = !(isInterface(this, Map_0) ? this : THROW_CCE()).y2(key);\n } else {\n tmp = false;\n }\n if (tmp) {\n return false;\n }\n return true;\n };\n protoOf(AbstractMap).equals = function (other) {\n if (other === this)\n return true;\n if (!(!(other == null) ? isInterface(other, Map_0) : false))\n return false;\n if (!(this.n() === other.n()))\n return false;\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = other.q2();\n var tmp;\n if (isInterface(this_0, Collection)) {\n tmp = this_0.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.AbstractMap.equals.' call\n if (!this.a3(element)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n };\n protoOf(AbstractMap).b3 = function (key) {\n var tmp0_safe_receiver = implFindEntry(this, key);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u2();\n };\n protoOf(AbstractMap).hashCode = function () {\n return hashCode(this.q2());\n };\n protoOf(AbstractMap).b1 = function () {\n return this.n() === 0;\n };\n protoOf(AbstractMap).n = function () {\n return this.q2().n();\n };\n protoOf(AbstractMap).o2 = function () {\n if (this.w2_1 == null) {\n var tmp = this;\n tmp.w2_1 = new AbstractMap$keys$1(this);\n }\n return ensureNotNull(this.w2_1);\n };\n protoOf(AbstractMap).toString = function () {\n var tmp = this.q2();\n return joinToString_0(tmp, ', ', '{', '}', VOID, VOID, AbstractMap$toString$lambda(this));\n };\n protoOf(AbstractMap).be = function (entry) {\n return toString_3(this, entry.t2()) + '=' + toString_3(this, entry.u2());\n };\n protoOf(AbstractMap).p2 = function () {\n if (this.x2_1 == null) {\n var tmp = this;\n tmp.x2_1 = new AbstractMap$values$1(this);\n }\n return ensureNotNull(this.x2_1);\n };\n function Companion_7() {\n }\n protoOf(Companion_7).d3 = function (c) {\n var hashCode_0 = 0;\n var tmp0_iterator = c.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n var tmp = hashCode_0;\n var tmp2_elvis_lhs = element == null ? null : hashCode(element);\n hashCode_0 = tmp + (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) | 0;\n }\n return hashCode_0;\n };\n protoOf(Companion_7).c3 = function (c, other) {\n if (!(c.n() === other.n()))\n return false;\n // Inline function 'kotlin.collections.containsAll' call\n return c.a1(other);\n };\n var Companion_instance_7;\n function Companion_getInstance_7() {\n return Companion_instance_7;\n }\n function AbstractSet() {\n AbstractCollection.call(this);\n }\n protoOf(AbstractSet).equals = function (other) {\n if (other === this)\n return true;\n if (!(!(other == null) ? isInterface(other, Set) : false))\n return false;\n return Companion_instance_7.c3(this, other);\n };\n protoOf(AbstractSet).hashCode = function () {\n return Companion_instance_7.d3(this);\n };\n function flatten(_this__u8e3s4) {\n // Inline function 'kotlin.collections.sumOf' call\n var sum = 0;\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n while (inductionVariable < last) {\n var element = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var tmp = sum;\n // Inline function 'kotlin.collections.flatten.' call\n sum = tmp + element.length | 0;\n }\n var tmp$ret$1 = sum;\n var result = ArrayList_init_$Create$_0(tmp$ret$1);\n var inductionVariable_0 = 0;\n var last_0 = _this__u8e3s4.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = _this__u8e3s4[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n addAll(result, element_0);\n }\n return result;\n }\n function contentDeepEqualsImpl(_this__u8e3s4, other) {\n if (_this__u8e3s4 === other)\n return true;\n if ((_this__u8e3s4 == null ? true : other == null) ? true : !(_this__u8e3s4.length === other.length))\n return false;\n var inductionVariable = 0;\n var last = _this__u8e3s4.length - 1 | 0;\n if (inductionVariable <= last)\n $l$loop: do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var v1 = _this__u8e3s4[i];\n var v2 = other[i];\n if (v1 === v2) {\n continue $l$loop;\n } else if (v1 == null ? true : v2 == null) {\n return false;\n }\n var tmp;\n if (!(v1 == null) ? isArray(v1) : false) {\n tmp = !(v2 == null) ? isArray(v2) : false;\n } else {\n tmp = false;\n }\n if (tmp) {\n if (!contentDeepEquals(v1, v2))\n return false;\n } else {\n var tmp_0;\n if (!(v1 == null) ? isByteArray(v1) : false) {\n tmp_0 = !(v2 == null) ? isByteArray(v2) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n if (!contentEquals_5(v1, v2))\n return false;\n } else {\n var tmp_1;\n if (!(v1 == null) ? isShortArray(v1) : false) {\n tmp_1 = !(v2 == null) ? isShortArray(v2) : false;\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n if (!contentEquals_6(v1, v2))\n return false;\n } else {\n var tmp_2;\n if (!(v1 == null) ? isIntArray(v1) : false) {\n tmp_2 = !(v2 == null) ? isIntArray(v2) : false;\n } else {\n tmp_2 = false;\n }\n if (tmp_2) {\n if (!contentEquals_7(v1, v2))\n return false;\n } else {\n var tmp_3;\n if (!(v1 == null) ? isLongArray(v1) : false) {\n tmp_3 = !(v2 == null) ? isLongArray(v2) : false;\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n if (!contentEquals_8(v1, v2))\n return false;\n } else {\n var tmp_4;\n if (!(v1 == null) ? isFloatArray(v1) : false) {\n tmp_4 = !(v2 == null) ? isFloatArray(v2) : false;\n } else {\n tmp_4 = false;\n }\n if (tmp_4) {\n if (!contentEquals_9(v1, v2))\n return false;\n } else {\n var tmp_5;\n if (!(v1 == null) ? isDoubleArray(v1) : false) {\n tmp_5 = !(v2 == null) ? isDoubleArray(v2) : false;\n } else {\n tmp_5 = false;\n }\n if (tmp_5) {\n if (!contentEquals_10(v1, v2))\n return false;\n } else {\n var tmp_6;\n if (!(v1 == null) ? isCharArray(v1) : false) {\n tmp_6 = !(v2 == null) ? isCharArray(v2) : false;\n } else {\n tmp_6 = false;\n }\n if (tmp_6) {\n if (!contentEquals_11(v1, v2))\n return false;\n } else {\n var tmp_7;\n if (!(v1 == null) ? isBooleanArray(v1) : false) {\n tmp_7 = !(v2 == null) ? isBooleanArray(v2) : false;\n } else {\n tmp_7 = false;\n }\n if (tmp_7) {\n if (!contentEquals_12(v1, v2))\n return false;\n } else {\n var tmp_8;\n if (v1 instanceof UByteArray) {\n tmp_8 = v2 instanceof UByteArray;\n } else {\n tmp_8 = false;\n }\n if (tmp_8) {\n var tmp_9 = v1;\n var tmp_10 = tmp_9 == null ? null : tmp_9.ge_1;\n var tmp_11 = v2;\n if (!contentEquals_0(tmp_10, tmp_11 == null ? null : tmp_11.ge_1))\n return false;\n } else {\n var tmp_12;\n if (v1 instanceof UShortArray) {\n tmp_12 = v2 instanceof UShortArray;\n } else {\n tmp_12 = false;\n }\n if (tmp_12) {\n var tmp_13 = v1;\n var tmp_14 = tmp_13 == null ? null : tmp_13.fe_1;\n var tmp_15 = v2;\n if (!contentEquals_1(tmp_14, tmp_15 == null ? null : tmp_15.fe_1))\n return false;\n } else {\n var tmp_16;\n if (v1 instanceof UIntArray) {\n tmp_16 = v2 instanceof UIntArray;\n } else {\n tmp_16 = false;\n }\n if (tmp_16) {\n var tmp_17 = v1;\n var tmp_18 = tmp_17 == null ? null : tmp_17.ee_1;\n var tmp_19 = v2;\n if (!contentEquals_2(tmp_18, tmp_19 == null ? null : tmp_19.ee_1))\n return false;\n } else {\n var tmp_20;\n if (v1 instanceof ULongArray) {\n tmp_20 = v2 instanceof ULongArray;\n } else {\n tmp_20 = false;\n }\n if (tmp_20) {\n var tmp_21 = v1;\n var tmp_22 = tmp_21 == null ? null : tmp_21.de_1;\n var tmp_23 = v2;\n if (!contentEquals_3(tmp_22, tmp_23 == null ? null : tmp_23.de_1))\n return false;\n } else {\n if (!equals_0(v1, v2))\n return false;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n while (inductionVariable <= last);\n return true;\n }\n function collectionToArrayCommonImpl(collection) {\n if (collection.b1()) {\n // Inline function 'kotlin.emptyArray' call\n return [];\n }\n // Inline function 'kotlin.arrayOfNulls' call\n var size = collection.n();\n var destination = fillArrayVal(Array(size), null);\n var iterator = collection.t();\n var index = 0;\n while (iterator.u()) {\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n destination[tmp0] = iterator.w();\n }\n return destination;\n }\n function emptyList() {\n return EmptyList_getInstance();\n }\n function listOfNotNull(element) {\n return !(element == null) ? listOf(element) : emptyList();\n }\n function mutableListOf(elements) {\n return elements.length === 0 ? ArrayList_init_$Create$() : ArrayList_init_$Create$_1(new ArrayAsCollection(elements, true));\n }\n function listOf_0(elements) {\n return elements.length > 0 ? asList(elements) : emptyList();\n }\n function EmptyList() {\n EmptyList_instance = this;\n this.he_1 = new Long(-1478467534, -1720727600);\n }\n protoOf(EmptyList).equals = function (other) {\n var tmp;\n if (!(other == null) ? isInterface(other, List) : false) {\n tmp = other.b1();\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(EmptyList).hashCode = function () {\n return 1;\n };\n protoOf(EmptyList).toString = function () {\n return '[]';\n };\n protoOf(EmptyList).n = function () {\n return 0;\n };\n protoOf(EmptyList).b1 = function () {\n return true;\n };\n protoOf(EmptyList).ie = function (element) {\n return false;\n };\n protoOf(EmptyList).p = function (element) {\n if (!false)\n return false;\n var tmp;\n if (false) {\n tmp = element;\n } else {\n tmp = THROW_CCE();\n }\n return this.ie(tmp);\n };\n protoOf(EmptyList).je = function (elements) {\n return elements.b1();\n };\n protoOf(EmptyList).a1 = function (elements) {\n return this.je(elements);\n };\n protoOf(EmptyList).f1 = function (index) {\n throw IndexOutOfBoundsException_init_$Create$_0(\"Empty list doesn't contain element at index \" + index + '.');\n };\n protoOf(EmptyList).ke = function (element) {\n return -1;\n };\n protoOf(EmptyList).a2 = function (element) {\n if (!false)\n return -1;\n var tmp;\n if (false) {\n tmp = element;\n } else {\n tmp = THROW_CCE();\n }\n return this.ke(tmp);\n };\n protoOf(EmptyList).t = function () {\n return EmptyIterator_instance;\n };\n protoOf(EmptyList).d2 = function (index) {\n if (!(index === 0))\n throw IndexOutOfBoundsException_init_$Create$_0('Index: ' + index);\n return EmptyIterator_instance;\n };\n var EmptyList_instance;\n function EmptyList_getInstance() {\n if (EmptyList_instance == null)\n new EmptyList();\n return EmptyList_instance;\n }\n function ArrayAsCollection(values, isVarargs) {\n this.le_1 = values;\n this.me_1 = isVarargs;\n }\n protoOf(ArrayAsCollection).n = function () {\n return this.le_1.length;\n };\n protoOf(ArrayAsCollection).b1 = function () {\n // Inline function 'kotlin.collections.isEmpty' call\n return this.le_1.length === 0;\n };\n protoOf(ArrayAsCollection).ne = function (element) {\n return contains_0(this.le_1, element);\n };\n protoOf(ArrayAsCollection).p = function (element) {\n if (!(element == null ? true : !(element == null)))\n return false;\n return this.ne((element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n protoOf(ArrayAsCollection).oe = function (elements) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var tmp;\n if (isInterface(elements, Collection)) {\n tmp = elements.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = elements.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.ArrayAsCollection.containsAll.' call\n if (!this.ne(element)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n };\n protoOf(ArrayAsCollection).a1 = function (elements) {\n return this.oe(elements);\n };\n protoOf(ArrayAsCollection).t = function () {\n return arrayIterator(this.le_1);\n };\n function EmptyIterator() {\n }\n protoOf(EmptyIterator).u = function () {\n return false;\n };\n protoOf(EmptyIterator).o1 = function () {\n return false;\n };\n protoOf(EmptyIterator).p1 = function () {\n return 0;\n };\n protoOf(EmptyIterator).w = function () {\n throw NoSuchElementException_init_$Create$();\n };\n protoOf(EmptyIterator).q1 = function () {\n throw NoSuchElementException_init_$Create$();\n };\n var EmptyIterator_instance;\n function EmptyIterator_getInstance() {\n return EmptyIterator_instance;\n }\n function get_lastIndex_2(_this__u8e3s4) {\n return _this__u8e3s4.n() - 1 | 0;\n }\n function optimizeReadOnlyList(_this__u8e3s4) {\n switch (_this__u8e3s4.n()) {\n case 0:\n return emptyList();\n case 1:\n return listOf(_this__u8e3s4.f1(0));\n default:\n return _this__u8e3s4;\n }\n }\n function arrayListOf(elements) {\n return elements.length === 0 ? ArrayList_init_$Create$() : ArrayList_init_$Create$_1(new ArrayAsCollection(elements, true));\n }\n function throwIndexOverflow() {\n throw ArithmeticException_init_$Create$_0('Index overflow has happened.');\n }\n function asCollection(_this__u8e3s4) {\n return new ArrayAsCollection(_this__u8e3s4, false);\n }\n function get_indices_1(_this__u8e3s4) {\n return numberRangeToNumber(0, _this__u8e3s4.n() - 1 | 0);\n }\n function IndexedValue(index, value) {\n this.pe_1 = index;\n this.qe_1 = value;\n }\n protoOf(IndexedValue).toString = function () {\n return 'IndexedValue(index=' + this.pe_1 + ', value=' + this.qe_1 + ')';\n };\n protoOf(IndexedValue).hashCode = function () {\n var result = this.pe_1;\n result = imul(result, 31) + (this.qe_1 == null ? 0 : hashCode(this.qe_1)) | 0;\n return result;\n };\n protoOf(IndexedValue).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof IndexedValue))\n return false;\n var tmp0_other_with_cast = other instanceof IndexedValue ? other : THROW_CCE();\n if (!(this.pe_1 === tmp0_other_with_cast.pe_1))\n return false;\n if (!equals_0(this.qe_1, tmp0_other_with_cast.qe_1))\n return false;\n return true;\n };\n function flatten_0(_this__u8e3s4) {\n var result = ArrayList_init_$Create$();\n var tmp0_iterator = _this__u8e3s4.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n addAll_0(result, element);\n }\n return result;\n }\n function collectionSizeOrDefault(_this__u8e3s4, default_0) {\n var tmp;\n if (isInterface(_this__u8e3s4, Collection)) {\n tmp = _this__u8e3s4.n();\n } else {\n tmp = default_0;\n }\n return tmp;\n }\n function IndexingIterable(iteratorFactory) {\n this.re_1 = iteratorFactory;\n }\n protoOf(IndexingIterable).t = function () {\n return new IndexingIterator(this.re_1());\n };\n function collectionSizeOrNull(_this__u8e3s4) {\n var tmp;\n if (isInterface(_this__u8e3s4, Collection)) {\n tmp = _this__u8e3s4.n();\n } else {\n tmp = null;\n }\n return tmp;\n }\n function IndexingIterator(iterator) {\n this.se_1 = iterator;\n this.te_1 = 0;\n }\n protoOf(IndexingIterator).u = function () {\n return this.se_1.u();\n };\n protoOf(IndexingIterator).w = function () {\n var tmp1 = this.te_1;\n this.te_1 = tmp1 + 1 | 0;\n return new IndexedValue(checkIndexOverflow(tmp1), this.se_1.w());\n };\n function getOrImplicitDefault(_this__u8e3s4, key) {\n if (isInterface(_this__u8e3s4, MapWithDefault))\n return _this__u8e3s4.ue(key);\n var tmp$ret$0;\n $l$block: {\n // Inline function 'kotlin.collections.getOrElseNullable' call\n var value = _this__u8e3s4.b3(key);\n if (value == null ? !_this__u8e3s4.y2(key) : false) {\n throw NoSuchElementException_init_$Create$_0('Key ' + key + ' is missing in the map.');\n } else {\n tmp$ret$0 = (value == null ? true : !(value == null)) ? value : THROW_CCE();\n break $l$block;\n }\n }\n return tmp$ret$0;\n }\n function MapWithDefault() {\n }\n function mapOf_0(pairs) {\n return pairs.length > 0 ? toMap_0(pairs, LinkedHashMap_init_$Create$_0(mapCapacity(pairs.length))) : emptyMap();\n }\n function emptyMap() {\n var tmp = EmptyMap_getInstance();\n return isInterface(tmp, Map_0) ? tmp : THROW_CCE();\n }\n function getValue(_this__u8e3s4, key) {\n return getOrImplicitDefault(_this__u8e3s4, key);\n }\n function toMap(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection)) {\n var tmp;\n switch (_this__u8e3s4.n()) {\n case 0:\n tmp = emptyMap();\n break;\n case 1:\n var tmp_0;\n if (isInterface(_this__u8e3s4, List)) {\n tmp_0 = _this__u8e3s4.f1(0);\n } else {\n tmp_0 = _this__u8e3s4.t().w();\n }\n\n tmp = mapOf(tmp_0);\n break;\n default:\n tmp = toMap_1(_this__u8e3s4, LinkedHashMap_init_$Create$_0(mapCapacity(_this__u8e3s4.n())));\n break;\n }\n return tmp;\n }\n return optimizeReadOnlyMap(toMap_1(_this__u8e3s4, LinkedHashMap_init_$Create$()));\n }\n function toMutableMap(_this__u8e3s4) {\n return LinkedHashMap_init_$Create$_1(_this__u8e3s4);\n }\n function plus_6(_this__u8e3s4, map) {\n // Inline function 'kotlin.apply' call\n var this_0 = LinkedHashMap_init_$Create$_1(_this__u8e3s4);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.plus.' call\n this_0.s2(map);\n return this_0;\n }\n function toMap_0(_this__u8e3s4, destination) {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.toMap.' call\n putAll(destination, _this__u8e3s4);\n return destination;\n }\n function EmptyMap() {\n EmptyMap_instance = this;\n this.ve_1 = new Long(-888910638, 1920087921);\n }\n protoOf(EmptyMap).equals = function (other) {\n var tmp;\n if (!(other == null) ? isInterface(other, Map_0) : false) {\n tmp = other.b1();\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(EmptyMap).hashCode = function () {\n return 0;\n };\n protoOf(EmptyMap).toString = function () {\n return '{}';\n };\n protoOf(EmptyMap).n = function () {\n return 0;\n };\n protoOf(EmptyMap).b1 = function () {\n return true;\n };\n protoOf(EmptyMap).we = function (key) {\n return false;\n };\n protoOf(EmptyMap).y2 = function (key) {\n if (!(key == null ? true : !(key == null)))\n return false;\n return this.we((key == null ? true : !(key == null)) ? key : THROW_CCE());\n };\n protoOf(EmptyMap).xe = function (key) {\n return null;\n };\n protoOf(EmptyMap).b3 = function (key) {\n if (!(key == null ? true : !(key == null)))\n return null;\n return this.xe((key == null ? true : !(key == null)) ? key : THROW_CCE());\n };\n protoOf(EmptyMap).q2 = function () {\n return EmptySet_getInstance();\n };\n protoOf(EmptyMap).o2 = function () {\n return EmptySet_getInstance();\n };\n protoOf(EmptyMap).p2 = function () {\n return EmptyList_getInstance();\n };\n var EmptyMap_instance;\n function EmptyMap_getInstance() {\n if (EmptyMap_instance == null)\n new EmptyMap();\n return EmptyMap_instance;\n }\n function toMap_1(_this__u8e3s4, destination) {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.toMap.' call\n putAll_0(destination, _this__u8e3s4);\n return destination;\n }\n function optimizeReadOnlyMap(_this__u8e3s4) {\n var tmp;\n switch (_this__u8e3s4.n()) {\n case 0:\n tmp = emptyMap();\n break;\n case 1:\n // Inline function 'kotlin.collections.toSingletonMapOrSelf' call\n\n tmp = _this__u8e3s4;\n break;\n default:\n tmp = _this__u8e3s4;\n break;\n }\n return tmp;\n }\n function putAll(_this__u8e3s4, pairs) {\n var inductionVariable = 0;\n var last = pairs.length;\n while (inductionVariable < last) {\n var tmp1_loop_parameter = pairs[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var key = tmp1_loop_parameter.af();\n var value = tmp1_loop_parameter.bf();\n _this__u8e3s4.r2(key, value);\n }\n }\n function putAll_0(_this__u8e3s4, pairs) {\n var tmp0_iterator = pairs.t();\n while (tmp0_iterator.u()) {\n var tmp1_loop_parameter = tmp0_iterator.w();\n var key = tmp1_loop_parameter.af();\n var value = tmp1_loop_parameter.bf();\n _this__u8e3s4.r2(key, value);\n }\n }\n function hashMapOf(pairs) {\n // Inline function 'kotlin.apply' call\n var this_0 = HashMap_init_$Create$_0(mapCapacity(pairs.length));\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.hashMapOf.' call\n putAll(this_0, pairs);\n return this_0;\n }\n function addAll(_this__u8e3s4, elements) {\n return _this__u8e3s4.x(asList(elements));\n }\n function removeFirst(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4.b1()) {\n throw NoSuchElementException_init_$Create$_0('List is empty.');\n } else {\n tmp = _this__u8e3s4.h1(0);\n }\n return tmp;\n }\n function removeAll(_this__u8e3s4, predicate) {\n return filterInPlace(_this__u8e3s4, predicate, true);\n }\n function filterInPlace(_this__u8e3s4, predicate, predicateResultToRemove) {\n if (!isInterface(_this__u8e3s4, RandomAccess)) {\n return filterInPlace_0(isInterface(_this__u8e3s4, MutableIterable) ? _this__u8e3s4 : THROW_CCE(), predicate, predicateResultToRemove);\n }\n var writeIndex = 0;\n var inductionVariable = 0;\n var last = get_lastIndex_2(_this__u8e3s4);\n if (inductionVariable <= last)\n $l$loop: do {\n var readIndex = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var element = _this__u8e3s4.f1(readIndex);\n if (predicate(element) === predicateResultToRemove)\n continue $l$loop;\n if (!(writeIndex === readIndex)) {\n _this__u8e3s4.o(writeIndex, element);\n }\n writeIndex = writeIndex + 1 | 0;\n }\n while (!(readIndex === last));\n if (writeIndex < _this__u8e3s4.n()) {\n var inductionVariable_0 = get_lastIndex_2(_this__u8e3s4);\n var last_0 = writeIndex;\n if (last_0 <= inductionVariable_0)\n do {\n var removeIndex = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + -1 | 0;\n _this__u8e3s4.h1(removeIndex);\n }\n while (!(removeIndex === last_0));\n return true;\n } else {\n return false;\n }\n }\n function filterInPlace_0(_this__u8e3s4, predicate, predicateResultToRemove) {\n var result = false;\n // Inline function 'kotlin.with' call\n // Inline function 'kotlin.contracts.contract' call\n var $this$with = _this__u8e3s4.t();\n while ($this$with.u())\n if (predicate($this$with.w()) === predicateResultToRemove) {\n $this$with.v();\n result = true;\n }\n return result;\n }\n function addAll_0(_this__u8e3s4, elements) {\n if (isInterface(elements, Collection))\n return _this__u8e3s4.x(elements);\n else {\n var result = false;\n var tmp1_iterator = elements.t();\n while (tmp1_iterator.u()) {\n var item = tmp1_iterator.w();\n if (_this__u8e3s4.q(item))\n result = true;\n }\n return result;\n }\n }\n function addAll_1(_this__u8e3s4, elements) {\n var result = false;\n var tmp0_iterator = elements.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n if (_this__u8e3s4.q(item))\n result = true;\n }\n return result;\n }\n function removeAll_0(_this__u8e3s4, elements) {\n return _this__u8e3s4.y(convertToListIfNotCollection(elements));\n }\n function convertToListIfNotCollection(_this__u8e3s4) {\n var tmp;\n if (isInterface(_this__u8e3s4, Collection)) {\n tmp = _this__u8e3s4;\n } else {\n tmp = toList_0(_this__u8e3s4);\n }\n return tmp;\n }\n function removeAll_1(_this__u8e3s4, predicate) {\n return filterInPlace_0(_this__u8e3s4, predicate, true);\n }\n function removeLast(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4.b1()) {\n throw NoSuchElementException_init_$Create$_0('List is empty.');\n } else {\n tmp = _this__u8e3s4.h1(get_lastIndex_2(_this__u8e3s4));\n }\n return tmp;\n }\n function IntIterator() {\n }\n protoOf(IntIterator).w = function () {\n return this.cf();\n };\n function Sequence() {\n }\n function sequence(block) {\n // Inline function 'kotlin.sequences.Sequence' call\n return new _no_name_provided__qut3iv_4(block);\n }\n function SequenceScope() {\n }\n protoOf(SequenceScope).ff = function (sequence, $completion) {\n return this.ef(sequence.t(), $completion);\n };\n function iterator(block) {\n var iterator = new SequenceBuilderIterator();\n iterator.jf_1 = createCoroutineUnintercepted(block, iterator, iterator);\n return iterator;\n }\n function nextNotReady($this) {\n if (!$this.u())\n throw NoSuchElementException_init_$Create$();\n else\n return $this.w();\n }\n function exceptionalState($this) {\n switch ($this.gf_1) {\n case 4:\n return NoSuchElementException_init_$Create$();\n case 5:\n return IllegalStateException_init_$Create$_0('Iterator has failed.');\n default:\n return IllegalStateException_init_$Create$_0('Unexpected state of the iterator: ' + $this.gf_1);\n }\n }\n function SequenceBuilderIterator() {\n SequenceScope.call(this);\n this.gf_1 = 0;\n this.hf_1 = null;\n this.if_1 = null;\n this.jf_1 = null;\n }\n protoOf(SequenceBuilderIterator).u = function () {\n while (true) {\n switch (this.gf_1) {\n case 0:\n break;\n case 1:\n if (ensureNotNull(this.if_1).u()) {\n this.gf_1 = 2;\n return true;\n } else {\n this.if_1 = null;\n }\n\n break;\n case 4:\n return false;\n case 3:\n case 2:\n return true;\n default:\n throw exceptionalState(this);\n }\n this.gf_1 = 5;\n var step = ensureNotNull(this.jf_1);\n this.jf_1 = null;\n // Inline function 'kotlin.coroutines.resume' call\n // Inline function 'kotlin.Companion.success' call\n var tmp$ret$0 = _Result___init__impl__xyqfz8(Unit_instance);\n step.zc(tmp$ret$0);\n }\n };\n protoOf(SequenceBuilderIterator).w = function () {\n switch (this.gf_1) {\n case 0:\n case 1:\n return nextNotReady(this);\n case 2:\n this.gf_1 = 1;\n return ensureNotNull(this.if_1).w();\n case 3:\n this.gf_1 = 0;\n var tmp = this.hf_1;\n var result = (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n this.hf_1 = null;\n return result;\n default:\n throw exceptionalState(this);\n }\n };\n protoOf(SequenceBuilderIterator).df = function (value, $completion) {\n this.hf_1 = value;\n this.gf_1 = 3;\n // Inline function 'kotlin.sequences.SequenceBuilderIterator.yield.' call\n this.jf_1 = $completion;\n return get_COROUTINE_SUSPENDED();\n };\n protoOf(SequenceBuilderIterator).ef = function (iterator, $completion) {\n if (!iterator.u())\n return Unit_instance;\n this.if_1 = iterator;\n this.gf_1 = 2;\n // Inline function 'kotlin.sequences.SequenceBuilderIterator.yieldAll.' call\n this.jf_1 = $completion;\n return get_COROUTINE_SUSPENDED();\n };\n protoOf(SequenceBuilderIterator).kf = function (result) {\n // Inline function 'kotlin.getOrThrow' call\n throwOnFailure(result);\n var tmp = _Result___get_value__impl__bjfvqg(result);\n (tmp == null ? true : !(tmp == null)) || THROW_CCE();\n this.gf_1 = 4;\n };\n protoOf(SequenceBuilderIterator).zc = function (result) {\n return this.kf(result);\n };\n protoOf(SequenceBuilderIterator).uc = function () {\n return EmptyCoroutineContext_getInstance();\n };\n function _no_name_provided__qut3iv_4($block) {\n this.lf_1 = $block;\n }\n protoOf(_no_name_provided__qut3iv_4).t = function () {\n // Inline function 'kotlin.sequences.sequence.' call\n return iterator(this.lf_1);\n };\n function asSequence_1(_this__u8e3s4) {\n // Inline function 'kotlin.sequences.Sequence' call\n var tmp$ret$0 = new _no_name_provided__qut3iv_5(_this__u8e3s4);\n return constrainOnce(tmp$ret$0);\n }\n function sequenceOf(elements) {\n var tmp;\n // Inline function 'kotlin.collections.isEmpty' call\n if (elements.length === 0) {\n tmp = emptySequence();\n } else {\n tmp = asSequence(elements);\n }\n return tmp;\n }\n function flatten_1(_this__u8e3s4) {\n return flatten_2(_this__u8e3s4, flatten$lambda);\n }\n function emptySequence() {\n return EmptySequence_instance;\n }\n function TransformingSequence$iterator$1(this$0) {\n this.nf_1 = this$0;\n this.mf_1 = this$0.of_1.t();\n }\n protoOf(TransformingSequence$iterator$1).w = function () {\n return this.nf_1.pf_1(this.mf_1.w());\n };\n protoOf(TransformingSequence$iterator$1).u = function () {\n return this.mf_1.u();\n };\n function TransformingSequence(sequence, transformer) {\n this.of_1 = sequence;\n this.pf_1 = transformer;\n }\n protoOf(TransformingSequence).t = function () {\n return new TransformingSequence$iterator$1(this);\n };\n protoOf(TransformingSequence).qf = function (iterator) {\n return new FlatteningSequence(this.of_1, this.pf_1, iterator);\n };\n function calcNext($this) {\n while ($this.rf_1.u()) {\n var item = $this.rf_1.w();\n if ($this.uf_1.xf_1(item) === $this.uf_1.wf_1) {\n $this.tf_1 = item;\n $this.sf_1 = 1;\n return Unit_instance;\n }\n }\n $this.sf_1 = 0;\n }\n function FilteringSequence$iterator$1(this$0) {\n this.uf_1 = this$0;\n this.rf_1 = this$0.vf_1.t();\n this.sf_1 = -1;\n this.tf_1 = null;\n }\n protoOf(FilteringSequence$iterator$1).w = function () {\n if (this.sf_1 === -1) {\n calcNext(this);\n }\n if (this.sf_1 === 0)\n throw NoSuchElementException_init_$Create$();\n var result = this.tf_1;\n this.tf_1 = null;\n this.sf_1 = -1;\n return (result == null ? true : !(result == null)) ? result : THROW_CCE();\n };\n protoOf(FilteringSequence$iterator$1).u = function () {\n if (this.sf_1 === -1) {\n calcNext(this);\n }\n return this.sf_1 === 1;\n };\n function FilteringSequence(sequence, sendWhen, predicate) {\n sendWhen = sendWhen === VOID ? true : sendWhen;\n this.vf_1 = sequence;\n this.wf_1 = sendWhen;\n this.xf_1 = predicate;\n }\n protoOf(FilteringSequence).t = function () {\n return new FilteringSequence$iterator$1(this);\n };\n function ensureItemIterator($this) {\n var tmp0_safe_receiver = $this.zf_1;\n if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u()) === false)\n $this.zf_1 = null;\n while ($this.zf_1 == null) {\n if (!$this.yf_1.u()) {\n return false;\n } else {\n var element = $this.yf_1.w();\n var nextItemIterator = $this.ag_1.dg_1($this.ag_1.cg_1(element));\n if (nextItemIterator.u()) {\n $this.zf_1 = nextItemIterator;\n return true;\n }\n }\n }\n return true;\n }\n function FlatteningSequence$iterator$1(this$0) {\n this.ag_1 = this$0;\n this.yf_1 = this$0.bg_1.t();\n this.zf_1 = null;\n }\n protoOf(FlatteningSequence$iterator$1).w = function () {\n if (!ensureItemIterator(this))\n throw NoSuchElementException_init_$Create$();\n return ensureNotNull(this.zf_1).w();\n };\n protoOf(FlatteningSequence$iterator$1).u = function () {\n return ensureItemIterator(this);\n };\n function FlatteningSequence(sequence, transformer, iterator) {\n this.bg_1 = sequence;\n this.cg_1 = transformer;\n this.dg_1 = iterator;\n }\n protoOf(FlatteningSequence).t = function () {\n return new FlatteningSequence$iterator$1(this);\n };\n function DistinctSequence(source, keySelector) {\n this.eg_1 = source;\n this.fg_1 = keySelector;\n }\n protoOf(DistinctSequence).t = function () {\n return new DistinctIterator(this.eg_1.t(), this.fg_1);\n };\n function constrainOnce(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4 instanceof ConstrainedOnceSequence) {\n tmp = _this__u8e3s4;\n } else {\n tmp = new ConstrainedOnceSequence(_this__u8e3s4);\n }\n return tmp;\n }\n function flatten_2(_this__u8e3s4, iterator) {\n if (_this__u8e3s4 instanceof TransformingSequence) {\n return (_this__u8e3s4 instanceof TransformingSequence ? _this__u8e3s4 : THROW_CCE()).qf(iterator);\n }\n return new FlatteningSequence(_this__u8e3s4, flatten$lambda_0, iterator);\n }\n function EmptySequence() {\n }\n protoOf(EmptySequence).t = function () {\n return EmptyIterator_instance;\n };\n var EmptySequence_instance;\n function EmptySequence_getInstance() {\n return EmptySequence_instance;\n }\n function DistinctIterator(source, keySelector) {\n AbstractIterator.call(this);\n this.ig_1 = source;\n this.jg_1 = keySelector;\n this.kg_1 = HashSet_init_$Create$();\n }\n protoOf(DistinctIterator).qd = function () {\n while (this.ig_1.u()) {\n var next = this.ig_1.w();\n var key = this.jg_1(next);\n if (this.kg_1.q(key)) {\n this.rd(next);\n return Unit_instance;\n }\n }\n this.sd();\n };\n function generateSequence(seedFunction, nextFunction) {\n return new GeneratorSequence(seedFunction, nextFunction);\n }\n function calcNext_0($this) {\n $this.lg_1 = $this.mg_1 === -2 ? $this.ng_1.og_1() : $this.ng_1.pg_1(ensureNotNull($this.lg_1));\n $this.mg_1 = $this.lg_1 == null ? 0 : 1;\n }\n function GeneratorSequence$iterator$1(this$0) {\n this.ng_1 = this$0;\n this.lg_1 = null;\n this.mg_1 = -2;\n }\n protoOf(GeneratorSequence$iterator$1).w = function () {\n if (this.mg_1 < 0) {\n calcNext_0(this);\n }\n if (this.mg_1 === 0)\n throw NoSuchElementException_init_$Create$();\n var tmp = this.lg_1;\n var result = !(tmp == null) ? tmp : THROW_CCE();\n this.mg_1 = -1;\n return result;\n };\n protoOf(GeneratorSequence$iterator$1).u = function () {\n if (this.mg_1 < 0) {\n calcNext_0(this);\n }\n return this.mg_1 === 1;\n };\n function GeneratorSequence(getInitialValue, getNextValue) {\n this.og_1 = getInitialValue;\n this.pg_1 = getNextValue;\n }\n protoOf(GeneratorSequence).t = function () {\n return new GeneratorSequence$iterator$1(this);\n };\n function _no_name_provided__qut3iv_5($this_asSequence) {\n this.qg_1 = $this_asSequence;\n }\n protoOf(_no_name_provided__qut3iv_5).t = function () {\n // Inline function 'kotlin.sequences.asSequence.' call\n return this.qg_1;\n };\n function flatten$lambda(it) {\n return it.t();\n }\n function flatten$lambda_0(it) {\n return it;\n }\n function setOf_0(elements) {\n return elements.length > 0 ? toSet(elements) : emptySet();\n }\n function EmptySet() {\n EmptySet_instance = this;\n this.rg_1 = new Long(1993859828, 793161749);\n }\n protoOf(EmptySet).equals = function (other) {\n var tmp;\n if (!(other == null) ? isInterface(other, Set) : false) {\n tmp = other.b1();\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(EmptySet).hashCode = function () {\n return 0;\n };\n protoOf(EmptySet).toString = function () {\n return '[]';\n };\n protoOf(EmptySet).n = function () {\n return 0;\n };\n protoOf(EmptySet).b1 = function () {\n return true;\n };\n protoOf(EmptySet).ie = function (element) {\n return false;\n };\n protoOf(EmptySet).p = function (element) {\n if (!false)\n return false;\n var tmp;\n if (false) {\n tmp = element;\n } else {\n tmp = THROW_CCE();\n }\n return this.ie(tmp);\n };\n protoOf(EmptySet).je = function (elements) {\n return elements.b1();\n };\n protoOf(EmptySet).a1 = function (elements) {\n return this.je(elements);\n };\n protoOf(EmptySet).t = function () {\n return EmptyIterator_instance;\n };\n var EmptySet_instance;\n function EmptySet_getInstance() {\n if (EmptySet_instance == null)\n new EmptySet();\n return EmptySet_instance;\n }\n function emptySet() {\n return EmptySet_getInstance();\n }\n function optimizeReadOnlySet(_this__u8e3s4) {\n switch (_this__u8e3s4.n()) {\n case 0:\n return emptySet();\n case 1:\n return setOf(_this__u8e3s4.t().w());\n default:\n return _this__u8e3s4;\n }\n }\n function hashSetOf(elements) {\n return toCollection(elements, HashSet_init_$Create$_1(mapCapacity(elements.length)));\n }\n function naturalOrder() {\n var tmp = NaturalOrderComparator_instance;\n return isInterface(tmp, Comparator) ? tmp : THROW_CCE();\n }\n function NaturalOrderComparator() {\n }\n protoOf(NaturalOrderComparator).sg = function (a, b) {\n return compareTo_0(a, b);\n };\n protoOf(NaturalOrderComparator).compare = function (a, b) {\n var tmp = (!(a == null) ? isComparable(a) : false) ? a : THROW_CCE();\n return this.sg(tmp, (!(b == null) ? isComparable(b) : false) ? b : THROW_CCE());\n };\n var NaturalOrderComparator_instance;\n function NaturalOrderComparator_getInstance() {\n return NaturalOrderComparator_instance;\n }\n function compareValues(a, b) {\n if (a === b)\n return 0;\n if (a == null)\n return -1;\n if (b == null)\n return 1;\n return compareTo_0((!(a == null) ? isComparable(a) : false) ? a : THROW_CCE(), b);\n }\n function Continuation() {\n }\n function Key() {\n }\n var Key_instance;\n function Key_getInstance() {\n return Key_instance;\n }\n function ContinuationInterceptor() {\n }\n function EmptyCoroutineContext() {\n EmptyCoroutineContext_instance = this;\n this.tg_1 = new Long(0, 0);\n }\n protoOf(EmptyCoroutineContext).vc = function (key) {\n return null;\n };\n protoOf(EmptyCoroutineContext).hashCode = function () {\n return 0;\n };\n protoOf(EmptyCoroutineContext).toString = function () {\n return 'EmptyCoroutineContext';\n };\n var EmptyCoroutineContext_instance;\n function EmptyCoroutineContext_getInstance() {\n if (EmptyCoroutineContext_instance == null)\n new EmptyCoroutineContext();\n return EmptyCoroutineContext_instance;\n }\n function get_COROUTINE_SUSPENDED() {\n return CoroutineSingletons_COROUTINE_SUSPENDED_getInstance();\n }\n var CoroutineSingletons_COROUTINE_SUSPENDED_instance;\n var CoroutineSingletons_UNDECIDED_instance;\n var CoroutineSingletons_RESUMED_instance;\n var CoroutineSingletons_entriesInitialized;\n function CoroutineSingletons_initEntries() {\n if (CoroutineSingletons_entriesInitialized)\n return Unit_instance;\n CoroutineSingletons_entriesInitialized = true;\n CoroutineSingletons_COROUTINE_SUSPENDED_instance = new CoroutineSingletons('COROUTINE_SUSPENDED', 0);\n CoroutineSingletons_UNDECIDED_instance = new CoroutineSingletons('UNDECIDED', 1);\n CoroutineSingletons_RESUMED_instance = new CoroutineSingletons('RESUMED', 2);\n }\n function CoroutineSingletons(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function CoroutineSingletons_COROUTINE_SUSPENDED_getInstance() {\n CoroutineSingletons_initEntries();\n return CoroutineSingletons_COROUTINE_SUSPENDED_instance;\n }\n function enumEntries(entries) {\n return new EnumEntriesList(entries);\n }\n function EnumEntriesList(entries) {\n AbstractList.call(this);\n this.ug_1 = entries;\n }\n protoOf(EnumEntriesList).n = function () {\n return this.ug_1.length;\n };\n protoOf(EnumEntriesList).f1 = function (index) {\n Companion_instance_5.x1(index, this.ug_1.length);\n return this.ug_1[index];\n };\n protoOf(EnumEntriesList).vg = function (element) {\n if (element === null)\n return false;\n var target = getOrNull(this.ug_1, element.x9_1);\n return target === element;\n };\n protoOf(EnumEntriesList).p = function (element) {\n if (!(element instanceof Enum))\n return false;\n return this.vg(element instanceof Enum ? element : THROW_CCE());\n };\n protoOf(EnumEntriesList).wg = function (element) {\n if (element === null)\n return -1;\n var ordinal = element.x9_1;\n var target = getOrNull(this.ug_1, ordinal);\n return target === element ? ordinal : -1;\n };\n protoOf(EnumEntriesList).a2 = function (element) {\n if (!(element instanceof Enum))\n return -1;\n return this.wg(element instanceof Enum ? element : THROW_CCE());\n };\n function getProgressionLastElement(start, end, step) {\n var tmp;\n if (step > 0) {\n tmp = start >= end ? end : end - differenceModulo(end, start, step) | 0;\n } else if (step < 0) {\n tmp = start <= end ? end : end + differenceModulo(start, end, -step | 0) | 0;\n } else {\n throw IllegalArgumentException_init_$Create$_0('Step is zero.');\n }\n return tmp;\n }\n function differenceModulo(a, b, c) {\n return mod(mod(a, c) - mod(b, c) | 0, c);\n }\n function mod(a, b) {\n var mod = a % b | 0;\n return mod >= 0 ? mod : mod + b | 0;\n }\n function Default() {\n Default_instance = this;\n Random.call(this);\n this.xg_1 = defaultPlatformRandom();\n }\n protoOf(Default).yg = function (bitCount) {\n return this.xg_1.yg(bitCount);\n };\n protoOf(Default).zg = function () {\n return this.xg_1.zg();\n };\n protoOf(Default).ah = function (until) {\n return this.xg_1.ah(until);\n };\n protoOf(Default).bh = function (from, until) {\n return this.xg_1.bh(from, until);\n };\n var Default_instance;\n function Default_getInstance() {\n if (Default_instance == null)\n new Default();\n return Default_instance;\n }\n function Random() {\n Default_getInstance();\n }\n protoOf(Random).zg = function () {\n return doubleFromParts(this.yg(26), this.yg(27));\n };\n protoOf(Random).ah = function (until) {\n return this.bh(0.0, until);\n };\n protoOf(Random).bh = function (from, until) {\n checkRangeBounds(from, until);\n var size = until - from;\n var tmp;\n if ((isInfinite(size) ? isFinite(from) : false) ? isFinite(until) : false) {\n var r1 = this.zg() * (until / 2 - from / 2);\n tmp = from + r1 + r1;\n } else {\n tmp = from + this.zg() * size;\n }\n var r = tmp;\n return r >= until ? nextDown(until) : r;\n };\n function Random_0(seed) {\n return XorWowRandom_init_$Create$(seed, seed >> 31);\n }\n function checkRangeBounds(from, until) {\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n if (!(until > from)) {\n // Inline function 'kotlin.random.checkRangeBounds.' call\n var message = boundsErrorMessage(from, until);\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n return tmp;\n }\n function boundsErrorMessage(from, until) {\n return 'Random range is empty: [' + toString_1(from) + ', ' + toString_1(until) + ').';\n }\n function takeUpperBits(_this__u8e3s4, bitCount) {\n return (_this__u8e3s4 >>> (32 - bitCount | 0) | 0) & (-bitCount | 0) >> 31;\n }\n function XorWowRandom_init_$Init$(seed1, seed2, $this) {\n XorWowRandom.call($this, seed1, seed2, 0, 0, ~seed1, seed1 << 10 ^ (seed2 >>> 4 | 0));\n return $this;\n }\n function XorWowRandom_init_$Create$(seed1, seed2) {\n return XorWowRandom_init_$Init$(seed1, seed2, objectCreate(protoOf(XorWowRandom)));\n }\n function Companion_8() {\n Companion_instance_8 = this;\n this.ch_1 = new Long(0, 0);\n }\n var Companion_instance_8;\n function Companion_getInstance_8() {\n if (Companion_instance_8 == null)\n new Companion_8();\n return Companion_instance_8;\n }\n function XorWowRandom(x, y, z, w, v, addend) {\n Companion_getInstance_8();\n Random.call(this);\n this.dh_1 = x;\n this.eh_1 = y;\n this.fh_1 = z;\n this.gh_1 = w;\n this.hh_1 = v;\n this.ih_1 = addend;\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!!((this.dh_1 | this.eh_1 | this.fh_1 | this.gh_1 | this.hh_1) === 0)) {\n // Inline function 'kotlin.random.XorWowRandom.' call\n var message = 'Initial state must have at least one non-zero element.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n // Inline function 'kotlin.repeat' call\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable = 0;\n if (inductionVariable < 64)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.random.XorWowRandom.' call\n this.cf();\n }\n while (inductionVariable < 64);\n }\n protoOf(XorWowRandom).cf = function () {\n var t = this.dh_1;\n t = t ^ (t >>> 2 | 0);\n this.dh_1 = this.eh_1;\n this.eh_1 = this.fh_1;\n this.fh_1 = this.gh_1;\n var v0 = this.hh_1;\n this.gh_1 = v0;\n t = t ^ t << 1 ^ v0 ^ v0 << 4;\n this.hh_1 = t;\n this.ih_1 = this.ih_1 + 362437 | 0;\n return t + this.ih_1 | 0;\n };\n protoOf(XorWowRandom).yg = function (bitCount) {\n return takeUpperBits(this.cf(), bitCount);\n };\n function Companion_9() {\n Companion_instance_9 = this;\n this.qa_1 = new IntRange(1, 0);\n }\n var Companion_instance_9;\n function Companion_getInstance_9() {\n if (Companion_instance_9 == null)\n new Companion_9();\n return Companion_instance_9;\n }\n function IntRange(start, endInclusive) {\n Companion_getInstance_9();\n IntProgression.call(this, start, endInclusive, 1);\n }\n protoOf(IntRange).s9 = function () {\n return this.ra_1;\n };\n protoOf(IntRange).r9 = function () {\n return this.sa_1;\n };\n protoOf(IntRange).jh = function (value) {\n return this.ra_1 <= value ? value <= this.sa_1 : false;\n };\n protoOf(IntRange).va = function (value) {\n return this.jh(typeof value === 'number' ? value : THROW_CCE());\n };\n protoOf(IntRange).b1 = function () {\n return this.ra_1 > this.sa_1;\n };\n protoOf(IntRange).equals = function (other) {\n var tmp;\n if (other instanceof IntRange) {\n tmp = (this.b1() ? other.b1() : false) ? true : this.ra_1 === other.ra_1 ? this.sa_1 === other.sa_1 : false;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(IntRange).hashCode = function () {\n return this.b1() ? -1 : imul(31, this.ra_1) + this.sa_1 | 0;\n };\n protoOf(IntRange).toString = function () {\n return '' + this.ra_1 + '..' + this.sa_1;\n };\n function IntProgressionIterator(first, last, step) {\n IntIterator.call(this);\n this.kh_1 = step;\n this.lh_1 = last;\n this.mh_1 = this.kh_1 > 0 ? first <= last : first >= last;\n this.nh_1 = this.mh_1 ? first : this.lh_1;\n }\n protoOf(IntProgressionIterator).u = function () {\n return this.mh_1;\n };\n protoOf(IntProgressionIterator).cf = function () {\n var value = this.nh_1;\n if (value === this.lh_1) {\n if (!this.mh_1)\n throw NoSuchElementException_init_$Create$();\n this.mh_1 = false;\n } else {\n this.nh_1 = this.nh_1 + this.kh_1 | 0;\n }\n return value;\n };\n function Companion_10() {\n }\n protoOf(Companion_10).ua = function (rangeStart, rangeEnd, step) {\n return new IntProgression(rangeStart, rangeEnd, step);\n };\n var Companion_instance_10;\n function Companion_getInstance_10() {\n return Companion_instance_10;\n }\n function IntProgression(start, endInclusive, step) {\n if (step === 0)\n throw IllegalArgumentException_init_$Create$_0('Step must be non-zero.');\n if (step === IntCompanionObject_instance.MIN_VALUE)\n throw IllegalArgumentException_init_$Create$_0('Step must be greater than Int.MIN_VALUE to avoid overflow on negation.');\n this.ra_1 = start;\n this.sa_1 = getProgressionLastElement(start, endInclusive, step);\n this.ta_1 = step;\n }\n protoOf(IntProgression).t = function () {\n return new IntProgressionIterator(this.ra_1, this.sa_1, this.ta_1);\n };\n protoOf(IntProgression).b1 = function () {\n return this.ta_1 > 0 ? this.ra_1 > this.sa_1 : this.ra_1 < this.sa_1;\n };\n protoOf(IntProgression).equals = function (other) {\n var tmp;\n if (other instanceof IntProgression) {\n tmp = (this.b1() ? other.b1() : false) ? true : (this.ra_1 === other.ra_1 ? this.sa_1 === other.sa_1 : false) ? this.ta_1 === other.ta_1 : false;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(IntProgression).hashCode = function () {\n return this.b1() ? -1 : imul(31, imul(31, this.ra_1) + this.sa_1 | 0) + this.ta_1 | 0;\n };\n protoOf(IntProgression).toString = function () {\n return this.ta_1 > 0 ? '' + this.ra_1 + '..' + this.sa_1 + ' step ' + this.ta_1 : '' + this.ra_1 + ' downTo ' + this.sa_1 + ' step ' + (-this.ta_1 | 0);\n };\n function ClosedRange() {\n }\n function checkStepIsPositive(isPositive, step) {\n if (!isPositive)\n throw IllegalArgumentException_init_$Create$_0('Step must be positive, was: ' + toString_1(step) + '.');\n }\n function KTypeParameter() {\n }\n function appendElement(_this__u8e3s4, element, transform) {\n if (!(transform == null)) {\n _this__u8e3s4.f8(transform(element));\n } else {\n if (element == null ? true : isCharSequence(element)) {\n _this__u8e3s4.f8(element);\n } else {\n if (element instanceof Char) {\n _this__u8e3s4.z5(element.ab_1);\n } else {\n _this__u8e3s4.f8(toString_0(element));\n }\n }\n }\n }\n function equals_1(_this__u8e3s4, other, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (_this__u8e3s4 === other)\n return true;\n if (!ignoreCase)\n return false;\n var thisUpper = uppercaseChar(_this__u8e3s4);\n var otherUpper = uppercaseChar(other);\n var tmp;\n if (thisUpper === otherUpper) {\n tmp = true;\n } else {\n // Inline function 'kotlin.text.lowercaseChar' call\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = toString(thisUpper).toLowerCase();\n var tmp_0 = charSequenceGet(tmp$ret$2, 0);\n // Inline function 'kotlin.text.lowercaseChar' call\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$6 = toString(otherUpper).toLowerCase();\n tmp = tmp_0 === charSequenceGet(tmp$ret$6, 0);\n }\n return tmp;\n }\n function titlecase(_this__u8e3s4) {\n return titlecaseImpl(_this__u8e3s4);\n }\n function trimIndent(_this__u8e3s4) {\n return replaceIndent(_this__u8e3s4, '');\n }\n function replaceIndent(_this__u8e3s4, newIndent) {\n newIndent = newIndent === VOID ? '' : newIndent;\n var lines_0 = lines(_this__u8e3s4);\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = lines_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.text.isNotBlank' call\n if (!isBlank(element)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n var tmp$ret$3 = indentWidth(item);\n destination_0.q(tmp$ret$3);\n }\n var tmp0_elvis_lhs = minOrNull(destination_0);\n var minCommonIndent = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;\n // Inline function 'kotlin.text.reindent' call\n var resultSizeEstimate = _this__u8e3s4.length + imul(newIndent.length, lines_0.n()) | 0;\n var indentAddFunction = getIndentFunction(newIndent);\n var lastIndex = get_lastIndex_2(lines_0);\n // Inline function 'kotlin.collections.mapIndexedNotNull' call\n // Inline function 'kotlin.collections.mapIndexedNotNullTo' call\n var destination_1 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var tmp0_iterator_1 = lines_0.t();\n while (tmp0_iterator_1.u()) {\n var item_0 = tmp0_iterator_1.w();\n // Inline function 'kotlin.collections.mapIndexedNotNullTo.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n // Inline function 'kotlin.text.reindent.' call\n var index_0 = checkIndexOverflow(tmp1);\n var tmp;\n if ((index_0 === 0 ? true : index_0 === lastIndex) ? isBlank(item_0) : false) {\n tmp = null;\n } else {\n // Inline function 'kotlin.text.replaceIndent.' call\n var tmp0_safe_receiver = drop(item_0, minCommonIndent);\n var tmp_0;\n if (tmp0_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n tmp_0 = indentAddFunction(tmp0_safe_receiver);\n }\n var tmp1_elvis_lhs = tmp_0;\n tmp = tmp1_elvis_lhs == null ? item_0 : tmp1_elvis_lhs;\n }\n var tmp0_safe_receiver_0 = tmp;\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_1.q(tmp0_safe_receiver_0);\n }\n }\n return joinTo_0(destination_1, StringBuilder_init_$Create$(resultSizeEstimate), '\\n').toString();\n }\n function indentWidth(_this__u8e3s4) {\n // Inline function 'kotlin.let' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.text.indexOfFirst' call\n var inductionVariable = 0;\n var last = charSequenceLength(_this__u8e3s4) - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.text.indentWidth.' call\n var it = charSequenceGet(_this__u8e3s4, index);\n if (!isWhitespace(it)) {\n tmp$ret$1 = index;\n break $l$block;\n }\n }\n while (inductionVariable <= last);\n tmp$ret$1 = -1;\n }\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.text.indentWidth.' call\n var it_0 = tmp$ret$1;\n return it_0 === -1 ? _this__u8e3s4.length : it_0;\n }\n function getIndentFunction(indent) {\n var tmp;\n // Inline function 'kotlin.text.isEmpty' call\n if (charSequenceLength(indent) === 0) {\n tmp = getIndentFunction$lambda;\n } else {\n tmp = getIndentFunction$lambda_0(indent);\n }\n return tmp;\n }\n function getIndentFunction$lambda(line) {\n return line;\n }\n function getIndentFunction$lambda_0($indent) {\n return function (line) {\n return $indent + line;\n };\n }\n function toIntOrNull(_this__u8e3s4) {\n return toIntOrNull_0(_this__u8e3s4, 10);\n }\n function toIntOrNull_0(_this__u8e3s4, radix) {\n checkRadix(radix);\n var length = _this__u8e3s4.length;\n if (length === 0)\n return null;\n var start;\n var isNegative;\n var limit;\n var firstChar = charSequenceGet(_this__u8e3s4, 0);\n if (Char__compareTo_impl_ypi4mb(firstChar, _Char___init__impl__6a9atx(48)) < 0) {\n if (length === 1)\n return null;\n start = 1;\n if (firstChar === _Char___init__impl__6a9atx(45)) {\n isNegative = true;\n limit = IntCompanionObject_instance.MIN_VALUE;\n } else if (firstChar === _Char___init__impl__6a9atx(43)) {\n isNegative = false;\n limit = -IntCompanionObject_instance.MAX_VALUE | 0;\n } else\n return null;\n } else {\n start = 0;\n isNegative = false;\n limit = -IntCompanionObject_instance.MAX_VALUE | 0;\n }\n var limitForMaxRadix = (-IntCompanionObject_instance.MAX_VALUE | 0) / 36 | 0;\n var limitBeforeMul = limitForMaxRadix;\n var result = 0;\n var inductionVariable = start;\n if (inductionVariable < length)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var digit = digitOf(charSequenceGet(_this__u8e3s4, i), radix);\n if (digit < 0)\n return null;\n if (result < limitBeforeMul) {\n if (limitBeforeMul === limitForMaxRadix) {\n limitBeforeMul = limit / radix | 0;\n if (result < limitBeforeMul) {\n return null;\n }\n } else {\n return null;\n }\n }\n result = imul(result, radix);\n if (result < (limit + digit | 0))\n return null;\n result = result - digit | 0;\n }\n while (inductionVariable < length);\n return isNegative ? result : -result | 0;\n }\n function numberFormatError(input) {\n throw NumberFormatException_init_$Create$_0(\"Invalid number format: '\" + input + \"'\");\n }\n function toLongOrNull(_this__u8e3s4) {\n return toLongOrNull_0(_this__u8e3s4, 10);\n }\n function toLongOrNull_0(_this__u8e3s4, radix) {\n checkRadix(radix);\n var length = _this__u8e3s4.length;\n if (length === 0)\n return null;\n var start;\n var isNegative;\n var limit;\n var firstChar = charSequenceGet(_this__u8e3s4, 0);\n if (Char__compareTo_impl_ypi4mb(firstChar, _Char___init__impl__6a9atx(48)) < 0) {\n if (length === 1)\n return null;\n start = 1;\n if (firstChar === _Char___init__impl__6a9atx(45)) {\n isNegative = true;\n Companion_getInstance_4();\n limit = new Long(0, -2147483648);\n } else if (firstChar === _Char___init__impl__6a9atx(43)) {\n isNegative = false;\n Companion_getInstance_4();\n limit = (new Long(-1, 2147483647)).wb();\n } else\n return null;\n } else {\n start = 0;\n isNegative = false;\n Companion_getInstance_4();\n limit = (new Long(-1, 2147483647)).wb();\n }\n // Inline function 'kotlin.Long.div' call\n Companion_getInstance_4();\n var limitForMaxRadix = (new Long(-1, 2147483647)).wb().z9(toLong_0(36));\n var limitBeforeMul = limitForMaxRadix;\n var result = new Long(0, 0);\n var inductionVariable = start;\n if (inductionVariable < length)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var digit = digitOf(charSequenceGet(_this__u8e3s4, i), radix);\n if (digit < 0)\n return null;\n if (result.ba(limitBeforeMul) < 0) {\n if (limitBeforeMul.equals(limitForMaxRadix)) {\n // Inline function 'kotlin.Long.div' call\n limitBeforeMul = limit.z9(toLong_0(radix));\n if (result.ba(limitBeforeMul) < 0) {\n return null;\n }\n } else {\n return null;\n }\n }\n // Inline function 'kotlin.Long.times' call\n result = result.aa(toLong_0(radix));\n var tmp = result;\n // Inline function 'kotlin.Long.plus' call\n var tmp$ret$3 = limit.s6(toLong_0(digit));\n if (tmp.ba(tmp$ret$3) < 0)\n return null;\n // Inline function 'kotlin.Long.minus' call\n result = result.ub(toLong_0(digit));\n }\n while (inductionVariable < length);\n return isNegative ? result : result.wb();\n }\n function get_lastIndex_3(_this__u8e3s4) {\n return charSequenceLength(_this__u8e3s4) - 1 | 0;\n }\n function split(_this__u8e3s4, delimiters, ignoreCase, limit) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n limit = limit === VOID ? 0 : limit;\n if (delimiters.length === 1) {\n return split_0(_this__u8e3s4, toString(delimiters[0]), ignoreCase, limit);\n }\n // Inline function 'kotlin.collections.map' call\n var this_0 = asIterable_0(rangesDelimitedBy(_this__u8e3s4, delimiters, VOID, ignoreCase, limit));\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'kotlin.text.split.' call\n var tmp$ret$0 = substring_0(_this__u8e3s4, item);\n destination.q(tmp$ret$0);\n }\n return destination;\n }\n function contains_7(_this__u8e3s4, other, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n if (typeof other === 'string') {\n tmp = indexOf_5(_this__u8e3s4, other, VOID, ignoreCase) >= 0;\n } else {\n tmp = indexOf_7(_this__u8e3s4, other, 0, charSequenceLength(_this__u8e3s4), ignoreCase) >= 0;\n }\n return tmp;\n }\n function indexOf_5(_this__u8e3s4, string, startIndex, ignoreCase) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (ignoreCase) {\n tmp_0 = true;\n } else {\n tmp_0 = !(typeof _this__u8e3s4 === 'string');\n }\n if (tmp_0) {\n tmp = indexOf_7(_this__u8e3s4, string, startIndex, charSequenceLength(_this__u8e3s4), ignoreCase);\n } else {\n // Inline function 'kotlin.text.nativeIndexOf' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = _this__u8e3s4.indexOf(string, startIndex);\n }\n return tmp;\n }\n function substring(_this__u8e3s4, range) {\n // Inline function 'kotlin.text.substring' call\n var startIndex = range.s9();\n var endIndex = range.r9() + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.substring(startIndex, endIndex);\n }\n function contains_8(_this__u8e3s4, char, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n return indexOf_6(_this__u8e3s4, char, VOID, ignoreCase) >= 0;\n }\n function get_indices_2(_this__u8e3s4) {\n return numberRangeToNumber(0, charSequenceLength(_this__u8e3s4) - 1 | 0);\n }\n function padStart(_this__u8e3s4, length, padChar) {\n padChar = padChar === VOID ? _Char___init__impl__6a9atx(32) : padChar;\n return toString_1(padStart_0(isCharSequence(_this__u8e3s4) ? _this__u8e3s4 : THROW_CCE(), length, padChar));\n }\n function startsWith_0(_this__u8e3s4, char, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n return charSequenceLength(_this__u8e3s4) > 0 ? equals_1(charSequenceGet(_this__u8e3s4, 0), char, ignoreCase) : false;\n }\n function indexOf_6(_this__u8e3s4, char, startIndex, ignoreCase) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (ignoreCase) {\n tmp_0 = true;\n } else {\n tmp_0 = !(typeof _this__u8e3s4 === 'string');\n }\n if (tmp_0) {\n // Inline function 'kotlin.charArrayOf' call\n var tmp$ret$0 = charArrayOf([char]);\n tmp = indexOfAny(_this__u8e3s4, tmp$ret$0, startIndex, ignoreCase);\n } else {\n // Inline function 'kotlin.text.nativeIndexOf' call\n // Inline function 'kotlin.text.nativeIndexOf' call\n var str = toString(char);\n // Inline function 'kotlin.js.asDynamic' call\n tmp = _this__u8e3s4.indexOf(str, startIndex);\n }\n return tmp;\n }\n function split_0(_this__u8e3s4, delimiter, ignoreCase, limit) {\n requireNonNegativeLimit(limit);\n var currentOffset = 0;\n var nextIndex = indexOf_5(_this__u8e3s4, delimiter, currentOffset, ignoreCase);\n if (nextIndex === -1 ? true : limit === 1) {\n return listOf(toString_1(_this__u8e3s4));\n }\n var isLimited = limit > 0;\n var result = ArrayList_init_$Create$_0(isLimited ? coerceAtMost(limit, 10) : 10);\n $l$loop: do {\n // Inline function 'kotlin.text.substring' call\n var startIndex = currentOffset;\n var endIndex = nextIndex;\n var tmp$ret$0 = toString_1(charSequenceSubSequence(_this__u8e3s4, startIndex, endIndex));\n result.q(tmp$ret$0);\n currentOffset = nextIndex + delimiter.length | 0;\n if (isLimited ? result.n() === (limit - 1 | 0) : false)\n break $l$loop;\n nextIndex = indexOf_5(_this__u8e3s4, delimiter, currentOffset, ignoreCase);\n }\n while (!(nextIndex === -1));\n // Inline function 'kotlin.text.substring' call\n var startIndex_0 = currentOffset;\n var endIndex_0 = charSequenceLength(_this__u8e3s4);\n var tmp$ret$1 = toString_1(charSequenceSubSequence(_this__u8e3s4, startIndex_0, endIndex_0));\n result.q(tmp$ret$1);\n return result;\n }\n function substring_0(_this__u8e3s4, range) {\n return toString_1(charSequenceSubSequence(_this__u8e3s4, range.s9(), range.r9() + 1 | 0));\n }\n function rangesDelimitedBy(_this__u8e3s4, delimiters, startIndex, ignoreCase, limit) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n limit = limit === VOID ? 0 : limit;\n requireNonNegativeLimit(limit);\n return new DelimitedRangesSequence(_this__u8e3s4, startIndex, limit, rangesDelimitedBy$lambda(delimiters, ignoreCase));\n }\n function indexOf_7(_this__u8e3s4, other, startIndex, endIndex, ignoreCase, last) {\n last = last === VOID ? false : last;\n var indices = !last ? numberRangeToNumber(coerceAtLeast(startIndex, 0), coerceAtMost(endIndex, charSequenceLength(_this__u8e3s4))) : downTo(coerceAtMost(startIndex, get_lastIndex_3(_this__u8e3s4)), coerceAtLeast(endIndex, 0));\n var tmp;\n if (typeof _this__u8e3s4 === 'string') {\n tmp = typeof other === 'string';\n } else {\n tmp = false;\n }\n if (tmp) {\n var inductionVariable = indices.ra_1;\n var last_0 = indices.sa_1;\n var step = indices.ta_1;\n if ((step > 0 ? inductionVariable <= last_0 : false) ? true : step < 0 ? last_0 <= inductionVariable : false)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + step | 0;\n if (regionMatches(other, 0, _this__u8e3s4, index, charSequenceLength(other), ignoreCase))\n return index;\n }\n while (!(index === last_0));\n } else {\n var inductionVariable_0 = indices.ra_1;\n var last_1 = indices.sa_1;\n var step_0 = indices.ta_1;\n if ((step_0 > 0 ? inductionVariable_0 <= last_1 : false) ? true : step_0 < 0 ? last_1 <= inductionVariable_0 : false)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + step_0 | 0;\n if (regionMatchesImpl(other, 0, _this__u8e3s4, index_0, charSequenceLength(other), ignoreCase))\n return index_0;\n }\n while (!(index_0 === last_1));\n }\n return -1;\n }\n function padStart_0(_this__u8e3s4, length, padChar) {\n padChar = padChar === VOID ? _Char___init__impl__6a9atx(32) : padChar;\n if (length < 0)\n throw IllegalArgumentException_init_$Create$_0('Desired length ' + length + ' is less than zero.');\n if (length <= charSequenceLength(_this__u8e3s4))\n return charSequenceSubSequence(_this__u8e3s4, 0, charSequenceLength(_this__u8e3s4));\n var sb = StringBuilder_init_$Create$(length);\n var inductionVariable = 1;\n var last = length - charSequenceLength(_this__u8e3s4) | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n sb.z5(padChar);\n }\n while (!(i === last));\n sb.f8(_this__u8e3s4);\n return sb;\n }\n function indexOfAny(_this__u8e3s4, chars, startIndex, ignoreCase) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n if (!ignoreCase ? chars.length === 1 : false) {\n tmp = typeof _this__u8e3s4 === 'string';\n } else {\n tmp = false;\n }\n if (tmp) {\n var char = single(chars);\n // Inline function 'kotlin.text.nativeIndexOf' call\n // Inline function 'kotlin.text.nativeIndexOf' call\n var str = toString(char);\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.indexOf(str, startIndex);\n }\n var inductionVariable = coerceAtLeast(startIndex, 0);\n var last = get_lastIndex_3(_this__u8e3s4);\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var charAtIndex = charSequenceGet(_this__u8e3s4, index);\n var tmp$ret$4;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable_0 = 0;\n var last_0 = chars.length;\n while (inductionVariable_0 < last_0) {\n var element = chars[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'kotlin.text.indexOfAny.' call\n if (equals_1(element, charAtIndex, ignoreCase)) {\n tmp$ret$4 = true;\n break $l$block;\n }\n }\n tmp$ret$4 = false;\n }\n if (tmp$ret$4)\n return index;\n }\n while (!(index === last));\n return -1;\n }\n function requireNonNegativeLimit(limit) {\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n if (!(limit >= 0)) {\n // Inline function 'kotlin.text.requireNonNegativeLimit.' call\n var message = 'Limit must be non-negative, but was ' + limit;\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n return tmp;\n }\n function calcNext_1($this) {\n if ($this.qh_1 < 0) {\n $this.oh_1 = 0;\n $this.rh_1 = null;\n } else {\n var tmp;\n var tmp_0;\n if ($this.th_1.wh_1 > 0) {\n $this.sh_1 = $this.sh_1 + 1 | 0;\n tmp_0 = $this.sh_1 >= $this.th_1.wh_1;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = true;\n } else {\n tmp = $this.qh_1 > charSequenceLength($this.th_1.uh_1);\n }\n if (tmp) {\n $this.rh_1 = numberRangeToNumber($this.ph_1, get_lastIndex_3($this.th_1.uh_1));\n $this.qh_1 = -1;\n } else {\n var match = $this.th_1.xh_1($this.th_1.uh_1, $this.qh_1);\n if (match == null) {\n $this.rh_1 = numberRangeToNumber($this.ph_1, get_lastIndex_3($this.th_1.uh_1));\n $this.qh_1 = -1;\n } else {\n var index = match.af();\n var length = match.bf();\n $this.rh_1 = until($this.ph_1, index);\n $this.ph_1 = index + length | 0;\n $this.qh_1 = $this.ph_1 + (length === 0 ? 1 : 0) | 0;\n }\n }\n $this.oh_1 = 1;\n }\n }\n function DelimitedRangesSequence$iterator$1(this$0) {\n this.th_1 = this$0;\n this.oh_1 = -1;\n this.ph_1 = coerceIn_0(this$0.vh_1, 0, charSequenceLength(this$0.uh_1));\n this.qh_1 = this.ph_1;\n this.rh_1 = null;\n this.sh_1 = 0;\n }\n protoOf(DelimitedRangesSequence$iterator$1).w = function () {\n if (this.oh_1 === -1) {\n calcNext_1(this);\n }\n if (this.oh_1 === 0)\n throw NoSuchElementException_init_$Create$();\n var tmp = this.rh_1;\n var result = tmp instanceof IntRange ? tmp : THROW_CCE();\n this.rh_1 = null;\n this.oh_1 = -1;\n return result;\n };\n protoOf(DelimitedRangesSequence$iterator$1).u = function () {\n if (this.oh_1 === -1) {\n calcNext_1(this);\n }\n return this.oh_1 === 1;\n };\n function DelimitedRangesSequence(input, startIndex, limit, getNextMatch) {\n this.uh_1 = input;\n this.vh_1 = startIndex;\n this.wh_1 = limit;\n this.xh_1 = getNextMatch;\n }\n protoOf(DelimitedRangesSequence).t = function () {\n return new DelimitedRangesSequence$iterator$1(this);\n };\n function regionMatchesImpl(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase) {\n if (((otherOffset < 0 ? true : thisOffset < 0) ? true : thisOffset > (charSequenceLength(_this__u8e3s4) - length | 0)) ? true : otherOffset > (charSequenceLength(other) - length | 0)) {\n return false;\n }\n var inductionVariable = 0;\n if (inductionVariable < length)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (!equals_1(charSequenceGet(_this__u8e3s4, thisOffset + index | 0), charSequenceGet(other, otherOffset + index | 0), ignoreCase))\n return false;\n }\n while (inductionVariable < length);\n return true;\n }\n function lines(_this__u8e3s4) {\n return toList_1(lineSequence(_this__u8e3s4));\n }\n function lineSequence(_this__u8e3s4) {\n return splitToSequence(_this__u8e3s4, ['\\r\\n', '\\n', '\\r']);\n }\n function splitToSequence(_this__u8e3s4, delimiters, ignoreCase, limit) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n limit = limit === VOID ? 0 : limit;\n var tmp = rangesDelimitedBy_0(_this__u8e3s4, delimiters, VOID, ignoreCase, limit);\n return map(tmp, splitToSequence$lambda(_this__u8e3s4));\n }\n function rangesDelimitedBy_0(_this__u8e3s4, delimiters, startIndex, ignoreCase, limit) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n limit = limit === VOID ? 0 : limit;\n requireNonNegativeLimit(limit);\n var delimitersList = asList(delimiters);\n return new DelimitedRangesSequence(_this__u8e3s4, startIndex, limit, rangesDelimitedBy$lambda_0(delimitersList, ignoreCase));\n }\n function findAnyOf(_this__u8e3s4, strings, startIndex, ignoreCase, last) {\n if (!ignoreCase ? strings.n() === 1 : false) {\n var string = single_0(strings);\n var index = !last ? indexOf_5(_this__u8e3s4, string, startIndex) : lastIndexOf_0(_this__u8e3s4, string, startIndex);\n return index < 0 ? null : to(index, string);\n }\n var indices = !last ? numberRangeToNumber(coerceAtLeast(startIndex, 0), charSequenceLength(_this__u8e3s4)) : downTo(coerceAtMost(startIndex, get_lastIndex_3(_this__u8e3s4)), 0);\n if (typeof _this__u8e3s4 === 'string') {\n var inductionVariable = indices.ra_1;\n var last_0 = indices.sa_1;\n var step = indices.ta_1;\n if ((step > 0 ? inductionVariable <= last_0 : false) ? true : step < 0 ? last_0 <= inductionVariable : false)\n do {\n var index_0 = inductionVariable;\n inductionVariable = inductionVariable + step | 0;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = strings.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.text.findAnyOf.' call\n if (regionMatches(element, 0, _this__u8e3s4, index_0, element.length, ignoreCase)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var matchingString = tmp$ret$1;\n if (!(matchingString == null))\n return to(index_0, matchingString);\n }\n while (!(index_0 === last_0));\n } else {\n var inductionVariable_0 = indices.ra_1;\n var last_1 = indices.sa_1;\n var step_0 = indices.ta_1;\n if ((step_0 > 0 ? inductionVariable_0 <= last_1 : false) ? true : step_0 < 0 ? last_1 <= inductionVariable_0 : false)\n do {\n var index_1 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + step_0 | 0;\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator_0 = strings.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'kotlin.text.findAnyOf.' call\n if (regionMatchesImpl(element_0, 0, _this__u8e3s4, index_1, element_0.length, ignoreCase)) {\n tmp$ret$3 = element_0;\n break $l$block_0;\n }\n }\n tmp$ret$3 = null;\n }\n var matchingString_0 = tmp$ret$3;\n if (!(matchingString_0 == null))\n return to(index_1, matchingString_0);\n }\n while (!(index_1 === last_1));\n }\n return null;\n }\n function lastIndexOf_0(_this__u8e3s4, string, startIndex, ignoreCase) {\n startIndex = startIndex === VOID ? get_lastIndex_3(_this__u8e3s4) : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (ignoreCase) {\n tmp_0 = true;\n } else {\n tmp_0 = !(typeof _this__u8e3s4 === 'string');\n }\n if (tmp_0) {\n tmp = indexOf_7(_this__u8e3s4, string, startIndex, 0, ignoreCase, true);\n } else {\n // Inline function 'kotlin.text.nativeLastIndexOf' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = _this__u8e3s4.lastIndexOf(string, startIndex);\n }\n return tmp;\n }\n function toBooleanStrictOrNull(_this__u8e3s4) {\n switch (_this__u8e3s4) {\n case 'true':\n return true;\n case 'false':\n return false;\n default:\n return null;\n }\n }\n function removeSuffix(_this__u8e3s4, suffix) {\n if (endsWith_0(_this__u8e3s4, suffix)) {\n // Inline function 'kotlin.text.substring' call\n var endIndex = _this__u8e3s4.length - charSequenceLength(suffix) | 0;\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.substring(0, endIndex);\n }\n return _this__u8e3s4;\n }\n function substringBefore(_this__u8e3s4, delimiter, missingDelimiterValue) {\n missingDelimiterValue = missingDelimiterValue === VOID ? _this__u8e3s4 : missingDelimiterValue;\n var index = indexOf_6(_this__u8e3s4, delimiter);\n var tmp;\n if (index === -1) {\n tmp = missingDelimiterValue;\n } else {\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = _this__u8e3s4.substring(0, index);\n }\n return tmp;\n }\n function substringAfter(_this__u8e3s4, delimiter, missingDelimiterValue) {\n missingDelimiterValue = missingDelimiterValue === VOID ? _this__u8e3s4 : missingDelimiterValue;\n var index = indexOf_6(_this__u8e3s4, delimiter);\n var tmp;\n if (index === -1) {\n tmp = missingDelimiterValue;\n } else {\n // Inline function 'kotlin.text.substring' call\n var startIndex = index + 1 | 0;\n var endIndex = _this__u8e3s4.length;\n // Inline function 'kotlin.js.asDynamic' call\n tmp = _this__u8e3s4.substring(startIndex, endIndex);\n }\n return tmp;\n }\n function endsWith_0(_this__u8e3s4, suffix, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (!ignoreCase) {\n tmp_0 = typeof _this__u8e3s4 === 'string';\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = typeof suffix === 'string';\n } else {\n tmp = false;\n }\n if (tmp)\n return endsWith(_this__u8e3s4, suffix);\n else {\n return regionMatchesImpl(_this__u8e3s4, charSequenceLength(_this__u8e3s4) - charSequenceLength(suffix) | 0, suffix, 0, charSequenceLength(suffix), ignoreCase);\n }\n }\n function rangesDelimitedBy$lambda($delimiters, $ignoreCase) {\n return function ($this$$receiver, currentIndex) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.text.rangesDelimitedBy..' call\n var it = indexOfAny($this$$receiver, $delimiters, currentIndex, $ignoreCase);\n return it < 0 ? null : to(it, 1);\n };\n }\n function splitToSequence$lambda($this_splitToSequence) {\n return function (it) {\n return substring_0($this_splitToSequence, it);\n };\n }\n function rangesDelimitedBy$lambda_0($delimitersList, $ignoreCase) {\n return function ($this$$receiver, currentIndex) {\n var tmp0_safe_receiver = findAnyOf($this$$receiver, $delimitersList, currentIndex, $ignoreCase, false);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.text.rangesDelimitedBy..' call\n tmp = to(tmp0_safe_receiver.ye_1, tmp0_safe_receiver.ze_1.length);\n }\n return tmp;\n };\n }\n function _Duration___init__impl__kdtzql(rawValue) {\n // Inline function 'kotlin.time.durationAssertionsEnabled' call\n if (true) {\n if (isInNanos(rawValue)) {\n var containsArg = _get_value__a43j40_0(rawValue);\n if (!((new Long(387905, -1073741824)).ba(containsArg) <= 0 ? containsArg.ba(new Long(-387905, 1073741823)) <= 0 : false))\n throw AssertionError_init_$Create$_0(_get_value__a43j40_0(rawValue).toString() + ' ns is out of nanoseconds range');\n } else {\n var containsArg_0 = _get_value__a43j40_0(rawValue);\n if (!((new Long(1, -1073741824)).ba(containsArg_0) <= 0 ? containsArg_0.ba(new Long(-1, 1073741823)) <= 0 : false))\n throw AssertionError_init_$Create$_0(_get_value__a43j40_0(rawValue).toString() + ' ms is out of milliseconds range');\n var containsArg_1 = _get_value__a43j40_0(rawValue);\n if ((new Long(1108857478, -1074)).ba(containsArg_1) <= 0 ? containsArg_1.ba(new Long(-1108857478, 1073)) <= 0 : false)\n throw AssertionError_init_$Create$_0(_get_value__a43j40_0(rawValue).toString() + ' ms is denormalized');\n }\n }\n return rawValue;\n }\n function _get_rawValue__5zfu4e($this) {\n return $this;\n }\n function _get_value__a43j40_0($this) {\n return _get_rawValue__5zfu4e($this).zb(1);\n }\n function isInNanos($this) {\n // Inline function 'kotlin.time.Duration.unitDiscriminator' call\n return (_get_rawValue__5zfu4e($this).wa() & 1) === 0;\n }\n function isInMillis($this) {\n // Inline function 'kotlin.time.Duration.unitDiscriminator' call\n return (_get_rawValue__5zfu4e($this).wa() & 1) === 1;\n }\n function _get_storageUnit__szjgha($this) {\n return isInNanos($this) ? DurationUnit_NANOSECONDS_getInstance() : DurationUnit_MILLISECONDS_getInstance();\n }\n function Companion_11() {\n Companion_instance_11 = this;\n this.ja_1 = _Duration___init__impl__kdtzql(new Long(0, 0));\n this.ka_1 = durationOfMillis(new Long(-1, 1073741823));\n this.la_1 = durationOfMillis(new Long(1, -1073741824));\n }\n protoOf(Companion_11).yh = function (value) {\n var tmp;\n try {\n tmp = parseDuration(value, true);\n } catch ($p) {\n var tmp_0;\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n throw IllegalArgumentException_init_$Create$_1(\"Invalid ISO duration string format: '\" + value + \"'.\", e);\n } else {\n throw $p;\n }\n }\n return tmp;\n };\n var Companion_instance_11;\n function Companion_getInstance_11() {\n if (Companion_instance_11 == null)\n new Companion_11();\n return Companion_instance_11;\n }\n function Duration__unaryMinus_impl_x2k1y0($this) {\n var tmp = _get_value__a43j40_0($this).wb();\n // Inline function 'kotlin.time.Duration.unitDiscriminator' call\n var tmp$ret$0 = _get_rawValue__5zfu4e($this).wa() & 1;\n return durationOf(tmp, tmp$ret$0);\n }\n function Duration__plus_impl_yu9v8f($this, other) {\n if (Duration__isInfinite_impl_tsn9y3($this)) {\n if (Duration__isFinite_impl_rzjsps(other) ? true : _get_rawValue__5zfu4e($this).dc(_get_rawValue__5zfu4e(other)).ba(new Long(0, 0)) >= 0)\n return $this;\n else\n throw IllegalArgumentException_init_$Create$_0('Summing infinite durations of different signs yields an undefined result.');\n } else if (Duration__isInfinite_impl_tsn9y3(other))\n return other;\n var tmp;\n // Inline function 'kotlin.time.Duration.unitDiscriminator' call\n var tmp_0 = _get_rawValue__5zfu4e($this).wa() & 1;\n // Inline function 'kotlin.time.Duration.unitDiscriminator' call\n if (tmp_0 === (_get_rawValue__5zfu4e(other).wa() & 1)) {\n var result = _get_value__a43j40_0($this).s6(_get_value__a43j40_0(other));\n tmp = isInNanos($this) ? durationOfNanosNormalized(result) : durationOfMillisNormalized(result);\n } else {\n if (isInMillis($this)) {\n tmp = addValuesMixedRanges($this, _get_value__a43j40_0($this), _get_value__a43j40_0(other));\n } else {\n tmp = addValuesMixedRanges($this, _get_value__a43j40_0(other), _get_value__a43j40_0($this));\n }\n }\n return tmp;\n }\n function addValuesMixedRanges($this, thisMillis, otherNanos) {\n var otherMillis = nanosToMillis(otherNanos);\n var resultMillis = thisMillis.s6(otherMillis);\n var tmp;\n if ((new Long(1108857478, -1074)).ba(resultMillis) <= 0 ? resultMillis.ba(new Long(-1108857478, 1073)) <= 0 : false) {\n var otherNanoRemainder = otherNanos.ub(millisToNanos(otherMillis));\n tmp = durationOfNanos(millisToNanos(resultMillis).s6(otherNanoRemainder));\n } else {\n tmp = durationOfMillis(coerceIn(resultMillis, new Long(1, -1073741824), new Long(-1, 1073741823)));\n }\n return tmp;\n }\n function Duration__isNegative_impl_pbysfa($this) {\n return _get_rawValue__5zfu4e($this).ba(new Long(0, 0)) < 0;\n }\n function Duration__isInfinite_impl_tsn9y3($this) {\n return _get_rawValue__5zfu4e($this).equals(_get_rawValue__5zfu4e(Companion_getInstance_11().ka_1)) ? true : _get_rawValue__5zfu4e($this).equals(_get_rawValue__5zfu4e(Companion_getInstance_11().la_1));\n }\n function Duration__isFinite_impl_rzjsps($this) {\n return !Duration__isInfinite_impl_tsn9y3($this);\n }\n function _Duration___get_absoluteValue__impl__vr7i6w($this) {\n return Duration__isNegative_impl_pbysfa($this) ? Duration__unaryMinus_impl_x2k1y0($this) : $this;\n }\n function Duration__compareTo_impl_pchp0f($this, other) {\n var compareBits = _get_rawValue__5zfu4e($this).dc(_get_rawValue__5zfu4e(other));\n if (compareBits.ba(new Long(0, 0)) < 0 ? true : (compareBits.wa() & 1) === 0)\n return _get_rawValue__5zfu4e($this).ba(_get_rawValue__5zfu4e(other));\n // Inline function 'kotlin.time.Duration.unitDiscriminator' call\n var tmp = _get_rawValue__5zfu4e($this).wa() & 1;\n // Inline function 'kotlin.time.Duration.unitDiscriminator' call\n var r = tmp - (_get_rawValue__5zfu4e(other).wa() & 1) | 0;\n return Duration__isNegative_impl_pbysfa($this) ? -r | 0 : r;\n }\n function Duration__compareTo_impl_pchp0f_0($this, other) {\n return Duration__compareTo_impl_pchp0f($this.zh_1, other instanceof Duration ? other.zh_1 : THROW_CCE());\n }\n function _Duration___get_hoursComponent__impl__7hllxa($this) {\n var tmp;\n if (Duration__isInfinite_impl_tsn9y3($this)) {\n tmp = 0;\n } else {\n // Inline function 'kotlin.Long.rem' call\n tmp = _Duration___get_inWholeHours__impl__kb9f3j($this).vb(toLong_0(24)).wa();\n }\n return tmp;\n }\n function _Duration___get_minutesComponent__impl__ctvd8u($this) {\n var tmp;\n if (Duration__isInfinite_impl_tsn9y3($this)) {\n tmp = 0;\n } else {\n // Inline function 'kotlin.Long.rem' call\n tmp = _Duration___get_inWholeMinutes__impl__dognoh($this).vb(toLong_0(60)).wa();\n }\n return tmp;\n }\n function _Duration___get_secondsComponent__impl__if34a6($this) {\n var tmp;\n if (Duration__isInfinite_impl_tsn9y3($this)) {\n tmp = 0;\n } else {\n // Inline function 'kotlin.Long.rem' call\n tmp = _Duration___get_inWholeSeconds__impl__hpy7b3($this).vb(toLong_0(60)).wa();\n }\n return tmp;\n }\n function _Duration___get_nanosecondsComponent__impl__nh19kq($this) {\n var tmp;\n if (Duration__isInfinite_impl_tsn9y3($this)) {\n tmp = 0;\n } else if (isInMillis($this)) {\n // Inline function 'kotlin.Long.rem' call\n var tmp$ret$0 = _get_value__a43j40_0($this).vb(toLong_0(1000));\n tmp = millisToNanos(tmp$ret$0).wa();\n } else {\n // Inline function 'kotlin.Long.rem' call\n var this_0 = _get_value__a43j40_0($this);\n var other = 1000000000;\n tmp = this_0.vb(toLong_0(other)).wa();\n }\n return tmp;\n }\n function Duration__toLong_impl_shr43i($this, unit) {\n var tmp0_subject = _get_rawValue__5zfu4e($this);\n var tmp;\n if (tmp0_subject.equals(_get_rawValue__5zfu4e(Companion_getInstance_11().ka_1))) {\n Companion_getInstance_4();\n tmp = new Long(-1, 2147483647);\n } else if (tmp0_subject.equals(_get_rawValue__5zfu4e(Companion_getInstance_11().la_1))) {\n Companion_getInstance_4();\n tmp = new Long(0, -2147483648);\n } else {\n tmp = convertDurationUnit_0(_get_value__a43j40_0($this), _get_storageUnit__szjgha($this), unit);\n }\n return tmp;\n }\n function _Duration___get_inWholeDays__impl__7bvpxz($this) {\n return Duration__toLong_impl_shr43i($this, DurationUnit_DAYS_getInstance());\n }\n function _Duration___get_inWholeHours__impl__kb9f3j($this) {\n return Duration__toLong_impl_shr43i($this, DurationUnit_HOURS_getInstance());\n }\n function _Duration___get_inWholeMinutes__impl__dognoh($this) {\n return Duration__toLong_impl_shr43i($this, DurationUnit_MINUTES_getInstance());\n }\n function _Duration___get_inWholeSeconds__impl__hpy7b3($this) {\n return Duration__toLong_impl_shr43i($this, DurationUnit_SECONDS_getInstance());\n }\n function _Duration___get_inWholeNanoseconds__impl__r5x4mr($this) {\n var value = _get_value__a43j40_0($this);\n var tmp;\n if (isInNanos($this)) {\n tmp = value;\n } else {\n // Inline function 'kotlin.Long.div' call\n Companion_getInstance_4();\n var tmp$ret$0 = (new Long(-1, 2147483647)).z9(toLong_0(1000000));\n if (value.ba(tmp$ret$0) > 0) {\n Companion_getInstance_4();\n tmp = new Long(-1, 2147483647);\n } else {\n // Inline function 'kotlin.Long.div' call\n Companion_getInstance_4();\n var tmp$ret$1 = (new Long(0, -2147483648)).z9(toLong_0(1000000));\n if (value.ba(tmp$ret$1) < 0) {\n Companion_getInstance_4();\n tmp = new Long(0, -2147483648);\n } else {\n tmp = millisToNanos(value);\n }\n }\n }\n return tmp;\n }\n function Duration__toString_impl_8d916b($this) {\n var tmp0_subject = _get_rawValue__5zfu4e($this);\n var tmp;\n if (tmp0_subject.equals(new Long(0, 0))) {\n tmp = '0s';\n } else if (tmp0_subject.equals(_get_rawValue__5zfu4e(Companion_getInstance_11().ka_1))) {\n tmp = 'Infinity';\n } else if (tmp0_subject.equals(_get_rawValue__5zfu4e(Companion_getInstance_11().la_1))) {\n tmp = '-Infinity';\n } else {\n var isNegative = Duration__isNegative_impl_pbysfa($this);\n // Inline function 'kotlin.text.buildString' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.apply' call\n var this_0 = StringBuilder_init_$Create$_0();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.time.Duration.toString.' call\n if (isNegative) {\n this_0.z5(_Char___init__impl__6a9atx(45));\n }\n // Inline function 'kotlin.time.Duration.toComponents' call\n var this_1 = _Duration___get_absoluteValue__impl__vr7i6w($this);\n // Inline function 'kotlin.contracts.contract' call\n var days = _Duration___get_inWholeDays__impl__7bvpxz(this_1);\n var hours = _Duration___get_hoursComponent__impl__7hllxa(this_1);\n var minutes = _Duration___get_minutesComponent__impl__ctvd8u(this_1);\n var seconds = _Duration___get_secondsComponent__impl__if34a6(this_1);\n var nanoseconds = _Duration___get_nanosecondsComponent__impl__nh19kq(this_1);\n var hasDays = !days.equals(new Long(0, 0));\n var hasHours = !(hours === 0);\n var hasMinutes = !(minutes === 0);\n var hasSeconds = !(seconds === 0) ? true : !(nanoseconds === 0);\n var components = 0;\n if (hasDays) {\n this_0.j8(days).z5(_Char___init__impl__6a9atx(100));\n components = components + 1 | 0;\n }\n if (hasHours ? true : hasDays ? hasMinutes ? true : hasSeconds : false) {\n var tmp1 = components;\n components = tmp1 + 1 | 0;\n if (tmp1 > 0) {\n this_0.z5(_Char___init__impl__6a9atx(32));\n }\n this_0.i8(hours).z5(_Char___init__impl__6a9atx(104));\n }\n if (hasMinutes ? true : hasSeconds ? hasHours ? true : hasDays : false) {\n var tmp2 = components;\n components = tmp2 + 1 | 0;\n if (tmp2 > 0) {\n this_0.z5(_Char___init__impl__6a9atx(32));\n }\n this_0.i8(minutes).z5(_Char___init__impl__6a9atx(109));\n }\n if (hasSeconds) {\n var tmp3 = components;\n components = tmp3 + 1 | 0;\n if (tmp3 > 0) {\n this_0.z5(_Char___init__impl__6a9atx(32));\n }\n if (((!(seconds === 0) ? true : hasDays) ? true : hasHours) ? true : hasMinutes) {\n appendFractional(this_0, $this, seconds, nanoseconds, 9, 's', false);\n } else if (nanoseconds >= 1000000) {\n appendFractional(this_0, $this, nanoseconds / 1000000 | 0, nanoseconds % 1000000 | 0, 6, 'ms', false);\n } else if (nanoseconds >= 1000) {\n appendFractional(this_0, $this, nanoseconds / 1000 | 0, nanoseconds % 1000 | 0, 3, 'us', false);\n } else {\n this_0.i8(nanoseconds).y5('ns');\n }\n }\n var tmp_0;\n if (isNegative ? components > 1 : false) {\n this_0.k8(1, _Char___init__impl__6a9atx(40)).z5(_Char___init__impl__6a9atx(41));\n tmp_0 = Unit_instance;\n }\n tmp = this_0.toString();\n }\n return tmp;\n }\n function appendFractional(_this__u8e3s4, $this, whole, fractional, fractionalSize, unit, isoZeroes) {\n _this__u8e3s4.i8(whole);\n if (!(fractional === 0)) {\n _this__u8e3s4.z5(_Char___init__impl__6a9atx(46));\n var fracString = padStart(fractional.toString(), fractionalSize, _Char___init__impl__6a9atx(48));\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.text.indexOfLast' call\n var inductionVariable = charSequenceLength(fracString) - 1 | 0;\n if (0 <= inductionVariable)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + -1 | 0;\n // Inline function 'kotlin.time.Duration.appendFractional.' call\n if (!(charSequenceGet(fracString, index) === _Char___init__impl__6a9atx(48))) {\n tmp$ret$1 = index;\n break $l$block;\n }\n }\n while (0 <= inductionVariable);\n tmp$ret$1 = -1;\n }\n var nonZeroDigits = tmp$ret$1 + 1 | 0;\n if (!isoZeroes ? nonZeroDigits < 3 : false) {\n _this__u8e3s4.h8(fracString, 0, nonZeroDigits);\n } else {\n _this__u8e3s4.h8(fracString, 0, imul((nonZeroDigits + 2 | 0) / 3 | 0, 3));\n }\n }\n _this__u8e3s4.y5(unit);\n }\n function Duration__toIsoString_impl_9h6wsm($this) {\n // Inline function 'kotlin.text.buildString' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.apply' call\n var this_0 = StringBuilder_init_$Create$_0();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.time.Duration.toIsoString.' call\n if (Duration__isNegative_impl_pbysfa($this)) {\n this_0.z5(_Char___init__impl__6a9atx(45));\n }\n this_0.y5('PT');\n // Inline function 'kotlin.time.Duration.toComponents' call\n var this_1 = _Duration___get_absoluteValue__impl__vr7i6w($this);\n // Inline function 'kotlin.contracts.contract' call\n var hours = _Duration___get_inWholeHours__impl__kb9f3j(this_1);\n var minutes = _Duration___get_minutesComponent__impl__ctvd8u(this_1);\n var seconds = _Duration___get_secondsComponent__impl__if34a6(this_1);\n var nanoseconds = _Duration___get_nanosecondsComponent__impl__nh19kq(this_1);\n var hours_0 = hours;\n if (Duration__isInfinite_impl_tsn9y3($this)) {\n hours_0 = new Long(1316134911, 2328);\n }\n var hasHours = !hours_0.equals(new Long(0, 0));\n var hasSeconds = !(seconds === 0) ? true : !(nanoseconds === 0);\n var hasMinutes = !(minutes === 0) ? true : hasSeconds ? hasHours : false;\n if (hasHours) {\n this_0.j8(hours_0).z5(_Char___init__impl__6a9atx(72));\n }\n if (hasMinutes) {\n this_0.i8(minutes).z5(_Char___init__impl__6a9atx(77));\n }\n var tmp;\n if (hasSeconds ? true : !hasHours ? !hasMinutes : false) {\n appendFractional(this_0, $this, seconds, nanoseconds, 9, 'S', true);\n tmp = Unit_instance;\n }\n return this_0.toString();\n }\n function Duration__hashCode_impl_u4exz6($this) {\n return $this.hashCode();\n }\n function Duration__equals_impl_ygj6w6($this, other) {\n if (!(other instanceof Duration))\n return false;\n var tmp0_other_with_cast = other instanceof Duration ? other.zh_1 : THROW_CCE();\n if (!$this.equals(tmp0_other_with_cast))\n return false;\n return true;\n }\n function Duration(rawValue) {\n Companion_getInstance_11();\n this.zh_1 = rawValue;\n }\n protoOf(Duration).ai = function (other) {\n return Duration__compareTo_impl_pchp0f(this.zh_1, other);\n };\n protoOf(Duration).d = function (other) {\n return Duration__compareTo_impl_pchp0f_0(this, other);\n };\n protoOf(Duration).toString = function () {\n return Duration__toString_impl_8d916b(this.zh_1);\n };\n protoOf(Duration).hashCode = function () {\n return Duration__hashCode_impl_u4exz6(this.zh_1);\n };\n protoOf(Duration).equals = function (other) {\n return Duration__equals_impl_ygj6w6(this.zh_1, other);\n };\n function durationOfMillis(normalMillis) {\n // Inline function 'kotlin.Long.plus' call\n var tmp$ret$0 = normalMillis.yb(1).s6(toLong_0(1));\n return _Duration___init__impl__kdtzql(tmp$ret$0);\n }\n function toDuration(_this__u8e3s4, unit) {\n var maxNsInUnit = convertDurationUnitOverflow(new Long(-387905, 1073741823), DurationUnit_NANOSECONDS_getInstance(), unit);\n if (maxNsInUnit.wb().ba(_this__u8e3s4) <= 0 ? _this__u8e3s4.ba(maxNsInUnit) <= 0 : false) {\n return durationOfNanos(convertDurationUnitOverflow(_this__u8e3s4, unit, DurationUnit_NANOSECONDS_getInstance()));\n } else {\n var millis = convertDurationUnit_0(_this__u8e3s4, unit, DurationUnit_MILLISECONDS_getInstance());\n return durationOfMillis(coerceIn(millis, new Long(1, -1073741824), new Long(-1, 1073741823)));\n }\n }\n function toDuration_0(_this__u8e3s4, unit) {\n var valueInNs = convertDurationUnit(_this__u8e3s4, unit, DurationUnit_NANOSECONDS_getInstance());\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!!isNaN_0(valueInNs)) {\n // Inline function 'kotlin.time.toDuration.' call\n var message = 'Duration value cannot be NaN.';\n throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n }\n var nanos = roundToLong(valueInNs);\n var tmp;\n if ((new Long(387905, -1073741824)).ba(nanos) <= 0 ? nanos.ba(new Long(-387905, 1073741823)) <= 0 : false) {\n tmp = durationOfNanos(nanos);\n } else {\n var millis = roundToLong(convertDurationUnit(_this__u8e3s4, unit, DurationUnit_MILLISECONDS_getInstance()));\n tmp = durationOfMillisNormalized(millis);\n }\n return tmp;\n }\n function parseDuration(value, strictIso) {\n var length = value.length;\n if (length === 0)\n throw IllegalArgumentException_init_$Create$_0('The string is empty');\n var index = 0;\n var result = Companion_getInstance_11().ja_1;\n var infinityString = 'Infinity';\n var tmp0_subject = charSequenceGet(value, index);\n if (tmp0_subject === _Char___init__impl__6a9atx(43) ? true : tmp0_subject === _Char___init__impl__6a9atx(45)) {\n index = index + 1 | 0;\n }\n var hasSign = index > 0;\n var isNegative = hasSign ? startsWith_0(value, _Char___init__impl__6a9atx(45)) : false;\n if (length <= index)\n throw IllegalArgumentException_init_$Create$_0('No components');\n else {\n if (charSequenceGet(value, index) === _Char___init__impl__6a9atx(80)) {\n index = index + 1 | 0;\n if (index === length)\n throw IllegalArgumentException_init_$Create$();\n var nonDigitSymbols = '+-.';\n var isTimeComponent = false;\n var prevUnit = null;\n $l$loop: while (index < length) {\n if (charSequenceGet(value, index) === _Char___init__impl__6a9atx(84)) {\n var tmp;\n if (isTimeComponent) {\n tmp = true;\n } else {\n index = index + 1 | 0;\n tmp = index === length;\n }\n if (tmp)\n throw IllegalArgumentException_init_$Create$();\n isTimeComponent = true;\n continue $l$loop;\n }\n // Inline function 'kotlin.time.substringWhile' call\n var startIndex = index;\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.time.skipWhile' call\n var i = startIndex;\n $l$loop_0: while (true) {\n var tmp_0;\n if (i < value.length) {\n // Inline function 'kotlin.time.parseDuration.' call\n var it = charSequenceGet(value, i);\n tmp_0 = (_Char___init__impl__6a9atx(48) <= it ? it <= _Char___init__impl__6a9atx(57) : false) ? true : contains_8(nonDigitSymbols, it);\n } else {\n tmp_0 = false;\n }\n if (!tmp_0) {\n break $l$loop_0;\n }\n i = i + 1 | 0;\n }\n var endIndex = i;\n // Inline function 'kotlin.js.asDynamic' call\n var component = value.substring(startIndex, endIndex);\n // Inline function 'kotlin.text.isEmpty' call\n if (charSequenceLength(component) === 0)\n throw IllegalArgumentException_init_$Create$();\n index = index + component.length | 0;\n // Inline function 'kotlin.text.getOrElse' call\n var index_0 = index;\n var tmp_1;\n if (index_0 >= 0 ? index_0 <= get_lastIndex_3(value) : false) {\n tmp_1 = charSequenceGet(value, index_0);\n } else {\n throw IllegalArgumentException_init_$Create$_0('Missing unit for value ' + component);\n }\n var unitChar = tmp_1;\n index = index + 1 | 0;\n var unit = durationUnitByIsoChar(unitChar, isTimeComponent);\n if (!(prevUnit == null) ? prevUnit.y9(unit) <= 0 : false)\n throw IllegalArgumentException_init_$Create$_0('Unexpected order of duration components');\n prevUnit = unit;\n var dotIndex = indexOf_6(component, _Char___init__impl__6a9atx(46));\n if (unit.equals(DurationUnit_SECONDS_getInstance()) ? dotIndex > 0 : false) {\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n var whole = component.substring(0, dotIndex);\n result = Duration__plus_impl_yu9v8f(result, toDuration(parseOverLongIsoComponent(whole), unit));\n var tmp_2 = result;\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$10 = component.substring(dotIndex);\n result = Duration__plus_impl_yu9v8f(tmp_2, toDuration_0(toDouble(tmp$ret$10), unit));\n } else {\n result = Duration__plus_impl_yu9v8f(result, toDuration(parseOverLongIsoComponent(component), unit));\n }\n }\n } else {\n if (strictIso)\n throw IllegalArgumentException_init_$Create$();\n else {\n var tmp_3 = index;\n // Inline function 'kotlin.comparisons.maxOf' call\n var a = length - index | 0;\n var b = infinityString.length;\n var tmp$ret$11 = Math.max(a, b);\n if (regionMatches(value, tmp_3, infinityString, 0, tmp$ret$11, true)) {\n result = Companion_getInstance_11().ka_1;\n } else {\n var prevUnit_0 = null;\n var afterFirst = false;\n var allowSpaces = !hasSign;\n if ((hasSign ? charSequenceGet(value, index) === _Char___init__impl__6a9atx(40) : false) ? last_1(value) === _Char___init__impl__6a9atx(41) : false) {\n allowSpaces = true;\n index = index + 1 | 0;\n var tmp_4 = index;\n length = length - 1 | 0;\n if (tmp_4 === length)\n throw IllegalArgumentException_init_$Create$_0('No components');\n }\n while (index < length) {\n if (afterFirst ? allowSpaces : false) {\n // Inline function 'kotlin.time.skipWhile' call\n var i_0 = index;\n $l$loop_1: while (true) {\n var tmp_5;\n if (i_0 < value.length) {\n // Inline function 'kotlin.time.parseDuration.' call\n tmp_5 = charSequenceGet(value, i_0) === _Char___init__impl__6a9atx(32);\n } else {\n tmp_5 = false;\n }\n if (!tmp_5) {\n break $l$loop_1;\n }\n i_0 = i_0 + 1 | 0;\n }\n index = i_0;\n }\n afterFirst = true;\n // Inline function 'kotlin.time.substringWhile' call\n var startIndex_0 = index;\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.time.skipWhile' call\n var i_1 = startIndex_0;\n $l$loop_2: while (true) {\n var tmp_6;\n if (i_1 < value.length) {\n // Inline function 'kotlin.time.parseDuration.' call\n var it_0 = charSequenceGet(value, i_1);\n tmp_6 = (_Char___init__impl__6a9atx(48) <= it_0 ? it_0 <= _Char___init__impl__6a9atx(57) : false) ? true : it_0 === _Char___init__impl__6a9atx(46);\n } else {\n tmp_6 = false;\n }\n if (!tmp_6) {\n break $l$loop_2;\n }\n i_1 = i_1 + 1 | 0;\n }\n var endIndex_0 = i_1;\n // Inline function 'kotlin.js.asDynamic' call\n var component_0 = value.substring(startIndex_0, endIndex_0);\n // Inline function 'kotlin.text.isEmpty' call\n if (charSequenceLength(component_0) === 0)\n throw IllegalArgumentException_init_$Create$();\n index = index + component_0.length | 0;\n // Inline function 'kotlin.time.substringWhile' call\n var startIndex_1 = index;\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.time.skipWhile' call\n var i_2 = startIndex_1;\n $l$loop_3: while (true) {\n var tmp_7;\n if (i_2 < value.length) {\n // Inline function 'kotlin.time.parseDuration.' call\n var it_1 = charSequenceGet(value, i_2);\n tmp_7 = _Char___init__impl__6a9atx(97) <= it_1 ? it_1 <= _Char___init__impl__6a9atx(122) : false;\n } else {\n tmp_7 = false;\n }\n if (!tmp_7) {\n break $l$loop_3;\n }\n i_2 = i_2 + 1 | 0;\n }\n var endIndex_1 = i_2;\n // Inline function 'kotlin.js.asDynamic' call\n var unitName = value.substring(startIndex_1, endIndex_1);\n index = index + unitName.length | 0;\n var unit_0 = durationUnitByShortName(unitName);\n if (!(prevUnit_0 == null) ? prevUnit_0.y9(unit_0) <= 0 : false)\n throw IllegalArgumentException_init_$Create$_0('Unexpected order of duration components');\n prevUnit_0 = unit_0;\n var dotIndex_0 = indexOf_6(component_0, _Char___init__impl__6a9atx(46));\n if (dotIndex_0 > 0) {\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n var whole_0 = component_0.substring(0, dotIndex_0);\n result = Duration__plus_impl_yu9v8f(result, toDuration(toLong(whole_0), unit_0));\n var tmp_8 = result;\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$28 = component_0.substring(dotIndex_0);\n result = Duration__plus_impl_yu9v8f(tmp_8, toDuration_0(toDouble(tmp$ret$28), unit_0));\n if (index < length)\n throw IllegalArgumentException_init_$Create$_0('Fractional component must be last');\n } else {\n result = Duration__plus_impl_yu9v8f(result, toDuration(toLong(component_0), unit_0));\n }\n }\n }\n }\n }\n }\n return isNegative ? Duration__unaryMinus_impl_x2k1y0(result) : result;\n }\n function durationOf(normalValue, unitDiscriminator) {\n // Inline function 'kotlin.Long.plus' call\n var tmp$ret$0 = normalValue.yb(1).s6(toLong_0(unitDiscriminator));\n return _Duration___init__impl__kdtzql(tmp$ret$0);\n }\n function durationOfNanosNormalized(nanos) {\n var tmp;\n if ((new Long(387905, -1073741824)).ba(nanos) <= 0 ? nanos.ba(new Long(-387905, 1073741823)) <= 0 : false) {\n tmp = durationOfNanos(nanos);\n } else {\n tmp = durationOfMillis(nanosToMillis(nanos));\n }\n return tmp;\n }\n function durationOfMillisNormalized(millis) {\n var tmp;\n if ((new Long(1108857478, -1074)).ba(millis) <= 0 ? millis.ba(new Long(-1108857478, 1073)) <= 0 : false) {\n tmp = durationOfNanos(millisToNanos(millis));\n } else {\n tmp = durationOfMillis(coerceIn(millis, new Long(1, -1073741824), new Long(-1, 1073741823)));\n }\n return tmp;\n }\n function nanosToMillis(nanos) {\n // Inline function 'kotlin.Long.div' call\n return nanos.z9(toLong_0(1000000));\n }\n function millisToNanos(millis) {\n // Inline function 'kotlin.Long.times' call\n return millis.aa(toLong_0(1000000));\n }\n function durationOfNanos(normalNanos) {\n return _Duration___init__impl__kdtzql(normalNanos.yb(1));\n }\n function parseOverLongIsoComponent(value) {\n var length = value.length;\n var startIndex = 0;\n if (length > 0 ? contains_8('+-', charSequenceGet(value, 0)) : false) {\n startIndex = startIndex + 1 | 0;\n }\n var tmp;\n if ((length - startIndex | 0) > 16) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = numberRangeToNumber(startIndex, get_lastIndex_3(value));\n var tmp_0;\n if (isInterface(this_0, Collection)) {\n tmp_0 = this_0.b1();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.time.parseOverLongIsoComponent.' call\n var containsArg = charSequenceGet(value, element);\n if (!(_Char___init__impl__6a9atx(48) <= containsArg ? containsArg <= _Char___init__impl__6a9atx(57) : false)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n tmp = tmp$ret$0;\n } else {\n tmp = false;\n }\n if (tmp) {\n var tmp_1;\n if (charSequenceGet(value, 0) === _Char___init__impl__6a9atx(45)) {\n Companion_getInstance_4();\n tmp_1 = new Long(0, -2147483648);\n } else {\n Companion_getInstance_4();\n tmp_1 = new Long(-1, 2147483647);\n }\n return tmp_1;\n }\n return startsWith(value, '+') ? toLong(drop(value, 1)) : toLong(value);\n }\n function durationUnitByIsoChar(isoChar, isTimeComponent) {\n var tmp;\n if (!isTimeComponent) {\n var tmp_0;\n if (isoChar === _Char___init__impl__6a9atx(68)) {\n tmp_0 = DurationUnit_DAYS_getInstance();\n } else {\n throw IllegalArgumentException_init_$Create$_0('Invalid or unsupported duration ISO non-time unit: ' + toString(isoChar));\n }\n tmp = tmp_0;\n } else {\n var tmp_1;\n if (isoChar === _Char___init__impl__6a9atx(72)) {\n tmp_1 = DurationUnit_HOURS_getInstance();\n } else if (isoChar === _Char___init__impl__6a9atx(77)) {\n tmp_1 = DurationUnit_MINUTES_getInstance();\n } else if (isoChar === _Char___init__impl__6a9atx(83)) {\n tmp_1 = DurationUnit_SECONDS_getInstance();\n } else {\n throw IllegalArgumentException_init_$Create$_0('Invalid duration ISO time unit: ' + toString(isoChar));\n }\n tmp = tmp_1;\n }\n return tmp;\n }\n function durationUnitByShortName(shortName) {\n var tmp;\n switch (shortName) {\n case 'ns':\n tmp = DurationUnit_NANOSECONDS_getInstance();\n break;\n case 'us':\n tmp = DurationUnit_MICROSECONDS_getInstance();\n break;\n case 'ms':\n tmp = DurationUnit_MILLISECONDS_getInstance();\n break;\n case 's':\n tmp = DurationUnit_SECONDS_getInstance();\n break;\n case 'm':\n tmp = DurationUnit_MINUTES_getInstance();\n break;\n case 'h':\n tmp = DurationUnit_HOURS_getInstance();\n break;\n case 'd':\n tmp = DurationUnit_DAYS_getInstance();\n break;\n default:\n throw IllegalArgumentException_init_$Create$_0('Unknown duration unit short name: ' + shortName);\n }\n return tmp;\n }\n function _ValueTimeMark___init__impl__uyfl2m(reading) {\n return reading;\n }\n function _ValueTimeMark___get_reading__impl__5qz8rd($this) {\n return $this;\n }\n function ValueTimeMark__elapsedNow_impl_eonqvs($this) {\n return MonotonicTimeSource_getInstance().fa($this);\n }\n function ValueTimeMark__minus_impl_f87sko($this, other) {\n if (!(other instanceof ValueTimeMark))\n throw IllegalArgumentException_init_$Create$_0('Subtracting or comparing time marks from different time sources is not possible: ' + new ValueTimeMark($this) + ' and ' + other);\n return ValueTimeMark__minus_impl_f87sko_0($this, other.bi_1);\n }\n function ValueTimeMark__minus_impl_f87sko_0($this, other) {\n return MonotonicTimeSource_getInstance().ga($this, other);\n }\n function ValueTimeMark__toString_impl_ow3ax6($this) {\n return 'ValueTimeMark(reading=' + toString_1($this) + ')';\n }\n function ValueTimeMark__hashCode_impl_oduu93($this) {\n return hashCode($this);\n }\n function ValueTimeMark__equals_impl_uc54jh($this, other) {\n if (!(other instanceof ValueTimeMark))\n return false;\n var tmp0_other_with_cast = other instanceof ValueTimeMark ? other.bi_1 : THROW_CCE();\n if (!equals_0($this, tmp0_other_with_cast))\n return false;\n return true;\n }\n function ValueTimeMark__compareTo_impl_uoccns($this, other) {\n return $this.ci((!(other == null) ? isInterface(other, ComparableTimeMark) : false) ? other : THROW_CCE());\n }\n function ValueTimeMark(reading) {\n this.bi_1 = reading;\n }\n protoOf(ValueTimeMark).di = function () {\n return ValueTimeMark__elapsedNow_impl_eonqvs(this.bi_1);\n };\n protoOf(ValueTimeMark).ei = function (other) {\n return ValueTimeMark__minus_impl_f87sko(this.bi_1, other);\n };\n protoOf(ValueTimeMark).toString = function () {\n return ValueTimeMark__toString_impl_ow3ax6(this.bi_1);\n };\n protoOf(ValueTimeMark).hashCode = function () {\n return ValueTimeMark__hashCode_impl_oduu93(this.bi_1);\n };\n protoOf(ValueTimeMark).equals = function (other) {\n return ValueTimeMark__equals_impl_uc54jh(this.bi_1, other);\n };\n protoOf(ValueTimeMark).d = function (other) {\n return ValueTimeMark__compareTo_impl_uoccns(this, other);\n };\n function Monotonic() {\n }\n protoOf(Monotonic).da = function () {\n return MonotonicTimeSource_getInstance().da();\n };\n protoOf(Monotonic).toString = function () {\n return toString_1(MonotonicTimeSource_getInstance());\n };\n var Monotonic_instance;\n function Monotonic_getInstance() {\n return Monotonic_instance;\n }\n function ComparableTimeMark() {\n }\n function get_UNDEFINED_RESULT() {\n _init_properties_DeepRecursive_kt__zbwcac();\n return UNDEFINED_RESULT;\n }\n var UNDEFINED_RESULT;\n function DeepRecursiveScope() {\n }\n function invoke(_this__u8e3s4, value) {\n _init_properties_DeepRecursive_kt__zbwcac();\n return (new DeepRecursiveScopeImpl(_this__u8e3s4.gi_1, value)).li();\n }\n function DeepRecursiveFunction(block) {\n this.gi_1 = block;\n }\n function DeepRecursiveScopeImpl(block, value) {\n DeepRecursiveScope.call(this);\n var tmp = this;\n tmp.hi_1 = isSuspendFunction(block, 2) ? block : THROW_CCE();\n this.ii_1 = value;\n var tmp_0 = this;\n tmp_0.ji_1 = isInterface(this, Continuation) ? this : THROW_CCE();\n this.ki_1 = get_UNDEFINED_RESULT();\n }\n protoOf(DeepRecursiveScopeImpl).uc = function () {\n return EmptyCoroutineContext_getInstance();\n };\n protoOf(DeepRecursiveScopeImpl).mi = function (result) {\n this.ji_1 = null;\n this.ki_1 = result;\n };\n protoOf(DeepRecursiveScopeImpl).zc = function (result) {\n return this.mi(result);\n };\n protoOf(DeepRecursiveScopeImpl).fi = function (value, $completion) {\n // Inline function 'kotlin.DeepRecursiveScopeImpl.callRecursive.' call\n var tmp = this;\n tmp.ji_1 = isInterface($completion, Continuation) ? $completion : THROW_CCE();\n this.ii_1 = value;\n return get_COROUTINE_SUSPENDED();\n };\n protoOf(DeepRecursiveScopeImpl).li = function () {\n $l$loop: while (true) {\n var result = this.ki_1;\n var tmp0_elvis_lhs = this.ji_1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.getOrThrow' call\n var this_0 = new Result(result) instanceof Result ? result : THROW_CCE();\n throwOnFailure(this_0);\n var tmp_0 = _Result___get_value__impl__bjfvqg(this_0);\n return (tmp_0 == null ? true : !(tmp_0 == null)) ? tmp_0 : THROW_CCE();\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var cont = tmp;\n if (equals_0(get_UNDEFINED_RESULT(), result)) {\n var tmp_1;\n try {\n // Inline function 'kotlin.coroutines.intrinsics.startCoroutineUninterceptedOrReturn' call\n var this_1 = this.hi_1;\n var param = this.ii_1;\n // Inline function 'kotlin.js.asDynamic' call\n var a = this_1;\n tmp_1 = typeof a === 'function' ? a(this, param, cont) : this_1.ni(this, param, cont);\n } catch ($p) {\n var tmp_2;\n if ($p instanceof Error) {\n var e = $p;\n // Inline function 'kotlin.coroutines.resumeWithException' call\n // Inline function 'kotlin.Companion.failure' call\n var tmp$ret$3 = _Result___init__impl__xyqfz8(createFailure(e));\n cont.zc(tmp$ret$3);\n continue $l$loop;\n } else {\n throw $p;\n }\n }\n var r = tmp_1;\n if (!(r === get_COROUTINE_SUSPENDED())) {\n // Inline function 'kotlin.coroutines.resume' call\n // Inline function 'kotlin.Companion.success' call\n var value = (r == null ? true : !(r == null)) ? r : THROW_CCE();\n var tmp$ret$5 = _Result___init__impl__xyqfz8(value);\n cont.zc(tmp$ret$5);\n }\n } else {\n this.ki_1 = get_UNDEFINED_RESULT();\n cont.zc(result);\n }\n }\n };\n var properties_initialized_DeepRecursive_kt_5z0al2;\n function _init_properties_DeepRecursive_kt__zbwcac() {\n if (!properties_initialized_DeepRecursive_kt_5z0al2) {\n properties_initialized_DeepRecursive_kt_5z0al2 = true;\n // Inline function 'kotlin.Companion.success' call\n var value = get_COROUTINE_SUSPENDED();\n UNDEFINED_RESULT = _Result___init__impl__xyqfz8(value);\n }\n }\n var LazyThreadSafetyMode_SYNCHRONIZED_instance;\n var LazyThreadSafetyMode_PUBLICATION_instance;\n var LazyThreadSafetyMode_NONE_instance;\n var LazyThreadSafetyMode_entriesInitialized;\n function LazyThreadSafetyMode_initEntries() {\n if (LazyThreadSafetyMode_entriesInitialized)\n return Unit_instance;\n LazyThreadSafetyMode_entriesInitialized = true;\n LazyThreadSafetyMode_SYNCHRONIZED_instance = new LazyThreadSafetyMode('SYNCHRONIZED', 0);\n LazyThreadSafetyMode_PUBLICATION_instance = new LazyThreadSafetyMode('PUBLICATION', 1);\n LazyThreadSafetyMode_NONE_instance = new LazyThreadSafetyMode('NONE', 2);\n }\n function LazyThreadSafetyMode(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function UnsafeLazyImpl(initializer) {\n this.oi_1 = initializer;\n this.pi_1 = UNINITIALIZED_VALUE_instance;\n }\n protoOf(UnsafeLazyImpl).u2 = function () {\n if (this.pi_1 === UNINITIALIZED_VALUE_instance) {\n this.pi_1 = ensureNotNull(this.oi_1)();\n this.oi_1 = null;\n }\n var tmp = this.pi_1;\n return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n };\n protoOf(UnsafeLazyImpl).qi = function () {\n return !(this.pi_1 === UNINITIALIZED_VALUE_instance);\n };\n protoOf(UnsafeLazyImpl).toString = function () {\n return this.qi() ? toString_0(this.u2()) : 'Lazy value not initialized yet.';\n };\n function UNINITIALIZED_VALUE() {\n }\n var UNINITIALIZED_VALUE_instance;\n function UNINITIALIZED_VALUE_getInstance() {\n return UNINITIALIZED_VALUE_instance;\n }\n function LazyThreadSafetyMode_PUBLICATION_getInstance() {\n LazyThreadSafetyMode_initEntries();\n return LazyThreadSafetyMode_PUBLICATION_instance;\n }\n function _Result___init__impl__xyqfz8(value) {\n return value;\n }\n function _Result___get_value__impl__bjfvqg($this) {\n return $this;\n }\n function _Result___get_isFailure__impl__jpiriv($this) {\n var tmp = _Result___get_value__impl__bjfvqg($this);\n return tmp instanceof Failure;\n }\n function Result__exceptionOrNull_impl_p6xea9($this) {\n var tmp;\n if (_Result___get_value__impl__bjfvqg($this) instanceof Failure) {\n tmp = _Result___get_value__impl__bjfvqg($this).ri_1;\n } else {\n tmp = null;\n }\n return tmp;\n }\n function Result__toString_impl_yu5r8k($this) {\n var tmp;\n if (_Result___get_value__impl__bjfvqg($this) instanceof Failure) {\n tmp = toString_1(_Result___get_value__impl__bjfvqg($this));\n } else {\n tmp = 'Success(' + toString_0(_Result___get_value__impl__bjfvqg($this)) + ')';\n }\n return tmp;\n }\n function Companion_12() {\n }\n var Companion_instance_12;\n function Companion_getInstance_12() {\n return Companion_instance_12;\n }\n function Failure(exception) {\n this.ri_1 = exception;\n }\n protoOf(Failure).equals = function (other) {\n var tmp;\n if (other instanceof Failure) {\n tmp = equals_0(this.ri_1, other.ri_1);\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(Failure).hashCode = function () {\n return hashCode(this.ri_1);\n };\n protoOf(Failure).toString = function () {\n return 'Failure(' + this.ri_1 + ')';\n };\n function Result__hashCode_impl_d2zufp($this) {\n return $this == null ? 0 : hashCode($this);\n }\n function Result__equals_impl_bxgmep($this, other) {\n if (!(other instanceof Result))\n return false;\n var tmp0_other_with_cast = other instanceof Result ? other.si_1 : THROW_CCE();\n if (!equals_0($this, tmp0_other_with_cast))\n return false;\n return true;\n }\n function Result(value) {\n this.si_1 = value;\n }\n protoOf(Result).toString = function () {\n return Result__toString_impl_yu5r8k(this.si_1);\n };\n protoOf(Result).hashCode = function () {\n return Result__hashCode_impl_d2zufp(this.si_1);\n };\n protoOf(Result).equals = function (other) {\n return Result__equals_impl_bxgmep(this.si_1, other);\n };\n function createFailure(exception) {\n return new Failure(exception);\n }\n function throwOnFailure(_this__u8e3s4) {\n var tmp = _Result___get_value__impl__bjfvqg(_this__u8e3s4);\n if (tmp instanceof Failure)\n throw _Result___get_value__impl__bjfvqg(_this__u8e3s4).ri_1;\n }\n function NotImplementedError(message) {\n message = message === VOID ? 'An operation is not implemented.' : message;\n Error_init_$Init$_0(message, this);\n captureStack(this, NotImplementedError);\n }\n function Pair(first, second) {\n this.ye_1 = first;\n this.ze_1 = second;\n }\n protoOf(Pair).toString = function () {\n return '(' + this.ye_1 + ', ' + this.ze_1 + ')';\n };\n protoOf(Pair).af = function () {\n return this.ye_1;\n };\n protoOf(Pair).bf = function () {\n return this.ze_1;\n };\n protoOf(Pair).hashCode = function () {\n var result = this.ye_1 == null ? 0 : hashCode(this.ye_1);\n result = imul(result, 31) + (this.ze_1 == null ? 0 : hashCode(this.ze_1)) | 0;\n return result;\n };\n protoOf(Pair).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Pair))\n return false;\n var tmp0_other_with_cast = other instanceof Pair ? other : THROW_CCE();\n if (!equals_0(this.ye_1, tmp0_other_with_cast.ye_1))\n return false;\n if (!equals_0(this.ze_1, tmp0_other_with_cast.ze_1))\n return false;\n return true;\n };\n function to(_this__u8e3s4, that) {\n return new Pair(_this__u8e3s4, that);\n }\n function Triple(first, second, third) {\n this.ti_1 = first;\n this.ui_1 = second;\n this.vi_1 = third;\n }\n protoOf(Triple).toString = function () {\n return '(' + this.ti_1 + ', ' + this.ui_1 + ', ' + this.vi_1 + ')';\n };\n protoOf(Triple).hashCode = function () {\n var result = this.ti_1 == null ? 0 : hashCode(this.ti_1);\n result = imul(result, 31) + (this.ui_1 == null ? 0 : hashCode(this.ui_1)) | 0;\n result = imul(result, 31) + (this.vi_1 == null ? 0 : hashCode(this.vi_1)) | 0;\n return result;\n };\n protoOf(Triple).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Triple))\n return false;\n var tmp0_other_with_cast = other instanceof Triple ? other : THROW_CCE();\n if (!equals_0(this.ti_1, tmp0_other_with_cast.ti_1))\n return false;\n if (!equals_0(this.ui_1, tmp0_other_with_cast.ui_1))\n return false;\n if (!equals_0(this.vi_1, tmp0_other_with_cast.vi_1))\n return false;\n return true;\n };\n function _UByte___init__impl__g9hnc4(data) {\n return data;\n }\n function _UByte___get_data__impl__jof9qr($this) {\n return $this;\n }\n function Companion_13() {\n Companion_instance_13 = this;\n this.wi_1 = _UByte___init__impl__g9hnc4(0);\n this.xi_1 = _UByte___init__impl__g9hnc4(-1);\n this.yi_1 = 1;\n this.zi_1 = 8;\n }\n var Companion_instance_13;\n function Companion_getInstance_13() {\n if (Companion_instance_13 == null)\n new Companion_13();\n return Companion_instance_13;\n }\n function UByte__compareTo_impl_5w5192($this, other) {\n // Inline function 'kotlin.UByte.toInt' call\n var tmp = _UByte___get_data__impl__jof9qr($this) & 255;\n // Inline function 'kotlin.UByte.toInt' call\n var tmp$ret$1 = _UByte___get_data__impl__jof9qr(other) & 255;\n return compareTo_0(tmp, tmp$ret$1);\n }\n function UByte__compareTo_impl_5w5192_0($this, other) {\n return UByte__compareTo_impl_5w5192($this.aj_1, other instanceof UByte ? other.aj_1 : THROW_CCE());\n }\n function UByte__toString_impl_v72jg($this) {\n // Inline function 'kotlin.UByte.toInt' call\n return (_UByte___get_data__impl__jof9qr($this) & 255).toString();\n }\n function UByte__hashCode_impl_mmczcb($this) {\n return $this;\n }\n function UByte__equals_impl_nvqtsf($this, other) {\n if (!(other instanceof UByte))\n return false;\n if (!($this === (other instanceof UByte ? other.aj_1 : THROW_CCE())))\n return false;\n return true;\n }\n function UByte(data) {\n Companion_getInstance_13();\n this.aj_1 = data;\n }\n protoOf(UByte).bj = function (other) {\n return UByte__compareTo_impl_5w5192(this.aj_1, other);\n };\n protoOf(UByte).d = function (other) {\n return UByte__compareTo_impl_5w5192_0(this, other);\n };\n protoOf(UByte).toString = function () {\n return UByte__toString_impl_v72jg(this.aj_1);\n };\n protoOf(UByte).hashCode = function () {\n return UByte__hashCode_impl_mmczcb(this.aj_1);\n };\n protoOf(UByte).equals = function (other) {\n return UByte__equals_impl_nvqtsf(this.aj_1, other);\n };\n function _UByteArray___init__impl__ip4y9n(storage) {\n return storage;\n }\n function _UByteArray___get_storage__impl__d4kctt($this) {\n return $this;\n }\n function _UByteArray___init__impl__ip4y9n_0(size) {\n return _UByteArray___init__impl__ip4y9n(new Int8Array(size));\n }\n function UByteArray__get_impl_t5f3hv($this, index) {\n // Inline function 'kotlin.toUByte' call\n var this_0 = _UByteArray___get_storage__impl__d4kctt($this)[index];\n return _UByte___init__impl__g9hnc4(this_0);\n }\n function UByteArray__set_impl_jvcicn($this, index, value) {\n var tmp = _UByteArray___get_storage__impl__d4kctt($this);\n // Inline function 'kotlin.UByte.toByte' call\n tmp[index] = _UByte___get_data__impl__jof9qr(value);\n }\n function _UByteArray___get_size__impl__h6pkdv($this) {\n return _UByteArray___get_storage__impl__d4kctt($this).length;\n }\n function UByteArray__iterator_impl_509y1p($this) {\n return new Iterator(_UByteArray___get_storage__impl__d4kctt($this));\n }\n function Iterator(array) {\n this.cj_1 = array;\n this.dj_1 = 0;\n }\n protoOf(Iterator).u = function () {\n return this.dj_1 < this.cj_1.length;\n };\n protoOf(Iterator).ej = function () {\n var tmp;\n if (this.dj_1 < this.cj_1.length) {\n // Inline function 'kotlin.toUByte' call\n var tmp1 = this.dj_1;\n this.dj_1 = tmp1 + 1 | 0;\n var this_0 = this.cj_1[tmp1];\n tmp = _UByte___init__impl__g9hnc4(this_0);\n } else {\n throw NoSuchElementException_init_$Create$_0(this.dj_1.toString());\n }\n return tmp;\n };\n protoOf(Iterator).w = function () {\n return new UByte(this.ej());\n };\n function UByteArray__contains_impl_njh19q($this, element) {\n var tmp = !(new UByte(element) == null) ? new UByte(element) : THROW_CCE();\n if (!(tmp instanceof UByte))\n return false;\n var tmp_0 = _UByteArray___get_storage__impl__d4kctt($this);\n // Inline function 'kotlin.UByte.toByte' call\n var tmp$ret$0 = _UByte___get_data__impl__jof9qr(element);\n return contains_4(tmp_0, tmp$ret$0);\n }\n function UByteArray__contains_impl_njh19q_0($this, element) {\n if (!(element instanceof UByte))\n return false;\n return UByteArray__contains_impl_njh19q($this.ge_1, element instanceof UByte ? element.aj_1 : THROW_CCE());\n }\n function UByteArray__containsAll_impl_v9s6dj($this, elements) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = isInterface(elements, Collection) ? elements : THROW_CCE();\n var tmp;\n if (isInterface(this_0, Collection)) {\n tmp = this_0.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.UByteArray.containsAll.' call\n var tmp_0;\n if (element instanceof UByte) {\n var tmp_1 = _UByteArray___get_storage__impl__d4kctt($this);\n // Inline function 'kotlin.UByte.toByte' call\n var this_1 = element.aj_1;\n var tmp$ret$1 = _UByte___get_data__impl__jof9qr(this_1);\n tmp_0 = contains_4(tmp_1, tmp$ret$1);\n } else {\n tmp_0 = false;\n }\n if (!tmp_0) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n }\n function UByteArray__containsAll_impl_v9s6dj_0($this, elements) {\n return UByteArray__containsAll_impl_v9s6dj($this.ge_1, elements);\n }\n function UByteArray__isEmpty_impl_nbfqsa($this) {\n return _UByteArray___get_storage__impl__d4kctt($this).length === 0;\n }\n function UByteArray__toString_impl_ukpl97($this) {\n return 'UByteArray(storage=' + toString_1($this) + ')';\n }\n function UByteArray__hashCode_impl_ip8jx2($this) {\n return hashCode($this);\n }\n function UByteArray__equals_impl_roka4u($this, other) {\n if (!(other instanceof UByteArray))\n return false;\n var tmp0_other_with_cast = other instanceof UByteArray ? other.ge_1 : THROW_CCE();\n if (!equals_0($this, tmp0_other_with_cast))\n return false;\n return true;\n }\n function UByteArray(storage) {\n this.ge_1 = storage;\n }\n protoOf(UByteArray).n = function () {\n return _UByteArray___get_size__impl__h6pkdv(this.ge_1);\n };\n protoOf(UByteArray).t = function () {\n return UByteArray__iterator_impl_509y1p(this.ge_1);\n };\n protoOf(UByteArray).fj = function (element) {\n return UByteArray__contains_impl_njh19q(this.ge_1, element);\n };\n protoOf(UByteArray).p = function (element) {\n return UByteArray__contains_impl_njh19q_0(this, element);\n };\n protoOf(UByteArray).gj = function (elements) {\n return UByteArray__containsAll_impl_v9s6dj(this.ge_1, elements);\n };\n protoOf(UByteArray).a1 = function (elements) {\n return UByteArray__containsAll_impl_v9s6dj_0(this, elements);\n };\n protoOf(UByteArray).b1 = function () {\n return UByteArray__isEmpty_impl_nbfqsa(this.ge_1);\n };\n protoOf(UByteArray).toString = function () {\n return UByteArray__toString_impl_ukpl97(this.ge_1);\n };\n protoOf(UByteArray).hashCode = function () {\n return UByteArray__hashCode_impl_ip8jx2(this.ge_1);\n };\n protoOf(UByteArray).equals = function (other) {\n return UByteArray__equals_impl_roka4u(this.ge_1, other);\n };\n function _UInt___init__impl__l7qpdl(data) {\n return data;\n }\n function _UInt___get_data__impl__f0vqqw($this) {\n return $this;\n }\n function Companion_14() {\n Companion_instance_14 = this;\n this.hj_1 = _UInt___init__impl__l7qpdl(0);\n this.ij_1 = _UInt___init__impl__l7qpdl(-1);\n this.jj_1 = 4;\n this.kj_1 = 32;\n }\n var Companion_instance_14;\n function Companion_getInstance_14() {\n if (Companion_instance_14 == null)\n new Companion_14();\n return Companion_instance_14;\n }\n function UInt__compareTo_impl_yacclj($this, other) {\n return uintCompare(_UInt___get_data__impl__f0vqqw($this), _UInt___get_data__impl__f0vqqw(other));\n }\n function UInt__compareTo_impl_yacclj_0($this, other) {\n return UInt__compareTo_impl_yacclj($this.lj_1, other instanceof UInt ? other.lj_1 : THROW_CCE());\n }\n function UInt__toString_impl_dbgl21($this) {\n // Inline function 'kotlin.UInt.toLong' call\n return toLong_0(_UInt___get_data__impl__f0vqqw($this)).bc(new Long(-1, 0)).toString();\n }\n function UInt__hashCode_impl_z2mhuw($this) {\n return $this;\n }\n function UInt__equals_impl_ffdoxg($this, other) {\n if (!(other instanceof UInt))\n return false;\n if (!($this === (other instanceof UInt ? other.lj_1 : THROW_CCE())))\n return false;\n return true;\n }\n function UInt(data) {\n Companion_getInstance_14();\n this.lj_1 = data;\n }\n protoOf(UInt).mj = function (other) {\n return UInt__compareTo_impl_yacclj(this.lj_1, other);\n };\n protoOf(UInt).d = function (other) {\n return UInt__compareTo_impl_yacclj_0(this, other);\n };\n protoOf(UInt).toString = function () {\n return UInt__toString_impl_dbgl21(this.lj_1);\n };\n protoOf(UInt).hashCode = function () {\n return UInt__hashCode_impl_z2mhuw(this.lj_1);\n };\n protoOf(UInt).equals = function (other) {\n return UInt__equals_impl_ffdoxg(this.lj_1, other);\n };\n function _UIntArray___init__impl__ghjpc6(storage) {\n return storage;\n }\n function _UIntArray___get_storage__impl__92a0v0($this) {\n return $this;\n }\n function _UIntArray___init__impl__ghjpc6_0(size) {\n return _UIntArray___init__impl__ghjpc6(new Int32Array(size));\n }\n function UIntArray__get_impl_gp5kza($this, index) {\n // Inline function 'kotlin.toUInt' call\n var this_0 = _UIntArray___get_storage__impl__92a0v0($this)[index];\n return _UInt___init__impl__l7qpdl(this_0);\n }\n function UIntArray__set_impl_7f2zu2($this, index, value) {\n var tmp = _UIntArray___get_storage__impl__92a0v0($this);\n // Inline function 'kotlin.UInt.toInt' call\n tmp[index] = _UInt___get_data__impl__f0vqqw(value);\n }\n function _UIntArray___get_size__impl__r6l8ci($this) {\n return _UIntArray___get_storage__impl__92a0v0($this).length;\n }\n function UIntArray__iterator_impl_tkdv7k($this) {\n return new Iterator_0(_UIntArray___get_storage__impl__92a0v0($this));\n }\n function Iterator_0(array) {\n this.nj_1 = array;\n this.oj_1 = 0;\n }\n protoOf(Iterator_0).u = function () {\n return this.oj_1 < this.nj_1.length;\n };\n protoOf(Iterator_0).pj = function () {\n var tmp;\n if (this.oj_1 < this.nj_1.length) {\n // Inline function 'kotlin.toUInt' call\n var tmp1 = this.oj_1;\n this.oj_1 = tmp1 + 1 | 0;\n var this_0 = this.nj_1[tmp1];\n tmp = _UInt___init__impl__l7qpdl(this_0);\n } else {\n throw NoSuchElementException_init_$Create$_0(this.oj_1.toString());\n }\n return tmp;\n };\n protoOf(Iterator_0).w = function () {\n return new UInt(this.pj());\n };\n function UIntArray__contains_impl_b16rzj($this, element) {\n var tmp = !(new UInt(element) == null) ? new UInt(element) : THROW_CCE();\n if (!(tmp instanceof UInt))\n return false;\n var tmp_0 = _UIntArray___get_storage__impl__92a0v0($this);\n // Inline function 'kotlin.UInt.toInt' call\n var tmp$ret$0 = _UInt___get_data__impl__f0vqqw(element);\n return contains_2(tmp_0, tmp$ret$0);\n }\n function UIntArray__contains_impl_b16rzj_0($this, element) {\n if (!(element instanceof UInt))\n return false;\n return UIntArray__contains_impl_b16rzj($this.ee_1, element instanceof UInt ? element.lj_1 : THROW_CCE());\n }\n function UIntArray__containsAll_impl_414g22($this, elements) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = isInterface(elements, Collection) ? elements : THROW_CCE();\n var tmp;\n if (isInterface(this_0, Collection)) {\n tmp = this_0.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.UIntArray.containsAll.' call\n var tmp_0;\n if (element instanceof UInt) {\n var tmp_1 = _UIntArray___get_storage__impl__92a0v0($this);\n // Inline function 'kotlin.UInt.toInt' call\n var this_1 = element.lj_1;\n var tmp$ret$1 = _UInt___get_data__impl__f0vqqw(this_1);\n tmp_0 = contains_2(tmp_1, tmp$ret$1);\n } else {\n tmp_0 = false;\n }\n if (!tmp_0) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n }\n function UIntArray__containsAll_impl_414g22_0($this, elements) {\n return UIntArray__containsAll_impl_414g22($this.ee_1, elements);\n }\n function UIntArray__isEmpty_impl_vd8j4n($this) {\n return _UIntArray___get_storage__impl__92a0v0($this).length === 0;\n }\n function UIntArray__toString_impl_3zy802($this) {\n return 'UIntArray(storage=' + toString_1($this) + ')';\n }\n function UIntArray__hashCode_impl_hr7ost($this) {\n return hashCode($this);\n }\n function UIntArray__equals_impl_flcmof($this, other) {\n if (!(other instanceof UIntArray))\n return false;\n var tmp0_other_with_cast = other instanceof UIntArray ? other.ee_1 : THROW_CCE();\n if (!equals_0($this, tmp0_other_with_cast))\n return false;\n return true;\n }\n function UIntArray(storage) {\n this.ee_1 = storage;\n }\n protoOf(UIntArray).n = function () {\n return _UIntArray___get_size__impl__r6l8ci(this.ee_1);\n };\n protoOf(UIntArray).t = function () {\n return UIntArray__iterator_impl_tkdv7k(this.ee_1);\n };\n protoOf(UIntArray).qj = function (element) {\n return UIntArray__contains_impl_b16rzj(this.ee_1, element);\n };\n protoOf(UIntArray).p = function (element) {\n return UIntArray__contains_impl_b16rzj_0(this, element);\n };\n protoOf(UIntArray).rj = function (elements) {\n return UIntArray__containsAll_impl_414g22(this.ee_1, elements);\n };\n protoOf(UIntArray).a1 = function (elements) {\n return UIntArray__containsAll_impl_414g22_0(this, elements);\n };\n protoOf(UIntArray).b1 = function () {\n return UIntArray__isEmpty_impl_vd8j4n(this.ee_1);\n };\n protoOf(UIntArray).toString = function () {\n return UIntArray__toString_impl_3zy802(this.ee_1);\n };\n protoOf(UIntArray).hashCode = function () {\n return UIntArray__hashCode_impl_hr7ost(this.ee_1);\n };\n protoOf(UIntArray).equals = function (other) {\n return UIntArray__equals_impl_flcmof(this.ee_1, other);\n };\n function _ULong___init__impl__c78o9k(data) {\n return data;\n }\n function _ULong___get_data__impl__fggpzb($this) {\n return $this;\n }\n function Companion_15() {\n Companion_instance_15 = this;\n this.sj_1 = _ULong___init__impl__c78o9k(new Long(0, 0));\n this.tj_1 = _ULong___init__impl__c78o9k(new Long(-1, -1));\n this.uj_1 = 8;\n this.vj_1 = 64;\n }\n var Companion_instance_15;\n function Companion_getInstance_15() {\n if (Companion_instance_15 == null)\n new Companion_15();\n return Companion_instance_15;\n }\n function ULong__compareTo_impl_38i7tu($this, other) {\n return ulongCompare(_ULong___get_data__impl__fggpzb($this), _ULong___get_data__impl__fggpzb(other));\n }\n function ULong__compareTo_impl_38i7tu_0($this, other) {\n return ULong__compareTo_impl_38i7tu($this.wj_1, other instanceof ULong ? other.wj_1 : THROW_CCE());\n }\n function ULong__toString_impl_f9au7k($this) {\n return ulongToString(_ULong___get_data__impl__fggpzb($this));\n }\n function ULong__hashCode_impl_6hv2lb($this) {\n return $this.hashCode();\n }\n function ULong__equals_impl_o0gnyb($this, other) {\n if (!(other instanceof ULong))\n return false;\n var tmp0_other_with_cast = other instanceof ULong ? other.wj_1 : THROW_CCE();\n if (!$this.equals(tmp0_other_with_cast))\n return false;\n return true;\n }\n function ULong(data) {\n Companion_getInstance_15();\n this.wj_1 = data;\n }\n protoOf(ULong).xj = function (other) {\n return ULong__compareTo_impl_38i7tu(this.wj_1, other);\n };\n protoOf(ULong).d = function (other) {\n return ULong__compareTo_impl_38i7tu_0(this, other);\n };\n protoOf(ULong).toString = function () {\n return ULong__toString_impl_f9au7k(this.wj_1);\n };\n protoOf(ULong).hashCode = function () {\n return ULong__hashCode_impl_6hv2lb(this.wj_1);\n };\n protoOf(ULong).equals = function (other) {\n return ULong__equals_impl_o0gnyb(this.wj_1, other);\n };\n function _ULongArray___init__impl__twm1l3(storage) {\n return storage;\n }\n function _ULongArray___get_storage__impl__28e64j($this) {\n return $this;\n }\n function _ULongArray___init__impl__twm1l3_0(size) {\n return _ULongArray___init__impl__twm1l3(longArray(size));\n }\n function ULongArray__get_impl_pr71q9($this, index) {\n // Inline function 'kotlin.toULong' call\n var this_0 = _ULongArray___get_storage__impl__28e64j($this)[index];\n return _ULong___init__impl__c78o9k(this_0);\n }\n function ULongArray__set_impl_z19mvh($this, index, value) {\n var tmp = _ULongArray___get_storage__impl__28e64j($this);\n // Inline function 'kotlin.ULong.toLong' call\n tmp[index] = _ULong___get_data__impl__fggpzb(value);\n }\n function _ULongArray___get_size__impl__ju6dtr($this) {\n return _ULongArray___get_storage__impl__28e64j($this).length;\n }\n function ULongArray__iterator_impl_cq4d2h($this) {\n return new Iterator_1(_ULongArray___get_storage__impl__28e64j($this));\n }\n function Iterator_1(array) {\n this.yj_1 = array;\n this.zj_1 = 0;\n }\n protoOf(Iterator_1).u = function () {\n return this.zj_1 < this.yj_1.length;\n };\n protoOf(Iterator_1).ak = function () {\n var tmp;\n if (this.zj_1 < this.yj_1.length) {\n // Inline function 'kotlin.toULong' call\n var tmp1 = this.zj_1;\n this.zj_1 = tmp1 + 1 | 0;\n var this_0 = this.yj_1[tmp1];\n tmp = _ULong___init__impl__c78o9k(this_0);\n } else {\n throw NoSuchElementException_init_$Create$_0(this.zj_1.toString());\n }\n return tmp;\n };\n protoOf(Iterator_1).w = function () {\n return new ULong(this.ak());\n };\n function ULongArray__contains_impl_v9bgai($this, element) {\n var tmp = !(new ULong(element) == null) ? new ULong(element) : THROW_CCE();\n if (!(tmp instanceof ULong))\n return false;\n var tmp_0 = _ULongArray___get_storage__impl__28e64j($this);\n // Inline function 'kotlin.ULong.toLong' call\n var tmp$ret$0 = _ULong___get_data__impl__fggpzb(element);\n return contains_1(tmp_0, tmp$ret$0);\n }\n function ULongArray__contains_impl_v9bgai_0($this, element) {\n if (!(element instanceof ULong))\n return false;\n return ULongArray__contains_impl_v9bgai($this.de_1, element instanceof ULong ? element.wj_1 : THROW_CCE());\n }\n function ULongArray__containsAll_impl_xx8ztf($this, elements) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = isInterface(elements, Collection) ? elements : THROW_CCE();\n var tmp;\n if (isInterface(this_0, Collection)) {\n tmp = this_0.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.ULongArray.containsAll.' call\n var tmp_0;\n if (element instanceof ULong) {\n var tmp_1 = _ULongArray___get_storage__impl__28e64j($this);\n // Inline function 'kotlin.ULong.toLong' call\n var this_1 = element.wj_1;\n var tmp$ret$1 = _ULong___get_data__impl__fggpzb(this_1);\n tmp_0 = contains_1(tmp_1, tmp$ret$1);\n } else {\n tmp_0 = false;\n }\n if (!tmp_0) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n }\n function ULongArray__containsAll_impl_xx8ztf_0($this, elements) {\n return ULongArray__containsAll_impl_xx8ztf($this.de_1, elements);\n }\n function ULongArray__isEmpty_impl_c3yngu($this) {\n return _ULongArray___get_storage__impl__28e64j($this).length === 0;\n }\n function ULongArray__toString_impl_wqk1p5($this) {\n return 'ULongArray(storage=' + toString_1($this) + ')';\n }\n function ULongArray__hashCode_impl_aze4wa($this) {\n return hashCode($this);\n }\n function ULongArray__equals_impl_vwitwa($this, other) {\n if (!(other instanceof ULongArray))\n return false;\n var tmp0_other_with_cast = other instanceof ULongArray ? other.de_1 : THROW_CCE();\n if (!equals_0($this, tmp0_other_with_cast))\n return false;\n return true;\n }\n function ULongArray(storage) {\n this.de_1 = storage;\n }\n protoOf(ULongArray).n = function () {\n return _ULongArray___get_size__impl__ju6dtr(this.de_1);\n };\n protoOf(ULongArray).t = function () {\n return ULongArray__iterator_impl_cq4d2h(this.de_1);\n };\n protoOf(ULongArray).bk = function (element) {\n return ULongArray__contains_impl_v9bgai(this.de_1, element);\n };\n protoOf(ULongArray).p = function (element) {\n return ULongArray__contains_impl_v9bgai_0(this, element);\n };\n protoOf(ULongArray).ck = function (elements) {\n return ULongArray__containsAll_impl_xx8ztf(this.de_1, elements);\n };\n protoOf(ULongArray).a1 = function (elements) {\n return ULongArray__containsAll_impl_xx8ztf_0(this, elements);\n };\n protoOf(ULongArray).b1 = function () {\n return ULongArray__isEmpty_impl_c3yngu(this.de_1);\n };\n protoOf(ULongArray).toString = function () {\n return ULongArray__toString_impl_wqk1p5(this.de_1);\n };\n protoOf(ULongArray).hashCode = function () {\n return ULongArray__hashCode_impl_aze4wa(this.de_1);\n };\n protoOf(ULongArray).equals = function (other) {\n return ULongArray__equals_impl_vwitwa(this.de_1, other);\n };\n function _UShort___init__impl__jigrne(data) {\n return data;\n }\n function _UShort___get_data__impl__g0245($this) {\n return $this;\n }\n function Companion_16() {\n Companion_instance_16 = this;\n this.dk_1 = _UShort___init__impl__jigrne(0);\n this.ek_1 = _UShort___init__impl__jigrne(-1);\n this.fk_1 = 2;\n this.gk_1 = 16;\n }\n var Companion_instance_16;\n function Companion_getInstance_16() {\n if (Companion_instance_16 == null)\n new Companion_16();\n return Companion_instance_16;\n }\n function UShort__compareTo_impl_1pfgyc($this, other) {\n // Inline function 'kotlin.UShort.toInt' call\n var tmp = _UShort___get_data__impl__g0245($this) & 65535;\n // Inline function 'kotlin.UShort.toInt' call\n var tmp$ret$1 = _UShort___get_data__impl__g0245(other) & 65535;\n return compareTo_0(tmp, tmp$ret$1);\n }\n function UShort__compareTo_impl_1pfgyc_0($this, other) {\n return UShort__compareTo_impl_1pfgyc($this.hk_1, other instanceof UShort ? other.hk_1 : THROW_CCE());\n }\n function UShort__toString_impl_edaoee($this) {\n // Inline function 'kotlin.UShort.toInt' call\n return (_UShort___get_data__impl__g0245($this) & 65535).toString();\n }\n function UShort__hashCode_impl_ywngrv($this) {\n return $this;\n }\n function UShort__equals_impl_7t9pdz($this, other) {\n if (!(other instanceof UShort))\n return false;\n if (!($this === (other instanceof UShort ? other.hk_1 : THROW_CCE())))\n return false;\n return true;\n }\n function UShort(data) {\n Companion_getInstance_16();\n this.hk_1 = data;\n }\n protoOf(UShort).ik = function (other) {\n return UShort__compareTo_impl_1pfgyc(this.hk_1, other);\n };\n protoOf(UShort).d = function (other) {\n return UShort__compareTo_impl_1pfgyc_0(this, other);\n };\n protoOf(UShort).toString = function () {\n return UShort__toString_impl_edaoee(this.hk_1);\n };\n protoOf(UShort).hashCode = function () {\n return UShort__hashCode_impl_ywngrv(this.hk_1);\n };\n protoOf(UShort).equals = function (other) {\n return UShort__equals_impl_7t9pdz(this.hk_1, other);\n };\n function _UShortArray___init__impl__9b26ef(storage) {\n return storage;\n }\n function _UShortArray___get_storage__impl__t2jpv5($this) {\n return $this;\n }\n function _UShortArray___init__impl__9b26ef_0(size) {\n return _UShortArray___init__impl__9b26ef(new Int16Array(size));\n }\n function UShortArray__get_impl_fnbhmx($this, index) {\n // Inline function 'kotlin.toUShort' call\n var this_0 = _UShortArray___get_storage__impl__t2jpv5($this)[index];\n return _UShort___init__impl__jigrne(this_0);\n }\n function UShortArray__set_impl_6d8whp($this, index, value) {\n var tmp = _UShortArray___get_storage__impl__t2jpv5($this);\n // Inline function 'kotlin.UShort.toShort' call\n tmp[index] = _UShort___get_data__impl__g0245(value);\n }\n function _UShortArray___get_size__impl__jqto1b($this) {\n return _UShortArray___get_storage__impl__t2jpv5($this).length;\n }\n function UShortArray__iterator_impl_ktpenn($this) {\n return new Iterator_2(_UShortArray___get_storage__impl__t2jpv5($this));\n }\n function Iterator_2(array) {\n this.jk_1 = array;\n this.kk_1 = 0;\n }\n protoOf(Iterator_2).u = function () {\n return this.kk_1 < this.jk_1.length;\n };\n protoOf(Iterator_2).lk = function () {\n var tmp;\n if (this.kk_1 < this.jk_1.length) {\n // Inline function 'kotlin.toUShort' call\n var tmp1 = this.kk_1;\n this.kk_1 = tmp1 + 1 | 0;\n var this_0 = this.jk_1[tmp1];\n tmp = _UShort___init__impl__jigrne(this_0);\n } else {\n throw NoSuchElementException_init_$Create$_0(this.kk_1.toString());\n }\n return tmp;\n };\n protoOf(Iterator_2).w = function () {\n return new UShort(this.lk());\n };\n function UShortArray__contains_impl_vo7k3g($this, element) {\n var tmp = !(new UShort(element) == null) ? new UShort(element) : THROW_CCE();\n if (!(tmp instanceof UShort))\n return false;\n var tmp_0 = _UShortArray___get_storage__impl__t2jpv5($this);\n // Inline function 'kotlin.UShort.toShort' call\n var tmp$ret$0 = _UShort___get_data__impl__g0245(element);\n return contains_3(tmp_0, tmp$ret$0);\n }\n function UShortArray__contains_impl_vo7k3g_0($this, element) {\n if (!(element instanceof UShort))\n return false;\n return UShortArray__contains_impl_vo7k3g($this.fe_1, element instanceof UShort ? element.hk_1 : THROW_CCE());\n }\n function UShortArray__containsAll_impl_vlaaxp($this, elements) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = isInterface(elements, Collection) ? elements : THROW_CCE();\n var tmp;\n if (isInterface(this_0, Collection)) {\n tmp = this_0.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.UShortArray.containsAll.' call\n var tmp_0;\n if (element instanceof UShort) {\n var tmp_1 = _UShortArray___get_storage__impl__t2jpv5($this);\n // Inline function 'kotlin.UShort.toShort' call\n var this_1 = element.hk_1;\n var tmp$ret$1 = _UShort___get_data__impl__g0245(this_1);\n tmp_0 = contains_3(tmp_1, tmp$ret$1);\n } else {\n tmp_0 = false;\n }\n if (!tmp_0) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n }\n function UShortArray__containsAll_impl_vlaaxp_0($this, elements) {\n return UShortArray__containsAll_impl_vlaaxp($this.fe_1, elements);\n }\n function UShortArray__isEmpty_impl_cdd9l0($this) {\n return _UShortArray___get_storage__impl__t2jpv5($this).length === 0;\n }\n function UShortArray__toString_impl_omz03z($this) {\n return 'UShortArray(storage=' + toString_1($this) + ')';\n }\n function UShortArray__hashCode_impl_2vt3b4($this) {\n return hashCode($this);\n }\n function UShortArray__equals_impl_tyc3mk($this, other) {\n if (!(other instanceof UShortArray))\n return false;\n var tmp0_other_with_cast = other instanceof UShortArray ? other.fe_1 : THROW_CCE();\n if (!equals_0($this, tmp0_other_with_cast))\n return false;\n return true;\n }\n function UShortArray(storage) {\n this.fe_1 = storage;\n }\n protoOf(UShortArray).n = function () {\n return _UShortArray___get_size__impl__jqto1b(this.fe_1);\n };\n protoOf(UShortArray).t = function () {\n return UShortArray__iterator_impl_ktpenn(this.fe_1);\n };\n protoOf(UShortArray).mk = function (element) {\n return UShortArray__contains_impl_vo7k3g(this.fe_1, element);\n };\n protoOf(UShortArray).p = function (element) {\n return UShortArray__contains_impl_vo7k3g_0(this, element);\n };\n protoOf(UShortArray).nk = function (elements) {\n return UShortArray__containsAll_impl_vlaaxp(this.fe_1, elements);\n };\n protoOf(UShortArray).a1 = function (elements) {\n return UShortArray__containsAll_impl_vlaaxp_0(this, elements);\n };\n protoOf(UShortArray).b1 = function () {\n return UShortArray__isEmpty_impl_cdd9l0(this.fe_1);\n };\n protoOf(UShortArray).toString = function () {\n return UShortArray__toString_impl_omz03z(this.fe_1);\n };\n protoOf(UShortArray).hashCode = function () {\n return UShortArray__hashCode_impl_2vt3b4(this.fe_1);\n };\n protoOf(UShortArray).equals = function (other) {\n return UShortArray__equals_impl_tyc3mk(this.fe_1, other);\n };\n function toULongOrNull(_this__u8e3s4) {\n return toULongOrNull_0(_this__u8e3s4, 10);\n }\n function toUInt(_this__u8e3s4) {\n var tmp0_elvis_lhs = toUIntOrNull(_this__u8e3s4);\n var tmp;\n var tmp_0 = tmp0_elvis_lhs;\n if ((tmp_0 == null ? null : new UInt(tmp_0)) == null) {\n numberFormatError(_this__u8e3s4);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function toULong(_this__u8e3s4) {\n var tmp0_elvis_lhs = toULongOrNull(_this__u8e3s4);\n var tmp;\n var tmp_0 = tmp0_elvis_lhs;\n if ((tmp_0 == null ? null : new ULong(tmp_0)) == null) {\n numberFormatError(_this__u8e3s4);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function toUByte(_this__u8e3s4) {\n var tmp0_elvis_lhs = toUByteOrNull(_this__u8e3s4);\n var tmp;\n var tmp_0 = tmp0_elvis_lhs;\n if ((tmp_0 == null ? null : new UByte(tmp_0)) == null) {\n numberFormatError(_this__u8e3s4);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function toUShort(_this__u8e3s4) {\n var tmp0_elvis_lhs = toUShortOrNull(_this__u8e3s4);\n var tmp;\n var tmp_0 = tmp0_elvis_lhs;\n if ((tmp_0 == null ? null : new UShort(tmp_0)) == null) {\n numberFormatError(_this__u8e3s4);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function toULongOrNull_0(_this__u8e3s4, radix) {\n checkRadix(radix);\n var length = _this__u8e3s4.length;\n if (length === 0)\n return null;\n Companion_getInstance_15();\n var limit = _ULong___init__impl__c78o9k(new Long(-1, -1));\n var start;\n var firstChar = charSequenceGet(_this__u8e3s4, 0);\n if (Char__compareTo_impl_ypi4mb(firstChar, _Char___init__impl__6a9atx(48)) < 0) {\n if (length === 1 ? true : !(firstChar === _Char___init__impl__6a9atx(43)))\n return null;\n start = 1;\n } else {\n start = 0;\n }\n var limitForMaxRadix = _ULong___init__impl__c78o9k(new Long(477218588, 119304647));\n var limitBeforeMul = limitForMaxRadix;\n // Inline function 'kotlin.toULong' call\n var uradix = _ULong___init__impl__c78o9k(toLong_0(radix));\n var result = _ULong___init__impl__c78o9k(new Long(0, 0));\n var inductionVariable = start;\n if (inductionVariable < length)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var digit = digitOf(charSequenceGet(_this__u8e3s4, i), radix);\n if (digit < 0)\n return null;\n // Inline function 'kotlin.ULong.compareTo' call\n var this_0 = result;\n var other = limitBeforeMul;\n if (ulongCompare(_ULong___get_data__impl__fggpzb(this_0), _ULong___get_data__impl__fggpzb(other)) > 0) {\n if (equals_0(limitBeforeMul, limitForMaxRadix)) {\n // Inline function 'kotlin.ULong.div' call\n limitBeforeMul = ulongDivide(limit, uradix);\n // Inline function 'kotlin.ULong.compareTo' call\n var this_1 = result;\n var other_0 = limitBeforeMul;\n if (ulongCompare(_ULong___get_data__impl__fggpzb(this_1), _ULong___get_data__impl__fggpzb(other_0)) > 0) {\n return null;\n }\n } else {\n return null;\n }\n }\n // Inline function 'kotlin.ULong.times' call\n var this_2 = result;\n result = _ULong___init__impl__c78o9k(_ULong___get_data__impl__fggpzb(this_2).aa(_ULong___get_data__impl__fggpzb(uradix)));\n var beforeAdding = result;\n // Inline function 'kotlin.ULong.plus' call\n var this_3 = result;\n // Inline function 'kotlin.toUInt' call\n // Inline function 'kotlin.ULong.plus' call\n // Inline function 'kotlin.UInt.toULong' call\n var this_4 = _UInt___init__impl__l7qpdl(digit);\n var other_1 = _ULong___init__impl__c78o9k(toLong_0(_UInt___get_data__impl__f0vqqw(this_4)).bc(new Long(-1, 0)));\n result = _ULong___init__impl__c78o9k(_ULong___get_data__impl__fggpzb(this_3).s6(_ULong___get_data__impl__fggpzb(other_1)));\n // Inline function 'kotlin.ULong.compareTo' call\n var this_5 = result;\n if (ulongCompare(_ULong___get_data__impl__fggpzb(this_5), _ULong___get_data__impl__fggpzb(beforeAdding)) < 0)\n return null;\n }\n while (inductionVariable < length);\n return result;\n }\n function toUIntOrNull(_this__u8e3s4) {\n return toUIntOrNull_0(_this__u8e3s4, 10);\n }\n function toUByteOrNull(_this__u8e3s4) {\n return toUByteOrNull_0(_this__u8e3s4, 10);\n }\n function toUShortOrNull(_this__u8e3s4) {\n return toUShortOrNull_0(_this__u8e3s4, 10);\n }\n function toUIntOrNull_0(_this__u8e3s4, radix) {\n checkRadix(radix);\n var length = _this__u8e3s4.length;\n if (length === 0)\n return null;\n Companion_getInstance_14();\n var limit = _UInt___init__impl__l7qpdl(-1);\n var start;\n var firstChar = charSequenceGet(_this__u8e3s4, 0);\n if (Char__compareTo_impl_ypi4mb(firstChar, _Char___init__impl__6a9atx(48)) < 0) {\n if (length === 1 ? true : !(firstChar === _Char___init__impl__6a9atx(43)))\n return null;\n start = 1;\n } else {\n start = 0;\n }\n var limitForMaxRadix = _UInt___init__impl__l7qpdl(119304647);\n var limitBeforeMul = limitForMaxRadix;\n // Inline function 'kotlin.toUInt' call\n var uradix = _UInt___init__impl__l7qpdl(radix);\n var result = _UInt___init__impl__l7qpdl(0);\n var inductionVariable = start;\n if (inductionVariable < length)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var digit = digitOf(charSequenceGet(_this__u8e3s4, i), radix);\n if (digit < 0)\n return null;\n // Inline function 'kotlin.UInt.compareTo' call\n var this_0 = result;\n var other = limitBeforeMul;\n if (uintCompare(_UInt___get_data__impl__f0vqqw(this_0), _UInt___get_data__impl__f0vqqw(other)) > 0) {\n if (limitBeforeMul === limitForMaxRadix) {\n // Inline function 'kotlin.UInt.div' call\n limitBeforeMul = uintDivide(limit, uradix);\n // Inline function 'kotlin.UInt.compareTo' call\n var this_1 = result;\n var other_0 = limitBeforeMul;\n if (uintCompare(_UInt___get_data__impl__f0vqqw(this_1), _UInt___get_data__impl__f0vqqw(other_0)) > 0) {\n return null;\n }\n } else {\n return null;\n }\n }\n // Inline function 'kotlin.UInt.times' call\n var this_2 = result;\n result = _UInt___init__impl__l7qpdl(imul(_UInt___get_data__impl__f0vqqw(this_2), _UInt___get_data__impl__f0vqqw(uradix)));\n var beforeAdding = result;\n // Inline function 'kotlin.UInt.plus' call\n var this_3 = result;\n // Inline function 'kotlin.toUInt' call\n var other_1 = _UInt___init__impl__l7qpdl(digit);\n result = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(this_3) + _UInt___get_data__impl__f0vqqw(other_1) | 0);\n // Inline function 'kotlin.UInt.compareTo' call\n var this_4 = result;\n if (uintCompare(_UInt___get_data__impl__f0vqqw(this_4), _UInt___get_data__impl__f0vqqw(beforeAdding)) < 0)\n return null;\n }\n while (inductionVariable < length);\n return result;\n }\n function toUByteOrNull_0(_this__u8e3s4, radix) {\n var tmp0_elvis_lhs = toUIntOrNull_0(_this__u8e3s4, radix);\n var tmp;\n var tmp_0 = tmp0_elvis_lhs;\n if ((tmp_0 == null ? null : new UInt(tmp_0)) == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var int = tmp;\n // Inline function 'kotlin.UInt.compareTo' call\n Companion_getInstance_13();\n // Inline function 'kotlin.UInt.compareTo' call\n // Inline function 'kotlin.UByte.toUInt' call\n var this_0 = _UByte___init__impl__g9hnc4(-1);\n var other = _UInt___init__impl__l7qpdl(_UByte___get_data__impl__jof9qr(this_0) & 255);\n if (uintCompare(_UInt___get_data__impl__f0vqqw(int), _UInt___get_data__impl__f0vqqw(other)) > 0)\n return null;\n // Inline function 'kotlin.UInt.toUByte' call\n // Inline function 'kotlin.toUByte' call\n var this_1 = _UInt___get_data__impl__f0vqqw(int);\n return _UByte___init__impl__g9hnc4(toByte(this_1));\n }\n function toUShortOrNull_0(_this__u8e3s4, radix) {\n var tmp0_elvis_lhs = toUIntOrNull_0(_this__u8e3s4, radix);\n var tmp;\n var tmp_0 = tmp0_elvis_lhs;\n if ((tmp_0 == null ? null : new UInt(tmp_0)) == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var int = tmp;\n // Inline function 'kotlin.UInt.compareTo' call\n Companion_getInstance_16();\n // Inline function 'kotlin.UInt.compareTo' call\n // Inline function 'kotlin.UShort.toUInt' call\n var this_0 = _UShort___init__impl__jigrne(-1);\n var other = _UInt___init__impl__l7qpdl(_UShort___get_data__impl__g0245(this_0) & 65535);\n if (uintCompare(_UInt___get_data__impl__f0vqqw(int), _UInt___get_data__impl__f0vqqw(other)) > 0)\n return null;\n // Inline function 'kotlin.UInt.toUShort' call\n // Inline function 'kotlin.toUShort' call\n var this_1 = _UInt___get_data__impl__f0vqqw(int);\n return _UShort___init__impl__jigrne(toShort(this_1));\n }\n function uintCompare(v1, v2) {\n return compareTo_0(v1 ^ IntCompanionObject_instance.MIN_VALUE, v2 ^ IntCompanionObject_instance.MIN_VALUE);\n }\n function uintDivide(v1, v2) {\n // Inline function 'kotlin.toUInt' call\n // Inline function 'kotlin.UInt.toLong' call\n var tmp = toLong_0(_UInt___get_data__impl__f0vqqw(v1)).bc(new Long(-1, 0));\n // Inline function 'kotlin.UInt.toLong' call\n var tmp$ret$1 = toLong_0(_UInt___get_data__impl__f0vqqw(v2)).bc(new Long(-1, 0));\n var this_0 = tmp.z9(tmp$ret$1);\n return _UInt___init__impl__l7qpdl(this_0.wa());\n }\n function ulongCompare(v1, v2) {\n Companion_getInstance_4();\n var tmp = v1.dc(new Long(0, -2147483648));\n Companion_getInstance_4();\n return tmp.ba(v2.dc(new Long(0, -2147483648)));\n }\n function ulongDivide(v1, v2) {\n // Inline function 'kotlin.ULong.toLong' call\n var dividend = _ULong___get_data__impl__fggpzb(v1);\n // Inline function 'kotlin.ULong.toLong' call\n var divisor = _ULong___get_data__impl__fggpzb(v2);\n if (divisor.ba(new Long(0, 0)) < 0) {\n var tmp;\n // Inline function 'kotlin.ULong.compareTo' call\n if (ulongCompare(_ULong___get_data__impl__fggpzb(v1), _ULong___get_data__impl__fggpzb(v2)) < 0) {\n tmp = _ULong___init__impl__c78o9k(new Long(0, 0));\n } else {\n tmp = _ULong___init__impl__c78o9k(new Long(1, 0));\n }\n return tmp;\n }\n if (dividend.ba(new Long(0, 0)) >= 0) {\n return _ULong___init__impl__c78o9k(dividend.z9(divisor));\n }\n var quotient = dividend.ac(1).z9(divisor).yb(1);\n var rem = dividend.ub(quotient.aa(divisor));\n // Inline function 'kotlin.Long.plus' call\n var tmp_0;\n // Inline function 'kotlin.ULong.compareTo' call\n var this_0 = _ULong___init__impl__c78o9k(rem);\n var other = _ULong___init__impl__c78o9k(divisor);\n if (ulongCompare(_ULong___get_data__impl__fggpzb(this_0), _ULong___get_data__impl__fggpzb(other)) >= 0) {\n tmp_0 = 1;\n } else {\n tmp_0 = 0;\n }\n var other_0 = tmp_0;\n var tmp$ret$4 = quotient.s6(toLong_0(other_0));\n return _ULong___init__impl__c78o9k(tmp$ret$4);\n }\n function ulongToString(v) {\n return ulongToString_0(v, 10);\n }\n function ulongToString_0(v, base) {\n if (v.ba(new Long(0, 0)) >= 0)\n return toString_2(v, base);\n // Inline function 'kotlin.Long.div' call\n var quotient = v.ac(1).z9(toLong_0(base)).yb(1);\n // Inline function 'kotlin.Long.times' call\n var tmp$ret$1 = quotient.aa(toLong_0(base));\n var rem = v.ub(tmp$ret$1);\n if (rem.ba(toLong_0(base)) >= 0) {\n // Inline function 'kotlin.Long.minus' call\n rem = rem.ub(toLong_0(base));\n // Inline function 'kotlin.Long.plus' call\n quotient = quotient.s6(toLong_0(1));\n }\n return toString_2(quotient, base) + toString_2(rem, base);\n }\n //region block: post-declaration\n protoOf(InternalHashMap).g4 = containsAllEntries;\n protoOf(ValueTimeMark).ci = compareTo;\n //endregion\n //region block: init\n Unit_instance = new Unit();\n ByteCompanionObject_instance = new ByteCompanionObject();\n ShortCompanionObject_instance = new ShortCompanionObject();\n IntCompanionObject_instance = new IntCompanionObject();\n FloatCompanionObject_instance = new FloatCompanionObject();\n DoubleCompanionObject_instance = new DoubleCompanionObject();\n StringCompanionObject_instance = new StringCompanionObject();\n BooleanCompanionObject_instance = new BooleanCompanionObject();\n _stableSortingIsSupported = null;\n Companion_instance_0 = new Companion_0();\n DateNowTimeSource_instance = new DateNowTimeSource();\n PI = 3.141592653589793;\n Companion_instance_3 = new Companion_3();\n CompletedContinuation_instance = new CompletedContinuation();\n Companion_instance_5 = new Companion_5();\n Companion_instance_6 = new Companion_6();\n Companion_instance_7 = new Companion_7();\n EmptyIterator_instance = new EmptyIterator();\n EmptySequence_instance = new EmptySequence();\n NaturalOrderComparator_instance = new NaturalOrderComparator();\n Key_instance = new Key();\n Companion_instance_10 = new Companion_10();\n Monotonic_instance = new Monotonic();\n UNINITIALIZED_VALUE_instance = new UNINITIALIZED_VALUE();\n Companion_instance_12 = new Companion_12();\n //endregion\n //region block: exports\n _.$_$ = _.$_$ || {};\n _.$_$.a = createKType;\n _.$_$.b = findAssociatedObject;\n _.$_$.c = getKClassFromExpression;\n _.$_$.d = getKClass;\n _.$_$.e = VOID;\n _.$_$.f = LazyThreadSafetyMode_PUBLICATION_getInstance;\n _.$_$.g = ArrayList_init_$Create$_0;\n _.$_$.h = ArrayList_init_$Create$;\n _.$_$.i = ArrayList_init_$Create$_1;\n _.$_$.j = HashMap_init_$Create$_0;\n _.$_$.k = HashMap_init_$Create$;\n _.$_$.l = HashMap_init_$Create$_1;\n _.$_$.m = HashSet_init_$Create$_1;\n _.$_$.n = HashSet_init_$Create$;\n _.$_$.o = HashSet_init_$Create$_0;\n _.$_$.p = LinkedHashMap_init_$Create$_0;\n _.$_$.q = LinkedHashMap_init_$Create$;\n _.$_$.r = LinkedHashMap_init_$Create$_1;\n _.$_$.s = LinkedHashSet_init_$Create$;\n _.$_$.t = LinkedHashSet_init_$Create$_0;\n _.$_$.u = Regex_init_$Create$;\n _.$_$.v = StringBuilder_init_$Create$;\n _.$_$.w = StringBuilder_init_$Create$_0;\n _.$_$.x = Error_init_$Create$_0;\n _.$_$.y = Exception_init_$Init$_0;\n _.$_$.z = Exception_init_$Create$_0;\n _.$_$.a1 = Exception_init_$Init$_1;\n _.$_$.b1 = IllegalArgumentException_init_$Init$;\n _.$_$.c1 = IllegalArgumentException_init_$Init$_0;\n _.$_$.d1 = IllegalArgumentException_init_$Create$_0;\n _.$_$.e1 = IllegalArgumentException_init_$Init$_1;\n _.$_$.f1 = IllegalStateException_init_$Create$_0;\n _.$_$.g1 = IndexOutOfBoundsException_init_$Create$_0;\n _.$_$.h1 = NoSuchElementException_init_$Create$;\n _.$_$.i1 = NoSuchElementException_init_$Create$_0;\n _.$_$.j1 = NumberFormatException_init_$Create$_0;\n _.$_$.k1 = UnsupportedOperationException_init_$Create$_0;\n _.$_$.l1 = _Duration___get_inWholeNanoseconds__impl__r5x4mr;\n _.$_$.m1 = Duration__plus_impl_yu9v8f;\n _.$_$.n1 = Duration__toIsoString_impl_9h6wsm;\n _.$_$.o1 = _Char___init__impl__6a9atx;\n _.$_$.p1 = Char__minus_impl_a2frrh;\n _.$_$.q1 = Char__toInt_impl_vasixd;\n _.$_$.r1 = toString;\n _.$_$.s1 = _Result___init__impl__xyqfz8;\n _.$_$.t1 = _Result___get_isFailure__impl__jpiriv;\n _.$_$.u1 = _Result___get_value__impl__bjfvqg;\n _.$_$.v1 = _UByte___init__impl__g9hnc4;\n _.$_$.w1 = _UByte___get_data__impl__jof9qr;\n _.$_$.x1 = UByte__toString_impl_v72jg;\n _.$_$.y1 = _UByteArray___init__impl__ip4y9n;\n _.$_$.z1 = _UByteArray___init__impl__ip4y9n_0;\n _.$_$.a2 = UByteArray__get_impl_t5f3hv;\n _.$_$.b2 = UByteArray__set_impl_jvcicn;\n _.$_$.c2 = _UByteArray___get_size__impl__h6pkdv;\n _.$_$.d2 = _UByteArray___get_storage__impl__d4kctt;\n _.$_$.e2 = _UInt___init__impl__l7qpdl;\n _.$_$.f2 = _UInt___get_data__impl__f0vqqw;\n _.$_$.g2 = UInt__toString_impl_dbgl21;\n _.$_$.h2 = _UIntArray___init__impl__ghjpc6_0;\n _.$_$.i2 = _UIntArray___init__impl__ghjpc6;\n _.$_$.j2 = UIntArray__get_impl_gp5kza;\n _.$_$.k2 = UIntArray__set_impl_7f2zu2;\n _.$_$.l2 = _UIntArray___get_size__impl__r6l8ci;\n _.$_$.m2 = _UIntArray___get_storage__impl__92a0v0;\n _.$_$.n2 = _ULong___init__impl__c78o9k;\n _.$_$.o2 = _ULong___get_data__impl__fggpzb;\n _.$_$.p2 = ULong__toString_impl_f9au7k;\n _.$_$.q2 = _ULongArray___init__impl__twm1l3_0;\n _.$_$.r2 = _ULongArray___init__impl__twm1l3;\n _.$_$.s2 = ULongArray__get_impl_pr71q9;\n _.$_$.t2 = ULongArray__set_impl_z19mvh;\n _.$_$.u2 = _ULongArray___get_size__impl__ju6dtr;\n _.$_$.v2 = _ULongArray___get_storage__impl__28e64j;\n _.$_$.w2 = _UShort___init__impl__jigrne;\n _.$_$.x2 = _UShort___get_data__impl__g0245;\n _.$_$.y2 = UShort__toString_impl_edaoee;\n _.$_$.z2 = _UShortArray___init__impl__9b26ef_0;\n _.$_$.a3 = _UShortArray___init__impl__9b26ef;\n _.$_$.b3 = UShortArray__get_impl_fnbhmx;\n _.$_$.c3 = UShortArray__set_impl_6d8whp;\n _.$_$.d3 = _UShortArray___get_size__impl__jqto1b;\n _.$_$.e3 = _UShortArray___get_storage__impl__t2jpv5;\n _.$_$.f3 = BooleanCompanionObject_instance;\n _.$_$.g3 = ByteCompanionObject_instance;\n _.$_$.h3 = DoubleCompanionObject_instance;\n _.$_$.i3 = FloatCompanionObject_instance;\n _.$_$.j3 = IntCompanionObject_instance;\n _.$_$.k3 = ShortCompanionObject_instance;\n _.$_$.l3 = StringCompanionObject_instance;\n _.$_$.m3 = Default_getInstance;\n _.$_$.n3 = PrimitiveClasses_getInstance;\n _.$_$.o3 = Companion_getInstance_11;\n _.$_$.p3 = Monotonic_instance;\n _.$_$.q3 = Companion_getInstance_2;\n _.$_$.r3 = Companion_getInstance_4;\n _.$_$.s3 = Companion_instance_12;\n _.$_$.t3 = Companion_getInstance_13;\n _.$_$.u3 = Companion_getInstance_14;\n _.$_$.v3 = Companion_getInstance_15;\n _.$_$.w3 = Companion_getInstance_16;\n _.$_$.x3 = Unit_instance;\n _.$_$.y3 = ArrayList;\n _.$_$.z3 = Collection;\n _.$_$.a4 = HashMap;\n _.$_$.b4 = HashSet;\n _.$_$.c4 = LinkedHashMap;\n _.$_$.d4 = LinkedHashSet;\n _.$_$.e4 = List;\n _.$_$.f4 = Entry;\n _.$_$.g4 = Map_0;\n _.$_$.h4 = MutableList;\n _.$_$.i4 = MutableMap;\n _.$_$.j4 = MutableSet;\n _.$_$.k4 = Set;\n _.$_$.l4 = addAll;\n _.$_$.m4 = addAll_0;\n _.$_$.n4 = addAll_1;\n _.$_$.o4 = any_0;\n _.$_$.p4 = any;\n _.$_$.q4 = asIterable;\n _.$_$.r4 = asList;\n _.$_$.s4 = asSequence_0;\n _.$_$.t4 = asSequence;\n _.$_$.u4 = checkIndexOverflow;\n _.$_$.v4 = collectionSizeOrDefault;\n _.$_$.w4 = contains_5;\n _.$_$.x4 = contains_0;\n _.$_$.y4 = contentDeepEquals;\n _.$_$.z4 = contentEquals_4;\n _.$_$.a5 = contentHashCode;\n _.$_$.b5 = contentToString;\n _.$_$.c5 = copyOf_4;\n _.$_$.d5 = copyOf_2;\n _.$_$.e5 = copyOf_6;\n _.$_$.f5 = copyOf;\n _.$_$.g5 = copyOf_5;\n _.$_$.h5 = copyOf_0;\n _.$_$.i5 = copyOf_1;\n _.$_$.j5 = copyOf_7;\n _.$_$.k5 = copyOf_3;\n _.$_$.l5 = copyToArray;\n _.$_$.m5 = distinct;\n _.$_$.n5 = distinct_0;\n _.$_$.o5 = emptyList;\n _.$_$.p5 = emptyMap;\n _.$_$.q5 = emptySet;\n _.$_$.r5 = filterNotNull;\n _.$_$.s5 = filterNotNull_0;\n _.$_$.t5 = firstOrNull_0;\n _.$_$.u5 = firstOrNull;\n _.$_$.v5 = first_0;\n _.$_$.w5 = first;\n _.$_$.x5 = flatten_0;\n _.$_$.y5 = flatten;\n _.$_$.z5 = getOrNull;\n _.$_$.a6 = getValue;\n _.$_$.b6 = indexOf;\n _.$_$.c6 = get_indices_0;\n _.$_$.d6 = get_indices;\n _.$_$.e6 = joinToString_0;\n _.$_$.f6 = joinToString;\n _.$_$.g6 = get_lastIndex_1;\n _.$_$.h6 = get_lastIndex_2;\n _.$_$.i6 = get_lastIndex;\n _.$_$.j6 = lastOrNull_0;\n _.$_$.k6 = lastOrNull;\n _.$_$.l6 = last_0;\n _.$_$.m6 = last;\n _.$_$.n6 = listOfNotNull;\n _.$_$.o6 = listOf;\n _.$_$.p6 = listOf_0;\n _.$_$.q6 = mapCapacity;\n _.$_$.r6 = mapOf;\n _.$_$.s6 = mapOf_0;\n _.$_$.t6 = minus;\n _.$_$.u6 = mutableListOf;\n _.$_$.v6 = none;\n _.$_$.w6 = none_0;\n _.$_$.x6 = plus_5;\n _.$_$.y6 = plus_6;\n _.$_$.z6 = plus_1;\n _.$_$.a7 = plus_3;\n _.$_$.b7 = plus;\n _.$_$.c7 = plus_0;\n _.$_$.d7 = removeAll;\n _.$_$.e7 = removeFirst;\n _.$_$.f7 = removeLast;\n _.$_$.g7 = reversedArray;\n _.$_$.h7 = setOf;\n _.$_$.i7 = setOf_0;\n _.$_$.j7 = singleOrNull;\n _.$_$.k7 = sortWith;\n _.$_$.l7 = sortWith_0;\n _.$_$.m7 = sortedWith_0;\n _.$_$.n7 = sortedWith;\n _.$_$.o7 = sorted;\n _.$_$.p7 = sort_0;\n _.$_$.q7 = sort;\n _.$_$.r7 = subtract;\n _.$_$.s7 = toBooleanArray;\n _.$_$.t7 = toHashSet;\n _.$_$.u7 = toList_0;\n _.$_$.v7 = toList;\n _.$_$.w7 = toMap;\n _.$_$.x7 = toMutableList_0;\n _.$_$.y7 = toMutableList;\n _.$_$.z7 = toMutableMap;\n _.$_$.a8 = toSet_0;\n _.$_$.b8 = withIndex;\n _.$_$.c8 = zip;\n _.$_$.d8 = compareValues;\n _.$_$.e8 = get_COROUTINE_SUSPENDED;\n _.$_$.f8 = CoroutineImpl;\n _.$_$.g8 = enumEntries;\n _.$_$.h8 = println;\n _.$_$.i8 = arrayIterator;\n _.$_$.j8 = booleanArray;\n _.$_$.k8 = captureStack;\n _.$_$.l8 = charArrayOf;\n _.$_$.m8 = charArray;\n _.$_$.n8 = charSequenceGet;\n _.$_$.o8 = charSequenceLength;\n _.$_$.p8 = charSequenceSubSequence;\n _.$_$.q8 = classMeta;\n _.$_$.r8 = compareTo_0;\n _.$_$.s8 = defineProp;\n _.$_$.t8 = equals_0;\n _.$_$.u8 = fillArrayVal;\n _.$_$.v8 = getBooleanHashCode;\n _.$_$.w8 = getLocalDelegateReference;\n _.$_$.x8 = getNumberHashCode;\n _.$_$.y8 = getPropertyCallableRef;\n _.$_$.z8 = getStringHashCode;\n _.$_$.a9 = hashCode;\n _.$_$.b9 = interfaceMeta;\n _.$_$.c9 = isArray;\n _.$_$.d9 = isBooleanArray;\n _.$_$.e9 = isByteArray;\n _.$_$.f9 = isCharArray;\n _.$_$.g9 = isDoubleArray;\n _.$_$.h9 = isFloatArray;\n _.$_$.i9 = isIntArray;\n _.$_$.j9 = isInterface;\n _.$_$.k9 = isLongArray;\n _.$_$.l9 = isShortArray;\n _.$_$.m9 = get_js;\n _.$_$.n9 = longArray;\n _.$_$.o9 = numberRangeToNumber;\n _.$_$.p9 = numberToChar;\n _.$_$.q9 = numberToInt;\n _.$_$.r9 = numberToLong;\n _.$_$.s9 = objectCreate;\n _.$_$.t9 = objectMeta;\n _.$_$.u9 = protoOf;\n _.$_$.v9 = setMetadataFor;\n _.$_$.w9 = toByte;\n _.$_$.x9 = toLong_0;\n _.$_$.y9 = toShort;\n _.$_$.z9 = toString_1;\n _.$_$.aa = get_PI;\n _.$_$.ba = roundToInt;\n _.$_$.ca = round;\n _.$_$.da = Random_0;\n _.$_$.ea = ClosedRange;\n _.$_$.fa = coerceAtLeast;\n _.$_$.ga = coerceAtMost;\n _.$_$.ha = contains_6;\n _.$_$.ia = reversed;\n _.$_$.ja = step;\n _.$_$.ka = until;\n _.$_$.la = KClass;\n _.$_$.ma = KProperty0;\n _.$_$.na = KProperty1;\n _.$_$.oa = KTypeParameter;\n _.$_$.pa = SequenceScope;\n _.$_$.qa = any_1;\n _.$_$.ra = asSequence_1;\n _.$_$.sa = distinct_1;\n _.$_$.ta = emptySequence;\n _.$_$.ua = filter;\n _.$_$.va = firstOrNull_1;\n _.$_$.wa = flatMap;\n _.$_$.xa = flatten_1;\n _.$_$.ya = mapNotNull;\n _.$_$.za = map;\n _.$_$.ab = minus_0;\n _.$_$.bb = onEach;\n _.$_$.cb = plus_2;\n _.$_$.db = sequenceOf;\n _.$_$.eb = sequence;\n _.$_$.fb = toList_1;\n _.$_$.gb = toSet_1;\n _.$_$.hb = contains_7;\n _.$_$.ib = contains_8;\n _.$_$.jb = endsWith;\n _.$_$.kb = equals;\n _.$_$.lb = indexOf_5;\n _.$_$.mb = indexOf_6;\n _.$_$.nb = isBlank;\n _.$_$.ob = isLowerCase;\n _.$_$.pb = lastIndexOf_0;\n _.$_$.qb = removeSuffix;\n _.$_$.rb = repeat;\n _.$_$.sb = replace;\n _.$_$.tb = single_2;\n _.$_$.ub = split;\n _.$_$.vb = startsWith;\n _.$_$.wb = substringAfter;\n _.$_$.xb = substringBefore;\n _.$_$.yb = substring;\n _.$_$.zb = titlecase;\n _.$_$.ac = toBooleanStrictOrNull;\n _.$_$.bc = toDoubleOrNull;\n _.$_$.cc = toDouble;\n _.$_$.dc = toIntOrNull;\n _.$_$.ec = toInt;\n _.$_$.fc = toLongOrNull;\n _.$_$.gc = toUByte;\n _.$_$.hc = toUInt;\n _.$_$.ic = toULongOrNull;\n _.$_$.jc = toULong;\n _.$_$.kc = toUShort;\n _.$_$.lc = trimIndent;\n _.$_$.mc = Duration;\n _.$_$.nc = ValueTimeMark;\n _.$_$.oc = Char;\n _.$_$.pc = Comparator;\n _.$_$.qc = DeepRecursiveFunction;\n _.$_$.rc = DeepRecursiveScope;\n _.$_$.sc = Enum;\n _.$_$.tc = Error_0;\n _.$_$.uc = Exception;\n _.$_$.vc = IllegalArgumentException;\n _.$_$.wc = Long;\n _.$_$.xc = NotImplementedError;\n _.$_$.yc = Pair;\n _.$_$.zc = Result;\n _.$_$.ad = THROW_CCE;\n _.$_$.bd = THROW_IAE;\n _.$_$.cd = THROW_ISE;\n _.$_$.dd = Triple;\n _.$_$.ed = UByteArray;\n _.$_$.fd = UByte;\n _.$_$.gd = UIntArray;\n _.$_$.hd = UInt;\n _.$_$.id = ULongArray;\n _.$_$.jd = ULong;\n _.$_$.kd = UShortArray;\n _.$_$.ld = UShort;\n _.$_$.md = Unit;\n _.$_$.nd = arrayOf;\n _.$_$.od = countTrailingZeroBits;\n _.$_$.pd = createFailure;\n _.$_$.qd = ensureNotNull;\n _.$_$.rd = invoke;\n _.$_$.sd = isFinite;\n _.$_$.td = isFinite_0;\n _.$_$.ud = isNaN_0;\n _.$_$.vd = lazy;\n _.$_$.wd = lazy_0;\n _.$_$.xd = noWhenBranchMatchedException;\n _.$_$.yd = plus_4;\n _.$_$.zd = throwUninitializedPropertyAccessException;\n _.$_$.ae = toString_0;\n _.$_$.be = to;\n //endregion\n return _;\n}));\n\n//# sourceMappingURL=kotlin-kotlin-stdlib.js.map\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd)\n define(['exports', './kotlin-kotlin-stdlib.js'], factory);\n else if (typeof exports === 'object')\n factory(module.exports, require('./kotlin-kotlin-stdlib.js'));\n else {\n if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {\n throw new Error(\"Error loading module 'kotlinx-serialization-kotlinx-serialization-core'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'kotlinx-serialization-kotlinx-serialization-core'.\");\n }\n root['kotlinx-serialization-kotlinx-serialization-core'] = factory(typeof this['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined' ? {} : this['kotlinx-serialization-kotlinx-serialization-core'], this['kotlin-kotlin-stdlib']);\n }\n}(this, function (_, kotlin_kotlin) {\n 'use strict';\n //region block: imports\n var imul = Math.imul;\n var protoOf = kotlin_kotlin.$_$.u9;\n var interfaceMeta = kotlin_kotlin.$_$.b9;\n var setMetadataFor = kotlin_kotlin.$_$.v9;\n var VOID = kotlin_kotlin.$_$.e;\n var asList = kotlin_kotlin.$_$.r4;\n var objectCreate = kotlin_kotlin.$_$.s9;\n var StringCompanionObject_instance = kotlin_kotlin.$_$.l3;\n var Unit_instance = kotlin_kotlin.$_$.x3;\n var emptyList = kotlin_kotlin.$_$.o5;\n var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.f;\n var lazy = kotlin_kotlin.$_$.vd;\n var classMeta = kotlin_kotlin.$_$.q8;\n var getKClassFromExpression = kotlin_kotlin.$_$.c;\n var KProperty1 = kotlin_kotlin.$_$.na;\n var getPropertyCallableRef = kotlin_kotlin.$_$.y8;\n var IllegalArgumentException_init_$Init$ = kotlin_kotlin.$_$.b1;\n var captureStack = kotlin_kotlin.$_$.k8;\n var IllegalArgumentException_init_$Init$_0 = kotlin_kotlin.$_$.c1;\n var IllegalArgumentException_init_$Init$_1 = kotlin_kotlin.$_$.e1;\n var IllegalArgumentException = kotlin_kotlin.$_$.vc;\n var collectionSizeOrDefault = kotlin_kotlin.$_$.v4;\n var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;\n var THROW_CCE = kotlin_kotlin.$_$.ad;\n var KClass = kotlin_kotlin.$_$.la;\n var isInterface = kotlin_kotlin.$_$.j9;\n var Triple = kotlin_kotlin.$_$.dd;\n var getKClass = kotlin_kotlin.$_$.d;\n var Pair = kotlin_kotlin.$_$.yc;\n var Entry = kotlin_kotlin.$_$.f4;\n var LinkedHashMap = kotlin_kotlin.$_$.c4;\n var MutableMap = kotlin_kotlin.$_$.i4;\n var Map = kotlin_kotlin.$_$.g4;\n var HashMap = kotlin_kotlin.$_$.a4;\n var LinkedHashSet = kotlin_kotlin.$_$.d4;\n var MutableSet = kotlin_kotlin.$_$.j4;\n var Set = kotlin_kotlin.$_$.k4;\n var HashSet = kotlin_kotlin.$_$.b4;\n var ArrayList = kotlin_kotlin.$_$.y3;\n var MutableList = kotlin_kotlin.$_$.h4;\n var List = kotlin_kotlin.$_$.e4;\n var Collection = kotlin_kotlin.$_$.z3;\n var copyToArray = kotlin_kotlin.$_$.l5;\n var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.u1;\n var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.t1;\n var Result = kotlin_kotlin.$_$.zc;\n var ensureNotNull = kotlin_kotlin.$_$.qd;\n var equals = kotlin_kotlin.$_$.t8;\n var getStringHashCode = kotlin_kotlin.$_$.z8;\n var isBlank = kotlin_kotlin.$_$.nb;\n var toString = kotlin_kotlin.$_$.z9;\n var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.d1;\n var toList = kotlin_kotlin.$_$.v7;\n var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.h;\n var HashSet_init_$Create$ = kotlin_kotlin.$_$.n;\n var toHashSet = kotlin_kotlin.$_$.t7;\n var toBooleanArray = kotlin_kotlin.$_$.s7;\n var withIndex = kotlin_kotlin.$_$.b8;\n var to = kotlin_kotlin.$_$.be;\n var toMap = kotlin_kotlin.$_$.w7;\n var lazy_0 = kotlin_kotlin.$_$.wd;\n var contentEquals = kotlin_kotlin.$_$.z4;\n var until = kotlin_kotlin.$_$.ka;\n var joinToString = kotlin_kotlin.$_$.e6;\n var objectMeta = kotlin_kotlin.$_$.t9;\n var Long = kotlin_kotlin.$_$.wc;\n var Char = kotlin_kotlin.$_$.oc;\n var Duration__toIsoString_impl_9h6wsm = kotlin_kotlin.$_$.n1;\n var Duration = kotlin_kotlin.$_$.mc;\n var Companion_getInstance = kotlin_kotlin.$_$.o3;\n var toIntOrNull = kotlin_kotlin.$_$.dc;\n var hashCode = kotlin_kotlin.$_$.a9;\n var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.f1;\n var ArrayList_init_$Create$_1 = kotlin_kotlin.$_$.i;\n var HashSet_init_$Create$_0 = kotlin_kotlin.$_$.o;\n var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.s;\n var LinkedHashSet_init_$Create$_0 = kotlin_kotlin.$_$.t;\n var HashMap_init_$Create$ = kotlin_kotlin.$_$.k;\n var HashMap_init_$Create$_0 = kotlin_kotlin.$_$.l;\n var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.q;\n var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.r;\n var isArray = kotlin_kotlin.$_$.c9;\n var arrayIterator = kotlin_kotlin.$_$.i8;\n var step = kotlin_kotlin.$_$.ja;\n var getValue = kotlin_kotlin.$_$.a6;\n var longArray = kotlin_kotlin.$_$.n9;\n var Companion_getInstance_0 = kotlin_kotlin.$_$.r3;\n var get_lastIndex = kotlin_kotlin.$_$.g6;\n var countTrailingZeroBits = kotlin_kotlin.$_$.od;\n var getOrNull = kotlin_kotlin.$_$.z5;\n var indexOf = kotlin_kotlin.$_$.b6;\n var contentToString = kotlin_kotlin.$_$.b5;\n var Enum = kotlin_kotlin.$_$.sc;\n var fillArrayVal = kotlin_kotlin.$_$.u8;\n var HashSet_init_$Create$_1 = kotlin_kotlin.$_$.m;\n var KTypeParameter = kotlin_kotlin.$_$.oa;\n var booleanArray = kotlin_kotlin.$_$.j8;\n var emptyMap = kotlin_kotlin.$_$.p5;\n var contentHashCode = kotlin_kotlin.$_$.a5;\n var Companion_getInstance_1 = kotlin_kotlin.$_$.q3;\n var isCharArray = kotlin_kotlin.$_$.f9;\n var charArray = kotlin_kotlin.$_$.m8;\n var DoubleCompanionObject_instance = kotlin_kotlin.$_$.h3;\n var isDoubleArray = kotlin_kotlin.$_$.g9;\n var FloatCompanionObject_instance = kotlin_kotlin.$_$.i3;\n var isFloatArray = kotlin_kotlin.$_$.h9;\n var isLongArray = kotlin_kotlin.$_$.k9;\n var Companion_getInstance_2 = kotlin_kotlin.$_$.v3;\n var _ULongArray___get_size__impl__ju6dtr = kotlin_kotlin.$_$.u2;\n var ULongArray = kotlin_kotlin.$_$.id;\n var _ULongArray___init__impl__twm1l3 = kotlin_kotlin.$_$.q2;\n var _ULong___init__impl__c78o9k = kotlin_kotlin.$_$.n2;\n var ULongArray__get_impl_pr71q9 = kotlin_kotlin.$_$.s2;\n var _ULong___get_data__impl__fggpzb = kotlin_kotlin.$_$.o2;\n var IntCompanionObject_instance = kotlin_kotlin.$_$.j3;\n var isIntArray = kotlin_kotlin.$_$.i9;\n var Companion_getInstance_3 = kotlin_kotlin.$_$.u3;\n var _UIntArray___get_size__impl__r6l8ci = kotlin_kotlin.$_$.l2;\n var UIntArray = kotlin_kotlin.$_$.gd;\n var _UIntArray___init__impl__ghjpc6 = kotlin_kotlin.$_$.h2;\n var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.e2;\n var UIntArray__get_impl_gp5kza = kotlin_kotlin.$_$.j2;\n var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.f2;\n var ShortCompanionObject_instance = kotlin_kotlin.$_$.k3;\n var isShortArray = kotlin_kotlin.$_$.l9;\n var Companion_getInstance_4 = kotlin_kotlin.$_$.w3;\n var _UShortArray___get_size__impl__jqto1b = kotlin_kotlin.$_$.d3;\n var UShortArray = kotlin_kotlin.$_$.kd;\n var _UShortArray___init__impl__9b26ef = kotlin_kotlin.$_$.z2;\n var _UShort___init__impl__jigrne = kotlin_kotlin.$_$.w2;\n var UShortArray__get_impl_fnbhmx = kotlin_kotlin.$_$.b3;\n var _UShort___get_data__impl__g0245 = kotlin_kotlin.$_$.x2;\n var ByteCompanionObject_instance = kotlin_kotlin.$_$.g3;\n var isByteArray = kotlin_kotlin.$_$.e9;\n var Companion_getInstance_5 = kotlin_kotlin.$_$.t3;\n var _UByteArray___get_size__impl__h6pkdv = kotlin_kotlin.$_$.c2;\n var UByteArray = kotlin_kotlin.$_$.ed;\n var _UByteArray___init__impl__ip4y9n = kotlin_kotlin.$_$.z1;\n var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.v1;\n var UByteArray__get_impl_t5f3hv = kotlin_kotlin.$_$.a2;\n var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.w1;\n var BooleanCompanionObject_instance = kotlin_kotlin.$_$.f3;\n var isBooleanArray = kotlin_kotlin.$_$.d9;\n var coerceAtLeast = kotlin_kotlin.$_$.fa;\n var copyOf = kotlin_kotlin.$_$.f5;\n var copyOf_0 = kotlin_kotlin.$_$.h5;\n var copyOf_1 = kotlin_kotlin.$_$.i5;\n var copyOf_2 = kotlin_kotlin.$_$.d5;\n var _ULongArray___get_storage__impl__28e64j = kotlin_kotlin.$_$.v2;\n var _ULongArray___init__impl__twm1l3_0 = kotlin_kotlin.$_$.r2;\n var ULongArray__set_impl_z19mvh = kotlin_kotlin.$_$.t2;\n var copyOf_3 = kotlin_kotlin.$_$.k5;\n var _UIntArray___get_storage__impl__92a0v0 = kotlin_kotlin.$_$.m2;\n var _UIntArray___init__impl__ghjpc6_0 = kotlin_kotlin.$_$.i2;\n var UIntArray__set_impl_7f2zu2 = kotlin_kotlin.$_$.k2;\n var copyOf_4 = kotlin_kotlin.$_$.c5;\n var _UShortArray___get_storage__impl__t2jpv5 = kotlin_kotlin.$_$.e3;\n var _UShortArray___init__impl__9b26ef_0 = kotlin_kotlin.$_$.a3;\n var UShortArray__set_impl_6d8whp = kotlin_kotlin.$_$.c3;\n var copyOf_5 = kotlin_kotlin.$_$.g5;\n var _UByteArray___get_storage__impl__d4kctt = kotlin_kotlin.$_$.d2;\n var _UByteArray___init__impl__ip4y9n_0 = kotlin_kotlin.$_$.y1;\n var UByteArray__set_impl_jvcicn = kotlin_kotlin.$_$.b2;\n var copyOf_6 = kotlin_kotlin.$_$.e5;\n var Unit = kotlin_kotlin.$_$.md;\n var trimIndent = kotlin_kotlin.$_$.lc;\n var equals_0 = kotlin_kotlin.$_$.kb;\n var charSequenceLength = kotlin_kotlin.$_$.o8;\n var charSequenceGet = kotlin_kotlin.$_$.n8;\n var toString_0 = kotlin_kotlin.$_$.r1;\n var titlecase = kotlin_kotlin.$_$.zb;\n var isLowerCase = kotlin_kotlin.$_$.ob;\n var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.n3;\n var ULong = kotlin_kotlin.$_$.jd;\n var UInt = kotlin_kotlin.$_$.hd;\n var UShort = kotlin_kotlin.$_$.ld;\n var UByte = kotlin_kotlin.$_$.fd;\n var mapOf = kotlin_kotlin.$_$.s6;\n var last = kotlin_kotlin.$_$.l6;\n var lastOrNull = kotlin_kotlin.$_$.j6;\n var get_lastIndex_0 = kotlin_kotlin.$_$.h6;\n var get_js = kotlin_kotlin.$_$.m9;\n var findAssociatedObject = kotlin_kotlin.$_$.b;\n var get_indices = kotlin_kotlin.$_$.d6;\n var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.g1;\n var get_indices_0 = kotlin_kotlin.$_$.c6;\n var Companion_instance = kotlin_kotlin.$_$.s3;\n var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.s1;\n var createFailure = kotlin_kotlin.$_$.pd;\n //endregion\n //region block: pre-declaration\n setMetadataFor(SerializationStrategy, 'SerializationStrategy', interfaceMeta);\n setMetadataFor(DeserializationStrategy, 'DeserializationStrategy', interfaceMeta);\n setMetadataFor(KSerializer, 'KSerializer', interfaceMeta, VOID, [SerializationStrategy, DeserializationStrategy]);\n setMetadataFor(AbstractPolymorphicSerializer, 'AbstractPolymorphicSerializer', classMeta, VOID, [KSerializer]);\n setMetadataFor(PolymorphicSerializer, 'PolymorphicSerializer', classMeta, AbstractPolymorphicSerializer);\n setMetadataFor(SealedClassSerializer, 'SealedClassSerializer', classMeta, AbstractPolymorphicSerializer);\n setMetadataFor(SerializationException, 'SerializationException', classMeta, IllegalArgumentException, VOID, SerializationException_init_$Create$);\n setMetadataFor(UnknownFieldException, 'UnknownFieldException', classMeta, SerializationException);\n setMetadataFor(MissingFieldException, 'MissingFieldException', classMeta, SerializationException);\n function get_isNullable() {\n return false;\n }\n function get_isInline() {\n return false;\n }\n function get_annotations() {\n return emptyList();\n }\n setMetadataFor(SerialDescriptor, 'SerialDescriptor', interfaceMeta);\n setMetadataFor(ContextDescriptor, 'ContextDescriptor', classMeta, VOID, [SerialDescriptor]);\n setMetadataFor(elementDescriptors$1$1, VOID, classMeta);\n setMetadataFor(_no_name_provided__qut3iv, VOID, classMeta);\n setMetadataFor(elementNames$1$1, VOID, classMeta);\n setMetadataFor(_no_name_provided__qut3iv_0, VOID, classMeta);\n setMetadataFor(ClassSerialDescriptorBuilder, 'ClassSerialDescriptorBuilder', classMeta);\n setMetadataFor(CachedNames, 'CachedNames', interfaceMeta);\n setMetadataFor(SerialDescriptorImpl, 'SerialDescriptorImpl', classMeta, VOID, [SerialDescriptor, CachedNames]);\n setMetadataFor(SerialKind, 'SerialKind', classMeta);\n setMetadataFor(ENUM, 'ENUM', objectMeta, SerialKind);\n setMetadataFor(CONTEXTUAL, 'CONTEXTUAL', objectMeta, SerialKind);\n setMetadataFor(PrimitiveKind, 'PrimitiveKind', classMeta, SerialKind);\n setMetadataFor(BOOLEAN, 'BOOLEAN', objectMeta, PrimitiveKind);\n setMetadataFor(BYTE, 'BYTE', objectMeta, PrimitiveKind);\n setMetadataFor(CHAR, 'CHAR', objectMeta, PrimitiveKind);\n setMetadataFor(SHORT, 'SHORT', objectMeta, PrimitiveKind);\n setMetadataFor(INT, 'INT', objectMeta, PrimitiveKind);\n setMetadataFor(LONG, 'LONG', objectMeta, PrimitiveKind);\n setMetadataFor(FLOAT, 'FLOAT', objectMeta, PrimitiveKind);\n setMetadataFor(DOUBLE, 'DOUBLE', objectMeta, PrimitiveKind);\n setMetadataFor(STRING, 'STRING', objectMeta, PrimitiveKind);\n setMetadataFor(StructureKind, 'StructureKind', classMeta, SerialKind);\n setMetadataFor(CLASS, 'CLASS', objectMeta, StructureKind);\n setMetadataFor(LIST, 'LIST', objectMeta, StructureKind);\n setMetadataFor(MAP, 'MAP', objectMeta, StructureKind);\n setMetadataFor(OBJECT, 'OBJECT', objectMeta, StructureKind);\n setMetadataFor(PolymorphicKind, 'PolymorphicKind', classMeta, SerialKind);\n setMetadataFor(SEALED, 'SEALED', objectMeta, PolymorphicKind);\n setMetadataFor(OPEN, 'OPEN', objectMeta, PolymorphicKind);\n function decodeSerializableValue(deserializer) {\n return deserializer.qk(this);\n }\n setMetadataFor(Decoder, 'Decoder', interfaceMeta);\n function decodeSequentially() {\n return false;\n }\n function decodeCollectionSize(descriptor) {\n return -1;\n }\n function decodeSerializableElement$default(descriptor, index, deserializer, previousValue, $super) {\n previousValue = previousValue === VOID ? null : previousValue;\n return $super === VOID ? this.zn(descriptor, index, deserializer, previousValue) : $super.zn.call(this, descriptor, index, deserializer, previousValue);\n }\n setMetadataFor(CompositeDecoder, 'CompositeDecoder', interfaceMeta);\n setMetadataFor(AbstractDecoder, 'AbstractDecoder', classMeta, VOID, [Decoder, CompositeDecoder]);\n function encodeNotNullMark() {\n }\n function beginCollection(descriptor, collectionSize) {\n return this.nn(descriptor);\n }\n function encodeSerializableValue(serializer, value) {\n serializer.pk(this, value);\n }\n function encodeNullableSerializableValue(serializer, value) {\n var isNullabilitySupported = serializer.ok().ml();\n if (isNullabilitySupported) {\n return this.fp(isInterface(serializer, SerializationStrategy) ? serializer : THROW_CCE(), value);\n }\n if (value == null) {\n this.io();\n } else {\n this.ip();\n this.fp(serializer, value);\n }\n }\n setMetadataFor(Encoder, 'Encoder', interfaceMeta);\n function shouldEncodeElementDefault(descriptor, index) {\n return true;\n }\n setMetadataFor(CompositeEncoder, 'CompositeEncoder', interfaceMeta);\n setMetadataFor(AbstractEncoder, 'AbstractEncoder', classMeta, VOID, [Encoder, CompositeEncoder]);\n setMetadataFor(Companion, 'Companion', objectMeta);\n setMetadataFor(NothingSerializer_0, 'NothingSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(DurationSerializer, 'DurationSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(ListLikeDescriptor, 'ListLikeDescriptor', classMeta, VOID, [SerialDescriptor]);\n setMetadataFor(ArrayListClassDesc, 'ArrayListClassDesc', classMeta, ListLikeDescriptor);\n setMetadataFor(HashSetClassDesc, 'HashSetClassDesc', classMeta, ListLikeDescriptor);\n setMetadataFor(LinkedHashSetClassDesc, 'LinkedHashSetClassDesc', classMeta, ListLikeDescriptor);\n setMetadataFor(MapLikeDescriptor, 'MapLikeDescriptor', classMeta, VOID, [SerialDescriptor]);\n setMetadataFor(HashMapClassDesc, 'HashMapClassDesc', classMeta, MapLikeDescriptor);\n setMetadataFor(LinkedHashMapClassDesc, 'LinkedHashMapClassDesc', classMeta, MapLikeDescriptor);\n setMetadataFor(ArrayClassDesc, 'ArrayClassDesc', classMeta, ListLikeDescriptor);\n setMetadataFor(PrimitiveArrayDescriptor, 'PrimitiveArrayDescriptor', classMeta, ListLikeDescriptor);\n setMetadataFor(AbstractCollectionSerializer, 'AbstractCollectionSerializer', classMeta, VOID, [KSerializer]);\n setMetadataFor(CollectionLikeSerializer, 'CollectionLikeSerializer', classMeta, AbstractCollectionSerializer);\n setMetadataFor(CollectionSerializer, 'CollectionSerializer', classMeta, CollectionLikeSerializer);\n setMetadataFor(ArrayListSerializer, 'ArrayListSerializer', classMeta, CollectionSerializer);\n setMetadataFor(HashSetSerializer, 'HashSetSerializer', classMeta, CollectionSerializer);\n setMetadataFor(LinkedHashSetSerializer, 'LinkedHashSetSerializer', classMeta, CollectionSerializer);\n setMetadataFor(MapLikeSerializer, 'MapLikeSerializer', classMeta, AbstractCollectionSerializer);\n setMetadataFor(HashMapSerializer, 'HashMapSerializer', classMeta, MapLikeSerializer);\n setMetadataFor(LinkedHashMapSerializer, 'LinkedHashMapSerializer', classMeta, MapLikeSerializer);\n setMetadataFor(ReferenceArraySerializer, 'ReferenceArraySerializer', classMeta, CollectionLikeSerializer);\n setMetadataFor(PrimitiveArraySerializer, 'PrimitiveArraySerializer', classMeta, CollectionLikeSerializer);\n setMetadataFor(PrimitiveArrayBuilder, 'PrimitiveArrayBuilder', classMeta);\n setMetadataFor(Companion_0, 'Companion', objectMeta);\n setMetadataFor(ElementMarker, 'ElementMarker', classMeta);\n setMetadataFor(EnumSerializer, 'EnumSerializer', classMeta, VOID, [KSerializer]);\n setMetadataFor(PluginGeneratedSerialDescriptor, 'PluginGeneratedSerialDescriptor', classMeta, VOID, [SerialDescriptor, CachedNames]);\n setMetadataFor(EnumDescriptor, 'EnumDescriptor', classMeta, PluginGeneratedSerialDescriptor);\n setMetadataFor(InlineClassDescriptor, 'InlineClassDescriptor', classMeta, PluginGeneratedSerialDescriptor);\n function typeParametersSerializers() {\n return get_EMPTY_SERIALIZER_ARRAY();\n }\n setMetadataFor(GeneratedSerializer, 'GeneratedSerializer', interfaceMeta, VOID, [KSerializer]);\n setMetadataFor(InlinePrimitiveDescriptor$1, VOID, classMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(NoOpEncoder, 'NoOpEncoder', objectMeta, AbstractEncoder);\n setMetadataFor(NothingSerialDescriptor, 'NothingSerialDescriptor', objectMeta, VOID, [SerialDescriptor]);\n setMetadataFor(NullableSerializer, 'NullableSerializer', classMeta, VOID, [KSerializer]);\n setMetadataFor(SerialDescriptorForNullable, 'SerialDescriptorForNullable', classMeta, VOID, [SerialDescriptor, CachedNames]);\n setMetadataFor(ObjectSerializer, 'ObjectSerializer', classMeta, VOID, [KSerializer]);\n setMetadataFor(SerializerFactory, 'SerializerFactory', interfaceMeta);\n setMetadataFor(CharArraySerializer_0, 'CharArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(DoubleArraySerializer_0, 'DoubleArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(FloatArraySerializer_0, 'FloatArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(LongArraySerializer_0, 'LongArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(ULongArraySerializer_0, 'ULongArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(IntArraySerializer_0, 'IntArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(UIntArraySerializer_0, 'UIntArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(ShortArraySerializer_0, 'ShortArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(UShortArraySerializer_0, 'UShortArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(ByteArraySerializer_0, 'ByteArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(UByteArraySerializer_0, 'UByteArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(BooleanArraySerializer_0, 'BooleanArraySerializer', objectMeta, PrimitiveArraySerializer, [KSerializer, PrimitiveArraySerializer]);\n setMetadataFor(CharArrayBuilder, 'CharArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(DoubleArrayBuilder, 'DoubleArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(FloatArrayBuilder, 'FloatArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(LongArrayBuilder, 'LongArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(ULongArrayBuilder, 'ULongArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(IntArrayBuilder, 'IntArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(UIntArrayBuilder, 'UIntArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(ShortArrayBuilder, 'ShortArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(UShortArrayBuilder, 'UShortArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(ByteArrayBuilder, 'ByteArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(UByteArrayBuilder, 'UByteArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(BooleanArrayBuilder, 'BooleanArrayBuilder', classMeta, PrimitiveArrayBuilder);\n setMetadataFor(StringSerializer, 'StringSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(CharSerializer, 'CharSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(DoubleSerializer, 'DoubleSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(FloatSerializer, 'FloatSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(LongSerializer, 'LongSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(IntSerializer, 'IntSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(ShortSerializer, 'ShortSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(ByteSerializer, 'ByteSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(BooleanSerializer, 'BooleanSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(UnitSerializer, 'UnitSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(PrimitiveSerialDescriptor_0, 'PrimitiveSerialDescriptor', classMeta, VOID, [SerialDescriptor]);\n setMetadataFor(TaggedEncoder, 'TaggedEncoder', classMeta, VOID, [Encoder, CompositeEncoder]);\n setMetadataFor(NamedValueEncoder, 'NamedValueEncoder', classMeta, TaggedEncoder);\n setMetadataFor(TaggedDecoder, 'TaggedDecoder', classMeta, VOID, [Decoder, CompositeDecoder]);\n setMetadataFor(NamedValueDecoder, 'NamedValueDecoder', classMeta, TaggedDecoder);\n setMetadataFor(MapEntry, 'MapEntry', classMeta, VOID, [Entry]);\n setMetadataFor(KeyValueSerializer, 'KeyValueSerializer', classMeta, VOID, [KSerializer]);\n setMetadataFor(MapEntrySerializer_0, 'MapEntrySerializer', classMeta, KeyValueSerializer);\n setMetadataFor(PairSerializer_0, 'PairSerializer', classMeta, KeyValueSerializer);\n setMetadataFor(TripleSerializer_0, 'TripleSerializer', classMeta, VOID, [KSerializer]);\n setMetadataFor(ULongSerializer, 'ULongSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(UIntSerializer, 'UIntSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(UShortSerializer, 'UShortSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(UByteSerializer, 'UByteSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(SerializersModule, 'SerializersModule', classMeta);\n setMetadataFor(SerialModuleImpl, 'SerialModuleImpl', classMeta, SerializersModule);\n setMetadataFor(ContextualProvider, 'ContextualProvider', classMeta);\n setMetadataFor(Argless, 'Argless', classMeta, ContextualProvider);\n setMetadataFor(WithTypeArguments, 'WithTypeArguments', classMeta, ContextualProvider);\n function contextual(kClass, serializer) {\n return this.w14(kClass, SerializersModuleCollector$contextual$lambda(serializer));\n }\n setMetadataFor(SerializersModuleCollector, 'SerializersModuleCollector', interfaceMeta);\n setMetadataFor(SerializableWith, 'SerializableWith', classMeta, VOID, VOID, VOID, 0);\n setMetadataFor(createCache$1, VOID, classMeta);\n setMetadataFor(createParametrizedCache$1, VOID, classMeta);\n //endregion\n function KSerializer() {\n }\n function SerializationStrategy() {\n }\n function DeserializationStrategy() {\n }\n function PolymorphicSerializer_init_$Init$(baseClass, classAnnotations, $this) {\n PolymorphicSerializer.call($this, baseClass);\n $this.sk_1 = asList(classAnnotations);\n return $this;\n }\n function PolymorphicSerializer_init_$Create$(baseClass, classAnnotations) {\n return PolymorphicSerializer_init_$Init$(baseClass, classAnnotations, objectCreate(protoOf(PolymorphicSerializer)));\n }\n function PolymorphicSerializer$descriptor$delegate$lambda$lambda(this$0) {\n return function ($this$buildSerialDescriptor) {\n $this$buildSerialDescriptor.cl('type', serializer_1(StringCompanionObject_instance).ok());\n $this$buildSerialDescriptor.cl('value', buildSerialDescriptor('kotlinx.serialization.Polymorphic<' + this$0.rk_1.v6() + '>', CONTEXTUAL_getInstance(), []));\n $this$buildSerialDescriptor.wk_1 = this$0.sk_1;\n return Unit_instance;\n };\n }\n function PolymorphicSerializer$descriptor$delegate$lambda(this$0) {\n return function () {\n var tmp = OPEN_getInstance();\n return withContext(buildSerialDescriptor('kotlinx.serialization.Polymorphic', tmp, [], PolymorphicSerializer$descriptor$delegate$lambda$lambda(this$0)), this$0.rk_1);\n };\n }\n function PolymorphicSerializer(baseClass) {\n AbstractPolymorphicSerializer.call(this);\n this.rk_1 = baseClass;\n this.sk_1 = emptyList();\n var tmp = this;\n var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();\n tmp.tk_1 = lazy(tmp_0, PolymorphicSerializer$descriptor$delegate$lambda(this));\n }\n protoOf(PolymorphicSerializer).dl = function () {\n return this.rk_1;\n };\n protoOf(PolymorphicSerializer).ok = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.tk_1;\n descriptor$factory();\n return this_0.u2();\n };\n protoOf(PolymorphicSerializer).toString = function () {\n return 'kotlinx.serialization.PolymorphicSerializer(baseClass: ' + this.rk_1 + ')';\n };\n function findPolymorphicSerializer(_this__u8e3s4, encoder, value) {\n var tmp0_elvis_lhs = _this__u8e3s4.gl(encoder, value);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throwSubtypeNotRegistered(getKClassFromExpression(value), _this__u8e3s4.dl());\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function findPolymorphicSerializer_0(_this__u8e3s4, decoder, klassName) {\n var tmp0_elvis_lhs = _this__u8e3s4.fl(decoder, klassName);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throwSubtypeNotRegistered_0(klassName, _this__u8e3s4.dl());\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function descriptor$factory() {\n return getPropertyCallableRef('descriptor', 1, KProperty1, function (receiver) {\n return receiver.ok();\n }, null);\n }\n function SealedClassSerializer() {\n }\n function SerializationException_init_$Init$($this) {\n IllegalArgumentException_init_$Init$($this);\n SerializationException.call($this);\n return $this;\n }\n function SerializationException_init_$Create$() {\n var tmp = SerializationException_init_$Init$(objectCreate(protoOf(SerializationException)));\n captureStack(tmp, SerializationException_init_$Create$);\n return tmp;\n }\n function SerializationException_init_$Init$_0(message, $this) {\n IllegalArgumentException_init_$Init$_0(message, $this);\n SerializationException.call($this);\n return $this;\n }\n function SerializationException_init_$Create$_0(message) {\n var tmp = SerializationException_init_$Init$_0(message, objectCreate(protoOf(SerializationException)));\n captureStack(tmp, SerializationException_init_$Create$_0);\n return tmp;\n }\n function SerializationException_init_$Init$_1(message, cause, $this) {\n IllegalArgumentException_init_$Init$_1(message, cause, $this);\n SerializationException.call($this);\n return $this;\n }\n function SerializationException() {\n captureStack(this, SerializationException);\n }\n function UnknownFieldException_init_$Init$(index, $this) {\n UnknownFieldException.call($this, 'An unknown field for index ' + index);\n return $this;\n }\n function UnknownFieldException_init_$Create$(index) {\n var tmp = UnknownFieldException_init_$Init$(index, objectCreate(protoOf(UnknownFieldException)));\n captureStack(tmp, UnknownFieldException_init_$Create$);\n return tmp;\n }\n function UnknownFieldException(message) {\n SerializationException_init_$Init$_0(message, this);\n captureStack(this, UnknownFieldException);\n }\n function MissingFieldException_init_$Init$(missingFields, serialName, $this) {\n MissingFieldException.call($this, missingFields, missingFields.n() === 1 ? \"Field '\" + missingFields.f1(0) + \"' is required for type with serial name '\" + serialName + \"', but it was missing\" : 'Fields ' + missingFields + \" are required for type with serial name '\" + serialName + \"', but they were missing\", null);\n return $this;\n }\n function MissingFieldException_init_$Create$(missingFields, serialName) {\n var tmp = MissingFieldException_init_$Init$(missingFields, serialName, objectCreate(protoOf(MissingFieldException)));\n captureStack(tmp, MissingFieldException_init_$Create$);\n return tmp;\n }\n function MissingFieldException(missingFields, message, cause) {\n SerializationException_init_$Init$_1(message, cause, this);\n captureStack(this, MissingFieldException);\n this.hl_1 = missingFields;\n }\n function serializerOrNull(_this__u8e3s4) {\n var tmp0_elvis_lhs = compiledSerializerImpl(_this__u8e3s4);\n return tmp0_elvis_lhs == null ? builtinSerializerOrNull(_this__u8e3s4) : tmp0_elvis_lhs;\n }\n function serializersForParameters(_this__u8e3s4, typeArguments, failOnMissingTypeArgSerializer) {\n var tmp;\n if (failOnMissingTypeArgSerializer) {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(typeArguments, 10));\n var tmp0_iterator = typeArguments.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'kotlinx.serialization.serializersForParameters.' call\n var tmp$ret$0 = serializer(_this__u8e3s4, item);\n destination.q(tmp$ret$0);\n }\n tmp = destination;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(typeArguments, 10));\n var tmp0_iterator_0 = typeArguments.t();\n while (tmp0_iterator_0.u()) {\n var item_0 = tmp0_iterator_0.w();\n // Inline function 'kotlinx.serialization.serializersForParameters.' call\n var tmp0_elvis_lhs = serializerOrNull_0(_this__u8e3s4, item_0);\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n var tmp$ret$3 = tmp_0;\n destination_0.q(tmp$ret$3);\n }\n tmp = destination_0;\n }\n var serializers = tmp;\n return serializers;\n }\n function parametrizedSerializerOrNull(_this__u8e3s4, serializers, elementClassifierIfArray) {\n var tmp0_elvis_lhs = builtinParametrizedSerializer(_this__u8e3s4, serializers, elementClassifierIfArray);\n return tmp0_elvis_lhs == null ? compiledParametrizedSerializer(_this__u8e3s4, serializers) : tmp0_elvis_lhs;\n }\n function serializer(_this__u8e3s4, type) {\n var tmp0_elvis_lhs = serializerByKTypeImpl(_this__u8e3s4, type, true);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n platformSpecificSerializerNotRegistered(kclass(type));\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function serializerOrNull_0(_this__u8e3s4, type) {\n return serializerByKTypeImpl(_this__u8e3s4, type, false);\n }\n function builtinParametrizedSerializer(_this__u8e3s4, serializers, elementClassifierIfArray) {\n var tmp;\n if (((_this__u8e3s4.equals(getKClass(Collection)) ? true : _this__u8e3s4.equals(getKClass(List))) ? true : _this__u8e3s4.equals(getKClass(MutableList))) ? true : _this__u8e3s4.equals(getKClass(ArrayList))) {\n tmp = new ArrayListSerializer(serializers.f1(0));\n } else if (_this__u8e3s4.equals(getKClass(HashSet))) {\n tmp = new HashSetSerializer(serializers.f1(0));\n } else if ((_this__u8e3s4.equals(getKClass(Set)) ? true : _this__u8e3s4.equals(getKClass(MutableSet))) ? true : _this__u8e3s4.equals(getKClass(LinkedHashSet))) {\n tmp = new LinkedHashSetSerializer(serializers.f1(0));\n } else if (_this__u8e3s4.equals(getKClass(HashMap))) {\n tmp = new HashMapSerializer(serializers.f1(0), serializers.f1(1));\n } else if ((_this__u8e3s4.equals(getKClass(Map)) ? true : _this__u8e3s4.equals(getKClass(MutableMap))) ? true : _this__u8e3s4.equals(getKClass(LinkedHashMap))) {\n tmp = new LinkedHashMapSerializer(serializers.f1(0), serializers.f1(1));\n } else if (_this__u8e3s4.equals(getKClass(Entry))) {\n tmp = MapEntrySerializer(serializers.f1(0), serializers.f1(1));\n } else if (_this__u8e3s4.equals(getKClass(Pair))) {\n tmp = PairSerializer(serializers.f1(0), serializers.f1(1));\n } else if (_this__u8e3s4.equals(getKClass(Triple))) {\n tmp = TripleSerializer(serializers.f1(0), serializers.f1(1), serializers.f1(2));\n } else {\n var tmp_0;\n if (isReferenceArray(_this__u8e3s4)) {\n var tmp_1 = elementClassifierIfArray();\n tmp_0 = ArraySerializer((!(tmp_1 == null) ? isInterface(tmp_1, KClass) : false) ? tmp_1 : THROW_CCE(), serializers.f1(0));\n } else {\n tmp_0 = null;\n }\n tmp = tmp_0;\n }\n return tmp;\n }\n function compiledParametrizedSerializer(_this__u8e3s4, serializers) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$0 = copyToArray(serializers);\n return constructSerializerForGivenTypeArgs(_this__u8e3s4, tmp$ret$0.slice());\n }\n function serializerByKTypeImpl(_this__u8e3s4, type, failOnMissingTypeArgSerializer) {\n var rootClass = kclass(type);\n var isNullable = type.j7();\n // Inline function 'kotlin.collections.map' call\n var this_0 = type.i7();\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n var tmp$ret$0 = typeOrThrow(item);\n destination.q(tmp$ret$0);\n }\n var typeArguments = destination;\n var tmp;\n if (typeArguments.b1()) {\n tmp = findCachedSerializer(rootClass, isNullable);\n } else {\n // Inline function 'kotlin.Result.getOrNull' call\n var this_1 = findParametrizedCachedSerializer(rootClass, typeArguments, isNullable);\n var tmp_0;\n if (_Result___get_isFailure__impl__jpiriv(this_1)) {\n tmp_0 = null;\n } else {\n var tmp_1 = _Result___get_value__impl__bjfvqg(this_1);\n tmp_0 = (tmp_1 == null ? true : !(tmp_1 == null)) ? tmp_1 : THROW_CCE();\n }\n tmp = tmp_0;\n }\n var cachedSerializer = tmp;\n if (cachedSerializer == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return cachedSerializer;\n }\n var tmp_2;\n if (typeArguments.b1()) {\n tmp_2 = _this__u8e3s4.jl(rootClass);\n } else {\n var tmp1_elvis_lhs = serializersForParameters(_this__u8e3s4, typeArguments, failOnMissingTypeArgSerializer);\n var tmp_3;\n if (tmp1_elvis_lhs == null) {\n return null;\n } else {\n tmp_3 = tmp1_elvis_lhs;\n }\n var serializers = tmp_3;\n var tmp2_elvis_lhs = parametrizedSerializerOrNull(rootClass, serializers, serializerByKTypeImpl$lambda(typeArguments));\n tmp_2 = tmp2_elvis_lhs == null ? _this__u8e3s4.il(rootClass, serializers) : tmp2_elvis_lhs;\n }\n var contextualSerializer = tmp_2;\n var tmp_4;\n if (contextualSerializer == null) {\n tmp_4 = null;\n } else {\n // Inline function 'kotlinx.serialization.internal.cast' call\n tmp_4 = isInterface(contextualSerializer, KSerializer) ? contextualSerializer : THROW_CCE();\n }\n var tmp4_safe_receiver = tmp_4;\n return tmp4_safe_receiver == null ? null : nullable(tmp4_safe_receiver, isNullable);\n }\n function nullable(_this__u8e3s4, shouldBeNullable) {\n if (shouldBeNullable)\n return get_nullable(_this__u8e3s4);\n return isInterface(_this__u8e3s4, KSerializer) ? _this__u8e3s4 : THROW_CCE();\n }\n function serializer_0(type) {\n return serializer(EmptySerializersModule_0(), type);\n }\n function serializerByKTypeImpl$lambda($typeArguments) {\n return function () {\n return $typeArguments.f1(0).h7();\n };\n }\n function get_SERIALIZERS_CACHE() {\n _init_properties_SerializersCache_kt__hgwi2p();\n return SERIALIZERS_CACHE;\n }\n var SERIALIZERS_CACHE;\n function get_SERIALIZERS_CACHE_NULLABLE() {\n _init_properties_SerializersCache_kt__hgwi2p();\n return SERIALIZERS_CACHE_NULLABLE;\n }\n var SERIALIZERS_CACHE_NULLABLE;\n function get_PARAMETRIZED_SERIALIZERS_CACHE() {\n _init_properties_SerializersCache_kt__hgwi2p();\n return PARAMETRIZED_SERIALIZERS_CACHE;\n }\n var PARAMETRIZED_SERIALIZERS_CACHE;\n function get_PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE() {\n _init_properties_SerializersCache_kt__hgwi2p();\n return PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE;\n }\n var PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE;\n function findCachedSerializer(clazz, isNullable) {\n _init_properties_SerializersCache_kt__hgwi2p();\n var tmp;\n if (!isNullable) {\n var tmp0_safe_receiver = get_SERIALIZERS_CACHE().kl(clazz);\n var tmp_0;\n if (tmp0_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlinx.serialization.internal.cast' call\n tmp_0 = isInterface(tmp0_safe_receiver, KSerializer) ? tmp0_safe_receiver : THROW_CCE();\n }\n tmp = tmp_0;\n } else {\n tmp = get_SERIALIZERS_CACHE_NULLABLE().kl(clazz);\n }\n return tmp;\n }\n function findParametrizedCachedSerializer(clazz, types, isNullable) {\n _init_properties_SerializersCache_kt__hgwi2p();\n var tmp;\n if (!isNullable) {\n var tmp_0 = get_PARAMETRIZED_SERIALIZERS_CACHE().ll(clazz, types);\n tmp = new Result(tmp_0) instanceof Result ? tmp_0 : THROW_CCE();\n } else {\n tmp = get_PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE().ll(clazz, types);\n }\n return tmp;\n }\n function SERIALIZERS_CACHE$lambda(it) {\n _init_properties_SerializersCache_kt__hgwi2p();\n return serializerOrNull(it);\n }\n function SERIALIZERS_CACHE_NULLABLE$lambda(it) {\n _init_properties_SerializersCache_kt__hgwi2p();\n var tmp0_safe_receiver = serializerOrNull(it);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_nullable(tmp0_safe_receiver);\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlinx.serialization.internal.cast' call\n tmp = isInterface(tmp1_safe_receiver, KSerializer) ? tmp1_safe_receiver : THROW_CCE();\n }\n return tmp;\n }\n function PARAMETRIZED_SERIALIZERS_CACHE$lambda(clazz, types) {\n _init_properties_SerializersCache_kt__hgwi2p();\n var serializers = ensureNotNull(serializersForParameters(EmptySerializersModule_0(), types, true));\n return parametrizedSerializerOrNull(clazz, serializers, PARAMETRIZED_SERIALIZERS_CACHE$lambda$lambda(types));\n }\n function PARAMETRIZED_SERIALIZERS_CACHE$lambda$lambda($types) {\n return function () {\n return $types.f1(0).h7();\n };\n }\n function PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE$lambda(clazz, types) {\n _init_properties_SerializersCache_kt__hgwi2p();\n var serializers = ensureNotNull(serializersForParameters(EmptySerializersModule_0(), types, true));\n var tmp0_safe_receiver = parametrizedSerializerOrNull(clazz, serializers, PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE$lambda$lambda(types));\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_nullable(tmp0_safe_receiver);\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlinx.serialization.internal.cast' call\n tmp = isInterface(tmp1_safe_receiver, KSerializer) ? tmp1_safe_receiver : THROW_CCE();\n }\n return tmp;\n }\n function PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE$lambda$lambda($types) {\n return function () {\n return $types.f1(0).h7();\n };\n }\n var properties_initialized_SerializersCache_kt_q8kf25;\n function _init_properties_SerializersCache_kt__hgwi2p() {\n if (!properties_initialized_SerializersCache_kt_q8kf25) {\n properties_initialized_SerializersCache_kt_q8kf25 = true;\n SERIALIZERS_CACHE = createCache(SERIALIZERS_CACHE$lambda);\n SERIALIZERS_CACHE_NULLABLE = createCache(SERIALIZERS_CACHE_NULLABLE$lambda);\n PARAMETRIZED_SERIALIZERS_CACHE = createParametrizedCache(PARAMETRIZED_SERIALIZERS_CACHE$lambda);\n PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE = createParametrizedCache(PARAMETRIZED_SERIALIZERS_CACHE_NULLABLE$lambda);\n }\n }\n function get_nullable(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4.ok().ml()) {\n tmp = isInterface(_this__u8e3s4, KSerializer) ? _this__u8e3s4 : THROW_CCE();\n } else {\n tmp = new NullableSerializer(_this__u8e3s4);\n }\n return tmp;\n }\n function serializer_1(_this__u8e3s4) {\n return StringSerializer_getInstance();\n }\n function serializer_2(_this__u8e3s4) {\n return CharSerializer_getInstance();\n }\n function CharArraySerializer() {\n return CharArraySerializer_getInstance();\n }\n function serializer_3(_this__u8e3s4) {\n return DoubleSerializer_getInstance();\n }\n function DoubleArraySerializer() {\n return DoubleArraySerializer_getInstance();\n }\n function serializer_4(_this__u8e3s4) {\n return FloatSerializer_getInstance();\n }\n function FloatArraySerializer() {\n return FloatArraySerializer_getInstance();\n }\n function serializer_5(_this__u8e3s4) {\n return LongSerializer_getInstance();\n }\n function LongArraySerializer() {\n return LongArraySerializer_getInstance();\n }\n function serializer_6(_this__u8e3s4) {\n return ULongSerializer_getInstance();\n }\n function ULongArraySerializer() {\n return ULongArraySerializer_getInstance();\n }\n function serializer_7(_this__u8e3s4) {\n return IntSerializer_getInstance();\n }\n function IntArraySerializer() {\n return IntArraySerializer_getInstance();\n }\n function serializer_8(_this__u8e3s4) {\n return UIntSerializer_getInstance();\n }\n function UIntArraySerializer() {\n return UIntArraySerializer_getInstance();\n }\n function serializer_9(_this__u8e3s4) {\n return ShortSerializer_getInstance();\n }\n function ShortArraySerializer() {\n return ShortArraySerializer_getInstance();\n }\n function serializer_10(_this__u8e3s4) {\n return UShortSerializer_getInstance();\n }\n function UShortArraySerializer() {\n return UShortArraySerializer_getInstance();\n }\n function serializer_11(_this__u8e3s4) {\n return ByteSerializer_getInstance();\n }\n function ByteArraySerializer() {\n return ByteArraySerializer_getInstance();\n }\n function serializer_12(_this__u8e3s4) {\n return UByteSerializer_getInstance();\n }\n function UByteArraySerializer() {\n return UByteArraySerializer_getInstance();\n }\n function serializer_13(_this__u8e3s4) {\n return BooleanSerializer_getInstance();\n }\n function BooleanArraySerializer() {\n return BooleanArraySerializer_getInstance();\n }\n function serializer_14(_this__u8e3s4) {\n return UnitSerializer_getInstance();\n }\n function NothingSerializer() {\n return NothingSerializer_getInstance();\n }\n function serializer_15(_this__u8e3s4) {\n return DurationSerializer_getInstance();\n }\n function MapEntrySerializer(keySerializer, valueSerializer) {\n return new MapEntrySerializer_0(keySerializer, valueSerializer);\n }\n function PairSerializer(keySerializer, valueSerializer) {\n return new PairSerializer_0(keySerializer, valueSerializer);\n }\n function TripleSerializer(aSerializer, bSerializer, cSerializer) {\n return new TripleSerializer_0(aSerializer, bSerializer, cSerializer);\n }\n function ArraySerializer(kClass, elementSerializer) {\n return new ReferenceArraySerializer(kClass, elementSerializer);\n }\n function ListSerializer(elementSerializer) {\n return new ArrayListSerializer(elementSerializer);\n }\n function MapSerializer(keySerializer, valueSerializer) {\n return new LinkedHashMapSerializer(keySerializer, valueSerializer);\n }\n function withContext(_this__u8e3s4, context) {\n return new ContextDescriptor(_this__u8e3s4, context);\n }\n function ContextDescriptor(original, kClass) {\n this.nl_1 = original;\n this.ol_1 = kClass;\n this.pl_1 = this.nl_1.ql() + '<' + this.ol_1.v6() + '>';\n }\n protoOf(ContextDescriptor).rl = function () {\n return this.nl_1.rl();\n };\n protoOf(ContextDescriptor).sl = function () {\n return this.nl_1.sl();\n };\n protoOf(ContextDescriptor).tl = function () {\n return this.nl_1.tl();\n };\n protoOf(ContextDescriptor).ml = function () {\n return this.nl_1.ml();\n };\n protoOf(ContextDescriptor).ul = function () {\n return this.nl_1.ul();\n };\n protoOf(ContextDescriptor).vl = function (index) {\n return this.nl_1.vl(index);\n };\n protoOf(ContextDescriptor).wl = function (index) {\n return this.nl_1.wl(index);\n };\n protoOf(ContextDescriptor).xl = function (name) {\n return this.nl_1.xl(name);\n };\n protoOf(ContextDescriptor).yl = function (index) {\n return this.nl_1.yl(index);\n };\n protoOf(ContextDescriptor).zl = function (index) {\n return this.nl_1.zl(index);\n };\n protoOf(ContextDescriptor).ql = function () {\n return this.pl_1;\n };\n protoOf(ContextDescriptor).equals = function (other) {\n var tmp0_elvis_lhs = other instanceof ContextDescriptor ? other : null;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var another = tmp;\n return equals(this.nl_1, another.nl_1) ? another.ol_1.equals(this.ol_1) : false;\n };\n protoOf(ContextDescriptor).hashCode = function () {\n var result = this.ol_1.hashCode();\n result = imul(31, result) + getStringHashCode(this.pl_1) | 0;\n return result;\n };\n protoOf(ContextDescriptor).toString = function () {\n return 'ContextDescriptor(kClass: ' + this.ol_1 + ', original: ' + this.nl_1 + ')';\n };\n function getContextualDescriptor(_this__u8e3s4, descriptor) {\n var tmp0_safe_receiver = get_capturedKClass(descriptor);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.descriptors.getContextualDescriptor.' call\n var tmp0_safe_receiver_0 = _this__u8e3s4.jl(tmp0_safe_receiver);\n tmp = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.ok();\n }\n return tmp;\n }\n function get_capturedKClass(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4 instanceof ContextDescriptor) {\n tmp = _this__u8e3s4.ol_1;\n } else {\n if (_this__u8e3s4 instanceof SerialDescriptorForNullable) {\n tmp = get_capturedKClass(_this__u8e3s4.am_1);\n } else {\n tmp = null;\n }\n }\n return tmp;\n }\n function SerialDescriptor() {\n }\n function get_elementDescriptors(_this__u8e3s4) {\n // Inline function 'kotlin.collections.Iterable' call\n return new _no_name_provided__qut3iv(_this__u8e3s4);\n }\n function get_elementNames(_this__u8e3s4) {\n // Inline function 'kotlin.collections.Iterable' call\n return new _no_name_provided__qut3iv_0(_this__u8e3s4);\n }\n function elementDescriptors$1$1($this_elementDescriptors) {\n this.em_1 = $this_elementDescriptors;\n this.dm_1 = $this_elementDescriptors.sl();\n }\n protoOf(elementDescriptors$1$1).u = function () {\n return this.dm_1 > 0;\n };\n protoOf(elementDescriptors$1$1).w = function () {\n var tmp = this.em_1.sl();\n var tmp1 = this.dm_1;\n this.dm_1 = tmp1 - 1 | 0;\n return this.em_1.wl(tmp - tmp1 | 0);\n };\n function _no_name_provided__qut3iv($this_elementDescriptors) {\n this.fm_1 = $this_elementDescriptors;\n }\n protoOf(_no_name_provided__qut3iv).t = function () {\n // Inline function 'kotlinx.serialization.descriptors..' call\n return new elementDescriptors$1$1(this.fm_1);\n };\n function elementNames$1$1($this_elementNames) {\n this.hm_1 = $this_elementNames;\n this.gm_1 = $this_elementNames.sl();\n }\n protoOf(elementNames$1$1).u = function () {\n return this.gm_1 > 0;\n };\n protoOf(elementNames$1$1).w = function () {\n var tmp = this.hm_1.sl();\n var tmp1 = this.gm_1;\n this.gm_1 = tmp1 - 1 | 0;\n return this.hm_1.yl(tmp - tmp1 | 0);\n };\n function _no_name_provided__qut3iv_0($this_elementNames) {\n this.im_1 = $this_elementNames;\n }\n protoOf(_no_name_provided__qut3iv_0).t = function () {\n // Inline function 'kotlinx.serialization.descriptors..' call\n return new elementNames$1$1(this.im_1);\n };\n function buildSerialDescriptor(serialName, kind, typeParameters, builder) {\n var tmp;\n if (builder === VOID) {\n tmp = buildSerialDescriptor$lambda;\n } else {\n tmp = builder;\n }\n builder = tmp;\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.text.isNotBlank' call\n // Inline function 'kotlin.contracts.contract' call\n if (!!isBlank(serialName)) {\n // Inline function 'kotlinx.serialization.descriptors.buildSerialDescriptor.' call\n var message = 'Blank serial names are prohibited';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!!equals(kind, CLASS_getInstance())) {\n // Inline function 'kotlinx.serialization.descriptors.buildSerialDescriptor.' call\n var message_0 = \"For StructureKind.CLASS please use 'buildClassSerialDescriptor' instead\";\n throw IllegalArgumentException_init_$Create$(toString(message_0));\n }\n var sdBuilder = new ClassSerialDescriptorBuilder(serialName);\n builder(sdBuilder);\n return new SerialDescriptorImpl(serialName, kind, sdBuilder.xk_1.n(), toList(typeParameters), sdBuilder);\n }\n function ClassSerialDescriptorBuilder(serialName) {\n this.uk_1 = serialName;\n this.vk_1 = false;\n this.wk_1 = emptyList();\n this.xk_1 = ArrayList_init_$Create$_0();\n this.yk_1 = HashSet_init_$Create$();\n this.zk_1 = ArrayList_init_$Create$_0();\n this.al_1 = ArrayList_init_$Create$_0();\n this.bl_1 = ArrayList_init_$Create$_0();\n }\n protoOf(ClassSerialDescriptorBuilder).jm = function (elementName, descriptor, annotations, isOptional) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!this.yk_1.q(elementName)) {\n // Inline function 'kotlinx.serialization.descriptors.ClassSerialDescriptorBuilder.element.' call\n var message = \"Element with name '\" + elementName + \"' is already registered in \" + this.uk_1;\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n // Inline function 'kotlin.collections.plusAssign' call\n this.xk_1.q(elementName);\n // Inline function 'kotlin.collections.plusAssign' call\n this.zk_1.q(descriptor);\n // Inline function 'kotlin.collections.plusAssign' call\n this.al_1.q(annotations);\n // Inline function 'kotlin.collections.plusAssign' call\n this.bl_1.q(isOptional);\n };\n protoOf(ClassSerialDescriptorBuilder).cl = function (elementName, descriptor, annotations, isOptional, $super) {\n annotations = annotations === VOID ? emptyList() : annotations;\n isOptional = isOptional === VOID ? false : isOptional;\n var tmp;\n if ($super === VOID) {\n this.jm(elementName, descriptor, annotations, isOptional);\n tmp = Unit_instance;\n } else {\n tmp = $super.jm.call(this, elementName, descriptor, annotations, isOptional);\n }\n return tmp;\n };\n function buildClassSerialDescriptor(serialName, typeParameters, builderAction) {\n var tmp;\n if (builderAction === VOID) {\n tmp = buildClassSerialDescriptor$lambda;\n } else {\n tmp = builderAction;\n }\n builderAction = tmp;\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.text.isNotBlank' call\n // Inline function 'kotlin.contracts.contract' call\n if (!!isBlank(serialName)) {\n // Inline function 'kotlinx.serialization.descriptors.buildClassSerialDescriptor.' call\n var message = 'Blank serial names are prohibited';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n var sdBuilder = new ClassSerialDescriptorBuilder(serialName);\n builderAction(sdBuilder);\n return new SerialDescriptorImpl(serialName, CLASS_getInstance(), sdBuilder.xk_1.n(), toList(typeParameters), sdBuilder);\n }\n function _get__hashCode__tgwhef($this) {\n // Inline function 'kotlin.getValue' call\n var this_0 = $this.vm_1;\n _hashCode$factory();\n return this_0.u2();\n }\n function SerialDescriptorImpl$_hashCode$delegate$lambda(this$0) {\n return function () {\n return hashCodeImpl(this$0, this$0.um_1);\n };\n }\n function SerialDescriptorImpl$toString$lambda(this$0) {\n return function (it) {\n return this$0.yl(it) + ': ' + this$0.wl(it).ql();\n };\n }\n function SerialDescriptorImpl(serialName, kind, elementsCount, typeParameters, builder) {\n this.km_1 = serialName;\n this.lm_1 = kind;\n this.mm_1 = elementsCount;\n this.nm_1 = builder.wk_1;\n this.om_1 = toHashSet(builder.xk_1);\n var tmp = this;\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = builder.xk_1;\n tmp.pm_1 = copyToArray(this_0);\n this.qm_1 = compactArray(builder.zk_1);\n var tmp_0 = this;\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_1 = builder.al_1;\n tmp_0.rm_1 = copyToArray(this_1);\n this.sm_1 = toBooleanArray(builder.bl_1);\n var tmp_1 = this;\n // Inline function 'kotlin.collections.map' call\n var this_2 = withIndex(this.pm_1);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));\n var tmp0_iterator = this_2.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'kotlinx.serialization.descriptors.SerialDescriptorImpl.name2Index.' call\n var tmp$ret$2 = to(item.qe_1, item.pe_1);\n destination.q(tmp$ret$2);\n }\n tmp_1.tm_1 = toMap(destination);\n this.um_1 = compactArray(typeParameters);\n var tmp_2 = this;\n tmp_2.vm_1 = lazy_0(SerialDescriptorImpl$_hashCode$delegate$lambda(this));\n }\n protoOf(SerialDescriptorImpl).ql = function () {\n return this.km_1;\n };\n protoOf(SerialDescriptorImpl).ul = function () {\n return this.lm_1;\n };\n protoOf(SerialDescriptorImpl).sl = function () {\n return this.mm_1;\n };\n protoOf(SerialDescriptorImpl).rl = function () {\n return this.nm_1;\n };\n protoOf(SerialDescriptorImpl).wm = function () {\n return this.om_1;\n };\n protoOf(SerialDescriptorImpl).yl = function (index) {\n return getChecked(this.pm_1, index);\n };\n protoOf(SerialDescriptorImpl).xl = function (name) {\n var tmp0_elvis_lhs = this.tm_1.b3(name);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n tmp = -3;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(SerialDescriptorImpl).vl = function (index) {\n return getChecked(this.rm_1, index);\n };\n protoOf(SerialDescriptorImpl).wl = function (index) {\n return getChecked(this.qm_1, index);\n };\n protoOf(SerialDescriptorImpl).zl = function (index) {\n return getChecked_0(this.sm_1, index);\n };\n protoOf(SerialDescriptorImpl).equals = function (other) {\n var tmp$ret$0;\n $l$block_5: {\n // Inline function 'kotlinx.serialization.internal.equalsImpl' call\n if (this === other) {\n tmp$ret$0 = true;\n break $l$block_5;\n }\n if (!(other instanceof SerialDescriptorImpl)) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n if (!(this.ql() === other.ql())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n // Inline function 'kotlinx.serialization.descriptors.SerialDescriptorImpl.equals.' call\n if (!contentEquals(this.um_1, other.um_1)) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n if (!(this.sl() === other.sl())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n var inductionVariable = 0;\n var last = this.sl();\n if (inductionVariable < last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (!(this.wl(index).ql() === other.wl(index).ql())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n if (!equals(this.wl(index).ul(), other.wl(index).ul())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n }\n while (inductionVariable < last);\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n };\n protoOf(SerialDescriptorImpl).hashCode = function () {\n return _get__hashCode__tgwhef(this);\n };\n protoOf(SerialDescriptorImpl).toString = function () {\n var tmp = until(0, this.mm_1);\n var tmp_0 = this.km_1 + '(';\n return joinToString(tmp, ', ', tmp_0, ')', VOID, VOID, SerialDescriptorImpl$toString$lambda(this));\n };\n function PrimitiveSerialDescriptor(serialName, kind) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.text.isNotBlank' call\n // Inline function 'kotlin.contracts.contract' call\n if (!!isBlank(serialName)) {\n // Inline function 'kotlinx.serialization.descriptors.PrimitiveSerialDescriptor.' call\n var message = 'Blank serial names are prohibited';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n return PrimitiveDescriptorSafe(serialName, kind);\n }\n function listSerialDescriptor(elementDescriptor) {\n return new ArrayListClassDesc(elementDescriptor);\n }\n function buildSerialDescriptor$lambda($this$null) {\n return Unit_instance;\n }\n function buildClassSerialDescriptor$lambda($this$null) {\n return Unit_instance;\n }\n function _hashCode$factory() {\n return getPropertyCallableRef('_hashCode', 1, KProperty1, function (receiver) {\n return _get__hashCode__tgwhef(receiver);\n }, null);\n }\n function ENUM() {\n ENUM_instance = this;\n SerialKind.call(this);\n }\n var ENUM_instance;\n function ENUM_getInstance() {\n if (ENUM_instance == null)\n new ENUM();\n return ENUM_instance;\n }\n function CONTEXTUAL() {\n CONTEXTUAL_instance = this;\n SerialKind.call(this);\n }\n var CONTEXTUAL_instance;\n function CONTEXTUAL_getInstance() {\n if (CONTEXTUAL_instance == null)\n new CONTEXTUAL();\n return CONTEXTUAL_instance;\n }\n function SerialKind() {\n }\n protoOf(SerialKind).toString = function () {\n return ensureNotNull(getKClassFromExpression(this).v6());\n };\n protoOf(SerialKind).hashCode = function () {\n return getStringHashCode(this.toString());\n };\n function BOOLEAN() {\n BOOLEAN_instance = this;\n PrimitiveKind.call(this);\n }\n var BOOLEAN_instance;\n function BOOLEAN_getInstance() {\n if (BOOLEAN_instance == null)\n new BOOLEAN();\n return BOOLEAN_instance;\n }\n function BYTE() {\n BYTE_instance = this;\n PrimitiveKind.call(this);\n }\n var BYTE_instance;\n function BYTE_getInstance() {\n if (BYTE_instance == null)\n new BYTE();\n return BYTE_instance;\n }\n function CHAR() {\n CHAR_instance = this;\n PrimitiveKind.call(this);\n }\n var CHAR_instance;\n function CHAR_getInstance() {\n if (CHAR_instance == null)\n new CHAR();\n return CHAR_instance;\n }\n function SHORT() {\n SHORT_instance = this;\n PrimitiveKind.call(this);\n }\n var SHORT_instance;\n function SHORT_getInstance() {\n if (SHORT_instance == null)\n new SHORT();\n return SHORT_instance;\n }\n function INT() {\n INT_instance = this;\n PrimitiveKind.call(this);\n }\n var INT_instance;\n function INT_getInstance() {\n if (INT_instance == null)\n new INT();\n return INT_instance;\n }\n function LONG() {\n LONG_instance = this;\n PrimitiveKind.call(this);\n }\n var LONG_instance;\n function LONG_getInstance() {\n if (LONG_instance == null)\n new LONG();\n return LONG_instance;\n }\n function FLOAT() {\n FLOAT_instance = this;\n PrimitiveKind.call(this);\n }\n var FLOAT_instance;\n function FLOAT_getInstance() {\n if (FLOAT_instance == null)\n new FLOAT();\n return FLOAT_instance;\n }\n function DOUBLE() {\n DOUBLE_instance = this;\n PrimitiveKind.call(this);\n }\n var DOUBLE_instance;\n function DOUBLE_getInstance() {\n if (DOUBLE_instance == null)\n new DOUBLE();\n return DOUBLE_instance;\n }\n function STRING() {\n STRING_instance = this;\n PrimitiveKind.call(this);\n }\n var STRING_instance;\n function STRING_getInstance() {\n if (STRING_instance == null)\n new STRING();\n return STRING_instance;\n }\n function PrimitiveKind() {\n SerialKind.call(this);\n }\n function CLASS() {\n CLASS_instance = this;\n StructureKind.call(this);\n }\n var CLASS_instance;\n function CLASS_getInstance() {\n if (CLASS_instance == null)\n new CLASS();\n return CLASS_instance;\n }\n function LIST() {\n LIST_instance = this;\n StructureKind.call(this);\n }\n var LIST_instance;\n function LIST_getInstance() {\n if (LIST_instance == null)\n new LIST();\n return LIST_instance;\n }\n function MAP() {\n MAP_instance = this;\n StructureKind.call(this);\n }\n var MAP_instance;\n function MAP_getInstance() {\n if (MAP_instance == null)\n new MAP();\n return MAP_instance;\n }\n function OBJECT() {\n OBJECT_instance = this;\n StructureKind.call(this);\n }\n var OBJECT_instance;\n function OBJECT_getInstance() {\n if (OBJECT_instance == null)\n new OBJECT();\n return OBJECT_instance;\n }\n function StructureKind() {\n SerialKind.call(this);\n }\n function SEALED() {\n SEALED_instance = this;\n PolymorphicKind.call(this);\n }\n var SEALED_instance;\n function SEALED_getInstance() {\n if (SEALED_instance == null)\n new SEALED();\n return SEALED_instance;\n }\n function OPEN() {\n OPEN_instance = this;\n PolymorphicKind.call(this);\n }\n var OPEN_instance;\n function OPEN_getInstance() {\n if (OPEN_instance == null)\n new OPEN();\n return OPEN_instance;\n }\n function PolymorphicKind() {\n SerialKind.call(this);\n }\n function AbstractDecoder() {\n }\n protoOf(AbstractDecoder).xm = function () {\n throw SerializationException_init_$Create$_0('' + getKClassFromExpression(this) + \" can't retrieve untyped values\");\n };\n protoOf(AbstractDecoder).ym = function () {\n return true;\n };\n protoOf(AbstractDecoder).zm = function () {\n return null;\n };\n protoOf(AbstractDecoder).an = function () {\n var tmp = this.xm();\n return typeof tmp === 'boolean' ? tmp : THROW_CCE();\n };\n protoOf(AbstractDecoder).bn = function () {\n var tmp = this.xm();\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(AbstractDecoder).cn = function () {\n var tmp = this.xm();\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(AbstractDecoder).dn = function () {\n var tmp = this.xm();\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(AbstractDecoder).en = function () {\n var tmp = this.xm();\n return tmp instanceof Long ? tmp : THROW_CCE();\n };\n protoOf(AbstractDecoder).fn = function () {\n var tmp = this.xm();\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(AbstractDecoder).gn = function () {\n var tmp = this.xm();\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(AbstractDecoder).hn = function () {\n var tmp = this.xm();\n return tmp instanceof Char ? tmp.ab_1 : THROW_CCE();\n };\n protoOf(AbstractDecoder).in = function () {\n var tmp = this.xm();\n return typeof tmp === 'string' ? tmp : THROW_CCE();\n };\n protoOf(AbstractDecoder).jn = function (enumDescriptor) {\n var tmp = this.xm();\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(AbstractDecoder).kn = function (descriptor) {\n return this;\n };\n protoOf(AbstractDecoder).ln = function (deserializer, previousValue) {\n return this.mn(deserializer);\n };\n protoOf(AbstractDecoder).nn = function (descriptor) {\n return this;\n };\n protoOf(AbstractDecoder).on = function (descriptor) {\n };\n protoOf(AbstractDecoder).pn = function (descriptor, index) {\n return this.an();\n };\n protoOf(AbstractDecoder).qn = function (descriptor, index) {\n return this.bn();\n };\n protoOf(AbstractDecoder).rn = function (descriptor, index) {\n return this.cn();\n };\n protoOf(AbstractDecoder).sn = function (descriptor, index) {\n return this.dn();\n };\n protoOf(AbstractDecoder).tn = function (descriptor, index) {\n return this.en();\n };\n protoOf(AbstractDecoder).un = function (descriptor, index) {\n return this.fn();\n };\n protoOf(AbstractDecoder).vn = function (descriptor, index) {\n return this.gn();\n };\n protoOf(AbstractDecoder).wn = function (descriptor, index) {\n return this.hn();\n };\n protoOf(AbstractDecoder).xn = function (descriptor, index) {\n return this.in();\n };\n protoOf(AbstractDecoder).yn = function (descriptor, index) {\n return this.kn(descriptor.wl(index));\n };\n protoOf(AbstractDecoder).zn = function (descriptor, index, deserializer, previousValue) {\n return this.ln(deserializer, previousValue);\n };\n protoOf(AbstractDecoder).bo = function (descriptor, index, deserializer, previousValue) {\n // Inline function 'kotlinx.serialization.encoding.decodeIfNullable' call\n var isNullabilitySupported = deserializer.ok().ml();\n var tmp;\n if (isNullabilitySupported ? true : this.ym()) {\n // Inline function 'kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement.' call\n tmp = this.ln(deserializer, previousValue);\n } else {\n tmp = this.zm();\n }\n return tmp;\n };\n function AbstractEncoder() {\n }\n protoOf(AbstractEncoder).nn = function (descriptor) {\n return this;\n };\n protoOf(AbstractEncoder).on = function (descriptor) {\n };\n protoOf(AbstractEncoder).go = function (descriptor, index) {\n return true;\n };\n protoOf(AbstractEncoder).ho = function (value) {\n throw SerializationException_init_$Create$_0('Non-serializable ' + getKClassFromExpression(value) + ' is not supported by ' + getKClassFromExpression(this) + ' encoder');\n };\n protoOf(AbstractEncoder).io = function () {\n throw SerializationException_init_$Create$_0(\"'null' is not supported by default\");\n };\n protoOf(AbstractEncoder).jo = function (value) {\n return this.ho(value);\n };\n protoOf(AbstractEncoder).ko = function (value) {\n return this.ho(value);\n };\n protoOf(AbstractEncoder).lo = function (value) {\n return this.ho(value);\n };\n protoOf(AbstractEncoder).mo = function (value) {\n return this.ho(value);\n };\n protoOf(AbstractEncoder).no = function (value) {\n return this.ho(value);\n };\n protoOf(AbstractEncoder).oo = function (value) {\n return this.ho(value);\n };\n protoOf(AbstractEncoder).po = function (value) {\n return this.ho(value);\n };\n protoOf(AbstractEncoder).qo = function (value) {\n return this.ho(new Char(value));\n };\n protoOf(AbstractEncoder).ro = function (value) {\n return this.ho(value);\n };\n protoOf(AbstractEncoder).so = function (enumDescriptor, index) {\n return this.ho(index);\n };\n protoOf(AbstractEncoder).to = function (descriptor) {\n return this;\n };\n protoOf(AbstractEncoder).uo = function (descriptor, index, value) {\n if (this.go(descriptor, index)) {\n this.jo(value);\n }\n };\n protoOf(AbstractEncoder).vo = function (descriptor, index, value) {\n if (this.go(descriptor, index)) {\n this.ko(value);\n }\n };\n protoOf(AbstractEncoder).wo = function (descriptor, index, value) {\n if (this.go(descriptor, index)) {\n this.lo(value);\n }\n };\n protoOf(AbstractEncoder).xo = function (descriptor, index, value) {\n if (this.go(descriptor, index)) {\n this.mo(value);\n }\n };\n protoOf(AbstractEncoder).yo = function (descriptor, index, value) {\n if (this.go(descriptor, index)) {\n this.no(value);\n }\n };\n protoOf(AbstractEncoder).zo = function (descriptor, index, value) {\n if (this.go(descriptor, index)) {\n this.oo(value);\n }\n };\n protoOf(AbstractEncoder).ap = function (descriptor, index, value) {\n if (this.go(descriptor, index)) {\n this.po(value);\n }\n };\n protoOf(AbstractEncoder).bp = function (descriptor, index, value) {\n if (this.go(descriptor, index)) {\n this.qo(value);\n }\n };\n protoOf(AbstractEncoder).cp = function (descriptor, index, value) {\n if (this.go(descriptor, index)) {\n this.ro(value);\n }\n };\n protoOf(AbstractEncoder).dp = function (descriptor, index) {\n return this.go(descriptor, index) ? this.to(descriptor.wl(index)) : NoOpEncoder_getInstance();\n };\n protoOf(AbstractEncoder).ep = function (descriptor, index, serializer, value) {\n if (this.go(descriptor, index)) {\n this.fp(serializer, value);\n }\n };\n protoOf(AbstractEncoder).gp = function (descriptor, index, serializer, value) {\n if (this.go(descriptor, index)) {\n this.hp(serializer, value);\n }\n };\n function Decoder() {\n }\n function Companion() {\n this.lp_1 = -1;\n this.mp_1 = -3;\n }\n var Companion_instance_0;\n function Companion_getInstance_6() {\n return Companion_instance_0;\n }\n function CompositeDecoder() {\n }\n function Encoder() {\n }\n function CompositeEncoder() {\n }\n function decodeSequentially_0($this, compositeDecoder) {\n var klassName = compositeDecoder.xn($this.ok(), 0);\n var serializer = findPolymorphicSerializer_0($this, compositeDecoder, klassName);\n return compositeDecoder.ao($this.ok(), 1, serializer);\n }\n function AbstractPolymorphicSerializer() {\n }\n protoOf(AbstractPolymorphicSerializer).el = function (encoder, value) {\n var actualSerializer = findPolymorphicSerializer(this, encoder, value);\n // Inline function 'kotlinx.serialization.encoding.encodeStructure' call\n var descriptor = this.ok();\n var composite = encoder.nn(descriptor);\n // Inline function 'kotlinx.serialization.internal.AbstractPolymorphicSerializer.serialize.' call\n composite.cp(this.ok(), 0, actualSerializer.ok().ql());\n var tmp = this.ok();\n // Inline function 'kotlinx.serialization.internal.cast' call\n var tmp$ret$0 = isInterface(actualSerializer, SerializationStrategy) ? actualSerializer : THROW_CCE();\n composite.ep(tmp, 1, tmp$ret$0, value);\n composite.on(descriptor);\n };\n protoOf(AbstractPolymorphicSerializer).pk = function (encoder, value) {\n return this.el(encoder, !(value == null) ? value : THROW_CCE());\n };\n protoOf(AbstractPolymorphicSerializer).qk = function (decoder) {\n // Inline function 'kotlinx.serialization.encoding.decodeStructure' call\n var descriptor = this.ok();\n var composite = decoder.nn(descriptor);\n var tmp$ret$0;\n $l$block: {\n // Inline function 'kotlinx.serialization.internal.AbstractPolymorphicSerializer.deserialize.' call\n var klassName = null;\n var value = null;\n if (composite.do()) {\n tmp$ret$0 = decodeSequentially_0(this, composite);\n break $l$block;\n }\n mainLoop: while (true) {\n var index = composite.eo(this.ok());\n if (index === -1) {\n break mainLoop;\n } else {\n if (index === 0) {\n klassName = composite.xn(this.ok(), index);\n } else {\n if (index === 1) {\n var tmp$ret$2;\n $l$block_0: {\n // Inline function 'kotlin.requireNotNull' call\n var value_0 = klassName;\n // Inline function 'kotlin.contracts.contract' call\n if (value_0 == null) {\n // Inline function 'kotlinx.serialization.internal.AbstractPolymorphicSerializer.deserialize..' call\n var message = 'Cannot read polymorphic value before its type token';\n throw IllegalArgumentException_init_$Create$(toString(message));\n } else {\n tmp$ret$2 = value_0;\n break $l$block_0;\n }\n }\n klassName = tmp$ret$2;\n var serializer = findPolymorphicSerializer_0(this, composite, klassName);\n value = composite.ao(this.ok(), index, serializer);\n } else {\n var tmp0_elvis_lhs = klassName;\n throw SerializationException_init_$Create$_0('Invalid index in polymorphic deserialization of ' + (tmp0_elvis_lhs == null ? 'unknown class' : tmp0_elvis_lhs) + ('\\n Expected 0, 1 or DECODE_DONE(-1), but found ' + index));\n }\n }\n }\n }\n var tmp$ret$4;\n $l$block_1: {\n // Inline function 'kotlin.requireNotNull' call\n var value_1 = value;\n // Inline function 'kotlin.contracts.contract' call\n if (value_1 == null) {\n // Inline function 'kotlinx.serialization.internal.AbstractPolymorphicSerializer.deserialize..' call\n var message_0 = 'Polymorphic value has not been read for class ' + klassName;\n throw IllegalArgumentException_init_$Create$(toString(message_0));\n } else {\n tmp$ret$4 = value_1;\n break $l$block_1;\n }\n }\n var tmp = tmp$ret$4;\n tmp$ret$0 = !(tmp == null) ? tmp : THROW_CCE();\n }\n var result = tmp$ret$0;\n composite.on(descriptor);\n return result;\n };\n protoOf(AbstractPolymorphicSerializer).fl = function (decoder, klassName) {\n return decoder.co().np(this.dl(), klassName);\n };\n protoOf(AbstractPolymorphicSerializer).gl = function (encoder, value) {\n return encoder.co().op(this.dl(), value);\n };\n function throwSubtypeNotRegistered(subClass, baseClass) {\n var tmp0_elvis_lhs = subClass.v6();\n throwSubtypeNotRegistered_0(tmp0_elvis_lhs == null ? '' + subClass : tmp0_elvis_lhs, baseClass);\n }\n function throwSubtypeNotRegistered_0(subClassName, baseClass) {\n var scope = \"in the polymorphic scope of '\" + baseClass.v6() + \"'\";\n throw SerializationException_init_$Create$_0(subClassName == null ? 'Class discriminator was missing and no default serializers were registered ' + scope + '.' : \"Serializer for subclass '\" + subClassName + \"' is not found \" + scope + '.\\n' + (\"Check if class with serial name '\" + subClassName + \"' exists and serializer is registered in a corresponding SerializersModule.\\n\") + (\"To be registered automatically, class '\" + subClassName + \"' has to be '@Serializable', and the base class '\" + baseClass.v6() + \"' has to be sealed and '@Serializable'.\"));\n }\n function NothingSerializer_0() {\n NothingSerializer_instance = this;\n this.pp_1 = NothingSerialDescriptor_getInstance();\n }\n protoOf(NothingSerializer_0).ok = function () {\n return this.pp_1;\n };\n protoOf(NothingSerializer_0).qp = function (encoder, value) {\n throw SerializationException_init_$Create$_0(\"'kotlin.Nothing' cannot be serialized\");\n };\n protoOf(NothingSerializer_0).pk = function (encoder, value) {\n var tmp;\n if (false) {\n tmp = value;\n } else {\n tmp = THROW_CCE();\n }\n return this.qp(encoder, tmp);\n };\n protoOf(NothingSerializer_0).qk = function (decoder) {\n throw SerializationException_init_$Create$_0(\"'kotlin.Nothing' does not have instances\");\n };\n var NothingSerializer_instance;\n function NothingSerializer_getInstance() {\n if (NothingSerializer_instance == null)\n new NothingSerializer_0();\n return NothingSerializer_instance;\n }\n function DurationSerializer() {\n DurationSerializer_instance = this;\n this.rp_1 = new PrimitiveSerialDescriptor_0('kotlin.time.Duration', STRING_getInstance());\n }\n protoOf(DurationSerializer).ok = function () {\n return this.rp_1;\n };\n protoOf(DurationSerializer).sp = function (encoder, value) {\n encoder.ro(Duration__toIsoString_impl_9h6wsm(value));\n };\n protoOf(DurationSerializer).pk = function (encoder, value) {\n return this.sp(encoder, value instanceof Duration ? value.zh_1 : THROW_CCE());\n };\n protoOf(DurationSerializer).tp = function (decoder) {\n return Companion_getInstance().yh(decoder.in());\n };\n protoOf(DurationSerializer).qk = function (decoder) {\n return new Duration(this.tp(decoder));\n };\n var DurationSerializer_instance;\n function DurationSerializer_getInstance() {\n if (DurationSerializer_instance == null)\n new DurationSerializer();\n return DurationSerializer_instance;\n }\n function CachedNames() {\n }\n function ArrayListClassDesc(elementDesc) {\n ListLikeDescriptor.call(this, elementDesc);\n }\n protoOf(ArrayListClassDesc).ql = function () {\n return 'kotlin.collections.ArrayList';\n };\n function HashSetClassDesc(elementDesc) {\n ListLikeDescriptor.call(this, elementDesc);\n }\n protoOf(HashSetClassDesc).ql = function () {\n return 'kotlin.collections.HashSet';\n };\n function LinkedHashSetClassDesc(elementDesc) {\n ListLikeDescriptor.call(this, elementDesc);\n }\n protoOf(LinkedHashSetClassDesc).ql = function () {\n return 'kotlin.collections.LinkedHashSet';\n };\n function HashMapClassDesc(keyDesc, valueDesc) {\n MapLikeDescriptor.call(this, 'kotlin.collections.HashMap', keyDesc, valueDesc);\n }\n function LinkedHashMapClassDesc(keyDesc, valueDesc) {\n MapLikeDescriptor.call(this, 'kotlin.collections.LinkedHashMap', keyDesc, valueDesc);\n }\n function ArrayClassDesc(elementDesc) {\n ListLikeDescriptor.call(this, elementDesc);\n }\n protoOf(ArrayClassDesc).ql = function () {\n return 'kotlin.Array';\n };\n function ListLikeDescriptor(elementDescriptor) {\n this.wp_1 = elementDescriptor;\n this.xp_1 = 1;\n }\n protoOf(ListLikeDescriptor).ul = function () {\n return LIST_getInstance();\n };\n protoOf(ListLikeDescriptor).sl = function () {\n return this.xp_1;\n };\n protoOf(ListLikeDescriptor).yl = function (index) {\n return index.toString();\n };\n protoOf(ListLikeDescriptor).xl = function (name) {\n var tmp0_elvis_lhs = toIntOrNull(name);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw IllegalArgumentException_init_$Create$(name + ' is not a valid list index');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(ListLikeDescriptor).zl = function (index) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(index >= 0)) {\n // Inline function 'kotlinx.serialization.internal.ListLikeDescriptor.isElementOptional.' call\n var message = 'Illegal index ' + index + ', ' + this.ql() + ' expects only non-negative indices';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n return false;\n };\n protoOf(ListLikeDescriptor).vl = function (index) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(index >= 0)) {\n // Inline function 'kotlinx.serialization.internal.ListLikeDescriptor.getElementAnnotations.' call\n var message = 'Illegal index ' + index + ', ' + this.ql() + ' expects only non-negative indices';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n return emptyList();\n };\n protoOf(ListLikeDescriptor).wl = function (index) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(index >= 0)) {\n // Inline function 'kotlinx.serialization.internal.ListLikeDescriptor.getElementDescriptor.' call\n var message = 'Illegal index ' + index + ', ' + this.ql() + ' expects only non-negative indices';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n return this.wp_1;\n };\n protoOf(ListLikeDescriptor).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ListLikeDescriptor))\n return false;\n if (equals(this.wp_1, other.wp_1) ? this.ql() === other.ql() : false)\n return true;\n return false;\n };\n protoOf(ListLikeDescriptor).hashCode = function () {\n return imul(hashCode(this.wp_1), 31) + getStringHashCode(this.ql()) | 0;\n };\n protoOf(ListLikeDescriptor).toString = function () {\n return this.ql() + '(' + this.wp_1 + ')';\n };\n function MapLikeDescriptor(serialName, keyDescriptor, valueDescriptor) {\n this.cq_1 = serialName;\n this.dq_1 = keyDescriptor;\n this.eq_1 = valueDescriptor;\n this.fq_1 = 2;\n }\n protoOf(MapLikeDescriptor).ql = function () {\n return this.cq_1;\n };\n protoOf(MapLikeDescriptor).ul = function () {\n return MAP_getInstance();\n };\n protoOf(MapLikeDescriptor).sl = function () {\n return this.fq_1;\n };\n protoOf(MapLikeDescriptor).yl = function (index) {\n return index.toString();\n };\n protoOf(MapLikeDescriptor).xl = function (name) {\n var tmp0_elvis_lhs = toIntOrNull(name);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw IllegalArgumentException_init_$Create$(name + ' is not a valid map index');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(MapLikeDescriptor).zl = function (index) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(index >= 0)) {\n // Inline function 'kotlinx.serialization.internal.MapLikeDescriptor.isElementOptional.' call\n var message = 'Illegal index ' + index + ', ' + this.ql() + ' expects only non-negative indices';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n return false;\n };\n protoOf(MapLikeDescriptor).vl = function (index) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(index >= 0)) {\n // Inline function 'kotlinx.serialization.internal.MapLikeDescriptor.getElementAnnotations.' call\n var message = 'Illegal index ' + index + ', ' + this.ql() + ' expects only non-negative indices';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n return emptyList();\n };\n protoOf(MapLikeDescriptor).wl = function (index) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(index >= 0)) {\n // Inline function 'kotlinx.serialization.internal.MapLikeDescriptor.getElementDescriptor.' call\n var message = 'Illegal index ' + index + ', ' + this.ql() + ' expects only non-negative indices';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n var tmp;\n switch (index % 2 | 0) {\n case 0:\n tmp = this.dq_1;\n break;\n case 1:\n tmp = this.eq_1;\n break;\n default:\n var message_0 = 'Unreached';\n throw IllegalStateException_init_$Create$(toString(message_0));\n }\n return tmp;\n };\n protoOf(MapLikeDescriptor).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof MapLikeDescriptor))\n return false;\n if (!(this.ql() === other.ql()))\n return false;\n if (!equals(this.dq_1, other.dq_1))\n return false;\n if (!equals(this.eq_1, other.eq_1))\n return false;\n return true;\n };\n protoOf(MapLikeDescriptor).hashCode = function () {\n var result = getStringHashCode(this.ql());\n result = imul(31, result) + hashCode(this.dq_1) | 0;\n result = imul(31, result) + hashCode(this.eq_1) | 0;\n return result;\n };\n protoOf(MapLikeDescriptor).toString = function () {\n return this.ql() + '(' + this.dq_1 + ', ' + this.eq_1 + ')';\n };\n function PrimitiveArrayDescriptor(primitive) {\n ListLikeDescriptor.call(this, primitive);\n this.kq_1 = primitive.ql() + 'Array';\n }\n protoOf(PrimitiveArrayDescriptor).ql = function () {\n return this.kq_1;\n };\n function ArrayListSerializer(element) {\n CollectionSerializer.call(this, element);\n this.mq_1 = new ArrayListClassDesc(element.ok());\n }\n protoOf(ArrayListSerializer).ok = function () {\n return this.mq_1;\n };\n protoOf(ArrayListSerializer).nq = function () {\n // Inline function 'kotlin.collections.arrayListOf' call\n return ArrayList_init_$Create$_0();\n };\n protoOf(ArrayListSerializer).oq = function (_this__u8e3s4) {\n return _this__u8e3s4.n();\n };\n protoOf(ArrayListSerializer).pq = function (_this__u8e3s4) {\n return this.oq(_this__u8e3s4 instanceof ArrayList ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ArrayListSerializer).qq = function (_this__u8e3s4) {\n return _this__u8e3s4;\n };\n protoOf(ArrayListSerializer).rq = function (_this__u8e3s4) {\n return this.qq(_this__u8e3s4 instanceof ArrayList ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ArrayListSerializer).sq = function (_this__u8e3s4) {\n var tmp0_elvis_lhs = _this__u8e3s4 instanceof ArrayList ? _this__u8e3s4 : null;\n return tmp0_elvis_lhs == null ? ArrayList_init_$Create$_1(_this__u8e3s4) : tmp0_elvis_lhs;\n };\n protoOf(ArrayListSerializer).tq = function (_this__u8e3s4) {\n return this.sq((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, List) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ArrayListSerializer).uq = function (_this__u8e3s4, size) {\n return _this__u8e3s4.i3(size);\n };\n protoOf(ArrayListSerializer).vq = function (_this__u8e3s4, size) {\n return this.uq(_this__u8e3s4 instanceof ArrayList ? _this__u8e3s4 : THROW_CCE(), size);\n };\n protoOf(ArrayListSerializer).wq = function (_this__u8e3s4, index, element) {\n _this__u8e3s4.w1(index, element);\n };\n protoOf(ArrayListSerializer).xq = function (_this__u8e3s4, index, element) {\n var tmp = _this__u8e3s4 instanceof ArrayList ? _this__u8e3s4 : THROW_CCE();\n return this.wq(tmp, index, (element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n function HashSetSerializer(eSerializer) {\n CollectionSerializer.call(this, eSerializer);\n this.ir_1 = new HashSetClassDesc(eSerializer.ok());\n }\n protoOf(HashSetSerializer).ok = function () {\n return this.ir_1;\n };\n protoOf(HashSetSerializer).nq = function () {\n return HashSet_init_$Create$();\n };\n protoOf(HashSetSerializer).jr = function (_this__u8e3s4) {\n return _this__u8e3s4.n();\n };\n protoOf(HashSetSerializer).pq = function (_this__u8e3s4) {\n return this.jr(_this__u8e3s4 instanceof HashSet ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(HashSetSerializer).kr = function (_this__u8e3s4) {\n return _this__u8e3s4;\n };\n protoOf(HashSetSerializer).rq = function (_this__u8e3s4) {\n return this.kr(_this__u8e3s4 instanceof HashSet ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(HashSetSerializer).lr = function (_this__u8e3s4) {\n var tmp0_elvis_lhs = _this__u8e3s4 instanceof HashSet ? _this__u8e3s4 : null;\n return tmp0_elvis_lhs == null ? HashSet_init_$Create$_0(_this__u8e3s4) : tmp0_elvis_lhs;\n };\n protoOf(HashSetSerializer).tq = function (_this__u8e3s4) {\n return this.lr((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Set) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(HashSetSerializer).mr = function (_this__u8e3s4, size) {\n };\n protoOf(HashSetSerializer).vq = function (_this__u8e3s4, size) {\n return this.mr(_this__u8e3s4 instanceof HashSet ? _this__u8e3s4 : THROW_CCE(), size);\n };\n protoOf(HashSetSerializer).nr = function (_this__u8e3s4, index, element) {\n _this__u8e3s4.q(element);\n };\n protoOf(HashSetSerializer).xq = function (_this__u8e3s4, index, element) {\n var tmp = _this__u8e3s4 instanceof HashSet ? _this__u8e3s4 : THROW_CCE();\n return this.nr(tmp, index, (element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n function LinkedHashSetSerializer(eSerializer) {\n CollectionSerializer.call(this, eSerializer);\n this.pr_1 = new LinkedHashSetClassDesc(eSerializer.ok());\n }\n protoOf(LinkedHashSetSerializer).ok = function () {\n return this.pr_1;\n };\n protoOf(LinkedHashSetSerializer).nq = function () {\n // Inline function 'kotlin.collections.linkedSetOf' call\n return LinkedHashSet_init_$Create$();\n };\n protoOf(LinkedHashSetSerializer).qr = function (_this__u8e3s4) {\n return _this__u8e3s4.n();\n };\n protoOf(LinkedHashSetSerializer).pq = function (_this__u8e3s4) {\n return this.qr(_this__u8e3s4 instanceof LinkedHashSet ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(LinkedHashSetSerializer).rr = function (_this__u8e3s4) {\n return _this__u8e3s4;\n };\n protoOf(LinkedHashSetSerializer).rq = function (_this__u8e3s4) {\n return this.rr(_this__u8e3s4 instanceof LinkedHashSet ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(LinkedHashSetSerializer).lr = function (_this__u8e3s4) {\n var tmp0_elvis_lhs = _this__u8e3s4 instanceof LinkedHashSet ? _this__u8e3s4 : null;\n return tmp0_elvis_lhs == null ? LinkedHashSet_init_$Create$_0(_this__u8e3s4) : tmp0_elvis_lhs;\n };\n protoOf(LinkedHashSetSerializer).tq = function (_this__u8e3s4) {\n return this.lr((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Set) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(LinkedHashSetSerializer).sr = function (_this__u8e3s4, size) {\n };\n protoOf(LinkedHashSetSerializer).vq = function (_this__u8e3s4, size) {\n return this.sr(_this__u8e3s4 instanceof LinkedHashSet ? _this__u8e3s4 : THROW_CCE(), size);\n };\n protoOf(LinkedHashSetSerializer).tr = function (_this__u8e3s4, index, element) {\n _this__u8e3s4.q(element);\n };\n protoOf(LinkedHashSetSerializer).xq = function (_this__u8e3s4, index, element) {\n var tmp = _this__u8e3s4 instanceof LinkedHashSet ? _this__u8e3s4 : THROW_CCE();\n return this.tr(tmp, index, (element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n function HashMapSerializer(kSerializer, vSerializer) {\n MapLikeSerializer.call(this, kSerializer, vSerializer);\n this.wr_1 = new HashMapClassDesc(kSerializer.ok(), vSerializer.ok());\n }\n protoOf(HashMapSerializer).ok = function () {\n return this.wr_1;\n };\n protoOf(HashMapSerializer).xr = function (_this__u8e3s4) {\n return _this__u8e3s4.n();\n };\n protoOf(HashMapSerializer).yr = function (_this__u8e3s4) {\n return this.xr((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Map) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(HashMapSerializer).zr = function (_this__u8e3s4) {\n // Inline function 'kotlin.collections.iterator' call\n return _this__u8e3s4.q2().t();\n };\n protoOf(HashMapSerializer).as = function (_this__u8e3s4) {\n return this.zr((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Map) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(HashMapSerializer).nq = function () {\n return HashMap_init_$Create$();\n };\n protoOf(HashMapSerializer).bs = function (_this__u8e3s4) {\n return imul(_this__u8e3s4.n(), 2);\n };\n protoOf(HashMapSerializer).pq = function (_this__u8e3s4) {\n return this.bs(_this__u8e3s4 instanceof HashMap ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(HashMapSerializer).cs = function (_this__u8e3s4) {\n return _this__u8e3s4;\n };\n protoOf(HashMapSerializer).rq = function (_this__u8e3s4) {\n return this.cs(_this__u8e3s4 instanceof HashMap ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(HashMapSerializer).ds = function (_this__u8e3s4) {\n var tmp0_elvis_lhs = _this__u8e3s4 instanceof HashMap ? _this__u8e3s4 : null;\n return tmp0_elvis_lhs == null ? HashMap_init_$Create$_0(_this__u8e3s4) : tmp0_elvis_lhs;\n };\n protoOf(HashMapSerializer).tq = function (_this__u8e3s4) {\n return this.ds((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Map) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(HashMapSerializer).es = function (_this__u8e3s4, size) {\n };\n protoOf(HashMapSerializer).vq = function (_this__u8e3s4, size) {\n return this.es(_this__u8e3s4 instanceof HashMap ? _this__u8e3s4 : THROW_CCE(), size);\n };\n function LinkedHashMapSerializer(kSerializer, vSerializer) {\n MapLikeSerializer.call(this, kSerializer, vSerializer);\n this.ls_1 = new LinkedHashMapClassDesc(kSerializer.ok(), vSerializer.ok());\n }\n protoOf(LinkedHashMapSerializer).ok = function () {\n return this.ls_1;\n };\n protoOf(LinkedHashMapSerializer).xr = function (_this__u8e3s4) {\n return _this__u8e3s4.n();\n };\n protoOf(LinkedHashMapSerializer).yr = function (_this__u8e3s4) {\n return this.xr((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Map) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(LinkedHashMapSerializer).zr = function (_this__u8e3s4) {\n // Inline function 'kotlin.collections.iterator' call\n return _this__u8e3s4.q2().t();\n };\n protoOf(LinkedHashMapSerializer).as = function (_this__u8e3s4) {\n return this.zr((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Map) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(LinkedHashMapSerializer).nq = function () {\n return LinkedHashMap_init_$Create$();\n };\n protoOf(LinkedHashMapSerializer).ms = function (_this__u8e3s4) {\n return imul(_this__u8e3s4.n(), 2);\n };\n protoOf(LinkedHashMapSerializer).pq = function (_this__u8e3s4) {\n return this.ms(_this__u8e3s4 instanceof LinkedHashMap ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(LinkedHashMapSerializer).ns = function (_this__u8e3s4) {\n return _this__u8e3s4;\n };\n protoOf(LinkedHashMapSerializer).rq = function (_this__u8e3s4) {\n return this.ns(_this__u8e3s4 instanceof LinkedHashMap ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(LinkedHashMapSerializer).ds = function (_this__u8e3s4) {\n var tmp0_elvis_lhs = _this__u8e3s4 instanceof LinkedHashMap ? _this__u8e3s4 : null;\n return tmp0_elvis_lhs == null ? LinkedHashMap_init_$Create$_0(_this__u8e3s4) : tmp0_elvis_lhs;\n };\n protoOf(LinkedHashMapSerializer).tq = function (_this__u8e3s4) {\n return this.ds((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Map) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(LinkedHashMapSerializer).os = function (_this__u8e3s4, size) {\n };\n protoOf(LinkedHashMapSerializer).vq = function (_this__u8e3s4, size) {\n return this.os(_this__u8e3s4 instanceof LinkedHashMap ? _this__u8e3s4 : THROW_CCE(), size);\n };\n function ReferenceArraySerializer(kClass, eSerializer) {\n CollectionLikeSerializer.call(this, eSerializer);\n this.qs_1 = kClass;\n this.rs_1 = new ArrayClassDesc(eSerializer.ok());\n }\n protoOf(ReferenceArraySerializer).ok = function () {\n return this.rs_1;\n };\n protoOf(ReferenceArraySerializer).ss = function (_this__u8e3s4) {\n return _this__u8e3s4.length;\n };\n protoOf(ReferenceArraySerializer).yr = function (_this__u8e3s4) {\n return this.ss((!(_this__u8e3s4 == null) ? isArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ReferenceArraySerializer).ts = function (_this__u8e3s4) {\n return arrayIterator(_this__u8e3s4);\n };\n protoOf(ReferenceArraySerializer).as = function (_this__u8e3s4) {\n return this.ts((!(_this__u8e3s4 == null) ? isArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ReferenceArraySerializer).nq = function () {\n // Inline function 'kotlin.collections.arrayListOf' call\n return ArrayList_init_$Create$_0();\n };\n protoOf(ReferenceArraySerializer).us = function (_this__u8e3s4) {\n return _this__u8e3s4.n();\n };\n protoOf(ReferenceArraySerializer).pq = function (_this__u8e3s4) {\n return this.us(_this__u8e3s4 instanceof ArrayList ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ReferenceArraySerializer).vs = function (_this__u8e3s4) {\n return toNativeArrayImpl(_this__u8e3s4, this.qs_1);\n };\n protoOf(ReferenceArraySerializer).rq = function (_this__u8e3s4) {\n return this.vs(_this__u8e3s4 instanceof ArrayList ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ReferenceArraySerializer).ws = function (_this__u8e3s4) {\n return ArrayList_init_$Create$_1(asList(_this__u8e3s4));\n };\n protoOf(ReferenceArraySerializer).tq = function (_this__u8e3s4) {\n return this.ws((!(_this__u8e3s4 == null) ? isArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ReferenceArraySerializer).xs = function (_this__u8e3s4, size) {\n return _this__u8e3s4.i3(size);\n };\n protoOf(ReferenceArraySerializer).vq = function (_this__u8e3s4, size) {\n return this.xs(_this__u8e3s4 instanceof ArrayList ? _this__u8e3s4 : THROW_CCE(), size);\n };\n protoOf(ReferenceArraySerializer).ys = function (_this__u8e3s4, index, element) {\n _this__u8e3s4.w1(index, element);\n };\n protoOf(ReferenceArraySerializer).xq = function (_this__u8e3s4, index, element) {\n var tmp = _this__u8e3s4 instanceof ArrayList ? _this__u8e3s4 : THROW_CCE();\n return this.ys(tmp, index, (element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n function CollectionSerializer(element) {\n CollectionLikeSerializer.call(this, element);\n }\n protoOf(CollectionSerializer).zq = function (_this__u8e3s4) {\n return _this__u8e3s4.n();\n };\n protoOf(CollectionSerializer).yr = function (_this__u8e3s4) {\n return this.zq((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Collection) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(CollectionSerializer).ar = function (_this__u8e3s4) {\n return _this__u8e3s4.t();\n };\n protoOf(CollectionSerializer).as = function (_this__u8e3s4) {\n return this.ar((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Collection) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n function MapLikeSerializer(keySerializer, valueSerializer) {\n AbstractCollectionSerializer.call(this);\n this.fs_1 = keySerializer;\n this.gs_1 = valueSerializer;\n }\n protoOf(MapLikeSerializer).hs = function (decoder, builder, startIndex, size) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(size >= 0)) {\n // Inline function 'kotlinx.serialization.internal.MapLikeSerializer.readAll.' call\n var message = 'Size must be known in advance when using READ_ALL';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n var progression = step(until(0, imul(size, 2)), 2);\n var inductionVariable = progression.ra_1;\n var last = progression.sa_1;\n var step_0 = progression.ta_1;\n if ((step_0 > 0 ? inductionVariable <= last : false) ? true : step_0 < 0 ? last <= inductionVariable : false)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + step_0 | 0;\n this.is(decoder, startIndex + index | 0, builder, false);\n }\n while (!(index === last));\n };\n protoOf(MapLikeSerializer).dr = function (decoder, builder, startIndex, size) {\n return this.hs(decoder, (!(builder == null) ? isInterface(builder, MutableMap) : false) ? builder : THROW_CCE(), startIndex, size);\n };\n protoOf(MapLikeSerializer).is = function (decoder, index, builder, checkIndex) {\n var key = decoder.ao(this.ok(), index, this.fs_1);\n var tmp;\n if (checkIndex) {\n // Inline function 'kotlin.also' call\n var this_0 = decoder.eo(this.ok());\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.internal.MapLikeSerializer.readElement.' call\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this_0 === (index + 1 | 0))) {\n // Inline function 'kotlinx.serialization.internal.MapLikeSerializer.readElement..' call\n var message = 'Value must follow key in a map, index for key: ' + index + ', returned index for value: ' + this_0;\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n tmp = this_0;\n } else {\n tmp = index + 1 | 0;\n }\n var vIndex = tmp;\n var tmp_0;\n var tmp_1;\n if (builder.y2(key)) {\n var tmp_2 = this.gs_1.ok().ul();\n tmp_1 = !(tmp_2 instanceof PrimitiveKind);\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp_0 = decoder.zn(this.ok(), vIndex, this.gs_1, getValue(builder, key));\n } else {\n tmp_0 = decoder.ao(this.ok(), vIndex, this.gs_1);\n }\n var value = tmp_0;\n // Inline function 'kotlin.collections.set' call\n builder.r2(key, value);\n };\n protoOf(MapLikeSerializer).er = function (decoder, index, builder, checkIndex) {\n return this.is(decoder, index, (!(builder == null) ? isInterface(builder, MutableMap) : false) ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(MapLikeSerializer).cr = function (encoder, value) {\n var size = this.yr(value);\n // Inline function 'kotlinx.serialization.encoding.encodeCollection' call\n var descriptor = this.ok();\n var composite = encoder.jp(descriptor, size);\n // Inline function 'kotlinx.serialization.internal.MapLikeSerializer.serialize.' call\n var iterator = this.as(value);\n var index = 0;\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = iterator;\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlinx.serialization.internal.MapLikeSerializer.serialize..' call\n // Inline function 'kotlin.collections.component1' call\n var k = element.t2();\n // Inline function 'kotlin.collections.component2' call\n var v = element.u2();\n var tmp = this.ok();\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n composite.ep(tmp, tmp0, this.fs_1, k);\n var tmp_0 = this.ok();\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n composite.ep(tmp_0, tmp1, this.gs_1, v);\n }\n composite.on(descriptor);\n };\n protoOf(MapLikeSerializer).pk = function (encoder, value) {\n return this.cr(encoder, (value == null ? true : !(value == null)) ? value : THROW_CCE());\n };\n function CollectionLikeSerializer(elementSerializer) {\n AbstractCollectionSerializer.call(this);\n this.br_1 = elementSerializer;\n }\n protoOf(CollectionLikeSerializer).cr = function (encoder, value) {\n var size = this.yr(value);\n // Inline function 'kotlinx.serialization.encoding.encodeCollection' call\n var descriptor = this.ok();\n var composite = encoder.jp(descriptor, size);\n // Inline function 'kotlinx.serialization.internal.CollectionLikeSerializer.serialize.' call\n var iterator = this.as(value);\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n composite.ep(this.ok(), index, this.br_1, iterator.w());\n }\n while (inductionVariable < size);\n composite.on(descriptor);\n };\n protoOf(CollectionLikeSerializer).pk = function (encoder, value) {\n return this.cr(encoder, (value == null ? true : !(value == null)) ? value : THROW_CCE());\n };\n protoOf(CollectionLikeSerializer).dr = function (decoder, builder, startIndex, size) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(size >= 0)) {\n // Inline function 'kotlinx.serialization.internal.CollectionLikeSerializer.readAll.' call\n var message = 'Size must be known in advance when using READ_ALL';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n this.er(decoder, startIndex + index | 0, builder, false);\n }\n while (inductionVariable < size);\n };\n protoOf(CollectionLikeSerializer).er = function (decoder, index, builder, checkIndex) {\n this.xq(builder, index, decoder.ao(this.ok(), index, this.br_1));\n };\n function readSize($this, decoder, builder) {\n var size = decoder.fo($this.ok());\n $this.vq(builder, size);\n return size;\n }\n function AbstractCollectionSerializer() {\n }\n protoOf(AbstractCollectionSerializer).gr = function (decoder, previous) {\n var tmp1_elvis_lhs = previous == null ? null : this.tq(previous);\n var builder = tmp1_elvis_lhs == null ? this.nq() : tmp1_elvis_lhs;\n var startIndex = this.pq(builder);\n var compositeDecoder = decoder.nn(this.ok());\n if (compositeDecoder.do()) {\n this.dr(compositeDecoder, builder, startIndex, readSize(this, compositeDecoder, builder));\n } else {\n $l$loop: while (true) {\n var index = compositeDecoder.eo(this.ok());\n if (index === -1)\n break $l$loop;\n this.fr(compositeDecoder, startIndex + index | 0, builder);\n }\n }\n compositeDecoder.on(this.ok());\n return this.rq(builder);\n };\n protoOf(AbstractCollectionSerializer).qk = function (decoder) {\n return this.gr(decoder, null);\n };\n protoOf(AbstractCollectionSerializer).fr = function (decoder, index, builder, checkIndex, $super) {\n checkIndex = checkIndex === VOID ? true : checkIndex;\n var tmp;\n if ($super === VOID) {\n this.er(decoder, index, builder, checkIndex);\n tmp = Unit_instance;\n } else {\n tmp = $super.er.call(this, decoder, index, builder, checkIndex);\n }\n return tmp;\n };\n function PrimitiveArraySerializer(primitiveSerializer) {\n CollectionLikeSerializer.call(this, primitiveSerializer);\n this.at_1 = new PrimitiveArrayDescriptor(primitiveSerializer.ok());\n }\n protoOf(PrimitiveArraySerializer).ok = function () {\n return this.at_1;\n };\n protoOf(PrimitiveArraySerializer).bt = function (_this__u8e3s4) {\n return _this__u8e3s4.ct();\n };\n protoOf(PrimitiveArraySerializer).pq = function (_this__u8e3s4) {\n return this.bt(_this__u8e3s4 instanceof PrimitiveArrayBuilder ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(PrimitiveArraySerializer).dt = function (_this__u8e3s4) {\n return _this__u8e3s4.et();\n };\n protoOf(PrimitiveArraySerializer).rq = function (_this__u8e3s4) {\n return this.dt(_this__u8e3s4 instanceof PrimitiveArrayBuilder ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(PrimitiveArraySerializer).ft = function (_this__u8e3s4, size) {\n return _this__u8e3s4.i3(size);\n };\n protoOf(PrimitiveArraySerializer).vq = function (_this__u8e3s4, size) {\n return this.ft(_this__u8e3s4 instanceof PrimitiveArrayBuilder ? _this__u8e3s4 : THROW_CCE(), size);\n };\n protoOf(PrimitiveArraySerializer).gt = function (_this__u8e3s4) {\n var message = 'This method lead to boxing and must not be used, use writeContents instead';\n throw IllegalStateException_init_$Create$(toString(message));\n };\n protoOf(PrimitiveArraySerializer).as = function (_this__u8e3s4) {\n return this.gt((_this__u8e3s4 == null ? true : !(_this__u8e3s4 == null)) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(PrimitiveArraySerializer).ht = function (_this__u8e3s4, index, element) {\n var message = 'This method lead to boxing and must not be used, use Builder.append instead';\n throw IllegalStateException_init_$Create$(toString(message));\n };\n protoOf(PrimitiveArraySerializer).xq = function (_this__u8e3s4, index, element) {\n var tmp = _this__u8e3s4 instanceof PrimitiveArrayBuilder ? _this__u8e3s4 : THROW_CCE();\n return this.ht(tmp, index, (element == null ? true : !(element == null)) ? element : THROW_CCE());\n };\n protoOf(PrimitiveArraySerializer).nq = function () {\n return this.tq(this.it());\n };\n protoOf(PrimitiveArraySerializer).lt = function (encoder, value) {\n var size = this.yr(value);\n // Inline function 'kotlinx.serialization.encoding.encodeCollection' call\n var descriptor = this.at_1;\n var composite = encoder.jp(descriptor, size);\n // Inline function 'kotlinx.serialization.internal.PrimitiveArraySerializer.serialize.' call\n this.kt(composite, value, size);\n composite.on(descriptor);\n };\n protoOf(PrimitiveArraySerializer).pk = function (encoder, value) {\n return this.lt(encoder, (value == null ? true : !(value == null)) ? value : THROW_CCE());\n };\n protoOf(PrimitiveArraySerializer).cr = function (encoder, value) {\n return this.lt(encoder, (value == null ? true : !(value == null)) ? value : THROW_CCE());\n };\n protoOf(PrimitiveArraySerializer).qk = function (decoder) {\n return this.gr(decoder, null);\n };\n function PrimitiveArrayBuilder() {\n }\n protoOf(PrimitiveArrayBuilder).mt = function (requiredCapacity, $super) {\n requiredCapacity = requiredCapacity === VOID ? this.ct() + 1 | 0 : requiredCapacity;\n var tmp;\n if ($super === VOID) {\n this.i3(requiredCapacity);\n tmp = Unit_instance;\n } else {\n tmp = $super.i3.call(this, requiredCapacity);\n }\n return tmp;\n };\n function Companion_0() {\n Companion_instance_1 = this;\n this.nt_1 = longArray(0);\n }\n var Companion_instance_1;\n function Companion_getInstance_7() {\n if (Companion_instance_1 == null)\n new Companion_0();\n return Companion_instance_1;\n }\n function prepareHighMarksArray($this, elementsCount) {\n var slotsCount = (elementsCount - 1 | 0) >>> 6 | 0;\n Companion_getInstance_0();\n var elementsInLastSlot = elementsCount & (64 - 1 | 0);\n var highMarks = longArray(slotsCount);\n if (!(elementsInLastSlot === 0)) {\n highMarks[get_lastIndex(highMarks)] = (new Long(-1, -1)).yb(elementsCount);\n }\n return highMarks;\n }\n function markHigh($this, index) {\n var slot = (index >>> 6 | 0) - 1 | 0;\n Companion_getInstance_0();\n var offsetInSlot = index & (64 - 1 | 0);\n $this.rt_1[slot] = $this.rt_1[slot].cc((new Long(1, 0)).yb(offsetInSlot));\n }\n function nextUnmarkedHighIndex($this) {\n var inductionVariable = 0;\n var last = $this.rt_1.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var slot = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var tmp = slot + 1 | 0;\n Companion_getInstance_0();\n var slotOffset = imul(tmp, 64);\n var slotMarks = $this.rt_1[slot];\n while (!slotMarks.equals(new Long(-1, -1))) {\n var indexInSlot = countTrailingZeroBits(slotMarks.xb());\n slotMarks = slotMarks.cc((new Long(1, 0)).yb(indexInSlot));\n var index = slotOffset + indexInSlot | 0;\n if ($this.pt_1($this.ot_1, index)) {\n $this.rt_1[slot] = slotMarks;\n return index;\n }\n }\n $this.rt_1[slot] = slotMarks;\n }\n while (inductionVariable <= last);\n return -1;\n }\n function ElementMarker(descriptor, readIfAbsent) {\n Companion_getInstance_7();\n this.ot_1 = descriptor;\n this.pt_1 = readIfAbsent;\n var elementsCount = this.ot_1.sl();\n Companion_getInstance_0();\n if (elementsCount <= 64) {\n var tmp = this;\n var tmp_0;\n Companion_getInstance_0();\n if (elementsCount === 64) {\n tmp_0 = new Long(0, 0);\n } else {\n tmp_0 = (new Long(-1, -1)).yb(elementsCount);\n }\n tmp.qt_1 = tmp_0;\n this.rt_1 = Companion_getInstance_7().nt_1;\n } else {\n this.qt_1 = new Long(0, 0);\n this.rt_1 = prepareHighMarksArray(this, elementsCount);\n }\n }\n protoOf(ElementMarker).st = function (index) {\n Companion_getInstance_0();\n if (index < 64) {\n this.qt_1 = this.qt_1.cc((new Long(1, 0)).yb(index));\n } else {\n markHigh(this, index);\n }\n };\n protoOf(ElementMarker).tt = function () {\n var elementsCount = this.ot_1.sl();\n while (!this.qt_1.equals(new Long(-1, -1))) {\n var index = countTrailingZeroBits(this.qt_1.xb());\n this.qt_1 = this.qt_1.cc((new Long(1, 0)).yb(index));\n if (this.pt_1(this.ot_1, index)) {\n return index;\n }\n }\n Companion_getInstance_0();\n if (elementsCount > 64) {\n return nextUnmarkedHighIndex(this);\n }\n return -1;\n };\n function createSimpleEnumSerializer(serialName, values) {\n return new EnumSerializer(serialName, values);\n }\n function createAnnotatedEnumSerializer(serialName, values, names, entryAnnotations, classAnnotations) {\n var descriptor = new EnumDescriptor(serialName, values.length);\n if (classAnnotations == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = classAnnotations.length;\n while (inductionVariable < last) {\n var element = classAnnotations[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlinx.serialization.internal.createAnnotatedEnumSerializer.' call\n descriptor.gu(element);\n }\n }\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var inductionVariable_0 = 0;\n var last_0 = values.length;\n while (inductionVariable_0 < last_0) {\n var item = values[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'kotlinx.serialization.internal.createAnnotatedEnumSerializer.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var tmp0_elvis_lhs = getOrNull(names, tmp1);\n var elementName = tmp0_elvis_lhs == null ? item.w9_1 : tmp0_elvis_lhs;\n descriptor.hu(elementName);\n var tmp1_safe_receiver = getOrNull(entryAnnotations, tmp1);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_1 = 0;\n var last_1 = tmp1_safe_receiver.length;\n while (inductionVariable_1 < last_1) {\n var element_0 = tmp1_safe_receiver[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'kotlinx.serialization.internal.createAnnotatedEnumSerializer..' call\n descriptor.iu(element_0);\n }\n }\n }\n return EnumSerializer_init_$Create$(serialName, values, descriptor);\n }\n function EnumSerializer_init_$Init$(serialName, values, descriptor, $this) {\n EnumSerializer.call($this, serialName, values);\n $this.ku_1 = descriptor;\n return $this;\n }\n function EnumSerializer_init_$Create$(serialName, values, descriptor) {\n return EnumSerializer_init_$Init$(serialName, values, descriptor, objectCreate(protoOf(EnumSerializer)));\n }\n function createUnmarkedDescriptor($this, serialName) {\n var d = new EnumDescriptor(serialName, $this.ju_1.length);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = $this.ju_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlinx.serialization.internal.EnumSerializer.createUnmarkedDescriptor.' call\n d.hu(element.w9_1);\n }\n return d;\n }\n function EnumSerializer$descriptor$delegate$lambda(this$0, $serialName) {\n return function () {\n var tmp0_elvis_lhs = this$0.ku_1;\n return tmp0_elvis_lhs == null ? createUnmarkedDescriptor(this$0, $serialName) : tmp0_elvis_lhs;\n };\n }\n function EnumSerializer(serialName, values) {\n this.ju_1 = values;\n this.ku_1 = null;\n var tmp = this;\n tmp.lu_1 = lazy_0(EnumSerializer$descriptor$delegate$lambda(this, serialName));\n }\n protoOf(EnumSerializer).ok = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.lu_1;\n descriptor$factory_0();\n return this_0.u2();\n };\n protoOf(EnumSerializer).mu = function (encoder, value) {\n var index = indexOf(this.ju_1, value);\n if (index === -1) {\n throw SerializationException_init_$Create$_0('' + value + ' is not a valid enum ' + this.ok().ql() + ', ' + ('must be one of ' + contentToString(this.ju_1)));\n }\n encoder.so(this.ok(), index);\n };\n protoOf(EnumSerializer).pk = function (encoder, value) {\n return this.mu(encoder, value instanceof Enum ? value : THROW_CCE());\n };\n protoOf(EnumSerializer).qk = function (decoder) {\n var index = decoder.jn(this.ok());\n if (!(0 <= index ? index <= (this.ju_1.length - 1 | 0) : false)) {\n throw SerializationException_init_$Create$_0('' + index + ' is not among valid ' + this.ok().ql() + ' enum values, ' + ('values size is ' + this.ju_1.length));\n }\n return this.ju_1[index];\n };\n protoOf(EnumSerializer).toString = function () {\n return 'kotlinx.serialization.internal.EnumSerializer<' + this.ok().ql() + '>';\n };\n function _get_elementDescriptors__y23q9p($this) {\n // Inline function 'kotlin.getValue' call\n var this_0 = $this.av_1;\n elementDescriptors$factory();\n return this_0.u2();\n }\n function EnumDescriptor$elementDescriptors$delegate$lambda($elementsCount, $name, this$0) {\n return function () {\n var tmp = 0;\n var tmp_0 = $elementsCount;\n // Inline function 'kotlin.arrayOfNulls' call\n var tmp_1 = fillArrayVal(Array(tmp_0), null);\n while (tmp < tmp_0) {\n var tmp_2 = tmp;\n tmp_1[tmp_2] = buildSerialDescriptor($name + '.' + this$0.yl(tmp_2), OBJECT_getInstance(), []);\n tmp = tmp + 1 | 0;\n }\n return tmp_1;\n };\n }\n function EnumDescriptor(name, elementsCount) {\n PluginGeneratedSerialDescriptor.call(this, name, VOID, elementsCount);\n this.zu_1 = ENUM_getInstance();\n var tmp = this;\n tmp.av_1 = lazy_0(EnumDescriptor$elementDescriptors$delegate$lambda(elementsCount, name, this));\n }\n protoOf(EnumDescriptor).ul = function () {\n return this.zu_1;\n };\n protoOf(EnumDescriptor).wl = function (index) {\n return getChecked(_get_elementDescriptors__y23q9p(this), index);\n };\n protoOf(EnumDescriptor).equals = function (other) {\n if (this === other)\n return true;\n if (other == null)\n return false;\n if (!(!(other == null) ? isInterface(other, SerialDescriptor) : false))\n return false;\n if (!(other.ul() === ENUM_getInstance()))\n return false;\n if (!(this.ql() === other.ql()))\n return false;\n if (!equals(cachedSerialNames(this), cachedSerialNames(other)))\n return false;\n return true;\n };\n protoOf(EnumDescriptor).toString = function () {\n return joinToString(get_elementNames(this), ', ', this.ql() + '(', ')');\n };\n protoOf(EnumDescriptor).hashCode = function () {\n var result = getStringHashCode(this.ql());\n // Inline function 'kotlinx.serialization.internal.elementsHashCodeBy' call\n // Inline function 'kotlin.collections.fold' call\n var accumulator = 1;\n var tmp0_iterator = get_elementNames(this).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlinx.serialization.internal.elementsHashCodeBy.' call\n var hash = accumulator;\n var tmp = imul(31, hash);\n // Inline function 'kotlin.hashCode' call\n // Inline function 'kotlinx.serialization.internal.EnumDescriptor.hashCode.' call\n var tmp1_elvis_lhs = element == null ? null : hashCode(element);\n accumulator = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;\n }\n var elementsHashCode = accumulator;\n result = imul(31, result) + elementsHashCode | 0;\n return result;\n };\n function descriptor$factory_0() {\n return getPropertyCallableRef('descriptor', 1, KProperty1, function (receiver) {\n return receiver.ok();\n }, null);\n }\n function elementDescriptors$factory() {\n return getPropertyCallableRef('elementDescriptors', 1, KProperty1, function (receiver) {\n return _get_elementDescriptors__y23q9p(receiver);\n }, null);\n }\n function InlinePrimitiveDescriptor(name, primitiveSerializer) {\n return new InlineClassDescriptor(name, new InlinePrimitiveDescriptor$1(primitiveSerializer));\n }\n function InlineClassDescriptor(name, generatedSerializer) {\n PluginGeneratedSerialDescriptor.call(this, name, generatedSerializer, 1);\n this.pv_1 = true;\n }\n protoOf(InlineClassDescriptor).tl = function () {\n return this.pv_1;\n };\n protoOf(InlineClassDescriptor).hashCode = function () {\n return imul(protoOf(PluginGeneratedSerialDescriptor).hashCode.call(this), 31);\n };\n protoOf(InlineClassDescriptor).equals = function (other) {\n var tmp$ret$0;\n $l$block_5: {\n // Inline function 'kotlinx.serialization.internal.equalsImpl' call\n if (this === other) {\n tmp$ret$0 = true;\n break $l$block_5;\n }\n if (!(other instanceof InlineClassDescriptor)) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n if (!(this.ql() === other.ql())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n // Inline function 'kotlinx.serialization.internal.InlineClassDescriptor.equals.' call\n if (!(other.pv_1 ? contentEquals(this.bv(), other.bv()) : false)) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n if (!(this.sl() === other.sl())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n var inductionVariable = 0;\n var last = this.sl();\n if (inductionVariable < last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (!(this.wl(index).ql() === other.wl(index).ql())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n if (!equals(this.wl(index).ul(), other.wl(index).ul())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n }\n while (inductionVariable < last);\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n };\n function InlinePrimitiveDescriptor$1($primitiveSerializer) {\n this.qv_1 = $primitiveSerializer;\n }\n protoOf(InlinePrimitiveDescriptor$1).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [this.qv_1];\n };\n protoOf(InlinePrimitiveDescriptor$1).ok = function () {\n var message = 'unsupported';\n throw IllegalStateException_init_$Create$(toString(message));\n };\n protoOf(InlinePrimitiveDescriptor$1).pk = function (encoder, value) {\n // Inline function 'kotlin.error' call\n var message = 'unsupported';\n throw IllegalStateException_init_$Create$(toString(message));\n };\n protoOf(InlinePrimitiveDescriptor$1).qk = function (decoder) {\n // Inline function 'kotlin.error' call\n var message = 'unsupported';\n throw IllegalStateException_init_$Create$(toString(message));\n };\n function jsonCachedSerialNames(_this__u8e3s4) {\n return cachedSerialNames(_this__u8e3s4);\n }\n function NoOpEncoder() {\n NoOpEncoder_instance = this;\n AbstractEncoder.call(this);\n this.tv_1 = EmptySerializersModule_0();\n }\n protoOf(NoOpEncoder).co = function () {\n return this.tv_1;\n };\n protoOf(NoOpEncoder).ho = function (value) {\n return Unit_instance;\n };\n protoOf(NoOpEncoder).io = function () {\n return Unit_instance;\n };\n protoOf(NoOpEncoder).jo = function (value) {\n return Unit_instance;\n };\n protoOf(NoOpEncoder).ko = function (value) {\n return Unit_instance;\n };\n protoOf(NoOpEncoder).lo = function (value) {\n return Unit_instance;\n };\n protoOf(NoOpEncoder).mo = function (value) {\n return Unit_instance;\n };\n protoOf(NoOpEncoder).no = function (value) {\n return Unit_instance;\n };\n protoOf(NoOpEncoder).oo = function (value) {\n return Unit_instance;\n };\n protoOf(NoOpEncoder).po = function (value) {\n return Unit_instance;\n };\n protoOf(NoOpEncoder).qo = function (value) {\n return Unit_instance;\n };\n protoOf(NoOpEncoder).ro = function (value) {\n return Unit_instance;\n };\n protoOf(NoOpEncoder).so = function (enumDescriptor, index) {\n return Unit_instance;\n };\n var NoOpEncoder_instance;\n function NoOpEncoder_getInstance() {\n if (NoOpEncoder_instance == null)\n new NoOpEncoder();\n return NoOpEncoder_instance;\n }\n function error($this) {\n throw IllegalStateException_init_$Create$('Descriptor for type `kotlin.Nothing` does not have elements');\n }\n function NothingSerialDescriptor() {\n NothingSerialDescriptor_instance = this;\n this.uv_1 = OBJECT_getInstance();\n this.vv_1 = 'kotlin.Nothing';\n }\n protoOf(NothingSerialDescriptor).ul = function () {\n return this.uv_1;\n };\n protoOf(NothingSerialDescriptor).ql = function () {\n return this.vv_1;\n };\n protoOf(NothingSerialDescriptor).sl = function () {\n return 0;\n };\n protoOf(NothingSerialDescriptor).yl = function (index) {\n error(this);\n };\n protoOf(NothingSerialDescriptor).xl = function (name) {\n error(this);\n };\n protoOf(NothingSerialDescriptor).zl = function (index) {\n error(this);\n };\n protoOf(NothingSerialDescriptor).wl = function (index) {\n error(this);\n };\n protoOf(NothingSerialDescriptor).vl = function (index) {\n error(this);\n };\n protoOf(NothingSerialDescriptor).toString = function () {\n return 'NothingSerialDescriptor';\n };\n protoOf(NothingSerialDescriptor).equals = function (other) {\n return this === other;\n };\n protoOf(NothingSerialDescriptor).hashCode = function () {\n return getStringHashCode(this.vv_1) + imul(31, this.uv_1.hashCode()) | 0;\n };\n var NothingSerialDescriptor_instance;\n function NothingSerialDescriptor_getInstance() {\n if (NothingSerialDescriptor_instance == null)\n new NothingSerialDescriptor();\n return NothingSerialDescriptor_instance;\n }\n function NullableSerializer(serializer) {\n this.wv_1 = serializer;\n this.xv_1 = new SerialDescriptorForNullable(this.wv_1.ok());\n }\n protoOf(NullableSerializer).ok = function () {\n return this.xv_1;\n };\n protoOf(NullableSerializer).yv = function (encoder, value) {\n if (!(value == null)) {\n encoder.ip();\n encoder.fp(this.wv_1, value);\n } else {\n encoder.io();\n }\n };\n protoOf(NullableSerializer).pk = function (encoder, value) {\n return this.yv(encoder, (value == null ? true : !(value == null)) ? value : THROW_CCE());\n };\n protoOf(NullableSerializer).qk = function (decoder) {\n return decoder.ym() ? decoder.mn(this.wv_1) : decoder.zm();\n };\n protoOf(NullableSerializer).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof NullableSerializer))\n THROW_CCE();\n if (!equals(this.wv_1, other.wv_1))\n return false;\n return true;\n };\n protoOf(NullableSerializer).hashCode = function () {\n return hashCode(this.wv_1);\n };\n function SerialDescriptorForNullable(original) {\n this.am_1 = original;\n this.bm_1 = this.am_1.ql() + '?';\n this.cm_1 = cachedSerialNames(this.am_1);\n }\n protoOf(SerialDescriptorForNullable).rl = function () {\n return this.am_1.rl();\n };\n protoOf(SerialDescriptorForNullable).sl = function () {\n return this.am_1.sl();\n };\n protoOf(SerialDescriptorForNullable).tl = function () {\n return this.am_1.tl();\n };\n protoOf(SerialDescriptorForNullable).ul = function () {\n return this.am_1.ul();\n };\n protoOf(SerialDescriptorForNullable).vl = function (index) {\n return this.am_1.vl(index);\n };\n protoOf(SerialDescriptorForNullable).wl = function (index) {\n return this.am_1.wl(index);\n };\n protoOf(SerialDescriptorForNullable).xl = function (name) {\n return this.am_1.xl(name);\n };\n protoOf(SerialDescriptorForNullable).yl = function (index) {\n return this.am_1.yl(index);\n };\n protoOf(SerialDescriptorForNullable).zl = function (index) {\n return this.am_1.zl(index);\n };\n protoOf(SerialDescriptorForNullable).ql = function () {\n return this.bm_1;\n };\n protoOf(SerialDescriptorForNullable).wm = function () {\n return this.cm_1;\n };\n protoOf(SerialDescriptorForNullable).ml = function () {\n return true;\n };\n protoOf(SerialDescriptorForNullable).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof SerialDescriptorForNullable))\n return false;\n if (!equals(this.am_1, other.am_1))\n return false;\n return true;\n };\n protoOf(SerialDescriptorForNullable).toString = function () {\n return '' + this.am_1 + '?';\n };\n protoOf(SerialDescriptorForNullable).hashCode = function () {\n return imul(hashCode(this.am_1), 31);\n };\n function ObjectSerializer$descriptor$delegate$lambda$lambda(this$0) {\n return function ($this$buildSerialDescriptor) {\n $this$buildSerialDescriptor.wk_1 = this$0.aw_1;\n return Unit_instance;\n };\n }\n function ObjectSerializer$descriptor$delegate$lambda($serialName, this$0) {\n return function () {\n var tmp = OBJECT_getInstance();\n return buildSerialDescriptor($serialName, tmp, [], ObjectSerializer$descriptor$delegate$lambda$lambda(this$0));\n };\n }\n function ObjectSerializer(serialName, objectInstance) {\n this.zv_1 = objectInstance;\n this.aw_1 = emptyList();\n var tmp = this;\n var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();\n tmp.bw_1 = lazy(tmp_0, ObjectSerializer$descriptor$delegate$lambda(serialName, this));\n }\n protoOf(ObjectSerializer).ok = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.bw_1;\n descriptor$factory_1();\n return this_0.u2();\n };\n protoOf(ObjectSerializer).el = function (encoder, value) {\n encoder.nn(this.ok()).on(this.ok());\n };\n protoOf(ObjectSerializer).pk = function (encoder, value) {\n return this.el(encoder, !(value == null) ? value : THROW_CCE());\n };\n protoOf(ObjectSerializer).qk = function (decoder) {\n // Inline function 'kotlinx.serialization.encoding.decodeStructure' call\n var descriptor = this.ok();\n var composite = decoder.nn(descriptor);\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlinx.serialization.internal.ObjectSerializer.deserialize.' call\n if (composite.do()) {\n tmp$ret$0 = Unit_instance;\n break $l$block_0;\n }\n var index = composite.eo(this.ok());\n if (index === -1) {\n tmp$ret$0 = Unit_instance;\n break $l$block_0;\n } else {\n throw SerializationException_init_$Create$_0('Unexpected index ' + index);\n }\n }\n var result = tmp$ret$0;\n composite.on(descriptor);\n return this.zv_1;\n };\n function descriptor$factory_1() {\n return getPropertyCallableRef('descriptor', 1, KProperty1, function (receiver) {\n return receiver.ok();\n }, null);\n }\n function get_EMPTY_DESCRIPTOR_ARRAY() {\n _init_properties_Platform_common_kt__3qzecs();\n return EMPTY_DESCRIPTOR_ARRAY;\n }\n var EMPTY_DESCRIPTOR_ARRAY;\n function cachedSerialNames(_this__u8e3s4) {\n _init_properties_Platform_common_kt__3qzecs();\n if (isInterface(_this__u8e3s4, CachedNames))\n return _this__u8e3s4.wm();\n var result = HashSet_init_$Create$_1(_this__u8e3s4.sl());\n var inductionVariable = 0;\n var last = _this__u8e3s4.sl();\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.plusAssign' call\n var element = _this__u8e3s4.yl(i);\n result.q(element);\n }\n while (inductionVariable < last);\n return result;\n }\n function kclass(_this__u8e3s4) {\n _init_properties_Platform_common_kt__3qzecs();\n var t = _this__u8e3s4.h7();\n var tmp;\n if (!(t == null) ? isInterface(t, KClass) : false) {\n tmp = t;\n } else {\n if (!(t == null) ? isInterface(t, KTypeParameter) : false) {\n throw IllegalArgumentException_init_$Create$('Captured type parameter ' + t + ' from generic non-reified function. ' + ('Such functionality cannot be supported because ' + t + ' is erased, either specify serializer explicitly or make ') + ('calling function inline with reified ' + t + '.'));\n } else {\n throw IllegalArgumentException_init_$Create$('Only KClass supported as classifier, got ' + t);\n }\n }\n var tmp_0 = tmp;\n return isInterface(tmp_0, KClass) ? tmp_0 : THROW_CCE();\n }\n function typeOrThrow(_this__u8e3s4) {\n _init_properties_Platform_common_kt__3qzecs();\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.requireNotNull' call\n var value = _this__u8e3s4.dw_1;\n // Inline function 'kotlin.contracts.contract' call\n if (value == null) {\n // Inline function 'kotlinx.serialization.internal.typeOrThrow.' call\n var message = 'Star projections in type arguments are not allowed, but had ' + _this__u8e3s4.dw_1;\n throw IllegalArgumentException_init_$Create$(toString(message));\n } else {\n tmp$ret$1 = value;\n break $l$block;\n }\n }\n return tmp$ret$1;\n }\n function notRegisteredMessage(_this__u8e3s4) {\n _init_properties_Platform_common_kt__3qzecs();\n var tmp0_elvis_lhs = _this__u8e3s4.v6();\n return notRegisteredMessage_0(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);\n }\n function notRegisteredMessage_0(className) {\n _init_properties_Platform_common_kt__3qzecs();\n return \"Serializer for class '\" + className + \"' is not found.\\n\" + \"Please ensure that class is marked as '@Serializable' and that the serialization compiler plugin is applied.\\n\";\n }\n function compactArray(_this__u8e3s4) {\n _init_properties_Platform_common_kt__3qzecs();\n // Inline function 'kotlin.takeUnless' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n // Inline function 'kotlinx.serialization.internal.compactArray.' call\n // Inline function 'kotlin.collections.isNullOrEmpty' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(_this__u8e3s4 == null ? true : _this__u8e3s4.b1())) {\n tmp = _this__u8e3s4;\n } else {\n tmp = null;\n }\n var tmp0_safe_receiver = tmp;\n var tmp_0;\n if (tmp0_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_0 = copyToArray(tmp0_safe_receiver);\n }\n var tmp1_elvis_lhs = tmp_0;\n return tmp1_elvis_lhs == null ? get_EMPTY_DESCRIPTOR_ARRAY() : tmp1_elvis_lhs;\n }\n var properties_initialized_Platform_common_kt_i7q4ty;\n function _init_properties_Platform_common_kt__3qzecs() {\n if (!properties_initialized_Platform_common_kt_i7q4ty) {\n properties_initialized_Platform_common_kt_i7q4ty = true;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n EMPTY_DESCRIPTOR_ARRAY = [];\n }\n }\n function throwMissingFieldException(seen, goldenMask, descriptor) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var missingFields = ArrayList_init_$Create$_0();\n var missingFieldsBits = goldenMask & ~seen;\n var inductionVariable = 0;\n if (inductionVariable < 32)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (!((missingFieldsBits & 1) === 0)) {\n // Inline function 'kotlin.collections.plusAssign' call\n var element = descriptor.yl(i);\n missingFields.q(element);\n }\n missingFieldsBits = missingFieldsBits >>> 1 | 0;\n }\n while (inductionVariable < 32);\n throw MissingFieldException_init_$Create$(missingFields, descriptor.ql());\n }\n function throwArrayMissingFieldException(seenArray, goldenMaskArray, descriptor) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var missingFields = ArrayList_init_$Create$_0();\n var inductionVariable = 0;\n var last = goldenMaskArray.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var maskSlot = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var missingFieldsBits = goldenMaskArray[maskSlot] & ~seenArray[maskSlot];\n if (!(missingFieldsBits === 0)) {\n var inductionVariable_0 = 0;\n if (inductionVariable_0 < 32)\n do {\n var i = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n if (!((missingFieldsBits & 1) === 0)) {\n // Inline function 'kotlin.collections.plusAssign' call\n var element = descriptor.yl(imul(maskSlot, 32) + i | 0);\n missingFields.q(element);\n }\n missingFieldsBits = missingFieldsBits >>> 1 | 0;\n }\n while (inductionVariable_0 < 32);\n }\n }\n while (inductionVariable <= last);\n throw MissingFieldException_init_$Create$(missingFields, descriptor.ql());\n }\n function _get_childSerializers__7vnyfa($this) {\n // Inline function 'kotlin.getValue' call\n var this_0 = $this.du_1;\n childSerializers$factory();\n return this_0.u2();\n }\n function _get__hashCode__tgwhef_0($this) {\n // Inline function 'kotlin.getValue' call\n var this_0 = $this.fu_1;\n _hashCode$factory_0();\n return this_0.u2();\n }\n function buildIndices($this) {\n var indices = HashMap_init_$Create$();\n var inductionVariable = 0;\n var last = $this.yt_1.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.set' call\n var key = $this.yt_1[i];\n indices.r2(key, i);\n }\n while (inductionVariable <= last);\n return indices;\n }\n function PluginGeneratedSerialDescriptor$childSerializers$delegate$lambda(this$0) {\n return function () {\n var tmp0_safe_receiver = this$0.vt_1;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rv();\n return tmp1_elvis_lhs == null ? get_EMPTY_SERIALIZER_ARRAY() : tmp1_elvis_lhs;\n };\n }\n function PluginGeneratedSerialDescriptor$typeParameterDescriptors$delegate$lambda(this$0) {\n return function () {\n var tmp0_safe_receiver = this$0.vt_1;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sv();\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(tmp1_safe_receiver.length);\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var item = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlinx.serialization.internal.PluginGeneratedSerialDescriptor.typeParameterDescriptors$delegate..' call\n var tmp$ret$0 = item.ok();\n destination.q(tmp$ret$0);\n }\n tmp = destination;\n }\n return compactArray(tmp);\n };\n }\n function PluginGeneratedSerialDescriptor$_hashCode$delegate$lambda(this$0) {\n return function () {\n return hashCodeImpl(this$0, this$0.bv());\n };\n }\n function PluginGeneratedSerialDescriptor$toString$lambda(this$0) {\n return function (i) {\n return this$0.yl(i) + ': ' + this$0.wl(i).ql();\n };\n }\n function PluginGeneratedSerialDescriptor(serialName, generatedSerializer, elementsCount) {\n generatedSerializer = generatedSerializer === VOID ? null : generatedSerializer;\n this.ut_1 = serialName;\n this.vt_1 = generatedSerializer;\n this.wt_1 = elementsCount;\n this.xt_1 = -1;\n var tmp = this;\n var tmp_0 = 0;\n var tmp_1 = this.wt_1;\n // Inline function 'kotlin.arrayOfNulls' call\n var tmp_2 = fillArrayVal(Array(tmp_1), null);\n while (tmp_0 < tmp_1) {\n tmp_2[tmp_0] = '[UNINITIALIZED]';\n tmp_0 = tmp_0 + 1 | 0;\n }\n tmp.yt_1 = tmp_2;\n var tmp_3 = this;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this.wt_1;\n tmp_3.zt_1 = fillArrayVal(Array(size), null);\n this.au_1 = null;\n this.bu_1 = booleanArray(this.wt_1);\n this.cu_1 = emptyMap();\n var tmp_4 = this;\n var tmp_5 = LazyThreadSafetyMode_PUBLICATION_getInstance();\n tmp_4.du_1 = lazy(tmp_5, PluginGeneratedSerialDescriptor$childSerializers$delegate$lambda(this));\n var tmp_6 = this;\n var tmp_7 = LazyThreadSafetyMode_PUBLICATION_getInstance();\n tmp_6.eu_1 = lazy(tmp_7, PluginGeneratedSerialDescriptor$typeParameterDescriptors$delegate$lambda(this));\n var tmp_8 = this;\n var tmp_9 = LazyThreadSafetyMode_PUBLICATION_getInstance();\n tmp_8.fu_1 = lazy(tmp_9, PluginGeneratedSerialDescriptor$_hashCode$delegate$lambda(this));\n }\n protoOf(PluginGeneratedSerialDescriptor).ql = function () {\n return this.ut_1;\n };\n protoOf(PluginGeneratedSerialDescriptor).sl = function () {\n return this.wt_1;\n };\n protoOf(PluginGeneratedSerialDescriptor).ul = function () {\n return CLASS_getInstance();\n };\n protoOf(PluginGeneratedSerialDescriptor).rl = function () {\n var tmp0_elvis_lhs = this.au_1;\n return tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;\n };\n protoOf(PluginGeneratedSerialDescriptor).wm = function () {\n return this.cu_1.o2();\n };\n protoOf(PluginGeneratedSerialDescriptor).bv = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.eu_1;\n typeParameterDescriptors$factory();\n return this_0.u2();\n };\n protoOf(PluginGeneratedSerialDescriptor).cv = function (name, isOptional) {\n this.xt_1 = this.xt_1 + 1 | 0;\n this.yt_1[this.xt_1] = name;\n this.bu_1[this.xt_1] = isOptional;\n this.zt_1[this.xt_1] = null;\n if (this.xt_1 === (this.wt_1 - 1 | 0)) {\n this.cu_1 = buildIndices(this);\n }\n };\n protoOf(PluginGeneratedSerialDescriptor).hu = function (name, isOptional, $super) {\n isOptional = isOptional === VOID ? false : isOptional;\n var tmp;\n if ($super === VOID) {\n this.cv(name, isOptional);\n tmp = Unit_instance;\n } else {\n tmp = $super.cv.call(this, name, isOptional);\n }\n return tmp;\n };\n protoOf(PluginGeneratedSerialDescriptor).iu = function (annotation) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.internal.PluginGeneratedSerialDescriptor.pushAnnotation.' call\n var it = this.zt_1[this.xt_1];\n var tmp;\n if (it == null) {\n var result = ArrayList_init_$Create$(1);\n this.zt_1[this.xt_1] = result;\n tmp = result;\n } else {\n tmp = it;\n }\n var list = tmp;\n list.q(annotation);\n };\n protoOf(PluginGeneratedSerialDescriptor).gu = function (a) {\n if (this.au_1 == null) {\n this.au_1 = ArrayList_init_$Create$(1);\n }\n ensureNotNull(this.au_1).q(a);\n };\n protoOf(PluginGeneratedSerialDescriptor).wl = function (index) {\n return getChecked(_get_childSerializers__7vnyfa(this), index).ok();\n };\n protoOf(PluginGeneratedSerialDescriptor).zl = function (index) {\n return getChecked_0(this.bu_1, index);\n };\n protoOf(PluginGeneratedSerialDescriptor).vl = function (index) {\n var tmp0_elvis_lhs = getChecked(this.zt_1, index);\n return tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;\n };\n protoOf(PluginGeneratedSerialDescriptor).yl = function (index) {\n return getChecked(this.yt_1, index);\n };\n protoOf(PluginGeneratedSerialDescriptor).xl = function (name) {\n var tmp0_elvis_lhs = this.cu_1.b3(name);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n tmp = -3;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(PluginGeneratedSerialDescriptor).equals = function (other) {\n var tmp$ret$0;\n $l$block_5: {\n // Inline function 'kotlinx.serialization.internal.equalsImpl' call\n if (this === other) {\n tmp$ret$0 = true;\n break $l$block_5;\n }\n if (!(other instanceof PluginGeneratedSerialDescriptor)) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n if (!(this.ql() === other.ql())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n // Inline function 'kotlinx.serialization.internal.PluginGeneratedSerialDescriptor.equals.' call\n if (!contentEquals(this.bv(), other.bv())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n if (!(this.sl() === other.sl())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n var inductionVariable = 0;\n var last = this.sl();\n if (inductionVariable < last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (!(this.wl(index).ql() === other.wl(index).ql())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n if (!equals(this.wl(index).ul(), other.wl(index).ul())) {\n tmp$ret$0 = false;\n break $l$block_5;\n }\n }\n while (inductionVariable < last);\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n };\n protoOf(PluginGeneratedSerialDescriptor).hashCode = function () {\n return _get__hashCode__tgwhef_0(this);\n };\n protoOf(PluginGeneratedSerialDescriptor).toString = function () {\n var tmp = until(0, this.wt_1);\n var tmp_0 = this.ql() + '(';\n return joinToString(tmp, ', ', tmp_0, ')', VOID, VOID, PluginGeneratedSerialDescriptor$toString$lambda(this));\n };\n function hashCodeImpl(_this__u8e3s4, typeParams) {\n var result = getStringHashCode(_this__u8e3s4.ql());\n result = imul(31, result) + contentHashCode(typeParams) | 0;\n var elementDescriptors = get_elementDescriptors(_this__u8e3s4);\n // Inline function 'kotlinx.serialization.internal.elementsHashCodeBy' call\n // Inline function 'kotlin.collections.fold' call\n var accumulator = 1;\n var tmp0_iterator = elementDescriptors.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlinx.serialization.internal.elementsHashCodeBy.' call\n var hash = accumulator;\n var tmp = imul(31, hash);\n // Inline function 'kotlin.hashCode' call\n // Inline function 'kotlinx.serialization.internal.hashCodeImpl.' call\n var tmp0_safe_receiver = element.ql();\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n accumulator = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;\n }\n var namesHash = accumulator;\n // Inline function 'kotlinx.serialization.internal.elementsHashCodeBy' call\n // Inline function 'kotlin.collections.fold' call\n var accumulator_0 = 1;\n var tmp0_iterator_0 = elementDescriptors.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'kotlinx.serialization.internal.elementsHashCodeBy.' call\n var hash_0 = accumulator_0;\n var tmp_0 = imul(31, hash_0);\n // Inline function 'kotlin.hashCode' call\n // Inline function 'kotlinx.serialization.internal.hashCodeImpl.' call\n var tmp0_safe_receiver_0 = element_0.ul();\n var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);\n accumulator_0 = tmp_0 + (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0) | 0;\n }\n var kindHash = accumulator_0;\n result = imul(31, result) + namesHash | 0;\n result = imul(31, result) + kindHash | 0;\n return result;\n }\n function childSerializers$factory() {\n return getPropertyCallableRef('childSerializers', 1, KProperty1, function (receiver) {\n return _get_childSerializers__7vnyfa(receiver);\n }, null);\n }\n function typeParameterDescriptors$factory() {\n return getPropertyCallableRef('typeParameterDescriptors', 1, KProperty1, function (receiver) {\n return receiver.bv();\n }, null);\n }\n function _hashCode$factory_0() {\n return getPropertyCallableRef('_hashCode', 1, KProperty1, function (receiver) {\n return _get__hashCode__tgwhef_0(receiver);\n }, null);\n }\n function get_EMPTY_SERIALIZER_ARRAY() {\n _init_properties_PluginHelperInterfaces_kt__xgvzfp();\n return EMPTY_SERIALIZER_ARRAY;\n }\n var EMPTY_SERIALIZER_ARRAY;\n function SerializerFactory() {\n }\n function GeneratedSerializer() {\n }\n var properties_initialized_PluginHelperInterfaces_kt_ap8in1;\n function _init_properties_PluginHelperInterfaces_kt__xgvzfp() {\n if (!properties_initialized_PluginHelperInterfaces_kt_ap8in1) {\n properties_initialized_PluginHelperInterfaces_kt_ap8in1 = true;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n EMPTY_SERIALIZER_ARRAY = [];\n }\n }\n function CharArraySerializer_0() {\n CharArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_2(Companion_getInstance_1()));\n }\n protoOf(CharArraySerializer_0).hw = function (_this__u8e3s4) {\n return _this__u8e3s4.length;\n };\n protoOf(CharArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.hw((!(_this__u8e3s4 == null) ? isCharArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(CharArraySerializer_0).iw = function (_this__u8e3s4) {\n return new CharArrayBuilder(_this__u8e3s4);\n };\n protoOf(CharArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.iw((!(_this__u8e3s4 == null) ? isCharArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(CharArraySerializer_0).it = function () {\n return charArray(0);\n };\n protoOf(CharArraySerializer_0).jw = function (decoder, index, builder, checkIndex) {\n builder.mw(decoder.wn(this.at_1, index));\n };\n protoOf(CharArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.jw(decoder, index, builder instanceof CharArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(CharArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.jw(decoder, index, builder instanceof CharArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(CharArraySerializer_0).nw = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n encoder.bp(this.at_1, i, content[i]);\n }\n while (inductionVariable < size);\n };\n protoOf(CharArraySerializer_0).kt = function (encoder, content, size) {\n return this.nw(encoder, (!(content == null) ? isCharArray(content) : false) ? content : THROW_CCE(), size);\n };\n var CharArraySerializer_instance;\n function CharArraySerializer_getInstance() {\n if (CharArraySerializer_instance == null)\n new CharArraySerializer_0();\n return CharArraySerializer_instance;\n }\n function DoubleArraySerializer_0() {\n DoubleArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_3(DoubleCompanionObject_instance));\n }\n protoOf(DoubleArraySerializer_0).qw = function (_this__u8e3s4) {\n return _this__u8e3s4.length;\n };\n protoOf(DoubleArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.qw((!(_this__u8e3s4 == null) ? isDoubleArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(DoubleArraySerializer_0).rw = function (_this__u8e3s4) {\n return new DoubleArrayBuilder(_this__u8e3s4);\n };\n protoOf(DoubleArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.rw((!(_this__u8e3s4 == null) ? isDoubleArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(DoubleArraySerializer_0).it = function () {\n return new Float64Array(0);\n };\n protoOf(DoubleArraySerializer_0).sw = function (decoder, index, builder, checkIndex) {\n builder.vw(decoder.vn(this.at_1, index));\n };\n protoOf(DoubleArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.sw(decoder, index, builder instanceof DoubleArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(DoubleArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.sw(decoder, index, builder instanceof DoubleArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(DoubleArraySerializer_0).ww = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n encoder.ap(this.at_1, i, content[i]);\n }\n while (inductionVariable < size);\n };\n protoOf(DoubleArraySerializer_0).kt = function (encoder, content, size) {\n return this.ww(encoder, (!(content == null) ? isDoubleArray(content) : false) ? content : THROW_CCE(), size);\n };\n var DoubleArraySerializer_instance;\n function DoubleArraySerializer_getInstance() {\n if (DoubleArraySerializer_instance == null)\n new DoubleArraySerializer_0();\n return DoubleArraySerializer_instance;\n }\n function FloatArraySerializer_0() {\n FloatArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_4(FloatCompanionObject_instance));\n }\n protoOf(FloatArraySerializer_0).zw = function (_this__u8e3s4) {\n return _this__u8e3s4.length;\n };\n protoOf(FloatArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.zw((!(_this__u8e3s4 == null) ? isFloatArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(FloatArraySerializer_0).ax = function (_this__u8e3s4) {\n return new FloatArrayBuilder(_this__u8e3s4);\n };\n protoOf(FloatArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.ax((!(_this__u8e3s4 == null) ? isFloatArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(FloatArraySerializer_0).it = function () {\n return new Float32Array(0);\n };\n protoOf(FloatArraySerializer_0).bx = function (decoder, index, builder, checkIndex) {\n builder.ex(decoder.un(this.at_1, index));\n };\n protoOf(FloatArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.bx(decoder, index, builder instanceof FloatArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(FloatArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.bx(decoder, index, builder instanceof FloatArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(FloatArraySerializer_0).fx = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n encoder.zo(this.at_1, i, content[i]);\n }\n while (inductionVariable < size);\n };\n protoOf(FloatArraySerializer_0).kt = function (encoder, content, size) {\n return this.fx(encoder, (!(content == null) ? isFloatArray(content) : false) ? content : THROW_CCE(), size);\n };\n var FloatArraySerializer_instance;\n function FloatArraySerializer_getInstance() {\n if (FloatArraySerializer_instance == null)\n new FloatArraySerializer_0();\n return FloatArraySerializer_instance;\n }\n function LongArraySerializer_0() {\n LongArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_5(Companion_getInstance_0()));\n }\n protoOf(LongArraySerializer_0).ix = function (_this__u8e3s4) {\n return _this__u8e3s4.length;\n };\n protoOf(LongArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.ix((!(_this__u8e3s4 == null) ? isLongArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(LongArraySerializer_0).jx = function (_this__u8e3s4) {\n return new LongArrayBuilder(_this__u8e3s4);\n };\n protoOf(LongArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.jx((!(_this__u8e3s4 == null) ? isLongArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(LongArraySerializer_0).it = function () {\n return longArray(0);\n };\n protoOf(LongArraySerializer_0).kx = function (decoder, index, builder, checkIndex) {\n builder.nx(decoder.tn(this.at_1, index));\n };\n protoOf(LongArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.kx(decoder, index, builder instanceof LongArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(LongArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.kx(decoder, index, builder instanceof LongArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(LongArraySerializer_0).ox = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n encoder.yo(this.at_1, i, content[i]);\n }\n while (inductionVariable < size);\n };\n protoOf(LongArraySerializer_0).kt = function (encoder, content, size) {\n return this.ox(encoder, (!(content == null) ? isLongArray(content) : false) ? content : THROW_CCE(), size);\n };\n var LongArraySerializer_instance;\n function LongArraySerializer_getInstance() {\n if (LongArraySerializer_instance == null)\n new LongArraySerializer_0();\n return LongArraySerializer_instance;\n }\n function ULongArraySerializer_0() {\n ULongArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_6(Companion_getInstance_2()));\n }\n protoOf(ULongArraySerializer_0).rx = function (_this__u8e3s4) {\n return _ULongArray___get_size__impl__ju6dtr(_this__u8e3s4);\n };\n protoOf(ULongArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.rx(_this__u8e3s4 instanceof ULongArray ? _this__u8e3s4.de_1 : THROW_CCE());\n };\n protoOf(ULongArraySerializer_0).sx = function (_this__u8e3s4) {\n return new ULongArrayBuilder(_this__u8e3s4);\n };\n protoOf(ULongArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.sx(_this__u8e3s4 instanceof ULongArray ? _this__u8e3s4.de_1 : THROW_CCE());\n };\n protoOf(ULongArraySerializer_0).tx = function () {\n return _ULongArray___init__impl__twm1l3(0);\n };\n protoOf(ULongArraySerializer_0).it = function () {\n return new ULongArray(this.tx());\n };\n protoOf(ULongArraySerializer_0).ux = function (decoder, index, builder, checkIndex) {\n // Inline function 'kotlin.toULong' call\n var this_0 = decoder.yn(this.at_1, index).en();\n var tmp$ret$0 = _ULong___init__impl__c78o9k(this_0);\n builder.xx(tmp$ret$0);\n };\n protoOf(ULongArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.ux(decoder, index, builder instanceof ULongArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(ULongArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.ux(decoder, index, builder instanceof ULongArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(ULongArraySerializer_0).yx = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var tmp = encoder.dp(this.at_1, i);\n // Inline function 'kotlin.ULong.toLong' call\n var this_0 = ULongArray__get_impl_pr71q9(content, i);\n var tmp$ret$0 = _ULong___get_data__impl__fggpzb(this_0);\n tmp.no(tmp$ret$0);\n }\n while (inductionVariable < size);\n };\n protoOf(ULongArraySerializer_0).kt = function (encoder, content, size) {\n return this.yx(encoder, content instanceof ULongArray ? content.de_1 : THROW_CCE(), size);\n };\n var ULongArraySerializer_instance;\n function ULongArraySerializer_getInstance() {\n if (ULongArraySerializer_instance == null)\n new ULongArraySerializer_0();\n return ULongArraySerializer_instance;\n }\n function IntArraySerializer_0() {\n IntArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_7(IntCompanionObject_instance));\n }\n protoOf(IntArraySerializer_0).by = function (_this__u8e3s4) {\n return _this__u8e3s4.length;\n };\n protoOf(IntArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.by((!(_this__u8e3s4 == null) ? isIntArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(IntArraySerializer_0).cy = function (_this__u8e3s4) {\n return new IntArrayBuilder(_this__u8e3s4);\n };\n protoOf(IntArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.cy((!(_this__u8e3s4 == null) ? isIntArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(IntArraySerializer_0).it = function () {\n return new Int32Array(0);\n };\n protoOf(IntArraySerializer_0).dy = function (decoder, index, builder, checkIndex) {\n builder.gy(decoder.sn(this.at_1, index));\n };\n protoOf(IntArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.dy(decoder, index, builder instanceof IntArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(IntArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.dy(decoder, index, builder instanceof IntArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(IntArraySerializer_0).hy = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n encoder.xo(this.at_1, i, content[i]);\n }\n while (inductionVariable < size);\n };\n protoOf(IntArraySerializer_0).kt = function (encoder, content, size) {\n return this.hy(encoder, (!(content == null) ? isIntArray(content) : false) ? content : THROW_CCE(), size);\n };\n var IntArraySerializer_instance;\n function IntArraySerializer_getInstance() {\n if (IntArraySerializer_instance == null)\n new IntArraySerializer_0();\n return IntArraySerializer_instance;\n }\n function UIntArraySerializer_0() {\n UIntArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_8(Companion_getInstance_3()));\n }\n protoOf(UIntArraySerializer_0).ky = function (_this__u8e3s4) {\n return _UIntArray___get_size__impl__r6l8ci(_this__u8e3s4);\n };\n protoOf(UIntArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.ky(_this__u8e3s4 instanceof UIntArray ? _this__u8e3s4.ee_1 : THROW_CCE());\n };\n protoOf(UIntArraySerializer_0).ly = function (_this__u8e3s4) {\n return new UIntArrayBuilder(_this__u8e3s4);\n };\n protoOf(UIntArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.ly(_this__u8e3s4 instanceof UIntArray ? _this__u8e3s4.ee_1 : THROW_CCE());\n };\n protoOf(UIntArraySerializer_0).my = function () {\n return _UIntArray___init__impl__ghjpc6(0);\n };\n protoOf(UIntArraySerializer_0).it = function () {\n return new UIntArray(this.my());\n };\n protoOf(UIntArraySerializer_0).ny = function (decoder, index, builder, checkIndex) {\n // Inline function 'kotlin.toUInt' call\n var this_0 = decoder.yn(this.at_1, index).dn();\n var tmp$ret$0 = _UInt___init__impl__l7qpdl(this_0);\n builder.qy(tmp$ret$0);\n };\n protoOf(UIntArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.ny(decoder, index, builder instanceof UIntArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(UIntArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.ny(decoder, index, builder instanceof UIntArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(UIntArraySerializer_0).ry = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var tmp = encoder.dp(this.at_1, i);\n // Inline function 'kotlin.UInt.toInt' call\n var this_0 = UIntArray__get_impl_gp5kza(content, i);\n var tmp$ret$0 = _UInt___get_data__impl__f0vqqw(this_0);\n tmp.mo(tmp$ret$0);\n }\n while (inductionVariable < size);\n };\n protoOf(UIntArraySerializer_0).kt = function (encoder, content, size) {\n return this.ry(encoder, content instanceof UIntArray ? content.ee_1 : THROW_CCE(), size);\n };\n var UIntArraySerializer_instance;\n function UIntArraySerializer_getInstance() {\n if (UIntArraySerializer_instance == null)\n new UIntArraySerializer_0();\n return UIntArraySerializer_instance;\n }\n function ShortArraySerializer_0() {\n ShortArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_9(ShortCompanionObject_instance));\n }\n protoOf(ShortArraySerializer_0).uy = function (_this__u8e3s4) {\n return _this__u8e3s4.length;\n };\n protoOf(ShortArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.uy((!(_this__u8e3s4 == null) ? isShortArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ShortArraySerializer_0).vy = function (_this__u8e3s4) {\n return new ShortArrayBuilder(_this__u8e3s4);\n };\n protoOf(ShortArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.vy((!(_this__u8e3s4 == null) ? isShortArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ShortArraySerializer_0).it = function () {\n return new Int16Array(0);\n };\n protoOf(ShortArraySerializer_0).wy = function (decoder, index, builder, checkIndex) {\n builder.zy(decoder.rn(this.at_1, index));\n };\n protoOf(ShortArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.wy(decoder, index, builder instanceof ShortArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(ShortArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.wy(decoder, index, builder instanceof ShortArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(ShortArraySerializer_0).az = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n encoder.wo(this.at_1, i, content[i]);\n }\n while (inductionVariable < size);\n };\n protoOf(ShortArraySerializer_0).kt = function (encoder, content, size) {\n return this.az(encoder, (!(content == null) ? isShortArray(content) : false) ? content : THROW_CCE(), size);\n };\n var ShortArraySerializer_instance;\n function ShortArraySerializer_getInstance() {\n if (ShortArraySerializer_instance == null)\n new ShortArraySerializer_0();\n return ShortArraySerializer_instance;\n }\n function UShortArraySerializer_0() {\n UShortArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_10(Companion_getInstance_4()));\n }\n protoOf(UShortArraySerializer_0).dz = function (_this__u8e3s4) {\n return _UShortArray___get_size__impl__jqto1b(_this__u8e3s4);\n };\n protoOf(UShortArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.dz(_this__u8e3s4 instanceof UShortArray ? _this__u8e3s4.fe_1 : THROW_CCE());\n };\n protoOf(UShortArraySerializer_0).ez = function (_this__u8e3s4) {\n return new UShortArrayBuilder(_this__u8e3s4);\n };\n protoOf(UShortArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.ez(_this__u8e3s4 instanceof UShortArray ? _this__u8e3s4.fe_1 : THROW_CCE());\n };\n protoOf(UShortArraySerializer_0).fz = function () {\n return _UShortArray___init__impl__9b26ef(0);\n };\n protoOf(UShortArraySerializer_0).it = function () {\n return new UShortArray(this.fz());\n };\n protoOf(UShortArraySerializer_0).gz = function (decoder, index, builder, checkIndex) {\n // Inline function 'kotlin.toUShort' call\n var this_0 = decoder.yn(this.at_1, index).cn();\n var tmp$ret$0 = _UShort___init__impl__jigrne(this_0);\n builder.jz(tmp$ret$0);\n };\n protoOf(UShortArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.gz(decoder, index, builder instanceof UShortArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(UShortArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.gz(decoder, index, builder instanceof UShortArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(UShortArraySerializer_0).kz = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var tmp = encoder.dp(this.at_1, i);\n // Inline function 'kotlin.UShort.toShort' call\n var this_0 = UShortArray__get_impl_fnbhmx(content, i);\n var tmp$ret$0 = _UShort___get_data__impl__g0245(this_0);\n tmp.lo(tmp$ret$0);\n }\n while (inductionVariable < size);\n };\n protoOf(UShortArraySerializer_0).kt = function (encoder, content, size) {\n return this.kz(encoder, content instanceof UShortArray ? content.fe_1 : THROW_CCE(), size);\n };\n var UShortArraySerializer_instance;\n function UShortArraySerializer_getInstance() {\n if (UShortArraySerializer_instance == null)\n new UShortArraySerializer_0();\n return UShortArraySerializer_instance;\n }\n function ByteArraySerializer_0() {\n ByteArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_11(ByteCompanionObject_instance));\n }\n protoOf(ByteArraySerializer_0).nz = function (_this__u8e3s4) {\n return _this__u8e3s4.length;\n };\n protoOf(ByteArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.nz((!(_this__u8e3s4 == null) ? isByteArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ByteArraySerializer_0).oz = function (_this__u8e3s4) {\n return new ByteArrayBuilder(_this__u8e3s4);\n };\n protoOf(ByteArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.oz((!(_this__u8e3s4 == null) ? isByteArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(ByteArraySerializer_0).it = function () {\n return new Int8Array(0);\n };\n protoOf(ByteArraySerializer_0).pz = function (decoder, index, builder, checkIndex) {\n builder.sz(decoder.qn(this.at_1, index));\n };\n protoOf(ByteArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.pz(decoder, index, builder instanceof ByteArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(ByteArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.pz(decoder, index, builder instanceof ByteArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(ByteArraySerializer_0).tz = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n encoder.vo(this.at_1, i, content[i]);\n }\n while (inductionVariable < size);\n };\n protoOf(ByteArraySerializer_0).kt = function (encoder, content, size) {\n return this.tz(encoder, (!(content == null) ? isByteArray(content) : false) ? content : THROW_CCE(), size);\n };\n var ByteArraySerializer_instance;\n function ByteArraySerializer_getInstance() {\n if (ByteArraySerializer_instance == null)\n new ByteArraySerializer_0();\n return ByteArraySerializer_instance;\n }\n function UByteArraySerializer_0() {\n UByteArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_12(Companion_getInstance_5()));\n }\n protoOf(UByteArraySerializer_0).wz = function (_this__u8e3s4) {\n return _UByteArray___get_size__impl__h6pkdv(_this__u8e3s4);\n };\n protoOf(UByteArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.wz(_this__u8e3s4 instanceof UByteArray ? _this__u8e3s4.ge_1 : THROW_CCE());\n };\n protoOf(UByteArraySerializer_0).xz = function (_this__u8e3s4) {\n return new UByteArrayBuilder(_this__u8e3s4);\n };\n protoOf(UByteArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.xz(_this__u8e3s4 instanceof UByteArray ? _this__u8e3s4.ge_1 : THROW_CCE());\n };\n protoOf(UByteArraySerializer_0).yz = function () {\n return _UByteArray___init__impl__ip4y9n(0);\n };\n protoOf(UByteArraySerializer_0).it = function () {\n return new UByteArray(this.yz());\n };\n protoOf(UByteArraySerializer_0).zz = function (decoder, index, builder, checkIndex) {\n // Inline function 'kotlin.toUByte' call\n var this_0 = decoder.yn(this.at_1, index).bn();\n var tmp$ret$0 = _UByte___init__impl__g9hnc4(this_0);\n builder.c10(tmp$ret$0);\n };\n protoOf(UByteArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.zz(decoder, index, builder instanceof UByteArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(UByteArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.zz(decoder, index, builder instanceof UByteArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(UByteArraySerializer_0).d10 = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var tmp = encoder.dp(this.at_1, i);\n // Inline function 'kotlin.UByte.toByte' call\n var this_0 = UByteArray__get_impl_t5f3hv(content, i);\n var tmp$ret$0 = _UByte___get_data__impl__jof9qr(this_0);\n tmp.ko(tmp$ret$0);\n }\n while (inductionVariable < size);\n };\n protoOf(UByteArraySerializer_0).kt = function (encoder, content, size) {\n return this.d10(encoder, content instanceof UByteArray ? content.ge_1 : THROW_CCE(), size);\n };\n var UByteArraySerializer_instance;\n function UByteArraySerializer_getInstance() {\n if (UByteArraySerializer_instance == null)\n new UByteArraySerializer_0();\n return UByteArraySerializer_instance;\n }\n function BooleanArraySerializer_0() {\n BooleanArraySerializer_instance = this;\n PrimitiveArraySerializer.call(this, serializer_13(BooleanCompanionObject_instance));\n }\n protoOf(BooleanArraySerializer_0).g10 = function (_this__u8e3s4) {\n return _this__u8e3s4.length;\n };\n protoOf(BooleanArraySerializer_0).yr = function (_this__u8e3s4) {\n return this.g10((!(_this__u8e3s4 == null) ? isBooleanArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(BooleanArraySerializer_0).h10 = function (_this__u8e3s4) {\n return new BooleanArrayBuilder(_this__u8e3s4);\n };\n protoOf(BooleanArraySerializer_0).tq = function (_this__u8e3s4) {\n return this.h10((!(_this__u8e3s4 == null) ? isBooleanArray(_this__u8e3s4) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(BooleanArraySerializer_0).it = function () {\n return booleanArray(0);\n };\n protoOf(BooleanArraySerializer_0).i10 = function (decoder, index, builder, checkIndex) {\n builder.l10(decoder.pn(this.at_1, index));\n };\n protoOf(BooleanArraySerializer_0).er = function (decoder, index, builder, checkIndex) {\n return this.i10(decoder, index, builder instanceof BooleanArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(BooleanArraySerializer_0).jt = function (decoder, index, builder, checkIndex) {\n return this.i10(decoder, index, builder instanceof BooleanArrayBuilder ? builder : THROW_CCE(), checkIndex);\n };\n protoOf(BooleanArraySerializer_0).m10 = function (encoder, content, size) {\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n encoder.uo(this.at_1, i, content[i]);\n }\n while (inductionVariable < size);\n };\n protoOf(BooleanArraySerializer_0).kt = function (encoder, content, size) {\n return this.m10(encoder, (!(content == null) ? isBooleanArray(content) : false) ? content : THROW_CCE(), size);\n };\n var BooleanArraySerializer_instance;\n function BooleanArraySerializer_getInstance() {\n if (BooleanArraySerializer_instance == null)\n new BooleanArraySerializer_0();\n return BooleanArraySerializer_instance;\n }\n function CharArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.kw_1 = bufferWithData;\n this.lw_1 = bufferWithData.length;\n this.i3(10);\n }\n protoOf(CharArrayBuilder).ct = function () {\n return this.lw_1;\n };\n protoOf(CharArrayBuilder).i3 = function (requiredCapacity) {\n if (this.kw_1.length < requiredCapacity)\n this.kw_1 = copyOf(this.kw_1, coerceAtLeast(requiredCapacity, imul(this.kw_1.length, 2)));\n };\n protoOf(CharArrayBuilder).mw = function (c) {\n this.mt();\n var tmp = this.kw_1;\n var tmp1 = this.lw_1;\n this.lw_1 = tmp1 + 1 | 0;\n tmp[tmp1] = c;\n };\n protoOf(CharArrayBuilder).et = function () {\n return copyOf(this.kw_1, this.lw_1);\n };\n function DoubleArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.tw_1 = bufferWithData;\n this.uw_1 = bufferWithData.length;\n this.i3(10);\n }\n protoOf(DoubleArrayBuilder).ct = function () {\n return this.uw_1;\n };\n protoOf(DoubleArrayBuilder).i3 = function (requiredCapacity) {\n if (this.tw_1.length < requiredCapacity)\n this.tw_1 = copyOf_0(this.tw_1, coerceAtLeast(requiredCapacity, imul(this.tw_1.length, 2)));\n };\n protoOf(DoubleArrayBuilder).vw = function (c) {\n this.mt();\n var tmp = this.tw_1;\n var tmp1 = this.uw_1;\n this.uw_1 = tmp1 + 1 | 0;\n tmp[tmp1] = c;\n };\n protoOf(DoubleArrayBuilder).et = function () {\n return copyOf_0(this.tw_1, this.uw_1);\n };\n function FloatArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.cx_1 = bufferWithData;\n this.dx_1 = bufferWithData.length;\n this.i3(10);\n }\n protoOf(FloatArrayBuilder).ct = function () {\n return this.dx_1;\n };\n protoOf(FloatArrayBuilder).i3 = function (requiredCapacity) {\n if (this.cx_1.length < requiredCapacity)\n this.cx_1 = copyOf_1(this.cx_1, coerceAtLeast(requiredCapacity, imul(this.cx_1.length, 2)));\n };\n protoOf(FloatArrayBuilder).ex = function (c) {\n this.mt();\n var tmp = this.cx_1;\n var tmp1 = this.dx_1;\n this.dx_1 = tmp1 + 1 | 0;\n tmp[tmp1] = c;\n };\n protoOf(FloatArrayBuilder).et = function () {\n return copyOf_1(this.cx_1, this.dx_1);\n };\n function LongArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.lx_1 = bufferWithData;\n this.mx_1 = bufferWithData.length;\n this.i3(10);\n }\n protoOf(LongArrayBuilder).ct = function () {\n return this.mx_1;\n };\n protoOf(LongArrayBuilder).i3 = function (requiredCapacity) {\n if (this.lx_1.length < requiredCapacity)\n this.lx_1 = copyOf_2(this.lx_1, coerceAtLeast(requiredCapacity, imul(this.lx_1.length, 2)));\n };\n protoOf(LongArrayBuilder).nx = function (c) {\n this.mt();\n var tmp = this.lx_1;\n var tmp1 = this.mx_1;\n this.mx_1 = tmp1 + 1 | 0;\n tmp[tmp1] = c;\n };\n protoOf(LongArrayBuilder).et = function () {\n return copyOf_2(this.lx_1, this.mx_1);\n };\n function ULongArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.vx_1 = bufferWithData;\n this.wx_1 = _ULongArray___get_size__impl__ju6dtr(bufferWithData);\n this.i3(10);\n }\n protoOf(ULongArrayBuilder).ct = function () {\n return this.wx_1;\n };\n protoOf(ULongArrayBuilder).i3 = function (requiredCapacity) {\n if (_ULongArray___get_size__impl__ju6dtr(this.vx_1) < requiredCapacity) {\n var tmp = this;\n // Inline function 'kotlin.collections.copyOf' call\n var this_0 = this.vx_1;\n var newSize = coerceAtLeast(requiredCapacity, imul(_ULongArray___get_size__impl__ju6dtr(this.vx_1), 2));\n tmp.vx_1 = _ULongArray___init__impl__twm1l3_0(copyOf_2(_ULongArray___get_storage__impl__28e64j(this_0), newSize));\n }\n };\n protoOf(ULongArrayBuilder).xx = function (c) {\n this.mt();\n var tmp = this.vx_1;\n var tmp1 = this.wx_1;\n this.wx_1 = tmp1 + 1 | 0;\n ULongArray__set_impl_z19mvh(tmp, tmp1, c);\n };\n protoOf(ULongArrayBuilder).n10 = function () {\n // Inline function 'kotlin.collections.copyOf' call\n var this_0 = this.vx_1;\n var newSize = this.wx_1;\n return _ULongArray___init__impl__twm1l3_0(copyOf_2(_ULongArray___get_storage__impl__28e64j(this_0), newSize));\n };\n protoOf(ULongArrayBuilder).et = function () {\n return new ULongArray(this.n10());\n };\n function IntArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.ey_1 = bufferWithData;\n this.fy_1 = bufferWithData.length;\n this.i3(10);\n }\n protoOf(IntArrayBuilder).ct = function () {\n return this.fy_1;\n };\n protoOf(IntArrayBuilder).i3 = function (requiredCapacity) {\n if (this.ey_1.length < requiredCapacity)\n this.ey_1 = copyOf_3(this.ey_1, coerceAtLeast(requiredCapacity, imul(this.ey_1.length, 2)));\n };\n protoOf(IntArrayBuilder).gy = function (c) {\n this.mt();\n var tmp = this.ey_1;\n var tmp1 = this.fy_1;\n this.fy_1 = tmp1 + 1 | 0;\n tmp[tmp1] = c;\n };\n protoOf(IntArrayBuilder).et = function () {\n return copyOf_3(this.ey_1, this.fy_1);\n };\n function UIntArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.oy_1 = bufferWithData;\n this.py_1 = _UIntArray___get_size__impl__r6l8ci(bufferWithData);\n this.i3(10);\n }\n protoOf(UIntArrayBuilder).ct = function () {\n return this.py_1;\n };\n protoOf(UIntArrayBuilder).i3 = function (requiredCapacity) {\n if (_UIntArray___get_size__impl__r6l8ci(this.oy_1) < requiredCapacity) {\n var tmp = this;\n // Inline function 'kotlin.collections.copyOf' call\n var this_0 = this.oy_1;\n var newSize = coerceAtLeast(requiredCapacity, imul(_UIntArray___get_size__impl__r6l8ci(this.oy_1), 2));\n tmp.oy_1 = _UIntArray___init__impl__ghjpc6_0(copyOf_3(_UIntArray___get_storage__impl__92a0v0(this_0), newSize));\n }\n };\n protoOf(UIntArrayBuilder).qy = function (c) {\n this.mt();\n var tmp = this.oy_1;\n var tmp1 = this.py_1;\n this.py_1 = tmp1 + 1 | 0;\n UIntArray__set_impl_7f2zu2(tmp, tmp1, c);\n };\n protoOf(UIntArrayBuilder).o10 = function () {\n // Inline function 'kotlin.collections.copyOf' call\n var this_0 = this.oy_1;\n var newSize = this.py_1;\n return _UIntArray___init__impl__ghjpc6_0(copyOf_3(_UIntArray___get_storage__impl__92a0v0(this_0), newSize));\n };\n protoOf(UIntArrayBuilder).et = function () {\n return new UIntArray(this.o10());\n };\n function ShortArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.xy_1 = bufferWithData;\n this.yy_1 = bufferWithData.length;\n this.i3(10);\n }\n protoOf(ShortArrayBuilder).ct = function () {\n return this.yy_1;\n };\n protoOf(ShortArrayBuilder).i3 = function (requiredCapacity) {\n if (this.xy_1.length < requiredCapacity)\n this.xy_1 = copyOf_4(this.xy_1, coerceAtLeast(requiredCapacity, imul(this.xy_1.length, 2)));\n };\n protoOf(ShortArrayBuilder).zy = function (c) {\n this.mt();\n var tmp = this.xy_1;\n var tmp1 = this.yy_1;\n this.yy_1 = tmp1 + 1 | 0;\n tmp[tmp1] = c;\n };\n protoOf(ShortArrayBuilder).et = function () {\n return copyOf_4(this.xy_1, this.yy_1);\n };\n function UShortArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.hz_1 = bufferWithData;\n this.iz_1 = _UShortArray___get_size__impl__jqto1b(bufferWithData);\n this.i3(10);\n }\n protoOf(UShortArrayBuilder).ct = function () {\n return this.iz_1;\n };\n protoOf(UShortArrayBuilder).i3 = function (requiredCapacity) {\n if (_UShortArray___get_size__impl__jqto1b(this.hz_1) < requiredCapacity) {\n var tmp = this;\n // Inline function 'kotlin.collections.copyOf' call\n var this_0 = this.hz_1;\n var newSize = coerceAtLeast(requiredCapacity, imul(_UShortArray___get_size__impl__jqto1b(this.hz_1), 2));\n tmp.hz_1 = _UShortArray___init__impl__9b26ef_0(copyOf_4(_UShortArray___get_storage__impl__t2jpv5(this_0), newSize));\n }\n };\n protoOf(UShortArrayBuilder).jz = function (c) {\n this.mt();\n var tmp = this.hz_1;\n var tmp1 = this.iz_1;\n this.iz_1 = tmp1 + 1 | 0;\n UShortArray__set_impl_6d8whp(tmp, tmp1, c);\n };\n protoOf(UShortArrayBuilder).p10 = function () {\n // Inline function 'kotlin.collections.copyOf' call\n var this_0 = this.hz_1;\n var newSize = this.iz_1;\n return _UShortArray___init__impl__9b26ef_0(copyOf_4(_UShortArray___get_storage__impl__t2jpv5(this_0), newSize));\n };\n protoOf(UShortArrayBuilder).et = function () {\n return new UShortArray(this.p10());\n };\n function ByteArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.qz_1 = bufferWithData;\n this.rz_1 = bufferWithData.length;\n this.i3(10);\n }\n protoOf(ByteArrayBuilder).ct = function () {\n return this.rz_1;\n };\n protoOf(ByteArrayBuilder).i3 = function (requiredCapacity) {\n if (this.qz_1.length < requiredCapacity)\n this.qz_1 = copyOf_5(this.qz_1, coerceAtLeast(requiredCapacity, imul(this.qz_1.length, 2)));\n };\n protoOf(ByteArrayBuilder).sz = function (c) {\n this.mt();\n var tmp = this.qz_1;\n var tmp1 = this.rz_1;\n this.rz_1 = tmp1 + 1 | 0;\n tmp[tmp1] = c;\n };\n protoOf(ByteArrayBuilder).et = function () {\n return copyOf_5(this.qz_1, this.rz_1);\n };\n function UByteArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.a10_1 = bufferWithData;\n this.b10_1 = _UByteArray___get_size__impl__h6pkdv(bufferWithData);\n this.i3(10);\n }\n protoOf(UByteArrayBuilder).ct = function () {\n return this.b10_1;\n };\n protoOf(UByteArrayBuilder).i3 = function (requiredCapacity) {\n if (_UByteArray___get_size__impl__h6pkdv(this.a10_1) < requiredCapacity) {\n var tmp = this;\n // Inline function 'kotlin.collections.copyOf' call\n var this_0 = this.a10_1;\n var newSize = coerceAtLeast(requiredCapacity, imul(_UByteArray___get_size__impl__h6pkdv(this.a10_1), 2));\n tmp.a10_1 = _UByteArray___init__impl__ip4y9n_0(copyOf_5(_UByteArray___get_storage__impl__d4kctt(this_0), newSize));\n }\n };\n protoOf(UByteArrayBuilder).c10 = function (c) {\n this.mt();\n var tmp = this.a10_1;\n var tmp1 = this.b10_1;\n this.b10_1 = tmp1 + 1 | 0;\n UByteArray__set_impl_jvcicn(tmp, tmp1, c);\n };\n protoOf(UByteArrayBuilder).q10 = function () {\n // Inline function 'kotlin.collections.copyOf' call\n var this_0 = this.a10_1;\n var newSize = this.b10_1;\n return _UByteArray___init__impl__ip4y9n_0(copyOf_5(_UByteArray___get_storage__impl__d4kctt(this_0), newSize));\n };\n protoOf(UByteArrayBuilder).et = function () {\n return new UByteArray(this.q10());\n };\n function BooleanArrayBuilder(bufferWithData) {\n PrimitiveArrayBuilder.call(this);\n this.j10_1 = bufferWithData;\n this.k10_1 = bufferWithData.length;\n this.i3(10);\n }\n protoOf(BooleanArrayBuilder).ct = function () {\n return this.k10_1;\n };\n protoOf(BooleanArrayBuilder).i3 = function (requiredCapacity) {\n if (this.j10_1.length < requiredCapacity)\n this.j10_1 = copyOf_6(this.j10_1, coerceAtLeast(requiredCapacity, imul(this.j10_1.length, 2)));\n };\n protoOf(BooleanArrayBuilder).l10 = function (c) {\n this.mt();\n var tmp = this.j10_1;\n var tmp1 = this.k10_1;\n this.k10_1 = tmp1 + 1 | 0;\n tmp[tmp1] = c;\n };\n protoOf(BooleanArrayBuilder).et = function () {\n return copyOf_6(this.j10_1, this.k10_1);\n };\n function get_BUILTIN_SERIALIZERS() {\n _init_properties_Primitives_kt__k0eto4();\n return BUILTIN_SERIALIZERS;\n }\n var BUILTIN_SERIALIZERS;\n function builtinSerializerOrNull(_this__u8e3s4) {\n _init_properties_Primitives_kt__k0eto4();\n var tmp = get_BUILTIN_SERIALIZERS().b3(_this__u8e3s4);\n return (tmp == null ? true : isInterface(tmp, KSerializer)) ? tmp : THROW_CCE();\n }\n function StringSerializer() {\n StringSerializer_instance = this;\n this.r10_1 = new PrimitiveSerialDescriptor_0('kotlin.String', STRING_getInstance());\n }\n protoOf(StringSerializer).ok = function () {\n return this.r10_1;\n };\n protoOf(StringSerializer).s10 = function (encoder, value) {\n return encoder.ro(value);\n };\n protoOf(StringSerializer).pk = function (encoder, value) {\n return this.s10(encoder, (!(value == null) ? typeof value === 'string' : false) ? value : THROW_CCE());\n };\n protoOf(StringSerializer).qk = function (decoder) {\n return decoder.in();\n };\n var StringSerializer_instance;\n function StringSerializer_getInstance() {\n if (StringSerializer_instance == null)\n new StringSerializer();\n return StringSerializer_instance;\n }\n function CharSerializer() {\n CharSerializer_instance = this;\n this.t10_1 = new PrimitiveSerialDescriptor_0('kotlin.Char', CHAR_getInstance());\n }\n protoOf(CharSerializer).ok = function () {\n return this.t10_1;\n };\n protoOf(CharSerializer).u10 = function (encoder, value) {\n return encoder.qo(value);\n };\n protoOf(CharSerializer).pk = function (encoder, value) {\n return this.u10(encoder, value instanceof Char ? value.ab_1 : THROW_CCE());\n };\n protoOf(CharSerializer).v10 = function (decoder) {\n return decoder.hn();\n };\n protoOf(CharSerializer).qk = function (decoder) {\n return new Char(this.v10(decoder));\n };\n var CharSerializer_instance;\n function CharSerializer_getInstance() {\n if (CharSerializer_instance == null)\n new CharSerializer();\n return CharSerializer_instance;\n }\n function DoubleSerializer() {\n DoubleSerializer_instance = this;\n this.w10_1 = new PrimitiveSerialDescriptor_0('kotlin.Double', DOUBLE_getInstance());\n }\n protoOf(DoubleSerializer).ok = function () {\n return this.w10_1;\n };\n protoOf(DoubleSerializer).x10 = function (encoder, value) {\n return encoder.po(value);\n };\n protoOf(DoubleSerializer).pk = function (encoder, value) {\n return this.x10(encoder, (!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE());\n };\n protoOf(DoubleSerializer).qk = function (decoder) {\n return decoder.gn();\n };\n var DoubleSerializer_instance;\n function DoubleSerializer_getInstance() {\n if (DoubleSerializer_instance == null)\n new DoubleSerializer();\n return DoubleSerializer_instance;\n }\n function FloatSerializer() {\n FloatSerializer_instance = this;\n this.y10_1 = new PrimitiveSerialDescriptor_0('kotlin.Float', FLOAT_getInstance());\n }\n protoOf(FloatSerializer).ok = function () {\n return this.y10_1;\n };\n protoOf(FloatSerializer).z10 = function (encoder, value) {\n return encoder.oo(value);\n };\n protoOf(FloatSerializer).pk = function (encoder, value) {\n return this.z10(encoder, (!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE());\n };\n protoOf(FloatSerializer).qk = function (decoder) {\n return decoder.fn();\n };\n var FloatSerializer_instance;\n function FloatSerializer_getInstance() {\n if (FloatSerializer_instance == null)\n new FloatSerializer();\n return FloatSerializer_instance;\n }\n function LongSerializer() {\n LongSerializer_instance = this;\n this.a11_1 = new PrimitiveSerialDescriptor_0('kotlin.Long', LONG_getInstance());\n }\n protoOf(LongSerializer).ok = function () {\n return this.a11_1;\n };\n protoOf(LongSerializer).b11 = function (encoder, value) {\n return encoder.no(value);\n };\n protoOf(LongSerializer).pk = function (encoder, value) {\n return this.b11(encoder, value instanceof Long ? value : THROW_CCE());\n };\n protoOf(LongSerializer).qk = function (decoder) {\n return decoder.en();\n };\n var LongSerializer_instance;\n function LongSerializer_getInstance() {\n if (LongSerializer_instance == null)\n new LongSerializer();\n return LongSerializer_instance;\n }\n function IntSerializer() {\n IntSerializer_instance = this;\n this.c11_1 = new PrimitiveSerialDescriptor_0('kotlin.Int', INT_getInstance());\n }\n protoOf(IntSerializer).ok = function () {\n return this.c11_1;\n };\n protoOf(IntSerializer).d11 = function (encoder, value) {\n return encoder.mo(value);\n };\n protoOf(IntSerializer).pk = function (encoder, value) {\n return this.d11(encoder, (!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE());\n };\n protoOf(IntSerializer).qk = function (decoder) {\n return decoder.dn();\n };\n var IntSerializer_instance;\n function IntSerializer_getInstance() {\n if (IntSerializer_instance == null)\n new IntSerializer();\n return IntSerializer_instance;\n }\n function ShortSerializer() {\n ShortSerializer_instance = this;\n this.e11_1 = new PrimitiveSerialDescriptor_0('kotlin.Short', SHORT_getInstance());\n }\n protoOf(ShortSerializer).ok = function () {\n return this.e11_1;\n };\n protoOf(ShortSerializer).f11 = function (encoder, value) {\n return encoder.lo(value);\n };\n protoOf(ShortSerializer).pk = function (encoder, value) {\n return this.f11(encoder, (!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE());\n };\n protoOf(ShortSerializer).qk = function (decoder) {\n return decoder.cn();\n };\n var ShortSerializer_instance;\n function ShortSerializer_getInstance() {\n if (ShortSerializer_instance == null)\n new ShortSerializer();\n return ShortSerializer_instance;\n }\n function ByteSerializer() {\n ByteSerializer_instance = this;\n this.g11_1 = new PrimitiveSerialDescriptor_0('kotlin.Byte', BYTE_getInstance());\n }\n protoOf(ByteSerializer).ok = function () {\n return this.g11_1;\n };\n protoOf(ByteSerializer).h11 = function (encoder, value) {\n return encoder.ko(value);\n };\n protoOf(ByteSerializer).pk = function (encoder, value) {\n return this.h11(encoder, (!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE());\n };\n protoOf(ByteSerializer).qk = function (decoder) {\n return decoder.bn();\n };\n var ByteSerializer_instance;\n function ByteSerializer_getInstance() {\n if (ByteSerializer_instance == null)\n new ByteSerializer();\n return ByteSerializer_instance;\n }\n function BooleanSerializer() {\n BooleanSerializer_instance = this;\n this.i11_1 = new PrimitiveSerialDescriptor_0('kotlin.Boolean', BOOLEAN_getInstance());\n }\n protoOf(BooleanSerializer).ok = function () {\n return this.i11_1;\n };\n protoOf(BooleanSerializer).j11 = function (encoder, value) {\n return encoder.jo(value);\n };\n protoOf(BooleanSerializer).pk = function (encoder, value) {\n return this.j11(encoder, (!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE());\n };\n protoOf(BooleanSerializer).qk = function (decoder) {\n return decoder.an();\n };\n var BooleanSerializer_instance;\n function BooleanSerializer_getInstance() {\n if (BooleanSerializer_instance == null)\n new BooleanSerializer();\n return BooleanSerializer_instance;\n }\n function UnitSerializer() {\n UnitSerializer_instance = this;\n this.k11_1 = new ObjectSerializer('kotlin.Unit', Unit_instance);\n }\n protoOf(UnitSerializer).ok = function () {\n return this.k11_1.ok();\n };\n protoOf(UnitSerializer).l11 = function (decoder) {\n this.k11_1.qk(decoder);\n };\n protoOf(UnitSerializer).qk = function (decoder) {\n this.l11(decoder);\n return Unit_instance;\n };\n protoOf(UnitSerializer).m11 = function (encoder, value) {\n this.k11_1.el(encoder, Unit_instance);\n };\n protoOf(UnitSerializer).pk = function (encoder, value) {\n return this.m11(encoder, value instanceof Unit ? value : THROW_CCE());\n };\n var UnitSerializer_instance;\n function UnitSerializer_getInstance() {\n if (UnitSerializer_instance == null)\n new UnitSerializer();\n return UnitSerializer_instance;\n }\n function error_0($this) {\n throw IllegalStateException_init_$Create$('Primitive descriptor does not have elements');\n }\n function PrimitiveSerialDescriptor_0(serialName, kind) {\n this.n11_1 = serialName;\n this.o11_1 = kind;\n }\n protoOf(PrimitiveSerialDescriptor_0).ql = function () {\n return this.n11_1;\n };\n protoOf(PrimitiveSerialDescriptor_0).ul = function () {\n return this.o11_1;\n };\n protoOf(PrimitiveSerialDescriptor_0).sl = function () {\n return 0;\n };\n protoOf(PrimitiveSerialDescriptor_0).yl = function (index) {\n error_0(this);\n };\n protoOf(PrimitiveSerialDescriptor_0).xl = function (name) {\n error_0(this);\n };\n protoOf(PrimitiveSerialDescriptor_0).zl = function (index) {\n error_0(this);\n };\n protoOf(PrimitiveSerialDescriptor_0).wl = function (index) {\n error_0(this);\n };\n protoOf(PrimitiveSerialDescriptor_0).vl = function (index) {\n error_0(this);\n };\n protoOf(PrimitiveSerialDescriptor_0).toString = function () {\n return 'PrimitiveDescriptor(' + this.n11_1 + ')';\n };\n protoOf(PrimitiveSerialDescriptor_0).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PrimitiveSerialDescriptor_0))\n return false;\n if (this.n11_1 === other.n11_1 ? equals(this.o11_1, other.o11_1) : false)\n return true;\n return false;\n };\n protoOf(PrimitiveSerialDescriptor_0).hashCode = function () {\n return getStringHashCode(this.n11_1) + imul(31, this.o11_1.hashCode()) | 0;\n };\n function PrimitiveDescriptorSafe(serialName, kind) {\n _init_properties_Primitives_kt__k0eto4();\n checkName(serialName);\n return new PrimitiveSerialDescriptor_0(serialName, kind);\n }\n function checkName(serialName) {\n _init_properties_Primitives_kt__k0eto4();\n var keys = get_BUILTIN_SERIALIZERS().o2();\n var tmp0_iterator = keys.t();\n while (tmp0_iterator.u()) {\n var primitive = tmp0_iterator.w();\n var simpleName = capitalize(ensureNotNull(primitive.v6()));\n var qualifiedName = 'kotlin.' + simpleName;\n if (equals_0(serialName, qualifiedName, true) ? true : equals_0(serialName, simpleName, true)) {\n throw IllegalArgumentException_init_$Create$(trimIndent('\\n The name of serial descriptor should uniquely identify associated serializer.\\n For serial name ' + serialName + ' there already exist ' + capitalize(simpleName) + 'Serializer.\\n Please refer to SerialDescriptor documentation for additional information.\\n '));\n }\n }\n }\n function capitalize(_this__u8e3s4) {\n _init_properties_Primitives_kt__k0eto4();\n // Inline function 'kotlin.text.replaceFirstChar' call\n var tmp;\n // Inline function 'kotlin.text.isNotEmpty' call\n if (charSequenceLength(_this__u8e3s4) > 0) {\n // Inline function 'kotlinx.serialization.internal.capitalize.' call\n var it = charSequenceGet(_this__u8e3s4, 0);\n var tmp$ret$1 = isLowerCase(it) ? titlecase(it) : toString_0(it);\n var tmp_0 = toString(tmp$ret$1);\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = tmp_0 + _this__u8e3s4.substring(1);\n } else {\n tmp = _this__u8e3s4;\n }\n return tmp;\n }\n var properties_initialized_Primitives_kt_6dpii6;\n function _init_properties_Primitives_kt__k0eto4() {\n if (!properties_initialized_Primitives_kt_6dpii6) {\n properties_initialized_Primitives_kt_6dpii6 = true;\n BUILTIN_SERIALIZERS = mapOf([to(PrimitiveClasses_getInstance().u7(), serializer_1(StringCompanionObject_instance)), to(getKClass(Char), serializer_2(Companion_getInstance_1())), to(PrimitiveClasses_getInstance().x7(), CharArraySerializer()), to(PrimitiveClasses_getInstance().s7(), serializer_3(DoubleCompanionObject_instance)), to(PrimitiveClasses_getInstance().d8(), DoubleArraySerializer()), to(PrimitiveClasses_getInstance().r7(), serializer_4(FloatCompanionObject_instance)), to(PrimitiveClasses_getInstance().c8(), FloatArraySerializer()), to(getKClass(Long), serializer_5(Companion_getInstance_0())), to(PrimitiveClasses_getInstance().b8(), LongArraySerializer()), to(getKClass(ULong), serializer_6(Companion_getInstance_2())), to(getKClass(ULongArray), ULongArraySerializer()), to(PrimitiveClasses_getInstance().q7(), serializer_7(IntCompanionObject_instance)), to(PrimitiveClasses_getInstance().a8(), IntArraySerializer()), to(getKClass(UInt), serializer_8(Companion_getInstance_3())), to(getKClass(UIntArray), UIntArraySerializer()), to(PrimitiveClasses_getInstance().p7(), serializer_9(ShortCompanionObject_instance)), to(PrimitiveClasses_getInstance().z7(), ShortArraySerializer()), to(getKClass(UShort), serializer_10(Companion_getInstance_4())), to(getKClass(UShortArray), UShortArraySerializer()), to(PrimitiveClasses_getInstance().o7(), serializer_11(ByteCompanionObject_instance)), to(PrimitiveClasses_getInstance().y7(), ByteArraySerializer()), to(getKClass(UByte), serializer_12(Companion_getInstance_5())), to(getKClass(UByteArray), UByteArraySerializer()), to(PrimitiveClasses_getInstance().n7(), serializer_13(BooleanCompanionObject_instance)), to(PrimitiveClasses_getInstance().w7(), BooleanArraySerializer()), to(getKClass(Unit), serializer_14(Unit_instance)), to(PrimitiveClasses_getInstance().m7(), NothingSerializer()), to(getKClass(Duration), serializer_15(Companion_getInstance()))]);\n }\n }\n function NamedValueEncoder() {\n TaggedEncoder.call(this);\n }\n protoOf(NamedValueEncoder).q11 = function (_this__u8e3s4, index) {\n return this.s11(this.r11(_this__u8e3s4, index));\n };\n protoOf(NamedValueEncoder).s11 = function (nestedName) {\n var tmp0_elvis_lhs = this.u11();\n return this.v11(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, nestedName);\n };\n protoOf(NamedValueEncoder).r11 = function (descriptor, index) {\n return descriptor.yl(index);\n };\n protoOf(NamedValueEncoder).v11 = function (parentName, childName) {\n var tmp;\n // Inline function 'kotlin.text.isEmpty' call\n if (charSequenceLength(parentName) === 0) {\n tmp = childName;\n } else {\n tmp = parentName + '.' + childName;\n }\n return tmp;\n };\n function NamedValueDecoder() {\n TaggedDecoder.call(this);\n }\n protoOf(NamedValueDecoder).q11 = function (_this__u8e3s4, index) {\n return this.s11(this.r11(_this__u8e3s4, index));\n };\n protoOf(NamedValueDecoder).s11 = function (nestedName) {\n var tmp0_elvis_lhs = this.u11();\n return this.v11(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, nestedName);\n };\n protoOf(NamedValueDecoder).r11 = function (descriptor, index) {\n return descriptor.yl(index);\n };\n protoOf(NamedValueDecoder).v11 = function (parentName, childName) {\n var tmp;\n // Inline function 'kotlin.text.isEmpty' call\n if (charSequenceLength(parentName) === 0) {\n tmp = childName;\n } else {\n tmp = parentName + '.' + childName;\n }\n return tmp;\n };\n function encodeElement($this, desc, index) {\n var tag = $this.q11(desc, index);\n $this.m12(tag);\n return true;\n }\n function TaggedEncoder() {\n var tmp = this;\n // Inline function 'kotlin.collections.arrayListOf' call\n tmp.t11_1 = ArrayList_init_$Create$_0();\n }\n protoOf(TaggedEncoder).co = function () {\n return EmptySerializersModule_0();\n };\n protoOf(TaggedEncoder).w11 = function (tag, value) {\n throw SerializationException_init_$Create$_0('Non-serializable ' + getKClassFromExpression(value) + ' is not supported by ' + getKClassFromExpression(this) + ' encoder');\n };\n protoOf(TaggedEncoder).x11 = function (tag) {\n };\n protoOf(TaggedEncoder).y11 = function (tag) {\n throw SerializationException_init_$Create$_0('null is not supported');\n };\n protoOf(TaggedEncoder).z11 = function (tag, value) {\n return this.w11(tag, value);\n };\n protoOf(TaggedEncoder).a12 = function (tag, value) {\n return this.w11(tag, value);\n };\n protoOf(TaggedEncoder).b12 = function (tag, value) {\n return this.w11(tag, value);\n };\n protoOf(TaggedEncoder).c12 = function (tag, value) {\n return this.w11(tag, value);\n };\n protoOf(TaggedEncoder).d12 = function (tag, value) {\n return this.w11(tag, value);\n };\n protoOf(TaggedEncoder).e12 = function (tag, value) {\n return this.w11(tag, value);\n };\n protoOf(TaggedEncoder).f12 = function (tag, value) {\n return this.w11(tag, value);\n };\n protoOf(TaggedEncoder).g12 = function (tag, value) {\n return this.w11(tag, new Char(value));\n };\n protoOf(TaggedEncoder).h12 = function (tag, value) {\n return this.w11(tag, value);\n };\n protoOf(TaggedEncoder).i12 = function (tag, enumDescriptor, ordinal) {\n return this.w11(tag, ordinal);\n };\n protoOf(TaggedEncoder).j12 = function (tag, inlineDescriptor) {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.internal.TaggedEncoder.encodeTaggedInline.' call\n this.m12(tag);\n return this;\n };\n protoOf(TaggedEncoder).to = function (descriptor) {\n return this.j12(this.n12(), descriptor);\n };\n protoOf(TaggedEncoder).ip = function () {\n return this.x11(this.l12());\n };\n protoOf(TaggedEncoder).io = function () {\n return this.y11(this.n12());\n };\n protoOf(TaggedEncoder).jo = function (value) {\n return this.f12(this.n12(), value);\n };\n protoOf(TaggedEncoder).ko = function (value) {\n return this.a12(this.n12(), value);\n };\n protoOf(TaggedEncoder).lo = function (value) {\n return this.b12(this.n12(), value);\n };\n protoOf(TaggedEncoder).mo = function (value) {\n return this.z11(this.n12(), value);\n };\n protoOf(TaggedEncoder).no = function (value) {\n return this.c12(this.n12(), value);\n };\n protoOf(TaggedEncoder).oo = function (value) {\n return this.d12(this.n12(), value);\n };\n protoOf(TaggedEncoder).po = function (value) {\n return this.e12(this.n12(), value);\n };\n protoOf(TaggedEncoder).qo = function (value) {\n return this.g12(this.n12(), value);\n };\n protoOf(TaggedEncoder).ro = function (value) {\n return this.h12(this.n12(), value);\n };\n protoOf(TaggedEncoder).so = function (enumDescriptor, index) {\n return this.i12(this.n12(), enumDescriptor, index);\n };\n protoOf(TaggedEncoder).nn = function (descriptor) {\n return this;\n };\n protoOf(TaggedEncoder).on = function (descriptor) {\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!this.t11_1.b1()) {\n this.n12();\n }\n this.k12(descriptor);\n };\n protoOf(TaggedEncoder).k12 = function (descriptor) {\n };\n protoOf(TaggedEncoder).uo = function (descriptor, index, value) {\n return this.f12(this.q11(descriptor, index), value);\n };\n protoOf(TaggedEncoder).vo = function (descriptor, index, value) {\n return this.a12(this.q11(descriptor, index), value);\n };\n protoOf(TaggedEncoder).wo = function (descriptor, index, value) {\n return this.b12(this.q11(descriptor, index), value);\n };\n protoOf(TaggedEncoder).xo = function (descriptor, index, value) {\n return this.z11(this.q11(descriptor, index), value);\n };\n protoOf(TaggedEncoder).yo = function (descriptor, index, value) {\n return this.c12(this.q11(descriptor, index), value);\n };\n protoOf(TaggedEncoder).zo = function (descriptor, index, value) {\n return this.d12(this.q11(descriptor, index), value);\n };\n protoOf(TaggedEncoder).ap = function (descriptor, index, value) {\n return this.e12(this.q11(descriptor, index), value);\n };\n protoOf(TaggedEncoder).bp = function (descriptor, index, value) {\n return this.g12(this.q11(descriptor, index), value);\n };\n protoOf(TaggedEncoder).cp = function (descriptor, index, value) {\n return this.h12(this.q11(descriptor, index), value);\n };\n protoOf(TaggedEncoder).dp = function (descriptor, index) {\n return this.j12(this.q11(descriptor, index), descriptor.wl(index));\n };\n protoOf(TaggedEncoder).ep = function (descriptor, index, serializer, value) {\n if (encodeElement(this, descriptor, index)) {\n this.fp(serializer, value);\n }\n };\n protoOf(TaggedEncoder).gp = function (descriptor, index, serializer, value) {\n if (encodeElement(this, descriptor, index)) {\n this.hp(serializer, value);\n }\n };\n protoOf(TaggedEncoder).l12 = function () {\n return last(this.t11_1);\n };\n protoOf(TaggedEncoder).u11 = function () {\n return lastOrNull(this.t11_1);\n };\n protoOf(TaggedEncoder).m12 = function (name) {\n this.t11_1.q(name);\n };\n protoOf(TaggedEncoder).n12 = function () {\n var tmp;\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!this.t11_1.b1()) {\n tmp = this.t11_1.h1(get_lastIndex_0(this.t11_1));\n } else {\n throw SerializationException_init_$Create$_0('No tag in stack for requested element');\n }\n return tmp;\n };\n function tagBlock($this, tag, block) {\n $this.m12(tag);\n var r = block();\n if (!$this.r12_1) {\n $this.n12();\n }\n $this.r12_1 = false;\n return r;\n }\n function TaggedDecoder$decodeSerializableElement$lambda(this$0, $deserializer, $previousValue) {\n return function () {\n return this$0.ln($deserializer, $previousValue);\n };\n }\n function TaggedDecoder$decodeNullableSerializableElement$lambda(this$0, $deserializer, $previousValue) {\n return function () {\n // Inline function 'kotlinx.serialization.encoding.decodeIfNullable' call\n var this_0 = this$0;\n var isNullabilitySupported = $deserializer.ok().ml();\n var tmp;\n if (isNullabilitySupported ? true : this_0.ym()) {\n // Inline function 'kotlinx.serialization.internal.TaggedDecoder.decodeNullableSerializableElement..' call\n tmp = this$0.ln($deserializer, $previousValue);\n } else {\n tmp = this_0.zm();\n }\n return tmp;\n };\n }\n function TaggedDecoder() {\n var tmp = this;\n // Inline function 'kotlin.collections.arrayListOf' call\n tmp.q12_1 = ArrayList_init_$Create$_0();\n this.r12_1 = false;\n }\n protoOf(TaggedDecoder).co = function () {\n return EmptySerializersModule_0();\n };\n protoOf(TaggedDecoder).s12 = function (tag) {\n throw SerializationException_init_$Create$_0('' + getKClassFromExpression(this) + \" can't retrieve untyped values\");\n };\n protoOf(TaggedDecoder).t12 = function (tag) {\n return true;\n };\n protoOf(TaggedDecoder).u12 = function (tag) {\n var tmp = this.s12(tag);\n return typeof tmp === 'boolean' ? tmp : THROW_CCE();\n };\n protoOf(TaggedDecoder).v12 = function (tag) {\n var tmp = this.s12(tag);\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(TaggedDecoder).w12 = function (tag) {\n var tmp = this.s12(tag);\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(TaggedDecoder).x12 = function (tag) {\n var tmp = this.s12(tag);\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(TaggedDecoder).y12 = function (tag) {\n var tmp = this.s12(tag);\n return tmp instanceof Long ? tmp : THROW_CCE();\n };\n protoOf(TaggedDecoder).z12 = function (tag) {\n var tmp = this.s12(tag);\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(TaggedDecoder).a13 = function (tag) {\n var tmp = this.s12(tag);\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(TaggedDecoder).b13 = function (tag) {\n var tmp = this.s12(tag);\n return tmp instanceof Char ? tmp.ab_1 : THROW_CCE();\n };\n protoOf(TaggedDecoder).c13 = function (tag) {\n var tmp = this.s12(tag);\n return typeof tmp === 'string' ? tmp : THROW_CCE();\n };\n protoOf(TaggedDecoder).d13 = function (tag, enumDescriptor) {\n var tmp = this.s12(tag);\n return typeof tmp === 'number' ? tmp : THROW_CCE();\n };\n protoOf(TaggedDecoder).e13 = function (tag, inlineDescriptor) {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.internal.TaggedDecoder.decodeTaggedInline.' call\n this.m12(tag);\n return this;\n };\n protoOf(TaggedDecoder).ln = function (deserializer, previousValue) {\n return this.mn(deserializer);\n };\n protoOf(TaggedDecoder).kn = function (descriptor) {\n return this.e13(this.n12(), descriptor);\n };\n protoOf(TaggedDecoder).ym = function () {\n var tmp0_elvis_lhs = this.u11();\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var currentTag = tmp;\n return this.t12(currentTag);\n };\n protoOf(TaggedDecoder).zm = function () {\n return null;\n };\n protoOf(TaggedDecoder).an = function () {\n return this.u12(this.n12());\n };\n protoOf(TaggedDecoder).bn = function () {\n return this.v12(this.n12());\n };\n protoOf(TaggedDecoder).cn = function () {\n return this.w12(this.n12());\n };\n protoOf(TaggedDecoder).dn = function () {\n return this.x12(this.n12());\n };\n protoOf(TaggedDecoder).en = function () {\n return this.y12(this.n12());\n };\n protoOf(TaggedDecoder).fn = function () {\n return this.z12(this.n12());\n };\n protoOf(TaggedDecoder).gn = function () {\n return this.a13(this.n12());\n };\n protoOf(TaggedDecoder).hn = function () {\n return this.b13(this.n12());\n };\n protoOf(TaggedDecoder).in = function () {\n return this.c13(this.n12());\n };\n protoOf(TaggedDecoder).jn = function (enumDescriptor) {\n return this.d13(this.n12(), enumDescriptor);\n };\n protoOf(TaggedDecoder).nn = function (descriptor) {\n return this;\n };\n protoOf(TaggedDecoder).on = function (descriptor) {\n };\n protoOf(TaggedDecoder).pn = function (descriptor, index) {\n return this.u12(this.q11(descriptor, index));\n };\n protoOf(TaggedDecoder).qn = function (descriptor, index) {\n return this.v12(this.q11(descriptor, index));\n };\n protoOf(TaggedDecoder).rn = function (descriptor, index) {\n return this.w12(this.q11(descriptor, index));\n };\n protoOf(TaggedDecoder).sn = function (descriptor, index) {\n return this.x12(this.q11(descriptor, index));\n };\n protoOf(TaggedDecoder).tn = function (descriptor, index) {\n return this.y12(this.q11(descriptor, index));\n };\n protoOf(TaggedDecoder).un = function (descriptor, index) {\n return this.z12(this.q11(descriptor, index));\n };\n protoOf(TaggedDecoder).vn = function (descriptor, index) {\n return this.a13(this.q11(descriptor, index));\n };\n protoOf(TaggedDecoder).wn = function (descriptor, index) {\n return this.b13(this.q11(descriptor, index));\n };\n protoOf(TaggedDecoder).xn = function (descriptor, index) {\n return this.c13(this.q11(descriptor, index));\n };\n protoOf(TaggedDecoder).yn = function (descriptor, index) {\n return this.e13(this.q11(descriptor, index), descriptor.wl(index));\n };\n protoOf(TaggedDecoder).zn = function (descriptor, index, deserializer, previousValue) {\n var tmp = this.q11(descriptor, index);\n return tagBlock(this, tmp, TaggedDecoder$decodeSerializableElement$lambda(this, deserializer, previousValue));\n };\n protoOf(TaggedDecoder).bo = function (descriptor, index, deserializer, previousValue) {\n var tmp = this.q11(descriptor, index);\n return tagBlock(this, tmp, TaggedDecoder$decodeNullableSerializableElement$lambda(this, deserializer, previousValue));\n };\n protoOf(TaggedDecoder).u11 = function () {\n return lastOrNull(this.q12_1);\n };\n protoOf(TaggedDecoder).m12 = function (name) {\n this.q12_1.q(name);\n };\n protoOf(TaggedDecoder).n12 = function () {\n var r = this.q12_1.h1(get_lastIndex_0(this.q12_1));\n this.r12_1 = true;\n return r;\n };\n function get_NULL() {\n _init_properties_Tuples_kt__dz0qyd();\n return NULL;\n }\n var NULL;\n function MapEntry(key, value) {\n this.f13_1 = key;\n this.g13_1 = value;\n }\n protoOf(MapEntry).t2 = function () {\n return this.f13_1;\n };\n protoOf(MapEntry).u2 = function () {\n return this.g13_1;\n };\n protoOf(MapEntry).toString = function () {\n return 'MapEntry(key=' + this.f13_1 + ', value=' + this.g13_1 + ')';\n };\n protoOf(MapEntry).hashCode = function () {\n var result = this.f13_1 == null ? 0 : hashCode(this.f13_1);\n result = imul(result, 31) + (this.g13_1 == null ? 0 : hashCode(this.g13_1)) | 0;\n return result;\n };\n protoOf(MapEntry).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof MapEntry))\n return false;\n var tmp0_other_with_cast = other instanceof MapEntry ? other : THROW_CCE();\n if (!equals(this.f13_1, tmp0_other_with_cast.f13_1))\n return false;\n if (!equals(this.g13_1, tmp0_other_with_cast.g13_1))\n return false;\n return true;\n };\n function MapEntrySerializer$descriptor$lambda($keySerializer, $valueSerializer) {\n return function ($this$buildSerialDescriptor) {\n $this$buildSerialDescriptor.cl('key', $keySerializer.ok());\n $this$buildSerialDescriptor.cl('value', $valueSerializer.ok());\n return Unit_instance;\n };\n }\n function MapEntrySerializer_0(keySerializer, valueSerializer) {\n KeyValueSerializer.call(this, keySerializer, valueSerializer);\n var tmp = this;\n var tmp_0 = MAP_getInstance();\n tmp.j13_1 = buildSerialDescriptor('kotlin.collections.Map.Entry', tmp_0, [], MapEntrySerializer$descriptor$lambda(keySerializer, valueSerializer));\n }\n protoOf(MapEntrySerializer_0).ok = function () {\n return this.j13_1;\n };\n protoOf(MapEntrySerializer_0).k13 = function (_this__u8e3s4) {\n return _this__u8e3s4.t2();\n };\n protoOf(MapEntrySerializer_0).l13 = function (_this__u8e3s4) {\n return this.k13((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Entry) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(MapEntrySerializer_0).m13 = function (_this__u8e3s4) {\n return _this__u8e3s4.u2();\n };\n protoOf(MapEntrySerializer_0).n13 = function (_this__u8e3s4) {\n return this.m13((!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Entry) : false) ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(MapEntrySerializer_0).o13 = function (key, value) {\n return new MapEntry(key, value);\n };\n function PairSerializer$descriptor$lambda($keySerializer, $valueSerializer) {\n return function ($this$buildClassSerialDescriptor) {\n $this$buildClassSerialDescriptor.cl('first', $keySerializer.ok());\n $this$buildClassSerialDescriptor.cl('second', $valueSerializer.ok());\n return Unit_instance;\n };\n }\n function PairSerializer_0(keySerializer, valueSerializer) {\n KeyValueSerializer.call(this, keySerializer, valueSerializer);\n var tmp = this;\n tmp.u13_1 = buildClassSerialDescriptor('kotlin.Pair', [], PairSerializer$descriptor$lambda(keySerializer, valueSerializer));\n }\n protoOf(PairSerializer_0).ok = function () {\n return this.u13_1;\n };\n protoOf(PairSerializer_0).v13 = function (_this__u8e3s4) {\n return _this__u8e3s4.ye_1;\n };\n protoOf(PairSerializer_0).l13 = function (_this__u8e3s4) {\n return this.v13(_this__u8e3s4 instanceof Pair ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(PairSerializer_0).w13 = function (_this__u8e3s4) {\n return _this__u8e3s4.ze_1;\n };\n protoOf(PairSerializer_0).n13 = function (_this__u8e3s4) {\n return this.w13(_this__u8e3s4 instanceof Pair ? _this__u8e3s4 : THROW_CCE());\n };\n protoOf(PairSerializer_0).o13 = function (key, value) {\n return to(key, value);\n };\n function decodeSequentially_1($this, composite) {\n var a = composite.ao($this.a14_1, 0, $this.x13_1);\n var b = composite.ao($this.a14_1, 1, $this.y13_1);\n var c = composite.ao($this.a14_1, 2, $this.z13_1);\n composite.on($this.a14_1);\n return new Triple(a, b, c);\n }\n function decodeStructure($this, composite) {\n var a = get_NULL();\n var b = get_NULL();\n var c = get_NULL();\n mainLoop: while (true) {\n var index = composite.eo($this.a14_1);\n if (index === -1) {\n break mainLoop;\n } else {\n if (index === 0) {\n a = composite.ao($this.a14_1, 0, $this.x13_1);\n } else {\n if (index === 1) {\n b = composite.ao($this.a14_1, 1, $this.y13_1);\n } else {\n if (index === 2) {\n c = composite.ao($this.a14_1, 2, $this.z13_1);\n } else {\n throw SerializationException_init_$Create$_0('Unexpected index ' + index);\n }\n }\n }\n }\n }\n composite.on($this.a14_1);\n if (a === get_NULL())\n throw SerializationException_init_$Create$_0(\"Element 'first' is missing\");\n if (b === get_NULL())\n throw SerializationException_init_$Create$_0(\"Element 'second' is missing\");\n if (c === get_NULL())\n throw SerializationException_init_$Create$_0(\"Element 'third' is missing\");\n var tmp = (a == null ? true : !(a == null)) ? a : THROW_CCE();\n var tmp_0 = (b == null ? true : !(b == null)) ? b : THROW_CCE();\n return new Triple(tmp, tmp_0, (c == null ? true : !(c == null)) ? c : THROW_CCE());\n }\n function TripleSerializer$descriptor$lambda(this$0) {\n return function ($this$buildClassSerialDescriptor) {\n $this$buildClassSerialDescriptor.cl('first', this$0.x13_1.ok());\n $this$buildClassSerialDescriptor.cl('second', this$0.y13_1.ok());\n $this$buildClassSerialDescriptor.cl('third', this$0.z13_1.ok());\n return Unit_instance;\n };\n }\n function TripleSerializer_0(aSerializer, bSerializer, cSerializer) {\n this.x13_1 = aSerializer;\n this.y13_1 = bSerializer;\n this.z13_1 = cSerializer;\n var tmp = this;\n tmp.a14_1 = buildClassSerialDescriptor('kotlin.Triple', [], TripleSerializer$descriptor$lambda(this));\n }\n protoOf(TripleSerializer_0).ok = function () {\n return this.a14_1;\n };\n protoOf(TripleSerializer_0).b14 = function (encoder, value) {\n var structuredEncoder = encoder.nn(this.a14_1);\n structuredEncoder.ep(this.a14_1, 0, this.x13_1, value.ti_1);\n structuredEncoder.ep(this.a14_1, 1, this.y13_1, value.ui_1);\n structuredEncoder.ep(this.a14_1, 2, this.z13_1, value.vi_1);\n structuredEncoder.on(this.a14_1);\n };\n protoOf(TripleSerializer_0).pk = function (encoder, value) {\n return this.b14(encoder, value instanceof Triple ? value : THROW_CCE());\n };\n protoOf(TripleSerializer_0).qk = function (decoder) {\n var composite = decoder.nn(this.a14_1);\n if (composite.do()) {\n return decodeSequentially_1(this, composite);\n }\n return decodeStructure(this, composite);\n };\n function KeyValueSerializer(keySerializer, valueSerializer) {\n this.p13_1 = keySerializer;\n this.q13_1 = valueSerializer;\n }\n protoOf(KeyValueSerializer).r13 = function (encoder, value) {\n var structuredEncoder = encoder.nn(this.ok());\n structuredEncoder.ep(this.ok(), 0, this.p13_1, this.l13(value));\n structuredEncoder.ep(this.ok(), 1, this.q13_1, this.n13(value));\n structuredEncoder.on(this.ok());\n };\n protoOf(KeyValueSerializer).pk = function (encoder, value) {\n return this.r13(encoder, (value == null ? true : !(value == null)) ? value : THROW_CCE());\n };\n protoOf(KeyValueSerializer).qk = function (decoder) {\n // Inline function 'kotlinx.serialization.encoding.decodeStructure' call\n var descriptor = this.ok();\n var composite = decoder.nn(descriptor);\n var tmp$ret$0;\n $l$block: {\n // Inline function 'kotlinx.serialization.internal.KeyValueSerializer.deserialize.' call\n if (composite.do()) {\n var key = composite.ao(this.ok(), 0, this.p13_1);\n var value = composite.ao(this.ok(), 1, this.q13_1);\n tmp$ret$0 = this.o13(key, value);\n break $l$block;\n }\n var key_0 = get_NULL();\n var value_0 = get_NULL();\n mainLoop: while (true) {\n var idx = composite.eo(this.ok());\n if (idx === -1) {\n break mainLoop;\n } else {\n if (idx === 0) {\n key_0 = composite.ao(this.ok(), 0, this.p13_1);\n } else {\n if (idx === 1) {\n value_0 = composite.ao(this.ok(), 1, this.q13_1);\n } else {\n throw SerializationException_init_$Create$_0('Invalid index: ' + idx);\n }\n }\n }\n }\n if (key_0 === get_NULL())\n throw SerializationException_init_$Create$_0(\"Element 'key' is missing\");\n if (value_0 === get_NULL())\n throw SerializationException_init_$Create$_0(\"Element 'value' is missing\");\n var tmp = (key_0 == null ? true : !(key_0 == null)) ? key_0 : THROW_CCE();\n tmp$ret$0 = this.o13(tmp, (value_0 == null ? true : !(value_0 == null)) ? value_0 : THROW_CCE());\n }\n var result = tmp$ret$0;\n composite.on(descriptor);\n return result;\n };\n var properties_initialized_Tuples_kt_3vs7ar;\n function _init_properties_Tuples_kt__dz0qyd() {\n if (!properties_initialized_Tuples_kt_3vs7ar) {\n properties_initialized_Tuples_kt_3vs7ar = true;\n NULL = new Object();\n }\n }\n function ULongSerializer() {\n ULongSerializer_instance = this;\n this.c14_1 = InlinePrimitiveDescriptor('kotlin.ULong', serializer_5(Companion_getInstance_0()));\n }\n protoOf(ULongSerializer).ok = function () {\n return this.c14_1;\n };\n protoOf(ULongSerializer).d14 = function (encoder, value) {\n var tmp = encoder.to(this.c14_1);\n // Inline function 'kotlin.ULong.toLong' call\n var tmp$ret$0 = _ULong___get_data__impl__fggpzb(value);\n tmp.no(tmp$ret$0);\n };\n protoOf(ULongSerializer).pk = function (encoder, value) {\n return this.d14(encoder, value instanceof ULong ? value.wj_1 : THROW_CCE());\n };\n protoOf(ULongSerializer).e14 = function (decoder) {\n // Inline function 'kotlin.toULong' call\n var this_0 = decoder.kn(this.c14_1).en();\n return _ULong___init__impl__c78o9k(this_0);\n };\n protoOf(ULongSerializer).qk = function (decoder) {\n return new ULong(this.e14(decoder));\n };\n var ULongSerializer_instance;\n function ULongSerializer_getInstance() {\n if (ULongSerializer_instance == null)\n new ULongSerializer();\n return ULongSerializer_instance;\n }\n function UIntSerializer() {\n UIntSerializer_instance = this;\n this.f14_1 = InlinePrimitiveDescriptor('kotlin.UInt', serializer_7(IntCompanionObject_instance));\n }\n protoOf(UIntSerializer).ok = function () {\n return this.f14_1;\n };\n protoOf(UIntSerializer).g14 = function (encoder, value) {\n var tmp = encoder.to(this.f14_1);\n // Inline function 'kotlin.UInt.toInt' call\n var tmp$ret$0 = _UInt___get_data__impl__f0vqqw(value);\n tmp.mo(tmp$ret$0);\n };\n protoOf(UIntSerializer).pk = function (encoder, value) {\n return this.g14(encoder, value instanceof UInt ? value.lj_1 : THROW_CCE());\n };\n protoOf(UIntSerializer).h14 = function (decoder) {\n // Inline function 'kotlin.toUInt' call\n var this_0 = decoder.kn(this.f14_1).dn();\n return _UInt___init__impl__l7qpdl(this_0);\n };\n protoOf(UIntSerializer).qk = function (decoder) {\n return new UInt(this.h14(decoder));\n };\n var UIntSerializer_instance;\n function UIntSerializer_getInstance() {\n if (UIntSerializer_instance == null)\n new UIntSerializer();\n return UIntSerializer_instance;\n }\n function UShortSerializer() {\n UShortSerializer_instance = this;\n this.i14_1 = InlinePrimitiveDescriptor('kotlin.UShort', serializer_9(ShortCompanionObject_instance));\n }\n protoOf(UShortSerializer).ok = function () {\n return this.i14_1;\n };\n protoOf(UShortSerializer).j14 = function (encoder, value) {\n var tmp = encoder.to(this.i14_1);\n // Inline function 'kotlin.UShort.toShort' call\n var tmp$ret$0 = _UShort___get_data__impl__g0245(value);\n tmp.lo(tmp$ret$0);\n };\n protoOf(UShortSerializer).pk = function (encoder, value) {\n return this.j14(encoder, value instanceof UShort ? value.hk_1 : THROW_CCE());\n };\n protoOf(UShortSerializer).k14 = function (decoder) {\n // Inline function 'kotlin.toUShort' call\n var this_0 = decoder.kn(this.i14_1).cn();\n return _UShort___init__impl__jigrne(this_0);\n };\n protoOf(UShortSerializer).qk = function (decoder) {\n return new UShort(this.k14(decoder));\n };\n var UShortSerializer_instance;\n function UShortSerializer_getInstance() {\n if (UShortSerializer_instance == null)\n new UShortSerializer();\n return UShortSerializer_instance;\n }\n function UByteSerializer() {\n UByteSerializer_instance = this;\n this.l14_1 = InlinePrimitiveDescriptor('kotlin.UByte', serializer_11(ByteCompanionObject_instance));\n }\n protoOf(UByteSerializer).ok = function () {\n return this.l14_1;\n };\n protoOf(UByteSerializer).m14 = function (encoder, value) {\n var tmp = encoder.to(this.l14_1);\n // Inline function 'kotlin.UByte.toByte' call\n var tmp$ret$0 = _UByte___get_data__impl__jof9qr(value);\n tmp.ko(tmp$ret$0);\n };\n protoOf(UByteSerializer).pk = function (encoder, value) {\n return this.m14(encoder, value instanceof UByte ? value.aj_1 : THROW_CCE());\n };\n protoOf(UByteSerializer).n14 = function (decoder) {\n // Inline function 'kotlin.toUByte' call\n var this_0 = decoder.kn(this.l14_1).bn();\n return _UByte___init__impl__g9hnc4(this_0);\n };\n protoOf(UByteSerializer).qk = function (decoder) {\n return new UByte(this.n14(decoder));\n };\n var UByteSerializer_instance;\n function UByteSerializer_getInstance() {\n if (UByteSerializer_instance == null)\n new UByteSerializer();\n return UByteSerializer_instance;\n }\n function get_EmptySerializersModuleLegacyJs() {\n _init_properties_SerializersModule_kt__u78ha3();\n return EmptySerializersModule;\n }\n var EmptySerializersModule;\n function SerializersModule() {\n }\n protoOf(SerializersModule).jl = function (kClass, typeArgumentsSerializers, $super) {\n typeArgumentsSerializers = typeArgumentsSerializers === VOID ? emptyList() : typeArgumentsSerializers;\n return $super === VOID ? this.il(kClass, typeArgumentsSerializers) : $super.il.call(this, kClass, typeArgumentsSerializers);\n };\n function SerialModuleImpl(class2ContextualFactory, polyBase2Serializers, polyBase2DefaultSerializerProvider, polyBase2NamedSerializers, polyBase2DefaultDeserializerProvider) {\n SerializersModule.call(this);\n this.p14_1 = class2ContextualFactory;\n this.q14_1 = polyBase2Serializers;\n this.r14_1 = polyBase2DefaultSerializerProvider;\n this.s14_1 = polyBase2NamedSerializers;\n this.t14_1 = polyBase2DefaultDeserializerProvider;\n }\n protoOf(SerialModuleImpl).op = function (baseClass, value) {\n if (!baseClass.w6(value))\n return null;\n var tmp0_safe_receiver = this.q14_1.b3(baseClass);\n var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b3(getKClassFromExpression(value));\n var registered = (!(tmp == null) ? isInterface(tmp, SerializationStrategy) : false) ? tmp : null;\n if (!(registered == null))\n return registered;\n var tmp_0 = this.r14_1.b3(baseClass);\n var tmp1_safe_receiver = (!(tmp_0 == null) ? typeof tmp_0 === 'function' : false) ? tmp_0 : null;\n return tmp1_safe_receiver == null ? null : tmp1_safe_receiver(value);\n };\n protoOf(SerialModuleImpl).np = function (baseClass, serializedClassName) {\n var tmp0_safe_receiver = this.s14_1.b3(baseClass);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.get' call\n tmp = (isInterface(tmp0_safe_receiver, Map) ? tmp0_safe_receiver : THROW_CCE()).b3(serializedClassName);\n }\n var tmp_0 = tmp;\n var registered = (!(tmp_0 == null) ? isInterface(tmp_0, KSerializer) : false) ? tmp_0 : null;\n if (!(registered == null))\n return registered;\n var tmp_1 = this.t14_1.b3(baseClass);\n var tmp1_safe_receiver = (!(tmp_1 == null) ? typeof tmp_1 === 'function' : false) ? tmp_1 : null;\n return tmp1_safe_receiver == null ? null : tmp1_safe_receiver(serializedClassName);\n };\n protoOf(SerialModuleImpl).il = function (kClass, typeArgumentsSerializers) {\n var tmp0_safe_receiver = this.p14_1.b3(kClass);\n var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u14(typeArgumentsSerializers);\n return (tmp == null ? true : isInterface(tmp, KSerializer)) ? tmp : null;\n };\n protoOf(SerialModuleImpl).o14 = function (collector) {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this.p14_1.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlinx.serialization.modules.SerialModuleImpl.dumpTo.' call\n // Inline function 'kotlin.collections.component1' call\n var kclass = element.t2();\n // Inline function 'kotlin.collections.component2' call\n var serial = element.u2();\n if (serial instanceof Argless) {\n var tmp = isInterface(kclass, KClass) ? kclass : THROW_CCE();\n var tmp_0 = serial.x14_1;\n collector.y14(tmp, isInterface(tmp_0, KSerializer) ? tmp_0 : THROW_CCE());\n } else {\n if (serial instanceof WithTypeArguments) {\n collector.w14(kclass, serial.v14_1);\n }\n }\n }\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator_0 = this.q14_1.q2().t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'kotlinx.serialization.modules.SerialModuleImpl.dumpTo.' call\n // Inline function 'kotlin.collections.component1' call\n var baseClass = element_0.t2();\n // Inline function 'kotlin.collections.component2' call\n var classMap = element_0.u2();\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator_1 = classMap.q2().t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'kotlinx.serialization.modules.SerialModuleImpl.dumpTo..' call\n // Inline function 'kotlin.collections.component1' call\n var actualClass = element_1.t2();\n // Inline function 'kotlin.collections.component2' call\n var serializer = element_1.u2();\n var tmp_1 = isInterface(baseClass, KClass) ? baseClass : THROW_CCE();\n var tmp_2 = isInterface(actualClass, KClass) ? actualClass : THROW_CCE();\n // Inline function 'kotlinx.serialization.internal.cast' call\n var tmp$ret$9 = isInterface(serializer, KSerializer) ? serializer : THROW_CCE();\n collector.z14(tmp_1, tmp_2, tmp$ret$9);\n }\n }\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator_2 = this.r14_1.q2().t();\n while (tmp0_iterator_2.u()) {\n var element_2 = tmp0_iterator_2.w();\n // Inline function 'kotlinx.serialization.modules.SerialModuleImpl.dumpTo.' call\n // Inline function 'kotlin.collections.component1' call\n var baseClass_0 = element_2.t2();\n // Inline function 'kotlin.collections.component2' call\n var provider = element_2.u2();\n var tmp_3 = isInterface(baseClass_0, KClass) ? baseClass_0 : THROW_CCE();\n collector.a15(tmp_3, typeof provider === 'function' ? provider : THROW_CCE());\n }\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator_3 = this.t14_1.q2().t();\n while (tmp0_iterator_3.u()) {\n var element_3 = tmp0_iterator_3.w();\n // Inline function 'kotlinx.serialization.modules.SerialModuleImpl.dumpTo.' call\n // Inline function 'kotlin.collections.component1' call\n var baseClass_1 = element_3.t2();\n // Inline function 'kotlin.collections.component2' call\n var provider_0 = element_3.u2();\n var tmp_4 = isInterface(baseClass_1, KClass) ? baseClass_1 : THROW_CCE();\n collector.b15(tmp_4, typeof provider_0 === 'function' ? provider_0 : THROW_CCE());\n }\n };\n function Argless() {\n }\n function WithTypeArguments() {\n }\n function ContextualProvider() {\n }\n var properties_initialized_SerializersModule_kt_fjigjn;\n function _init_properties_SerializersModule_kt__u78ha3() {\n if (!properties_initialized_SerializersModule_kt_fjigjn) {\n properties_initialized_SerializersModule_kt_fjigjn = true;\n EmptySerializersModule = new SerialModuleImpl(emptyMap(), emptyMap(), emptyMap(), emptyMap(), emptyMap());\n }\n }\n function EmptySerializersModule_0() {\n return get_EmptySerializersModuleLegacyJs();\n }\n function SerializersModuleCollector$contextual$lambda($serializer) {\n return function (it) {\n return $serializer;\n };\n }\n function SerializersModuleCollector() {\n }\n function SerializableWith(serializer) {\n this.c15_1 = serializer;\n }\n protoOf(SerializableWith).equals = function (other) {\n if (!(other instanceof SerializableWith))\n return false;\n var tmp0_other_with_cast = other instanceof SerializableWith ? other : THROW_CCE();\n if (!this.c15_1.equals(tmp0_other_with_cast.c15_1))\n return false;\n return true;\n };\n protoOf(SerializableWith).hashCode = function () {\n return imul(getStringHashCode('serializer'), 127) ^ this.c15_1.hashCode();\n };\n protoOf(SerializableWith).toString = function () {\n return '@kotlinx.serialization.SerializableWith(serializer=' + this.c15_1 + ')';\n };\n function createCache(factory) {\n return new createCache$1(factory);\n }\n function createParametrizedCache(factory) {\n return new createParametrizedCache$1(factory);\n }\n function compiledSerializerImpl(_this__u8e3s4) {\n var tmp1_elvis_lhs = constructSerializerForGivenTypeArgs(_this__u8e3s4, []);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n var tmp_0;\n if (_this__u8e3s4 === PrimitiveClasses_getInstance().m7()) {\n tmp_0 = NothingSerializer_getInstance();\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n var tmp0_safe_receiver = get_js(_this__u8e3s4).Companion;\n tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.serializer();\n }\n var tmp_1 = tmp_0;\n tmp = (!(tmp_1 == null) ? isInterface(tmp_1, KSerializer) : false) ? tmp_1 : null;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n }\n function platformSpecificSerializerNotRegistered(_this__u8e3s4) {\n throw SerializationException_init_$Create$_0(notRegisteredMessage(_this__u8e3s4) + 'To get enum serializer on Kotlin/JS, it should be annotated with @Serializable annotation.');\n }\n function isReferenceArray(rootClass) {\n return rootClass.equals(PrimitiveClasses_getInstance().t7());\n }\n function constructSerializerForGivenTypeArgs(_this__u8e3s4, args) {\n var tmp;\n try {\n // Inline function 'kotlin.reflect.findAssociatedObject' call\n var assocObject = findAssociatedObject(_this__u8e3s4, getKClass(SerializableWith));\n var tmp_0;\n if (!(assocObject == null) ? isInterface(assocObject, KSerializer) : false) {\n tmp_0 = (!(assocObject == null) ? isInterface(assocObject, KSerializer) : false) ? assocObject : THROW_CCE();\n } else {\n if (!(assocObject == null) ? isInterface(assocObject, SerializerFactory) : false) {\n var tmp_1 = assocObject.ew(args.slice());\n tmp_0 = isInterface(tmp_1, KSerializer) ? tmp_1 : THROW_CCE();\n } else {\n if (get_isInterface(_this__u8e3s4)) {\n tmp_0 = new PolymorphicSerializer(_this__u8e3s4);\n } else {\n tmp_0 = null;\n }\n }\n }\n tmp = tmp_0;\n } catch ($p) {\n var tmp_2;\n var e = $p;\n tmp_2 = null;\n tmp = tmp_2;\n }\n return tmp;\n }\n function get_isInterface(_this__u8e3s4) {\n // Inline function 'kotlin.js.asDynamic' call\n var tmp0_safe_receiver = get_js(_this__u8e3s4).$metadata$;\n return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kind) == 'interface';\n }\n function toNativeArrayImpl(_this__u8e3s4, eClass) {\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(_this__u8e3s4);\n }\n function getChecked(_this__u8e3s4, index) {\n if (!(0 <= index ? index <= (_this__u8e3s4.length - 1 | 0) : false))\n throw IndexOutOfBoundsException_init_$Create$('Index ' + index + ' out of bounds ' + get_indices(_this__u8e3s4));\n return _this__u8e3s4[index];\n }\n function getChecked_0(_this__u8e3s4, index) {\n if (!(0 <= index ? index <= (_this__u8e3s4.length - 1 | 0) : false))\n throw IndexOutOfBoundsException_init_$Create$('Index ' + index + ' out of bounds ' + get_indices_0(_this__u8e3s4));\n return _this__u8e3s4[index];\n }\n function createCache$1($factory) {\n this.d15_1 = $factory;\n }\n protoOf(createCache$1).kl = function (key) {\n return this.d15_1(key);\n };\n function createParametrizedCache$1($factory) {\n this.e15_1 = $factory;\n }\n protoOf(createParametrizedCache$1).ll = function (key, types) {\n // Inline function 'kotlin.runCatching' call\n var tmp;\n try {\n // Inline function 'kotlin.Companion.success' call\n // Inline function 'kotlinx.serialization.internal..get.' call\n var value = this.e15_1(key, types);\n tmp = _Result___init__impl__xyqfz8(value);\n } catch ($p) {\n var tmp_0;\n if ($p instanceof Error) {\n var e = $p;\n // Inline function 'kotlin.Companion.failure' call\n tmp_0 = _Result___init__impl__xyqfz8(createFailure(e));\n } else {\n throw $p;\n }\n tmp = tmp_0;\n }\n return tmp;\n };\n //region block: post-declaration\n protoOf(SerialDescriptorImpl).ml = get_isNullable;\n protoOf(SerialDescriptorImpl).tl = get_isInline;\n protoOf(AbstractDecoder).ao = decodeSerializableElement$default;\n protoOf(AbstractDecoder).mn = decodeSerializableValue;\n protoOf(AbstractDecoder).do = decodeSequentially;\n protoOf(AbstractDecoder).fo = decodeCollectionSize;\n protoOf(AbstractEncoder).ip = encodeNotNullMark;\n protoOf(AbstractEncoder).jp = beginCollection;\n protoOf(AbstractEncoder).fp = encodeSerializableValue;\n protoOf(AbstractEncoder).hp = encodeNullableSerializableValue;\n protoOf(AbstractEncoder).kp = shouldEncodeElementDefault;\n protoOf(ListLikeDescriptor).ml = get_isNullable;\n protoOf(ListLikeDescriptor).tl = get_isInline;\n protoOf(ListLikeDescriptor).rl = get_annotations;\n protoOf(MapLikeDescriptor).ml = get_isNullable;\n protoOf(MapLikeDescriptor).tl = get_isInline;\n protoOf(MapLikeDescriptor).rl = get_annotations;\n protoOf(PluginGeneratedSerialDescriptor).ml = get_isNullable;\n protoOf(PluginGeneratedSerialDescriptor).tl = get_isInline;\n protoOf(InlinePrimitiveDescriptor$1).sv = typeParametersSerializers;\n protoOf(NothingSerialDescriptor).ml = get_isNullable;\n protoOf(NothingSerialDescriptor).tl = get_isInline;\n protoOf(NothingSerialDescriptor).rl = get_annotations;\n protoOf(PrimitiveSerialDescriptor_0).ml = get_isNullable;\n protoOf(PrimitiveSerialDescriptor_0).tl = get_isInline;\n protoOf(PrimitiveSerialDescriptor_0).rl = get_annotations;\n protoOf(TaggedEncoder).jp = beginCollection;\n protoOf(TaggedEncoder).fp = encodeSerializableValue;\n protoOf(TaggedEncoder).hp = encodeNullableSerializableValue;\n protoOf(TaggedEncoder).kp = shouldEncodeElementDefault;\n protoOf(TaggedDecoder).ao = decodeSerializableElement$default;\n protoOf(TaggedDecoder).mn = decodeSerializableValue;\n protoOf(TaggedDecoder).do = decodeSequentially;\n protoOf(TaggedDecoder).fo = decodeCollectionSize;\n //endregion\n //region block: init\n Companion_instance_0 = new Companion();\n //endregion\n //region block: exports\n _.$_$ = _.$_$ || {};\n _.$_$.a = PolymorphicSerializer_init_$Create$;\n _.$_$.b = SerializationException_init_$Init$_0;\n _.$_$.c = SerializationException_init_$Create$_0;\n _.$_$.d = UnknownFieldException_init_$Create$;\n _.$_$.e = SEALED_getInstance;\n _.$_$.f = BOOLEAN_getInstance;\n _.$_$.g = DOUBLE_getInstance;\n _.$_$.h = INT_getInstance;\n _.$_$.i = STRING_getInstance;\n _.$_$.j = CONTEXTUAL_getInstance;\n _.$_$.k = ENUM_getInstance;\n _.$_$.l = CLASS_getInstance;\n _.$_$.m = LIST_getInstance;\n _.$_$.n = MAP_getInstance;\n _.$_$.o = OBJECT_getInstance;\n _.$_$.p = Companion_instance_0;\n _.$_$.q = BooleanSerializer_getInstance;\n _.$_$.r = DoubleSerializer_getInstance;\n _.$_$.s = IntSerializer_getInstance;\n _.$_$.t = StringSerializer_getInstance;\n _.$_$.u = ArraySerializer;\n _.$_$.v = ListSerializer;\n _.$_$.w = MapSerializer;\n _.$_$.x = get_nullable;\n _.$_$.y = serializer_1;\n _.$_$.z = serializer_10;\n _.$_$.a1 = serializer_8;\n _.$_$.b1 = serializer_3;\n _.$_$.c1 = serializer_12;\n _.$_$.d1 = serializer_6;\n _.$_$.e1 = serializer_13;\n _.$_$.f1 = PolymorphicKind;\n _.$_$.g1 = PrimitiveKind;\n _.$_$.h1 = PrimitiveSerialDescriptor;\n _.$_$.i1 = get_annotations;\n _.$_$.j1 = get_isInline;\n _.$_$.k1 = get_isNullable;\n _.$_$.l1 = SerialDescriptor;\n _.$_$.m1 = ENUM;\n _.$_$.n1 = buildClassSerialDescriptor;\n _.$_$.o1 = buildSerialDescriptor;\n _.$_$.p1 = get_elementNames;\n _.$_$.q1 = getContextualDescriptor;\n _.$_$.r1 = listSerialDescriptor;\n _.$_$.s1 = AbstractDecoder;\n _.$_$.t1 = AbstractEncoder;\n _.$_$.u1 = CompositeDecoder;\n _.$_$.v1 = CompositeEncoder;\n _.$_$.w1 = Decoder;\n _.$_$.x1 = Encoder;\n _.$_$.y1 = AbstractPolymorphicSerializer;\n _.$_$.z1 = ArrayListSerializer;\n _.$_$.a2 = ElementMarker;\n _.$_$.b2 = typeParametersSerializers;\n _.$_$.c2 = GeneratedSerializer;\n _.$_$.d2 = InlinePrimitiveDescriptor;\n _.$_$.e2 = LinkedHashMapSerializer;\n _.$_$.f2 = NamedValueDecoder;\n _.$_$.g2 = NamedValueEncoder;\n _.$_$.h2 = PluginGeneratedSerialDescriptor;\n _.$_$.i2 = ReferenceArraySerializer;\n _.$_$.j2 = SerializerFactory;\n _.$_$.k2 = createAnnotatedEnumSerializer;\n _.$_$.l2 = createSimpleEnumSerializer;\n _.$_$.m2 = jsonCachedSerialNames;\n _.$_$.n2 = throwArrayMissingFieldException;\n _.$_$.o2 = throwMissingFieldException;\n _.$_$.p2 = EmptySerializersModule_0;\n _.$_$.q2 = contextual;\n _.$_$.r2 = SerializersModuleCollector;\n _.$_$.s2 = DeserializationStrategy;\n _.$_$.t2 = KSerializer;\n _.$_$.u2 = MissingFieldException;\n _.$_$.v2 = SealedClassSerializer;\n _.$_$.w2 = SerializationException;\n _.$_$.x2 = SerializationStrategy;\n _.$_$.y2 = findPolymorphicSerializer_0;\n _.$_$.z2 = findPolymorphicSerializer;\n _.$_$.a3 = serializer_0;\n _.$_$.b3 = serializer;\n //endregion\n return _;\n}));\n\n//# sourceMappingURL=kotlinx-serialization-kotlinx-serialization-core.js.map\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd)\n define(['exports', './kotlinx-serialization-kotlinx-serialization-core.js', './kotlin-kotlin-stdlib.js'], factory);\n else if (typeof exports === 'object')\n factory(module.exports, require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlin-kotlin-stdlib.js'));\n else {\n if (typeof this['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {\n throw new Error(\"Error loading module 'kotlinx-serialization-kotlinx-serialization-json'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'kotlinx-serialization-kotlinx-serialization-json'.\");\n }\n if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {\n throw new Error(\"Error loading module 'kotlinx-serialization-kotlinx-serialization-json'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'kotlinx-serialization-kotlinx-serialization-json'.\");\n }\n root['kotlinx-serialization-kotlinx-serialization-json'] = factory(typeof this['kotlinx-serialization-kotlinx-serialization-json'] === 'undefined' ? {} : this['kotlinx-serialization-kotlinx-serialization-json'], this['kotlinx-serialization-kotlinx-serialization-core'], this['kotlin-kotlin-stdlib']);\n }\n}(this, function (_, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_kotlin) {\n 'use strict';\n //region block: imports\n var imul = Math.imul;\n var EmptySerializersModule = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p2;\n var protoOf = kotlin_kotlin.$_$.u9;\n var objectMeta = kotlin_kotlin.$_$.t9;\n var setMetadataFor = kotlin_kotlin.$_$.v9;\n var Unit_instance = kotlin_kotlin.$_$.x3;\n var classMeta = kotlin_kotlin.$_$.q8;\n var VOID = kotlin_kotlin.$_$.e;\n var toString = kotlin_kotlin.$_$.z9;\n var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.d1;\n var charSequenceLength = kotlin_kotlin.$_$.o8;\n var charSequenceGet = kotlin_kotlin.$_$.n8;\n var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.o1;\n var equals = kotlin_kotlin.$_$.t8;\n var Enum = kotlin_kotlin.$_$.sc;\n var Decoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w1;\n var CompositeDecoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u1;\n var interfaceMeta = kotlin_kotlin.$_$.b9;\n var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.w;\n var THROW_CCE = kotlin_kotlin.$_$.ad;\n var hashCode = kotlin_kotlin.$_$.a9;\n var joinToString = kotlin_kotlin.$_$.e6;\n var Map = kotlin_kotlin.$_$.g4;\n var toDouble = kotlin_kotlin.$_$.cc;\n var List = kotlin_kotlin.$_$.e4;\n var toDoubleOrNull = kotlin_kotlin.$_$.bc;\n var getKClassFromExpression = kotlin_kotlin.$_$.c;\n var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.f;\n var lazy = kotlin_kotlin.$_$.vd;\n var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j2;\n var getBooleanHashCode = kotlin_kotlin.$_$.v8;\n var getStringHashCode = kotlin_kotlin.$_$.z8;\n var NumberFormatException_init_$Create$ = kotlin_kotlin.$_$.j1;\n var IntCompanionObject_instance = kotlin_kotlin.$_$.j3;\n var numberRangeToNumber = kotlin_kotlin.$_$.o9;\n var ClosedRange = kotlin_kotlin.$_$.ea;\n var isInterface = kotlin_kotlin.$_$.j9;\n var contains = kotlin_kotlin.$_$.ha;\n var StringCompanionObject_instance = kotlin_kotlin.$_$.l3;\n var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;\n var InlinePrimitiveDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d2;\n var SEALED_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e;\n var buildSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o1;\n var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t2;\n var MapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w;\n var SerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l1;\n var STRING_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i;\n var ListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v;\n var ENUM_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k;\n var PrimitiveSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h1;\n var toLongOrNull = kotlin_kotlin.$_$.fc;\n var toULongOrNull = kotlin_kotlin.$_$.ic;\n var ULong = kotlin_kotlin.$_$.jd;\n var Companion_getInstance = kotlin_kotlin.$_$.v3;\n var serializer_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d1;\n var _ULong___get_data__impl__fggpzb = kotlin_kotlin.$_$.o2;\n var toBooleanStrictOrNull = kotlin_kotlin.$_$.ac;\n var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.f1;\n var lazy_0 = kotlin_kotlin.$_$.wd;\n var get_isNullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k1;\n var get_isInline = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j1;\n var get_annotations = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i1;\n var KProperty1 = kotlin_kotlin.$_$.na;\n var getPropertyCallableRef = kotlin_kotlin.$_$.y8;\n var Encoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x1;\n var CompositeEncoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v1;\n var toLong = kotlin_kotlin.$_$.x9;\n var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.e2;\n var UInt__toString_impl_dbgl21 = kotlin_kotlin.$_$.g2;\n var _ULong___init__impl__c78o9k = kotlin_kotlin.$_$.n2;\n var ULong__toString_impl_f9au7k = kotlin_kotlin.$_$.p2;\n var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.v1;\n var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.x1;\n var _UShort___init__impl__jigrne = kotlin_kotlin.$_$.w2;\n var UShort__toString_impl_edaoee = kotlin_kotlin.$_$.y2;\n var ElementMarker = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a2;\n var captureStack = kotlin_kotlin.$_$.k8;\n var SerializationException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w2;\n var SerializationException_init_$Init$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b;\n var charSequenceSubSequence = kotlin_kotlin.$_$.p8;\n var coerceAtLeast = kotlin_kotlin.$_$.fa;\n var coerceAtMost = kotlin_kotlin.$_$.ga;\n var Companion_instance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p;\n var SerializationException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c;\n var CLASS_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l;\n var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.q;\n var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;\n var singleOrNull = kotlin_kotlin.$_$.j7;\n var emptyMap = kotlin_kotlin.$_$.p5;\n var getValue = kotlin_kotlin.$_$.a6;\n var fillArrayVal = kotlin_kotlin.$_$.u8;\n var copyOf = kotlin_kotlin.$_$.j5;\n var copyOf_0 = kotlin_kotlin.$_$.k5;\n var LIST_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.m;\n var DeepRecursiveFunction = kotlin_kotlin.$_$.qc;\n var invoke = kotlin_kotlin.$_$.rd;\n var CoroutineImpl = kotlin_kotlin.$_$.f8;\n var DeepRecursiveScope = kotlin_kotlin.$_$.rc;\n var Unit = kotlin_kotlin.$_$.md;\n var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.e8;\n var AbstractPolymorphicSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y1;\n var getKClass = kotlin_kotlin.$_$.d;\n var findPolymorphicSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y2;\n var ensureNotNull = kotlin_kotlin.$_$.qd;\n var DeserializationStrategy = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s2;\n var SealedClassSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v2;\n var jsonCachedSerialNames = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.m2;\n var ENUM = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.m1;\n var PrimitiveKind = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g1;\n var PolymorphicKind = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f1;\n var CONTEXTUAL_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j;\n var MAP_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.n;\n var contextual = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q2;\n var SerializersModuleCollector = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r2;\n var AbstractDecoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s1;\n var substringBefore = kotlin_kotlin.$_$.xb;\n var removeSuffix = kotlin_kotlin.$_$.qb;\n var substringAfter = kotlin_kotlin.$_$.wb;\n var contains_0 = kotlin_kotlin.$_$.hb;\n var plus = kotlin_kotlin.$_$.yd;\n var MissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u2;\n var IllegalArgumentException = kotlin_kotlin.$_$.vc;\n var isFinite = kotlin_kotlin.$_$.td;\n var isFinite_0 = kotlin_kotlin.$_$.sd;\n var toUInt = kotlin_kotlin.$_$.hc;\n var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.f2;\n var toULong = kotlin_kotlin.$_$.jc;\n var toUByte = kotlin_kotlin.$_$.gc;\n var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.w1;\n var toUShort = kotlin_kotlin.$_$.kc;\n var _UShort___get_data__impl__g0245 = kotlin_kotlin.$_$.x2;\n var objectCreate = kotlin_kotlin.$_$.s9;\n var AbstractEncoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t1;\n var OBJECT_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o;\n var noWhenBranchMatchedException = kotlin_kotlin.$_$.xd;\n var findPolymorphicSerializer_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z2;\n var SerializationStrategy = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x2;\n var toString_0 = kotlin_kotlin.$_$.r1;\n var Companion_getInstance_0 = kotlin_kotlin.$_$.u3;\n var serializer_1 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a1;\n var Companion_getInstance_1 = kotlin_kotlin.$_$.t3;\n var serializer_2 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c1;\n var Companion_getInstance_2 = kotlin_kotlin.$_$.w3;\n var serializer_3 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z;\n var setOf = kotlin_kotlin.$_$.i7;\n var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.q1;\n var numberToChar = kotlin_kotlin.$_$.p9;\n var equals_0 = kotlin_kotlin.$_$.kb;\n var NamedValueDecoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f2;\n var ByteCompanionObject_instance = kotlin_kotlin.$_$.g3;\n var toByte = kotlin_kotlin.$_$.w9;\n var ShortCompanionObject_instance = kotlin_kotlin.$_$.k3;\n var toShort = kotlin_kotlin.$_$.y9;\n var single = kotlin_kotlin.$_$.tb;\n var Char = kotlin_kotlin.$_$.oc;\n var emptySet = kotlin_kotlin.$_$.q5;\n var plus_0 = kotlin_kotlin.$_$.a7;\n var toInt = kotlin_kotlin.$_$.ec;\n var toList = kotlin_kotlin.$_$.u7;\n var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.zd;\n var NamedValueEncoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g2;\n var enumEntries = kotlin_kotlin.$_$.g8;\n var getContextualDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q1;\n var last = kotlin_kotlin.$_$.l6;\n var removeLast = kotlin_kotlin.$_$.f7;\n var lastIndexOf = kotlin_kotlin.$_$.pb;\n var Long = kotlin_kotlin.$_$.wc;\n var Char__minus_impl_a2frrh = kotlin_kotlin.$_$.p1;\n var Companion_getInstance_3 = kotlin_kotlin.$_$.r3;\n var numberToLong = kotlin_kotlin.$_$.r9;\n var charArray = kotlin_kotlin.$_$.m8;\n var indexOf = kotlin_kotlin.$_$.mb;\n var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.v;\n var HashMap_init_$Create$ = kotlin_kotlin.$_$.j;\n //endregion\n //region block: pre-declaration\n setMetadataFor(Json, 'Json', classMeta);\n setMetadataFor(Default, 'Default', objectMeta, Json);\n setMetadataFor(JsonBuilder, 'JsonBuilder', classMeta);\n setMetadataFor(JsonImpl, 'JsonImpl', classMeta, Json);\n setMetadataFor(JsonClassDiscriminator, 'JsonClassDiscriminator', classMeta);\n setMetadataFor(JsonNames, 'JsonNames', classMeta);\n setMetadataFor(JsonConfiguration, 'JsonConfiguration', classMeta);\n setMetadataFor(ClassDiscriminatorMode, 'ClassDiscriminatorMode', classMeta, Enum);\n setMetadataFor(JsonDecoder, 'JsonDecoder', interfaceMeta, VOID, [Decoder, CompositeDecoder]);\n setMetadataFor(Companion, 'Companion', objectMeta);\n setMetadataFor(JsonElement, 'JsonElement', classMeta, VOID, VOID, VOID, VOID, {0: JsonElementSerializer_getInstance});\n setMetadataFor(Companion_0, 'Companion', objectMeta);\n setMetadataFor(JsonObject, 'JsonObject', classMeta, JsonElement, [JsonElement, Map], VOID, VOID, {0: JsonObjectSerializer_getInstance});\n setMetadataFor(Companion_1, 'Companion', objectMeta);\n setMetadataFor(JsonPrimitive, 'JsonPrimitive', classMeta, JsonElement, VOID, VOID, VOID, {0: JsonPrimitiveSerializer_getInstance});\n setMetadataFor(Companion_2, 'Companion', objectMeta);\n setMetadataFor(JsonArray, 'JsonArray', classMeta, JsonElement, [JsonElement, List], VOID, VOID, {0: JsonArraySerializer_getInstance});\n setMetadataFor(JsonNull, 'JsonNull', objectMeta, JsonPrimitive, [JsonPrimitive, SerializerFactory], VOID, VOID, {0: JsonNull_getInstance});\n setMetadataFor(JsonLiteral, 'JsonLiteral', classMeta, JsonPrimitive);\n setMetadataFor(JsonElementSerializer, 'JsonElementSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(JsonObjectDescriptor, 'JsonObjectDescriptor', objectMeta, VOID, [SerialDescriptor]);\n setMetadataFor(JsonObjectSerializer, 'JsonObjectSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(JsonPrimitiveSerializer, 'JsonPrimitiveSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(JsonArrayDescriptor, 'JsonArrayDescriptor', objectMeta, VOID, [SerialDescriptor]);\n setMetadataFor(JsonArraySerializer, 'JsonArraySerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(JsonNullSerializer, 'JsonNullSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(JsonLiteralSerializer, 'JsonLiteralSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(defer$1, VOID, classMeta, VOID, [SerialDescriptor]);\n setMetadataFor(JsonEncoder, 'JsonEncoder', interfaceMeta, VOID, [Encoder, CompositeEncoder]);\n setMetadataFor(Composer, 'Composer', classMeta);\n setMetadataFor(ComposerForUnsignedNumbers, 'ComposerForUnsignedNumbers', classMeta, Composer);\n setMetadataFor(ComposerForUnquotedLiterals, 'ComposerForUnquotedLiterals', classMeta, Composer);\n setMetadataFor(ComposerWithPrettyPrint, 'ComposerWithPrettyPrint', classMeta, Composer);\n setMetadataFor(JsonElementMarker, 'JsonElementMarker', classMeta);\n setMetadataFor(JsonException, 'JsonException', classMeta, SerializationException);\n setMetadataFor(JsonDecodingException, 'JsonDecodingException', classMeta, JsonException);\n setMetadataFor(JsonEncodingException, 'JsonEncodingException', classMeta, JsonException);\n setMetadataFor(Tombstone, 'Tombstone', objectMeta);\n setMetadataFor(JsonPath, 'JsonPath', classMeta, VOID, VOID, JsonPath);\n setMetadataFor(JsonTreeReader$readDeepRecursive$slambda, 'JsonTreeReader$readDeepRecursive$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);\n setMetadataFor($readObjectCOROUTINE$0, '$readObjectCOROUTINE$0', classMeta, CoroutineImpl);\n setMetadataFor(JsonTreeReader, 'JsonTreeReader', classMeta, VOID, VOID, VOID, VOID, VOID, [0]);\n setMetadataFor(PolymorphismValidator, 'PolymorphismValidator', classMeta, VOID, [SerializersModuleCollector]);\n setMetadataFor(Key, 'Key', classMeta, VOID, VOID, Key);\n setMetadataFor(DescriptorSchemaCache, 'DescriptorSchemaCache', classMeta, VOID, VOID, DescriptorSchemaCache);\n setMetadataFor(DiscriminatorHolder, 'DiscriminatorHolder', classMeta);\n setMetadataFor(StreamingJsonDecoder, 'StreamingJsonDecoder', classMeta, AbstractDecoder, [JsonDecoder, AbstractDecoder]);\n setMetadataFor(JsonDecoderForUnsignedTypes, 'JsonDecoderForUnsignedTypes', classMeta, AbstractDecoder);\n setMetadataFor(StreamingJsonEncoder, 'StreamingJsonEncoder', classMeta, AbstractEncoder, [JsonEncoder, AbstractEncoder]);\n setMetadataFor(AbstractJsonTreeDecoder, 'AbstractJsonTreeDecoder', classMeta, NamedValueDecoder, [NamedValueDecoder, JsonDecoder]);\n setMetadataFor(JsonTreeDecoder, 'JsonTreeDecoder', classMeta, AbstractJsonTreeDecoder);\n setMetadataFor(JsonTreeListDecoder, 'JsonTreeListDecoder', classMeta, AbstractJsonTreeDecoder);\n setMetadataFor(JsonPrimitiveDecoder, 'JsonPrimitiveDecoder', classMeta, AbstractJsonTreeDecoder);\n setMetadataFor(JsonTreeMapDecoder, 'JsonTreeMapDecoder', classMeta, JsonTreeDecoder);\n setMetadataFor(AbstractJsonTreeEncoder, 'AbstractJsonTreeEncoder', classMeta, NamedValueEncoder, [NamedValueEncoder, JsonEncoder]);\n setMetadataFor(JsonTreeEncoder, 'JsonTreeEncoder', classMeta, AbstractJsonTreeEncoder);\n setMetadataFor(AbstractJsonTreeEncoder$inlineUnsignedNumberEncoder$1, VOID, classMeta, AbstractEncoder);\n setMetadataFor(AbstractJsonTreeEncoder$inlineUnquotedLiteralEncoder$1, VOID, classMeta, AbstractEncoder);\n setMetadataFor(JsonPrimitiveEncoder, 'JsonPrimitiveEncoder', classMeta, AbstractJsonTreeEncoder);\n setMetadataFor(JsonTreeListEncoder, 'JsonTreeListEncoder', classMeta, AbstractJsonTreeEncoder);\n setMetadataFor(JsonTreeMapEncoder, 'JsonTreeMapEncoder', classMeta, JsonTreeEncoder);\n setMetadataFor(WriteMode, 'WriteMode', classMeta, Enum);\n setMetadataFor(AbstractJsonLexer, 'AbstractJsonLexer', classMeta);\n setMetadataFor(CharMappings, 'CharMappings', objectMeta);\n setMetadataFor(StringJsonLexer, 'StringJsonLexer', classMeta, AbstractJsonLexer);\n setMetadataFor(JsonToStringWriter, 'JsonToStringWriter', classMeta, VOID, VOID, JsonToStringWriter);\n //endregion\n function Default() {\n Default_instance = this;\n Json.call(this, new JsonConfiguration(), EmptySerializersModule());\n }\n var Default_instance;\n function Default_getInstance() {\n if (Default_instance == null)\n new Default();\n return Default_instance;\n }\n function Json(configuration, serializersModule) {\n Default_getInstance();\n this.f15_1 = configuration;\n this.g15_1 = serializersModule;\n this.h15_1 = new DescriptorSchemaCache();\n }\n protoOf(Json).co = function () {\n return this.g15_1;\n };\n protoOf(Json).i15 = function (serializer, value) {\n var result = new JsonToStringWriter();\n try {\n encodeByWriter(this, result, serializer, value);\n return result.toString();\n }finally {\n result.o15();\n }\n };\n protoOf(Json).j15 = function (deserializer, string) {\n var lexer = new StringJsonLexer(string);\n var input = new StreamingJsonDecoder(this, WriteMode_OBJ_getInstance(), lexer, deserializer.ok(), null);\n var result = input.mn(deserializer);\n lexer.b16();\n return result;\n };\n protoOf(Json).k15 = function (serializer, value) {\n return writeJson(this, value, serializer);\n };\n protoOf(Json).l15 = function (deserializer, element) {\n return readJson(this, element, deserializer);\n };\n protoOf(Json).m15 = function (string) {\n return this.j15(JsonElementSerializer_getInstance(), string);\n };\n function Json_0(from, builderAction) {\n from = from === VOID ? Default_getInstance() : from;\n var builder = new JsonBuilder(from);\n builderAction(builder);\n var conf = builder.et();\n return new JsonImpl(conf, builder.s16_1);\n }\n function JsonBuilder(json) {\n this.c16_1 = json.f15_1.t16_1;\n this.d16_1 = json.f15_1.y16_1;\n this.e16_1 = json.f15_1.u16_1;\n this.f16_1 = json.f15_1.v16_1;\n this.g16_1 = json.f15_1.w16_1;\n this.h16_1 = json.f15_1.x16_1;\n this.i16_1 = json.f15_1.z16_1;\n this.j16_1 = json.f15_1.a17_1;\n this.k16_1 = json.f15_1.b17_1;\n this.l16_1 = json.f15_1.c17_1;\n this.m16_1 = json.f15_1.i17_1;\n this.n16_1 = json.f15_1.d17_1;\n this.o16_1 = json.f15_1.e17_1;\n this.p16_1 = json.f15_1.f17_1;\n this.q16_1 = json.f15_1.g17_1;\n this.r16_1 = json.f15_1.h17_1;\n this.s16_1 = json.co();\n }\n protoOf(JsonBuilder).et = function () {\n if (this.k16_1) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.l16_1 === 'type')) {\n // Inline function 'kotlinx.serialization.json.JsonBuilder.build.' call\n var message = 'Class discriminator should not be specified when array polymorphism is specified';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!this.m16_1.equals(ClassDiscriminatorMode_POLYMORPHIC_getInstance())) {\n // Inline function 'kotlinx.serialization.json.JsonBuilder.build.' call\n var message_0 = 'useArrayPolymorphism option can only be used if classDiscriminatorMode in a default POLYMORPHIC state.';\n throw IllegalArgumentException_init_$Create$(toString(message_0));\n }\n }\n if (!this.h16_1) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.i16_1 === ' ')) {\n // Inline function 'kotlinx.serialization.json.JsonBuilder.build.' call\n var message_1 = 'Indent should not be specified when default printing mode is used';\n throw IllegalArgumentException_init_$Create$(toString(message_1));\n }\n } else if (!(this.i16_1 === ' ')) {\n var tmp$ret$4;\n $l$block: {\n // Inline function 'kotlin.text.all' call\n var indexedObject = this.i16_1;\n var inductionVariable = 0;\n while (inductionVariable < charSequenceLength(indexedObject)) {\n var element = charSequenceGet(indexedObject, inductionVariable);\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlinx.serialization.json.JsonBuilder.build.' call\n if (!(((element === _Char___init__impl__6a9atx(32) ? true : element === _Char___init__impl__6a9atx(9)) ? true : element === _Char___init__impl__6a9atx(13)) ? true : element === _Char___init__impl__6a9atx(10))) {\n tmp$ret$4 = false;\n break $l$block;\n }\n }\n tmp$ret$4 = true;\n }\n var allWhitespaces = tmp$ret$4;\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!allWhitespaces) {\n // Inline function 'kotlinx.serialization.json.JsonBuilder.build.' call\n var message_2 = 'Only whitespace, tab, newline and carriage return are allowed as pretty print symbols. Had ' + this.i16_1;\n throw IllegalArgumentException_init_$Create$(toString(message_2));\n }\n }\n return new JsonConfiguration(this.c16_1, this.e16_1, this.f16_1, this.g16_1, this.h16_1, this.d16_1, this.i16_1, this.j16_1, this.k16_1, this.l16_1, this.n16_1, this.o16_1, this.p16_1, this.q16_1, this.r16_1, this.m16_1);\n };\n function validateConfiguration($this) {\n if (equals($this.co(), EmptySerializersModule()))\n return Unit_instance;\n var collector = new PolymorphismValidator($this.f15_1.b17_1, $this.f15_1.c17_1);\n $this.co().o14(collector);\n }\n function JsonImpl(configuration, module_0) {\n Json.call(this, configuration, module_0);\n validateConfiguration(this);\n }\n function JsonClassDiscriminator() {\n }\n function JsonNames() {\n }\n function JsonConfiguration(encodeDefaults, ignoreUnknownKeys, isLenient, allowStructuredMapKeys, prettyPrint, explicitNulls, prettyPrintIndent, coerceInputValues, useArrayPolymorphism, classDiscriminator, allowSpecialFloatingPointValues, useAlternativeNames, namingStrategy, decodeEnumsCaseInsensitive, allowTrailingComma, classDiscriminatorMode) {\n encodeDefaults = encodeDefaults === VOID ? false : encodeDefaults;\n ignoreUnknownKeys = ignoreUnknownKeys === VOID ? false : ignoreUnknownKeys;\n isLenient = isLenient === VOID ? false : isLenient;\n allowStructuredMapKeys = allowStructuredMapKeys === VOID ? false : allowStructuredMapKeys;\n prettyPrint = prettyPrint === VOID ? false : prettyPrint;\n explicitNulls = explicitNulls === VOID ? true : explicitNulls;\n prettyPrintIndent = prettyPrintIndent === VOID ? ' ' : prettyPrintIndent;\n coerceInputValues = coerceInputValues === VOID ? false : coerceInputValues;\n useArrayPolymorphism = useArrayPolymorphism === VOID ? false : useArrayPolymorphism;\n classDiscriminator = classDiscriminator === VOID ? 'type' : classDiscriminator;\n allowSpecialFloatingPointValues = allowSpecialFloatingPointValues === VOID ? false : allowSpecialFloatingPointValues;\n useAlternativeNames = useAlternativeNames === VOID ? true : useAlternativeNames;\n namingStrategy = namingStrategy === VOID ? null : namingStrategy;\n decodeEnumsCaseInsensitive = decodeEnumsCaseInsensitive === VOID ? false : decodeEnumsCaseInsensitive;\n allowTrailingComma = allowTrailingComma === VOID ? false : allowTrailingComma;\n classDiscriminatorMode = classDiscriminatorMode === VOID ? ClassDiscriminatorMode_POLYMORPHIC_getInstance() : classDiscriminatorMode;\n this.t16_1 = encodeDefaults;\n this.u16_1 = ignoreUnknownKeys;\n this.v16_1 = isLenient;\n this.w16_1 = allowStructuredMapKeys;\n this.x16_1 = prettyPrint;\n this.y16_1 = explicitNulls;\n this.z16_1 = prettyPrintIndent;\n this.a17_1 = coerceInputValues;\n this.b17_1 = useArrayPolymorphism;\n this.c17_1 = classDiscriminator;\n this.d17_1 = allowSpecialFloatingPointValues;\n this.e17_1 = useAlternativeNames;\n this.f17_1 = namingStrategy;\n this.g17_1 = decodeEnumsCaseInsensitive;\n this.h17_1 = allowTrailingComma;\n this.i17_1 = classDiscriminatorMode;\n }\n protoOf(JsonConfiguration).toString = function () {\n return 'JsonConfiguration(encodeDefaults=' + this.t16_1 + ', ignoreUnknownKeys=' + this.u16_1 + ', isLenient=' + this.v16_1 + ', ' + ('allowStructuredMapKeys=' + this.w16_1 + ', prettyPrint=' + this.x16_1 + ', explicitNulls=' + this.y16_1 + ', ') + (\"prettyPrintIndent='\" + this.z16_1 + \"', coerceInputValues=\" + this.a17_1 + ', useArrayPolymorphism=' + this.b17_1 + ', ') + (\"classDiscriminator='\" + this.c17_1 + \"', allowSpecialFloatingPointValues=\" + this.d17_1 + ', ') + ('useAlternativeNames=' + this.e17_1 + ', namingStrategy=' + this.f17_1 + ', decodeEnumsCaseInsensitive=' + this.g17_1 + ', ') + ('allowTrailingComma=' + this.h17_1 + ', classDiscriminatorMode=' + this.i17_1 + ')');\n };\n var ClassDiscriminatorMode_NONE_instance;\n var ClassDiscriminatorMode_ALL_JSON_OBJECTS_instance;\n var ClassDiscriminatorMode_POLYMORPHIC_instance;\n var ClassDiscriminatorMode_entriesInitialized;\n function ClassDiscriminatorMode_initEntries() {\n if (ClassDiscriminatorMode_entriesInitialized)\n return Unit_instance;\n ClassDiscriminatorMode_entriesInitialized = true;\n ClassDiscriminatorMode_NONE_instance = new ClassDiscriminatorMode('NONE', 0);\n ClassDiscriminatorMode_ALL_JSON_OBJECTS_instance = new ClassDiscriminatorMode('ALL_JSON_OBJECTS', 1);\n ClassDiscriminatorMode_POLYMORPHIC_instance = new ClassDiscriminatorMode('POLYMORPHIC', 2);\n }\n function ClassDiscriminatorMode(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function ClassDiscriminatorMode_NONE_getInstance() {\n ClassDiscriminatorMode_initEntries();\n return ClassDiscriminatorMode_NONE_instance;\n }\n function ClassDiscriminatorMode_POLYMORPHIC_getInstance() {\n ClassDiscriminatorMode_initEntries();\n return ClassDiscriminatorMode_POLYMORPHIC_instance;\n }\n function JsonDecoder() {\n }\n function get_jsonUnquotedLiteralDescriptor() {\n _init_properties_JsonElement_kt__7cbdc2();\n return jsonUnquotedLiteralDescriptor;\n }\n var jsonUnquotedLiteralDescriptor;\n function Companion() {\n }\n protoOf(Companion).l17 = function () {\n return JsonElementSerializer_getInstance();\n };\n var Companion_instance_0;\n function Companion_getInstance_4() {\n return Companion_instance_0;\n }\n function JsonElement() {\n }\n function Companion_0() {\n }\n var Companion_instance_1;\n function Companion_getInstance_5() {\n return Companion_instance_1;\n }\n function JsonObject$toString$lambda(_name_for_destructuring_parameter_0__wldtmu) {\n // Inline function 'kotlin.collections.component1' call\n var k = _name_for_destructuring_parameter_0__wldtmu.t2();\n // Inline function 'kotlin.collections.component2' call\n var v = _name_for_destructuring_parameter_0__wldtmu.u2();\n // Inline function 'kotlin.text.buildString' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.apply' call\n var this_0 = StringBuilder_init_$Create$();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.json.JsonObject.toString..' call\n printQuoted(this_0, k);\n this_0.z5(_Char___init__impl__6a9atx(58));\n this_0.x5(v);\n return this_0.toString();\n }\n function JsonObject(content) {\n JsonElement.call(this);\n this.m17_1 = content;\n }\n protoOf(JsonObject).q2 = function () {\n return this.m17_1.q2();\n };\n protoOf(JsonObject).o2 = function () {\n return this.m17_1.o2();\n };\n protoOf(JsonObject).n = function () {\n return this.m17_1.n();\n };\n protoOf(JsonObject).p2 = function () {\n return this.m17_1.p2();\n };\n protoOf(JsonObject).n17 = function (key) {\n return this.m17_1.y2(key);\n };\n protoOf(JsonObject).y2 = function (key) {\n if (!(!(key == null) ? typeof key === 'string' : false))\n return false;\n return this.n17((!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE());\n };\n protoOf(JsonObject).o17 = function (key) {\n return this.m17_1.b3(key);\n };\n protoOf(JsonObject).b3 = function (key) {\n if (!(!(key == null) ? typeof key === 'string' : false))\n return null;\n return this.o17((!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE());\n };\n protoOf(JsonObject).b1 = function () {\n return this.m17_1.b1();\n };\n protoOf(JsonObject).equals = function (other) {\n return equals(this.m17_1, other);\n };\n protoOf(JsonObject).hashCode = function () {\n return hashCode(this.m17_1);\n };\n protoOf(JsonObject).toString = function () {\n var tmp = this.m17_1.q2();\n return joinToString(tmp, ',', '{', '}', VOID, VOID, JsonObject$toString$lambda);\n };\n function Companion_1() {\n }\n var Companion_instance_2;\n function Companion_getInstance_6() {\n return Companion_instance_2;\n }\n function JsonPrimitive() {\n JsonElement.call(this);\n }\n protoOf(JsonPrimitive).toString = function () {\n return this.p17();\n };\n function get_jsonPrimitive(_this__u8e3s4) {\n _init_properties_JsonElement_kt__7cbdc2();\n var tmp0_elvis_lhs = _this__u8e3s4 instanceof JsonPrimitive ? _this__u8e3s4 : null;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n error(_this__u8e3s4, 'JsonPrimitive');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function get_double(_this__u8e3s4) {\n _init_properties_JsonElement_kt__7cbdc2();\n return toDouble(_this__u8e3s4.p17());\n }\n function Companion_2() {\n }\n var Companion_instance_3;\n function Companion_getInstance_7() {\n return Companion_instance_3;\n }\n function JsonArray(content) {\n JsonElement.call(this);\n this.q17_1 = content;\n }\n protoOf(JsonArray).n = function () {\n return this.q17_1.n();\n };\n protoOf(JsonArray).r17 = function (element) {\n return this.q17_1.p(element);\n };\n protoOf(JsonArray).p = function (element) {\n if (!(element instanceof JsonElement))\n return false;\n return this.r17(element instanceof JsonElement ? element : THROW_CCE());\n };\n protoOf(JsonArray).s17 = function (elements) {\n return this.q17_1.a1(elements);\n };\n protoOf(JsonArray).a1 = function (elements) {\n return this.s17(elements);\n };\n protoOf(JsonArray).f1 = function (index) {\n return this.q17_1.f1(index);\n };\n protoOf(JsonArray).t17 = function (element) {\n return this.q17_1.a2(element);\n };\n protoOf(JsonArray).a2 = function (element) {\n if (!(element instanceof JsonElement))\n return -1;\n return this.t17(element instanceof JsonElement ? element : THROW_CCE());\n };\n protoOf(JsonArray).b1 = function () {\n return this.q17_1.b1();\n };\n protoOf(JsonArray).t = function () {\n return this.q17_1.t();\n };\n protoOf(JsonArray).d2 = function (index) {\n return this.q17_1.d2(index);\n };\n protoOf(JsonArray).equals = function (other) {\n return equals(this.q17_1, other);\n };\n protoOf(JsonArray).hashCode = function () {\n return hashCode(this.q17_1);\n };\n protoOf(JsonArray).toString = function () {\n return joinToString(this.q17_1, ',', '[', ']');\n };\n function get_jsonArray(_this__u8e3s4) {\n _init_properties_JsonElement_kt__7cbdc2();\n var tmp0_elvis_lhs = _this__u8e3s4 instanceof JsonArray ? _this__u8e3s4 : null;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n error(_this__u8e3s4, 'JsonArray');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function get_jsonObject(_this__u8e3s4) {\n _init_properties_JsonElement_kt__7cbdc2();\n var tmp0_elvis_lhs = _this__u8e3s4 instanceof JsonObject ? _this__u8e3s4 : null;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n error(_this__u8e3s4, 'JsonObject');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function get_doubleOrNull(_this__u8e3s4) {\n _init_properties_JsonElement_kt__7cbdc2();\n return toDoubleOrNull(_this__u8e3s4.p17());\n }\n function get_contentOrNull(_this__u8e3s4) {\n _init_properties_JsonElement_kt__7cbdc2();\n var tmp;\n if (_this__u8e3s4 instanceof JsonNull) {\n tmp = null;\n } else {\n tmp = _this__u8e3s4.p17();\n }\n return tmp;\n }\n function error(_this__u8e3s4, element) {\n _init_properties_JsonElement_kt__7cbdc2();\n throw IllegalArgumentException_init_$Create$('Element ' + getKClassFromExpression(_this__u8e3s4) + ' is not a ' + element);\n }\n function _get_$cachedSerializer__te6jhj($this) {\n return $this.v17_1.u2();\n }\n function JsonNull$_anonymous__enib48() {\n return JsonNullSerializer_getInstance();\n }\n function JsonNull() {\n JsonNull_instance = this;\n JsonPrimitive.call(this);\n this.u17_1 = 'null';\n var tmp = this;\n var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();\n tmp.v17_1 = lazy(tmp_0, JsonNull$_anonymous__enib48);\n }\n protoOf(JsonNull).p17 = function () {\n return this.u17_1;\n };\n protoOf(JsonNull).l17 = function () {\n return _get_$cachedSerializer__te6jhj(this);\n };\n protoOf(JsonNull).ew = function (typeParamsSerializers) {\n return this.l17();\n };\n var JsonNull_instance;\n function JsonNull_getInstance() {\n if (JsonNull_instance == null)\n new JsonNull();\n return JsonNull_instance;\n }\n function JsonLiteral(body, isString, coerceToInlineType) {\n coerceToInlineType = coerceToInlineType === VOID ? null : coerceToInlineType;\n JsonPrimitive.call(this);\n this.w17_1 = isString;\n this.x17_1 = coerceToInlineType;\n this.y17_1 = toString(body);\n if (!(this.x17_1 == null)) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!this.x17_1.tl()) {\n // Inline function 'kotlin.require.' call\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n }\n }\n protoOf(JsonLiteral).p17 = function () {\n return this.y17_1;\n };\n protoOf(JsonLiteral).toString = function () {\n var tmp;\n if (this.w17_1) {\n // Inline function 'kotlin.text.buildString' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.apply' call\n var this_0 = StringBuilder_init_$Create$();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.json.JsonLiteral.toString.' call\n printQuoted(this_0, this.y17_1);\n tmp = this_0.toString();\n } else {\n tmp = this.y17_1;\n }\n return tmp;\n };\n protoOf(JsonLiteral).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof JsonLiteral))\n THROW_CCE();\n if (!(this.w17_1 === other.w17_1))\n return false;\n if (!(this.y17_1 === other.y17_1))\n return false;\n return true;\n };\n protoOf(JsonLiteral).hashCode = function () {\n var result = getBooleanHashCode(this.w17_1);\n result = imul(31, result) + getStringHashCode(this.y17_1) | 0;\n return result;\n };\n function JsonPrimitive_0(value) {\n _init_properties_JsonElement_kt__7cbdc2();\n if (value == null)\n return JsonNull_getInstance();\n return new JsonLiteral(value, false);\n }\n function JsonPrimitive_1(value) {\n _init_properties_JsonElement_kt__7cbdc2();\n if (value == null)\n return JsonNull_getInstance();\n return new JsonLiteral(value, false);\n }\n function JsonPrimitive_2(value) {\n _init_properties_JsonElement_kt__7cbdc2();\n if (value == null)\n return JsonNull_getInstance();\n return new JsonLiteral(value, true);\n }\n function get_booleanOrNull(_this__u8e3s4) {\n _init_properties_JsonElement_kt__7cbdc2();\n return toBooleanStrictOrNull_0(_this__u8e3s4.p17());\n }\n function get_int(_this__u8e3s4) {\n _init_properties_JsonElement_kt__7cbdc2();\n // Inline function 'kotlinx.serialization.json.mapExceptions' call\n var tmp;\n try {\n // Inline function 'kotlinx.serialization.json..' call\n tmp = (new StringJsonLexer(_this__u8e3s4.p17())).z17();\n } catch ($p) {\n var tmp_0;\n if ($p instanceof JsonDecodingException) {\n var e = $p;\n throw NumberFormatException_init_$Create$(e.message);\n } else {\n throw $p;\n }\n }\n var result = tmp;\n // Inline function 'kotlin.ranges.contains' call\n var this_0 = numberRangeToNumber(IntCompanionObject_instance.MIN_VALUE, IntCompanionObject_instance.MAX_VALUE);\n if (!contains(isInterface(this_0, ClosedRange) ? this_0 : THROW_CCE(), result))\n throw NumberFormatException_init_$Create$(_this__u8e3s4.p17() + ' is not an Int');\n return result.wa();\n }\n function get_long(_this__u8e3s4) {\n _init_properties_JsonElement_kt__7cbdc2();\n // Inline function 'kotlinx.serialization.json.mapExceptions' call\n var tmp;\n try {\n // Inline function 'kotlinx.serialization.json..' call\n tmp = (new StringJsonLexer(_this__u8e3s4.p17())).z17();\n } catch ($p) {\n var tmp_0;\n if ($p instanceof JsonDecodingException) {\n var e = $p;\n throw NumberFormatException_init_$Create$(e.message);\n } else {\n throw $p;\n }\n }\n return tmp;\n }\n function get_float(_this__u8e3s4) {\n _init_properties_JsonElement_kt__7cbdc2();\n // Inline function 'kotlin.text.toFloat' call\n var this_0 = _this__u8e3s4.p17();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return toDouble(this_0);\n }\n var properties_initialized_JsonElement_kt_abxy8s;\n function _init_properties_JsonElement_kt__7cbdc2() {\n if (!properties_initialized_JsonElement_kt_abxy8s) {\n properties_initialized_JsonElement_kt_abxy8s = true;\n jsonUnquotedLiteralDescriptor = InlinePrimitiveDescriptor('kotlinx.serialization.json.JsonUnquotedLiteral', serializer(StringCompanionObject_instance));\n }\n }\n function JsonElementSerializer$descriptor$lambda($this$buildSerialDescriptor) {\n $this$buildSerialDescriptor.cl('JsonPrimitive', defer(JsonElementSerializer$descriptor$lambda$lambda));\n $this$buildSerialDescriptor.cl('JsonNull', defer(JsonElementSerializer$descriptor$lambda$lambda_0));\n $this$buildSerialDescriptor.cl('JsonLiteral', defer(JsonElementSerializer$descriptor$lambda$lambda_1));\n $this$buildSerialDescriptor.cl('JsonObject', defer(JsonElementSerializer$descriptor$lambda$lambda_2));\n $this$buildSerialDescriptor.cl('JsonArray', defer(JsonElementSerializer$descriptor$lambda$lambda_3));\n return Unit_instance;\n }\n function JsonElementSerializer$descriptor$lambda$lambda() {\n return JsonPrimitiveSerializer_getInstance().a18_1;\n }\n function JsonElementSerializer$descriptor$lambda$lambda_0() {\n return JsonNullSerializer_getInstance().b18_1;\n }\n function JsonElementSerializer$descriptor$lambda$lambda_1() {\n return JsonLiteralSerializer_getInstance().c18_1;\n }\n function JsonElementSerializer$descriptor$lambda$lambda_2() {\n return JsonObjectSerializer_getInstance().d18_1;\n }\n function JsonElementSerializer$descriptor$lambda$lambda_3() {\n return JsonArraySerializer_getInstance().e18_1;\n }\n function JsonElementSerializer() {\n JsonElementSerializer_instance = this;\n var tmp = this;\n var tmp_0 = SEALED_getInstance();\n tmp.f18_1 = buildSerialDescriptor('kotlinx.serialization.json.JsonElement', tmp_0, [], JsonElementSerializer$descriptor$lambda);\n }\n protoOf(JsonElementSerializer).ok = function () {\n return this.f18_1;\n };\n protoOf(JsonElementSerializer).g18 = function (encoder, value) {\n verify(encoder);\n if (value instanceof JsonPrimitive) {\n encoder.fp(JsonPrimitiveSerializer_getInstance(), value);\n } else {\n if (value instanceof JsonObject) {\n encoder.fp(JsonObjectSerializer_getInstance(), value);\n } else {\n if (value instanceof JsonArray) {\n encoder.fp(JsonArraySerializer_getInstance(), value);\n }\n }\n }\n };\n protoOf(JsonElementSerializer).pk = function (encoder, value) {\n return this.g18(encoder, value instanceof JsonElement ? value : THROW_CCE());\n };\n protoOf(JsonElementSerializer).qk = function (decoder) {\n var input = asJsonDecoder(decoder);\n return input.k17();\n };\n var JsonElementSerializer_instance;\n function JsonElementSerializer_getInstance() {\n if (JsonElementSerializer_instance == null)\n new JsonElementSerializer();\n return JsonElementSerializer_instance;\n }\n function JsonObjectDescriptor() {\n JsonObjectDescriptor_instance = this;\n this.h18_1 = MapSerializer(serializer(StringCompanionObject_instance), JsonElementSerializer_getInstance()).ok();\n this.i18_1 = 'kotlinx.serialization.json.JsonObject';\n }\n protoOf(JsonObjectDescriptor).rl = function () {\n return this.h18_1.rl();\n };\n protoOf(JsonObjectDescriptor).sl = function () {\n return this.h18_1.sl();\n };\n protoOf(JsonObjectDescriptor).tl = function () {\n return this.h18_1.tl();\n };\n protoOf(JsonObjectDescriptor).ml = function () {\n return this.h18_1.ml();\n };\n protoOf(JsonObjectDescriptor).ul = function () {\n return this.h18_1.ul();\n };\n protoOf(JsonObjectDescriptor).vl = function (index) {\n return this.h18_1.vl(index);\n };\n protoOf(JsonObjectDescriptor).wl = function (index) {\n return this.h18_1.wl(index);\n };\n protoOf(JsonObjectDescriptor).xl = function (name) {\n return this.h18_1.xl(name);\n };\n protoOf(JsonObjectDescriptor).yl = function (index) {\n return this.h18_1.yl(index);\n };\n protoOf(JsonObjectDescriptor).zl = function (index) {\n return this.h18_1.zl(index);\n };\n protoOf(JsonObjectDescriptor).ql = function () {\n return this.i18_1;\n };\n var JsonObjectDescriptor_instance;\n function JsonObjectDescriptor_getInstance() {\n if (JsonObjectDescriptor_instance == null)\n new JsonObjectDescriptor();\n return JsonObjectDescriptor_instance;\n }\n function JsonObjectSerializer() {\n JsonObjectSerializer_instance = this;\n this.d18_1 = JsonObjectDescriptor_getInstance();\n }\n protoOf(JsonObjectSerializer).ok = function () {\n return this.d18_1;\n };\n protoOf(JsonObjectSerializer).j18 = function (encoder, value) {\n verify(encoder);\n MapSerializer(serializer(StringCompanionObject_instance), JsonElementSerializer_getInstance()).pk(encoder, value);\n };\n protoOf(JsonObjectSerializer).pk = function (encoder, value) {\n return this.j18(encoder, value instanceof JsonObject ? value : THROW_CCE());\n };\n protoOf(JsonObjectSerializer).qk = function (decoder) {\n verify_0(decoder);\n return new JsonObject(MapSerializer(serializer(StringCompanionObject_instance), JsonElementSerializer_getInstance()).qk(decoder));\n };\n var JsonObjectSerializer_instance;\n function JsonObjectSerializer_getInstance() {\n if (JsonObjectSerializer_instance == null)\n new JsonObjectSerializer();\n return JsonObjectSerializer_instance;\n }\n function JsonPrimitiveSerializer() {\n JsonPrimitiveSerializer_instance = this;\n this.a18_1 = buildSerialDescriptor('kotlinx.serialization.json.JsonPrimitive', STRING_getInstance(), []);\n }\n protoOf(JsonPrimitiveSerializer).ok = function () {\n return this.a18_1;\n };\n protoOf(JsonPrimitiveSerializer).k18 = function (encoder, value) {\n verify(encoder);\n var tmp;\n if (value instanceof JsonNull) {\n encoder.fp(JsonNullSerializer_getInstance(), JsonNull_getInstance());\n tmp = Unit_instance;\n } else {\n var tmp_0 = JsonLiteralSerializer_getInstance();\n encoder.fp(tmp_0, value instanceof JsonLiteral ? value : THROW_CCE());\n tmp = Unit_instance;\n }\n return tmp;\n };\n protoOf(JsonPrimitiveSerializer).pk = function (encoder, value) {\n return this.k18(encoder, value instanceof JsonPrimitive ? value : THROW_CCE());\n };\n protoOf(JsonPrimitiveSerializer).qk = function (decoder) {\n var result = asJsonDecoder(decoder).k17();\n if (!(result instanceof JsonPrimitive))\n throw JsonDecodingException_0(-1, 'Unexpected JSON element, expected JsonPrimitive, had ' + getKClassFromExpression(result), toString(result));\n return result;\n };\n var JsonPrimitiveSerializer_instance;\n function JsonPrimitiveSerializer_getInstance() {\n if (JsonPrimitiveSerializer_instance == null)\n new JsonPrimitiveSerializer();\n return JsonPrimitiveSerializer_instance;\n }\n function JsonArrayDescriptor() {\n JsonArrayDescriptor_instance = this;\n this.l18_1 = ListSerializer(JsonElementSerializer_getInstance()).ok();\n this.m18_1 = 'kotlinx.serialization.json.JsonArray';\n }\n protoOf(JsonArrayDescriptor).rl = function () {\n return this.l18_1.rl();\n };\n protoOf(JsonArrayDescriptor).sl = function () {\n return this.l18_1.sl();\n };\n protoOf(JsonArrayDescriptor).tl = function () {\n return this.l18_1.tl();\n };\n protoOf(JsonArrayDescriptor).ml = function () {\n return this.l18_1.ml();\n };\n protoOf(JsonArrayDescriptor).ul = function () {\n return this.l18_1.ul();\n };\n protoOf(JsonArrayDescriptor).vl = function (index) {\n return this.l18_1.vl(index);\n };\n protoOf(JsonArrayDescriptor).wl = function (index) {\n return this.l18_1.wl(index);\n };\n protoOf(JsonArrayDescriptor).xl = function (name) {\n return this.l18_1.xl(name);\n };\n protoOf(JsonArrayDescriptor).yl = function (index) {\n return this.l18_1.yl(index);\n };\n protoOf(JsonArrayDescriptor).zl = function (index) {\n return this.l18_1.zl(index);\n };\n protoOf(JsonArrayDescriptor).ql = function () {\n return this.m18_1;\n };\n var JsonArrayDescriptor_instance;\n function JsonArrayDescriptor_getInstance() {\n if (JsonArrayDescriptor_instance == null)\n new JsonArrayDescriptor();\n return JsonArrayDescriptor_instance;\n }\n function JsonArraySerializer() {\n JsonArraySerializer_instance = this;\n this.e18_1 = JsonArrayDescriptor_getInstance();\n }\n protoOf(JsonArraySerializer).ok = function () {\n return this.e18_1;\n };\n protoOf(JsonArraySerializer).n18 = function (encoder, value) {\n verify(encoder);\n ListSerializer(JsonElementSerializer_getInstance()).pk(encoder, value);\n };\n protoOf(JsonArraySerializer).pk = function (encoder, value) {\n return this.n18(encoder, value instanceof JsonArray ? value : THROW_CCE());\n };\n protoOf(JsonArraySerializer).qk = function (decoder) {\n verify_0(decoder);\n return new JsonArray(ListSerializer(JsonElementSerializer_getInstance()).qk(decoder));\n };\n var JsonArraySerializer_instance;\n function JsonArraySerializer_getInstance() {\n if (JsonArraySerializer_instance == null)\n new JsonArraySerializer();\n return JsonArraySerializer_instance;\n }\n function JsonNullSerializer() {\n JsonNullSerializer_instance = this;\n this.b18_1 = buildSerialDescriptor('kotlinx.serialization.json.JsonNull', ENUM_getInstance(), []);\n }\n protoOf(JsonNullSerializer).ok = function () {\n return this.b18_1;\n };\n protoOf(JsonNullSerializer).o18 = function (encoder, value) {\n verify(encoder);\n encoder.io();\n };\n protoOf(JsonNullSerializer).pk = function (encoder, value) {\n return this.o18(encoder, value instanceof JsonNull ? value : THROW_CCE());\n };\n protoOf(JsonNullSerializer).qk = function (decoder) {\n verify_0(decoder);\n if (decoder.ym()) {\n throw new JsonDecodingException(\"Expected 'null' literal\");\n }\n decoder.zm();\n return JsonNull_getInstance();\n };\n var JsonNullSerializer_instance;\n function JsonNullSerializer_getInstance() {\n if (JsonNullSerializer_instance == null)\n new JsonNullSerializer();\n return JsonNullSerializer_instance;\n }\n function defer(deferred) {\n return new defer$1(deferred);\n }\n function JsonLiteralSerializer() {\n JsonLiteralSerializer_instance = this;\n this.c18_1 = PrimitiveSerialDescriptor('kotlinx.serialization.json.JsonLiteral', STRING_getInstance());\n }\n protoOf(JsonLiteralSerializer).ok = function () {\n return this.c18_1;\n };\n protoOf(JsonLiteralSerializer).p18 = function (encoder, value) {\n verify(encoder);\n if (value.w17_1) {\n return encoder.ro(value.y17_1);\n }\n if (!(value.x17_1 == null)) {\n return encoder.to(value.x17_1).ro(value.y17_1);\n }\n var tmp0_safe_receiver = toLongOrNull(value.y17_1);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return encoder.no(tmp0_safe_receiver);\n }\n var tmp1_safe_receiver = toULongOrNull(value.y17_1);\n var tmp = tmp1_safe_receiver;\n if ((tmp == null ? null : new ULong(tmp)) == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n var tmp_0 = tmp1_safe_receiver;\n // Inline function 'kotlin.contracts.contract' call\n var it = (tmp_0 == null ? null : new ULong(tmp_0)).wj_1;\n var tmp_1 = encoder.to(serializer_0(Companion_getInstance()).ok());\n // Inline function 'kotlin.ULong.toLong' call\n var tmp$ret$1 = _ULong___get_data__impl__fggpzb(it);\n tmp_1.no(tmp$ret$1);\n return Unit_instance;\n }\n var tmp2_safe_receiver = toDoubleOrNull(value.y17_1);\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return encoder.po(tmp2_safe_receiver);\n }\n var tmp3_safe_receiver = toBooleanStrictOrNull(value.y17_1);\n if (tmp3_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return encoder.jo(tmp3_safe_receiver);\n }\n encoder.ro(value.y17_1);\n };\n protoOf(JsonLiteralSerializer).pk = function (encoder, value) {\n return this.p18(encoder, value instanceof JsonLiteral ? value : THROW_CCE());\n };\n protoOf(JsonLiteralSerializer).qk = function (decoder) {\n var result = asJsonDecoder(decoder).k17();\n if (!(result instanceof JsonLiteral))\n throw JsonDecodingException_0(-1, 'Unexpected JSON element, expected JsonLiteral, had ' + getKClassFromExpression(result), toString(result));\n return result;\n };\n var JsonLiteralSerializer_instance;\n function JsonLiteralSerializer_getInstance() {\n if (JsonLiteralSerializer_instance == null)\n new JsonLiteralSerializer();\n return JsonLiteralSerializer_instance;\n }\n function verify(encoder) {\n asJsonEncoder(encoder);\n }\n function asJsonDecoder(_this__u8e3s4) {\n var tmp0_elvis_lhs = isInterface(_this__u8e3s4, JsonDecoder) ? _this__u8e3s4 : null;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw IllegalStateException_init_$Create$('This serializer can be used only with Json format.' + ('Expected Decoder to be JsonDecoder, got ' + getKClassFromExpression(_this__u8e3s4)));\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function verify_0(decoder) {\n asJsonDecoder(decoder);\n }\n function asJsonEncoder(_this__u8e3s4) {\n var tmp0_elvis_lhs = isInterface(_this__u8e3s4, JsonEncoder) ? _this__u8e3s4 : null;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw IllegalStateException_init_$Create$('This serializer can be used only with Json format.' + ('Expected Encoder to be JsonEncoder, got ' + getKClassFromExpression(_this__u8e3s4)));\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function _get_original__l7ku1m($this) {\n // Inline function 'kotlin.getValue' call\n var this_0 = $this.q18_1;\n original$factory();\n return this_0.u2();\n }\n function defer$1($deferred) {\n this.q18_1 = lazy_0($deferred);\n }\n protoOf(defer$1).ql = function () {\n return _get_original__l7ku1m(this).ql();\n };\n protoOf(defer$1).ul = function () {\n return _get_original__l7ku1m(this).ul();\n };\n protoOf(defer$1).sl = function () {\n return _get_original__l7ku1m(this).sl();\n };\n protoOf(defer$1).yl = function (index) {\n return _get_original__l7ku1m(this).yl(index);\n };\n protoOf(defer$1).xl = function (name) {\n return _get_original__l7ku1m(this).xl(name);\n };\n protoOf(defer$1).vl = function (index) {\n return _get_original__l7ku1m(this).vl(index);\n };\n protoOf(defer$1).wl = function (index) {\n return _get_original__l7ku1m(this).wl(index);\n };\n protoOf(defer$1).zl = function (index) {\n return _get_original__l7ku1m(this).zl(index);\n };\n function original$factory() {\n return getPropertyCallableRef('original', 1, KProperty1, function (receiver) {\n return _get_original__l7ku1m(receiver);\n }, null);\n }\n function JsonEncoder() {\n }\n function Composer(writer) {\n this.r18_1 = writer;\n this.s18_1 = true;\n }\n protoOf(Composer).t18 = function () {\n this.s18_1 = true;\n };\n protoOf(Composer).u18 = function () {\n return Unit_instance;\n };\n protoOf(Composer).v18 = function () {\n this.s18_1 = false;\n };\n protoOf(Composer).w18 = function () {\n this.s18_1 = false;\n };\n protoOf(Composer).x18 = function () {\n return Unit_instance;\n };\n protoOf(Composer).y18 = function (v) {\n return this.r18_1.z18(v);\n };\n protoOf(Composer).a19 = function (v) {\n return this.r18_1.b19(v);\n };\n protoOf(Composer).c19 = function (v) {\n return this.r18_1.b19(v.toString());\n };\n protoOf(Composer).d19 = function (v) {\n return this.r18_1.b19(v.toString());\n };\n protoOf(Composer).e19 = function (v) {\n return this.r18_1.f19(toLong(v));\n };\n protoOf(Composer).g19 = function (v) {\n return this.r18_1.f19(toLong(v));\n };\n protoOf(Composer).h19 = function (v) {\n return this.r18_1.f19(toLong(v));\n };\n protoOf(Composer).i19 = function (v) {\n return this.r18_1.f19(v);\n };\n protoOf(Composer).j19 = function (v) {\n return this.r18_1.b19(v.toString());\n };\n protoOf(Composer).k19 = function (value) {\n return this.r18_1.l19(value);\n };\n function Composer_0(sb, json) {\n return json.f15_1.x16_1 ? new ComposerWithPrettyPrint(sb, json) : new Composer(sb);\n }\n function ComposerForUnsignedNumbers(writer, forceQuoting) {\n Composer.call(this, writer);\n this.o19_1 = forceQuoting;\n }\n protoOf(ComposerForUnsignedNumbers).h19 = function (v) {\n if (this.o19_1) {\n // Inline function 'kotlin.toUInt' call\n var tmp$ret$0 = _UInt___init__impl__l7qpdl(v);\n this.k19(UInt__toString_impl_dbgl21(tmp$ret$0));\n } else {\n // Inline function 'kotlin.toUInt' call\n var tmp$ret$1 = _UInt___init__impl__l7qpdl(v);\n this.a19(UInt__toString_impl_dbgl21(tmp$ret$1));\n }\n };\n protoOf(ComposerForUnsignedNumbers).i19 = function (v) {\n if (this.o19_1) {\n // Inline function 'kotlin.toULong' call\n var tmp$ret$0 = _ULong___init__impl__c78o9k(v);\n this.k19(ULong__toString_impl_f9au7k(tmp$ret$0));\n } else {\n // Inline function 'kotlin.toULong' call\n var tmp$ret$1 = _ULong___init__impl__c78o9k(v);\n this.a19(ULong__toString_impl_f9au7k(tmp$ret$1));\n }\n };\n protoOf(ComposerForUnsignedNumbers).e19 = function (v) {\n if (this.o19_1) {\n // Inline function 'kotlin.toUByte' call\n var tmp$ret$0 = _UByte___init__impl__g9hnc4(v);\n this.k19(UByte__toString_impl_v72jg(tmp$ret$0));\n } else {\n // Inline function 'kotlin.toUByte' call\n var tmp$ret$1 = _UByte___init__impl__g9hnc4(v);\n this.a19(UByte__toString_impl_v72jg(tmp$ret$1));\n }\n };\n protoOf(ComposerForUnsignedNumbers).g19 = function (v) {\n if (this.o19_1) {\n // Inline function 'kotlin.toUShort' call\n var tmp$ret$0 = _UShort___init__impl__jigrne(v);\n this.k19(UShort__toString_impl_edaoee(tmp$ret$0));\n } else {\n // Inline function 'kotlin.toUShort' call\n var tmp$ret$1 = _UShort___init__impl__jigrne(v);\n this.a19(UShort__toString_impl_edaoee(tmp$ret$1));\n }\n };\n function ComposerForUnquotedLiterals(writer, forceQuoting) {\n Composer.call(this, writer);\n this.r19_1 = forceQuoting;\n }\n protoOf(ComposerForUnquotedLiterals).k19 = function (value) {\n if (this.r19_1) {\n protoOf(Composer).k19.call(this, value);\n } else {\n protoOf(Composer).a19.call(this, value);\n }\n };\n function ComposerWithPrettyPrint(writer, json) {\n Composer.call(this, writer);\n this.u19_1 = json;\n this.v19_1 = 0;\n }\n protoOf(ComposerWithPrettyPrint).t18 = function () {\n this.s18_1 = true;\n this.v19_1 = this.v19_1 + 1 | 0;\n };\n protoOf(ComposerWithPrettyPrint).u18 = function () {\n this.v19_1 = this.v19_1 - 1 | 0;\n };\n protoOf(ComposerWithPrettyPrint).v18 = function () {\n this.s18_1 = false;\n this.a19('\\n');\n // Inline function 'kotlin.repeat' call\n var times = this.v19_1;\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable = 0;\n if (inductionVariable < times)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlinx.serialization.json.internal.ComposerWithPrettyPrint.nextItem.' call\n this.a19(this.u19_1.f15_1.z16_1);\n }\n while (inductionVariable < times);\n };\n protoOf(ComposerWithPrettyPrint).w18 = function () {\n if (this.s18_1)\n this.s18_1 = false;\n else {\n this.v18();\n }\n };\n protoOf(ComposerWithPrettyPrint).x18 = function () {\n this.y18(_Char___init__impl__6a9atx(32));\n };\n function readIfAbsent($this, descriptor, index) {\n $this.x19_1 = !descriptor.zl(index) ? descriptor.wl(index).ml() : false;\n return $this.x19_1;\n }\n function JsonElementMarker$readIfAbsent$ref($boundThis) {\n var l = function (p0, p1) {\n return readIfAbsent($boundThis, p0, p1);\n };\n l.callableName = 'readIfAbsent';\n return l;\n }\n function JsonElementMarker(descriptor) {\n var tmp = this;\n tmp.w19_1 = new ElementMarker(descriptor, JsonElementMarker$readIfAbsent$ref(this));\n this.x19_1 = false;\n }\n protoOf(JsonElementMarker).st = function (index) {\n this.w19_1.st(index);\n };\n protoOf(JsonElementMarker).tt = function () {\n return this.w19_1.tt();\n };\n function JsonDecodingException(message) {\n JsonException.call(this, message);\n captureStack(this, JsonDecodingException);\n }\n function JsonDecodingException_0(offset, message, input) {\n return JsonDecodingException_1(offset, message + '\\nJSON input: ' + minify(input, offset));\n }\n function invalidTrailingComma(_this__u8e3s4, entity) {\n entity = entity === VOID ? 'object' : entity;\n _this__u8e3s4.y19('Trailing comma before the end of JSON ' + entity, _this__u8e3s4.x15_1 - 1 | 0, \"Trailing commas are non-complaint JSON and not allowed by default. Use 'allowTrailingCommas = true' in 'Json {}' builder to support them.\");\n }\n function throwInvalidFloatingPointDecoded(_this__u8e3s4, result) {\n _this__u8e3s4.z19('Unexpected special floating-point value ' + toString(result) + '. By default, ' + 'non-finite floating point values are prohibited because they do not conform JSON specification', VOID, get_specialFlowingValuesHint());\n }\n function JsonEncodingException(message) {\n JsonException.call(this, message);\n captureStack(this, JsonEncodingException);\n }\n function InvalidKeyKindException(keyDescriptor) {\n return new JsonEncodingException(\"Value of type '\" + keyDescriptor.ql() + \"' can't be used in JSON as a key in the map. \" + (\"It should have either primitive or enum kind, but its kind is '\" + keyDescriptor.ul() + \"'.\\n\") + get_allowStructuredMapKeysHint());\n }\n function InvalidFloatingPointEncoded(value, key, output) {\n return new JsonEncodingException(unexpectedFpErrorMessage(value, key, output));\n }\n function InvalidFloatingPointDecoded(value, key, output) {\n return JsonDecodingException_1(-1, unexpectedFpErrorMessage(value, key, output));\n }\n function JsonDecodingException_1(offset, message) {\n return new JsonDecodingException(offset >= 0 ? 'Unexpected JSON token at offset ' + offset + ': ' + message : message);\n }\n function UnknownKeyException(key, input) {\n return JsonDecodingException_1(-1, \"Encountered an unknown key '\" + key + \"'.\\n\" + (get_ignoreUnknownKeysHint() + '\\n') + ('Current input: ' + minify(input)));\n }\n function JsonException(message) {\n SerializationException_init_$Init$(message, this);\n captureStack(this, JsonException);\n }\n function minify(_this__u8e3s4, offset) {\n offset = offset === VOID ? -1 : offset;\n if (charSequenceLength(_this__u8e3s4) < 200)\n return _this__u8e3s4;\n if (offset === -1) {\n var start = charSequenceLength(_this__u8e3s4) - 60 | 0;\n if (start <= 0)\n return _this__u8e3s4;\n // Inline function 'kotlin.text.substring' call\n var endIndex = charSequenceLength(_this__u8e3s4);\n return '.....' + toString(charSequenceSubSequence(_this__u8e3s4, start, endIndex));\n }\n var start_0 = offset - 30 | 0;\n var end = offset + 30 | 0;\n var prefix = start_0 <= 0 ? '' : '.....';\n var suffix = end >= charSequenceLength(_this__u8e3s4) ? '' : '.....';\n // Inline function 'kotlin.text.substring' call\n var startIndex = coerceAtLeast(start_0, 0);\n var endIndex_0 = coerceAtMost(end, charSequenceLength(_this__u8e3s4));\n return prefix + toString(charSequenceSubSequence(_this__u8e3s4, startIndex, endIndex_0)) + suffix;\n }\n function unexpectedFpErrorMessage(value, key, output) {\n return 'Unexpected special floating-point value ' + toString(value) + ' with key ' + key + '. By default, ' + 'non-finite floating point values are prohibited because they do not conform JSON specification. ' + (get_specialFlowingValuesHint() + '\\n') + ('Current output: ' + minify(output));\n }\n function InvalidFloatingPointEncoded_0(value, output) {\n return new JsonEncodingException('Unexpected special floating-point value ' + toString(value) + '. By default, ' + 'non-finite floating point values are prohibited because they do not conform JSON specification. ' + (get_specialFlowingValuesHint() + '\\n') + ('Current output: ' + minify(output)));\n }\n function get_JsonDeserializationNamesKey() {\n _init_properties_JsonNamesMap_kt__cbbp0k();\n return JsonDeserializationNamesKey;\n }\n var JsonDeserializationNamesKey;\n function get_JsonSerializationNamesKey() {\n _init_properties_JsonNamesMap_kt__cbbp0k();\n return JsonSerializationNamesKey;\n }\n var JsonSerializationNamesKey;\n function getJsonNameIndex(_this__u8e3s4, json, name) {\n _init_properties_JsonNamesMap_kt__cbbp0k();\n if (decodeCaseInsensitive(json, _this__u8e3s4)) {\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$1 = name.toLowerCase();\n return getJsonNameIndexSlowPath(_this__u8e3s4, json, tmp$ret$1);\n }\n var strategy = namingStrategy(_this__u8e3s4, json);\n if (!(strategy == null))\n return getJsonNameIndexSlowPath(_this__u8e3s4, json, name);\n var index = _this__u8e3s4.xl(name);\n if (!(index === -3))\n return index;\n if (!json.f15_1.e17_1)\n return index;\n return getJsonNameIndexSlowPath(_this__u8e3s4, json, name);\n }\n function getJsonNameIndexOrThrow(_this__u8e3s4, json, name, suffix) {\n suffix = suffix === VOID ? '' : suffix;\n _init_properties_JsonNamesMap_kt__cbbp0k();\n var index = getJsonNameIndex(_this__u8e3s4, json, name);\n if (index === -3)\n throw SerializationException_init_$Create$(_this__u8e3s4.ql() + \" does not contain element with name '\" + name + \"'\" + suffix);\n return index;\n }\n function getJsonElementName(_this__u8e3s4, json, index) {\n _init_properties_JsonNamesMap_kt__cbbp0k();\n var strategy = namingStrategy(_this__u8e3s4, json);\n return strategy == null ? _this__u8e3s4.yl(index) : serializationNamesIndices(_this__u8e3s4, json, strategy)[index];\n }\n function namingStrategy(_this__u8e3s4, json) {\n _init_properties_JsonNamesMap_kt__cbbp0k();\n return equals(_this__u8e3s4.ul(), CLASS_getInstance()) ? json.f15_1.f17_1 : null;\n }\n function deserializationNamesMap(_this__u8e3s4, descriptor) {\n _init_properties_JsonNamesMap_kt__cbbp0k();\n var tmp = get_schemaCache(_this__u8e3s4);\n var tmp_0 = get_JsonDeserializationNamesKey();\n return tmp.b1a(descriptor, tmp_0, deserializationNamesMap$lambda(descriptor, _this__u8e3s4));\n }\n function decodeCaseInsensitive(_this__u8e3s4, descriptor) {\n _init_properties_JsonNamesMap_kt__cbbp0k();\n return _this__u8e3s4.f15_1.g17_1 ? equals(descriptor.ul(), ENUM_getInstance()) : false;\n }\n function getJsonNameIndexSlowPath(_this__u8e3s4, json, name) {\n _init_properties_JsonNamesMap_kt__cbbp0k();\n var tmp0_elvis_lhs = deserializationNamesMap(json, _this__u8e3s4).b3(name);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n tmp = -3;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function serializationNamesIndices(_this__u8e3s4, json, strategy) {\n _init_properties_JsonNamesMap_kt__cbbp0k();\n var tmp = get_schemaCache(json);\n var tmp_0 = get_JsonSerializationNamesKey();\n return tmp.b1a(_this__u8e3s4, tmp_0, serializationNamesIndices$lambda(_this__u8e3s4, strategy));\n }\n function buildDeserializationNamesMap(_this__u8e3s4, json) {\n _init_properties_JsonNamesMap_kt__cbbp0k();\n // Inline function 'kotlin.collections.mutableMapOf' call\n var builder = LinkedHashMap_init_$Create$();\n var useLowercaseEnums = decodeCaseInsensitive(json, _this__u8e3s4);\n var strategyForClasses = namingStrategy(_this__u8e3s4, json);\n var inductionVariable = 0;\n var last = _this__u8e3s4.sl();\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.filterIsInstance' call\n // Inline function 'kotlin.collections.filterIsInstanceTo' call\n var this_0 = _this__u8e3s4.vl(i);\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n if (element instanceof JsonNames) {\n destination.q(element);\n }\n }\n var tmp1_safe_receiver = singleOrNull(destination);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.c1a_1;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = tmp2_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = tmp2_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'kotlinx.serialization.json.internal.buildDeserializationNamesMap.' call\n var tmp;\n if (useLowercaseEnums) {\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = element_0.toLowerCase();\n } else {\n tmp = element_0;\n }\n buildDeserializationNamesMap$putOrThrow(builder, _this__u8e3s4, tmp, i);\n }\n }\n var tmp_0;\n if (useLowercaseEnums) {\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = _this__u8e3s4.yl(i).toLowerCase();\n } else if (!(strategyForClasses == null)) {\n tmp_0 = strategyForClasses.d1a(_this__u8e3s4, i, _this__u8e3s4.yl(i));\n } else {\n tmp_0 = null;\n }\n var nameToPut = tmp_0;\n if (nameToPut == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n buildDeserializationNamesMap$putOrThrow(builder, _this__u8e3s4, nameToPut, i);\n }\n }\n while (inductionVariable < last);\n // Inline function 'kotlin.collections.ifEmpty' call\n var tmp_1;\n if (builder.b1()) {\n // Inline function 'kotlinx.serialization.json.internal.buildDeserializationNamesMap.' call\n tmp_1 = emptyMap();\n } else {\n tmp_1 = builder;\n }\n return tmp_1;\n }\n function buildDeserializationNamesMap$putOrThrow(_this__u8e3s4, $this_buildDeserializationNamesMap, name, index) {\n var entity = equals($this_buildDeserializationNamesMap.ul(), ENUM_getInstance()) ? 'enum value' : 'property';\n // Inline function 'kotlin.collections.contains' call\n // Inline function 'kotlin.collections.containsKey' call\n if ((isInterface(_this__u8e3s4, Map) ? _this__u8e3s4 : THROW_CCE()).y2(name)) {\n throw new JsonException(\"The suggested name '\" + name + \"' for \" + entity + ' ' + $this_buildDeserializationNamesMap.yl(index) + ' is already one of the names for ' + entity + ' ' + ($this_buildDeserializationNamesMap.yl(getValue(_this__u8e3s4, name)) + ' in ' + $this_buildDeserializationNamesMap));\n }\n // Inline function 'kotlin.collections.set' call\n _this__u8e3s4.r2(name, index);\n }\n function deserializationNamesMap$lambda($descriptor, $this_deserializationNamesMap) {\n return function () {\n return buildDeserializationNamesMap($descriptor, $this_deserializationNamesMap);\n };\n }\n function serializationNamesIndices$lambda($this_serializationNamesIndices, $strategy) {\n return function () {\n var tmp = 0;\n var tmp_0 = $this_serializationNamesIndices.sl();\n // Inline function 'kotlin.arrayOfNulls' call\n var tmp_1 = fillArrayVal(Array(tmp_0), null);\n while (tmp < tmp_0) {\n var tmp_2 = tmp;\n var baseName = $this_serializationNamesIndices.yl(tmp_2);\n tmp_1[tmp_2] = $strategy.d1a($this_serializationNamesIndices, tmp_2, baseName);\n tmp = tmp + 1 | 0;\n }\n return tmp_1;\n };\n }\n var properties_initialized_JsonNamesMap_kt_ljpf42;\n function _init_properties_JsonNamesMap_kt__cbbp0k() {\n if (!properties_initialized_JsonNamesMap_kt_ljpf42) {\n properties_initialized_JsonNamesMap_kt_ljpf42 = true;\n JsonDeserializationNamesKey = new Key();\n JsonSerializationNamesKey = new Key();\n }\n }\n function Tombstone() {\n }\n var Tombstone_instance;\n function Tombstone_getInstance() {\n return Tombstone_instance;\n }\n function resize($this) {\n var newSize = imul($this.g1a_1, 2);\n $this.e1a_1 = copyOf($this.e1a_1, newSize);\n $this.f1a_1 = copyOf_0($this.f1a_1, newSize);\n }\n function JsonPath() {\n var tmp = this;\n // Inline function 'kotlin.arrayOfNulls' call\n tmp.e1a_1 = fillArrayVal(Array(8), null);\n var tmp_0 = this;\n var tmp_1 = 0;\n var tmp_2 = new Int32Array(8);\n while (tmp_1 < 8) {\n tmp_2[tmp_1] = -1;\n tmp_1 = tmp_1 + 1 | 0;\n }\n tmp_0.f1a_1 = tmp_2;\n this.g1a_1 = -1;\n }\n protoOf(JsonPath).h1a = function (sd) {\n this.g1a_1 = this.g1a_1 + 1 | 0;\n var depth = this.g1a_1;\n if (depth === this.e1a_1.length) {\n resize(this);\n }\n this.e1a_1[depth] = sd;\n };\n protoOf(JsonPath).i1a = function (index) {\n this.f1a_1[this.g1a_1] = index;\n };\n protoOf(JsonPath).j1a = function (key) {\n var tmp;\n if (!(this.f1a_1[this.g1a_1] === -2)) {\n this.g1a_1 = this.g1a_1 + 1 | 0;\n tmp = this.g1a_1 === this.e1a_1.length;\n } else {\n tmp = false;\n }\n if (tmp) {\n resize(this);\n }\n this.e1a_1[this.g1a_1] = key;\n this.f1a_1[this.g1a_1] = -2;\n };\n protoOf(JsonPath).k1a = function () {\n if (this.f1a_1[this.g1a_1] === -2) {\n this.e1a_1[this.g1a_1] = Tombstone_instance;\n }\n };\n protoOf(JsonPath).l1a = function () {\n var depth = this.g1a_1;\n if (this.f1a_1[depth] === -2) {\n this.f1a_1[depth] = -1;\n this.g1a_1 = this.g1a_1 - 1 | 0;\n }\n if (!(this.g1a_1 === -1)) {\n this.g1a_1 = this.g1a_1 - 1 | 0;\n }\n };\n protoOf(JsonPath).m1a = function () {\n // Inline function 'kotlin.text.buildString' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.apply' call\n var this_0 = StringBuilder_init_$Create$();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.json.internal.JsonPath.getPath.' call\n this_0.y5('$');\n // Inline function 'kotlin.repeat' call\n var times = this.g1a_1 + 1 | 0;\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable = 0;\n if (inductionVariable < times)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlinx.serialization.json.internal.JsonPath.getPath..' call\n var element = this.e1a_1[index];\n if (!(element == null) ? isInterface(element, SerialDescriptor) : false) {\n if (equals(element.ul(), LIST_getInstance())) {\n if (!(this.f1a_1[index] === -1)) {\n this_0.y5('[');\n this_0.i8(this.f1a_1[index]);\n this_0.y5(']');\n }\n } else {\n var idx = this.f1a_1[index];\n if (idx >= 0) {\n this_0.y5('.');\n this_0.y5(element.yl(idx));\n }\n }\n } else {\n if (!(element === Tombstone_instance)) {\n this_0.y5('[');\n this_0.y5(\"'\");\n this_0.x5(element);\n this_0.y5(\"'\");\n this_0.y5(']');\n }\n }\n }\n while (inductionVariable < times);\n return this_0.toString();\n };\n protoOf(JsonPath).toString = function () {\n return this.m1a();\n };\n function encodeByWriter(json, writer, serializer, value) {\n var tmp = WriteMode_OBJ_getInstance();\n // Inline function 'kotlin.arrayOfNulls' call\n var size = get_entries().n();\n var tmp$ret$0 = fillArrayVal(Array(size), null);\n var encoder = StreamingJsonEncoder_init_$Create$(writer, json, tmp, tmp$ret$0);\n encoder.fp(serializer, value);\n }\n function readObject($this) {\n // Inline function 'kotlinx.serialization.json.internal.JsonTreeReader.readObjectImpl' call\n var lastToken = $this.v1a_1.z1a(get_TC_BEGIN_OBJ());\n if ($this.v1a_1.a1b() === get_TC_COMMA()) {\n $this.v1a_1.z19('Unexpected leading comma');\n }\n // Inline function 'kotlin.collections.linkedMapOf' call\n var result = LinkedHashMap_init_$Create$();\n $l$loop: while ($this.v1a_1.b1b()) {\n var key = $this.w1a_1 ? $this.v1a_1.d1b() : $this.v1a_1.c1b();\n $this.v1a_1.z1a(get_TC_COLON());\n // Inline function 'kotlinx.serialization.json.internal.JsonTreeReader.readObject.' call\n var element = $this.e1b();\n // Inline function 'kotlin.collections.set' call\n result.r2(key, element);\n lastToken = $this.v1a_1.f1b();\n var tmp0_subject = lastToken;\n if (tmp0_subject !== get_TC_COMMA())\n if (tmp0_subject === get_TC_END_OBJ())\n break $l$loop;\n else {\n $this.v1a_1.z19('Expected end of the object or comma');\n }\n }\n if (lastToken === get_TC_BEGIN_OBJ()) {\n $this.v1a_1.z1a(get_TC_END_OBJ());\n } else if (lastToken === get_TC_COMMA()) {\n if (!$this.x1a_1) {\n invalidTrailingComma($this.v1a_1);\n }\n $this.v1a_1.z1a(get_TC_END_OBJ());\n }\n return new JsonObject(result);\n }\n function readObject_0(_this__u8e3s4, $this, $completion) {\n var tmp = new $readObjectCOROUTINE$0($this, _this__u8e3s4, $completion);\n tmp.pc_1 = Unit_instance;\n tmp.qc_1 = null;\n return tmp.yc();\n }\n function readArray($this) {\n var lastToken = $this.v1a_1.f1b();\n if ($this.v1a_1.a1b() === get_TC_COMMA()) {\n $this.v1a_1.z19('Unexpected leading comma');\n }\n // Inline function 'kotlin.collections.arrayListOf' call\n var result = ArrayList_init_$Create$();\n while ($this.v1a_1.b1b()) {\n var element = $this.e1b();\n result.q(element);\n lastToken = $this.v1a_1.f1b();\n if (!(lastToken === get_TC_COMMA())) {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonLexer.require' call\n var this_0 = $this.v1a_1;\n var condition = lastToken === get_TC_END_LIST();\n var position = this_0.x15_1;\n if (!condition) {\n // Inline function 'kotlinx.serialization.json.internal.JsonTreeReader.readArray.' call\n var tmp$ret$1 = 'Expected end of the array or comma';\n this_0.z19(tmp$ret$1, position);\n }\n }\n }\n if (lastToken === get_TC_BEGIN_LIST()) {\n $this.v1a_1.z1a(get_TC_END_LIST());\n } else if (lastToken === get_TC_COMMA()) {\n if (!$this.x1a_1) {\n invalidTrailingComma($this.v1a_1, 'array');\n }\n $this.v1a_1.z1a(get_TC_END_LIST());\n }\n return new JsonArray(result);\n }\n function readValue($this, isString) {\n var tmp;\n if ($this.w1a_1 ? true : !isString) {\n tmp = $this.v1a_1.d1b();\n } else {\n tmp = $this.v1a_1.c1b();\n }\n var string = tmp;\n if (!isString ? string === get_NULL() : false)\n return JsonNull_getInstance();\n return new JsonLiteral(string, isString);\n }\n function readDeepRecursive($this) {\n return invoke(new DeepRecursiveFunction(JsonTreeReader$readDeepRecursive$slambda_0($this, null)), Unit_instance);\n }\n function JsonTreeReader$readDeepRecursive$slambda(this$0, resultContinuation) {\n this.c1c_1 = this$0;\n CoroutineImpl.call(this, resultContinuation);\n }\n protoOf(JsonTreeReader$readDeepRecursive$slambda).h1c = function ($this$$receiver, it, $completion) {\n var tmp = this.i1c($this$$receiver, it, $completion);\n tmp.pc_1 = Unit_instance;\n tmp.qc_1 = null;\n return tmp.yc();\n };\n protoOf(JsonTreeReader$readDeepRecursive$slambda).ni = function (p1, p2, $completion) {\n var tmp = p1 instanceof DeepRecursiveScope ? p1 : THROW_CCE();\n return this.h1c(tmp, p2 instanceof Unit ? p2 : THROW_CCE(), $completion);\n };\n protoOf(JsonTreeReader$readDeepRecursive$slambda).yc = function () {\n var suspendResult = this.pc_1;\n $sm: do\n try {\n var tmp = this.nc_1;\n switch (tmp) {\n case 0:\n this.oc_1 = 3;\n this.f1c_1 = this.c1c_1.v1a_1.a1b();\n if (this.f1c_1 === get_TC_STRING()) {\n this.g1c_1 = readValue(this.c1c_1, true);\n this.nc_1 = 2;\n continue $sm;\n } else {\n if (this.f1c_1 === get_TC_OTHER()) {\n this.g1c_1 = readValue(this.c1c_1, false);\n this.nc_1 = 2;\n continue $sm;\n } else {\n if (this.f1c_1 === get_TC_BEGIN_OBJ()) {\n this.nc_1 = 1;\n suspendResult = readObject_0(this.d1c_1, this.c1c_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n } else {\n if (this.f1c_1 === get_TC_BEGIN_LIST()) {\n this.g1c_1 = readArray(this.c1c_1);\n this.nc_1 = 2;\n continue $sm;\n } else {\n var tmp_0 = this;\n this.c1c_1.v1a_1.z19(\"Can't begin reading element, unexpected token\");\n }\n }\n }\n }\n\n break;\n case 1:\n this.g1c_1 = suspendResult;\n this.nc_1 = 2;\n continue $sm;\n case 2:\n return this.g1c_1;\n case 3:\n throw this.qc_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.oc_1 === 3) {\n throw e;\n } else {\n this.nc_1 = this.oc_1;\n this.qc_1 = e;\n }\n }\n while (true);\n };\n protoOf(JsonTreeReader$readDeepRecursive$slambda).i1c = function ($this$$receiver, it, completion) {\n var i = new JsonTreeReader$readDeepRecursive$slambda(this.c1c_1, completion);\n i.d1c_1 = $this$$receiver;\n i.e1c_1 = it;\n return i;\n };\n function JsonTreeReader$readDeepRecursive$slambda_0(this$0, resultContinuation) {\n var i = new JsonTreeReader$readDeepRecursive$slambda(this$0, resultContinuation);\n var l = function ($this$$receiver, it, $completion) {\n return i.h1c($this$$receiver, it, $completion);\n };\n l.$arity = 2;\n return l;\n }\n function $readObjectCOROUTINE$0(_this__u8e3s4, _this__u8e3s4_0, resultContinuation) {\n CoroutineImpl.call(this, resultContinuation);\n this.o1b_1 = _this__u8e3s4;\n this.p1b_1 = _this__u8e3s4_0;\n }\n protoOf($readObjectCOROUTINE$0).yc = function () {\n var suspendResult = this.pc_1;\n $sm: do\n try {\n var tmp = this.nc_1;\n switch (tmp) {\n case 0:\n this.oc_1 = 5;\n var tmp_0 = this;\n tmp_0.q1b_1 = this.o1b_1;\n this.r1b_1 = this.q1b_1.v1a_1.z1a(get_TC_BEGIN_OBJ());\n if (this.q1b_1.v1a_1.a1b() === get_TC_COMMA()) {\n this.q1b_1.v1a_1.z19('Unexpected leading comma');\n }\n\n var tmp_1 = this;\n tmp_1.s1b_1 = LinkedHashMap_init_$Create$();\n this.nc_1 = 1;\n continue $sm;\n case 1:\n if (!this.q1b_1.v1a_1.b1b()) {\n this.nc_1 = 4;\n continue $sm;\n }\n\n this.t1b_1 = this.q1b_1.w1a_1 ? this.q1b_1.v1a_1.d1b() : this.q1b_1.v1a_1.c1b();\n this.q1b_1.v1a_1.z1a(get_TC_COLON());\n this.nc_1 = 2;\n suspendResult = this.p1b_1.fi(Unit_instance, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n\n continue $sm;\n case 2:\n var element = suspendResult;\n var this_0 = this.s1b_1;\n var key = this.t1b_1;\n this_0.r2(key, element);\n this.r1b_1 = this.q1b_1.v1a_1.f1b();\n var tmp0_subject = this.r1b_1;\n if (tmp0_subject === get_TC_COMMA()) {\n this.nc_1 = 3;\n continue $sm;\n } else {\n if (tmp0_subject === get_TC_END_OBJ()) {\n this.nc_1 = 4;\n continue $sm;\n } else {\n this.q1b_1.v1a_1.z19('Expected end of the object or comma');\n }\n }\n\n break;\n case 3:\n this.nc_1 = 1;\n continue $sm;\n case 4:\n if (this.r1b_1 === get_TC_BEGIN_OBJ()) {\n this.q1b_1.v1a_1.z1a(get_TC_END_OBJ());\n } else if (this.r1b_1 === get_TC_COMMA()) {\n if (!this.q1b_1.x1a_1) {\n invalidTrailingComma(this.q1b_1.v1a_1);\n }\n this.q1b_1.v1a_1.z1a(get_TC_END_OBJ());\n }\n\n return new JsonObject(this.s1b_1);\n case 5:\n throw this.qc_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.oc_1 === 5) {\n throw e;\n } else {\n this.nc_1 = this.oc_1;\n this.qc_1 = e;\n }\n }\n while (true);\n };\n function JsonTreeReader(configuration, lexer) {\n this.v1a_1 = lexer;\n this.w1a_1 = configuration.v16_1;\n this.x1a_1 = configuration.h17_1;\n this.y1a_1 = 0;\n }\n protoOf(JsonTreeReader).e1b = function () {\n var token = this.v1a_1.a1b();\n var tmp;\n if (token === get_TC_STRING()) {\n tmp = readValue(this, true);\n } else if (token === get_TC_OTHER()) {\n tmp = readValue(this, false);\n } else if (token === get_TC_BEGIN_OBJ()) {\n var tmp_0;\n this.y1a_1 = this.y1a_1 + 1 | 0;\n if (this.y1a_1 === 200) {\n tmp_0 = readDeepRecursive(this);\n } else {\n tmp_0 = readObject(this);\n }\n var result = tmp_0;\n this.y1a_1 = this.y1a_1 - 1 | 0;\n tmp = result;\n } else if (token === get_TC_BEGIN_LIST()) {\n tmp = readArray(this);\n } else {\n this.v1a_1.z19('Cannot read Json element because of unexpected ' + tokenDescription(token));\n }\n return tmp;\n };\n function classDiscriminator(_this__u8e3s4, json) {\n var tmp0_iterator = _this__u8e3s4.rl().t();\n while (tmp0_iterator.u()) {\n var annotation = tmp0_iterator.w();\n if (annotation instanceof JsonClassDiscriminator)\n return annotation.j1c_1;\n }\n return json.f15_1.c17_1;\n }\n function decodeSerializableValuePolymorphic(_this__u8e3s4, deserializer) {\n var tmp;\n if (!(deserializer instanceof AbstractPolymorphicSerializer)) {\n tmp = true;\n } else {\n tmp = _this__u8e3s4.j17().f15_1.b17_1;\n }\n if (tmp) {\n return deserializer.qk(_this__u8e3s4);\n }\n var discriminator = classDiscriminator(deserializer.ok(), _this__u8e3s4.j17());\n // Inline function 'kotlinx.serialization.json.internal.cast' call\n var value = _this__u8e3s4.k17();\n var descriptor = deserializer.ok();\n if (!(value instanceof JsonObject)) {\n throw JsonDecodingException_1(-1, 'Expected ' + getKClass(JsonObject) + ' as the serialized body of ' + descriptor.ql() + ', but had ' + getKClassFromExpression(value));\n }\n var jsonTree = value;\n var tmp0_safe_receiver = jsonTree.o17(discriminator);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);\n var type = tmp1_safe_receiver == null ? null : get_contentOrNull(tmp1_safe_receiver);\n var tmp_0;\n try {\n tmp_0 = findPolymorphicSerializer(deserializer, _this__u8e3s4, type);\n } catch ($p) {\n var tmp_1;\n if ($p instanceof SerializationException) {\n var it = $p;\n throw JsonDecodingException_0(-1, ensureNotNull(it.message), jsonTree.toString());\n } else {\n throw $p;\n }\n }\n var tmp_2 = tmp_0;\n var actualSerializer = isInterface(tmp_2, DeserializationStrategy) ? tmp_2 : THROW_CCE();\n return readPolymorphicJson(_this__u8e3s4.j17(), discriminator, jsonTree, actualSerializer);\n }\n function validateIfSealed(serializer, actualSerializer, classDiscriminator) {\n if (!(serializer instanceof SealedClassSerializer))\n return Unit_instance;\n if (jsonCachedSerialNames(actualSerializer.ok()).p(classDiscriminator)) {\n var baseName = serializer.ok().ql();\n var actualName = actualSerializer.ok().ql();\n // Inline function 'kotlin.error' call\n var message = \"Sealed class '\" + actualName + \"' cannot be serialized as base class '\" + baseName + \"' because\" + (\" it has property name that conflicts with JSON class discriminator '\" + classDiscriminator + \"'. \") + 'You can either change class discriminator in JsonConfiguration, ' + 'rename property with @SerialName annotation or fall back to array polymorphism';\n throw IllegalStateException_init_$Create$(toString(message));\n }\n }\n function checkKind(kind) {\n if (kind instanceof ENUM) {\n // Inline function 'kotlin.error' call\n var message = \"Enums cannot be serialized polymorphically with 'type' parameter. You can use 'JsonBuilder.useArrayPolymorphism' instead\";\n throw IllegalStateException_init_$Create$(toString(message));\n }\n if (kind instanceof PrimitiveKind) {\n // Inline function 'kotlin.error' call\n var message_0 = \"Primitives cannot be serialized polymorphically with 'type' parameter. You can use 'JsonBuilder.useArrayPolymorphism' instead\";\n throw IllegalStateException_init_$Create$(toString(message_0));\n }\n if (kind instanceof PolymorphicKind) {\n // Inline function 'kotlin.error' call\n var message_1 = 'Actual serializer for polymorphic cannot be polymorphic itself';\n throw IllegalStateException_init_$Create$(toString(message_1));\n }\n }\n function validateIfSealed$accessor$1ad0flx(serializer, actualSerializer, classDiscriminator) {\n return validateIfSealed(serializer, actualSerializer, classDiscriminator);\n }\n function checkKind_0($this, descriptor, actualClass) {\n var kind = descriptor.ul();\n var tmp;\n if (kind instanceof PolymorphicKind) {\n tmp = true;\n } else {\n tmp = equals(kind, CONTEXTUAL_getInstance());\n }\n if (tmp) {\n throw IllegalArgumentException_init_$Create$('Serializer for ' + actualClass.v6() + \" can't be registered as a subclass for polymorphic serialization \" + ('because its kind ' + kind + ' is not concrete. To work with multiple hierarchies, register it as a base class.'));\n }\n if ($this.k1c_1)\n return Unit_instance;\n var tmp_0;\n var tmp_1;\n if (equals(kind, LIST_getInstance()) ? true : equals(kind, MAP_getInstance())) {\n tmp_1 = true;\n } else {\n tmp_1 = kind instanceof PrimitiveKind;\n }\n if (tmp_1) {\n tmp_0 = true;\n } else {\n tmp_0 = kind instanceof ENUM;\n }\n if (tmp_0) {\n throw IllegalArgumentException_init_$Create$('Serializer for ' + actualClass.v6() + ' of kind ' + kind + ' cannot be serialized polymorphically with class discriminator.');\n }\n }\n function checkDiscriminatorCollisions($this, descriptor, actualClass) {\n var inductionVariable = 0;\n var last = descriptor.sl();\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var name = descriptor.yl(i);\n if (name === $this.l1c_1) {\n throw IllegalArgumentException_init_$Create$('Polymorphic serializer for ' + actualClass + \" has property '\" + name + \"' that conflicts \" + 'with JSON class discriminator. You can either change class discriminator in JsonConfiguration, ' + 'rename property with @SerialName annotation ' + 'or fall back to array polymorphism');\n }\n }\n while (inductionVariable < last);\n }\n function PolymorphismValidator(useArrayPolymorphism, discriminator) {\n this.k1c_1 = useArrayPolymorphism;\n this.l1c_1 = discriminator;\n }\n protoOf(PolymorphismValidator).w14 = function (kClass, provider) {\n };\n protoOf(PolymorphismValidator).z14 = function (baseClass, actualClass, actualSerializer) {\n var descriptor = actualSerializer.ok();\n checkKind_0(this, descriptor, actualClass);\n if (!this.k1c_1) {\n checkDiscriminatorCollisions(this, descriptor, actualClass);\n }\n };\n protoOf(PolymorphismValidator).a15 = function (baseClass, defaultSerializerProvider) {\n };\n protoOf(PolymorphismValidator).b15 = function (baseClass, defaultDeserializerProvider) {\n };\n function Key() {\n }\n function DescriptorSchemaCache() {\n this.a1a_1 = createMapForCache(16);\n }\n protoOf(DescriptorSchemaCache).m1c = function (descriptor, key, value) {\n // Inline function 'kotlin.collections.set' call\n // Inline function 'kotlin.collections.getOrPut' call\n var this_0 = this.a1a_1;\n var value_0 = this_0.b3(descriptor);\n var tmp;\n if (value_0 == null) {\n // Inline function 'kotlinx.serialization.json.internal.DescriptorSchemaCache.set.' call\n var answer = createMapForCache(2);\n this_0.r2(descriptor, answer);\n tmp = answer;\n } else {\n tmp = value_0;\n }\n var this_1 = tmp;\n var key_0 = key instanceof Key ? key : THROW_CCE();\n var value_1 = !(value == null) ? value : THROW_CCE();\n this_1.r2(key_0, value_1);\n };\n protoOf(DescriptorSchemaCache).b1a = function (descriptor, key, defaultValue) {\n var tmp0_safe_receiver = this.n1c(descriptor, key);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp0_safe_receiver;\n }\n var value = defaultValue();\n this.m1c(descriptor, key, value);\n return value;\n };\n protoOf(DescriptorSchemaCache).n1c = function (descriptor, key) {\n var tmp0_safe_receiver = this.a1a_1.b3(descriptor);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n tmp = tmp0_safe_receiver.b3(key instanceof Key ? key : THROW_CCE());\n }\n var tmp_0 = tmp;\n return !(tmp_0 == null) ? tmp_0 : null;\n };\n function DiscriminatorHolder(discriminatorToSkip) {\n this.o1c_1 = discriminatorToSkip;\n }\n function trySkip(_this__u8e3s4, $this, unknownKey) {\n if (_this__u8e3s4 == null)\n return false;\n if (_this__u8e3s4.o1c_1 === unknownKey) {\n _this__u8e3s4.o1c_1 = null;\n return true;\n }\n return false;\n }\n function skipLeftoverElements($this, descriptor) {\n $l$loop: while (true) {\n var tmp = $this.eo(descriptor);\n if (!!(tmp === -1)) {\n break $l$loop;\n }\n }\n }\n function checkLeadingComma($this) {\n if ($this.r15_1.a1b() === get_TC_COMMA()) {\n $this.r15_1.z19('Unexpected leading comma');\n }\n }\n function decodeMapIndex($this) {\n var hasComma = false;\n var decodingKey = !(($this.t15_1 % 2 | 0) === 0);\n if (decodingKey) {\n if (!($this.t15_1 === -1)) {\n hasComma = $this.r15_1.q1c();\n }\n } else {\n $this.r15_1.p1c(get_COLON());\n }\n var tmp;\n if ($this.r15_1.b1b()) {\n if (decodingKey) {\n if ($this.t15_1 === -1) {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonLexer.require' call\n var this_0 = $this.r15_1;\n var condition = !hasComma;\n var position = this_0.x15_1;\n if (!condition) {\n // Inline function 'kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeMapIndex.' call\n var tmp$ret$0 = 'Unexpected leading comma';\n this_0.z19(tmp$ret$0, position);\n }\n } else {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonLexer.require' call\n var this_1 = $this.r15_1;\n var condition_0 = hasComma;\n var position_0 = this_1.x15_1;\n if (!condition_0) {\n // Inline function 'kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeMapIndex.' call\n var tmp$ret$1 = 'Expected comma after the key-value pair';\n this_1.z19(tmp$ret$1, position_0);\n }\n }\n }\n $this.t15_1 = $this.t15_1 + 1 | 0;\n tmp = $this.t15_1;\n } else {\n if (hasComma ? !$this.p15_1.f15_1.h17_1 : false) {\n invalidTrailingComma($this.r15_1);\n }\n tmp = -1;\n }\n return tmp;\n }\n function coerceInputValue($this, descriptor, index) {\n var tmp$ret$0;\n $l$block_3: {\n // Inline function 'kotlinx.serialization.json.internal.tryCoerceValue' call\n var this_0 = $this.p15_1;\n if (!descriptor.zl(index)) {\n tmp$ret$0 = false;\n break $l$block_3;\n }\n var elementDescriptor = descriptor.wl(index);\n var tmp;\n if (!elementDescriptor.ml()) {\n // Inline function 'kotlinx.serialization.json.internal.StreamingJsonDecoder.coerceInputValue.' call\n tmp = $this.r15_1.r1c(true);\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_3;\n }\n if (equals(elementDescriptor.ul(), ENUM_getInstance())) {\n var tmp_0;\n if (elementDescriptor.ml()) {\n // Inline function 'kotlinx.serialization.json.internal.StreamingJsonDecoder.coerceInputValue.' call\n tmp_0 = $this.r15_1.r1c(false);\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = false;\n break $l$block_3;\n }\n // Inline function 'kotlinx.serialization.json.internal.StreamingJsonDecoder.coerceInputValue.' call\n var tmp0_elvis_lhs = $this.r15_1.s1c($this.v15_1.v16_1);\n var tmp_1;\n if (tmp0_elvis_lhs == null) {\n tmp$ret$0 = false;\n break $l$block_3;\n } else {\n tmp_1 = tmp0_elvis_lhs;\n }\n var enumValue = tmp_1;\n var enumIndex = getJsonNameIndex(elementDescriptor, this_0, enumValue);\n if (enumIndex === -3) {\n // Inline function 'kotlinx.serialization.json.internal.StreamingJsonDecoder.coerceInputValue.' call\n $this.r15_1.c1b();\n tmp$ret$0 = true;\n break $l$block_3;\n }\n }\n tmp$ret$0 = false;\n }\n return tmp$ret$0;\n }\n function decodeObjectIndex($this, descriptor) {\n var hasComma = $this.r15_1.q1c();\n while ($this.r15_1.b1b()) {\n hasComma = false;\n var key = decodeStringKey($this);\n $this.r15_1.p1c(get_COLON());\n var index = getJsonNameIndex(descriptor, $this.p15_1, key);\n var tmp;\n if (!(index === -3)) {\n var tmp_0;\n if ($this.v15_1.a17_1 ? coerceInputValue($this, descriptor, index) : false) {\n hasComma = $this.r15_1.q1c();\n tmp_0 = false;\n } else {\n var tmp0_safe_receiver = $this.w15_1;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.st(index);\n }\n return index;\n }\n tmp = tmp_0;\n } else {\n tmp = true;\n }\n var isUnknown = tmp;\n if (isUnknown) {\n hasComma = handleUnknown($this, key);\n }\n }\n if (hasComma ? !$this.p15_1.f15_1.h17_1 : false) {\n invalidTrailingComma($this.r15_1);\n }\n var tmp1_safe_receiver = $this.w15_1;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.tt();\n var tmp_1;\n if (tmp2_elvis_lhs == null) {\n tmp_1 = -1;\n } else {\n tmp_1 = tmp2_elvis_lhs;\n }\n return tmp_1;\n }\n function handleUnknown($this, key) {\n if ($this.v15_1.u16_1 ? true : trySkip($this.u15_1, $this, key)) {\n $this.r15_1.u1c($this.v15_1.v16_1);\n } else {\n $this.r15_1.t1c(key);\n }\n return $this.r15_1.q1c();\n }\n function decodeListIndex($this) {\n var hasComma = $this.r15_1.q1c();\n var tmp;\n if ($this.r15_1.b1b()) {\n if (!($this.t15_1 === -1) ? !hasComma : false) {\n $this.r15_1.z19('Expected end of the array or comma');\n }\n $this.t15_1 = $this.t15_1 + 1 | 0;\n tmp = $this.t15_1;\n } else {\n if (hasComma ? !$this.p15_1.f15_1.h17_1 : false) {\n invalidTrailingComma($this.r15_1, 'array');\n }\n tmp = -1;\n }\n return tmp;\n }\n function decodeStringKey($this) {\n var tmp;\n if ($this.v15_1.v16_1) {\n tmp = $this.r15_1.w1c();\n } else {\n tmp = $this.r15_1.v1c();\n }\n return tmp;\n }\n function StreamingJsonDecoder(json, mode, lexer, descriptor, discriminatorHolder) {\n AbstractDecoder.call(this);\n this.p15_1 = json;\n this.q15_1 = mode;\n this.r15_1 = lexer;\n this.s15_1 = this.p15_1.co();\n this.t15_1 = -1;\n this.u15_1 = discriminatorHolder;\n this.v15_1 = this.p15_1.f15_1;\n this.w15_1 = this.v15_1.y16_1 ? null : new JsonElementMarker(descriptor);\n }\n protoOf(StreamingJsonDecoder).j17 = function () {\n return this.p15_1;\n };\n protoOf(StreamingJsonDecoder).co = function () {\n return this.s15_1;\n };\n protoOf(StreamingJsonDecoder).k17 = function () {\n return (new JsonTreeReader(this.p15_1.f15_1, this.r15_1)).e1b();\n };\n protoOf(StreamingJsonDecoder).mn = function (deserializer) {\n try {\n var tmp;\n if (!(deserializer instanceof AbstractPolymorphicSerializer)) {\n tmp = true;\n } else {\n tmp = this.p15_1.f15_1.b17_1;\n }\n if (tmp) {\n return deserializer.qk(this);\n }\n var discriminator = classDiscriminator(deserializer.ok(), this.p15_1);\n var tmp0_elvis_lhs = this.r15_1.x1c(discriminator, this.v15_1.v16_1);\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n return decodeSerializableValuePolymorphic(this, isInterface(deserializer, DeserializationStrategy) ? deserializer : THROW_CCE());\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n var type = tmp_0;\n var tmp_1;\n try {\n tmp_1 = findPolymorphicSerializer(deserializer, this, type);\n } catch ($p) {\n var tmp_2;\n if ($p instanceof SerializationException) {\n var it = $p;\n var message = removeSuffix(substringBefore(ensureNotNull(it.message), _Char___init__impl__6a9atx(10)), '.');\n var hint = substringAfter(ensureNotNull(it.message), _Char___init__impl__6a9atx(10), '');\n this.r15_1.z19(message, VOID, hint);\n } else {\n throw $p;\n }\n tmp_1 = tmp_2;\n }\n var tmp_3 = tmp_1;\n var actualSerializer = isInterface(tmp_3, DeserializationStrategy) ? tmp_3 : THROW_CCE();\n this.u15_1 = new DiscriminatorHolder(discriminator);\n return actualSerializer.qk(this);\n } catch ($p) {\n if ($p instanceof MissingFieldException) {\n var e = $p;\n if (contains_0(ensureNotNull(e.message), 'at path'))\n throw e;\n throw new MissingFieldException(e.hl_1, plus(e.message, ' at path: ') + this.r15_1.y15_1.m1a(), e);\n } else {\n throw $p;\n }\n }\n };\n protoOf(StreamingJsonDecoder).nn = function (descriptor) {\n var newMode = switchMode(this.p15_1, descriptor);\n this.r15_1.y15_1.h1a(descriptor);\n this.r15_1.p1c(newMode.a1d_1);\n checkLeadingComma(this);\n var tmp;\n switch (newMode.x9_1) {\n case 1:\n case 2:\n case 3:\n tmp = new StreamingJsonDecoder(this.p15_1, newMode, this.r15_1, descriptor, this.u15_1);\n break;\n default:\n var tmp_0;\n if (this.q15_1.equals(newMode) ? this.p15_1.f15_1.y16_1 : false) {\n tmp_0 = this;\n } else {\n tmp_0 = new StreamingJsonDecoder(this.p15_1, newMode, this.r15_1, descriptor, this.u15_1);\n }\n\n tmp = tmp_0;\n break;\n }\n return tmp;\n };\n protoOf(StreamingJsonDecoder).on = function (descriptor) {\n if (this.p15_1.f15_1.u16_1 ? descriptor.sl() === 0 : false) {\n skipLeftoverElements(this, descriptor);\n }\n if (this.r15_1.q1c() ? !this.p15_1.f15_1.h17_1 : false) {\n invalidTrailingComma(this.r15_1, '');\n }\n this.r15_1.p1c(this.q15_1.b1d_1);\n this.r15_1.y15_1.l1a();\n };\n protoOf(StreamingJsonDecoder).ym = function () {\n var tmp;\n var tmp0_safe_receiver = this.w15_1;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x19_1;\n if (!(tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs)) {\n tmp = !this.r15_1.c1d();\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(StreamingJsonDecoder).zm = function () {\n return null;\n };\n protoOf(StreamingJsonDecoder).zn = function (descriptor, index, deserializer, previousValue) {\n var isMapKey = this.q15_1.equals(WriteMode_MAP_getInstance()) ? (index & 1) === 0 : false;\n if (isMapKey) {\n this.r15_1.y15_1.k1a();\n }\n var value = protoOf(AbstractDecoder).zn.call(this, descriptor, index, deserializer, previousValue);\n if (isMapKey) {\n this.r15_1.y15_1.j1a(value);\n }\n return value;\n };\n protoOf(StreamingJsonDecoder).eo = function (descriptor) {\n var index;\n switch (this.q15_1.x9_1) {\n case 0:\n index = decodeObjectIndex(this, descriptor);\n break;\n case 2:\n index = decodeMapIndex(this);\n break;\n default:\n index = decodeListIndex(this);\n break;\n }\n if (!this.q15_1.equals(WriteMode_MAP_getInstance())) {\n this.r15_1.y15_1.i1a(index);\n }\n return index;\n };\n protoOf(StreamingJsonDecoder).an = function () {\n return this.r15_1.d1d();\n };\n protoOf(StreamingJsonDecoder).bn = function () {\n var value = this.r15_1.z17();\n if (!value.equals(toLong(value.ec()))) {\n this.r15_1.z19(\"Failed to parse byte for input '\" + value.toString() + \"'\");\n }\n return value.ec();\n };\n protoOf(StreamingJsonDecoder).cn = function () {\n var value = this.r15_1.z17();\n if (!value.equals(toLong(value.fc()))) {\n this.r15_1.z19(\"Failed to parse short for input '\" + value.toString() + \"'\");\n }\n return value.fc();\n };\n protoOf(StreamingJsonDecoder).dn = function () {\n var value = this.r15_1.z17();\n if (!value.equals(toLong(value.wa()))) {\n this.r15_1.z19(\"Failed to parse int for input '\" + value.toString() + \"'\");\n }\n return value.wa();\n };\n protoOf(StreamingJsonDecoder).en = function () {\n return this.r15_1.z17();\n };\n protoOf(StreamingJsonDecoder).fn = function () {\n var tmp$ret$4;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.parseString' call\n var this_0 = this.r15_1;\n var input = this_0.d1b();\n try {\n // Inline function 'kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeFloat.' call\n // Inline function 'kotlin.text.toFloat' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp$ret$4 = toDouble(input);\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n this_0.z19(\"Failed to parse type '\" + 'float' + \"' for input '\" + input + \"'\");\n } else {\n throw $p;\n }\n }\n }\n var result = tmp$ret$4;\n var specialFp = this.p15_1.f15_1.d17_1;\n if (specialFp ? true : isFinite(result))\n return result;\n throwInvalidFloatingPointDecoded(this.r15_1, result);\n };\n protoOf(StreamingJsonDecoder).gn = function () {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.parseString' call\n var this_0 = this.r15_1;\n var input = this_0.d1b();\n try {\n // Inline function 'kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeDouble.' call\n tmp$ret$1 = toDouble(input);\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n this_0.z19(\"Failed to parse type '\" + 'double' + \"' for input '\" + input + \"'\");\n } else {\n throw $p;\n }\n }\n }\n var result = tmp$ret$1;\n var specialFp = this.p15_1.f15_1.d17_1;\n if (specialFp ? true : isFinite_0(result))\n return result;\n throwInvalidFloatingPointDecoded(this.r15_1, result);\n };\n protoOf(StreamingJsonDecoder).hn = function () {\n var string = this.r15_1.d1b();\n if (!(string.length === 1)) {\n this.r15_1.z19(\"Expected single char, but got '\" + string + \"'\");\n }\n return charSequenceGet(string, 0);\n };\n protoOf(StreamingJsonDecoder).in = function () {\n var tmp;\n if (this.v15_1.v16_1) {\n tmp = this.r15_1.w1c();\n } else {\n tmp = this.r15_1.c1b();\n }\n return tmp;\n };\n protoOf(StreamingJsonDecoder).kn = function (descriptor) {\n return get_isUnsignedNumber(descriptor) ? new JsonDecoderForUnsignedTypes(this.r15_1, this.p15_1) : protoOf(AbstractDecoder).kn.call(this, descriptor);\n };\n protoOf(StreamingJsonDecoder).jn = function (enumDescriptor) {\n return getJsonNameIndexOrThrow(enumDescriptor, this.p15_1, this.in(), ' at path ' + this.r15_1.y15_1.m1a());\n };\n function JsonDecoderForUnsignedTypes(lexer, json) {\n AbstractDecoder.call(this);\n this.e1d_1 = lexer;\n this.f1d_1 = json.co();\n }\n protoOf(JsonDecoderForUnsignedTypes).co = function () {\n return this.f1d_1;\n };\n protoOf(JsonDecoderForUnsignedTypes).eo = function (descriptor) {\n var message = 'unsupported';\n throw IllegalStateException_init_$Create$(toString(message));\n };\n protoOf(JsonDecoderForUnsignedTypes).dn = function () {\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.parseString' call\n var this_0 = this.e1d_1;\n var input = this_0.d1b();\n try {\n // Inline function 'kotlinx.serialization.json.internal.JsonDecoderForUnsignedTypes.decodeInt.' call\n // Inline function 'kotlin.UInt.toInt' call\n var this_1 = toUInt(input);\n tmp$ret$2 = _UInt___get_data__impl__f0vqqw(this_1);\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n this_0.z19(\"Failed to parse type '\" + 'UInt' + \"' for input '\" + input + \"'\");\n } else {\n throw $p;\n }\n }\n }\n return tmp$ret$2;\n };\n protoOf(JsonDecoderForUnsignedTypes).en = function () {\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.parseString' call\n var this_0 = this.e1d_1;\n var input = this_0.d1b();\n try {\n // Inline function 'kotlinx.serialization.json.internal.JsonDecoderForUnsignedTypes.decodeLong.' call\n // Inline function 'kotlin.ULong.toLong' call\n var this_1 = toULong(input);\n tmp$ret$2 = _ULong___get_data__impl__fggpzb(this_1);\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n this_0.z19(\"Failed to parse type '\" + 'ULong' + \"' for input '\" + input + \"'\");\n } else {\n throw $p;\n }\n }\n }\n return tmp$ret$2;\n };\n protoOf(JsonDecoderForUnsignedTypes).bn = function () {\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.parseString' call\n var this_0 = this.e1d_1;\n var input = this_0.d1b();\n try {\n // Inline function 'kotlinx.serialization.json.internal.JsonDecoderForUnsignedTypes.decodeByte.' call\n // Inline function 'kotlin.UByte.toByte' call\n var this_1 = toUByte(input);\n tmp$ret$2 = _UByte___get_data__impl__jof9qr(this_1);\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n this_0.z19(\"Failed to parse type '\" + 'UByte' + \"' for input '\" + input + \"'\");\n } else {\n throw $p;\n }\n }\n }\n return tmp$ret$2;\n };\n protoOf(JsonDecoderForUnsignedTypes).cn = function () {\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.parseString' call\n var this_0 = this.e1d_1;\n var input = this_0.d1b();\n try {\n // Inline function 'kotlinx.serialization.json.internal.JsonDecoderForUnsignedTypes.decodeShort.' call\n // Inline function 'kotlin.UShort.toShort' call\n var this_1 = toUShort(input);\n tmp$ret$2 = _UShort___get_data__impl__g0245(this_1);\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n this_0.z19(\"Failed to parse type '\" + 'UShort' + \"' for input '\" + input + \"'\");\n } else {\n throw $p;\n }\n }\n }\n return tmp$ret$2;\n };\n function get_unsignedNumberDescriptors() {\n _init_properties_StreamingJsonEncoder_kt__pn1bsi();\n return unsignedNumberDescriptors;\n }\n var unsignedNumberDescriptors;\n function StreamingJsonEncoder_init_$Init$(output, json, mode, modeReuseCache, $this) {\n StreamingJsonEncoder.call($this, Composer_0(output, json), json, mode, modeReuseCache);\n return $this;\n }\n function StreamingJsonEncoder_init_$Create$(output, json, mode, modeReuseCache) {\n return StreamingJsonEncoder_init_$Init$(output, json, mode, modeReuseCache, objectCreate(protoOf(StreamingJsonEncoder)));\n }\n function encodeTypeInfo($this, descriptor) {\n $this.n1a_1.v18();\n $this.ro(ensureNotNull($this.u1a_1));\n $this.n1a_1.y18(get_COLON());\n $this.n1a_1.x18();\n $this.ro(descriptor.ql());\n }\n function StreamingJsonEncoder(composer, json, mode, modeReuseCache) {\n AbstractEncoder.call(this);\n this.n1a_1 = composer;\n this.o1a_1 = json;\n this.p1a_1 = mode;\n this.q1a_1 = modeReuseCache;\n this.r1a_1 = this.o1a_1.co();\n this.s1a_1 = this.o1a_1.f15_1;\n this.t1a_1 = false;\n this.u1a_1 = null;\n var i = this.p1a_1.x9_1;\n if (!(this.q1a_1 == null)) {\n if (!(this.q1a_1[i] === null) ? true : !(this.q1a_1[i] === this)) {\n this.q1a_1[i] = this;\n }\n }\n }\n protoOf(StreamingJsonEncoder).j17 = function () {\n return this.o1a_1;\n };\n protoOf(StreamingJsonEncoder).co = function () {\n return this.r1a_1;\n };\n protoOf(StreamingJsonEncoder).kp = function (descriptor, index) {\n return this.s1a_1.t16_1;\n };\n protoOf(StreamingJsonEncoder).fp = function (serializer, value) {\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.encodePolymorphically' call\n if (this.j17().f15_1.b17_1) {\n serializer.pk(this, value);\n break $l$block;\n }\n var isPolymorphicSerializer = serializer instanceof AbstractPolymorphicSerializer;\n var tmp;\n if (isPolymorphicSerializer) {\n tmp = !this.j17().f15_1.i17_1.equals(ClassDiscriminatorMode_NONE_getInstance());\n } else {\n var tmp_0;\n switch (this.j17().f15_1.i17_1.x9_1) {\n case 0:\n case 2:\n tmp_0 = false;\n break;\n case 1:\n // Inline function 'kotlin.let' call\n\n // Inline function 'kotlin.contracts.contract' call\n\n // Inline function 'kotlinx.serialization.json.internal.encodePolymorphically.' call\n\n var it = serializer.ok().ul();\n tmp_0 = equals(it, CLASS_getInstance()) ? true : equals(it, OBJECT_getInstance());\n break;\n default:\n noWhenBranchMatchedException();\n break;\n }\n tmp = tmp_0;\n }\n var needDiscriminator = tmp;\n var baseClassDiscriminator = needDiscriminator ? classDiscriminator(serializer.ok(), this.j17()) : null;\n var tmp_1;\n if (isPolymorphicSerializer) {\n var casted = serializer instanceof AbstractPolymorphicSerializer ? serializer : THROW_CCE();\n $l$block_0: {\n // Inline function 'kotlin.requireNotNull' call\n // Inline function 'kotlin.contracts.contract' call\n if (value == null) {\n // Inline function 'kotlinx.serialization.json.internal.encodePolymorphically.' call\n var message = 'Value for serializer ' + serializer.ok() + ' should always be non-null. Please report issue to the kotlinx.serialization tracker.';\n throw IllegalArgumentException_init_$Create$(toString(message));\n } else {\n break $l$block_0;\n }\n }\n var actual = findPolymorphicSerializer_0(casted, this, value);\n if (!(baseClassDiscriminator == null)) {\n validateIfSealed$accessor$1ad0flx(serializer, actual, baseClassDiscriminator);\n }\n checkKind(actual.ok().ul());\n tmp_1 = isInterface(actual, SerializationStrategy) ? actual : THROW_CCE();\n } else {\n tmp_1 = serializer;\n }\n var actualSerializer = tmp_1;\n if (!(baseClassDiscriminator == null)) {\n // Inline function 'kotlinx.serialization.json.internal.StreamingJsonEncoder.encodeSerializableValue.' call\n this.u1a_1 = baseClassDiscriminator;\n }\n actualSerializer.pk(this, value);\n }\n };\n protoOf(StreamingJsonEncoder).nn = function (descriptor) {\n var newMode = switchMode(this.o1a_1, descriptor);\n if (!(newMode.a1d_1 === get_INVALID())) {\n this.n1a_1.y18(newMode.a1d_1);\n this.n1a_1.t18();\n }\n if (!(this.u1a_1 == null)) {\n encodeTypeInfo(this, descriptor);\n this.u1a_1 = null;\n }\n if (this.p1a_1.equals(newMode)) {\n return this;\n }\n var tmp0_safe_receiver = this.q1a_1;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver[newMode.x9_1];\n return tmp1_elvis_lhs == null ? new StreamingJsonEncoder(this.n1a_1, this.o1a_1, newMode, this.q1a_1) : tmp1_elvis_lhs;\n };\n protoOf(StreamingJsonEncoder).on = function (descriptor) {\n if (!(this.p1a_1.b1d_1 === get_INVALID())) {\n this.n1a_1.u18();\n this.n1a_1.w18();\n this.n1a_1.y18(this.p1a_1.b1d_1);\n }\n };\n protoOf(StreamingJsonEncoder).go = function (descriptor, index) {\n switch (this.p1a_1.x9_1) {\n case 1:\n if (!this.n1a_1.s18_1) {\n this.n1a_1.y18(get_COMMA());\n }\n\n this.n1a_1.v18();\n break;\n case 2:\n if (!this.n1a_1.s18_1) {\n var tmp = this;\n var tmp_0;\n if ((index % 2 | 0) === 0) {\n this.n1a_1.y18(get_COMMA());\n this.n1a_1.v18();\n tmp_0 = true;\n } else {\n this.n1a_1.y18(get_COLON());\n this.n1a_1.x18();\n tmp_0 = false;\n }\n tmp.t1a_1 = tmp_0;\n } else {\n this.t1a_1 = true;\n this.n1a_1.v18();\n }\n\n break;\n case 3:\n if (index === 0)\n this.t1a_1 = true;\n if (index === 1) {\n this.n1a_1.y18(get_COMMA());\n this.n1a_1.x18();\n this.t1a_1 = false;\n }\n\n break;\n default:\n if (!this.n1a_1.s18_1) {\n this.n1a_1.y18(get_COMMA());\n }\n\n this.n1a_1.v18();\n this.ro(getJsonElementName(descriptor, this.o1a_1, index));\n this.n1a_1.y18(get_COLON());\n this.n1a_1.x18();\n break;\n }\n return true;\n };\n protoOf(StreamingJsonEncoder).gp = function (descriptor, index, serializer, value) {\n if (!(value == null) ? true : this.s1a_1.y16_1) {\n protoOf(AbstractEncoder).gp.call(this, descriptor, index, serializer, value);\n }\n };\n protoOf(StreamingJsonEncoder).to = function (descriptor) {\n var tmp;\n if (get_isUnsignedNumber(descriptor)) {\n // Inline function 'kotlinx.serialization.json.internal.StreamingJsonEncoder.composerAs' call\n var tmp_0;\n var tmp_1 = this.n1a_1;\n if (tmp_1 instanceof ComposerForUnsignedNumbers) {\n tmp_0 = this.n1a_1;\n } else {\n tmp_0 = new ComposerForUnsignedNumbers(this.n1a_1.r18_1, this.t1a_1);\n }\n var tmp$ret$1 = tmp_0;\n tmp = new StreamingJsonEncoder(tmp$ret$1, this.o1a_1, this.p1a_1, null);\n } else if (get_isUnquotedLiteral(descriptor)) {\n // Inline function 'kotlinx.serialization.json.internal.StreamingJsonEncoder.composerAs' call\n var tmp_2;\n var tmp_3 = this.n1a_1;\n if (tmp_3 instanceof ComposerForUnquotedLiterals) {\n tmp_2 = this.n1a_1;\n } else {\n tmp_2 = new ComposerForUnquotedLiterals(this.n1a_1.r18_1, this.t1a_1);\n }\n var tmp$ret$3 = tmp_2;\n tmp = new StreamingJsonEncoder(tmp$ret$3, this.o1a_1, this.p1a_1, null);\n } else {\n tmp = protoOf(AbstractEncoder).to.call(this, descriptor);\n }\n return tmp;\n };\n protoOf(StreamingJsonEncoder).io = function () {\n this.n1a_1.a19(get_NULL());\n };\n protoOf(StreamingJsonEncoder).jo = function (value) {\n if (this.t1a_1) {\n this.ro(value.toString());\n } else {\n this.n1a_1.j19(value);\n }\n };\n protoOf(StreamingJsonEncoder).ko = function (value) {\n if (this.t1a_1) {\n this.ro(value.toString());\n } else {\n this.n1a_1.e19(value);\n }\n };\n protoOf(StreamingJsonEncoder).lo = function (value) {\n if (this.t1a_1) {\n this.ro(value.toString());\n } else {\n this.n1a_1.g19(value);\n }\n };\n protoOf(StreamingJsonEncoder).mo = function (value) {\n if (this.t1a_1) {\n this.ro(value.toString());\n } else {\n this.n1a_1.h19(value);\n }\n };\n protoOf(StreamingJsonEncoder).no = function (value) {\n if (this.t1a_1) {\n this.ro(value.toString());\n } else {\n this.n1a_1.i19(value);\n }\n };\n protoOf(StreamingJsonEncoder).oo = function (value) {\n if (this.t1a_1) {\n this.ro(value.toString());\n } else {\n this.n1a_1.c19(value);\n }\n if (!this.s1a_1.d17_1 ? !isFinite(value) : false) {\n throw InvalidFloatingPointEncoded_0(value, toString(this.n1a_1.r18_1));\n }\n };\n protoOf(StreamingJsonEncoder).po = function (value) {\n if (this.t1a_1) {\n this.ro(value.toString());\n } else {\n this.n1a_1.d19(value);\n }\n if (!this.s1a_1.d17_1 ? !isFinite_0(value) : false) {\n throw InvalidFloatingPointEncoded_0(value, toString(this.n1a_1.r18_1));\n }\n };\n protoOf(StreamingJsonEncoder).qo = function (value) {\n this.ro(toString_0(value));\n };\n protoOf(StreamingJsonEncoder).ro = function (value) {\n return this.n1a_1.k19(value);\n };\n protoOf(StreamingJsonEncoder).so = function (enumDescriptor, index) {\n this.ro(enumDescriptor.yl(index));\n };\n function get_isUnsignedNumber(_this__u8e3s4) {\n _init_properties_StreamingJsonEncoder_kt__pn1bsi();\n return _this__u8e3s4.tl() ? get_unsignedNumberDescriptors().p(_this__u8e3s4) : false;\n }\n function get_isUnquotedLiteral(_this__u8e3s4) {\n _init_properties_StreamingJsonEncoder_kt__pn1bsi();\n return _this__u8e3s4.tl() ? equals(_this__u8e3s4, get_jsonUnquotedLiteralDescriptor()) : false;\n }\n var properties_initialized_StreamingJsonEncoder_kt_6ifwwk;\n function _init_properties_StreamingJsonEncoder_kt__pn1bsi() {\n if (!properties_initialized_StreamingJsonEncoder_kt_6ifwwk) {\n properties_initialized_StreamingJsonEncoder_kt_6ifwwk = true;\n unsignedNumberDescriptors = setOf([serializer_1(Companion_getInstance_0()).ok(), serializer_0(Companion_getInstance()).ok(), serializer_2(Companion_getInstance_1()).ok(), serializer_3(Companion_getInstance_2()).ok()]);\n }\n }\n function get_ESCAPE_STRINGS() {\n _init_properties_StringOps_kt__fcy1db();\n return ESCAPE_STRINGS;\n }\n var ESCAPE_STRINGS;\n var ESCAPE_MARKERS;\n function toHexChar(i) {\n _init_properties_StringOps_kt__fcy1db();\n var d = i & 15;\n var tmp;\n if (d < 10) {\n // Inline function 'kotlin.code' call\n var this_0 = _Char___init__impl__6a9atx(48);\n var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);\n tmp = numberToChar(d + tmp$ret$0 | 0);\n } else {\n var tmp_0 = d - 10 | 0;\n // Inline function 'kotlin.code' call\n var this_1 = _Char___init__impl__6a9atx(97);\n var tmp$ret$1 = Char__toInt_impl_vasixd(this_1);\n tmp = numberToChar(tmp_0 + tmp$ret$1 | 0);\n }\n return tmp;\n }\n function printQuoted(_this__u8e3s4, value) {\n _init_properties_StringOps_kt__fcy1db();\n _this__u8e3s4.z5(get_STRING());\n var lastPos = 0;\n var inductionVariable = 0;\n var last = charSequenceLength(value) - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.code' call\n var this_0 = charSequenceGet(value, i);\n var c = Char__toInt_impl_vasixd(this_0);\n if (c < get_ESCAPE_STRINGS().length ? !(get_ESCAPE_STRINGS()[c] == null) : false) {\n _this__u8e3s4.g8(value, lastPos, i);\n _this__u8e3s4.y5(get_ESCAPE_STRINGS()[c]);\n lastPos = i + 1 | 0;\n }\n }\n while (inductionVariable <= last);\n if (!(lastPos === 0)) {\n _this__u8e3s4.g8(value, lastPos, value.length);\n } else {\n _this__u8e3s4.y5(value);\n }\n _this__u8e3s4.z5(get_STRING());\n }\n function toBooleanStrictOrNull_0(_this__u8e3s4) {\n _init_properties_StringOps_kt__fcy1db();\n return equals_0(_this__u8e3s4, 'true', true) ? true : equals_0(_this__u8e3s4, 'false', true) ? false : null;\n }\n var properties_initialized_StringOps_kt_wzaea7;\n function _init_properties_StringOps_kt__fcy1db() {\n if (!properties_initialized_StringOps_kt_wzaea7) {\n properties_initialized_StringOps_kt_wzaea7 = true;\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.arrayOfNulls' call\n var this_0 = fillArrayVal(Array(93), null);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.json.internal.ESCAPE_STRINGS.' call\n var inductionVariable = 0;\n if (inductionVariable <= 31)\n do {\n var c = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var c1 = toHexChar(c >> 12);\n var c2 = toHexChar(c >> 8);\n var c3 = toHexChar(c >> 4);\n var c4 = toHexChar(c);\n this_0[c] = '\\\\u' + toString_0(c1) + toString_0(c2) + toString_0(c3) + toString_0(c4);\n }\n while (inductionVariable <= 31);\n // Inline function 'kotlin.code' call\n var this_1 = _Char___init__impl__6a9atx(34);\n this_0[Char__toInt_impl_vasixd(this_1)] = '\\\\\"';\n // Inline function 'kotlin.code' call\n var this_2 = _Char___init__impl__6a9atx(92);\n this_0[Char__toInt_impl_vasixd(this_2)] = '\\\\\\\\';\n // Inline function 'kotlin.code' call\n var this_3 = _Char___init__impl__6a9atx(9);\n this_0[Char__toInt_impl_vasixd(this_3)] = '\\\\t';\n // Inline function 'kotlin.code' call\n var this_4 = _Char___init__impl__6a9atx(8);\n this_0[Char__toInt_impl_vasixd(this_4)] = '\\\\b';\n // Inline function 'kotlin.code' call\n var this_5 = _Char___init__impl__6a9atx(10);\n this_0[Char__toInt_impl_vasixd(this_5)] = '\\\\n';\n // Inline function 'kotlin.code' call\n var this_6 = _Char___init__impl__6a9atx(13);\n this_0[Char__toInt_impl_vasixd(this_6)] = '\\\\r';\n this_0[12] = '\\\\f';\n ESCAPE_STRINGS = this_0;\n // Inline function 'kotlin.apply' call\n var this_7 = new Int8Array(93);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.json.internal.ESCAPE_MARKERS.' call\n var inductionVariable_0 = 0;\n if (inductionVariable_0 <= 31)\n do {\n var c_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n this_7[c_0] = 1;\n }\n while (inductionVariable_0 <= 31);\n // Inline function 'kotlin.code' call\n var this_8 = _Char___init__impl__6a9atx(34);\n this_7[Char__toInt_impl_vasixd(this_8)] = 34;\n // Inline function 'kotlin.code' call\n var this_9 = _Char___init__impl__6a9atx(92);\n this_7[Char__toInt_impl_vasixd(this_9)] = 92;\n // Inline function 'kotlin.code' call\n var this_10 = _Char___init__impl__6a9atx(9);\n this_7[Char__toInt_impl_vasixd(this_10)] = 116;\n // Inline function 'kotlin.code' call\n var this_11 = _Char___init__impl__6a9atx(8);\n this_7[Char__toInt_impl_vasixd(this_11)] = 98;\n // Inline function 'kotlin.code' call\n var this_12 = _Char___init__impl__6a9atx(10);\n this_7[Char__toInt_impl_vasixd(this_12)] = 110;\n // Inline function 'kotlin.code' call\n var this_13 = _Char___init__impl__6a9atx(13);\n this_7[Char__toInt_impl_vasixd(this_13)] = 114;\n this_7[12] = 102;\n ESCAPE_MARKERS = this_7;\n }\n }\n function readJson(json, element, deserializer) {\n var tmp;\n if (element instanceof JsonObject) {\n tmp = new JsonTreeDecoder(json, element);\n } else {\n if (element instanceof JsonArray) {\n tmp = new JsonTreeListDecoder(json, element);\n } else {\n var tmp_0;\n if (element instanceof JsonLiteral) {\n tmp_0 = true;\n } else {\n tmp_0 = equals(element, JsonNull_getInstance());\n }\n if (tmp_0) {\n tmp = new JsonPrimitiveDecoder(json, element instanceof JsonPrimitive ? element : THROW_CCE());\n } else {\n noWhenBranchMatchedException();\n }\n }\n }\n var input = tmp;\n return input.mn(deserializer);\n }\n function unparsedPrimitive($this, primitive) {\n throw JsonDecodingException_0(-1, \"Failed to parse literal as '\" + primitive + \"' value\", toString($this.l1d()));\n }\n function asLiteral(_this__u8e3s4, $this, type) {\n var tmp0_elvis_lhs = _this__u8e3s4 instanceof JsonLiteral ? _this__u8e3s4 : null;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw JsonDecodingException_1(-1, \"Unexpected 'null' literal when non-nullable \" + type + ' was expected');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function AbstractJsonTreeDecoder(json, value) {\n NamedValueDecoder.call(this);\n this.i1d_1 = json;\n this.j1d_1 = value;\n this.k1d_1 = this.j17().f15_1;\n }\n protoOf(AbstractJsonTreeDecoder).j17 = function () {\n return this.i1d_1;\n };\n protoOf(AbstractJsonTreeDecoder).u2 = function () {\n return this.j1d_1;\n };\n protoOf(AbstractJsonTreeDecoder).co = function () {\n return this.j17().co();\n };\n protoOf(AbstractJsonTreeDecoder).l1d = function () {\n var tmp0_safe_receiver = this.u11();\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.currentObject.' call\n tmp = this.m1d(tmp0_safe_receiver);\n }\n var tmp1_elvis_lhs = tmp;\n return tmp1_elvis_lhs == null ? this.u2() : tmp1_elvis_lhs;\n };\n protoOf(AbstractJsonTreeDecoder).k17 = function () {\n return this.l1d();\n };\n protoOf(AbstractJsonTreeDecoder).mn = function (deserializer) {\n return decodeSerializableValuePolymorphic(this, deserializer);\n };\n protoOf(AbstractJsonTreeDecoder).v11 = function (parentName, childName) {\n return childName;\n };\n protoOf(AbstractJsonTreeDecoder).nn = function (descriptor) {\n var currentObject = this.l1d();\n var tmp0_subject = descriptor.ul();\n var tmp;\n var tmp_0;\n if (equals(tmp0_subject, LIST_getInstance())) {\n tmp_0 = true;\n } else {\n tmp_0 = tmp0_subject instanceof PolymorphicKind;\n }\n if (tmp_0) {\n var tmp_1 = this.j17();\n // Inline function 'kotlinx.serialization.json.internal.cast' call\n if (!(currentObject instanceof JsonArray)) {\n throw JsonDecodingException_1(-1, 'Expected ' + getKClass(JsonArray) + ' as the serialized body of ' + descriptor.ql() + ', but had ' + getKClassFromExpression(currentObject));\n }\n tmp = new JsonTreeListDecoder(tmp_1, currentObject);\n } else {\n if (equals(tmp0_subject, MAP_getInstance())) {\n // Inline function 'kotlinx.serialization.json.internal.selectMapMode' call\n var this_0 = this.j17();\n var keyDescriptor = carrierDescriptor(descriptor.wl(0), this_0.co());\n var keyKind = keyDescriptor.ul();\n var tmp_2;\n var tmp_3;\n if (keyKind instanceof PrimitiveKind) {\n tmp_3 = true;\n } else {\n tmp_3 = equals(keyKind, ENUM_getInstance());\n }\n if (tmp_3) {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.beginStructure.' call\n var tmp_4 = this.j17();\n // Inline function 'kotlinx.serialization.json.internal.cast' call\n if (!(currentObject instanceof JsonObject)) {\n throw JsonDecodingException_1(-1, 'Expected ' + getKClass(JsonObject) + ' as the serialized body of ' + descriptor.ql() + ', but had ' + getKClassFromExpression(currentObject));\n }\n tmp_2 = new JsonTreeMapDecoder(tmp_4, currentObject);\n } else {\n if (this_0.f15_1.w16_1) {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.beginStructure.' call\n var tmp_5 = this.j17();\n // Inline function 'kotlinx.serialization.json.internal.cast' call\n if (!(currentObject instanceof JsonArray)) {\n throw JsonDecodingException_1(-1, 'Expected ' + getKClass(JsonArray) + ' as the serialized body of ' + descriptor.ql() + ', but had ' + getKClassFromExpression(currentObject));\n }\n tmp_2 = new JsonTreeListDecoder(tmp_5, currentObject);\n } else {\n throw InvalidKeyKindException(keyDescriptor);\n }\n }\n tmp = tmp_2;\n } else {\n var tmp_6 = this.j17();\n // Inline function 'kotlinx.serialization.json.internal.cast' call\n if (!(currentObject instanceof JsonObject)) {\n throw JsonDecodingException_1(-1, 'Expected ' + getKClass(JsonObject) + ' as the serialized body of ' + descriptor.ql() + ', but had ' + getKClassFromExpression(currentObject));\n }\n tmp = new JsonTreeDecoder(tmp_6, currentObject);\n }\n }\n return tmp;\n };\n protoOf(AbstractJsonTreeDecoder).on = function (descriptor) {\n };\n protoOf(AbstractJsonTreeDecoder).ym = function () {\n var tmp = this.l1d();\n return !(tmp instanceof JsonNull);\n };\n protoOf(AbstractJsonTreeDecoder).n1d = function (tag) {\n var currentElement = this.m1d(tag);\n var tmp0_elvis_lhs = currentElement instanceof JsonPrimitive ? currentElement : null;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw JsonDecodingException_0(-1, 'Expected JsonPrimitive at ' + tag + ', found ' + currentElement, toString(this.l1d()));\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(AbstractJsonTreeDecoder).o1d = function (tag, enumDescriptor) {\n return getJsonNameIndexOrThrow(enumDescriptor, this.j17(), this.n1d(tag).p17());\n };\n protoOf(AbstractJsonTreeDecoder).d13 = function (tag, enumDescriptor) {\n return this.o1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), enumDescriptor);\n };\n protoOf(AbstractJsonTreeDecoder).p1d = function (tag) {\n return !(this.m1d(tag) === JsonNull_getInstance());\n };\n protoOf(AbstractJsonTreeDecoder).t12 = function (tag) {\n return this.p1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE());\n };\n protoOf(AbstractJsonTreeDecoder).q1d = function (tag) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.primitive' call\n var this_0 = this.n1d(tag);\n try {\n var tmp0_elvis_lhs = get_booleanOrNull(this_0);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n unparsedPrimitive(this, 'boolean');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n tmp$ret$1 = tmp;\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n unparsedPrimitive(this, 'boolean');\n } else {\n throw $p;\n }\n }\n }\n return tmp$ret$1;\n };\n protoOf(AbstractJsonTreeDecoder).u12 = function (tag) {\n return this.q1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE());\n };\n protoOf(AbstractJsonTreeDecoder).r1d = function (tag) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.primitive' call\n var this_0 = this.n1d(tag);\n try {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeTaggedByte.' call\n var result = get_int(this_0);\n var tmp;\n var containsLower = ByteCompanionObject_instance.MIN_VALUE;\n if (result <= ByteCompanionObject_instance.MAX_VALUE ? containsLower <= result : false) {\n tmp = toByte(result);\n } else {\n tmp = null;\n }\n var tmp0_elvis_lhs = tmp;\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n unparsedPrimitive(this, 'byte');\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n tmp$ret$1 = tmp_0;\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n unparsedPrimitive(this, 'byte');\n } else {\n throw $p;\n }\n }\n }\n return tmp$ret$1;\n };\n protoOf(AbstractJsonTreeDecoder).v12 = function (tag) {\n return this.r1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE());\n };\n protoOf(AbstractJsonTreeDecoder).s1d = function (tag) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.primitive' call\n var this_0 = this.n1d(tag);\n try {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeTaggedShort.' call\n var result = get_int(this_0);\n var tmp;\n var containsLower = ShortCompanionObject_instance.MIN_VALUE;\n if (result <= ShortCompanionObject_instance.MAX_VALUE ? containsLower <= result : false) {\n tmp = toShort(result);\n } else {\n tmp = null;\n }\n var tmp0_elvis_lhs = tmp;\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n unparsedPrimitive(this, 'short');\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n tmp$ret$1 = tmp_0;\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n unparsedPrimitive(this, 'short');\n } else {\n throw $p;\n }\n }\n }\n return tmp$ret$1;\n };\n protoOf(AbstractJsonTreeDecoder).w12 = function (tag) {\n return this.s1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE());\n };\n protoOf(AbstractJsonTreeDecoder).t1d = function (tag) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.primitive' call\n var this_0 = this.n1d(tag);\n try {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeTaggedInt.' call\n var tmp0_elvis_lhs = get_int(this_0);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n unparsedPrimitive(this, 'int');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n tmp$ret$1 = tmp;\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n unparsedPrimitive(this, 'int');\n } else {\n throw $p;\n }\n }\n }\n return tmp$ret$1;\n };\n protoOf(AbstractJsonTreeDecoder).x12 = function (tag) {\n return this.t1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE());\n };\n protoOf(AbstractJsonTreeDecoder).u1d = function (tag) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.primitive' call\n var this_0 = this.n1d(tag);\n try {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeTaggedLong.' call\n var tmp0_elvis_lhs = get_long(this_0);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n unparsedPrimitive(this, 'long');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n tmp$ret$1 = tmp;\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n unparsedPrimitive(this, 'long');\n } else {\n throw $p;\n }\n }\n }\n return tmp$ret$1;\n };\n protoOf(AbstractJsonTreeDecoder).y12 = function (tag) {\n return this.u1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE());\n };\n protoOf(AbstractJsonTreeDecoder).v1d = function (tag) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.primitive' call\n var this_0 = this.n1d(tag);\n try {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeTaggedFloat.' call\n var tmp0_elvis_lhs = get_float(this_0);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n unparsedPrimitive(this, 'float');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n tmp$ret$1 = tmp;\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n unparsedPrimitive(this, 'float');\n } else {\n throw $p;\n }\n }\n }\n var result = tmp$ret$1;\n var specialFp = this.j17().f15_1.d17_1;\n if (specialFp ? true : isFinite(result))\n return result;\n throw InvalidFloatingPointDecoded(result, tag, toString(this.l1d()));\n };\n protoOf(AbstractJsonTreeDecoder).z12 = function (tag) {\n return this.v1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE());\n };\n protoOf(AbstractJsonTreeDecoder).w1d = function (tag) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.primitive' call\n var this_0 = this.n1d(tag);\n try {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeTaggedDouble.' call\n var tmp0_elvis_lhs = get_double(this_0);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n unparsedPrimitive(this, 'double');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n tmp$ret$1 = tmp;\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n unparsedPrimitive(this, 'double');\n } else {\n throw $p;\n }\n }\n }\n var result = tmp$ret$1;\n var specialFp = this.j17().f15_1.d17_1;\n if (specialFp ? true : isFinite_0(result))\n return result;\n throw InvalidFloatingPointDecoded(result, tag, toString(this.l1d()));\n };\n protoOf(AbstractJsonTreeDecoder).a13 = function (tag) {\n return this.w1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE());\n };\n protoOf(AbstractJsonTreeDecoder).x1d = function (tag) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.primitive' call\n var this_0 = this.n1d(tag);\n try {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeTaggedChar.' call\n var tmp0_elvis_lhs = single(this_0.p17());\n var tmp;\n var tmp_0 = tmp0_elvis_lhs;\n if ((tmp_0 == null ? null : new Char(tmp_0)) == null) {\n unparsedPrimitive(this, 'char');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n tmp$ret$1 = tmp;\n break $l$block;\n } catch ($p) {\n if ($p instanceof IllegalArgumentException) {\n var e = $p;\n unparsedPrimitive(this, 'char');\n } else {\n throw $p;\n }\n }\n }\n return tmp$ret$1;\n };\n protoOf(AbstractJsonTreeDecoder).b13 = function (tag) {\n return this.x1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE());\n };\n protoOf(AbstractJsonTreeDecoder).y1d = function (tag) {\n var value = this.n1d(tag);\n if (!this.j17().f15_1.v16_1) {\n var literal = asLiteral(value, this, 'string');\n if (!literal.w17_1)\n throw JsonDecodingException_0(-1, \"String literal for key '\" + tag + \"' should be quoted.\\n\" + get_lenientHint(), toString(this.l1d()));\n }\n if (value instanceof JsonNull)\n throw JsonDecodingException_0(-1, \"Unexpected 'null' value instead of string literal\", toString(this.l1d()));\n return value.p17();\n };\n protoOf(AbstractJsonTreeDecoder).c13 = function (tag) {\n return this.y1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE());\n };\n protoOf(AbstractJsonTreeDecoder).z1d = function (tag, inlineDescriptor) {\n return get_isUnsignedNumber(inlineDescriptor) ? new JsonDecoderForUnsignedTypes(new StringJsonLexer(this.n1d(tag).p17()), this.j17()) : protoOf(NamedValueDecoder).e13.call(this, tag, inlineDescriptor);\n };\n protoOf(AbstractJsonTreeDecoder).e13 = function (tag, inlineDescriptor) {\n return this.z1d((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), inlineDescriptor);\n };\n protoOf(AbstractJsonTreeDecoder).kn = function (descriptor) {\n return !(this.u11() == null) ? protoOf(NamedValueDecoder).kn.call(this, descriptor) : (new JsonPrimitiveDecoder(this.j17(), this.u2())).kn(descriptor);\n };\n function coerceInputValue_0($this, descriptor, index, tag) {\n var tmp$ret$0;\n $l$block_3: {\n // Inline function 'kotlinx.serialization.json.internal.tryCoerceValue' call\n var this_0 = $this.j17();\n if (!descriptor.zl(index)) {\n tmp$ret$0 = false;\n break $l$block_3;\n }\n var elementDescriptor = descriptor.wl(index);\n var tmp;\n if (!elementDescriptor.ml()) {\n // Inline function 'kotlinx.serialization.json.internal.JsonTreeDecoder.coerceInputValue.' call\n var tmp_0 = $this.m1d(tag);\n tmp = tmp_0 instanceof JsonNull;\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_3;\n }\n if (equals(elementDescriptor.ul(), ENUM_getInstance())) {\n var tmp_1;\n if (elementDescriptor.ml()) {\n // Inline function 'kotlinx.serialization.json.internal.JsonTreeDecoder.coerceInputValue.' call\n var tmp_2 = $this.m1d(tag);\n tmp_1 = tmp_2 instanceof JsonNull;\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp$ret$0 = false;\n break $l$block_3;\n }\n // Inline function 'kotlinx.serialization.json.internal.JsonTreeDecoder.coerceInputValue.' call\n var tmp_3 = $this.m1d(tag);\n var tmp0_safe_receiver = tmp_3 instanceof JsonPrimitive ? tmp_3 : null;\n var tmp0_elvis_lhs = tmp0_safe_receiver == null ? null : get_contentOrNull(tmp0_safe_receiver);\n var tmp_4;\n if (tmp0_elvis_lhs == null) {\n tmp$ret$0 = false;\n break $l$block_3;\n } else {\n tmp_4 = tmp0_elvis_lhs;\n }\n var enumValue = tmp_4;\n var enumIndex = getJsonNameIndex(elementDescriptor, this_0, enumValue);\n if (enumIndex === -3) {\n // Inline function 'kotlinx.serialization.json.internal.tryCoerceValue.' call\n tmp$ret$0 = true;\n break $l$block_3;\n }\n }\n tmp$ret$0 = false;\n }\n return tmp$ret$0;\n }\n function absenceIsNull($this, descriptor, index) {\n $this.j1e_1 = (!$this.j17().f15_1.y16_1 ? !descriptor.zl(index) : false) ? descriptor.wl(index).ml() : false;\n return $this.j1e_1;\n }\n function JsonTreeDecoder(json, value, polyDiscriminator, polyDescriptor) {\n polyDiscriminator = polyDiscriminator === VOID ? null : polyDiscriminator;\n polyDescriptor = polyDescriptor === VOID ? null : polyDescriptor;\n AbstractJsonTreeDecoder.call(this, json, value);\n this.f1e_1 = value;\n this.g1e_1 = polyDiscriminator;\n this.h1e_1 = polyDescriptor;\n this.i1e_1 = 0;\n this.j1e_1 = false;\n }\n protoOf(JsonTreeDecoder).u2 = function () {\n return this.f1e_1;\n };\n protoOf(JsonTreeDecoder).eo = function (descriptor) {\n while (this.i1e_1 < descriptor.sl()) {\n var tmp1 = this.i1e_1;\n this.i1e_1 = tmp1 + 1 | 0;\n var name = this.q11(descriptor, tmp1);\n var index = this.i1e_1 - 1 | 0;\n this.j1e_1 = false;\n var tmp;\n var tmp_0;\n // Inline function 'kotlin.collections.contains' call\n // Inline function 'kotlin.collections.containsKey' call\n var this_0 = this.u2();\n if ((isInterface(this_0, Map) ? this_0 : THROW_CCE()).y2(name)) {\n tmp_0 = true;\n } else {\n tmp_0 = absenceIsNull(this, descriptor, index);\n }\n if (tmp_0) {\n tmp = !this.k1d_1.a17_1 ? true : !coerceInputValue_0(this, descriptor, index, name);\n } else {\n tmp = false;\n }\n if (tmp) {\n return index;\n }\n }\n return -1;\n };\n protoOf(JsonTreeDecoder).ym = function () {\n return !this.j1e_1 ? protoOf(AbstractJsonTreeDecoder).ym.call(this) : false;\n };\n protoOf(JsonTreeDecoder).r11 = function (descriptor, index) {\n var strategy = namingStrategy(descriptor, this.j17());\n var baseName = descriptor.yl(index);\n if (strategy == null) {\n if (!this.k1d_1.e17_1)\n return baseName;\n if (this.u2().o2().p(baseName))\n return baseName;\n }\n var deserializationNamesMap_0 = deserializationNamesMap(this.j17(), descriptor);\n // Inline function 'kotlin.collections.find' call\n var this_0 = this.u2().o2();\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlinx.serialization.json.internal.JsonTreeDecoder.elementName.' call\n if (deserializationNamesMap_0.b3(element) === index) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_safe_receiver = tmp$ret$1;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp0_safe_receiver;\n }\n var fallbackName = strategy == null ? null : strategy.d1a(descriptor, index, baseName);\n return fallbackName == null ? baseName : fallbackName;\n };\n protoOf(JsonTreeDecoder).m1d = function (tag) {\n return getValue(this.u2(), tag);\n };\n protoOf(JsonTreeDecoder).nn = function (descriptor) {\n if (descriptor === this.h1e_1) {\n var tmp = this.j17();\n // Inline function 'kotlinx.serialization.json.internal.cast' call\n var value = this.l1d();\n var descriptor_0 = this.h1e_1;\n if (!(value instanceof JsonObject)) {\n throw JsonDecodingException_1(-1, 'Expected ' + getKClass(JsonObject) + ' as the serialized body of ' + descriptor_0.ql() + ', but had ' + getKClassFromExpression(value));\n }\n return new JsonTreeDecoder(tmp, value, this.g1e_1, this.h1e_1);\n }\n return protoOf(AbstractJsonTreeDecoder).nn.call(this, descriptor);\n };\n protoOf(JsonTreeDecoder).on = function (descriptor) {\n var tmp;\n if (this.k1d_1.u16_1) {\n tmp = true;\n } else {\n var tmp_0 = descriptor.ul();\n tmp = tmp_0 instanceof PolymorphicKind;\n }\n if (tmp)\n return Unit_instance;\n var strategy = namingStrategy(descriptor, this.j17());\n var tmp_1;\n if (strategy == null ? !this.k1d_1.e17_1 : false) {\n tmp_1 = jsonCachedSerialNames(descriptor);\n } else if (!(strategy == null)) {\n tmp_1 = deserializationNamesMap(this.j17(), descriptor).o2();\n } else {\n var tmp_2 = jsonCachedSerialNames(descriptor);\n // Inline function 'kotlin.collections.orEmpty' call\n var tmp0_safe_receiver = get_schemaCache(this.j17()).n1c(descriptor, get_JsonDeserializationNamesKey());\n var tmp0_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o2();\n var tmp$ret$0 = tmp0_elvis_lhs == null ? emptySet() : tmp0_elvis_lhs;\n tmp_1 = plus_0(tmp_2, tmp$ret$0);\n }\n var names = tmp_1;\n var tmp1_iterator = this.u2().o2().t();\n while (tmp1_iterator.u()) {\n var key = tmp1_iterator.w();\n if (!names.p(key) ? !(key === this.g1e_1) : false) {\n throw UnknownKeyException(key, this.u2().toString());\n }\n }\n };\n function JsonTreeListDecoder(json, value) {\n AbstractJsonTreeDecoder.call(this, json, value);\n this.p1e_1 = value;\n this.q1e_1 = this.p1e_1.n();\n this.r1e_1 = -1;\n }\n protoOf(JsonTreeListDecoder).u2 = function () {\n return this.p1e_1;\n };\n protoOf(JsonTreeListDecoder).r11 = function (descriptor, index) {\n return index.toString();\n };\n protoOf(JsonTreeListDecoder).m1d = function (tag) {\n return this.p1e_1.f1(toInt(tag));\n };\n protoOf(JsonTreeListDecoder).eo = function (descriptor) {\n while (this.r1e_1 < (this.q1e_1 - 1 | 0)) {\n this.r1e_1 = this.r1e_1 + 1 | 0;\n return this.r1e_1;\n }\n return -1;\n };\n function JsonPrimitiveDecoder(json, value) {\n AbstractJsonTreeDecoder.call(this, json, value);\n this.x1e_1 = value;\n this.m12(get_PRIMITIVE_TAG());\n }\n protoOf(JsonPrimitiveDecoder).u2 = function () {\n return this.x1e_1;\n };\n protoOf(JsonPrimitiveDecoder).eo = function (descriptor) {\n return 0;\n };\n protoOf(JsonPrimitiveDecoder).m1d = function (tag) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(tag === get_PRIMITIVE_TAG())) {\n // Inline function 'kotlinx.serialization.json.internal.JsonPrimitiveDecoder.currentElement.' call\n var message = \"This input can only handle primitives with '\" + get_PRIMITIVE_TAG() + \"' tag\";\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n return this.x1e_1;\n };\n function JsonTreeMapDecoder(json, value) {\n JsonTreeDecoder.call(this, json, value);\n this.i1f_1 = value;\n this.j1f_1 = toList(this.i1f_1.o2());\n this.k1f_1 = imul(this.j1f_1.n(), 2);\n this.l1f_1 = -1;\n }\n protoOf(JsonTreeMapDecoder).u2 = function () {\n return this.i1f_1;\n };\n protoOf(JsonTreeMapDecoder).r11 = function (descriptor, index) {\n var i = index / 2 | 0;\n return this.j1f_1.f1(i);\n };\n protoOf(JsonTreeMapDecoder).eo = function (descriptor) {\n while (this.l1f_1 < (this.k1f_1 - 1 | 0)) {\n this.l1f_1 = this.l1f_1 + 1 | 0;\n return this.l1f_1;\n }\n return -1;\n };\n protoOf(JsonTreeMapDecoder).m1d = function (tag) {\n return (this.l1f_1 % 2 | 0) === 0 ? JsonPrimitive_2(tag) : getValue(this.i1f_1, tag);\n };\n protoOf(JsonTreeMapDecoder).on = function (descriptor) {\n };\n function readPolymorphicJson(_this__u8e3s4, discriminator, element, deserializer) {\n return (new JsonTreeDecoder(_this__u8e3s4, element, discriminator, deserializer.ok())).mn(deserializer);\n }\n function writeJson(json, value, serializer) {\n var result = {_v: null};\n var encoder = new JsonTreeEncoder(json, writeJson$lambda(result));\n encoder.fp(serializer, value);\n var tmp;\n if (result._v == null) {\n throwUninitializedPropertyAccessException('result');\n } else {\n tmp = result._v;\n }\n return tmp;\n }\n function JsonTreeEncoder(json, nodeConsumer) {\n AbstractJsonTreeEncoder.call(this, json, nodeConsumer);\n var tmp = this;\n // Inline function 'kotlin.collections.linkedMapOf' call\n tmp.w1f_1 = LinkedHashMap_init_$Create$();\n }\n protoOf(JsonTreeEncoder).x1f = function (key, element) {\n // Inline function 'kotlin.collections.set' call\n this.w1f_1.r2(key, element);\n };\n protoOf(JsonTreeEncoder).gp = function (descriptor, index, serializer, value) {\n if (!(value == null) ? true : this.p1f_1.y16_1) {\n protoOf(AbstractJsonTreeEncoder).gp.call(this, descriptor, index, serializer, value);\n }\n };\n protoOf(JsonTreeEncoder).y1f = function () {\n return new JsonObject(this.w1f_1);\n };\n function inlineUnsignedNumberEncoder($this, tag) {\n return new AbstractJsonTreeEncoder$inlineUnsignedNumberEncoder$1($this, tag);\n }\n function inlineUnquotedLiteralEncoder($this, tag, inlineDescriptor) {\n return new AbstractJsonTreeEncoder$inlineUnquotedLiteralEncoder$1($this, tag, inlineDescriptor);\n }\n function AbstractJsonTreeEncoder$inlineUnsignedNumberEncoder$1(this$0, $tag) {\n this.n1g_1 = this$0;\n this.o1g_1 = $tag;\n AbstractEncoder.call(this);\n this.m1g_1 = this$0.n1f_1.co();\n }\n protoOf(AbstractJsonTreeEncoder$inlineUnsignedNumberEncoder$1).co = function () {\n return this.m1g_1;\n };\n protoOf(AbstractJsonTreeEncoder$inlineUnsignedNumberEncoder$1).p1g = function (s) {\n return this.n1g_1.x1f(this.o1g_1, new JsonLiteral(s, false));\n };\n protoOf(AbstractJsonTreeEncoder$inlineUnsignedNumberEncoder$1).mo = function (value) {\n // Inline function 'kotlin.toUInt' call\n var tmp$ret$0 = _UInt___init__impl__l7qpdl(value);\n return this.p1g(UInt__toString_impl_dbgl21(tmp$ret$0));\n };\n protoOf(AbstractJsonTreeEncoder$inlineUnsignedNumberEncoder$1).no = function (value) {\n // Inline function 'kotlin.toULong' call\n var tmp$ret$0 = _ULong___init__impl__c78o9k(value);\n return this.p1g(ULong__toString_impl_f9au7k(tmp$ret$0));\n };\n protoOf(AbstractJsonTreeEncoder$inlineUnsignedNumberEncoder$1).ko = function (value) {\n // Inline function 'kotlin.toUByte' call\n var tmp$ret$0 = _UByte___init__impl__g9hnc4(value);\n return this.p1g(UByte__toString_impl_v72jg(tmp$ret$0));\n };\n protoOf(AbstractJsonTreeEncoder$inlineUnsignedNumberEncoder$1).lo = function (value) {\n // Inline function 'kotlin.toUShort' call\n var tmp$ret$0 = _UShort___init__impl__jigrne(value);\n return this.p1g(UShort__toString_impl_edaoee(tmp$ret$0));\n };\n function AbstractJsonTreeEncoder$inlineUnquotedLiteralEncoder$1(this$0, $tag, $inlineDescriptor) {\n this.q1g_1 = this$0;\n this.r1g_1 = $tag;\n this.s1g_1 = $inlineDescriptor;\n AbstractEncoder.call(this);\n }\n protoOf(AbstractJsonTreeEncoder$inlineUnquotedLiteralEncoder$1).co = function () {\n return this.q1g_1.n1f_1.co();\n };\n protoOf(AbstractJsonTreeEncoder$inlineUnquotedLiteralEncoder$1).ro = function (value) {\n return this.q1g_1.x1f(this.r1g_1, new JsonLiteral(value, false, this.s1g_1));\n };\n function AbstractJsonTreeEncoder$beginStructure$lambda(this$0) {\n return function (node) {\n this$0.x1f(this$0.l12(), node);\n return Unit_instance;\n };\n }\n function AbstractJsonTreeEncoder(json, nodeConsumer) {\n NamedValueEncoder.call(this);\n this.n1f_1 = json;\n this.o1f_1 = nodeConsumer;\n this.p1f_1 = this.n1f_1.f15_1;\n this.q1f_1 = null;\n }\n protoOf(AbstractJsonTreeEncoder).j17 = function () {\n return this.n1f_1;\n };\n protoOf(AbstractJsonTreeEncoder).co = function () {\n return this.n1f_1.co();\n };\n protoOf(AbstractJsonTreeEncoder).r11 = function (descriptor, index) {\n return getJsonElementName(descriptor, this.n1f_1, index);\n };\n protoOf(AbstractJsonTreeEncoder).kp = function (descriptor, index) {\n return this.p1f_1.t16_1;\n };\n protoOf(AbstractJsonTreeEncoder).v11 = function (parentName, childName) {\n return childName;\n };\n protoOf(AbstractJsonTreeEncoder).ip = function () {\n };\n protoOf(AbstractJsonTreeEncoder).io = function () {\n var tmp0_elvis_lhs = this.u11();\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return this.o1f_1(JsonNull_getInstance());\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var tag = tmp;\n this.z1f(tag);\n };\n protoOf(AbstractJsonTreeEncoder).z1f = function (tag) {\n return this.x1f(tag, JsonNull_getInstance());\n };\n protoOf(AbstractJsonTreeEncoder).y11 = function (tag) {\n return this.z1f((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE());\n };\n protoOf(AbstractJsonTreeEncoder).a1g = function (tag, value) {\n return this.x1f(tag, JsonPrimitive_0(value));\n };\n protoOf(AbstractJsonTreeEncoder).z11 = function (tag, value) {\n return this.a1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), value);\n };\n protoOf(AbstractJsonTreeEncoder).b1g = function (tag, value) {\n return this.x1f(tag, JsonPrimitive_0(value));\n };\n protoOf(AbstractJsonTreeEncoder).a12 = function (tag, value) {\n return this.b1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), value);\n };\n protoOf(AbstractJsonTreeEncoder).c1g = function (tag, value) {\n return this.x1f(tag, JsonPrimitive_0(value));\n };\n protoOf(AbstractJsonTreeEncoder).b12 = function (tag, value) {\n return this.c1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), value);\n };\n protoOf(AbstractJsonTreeEncoder).d1g = function (tag, value) {\n return this.x1f(tag, JsonPrimitive_0(value));\n };\n protoOf(AbstractJsonTreeEncoder).c12 = function (tag, value) {\n return this.d1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), value);\n };\n protoOf(AbstractJsonTreeEncoder).e1g = function (tag, value) {\n this.x1f(tag, JsonPrimitive_0(value));\n if (!this.p1f_1.d17_1 ? !isFinite(value) : false) {\n throw InvalidFloatingPointEncoded(value, tag, toString(this.y1f()));\n }\n };\n protoOf(AbstractJsonTreeEncoder).d12 = function (tag, value) {\n return this.e1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), value);\n };\n protoOf(AbstractJsonTreeEncoder).fp = function (serializer, value) {\n if (!(this.u11() == null) ? true : !get_requiresTopLevelTag(carrierDescriptor(serializer.ok(), this.co()))) {\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.encodePolymorphically' call\n if (this.j17().f15_1.b17_1) {\n serializer.pk(this, value);\n break $l$block;\n }\n var isPolymorphicSerializer = serializer instanceof AbstractPolymorphicSerializer;\n var tmp;\n if (isPolymorphicSerializer) {\n tmp = !this.j17().f15_1.i17_1.equals(ClassDiscriminatorMode_NONE_getInstance());\n } else {\n var tmp_0;\n switch (this.j17().f15_1.i17_1.x9_1) {\n case 0:\n case 2:\n tmp_0 = false;\n break;\n case 1:\n // Inline function 'kotlin.let' call\n\n // Inline function 'kotlin.contracts.contract' call\n\n // Inline function 'kotlinx.serialization.json.internal.encodePolymorphically.' call\n\n var it = serializer.ok().ul();\n tmp_0 = equals(it, CLASS_getInstance()) ? true : equals(it, OBJECT_getInstance());\n break;\n default:\n noWhenBranchMatchedException();\n break;\n }\n tmp = tmp_0;\n }\n var needDiscriminator = tmp;\n var baseClassDiscriminator = needDiscriminator ? classDiscriminator(serializer.ok(), this.j17()) : null;\n var tmp_1;\n if (isPolymorphicSerializer) {\n var casted = serializer instanceof AbstractPolymorphicSerializer ? serializer : THROW_CCE();\n $l$block_0: {\n // Inline function 'kotlin.requireNotNull' call\n // Inline function 'kotlin.contracts.contract' call\n if (value == null) {\n // Inline function 'kotlinx.serialization.json.internal.encodePolymorphically.' call\n var message = 'Value for serializer ' + serializer.ok() + ' should always be non-null. Please report issue to the kotlinx.serialization tracker.';\n throw IllegalArgumentException_init_$Create$(toString(message));\n } else {\n break $l$block_0;\n }\n }\n var actual = findPolymorphicSerializer_0(casted, this, value);\n if (!(baseClassDiscriminator == null)) {\n validateIfSealed$accessor$1ad0flx(serializer, actual, baseClassDiscriminator);\n }\n checkKind(actual.ok().ul());\n tmp_1 = isInterface(actual, SerializationStrategy) ? actual : THROW_CCE();\n } else {\n tmp_1 = serializer;\n }\n var actualSerializer = tmp_1;\n if (!(baseClassDiscriminator == null)) {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeEncoder.encodeSerializableValue.' call\n this.q1f_1 = baseClassDiscriminator;\n }\n actualSerializer.pk(this, value);\n }\n } else {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeEncoder.encodeSerializableValue.' call\n (new JsonPrimitiveEncoder(this.n1f_1, this.o1f_1)).fp(serializer, value);\n }\n };\n protoOf(AbstractJsonTreeEncoder).f1g = function (tag, value) {\n this.x1f(tag, JsonPrimitive_0(value));\n if (!this.p1f_1.d17_1 ? !isFinite_0(value) : false) {\n throw InvalidFloatingPointEncoded(value, tag, toString(this.y1f()));\n }\n };\n protoOf(AbstractJsonTreeEncoder).e12 = function (tag, value) {\n return this.f1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), value);\n };\n protoOf(AbstractJsonTreeEncoder).g1g = function (tag, value) {\n return this.x1f(tag, JsonPrimitive_1(value));\n };\n protoOf(AbstractJsonTreeEncoder).f12 = function (tag, value) {\n return this.g1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), value);\n };\n protoOf(AbstractJsonTreeEncoder).h1g = function (tag, value) {\n return this.x1f(tag, JsonPrimitive_2(toString_0(value)));\n };\n protoOf(AbstractJsonTreeEncoder).g12 = function (tag, value) {\n return this.h1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), value);\n };\n protoOf(AbstractJsonTreeEncoder).i1g = function (tag, value) {\n return this.x1f(tag, JsonPrimitive_2(value));\n };\n protoOf(AbstractJsonTreeEncoder).h12 = function (tag, value) {\n return this.i1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), value);\n };\n protoOf(AbstractJsonTreeEncoder).j1g = function (tag, enumDescriptor, ordinal) {\n return this.x1f(tag, JsonPrimitive_2(enumDescriptor.yl(ordinal)));\n };\n protoOf(AbstractJsonTreeEncoder).i12 = function (tag, enumDescriptor, ordinal) {\n return this.j1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), enumDescriptor, ordinal);\n };\n protoOf(AbstractJsonTreeEncoder).k1g = function (tag, value) {\n this.x1f(tag, JsonPrimitive_2(toString(value)));\n };\n protoOf(AbstractJsonTreeEncoder).w11 = function (tag, value) {\n return this.k1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), value);\n };\n protoOf(AbstractJsonTreeEncoder).l1g = function (tag, inlineDescriptor) {\n return get_isUnsignedNumber(inlineDescriptor) ? inlineUnsignedNumberEncoder(this, tag) : get_isUnquotedLiteral(inlineDescriptor) ? inlineUnquotedLiteralEncoder(this, tag, inlineDescriptor) : protoOf(NamedValueEncoder).j12.call(this, tag, inlineDescriptor);\n };\n protoOf(AbstractJsonTreeEncoder).j12 = function (tag, inlineDescriptor) {\n return this.l1g((!(tag == null) ? typeof tag === 'string' : false) ? tag : THROW_CCE(), inlineDescriptor);\n };\n protoOf(AbstractJsonTreeEncoder).to = function (descriptor) {\n return !(this.u11() == null) ? protoOf(NamedValueEncoder).to.call(this, descriptor) : (new JsonPrimitiveEncoder(this.n1f_1, this.o1f_1)).to(descriptor);\n };\n protoOf(AbstractJsonTreeEncoder).nn = function (descriptor) {\n var tmp;\n if (this.u11() == null) {\n tmp = this.o1f_1;\n } else {\n tmp = AbstractJsonTreeEncoder$beginStructure$lambda(this);\n }\n var consumer = tmp;\n var tmp0_subject = descriptor.ul();\n var tmp_0;\n var tmp_1;\n if (equals(tmp0_subject, LIST_getInstance())) {\n tmp_1 = true;\n } else {\n tmp_1 = tmp0_subject instanceof PolymorphicKind;\n }\n if (tmp_1) {\n tmp_0 = new JsonTreeListEncoder(this.n1f_1, consumer);\n } else {\n if (equals(tmp0_subject, MAP_getInstance())) {\n // Inline function 'kotlinx.serialization.json.internal.selectMapMode' call\n var this_0 = this.n1f_1;\n var keyDescriptor = carrierDescriptor(descriptor.wl(0), this_0.co());\n var keyKind = keyDescriptor.ul();\n var tmp_2;\n var tmp_3;\n if (keyKind instanceof PrimitiveKind) {\n tmp_3 = true;\n } else {\n tmp_3 = equals(keyKind, ENUM_getInstance());\n }\n if (tmp_3) {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeEncoder.beginStructure.' call\n tmp_2 = new JsonTreeMapEncoder(this.n1f_1, consumer);\n } else {\n if (this_0.f15_1.w16_1) {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonTreeEncoder.beginStructure.' call\n tmp_2 = new JsonTreeListEncoder(this.n1f_1, consumer);\n } else {\n throw InvalidKeyKindException(keyDescriptor);\n }\n }\n tmp_0 = tmp_2;\n } else {\n tmp_0 = new JsonTreeEncoder(this.n1f_1, consumer);\n }\n }\n var encoder = tmp_0;\n if (!(this.q1f_1 == null)) {\n encoder.x1f(ensureNotNull(this.q1f_1), JsonPrimitive_2(descriptor.ql()));\n this.q1f_1 = null;\n }\n return encoder;\n };\n protoOf(AbstractJsonTreeEncoder).k12 = function (descriptor) {\n this.o1f_1(this.y1f());\n };\n function get_requiresTopLevelTag(_this__u8e3s4) {\n var tmp;\n var tmp_0 = _this__u8e3s4.ul();\n if (tmp_0 instanceof PrimitiveKind) {\n tmp = true;\n } else {\n tmp = _this__u8e3s4.ul() === ENUM_getInstance();\n }\n return tmp;\n }\n function JsonPrimitiveEncoder(json, nodeConsumer) {\n AbstractJsonTreeEncoder.call(this, json, nodeConsumer);\n this.y1g_1 = null;\n this.m12('primitive');\n }\n protoOf(JsonPrimitiveEncoder).x1f = function (key, element) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(key === 'primitive')) {\n // Inline function 'kotlinx.serialization.json.internal.JsonPrimitiveEncoder.putElement.' call\n var message = \"This output can only consume primitives with 'primitive' tag\";\n throw IllegalArgumentException_init_$Create$(toString(message));\n }\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.y1g_1 == null)) {\n // Inline function 'kotlinx.serialization.json.internal.JsonPrimitiveEncoder.putElement.' call\n var message_0 = 'Primitive element was already recorded. Does call to .encodeXxx happen more than once?';\n throw IllegalArgumentException_init_$Create$(toString(message_0));\n }\n this.y1g_1 = element;\n this.o1f_1(element);\n };\n protoOf(JsonPrimitiveEncoder).y1f = function () {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.requireNotNull' call\n var value = this.y1g_1;\n // Inline function 'kotlin.contracts.contract' call\n if (value == null) {\n // Inline function 'kotlinx.serialization.json.internal.JsonPrimitiveEncoder.getCurrent.' call\n var message = 'Primitive element has not been recorded. Is call to .encodeXxx is missing in serializer?';\n throw IllegalArgumentException_init_$Create$(toString(message));\n } else {\n tmp$ret$1 = value;\n break $l$block;\n }\n }\n return tmp$ret$1;\n };\n function JsonTreeListEncoder(json, nodeConsumer) {\n AbstractJsonTreeEncoder.call(this, json, nodeConsumer);\n var tmp = this;\n // Inline function 'kotlin.collections.arrayListOf' call\n tmp.e1h_1 = ArrayList_init_$Create$();\n }\n protoOf(JsonTreeListEncoder).r11 = function (descriptor, index) {\n return index.toString();\n };\n protoOf(JsonTreeListEncoder).x1f = function (key, element) {\n var idx = toInt(key);\n this.e1h_1.w1(idx, element);\n };\n protoOf(JsonTreeListEncoder).y1f = function () {\n return new JsonArray(this.e1h_1);\n };\n function _get_tag__e6h4qf($this) {\n var tmp = $this.l1h_1;\n if (!(tmp == null))\n return tmp;\n else {\n throwUninitializedPropertyAccessException('tag');\n }\n }\n function JsonTreeMapEncoder(json, nodeConsumer) {\n JsonTreeEncoder.call(this, json, nodeConsumer);\n this.m1h_1 = true;\n }\n protoOf(JsonTreeMapEncoder).x1f = function (key, element) {\n if (this.m1h_1) {\n var tmp = this;\n var tmp_0;\n if (element instanceof JsonPrimitive) {\n tmp_0 = element.p17();\n } else {\n if (element instanceof JsonObject) {\n throw InvalidKeyKindException(JsonObjectSerializer_getInstance().d18_1);\n } else {\n if (element instanceof JsonArray) {\n throw InvalidKeyKindException(JsonArraySerializer_getInstance().e18_1);\n } else {\n noWhenBranchMatchedException();\n }\n }\n }\n tmp.l1h_1 = tmp_0;\n this.m1h_1 = false;\n } else {\n // Inline function 'kotlin.collections.set' call\n var this_0 = this.w1f_1;\n var key_0 = _get_tag__e6h4qf(this);\n this_0.r2(key_0, element);\n this.m1h_1 = true;\n }\n };\n protoOf(JsonTreeMapEncoder).y1f = function () {\n return new JsonObject(this.w1f_1);\n };\n function get_PRIMITIVE_TAG() {\n return PRIMITIVE_TAG;\n }\n var PRIMITIVE_TAG;\n function writeJson$lambda($result) {\n return function (it) {\n $result._v = it;\n return Unit_instance;\n };\n }\n var WriteMode_OBJ_instance;\n var WriteMode_LIST_instance;\n var WriteMode_MAP_instance;\n var WriteMode_POLY_OBJ_instance;\n function values() {\n return [WriteMode_OBJ_getInstance(), WriteMode_LIST_getInstance(), WriteMode_MAP_getInstance(), WriteMode_POLY_OBJ_getInstance()];\n }\n function get_entries() {\n if ($ENTRIES == null)\n $ENTRIES = enumEntries(values());\n return $ENTRIES;\n }\n var WriteMode_entriesInitialized;\n function WriteMode_initEntries() {\n if (WriteMode_entriesInitialized)\n return Unit_instance;\n WriteMode_entriesInitialized = true;\n WriteMode_OBJ_instance = new WriteMode('OBJ', 0, get_BEGIN_OBJ(), get_END_OBJ());\n WriteMode_LIST_instance = new WriteMode('LIST', 1, get_BEGIN_LIST(), get_END_LIST());\n WriteMode_MAP_instance = new WriteMode('MAP', 2, get_BEGIN_OBJ(), get_END_OBJ());\n WriteMode_POLY_OBJ_instance = new WriteMode('POLY_OBJ', 3, get_BEGIN_LIST(), get_END_LIST());\n }\n var $ENTRIES;\n function WriteMode(name, ordinal, begin, end) {\n Enum.call(this, name, ordinal);\n this.a1d_1 = begin;\n this.b1d_1 = end;\n }\n function switchMode(_this__u8e3s4, desc) {\n var tmp0_subject = desc.ul();\n var tmp;\n if (tmp0_subject instanceof PolymorphicKind) {\n tmp = WriteMode_POLY_OBJ_getInstance();\n } else {\n if (equals(tmp0_subject, LIST_getInstance())) {\n tmp = WriteMode_LIST_getInstance();\n } else {\n if (equals(tmp0_subject, MAP_getInstance())) {\n // Inline function 'kotlinx.serialization.json.internal.selectMapMode' call\n var keyDescriptor = carrierDescriptor(desc.wl(0), _this__u8e3s4.co());\n var keyKind = keyDescriptor.ul();\n var tmp_0;\n var tmp_1;\n if (keyKind instanceof PrimitiveKind) {\n tmp_1 = true;\n } else {\n tmp_1 = equals(keyKind, ENUM_getInstance());\n }\n if (tmp_1) {\n // Inline function 'kotlinx.serialization.json.internal.switchMode.' call\n tmp_0 = WriteMode_MAP_getInstance();\n } else {\n if (_this__u8e3s4.f15_1.w16_1) {\n // Inline function 'kotlinx.serialization.json.internal.switchMode.' call\n tmp_0 = WriteMode_LIST_getInstance();\n } else {\n throw InvalidKeyKindException(keyDescriptor);\n }\n }\n tmp = tmp_0;\n } else {\n tmp = WriteMode_OBJ_getInstance();\n }\n }\n }\n return tmp;\n }\n function carrierDescriptor(_this__u8e3s4, module_0) {\n var tmp;\n if (equals(_this__u8e3s4.ul(), CONTEXTUAL_getInstance())) {\n var tmp0_safe_receiver = getContextualDescriptor(module_0, _this__u8e3s4);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : carrierDescriptor(tmp0_safe_receiver, module_0);\n tmp = tmp1_elvis_lhs == null ? _this__u8e3s4 : tmp1_elvis_lhs;\n } else if (_this__u8e3s4.tl()) {\n tmp = carrierDescriptor(_this__u8e3s4.wl(0), module_0);\n } else {\n tmp = _this__u8e3s4;\n }\n return tmp;\n }\n function WriteMode_OBJ_getInstance() {\n WriteMode_initEntries();\n return WriteMode_OBJ_instance;\n }\n function WriteMode_LIST_getInstance() {\n WriteMode_initEntries();\n return WriteMode_LIST_instance;\n }\n function WriteMode_MAP_getInstance() {\n WriteMode_initEntries();\n return WriteMode_MAP_instance;\n }\n function WriteMode_POLY_OBJ_getInstance() {\n WriteMode_initEntries();\n return WriteMode_POLY_OBJ_instance;\n }\n function get_STRING() {\n return STRING;\n }\n var STRING;\n function appendEscape($this, lastPosition, current) {\n $this.n1h(lastPosition, current);\n return appendEsc($this, current + 1 | 0);\n }\n function decodedString($this, lastPosition, currentPosition) {\n $this.n1h(lastPosition, currentPosition);\n var result = $this.a16_1.toString();\n $this.a16_1.l8(0);\n return result;\n }\n function takePeeked($this) {\n // Inline function 'kotlin.also' call\n var this_0 = ensureNotNull($this.z15_1);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonLexer.takePeeked.' call\n $this.z15_1 = null;\n return this_0;\n }\n function wasUnquotedString($this) {\n return !(charSequenceGet($this.o1h(), $this.x15_1 - 1 | 0) === _Char___init__impl__6a9atx(34));\n }\n function appendEsc($this, startPosition) {\n var currentPosition = startPosition;\n currentPosition = $this.p1h(currentPosition);\n if (currentPosition === -1) {\n $this.z19('Expected escape sequence to continue, got EOF');\n }\n var tmp = $this.o1h();\n var tmp0 = currentPosition;\n currentPosition = tmp0 + 1 | 0;\n var currentChar = charSequenceGet(tmp, tmp0);\n if (currentChar === _Char___init__impl__6a9atx(117)) {\n return appendHex($this, $this.o1h(), currentPosition);\n }\n // Inline function 'kotlin.code' call\n var tmp$ret$0 = Char__toInt_impl_vasixd(currentChar);\n var c = escapeToChar(tmp$ret$0);\n if (c === _Char___init__impl__6a9atx(0)) {\n $this.z19(\"Invalid escaped char '\" + toString_0(currentChar) + \"'\");\n }\n $this.a16_1.z5(c);\n return currentPosition;\n }\n function appendHex($this, source, startPos) {\n if ((startPos + 4 | 0) >= charSequenceLength(source)) {\n $this.x15_1 = startPos;\n $this.q1h();\n if (($this.x15_1 + 4 | 0) >= charSequenceLength(source)) {\n $this.z19('Unexpected EOF during unicode escape');\n }\n return appendHex($this, source, $this.x15_1);\n }\n $this.a16_1.z5(numberToChar((((fromHexChar($this, source, startPos) << 12) + (fromHexChar($this, source, startPos + 1 | 0) << 8) | 0) + (fromHexChar($this, source, startPos + 2 | 0) << 4) | 0) + fromHexChar($this, source, startPos + 3 | 0) | 0));\n return startPos + 4 | 0;\n }\n function fromHexChar($this, source, currentPosition) {\n var character = charSequenceGet(source, currentPosition);\n var tmp;\n if (_Char___init__impl__6a9atx(48) <= character ? character <= _Char___init__impl__6a9atx(57) : false) {\n // Inline function 'kotlin.code' call\n var tmp_0 = Char__toInt_impl_vasixd(character);\n // Inline function 'kotlin.code' call\n var this_0 = _Char___init__impl__6a9atx(48);\n tmp = tmp_0 - Char__toInt_impl_vasixd(this_0) | 0;\n } else if (_Char___init__impl__6a9atx(97) <= character ? character <= _Char___init__impl__6a9atx(102) : false) {\n // Inline function 'kotlin.code' call\n var tmp_1 = Char__toInt_impl_vasixd(character);\n // Inline function 'kotlin.code' call\n var this_1 = _Char___init__impl__6a9atx(97);\n tmp = (tmp_1 - Char__toInt_impl_vasixd(this_1) | 0) + 10 | 0;\n } else if (_Char___init__impl__6a9atx(65) <= character ? character <= _Char___init__impl__6a9atx(70) : false) {\n // Inline function 'kotlin.code' call\n var tmp_2 = Char__toInt_impl_vasixd(character);\n // Inline function 'kotlin.code' call\n var this_2 = _Char___init__impl__6a9atx(65);\n tmp = (tmp_2 - Char__toInt_impl_vasixd(this_2) | 0) + 10 | 0;\n } else {\n $this.z19(\"Invalid toHexChar char '\" + toString_0(character) + \"' in unicode escape\");\n }\n return tmp;\n }\n function consumeBoolean($this, start) {\n var current = $this.p1h(start);\n if (current >= charSequenceLength($this.o1h()) ? true : current === -1) {\n $this.z19('EOF');\n }\n // Inline function 'kotlin.code' call\n var tmp = $this.o1h();\n var tmp0 = current;\n current = tmp0 + 1 | 0;\n var this_0 = charSequenceGet(tmp, tmp0);\n var tmp1_subject = Char__toInt_impl_vasixd(this_0) | 32;\n var tmp_0;\n // Inline function 'kotlin.code' call\n var this_1 = _Char___init__impl__6a9atx(116);\n if (tmp1_subject === Char__toInt_impl_vasixd(this_1)) {\n consumeBooleanLiteral($this, 'rue', current);\n tmp_0 = true;\n } else {\n // Inline function 'kotlin.code' call\n var this_2 = _Char___init__impl__6a9atx(102);\n if (tmp1_subject === Char__toInt_impl_vasixd(this_2)) {\n consumeBooleanLiteral($this, 'alse', current);\n tmp_0 = false;\n } else {\n $this.z19(\"Expected valid boolean literal prefix, but had '\" + $this.d1b() + \"'\");\n }\n }\n return tmp_0;\n }\n function consumeBooleanLiteral($this, literalSuffix, current) {\n if ((charSequenceLength($this.o1h()) - current | 0) < literalSuffix.length) {\n $this.z19('Unexpected end of boolean literal');\n }\n var inductionVariable = 0;\n var last = charSequenceLength(literalSuffix) - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var expected = charSequenceGet(literalSuffix, i);\n var actual = charSequenceGet($this.o1h(), current + i | 0);\n // Inline function 'kotlin.code' call\n var tmp = Char__toInt_impl_vasixd(expected);\n // Inline function 'kotlin.code' call\n if (!(tmp === (Char__toInt_impl_vasixd(actual) | 32))) {\n $this.z19(\"Expected valid boolean literal prefix, but had '\" + $this.d1b() + \"'\");\n }\n }\n while (inductionVariable <= last);\n $this.x15_1 = current + literalSuffix.length | 0;\n }\n function consumeNumericLiteral$calculateExponent(exponentAccumulator, isExponentPositive) {\n var tmp;\n switch (isExponentPositive) {\n case false:\n // Inline function 'kotlin.math.pow' call\n\n var x = -exponentAccumulator.r6();\n tmp = Math.pow(10.0, x);\n break;\n case true:\n // Inline function 'kotlin.math.pow' call\n\n var x_0 = exponentAccumulator.r6();\n tmp = Math.pow(10.0, x_0);\n break;\n default:\n noWhenBranchMatchedException();\n break;\n }\n return tmp;\n }\n function AbstractJsonLexer() {\n this.x15_1 = 0;\n this.y15_1 = new JsonPath();\n this.z15_1 = null;\n this.a16_1 = StringBuilder_init_$Create$();\n }\n protoOf(AbstractJsonLexer).q1h = function () {\n };\n protoOf(AbstractJsonLexer).r1h = function (c) {\n return (((c === _Char___init__impl__6a9atx(125) ? true : c === _Char___init__impl__6a9atx(93)) ? true : c === _Char___init__impl__6a9atx(58)) ? true : c === _Char___init__impl__6a9atx(44)) ? false : true;\n };\n protoOf(AbstractJsonLexer).b16 = function () {\n var nextToken = this.f1b();\n if (!(nextToken === 10)) {\n this.z19('Expected EOF after parsing, but had ' + toString_0(charSequenceGet(this.o1h(), this.x15_1 - 1 | 0)) + ' instead');\n }\n };\n protoOf(AbstractJsonLexer).z1a = function (expected) {\n var token = this.f1b();\n if (!(token === expected)) {\n this.s1h(expected);\n }\n return token;\n };\n protoOf(AbstractJsonLexer).p1c = function (expected) {\n this.q1h();\n var source = this.o1h();\n var cpos = this.x15_1;\n $l$loop_0: while (true) {\n cpos = this.p1h(cpos);\n if (cpos === -1)\n break $l$loop_0;\n var tmp0 = cpos;\n cpos = tmp0 + 1 | 0;\n var c = charSequenceGet(source, tmp0);\n if (((c === _Char___init__impl__6a9atx(32) ? true : c === _Char___init__impl__6a9atx(10)) ? true : c === _Char___init__impl__6a9atx(13)) ? true : c === _Char___init__impl__6a9atx(9))\n continue $l$loop_0;\n this.x15_1 = cpos;\n if (c === expected)\n return Unit_instance;\n this.t1h(expected);\n }\n this.x15_1 = cpos;\n this.t1h(expected);\n };\n protoOf(AbstractJsonLexer).t1h = function (expected) {\n if (this.x15_1 > 0 ? expected === _Char___init__impl__6a9atx(34) : false) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonLexer.withPositionRollback' call\n var snapshot = this.x15_1;\n try {\n // Inline function 'kotlinx.serialization.json.internal.AbstractJsonLexer.unexpectedToken.' call\n this.x15_1 = this.x15_1 - 1 | 0;\n tmp$ret$1 = this.d1b();\n break $l$block;\n }finally {\n this.x15_1 = snapshot;\n }\n }\n var inputLiteral = tmp$ret$1;\n if (inputLiteral === 'null') {\n this.y19(\"Expected string literal but 'null' literal was found\", this.x15_1 - 1 | 0, \"Use 'coerceInputValues = true' in 'Json {}' builder to coerce nulls if property has a default value.\");\n }\n }\n this.s1h(charToTokenClass(expected));\n };\n protoOf(AbstractJsonLexer).u1h = function (expectedToken, wasConsumed) {\n var expected = tokenDescription(expectedToken);\n var position = wasConsumed ? this.x15_1 - 1 | 0 : this.x15_1;\n var s = (this.x15_1 === charSequenceLength(this.o1h()) ? true : position < 0) ? 'EOF' : toString_0(charSequenceGet(this.o1h(), position));\n this.z19('Expected ' + expected + \", but had '\" + s + \"' instead\", position);\n };\n protoOf(AbstractJsonLexer).s1h = function (expectedToken, wasConsumed, $super) {\n wasConsumed = wasConsumed === VOID ? true : wasConsumed;\n return $super === VOID ? this.u1h(expectedToken, wasConsumed) : $super.u1h.call(this, expectedToken, wasConsumed);\n };\n protoOf(AbstractJsonLexer).a1b = function () {\n var source = this.o1h();\n var cpos = this.x15_1;\n $l$loop_0: while (true) {\n cpos = this.p1h(cpos);\n if (cpos === -1)\n break $l$loop_0;\n var ch = charSequenceGet(source, cpos);\n if (((ch === _Char___init__impl__6a9atx(32) ? true : ch === _Char___init__impl__6a9atx(10)) ? true : ch === _Char___init__impl__6a9atx(13)) ? true : ch === _Char___init__impl__6a9atx(9)) {\n cpos = cpos + 1 | 0;\n continue $l$loop_0;\n }\n this.x15_1 = cpos;\n return charToTokenClass(ch);\n }\n this.x15_1 = cpos;\n return 10;\n };\n protoOf(AbstractJsonLexer).r1c = function (doConsume) {\n var current = this.v1h();\n current = this.p1h(current);\n var len = charSequenceLength(this.o1h()) - current | 0;\n if (len < 4 ? true : current === -1)\n return false;\n var inductionVariable = 0;\n if (inductionVariable <= 3)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (!(charSequenceGet('null', i) === charSequenceGet(this.o1h(), current + i | 0)))\n return false;\n }\n while (inductionVariable <= 3);\n if (len > 4 ? charToTokenClass(charSequenceGet(this.o1h(), current + 4 | 0)) === 0 : false)\n return false;\n if (doConsume) {\n this.x15_1 = current + 4 | 0;\n }\n return true;\n };\n protoOf(AbstractJsonLexer).c1d = function (doConsume, $super) {\n doConsume = doConsume === VOID ? true : doConsume;\n return $super === VOID ? this.r1c(doConsume) : $super.r1c.call(this, doConsume);\n };\n protoOf(AbstractJsonLexer).v1h = function () {\n var current = this.x15_1;\n $l$loop_0: while (true) {\n current = this.p1h(current);\n if (current === -1)\n break $l$loop_0;\n var c = charSequenceGet(this.o1h(), current);\n if (((c === _Char___init__impl__6a9atx(32) ? true : c === _Char___init__impl__6a9atx(10)) ? true : c === _Char___init__impl__6a9atx(13)) ? true : c === _Char___init__impl__6a9atx(9)) {\n current = current + 1 | 0;\n } else {\n break $l$loop_0;\n }\n }\n this.x15_1 = current;\n return current;\n };\n protoOf(AbstractJsonLexer).s1c = function (isLenient) {\n var token = this.a1b();\n var tmp;\n if (isLenient) {\n if (!(token === 1) ? !(token === 0) : false)\n return null;\n tmp = this.d1b();\n } else {\n if (!(token === 1))\n return null;\n tmp = this.c1b();\n }\n var string = tmp;\n this.z15_1 = string;\n return string;\n };\n protoOf(AbstractJsonLexer).w1h = function () {\n this.z15_1 = null;\n };\n protoOf(AbstractJsonLexer).x1h = function (startPos, endPos) {\n // Inline function 'kotlin.text.substring' call\n var this_0 = this.o1h();\n return toString(charSequenceSubSequence(this_0, startPos, endPos));\n };\n protoOf(AbstractJsonLexer).c1b = function () {\n if (!(this.z15_1 == null)) {\n return takePeeked(this);\n }\n return this.v1c();\n };\n protoOf(AbstractJsonLexer).consumeString2 = function (source, startPosition, current) {\n var currentPosition = current;\n var lastPosition = startPosition;\n var char = charSequenceGet(source, currentPosition);\n var usedAppend = false;\n while (!(char === _Char___init__impl__6a9atx(34))) {\n if (char === _Char___init__impl__6a9atx(92)) {\n usedAppend = true;\n currentPosition = this.p1h(appendEscape(this, lastPosition, currentPosition));\n if (currentPosition === -1) {\n this.z19('Unexpected EOF', currentPosition);\n }\n lastPosition = currentPosition;\n } else {\n currentPosition = currentPosition + 1 | 0;\n if (currentPosition >= charSequenceLength(source)) {\n usedAppend = true;\n this.n1h(lastPosition, currentPosition);\n currentPosition = this.p1h(currentPosition);\n if (currentPosition === -1) {\n this.z19('Unexpected EOF', currentPosition);\n }\n lastPosition = currentPosition;\n }\n }\n char = charSequenceGet(source, currentPosition);\n }\n var tmp;\n if (!usedAppend) {\n tmp = this.x1h(lastPosition, currentPosition);\n } else {\n tmp = decodedString(this, lastPosition, currentPosition);\n }\n var string = tmp;\n this.x15_1 = currentPosition + 1 | 0;\n return string;\n };\n protoOf(AbstractJsonLexer).w1c = function () {\n var result = this.d1b();\n if (result === 'null' ? wasUnquotedString(this) : false) {\n this.z19(\"Unexpected 'null' value instead of string literal\");\n }\n return result;\n };\n protoOf(AbstractJsonLexer).d1b = function () {\n if (!(this.z15_1 == null)) {\n return takePeeked(this);\n }\n var current = this.v1h();\n if (current >= charSequenceLength(this.o1h()) ? true : current === -1) {\n this.z19('EOF', current);\n }\n var token = charToTokenClass(charSequenceGet(this.o1h(), current));\n if (token === 1) {\n return this.c1b();\n }\n if (!(token === 0)) {\n this.z19('Expected beginning of the string, but got ' + toString_0(charSequenceGet(this.o1h(), current)));\n }\n var usedAppend = false;\n while (charToTokenClass(charSequenceGet(this.o1h(), current)) === 0) {\n current = current + 1 | 0;\n if (current >= charSequenceLength(this.o1h())) {\n usedAppend = true;\n this.n1h(this.x15_1, current);\n var eof = this.p1h(current);\n if (eof === -1) {\n this.x15_1 = current;\n return decodedString(this, 0, 0);\n } else {\n current = eof;\n }\n }\n }\n var tmp;\n if (!usedAppend) {\n tmp = this.x1h(this.x15_1, current);\n } else {\n tmp = decodedString(this, this.x15_1, current);\n }\n var result = tmp;\n this.x15_1 = current;\n return result;\n };\n protoOf(AbstractJsonLexer).n1h = function (fromIndex, toIndex) {\n this.a16_1.g8(this.o1h(), fromIndex, toIndex);\n };\n protoOf(AbstractJsonLexer).u1c = function (allowLenientStrings) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var tokenStack = ArrayList_init_$Create$();\n var lastToken = this.a1b();\n if (!(lastToken === 8) ? !(lastToken === 6) : false) {\n this.d1b();\n return Unit_instance;\n }\n $l$loop: while (true) {\n lastToken = this.a1b();\n if (lastToken === 1) {\n if (allowLenientStrings) {\n this.d1b();\n } else {\n this.v1c();\n }\n continue $l$loop;\n }\n var tmp0_subject = lastToken;\n if (tmp0_subject === 8 ? true : tmp0_subject === 6) {\n tokenStack.q(lastToken);\n } else if (tmp0_subject === 9) {\n if (!(last(tokenStack) === 8))\n throw JsonDecodingException_0(this.x15_1, 'found ] instead of } at path: ' + this.y15_1, this.o1h());\n removeLast(tokenStack);\n } else if (tmp0_subject === 7) {\n if (!(last(tokenStack) === 6))\n throw JsonDecodingException_0(this.x15_1, 'found } instead of ] at path: ' + this.y15_1, this.o1h());\n removeLast(tokenStack);\n } else if (tmp0_subject === 10) {\n this.z19('Unexpected end of input due to malformed JSON during ignoring unknown keys');\n }\n this.f1b();\n if (tokenStack.n() === 0)\n return Unit_instance;\n }\n };\n protoOf(AbstractJsonLexer).toString = function () {\n return \"JsonReader(source='\" + this.o1h() + \"', currentPosition=\" + this.x15_1 + ')';\n };\n protoOf(AbstractJsonLexer).t1c = function (key) {\n var processed = this.x1h(0, this.x15_1);\n var lastIndexOf_0 = lastIndexOf(processed, key);\n this.y19(\"Encountered an unknown key '\" + key + \"'\", lastIndexOf_0, \"Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.\");\n };\n protoOf(AbstractJsonLexer).y19 = function (message, position, hint) {\n var tmp;\n // Inline function 'kotlin.text.isEmpty' call\n if (charSequenceLength(hint) === 0) {\n tmp = '';\n } else {\n tmp = '\\n' + hint;\n }\n var hintMessage = tmp;\n throw JsonDecodingException_0(position, message + ' at path: ' + this.y15_1.m1a() + hintMessage, this.o1h());\n };\n protoOf(AbstractJsonLexer).z19 = function (message, position, hint, $super) {\n position = position === VOID ? this.x15_1 : position;\n hint = hint === VOID ? '' : hint;\n return $super === VOID ? this.y19(message, position, hint) : $super.y19.call(this, message, position, hint);\n };\n protoOf(AbstractJsonLexer).z17 = function () {\n var current = this.v1h();\n current = this.p1h(current);\n if (current >= charSequenceLength(this.o1h()) ? true : current === -1) {\n this.z19('EOF');\n }\n var tmp;\n if (charSequenceGet(this.o1h(), current) === _Char___init__impl__6a9atx(34)) {\n current = current + 1 | 0;\n if (current === charSequenceLength(this.o1h())) {\n this.z19('EOF');\n }\n tmp = true;\n } else {\n tmp = false;\n }\n var hasQuotation = tmp;\n var accumulator = new Long(0, 0);\n var exponentAccumulator = new Long(0, 0);\n var isNegative = false;\n var isExponentPositive = false;\n var hasExponent = false;\n var start = current;\n $l$loop_4: while (!(current === charSequenceLength(this.o1h()))) {\n var ch = charSequenceGet(this.o1h(), current);\n if ((ch === _Char___init__impl__6a9atx(101) ? true : ch === _Char___init__impl__6a9atx(69)) ? !hasExponent : false) {\n if (current === start) {\n this.z19('Unexpected symbol ' + toString_0(ch) + ' in numeric literal');\n }\n isExponentPositive = true;\n hasExponent = true;\n current = current + 1 | 0;\n continue $l$loop_4;\n }\n if (ch === _Char___init__impl__6a9atx(45) ? hasExponent : false) {\n if (current === start) {\n this.z19(\"Unexpected symbol '-' in numeric literal\");\n }\n isExponentPositive = false;\n current = current + 1 | 0;\n continue $l$loop_4;\n }\n if (ch === _Char___init__impl__6a9atx(43) ? hasExponent : false) {\n if (current === start) {\n this.z19(\"Unexpected symbol '+' in numeric literal\");\n }\n isExponentPositive = true;\n current = current + 1 | 0;\n continue $l$loop_4;\n }\n if (ch === _Char___init__impl__6a9atx(45)) {\n if (!(current === start)) {\n this.z19(\"Unexpected symbol '-' in numeric literal\");\n }\n isNegative = true;\n current = current + 1 | 0;\n continue $l$loop_4;\n }\n var token = charToTokenClass(ch);\n if (!(token === 0))\n break $l$loop_4;\n current = current + 1 | 0;\n var digit = Char__minus_impl_a2frrh(ch, _Char___init__impl__6a9atx(48));\n if (!(0 <= digit ? digit <= 9 : false)) {\n this.z19(\"Unexpected symbol '\" + toString_0(ch) + \"' in numeric literal\");\n }\n if (hasExponent) {\n // Inline function 'kotlin.Long.plus' call\n // Inline function 'kotlin.Long.times' call\n exponentAccumulator = exponentAccumulator.aa(toLong(10)).s6(toLong(digit));\n continue $l$loop_4;\n }\n // Inline function 'kotlin.Long.minus' call\n // Inline function 'kotlin.Long.times' call\n accumulator = accumulator.aa(toLong(10)).ub(toLong(digit));\n if (accumulator.ba(new Long(0, 0)) > 0) {\n this.z19('Numeric value overflow');\n }\n }\n var hasChars = !(current === start);\n if (start === current ? true : isNegative ? start === (current - 1 | 0) : false) {\n this.z19('Expected numeric literal');\n }\n if (hasQuotation) {\n if (!hasChars) {\n this.z19('EOF');\n }\n if (!(charSequenceGet(this.o1h(), current) === _Char___init__impl__6a9atx(34))) {\n this.z19('Expected closing quotation mark');\n }\n current = current + 1 | 0;\n }\n this.x15_1 = current;\n if (hasExponent) {\n var doubleAccumulator = accumulator.r6() * consumeNumericLiteral$calculateExponent(exponentAccumulator, isExponentPositive);\n var tmp_0;\n Companion_getInstance_3();\n if (doubleAccumulator > (new Long(-1, 2147483647)).r6()) {\n tmp_0 = true;\n } else {\n Companion_getInstance_3();\n tmp_0 = doubleAccumulator < (new Long(0, -2147483648)).r6();\n }\n if (tmp_0) {\n this.z19('Numeric value overflow');\n }\n // Inline function 'kotlin.math.floor' call\n if (!(Math.floor(doubleAccumulator) === doubleAccumulator)) {\n this.z19(\"Can't convert \" + doubleAccumulator + ' to Long');\n }\n accumulator = numberToLong(doubleAccumulator);\n }\n var tmp_1;\n if (isNegative) {\n tmp_1 = accumulator;\n } else {\n var tmp_2 = accumulator;\n Companion_getInstance_3();\n if (!tmp_2.equals(new Long(0, -2147483648))) {\n tmp_1 = accumulator.wb();\n } else {\n this.z19('Numeric value overflow');\n }\n }\n return tmp_1;\n };\n protoOf(AbstractJsonLexer).d1d = function () {\n var current = this.v1h();\n if (current === charSequenceLength(this.o1h())) {\n this.z19('EOF');\n }\n var tmp;\n if (charSequenceGet(this.o1h(), current) === _Char___init__impl__6a9atx(34)) {\n current = current + 1 | 0;\n tmp = true;\n } else {\n tmp = false;\n }\n var hasQuotation = tmp;\n var result = consumeBoolean(this, current);\n if (hasQuotation) {\n if (this.x15_1 === charSequenceLength(this.o1h())) {\n this.z19('EOF');\n }\n if (!(charSequenceGet(this.o1h(), this.x15_1) === _Char___init__impl__6a9atx(34))) {\n this.z19('Expected closing quotation mark');\n }\n this.x15_1 = this.x15_1 + 1 | 0;\n }\n return result;\n };\n function charToTokenClass(c) {\n var tmp;\n // Inline function 'kotlin.code' call\n if (Char__toInt_impl_vasixd(c) < 126) {\n var tmp_0 = CharMappings_getInstance().z1h_1;\n // Inline function 'kotlin.code' call\n tmp = tmp_0[Char__toInt_impl_vasixd(c)];\n } else {\n tmp = 0;\n }\n return tmp;\n }\n function get_TC_WHITESPACE() {\n return TC_WHITESPACE;\n }\n var TC_WHITESPACE;\n function get_TC_EOF() {\n return TC_EOF;\n }\n var TC_EOF;\n function get_TC_STRING() {\n return TC_STRING;\n }\n var TC_STRING;\n function get_STRING_ESC() {\n return STRING_ESC;\n }\n var STRING_ESC;\n function get_TC_BEGIN_OBJ() {\n return TC_BEGIN_OBJ;\n }\n var TC_BEGIN_OBJ;\n function get_TC_COLON() {\n return TC_COLON;\n }\n var TC_COLON;\n function get_TC_COMMA() {\n return TC_COMMA;\n }\n var TC_COMMA;\n function get_COLON() {\n return COLON;\n }\n var COLON;\n function get_BEGIN_OBJ() {\n return BEGIN_OBJ;\n }\n var BEGIN_OBJ;\n function get_END_OBJ() {\n return END_OBJ;\n }\n var END_OBJ;\n function get_BEGIN_LIST() {\n return BEGIN_LIST;\n }\n var BEGIN_LIST;\n function get_END_LIST() {\n return END_LIST;\n }\n var END_LIST;\n function get_lenientHint() {\n return lenientHint;\n }\n var lenientHint;\n function get_specialFlowingValuesHint() {\n return specialFlowingValuesHint;\n }\n var specialFlowingValuesHint;\n function get_allowStructuredMapKeysHint() {\n return allowStructuredMapKeysHint;\n }\n var allowStructuredMapKeysHint;\n function get_ignoreUnknownKeysHint() {\n return ignoreUnknownKeysHint;\n }\n var ignoreUnknownKeysHint;\n function get_NULL() {\n return NULL;\n }\n var NULL;\n function tokenDescription(token) {\n return token === 1 ? \"quotation mark '\\\"'\" : token === 2 ? \"string escape sequence '\\\\'\" : token === 4 ? \"comma ','\" : token === 5 ? \"colon ':'\" : token === 6 ? \"start of the object '{'\" : token === 7 ? \"end of the object '}'\" : token === 8 ? \"start of the array '['\" : token === 9 ? \"end of the array ']'\" : token === 10 ? 'end of the input' : token === 127 ? 'invalid token' : 'valid token';\n }\n function get_TC_OTHER() {\n return TC_OTHER;\n }\n var TC_OTHER;\n function escapeToChar(c) {\n return c < 117 ? CharMappings_getInstance().y1h_1[c] : _Char___init__impl__6a9atx(0);\n }\n function get_INVALID() {\n return INVALID;\n }\n var INVALID;\n function get_TC_BEGIN_LIST() {\n return TC_BEGIN_LIST;\n }\n var TC_BEGIN_LIST;\n function get_TC_END_LIST() {\n return TC_END_LIST;\n }\n var TC_END_LIST;\n function get_TC_END_OBJ() {\n return TC_END_OBJ;\n }\n var TC_END_OBJ;\n function initEscape($this) {\n var inductionVariable = 0;\n if (inductionVariable <= 31)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n initC2ESC($this, i, _Char___init__impl__6a9atx(117));\n }\n while (inductionVariable <= 31);\n initC2ESC($this, 8, _Char___init__impl__6a9atx(98));\n initC2ESC($this, 9, _Char___init__impl__6a9atx(116));\n initC2ESC($this, 10, _Char___init__impl__6a9atx(110));\n initC2ESC($this, 12, _Char___init__impl__6a9atx(102));\n initC2ESC($this, 13, _Char___init__impl__6a9atx(114));\n initC2ESC_0($this, _Char___init__impl__6a9atx(47), _Char___init__impl__6a9atx(47));\n initC2ESC_0($this, _Char___init__impl__6a9atx(34), _Char___init__impl__6a9atx(34));\n initC2ESC_0($this, _Char___init__impl__6a9atx(92), _Char___init__impl__6a9atx(92));\n }\n function initCharToToken($this) {\n var inductionVariable = 0;\n if (inductionVariable <= 32)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n initC2TC($this, i, 127);\n }\n while (inductionVariable <= 32);\n initC2TC($this, 9, 3);\n initC2TC($this, 10, 3);\n initC2TC($this, 13, 3);\n initC2TC($this, 32, 3);\n initC2TC_0($this, _Char___init__impl__6a9atx(44), 4);\n initC2TC_0($this, _Char___init__impl__6a9atx(58), 5);\n initC2TC_0($this, _Char___init__impl__6a9atx(123), 6);\n initC2TC_0($this, _Char___init__impl__6a9atx(125), 7);\n initC2TC_0($this, _Char___init__impl__6a9atx(91), 8);\n initC2TC_0($this, _Char___init__impl__6a9atx(93), 9);\n initC2TC_0($this, _Char___init__impl__6a9atx(34), 1);\n initC2TC_0($this, _Char___init__impl__6a9atx(92), 2);\n }\n function initC2ESC($this, c, esc) {\n if (!(esc === _Char___init__impl__6a9atx(117))) {\n // Inline function 'kotlin.code' call\n var tmp$ret$0 = Char__toInt_impl_vasixd(esc);\n $this.y1h_1[tmp$ret$0] = numberToChar(c);\n }\n }\n function initC2ESC_0($this, c, esc) {\n // Inline function 'kotlin.code' call\n var tmp$ret$0 = Char__toInt_impl_vasixd(c);\n return initC2ESC($this, tmp$ret$0, esc);\n }\n function initC2TC($this, c, cl) {\n $this.z1h_1[c] = cl;\n }\n function initC2TC_0($this, c, cl) {\n // Inline function 'kotlin.code' call\n var tmp$ret$0 = Char__toInt_impl_vasixd(c);\n return initC2TC($this, tmp$ret$0, cl);\n }\n function CharMappings() {\n CharMappings_instance = this;\n this.y1h_1 = charArray(117);\n this.z1h_1 = new Int8Array(126);\n initEscape(this);\n initCharToToken(this);\n }\n var CharMappings_instance;\n function CharMappings_getInstance() {\n if (CharMappings_instance == null)\n new CharMappings();\n return CharMappings_instance;\n }\n function get_COMMA() {\n return COMMA;\n }\n var COMMA;\n function StringJsonLexer(source) {\n AbstractJsonLexer.call(this);\n this.e1i_1 = source;\n }\n protoOf(StringJsonLexer).o1h = function () {\n return this.e1i_1;\n };\n protoOf(StringJsonLexer).p1h = function (position) {\n return position < this.e1i_1.length ? position : -1;\n };\n protoOf(StringJsonLexer).f1b = function () {\n var source = this.e1i_1;\n $l$loop: while (!(this.x15_1 === -1) ? this.x15_1 < source.length : false) {\n var tmp1 = this.x15_1;\n this.x15_1 = tmp1 + 1 | 0;\n var ch = charSequenceGet(source, tmp1);\n var tc = charToTokenClass(ch);\n var tmp;\n if (tc === get_TC_WHITESPACE()) {\n continue $l$loop;\n } else {\n tmp = tc;\n }\n return tmp;\n }\n return get_TC_EOF();\n };\n protoOf(StringJsonLexer).q1c = function () {\n var current = this.v1h();\n if (current === this.e1i_1.length ? true : current === -1)\n return false;\n if (charSequenceGet(this.e1i_1, current) === _Char___init__impl__6a9atx(44)) {\n this.x15_1 = this.x15_1 + 1 | 0;\n return true;\n }\n return false;\n };\n protoOf(StringJsonLexer).b1b = function () {\n var current = this.x15_1;\n if (current === -1)\n return false;\n $l$loop: while (current < this.e1i_1.length) {\n var c = charSequenceGet(this.e1i_1, current);\n if (((c === _Char___init__impl__6a9atx(32) ? true : c === _Char___init__impl__6a9atx(10)) ? true : c === _Char___init__impl__6a9atx(13)) ? true : c === _Char___init__impl__6a9atx(9)) {\n current = current + 1 | 0;\n continue $l$loop;\n }\n this.x15_1 = current;\n return this.r1h(c);\n }\n this.x15_1 = current;\n return false;\n };\n protoOf(StringJsonLexer).v1h = function () {\n var current = this.x15_1;\n if (current === -1)\n return current;\n $l$loop: while (current < this.e1i_1.length) {\n var c = charSequenceGet(this.e1i_1, current);\n if (((c === _Char___init__impl__6a9atx(32) ? true : c === _Char___init__impl__6a9atx(10)) ? true : c === _Char___init__impl__6a9atx(13)) ? true : c === _Char___init__impl__6a9atx(9)) {\n current = current + 1 | 0;\n } else {\n break $l$loop;\n }\n }\n this.x15_1 = current;\n return current;\n };\n protoOf(StringJsonLexer).p1c = function (expected) {\n if (this.x15_1 === -1) {\n this.t1h(expected);\n }\n var source = this.e1i_1;\n $l$loop: while (this.x15_1 < source.length) {\n var tmp1 = this.x15_1;\n this.x15_1 = tmp1 + 1 | 0;\n var c = charSequenceGet(source, tmp1);\n if (((c === _Char___init__impl__6a9atx(32) ? true : c === _Char___init__impl__6a9atx(10)) ? true : c === _Char___init__impl__6a9atx(13)) ? true : c === _Char___init__impl__6a9atx(9))\n continue $l$loop;\n if (c === expected)\n return Unit_instance;\n this.t1h(expected);\n }\n this.x15_1 = -1;\n this.t1h(expected);\n };\n protoOf(StringJsonLexer).v1c = function () {\n this.p1c(get_STRING());\n var current = this.x15_1;\n var closingQuote = indexOf(this.e1i_1, _Char___init__impl__6a9atx(34), current);\n if (closingQuote === -1) {\n this.d1b();\n this.u1h(get_TC_STRING(), false);\n }\n var inductionVariable = current;\n if (inductionVariable < closingQuote)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (charSequenceGet(this.e1i_1, i) === get_STRING_ESC()) {\n return this.consumeString2(this.e1i_1, this.x15_1, i);\n }\n }\n while (inductionVariable < closingQuote);\n this.x15_1 = closingQuote + 1 | 0;\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n return this.e1i_1.substring(current, closingQuote);\n };\n protoOf(StringJsonLexer).x1c = function (keyToMatch, isLenient) {\n var positionSnapshot = this.x15_1;\n try {\n if (!(this.f1b() === get_TC_BEGIN_OBJ()))\n return null;\n var firstKey = this.s1c(isLenient);\n if (!(firstKey === keyToMatch))\n return null;\n this.w1h();\n if (!(this.f1b() === get_TC_COLON()))\n return null;\n return this.s1c(isLenient);\n }finally {\n this.x15_1 = positionSnapshot;\n this.w1h();\n }\n };\n function get_schemaCache(_this__u8e3s4) {\n return _this__u8e3s4.h15_1;\n }\n function JsonToStringWriter() {\n this.n15_1 = StringBuilder_init_$Create$_0(128);\n }\n protoOf(JsonToStringWriter).f19 = function (value) {\n this.n15_1.j8(value);\n };\n protoOf(JsonToStringWriter).z18 = function (char) {\n this.n15_1.z5(char);\n };\n protoOf(JsonToStringWriter).b19 = function (text) {\n this.n15_1.y5(text);\n };\n protoOf(JsonToStringWriter).l19 = function (text) {\n printQuoted(this.n15_1, text);\n };\n protoOf(JsonToStringWriter).o15 = function () {\n this.n15_1.m8();\n };\n protoOf(JsonToStringWriter).toString = function () {\n return this.n15_1.toString();\n };\n function createMapForCache(initialCapacity) {\n return HashMap_init_$Create$(initialCapacity);\n }\n //region block: post-declaration\n protoOf(defer$1).ml = get_isNullable;\n protoOf(defer$1).tl = get_isInline;\n protoOf(defer$1).rl = get_annotations;\n protoOf(PolymorphismValidator).y14 = contextual;\n //endregion\n //region block: init\n Companion_instance_0 = new Companion();\n Companion_instance_1 = new Companion_0();\n Companion_instance_2 = new Companion_1();\n Companion_instance_3 = new Companion_2();\n Tombstone_instance = new Tombstone();\n PRIMITIVE_TAG = 'primitive';\n STRING = _Char___init__impl__6a9atx(34);\n TC_WHITESPACE = 3;\n TC_EOF = 10;\n TC_STRING = 1;\n STRING_ESC = _Char___init__impl__6a9atx(92);\n TC_BEGIN_OBJ = 6;\n TC_COLON = 5;\n TC_COMMA = 4;\n COLON = _Char___init__impl__6a9atx(58);\n BEGIN_OBJ = _Char___init__impl__6a9atx(123);\n END_OBJ = _Char___init__impl__6a9atx(125);\n BEGIN_LIST = _Char___init__impl__6a9atx(91);\n END_LIST = _Char___init__impl__6a9atx(93);\n lenientHint = \"Use 'isLenient = true' in 'Json {}' builder to accept non-compliant JSON.\";\n specialFlowingValuesHint = \"It is possible to deserialize them using 'JsonBuilder.allowSpecialFloatingPointValues = true'\";\n allowStructuredMapKeysHint = \"Use 'allowStructuredMapKeys = true' in 'Json {}' builder to convert such maps to [key1, value1, key2, value2,...] arrays.\";\n ignoreUnknownKeysHint = \"Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.\";\n NULL = 'null';\n TC_OTHER = 0;\n INVALID = _Char___init__impl__6a9atx(0);\n TC_BEGIN_LIST = 8;\n TC_END_LIST = 9;\n TC_END_OBJ = 7;\n COMMA = _Char___init__impl__6a9atx(44);\n //endregion\n //region block: exports\n _.$_$ = _.$_$ || {};\n _.$_$.a = Default_getInstance;\n _.$_$.b = Companion_instance_0;\n _.$_$.c = JsonElementSerializer_getInstance;\n _.$_$.d = JsonArray;\n _.$_$.e = JsonDecoder;\n _.$_$.f = JsonObject;\n _.$_$.g = JsonPrimitive;\n _.$_$.h = Json_0;\n _.$_$.i = get_contentOrNull;\n _.$_$.j = get_double;\n _.$_$.k = get_doubleOrNull;\n _.$_$.l = get_jsonArray;\n _.$_$.m = get_jsonObject;\n _.$_$.n = get_jsonPrimitive;\n //endregion\n return _;\n}));\n\n//# sourceMappingURL=kotlinx-serialization-kotlinx-serialization-json.js.map\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd)\n define(['exports', './kotlin-kotlin-stdlib.js', './kotlinx-serialization-kotlinx-serialization-core.js', './kotlinx-serialization-kotlinx-serialization-json.js'], factory);\n else if (typeof exports === 'object')\n factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'));\n else {\n if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-api'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'core-core-api'.\");\n }\n if (typeof this['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-api'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'core-core-api'.\");\n }\n if (typeof this['kotlinx-serialization-kotlinx-serialization-json'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-api'. Its dependency 'kotlinx-serialization-kotlinx-serialization-json' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-json' is loaded prior to 'core-core-api'.\");\n }\n root['core-core-api'] = factory(typeof this['core-core-api'] === 'undefined' ? {} : this['core-core-api'], this['kotlin-kotlin-stdlib'], this['kotlinx-serialization-kotlinx-serialization-core'], this['kotlinx-serialization-kotlinx-serialization-json']);\n }\n}(this, function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json) {\n 'use strict';\n //region block: imports\n var imul = Math.imul;\n var sign = Math.sign;\n var protoOf = kotlin_kotlin.$_$.u9;\n var interfaceMeta = kotlin_kotlin.$_$.b9;\n var setMetadataFor = kotlin_kotlin.$_$.v9;\n var THROW_IAE = kotlin_kotlin.$_$.bd;\n var Unit_instance = kotlin_kotlin.$_$.x3;\n var Enum = kotlin_kotlin.$_$.sc;\n var defineProp = kotlin_kotlin.$_$.s8;\n var classMeta = kotlin_kotlin.$_$.q8;\n var VOID = kotlin_kotlin.$_$.e;\n var Exception = kotlin_kotlin.$_$.uc;\n var Exception_init_$Init$ = kotlin_kotlin.$_$.y;\n var captureStack = kotlin_kotlin.$_$.k8;\n var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.s;\n var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;\n var charSequenceLength = kotlin_kotlin.$_$.o8;\n var sortedWith = kotlin_kotlin.$_$.n7;\n var isBlank = kotlin_kotlin.$_$.nb;\n var to = kotlin_kotlin.$_$.be;\n var Comparator = kotlin_kotlin.$_$.pc;\n var compareValues = kotlin_kotlin.$_$.d8;\n var toList = kotlin_kotlin.$_$.u7;\n var toMap = kotlin_kotlin.$_$.w7;\n var toMutableMap = kotlin_kotlin.$_$.z7;\n var objectMeta = kotlin_kotlin.$_$.t9;\n var emptyList = kotlin_kotlin.$_$.o5;\n var getKClassFromExpression = kotlin_kotlin.$_$.c;\n var THROW_CCE = kotlin_kotlin.$_$.ad;\n var getStringHashCode = kotlin_kotlin.$_$.z8;\n var toString = kotlin_kotlin.$_$.z9;\n var getBooleanHashCode = kotlin_kotlin.$_$.v8;\n var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;\n var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;\n var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q;\n var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x;\n var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z1;\n var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d;\n var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b2;\n var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;\n var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o2;\n var objectCreate = kotlin_kotlin.$_$.s9;\n var joinToString = kotlin_kotlin.$_$.e6;\n var hashCode = kotlin_kotlin.$_$.a9;\n var equals = kotlin_kotlin.$_$.t8;\n var mapCapacity = kotlin_kotlin.$_$.q6;\n var coerceAtLeast = kotlin_kotlin.$_$.fa;\n var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.p;\n var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e2;\n var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.h;\n var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.g;\n var copyToArray = kotlin_kotlin.$_$.l5;\n var ensureNotNull = kotlin_kotlin.$_$.qd;\n var joinToString_0 = kotlin_kotlin.$_$.f6;\n var collectionSizeOrDefault = kotlin_kotlin.$_$.v4;\n var DoubleCompanionObject_instance = kotlin_kotlin.$_$.h3;\n var emptyMap = kotlin_kotlin.$_$.p5;\n var plus = kotlin_kotlin.$_$.y6;\n var listOf = kotlin_kotlin.$_$.o6;\n var plus_0 = kotlin_kotlin.$_$.b7;\n var addAll = kotlin_kotlin.$_$.m4;\n var isInterface = kotlin_kotlin.$_$.j9;\n var contentEquals = kotlin_kotlin.$_$.z4;\n var contentHashCode = kotlin_kotlin.$_$.a5;\n var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.h1;\n var get_lastIndex = kotlin_kotlin.$_$.i6;\n var compareTo = kotlin_kotlin.$_$.r8;\n var first = kotlin_kotlin.$_$.v5;\n var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.q;\n var Map = kotlin_kotlin.$_$.g4;\n var firstOrNull = kotlin_kotlin.$_$.u5;\n var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.f1;\n var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.g1;\n var asSequence = kotlin_kotlin.$_$.ra;\n var toList_0 = kotlin_kotlin.$_$.fb;\n var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.k1;\n var sequenceOf = kotlin_kotlin.$_$.db;\n var mapNotNull = kotlin_kotlin.$_$.ya;\n var flatten = kotlin_kotlin.$_$.xa;\n var filter = kotlin_kotlin.$_$.ua;\n var asSequence_0 = kotlin_kotlin.$_$.t4;\n var listOfNotNull = kotlin_kotlin.$_$.n6;\n var any = kotlin_kotlin.$_$.p4;\n var toString_0 = kotlin_kotlin.$_$.ae;\n var asSequence_1 = kotlin_kotlin.$_$.s4;\n var map = kotlin_kotlin.$_$.za;\n var firstOrNull_0 = kotlin_kotlin.$_$.va;\n var Collection = kotlin_kotlin.$_$.z3;\n var addAll_0 = kotlin_kotlin.$_$.n4;\n var toSet = kotlin_kotlin.$_$.gb;\n var HashSet_init_$Create$ = kotlin_kotlin.$_$.n;\n var lazy = kotlin_kotlin.$_$.wd;\n var setOf = kotlin_kotlin.$_$.h7;\n var subtract = kotlin_kotlin.$_$.r7;\n var KProperty1 = kotlin_kotlin.$_$.na;\n var getPropertyCallableRef = kotlin_kotlin.$_$.y8;\n var distinct = kotlin_kotlin.$_$.n5;\n var Pair = kotlin_kotlin.$_$.yc;\n var NotImplementedError = kotlin_kotlin.$_$.xc;\n var contains = kotlin_kotlin.$_$.x4;\n var emptySequence = kotlin_kotlin.$_$.ta;\n var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.d1;\n var any_0 = kotlin_kotlin.$_$.o4;\n var sortedWith_0 = kotlin_kotlin.$_$.m7;\n var asIterable = kotlin_kotlin.$_$.q4;\n var flatMap = kotlin_kotlin.$_$.wa;\n var none = kotlin_kotlin.$_$.w6;\n var firstOrNull_1 = kotlin_kotlin.$_$.t5;\n var fillArrayVal = kotlin_kotlin.$_$.u8;\n var isArray = kotlin_kotlin.$_$.c9;\n var getNumberHashCode = kotlin_kotlin.$_$.x8;\n var numberToInt = kotlin_kotlin.$_$.q9;\n var until = kotlin_kotlin.$_$.ka;\n var round = kotlin_kotlin.$_$.ca;\n var KProperty0 = kotlin_kotlin.$_$.ma;\n var get_indices = kotlin_kotlin.$_$.d6;\n var contentDeepEquals = kotlin_kotlin.$_$.y4;\n var filterNotNull = kotlin_kotlin.$_$.r5;\n var Exception_init_$Create$ = kotlin_kotlin.$_$.z;\n var MutableList = kotlin_kotlin.$_$.h4;\n var reversedArray = kotlin_kotlin.$_$.g7;\n var first_0 = kotlin_kotlin.$_$.w5;\n var BooleanCompanionObject_instance = kotlin_kotlin.$_$.f3;\n var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e1;\n var toList_1 = kotlin_kotlin.$_$.v7;\n var mutableListOf = kotlin_kotlin.$_$.u6;\n var sequence = kotlin_kotlin.$_$.eb;\n var CoroutineImpl = kotlin_kotlin.$_$.f8;\n var SequenceScope = kotlin_kotlin.$_$.pa;\n var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.e8;\n var addAll_1 = kotlin_kotlin.$_$.l4;\n var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.o1;\n var charArrayOf = kotlin_kotlin.$_$.l8;\n var split = kotlin_kotlin.$_$.ub;\n var contains_0 = kotlin_kotlin.$_$.hb;\n var DoubleSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r;\n var isFinite = kotlin_kotlin.$_$.sd;\n var get_PI = kotlin_kotlin.$_$.aa;\n var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.i1;\n var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l2;\n var isNaN_0 = kotlin_kotlin.$_$.ud;\n var checkIndexOverflow = kotlin_kotlin.$_$.u4;\n var distinct_0 = kotlin_kotlin.$_$.sa;\n var toMutableList = kotlin_kotlin.$_$.y7;\n var minus = kotlin_kotlin.$_$.t6;\n var SerializationException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w2;\n var toIntOrNull = kotlin_kotlin.$_$.dc;\n var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.a;\n var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s;\n var toInt = kotlin_kotlin.$_$.ec;\n var removeFirst = kotlin_kotlin.$_$.e7;\n var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.c;\n var toMutableList_0 = kotlin_kotlin.$_$.x7;\n var removeAll = kotlin_kotlin.$_$.d7;\n var plus_1 = kotlin_kotlin.$_$.c7;\n var asList = kotlin_kotlin.$_$.r4;\n var zip = kotlin_kotlin.$_$.c8;\n var listOf_0 = kotlin_kotlin.$_$.p6;\n var plus_2 = kotlin_kotlin.$_$.z6;\n var reversed = kotlin_kotlin.$_$.ia;\n var roundToInt = kotlin_kotlin.$_$.ba;\n var println = kotlin_kotlin.$_$.h8;\n var Monotonic_instance = kotlin_kotlin.$_$.p3;\n var ValueTimeMark = kotlin_kotlin.$_$.nc;\n var Duration = kotlin_kotlin.$_$.mc;\n var Triple = kotlin_kotlin.$_$.dd;\n var numberToLong = kotlin_kotlin.$_$.r9;\n var _Duration___get_inWholeNanoseconds__impl__r5x4mr = kotlin_kotlin.$_$.l1;\n var sort = kotlin_kotlin.$_$.q7;\n var Companion_getInstance = kotlin_kotlin.$_$.o3;\n var Duration__plus_impl_yu9v8f = kotlin_kotlin.$_$.m1;\n var last = kotlin_kotlin.$_$.l6;\n var startsWith = kotlin_kotlin.$_$.vb;\n var endsWith = kotlin_kotlin.$_$.jb;\n var indexOf = kotlin_kotlin.$_$.lb;\n var numberRangeToNumber = kotlin_kotlin.$_$.o9;\n var substring = kotlin_kotlin.$_$.yb;\n var Long = kotlin_kotlin.$_$.wc;\n var noWhenBranchMatchedException = kotlin_kotlin.$_$.xd;\n //endregion\n //region block: pre-declaration\n setMetadataFor(Action, 'Action', interfaceMeta);\n function get_isDone() {\n return this.state.equals(ActionState_DONE_getInstance());\n }\n setMetadataFor(ActionCandidate, 'ActionCandidate', interfaceMeta);\n setMetadataFor(ActionState, 'ActionState', classMeta, Enum);\n function setLogModule(logger, basePackageName, $super) {\n logger = logger === VOID ? null : logger;\n basePackageName = basePackageName === VOID ? null : basePackageName;\n return this.k1i(logger, basePackageName);\n }\n function addHistoryModule(history, historySize, $super) {\n history = history === VOID ? null : history;\n historySize = historySize === VOID ? 500 : historySize;\n return this.l1i(history, historySize);\n }\n setMetadataFor(Core, 'Core', interfaceMeta);\n setMetadataFor(CoreFactory, 'CoreFactory', interfaceMeta);\n setMetadataFor(CoreModules, 'CoreModules', interfaceMeta);\n setMetadataFor(CoreServices, 'CoreServices', classMeta);\n setMetadataFor(MissingCriticalModuleException, 'MissingCriticalModuleException', classMeta, Exception);\n setMetadataFor(AddPartAction, 'AddPartAction', classMeta, VOID, [Action]);\n setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(Companion, 'Companion', objectMeta);\n setMetadataFor(AssemblyBuilder, 'AssemblyBuilder', classMeta, VOID, VOID, AssemblyBuilder);\n setMetadataFor(AssemblyPart, 'AssemblyPart', classMeta);\n setMetadataFor(AssemblyPartSnapInfo, 'AssemblyPartSnapInfo', classMeta, VOID, VOID, AssemblyPartSnapInfo);\n setMetadataFor(Companion_0, 'Companion', objectMeta);\n setMetadataFor($serializer, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(AssemblyPartConnectorInfo, 'AssemblyPartConnectorInfo', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});\n setMetadataFor(Companion_1, 'Companion', objectMeta);\n function get_serializable() {\n return false;\n }\n function get_doStoreInSnapshot() {\n return true;\n }\n setMetadataFor(Component, 'Component', interfaceMeta);\n setMetadataFor(AssemblyPartIdsComponent, 'AssemblyPartIdsComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_2, 'Companion', objectMeta);\n setMetadataFor($serializer_0, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(AssemblyPartsComponent, 'AssemblyPartsComponent', classMeta, VOID, [Component], VOID, VOID, {0: $serializer_getInstance_0});\n setMetadataFor(Companion_3, 'Companion', objectMeta);\n setMetadataFor(AssemblyStructureComponent, 'AssemblyStructureComponent', classMeta, VOID, [Component]);\n setMetadataFor(PartPair, 'PartPair', classMeta);\n setMetadataFor(Companion_4, 'Companion', objectMeta);\n setMetadataFor($serializer_1, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Companion_5, 'Companion', objectMeta);\n setMetadataFor(Serialized, 'Serialized', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_1});\n setMetadataFor(JsonSerializable, 'JsonSerializable', interfaceMeta);\n function get_serializable_0() {\n return true;\n }\n setMetadataFor(SerializableComponent, 'SerializableComponent', interfaceMeta, VOID, [JsonSerializable, Component]);\n setMetadataFor(ProductPartComponent, 'ProductPartComponent', classMeta, VOID, [SerializableComponent]);\n setMetadataFor(RemovePartAction, 'RemovePartAction', classMeta, VOID, [Action]);\n function beforeDeserialize(json, catalogVersion) {\n return json;\n }\n function beforeParsingComponents(serializableTree, catalogVersion) {\n }\n function beforeBuildingEntities(serializableTree, catalogVersion) {\n }\n function afterDeserializeComplete(root, catalogVersion) {\n }\n setMetadataFor(SerializableCatalogInterceptor, 'SerializableCatalogInterceptor', interfaceMeta);\n function createCustomAssembly(originalProduct, newParts, productManager) {\n var newSpecification = this.createCustomAssemblySpecification(originalProduct, newParts);\n var tmp;\n if (newSpecification == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.catalog.ProductCatalog.createCustomAssembly.' call\n tmp = productManager.createFromSpecification(originalProduct, newSpecification);\n }\n return tmp;\n }\n function createCustomAssemblySpecification(originalProduct, newParts) {\n var specification = this.productSpecification(originalProduct);\n var tmp;\n if (specification == null) {\n tmp = null;\n } else {\n Companion_getInstance_3();\n tmp = specification._findComponentKt(43);\n }\n var partsComponent = tmp;\n var tmp2_safe_receiver = partsComponent == null ? null : partsComponent.i1l_1;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(tmp2_safe_receiver.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = tmp2_safe_receiver.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.catalog.ProductCatalog.createCustomAssemblySpecification.' call\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = newParts.length;\n while (inductionVariable < last) {\n var element = newParts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.catalog.ProductCatalog.createCustomAssemblySpecification..' call\n if (element.partKey === item.t2()) {\n tmp$ret$2 = element;\n break $l$block;\n }\n }\n tmp$ret$2 = null;\n }\n var tmp0_safe_receiver = tmp$ret$2;\n var newPartProductRef = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.productRef;\n var tmp_1;\n if (!(newPartProductRef == null)) {\n tmp_1 = to(item.t2(), newPartProductRef);\n } else {\n tmp_1 = to(item.t2(), item.u2());\n }\n var tmp$ret$4 = tmp_1;\n destination.q(tmp$ret$4);\n }\n tmp_0 = destination;\n }\n var tmp3_safe_receiver = tmp_0;\n var newPartsMap = tmp3_safe_receiver == null ? null : toMap(tmp3_safe_receiver);\n var tmp_2;\n if (!(newPartsMap == null)) {\n tmp_2 = specification.addComponent(new AssemblyPartsComponent(newPartsMap));\n } else {\n tmp_2 = specification;\n }\n return tmp_2;\n }\n setMetadataFor(ProductCatalog, 'ProductCatalog', interfaceMeta, VOID, [SerializableCatalogInterceptor]);\n setMetadataFor(ProductCatalogFunctions, 'ProductCatalogFunctions', objectMeta);\n setMetadataFor(Companion_6, 'Companion', objectMeta);\n setMetadataFor(ProductComponent, 'ProductComponent', classMeta, VOID, [Component]);\n function createEntity(productRef, entityId, parent, $super) {\n entityId = entityId === VOID ? null : entityId;\n parent = parent === VOID ? null : parent;\n return this.e1m(productRef, entityId, parent);\n }\n function createEntityInternal(productRef, entityId, parent, $super) {\n entityId = entityId === VOID ? null : entityId;\n parent = parent === VOID ? null : parent;\n return this.f1m(productRef, entityId, parent);\n }\n function createFromSpecification(productRef, specification, entityId, $super) {\n entityId = entityId === VOID ? null : entityId;\n return this.g1m(productRef, specification, entityId);\n }\n function createFromSpecificationInternal(productRef, specification, entityId, $super) {\n entityId = entityId === VOID ? null : entityId;\n return this.h1m(productRef, specification, entityId);\n }\n setMetadataFor(ProductManager, 'ProductManager', interfaceMeta);\n setMetadataFor(ProductSpecification, 'ProductSpecification', classMeta);\n setMetadataFor(Companion_7, 'Companion', objectMeta);\n setMetadataFor(ProductStructureBuilder, 'ProductStructureBuilder', classMeta, VOID, VOID, ProductStructureBuilder);\n setMetadataFor(Companion_8, 'Companion', objectMeta);\n setMetadataFor(ProductStructureComponent, 'ProductStructureComponent', classMeta, VOID, [Component]);\n setMetadataFor(ProductStructureConnection, 'ProductStructureConnection', classMeta);\n setMetadataFor(ProductStructureItem, 'ProductStructureItem', classMeta);\n setMetadataFor(CircularBuffer$iterator$1, VOID, classMeta);\n setMetadataFor(CircularBuffer, 'CircularBuffer', classMeta);\n setMetadataFor(Companion_9, 'Companion', objectMeta);\n setMetadataFor(ColliderComponent, 'ColliderComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_10, 'Companion', objectMeta);\n setMetadataFor(ColliderShapeComponent, 'ColliderShapeComponent', classMeta, VOID, [Component]);\n setMetadataFor(ColliderUtils, 'ColliderUtils', objectMeta);\n setMetadataFor(Collision, 'Collision', classMeta);\n setMetadataFor(Companion_11, 'Companion', objectMeta);\n setMetadataFor(CollisionConstants, 'CollisionConstants', classMeta, VOID, VOID, CollisionConstants);\n setMetadataFor(CollisionUtils, 'CollisionUtils', objectMeta);\n setMetadataFor(Companion_12, 'Companion', objectMeta);\n function findRoot(snapActionCandidate, entity) {\n var tmp1_elvis_lhs = snapActionCandidate == null ? null : snapActionCandidate.host;\n var mainEntity = tmp1_elvis_lhs == null ? entity : tmp1_elvis_lhs;\n return HierarchyUtils_instance.rootOf(mainEntity);\n }\n setMetadataFor(Validation, 'Validation', interfaceMeta);\n setMetadataFor(ValidationImpl, 'ValidationImpl', classMeta, VOID, [Validation]);\n setMetadataFor(CollisionValidation, 'CollisionValidation', classMeta, ValidationImpl, VOID, CollisionValidation);\n setMetadataFor(Companion_13, 'Companion', objectMeta);\n setMetadataFor(ValidationResult, 'ValidationResult', classMeta);\n setMetadataFor(CollisionValidationResult, 'CollisionValidationResult', classMeta, ValidationResult);\n setMetadataFor(Companion_14, 'Companion', objectMeta);\n setMetadataFor(System, 'System', interfaceMeta);\n setMetadataFor(EcsSystem, 'EcsSystem', interfaceMeta, VOID, [System]);\n setMetadataFor(EcsSystemImpl, 'EcsSystemImpl', classMeta, VOID, [EcsSystem]);\n setMetadataFor(SystemBase, 'SystemBase', classMeta, EcsSystemImpl);\n setMetadataFor(SystemBase2, 'SystemBase2', classMeta, SystemBase);\n setMetadataFor(WorldColliderUpdateSystem, 'WorldColliderUpdateSystem', classMeta, SystemBase2, VOID, WorldColliderUpdateSystem);\n setMetadataFor(ComponentIdSpan, 'ComponentIdSpan', objectMeta);\n setMetadataFor(ComponentIds, 'ComponentIds', objectMeta);\n setMetadataFor(ComponentUtils, 'ComponentUtils', objectMeta);\n setMetadataFor(AlignmentConnection, 'AlignmentConnection', classMeta);\n setMetadataFor(Companion_15, 'Companion', objectMeta);\n setMetadataFor(ChildConnectionValidation, 'ChildConnectionValidation', classMeta, ValidationImpl, VOID, ChildConnectionValidation);\n setMetadataFor(Connection, 'Connection', classMeta);\n setMetadataFor(Companion_16, 'Companion', objectMeta);\n setMetadataFor(ConnectionRootComponent, 'ConnectionRootComponent', classMeta, VOID, [Component], ConnectionRootComponent);\n setMetadataFor(ConnectionUtils, 'ConnectionUtils', objectMeta);\n setMetadataFor(Companion_17, 'Companion', objectMeta);\n setMetadataFor(GuestConnectionsComponent, 'GuestConnectionsComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_18, 'Companion', objectMeta);\n setMetadataFor(HostConnectionsComponent, 'HostConnectionsComponent', classMeta, VOID, [Component], HostConnectionsComponent);\n setMetadataFor(Companion_19, 'Companion', objectMeta);\n setMetadataFor(TemporarilyPauseConnectionParentingComponent, 'TemporarilyPauseConnectionParentingComponent', classMeta, VOID, [Component], TemporarilyPauseConnectionParentingComponent);\n setMetadataFor(Companion_20, 'Companion', objectMeta);\n setMetadataFor(UpdateHostConnectionsSystem, 'UpdateHostConnectionsSystem', classMeta, SystemBase, VOID, UpdateHostConnectionsSystem);\n setMetadataFor(Companion_21, 'Companion', objectMeta);\n setMetadataFor(Connector, 'Connector', classMeta);\n setMetadataFor(ConnectorTagConstants, 'ConnectorTagConstants', objectMeta);\n setMetadataFor(ConnectorType, 'ConnectorType', objectMeta);\n setMetadataFor(ConnectorUtils, 'ConnectorUtils', objectMeta);\n setMetadataFor(Companion_22, 'Companion', objectMeta);\n setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(sam$kotlin_Comparator$0_1, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(ConnectorsComponent, 'ConnectorsComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_23, 'Companion', objectMeta);\n setMetadataFor(DisableConnectorsSystem, 'DisableConnectorsSystem', classMeta, SystemBase, VOID, DisableConnectorsSystem);\n setMetadataFor(Companion_24, 'Companion', objectMeta);\n setMetadataFor(DisabledConnectorsComponent, 'DisabledConnectorsComponent', classMeta, VOID, [Component]);\n setMetadataFor(EdgeConnector, 'EdgeConnector', classMeta, Connector);\n setMetadataFor(PointConnector, 'PointConnector', classMeta, Connector);\n setMetadataFor(PointSeriesConnector, 'PointSeriesConnector', classMeta, Connector);\n setMetadataFor(PointSeriesSubConnector, 'PointSeriesSubConnector', classMeta, Connector);\n setMetadataFor(RelativeConnectorData, 'RelativeConnectorData', classMeta);\n setMetadataFor(RelativeConnectorRepositioner, 'RelativeConnectorRepositioner', objectMeta);\n setMetadataFor(Companion_25, 'Companion', objectMeta);\n setMetadataFor(RelativeConnectorsComponent, 'RelativeConnectorsComponent', classMeta, VOID, [Component]);\n setMetadataFor(RotationDegreeOfFreedom, 'RotationDegreeOfFreedom', classMeta, Enum);\n setMetadataFor(RotationDegreeOfFreedomImpostor, 'RotationDegreeOfFreedomImpostor', objectMeta);\n setMetadataFor(Companion_26, 'Companion', objectMeta);\n setMetadataFor(SurfaceConnector, 'SurfaceConnector', classMeta, Connector);\n setMetadataFor(DebugLine, 'DebugLine', classMeta);\n setMetadataFor(Companion_27, 'Companion', objectMeta);\n setMetadataFor(DebugLinesComponent, 'DebugLinesComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_28, 'Companion', objectMeta);\n setMetadataFor(DebugSurfacesComponent, 'DebugSurfacesComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_29, 'Companion', objectMeta);\n setMetadataFor(DragSurfacesComponent, 'DragSurfacesComponent', classMeta, VOID, [Component]);\n setMetadataFor(DragSurface, 'DragSurface', classMeta);\n setMetadataFor(Companion_30, 'Companion', objectMeta);\n setMetadataFor(DraggableComponent, 'DraggableComponent', classMeta, VOID, [Component], DraggableComponent);\n setMetadataFor(Companion_31, 'Companion', objectMeta);\n setMetadataFor(SomethingIsDraggedComponent, 'SomethingIsDraggedComponent', classMeta, VOID, [Component]);\n setMetadataFor(DragType, 'DragType', classMeta, Enum);\n setMetadataFor(Companion_32, 'Companion', objectMeta);\n setMetadataFor(ViewerDragEventComponent, 'ViewerDragEventComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_33, 'Companion', objectMeta);\n setMetadataFor(WorldDragSurfaceUpdateSystem, 'WorldDragSurfaceUpdateSystem', classMeta, SystemBase2, VOID, WorldDragSurfaceUpdateSystem);\n setMetadataFor(Companion_34, 'Companion', objectMeta);\n setMetadataFor(WorldDragSurfacesComponent, 'WorldDragSurfacesComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_35, 'Companion', objectMeta);\n setMetadataFor(WorldSpaceDragEventComponent, 'WorldSpaceDragEventComponent', classMeta, VOID, [Component]);\n setMetadataFor(ComponentHolder, 'ComponentHolder', classMeta, VOID, VOID, ComponentHolder);\n setMetadataFor(ComponentListener, 'ComponentListener', interfaceMeta);\n setMetadataFor(Companion_36, 'Companion', objectMeta);\n setMetadataFor(Entity, 'Entity', classMeta);\n setMetadataFor(EntityManager, 'EntityManager', interfaceMeta);\n setMetadataFor(Companion_37, 'Companion', objectMeta);\n setMetadataFor(EntityManagerImpl, 'EntityManagerImpl', classMeta, VOID, [EntityManager], EntityManagerImpl);\n setMetadataFor(EntityManagerWatcher, 'EntityManagerWatcher', interfaceMeta);\n setMetadataFor(EntityManagerWatcherList, 'EntityManagerWatcherList', classMeta, VOID, [MutableList, EntityManagerWatcher], EntityManagerWatcherList);\n setMetadataFor(ComponentListenerImpl, 'ComponentListenerImpl', classMeta, VOID, [ComponentListener]);\n setMetadataFor(Companion_38, 'Companion', objectMeta);\n setMetadataFor(SystemBase3, 'SystemBase3', classMeta, SystemBase2);\n setMetadataFor(SystemBase4, 'SystemBase4', classMeta, SystemBase3);\n setMetadataFor(SystemBase5, 'SystemBase5', classMeta, SystemBase4);\n setMetadataFor(SystemGraphHelper, 'SystemGraphHelper', objectMeta);\n setMetadataFor(Companion_39, 'Companion', objectMeta);\n setMetadataFor(AutomaticGroupBuilderSystem, 'AutomaticGroupBuilderSystem', classMeta, SystemBase);\n setMetadataFor(Companion_40, 'Companion', objectMeta);\n setMetadataFor(AutomaticGroupComponent, 'AutomaticGroupComponent', classMeta, VOID, [Component, SerializableComponent], AutomaticGroupComponent);\n setMetadataFor(Companion_41, 'Companion', objectMeta);\n setMetadataFor(AutomaticGroupIdCountComponent, 'AutomaticGroupIdCountComponent', classMeta, VOID, [Component]);\n setMetadataFor(EntityGroupUtils, 'EntityGroupUtils', objectMeta);\n setMetadataFor(Companion_42, 'Companion', objectMeta);\n setMetadataFor(ManualEntityGroupBuilderService, 'ManualEntityGroupBuilderService', classMeta);\n setMetadataFor(Companion_43, 'Companion', objectMeta);\n setMetadataFor(ManualGroupComponent, 'ManualGroupComponent', classMeta, VOID, [SerializableComponent], ManualGroupComponent);\n setMetadataFor(Companion_44, 'Companion', objectMeta);\n setMetadataFor(ManualGroupConnectorValidation, 'ManualGroupConnectorValidation', classMeta, ValidationImpl);\n setMetadataFor(Companion_45, 'Companion', objectMeta);\n setMetadataFor(ManualGroupIdCountComponent, 'ManualGroupIdCountComponent', classMeta, VOID, [Component]);\n setMetadataFor(StaticComponent, 'StaticComponent', objectMeta, VOID, [Component]);\n setMetadataFor(Companion_46, 'Companion', objectMeta);\n setMetadataFor(ChildComponent, 'ChildComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_47, 'Companion', objectMeta);\n setMetadataFor(ConnectionParentingSystem, 'ConnectionParentingSystem', classMeta, SystemBase, VOID, ConnectionParentingSystem);\n setMetadataFor(Companion_48, 'Companion', objectMeta);\n setMetadataFor(HierarchySystem, 'HierarchySystem', classMeta, SystemBase);\n setMetadataFor(HierarchyUtils, 'HierarchyUtils', objectMeta);\n setMetadataFor(hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda, 'hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\n setMetadataFor(hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda, 'hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\n setMetadataFor(InSceneComponent, 'InSceneComponent', objectMeta, VOID, [Component]);\n setMetadataFor(Companion_49, 'Companion', objectMeta);\n setMetadataFor(ParentComponent, 'ParentComponent', classMeta, VOID, [Component]);\n setMetadataFor(SceneComponent, 'SceneComponent', objectMeta, VOID, [Component]);\n setMetadataFor(Companion_50, 'Companion', objectMeta);\n setMetadataFor(SceneGraphSystem, 'SceneGraphSystem', classMeta, SystemBase);\n setMetadataFor(SceneManager, 'SceneManager', interfaceMeta);\n function takeSnapshot(snapshotName, $super) {\n snapshotName = snapshotName === VOID ? '' : snapshotName;\n return this.h2a(snapshotName);\n }\n setMetadataFor(History, 'History', interfaceMeta);\n setMetadataFor(HistoryEventType, 'HistoryEventType', classMeta, Enum);\n setMetadataFor(HistoryEvent, 'HistoryEvent', objectMeta);\n setMetadataFor(Companion_51, 'Companion', objectMeta);\n setMetadataFor(HistoryChangedEventComponent, 'HistoryChangedEventComponent', classMeta, VOID, [Component]);\n setMetadataFor(HistoryImpl, 'HistoryImpl', classMeta, VOID, [History]);\n setMetadataFor(LogLevel, 'LogLevel', classMeta, Enum);\n setMetadataFor(LogLevelJavascriptImpostor, 'LogLevelJavascriptImpostor', objectMeta);\n function set_logLevel(newLevel) {\n this.level = values_3()[newLevel];\n }\n function get_logLevel() {\n return this.level.x9_1;\n }\n setMetadataFor(Logger, 'Logger', interfaceMeta);\n setMetadataFor(LoggerImpl, 'LoggerImpl', classMeta, VOID, [Logger], LoggerImpl);\n setMetadataFor(LoggerWrap, 'LoggerWrap', classMeta, VOID, [Logger]);\n setMetadataFor(LoggerState, 'LoggerState', objectMeta);\n setMetadataFor(MockLogger, 'MockLogger', classMeta, VOID, [Logger], MockLogger);\n setMetadataFor(AxisAngle, 'AxisAngle', classMeta);\n setMetadataFor(Degrees, 'Degrees', classMeta);\n function alignBottom(outer) {\n return new Vector(0.0, -this.height / 2 + outer.height / 2, 0.0);\n }\n function alignTop(outer) {\n return this.alignBottom(outer).unaryMinus();\n }\n function alignRight(outer) {\n return new Vector(this.width / 2 - outer.width / 2, 0.0, 0.0);\n }\n function alignLeft(outer) {\n return this.alignRight(outer).unaryMinus();\n }\n function alignFront(outer) {\n return new Vector(0.0, 0.0, this.depth / 2 - outer.depth / 2);\n }\n function alignBack(outer) {\n return this.alignFront(outer).unaryMinus();\n }\n setMetadataFor(Dimension, 'Dimension', interfaceMeta);\n setMetadataFor(DualDouble, 'DualDouble', classMeta);\n setMetadataFor(Companion_52, 'Companion', objectMeta);\n setMetadataFor($serializer_2, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Margin, 'Margin', classMeta, VOID, VOID, Margin, VOID, {0: $serializer_getInstance_2});\n setMetadataFor(Axis, 'Axis', classMeta, Enum);\n setMetadataFor(MathUtils, 'MathUtils', objectMeta);\n setMetadataFor(Companion_53, 'Companion', objectMeta);\n setMetadataFor($serializer_3, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(ModelTransform, 'ModelTransform', classMeta, VOID, VOID, ModelTransform, VOID, {0: $serializer_getInstance_3});\n setMetadataFor(Companion_54, 'Companion', objectMeta);\n setMetadataFor(Raycastable, 'Raycastable', interfaceMeta);\n setMetadataFor(Plane, 'Plane', classMeta, VOID, [Raycastable]);\n setMetadataFor(Companion_55, 'Companion', objectMeta);\n setMetadataFor(Polygon, 'Polygon', classMeta, VOID, [Raycastable]);\n setMetadataFor(Companion_56, 'Companion', objectMeta);\n setMetadataFor($serializer_4, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Quaternion, 'Quaternion', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_4});\n setMetadataFor(Radians, 'Radians', classMeta);\n setMetadataFor(RelativeBoxOffset, 'RelativeBoxOffset', classMeta);\n setMetadataFor(RelationOriginAlongX, 'RelationOriginAlongX', classMeta, Enum);\n setMetadataFor(RelationOriginAlongXImpostor, 'RelationOriginAlongXImpostor', objectMeta);\n setMetadataFor(RelationOriginAlongY, 'RelationOriginAlongY', classMeta, Enum);\n setMetadataFor(RelationOriginAlongYImpostor, 'RelationOriginAlongYImpostor', objectMeta);\n setMetadataFor(RelationOriginAlongZ, 'RelationOriginAlongZ', classMeta, Enum);\n setMetadataFor(RelationOriginAlongZImpostor, 'RelationOriginAlongZImpostor', objectMeta);\n setMetadataFor(Companion_57, 'Companion', objectMeta);\n setMetadataFor($serializer_5, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RelationOrigin, 'RelationOrigin', classMeta, VOID, VOID, RelationOrigin, VOID, {0: $serializer_getInstance_5});\n setMetadataFor(Companion_58, 'Companion', objectMeta);\n setMetadataFor($serializer_6, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Size, 'Size', classMeta, VOID, [Dimension], Size, VOID, {0: $serializer_getInstance_6});\n setMetadataFor(Companion_59, 'Companion', objectMeta);\n setMetadataFor($serializer_7, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Transform, 'Transform', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_7});\n setMetadataFor(Companion_60, 'Companion', objectMeta);\n setMetadataFor($serializer_8, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Vector, 'Vector', classMeta, VOID, [Dimension], Vector, VOID, {0: $serializer_getInstance_8});\n setMetadataFor(VectorConstants, 'VectorConstants', objectMeta);\n setMetadataFor(InnerMeasurement, 'InnerMeasurement', classMeta);\n setMetadataFor(MeasurementUtils, 'MeasurementUtils', objectMeta);\n setMetadataFor(Companion_61, 'Companion', objectMeta);\n setMetadataFor(DisplayNameComponent, 'DisplayNameComponent', classMeta, VOID, [Component]);\n setMetadataFor(ProductUtils, 'ProductUtils', objectMeta);\n setMetadataFor(ProppingComponent, 'ProppingComponent', objectMeta, VOID, [Component]);\n setMetadataFor(Companion_62, 'Companion', objectMeta);\n setMetadataFor(TemplateDataComponent, 'TemplateDataComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_63, 'Companion', objectMeta);\n setMetadataFor(Ray, 'Ray', classMeta);\n setMetadataFor(RaycastHit, 'RaycastHit', classMeta);\n setMetadataFor(RaycastResult, 'RaycastResult', classMeta);\n setMetadataFor(RaycastUtils, 'RaycastUtils', objectMeta);\n setMetadataFor(Companion_64, 'Companion', objectMeta);\n setMetadataFor(LoadedModelInfoComponent, 'LoadedModelInfoComponent', classMeta, VOID, [Component], LoadedModelInfoComponent);\n setMetadataFor(Companion_65, 'Companion', objectMeta);\n setMetadataFor(ModelInfoComponent, 'ModelInfoComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_66, 'Companion', objectMeta);\n setMetadataFor(ModelLoaderSystem, 'ModelLoaderSystem', classMeta, SystemBase4);\n setMetadataFor(Companion_67, 'Companion', objectMeta);\n setMetadataFor(ModelTransformComponent, 'ModelTransformComponent', classMeta, VOID, [Component]);\n setMetadataFor(ModelUtils, 'ModelUtils', objectMeta);\n setMetadataFor(Companion_68, 'Companion', objectMeta);\n setMetadataFor(OutlineableComponent, 'OutlineableComponent', classMeta, VOID, [Component], OutlineableComponent);\n setMetadataFor(Companion_69, 'Companion', objectMeta);\n setMetadataFor(PauseViewerUpdatesComponent, 'PauseViewerUpdatesComponent', classMeta, VOID, [Component], PauseViewerUpdatesComponent);\n setMetadataFor(Companion_70, 'Companion', objectMeta);\n setMetadataFor(RenderSystem, 'RenderSystem', classMeta, SystemBase, VOID, RenderSystem);\n setMetadataFor(RenderedComponent, 'RenderedComponent', objectMeta, VOID, [Component]);\n function createSphere(radius, entity, $super) {\n entity = entity === VOID ? null : entity;\n return this.x2i(radius, entity);\n }\n function cloneObject(vo, entity, $super) {\n entity = entity === VOID ? null : entity;\n return this.y2i(vo, entity);\n }\n function createBox(width, height, depth, entity, $super) {\n entity = entity === VOID ? null : entity;\n return this.z2i(width, height, depth, entity);\n }\n function createPlane(width, depth, entity, $super) {\n entity = entity === VOID ? null : entity;\n return this.a2j(width, depth, entity);\n }\n function createSurface(vertices, normal, entity, $super) {\n entity = entity === VOID ? null : entity;\n return this.b2j(vertices, normal, entity);\n }\n function groupMeshes(meshes, entity, $super) {\n entity = entity === VOID ? null : entity;\n return this.c2j(meshes, entity);\n }\n function createUiLine(start, end, color, thickness, $super) {\n color = color === VOID ? Companion_getInstance_61().ZERO : color;\n return this.d2j(start, end, color, thickness);\n }\n function createUiDashedLine(start, end, color, thickness, $super) {\n color = color === VOID ? Companion_getInstance_61().ZERO : color;\n return this.e2j(start, end, color, thickness);\n }\n function updateUiLine(id, start, end, color, thickness, $super) {\n color = color === VOID ? Companion_getInstance_61().ZERO : color;\n return this.f2j(id, start, end, color, thickness);\n }\n function loadModel(entity, url, textureFile, modelLoaded, modelLoadFailed, loadingBoxSize, loadingBoxCenter, $super) {\n loadingBoxSize = loadingBoxSize === VOID ? null : loadingBoxSize;\n loadingBoxCenter = loadingBoxCenter === VOID ? null : loadingBoxCenter;\n return this.g2j(entity, url, textureFile, modelLoaded, modelLoadFailed, loadingBoxSize, loadingBoxCenter);\n }\n function debug(enable, $super) {\n enable = enable === VOID ? false : enable;\n return this.h2j(enable);\n }\n function createEmpty(entity, $super) {\n entity = entity === VOID ? null : entity;\n return this.i2j(entity);\n }\n function createGhostModel(modelUrl, modelLoaded, r, g, b, alpha, loadingBoxSize, $super) {\n r = r === VOID ? 0.0 : r;\n g = g === VOID ? 0.0 : g;\n b = b === VOID ? 1.0 : b;\n alpha = alpha === VOID ? 0.5 : alpha;\n loadingBoxSize = loadingBoxSize === VOID ? null : loadingBoxSize;\n return this.j2j(modelUrl, modelLoaded, r, g, b, alpha, loadingBoxSize);\n }\n setMetadataFor(Viewer, 'Viewer', interfaceMeta);\n setMetadataFor(Companion_71, 'Companion', objectMeta);\n setMetadataFor(ViewerComponent, 'ViewerComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_72, 'Companion', objectMeta);\n setMetadataFor(ViewerLineIdsComponent, 'ViewerLineIdsComponent', classMeta, VOID, [Component]);\n function setPosition(v) {\n return this.setPositionPrimitive(v.X, v.Y, v.Z);\n }\n function setScaleV(v) {\n return this.setScale(v.X, v.Y, v.Z);\n }\n setMetadataFor(ViewerObject, 'ViewerObject', interfaceMeta);\n setMetadataFor(Companion_73, 'Companion', objectMeta);\n setMetadataFor(ViewerObjectComponent, 'ViewerObjectComponent', classMeta, VOID, [Component]);\n setMetadataFor(ViewerObjectTransformSystem, 'ViewerObjectTransformSystem', classMeta, SystemBase4, VOID, ViewerObjectTransformSystem);\n setMetadataFor(ViewerObjectVisibilitySystem, 'ViewerObjectVisibilitySystem', classMeta, SystemBase3, VOID, ViewerObjectVisibilitySystem);\n setMetadataFor(ViewerPresenceSystem, 'ViewerPresenceSystem', classMeta, SystemBase);\n setMetadataFor(ViewerMock, 'ViewerMock', classMeta, VOID, [Viewer], ViewerMock);\n setMetadataFor(Companion_74, 'Companion', objectMeta);\n setMetadataFor(MockDragGenerator, 'MockDragGenerator', classMeta);\n setMetadataFor(Companion_75, 'Companion', objectMeta);\n setMetadataFor(ViewerObjectMock, 'ViewerObjectMock', classMeta, VOID, [ViewerObject], ViewerObjectMock);\n setMetadataFor(Companion_76, 'Companion', objectMeta);\n setMetadataFor(EntityReplaceHelper, 'EntityReplaceHelper', classMeta);\n setMetadataFor(Companion_77, 'Companion', objectMeta);\n setMetadataFor(FastReplaceAction, 'FastReplaceAction', classMeta, VOID, [Action]);\n setMetadataFor(ReplaceAction, 'ReplaceAction', classMeta, VOID, [Action]);\n setMetadataFor(ReplacePartAction, 'ReplacePartAction', classMeta, VOID, [Action]);\n setMetadataFor(Companion_78, 'Companion', objectMeta);\n setMetadataFor(ClickEventComponent, 'ClickEventComponent', classMeta, VOID, [Component]);\n setMetadataFor(MultiSelectionEnabledComponent, 'MultiSelectionEnabledComponent', objectMeta, VOID, [Component]);\n setMetadataFor(Companion_79, 'Companion', objectMeta);\n setMetadataFor(SelectableComponent, 'SelectableComponent', classMeta, VOID, [Component], SelectableComponent);\n setMetadataFor(SelectedComponent, 'SelectedComponent', objectMeta, VOID, [Component]);\n setMetadataFor(Companion_80, 'Companion', objectMeta);\n setMetadataFor($serializer_9, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(CatalogsHeader, 'CatalogsHeader', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_9});\n setMetadataFor(ComponentDeserializer, 'ComponentDeserializer', interfaceMeta);\n setMetadataFor(ComponentDeserializerRegistry, 'ComponentDeserializerRegistry', classMeta, VOID, VOID, ComponentDeserializerRegistry);\n setMetadataFor(Companion_81, 'Companion', objectMeta);\n setMetadataFor(Serializer, 'Serializer', interfaceMeta);\n setMetadataFor(JsonSerializer, 'JsonSerializer', classMeta, VOID, [Serializer], JsonSerializer);\n setMetadataFor(Companion_82, 'Companion', objectMeta);\n setMetadataFor(PreviouslySerializedIdComponent, 'PreviouslySerializedIdComponent', classMeta, VOID, [Component]);\n setMetadataFor(SceneReloadingComponent, 'SceneReloadingComponent', objectMeta, VOID, [Component]);\n function addComponent(key, json) {\n // Inline function 'kotlin.collections.set' call\n var this_0 = ensureNotNull(this.serializedComponents);\n var value = Default_getInstance().m15(json);\n this_0.r2(key, value);\n }\n setMetadataFor(SerializableEntity, 'SerializableEntity', interfaceMeta);\n setMetadataFor(Companion_83, 'Companion', objectMeta);\n setMetadataFor($serializer_10, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Companion_84, 'Companion', objectMeta);\n setMetadataFor(SerializableConnection, 'SerializableConnection', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_10});\n setMetadataFor($serializer_11, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(SerializableGuestConnectionsComponent, 'SerializableGuestConnectionsComponent', classMeta, VOID, [SerializableComponent], VOID, VOID, {0: $serializer_getInstance_11});\n function entitiesArray() {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.entities;\n return copyToArray(this_0);\n }\n setMetadataFor(SerializableTree, 'SerializableTree', interfaceMeta);\n setMetadataFor(Companion_85, 'Companion', objectMeta);\n setMetadataFor(UnserializableEntityComponent, 'UnserializableEntityComponent', classMeta, VOID, [Component], UnserializableEntityComponent);\n setMetadataFor(Companion_86, 'Companion', objectMeta);\n setMetadataFor($serializer_12, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(VersionHeader, 'VersionHeader', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_12});\n setMetadataFor(Companion_87, 'Companion', objectMeta);\n setMetadataFor(ConnectionGraphBuildOrder, 'ConnectionGraphBuildOrder', classMeta, VOID, VOID, ConnectionGraphBuildOrder);\n setMetadataFor(ShadowEntityWithParent, 'ShadowEntityWithParent', classMeta);\n setMetadataFor(NewEntityWithShadowChildren, 'NewEntityWithShadowChildren', classMeta);\n setMetadataFor(InterceptingAssemblyPartCatalog, 'InterceptingAssemblyPartCatalog', classMeta, VOID, [ProductCatalog]);\n setMetadataFor(Companion_88, 'Companion', objectMeta);\n setMetadataFor(EntityTreeBuilder, 'EntityTreeBuilder', classMeta);\n setMetadataFor(Companion_89, 'Companion', objectMeta);\n setMetadataFor($serializer_13, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(SerializableEntityV13, 'SerializableEntityV13', classMeta, VOID, [SerializableEntity], SerializableEntityV13, VOID, {0: $serializer_getInstance_13});\n setMetadataFor(Companion_90, 'Companion', objectMeta);\n setMetadataFor($serializer_14, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(SerializableTreeV13, 'SerializableTreeV13', classMeta, VOID, [SerializableTree], VOID, VOID, {0: $serializer_getInstance_14});\n setMetadataFor(ProductRefLevel, 'ProductRefLevel', classMeta);\n setMetadataFor(Companion_91, 'Companion', objectMeta);\n setMetadataFor(EntityAndDO, 'EntityAndDO', classMeta);\n setMetadataFor(EntityPartKey, 'EntityPartKey', classMeta);\n setMetadataFor(SerializerV13, 'SerializerV13', classMeta);\n setMetadataFor(Companion_92, 'Companion', objectMeta);\n setMetadataFor(AxisAlignedBox, 'AxisAlignedBox', classMeta);\n setMetadataFor(Companion_93, 'Companion', objectMeta);\n function transform(transform) {\n return this.rotate(transform.rotation).move(transform.position);\n }\n setMetadataFor(Polyhedron, 'Polyhedron', interfaceMeta, VOID, [Raycastable]);\n setMetadataFor(ConvexPolyhedron, 'ConvexPolyhedron', classMeta, VOID, [Polyhedron, Raycastable]);\n setMetadataFor(Face, 'Face', classMeta);\n setMetadataFor(Companion_94, 'Companion', objectMeta);\n setMetadataFor(Cuboid, 'Cuboid', classMeta, ConvexPolyhedron);\n setMetadataFor(PolyhedronGroup, 'PolyhedronGroup', classMeta, VOID, [Polyhedron, Raycastable]);\n setMetadataFor(PolyhedronUtils, 'PolyhedronUtils', objectMeta);\n setMetadataFor(Companion_95, 'Companion', objectMeta);\n setMetadataFor(MovedToCandidateSnapPositionComponent, 'MovedToCandidateSnapPositionComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_96, 'Companion', objectMeta);\n setMetadataFor(MovedToValidSnapPositionComponent, 'MovedToValidSnapPositionComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_97, 'Companion', objectMeta);\n setMetadataFor(RestrictAllowedRequiredHostsComponent, 'RestrictAllowedRequiredHostsComponent', classMeta, VOID, [Component]);\n function get_isAlignmentSnap() {\n var tmp = this.guestConnector.type;\n return tmp === 2;\n }\n setMetadataFor(SnapActionCandidate, 'SnapActionCandidate', interfaceMeta, VOID, [ActionCandidate]);\n setMetadataFor(SnapActionCandidateImpl, 'SnapActionCandidateImpl', classMeta, VOID, [SnapActionCandidate]);\n setMetadataFor(SnapAction, 'SnapAction', classMeta, SnapActionCandidateImpl, [SnapActionCandidateImpl, Action]);\n setMetadataFor(SnapActionCandidateSortAndSelectStrategies, 'SnapActionCandidateSortAndSelectStrategies', objectMeta);\n setMetadataFor(SnapActionCandidateSortAndSelectStrategy, 'SnapActionCandidateSortAndSelectStrategy', interfaceMeta);\n setMetadataFor(SelectAll, 'SelectAll', objectMeta, VOID, [SnapActionCandidateSortAndSelectStrategy]);\n setMetadataFor(sam$kotlin_Comparator$0_2, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(SortByPriorityInActivationDistanceThenDistance, 'SortByPriorityInActivationDistanceThenDistance', objectMeta, VOID, [SnapActionCandidateSortAndSelectStrategy]);\n setMetadataFor(sam$kotlin_Comparator$0_3, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(SortByPriorityThenDistance, 'SortByPriorityThenDistance', objectMeta, VOID, [SnapActionCandidateSortAndSelectStrategy]);\n setMetadataFor(sam$kotlin_Comparator$0_4, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(SortByDistance, 'SortByDistance', objectMeta, VOID, [SnapActionCandidateSortAndSelectStrategy]);\n setMetadataFor(sam$kotlin_Comparator$0_5, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(sam$kotlin_Comparator$0_6, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(Companion_98, 'Companion', objectMeta);\n setMetadataFor(SnapActionInProgressComponent, 'SnapActionInProgressComponent', classMeta, VOID, [Component], SnapActionInProgressComponent);\n setMetadataFor(Companion_99, 'Companion', objectMeta);\n setMetadataFor(SnapCandidateComponent, 'SnapCandidateComponent', classMeta, VOID, [Component], SnapCandidateComponent);\n setMetadataFor(Companion_100, 'Companion', objectMeta);\n setMetadataFor(SnapRootComponent, 'SnapRootComponent', classMeta, VOID, [Component], SnapRootComponent);\n setMetadataFor(SnapSettings, 'SnapSettings', classMeta, VOID, VOID, SnapSettings);\n setMetadataFor(AlternativeSnapCandidate, 'AlternativeSnapCandidate', classMeta);\n setMetadataFor(SnapUtils, 'SnapUtils', objectMeta);\n setMetadataFor(EntityState, 'EntityState', classMeta);\n setMetadataFor(Companion_101, 'Companion', objectMeta);\n setMetadataFor(IsLoadingSnapshotComponent, 'IsLoadingSnapshotComponent', classMeta, VOID, [Component], IsLoadingSnapshotComponent);\n setMetadataFor(Companion_102, 'Companion', objectMeta);\n setMetadataFor(SnapshotIgnoreComponent, 'SnapshotIgnoreComponent', classMeta, VOID, [Component], SnapshotIgnoreComponent);\n setMetadataFor(Companion_103, 'Companion', objectMeta);\n setMetadataFor(SnapshotService, 'SnapshotService', classMeta);\n setMetadataFor(Snapshot, 'Snapshot', classMeta);\n setMetadataFor(Companion_104, 'Companion', objectMeta);\n setMetadataFor(UpdatedFromSnapshotEventComponent, 'UpdatedFromSnapshotEventComponent', classMeta, VOID, [Component]);\n setMetadataFor(ApiSystemIds, 'ApiSystemIds', objectMeta);\n setMetadataFor(AlwaysHangDownComponent, 'AlwaysHangDownComponent', objectMeta, VOID, [Component]);\n setMetadataFor(Companion_105, 'Companion', objectMeta);\n setMetadataFor($serializer_15, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Serialized_0, 'Serialized', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_15});\n setMetadataFor(Companion_106, 'Companion', objectMeta);\n setMetadataFor(LocalTransformComponent, 'LocalTransformComponent', classMeta, VOID, [JsonSerializable, Component]);\n setMetadataFor(Companion_107, 'Companion', objectMeta);\n setMetadataFor(TransformSystem, 'TransformSystem', classMeta, SystemBase, VOID, TransformSystem);\n setMetadataFor(TransformUtils, 'TransformUtils', objectMeta);\n setMetadataFor(Companion_108, 'Companion', objectMeta);\n setMetadataFor($serializer_16, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Serialized_1, 'Serialized', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_16});\n setMetadataFor(Companion_109, 'Companion', objectMeta);\n setMetadataFor(WorldTransformComponent, 'WorldTransformComponent', classMeta, VOID, [SerializableComponent]);\n setMetadataFor(Measurable, 'Measurable', interfaceMeta);\n setMetadataFor(Measurer, 'Measurer', classMeta, VOID, VOID, Measurer);\n setMetadataFor(MutableStack, 'MutableStack', classMeta);\n setMetadataFor(UrlHelper, 'UrlHelper', objectMeta);\n setMetadataFor(UrlDetails, 'UrlDetails', classMeta);\n setMetadataFor(Companion_110, 'Companion', objectMeta);\n setMetadataFor(NoValidConnectorAvailableValidationResult, 'NoValidConnectorAvailableValidationResult', classMeta, ValidationResult);\n setMetadataFor(Companion_111, 'Companion', objectMeta);\n setMetadataFor(UnknownErrorValidationResult, 'UnknownErrorValidationResult', classMeta, ValidationResult);\n setMetadataFor(Companion_112, 'Companion', objectMeta);\n setMetadataFor(ValidSnapActionCandidateOrErrors, 'ValidSnapActionCandidateOrErrors', classMeta);\n setMetadataFor(ValidationResultType, 'ValidationResultType', classMeta, Enum);\n setMetadataFor(Companion_113, 'Companion', objectMeta);\n setMetadataFor(ValidationResultFail, 'ValidationResultFail', classMeta, ValidationResult);\n setMetadataFor(ValidationResultWarning, 'ValidationResultWarning', classMeta, ValidationResult);\n setMetadataFor(Companion_114, 'Companion', objectMeta);\n function validateCurrentState(entity, earlyOut, $super) {\n earlyOut = earlyOut === VOID ? true : earlyOut;\n return this.a2u(entity, earlyOut);\n }\n function validateSnap(snapActionCandidate, earlyOut, $super) {\n earlyOut = earlyOut === VOID ? true : earlyOut;\n return this.b2u(snapActionCandidate, earlyOut);\n }\n function validateSnaps(snapActionCandidates, earlyOut, $super) {\n earlyOut = earlyOut === VOID ? true : earlyOut;\n return this.c2u(snapActionCandidates, earlyOut);\n }\n function getFirstValidSnapAction(snapActionCandidates, sortByWarnings, $super) {\n sortByWarnings = sortByWarnings === VOID ? true : sortByWarnings;\n return this.d2u(snapActionCandidates, sortByWarnings);\n }\n function evaluateSnapCandidate(snapActionCandidate, earlyOut, $super) {\n earlyOut = earlyOut === VOID ? false : earlyOut;\n return this.e2u(snapActionCandidate, earlyOut);\n }\n function evaluateSnapCandidates(snapActionCandidates, earlyOut, $super) {\n earlyOut = earlyOut === VOID ? false : earlyOut;\n return this.f2u(snapActionCandidates, earlyOut);\n }\n setMetadataFor(ValidationService, 'ValidationService', interfaceMeta, VOID, [Measurable]);\n //endregion\n function Action() {\n }\n function ActionCandidate() {\n }\n var ActionState_NOT_DONE_instance;\n var ActionState_DONE_instance;\n function values() {\n return [ActionState_NOT_DONE_getInstance(), ActionState_DONE_getInstance()];\n }\n function valueOf(value) {\n switch (value) {\n case 'NOT_DONE':\n return ActionState_NOT_DONE_getInstance();\n case 'DONE':\n return ActionState_DONE_getInstance();\n default:\n ActionState_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var ActionState_entriesInitialized;\n function ActionState_initEntries() {\n if (ActionState_entriesInitialized)\n return Unit_instance;\n ActionState_entriesInitialized = true;\n ActionState_NOT_DONE_instance = new ActionState('NOT_DONE', 0);\n ActionState_DONE_instance = new ActionState('DONE', 1);\n }\n function ActionState(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function ActionState_NOT_DONE_getInstance() {\n ActionState_initEntries();\n return ActionState_NOT_DONE_instance;\n }\n function ActionState_DONE_getInstance() {\n ActionState_initEntries();\n return ActionState_DONE_instance;\n }\n function Core() {\n }\n function CoreFactory() {\n }\n function CoreModules() {\n }\n function CoreServices(coreModules, entityManager, sceneManager, componentDeserializerRegistry, validations, serializer, productManager, snapshotService, coreFactory) {\n this.coreModules = coreModules;\n this.entityManager = entityManager;\n this.sceneManager = sceneManager;\n this.componentDeserializerRegistry = componentDeserializerRegistry;\n this.validations = validations;\n this.serializer = serializer;\n this.productManager = productManager;\n this.snapshotService = snapshotService;\n this.coreFactory = coreFactory;\n }\n protoOf(CoreServices).o1i = function () {\n return this.coreModules;\n };\n protoOf(CoreServices).p1i = function () {\n return this.entityManager;\n };\n protoOf(CoreServices).q1i = function () {\n return this.sceneManager;\n };\n protoOf(CoreServices).r1i = function () {\n return this.componentDeserializerRegistry;\n };\n protoOf(CoreServices).s1i = function () {\n return this.validations;\n };\n protoOf(CoreServices).t1i = function () {\n return this.serializer;\n };\n protoOf(CoreServices).u1i = function () {\n return this.productManager;\n };\n protoOf(CoreServices).v1i = function () {\n return this.snapshotService;\n };\n protoOf(CoreServices).w1i = function () {\n return this.coreFactory;\n };\n protoOf(CoreServices).x1i = function () {\n return LoggerState_getInstance().a1j();\n };\n function MissingCriticalModuleException(message) {\n Exception_init_$Init$(message, this);\n captureStack(this, MissingCriticalModuleException);\n }\n function connectPartToAssembly($this, entity) {\n Companion_instance.connectChildPart($this.c1j_1, entity, $this.b1j_1);\n }\n function AddPartAction(newEntity, assemblyPart, parent, entityManager, validationService) {\n this.newEntity = newEntity;\n this.b1j_1 = assemblyPart;\n this.c1j_1 = parent;\n this.entityManager = entityManager;\n this.d1j_1 = new EntityReplaceHelper(this.newEntity, null, this.c1j_1, validationService);\n }\n protoOf(AddPartAction).e1j = function () {\n return this.newEntity;\n };\n protoOf(AddPartAction).p1i = function () {\n return this.entityManager;\n };\n protoOf(AddPartAction).rollback = function () {\n this.d1j_1.v();\n };\n protoOf(AddPartAction).perform = function () {\n connectPartToAssembly(this, this.newEntity);\n };\n protoOf(AddPartAction).toString = function () {\n return 'Add part action for new ' + this.newEntity;\n };\n function assembleChildren($this, parent, assemblyPart, partsMap, productManager, entityManager, partIds) {\n // Inline function 'kotlin.collections.mutableSetOf' call\n var usedHostConnections = LinkedHashSet_init_$Create$();\n var tmp0_safe_receiver = assemblyPart.children;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n var tmp$ret$1;\n $l$block_1: {\n // Inline function 'com.ikea.core.assemblies.Companion.assembleChildren.' call\n var tmp0_elvis_lhs = partsMap.b3(element.partKey);\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n tmp$ret$1 = null;\n break $l$block_1;\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n var productRefForPart = tmp_0;\n // Inline function 'kotlin.text.isEmpty' call\n if (charSequenceLength(productRefForPart) === 0) {\n tmp$ret$1 = null;\n break $l$block_1;\n }\n var tmp2_safe_receiver = partIds == null ? null : partIds.parts;\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.b3(element.partKey);\n var id = tmp3_elvis_lhs == null ? entityManager.getNextId() : tmp3_elvis_lhs;\n var tmp4_elvis_lhs = productManager.createEntityInternal(productRefForPart, id, parent);\n var tmp_1;\n if (tmp4_elvis_lhs == null) {\n tmp$ret$1 = null;\n break $l$block_1;\n } else {\n tmp_1 = tmp4_elvis_lhs;\n }\n var childEntity = tmp_1;\n Companion_instance.connectChildPart(parent, childEntity, element, usedHostConnections);\n if (element.children == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n assembleChildren(Companion_instance, childEntity, element, partsMap, productManager, entityManager, partIds);\n }\n tmp$ret$1 = childEntity;\n }\n var tmp0_safe_receiver_0 = tmp$ret$1;\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver_0);\n }\n }\n tmp = destination;\n }\n var tmp1_safe_receiver = tmp;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_iterator = tmp1_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.assemblies.Companion.assembleChildren..' call\n HierarchyUtils_instance.setParent(element_0, parent);\n }\n }\n }\n function assembleChildren$default($this, parent, assemblyPart, partsMap, productManager, entityManager, partIds, $super) {\n partIds = partIds === VOID ? null : partIds;\n return assembleChildren($this, parent, assemblyPart, partsMap, productManager, entityManager, partIds);\n }\n function findEntityInHierarchyThatHasConnector($this, childEntity, connectorKey) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = get_hierarchy(childEntity);\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.assemblies.Companion.findEntityInHierarchyThatHasConnector.' call\n var tmp0_safe_receiver = get_connectorsComponent(element);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.connectors;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable_0 = 0;\n var last_0 = tmp1_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = tmp1_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.assemblies.Companion.findEntityInHierarchyThatHasConnector..' call\n if (element_0.key === connectorKey) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n tmp = tmp$ret$1;\n }\n var tmp2_elvis_lhs = tmp;\n if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {\n tmp$ret$3 = element;\n break $l$block_0;\n }\n }\n tmp$ret$3 = null;\n }\n return tmp$ret$3;\n }\n function transferAnyParentConnectionToTheConnectionRoot($this, childEntity, parent) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.assemblies.Companion.transferAnyParentConnectionToTheConnectionRoot.' call\n var hostedConnections = childEntity.__getComponentForKotlin(105);\n var tmp0_elvis_lhs = get_connectionRootEntity(parent);\n var parentRoot = tmp0_elvis_lhs == null ? parent : tmp0_elvis_lhs;\n var tmp2_safe_receiver = hostedConnections == null ? null : hostedConnections.connections;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.assemblies.Companion.transferAnyParentConnectionToTheConnectionRoot..' call\n addHostedConnection(parentRoot, element);\n }\n }\n childEntity.removeComponent(105);\n }\n function findClosestSnap($this, hostEntity, childEntity, assemblyPart, usedHostConnectors) {\n var settings = new SnapSettings(false, true, false, true);\n // Inline function 'kotlin.collections.sortedBy' call\n var this_0 = SnapUtils_instance.matchingSnapActionCandidates(childEntity, hostEntity, settings);\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp = AssemblyBuilder$Companion$findClosestSnap$lambda;\n var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);\n var snaps = sortedWith(this_0, tmp$ret$0);\n var tmp0_safe_receiver = assemblyPart.snapInfo;\n var tmp_0;\n if (tmp0_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.assemblies.Companion.findClosestSnap.' call\n var tmp_1;\n if (assemblyPart.snapInfo.useClosest) {\n var tmp$ret$3;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = snaps.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.assemblies.Companion.findClosestSnap..' call\n if (!usedHostConnectors.p(element.hostConnector)) {\n tmp$ret$3 = element;\n break $l$block;\n }\n }\n tmp$ret$3 = null;\n }\n tmp_1 = tmp$ret$3;\n } else {\n var tmp$ret$5;\n $l$block_0: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator_0 = snaps.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.assemblies.Companion.findClosestSnap..' call\n if ((isBlank(tmp0_safe_receiver.connectorOnHost) ? true : element_0.hostConnector.key === tmp0_safe_receiver.connectorOnHost) ? isBlank(tmp0_safe_receiver.connector) ? true : element_0.guestConnector.key === tmp0_safe_receiver.connector : false) {\n tmp$ret$5 = element_0;\n break $l$block_0;\n }\n }\n tmp$ret$5 = null;\n }\n tmp_1 = tmp$ret$5;\n }\n tmp_0 = tmp_1;\n }\n return tmp_0;\n }\n function transformPart($this, entity, transform) {\n if (!(transform == null)) {\n TransformUtils_instance.moveInParentSpace(entity, transform.position);\n TransformUtils_instance.rotate(entity, transform.rotation);\n }\n }\n function partKeyToProductRefForEntity($this, entity) {\n var partKey = get_partKey(entity);\n var productRef = get_productRef(entity);\n var tmp;\n if (partKey == null ? true : productRef == null) {\n tmp = null;\n } else {\n tmp = to(partKey, productRef);\n }\n return tmp;\n }\n function partKeyToEntityIdForEntity($this, entity) {\n var partKey = get_partKey(entity);\n var entityId = entity.id;\n var tmp;\n if (partKey == null) {\n tmp = null;\n } else {\n tmp = to(partKey, entityId);\n }\n return tmp;\n }\n function sam$kotlin_Comparator$0(function_0) {\n this.t1j_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0).u1j = function (a, b) {\n return this.t1j_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function AssemblyBuilder$Companion$findClosestSnap$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.assemblies.Companion.findClosestSnap.' call\n var tmp = a.movement.size;\n // Inline function 'com.ikea.core.assemblies.Companion.findClosestSnap.' call\n var tmp$ret$1 = b.movement.size;\n return compareValues(tmp, tmp$ret$1);\n }\n function Companion() {\n }\n protoOf(Companion).v1j = function (entity, assemblyPart, partsMap, productManager, entityManager, partIds) {\n assembleChildren(this, entity, assemblyPart, partsMap, productManager, entityManager, partIds);\n RelativeConnectorRepositioner_instance.repositionRelativeConnectorsFromBounds(entity);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_descendants(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.assemblies.Companion.buildAssembly.' call\n productManager.notifyCreatedListeners(element);\n }\n };\n protoOf(Companion).buildAssembly = function (entity, assemblyPart, partsMap, productManager, entityManager, partIds, $super) {\n partIds = partIds === VOID ? null : partIds;\n return this.v1j(entity, assemblyPart, partsMap, productManager, entityManager, partIds);\n };\n protoOf(Companion).w1j = function (parent, childEntity, childPart, usedHostConnections) {\n Companion_getInstance_110();\n if (!childEntity.hasComponent(10)) {\n TransformUtils_instance.setWorldTransform(childEntity, get_worldTransform(parent));\n }\n transformPart(this, childEntity, childPart.relativeTransform);\n var tmp;\n if (!(childPart.snapInfo == null)) {\n var shouldSearchForSnap = (childPart.snapInfo.useClosest ? true : isBlank(childPart.snapInfo.connector)) ? true : isBlank(childPart.snapInfo.connectorOnHost);\n var hadSnapRootComponent = childEntity.hasComponent(47);\n childEntity.addComponentInternal(new SnapRootComponent());\n var tmp_0;\n if (shouldSearchForSnap) {\n tmp_0 = findClosestSnap(this, parent, childEntity, childPart, toList(usedHostConnections));\n } else {\n var host = findEntityInHierarchyThatHasConnector(this, parent, childPart.snapInfo.connectorOnHost);\n var guest = findEntityInHierarchyThatHasConnector(this, childEntity, childPart.snapInfo.connector);\n var tmp_1 = SnapUtils_instance;\n var tmp_2 = host == null ? parent : host;\n tmp_0 = tmp_1.createForcedSnapActionCandidate(tmp_2, guest == null ? childEntity : guest, childPart.snapInfo.connectorOnHost, childPart.snapInfo.connector);\n }\n var snap = tmp_0;\n if (!hadSnapRootComponent) {\n childEntity.removeComponentInternal(47);\n }\n tmp = snap;\n } else {\n tmp = null;\n }\n var snap_0 = tmp;\n if (snap_0 == null ? true : childPart.locked) {\n childEntity.removeComponent(3);\n childEntity.removeComponent(1);\n childEntity.addComponent(new ProductPartComponent(childPart.partKey));\n childEntity.removeComponent(28);\n childEntity.removeComponent(47);\n transferAnyParentConnectionToTheConnectionRoot(this, childEntity, parent);\n } else {\n var connectorsDeltaTransform = snap_0.hostConnector.getDeltaTransformToGuestConnectorEntity(parent, childEntity, snap_0.guestConnector);\n var connection = new Connection(childEntity, snap_0.guestConnector, parent, snap_0.hostConnector, connectorsDeltaTransform);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [connection];\n childEntity.addComponent(new GuestConnectionsComponent(tmp$ret$3));\n }\n setParentMaintainWorldTransform(childEntity, parent);\n if (snap_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n usedHostConnections.q(snap_0.hostConnector);\n snap_0.doInitialAssemblySnap();\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = childPart.additionalComponents.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.assemblies.Companion.connectChildPart.' call\n childEntity.addComponent(element);\n }\n return childEntity;\n };\n protoOf(Companion).connectChildPart = function (parent, childEntity, childPart, usedHostConnections, $super) {\n var tmp;\n if (usedHostConnections === VOID) {\n // Inline function 'kotlin.collections.mutableSetOf' call\n tmp = LinkedHashSet_init_$Create$();\n } else {\n tmp = usedHostConnections;\n }\n usedHostConnections = tmp;\n return this.w1j(parent, childEntity, childPart, usedHostConnections);\n };\n protoOf(Companion).x1j = function (entity, includeSubAssemblies) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_children(entity);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.assemblies.Companion.partsMapForEntity.' call\n if (get_isProductPart(element)) {\n destination.q(element);\n }\n }\n var childParts = destination;\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_0 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = childParts.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.assemblies.Companion.partsMapForEntity.' call\n var tmp0_safe_receiver = partKeyToProductRefForEntity(Companion_instance, element_0);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_0.q(tmp0_safe_receiver);\n }\n }\n var partsMap = toMutableMap(toMap(destination_0));\n // Inline function 'kotlin.collections.fold' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = childParts.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.assemblies.Companion.partsMapForEntity.' call\n var tmp;\n if (includeSubAssemblies) {\n tmp = true;\n } else {\n tmp = !element_1.hasComponent(12);\n }\n if (tmp) {\n destination_1.q(element_1);\n }\n }\n var accumulator = partsMap;\n var tmp0_iterator_1 = destination_1.t();\n while (tmp0_iterator_1.u()) {\n var element_2 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.assemblies.Companion.partsMapForEntity.' call\n var total = accumulator;\n var childrenPartsMap = Companion_instance.partsMapForEntity(element_2, includeSubAssemblies);\n total.s2(childrenPartsMap);\n accumulator = total;\n }\n return partsMap;\n };\n protoOf(Companion).partsMapForEntity = function (entity, includeSubAssemblies, $super) {\n includeSubAssemblies = includeSubAssemblies === VOID ? true : includeSubAssemblies;\n return this.x1j(entity, includeSubAssemblies);\n };\n protoOf(Companion).y1j = function (entity, includeSubAssemblies) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_children(entity);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.assemblies.Companion.partIdsMapForEntity.' call\n if (get_isProductPart(element)) {\n destination.q(element);\n }\n }\n var childParts = destination;\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_0 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = childParts.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.assemblies.Companion.partIdsMapForEntity.' call\n var tmp0_safe_receiver = partKeyToEntityIdForEntity(Companion_instance, element_0);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_0.q(tmp0_safe_receiver);\n }\n }\n var idsMap = toMutableMap(toMap(destination_0));\n // Inline function 'kotlin.collections.fold' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = childParts.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.assemblies.Companion.partIdsMapForEntity.' call\n var tmp;\n if (includeSubAssemblies) {\n tmp = true;\n } else {\n tmp = !element_1.hasComponent(12);\n }\n if (tmp) {\n destination_1.q(element_1);\n }\n }\n var accumulator = idsMap;\n var tmp0_iterator_1 = destination_1.t();\n while (tmp0_iterator_1.u()) {\n var element_2 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.assemblies.Companion.partIdsMapForEntity.' call\n var total = accumulator;\n var childrenIdsMap = Companion_instance.partIdsMapForEntity(element_2, includeSubAssemblies);\n total.s2(childrenIdsMap);\n accumulator = total;\n }\n return idsMap;\n };\n protoOf(Companion).partIdsMapForEntity = function (entity, includeSubAssemblies, $super) {\n includeSubAssemblies = includeSubAssemblies === VOID ? true : includeSubAssemblies;\n return this.y1j(entity, includeSubAssemblies);\n };\n var Companion_instance;\n function Companion_getInstance_0() {\n return Companion_instance;\n }\n function AssemblyBuilder() {\n }\n function AssemblyPart(partKey, relativeTransform, snapInfo, children, locked, variant, additionalComponents) {\n relativeTransform = relativeTransform === VOID ? null : relativeTransform;\n snapInfo = snapInfo === VOID ? null : snapInfo;\n children = children === VOID ? null : children;\n locked = locked === VOID ? true : locked;\n variant = variant === VOID ? null : variant;\n additionalComponents = additionalComponents === VOID ? emptyList() : additionalComponents;\n this.partKey = partKey;\n this.relativeTransform = relativeTransform;\n this.snapInfo = snapInfo;\n this.children = children;\n this.locked = locked;\n this.variant = variant;\n this.additionalComponents = additionalComponents;\n }\n protoOf(AssemblyPart).z1j = function () {\n return this.partKey;\n };\n protoOf(AssemblyPart).a1k = function () {\n return this.relativeTransform;\n };\n protoOf(AssemblyPart).b1k = function () {\n return this.snapInfo;\n };\n protoOf(AssemblyPart).c1k = function () {\n return this.children;\n };\n protoOf(AssemblyPart).d1k = function () {\n return this.locked;\n };\n protoOf(AssemblyPart).e1k = function () {\n return this.variant;\n };\n protoOf(AssemblyPart).f1k = function () {\n return this.additionalComponents;\n };\n protoOf(AssemblyPart).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof AssemblyPart))\n THROW_CCE();\n if (!(this.partKey === other.partKey))\n return false;\n return true;\n };\n protoOf(AssemblyPart).hashCode = function () {\n return getStringHashCode(this.partKey);\n };\n protoOf(AssemblyPart).af = function () {\n return this.partKey;\n };\n protoOf(AssemblyPart).bf = function () {\n return this.relativeTransform;\n };\n protoOf(AssemblyPart).g1k = function () {\n return this.snapInfo;\n };\n protoOf(AssemblyPart).h1k = function () {\n return this.children;\n };\n protoOf(AssemblyPart).i1k = function () {\n return this.locked;\n };\n protoOf(AssemblyPart).j1k = function () {\n return this.variant;\n };\n protoOf(AssemblyPart).k1k = function () {\n return this.additionalComponents;\n };\n protoOf(AssemblyPart).l1k = function (partKey, relativeTransform, snapInfo, children, locked, variant, additionalComponents) {\n return new AssemblyPart(partKey, relativeTransform, snapInfo, children, locked, variant, additionalComponents);\n };\n protoOf(AssemblyPart).copy = function (partKey, relativeTransform, snapInfo, children, locked, variant, additionalComponents, $super) {\n partKey = partKey === VOID ? this.partKey : partKey;\n relativeTransform = relativeTransform === VOID ? this.relativeTransform : relativeTransform;\n snapInfo = snapInfo === VOID ? this.snapInfo : snapInfo;\n children = children === VOID ? this.children : children;\n locked = locked === VOID ? this.locked : locked;\n variant = variant === VOID ? this.variant : variant;\n additionalComponents = additionalComponents === VOID ? this.additionalComponents : additionalComponents;\n return this.l1k(partKey, relativeTransform, snapInfo, children, locked, variant, additionalComponents);\n };\n protoOf(AssemblyPart).toString = function () {\n return 'AssemblyPart(partKey=' + this.partKey + ', relativeTransform=' + this.relativeTransform + ', snapInfo=' + this.snapInfo + ', children=' + toString(this.children) + ', locked=' + this.locked + ', variant=' + this.variant + ', additionalComponents=' + this.additionalComponents + ')';\n };\n function AssemblyPartSnapInfo(connectorOnHost, connector, useClosest) {\n connectorOnHost = connectorOnHost === VOID ? '' : connectorOnHost;\n connector = connector === VOID ? '' : connector;\n useClosest = useClosest === VOID ? false : useClosest;\n this.connectorOnHost = connectorOnHost;\n this.connector = connector;\n this.useClosest = useClosest;\n }\n protoOf(AssemblyPartSnapInfo).m1k = function () {\n return this.connectorOnHost;\n };\n protoOf(AssemblyPartSnapInfo).n1k = function () {\n return this.connector;\n };\n protoOf(AssemblyPartSnapInfo).o1k = function () {\n return this.useClosest;\n };\n protoOf(AssemblyPartSnapInfo).af = function () {\n return this.connectorOnHost;\n };\n protoOf(AssemblyPartSnapInfo).bf = function () {\n return this.connector;\n };\n protoOf(AssemblyPartSnapInfo).g1k = function () {\n return this.useClosest;\n };\n protoOf(AssemblyPartSnapInfo).p1k = function (connectorOnHost, connector, useClosest) {\n return new AssemblyPartSnapInfo(connectorOnHost, connector, useClosest);\n };\n protoOf(AssemblyPartSnapInfo).copy = function (connectorOnHost, connector, useClosest, $super) {\n connectorOnHost = connectorOnHost === VOID ? this.connectorOnHost : connectorOnHost;\n connector = connector === VOID ? this.connector : connector;\n useClosest = useClosest === VOID ? this.useClosest : useClosest;\n return this.p1k(connectorOnHost, connector, useClosest);\n };\n protoOf(AssemblyPartSnapInfo).toString = function () {\n return 'AssemblyPartSnapInfo(connectorOnHost=' + this.connectorOnHost + ', connector=' + this.connector + ', useClosest=' + this.useClosest + ')';\n };\n protoOf(AssemblyPartSnapInfo).hashCode = function () {\n var result = getStringHashCode(this.connectorOnHost);\n result = imul(result, 31) + getStringHashCode(this.connector) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.useClosest) | 0;\n return result;\n };\n protoOf(AssemblyPartSnapInfo).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof AssemblyPartSnapInfo))\n return false;\n var tmp0_other_with_cast = other instanceof AssemblyPartSnapInfo ? other : THROW_CCE();\n if (!(this.connectorOnHost === tmp0_other_with_cast.connectorOnHost))\n return false;\n if (!(this.connector === tmp0_other_with_cast.connector))\n return false;\n if (!(this.useClosest === tmp0_other_with_cast.useClosest))\n return false;\n return true;\n };\n function Companion_0() {\n }\n protoOf(Companion_0).l17 = function () {\n return $serializer_getInstance();\n };\n var Companion_instance_0;\n function Companion_getInstance_1() {\n return Companion_instance_0;\n }\n function $serializer() {\n $serializer_instance = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.assemblies.AssemblyPartConnectorInfo', this, 7);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('main', false);\n tmp0_serialDesc.cv('connector', true);\n tmp0_serialDesc.cv('connectorOnHost', true);\n tmp0_serialDesc.cv('translation', true);\n tmp0_serialDesc.cv('rotation', true);\n tmp0_serialDesc.cv('children', true);\n this.q1k_1 = tmp0_serialDesc;\n }\n protoOf($serializer).ok = function () {\n return this.q1k_1;\n };\n protoOf($serializer).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_8()), get_nullable($serializer_getInstance_4()), get_nullable(new ArrayListSerializer($serializer_getInstance()))];\n };\n protoOf($serializer).qk = function (decoder) {\n var tmp0_desc = this.q1k_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = false;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_local5 = null;\n var tmp10_local6 = null;\n var tmp11_input = decoder.nn(tmp0_desc);\n if (tmp11_input.do()) {\n tmp4_local0 = tmp11_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp11_input.pn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp11_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp11_input.bo(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp11_input.bo(tmp0_desc, 4, $serializer_getInstance_8(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n tmp9_local5 = tmp11_input.bo(tmp0_desc, 5, $serializer_getInstance_4(), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n tmp10_local6 = tmp11_input.bo(tmp0_desc, 6, new ArrayListSerializer($serializer_getInstance()), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp11_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp11_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp11_input.pn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp11_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp11_input.bo(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp11_input.bo(tmp0_desc, 4, $serializer_getInstance_8(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n case 5:\n tmp9_local5 = tmp11_input.bo(tmp0_desc, 5, $serializer_getInstance_4(), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n break;\n case 6:\n tmp10_local6 = tmp11_input.bo(tmp0_desc, 6, new ArrayListSerializer($serializer_getInstance()), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp11_input.on(tmp0_desc);\n return AssemblyPartConnectorInfo_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, null);\n };\n protoOf($serializer).r1k = function (encoder, value) {\n var tmp0_desc = this.q1k_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.uo(tmp0_desc, 1, value.main);\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.connector == null)) {\n tmp1_output.gp(tmp0_desc, 2, StringSerializer_getInstance(), value.connector);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.connectorOnHost == null)) {\n tmp1_output.gp(tmp0_desc, 3, StringSerializer_getInstance(), value.connectorOnHost);\n }\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.translation == null)) {\n tmp1_output.gp(tmp0_desc, 4, $serializer_getInstance_8(), value.translation);\n }\n if (tmp1_output.kp(tmp0_desc, 5) ? true : !(value.rotation == null)) {\n tmp1_output.gp(tmp0_desc, 5, $serializer_getInstance_4(), value.rotation);\n }\n if (tmp1_output.kp(tmp0_desc, 6) ? true : !(value.children == null)) {\n tmp1_output.gp(tmp0_desc, 6, new ArrayListSerializer($serializer_getInstance()), value.children);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer).pk = function (encoder, value) {\n return this.r1k(encoder, value instanceof AssemblyPartConnectorInfo ? value : THROW_CCE());\n };\n var $serializer_instance;\n function $serializer_getInstance() {\n if ($serializer_instance == null)\n new $serializer();\n return $serializer_instance;\n }\n function AssemblyPartConnectorInfo_init_$Init$(seen1, id, main, connector, connectorOnHost, translation, rotation, children, serializationConstructorMarker, $this) {\n if (!(3 === (3 & seen1))) {\n throwMissingFieldException(seen1, 3, $serializer_getInstance().q1k_1);\n }\n $this.id = id;\n $this.main = main;\n if (0 === (seen1 & 4))\n $this.connector = null;\n else\n $this.connector = connector;\n if (0 === (seen1 & 8))\n $this.connectorOnHost = null;\n else\n $this.connectorOnHost = connectorOnHost;\n if (0 === (seen1 & 16))\n $this.translation = null;\n else\n $this.translation = translation;\n if (0 === (seen1 & 32))\n $this.rotation = null;\n else\n $this.rotation = rotation;\n if (0 === (seen1 & 64))\n $this.children = null;\n else\n $this.children = children;\n return $this;\n }\n function AssemblyPartConnectorInfo_init_$Create$(seen1, id, main, connector, connectorOnHost, translation, rotation, children, serializationConstructorMarker) {\n return AssemblyPartConnectorInfo_init_$Init$(seen1, id, main, connector, connectorOnHost, translation, rotation, children, serializationConstructorMarker, objectCreate(protoOf(AssemblyPartConnectorInfo)));\n }\n function AssemblyPartConnectorInfo(id, main, connector, connectorOnHost, translation, rotation, children) {\n connector = connector === VOID ? null : connector;\n connectorOnHost = connectorOnHost === VOID ? null : connectorOnHost;\n translation = translation === VOID ? null : translation;\n rotation = rotation === VOID ? null : rotation;\n children = children === VOID ? null : children;\n this.id = id;\n this.main = main;\n this.connector = connector;\n this.connectorOnHost = connectorOnHost;\n this.translation = translation;\n this.rotation = rotation;\n this.children = children;\n }\n protoOf(AssemblyPartConnectorInfo).s1k = function () {\n return this.id;\n };\n protoOf(AssemblyPartConnectorInfo).t1k = function () {\n return this.main;\n };\n protoOf(AssemblyPartConnectorInfo).n1k = function () {\n return this.connector;\n };\n protoOf(AssemblyPartConnectorInfo).m1k = function () {\n return this.connectorOnHost;\n };\n protoOf(AssemblyPartConnectorInfo).u1k = function () {\n return this.translation;\n };\n protoOf(AssemblyPartConnectorInfo).v1k = function () {\n return this.rotation;\n };\n protoOf(AssemblyPartConnectorInfo).c1k = function () {\n return this.children;\n };\n function Companion_1() {\n this.id = 96;\n }\n protoOf(Companion_1).s1k = function () {\n return this.id;\n };\n var Companion_instance_1;\n function Companion_getInstance_2() {\n return Companion_instance_1;\n }\n function AssemblyPartIdsComponent$toString$lambda(it) {\n return it.t2() + ':' + it.u2();\n }\n function AssemblyPartIdsComponent(parts) {\n this.parts = parts;\n }\n protoOf(AssemblyPartIdsComponent).w1k = function () {\n return this.parts;\n };\n protoOf(AssemblyPartIdsComponent).x1k = function () {\n return 96;\n };\n protoOf(AssemblyPartIdsComponent).eq = function (other) {\n return false;\n };\n protoOf(AssemblyPartIdsComponent).toString = function () {\n var tmp = this.parts.q2();\n return 'AssemblyPartsIdsComponent(' + joinToString(tmp, VOID, VOID, VOID, VOID, VOID, AssemblyPartIdsComponent$toString$lambda) + ')';\n };\n protoOf(AssemblyPartIdsComponent).af = function () {\n return this.parts;\n };\n protoOf(AssemblyPartIdsComponent).y1k = function (parts) {\n return new AssemblyPartIdsComponent(parts);\n };\n protoOf(AssemblyPartIdsComponent).copy = function (parts, $super) {\n parts = parts === VOID ? this.parts : parts;\n return this.y1k(parts);\n };\n protoOf(AssemblyPartIdsComponent).hashCode = function () {\n return hashCode(this.parts);\n };\n protoOf(AssemblyPartIdsComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof AssemblyPartIdsComponent))\n return false;\n var tmp0_other_with_cast = other instanceof AssemblyPartIdsComponent ? other : THROW_CCE();\n if (!equals(this.parts, tmp0_other_with_cast.parts))\n return false;\n return true;\n };\n function AssemblyPartsComponent$Companion$serializer$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n return Unit_instance;\n }\n function AssemblyPartsComponent_init_$Init$(partPairs, $this) {\n // Inline function 'kotlin.collections.associate' call\n var capacity = coerceAtLeast(mapCapacity(partPairs.length), 16);\n // Inline function 'kotlin.collections.associateTo' call\n var destination = LinkedHashMap_init_$Create$(capacity);\n var inductionVariable = 0;\n var last = partPairs.length;\n while (inductionVariable < last) {\n var element = partPairs[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.plusAssign' call\n // Inline function 'com.ikea.core.assemblies.AssemblyPartsComponent..' call\n var pair = to(element.partKey, element.productRef);\n destination.r2(pair.ye_1, pair.ze_1);\n }\n AssemblyPartsComponent.call($this, destination);\n return $this;\n }\n function AssemblyPartsComponent_init_$Create$(partPairs) {\n return AssemblyPartsComponent_init_$Init$(partPairs, objectCreate(protoOf(AssemblyPartsComponent)));\n }\n function Companion_2() {\n Companion_instance_2 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.b1l_1 = [new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];\n this.c1l_1 = 43;\n this.d1l_1 = 'AssemblyPartsComponent';\n var tmp_0 = this;\n tmp_0.e1l_1 = Json(VOID, AssemblyPartsComponent$Companion$serializer$lambda);\n }\n protoOf(Companion_2).f1l = function (json) {\n return this.e1l_1.l15(this.l17(), json);\n };\n protoOf(Companion_2).l17 = function () {\n return $serializer_getInstance_0();\n };\n var Companion_instance_2;\n function Companion_getInstance_3() {\n if (Companion_instance_2 == null)\n new Companion_2();\n return Companion_instance_2;\n }\n function $serializer_0() {\n $serializer_instance_0 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.assemblies.AssemblyPartsComponent', this, 1);\n tmp0_serialDesc.cv('parts', false);\n this.g1l_1 = tmp0_serialDesc;\n }\n protoOf($serializer_0).ok = function () {\n return this.g1l_1;\n };\n protoOf($serializer_0).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [Companion_getInstance_3().b1l_1[0]];\n };\n protoOf($serializer_0).qk = function (decoder) {\n var tmp0_desc = this.g1l_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_input = decoder.nn(tmp0_desc);\n var tmp6_cached = Companion_getInstance_3().b1l_1;\n if (tmp5_input.do()) {\n tmp4_local0 = tmp5_input.zn(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp5_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp5_input.zn(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp5_input.on(tmp0_desc);\n return AssemblyPartsComponent_init_$Create$_0(tmp3_bitMask0, tmp4_local0, null);\n };\n protoOf($serializer_0).h1l = function (encoder, value) {\n var tmp0_desc = this.g1l_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_3().b1l_1;\n tmp1_output.ep(tmp0_desc, 0, tmp2_cached[0], value.i1l_1);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_0).pk = function (encoder, value) {\n return this.h1l(encoder, value instanceof AssemblyPartsComponent ? value : THROW_CCE());\n };\n var $serializer_instance_0;\n function $serializer_getInstance_0() {\n if ($serializer_instance_0 == null)\n new $serializer_0();\n return $serializer_instance_0;\n }\n function AssemblyPartsComponent_init_$Init$_0(seen1, parts, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_0().g1l_1);\n }\n $this.i1l_1 = parts;\n return $this;\n }\n function AssemblyPartsComponent_init_$Create$_0(seen1, parts, serializationConstructorMarker) {\n return AssemblyPartsComponent_init_$Init$_0(seen1, parts, serializationConstructorMarker, objectCreate(protoOf(AssemblyPartsComponent)));\n }\n function AssemblyPartsComponent$toString$lambda(it) {\n return it.t2() + ':' + it.u2();\n }\n function AssemblyPartsComponent(parts) {\n Companion_getInstance_3();\n this.i1l_1 = parts;\n }\n protoOf(AssemblyPartsComponent).x1k = function () {\n return 43;\n };\n protoOf(AssemblyPartsComponent).eq = function (other) {\n return false;\n };\n protoOf(AssemblyPartsComponent).toString = function () {\n var tmp = this.i1l_1.q2();\n return 'AssemblyPartsComponent(' + joinToString(tmp, VOID, VOID, VOID, VOID, VOID, AssemblyPartsComponent$toString$lambda) + ')';\n };\n protoOf(AssemblyPartsComponent).asArray = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.i1l_1;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this_0.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.assemblies.AssemblyPartsComponent.asArray.' call\n var tmp$ret$1 = new PartPair(item.t2(), item.u2());\n destination.q(tmp$ret$1);\n }\n return copyToArray(destination);\n };\n protoOf(AssemblyPartsComponent).hashCode = function () {\n return hashCode(this.i1l_1);\n };\n protoOf(AssemblyPartsComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof AssemblyPartsComponent))\n return false;\n var tmp0_other_with_cast = other instanceof AssemblyPartsComponent ? other : THROW_CCE();\n if (!equals(this.i1l_1, tmp0_other_with_cast.i1l_1))\n return false;\n return true;\n };\n function Companion_3() {\n this.id = 12;\n }\n protoOf(Companion_3).s1k = function () {\n return this.id;\n };\n var Companion_instance_3;\n function Companion_getInstance_4() {\n return Companion_instance_3;\n }\n function toString$withChildren(ap) {\n var tmp = ensureNotNull(ap.children);\n return ap.partKey + '(' + joinToString_0(tmp, VOID, VOID, VOID, VOID, VOID, AssemblyStructureComponent$toString$withChildren$lambda) + ')';\n }\n function toString$noChildren(ap) {\n return ap.partKey + ':0';\n }\n function AssemblyStructureComponent$toString$lambda(ap) {\n var tmp;\n if (!(ap.children == null)) {\n tmp = toString$withChildren(ap);\n } else {\n tmp = toString$noChildren(ap);\n }\n return tmp;\n }\n function AssemblyStructureComponent$toString$withChildren$lambda(it) {\n return it.partKey;\n }\n function AssemblyStructureComponent(parts) {\n this.parts = parts;\n }\n protoOf(AssemblyStructureComponent).w1k = function () {\n return this.parts;\n };\n protoOf(AssemblyStructureComponent).x1k = function () {\n return 12;\n };\n protoOf(AssemblyStructureComponent).eq = function (other) {\n return false;\n };\n protoOf(AssemblyStructureComponent).toString = function () {\n var partsStr = joinToString_0(this.parts, VOID, VOID, VOID, VOID, VOID, AssemblyStructureComponent$toString$lambda);\n return 'AssemblyStructureComponent(' + partsStr + ')';\n };\n function get_isAssembly(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(12);\n }\n function PartPair(partKey, productRef) {\n this.partKey = partKey;\n this.productRef = productRef;\n }\n protoOf(PartPair).z1j = function () {\n return this.partKey;\n };\n protoOf(PartPair).j1l = function () {\n return this.productRef;\n };\n protoOf(PartPair).af = function () {\n return this.partKey;\n };\n protoOf(PartPair).bf = function () {\n return this.productRef;\n };\n protoOf(PartPair).k1l = function (partKey, productRef) {\n return new PartPair(partKey, productRef);\n };\n protoOf(PartPair).copy = function (partKey, productRef, $super) {\n partKey = partKey === VOID ? this.partKey : partKey;\n productRef = productRef === VOID ? this.productRef : productRef;\n return this.k1l(partKey, productRef);\n };\n protoOf(PartPair).toString = function () {\n return 'PartPair(partKey=' + this.partKey + ', productRef=' + this.productRef + ')';\n };\n protoOf(PartPair).hashCode = function () {\n var result = getStringHashCode(this.partKey);\n result = imul(result, 31) + getStringHashCode(this.productRef) | 0;\n return result;\n };\n protoOf(PartPair).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PartPair))\n return false;\n var tmp0_other_with_cast = other instanceof PartPair ? other : THROW_CCE();\n if (!(this.partKey === tmp0_other_with_cast.partKey))\n return false;\n if (!(this.productRef === tmp0_other_with_cast.productRef))\n return false;\n return true;\n };\n function ProductPartComponent$Companion$serializer$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n return Unit_instance;\n }\n function Companion_4() {\n }\n protoOf(Companion_4).l17 = function () {\n return $serializer_getInstance_1();\n };\n var Companion_instance_4;\n function Companion_getInstance_5() {\n return Companion_instance_4;\n }\n function $serializer_1() {\n $serializer_instance_1 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.assemblies.ProductPartComponent.Serialized', this, 1);\n tmp0_serialDesc.cv('partKey', false);\n this.l1l_1 = tmp0_serialDesc;\n }\n protoOf($serializer_1).ok = function () {\n return this.l1l_1;\n };\n protoOf($serializer_1).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance()];\n };\n protoOf($serializer_1).qk = function (decoder) {\n var tmp0_desc = this.l1l_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_input = decoder.nn(tmp0_desc);\n if (tmp5_input.do()) {\n tmp4_local0 = tmp5_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp5_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp5_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp5_input.on(tmp0_desc);\n return Serialized_init_$Create$(tmp3_bitMask0, tmp4_local0, null);\n };\n protoOf($serializer_1).m1l = function (encoder, value) {\n var tmp0_desc = this.l1l_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.n1l_1);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_1).pk = function (encoder, value) {\n return this.m1l(encoder, value instanceof Serialized ? value : THROW_CCE());\n };\n var $serializer_instance_1;\n function $serializer_getInstance_1() {\n if ($serializer_instance_1 == null)\n new $serializer_1();\n return $serializer_instance_1;\n }\n function Serialized_init_$Init$(seen1, partKey, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_1().l1l_1);\n }\n $this.n1l_1 = partKey;\n return $this;\n }\n function Serialized_init_$Create$(seen1, partKey, serializationConstructorMarker) {\n return Serialized_init_$Init$(seen1, partKey, serializationConstructorMarker, objectCreate(protoOf(Serialized)));\n }\n function Companion_5() {\n Companion_instance_5 = this;\n this.id = 44;\n this.serializationKey = 'ProductPartComponent';\n var tmp = this;\n tmp.o1l_1 = Json(VOID, ProductPartComponent$Companion$serializer$lambda);\n }\n protoOf(Companion_5).s1k = function () {\n return this.id;\n };\n protoOf(Companion_5).p1l = function () {\n return this.serializationKey;\n };\n protoOf(Companion_5).fromJson = function (json) {\n var result = this.o1l_1.l15(Companion_instance_4.l17(), json);\n return new ProductPartComponent(result.n1l_1);\n };\n var Companion_instance_5;\n function Companion_getInstance_6() {\n if (Companion_instance_5 == null)\n new Companion_5();\n return Companion_instance_5;\n }\n function Serialized(partKey) {\n this.n1l_1 = partKey;\n }\n function ProductPartComponent(partKey) {\n Companion_getInstance_6();\n this.partKey = partKey;\n }\n protoOf(ProductPartComponent).z1j = function () {\n return this.partKey;\n };\n protoOf(ProductPartComponent).toJson = function (parse) {\n return Companion_getInstance_6().o1l_1.k15(Companion_instance_4.l17(), new Serialized(this.partKey));\n };\n protoOf(ProductPartComponent).eq = function (other) {\n return (other instanceof ProductPartComponent ? other : THROW_CCE()).partKey === this.partKey;\n };\n protoOf(ProductPartComponent).serializationKey = function () {\n return 'ProductPartComponent';\n };\n protoOf(ProductPartComponent).x1k = function () {\n return 44;\n };\n protoOf(ProductPartComponent).toJsonElement = function () {\n return Companion_getInstance_6().o1l_1.k15(Companion_instance_4.l17(), new Serialized(this.partKey));\n };\n protoOf(ProductPartComponent).af = function () {\n return this.partKey;\n };\n protoOf(ProductPartComponent).q1l = function (partKey) {\n return new ProductPartComponent(partKey);\n };\n protoOf(ProductPartComponent).copy = function (partKey, $super) {\n partKey = partKey === VOID ? this.partKey : partKey;\n return this.q1l(partKey);\n };\n protoOf(ProductPartComponent).toString = function () {\n return 'ProductPartComponent(partKey=' + this.partKey + ')';\n };\n protoOf(ProductPartComponent).hashCode = function () {\n return getStringHashCode(this.partKey);\n };\n protoOf(ProductPartComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ProductPartComponent))\n return false;\n var tmp0_other_with_cast = other instanceof ProductPartComponent ? other : THROW_CCE();\n if (!(this.partKey === tmp0_other_with_cast.partKey))\n return false;\n return true;\n };\n function get_isProductPart(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(44);\n }\n function get_partKey(_this__u8e3s4) {\n var tmp0_safe_receiver = get_productPart(_this__u8e3s4);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.partKey;\n }\n function get_productPart(_this__u8e3s4) {\n return _this__u8e3s4.__getComponentForKotlin(44);\n }\n function connectPartToAssembly_0($this, entity) {\n Companion_instance.connectChildPart($this.s1l_1, entity, $this.r1l_1);\n }\n function RemovePartAction(oldEntity, assemblyPart, parent, entityManager, validationService) {\n this.oldEntity = oldEntity;\n this.r1l_1 = assemblyPart;\n this.s1l_1 = parent;\n this.entityManager = entityManager;\n this.t1l_1 = validationService;\n this.u1l_1 = Companion_instance_76.x1l(this.oldEntity, null, this.t1l_1);\n var tmp = this;\n // Inline function 'kotlin.collections.map' call\n var this_0 = get_immediateConnectionRootDescendants(this.oldEntity);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.assemblies.RemovePartAction.descendantEntityHelpers.' call\n var tmp$ret$0 = EntityReplaceHelper_init_$Create$(item, null, this.t1l_1, 1.7976931348623157E308);\n destination.q(tmp$ret$0);\n }\n tmp.v1l_1 = destination;\n this.w1l_1 = EntityReplaceHelper_init_$Create$(this.oldEntity, null, this.t1l_1);\n }\n protoOf(RemovePartAction).y1l = function () {\n return this.oldEntity;\n };\n protoOf(RemovePartAction).p1i = function () {\n return this.entityManager;\n };\n protoOf(RemovePartAction).rollback = function () {\n connectPartToAssembly_0(this, this.oldEntity);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.v1l_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.assemblies.RemovePartAction.rollback.' call\n element.z1l();\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = this.u1l_1.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.assemblies.RemovePartAction.rollback.' call\n element_0.z1l();\n }\n };\n protoOf(RemovePartAction).perform = function () {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.u1l_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.assemblies.RemovePartAction.perform.' call\n element.v();\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = this.v1l_1.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.assemblies.RemovePartAction.perform.' call\n element_0.v();\n }\n this.w1l_1.v();\n };\n protoOf(RemovePartAction).toString = function () {\n return 'Remove part Action old ' + this.oldEntity;\n };\n function ProductCatalog() {\n }\n function generatePartHierarchy($this, entity, parts) {\n var tmp;\n if (parts == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.associate' call\n var capacity = coerceAtLeast(mapCapacity(parts.length), 16);\n // Inline function 'kotlin.collections.associateTo' call\n var destination = LinkedHashMap_init_$Create$(capacity);\n var inductionVariable = 0;\n var last = parts.length;\n while (inductionVariable < last) {\n var element = parts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.plusAssign' call\n // Inline function 'com.ikea.core.catalog.ProductCatalogFunctions.generatePartHierarchy.' call\n var pair = to(element.partKey, element.productRef);\n destination.r2(pair.ye_1, pair.ze_1);\n }\n tmp = destination;\n }\n var tmp1_elvis_lhs = tmp;\n var newPartsMap = tmp1_elvis_lhs == null ? emptyMap() : tmp1_elvis_lhs;\n // Inline function 'kotlin.collections.associate' call\n var this_0 = $this.getPartsMap(entity);\n var capacity_0 = coerceAtLeast(mapCapacity(this_0.length), 16);\n // Inline function 'kotlin.collections.associateTo' call\n var destination_0 = LinkedHashMap_init_$Create$(capacity_0);\n var inductionVariable_0 = 0;\n var last_0 = this_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'kotlin.collections.plusAssign' call\n // Inline function 'com.ikea.core.catalog.ProductCatalogFunctions.generatePartHierarchy.' call\n var pair_0 = to(element_0.partKey, element_0.productRef);\n destination_0.r2(pair_0.ye_1, pair_0.ze_1);\n }\n var oldPartsMap = destination_0;\n return plus(oldPartsMap, newPartsMap);\n }\n function generatePartHierarchy$default($this, entity, parts, $super) {\n parts = parts === VOID ? null : parts;\n return generatePartHierarchy($this, entity, parts);\n }\n function generatePartHierarchyFromStructure($this, entity, parts) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(12);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.catalog.ProductCatalogFunctions.generatePartHierarchyFromStructure.' call\n tmp = generatePartHierarchyFromStructure$_anonymous_$traverse_4layzz(tmp0_safe_receiver.parts);\n }\n var tmp1_elvis_lhs = tmp;\n var allPartKeys = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;\n var partsMap = Companion_instance.partsMapForEntity(entity, false);\n // Inline function 'kotlin.collections.associateWith' call\n var result = LinkedHashMap_init_$Create$(coerceAtLeast(mapCapacity(collectionSizeOrDefault(allPartKeys, 10)), 16));\n // Inline function 'kotlin.collections.associateWithTo' call\n var tmp0_iterator = allPartKeys.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.catalog.ProductCatalogFunctions.generatePartHierarchyFromStructure.' call\n var tmp_0;\n if (parts == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$3;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = parts.length;\n while (inductionVariable < last) {\n var element_0 = parts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.catalog.ProductCatalogFunctions.generatePartHierarchyFromStructure..' call\n if (element_0.partKey === element) {\n tmp$ret$3 = element_0;\n break $l$block;\n }\n }\n tmp$ret$3 = null;\n }\n tmp_0 = tmp$ret$3;\n }\n var tmp1_safe_receiver = tmp_0;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.productRef;\n var tmp3_elvis_lhs = tmp2_elvis_lhs == null ? partsMap.b3(element) : tmp2_elvis_lhs;\n var ref = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;\n result.r2(element, ref);\n }\n return result;\n }\n function generatePartHierarchyFromStructure$default($this, entity, parts, $super) {\n parts = parts === VOID ? null : parts;\n return generatePartHierarchyFromStructure($this, entity, parts);\n }\n function generatePartHierarchyFromStructure$_anonymous_$traverse_4layzz(parts) {\n var tmp;\n if (parts == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = parts.length;\n while (inductionVariable < last) {\n var element = parts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.catalog.ProductCatalogFunctions.generatePartHierarchyFromStructure.$traverse.' call\n var list = plus_0(listOf(element.partKey), generatePartHierarchyFromStructure$_anonymous_$traverse_4layzz(element.children));\n addAll(destination, list);\n }\n tmp = destination;\n }\n var tmp1_elvis_lhs = tmp;\n return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;\n }\n function ProductCatalogFunctions() {\n }\n protoOf(ProductCatalogFunctions).getPartsMap = function (assembly) {\n var partsMap = Companion_instance.partsMapForEntity(assembly, false);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(partsMap.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = partsMap.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.catalog.ProductCatalogFunctions.getPartsMap.' call\n var tmp$ret$1 = new PartPair(item.t2(), item.u2());\n destination.q(tmp$ret$1);\n }\n return copyToArray(destination);\n };\n protoOf(ProductCatalogFunctions).b1m = function (entity, parts) {\n return new AssemblyPartsComponent(generatePartHierarchy(this, entity, parts));\n };\n protoOf(ProductCatalogFunctions).createAssemblyPartsComponent = function (entity, parts, $super) {\n parts = parts === VOID ? null : parts;\n return this.b1m(entity, parts);\n };\n protoOf(ProductCatalogFunctions).c1m = function (entity, parts, includeUnused) {\n var tmp;\n if (includeUnused) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = generatePartHierarchyFromStructure(this, entity, parts);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this_0.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.catalog.ProductCatalogFunctions.createAssemblyParts.' call\n var tmp$ret$1 = new PartPair(item.t2(), item.u2());\n destination.q(tmp$ret$1);\n }\n tmp = copyToArray(destination);\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_1 = generatePartHierarchy(this, entity, parts);\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(this_1.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator_0 = this_1.q2().t();\n while (tmp0_iterator_0.u()) {\n var item_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.catalog.ProductCatalogFunctions.createAssemblyParts.' call\n var tmp$ret$6 = new PartPair(item_0.t2(), item_0.u2());\n destination_0.q(tmp$ret$6);\n }\n tmp = copyToArray(destination_0);\n }\n return tmp;\n };\n protoOf(ProductCatalogFunctions).createAssemblyParts = function (entity, parts, includeUnused, $super) {\n parts = parts === VOID ? null : parts;\n includeUnused = includeUnused === VOID ? false : includeUnused;\n return this.c1m(entity, parts, includeUnused);\n };\n var ProductCatalogFunctions_instance;\n function ProductCatalogFunctions_getInstance() {\n return ProductCatalogFunctions_instance;\n }\n function Companion_6() {\n this.id = 18;\n }\n protoOf(Companion_6).s1k = function () {\n return this.id;\n };\n var Companion_instance_6;\n function Companion_getInstance_7() {\n return Companion_instance_6;\n }\n function ProductComponent(productRef) {\n this.productRef = productRef;\n }\n protoOf(ProductComponent).j1l = function () {\n return this.productRef;\n };\n protoOf(ProductComponent).x1k = function () {\n return 18;\n };\n protoOf(ProductComponent).eq = function (other) {\n return (other instanceof ProductComponent ? other : THROW_CCE()).productRef === this.productRef;\n };\n protoOf(ProductComponent).equals = function (other) {\n var tmp;\n if (other instanceof ProductComponent) {\n tmp = other.productRef === this.productRef;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(ProductComponent).hashCode = function () {\n return getStringHashCode(this.productRef);\n };\n protoOf(ProductComponent).af = function () {\n return this.productRef;\n };\n protoOf(ProductComponent).q1l = function (productRef) {\n return new ProductComponent(productRef);\n };\n protoOf(ProductComponent).copy = function (productRef, $super) {\n productRef = productRef === VOID ? this.productRef : productRef;\n return this.q1l(productRef);\n };\n protoOf(ProductComponent).toString = function () {\n return 'ProductComponent(productRef=' + this.productRef + ')';\n };\n function get_productRef(_this__u8e3s4) {\n var tmp0_safe_receiver = get_productComponent(_this__u8e3s4);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.productRef;\n }\n function get_productComponent(_this__u8e3s4) {\n return _this__u8e3s4.__getComponentForKotlin(18);\n }\n function get_productRefOrEmptyString(_this__u8e3s4) {\n var tmp0_elvis_lhs = get_productRef(_this__u8e3s4);\n return tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;\n }\n function ProductManager() {\n }\n function ProductSpecification(components) {\n this.components = components;\n this.i1m_1 = 0;\n }\n protoOf(ProductSpecification).j1m = function () {\n return this.components;\n };\n protoOf(ProductSpecification).hasComponent = function (componentId) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = this.components;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.catalog.ProductSpecification.hasComponent.' call\n if (element.typeId === componentId) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n return tmp$ret$1;\n };\n protoOf(ProductSpecification).addComponent = function (component) {\n var specWithoutComponent = this.removeComponent(component.typeId);\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$0 = specWithoutComponent.components;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [component];\n var newComponents = tmp$ret$0.concat(tmp$ret$3);\n return new ProductSpecification(newComponents);\n };\n protoOf(ProductSpecification).addComponents = function (components) {\n // Inline function 'kotlin.collections.fold' call\n var accumulator = this;\n var tmp0_iterator = components.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.catalog.ProductSpecification.addComponents.' call\n accumulator = accumulator.addComponent(element);\n }\n return accumulator;\n };\n protoOf(ProductSpecification).removeComponent = function (componentId) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filterNot' call\n // Inline function 'kotlin.collections.filterNotTo' call\n var this_0 = this.components;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.catalog.ProductSpecification.removeComponent.' call\n if (!(element.typeId === componentId)) {\n destination.q(element);\n }\n }\n var newComponents = copyToArray(destination);\n return this.copy(newComponents);\n };\n protoOf(ProductSpecification)._findComponentKt = function (componentId) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = this.components;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.catalog.ProductSpecification.findComponent.' call\n if (element.typeId === componentId) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp = tmp$ret$1;\n return (!(tmp == null) ? isInterface(tmp, Component) : false) ? tmp : null;\n };\n protoOf(ProductSpecification).findComponent = function (componentId) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = this.components;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.catalog.ProductSpecification.findComponentJS.' call\n if (element.typeId === componentId) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n };\n protoOf(ProductSpecification).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof ProductSpecification))\n THROW_CCE();\n if (!contentEquals(this.components, other.components))\n return false;\n return true;\n };\n protoOf(ProductSpecification).hashCode = function () {\n if (this.i1m_1 === 0)\n this.i1m_1 = contentHashCode(this.components);\n return this.i1m_1;\n };\n protoOf(ProductSpecification).af = function () {\n return this.components;\n };\n protoOf(ProductSpecification).k1m = function (components) {\n return new ProductSpecification(components);\n };\n protoOf(ProductSpecification).copy = function (components, $super) {\n components = components === VOID ? this.components : components;\n return this.k1m(components);\n };\n protoOf(ProductSpecification).toString = function () {\n return 'ProductSpecification(components=' + toString(this.components) + ')';\n };\n function addChild($this, parent, root, productStructureItem, productManager) {\n var childEntity = productManager.createEntity(productStructureItem.productRef, VOID, parent);\n if (childEntity == null) {\n $this.l1m_1.warn(ProductStructureBuilder$Companion$addChild$lambda(productStructureItem));\n return null;\n }\n Companion_getInstance_110();\n if (!childEntity.hasComponent(10)) {\n TransformUtils_instance.setWorldTransform(childEntity, get_worldTransform(parent));\n }\n transformPart_0($this, childEntity, productStructureItem.relativeTransform);\n var snap = createSnapCandidate($this, childEntity, parent, productStructureItem);\n if (snap == null) {\n $this.l1m_1.warn(ProductStructureBuilder$Companion$addChild$lambda_0(productStructureItem, parent));\n childEntity.dispose();\n return null;\n }\n var tmp;\n var tmp_0 = snap.guestConnector.type;\n if (tmp_0 === 2) {\n tmp = true;\n } else {\n var tmp_1 = snap.hostConnector.type;\n tmp = tmp_1 === 2;\n }\n if (tmp) {\n snap.perform();\n var nonAlignmentSnapInThisPosition = findSnapToNonAlignmentConnector($this, childEntity, root);\n if (!(nonAlignmentSnapInThisPosition == null)) {\n nonAlignmentSnapInThisPosition.createAction().perform();\n } else {\n addAsChildToRoot($this, snap.guestRoot, root);\n }\n } else {\n snap.createAction().perform();\n }\n return childEntity;\n }\n function findSnapToNonAlignmentConnector($this, childEntity, root) {\n var allConnections = ConnectionUtils_instance.calculateAllConnectionsToHierarchy(childEntity, root);\n // Inline function 'kotlin.collections.isEmpty' call\n if (allConnections.length === 0) {\n return null;\n }\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlin.collections.maxBy' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (allConnections.length === 0)\n throw NoSuchElementException_init_$Create$();\n var maxElem = allConnections[0];\n var lastIndex = get_lastIndex(allConnections);\n if (lastIndex === 0) {\n tmp$ret$2 = maxElem;\n break $l$block;\n }\n // Inline function 'com.ikea.core.catalog.Companion.findSnapToNonAlignmentConnector.' call\n var maxValue = maxElem.priority;\n var inductionVariable = 1;\n if (inductionVariable <= lastIndex)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var e = allConnections[i];\n // Inline function 'com.ikea.core.catalog.Companion.findSnapToNonAlignmentConnector.' call\n var v = e.priority;\n if (compareTo(maxValue, v) < 0) {\n maxElem = e;\n maxValue = v;\n }\n }\n while (!(i === lastIndex));\n tmp$ret$2 = maxElem;\n }\n var highestPriorityConnection = tmp$ret$2;\n return SnapUtils_instance.createSnapCandidate(highestPriorityConnection.guestConnectorEntity, highestPriorityConnection.guestConnector, highestPriorityConnection.hostConnectorEntity, highestPriorityConnection.hostConnector);\n }\n function createSnapCandidate($this, demandingEntity, offeringEntity, productStructureItem) {\n var tmp0_elvis_lhs = productStructureItem.snap;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var connectionData = tmp;\n var demandingConnectorKey = connectionData.demandingConnector;\n var offeringConnectorKey = connectionData.offeringConnector;\n // Inline function 'kotlin.sequences.find' call\n var this_0 = get_snappingEntitiesSequence(demandingEntity);\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'kotlin.sequences.firstOrNull' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.catalog.Companion.createSnapCandidate.' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = get_connectors(element);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element_0 = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.catalog.Companion.createSnapCandidate..' call\n if (element_0.key === demandingConnectorKey) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n if (tmp$ret$1) {\n tmp$ret$3 = element;\n break $l$block_0;\n }\n }\n tmp$ret$3 = null;\n }\n var tmp1_elvis_lhs = tmp$ret$3;\n var realDemandingEntity = tmp1_elvis_lhs == null ? demandingEntity : tmp1_elvis_lhs;\n // Inline function 'kotlin.collections.find' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_1 = hierarchyExceptSubTreesWithComponentArray(offeringEntity, 47);\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var element_1 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.catalog.Companion.createSnapCandidate.' call\n Companion_getInstance_23();\n if (element_1.hasComponent(11)) {\n destination.q(element_1);\n }\n }\n var tmp$ret$11;\n $l$block_2: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var element_2 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.catalog.Companion.createSnapCandidate.' call\n var tmp$ret$9;\n $l$block_1: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject_0 = get_connectors(element_2);\n var inductionVariable_1 = 0;\n var last_1 = indexedObject_0.length;\n while (inductionVariable_1 < last_1) {\n var element_3 = indexedObject_0[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.catalog.Companion.createSnapCandidate..' call\n if (element_3.key === offeringConnectorKey) {\n tmp$ret$9 = true;\n break $l$block_1;\n }\n }\n tmp$ret$9 = false;\n }\n if (tmp$ret$9) {\n tmp$ret$11 = element_2;\n break $l$block_2;\n }\n }\n tmp$ret$11 = null;\n }\n var tmp2_elvis_lhs = tmp$ret$11;\n var realOfferingEntity = tmp2_elvis_lhs == null ? offeringEntity : tmp2_elvis_lhs;\n var tmp3_safe_receiver = get_connectorsComponent(realDemandingEntity);\n var demandingConnector = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.getConnectorByKey(demandingConnectorKey);\n var tmp4_safe_receiver = get_connectorsComponent(realOfferingEntity);\n var offeringConnector = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.getConnectorByKey(offeringConnectorKey);\n if (demandingConnector == null) {\n $this.l1m_1.warn(ProductStructureBuilder$Companion$createSnapCandidate$lambda(demandingConnectorKey, productStructureItem));\n return null;\n }\n if (offeringConnector == null) {\n $this.l1m_1.warn(ProductStructureBuilder$Companion$createSnapCandidate$lambda_0(offeringConnectorKey, realOfferingEntity));\n return null;\n }\n return SnapUtils_instance.createSnapCandidate(realDemandingEntity, demandingConnector, realOfferingEntity, offeringConnector);\n }\n function addAsChildToRoot($this, entity, root) {\n setParentMaintainWorldTransform(entity, root);\n }\n function transformPart_0($this, entity, transform) {\n if (!(transform == null)) {\n TransformUtils_instance.moveInParentSpace(entity, transform.position);\n TransformUtils_instance.rotate(entity, transform.rotation);\n }\n }\n function ProductStructureBuilder$Companion$buildProductStructure$lambda() {\n return 'Product structure has more than one root. Is this a manual group? This is not supported yet! ';\n }\n function ProductStructureBuilder$Companion$buildProductStructure$lambda_0() {\n return 'The product has no root. Exactly one item must be without the snap property.';\n }\n function ProductStructureBuilder$Companion$buildProductStructure$lambda_1($firstProductData) {\n return function () {\n return 'Could not find the product for the root of the product structure: ' + $firstProductData.productRef;\n };\n }\n function ProductStructureBuilder$Companion$buildProductStructure$lambda_2() {\n return 'Product structure resulted in more than one root entities. This is not allowed yet.';\n }\n function ProductStructureBuilder$Companion$addChild$lambda($productStructureItem) {\n return function () {\n return 'Could not find the product for a product structure item (' + $productStructureItem.partKey + '): ' + $productStructureItem.productRef;\n };\n }\n function ProductStructureBuilder$Companion$addChild$lambda_0($productStructureItem, $parent) {\n return function () {\n return 'Could not snap ' + $productStructureItem.productRef + ' to ' + ProductUtils_instance.productRef($parent) + '. Will not add part ' + $productStructureItem.partKey + ' to product structure.';\n };\n }\n function ProductStructureBuilder$Companion$createSnapCandidate$lambda($demandingConnectorKey, $productStructureItem) {\n return function () {\n return 'Could not find demanding connector ' + $demandingConnectorKey + ' in ' + $productStructureItem.productRef + '.';\n };\n }\n function ProductStructureBuilder$Companion$createSnapCandidate$lambda_0($offeringConnectorKey, $realOfferingEntity) {\n return function () {\n return 'Could not find offering connector ' + $offeringConnectorKey + ' in entity ' + get_productRef($realOfferingEntity) + '.';\n };\n }\n function Companion_7() {\n Companion_instance_7 = this;\n this.l1m_1 = LoggerState_getInstance().m1m('ProductStructureBuilder');\n }\n protoOf(Companion_7).buildProductStructure = function (structure, productManager, entityManager) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = structure.products;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.catalog.Companion.buildProductStructure.' call\n if (element.snap == null) {\n destination.q(element);\n }\n }\n var roots = destination;\n if (roots.n() > 1) {\n this.l1m_1.warn(ProductStructureBuilder$Companion$buildProductStructure$lambda);\n return null;\n } else if (roots.b1()) {\n this.l1m_1.warn(ProductStructureBuilder$Companion$buildProductStructure$lambda_0);\n return null;\n }\n var firstProductData = first(roots);\n var firstProduct = productManager.createEntityInternal(firstProductData.productRef);\n if (firstProduct == null) {\n this.l1m_1.warn(ProductStructureBuilder$Companion$buildProductStructure$lambda_1(firstProductData));\n return null;\n }\n var temporarySceneRoot = entityManager.createEntity();\n temporarySceneRoot.addComponent(new SnapRootComponent());\n addAsChildToRoot(this, firstProduct, temporarySceneRoot);\n // Inline function 'kotlin.collections.mutableMapOf' call\n var createdEntitiesMap = LinkedHashMap_init_$Create$_0();\n // Inline function 'kotlin.collections.set' call\n var key = firstProductData.partKey;\n createdEntitiesMap.r2(key, firstProduct);\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_1 = structure.products;\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.catalog.Companion.buildProductStructure.' call\n if (!(element_0.partKey === firstProductData.partKey)) {\n destination_0.q(element_0);\n }\n }\n var tmp0_iterator = destination_0.t();\n while (tmp0_iterator.u()) {\n var element_1 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.catalog.Companion.buildProductStructure.' call\n // Inline function 'kotlin.collections.get' call\n var tmp0_safe_receiver = element_1.snap;\n var key_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.offeringPartKey;\n var parent = (isInterface(createdEntitiesMap, Map) ? createdEntitiesMap : THROW_CCE()).b3(key_0);\n var tmp = Companion_getInstance_8();\n var newEntity = addChild(tmp, parent == null ? firstProduct : parent, temporarySceneRoot, element_1, productManager);\n if (newEntity == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var key_1 = element_1.partKey;\n createdEntitiesMap.r2(key_1, newEntity);\n }\n }\n var tmp_0;\n if (get_children(temporarySceneRoot).length > 1) {\n entityManager.disposeEntity(temporarySceneRoot);\n this.l1m_1.warn(ProductStructureBuilder$Companion$buildProductStructure$lambda_2);\n tmp_0 = null;\n } else {\n var tmp0_elvis_lhs = firstOrNull(get_children(temporarySceneRoot));\n var tmp_1;\n if (tmp0_elvis_lhs == null) {\n var message = 'No child found';\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n tmp_1 = tmp0_elvis_lhs;\n }\n var onlyChild = tmp_1;\n setParent(onlyChild, null);\n temporarySceneRoot.removeComponent(16);\n entityManager.disposeEntity(temporarySceneRoot);\n tmp_0 = onlyChild;\n }\n return tmp_0;\n };\n var Companion_instance_7;\n function Companion_getInstance_8() {\n if (Companion_instance_7 == null)\n new Companion_7();\n return Companion_instance_7;\n }\n function ProductStructureBuilder() {\n Companion_getInstance_8();\n }\n function Companion_8() {\n }\n protoOf(Companion_8).s1k = function () {\n return 118;\n };\n var Companion_instance_8;\n function Companion_getInstance_9() {\n return Companion_instance_8;\n }\n function ProductStructureComponent(products) {\n this.products = products;\n }\n protoOf(ProductStructureComponent).n1m = function () {\n return this.products;\n };\n protoOf(ProductStructureComponent).x1k = function () {\n return Companion_instance_8.id;\n };\n protoOf(ProductStructureComponent).eq = function (other) {\n var otherStructure = other instanceof ProductStructureComponent ? other : THROW_CCE();\n return contentEquals(otherStructure.products, this.products);\n };\n function ProductStructureConnection(offeringPartKey, demandingConnector, offeringConnector) {\n this.offeringPartKey = offeringPartKey;\n this.demandingConnector = demandingConnector;\n this.offeringConnector = offeringConnector;\n }\n protoOf(ProductStructureConnection).o1m = function () {\n return this.offeringPartKey;\n };\n protoOf(ProductStructureConnection).p1m = function () {\n return this.demandingConnector;\n };\n protoOf(ProductStructureConnection).q1m = function () {\n return this.offeringConnector;\n };\n protoOf(ProductStructureConnection).af = function () {\n return this.offeringPartKey;\n };\n protoOf(ProductStructureConnection).bf = function () {\n return this.demandingConnector;\n };\n protoOf(ProductStructureConnection).g1k = function () {\n return this.offeringConnector;\n };\n protoOf(ProductStructureConnection).r1m = function (offeringPartKey, demandingConnector, offeringConnector) {\n return new ProductStructureConnection(offeringPartKey, demandingConnector, offeringConnector);\n };\n protoOf(ProductStructureConnection).copy = function (offeringPartKey, demandingConnector, offeringConnector, $super) {\n offeringPartKey = offeringPartKey === VOID ? this.offeringPartKey : offeringPartKey;\n demandingConnector = demandingConnector === VOID ? this.demandingConnector : demandingConnector;\n offeringConnector = offeringConnector === VOID ? this.offeringConnector : offeringConnector;\n return this.r1m(offeringPartKey, demandingConnector, offeringConnector);\n };\n protoOf(ProductStructureConnection).toString = function () {\n return 'ProductStructureConnection(offeringPartKey=' + this.offeringPartKey + ', demandingConnector=' + this.demandingConnector + ', offeringConnector=' + this.offeringConnector + ')';\n };\n protoOf(ProductStructureConnection).hashCode = function () {\n var result = getStringHashCode(this.offeringPartKey);\n result = imul(result, 31) + getStringHashCode(this.demandingConnector) | 0;\n result = imul(result, 31) + getStringHashCode(this.offeringConnector) | 0;\n return result;\n };\n protoOf(ProductStructureConnection).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ProductStructureConnection))\n return false;\n var tmp0_other_with_cast = other instanceof ProductStructureConnection ? other : THROW_CCE();\n if (!(this.offeringPartKey === tmp0_other_with_cast.offeringPartKey))\n return false;\n if (!(this.demandingConnector === tmp0_other_with_cast.demandingConnector))\n return false;\n if (!(this.offeringConnector === tmp0_other_with_cast.offeringConnector))\n return false;\n return true;\n };\n function ProductStructureItem(partKey, productRef, snap, relativeTransform) {\n snap = snap === VOID ? null : snap;\n relativeTransform = relativeTransform === VOID ? null : relativeTransform;\n this.partKey = partKey;\n this.productRef = productRef;\n this.snap = snap;\n this.relativeTransform = relativeTransform;\n }\n protoOf(ProductStructureItem).z1j = function () {\n return this.partKey;\n };\n protoOf(ProductStructureItem).j1l = function () {\n return this.productRef;\n };\n protoOf(ProductStructureItem).s1m = function () {\n return this.snap;\n };\n protoOf(ProductStructureItem).a1k = function () {\n return this.relativeTransform;\n };\n function start($this) {\n return $this.u1m_1 - ($this.size - 1 | 0) | 0;\n }\n function wrappedIndex($this, index) {\n return (index + $this.t1m_1.n() | 0) % $this.t1m_1.n() | 0;\n }\n function CircularBuffer$iterator$1(this$0) {\n this.x1m_1 = this$0;\n this.w1m_1 = 0;\n }\n protoOf(CircularBuffer$iterator$1).u = function () {\n return this.w1m_1 < this.x1m_1.size;\n };\n protoOf(CircularBuffer$iterator$1).w = function () {\n var tmp1 = this.w1m_1;\n this.w1m_1 = tmp1 + 1 | 0;\n return this.x1m_1.get(tmp1);\n };\n function CircularBuffer(size) {\n var tmp = this;\n // Inline function 'kotlin.collections.MutableList' call\n var list = ArrayList_init_$Create$_0(size);\n // Inline function 'kotlin.repeat' call\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable = 0;\n if (inductionVariable < size)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.MutableList.' call\n // Inline function 'com.ikea.core.collections.CircularBuffer.internalArray.' call\n list.q(null);\n }\n while (inductionVariable < size);\n tmp.t1m_1 = list;\n this.u1m_1 = -1;\n this.v1m_1 = 0;\n }\n protoOf(CircularBuffer).n = function () {\n return this.v1m_1;\n };\n protoOf(CircularBuffer).add = function (item) {\n if ((this.v1m_1 + 1 | 0) > this.t1m_1.n()) {\n throw IndexOutOfBoundsException_init_$Create$('Not allowed to add more item than size');\n }\n this.u1m_1 = wrappedIndex(this, this.u1m_1 + 1 | 0);\n this.t1m_1.o(this.u1m_1, item);\n this.v1m_1 = this.v1m_1 + 1 | 0;\n };\n protoOf(CircularBuffer).get = function (index) {\n var tmp;\n if ((this.u1m_1 < 0 ? true : index < 0) ? true : index >= this.size) {\n throw IndexOutOfBoundsException_init_$Create$('Index ' + index + ' out of bounds for length ' + this.size);\n } else {\n var tmp0_elvis_lhs = this.t1m_1.f1(wrappedIndex(this, start(this) + index | 0));\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n throw IndexOutOfBoundsException_init_$Create$('Index ' + index + ' is not assigned');\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n tmp = tmp_0;\n }\n return tmp;\n };\n protoOf(CircularBuffer).removeLast = function () {\n var tmp;\n switch (this.v1m_1) {\n case 0:\n tmp = null;\n break;\n case 1:\n var removed = this.get(0);\n this.clear();\n tmp = removed;\n break;\n default:\n var removed_0 = this.get(this.size - 1 | 0);\n this.u1m_1 = wrappedIndex(this, this.u1m_1 - 1 | 0);\n this.v1m_1 = this.v1m_1 - 1 | 0;\n tmp = removed_0;\n break;\n }\n return tmp;\n };\n protoOf(CircularBuffer).clear = function () {\n this.u1m_1 = -1;\n this.v1m_1 = 0;\n };\n protoOf(CircularBuffer).removeFirst = function () {\n var tmp;\n if (this.v1m_1 === 0) {\n tmp = null;\n } else {\n var removed = this.get(0);\n if (this.v1m_1 === 1) {\n this.clear();\n } else {\n this.v1m_1 = this.v1m_1 - 1 | 0;\n }\n tmp = removed;\n }\n return tmp;\n };\n protoOf(CircularBuffer).t = function () {\n return new CircularBuffer$iterator$1(this);\n };\n protoOf(CircularBuffer).toList = function () {\n return toList_0(asSequence(this.t()));\n };\n function objectOrientedBoundingBoxForEntityHierarchy($this, entity, onlyAssembly) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var vertices = ArrayList_init_$Create$();\n objectOrientedBoundingBoxForEntityHierarchy$extractEntity(vertices, onlyAssembly, entity, Companion_getInstance_60().IDENTITY);\n var tmp;\n if (vertices.b1()) {\n tmp = Companion_getInstance_95().ZERO;\n } else {\n var tmp_0 = Companion_getInstance_95();\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$1 = copyToArray(vertices);\n tmp = tmp_0.fromNonCuboidVertices(tmp$ret$1);\n }\n return tmp;\n }\n function objectOrientedBoundingBoxForEntityHierarchy$extractEntity(vertices, $onlyAssembly, innerEntity, localTransform) {\n var tmp0_safe_receiver = get_colliderShapeComponent(innerEntity);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.collision.Companion.objectOrientedBoundingBoxForEntityHierarchy.extractEntity.' call\n vertices.x(PolyhedronUtils_getInstance().transformAndExtractVerticesFromPolyhedron(tmp0_safe_receiver.polyhedron, localTransform));\n }\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_children(innerEntity);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.collision.Companion.objectOrientedBoundingBoxForEntityHierarchy.extractEntity.' call\n var tmp;\n if (!$onlyAssembly) {\n tmp = true;\n } else {\n Companion_getInstance_6();\n tmp = element.hasComponent(44);\n }\n if (tmp) {\n destination.q(element);\n }\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.collision.Companion.objectOrientedBoundingBoxForEntityHierarchy.extractEntity.' call\n objectOrientedBoundingBoxForEntityHierarchy$extractEntity(vertices, $onlyAssembly, element_0, localTransform.concatenate(get_localTransform(element_0)));\n }\n }\n function ColliderComponent$Companion$axisAlignedBoundingBoxForEntityHierarchies$lambda($set) {\n return function (it) {\n $set.q(it);\n return Unit_instance;\n };\n }\n function Companion_9() {\n this.id = 24;\n }\n protoOf(Companion_9).s1k = function () {\n return this.id;\n };\n protoOf(Companion_9).axisAlignedBoundingBoxForEntityHierarchies = function (entities) {\n // Inline function 'kotlin.collections.mutableSetOf' call\n var set = LinkedHashSet_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = entities.length;\n while (inductionVariable < last) {\n var element = entities[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.collision.Companion.axisAlignedBoundingBoxForEntityHierarchies.' call\n forEachInHierarchy(element, ColliderComponent$Companion$axisAlignedBoundingBoxForEntityHierarchies$lambda(set));\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$1 = copyToArray(set);\n return this.axisAlignedBoundingBoxForEntities(tmp$ret$1);\n };\n protoOf(Companion_9).axisAlignedBoundingBoxForEntities = function (entities) {\n // Inline function 'kotlin.collections.ifEmpty' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = entities.length;\n while (inductionVariable < last) {\n var element = entities[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.collision.Companion.axisAlignedBoundingBoxForEntities.' call\n var tmp0_safe_receiver = get_collider(element);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n var tmp0_safe_receiver_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.axisAlignedBoundingBox;\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver_0);\n }\n }\n var tmp;\n if (destination.b1()) {\n // Inline function 'com.ikea.core.collision.Companion.axisAlignedBoundingBoxForEntities.' call\n tmp = null;\n } else {\n tmp = destination;\n }\n var tmp0_safe_receiver_1 = tmp;\n var tmp_0;\n if (tmp0_safe_receiver_1 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.reduceRight' call\n var iterator = tmp0_safe_receiver_1.d2(tmp0_safe_receiver_1.n());\n if (!iterator.o1())\n throw UnsupportedOperationException_init_$Create$(\"Empty list can't be reduced.\");\n var accumulator = iterator.q1();\n while (iterator.o1()) {\n // Inline function 'com.ikea.core.collision.Companion.axisAlignedBoundingBoxForEntities.' call\n var combined = iterator.q1();\n var next = accumulator;\n accumulator = combined.createCombined(next);\n }\n tmp_0 = accumulator;\n }\n return tmp_0;\n };\n protoOf(Companion_9).objectOrientedBoundingBoxForEntityHierarchy = function (entity) {\n return objectOrientedBoundingBoxForEntityHierarchy(this, entity, false);\n };\n protoOf(Companion_9).objectOrientedBoundingBoxForAssemblyHierarchy = function (entity) {\n return objectOrientedBoundingBoxForEntityHierarchy(this, entity, true);\n };\n var Companion_instance_9;\n function Companion_getInstance_10() {\n return Companion_instance_9;\n }\n function ColliderComponent(worldPolyhedron) {\n this.worldPolyhedron = worldPolyhedron;\n }\n protoOf(ColliderComponent).g1n = function () {\n return this.worldPolyhedron;\n };\n protoOf(ColliderComponent).x1k = function () {\n return 24;\n };\n protoOf(ColliderComponent).eq = function (other) {\n return equals((other instanceof ColliderComponent ? other : THROW_CCE()).worldPolyhedron, this.worldPolyhedron);\n };\n protoOf(ColliderComponent).af = function () {\n return this.worldPolyhedron;\n };\n protoOf(ColliderComponent).h1n = function (worldPolyhedron) {\n return new ColliderComponent(worldPolyhedron);\n };\n protoOf(ColliderComponent).copy = function (worldPolyhedron, $super) {\n worldPolyhedron = worldPolyhedron === VOID ? this.worldPolyhedron : worldPolyhedron;\n return this.h1n(worldPolyhedron);\n };\n protoOf(ColliderComponent).toString = function () {\n return 'ColliderComponent(worldPolyhedron=' + this.worldPolyhedron + ')';\n };\n protoOf(ColliderComponent).hashCode = function () {\n return hashCode(this.worldPolyhedron);\n };\n protoOf(ColliderComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ColliderComponent))\n return false;\n var tmp0_other_with_cast = other instanceof ColliderComponent ? other : THROW_CCE();\n if (!equals(this.worldPolyhedron, tmp0_other_with_cast.worldPolyhedron))\n return false;\n return true;\n };\n function get_collider(_this__u8e3s4) {\n return _this__u8e3s4.__getComponentForKotlin(24);\n }\n function get_axisAlignedBoundingBoxForHierarchy(_this__u8e3s4) {\n var tmp = Companion_instance_9;\n var tmp0_elvis_lhs = get_snapRoot(_this__u8e3s4);\n return tmp.axisAlignedBoundingBoxForEntities(get_hierarchy(tmp0_elvis_lhs == null ? _this__u8e3s4 : tmp0_elvis_lhs));\n }\n function get_objectOrientedBoundingBoxForHierarchy(_this__u8e3s4) {\n return Companion_instance_9.objectOrientedBoundingBoxForEntityHierarchy(_this__u8e3s4);\n }\n function get_objectOrientedBoundingBoxForAssemblyHierarchy(_this__u8e3s4) {\n return Companion_instance_9.objectOrientedBoundingBoxForAssemblyHierarchy(_this__u8e3s4);\n }\n function get_axisAlignedBoundingBoxForSnappableHierarchy(_this__u8e3s4) {\n if (!(get_snapRoot(_this__u8e3s4) == null)) {\n return Companion_instance_9.axisAlignedBoundingBoxForEntities(get_snapRootSubTree(_this__u8e3s4));\n }\n return get_axisAlignedBoundingBoxForHierarchy(_this__u8e3s4);\n }\n function Companion_10() {\n this.id = 19;\n }\n protoOf(Companion_10).s1k = function () {\n return this.id;\n };\n var Companion_instance_10;\n function Companion_getInstance_11() {\n return Companion_instance_10;\n }\n function ColliderShapeComponent(polyhedron, ids) {\n ids = ids === VOID ? null : ids;\n this.polyhedron = polyhedron;\n this.ids = ids;\n }\n protoOf(ColliderShapeComponent).i1n = function () {\n return this.polyhedron;\n };\n protoOf(ColliderShapeComponent).j1n = function () {\n return this.ids;\n };\n protoOf(ColliderShapeComponent).x1k = function () {\n return 19;\n };\n protoOf(ColliderShapeComponent).eq = function (other) {\n return equals((other instanceof ColliderShapeComponent ? other : THROW_CCE()).polyhedron, this.polyhedron);\n };\n protoOf(ColliderShapeComponent).hashCode = function () {\n return hashCode(this.polyhedron);\n };\n protoOf(ColliderShapeComponent).equals = function (other) {\n var tmp;\n if (other instanceof ColliderShapeComponent) {\n tmp = equals(this.polyhedron, other.polyhedron);\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(ColliderShapeComponent).af = function () {\n return this.polyhedron;\n };\n protoOf(ColliderShapeComponent).bf = function () {\n return this.ids;\n };\n protoOf(ColliderShapeComponent).k1n = function (polyhedron, ids) {\n return new ColliderShapeComponent(polyhedron, ids);\n };\n protoOf(ColliderShapeComponent).copy = function (polyhedron, ids, $super) {\n polyhedron = polyhedron === VOID ? this.polyhedron : polyhedron;\n ids = ids === VOID ? this.ids : ids;\n return this.k1n(polyhedron, ids);\n };\n protoOf(ColliderShapeComponent).toString = function () {\n return 'ColliderShapeComponent(polyhedron=' + this.polyhedron + ', ids=' + toString(this.ids) + ')';\n };\n function get_colliderShapeComponent(_this__u8e3s4) {\n return _this__u8e3s4.__getComponentForKotlin(19);\n }\n function ColliderUtils() {\n }\n protoOf(ColliderUtils).colliderShapeComponent = function (entity) {\n return get_colliderShapeComponent(entity);\n };\n protoOf(ColliderUtils).colliderComponent = function (entity) {\n return get_collider(entity);\n };\n protoOf(ColliderUtils).axisAlignedBoundingBoxForHierarchy = function (entity) {\n return get_axisAlignedBoundingBoxForHierarchy(entity);\n };\n protoOf(ColliderUtils).objectOrientedBoundingBoxForHierarchy = function (entity) {\n return get_objectOrientedBoundingBoxForHierarchy(entity);\n };\n protoOf(ColliderUtils).objectOrientedBoundingBoxForAssemblyHierarchy = function (entity) {\n return get_objectOrientedBoundingBoxForAssemblyHierarchy(entity);\n };\n var ColliderUtils_instance;\n function ColliderUtils_getInstance() {\n return ColliderUtils_instance;\n }\n function Collision(self_0, other, interpenetration) {\n this.self = self_0;\n this.other = other;\n this.interpenetration = interpenetration;\n this.selfWorldTransformAtTimeOfCollision = get_worldTransform(this.self);\n }\n protoOf(Collision).l1n = function () {\n return this.self;\n };\n protoOf(Collision).m1n = function () {\n return this.other;\n };\n protoOf(Collision).n1n = function () {\n return this.interpenetration;\n };\n protoOf(Collision).o1n = function () {\n return this.selfWorldTransformAtTimeOfCollision;\n };\n protoOf(Collision).toString = function () {\n return '' + this.self + ' collision at ' + this.selfWorldTransformAtTimeOfCollision + ' with ' + this.other + ' interpenetration ' + this.interpenetration;\n };\n protoOf(Collision).af = function () {\n return this.self;\n };\n protoOf(Collision).bf = function () {\n return this.other;\n };\n protoOf(Collision).g1k = function () {\n return this.interpenetration;\n };\n protoOf(Collision).p1n = function (self_0, other, interpenetration) {\n return new Collision(self_0, other, interpenetration);\n };\n protoOf(Collision).copy = function (self_0, other, interpenetration, $super) {\n self_0 = self_0 === VOID ? this.self : self_0;\n other = other === VOID ? this.other : other;\n interpenetration = interpenetration === VOID ? this.interpenetration : interpenetration;\n return this.p1n(self_0, other, interpenetration);\n };\n protoOf(Collision).hashCode = function () {\n var result = this.self.hashCode();\n result = imul(result, 31) + this.other.hashCode() | 0;\n result = imul(result, 31) + this.interpenetration.hashCode() | 0;\n return result;\n };\n protoOf(Collision).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Collision))\n return false;\n var tmp0_other_with_cast = other instanceof Collision ? other : THROW_CCE();\n if (!this.self.equals(tmp0_other_with_cast.self))\n return false;\n if (!this.other.equals(tmp0_other_with_cast.other))\n return false;\n if (!this.interpenetration.equals(tmp0_other_with_cast.interpenetration))\n return false;\n return true;\n };\n function Companion_11() {\n this.INTERPENETRATION_THRESHOLD = 0.1;\n }\n protoOf(Companion_11).q1n = function () {\n return this.INTERPENETRATION_THRESHOLD;\n };\n var Companion_instance_11;\n function Companion_getInstance_12() {\n return Companion_instance_11;\n }\n function CollisionConstants() {\n }\n function getPenetrations($this, entity, disposition, otherEntities, checkMyChildren) {\n var entitiesInSubTree = checkMyChildren ? get_hierarchySequence(entity) : sequenceOf([entity]);\n return flatten(mapNotNull(entitiesInSubTree, CollisionUtils$getPenetrations$lambda(otherEntities, entity, disposition)));\n }\n function getPenetrations$default($this, entity, disposition, otherEntities, checkMyChildren, $super) {\n disposition = disposition === VOID ? null : disposition;\n return getPenetrations($this, entity, disposition, otherEntities, checkMyChildren);\n }\n function CollisionUtils$getFirstCollision$lambda($otherEntities, $entity, $disposition, $res) {\n return function (current) {\n var tmp0_safe_receiver = get_collider(current);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var indexedObject = $otherEntities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.collision.CollisionUtils.getFirstCollision...' call\n if (!(element.id === $entity.id)) {\n var tmp;\n if ($disposition == null) {\n var tmp0_safe_receiver_0 = get_collider(element);\n var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.worldPolyhedron;\n var tmp2_elvis_lhs = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.penetration(tmp1_safe_receiver);\n tmp = tmp2_elvis_lhs == null ? Companion_getInstance_61().ZERO : tmp2_elvis_lhs;\n } else {\n var tmp3_safe_receiver = get_collider(element);\n var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.worldPolyhedron;\n var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.penetrationAlongAxis(tmp1_safe_receiver, $disposition);\n tmp = tmp5_elvis_lhs == null ? Companion_getInstance_61().ZERO : tmp5_elvis_lhs;\n }\n var interpenetration = tmp;\n if (!interpenetration.equals(Companion_getInstance_61().ZERO)) {\n $res._v = new Collision(current, element, interpenetration);\n return true;\n }\n }\n }\n }\n return false;\n };\n }\n function CollisionUtils$getPenetrations$lambda$lambda($entity) {\n return function (other) {\n return !other.equals($entity);\n };\n }\n function CollisionUtils$getPenetrations$lambda$lambda_0($disposition, $worldPoly, $current) {\n return function (other) {\n var tmp;\n if ($disposition == null) {\n var tmp0_safe_receiver = get_collider(other);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.penetration($worldPoly);\n tmp = tmp2_elvis_lhs == null ? Companion_getInstance_61().ZERO : tmp2_elvis_lhs;\n } else {\n var tmp3_safe_receiver = get_collider(other);\n var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.worldPolyhedron;\n var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.penetrationAlongAxis($worldPoly, $disposition);\n tmp = tmp5_elvis_lhs == null ? Companion_getInstance_61().ZERO : tmp5_elvis_lhs;\n }\n var interpenetration = tmp;\n return !interpenetration.equals(Companion_getInstance_61().ZERO) ? new Collision($current, other, interpenetration) : null;\n };\n }\n function CollisionUtils$getPenetrations$lambda($otherEntities, $entity, $disposition) {\n return function (current) {\n var tmp0_safe_receiver = get_collider(current);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.collision.CollisionUtils.getPenetrations..' call\n var tmp_0 = filter($otherEntities, CollisionUtils$getPenetrations$lambda$lambda($entity));\n tmp = mapNotNull(tmp_0, CollisionUtils$getPenetrations$lambda$lambda_0($disposition, tmp1_safe_receiver, current));\n }\n return tmp;\n };\n }\n function CollisionUtils() {\n }\n protoOf(CollisionUtils).getAllCollisions = function (entity, disposition, otherEntities) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = toList_0(getPenetrations(this, entity, disposition, asSequence_0(otherEntities), true));\n return copyToArray(this_0);\n };\n protoOf(CollisionUtils).getFirstCollision = function (entity, disposition, otherEntities) {\n var res = {_v: null};\n findInHierarchy(entity, CollisionUtils$getFirstCollision$lambda(otherEntities, entity, disposition, res));\n return res._v;\n };\n var CollisionUtils_instance;\n function CollisionUtils_getInstance() {\n return CollisionUtils_instance;\n }\n function validate($this, entity, snapActionCandidate, earlyOut) {\n var otherEntities = hierarchyExceptSubTreeArray($this.findRoot(snapActionCandidate, entity), entity);\n var tmp;\n if (earlyOut) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = listOfNotNull(CollisionUtils_instance.getFirstCollision(entity, null, otherEntities));\n tmp = copyToArray(this_0);\n } else {\n tmp = CollisionUtils_instance.getAllCollisions(entity, null, otherEntities);\n }\n var collisions = tmp;\n return any(collisions) ? new CollisionValidationResult(collisions, get_productRefOrEmptyString(entity), $this.severity, $this) : null;\n }\n function Companion_12() {\n this.ID = 'Collision';\n }\n protoOf(Companion_12).u1n = function () {\n return this.ID;\n };\n var Companion_instance_12;\n function Companion_getInstance_13() {\n return Companion_instance_12;\n }\n function CollisionValidation() {\n ValidationImpl.call(this);\n this.s1n_1 = 'Collision';\n this.t1n_1 = false;\n this.severity = ValidationResultType_FAIL_getInstance();\n }\n protoOf(CollisionValidation).s1k = function () {\n return this.s1n_1;\n };\n protoOf(CollisionValidation).v1n = function (_set____db54di) {\n this.severity = _set____db54di;\n };\n protoOf(CollisionValidation).w1n = function () {\n return this.severity;\n };\n protoOf(CollisionValidation).enableExhaustiveValidation = function () {\n this.t1n_1 = true;\n };\n protoOf(CollisionValidation).disableExhaustiveValidation = function () {\n this.t1n_1 = false;\n };\n protoOf(CollisionValidation).validateCurrentState = function (entity) {\n return validate(this, entity, null, !this.t1n_1);\n };\n protoOf(CollisionValidation).validateSnap = function (snapActionCandidate) {\n return validate(this, snapActionCandidate.guestRoot, snapActionCandidate, !this.t1n_1);\n };\n function Companion_13() {\n this.ID = 'CollisionValidationResult';\n }\n protoOf(Companion_13).u1n = function () {\n return this.ID;\n };\n var Companion_instance_13;\n function Companion_getInstance_14() {\n return Companion_instance_13;\n }\n function CollisionValidationResult$toString$lambda(collision) {\n return collision.toString();\n }\n function CollisionValidationResult(collisions, productRef, severity, rule) {\n ValidationResult.call(this, severity, productRef, rule);\n this.collisions = collisions;\n }\n protoOf(CollisionValidationResult).z1n = function () {\n return this.collisions;\n };\n protoOf(CollisionValidationResult).s1k = function () {\n return 'CollisionValidationResult';\n };\n protoOf(CollisionValidationResult).toString = function () {\n var collizions = joinToString_0(this.collisions, VOID, VOID, VOID, VOID, VOID, CollisionValidationResult$toString$lambda);\n return 'CollisionValidationResult [' + this.productRef + '] has collisions [' + collizions + ']';\n };\n protoOf(CollisionValidationResult).a1o = function () {\n var tmp0_safe_receiver = firstOrNull(this.collisions);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.other;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : get_collider(tmp1_safe_receiver);\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.worldPolyhedron;\n var totalAabb = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.axisAlignedBoundingBox;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.collisions;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.collision.CollisionValidationResult..' call\n var otherAabb = get_axisAlignedBoundingBoxForSnappableHierarchy(element.other);\n var tmp;\n if (totalAabb == null) {\n tmp = otherAabb;\n } else {\n var tmp0_safe_receiver_0 = totalAabb;\n tmp = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.createCombined(otherAabb);\n }\n totalAabb = tmp;\n }\n var tmp4_elvis_lhs = totalAabb;\n return tmp4_elvis_lhs == null ? new AxisAlignedBox(Companion_getInstance_61().ZERO, Companion_getInstance_61().ZERO) : tmp4_elvis_lhs;\n };\n function Companion_14() {\n this.ID = 'WorldColliderUpdateSystem';\n }\n protoOf(Companion_14).u1n = function () {\n return this.ID;\n };\n var Companion_instance_14;\n function Companion_getInstance_15() {\n return Companion_instance_14;\n }\n function updateWorldCollider($this, entity) {\n var tmp0_safe_receiver = calculateWorldCollider($this, entity);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.collision.WorldColliderUpdateSystem.updateWorldCollider.' call\n entity.addComponent(tmp0_safe_receiver);\n }\n }\n function calculateWorldCollider($this, entity) {\n var tmp0_safe_receiver = get_colliderShapeComponent(entity);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.polyhedron;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var basePolyhedron = tmp;\n var transformedPolyhedron = TransformUtils_instance.applyWorldTransform(basePolyhedron, entity);\n return new ColliderComponent(transformedPolyhedron);\n }\n function WorldColliderUpdateSystem() {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [24];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = ['TransformSystem'];\n SystemBase2.call(this, 'WorldColliderUpdateSystem', 10, 19, tmp, tmp$ret$5, null);\n }\n protoOf(WorldColliderUpdateSystem).onAddComponent = function (entity, newComponent) {\n updateWorldCollider(this, entity);\n };\n protoOf(WorldColliderUpdateSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n updateWorldCollider(this, entity);\n };\n protoOf(WorldColliderUpdateSystem).onRemoveComponent = function (entity, oldComponent) {\n updateWorldCollider(this, entity);\n };\n protoOf(WorldColliderUpdateSystem).onAddComponent2 = function (entity, newComponent) {\n updateWorldCollider(this, entity);\n };\n protoOf(WorldColliderUpdateSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n updateWorldCollider(this, entity);\n };\n protoOf(WorldColliderUpdateSystem).onRemoveComponent2 = function (entity, oldComponent) {\n entity.removeComponent(24);\n };\n function ComponentIdSpan() {\n this.CORE_BASE_ID = 0;\n this.PAX_RANGE_BASE_ID = 1000;\n this.BESTA_RANGE_BASE_ID = 1500;\n this.STORAGEONE_RANGE_BASE_ID = 2000;\n this.SNYGGIS_BASE_ID = 90000;\n this.CONCEPT_PLANNER_BASE_ID = 100000;\n this.PAX_PLANNER_BASE_ID = 101000;\n this.BESTA_PLANNER_BASE_ID = 101500;\n this.SPACE_PLANNER_BASE_ID = 102000;\n this.SKYTTA_PLANNER_BASE_ID = 103000;\n this.WALL_DECO_PLANNER_BASE_ID = 104000;\n this.CORE_TOOLBOX_BASE_ID = 105000;\n this.CORE_TOOLBOX_EXPERIMENTAL_BASE_ID = 106000;\n this.KVADRAT_BASE_ID = 107000;\n this.CORE_COMMUNITY_BASE_ID = 108000;\n this.SOFA_BASE_ID = 109000;\n this.KITCHEN_CONFIGURATOR_BASE_ID = 110000;\n }\n protoOf(ComponentIdSpan).d1p = function () {\n return this.CORE_BASE_ID;\n };\n protoOf(ComponentIdSpan).e1p = function () {\n return this.PAX_RANGE_BASE_ID;\n };\n protoOf(ComponentIdSpan).f1p = function () {\n return this.BESTA_RANGE_BASE_ID;\n };\n protoOf(ComponentIdSpan).g1p = function () {\n return this.STORAGEONE_RANGE_BASE_ID;\n };\n protoOf(ComponentIdSpan).h1p = function () {\n return this.SNYGGIS_BASE_ID;\n };\n protoOf(ComponentIdSpan).i1p = function () {\n return this.CONCEPT_PLANNER_BASE_ID;\n };\n protoOf(ComponentIdSpan).j1p = function () {\n return this.PAX_PLANNER_BASE_ID;\n };\n protoOf(ComponentIdSpan).k1p = function () {\n return this.BESTA_PLANNER_BASE_ID;\n };\n protoOf(ComponentIdSpan).l1p = function () {\n return this.SPACE_PLANNER_BASE_ID;\n };\n protoOf(ComponentIdSpan).m1p = function () {\n return this.SKYTTA_PLANNER_BASE_ID;\n };\n protoOf(ComponentIdSpan).n1p = function () {\n return this.WALL_DECO_PLANNER_BASE_ID;\n };\n protoOf(ComponentIdSpan).o1p = function () {\n return this.CORE_TOOLBOX_BASE_ID;\n };\n protoOf(ComponentIdSpan).p1p = function () {\n return this.CORE_TOOLBOX_EXPERIMENTAL_BASE_ID;\n };\n protoOf(ComponentIdSpan).q1p = function () {\n return this.KVADRAT_BASE_ID;\n };\n protoOf(ComponentIdSpan).r1p = function () {\n return this.CORE_COMMUNITY_BASE_ID;\n };\n protoOf(ComponentIdSpan).s1p = function () {\n return this.SOFA_BASE_ID;\n };\n protoOf(ComponentIdSpan).t1p = function () {\n return this.KITCHEN_CONFIGURATOR_BASE_ID;\n };\n var ComponentIdSpan_instance;\n function ComponentIdSpan_getInstance() {\n return ComponentIdSpan_instance;\n }\n function ComponentIds() {\n this.SELECTED_COMPONENT_ID = 0;\n this.SELECTABLE_COMPONENT_ID = 1;\n this.PROPPING_HOST_CONNECTORS_COMPONENT_ID = 2;\n this.DRAGGABLE_COMPONENT_ID = 3;\n this.COLLISION_VISUALIZATION_SCENE_DATA_COMPONENT_ID = 4;\n this.IN_SCENE_COMPONENT_ID = 5;\n this.LOCAL_TRANSFORM_COMPONENT_ID = 6;\n this.PROPPING_COMPONENT_ID = 7;\n this.RESTRICT_ALLOWED_REQUIRED_HOSTS_COMPONENT_ID = 8;\n this.RENDERED_COMPONENT_ID = 9;\n this.WORLD_TRANSFORM_COMPONENT_ID = 10;\n this.CONNECTORS_COMPONENT_ID = 11;\n this.ASSEMBLY_STRUCTURE_COMPONENT_ID = 12;\n this.MODEL_INFO_COMPONENT_ID = 13;\n this.OUTLINED_COMPONENT_ID = 14;\n this.DISPLAY_NAME_COMPONENT_ID = 15;\n this.PARENT_COMPONENT_ID = 16;\n this.CHILD_COMPONENT_ID = 17;\n this.PRODUCT_COMPONENT_ID = 18;\n this.COLLIDER_SHAPE_COMPONENT_ID = 19;\n this.LOADED_MODEL_INFO_COMPONENT_ID = 20;\n this.SNAP_CANDIDATE_COMPONENT_ID = 21;\n this.CONNECTOR_VISUALIZATION_NODE_COMPONENT_ID = 22;\n this.COLLIDER_VISUALIZATION_NODE_COMPONENT_ID = 23;\n this.COLLIDER_COMPONENT_ID = 24;\n this.UNSERIALIZABLE_ENTITY_COMPONENT_ID = 25;\n this.ALWAYS_HANG_DOWN_COMPONENT_ID = 26;\n this.VIEWER_CAMERA_STATE_COMPONENT_ID = 27;\n this.CONNECTION_ROOT_COMPONENT = 28;\n this.ALLOWED_DOOR_PAIRS_COMPONENT_ID = 29;\n this.DOOR_COMPONENT_ID = 30;\n this.FRAME_COMPONENT_ID = 31;\n this.DOOR_FRONT_COMPONENT_ID = 32;\n this.COMMUNICATION_SIZE_COMPONENT_ID = 33;\n this.SNAP_ACTION_IN_PROGRESS_COMPONENT = 34;\n this.VIEWER_OBJECT_COMPONENT_ID = 35;\n this.IS_LOADING_SNAPSHOT_COMPONENT_ID = 36;\n this.MANUAL_ENTITY_GROUP_COMPONENT_ID = 37;\n this.AUTOMATIC_ENTITY_GROUP_COMPONENT_ID = 38;\n this.HANDLE_COMPONENT_ID = 39;\n this.META_DATA_COMPONENT_ID = 40;\n this.ROOM_DIMENSIONS_COMPONENT_ID = 41;\n this.RELATIVE_CONNECTORS_COMPONENT_ID = 42;\n this.ASSEMBLY_PARTS_COMPONENT_ID = 43;\n this.PRODUCT_PART_COMPONENT_ID = 44;\n this.MOVED_TO_VALID_SNAP_POSITION_COMPONENT_ID = 45;\n this.INCLUDED_HANDLE_COMPONENT_ID = 46;\n this.SNAP_ROOT_COMPONENT_ID = 47;\n this.LEG_COMPONENT_ID = 48;\n this.TEMPLATE_DATA_COMPONENT_ID = 49;\n this.DRAWER_COMPONENT_ID = 50;\n this.ALIGNMENT_CONNECTIONS_COMPONENT_ID = 51;\n this.HANDLE_UNDER_ALIGNMENT_COMPONENT_ID = 52;\n this.ROOM_COMPONENT_ID = 53;\n this.ROOM_ACTIVE_CONNECTORS_COMPONENT_ID = 54;\n this.MULTISELECTION_ENABLED_COMPONENT_ID = 56;\n this.OUTLINEABLE_COMPONENT_ID = 57;\n this.PLACEMENT_ZONE_BY_HEIGHT_COMPONENT_ID = 58;\n this.RECOMMENDED_INITIAL_POSITION_FROM_FLOOR_COMPONENT_ID = 59;\n this.RECOMMENDED_INITIAL_POSITION_FROM_PARENT_COMPONENT_ID = 60;\n this.FUNCTIONAL_MARGIN_SHAPE_COMPONENT_ID = 61;\n this.FUNCTIONAL_MARGIN_COMPONENT_ID = 62;\n this.LIGHT_COMPONENT_ID = 63;\n this.ROOM_ALIGNMENT_EDGES_COMPONENT_ID = 64;\n this.IS_DRAGGED_COMPONENT_ID = 65;\n this.SOMETHING_IS_DRAGGED_COMPONENT_ID = 66;\n this.FREE_MOVE_COMPONENT_ID = 67;\n this.MOVED_TO_CANDIDATE_SNAP_POSITION_COMPONENT_ID = 68;\n this.DRAG_STATE_COMPONENT = 69;\n this.ROOM_GEOMETRY_COMPONENT_ID = 70;\n this.DISABLED_CONNECTOR_KEYS_COMPONENT_ID = 71;\n this.VISUAL_LIGHT_SOURCE_COMPONENT_ID = 72;\n this.SCENE_RELOADING_COMPONENT_ID = 73;\n this.DRAG_SURFACES_COMPONENT_ID = 74;\n this.DISABLED_ROOM_CONNECTORS_COMPONENT_ID = 75;\n this.ROOM_CONNECTOR_RELATIONS_COMPONENT_ID = 76;\n this.ENTITY_CONNECTOR_VISUALIZATION_COMPONENT_ID = 77;\n this.ENTITY_COLLIDER_VISUALIZATION_COMPONENT_ID = 78;\n this.ENTITY_HOST_ZONE_VISUALIZATION_COMPONENT_ID = 79;\n this.ENTITY_FUNCTIONAL_ZONE_VISUALIZATION_COMPONENT_ID = 80;\n this.DRAG_SURFACE_ENTITY_PAIR_CACHE_COMPONENT = 81;\n this.VIEWER_COMPONENT_ID = 82;\n this.DECORATOR_COMPONENT_ID = 83;\n this.VIEWER_DRAG_EVENT_COMPONENT_ID = 84;\n this.WORLD_SPACE_DRAG_EVENT_COMPONENT_ID = 85;\n this.CLICK_EVENT_COMPONENT_ID = 86;\n this.PROPPING_INFO_COMPONENT_ID = 87;\n this.HISTORY_CHANGED_EVENT_COMPONENT_ID = 88;\n this.PAUSE_VIEWER_UPDATES_COMPONENT = 90;\n this.WORLD_DRAG_SURFACES_COMPONENT_ID = 91;\n this.DEBUG_LINES_COMPONENT = 92;\n this.VIEWER_LINE_IDS_COMPONENT = 93;\n this.GRAB_OFFSET_COMPONENT_ID = 94;\n this.SNAPSHOT_IGNORE_COMPONENT = 95;\n this.ASSEMBLY_PART_IDS_COMPONENT_ID = 96;\n this.SCENE_COMPONENT_ID = 97;\n this.COLLIDER_VISUALIZER_VIEWER_OBJECTS_COMPONENT_ID = 98;\n this.CONNECTOR_VISUALIZER_VIEWER_OBJECTS_COMPONENT_ID = 99;\n this.PREVIOUSLY_SERIALIZED_ID_COMPONENT_ID = 100;\n this.STATIC_COMPONENT_ID = 101;\n this.POLYHEDRON_VISUALIZATION_HOLDER_COMPONENT_ID = 102;\n this.ROOM_PART_COMPONENT_ID = 103;\n this.GUEST_CONNECTIONS_COMPONENT_ID = 104;\n this.HOST_CONNECTIONS_COMPONENT_ID = 105;\n this.SERIALIZABLE_CONNECTIONS_COMPONENT_ID = 106;\n this.TEMPORARILY_PAUSE_CONNECTIONS_PARENTING_COMPONENT_ID = 107;\n this.POLYHEDRON_VISUALIZATION_NODE_COMPONENT_ID = 108;\n this.COLLIDER_VISUALIZATION_CONFIG_COMPONENT_ID = 109;\n this.CONNECTOR_VISUALIZATION_CONFIG_COMPONENT_ID = 110;\n this.OUTLINE_BLOCKING_COMPONENT_ID = 111;\n this.LABEL_COMPONENT_ID = 112;\n this.DRAG_PROJECTION_POINT_COMPONENT_ID = 113;\n this.COLORED_OUTLINE_COMPONENT_ID = 114;\n this.MANUAL_GROUP_ID_COUNT_COMPONENT_ID = 115;\n this.AUTOMATIC_GROUP_ID_COUNT_COMPONENT_ID = 116;\n this.SCENE_MANAGER_CACHE_COMPONENT_ID = 117;\n this.PRODUCT_STRUCTURE_COMPONENT_ID = 118;\n this.CAMERA_COMPONENT_ID = 119;\n this.DEBUG_SURFACES_COMPONENT = 120;\n this.FUNCTIONAL_ZONES_LOCAL_COMPONENT_ID = 121;\n this.FUNCTIONAL_ZONES_WORLD_COMPONENT_ID = 122;\n this.UPDATED_FROM_SNAPSHOT_EVENT_COMPONENT_ID = 123;\n this.MODEL_TRANSFORM_COMPONENT_ID = 124;\n this.AUTO_ADAPT_SESSION_COMPONENT_ID = 125;\n this.AUTO_ADAPT_GUEST_COMPONENT_ID = 126;\n this.AUTO_ADAPT_HOST_COMPONENT_ID = 127;\n this.AUTO_ADAPT_CACHED_VARIANTS_COMPONENT_ID = 128;\n this.AUTO_ADAPT_VARIANT_COMPONENT_ID = 129;\n this.FORCE_AUTO_ADAPT_WHEN_PARENT_IS_DRAGGED_COMPONENT_ID = 130;\n this.REPLACED_ENTITY_WITH_AUTO_ADAPT_EVENT_COMPONENT_ID = 131;\n this.AUTO_ADAPT_CHILD_FAILED_EVENT_COMPONENT_ID = 132;\n this.AUTO_ADAPT_PRODUCT_SPECIFICATIONS_COMPONENT_ID = 133;\n this.highestCoreComponentId = 133;\n }\n protoOf(ComponentIds).u1p = function () {\n return this.SELECTED_COMPONENT_ID;\n };\n protoOf(ComponentIds).v1p = function () {\n return this.SELECTABLE_COMPONENT_ID;\n };\n protoOf(ComponentIds).w1p = function () {\n return this.PROPPING_HOST_CONNECTORS_COMPONENT_ID;\n };\n protoOf(ComponentIds).x1p = function () {\n return this.DRAGGABLE_COMPONENT_ID;\n };\n protoOf(ComponentIds).y1p = function () {\n return this.COLLISION_VISUALIZATION_SCENE_DATA_COMPONENT_ID;\n };\n protoOf(ComponentIds).z1p = function () {\n return this.IN_SCENE_COMPONENT_ID;\n };\n protoOf(ComponentIds).a1q = function () {\n return this.LOCAL_TRANSFORM_COMPONENT_ID;\n };\n protoOf(ComponentIds).b1q = function () {\n return this.PROPPING_COMPONENT_ID;\n };\n protoOf(ComponentIds).c1q = function () {\n return this.RESTRICT_ALLOWED_REQUIRED_HOSTS_COMPONENT_ID;\n };\n protoOf(ComponentIds).d1q = function () {\n return this.RENDERED_COMPONENT_ID;\n };\n protoOf(ComponentIds).e1q = function () {\n return this.WORLD_TRANSFORM_COMPONENT_ID;\n };\n protoOf(ComponentIds).f1q = function () {\n return this.CONNECTORS_COMPONENT_ID;\n };\n protoOf(ComponentIds).g1q = function () {\n return this.ASSEMBLY_STRUCTURE_COMPONENT_ID;\n };\n protoOf(ComponentIds).h1q = function () {\n return this.MODEL_INFO_COMPONENT_ID;\n };\n protoOf(ComponentIds).i1q = function () {\n return this.OUTLINED_COMPONENT_ID;\n };\n protoOf(ComponentIds).j1q = function () {\n return this.DISPLAY_NAME_COMPONENT_ID;\n };\n protoOf(ComponentIds).k1q = function () {\n return this.PARENT_COMPONENT_ID;\n };\n protoOf(ComponentIds).l1q = function () {\n return this.CHILD_COMPONENT_ID;\n };\n protoOf(ComponentIds).m1q = function () {\n return this.PRODUCT_COMPONENT_ID;\n };\n protoOf(ComponentIds).n1q = function () {\n return this.COLLIDER_SHAPE_COMPONENT_ID;\n };\n protoOf(ComponentIds).o1q = function () {\n return this.LOADED_MODEL_INFO_COMPONENT_ID;\n };\n protoOf(ComponentIds).p1q = function () {\n return this.SNAP_CANDIDATE_COMPONENT_ID;\n };\n protoOf(ComponentIds).q1q = function () {\n return this.CONNECTOR_VISUALIZATION_NODE_COMPONENT_ID;\n };\n protoOf(ComponentIds).r1q = function () {\n return this.COLLIDER_VISUALIZATION_NODE_COMPONENT_ID;\n };\n protoOf(ComponentIds).s1q = function () {\n return this.COLLIDER_COMPONENT_ID;\n };\n protoOf(ComponentIds).t1q = function () {\n return this.UNSERIALIZABLE_ENTITY_COMPONENT_ID;\n };\n protoOf(ComponentIds).u1q = function () {\n return this.ALWAYS_HANG_DOWN_COMPONENT_ID;\n };\n protoOf(ComponentIds).v1q = function () {\n return this.VIEWER_CAMERA_STATE_COMPONENT_ID;\n };\n protoOf(ComponentIds).w1q = function () {\n return this.CONNECTION_ROOT_COMPONENT;\n };\n protoOf(ComponentIds).x1q = function () {\n return this.ALLOWED_DOOR_PAIRS_COMPONENT_ID;\n };\n protoOf(ComponentIds).y1q = function () {\n return this.DOOR_COMPONENT_ID;\n };\n protoOf(ComponentIds).z1q = function () {\n return this.FRAME_COMPONENT_ID;\n };\n protoOf(ComponentIds).a1r = function () {\n return this.DOOR_FRONT_COMPONENT_ID;\n };\n protoOf(ComponentIds).b1r = function () {\n return this.COMMUNICATION_SIZE_COMPONENT_ID;\n };\n protoOf(ComponentIds).c1r = function () {\n return this.SNAP_ACTION_IN_PROGRESS_COMPONENT;\n };\n protoOf(ComponentIds).d1r = function () {\n return this.VIEWER_OBJECT_COMPONENT_ID;\n };\n protoOf(ComponentIds).e1r = function () {\n return this.IS_LOADING_SNAPSHOT_COMPONENT_ID;\n };\n protoOf(ComponentIds).f1r = function () {\n return this.MANUAL_ENTITY_GROUP_COMPONENT_ID;\n };\n protoOf(ComponentIds).g1r = function () {\n return this.AUTOMATIC_ENTITY_GROUP_COMPONENT_ID;\n };\n protoOf(ComponentIds).h1r = function () {\n return this.HANDLE_COMPONENT_ID;\n };\n protoOf(ComponentIds).i1r = function () {\n return this.META_DATA_COMPONENT_ID;\n };\n protoOf(ComponentIds).j1r = function () {\n return this.ROOM_DIMENSIONS_COMPONENT_ID;\n };\n protoOf(ComponentIds).k1r = function () {\n return this.RELATIVE_CONNECTORS_COMPONENT_ID;\n };\n protoOf(ComponentIds).l1r = function () {\n return this.ASSEMBLY_PARTS_COMPONENT_ID;\n };\n protoOf(ComponentIds).m1r = function () {\n return this.PRODUCT_PART_COMPONENT_ID;\n };\n protoOf(ComponentIds).n1r = function () {\n return this.MOVED_TO_VALID_SNAP_POSITION_COMPONENT_ID;\n };\n protoOf(ComponentIds).o1r = function () {\n return this.INCLUDED_HANDLE_COMPONENT_ID;\n };\n protoOf(ComponentIds).p1r = function () {\n return this.SNAP_ROOT_COMPONENT_ID;\n };\n protoOf(ComponentIds).q1r = function () {\n return this.LEG_COMPONENT_ID;\n };\n protoOf(ComponentIds).r1r = function () {\n return this.TEMPLATE_DATA_COMPONENT_ID;\n };\n protoOf(ComponentIds).s1r = function () {\n return this.DRAWER_COMPONENT_ID;\n };\n protoOf(ComponentIds).t1r = function () {\n return this.ALIGNMENT_CONNECTIONS_COMPONENT_ID;\n };\n protoOf(ComponentIds).u1r = function () {\n return this.HANDLE_UNDER_ALIGNMENT_COMPONENT_ID;\n };\n protoOf(ComponentIds).v1r = function () {\n return this.ROOM_COMPONENT_ID;\n };\n protoOf(ComponentIds).w1r = function () {\n return this.ROOM_ACTIVE_CONNECTORS_COMPONENT_ID;\n };\n protoOf(ComponentIds).x1r = function () {\n return this.MULTISELECTION_ENABLED_COMPONENT_ID;\n };\n protoOf(ComponentIds).y1r = function () {\n return this.OUTLINEABLE_COMPONENT_ID;\n };\n protoOf(ComponentIds).z1r = function () {\n return this.PLACEMENT_ZONE_BY_HEIGHT_COMPONENT_ID;\n };\n protoOf(ComponentIds).a1s = function () {\n return this.RECOMMENDED_INITIAL_POSITION_FROM_FLOOR_COMPONENT_ID;\n };\n protoOf(ComponentIds).b1s = function () {\n return this.RECOMMENDED_INITIAL_POSITION_FROM_PARENT_COMPONENT_ID;\n };\n protoOf(ComponentIds).c1s = function () {\n return this.FUNCTIONAL_MARGIN_SHAPE_COMPONENT_ID;\n };\n protoOf(ComponentIds).d1s = function () {\n return this.FUNCTIONAL_MARGIN_COMPONENT_ID;\n };\n protoOf(ComponentIds).e1s = function () {\n return this.LIGHT_COMPONENT_ID;\n };\n protoOf(ComponentIds).f1s = function () {\n return this.ROOM_ALIGNMENT_EDGES_COMPONENT_ID;\n };\n protoOf(ComponentIds).g1s = function () {\n return this.IS_DRAGGED_COMPONENT_ID;\n };\n protoOf(ComponentIds).h1s = function () {\n return this.SOMETHING_IS_DRAGGED_COMPONENT_ID;\n };\n protoOf(ComponentIds).i1s = function () {\n return this.FREE_MOVE_COMPONENT_ID;\n };\n protoOf(ComponentIds).j1s = function () {\n return this.MOVED_TO_CANDIDATE_SNAP_POSITION_COMPONENT_ID;\n };\n protoOf(ComponentIds).k1s = function () {\n return this.DRAG_STATE_COMPONENT;\n };\n protoOf(ComponentIds).l1s = function () {\n return this.ROOM_GEOMETRY_COMPONENT_ID;\n };\n protoOf(ComponentIds).m1s = function () {\n return this.DISABLED_CONNECTOR_KEYS_COMPONENT_ID;\n };\n protoOf(ComponentIds).n1s = function () {\n return this.VISUAL_LIGHT_SOURCE_COMPONENT_ID;\n };\n protoOf(ComponentIds).o1s = function () {\n return this.SCENE_RELOADING_COMPONENT_ID;\n };\n protoOf(ComponentIds).p1s = function () {\n return this.DRAG_SURFACES_COMPONENT_ID;\n };\n protoOf(ComponentIds).q1s = function () {\n return this.DISABLED_ROOM_CONNECTORS_COMPONENT_ID;\n };\n protoOf(ComponentIds).r1s = function () {\n return this.ROOM_CONNECTOR_RELATIONS_COMPONENT_ID;\n };\n protoOf(ComponentIds).s1s = function () {\n return this.ENTITY_CONNECTOR_VISUALIZATION_COMPONENT_ID;\n };\n protoOf(ComponentIds).t1s = function () {\n return this.ENTITY_COLLIDER_VISUALIZATION_COMPONENT_ID;\n };\n protoOf(ComponentIds).u1s = function () {\n return this.ENTITY_HOST_ZONE_VISUALIZATION_COMPONENT_ID;\n };\n protoOf(ComponentIds).v1s = function () {\n return this.ENTITY_FUNCTIONAL_ZONE_VISUALIZATION_COMPONENT_ID;\n };\n protoOf(ComponentIds).w1s = function () {\n return this.DRAG_SURFACE_ENTITY_PAIR_CACHE_COMPONENT;\n };\n protoOf(ComponentIds).x1s = function () {\n return this.VIEWER_COMPONENT_ID;\n };\n protoOf(ComponentIds).y1s = function () {\n return this.DECORATOR_COMPONENT_ID;\n };\n protoOf(ComponentIds).z1s = function () {\n return this.VIEWER_DRAG_EVENT_COMPONENT_ID;\n };\n protoOf(ComponentIds).a1t = function () {\n return this.WORLD_SPACE_DRAG_EVENT_COMPONENT_ID;\n };\n protoOf(ComponentIds).b1t = function () {\n return this.CLICK_EVENT_COMPONENT_ID;\n };\n protoOf(ComponentIds).c1t = function () {\n return this.PROPPING_INFO_COMPONENT_ID;\n };\n protoOf(ComponentIds).d1t = function () {\n return this.HISTORY_CHANGED_EVENT_COMPONENT_ID;\n };\n protoOf(ComponentIds).e1t = function () {\n return this.PAUSE_VIEWER_UPDATES_COMPONENT;\n };\n protoOf(ComponentIds).f1t = function () {\n return this.WORLD_DRAG_SURFACES_COMPONENT_ID;\n };\n protoOf(ComponentIds).g1t = function () {\n return this.DEBUG_LINES_COMPONENT;\n };\n protoOf(ComponentIds).h1t = function () {\n return this.VIEWER_LINE_IDS_COMPONENT;\n };\n protoOf(ComponentIds).i1t = function () {\n return this.GRAB_OFFSET_COMPONENT_ID;\n };\n protoOf(ComponentIds).j1t = function () {\n return this.SNAPSHOT_IGNORE_COMPONENT;\n };\n protoOf(ComponentIds).k1t = function () {\n return this.ASSEMBLY_PART_IDS_COMPONENT_ID;\n };\n protoOf(ComponentIds).l1t = function () {\n return this.SCENE_COMPONENT_ID;\n };\n protoOf(ComponentIds).m1t = function () {\n return this.COLLIDER_VISUALIZER_VIEWER_OBJECTS_COMPONENT_ID;\n };\n protoOf(ComponentIds).n1t = function () {\n return this.CONNECTOR_VISUALIZER_VIEWER_OBJECTS_COMPONENT_ID;\n };\n protoOf(ComponentIds).o1t = function () {\n return this.PREVIOUSLY_SERIALIZED_ID_COMPONENT_ID;\n };\n protoOf(ComponentIds).p1t = function () {\n return this.STATIC_COMPONENT_ID;\n };\n protoOf(ComponentIds).q1t = function () {\n return this.POLYHEDRON_VISUALIZATION_HOLDER_COMPONENT_ID;\n };\n protoOf(ComponentIds).r1t = function () {\n return this.ROOM_PART_COMPONENT_ID;\n };\n protoOf(ComponentIds).s1t = function () {\n return this.GUEST_CONNECTIONS_COMPONENT_ID;\n };\n protoOf(ComponentIds).t1t = function () {\n return this.HOST_CONNECTIONS_COMPONENT_ID;\n };\n protoOf(ComponentIds).u1t = function () {\n return this.SERIALIZABLE_CONNECTIONS_COMPONENT_ID;\n };\n protoOf(ComponentIds).v1t = function () {\n return this.TEMPORARILY_PAUSE_CONNECTIONS_PARENTING_COMPONENT_ID;\n };\n protoOf(ComponentIds).w1t = function () {\n return this.POLYHEDRON_VISUALIZATION_NODE_COMPONENT_ID;\n };\n protoOf(ComponentIds).x1t = function () {\n return this.COLLIDER_VISUALIZATION_CONFIG_COMPONENT_ID;\n };\n protoOf(ComponentIds).y1t = function () {\n return this.CONNECTOR_VISUALIZATION_CONFIG_COMPONENT_ID;\n };\n protoOf(ComponentIds).z1t = function () {\n return this.OUTLINE_BLOCKING_COMPONENT_ID;\n };\n protoOf(ComponentIds).a1u = function () {\n return this.LABEL_COMPONENT_ID;\n };\n protoOf(ComponentIds).b1u = function () {\n return this.DRAG_PROJECTION_POINT_COMPONENT_ID;\n };\n protoOf(ComponentIds).c1u = function () {\n return this.COLORED_OUTLINE_COMPONENT_ID;\n };\n protoOf(ComponentIds).d1u = function () {\n return this.MANUAL_GROUP_ID_COUNT_COMPONENT_ID;\n };\n protoOf(ComponentIds).e1u = function () {\n return this.AUTOMATIC_GROUP_ID_COUNT_COMPONENT_ID;\n };\n protoOf(ComponentIds).f1u = function () {\n return this.SCENE_MANAGER_CACHE_COMPONENT_ID;\n };\n protoOf(ComponentIds).g1u = function () {\n return this.PRODUCT_STRUCTURE_COMPONENT_ID;\n };\n protoOf(ComponentIds).h1u = function () {\n return this.CAMERA_COMPONENT_ID;\n };\n protoOf(ComponentIds).i1u = function () {\n return this.DEBUG_SURFACES_COMPONENT;\n };\n protoOf(ComponentIds).j1u = function () {\n return this.FUNCTIONAL_ZONES_LOCAL_COMPONENT_ID;\n };\n protoOf(ComponentIds).k1u = function () {\n return this.FUNCTIONAL_ZONES_WORLD_COMPONENT_ID;\n };\n protoOf(ComponentIds).l1u = function () {\n return this.UPDATED_FROM_SNAPSHOT_EVENT_COMPONENT_ID;\n };\n protoOf(ComponentIds).m1u = function () {\n return this.MODEL_TRANSFORM_COMPONENT_ID;\n };\n protoOf(ComponentIds).n1u = function () {\n return this.AUTO_ADAPT_SESSION_COMPONENT_ID;\n };\n protoOf(ComponentIds).o1u = function () {\n return this.AUTO_ADAPT_GUEST_COMPONENT_ID;\n };\n protoOf(ComponentIds).p1u = function () {\n return this.AUTO_ADAPT_HOST_COMPONENT_ID;\n };\n protoOf(ComponentIds).q1u = function () {\n return this.AUTO_ADAPT_CACHED_VARIANTS_COMPONENT_ID;\n };\n protoOf(ComponentIds).r1u = function () {\n return this.AUTO_ADAPT_VARIANT_COMPONENT_ID;\n };\n protoOf(ComponentIds).s1u = function () {\n return this.FORCE_AUTO_ADAPT_WHEN_PARENT_IS_DRAGGED_COMPONENT_ID;\n };\n protoOf(ComponentIds).t1u = function () {\n return this.REPLACED_ENTITY_WITH_AUTO_ADAPT_EVENT_COMPONENT_ID;\n };\n protoOf(ComponentIds).u1u = function () {\n return this.AUTO_ADAPT_CHILD_FAILED_EVENT_COMPONENT_ID;\n };\n protoOf(ComponentIds).v1u = function () {\n return this.AUTO_ADAPT_PRODUCT_SPECIFICATIONS_COMPONENT_ID;\n };\n protoOf(ComponentIds).w1u = function () {\n return this.highestCoreComponentId;\n };\n protoOf(ComponentIds).debugToString = function (id) {\n switch (id) {\n case 0:\n return 'Selected';\n case 10:\n return 'WorldTransform';\n case 6:\n return 'LocalTransform';\n case 5:\n return 'InScene';\n case 17:\n return 'Child';\n case 41:\n return 'RoomDimensions';\n case 54:\n return 'RoomActiveConnectors';\n default:\n return id.toString();\n }\n };\n protoOf(ComponentIds).isCoreComponent = function (component) {\n return component.typeId <= 133;\n };\n protoOf(ComponentIds).isCoreComponentId = function (componentId) {\n return componentId <= 133;\n };\n var ComponentIds_instance;\n function ComponentIds_getInstance() {\n return ComponentIds_instance;\n }\n function ComponentUtils() {\n }\n protoOf(ComponentUtils).isSelected = function (entity) {\n return get_isSelected(entity);\n };\n protoOf(ComponentUtils).selectableComponent = function (entity) {\n return get_selectableComponent(entity);\n };\n protoOf(ComponentUtils).isSelectable = function (entity) {\n return get_isSelectable(entity);\n };\n protoOf(ComponentUtils).displayName = function (entity) {\n return get_displayName(entity);\n };\n protoOf(ComponentUtils).connectorsComponent = function (entity) {\n return get_connectorsComponent(entity);\n };\n protoOf(ComponentUtils).connectors = function (entity) {\n var tmp0_safe_receiver = get_connectorsComponent(entity);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.connectors;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n };\n protoOf(ComponentUtils).connection = function (entity) {\n return get_highestPriorityConnection(entity);\n };\n protoOf(ComponentUtils).snapRoot = function (entity) {\n return findWithComponentInUpwardsHierarchy(entity, 47);\n };\n protoOf(ComponentUtils).isRoom = function (entity) {\n return entity.hasComponent(53);\n };\n protoOf(ComponentUtils).draggableRootEntity = function (entity) {\n var draggable = findWithComponentInUpwardsHierarchy(entity, 3);\n var tmp;\n if (draggable == null) {\n tmp = null;\n } else {\n tmp = findWithComponentInUpwardsHierarchy(draggable, 47);\n }\n var snapRoot = tmp;\n return snapRoot;\n };\n protoOf(ComponentUtils).selectableRoot = function (entity) {\n return findWithComponentInUpwardsHierarchy(entity, 1);\n };\n protoOf(ComponentUtils).previousId = function (entity) {\n return get_previousId(entity);\n };\n var ComponentUtils_instance;\n function ComponentUtils_getInstance() {\n return ComponentUtils_instance;\n }\n function get_snapRoot(_this__u8e3s4) {\n return ComponentUtils_instance.snapRoot(_this__u8e3s4);\n }\n function get_draggableRootEntity(_this__u8e3s4) {\n return ComponentUtils_instance.draggableRootEntity(_this__u8e3s4);\n }\n function get_selectableRoot(_this__u8e3s4) {\n return ComponentUtils_instance.selectableRoot(_this__u8e3s4);\n }\n function isSameConnector($this, otherEntity1, otherEntity2, otherConnector1, otherConnector2) {\n return (($this.demandingEntity === otherEntity1 ? $this.demandingConnector.key === otherConnector1.key : false) ? $this.offeringEntity === otherEntity2 : false) ? $this.offeringConnector.key === otherConnector2.key : false;\n }\n function AlignmentConnection(demandingEntity, demandingConnector, offeringEntity, offeringConnector, offeringDemandingConnectorDeltaTransform) {\n this.demandingEntity = demandingEntity;\n this.demandingConnector = demandingConnector;\n this.offeringEntity = offeringEntity;\n this.offeringConnector = offeringConnector;\n this.offeringDemandingConnectorDeltaTransform = offeringDemandingConnectorDeltaTransform;\n }\n protoOf(AlignmentConnection).x1u = function () {\n return this.demandingEntity;\n };\n protoOf(AlignmentConnection).p1m = function () {\n return this.demandingConnector;\n };\n protoOf(AlignmentConnection).y1u = function () {\n return this.offeringEntity;\n };\n protoOf(AlignmentConnection).q1m = function () {\n return this.offeringConnector;\n };\n protoOf(AlignmentConnection).z1u = function () {\n return this.offeringDemandingConnectorDeltaTransform;\n };\n protoOf(AlignmentConnection).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof AlignmentConnection))\n THROW_CCE();\n return (isSameConnector(this, other.demandingEntity, other.offeringEntity, other.demandingConnector, other.offeringConnector) ? this.offeringDemandingConnectorDeltaTransform.almostEquals(other.offeringDemandingConnectorDeltaTransform) : false) ? true : isSameConnector(this, other.offeringEntity, other.demandingEntity, other.offeringConnector, other.demandingConnector) ? this.offeringDemandingConnectorDeltaTransform.almostEquals(other.offeringDemandingConnectorDeltaTransform.inverse()) : false;\n };\n protoOf(AlignmentConnection).toString = function () {\n return '' + get_displayName(this.demandingEntity) + ', ' + this.demandingConnector.key + ', ' + get_displayName(this.offeringEntity) + ', ' + this.offeringConnector.key;\n };\n protoOf(AlignmentConnection).hashCode = function () {\n var result = this.demandingEntity.hashCode();\n result = imul(31, result) + this.offeringEntity.hashCode() | 0;\n return result;\n };\n protoOf(AlignmentConnection).af = function () {\n return this.demandingEntity;\n };\n protoOf(AlignmentConnection).bf = function () {\n return this.demandingConnector;\n };\n protoOf(AlignmentConnection).g1k = function () {\n return this.offeringEntity;\n };\n protoOf(AlignmentConnection).h1k = function () {\n return this.offeringConnector;\n };\n protoOf(AlignmentConnection).i1k = function () {\n return this.offeringDemandingConnectorDeltaTransform;\n };\n protoOf(AlignmentConnection).a1v = function (demandingEntity, demandingConnector, offeringEntity, offeringConnector, offeringDemandingConnectorDeltaTransform) {\n return new AlignmentConnection(demandingEntity, demandingConnector, offeringEntity, offeringConnector, offeringDemandingConnectorDeltaTransform);\n };\n protoOf(AlignmentConnection).copy = function (demandingEntity, demandingConnector, offeringEntity, offeringConnector, offeringDemandingConnectorDeltaTransform, $super) {\n demandingEntity = demandingEntity === VOID ? this.demandingEntity : demandingEntity;\n demandingConnector = demandingConnector === VOID ? this.demandingConnector : demandingConnector;\n offeringEntity = offeringEntity === VOID ? this.offeringEntity : offeringEntity;\n offeringConnector = offeringConnector === VOID ? this.offeringConnector : offeringConnector;\n offeringDemandingConnectorDeltaTransform = offeringDemandingConnectorDeltaTransform === VOID ? this.offeringDemandingConnectorDeltaTransform : offeringDemandingConnectorDeltaTransform;\n return this.a1v(demandingEntity, demandingConnector, offeringEntity, offeringConnector, offeringDemandingConnectorDeltaTransform);\n };\n function Companion_15() {\n this.ID = 'ChildConnection';\n }\n protoOf(Companion_15).u1n = function () {\n return this.ID;\n };\n var Companion_instance_15;\n function Companion_getInstance_16() {\n return Companion_instance_15;\n }\n function validate_0($this, entity, snapActionCandidate) {\n var productRef = toString_0(get_productRef(entity));\n if (!(snapActionCandidate == null))\n return null;\n var tmp0_elvis_lhs = get_highestPriorityConnection(entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var connection = tmp;\n var host = connection.hostConnectorEntity;\n var oldHostConnector_0 = oldHostConnector($this, connection);\n var tmp1_safe_receiver = get_connectorsComponent(host);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.hostConnectors;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = tmp2_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connections.ChildConnectionValidation.validate.' call\n if (element.key === oldHostConnector_0.key) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp_0 = tmp$ret$1;\n }\n var tmp3_elvis_lhs = tmp_0;\n var tmp_1;\n if (tmp3_elvis_lhs == null) {\n return Companion_instance_114.fail('The host connector ' + connection.hostConnector.key + ' could no longer be found on ' + host, productRef, $this);\n } else {\n tmp_1 = tmp3_elvis_lhs;\n }\n var hostConnector = tmp_1;\n var hostConnectorStillContainsGuest = hostConnector.containsConnector(get_worldTransform(host), get_worldTransform(connection.guestConnectorEntity), connection.guestConnector);\n return hostConnectorStillContainsGuest ? null : Companion_instance_114.fail('The host connector ' + connection.hostConnector.key + ' could no longer supports the guest connector position', productRef, $this);\n }\n function oldHostConnector($this, connection) {\n var hostConnector = connection.hostConnector;\n var tmp;\n if (hostConnector instanceof PointSeriesSubConnector) {\n tmp = hostConnector.series;\n } else {\n tmp = hostConnector;\n }\n return tmp;\n }\n function ChildConnectionValidation() {\n ValidationImpl.call(this);\n this.n1v_1 = 'ChildConnection';\n }\n protoOf(ChildConnectionValidation).s1k = function () {\n return this.n1v_1;\n };\n protoOf(ChildConnectionValidation).validateCurrentState = function (entity) {\n return validate_0(this, entity, null);\n };\n protoOf(ChildConnectionValidation).validateSnap = function (snapActionCandidate) {\n return validate_0(this, snapActionCandidate.guestRoot, snapActionCandidate);\n };\n function Connection(guestConnectorEntity, guestConnector, hostConnectorEntity, hostConnector, hostGuestConnectorDeltaTransform) {\n this.guestConnectorEntity = guestConnectorEntity;\n this.guestConnector = guestConnector;\n this.hostConnectorEntity = hostConnectorEntity;\n this.hostConnector = hostConnector;\n this.hostGuestConnectorDeltaTransform = hostGuestConnectorDeltaTransform;\n this.hostGuestDeltaTransform = get_worldTransform(this.guestConnectorEntity).delta(get_worldTransform(this.hostConnectorEntity));\n }\n protoOf(Connection).o1v = function () {\n return this.guestConnectorEntity;\n };\n protoOf(Connection).p1v = function () {\n return this.guestConnector;\n };\n protoOf(Connection).q1v = function () {\n return this.hostConnectorEntity;\n };\n protoOf(Connection).r1v = function () {\n return this.hostConnector;\n };\n protoOf(Connection).s1v = function () {\n return this.hostGuestConnectorDeltaTransform;\n };\n protoOf(Connection).t1v = function () {\n var tmp0_elvis_lhs = get_connectionRootEntity(this.guestConnectorEntity);\n return tmp0_elvis_lhs == null ? this.guestConnectorEntity : tmp0_elvis_lhs;\n };\n protoOf(Connection).u1v = function () {\n var tmp0_elvis_lhs = get_connectionRootEntity(this.hostConnectorEntity);\n return tmp0_elvis_lhs == null ? this.hostConnectorEntity : tmp0_elvis_lhs;\n };\n protoOf(Connection).v1v = function () {\n return this.hostConnector.priority + this.guestConnector.priority | 0;\n };\n protoOf(Connection).w1v = function () {\n return this.hostGuestDeltaTransform;\n };\n protoOf(Connection).x1v = function () {\n return this.guestConnectionRoot.equals(this.guestConnectorEntity);\n };\n protoOf(Connection).y1v = function () {\n return get_worldTransform(this.guestConnectorEntity).transformPosition(this.guestConnector.transform.position);\n };\n protoOf(Connection).z1v = function () {\n return get_worldTransform(this.hostConnectorEntity).transformPosition(this.hostConnector.transform.position);\n };\n protoOf(Connection).toString = function () {\n return 'Connection[' + get_displayName(this.hostConnectionRoot) + ' ' + this.hostConnector.key + '<->' + get_displayName(this.guestConnectionRoot) + ' ' + this.guestConnector.key + ' delta: ' + this.hostGuestConnectorDeltaTransform + ']';\n };\n protoOf(Connection).af = function () {\n return this.guestConnectorEntity;\n };\n protoOf(Connection).bf = function () {\n return this.guestConnector;\n };\n protoOf(Connection).g1k = function () {\n return this.hostConnectorEntity;\n };\n protoOf(Connection).h1k = function () {\n return this.hostConnector;\n };\n protoOf(Connection).i1k = function () {\n return this.hostGuestConnectorDeltaTransform;\n };\n protoOf(Connection).a1v = function (guestConnectorEntity, guestConnector, hostConnectorEntity, hostConnector, hostGuestConnectorDeltaTransform) {\n return new Connection(guestConnectorEntity, guestConnector, hostConnectorEntity, hostConnector, hostGuestConnectorDeltaTransform);\n };\n protoOf(Connection).copy = function (guestConnectorEntity, guestConnector, hostConnectorEntity, hostConnector, hostGuestConnectorDeltaTransform, $super) {\n guestConnectorEntity = guestConnectorEntity === VOID ? this.guestConnectorEntity : guestConnectorEntity;\n guestConnector = guestConnector === VOID ? this.guestConnector : guestConnector;\n hostConnectorEntity = hostConnectorEntity === VOID ? this.hostConnectorEntity : hostConnectorEntity;\n hostConnector = hostConnector === VOID ? this.hostConnector : hostConnector;\n hostGuestConnectorDeltaTransform = hostGuestConnectorDeltaTransform === VOID ? this.hostGuestConnectorDeltaTransform : hostGuestConnectorDeltaTransform;\n return this.a1v(guestConnectorEntity, guestConnector, hostConnectorEntity, hostConnector, hostGuestConnectorDeltaTransform);\n };\n protoOf(Connection).hashCode = function () {\n var result = this.guestConnectorEntity.hashCode();\n result = imul(result, 31) + this.guestConnector.hashCode() | 0;\n result = imul(result, 31) + this.hostConnectorEntity.hashCode() | 0;\n result = imul(result, 31) + this.hostConnector.hashCode() | 0;\n result = imul(result, 31) + this.hostGuestConnectorDeltaTransform.hashCode() | 0;\n return result;\n };\n protoOf(Connection).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Connection))\n return false;\n var tmp0_other_with_cast = other instanceof Connection ? other : THROW_CCE();\n if (!this.guestConnectorEntity.equals(tmp0_other_with_cast.guestConnectorEntity))\n return false;\n if (!this.guestConnector.equals(tmp0_other_with_cast.guestConnector))\n return false;\n if (!this.hostConnectorEntity.equals(tmp0_other_with_cast.hostConnectorEntity))\n return false;\n if (!this.hostConnector.equals(tmp0_other_with_cast.hostConnector))\n return false;\n if (!this.hostGuestConnectorDeltaTransform.equals(tmp0_other_with_cast.hostGuestConnectorDeltaTransform))\n return false;\n return true;\n };\n function Companion_16() {\n this.id = 28;\n }\n protoOf(Companion_16).s1k = function () {\n return this.id;\n };\n var Companion_instance_16;\n function Companion_getInstance_17() {\n return Companion_instance_16;\n }\n function ConnectionRootComponent() {\n }\n protoOf(ConnectionRootComponent).x1k = function () {\n return 28;\n };\n protoOf(ConnectionRootComponent).eq = function (other) {\n return true;\n };\n function get_isConnectionRoot(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(28);\n }\n function get_highestPriorityConnection(_this__u8e3s4) {\n Companion_getInstance_18();\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(104);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.highestPriorityConnection;\n }\n function get_guestConnections(_this__u8e3s4) {\n Companion_getInstance_18();\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(104);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.connections;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n }\n function tryCreatePartConnection($this, hostPart, guestPart, guestConnector) {\n var tmp0_safe_receiver = get_connectorsComponent(hostPart);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectors;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : asSequence_1(tmp1_safe_receiver);\n var tmp;\n if (tmp2_safe_receiver == null) {\n tmp = null;\n } else {\n tmp = filter(tmp2_safe_receiver, ConnectionUtils$tryCreatePartConnection$lambda(guestConnector));\n }\n var tmp3_safe_receiver = tmp;\n var tmp_0;\n if (tmp3_safe_receiver == null) {\n tmp_0 = null;\n } else {\n tmp_0 = filter(tmp3_safe_receiver, ConnectionUtils$tryCreatePartConnection$lambda_0(hostPart, guestConnector, guestPart));\n }\n var tmp4_safe_receiver = tmp_0;\n var tmp_1;\n if (tmp4_safe_receiver == null) {\n tmp_1 = null;\n } else {\n tmp_1 = map(tmp4_safe_receiver, ConnectionUtils$tryCreatePartConnection$lambda_1(hostPart, guestPart, guestConnector));\n }\n var tmp5_safe_receiver = tmp_1;\n var connection = tmp5_safe_receiver == null ? null : firstOrNull_0(tmp5_safe_receiver);\n return connection;\n }\n function tryAligning($this, guestAlignment, hostAlignment, hostEntity, guestEntity, result) {\n var canAlign = guestAlignment.hasMatchingTags(hostAlignment) ? hostAlignment.containsConnector(get_worldTransform(hostEntity), get_worldTransform(guestEntity), guestAlignment) : false;\n if (canAlign) {\n var connectorsDeltaTransform = hostAlignment.getDeltaTransformToGuestConnectorEntity(hostEntity, guestEntity, guestAlignment);\n result.q(new AlignmentConnection(guestEntity, guestAlignment, hostEntity, hostAlignment, connectorsDeltaTransform));\n }\n }\n function getEntityAndGuestsThatAreNotChildrenOfEntityOrAssembly($this, entity) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var list = ArrayList_init_$Create$();\n getEntityAndGuestsThatAreNotChildrenOfEntityOrAssembly$searchEntityRecursive(entity, list, entity);\n return list;\n }\n function getEntityAndGuestsThatAreNotChildrenOfEntityOrAssembly$searchEntityRecursive($entity, list, host) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_hostedConnections(host);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections.ConnectionUtils.getEntityAndGuestsThatAreNotChildrenOfEntityOrAssembly.searchEntityRecursive.' call\n var tmp0_safe_receiver = get_parent(element.guestConnectionRoot);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_connectionRootEntity(tmp0_safe_receiver);\n var parentOrAssembly = tmp1_elvis_lhs == null ? get_parent(element.guestConnectionRoot) : tmp1_elvis_lhs;\n if (!equals(parentOrAssembly, host)) {\n getEntityAndGuestsThatAreNotChildrenOfEntityOrAssembly$searchEntityRecursive($entity, list, element.guestConnectionRoot);\n }\n }\n var isOriginalEntityButNotEntityGroup = host.equals($entity) ? !get_isAutomaticGroup($entity) : false;\n var tmp;\n var tmp_0;\n Companion_getInstance_18();\n if (host.hasComponent(104)) {\n tmp_0 = true;\n } else {\n tmp_0 = isOriginalEntityButNotEntityGroup;\n }\n if (tmp_0) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.none' call\n var tmp_1;\n if (isInterface(list, Collection)) {\n tmp_1 = list.b1();\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = list.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.getEntityAndGuestsThatAreNotChildrenOfEntityOrAssembly.searchEntityRecursive.' call\n if (element_0.equals(host)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n tmp = tmp$ret$0;\n } else {\n tmp = false;\n }\n if (tmp) {\n list.q(host);\n }\n }\n function ConnectionUtils$calculateAllConnectionsToHierarchies$lambda($guestPart) {\n return function (host) {\n return !host.equals($guestPart);\n };\n }\n function ConnectionUtils$calculateAllConnectionsToHierarchies$lambda_0($guestPart, $guestConnector) {\n return function (host) {\n var partConnection = tryCreatePartConnection(ConnectionUtils_instance, host, $guestPart, $guestConnector);\n return partConnection;\n };\n }\n function ConnectionUtils$tryCreatePartConnection$lambda($guestConnector) {\n return function (hostConnector) {\n return $guestConnector.hasMatchingTags(hostConnector);\n };\n }\n function ConnectionUtils$tryCreatePartConnection$lambda_0($hostPart, $guestConnector, $guestPart) {\n return function (hostConnector) {\n return hostConnector.closestSubConnectorFromOwnerEntity($hostPart, $guestConnector.getWorldPositionFromOwnerEntity($guestPart)).containsConnector(get_worldTransform($hostPart), get_worldTransform($guestPart), $guestConnector);\n };\n }\n function ConnectionUtils$tryCreatePartConnection$lambda_1($hostPart, $guestPart, $guestConnector) {\n return function (hostConnector) {\n var connectorsDeltaTransform = hostConnector.getDeltaTransformToGuestConnectorEntity($hostPart, $guestPart, $guestConnector);\n var hostConnectorPossiblySubConnector = hostConnector.closestSubConnectorFromOwnerEntity($hostPart, $guestConnector.getWorldPositionFromOwnerEntity($guestPart));\n return new Connection($guestPart, $guestConnector, $hostPart, hostConnectorPossiblySubConnector, connectorsDeltaTransform);\n };\n }\n function ConnectionUtils$matchingAlignmentConnections$lambda(it) {\n return !(get_alignmentConnectors(it) == null);\n }\n function ConnectionUtils() {\n }\n protoOf(ConnectionUtils).getGuestConnections = function (entity) {\n return get_guestConnections(entity);\n };\n protoOf(ConnectionUtils).getHighestPriorityConnection = function (entity) {\n return get_highestPriorityConnection(entity);\n };\n protoOf(ConnectionUtils).getExistingOutgoingGuestConnections = function (entity) {\n var tmp0_elvis_lhs = get_snapRoot(entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n return [];\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var snapRoot = tmp;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = get_snappingEntitiesArray(snapRoot);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections.ConnectionUtils.getExistingOutgoingGuestConnections.' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_1 = get_guestConnections(element);\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.connections.ConnectionUtils.getExistingOutgoingGuestConnections..' call\n if (!equals(get_snapRoot(element_0.hostConnectorEntity), snapRoot)) {\n destination_0.q(element_0);\n }\n }\n var list = destination_0;\n addAll(destination, list);\n }\n return copyToArray(destination);\n };\n protoOf(ConnectionUtils).calculateAllConnectionsToHierarchy = function (guestSnapRoot, hostRoot) {\n var snappingEntities = get_snappingHierarchyEntitiesList(guestSnapRoot);\n if (snappingEntities.b1()) {\n // Inline function 'kotlin.emptyArray' call\n return [];\n }\n // Inline function 'kotlin.collections.mutableListOf' call\n var res = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = snappingEntities.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.calculateAllConnectionsToHierarchy.' call\n var tmp0_safe_receiver = get_connectorsComponent(element);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = tmp1_safe_receiver.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.calculateAllConnectionsToHierarchy..' call\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator_1 = hierarchyExceptSubTreeSequence(hostRoot, guestSnapRoot).t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.calculateAllConnectionsToHierarchy...' call\n var partConnection = tryCreatePartConnection(ConnectionUtils_instance, element_1, element, element_0);\n if (!(partConnection == null)) {\n res.q(partConnection);\n }\n }\n }\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(res);\n };\n protoOf(ConnectionUtils).calculateAllConnectionsToHierarchies = function (guestSnapRoot, hostRoots) {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = hostRoots.length;\n while (inductionVariable < last) {\n var element = hostRoots[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections.ConnectionUtils.calculateAllConnectionsToHierarchies.' call\n var list = hierarchyExceptSubTreeSequence(element, guestSnapRoot);\n addAll_0(destination, list);\n }\n var others = asSequence_1(destination);\n var snappingEntities = get_snappingHierarchyEntitiesList(guestSnapRoot);\n if (snappingEntities.b1()) {\n // Inline function 'kotlin.emptyArray' call\n return [];\n }\n // Inline function 'kotlin.collections.mutableListOf' call\n var res = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = snappingEntities.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.calculateAllConnectionsToHierarchies.' call\n var tmp0_safe_receiver = get_connectorsComponent(element_0);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = tmp1_safe_receiver.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.calculateAllConnectionsToHierarchies..' call\n var tmp = filter(others, ConnectionUtils$calculateAllConnectionsToHierarchies$lambda(element_0));\n var partConnection = firstOrNull_0(mapNotNull(tmp, ConnectionUtils$calculateAllConnectionsToHierarchies$lambda_0(element_0, element_1)));\n if (!(partConnection == null)) {\n res.q(partConnection);\n }\n }\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(res);\n };\n protoOf(ConnectionUtils).refreshConnections = function (connectionsRoot, hostRoot) {\n var guestHierarchyRoot = HierarchyUtils_instance.rootOf(connectionsRoot);\n var isPartOfSameHierarchy = hostRoot.equals(guestHierarchyRoot);\n var tmp;\n if (isPartOfSameHierarchy) {\n tmp = this.calculateAllConnectionsToHierarchy(connectionsRoot, hostRoot);\n } else {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [hostRoot, guestHierarchyRoot];\n tmp = this.calculateAllConnectionsToHierarchies(connectionsRoot, tmp$ret$2);\n }\n var connections = tmp;\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(connections.length === 0)) {\n var guestConnections = new GuestConnectionsComponent(connections);\n connectionsRoot.addComponent(guestConnections);\n } else {\n Companion_getInstance_18();\n connectionsRoot.removeComponent(104);\n }\n };\n protoOf(ConnectionUtils).matchingAlignmentConnections = function (entity, otherEntities) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var result = ArrayList_init_$Create$();\n var tmp = get_snappingHierarchyEntitiesSequence(entity);\n var guestAssemblyHierarchy = toSet(filter(tmp, ConnectionUtils$matchingAlignmentConnections$lambda));\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = otherEntities.length;\n while (inductionVariable < last) {\n var element = otherEntities[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections.ConnectionUtils.matchingAlignmentConnections.' call\n if (!guestAssemblyHierarchy.p(element)) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = guestAssemblyHierarchy.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.matchingAlignmentConnections..' call\n var tmp0_safe_receiver = get_alignmentConnectors(element_0);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = tmp0_safe_receiver.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.matchingAlignmentConnections...' call\n var tmp0_safe_receiver_0 = get_alignmentConnectors(element);\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_1 = tmp0_safe_receiver_0.t();\n while (tmp0_iterator_1.u()) {\n var element_2 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.matchingAlignmentConnections....' call\n tryAligning(ConnectionUtils_instance, element_1, element_2, element, element_0, result);\n }\n }\n var tmp1_safe_receiver = get_hostConnectors(element);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_2 = tmp1_safe_receiver.t();\n while (tmp0_iterator_2.u()) {\n var element_3 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.matchingAlignmentConnections....' call\n tryAligning(ConnectionUtils_instance, element_1, element_3, element, element_0, result);\n }\n }\n }\n }\n }\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(result);\n };\n protoOf(ConnectionUtils).disconnect = function (entity) {\n var guestsThatAreNotChildren = getEntityAndGuestsThatAreNotChildrenOfEntityOrAssembly(this, entity);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = guestsThatAreNotChildren.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.disconnect.' call\n Companion_getInstance_18();\n element.removeComponent(104);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator_0 = guestsThatAreNotChildren.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.disconnect.' call\n if (!element_0.isDisposed) {\n destination.q(element_0);\n }\n }\n return copyToArray(destination);\n };\n protoOf(ConnectionUtils).disconnectAndDisposeEntityAndHierarchy = function (entity) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [entity];\n this.disconnectAndDisposeEntitiesAndHierarchies(tmp$ret$2);\n return entity;\n };\n protoOf(ConnectionUtils).disconnectAndDisposeEntitiesAndHierarchies = function (entities) {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = entities.length;\n while (inductionVariable < last) {\n var element = entities[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n $l$block: {\n // Inline function 'com.ikea.core.connections.ConnectionUtils.disconnectAndDisposeEntitiesAndHierarchies.' call\n if (element.isDisposed) {\n break $l$block;\n }\n var disconnectedEntities = ConnectionUtils_instance.disconnect(element);\n element.dispose();\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = disconnectedEntities.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = disconnectedEntities[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.connections.ConnectionUtils.disconnectAndDisposeEntitiesAndHierarchies..' call\n if (!element_0.isDisposed) {\n destination.q(element_0);\n }\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_1 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connections.ConnectionUtils.disconnectAndDisposeEntitiesAndHierarchies..' call\n element_1.dispose();\n }\n }\n }\n return entities;\n };\n var ConnectionUtils_instance;\n function ConnectionUtils_getInstance() {\n return ConnectionUtils_instance;\n }\n function Companion_17() {\n Companion_instance_17 = this;\n this.id = 104;\n this.c1w_1 = LoggerState_getInstance().m1m('GuestConnectionsComponent');\n }\n protoOf(Companion_17).s1k = function () {\n return this.id;\n };\n var Companion_instance_17;\n function Companion_getInstance_18() {\n if (Companion_instance_17 == null)\n new Companion_17();\n return Companion_instance_17;\n }\n function GuestConnectionsComponent$hasMultipleHosts$delegate$lambda(this$0) {\n return function () {\n // Inline function 'kotlin.collections.count' call\n // Inline function 'kotlin.collections.distinctBy' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this$0.connections;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections.GuestConnectionsComponent.hasMultipleHosts$delegate..' call\n if (!get_isStatic(element.hostConnectorEntity)) {\n destination.q(element);\n }\n }\n var set = HashSet_init_$Create$();\n var list = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var e = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connections.GuestConnectionsComponent.hasMultipleHosts$delegate..' call\n var key = get_connectionRootEntity(e.hostConnectorEntity);\n if (set.q(key)) {\n list.q(e);\n }\n }\n return list.n() > 1;\n };\n }\n function GuestConnectionsComponent$withReplacedConnection$lambda($newConnection) {\n return function () {\n return \"couldn't find a connection matching \" + $newConnection + ' to replace on ' + get_displayName($newConnection.guestConnectorEntity);\n };\n }\n function GuestConnectionsComponent(connections) {\n Companion_getInstance_18();\n this.connections = connections;\n this.a1w_1 = 104;\n var tmp = this;\n tmp.b1w_1 = lazy(GuestConnectionsComponent$hasMultipleHosts$delegate$lambda(this));\n }\n protoOf(GuestConnectionsComponent).d1w = function () {\n return this.connections;\n };\n protoOf(GuestConnectionsComponent).x1k = function () {\n return this.a1w_1;\n };\n protoOf(GuestConnectionsComponent).eq = function (other) {\n if (this === other)\n return true;\n var that = unsafeCast(other);\n return contentEquals(this.connections, that.connections);\n };\n protoOf(GuestConnectionsComponent).e1w = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.b1w_1;\n hasMultipleHosts$factory();\n return this_0.u2();\n };\n protoOf(GuestConnectionsComponent).f1w = function () {\n var tmp$ret$1;\n $l$block_0: {\n // Inline function 'kotlin.collections.maxByOrNull' call\n var this_0 = this.connections;\n // Inline function 'kotlin.collections.isEmpty' call\n if (this_0.length === 0) {\n tmp$ret$1 = null;\n break $l$block_0;\n }\n var maxElem = this_0[0];\n var lastIndex = get_lastIndex(this_0);\n if (lastIndex === 0) {\n tmp$ret$1 = maxElem;\n break $l$block_0;\n }\n // Inline function 'com.ikea.core.connections.GuestConnectionsComponent..' call\n var maxValue = maxElem.priority;\n var inductionVariable = 1;\n if (inductionVariable <= lastIndex)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var e = this_0[i];\n // Inline function 'com.ikea.core.connections.GuestConnectionsComponent..' call\n var v = e.priority;\n if (compareTo(maxValue, v) < 0) {\n maxElem = e;\n maxValue = v;\n }\n }\n while (!(i === lastIndex));\n tmp$ret$1 = maxElem;\n }\n return tmp$ret$1;\n };\n protoOf(GuestConnectionsComponent).withReplacedConnection = function (newConnection) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = this.connections;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections.GuestConnectionsComponent.withReplacedConnection.' call\n if ((element.guestConnectorEntity.equals(newConnection.guestConnectorEntity) ? element.guestConnector.key === newConnection.guestConnector.key : false) ? element.hostConnector.key === newConnection.hostConnector.key : false) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var connectionToRemove = tmp$ret$1;\n if (connectionToRemove == null) {\n var tmp = Companion_getInstance_18().c1w_1;\n tmp.warn(GuestConnectionsComponent$withReplacedConnection$lambda(newConnection));\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = this.connections;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$6 = [newConnection];\n var tmp$ret$7 = tmp$ret$3.concat(tmp$ret$6);\n return new GuestConnectionsComponent(tmp$ret$7);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_1 = subtract(this.connections, setOf(connectionToRemove));\n var connectionsWithoutConnectionToRemove = copyToArray(this_1);\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$12 = [newConnection];\n var connectionsWithReplaced = connectionsWithoutConnectionToRemove.concat(tmp$ret$12);\n return new GuestConnectionsComponent(connectionsWithReplaced);\n };\n function get_hasMultipleHosts(_this__u8e3s4) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(104);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hasMultipleHosts;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n }\n function centerOfConnections(connections) {\n var centerOfConnections = Companion_getInstance_61().ZERO;\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = connections.length;\n while (inductionVariable < last) {\n var element = connections[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections.centerOfConnections.' call\n centerOfConnections = centerOfConnections.plus(element.guestConnectorWorldPosition);\n }\n var tmp = centerOfConnections;\n // Inline function 'kotlin.collections.count' call\n var tmp$ret$0 = connections.length;\n centerOfConnections = tmp.__divIntForKotlin(tmp$ret$0);\n return centerOfConnections;\n }\n function hasMultipleHosts$factory() {\n return getPropertyCallableRef('hasMultipleHosts', 1, KProperty1, function (receiver) {\n return receiver.hasMultipleHosts;\n }, null);\n }\n function Companion_18() {\n this.id = 105;\n }\n protoOf(Companion_18).s1k = function () {\n return this.id;\n };\n var Companion_instance_18;\n function Companion_getInstance_19() {\n return Companion_instance_18;\n }\n function HostConnectionsComponent(connections) {\n var tmp;\n if (connections === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [];\n } else {\n tmp = connections;\n }\n connections = tmp;\n this.connections = connections;\n this.s1j_1 = 105;\n }\n protoOf(HostConnectionsComponent).d1w = function () {\n return this.connections;\n };\n protoOf(HostConnectionsComponent).x1k = function () {\n return this.s1j_1;\n };\n protoOf(HostConnectionsComponent).eq = function (other) {\n if (this === other)\n return true;\n var that = unsafeCast(other);\n return contentEquals(this.connections, that.connections);\n };\n protoOf(HostConnectionsComponent).hashCode = function () {\n var result = contentHashCode(this.connections);\n result = imul(31, result) + this.s1j_1 | 0;\n return result;\n };\n protoOf(HostConnectionsComponent).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof HostConnectionsComponent))\n THROW_CCE();\n return this.eq(other);\n };\n protoOf(HostConnectionsComponent).af = function () {\n return this.connections;\n };\n protoOf(HostConnectionsComponent).g1w = function (connections) {\n return new HostConnectionsComponent(connections);\n };\n protoOf(HostConnectionsComponent).copy = function (connections, $super) {\n connections = connections === VOID ? this.connections : connections;\n return this.g1w(connections);\n };\n protoOf(HostConnectionsComponent).toString = function () {\n return 'HostConnectionsComponent(connections=' + toString(this.connections) + ')';\n };\n function addHostedConnection(_this__u8e3s4, connection) {\n var oldHostConnections = get_hostedConnections(_this__u8e3s4);\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [connection];\n var newHostConnections = oldHostConnections.concat(tmp$ret$3);\n _this__u8e3s4.addComponent(new HostConnectionsComponent(newHostConnections));\n }\n function get_hostedConnections(_this__u8e3s4) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(105);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.connections;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n }\n function removeHostedConnection(_this__u8e3s4, connection) {\n var oldHostConnections = get_hostedConnections(_this__u8e3s4);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = oldHostConnections.length;\n while (inductionVariable < last) {\n var element = oldHostConnections[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections.removeHostedConnection.' call\n if (!element.equals(connection)) {\n destination.q(element);\n }\n }\n var newHostConnections = copyToArray(destination);\n // Inline function 'kotlin.collections.isEmpty' call\n if (newHostConnections.length === 0) {\n _this__u8e3s4.removeComponent(105);\n } else {\n _this__u8e3s4.addComponent(new HostConnectionsComponent(newHostConnections));\n }\n }\n function isHostingEntityWithMultipleHosts(_this__u8e3s4) {\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = get_hostedConnections(_this__u8e3s4);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections.isHostingEntityWithMultipleHosts.' call\n var tmp$ret$0 = item.guestConnectionRoot;\n destination.q(tmp$ret$0);\n }\n var this_1 = distinct(destination);\n var tmp;\n if (isInterface(this_1, Collection)) {\n tmp = this_1.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$3 = false;\n break $l$block_0;\n }\n var tmp0_iterator = this_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connections.isHostingEntityWithMultipleHosts.' call\n if (get_hasMultipleHosts(element) ? true : isHostingEntityWithMultipleHosts(element)) {\n tmp$ret$3 = true;\n break $l$block_0;\n }\n }\n tmp$ret$3 = false;\n }\n return tmp$ret$3;\n }\n function get_guests(_this__u8e3s4) {\n // Inline function 'kotlin.collections.map' call\n var this_0 = get_hostedConnections(_this__u8e3s4);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections..' call\n var tmp$ret$0 = item.guestConnectionRoot;\n destination.q(tmp$ret$0);\n }\n return distinct(destination);\n }\n function Companion_19() {\n this.id = 107;\n }\n protoOf(Companion_19).s1k = function () {\n return this.id;\n };\n var Companion_instance_19;\n function Companion_getInstance_20() {\n return Companion_instance_19;\n }\n function TemporarilyPauseConnectionParentingComponent() {\n this.h1w_1 = 107;\n }\n protoOf(TemporarilyPauseConnectionParentingComponent).x1k = function () {\n return this.h1w_1;\n };\n protoOf(TemporarilyPauseConnectionParentingComponent).eq = function (other) {\n return true;\n };\n function Companion_20() {\n this.ID = 'UpdateHostConnectionsSystem';\n }\n protoOf(Companion_20).u1n = function () {\n return this.ID;\n };\n var Companion_instance_20;\n function Companion_getInstance_21() {\n return Companion_instance_20;\n }\n function UpdateHostConnectionsSystem() {\n Companion_getInstance_18();\n SystemBase.call(this, 'UpdateHostConnectionsSystem', 104);\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.q1w_1 = [105];\n this.r1w_1 = ['ConnectionParentingSystem'];\n }\n protoOf(UpdateHostConnectionsSystem).w1o = function () {\n return this.q1w_1;\n };\n protoOf(UpdateHostConnectionsSystem).x1o = function () {\n return this.r1w_1;\n };\n protoOf(UpdateHostConnectionsSystem).onAddComponent = function (entity, newComponent) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = newComponent.connections;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections.UpdateHostConnectionsSystem.onAddComponent.' call\n var tmp0_safe_receiver = get_connectionRootEntity(element.hostConnectorEntity);\n if (tmp0_safe_receiver == null)\n null;\n else {\n addHostedConnection(tmp0_safe_receiver, element);\n }\n }\n };\n protoOf(UpdateHostConnectionsSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n this.onRemoveComponent(entity, oldComponent);\n this.onAddComponent(entity, newComponent);\n };\n protoOf(UpdateHostConnectionsSystem).onRemoveComponent = function (entity, oldComponent) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = oldComponent.connections;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connections.UpdateHostConnectionsSystem.onRemoveComponent.' call\n var tmp0_safe_receiver = get_connectionRootEntity(element.hostConnectorEntity);\n if (tmp0_safe_receiver == null)\n null;\n else {\n removeHostedConnection(tmp0_safe_receiver, element);\n }\n }\n };\n function closestOnEdge(_this__u8e3s4, vertices) {\n var minDist = 1.7976931348623157E308;\n var p = vertices[0];\n var tmp;\n if (vertices.length <= 2) {\n tmp = 1;\n } else {\n tmp = vertices.length;\n }\n var edgesCnt = tmp;\n var inductionVariable = 0;\n if (inductionVariable < edgesCnt)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var p1 = vertices[i];\n var p2 = vertices[(i + 1 | 0) % vertices.length | 0];\n var tmp1_container = closestPointOnSegment(_this__u8e3s4, p1, p2);\n var dist = tmp1_container.af();\n var pp = tmp1_container.bf();\n if (dist < minDist) {\n minDist = dist;\n p = pp;\n }\n }\n while (inductionVariable < edgesCnt);\n return p;\n }\n function closestPointOnSegment(guest, p1, p2) {\n var r = p2.minus(p1).normalize().__timesOperatorKotlin(guest.minus(p1));\n var tmp;\n if (r < 0.0) {\n tmp = new Pair(guest.minus(p1).size, p1);\n } else if (r > p2.minus(p1).size) {\n tmp = new Pair(guest.minus(p2).size, p2);\n } else {\n var e = p2.minus(p1).normalize();\n tmp = new Pair(e.cross(guest.minus(p1)).size, e.times(r).plus(p1));\n }\n return tmp;\n }\n function calculateRotationForGuestToSnapToMe($this, hostTransform, guestTransform, guestConnector) {\n var tmp0_subject = guestConnector.rotationalDegreeOfFreedom;\n if (tmp0_subject === RotationDegreeOfFreedom_NONE_getInstance().x9_1) {\n return guestTransform.rotation.inverse().times(guestConnector.transform.rotation.inverse()).times($this.transform.rotation).times(hostTransform.rotation);\n } else if (tmp0_subject === RotationDegreeOfFreedom_ONE_getInstance().x9_1) {\n var rotationAxisLS = $this.transform.up;\n var rotationAxisWS = hostTransform.transformVector(rotationAxisLS);\n var currentGuestRotationAxisWS = guestTransform.transformVector(guestConnector.transform.up);\n return currentGuestRotationAxisWS.getRotationTo(rotationAxisWS);\n } else\n throw new NotImplementedError('Rotational degree of freedom: ' + guestConnector.rotationalDegreeOfFreedom);\n }\n function calculateMovement($this, hostTransform, hostConnector, guestTransform, rotation, guestRootTransform) {\n var guestConnectorWorldSpace = guestTransform.transformPosition($this.transform.position);\n var guestConnectorPosAfterRotation = guestConnectorWorldSpace.rotateAroundPivot(rotation, guestRootTransform.position);\n var closestHostConnectorInWorldSpace = hostConnector.closestWhenUsingTransform(hostTransform, guestConnectorPosAfterRotation);\n return closestHostConnectorInWorldSpace.minus(guestConnectorPosAfterRotation);\n }\n function Companion_21() {\n this.DEFAULT_GUEST_ACTIVATION_DISTANCE = 200.0;\n this.DEFAULT_HOST_ACTIVATION_DISTANCE = 0.0;\n }\n protoOf(Companion_21).s1w = function () {\n return this.DEFAULT_GUEST_ACTIVATION_DISTANCE;\n };\n protoOf(Companion_21).t1w = function () {\n return this.DEFAULT_HOST_ACTIVATION_DISTANCE;\n };\n var Companion_instance_21;\n function Companion_getInstance_22() {\n return Companion_instance_21;\n }\n function Connector$findHostConnectorsWithMatchingTags$lambda(this$0) {\n return function (hostConnector) {\n return this$0.hasMatchingTags(hostConnector);\n };\n }\n function Connector$allSubConnectors$delegate$lambda(this$0) {\n return function () {\n return sequenceOf([this$0]);\n };\n }\n function Connector() {\n this.u1w_1 = RotationDegreeOfFreedom_NONE_getInstance().x9_1;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.v1w_1 = [];\n var tmp_0 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0.w1w_1 = [];\n var tmp_1 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_1.x1w_1 = [];\n var tmp_2 = this;\n tmp_2.y1w_1 = lazy(Connector$allSubConnectors$delegate$lambda(this));\n this.z1w_1 = false;\n }\n protoOf(Connector).e1x = function () {\n return this.u1w_1;\n };\n protoOf(Connector).f1x = function (_set____db54di) {\n this.v1w_1 = _set____db54di;\n };\n protoOf(Connector).g1x = function () {\n return this.v1w_1;\n };\n protoOf(Connector).h1x = function (_set____db54di) {\n this.w1w_1 = _set____db54di;\n };\n protoOf(Connector).i1x = function () {\n return this.w1w_1;\n };\n protoOf(Connector).j1x = function (_set____db54di) {\n this.x1w_1 = _set____db54di;\n };\n protoOf(Connector).k1x = function () {\n return this.x1w_1;\n };\n protoOf(Connector).setDemands = function (tag) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n this.demandsArray = tag.slice();\n return this;\n };\n protoOf(Connector).setOffers = function (tag) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n this.offersArray = tag.slice();\n return this;\n };\n protoOf(Connector).withTag = function (name) {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$0 = this.tagArray;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [name];\n var newTags = tmp$ret$0.concat(tmp$ret$3);\n this.tagArray = newTags;\n return this;\n };\n protoOf(Connector).removeTag = function (name) {\n if (contains(this.tagArray, name)) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.tagArray;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connectors.Connector.removeTag.' call\n if (!(element === name)) {\n destination.q(element);\n }\n }\n this.tagArray = copyToArray(destination);\n }\n return this;\n };\n protoOf(Connector).tags = function () {\n return this.tagArray;\n };\n protoOf(Connector).offers = function () {\n return this.offersArray;\n };\n protoOf(Connector).demands = function () {\n return this.demandsArray;\n };\n protoOf(Connector).closestWhenUsingTransform = function (ownerTransform, pointWorldSpace) {\n var pointInLocalSpace = ownerTransform.inverseTransformPosition(pointWorldSpace);\n var closestInLocalSpace = this.closest(pointInLocalSpace);\n return ownerTransform.transformPosition(closestInLocalSpace);\n };\n protoOf(Connector).calculateRotation = function (hostTransform, hostConnector, guestTransform) {\n return calculateRotationForGuestToSnapToMe(hostConnector, hostTransform, guestTransform, this);\n };\n protoOf(Connector).calculateEndTransform = function (hostTransform, hostConnector, guestConnectorEntityTransform, guestSnappingRootTransform) {\n var rotation = this.calculateRotation(hostTransform, hostConnector, guestConnectorEntityTransform);\n var movement = calculateMovement(this, hostTransform, hostConnector, guestConnectorEntityTransform, rotation, guestSnappingRootTransform);\n var newWorldPosition = guestSnappingRootTransform.position.plus(movement);\n var newWorldRotation = guestSnappingRootTransform.rotation.times(rotation);\n return new Transform(newWorldPosition, newWorldRotation);\n };\n protoOf(Connector).isOffering = function (tag) {\n return contains(this.offers(), tag);\n };\n protoOf(Connector).isDemanding = function (tag) {\n return contains(this.demands(), tag);\n };\n protoOf(Connector).hasTag = function (tag) {\n return contains(this.tags(), tag);\n };\n protoOf(Connector).findHostConnectorsWithMatchingTags = function (hostConnectors) {\n var tmp1_safe_receiver = hostConnectors == null ? null : hostConnectors.enabledConnectors;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : asSequence_1(tmp1_safe_receiver);\n var tmp;\n if (tmp2_safe_receiver == null) {\n tmp = null;\n } else {\n tmp = filter(tmp2_safe_receiver, Connector$findHostConnectorsWithMatchingTags$lambda(this));\n }\n var tmp3_elvis_lhs = tmp;\n return tmp3_elvis_lhs == null ? emptySequence() : tmp3_elvis_lhs;\n };\n protoOf(Connector).hasMatchingTags = function (offeringConnector) {\n var tmp;\n if (ConnectorType_instance.matches(this.type, offeringConnector.type)) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.all' call\n var indexedObject = this.demands();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connectors.Connector.hasMatchingTags.' call\n if (!offeringConnector.isOffering(element)) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n tmp = tmp$ret$1;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(Connector).containsConnector = function (ownerTransform, guestTransform, guestConnector) {\n var rotationNeededToSnap = guestConnector.calculateRotation(ownerTransform, this, guestTransform);\n if (!rotationNeededToSnap.equals(Companion_getInstance_57().IDENTITY))\n return false;\n var movement = calculateMovement(guestConnector, ownerTransform, this, guestTransform, rotationNeededToSnap, guestTransform);\n return movement.equals(Companion_getInstance_61().ZERO);\n };\n protoOf(Connector).o1x = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.y1w_1;\n allSubConnectors$factory();\n return this_0.u2();\n };\n protoOf(Connector).p1x = function () {\n return this.z1w_1;\n };\n protoOf(Connector).closestSubConnector = function (localSpacePoint) {\n return this;\n };\n protoOf(Connector).closestSubConnectorFromOwnerEntity = function (owner, worldSpacePoint) {\n var positionLocalSpace = get_worldTransform(owner).inverseTransformPosition(worldSpacePoint);\n return this.closestSubConnector(positionLocalSpace);\n };\n protoOf(Connector).getWorldPositionFromOwnerEntity = function (ownerEntity) {\n return this.getWorldPositionFromOwnerTransform(get_worldTransform(ownerEntity));\n };\n protoOf(Connector).getWorldPositionFromOwnerTransform = function (ownerTransform) {\n return ownerTransform.transformPosition(this.transform.position);\n };\n protoOf(Connector).equals = function (other) {\n return this === other;\n };\n protoOf(Connector).hashCode = function () {\n return getStringHashCode(this.key) + this.type | 0;\n };\n protoOf(Connector).getWorldRotation = function (transform) {\n return transform.transformRotation(this.transform.rotation);\n };\n protoOf(Connector).getDeltaTransformToGuestConnectorEntity = function (ownerEntity, guest, guestConnector) {\n return this.getDeltaTransformToGuestConnectorTransform(get_worldTransform(ownerEntity), get_worldTransform(guest), guestConnector);\n };\n protoOf(Connector).getDeltaTransformToGuestConnectorTransform = function (ownerTransform, guestTransform, guestConnector) {\n var hostConnectorTransform = ownerTransform.concatenate(this.transform);\n var guestConnectorTransform = guestTransform.concatenate(guestConnector.transform);\n return guestConnectorTransform.delta(hostConnectorTransform);\n };\n protoOf(Connector).isRotatedUpward = function (ownerEntity) {\n var totalRotation = get_worldRotation(ownerEntity).times(this.transform.rotation);\n var dotProduct = Companion_getInstance_61().UP.rotate(totalRotation).__timesOperatorKotlin(Companion_getInstance_61().UP);\n return dotProduct >= 0.0;\n };\n protoOf(Connector).isInActivationDistance = function (guestTransform, hostConnector, hostTransform) {\n var positionWorldSpace = this.getWorldPositionFromOwnerTransform(guestTransform);\n var closestPointInHostConnector = hostConnector.closestWhenUsingTransform(hostTransform, positionWorldSpace);\n var distance = positionWorldSpace.distanceTo(closestPointInHostConnector);\n return distance <= this.activationDistance + hostConnector.activationDistance;\n };\n function allSubConnectors$factory() {\n return getPropertyCallableRef('allSubConnectors', 1, KProperty1, function (receiver) {\n return receiver.allSubConnectors;\n }, null);\n }\n function ConnectorTagConstants() {\n this.REQUIRE_UPWARD_PARENT = 'requireUpwardParent';\n this.REQUIRE_DOWNWARD_PARENT = 'requireDownwardParent';\n }\n protoOf(ConnectorTagConstants).q1x = function () {\n return this.REQUIRE_UPWARD_PARENT;\n };\n protoOf(ConnectorTagConstants).r1x = function () {\n return this.REQUIRE_DOWNWARD_PARENT;\n };\n var ConnectorTagConstants_instance;\n function ConnectorTagConstants_getInstance() {\n return ConnectorTagConstants_instance;\n }\n function ConnectorType() {\n this.GUEST = 0;\n this.HOST = 1;\n this.ALIGNMENT = 2;\n this.INTERNAL = 3;\n }\n protoOf(ConnectorType).s1x = function () {\n return this.GUEST;\n };\n protoOf(ConnectorType).t1x = function () {\n return this.HOST;\n };\n protoOf(ConnectorType).u1x = function () {\n return this.ALIGNMENT;\n };\n protoOf(ConnectorType).v1x = function () {\n return this.INTERNAL;\n };\n protoOf(ConnectorType).matches = function (demanding, offering) {\n var tmp;\n switch (demanding) {\n case 0:\n tmp = offering === 1;\n break;\n case 1:\n tmp = false;\n break;\n case 2:\n tmp = offering === 2 ? true : offering === 1;\n break;\n case 3:\n tmp = false;\n break;\n default:\n throw IllegalArgumentException_init_$Create$('There are only 4 connector types. Do not try to cheat CORE!');\n }\n return tmp;\n };\n var ConnectorType_instance;\n function ConnectorType_getInstance() {\n return ConnectorType_instance;\n }\n function get_snappingEntitiesSequence(_this__u8e3s4) {\n return ConnectorUtils_instance.snappingEntitiesSequence(_this__u8e3s4);\n }\n function get_snappingEntitiesArray(_this__u8e3s4) {\n return ConnectorUtils_instance.snappingEntitiesArray(_this__u8e3s4);\n }\n function checkRequiredConnectorsOnParts($this, hostPart, guestPart, requiredConnector) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.sequences.any' call\n var tmp0_iterator = requiredConnector.findHostConnectorsWithMatchingTags(get_connectorsComponent(hostPart)).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connectors.ConnectorUtils.checkRequiredConnectorsOnParts.' call\n if (element.containsConnector(get_worldTransform(hostPart), get_worldTransform(guestPart), requiredConnector)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n return tmp$ret$1;\n }\n function findUnfulfilledRequiredConnectors$_anonymous_$_anonymous_$checkHost_pjpnxs($guestPart, $connector, host) {\n return !(findInHierarchyExceptHierarchyOfIgnored(host, $guestPart, ConnectorUtils$findUnfulfilledRequiredConnectors$_anonymous_$_anonymous_$checkHost$lambda_xfnpmt($guestPart, $connector)) == null);\n }\n function ConnectorUtils$snappingEntitiesSequence$lambda(it) {\n Companion_getInstance_23();\n return it.hasComponent(11);\n }\n function ConnectorUtils$snappingEntitiesSequence$lambda_0(it) {\n var tmp;\n var tmp0_safe_receiver = get_connectorsComponent(it);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n if ((tmp1_safe_receiver == null ? null : any_0(tmp1_safe_receiver)) === true) {\n tmp = true;\n } else {\n var tmp2_safe_receiver = get_connectorsComponent(it);\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.alignmentConnectors;\n tmp = (tmp3_safe_receiver == null ? null : any_0(tmp3_safe_receiver)) === true;\n }\n return tmp;\n }\n function ConnectorUtils$findUnfulfilledRequiredConnectors$_anonymous_$_anonymous_$checkHost$lambda_xfnpmt($$guestPart, $$connector) {\n return function (hostPart) {\n return checkRequiredConnectorsOnParts(ConnectorUtils_instance, hostPart, $$guestPart, $$connector);\n };\n }\n function ConnectorUtils() {\n }\n protoOf(ConnectorUtils).snappingEntitiesSequence = function (entity) {\n var tmp = hierarchyExceptSubTreesWithComponentSequence(entity, 47);\n var tmp_0 = filter(tmp, ConnectorUtils$snappingEntitiesSequence$lambda);\n return filter(tmp_0, ConnectorUtils$snappingEntitiesSequence$lambda_0);\n };\n protoOf(ConnectorUtils).snappingEntitiesArray = function (entity) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = hierarchyExceptSubTreesWithComponentArray(entity, 47);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connectors.ConnectorUtils.snappingEntitiesArray.' call\n Companion_getInstance_23();\n if (element.hasComponent(11)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connectors.ConnectorUtils.snappingEntitiesArray.' call\n var tmp;\n var tmp0_safe_receiver = get_connectorsComponent(element_0);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n if ((tmp1_safe_receiver == null ? null : any_0(tmp1_safe_receiver)) === true) {\n tmp = true;\n } else {\n var tmp2_safe_receiver = get_connectorsComponent(element_0);\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.alignmentConnectors;\n tmp = (tmp3_safe_receiver == null ? null : any_0(tmp3_safe_receiver)) === true;\n }\n if (tmp) {\n destination_0.q(element_0);\n }\n }\n return copyToArray(destination_0);\n };\n protoOf(ConnectorUtils).findUnfulfilledRequiredConnectors = function (hosts, guest) {\n var tmp0_safe_receiver = guest.__getComponentForKotlin(Companion_instance_97.id);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.allowedHosts;\n var eligibleHosts = tmp1_elvis_lhs == null ? hosts : tmp1_elvis_lhs;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = hierarchyExceptSubTreesWithComponentArray(guest, 47);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connectors.ConnectorUtils.findUnfulfilledRequiredConnectors.' call\n var tmp0_safe_receiver_0 = get_connectorsComponent(element);\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.requiredConnectors;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.isNotEmpty' call\n tmp = !tmp1_safe_receiver.b1();\n }\n if (tmp === true) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connectors.ConnectorUtils.findUnfulfilledRequiredConnectors.' call\n var tmp0_safe_receiver_1 = get_connectorsComponent(element_0);\n var tmp1_safe_receiver_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.requiredConnectors;\n var tmp_0;\n if (tmp1_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_1 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = tmp1_safe_receiver_0.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.connectors.ConnectorUtils.findUnfulfilledRequiredConnectors..' call\n var tmp_1;\n var tmp$ret$5;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable_0 = 0;\n var last_0 = eligibleHosts.length;\n while (inductionVariable_0 < last_0) {\n var element_2 = eligibleHosts[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.connectors.ConnectorUtils.findUnfulfilledRequiredConnectors...' call\n if (findUnfulfilledRequiredConnectors$_anonymous_$_anonymous_$checkHost_pjpnxs(element_0, element_1, element_2)) {\n tmp$ret$5 = true;\n break $l$block;\n }\n }\n tmp$ret$5 = false;\n }\n if (tmp$ret$5) {\n tmp_1 = true;\n } else {\n tmp_1 = findUnfulfilledRequiredConnectors$_anonymous_$_anonymous_$checkHost_pjpnxs(element_0, element_1, guest);\n }\n var wasFulfilled = tmp_1;\n var tmp_2;\n if (!wasFulfilled) {\n tmp_2 = element_1;\n } else {\n tmp_2 = null;\n }\n var tmp0_safe_receiver_2 = tmp_2;\n if (tmp0_safe_receiver_2 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_1.q(tmp0_safe_receiver_2);\n }\n }\n tmp_0 = destination_1;\n }\n var tmp2_elvis_lhs = tmp_0;\n var unfulfilledConnectors = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;\n var list = unfulfilledConnectors;\n addAll(destination_0, list);\n }\n return copyToArray(destination_0);\n };\n protoOf(ConnectorUtils).isEdgeConnector = function (connector) {\n return connector instanceof EdgeConnector;\n };\n protoOf(ConnectorUtils).isPointConnector = function (connector) {\n return connector instanceof PointConnector;\n };\n protoOf(ConnectorUtils).isPointSeriesConnector = function (connector) {\n return connector instanceof PointSeriesConnector;\n };\n protoOf(ConnectorUtils).isPointSeriesSubConnector = function (connector) {\n return connector instanceof PointSeriesSubConnector;\n };\n protoOf(ConnectorUtils).isSurfaceConnector = function (connector) {\n return connector instanceof SurfaceConnector;\n };\n var ConnectorUtils_instance;\n function ConnectorUtils_getInstance() {\n return ConnectorUtils_instance;\n }\n function Companion_22() {\n Companion_instance_22 = this;\n this.id = 11;\n this.x1x_1 = LoggerState_getInstance().m1m('ConnectorsComponent');\n }\n protoOf(Companion_22).s1k = function () {\n return this.id;\n };\n var Companion_instance_22;\n function Companion_getInstance_23() {\n if (Companion_instance_22 == null)\n new Companion_22();\n return Companion_instance_22;\n }\n function sam$kotlin_Comparator$0_0(function_0) {\n this.y1x_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_0).u1j = function (a, b) {\n return this.y1x_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function sam$kotlin_Comparator$0_1(function_0) {\n this.z1x_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_1).u1j = function (a, b) {\n return this.z1x_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function ConnectorsComponent$hostConnectors$delegate$lambda$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent.hostConnectors$delegate..' call\n var tmp = -a.priority | 0;\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent.hostConnectors$delegate..' call\n var tmp$ret$1 = -b.priority | 0;\n return compareValues(tmp, tmp$ret$1);\n }\n function ConnectorsComponent$hostConnectors$delegate$lambda(this$0) {\n return function () {\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this$0.enabledConnectors;\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent.hostConnectors$delegate..' call\n var tmp = element.type;\n if (tmp === 1) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_0 = ConnectorsComponent$hostConnectors$delegate$lambda$lambda;\n var tmp$ret$3 = new sam$kotlin_Comparator$0_0(tmp_0);\n return sortedWith_0(destination, tmp$ret$3);\n };\n }\n function ConnectorsComponent$guestConnectors$delegate$lambda$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent.guestConnectors$delegate..' call\n var tmp = -a.priority | 0;\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent.guestConnectors$delegate..' call\n var tmp$ret$1 = -b.priority | 0;\n return compareValues(tmp, tmp$ret$1);\n }\n function ConnectorsComponent$guestConnectors$delegate$lambda(this$0) {\n return function () {\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this$0.enabledConnectors;\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent.guestConnectors$delegate..' call\n var tmp = element.type;\n if (tmp === 0) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_0 = ConnectorsComponent$guestConnectors$delegate$lambda$lambda;\n var tmp$ret$3 = new sam$kotlin_Comparator$0_1(tmp_0);\n return sortedWith_0(destination, tmp$ret$3);\n };\n }\n function ConnectorsComponent$alignmentConnectors$delegate$lambda(this$0) {\n return function () {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this$0.enabledConnectors;\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent.alignmentConnectors$delegate..' call\n var tmp = element.type;\n if (tmp === 2) {\n destination.q(element);\n }\n }\n return destination;\n };\n }\n function ConnectorsComponent$requiredConnectors$delegate$lambda(this$0) {\n return function () {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this$0.enabledConnectors;\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent.requiredConnectors$delegate..' call\n if (element.required) {\n destination.q(element);\n }\n }\n return destination;\n };\n }\n function ConnectorsComponent$getConnectorByKey$lambda($connectorKey) {\n return function () {\n return 'Found more than one value when getting connector by key ' + $connectorKey + '. Keys must be uniquely defined in the range.';\n };\n }\n function ConnectorsComponent$getConnectorByKey$lambda_0(it) {\n return it.allSubConnectors;\n }\n function ConnectorsComponent$getConnectorByKey$lambda_1($connectorKey) {\n return function (it) {\n return it.key === $connectorKey;\n };\n }\n function ConnectorsComponent(connectors) {\n Companion_getInstance_23();\n this.connectors = connectors;\n var tmp = this;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.connectors;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent.enabledConnectors.' call\n if (element.enabled) {\n destination.q(element);\n }\n }\n tmp.enabledConnectors = destination;\n var tmp_0 = this;\n tmp_0.o1j_1 = lazy(ConnectorsComponent$hostConnectors$delegate$lambda(this));\n var tmp_1 = this;\n tmp_1.p1j_1 = lazy(ConnectorsComponent$guestConnectors$delegate$lambda(this));\n var tmp_2 = this;\n tmp_2.q1j_1 = lazy(ConnectorsComponent$alignmentConnectors$delegate$lambda(this));\n var tmp_3 = this;\n tmp_3.r1j_1 = lazy(ConnectorsComponent$requiredConnectors$delegate$lambda(this));\n this.requiredConnectorsSequence = asSequence_1(this.requiredConnectors);\n }\n protoOf(ConnectorsComponent).a1y = function () {\n return this.connectors;\n };\n protoOf(ConnectorsComponent).x1k = function () {\n return 11;\n };\n protoOf(ConnectorsComponent).b1y = function () {\n return this.enabledConnectors;\n };\n protoOf(ConnectorsComponent).c1y = function () {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = this.enabledConnectors;\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent..' call\n var list = asIterable(element.tags());\n addAll(destination, list);\n }\n return destination;\n };\n protoOf(ConnectorsComponent).d1y = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.o1j_1;\n hostConnectors$factory();\n return this_0.u2();\n };\n protoOf(ConnectorsComponent).e1y = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.p1j_1;\n guestConnectors$factory();\n return this_0.u2();\n };\n protoOf(ConnectorsComponent).f1y = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.q1j_1;\n alignmentConnectors$factory();\n return this_0.u2();\n };\n protoOf(ConnectorsComponent).g1y = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.r1j_1;\n requiredConnectors$factory();\n return this_0.u2();\n };\n protoOf(ConnectorsComponent).h1y = function () {\n return this.requiredConnectorsSequence;\n };\n protoOf(ConnectorsComponent).eq = function (other) {\n return false;\n };\n protoOf(ConnectorsComponent).getConnectorByKey = function (connectorKey) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.connectors;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent.getConnectorByKey.' call\n if (element.key === connectorKey) {\n destination.q(element);\n }\n }\n var listOfConnectors = destination;\n // Inline function 'kotlin.collections.count' call\n if (listOfConnectors.n() > 1) {\n var tmp = Companion_getInstance_23().x1x_1;\n tmp.error(ConnectorsComponent$getConnectorByKey$lambda(connectorKey));\n } else {\n if (none(listOfConnectors)) {\n var tmp_0 = asSequence_0(this.connectors);\n var tmp_1 = flatMap(tmp_0, ConnectorsComponent$getConnectorByKey$lambda_0);\n listOfConnectors = toList_0(filter(tmp_1, ConnectorsComponent$getConnectorByKey$lambda_1(connectorKey)));\n }\n }\n return firstOrNull_1(listOfConnectors);\n };\n protoOf(ConnectorsComponent).plusConnectors = function (connectorsToAdd) {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$1 = this.connectors.concat(connectorsToAdd);\n return new ConnectorsComponent(tmp$ret$1);\n };\n protoOf(ConnectorsComponent).minusConnectors = function (connectorsToRemove) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.connectors;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connectors.ConnectorsComponent.minusConnectors.' call\n if (!contains(connectorsToRemove, element)) {\n destination.q(element);\n }\n }\n var tmp$ret$3 = copyToArray(destination);\n return new ConnectorsComponent(tmp$ret$3);\n };\n function get_connectorsComponent(_this__u8e3s4) {\n return _this__u8e3s4.__getComponentForKotlin(11);\n }\n function get_connectors(_this__u8e3s4) {\n var tmp0_safe_receiver = get_connectorsComponent(_this__u8e3s4);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.connectors;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n }\n function get_alignmentConnectors(_this__u8e3s4) {\n var tmp0_safe_receiver = get_connectorsComponent(_this__u8e3s4);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.alignmentConnectors;\n }\n function get_hostConnectors(_this__u8e3s4) {\n var tmp0_safe_receiver = get_connectorsComponent(_this__u8e3s4);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectors;\n }\n function get_guestConnectors(_this__u8e3s4) {\n var tmp0_safe_receiver = get_connectorsComponent(_this__u8e3s4);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n }\n function hostConnectors$factory() {\n return getPropertyCallableRef('hostConnectors', 1, KProperty1, function (receiver) {\n return receiver.hostConnectors;\n }, null);\n }\n function guestConnectors$factory() {\n return getPropertyCallableRef('guestConnectors', 1, KProperty1, function (receiver) {\n return receiver.guestConnectors;\n }, null);\n }\n function alignmentConnectors$factory() {\n return getPropertyCallableRef('alignmentConnectors', 1, KProperty1, function (receiver) {\n return receiver.alignmentConnectors;\n }, null);\n }\n function requiredConnectors$factory() {\n return getPropertyCallableRef('requiredConnectors', 1, KProperty1, function (receiver) {\n return receiver.requiredConnectors;\n }, null);\n }\n function Companion_23() {\n this.ID = 'DisableConnectorsSystem';\n }\n protoOf(Companion_23).u1n = function () {\n return this.ID;\n };\n protoOf(Companion_23).updateConnectors = function (entity) {\n Companion_getInstance_23();\n var tmp0_elvis_lhs = entity.__getComponentForKotlin(11);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var connectorsComponent = tmp;\n var tmp1_safe_receiver = entity.__getComponentForKotlin(71);\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.disabledConnectorKeys;\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n var disabledConnectors = tmp_0;\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = connectorsComponent.connectors;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connectors.Companion.updateConnectors.' call\n var it = this_0[i];\n var enable = !contains(disabledConnectors, it.key);\n arr[i] = it.enable(enable);\n }\n while (inductionVariable <= last);\n var updatedConnectors = isArray(arr) ? arr : THROW_CCE();\n entity.addComponent(new ConnectorsComponent(updatedConnectors));\n };\n var Companion_instance_23;\n function Companion_getInstance_24() {\n return Companion_instance_23;\n }\n function DisableConnectorsSystem() {\n SystemBase.call(this, 'DisableConnectorsSystem', 71);\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.q1y_1 = [11];\n }\n protoOf(DisableConnectorsSystem).onAddComponent = function (entity, newComponent) {\n Companion_instance_23.updateConnectors(entity);\n };\n protoOf(DisableConnectorsSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n Companion_instance_23.updateConnectors(entity);\n };\n protoOf(DisableConnectorsSystem).onRemoveComponent = function (entity, oldComponent) {\n Companion_instance_23.updateConnectors(entity);\n };\n protoOf(DisableConnectorsSystem).w1o = function () {\n return this.q1y_1;\n };\n function Companion_24() {\n this.id = 71;\n }\n protoOf(Companion_24).s1k = function () {\n return this.id;\n };\n var Companion_instance_24;\n function Companion_getInstance_25() {\n return Companion_instance_24;\n }\n function DisabledConnectorsComponent(disabledConnectorKeys) {\n this.disabledConnectorKeys = disabledConnectorKeys;\n }\n protoOf(DisabledConnectorsComponent).r1y = function () {\n return this.disabledConnectorKeys;\n };\n protoOf(DisabledConnectorsComponent).x1k = function () {\n return 71;\n };\n protoOf(DisabledConnectorsComponent).eq = function (other) {\n return contentEquals((other instanceof DisabledConnectorsComponent ? other : THROW_CCE()).disabledConnectorKeys, this.disabledConnectorKeys);\n };\n function EdgeConnector(key, type, p1, p2, rotation, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, required) {\n rotation = rotation === VOID ? Companion_getInstance_57().IDENTITY : rotation;\n priority = priority === VOID ? 0 : priority;\n var tmp;\n if (activationDistance === VOID) {\n var tmp_0;\n if (type === 1) {\n tmp_0 = 0.0;\n } else {\n tmp_0 = 200.0;\n }\n tmp = tmp_0;\n } else {\n tmp = activationDistance;\n }\n activationDistance = tmp;\n enabled = enabled === VOID ? true : enabled;\n var tmp_1;\n if (tagArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_1 = [];\n } else {\n tmp_1 = tagArray;\n }\n tagArray = tmp_1;\n var tmp_2;\n if (offersArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_2 = [];\n } else {\n tmp_2 = offersArray;\n }\n offersArray = tmp_2;\n var tmp_3;\n if (demandsArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_3 = [];\n } else {\n tmp_3 = demandsArray;\n }\n demandsArray = tmp_3;\n required = required === VOID ? false : required;\n Connector.call(this);\n this.y1y_1 = key;\n this.z1y_1 = type;\n this.p1 = p1;\n this.p2 = p2;\n this.a1z_1 = rotation;\n this.b1z_1 = priority;\n this.c1z_1 = activationDistance;\n this.d1z_1 = enabled;\n this.e1z_1 = tagArray;\n this.f1z_1 = offersArray;\n this.g1z_1 = demandsArray;\n this.h1z_1 = required;\n var tmp_4 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_4.i1z_1 = [this.p1, this.p2];\n this.j1z_1 = true;\n this.direction = this.p2.minus(this.p1).normalize();\n this.k1z_1 = this.p1.plus(this.p2).div(2.0);\n this.l1z_1 = new Transform(this.k1z_1, this.a1z_1);\n }\n protoOf(EdgeConnector).t2 = function () {\n return this.y1y_1;\n };\n protoOf(EdgeConnector).a1x = function () {\n return this.z1y_1;\n };\n protoOf(EdgeConnector).m1z = function () {\n return this.p1;\n };\n protoOf(EdgeConnector).n1z = function () {\n return this.p2;\n };\n protoOf(EdgeConnector).v1v = function () {\n return this.b1z_1;\n };\n protoOf(EdgeConnector).l1x = function () {\n return this.c1z_1;\n };\n protoOf(EdgeConnector).m1x = function () {\n return this.d1z_1;\n };\n protoOf(EdgeConnector).f1x = function (_set____db54di) {\n this.e1z_1 = _set____db54di;\n };\n protoOf(EdgeConnector).g1x = function () {\n return this.e1z_1;\n };\n protoOf(EdgeConnector).h1x = function (_set____db54di) {\n this.f1z_1 = _set____db54di;\n };\n protoOf(EdgeConnector).i1x = function () {\n return this.f1z_1;\n };\n protoOf(EdgeConnector).j1x = function (_set____db54di) {\n this.g1z_1 = _set____db54di;\n };\n protoOf(EdgeConnector).k1x = function () {\n return this.g1z_1;\n };\n protoOf(EdgeConnector).b1x = function () {\n return this.h1z_1;\n };\n protoOf(EdgeConnector).equalsByValue = function (other) {\n var tmp;\n var tmp_0;\n var tmp_1;\n var tmp_2;\n var tmp_3;\n var tmp_4;\n var tmp_5;\n var tmp_6;\n var tmp_7;\n var tmp_8;\n if (other instanceof EdgeConnector) {\n tmp_8 = other.y1y_1 === this.y1y_1;\n } else {\n tmp_8 = false;\n }\n if (tmp_8) {\n tmp_7 = other.p1.equals(this.p1);\n } else {\n tmp_7 = false;\n }\n if (tmp_7) {\n tmp_6 = other.p2.equals(this.p2);\n } else {\n tmp_6 = false;\n }\n if (tmp_6) {\n tmp_5 = other.a1z_1.equals(this.a1z_1);\n } else {\n tmp_5 = false;\n }\n if (tmp_5) {\n tmp_4 = other.b1z_1 === this.b1z_1;\n } else {\n tmp_4 = false;\n }\n if (tmp_4) {\n tmp_3 = other.c1z_1 === this.c1z_1;\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n tmp_2 = other.d1z_1 === this.d1z_1;\n } else {\n tmp_2 = false;\n }\n if (tmp_2) {\n tmp_1 = contentEquals(other.e1z_1, this.e1z_1);\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp_0 = contentEquals(other.offers(), this.offers());\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = contentEquals(other.demands(), this.demands());\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(EdgeConnector).n1x = function () {\n return this.j1z_1;\n };\n protoOf(EdgeConnector).o1z = function () {\n return this.direction;\n };\n protoOf(EdgeConnector).c1x = function () {\n return 0.0;\n };\n protoOf(EdgeConnector).reposition = function (newPositions) {\n if (newPositions.length < 2) {\n throw IllegalArgumentException_init_$Create$('Can not reposition edge connector with ' + newPositions.length + ' point(s).');\n }\n return this.copy(VOID, VOID, newPositions[0], newPositions[1]);\n };\n protoOf(EdgeConnector).move = function (movementDelta) {\n return this.copy(VOID, VOID, this.p1.plus(movementDelta), this.p2.plus(movementDelta));\n };\n protoOf(EdgeConnector).rotate = function (rotationDelta) {\n return this.copy(VOID, VOID, VOID, VOID, this.a1z_1.times(rotationDelta));\n };\n protoOf(EdgeConnector).enable = function (enable) {\n return this.copy(VOID, VOID, VOID, VOID, VOID, VOID, VOID, enable);\n };\n protoOf(EdgeConnector).d1x = function () {\n return this.l1z_1;\n };\n protoOf(EdgeConnector).closest = function (child) {\n return closestOnEdge(child, this.i1z_1);\n };\n protoOf(EdgeConnector).contains = function (localSpacePoint) {\n return localSpacePoint.pointOnLine(this.p1, this.p2);\n };\n protoOf(EdgeConnector).shift = function (name, transition) {\n return this.copy(name, VOID, this.p1.plus(transition), this.p2.plus(transition));\n };\n protoOf(EdgeConnector).af = function () {\n return this.y1y_1;\n };\n protoOf(EdgeConnector).bf = function () {\n return this.z1y_1;\n };\n protoOf(EdgeConnector).g1k = function () {\n return this.p1;\n };\n protoOf(EdgeConnector).h1k = function () {\n return this.p2;\n };\n protoOf(EdgeConnector).j1k = function () {\n return this.b1z_1;\n };\n protoOf(EdgeConnector).k1k = function () {\n return this.c1z_1;\n };\n protoOf(EdgeConnector).p1z = function () {\n return this.d1z_1;\n };\n protoOf(EdgeConnector).q1z = function () {\n return this.e1z_1;\n };\n protoOf(EdgeConnector).r1z = function () {\n return this.f1z_1;\n };\n protoOf(EdgeConnector).s1z = function () {\n return this.g1z_1;\n };\n protoOf(EdgeConnector).t1z = function () {\n return this.h1z_1;\n };\n protoOf(EdgeConnector).u1z = function (key, type, p1, p2, rotation, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, required) {\n return new EdgeConnector(key, type, p1, p2, rotation, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, required);\n };\n protoOf(EdgeConnector).copy = function (key, type, p1, p2, rotation, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, required, $super) {\n key = key === VOID ? this.y1y_1 : key;\n type = type === VOID ? this.z1y_1 : type;\n p1 = p1 === VOID ? this.p1 : p1;\n p2 = p2 === VOID ? this.p2 : p2;\n rotation = rotation === VOID ? this.a1z_1 : rotation;\n priority = priority === VOID ? this.b1z_1 : priority;\n activationDistance = activationDistance === VOID ? this.c1z_1 : activationDistance;\n enabled = enabled === VOID ? this.d1z_1 : enabled;\n tagArray = tagArray === VOID ? this.e1z_1 : tagArray;\n offersArray = offersArray === VOID ? this.f1z_1 : offersArray;\n demandsArray = demandsArray === VOID ? this.g1z_1 : demandsArray;\n required = required === VOID ? this.h1z_1 : required;\n return this.u1z(key, type, p1, p2, rotation, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, required);\n };\n protoOf(EdgeConnector).toString = function () {\n return 'EdgeConnector(key=' + this.y1y_1 + ', type=' + this.z1y_1 + ', p1=' + this.p1 + ', p2=' + this.p2 + ', rotation=' + this.a1z_1 + ', priority=' + this.b1z_1 + ', activationDistance=' + this.c1z_1 + ', enabled=' + this.d1z_1 + ', tagArray=' + toString(this.e1z_1) + ', offersArray=' + toString(this.f1z_1) + ', demandsArray=' + toString(this.g1z_1) + ', required=' + this.h1z_1 + ')';\n };\n protoOf(EdgeConnector).hashCode = function () {\n var result = getStringHashCode(this.y1y_1);\n result = imul(result, 31) + this.z1y_1 | 0;\n result = imul(result, 31) + this.p1.hashCode() | 0;\n result = imul(result, 31) + this.p2.hashCode() | 0;\n result = imul(result, 31) + this.a1z_1.hashCode() | 0;\n result = imul(result, 31) + this.b1z_1 | 0;\n result = imul(result, 31) + getNumberHashCode(this.c1z_1) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.d1z_1) | 0;\n result = imul(result, 31) + hashCode(this.e1z_1) | 0;\n result = imul(result, 31) + hashCode(this.f1z_1) | 0;\n result = imul(result, 31) + hashCode(this.g1z_1) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.h1z_1) | 0;\n return result;\n };\n protoOf(EdgeConnector).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof EdgeConnector))\n return false;\n var tmp0_other_with_cast = other instanceof EdgeConnector ? other : THROW_CCE();\n if (!(this.y1y_1 === tmp0_other_with_cast.y1y_1))\n return false;\n if (!(this.z1y_1 === tmp0_other_with_cast.z1y_1))\n return false;\n if (!this.p1.equals(tmp0_other_with_cast.p1))\n return false;\n if (!this.p2.equals(tmp0_other_with_cast.p2))\n return false;\n if (!this.a1z_1.equals(tmp0_other_with_cast.a1z_1))\n return false;\n if (!(this.b1z_1 === tmp0_other_with_cast.b1z_1))\n return false;\n if (!equals(this.c1z_1, tmp0_other_with_cast.c1z_1))\n return false;\n if (!(this.d1z_1 === tmp0_other_with_cast.d1z_1))\n return false;\n if (!equals(this.e1z_1, tmp0_other_with_cast.e1z_1))\n return false;\n if (!equals(this.f1z_1, tmp0_other_with_cast.f1z_1))\n return false;\n if (!equals(this.g1z_1, tmp0_other_with_cast.g1z_1))\n return false;\n if (!(this.h1z_1 === tmp0_other_with_cast.h1z_1))\n return false;\n return true;\n };\n function PointConnector(key, type, transform, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, worldSpaceOffsetOnHanging, rotationalDegreeOfFreedom, required) {\n transform = transform === VOID ? Companion_getInstance_60().IDENTITY : transform;\n priority = priority === VOID ? 0 : priority;\n var tmp;\n if (activationDistance === VOID) {\n var tmp_0;\n if (type === 1) {\n tmp_0 = 0.0;\n } else {\n tmp_0 = 200.0;\n }\n tmp = tmp_0;\n } else {\n tmp = activationDistance;\n }\n activationDistance = tmp;\n enabled = enabled === VOID ? true : enabled;\n var tmp_1;\n if (tagArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_1 = [];\n } else {\n tmp_1 = tagArray;\n }\n tagArray = tmp_1;\n var tmp_2;\n if (offersArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_2 = [];\n } else {\n tmp_2 = offersArray;\n }\n offersArray = tmp_2;\n var tmp_3;\n if (demandsArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_3 = [];\n } else {\n tmp_3 = demandsArray;\n }\n demandsArray = tmp_3;\n worldSpaceOffsetOnHanging = worldSpaceOffsetOnHanging === VOID ? 0.0 : worldSpaceOffsetOnHanging;\n rotationalDegreeOfFreedom = rotationalDegreeOfFreedom === VOID ? RotationDegreeOfFreedom_NONE_getInstance().x9_1 : rotationalDegreeOfFreedom;\n required = required === VOID ? false : required;\n Connector.call(this);\n this.b20_1 = key;\n this.c20_1 = type;\n this.d20_1 = transform;\n this.e20_1 = priority;\n this.f20_1 = activationDistance;\n this.g20_1 = enabled;\n this.h20_1 = tagArray;\n this.i20_1 = offersArray;\n this.j20_1 = demandsArray;\n this.k20_1 = worldSpaceOffsetOnHanging;\n this.l20_1 = rotationalDegreeOfFreedom;\n this.m20_1 = required;\n this.n20_1 = false;\n }\n protoOf(PointConnector).t2 = function () {\n return this.b20_1;\n };\n protoOf(PointConnector).a1x = function () {\n return this.c20_1;\n };\n protoOf(PointConnector).d1x = function () {\n return this.d20_1;\n };\n protoOf(PointConnector).v1v = function () {\n return this.e20_1;\n };\n protoOf(PointConnector).l1x = function () {\n return this.f20_1;\n };\n protoOf(PointConnector).m1x = function () {\n return this.g20_1;\n };\n protoOf(PointConnector).f1x = function (_set____db54di) {\n this.h20_1 = _set____db54di;\n };\n protoOf(PointConnector).g1x = function () {\n return this.h20_1;\n };\n protoOf(PointConnector).h1x = function (_set____db54di) {\n this.i20_1 = _set____db54di;\n };\n protoOf(PointConnector).i1x = function () {\n return this.i20_1;\n };\n protoOf(PointConnector).j1x = function (_set____db54di) {\n this.j20_1 = _set____db54di;\n };\n protoOf(PointConnector).k1x = function () {\n return this.j20_1;\n };\n protoOf(PointConnector).c1x = function () {\n return this.k20_1;\n };\n protoOf(PointConnector).e1x = function () {\n return this.l20_1;\n };\n protoOf(PointConnector).b1x = function () {\n return this.m20_1;\n };\n protoOf(PointConnector).equalsByValue = function (other) {\n var tmp;\n var tmp_0;\n var tmp_1;\n var tmp_2;\n var tmp_3;\n var tmp_4;\n var tmp_5;\n var tmp_6;\n if (other instanceof PointConnector) {\n tmp_6 = other.b20_1 === this.b20_1;\n } else {\n tmp_6 = false;\n }\n if (tmp_6) {\n tmp_5 = other.d20_1.equals(this.d20_1);\n } else {\n tmp_5 = false;\n }\n if (tmp_5) {\n tmp_4 = other.e20_1 === this.e20_1;\n } else {\n tmp_4 = false;\n }\n if (tmp_4) {\n tmp_3 = other.f20_1 === this.f20_1;\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n tmp_2 = other.g20_1 === this.g20_1;\n } else {\n tmp_2 = false;\n }\n if (tmp_2) {\n tmp_1 = contentEquals(other.h20_1, this.h20_1);\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp_0 = contentEquals(other.offers(), this.offers());\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = contentEquals(other.demands(), this.demands());\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(PointConnector).n1x = function () {\n return this.n20_1;\n };\n protoOf(PointConnector).move = function (movementDelta) {\n return this.copy(VOID, VOID, (new Transform(movementDelta)).concatenate(this.d20_1));\n };\n protoOf(PointConnector).rotate = function (rotationDelta) {\n return this.copy(VOID, VOID, this.d20_1.copy(VOID, this.d20_1.rotation.times(rotationDelta)));\n };\n protoOf(PointConnector).contains = function (localSpacePoint) {\n return this.d20_1.position.equals(localSpacePoint);\n };\n protoOf(PointConnector).closest = function (child) {\n return this.d20_1.position;\n };\n protoOf(PointConnector).closestWhenUsingTransform = function (ownerTransform, pointWorldSpace) {\n return this.getWorldPositionFromOwnerTransform(ownerTransform);\n };\n protoOf(PointConnector).enable = function (enable) {\n return this.copy(VOID, VOID, VOID, VOID, VOID, enable);\n };\n protoOf(PointConnector).reposition = function (newPositions) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (newPositions.length === 0) {\n throw IllegalArgumentException_init_$Create$('Can not reposition a point connector with 0 points.');\n }\n return this.copy(VOID, VOID, this.d20_1.copy(newPositions[0]));\n };\n protoOf(PointConnector).toString = function () {\n return '' + getKClassFromExpression(this).v6() + ' ' + this.b20_1;\n };\n protoOf(PointConnector).af = function () {\n return this.b20_1;\n };\n protoOf(PointConnector).bf = function () {\n return this.c20_1;\n };\n protoOf(PointConnector).g1k = function () {\n return this.d20_1;\n };\n protoOf(PointConnector).h1k = function () {\n return this.e20_1;\n };\n protoOf(PointConnector).i1k = function () {\n return this.f20_1;\n };\n protoOf(PointConnector).j1k = function () {\n return this.g20_1;\n };\n protoOf(PointConnector).k1k = function () {\n return this.h20_1;\n };\n protoOf(PointConnector).p1z = function () {\n return this.i20_1;\n };\n protoOf(PointConnector).q1z = function () {\n return this.j20_1;\n };\n protoOf(PointConnector).r1z = function () {\n return this.k20_1;\n };\n protoOf(PointConnector).s1z = function () {\n return this.l20_1;\n };\n protoOf(PointConnector).t1z = function () {\n return this.m20_1;\n };\n protoOf(PointConnector).o20 = function (key, type, transform, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, worldSpaceOffsetOnHanging, rotationalDegreeOfFreedom, required) {\n return new PointConnector(key, type, transform, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, worldSpaceOffsetOnHanging, rotationalDegreeOfFreedom, required);\n };\n protoOf(PointConnector).copy = function (key, type, transform, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, worldSpaceOffsetOnHanging, rotationalDegreeOfFreedom, required, $super) {\n key = key === VOID ? this.b20_1 : key;\n type = type === VOID ? this.c20_1 : type;\n transform = transform === VOID ? this.d20_1 : transform;\n priority = priority === VOID ? this.e20_1 : priority;\n activationDistance = activationDistance === VOID ? this.f20_1 : activationDistance;\n enabled = enabled === VOID ? this.g20_1 : enabled;\n tagArray = tagArray === VOID ? this.h20_1 : tagArray;\n offersArray = offersArray === VOID ? this.i20_1 : offersArray;\n demandsArray = demandsArray === VOID ? this.j20_1 : demandsArray;\n worldSpaceOffsetOnHanging = worldSpaceOffsetOnHanging === VOID ? this.k20_1 : worldSpaceOffsetOnHanging;\n rotationalDegreeOfFreedom = rotationalDegreeOfFreedom === VOID ? this.l20_1 : rotationalDegreeOfFreedom;\n required = required === VOID ? this.m20_1 : required;\n return this.o20(key, type, transform, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, worldSpaceOffsetOnHanging, rotationalDegreeOfFreedom, required);\n };\n protoOf(PointConnector).hashCode = function () {\n var result = getStringHashCode(this.b20_1);\n result = imul(result, 31) + this.c20_1 | 0;\n result = imul(result, 31) + this.d20_1.hashCode() | 0;\n result = imul(result, 31) + this.e20_1 | 0;\n result = imul(result, 31) + getNumberHashCode(this.f20_1) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.g20_1) | 0;\n result = imul(result, 31) + hashCode(this.h20_1) | 0;\n result = imul(result, 31) + hashCode(this.i20_1) | 0;\n result = imul(result, 31) + hashCode(this.j20_1) | 0;\n result = imul(result, 31) + getNumberHashCode(this.k20_1) | 0;\n result = imul(result, 31) + this.l20_1 | 0;\n result = imul(result, 31) + getBooleanHashCode(this.m20_1) | 0;\n return result;\n };\n protoOf(PointConnector).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PointConnector))\n return false;\n var tmp0_other_with_cast = other instanceof PointConnector ? other : THROW_CCE();\n if (!(this.b20_1 === tmp0_other_with_cast.b20_1))\n return false;\n if (!(this.c20_1 === tmp0_other_with_cast.c20_1))\n return false;\n if (!this.d20_1.equals(tmp0_other_with_cast.d20_1))\n return false;\n if (!(this.e20_1 === tmp0_other_with_cast.e20_1))\n return false;\n if (!equals(this.f20_1, tmp0_other_with_cast.f20_1))\n return false;\n if (!(this.g20_1 === tmp0_other_with_cast.g20_1))\n return false;\n if (!equals(this.h20_1, tmp0_other_with_cast.h20_1))\n return false;\n if (!equals(this.i20_1, tmp0_other_with_cast.i20_1))\n return false;\n if (!equals(this.j20_1, tmp0_other_with_cast.j20_1))\n return false;\n if (!equals(this.k20_1, tmp0_other_with_cast.k20_1))\n return false;\n if (!(this.l20_1 === tmp0_other_with_cast.l20_1))\n return false;\n if (!(this.m20_1 === tmp0_other_with_cast.m20_1))\n return false;\n return true;\n };\n function _get_direction__hwzary($this) {\n // Inline function 'kotlin.getValue' call\n var this_0 = $this.f21_1;\n direction$factory();\n return this_0.u2();\n }\n function getNumberOfSubConnectors($this, first, last, spacing) {\n return numberToInt(last.minus(first).size / spacing) + 1 | 0;\n }\n function PointSeriesConnector$direction$delegate$lambda(this$0) {\n return function () {\n return !this$0.last.equals(this$0.first) ? this$0.last.minus(this$0.first).normalize() : Companion_getInstance_61().UP;\n };\n }\n function PointSeriesConnector$allSubConnectors$delegate$lambda$lambda(this$0) {\n return function (pos) {\n return new PointSeriesSubConnector(pos, this$0);\n };\n }\n function PointSeriesConnector$allSubConnectors$delegate$lambda(this$0) {\n return function () {\n return map(this$0.j21_1, PointSeriesConnector$allSubConnectors$delegate$lambda$lambda(this$0));\n };\n }\n function PointSeriesConnector(key, type, first, last, rotation, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, worldSpaceOffsetOnHanging, subConnectorSpacing, required) {\n rotation = rotation === VOID ? Companion_getInstance_57().IDENTITY : rotation;\n priority = priority === VOID ? 0 : priority;\n var tmp;\n if (activationDistance === VOID) {\n var tmp_0;\n if (type === 1) {\n tmp_0 = 0.0;\n } else {\n tmp_0 = 200.0;\n }\n tmp = tmp_0;\n } else {\n tmp = activationDistance;\n }\n activationDistance = tmp;\n enabled = enabled === VOID ? true : enabled;\n var tmp_1;\n if (tagArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_1 = [];\n } else {\n tmp_1 = tagArray;\n }\n tagArray = tmp_1;\n var tmp_2;\n if (offersArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_2 = [];\n } else {\n tmp_2 = offersArray;\n }\n offersArray = tmp_2;\n var tmp_3;\n if (demandsArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_3 = [];\n } else {\n tmp_3 = demandsArray;\n }\n demandsArray = tmp_3;\n worldSpaceOffsetOnHanging = worldSpaceOffsetOnHanging === VOID ? 0.0 : worldSpaceOffsetOnHanging;\n subConnectorSpacing = subConnectorSpacing === VOID ? 30.0 : subConnectorSpacing;\n required = required === VOID ? false : required;\n Connector.call(this);\n this.v20_1 = key;\n this.w20_1 = type;\n this.first = first;\n this.last = last;\n this.rotation = rotation;\n this.x20_1 = priority;\n this.y20_1 = activationDistance;\n this.z20_1 = enabled;\n this.a21_1 = tagArray;\n this.b21_1 = offersArray;\n this.c21_1 = demandsArray;\n this.d21_1 = worldSpaceOffsetOnHanging;\n this.subConnectorSpacing = subConnectorSpacing;\n this.e21_1 = required;\n this.subConnectorCount = getNumberOfSubConnectors(this, this.first, this.last, this.subConnectorSpacing);\n var tmp_4 = this;\n tmp_4.f21_1 = lazy(PointSeriesConnector$direction$delegate$lambda(this));\n this.g21_1 = _get_direction__hwzary(this).times(this.subConnectorSpacing);\n this.h21_1 = this.last.minus(this.first).size;\n this.i21_1 = false;\n this.j21_1 = asSequence_1(until(0, this.subConnectorCount));\n this.k21_1 = this.offset(this.subConnectorCount / 2 | 0);\n this.l21_1 = new Transform(this.k21_1, this.rotation);\n this.m21_1 = true;\n var tmp_5 = this;\n tmp_5.n21_1 = lazy(PointSeriesConnector$allSubConnectors$delegate$lambda(this));\n }\n protoOf(PointSeriesConnector).t2 = function () {\n return this.v20_1;\n };\n protoOf(PointSeriesConnector).a1x = function () {\n return this.w20_1;\n };\n protoOf(PointSeriesConnector).o21 = function () {\n return this.first;\n };\n protoOf(PointSeriesConnector).p21 = function () {\n return this.last;\n };\n protoOf(PointSeriesConnector).v1k = function () {\n return this.rotation;\n };\n protoOf(PointSeriesConnector).v1v = function () {\n return this.x20_1;\n };\n protoOf(PointSeriesConnector).l1x = function () {\n return this.y20_1;\n };\n protoOf(PointSeriesConnector).m1x = function () {\n return this.z20_1;\n };\n protoOf(PointSeriesConnector).f1x = function (_set____db54di) {\n this.a21_1 = _set____db54di;\n };\n protoOf(PointSeriesConnector).g1x = function () {\n return this.a21_1;\n };\n protoOf(PointSeriesConnector).h1x = function (_set____db54di) {\n this.b21_1 = _set____db54di;\n };\n protoOf(PointSeriesConnector).i1x = function () {\n return this.b21_1;\n };\n protoOf(PointSeriesConnector).j1x = function (_set____db54di) {\n this.c21_1 = _set____db54di;\n };\n protoOf(PointSeriesConnector).k1x = function () {\n return this.c21_1;\n };\n protoOf(PointSeriesConnector).c1x = function () {\n return this.d21_1;\n };\n protoOf(PointSeriesConnector).q21 = function () {\n return this.subConnectorSpacing;\n };\n protoOf(PointSeriesConnector).b1x = function () {\n return this.e21_1;\n };\n protoOf(PointSeriesConnector).equalsByValue = function (other) {\n var tmp;\n var tmp_0;\n var tmp_1;\n var tmp_2;\n var tmp_3;\n var tmp_4;\n var tmp_5;\n var tmp_6;\n var tmp_7;\n var tmp_8;\n if (other instanceof PointSeriesConnector) {\n tmp_8 = other.v20_1 === this.v20_1;\n } else {\n tmp_8 = false;\n }\n if (tmp_8) {\n tmp_7 = other.first.equals(this.first);\n } else {\n tmp_7 = false;\n }\n if (tmp_7) {\n tmp_6 = other.last.equals(this.last);\n } else {\n tmp_6 = false;\n }\n if (tmp_6) {\n tmp_5 = other.rotation.equals(this.rotation);\n } else {\n tmp_5 = false;\n }\n if (tmp_5) {\n tmp_4 = other.x20_1 === this.x20_1;\n } else {\n tmp_4 = false;\n }\n if (tmp_4) {\n tmp_3 = other.y20_1 === this.y20_1;\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n tmp_2 = other.z20_1 === this.z20_1;\n } else {\n tmp_2 = false;\n }\n if (tmp_2) {\n tmp_1 = contentEquals(other.a21_1, this.a21_1);\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp_0 = contentEquals(other.offers(), this.offers());\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = contentEquals(other.demands(), this.demands());\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(PointSeriesConnector).r21 = function () {\n return this.subConnectorCount;\n };\n protoOf(PointSeriesConnector).n1x = function () {\n return this.i21_1;\n };\n protoOf(PointSeriesConnector).d1x = function () {\n return this.l21_1;\n };\n protoOf(PointSeriesConnector).p1x = function () {\n return this.m21_1;\n };\n protoOf(PointSeriesConnector).reposition = function (newPositions) {\n if (newPositions.length < 2) {\n throw IllegalArgumentException_init_$Create$('Can not reposition point series connector with ' + newPositions.length + ' point(s).');\n }\n var newFirst = newPositions[0];\n var newLast = newPositions[1];\n var subConnectorCount = getNumberOfSubConnectors(this, newFirst, newLast, this.subConnectorSpacing);\n var step = newLast.minus(newFirst).normalize().times(this.subConnectorSpacing);\n var calculatedLast = newFirst.plus(step.__timesIntForKotlin(subConnectorCount - 1 | 0));\n return this.copy(VOID, VOID, newFirst, calculatedLast, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.subConnectorSpacing);\n };\n protoOf(PointSeriesConnector).move = function (movementDelta) {\n return this.copy(VOID, VOID, this.first.plus(movementDelta), this.last.plus(movementDelta));\n };\n protoOf(PointSeriesConnector).rotate = function (rotationDelta) {\n return this.copy(VOID, VOID, VOID, VOID, this.rotation.times(rotationDelta));\n };\n protoOf(PointSeriesConnector).contains = function (localSpacePoint) {\n var lengthToConnection = localSpacePoint.minus(this.first).size;\n if (lengthToConnection > this.h21_1)\n return false;\n var steps = round(lengthToConnection / this.subConnectorSpacing);\n var diffVec = this.first.plus(this.g21_1.times(steps)).minus(localSpacePoint);\n return diffVec.equals(Companion_getInstance_61().ZERO);\n };\n protoOf(PointSeriesConnector).enable = function (enable) {\n return this.copy(VOID, VOID, VOID, VOID, VOID, VOID, VOID, enable);\n };\n protoOf(PointSeriesConnector).closest = function (child) {\n if (child.equals(this.first))\n return this.first;\n if (this.first.equals(this.last))\n return this.first;\n var projection = child.minus(this.first).size * (child.minus(this.first).__timesOperatorKotlin(this.last.minus(this.first)) / (child.minus(this.first).size * this.last.minus(this.first).size));\n var connectionPoint = round(projection / this.subConnectorSpacing);\n var closest = connectionPoint < 0.0 ? 0.0 : connectionPoint >= this.subConnectorCount ? this.subConnectorCount - 1 : connectionPoint;\n return this.last.minus(this.first).div(this.last.minus(this.first).size).times(closest).times(this.subConnectorSpacing).plus(this.first);\n };\n protoOf(PointSeriesConnector).shift = function (name, transition) {\n return this.copy(name, VOID, transition.plus(this.first), this.last.plus(transition));\n };\n protoOf(PointSeriesConnector).offset = function (offset) {\n if (this.first.equals(this.last))\n return Companion_getInstance_61().ZERO;\n return this.last.minus(this.first).setSize(1.0).times(this.subConnectorSpacing * offset);\n };\n protoOf(PointSeriesConnector).o1x = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.n21_1;\n allSubConnectors$factory_0();\n return this_0.u2();\n };\n protoOf(PointSeriesConnector).closestSubConnector = function (localSpacePoint) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.sequences.minByOrNull' call\n var iterator = this.j21_1.t();\n if (!iterator.u()) {\n tmp$ret$0 = null;\n break $l$block_0;\n }\n var minElem = iterator.w();\n if (!iterator.u()) {\n tmp$ret$0 = minElem;\n break $l$block_0;\n }\n // Inline function 'com.ikea.core.connectors.PointSeriesConnector.closestSubConnector.' call\n var it = minElem;\n var minValue = this.getSubConnectorPosition(it).distanceTo(localSpacePoint);\n do {\n var e = iterator.w();\n // Inline function 'com.ikea.core.connectors.PointSeriesConnector.closestSubConnector.' call\n var v = this.getSubConnectorPosition(e).distanceTo(localSpacePoint);\n if (compareTo(minValue, v) > 0) {\n minElem = e;\n minValue = v;\n }\n }\n while (iterator.u());\n tmp$ret$0 = minElem;\n }\n var tmp0_elvis_lhs = tmp$ret$0;\n var pos = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;\n return new PointSeriesSubConnector(pos, this);\n };\n protoOf(PointSeriesConnector).getSubConnectorPosition = function (subConnectorIndex) {\n return this.first.plus(this.g21_1.__timesIntForKotlin(subConnectorIndex));\n };\n protoOf(PointSeriesConnector).af = function () {\n return this.v20_1;\n };\n protoOf(PointSeriesConnector).bf = function () {\n return this.w20_1;\n };\n protoOf(PointSeriesConnector).g1k = function () {\n return this.first;\n };\n protoOf(PointSeriesConnector).h1k = function () {\n return this.last;\n };\n protoOf(PointSeriesConnector).i1k = function () {\n return this.rotation;\n };\n protoOf(PointSeriesConnector).j1k = function () {\n return this.x20_1;\n };\n protoOf(PointSeriesConnector).k1k = function () {\n return this.y20_1;\n };\n protoOf(PointSeriesConnector).p1z = function () {\n return this.z20_1;\n };\n protoOf(PointSeriesConnector).q1z = function () {\n return this.a21_1;\n };\n protoOf(PointSeriesConnector).r1z = function () {\n return this.b21_1;\n };\n protoOf(PointSeriesConnector).s1z = function () {\n return this.c21_1;\n };\n protoOf(PointSeriesConnector).t1z = function () {\n return this.d21_1;\n };\n protoOf(PointSeriesConnector).s21 = function () {\n return this.subConnectorSpacing;\n };\n protoOf(PointSeriesConnector).t21 = function () {\n return this.e21_1;\n };\n protoOf(PointSeriesConnector).u21 = function (key, type, first, last, rotation, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, worldSpaceOffsetOnHanging, subConnectorSpacing, required) {\n return new PointSeriesConnector(key, type, first, last, rotation, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, worldSpaceOffsetOnHanging, subConnectorSpacing, required);\n };\n protoOf(PointSeriesConnector).copy = function (key, type, first, last, rotation, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, worldSpaceOffsetOnHanging, subConnectorSpacing, required, $super) {\n key = key === VOID ? this.v20_1 : key;\n type = type === VOID ? this.w20_1 : type;\n first = first === VOID ? this.first : first;\n last = last === VOID ? this.last : last;\n rotation = rotation === VOID ? this.rotation : rotation;\n priority = priority === VOID ? this.x20_1 : priority;\n activationDistance = activationDistance === VOID ? this.y20_1 : activationDistance;\n enabled = enabled === VOID ? this.z20_1 : enabled;\n tagArray = tagArray === VOID ? this.a21_1 : tagArray;\n offersArray = offersArray === VOID ? this.b21_1 : offersArray;\n demandsArray = demandsArray === VOID ? this.c21_1 : demandsArray;\n worldSpaceOffsetOnHanging = worldSpaceOffsetOnHanging === VOID ? this.d21_1 : worldSpaceOffsetOnHanging;\n subConnectorSpacing = subConnectorSpacing === VOID ? this.subConnectorSpacing : subConnectorSpacing;\n required = required === VOID ? this.e21_1 : required;\n return this.u21(key, type, first, last, rotation, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, worldSpaceOffsetOnHanging, subConnectorSpacing, required);\n };\n protoOf(PointSeriesConnector).toString = function () {\n return 'PointSeriesConnector(key=' + this.v20_1 + ', type=' + this.w20_1 + ', first=' + this.first + ', last=' + this.last + ', rotation=' + this.rotation + ', priority=' + this.x20_1 + ', activationDistance=' + this.y20_1 + ', enabled=' + this.z20_1 + ', tagArray=' + toString(this.a21_1) + ', offersArray=' + toString(this.b21_1) + ', demandsArray=' + toString(this.c21_1) + ', worldSpaceOffsetOnHanging=' + this.d21_1 + ', subConnectorSpacing=' + this.subConnectorSpacing + ', required=' + this.e21_1 + ')';\n };\n protoOf(PointSeriesConnector).hashCode = function () {\n var result = getStringHashCode(this.v20_1);\n result = imul(result, 31) + this.w20_1 | 0;\n result = imul(result, 31) + this.first.hashCode() | 0;\n result = imul(result, 31) + this.last.hashCode() | 0;\n result = imul(result, 31) + this.rotation.hashCode() | 0;\n result = imul(result, 31) + this.x20_1 | 0;\n result = imul(result, 31) + getNumberHashCode(this.y20_1) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.z20_1) | 0;\n result = imul(result, 31) + hashCode(this.a21_1) | 0;\n result = imul(result, 31) + hashCode(this.b21_1) | 0;\n result = imul(result, 31) + hashCode(this.c21_1) | 0;\n result = imul(result, 31) + getNumberHashCode(this.d21_1) | 0;\n result = imul(result, 31) + getNumberHashCode(this.subConnectorSpacing) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.e21_1) | 0;\n return result;\n };\n protoOf(PointSeriesConnector).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PointSeriesConnector))\n return false;\n var tmp0_other_with_cast = other instanceof PointSeriesConnector ? other : THROW_CCE();\n if (!(this.v20_1 === tmp0_other_with_cast.v20_1))\n return false;\n if (!(this.w20_1 === tmp0_other_with_cast.w20_1))\n return false;\n if (!this.first.equals(tmp0_other_with_cast.first))\n return false;\n if (!this.last.equals(tmp0_other_with_cast.last))\n return false;\n if (!this.rotation.equals(tmp0_other_with_cast.rotation))\n return false;\n if (!(this.x20_1 === tmp0_other_with_cast.x20_1))\n return false;\n if (!equals(this.y20_1, tmp0_other_with_cast.y20_1))\n return false;\n if (!(this.z20_1 === tmp0_other_with_cast.z20_1))\n return false;\n if (!equals(this.a21_1, tmp0_other_with_cast.a21_1))\n return false;\n if (!equals(this.b21_1, tmp0_other_with_cast.b21_1))\n return false;\n if (!equals(this.c21_1, tmp0_other_with_cast.c21_1))\n return false;\n if (!equals(this.d21_1, tmp0_other_with_cast.d21_1))\n return false;\n if (!equals(this.subConnectorSpacing, tmp0_other_with_cast.subConnectorSpacing))\n return false;\n if (!(this.e21_1 === tmp0_other_with_cast.e21_1))\n return false;\n return true;\n };\n function direction$factory() {\n return getPropertyCallableRef('direction', 1, KProperty1, function (receiver) {\n return _get_direction__hwzary(receiver);\n }, null);\n }\n function allSubConnectors$factory_0() {\n return getPropertyCallableRef('allSubConnectors', 1, KProperty1, function (receiver) {\n return receiver.allSubConnectors;\n }, null);\n }\n function PointSeriesSubConnector$_init_$ref_dzni41() {\n var l = function (p0, p1) {\n return new PointSeriesSubConnector(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function PointSeriesSubConnector$_init_$ref_dzni41_0() {\n var l = function (p0, p1) {\n return new PointSeriesSubConnector(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function PointSeriesSubConnector$_init_$ref_dzni41_1() {\n var l = function (p0, p1) {\n return new PointSeriesSubConnector(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function PointSeriesSubConnector(hole, series) {\n Connector.call(this);\n this.hole = hole;\n this.series = series;\n this.positionInSeries = this.series.getSubConnectorPosition(this.hole);\n this.h1v_1 = new PointConnector(this.series.v20_1 + '-' + this.hole, this.series.w20_1, new Transform(this.positionInSeries, this.series.rotation), this.series.x20_1, this.series.y20_1, this.series.z20_1, this.series.tags());\n this.i1v_1 = this.series.e21_1;\n this.j1v_1 = this.h1v_1.d20_1;\n this.k1v_1 = this.h1v_1.g20_1;\n this.l1v_1 = this.h1v_1.n20_1;\n }\n protoOf(PointSeriesSubConnector).v21 = function () {\n return this.hole;\n };\n protoOf(PointSeriesSubConnector).w21 = function () {\n return this.series;\n };\n protoOf(PointSeriesSubConnector).x21 = function () {\n return this.positionInSeries;\n };\n protoOf(PointSeriesSubConnector).t2 = function () {\n return this.h1v_1.b20_1;\n };\n protoOf(PointSeriesSubConnector).a1x = function () {\n return this.series.w20_1;\n };\n protoOf(PointSeriesSubConnector).b1x = function () {\n return this.i1v_1;\n };\n protoOf(PointSeriesSubConnector).c1x = function () {\n return this.h1v_1.k20_1;\n };\n protoOf(PointSeriesSubConnector).contains = function (localSpacePoint) {\n return this.h1v_1.contains(localSpacePoint);\n };\n protoOf(PointSeriesSubConnector).enable = function (enable) {\n return this.h1v_1.enable(enable);\n };\n protoOf(PointSeriesSubConnector).d1x = function () {\n return this.j1v_1;\n };\n protoOf(PointSeriesSubConnector).tags = function () {\n return this.h1v_1.tags();\n };\n protoOf(PointSeriesSubConnector).offers = function () {\n return this.series.offers();\n };\n protoOf(PointSeriesSubConnector).demands = function () {\n return this.series.demands();\n };\n protoOf(PointSeriesSubConnector).l1x = function () {\n return this.h1v_1.f20_1;\n };\n protoOf(PointSeriesSubConnector).m1x = function () {\n return this.k1v_1;\n };\n protoOf(PointSeriesSubConnector).n1x = function () {\n return this.l1v_1;\n };\n protoOf(PointSeriesSubConnector).closest = function (child) {\n return this.h1v_1.closest(child);\n };\n protoOf(PointSeriesSubConnector).v1v = function () {\n return this.h1v_1.e20_1;\n };\n protoOf(PointSeriesSubConnector).move = function (movementDelta) {\n throw UnsupportedOperationException_init_$Create$('' + PointSeriesSubConnector$_init_$ref_dzni41() + ' is not allowed to move, any changes must be applied to its ' + series$factory(this));\n };\n protoOf(PointSeriesSubConnector).rotate = function (rotationDelta) {\n throw UnsupportedOperationException_init_$Create$('' + PointSeriesSubConnector$_init_$ref_dzni41_0() + ' is not allowed to move, any changes must be applied to its ' + series$factory_0(this));\n };\n protoOf(PointSeriesSubConnector).reposition = function (newPositions) {\n throw UnsupportedOperationException_init_$Create$('' + PointSeriesSubConnector$_init_$ref_dzni41_1() + ' is not allowed to move, any changes must be applied to its ' + series$factory_1(this));\n };\n protoOf(PointSeriesSubConnector).toString = function () {\n return '' + getKClassFromExpression(this).v6() + ' ' + this.key;\n };\n protoOf(PointSeriesSubConnector).equalsByValue = function (other) {\n var tmp;\n var tmp_0;\n var tmp_1;\n if (other instanceof PointSeriesSubConnector) {\n tmp_1 = other.h1v_1.equalsByValue(this.h1v_1);\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp_0 = other.positionInSeries.equals(this.positionInSeries);\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = other.series.equalsByValue(this.series);\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(PointSeriesSubConnector).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof PointSeriesSubConnector))\n THROW_CCE();\n if (!(this.hole === other.hole))\n return false;\n if (!this.series.equals(other.series))\n return false;\n return true;\n };\n protoOf(PointSeriesSubConnector).hashCode = function () {\n var result = protoOf(Connector).hashCode.call(this);\n result = imul(31, result) + this.hole | 0;\n result = imul(31, result) + this.series.hashCode() | 0;\n return result;\n };\n protoOf(PointSeriesSubConnector).af = function () {\n return this.hole;\n };\n protoOf(PointSeriesSubConnector).bf = function () {\n return this.series;\n };\n protoOf(PointSeriesSubConnector).y21 = function (hole, series) {\n return new PointSeriesSubConnector(hole, series);\n };\n protoOf(PointSeriesSubConnector).copy = function (hole, series, $super) {\n hole = hole === VOID ? this.hole : hole;\n series = series === VOID ? this.series : series;\n return this.y21(hole, series);\n };\n function series$factory($b0) {\n return getPropertyCallableRef('series', 0, KProperty0, function () {\n return $b0.series;\n }, null);\n }\n function series$factory_0($b0) {\n return getPropertyCallableRef('series', 0, KProperty0, function () {\n return $b0.series;\n }, null);\n }\n function series$factory_1($b0) {\n return getPropertyCallableRef('series', 0, KProperty0, function () {\n return $b0.series;\n }, null);\n }\n function RelativeConnectorData(connectorKey, relativePositions) {\n this.connectorKey = connectorKey;\n this.relativePositions = relativePositions;\n }\n protoOf(RelativeConnectorData).z21 = function () {\n return this.connectorKey;\n };\n protoOf(RelativeConnectorData).a22 = function () {\n return this.relativePositions;\n };\n protoOf(RelativeConnectorData).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof RelativeConnectorData))\n THROW_CCE();\n if (!(this.connectorKey === other.connectorKey))\n return false;\n return true;\n };\n protoOf(RelativeConnectorData).hashCode = function () {\n return getStringHashCode(this.connectorKey);\n };\n protoOf(RelativeConnectorData).af = function () {\n return this.connectorKey;\n };\n protoOf(RelativeConnectorData).bf = function () {\n return this.relativePositions;\n };\n protoOf(RelativeConnectorData).b22 = function (connectorKey, relativePositions) {\n return new RelativeConnectorData(connectorKey, relativePositions);\n };\n protoOf(RelativeConnectorData).copy = function (connectorKey, relativePositions, $super) {\n connectorKey = connectorKey === VOID ? this.connectorKey : connectorKey;\n relativePositions = relativePositions === VOID ? this.relativePositions : relativePositions;\n return this.b22(connectorKey, relativePositions);\n };\n protoOf(RelativeConnectorData).toString = function () {\n return 'RelativeConnectorData(connectorKey=' + this.connectorKey + ', relativePositions=' + toString(this.relativePositions) + ')';\n };\n function productBounds($this, entity) {\n return Companion_instance_9.objectOrientedBoundingBoxForAssemblyHierarchy(entity).axisAlignedBoundingBox;\n }\n function RelativeConnectorRepositioner() {\n }\n protoOf(RelativeConnectorRepositioner).repositionRelativeConnectorsFromBounds = function (entity) {\n var tmp0_elvis_lhs = get_relativeConnectorsComponent(entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var relativeConnectors = tmp;\n var bounds = productBounds(this, entity);\n if ((bounds.width === 0.0 ? bounds.height === 0.0 : false) ? bounds.depth === 0.0 : false)\n return Unit_instance;\n var newSnappableComponent = this.repositionRelativeConnectors(get_connectorsComponent(entity), relativeConnectors, bounds);\n if (!(newSnappableComponent == null)) {\n entity.addComponent(newSnappableComponent);\n }\n };\n protoOf(RelativeConnectorRepositioner).repositionRelativeConnectors = function (connectorsComponent, relativeConnectorsComponent, aabb) {\n var tmp;\n if (connectorsComponent == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.connectors.RelativeConnectorRepositioner.repositionRelativeConnectors.' call\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = connectorsComponent.connectors;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var tmp$ret$4;\n $l$block_0: {\n // Inline function 'com.ikea.core.connectors.RelativeConnectorRepositioner.repositionRelativeConnectors..' call\n var connector = this_0[i];\n // Inline function 'kotlin.collections.find' call\n var this_1 = relativeConnectorsComponent.connectors;\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var element = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.connectors.RelativeConnectorRepositioner.repositionRelativeConnectors...' call\n if (element.connectorKey === connector.key) {\n tmp$ret$2 = element;\n break $l$block;\n }\n }\n tmp$ret$2 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$2;\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n tmp$ret$4 = connector;\n break $l$block_0;\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n var relativeConnectorInfo = tmp_0;\n tmp$ret$4 = RelativeConnectorRepositioner_instance.repositionConnector(connector, relativeConnectorInfo, aabb);\n }\n arr[i] = tmp$ret$4;\n }\n while (inductionVariable <= last);\n tmp = isArray(arr) ? arr : THROW_CCE();\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_1;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp1_elvis_lhs;\n }\n var translatedConnectors = tmp_1;\n var tmp_2;\n var tmp_3;\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(translatedConnectors.length === 0)) {\n tmp_3 = !(connectorsComponent == null);\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n tmp_2 = new ConnectorsComponent(translatedConnectors);\n } else {\n tmp_2 = connectorsComponent;\n }\n return tmp_2;\n };\n protoOf(RelativeConnectorRepositioner).repositionConnector = function (connector, relativeConnectorData, aabb) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = relativeConnectorData.relativePositions;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connectors.RelativeConnectorRepositioner.repositionConnector.' call\n var tmp$ret$0 = item.applyToBox(aabb);\n destination.q(tmp$ret$0);\n }\n var movedConnectorPoints = copyToArray(destination);\n var newConnector = connector.reposition(movedConnectorPoints);\n var tmp;\n if (newConnector.equalsByValue(connector)) {\n tmp = connector;\n } else {\n tmp = newConnector;\n }\n return tmp;\n };\n protoOf(RelativeConnectorRepositioner).localBounds = function (entity) {\n return get_objectOrientedBoundingBoxForHierarchy(entity).axisAlignedBoundingBox;\n };\n var RelativeConnectorRepositioner_instance;\n function RelativeConnectorRepositioner_getInstance() {\n return RelativeConnectorRepositioner_instance;\n }\n function Companion_25() {\n this.id = 42;\n }\n protoOf(Companion_25).s1k = function () {\n return this.id;\n };\n var Companion_instance_25;\n function Companion_getInstance_26() {\n return Companion_instance_25;\n }\n function RelativeConnectorsComponent(connectors) {\n this.connectors = connectors;\n this.c22_1 = 42;\n this.d22_1 = 0;\n }\n protoOf(RelativeConnectorsComponent).a1y = function () {\n return this.connectors;\n };\n protoOf(RelativeConnectorsComponent).x1k = function () {\n return this.c22_1;\n };\n protoOf(RelativeConnectorsComponent).eq = function (other) {\n return false;\n };\n protoOf(RelativeConnectorsComponent).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof RelativeConnectorsComponent))\n THROW_CCE();\n if (!contentEquals(this.connectors, other.connectors))\n return false;\n return true;\n };\n protoOf(RelativeConnectorsComponent).hashCode = function () {\n if (this.d22_1 === 0) {\n this.d22_1 = contentHashCode(this.connectors);\n }\n return this.d22_1;\n };\n protoOf(RelativeConnectorsComponent).af = function () {\n return this.connectors;\n };\n protoOf(RelativeConnectorsComponent).e22 = function (connectors) {\n return new RelativeConnectorsComponent(connectors);\n };\n protoOf(RelativeConnectorsComponent).copy = function (connectors, $super) {\n connectors = connectors === VOID ? this.connectors : connectors;\n return this.e22(connectors);\n };\n protoOf(RelativeConnectorsComponent).toString = function () {\n return 'RelativeConnectorsComponent(connectors=' + toString(this.connectors) + ')';\n };\n function get_relativeConnectorsComponent(_this__u8e3s4) {\n return _this__u8e3s4.__getComponentForKotlin(42);\n }\n var RotationDegreeOfFreedom_NONE_instance;\n var RotationDegreeOfFreedom_ONE_instance;\n function values_0() {\n return [RotationDegreeOfFreedom_NONE_getInstance(), RotationDegreeOfFreedom_ONE_getInstance()];\n }\n function valueOf_0(value) {\n switch (value) {\n case 'NONE':\n return RotationDegreeOfFreedom_NONE_getInstance();\n case 'ONE':\n return RotationDegreeOfFreedom_ONE_getInstance();\n default:\n RotationDegreeOfFreedom_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var RotationDegreeOfFreedom_entriesInitialized;\n function RotationDegreeOfFreedom_initEntries() {\n if (RotationDegreeOfFreedom_entriesInitialized)\n return Unit_instance;\n RotationDegreeOfFreedom_entriesInitialized = true;\n RotationDegreeOfFreedom_NONE_instance = new RotationDegreeOfFreedom('NONE', 0);\n RotationDegreeOfFreedom_ONE_instance = new RotationDegreeOfFreedom('ONE', 1);\n }\n function RotationDegreeOfFreedom(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function RotationDegreeOfFreedomImpostor() {\n this.NONE = 0;\n this.ONE = 1;\n }\n protoOf(RotationDegreeOfFreedomImpostor).h22 = function () {\n return this.NONE;\n };\n protoOf(RotationDegreeOfFreedomImpostor).i22 = function () {\n return this.ONE;\n };\n var RotationDegreeOfFreedomImpostor_instance;\n function RotationDegreeOfFreedomImpostor_getInstance() {\n return RotationDegreeOfFreedomImpostor_instance;\n }\n function RotationDegreeOfFreedom_NONE_getInstance() {\n RotationDegreeOfFreedom_initEntries();\n return RotationDegreeOfFreedom_NONE_instance;\n }\n function RotationDegreeOfFreedom_ONE_getInstance() {\n RotationDegreeOfFreedom_initEntries();\n return RotationDegreeOfFreedom_ONE_instance;\n }\n function validateNoCollinearPointsInSurfaceConnector($this) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var listOfVerticesToRemove = ArrayList_init_$Create$();\n var previousIndex = $this.vertices.length - 1 | 0;\n var inductionVariable = 0;\n var last = $this.vertices.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if ($this.vertices[index].minus($this.vertices[previousIndex]).cross($this.vertices[(index + 1 | 0) % $this.vertices.length | 0].minus($this.vertices[index])).size < 0.001) {\n var tmp = Companion_getInstance_27().logger;\n tmp.warn(SurfaceConnector$validateNoCollinearPointsInSurfaceConnector$lambda(index));\n listOfVerticesToRemove.q(index);\n }\n previousIndex = index;\n }\n while (inductionVariable <= last);\n var tmp_0 = $this;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_indices($this.vertices);\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.connectors.SurfaceConnector.validateNoCollinearPointsInSurfaceConnector.' call\n if (!listOfVerticesToRemove.p(element)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.connectors.SurfaceConnector.validateNoCollinearPointsInSurfaceConnector.' call\n var tmp$ret$4 = $this.vertices[item];\n destination_0.q(tmp$ret$4);\n }\n tmp_0.vertices = copyToArray(destination_0);\n }\n function Companion_26() {\n Companion_instance_26 = this;\n this.logger = LoggerState_getInstance().m1m('Surface Connector');\n }\n protoOf(Companion_26).x1i = function () {\n return this.logger;\n };\n var Companion_instance_26;\n function Companion_getInstance_27() {\n if (Companion_instance_26 == null)\n new Companion_26();\n return Companion_instance_26;\n }\n function SurfaceConnector$validateNoCollinearPointsInSurfaceConnector$lambda($index) {\n return function () {\n return 'Vertex supplied to surface connector at index ' + $index + ' is collinear, removing vertex.';\n };\n }\n function SurfaceConnector(key, type, vertices, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, required) {\n Companion_getInstance_27();\n priority = priority === VOID ? 0 : priority;\n var tmp;\n if (activationDistance === VOID) {\n var tmp_0;\n if (type === 1) {\n tmp_0 = 0.0;\n } else {\n tmp_0 = 200.0;\n }\n tmp = tmp_0;\n } else {\n tmp = activationDistance;\n }\n activationDistance = tmp;\n enabled = enabled === VOID ? true : enabled;\n var tmp_1;\n if (tagArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_1 = [];\n } else {\n tmp_1 = tagArray;\n }\n tagArray = tmp_1;\n var tmp_2;\n if (offersArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_2 = [];\n } else {\n tmp_2 = offersArray;\n }\n offersArray = tmp_2;\n var tmp_3;\n if (demandsArray === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_3 = [];\n } else {\n tmp_3 = demandsArray;\n }\n demandsArray = tmp_3;\n required = required === VOID ? false : required;\n Connector.call(this);\n this.p22_1 = key;\n this.q22_1 = type;\n this.vertices = vertices;\n this.r22_1 = priority;\n this.s22_1 = activationDistance;\n this.t22_1 = enabled;\n this.u22_1 = tagArray;\n this.v22_1 = offersArray;\n this.w22_1 = demandsArray;\n this.x22_1 = required;\n if (this.vertices.length < 3) {\n throw IllegalArgumentException_init_$Create$('A surface connector needs at least 3 vertices. Provided vertices: ' + this.vertices);\n }\n this.anchor = get_geometricMean(this.vertices);\n this.normal = PolyhedronUtils_getInstance().surfaceNormal(this.vertices);\n validateNoCollinearPointsInSurfaceConnector(this);\n var upProjection = this.normal.dot(Companion_getInstance_61().UP);\n var up = upProjection < -0.999 ? Companion_getInstance_61().BACK : upProjection > 0.999 ? Companion_getInstance_61().FORWARD : Companion_getInstance_61().UP;\n var rotation = Companion_getInstance_57().fromEulerDegrees(new Degrees(90.0)).times(Companion_getInstance_57().fromLookDirectionUnsafe(this.normal.unaryMinus(), up));\n this.y22_1 = new Transform(this.anchor, rotation);\n this.z22_1 = true;\n this.plane = new Plane(this.anchor, this.normal);\n }\n protoOf(SurfaceConnector).t2 = function () {\n return this.p22_1;\n };\n protoOf(SurfaceConnector).a1x = function () {\n return this.q22_1;\n };\n protoOf(SurfaceConnector).a23 = function (_set____db54di) {\n this.vertices = _set____db54di;\n };\n protoOf(SurfaceConnector).b23 = function () {\n return this.vertices;\n };\n protoOf(SurfaceConnector).v1v = function () {\n return this.r22_1;\n };\n protoOf(SurfaceConnector).l1x = function () {\n return this.s22_1;\n };\n protoOf(SurfaceConnector).m1x = function () {\n return this.t22_1;\n };\n protoOf(SurfaceConnector).f1x = function (_set____db54di) {\n this.u22_1 = _set____db54di;\n };\n protoOf(SurfaceConnector).g1x = function () {\n return this.u22_1;\n };\n protoOf(SurfaceConnector).h1x = function (_set____db54di) {\n this.v22_1 = _set____db54di;\n };\n protoOf(SurfaceConnector).i1x = function () {\n return this.v22_1;\n };\n protoOf(SurfaceConnector).j1x = function (_set____db54di) {\n this.w22_1 = _set____db54di;\n };\n protoOf(SurfaceConnector).k1x = function () {\n return this.w22_1;\n };\n protoOf(SurfaceConnector).b1x = function () {\n return this.x22_1;\n };\n protoOf(SurfaceConnector).c23 = function () {\n return this.anchor;\n };\n protoOf(SurfaceConnector).d23 = function () {\n return this.normal;\n };\n protoOf(SurfaceConnector).d1x = function () {\n return this.y22_1;\n };\n protoOf(SurfaceConnector).equalsByValue = function (other) {\n var tmp;\n var tmp_0;\n var tmp_1;\n var tmp_2;\n var tmp_3;\n var tmp_4;\n var tmp_5;\n var tmp_6;\n var tmp_7;\n if (other instanceof SurfaceConnector) {\n tmp_7 = other.p22_1 === this.p22_1;\n } else {\n tmp_7 = false;\n }\n if (tmp_7) {\n tmp_6 = contentEquals(other.vertices, this.vertices);\n } else {\n tmp_6 = false;\n }\n if (tmp_6) {\n tmp_5 = other.y22_1.equals(this.y22_1);\n } else {\n tmp_5 = false;\n }\n if (tmp_5) {\n tmp_4 = other.r22_1 === this.r22_1;\n } else {\n tmp_4 = false;\n }\n if (tmp_4) {\n tmp_3 = other.s22_1 === this.s22_1;\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n tmp_2 = other.t22_1 === this.t22_1;\n } else {\n tmp_2 = false;\n }\n if (tmp_2) {\n tmp_1 = contentEquals(other.u22_1, this.u22_1);\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp_0 = contentEquals(other.offers(), this.offers());\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = contentEquals(other.demands(), this.demands());\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(SurfaceConnector).n1x = function () {\n return this.z22_1;\n };\n protoOf(SurfaceConnector).c1x = function () {\n return 0.0;\n };\n protoOf(SurfaceConnector).e23 = function () {\n return this.plane;\n };\n protoOf(SurfaceConnector).reposition = function (newPositions) {\n return new SurfaceConnector(this.p22_1, this.q22_1, newPositions, this.r22_1, this.s22_1, this.t22_1, this.u22_1, this.v22_1);\n };\n protoOf(SurfaceConnector).move = function (movementDelta) {\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = this.vertices;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connectors.SurfaceConnector.move.' call\n arr[i] = this_0[i].plus(movementDelta);\n }\n while (inductionVariable <= last);\n var tmp$ret$2 = isArray(arr) ? arr : THROW_CCE();\n return this.copy(VOID, VOID, tmp$ret$2);\n };\n protoOf(SurfaceConnector).rotate = function (rotationDelta) {\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = this.vertices;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.connectors.SurfaceConnector.rotate.' call\n arr[i] = this_0[i].rotate(rotationDelta);\n }\n while (inductionVariable <= last);\n var tmp$ret$2 = isArray(arr) ? arr : THROW_CCE();\n return this.copy(VOID, VOID, tmp$ret$2);\n };\n protoOf(SurfaceConnector).enable = function (enable) {\n return this.copy(VOID, VOID, VOID, VOID, VOID, enable);\n };\n protoOf(SurfaceConnector).closest = function (child) {\n var pE = child.projectOnPlaneFromPoints(this.vertices[0], this.vertices[1], this.vertices[2]);\n return this.contains(pE) ? pE : closestOnEdge(child, this.vertices);\n };\n protoOf(SurfaceConnector).contains = function (localSpacePoint) {\n var tmp;\n if (closestOnEdge(localSpacePoint, this.vertices).distanceTo(localSpacePoint) < 1.0E-4) {\n tmp = true;\n } else {\n tmp = PolyhedronUtils_getInstance().pointInPolygon(localSpacePoint, this.vertices, this.normal);\n }\n return tmp;\n };\n protoOf(SurfaceConnector).af = function () {\n return this.p22_1;\n };\n protoOf(SurfaceConnector).bf = function () {\n return this.q22_1;\n };\n protoOf(SurfaceConnector).g1k = function () {\n return this.vertices;\n };\n protoOf(SurfaceConnector).h1k = function () {\n return this.r22_1;\n };\n protoOf(SurfaceConnector).i1k = function () {\n return this.s22_1;\n };\n protoOf(SurfaceConnector).j1k = function () {\n return this.t22_1;\n };\n protoOf(SurfaceConnector).k1k = function () {\n return this.u22_1;\n };\n protoOf(SurfaceConnector).p1z = function () {\n return this.v22_1;\n };\n protoOf(SurfaceConnector).q1z = function () {\n return this.w22_1;\n };\n protoOf(SurfaceConnector).r1z = function () {\n return this.x22_1;\n };\n protoOf(SurfaceConnector).f23 = function (key, type, vertices, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, required) {\n return new SurfaceConnector(key, type, vertices, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, required);\n };\n protoOf(SurfaceConnector).copy = function (key, type, vertices, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, required, $super) {\n key = key === VOID ? this.p22_1 : key;\n type = type === VOID ? this.q22_1 : type;\n vertices = vertices === VOID ? this.vertices : vertices;\n priority = priority === VOID ? this.r22_1 : priority;\n activationDistance = activationDistance === VOID ? this.s22_1 : activationDistance;\n enabled = enabled === VOID ? this.t22_1 : enabled;\n tagArray = tagArray === VOID ? this.u22_1 : tagArray;\n offersArray = offersArray === VOID ? this.v22_1 : offersArray;\n demandsArray = demandsArray === VOID ? this.w22_1 : demandsArray;\n required = required === VOID ? this.x22_1 : required;\n return this.f23(key, type, vertices, priority, activationDistance, enabled, tagArray, offersArray, demandsArray, required);\n };\n protoOf(SurfaceConnector).toString = function () {\n return 'SurfaceConnector(key=' + this.p22_1 + ', type=' + this.q22_1 + ', vertices=' + toString(this.vertices) + ', priority=' + this.r22_1 + ', activationDistance=' + this.s22_1 + ', enabled=' + this.t22_1 + ', tagArray=' + toString(this.u22_1) + ', offersArray=' + toString(this.v22_1) + ', demandsArray=' + toString(this.w22_1) + ', required=' + this.x22_1 + ')';\n };\n protoOf(SurfaceConnector).hashCode = function () {\n var result = getStringHashCode(this.p22_1);\n result = imul(result, 31) + this.q22_1 | 0;\n result = imul(result, 31) + hashCode(this.vertices) | 0;\n result = imul(result, 31) + this.r22_1 | 0;\n result = imul(result, 31) + getNumberHashCode(this.s22_1) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.t22_1) | 0;\n result = imul(result, 31) + hashCode(this.u22_1) | 0;\n result = imul(result, 31) + hashCode(this.v22_1) | 0;\n result = imul(result, 31) + hashCode(this.w22_1) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.x22_1) | 0;\n return result;\n };\n protoOf(SurfaceConnector).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof SurfaceConnector))\n return false;\n var tmp0_other_with_cast = other instanceof SurfaceConnector ? other : THROW_CCE();\n if (!(this.p22_1 === tmp0_other_with_cast.p22_1))\n return false;\n if (!(this.q22_1 === tmp0_other_with_cast.q22_1))\n return false;\n if (!equals(this.vertices, tmp0_other_with_cast.vertices))\n return false;\n if (!(this.r22_1 === tmp0_other_with_cast.r22_1))\n return false;\n if (!equals(this.s22_1, tmp0_other_with_cast.s22_1))\n return false;\n if (!(this.t22_1 === tmp0_other_with_cast.t22_1))\n return false;\n if (!equals(this.u22_1, tmp0_other_with_cast.u22_1))\n return false;\n if (!equals(this.v22_1, tmp0_other_with_cast.v22_1))\n return false;\n if (!equals(this.w22_1, tmp0_other_with_cast.w22_1))\n return false;\n if (!(this.x22_1 === tmp0_other_with_cast.x22_1))\n return false;\n return true;\n };\n function DebugLine(start, end, color, thickness) {\n this.start = start;\n this.end = end;\n this.color = color;\n this.thickness = thickness;\n }\n protoOf(DebugLine).s9 = function () {\n return this.start;\n };\n protoOf(DebugLine).g23 = function () {\n return this.end;\n };\n protoOf(DebugLine).h23 = function () {\n return this.color;\n };\n protoOf(DebugLine).i23 = function () {\n return this.thickness;\n };\n protoOf(DebugLine).af = function () {\n return this.start;\n };\n protoOf(DebugLine).bf = function () {\n return this.end;\n };\n protoOf(DebugLine).g1k = function () {\n return this.color;\n };\n protoOf(DebugLine).h1k = function () {\n return this.thickness;\n };\n protoOf(DebugLine).j23 = function (start, end, color, thickness) {\n return new DebugLine(start, end, color, thickness);\n };\n protoOf(DebugLine).copy = function (start, end, color, thickness, $super) {\n start = start === VOID ? this.start : start;\n end = end === VOID ? this.end : end;\n color = color === VOID ? this.color : color;\n thickness = thickness === VOID ? this.thickness : thickness;\n return this.j23(start, end, color, thickness);\n };\n protoOf(DebugLine).toString = function () {\n return 'DebugLine(start=' + this.start + ', end=' + this.end + ', color=' + this.color + ', thickness=' + this.thickness + ')';\n };\n protoOf(DebugLine).hashCode = function () {\n var result = this.start.hashCode();\n result = imul(result, 31) + this.end.hashCode() | 0;\n result = imul(result, 31) + this.color.hashCode() | 0;\n result = imul(result, 31) + getNumberHashCode(this.thickness) | 0;\n return result;\n };\n protoOf(DebugLine).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof DebugLine))\n return false;\n var tmp0_other_with_cast = other instanceof DebugLine ? other : THROW_CCE();\n if (!this.start.equals(tmp0_other_with_cast.start))\n return false;\n if (!this.end.equals(tmp0_other_with_cast.end))\n return false;\n if (!this.color.equals(tmp0_other_with_cast.color))\n return false;\n if (!equals(this.thickness, tmp0_other_with_cast.thickness))\n return false;\n return true;\n };\n function Companion_27() {\n this.id = 92;\n }\n protoOf(Companion_27).s1k = function () {\n return this.id;\n };\n var Companion_instance_27;\n function Companion_getInstance_28() {\n return Companion_instance_27;\n }\n function DebugLinesComponent(lines) {\n this.lines = lines;\n }\n protoOf(DebugLinesComponent).k23 = function () {\n return this.lines;\n };\n protoOf(DebugLinesComponent).x1k = function () {\n return 92;\n };\n protoOf(DebugLinesComponent).eq = function (other) {\n return contentDeepEquals(this.lines, (other instanceof DebugLinesComponent ? other : THROW_CCE()).lines);\n };\n function Companion_28() {\n this.id = 120;\n }\n protoOf(Companion_28).s1k = function () {\n return this.id;\n };\n var Companion_instance_28;\n function Companion_getInstance_29() {\n return Companion_instance_28;\n }\n function DebugSurfacesComponent(surfaces) {\n this.surfaces = surfaces;\n }\n protoOf(DebugSurfacesComponent).l23 = function () {\n return this.surfaces;\n };\n protoOf(DebugSurfacesComponent).x1k = function () {\n return 120;\n };\n protoOf(DebugSurfacesComponent).eq = function (other) {\n return contentDeepEquals(this.surfaces, (other instanceof DebugSurfacesComponent ? other : THROW_CCE()).surfaces);\n };\n function Companion_29() {\n this.id = 74;\n }\n protoOf(Companion_29).s1k = function () {\n return this.id;\n };\n var Companion_instance_29;\n function Companion_getInstance_30() {\n return Companion_instance_29;\n }\n function DragSurfacesComponent(surfaces, basedOnCollider) {\n basedOnCollider = basedOnCollider === VOID ? false : basedOnCollider;\n this.surfaces = surfaces;\n this.basedOnCollider = basedOnCollider;\n }\n protoOf(DragSurfacesComponent).l23 = function () {\n return this.surfaces;\n };\n protoOf(DragSurfacesComponent).m23 = function () {\n return this.basedOnCollider;\n };\n protoOf(DragSurfacesComponent).x1k = function () {\n return 74;\n };\n protoOf(DragSurfacesComponent).eq = function (other) {\n var tmp;\n if (contentDeepEquals(this.surfaces, (other instanceof DragSurfacesComponent ? other : THROW_CCE()).surfaces)) {\n tmp = this.basedOnCollider === other.basedOnCollider;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(DragSurfacesComponent).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof DragSurfacesComponent))\n THROW_CCE();\n if (!contentEquals(this.surfaces, other.surfaces))\n return false;\n if (!(this.basedOnCollider === other.basedOnCollider))\n return false;\n return true;\n };\n protoOf(DragSurfacesComponent).hashCode = function () {\n var result = contentHashCode(this.surfaces);\n result = imul(31, result) + getBooleanHashCode(this.basedOnCollider) | 0;\n return result;\n };\n protoOf(DragSurfacesComponent).af = function () {\n return this.surfaces;\n };\n protoOf(DragSurfacesComponent).bf = function () {\n return this.basedOnCollider;\n };\n protoOf(DragSurfacesComponent).n23 = function (surfaces, basedOnCollider) {\n return new DragSurfacesComponent(surfaces, basedOnCollider);\n };\n protoOf(DragSurfacesComponent).copy = function (surfaces, basedOnCollider, $super) {\n surfaces = surfaces === VOID ? this.surfaces : surfaces;\n basedOnCollider = basedOnCollider === VOID ? this.basedOnCollider : basedOnCollider;\n return this.n23(surfaces, basedOnCollider);\n };\n protoOf(DragSurfacesComponent).toString = function () {\n return 'DragSurfacesComponent(surfaces=' + toString(this.surfaces) + ', basedOnCollider=' + this.basedOnCollider + ')';\n };\n function DragSurface(surface, connectorKeys) {\n this.surface = surface;\n this.connectorKeys = connectorKeys;\n }\n protoOf(DragSurface).o23 = function () {\n return this.surface;\n };\n protoOf(DragSurface).p23 = function () {\n return this.connectorKeys;\n };\n protoOf(DragSurface).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof DragSurface))\n THROW_CCE();\n if (!equals(this.surface, other.surface))\n return false;\n if (!(this.connectorKeys == null)) {\n if (other.connectorKeys == null)\n return false;\n if (!contentEquals(this.connectorKeys, other.connectorKeys))\n return false;\n } else if (!(other.connectorKeys == null))\n return false;\n return true;\n };\n protoOf(DragSurface).hashCode = function () {\n var result = hashCode(this.surface);\n var tmp = imul(31, result);\n var tmp0_safe_receiver = this.connectorKeys;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : contentHashCode(tmp0_safe_receiver);\n result = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;\n return result;\n };\n protoOf(DragSurface).af = function () {\n return this.surface;\n };\n protoOf(DragSurface).bf = function () {\n return this.connectorKeys;\n };\n protoOf(DragSurface).k1n = function (surface, connectorKeys) {\n return new DragSurface(surface, connectorKeys);\n };\n protoOf(DragSurface).copy = function (surface, connectorKeys, $super) {\n surface = surface === VOID ? this.surface : surface;\n connectorKeys = connectorKeys === VOID ? this.connectorKeys : connectorKeys;\n return this.k1n(surface, connectorKeys);\n };\n protoOf(DragSurface).toString = function () {\n return 'DragSurface(surface=' + this.surface + ', connectorKeys=' + toString(this.connectorKeys) + ')';\n };\n function get_dragSurfacesComponent(_this__u8e3s4) {\n return _this__u8e3s4.__getComponentForKotlin(74);\n }\n function Companion_30() {\n this.id = 3;\n }\n protoOf(Companion_30).s1k = function () {\n return this.id;\n };\n var Companion_instance_30;\n function Companion_getInstance_31() {\n return Companion_instance_30;\n }\n function DraggableComponent() {\n }\n protoOf(DraggableComponent).x1k = function () {\n return 3;\n };\n protoOf(DraggableComponent).eq = function (other) {\n return true;\n };\n function Companion_31() {\n this.id = 66;\n }\n protoOf(Companion_31).s1k = function () {\n return this.id;\n };\n var Companion_instance_31;\n function Companion_getInstance_32() {\n return Companion_instance_31;\n }\n function SomethingIsDraggedComponent(entity) {\n this.entity = entity;\n this.q23_1 = false;\n }\n protoOf(SomethingIsDraggedComponent).r23 = function () {\n return this.entity;\n };\n protoOf(SomethingIsDraggedComponent).x1k = function () {\n return 66;\n };\n protoOf(SomethingIsDraggedComponent).eq = function (other) {\n return (other instanceof SomethingIsDraggedComponent ? other : THROW_CCE()).entity.equals(this.entity);\n };\n protoOf(SomethingIsDraggedComponent).a1l = function () {\n return this.q23_1;\n };\n var DragType_DragStart_instance;\n var DragType_DragMove_instance;\n var DragType_DragEnd_instance;\n function values_1() {\n return [DragType_DragStart_getInstance(), DragType_DragMove_getInstance(), DragType_DragEnd_getInstance()];\n }\n function valueOf_1(value) {\n switch (value) {\n case 'DragStart':\n return DragType_DragStart_getInstance();\n case 'DragMove':\n return DragType_DragMove_getInstance();\n case 'DragEnd':\n return DragType_DragEnd_getInstance();\n default:\n DragType_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var DragType_entriesInitialized;\n function DragType_initEntries() {\n if (DragType_entriesInitialized)\n return Unit_instance;\n DragType_entriesInitialized = true;\n DragType_DragStart_instance = new DragType('DragStart', 0);\n DragType_DragMove_instance = new DragType('DragMove', 1);\n DragType_DragEnd_instance = new DragType('DragEnd', 2);\n }\n function DragType(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function Companion_32() {\n this.id = 84;\n }\n protoOf(Companion_32).s1k = function () {\n return this.id;\n };\n var Companion_instance_32;\n function Companion_getInstance_33() {\n return Companion_instance_32;\n }\n function ViewerDragEventComponent$rayFromCameraToDragEnd$delegate$lambda(this$0) {\n return function () {\n var rayDir = this$0.planePoint.minus(this$0.cameraPosition).normalize();\n var ray = new Ray(this$0.cameraPosition, rayDir);\n return ray;\n };\n }\n function ViewerDragEventComponent(planePoint, planeNormal, delta, cameraPosition) {\n this.planePoint = planePoint;\n this.planeNormal = planeNormal;\n this.delta = delta;\n this.cameraPosition = cameraPosition;\n var tmp = this;\n tmp.u23_1 = lazy(ViewerDragEventComponent$rayFromCameraToDragEnd$delegate$lambda(this));\n this.v23_1 = 84;\n this.w23_1 = false;\n }\n protoOf(ViewerDragEventComponent).x23 = function () {\n return this.planePoint;\n };\n protoOf(ViewerDragEventComponent).y23 = function () {\n return this.planeNormal;\n };\n protoOf(ViewerDragEventComponent).z23 = function () {\n return this.delta;\n };\n protoOf(ViewerDragEventComponent).a24 = function () {\n return this.cameraPosition;\n };\n protoOf(ViewerDragEventComponent).b24 = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.u23_1;\n rayFromCameraToDragEnd$factory();\n return this_0.u2();\n };\n protoOf(ViewerDragEventComponent).x1k = function () {\n return this.v23_1;\n };\n protoOf(ViewerDragEventComponent).eq = function (other) {\n if (!(other instanceof ViewerDragEventComponent))\n return false;\n return ((other.planePoint.equals(this.planePoint) ? other.planeNormal.equals(this.planeNormal) : false) ? other.delta.equals(this.delta) : false) ? other.cameraPosition.equals(this.cameraPosition) : false;\n };\n protoOf(ViewerDragEventComponent).a1l = function () {\n return this.w23_1;\n };\n protoOf(ViewerDragEventComponent).af = function () {\n return this.planePoint;\n };\n protoOf(ViewerDragEventComponent).bf = function () {\n return this.planeNormal;\n };\n protoOf(ViewerDragEventComponent).g1k = function () {\n return this.delta;\n };\n protoOf(ViewerDragEventComponent).h1k = function () {\n return this.cameraPosition;\n };\n protoOf(ViewerDragEventComponent).c24 = function (planePoint, planeNormal, delta, cameraPosition) {\n return new ViewerDragEventComponent(planePoint, planeNormal, delta, cameraPosition);\n };\n protoOf(ViewerDragEventComponent).copy = function (planePoint, planeNormal, delta, cameraPosition, $super) {\n planePoint = planePoint === VOID ? this.planePoint : planePoint;\n planeNormal = planeNormal === VOID ? this.planeNormal : planeNormal;\n delta = delta === VOID ? this.delta : delta;\n cameraPosition = cameraPosition === VOID ? this.cameraPosition : cameraPosition;\n return this.c24(planePoint, planeNormal, delta, cameraPosition);\n };\n protoOf(ViewerDragEventComponent).toString = function () {\n return 'ViewerDragEventComponent(planePoint=' + this.planePoint + ', planeNormal=' + this.planeNormal + ', delta=' + this.delta + ', cameraPosition=' + this.cameraPosition + ')';\n };\n protoOf(ViewerDragEventComponent).hashCode = function () {\n var result = this.planePoint.hashCode();\n result = imul(result, 31) + this.planeNormal.hashCode() | 0;\n result = imul(result, 31) + this.delta.hashCode() | 0;\n result = imul(result, 31) + this.cameraPosition.hashCode() | 0;\n return result;\n };\n protoOf(ViewerDragEventComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ViewerDragEventComponent))\n return false;\n var tmp0_other_with_cast = other instanceof ViewerDragEventComponent ? other : THROW_CCE();\n if (!this.planePoint.equals(tmp0_other_with_cast.planePoint))\n return false;\n if (!this.planeNormal.equals(tmp0_other_with_cast.planeNormal))\n return false;\n if (!this.delta.equals(tmp0_other_with_cast.delta))\n return false;\n if (!this.cameraPosition.equals(tmp0_other_with_cast.cameraPosition))\n return false;\n return true;\n };\n function DragType_DragStart_getInstance() {\n DragType_initEntries();\n return DragType_DragStart_instance;\n }\n function DragType_DragMove_getInstance() {\n DragType_initEntries();\n return DragType_DragMove_instance;\n }\n function DragType_DragEnd_getInstance() {\n DragType_initEntries();\n return DragType_DragEnd_instance;\n }\n function rayFromCameraToDragEnd$factory() {\n return getPropertyCallableRef('rayFromCameraToDragEnd', 1, KProperty1, function (receiver) {\n return receiver.rayFromCameraToDragEnd;\n }, null);\n }\n function Companion_33() {\n this.ID = 'WorldDragSurfaceUpdateSystem';\n }\n protoOf(Companion_33).u1n = function () {\n return this.ID;\n };\n var Companion_instance_33;\n function Companion_getInstance_34() {\n return Companion_instance_33;\n }\n function updateDragSurfaces($this, entity) {\n var tmp0_safe_receiver = calculateWorldDragSurfaces($this, entity);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.dragging.WorldDragSurfaceUpdateSystem.updateDragSurfaces.' call\n entity.addComponent(tmp0_safe_receiver);\n }\n }\n function calculateWorldDragSurfaces($this, entity) {\n var tmp0_safe_receiver = get_dragSurfacesComponent(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.surfaces;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(tmp1_safe_receiver.length);\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var item = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.dragging.WorldDragSurfaceUpdateSystem.calculateWorldDragSurfaces.' call\n var transformedPoly = TransformUtils_instance.applyWorldTransform(item.surface, entity);\n var tmp$ret$0 = item.copy(transformedPoly);\n destination.q(tmp$ret$0);\n }\n tmp = destination;\n }\n var tmp2_safe_receiver = tmp;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_0 = copyToArray(tmp2_safe_receiver);\n }\n var transformedSurfaces = tmp_0;\n var tmp_1;\n if (transformedSurfaces == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.dragging.WorldDragSurfaceUpdateSystem.calculateWorldDragSurfaces.' call\n tmp_1 = new WorldDragSurfacesComponent(transformedSurfaces);\n }\n return tmp_1;\n }\n function WorldDragSurfaceUpdateSystem() {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [91];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = ['TransformSystem'];\n SystemBase2.call(this, 'WorldDragSurfaceUpdateSystem', 10, 74, tmp, tmp$ret$5, null);\n }\n protoOf(WorldDragSurfaceUpdateSystem).onAddComponent = function (entity, newComponent) {\n updateDragSurfaces(this, entity);\n };\n protoOf(WorldDragSurfaceUpdateSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n updateDragSurfaces(this, entity);\n };\n protoOf(WorldDragSurfaceUpdateSystem).onRemoveComponent = function (entity, oldComponent) {\n updateDragSurfaces(this, entity);\n };\n protoOf(WorldDragSurfaceUpdateSystem).onAddComponent2 = function (entity, newComponent) {\n updateDragSurfaces(this, entity);\n };\n protoOf(WorldDragSurfaceUpdateSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n updateDragSurfaces(this, entity);\n };\n protoOf(WorldDragSurfaceUpdateSystem).onRemoveComponent2 = function (entity, oldComponent) {\n entity.removeComponent(91);\n };\n function Companion_34() {\n this.id = 91;\n }\n protoOf(Companion_34).s1k = function () {\n return this.id;\n };\n var Companion_instance_34;\n function Companion_getInstance_35() {\n return Companion_instance_34;\n }\n function WorldDragSurfacesComponent(surfaces) {\n this.surfaces = surfaces;\n }\n protoOf(WorldDragSurfacesComponent).l23 = function () {\n return this.surfaces;\n };\n protoOf(WorldDragSurfacesComponent).x1k = function () {\n return 91;\n };\n protoOf(WorldDragSurfacesComponent).eq = function (other) {\n return contentDeepEquals(this.surfaces, (other instanceof WorldDragSurfacesComponent ? other : THROW_CCE()).surfaces);\n };\n protoOf(WorldDragSurfacesComponent).hashCode = function () {\n return hashCode(this.surfaces);\n };\n protoOf(WorldDragSurfacesComponent).equals = function (other) {\n var tmp;\n if (other instanceof WorldDragSurfacesComponent) {\n tmp = contentDeepEquals(this.surfaces, other.surfaces);\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(WorldDragSurfacesComponent).af = function () {\n return this.surfaces;\n };\n protoOf(WorldDragSurfacesComponent).d24 = function (surfaces) {\n return new WorldDragSurfacesComponent(surfaces);\n };\n protoOf(WorldDragSurfacesComponent).copy = function (surfaces, $super) {\n surfaces = surfaces === VOID ? this.surfaces : surfaces;\n return this.d24(surfaces);\n };\n protoOf(WorldDragSurfacesComponent).toString = function () {\n return 'WorldDragSurfacesComponent(surfaces=' + toString(this.surfaces) + ')';\n };\n function Companion_35() {\n this.id = 85;\n }\n protoOf(Companion_35).s1k = function () {\n return this.id;\n };\n var Companion_instance_35;\n function Companion_getInstance_36() {\n return Companion_instance_35;\n }\n function WorldSpaceDragEventComponent(point, rayFromCameraToDragPoint) {\n this.point = point;\n this.rayFromCameraToDragPoint = rayFromCameraToDragPoint;\n this.e24_1 = 85;\n this.f24_1 = false;\n }\n protoOf(WorldSpaceDragEventComponent).g24 = function () {\n return this.point;\n };\n protoOf(WorldSpaceDragEventComponent).h24 = function () {\n return this.rayFromCameraToDragPoint;\n };\n protoOf(WorldSpaceDragEventComponent).x1k = function () {\n return this.e24_1;\n };\n protoOf(WorldSpaceDragEventComponent).eq = function (other) {\n if (!(other instanceof WorldSpaceDragEventComponent))\n return false;\n return other.point.equals(this.point) ? other.rayFromCameraToDragPoint.equals(this.rayFromCameraToDragPoint) : false;\n };\n protoOf(WorldSpaceDragEventComponent).a1l = function () {\n return this.f24_1;\n };\n protoOf(WorldSpaceDragEventComponent).af = function () {\n return this.point;\n };\n protoOf(WorldSpaceDragEventComponent).bf = function () {\n return this.rayFromCameraToDragPoint;\n };\n protoOf(WorldSpaceDragEventComponent).i24 = function (point, rayFromCameraToDragPoint) {\n return new WorldSpaceDragEventComponent(point, rayFromCameraToDragPoint);\n };\n protoOf(WorldSpaceDragEventComponent).copy = function (point, rayFromCameraToDragPoint, $super) {\n point = point === VOID ? this.point : point;\n rayFromCameraToDragPoint = rayFromCameraToDragPoint === VOID ? this.rayFromCameraToDragPoint : rayFromCameraToDragPoint;\n return this.i24(point, rayFromCameraToDragPoint);\n };\n protoOf(WorldSpaceDragEventComponent).toString = function () {\n return 'WorldSpaceDragEventComponent(point=' + this.point + ', rayFromCameraToDragPoint=' + this.rayFromCameraToDragPoint + ')';\n };\n protoOf(WorldSpaceDragEventComponent).hashCode = function () {\n var result = this.point.hashCode();\n result = imul(result, 31) + this.rayFromCameraToDragPoint.hashCode() | 0;\n return result;\n };\n protoOf(WorldSpaceDragEventComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof WorldSpaceDragEventComponent))\n return false;\n var tmp0_other_with_cast = other instanceof WorldSpaceDragEventComponent ? other : THROW_CCE();\n if (!this.point.equals(tmp0_other_with_cast.point))\n return false;\n if (!this.rayFromCameraToDragPoint.equals(tmp0_other_with_cast.rayFromCameraToDragPoint))\n return false;\n return true;\n };\n function Component() {\n }\n function ComponentHolder() {\n var tmp = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp.j24_1 = LinkedHashMap_init_$Create$_0();\n var tmp_0 = this;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = 133 + 1 | 0;\n tmp_0.k24_1 = fillArrayVal(Array(size), null);\n }\n protoOf(ComponentHolder).components = function () {\n var core = filterNotNull(this.k24_1);\n var rest = this.j24_1.p2();\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = plus_0(core, rest);\n return copyToArray(this_0);\n };\n protoOf(ComponentHolder).getComponent = function (componentId) {\n var tmp;\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n tmp = this.k24_1[componentId];\n } else {\n tmp = this.j24_1.b3(componentId);\n }\n return tmp;\n };\n protoOf(ComponentHolder).addComponent = function (c) {\n var typeId = c.typeId;\n var old = this.getComponent(typeId);\n if (old == null ? true : !old.eq(c)) {\n if (ComponentIds_instance.isCoreComponent(c)) {\n this.k24_1[typeId] = c;\n } else {\n // Inline function 'kotlin.collections.set' call\n this.j24_1.r2(typeId, c);\n }\n }\n return old;\n };\n protoOf(ComponentHolder).removeComponent = function (componentId) {\n var tmp;\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n var tmp_0;\n if (!(this.k24_1[componentId] == null)) {\n var c = ensureNotNull(this.k24_1[componentId]);\n this.k24_1[componentId] = null;\n tmp_0 = c;\n } else {\n tmp_0 = null;\n }\n tmp = tmp_0;\n } else {\n tmp = this.j24_1.v2(componentId);\n }\n return tmp;\n };\n protoOf(ComponentHolder).__getComponentForKotlin = function (componentId) {\n return fastComponent(this, componentId);\n };\n protoOf(ComponentHolder).getComponentUnsafe = function (componentId) {\n var tmp0_elvis_lhs = this.__getComponentForKotlin(componentId);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw Exception_init_$Create$('Component with id ' + componentId + ' does not exist on ' + this);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(ComponentHolder).hasComponent = function (componentId) {\n var tmp;\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n tmp = !(this.k24_1[componentId] == null);\n } else {\n tmp = this.j24_1.y2(componentId);\n }\n return tmp;\n };\n function ComponentListener() {\n }\n function EcsSystem() {\n }\n function System() {\n }\n function Companion_36() {\n Companion_instance_36 = this;\n this.logger = LoggerState_getInstance().m1m('Entity');\n }\n protoOf(Companion_36).x1i = function () {\n return this.logger;\n };\n var Companion_instance_36;\n function Companion_getInstance_37() {\n if (Companion_instance_36 == null)\n new Companion_36();\n return Companion_instance_36;\n }\n function Entity(id, entityManager) {\n Companion_getInstance_37();\n this.id = id;\n this.entityManager = entityManager;\n }\n protoOf(Entity).s1k = function () {\n return this.id;\n };\n protoOf(Entity).p1i = function () {\n return this.entityManager;\n };\n protoOf(Entity).m24 = function () {\n return this.components();\n };\n protoOf(Entity).n24 = function () {\n return this.entityManager.isDisposed(this);\n };\n protoOf(Entity).addComponent = function (c) {\n return this.entityManager.addComponent(this, c);\n };\n protoOf(Entity).removeComponent = function (componentId) {\n return this.entityManager.removeComponent(this, componentId);\n };\n protoOf(Entity).components = function () {\n return this.entityManager.getComponents(this);\n };\n protoOf(Entity).getComponent = function (componentId) {\n return this.entityManager.getComponent(this, componentId);\n };\n protoOf(Entity).addComponentInternal = function (c) {\n return this.entityManager.addComponentInternal(this, c);\n };\n protoOf(Entity).removeComponentInternal = function (componentId) {\n return this.entityManager.removeComponentInternal(this, componentId);\n };\n protoOf(Entity).dispose = function () {\n this.entityManager.disposeEntity(this);\n };\n protoOf(Entity).__getComponentForKotlin = function (componentId) {\n return this.entityManager.__getComponentForKotlin(this, componentId);\n };\n protoOf(Entity).getComponentUnsafe = function (componentId) {\n return this.entityManager.getComponentUnsafe(this, componentId);\n };\n protoOf(Entity).hasComponent = function (componentId) {\n return this.entityManager.hasComponent(this, componentId);\n };\n protoOf(Entity).toString = function () {\n if (this.isDisposed)\n return '' + this.id + ':-disposed-';\n var productComponent = this.__getComponentForKotlin(18);\n var tmp1_elvis_lhs = productComponent == null ? null : productComponent.productRef;\n var ref = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;\n var displayNameComponent = this.__getComponentForKotlin(15);\n var tmp3_elvis_lhs = displayNameComponent == null ? null : displayNameComponent.name;\n var displayName = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;\n return ref + ':' + this.id + ':' + displayName;\n };\n protoOf(Entity).equals = function (other) {\n var tmp;\n if (other instanceof Entity) {\n tmp = other.id === this.id;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(Entity).hashCode = function () {\n return this.id;\n };\n function EntityManager() {\n }\n function validateInput($this, entity, componentId) {\n if (entity.id < 0) {\n throw IllegalArgumentException_init_$Create$('Entities are not allowed to have an id lower than 0');\n }\n if (componentId < 0) {\n throw IllegalArgumentException_init_$Create$('Components are not allowed to have an id lower than 0. ComponentId: ' + componentId);\n }\n return true;\n }\n function componentHolder($this, entityId) {\n if (entityId < 0 ? true : entityId > $this.s24_1.n()) {\n return null;\n }\n return $this.s24_1.f1(entityId);\n }\n function removeComponentHolder($this, entityId) {\n $this.s24_1.o(entityId, null);\n }\n function componentListeners($this, componentId) {\n return componentId < $this.t24_1.length ? $this.t24_1[componentId] : $this.u24_1.b3(componentId);\n }\n function growComponentsTo($this, minSize) {\n var newSize = minSize + $this.p24_1 | 0;\n $this.s24_1.i3(newSize);\n while ($this.s24_1.n() < newSize) {\n $this.s24_1.q(null);\n }\n }\n function doEntityPassSystemFilter($this, entity, system) {\n if (system == null)\n return true;\n var tmp0_elvis_lhs = system.mandatoryComponents;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return true;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var componentFilter = tmp;\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = componentFilter.length;\n while (inductionVariable < last) {\n var element = componentFilter[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.doEntityPassSystemFilter.' call\n if (!$this.hasComponent(entity, element))\n return false;\n }\n return true;\n }\n function doEntityIgnoreSystemFilter($this, entity, system) {\n if (system == null)\n return false;\n var tmp0_elvis_lhs = system.ignoreEntitiesWithComponents;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var ignoreComponentFilter = tmp;\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = ignoreComponentFilter.length;\n while (inductionVariable < last) {\n var element = ignoreComponentFilter[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.doEntityIgnoreSystemFilter.' call\n if ($this.hasComponent(entity, element))\n return true;\n }\n return false;\n }\n function shouldSystemActOnEvent($this, entity, system) {\n if (system == null)\n return true;\n if (system.isEnabled) {\n if (doEntityIgnoreSystemFilter($this, entity, system))\n return false;\n if (doEntityPassSystemFilter($this, entity, system))\n return true;\n }\n return false;\n }\n function notifyComponentAdded($this, entity, comp) {\n var tmp0_safe_receiver = componentListeners($this, comp.typeId);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.notifyComponentAdded.' call\n if (!entity.isDisposed ? shouldSystemActOnEvent($this, entity, element.ownerSystem) : false) {\n $this.d25_1.beforeNotifyOnAdd(element);\n element.onAdd(entity, comp);\n $this.d25_1.afterNotifyOnAdd(element);\n }\n }\n }\n if (ComponentIds_instance.isCoreComponentId(comp.typeId)) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = ensureNotNull($this.v24_1[comp.typeId]);\n var inductionVariable_0 = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.notifyComponentAdded.' call\n if (!entity.isDisposed)\n element_0(entity, comp);\n }\n } else {\n var tmp1_safe_receiver = $this.w24_1.b3(comp.typeId);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_1 = 0;\n var last_1 = tmp1_safe_receiver.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = tmp1_safe_receiver[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.notifyComponentAdded.' call\n if (!entity.isDisposed)\n element_1(entity, comp);\n }\n }\n }\n }\n function notifyComponentRemoved($this, entity, comp) {\n var tmp0_safe_receiver = componentListeners($this, comp.typeId);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.notifyComponentRemoved.' call\n if (!entity.isDisposed ? shouldSystemActOnEvent($this, entity, element.ownerSystem) : false) {\n $this.d25_1.beforeNotifyOnRemove(element);\n element.onRemove(entity, comp);\n $this.d25_1.afterNotifyOnRemove(element);\n }\n }\n }\n if (ComponentIds_instance.isCoreComponentId(comp.typeId)) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = ensureNotNull($this.z24_1[comp.typeId]);\n var inductionVariable_0 = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.notifyComponentRemoved.' call\n if (!entity.isDisposed)\n element_0(entity, comp);\n }\n } else {\n var tmp1_safe_receiver = $this.a25_1.b3(comp.typeId);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_1 = 0;\n var last_1 = tmp1_safe_receiver.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = tmp1_safe_receiver[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.notifyComponentRemoved.' call\n if (!entity.isDisposed)\n element_1(entity, comp);\n }\n }\n }\n }\n function notifyComponentUpdated($this, entity, old, comp) {\n var tmp0_safe_receiver = componentListeners($this, comp.typeId);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.notifyComponentUpdated.' call\n if (!entity.isDisposed ? shouldSystemActOnEvent($this, entity, element.ownerSystem) : false) {\n $this.d25_1.beforeNotifyOnUpdate(element);\n element.onUpdate(entity, old, comp);\n $this.d25_1.afterNotifyOnUpdate(element);\n }\n }\n }\n if (ComponentIds_instance.isCoreComponentId(comp.typeId)) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = ensureNotNull($this.x24_1[comp.typeId]);\n var inductionVariable_0 = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.notifyComponentUpdated.' call\n if (!entity.isDisposed)\n element_0(entity, old, comp);\n }\n } else {\n var tmp1_safe_receiver = $this.y24_1.b3(comp.typeId);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_1 = 0;\n var last_1 = tmp1_safe_receiver.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = tmp1_safe_receiver[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.notifyComponentUpdated.' call\n if (!entity.isDisposed)\n element_1(entity, old, comp);\n }\n }\n }\n }\n function addComponentWithNotifyCallback($this, entity, component, onUpdate, onAdd) {\n validateInput($this, entity, component.typeId);\n $this.d25_1.beforeAddComponent(entity, component);\n var old = null;\n var componentHolder_0 = componentHolder($this, entity.id);\n if (!(componentHolder_0 == null)) {\n old = componentHolder_0.addComponent(component);\n if (old == null) {\n if (onAdd == null)\n null;\n else\n onAdd(entity, component);\n } else if (!old.eq(component)) {\n if (onUpdate == null)\n null;\n else\n onUpdate(entity, component, old);\n }\n } else {\n var tmp = Companion_getInstance_38().logger;\n tmp.error(EntityManagerImpl$addComponentWithNotifyCallback$lambda(component, entity));\n }\n $this.d25_1.afterAddComponent(entity, component);\n return old;\n }\n function removeFromComponentHolder($this, entity, componentId, onRemove) {\n validateInput($this, entity, componentId);\n $this.d25_1.beforeRemoveComponent(entity, componentId);\n var old = null;\n var componentHolder_0 = componentHolder($this, entity.id);\n if (!(componentHolder_0 == null)) {\n old = componentHolder_0.removeComponent(componentId);\n if (onRemove == null)\n null;\n else\n onRemove(entity, old);\n } else {\n var tmp = Companion_getInstance_38().logger;\n tmp.error(EntityManagerImpl$removeFromComponentHolder$lambda(componentId, entity));\n }\n $this.d25_1.afterRemoveComponent(entity, componentId);\n return old;\n }\n function Companion_37() {\n Companion_instance_37 = this;\n this.DEFAULT_ENTITIES_ARRAY_GROW_SIZE = 1000;\n this.logger = LoggerState_getInstance().m1m('EntityManagerImpl');\n }\n protoOf(Companion_37).e25 = function () {\n return this.DEFAULT_ENTITIES_ARRAY_GROW_SIZE;\n };\n protoOf(Companion_37).x1i = function () {\n return this.logger;\n };\n var Companion_instance_37;\n function Companion_getInstance_38() {\n if (Companion_instance_37 == null)\n new Companion_37();\n return Companion_instance_37;\n }\n function EntityManagerImpl$createEntityInternal$lambda() {\n return 'Warning: Duplicate Entity added by EntityManager.createEntity()';\n }\n function EntityManagerImpl$addComponent$lambda(this$0) {\n return function (e, c, oldComponent) {\n notifyComponentUpdated(this$0, e, oldComponent, c);\n return Unit_instance;\n };\n }\n function EntityManagerImpl$addComponent$lambda_0(this$0) {\n return function (e, c) {\n notifyComponentAdded(this$0, e, c);\n return Unit_instance;\n };\n }\n function EntityManagerImpl$addComponentWithNotifyCallback$lambda($component, $entity) {\n return function () {\n return \"Can't add component (id: \" + $component.typeId + ') to a disposed entity (id: ' + $entity.id + ')';\n };\n }\n function EntityManagerImpl$removeComponent$lambda(this$0) {\n return function (e, oldComponent) {\n if (oldComponent == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n notifyComponentRemoved(this$0, e, oldComponent);\n }\n return Unit_instance;\n };\n }\n function EntityManagerImpl$removeFromComponentHolder$lambda($componentId, $entity) {\n return function () {\n return 'Trying to remove component with componentId ' + $componentId + ' from entity with id ' + $entity.id + \" that doesn't exist in the EntityManager\";\n };\n }\n function EntityManagerImpl$getComponents$lambda($entity) {\n return function () {\n return 'Trying to get components of entity with id ' + $entity.id + \" that doesn't exist in the EntityManager\";\n };\n }\n function EntityManagerImpl$getUncastComponent$lambda($componentId, $entity) {\n return function () {\n return 'Trying to get component with componentId ' + $componentId + ' of entity with id ' + $entity.id + \" that doesn't exist in the EntityManager\";\n };\n }\n function EntityManagerImpl$getComponent$lambda($componentId, $entity) {\n return function () {\n return 'Trying to get component with componentId ' + $componentId + ' of entity with id ' + $entity.id + \" that doesn't exist in the EntityManager\";\n };\n }\n function EntityManagerImpl$hasComponent$lambda($entity, $componentId) {\n return function () {\n return 'Trying to check if entity ' + $entity.id + ' has a component with componentId ' + $componentId + \", but the entity doesn't exist in the EntityManager\";\n };\n }\n function EntityManagerImpl$registerSystem$lambda($system) {\n return function () {\n return $system.id + ' is already registered';\n };\n }\n function EntityManagerImpl(entitiesArrayGrowSize) {\n Companion_getInstance_38();\n entitiesArrayGrowSize = entitiesArrayGrowSize === VOID ? 1000 : entitiesArrayGrowSize;\n this.p24_1 = entitiesArrayGrowSize;\n this.q24_1 = 0;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableSetOf' call\n tmp.r24_1 = LinkedHashSet_init_$Create$();\n this.s24_1 = ArrayList_init_$Create$_0(this.p24_1);\n var tmp_0 = this;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = 133 + 1 | 0;\n tmp_0.t24_1 = fillArrayVal(Array(size), null);\n var tmp_1 = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp_1.u24_1 = LinkedHashMap_init_$Create$_0();\n var tmp_2 = this;\n // Inline function 'kotlin.arrayOfNulls' call\n var size_0 = 133 + 1 | 0;\n tmp_2.v24_1 = fillArrayVal(Array(size_0), null);\n var tmp_3 = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp_3.w24_1 = LinkedHashMap_init_$Create$_0();\n var tmp_4 = this;\n // Inline function 'kotlin.arrayOfNulls' call\n var size_1 = 133 + 1 | 0;\n tmp_4.x24_1 = fillArrayVal(Array(size_1), null);\n var tmp_5 = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp_5.y24_1 = LinkedHashMap_init_$Create$_0();\n var tmp_6 = this;\n // Inline function 'kotlin.arrayOfNulls' call\n var size_2 = 133 + 1 | 0;\n tmp_6.z24_1 = fillArrayVal(Array(size_2), null);\n var tmp_7 = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp_7.a25_1 = LinkedHashMap_init_$Create$_0();\n var tmp_8 = this;\n // Inline function 'kotlin.emptyArray' call\n tmp_8.b25_1 = [];\n var tmp_9 = this;\n // Inline function 'kotlin.emptyArray' call\n tmp_9.c25_1 = [];\n this.d25_1 = new EntityManagerWatcherList();\n var inductionVariable = 0;\n if (inductionVariable <= 133)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$11 = [];\n this.v24_1[i] = tmp$ret$11;\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$12 = [];\n this.x24_1[i] = tmp$ret$12;\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$13 = [];\n this.z24_1[i] = tmp$ret$13;\n }\n while (!(i === 133));\n }\n protoOf(EntityManagerImpl).o24 = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.r24_1;\n return copyToArray(this_0);\n };\n protoOf(EntityManagerImpl).getNextId = function () {\n this.q24_1 = this.q24_1 + 1 | 0;\n return this.q24_1;\n };\n protoOf(EntityManagerImpl).allListeners = function () {\n // Inline function 'kotlin.collections.mutableMapOf' call\n var map = LinkedHashMap_init_$Create$_0();\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var indexedObject = this.t24_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var item = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.allListeners.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n if ((item == null ? null : any(item)) === true) {\n // Inline function 'kotlin.collections.set' call\n map.r2(tmp1, item);\n }\n }\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this.u24_1.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.allListeners.' call\n // Inline function 'kotlin.collections.set' call\n var key = element.t2();\n var value = element.u2();\n map.r2(key, value);\n }\n return map;\n };\n protoOf(EntityManagerImpl).createEntity = function () {\n return this.createEntityInternal(this.getNextId());\n };\n protoOf(EntityManagerImpl).createEntityInternal = function (entityId) {\n var tmp = this;\n // Inline function 'kotlin.math.max' call\n var b = this.q24_1;\n tmp.q24_1 = Math.max(entityId, b);\n if (entityId >= this.s24_1.n()) {\n growComponentsTo(this, entityId);\n }\n var entity = this.createEntityObject(entityId);\n if (!this.r24_1.q(entity)) {\n var tmp_0 = Companion_getInstance_38().logger;\n tmp_0.error(EntityManagerImpl$createEntityInternal$lambda);\n throw IllegalArgumentException_init_$Create$('Entity with id ' + entityId + ' already exists.');\n }\n this.s24_1.o(entityId, new ComponentHolder());\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.b25_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.createEntityInternal.' call\n element(entity);\n }\n return entity;\n };\n protoOf(EntityManagerImpl).createEntityObject = function (uniqueId) {\n return new Entity(uniqueId, this);\n };\n protoOf(EntityManagerImpl).disposeEntity = function (entity) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.getComponents(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.disposeEntity.' call\n notifyComponentRemoved(this, entity, element);\n }\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = this.c25_1;\n var inductionVariable_0 = 0;\n var last_0 = indexedObject_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.disposeEntity.' call\n element_0(entity);\n }\n this.removeEntityInternal(entity);\n };\n protoOf(EntityManagerImpl).removeEntityInternal = function (entity) {\n this.r24_1.r(entity);\n removeComponentHolder(this, entity.id);\n };\n protoOf(EntityManagerImpl).findEntity = function (entityId) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = this.r24_1;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.findEntity.' call\n if (element.id === entityId) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n };\n protoOf(EntityManagerImpl).addComponent = function (entity, component) {\n var tmp = EntityManagerImpl$addComponent$lambda(this);\n return addComponentWithNotifyCallback(this, entity, component, tmp, EntityManagerImpl$addComponent$lambda_0(this));\n };\n protoOf(EntityManagerImpl).addComponentInternal = function (entity, c) {\n return addComponentWithNotifyCallback(this, entity, c, null, null);\n };\n protoOf(EntityManagerImpl).removeComponent = function (entity, componentId) {\n return removeFromComponentHolder(this, entity, componentId, EntityManagerImpl$removeComponent$lambda(this));\n };\n protoOf(EntityManagerImpl).removeComponentInternal = function (entity, componentId) {\n return removeFromComponentHolder(this, entity, componentId, null);\n };\n protoOf(EntityManagerImpl).getComponents = function (entity) {\n var componentHolder_0 = componentHolder(this, entity.id);\n if (componentHolder_0 == null) {\n var tmp = Companion_getInstance_38().logger;\n tmp.error(EntityManagerImpl$getComponents$lambda(entity));\n }\n var tmp1_elvis_lhs = componentHolder_0 == null ? null : componentHolder_0.components();\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n return tmp_0;\n };\n protoOf(EntityManagerImpl).getComponent = function (entity, componentId) {\n validateInput(this, entity, componentId);\n var componentHolder_0 = componentHolder(this, entity.id);\n if (componentHolder_0 == null) {\n var tmp = Companion_getInstance_38().logger;\n tmp.error(EntityManagerImpl$getUncastComponent$lambda(componentId, entity));\n }\n return componentHolder_0 == null ? null : componentHolder_0.getComponent(componentId);\n };\n protoOf(EntityManagerImpl).__getComponentForKotlin = function (entity, componentId) {\n validateInput(this, entity, componentId);\n var componentHolder_0 = componentHolder(this, entity.id);\n if (componentHolder_0 == null) {\n var tmp = Companion_getInstance_38().logger;\n tmp.error(EntityManagerImpl$getComponent$lambda(componentId, entity));\n }\n var tmp_0;\n if (componentHolder_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.getComponent.' call\n tmp_0 = fastComponent(componentHolder_0, componentId);\n }\n return tmp_0;\n };\n protoOf(EntityManagerImpl).getComponentUnsafe = function (entity, componentId) {\n var tmp0_elvis_lhs = this.__getComponentForKotlin(entity, componentId);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw Exception_init_$Create$('Component with id ' + componentId + ' does not exist on ' + this);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(EntityManagerImpl).hasComponent = function (entity, componentId) {\n validateInput(this, entity, componentId);\n var componentHolder_0 = componentHolder(this, entity.id);\n if (componentHolder_0 == null) {\n var tmp = Companion_getInstance_38().logger;\n tmp.error(EntityManagerImpl$hasComponent$lambda(entity, componentId));\n }\n var tmp1_elvis_lhs = componentHolder_0 == null ? null : componentHolder_0.hasComponent(componentId);\n return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;\n };\n protoOf(EntityManagerImpl).isDisposed = function (entity) {\n return componentHolder(this, entity.id) == null;\n };\n protoOf(EntityManagerImpl).subscribeAdd = function (componentId, listener) {\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n // Inline function 'kotlin.collections.plus' call\n var this_0 = ensureNotNull(this.v24_1[componentId]);\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [typeof listener === 'function' ? listener : THROW_CCE()];\n var tmp$ret$4 = this_0.concat(tmp$ret$3);\n this.v24_1[componentId] = tmp$ret$4;\n } else {\n var list = this.w24_1.b3(componentId);\n var tmp0_safe_receiver = list;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$8 = [typeof listener === 'function' ? listener : THROW_CCE()];\n tmp = tmp0_safe_receiver.concat(tmp$ret$8);\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = [typeof listener === 'function' ? listener : THROW_CCE()];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n list = tmp_0;\n // Inline function 'kotlin.collections.set' call\n var this_1 = this.w24_1;\n var value = list;\n this_1.r2(componentId, value);\n }\n return listener;\n };\n protoOf(EntityManagerImpl).unsubscribeAdd = function (componentId, listener) {\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = ensureNotNull(this.v24_1[componentId]);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.unsubscribeAdd.' call\n if (!equals(element, listener)) {\n destination.q(element);\n }\n }\n var tmp$ret$3 = copyToArray(destination);\n this.v24_1[componentId] = tmp$ret$3;\n } else {\n var tmp0_safe_receiver = this.w24_1.b3(componentId);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var this_1 = this.w24_1;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = tmp0_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = tmp0_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.unsubscribeAdd..' call\n if (!equals(element_0, listener)) {\n destination_0.q(element_0);\n }\n }\n var value = copyToArray(destination_0);\n this_1.r2(componentId, value);\n }\n }\n };\n protoOf(EntityManagerImpl).subscribeUpdate = function (componentId, listener) {\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n // Inline function 'kotlin.collections.plus' call\n var this_0 = ensureNotNull(this.x24_1[componentId]);\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [typeof listener === 'function' ? listener : THROW_CCE()];\n var tmp$ret$4 = this_0.concat(tmp$ret$3);\n this.x24_1[componentId] = tmp$ret$4;\n } else {\n var list = this.y24_1.b3(componentId);\n var tmp0_safe_receiver = list;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$8 = [typeof listener === 'function' ? listener : THROW_CCE()];\n tmp = tmp0_safe_receiver.concat(tmp$ret$8);\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = [typeof listener === 'function' ? listener : THROW_CCE()];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n list = tmp_0;\n // Inline function 'kotlin.collections.set' call\n var this_1 = this.y24_1;\n var value = list;\n this_1.r2(componentId, value);\n }\n return listener;\n };\n protoOf(EntityManagerImpl).unsubscribeUpdate = function (componentId, listener) {\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = ensureNotNull(this.x24_1[componentId]);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.unsubscribeUpdate.' call\n if (!equals(element, listener)) {\n destination.q(element);\n }\n }\n var tmp$ret$3 = copyToArray(destination);\n this.x24_1[componentId] = tmp$ret$3;\n } else {\n var tmp0_safe_receiver = this.y24_1.b3(componentId);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var this_1 = this.y24_1;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = tmp0_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = tmp0_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.unsubscribeUpdate..' call\n if (!equals(element_0, listener)) {\n destination_0.q(element_0);\n }\n }\n var value = copyToArray(destination_0);\n this_1.r2(componentId, value);\n }\n }\n };\n protoOf(EntityManagerImpl).subscribeRemove = function (componentId, listener) {\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n // Inline function 'kotlin.collections.plus' call\n var this_0 = ensureNotNull(this.z24_1[componentId]);\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [typeof listener === 'function' ? listener : THROW_CCE()];\n var tmp$ret$4 = this_0.concat(tmp$ret$3);\n this.z24_1[componentId] = tmp$ret$4;\n } else {\n var list = this.a25_1.b3(componentId);\n var tmp0_safe_receiver = list;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$8 = [typeof listener === 'function' ? listener : THROW_CCE()];\n tmp = tmp0_safe_receiver.concat(tmp$ret$8);\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = [typeof listener === 'function' ? listener : THROW_CCE()];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n list = tmp_0;\n // Inline function 'kotlin.collections.set' call\n var this_1 = this.a25_1;\n var value = list;\n this_1.r2(componentId, value);\n }\n return listener;\n };\n protoOf(EntityManagerImpl).unsubscribeRemove = function (componentId, listener) {\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = ensureNotNull(this.z24_1[componentId]);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.unsubscribeRemove.' call\n if (!equals(element, listener)) {\n destination.q(element);\n }\n }\n var tmp$ret$3 = copyToArray(destination);\n this.z24_1[componentId] = tmp$ret$3;\n } else {\n var tmp0_safe_receiver = this.a25_1.b3(componentId);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var this_1 = this.a25_1;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = tmp0_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = tmp0_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.unsubscribeRemove..' call\n if (!equals(element_0, listener)) {\n destination_0.q(element_0);\n }\n }\n var value = copyToArray(destination_0);\n this_1.r2(componentId, value);\n }\n }\n };\n protoOf(EntityManagerImpl).subscribeEntityCreated = function (listener) {\n var tmp = this;\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$0 = this.b25_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [listener];\n tmp.b25_1 = tmp$ret$0.concat(tmp$ret$3);\n };\n protoOf(EntityManagerImpl).unsubscribeEntityCreated = function (listener) {\n var tmp = this;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.b25_1;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.unsubscribeEntityCreated.' call\n if (!equals(element, listener)) {\n destination.q(element);\n }\n }\n tmp.b25_1 = copyToArray(destination);\n };\n protoOf(EntityManagerImpl).subscribeEntityRemoved = function (listener) {\n var tmp = this;\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$0 = this.c25_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [listener];\n tmp.c25_1 = tmp$ret$0.concat(tmp$ret$3);\n };\n protoOf(EntityManagerImpl).unsubscribeEntityRemoved = function (listener) {\n var tmp = this;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.c25_1;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.unsubscribeEntityRemoved.' call\n if (!equals(element, listener)) {\n destination.q(element);\n }\n }\n tmp.c25_1 = copyToArray(destination);\n };\n protoOf(EntityManagerImpl).removeAllComponents = function (entity) {\n var components = this.getComponents(entity);\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = components.length;\n while (inductionVariable < last) {\n var element = components[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.removeAllComponents.' call\n notifyComponentRemoved(this, entity, element);\n }\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = components.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = components[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.removeAllComponents.' call\n this.removeComponentInternal(entity, element_0.typeId);\n }\n return components;\n };\n protoOf(EntityManagerImpl).registerSystem = function (system) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = this.getSystemsRegistered();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.registerSystem.' call\n if (equals(element, system)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n if (tmp$ret$1) {\n var tmp = Companion_getInstance_38().logger;\n tmp.warn(EntityManagerImpl$registerSystem$lambda(system));\n return Unit_instance;\n }\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = system.componentListeners;\n var inductionVariable_0 = 0;\n var last_0 = indexedObject_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.registerSystem.' call\n if (element_0.componentId < this.t24_1.length) {\n if (this.t24_1[element_0.componentId] == null) {\n var tmp_0 = element_0.componentId;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = [element_0];\n this.t24_1[tmp_0] = tmp$ret$4;\n } else {\n var tmp_1 = element_0.componentId;\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = ensureNotNull(this.t24_1[element_0.componentId]);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$8 = [element_0];\n var tmp$ret$9 = tmp$ret$5.concat(tmp$ret$8);\n this.t24_1[tmp_1] = tmp$ret$9;\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var sorted = SystemGraphHelper_getInstance().sortListeners(ensureNotNull(this.t24_1[element_0.componentId]));\n this.t24_1[element_0.componentId] = sorted;\n }\n } else {\n if (!this.u24_1.y2(element_0.componentId)) {\n // Inline function 'kotlin.collections.set' call\n var this_0 = this.u24_1;\n var key = element_0.componentId;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var value = [element_0];\n this_0.r2(key, value);\n } else {\n // Inline function 'kotlin.collections.set' call\n var this_1 = this.u24_1;\n var key_0 = element_0.componentId;\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$14 = ensureNotNull(this.u24_1.b3(element_0.componentId));\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$17 = [element_0];\n var value_0 = tmp$ret$14.concat(tmp$ret$17);\n this_1.r2(key_0, value_0);\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var sorted_0 = SystemGraphHelper_getInstance().sortListeners(ensureNotNull(this.u24_1.b3(element_0.componentId)));\n var this_2 = this.u24_1;\n var key_1 = element_0.componentId;\n this_2.r2(key_1, sorted_0);\n }\n }\n }\n system.onRegister();\n };\n protoOf(EntityManagerImpl).unregisterSystem = function (system) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = system.componentListeners;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.unregisterSystem.' call\n if (element.componentId < this.t24_1.length) {\n if (!(this.t24_1[element.componentId] == null)) {\n var tmp = element.componentId;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = ensureNotNull(this.t24_1[element.componentId]);\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = this_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.unregisterSystem..' call\n if (!equals(element_0, element)) {\n destination.q(element_0);\n }\n }\n var tmp$ret$3 = copyToArray(destination);\n this.t24_1[tmp] = tmp$ret$3;\n }\n } else {\n if (this.u24_1.y2(element.componentId)) {\n // Inline function 'kotlin.collections.set' call\n var this_1 = this.u24_1;\n var key = element.componentId;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_2 = ensureNotNull(this.u24_1.b3(element.componentId));\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_1 = 0;\n var last_1 = this_2.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = this_2[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.unregisterSystem..' call\n if (!equals(element_1, element)) {\n destination_0.q(element_1);\n }\n }\n var value = copyToArray(destination_0);\n this_1.r2(key, value);\n }\n }\n }\n system.onUnregister();\n };\n protoOf(EntityManagerImpl).getSystem = function (systemId) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = this.getSystemsRegistered();\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.getSystem.' call\n if (element.id === systemId) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n };\n protoOf(EntityManagerImpl).getSystemsRegisteredForComponent = function (componentId) {\n var tmp0_elvis_lhs = componentListeners(this, componentId);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var listeners = tmp;\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = listeners.length;\n while (inductionVariable < last) {\n var element = listeners[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.getSystemsRegisteredForComponent.' call\n var tmp0_safe_receiver = element.ownerSystem;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n var systems = destination;\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(systems);\n };\n protoOf(EntityManagerImpl).getSystemsRegistered = function () {\n // Inline function 'kotlin.collections.mutableSetOf' call\n var all = LinkedHashSet_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.t24_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.getSystemsRegistered.' call\n if (element == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = element.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = element[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.getSystemsRegistered..' call\n var tmp0_safe_receiver = element_0.ownerSystem;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n all.q(tmp0_safe_receiver);\n }\n }\n }\n }\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this.u24_1.q2().t();\n while (tmp0_iterator.u()) {\n var element_1 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.getSystemsRegistered.' call\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = element_1.u2();\n var inductionVariable_1 = 0;\n var last_1 = indexedObject_0.length;\n while (inductionVariable_1 < last_1) {\n var element_2 = indexedObject_0[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.EntityManagerImpl.getSystemsRegistered..' call\n var tmp0_safe_receiver_0 = element_2.ownerSystem;\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n all.q(tmp0_safe_receiver_0);\n }\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(all);\n };\n protoOf(EntityManagerImpl).anonymousListenersCountForAddComponent = function (componentId) {\n var tmp;\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n var tmp0_safe_receiver = this.v24_1[componentId];\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.length;\n tmp = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n } else {\n var tmp2_safe_receiver = this.w24_1.b3(componentId);\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.length;\n tmp = tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs;\n }\n return tmp;\n };\n protoOf(EntityManagerImpl).anonymousListenersCountForUpdateComponent = function (componentId) {\n var tmp;\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n var tmp0_safe_receiver = this.x24_1[componentId];\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.length;\n tmp = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n } else {\n var tmp2_safe_receiver = this.y24_1.b3(componentId);\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.length;\n tmp = tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs;\n }\n return tmp;\n };\n protoOf(EntityManagerImpl).anonymousListenersCountForRemoveComponent = function (componentId) {\n var tmp;\n if (ComponentIds_instance.isCoreComponentId(componentId)) {\n var tmp0_safe_receiver = this.z24_1[componentId];\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.length;\n tmp = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n } else {\n var tmp2_safe_receiver = this.a25_1.b3(componentId);\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.length;\n tmp = tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs;\n }\n return tmp;\n };\n protoOf(EntityManagerImpl).addWatcher = function (watcher) {\n this.d25_1.g25(watcher);\n };\n protoOf(EntityManagerImpl).removeWatcher = function (watcher) {\n this.d25_1.h25(watcher);\n };\n function EntityManagerWatcher() {\n }\n function EntityManagerWatcherList() {\n var tmp = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp.f25_1 = ArrayList_init_$Create$();\n }\n protoOf(EntityManagerWatcherList).n = function () {\n return this.f25_1.n();\n };\n protoOf(EntityManagerWatcherList).g25 = function (element) {\n return this.f25_1.q(element);\n };\n protoOf(EntityManagerWatcherList).q = function (element) {\n return this.g25((!(element == null) ? isInterface(element, EntityManagerWatcher) : false) ? element : THROW_CCE());\n };\n protoOf(EntityManagerWatcherList).i25 = function (index, element) {\n this.f25_1.w1(index, element);\n };\n protoOf(EntityManagerWatcherList).w1 = function (index, element) {\n return this.i25(index, (!(element == null) ? isInterface(element, EntityManagerWatcher) : false) ? element : THROW_CCE());\n };\n protoOf(EntityManagerWatcherList).j25 = function (index, elements) {\n return this.f25_1.y1(index, elements);\n };\n protoOf(EntityManagerWatcherList).y1 = function (index, elements) {\n return this.j25(index, elements);\n };\n protoOf(EntityManagerWatcherList).k25 = function (elements) {\n return this.f25_1.x(elements);\n };\n protoOf(EntityManagerWatcherList).x = function (elements) {\n return this.k25(elements);\n };\n protoOf(EntityManagerWatcherList).z = function () {\n this.f25_1.z();\n };\n protoOf(EntityManagerWatcherList).l25 = function (element) {\n return this.f25_1.p(element);\n };\n protoOf(EntityManagerWatcherList).p = function (element) {\n if (!(!(element == null) ? isInterface(element, EntityManagerWatcher) : false))\n return false;\n return this.l25((!(element == null) ? isInterface(element, EntityManagerWatcher) : false) ? element : THROW_CCE());\n };\n protoOf(EntityManagerWatcherList).m25 = function (elements) {\n return this.f25_1.a1(elements);\n };\n protoOf(EntityManagerWatcherList).a1 = function (elements) {\n return this.m25(elements);\n };\n protoOf(EntityManagerWatcherList).f1 = function (index) {\n return this.f25_1.f1(index);\n };\n protoOf(EntityManagerWatcherList).n25 = function (element) {\n return this.f25_1.a2(element);\n };\n protoOf(EntityManagerWatcherList).a2 = function (element) {\n if (!(!(element == null) ? isInterface(element, EntityManagerWatcher) : false))\n return -1;\n return this.n25((!(element == null) ? isInterface(element, EntityManagerWatcher) : false) ? element : THROW_CCE());\n };\n protoOf(EntityManagerWatcherList).b1 = function () {\n return this.f25_1.b1();\n };\n protoOf(EntityManagerWatcherList).t = function () {\n return this.f25_1.t();\n };\n protoOf(EntityManagerWatcherList).o25 = function (element) {\n return this.f25_1.b2(element);\n };\n protoOf(EntityManagerWatcherList).b2 = function (element) {\n if (!(!(element == null) ? isInterface(element, EntityManagerWatcher) : false))\n return -1;\n return this.o25((!(element == null) ? isInterface(element, EntityManagerWatcher) : false) ? element : THROW_CCE());\n };\n protoOf(EntityManagerWatcherList).c2 = function () {\n return this.f25_1.c2();\n };\n protoOf(EntityManagerWatcherList).d2 = function (index) {\n return this.f25_1.d2(index);\n };\n protoOf(EntityManagerWatcherList).h25 = function (element) {\n return this.f25_1.r(element);\n };\n protoOf(EntityManagerWatcherList).r = function (element) {\n if (!(!(element == null) ? isInterface(element, EntityManagerWatcher) : false))\n return false;\n return this.h25((!(element == null) ? isInterface(element, EntityManagerWatcher) : false) ? element : THROW_CCE());\n };\n protoOf(EntityManagerWatcherList).p25 = function (elements) {\n return this.f25_1.y(elements);\n };\n protoOf(EntityManagerWatcherList).y = function (elements) {\n return this.p25(elements);\n };\n protoOf(EntityManagerWatcherList).h1 = function (index) {\n return this.f25_1.h1(index);\n };\n protoOf(EntityManagerWatcherList).q25 = function (elements) {\n return this.f25_1.z1(elements);\n };\n protoOf(EntityManagerWatcherList).z1 = function (elements) {\n return this.q25(elements);\n };\n protoOf(EntityManagerWatcherList).r25 = function (index, element) {\n return this.f25_1.o(index, element);\n };\n protoOf(EntityManagerWatcherList).o = function (index, element) {\n return this.r25(index, (!(element == null) ? isInterface(element, EntityManagerWatcher) : false) ? element : THROW_CCE());\n };\n protoOf(EntityManagerWatcherList).e2 = function (fromIndex, toIndex) {\n return this.f25_1.e2(fromIndex, toIndex);\n };\n protoOf(EntityManagerWatcherList).beforeAddComponent = function (entity, component) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerWatcherList.beforeAddComponent.' call\n element.beforeAddComponent(entity, component);\n }\n };\n protoOf(EntityManagerWatcherList).afterAddComponent = function (entity, component) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerWatcherList.afterAddComponent.' call\n element.afterAddComponent(entity, component);\n }\n };\n protoOf(EntityManagerWatcherList).beforeRemoveComponent = function (entity, componentId) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerWatcherList.beforeRemoveComponent.' call\n element.beforeRemoveComponent(entity, componentId);\n }\n };\n protoOf(EntityManagerWatcherList).afterRemoveComponent = function (entity, componentId) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerWatcherList.afterRemoveComponent.' call\n element.afterRemoveComponent(entity, componentId);\n }\n };\n protoOf(EntityManagerWatcherList).beforeNotifyOnAdd = function (componentListener) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerWatcherList.beforeNotifyOnAdd.' call\n element.beforeNotifyOnAdd(componentListener);\n }\n };\n protoOf(EntityManagerWatcherList).afterNotifyOnAdd = function (componentListener) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerWatcherList.afterNotifyOnAdd.' call\n element.afterNotifyOnAdd(componentListener);\n }\n };\n protoOf(EntityManagerWatcherList).beforeNotifyOnUpdate = function (componentListener) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerWatcherList.beforeNotifyOnUpdate.' call\n element.beforeNotifyOnUpdate(componentListener);\n }\n };\n protoOf(EntityManagerWatcherList).afterNotifyOnUpdate = function (componentListener) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerWatcherList.afterNotifyOnUpdate.' call\n element.afterNotifyOnUpdate(componentListener);\n }\n };\n protoOf(EntityManagerWatcherList).beforeNotifyOnRemove = function (componentListener) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerWatcherList.beforeNotifyOnRemove.' call\n element.beforeNotifyOnRemove(componentListener);\n }\n };\n protoOf(EntityManagerWatcherList).afterNotifyOnRemove = function (componentListener) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.EntityManagerWatcherList.afterNotifyOnRemove.' call\n element.afterNotifyOnRemove(componentListener);\n }\n };\n function EcsSystemImpl() {\n this.c1p_1 = true;\n }\n protoOf(EcsSystemImpl).y1n = function () {\n return this.c1p_1;\n };\n protoOf(EcsSystemImpl).enable = function () {\n this.c1p_1 = true;\n };\n protoOf(EcsSystemImpl).disable = function () {\n this.c1p_1 = false;\n };\n protoOf(EcsSystemImpl).register = function (entityManager) {\n entityManager.registerSystem(this);\n };\n protoOf(EcsSystemImpl).unregister = function (entityManager) {\n entityManager.unregisterSystem(this);\n };\n protoOf(EcsSystemImpl).onRegister = function () {\n };\n protoOf(EcsSystemImpl).onUnregister = function () {\n };\n function ComponentListenerImpl(ownerSystem, componentId, onComponentAddedRef, onComponentUpdatedRef, onComponentRemovedRef) {\n this.s25_1 = ownerSystem;\n this.t25_1 = componentId;\n this.u25_1 = onComponentAddedRef;\n this.v25_1 = onComponentUpdatedRef;\n this.w25_1 = onComponentRemovedRef;\n }\n protoOf(ComponentListenerImpl).l24 = function () {\n return this.s25_1;\n };\n protoOf(ComponentListenerImpl).v1o = function () {\n return this.t25_1;\n };\n protoOf(ComponentListenerImpl).onAdd = function (entity, newComponent) {\n this.u25_1(entity, unsafeCast(newComponent));\n };\n protoOf(ComponentListenerImpl).onUpdate = function (entity, oldComponent, newComponent) {\n this.v25_1(entity, unsafeCast(oldComponent), unsafeCast(newComponent));\n };\n protoOf(ComponentListenerImpl).onRemove = function (entity, oldComponent) {\n this.w25_1(entity, unsafeCast(oldComponent));\n };\n function Companion_38() {\n Companion_instance_38 = this;\n this.logger = LoggerState_getInstance().m1m('SystemBase');\n }\n protoOf(Companion_38).x1i = function () {\n return this.logger;\n };\n var Companion_instance_38;\n function Companion_getInstance_39() {\n if (Companion_instance_38 == null)\n new Companion_38();\n return Companion_instance_38;\n }\n function SystemBase$onAddComponent$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent';\n return l;\n }\n function SystemBase$onUpdateComponent$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent';\n return l;\n }\n function SystemBase$onRemoveComponent$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent';\n return l;\n }\n function SystemBase$printDependencies$lambda(this$0) {\n return function () {\n return this$0.id;\n };\n }\n function SystemBase$printDependencies$lambda_0(this$0) {\n return function () {\n return ' listens to: ' + this$0.componentId;\n };\n }\n function SystemBase$printDependencies$lambda_1(this$0) {\n return function () {\n return ' changes: ' + joinToString_0(this$0.doingChangesOnComponent, ', ');\n };\n }\n function SystemBase$printDependencies$lambda_2($before) {\n return function () {\n return ' before me: ' + joinToString_0($before, ', ');\n };\n }\n function SystemBase$printDependencies$lambda_3($before) {\n return function () {\n return ' after me: ' + joinToString_0($before, ', ');\n };\n }\n function SystemBase(id, componentId, doingChangesOnComponent, systemsBeforeMe, systemsAfterMe, mandatoryComponents, ignoreEntitiesWithComponents) {\n Companion_getInstance_39();\n var tmp;\n if (doingChangesOnComponent === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = doingChangesOnComponent;\n }\n doingChangesOnComponent = tmp;\n systemsBeforeMe = systemsBeforeMe === VOID ? null : systemsBeforeMe;\n systemsAfterMe = systemsAfterMe === VOID ? null : systemsAfterMe;\n mandatoryComponents = mandatoryComponents === VOID ? null : mandatoryComponents;\n ignoreEntitiesWithComponents = ignoreEntitiesWithComponents === VOID ? null : ignoreEntitiesWithComponents;\n EcsSystemImpl.call(this);\n this.o1o_1 = id;\n this.componentId = componentId;\n this.p1o_1 = doingChangesOnComponent;\n this.q1o_1 = systemsBeforeMe;\n this.r1o_1 = systemsAfterMe;\n this.s1o_1 = mandatoryComponents;\n this.t1o_1 = ignoreEntitiesWithComponents;\n var tmp_0 = this;\n // Inline function 'kotlin.emptyArray' call\n tmp_0.u1o_1 = [];\n }\n protoOf(SystemBase).s1k = function () {\n return this.o1o_1;\n };\n protoOf(SystemBase).v1o = function () {\n return this.componentId;\n };\n protoOf(SystemBase).w1o = function () {\n return this.p1o_1;\n };\n protoOf(SystemBase).x1o = function () {\n return this.q1o_1;\n };\n protoOf(SystemBase).y1o = function () {\n return this.r1o_1;\n };\n protoOf(SystemBase).z1o = function () {\n return this.s1o_1;\n };\n protoOf(SystemBase).a1p = function () {\n return this.t1o_1;\n };\n protoOf(SystemBase).onAddComponent = function (entity, newComponent) {\n };\n protoOf(SystemBase).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(SystemBase).onRemoveComponent = function (entity, oldComponent) {\n };\n protoOf(SystemBase).b1p = function () {\n // Inline function 'kotlin.collections.isEmpty' call\n if (this.u1o_1.length === 0) {\n this.u1o_1 = this.createComponentListeners();\n }\n return this.u1o_1;\n };\n protoOf(SystemBase).createComponentListeners = function () {\n // Inline function 'kotlin.arrayOf' call\n var tmp = SystemBase$onAddComponent$ref(this);\n var tmp_0 = SystemBase$onUpdateComponent$ref(this);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [new ComponentListenerImpl(this, this.componentId, tmp, tmp_0, SystemBase$onRemoveComponent$ref(this))];\n };\n protoOf(SystemBase).printDependencies = function () {\n var tmp = Companion_getInstance_39().logger;\n tmp.info(SystemBase$printDependencies$lambda(this));\n var tmp_0 = Companion_getInstance_39().logger;\n tmp_0.info(SystemBase$printDependencies$lambda_0(this));\n var tmp_1 = Companion_getInstance_39().logger;\n tmp_1.info(SystemBase$printDependencies$lambda_1(this));\n var tmp0_safe_receiver = this.systemsBeforeMe;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_2 = Companion_getInstance_39().logger;\n tmp_2.info(SystemBase$printDependencies$lambda_2(tmp0_safe_receiver));\n }\n var tmp1_safe_receiver = this.systemsAfterMe;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_3 = Companion_getInstance_39().logger;\n tmp_3.info(SystemBase$printDependencies$lambda_3(tmp1_safe_receiver));\n }\n };\n function SystemBase2$onAddComponent$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent';\n return l;\n }\n function SystemBase2$onUpdateComponent$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent';\n return l;\n }\n function SystemBase2$onRemoveComponent$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent';\n return l;\n }\n function SystemBase2$onAddComponent2$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent2(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent2';\n return l;\n }\n function SystemBase2$onUpdateComponent2$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent2(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent2';\n return l;\n }\n function SystemBase2$onRemoveComponent2$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent2(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent2';\n return l;\n }\n function SystemBase2(id, component1Id, component2Id, doingChangesOnComponent, systemsBeforeMe, systemsAfterMe) {\n var tmp;\n if (doingChangesOnComponent === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = doingChangesOnComponent;\n }\n doingChangesOnComponent = tmp;\n systemsBeforeMe = systemsBeforeMe === VOID ? null : systemsBeforeMe;\n systemsAfterMe = systemsAfterMe === VOID ? null : systemsAfterMe;\n SystemBase.call(this, id, component1Id, doingChangesOnComponent, systemsBeforeMe, systemsAfterMe);\n this.component1Id = component1Id;\n this.component2Id = component2Id;\n }\n protoOf(SystemBase2).l1o = function () {\n return this.component1Id;\n };\n protoOf(SystemBase2).m1o = function () {\n return this.component2Id;\n };\n protoOf(SystemBase2).onAddComponent2 = function (entity, newComponent) {\n };\n protoOf(SystemBase2).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n };\n protoOf(SystemBase2).onRemoveComponent2 = function (entity, oldComponent) {\n };\n protoOf(SystemBase2).createComponentListeners = function () {\n // Inline function 'kotlin.arrayOf' call\n var tmp = SystemBase2$onAddComponent$ref(this);\n var tmp_0 = SystemBase2$onUpdateComponent$ref(this);\n var tmp_1 = new ComponentListenerImpl(this, this.component1Id, tmp, tmp_0, SystemBase2$onRemoveComponent$ref(this));\n var tmp_2 = SystemBase2$onAddComponent2$ref(this);\n var tmp_3 = SystemBase2$onUpdateComponent2$ref(this);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [tmp_1, new ComponentListenerImpl(this, this.component2Id, tmp_2, tmp_3, SystemBase2$onRemoveComponent2$ref(this))];\n };\n function SystemBase3$onAddComponent$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent';\n return l;\n }\n function SystemBase3$onUpdateComponent$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent';\n return l;\n }\n function SystemBase3$onRemoveComponent$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent';\n return l;\n }\n function SystemBase3$onAddComponent2$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent2(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent2';\n return l;\n }\n function SystemBase3$onUpdateComponent2$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent2(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent2';\n return l;\n }\n function SystemBase3$onRemoveComponent2$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent2(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent2';\n return l;\n }\n function SystemBase3$onAddComponent3$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent3(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent3';\n return l;\n }\n function SystemBase3$onUpdateComponent3$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent3(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent3';\n return l;\n }\n function SystemBase3$onRemoveComponent3$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent3(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent3';\n return l;\n }\n function SystemBase3(id, component1Id, component2Id, component3Id, doingChangesOnComponent, systemsBeforeMe, systemsAfterMe) {\n var tmp;\n if (doingChangesOnComponent === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = doingChangesOnComponent;\n }\n doingChangesOnComponent = tmp;\n systemsBeforeMe = systemsBeforeMe === VOID ? null : systemsBeforeMe;\n systemsAfterMe = systemsAfterMe === VOID ? null : systemsAfterMe;\n SystemBase2.call(this, id, component1Id, component2Id, doingChangesOnComponent, systemsBeforeMe, systemsAfterMe);\n this.component3Id = component3Id;\n }\n protoOf(SystemBase3).f26 = function () {\n return this.component3Id;\n };\n protoOf(SystemBase3).onAddComponent3 = function (entity, newComponent) {\n };\n protoOf(SystemBase3).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n };\n protoOf(SystemBase3).onRemoveComponent3 = function (entity, oldComponent) {\n };\n protoOf(SystemBase3).createComponentListeners = function () {\n // Inline function 'kotlin.arrayOf' call\n var tmp = SystemBase3$onAddComponent$ref(this);\n var tmp_0 = SystemBase3$onUpdateComponent$ref(this);\n var tmp_1 = new ComponentListenerImpl(this, this.component1Id, tmp, tmp_0, SystemBase3$onRemoveComponent$ref(this));\n var tmp_2 = SystemBase3$onAddComponent2$ref(this);\n var tmp_3 = SystemBase3$onUpdateComponent2$ref(this);\n var tmp_4 = new ComponentListenerImpl(this, this.component2Id, tmp_2, tmp_3, SystemBase3$onRemoveComponent2$ref(this));\n var tmp_5 = SystemBase3$onAddComponent3$ref(this);\n var tmp_6 = SystemBase3$onUpdateComponent3$ref(this);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [tmp_1, tmp_4, new ComponentListenerImpl(this, this.component3Id, tmp_5, tmp_6, SystemBase3$onRemoveComponent3$ref(this))];\n };\n function SystemBase4$onAddComponent$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent';\n return l;\n }\n function SystemBase4$onUpdateComponent$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent';\n return l;\n }\n function SystemBase4$onRemoveComponent$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent';\n return l;\n }\n function SystemBase4$onAddComponent2$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent2(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent2';\n return l;\n }\n function SystemBase4$onUpdateComponent2$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent2(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent2';\n return l;\n }\n function SystemBase4$onRemoveComponent2$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent2(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent2';\n return l;\n }\n function SystemBase4$onAddComponent3$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent3(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent3';\n return l;\n }\n function SystemBase4$onUpdateComponent3$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent3(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent3';\n return l;\n }\n function SystemBase4$onRemoveComponent3$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent3(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent3';\n return l;\n }\n function SystemBase4$onAddComponent4$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent4(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent4';\n return l;\n }\n function SystemBase4$onUpdateComponent4$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent4(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent4';\n return l;\n }\n function SystemBase4$onRemoveComponent4$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent4(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent4';\n return l;\n }\n function SystemBase4(id, component1Id, component2Id, component3Id, component4Id, doingChangesOnComponent, systemsBeforeMe, systemsAfterMe) {\n var tmp;\n if (doingChangesOnComponent === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = doingChangesOnComponent;\n }\n doingChangesOnComponent = tmp;\n systemsBeforeMe = systemsBeforeMe === VOID ? null : systemsBeforeMe;\n systemsAfterMe = systemsAfterMe === VOID ? null : systemsAfterMe;\n SystemBase3.call(this, id, component1Id, component2Id, component3Id, doingChangesOnComponent, systemsBeforeMe, systemsAfterMe);\n this.component4Id = component4Id;\n }\n protoOf(SystemBase4).o26 = function () {\n return this.component4Id;\n };\n protoOf(SystemBase4).onAddComponent4 = function (entity, newComponent) {\n };\n protoOf(SystemBase4).onUpdateComponent4 = function (entity, oldComponent, newComponent) {\n };\n protoOf(SystemBase4).onRemoveComponent4 = function (entity, oldComponent) {\n };\n protoOf(SystemBase4).createComponentListeners = function () {\n // Inline function 'kotlin.arrayOf' call\n var tmp = SystemBase4$onAddComponent$ref(this);\n var tmp_0 = SystemBase4$onUpdateComponent$ref(this);\n var tmp_1 = new ComponentListenerImpl(this, this.component1Id, tmp, tmp_0, SystemBase4$onRemoveComponent$ref(this));\n var tmp_2 = SystemBase4$onAddComponent2$ref(this);\n var tmp_3 = SystemBase4$onUpdateComponent2$ref(this);\n var tmp_4 = new ComponentListenerImpl(this, this.component2Id, tmp_2, tmp_3, SystemBase4$onRemoveComponent2$ref(this));\n var tmp_5 = SystemBase4$onAddComponent3$ref(this);\n var tmp_6 = SystemBase4$onUpdateComponent3$ref(this);\n var tmp_7 = new ComponentListenerImpl(this, this.component3Id, tmp_5, tmp_6, SystemBase4$onRemoveComponent3$ref(this));\n var tmp_8 = SystemBase4$onAddComponent4$ref(this);\n var tmp_9 = SystemBase4$onUpdateComponent4$ref(this);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [tmp_1, tmp_4, tmp_7, new ComponentListenerImpl(this, this.component4Id, tmp_8, tmp_9, SystemBase4$onRemoveComponent4$ref(this))];\n };\n function SystemBase5$onAddComponent$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent';\n return l;\n }\n function SystemBase5$onUpdateComponent$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent';\n return l;\n }\n function SystemBase5$onRemoveComponent$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent';\n return l;\n }\n function SystemBase5$onAddComponent2$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent2(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent2';\n return l;\n }\n function SystemBase5$onUpdateComponent2$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent2(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent2';\n return l;\n }\n function SystemBase5$onRemoveComponent2$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent2(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent2';\n return l;\n }\n function SystemBase5$onAddComponent3$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent3(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent3';\n return l;\n }\n function SystemBase5$onUpdateComponent3$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent3(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent3';\n return l;\n }\n function SystemBase5$onRemoveComponent3$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent3(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent3';\n return l;\n }\n function SystemBase5$onAddComponent4$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent4(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent4';\n return l;\n }\n function SystemBase5$onUpdateComponent4$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent4(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent4';\n return l;\n }\n function SystemBase5$onRemoveComponent4$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent4(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent4';\n return l;\n }\n function SystemBase5$onAddComponent5$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onAddComponent5(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onAddComponent5';\n return l;\n }\n function SystemBase5$onUpdateComponent5$ref($boundThis) {\n var l = function (p0, p1, p2) {\n $boundThis.onUpdateComponent5(p0, p1, p2);\n return Unit_instance;\n };\n l.callableName = 'onUpdateComponent5';\n return l;\n }\n function SystemBase5$onRemoveComponent5$ref($boundThis) {\n var l = function (p0, p1) {\n $boundThis.onRemoveComponent5(p0, p1);\n return Unit_instance;\n };\n l.callableName = 'onRemoveComponent5';\n return l;\n }\n function SystemBase5(id, component1Id, component2Id, component3Id, component4Id, component5Id, doingChangesOnComponent, systemsBeforeMe, systemsAfterMe) {\n var tmp;\n if (doingChangesOnComponent === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = doingChangesOnComponent;\n }\n doingChangesOnComponent = tmp;\n systemsBeforeMe = systemsBeforeMe === VOID ? null : systemsBeforeMe;\n systemsAfterMe = systemsAfterMe === VOID ? null : systemsAfterMe;\n SystemBase4.call(this, id, component1Id, component2Id, component3Id, component4Id, doingChangesOnComponent, systemsBeforeMe, systemsAfterMe);\n this.component5Id = component5Id;\n }\n protoOf(SystemBase5).x26 = function () {\n return this.component5Id;\n };\n protoOf(SystemBase5).onAddComponent5 = function (entity, newComponent) {\n };\n protoOf(SystemBase5).onUpdateComponent5 = function (entity, oldComponent, newComponent) {\n };\n protoOf(SystemBase5).onRemoveComponent5 = function (entity, oldComponent) {\n };\n protoOf(SystemBase5).createComponentListeners = function () {\n // Inline function 'kotlin.arrayOf' call\n var tmp = SystemBase5$onAddComponent$ref(this);\n var tmp_0 = SystemBase5$onUpdateComponent$ref(this);\n var tmp_1 = new ComponentListenerImpl(this, this.component1Id, tmp, tmp_0, SystemBase5$onRemoveComponent$ref(this));\n var tmp_2 = SystemBase5$onAddComponent2$ref(this);\n var tmp_3 = SystemBase5$onUpdateComponent2$ref(this);\n var tmp_4 = new ComponentListenerImpl(this, this.component2Id, tmp_2, tmp_3, SystemBase5$onRemoveComponent2$ref(this));\n var tmp_5 = SystemBase5$onAddComponent3$ref(this);\n var tmp_6 = SystemBase5$onUpdateComponent3$ref(this);\n var tmp_7 = new ComponentListenerImpl(this, this.component3Id, tmp_5, tmp_6, SystemBase5$onRemoveComponent3$ref(this));\n var tmp_8 = SystemBase5$onAddComponent4$ref(this);\n var tmp_9 = SystemBase5$onUpdateComponent4$ref(this);\n var tmp_10 = new ComponentListenerImpl(this, this.component4Id, tmp_8, tmp_9, SystemBase5$onRemoveComponent4$ref(this));\n var tmp_11 = SystemBase5$onAddComponent5$ref(this);\n var tmp_12 = SystemBase5$onUpdateComponent5$ref(this);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [tmp_1, tmp_4, tmp_7, tmp_10, new ComponentListenerImpl(this, this.component5Id, tmp_11, tmp_12, SystemBase5$onRemoveComponent5$ref(this))];\n };\n function convertGraphToArray($this, listeners, edges) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var resultingList = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = listeners.length;\n while (inductionVariable < last) {\n var element = listeners[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.convertGraphToArray.' call\n // Inline function 'kotlin.collections.find' call\n var this_0 = edges.p2();\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.convertGraphToArray..' call\n if (contains(element_0, element)) {\n tmp$ret$2 = element_0;\n break $l$block;\n }\n }\n tmp$ret$2 = null;\n }\n if (tmp$ret$2 == null) {\n convertGraphToArray$iterateGraph(resultingList, edges, element);\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(resultingList);\n }\n function extractOrderOfRegistrationEdgesArr($this, listeners, edges) {\n var previous = null;\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = listeners.length;\n while (inductionVariable < last) {\n var element = listeners[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.extractOrderOfRegistrationEdgesArr.' call\n var tmp;\n if (!(previous == null) ? edges.b3(element) == null : false) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = edges.p2();\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.extractOrderOfRegistrationEdgesArr..' call\n if (contains(element_0, element)) {\n tmp$ret$1 = element_0;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp = tmp$ret$1 == null;\n } else {\n tmp = false;\n }\n if (tmp) {\n // Inline function 'kotlin.collections.getOrElse' call\n var key = ensureNotNull(previous);\n var tmp0_elvis_lhs = edges.b3(key);\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.extractOrderOfRegistrationEdgesArr..' call\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n var list = tmp_0;\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$6 = list;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$9 = [element];\n list = tmp$ret$6.concat(tmp$ret$9);\n // Inline function 'kotlin.collections.set' call\n var key_0 = ensureNotNull(previous);\n var value = list;\n edges.r2(key_0, value);\n }\n previous = element;\n }\n }\n function extractRealEdgesArr($this, listeners) {\n // Inline function 'kotlin.collections.mutableMapOf' call\n var edges = LinkedHashMap_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = listeners.length;\n while (inductionVariable < last) {\n var element = listeners[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.extractRealEdgesArr.' call\n var tmp0_safe_receiver = element.ownerSystem;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.systemsAfterMe;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = tmp1_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = tmp1_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.extractRealEdgesArr..' call\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_1 = 0;\n var last_1 = listeners.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = listeners[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.extractRealEdgesArr...' call\n var tmp0_safe_receiver_0 = element_1.ownerSystem;\n if ((tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.id) === element_0) {\n tmp$ret$2 = element_1;\n break $l$block;\n }\n }\n tmp$ret$2 = null;\n }\n var tmp0_safe_receiver_1 = tmp$ret$2;\n if (tmp0_safe_receiver_1 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.getOrElse' call\n var tmp0_elvis_lhs = edges.b3(element);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.extractRealEdgesArr....' call\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var list = tmp;\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$7 = list;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$10 = [tmp0_safe_receiver_1];\n list = tmp$ret$7.concat(tmp$ret$10);\n var value = list;\n edges.r2(element, value);\n }\n }\n }\n var tmp2_safe_receiver = element.ownerSystem;\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.systemsBeforeMe;\n if (tmp3_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_2 = 0;\n var last_2 = tmp3_safe_receiver.length;\n while (inductionVariable_2 < last_2) {\n var element_2 = tmp3_safe_receiver[inductionVariable_2];\n inductionVariable_2 = inductionVariable_2 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.extractRealEdgesArr..' call\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$14;\n $l$block_0: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_3 = 0;\n var last_3 = listeners.length;\n while (inductionVariable_3 < last_3) {\n var element_3 = listeners[inductionVariable_3];\n inductionVariable_3 = inductionVariable_3 + 1 | 0;\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.extractRealEdgesArr...' call\n var tmp0_safe_receiver_2 = element_3.ownerSystem;\n if ((tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.id) === element_2) {\n tmp$ret$14 = element_3;\n break $l$block_0;\n }\n }\n tmp$ret$14 = null;\n }\n var tmp0_safe_receiver_3 = tmp$ret$14;\n if (tmp0_safe_receiver_3 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.getOrElse' call\n var tmp0_elvis_lhs_0 = edges.b3(tmp0_safe_receiver_3);\n var tmp_0;\n if (tmp0_elvis_lhs_0 == null) {\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.extractRealEdgesArr....' call\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp0_elvis_lhs_0;\n }\n var list_0 = tmp_0;\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$19 = list_0;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$22 = [element];\n list_0 = tmp$ret$19.concat(tmp$ret$22);\n var value_0 = list_0;\n edges.r2(tmp0_safe_receiver_3, value_0);\n }\n }\n }\n }\n return edges;\n }\n function convertGraphToArray$iterateGraph(resultingList, $edges, listener) {\n if (!resultingList.p(listener)) {\n var tmp0_safe_receiver = $edges.b3(listener);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.convertGraphToArray.iterateGraph.' call\n if (!resultingList.p(element)) {\n convertGraphToArray$iterateGraph(resultingList, $edges, element);\n }\n }\n }\n if (!resultingList.p(listener)) {\n resultingList.q(listener);\n }\n }\n }\n function SystemGraphHelper$sortListeners$lambda() {\n return 'There is a cyclic dependency between your systems!';\n }\n function SystemGraphHelper() {\n SystemGraphHelper_instance = this;\n this.y26_1 = LoggerState_getInstance().m1m('SystemGraphHelper');\n }\n protoOf(SystemGraphHelper).sortListeners = function (listeners) {\n if (listeners.length === 1)\n return listeners;\n var edges = extractRealEdgesArr(this, listeners);\n if (edges.b1())\n return listeners;\n extractOrderOfRegistrationEdgesArr(this, listeners, edges);\n var resultingList = convertGraphToArray(this, listeners, edges);\n var tmp;\n if (resultingList.length === listeners.length) {\n tmp = reversedArray(resultingList);\n } else {\n this.y26_1.warn(SystemGraphHelper$sortListeners$lambda);\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = listeners.length;\n while (inductionVariable < last) {\n var element = listeners[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.ecs.SystemGraphHelper.sortListeners.' call\n if (element instanceof SystemBase) {\n element.printDependencies();\n }\n }\n throw IllegalStateException_init_$Create$('There is a cyclic dependency between your systems! You can get more information if you enable the logger INFO-level output.');\n }\n return tmp;\n };\n var SystemGraphHelper_instance;\n function SystemGraphHelper_getInstance() {\n if (SystemGraphHelper_instance == null)\n new SystemGraphHelper();\n return SystemGraphHelper_instance;\n }\n function handleLockedMemberOfGroup($this, entityGroup, potentiallyLockedMember) {\n if (EntityGroupUtils_instance.isHostingMemberInThisAutomaticGroup(potentiallyLockedMember, entityGroup)) {\n potentiallyLockedMember.removeComponent(47);\n }\n }\n function AutomaticGroupBuilderSystem$Companion$removeFromEntityGroup$lambda($child) {\n return function () {\n return '' + get_displayName($child) + ' was not a member of an entity group';\n };\n }\n function hasOnlyOneHostAndItIsStatic($this, entity) {\n return !get_hasMultipleHosts(entity) ? !get_isInGroupWithNonStaticHosts(entity) : false;\n }\n function productEntities($this, connectionRoot) {\n return hierarchyExceptSubTreesWithComponentArray(connectionRoot, 28);\n }\n function findEntityGroupAmongConnections($this, connectionsComponent) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = connectionsComponent.connections;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.findEntityGroupAmongConnections.' call\n if (!(get_automaticEntityGroup(element.hostConnectorEntity) == null)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_safe_receiver = tmp$ret$1;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectorEntity;\n return tmp1_safe_receiver == null ? null : get_automaticEntityGroup(tmp1_safe_receiver);\n }\n function buildEntityGroup($this, newGuest) {\n // Inline function 'kotlin.collections.mutableSetOf' call\n var entities = LinkedHashSet_init_$Create$();\n findEntitiesToPutInEntityGroup($this, newGuest, entities);\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = entities.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.buildEntityGroup.' call\n var tmp0_safe_receiver = get_parent(element);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n Companion_getInstance_41();\n tmp = tmp0_safe_receiver.hasComponent(38);\n }\n if (tmp === true) {\n tmp$ret$2 = element;\n break $l$block;\n }\n }\n tmp$ret$2 = null;\n }\n var tmp0_safe_receiver_0 = tmp$ret$2;\n var existingEntityGroup = tmp0_safe_receiver_0 == null ? null : get_parent(tmp0_safe_receiver_0);\n var tmp_0;\n if (!(existingEntityGroup == null)) {\n tmp_0 = get_parent(existingEntityGroup);\n } else {\n var tmp1_elvis_lhs = findStaticHost($this, entities);\n tmp_0 = tmp1_elvis_lhs == null ? findAParentOutsideTheGroup($this, entities) : tmp1_elvis_lhs;\n }\n var parent = tmp_0;\n var entityGroup = EntityGroupUtils_instance.createAutomaticEntityGroup($this.i27_1, parent, $this.h27_1);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = entities.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.buildEntityGroup.' call\n assignEntityToEntityGroup($this, element_0, entityGroup);\n }\n Companion_getInstance_40().recenterGroup(entityGroup);\n }\n function findAParentOutsideTheGroup($this, entities) {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$3;\n $l$block_1: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = entities.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.findAParentOutsideTheGroup.' call\n var tmp;\n if (get_parent(element) == null) {\n tmp = false;\n } else {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var tmp_0;\n if (isInterface(entities, Collection)) {\n tmp_0 = entities.b1();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n var tmp0_iterator_0 = entities.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.findAParentOutsideTheGroup..' call\n if (contains(hierarchyExceptSubTreesWithComponentArray(element_0, 28), get_parent(element))) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n }\n tmp$ret$0 = false;\n }\n var hasParentInGroup = tmp$ret$0;\n tmp = !hasParentInGroup;\n }\n if (tmp) {\n tmp$ret$3 = element;\n break $l$block_1;\n }\n }\n tmp$ret$3 = null;\n }\n var entityWithParentOutsideGroup = tmp$ret$3;\n return entityWithParentOutsideGroup == null ? null : get_parent(entityWithParentOutsideGroup);\n }\n function findStaticHost($this, entities) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = entities.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.findStaticHost.' call\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_guestConnections(element);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element_0 = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.findStaticHost..' call\n if (get_isStatic(element_0.hostConnectorEntity))\n return element_0.hostConnectorEntity;\n }\n }\n return null;\n }\n function findEntitiesToPutInEntityGroup($this, entity, entities) {\n if (entity.hasComponent(101))\n return Unit_instance;\n var tmp0_elvis_lhs = get_connectionRootEntity(entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var entityRoot = tmp;\n if (entities.p(entityRoot))\n return Unit_instance;\n entities.q(entityRoot);\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = productEntities($this, entityRoot);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.findEntitiesToPutInEntityGroup.' call\n var list = asIterable(get_guestConnections(element));\n addAll(destination, list);\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.findEntitiesToPutInEntityGroup.' call\n findEntitiesToPutInEntityGroup($this, element_0.hostConnectorEntity, entities);\n }\n }\n function assignEntityToEntityGroup($this, entity, entityGroup) {\n var otherEntityGroup = get_automaticEntityGroup(entity);\n if (equals(otherEntityGroup, entityGroup)) {\n return Unit_instance;\n }\n Companion_getInstance_41();\n var tmp0_safe_receiver = entityGroup.__getComponentForKotlin(38);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.withNewGroupMember(entity);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [entity];\n tmp = new AutomaticGroupComponent(tmp$ret$2);\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var newAutomaticEntityGroupComponent = tmp;\n entityGroup.addComponent(newAutomaticEntityGroupComponent);\n handleLockedMemberOfGroup(Companion_getInstance_40(), entityGroup, entity);\n Companion_getInstance_40().setGroupMemberComponents(entity, entityGroup);\n if (otherEntityGroup == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var children = get_children(otherEntityGroup);\n detachEntityGroup($this, otherEntityGroup);\n var inductionVariable = 0;\n var last = children.length;\n while (inductionVariable < last) {\n var element = children[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.assignEntityToEntityGroup..' call\n assignEntityToEntityGroup($this, element, entityGroup);\n }\n }\n }\n function detachEntityGroup($this, entityGroup) {\n if (!get_isInScene(entityGroup))\n return Unit_instance;\n setParent(entityGroup, null);\n }\n function Companion_39() {\n Companion_instance_39 = this;\n this.ID = 'AutomaticGroupBuilderSystem';\n this.j27_1 = LoggerState_getInstance().m1m('AutomaticGroupBuilderSystem');\n }\n protoOf(Companion_39).u1n = function () {\n return this.ID;\n };\n protoOf(Companion_39).handleLockedMembersOfGroup = function (entityGroup) {\n Companion_getInstance_41();\n var tmp0_safe_receiver = entityGroup.__getComponentForKotlin(38);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.members;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var members = tmp;\n var inductionVariable = 0;\n var last = members.length;\n while (inductionVariable < last) {\n var member = members[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n handleLockedMemberOfGroup(this, entityGroup, member);\n }\n };\n protoOf(Companion_39).removeFromEntityGroup = function (child) {\n var entityGroup = get_parent(child);\n if (entityGroup == null) {\n this.j27_1.warn(AutomaticGroupBuilderSystem$Companion$removeFromEntityGroup$lambda(child));\n return Unit_instance;\n }\n var tmp0_safe_receiver = get_highestPriorityConnection(child);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectionRoot;\n var newParent = tmp1_elvis_lhs == null ? get_parent(entityGroup) : tmp1_elvis_lhs;\n setParentMaintainWorldTransform(child, newParent);\n if (get_isConnectionRoot(child)) {\n child.addComponent(new SnapRootComponent());\n }\n if (!child.hasComponent(107)) {\n this.recenterGroup(entityGroup);\n }\n };\n protoOf(Companion_39).recenterGroup = function (entityGroup) {\n if (!any(get_children(entityGroup)))\n return Unit_instance;\n var newGroupCenter = Companion_getInstance_61().ZERO;\n var newRotation = get_worldRotation(first_0(get_children(entityGroup)));\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_children(entityGroup);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups.Companion.recenterGroup.' call\n newGroupCenter = newGroupCenter.plus(get_worldPosition(element));\n }\n var tmp = newGroupCenter;\n // Inline function 'kotlin.collections.count' call\n var tmp$ret$0 = get_children(entityGroup).length;\n newGroupCenter = tmp.__divIntForKotlin(tmp$ret$0);\n if (!get_worldPosition(entityGroup).equals(newGroupCenter)) {\n // Inline function 'kotlin.collections.map' call\n var this_0 = get_children(entityGroup);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable_0 = 0;\n var last_0 = this_0.length;\n while (inductionVariable_0 < last_0) {\n var item = this_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.groups.Companion.recenterGroup.' call\n destination.q(item);\n }\n var children = destination;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = children.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups.Companion.recenterGroup.' call\n setParentMaintainWorldTransform(element_0, null);\n }\n TransformUtils_instance.setWorldTransform(entityGroup, new Transform(newGroupCenter, newRotation));\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = children.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.groups.Companion.recenterGroup.' call\n setParentMaintainWorldTransform(element_1, entityGroup);\n }\n }\n };\n protoOf(Companion_39).setGroupMemberComponents = function (entity, entityGroup) {\n setParentMaintainWorldTransform(entity, entityGroup);\n };\n var Companion_instance_39;\n function Companion_getInstance_40() {\n if (Companion_instance_39 == null)\n new Companion_39();\n return Companion_instance_39;\n }\n function AutomaticGroupBuilderSystem(entityManager) {\n Companion_getInstance_40();\n Companion_getInstance_18();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [3, 1, 47, 17, 38, 10];\n // Inline function 'kotlin.arrayOf' call\n Companion_getInstance_48();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = ['ConnectionParentingSystem', 'UpdateHostConnectionsSystem'];\n SystemBase.call(this, 'AutomaticGroupBuilderSystem', 104, tmp, tmp$ret$5, null);\n this.h27_1 = entityManager;\n this.i27_1 = this.h27_1.createEntity();\n }\n protoOf(AutomaticGroupBuilderSystem).onAddComponent = function (entity, newComponent) {\n if (entity.hasComponent(107))\n return Unit_instance;\n if (hasOnlyOneHostAndItIsStatic(this, entity))\n return Unit_instance;\n buildEntityGroup(this, entity);\n };\n protoOf(AutomaticGroupBuilderSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n this.onRemoveComponent(entity, oldComponent);\n this.onAddComponent(entity, newComponent);\n };\n protoOf(AutomaticGroupBuilderSystem).onRemoveComponent = function (entity, oldComponent) {\n if (entity.hasComponent(107))\n return Unit_instance;\n if (!oldComponent.hasMultipleHosts)\n return Unit_instance;\n var tmp0_elvis_lhs = findEntityGroupAmongConnections(this, oldComponent);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var oldEntityGroup = tmp;\n var children = get_children(oldEntityGroup);\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = children.length;\n while (inductionVariable < last) {\n var element = children[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.onRemoveComponent.' call\n element.addComponent(new TemporarilyPauseConnectionParentingComponent());\n Companion_getInstance_40().removeFromEntityGroup(element);\n element.removeComponent(107);\n }\n detachEntityGroup(this, oldEntityGroup);\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = children.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = children[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.onRemoveComponent.' call\n if (get_hasMultipleHosts(element_0)) {\n destination.q(element_0);\n }\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_1 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups.AutomaticGroupBuilderSystem.onRemoveComponent.' call\n buildEntityGroup(this, element_1);\n }\n };\n function AutomaticGroupComponent$Companion$serializer$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n return Unit_instance;\n }\n function Companion_40() {\n Companion_instance_40 = this;\n this.id = 38;\n this.serializationKey = 'EntityGroupParentComponent';\n var tmp = this;\n tmp.k27_1 = Json(VOID, AutomaticGroupComponent$Companion$serializer$lambda);\n }\n protoOf(Companion_40).s1k = function () {\n return this.id;\n };\n protoOf(Companion_40).p1l = function () {\n return this.serializationKey;\n };\n protoOf(Companion_40).fromJson = function () {\n return new AutomaticGroupComponent();\n };\n var Companion_instance_40;\n function Companion_getInstance_41() {\n if (Companion_instance_40 == null)\n new Companion_40();\n return Companion_instance_40;\n }\n function AutomaticGroupComponent(members) {\n Companion_getInstance_41();\n var tmp;\n if (members === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = members;\n }\n members = tmp;\n this.members = members;\n }\n protoOf(AutomaticGroupComponent).l27 = function () {\n return this.members;\n };\n protoOf(AutomaticGroupComponent).x1k = function () {\n return 38;\n };\n protoOf(AutomaticGroupComponent).toJson = function (parse) {\n return Companion_getInstance_41().k27_1.k15(serializer(BooleanCompanionObject_instance), true);\n };\n protoOf(AutomaticGroupComponent).serializationKey = function () {\n return 'EntityGroupParentComponent';\n };\n protoOf(AutomaticGroupComponent).eq = function (other) {\n var otherEntityGroup = other instanceof AutomaticGroupComponent ? other : THROW_CCE();\n return contentEquals(this.members, otherEntityGroup.members);\n };\n protoOf(AutomaticGroupComponent).toString = function () {\n return 'EntityGroupParentComponent';\n };\n protoOf(AutomaticGroupComponent).withNewGroupMember = function (entity) {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$0 = this.members;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [entity];\n var tmp$ret$4 = tmp$ret$0.concat(tmp$ret$3);\n return new AutomaticGroupComponent(tmp$ret$4);\n };\n protoOf(AutomaticGroupComponent).withoutOldGroupMember = function (entity) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = subtract(this.members, setOf(entity));\n var tmp$ret$0 = copyToArray(this_0);\n return new AutomaticGroupComponent(tmp$ret$0);\n };\n function get_isAutomaticGroup(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(38);\n }\n function get_isInGroupWithNonStaticHosts(_this__u8e3s4) {\n var tmp0_safe_receiver = get_automaticEntityGroup(_this__u8e3s4);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_children(tmp0_safe_receiver);\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups..' call\n var list = toList_1(get_guestConnections(element));\n addAll(destination, list);\n }\n tmp = destination;\n }\n var tmp2_safe_receiver = tmp;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = tmp2_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups..' call\n if (!get_isStatic(element_0.hostConnectorEntity)) {\n destination_0.q(element_0);\n }\n }\n tmp_0 = destination_0;\n }\n var tmp3_safe_receiver = tmp_0;\n var tmp_1;\n if (tmp3_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp3_safe_receiver, 10));\n var tmp0_iterator_0 = tmp3_safe_receiver.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.groups..' call\n var tmp$ret$6 = item.hostConnectorEntity;\n destination_1.q(tmp$ret$6);\n }\n tmp_1 = destination_1;\n }\n var tmp4_safe_receiver = tmp_1;\n var tmp_2;\n if (tmp4_safe_receiver == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_2 = ArrayList_init_$Create$();\n var tmp0_iterator_1 = tmp4_safe_receiver.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.groups..' call\n if (!equals(get_automaticEntityGroup(element_1), get_automaticEntityGroup(_this__u8e3s4))) {\n destination_2.q(element_1);\n }\n }\n tmp_2 = destination_2;\n }\n var hosts = tmp_2;\n return !(hosts == null) ? any_0(hosts) : false;\n }\n function get_automaticEntityGroup(_this__u8e3s4) {\n if (get_isAutomaticGroup(_this__u8e3s4))\n return _this__u8e3s4;\n var tmp;\n var tmp0_safe_receiver = get_connectionRootEntity(_this__u8e3s4);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_parent(tmp0_safe_receiver);\n if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.hasComponent(38)) === true) {\n var tmp2_safe_receiver = get_connectionRootEntity(_this__u8e3s4);\n tmp = tmp2_safe_receiver == null ? null : get_parent(tmp2_safe_receiver);\n } else {\n tmp = null;\n }\n return tmp;\n }\n function get_isMemberOfAutomaticGroup(_this__u8e3s4) {\n var tmp0_safe_receiver = get_parent(_this__u8e3s4);\n return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hasComponent(38)) === true;\n }\n function addAutomaticGroupMember(_this__u8e3s4, newMember) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(38);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.withNewGroupMember(newMember);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var newGroupComponent = tmp;\n _this__u8e3s4.addComponent(newGroupComponent);\n }\n function removeAutomaticGroupMember(_this__u8e3s4, oldMember) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(38);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.withoutOldGroupMember(oldMember);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var newGroupComponent = tmp;\n _this__u8e3s4.addComponent(newGroupComponent);\n }\n function setAutomaticGroupParentToHighestPrioConnectionOutsideGroup(_this__u8e3s4) {\n var tmp0_elvis_lhs = get_highestPrioConnectionOutsideGroup(_this__u8e3s4);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var highestPrioConnection = tmp;\n var tmp1_elvis_lhs = get_snapRoot(highestPrioConnection.hostConnectorEntity);\n var newParent = tmp1_elvis_lhs == null ? highestPrioConnection.hostConnectorEntity : tmp1_elvis_lhs;\n var tmp2_safe_receiver = get_automaticEntityGroup(_this__u8e3s4);\n if (tmp2_safe_receiver == null)\n null;\n else {\n setParentMaintainWorldTransform(tmp2_safe_receiver, newParent);\n }\n }\n function get_highestPrioConnectionOutsideGroup(_this__u8e3s4) {\n var tmp0_safe_receiver = get_automaticEntityGroup(_this__u8e3s4);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_children(tmp0_safe_receiver);\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups..' call\n var list = toList_1(get_guestConnections(element));\n addAll(destination, list);\n }\n tmp = destination;\n }\n var tmp2_safe_receiver = tmp;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = tmp2_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups..' call\n if (!equals(get_automaticEntityGroup(element_0.hostConnectorEntity), get_automaticEntityGroup(_this__u8e3s4))) {\n destination_0.q(element_0);\n }\n }\n tmp_0 = destination_0;\n }\n var groupConnections = tmp_0;\n if (groupConnections == null)\n return null;\n if (!any_0(groupConnections))\n return null;\n var tmp$ret$6;\n $l$block: {\n // Inline function 'kotlin.collections.maxBy' call\n var iterator = groupConnections.t();\n if (!iterator.u())\n throw NoSuchElementException_init_$Create$();\n var maxElem = iterator.w();\n if (!iterator.u()) {\n tmp$ret$6 = maxElem;\n break $l$block;\n }\n // Inline function 'com.ikea.core.groups..' call\n var maxValue = maxElem.priority;\n do {\n var e = iterator.w();\n // Inline function 'com.ikea.core.groups..' call\n var v = e.priority;\n if (compareTo(maxValue, v) < 0) {\n maxElem = e;\n maxValue = v;\n }\n }\n while (iterator.u());\n tmp$ret$6 = maxElem;\n }\n return tmp$ret$6;\n }\n function Companion_41() {\n this.Id = 116;\n }\n protoOf(Companion_41).m27 = function () {\n return this.Id;\n };\n var Companion_instance_41;\n function Companion_getInstance_42() {\n return Companion_instance_41;\n }\n function AutomaticGroupIdCountComponent(nextAutomaticGroupId) {\n this.nextAutomaticGroupId = nextAutomaticGroupId;\n this.n27_1 = 116;\n }\n protoOf(AutomaticGroupIdCountComponent).o27 = function () {\n return this.nextAutomaticGroupId;\n };\n protoOf(AutomaticGroupIdCountComponent).x1k = function () {\n return this.n27_1;\n };\n protoOf(AutomaticGroupIdCountComponent).eq = function (other) {\n return (other instanceof AutomaticGroupIdCountComponent ? other : THROW_CCE()).nextAutomaticGroupId === this.nextAutomaticGroupId;\n };\n protoOf(AutomaticGroupIdCountComponent).withIncrementedId = function () {\n return new AutomaticGroupIdCountComponent(this.nextAutomaticGroupId + 1 | 0);\n };\n function incrementNextAutomaticGroupId($this, stateHolderEntity, entityManager) {\n var component = stateHolderEntity.__getComponentForKotlin(116);\n var tmp1_elvis_lhs = component == null ? null : component.withIncrementedId();\n var newComponent = tmp1_elvis_lhs == null ? new AutomaticGroupIdCountComponent(1) : tmp1_elvis_lhs;\n entityManager.addComponent(stateHolderEntity, newComponent);\n return newComponent.nextAutomaticGroupId;\n }\n function EntityGroupUtils() {\n }\n protoOf(EntityGroupUtils).isAutomaticGroup = function (entity) {\n return get_isAutomaticGroup(entity);\n };\n protoOf(EntityGroupUtils).isManualGroup = function (entity) {\n return get_isManualGroup(entity);\n };\n protoOf(EntityGroupUtils).isEntityLockedInAutomaticGroup = function (potentiallyLockedMember) {\n if (get_isAutomaticGroup(potentiallyLockedMember))\n return true;\n return this.isHostingMemberInThisAutomaticGroup(potentiallyLockedMember, get_automaticEntityGroup(potentiallyLockedMember)) ? true : isHostingEntityWithMultipleHosts(potentiallyLockedMember);\n };\n protoOf(EntityGroupUtils).isHostingMemberInThisAutomaticGroup = function (potentialHost, entityGroup) {\n var tmp1_safe_receiver = entityGroup == null ? get_automaticEntityGroup(potentialHost) : entityGroup;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'kotlin.sequences.any' call\n var tmp0_iterator = hierarchyExceptSubTreesWithComponentSequence(potentialHost, 28).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups.EntityGroupUtils.isHostingMemberInThisAutomaticGroup..' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = get_hostedConnections(element);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element_0 = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups.EntityGroupUtils.isHostingMemberInThisAutomaticGroup...' call\n var tmp0_safe_receiver = get_connectionRootEntity(element_0.guestConnectorEntity);\n if (equals(tmp0_safe_receiver == null ? null : get_parent(tmp0_safe_receiver), tmp1_safe_receiver)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n if (tmp$ret$1) {\n tmp$ret$3 = true;\n break $l$block_0;\n }\n }\n tmp$ret$3 = false;\n }\n return tmp$ret$3;\n }\n return false;\n };\n protoOf(EntityGroupUtils).getAutomaticEntityGroupOfEntity = function (entity) {\n return get_automaticEntityGroup(entity);\n };\n protoOf(EntityGroupUtils).incrementNextManualGroupId = function (scene, entityManager) {\n var component = scene.__getComponentForKotlin(115);\n var tmp1_elvis_lhs = component == null ? null : component.withIncrementedId();\n var newComponent = tmp1_elvis_lhs == null ? new ManualGroupIdCountComponent(1) : tmp1_elvis_lhs;\n entityManager.addComponent(scene, newComponent);\n return newComponent.nextManualGroupId;\n };\n protoOf(EntityGroupUtils).createAutomaticEntityGroup = function (stateHolderEntity, parent, entityManager) {\n var entityGroup = entityManager.createEntity();\n var groupId = incrementNextAutomaticGroupId(this, stateHolderEntity, entityManager);\n entityGroup.addComponent(new DisplayNameComponent('Automatic Entity Group ' + groupId));\n setParent(entityGroup, parent);\n entityGroup.addComponent(new DraggableComponent());\n entityGroup.addComponent(new SelectableComponent());\n entityGroup.addComponent(new SnapRootComponent());\n entityGroup.addComponent(new AutomaticGroupComponent());\n return entityGroup;\n };\n protoOf(EntityGroupUtils).attachManualGroup = function (group) {\n Companion_getInstance_44();\n var tmp0_safe_receiver = group.__getComponentForKotlin(37);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.members;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var members = tmp;\n var inductionVariable = 0;\n var last = members.length;\n while (inductionVariable < last) {\n var member = members[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n this.configureComponentsForMemberInManualGroup(member, group);\n }\n };\n protoOf(EntityGroupUtils).configureComponentsForMemberInManualGroup = function (entity, group) {\n var tmp0_elvis_lhs = get_connectionRootEntity(entity);\n var connectionRoot = tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs;\n setParentMaintainWorldTransform(connectionRoot, group);\n connectionRoot.removeComponent(SelectedComponent_instance.id);\n connectionRoot.removeComponent(1);\n connectionRoot.removeComponent(47);\n };\n var EntityGroupUtils_instance;\n function EntityGroupUtils_getInstance() {\n return EntityGroupUtils_instance;\n }\n function createNewEntityGroup($this, entityManager, sceneManager) {\n var entityGroup = entityManager.createEntity();\n nameManualGroup($this, sceneManager, entityManager, entityGroup);\n return entityGroup;\n }\n function nameManualGroup($this, sceneManager, entityManager, entityGroup) {\n var groupId = EntityGroupUtils_instance.incrementNextManualGroupId(sceneManager.scene, entityManager);\n entityGroup.addComponent(new DisplayNameComponent('Manual Entity Group ' + groupId));\n }\n function ManualEntityGroupBuilderService$Companion$disconnectFromEntityGroupParent$lambda($entityRoot, $entityGroup) {\n return function () {\n return 'ConnectionSystem could not find a snap for ' + $entityRoot + ' to snap it back to scene when disconnecting it from its entity group ' + $entityGroup;\n };\n }\n function Companion_42() {\n Companion_instance_42 = this;\n this.logger = LoggerState_getInstance().m1m('ManualEntityGroupBuilderService');\n }\n protoOf(Companion_42).q27 = function (hosts, existingEntityGroup, entityManager, sceneManager) {\n var entityGroup = existingEntityGroup == null ? createNewEntityGroup(this, entityManager, sceneManager) : existingEntityGroup;\n var position = Companion_getInstance_61().ZERO;\n var rotationEulerRadians = Companion_getInstance_61().ZERO;\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = hosts.length;\n while (inductionVariable < last) {\n var element = hosts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups.Companion.createManualEntityGroup.' call\n position = position.plus(get_worldPosition(element));\n rotationEulerRadians = rotationEulerRadians.plus(get_worldRotation(element).toEuler());\n }\n var tmp = position;\n // Inline function 'kotlin.collections.count' call\n var tmp$ret$0 = hosts.length;\n position = tmp.__divIntForKotlin(tmp$ret$0);\n var tmp_0 = rotationEulerRadians;\n // Inline function 'kotlin.collections.count' call\n var tmp$ret$1 = hosts.length;\n rotationEulerRadians = tmp_0.__divIntForKotlin(tmp$ret$1);\n var tmp1_safe_receiver = firstOrNull(hosts);\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : get_connectionRootEntity(tmp1_safe_receiver);\n var first = tmp2_elvis_lhs == null ? firstOrNull(hosts) : tmp2_elvis_lhs;\n var tmp4_safe_receiver = first == null ? null : get_parent(first);\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n setParent(entityGroup, tmp4_safe_receiver);\n }\n var tmp$ret$4;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable_0 = 0;\n var last_0 = hosts.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = hosts[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.groups.Companion.createManualEntityGroup.' call\n if (element_0.hasComponent(0)) {\n tmp$ret$4 = true;\n break $l$block;\n }\n }\n tmp$ret$4 = false;\n }\n var addSelected = tmp$ret$4;\n var tmp$ret$6;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable_1 = 0;\n var last_1 = hosts.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = hosts[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.groups.Companion.createManualEntityGroup.' call\n var tmp0_elvis_lhs = get_connectionRootEntity(element_1);\n var tmp_1 = tmp0_elvis_lhs == null ? element_1 : tmp0_elvis_lhs;\n if (tmp_1.hasComponent(1)) {\n tmp$ret$6 = true;\n break $l$block_0;\n }\n }\n tmp$ret$6 = false;\n }\n var addSelectable = tmp$ret$6;\n var tmp$ret$8;\n $l$block_1: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable_2 = 0;\n var last_2 = hosts.length;\n while (inductionVariable_2 < last_2) {\n var element_2 = hosts[inductionVariable_2];\n inductionVariable_2 = inductionVariable_2 + 1 | 0;\n // Inline function 'com.ikea.core.groups.Companion.createManualEntityGroup.' call\n var tmp0_elvis_lhs_0 = get_connectionRootEntity(element_2);\n var tmp_2 = tmp0_elvis_lhs_0 == null ? element_2 : tmp0_elvis_lhs_0;\n if (tmp_2.hasComponent(3)) {\n tmp$ret$8 = true;\n break $l$block_1;\n }\n }\n tmp$ret$8 = false;\n }\n var addDraggable = tmp$ret$8;\n var rotation = Companion_getInstance_57().fromEuler(new Radians(rotationEulerRadians.X), new Radians(rotationEulerRadians.Y), new Radians(rotationEulerRadians.Z));\n entityGroup.addComponent(new LocalTransformComponent(new Transform(position, rotation)));\n entityGroup.addComponent(new SnapRootComponent());\n entityGroup.addComponent(new ManualGroupComponent(hosts));\n entityGroup.addComponent(new OutlineableComponent());\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_3 = 0;\n var last_3 = hosts.length;\n while (inductionVariable_3 < last_3) {\n var element_3 = hosts[inductionVariable_3];\n inductionVariable_3 = inductionVariable_3 + 1 | 0;\n // Inline function 'com.ikea.core.groups.Companion.createManualEntityGroup.' call\n EntityGroupUtils_instance.configureComponentsForMemberInManualGroup(element_3, entityGroup);\n }\n if (addSelected) {\n entityGroup.addComponent(SelectedComponent_instance);\n }\n if (addSelectable) {\n entityGroup.addComponent(new SelectableComponent());\n }\n if (addDraggable) {\n entityGroup.addComponent(new DraggableComponent());\n }\n return entityGroup;\n };\n protoOf(Companion_42).createManualEntityGroup = function (hosts, existingEntityGroup, entityManager, sceneManager, $super) {\n existingEntityGroup = existingEntityGroup === VOID ? null : existingEntityGroup;\n return this.q27(hosts, existingEntityGroup, entityManager, sceneManager);\n };\n protoOf(Companion_42).disconnectFromEntityGroupParent = function (entity, sceneManager) {\n var tmp0_elvis_lhs = get_connectionRootEntity(entity);\n var entityRoot = tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs;\n var tmp1_safe_receiver = get_parent(entityRoot);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n Companion_getInstance_44();\n if (!tmp1_safe_receiver.hasComponent(37))\n return Unit_instance;\n if (get_isConnectionRoot(entityRoot)) {\n entityRoot.addComponent(new SelectableComponent());\n entityRoot.addComponent(new SnapRootComponent());\n }\n var entityGroupParent = get_parent(tmp1_safe_receiver);\n var tmp;\n if (get_isInScene(entityRoot) ? !(entityGroupParent == null) : false) {\n setParentMaintainWorldTransform(entityRoot, get_parent(tmp1_safe_receiver));\n var candidate = firstOrNull(SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_DISTANCE.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidates(entity, entityGroupParent)));\n var tmp1_safe_receiver_0 = candidate == null ? null : candidate.createAction();\n if (tmp1_safe_receiver_0 == null)\n null;\n else {\n tmp1_safe_receiver_0.perform();\n }\n var tmp_0;\n if (candidate == null) {\n var tmp_1 = Companion_getInstance_43().logger;\n tmp_1.warn(ManualEntityGroupBuilderService$Companion$disconnectFromEntityGroupParent$lambda(entityRoot, tmp1_safe_receiver));\n setParentMaintainWorldTransform(entityRoot, sceneManager.scene);\n tmp_0 = Unit_instance;\n }\n tmp = tmp_0;\n } else {\n setParentMaintainWorldTransform(entityRoot, null);\n tmp = Unit_instance;\n }\n }\n };\n protoOf(Companion_42).x1i = function () {\n return this.logger;\n };\n var Companion_instance_42;\n function Companion_getInstance_43() {\n if (Companion_instance_42 == null)\n new Companion_42();\n return Companion_instance_42;\n }\n function ManualEntityGroupBuilderService(entityManager, sceneManager) {\n Companion_getInstance_43();\n this.r27_1 = entityManager;\n this.s27_1 = sceneManager;\n }\n protoOf(ManualEntityGroupBuilderService).disconnectFromEntityGroupParent = function (entity) {\n Companion_getInstance_43().disconnectFromEntityGroupParent(entity, this.s27_1);\n };\n protoOf(ManualEntityGroupBuilderService).createManualEntityGroup = function (hosts) {\n return Companion_getInstance_43().createManualEntityGroup(hosts, null, this.r27_1, this.s27_1);\n };\n function ManualGroupComponent$Companion$serializer$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n return Unit_instance;\n }\n function Companion_43() {\n Companion_instance_43 = this;\n this.id = 37;\n this.serializationKey = 'ManualGroupComponent';\n var tmp = this;\n tmp.t27_1 = Json(VOID, ManualGroupComponent$Companion$serializer$lambda);\n }\n protoOf(Companion_43).s1k = function () {\n return this.id;\n };\n protoOf(Companion_43).p1l = function () {\n return this.serializationKey;\n };\n protoOf(Companion_43).fromJson = function () {\n return new ManualGroupComponent();\n };\n var Companion_instance_43;\n function Companion_getInstance_44() {\n if (Companion_instance_43 == null)\n new Companion_43();\n return Companion_instance_43;\n }\n function ManualGroupComponent(members) {\n Companion_getInstance_44();\n var tmp;\n if (members === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = members;\n }\n members = tmp;\n this.members = members;\n }\n protoOf(ManualGroupComponent).l27 = function () {\n return this.members;\n };\n protoOf(ManualGroupComponent).toJson = function (parse) {\n return Companion_getInstance_44().t27_1.k15(serializer(BooleanCompanionObject_instance), true);\n };\n protoOf(ManualGroupComponent).serializationKey = function () {\n return 'ManualGroupComponent';\n };\n protoOf(ManualGroupComponent).x1k = function () {\n return 37;\n };\n protoOf(ManualGroupComponent).eq = function (other) {\n var otherEntityGroup = other instanceof ManualGroupComponent ? other : THROW_CCE();\n return contentEquals(this.members, otherEntityGroup.members);\n };\n function get_isManualGroup(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(37);\n }\n function get_isInManualGroup(_this__u8e3s4) {\n var tmp0_safe_receiver = get_manualGroup(_this__u8e3s4);\n return !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.__getComponentForKotlin(37)) == null);\n }\n function get_manualGroup(_this__u8e3s4) {\n if (get_isManualGroup(_this__u8e3s4))\n return _this__u8e3s4;\n var tmp0_safe_receiver = get_connectionRootEntity(_this__u8e3s4);\n var parent = tmp0_safe_receiver == null ? null : get_parent(tmp0_safe_receiver);\n var tmp;\n if ((parent == null ? null : parent.hasComponent(37)) === true) {\n tmp = parent;\n } else {\n tmp = null;\n }\n return tmp;\n }\n function Companion_44() {\n this.ID = 'ManualGroupConnectorValidation';\n }\n protoOf(Companion_44).u1n = function () {\n return this.ID;\n };\n var Companion_instance_44;\n function Companion_getInstance_45() {\n return Companion_instance_44;\n }\n function checkConnectorsOnParts($this, hostPart, guestPart, connector) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.sequences.any' call\n var tmp0_iterator = connector.findHostConnectorsWithMatchingTags(get_connectorsComponent(hostPart)).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups.ManualGroupConnectorValidation.checkConnectorsOnParts.' call\n if (element.containsConnector(get_worldTransform(hostPart), get_worldTransform(guestPart), connector)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n return tmp$ret$1;\n }\n function hasAtLeastOneConnectorFulfilled($this, hosts, guest) {\n var tmp0_safe_receiver = guest.__getComponentForKotlin(Companion_instance_97.id);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.allowedHosts;\n var eligibleHosts = tmp1_elvis_lhs == null ? hosts : tmp1_elvis_lhs;\n var tmp$ret$5;\n $l$block_2: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = hierarchyExceptSubTreesWithComponentArray(guest, 47);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups.ManualGroupConnectorValidation.hasAtLeastOneConnectorFulfilled.' call\n var tmp0_safe_receiver_0 = get_connectorsComponent(element);\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.guestConnectors;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n var tmp$ret$0;\n $l$block_1: {\n // Inline function 'kotlin.collections.any' call\n var tmp_0;\n if (isInterface(tmp1_safe_receiver, Collection)) {\n tmp_0 = tmp1_safe_receiver.b1();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = false;\n break $l$block_1;\n }\n var tmp0_iterator = tmp1_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups.ManualGroupConnectorValidation.hasAtLeastOneConnectorFulfilled..' call\n var tmp$ret$2;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable_0 = 0;\n var last_0 = eligibleHosts.length;\n while (inductionVariable_0 < last_0) {\n var element_1 = eligibleHosts[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.groups.ManualGroupConnectorValidation.hasAtLeastOneConnectorFulfilled...' call\n if (hasAtLeastOneConnectorFulfilled$_anonymous_$_anonymous_$checkHost_6hog06(element, $this, element_0, element_1)) {\n tmp$ret$2 = true;\n break $l$block_0;\n }\n }\n tmp$ret$2 = false;\n }\n if (tmp$ret$2) {\n tmp$ret$0 = true;\n break $l$block_1;\n }\n }\n tmp$ret$0 = false;\n }\n tmp = tmp$ret$0;\n }\n var tmp2_elvis_lhs = tmp;\n if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {\n tmp$ret$5 = true;\n break $l$block_2;\n }\n }\n tmp$ret$5 = false;\n }\n return tmp$ret$5;\n }\n function hasAtLeastOneConnectorFulfilled$_anonymous_$_anonymous_$checkHost_6hog06($guestPart, this$0, $connector, host) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.sequences.any' call\n var tmp = hierarchyExceptSubTreeSequence(host, $guestPart);\n var tmp0_iterator = filter(tmp, ManualGroupConnectorValidation$hasAtLeastOneConnectorFulfilled$_anonymous_$_anonymous_$checkHost$lambda_qf62wo($guestPart)).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.groups.ManualGroupConnectorValidation.hasAtLeastOneConnectorFulfilled.$$checkHost.' call\n if (checkConnectorsOnParts(this$0, element, $guestPart, $connector)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n return tmp$ret$1;\n }\n function ManualGroupConnectorValidation$hasAtLeastOneConnectorFulfilled$_anonymous_$_anonymous_$checkHost$lambda_qf62wo($$guestPart) {\n return function (hostPart) {\n return !equals(get_snapRoot(hostPart), get_snapRoot($$guestPart));\n };\n }\n function ManualGroupConnectorValidation(validationService, coreModules) {\n ValidationImpl.call(this);\n this.validationService = validationService;\n this.coreModules = coreModules;\n this.v27_1 = 'ManualGroupConnectorValidation';\n }\n protoOf(ManualGroupConnectorValidation).w27 = function () {\n return this.validationService;\n };\n protoOf(ManualGroupConnectorValidation).o1i = function () {\n return this.coreModules;\n };\n protoOf(ManualGroupConnectorValidation).s1k = function () {\n return this.v27_1;\n };\n protoOf(ManualGroupConnectorValidation).validateCurrentState = function (entity) {\n if (entity.hasComponent(37)) {\n var warn = null;\n var tmp0_safe_receiver = get_parent(entity);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.groups.ManualGroupConnectorValidation.validateCurrentState.' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var groupParent = [tmp0_safe_receiver];\n var tmp0_safe_receiver_0 = get_parentComponent(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.children;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups.ManualGroupConnectorValidation.validateCurrentState..' call\n var snapRes = ConnectorUtils_instance.findUnfulfilledRequiredConnectors(groupParent, element);\n if (any(snapRes)) {\n var tmp_0 = Companion_instance_114;\n var tmp0_elvis_lhs = get_productRef(entity);\n return tmp_0.fail('No snap on EntityGroup test', tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, this);\n }\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.validationService.validateCurrentState(element);\n var inductionVariable_0 = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.groups.ManualGroupConnectorValidation.validateCurrentState...' call\n if (element_0.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n return element_0;\n } else if (element_0.resultType.equals(ValidationResultType_WARNING_getInstance())) {\n warn = element_0;\n }\n }\n }\n tmp = Unit_instance;\n }\n }\n return warn;\n }\n return null;\n };\n protoOf(ManualGroupConnectorValidation).validateSnap = function (snapActionCandidate) {\n var tmp = snapActionCandidate.guestRoot;\n if (tmp.hasComponent(37)) {\n var warn = null;\n var gp = snapActionCandidate.host;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var groupParent = [gp];\n var tmp0_safe_receiver = get_parentComponent(snapActionCandidate.guestRoot);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.groups.ManualGroupConnectorValidation.validateSnap.' call\n var snapRes = hasAtLeastOneConnectorFulfilled(this, groupParent, element);\n if (!snapRes) {\n var tmp_0 = Companion_instance_114;\n var tmp0_elvis_lhs = get_productRef(snapActionCandidate.guestRoot);\n return tmp_0.fail('No snap on ManualGroup test', tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, this);\n }\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.validationService.validateCurrentState(element);\n var inductionVariable_0 = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.groups.ManualGroupConnectorValidation.validateSnap..' call\n if (element_0.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n return element_0;\n } else if (element_0.resultType.equals(ValidationResultType_WARNING_getInstance())) {\n warn = element_0;\n }\n }\n }\n }\n return warn;\n }\n return null;\n };\n function Companion_45() {\n this.Id = 115;\n }\n protoOf(Companion_45).m27 = function () {\n return this.Id;\n };\n var Companion_instance_45;\n function Companion_getInstance_46() {\n return Companion_instance_45;\n }\n function ManualGroupIdCountComponent(nextManualGroupId) {\n this.nextManualGroupId = nextManualGroupId;\n this.p27_1 = 115;\n }\n protoOf(ManualGroupIdCountComponent).x27 = function () {\n return this.nextManualGroupId;\n };\n protoOf(ManualGroupIdCountComponent).x1k = function () {\n return this.p27_1;\n };\n protoOf(ManualGroupIdCountComponent).eq = function (other) {\n return (other instanceof ManualGroupIdCountComponent ? other : THROW_CCE()).nextManualGroupId === this.nextManualGroupId;\n };\n protoOf(ManualGroupIdCountComponent).withIncrementedId = function () {\n return new ManualGroupIdCountComponent(this.nextManualGroupId + 1 | 0);\n };\n function StaticComponent() {\n StaticComponent_instance = this;\n this.y27_1 = this.id;\n }\n protoOf(StaticComponent).x1k = function () {\n return this.y27_1;\n };\n protoOf(StaticComponent).s1k = function () {\n return 101;\n };\n protoOf(StaticComponent).eq = function (other) {\n return true;\n };\n var StaticComponent_instance;\n function StaticComponent_getInstance() {\n if (StaticComponent_instance == null)\n new StaticComponent();\n return StaticComponent_instance;\n }\n function get_isStatic(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(101);\n }\n function Companion_46() {\n this.id = 17;\n }\n protoOf(Companion_46).s1k = function () {\n return this.id;\n };\n var Companion_instance_46;\n function Companion_getInstance_47() {\n return Companion_instance_46;\n }\n function ChildComponent(parent) {\n this.parent = parent;\n }\n protoOf(ChildComponent).z27 = function () {\n return this.parent;\n };\n protoOf(ChildComponent).eq = function (other) {\n return unsafeCast(other).parent.equals(this.parent);\n };\n protoOf(ChildComponent).equals = function (other) {\n var tmp;\n if (other instanceof ChildComponent) {\n tmp = other.parent.equals(this.parent);\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(ChildComponent).hashCode = function () {\n return this.parent.hashCode();\n };\n protoOf(ChildComponent).x1k = function () {\n return 17;\n };\n protoOf(ChildComponent).af = function () {\n return this.parent;\n };\n protoOf(ChildComponent).a28 = function (parent) {\n return new ChildComponent(parent);\n };\n protoOf(ChildComponent).copy = function (parent, $super) {\n parent = parent === VOID ? this.parent : parent;\n return this.a28(parent);\n };\n protoOf(ChildComponent).toString = function () {\n return 'ChildComponent(parent=' + this.parent + ')';\n };\n function get_parent(_this__u8e3s4) {\n var tmp0_safe_receiver = get_childComponent(_this__u8e3s4);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.parent;\n }\n function get_childComponent(_this__u8e3s4) {\n return _this__u8e3s4.__getComponentForKotlin(17);\n }\n function updateParent($this, entity, guestConnectionsComponent) {\n var tmp;\n var tmp_0;\n if (get_isInGroupWithNonStaticHosts(entity)) {\n tmp_0 = true;\n } else {\n var tmp0_safe_receiver = get_snapRoot(entity);\n tmp_0 = (tmp0_safe_receiver == null ? null : get_isAutomaticGroup(tmp0_safe_receiver)) === true;\n }\n if (tmp_0) {\n tmp = true;\n } else {\n tmp = get_isInManualGroup(entity);\n }\n if (tmp)\n return Unit_instance;\n var mainConnection = guestConnectionsComponent.highestPriorityConnection;\n if (mainConnection == null) {\n var tmp_1 = Companion_getInstance_48().b28_1;\n tmp_1.error(ConnectionParentingSystem$updateParent$lambda);\n return Unit_instance;\n }\n setParentMaintainWorldTransform(entity, mainConnection.hostConnectorEntity);\n }\n function unParent($this, guestRoot) {\n if (get_isMemberOfAutomaticGroup(guestRoot) ? isHostingEntityWithMultipleHosts(guestRoot) : false) {\n return Unit_instance;\n }\n setParentMaintainWorldTransform(guestRoot, null);\n }\n function Companion_47() {\n Companion_instance_47 = this;\n this.ID = 'ConnectionParentingSystem';\n this.b28_1 = LoggerState_getInstance().m1m('ConnectionSystem');\n }\n protoOf(Companion_47).u1n = function () {\n return this.ID;\n };\n var Companion_instance_47;\n function Companion_getInstance_48() {\n if (Companion_instance_47 == null)\n new Companion_47();\n return Companion_instance_47;\n }\n function ConnectionParentingSystem$updateParent$lambda() {\n return 'Added a connections component without connections, something is broken';\n }\n function ConnectionParentingSystem() {\n Companion_getInstance_48();\n Companion_getInstance_18();\n SystemBase.call(this, 'ConnectionParentingSystem', 104);\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.k28_1 = [16, 17, 10];\n var tmp_0 = this;\n // Inline function 'kotlin.emptyArray' call\n tmp_0.l28_1 = [];\n }\n protoOf(ConnectionParentingSystem).w1o = function () {\n return this.k28_1;\n };\n protoOf(ConnectionParentingSystem).y1o = function () {\n return this.l28_1;\n };\n protoOf(ConnectionParentingSystem).onAddComponent = function (entity, newComponent) {\n if (entity.hasComponent(107))\n return Unit_instance;\n updateParent(this, entity, newComponent);\n };\n protoOf(ConnectionParentingSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n if (entity.hasComponent(107))\n return Unit_instance;\n updateParent(this, entity, newComponent);\n };\n protoOf(ConnectionParentingSystem).onRemoveComponent = function (entity, oldComponent) {\n if (entity.hasComponent(107))\n return Unit_instance;\n unParent(this, entity);\n };\n function entityRemoved($this, entity) {\n if (entity.hasComponent(16)) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_children(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.HierarchySystem.entityRemoved.' call\n $this.u28_1.disposeEntity(element);\n }\n }\n }\n function onUpdateChild($this, child, oldComponent, newComponent) {\n var newParent = newComponent.parent;\n var tmp0_elvis_lhs = get_parentComponent(newParent);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n tmp = new ParentComponent(tmp$ret$0);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var parentComponent = tmp;\n var siblings = parentComponent.children;\n if (contains(siblings, child))\n return Unit_instance;\n var oldParent = oldComponent == null ? null : oldComponent.parent;\n var tmp3_safe_receiver = oldParent == null ? null : get_parentComponent(oldParent);\n if (tmp3_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0;\n if (contains(tmp3_safe_receiver.children, child)) {\n var oldParentComponentWithoutMe = tmp3_safe_receiver.removeChild(child);\n oldParent.addComponent(oldParentComponentWithoutMe);\n tmp_0 = Unit_instance;\n }\n }\n if (newParent.id === child.id)\n throw IllegalStateException_init_$Create$('HierarchySystem do not allow an entity to be its own child: ' + newParent);\n var newParentComponentWithMe = parentComponent.addChild(child);\n newParent.addComponent(newParentComponentWithMe);\n }\n function Companion_48() {\n this.ID = 'HierarchySystem';\n }\n protoOf(Companion_48).u1n = function () {\n return this.ID;\n };\n var Companion_instance_48;\n function Companion_getInstance_49() {\n return Companion_instance_48;\n }\n function HierarchySystem$entityRemoved$ref($boundThis) {\n var l = function (p0) {\n entityRemoved($boundThis, p0);\n return Unit_instance;\n };\n l.callableName = 'entityRemoved';\n return l;\n }\n function HierarchySystem(entityManager) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [6, 16];\n SystemBase.call(this, 'HierarchySystem', 17, tmp$ret$2, null, null);\n this.u28_1 = entityManager;\n this.u28_1.subscribeEntityRemoved(HierarchySystem$entityRemoved$ref(this));\n }\n protoOf(HierarchySystem).onAddComponent = function (entity, newComponent) {\n Companion_getInstance_107();\n if (!entity.hasComponent(6)) {\n entity.addComponent(Companion_getInstance_107().IDENTITY);\n }\n onUpdateChild(this, entity, newComponent, newComponent);\n };\n protoOf(HierarchySystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n onUpdateChild(this, entity, oldComponent, newComponent);\n };\n protoOf(HierarchySystem).onRemoveComponent = function (entity, oldComponent) {\n var parent = oldComponent.parent;\n if (!parent.isDisposed) {\n var tmp0_safe_receiver = get_parentComponent(parent);\n var newChildren = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.removeChild(entity);\n if (newChildren == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.hierarchies.HierarchySystem.onRemoveComponent.' call\n parent.addComponent(newChildren);\n }\n }\n };\n function generateAssemblyHierarchy($this, me) {\n var res = ArrayList_init_$Create$_0(20);\n generateAssemblyHierarchy$add(res, me);\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(res);\n }\n function generateAssemblyHierarchy$add(res, e) {\n res.q(e);\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_children(e);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.HierarchyUtils.generateAssemblyHierarchy.add.' call\n Companion_getInstance_6();\n if (element.hasComponent(44)) {\n destination.q(element);\n }\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n generateAssemblyHierarchy$add(res, element_0);\n }\n }\n function hierarchyExceptSubTreesWithComponent$add($componentId, $entity, l, e) {\n if (!e.hasComponent($componentId) ? true : e.equals($entity)) {\n l.q(e);\n var tmp0_safe_receiver = get_parentComponent(e);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n hierarchyExceptSubTreesWithComponent$add($componentId, $entity, l, element);\n }\n }\n }\n }\n function forEachInHierarchy$iterate($func, e) {\n $func(e);\n var tmp0_safe_receiver = e.__getComponentForKotlin(16);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n forEachInHierarchy$iterate($func, element);\n }\n }\n }\n function forEachInHierarchyExceptHierarchyOfIgnored$iterate($ignored, $func, e) {\n if (!e.equals($ignored)) {\n $func(e);\n var tmp0_safe_receiver = e.__getComponentForKotlin(16);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n forEachInHierarchyExceptHierarchyOfIgnored$iterate($ignored, $func, element);\n }\n }\n }\n }\n function forEachInHierarchyExceptSubHierarchiesWithComponent$iterate($componentId, $func, e) {\n if (!e.hasComponent($componentId)) {\n $func(e);\n var tmp0_safe_receiver = e.__getComponentForKotlin(16);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n forEachInHierarchyExceptSubHierarchiesWithComponent$iterate($componentId, $func, element);\n }\n }\n }\n }\n function findInHierarchy$iterate(res, $finder, e) {\n if (res._v == null) {\n if ($finder(e)) {\n res._v = e;\n } else {\n var tmp0_safe_receiver = e.__getComponentForKotlin(16);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n findInHierarchy$iterate(res, $finder, element);\n }\n }\n }\n }\n }\n function findInHierarchyExceptHierarchyOfIgnored$iterate(res, $ignored, $finder, e) {\n if (res._v == null ? !e.equals($ignored) : false) {\n if ($finder(e)) {\n res._v = e;\n } else {\n var tmp0_safe_receiver = e.__getComponentForKotlin(16);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n findInHierarchyExceptHierarchyOfIgnored$iterate(res, $ignored, $finder, element);\n }\n }\n }\n }\n }\n function filterInHierarchy$iterate($finder, res, e) {\n if ($finder(e)) {\n var tmp;\n if (res._v == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [e];\n } else {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = ensureNotNull(res._v);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$6 = [e];\n tmp = tmp$ret$3.concat(tmp$ret$6);\n }\n res._v = tmp;\n }\n var tmp0_safe_receiver = e.__getComponentForKotlin(16);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n filterInHierarchy$iterate($finder, res, element);\n }\n }\n }\n function findInUpwardsHierarchy$iterate(res, $finder, e) {\n if (res._v == null) {\n if ($finder(e)) {\n res._v = e;\n } else {\n var tmp0_safe_receiver = e.__getComponentForKotlin(17);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.parent;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n findInUpwardsHierarchy$iterate(res, $finder, tmp1_safe_receiver);\n }\n }\n }\n }\n function HierarchyUtils$getHierarchyWithComponent$lambda($componentId) {\n return function (it) {\n return it.hasComponent($componentId);\n };\n }\n function HierarchyUtils() {\n }\n protoOf(HierarchyUtils).duplicateEntity = function (original, services) {\n var serialized = toJsonString(original);\n var deserialized = (new JsonSerializer()).deserializeToEntityHierarchies(serialized, services);\n return first_0(deserialized);\n };\n protoOf(HierarchyUtils).parentComponent = function (entity) {\n return get_parentComponent(entity);\n };\n protoOf(HierarchyUtils).childComponent = function (entity) {\n return get_childComponent(entity);\n };\n protoOf(HierarchyUtils).parent = function (entity) {\n return get_parent(entity);\n };\n protoOf(HierarchyUtils).rootOf = function (entity) {\n var current = entity;\n while (!(get_parent(current) == null)) {\n current = ensureNotNull(get_parent(current));\n }\n return current;\n };\n protoOf(HierarchyUtils).setParent = function (entity, parent) {\n setParent(entity, parent);\n };\n protoOf(HierarchyUtils).setParentMaintainTransform = function (entity, parent) {\n setParentMaintainWorldTransform(entity, parent);\n };\n protoOf(HierarchyUtils).isAssembly = function (entity) {\n return get_isAssembly(entity);\n };\n protoOf(HierarchyUtils).getAssemblyEntities = function (assemblyRoot) {\n return generateAssemblyHierarchy(this, assemblyRoot);\n };\n protoOf(HierarchyUtils).getAssemblyChildren = function (assemblyRoot) {\n var assemblyEntities = HierarchyUtils_instance.getAssemblyEntities(assemblyRoot);\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = assemblyEntities.length;\n while (inductionVariable < last) {\n var element = assemblyEntities[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.HierarchyUtils.getAssemblyChildren.' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_children(element);\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = this_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.HierarchyUtils.getAssemblyChildren..' call\n if (!contains(assemblyEntities, element_0)) {\n destination_0.q(element_0);\n }\n }\n var list = destination_0;\n addAll(destination, list);\n }\n var children = destination;\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(children);\n };\n protoOf(HierarchyUtils).descendants = function (entity) {\n var parentComponent = entity.__getComponentForKotlin(16);\n var tmp1_elvis_lhs = parentComponent == null ? null : parentComponent.allDescendants();\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n };\n protoOf(HierarchyUtils).children = function (entity) {\n var parentComponent = entity.__getComponentForKotlin(16);\n var tmp1_elvis_lhs = parentComponent == null ? null : parentComponent.children;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n };\n protoOf(HierarchyUtils).hierarchy = function (entity) {\n var parentComponent = entity.__getComponentForKotlin(16);\n var tmp1_elvis_lhs = parentComponent == null ? null : parentComponent.hierarchy(entity);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [entity];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n };\n protoOf(HierarchyUtils).hierarchyExceptSubTreesWithComponent = function (entity, componentId) {\n var l = ArrayList_init_$Create$_0(20);\n hierarchyExceptSubTreesWithComponent$add(componentId, entity, l, entity);\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(l);\n };\n protoOf(HierarchyUtils).forEachInHierarchy = function (entity, func) {\n forEachInHierarchy$iterate(func, entity);\n };\n protoOf(HierarchyUtils).forEachInHierarchyExceptHierarchyOfIgnored = function (entity, ignored, func) {\n forEachInHierarchyExceptHierarchyOfIgnored$iterate(ignored, func, entity);\n };\n protoOf(HierarchyUtils).forEachInHierarchyExceptSubHierarchiesWithComponent = function (entity, componentId, func) {\n func(entity);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_children(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.HierarchyUtils.forEachInHierarchyExceptSubHierarchiesWithComponent.' call\n forEachInHierarchyExceptSubHierarchiesWithComponent$iterate(componentId, func, element);\n }\n };\n protoOf(HierarchyUtils).findInHierarchy = function (entity, finder) {\n var res = {_v: null};\n findInHierarchy$iterate(res, finder, entity);\n return res._v;\n };\n protoOf(HierarchyUtils).findInHierarchyExceptHierarchyOfIgnored = function (entity, ignored, finder) {\n var res = {_v: null};\n findInHierarchyExceptHierarchyOfIgnored$iterate(res, ignored, finder, entity);\n return res._v;\n };\n protoOf(HierarchyUtils).filterInHierarchy = function (entity, finder) {\n var res = {_v: null};\n filterInHierarchy$iterate(finder, res, entity);\n var tmp0_elvis_lhs = res._v;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(HierarchyUtils).isDescendantOf = function (entity, other) {\n var currentEntity = get_parent(entity);\n while (!(currentEntity == null)) {\n if (equals(currentEntity, other))\n return true;\n currentEntity = get_parent(currentEntity);\n }\n return false;\n };\n protoOf(HierarchyUtils).findWithComponentInUpwardsHierarchy = function (entity, componentId) {\n var currentEntity = entity;\n while (!(currentEntity == null) ? !currentEntity.isDisposed : false) {\n if (currentEntity.hasComponent(componentId))\n return currentEntity;\n var tmp0_safe_receiver = get_childComponent(currentEntity);\n currentEntity = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.parent;\n }\n return null;\n };\n protoOf(HierarchyUtils).getDescendantsWithComponent = function (entity, componentId) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_descendants(entity);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.HierarchyUtils.getDescendantsWithComponent.' call\n if (element.hasComponent(componentId)) {\n destination.q(element);\n }\n }\n return copyToArray(destination);\n };\n protoOf(HierarchyUtils).getDescendantWithComponent = function (entity, componentId) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = get_descendants(entity);\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.HierarchyUtils.getDescendantWithComponent.' call\n if (element.hasComponent(componentId)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n };\n protoOf(HierarchyUtils).getHierarchyWithComponent = function (entity, componentId) {\n return filterInHierarchy(entity, HierarchyUtils$getHierarchyWithComponent$lambda(componentId));\n };\n protoOf(HierarchyUtils).hasComponentInUpwardsHierarchy = function (entity, componentId) {\n var tmp;\n if (entity.hasComponent(componentId)) {\n tmp = true;\n } else {\n var tmp0_safe_receiver = get_parent(entity);\n tmp = (tmp0_safe_receiver == null ? null : hasComponentInUpwardsHierarchy(tmp0_safe_receiver, componentId)) === true;\n }\n return tmp;\n };\n protoOf(HierarchyUtils).hasAncestor = function (entity, ancestor) {\n var currentEntity = entity;\n while (!(currentEntity == null)) {\n if (equals(currentEntity, ancestor))\n return true;\n currentEntity = get_parent(currentEntity);\n }\n return false;\n };\n protoOf(HierarchyUtils).getAncestors = function (entity) {\n var parent = get_parent(entity);\n var entities = mutableListOf([entity]);\n while (!(parent == null)) {\n entities.q(parent);\n parent = get_parent(parent);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(entities);\n };\n protoOf(HierarchyUtils).findInUpwardsHierarchy = function (entity, finder) {\n var res = {_v: null};\n findInUpwardsHierarchy$iterate(res, finder, entity);\n return res._v;\n };\n var HierarchyUtils_instance;\n function HierarchyUtils_getInstance() {\n return HierarchyUtils_instance;\n }\n function get_descendants(_this__u8e3s4) {\n return HierarchyUtils_instance.descendants(_this__u8e3s4);\n }\n function setParentMaintainWorldTransform(_this__u8e3s4, parent) {\n var pos = get_worldPosition(_this__u8e3s4);\n var rot = get_worldRotation(_this__u8e3s4);\n setParent(_this__u8e3s4, parent);\n TransformUtils_instance.setWorldTransform(_this__u8e3s4, new Transform(pos, rot));\n }\n function get_hierarchy(_this__u8e3s4) {\n return HierarchyUtils_instance.hierarchy(_this__u8e3s4);\n }\n function get_children(_this__u8e3s4) {\n return HierarchyUtils_instance.children(_this__u8e3s4);\n }\n function setParent(_this__u8e3s4, parent) {\n if (!(parent == null)) {\n _this__u8e3s4.addComponent(new ChildComponent(parent));\n } else {\n _this__u8e3s4.removeComponent(17);\n }\n }\n function hierarchyExceptSubTreesWithComponentArray(_this__u8e3s4, componentId) {\n return HierarchyUtils_instance.hierarchyExceptSubTreesWithComponent(_this__u8e3s4, componentId);\n }\n function forEachInHierarchy(_this__u8e3s4, func) {\n return HierarchyUtils_instance.forEachInHierarchy(_this__u8e3s4, func);\n }\n function findInHierarchy(_this__u8e3s4, finder) {\n return HierarchyUtils_instance.findInHierarchy(_this__u8e3s4, finder);\n }\n function get_hierarchySequence(_this__u8e3s4) {\n return hierarchyExceptSubTreeSequence(_this__u8e3s4, null);\n }\n function hierarchyExceptSubTreeArray(_this__u8e3s4, subTreeRoot) {\n var l = ArrayList_init_$Create$_0(20);\n hierarchyExceptSubTreeArray$add(subTreeRoot, l, _this__u8e3s4);\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(l);\n }\n function findWithComponentInUpwardsHierarchy(_this__u8e3s4, componentId) {\n return HierarchyUtils_instance.findWithComponentInUpwardsHierarchy(_this__u8e3s4, componentId);\n }\n function hierarchyExceptSubTreeSequence(_this__u8e3s4, subtreeRoot) {\n return hierarchyExceptSubTreeSequence$iterateHierarchySequence(subtreeRoot, _this__u8e3s4);\n }\n function hierarchyExceptSubTreesWithComponentSequence(_this__u8e3s4, componentId) {\n return hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence(_this__u8e3s4, componentId, _this__u8e3s4);\n }\n function findInHierarchyExceptHierarchyOfIgnored(_this__u8e3s4, ignored, func) {\n return HierarchyUtils_instance.findInHierarchyExceptHierarchyOfIgnored(_this__u8e3s4, ignored, func);\n }\n function filterInHierarchy(_this__u8e3s4, finder) {\n return HierarchyUtils_instance.filterInHierarchy(_this__u8e3s4, finder);\n }\n function hasComponentInUpwardsHierarchy(_this__u8e3s4, componentId) {\n return HierarchyUtils_instance.hasComponentInUpwardsHierarchy(_this__u8e3s4, componentId);\n }\n function get_childrenSequence(_this__u8e3s4) {\n var parentComponent = _this__u8e3s4.__getComponentForKotlin(16);\n var tmp1_safe_receiver = parentComponent == null ? null : parentComponent.children;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : asSequence_0(tmp1_safe_receiver);\n return tmp2_elvis_lhs == null ? emptySequence() : tmp2_elvis_lhs;\n }\n function forEachInHierarchyExceptHierarchyOfIgnored(_this__u8e3s4, ignored, func) {\n return HierarchyUtils_instance.forEachInHierarchyExceptHierarchyOfIgnored(_this__u8e3s4, ignored, func);\n }\n function hierarchyContains(_this__u8e3s4, entity) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.sequences.any' call\n var tmp0_iterator = get_hierarchySequence(_this__u8e3s4).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.hierarchies.hierarchyContains.' call\n if (element.equals(entity)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n return tmp$ret$1;\n }\n function get_upwardsHierarchy(_this__u8e3s4) {\n return HierarchyUtils_instance.getAncestors(_this__u8e3s4);\n }\n function getHierarchyWithComponent(_this__u8e3s4, componentId) {\n return HierarchyUtils_instance.getHierarchyWithComponent(_this__u8e3s4, componentId);\n }\n function isDescendantOf(_this__u8e3s4, other) {\n return HierarchyUtils_instance.isDescendantOf(_this__u8e3s4, other);\n }\n function forEachInHierarchyExceptSubHierarchiesWithComponent(_this__u8e3s4, componentId, func) {\n return HierarchyUtils_instance.forEachInHierarchyExceptSubHierarchiesWithComponent(_this__u8e3s4, componentId, func);\n }\n function hierarchyExceptSubTreeArray$add($subTreeRoot, l, e) {\n if (!(e.id === $subTreeRoot.id)) {\n l.q(e);\n var tmp0_safe_receiver = get_parentComponent(e);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n hierarchyExceptSubTreeArray$add($subTreeRoot, l, element);\n }\n }\n }\n }\n function hierarchyExceptSubTreeSequence$iterateHierarchySequence($subtreeRoot, e) {\n if (!e.equals($subtreeRoot)) {\n return sequence(hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda_0(e, $subtreeRoot, null));\n }\n return emptySequence();\n }\n function hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence($this_hierarchyExceptSubTreesWithComponentSequence, $componentId, e) {\n if (e.equals($this_hierarchyExceptSubTreesWithComponentSequence) ? true : !e.hasComponent($componentId)) {\n return sequence(hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda_0(e, $this_hierarchyExceptSubTreesWithComponentSequence, $componentId, null));\n }\n return emptySequence();\n }\n function hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda$lambda($subtreeRoot) {\n return function (it) {\n return hierarchyExceptSubTreeSequence$iterateHierarchySequence($subtreeRoot, it);\n };\n }\n function hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda($e, $subtreeRoot, resultContinuation) {\n this.e29_1 = $e;\n this.f29_1 = $subtreeRoot;\n CoroutineImpl.call(this, resultContinuation);\n }\n protoOf(hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda).h29 = function ($this$sequence, $completion) {\n var tmp = this.i29($this$sequence, $completion);\n tmp.pc_1 = Unit_instance;\n tmp.qc_1 = null;\n return tmp.yc();\n };\n protoOf(hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda).ld = function (p1, $completion) {\n return this.h29(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n };\n protoOf(hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda).yc = function () {\n var suspendResult = this.pc_1;\n $sm: do\n try {\n var tmp = this.nc_1;\n switch (tmp) {\n case 0:\n this.oc_1 = 3;\n this.nc_1 = 1;\n suspendResult = this.g29_1.df(this.e29_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n\n continue $sm;\n case 1:\n this.nc_1 = 2;\n var tmp_0 = get_childrenSequence(this.e29_1);\n suspendResult = this.g29_1.ff(flatMap(tmp_0, hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda$lambda(this.f29_1)), this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n\n continue $sm;\n case 2:\n return Unit_instance;\n case 3:\n throw this.qc_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.oc_1 === 3) {\n throw e;\n } else {\n this.nc_1 = this.oc_1;\n this.qc_1 = e;\n }\n }\n while (true);\n };\n protoOf(hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda).i29 = function ($this$sequence, completion) {\n var i = new hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda(this.e29_1, this.f29_1, completion);\n i.g29_1 = $this$sequence;\n return i;\n };\n function hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda_0($e, $subtreeRoot, resultContinuation) {\n var i = new hierarchyExceptSubTreeSequence$iterateHierarchySequence$slambda($e, $subtreeRoot, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.h29($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n }\n function hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda$lambda($this_hierarchyExceptSubTreesWithComponentSequence, $componentId) {\n return function (it) {\n return hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence($this_hierarchyExceptSubTreesWithComponentSequence, $componentId, it);\n };\n }\n function hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda($e, $this_hierarchyExceptSubTreesWithComponentSequence, $componentId, resultContinuation) {\n this.r29_1 = $e;\n this.s29_1 = $this_hierarchyExceptSubTreesWithComponentSequence;\n this.t29_1 = $componentId;\n CoroutineImpl.call(this, resultContinuation);\n }\n protoOf(hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda).h29 = function ($this$sequence, $completion) {\n var tmp = this.i29($this$sequence, $completion);\n tmp.pc_1 = Unit_instance;\n tmp.qc_1 = null;\n return tmp.yc();\n };\n protoOf(hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda).ld = function (p1, $completion) {\n return this.h29(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n };\n protoOf(hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda).yc = function () {\n var suspendResult = this.pc_1;\n $sm: do\n try {\n var tmp = this.nc_1;\n switch (tmp) {\n case 0:\n this.oc_1 = 3;\n this.nc_1 = 1;\n suspendResult = this.u29_1.df(this.r29_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n\n continue $sm;\n case 1:\n this.nc_1 = 2;\n var tmp_0 = get_childrenSequence(this.r29_1);\n suspendResult = this.u29_1.ff(flatMap(tmp_0, hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda$lambda(this.s29_1, this.t29_1)), this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n\n continue $sm;\n case 2:\n return Unit_instance;\n case 3:\n throw this.qc_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.oc_1 === 3) {\n throw e;\n } else {\n this.nc_1 = this.oc_1;\n this.qc_1 = e;\n }\n }\n while (true);\n };\n protoOf(hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda).i29 = function ($this$sequence, completion) {\n var i = new hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda(this.r29_1, this.s29_1, this.t29_1, completion);\n i.u29_1 = $this$sequence;\n return i;\n };\n function hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda_0($e, $this_hierarchyExceptSubTreesWithComponentSequence, $componentId, resultContinuation) {\n var i = new hierarchyExceptSubTreesWithComponentSequence$iterateHierarchySequence$slambda($e, $this_hierarchyExceptSubTreesWithComponentSequence, $componentId, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.h29($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n }\n function InSceneComponent() {\n }\n protoOf(InSceneComponent).x1k = function () {\n return this.id;\n };\n protoOf(InSceneComponent).s1k = function () {\n return 5;\n };\n protoOf(InSceneComponent).eq = function (other) {\n return true;\n };\n var InSceneComponent_instance;\n function InSceneComponent_getInstance() {\n return InSceneComponent_instance;\n }\n function get_isInScene(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(InSceneComponent_instance.id) ? true : _this__u8e3s4.hasComponent(SceneComponent_instance.id);\n }\n function generateHierarchy($this, me) {\n var res = ArrayList_init_$Create$_0(20);\n if (me == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.hierarchies.ParentComponent.generateHierarchy.' call\n res.q(me);\n }\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = $this.children;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n generateHierarchy$add(res, element);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(res);\n }\n function generateHierarchy$default($this, me, $super) {\n me = me === VOID ? null : me;\n return generateHierarchy($this, me);\n }\n function Companion_49() {\n this.id = 16;\n }\n protoOf(Companion_49).s1k = function () {\n return this.id;\n };\n var Companion_instance_49;\n function Companion_getInstance_50() {\n return Companion_instance_49;\n }\n function generateHierarchy$add(res, e) {\n res.q(e);\n var tmp0_safe_receiver = get_parentComponent(e);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n generateHierarchy$add(res, element);\n }\n }\n }\n function ParentComponent(children) {\n this.children = children;\n }\n protoOf(ParentComponent).c1k = function () {\n return this.children;\n };\n protoOf(ParentComponent).x1k = function () {\n return 16;\n };\n protoOf(ParentComponent).addChild = function (c) {\n var tmp;\n if (contains(this.children, c)) {\n tmp = this;\n } else {\n // Inline function 'kotlin.collections.plusElement' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$0 = this.children;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [c];\n var tmp$ret$4 = tmp$ret$0.concat(tmp$ret$3);\n tmp = new ParentComponent(tmp$ret$4);\n }\n return tmp;\n };\n protoOf(ParentComponent).removeChild = function (c) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.children;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.ParentComponent.removeChild.' call\n if (!c.equals(element)) {\n destination.q(element);\n }\n }\n var tmp$ret$3 = copyToArray(destination);\n return new ParentComponent(tmp$ret$3);\n };\n protoOf(ParentComponent).addChildren = function (newChildren) {\n // Inline function 'kotlin.collections.mutableSetOf' call\n var setOfChildren = LinkedHashSet_init_$Create$();\n addAll_1(setOfChildren, this.children);\n addAll_1(setOfChildren, newChildren);\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$1 = copyToArray(setOfChildren);\n return new ParentComponent(tmp$ret$1);\n };\n protoOf(ParentComponent).hierarchy = function (me) {\n return generateHierarchy(this, me);\n };\n protoOf(ParentComponent).allDescendants = function () {\n return generateHierarchy$default(this);\n };\n protoOf(ParentComponent).eq = function (other) {\n var otherParent = other instanceof ParentComponent ? other : THROW_CCE();\n var tmp;\n if (otherParent.children.length === this.children.length) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.all' call\n var indexedObject = this.children;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.ParentComponent.eq.' call\n if (!contains(otherParent.children, element)) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n tmp = tmp$ret$1;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(ParentComponent).equals = function (other) {\n var tmp;\n if (other instanceof ParentComponent) {\n var tmp_0;\n if (other.children.length === this.children.length) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.all' call\n var indexedObject = this.children;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.ParentComponent.equals.' call\n if (!contains(other.children, element)) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n tmp_0 = tmp$ret$1;\n } else {\n tmp_0 = false;\n }\n tmp = tmp_0;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(ParentComponent).hashCode = function () {\n return hashCode(this.children);\n };\n protoOf(ParentComponent).af = function () {\n return this.children;\n };\n protoOf(ParentComponent).v29 = function (children) {\n return new ParentComponent(children);\n };\n protoOf(ParentComponent).copy = function (children, $super) {\n children = children === VOID ? this.children : children;\n return this.v29(children);\n };\n protoOf(ParentComponent).toString = function () {\n return 'ParentComponent(children=' + toString(this.children) + ')';\n };\n function get_parentComponent(_this__u8e3s4) {\n return _this__u8e3s4.__getComponentForKotlin(16);\n }\n function SceneComponent() {\n }\n protoOf(SceneComponent).x1k = function () {\n return this.id;\n };\n protoOf(SceneComponent).s1k = function () {\n return 97;\n };\n protoOf(SceneComponent).eq = function (other) {\n return true;\n };\n var SceneComponent_instance;\n function SceneComponent_getInstance() {\n return SceneComponent_instance;\n }\n function Companion_50() {\n this.ID = 'SceneGraphSystem';\n }\n protoOf(Companion_50).u1n = function () {\n return this.ID;\n };\n var Companion_instance_50;\n function Companion_getInstance_51() {\n return Companion_instance_50;\n }\n function updateWithInfoFromParent($this, entity) {\n var tmp = HierarchyUtils_instance;\n tmp.forEachInHierarchy(entity, SceneGraphSystem$updateWithInfoFromParent$update$ref($this));\n }\n function isScene($this, entity) {\n return entity.hasComponent(SceneComponent_instance.id);\n }\n function removeInSceneComponent($this, entity) {\n if (isInScene($this, entity)) {\n entity.removeComponent(InSceneComponent_instance.id);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_children(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.SceneGraphSystem.removeInSceneComponent.' call\n removeInSceneComponent($this, element);\n }\n }\n }\n function isInScene($this, entity) {\n return !(entity == null) ? get_isInScene(entity) : false;\n }\n function updateWithInfoFromParent$update(this$0, e) {\n if (e.isDisposed)\n return Unit_instance;\n var tmp;\n if (isScene(this$0, e)) {\n tmp = true;\n } else {\n var tmp_0;\n var tmp0_safe_receiver = get_parent(e);\n if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.isDisposed) === false) {\n tmp_0 = isInScene(this$0, get_parent(e));\n } else {\n tmp_0 = false;\n }\n tmp = tmp_0;\n }\n if (tmp) {\n if (!isInScene(this$0, e)) {\n e.addComponent(InSceneComponent_instance);\n }\n } else {\n removeInSceneComponent(this$0, e);\n }\n }\n function SceneGraphSystem$updateWithInfoFromParent$update$ref(this$0) {\n var l = function (p0) {\n updateWithInfoFromParent$update(this$0, p0);\n return Unit_instance;\n };\n l.callableName = 'update';\n return l;\n }\n function SceneGraphSystem(sceneManager) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [5];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = ['HierarchySystem'];\n SystemBase.call(this, 'SceneGraphSystem', 17, tmp, tmp$ret$5, null);\n this.sceneManager = sceneManager;\n }\n protoOf(SceneGraphSystem).q1i = function () {\n return this.sceneManager;\n };\n protoOf(SceneGraphSystem).onAddComponent = function (entity, newComponent) {\n updateWithInfoFromParent(this, entity);\n };\n protoOf(SceneGraphSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n updateWithInfoFromParent(this, entity);\n };\n protoOf(SceneGraphSystem).onRemoveComponent = function (entity, oldComponent) {\n entity.removeComponent(InSceneComponent_instance.id);\n updateWithInfoFromParent(this, entity);\n };\n function SceneManager() {\n }\n function History() {\n }\n var HistoryEventType_TAKE_SNAPSHOT_instance;\n var HistoryEventType_UNDO_instance;\n var HistoryEventType_REDO_instance;\n var HistoryEventType_CLEAR_instance;\n var HistoryEventType_DISCARD_SNAPSHOT_instance;\n function values_2() {\n return [HistoryEventType_TAKE_SNAPSHOT_getInstance(), HistoryEventType_UNDO_getInstance(), HistoryEventType_REDO_getInstance(), HistoryEventType_CLEAR_getInstance(), HistoryEventType_DISCARD_SNAPSHOT_getInstance()];\n }\n function valueOf_2(value) {\n switch (value) {\n case 'TAKE_SNAPSHOT':\n return HistoryEventType_TAKE_SNAPSHOT_getInstance();\n case 'UNDO':\n return HistoryEventType_UNDO_getInstance();\n case 'REDO':\n return HistoryEventType_REDO_getInstance();\n case 'CLEAR':\n return HistoryEventType_CLEAR_getInstance();\n case 'DISCARD_SNAPSHOT':\n return HistoryEventType_DISCARD_SNAPSHOT_getInstance();\n default:\n HistoryEventType_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var HistoryEventType_entriesInitialized;\n function HistoryEventType_initEntries() {\n if (HistoryEventType_entriesInitialized)\n return Unit_instance;\n HistoryEventType_entriesInitialized = true;\n HistoryEventType_TAKE_SNAPSHOT_instance = new HistoryEventType('TAKE_SNAPSHOT', 0);\n HistoryEventType_UNDO_instance = new HistoryEventType('UNDO', 1);\n HistoryEventType_REDO_instance = new HistoryEventType('REDO', 2);\n HistoryEventType_CLEAR_instance = new HistoryEventType('CLEAR', 3);\n HistoryEventType_DISCARD_SNAPSHOT_instance = new HistoryEventType('DISCARD_SNAPSHOT', 4);\n }\n function HistoryEventType(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function HistoryEvent() {\n this.TAKE_SNAPSHOT = 'TAKE_SNAPSHOT';\n this.UNDO = 'UNDO';\n this.REDO = 'REDO';\n this.CLEAR = 'CLEAR';\n this.DISCARD_SNAPSHOT = 'DISCARD_SNAPSHOT';\n }\n protoOf(HistoryEvent).k2a = function () {\n return this.TAKE_SNAPSHOT;\n };\n protoOf(HistoryEvent).l2a = function () {\n return this.UNDO;\n };\n protoOf(HistoryEvent).m2a = function () {\n return this.REDO;\n };\n protoOf(HistoryEvent).n2a = function () {\n return this.CLEAR;\n };\n protoOf(HistoryEvent).o2a = function () {\n return this.DISCARD_SNAPSHOT;\n };\n var HistoryEvent_instance;\n function HistoryEvent_getInstance() {\n return HistoryEvent_instance;\n }\n function Companion_51() {\n this.id = 88;\n }\n protoOf(Companion_51).s1k = function () {\n return this.id;\n };\n var Companion_instance_51;\n function Companion_getInstance_52() {\n return Companion_instance_51;\n }\n function HistoryChangedEventComponent(historyEventType) {\n this.historyEventType = historyEventType;\n this.p2a_1 = 88;\n }\n protoOf(HistoryChangedEventComponent).q2a = function () {\n return this.historyEventType;\n };\n protoOf(HistoryChangedEventComponent).x1k = function () {\n return this.p2a_1;\n };\n protoOf(HistoryChangedEventComponent).r2a = function () {\n return this.historyEventType.w9_1;\n };\n protoOf(HistoryChangedEventComponent).eq = function (other) {\n return true;\n };\n function triggerHistoryChangedEvent(_this__u8e3s4, type, entityManager) {\n entityManager.addComponent(_this__u8e3s4, new HistoryChangedEventComponent(type));\n entityManager.removeComponent(_this__u8e3s4, 88);\n }\n function HistoryEventType_TAKE_SNAPSHOT_getInstance() {\n HistoryEventType_initEntries();\n return HistoryEventType_TAKE_SNAPSHOT_instance;\n }\n function HistoryEventType_UNDO_getInstance() {\n HistoryEventType_initEntries();\n return HistoryEventType_UNDO_instance;\n }\n function HistoryEventType_REDO_getInstance() {\n HistoryEventType_initEntries();\n return HistoryEventType_REDO_instance;\n }\n function HistoryEventType_CLEAR_getInstance() {\n HistoryEventType_initEntries();\n return HistoryEventType_CLEAR_instance;\n }\n function HistoryEventType_DISCARD_SNAPSHOT_getInstance() {\n HistoryEventType_initEntries();\n return HistoryEventType_DISCARD_SNAPSHOT_instance;\n }\n function makeFreeSlots($this) {\n if ($this.v2a_1.size >= $this.maxHistorySize) {\n removeOld($this);\n }\n }\n function purgeFutureSnapshots($this) {\n while ($this.v2a_1.size > 0 ? $this.v2a_1.size > $this.u2a_1 : false) {\n $this.v2a_1.removeLast();\n triggerHistoryChangedEvent($this.t2a_1, HistoryEventType_DISCARD_SNAPSHOT_getInstance(), $this.entityManager);\n }\n }\n function removeOld($this) {\n $this.v2a_1.removeFirst();\n $this.u2a_1 = $this.u2a_1 - 1 | 0;\n }\n function _get_isAtTopOfStack__ylrnny($this) {\n return $this.u2a_1 >= ($this.v2a_1.size - 1 | 0);\n }\n function HistoryImpl(entityManager, snapshotService, maxHistorySize) {\n maxHistorySize = maxHistorySize === VOID ? 500 : maxHistorySize;\n this.entityManager = entityManager;\n this.snapshotService = snapshotService;\n this.maxHistorySize = maxHistorySize;\n if (this.maxHistorySize < 1) {\n throw Exception_init_$Create$('History was initialized with size ' + this.maxHistorySize + ', please initialize with at least size 2.');\n }\n this.s2a_1 = false;\n this.t2a_1 = this.entityManager.createEntity();\n this.u2a_1 = 0;\n this.v2a_1 = new CircularBuffer(this.maxHistorySize);\n }\n protoOf(HistoryImpl).p1i = function () {\n return this.entityManager;\n };\n protoOf(HistoryImpl).v1i = function () {\n return this.snapshotService;\n };\n protoOf(HistoryImpl).w2a = function () {\n return this.maxHistorySize;\n };\n protoOf(HistoryImpl).g2a = function () {\n return this.s2a_1;\n };\n protoOf(HistoryImpl).h2a = function (snapshotName) {\n if (this.isPaused)\n return Unit_instance;\n makeFreeSlots(this);\n purgeFutureSnapshots(this);\n this.v2a_1.add(this.snapshotService.takeSnapshot(snapshotName));\n this.u2a_1 = this.u2a_1 + 1 | 0;\n triggerHistoryChangedEvent(this.t2a_1, HistoryEventType_TAKE_SNAPSHOT_getInstance(), this.entityManager);\n };\n protoOf(HistoryImpl).getSnapshots = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.v2a_1.toList();\n return copyToArray(this_0);\n };\n protoOf(HistoryImpl).discardLatestSnapshot = function () {\n this.v2a_1.removeLast();\n if (this.v2a_1.size < this.u2a_1) {\n this.u2a_1 = this.u2a_1 - 1 | 0;\n }\n triggerHistoryChangedEvent(this.t2a_1, HistoryEventType_DISCARD_SNAPSHOT_getInstance(), this.entityManager);\n };\n protoOf(HistoryImpl).clear = function () {\n this.u2a_1 = 0;\n this.v2a_1.clear();\n this.s2a_1 = false;\n triggerHistoryChangedEvent(this.t2a_1, HistoryEventType_CLEAR_getInstance(), this.entityManager);\n };\n protoOf(HistoryImpl).redo = function () {\n if (this.isPaused)\n return Unit_instance;\n if (this.canRedo()) {\n this.u2a_1 = this.u2a_1 + 1 | 0;\n var snapshot = this.v2a_1.get(this.u2a_1);\n this.snapshotService.loadSnapshot(snapshot);\n if (_get_isAtTopOfStack__ylrnny(this)) {\n this.discardLatestSnapshot();\n }\n triggerHistoryChangedEvent(this.t2a_1, HistoryEventType_REDO_getInstance(), this.entityManager);\n }\n };\n protoOf(HistoryImpl).undo = function () {\n if (this.isPaused)\n return Unit_instance;\n if (this.canUndo()) {\n if (_get_isAtTopOfStack__ylrnny(this)) {\n this.takeSnapshot('undo temp snapshot');\n this.u2a_1 = this.u2a_1 - 1 | 0;\n }\n this.u2a_1 = this.u2a_1 - 1 | 0;\n var snapshot = this.v2a_1.get(this.u2a_1);\n this.snapshotService.loadSnapshot(snapshot);\n triggerHistoryChangedEvent(this.t2a_1, HistoryEventType_UNDO_getInstance(), this.entityManager);\n }\n };\n protoOf(HistoryImpl).canUndo = function () {\n return this.u2a_1 > 0;\n };\n protoOf(HistoryImpl).pause = function () {\n this.s2a_1 = true;\n };\n protoOf(HistoryImpl).unPause = function () {\n this.s2a_1 = false;\n };\n protoOf(HistoryImpl).canRedo = function () {\n return !_get_isAtTopOfStack__ylrnny(this);\n };\n protoOf(HistoryImpl).historySize = function () {\n return this.v2a_1.size;\n };\n protoOf(HistoryImpl).getHistory = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.v2a_1;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.history.HistoryImpl.getHistory.' call\n var tmp$ret$0 = item.name;\n destination.q(tmp$ret$0);\n }\n return copyToArray(destination);\n };\n protoOf(HistoryImpl).remainingItemsToUndo = function () {\n return this.u2a_1;\n };\n var LogLevel_DEBUG_instance;\n var LogLevel_INFO_instance;\n var LogLevel_WARN_instance;\n var LogLevel_ERROR_instance;\n var LogLevel_NONE_instance;\n function values_3() {\n return [LogLevel_DEBUG_getInstance(), LogLevel_INFO_getInstance(), LogLevel_WARN_getInstance(), LogLevel_ERROR_getInstance(), LogLevel_NONE_getInstance()];\n }\n function valueOf_3(value) {\n switch (value) {\n case 'DEBUG':\n return LogLevel_DEBUG_getInstance();\n case 'INFO':\n return LogLevel_INFO_getInstance();\n case 'WARN':\n return LogLevel_WARN_getInstance();\n case 'ERROR':\n return LogLevel_ERROR_getInstance();\n case 'NONE':\n return LogLevel_NONE_getInstance();\n default:\n LogLevel_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var LogLevel_entriesInitialized;\n function LogLevel_initEntries() {\n if (LogLevel_entriesInitialized)\n return Unit_instance;\n LogLevel_entriesInitialized = true;\n LogLevel_DEBUG_instance = new LogLevel('DEBUG', 0);\n LogLevel_INFO_instance = new LogLevel('INFO', 1);\n LogLevel_WARN_instance = new LogLevel('WARN', 2);\n LogLevel_ERROR_instance = new LogLevel('ERROR', 3);\n LogLevel_NONE_instance = new LogLevel('NONE', 4);\n }\n function LogLevel(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function LogLevelJavascriptImpostor() {\n this.DEBUG = 0;\n this.INFO = 1;\n this.WARN = 2;\n this.ERROR = 3;\n this.NONE = 4;\n }\n protoOf(LogLevelJavascriptImpostor).z2a = function () {\n return this.DEBUG;\n };\n protoOf(LogLevelJavascriptImpostor).a2b = function () {\n return this.INFO;\n };\n protoOf(LogLevelJavascriptImpostor).b2b = function () {\n return this.WARN;\n };\n protoOf(LogLevelJavascriptImpostor).c2b = function () {\n return this.ERROR;\n };\n protoOf(LogLevelJavascriptImpostor).h22 = function () {\n return this.NONE;\n };\n var LogLevelJavascriptImpostor_instance;\n function LogLevelJavascriptImpostor_getInstance() {\n return LogLevelJavascriptImpostor_instance;\n }\n function LogLevel_DEBUG_getInstance() {\n LogLevel_initEntries();\n return LogLevel_DEBUG_instance;\n }\n function LogLevel_INFO_getInstance() {\n LogLevel_initEntries();\n return LogLevel_INFO_instance;\n }\n function LogLevel_WARN_getInstance() {\n LogLevel_initEntries();\n return LogLevel_WARN_instance;\n }\n function LogLevel_ERROR_getInstance() {\n LogLevel_initEntries();\n return LogLevel_ERROR_instance;\n }\n function LogLevel_NONE_getInstance() {\n LogLevel_initEntries();\n return LogLevel_NONE_instance;\n }\n function Logger() {\n }\n function LoggerImpl() {\n this.h2b_1 = LogLevel_ERROR_getInstance();\n }\n protoOf(LoggerImpl).d2b = function (_set____db54di) {\n this.h2b_1 = _set____db54di;\n };\n protoOf(LoggerImpl).e2b = function () {\n return this.h2b_1;\n };\n protoOf(LoggerImpl).debug = function (f) {\n if (this.h2b_1.y9(LogLevel_DEBUG_getInstance()) <= 0) {\n echoStandardConsole(f());\n }\n };\n protoOf(LoggerImpl).error = function (f) {\n if (this.h2b_1.y9(LogLevel_ERROR_getInstance()) <= 0) {\n echoStandardConsole(f());\n }\n };\n protoOf(LoggerImpl).warn = function (f) {\n if (this.h2b_1.y9(LogLevel_WARN_getInstance()) <= 0) {\n echoStandardConsole(f());\n }\n };\n protoOf(LoggerImpl).info = function (f) {\n if (this.h2b_1.y9(LogLevel_INFO_getInstance()) <= 0) {\n echoStandardConsole(f());\n }\n };\n function LoggerState$LoggerWrap$debug$lambda(this$0, $f) {\n return function () {\n return this$0.i2b_1 + $f();\n };\n }\n function LoggerState$LoggerWrap$error$lambda(this$0, $f) {\n return function () {\n return this$0.i2b_1 + $f();\n };\n }\n function LoggerState$LoggerWrap$warn$lambda(this$0, $f) {\n return function () {\n return this$0.i2b_1 + $f();\n };\n }\n function LoggerState$LoggerWrap$info$lambda(this$0, $f) {\n return function () {\n return this$0.i2b_1 + $f();\n };\n }\n function LoggerWrap(packageColon) {\n this.i2b_1 = packageColon;\n }\n protoOf(LoggerWrap).d2b = function (_anonymous_parameter_0__qggqh8) {\n };\n protoOf(LoggerWrap).e2b = function () {\n return LoggerState_getInstance().y1i_1.level;\n };\n protoOf(LoggerWrap).debug = function (f) {\n var tmp = LoggerState_getInstance().y1i_1;\n tmp.debug(LoggerState$LoggerWrap$debug$lambda(this, f));\n };\n protoOf(LoggerWrap).error = function (f) {\n var tmp = LoggerState_getInstance().y1i_1;\n tmp.error(LoggerState$LoggerWrap$error$lambda(this, f));\n };\n protoOf(LoggerWrap).warn = function (f) {\n var tmp = LoggerState_getInstance().y1i_1;\n tmp.warn(LoggerState$LoggerWrap$warn$lambda(this, f));\n };\n protoOf(LoggerWrap).info = function (f) {\n var tmp = LoggerState_getInstance().y1i_1;\n tmp.info(LoggerState$LoggerWrap$info$lambda(this, f));\n };\n function LoggerState() {\n LoggerState_instance = this;\n this.y1i_1 = new LoggerImpl();\n this.z1i_1 = 'com.ikea';\n }\n protoOf(LoggerState).j2b = function (level) {\n this.y1i_1.level = level;\n };\n protoOf(LoggerState).k2b = function (logger, basePackageName) {\n this.y1i_1 = logger;\n this.z1i_1 = basePackageName;\n };\n protoOf(LoggerState).m1m = function (packageName) {\n return this.z1i_1 === '' ? new LoggerWrap(packageName + ':') : new LoggerWrap(this.z1i_1 + '.' + packageName + ':');\n };\n protoOf(LoggerState).a1j = function () {\n return this.y1i_1;\n };\n var LoggerState_instance;\n function LoggerState_getInstance() {\n if (LoggerState_instance == null)\n new LoggerState();\n return LoggerState_instance;\n }\n function MockLogger() {\n this.l2b_1 = LogLevel_DEBUG_getInstance();\n var tmp = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp.debugLog = ArrayList_init_$Create$();\n var tmp_0 = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp_0.errorLog = ArrayList_init_$Create$();\n var tmp_1 = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp_1.warnLog = ArrayList_init_$Create$();\n var tmp_2 = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp_2.infoLog = ArrayList_init_$Create$();\n }\n protoOf(MockLogger).d2b = function (_set____db54di) {\n this.l2b_1 = _set____db54di;\n };\n protoOf(MockLogger).e2b = function () {\n return this.l2b_1;\n };\n protoOf(MockLogger).m2b = function () {\n return this.debugLog;\n };\n protoOf(MockLogger).debug = function (f) {\n if (this.l2b_1.y9(LogLevel_DEBUG_getInstance()) <= 0) {\n this.debugLog.q(f());\n }\n };\n protoOf(MockLogger).n2b = function () {\n return this.errorLog;\n };\n protoOf(MockLogger).error = function (f) {\n if (this.l2b_1.y9(LogLevel_ERROR_getInstance()) <= 0) {\n this.errorLog.q(f());\n }\n };\n protoOf(MockLogger).o2b = function () {\n return this.warnLog;\n };\n protoOf(MockLogger).warn = function (f) {\n if (this.l2b_1.y9(LogLevel_WARN_getInstance()) <= 0) {\n this.warnLog.q(f());\n }\n };\n protoOf(MockLogger).p2b = function () {\n return this.infoLog;\n };\n protoOf(MockLogger).info = function (f) {\n if (this.l2b_1.y9(LogLevel_INFO_getInstance()) <= 0) {\n this.infoLog.q(f());\n }\n };\n protoOf(MockLogger).getDebugLogFor = function (packageName) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.debugLog;\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.logging.MockLogger.getDebugLogFor.' call\n var tmp0_safe_receiver = firstOrNull_1(split(toString_0(element), charArrayOf([_Char___init__impl__6a9atx(58)])));\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : contains_0(tmp0_safe_receiver, packageName);\n if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {\n destination.q(element);\n }\n }\n return destination;\n };\n protoOf(MockLogger).getInfoLogFor = function (packageName) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.infoLog;\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.logging.MockLogger.getInfoLogFor.' call\n var tmp0_safe_receiver = firstOrNull_1(split(toString_0(element), charArrayOf([_Char___init__impl__6a9atx(58)])));\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : contains_0(tmp0_safe_receiver, packageName);\n if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {\n destination.q(element);\n }\n }\n return destination;\n };\n protoOf(MockLogger).getWarnLogFor = function (packageName) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.warnLog;\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.logging.MockLogger.getWarnLogFor.' call\n var tmp0_safe_receiver = firstOrNull_1(split(toString_0(element), charArrayOf([_Char___init__impl__6a9atx(58)])));\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : contains_0(tmp0_safe_receiver, packageName);\n if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {\n destination.q(element);\n }\n }\n return destination;\n };\n protoOf(MockLogger).getErrorLogFor = function (packageName) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.errorLog;\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.logging.MockLogger.getErrorLogFor.' call\n var tmp0_safe_receiver = firstOrNull_1(split(toString_0(element), charArrayOf([_Char___init__impl__6a9atx(58)])));\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : contains_0(tmp0_safe_receiver, packageName);\n if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {\n destination.q(element);\n }\n }\n return destination;\n };\n protoOf(MockLogger).resetMockLogger = function () {\n this.debugLog.z();\n this.errorLog.z();\n this.warnLog.z();\n this.infoLog.z();\n };\n function AxisAngle(axis, angle) {\n this.axis = axis;\n this.angle = angle;\n }\n protoOf(AxisAngle).q2b = function () {\n return this.axis;\n };\n protoOf(AxisAngle).r2b = function () {\n return this.angle;\n };\n protoOf(AxisAngle).af = function () {\n return this.axis;\n };\n protoOf(AxisAngle).bf = function () {\n return this.angle;\n };\n protoOf(AxisAngle).s2b = function (axis, angle) {\n return new AxisAngle(axis, angle);\n };\n protoOf(AxisAngle).copy = function (axis, angle, $super) {\n axis = axis === VOID ? this.axis : axis;\n angle = angle === VOID ? this.angle : angle;\n return this.s2b(axis, angle);\n };\n protoOf(AxisAngle).toString = function () {\n return 'AxisAngle(axis=' + this.axis + ', angle=' + this.angle + ')';\n };\n protoOf(AxisAngle).hashCode = function () {\n var result = this.axis.hashCode();\n result = imul(result, 31) + this.angle.hashCode() | 0;\n return result;\n };\n protoOf(AxisAngle).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof AxisAngle))\n return false;\n var tmp0_other_with_cast = other instanceof AxisAngle ? other : THROW_CCE();\n if (!this.axis.equals(tmp0_other_with_cast.axis))\n return false;\n if (!this.angle.equals(tmp0_other_with_cast.angle))\n return false;\n return true;\n };\n function Degrees(value) {\n this.value = value;\n }\n protoOf(Degrees).u2 = function () {\n return this.value;\n };\n protoOf(Degrees).toRadian = function () {\n Companion_getInstance_57();\n return new Radians(this.value * 0.017453292519943295);\n };\n protoOf(Degrees).af = function () {\n return this.value;\n };\n protoOf(Degrees).t2b = function (value) {\n return new Degrees(value);\n };\n protoOf(Degrees).copy = function (value, $super) {\n value = value === VOID ? this.value : value;\n return this.t2b(value);\n };\n protoOf(Degrees).toString = function () {\n return 'Degrees(value=' + this.value + ')';\n };\n protoOf(Degrees).hashCode = function () {\n return getNumberHashCode(this.value);\n };\n protoOf(Degrees).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Degrees))\n return false;\n var tmp0_other_with_cast = other instanceof Degrees ? other : THROW_CCE();\n if (!equals(this.value, tmp0_other_with_cast.value))\n return false;\n return true;\n };\n function Dimension() {\n }\n function DualDouble(first, last) {\n this.first = first;\n this.last = last;\n }\n protoOf(DualDouble).x2b = function (_set____db54di) {\n this.first = _set____db54di;\n };\n protoOf(DualDouble).o21 = function () {\n return this.first;\n };\n protoOf(DualDouble).y2b = function (_set____db54di) {\n this.last = _set____db54di;\n };\n protoOf(DualDouble).p21 = function () {\n return this.last;\n };\n protoOf(DualDouble).z2b = function () {\n return (this.first + this.last) / 2;\n };\n protoOf(DualDouble).a = function () {\n return this.last - this.first;\n };\n function Companion_52() {\n }\n protoOf(Companion_52).l17 = function () {\n return $serializer_getInstance_2();\n };\n var Companion_instance_52;\n function Companion_getInstance_53() {\n return Companion_instance_52;\n }\n function $serializer_2() {\n $serializer_instance_2 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.math.Margin', this, 6);\n tmp0_serialDesc.cv('top', true);\n tmp0_serialDesc.cv('right', true);\n tmp0_serialDesc.cv('bottom', true);\n tmp0_serialDesc.cv('left', true);\n tmp0_serialDesc.cv('back', true);\n tmp0_serialDesc.cv('front', true);\n this.a2c_1 = tmp0_serialDesc;\n }\n protoOf($serializer_2).ok = function () {\n return this.a2c_1;\n };\n protoOf($serializer_2).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), DoubleSerializer_getInstance()];\n };\n protoOf($serializer_2).qk = function (decoder) {\n var tmp0_desc = this.a2c_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = 0.0;\n var tmp5_local1 = 0.0;\n var tmp6_local2 = 0.0;\n var tmp7_local3 = 0.0;\n var tmp8_local4 = 0.0;\n var tmp9_local5 = 0.0;\n var tmp10_input = decoder.nn(tmp0_desc);\n if (tmp10_input.do()) {\n tmp4_local0 = tmp10_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp10_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp10_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp10_input.vn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp10_input.vn(tmp0_desc, 4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n tmp9_local5 = tmp10_input.vn(tmp0_desc, 5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp10_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp10_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp10_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp10_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp10_input.vn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp10_input.vn(tmp0_desc, 4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n case 5:\n tmp9_local5 = tmp10_input.vn(tmp0_desc, 5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp10_input.on(tmp0_desc);\n return Margin_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);\n };\n protoOf($serializer_2).b2c = function (encoder, value) {\n var tmp0_desc = this.a2c_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !equals(value.top, 0.0)) {\n tmp1_output.ap(tmp0_desc, 0, value.top);\n }\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !equals(value.right, 0.0)) {\n tmp1_output.ap(tmp0_desc, 1, value.right);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !equals(value.bottom, 0.0)) {\n tmp1_output.ap(tmp0_desc, 2, value.bottom);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !equals(value.left, 0.0)) {\n tmp1_output.ap(tmp0_desc, 3, value.left);\n }\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !equals(value.back, 0.0)) {\n tmp1_output.ap(tmp0_desc, 4, value.back);\n }\n if (tmp1_output.kp(tmp0_desc, 5) ? true : !equals(value.front, 0.0)) {\n tmp1_output.ap(tmp0_desc, 5, value.front);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_2).pk = function (encoder, value) {\n return this.b2c(encoder, value instanceof Margin ? value : THROW_CCE());\n };\n var $serializer_instance_2;\n function $serializer_getInstance_2() {\n if ($serializer_instance_2 == null)\n new $serializer_2();\n return $serializer_instance_2;\n }\n function Margin_init_$Init$(seen1, top, right, bottom, left, back, front, serializationConstructorMarker, $this) {\n if (!(0 === (0 & seen1))) {\n throwMissingFieldException(seen1, 0, $serializer_getInstance_2().a2c_1);\n }\n if (0 === (seen1 & 1))\n $this.top = 0.0;\n else\n $this.top = top;\n if (0 === (seen1 & 2))\n $this.right = 0.0;\n else\n $this.right = right;\n if (0 === (seen1 & 4))\n $this.bottom = 0.0;\n else\n $this.bottom = bottom;\n if (0 === (seen1 & 8))\n $this.left = 0.0;\n else\n $this.left = left;\n if (0 === (seen1 & 16))\n $this.back = 0.0;\n else\n $this.back = back;\n if (0 === (seen1 & 32))\n $this.front = 0.0;\n else\n $this.front = front;\n return $this;\n }\n function Margin_init_$Create$(seen1, top, right, bottom, left, back, front, serializationConstructorMarker) {\n return Margin_init_$Init$(seen1, top, right, bottom, left, back, front, serializationConstructorMarker, objectCreate(protoOf(Margin)));\n }\n function Margin(top, right, bottom, left, back, front) {\n top = top === VOID ? 0.0 : top;\n right = right === VOID ? 0.0 : right;\n bottom = bottom === VOID ? 0.0 : bottom;\n left = left === VOID ? 0.0 : left;\n back = back === VOID ? 0.0 : back;\n front = front === VOID ? 0.0 : front;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n this.left = left;\n this.back = back;\n this.front = front;\n }\n protoOf(Margin).c2c = function () {\n return this.top;\n };\n protoOf(Margin).d2c = function () {\n return this.right;\n };\n protoOf(Margin).e2c = function () {\n return this.bottom;\n };\n protoOf(Margin).f2c = function () {\n return this.left;\n };\n protoOf(Margin).g2c = function () {\n return this.back;\n };\n protoOf(Margin).h2c = function () {\n return this.front;\n };\n protoOf(Margin).innerSize = function (size) {\n return new Vector(size.X - (this.left + this.right), size.Y - (this.top + this.bottom), size.Z - (this.front + this.back));\n };\n protoOf(Margin).innerOrigin = function () {\n return new Vector((this.left - this.right) / 2, (this.bottom - this.top) / 2, (this.back - this.front) / 2);\n };\n protoOf(Margin).outerSize = function (box) {\n return new Vector(box.X + (this.left + this.right), box.Y + (this.top + this.bottom), box.Z + (this.front + this.back));\n };\n protoOf(Margin).equal = function (value) {\n return new Margin(value, value, value, value, value, value);\n };\n protoOf(Margin).equals = function (other) {\n var tmp;\n if (other instanceof Margin) {\n tmp = ((((other.top === this.top ? other.right === this.right : false) ? other.bottom === this.bottom : false) ? other.left === this.left : false) ? other.back === this.back : false) ? other.front === this.front : false;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(Margin).hashCode = function () {\n return numberToInt(this.top * 3 + this.right * 13 + this.bottom * 23 + this.left * 37 + this.back * 61 + this.front * 97);\n };\n protoOf(Margin).backBox = function (outerSize) {\n return new Vector(outerSize.width, outerSize.height, this.back);\n };\n protoOf(Margin).frontBox = function (outerSize) {\n return new Vector(outerSize.width, outerSize.height, this.front);\n };\n protoOf(Margin).rightBox = function (outerSize) {\n return new Vector(this.right, outerSize.height, outerSize.depth);\n };\n protoOf(Margin).leftBox = function (outerSize) {\n return new Vector(this.left, outerSize.height, outerSize.depth);\n };\n protoOf(Margin).topBox = function (outerSize) {\n return new Vector(outerSize.width, this.top, outerSize.depth);\n };\n protoOf(Margin).bottomBox = function (outerSize) {\n return new Vector(outerSize.width, this.bottom, outerSize.depth);\n };\n protoOf(Margin).af = function () {\n return this.top;\n };\n protoOf(Margin).bf = function () {\n return this.right;\n };\n protoOf(Margin).g1k = function () {\n return this.bottom;\n };\n protoOf(Margin).h1k = function () {\n return this.left;\n };\n protoOf(Margin).i1k = function () {\n return this.back;\n };\n protoOf(Margin).j1k = function () {\n return this.front;\n };\n protoOf(Margin).i2c = function (top, right, bottom, left, back, front) {\n return new Margin(top, right, bottom, left, back, front);\n };\n protoOf(Margin).copy = function (top, right, bottom, left, back, front, $super) {\n top = top === VOID ? this.top : top;\n right = right === VOID ? this.right : right;\n bottom = bottom === VOID ? this.bottom : bottom;\n left = left === VOID ? this.left : left;\n back = back === VOID ? this.back : back;\n front = front === VOID ? this.front : front;\n return this.i2c(top, right, bottom, left, back, front);\n };\n protoOf(Margin).toString = function () {\n return 'Margin(top=' + this.top + ', right=' + this.right + ', bottom=' + this.bottom + ', left=' + this.left + ', back=' + this.back + ', front=' + this.front + ')';\n };\n var Axis_X_instance;\n var Axis_Y_instance;\n var Axis_Z_instance;\n function values_4() {\n return [Axis_X_getInstance(), Axis_Y_getInstance(), Axis_Z_getInstance()];\n }\n function valueOf_4(value) {\n switch (value) {\n case 'X':\n return Axis_X_getInstance();\n case 'Y':\n return Axis_Y_getInstance();\n case 'Z':\n return Axis_Z_getInstance();\n default:\n Axis_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var Axis_entriesInitialized;\n function Axis_initEntries() {\n if (Axis_entriesInitialized)\n return Unit_instance;\n Axis_entriesInitialized = true;\n Axis_X_instance = new Axis('X', 0);\n Axis_Y_instance = new Axis('Y', 1);\n Axis_Z_instance = new Axis('Z', 2);\n }\n function Axis(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function Axis_X_getInstance() {\n Axis_initEntries();\n return Axis_X_instance;\n }\n function Axis_Y_getInstance() {\n Axis_initEntries();\n return Axis_Y_instance;\n }\n function Axis_Z_getInstance() {\n Axis_initEntries();\n return Axis_Z_instance;\n }\n function MathUtils() {\n MathUtils_instance = this;\n this.transformIdentity = Companion_getInstance_60().IDENTITY;\n this.quaternionIdentity = Companion_getInstance_57().IDENTITY;\n }\n protoOf(MathUtils).l2c = function () {\n return this.transformIdentity;\n };\n protoOf(MathUtils).m2c = function () {\n return this.quaternionIdentity;\n };\n protoOf(MathUtils).quaternionFromAxisAngle = function (axis, angleDegrees) {\n return Companion_getInstance_57().fromAxisAngle(axis, (new Degrees(angleDegrees)).toRadian());\n };\n protoOf(MathUtils).quaternionFromLookDirection = function (forward, up) {\n return Companion_getInstance_57().fromLookDirection(forward, up);\n };\n protoOf(MathUtils).quaternionFromLookDirectionUnsafe = function (forward, up) {\n return Companion_getInstance_57().fromLookDirectionUnsafe(forward, up);\n };\n protoOf(MathUtils).quaternionFromBaseVectors = function (right, up, forward) {\n return Companion_getInstance_57().quaternionFromBaseVectors(right, up, forward);\n };\n protoOf(MathUtils).quaternionFromEulerDegrees = function (angles) {\n return Companion_getInstance_57().fromEulerDegreesVector(angles);\n };\n protoOf(MathUtils).quaternionFromEulerRadians = function (x, y, z) {\n return Companion_getInstance_57().fromEuler(new Radians(x), new Radians(y), new Radians(z));\n };\n protoOf(MathUtils).axisAlignedBoxFromVertices = function (vertices) {\n return Companion_getInstance_93().fromVertices(vertices);\n };\n protoOf(MathUtils).geometricMeanFromPoints = function (points) {\n return get_geometricMean(points);\n };\n protoOf(MathUtils).circularIndex = function (index, length) {\n var tmp;\n if (index >= length) {\n tmp = index % length | 0;\n } else if (index < 0) {\n tmp = (index % length | 0) + length | 0;\n } else {\n tmp = index;\n }\n return tmp;\n };\n var MathUtils_instance;\n function MathUtils_getInstance() {\n if (MathUtils_instance == null)\n new MathUtils();\n return MathUtils_instance;\n }\n function Companion_53() {\n }\n protoOf(Companion_53).l17 = function () {\n return $serializer_getInstance_3();\n };\n var Companion_instance_53;\n function Companion_getInstance_54() {\n return Companion_instance_53;\n }\n function $serializer_3() {\n $serializer_instance_3 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.math.ModelTransform', this, 3);\n tmp0_serialDesc.cv('p', true);\n tmp0_serialDesc.cv('r', true);\n tmp0_serialDesc.cv('s', true);\n this.n2c_1 = tmp0_serialDesc;\n }\n protoOf($serializer_3).ok = function () {\n return this.n2c_1;\n };\n protoOf($serializer_3).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [get_nullable($serializer_getInstance_8()), get_nullable($serializer_getInstance_8()), get_nullable($serializer_getInstance_8())];\n };\n protoOf($serializer_3).qk = function (decoder) {\n var tmp0_desc = this.n2c_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.bo(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, $serializer_getInstance_8(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.bo(tmp0_desc, 2, $serializer_getInstance_8(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.bo(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, $serializer_getInstance_8(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.bo(tmp0_desc, 2, $serializer_getInstance_8(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return ModelTransform_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_3).o2c = function (encoder, value) {\n var tmp0_desc = this.n2c_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !(value.position == null)) {\n tmp1_output.gp(tmp0_desc, 0, $serializer_getInstance_8(), value.position);\n }\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.rotation == null)) {\n tmp1_output.gp(tmp0_desc, 1, $serializer_getInstance_8(), value.rotation);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.scale == null)) {\n tmp1_output.gp(tmp0_desc, 2, $serializer_getInstance_8(), value.scale);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_3).pk = function (encoder, value) {\n return this.o2c(encoder, value instanceof ModelTransform ? value : THROW_CCE());\n };\n var $serializer_instance_3;\n function $serializer_getInstance_3() {\n if ($serializer_instance_3 == null)\n new $serializer_3();\n return $serializer_instance_3;\n }\n function ModelTransform_init_$Init$(seen1, position, rotation, scale, serializationConstructorMarker, $this) {\n if (!(0 === (0 & seen1))) {\n throwMissingFieldException(seen1, 0, $serializer_getInstance_3().n2c_1);\n }\n if (0 === (seen1 & 1))\n $this.position = null;\n else\n $this.position = position;\n if (0 === (seen1 & 2))\n $this.rotation = null;\n else\n $this.rotation = rotation;\n if (0 === (seen1 & 4))\n $this.scale = null;\n else\n $this.scale = scale;\n return $this;\n }\n function ModelTransform_init_$Create$(seen1, position, rotation, scale, serializationConstructorMarker) {\n return ModelTransform_init_$Init$(seen1, position, rotation, scale, serializationConstructorMarker, objectCreate(protoOf(ModelTransform)));\n }\n function ModelTransform(position, rotation, scale) {\n position = position === VOID ? null : position;\n rotation = rotation === VOID ? null : rotation;\n scale = scale === VOID ? null : scale;\n this.position = position;\n this.rotation = rotation;\n this.scale = scale;\n }\n protoOf(ModelTransform).ct = function () {\n return this.position;\n };\n protoOf(ModelTransform).v1k = function () {\n return this.rotation;\n };\n protoOf(ModelTransform).p2c = function () {\n return this.scale;\n };\n protoOf(ModelTransform).d1x = function () {\n var tmp0_elvis_lhs = this.position;\n var tmp = tmp0_elvis_lhs == null ? Companion_getInstance_61().ZERO : tmp0_elvis_lhs;\n var tmp_0 = Companion_getInstance_57();\n var tmp1_elvis_lhs = this.rotation;\n return new Transform(tmp, tmp_0.fromEulerDegreesVector(tmp1_elvis_lhs == null ? Companion_getInstance_61().ZERO : tmp1_elvis_lhs));\n };\n protoOf(ModelTransform).applyInverse = function (aab) {\n var tmp0_elvis_lhs = this.scale;\n var scale = tmp0_elvis_lhs == null ? Companion_getInstance_61().ONE : tmp0_elvis_lhs;\n var tmp1_elvis_lhs = this.position;\n var position = tmp1_elvis_lhs == null ? Companion_getInstance_61().ZERO : tmp1_elvis_lhs;\n var rotation = this.rotation;\n var cuboid = Companion_getInstance_95().fromAABB(aab);\n cuboid = cuboid.scale(new Vector(1 / scale.X, 1 / scale.Y, 1 / scale.Z));\n cuboid = cuboid.move(position.unaryMinus());\n if (!(rotation == null)) {\n cuboid = cuboid.rotate(Companion_getInstance_57().fromEulerDegreesVector(rotation).inverse());\n }\n return cuboid.axisAlignedBoundingBox;\n };\n protoOf(ModelTransform).applyTo = function (vo) {\n vo.setPosition(Companion_getInstance_61().ZERO);\n vo.setRotation(Companion_getInstance_57().IDENTITY);\n var tmp0_safe_receiver = this.rotation;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.math.ModelTransform.applyTo.' call\n vo.setRotationEulerAngleDegrees(tmp0_safe_receiver);\n }\n var tmp1_safe_receiver = this.position;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.math.ModelTransform.applyTo.' call\n vo.setPosition(tmp1_safe_receiver);\n }\n var tmp2_safe_receiver = this.scale;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.math.ModelTransform.applyTo.' call\n vo.setScaleV(tmp2_safe_receiver);\n }\n };\n protoOf(ModelTransform).af = function () {\n return this.position;\n };\n protoOf(ModelTransform).bf = function () {\n return this.rotation;\n };\n protoOf(ModelTransform).g1k = function () {\n return this.scale;\n };\n protoOf(ModelTransform).q2c = function (position, rotation, scale) {\n return new ModelTransform(position, rotation, scale);\n };\n protoOf(ModelTransform).copy = function (position, rotation, scale, $super) {\n position = position === VOID ? this.position : position;\n rotation = rotation === VOID ? this.rotation : rotation;\n scale = scale === VOID ? this.scale : scale;\n return this.q2c(position, rotation, scale);\n };\n protoOf(ModelTransform).toString = function () {\n return 'ModelTransform(position=' + this.position + ', rotation=' + this.rotation + ', scale=' + this.scale + ')';\n };\n protoOf(ModelTransform).hashCode = function () {\n var result = this.position == null ? 0 : this.position.hashCode();\n result = imul(result, 31) + (this.rotation == null ? 0 : this.rotation.hashCode()) | 0;\n result = imul(result, 31) + (this.scale == null ? 0 : this.scale.hashCode()) | 0;\n return result;\n };\n protoOf(ModelTransform).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ModelTransform))\n return false;\n var tmp0_other_with_cast = other instanceof ModelTransform ? other : THROW_CCE();\n if (!equals(this.position, tmp0_other_with_cast.position))\n return false;\n if (!equals(this.rotation, tmp0_other_with_cast.rotation))\n return false;\n if (!equals(this.scale, tmp0_other_with_cast.scale))\n return false;\n return true;\n };\n function Companion_54() {\n this.r2c_1 = 1.0E-4;\n }\n protoOf(Companion_54).createFromPoints = function (p1, p2, p3) {\n var point = p1.plus(p2).plus(p3).times(0.3333333333333333);\n var a1 = p2.minus(p1);\n var a2 = p3.minus(p1);\n var normal = a1.cross(a2).normalize();\n return new Plane(point, normal);\n };\n var Companion_instance_54;\n function Companion_getInstance_55() {\n return Companion_instance_54;\n }\n function Plane(pointInPlane, normal) {\n this.pointInPlane = pointInPlane;\n this.normal = normal;\n }\n protoOf(Plane).s2c = function () {\n return this.pointInPlane;\n };\n protoOf(Plane).d23 = function () {\n return this.normal;\n };\n protoOf(Plane).raycast = function (ray) {\n var tmp0_elvis_lhs = this.raycastDistance(ray);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var s = tmp;\n return new RaycastResult(ray.getPointAlongRay(s), this.normal);\n };\n protoOf(Plane).raycastDistance = function (ray) {\n var denominator = ray.direction.__timesOperatorKotlin(this.normal);\n if (denominator > 0.0)\n return null;\n // Inline function 'kotlin.math.absoluteValue' call\n if (Math.abs(denominator) < 1.0E-4)\n return null;\n var s = this.pointInPlane.minus(ray.origin).__timesOperatorKotlin(this.normal) * (1.0 / denominator);\n if (s < 0.0)\n return null;\n return s;\n };\n protoOf(Plane).t2c = function (point, epsilon) {\n var diff = point.minus(this.pointInPlane);\n // Inline function 'kotlin.math.abs' call\n var x = diff.dot(this.normal);\n return Math.abs(x) <= epsilon;\n };\n protoOf(Plane).contains = function (point, epsilon, $super) {\n epsilon = epsilon === VOID ? 1.0 : epsilon;\n return this.t2c(point, epsilon);\n };\n protoOf(Plane).projectOnPlane = function (vectorToProject) {\n return vectorToProject.minus(times(vectorToProject.dot(this.normal), this.normal));\n };\n protoOf(Plane).af = function () {\n return this.pointInPlane;\n };\n protoOf(Plane).bf = function () {\n return this.normal;\n };\n protoOf(Plane).u2c = function (pointInPlane, normal) {\n return new Plane(pointInPlane, normal);\n };\n protoOf(Plane).copy = function (pointInPlane, normal, $super) {\n pointInPlane = pointInPlane === VOID ? this.pointInPlane : pointInPlane;\n normal = normal === VOID ? this.normal : normal;\n return this.u2c(pointInPlane, normal);\n };\n protoOf(Plane).toString = function () {\n return 'Plane(pointInPlane=' + this.pointInPlane + ', normal=' + this.normal + ')';\n };\n protoOf(Plane).hashCode = function () {\n var result = this.pointInPlane.hashCode();\n result = imul(result, 31) + this.normal.hashCode() | 0;\n return result;\n };\n protoOf(Plane).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Plane))\n return false;\n var tmp0_other_with_cast = other instanceof Plane ? other : THROW_CCE();\n if (!this.pointInPlane.equals(tmp0_other_with_cast.pointInPlane))\n return false;\n if (!this.normal.equals(tmp0_other_with_cast.normal))\n return false;\n return true;\n };\n function Companion_55() {\n }\n protoOf(Companion_55).createPolygonAndCalculateNormal = function (vertices) {\n // Inline function 'kotlin.collections.count' call\n if (vertices.length < 3) {\n return null;\n }\n var normal = PolyhedronUtils_getInstance().surfaceNormal(vertices);\n return new Polygon(vertices, normal);\n };\n var Companion_instance_55;\n function Companion_getInstance_56() {\n return Companion_instance_55;\n }\n function Polygon(vertices, normal) {\n this.vertices = vertices;\n this.normal = normal;\n }\n protoOf(Polygon).b23 = function () {\n return this.vertices;\n };\n protoOf(Polygon).d23 = function () {\n return this.normal;\n };\n protoOf(Polygon).validateCoplanarPoints = function () {\n var firstDirection = this.vertices[1].minus(this.vertices[0]);\n var inductionVariable = 2;\n // Inline function 'kotlin.collections.count' call\n var last = this.vertices.length;\n if (inductionVariable < last)\n do {\n var vertexIndex = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var currentDirection = this.vertices[vertexIndex].minus(this.vertices[0]);\n var currentNormal = firstDirection.cross(currentDirection).normalize();\n // Inline function 'kotlin.math.abs' call\n var x = currentNormal.__timesOperatorKotlin(this.normal);\n var tmp$ret$1 = Math.abs(x);\n if (!almostEquals(tmp$ret$1, 1.0)) {\n return false;\n }\n }\n while (inductionVariable < last);\n return true;\n };\n protoOf(Polygon).raycast = function (ray) {\n var polygonPlane = new Plane(this.vertices[0], this.normal);\n var hit = polygonPlane.raycast(ray);\n var hitPoint = hit == null ? null : hit.point;\n var tmp;\n if (hitPoint == null) {\n tmp = hit;\n } else if (almostEquals(closestOnEdge(hitPoint, this.vertices).distanceTo(hitPoint), 0.0, 1.0E-4) ? true : PolyhedronUtils_getInstance().pointInPolygon(hitPoint, this.vertices, this.normal)) {\n tmp = hit;\n } else {\n tmp = null;\n }\n return tmp;\n };\n protoOf(Polygon).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof Polygon))\n THROW_CCE();\n if (!contentEquals(this.vertices, other.vertices))\n return false;\n if (!this.normal.equals(other.normal))\n return false;\n return true;\n };\n protoOf(Polygon).hashCode = function () {\n var result = contentHashCode(this.vertices);\n result = imul(31, result) + this.normal.hashCode() | 0;\n return result;\n };\n protoOf(Polygon).af = function () {\n return this.vertices;\n };\n protoOf(Polygon).bf = function () {\n return this.normal;\n };\n protoOf(Polygon).v2c = function (vertices, normal) {\n return new Polygon(vertices, normal);\n };\n protoOf(Polygon).copy = function (vertices, normal, $super) {\n vertices = vertices === VOID ? this.vertices : vertices;\n normal = normal === VOID ? this.normal : normal;\n return this.v2c(vertices, normal);\n };\n protoOf(Polygon).toString = function () {\n return 'Polygon(vertices=' + toString(this.vertices) + ', normal=' + this.normal + ')';\n };\n function Quaternion_init_$Init$(iw, ix, iy, iz, $this) {\n Quaternion_init_$Init$_0(iw, ix, iy, iz, $this);\n return $this;\n }\n function QuaternionFromInts(iw, ix, iy, iz) {\n return Quaternion_init_$Init$(iw, ix, iy, iz, objectCreate(protoOf(Quaternion)));\n }\n function Quaternion_init_$Init$_0(w, x, y, z, $this) {\n Quaternion.call($this, w, x, y, z, false);\n return $this;\n }\n function QuaternionFromDouble(w, x, y, z) {\n return Quaternion_init_$Init$_0(w, x, y, z, objectCreate(protoOf(Quaternion)));\n }\n function toRotationMatrix($this) {\n var te = new Float64Array(16);\n var x2 = $this.x + $this.x;\n var y2 = $this.y + $this.y;\n var z2 = $this.z + $this.z;\n var xx = $this.x * x2;\n var xy = $this.x * y2;\n var xz = $this.x * z2;\n var yy = $this.y * y2;\n var yz = $this.y * z2;\n var zz = $this.z * z2;\n var wx = $this.w * x2;\n var wy = $this.w * y2;\n var wz = $this.w * z2;\n te[0] = 1 - (yy + zz);\n te[1] = xy + wz;\n te[2] = xz - wy;\n te[5] = 1 - (xx + zz);\n te[8] = xz + wy;\n te[9] = yz - wx;\n te[10] = 1 - (xx + yy);\n return te;\n }\n function Companion_56() {\n Companion_instance_56 = this;\n this.IDENTITY = new Quaternion(1.0, 0.0, 0.0, 0.0, true);\n this.PI2 = 6.283185307179586;\n this.RADIANS_TO_DEGREES = 57.29577951308232;\n this.PI2_DIV_360 = 0.017453292519943295;\n }\n protoOf(Companion_56).x2c = function () {\n return this.IDENTITY;\n };\n protoOf(Companion_56).y2c = function () {\n return this.PI2;\n };\n protoOf(Companion_56).z2c = function () {\n return this.RADIANS_TO_DEGREES;\n };\n protoOf(Companion_56).a2d = function () {\n return this.PI2_DIV_360;\n };\n protoOf(Companion_56).toAxisAngle = function (q1) {\n var q = q1;\n if (q.w > 1.0)\n q = q.normalize();\n // Inline function 'kotlin.math.acos' call\n var x = q.w;\n var tmp$ret$0 = Math.acos(x);\n var angle = new Radians(2 * tmp$ret$0);\n // Inline function 'kotlin.math.sqrt' call\n var x_0 = 1 - q.w * q.w;\n var s = Math.sqrt(x_0);\n var tmp;\n if (s < 0.001) {\n var x_1 = q.x;\n var y = q.y;\n var z = q.z;\n tmp = new AxisAngle(new Vector(x_1, y, z), angle);\n } else {\n var x_2 = q.x / s;\n var y_0 = q.y / s;\n var z_0 = q.z / s;\n tmp = new AxisAngle(new Vector(x_2, y_0, z_0), angle);\n }\n return tmp;\n };\n protoOf(Companion_56).b2d = function (lookDirection, up) {\n var backward = lookDirection.__timesIntForKotlin(-1);\n var backwardLengthSq = backward.dot(backward);\n var upLengthSq = up.dot(up);\n // Inline function 'kotlin.math.sqrt' call\n var tmp$ret$0 = Math.sqrt(backwardLengthSq);\n var backwardRsqrt = backward.times(1.0 / tmp$ret$0);\n // Inline function 'kotlin.math.sqrt' call\n var tmp$ret$1 = Math.sqrt(upLengthSq);\n var upRsqrt = up.times(1.0 / tmp$ret$1);\n var t = upRsqrt.cross(backward).normalize();\n var tLengthSq = t.dot(t);\n // Inline function 'kotlin.math.sqrt' call\n var tmp$ret$2 = Math.sqrt(tLengthSq);\n var tRsqrt = t.times(1.0 / tmp$ret$2);\n // Inline function 'kotlin.math.min' call\n // Inline function 'kotlin.math.min' call\n var a = Math.min(backwardLengthSq, upLengthSq);\n var mn = Math.min(a, tLengthSq);\n // Inline function 'kotlin.math.max' call\n // Inline function 'kotlin.math.max' call\n var a_0 = Math.max(backwardLengthSq, upLengthSq);\n var mx = Math.max(a_0, tLengthSq);\n var accept = (((mn > 1.0E-35 ? mx < 1.0E35 : false) ? isFinite(backwardLengthSq) : false) ? isFinite(upLengthSq) : false) ? isFinite(tLengthSq) : false;\n if (accept) {\n var crossT = backwardRsqrt.cross(t);\n return this.quaternionFromBaseVectors(tRsqrt, crossT, backwardRsqrt.unaryMinus());\n } else {\n return this.IDENTITY;\n }\n };\n protoOf(Companion_56).fromLookDirection = function (lookDirection, up, $super) {\n up = up === VOID ? Companion_getInstance_61().UP : up;\n return this.b2d(lookDirection, up);\n };\n protoOf(Companion_56).c2d = function (lookDirection, up) {\n var t = lookDirection.cross(up).normalize();\n var crossT = t.cross(lookDirection);\n return this.quaternionFromBaseVectors(t, crossT, lookDirection);\n };\n protoOf(Companion_56).fromLookDirectionUnsafe = function (lookDirection, up, $super) {\n up = up === VOID ? Companion_getInstance_61().UP : up;\n return this.c2d(lookDirection, up);\n };\n protoOf(Companion_56).quaternionFromBaseVectors = function (right, up, forward) {\n var m00 = right.X;\n var m10 = right.Y;\n var m20 = right.Z;\n var m01 = up.X;\n var m11 = up.Y;\n var m21 = up.Z;\n var m02 = -forward.X;\n var m12 = -forward.Y;\n var m22 = -forward.Z;\n var trace = m00 + m11 + m22;\n if (trace > 0.0) {\n // Inline function 'kotlin.math.sqrt' call\n var x = trace + 1.0;\n var S = Math.sqrt(x) * 2;\n var qw = 0.25 * S;\n var qx = (m21 - m12) / S;\n var qy = (m02 - m20) / S;\n var qz = (m10 - m01) / S;\n return QuaternionFromDouble(qw, qx, qy, qz).normalize();\n } else if (!!(m00 > m11 & m00 > m22)) {\n // Inline function 'kotlin.math.sqrt' call\n var x_0 = 1.0 + m00 - m11 - m22;\n var S_0 = Math.sqrt(x_0) * 2;\n var qw_0 = (m21 - m12) / S_0;\n var qx_0 = 0.25 * S_0;\n var qy_0 = (m01 + m10) / S_0;\n var qz_0 = (m02 + m20) / S_0;\n return QuaternionFromDouble(qw_0, qx_0, qy_0, qz_0).normalize();\n } else if (m11 > m22) {\n // Inline function 'kotlin.math.sqrt' call\n var x_1 = 1.0 + m11 - m00 - m22;\n var S_1 = Math.sqrt(x_1) * 2;\n var qw_1 = (m02 - m20) / S_1;\n var qx_1 = (m01 + m10) / S_1;\n var qy_1 = 0.25 * S_1;\n var qz_1 = (m12 + m21) / S_1;\n return QuaternionFromDouble(qw_1, qx_1, qy_1, qz_1).normalize();\n } else {\n // Inline function 'kotlin.math.sqrt' call\n var x_2 = 1.0 + m22 - m00 - m11;\n var S_2 = Math.sqrt(x_2) * 2;\n var qw_2 = (m10 - m01) / S_2;\n var qx_2 = (m02 + m20) / S_2;\n var qy_2 = (m12 + m21) / S_2;\n var qz_2 = 0.25 * S_2;\n return QuaternionFromDouble(qw_2, qx_2, qy_2, qz_2).normalize();\n }\n };\n protoOf(Companion_56).fromAxisAngle = function (axis, angle) {\n if (axis.equals(Companion_getInstance_61().ZERO) ? true : angle.value === 0.0)\n return this.IDENTITY;\n var normalizedAxis = axis.normalize();\n // Inline function 'kotlin.math.sin' call\n var x = angle.value / 2;\n var s = Math.sin(x);\n var x_0 = normalizedAxis.X * s;\n var y = normalizedAxis.Y * s;\n var z = normalizedAxis.Z * s;\n // Inline function 'kotlin.math.cos' call\n var x_1 = angle.value / 2;\n var w = Math.cos(x_1);\n return QuaternionFromDouble(w, x_0, y, z).normalize();\n };\n protoOf(Companion_56).fromEulerDegreesVector = function (angles) {\n return this.fromEuler(new Radians(angles.X * 0.017453292519943295), new Radians(angles.Y * 0.017453292519943295), new Radians(angles.Z * 0.017453292519943295));\n };\n protoOf(Companion_56).d2d = function (xAngle, yAngle, zAngle) {\n return this.fromEuler(xAngle.toRadian(), yAngle.toRadian(), zAngle.toRadian());\n };\n protoOf(Companion_56).fromEulerDegrees = function (xAngle, yAngle, zAngle, $super) {\n xAngle = xAngle === VOID ? new Degrees(0.0) : xAngle;\n yAngle = yAngle === VOID ? new Degrees(0.0) : yAngle;\n zAngle = zAngle === VOID ? new Degrees(0.0) : zAngle;\n return this.d2d(xAngle, yAngle, zAngle);\n };\n protoOf(Companion_56).fromEulerDegreesRadians = function (radians) {\n return this.fromEuler(new Radians(radians.X), new Radians(radians.Y), new Radians(radians.Z));\n };\n protoOf(Companion_56).e2d = function (xAngle, yAngle, zAngle) {\n // Inline function 'kotlin.math.cos' call\n var x = xAngle.value / 2;\n var c1 = Math.cos(x);\n // Inline function 'kotlin.math.cos' call\n var x_0 = yAngle.value / 2;\n var c2 = Math.cos(x_0);\n // Inline function 'kotlin.math.cos' call\n var x_1 = zAngle.value / 2;\n var c3 = Math.cos(x_1);\n // Inline function 'kotlin.math.sin' call\n var x_2 = xAngle.value / 2;\n var s1 = Math.sin(x_2);\n // Inline function 'kotlin.math.sin' call\n var x_3 = yAngle.value / 2;\n var s2 = Math.sin(x_3);\n // Inline function 'kotlin.math.sin' call\n var x_4 = zAngle.value / 2;\n var s3 = Math.sin(x_4);\n var x_5 = s1 * c2 * c3 + c1 * s2 * s3;\n var y = c1 * s2 * c3 - s1 * c2 * s3;\n var z = c1 * c2 * s3 - s1 * s2 * c3;\n var w = c1 * c2 * c3 + s1 * s2 * s3;\n return QuaternionFromDouble(w, x_5, y, z).normalize();\n };\n protoOf(Companion_56).fromEuler = function (xAngle, yAngle, zAngle, $super) {\n xAngle = xAngle === VOID ? new Radians(0.0) : xAngle;\n yAngle = yAngle === VOID ? new Radians(0.0) : yAngle;\n zAngle = zAngle === VOID ? new Radians(0.0) : zAngle;\n return this.e2d(xAngle, yAngle, zAngle);\n };\n protoOf(Companion_56).l17 = function () {\n return $serializer_getInstance_4();\n };\n var Companion_instance_56;\n function Companion_getInstance_57() {\n if (Companion_instance_56 == null)\n new Companion_56();\n return Companion_instance_56;\n }\n function $serializer_4() {\n $serializer_instance_4 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.math.Quaternion', this, 5);\n tmp0_serialDesc.cv('w', false);\n tmp0_serialDesc.cv('x', false);\n tmp0_serialDesc.cv('y', false);\n tmp0_serialDesc.cv('z', false);\n tmp0_serialDesc.cv('isIdentity', true);\n this.f2d_1 = tmp0_serialDesc;\n }\n protoOf($serializer_4).ok = function () {\n return this.f2d_1;\n };\n protoOf($serializer_4).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), BooleanSerializer_getInstance()];\n };\n protoOf($serializer_4).qk = function (decoder) {\n var tmp0_desc = this.f2d_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = 0.0;\n var tmp5_local1 = 0.0;\n var tmp6_local2 = 0.0;\n var tmp7_local3 = 0.0;\n var tmp8_local4 = false;\n var tmp10_input = decoder.nn(tmp0_desc);\n if (tmp10_input.do()) {\n tmp4_local0 = tmp10_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp10_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp10_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp10_input.vn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp10_input.pn(tmp0_desc, 4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp10_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp10_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp10_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp10_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp10_input.vn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp10_input.pn(tmp0_desc, 4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp10_input.on(tmp0_desc);\n return Quaternion_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);\n };\n protoOf($serializer_4).g2d = function (encoder, value) {\n var tmp0_desc = this.f2d_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.ap(tmp0_desc, 0, value.w);\n tmp1_output.ap(tmp0_desc, 1, value.x);\n tmp1_output.ap(tmp0_desc, 2, value.y);\n tmp1_output.ap(tmp0_desc, 3, value.z);\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.isIdentity === (((value.w === 1.0 ? value.x === 0.0 : false) ? value.y === 0.0 : false) ? value.z === 0.0 : false))) {\n tmp1_output.uo(tmp0_desc, 4, value.isIdentity);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_4).pk = function (encoder, value) {\n return this.g2d(encoder, value instanceof Quaternion ? value : THROW_CCE());\n };\n var $serializer_instance_4;\n function $serializer_getInstance_4() {\n if ($serializer_instance_4 == null)\n new $serializer_4();\n return $serializer_instance_4;\n }\n function Quaternion_init_$Init$_1(seen1, w, x, y, z, isIdentity, serializationConstructorMarker, $this) {\n if (!(15 === (15 & seen1))) {\n throwMissingFieldException(seen1, 15, $serializer_getInstance_4().f2d_1);\n }\n $this.w = w;\n $this.x = x;\n $this.y = y;\n $this.z = z;\n $this.w2c_1 = false;\n if (0 === (seen1 & 16))\n $this.isIdentity = (($this.w === 1.0 ? $this.x === 0.0 : false) ? $this.y === 0.0 : false) ? $this.z === 0.0 : false;\n else\n $this.isIdentity = isIdentity;\n return $this;\n }\n function Quaternion_init_$Create$(seen1, w, x, y, z, isIdentity, serializationConstructorMarker) {\n return Quaternion_init_$Init$_1(seen1, w, x, y, z, isIdentity, serializationConstructorMarker, objectCreate(protoOf(Quaternion)));\n }\n function Quaternion$toEuler$lambda(value, min, max) {\n // Inline function 'kotlin.math.max' call\n // Inline function 'kotlin.math.min' call\n var b = Math.min(max, value);\n return Math.max(min, b);\n }\n function Quaternion(w, x, y, z, normalized) {\n Companion_getInstance_57();\n normalized = normalized === VOID ? false : normalized;\n this.w = w;\n this.x = x;\n this.y = y;\n this.z = z;\n this.w2c_1 = normalized;\n this.isIdentity = ((this.w === 1.0 ? this.x === 0.0 : false) ? this.y === 0.0 : false) ? this.z === 0.0 : false;\n }\n protoOf(Quaternion).h2d = function () {\n return this.w;\n };\n protoOf(Quaternion).i2d = function () {\n return this.x;\n };\n protoOf(Quaternion).j2d = function () {\n return this.y;\n };\n protoOf(Quaternion).k2d = function () {\n return this.z;\n };\n protoOf(Quaternion).times = function (q) {\n var tmp;\n if (this.isIdentity) {\n tmp = q;\n } else if (q.isIdentity) {\n tmp = this;\n } else {\n var q1 = q;\n var q2 = this;\n var x = q1.x * q2.w + q1.y * q2.z - q1.z * q2.y + q1.w * q2.x;\n var y = -q1.x * q2.z + q1.y * q2.w + q1.z * q2.x + q1.w * q2.y;\n var z = q1.x * q2.y - q1.y * q2.x + q1.z * q2.w + q1.w * q2.z;\n var w = -q1.x * q2.x - q1.y * q2.y - q1.z * q2.z + q1.w * q2.w;\n tmp = QuaternionFromDouble(w, x, y, z).normalize();\n }\n return tmp;\n };\n protoOf(Quaternion).conjugate = function () {\n return QuaternionFromDouble(this.w, -this.x, -this.y, -this.z);\n };\n protoOf(Quaternion).magnitude = function () {\n // Inline function 'kotlin.math.sqrt' call\n var x = this.w * this.w + this.x * this.x + this.y * this.y + this.z * this.z;\n return Math.sqrt(x);\n };\n protoOf(Quaternion).normalize = function () {\n var tmp;\n if (this.w2c_1) {\n tmp = this;\n } else {\n var magnitude = this.magnitude();\n tmp = new Quaternion(this.w / magnitude, this.x / magnitude, this.y / magnitude, this.z / magnitude, true);\n }\n return tmp;\n };\n protoOf(Quaternion).div = function (scalar) {\n return QuaternionFromDouble(this.w / scalar, this.x / scalar, this.y / scalar, this.z / scalar);\n };\n protoOf(Quaternion).inverse = function () {\n var tmp;\n if (this.isIdentity) {\n tmp = this;\n } else {\n tmp = this.conjugate().div(this.magnitude());\n }\n return tmp;\n };\n protoOf(Quaternion).unaryMinus = function () {\n return this.inverse();\n };\n protoOf(Quaternion).l2d = function (floatingPoints) {\n var w2 = round(floatingPoints * this.w) / floatingPoints;\n var x2 = round(floatingPoints * this.x) / floatingPoints;\n var y2 = round(floatingPoints * this.y) / floatingPoints;\n var z2 = round(floatingPoints * this.z) / floatingPoints;\n return QuaternionFromDouble(w2 === -0.0 ? 0.0 : w2, x2 === -0.0 ? 0.0 : x2, y2 === -0.0 ? 0.0 : y2, z2 === -0.0 ? 0.0 : z2);\n };\n protoOf(Quaternion).round = function (floatingPoints, $super) {\n floatingPoints = floatingPoints === VOID ? 1000.0 : floatingPoints;\n return this.l2d(floatingPoints);\n };\n protoOf(Quaternion).toEulerDegrees = function () {\n var euler = this.toEuler();\n return new Vector(euler.X * 57.29577951308232, euler.Y * 57.29577951308232, euler.Z * 57.29577951308232);\n };\n protoOf(Quaternion).m2d = function () {\n return this.toEulerDegrees();\n };\n protoOf(Quaternion).toEuler = function () {\n var clamp = Quaternion$toEuler$lambda;\n var te = toRotationMatrix(this);\n var m11 = te[0];\n var m13 = te[8];\n var m21 = te[1];\n var m22 = te[5];\n var m23 = te[9];\n var m31 = te[2];\n var m33 = te[10];\n // Inline function 'kotlin.math.asin' call\n var x = -clamp(m23, -1.0, 1.0);\n var eulerX = Math.asin(x);\n var eulerZ;\n var eulerY;\n // Inline function 'kotlin.math.abs' call\n if (Math.abs(m23) < 0.9999999) {\n // Inline function 'kotlin.math.atan2' call\n eulerY = Math.atan2(m13, m33);\n // Inline function 'kotlin.math.atan2' call\n eulerZ = Math.atan2(m21, m22);\n } else {\n // Inline function 'kotlin.math.atan2' call\n var y = -m31;\n eulerY = Math.atan2(y, m11);\n eulerZ = 0.0;\n }\n return new Vector(eulerX, eulerY, eulerZ);\n };\n protoOf(Quaternion).toString = function () {\n var euler = this.toEulerDegrees();\n return 'Euler(' + euler.X + '\\xB0, ' + euler.Y + '\\xB0, ' + euler.Z + '\\xB0) Q:(' + this.w + ',' + this.x + ',' + this.y + ',' + this.z + ')';\n };\n protoOf(Quaternion).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof Quaternion))\n THROW_CCE();\n return this.almostEquals(other);\n };\n protoOf(Quaternion).n2d = function (other, epsilon) {\n var w0 = this.af();\n var x0 = this.bf();\n var y0 = this.g1k();\n var z0 = this.h1k();\n var w1 = other.af();\n var x1 = other.bf();\n var y1 = other.g1k();\n var z1 = other.h1k();\n var diff = (w0 < w1 ? w1 - w0 : w0 - w1) + (x0 < x1 ? x1 - x0 : x0 - x1) + (y0 < y1 ? y1 - y0 : y0 - y1) + (z0 < z1 ? z1 - z0 : z0 - z1);\n if (diff < epsilon)\n return true;\n w1 = -w1;\n x1 = -x1;\n y1 = -y1;\n z1 = -z1;\n diff = (w0 < w1 ? w1 - w0 : w0 - w1) + (x0 < x1 ? x1 - x0 : x0 - x1) + (y0 < y1 ? y1 - y0 : y0 - y1) + (z0 < z1 ? z1 - z0 : z0 - z1);\n if (diff < epsilon)\n return true;\n return false;\n };\n protoOf(Quaternion).almostEquals = function (other, epsilon, $super) {\n epsilon = epsilon === VOID ? 0.01 : epsilon;\n return this.n2d(other, epsilon);\n };\n protoOf(Quaternion).hashCode = function () {\n return 0;\n };\n protoOf(Quaternion).o2d = function () {\n return this.isIdentity;\n };\n protoOf(Quaternion).af = function () {\n return this.w;\n };\n protoOf(Quaternion).bf = function () {\n return this.x;\n };\n protoOf(Quaternion).g1k = function () {\n return this.y;\n };\n protoOf(Quaternion).h1k = function () {\n return this.z;\n };\n protoOf(Quaternion).p2d = function (w, x, y, z, normalized) {\n return new Quaternion(w, x, y, z, normalized);\n };\n protoOf(Quaternion).copy = function (w, x, y, z, normalized, $super) {\n w = w === VOID ? this.w : w;\n x = x === VOID ? this.x : x;\n y = y === VOID ? this.y : y;\n z = z === VOID ? this.z : z;\n normalized = normalized === VOID ? this.w2c_1 : normalized;\n return this.p2d(w, x, y, z, normalized);\n };\n function Radians(value) {\n this.value = value;\n }\n protoOf(Radians).u2 = function () {\n return this.value;\n };\n protoOf(Radians).toDegree = function () {\n return new Degrees(this.value / get_PI() * 180);\n };\n protoOf(Radians).af = function () {\n return this.value;\n };\n protoOf(Radians).t2b = function (value) {\n return new Radians(value);\n };\n protoOf(Radians).copy = function (value, $super) {\n value = value === VOID ? this.value : value;\n return this.t2b(value);\n };\n protoOf(Radians).toString = function () {\n return 'Radians(value=' + this.value + ')';\n };\n protoOf(Radians).hashCode = function () {\n return getNumberHashCode(this.value);\n };\n protoOf(Radians).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Radians))\n return false;\n var tmp0_other_with_cast = other instanceof Radians ? other : THROW_CCE();\n if (!equals(this.value, tmp0_other_with_cast.value))\n return false;\n return true;\n };\n function RelativeBoxOffset(relativeTo, offsetVector) {\n offsetVector = offsetVector === VOID ? Companion_getInstance_61().ZERO : offsetVector;\n this.relativeTo = relativeTo;\n this.offsetVector = offsetVector;\n }\n protoOf(RelativeBoxOffset).q2d = function () {\n return this.relativeTo;\n };\n protoOf(RelativeBoxOffset).r2d = function () {\n return this.offsetVector;\n };\n protoOf(RelativeBoxOffset).applyToBox = function (aabb) {\n var tmp;\n switch (this.relativeTo.xKotlinEnum.x9_1) {\n case 0:\n tmp = aabb.min.X + this.offsetVector.X;\n break;\n case 2:\n tmp = aabb.max.X + this.offsetVector.X;\n break;\n default:\n tmp = this.offsetVector.X;\n break;\n }\n var tmp_0;\n switch (this.relativeTo.yKotlinEnum.x9_1) {\n case 2:\n tmp_0 = aabb.max.Y + this.offsetVector.Y;\n break;\n case 0:\n tmp_0 = aabb.min.Y + this.offsetVector.Y;\n break;\n default:\n tmp_0 = this.offsetVector.Y;\n break;\n }\n var tmp0 = this.relativeTo.zKotlinEnum.x9_1;\n return new Vector(tmp, tmp_0, tmp0 === 0 ? aabb.min.Z + this.offsetVector.Z : tmp0 === 2 ? aabb.max.Z + this.offsetVector.Z : this.offsetVector.Z);\n };\n protoOf(RelativeBoxOffset).af = function () {\n return this.relativeTo;\n };\n protoOf(RelativeBoxOffset).bf = function () {\n return this.offsetVector;\n };\n protoOf(RelativeBoxOffset).s2d = function (relativeTo, offsetVector) {\n return new RelativeBoxOffset(relativeTo, offsetVector);\n };\n protoOf(RelativeBoxOffset).copy = function (relativeTo, offsetVector, $super) {\n relativeTo = relativeTo === VOID ? this.relativeTo : relativeTo;\n offsetVector = offsetVector === VOID ? this.offsetVector : offsetVector;\n return this.s2d(relativeTo, offsetVector);\n };\n protoOf(RelativeBoxOffset).toString = function () {\n return 'RelativeBoxOffset(relativeTo=' + this.relativeTo + ', offsetVector=' + this.offsetVector + ')';\n };\n protoOf(RelativeBoxOffset).hashCode = function () {\n var result = this.relativeTo.hashCode();\n result = imul(result, 31) + this.offsetVector.hashCode() | 0;\n return result;\n };\n protoOf(RelativeBoxOffset).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RelativeBoxOffset))\n return false;\n var tmp0_other_with_cast = other instanceof RelativeBoxOffset ? other : THROW_CCE();\n if (!this.relativeTo.equals(tmp0_other_with_cast.relativeTo))\n return false;\n if (!this.offsetVector.equals(tmp0_other_with_cast.offsetVector))\n return false;\n return true;\n };\n var RelationOriginAlongX_LEFT_instance;\n var RelationOriginAlongX_CENTER_instance;\n var RelationOriginAlongX_RIGHT_instance;\n function values_5() {\n return [RelationOriginAlongX_LEFT_getInstance(), RelationOriginAlongX_CENTER_getInstance(), RelationOriginAlongX_RIGHT_getInstance()];\n }\n function valueOf_5(value) {\n switch (value) {\n case 'LEFT':\n return RelationOriginAlongX_LEFT_getInstance();\n case 'CENTER':\n return RelationOriginAlongX_CENTER_getInstance();\n case 'RIGHT':\n return RelationOriginAlongX_RIGHT_getInstance();\n default:\n RelationOriginAlongX_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var RelationOriginAlongX_entriesInitialized;\n function RelationOriginAlongX_initEntries() {\n if (RelationOriginAlongX_entriesInitialized)\n return Unit_instance;\n RelationOriginAlongX_entriesInitialized = true;\n RelationOriginAlongX_LEFT_instance = new RelationOriginAlongX('LEFT', 0);\n RelationOriginAlongX_CENTER_instance = new RelationOriginAlongX('CENTER', 1);\n RelationOriginAlongX_RIGHT_instance = new RelationOriginAlongX('RIGHT', 2);\n }\n function RelationOriginAlongX(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function RelationOriginAlongXImpostor() {\n RelationOriginAlongXImpostor_instance = this;\n this.LEFT = 0;\n this.CENTER = 1;\n this.RIGHT = 2;\n this.v2d_1 = values_5();\n }\n protoOf(RelationOriginAlongXImpostor).w2d = function () {\n return this.LEFT;\n };\n protoOf(RelationOriginAlongXImpostor).x2d = function () {\n return this.CENTER;\n };\n protoOf(RelationOriginAlongXImpostor).y2d = function () {\n return this.RIGHT;\n };\n protoOf(RelationOriginAlongXImpostor).toEnum = function (value) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.first' call\n var indexedObject = this.v2d_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.math.RelationOriginAlongXImpostor.toEnum.' call\n if (element.x9_1 === value) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n throw NoSuchElementException_init_$Create$_0('Array contains no element matching the predicate.');\n }\n return tmp$ret$1;\n };\n var RelationOriginAlongXImpostor_instance;\n function RelationOriginAlongXImpostor_getInstance() {\n if (RelationOriginAlongXImpostor_instance == null)\n new RelationOriginAlongXImpostor();\n return RelationOriginAlongXImpostor_instance;\n }\n var RelationOriginAlongY_BOTTOM_instance;\n var RelationOriginAlongY_CENTER_instance;\n var RelationOriginAlongY_TOP_instance;\n function values_6() {\n return [RelationOriginAlongY_BOTTOM_getInstance(), RelationOriginAlongY_CENTER_getInstance(), RelationOriginAlongY_TOP_getInstance()];\n }\n function valueOf_6(value) {\n switch (value) {\n case 'BOTTOM':\n return RelationOriginAlongY_BOTTOM_getInstance();\n case 'CENTER':\n return RelationOriginAlongY_CENTER_getInstance();\n case 'TOP':\n return RelationOriginAlongY_TOP_getInstance();\n default:\n RelationOriginAlongY_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var RelationOriginAlongY_entriesInitialized;\n function RelationOriginAlongY_initEntries() {\n if (RelationOriginAlongY_entriesInitialized)\n return Unit_instance;\n RelationOriginAlongY_entriesInitialized = true;\n RelationOriginAlongY_BOTTOM_instance = new RelationOriginAlongY('BOTTOM', 0);\n RelationOriginAlongY_CENTER_instance = new RelationOriginAlongY('CENTER', 1);\n RelationOriginAlongY_TOP_instance = new RelationOriginAlongY('TOP', 2);\n }\n function RelationOriginAlongY(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function RelationOriginAlongYImpostor() {\n RelationOriginAlongYImpostor_instance = this;\n this.BOTTOM = 0;\n this.CENTER = 1;\n this.TOP = 2;\n this.b2e_1 = values_6();\n }\n protoOf(RelationOriginAlongYImpostor).c2e = function () {\n return this.BOTTOM;\n };\n protoOf(RelationOriginAlongYImpostor).x2d = function () {\n return this.CENTER;\n };\n protoOf(RelationOriginAlongYImpostor).d2e = function () {\n return this.TOP;\n };\n protoOf(RelationOriginAlongYImpostor).toEnum = function (value) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.first' call\n var indexedObject = this.b2e_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.math.RelationOriginAlongYImpostor.toEnum.' call\n if (element.x9_1 === value) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n throw NoSuchElementException_init_$Create$_0('Array contains no element matching the predicate.');\n }\n return tmp$ret$1;\n };\n var RelationOriginAlongYImpostor_instance;\n function RelationOriginAlongYImpostor_getInstance() {\n if (RelationOriginAlongYImpostor_instance == null)\n new RelationOriginAlongYImpostor();\n return RelationOriginAlongYImpostor_instance;\n }\n var RelationOriginAlongZ_BACK_instance;\n var RelationOriginAlongZ_CENTER_instance;\n var RelationOriginAlongZ_FRONT_instance;\n function values_7() {\n return [RelationOriginAlongZ_BACK_getInstance(), RelationOriginAlongZ_CENTER_getInstance(), RelationOriginAlongZ_FRONT_getInstance()];\n }\n function valueOf_7(value) {\n switch (value) {\n case 'BACK':\n return RelationOriginAlongZ_BACK_getInstance();\n case 'CENTER':\n return RelationOriginAlongZ_CENTER_getInstance();\n case 'FRONT':\n return RelationOriginAlongZ_FRONT_getInstance();\n default:\n RelationOriginAlongZ_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var RelationOriginAlongZ_entriesInitialized;\n function RelationOriginAlongZ_initEntries() {\n if (RelationOriginAlongZ_entriesInitialized)\n return Unit_instance;\n RelationOriginAlongZ_entriesInitialized = true;\n RelationOriginAlongZ_BACK_instance = new RelationOriginAlongZ('BACK', 0);\n RelationOriginAlongZ_CENTER_instance = new RelationOriginAlongZ('CENTER', 1);\n RelationOriginAlongZ_FRONT_instance = new RelationOriginAlongZ('FRONT', 2);\n }\n function RelationOriginAlongZ(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function RelationOriginAlongZImpostor() {\n RelationOriginAlongZImpostor_instance = this;\n this.BACK = 0;\n this.CENTER = 1;\n this.FRONT = 2;\n this.g2e_1 = values_7();\n }\n protoOf(RelationOriginAlongZImpostor).h2e = function () {\n return this.BACK;\n };\n protoOf(RelationOriginAlongZImpostor).x2d = function () {\n return this.CENTER;\n };\n protoOf(RelationOriginAlongZImpostor).i2e = function () {\n return this.FRONT;\n };\n protoOf(RelationOriginAlongZImpostor).toEnum = function (value) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.first' call\n var indexedObject = this.g2e_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.math.RelationOriginAlongZImpostor.toEnum.' call\n if (element.x9_1 === value) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n throw NoSuchElementException_init_$Create$_0('Array contains no element matching the predicate.');\n }\n return tmp$ret$1;\n };\n var RelationOriginAlongZImpostor_instance;\n function RelationOriginAlongZImpostor_getInstance() {\n if (RelationOriginAlongZImpostor_instance == null)\n new RelationOriginAlongZImpostor();\n return RelationOriginAlongZImpostor_instance;\n }\n function Companion_57() {\n Companion_instance_57 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.j2e_1 = [createSimpleEnumSerializer('com.ikea.core.math.RelationOriginAlongX', values_5()), createSimpleEnumSerializer('com.ikea.core.math.RelationOriginAlongY', values_6()), createSimpleEnumSerializer('com.ikea.core.math.RelationOriginAlongZ', values_7())];\n }\n protoOf(Companion_57).l17 = function () {\n return $serializer_getInstance_5();\n };\n var Companion_instance_57;\n function Companion_getInstance_58() {\n if (Companion_instance_57 == null)\n new Companion_57();\n return Companion_instance_57;\n }\n function $serializer_5() {\n $serializer_instance_5 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.math.RelationOrigin', this, 3);\n tmp0_serialDesc.cv('x', true);\n tmp0_serialDesc.cv('y', true);\n tmp0_serialDesc.cv('z', true);\n this.k2e_1 = tmp0_serialDesc;\n }\n protoOf($serializer_5).ok = function () {\n return this.k2e_1;\n };\n protoOf($serializer_5).rv = function () {\n var tmp0_cached = Companion_getInstance_58().j2e_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [tmp0_cached[0], tmp0_cached[1], tmp0_cached[2]];\n };\n protoOf($serializer_5).qk = function (decoder) {\n var tmp0_desc = this.k2e_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n var tmp8_cached = Companion_getInstance_58().j2e_1;\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.zn(tmp0_desc, 0, tmp8_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.zn(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.zn(tmp0_desc, 0, tmp8_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.zn(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return RelationOrigin_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_5).l2e = function (encoder, value) {\n var tmp0_desc = this.k2e_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_58().j2e_1;\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !value.xKotlinEnum.equals(RelationOriginAlongX_CENTER_getInstance())) {\n tmp1_output.ep(tmp0_desc, 0, tmp2_cached[0], value.xKotlinEnum);\n }\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !value.yKotlinEnum.equals(RelationOriginAlongY_CENTER_getInstance())) {\n tmp1_output.ep(tmp0_desc, 1, tmp2_cached[1], value.yKotlinEnum);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !value.zKotlinEnum.equals(RelationOriginAlongZ_CENTER_getInstance())) {\n tmp1_output.ep(tmp0_desc, 2, tmp2_cached[2], value.zKotlinEnum);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_5).pk = function (encoder, value) {\n return this.l2e(encoder, value instanceof RelationOrigin ? value : THROW_CCE());\n };\n var $serializer_instance_5;\n function $serializer_getInstance_5() {\n if ($serializer_instance_5 == null)\n new $serializer_5();\n return $serializer_instance_5;\n }\n function RelationOrigin_init_$Init$(seen1, x, y, z, serializationConstructorMarker, $this) {\n if (!(0 === (0 & seen1))) {\n throwMissingFieldException(seen1, 0, $serializer_getInstance_5().k2e_1);\n }\n if (0 === (seen1 & 1))\n $this.xKotlinEnum = RelationOriginAlongX_CENTER_getInstance();\n else\n $this.xKotlinEnum = x;\n if (0 === (seen1 & 2))\n $this.yKotlinEnum = RelationOriginAlongY_CENTER_getInstance();\n else\n $this.yKotlinEnum = y;\n if (0 === (seen1 & 4))\n $this.zKotlinEnum = RelationOriginAlongZ_CENTER_getInstance();\n else\n $this.zKotlinEnum = z;\n return $this;\n }\n function RelationOrigin_init_$Create$(seen1, x, y, z, serializationConstructorMarker) {\n return RelationOrigin_init_$Init$(seen1, x, y, z, serializationConstructorMarker, objectCreate(protoOf(RelationOrigin)));\n }\n function RelationOrigin(x, y, z) {\n Companion_getInstance_58();\n x = x === VOID ? RelationOriginAlongX_CENTER_getInstance() : x;\n y = y === VOID ? RelationOriginAlongY_CENTER_getInstance() : y;\n z = z === VOID ? RelationOriginAlongZ_CENTER_getInstance() : z;\n this.xKotlinEnum = x;\n this.yKotlinEnum = y;\n this.zKotlinEnum = z;\n }\n protoOf(RelationOrigin).m2e = function () {\n return this.xKotlinEnum;\n };\n protoOf(RelationOrigin).n2e = function () {\n return this.yKotlinEnum;\n };\n protoOf(RelationOrigin).o2e = function () {\n return this.zKotlinEnum;\n };\n protoOf(RelationOrigin).i2d = function () {\n return this.xKotlinEnum.x9_1;\n };\n protoOf(RelationOrigin).j2d = function () {\n return this.yKotlinEnum.x9_1;\n };\n protoOf(RelationOrigin).k2d = function () {\n return this.zKotlinEnum.x9_1;\n };\n protoOf(RelationOrigin).toString = function () {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.arrayOf' call\n var tmp;\n switch (this.xKotlinEnum.x9_1) {\n case 0:\n tmp = 'left';\n break;\n case 2:\n tmp = 'right';\n break;\n default:\n tmp = '';\n break;\n }\n var tmp_0;\n switch (this.yKotlinEnum.x9_1) {\n case 2:\n tmp_0 = 'top';\n break;\n case 0:\n tmp_0 = 'bottom';\n break;\n default:\n tmp_0 = '';\n break;\n }\n var tmp0 = this.zKotlinEnum.x9_1;\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = [tmp, tmp_0, tmp0 === 2 ? 'front' : tmp0 === 0 ? 'back' : ''];\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.math.RelationOrigin.toString.' call\n if (!(element === '')) {\n destination.q(element);\n }\n }\n return joinToString(destination, '-');\n };\n protoOf(RelationOrigin).af = function () {\n return this.xKotlinEnum;\n };\n protoOf(RelationOrigin).bf = function () {\n return this.yKotlinEnum;\n };\n protoOf(RelationOrigin).g1k = function () {\n return this.zKotlinEnum;\n };\n protoOf(RelationOrigin).p2e = function (x, y, z) {\n return new RelationOrigin(x, y, z);\n };\n protoOf(RelationOrigin).copy = function (x, y, z, $super) {\n x = x === VOID ? this.xKotlinEnum : x;\n y = y === VOID ? this.yKotlinEnum : y;\n z = z === VOID ? this.zKotlinEnum : z;\n return this.p2e(x, y, z);\n };\n protoOf(RelationOrigin).hashCode = function () {\n var result = this.xKotlinEnum.hashCode();\n result = imul(result, 31) + this.yKotlinEnum.hashCode() | 0;\n result = imul(result, 31) + this.zKotlinEnum.hashCode() | 0;\n return result;\n };\n protoOf(RelationOrigin).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RelationOrigin))\n return false;\n var tmp0_other_with_cast = other instanceof RelationOrigin ? other : THROW_CCE();\n if (!this.xKotlinEnum.equals(tmp0_other_with_cast.xKotlinEnum))\n return false;\n if (!this.yKotlinEnum.equals(tmp0_other_with_cast.yKotlinEnum))\n return false;\n if (!this.zKotlinEnum.equals(tmp0_other_with_cast.zKotlinEnum))\n return false;\n return true;\n };\n function RelationOriginAlongX_LEFT_getInstance() {\n RelationOriginAlongX_initEntries();\n return RelationOriginAlongX_LEFT_instance;\n }\n function RelationOriginAlongX_CENTER_getInstance() {\n RelationOriginAlongX_initEntries();\n return RelationOriginAlongX_CENTER_instance;\n }\n function RelationOriginAlongX_RIGHT_getInstance() {\n RelationOriginAlongX_initEntries();\n return RelationOriginAlongX_RIGHT_instance;\n }\n function RelationOriginAlongY_BOTTOM_getInstance() {\n RelationOriginAlongY_initEntries();\n return RelationOriginAlongY_BOTTOM_instance;\n }\n function RelationOriginAlongY_CENTER_getInstance() {\n RelationOriginAlongY_initEntries();\n return RelationOriginAlongY_CENTER_instance;\n }\n function RelationOriginAlongY_TOP_getInstance() {\n RelationOriginAlongY_initEntries();\n return RelationOriginAlongY_TOP_instance;\n }\n function RelationOriginAlongZ_BACK_getInstance() {\n RelationOriginAlongZ_initEntries();\n return RelationOriginAlongZ_BACK_instance;\n }\n function RelationOriginAlongZ_CENTER_getInstance() {\n RelationOriginAlongZ_initEntries();\n return RelationOriginAlongZ_CENTER_instance;\n }\n function RelationOriginAlongZ_FRONT_getInstance() {\n RelationOriginAlongZ_initEntries();\n return RelationOriginAlongZ_FRONT_instance;\n }\n function Size_init_$Init$(vector, $this) {\n Size.call($this, vector.X, vector.Y, vector.Z);\n return $this;\n }\n function SizeFromVector(vector) {\n return Size_init_$Init$(vector, objectCreate(protoOf(Size)));\n }\n function Companion_58() {\n Companion_instance_58 = this;\n this.NONE = new Size();\n }\n protoOf(Companion_58).h22 = function () {\n return this.NONE;\n };\n protoOf(Companion_58).l17 = function () {\n return $serializer_getInstance_6();\n };\n var Companion_instance_58;\n function Companion_getInstance_59() {\n if (Companion_instance_58 == null)\n new Companion_58();\n return Companion_instance_58;\n }\n function $serializer_6() {\n $serializer_instance_6 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.math.Size', this, 3);\n tmp0_serialDesc.cv('width', true);\n tmp0_serialDesc.cv('height', true);\n tmp0_serialDesc.cv('depth', true);\n this.q2e_1 = tmp0_serialDesc;\n }\n protoOf($serializer_6).ok = function () {\n return this.q2e_1;\n };\n protoOf($serializer_6).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), DoubleSerializer_getInstance()];\n };\n protoOf($serializer_6).qk = function (decoder) {\n var tmp0_desc = this.q2e_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = 0.0;\n var tmp5_local1 = 0.0;\n var tmp6_local2 = 0.0;\n var tmp8_input = decoder.nn(tmp0_desc);\n if (tmp8_input.do()) {\n tmp4_local0 = tmp8_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp8_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp8_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp8_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp8_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp8_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp8_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp8_input.on(tmp0_desc);\n return Size_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_6).r2e = function (encoder, value) {\n var tmp0_desc = this.q2e_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !equals(value.s2e_1, 0.0)) {\n tmp1_output.ap(tmp0_desc, 0, value.s2e_1);\n }\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !equals(value.t2e_1, 0.0)) {\n tmp1_output.ap(tmp0_desc, 1, value.t2e_1);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !equals(value.u2e_1, 0.0)) {\n tmp1_output.ap(tmp0_desc, 2, value.u2e_1);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_6).pk = function (encoder, value) {\n return this.r2e(encoder, value instanceof Size ? value : THROW_CCE());\n };\n var $serializer_instance_6;\n function $serializer_getInstance_6() {\n if ($serializer_instance_6 == null)\n new $serializer_6();\n return $serializer_instance_6;\n }\n function Size_init_$Init$_0(seen1, width, height, depth, serializationConstructorMarker, $this) {\n if (!(0 === (0 & seen1))) {\n throwMissingFieldException(seen1, 0, $serializer_getInstance_6().q2e_1);\n }\n if (0 === (seen1 & 1))\n $this.s2e_1 = 0.0;\n else\n $this.s2e_1 = width;\n if (0 === (seen1 & 2))\n $this.t2e_1 = 0.0;\n else\n $this.t2e_1 = height;\n if (0 === (seen1 & 4))\n $this.u2e_1 = 0.0;\n else\n $this.u2e_1 = depth;\n $this.vector = new Vector($this.s2e_1, $this.t2e_1, $this.u2e_1);\n return $this;\n }\n function Size_init_$Create$(seen1, width, height, depth, serializationConstructorMarker) {\n return Size_init_$Init$_0(seen1, width, height, depth, serializationConstructorMarker, objectCreate(protoOf(Size)));\n }\n function Size(width, height, depth) {\n Companion_getInstance_59();\n width = width === VOID ? 0.0 : width;\n height = height === VOID ? 0.0 : height;\n depth = depth === VOID ? 0.0 : depth;\n this.s2e_1 = width;\n this.t2e_1 = height;\n this.u2e_1 = depth;\n this.vector = new Vector(this.s2e_1, this.t2e_1, this.u2e_1);\n }\n protoOf(Size).u2b = function () {\n return this.s2e_1;\n };\n protoOf(Size).v2b = function () {\n return this.t2e_1;\n };\n protoOf(Size).w2b = function () {\n return this.u2e_1;\n };\n protoOf(Size).times = function (s) {\n return new Size(this.s2e_1 * s, this.t2e_1 * s, this.u2e_1 * s);\n };\n protoOf(Size).v2e = function () {\n return this.vector;\n };\n protoOf(Size).af = function () {\n return this.s2e_1;\n };\n protoOf(Size).bf = function () {\n return this.t2e_1;\n };\n protoOf(Size).g1k = function () {\n return this.u2e_1;\n };\n protoOf(Size).w2e = function (width, height, depth) {\n return new Size(width, height, depth);\n };\n protoOf(Size).copy = function (width, height, depth, $super) {\n width = width === VOID ? this.s2e_1 : width;\n height = height === VOID ? this.t2e_1 : height;\n depth = depth === VOID ? this.u2e_1 : depth;\n return this.w2e(width, height, depth);\n };\n protoOf(Size).toString = function () {\n return 'Size(width=' + this.s2e_1 + ', height=' + this.t2e_1 + ', depth=' + this.u2e_1 + ')';\n };\n protoOf(Size).hashCode = function () {\n var result = getNumberHashCode(this.s2e_1);\n result = imul(result, 31) + getNumberHashCode(this.t2e_1) | 0;\n result = imul(result, 31) + getNumberHashCode(this.u2e_1) | 0;\n return result;\n };\n protoOf(Size).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Size))\n return false;\n var tmp0_other_with_cast = other instanceof Size ? other : THROW_CCE();\n if (!equals(this.s2e_1, tmp0_other_with_cast.s2e_1))\n return false;\n if (!equals(this.t2e_1, tmp0_other_with_cast.t2e_1))\n return false;\n if (!equals(this.u2e_1, tmp0_other_with_cast.u2e_1))\n return false;\n return true;\n };\n function Companion_59() {\n Companion_instance_59 = this;\n this.IDENTITY = new Transform(Companion_getInstance_61().ZERO, Companion_getInstance_57().IDENTITY);\n }\n protoOf(Companion_59).x2c = function () {\n return this.IDENTITY;\n };\n protoOf(Companion_59).l17 = function () {\n return $serializer_getInstance_7();\n };\n var Companion_instance_59;\n function Companion_getInstance_60() {\n if (Companion_instance_59 == null)\n new Companion_59();\n return Companion_instance_59;\n }\n function $serializer_7() {\n $serializer_instance_7 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.math.Transform', this, 2);\n tmp0_serialDesc.cv('position', false);\n tmp0_serialDesc.cv('rotation', true);\n this.x2e_1 = tmp0_serialDesc;\n }\n protoOf($serializer_7).ok = function () {\n return this.x2e_1;\n };\n protoOf($serializer_7).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [$serializer_getInstance_8(), $serializer_getInstance_4()];\n };\n protoOf($serializer_7).qk = function (decoder) {\n var tmp0_desc = this.x2e_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_input = decoder.nn(tmp0_desc);\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_4(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_4(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return Transform_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);\n };\n protoOf($serializer_7).y2e = function (encoder, value) {\n var tmp0_desc = this.x2e_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.ep(tmp0_desc, 0, $serializer_getInstance_8(), value.position);\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !value.rotation.equals(Companion_getInstance_57().IDENTITY)) {\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance_4(), value.rotation);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_7).pk = function (encoder, value) {\n return this.y2e(encoder, value instanceof Transform ? value : THROW_CCE());\n };\n var $serializer_instance_7;\n function $serializer_getInstance_7() {\n if ($serializer_instance_7 == null)\n new $serializer_7();\n return $serializer_instance_7;\n }\n function Transform_init_$Init$(seen1, position, rotation, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_7().x2e_1);\n }\n $this.position = position;\n if (0 === (seen1 & 2))\n $this.rotation = Companion_getInstance_57().IDENTITY;\n else\n $this.rotation = rotation;\n return $this;\n }\n function Transform_init_$Create$(seen1, position, rotation, serializationConstructorMarker) {\n return Transform_init_$Init$(seen1, position, rotation, serializationConstructorMarker, objectCreate(protoOf(Transform)));\n }\n function Transform(position, rotation) {\n Companion_getInstance_60();\n rotation = rotation === VOID ? Companion_getInstance_57().IDENTITY : rotation;\n this.position = position;\n this.rotation = rotation;\n }\n protoOf(Transform).ct = function () {\n return this.position;\n };\n protoOf(Transform).v1k = function () {\n return this.rotation;\n };\n protoOf(Transform).z2e = function () {\n return this.transformVector(Companion_getInstance_61().FORWARD);\n };\n protoOf(Transform).a2f = function () {\n return this.transformVector(Companion_getInstance_61().UP);\n };\n protoOf(Transform).d2c = function () {\n return this.transformVector(Companion_getInstance_61().RIGHT);\n };\n protoOf(Transform).delta = function (other) {\n return new Transform(other.inverseTransformPosition(this.position), other.inverseTransformRotation(this.rotation));\n };\n protoOf(Transform).concatenate = function (next) {\n return new Transform(this.transformPosition(next.position), this.transformRotation(next.rotation));\n };\n protoOf(Transform).transformPosition = function (point) {\n return point.rotate(this.rotation).plus(this.position);\n };\n protoOf(Transform).transformVector = function (v) {\n return v.rotate(this.rotation);\n };\n protoOf(Transform).inverseTransformPosition = function (point) {\n return point.minus(this.position).rotate(this.rotation.unaryMinus());\n };\n protoOf(Transform).inverseTransformVector = function (v) {\n return v.rotate(this.rotation.unaryMinus());\n };\n protoOf(Transform).transformRotation = function (q) {\n return q.times(this.rotation);\n };\n protoOf(Transform).inverseTransformRotation = function (q) {\n return q.times(this.rotation.inverse());\n };\n protoOf(Transform).exactEquals = function (other) {\n return this.position.exact(other.position) ? this.rotation.equals(other.rotation) : false;\n };\n protoOf(Transform).b2f = function (other, epsilon) {\n var aPosition = this.position;\n var bPosition = other.position;\n var positionAlmostTheSame = aPosition.minus(bPosition).size < epsilon;\n var aRotation = this.rotation.toEuler();\n var bRotation = other.rotation.toEuler();\n var rotationAlmostTheSame = aRotation.minus(bRotation).size < epsilon;\n return positionAlmostTheSame ? rotationAlmostTheSame : false;\n };\n protoOf(Transform).almostEquals = function (other, epsilon, $super) {\n epsilon = epsilon === VOID ? 0.001 : epsilon;\n return this.b2f(other, epsilon);\n };\n protoOf(Transform).inverse = function () {\n return new Transform(this.inverseTransformVector(this.position).unaryMinus(), this.rotation.inverse());\n };\n protoOf(Transform).af = function () {\n return this.position;\n };\n protoOf(Transform).bf = function () {\n return this.rotation;\n };\n protoOf(Transform).c2f = function (position, rotation) {\n return new Transform(position, rotation);\n };\n protoOf(Transform).copy = function (position, rotation, $super) {\n position = position === VOID ? this.position : position;\n rotation = rotation === VOID ? this.rotation : rotation;\n return this.c2f(position, rotation);\n };\n protoOf(Transform).toString = function () {\n return 'Transform(position=' + this.position + ', rotation=' + this.rotation + ')';\n };\n protoOf(Transform).hashCode = function () {\n var result = this.position.hashCode();\n result = imul(result, 31) + this.rotation.hashCode() | 0;\n return result;\n };\n protoOf(Transform).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Transform))\n return false;\n var tmp0_other_with_cast = other instanceof Transform ? other : THROW_CCE();\n if (!this.position.equals(tmp0_other_with_cast.position))\n return false;\n if (!this.rotation.equals(tmp0_other_with_cast.rotation))\n return false;\n return true;\n };\n function get_zero() {\n _init_properties_Vector_kt__7ulyhp();\n return zero;\n }\n var zero;\n function Vector_init_$Init$(xInt, yInt, zInt, $this) {\n Vector.call($this, xInt, yInt, zInt);\n return $this;\n }\n function __VectorIntConstructorKotlin(xInt, yInt, zInt) {\n return Vector_init_$Init$(xInt, yInt, zInt, objectCreate(protoOf(Vector)));\n }\n function Companion_60() {\n Companion_instance_60 = this;\n this.LEFT = VectorConstants_getInstance().LEFT;\n this.RIGHT = VectorConstants_getInstance().RIGHT;\n this.DOWN = VectorConstants_getInstance().DOWN;\n this.UP = VectorConstants_getInstance().UP;\n this.FORWARD = VectorConstants_getInstance().FORWARD;\n this.BACK = VectorConstants_getInstance().BACK;\n this.ZERO = VectorConstants_getInstance().ZERO;\n this.INFINITY = VectorConstants_getInstance().INFINITY;\n this.ONE = VectorConstants_getInstance().ONE;\n }\n protoOf(Companion_60).w2d = function () {\n return this.LEFT;\n };\n protoOf(Companion_60).y2d = function () {\n return this.RIGHT;\n };\n protoOf(Companion_60).d2f = function () {\n return this.DOWN;\n };\n protoOf(Companion_60).e2f = function () {\n return this.UP;\n };\n protoOf(Companion_60).f2f = function () {\n return this.FORWARD;\n };\n protoOf(Companion_60).h2e = function () {\n return this.BACK;\n };\n protoOf(Companion_60).g2f = function () {\n return this.ZERO;\n };\n protoOf(Companion_60).h2f = function () {\n return this.INFINITY;\n };\n protoOf(Companion_60).i22 = function () {\n return this.ONE;\n };\n protoOf(Companion_60).l17 = function () {\n return $serializer_getInstance_8();\n };\n var Companion_instance_60;\n function Companion_getInstance_61() {\n if (Companion_instance_60 == null)\n new Companion_60();\n return Companion_instance_60;\n }\n function $serializer_8() {\n $serializer_instance_8 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.math.Vector', this, 3);\n tmp0_serialDesc.cv('x', true);\n tmp0_serialDesc.cv('y', true);\n tmp0_serialDesc.cv('z', true);\n this.i2f_1 = tmp0_serialDesc;\n }\n protoOf($serializer_8).ok = function () {\n return this.i2f_1;\n };\n protoOf($serializer_8).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), DoubleSerializer_getInstance()];\n };\n protoOf($serializer_8).qk = function (decoder) {\n var tmp0_desc = this.i2f_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = 0.0;\n var tmp5_local1 = 0.0;\n var tmp6_local2 = 0.0;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return Vector_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_8).j2f = function (encoder, value) {\n var tmp0_desc = this.i2f_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !equals(value.X, 0.0)) {\n tmp1_output.ap(tmp0_desc, 0, value.X);\n }\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !equals(value.Y, 0.0)) {\n tmp1_output.ap(tmp0_desc, 1, value.Y);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !equals(value.Z, 0.0)) {\n tmp1_output.ap(tmp0_desc, 2, value.Z);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_8).pk = function (encoder, value) {\n return this.j2f(encoder, value instanceof Vector ? value : THROW_CCE());\n };\n var $serializer_instance_8;\n function $serializer_getInstance_8() {\n if ($serializer_instance_8 == null)\n new $serializer_8();\n return $serializer_instance_8;\n }\n function Vector_init_$Init$_0(seen1, X, Y, Z, serializationConstructorMarker, $this) {\n if (!(0 === (0 & seen1))) {\n throwMissingFieldException(seen1, 0, $serializer_getInstance_8().i2f_1);\n }\n if (0 === (seen1 & 1))\n $this.X = 0.0;\n else\n $this.X = X;\n if (0 === (seen1 & 2))\n $this.Y = 0.0;\n else\n $this.Y = Y;\n if (0 === (seen1 & 4))\n $this.Z = 0.0;\n else\n $this.Z = Z;\n return $this;\n }\n function Vector_init_$Create$(seen1, X, Y, Z, serializationConstructorMarker) {\n return Vector_init_$Init$_0(seen1, X, Y, Z, serializationConstructorMarker, objectCreate(protoOf(Vector)));\n }\n function Vector(X, Y, Z) {\n Companion_getInstance_61();\n X = X === VOID ? 0.0 : X;\n Y = Y === VOID ? 0.0 : Y;\n Z = Z === VOID ? 0.0 : Z;\n this.X = X;\n this.Y = Y;\n this.Z = Z;\n }\n protoOf(Vector).k2f = function () {\n return this.X;\n };\n protoOf(Vector).l2f = function () {\n return this.Y;\n };\n protoOf(Vector).m2f = function () {\n return this.Z;\n };\n protoOf(Vector).toJson = function () {\n return '{' + toJson(this.X, 'x') + ',' + toJson(this.Y, 'y') + ', ' + toJson(this.Z, 'z') + '}';\n };\n protoOf(Vector).u2b = function () {\n return this.X;\n };\n protoOf(Vector).v2b = function () {\n return this.Y;\n };\n protoOf(Vector).w2b = function () {\n return this.Z;\n };\n protoOf(Vector).n2f = function () {\n return new Vector(this.X, this.X, this.X);\n };\n protoOf(Vector).o2f = function () {\n return new Vector(this.X, this.X, this.Y);\n };\n protoOf(Vector).p2f = function () {\n return new Vector(this.X, this.X, this.Z);\n };\n protoOf(Vector).q2f = function () {\n return new Vector(this.X, this.Y, this.X);\n };\n protoOf(Vector).r2f = function () {\n return new Vector(this.X, this.Y, this.Y);\n };\n protoOf(Vector).s2f = function () {\n return new Vector(this.X, this.Y, this.Z);\n };\n protoOf(Vector).t2f = function () {\n return new Vector(this.X, this.Z, this.X);\n };\n protoOf(Vector).u2f = function () {\n return new Vector(this.X, this.Z, this.Y);\n };\n protoOf(Vector).v2f = function () {\n return new Vector(this.X, this.Z, this.Z);\n };\n protoOf(Vector).w2f = function () {\n return new Vector(this.Y, this.X, this.X);\n };\n protoOf(Vector).x2f = function () {\n return new Vector(this.Y, this.X, this.Y);\n };\n protoOf(Vector).y2f = function () {\n return new Vector(this.Y, this.X, this.Z);\n };\n protoOf(Vector).z2f = function () {\n return new Vector(this.Y, this.Y, this.X);\n };\n protoOf(Vector).a2g = function () {\n return new Vector(this.Y, this.Y, this.Y);\n };\n protoOf(Vector).b2g = function () {\n return new Vector(this.Y, this.Y, this.Z);\n };\n protoOf(Vector).c2g = function () {\n return new Vector(this.Y, this.Z, this.X);\n };\n protoOf(Vector).d2g = function () {\n return new Vector(this.Y, this.Z, this.Y);\n };\n protoOf(Vector).e2g = function () {\n return new Vector(this.Y, this.Z, this.Z);\n };\n protoOf(Vector).f2g = function () {\n return new Vector(this.Z, this.X, this.X);\n };\n protoOf(Vector).g2g = function () {\n return new Vector(this.Z, this.X, this.Y);\n };\n protoOf(Vector).h2g = function () {\n return new Vector(this.Z, this.X, this.Z);\n };\n protoOf(Vector).i2g = function () {\n return new Vector(this.Z, this.Y, this.X);\n };\n protoOf(Vector).j2g = function () {\n return new Vector(this.Z, this.Y, this.Y);\n };\n protoOf(Vector).k2g = function () {\n return new Vector(this.Z, this.Y, this.Z);\n };\n protoOf(Vector).l2g = function () {\n return new Vector(this.Z, this.Z, this.X);\n };\n protoOf(Vector).m2g = function () {\n return new Vector(this.Z, this.Z, this.Y);\n };\n protoOf(Vector).n2g = function () {\n return new Vector(this.Z, this.Z, this.Z);\n };\n protoOf(Vector).o2g = function () {\n return new Vector(this.X, this.X, 0.0);\n };\n protoOf(Vector).p2g = function () {\n return new Vector(this.X, this.Y, 0.0);\n };\n protoOf(Vector).q2g = function () {\n return new Vector(this.X, this.Z, 0.0);\n };\n protoOf(Vector).r2g = function () {\n return new Vector(this.X, 0.0, this.Z);\n };\n protoOf(Vector).s2g = function () {\n return new Vector(this.Y, this.X, 0.0);\n };\n protoOf(Vector).t2g = function () {\n return new Vector(this.Y, this.Y, 0.0);\n };\n protoOf(Vector).u2g = function () {\n return new Vector(this.Y, this.Z, 0.0);\n };\n protoOf(Vector).v2g = function () {\n return new Vector(this.Z, this.X, 0.0);\n };\n protoOf(Vector).w2g = function () {\n return new Vector(this.Z, this.Y, 0.0);\n };\n protoOf(Vector).x2g = function () {\n return new Vector(this.Z, this.Z, 0.0);\n };\n protoOf(Vector).plus = function (vector) {\n return new Vector(vector.X + this.X, vector.Y + this.Y, vector.Z + this.Z);\n };\n protoOf(Vector).__timesOperatorKotlin = function (vector) {\n return this.dot(vector);\n };\n protoOf(Vector).timesElementWise = function (vector) {\n return new Vector(this.X * vector.X, this.Y * vector.Y, this.Z * vector.Z);\n };\n protoOf(Vector).divideElementWise = function (vector) {\n return new Vector(this.X / vector.X, this.Y / vector.Y, this.Z / vector.Z);\n };\n protoOf(Vector).dot = function (vector) {\n return vector.X * this.X + vector.Y * this.Y + vector.Z * this.Z;\n };\n protoOf(Vector).cross = function (vector) {\n return new Vector(this.Y * vector.Z - this.Z * vector.Y, this.Z * vector.X - this.X * vector.Z, this.X * vector.Y - this.Y * vector.X);\n };\n protoOf(Vector).times = function (scalar) {\n return new Vector(scalar * this.X, scalar * this.Y, scalar * this.Z);\n };\n protoOf(Vector).__timesIntForKotlin = function (scalar) {\n return new Vector(scalar * this.X, scalar * this.Y, scalar * this.Z);\n };\n protoOf(Vector).minus = function (vector) {\n return new Vector(this.X - vector.X, this.Y - vector.Y, this.Z - vector.Z);\n };\n protoOf(Vector).div = function (scalar) {\n return new Vector(this.X / scalar, this.Y / scalar, this.Z / scalar);\n };\n protoOf(Vector).__divIntForKotlin = function (scalar) {\n return new Vector(this.X / scalar, this.Y / scalar, this.Z / scalar);\n };\n protoOf(Vector).unaryMinus = function () {\n return this.times(-1.0);\n };\n protoOf(Vector).rotateAroundPivot = function (rotation, pivot) {\n return this.minus(pivot).rotate(rotation).plus(pivot);\n };\n protoOf(Vector).rotateZ = function (theta) {\n return this.rotate(Companion_getInstance_57().fromAxisAngle(Companion_getInstance_61().BACK, theta.toRadian()));\n };\n protoOf(Vector).rotateY = function (theta) {\n return this.rotate(Companion_getInstance_57().fromAxisAngle(Companion_getInstance_61().UP, theta.toRadian()));\n };\n protoOf(Vector).rotateX = function (theta) {\n return this.rotate(Companion_getInstance_57().fromAxisAngle(Companion_getInstance_61().RIGHT, theta.toRadian()));\n };\n protoOf(Vector).rotateAroundAxis = function (axis, angle) {\n return this.rotate(Companion_getInstance_57().fromAxisAngle(axis, angle));\n };\n protoOf(Vector).rotate = function (quaternion) {\n var tmp;\n if (quaternion.isIdentity) {\n tmp = this;\n } else {\n var q = quaternion.normalize();\n var qDiff = q.w * q.w - (q.x * q.x + q.y * q.y + q.z * q.z);\n var thisTimesQ = 2 * (this.X * q.x + this.Y * q.y + this.Z * q.z);\n var twoQW = 2 * q.w;\n tmp = new Vector(this.X * qDiff + q.x * thisTimesQ + (q.y * this.Z - q.z * this.Y) * twoQW, this.Y * qDiff + q.y * thisTimesQ + (q.z * this.X - q.x * this.Z) * twoQW, this.Z * qDiff + q.z * thisTimesQ + (q.x * this.Y - q.y * this.X) * twoQW);\n }\n return tmp;\n };\n protoOf(Vector).distanceTo = function (otherPoint) {\n var xx = this.X - otherPoint.X;\n var yy = this.Y - otherPoint.Y;\n var zz = this.Z - otherPoint.Z;\n // Inline function 'kotlin.math.sqrt' call\n var x = xx * xx + yy * yy + zz * zz;\n return Math.sqrt(x);\n };\n protoOf(Vector).normalize = function () {\n var size = this.size;\n var tmp;\n if (size === 0.0) {\n tmp = this;\n } else {\n tmp = this.div(size);\n }\n return tmp;\n };\n protoOf(Vector).setSize = function (newSize) {\n return this.div(this.size).times(newSize);\n };\n protoOf(Vector).angle = function (other) {\n var cosValue = this.__timesOperatorKotlin(other) / (this.size * other.size);\n // Inline function 'kotlin.math.acos' call\n var result = Math.acos(cosValue);\n if (isNaN_0(result)) {\n return cosValue < -1.0 ? get_PI() : 0.0;\n }\n return result;\n };\n protoOf(Vector).y2g = function (other, up) {\n var unsignedAngle = this.angle(other);\n var perpendicular = this.cross(other);\n var dot = up.dot(perpendicular);\n // Inline function 'kotlin.math.sign' call\n var signedDot = sign(dot);\n if (signedDot === 0.0)\n return unsignedAngle;\n return signedDot * unsignedAngle;\n };\n protoOf(Vector).signedAngle = function (other, up, $super) {\n up = up === VOID ? Companion_getInstance_61().UP : up;\n return this.y2g(other, up);\n };\n protoOf(Vector).getRotationTo = function (other) {\n var angle = this.angle(other);\n var cross = this.cross(other);\n var tmp;\n if (cross.equals(Companion_getInstance_61().ZERO)) {\n tmp = Companion_getInstance_61().UP;\n } else {\n tmp = cross;\n }\n var axis = tmp;\n return Companion_getInstance_57().fromAxisAngle(axis, new Radians(angle));\n };\n protoOf(Vector).n = function () {\n var tmp;\n if ((this.X === 0.0 ? this.Y === 0.0 : false) ? this.Z === 0.0 : false) {\n tmp = 0.0;\n } else {\n // Inline function 'kotlin.math.sqrt' call\n var x = this.X * this.X + this.Y * this.Y + this.Z * this.Z;\n tmp = Math.sqrt(x);\n }\n return tmp;\n };\n protoOf(Vector).z2g = function () {\n // Inline function 'kotlin.math.abs' call\n var x = this.X;\n var tmp = Math.abs(x);\n // Inline function 'kotlin.math.abs' call\n var x_0 = this.Y;\n var tmp_0 = Math.abs(x_0);\n // Inline function 'kotlin.math.abs' call\n var x_1 = this.Z;\n var tmp$ret$2 = Math.abs(x_1);\n return new Vector(tmp, tmp_0, tmp$ret$2);\n };\n protoOf(Vector).equals = function (other) {\n var tmp;\n if (null == other) {\n tmp = true;\n } else {\n tmp = !(other instanceof Vector);\n }\n if (tmp)\n return false;\n return (almostEquals(other.X, this.X) ? almostEquals(other.Y, this.Y) : false) ? almostEquals(other.Z, this.Z) : false;\n };\n protoOf(Vector).hashCode = function () {\n return 0;\n };\n protoOf(Vector).projectOnPlaneFromPoints = function (p1, p2, p3) {\n var n = p3.minus(p2).cross(p1.minus(p2)).normalize();\n return this.projectOnPlane(n, p1);\n };\n protoOf(Vector).projectOnPlane = function (normal, pointOnPlane) {\n return this.minus(times(normal.__timesOperatorKotlin(this.minus(pointOnPlane)), normal));\n };\n protoOf(Vector).projectOn = function (direction) {\n var s = this.__timesOperatorKotlin(direction);\n return direction.times(s);\n };\n protoOf(Vector).project = function (ptSet, output) {\n var minAlong = 1.7976931348623157E308;\n var maxAlong = -1.7976931348623157E308;\n var inductionVariable = 0;\n var last = ptSet.length;\n while (inductionVariable < last) {\n var pt = ptSet[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var dotVal = pt.__timesOperatorKotlin(this);\n if (dotVal < minAlong)\n minAlong = dotVal;\n if (dotVal > maxAlong)\n maxAlong = dotVal;\n }\n output.first = minAlong;\n output.last = maxAlong;\n };\n protoOf(Vector).pointOnLine = function (p1, p2) {\n var p = this;\n var line = p2.minus(p1);\n var p1_p = p.minus(p1);\n var p_p2 = p2.minus(p);\n var segmentsSum = p1_p.size + p_p2.size;\n return almostEquals(line.size, segmentsSum, 1.0E-4);\n };\n protoOf(Vector).isZero = function () {\n return (this.X === 0.0 ? this.Y === 0.0 : false) ? this.Z === 0.0 : false;\n };\n protoOf(Vector).notZero = function () {\n return (!(this.X === 0.0) ? true : !(this.Y === 0.0)) ? true : !(this.Z === 0.0);\n };\n protoOf(Vector).exact = function (other) {\n return (this.X === other.X ? this.Y === other.Y : false) ? this.Z === other.Z : false;\n };\n protoOf(Vector).notExact = function (other) {\n return (!(this.X === other.X) ? true : !(this.Y === other.Y)) ? true : !(this.Z === other.Z);\n };\n protoOf(Vector).elementWiseInverse = function () {\n return new Vector(1.0 / this.X, 1.0 / this.Y, 1.0 / this.Z);\n };\n protoOf(Vector).a2h = function (x, y, z) {\n var tmp = x == null ? this.X : x;\n var tmp_0 = y == null ? this.Y : y;\n return new Vector(tmp, tmp_0, z == null ? this.Z : z);\n };\n protoOf(Vector).with = function (x, y, z, $super) {\n x = x === VOID ? null : x;\n y = y === VOID ? null : y;\n z = z === VOID ? null : z;\n return this.a2h(x, y, z);\n };\n protoOf(Vector).af = function () {\n return this.X;\n };\n protoOf(Vector).bf = function () {\n return this.Y;\n };\n protoOf(Vector).g1k = function () {\n return this.Z;\n };\n protoOf(Vector).w2e = function (X, Y, Z) {\n return new Vector(X, Y, Z);\n };\n protoOf(Vector).copy = function (X, Y, Z, $super) {\n X = X === VOID ? this.X : X;\n Y = Y === VOID ? this.Y : Y;\n Z = Z === VOID ? this.Z : Z;\n return this.w2e(X, Y, Z);\n };\n protoOf(Vector).toString = function () {\n return 'Vector(X=' + this.X + ', Y=' + this.Y + ', Z=' + this.Z + ')';\n };\n function get_geometricMean(_this__u8e3s4) {\n _init_properties_Vector_kt__7ulyhp();\n var mean = Companion_getInstance_61().ZERO;\n var num = 0;\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n while (inductionVariable < last) {\n var element = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.math..' call\n mean = mean.plus(element);\n num = num + 1 | 0;\n }\n mean = mean.times(1.0 / num);\n return mean;\n }\n function almostEquals(_this__u8e3s4, other, epsilon) {\n epsilon = epsilon === VOID ? 0.001 : epsilon;\n _init_properties_Vector_kt__7ulyhp();\n var tmp;\n if (_this__u8e3s4 === other) {\n tmp = true;\n } else {\n // Inline function 'kotlin.math.abs' call\n var x = _this__u8e3s4 - other;\n tmp = Math.abs(x) < epsilon;\n }\n return tmp;\n }\n function VectorConstants() {\n VectorConstants_instance = this;\n this.LEFT = __VectorIntConstructorKotlin(-1, 0, 0);\n this.RIGHT = __VectorIntConstructorKotlin(1, 0, 0);\n this.DOWN = __VectorIntConstructorKotlin(0, -1, 0);\n this.UP = __VectorIntConstructorKotlin(0, 1, 0);\n this.FORWARD = __VectorIntConstructorKotlin(0, 0, -1);\n this.BACK = __VectorIntConstructorKotlin(0, 0, 1);\n this.ZERO = __VectorIntConstructorKotlin(0, 0, 0);\n var tmp = this;\n tmp.INFINITY = new Vector(Infinity, Infinity, Infinity);\n this.ONE = __VectorIntConstructorKotlin(1, 1, 1);\n }\n protoOf(VectorConstants).w2d = function () {\n return this.LEFT;\n };\n protoOf(VectorConstants).y2d = function () {\n return this.RIGHT;\n };\n protoOf(VectorConstants).d2f = function () {\n return this.DOWN;\n };\n protoOf(VectorConstants).e2f = function () {\n return this.UP;\n };\n protoOf(VectorConstants).f2f = function () {\n return this.FORWARD;\n };\n protoOf(VectorConstants).h2e = function () {\n return this.BACK;\n };\n protoOf(VectorConstants).g2f = function () {\n return this.ZERO;\n };\n protoOf(VectorConstants).h2f = function () {\n return this.INFINITY;\n };\n protoOf(VectorConstants).i22 = function () {\n return this.ONE;\n };\n var VectorConstants_instance;\n function VectorConstants_getInstance() {\n if (VectorConstants_instance == null)\n new VectorConstants();\n return VectorConstants_instance;\n }\n var properties_initialized_Vector_kt_6ddpp7;\n function _init_properties_Vector_kt__7ulyhp() {\n if (!properties_initialized_Vector_kt_6ddpp7) {\n properties_initialized_Vector_kt_6ddpp7 = true;\n zero = new Vector(0.0, 0.0, 0.0);\n }\n }\n function times(_this__u8e3s4, other) {\n return other.times(_this__u8e3s4);\n }\n function InnerMeasurement$distance$delegate$lambda(this$0) {\n return function () {\n return this$0.start.point.distanceTo(this$0.end.point);\n };\n }\n function InnerMeasurement(start, end) {\n this.start = start;\n this.end = end;\n var tmp = this;\n tmp.b2h_1 = lazy(InnerMeasurement$distance$delegate$lambda(this));\n }\n protoOf(InnerMeasurement).s9 = function () {\n return this.start;\n };\n protoOf(InnerMeasurement).g23 = function () {\n return this.end;\n };\n protoOf(InnerMeasurement).c2h = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.b2h_1;\n distance$factory();\n return this_0.u2();\n };\n protoOf(InnerMeasurement).af = function () {\n return this.start;\n };\n protoOf(InnerMeasurement).bf = function () {\n return this.end;\n };\n protoOf(InnerMeasurement).d2h = function (start, end) {\n return new InnerMeasurement(start, end);\n };\n protoOf(InnerMeasurement).copy = function (start, end, $super) {\n start = start === VOID ? this.start : start;\n end = end === VOID ? this.end : end;\n return this.d2h(start, end);\n };\n protoOf(InnerMeasurement).toString = function () {\n return 'InnerMeasurement(start=' + this.start + ', end=' + this.end + ')';\n };\n protoOf(InnerMeasurement).hashCode = function () {\n var result = this.start.hashCode();\n result = imul(result, 31) + this.end.hashCode() | 0;\n return result;\n };\n protoOf(InnerMeasurement).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof InnerMeasurement))\n return false;\n var tmp0_other_with_cast = other instanceof InnerMeasurement ? other : THROW_CCE();\n if (!this.start.equals(tmp0_other_with_cast.start))\n return false;\n if (!this.end.equals(tmp0_other_with_cast.end))\n return false;\n return true;\n };\n function MeasurementUtils() {\n MeasurementUtils_instance = this;\n this.e2h_1 = LoggerState_getInstance().m1m('MeasurementUtils');\n }\n protoOf(MeasurementUtils).getOutsideMeasurementSingle = function (entity) {\n return get_axisAlignedBoundingBoxForHierarchy(entity);\n };\n protoOf(MeasurementUtils).getOutsideMeasurement = function (entities) {\n return Companion_instance_9.axisAlignedBoundingBoxForEntityHierarchies(entities);\n };\n protoOf(MeasurementUtils).getOutsideMeasurementSingleWithoutHierarchy = function (entity) {\n var tmp0_safe_receiver = get_collider(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n return tmp1_safe_receiver == null ? null : tmp1_safe_receiver.axisAlignedBoundingBox;\n };\n protoOf(MeasurementUtils).getOutsideMeasurementWithoutHierarchies = function (entities) {\n return Companion_instance_9.axisAlignedBoundingBoxForEntities(entities);\n };\n protoOf(MeasurementUtils).getLocalOutsideMeasurementForEntities = function (entities, baseWorldTransform) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var vertices = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = entities.length;\n while (inductionVariable < last) {\n var element = entities[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.measuring.MeasurementUtils.getLocalOutsideMeasurementForEntities.' call\n var transform = get_worldTransform(element);\n var tmp0_safe_receiver = get_colliderShapeComponent(element);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.measuring.MeasurementUtils.getLocalOutsideMeasurementForEntities..' call\n tmp = PolyhedronUtils_getInstance().transformAndExtractVerticesFromPolyhedron(tmp0_safe_receiver.polyhedron, transform);\n }\n var transformedVerticesForShape = tmp;\n if (!(transformedVerticesForShape == null)) {\n vertices.x(transformedVerticesForShape);\n }\n }\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var tmp0_iterator = vertices.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.measuring.MeasurementUtils.getLocalOutsideMeasurementForEntities.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var i = checkIndexOverflow(tmp1);\n vertices.o(i, baseWorldTransform.inverseTransformPosition(item));\n }\n var tmp_0;\n if (vertices.b1()) {\n return null;\n } else {\n var tmp_1 = Companion_getInstance_93();\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$3 = copyToArray(vertices);\n tmp_0 = tmp_1.fromVertices(tmp$ret$3);\n }\n return tmp_0;\n };\n protoOf(MeasurementUtils).getInsideMeasurementLocalSpace = function (entity, root, directionLocalSpace) {\n var directionWorldSpace = get_worldTransform(entity).transformVector(directionLocalSpace);\n return this.getInsideMeasurementWorldSpace(entity, root, directionWorldSpace);\n };\n protoOf(MeasurementUtils).getInsideMeasurementWorldSpace = function (entity, root, directionWorldSpace) {\n var ray = new Ray(get_worldPosition(entity), directionWorldSpace);\n var tmp0_elvis_lhs = RaycastUtils_instance.raycast(ray, root, entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var outerHit = tmp;\n var epsilonOffset = directionWorldSpace.times(0.1);\n var reverseRayOrigin = outerHit.point.plus(epsilonOffset);\n var reverseRay = new Ray(reverseRayOrigin, directionWorldSpace.unaryMinus());\n var selfHit = RaycastUtils_instance.raycast(reverseRay, entity);\n if (selfHit == null ? true : selfHit.distance > outerHit.distance) {\n selfHit = new RaycastHit(get_worldPosition(entity), entity, reverseRay.origin.distanceTo(get_worldPosition(entity)), reverseRay.direction.normalize());\n }\n return new InnerMeasurement(selfHit, outerHit);\n };\n var MeasurementUtils_instance;\n function MeasurementUtils_getInstance() {\n if (MeasurementUtils_instance == null)\n new MeasurementUtils();\n return MeasurementUtils_instance;\n }\n function distance$factory() {\n return getPropertyCallableRef('distance', 1, KProperty1, function (receiver) {\n return receiver.distance;\n }, null);\n }\n function get_nothing() {\n throw IllegalStateException_init_$Create$('This should never really be accessed');\n }\n function Companion_61() {\n this.id = 15;\n }\n protoOf(Companion_61).s1k = function () {\n return this.id;\n };\n var Companion_instance_61;\n function Companion_getInstance_62() {\n return Companion_instance_61;\n }\n function DisplayNameComponent(name) {\n this.name = name;\n }\n protoOf(DisplayNameComponent).mb = function () {\n return this.name;\n };\n protoOf(DisplayNameComponent).x1k = function () {\n return 15;\n };\n protoOf(DisplayNameComponent).eq = function (other) {\n return (other instanceof DisplayNameComponent ? other : THROW_CCE()).name === this.name;\n };\n protoOf(DisplayNameComponent).equals = function (other) {\n var tmp;\n if (other instanceof DisplayNameComponent) {\n tmp = other.name === this.name;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(DisplayNameComponent).hashCode = function () {\n return getStringHashCode(this.name);\n };\n protoOf(DisplayNameComponent).af = function () {\n return this.name;\n };\n protoOf(DisplayNameComponent).q1l = function (name) {\n return new DisplayNameComponent(name);\n };\n protoOf(DisplayNameComponent).copy = function (name, $super) {\n name = name === VOID ? this.name : name;\n return this.q1l(name);\n };\n protoOf(DisplayNameComponent).toString = function () {\n return 'DisplayNameComponent(name=' + this.name + ')';\n };\n function get_displayName(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4.isDisposed) {\n tmp = 'Disposed entity ' + _this__u8e3s4.id;\n } else {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(15);\n tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.name;\n }\n return tmp;\n }\n function ProductUtils() {\n }\n protoOf(ProductUtils).productComponent = function (entity) {\n return get_productComponent(entity);\n };\n protoOf(ProductUtils).productRef = function (entity) {\n return get_productRef(entity);\n };\n protoOf(ProductUtils).productRefOrEmptyString = function (entity) {\n return get_productRefOrEmptyString(entity);\n };\n protoOf(ProductUtils).isConnectionRoot = function (entity) {\n return get_isConnectionRoot(entity);\n };\n protoOf(ProductUtils).connectionRootEntity = function (entity) {\n var tmp = HierarchyUtils_instance;\n return tmp.findWithComponentInUpwardsHierarchy(entity, 28);\n };\n protoOf(ProductUtils).immediateConnectionRootDescendants = function (entity) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = get_immediateConnectionRootDescendants(entity);\n return copyToArray(this_0);\n };\n protoOf(ProductUtils).partKey = function (entity) {\n return get_partKey(entity);\n };\n var ProductUtils_instance;\n function ProductUtils_getInstance() {\n return ProductUtils_instance;\n }\n function get_connectionRootEntity(_this__u8e3s4) {\n return ProductUtils_instance.connectionRootEntity(_this__u8e3s4);\n }\n function get_immediateConnectionRootDescendants(_this__u8e3s4) {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = get_children(_this__u8e3s4);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.products..' call\n var list = get_isConnectionRoot(element) ? listOf(element) : get_immediateConnectionRootDescendants(element);\n addAll(destination, list);\n }\n return destination;\n }\n function ProppingComponent() {\n }\n protoOf(ProppingComponent).x1k = function () {\n return this.id;\n };\n protoOf(ProppingComponent).s1k = function () {\n return 7;\n };\n protoOf(ProppingComponent).eq = function (other) {\n return true;\n };\n var ProppingComponent_instance;\n function ProppingComponent_getInstance() {\n return ProppingComponent_instance;\n }\n function get_isPropping(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(ProppingComponent_instance.id);\n }\n function Companion_62() {\n this.id = 49;\n }\n protoOf(Companion_62).s1k = function () {\n return this.id;\n };\n var Companion_instance_62;\n function Companion_getInstance_63() {\n return Companion_instance_62;\n }\n function TemplateDataComponent(templateId, size, comSize, family, variant) {\n family = family === VOID ? '' : family;\n variant = variant === VOID ? null : variant;\n this.templateId = templateId;\n this.size = size;\n this.comSize = comSize;\n this.family = family;\n this.variant = variant;\n }\n protoOf(TemplateDataComponent).f2h = function () {\n return this.templateId;\n };\n protoOf(TemplateDataComponent).n = function () {\n return this.size;\n };\n protoOf(TemplateDataComponent).g2h = function () {\n return this.comSize;\n };\n protoOf(TemplateDataComponent).h2h = function () {\n return this.family;\n };\n protoOf(TemplateDataComponent).e1k = function () {\n return this.variant;\n };\n protoOf(TemplateDataComponent).x1k = function () {\n return 49;\n };\n protoOf(TemplateDataComponent).eq = function (other) {\n var otherC = other instanceof TemplateDataComponent ? other : THROW_CCE();\n return (((otherC.templateId === this.templateId ? otherC.size.equals(this.size) : false) ? otherC.comSize.equals(this.comSize) : false) ? otherC.family == this.family : false) ? otherC.variant == this.variant : false;\n };\n protoOf(TemplateDataComponent).equals = function (other) {\n var tmp;\n if (!(other instanceof TemplateDataComponent)) {\n tmp = true;\n } else {\n tmp = !(other.templateId === this.templateId);\n }\n if (tmp)\n return false;\n if (!(other.variant == this.variant))\n return false;\n return other.comSize.exact(this.comSize);\n };\n protoOf(TemplateDataComponent).hashCode = function () {\n return getStringHashCode(this.templateId);\n };\n protoOf(TemplateDataComponent).af = function () {\n return this.templateId;\n };\n protoOf(TemplateDataComponent).bf = function () {\n return this.size;\n };\n protoOf(TemplateDataComponent).g1k = function () {\n return this.comSize;\n };\n protoOf(TemplateDataComponent).h1k = function () {\n return this.family;\n };\n protoOf(TemplateDataComponent).i1k = function () {\n return this.variant;\n };\n protoOf(TemplateDataComponent).i2h = function (templateId, size, comSize, family, variant) {\n return new TemplateDataComponent(templateId, size, comSize, family, variant);\n };\n protoOf(TemplateDataComponent).copy = function (templateId, size, comSize, family, variant, $super) {\n templateId = templateId === VOID ? this.templateId : templateId;\n size = size === VOID ? this.size : size;\n comSize = comSize === VOID ? this.comSize : comSize;\n family = family === VOID ? this.family : family;\n variant = variant === VOID ? this.variant : variant;\n return this.i2h(templateId, size, comSize, family, variant);\n };\n protoOf(TemplateDataComponent).toString = function () {\n return 'TemplateDataComponent(templateId=' + this.templateId + ', size=' + this.size + ', comSize=' + this.comSize + ', family=' + this.family + ', variant=' + this.variant + ')';\n };\n function Companion_63() {\n }\n protoOf(Companion_63).createFromPoints = function (from, to) {\n var direction = to.minus(from).normalize();\n return new Ray(from, direction);\n };\n var Companion_instance_63;\n function Companion_getInstance_64() {\n return Companion_instance_63;\n }\n function Ray(origin, direction) {\n this.origin = origin;\n this.direction = direction;\n }\n protoOf(Ray).j2h = function () {\n return this.origin;\n };\n protoOf(Ray).o1z = function () {\n return this.direction;\n };\n protoOf(Ray).toString = function () {\n return 'Ray origin ' + this.origin + ' direction ' + this.direction;\n };\n protoOf(Ray).getPointAlongRay = function (distance) {\n return this.origin.plus(times(distance, this.direction));\n };\n protoOf(Ray).hitsPoint = function (point) {\n var directionToPoint = point.minus(this.origin);\n return directionToPoint.normalize().equals(this.direction.normalize());\n };\n protoOf(Ray).closestPointOnRay = function (point) {\n var rayDir = this.direction.normalize();\n var fromRayOriginToPoint = point.minus(this.origin);\n var weight = rayDir.dot(fromRayOriginToPoint);\n var tmp;\n if (weight < 0.0) {\n tmp = this.origin;\n } else {\n tmp = this.origin.plus(times(weight, rayDir));\n }\n return tmp;\n };\n protoOf(Ray).af = function () {\n return this.origin;\n };\n protoOf(Ray).bf = function () {\n return this.direction;\n };\n protoOf(Ray).u2c = function (origin, direction) {\n return new Ray(origin, direction);\n };\n protoOf(Ray).copy = function (origin, direction, $super) {\n origin = origin === VOID ? this.origin : origin;\n direction = direction === VOID ? this.direction : direction;\n return this.u2c(origin, direction);\n };\n protoOf(Ray).hashCode = function () {\n var result = this.origin.hashCode();\n result = imul(result, 31) + this.direction.hashCode() | 0;\n return result;\n };\n protoOf(Ray).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Ray))\n return false;\n var tmp0_other_with_cast = other instanceof Ray ? other : THROW_CCE();\n if (!this.origin.equals(tmp0_other_with_cast.origin))\n return false;\n if (!this.direction.equals(tmp0_other_with_cast.direction))\n return false;\n return true;\n };\n function RaycastHit(point, entity, distance, surfaceNormal) {\n this.point = point;\n this.entity = entity;\n this.distance = distance;\n this.surfaceNormal = surfaceNormal;\n }\n protoOf(RaycastHit).g24 = function () {\n return this.point;\n };\n protoOf(RaycastHit).r23 = function () {\n return this.entity;\n };\n protoOf(RaycastHit).c2h = function () {\n return this.distance;\n };\n protoOf(RaycastHit).k2h = function () {\n return this.surfaceNormal;\n };\n protoOf(RaycastHit).asRaycastResult = function () {\n return new RaycastResult(this.point, this.surfaceNormal);\n };\n protoOf(RaycastHit).af = function () {\n return this.point;\n };\n protoOf(RaycastHit).bf = function () {\n return this.entity;\n };\n protoOf(RaycastHit).g1k = function () {\n return this.distance;\n };\n protoOf(RaycastHit).h1k = function () {\n return this.surfaceNormal;\n };\n protoOf(RaycastHit).l2h = function (point, entity, distance, surfaceNormal) {\n return new RaycastHit(point, entity, distance, surfaceNormal);\n };\n protoOf(RaycastHit).copy = function (point, entity, distance, surfaceNormal, $super) {\n point = point === VOID ? this.point : point;\n entity = entity === VOID ? this.entity : entity;\n distance = distance === VOID ? this.distance : distance;\n surfaceNormal = surfaceNormal === VOID ? this.surfaceNormal : surfaceNormal;\n return this.l2h(point, entity, distance, surfaceNormal);\n };\n protoOf(RaycastHit).toString = function () {\n return 'RaycastHit(point=' + this.point + ', entity=' + this.entity + ', distance=' + this.distance + ', surfaceNormal=' + this.surfaceNormal + ')';\n };\n protoOf(RaycastHit).hashCode = function () {\n var result = this.point.hashCode();\n result = imul(result, 31) + this.entity.hashCode() | 0;\n result = imul(result, 31) + getNumberHashCode(this.distance) | 0;\n result = imul(result, 31) + this.surfaceNormal.hashCode() | 0;\n return result;\n };\n protoOf(RaycastHit).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RaycastHit))\n return false;\n var tmp0_other_with_cast = other instanceof RaycastHit ? other : THROW_CCE();\n if (!this.point.equals(tmp0_other_with_cast.point))\n return false;\n if (!this.entity.equals(tmp0_other_with_cast.entity))\n return false;\n if (!equals(this.distance, tmp0_other_with_cast.distance))\n return false;\n if (!this.surfaceNormal.equals(tmp0_other_with_cast.surfaceNormal))\n return false;\n return true;\n };\n function RaycastResult(point, surfaceNormal) {\n this.point = point;\n this.surfaceNormal = surfaceNormal;\n }\n protoOf(RaycastResult).g24 = function () {\n return this.point;\n };\n protoOf(RaycastResult).k2h = function () {\n return this.surfaceNormal;\n };\n protoOf(RaycastResult).af = function () {\n return this.point;\n };\n protoOf(RaycastResult).bf = function () {\n return this.surfaceNormal;\n };\n protoOf(RaycastResult).u2c = function (point, surfaceNormal) {\n return new RaycastResult(point, surfaceNormal);\n };\n protoOf(RaycastResult).copy = function (point, surfaceNormal, $super) {\n point = point === VOID ? this.point : point;\n surfaceNormal = surfaceNormal === VOID ? this.surfaceNormal : surfaceNormal;\n return this.u2c(point, surfaceNormal);\n };\n protoOf(RaycastResult).toString = function () {\n return 'RaycastResult(point=' + this.point + ', surfaceNormal=' + this.surfaceNormal + ')';\n };\n protoOf(RaycastResult).hashCode = function () {\n var result = this.point.hashCode();\n result = imul(result, 31) + this.surfaceNormal.hashCode() | 0;\n return result;\n };\n protoOf(RaycastResult).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RaycastResult))\n return false;\n var tmp0_other_with_cast = other instanceof RaycastResult ? other : THROW_CCE();\n if (!this.point.equals(tmp0_other_with_cast.point))\n return false;\n if (!this.surfaceNormal.equals(tmp0_other_with_cast.surfaceNormal))\n return false;\n return true;\n };\n function raycast$iterator($ray, closestHit, entity) {\n var tmp0_safe_receiver = get_collider(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.raycasting.RaycastUtils.raycast.iterator.' call\n var tmp0_safe_receiver_0 = tmp1_safe_receiver.raycast($ray);\n var tmp;\n if (tmp0_safe_receiver_0 == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var hitDistance = $ray.origin.distanceTo(tmp0_safe_receiver_0.point);\n var tmp0_safe_receiver_1 = closestHit._v;\n var tmp1_elvis_lhs = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.distance;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n tmp_0 = Infinity;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var closestDistance = tmp_0;\n var tmp_1;\n if (hitDistance < closestDistance) {\n closestHit._v = new RaycastHit(tmp0_safe_receiver_0.point, entity, hitDistance, tmp0_safe_receiver_0.surfaceNormal);\n tmp_1 = Unit_instance;\n }\n tmp = Unit_instance;\n }\n }\n }\n function raycastAll$iterator($ray, hits, entity) {\n var tmp0_safe_receiver = get_collider(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.raycasting.RaycastUtils.raycastAll.iterator.' call\n var tmp0_safe_receiver_0 = tmp1_safe_receiver.raycast($ray);\n var tmp;\n if (tmp0_safe_receiver_0 == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.raycasting.RaycastUtils.raycastAll.iterator..' call\n var hitDistance = $ray.origin.distanceTo(tmp0_safe_receiver_0.point);\n tmp = hits.q(new RaycastHit(tmp0_safe_receiver_0.point, entity, hitDistance, tmp0_safe_receiver_0.surfaceNormal));\n }\n }\n }\n function RaycastUtils$raycast$iterator$ref($ray, $closestHit) {\n var l = function (p0) {\n raycast$iterator($ray, $closestHit, p0);\n return Unit_instance;\n };\n l.callableName = 'iterator';\n return l;\n }\n function RaycastUtils$raycast$iterator$ref_0($ray, $closestHit) {\n var l = function (p0) {\n raycast$iterator($ray, $closestHit, p0);\n return Unit_instance;\n };\n l.callableName = 'iterator';\n return l;\n }\n function RaycastUtils$raycastAll$iterator$ref($ray, $hits) {\n var l = function (p0) {\n raycastAll$iterator($ray, $hits, p0);\n return Unit_instance;\n };\n l.callableName = 'iterator';\n return l;\n }\n function RaycastUtils$raycastAll$iterator$ref_0($ray, $hits) {\n var l = function (p0) {\n raycastAll$iterator($ray, $hits, p0);\n return Unit_instance;\n };\n l.callableName = 'iterator';\n return l;\n }\n function RaycastUtils() {\n }\n protoOf(RaycastUtils).m2h = function (ray, root, hierarchyToIgnore) {\n var closestHit = {_v: null};\n if (hierarchyToIgnore == null) {\n forEachInHierarchy(root, RaycastUtils$raycast$iterator$ref(ray, closestHit));\n } else {\n forEachInHierarchyExceptHierarchyOfIgnored(root, hierarchyToIgnore, RaycastUtils$raycast$iterator$ref_0(ray, closestHit));\n }\n return closestHit._v;\n };\n protoOf(RaycastUtils).raycast = function (ray, root, hierarchyToIgnore, $super) {\n hierarchyToIgnore = hierarchyToIgnore === VOID ? null : hierarchyToIgnore;\n return this.m2h(ray, root, hierarchyToIgnore);\n };\n protoOf(RaycastUtils).n2h = function (ray, root, hierarchyToIgnore) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var hits = ArrayList_init_$Create$();\n if (hierarchyToIgnore == null) {\n forEachInHierarchy(root, RaycastUtils$raycastAll$iterator$ref(ray, hits));\n } else {\n forEachInHierarchyExceptHierarchyOfIgnored(root, hierarchyToIgnore, RaycastUtils$raycastAll$iterator$ref_0(ray, hits));\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(hits);\n };\n protoOf(RaycastUtils).raycastAll = function (ray, root, hierarchyToIgnore, $super) {\n hierarchyToIgnore = hierarchyToIgnore === VOID ? null : hierarchyToIgnore;\n return this.n2h(ray, root, hierarchyToIgnore);\n };\n var RaycastUtils_instance;\n function RaycastUtils_getInstance() {\n return RaycastUtils_instance;\n }\n function Raycastable() {\n }\n function Companion_64() {\n this.id = 20;\n }\n protoOf(Companion_64).s1k = function () {\n return this.id;\n };\n protoOf(Companion_64).o2h = function (hasFinishedLoading) {\n return new LoadedModelInfoComponent(hasFinishedLoading);\n };\n protoOf(Companion_64).createForTest = function (hasFinishedLoading, $super) {\n hasFinishedLoading = hasFinishedLoading === VOID ? true : hasFinishedLoading;\n return this.o2h(hasFinishedLoading);\n };\n var Companion_instance_64;\n function Companion_getInstance_65() {\n return Companion_instance_64;\n }\n function LoadedModelInfoComponent(hasFinishedLoading, hasFailedLoading) {\n hasFinishedLoading = hasFinishedLoading === VOID ? true : hasFinishedLoading;\n hasFailedLoading = hasFailedLoading === VOID ? false : hasFailedLoading;\n this.hasFinishedLoading = hasFinishedLoading;\n this.hasFailedLoading = hasFailedLoading;\n this.p2h_1 = false;\n }\n protoOf(LoadedModelInfoComponent).q2h = function () {\n return this.hasFinishedLoading;\n };\n protoOf(LoadedModelInfoComponent).r2h = function () {\n return this.hasFailedLoading;\n };\n protoOf(LoadedModelInfoComponent).x1k = function () {\n return 20;\n };\n protoOf(LoadedModelInfoComponent).withFinishedLoading = function () {\n return new LoadedModelInfoComponent(true);\n };\n protoOf(LoadedModelInfoComponent).withFailedLoading = function () {\n return new LoadedModelInfoComponent(false, true);\n };\n protoOf(LoadedModelInfoComponent).eq = function (other) {\n var tmp;\n if ((other instanceof LoadedModelInfoComponent ? other : THROW_CCE()).hasFinishedLoading === this.hasFinishedLoading) {\n tmp = other.hasFailedLoading === this.hasFinishedLoading;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(LoadedModelInfoComponent).a1l = function () {\n return this.p2h_1;\n };\n protoOf(LoadedModelInfoComponent).af = function () {\n return this.hasFinishedLoading;\n };\n protoOf(LoadedModelInfoComponent).bf = function () {\n return this.hasFailedLoading;\n };\n protoOf(LoadedModelInfoComponent).s2h = function (hasFinishedLoading, hasFailedLoading) {\n return new LoadedModelInfoComponent(hasFinishedLoading, hasFailedLoading);\n };\n protoOf(LoadedModelInfoComponent).copy = function (hasFinishedLoading, hasFailedLoading, $super) {\n hasFinishedLoading = hasFinishedLoading === VOID ? this.hasFinishedLoading : hasFinishedLoading;\n hasFailedLoading = hasFailedLoading === VOID ? this.hasFailedLoading : hasFailedLoading;\n return this.s2h(hasFinishedLoading, hasFailedLoading);\n };\n protoOf(LoadedModelInfoComponent).toString = function () {\n return 'LoadedModelInfoComponent(hasFinishedLoading=' + this.hasFinishedLoading + ', hasFailedLoading=' + this.hasFailedLoading + ')';\n };\n protoOf(LoadedModelInfoComponent).hashCode = function () {\n var result = getBooleanHashCode(this.hasFinishedLoading);\n result = imul(result, 31) + getBooleanHashCode(this.hasFailedLoading) | 0;\n return result;\n };\n protoOf(LoadedModelInfoComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof LoadedModelInfoComponent))\n return false;\n var tmp0_other_with_cast = other instanceof LoadedModelInfoComponent ? other : THROW_CCE();\n if (!(this.hasFinishedLoading === tmp0_other_with_cast.hasFinishedLoading))\n return false;\n if (!(this.hasFailedLoading === tmp0_other_with_cast.hasFailedLoading))\n return false;\n return true;\n };\n function Companion_65() {\n this.id = 13;\n }\n protoOf(Companion_65).s1k = function () {\n return this.id;\n };\n var Companion_instance_65;\n function Companion_getInstance_66() {\n return Companion_instance_65;\n }\n function ModelInfoComponent(modelRootUrl, model, texture) {\n this.modelRootUrl = modelRootUrl;\n this.model = model;\n this.texture = texture;\n this.modelUrl = UrlHelper_instance.joinUrls(this.modelRootUrl, this.model);\n }\n protoOf(ModelInfoComponent).t2h = function () {\n return this.modelRootUrl;\n };\n protoOf(ModelInfoComponent).u2h = function () {\n return this.model;\n };\n protoOf(ModelInfoComponent).v2h = function () {\n return this.texture;\n };\n protoOf(ModelInfoComponent).x1k = function () {\n return 13;\n };\n protoOf(ModelInfoComponent).w2h = function () {\n return this.modelUrl;\n };\n protoOf(ModelInfoComponent).sameModel = function (other) {\n return (this.model == other.model ? this.modelRootUrl == other.modelRootUrl : false) ? this.texture == other.texture : false;\n };\n protoOf(ModelInfoComponent).eq = function (other) {\n return this.sameModel(other instanceof ModelInfoComponent ? other : THROW_CCE());\n };\n protoOf(ModelInfoComponent).af = function () {\n return this.modelRootUrl;\n };\n protoOf(ModelInfoComponent).bf = function () {\n return this.model;\n };\n protoOf(ModelInfoComponent).g1k = function () {\n return this.texture;\n };\n protoOf(ModelInfoComponent).x2h = function (modelRootUrl, model, texture) {\n return new ModelInfoComponent(modelRootUrl, model, texture);\n };\n protoOf(ModelInfoComponent).copy = function (modelRootUrl, model, texture, $super) {\n modelRootUrl = modelRootUrl === VOID ? this.modelRootUrl : modelRootUrl;\n model = model === VOID ? this.model : model;\n texture = texture === VOID ? this.texture : texture;\n return this.x2h(modelRootUrl, model, texture);\n };\n protoOf(ModelInfoComponent).toString = function () {\n return 'ModelInfoComponent(modelRootUrl=' + this.modelRootUrl + ', model=' + this.model + ', texture=' + this.texture + ')';\n };\n protoOf(ModelInfoComponent).hashCode = function () {\n var result = this.modelRootUrl == null ? 0 : getStringHashCode(this.modelRootUrl);\n result = imul(result, 31) + (this.model == null ? 0 : getStringHashCode(this.model)) | 0;\n result = imul(result, 31) + (this.texture == null ? 0 : getStringHashCode(this.texture)) | 0;\n return result;\n };\n protoOf(ModelInfoComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ModelInfoComponent))\n return false;\n var tmp0_other_with_cast = other instanceof ModelInfoComponent ? other : THROW_CCE();\n if (!(this.modelRootUrl == tmp0_other_with_cast.modelRootUrl))\n return false;\n if (!(this.model == tmp0_other_with_cast.model))\n return false;\n if (!(this.texture == tmp0_other_with_cast.texture))\n return false;\n return true;\n };\n function Companion_66() {\n Companion_instance_66 = this;\n this.ID = 'ModelLoaderSystem';\n this.y2h_1 = LoggerState_getInstance().m1m('ModelLoaderSystem');\n }\n protoOf(Companion_66).u1n = function () {\n return this.ID;\n };\n var Companion_instance_66;\n function Companion_getInstance_67() {\n if (Companion_instance_66 == null)\n new Companion_66();\n return Companion_instance_66;\n }\n function refreshModelsOnScene($this) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = $this.h2i_1.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.rendering.ModelLoaderSystem.refreshModelsOnScene.' call\n if (element.__getComponentForKotlin(13) == null)\n null;\n else {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.rendering.ModelLoaderSystem.refreshModelsOnScene..' call\n onModelInfoChanged($this, element);\n }\n }\n }\n function onModelInfoChanged($this, entity) {\n if (get_isInScene(entity)) {\n var oldViewerObject = entity.__getComponentForKotlin(Companion_instance_73.id);\n if (oldViewerObject == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n ModelUtils_getInstance().unloadModel(oldViewerObject.viewerObject, $this.i2i_1);\n }\n loadModel_0($this, entity);\n }\n }\n function loadModel_0($this, entity) {\n ModelUtils_getInstance().loadModelFromModelInfo(entity, $this.i2i_1);\n }\n function ModelLoaderSystem(entityManager, viewer) {\n Companion_getInstance_67();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [20];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = ['ViewerObjectVisibilitySystem', 'ViewerObjectTransformSystem'];\n SystemBase4.call(this, 'ModelLoaderSystem', 13, 5, 20, 123, tmp, null, tmp$ret$5);\n this.h2i_1 = entityManager;\n this.i2i_1 = viewer;\n }\n protoOf(ModelLoaderSystem).enable = function () {\n protoOf(SystemBase4).enable.call(this);\n refreshModelsOnScene(this);\n };\n protoOf(ModelLoaderSystem).onRegister = function () {\n protoOf(SystemBase4).onRegister.call(this);\n refreshModelsOnScene(this);\n };\n protoOf(ModelLoaderSystem).onAddComponent = function (entity, newComponent) {\n onModelInfoChanged(this, entity);\n };\n protoOf(ModelLoaderSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n if (!oldComponent.sameModel(newComponent) ? true : get_viewerObject(entity) == null) {\n onModelInfoChanged(this, entity);\n }\n };\n protoOf(ModelLoaderSystem).onRemoveComponent = function (entity, oldComponent) {\n };\n protoOf(ModelLoaderSystem).onAddComponent2 = function (entity, newComponent) {\n if (!entity.hasComponent(20)) {\n loadModel_0(this, entity);\n }\n };\n protoOf(ModelLoaderSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n };\n protoOf(ModelLoaderSystem).onRemoveComponent2 = function (entity, oldComponent) {\n };\n protoOf(ModelLoaderSystem).onAddComponent3 = function (entity, newComponent) {\n };\n protoOf(ModelLoaderSystem).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n };\n protoOf(ModelLoaderSystem).onRemoveComponent3 = function (entity, oldComponent) {\n var viewerObject = get_viewerObject(entity);\n if (viewerObject == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n ModelUtils_getInstance().unloadModel(viewerObject, this.i2i_1);\n }\n entity.removeComponent(Companion_instance_73.id);\n };\n protoOf(ModelLoaderSystem).onAddComponent4 = function (entity, newComponent) {\n var tmp;\n var tmp0_safe_receiver = newComponent.entity;\n var tmp_0;\n if (tmp0_safe_receiver == null) {\n tmp_0 = null;\n } else {\n tmp_0 = tmp0_safe_receiver.hasComponent(13);\n }\n var tmp1_elvis_lhs = tmp_0;\n if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {\n tmp = get_isInScene(entity);\n } else {\n tmp = false;\n }\n var shouldHaveComponent = tmp;\n var tmp2_safe_receiver = newComponent.entityStateBeforeLoadingSnapshot;\n var tmp_1;\n if (tmp2_safe_receiver == null) {\n tmp_1 = null;\n } else {\n tmp_1 = tmp2_safe_receiver.hasComponent(20);\n }\n var didHaveComponent = tmp_1 === true;\n var modelWasRemoved = didHaveComponent ? !shouldHaveComponent : false;\n var modelWasAdded = !didHaveComponent ? shouldHaveComponent : false;\n var modelKept = didHaveComponent ? shouldHaveComponent : false;\n if (modelWasRemoved) {\n var tmp3_safe_receiver = newComponent.entityStateBeforeLoadingSnapshot;\n var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.getComponent(Companion_instance_73.id);\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.rendering.ModelLoaderSystem.onAddComponent4.' call\n ModelUtils_getInstance().unloadModel(tmp4_safe_receiver.viewerObject, this.i2i_1);\n entity.removeComponent(20);\n }\n } else if (modelWasAdded) {\n loadModel_0(this, entity);\n } else if (modelKept) {\n var tmp5_safe_receiver = newComponent.entityStateBeforeLoadingSnapshot;\n var tmp_2;\n if (tmp5_safe_receiver == null) {\n tmp_2 = null;\n } else {\n tmp_2 = tmp5_safe_receiver.getComponent(20);\n }\n var tmp6_safe_receiver = tmp_2;\n if (tmp6_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.rendering.ModelLoaderSystem.onAddComponent4.' call\n entity.addComponentInternal(tmp6_safe_receiver);\n }\n var tmp7_safe_receiver = newComponent.entityStateBeforeLoadingSnapshot;\n var tmp8_safe_receiver = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.getComponent(Companion_instance_73.id);\n if (tmp8_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.rendering.ModelLoaderSystem.onAddComponent4.' call\n entity.addComponentInternal(tmp8_safe_receiver);\n }\n }\n };\n protoOf(ModelLoaderSystem).onUpdateComponent4 = function (entity, oldComponent, newComponent) {\n };\n protoOf(ModelLoaderSystem).onRemoveComponent4 = function (entity, oldComponent) {\n };\n function Companion_67() {\n }\n protoOf(Companion_67).s1k = function () {\n return 124;\n };\n var Companion_instance_67;\n function Companion_getInstance_68() {\n return Companion_instance_67;\n }\n function ModelTransformComponent(transform) {\n this.transform = transform;\n }\n protoOf(ModelTransformComponent).d1x = function () {\n return this.transform;\n };\n protoOf(ModelTransformComponent).x1k = function () {\n return Companion_instance_67.id;\n };\n protoOf(ModelTransformComponent).eq = function (other) {\n var tmp0_elvis_lhs = other instanceof ModelTransformComponent ? other : null;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var that = tmp;\n return that.transform.equals(this.transform);\n };\n function ModelUtils$loadModelFromModelInfo$lambda$lambda() {\n return 'Loading of model was completed after the entity was disposed or the viewer object was deleted.';\n }\n function ModelUtils$loadModelFromModelInfo$lambda($entity, $viewer) {\n return function (viewerObject) {\n var tmp;\n if (!$entity.isDisposed ? $viewer.existsModel(viewerObject.getViewerObjectId()) : false) {\n var modelComponent = $entity.__getComponentForKotlin(20);\n if (modelComponent == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.rendering.ModelUtils.loadModelFromModelInfo..' call\n $entity.addComponent(modelComponent.withFinishedLoading());\n }\n tmp = Unit_instance;\n } else {\n var tmp_0 = ModelUtils_getInstance().m2i_1;\n tmp_0.info(ModelUtils$loadModelFromModelInfo$lambda$lambda);\n tmp = Unit_instance;\n }\n return Unit_instance;\n };\n }\n function ModelUtils$loadModelFromModelInfo$o$lambda($entity) {\n return function () {\n return 'Failed to load model for ' + $entity + '. Listen to LoadedModelInfoComponent and check the hasFailedLoading property to handle this.';\n };\n }\n function ModelUtils$loadModelFromModelInfo$o($entity) {\n return function (_anonymous_parameter_0__qggqh8) {\n var tmp;\n if ($entity.isDisposed) {\n return Unit_instance;\n }\n var tmp_0 = ModelUtils_getInstance().m2i_1;\n tmp_0.warn(ModelUtils$loadModelFromModelInfo$o$lambda($entity));\n $entity.removeComponent(Companion_instance_73.id);\n var modelComponent = $entity.__getComponentForKotlin(20);\n if (modelComponent == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.rendering.ModelUtils.loadModelFromModelInfo..' call\n $entity.addComponent(modelComponent.withFailedLoading());\n }\n return Unit_instance;\n };\n }\n function ModelUtils$unloadModel$lambda($viewerObject) {\n return function () {\n return 'not removing model that does not exist ' + toString($viewerObject.getViewerObjectId());\n };\n }\n function ModelUtils$hide$lambda(it) {\n it.removeComponent(RenderedComponent_instance.id);\n return Unit_instance;\n }\n function ModelUtils$show$lambda(it) {\n it.addComponent(RenderedComponent_instance);\n return Unit_instance;\n }\n function ModelUtils() {\n ModelUtils_instance = this;\n this.m2i_1 = LoggerState_getInstance().m1m('ModelUtils');\n }\n protoOf(ModelUtils).loadModelFromModelInfo = function (entity, viewer) {\n var tmp0_elvis_lhs = entity.__getComponentForKotlin(13);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var modelInfo = tmp;\n var tmp1_safe_receiver = entity.__getComponentForKotlin(Companion_instance_67.id);\n var modelTransform = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.transform;\n var onModelLoaded = ModelUtils$loadModelFromModelInfo$lambda(entity, viewer);\n var onModelLoadFailed = ModelUtils$loadModelFromModelInfo$o(entity);\n var loadingBox = this.getLoadingBox(entity, modelTransform);\n var tmp2_elvis_lhs = modelInfo.modelUrl;\n var tmp_0 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;\n var tmp3_elvis_lhs = modelInfo.texture;\n var viewerObject = viewer.loadModel(entity, tmp_0, tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs, onModelLoaded, onModelLoadFailed, loadingBox.size.equals(Companion_getInstance_61().ZERO) ? null : loadingBox.size, loadingBox.size.equals(Companion_getInstance_61().ZERO) ? null : loadingBox.center);\n viewerObject.setCastShadows(true);\n if (get_isPropping(entity)) {\n viewerObject.setOutlined(false);\n viewerObject.setBlockOutlined(false);\n }\n if (modelTransform == null) {\n entity.addComponent(new LoadedModelInfoComponent(false));\n entity.addComponent(new ViewerObjectComponent(viewerObject));\n } else {\n entity.addComponent(new LoadedModelInfoComponent(false));\n var transformNode = this.adjustModelTransform(entity, viewer, viewerObject, modelTransform);\n entity.addComponent(new ViewerObjectComponent(transformNode));\n }\n };\n protoOf(ModelUtils).getLoadingBox = function (entity, modelTransform) {\n var tmp;\n if (get_isPropping(entity)) {\n tmp = Companion_getInstance_93().EMPTY_AABB;\n } else {\n var tmp0_safe_receiver = get_colliderShapeComponent(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.polyhedron;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.axisAlignedBoundingBox;\n tmp = tmp2_elvis_lhs == null ? Companion_getInstance_93().EMPTY_AABB : tmp2_elvis_lhs;\n }\n var aabb = tmp;\n if (modelTransform == null)\n return aabb;\n return modelTransform.applyInverse(aabb);\n };\n protoOf(ModelUtils).unloadModel = function (viewerObject, viewer) {\n if (viewer.existsModel(viewerObject.getViewerObjectId())) {\n viewerObject.deleteObject();\n } else {\n this.m2i_1.warn(ModelUtils$unloadModel$lambda(viewerObject));\n }\n };\n protoOf(ModelUtils).adjustModelTransform = function (entity, viewer, viewerObject, modelTransform) {\n // Inline function 'kotlin.also' call\n var this_0 = viewer.createEmpty(entity);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.rendering.ModelUtils.adjustModelTransform.' call\n modelTransform.applyTo(viewerObject);\n viewerObject.setParent(this_0);\n return this_0;\n };\n protoOf(ModelUtils).hide = function (entity, traverseHierarchy) {\n if (traverseHierarchy) {\n var tmp = HierarchyUtils_instance;\n tmp.forEachInHierarchy(entity, ModelUtils$hide$lambda);\n } else {\n entity.removeComponent(RenderedComponent_instance.id);\n }\n };\n protoOf(ModelUtils).show = function (entity, traverseHierarchy) {\n if (traverseHierarchy) {\n var tmp = HierarchyUtils_instance;\n tmp.forEachInHierarchy(entity, ModelUtils$show$lambda);\n } else {\n entity.addComponent(RenderedComponent_instance);\n }\n };\n var ModelUtils_instance;\n function ModelUtils_getInstance() {\n if (ModelUtils_instance == null)\n new ModelUtils();\n return ModelUtils_instance;\n }\n function Companion_68() {\n this.id = 57;\n }\n protoOf(Companion_68).s1k = function () {\n return this.id;\n };\n var Companion_instance_68;\n function Companion_getInstance_69() {\n return Companion_instance_68;\n }\n function OutlineableComponent() {\n }\n protoOf(OutlineableComponent).x1k = function () {\n return 57;\n };\n protoOf(OutlineableComponent).eq = function (other) {\n return true;\n };\n function get_hasPausedViewerUpdates(_this__u8e3s4) {\n var tmp0_safe_receiver = get_snapRoot(_this__u8e3s4);\n return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hasComponent(90)) === true;\n }\n function Companion_69() {\n this.n2i_1 = 90;\n }\n var Companion_instance_69;\n function Companion_getInstance_70() {\n return Companion_instance_69;\n }\n function PauseViewerUpdatesComponent() {\n }\n protoOf(PauseViewerUpdatesComponent).x1k = function () {\n return 90;\n };\n protoOf(PauseViewerUpdatesComponent).eq = function (other) {\n return true;\n };\n function resumeViewerUpdatesOnDraggedEntity(sceneManager) {\n var tmp = sceneManager.scene;\n var tmp0_safe_receiver = tmp.__getComponentForKotlin(66);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.entity;\n if (tmp1_safe_receiver == null)\n null;\n else {\n resumeViewerUpdates(tmp1_safe_receiver);\n }\n }\n function pauseViewerUpdatesOnDraggedEntity(sceneManager) {\n var tmp = sceneManager.scene;\n var tmp0_safe_receiver = tmp.__getComponentForKotlin(66);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.entity;\n if (tmp1_safe_receiver == null)\n null;\n else {\n pauseViewerUpdates(tmp1_safe_receiver);\n }\n }\n function resumeViewerUpdates(_this__u8e3s4) {\n var tmp0_safe_receiver = get_snapRoot(_this__u8e3s4);\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver.removeComponent(90);\n }\n function pauseViewerUpdates(_this__u8e3s4) {\n var tmp0_safe_receiver = get_snapRoot(_this__u8e3s4);\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver.addComponent(new PauseViewerUpdatesComponent());\n }\n function Companion_70() {\n this.ID = 'RenderSystem';\n }\n protoOf(Companion_70).u1n = function () {\n return this.ID;\n };\n var Companion_instance_70;\n function Companion_getInstance_71() {\n return Companion_instance_70;\n }\n function RenderSystem() {\n SystemBase.call(this, 'RenderSystem', 5);\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.w2i_1 = [9];\n }\n protoOf(RenderSystem).w1o = function () {\n return this.w2i_1;\n };\n protoOf(RenderSystem).onAddComponent = function (entity, newComponent) {\n if (!entity.hasComponent(RenderedComponent_instance.id)) {\n entity.addComponent(RenderedComponent_instance);\n var tmp0_safe_receiver = get_parentComponent(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.rendering.RenderSystem.onAddComponent.' call\n this.onAddComponent(element, newComponent);\n }\n }\n }\n };\n protoOf(RenderSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(RenderSystem).onRemoveComponent = function (entity, oldComponent) {\n entity.removeComponent(RenderedComponent_instance.id);\n var tmp0_safe_receiver = get_parentComponent(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.rendering.RenderSystem.onRemoveComponent.' call\n this.onRemoveComponent(element, oldComponent);\n }\n }\n };\n function RenderedComponent() {\n }\n protoOf(RenderedComponent).x1k = function () {\n return this.id;\n };\n protoOf(RenderedComponent).s1k = function () {\n return 9;\n };\n protoOf(RenderedComponent).eq = function (other) {\n return true;\n };\n var RenderedComponent_instance;\n function RenderedComponent_getInstance() {\n return RenderedComponent_instance;\n }\n function Viewer() {\n }\n function Companion_71() {\n this.ID = 82;\n }\n protoOf(Companion_71).u1n = function () {\n return this.ID;\n };\n var Companion_instance_71;\n function Companion_getInstance_72() {\n return Companion_instance_71;\n }\n function ViewerComponent(viewer) {\n this.viewer = viewer;\n this.k2j_1 = 82;\n }\n protoOf(ViewerComponent).l2j = function () {\n return this.viewer;\n };\n protoOf(ViewerComponent).x1k = function () {\n return this.k2j_1;\n };\n protoOf(ViewerComponent).eq = function (other) {\n var tmp;\n if (other instanceof ViewerComponent) {\n tmp = equals(this.viewer, other.viewer);\n } else {\n tmp = false;\n }\n return tmp;\n };\n function Companion_72() {\n this.id = 93;\n }\n protoOf(Companion_72).s1k = function () {\n return this.id;\n };\n var Companion_instance_72;\n function Companion_getInstance_73() {\n return Companion_instance_72;\n }\n function ViewerLineIdsComponent(lineIds) {\n this.lineIds = lineIds;\n this.m2j_1 = false;\n }\n protoOf(ViewerLineIdsComponent).n2j = function () {\n return this.lineIds;\n };\n protoOf(ViewerLineIdsComponent).x1k = function () {\n return 93;\n };\n protoOf(ViewerLineIdsComponent).eq = function (other) {\n return contentDeepEquals(this.lineIds, (other instanceof ViewerLineIdsComponent ? other : THROW_CCE()).lineIds);\n };\n protoOf(ViewerLineIdsComponent).a1l = function () {\n return this.m2j_1;\n };\n function ViewerObject() {\n }\n function Companion_73() {\n }\n protoOf(Companion_73).s1k = function () {\n return 35;\n };\n var Companion_instance_73;\n function Companion_getInstance_74() {\n return Companion_instance_73;\n }\n function ViewerObjectComponent(viewerObject) {\n this.viewerObject = viewerObject;\n this.j2i_1 = false;\n }\n protoOf(ViewerObjectComponent).p2j = function () {\n return this.viewerObject;\n };\n protoOf(ViewerObjectComponent).x1k = function () {\n return Companion_instance_73.id;\n };\n protoOf(ViewerObjectComponent).eq = function (other) {\n return equals((other instanceof ViewerObjectComponent ? other : THROW_CCE()).viewerObject, this.viewerObject);\n };\n protoOf(ViewerObjectComponent).a1l = function () {\n return this.j2i_1;\n };\n protoOf(ViewerObjectComponent).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof ViewerObjectComponent))\n THROW_CCE();\n return equals(this.viewerObject.getViewerObjectId(), other.viewerObject.getViewerObjectId());\n };\n protoOf(ViewerObjectComponent).hashCode = function () {\n return hashCode(this.viewerObject.getViewerObjectId());\n };\n protoOf(ViewerObjectComponent).af = function () {\n return this.viewerObject;\n };\n protoOf(ViewerObjectComponent).q2j = function (viewerObject) {\n return new ViewerObjectComponent(viewerObject);\n };\n protoOf(ViewerObjectComponent).copy = function (viewerObject, $super) {\n viewerObject = viewerObject === VOID ? this.viewerObject : viewerObject;\n return this.q2j(viewerObject);\n };\n protoOf(ViewerObjectComponent).toString = function () {\n return 'ViewerObjectComponent(viewerObject=' + this.viewerObject + ')';\n };\n function get_viewerObject(_this__u8e3s4) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(Companion_instance_73.id);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.viewerObject;\n }\n function updateViewerObjectTransform($this, entity) {\n var tmp0_elvis_lhs = get_viewerObject(entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var viewerObject = tmp;\n updateViewerObjectTransform_0($this, viewerObject, entity);\n }\n function updateViewerObjectTransform_0($this, viewerObject, entity) {\n viewerObject.setPosition(get_worldPosition(entity));\n viewerObject.setRotation(get_worldRotation(entity));\n }\n function ViewerObjectTransformSystem() {\n var tmp = Companion_instance_73.id;\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n SystemBase4.call(this, 'ViewerObjectTransformSystem', 10, tmp, 45, 123, tmp$ret$0, null, null);\n }\n protoOf(ViewerObjectTransformSystem).onAddComponent = function (entity, newComponent) {\n if (get_hasPausedViewerUpdates(entity))\n return Unit_instance;\n updateViewerObjectTransform(this, entity);\n };\n protoOf(ViewerObjectTransformSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n if (get_hasPausedViewerUpdates(entity))\n return Unit_instance;\n updateViewerObjectTransform(this, entity);\n };\n protoOf(ViewerObjectTransformSystem).onRemoveComponent = function (entity, oldComponent) {\n };\n protoOf(ViewerObjectTransformSystem).onAddComponent2 = function (entity, newComponent) {\n var viewerObject = newComponent.viewerObject;\n updateViewerObjectTransform_0(this, viewerObject, entity);\n };\n protoOf(ViewerObjectTransformSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n var viewerObject = newComponent.viewerObject;\n updateViewerObjectTransform_0(this, viewerObject, entity);\n };\n protoOf(ViewerObjectTransformSystem).onRemoveComponent2 = function (entity, oldComponent) {\n };\n protoOf(ViewerObjectTransformSystem).onAddComponent3 = function (entity, newComponent) {\n };\n protoOf(ViewerObjectTransformSystem).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n };\n protoOf(ViewerObjectTransformSystem).onRemoveComponent3 = function (entity, oldComponent) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_snapRootSubTree(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.rendering.ViewerObjectTransformSystem.onRemoveComponent3.' call\n updateViewerObjectTransform(this, element);\n }\n };\n protoOf(ViewerObjectTransformSystem).onAddComponent4 = function (entity, newComponent) {\n var tmp0_elvis_lhs = newComponent.entity;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var newEntity = tmp;\n updateViewerObjectTransform(this, newEntity);\n };\n protoOf(ViewerObjectTransformSystem).onUpdateComponent4 = function (entity, oldComponent, newComponent) {\n };\n protoOf(ViewerObjectTransformSystem).onRemoveComponent4 = function (entity, oldComponent) {\n };\n function setVisibilityOfObject($this, entity, viewerObjectComponent) {\n if (entity.hasComponent(9)) {\n viewerObjectComponent.viewerObject.setVisible(true);\n } else {\n viewerObjectComponent.viewerObject.setVisible(false);\n }\n }\n function ViewerObjectVisibilitySystem() {\n // Inline function 'kotlin.emptyArray' call\n var tmp = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = ['RenderSystem'];\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$4 = [];\n SystemBase3.call(this, 'ViewerObjectVisibilitySystem', 9, 35, 123, tmp, tmp_0, tmp$ret$4);\n }\n protoOf(ViewerObjectVisibilitySystem).onAddComponent = function (entity, newComponent) {\n var tmp0_safe_receiver = get_viewerObject(entity);\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver.setVisible(true);\n };\n protoOf(ViewerObjectVisibilitySystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(ViewerObjectVisibilitySystem).onRemoveComponent = function (entity, oldComponent) {\n var tmp0_safe_receiver = get_viewerObject(entity);\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver.setVisible(false);\n };\n protoOf(ViewerObjectVisibilitySystem).onAddComponent2 = function (entity, newComponent) {\n setVisibilityOfObject(this, entity, newComponent);\n };\n protoOf(ViewerObjectVisibilitySystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n setVisibilityOfObject(this, entity, newComponent);\n };\n protoOf(ViewerObjectVisibilitySystem).onRemoveComponent2 = function (entity, oldComponent) {\n };\n protoOf(ViewerObjectVisibilitySystem).onAddComponent3 = function (entity, newComponent) {\n var tmp0_elvis_lhs = newComponent.entity;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var newEntity = tmp;\n var tmp1_safe_receiver = newEntity.__getComponentForKotlin(Companion_instance_73.id);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n setVisibilityOfObject(this, newEntity, tmp1_safe_receiver);\n }\n };\n protoOf(ViewerObjectVisibilitySystem).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n };\n protoOf(ViewerObjectVisibilitySystem).onRemoveComponent3 = function (entity, oldComponent) {\n };\n function registerAll($this, newViewer) {\n var modelLoaderSystem = new ModelLoaderSystem($this.z2j_1, newViewer);\n $this.z2j_1.registerSystem(modelLoaderSystem);\n $this.b2k_1 = modelLoaderSystem;\n }\n function unregisterAll($this) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = $this.z2j_1.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.rendering.ViewerPresenceSystem.unregisterAll.' call\n $this.z2j_1.removeComponent(element, 20);\n }\n var tmp0_safe_receiver = $this.b2k_1;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.disable();\n }\n var tmp1_safe_receiver = $this.b2k_1;\n if (tmp1_safe_receiver == null)\n null;\n else {\n tmp1_safe_receiver.unregister($this.z2j_1);\n }\n }\n function ViewerPresenceSystem(entityManager) {\n SystemBase.call(this, 'ViewerPresenceSystem', 82);\n this.z2j_1 = entityManager;\n var tmp = this;\n // Inline function 'kotlin.emptyArray' call\n tmp.a2k_1 = [];\n this.b2k_1 = null;\n }\n protoOf(ViewerPresenceSystem).w1o = function () {\n return this.a2k_1;\n };\n protoOf(ViewerPresenceSystem).onAddComponent = function (entity, newComponent) {\n registerAll(this, newComponent.viewer);\n };\n protoOf(ViewerPresenceSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n unregisterAll(this);\n registerAll(this, newComponent.viewer);\n };\n protoOf(ViewerPresenceSystem).onRemoveComponent = function (entity, oldComponent) {\n unregisterAll(this);\n };\n function ViewerMock$triggerModelLoaded$lambda() {\n return Unit_instance;\n }\n function ViewerMock$triggerModelLoadFailed$lambda() {\n return Unit_instance;\n }\n function ViewerMock$loadModel$lambda(this$0, $url) {\n return function () {\n var oldVal = this$0.loadedModelCount.b3($url);\n var tmp;\n if (!(oldVal == null)) {\n var tmp_0;\n if (oldVal === 1) {\n this$0.loadedModelCount.v2($url);\n tmp_0 = Unit_instance;\n } else {\n var this_0 = this$0.loadedModelCount;\n var key = $url;\n var value = oldVal - 1 | 0;\n this_0.r2(key, value);\n tmp_0 = Unit_instance;\n }\n tmp = tmp_0;\n }\n return Unit_instance;\n };\n }\n function ViewerMock$loadModel$lambda_0($modelLoaded, $viewerObjectMock) {\n return function () {\n var tmp0_safe_receiver = $modelLoaded;\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver($viewerObjectMock);\n return Unit_instance;\n };\n }\n function ViewerMock$loadModel$lambda_1($modelLoadFailed, $viewerObjectMock) {\n return function () {\n var tmp0_safe_receiver = $modelLoadFailed;\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver($viewerObjectMock);\n return Unit_instance;\n };\n }\n function ViewerMock() {\n var tmp = this;\n tmp.triggerModelLoaded = ViewerMock$triggerModelLoaded$lambda;\n var tmp_0 = this;\n tmp_0.triggerModelLoadFailed = ViewerMock$triggerModelLoadFailed$lambda;\n var tmp_1 = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp_1.loadedModelCount = LinkedHashMap_init_$Create$_0();\n var tmp_2 = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp_2.allViewerObjects = ArrayList_init_$Create$();\n }\n protoOf(ViewerMock).c2k = function (_set____db54di) {\n this.triggerModelLoaded = _set____db54di;\n };\n protoOf(ViewerMock).d2k = function () {\n return this.triggerModelLoaded;\n };\n protoOf(ViewerMock).e2k = function (_set____db54di) {\n this.triggerModelLoadFailed = _set____db54di;\n };\n protoOf(ViewerMock).f2k = function () {\n return this.triggerModelLoadFailed;\n };\n protoOf(ViewerMock).g2k = function () {\n return this.loadedModelCount;\n };\n protoOf(ViewerMock).h2k = function () {\n return this.allViewerObjects;\n };\n protoOf(ViewerMock).g2j = function (entity, url, textureFile, modelLoaded, modelLoadFailed, loadingBoxSize, loadingBoxCenter) {\n var viewerObjectMock = new ViewerObjectMock(this, ViewerMock$loadModel$lambda(this, url));\n // Inline function 'kotlin.collections.getOrElse' call\n var tmp0_elvis_lhs = this.loadedModelCount.b3(url);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'com.ikea.core.rendering.mock.ViewerMock.loadModel.' call\n tmp = 0;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var oldVal = tmp;\n // Inline function 'kotlin.collections.set' call\n var this_0 = this.loadedModelCount;\n var value = oldVal + 1 | 0;\n this_0.r2(url, value);\n var tmp_0 = this;\n tmp_0.triggerModelLoaded = ViewerMock$loadModel$lambda_0(modelLoaded, viewerObjectMock);\n var tmp_1 = this;\n tmp_1.triggerModelLoadFailed = ViewerMock$loadModel$lambda_1(modelLoadFailed, viewerObjectMock);\n return viewerObjectMock;\n };\n protoOf(ViewerMock).existsModel = function (objId) {\n return true;\n };\n protoOf(ViewerMock).i2j = function (entity) {\n return new ViewerObjectMock(this);\n };\n protoOf(ViewerMock).x2i = function (radius, entity) {\n return new ViewerObjectMock(this);\n };\n protoOf(ViewerMock).y2i = function (vo, entity) {\n return new ViewerObjectMock(this);\n };\n protoOf(ViewerMock).z2i = function (width, height, depth, entity) {\n return new ViewerObjectMock(this);\n };\n protoOf(ViewerMock).b2j = function (vertices, normal, entity) {\n return new ViewerObjectMock(this);\n };\n protoOf(ViewerMock).a2j = function (width, depth, entity) {\n return new ViewerObjectMock(this);\n };\n protoOf(ViewerMock).c2j = function (meshes, entity) {\n var parent = new ViewerObjectMock(this);\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = meshes.length;\n while (inductionVariable < last) {\n var element = meshes[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.rendering.mock.ViewerMock.groupMeshes.' call\n element.setParent(parent);\n }\n return parent;\n };\n protoOf(ViewerMock).createOpenBox = function (size, margin) {\n return new ViewerObjectMock(this);\n };\n protoOf(ViewerMock).resize = function () {\n };\n protoOf(ViewerMock).h2j = function (enable) {\n };\n protoOf(ViewerMock).i2k = function (modelUrl, modelLoaded, r, g, b, alpha, loadingBoxSize) {\n get_nothing();\n };\n protoOf(ViewerMock).j2j = function (modelUrl, modelLoaded, r, g, b, alpha, loadingBoxSize) {\n return this.i2k(modelUrl, modelLoaded, r, g, b, alpha, loadingBoxSize);\n };\n protoOf(ViewerMock).raycast = function (x, y) {\n get_nothing();\n };\n protoOf(ViewerMock).worldCoordToCanvas = function (x, y, z) {\n get_nothing();\n };\n protoOf(ViewerMock).d2j = function (start, end, color, thickness) {\n get_nothing();\n };\n protoOf(ViewerMock).e2j = function (start, end, color, thickness) {\n get_nothing();\n };\n protoOf(ViewerMock).j2k = function (id, start, end, color, thickness) {\n get_nothing();\n };\n protoOf(ViewerMock).f2j = function (id, start, end, color, thickness) {\n return this.j2k(id, start, end, color, thickness);\n };\n protoOf(ViewerMock).removeUiLine = function (id) {\n get_nothing();\n };\n protoOf(ViewerMock).uiLineExists = function (id) {\n get_nothing();\n };\n function Companion_74() {\n Companion_instance_74 = this;\n this.DEFAULT_CAMERA_POSITION = __VectorIntConstructorKotlin(0, 1000, 10000);\n this.DEFAULT_CAMERA_PLANE_NORMAL = __VectorIntConstructorKotlin(0, 0, 1);\n }\n protoOf(Companion_74).k2k = function () {\n return this.DEFAULT_CAMERA_POSITION;\n };\n protoOf(Companion_74).l2k = function () {\n return this.DEFAULT_CAMERA_PLANE_NORMAL;\n };\n var Companion_instance_74;\n function Companion_getInstance_75() {\n if (Companion_instance_74 == null)\n new Companion_74();\n return Companion_instance_74;\n }\n function MockDragGenerator(draggingPlane) {\n Companion_getInstance_75();\n this.draggingPlane = draggingPlane;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp.onDragStartObservables = ArrayList_init_$Create$();\n var tmp_0 = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp_0.onDragObservables = ArrayList_init_$Create$();\n var tmp_1 = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp_1.onDragEndObservables = ArrayList_init_$Create$();\n }\n protoOf(MockDragGenerator).m2k = function () {\n return this.draggingPlane;\n };\n protoOf(MockDragGenerator).n2k = function () {\n return this.onDragStartObservables;\n };\n protoOf(MockDragGenerator).o2k = function () {\n return this.onDragObservables;\n };\n protoOf(MockDragGenerator).p2k = function () {\n return this.onDragEndObservables;\n };\n protoOf(MockDragGenerator).onDragStartObservable = function (a) {\n // Inline function 'kotlin.collections.plusAssign' call\n this.onDragStartObservables.q(a);\n };\n protoOf(MockDragGenerator).onDragObservable = function (a) {\n // Inline function 'kotlin.collections.plusAssign' call\n this.onDragObservables.q(a);\n };\n protoOf(MockDragGenerator).onDragEndObservable = function (a) {\n // Inline function 'kotlin.collections.plusAssign' call\n this.onDragEndObservables.q(a);\n };\n protoOf(MockDragGenerator).drag = function (from, to) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.onDragStartObservables.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.rendering.mock.MockDragGenerator.drag.' call\n element(new ViewerDragEventComponent(from, this.draggingPlane, get_zero(), Companion_getInstance_75().DEFAULT_CAMERA_POSITION));\n }\n var distance = to.minus(from);\n var count = 3;\n var step = distance.size / count;\n var inductionVariable = 0;\n if (inductionVariable <= count)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var delta = distance.normalize().times(step).times(i);\n var point = from.plus(delta);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = this.onDragObservables.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.rendering.mock.MockDragGenerator.drag.' call\n element_0(new ViewerDragEventComponent(point, this.draggingPlane, delta, Companion_getInstance_75().DEFAULT_CAMERA_POSITION));\n }\n }\n while (!(i === count));\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_1 = this.onDragEndObservables.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.rendering.mock.MockDragGenerator.drag.' call\n element_1(new ViewerDragEventComponent(to, this.draggingPlane, get_zero(), Companion_getInstance_75().DEFAULT_CAMERA_POSITION));\n }\n };\n function throwErrorIfDeleted($this) {\n if ($this.isDeleted) {\n // Inline function 'kotlin.error' call\n var message = 'Error: No entry with id: ' + $this.r2k_1 + '. Trying to access deleted viewer object';\n throw IllegalStateException_init_$Create$(toString(message));\n }\n }\n function Companion_75() {\n this.nextId = 0;\n }\n protoOf(Companion_75).y2k = function (_set____db54di) {\n this.nextId = _set____db54di;\n };\n protoOf(Companion_75).z2k = function () {\n return this.nextId;\n };\n var Companion_instance_75;\n function Companion_getInstance_76() {\n return Companion_instance_75;\n }\n function ViewerObjectMock(viewerMock, unloadCallback) {\n viewerMock = viewerMock === VOID ? null : viewerMock;\n unloadCallback = unloadCallback === VOID ? null : unloadCallback;\n this.viewerMock = viewerMock;\n this.unloadCallback = unloadCallback;\n this.q2k_1 = false;\n this.r2k_1 = Companion_instance_75.nextId;\n this.isDeleted = false;\n this.enabledOutlined = false;\n this.enabledBlockOutlined = false;\n this.setCastShadowCalls = 0;\n this.s2k_1 = false;\n this.t2k_1 = new Vector(0.0, 0.0, -1.0);\n this.mockDragGenerator = new MockDragGenerator(this.t2k_1);\n this.u2k_1 = Companion_getInstance_61().ZERO;\n this.v2k_1 = Companion_getInstance_57().IDENTITY;\n this.w2k_1 = Companion_getInstance_61().ONE;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp.x2k_1 = ArrayList_init_$Create$();\n Companion_instance_75.nextId = Companion_instance_75.nextId + 1 | 0;\n var tmp1_safe_receiver = this.viewerMock;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.allViewerObjects;\n if (tmp2_safe_receiver == null)\n null;\n else\n tmp2_safe_receiver.q(this);\n }\n protoOf(ViewerObjectMock).a2l = function () {\n return this.viewerMock;\n };\n protoOf(ViewerObjectMock).b2l = function () {\n return this.unloadCallback;\n };\n protoOf(ViewerObjectMock).c2l = function (_set____db54di) {\n this.isDeleted = _set____db54di;\n };\n protoOf(ViewerObjectMock).d2l = function () {\n return this.isDeleted;\n };\n protoOf(ViewerObjectMock).e2l = function (_set____db54di) {\n this.enabledOutlined = _set____db54di;\n };\n protoOf(ViewerObjectMock).f2l = function () {\n return this.enabledOutlined;\n };\n protoOf(ViewerObjectMock).g2l = function (_set____db54di) {\n this.enabledBlockOutlined = _set____db54di;\n };\n protoOf(ViewerObjectMock).h2l = function () {\n return this.enabledBlockOutlined;\n };\n protoOf(ViewerObjectMock).i2l = function (_set____db54di) {\n this.setCastShadowCalls = _set____db54di;\n };\n protoOf(ViewerObjectMock).j2l = function () {\n return this.setCastShadowCalls;\n };\n protoOf(ViewerObjectMock).k2l = function () {\n return this.s2k_1;\n };\n protoOf(ViewerObjectMock).l2l = function (_set____db54di) {\n this.mockDragGenerator = _set____db54di;\n };\n protoOf(ViewerObjectMock).m2l = function () {\n return this.mockDragGenerator;\n };\n protoOf(ViewerObjectMock).getEntity = function () {\n return null;\n };\n protoOf(ViewerObjectMock).getViewerObjectId = function () {\n return this.r2k_1;\n };\n protoOf(ViewerObjectMock).setVisible = function (visible) {\n throwErrorIfDeleted(this);\n this.s2k_1 = visible;\n return this;\n };\n protoOf(ViewerObjectMock).getVisible = function () {\n throwErrorIfDeleted(this);\n return this.s2k_1;\n };\n protoOf(ViewerObjectMock).setEnabled = function (enabled) {\n throwErrorIfDeleted(this);\n };\n protoOf(ViewerObjectMock).isEnabled = function () {\n throwErrorIfDeleted(this);\n return true;\n };\n protoOf(ViewerObjectMock).deleteObject = function () {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.x2k_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.rendering.mock.ViewerObjectMock.deleteObject.' call\n element.deleteObject();\n }\n var tmp0_safe_receiver = this.unloadCallback;\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver();\n this.isDeleted = true;\n var tmp1_safe_receiver = this.viewerMock;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.allViewerObjects;\n if (tmp2_safe_receiver == null)\n null;\n else\n tmp2_safe_receiver.r(this);\n };\n protoOf(ViewerObjectMock).registerInputEvents = function () {\n throwErrorIfDeleted(this);\n this.q2k_1 = true;\n };\n protoOf(ViewerObjectMock).unregisterInputEvents = function () {\n throwErrorIfDeleted(this);\n this.q2k_1 = false;\n };\n protoOf(ViewerObjectMock).o2j = function () {\n return this.q2k_1;\n };\n protoOf(ViewerObjectMock).makeClickable = function (onClick) {\n throwErrorIfDeleted(this);\n };\n protoOf(ViewerObjectMock).setPositionPrimitive = function (x, y, z) {\n throwErrorIfDeleted(this);\n this.u2k_1 = new Vector(x, y, z);\n return this;\n };\n protoOf(ViewerObjectMock).getPosition = function () {\n throwErrorIfDeleted(this);\n return this.u2k_1;\n };\n protoOf(ViewerObjectMock).setRotation = function (q) {\n throwErrorIfDeleted(this);\n this.v2k_1 = q;\n return this;\n };\n protoOf(ViewerObjectMock).getRotation = function () {\n throwErrorIfDeleted(this);\n return this.v2k_1;\n };\n protoOf(ViewerObjectMock).setRotationEulerAngleDegrees = function (v) {\n throwErrorIfDeleted(this);\n this.v2k_1 = Companion_getInstance_57().fromEulerDegreesVector(v);\n return this;\n };\n protoOf(ViewerObjectMock).setRotationEulerAngleRadians = function (v) {\n throwErrorIfDeleted(this);\n this.v2k_1 = Companion_getInstance_57().fromEuler(new Radians(v.X), new Radians(v.Y), new Radians(v.Z));\n return this;\n };\n protoOf(ViewerObjectMock).setScaleV = function (v) {\n throwErrorIfDeleted(this);\n this.w2k_1 = v;\n return this;\n };\n protoOf(ViewerObjectMock).setScale = function (x, y, z) {\n throwErrorIfDeleted(this);\n return this.setScaleV(new Vector(x, y, z));\n };\n protoOf(ViewerObjectMock).getScale = function () {\n throwErrorIfDeleted(this);\n return this.w2k_1;\n };\n protoOf(ViewerObjectMock).setOutlined = function (outlined) {\n throwErrorIfDeleted(this);\n this.enabledOutlined = outlined;\n return this;\n };\n protoOf(ViewerObjectMock).setBlockOutlined = function (blockOutlined) {\n throwErrorIfDeleted(this);\n this.enabledBlockOutlined = blockOutlined;\n return this;\n };\n protoOf(ViewerObjectMock).setCastShadows = function (castShadows) {\n throwErrorIfDeleted(this);\n this.setCastShadowCalls = this.setCastShadowCalls + 1 | 0;\n return this;\n };\n protoOf(ViewerObjectMock).setReceiveShadows = function (receiveShadows) {\n throwErrorIfDeleted(this);\n return this;\n };\n protoOf(ViewerObjectMock).setBaseColor = function (r, g, b) {\n throwErrorIfDeleted(this);\n return this;\n };\n protoOf(ViewerObjectMock).setTransparency = function (alpha) {\n throwErrorIfDeleted(this);\n return this;\n };\n protoOf(ViewerObjectMock).setParent = function (parentMesh) {\n throwErrorIfDeleted(this);\n (parentMesh instanceof ViewerObjectMock ? parentMesh : THROW_CCE()).x2k_1.q(this);\n return this;\n };\n protoOf(ViewerObjectMock).setOutlinedObjectColor = function (r, g, b) {\n throwErrorIfDeleted(this);\n return this;\n };\n protoOf(ViewerObjectMock).removeOutlinedObjectColor = function () {\n throwErrorIfDeleted(this);\n return this;\n };\n function EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda($oldEntity) {\n return function (it) {\n return hierarchyContains($oldEntity, it.hostConnectorEntity);\n };\n }\n function EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_0($oldEntity) {\n return function (it) {\n return !hierarchyContains($oldEntity, it.guestConnectorEntity);\n };\n }\n function EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_1(it) {\n return it.guestConnectionRoot;\n }\n function EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_2($oldEntity, $newEntity) {\n return function (guestConnectionRoot) {\n var tmp0_safe_receiver = get_snapRoot(guestConnectionRoot);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_highestPriorityConnection(tmp0_safe_receiver);\n var host = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.hostConnectorEntity;\n var tmp;\n if (equals(host == null ? null : get_connectionRootEntity(host), $oldEntity)) {\n tmp = new Pair(guestConnectionRoot, $newEntity);\n } else {\n tmp = new Pair(guestConnectionRoot, host);\n }\n return tmp;\n };\n }\n function EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_3($oldEntity) {\n return function (_name_for_destructuring_parameter_0__wldtmu) {\n var host = _name_for_destructuring_parameter_0__wldtmu.bf();\n return !equals(host, $oldEntity);\n };\n }\n function EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_4($validationService) {\n return function (_name_for_destructuring_parameter_0__wldtmu) {\n var connectionRoot = _name_for_destructuring_parameter_0__wldtmu.af();\n var host = _name_for_destructuring_parameter_0__wldtmu.bf();\n var tmp0_safe_receiver = get_snapRoot(connectionRoot);\n var oldConnection = tmp0_safe_receiver == null ? null : get_highestPriorityConnection(tmp0_safe_receiver);\n return new EntityReplaceHelper(connectionRoot, oldConnection, host, $validationService, 0.0);\n };\n }\n function EntityReplaceHelper_init_$Init$(entity, host, validationService, allowedMovementsOfChildrenInMilliMeter, snapSelectStrategy, $this) {\n var tmp;\n if (allowedMovementsOfChildrenInMilliMeter === VOID) {\n tmp = 1.7976931348623157E308;\n } else {\n tmp = allowedMovementsOfChildrenInMilliMeter;\n }\n allowedMovementsOfChildrenInMilliMeter = tmp;\n snapSelectStrategy = snapSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE : snapSelectStrategy;\n EntityReplaceHelper.call($this, entity, get_highestPriorityConnection(entity), host, validationService, allowedMovementsOfChildrenInMilliMeter, snapSelectStrategy);\n return $this;\n }\n function EntityReplaceHelper_init_$Create$(entity, host, validationService, allowedMovementsOfChildrenInMilliMeter, snapSelectStrategy) {\n return EntityReplaceHelper_init_$Init$(entity, host, validationService, allowedMovementsOfChildrenInMilliMeter, snapSelectStrategy, objectCreate(protoOf(EntityReplaceHelper)));\n }\n function snap($this, host) {\n var tmp0_elvis_lhs = get_snapRoot($this.f1j_1);\n var entityRoot = tmp0_elvis_lhs == null ? $this.f1j_1 : tmp0_elvis_lhs;\n var tmp1_safe_receiver = tryCreateCandidateToExactlyTheSameConnectors($this, entityRoot, host);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n if (isCandidateValid($this, tmp1_safe_receiver)) {\n tmp1_safe_receiver.createAction().perform();\n return Unit_instance;\n }\n }\n var epsilon = 1.0E-4;\n var settings = new SnapSettings(true, false, true, true);\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = $this.k1j_1.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidates(entityRoot, host, settings));\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.replace.EntityReplaceHelper.snap.' call\n if (element.movement.size <= $this.j1j_1 + epsilon) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.replace.EntityReplaceHelper.snap.' call\n if (isCandidateValid($this, element_0)) {\n destination_0.q(element_0);\n }\n }\n var candidates = destination_0;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = candidates.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.replace.EntityReplaceHelper.snap.' call\n if (element_1.hostConnector.key === $this.m1j_1) {\n destination_1.q(element_1);\n }\n }\n var candidateWithSameHostConnector = destination_1;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$11;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator_1 = candidateWithSameHostConnector.t();\n while (tmp0_iterator_1.u()) {\n var element_2 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.replace.EntityReplaceHelper.snap.' call\n if (element_2.guestConnector.key === $this.n1j_1) {\n tmp$ret$11 = element_2;\n break $l$block;\n }\n }\n tmp$ret$11 = null;\n }\n var candidatesWithSameGuestConnector = tmp$ret$11;\n var tmp3_elvis_lhs = candidatesWithSameGuestConnector == null ? firstOrNull_1(candidateWithSameHostConnector) : candidatesWithSameGuestConnector;\n var candidate = tmp3_elvis_lhs == null ? firstOrNull_1(candidates) : tmp3_elvis_lhs;\n var tmp5_safe_receiver = candidate == null ? null : candidate.createAction();\n if (tmp5_safe_receiver == null)\n null;\n else {\n tmp5_safe_receiver.perform();\n }\n }\n function tryCreateCandidateToExactlyTheSameConnectors($this, guest, host) {\n if (!($this.g1j_1 == null) ? !(host == null) : false) {\n var sameHostConnector = findSameHostConnector($this, host);\n var sameGuestConnector = findSameGuestConnector($this, guest);\n if ((!(sameHostConnector == null) ? !(sameGuestConnector == null) : false) ? sameGuestConnector.hasMatchingTags(sameHostConnector) : false) {\n return SnapUtils_instance.createSnapCandidate(guest, sameGuestConnector, host, sameHostConnector);\n }\n }\n return null;\n }\n function findSameHostConnector($this, host) {\n var tmp0_safe_receiver = get_connectorsComponent(host);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectors;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = tmp1_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.replace.EntityReplaceHelper.findSameHostConnector.' call\n if (element.key === $this.m1j_1) {\n return element;\n } else {\n if (element instanceof PointSeriesConnector) {\n // Inline function 'kotlin.sequences.find' call\n var this_0 = element.allSubConnectors;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.sequences.firstOrNull' call\n var tmp0_iterator_0 = this_0.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.replace.EntityReplaceHelper.findSameHostConnector..' call\n if (element_0.key === $this.m1j_1) {\n tmp$ret$1 = element_0;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var foundSubConnector = tmp$ret$1;\n if (!(foundSubConnector == null))\n return foundSubConnector;\n }\n }\n }\n }\n return null;\n }\n function findSameGuestConnector($this, guest) {\n var tmp0_safe_receiver = get_connectorsComponent(guest);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = tmp1_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.replace.EntityReplaceHelper.findSameGuestConnector.' call\n if (element.key === $this.n1j_1) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp = tmp$ret$1;\n }\n return tmp;\n }\n function isCandidateValid($this, candidate) {\n var tmp0_safe_receiver = $this.i1j_1;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.validateSnap(candidate);\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.replace.EntityReplaceHelper.isCandidateValid.' call\n if (element.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n tmp = tmp$ret$1;\n }\n var tmp2_elvis_lhs = tmp;\n var isValid = tmp2_elvis_lhs == null ? true : tmp2_elvis_lhs;\n return isValid;\n }\n function Companion_76() {\n }\n protoOf(Companion_76).x1l = function (oldEntity, newEntity, validationService) {\n var tmp0_safe_receiver = get_connectionRootEntity(oldEntity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_hostedConnections(tmp0_safe_receiver);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : asSequence_0(tmp1_safe_receiver);\n var tmp;\n if (tmp2_safe_receiver == null) {\n tmp = null;\n } else {\n tmp = filter(tmp2_safe_receiver, EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda(oldEntity));\n }\n var tmp3_safe_receiver = tmp;\n var tmp_0;\n if (tmp3_safe_receiver == null) {\n tmp_0 = null;\n } else {\n tmp_0 = filter(tmp3_safe_receiver, EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_0(oldEntity));\n }\n var tmp4_safe_receiver = tmp_0;\n var tmp_1;\n if (tmp4_safe_receiver == null) {\n tmp_1 = null;\n } else {\n tmp_1 = map(tmp4_safe_receiver, EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_1);\n }\n var tmp5_safe_receiver = tmp_1;\n var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : distinct_0(tmp5_safe_receiver);\n var tmp_2;\n if (tmp6_safe_receiver == null) {\n tmp_2 = null;\n } else {\n tmp_2 = map(tmp6_safe_receiver, EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_2(oldEntity, newEntity));\n }\n var tmp7_safe_receiver = tmp_2;\n var tmp_3;\n if (tmp7_safe_receiver == null) {\n tmp_3 = null;\n } else {\n tmp_3 = filter(tmp7_safe_receiver, EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_3(oldEntity));\n }\n var tmp8_safe_receiver = tmp_3;\n var tmp_4;\n if (tmp8_safe_receiver == null) {\n tmp_4 = null;\n } else {\n tmp_4 = map(tmp8_safe_receiver, EntityReplaceHelper$Companion$entityHelpersForHostedConnectionsInProductHierarchy$lambda_4(validationService));\n }\n var tmp9_safe_receiver = tmp_4;\n var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : toList_0(tmp9_safe_receiver);\n return tmp10_elvis_lhs == null ? emptyList() : tmp10_elvis_lhs;\n };\n var Companion_instance_76;\n function Companion_getInstance_77() {\n return Companion_instance_76;\n }\n function EntityReplaceHelper(entity, oldConnection, host, validationService, allowedMovementsOfChildrenInMilliMeter, snapSelectStrategy) {\n var tmp;\n if (allowedMovementsOfChildrenInMilliMeter === VOID) {\n tmp = 1.7976931348623157E308;\n } else {\n tmp = allowedMovementsOfChildrenInMilliMeter;\n }\n allowedMovementsOfChildrenInMilliMeter = tmp;\n snapSelectStrategy = snapSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE : snapSelectStrategy;\n this.f1j_1 = entity;\n this.g1j_1 = oldConnection;\n this.h1j_1 = host;\n this.i1j_1 = validationService;\n this.j1j_1 = allowedMovementsOfChildrenInMilliMeter;\n this.k1j_1 = snapSelectStrategy;\n var tmp_0 = this;\n var tmp0_safe_receiver = this.g1j_1;\n tmp_0.l1j_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectorEntity;\n var tmp_1 = this;\n var tmp0_safe_receiver_0 = this.g1j_1;\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.hostConnector;\n tmp_1.m1j_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.key;\n var tmp_2 = this;\n var tmp0_safe_receiver_1 = this.g1j_1;\n var tmp1_safe_receiver_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.guestConnector;\n tmp_2.n1j_1 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.key;\n }\n protoOf(EntityReplaceHelper).v = function () {\n var worldTransform = get_worldTransform(this.f1j_1);\n ConnectionUtils_instance.disconnect(this.f1j_1);\n setParent(this.f1j_1, null);\n this.f1j_1.addComponent(new LocalTransformComponent(worldTransform));\n };\n protoOf(EntityReplaceHelper).n2l = function (checkIfDisposed) {\n if (checkIfDisposed ? this.f1j_1.isDisposed : false) {\n return Unit_instance;\n }\n if (this.h1j_1 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n snap(this, this.h1j_1);\n }\n };\n protoOf(EntityReplaceHelper).o2l = function (checkIfDisposed, $super) {\n checkIfDisposed = checkIfDisposed === VOID ? false : checkIfDisposed;\n var tmp;\n if ($super === VOID) {\n this.n2l(checkIfDisposed);\n tmp = Unit_instance;\n } else {\n tmp = $super.n2l.call(this, checkIfDisposed);\n }\n return tmp;\n };\n protoOf(EntityReplaceHelper).z1l = function () {\n if (this.l1j_1 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n snap(this, this.l1j_1);\n }\n };\n function entityGroupStuff($this, entityGroup, newEntity, oldEntity) {\n if (entityGroup == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n addAutomaticGroupMember(entityGroup, newEntity);\n removeAutomaticGroupMember(entityGroup, oldEntity);\n Companion_getInstance_40().setGroupMemberComponents(newEntity, entityGroup);\n Companion_getInstance_40().removeFromEntityGroup(oldEntity);\n Companion_getInstance_40().handleLockedMembersOfGroup(entityGroup);\n }\n }\n function replaceInScene($this, newEntity, oldEntity) {\n setParentMaintainWorldTransform(newEntity, get_parent(oldEntity));\n setParentMaintainWorldTransform(oldEntity, null);\n }\n function adoptChildren($this, newEntity, oldEntity) {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_immediateConnectionRootDescendants(oldEntity);\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.replace.FastReplaceAction.adoptChildren.' call\n if (get_isConnectionRoot(element)) {\n destination.q(element);\n }\n }\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.replace.FastReplaceAction.adoptChildren.' call\n setParent(element_0, newEntity);\n }\n }\n function adoptConnections($this, newEntity, oldEntity) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_0 = get_guestConnections(oldEntity);\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.replace.FastReplaceAction.adoptConnections.' call\n var tmp0_safe_receiver = createSimilarGuestConnection($this, newEntity, element);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n var newGuestConnections = copyToArray(destination);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_1 = get_hostedConnections(oldEntity);\n var destination_0 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.replace.FastReplaceAction.adoptConnections.' call\n var tmp0_safe_receiver_0 = createSimilarHostConnection($this, newEntity, element_0);\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_0.q(tmp0_safe_receiver_0);\n }\n }\n var newHostConnections = copyToArray(destination_0);\n // Inline function 'kotlin.collections.set' call\n var this_2 = $this.p2l_1;\n Companion_getInstance_18();\n var value = oldEntity.__getComponentForKotlin(104);\n this_2.r2(oldEntity, value);\n Companion_getInstance_18();\n oldEntity.removeComponent(104);\n if (any(newGuestConnections)) {\n newEntity.addComponent(new GuestConnectionsComponent(newGuestConnections));\n } else {\n Companion_getInstance_18();\n newEntity.removeComponent(104);\n }\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_1 = 0;\n var last_1 = newHostConnections.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = newHostConnections[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.replace.FastReplaceAction.adoptConnections.' call\n var tmp0_elvis_lhs = get_connectionRootEntity(element_1.guestConnectorEntity);\n var guest = tmp0_elvis_lhs == null ? element_1.guestConnectorEntity : tmp0_elvis_lhs;\n Companion_getInstance_18();\n var tmp1_safe_receiver = guest.__getComponentForKotlin(104);\n var newGuestConnectionsComponent = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.withReplacedConnection(element_1);\n if (!(newGuestConnectionsComponent == null)) {\n var wasPaused = guest.hasComponent(107);\n guest.addComponent(new TemporarilyPauseConnectionParentingComponent());\n // Inline function 'kotlin.collections.set' call\n var this_3 = $this.p2l_1;\n Companion_getInstance_18();\n var value_0 = guest.__getComponentForKotlin(104);\n this_3.r2(guest, value_0);\n guest.addComponent(newGuestConnectionsComponent);\n if (!wasPaused) {\n guest.removeComponent(107);\n }\n }\n }\n }\n function createSimilarGuestConnection($this, newEntity, connection) {\n var tmp0_safe_receiver = get_connectorsComponent(newEntity);\n var newGuestConnector = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.getConnectorByKey(connection.guestConnector.key);\n if (newGuestConnector == null) {\n // Inline function 'kotlin.collections.find' call\n var tmp = ConnectionUtils_instance;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [connection.hostConnectorEntity];\n var this_0 = tmp.calculateAllConnectionsToHierarchies(newEntity, tmp$ret$2);\n var tmp$ret$4;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.replace.FastReplaceAction.createSimilarGuestConnection.' call\n if (element.hostConnectorEntity.equals(connection.hostConnectorEntity) ? element.hostConnector.key === connection.hostConnector.key : false) {\n tmp$ret$4 = element;\n break $l$block;\n }\n }\n tmp$ret$4 = null;\n }\n var tmp1_safe_receiver = tmp$ret$4;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp1_safe_receiver;\n }\n var tmp_0 = Companion_getInstance_78().q2l_1;\n tmp_0.warn(FastReplaceAction$createSimilarGuestConnection$lambda(connection, newEntity));\n return null;\n }\n return new Connection(newEntity, newGuestConnector, connection.hostConnectorEntity, connection.hostConnector, connection.hostGuestConnectorDeltaTransform);\n }\n function createSimilarHostConnection($this, newEntity, connection) {\n var tmp0_safe_receiver = get_connectorsComponent(newEntity);\n var newHostConnector = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.getConnectorByKey(connection.hostConnector.key);\n if (newHostConnector == null) {\n // Inline function 'kotlin.collections.find' call\n var tmp = ConnectionUtils_instance;\n var tmp_0 = connection.guestConnectionRoot;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [newEntity];\n var this_0 = tmp.calculateAllConnectionsToHierarchies(tmp_0, tmp$ret$2);\n var tmp$ret$4;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.replace.FastReplaceAction.createSimilarHostConnection.' call\n if (element.guestConnectorEntity.equals(connection.guestConnectorEntity) ? element.guestConnector.key === connection.guestConnector.key : false) {\n tmp$ret$4 = element;\n break $l$block;\n }\n }\n tmp$ret$4 = null;\n }\n var tmp1_safe_receiver = tmp$ret$4;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp1_safe_receiver;\n }\n var tmp_1 = Companion_getInstance_78().q2l_1;\n tmp_1.warn(FastReplaceAction$createSimilarHostConnection$lambda(connection, newEntity));\n return null;\n }\n return new Connection(connection.guestConnectorEntity, connection.guestConnector, newEntity, newHostConnector, connection.hostGuestConnectorDeltaTransform);\n }\n function Companion_77() {\n Companion_instance_77 = this;\n this.q2l_1 = LoggerState_getInstance().m1m('FastReplaceAction');\n }\n var Companion_instance_77;\n function Companion_getInstance_78() {\n if (Companion_instance_77 == null)\n new Companion_77();\n return Companion_instance_77;\n }\n function FastReplaceAction$createSimilarGuestConnection$lambda($connection, $newEntity) {\n return function () {\n return 'Could not find corresponding guest connector to ' + $connection.guestConnector.key + ' on ' + get_displayName($newEntity);\n };\n }\n function FastReplaceAction$createSimilarHostConnection$lambda($connection, $newEntity) {\n return function () {\n return 'Could not find corresponding host connector to ' + $connection.hostConnector.key + ' on ' + get_displayName($newEntity);\n };\n }\n function FastReplaceAction(oldEntity, newEntity, entityManager, validationService, sceneManager) {\n Companion_getInstance_78();\n this.oldEntity = oldEntity;\n this.newEntity = newEntity;\n this.entityManager = entityManager;\n this.validationService = validationService;\n this.sceneManager = sceneManager;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp.p2l_1 = LinkedHashMap_init_$Create$_0();\n this.entityGroup = get_automaticEntityGroup(this.oldEntity);\n this.newEntity.addComponent(new LocalTransformComponent(get_worldTransform(this.oldEntity)));\n }\n protoOf(FastReplaceAction).y1l = function () {\n return this.oldEntity;\n };\n protoOf(FastReplaceAction).e1j = function () {\n return this.newEntity;\n };\n protoOf(FastReplaceAction).p1i = function () {\n return this.entityManager;\n };\n protoOf(FastReplaceAction).w27 = function () {\n return this.validationService;\n };\n protoOf(FastReplaceAction).q1i = function () {\n return this.sceneManager;\n };\n protoOf(FastReplaceAction).r2l = function () {\n return this.entityGroup;\n };\n protoOf(FastReplaceAction).perform = function () {\n this.oldEntity.addComponent(new TemporarilyPauseConnectionParentingComponent());\n this.newEntity.addComponent(new TemporarilyPauseConnectionParentingComponent());\n replaceInScene(this, this.newEntity, this.oldEntity);\n adoptChildren(this, this.newEntity, this.oldEntity);\n adoptConnections(this, this.newEntity, this.oldEntity);\n entityGroupStuff(this, this.entityGroup, this.newEntity, this.oldEntity);\n this.oldEntity.removeComponent(107);\n this.newEntity.removeComponent(107);\n };\n protoOf(FastReplaceAction).toString = function () {\n return 'Fast Replace Action old ' + this.oldEntity + ' for new ' + this.newEntity;\n };\n function ReplaceAction(oldEntity, newEntity, allowedMovementsOfChildrenInMilliMeter, validationService, sceneManager) {\n this.oldEntity = oldEntity;\n this.newEntity = newEntity;\n this.allowedMovementsOfChildrenInMilliMeter = allowedMovementsOfChildrenInMilliMeter;\n this.validationService = validationService;\n this.sceneManager = sceneManager;\n this.newEntity.addComponent(new LocalTransformComponent(get_worldTransform(this.oldEntity)));\n this.s2l_1 = Companion_instance_76.x1l(this.oldEntity, this.newEntity, this.validationService);\n var tmp = this;\n // Inline function 'kotlin.collections.map' call\n var this_0 = get_immediateConnectionRootDescendants(this.oldEntity);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.replace.ReplaceAction.descendantEntityHelpers.' call\n var tmp$ret$0 = EntityReplaceHelper_init_$Create$(item, this.newEntity, this.validationService, this.allowedMovementsOfChildrenInMilliMeter);\n destination.q(tmp$ret$0);\n }\n tmp.t2l_1 = destination;\n this.u2l_1 = EntityReplaceHelper_init_$Create$(this.oldEntity, null, this.validationService);\n var tmp_0 = this;\n var tmp0_safe_receiver = get_snapRoot(this.oldEntity);\n var tmp_1 = tmp0_safe_receiver == null ? null : get_highestPriorityConnection(tmp0_safe_receiver);\n var tmp1_safe_receiver = get_snapRoot(this.oldEntity);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : get_highestPriorityConnection(tmp1_safe_receiver);\n tmp_0.v2l_1 = new EntityReplaceHelper(this.newEntity, tmp_1, tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hostConnectorEntity, this.validationService);\n }\n protoOf(ReplaceAction).y1l = function () {\n return this.oldEntity;\n };\n protoOf(ReplaceAction).e1j = function () {\n return this.newEntity;\n };\n protoOf(ReplaceAction).w2l = function () {\n return this.allowedMovementsOfChildrenInMilliMeter;\n };\n protoOf(ReplaceAction).w27 = function () {\n return this.validationService;\n };\n protoOf(ReplaceAction).q1i = function () {\n return this.sceneManager;\n };\n protoOf(ReplaceAction).perform = function () {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.s2l_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.replace.ReplaceAction.perform.' call\n element.v();\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = this.t2l_1.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.replace.ReplaceAction.perform.' call\n element_0.v();\n }\n this.u2l_1.v();\n this.v2l_1.o2l();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_1 = this.t2l_1.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.replace.ReplaceAction.perform.' call\n element_1.n2l(true);\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_2 = this.s2l_1.t();\n while (tmp0_iterator_2.u()) {\n var element_2 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.replace.ReplaceAction.perform.' call\n element_2.o2l();\n }\n };\n protoOf(ReplaceAction).toString = function () {\n return 'Replace Action old ' + this.oldEntity + ' for new ' + this.newEntity;\n };\n function replacePartInAssembly($this, entityToAdd, entityToReplace) {\n connectPartToAssembly_1($this, entityToAdd);\n adoptAllChildrenParts($this, entityToReplace, entityToAdd, $this.x2l_1);\n }\n function removeAllConnectionRoots($this, newEntity) {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_descendants(newEntity);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.replace.ReplacePartAction.removeAllConnectionRoots.' call\n if (get_isConnectionRoot(element)) {\n destination.q(element);\n }\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.replace.ReplacePartAction.removeAllConnectionRoots.' call\n $this.entityManager.disposeEntity(element_0);\n }\n }\n function connectPartToAssembly_1($this, entity) {\n Companion_instance.connectChildPart($this.y2l_1, entity, $this.x2l_1);\n }\n function adoptAllChildrenParts($this, entityToReplace, entityToAdd, assemblyPart) {\n var childrenParts = assemblyPart.children;\n if (childrenParts == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = childrenParts.length;\n while (inductionVariable < last) {\n var element = childrenParts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n $l$block_0: {\n // Inline function 'com.ikea.core.replace.ReplacePartAction.adoptAllChildrenParts.' call\n // Inline function 'kotlin.collections.find' call\n var this_0 = get_children(entityToReplace);\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_0 = 0;\n var last_0 = this_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.replace.ReplacePartAction.adoptAllChildrenParts..' call\n if (get_partKey(element_0) === element.partKey) {\n tmp$ret$1 = element_0;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n break $l$block_0;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var childEntity = tmp;\n Companion_instance.connectChildPart(entityToAdd, childEntity, element);\n }\n }\n }\n }\n function ReplacePartAction(oldEntity, newEntity, assemblyPart, parent, entityManager, validationService, sceneManager) {\n this.oldEntity = oldEntity;\n this.newEntity = newEntity;\n this.x2l_1 = assemblyPart;\n this.y2l_1 = parent;\n this.entityManager = entityManager;\n this.z2l_1 = validationService;\n this.sceneManager = sceneManager;\n var tmp = this;\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_children(this.oldEntity);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.replace.ReplacePartAction.childEntityHelpers.' call\n if (get_isConnectionRoot(element)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.replace.ReplacePartAction.childEntityHelpers.' call\n var tmp$ret$3 = EntityReplaceHelper_init_$Create$(item, this.newEntity, this.z2l_1);\n destination_0.q(tmp$ret$3);\n }\n tmp.a2m_1 = destination_0;\n this.b2m_1 = Companion_instance_76.x1l(this.oldEntity, this.newEntity, this.z2l_1);\n var tmp_0 = this;\n // Inline function 'kotlin.collections.map' call\n var this_1 = get_immediateConnectionRootDescendants(this.oldEntity);\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));\n var tmp0_iterator_0 = this_1.t();\n while (tmp0_iterator_0.u()) {\n var item_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.replace.ReplacePartAction.descendantEntityHelpers.' call\n var tmp$ret$6 = EntityReplaceHelper_init_$Create$(item_0, this.newEntity, this.z2l_1, 1.7976931348623157E308);\n destination_1.q(tmp$ret$6);\n }\n tmp_0.c2m_1 = destination_1;\n this.d2m_1 = EntityReplaceHelper_init_$Create$(this.oldEntity, null, this.z2l_1);\n var tmp_1 = this;\n var tmp0_safe_receiver = get_connectionRootEntity(this.oldEntity);\n var tmp_2 = tmp0_safe_receiver == null ? null : get_highestPriorityConnection(tmp0_safe_receiver);\n var tmp1_safe_receiver = get_connectionRootEntity(this.oldEntity);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : get_highestPriorityConnection(tmp1_safe_receiver);\n tmp_1.e2m_1 = new EntityReplaceHelper(this.newEntity, tmp_2, tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hostConnectorEntity, this.z2l_1);\n }\n protoOf(ReplacePartAction).y1l = function () {\n return this.oldEntity;\n };\n protoOf(ReplacePartAction).e1j = function () {\n return this.newEntity;\n };\n protoOf(ReplacePartAction).p1i = function () {\n return this.entityManager;\n };\n protoOf(ReplacePartAction).q1i = function () {\n return this.sceneManager;\n };\n protoOf(ReplacePartAction).rollback = function () {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.b2m_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.replace.ReplacePartAction.rollback.' call\n element.v();\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = this.a2m_1.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.replace.ReplacePartAction.rollback.' call\n element_0.v();\n }\n this.e2m_1.v();\n replacePartInAssembly(this, this.oldEntity, this.newEntity);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_1 = this.c2m_1.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.replace.ReplacePartAction.rollback.' call\n element_1.z1l();\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_2 = this.b2m_1.t();\n while (tmp0_iterator_2.u()) {\n var element_2 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.replace.ReplacePartAction.rollback.' call\n element_2.z1l();\n }\n };\n protoOf(ReplacePartAction).perform = function () {\n removeAllConnectionRoots(this, this.newEntity);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.b2m_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.replace.ReplacePartAction.perform.' call\n element.v();\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = this.c2m_1.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.replace.ReplacePartAction.perform.' call\n element_0.v();\n }\n this.d2m_1.v();\n replacePartInAssembly(this, this.newEntity, this.oldEntity);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_1 = this.c2m_1.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.replace.ReplacePartAction.perform.' call\n element_1.o2l();\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_2 = this.b2m_1.t();\n while (tmp0_iterator_2.u()) {\n var element_2 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.replace.ReplacePartAction.perform.' call\n element_2.o2l();\n }\n };\n protoOf(ReplacePartAction).toString = function () {\n return 'Replace part Action old ' + this.oldEntity + ' for new ' + this.newEntity;\n };\n function Companion_78() {\n this.id = 86;\n }\n protoOf(Companion_78).s1k = function () {\n return this.id;\n };\n var Companion_instance_78;\n function Companion_getInstance_79() {\n return Companion_instance_78;\n }\n function ClickEventComponent(screenSpaceCoord) {\n this.screenSpaceCoord = screenSpaceCoord;\n this.f2m_1 = 86;\n }\n protoOf(ClickEventComponent).g2m = function () {\n return this.screenSpaceCoord;\n };\n protoOf(ClickEventComponent).x1k = function () {\n return this.f2m_1;\n };\n protoOf(ClickEventComponent).eq = function (other) {\n if (!(other instanceof ClickEventComponent))\n return false;\n return other.screenSpaceCoord.equals(this.screenSpaceCoord);\n };\n function triggerClickEvent(_this__u8e3s4, entityManager, screenSpaceCoord) {\n var event = new ClickEventComponent(screenSpaceCoord);\n entityManager.addComponent(_this__u8e3s4, event);\n entityManager.removeComponent(_this__u8e3s4, event.f2m_1);\n }\n function MultiSelectionEnabledComponent() {\n }\n protoOf(MultiSelectionEnabledComponent).x1k = function () {\n return this.id;\n };\n protoOf(MultiSelectionEnabledComponent).s1k = function () {\n return 56;\n };\n protoOf(MultiSelectionEnabledComponent).eq = function (other) {\n return true;\n };\n var MultiSelectionEnabledComponent_instance;\n function MultiSelectionEnabledComponent_getInstance() {\n return MultiSelectionEnabledComponent_instance;\n }\n function Companion_79() {\n this.id = 1;\n }\n protoOf(Companion_79).s1k = function () {\n return this.id;\n };\n var Companion_instance_79;\n function Companion_getInstance_80() {\n return Companion_instance_79;\n }\n function SelectableComponent() {\n }\n protoOf(SelectableComponent).x1k = function () {\n return 1;\n };\n protoOf(SelectableComponent).eq = function (other) {\n return true;\n };\n function get_selectableComponent(_this__u8e3s4) {\n return _this__u8e3s4.__getComponentForKotlin(1);\n }\n function get_isSelectable(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(1);\n }\n function SelectedComponent() {\n }\n protoOf(SelectedComponent).x1k = function () {\n return this.id;\n };\n protoOf(SelectedComponent).s1k = function () {\n return 0;\n };\n protoOf(SelectedComponent).eq = function (other) {\n return true;\n };\n var SelectedComponent_instance;\n function SelectedComponent_getInstance() {\n return SelectedComponent_instance;\n }\n function get_isSelected(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(SelectedComponent_instance.id);\n }\n function Companion_80() {\n Companion_instance_80 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.h2m_1 = [new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];\n }\n protoOf(Companion_80).l17 = function () {\n return $serializer_getInstance_9();\n };\n var Companion_instance_80;\n function Companion_getInstance_81() {\n if (Companion_instance_80 == null)\n new Companion_80();\n return Companion_instance_80;\n }\n function $serializer_9() {\n $serializer_instance_9 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.serialization.CatalogsHeader', this, 1);\n tmp0_serialDesc.cv('catalogs', false);\n this.i2m_1 = tmp0_serialDesc;\n }\n protoOf($serializer_9).ok = function () {\n return this.i2m_1;\n };\n protoOf($serializer_9).rv = function () {\n var tmp0_cached = Companion_getInstance_81().h2m_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [get_nullable(tmp0_cached[0])];\n };\n protoOf($serializer_9).qk = function (decoder) {\n var tmp0_desc = this.i2m_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_input = decoder.nn(tmp0_desc);\n var tmp6_cached = Companion_getInstance_81().h2m_1;\n if (tmp5_input.do()) {\n tmp4_local0 = tmp5_input.bo(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp5_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp5_input.bo(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp5_input.on(tmp0_desc);\n return CatalogsHeader_init_$Create$(tmp3_bitMask0, tmp4_local0, null);\n };\n protoOf($serializer_9).j2m = function (encoder, value) {\n var tmp0_desc = this.i2m_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_81().h2m_1;\n tmp1_output.gp(tmp0_desc, 0, tmp2_cached[0], value.catalogs);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_9).pk = function (encoder, value) {\n return this.j2m(encoder, value instanceof CatalogsHeader ? value : THROW_CCE());\n };\n var $serializer_instance_9;\n function $serializer_getInstance_9() {\n if ($serializer_instance_9 == null)\n new $serializer_9();\n return $serializer_instance_9;\n }\n function CatalogsHeader_init_$Init$(seen1, catalogs, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_9().i2m_1);\n }\n $this.catalogs = catalogs;\n return $this;\n }\n function CatalogsHeader_init_$Create$(seen1, catalogs, serializationConstructorMarker) {\n return CatalogsHeader_init_$Init$(seen1, catalogs, serializationConstructorMarker, objectCreate(protoOf(CatalogsHeader)));\n }\n function CatalogsHeader(catalogs) {\n Companion_getInstance_81();\n this.catalogs = catalogs;\n }\n protoOf(CatalogsHeader).d1m = function () {\n return this.catalogs;\n };\n protoOf(CatalogsHeader).af = function () {\n return this.catalogs;\n };\n protoOf(CatalogsHeader).k2m = function (catalogs) {\n return new CatalogsHeader(catalogs);\n };\n protoOf(CatalogsHeader).copy = function (catalogs, $super) {\n catalogs = catalogs === VOID ? this.catalogs : catalogs;\n return this.k2m(catalogs);\n };\n protoOf(CatalogsHeader).toString = function () {\n return 'CatalogsHeader(catalogs=' + this.catalogs + ')';\n };\n protoOf(CatalogsHeader).hashCode = function () {\n return this.catalogs == null ? 0 : hashCode(this.catalogs);\n };\n protoOf(CatalogsHeader).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof CatalogsHeader))\n return false;\n var tmp0_other_with_cast = other instanceof CatalogsHeader ? other : THROW_CCE();\n if (!equals(this.catalogs, tmp0_other_with_cast.catalogs))\n return false;\n return true;\n };\n function ComponentDeserializer() {\n }\n function ComponentDeserializerRegistry() {\n var tmp = this;\n // Inline function 'kotlin.emptyArray' call\n tmp.l2m_1 = [];\n }\n protoOf(ComponentDeserializerRegistry).m2m = function () {\n return this.l2m_1;\n };\n protoOf(ComponentDeserializerRegistry).register = function (componentDeserializer) {\n if (!componentDeserializer.thisClassIsGuaranteedToNotModifyOrQueryCoreState) {\n // Inline function 'kotlin.error' call\n var message = \"You haven't read and accepted the class documentation for ComponentSerializer for \" + componentDeserializer;\n throw IllegalStateException_init_$Create$(toString(message));\n }\n var tmp = this;\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$0 = this.l2m_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [componentDeserializer];\n tmp.l2m_1 = tmp$ret$0.concat(tmp$ret$3);\n };\n protoOf(ComponentDeserializerRegistry).unregister = function (componentDeserializer) {\n var tmp = this;\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = minus(toMutableList(this.l2m_1), componentDeserializer);\n tmp.l2m_1 = copyToArray(this_0);\n };\n function JsonSerializable() {\n }\n function JsonSerializer$Companion$StrictPretty$lambda($this$Json) {\n $this$Json.d16_1 = false;\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n $this$Json.c16_1 = true;\n return Unit_instance;\n }\n function JsonSerializer$Companion$NonStrictPretty$lambda($this$Json) {\n $this$Json.d16_1 = false;\n $this$Json.f16_1 = true;\n $this$Json.h16_1 = true;\n $this$Json.c16_1 = true;\n return Unit_instance;\n }\n function JsonSerializer$Companion$NonStrictPrettyIgnoreUnknownKeys$lambda($this$Json) {\n $this$Json.d16_1 = false;\n $this$Json.f16_1 = true;\n $this$Json.e16_1 = true;\n $this$Json.h16_1 = true;\n return Unit_instance;\n }\n function createANewCoreInstance($this, coreServices) {\n var tmpCore = coreServices.coreFactory.createNewCoreInstance();\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = coreServices.productManager.catalogs;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.JsonSerializer.createANewCoreInstance.' call\n tmpCore.services.productManager.addCatalog(element);\n }\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = coreServices.componentDeserializerRegistry.componentSerializers;\n var inductionVariable_0 = 0;\n var last_0 = indexedObject_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.serialization.JsonSerializer.createANewCoreInstance.' call\n tmpCore.services.componentDeserializerRegistry.register(element_0);\n }\n return tmpCore;\n }\n function rebuildTreeFromScratch($this, coreServices, serializableTree) {\n var entityTreeBuilder = new EntityTreeBuilder(coreServices.entityManager, coreServices.productManager, coreServices.validations, coreServices.sceneManager);\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_0 = serializableTree.roots;\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.serialization.JsonSerializer.rebuildTreeFromScratch.' call\n var tmp0_safe_receiver = entityTreeBuilder.buildEntityTree(element);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n var newRoots = destination;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = newRoots.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.JsonSerializer.rebuildTreeFromScratch.' call\n serializableTree.afterRebuildTree(element_0, coreServices);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(newRoots);\n }\n function letCatalogsUpdateTreeWhenDone($this, catalogs, root) {\n var tmp0_safe_receiver = $this.n2m_1;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.catalogs;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.JsonSerializer.letCatalogsUpdateTreeWhenDone.' call\n element.afterDeserializeComplete(root, catalogs.b3(element.rangeId()));\n }\n }\n }\n function letCatalogsUpdateTreeBeforeParsingComponents($this, catalogs, serializableTree) {\n var tmp0_safe_receiver = $this.n2m_1;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.catalogs;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.JsonSerializer.letCatalogsUpdateTreeBeforeParsingComponents.' call\n element.beforeParsingComponents(serializableTree, catalogs.b3(element.rangeId()));\n }\n }\n }\n function letCatalogsUpdateTreeBeforeBuildingEntities($this, catalogs, serializableTree) {\n var tmp0_safe_receiver = $this.n2m_1;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.catalogs;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.JsonSerializer.letCatalogsUpdateTreeBeforeBuildingEntities.' call\n element.beforeBuildingEntities(serializableTree, catalogs.b3(element.rangeId()));\n }\n }\n }\n function letCatalogsUpdateJSON($this, catalogs, bundle) {\n var newJson = bundle;\n var tmp0_safe_receiver = $this.n2m_1;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.catalogs;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.JsonSerializer.letCatalogsUpdateJSON.' call\n newJson = element.beforeDeserialize(newJson, catalogs.b3(element.rangeId()));\n }\n }\n return newJson;\n }\n function catalogVersions($this, bundle) {\n var tmp;\n try {\n var tmp0_elvis_lhs = Companion_getInstance_82().NonStrictPrettyIgnoreUnknownKeys.j15(Companion_getInstance_81().l17(), bundle).catalogs;\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.collections.mapOf' call\n tmp_0 = emptyMap();\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n tmp = tmp_0;\n } catch ($p) {\n var tmp_1;\n if ($p instanceof SerializationException) {\n var se = $p;\n // Inline function 'kotlin.collections.mapOf' call\n tmp_1 = emptyMap();\n } else {\n throw $p;\n }\n tmp = tmp_1;\n }\n return tmp;\n }\n function fromJson($this, bundle) {\n var version = Companion_getInstance_82().NonStrictPrettyIgnoreUnknownKeys.j15(Companion_instance_86.l17(), bundle).version;\n return fromJson_0($this, version, bundle);\n }\n function fromJson_0($this, version, bundle) {\n var tmp;\n if (version === '1.3') {\n tmp = Companion_getInstance_82().NonStrictPretty.j15(Companion_getInstance_91().l17(), bundle);\n } else {\n throw IllegalStateException_init_$Create$('Can not deserialize version ' + version);\n }\n return tmp;\n }\n function Companion_81() {\n Companion_instance_81 = this;\n var tmp = this;\n tmp.StrictPretty = Json(VOID, JsonSerializer$Companion$StrictPretty$lambda);\n var tmp_0 = this;\n tmp_0.NonStrictPretty = Json(VOID, JsonSerializer$Companion$NonStrictPretty$lambda);\n var tmp_1 = this;\n tmp_1.NonStrictPrettyIgnoreUnknownKeys = Json(VOID, JsonSerializer$Companion$NonStrictPrettyIgnoreUnknownKeys$lambda);\n }\n protoOf(Companion_81).p2m = function () {\n return this.StrictPretty;\n };\n protoOf(Companion_81).q2m = function () {\n return this.NonStrictPretty;\n };\n protoOf(Companion_81).r2m = function () {\n return this.NonStrictPrettyIgnoreUnknownKeys;\n };\n var Companion_instance_81;\n function Companion_getInstance_82() {\n if (Companion_instance_81 == null)\n new Companion_81();\n return Companion_instance_81;\n }\n function JsonSerializer(productManager) {\n Companion_getInstance_82();\n productManager = productManager === VOID ? null : productManager;\n this.n2m_1 = productManager;\n }\n protoOf(JsonSerializer).deserializeToEntityHierarchies = function (json, coreServices) {\n var catalogs = catalogVersions(this, json);\n var updatedJson = letCatalogsUpdateJSON(this, catalogs, json);\n var serializableTree = fromJson(this, updatedJson);\n letCatalogsUpdateTreeBeforeParsingComponents(this, catalogs, serializableTree);\n serializableTree.deserializeComponents(coreServices);\n letCatalogsUpdateTreeBeforeBuildingEntities(this, catalogs, serializableTree);\n var tmpCore = createANewCoreInstance(this, coreServices);\n serializableTree.afterDeserialized(tmpCore.services);\n var newRoots = rebuildTreeFromScratch(this, coreServices, serializableTree);\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = newRoots.length;\n while (inductionVariable < last) {\n var element = newRoots[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.JsonSerializer.deserializeToEntityHierarchies.' call\n element.addComponent(new LocalTransformComponent(get_worldTransform(element)));\n element.addComponent(new WorldTransformComponent(Companion_getInstance_60().IDENTITY));\n TransformUtils_instance.updateWorldTransform(element);\n }\n letCatalogsUpdateTreeWhenDone(this, catalogs, firstOrNull(newRoots));\n return newRoots;\n };\n protoOf(JsonSerializer).hierarchiesToJsonString = function (roots) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = roots.length;\n while (inductionVariable < last) {\n var element = roots[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.JsonSerializer.hierarchiesToJsonString.' call\n var list = toList_1(get_hierarchy(element));\n addAll(destination, list);\n }\n var allEntities = copyToArray(destination);\n return this.singleEntitiesToJsonString(allEntities);\n };\n protoOf(JsonSerializer).singleEntitiesToJsonString = function (entities) {\n return Companion_getInstance_91().buildTreeAndSerialize(entities, this.n2m_1);\n };\n protoOf(JsonSerializer).toJsonString = function (root) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [root];\n return this.hierarchiesToJsonString(tmp$ret$2);\n };\n function Companion_82() {\n this.id = 100;\n }\n protoOf(Companion_82).s1k = function () {\n return this.id;\n };\n var Companion_instance_82;\n function Companion_getInstance_83() {\n return Companion_instance_82;\n }\n function PreviouslySerializedIdComponent(serializedId) {\n this.serializedId = serializedId;\n this.s2m_1 = Companion_instance_82.id;\n }\n protoOf(PreviouslySerializedIdComponent).t2m = function () {\n return this.serializedId;\n };\n protoOf(PreviouslySerializedIdComponent).x1k = function () {\n return this.s2m_1;\n };\n protoOf(PreviouslySerializedIdComponent).eq = function (other) {\n var tmp0_safe_receiver = other instanceof PreviouslySerializedIdComponent ? other : null;\n return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.serializedId) === this.serializedId;\n };\n function get_previousId(_this__u8e3s4) {\n var tmp0_safe_receiver = get_previousStringId(_this__u8e3s4);\n return tmp0_safe_receiver == null ? null : toIntOrNull(tmp0_safe_receiver);\n }\n function get_previousStringId(_this__u8e3s4) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(Companion_instance_82.id);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.serializedId;\n }\n function SceneReloadingComponent() {\n }\n protoOf(SceneReloadingComponent).x1k = function () {\n return this.id;\n };\n protoOf(SceneReloadingComponent).s1k = function () {\n return 73;\n };\n protoOf(SceneReloadingComponent).eq = function (other) {\n return true;\n };\n var SceneReloadingComponent_instance;\n function SceneReloadingComponent_getInstance() {\n return SceneReloadingComponent_instance;\n }\n function SerializableCatalogInterceptor() {\n }\n function SerializableComponent() {\n }\n function SerializableEntity() {\n }\n function SerializableGuestConnectionsComponent$Companion$serializer$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n return Unit_instance;\n }\n function Companion_83() {\n }\n protoOf(Companion_83).fromConnection = function (connection) {\n return new SerializableConnection(connection.guestConnectorEntity.id.toString(), connection.hostConnectorEntity.id.toString(), connection.guestConnector.key, connection.hostConnector.key);\n };\n protoOf(Companion_83).l17 = function () {\n return $serializer_getInstance_10();\n };\n var Companion_instance_83;\n function Companion_getInstance_84() {\n return Companion_instance_83;\n }\n function $serializer_10() {\n $serializer_instance_10 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.serialization.SerializableGuestConnectionsComponent.SerializableConnection', this, 4);\n tmp0_serialDesc.cv('guestId', false);\n tmp0_serialDesc.cv('hostId', false);\n tmp0_serialDesc.cv('guestConnector', false);\n tmp0_serialDesc.cv('hostConnector', false);\n this.b2n_1 = tmp0_serialDesc;\n }\n protoOf($serializer_10).ok = function () {\n return this.b2n_1;\n };\n protoOf($serializer_10).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance()];\n };\n protoOf($serializer_10).qk = function (decoder) {\n var tmp0_desc = this.b2n_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_input = decoder.nn(tmp0_desc);\n if (tmp8_input.do()) {\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp8_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp8_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp8_input.xn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp8_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp8_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp8_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp8_input.xn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp8_input.on(tmp0_desc);\n return SerializableConnection_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);\n };\n protoOf($serializer_10).c2n = function (encoder, value) {\n var tmp0_desc = this.b2n_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.guestId);\n tmp1_output.cp(tmp0_desc, 1, value.hostId);\n tmp1_output.cp(tmp0_desc, 2, value.guestConnector);\n tmp1_output.cp(tmp0_desc, 3, value.hostConnector);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_10).pk = function (encoder, value) {\n return this.c2n(encoder, value instanceof SerializableConnection ? value : THROW_CCE());\n };\n var $serializer_instance_10;\n function $serializer_getInstance_10() {\n if ($serializer_instance_10 == null)\n new $serializer_10();\n return $serializer_instance_10;\n }\n function SerializableConnection_init_$Init$(seen1, guestId, hostId, guestConnector, hostConnector, serializationConstructorMarker, $this) {\n if (!(15 === (15 & seen1))) {\n throwMissingFieldException(seen1, 15, $serializer_getInstance_10().b2n_1);\n }\n $this.guestId = guestId;\n $this.hostId = hostId;\n $this.guestConnector = guestConnector;\n $this.hostConnector = hostConnector;\n return $this;\n }\n function SerializableConnection_init_$Create$(seen1, guestId, hostId, guestConnector, hostConnector, serializationConstructorMarker) {\n return SerializableConnection_init_$Init$(seen1, guestId, hostId, guestConnector, hostConnector, serializationConstructorMarker, objectCreate(protoOf(SerializableConnection)));\n }\n function Companion_84() {\n Companion_instance_84 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.d2n_1 = [new ArrayListSerializer($serializer_getInstance_10()), null];\n this.id = 106;\n this.serializationKey = 'Connections';\n var tmp_0 = this;\n tmp_0.e2n_1 = Json(VOID, SerializableGuestConnectionsComponent$Companion$serializer$lambda);\n }\n protoOf(Companion_84).s1k = function () {\n return this.id;\n };\n protoOf(Companion_84).p1l = function () {\n return this.serializationKey;\n };\n protoOf(Companion_84).fromConnectionsComponent = function (connectionsComponent) {\n // Inline function 'kotlin.collections.map' call\n var this_0 = connectionsComponent.connections;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.Companion.fromConnectionsComponent.' call\n var tmp$ret$0 = Companion_instance_83.fromConnection(item);\n destination.q(tmp$ret$0);\n }\n return new SerializableGuestConnectionsComponent(destination);\n };\n protoOf(Companion_84).fromJson = function (json) {\n return this.e2n_1.l15(this.l17(), json);\n };\n protoOf(Companion_84).l17 = function () {\n return $serializer_getInstance_11();\n };\n var Companion_instance_84;\n function Companion_getInstance_85() {\n if (Companion_instance_84 == null)\n new Companion_84();\n return Companion_instance_84;\n }\n function SerializableConnection(guestId, hostId, guestConnector, hostConnector) {\n this.guestId = guestId;\n this.hostId = hostId;\n this.guestConnector = guestConnector;\n this.hostConnector = hostConnector;\n }\n protoOf(SerializableConnection).f2n = function () {\n return this.guestId;\n };\n protoOf(SerializableConnection).g2n = function () {\n return this.hostId;\n };\n protoOf(SerializableConnection).p1v = function () {\n return this.guestConnector;\n };\n protoOf(SerializableConnection).r1v = function () {\n return this.hostConnector;\n };\n protoOf(SerializableConnection).af = function () {\n return this.guestId;\n };\n protoOf(SerializableConnection).bf = function () {\n return this.hostId;\n };\n protoOf(SerializableConnection).g1k = function () {\n return this.guestConnector;\n };\n protoOf(SerializableConnection).h1k = function () {\n return this.hostConnector;\n };\n protoOf(SerializableConnection).h2n = function (guestId, hostId, guestConnector, hostConnector) {\n return new SerializableConnection(guestId, hostId, guestConnector, hostConnector);\n };\n protoOf(SerializableConnection).copy = function (guestId, hostId, guestConnector, hostConnector, $super) {\n guestId = guestId === VOID ? this.guestId : guestId;\n hostId = hostId === VOID ? this.hostId : hostId;\n guestConnector = guestConnector === VOID ? this.guestConnector : guestConnector;\n hostConnector = hostConnector === VOID ? this.hostConnector : hostConnector;\n return this.h2n(guestId, hostId, guestConnector, hostConnector);\n };\n protoOf(SerializableConnection).toString = function () {\n return 'SerializableConnection(guestId=' + this.guestId + ', hostId=' + this.hostId + ', guestConnector=' + this.guestConnector + ', hostConnector=' + this.hostConnector + ')';\n };\n protoOf(SerializableConnection).hashCode = function () {\n var result = getStringHashCode(this.guestId);\n result = imul(result, 31) + getStringHashCode(this.hostId) | 0;\n result = imul(result, 31) + getStringHashCode(this.guestConnector) | 0;\n result = imul(result, 31) + getStringHashCode(this.hostConnector) | 0;\n return result;\n };\n protoOf(SerializableConnection).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof SerializableConnection))\n return false;\n var tmp0_other_with_cast = other instanceof SerializableConnection ? other : THROW_CCE();\n if (!(this.guestId === tmp0_other_with_cast.guestId))\n return false;\n if (!(this.hostId === tmp0_other_with_cast.hostId))\n return false;\n if (!(this.guestConnector === tmp0_other_with_cast.guestConnector))\n return false;\n if (!(this.hostConnector === tmp0_other_with_cast.hostConnector))\n return false;\n return true;\n };\n function $serializer_11() {\n $serializer_instance_11 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.serialization.SerializableGuestConnectionsComponent', this, 2);\n tmp0_serialDesc.cv('connections', false);\n tmp0_serialDesc.cv('typeId', true);\n this.i2n_1 = tmp0_serialDesc;\n }\n protoOf($serializer_11).ok = function () {\n return this.i2n_1;\n };\n protoOf($serializer_11).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [Companion_getInstance_85().d2n_1[0], IntSerializer_getInstance()];\n };\n protoOf($serializer_11).qk = function (decoder) {\n var tmp0_desc = this.i2n_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = 0;\n var tmp6_input = decoder.nn(tmp0_desc);\n var tmp7_cached = Companion_getInstance_85().d2n_1;\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.sn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.sn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return SerializableGuestConnectionsComponent_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);\n };\n protoOf($serializer_11).j2n = function (encoder, value) {\n var tmp0_desc = this.i2n_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_85().d2n_1;\n tmp1_output.ep(tmp0_desc, 0, tmp2_cached[0], value.connections);\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.k2n_1 === 106)) {\n tmp1_output.xo(tmp0_desc, 1, value.k2n_1);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_11).pk = function (encoder, value) {\n return this.j2n(encoder, value instanceof SerializableGuestConnectionsComponent ? value : THROW_CCE());\n };\n var $serializer_instance_11;\n function $serializer_getInstance_11() {\n if ($serializer_instance_11 == null)\n new $serializer_11();\n return $serializer_instance_11;\n }\n function SerializableGuestConnectionsComponent_init_$Init$(seen1, connections, typeId, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_11().i2n_1);\n }\n $this.connections = connections;\n if (0 === (seen1 & 2))\n $this.k2n_1 = 106;\n else\n $this.k2n_1 = typeId;\n return $this;\n }\n function SerializableGuestConnectionsComponent_init_$Create$(seen1, connections, typeId, serializationConstructorMarker) {\n return SerializableGuestConnectionsComponent_init_$Init$(seen1, connections, typeId, serializationConstructorMarker, objectCreate(protoOf(SerializableGuestConnectionsComponent)));\n }\n function SerializableGuestConnectionsComponent(connections) {\n Companion_getInstance_85();\n this.connections = connections;\n this.k2n_1 = 106;\n }\n protoOf(SerializableGuestConnectionsComponent).d1w = function () {\n return this.connections;\n };\n protoOf(SerializableGuestConnectionsComponent).toJson = function (parse) {\n return Companion_getInstance_85().e2n_1.k15(Companion_getInstance_85().l17(), this);\n };\n protoOf(SerializableGuestConnectionsComponent).serializationKey = function () {\n return 'Connections';\n };\n protoOf(SerializableGuestConnectionsComponent).x1k = function () {\n return this.k2n_1;\n };\n protoOf(SerializableGuestConnectionsComponent).eq = function (other) {\n var that = unsafeCast(other);\n return equals(this.connections, that.connections);\n };\n function SerializableTree() {\n }\n function toJsonString(_this__u8e3s4) {\n return (new JsonSerializer(null)).toJsonString(_this__u8e3s4);\n }\n function Serializer() {\n }\n function Companion_85() {\n }\n protoOf(Companion_85).s1k = function () {\n return 25;\n };\n var Companion_instance_85;\n function Companion_getInstance_86() {\n return Companion_instance_85;\n }\n function UnserializableEntityComponent() {\n }\n protoOf(UnserializableEntityComponent).x1k = function () {\n return Companion_instance_85.id;\n };\n protoOf(UnserializableEntityComponent).eq = function (other) {\n return true;\n };\n function Companion_86() {\n }\n protoOf(Companion_86).l17 = function () {\n return $serializer_getInstance_12();\n };\n var Companion_instance_86;\n function Companion_getInstance_87() {\n return Companion_instance_86;\n }\n function $serializer_12() {\n $serializer_instance_12 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.serialization.VersionHeader', this, 1);\n tmp0_serialDesc.cv('version', false);\n this.n2n_1 = tmp0_serialDesc;\n }\n protoOf($serializer_12).ok = function () {\n return this.n2n_1;\n };\n protoOf($serializer_12).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance()];\n };\n protoOf($serializer_12).qk = function (decoder) {\n var tmp0_desc = this.n2n_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_input = decoder.nn(tmp0_desc);\n if (tmp5_input.do()) {\n tmp4_local0 = tmp5_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp5_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp5_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp5_input.on(tmp0_desc);\n return VersionHeader_init_$Create$(tmp3_bitMask0, tmp4_local0, null);\n };\n protoOf($serializer_12).o2n = function (encoder, value) {\n var tmp0_desc = this.n2n_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.version);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_12).pk = function (encoder, value) {\n return this.o2n(encoder, value instanceof VersionHeader ? value : THROW_CCE());\n };\n var $serializer_instance_12;\n function $serializer_getInstance_12() {\n if ($serializer_instance_12 == null)\n new $serializer_12();\n return $serializer_instance_12;\n }\n function VersionHeader_init_$Init$(seen1, version, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_12().n2n_1);\n }\n $this.version = version;\n return $this;\n }\n function VersionHeader_init_$Create$(seen1, version, serializationConstructorMarker) {\n return VersionHeader_init_$Init$(seen1, version, serializationConstructorMarker, objectCreate(protoOf(VersionHeader)));\n }\n function VersionHeader(version) {\n this.version = version;\n }\n protoOf(VersionHeader).m2n = function () {\n return this.version;\n };\n protoOf(VersionHeader).af = function () {\n return this.version;\n };\n protoOf(VersionHeader).q1l = function (version) {\n return new VersionHeader(version);\n };\n protoOf(VersionHeader).copy = function (version, $super) {\n version = version === VOID ? this.version : version;\n return this.q1l(version);\n };\n protoOf(VersionHeader).toString = function () {\n return 'VersionHeader(version=' + this.version + ')';\n };\n protoOf(VersionHeader).hashCode = function () {\n return getStringHashCode(this.version);\n };\n protoOf(VersionHeader).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof VersionHeader))\n return false;\n var tmp0_other_with_cast = other instanceof VersionHeader ? other : THROW_CCE();\n if (!(this.version === tmp0_other_with_cast.version))\n return false;\n return true;\n };\n function findCorrectEntityGroupOrderFromConnectionGraph($this, shadowEntity) {\n var childrenLeft = toMutableList(get_children(shadowEntity));\n // Inline function 'kotlin.collections.mutableListOf' call\n var childrenInOrder = ArrayList_init_$Create$();\n var index = 0;\n $l$loop: while (true) {\n var tmp;\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!childrenLeft.b1()) {\n tmp = index < childrenLeft.n();\n } else {\n tmp = false;\n }\n if (!tmp) {\n break $l$loop;\n }\n var child = childrenLeft.f1(index);\n Companion_getInstance_85();\n var connectionsComponents = child.__getComponentForKotlin(106);\n var tmp1_safe_receiver = connectionsComponents == null ? null : connectionsComponents.connections;\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n var tmp$ret$2;\n $l$block_3: {\n // Inline function 'kotlin.collections.any' call\n var tmp_1;\n if (isInterface(tmp1_safe_receiver, Collection)) {\n tmp_1 = tmp1_safe_receiver.b1();\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp$ret$2 = false;\n break $l$block_3;\n }\n var tmp0_iterator = tmp1_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.Companion.findCorrectEntityGroupOrderFromConnectionGraph.' call\n var hostId = toInt(element.hostId);\n var tmp$ret$3;\n $l$block_2: {\n // Inline function 'kotlin.collections.any' call\n var tmp_2;\n if (isInterface(childrenLeft, Collection)) {\n tmp_2 = childrenLeft.b1();\n } else {\n tmp_2 = false;\n }\n if (tmp_2) {\n tmp$ret$3 = false;\n break $l$block_2;\n }\n var tmp0_iterator_0 = childrenLeft.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.Companion.findCorrectEntityGroupOrderFromConnectionGraph..' call\n var tmp_3;\n if (element_0.id === hostId) {\n tmp_3 = true;\n } else {\n var tmp$ret$5;\n $l$block_1: {\n // Inline function 'kotlin.sequences.any' call\n var tmp0_iterator_1 = hierarchyExceptSubTreesWithComponentSequence(element_0, 28).t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.Companion.findCorrectEntityGroupOrderFromConnectionGraph...' call\n if (element_1.id === hostId) {\n tmp$ret$5 = true;\n break $l$block_1;\n }\n }\n tmp$ret$5 = false;\n }\n tmp_3 = tmp$ret$5;\n }\n if (tmp_3) {\n tmp$ret$3 = true;\n break $l$block_2;\n }\n }\n tmp$ret$3 = false;\n }\n if (tmp$ret$3) {\n tmp$ret$2 = true;\n break $l$block_3;\n }\n }\n tmp$ret$2 = false;\n }\n tmp_0 = tmp$ret$2;\n }\n var tmp2_elvis_lhs = tmp_0;\n var hasAnyConnectionsToOther = tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs;\n index = index + 1 | 0;\n if (!hasAnyConnectionsToOther) {\n childrenInOrder.q(child);\n childrenLeft.r(child);\n index = 0;\n }\n }\n return childrenInOrder;\n }\n function Companion_87() {\n }\n protoOf(Companion_87).findCorrectEntityGroupOrder = function (shadowEntity) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = get_children(shadowEntity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.Companion.findCorrectEntityGroupOrder.' call\n Companion_getInstance_85();\n if (element.hasComponent(106)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n var hasNewConnectionsComponent = tmp$ret$1;\n var tmp;\n if (hasNewConnectionsComponent) {\n var orderOfChildren = findCorrectEntityGroupOrderFromConnectionGraph(this, shadowEntity);\n tmp = orderOfChildren;\n } else {\n var childrenLeft = toMutableList(get_children(shadowEntity));\n // Inline function 'kotlin.collections.mutableListOf' call\n var childrenInOrder = ArrayList_init_$Create$();\n var index = 0;\n $l$loop: while (true) {\n var tmp_0;\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!childrenLeft.b1()) {\n tmp_0 = index < childrenLeft.n();\n } else {\n tmp_0 = false;\n }\n if (!tmp_0) {\n break $l$loop;\n }\n var child = childrenLeft.f1(index);\n var tmp_1 = ConnectionUtils_instance;\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$4 = copyToArray(childrenLeft);\n var hasPossibleGuestConnections = tmp_1.calculateAllConnectionsToHierarchies(child, tmp$ret$4);\n index = index + 1 | 0;\n // Inline function 'kotlin.collections.isEmpty' call\n if (hasPossibleGuestConnections.length === 0) {\n childrenInOrder.q(child);\n childrenLeft.r(child);\n index = 0;\n }\n }\n return childrenInOrder;\n }\n return tmp;\n };\n var Companion_instance_87;\n function Companion_getInstance_88() {\n return Companion_instance_87;\n }\n function ConnectionGraphBuildOrder() {\n }\n function EntityTreeBuilder$InterceptingAssemblyPartCatalog$productSpecification$lambda($productRef) {\n return function (it) {\n return get_productRef(it) === $productRef;\n };\n }\n function modifyAssemblyComponentsIfNeeded($this, idMap, specification, shadowEntity) {\n var tmp;\n var tmp_0;\n if (specification == null) {\n tmp_0 = null;\n } else {\n tmp_0 = specification.hasComponent(12);\n }\n if (tmp_0 === true) {\n var withoutUnlockedChildren = removeNonLockedPartsFromAssemblyStructure($this, specification);\n var withPartsMap = addPartsMap($this, shadowEntity, withoutUnlockedChildren);\n tmp = addIdsMap($this, shadowEntity, idMap, withPartsMap);\n } else {\n tmp = specification;\n }\n return tmp;\n }\n function removeNonLockedPartsFromAssemblyStructure($this, specification) {\n var tmp0_elvis_lhs = specification._findComponentKt(12);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return specification;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var assemblyStructureComponent = tmp;\n var newParts = removeLockedChildren($this, assemblyStructureComponent.parts);\n var tmp_0;\n if (!(newParts == null)) {\n tmp_0 = specification.addComponent(new AssemblyStructureComponent(newParts));\n } else {\n tmp_0 = specification;\n }\n return tmp_0;\n }\n function addPartsMap($this, shadowEntity, specification) {\n var partsMap = ProductCatalogFunctions_instance.getPartsMap(shadowEntity);\n var tmp;\n // Inline function 'kotlin.collections.isEmpty' call\n if (partsMap.length === 0) {\n tmp = specification;\n } else {\n tmp = specification.addComponent(AssemblyPartsComponent_init_$Create$(partsMap));\n }\n return tmp;\n }\n function removeLockedChildren($this, parts) {\n if (parts == null)\n return null;\n // Inline function 'kotlin.collections.isEmpty' call\n if (parts.length === 0) {\n // Inline function 'kotlin.emptyArray' call\n return [];\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = parts.length;\n while (inductionVariable < last) {\n var element = parts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.Companion.removeLockedChildren.' call\n var tmp;\n if (element.locked) {\n tmp = element.copy(VOID, VOID, VOID, removeLockedChildren(Companion_getInstance_89(), element.children));\n } else {\n tmp = null;\n }\n var tmp0_safe_receiver = tmp;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n return copyToArray(destination);\n }\n function addIdsMap($this, entity, idMap, specification) {\n if (specification == null)\n return null;\n // Inline function 'kotlin.collections.mapValues' call\n var this_0 = Companion_instance.partIdsMapForEntity(entity, true);\n // Inline function 'kotlin.collections.mapValuesTo' call\n var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.n()));\n // Inline function 'kotlin.collections.associateByTo' call\n var tmp0_iterator = this_0.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.mapValuesTo.' call\n var tmp = element.t2();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.Companion.addIdsMap.' call\n // Inline function 'kotlin.collections.component2' call\n var shadowId = element.u2();\n var tmp$ret$2 = idMap(shadowId);\n destination.r2(tmp, tmp$ret$2);\n }\n var partsMap = destination;\n var tmp_0;\n if (partsMap.b1()) {\n tmp_0 = specification;\n } else {\n tmp_0 = specification.addComponent(new AssemblyPartIdsComponent(partsMap));\n }\n return tmp_0;\n }\n function mapShadowIdToRealId($this, shadowId) {\n // Inline function 'kotlin.collections.getOrPut' call\n var this_0 = $this.entityIdMap;\n var value = this_0.b3(shadowId);\n var tmp;\n if (value == null) {\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.mapShadowIdToRealId.' call\n var answer = $this.p2n_1.getNextId();\n this_0.r2(shadowId, answer);\n tmp = answer;\n } else {\n tmp = value;\n }\n return tmp;\n }\n function buildAutomaticGroupEntityTree($this, groupShadowRoot) {\n var tmp0_elvis_lhs = createEntityFromShadow($this, groupShadowRoot);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var root = tmp;\n var newEntitiesWithChildren = buildEntityTreeInternal$default($this, groupShadowRoot, null);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = newEntitiesWithChildren.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildAutomaticGroupEntityTree.' call\n setParentMaintainWorldTransform(element.newEntity, root);\n }\n // Inline function 'kotlin.collections.mutableListOf' call\n var hosts = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = newEntitiesWithChildren.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildAutomaticGroupEntityTree.' call\n if (any_0(hosts)) {\n var snapSettings = new SnapSettings(true, true, false, true);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n var tmp_0 = SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_DISTANCE;\n var tmp_1 = SnapUtils_instance;\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$1 = copyToArray(hosts);\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = tmp_0.sortAndSelect(tmp_1.matchingSnapActionCandidatesMultipleHosts(element_0.newEntity, tmp$ret$1, snapSettings));\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element_1 = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildAutomaticGroupEntityTree..' call\n if (element_1.movement.equals(Companion_getInstance_61().ZERO) ? element_1.deltaRotation.equals(Companion_getInstance_57().IDENTITY) : false) {\n destination.q(element_1);\n }\n }\n var candidates = copyToArray(destination);\n var validCandidate = $this.r2n_1.getFirstValidSnapAction(candidates, false).af();\n var tmp2_safe_receiver = validCandidate == null ? null : validCandidate.createAction();\n if (tmp2_safe_receiver == null)\n null;\n else {\n tmp2_safe_receiver.perform();\n }\n }\n hosts.q(element_0.newEntity);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_1 = element_0.children.t();\n while (tmp0_iterator_1.u()) {\n var element_2 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildAutomaticGroupEntityTree..' call\n $this.buildEntityTree(element_2.shadowEntity, element_0.newEntity);\n }\n }\n var group = get_automaticEntityGroup(first(newEntitiesWithChildren).newEntity);\n if (group == null)\n null;\n else {\n setParent(group, null);\n }\n return group;\n }\n function hasAnyEntityWithSerializedConnections($this, shadowRoot) {\n var tmp = HierarchyUtils_instance;\n return !(tmp.findInHierarchy(shadowRoot, EntityTreeBuilder$hasAnyEntityWithSerializedConnections$lambda) == null);\n }\n function ShadowEntityWithParent(shadowEntity, parent, existingChild) {\n existingChild = existingChild === VOID ? null : existingChild;\n this.shadowEntity = shadowEntity;\n this.parent = parent;\n this.existingChild = existingChild;\n }\n protoOf(ShadowEntityWithParent).u2n = function () {\n return this.shadowEntity;\n };\n protoOf(ShadowEntityWithParent).z27 = function () {\n return this.parent;\n };\n protoOf(ShadowEntityWithParent).v2n = function () {\n return this.existingChild;\n };\n protoOf(ShadowEntityWithParent).af = function () {\n return this.shadowEntity;\n };\n protoOf(ShadowEntityWithParent).bf = function () {\n return this.parent;\n };\n protoOf(ShadowEntityWithParent).g1k = function () {\n return this.existingChild;\n };\n protoOf(ShadowEntityWithParent).w2n = function (shadowEntity, parent, existingChild) {\n return new ShadowEntityWithParent(shadowEntity, parent, existingChild);\n };\n protoOf(ShadowEntityWithParent).copy = function (shadowEntity, parent, existingChild, $super) {\n shadowEntity = shadowEntity === VOID ? this.shadowEntity : shadowEntity;\n parent = parent === VOID ? this.parent : parent;\n existingChild = existingChild === VOID ? this.existingChild : existingChild;\n return this.w2n(shadowEntity, parent, existingChild);\n };\n protoOf(ShadowEntityWithParent).toString = function () {\n return 'ShadowEntityWithParent(shadowEntity=' + this.shadowEntity + ', parent=' + this.parent + ', existingChild=' + this.existingChild + ')';\n };\n protoOf(ShadowEntityWithParent).hashCode = function () {\n var result = this.shadowEntity.hashCode();\n result = imul(result, 31) + (this.parent == null ? 0 : this.parent.hashCode()) | 0;\n result = imul(result, 31) + (this.existingChild == null ? 0 : this.existingChild.hashCode()) | 0;\n return result;\n };\n protoOf(ShadowEntityWithParent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ShadowEntityWithParent))\n return false;\n var tmp0_other_with_cast = other instanceof ShadowEntityWithParent ? other : THROW_CCE();\n if (!this.shadowEntity.equals(tmp0_other_with_cast.shadowEntity))\n return false;\n if (!equals(this.parent, tmp0_other_with_cast.parent))\n return false;\n if (!equals(this.existingChild, tmp0_other_with_cast.existingChild))\n return false;\n return true;\n };\n function NewEntityWithShadowChildren(newEntity, children) {\n this.newEntity = newEntity;\n this.children = children;\n }\n protoOf(NewEntityWithShadowChildren).e1j = function () {\n return this.newEntity;\n };\n protoOf(NewEntityWithShadowChildren).c1k = function () {\n return this.children;\n };\n protoOf(NewEntityWithShadowChildren).af = function () {\n return this.newEntity;\n };\n protoOf(NewEntityWithShadowChildren).bf = function () {\n return this.children;\n };\n protoOf(NewEntityWithShadowChildren).x2n = function (newEntity, children) {\n return new NewEntityWithShadowChildren(newEntity, children);\n };\n protoOf(NewEntityWithShadowChildren).copy = function (newEntity, children, $super) {\n newEntity = newEntity === VOID ? this.newEntity : newEntity;\n children = children === VOID ? this.children : children;\n return this.x2n(newEntity, children);\n };\n protoOf(NewEntityWithShadowChildren).toString = function () {\n return 'NewEntityWithShadowChildren(newEntity=' + this.newEntity + ', children=' + this.children + ')';\n };\n protoOf(NewEntityWithShadowChildren).hashCode = function () {\n var result = this.newEntity.hashCode();\n result = imul(result, 31) + hashCode(this.children) | 0;\n return result;\n };\n protoOf(NewEntityWithShadowChildren).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof NewEntityWithShadowChildren))\n return false;\n var tmp0_other_with_cast = other instanceof NewEntityWithShadowChildren ? other : THROW_CCE();\n if (!this.newEntity.equals(tmp0_other_with_cast.newEntity))\n return false;\n if (!equals(this.children, tmp0_other_with_cast.children))\n return false;\n return true;\n };\n function buildEntityTreeInternal($this, shadowRoot, parent, preCreated) {\n var tmp;\n if (get_isAutomaticGroup(shadowRoot)) {\n var theSecretOrderOfTheShadowChildren = findCorrectEntityGroupOrder($this, shadowRoot);\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = theSecretOrderOfTheShadowChildren.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildEntityTreeInternal.' call\n element.removeComponentInternal(17);\n Companion_getInstance_107();\n element.removeComponentInternal(6);\n var list = buildEntityTreeInternal$default($this, element, parent);\n addAll(destination, list);\n }\n var newChildren = destination;\n tmp = newChildren;\n } else if (get_isManualGroup(shadowRoot)) {\n var theSecretOrderOfTheShadowChildren_0 = findCorrectEntityGroupOrder($this, shadowRoot);\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = theSecretOrderOfTheShadowChildren_0.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildEntityTreeInternal.' call\n element_0.removeComponentInternal(17);\n Companion_getInstance_107();\n element_0.removeComponentInternal(6);\n var list_0 = buildEntityTreeInternal$default($this, element_0, parent);\n addAll(destination_0, list_0);\n }\n var newChildren_0 = destination_0;\n var tmp_0;\n if (any_0(newChildren_0)) {\n var existingEntityGroup = preCreated == null ? $this.p2n_1.createEntityInternal(mapShadowIdToRealId($this, shadowRoot.id)) : preCreated;\n var tmp_1 = Companion_getInstance_43();\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(newChildren_0, 10));\n var tmp0_iterator_1 = newChildren_0.t();\n while (tmp0_iterator_1.u()) {\n var item = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildEntityTreeInternal.' call\n var tmp$ret$6 = item.newEntity;\n destination_1.q(tmp$ret$6);\n }\n var tmp$ret$9 = copyToArray(destination_1);\n var groupParent = tmp_1.createManualEntityGroup(tmp$ret$9, existingEntityGroup, $this.p2n_1, $this.s2n_1);\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_2 = ArrayList_init_$Create$();\n var tmp0_iterator_2 = newChildren_0.t();\n while (tmp0_iterator_2.u()) {\n var element_1 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildEntityTreeInternal.' call\n var list_1 = element_1.children;\n addAll(destination_2, list_1);\n }\n tmp_0 = listOf(new NewEntityWithShadowChildren(groupParent, destination_2));\n } else {\n tmp_0 = newChildren_0;\n }\n tmp = tmp_0;\n } else {\n var newEntity = buildEntityTreeNode($this, shadowRoot, parent, preCreated);\n var tmp_2;\n if (newEntity == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildEntityTreeInternal.' call\n tmp_2 = listOf(newEntity);\n }\n var tmp2_elvis_lhs = tmp_2;\n tmp = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;\n }\n var newChildren_1 = tmp;\n return newChildren_1;\n }\n function buildEntityTreeInternal$default($this, shadowRoot, parent, preCreated, $super) {\n parent = parent === VOID ? null : parent;\n preCreated = preCreated === VOID ? null : preCreated;\n return buildEntityTreeInternal($this, shadowRoot, parent, preCreated);\n }\n function buildEntityTreeNode($this, shadowEntity, parent, preCreated) {\n var tmp;\n if (!(preCreated == null)) {\n tmp = preCreated;\n } else {\n var tmp0_elvis_lhs = createEntityFromShadow($this, shadowEntity);\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n var entity = tmp_0;\n repositionAndAddComponentsToPartsOfAssembly($this, entity, shadowEntity);\n addSerializedComponents($this, shadowEntity, entity);\n placeNewEntity($this, shadowEntity, entity, parent);\n tmp = entity;\n }\n var newEntity = tmp;\n var children = buildChildren($this, shadowEntity, newEntity);\n return new NewEntityWithShadowChildren(newEntity, children);\n }\n function buildEntityTreeNode$default($this, shadowEntity, parent, preCreated, $super) {\n parent = parent === VOID ? null : parent;\n preCreated = preCreated === VOID ? null : preCreated;\n return buildEntityTreeNode($this, shadowEntity, parent, preCreated);\n }\n function buildChildren($this, shadowEntity, newEntity) {\n // Inline function 'kotlin.collections.map' call\n var this_0 = immediateNonPartDescendants($this, shadowEntity);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildChildren.' call\n var childParent = findParentAmongCreatedEntities($this, item, newEntity);\n // Inline function 'kotlin.collections.find' call\n var this_1 = get_children(newEntity);\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_1.length;\n while (inductionVariable < last) {\n var element = this_1[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildChildren..' call\n var mappedShadowId = mapShadowIdToRealId($this, item.id);\n if (element.id === mappedShadowId) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var existingChild = tmp$ret$1;\n var tmp;\n if (!(existingChild == null)) {\n existingChild.addComponent(new LocalTransformComponent(get_localTransform(item)));\n tmp = new ShadowEntityWithParent(item, childParent, existingChild);\n } else {\n tmp = new ShadowEntityWithParent(item, childParent);\n }\n var tmp$ret$3 = tmp;\n destination.q(tmp$ret$3);\n }\n var children = destination;\n return children;\n }\n function findParentAmongCreatedEntities($this, shadowChild, newEntity) {\n var tmp0_safe_receiver = get_childComponent(shadowChild);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.parent;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.id;\n var shadowParentId = tmp2_elvis_lhs == null ? newEntity.id : tmp2_elvis_lhs;\n var mappedShadowParentId = mapShadowIdToRealId($this, shadowParentId);\n // Inline function 'kotlin.sequences.find' call\n var this_0 = get_hierarchySequence(newEntity);\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.sequences.firstOrNull' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.findParentAmongCreatedEntities.' call\n if (element.id === mappedShadowParentId) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp3_elvis_lhs = tmp$ret$1;\n return tmp3_elvis_lhs == null ? newEntity : tmp3_elvis_lhs;\n }\n function repositionAndAddComponentsToPartsOfAssembly($this, newEntity, shadowEntity) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_descendants(newEntity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.repositionAndAddComponentsToPartsOfAssembly.' call\n var shadowVersion = findInHierarchy(shadowEntity, EntityTreeBuilder$repositionAndAddComponentsToPartsOfAssembly$lambda($this, element));\n if (!(shadowVersion == null)) {\n TransformUtils_instance.setWorldTransform(element, get_worldTransform(shadowVersion));\n addSerializedComponents($this, shadowVersion, element);\n }\n }\n }\n function immediateNonPartDescendants($this, entity) {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = get_children(entity);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.immediateNonPartDescendants.' call\n var list = !get_isProductPart(element) ? listOf(element) : immediateNonPartDescendants($this, element);\n addAll(destination, list);\n }\n return destination;\n }\n function createEntityFromShadow($this, shadowEntity) {\n var tmp;\n if (shadowEntity.hasComponent(18)) {\n tmp = recreateProduct($this, shadowEntity);\n } else {\n var entityId = mapShadowIdToRealId($this, shadowEntity.id);\n tmp = $this.p2n_1.createEntityInternal(entityId);\n }\n var newEntity = tmp;\n if (newEntity == null)\n null;\n else\n newEntity.addComponent(new LocalTransformComponent(get_worldTransform(shadowEntity)));\n if (newEntity == null)\n null;\n else\n newEntity.addComponent(new WorldTransformComponent(get_worldTransform(shadowEntity)));\n return newEntity;\n }\n function addSerializedComponents($this, shadowEntity, newEntity) {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = shadowEntity.components();\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.addSerializedComponents.' call\n if (element.serializable ? true : contains(Companion_getInstance_89().y2n_1, element.typeId)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.addSerializedComponents.' call\n var tmp;\n var tmp_0;\n var tmp_1;\n var tmp_2 = element_0.typeId;\n Companion_getInstance_110();\n if (!(tmp_2 === 10)) {\n var tmp_3 = element_0.typeId;\n Companion_getInstance_107();\n tmp_1 = !(tmp_3 === 6);\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n var tmp_4 = element_0.typeId;\n tmp_0 = !(tmp_4 === 16);\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n var tmp_5 = element_0.typeId;\n tmp = !(tmp_5 === 17);\n } else {\n tmp = false;\n }\n if (tmp) {\n destination_0.q(element_0);\n }\n }\n var tmp0_iterator_0 = destination_0.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.addSerializedComponents.' call\n newEntity.addComponent(element_1);\n }\n }\n function placeNewEntity($this, shadowEntity, newEntity, parent) {\n var hasShadowParent = !(get_parent(shadowEntity) == null);\n if (hasShadowParent ? true : !(parent == null)) {\n Companion_getInstance_85();\n var hadConnectionBefore = shadowEntity.hasComponent(106);\n var shouldResnap = ($this.t2n_1 ? hadConnectionBefore : false) ? true : !$this.t2n_1;\n if (shouldResnap) {\n resnapNewEntity($this, hasShadowParent, newEntity, parent);\n } else {\n setParentMaintainWorldTransform(newEntity, parent);\n }\n } else if (!get_localTransform(shadowEntity).rotation.isIdentity ? true : !get_localTransform(shadowEntity).position.isZero()) {\n newEntity.addComponent(new LocalTransformComponent(get_localTransform(shadowEntity)));\n }\n }\n function resnapNewEntity($this, hasShadowParent, newEntity, parent) {\n var candidates = findSnapsForNewEntity($this, hasShadowParent, newEntity, parent);\n var tmp;\n if (candidates == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n tmp = !(candidates.length === 0);\n }\n if (tmp === true) {\n var validCandidate = $this.r2n_1.getFirstValidSnapAction(candidates, false).af();\n if (!(validCandidate == null)) {\n validCandidate.createAction().perform();\n } else {\n var tmp_0 = Companion_getInstance_89().logger;\n tmp_0.warn(EntityTreeBuilder$resnapNewEntity$lambda(newEntity));\n first_0(candidates).createAction().perform();\n }\n } else {\n setParentMaintainWorldTransform(newEntity, parent);\n }\n }\n function findSnapsForNewEntity($this, hasShadowParent, newEntity, parent) {\n var hasShadowParentSnapSettings = new SnapSettings(true, true, true, true);\n var nonNullParentSettings = new SnapSettings(true, true, false, true);\n var tmp;\n if (hasShadowParent ? !(parent == null) : false) {\n tmp = SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_DISTANCE.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidates(newEntity, parent, hasShadowParentSnapSettings));\n } else if (!(parent == null)) {\n var tmp_0 = SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_DISTANCE;\n var tmp_1 = SnapUtils_instance;\n // Inline function 'kotlin.collections.plus' call\n var this_0 = get_upwardsHierarchy(parent);\n var elements = get_descendants(parent);\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$1 = this_0.concat(elements);\n tmp = tmp_0.sortAndSelect(tmp_1.matchingSnapActionCandidatesMultipleHosts(newEntity, tmp$ret$1, nonNullParentSettings));\n } else {\n tmp = null;\n }\n return tmp;\n }\n function recreateProduct($this, shadowEntity) {\n var specification = $this.q2n_1.productSpecification(get_productRefOrEmptyString(shadowEntity));\n var tmp = Companion_getInstance_89();\n var refinedSpecification = modifyAssemblyComponentsIfNeeded(tmp, EntityTreeBuilder$mapShadowIdToRealId$ref($this), specification, shadowEntity);\n var interceptorCatalog = new InterceptingAssemblyPartCatalog(shadowEntity, $this.q2n_1, EntityTreeBuilder$mapShadowIdToRealId$ref_0($this));\n $this.q2n_1.addCatalog(interceptorCatalog);\n var tmp_0;\n if (refinedSpecification == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.recreateProduct.' call\n var entityId = mapShadowIdToRealId($this, shadowEntity.id);\n var product = $this.q2n_1.createFromSpecification(get_productRefOrEmptyString(shadowEntity), refinedSpecification, entityId);\n var tmp1_safe_receiver = product == null ? null : get_descendants(product);\n var tmp_1;\n if (tmp1_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.recreateProduct..' call\n Companion_getInstance_6();\n if (!element.hasComponent(44)) {\n destination.q(element);\n }\n }\n tmp_1 = destination;\n }\n var tmp2_safe_receiver = tmp_1;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = tmp2_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.recreateProduct..' call\n $this.p2n_1.disposeEntity(element_0);\n }\n }\n $this.q2n_1.removeCatalog(interceptorCatalog);\n var tmp4_safe_receiver = product == null ? null : get_hierarchySequence(product);\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator_0 = tmp4_safe_receiver.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.recreateProduct..' call\n element_1.removeComponent(96);\n }\n }\n tmp_0 = product;\n }\n return tmp_0;\n }\n function InterceptingAssemblyPartCatalog(currentProductRoot, productManager, idMapper) {\n this.currentProductRoot = currentProductRoot;\n this.productManager = productManager;\n this.idMapper = idMapper;\n this.z2n_1 = true;\n this.a2o_1 = false;\n }\n protoOf(InterceptingAssemblyPartCatalog).a1m = function () {\n return this.z2n_1;\n };\n protoOf(InterceptingAssemblyPartCatalog).productSpecification = function (productRef) {\n if (this.a2o_1) {\n return null;\n }\n var tmp0_elvis_lhs = findInHierarchy(this.currentProductRoot, EntityTreeBuilder$InterceptingAssemblyPartCatalog$productSpecification$lambda(productRef));\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var entityToCreate = tmp;\n this.a2o_1 = true;\n var specification = this.productManager.productSpecification(productRef);\n this.a2o_1 = false;\n return modifyAssemblyComponentsIfNeeded(Companion_getInstance_89(), this.idMapper, specification, entityToCreate);\n };\n protoOf(InterceptingAssemblyPartCatalog).rangeId = function () {\n return 'InterceptingAssemblyPartCatalog';\n };\n protoOf(InterceptingAssemblyPartCatalog).rangeVersion = function () {\n return '1.0';\n };\n protoOf(InterceptingAssemblyPartCatalog).toString = function () {\n return this.rangeId() + this.rangeVersion();\n };\n protoOf(InterceptingAssemblyPartCatalog).allProductRefs = function () {\n // Inline function 'kotlin.emptyArray' call\n return [];\n };\n function findCorrectEntityGroupOrder($this, shadowEntity) {\n return Companion_instance_87.findCorrectEntityGroupOrder(shadowEntity);\n }\n function Companion_88() {\n Companion_instance_88 = this;\n this.logger = LoggerState_getInstance().m1m('EntityTreeBuilder');\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.y2n_1 = [41, 100];\n }\n protoOf(Companion_88).x1i = function () {\n return this.logger;\n };\n var Companion_instance_88;\n function Companion_getInstance_89() {\n if (Companion_instance_88 == null)\n new Companion_88();\n return Companion_instance_88;\n }\n function EntityTreeBuilder$hasAnyEntityWithSerializedConnections$lambda(it) {\n Companion_getInstance_85();\n return it.hasComponent(106);\n }\n function EntityTreeBuilder$repositionAndAddComponentsToPartsOfAssembly$lambda(this$0, $newEntityPart) {\n return function (shadowEntity) {\n var mappedShadowId = mapShadowIdToRealId(this$0, shadowEntity.id);\n return mappedShadowId === $newEntityPart.id;\n };\n }\n function EntityTreeBuilder$resnapNewEntity$lambda($newEntity) {\n return function () {\n return 'Could not find a valid snap, for ' + $newEntity + ' with product ref ' + get_productRefOrEmptyString($newEntity) + ', when rebuilding scene. Will use the first non valid snap.';\n };\n }\n function EntityTreeBuilder$mapShadowIdToRealId$ref($boundThis) {\n var l = function (p0) {\n return mapShadowIdToRealId($boundThis, p0);\n };\n l.callableName = 'mapShadowIdToRealId';\n return l;\n }\n function EntityTreeBuilder$mapShadowIdToRealId$ref_0($boundThis) {\n var l = function (p0) {\n return mapShadowIdToRealId($boundThis, p0);\n };\n l.callableName = 'mapShadowIdToRealId';\n return l;\n }\n function EntityTreeBuilder(entityManager, productManager, validationService, sceneManager) {\n Companion_getInstance_89();\n this.p2n_1 = entityManager;\n this.q2n_1 = productManager;\n this.r2n_1 = validationService;\n this.s2n_1 = sceneManager;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp.entityIdMap = LinkedHashMap_init_$Create$_0();\n this.t2n_1 = false;\n }\n protoOf(EntityTreeBuilder).b2o = function () {\n return this.entityIdMap;\n };\n protoOf(EntityTreeBuilder).c2o = function (shadowRoot, parent) {\n this.t2n_1 = hasAnyEntityWithSerializedConnections(this, shadowRoot);\n if (get_isAutomaticGroup(shadowRoot))\n return buildAutomaticGroupEntityTree(this, shadowRoot);\n // Inline function 'kotlin.collections.mutableListOf' call\n var remainingToBuild = ArrayList_init_$Create$();\n remainingToBuild.q(new ShadowEntityWithParent(shadowRoot, parent));\n var root = null;\n $l$loop: while (true) {\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!!remainingToBuild.b1()) {\n break $l$loop;\n }\n var next = removeFirst(remainingToBuild);\n var newEntitiesWithChildren = buildEntityTreeInternal$default(this, next.shadowEntity, next.parent);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = newEntitiesWithChildren.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.entitytreebuilder.EntityTreeBuilder.buildEntityTree.' call\n remainingToBuild.x(element.children);\n }\n var tmp;\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!newEntitiesWithChildren.b1()) {\n tmp = root == null;\n } else {\n tmp = false;\n }\n if (tmp) {\n root = newEntitiesWithChildren.f1(0).newEntity;\n }\n }\n return root;\n };\n protoOf(EntityTreeBuilder).buildEntityTree = function (shadowRoot, parent, $super) {\n parent = parent === VOID ? null : parent;\n return this.c2o(shadowRoot, parent);\n };\n function Companion_89() {\n Companion_instance_89 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.d2o_1 = [null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];\n }\n protoOf(Companion_89).l17 = function () {\n return $serializer_getInstance_13();\n };\n var Companion_instance_89;\n function Companion_getInstance_90() {\n if (Companion_instance_89 == null)\n new Companion_89();\n return Companion_instance_89;\n }\n function $serializer_13() {\n $serializer_instance_13 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.serialization.v13.SerializableEntityV13', this, 5);\n tmp0_serialDesc.cv('id', true);\n tmp0_serialDesc.cv('ref', true);\n tmp0_serialDesc.cv('parent', true);\n tmp0_serialDesc.cv('needsResnap', true);\n tmp0_serialDesc.cv('c', true);\n this.e2o_1 = tmp0_serialDesc;\n }\n protoOf($serializer_13).ok = function () {\n return this.e2o_1;\n };\n protoOf($serializer_13).rv = function () {\n var tmp0_cached = Companion_getInstance_90().d2o_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), BooleanSerializer_getInstance(), get_nullable(tmp0_cached[4])];\n };\n protoOf($serializer_13).qk = function (decoder) {\n var tmp0_desc = this.e2o_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = false;\n var tmp8_local4 = null;\n var tmp10_input = decoder.nn(tmp0_desc);\n var tmp11_cached = Companion_getInstance_90().d2o_1;\n if (tmp10_input.do()) {\n tmp4_local0 = tmp10_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp10_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp10_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp10_input.pn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp10_input.bo(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp10_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp10_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp10_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp10_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp10_input.pn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp10_input.bo(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp10_input.on(tmp0_desc);\n return SerializableEntityV13_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);\n };\n protoOf($serializer_13).f2o = function (encoder, value) {\n var tmp0_desc = this.e2o_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_90().d2o_1;\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !(value.g2o_1 === 'N/A')) {\n tmp1_output.cp(tmp0_desc, 0, value.g2o_1);\n }\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.h2o_1 === '')) {\n tmp1_output.cp(tmp0_desc, 1, value.h2o_1);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.i2o_1 == null)) {\n tmp1_output.gp(tmp0_desc, 2, StringSerializer_getInstance(), value.i2o_1);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.needsResnap === false)) {\n tmp1_output.uo(tmp0_desc, 3, value.needsResnap);\n }\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.j2o_1 == null)) {\n tmp1_output.gp(tmp0_desc, 4, tmp2_cached[4], value.j2o_1);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_13).pk = function (encoder, value) {\n return this.f2o(encoder, value instanceof SerializableEntityV13 ? value : THROW_CCE());\n };\n var $serializer_instance_13;\n function $serializer_getInstance_13() {\n if ($serializer_instance_13 == null)\n new $serializer_13();\n return $serializer_instance_13;\n }\n function SerializableEntityV13_init_$Init$(seen1, id, ref, parent, needsResnap, serializedComponents, serializationConstructorMarker, $this) {\n if (!(0 === (0 & seen1))) {\n throwMissingFieldException(seen1, 0, $serializer_getInstance_13().e2o_1);\n }\n if (0 === (seen1 & 1))\n $this.g2o_1 = 'N/A';\n else\n $this.g2o_1 = id;\n if (0 === (seen1 & 2))\n $this.h2o_1 = '';\n else\n $this.h2o_1 = ref;\n if (0 === (seen1 & 4))\n $this.i2o_1 = null;\n else\n $this.i2o_1 = parent;\n if (0 === (seen1 & 8))\n $this.needsResnap = false;\n else\n $this.needsResnap = needsResnap;\n if (0 === (seen1 & 16))\n $this.j2o_1 = null;\n else\n $this.j2o_1 = serializedComponents;\n $this.k2o_1 = null;\n return $this;\n }\n function SerializableEntityV13_init_$Create$(seen1, id, ref, parent, needsResnap, serializedComponents, serializationConstructorMarker) {\n return SerializableEntityV13_init_$Init$(seen1, id, ref, parent, needsResnap, serializedComponents, serializationConstructorMarker, objectCreate(protoOf(SerializableEntityV13)));\n }\n function init$add(base, $parse, c) {\n var serializable = unsafeCast(c);\n // Inline function 'kotlin.collections.set' call\n var key = serializable.serializationKey();\n var value = serializable.toJson($parse);\n base.r2(key, value);\n }\n function SerializableEntityV13() {\n Companion_getInstance_90();\n this.g2o_1 = 'N/A';\n this.h2o_1 = '';\n this.i2o_1 = null;\n this.needsResnap = false;\n this.j2o_1 = null;\n this.k2o_1 = null;\n }\n protoOf(SerializableEntityV13).u2m = function (_set____db54di) {\n this.g2o_1 = _set____db54di;\n };\n protoOf(SerializableEntityV13).s1k = function () {\n return this.g2o_1;\n };\n protoOf(SerializableEntityV13).v2m = function (_set____db54di) {\n this.h2o_1 = _set____db54di;\n };\n protoOf(SerializableEntityV13).w2m = function () {\n return this.h2o_1;\n };\n protoOf(SerializableEntityV13).x2m = function (_set____db54di) {\n this.i2o_1 = _set____db54di;\n };\n protoOf(SerializableEntityV13).z27 = function () {\n return this.i2o_1;\n };\n protoOf(SerializableEntityV13).l2o = function (_set____db54di) {\n this.needsResnap = _set____db54di;\n };\n protoOf(SerializableEntityV13).m2o = function () {\n return this.needsResnap;\n };\n protoOf(SerializableEntityV13).y2m = function (_set____db54di) {\n this.j2o_1 = _set____db54di;\n };\n protoOf(SerializableEntityV13).z2m = function () {\n return this.j2o_1;\n };\n protoOf(SerializableEntityV13).a2n = function (_set____db54di) {\n this.k2o_1 = _set____db54di;\n };\n protoOf(SerializableEntityV13).j1m = function () {\n return this.k2o_1;\n };\n protoOf(SerializableEntityV13).init = function (entity, parse) {\n this.g2o_1 = entity.id.toString();\n // Inline function 'kotlin.collections.mutableMapOf' call\n var base = LinkedHashMap_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = entity.components();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.v13.SerializableEntityV13.init.' call\n if (element.serializable) {\n init$add(base, parse, element);\n } else {\n var tmp = element.typeId;\n if (tmp === 18) {\n var tmp_0 = this;\n tmp_0.h2o_1 = (element instanceof ProductComponent ? element : THROW_CCE()).productRef;\n }\n }\n }\n this.j2o_1 = base;\n };\n protoOf(SerializableEntityV13).setParent = function (parent, needsResnap) {\n this.i2o_1 = parent.id.toString();\n this.needsResnap = needsResnap;\n };\n function deserializeComponentsForEntity($this, entityDO, serializers) {\n var tmp0_safe_receiver = entityDO.j2o_1;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = tmp0_safe_receiver.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.serialization.v13.SerializableTreeV13.deserializeComponentsForEntity.' call\n // Inline function 'kotlin.collections.component1' call\n var key = element.t2();\n // Inline function 'kotlin.collections.component2' call\n var value = element.u2();\n var tmp0_safe_receiver_0 = deserializeComponent($this, key, value, serializers);\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver_0);\n }\n }\n tmp = destination;\n }\n var tmp1_elvis_lhs = tmp;\n var components = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;\n var tmp_0 = entityDO;\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = copyToArray(components);\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$11 = [new PreviouslySerializedIdComponent(entityDO.g2o_1)];\n tmp_0.k2o_1 = this_0.concat(tmp$ret$11);\n }\n function deserializeComponent($this, key, json, serializers) {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = serializers.length;\n while (inductionVariable < last) {\n var element = serializers[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.v13.SerializableTreeV13.deserializeComponent.' call\n if (element.canHandle(key)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var found = tmp$ret$1;\n if (found == null) {\n var tmp = Companion_getInstance_91().logger;\n tmp.warn(SerializableTreeV13$deserializeComponent$lambda(key));\n }\n return found == null ? null : found.deserialize(key, json);\n }\n function Companion_90() {\n Companion_instance_90 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.o2m_1 = [new ArrayListSerializer($serializer_getInstance_13()), new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null];\n this.logger = LoggerState_getInstance().m1m('SerializableTreeV13');\n }\n protoOf(Companion_90).buildTreeAndSerialize = function (roots, productManager) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filterNot' call\n // Inline function 'kotlin.collections.filterNotTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = roots.length;\n while (inductionVariable < last) {\n var element = roots[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.v13.Companion.buildTreeAndSerialize.' call\n if (!element.hasComponent(Companion_instance_85.id)) {\n destination.q(element);\n }\n }\n var cleanedEntities = copyToArray(destination);\n var serializableEntities = Companion_getInstance_92().serializeForest(cleanedEntities);\n var serializableCatalogs = Companion_getInstance_92().serializeCatalogs(productManager);\n return Companion_getInstance_82().StrictPretty.i15(this.l17(), new SerializableTreeV13(toMutableList_0(serializableEntities), serializableCatalogs));\n };\n protoOf(Companion_90).x1i = function () {\n return this.logger;\n };\n protoOf(Companion_90).l17 = function () {\n return $serializer_getInstance_14();\n };\n var Companion_instance_90;\n function Companion_getInstance_91() {\n if (Companion_instance_90 == null)\n new Companion_90();\n return Companion_instance_90;\n }\n function $serializer_14() {\n $serializer_instance_14 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.serialization.v13.SerializableTreeV13', this, 3);\n tmp0_serialDesc.cv('entities', true);\n tmp0_serialDesc.cv('catalogs', false);\n tmp0_serialDesc.cv('version', true);\n this.n2o_1 = tmp0_serialDesc;\n }\n protoOf($serializer_14).ok = function () {\n return this.n2o_1;\n };\n protoOf($serializer_14).rv = function () {\n var tmp0_cached = Companion_getInstance_91().o2m_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [tmp0_cached[0], tmp0_cached[1], StringSerializer_getInstance()];\n };\n protoOf($serializer_14).qk = function (decoder) {\n var tmp0_desc = this.n2o_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp8_input = decoder.nn(tmp0_desc);\n var tmp9_cached = Companion_getInstance_91().o2m_1;\n if (tmp8_input.do()) {\n tmp4_local0 = tmp8_input.zn(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp8_input.zn(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp8_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp8_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp8_input.zn(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp8_input.zn(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp8_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp8_input.on(tmp0_desc);\n return SerializableTreeV13_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_14).o2o = function (encoder, value) {\n var tmp0_desc = this.n2o_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_91().o2m_1;\n var tmp;\n if (tmp1_output.kp(tmp0_desc, 0)) {\n tmp = true;\n } else {\n var tmp_0 = value.p2o_1;\n // Inline function 'kotlin.collections.mutableListOf' call\n var tmp$ret$0 = ArrayList_init_$Create$();\n tmp = !equals(tmp_0, tmp$ret$0);\n }\n if (tmp) {\n tmp1_output.ep(tmp0_desc, 0, tmp2_cached[0], value.p2o_1);\n }\n tmp1_output.ep(tmp0_desc, 1, tmp2_cached[1], value.catalogs);\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.r2o_1 === '1.3')) {\n tmp1_output.cp(tmp0_desc, 2, value.r2o_1);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_14).pk = function (encoder, value) {\n return this.o2o(encoder, value instanceof SerializableTreeV13 ? value : THROW_CCE());\n };\n var $serializer_instance_14;\n function $serializer_getInstance_14() {\n if ($serializer_instance_14 == null)\n new $serializer_14();\n return $serializer_instance_14;\n }\n function SerializableTreeV13_init_$Init$(seen1, entities, catalogs, version, serializationConstructorMarker, $this) {\n if (!(2 === (2 & seen1))) {\n throwMissingFieldException(seen1, 2, $serializer_getInstance_14().n2o_1);\n }\n if (0 === (seen1 & 1)) {\n var tmp = $this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp.p2o_1 = ArrayList_init_$Create$();\n } else\n $this.p2o_1 = entities;\n $this.catalogs = catalogs;\n var tmp_0 = $this;\n // Inline function 'kotlin.emptyArray' call\n tmp_0.q2o_1 = [];\n if (0 === (seen1 & 4))\n $this.r2o_1 = '1.3';\n else\n $this.r2o_1 = version;\n return $this;\n }\n function SerializableTreeV13_init_$Create$(seen1, entities, catalogs, version, serializationConstructorMarker) {\n return SerializableTreeV13_init_$Init$(seen1, entities, catalogs, version, serializationConstructorMarker, objectCreate(protoOf(SerializableTreeV13)));\n }\n function SerializableTreeV13$deserializeComponent$lambda($key) {\n return function () {\n return 'There is no deserializer for ' + $key;\n };\n }\n function SerializableTreeV13$removeEntity$lambda($id) {\n return function (it) {\n return it.g2o_1 === $id;\n };\n }\n function SerializableTreeV13(entities, catalogs) {\n Companion_getInstance_91();\n var tmp;\n if (entities === VOID) {\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp = ArrayList_init_$Create$();\n } else {\n tmp = entities;\n }\n entities = tmp;\n this.p2o_1 = entities;\n this.catalogs = catalogs;\n var tmp_0 = this;\n // Inline function 'kotlin.emptyArray' call\n tmp_0.q2o_1 = [];\n this.r2o_1 = '1.3';\n }\n protoOf(SerializableTreeV13).s2o = function (_set____db54di) {\n this.p2o_1 = _set____db54di;\n };\n protoOf(SerializableTreeV13).o24 = function () {\n return this.p2o_1;\n };\n protoOf(SerializableTreeV13).d1m = function () {\n return this.catalogs;\n };\n protoOf(SerializableTreeV13).l2n = function () {\n return this.q2o_1;\n };\n protoOf(SerializableTreeV13).m2n = function () {\n return this.r2o_1;\n };\n protoOf(SerializableTreeV13).deserializeComponents = function (coreServices) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.p2o_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializableTreeV13.deserializeComponents.' call\n deserializeComponentsForEntity(this, element, coreServices.componentDeserializerRegistry.componentSerializers);\n element.j2o_1 = null;\n }\n };\n protoOf(SerializableTreeV13).afterDeserialized = function (coreServices) {\n var serializer = new SerializerV13(coreServices.entityManager, coreServices.productManager);\n this.q2o_1 = serializer.rebuildEntities(this.p2o_1);\n };\n protoOf(SerializableTreeV13).afterRebuildTree = function (root, coreServices) {\n Companion_getInstance_92().cleanUp(root);\n };\n protoOf(SerializableTreeV13).removeEntity = function (id) {\n var tmp = this.p2o_1;\n removeAll(tmp, SerializableTreeV13$removeEntity$lambda(id));\n };\n protoOf(SerializableTreeV13).af = function () {\n return this.p2o_1;\n };\n protoOf(SerializableTreeV13).bf = function () {\n return this.catalogs;\n };\n protoOf(SerializableTreeV13).t2o = function (entities, catalogs) {\n return new SerializableTreeV13(entities, catalogs);\n };\n protoOf(SerializableTreeV13).copy = function (entities, catalogs, $super) {\n entities = entities === VOID ? this.p2o_1 : entities;\n catalogs = catalogs === VOID ? this.catalogs : catalogs;\n return this.t2o(entities, catalogs);\n };\n protoOf(SerializableTreeV13).toString = function () {\n return 'SerializableTreeV13(entities=' + this.p2o_1 + ', catalogs=' + this.catalogs + ')';\n };\n protoOf(SerializableTreeV13).hashCode = function () {\n var result = hashCode(this.p2o_1);\n result = imul(result, 31) + hashCode(this.catalogs) | 0;\n return result;\n };\n protoOf(SerializableTreeV13).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof SerializableTreeV13))\n return false;\n var tmp0_other_with_cast = other instanceof SerializableTreeV13 ? other : THROW_CCE();\n if (!equals(this.p2o_1, tmp0_other_with_cast.p2o_1))\n return false;\n if (!equals(this.catalogs, tmp0_other_with_cast.catalogs))\n return false;\n return true;\n };\n function createSerializableEntitiesWithRelations($this, entity, parentProductRoot) {\n var realParent = get_parent(entity);\n var needsResnap = !equals(realParent, parentProductRoot);\n Companion_getInstance_18();\n var tmp0_safe_receiver = entity.__getComponentForKotlin(104);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.serialization.v13.Companion.createSerializableEntitiesWithRelations.' call\n entity.addComponentInternal(Companion_getInstance_85().fromConnectionsComponent(tmp0_safe_receiver));\n }\n // Inline function 'kotlin.apply' call\n var this_0 = new SerializableEntityV13();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.serialization.v13.Companion.createSerializableEntitiesWithRelations.' call\n this_0.init(entity, Json$parseToJsonElement$ref(Companion_getInstance_82().NonStrictPretty));\n var currentSerializedEntity = this_0;\n if (!(parentProductRoot == null)) {\n currentSerializedEntity.setParent(parentProductRoot, needsResnap);\n }\n Companion_getInstance_85();\n entity.removeComponentInternal(106);\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_1 = get_children(entity);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_1.length;\n while (inductionVariable < last) {\n var element = this_1[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.v13.Companion.createSerializableEntitiesWithRelations.' call\n var list = createSerializableEntitiesWithRelations(Companion_getInstance_92(), element, entity);\n addAll(destination, list);\n }\n var children = destination;\n return plus_1(children, new Pair(entity, currentSerializedEntity));\n }\n function Json$parseToJsonElement$ref($boundThis) {\n var l = function (p0) {\n return $boundThis.m15(p0);\n };\n l.callableName = 'parseToJsonElement';\n return l;\n }\n function SerializerV13$Companion$cleanUp$lambda(it) {\n Companion_getInstance_85();\n it.removeComponentInternal(106);\n return Unit_instance;\n }\n function deserializeId($this, stringId) {\n // Inline function 'kotlin.collections.getOrPut' call\n var this_0 = $this.entityIdMapper;\n var value = this_0.b3(stringId);\n var tmp;\n if (value == null) {\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.deserializeId.' call\n var answer = $this.u2o_1.getNextId();\n this_0.r2(stringId, answer);\n tmp = answer;\n } else {\n tmp = value;\n }\n return tmp;\n }\n function ProductRefLevel(ref, level) {\n this.ref = ref;\n this.level = level;\n }\n protoOf(ProductRefLevel).w2o = function (ref, level) {\n return new ProductRefLevel(ref, level);\n };\n protoOf(ProductRefLevel).copy = function (ref, level, $super) {\n ref = ref === VOID ? this.ref : ref;\n level = level === VOID ? this.level : level;\n return this.w2o(ref, level);\n };\n protoOf(ProductRefLevel).toString = function () {\n return 'ProductRefLevel(ref=' + this.ref + ', level=' + this.level + ')';\n };\n protoOf(ProductRefLevel).hashCode = function () {\n var result = getStringHashCode(this.ref);\n result = imul(result, 31) + this.level | 0;\n return result;\n };\n protoOf(ProductRefLevel).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ProductRefLevel))\n return false;\n var tmp0_other_with_cast = other instanceof ProductRefLevel ? other : THROW_CCE();\n if (!(this.ref === tmp0_other_with_cast.ref))\n return false;\n if (!(this.level === tmp0_other_with_cast.level))\n return false;\n return true;\n };\n function extractAssemblyParts($this, entityDOs, components) {\n // Inline function 'kotlin.collections.mutableMapOf' call\n var parts = LinkedHashMap_init_$Create$_0();\n // Inline function 'kotlin.collections.mutableMapOf' call\n var childToParentMap = LinkedHashMap_init_$Create$_0();\n // Inline function 'kotlin.collections.mutableMapOf' call\n var parentToChildMap = LinkedHashMap_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = entityDOs.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.extractAssemblyParts.' call\n var tmp0_safe_receiver = element.i2o_1;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var parentId = deserializeId($this, tmp0_safe_receiver);\n var entityId = deserializeId($this, element.g2o_1);\n // Inline function 'kotlin.collections.set' call\n childToParentMap.r2(entityId, parentId);\n // Inline function 'kotlin.collections.getOrPut' call\n var value = parentToChildMap.b3(parentId);\n var tmp;\n if (value == null) {\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.extractAssemblyParts...' call\n // Inline function 'kotlin.collections.mutableSetOf' call\n var answer = LinkedHashSet_init_$Create$();\n parentToChildMap.r2(parentId, answer);\n tmp = answer;\n } else {\n tmp = value;\n }\n tmp.q(element);\n }\n }\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator_0 = entityDOs.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.extractAssemblyParts.' call\n if (element_0.i2o_1 == null) {\n destination.q(element_0);\n }\n }\n var tmp0_iterator_1 = destination.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.extractAssemblyParts.' call\n extractAssemblyParts$checkComponents($this, parentToChildMap, components, childToParentMap, entityDOs, parts, element_1);\n }\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(parts.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator_2 = parts.q2().t();\n while (tmp0_iterator_2.u()) {\n var item = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.extractAssemblyParts.' call\n var tmp_0 = item.t2();\n // Inline function 'kotlin.collections.map' call\n var this_0 = item.u2();\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(this_0.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator_3 = this_0.q2().t();\n while (tmp0_iterator_3.u()) {\n var item_0 = tmp0_iterator_3.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.extractAssemblyParts..' call\n var tmp$ret$12 = new Pair(item_0.t2(), item_0.u2().ref);\n destination_1.q(tmp$ret$12);\n }\n var tmp$ret$15 = new Pair(tmp_0, new AssemblyPartsComponent(toMap(destination_1)));\n destination_0.q(tmp$ret$15);\n }\n return toMap(destination_0);\n }\n function createEntity_0($this, entityDO, partKeyComponents, assemblyParts) {\n var entity = createProductWithoutProductRootChildren($this, entityDO, $this.v2o_1, partKeyComponents, assemblyParts);\n var tmp;\n // Inline function 'kotlin.text.isNotEmpty' call\n var this_0 = entityDO.h2o_1;\n if (charSequenceLength(this_0) > 0) {\n tmp = entity == null;\n } else {\n tmp = false;\n }\n if (tmp) {\n throw IllegalStateException_init_$Create$('Tried loading entity ' + entityDO.g2o_1 + ' with reference that is not present in catalog, product reference ' + entityDO.h2o_1);\n }\n if (entity == null ? entityDO.h2o_1 === '' : false) {\n var entityId = deserializeId($this, entityDO.g2o_1);\n entity = $this.u2o_1.createEntityInternal(entityId);\n }\n var tmp0_safe_receiver = entity;\n var tmp_0;\n if (tmp0_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.createEntity.' call\n tmp_0 = new EntityAndDO(tmp0_safe_receiver, entityDO);\n }\n return tmp_0;\n }\n function asList_0($this, entityDO) {\n var tmp0_safe_receiver = entityDO.k2o_1;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : asList(tmp0_safe_receiver);\n return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;\n }\n function addComponents($this, entityAndDO, components) {\n if (components == null)\n null;\n else {\n // Inline function 'kotlin.collections.onEach' call\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.onEach.' call\n var tmp0_iterator = components.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.addComponents.' call\n if (element instanceof SerializableGuestConnectionsComponent) {\n // Inline function 'kotlin.collections.map' call\n var this_0 = element.connections;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator_0 = this_0.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.addComponents..' call\n var tmp$ret$0 = item.copy(deserializeId($this, item.guestId).toString(), deserializeId($this, item.hostId).toString());\n destination.q(tmp$ret$0);\n }\n var newConnections = destination;\n $this.u2o_1.addComponent(entityAndDO.entity, new SerializableGuestConnectionsComponent(newConnections));\n } else {\n $this.u2o_1.addComponent(entityAndDO.entity, element);\n }\n }\n }\n }\n function fixProductPartComponents($this, entity, connectionRoot, partKeyComponents) {\n var tmp;\n if (!(connectionRoot == null)) {\n Companion_getInstance_6();\n tmp = entity.hasComponent(44);\n } else {\n tmp = false;\n }\n if (tmp) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = entity.components();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.fixProductPartComponents.' call\n var tmp_0;\n var tmp_1;\n var tmp_2;\n var tmp_3;\n if (!element.serializable) {\n var tmp_4 = element.typeId;\n tmp_3 = !(tmp_4 === 16);\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n var tmp_5 = element.typeId;\n tmp_2 = !(tmp_5 === 17);\n } else {\n tmp_2 = false;\n }\n if (tmp_2) {\n tmp_1 = !(element.typeId === Companion_instance_73.id);\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n var tmp_6 = element.typeId;\n Companion_getInstance_107();\n tmp_0 = !(tmp_6 === 6);\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n entity.removeComponentInternal(element.typeId);\n }\n }\n var toAdd = partKeyComponents.b3(new EntityPartKey(connectionRoot.id, ensureNotNull(get_partKey(entity))));\n if (toAdd == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = toAdd.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.fixProductPartComponents.' call\n if (!entity.hasComponent(element_0.typeId)) {\n entity.addComponent(element_0);\n }\n }\n }\n }\n var tmp_7;\n if (entity.hasComponent(28)) {\n tmp_7 = entity;\n } else {\n tmp_7 = connectionRoot;\n }\n var meRoot = tmp_7;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = get_children(entity);\n var inductionVariable_0 = 0;\n var last_0 = indexedObject_0.length;\n while (inductionVariable_0 < last_0) {\n var element_1 = indexedObject_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.fixProductPartComponents.' call\n if (!element_1.isDisposed) {\n fixProductPartComponents($this, element_1, meRoot, partKeyComponents);\n }\n }\n }\n function buildProductRootHierarchy($this, entityAndDO, entities) {\n var entity = entityAndDO.af();\n var serializableEntity = entityAndDO.bf();\n var tmp1_elvis_lhs = serializableEntity.i2o_1;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var parentId = tmp;\n var deserializedParentID = deserializeId($this, parentId);\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = entities.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.buildProductRootHierarchy.' call\n if (element.id === deserializedParentID) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp2_safe_receiver = tmp$ret$1;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.buildProductRootHierarchy.' call\n setParentMaintainWorldTransform(entity, tmp2_safe_receiver);\n var tmp0_safe_receiver = get_parentComponent(tmp2_safe_receiver);\n var tmp1_elvis_lhs_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.addChild(entity);\n var tmp_0;\n if (tmp1_elvis_lhs_0 == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = [entity];\n tmp_0 = new ParentComponent(tmp$ret$5);\n } else {\n tmp_0 = tmp1_elvis_lhs_0;\n }\n var pc = tmp_0;\n $this.u2o_1.addComponent(tmp2_safe_receiver, pc);\n }\n }\n function createProductWithoutProductRootChildren($this, entityDO, productManager, partKeyComponents, partKeyProducts) {\n var entityId = deserializeId($this, entityDO.g2o_1);\n var tmp0_safe_receiver = productManager.productSpecification(entityDO.h2o_1);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.createProductWithoutProductRootChildren.' call\n var spec = tmp0_safe_receiver;\n var tmp0_safe_receiver_0 = partKeyProducts.b3(entityId);\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n spec = tmp0_safe_receiver.addComponent(tmp0_safe_receiver_0);\n }\n var entity = productManager.createFromSpecificationInternal(entityDO.h2o_1, spec, entityId);\n var tmp2_safe_receiver = entity == null ? null : get_descendants(entity);\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.createProductWithoutProductRootChildren..' call\n var tmp0_safe_receiver_1 = get_partKey(element);\n if (tmp0_safe_receiver_1 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0 = new EntityPartKey(entityId, tmp0_safe_receiver_1);\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = element.components();\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = this_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.createProductWithoutProductRootChildren....' call\n if (!element_0.serializable) {\n destination.q(element_0);\n }\n }\n partKeyComponents.r2(tmp_0, destination);\n }\n }\n }\n var tmp4_safe_receiver = entity == null ? null : get_descendants(entity);\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_1 = 0;\n var last_1 = tmp4_safe_receiver.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = tmp4_safe_receiver[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.createProductWithoutProductRootChildren..' call\n if (!element_1.isDisposed) {\n $this.u2o_1.removeAllComponents(element_1);\n $this.u2o_1.disposeEntity(element_1);\n }\n }\n }\n tmp = entity;\n }\n return tmp;\n }\n function Companion_91() {\n Companion_instance_91 = this;\n this.logger = LoggerState_getInstance().m1m('SerializerV13');\n }\n protoOf(Companion_91).x1i = function () {\n return this.logger;\n };\n protoOf(Companion_91).serializeCatalogs = function (productManager) {\n // Inline function 'kotlin.collections.orEmpty' call\n var tmp1_safe_receiver = productManager == null ? null : productManager.catalogs;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.associate' call\n var capacity = coerceAtLeast(mapCapacity(tmp1_safe_receiver.length), 16);\n // Inline function 'kotlin.collections.associateTo' call\n var destination = LinkedHashMap_init_$Create$(capacity);\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.plusAssign' call\n // Inline function 'com.ikea.core.serialization.v13.Companion.serializeCatalogs.' call\n var pair = new Pair(element.rangeId(), element.rangeVersion());\n destination.r2(pair.ye_1, pair.ze_1);\n }\n tmp = destination;\n }\n var tmp0_elvis_lhs = tmp;\n return tmp0_elvis_lhs == null ? emptyMap() : tmp0_elvis_lhs;\n };\n protoOf(Companion_91).serializeTree = function (root) {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = createSerializableEntitiesWithRelations(this, root, null);\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.v13.Companion.serializeTree.' call\n var entity = element.af();\n if (!entity.hasComponent(Companion_instance_85.id)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.serialization.v13.Companion.serializeTree.' call\n var serializableEntity = item.bf();\n destination_0.q(serializableEntity);\n }\n return destination_0;\n };\n protoOf(Companion_91).serializeForest = function (entities) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = entities.length;\n while (inductionVariable < last) {\n var element = entities[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.v13.Companion.serializeForest.' call\n if (get_parent(element) == null ? true : !contains(entities, get_parent(element))) {\n destination.q(element);\n }\n }\n var roots = destination;\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = roots.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.v13.Companion.serializeForest.' call\n var list = createSerializableEntitiesWithRelations(Companion_getInstance_92(), element_0, null);\n addAll(destination_0, list);\n }\n var serializableEntities = destination_0;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.distinctBy' call\n var this_0 = serializableEntities;\n var set = HashSet_init_$Create$();\n var list_0 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = this_0.t();\n while (tmp0_iterator_0.u()) {\n var e = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.serialization.v13.Companion.serializeForest.' call\n var key = e.ye_1;\n if (set.q(key)) {\n list_0.q(e);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator_1 = list_0.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.serialization.v13.Companion.serializeForest.' call\n var entity = element_1.af();\n if (contains(entities, entity)) {\n destination_1.q(element_1);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_2 = ArrayList_init_$Create$();\n var tmp0_iterator_2 = destination_1.t();\n while (tmp0_iterator_2.u()) {\n var element_2 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.serialization.v13.Companion.serializeForest.' call\n var entity_0 = element_2.af();\n if (!entity_0.hasComponent(Companion_instance_85.id)) {\n destination_2.q(element_2);\n }\n }\n serializableEntities = destination_2;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_3 = serializableEntities.t();\n while (tmp0_iterator_3.u()) {\n var element_3 = tmp0_iterator_3.w();\n // Inline function 'com.ikea.core.serialization.v13.Companion.serializeForest.' call\n var serializableEntity = element_3.bf();\n var parentId = serializableEntity.i2o_1;\n // Inline function 'kotlin.collections.find' call\n var this_1 = serializableEntities;\n var tmp$ret$15;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator_4 = this_1.t();\n while (tmp0_iterator_4.u()) {\n var element_4 = tmp0_iterator_4.w();\n // Inline function 'com.ikea.core.serialization.v13.Companion.serializeForest..' call\n if (element_4.ze_1.g2o_1 === parentId) {\n tmp$ret$15 = element_4;\n break $l$block;\n }\n }\n tmp$ret$15 = null;\n }\n var parent = tmp$ret$15;\n if (parent == null)\n serializableEntity.i2o_1 = null;\n }\n // Inline function 'kotlin.collections.map' call\n var this_2 = serializableEntities;\n // Inline function 'kotlin.collections.mapTo' call\n var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));\n var tmp0_iterator_5 = this_2.t();\n while (tmp0_iterator_5.u()) {\n var item = tmp0_iterator_5.w();\n // Inline function 'com.ikea.core.serialization.v13.Companion.serializeForest.' call\n var serializableEntity_0 = item.bf();\n destination_3.q(serializableEntity_0);\n }\n return destination_3;\n };\n protoOf(Companion_91).cleanUp = function (root) {\n forEachInHierarchy(root, SerializerV13$Companion$cleanUp$lambda);\n };\n var Companion_instance_91;\n function Companion_getInstance_92() {\n if (Companion_instance_91 == null)\n new Companion_91();\n return Companion_instance_91;\n }\n function EntityAndDO(entity, entityDO) {\n this.entity = entity;\n this.entityDO = entityDO;\n }\n protoOf(EntityAndDO).r23 = function () {\n return this.entity;\n };\n protoOf(EntityAndDO).x2o = function () {\n return this.entityDO;\n };\n protoOf(EntityAndDO).af = function () {\n return this.entity;\n };\n protoOf(EntityAndDO).bf = function () {\n return this.entityDO;\n };\n protoOf(EntityAndDO).y2o = function (entity, entityDO) {\n return new EntityAndDO(entity, entityDO);\n };\n protoOf(EntityAndDO).copy = function (entity, entityDO, $super) {\n entity = entity === VOID ? this.entity : entity;\n entityDO = entityDO === VOID ? this.entityDO : entityDO;\n return this.y2o(entity, entityDO);\n };\n protoOf(EntityAndDO).toString = function () {\n return 'EntityAndDO(entity=' + this.entity + ', entityDO=' + this.entityDO + ')';\n };\n protoOf(EntityAndDO).hashCode = function () {\n var result = this.entity.hashCode();\n result = imul(result, 31) + hashCode(this.entityDO) | 0;\n return result;\n };\n protoOf(EntityAndDO).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof EntityAndDO))\n return false;\n var tmp0_other_with_cast = other instanceof EntityAndDO ? other : THROW_CCE();\n if (!this.entity.equals(tmp0_other_with_cast.entity))\n return false;\n if (!equals(this.entityDO, tmp0_other_with_cast.entityDO))\n return false;\n return true;\n };\n function EntityPartKey(entityId, partKey) {\n this.entityId = entityId;\n this.partKey = partKey;\n }\n protoOf(EntityPartKey).z2o = function () {\n return this.entityId;\n };\n protoOf(EntityPartKey).z1j = function () {\n return this.partKey;\n };\n protoOf(EntityPartKey).af = function () {\n return this.entityId;\n };\n protoOf(EntityPartKey).bf = function () {\n return this.partKey;\n };\n protoOf(EntityPartKey).a2p = function (entityId, partKey) {\n return new EntityPartKey(entityId, partKey);\n };\n protoOf(EntityPartKey).copy = function (entityId, partKey, $super) {\n entityId = entityId === VOID ? this.entityId : entityId;\n partKey = partKey === VOID ? this.partKey : partKey;\n return this.a2p(entityId, partKey);\n };\n protoOf(EntityPartKey).toString = function () {\n return 'EntityPartKey(entityId=' + this.entityId + ', partKey=' + this.partKey + ')';\n };\n protoOf(EntityPartKey).hashCode = function () {\n var result = this.entityId;\n result = imul(result, 31) + getStringHashCode(this.partKey) | 0;\n return result;\n };\n protoOf(EntityPartKey).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof EntityPartKey))\n return false;\n var tmp0_other_with_cast = other instanceof EntityPartKey ? other : THROW_CCE();\n if (!(this.entityId === tmp0_other_with_cast.entityId))\n return false;\n if (!(this.partKey === tmp0_other_with_cast.partKey))\n return false;\n return true;\n };\n function extractAssemblyParts$checkComponents(this$0, parentToChildMap, $components, childToParentMap, $entityDOs, parts, me) {\n var entityId = deserializeId(this$0, me.g2o_1);\n var tmp0_safe_receiver = parentToChildMap.b3(entityId);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = tmp0_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.extractAssemblyParts.checkComponents.' call\n extractAssemblyParts$checkComponents(this$0, parentToChildMap, $components, childToParentMap, $entityDOs, parts, element);\n }\n }\n var tmp1_safe_receiver = $components.b3(entityId);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_iterator_0 = tmp1_safe_receiver.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.extractAssemblyParts.checkComponents..' call\n if (element_0 instanceof ProductPartComponent) {\n var rootie = childToParentMap.b3(entityId);\n var level = 0;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator_1 = $entityDOs.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.extractAssemblyParts.checkComponents...' call\n if (element_1.g2o_1 === me.g2o_1) {\n tmp$ret$1 = element_1;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp$ret$2 = tmp$ret$1;\n var productRef = ensureNotNull(tmp$ret$2).h2o_1;\n while (!(rootie == null)) {\n // Inline function 'kotlin.collections.getOrPut' call\n var key = rootie;\n var value = parts.b3(key);\n var tmp;\n if (value == null) {\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.extractAssemblyParts.checkComponents...' call\n // Inline function 'kotlin.collections.mutableMapOf' call\n var answer = LinkedHashMap_init_$Create$_0();\n parts.r2(key, answer);\n tmp = answer;\n } else {\n tmp = value;\n }\n var map = tmp;\n var there = map.b3(element_0.partKey);\n if (there == null) {\n // Inline function 'kotlin.collections.set' call\n var key_0 = element_0.partKey;\n var value_0 = new ProductRefLevel(productRef, level);\n map.r2(key_0, value_0);\n rootie = childToParentMap.b3(rootie);\n } else {\n if (there.level > level) {\n // Inline function 'kotlin.collections.set' call\n var key_1 = element_0.partKey;\n var value_1 = new ProductRefLevel(productRef, level);\n map.r2(key_1, value_1);\n }\n rootie = null;\n }\n level = level + 1 | 0;\n }\n }\n }\n }\n }\n function SerializerV13(entityManager, productManager) {\n Companion_getInstance_92();\n this.u2o_1 = entityManager;\n this.v2o_1 = productManager;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp.entityIdMapper = LinkedHashMap_init_$Create$_0();\n }\n protoOf(SerializerV13).rebuildEntities = function (entityDOs) {\n // Inline function 'kotlin.collections.associate' call\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(entityDOs, 10)), 16);\n // Inline function 'kotlin.collections.associateTo' call\n var destination = LinkedHashMap_init_$Create$(capacity);\n var tmp0_iterator = entityDOs.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.plusAssign' call\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.rebuildEntities.' call\n var entityId = deserializeId(this, element.g2o_1);\n var pair = to(entityId, asList_0(this, element));\n destination.r2(pair.ye_1, pair.ze_1);\n }\n var components = destination;\n var assemblyParts = extractAssemblyParts(this, entityDOs, components);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = entityDOs.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.rebuildEntities.' call\n var parentID = element_0.i2o_1;\n if (!(parentID == null)) {\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'kotlin.collections.none' call\n var tmp;\n if (isInterface(entityDOs, Collection)) {\n tmp = entityDOs.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$3 = true;\n break $l$block_0;\n }\n var tmp0_iterator_1 = entityDOs.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.rebuildEntities..' call\n if (element_1.g2o_1 === parentID) {\n tmp$ret$3 = false;\n break $l$block_0;\n }\n }\n tmp$ret$3 = true;\n }\n if (tmp$ret$3) {\n throw IllegalStateException_init_$Create$('Did not find parent ' + parentID + ' for entity ' + element_0.g2o_1 + ' with reference ' + element_0.h2o_1 + ' in deserialized json.');\n }\n }\n }\n // Inline function 'kotlin.collections.mutableMapOf' call\n var partKeyComponents = LinkedHashMap_init_$Create$_0();\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_0 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_2 = entityDOs.t();\n while (tmp0_iterator_2.u()) {\n var element_2 = tmp0_iterator_2.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.rebuildEntities.' call\n // Inline function 'kotlin.collections.find' call\n var this_0 = this.u2o_1.entities;\n var tmp$ret$7;\n $l$block_1: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element_3 = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.rebuildEntities..' call\n if (element_3.id === deserializeId(this, element_2.g2o_1)) {\n tmp$ret$7 = element_3;\n break $l$block_1;\n }\n }\n tmp$ret$7 = null;\n }\n var found = tmp$ret$7;\n var tmp0_safe_receiver = found == null ? createEntity_0(this, element_2, partKeyComponents, assemblyParts) : new EntityAndDO(found, element_2);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_0.q(tmp0_safe_receiver);\n }\n }\n var entityAndDOs = destination_0;\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(entityAndDOs, 10));\n var tmp0_iterator_3 = entityAndDOs.t();\n while (tmp0_iterator_3.u()) {\n var item = tmp0_iterator_3.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.rebuildEntities.' call\n var entity = item.af();\n destination_1.q(entity);\n }\n var entities = destination_1;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_4 = entityAndDOs.t();\n while (tmp0_iterator_4.u()) {\n var element_4 = tmp0_iterator_4.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.rebuildEntities.' call\n addComponents(this, element_4, components.b3(element_4.entity.id));\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_5 = entityAndDOs.t();\n while (tmp0_iterator_5.u()) {\n var element_5 = tmp0_iterator_5.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.rebuildEntities.' call\n buildProductRootHierarchy(this, element_5, entities);\n }\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_2 = ArrayList_init_$Create$();\n var tmp0_iterator_6 = entities.t();\n while (tmp0_iterator_6.u()) {\n var element_6 = tmp0_iterator_6.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.rebuildEntities.' call\n if (get_parent(element_6) == null) {\n destination_2.q(element_6);\n }\n }\n var roots = destination_2;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_7 = roots.t();\n while (tmp0_iterator_7.u()) {\n var element_7 = tmp0_iterator_7.w();\n // Inline function 'com.ikea.core.serialization.v13.SerializerV13.rebuildEntities.' call\n fixProductPartComponents(this, element_7, null, partKeyComponents);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(roots);\n };\n function Companion_92() {\n Companion_instance_92 = this;\n var tmp = this;\n var tmp_0 = new Vector(-Infinity, -Infinity, -Infinity);\n tmp.INFINITE_AABB = new AxisAlignedBox(tmp_0, new Vector(Infinity, Infinity, Infinity));\n this.EMPTY_AABB = new AxisAlignedBox(Companion_getInstance_61().ZERO, Companion_getInstance_61().ZERO);\n }\n protoOf(Companion_92).b2p = function () {\n return this.INFINITE_AABB;\n };\n protoOf(Companion_92).c2p = function () {\n return this.EMPTY_AABB;\n };\n protoOf(Companion_92).fromVertices = function (vertices) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (vertices.length === 0) {\n throw IllegalArgumentException_init_$Create$('Can not create an axis aligned box from zero vertices');\n }\n var xMin = Infinity;\n var xMax = -Infinity;\n var yMin = Infinity;\n var yMax = -Infinity;\n var zMin = Infinity;\n var zMax = -Infinity;\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = vertices.length;\n while (inductionVariable < last) {\n var element = vertices[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.Companion.fromVertices.' call\n if (element.X < xMin)\n xMin = element.X;\n if (element.X > xMax)\n xMax = element.X;\n if (element.Y < yMin)\n yMin = element.Y;\n if (element.Y > yMax)\n yMax = element.Y;\n if (element.Z < zMin)\n zMin = element.Z;\n if (element.Z > zMax)\n zMax = element.Z;\n }\n return new AxisAlignedBox(new Vector(xMin, yMin, zMin), new Vector(xMax, yMax, zMax));\n };\n protoOf(Companion_92).d2p = function (size, center) {\n return new AxisAlignedBox(size.unaryMinus().__divIntForKotlin(2).plus(center), size.__divIntForKotlin(2).plus(center));\n };\n protoOf(Companion_92).fromSize = function (size, center, $super) {\n center = center === VOID ? Companion_getInstance_61().ZERO : center;\n return this.d2p(size, center);\n };\n var Companion_instance_92;\n function Companion_getInstance_93() {\n if (Companion_instance_92 == null)\n new Companion_92();\n return Companion_instance_92;\n }\n function AxisAlignedBox(min, max) {\n Companion_getInstance_93();\n this.min = min;\n this.max = max;\n }\n protoOf(AxisAlignedBox).e2p = function () {\n return this.min;\n };\n protoOf(AxisAlignedBox).f2p = function () {\n return this.max;\n };\n protoOf(AxisAlignedBox).g2p = function () {\n return this.max.plus(this.min).times(0.5);\n };\n protoOf(AxisAlignedBox).u2b = function () {\n return this.size.X;\n };\n protoOf(AxisAlignedBox).v2b = function () {\n return this.size.Y;\n };\n protoOf(AxisAlignedBox).w2b = function () {\n return this.size.Z;\n };\n protoOf(AxisAlignedBox).n = function () {\n return this.max.minus(this.min);\n };\n protoOf(AxisAlignedBox).containsPoint = function (point) {\n return ((((this.min.X <= point.X ? this.min.Y <= point.Y : false) ? this.min.Z <= point.Z : false) ? this.max.X >= point.X : false) ? this.max.Y >= point.Y : false) ? this.max.Z >= point.Z : false;\n };\n protoOf(AxisAlignedBox).doIntersectWith = function (otherAABB) {\n return ((this.min.X <= otherAABB.max.X ? this.max.X >= otherAABB.min.X : false) ? this.min.Y <= otherAABB.max.Y ? this.max.Y >= otherAABB.min.Y : false : false) ? this.min.Z <= otherAABB.max.Z ? this.max.Z >= otherAABB.min.Z : false : false;\n };\n protoOf(AxisAlignedBox).createCombined = function (otherAABB) {\n if (otherAABB == null)\n return this;\n if (equals(otherAABB, this))\n return this;\n var tmp = Companion_getInstance_93();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [this.min, this.max, otherAABB.min, otherAABB.max];\n return tmp.fromVertices(tmp$ret$2);\n };\n protoOf(AxisAlignedBox).af = function () {\n return this.min;\n };\n protoOf(AxisAlignedBox).bf = function () {\n return this.max;\n };\n protoOf(AxisAlignedBox).u2c = function (min, max) {\n return new AxisAlignedBox(min, max);\n };\n protoOf(AxisAlignedBox).copy = function (min, max, $super) {\n min = min === VOID ? this.min : min;\n max = max === VOID ? this.max : max;\n return this.u2c(min, max);\n };\n protoOf(AxisAlignedBox).toString = function () {\n return 'AxisAlignedBox(min=' + this.min + ', max=' + this.max + ')';\n };\n protoOf(AxisAlignedBox).hashCode = function () {\n var result = this.min.hashCode();\n result = imul(result, 31) + this.max.hashCode() | 0;\n return result;\n };\n protoOf(AxisAlignedBox).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof AxisAlignedBox))\n return false;\n var tmp0_other_with_cast = other instanceof AxisAlignedBox ? other : THROW_CCE();\n if (!this.min.equals(tmp0_other_with_cast.min))\n return false;\n if (!this.max.equals(tmp0_other_with_cast.max))\n return false;\n return true;\n };\n function convexPolyhedronPenetration($this, other) {\n var minDistance = {_v: 1.7976931348623157E308};\n var penetrationAxis = {_v: get_zero()};\n var shape1 = new DualDouble(0.0, 0.0);\n var shape2 = new DualDouble(0.0, 0.0);\n var tmp;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = $this.unsignedNormals;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.ConvexPolyhedron.convexPolyhedronPenetration.' call\n if (convexPolyhedronPenetration$isSeparatingPlane(other, shape2, $this, shape1, minDistance, penetrationAxis, element)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n if (tmp$ret$1) {\n tmp = true;\n } else {\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject_0 = other.unsignedNormals;\n var inductionVariable_0 = 0;\n var last_0 = indexedObject_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.shapes.ConvexPolyhedron.convexPolyhedronPenetration.' call\n if (convexPolyhedronPenetration$isSeparatingPlane(other, shape2, $this, shape1, minDistance, penetrationAxis, element_0)) {\n tmp$ret$3 = true;\n break $l$block_0;\n }\n }\n tmp$ret$3 = false;\n }\n tmp = tmp$ret$3;\n }\n if (tmp) {\n return null;\n }\n // Inline function 'kotlin.math.abs' call\n var x = minDistance._v;\n var tmp_0 = Math.abs(x);\n if (tmp_0 < 0.1)\n return null;\n var indexedObject_1 = $this.edgeDirections;\n var inductionVariable_1 = 0;\n var last_1 = indexedObject_1.length;\n while (inductionVariable_1 < last_1) {\n var edge1 = indexedObject_1[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n var indexedObject_2 = other.edgeDirections;\n var inductionVariable_2 = 0;\n var last_2 = indexedObject_2.length;\n while (inductionVariable_2 < last_2) {\n var edge2 = indexedObject_2[inductionVariable_2];\n inductionVariable_2 = inductionVariable_2 + 1 | 0;\n var cross = edge1.cross(edge2);\n if (!almostEquals(cross.size, 0.0) ? convexPolyhedronPenetration$isSeparatingPlane(other, shape2, $this, shape1, minDistance, penetrationAxis, cross) : false)\n return null;\n }\n }\n return penetrationAxis._v.normalize().times(minDistance._v);\n }\n function distance($this, min1, max1, min2, max2) {\n var d1 = max2 - min1;\n var d2 = max1 - min2;\n var tmp;\n // Inline function 'kotlin.math.abs' call\n var tmp_0 = Math.abs(d1);\n // Inline function 'kotlin.math.abs' call\n if (tmp_0 < Math.abs(d2)) {\n tmp = -d1;\n } else {\n tmp = d2;\n }\n return tmp;\n }\n function overlaps($this, min1, max1, min2, max2) {\n return isBetweenOrdered($this, min2, min1, max1) ? true : isBetweenOrdered($this, min1, min2, max2);\n }\n function isBetweenOrdered($this, value, lowerBound, upperBound) {\n return lowerBound <= value ? value <= upperBound : false;\n }\n function raycastEachFaceIndividually($this, ray) {\n var closestHit = null;\n var hitPlaneNormal = Companion_getInstance_61().ZERO;\n var closestDistance = Infinity;\n var inductionVariable = 0;\n var last = $this.faces.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var faceIndex = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = $this.faces[faceIndex].indices;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable_0 = 0;\n var last_0 = this_0.length;\n while (inductionVariable_0 < last_0) {\n var item = this_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.shapes.ConvexPolyhedron.raycastEachFaceIndividually.' call\n var tmp$ret$0 = $this.vertices[item];\n destination.q(tmp$ret$0);\n }\n var faceVertices = copyToArray(destination);\n var facePolygon = Companion_instance_55.createPolygonAndCalculateNormal(faceVertices);\n var tmp2_safe_receiver = facePolygon == null ? null : facePolygon.raycast(ray);\n var hit = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.point;\n if (hit == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var distance = ray.origin.distanceTo(hit);\n var tmp;\n if (distance < closestDistance) {\n closestHit = hit;\n hitPlaneNormal = facePolygon.normal;\n closestDistance = distance;\n tmp = Unit_instance;\n }\n }\n }\n while (inductionVariable <= last);\n var tmp4_safe_receiver = closestHit;\n var tmp_0;\n if (tmp4_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.shapes.ConvexPolyhedron.raycastEachFaceIndividually.' call\n tmp_0 = new RaycastResult(tmp4_safe_receiver, hitPlaneNormal);\n }\n return tmp_0;\n }\n function Companion_93() {\n Companion_instance_93 = this;\n this.i2p_1 = LoggerState_getInstance().m1m('ConvexPolyhedron');\n }\n protoOf(Companion_93).scaleVertices = function (vertices, scaleAmount) {\n // Inline function 'com.ikea.core.utils.mapToArray' call\n // Inline function 'kotlin.arrayOfNulls' call\n var size = vertices.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = vertices.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.Companion.scaleVertices.' call\n arr[i] = vertices[i].timesElementWise(scaleAmount);\n }\n while (inductionVariable <= last);\n return isArray(arr) ? arr : THROW_CCE();\n };\n protoOf(Companion_93).scaleNormals = function (normals, scaleAmount) {\n var inverseScale = new Vector(1 / scaleAmount.X, 1 / scaleAmount.Y, 1 / scaleAmount.Y);\n // Inline function 'com.ikea.core.utils.mapToArray' call\n // Inline function 'kotlin.arrayOfNulls' call\n var size = normals.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = normals.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.Companion.scaleNormals.' call\n arr[i] = normals[i].timesElementWise(inverseScale).normalize();\n }\n while (inductionVariable <= last);\n return isArray(arr) ? arr : THROW_CCE();\n };\n protoOf(Companion_93).scaleEdgeDirections = function (edgeDirections, scaleAmount) {\n var inverseScale = new Vector(1 / scaleAmount.X, 1 / scaleAmount.Y, 1 / scaleAmount.Y);\n // Inline function 'com.ikea.core.utils.mapToArray' call\n // Inline function 'kotlin.arrayOfNulls' call\n var size = edgeDirections.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = edgeDirections.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.Companion.scaleEdgeDirections.' call\n arr[i] = edgeDirections[i].timesElementWise(inverseScale).normalize();\n }\n while (inductionVariable <= last);\n return isArray(arr) ? arr : THROW_CCE();\n };\n var Companion_instance_93;\n function Companion_getInstance_94() {\n if (Companion_instance_93 == null)\n new Companion_93();\n return Companion_instance_93;\n }\n function convexPolyhedronPenetration$isSeparatingPlane($other, shape2, this$0, shape1, minDistance, penetrationAxis, planeNormal) {\n planeNormal.project($other.vertices, shape2);\n planeNormal.project(this$0.vertices, shape1);\n if (!overlaps(this$0, shape1.first, shape1.last, shape2.first, shape2.last)) {\n return true;\n }\n var d = distance(this$0, shape1.first, shape1.last, shape2.first, shape2.last);\n // Inline function 'kotlin.math.abs' call\n var tmp = Math.abs(d);\n // Inline function 'kotlin.math.abs' call\n var x = minDistance._v;\n if (tmp < Math.abs(x)) {\n minDistance._v = d;\n penetrationAxis._v = planeNormal;\n }\n return false;\n }\n function ConvexPolyhedron$axisAlignedBoundingBox$delegate$lambda(this$0) {\n return function () {\n return Companion_getInstance_93().fromVertices(this$0.vertices);\n };\n }\n function ConvexPolyhedron(normals, vertices, faces, edgeDirections) {\n Companion_getInstance_94();\n this.normals = normals;\n this.vertices = vertices;\n this.faces = faces;\n this.edgeDirections = edgeDirections;\n var tmp = this;\n tmp.h2p_1 = lazy(ConvexPolyhedron$axisAlignedBoundingBox$delegate$lambda(this));\n }\n protoOf(ConvexPolyhedron).j2p = function () {\n return this.normals;\n };\n protoOf(ConvexPolyhedron).b23 = function () {\n return this.vertices;\n };\n protoOf(ConvexPolyhedron).k2p = function () {\n return this.faces;\n };\n protoOf(ConvexPolyhedron).l2p = function () {\n return this.edgeDirections;\n };\n protoOf(ConvexPolyhedron).m2p = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.h2p_1;\n axisAlignedBoundingBox$factory();\n return this_0.u2();\n };\n protoOf(ConvexPolyhedron).center = function () {\n var x = 0.0;\n var y = 0.0;\n var z = 0.0;\n var indexedObject = this.vertices;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var v = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n x = x + v.X;\n y = y + v.Y;\n z = z + v.Z;\n }\n return new Vector(x / this.vertices.length, y / this.vertices.length, z / this.vertices.length);\n };\n protoOf(ConvexPolyhedron).transform = function (transform) {\n return this.rotate(transform.rotation).move(transform.position);\n };\n protoOf(ConvexPolyhedron).rotate = function (quaternion) {\n if (quaternion.isIdentity)\n return this;\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = this.normals;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.ConvexPolyhedron.rotate.' call\n arr[i] = this_0[i].rotate(quaternion);\n }\n while (inductionVariable <= last);\n var tmp0_normals = isArray(arr) ? arr : THROW_CCE();\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_1 = this.vertices;\n // Inline function 'kotlin.arrayOfNulls' call\n var size_0 = this_1.length;\n var arr_0 = fillArrayVal(Array(size_0), null);\n var inductionVariable_0 = 0;\n var last_0 = this_1.length - 1 | 0;\n if (inductionVariable_0 <= last_0)\n do {\n var i_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.shapes.ConvexPolyhedron.rotate.' call\n arr_0[i_0] = this_1[i_0].rotate(quaternion);\n }\n while (inductionVariable_0 <= last_0);\n var tmp1_vertices = isArray(arr_0) ? arr_0 : THROW_CCE();\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_2 = this.edgeDirections;\n // Inline function 'kotlin.arrayOfNulls' call\n var size_1 = this_2.length;\n var arr_1 = fillArrayVal(Array(size_1), null);\n var inductionVariable_1 = 0;\n var last_1 = this_2.length - 1 | 0;\n if (inductionVariable_1 <= last_1)\n do {\n var i_1 = inductionVariable_1;\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.shapes.ConvexPolyhedron.rotate.' call\n arr_1[i_1] = this_2[i_1].rotate(quaternion);\n }\n while (inductionVariable_1 <= last_1);\n var tmp2_edgeDirections = isArray(arr_1) ? arr_1 : THROW_CCE();\n var tmp3_faces = this.faces;\n return new ConvexPolyhedron(tmp0_normals, tmp1_vertices, tmp3_faces, tmp2_edgeDirections);\n };\n protoOf(ConvexPolyhedron).move = function (displacement) {\n if (displacement.equals(Companion_getInstance_61().ZERO))\n return this;\n var tmp0_normals = this.normals;\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = this.vertices;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.ConvexPolyhedron.move.' call\n arr[i] = this_0[i].plus(displacement);\n }\n while (inductionVariable <= last);\n var tmp1_vertices = isArray(arr) ? arr : THROW_CCE();\n var tmp2_edgeDirections = this.edgeDirections;\n var tmp3_faces = this.faces;\n return new ConvexPolyhedron(tmp0_normals, tmp1_vertices, tmp3_faces, tmp2_edgeDirections);\n };\n protoOf(ConvexPolyhedron).scaleUniform = function (scaleAmount) {\n var tmp0_normals = this.normals;\n var tmp1_vertices = Companion_getInstance_94().scaleVertices(this.vertices, times(scaleAmount, Companion_getInstance_61().ONE));\n var tmp2_edgeDirections = this.edgeDirections;\n var tmp3_faces = this.faces;\n return new ConvexPolyhedron(tmp0_normals, tmp1_vertices, tmp3_faces, tmp2_edgeDirections);\n };\n protoOf(ConvexPolyhedron).scale = function (scaleAmount) {\n var tmp0_normals = Companion_getInstance_94().scaleNormals(this.normals, scaleAmount);\n var tmp1_vertices = Companion_getInstance_94().scaleVertices(this.vertices, scaleAmount);\n var tmp2_edgeDirections = Companion_getInstance_94().scaleEdgeDirections(this.edgeDirections, scaleAmount);\n var tmp3_faces = this.faces;\n return new ConvexPolyhedron(tmp0_normals, tmp1_vertices, tmp3_faces, tmp2_edgeDirections);\n };\n protoOf(ConvexPolyhedron).n2p = function () {\n return this.normals;\n };\n protoOf(ConvexPolyhedron).penetration = function (other) {\n if (!this.hasCoarseCollision(other))\n return null;\n var tmp;\n if (other instanceof ConvexPolyhedron) {\n tmp = convexPolyhedronPenetration(this, other);\n } else {\n var tmp1_safe_receiver = other.penetration(this);\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.shapes.ConvexPolyhedron.penetration.' call\n tmp_0 = tmp1_safe_receiver.unaryMinus();\n }\n tmp = tmp_0;\n }\n return tmp;\n };\n protoOf(ConvexPolyhedron).penetrationAlongAxis = function (other, axis) {\n var tmp0_safe_receiver = this.penetration(other);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.shapes.ConvexPolyhedron.penetration.' call\n tmp = tmp0_safe_receiver.size > axis.size ? axis : tmp0_safe_receiver;\n }\n return tmp;\n };\n protoOf(ConvexPolyhedron).hasCoarseCollision = function (otherShape) {\n return this.axisAlignedBoundingBox.doIntersectWith(otherShape.axisAlignedBoundingBox);\n };\n protoOf(ConvexPolyhedron).hashCode = function () {\n return hashCode(this.vertices);\n };\n protoOf(ConvexPolyhedron).raycast = function (ray) {\n if (this.faces.length < 4) {\n return raycastEachFaceIndividually(this, ray);\n }\n var nearPlaneNormal = null;\n var near = -Infinity;\n var far = Infinity;\n var inductionVariable = 0;\n var last = this.faces.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var faceIndex = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var pointInPlane = this.vertices[this.faces[faceIndex].indices[1]];\n var planeNormal = this.normals[faceIndex];\n var planeD = -(pointInPlane.X * planeNormal.X + pointInPlane.Y * planeNormal.Y + pointInPlane.Z * planeNormal.Z);\n var vN = planeD + planeNormal.__timesOperatorKotlin(ray.origin);\n var vD = planeNormal.__timesOperatorKotlin(ray.direction);\n if (almostEquals(vD, 0.0)) {\n if (vN > 0.0) {\n return null;\n }\n } else {\n var distanceToPlane = -vN / vD;\n if (vD < 0.0) {\n if (distanceToPlane > near) {\n near = distanceToPlane;\n nearPlaneNormal = planeNormal;\n }\n } else {\n if (distanceToPlane < far) {\n far = distanceToPlane;\n }\n }\n if (near > far)\n return null;\n }\n }\n while (inductionVariable <= last);\n if (near < 0.0 ? true : nearPlaneNormal == null)\n return null;\n return new RaycastResult(ray.direction.times(near).plus(ray.origin), nearPlaneNormal);\n };\n protoOf(ConvexPolyhedron).equals = function (other) {\n var tmp;\n if (other instanceof ConvexPolyhedron) {\n var tmp_0;\n if (other.vertices.length === this.vertices.length) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = zip(other.vertices, this.vertices);\n var tmp_1;\n if (isInterface(this_0, Collection)) {\n tmp_1 = this_0.b1();\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.shapes.ConvexPolyhedron.equals.' call\n if (!element.ye_1.equals(element.ze_1)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n tmp_0 = tmp$ret$0;\n } else {\n tmp_0 = false;\n }\n tmp = tmp_0;\n } else {\n tmp = false;\n }\n return tmp;\n };\n function axisAlignedBoundingBox$factory() {\n return getPropertyCallableRef('axisAlignedBoundingBox', 1, KProperty1, function (receiver) {\n return receiver.axisAlignedBoundingBox;\n }, null);\n }\n function Face(indices) {\n this.indices = indices;\n }\n protoOf(Face).o2p = function () {\n return this.indices;\n };\n protoOf(Face).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n return contentEquals(this.indices, (other instanceof Face ? other : THROW_CCE()).indices);\n };\n protoOf(Face).hashCode = function () {\n return contentHashCode(this.indices);\n };\n protoOf(Face).af = function () {\n return this.indices;\n };\n protoOf(Face).p2p = function (indices) {\n return new Face(indices);\n };\n protoOf(Face).copy = function (indices, $super) {\n indices = indices === VOID ? this.indices : indices;\n return this.p2p(indices);\n };\n protoOf(Face).toString = function () {\n return 'Face(indices=' + toString(this.indices) + ')';\n };\n function calcNormals($this) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [new Vector(1.0, 0.0, 0.0), new Vector(-1.0, 0.0, 0.0), new Vector(0.0, 1.0, 0.0), new Vector(0.0, -1.0, 0.0), new Vector(0.0, 0.0, 1.0), new Vector(0.0, 0.0, -1.0)];\n }\n function calcVertices($this, size) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [new Vector(size.width / 2, size.height / 2, size.depth / 2), new Vector(size.width / 2, size.height / 2, -size.depth / 2), new Vector(size.width / 2, -size.height / 2, size.depth / 2), new Vector(size.width / 2, -size.height / 2, -size.depth / 2), new Vector(-size.width / 2, size.height / 2, size.depth / 2), new Vector(-size.width / 2, size.height / 2, -size.depth / 2), new Vector(-size.width / 2, -size.height / 2, size.depth / 2), new Vector(-size.width / 2, -size.height / 2, -size.depth / 2)];\n }\n function calcVertices_0($this, size, center) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [new Vector(size.width / 2 + center.X, size.height / 2 + center.Y, size.depth / 2 + center.Z), new Vector(size.width / 2 + center.X, size.height / 2 + center.Y, -size.depth / 2 + center.Z), new Vector(size.width / 2 + center.X, -size.height / 2 + center.Y, size.depth / 2 + center.Z), new Vector(size.width / 2 + center.X, -size.height / 2 + center.Y, -size.depth / 2 + center.Z), new Vector(-size.width / 2 + center.X, size.height / 2 + center.Y, size.depth / 2 + center.Z), new Vector(-size.width / 2 + center.X, size.height / 2 + center.Y, -size.depth / 2 + center.Z), new Vector(-size.width / 2 + center.X, -size.height / 2 + center.Y, size.depth / 2 + center.Z), new Vector(-size.width / 2 + center.X, -size.height / 2 + center.Y, -size.depth / 2 + center.Z)];\n }\n function Cuboid_init_$Init$(size, $this) {\n Cuboid.call($this, calcVertices(Companion_getInstance_95(), size));\n return $this;\n }\n function CuboidFromSize(size) {\n return Cuboid_init_$Init$(size, objectCreate(protoOf(Cuboid)));\n }\n function Cuboid_init_$Init$_0(size, center, $this) {\n Cuboid.call($this, calcVertices_0(Companion_getInstance_95(), size, center));\n return $this;\n }\n function CuboidFromSizeAndCenter(size, center) {\n return Cuboid_init_$Init$_0(size, center, objectCreate(protoOf(Cuboid)));\n }\n function Companion_94() {\n Companion_instance_94 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [0, 2, 3, 1];\n tmp.y1m_1 = new Face(tmp$ret$2);\n var tmp_0 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = [5, 7, 6, 4];\n tmp_0.z1m_1 = new Face(tmp$ret$5);\n var tmp_1 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$8 = [1, 5, 4, 0];\n tmp_1.a1n_1 = new Face(tmp$ret$8);\n var tmp_2 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$11 = [3, 2, 6, 7];\n tmp_2.b1n_1 = new Face(tmp$ret$11);\n var tmp_3 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$14 = [4, 6, 2, 0];\n tmp_3.c1n_1 = new Face(tmp$ret$14);\n var tmp_4 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$17 = [1, 3, 7, 5];\n tmp_4.d1n_1 = new Face(tmp$ret$17);\n var tmp_5 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_5.e1n_1 = [new Vector(1.0), new Vector(VOID, 1.0), new Vector(VOID, VOID, 1.0)];\n var tmp_6 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_6.f1n_1 = [this.y1m_1, this.z1m_1, this.a1n_1, this.b1n_1, this.c1n_1, this.d1n_1];\n this.ZERO = CuboidFromSize(new Vector(0.0, 0.0, 0.0));\n }\n protoOf(Companion_94).fromNonCuboidVertices = function (vertices) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (vertices.length === 0) {\n throw IllegalArgumentException_init_$Create$('Can not create an axis aligned box from zero vertices');\n }\n return this.fromAABB(Companion_getInstance_93().fromVertices(vertices));\n };\n protoOf(Companion_94).fromAABB = function (aabb) {\n return CuboidFromSizeAndCenter(aabb.size, aabb.center);\n };\n protoOf(Companion_94).g2f = function () {\n return this.ZERO;\n };\n var Companion_instance_94;\n function Companion_getInstance_95() {\n if (Companion_instance_94 == null)\n new Companion_94();\n return Companion_instance_94;\n }\n function Cuboid$size$delegate$lambda($vertices) {\n return function () {\n // Inline function 'kotlin.math.abs' call\n var x = $vertices[0].X - $vertices[4].X;\n var tmp = Math.abs(x);\n // Inline function 'kotlin.math.abs' call\n var x_0 = $vertices[0].Y - $vertices[2].Y;\n var tmp_0 = Math.abs(x_0);\n // Inline function 'kotlin.math.abs' call\n var x_1 = $vertices[0].Z - $vertices[1].Z;\n var tmp$ret$2 = Math.abs(x_1);\n return new Vector(tmp, tmp_0, tmp$ret$2);\n };\n }\n function Cuboid(vertices) {\n Companion_getInstance_95();\n var tmp0_edgeDirections = Companion_getInstance_95().e1n_1;\n var tmp1_normals = calcNormals(Companion_getInstance_95());\n var tmp2_faces = Companion_getInstance_95().f1n_1;\n ConvexPolyhedron.call(this, tmp1_normals, vertices, tmp2_faces, tmp0_edgeDirections);\n var tmp = this;\n tmp.r2p_1 = lazy(Cuboid$size$delegate$lambda(vertices));\n var tmp_0 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0.s2p_1 = [this.normals[0], this.normals[2], this.normals[4]];\n }\n protoOf(Cuboid).n = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.r2p_1;\n size$factory();\n return this_0.u2();\n };\n protoOf(Cuboid).applyMargin = function (margin) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var newVertices = [new Vector(this.vertices[0].X + margin.right, this.vertices[0].Y + margin.top, this.vertices[0].Z + margin.front), new Vector(this.vertices[1].X + margin.right, this.vertices[1].Y + margin.top, this.vertices[1].Z - margin.back), new Vector(this.vertices[2].X + margin.right, this.vertices[2].Y - margin.bottom, this.vertices[2].Z + margin.front), new Vector(this.vertices[3].X + margin.right, this.vertices[3].Y - margin.bottom, this.vertices[3].Z - margin.back), new Vector(this.vertices[4].X - margin.left, this.vertices[4].Y + margin.top, this.vertices[4].Z + margin.front), new Vector(this.vertices[5].X - margin.left, this.vertices[5].Y + margin.top, this.vertices[5].Z - margin.back), new Vector(this.vertices[6].X - margin.left, this.vertices[6].Y - margin.bottom, this.vertices[6].Z + margin.front), new Vector(this.vertices[7].X - margin.left, this.vertices[7].Y - margin.bottom, this.vertices[7].Z - margin.back)];\n return new Cuboid(newVertices);\n };\n protoOf(Cuboid).move = function (displacement) {\n if (displacement.equals(Companion_getInstance_61().ZERO))\n return this;\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = this.vertices;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.Cuboid.move.' call\n arr[i] = this_0[i].plus(displacement);\n }\n while (inductionVariable <= last);\n var tmp$ret$2 = isArray(arr) ? arr : THROW_CCE();\n return new Cuboid(tmp$ret$2);\n };\n protoOf(Cuboid).scale = function (scaleAmount) {\n return new Cuboid(Companion_getInstance_94().scaleVertices(this.vertices, scaleAmount));\n };\n protoOf(Cuboid).scaleUniform = function (scaleAmount) {\n return new Cuboid(Companion_getInstance_94().scaleVertices(this.vertices, Companion_getInstance_61().ONE.times(scaleAmount)));\n };\n protoOf(Cuboid).n2p = function () {\n return this.s2p_1;\n };\n function size$factory() {\n return getPropertyCallableRef('size', 1, KProperty1, function (receiver) {\n return receiver.size;\n }, null);\n }\n function Polyhedron() {\n }\n function calcAxisAlignedBoundingBox($this) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = $this.polyhedra;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.calcAxisAlignedBoundingBox.' call\n var tmp$ret$0 = item.axisAlignedBoundingBox;\n destination.q(tmp$ret$0);\n }\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.calcAxisAlignedBoundingBox.' call\n var list = listOf_0([element.min, element.max]);\n addAll(destination_0, list);\n }\n var axisAlignedVertices = copyToArray(destination_0);\n return Companion_getInstance_93().fromVertices(axisAlignedVertices);\n }\n function penetration$check(maxSize, max, v) {\n if (v == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var itSize = v.size;\n var tmp;\n if (itSize > maxSize._v) {\n max._v = v;\n maxSize._v = itSize;\n tmp = Unit_instance;\n }\n }\n }\n function PolyhedronGroup$axisAlignedBoundingBox$delegate$lambda(this$0) {\n return function () {\n return calcAxisAlignedBoundingBox(this$0);\n };\n }\n function PolyhedronGroup(polyhedra) {\n this.polyhedra = polyhedra;\n var tmp = this;\n tmp.t2p_1 = lazy(PolyhedronGroup$axisAlignedBoundingBox$delegate$lambda(this));\n }\n protoOf(PolyhedronGroup).u2p = function () {\n return this.polyhedra;\n };\n protoOf(PolyhedronGroup).m2p = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.t2p_1;\n axisAlignedBoundingBox$factory_0();\n return this_0.u2();\n };\n protoOf(PolyhedronGroup).rotate = function (quaternion) {\n if (quaternion.isIdentity)\n return this;\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = this.polyhedra;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.rotate.' call\n arr[i] = this_0[i].rotate(quaternion);\n }\n while (inductionVariable <= last);\n var tmp$ret$2 = isArray(arr) ? arr : THROW_CCE();\n return new PolyhedronGroup(tmp$ret$2);\n };\n protoOf(PolyhedronGroup).move = function (displacement) {\n if (displacement.equals(Companion_getInstance_61().ZERO))\n return this;\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = this.polyhedra;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.move.' call\n arr[i] = this_0[i].move(displacement);\n }\n while (inductionVariable <= last);\n var tmp$ret$2 = isArray(arr) ? arr : THROW_CCE();\n return new PolyhedronGroup(tmp$ret$2);\n };\n protoOf(PolyhedronGroup).scaleUniform = function (scaleAmount) {\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = this.polyhedra;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.scaleUniform.' call\n arr[i] = this_0[i].scaleUniform(scaleAmount);\n }\n while (inductionVariable <= last);\n var tmp$ret$2 = isArray(arr) ? arr : THROW_CCE();\n return new PolyhedronGroup(tmp$ret$2);\n };\n protoOf(PolyhedronGroup).scale = function (scaleAmount) {\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = this.polyhedra;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.scale.' call\n arr[i] = this_0[i].scale(scaleAmount);\n }\n while (inductionVariable <= last);\n var tmp$ret$2 = isArray(arr) ? arr : THROW_CCE();\n return new PolyhedronGroup(tmp$ret$2);\n };\n protoOf(PolyhedronGroup).penetration = function (other) {\n if (!this.hasCoarseCollision(other))\n return null;\n var max = {_v: null};\n var maxSize = {_v: -1.0};\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.polyhedra;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.penetration.' call\n if (other instanceof PolyhedronGroup) {\n var tmp1_safe_receiver = other.penetration(element);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n penetration$check(maxSize, max, tmp1_safe_receiver.unaryMinus());\n }\n } else {\n penetration$check(maxSize, max, element.penetration(other));\n }\n }\n return max._v;\n };\n protoOf(PolyhedronGroup).penetrationAlongAxis = function (other, axis) {\n if (!this.hasCoarseCollision(other))\n return null;\n var tmp$ret$6;\n $l$block_0: {\n // Inline function 'kotlin.collections.maxByOrNull' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_0 = this.polyhedra;\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.penetration.' call\n var tmp;\n if (other instanceof PolyhedronGroup) {\n var tmp1_safe_receiver = other.penetrationAlongAxis(element, axis.unaryMinus());\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.penetration..' call\n tmp_0 = tmp1_safe_receiver.unaryMinus();\n }\n tmp = tmp_0;\n } else {\n tmp = element.penetrationAlongAxis(other, axis);\n }\n var tmp0_safe_receiver = tmp;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n var iterator = destination.t();\n if (!iterator.u()) {\n tmp$ret$6 = null;\n break $l$block_0;\n }\n var maxElem = iterator.w();\n if (!iterator.u()) {\n tmp$ret$6 = maxElem;\n break $l$block_0;\n }\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.penetration.' call\n var maxValue = maxElem.size;\n do {\n var e = iterator.w();\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.penetration.' call\n var v = e.size;\n if (compareTo(maxValue, v) < 0) {\n maxElem = e;\n maxValue = v;\n }\n }\n while (iterator.u());\n tmp$ret$6 = maxElem;\n }\n return tmp$ret$6;\n };\n protoOf(PolyhedronGroup).hasCoarseCollision = function (otherShape) {\n return this.axisAlignedBoundingBox.doIntersectWith(otherShape.axisAlignedBoundingBox);\n };\n protoOf(PolyhedronGroup).raycast = function (ray) {\n var closestDistance = Infinity;\n var closestHit = null;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.polyhedra;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronGroup.raycast.' call\n var tmp0_safe_receiver = isInterface(element, Raycastable) ? element : null;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_safe_receiver_0 = tmp0_safe_receiver.raycast(ray);\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var hitDistance = ray.origin.distanceTo(tmp0_safe_receiver_0.point);\n var tmp;\n if (hitDistance < closestDistance) {\n closestHit = tmp0_safe_receiver_0;\n closestDistance = hitDistance;\n tmp = Unit_instance;\n }\n }\n }\n }\n return closestHit;\n };\n function merge(_this__u8e3s4) {\n return new PolyhedronGroup(_this__u8e3s4);\n }\n function axisAlignedBoundingBox$factory_0() {\n return getPropertyCallableRef('axisAlignedBoundingBox', 1, KProperty1, function (receiver) {\n return receiver.axisAlignedBoundingBox;\n }, null);\n }\n function isConcaveVertex($this, p1, p2, p3, normal) {\n var vertexNormal = $this.generateNormalFromCounterClockwiseTriangle(p1, p2, p3);\n return vertexNormal.dot(normal) < 0.0;\n }\n function isConvexVertex($this, p1, p2, p3, normal) {\n var vertexNormal = $this.generateNormalFromCounterClockwiseTriangle(p1, p2, p3);\n return vertexNormal.dot(normal) > 0.0;\n }\n function isPlanarPointContainedInTriangle($this, p1, p2, p3, testPoint) {\n var f1 = p1.minus(testPoint);\n var f2 = p2.minus(testPoint);\n var f3 = p3.minus(testPoint);\n var va = p1.minus(p2).cross(p1.minus(p3));\n var va1 = f2.cross(f3);\n var va2 = f3.cross(f1);\n var va3 = f1.cross(f2);\n var triangleArea = va.size;\n var tmp = va1.size / triangleArea;\n // Inline function 'kotlin.math.sign' call\n var this_0 = va.dot(va1);\n var uvFactor1 = tmp * sign(this_0);\n var tmp_0 = va2.size / triangleArea;\n // Inline function 'kotlin.math.sign' call\n var this_1 = va.dot(va2);\n var uvFactor2 = tmp_0 * sign(this_1);\n var tmp_1 = va3.size / triangleArea;\n // Inline function 'kotlin.math.sign' call\n var this_2 = va.dot(va3);\n var uvFactor3 = tmp_1 * sign(this_2);\n var uv1 = new Vector(0.0, 0.0);\n var uv2 = new Vector(1.0, 0.0);\n var uv3 = new Vector(0.0, 1.0);\n var pointCoordinate = uv1.times(uvFactor1).plus(uv2.times(uvFactor2)).plus(uv3.times(uvFactor3));\n return (((pointCoordinate.X >= 0.0 ? pointCoordinate.X <= 1.0 : false) ? pointCoordinate.Y >= 0.0 : false) ? pointCoordinate.Y <= 1.0 : false) ? pointCoordinate.X + pointCoordinate.Y <= 1.0 : false;\n }\n function getVerticesFromSinglePolyhedron($this, polyhedron) {\n var tmp;\n if (polyhedron instanceof ConvexPolyhedron) {\n tmp = new Pair(polyhedron.vertices, polyhedron.faces);\n } else {\n // Inline function 'kotlin.emptyArray' call\n var tmp_0 = [];\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$1 = [];\n tmp = new Pair(tmp_0, tmp$ret$1);\n }\n return tmp;\n }\n function earClipTriangulation$isNotCornerAndNotInsideTriangle(p1, p2, p3, testPoint) {\n if ((!(testPoint === p1) ? !(testPoint === p2) : false) ? !(testPoint === p3) : false) {\n return isPlanarPointContainedInTriangle(PolyhedronUtils_getInstance(), p1, p2, p3, testPoint);\n }\n return false;\n }\n function earClipTriangulation$findValidEar(remainingVertices, shapeNormal) {\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var tmp0_iterator = remainingVertices.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.shapes.PolyhedronUtils.earClipTriangulation.findValidEar.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var currentVertexIndex = checkIndexOverflow(tmp1);\n var previousVertexIndex = PolyhedronUtils_getInstance().circularIndex(currentVertexIndex - 1 | 0, remainingVertices.n());\n var nextVertexIndex = PolyhedronUtils_getInstance().circularIndex(currentVertexIndex + 1 | 0, remainingVertices.n());\n var previousVertex = remainingVertices.f1(previousVertexIndex);\n var nextVertex = remainingVertices.f1(nextVertexIndex);\n var tmp;\n if (isConvexVertex(PolyhedronUtils_getInstance(), previousVertex, item, nextVertex, shapeNormal)) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.none' call\n var tmp_0;\n if (isInterface(remainingVertices, Collection)) {\n tmp_0 = remainingVertices.b1();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator_0 = remainingVertices.t();\n while (tmp0_iterator_0.u()) {\n var element = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.shapes.PolyhedronUtils.earClipTriangulation.findValidEar..' call\n if (earClipTriangulation$isNotCornerAndNotInsideTriangle(previousVertex, item, nextVertex, element)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n tmp = tmp$ret$0;\n } else {\n tmp = false;\n }\n if (tmp) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = [previousVertex, item, nextVertex];\n return new Pair(currentVertexIndex, tmp$ret$4);\n }\n }\n return null;\n }\n function PolyhedronUtils$singleSidedPolyhedronFromPolygon$lambda() {\n return 'Unsupported amount of vertices supplied to generateSurfaceCollider, will return empty Collider';\n }\n function PolyhedronUtils$polyhedronFromPolygon$lambda() {\n return 'Less than three vertices supplied to generateSurfaceCollider, will return empty Collider';\n }\n function PolyhedronUtils$polyhedronFromPolygon$lambda_0() {\n return 'Invalid amount of edge vertices, will return empty collider';\n }\n function PolyhedronUtils$polyhedronFromPolygon$lambda_1() {\n return 'Invalid vertex, will return empty collider';\n }\n function PolyhedronUtils$pointInPolygon$lambda(projectionLambda) {\n return projectionLambda.YZ;\n }\n function PolyhedronUtils$pointInPolygon$lambda_0(projectionLambda) {\n return projectionLambda.XZ;\n }\n function PolyhedronUtils$pointInPolygon$lambda_1(projectionLambda) {\n return projectionLambda.XY;\n }\n function PolyhedronUtils$flatPolyhedronFromConvexPolygon$lambda() {\n return 'Unsupported amount of vertices supplied to generateSurfaceCollider, will return empty Collider';\n }\n function PolyhedronUtils$transformAndExtractVerticesFromPolyhedron$lambda($poly) {\n return function () {\n return 'Shape not supported by getLocalOutsideMeasurementForEntities! ' + $poly;\n };\n }\n function PolyhedronUtils() {\n PolyhedronUtils_instance = this;\n this.v2p_1 = LoggerState_getInstance().m1m('PolyhedronUtils');\n }\n protoOf(PolyhedronUtils).createFromPolygon = function (vertices) {\n var tmp;\n if (this.isConvexPolygon(vertices)) {\n tmp = this.flatPolyhedronFromConvexPolygon(vertices);\n } else {\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.earClipTriangulation(vertices);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronUtils.createFromPolygon.' call\n var tmp$ret$0 = PolyhedronUtils_getInstance().flatPolyhedronFromConvexPolygon(item);\n destination.q(tmp$ret$0);\n }\n var all = destination;\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$3 = copyToArray(all);\n tmp = new PolyhedronGroup(tmp$ret$3);\n }\n return tmp;\n };\n protoOf(PolyhedronUtils).w2p = function (size, margin, padding, compartment) {\n var outerWidth = size.s2e_1 - margin.left - margin.right;\n var outerDepth = size.u2e_1 - margin.front - margin.back;\n var innerHeight = size.t2e_1 - (margin.top + margin.bottom + padding.top + padding.bottom);\n var innerWidth = size.s2e_1 - (margin.left + margin.right + padding.left + padding.right);\n var innerDepth = size.u2e_1 - (margin.front + margin.back + padding.front + padding.back);\n var innerDx = (margin.left - margin.right + padding.left - padding.right) / 2;\n var innerDy = (-margin.top + margin.bottom - padding.top + padding.bottom) / 2;\n var innerDz = -(margin.front - margin.back + padding.front - padding.back) / 2;\n var outerDz = -(margin.front - margin.back) / 2;\n var outerDx = (margin.left - margin.right) / 2;\n var topY = size.t2e_1 / 2.0 - margin.top - padding.top / 2.0;\n var bottomY = -size.t2e_1 / 2.0 + margin.bottom + padding.bottom / 2.0;\n var leftX = -size.s2e_1 / 2.0 + margin.left + padding.left / 2.0;\n var rightX = size.s2e_1 / 2.0 - margin.right - padding.right / 2.0;\n var frontZ = size.u2e_1 / 2.0 - margin.front - padding.front / 2.0;\n var backZ = -size.u2e_1 / 2.0 + margin.back + padding.back / 2.0;\n var compartmentWidth = (!(compartment == null) ? compartment.s2e_1 > 0.0 : false) ? compartment.s2e_1 : innerWidth;\n var compartmentHeight = (!(compartment == null) ? compartment.t2e_1 > 0.0 : false) ? compartment.t2e_1 : innerHeight;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.collections.mutableListOf' call\n var this_0 = ArrayList_init_$Create$();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.shapes.PolyhedronUtils.createFramePolyhedrons.' call\n if (padding.top > 0.0) {\n this_0.q(CuboidFromSizeAndCenter(new Vector(outerWidth, padding.top, outerDepth), new Vector(outerDx, topY, outerDz)));\n }\n if (padding.bottom > 0.0) {\n this_0.q(CuboidFromSizeAndCenter(new Vector(outerWidth, padding.bottom, outerDepth), new Vector(outerDx, bottomY, outerDz)));\n }\n if (padding.left > 0.0) {\n this_0.q(CuboidFromSizeAndCenter(new Vector(padding.left, innerHeight, outerDepth), new Vector(leftX, innerDy, outerDz)));\n }\n if (padding.right > 0.0) {\n this_0.q(CuboidFromSizeAndCenter(new Vector(padding.right, innerHeight, outerDepth), new Vector(rightX, innerDy, outerDz)));\n }\n if (padding.front > 0.0) {\n this_0.q(CuboidFromSizeAndCenter(new Vector(innerWidth, innerHeight, padding.front), new Vector(innerDx, innerDy, frontZ)));\n }\n if (padding.back > 0.0) {\n this_0.q(CuboidFromSizeAndCenter(new Vector(innerWidth, innerHeight, padding.back), new Vector(innerDx, innerDy, backZ)));\n }\n var outerCuboids = copyToArray(this_0);\n var horizontalCompartmentCount = numberToInt(innerWidth / compartmentWidth);\n var verticalComparmentCount = numberToInt(innerHeight / compartmentHeight);\n var horizontalGap = (innerWidth - compartmentWidth * horizontalCompartmentCount) / (horizontalCompartmentCount - 1 | 0);\n var verticalGap = (innerHeight - compartmentHeight * verticalComparmentCount) / (verticalComparmentCount - 1 | 0);\n var tmp;\n if (compartment == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.shapes.PolyhedronUtils.createFramePolyhedrons.' call\n // Inline function 'kotlin.collections.mutableListOf' call\n var dividerCuboids = ArrayList_init_$Create$();\n var dividerDx = compartmentWidth + horizontalGap;\n var dividerDy = compartmentHeight + verticalGap;\n var currentDividerX = innerDx - innerWidth / 2 + compartmentWidth + horizontalGap / 2;\n var currentDividerY = innerDy - innerHeight / 2 + compartmentHeight + verticalGap / 2;\n if (horizontalCompartmentCount > 1) {\n var inductionVariable = 0;\n var last = horizontalCompartmentCount - 1 | 0;\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n dividerCuboids.q(CuboidFromSizeAndCenter(new Vector(horizontalGap, innerHeight, innerDepth), new Vector(currentDividerX, innerDy, innerDz)));\n currentDividerX = currentDividerX + dividerDx;\n }\n while (inductionVariable < last);\n }\n if (verticalComparmentCount > 1) {\n currentDividerX = innerDx - innerWidth / 2 + compartmentWidth / 2;\n var inductionVariable_0 = 0;\n if (inductionVariable_0 < horizontalCompartmentCount)\n do {\n var i_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n var inductionVariable_1 = 0;\n var last_0 = verticalComparmentCount - 1 | 0;\n if (inductionVariable_1 < last_0)\n do {\n var j = inductionVariable_1;\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n dividerCuboids.q(CuboidFromSizeAndCenter(new Vector(compartmentWidth, verticalGap, innerDepth), new Vector(currentDividerX, currentDividerY, innerDz)));\n currentDividerY = currentDividerY + dividerDy;\n }\n while (inductionVariable_1 < last_0);\n currentDividerX = currentDividerX + dividerDx;\n currentDividerY = innerDy - innerHeight / 2 + compartmentHeight + verticalGap / 2;\n }\n while (inductionVariable_0 < horizontalCompartmentCount);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_1 = plus_2(dividerCuboids, outerCuboids);\n tmp = copyToArray(this_1);\n }\n var tmp1_elvis_lhs = tmp;\n var cuboids = tmp1_elvis_lhs == null ? outerCuboids : tmp1_elvis_lhs;\n return cuboids;\n };\n protoOf(PolyhedronUtils).createFramePolyhedrons = function (size, margin, padding, compartment, $super) {\n compartment = compartment === VOID ? null : compartment;\n return this.w2p(size, margin, padding, compartment);\n };\n protoOf(PolyhedronUtils).singleSidedPolyhedronFromPolygon = function (vertices) {\n if (vertices.length < 3) {\n this.v2p_1.warn(PolyhedronUtils$singleSidedPolyhedronFromPolygon$lambda);\n return Companion_getInstance_95().ZERO;\n }\n var normal = this.surfaceNormal(vertices);\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = toList(get_indices(vertices));\n var tmp$ret$0 = copyToArray(this_0);\n var face = new Face(tmp$ret$0);\n // Inline function 'kotlin.collections.mutableListOf' call\n var edgeDirections = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = get_lastIndex(vertices);\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n edgeDirections.q(vertices[this.circularIndex(i, vertices.length)].minus(vertices[this.circularIndex(i + 1 | 0, vertices.length)]).normalize());\n }\n while (!(i === last));\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [normal];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = [face];\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$8 = copyToArray(edgeDirections);\n return new ConvexPolyhedron(tmp, vertices, tmp_0, tmp$ret$8);\n };\n protoOf(PolyhedronUtils).circularIndex = function (index, length) {\n var tmp;\n if (index >= length) {\n tmp = index % length | 0;\n } else if (index < 0) {\n tmp = (index % length | 0) + length | 0;\n } else {\n tmp = index;\n }\n return tmp;\n };\n protoOf(PolyhedronUtils).polyhedronFromPolygon = function (points, thickness) {\n if (points.length < 3) {\n this.v2p_1.warn(PolyhedronUtils$polyhedronFromPolygon$lambda);\n return Companion_getInstance_95().ZERO;\n }\n // Inline function 'kotlin.collections.mutableListOf' call\n var faceIndices = ArrayList_init_$Create$();\n // Inline function 'kotlin.arrayOfNulls' call\n // Inline function 'kotlin.collections.count' call\n var tmp$ret$1 = points.length;\n var size = imul(tmp$ret$1, 2);\n var vertices = fillArrayVal(Array(size), null);\n var negativeFaceNormal = this.generateNormalFromCounterClockwiseTriangle(points[0], points[1], points[2]).unaryMinus();\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = toList(get_indices(points));\n var frontFaceIndices = copyToArray(this_0);\n faceIndices.q(frontFaceIndices);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.count' call\n var tmp = points.length;\n // Inline function 'kotlin.collections.count' call\n var tmp$ret$5 = points.length;\n var this_1 = toList(reversed(until(tmp, imul(tmp$ret$5, 2))));\n var backfaceIndicesReversed = copyToArray(this_1);\n faceIndices.q(backfaceIndicesReversed);\n var inductionVariable = 0;\n var last = get_lastIndex(points);\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n vertices[i] = points[i];\n vertices[points.length + i | 0] = points[i].plus(negativeFaceNormal.times(thickness));\n var j = i + points.length | 0;\n var k = (i + 1 | 0) % points.length | 0;\n var l = k + points.length | 0;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$9 = [i, j, l, k];\n faceIndices.q(tmp$ret$9);\n }\n while (!(i === last));\n // Inline function 'kotlin.collections.mutableListOf' call\n var polyhedronNormals = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.mutableListOf' call\n var polyhedronFaces = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.mutableListOf' call\n var polyhedronEdgeDirections = ArrayList_init_$Create$();\n var tmp1_iterator = faceIndices.t();\n while (tmp1_iterator.u()) {\n var face = tmp1_iterator.w();\n var triangleVertex1 = vertices[face[0]];\n var triangleVertex2 = vertices[face[1]];\n var triangleVertex3 = vertices[face[2]];\n if ((!(triangleVertex1 == null) ? !(triangleVertex2 == null) : false) ? !(triangleVertex3 == null) : false) {\n var currentFaceNormal = this.generateNormalFromCounterClockwiseTriangle(triangleVertex1, triangleVertex2, triangleVertex3);\n polyhedronNormals.q(currentFaceNormal);\n polyhedronFaces.q(new Face(face));\n var nextFaceIndex = get_lastIndex(face);\n var inductionVariable_0 = 0;\n var last_0 = get_lastIndex(face);\n if (inductionVariable_0 <= last_0)\n do {\n var index = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n var fromVertex = vertices[nextFaceIndex];\n var toVertex = vertices[index];\n if (!(toVertex == null) ? !(fromVertex == null) : false) {\n polyhedronEdgeDirections.q(toVertex.minus(fromVertex));\n }\n nextFaceIndex = index;\n }\n while (!(index === last_0));\n } else {\n this.v2p_1.warn(PolyhedronUtils$polyhedronFromPolygon$lambda_0);\n return Companion_getInstance_95().ZERO;\n }\n }\n // Inline function 'kotlin.collections.mutableListOf' call\n var polyhedronVertices = ArrayList_init_$Create$();\n var inductionVariable_1 = 0;\n // Inline function 'kotlin.collections.count' call\n var tmp$ret$14 = points.length;\n var last_1 = imul(tmp$ret$14, 2);\n if (inductionVariable_1 < last_1)\n do {\n var i_0 = inductionVariable_1;\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n var vertex = vertices[i_0];\n if (!(vertex == null)) {\n polyhedronVertices.q(vertex);\n } else {\n this.v2p_1.warn(PolyhedronUtils$polyhedronFromPolygon$lambda_1);\n return Companion_getInstance_95().ZERO;\n }\n }\n while (inductionVariable_1 < last_1);\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp_0 = copyToArray(polyhedronNormals);\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp_1 = copyToArray(polyhedronVertices);\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp_2 = copyToArray(polyhedronFaces);\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$18 = copyToArray(polyhedronEdgeDirections);\n return new ConvexPolyhedron(tmp_0, tmp_1, tmp_2, tmp$ret$18);\n };\n protoOf(PolyhedronUtils).pointInPolygon = function (point, vertices, normal) {\n // Inline function 'kotlin.math.abs' call\n var x = point.minus(vertices[0]).dot(normal);\n if (Math.abs(x) > 0.1)\n return false;\n // Inline function 'kotlin.math.abs' call\n var x_0 = normal.X;\n var absX = Math.abs(x_0);\n // Inline function 'kotlin.math.abs' call\n var x_1 = normal.Y;\n var absY = Math.abs(x_1);\n // Inline function 'kotlin.math.abs' call\n var x_2 = normal.Z;\n var absZ = Math.abs(x_2);\n var tmp;\n if (absX >= absY ? absX >= absZ : false) {\n tmp = PolyhedronUtils$pointInPolygon$lambda;\n } else if (absY >= absX ? absY >= absZ : false) {\n tmp = PolyhedronUtils$pointInPolygon$lambda_0;\n } else {\n tmp = PolyhedronUtils$pointInPolygon$lambda_1;\n }\n var projectionLambda = tmp;\n var projectedPoint = projectionLambda(point);\n var crossings = 0;\n // Inline function 'kotlin.collections.count' call\n var j = vertices.length - 1 | 0;\n var inductionVariable = 0;\n // Inline function 'kotlin.collections.count' call\n var last = vertices.length;\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var point1 = projectionLambda(vertices[i]);\n var point2 = projectionLambda(vertices[j]);\n if (!(point1.Y > projectedPoint.Y === point2.Y > projectedPoint.Y) ? projectedPoint.X < (point2.X - point1.X) * (projectedPoint.Y - point1.Y) / (point2.Y - point1.Y) + point1.X : false) {\n crossings = crossings + 1 | 0;\n }\n j = i;\n }\n while (inductionVariable < last);\n return !((crossings % 2 | 0) === 0);\n };\n protoOf(PolyhedronUtils).flatPolyhedronFromConvexPolygon = function (vertices) {\n if (vertices.length < 3) {\n this.v2p_1.warn(PolyhedronUtils$flatPolyhedronFromConvexPolygon$lambda);\n return Companion_getInstance_95().ZERO;\n }\n var normal = this.generateNormalFromClockwiseTriangle(vertices[0], vertices[1], vertices[2]);\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = toList(get_indices(vertices));\n var tmp$ret$0 = copyToArray(this_0);\n var face = new Face(tmp$ret$0);\n // Inline function 'kotlin.collections.mutableListOf' call\n var edgeDirections = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = get_lastIndex(vertices);\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n edgeDirections.q(vertices[this.circularIndex(i, vertices.length)].minus(vertices[this.circularIndex(i + 1 | 0, vertices.length)]).normalize());\n }\n while (!(i === last));\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [normal];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = [face];\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$8 = copyToArray(edgeDirections);\n return new ConvexPolyhedron(tmp, vertices, tmp_0, tmp$ret$8);\n };\n protoOf(PolyhedronUtils).isConvexPolygon = function (vertices) {\n var normal = this.generateNormalFromCounterClockwiseTriangle(vertices[0], vertices[1], vertices[2]);\n var inductionVariable = 0;\n var last = vertices.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var previousIndex = this.circularIndex(i - 1 | 0, vertices.length);\n var nextIndex = this.circularIndex(i + 1 | 0, vertices.length);\n if (isConcaveVertex(this, vertices[previousIndex], vertices[i], vertices[nextIndex], normal)) {\n return false;\n }\n }\n while (inductionVariable <= last);\n return true;\n };\n protoOf(PolyhedronUtils).surfaceNormal = function (vertices) {\n var surfaceX = 0.0;\n var surfaceY = 0.0;\n var surfaceZ = 0.0;\n var inductionVariable = 0;\n var last = vertices.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.mod' call\n var this_0 = i + 1 | 0;\n var other = vertices.length;\n var r = this_0 % other | 0;\n var j = r + (other & ((r ^ other) & (r | (-r | 0))) >> 31) | 0;\n surfaceX = surfaceX + (vertices[i].Y - vertices[j].Y) * (vertices[i].Z + vertices[j].Z);\n surfaceY = surfaceY + (vertices[i].Z - vertices[j].Z) * (vertices[i].X + vertices[j].X);\n surfaceZ = surfaceZ + (vertices[i].X - vertices[j].X) * (vertices[i].Y + vertices[j].Y);\n }\n while (!(i === last));\n return (new Vector(surfaceX, surfaceY, surfaceZ)).normalize();\n };\n protoOf(PolyhedronUtils).generateNormalFromClockwiseTriangle = function (previous, middle, next) {\n return next.minus(middle).cross(middle.minus(previous)).normalize();\n };\n protoOf(PolyhedronUtils).generateNormalFromCounterClockwiseTriangle = function (previous, middle, next) {\n return middle.minus(previous).cross(next.minus(middle)).normalize();\n };\n protoOf(PolyhedronUtils).isPointContainedInTriangle = function (p1, p2, p3, testPoint) {\n var normal = this.generateNormalFromCounterClockwiseTriangle(p1, p2, p3);\n var plane = new Plane(p1, normal);\n if (plane.contains(testPoint, 0.01)) {\n return isPlanarPointContainedInTriangle(this, p1, p2, p3, testPoint);\n }\n return false;\n };\n protoOf(PolyhedronUtils).getVerticesFromPolyhedrons = function (polyhedrons) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var faceList = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = polyhedrons.length;\n while (inductionVariable < last) {\n var element = polyhedrons[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronUtils.getVerticesFromPolyhedrons.' call\n if (element instanceof PolyhedronGroup) {\n addAll_1(faceList, PolyhedronUtils_getInstance().getVerticesFromPolyhedrons(element.polyhedra));\n } else {\n faceList.q(getVerticesFromSinglePolyhedron(PolyhedronUtils_getInstance(), element));\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(faceList);\n };\n protoOf(PolyhedronUtils).getPolygonsFromPolyhedrons = function (polyhedrons) {\n var surfaces = this.getVerticesFromPolyhedrons(polyhedrons);\n // Inline function 'kotlin.collections.mutableListOf' call\n var polygons = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = surfaces.length;\n while (inductionVariable < last) {\n var element = surfaces[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronUtils.getPolygonsFromPolyhedrons.' call\n var vertices = element.af();\n var faces = element.bf();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = faces.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = faces[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronUtils.getPolygonsFromPolyhedrons..' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = element_0.indices;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable_1 = 0;\n var last_1 = this_0.length;\n while (inductionVariable_1 < last_1) {\n var item = this_0[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronUtils.getPolygonsFromPolyhedrons...' call\n var tmp$ret$1 = vertices[item];\n destination.q(tmp$ret$1);\n }\n var faceVertices = copyToArray(destination);\n polygons.q(new Polygon(faceVertices, PolyhedronUtils_getInstance().surfaceNormal(faceVertices)));\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(polygons);\n };\n protoOf(PolyhedronUtils).earClipTriangulation = function (vertices) {\n var shapeNormal = this.surfaceNormal(vertices);\n // Inline function 'kotlin.collections.mutableListOf' call\n var triangles = ArrayList_init_$Create$();\n var remainingVertices = toMutableList(vertices);\n $l$loop: while (true) {\n // Inline function 'kotlin.collections.count' call\n if (!(remainingVertices.n() > 2)) {\n break $l$loop;\n }\n var ear = earClipTriangulation$findValidEar(remainingVertices, shapeNormal);\n if (!(ear == null)) {\n var index = ear.af();\n var triangle = ear.bf();\n triangles.q(triangle);\n remainingVertices.h1(index);\n } else {\n throw IllegalStateException_init_$Create$('Core was unable to triangulate polygon, please supply a non-degenerate polygon.');\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(triangles);\n };\n protoOf(PolyhedronUtils).transformAndExtractVerticesFromPolyhedron = function (poly, worldTransform) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var vertices = ArrayList_init_$Create$();\n if (poly instanceof ConvexPolyhedron) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = poly.transform(worldTransform).vertices;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronUtils.transformAndExtractVerticesFromPolyhedron.' call\n vertices.q(element);\n }\n } else {\n if (poly instanceof PolyhedronGroup) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = poly.polyhedra;\n var inductionVariable_0 = 0;\n var last_0 = indexedObject_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.shapes.PolyhedronUtils.transformAndExtractVerticesFromPolyhedron.' call\n vertices.x(PolyhedronUtils_getInstance().transformAndExtractVerticesFromPolyhedron(element_0, worldTransform));\n }\n } else {\n this.v2p_1.warn(PolyhedronUtils$transformAndExtractVerticesFromPolyhedron$lambda(poly));\n }\n }\n return vertices;\n };\n protoOf(PolyhedronUtils).isConvexPolyhedron = function (polyhedron) {\n return polyhedron instanceof ConvexPolyhedron;\n };\n protoOf(PolyhedronUtils).isCuboid = function (polyhedron) {\n return polyhedron instanceof Cuboid;\n };\n protoOf(PolyhedronUtils).isPolyhedronGroup = function (polyhedron) {\n return polyhedron instanceof PolyhedronGroup;\n };\n var PolyhedronUtils_instance;\n function PolyhedronUtils_getInstance() {\n if (PolyhedronUtils_instance == null)\n new PolyhedronUtils();\n return PolyhedronUtils_instance;\n }\n function Companion_95() {\n }\n protoOf(Companion_95).s1k = function () {\n return 68;\n };\n var Companion_instance_95;\n function Companion_getInstance_96() {\n return Companion_instance_95;\n }\n function MovedToCandidateSnapPositionComponent(snapActionCandidate) {\n this.snapActionCandidate = snapActionCandidate;\n }\n protoOf(MovedToCandidateSnapPositionComponent).x2p = function () {\n return this.snapActionCandidate;\n };\n protoOf(MovedToCandidateSnapPositionComponent).x1k = function () {\n return Companion_instance_95.id;\n };\n protoOf(MovedToCandidateSnapPositionComponent).eq = function (other) {\n return true;\n };\n function triggerMovedToCandidateSnapPositionComponent(_this__u8e3s4, snapActionCandidate) {\n _this__u8e3s4.addComponent(new MovedToCandidateSnapPositionComponent(snapActionCandidate));\n _this__u8e3s4.removeComponent(Companion_instance_95.id);\n }\n function Companion_96() {\n this.id = 45;\n }\n protoOf(Companion_96).s1k = function () {\n return this.id;\n };\n var Companion_instance_96;\n function Companion_getInstance_97() {\n return Companion_instance_96;\n }\n function MovedToValidSnapPositionComponent(snapActionCandidate) {\n this.snapActionCandidate = snapActionCandidate;\n }\n protoOf(MovedToValidSnapPositionComponent).x2p = function () {\n return this.snapActionCandidate;\n };\n protoOf(MovedToValidSnapPositionComponent).x1k = function () {\n return 45;\n };\n protoOf(MovedToValidSnapPositionComponent).eq = function (other) {\n return true;\n };\n function triggerMovedToValidSnapPositionComponent(_this__u8e3s4, snapActionCandidate) {\n _this__u8e3s4.addComponent(new MovedToValidSnapPositionComponent(snapActionCandidate));\n _this__u8e3s4.removeComponent(45);\n }\n function Companion_97() {\n }\n protoOf(Companion_97).s1k = function () {\n return 8;\n };\n var Companion_instance_97;\n function Companion_getInstance_98() {\n return Companion_instance_97;\n }\n function RestrictAllowedRequiredHostsComponent(allowedHosts) {\n this.allowedHosts = allowedHosts;\n this.w1x_1 = 0;\n }\n protoOf(RestrictAllowedRequiredHostsComponent).y2p = function () {\n return this.allowedHosts;\n };\n protoOf(RestrictAllowedRequiredHostsComponent).x1k = function () {\n return Companion_instance_97.id;\n };\n protoOf(RestrictAllowedRequiredHostsComponent).eq = function (other) {\n var otherC = other instanceof RestrictAllowedRequiredHostsComponent ? other : THROW_CCE();\n var tmp;\n if (otherC.allowedHosts.length === this.allowedHosts.length) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.all' call\n var indexedObject = otherC.allowedHosts;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping.RestrictAllowedRequiredHostsComponent.eq.' call\n if (!contains(this.allowedHosts, element)) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n tmp = tmp$ret$1;\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(RestrictAllowedRequiredHostsComponent).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof RestrictAllowedRequiredHostsComponent))\n THROW_CCE();\n if (!contentEquals(this.allowedHosts, other.allowedHosts))\n return false;\n return true;\n };\n protoOf(RestrictAllowedRequiredHostsComponent).hashCode = function () {\n if (this.w1x_1 === 0)\n this.w1x_1 = contentHashCode(this.allowedHosts);\n return this.w1x_1;\n };\n protoOf(RestrictAllowedRequiredHostsComponent).af = function () {\n return this.allowedHosts;\n };\n protoOf(RestrictAllowedRequiredHostsComponent).v29 = function (allowedHosts) {\n return new RestrictAllowedRequiredHostsComponent(allowedHosts);\n };\n protoOf(RestrictAllowedRequiredHostsComponent).copy = function (allowedHosts, $super) {\n allowedHosts = allowedHosts === VOID ? this.allowedHosts : allowedHosts;\n return this.v29(allowedHosts);\n };\n protoOf(RestrictAllowedRequiredHostsComponent).toString = function () {\n return 'RestrictAllowedRequiredHostsComponent(allowedHosts=' + toString(this.allowedHosts) + ')';\n };\n function SnapAction_init_$Init$(candidate, $this) {\n SnapAction.call($this, candidate.host, candidate.guest, candidate.guestRoot, candidate.hostConnector, candidate.guestConnector, candidate.endTransform, candidate.initialTransform);\n return $this;\n }\n function SnapActionFromCandidate(candidate) {\n return SnapAction_init_$Init$(candidate, objectCreate(protoOf(SnapAction)));\n }\n function _get_nonDisposedGuest__7a6v6j($this) {\n var tmp;\n if ($this.guest.isDisposed) {\n tmp = null;\n } else {\n tmp = $this.guest;\n }\n return tmp;\n }\n function createConnections($this) {\n var connectorsDeltaTransform = $this.hostConnector.getDeltaTransformToGuestConnectorEntity($this.host, $this.guest, $this.guestConnector);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = getHierarchyWithComponent($this.guestRoot, 28);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapAction.createConnections.' call\n if (equals(element.entityManager.findEntity(element.id), element)) {\n ConnectionUtils_instance.refreshConnections(element, HierarchyUtils_instance.rootOf($this.host));\n }\n }\n var tmp0_safe_receiver = _get_nonDisposedGuest__7a6v6j($this);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var connectionCausedDirectlyBySnap = new Connection(tmp0_safe_receiver, $this.guestConnector, $this.host, $this.hostConnector, connectorsDeltaTransform);\n var tmp;\n if (!hasConnectionThatCausedTheSnap($this, connectionCausedDirectlyBySnap)) {\n var tmp0_safe_receiver_0 = get_connectionRootEntity(tmp0_safe_receiver);\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : get_guestConnections(tmp0_safe_receiver_0);\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [connectionCausedDirectlyBySnap];\n tmp_0 = tmp1_safe_receiver.concat(tmp$ret$3);\n }\n var tmp2_elvis_lhs = tmp_0;\n var tmp_1;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_1 = [connectionCausedDirectlyBySnap];\n } else {\n tmp_1 = tmp2_elvis_lhs;\n }\n var newConnections = tmp_1;\n var newGuestConnectionsComponent = new GuestConnectionsComponent(newConnections);\n var tmp3_safe_receiver = get_connectionRootEntity(tmp0_safe_receiver);\n if (tmp3_safe_receiver == null)\n null;\n else\n tmp3_safe_receiver.addComponent(newGuestConnectionsComponent);\n tmp = Unit_instance;\n }\n }\n }\n function getAffectedGroups($this) {\n // Inline function 'kotlin.collections.map' call\n var this_0 = getHierarchyWithComponent($this.guestRoot, 28);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapAction.getAffectedGroups.' call\n var tmp$ret$0 = get_guestConnections(item);\n destination.q(tmp$ret$0);\n }\n var guestConnectionsAfterSnapping = destination;\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = guestConnectionsAfterSnapping.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.snapping.SnapAction.getAffectedGroups.' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_1 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = element.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = element[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.snapping.SnapAction.getAffectedGroups..' call\n var tmp0_safe_receiver = get_automaticEntityGroup(element_0.guestConnectionRoot);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_1.q(tmp0_safe_receiver);\n }\n }\n var list = destination_1;\n addAll(destination_0, list);\n }\n var entityGroups = distinct(destination_0);\n return entityGroups;\n }\n function hasConnectionThatCausedTheSnap($this, connection) {\n var tmp;\n var tmp_0 = connection.hostConnector;\n if (tmp_0 instanceof PointSeriesSubConnector) {\n var tmp0_safe_receiver = get_connectionRootEntity(connection.guestConnectorEntity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_guestConnections(tmp0_safe_receiver);\n var tmp_1;\n if (tmp1_safe_receiver == null) {\n tmp_1 = null;\n } else {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapAction.hasConnectionThatCausedTheSnap.' call\n if (element.hostConnector.key === connection.hostConnector.key) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n tmp_1 = tmp$ret$1;\n }\n tmp = tmp_1 === true;\n } else {\n tmp = false;\n }\n if (tmp) {\n return true;\n }\n var tmp2_safe_receiver = get_connectionRootEntity(connection.guestConnectorEntity);\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : get_guestConnections(tmp2_safe_receiver);\n return (tmp3_safe_receiver == null ? null : contains(tmp3_safe_receiver, connection)) === true;\n }\n function SnapAction(host, guest, guestRoot, hostConnector, guestConnector, endTransform, initialTransform) {\n SnapActionCandidateImpl.call(this, host, guest, guestRoot, hostConnector, guestConnector, initialTransform, endTransform);\n }\n protoOf(SnapAction).perform = function () {\n this.guest.addComponent(new SnapActionInProgressComponent());\n protoOf(SnapActionCandidateImpl).perform.call(this);\n createConnections(this);\n var entityGroups = getAffectedGroups(this);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = entityGroups.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.snapping.SnapAction.perform.' call\n setAutomaticGroupParentToHighestPrioConnectionOutsideGroup(element);\n }\n triggerMovedToValidSnapPositionComponent(this.guestRoot, this);\n var tmp0_safe_receiver = _get_nonDisposedGuest__7a6v6j(this);\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.removeComponent(34);\n }\n };\n protoOf(SnapAction).withInitialTransform = function (io) {\n return new SnapAction(this.host, this.guest, this.guestRoot, this.hostConnector, this.guestConnector, this.endTransform, io);\n };\n protoOf(SnapAction).withNewPosition = function (newEndPosition) {\n return new SnapAction(this.host, this.guest, this.guestRoot, this.hostConnector, this.guestConnector, new Transform(newEndPosition, this.endTransform.rotation), this.initialTransform);\n };\n function SnapActionCandidate() {\n }\n function performMovement($this, productRoot) {\n TransformUtils_instance.setWorldTransform(productRoot, $this.endTransform);\n }\n function revertMovement($this) {\n TransformUtils_instance.setWorldTransform($this.guestRoot, $this.initialTransform);\n }\n function _get_inActivationDistance__r405b9($this) {\n // Inline function 'kotlin.getValue' call\n var this_0 = $this.h2q_1;\n inActivationDistance$factory();\n return this_0.u2();\n }\n function SnapActionCandidateImpl$guestRootToGuestDeltaTransform$delegate$lambda(this$0) {\n return function () {\n return get_worldTransform(this$0.guest).delta(get_worldTransform(this$0.guestRoot));\n };\n }\n function SnapActionCandidateImpl$guestRootToGuestConnectorDeltaTransform$delegate$lambda(this$0) {\n return function () {\n return this$0.guestRootToGuestDeltaTransform.concatenate(this$0.guestConnector.transform);\n };\n }\n function SnapActionCandidateImpl$guestEndTransform$delegate$lambda(this$0) {\n return function () {\n return this$0.endTransform.concatenate(this$0.guestRootToGuestDeltaTransform);\n };\n }\n function SnapActionCandidateImpl$inActivationDistance$delegate$lambda(this$0) {\n return function () {\n var tmp0_safe_receiver = this$0.alignmentInitiatorCandidate;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnector;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.activationDistance;\n var hostActivationDistance = tmp2_elvis_lhs == null ? this$0.hostConnector.activationDistance : tmp2_elvis_lhs;\n var tmp3_safe_receiver = this$0.alignmentInitiatorCandidate;\n var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.guestConnector;\n var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.activationDistance;\n var guestActivationDistance = tmp5_elvis_lhs == null ? this$0.guestConnector.activationDistance : tmp5_elvis_lhs;\n var activationDistance = hostActivationDistance + guestActivationDistance;\n var tmp6_safe_receiver = this$0.alignmentInitiatorCandidate;\n var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.host;\n var hostOwner = tmp7_elvis_lhs == null ? this$0.host : tmp7_elvis_lhs;\n var tmp8_safe_receiver = this$0.alignmentInitiatorCandidate;\n var tmp9_elvis_lhs = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.guest;\n var guestOwner = tmp9_elvis_lhs == null ? this$0.guest : tmp9_elvis_lhs;\n var tmp10_safe_receiver = this$0.alignmentInitiatorCandidate;\n var tmp11_elvis_lhs = tmp10_safe_receiver == null ? null : tmp10_safe_receiver.guestConnector;\n var guestConnectorWorldPos = (tmp11_elvis_lhs == null ? this$0.guestConnector : tmp11_elvis_lhs).getWorldPositionFromOwnerTransform(get_worldTransform(guestOwner));\n var tmp12_safe_receiver = this$0.alignmentInitiatorCandidate;\n var tmp13_elvis_lhs = tmp12_safe_receiver == null ? null : tmp12_safe_receiver.hostConnector;\n var hostConnectorWorldPos = (tmp13_elvis_lhs == null ? this$0.hostConnector : tmp13_elvis_lhs).closestWhenUsingTransform(get_worldTransform(hostOwner), guestConnectorWorldPos);\n var dist = hostConnectorWorldPos.minus(guestConnectorWorldPos).size;\n return dist <= activationDistance;\n };\n }\n function SnapActionCandidateImpl(host, guest, guestRoot, hostConnector, guestConnector, initialTransform, endTransform, overridePriority, alignmentInitiatorCandidate) {\n overridePriority = overridePriority === VOID ? null : overridePriority;\n alignmentInitiatorCandidate = alignmentInitiatorCandidate === VOID ? null : alignmentInitiatorCandidate;\n this.host = host;\n this.guest = guest;\n this.guestRoot = guestRoot;\n this.hostConnector = hostConnector;\n this.guestConnector = guestConnector;\n this.initialTransform = initialTransform;\n this.endTransform = endTransform;\n this.z2p_1 = alignmentInitiatorCandidate;\n this.a2q_1 = ActionState_NOT_DONE_getInstance();\n this.b2q_1 = this.endTransform.position.minus(this.initialTransform.position);\n this.c2q_1 = this.initialTransform.rotation.inverse().times(this.endTransform.rotation);\n var tmp = this;\n tmp.d2q_1 = overridePriority == null ? this.guestConnector.priority + this.hostConnector.priority | 0 : overridePriority;\n var tmp_0 = this;\n tmp_0.e2q_1 = lazy(SnapActionCandidateImpl$guestRootToGuestDeltaTransform$delegate$lambda(this));\n var tmp_1 = this;\n tmp_1.f2q_1 = lazy(SnapActionCandidateImpl$guestRootToGuestConnectorDeltaTransform$delegate$lambda(this));\n var tmp_2 = this;\n tmp_2.g2q_1 = lazy(SnapActionCandidateImpl$guestEndTransform$delegate$lambda(this));\n var tmp_3 = this;\n tmp_3.h2q_1 = lazy(SnapActionCandidateImpl$inActivationDistance$delegate$lambda(this));\n }\n protoOf(SnapActionCandidateImpl).i2q = function () {\n return this.host;\n };\n protoOf(SnapActionCandidateImpl).j2q = function () {\n return this.guest;\n };\n protoOf(SnapActionCandidateImpl).k2q = function () {\n return this.guestRoot;\n };\n protoOf(SnapActionCandidateImpl).r1v = function () {\n return this.hostConnector;\n };\n protoOf(SnapActionCandidateImpl).p1v = function () {\n return this.guestConnector;\n };\n protoOf(SnapActionCandidateImpl).l2q = function () {\n return this.initialTransform;\n };\n protoOf(SnapActionCandidateImpl).m2q = function () {\n return this.endTransform;\n };\n protoOf(SnapActionCandidateImpl).n2q = function () {\n return this.z2p_1;\n };\n protoOf(SnapActionCandidateImpl).f1i = function (_set____db54di) {\n this.a2q_1 = _set____db54di;\n };\n protoOf(SnapActionCandidateImpl).g1i = function () {\n return this.a2q_1;\n };\n protoOf(SnapActionCandidateImpl).o2q = function () {\n return this.b2q_1;\n };\n protoOf(SnapActionCandidateImpl).p2q = function () {\n return this.c2q_1;\n };\n protoOf(SnapActionCandidateImpl).v1v = function () {\n return this.d2q_1;\n };\n protoOf(SnapActionCandidateImpl).q2q = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.e2q_1;\n guestRootToGuestDeltaTransform$factory();\n return this_0.u2();\n };\n protoOf(SnapActionCandidateImpl).r2q = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.f2q_1;\n guestRootToGuestConnectorDeltaTransform$factory();\n return this_0.u2();\n };\n protoOf(SnapActionCandidateImpl).s2q = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.g2q_1;\n guestEndTransform$factory();\n return this_0.u2();\n };\n protoOf(SnapActionCandidateImpl).perform = function () {\n performMovement(this, this.guestRoot);\n triggerMovedToCandidateSnapPositionComponent(this.guestRoot, this);\n };\n protoOf(SnapActionCandidateImpl).rollback = function () {\n revertMovement(this);\n triggerMovedToCandidateSnapPositionComponent(this.guestRoot, null);\n };\n protoOf(SnapActionCandidateImpl).createAction = function () {\n return SnapActionFromCandidate(this);\n };\n protoOf(SnapActionCandidateImpl).doInitialAssemblySnap = function () {\n TransformUtils_instance.setWorldTransform(this.guestRoot, this.endTransform);\n setParent(this.guestRoot, this.host);\n };\n protoOf(SnapActionCandidateImpl).toString = function () {\n if (!this.guestRoot.equals(this.guest)) {\n return 'Snap guest root ' + get_displayName(this.guestRoot) + ',' + this.guestRoot.id + ', ' + ('Guest ' + get_displayName(this.guest) + ',' + this.guest.id + ', ') + ('Host ' + get_displayName(this.host) + ',' + this.host.id);\n }\n return 'Snap,' + ('Guest ' + get_displayName(this.guest) + ', ' + this.guestConnector.key + ', ' + this.guest.id + ',') + ('Host ' + get_displayName(this.host) + ', ' + this.hostConnector.key + ', ' + this.host.id);\n };\n protoOf(SnapActionCandidateImpl).inActivationDistance = function () {\n return _get_inActivationDistance__r405b9(this);\n };\n protoOf(SnapActionCandidateImpl).withInitialTransform = function (io) {\n return new SnapActionCandidateImpl(this.host, this.guest, this.guestRoot, this.hostConnector, this.guestConnector, io, this.endTransform, VOID, this.alignmentInitiatorCandidate);\n };\n protoOf(SnapActionCandidateImpl).withNewPosition = function (newEndPosition) {\n return new SnapActionCandidateImpl(this.host, this.guest, this.guestRoot, this.hostConnector, this.guestConnector, this.initialTransform, new Transform(newEndPosition, this.endTransform.rotation));\n };\n function guestRootToGuestDeltaTransform$factory() {\n return getPropertyCallableRef('guestRootToGuestDeltaTransform', 1, KProperty1, function (receiver) {\n return receiver.guestRootToGuestDeltaTransform;\n }, null);\n }\n function guestRootToGuestConnectorDeltaTransform$factory() {\n return getPropertyCallableRef('guestRootToGuestConnectorDeltaTransform', 1, KProperty1, function (receiver) {\n return receiver.guestRootToGuestConnectorDeltaTransform;\n }, null);\n }\n function guestEndTransform$factory() {\n return getPropertyCallableRef('guestEndTransform', 1, KProperty1, function (receiver) {\n return receiver.guestEndTransform;\n }, null);\n }\n function inActivationDistance$factory() {\n return getPropertyCallableRef('inActivationDistance', 1, KProperty1, function (receiver) {\n return _get_inActivationDistance__r405b9(receiver);\n }, null);\n }\n function SnapActionCandidateSortAndSelectStrategies() {\n SnapActionCandidateSortAndSelectStrategies_instance = this;\n this.SELECT_ALL = SelectAll_instance;\n this.SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE = SortByPriorityInActivationDistanceThenDistance_instance;\n this.SORT_BY_DISTANCE = SortByDistance_instance;\n this.SORT_BY_PRIORITY_THEN_DISTANCE = SortByPriorityThenDistance_instance;\n }\n protoOf(SnapActionCandidateSortAndSelectStrategies).d2r = function () {\n return this.SELECT_ALL;\n };\n protoOf(SnapActionCandidateSortAndSelectStrategies).e2r = function () {\n return this.SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE;\n };\n protoOf(SnapActionCandidateSortAndSelectStrategies).f2r = function () {\n return this.SORT_BY_DISTANCE;\n };\n protoOf(SnapActionCandidateSortAndSelectStrategies).g2r = function () {\n return this.SORT_BY_PRIORITY_THEN_DISTANCE;\n };\n var SnapActionCandidateSortAndSelectStrategies_instance;\n function SnapActionCandidateSortAndSelectStrategies_getInstance() {\n if (SnapActionCandidateSortAndSelectStrategies_instance == null)\n new SnapActionCandidateSortAndSelectStrategies();\n return SnapActionCandidateSortAndSelectStrategies_instance;\n }\n function SnapActionCandidateSortAndSelectStrategy() {\n }\n function SelectAll() {\n }\n protoOf(SelectAll).sortAndSelect = function (snaps) {\n return snaps;\n };\n var SelectAll_instance;\n function SelectAll_getInstance() {\n return SelectAll_instance;\n }\n function sam$kotlin_Comparator$0_2(function_0) {\n this.h2r_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_2).u1j = function (a, b) {\n return this.h2r_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_2).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda(it) {\n return it.movement.size;\n }\n function SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda_0(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.snapping.SortByPriorityInActivationDistanceThenDistance.sortAndSelect.' call\n var tmp = b.priority;\n // Inline function 'com.ikea.core.snapping.SortByPriorityInActivationDistanceThenDistance.sortAndSelect.' call\n var tmp$ret$1 = a.priority;\n return compareValues(tmp, tmp$ret$1);\n }\n function SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda_1(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.snapping.SortByPriorityInActivationDistanceThenDistance.sortAndSelect.' call\n var tmp = b.priority;\n // Inline function 'com.ikea.core.snapping.SortByPriorityInActivationDistanceThenDistance.sortAndSelect.' call\n var tmp$ret$1 = a.priority;\n return compareValues(tmp, tmp$ret$1);\n }\n function SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda_2($minimumDistanceElement) {\n return function (it) {\n return minimumDistanceOrMovementDistance($minimumDistanceElement, it);\n };\n }\n function SortByPriorityInActivationDistanceThenDistance() {\n }\n protoOf(SortByPriorityInActivationDistanceThenDistance).sortAndSelect = function (snaps) {\n // Inline function 'kotlin.collections.partition' call\n var first = ArrayList_init_$Create$();\n var second = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = snaps.length;\n while (inductionVariable < last) {\n var element = snaps[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SortByPriorityInActivationDistanceThenDistance.sortAndSelect.' call\n if (element.inActivationDistance()) {\n first.q(element);\n } else {\n second.q(element);\n }\n }\n var tmp0_container = new Pair(first, second);\n var snapsInActivationDistance = tmp0_container.af();\n var otherSnaps = tmp0_container.bf();\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.sortedByDescending' call\n var this_0 = sortedByWithEpsilon(snapsInActivationDistance, VOID, SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda);\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp = SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda_0;\n var tmp$ret$2 = new sam$kotlin_Comparator$0_2(tmp);\n var this_1 = sortedWith_0(this_0, tmp$ret$2);\n var result = copyToArray(this_1);\n var tmp$ret$5;\n $l$block_0: {\n // Inline function 'kotlin.collections.minByOrNull' call\n var iterator = otherSnaps.t();\n if (!iterator.u()) {\n tmp$ret$5 = null;\n break $l$block_0;\n }\n var minElem = iterator.w();\n if (!iterator.u()) {\n tmp$ret$5 = minElem;\n break $l$block_0;\n }\n // Inline function 'com.ikea.core.snapping.SortByPriorityInActivationDistanceThenDistance.sortAndSelect.' call\n var minValue = minElem.movement.size;\n do {\n var e = iterator.w();\n // Inline function 'com.ikea.core.snapping.SortByPriorityInActivationDistanceThenDistance.sortAndSelect.' call\n var v = e.movement.size;\n if (compareTo(minValue, v) > 0) {\n minElem = e;\n minValue = v;\n }\n }\n while (iterator.u());\n tmp$ret$5 = minElem;\n }\n var minimumDistanceElement = tmp$ret$5;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.sortedByDescending' call\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp_0 = SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda_1;\n var tmp$ret$8 = new sam$kotlin_Comparator$0_2(tmp_0);\n var tmp_1 = sortedWith_0(otherSnaps, tmp$ret$8);\n var this_2 = sortedByWithEpsilon(tmp_1, VOID, SortByPriorityInActivationDistanceThenDistance$sortAndSelect$lambda_2(minimumDistanceElement));\n var othersByDistance = copyToArray(this_2);\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n return result.concat(othersByDistance);\n };\n var SortByPriorityInActivationDistanceThenDistance_instance;\n function SortByPriorityInActivationDistanceThenDistance_getInstance() {\n return SortByPriorityInActivationDistanceThenDistance_instance;\n }\n function sam$kotlin_Comparator$0_3(function_0) {\n this.i2r_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_3).u1j = function (a, b) {\n return this.i2r_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_3).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function SortByPriorityThenDistance$sortAndSelect$lambda(it) {\n return it.movement.size;\n }\n function SortByPriorityThenDistance$sortAndSelect$lambda_0(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.snapping.SortByPriorityThenDistance.sortAndSelect.' call\n var tmp = b.priority;\n // Inline function 'com.ikea.core.snapping.SortByPriorityThenDistance.sortAndSelect.' call\n var tmp$ret$1 = a.priority;\n return compareValues(tmp, tmp$ret$1);\n }\n function SortByPriorityThenDistance() {\n }\n protoOf(SortByPriorityThenDistance).sortAndSelect = function (snaps) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.sortedByDescending' call\n var this_0 = sortedByWithEpsilon_0(snaps, VOID, SortByPriorityThenDistance$sortAndSelect$lambda);\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp = SortByPriorityThenDistance$sortAndSelect$lambda_0;\n var tmp$ret$0 = new sam$kotlin_Comparator$0_3(tmp);\n var this_1 = sortedWith_0(this_0, tmp$ret$0);\n return copyToArray(this_1);\n };\n var SortByPriorityThenDistance_instance;\n function SortByPriorityThenDistance_getInstance() {\n return SortByPriorityThenDistance_instance;\n }\n function sam$kotlin_Comparator$0_4(function_0) {\n this.j2r_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_4).u1j = function (a, b) {\n return this.j2r_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_4).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function SortByDistance$sortAndSelect$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.snapping.SortByDistance.sortAndSelect.' call\n var tmp = b.priority;\n // Inline function 'com.ikea.core.snapping.SortByDistance.sortAndSelect.' call\n var tmp$ret$1 = a.priority;\n return compareValues(tmp, tmp$ret$1);\n }\n function SortByDistance$sortAndSelect$lambda_0(it) {\n return it.movement.size;\n }\n function SortByDistance() {\n }\n protoOf(SortByDistance).sortAndSelect = function (snaps) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.sortedByDescending' call\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp = SortByDistance$sortAndSelect$lambda;\n var tmp$ret$0 = new sam$kotlin_Comparator$0_4(tmp);\n var tmp_0 = sortedWith(snaps, tmp$ret$0);\n var this_0 = sortedByWithEpsilon(tmp_0, VOID, SortByDistance$sortAndSelect$lambda_0);\n return copyToArray(this_0);\n };\n var SortByDistance_instance;\n function SortByDistance_getInstance() {\n return SortByDistance_instance;\n }\n function sortedByWithEpsilon(_this__u8e3s4, epsilon, selector) {\n epsilon = epsilon === VOID ? 0.001 : epsilon;\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp = sortedByWithEpsilon$lambda(selector, epsilon);\n var tmp$ret$0 = new sam$kotlin_Comparator$0_5(tmp);\n return sortedWith_0(_this__u8e3s4, tmp$ret$0);\n }\n function minimumDistanceOrMovementDistance(minimumDistanceElement, it) {\n return (!(minimumDistanceElement == null) ? almostEquals(it.movement.size, minimumDistanceElement.movement.size) : false) ? minimumDistanceElement.movement.size : it.movement.size;\n }\n function sortedByWithEpsilon_0(_this__u8e3s4, epsilon, selector) {\n epsilon = epsilon === VOID ? 0.001 : epsilon;\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp = sortedByWithEpsilon$lambda_0(selector, epsilon);\n var tmp$ret$0 = new sam$kotlin_Comparator$0_6(tmp);\n return sortedWith(_this__u8e3s4, tmp$ret$0);\n }\n function sam$kotlin_Comparator$0_5(function_0) {\n this.k2r_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_5).u1j = function (a, b) {\n return this.k2r_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_5).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function sam$kotlin_Comparator$0_6(function_0) {\n this.l2r_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_6).u1j = function (a, b) {\n return this.l2r_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_6).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function sortedByWithEpsilon$lambda($selector, $epsilon) {\n return function (a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.snapping.sortedByWithEpsilon.' call\n var tmp = roundToInt($selector(a) / $epsilon);\n // Inline function 'com.ikea.core.snapping.sortedByWithEpsilon.' call\n var tmp$ret$1 = roundToInt($selector(b) / $epsilon);\n return compareValues(tmp, tmp$ret$1);\n };\n }\n function sortedByWithEpsilon$lambda_0($selector, $epsilon) {\n return function (a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.snapping.sortedByWithEpsilon.' call\n var tmp = roundToInt($selector(a) / $epsilon);\n // Inline function 'com.ikea.core.snapping.sortedByWithEpsilon.' call\n var tmp$ret$1 = roundToInt($selector(b) / $epsilon);\n return compareValues(tmp, tmp$ret$1);\n };\n }\n function Companion_98() {\n this.id = 34;\n }\n protoOf(Companion_98).s1k = function () {\n return this.id;\n };\n var Companion_instance_98;\n function Companion_getInstance_99() {\n return Companion_instance_98;\n }\n function SnapActionInProgressComponent() {\n this.m2r_1 = 34;\n }\n protoOf(SnapActionInProgressComponent).x1k = function () {\n return this.m2r_1;\n };\n protoOf(SnapActionInProgressComponent).eq = function (other) {\n return other instanceof SnapActionInProgressComponent;\n };\n function Companion_99() {\n }\n protoOf(Companion_99).s1k = function () {\n return 21;\n };\n var Companion_instance_99;\n function Companion_getInstance_100() {\n return Companion_instance_99;\n }\n function SnapCandidateComponent() {\n }\n protoOf(SnapCandidateComponent).x1k = function () {\n return Companion_instance_99.id;\n };\n protoOf(SnapCandidateComponent).eq = function (other) {\n return true;\n };\n function Companion_100() {\n this.id = 47;\n }\n protoOf(Companion_100).s1k = function () {\n return this.id;\n };\n var Companion_instance_100;\n function Companion_getInstance_101() {\n return Companion_instance_100;\n }\n function SnapRootComponent() {\n }\n protoOf(SnapRootComponent).x1k = function () {\n return 47;\n };\n protoOf(SnapRootComponent).eq = function (other) {\n return true;\n };\n function get_snappingHierarchyEntitiesList(_this__u8e3s4) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = hierarchyExceptSubTreesWithComponentArray(_this__u8e3s4, 47);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping..' call\n Companion_getInstance_23();\n if (element.hasComponent(11)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.snapping..' call\n var tmp;\n var tmp0_safe_receiver = get_connectorsComponent(element_0);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n if ((tmp1_safe_receiver == null ? null : any_0(tmp1_safe_receiver)) === true) {\n tmp = true;\n } else {\n var tmp2_safe_receiver = get_connectorsComponent(element_0);\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.alignmentConnectors;\n tmp = (tmp3_safe_receiver == null ? null : any_0(tmp3_safe_receiver)) === true;\n }\n if (tmp) {\n destination_0.q(element_0);\n }\n }\n return destination_0;\n }\n function get_snappingHierarchyEntitiesSequence(_this__u8e3s4) {\n var tmp = hierarchyExceptSubTreesWithComponentSequence(_this__u8e3s4, 47);\n var tmp_0 = filter(tmp, _get_snappingHierarchyEntitiesSequence_$lambda_6umhyj);\n return filter(tmp_0, _get_snappingHierarchyEntitiesSequence_$lambda_6umhyj_0);\n }\n function get_snapRootSubTree(_this__u8e3s4) {\n var tmp0_safe_receiver = get_snapRoot(_this__u8e3s4);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_snappingHierarchyEntities(tmp0_safe_receiver);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n }\n function get_snappingHierarchyEntities(_this__u8e3s4) {\n return hierarchyExceptSubTreesWithComponentArray(_this__u8e3s4, 47);\n }\n function forEachSnappingHierarchyEntity(_this__u8e3s4, func) {\n forEachInHierarchyExceptSubHierarchiesWithComponent(_this__u8e3s4, 47, func);\n }\n function _get_snappingHierarchyEntitiesSequence_$lambda_6umhyj(it) {\n Companion_getInstance_23();\n return it.hasComponent(11);\n }\n function _get_snappingHierarchyEntitiesSequence_$lambda_6umhyj_0(it) {\n var tmp;\n var tmp0_safe_receiver = get_connectorsComponent(it);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n if ((tmp1_safe_receiver == null ? null : any_0(tmp1_safe_receiver)) === true) {\n tmp = true;\n } else {\n var tmp2_safe_receiver = get_connectorsComponent(it);\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.alignmentConnectors;\n tmp = (tmp3_safe_receiver == null ? null : any_0(tmp3_safe_receiver)) === true;\n }\n return tmp;\n }\n function SnapSettings(includeAllSubConnectors, includeInternalConnectors, includeHostAssemblyParts, includeAlignmentConnectorsOutsideActivationDistance) {\n includeAllSubConnectors = includeAllSubConnectors === VOID ? false : includeAllSubConnectors;\n includeInternalConnectors = includeInternalConnectors === VOID ? false : includeInternalConnectors;\n includeHostAssemblyParts = includeHostAssemblyParts === VOID ? false : includeHostAssemblyParts;\n includeAlignmentConnectorsOutsideActivationDistance = includeAlignmentConnectorsOutsideActivationDistance === VOID ? false : includeAlignmentConnectorsOutsideActivationDistance;\n this.n2r_1 = includeAllSubConnectors;\n this.o2r_1 = includeInternalConnectors;\n this.p2r_1 = includeHostAssemblyParts;\n this.q2r_1 = includeAlignmentConnectorsOutsideActivationDistance;\n }\n protoOf(SnapSettings).r2r = function () {\n return this.n2r_1;\n };\n protoOf(SnapSettings).s2r = function () {\n return this.o2r_1;\n };\n protoOf(SnapSettings).t2r = function () {\n return this.p2r_1;\n };\n protoOf(SnapSettings).u2r = function () {\n return this.q2r_1;\n };\n function _get_logger__rkp4sl($this) {\n return LoggerState_getInstance().m1m('SnapUtils');\n }\n function findContinuousAlternativeToAlignment($this, alignmentSnapActionCandidate, continuousCandidates) {\n alignmentSnapActionCandidate.perform();\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'kotlin.collections.maxByOrNull' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = continuousCandidates.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.snapping.SnapUtils.findContinuousAlternativeToAlignment.' call\n if (element.hostConnector.containsConnector(get_worldTransform(element.host), get_worldTransform(element.guest), element.guestConnector) ? element.guestConnector.calculateRotation(get_worldTransform(element.host), element.hostConnector, get_worldTransform(element.guest)).almostEquals(Companion_getInstance_57().IDENTITY) : false) {\n destination.q(element);\n }\n }\n var iterator = destination.t();\n if (!iterator.u()) {\n tmp$ret$3 = null;\n break $l$block_0;\n }\n var maxElem = iterator.w();\n if (!iterator.u()) {\n tmp$ret$3 = maxElem;\n break $l$block_0;\n }\n // Inline function 'com.ikea.core.snapping.SnapUtils.findContinuousAlternativeToAlignment.' call\n var maxValue = maxElem.priority;\n do {\n var e = iterator.w();\n // Inline function 'com.ikea.core.snapping.SnapUtils.findContinuousAlternativeToAlignment.' call\n var v = e.priority;\n if (compareTo(maxValue, v) < 0) {\n maxElem = e;\n maxValue = v;\n }\n }\n while (iterator.u());\n tmp$ret$3 = maxElem;\n }\n var bestCandidate = tmp$ret$3;\n alignmentSnapActionCandidate.rollback();\n if (bestCandidate == null)\n return null;\n return new AlternativeSnapCandidate(bestCandidate.host, bestCandidate.guest, bestCandidate.hostConnector, bestCandidate.guestConnector);\n }\n function AlternativeSnapCandidate(hostEntity, guestEntity, hostConnector, guestConnector) {\n this.hostEntity = hostEntity;\n this.guestEntity = guestEntity;\n this.hostConnector = hostConnector;\n this.guestConnector = guestConnector;\n }\n protoOf(AlternativeSnapCandidate).v2r = function (hostEntity, guestEntity, hostConnector, guestConnector) {\n return new AlternativeSnapCandidate(hostEntity, guestEntity, hostConnector, guestConnector);\n };\n protoOf(AlternativeSnapCandidate).copy = function (hostEntity, guestEntity, hostConnector, guestConnector, $super) {\n hostEntity = hostEntity === VOID ? this.hostEntity : hostEntity;\n guestEntity = guestEntity === VOID ? this.guestEntity : guestEntity;\n hostConnector = hostConnector === VOID ? this.hostConnector : hostConnector;\n guestConnector = guestConnector === VOID ? this.guestConnector : guestConnector;\n return this.v2r(hostEntity, guestEntity, hostConnector, guestConnector);\n };\n protoOf(AlternativeSnapCandidate).toString = function () {\n return 'AlternativeSnapCandidate(hostEntity=' + this.hostEntity + ', guestEntity=' + this.guestEntity + ', hostConnector=' + this.hostConnector + ', guestConnector=' + this.guestConnector + ')';\n };\n protoOf(AlternativeSnapCandidate).hashCode = function () {\n var result = this.hostEntity.hashCode();\n result = imul(result, 31) + this.guestEntity.hashCode() | 0;\n result = imul(result, 31) + this.hostConnector.hashCode() | 0;\n result = imul(result, 31) + this.guestConnector.hashCode() | 0;\n return result;\n };\n protoOf(AlternativeSnapCandidate).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof AlternativeSnapCandidate))\n return false;\n var tmp0_other_with_cast = other instanceof AlternativeSnapCandidate ? other : THROW_CCE();\n if (!this.hostEntity.equals(tmp0_other_with_cast.hostEntity))\n return false;\n if (!this.guestEntity.equals(tmp0_other_with_cast.guestEntity))\n return false;\n if (!this.hostConnector.equals(tmp0_other_with_cast.hostConnector))\n return false;\n if (!this.guestConnector.equals(tmp0_other_with_cast.guestConnector))\n return false;\n return true;\n };\n function matchingSnapCandidatesOnHost$isCloseEnough($snapSettings, $hostEntity, guestConnector, snappingGuest, hostSubConnector) {\n var tmp;\n var tmp_0 = guestConnector.type;\n if (tmp_0 === 2) {\n tmp = $snapSettings.includeAlignmentConnectorsOutsideActivationDistance ? true : guestConnector.isInActivationDistance(get_worldTransform(snappingGuest), hostSubConnector, get_worldTransform($hostEntity));\n } else {\n tmp = true;\n }\n return tmp;\n }\n function matchingSnapCandidatesOnHost$isFree($hostEntity, snappingGuest, hostConnector) {\n if (!(hostConnector instanceof PointConnector))\n return true;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var indexedObject = get_hostedConnections($hostEntity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapUtils.matchingSnapCandidatesOnHost.isFree.' call\n if ((element.hostConnector.equals(hostConnector) ? get_isInScene(element.hostConnectorEntity) === get_isInScene(element.guestConnectorEntity) : false) ? !equals(get_snapRoot(snappingGuest), get_snapRoot(element.guestConnectorEntity)) : false) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n return tmp$ret$1;\n }\n function SnapUtils$matchingSnapCandidatesOnHost$lambda($snapSettings, $hostEntity, $matchingCandidates) {\n return function (snappingGuest) {\n var tmp0_safe_receiver = get_connectorsComponent(snappingGuest);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.connectors;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapUtils.matchingSnapCandidatesOnHost..' call\n var tmp;\n var tmp_0;\n var tmp_1 = element.type;\n if (!(tmp_1 === 1)) {\n tmp_0 = element.enabled;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n var tmp_2;\n if ($snapSettings.includeInternalConnectors) {\n tmp_2 = true;\n } else {\n var tmp_3 = element.type;\n tmp_2 = !(tmp_3 === 3);\n }\n tmp = tmp_2;\n } else {\n tmp = false;\n }\n if (tmp) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_connectors($hostEntity);\n var inductionVariable_0 = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapUtils.matchingSnapCandidatesOnHost...' call\n if ((element_0.enabled ? element.hasMatchingTags(element_0) : false) ? matchingSnapCandidatesOnHost$isFree($hostEntity, snappingGuest, element_0) : false) {\n if (element_0.hasSubConnectors ? $snapSettings.includeAllSubConnectors : false) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = element_0.allSubConnectors.t();\n while (tmp0_iterator.u()) {\n var element_1 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.snapping.SnapUtils.matchingSnapCandidatesOnHost....' call\n if (matchingSnapCandidatesOnHost$isCloseEnough($snapSettings, $hostEntity, element, snappingGuest, element_1)) {\n $matchingCandidates.q(SnapUtils_instance.createCandidate(snappingGuest, element, $hostEntity, element_1));\n }\n }\n } else {\n var tmp_4;\n if (element_0.hasSubConnectors) {\n tmp_4 = element_0.closestSubConnectorFromOwnerEntity($hostEntity, get_worldTransform(snappingGuest).transformPosition(element.transform.position));\n } else {\n tmp_4 = element_0;\n }\n var actualHostConnector = tmp_4;\n if (matchingSnapCandidatesOnHost$isCloseEnough($snapSettings, $hostEntity, element, snappingGuest, actualHostConnector)) {\n $matchingCandidates.q(SnapUtils_instance.createCandidate(snappingGuest, element, $hostEntity, actualHostConnector));\n }\n }\n }\n }\n }\n }\n }\n return Unit_instance;\n };\n }\n function SnapUtils$matchingSnapActionCandidatesMultipleHosts$lambda() {\n return 'Trying to snap to an empty array of hosts will no longer result in snapping to the scene. If you want the old behaviour you need to call matchingSnapActionCandidatesInScene instead.';\n }\n function SnapUtils$matchingSnapActionCandidatesMultipleHosts$lambda_0($snapsList, $guestSnapRoot, $snapSettings) {\n return function (hostPart) {\n $snapsList.x(SnapUtils_instance.matchingSnapCandidatesOnHost($guestSnapRoot, hostPart, $snapSettings));\n return Unit_instance;\n };\n }\n function SnapUtils$createSnapCandidate$lambda() {\n return 'Cannot create snap action candidate, you are probably trying to snap connectors that do not have matching tags().';\n }\n function SnapUtils() {\n }\n protoOf(SnapUtils).w2r = function (guestSnapRoot, hostEntity, snapSettings) {\n if (hostEntity.equals(guestSnapRoot) ? true : isDescendantOf(hostEntity, guestSnapRoot)) {\n return emptyList();\n }\n // Inline function 'kotlin.collections.mutableListOf' call\n var matchingCandidates = ArrayList_init_$Create$();\n forEachSnappingHierarchyEntity(guestSnapRoot, SnapUtils$matchingSnapCandidatesOnHost$lambda(snapSettings, hostEntity, matchingCandidates));\n return matchingCandidates;\n };\n protoOf(SnapUtils).matchingSnapCandidatesOnHost = function (guestSnapRoot, hostEntity, snapSettings, $super) {\n snapSettings = snapSettings === VOID ? new SnapSettings() : snapSettings;\n return this.w2r(guestSnapRoot, hostEntity, snapSettings);\n };\n protoOf(SnapUtils).x2r = function (guestSnapRoot, sceneManager, snapSettings) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var result = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = sceneManager.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapUtils.matchingSnapActionCandidatesInScene.' call\n var tmp;\n if (!element.equals(guestSnapRoot)) {\n var tmp_0;\n var tmp0_safe_receiver = get_connectorsComponent(element);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectors;\n if ((tmp1_safe_receiver == null ? null : any_0(tmp1_safe_receiver)) === true) {\n tmp_0 = true;\n } else {\n var tmp2_safe_receiver = get_connectorsComponent(element);\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.alignmentConnectors;\n tmp_0 = (tmp3_safe_receiver == null ? null : any_0(tmp3_safe_receiver)) === true;\n }\n tmp = tmp_0;\n } else {\n tmp = false;\n }\n if (tmp) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = SnapUtils_instance.matchingSnapCandidatesOnHost(guestSnapRoot, element, snapSettings).t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.snapping.SnapUtils.matchingSnapActionCandidatesInScene..' call\n result.q(element_0);\n }\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n var snaps = copyToArray(result);\n this.replaceAlignmentSnapsWithRealSnapsWherePossible(snaps);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = snaps.length;\n while (inductionVariable_0 < last_0) {\n var element_1 = snaps[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapUtils.matchingSnapActionCandidatesInScene.' call\n if (!element_1.isAlignmentSnap) {\n destination.q(element_1);\n }\n }\n return copyToArray(destination);\n };\n protoOf(SnapUtils).matchingSnapActionCandidatesInScene = function (guestSnapRoot, sceneManager, snapSettings, $super) {\n snapSettings = snapSettings === VOID ? new SnapSettings() : snapSettings;\n return this.x2r(guestSnapRoot, sceneManager, snapSettings);\n };\n protoOf(SnapUtils).y2r = function (guestSnapRoot, hostEntities, snapSettings) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (hostEntities.length === 0) {\n var tmp = _get_logger__rkp4sl(this);\n tmp.warn(SnapUtils$matchingSnapActionCandidatesMultipleHosts$lambda);\n }\n // Inline function 'kotlin.collections.mutableListOf' call\n var snapsList = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = hostEntities.length;\n while (inductionVariable < last) {\n var element = hostEntities[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapUtils.matchingSnapActionCandidatesMultipleHosts.' call\n if (snapSettings.includeHostAssemblyParts) {\n forEachInHierarchyExceptSubHierarchiesWithComponent(element, 28, SnapUtils$matchingSnapActionCandidatesMultipleHosts$lambda_0(snapsList, guestSnapRoot, snapSettings));\n } else {\n snapsList.x(SnapUtils_instance.matchingSnapCandidatesOnHost(guestSnapRoot, element, snapSettings));\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n var snaps = copyToArray(snapsList);\n this.replaceAlignmentSnapsWithRealSnapsWherePossible(snaps);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = snaps.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = snaps[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapUtils.matchingSnapActionCandidatesMultipleHosts.' call\n if (!element_0.isAlignmentSnap) {\n destination.q(element_0);\n }\n }\n return copyToArray(destination);\n };\n protoOf(SnapUtils).matchingSnapActionCandidatesMultipleHosts = function (guestSnapRoot, hostEntities, snapSettings, $super) {\n snapSettings = snapSettings === VOID ? new SnapSettings() : snapSettings;\n return this.y2r(guestSnapRoot, hostEntities, snapSettings);\n };\n protoOf(SnapUtils).z2r = function (guestSnapRoot, hostEntity, snapSettings) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [hostEntity];\n return this.matchingSnapActionCandidatesMultipleHosts(guestSnapRoot, tmp$ret$2, snapSettings);\n };\n protoOf(SnapUtils).matchingSnapActionCandidates = function (guestSnapRoot, hostEntity, snapSettings, $super) {\n snapSettings = snapSettings === VOID ? new SnapSettings() : snapSettings;\n return this.z2r(guestSnapRoot, hostEntity, snapSettings);\n };\n protoOf(SnapUtils).createSnapCandidate = function (snappingGuest, guestConnector, hostEntity, hostConnector) {\n if (guestConnector.hasMatchingTags(hostConnector))\n return this.createCandidate(snappingGuest, guestConnector, hostEntity, hostConnector);\n var tmp = _get_logger__rkp4sl(this);\n tmp.error(SnapUtils$createSnapCandidate$lambda);\n return null;\n };\n protoOf(SnapUtils).a2s = function (hostEntity, guestEntity, connectorOnHostKey, connectorOnGuestKey) {\n var tmp;\n if (!(connectorOnHostKey == null)) {\n var tmp0_safe_receiver = get_connectorsComponent(hostEntity);\n tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.getConnectorByKey(connectorOnHostKey);\n } else {\n tmp = null;\n }\n var hostBaseConnector = tmp;\n var tmp1_safe_receiver = get_connectorsComponent(guestEntity);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.connectors;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapUtils.createForcedSnapActionCandidate.' call\n if (element.key === connectorOnGuestKey) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp_0 = tmp$ret$1;\n }\n var guestConnector = tmp_0;\n var guestTransform = get_worldTransform(guestEntity);\n var tmp_1;\n if (!(hostBaseConnector instanceof PointSeriesSubConnector)) {\n tmp_1 = hostBaseConnector == null ? null : hostBaseConnector.closestSubConnector(get_localTransform(guestEntity).position);\n } else {\n tmp_1 = hostBaseConnector;\n }\n var hostConnector = tmp_1;\n var tmp_2;\n if (hostConnector == null ? true : guestConnector == null) {\n tmp_2 = get_worldTransform(guestEntity);\n } else {\n var tmp5_hostTransform = get_worldTransform(hostEntity);\n tmp_2 = guestConnector.calculateEndTransform(tmp5_hostTransform, hostConnector, guestTransform, guestTransform);\n }\n var forcedEndTransform = tmp_2;\n var tmp6_elvis_lhs = get_snapRoot(guestEntity);\n var tmp_3 = tmp6_elvis_lhs == null ? guestEntity : tmp6_elvis_lhs;\n var tmp_4;\n if (hostConnector == null) {\n tmp_4 = new PointConnector('forced', 3, Companion_getInstance_60().IDENTITY);\n } else {\n tmp_4 = hostConnector;\n }\n var tmp_5 = tmp_4;\n var tmp_6;\n if (guestConnector == null) {\n tmp_6 = new PointConnector('forced', 3, Companion_getInstance_60().IDENTITY);\n } else {\n tmp_6 = guestConnector;\n }\n return new SnapActionCandidateImpl(hostEntity, guestEntity, tmp_3, tmp_5, tmp_6, guestTransform, forcedEndTransform);\n };\n protoOf(SnapUtils).createForcedSnapActionCandidate = function (hostEntity, guestEntity, connectorOnHostKey, connectorOnGuestKey, $super) {\n connectorOnHostKey = connectorOnHostKey === VOID ? '' : connectorOnHostKey;\n connectorOnGuestKey = connectorOnGuestKey === VOID ? '' : connectorOnGuestKey;\n return this.a2s(hostEntity, guestEntity, connectorOnHostKey, connectorOnGuestKey);\n };\n protoOf(SnapUtils).b2s = function (snappingGuest, guestConnector, hostEntity, hostConnector, forcedEndTransform, forcedPriority, alignmentInitiatorCandidate, initialTransform) {\n var tmp0_elvis_lhs = get_snapRoot(snappingGuest);\n var guestRoot = tmp0_elvis_lhs == null ? snappingGuest : tmp0_elvis_lhs;\n var endTransform = forcedEndTransform == null ? guestConnector.calculateEndTransform(get_worldTransform(hostEntity), hostConnector, get_worldTransform(snappingGuest), get_worldTransform(guestRoot)) : forcedEndTransform;\n return new SnapActionCandidateImpl(hostEntity, snappingGuest, guestRoot, hostConnector, guestConnector, initialTransform == null ? get_worldTransform(guestRoot) : initialTransform, endTransform, forcedPriority, alignmentInitiatorCandidate);\n };\n protoOf(SnapUtils).createCandidate = function (snappingGuest, guestConnector, hostEntity, hostConnector, forcedEndTransform, forcedPriority, alignmentInitiatorCandidate, initialTransform, $super) {\n forcedEndTransform = forcedEndTransform === VOID ? null : forcedEndTransform;\n forcedPriority = forcedPriority === VOID ? null : forcedPriority;\n alignmentInitiatorCandidate = alignmentInitiatorCandidate === VOID ? null : alignmentInitiatorCandidate;\n initialTransform = initialTransform === VOID ? null : initialTransform;\n return this.b2s(snappingGuest, guestConnector, hostEntity, hostConnector, forcedEndTransform, forcedPriority, alignmentInitiatorCandidate, initialTransform);\n };\n protoOf(SnapUtils).replaceAlignmentSnapsWithRealSnapsWherePossible = function (snaps) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = snaps.length;\n while (inductionVariable < last) {\n var element = snaps[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapping.SnapUtils.replaceAlignmentSnapsWithRealSnapsWherePossible.' call\n if (!element.isAlignmentSnap) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.snapping.SnapUtils.replaceAlignmentSnapsWithRealSnapsWherePossible.' call\n if (element_0.hostConnector.isContinuousConnector) {\n destination_0.q(element_0);\n }\n }\n var continuousCandidates = destination_0;\n var inductionVariable_0 = 0;\n var last_0 = snaps.length;\n while (inductionVariable_0 < last_0) {\n var i = inductionVariable_0;\n var snapCandidate = snaps[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n if (snapCandidate.isAlignmentSnap) {\n var tmp2_elvis_lhs = this.tryToReplaceAlignmentWithRealCandidate(snapCandidate, continuousCandidates);\n snaps[i] = tmp2_elvis_lhs == null ? snapCandidate : tmp2_elvis_lhs;\n }\n }\n };\n protoOf(SnapUtils).tryToReplaceAlignmentWithRealCandidate = function (alignmentSnapActionCandidate, continuousCandidates) {\n var alternativeRealCandidate = findContinuousAlternativeToAlignment(this, alignmentSnapActionCandidate, continuousCandidates);\n var tmp;\n if (alternativeRealCandidate == null) {\n tmp = null;\n } else {\n var forcedPriority = alignmentSnapActionCandidate.priority;\n tmp = this.createCandidate(alternativeRealCandidate.guestEntity, alternativeRealCandidate.guestConnector, alternativeRealCandidate.hostEntity, alternativeRealCandidate.hostConnector, alignmentSnapActionCandidate.endTransform, forcedPriority, alignmentSnapActionCandidate);\n }\n return tmp;\n };\n protoOf(SnapUtils).isNewPositionOnHostConnector = function (candidate, newPos) {\n return this.isNewTransformOnHostConnector(candidate, candidate.endTransform.copy(newPos));\n };\n protoOf(SnapUtils).isNewTransformOnHostConnector = function (candidate, newEndTransform) {\n var transformFromRootToConnectingEntity = get_worldTransform(candidate.guest).delta(get_worldTransform(candidate.guestRoot));\n var newConnectingEntityTransform = newEndTransform.concatenate(transformFromRootToConnectingEntity);\n var newPositionStillCanConnectToToSameConnector = candidate.hostConnector.containsConnector(get_worldTransform(candidate.host), newConnectingEntityTransform, candidate.guestConnector);\n return newPositionStillCanConnectToToSameConnector;\n };\n var SnapUtils_instance;\n function SnapUtils_getInstance() {\n return SnapUtils_instance;\n }\n function EntityState(entityId, components) {\n var tmp;\n if (components === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = components;\n }\n components = tmp;\n this.entityId = entityId;\n this.c2s_1 = new ComponentHolder();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = components.length;\n while (inductionVariable < last) {\n var element = components[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapshot.EntityState.' call\n this.c2s_1.addComponent(element);\n }\n }\n protoOf(EntityState).z2o = function () {\n return this.entityId;\n };\n protoOf(EntityState).components = function () {\n return this.c2s_1.components();\n };\n protoOf(EntityState).getComponent = function (componentId) {\n return this.c2s_1.__getComponentForKotlin(componentId);\n };\n protoOf(EntityState).hasComponent = function (componentId) {\n return this.c2s_1.hasComponent(componentId);\n };\n protoOf(EntityState).toString = function () {\n return 'Entity ' + this.entityId;\n };\n function Companion_101() {\n }\n protoOf(Companion_101).s1k = function () {\n return 36;\n };\n var Companion_instance_101;\n function Companion_getInstance_102() {\n return Companion_instance_101;\n }\n function IsLoadingSnapshotComponent() {\n this.d2s_1 = false;\n }\n protoOf(IsLoadingSnapshotComponent).x1k = function () {\n return Companion_instance_101.id;\n };\n protoOf(IsLoadingSnapshotComponent).a1l = function () {\n return this.d2s_1;\n };\n protoOf(IsLoadingSnapshotComponent).eq = function (other) {\n return true;\n };\n function Companion_102() {\n this.ID = 95;\n }\n protoOf(Companion_102).u1n = function () {\n return this.ID;\n };\n var Companion_instance_102;\n function Companion_getInstance_103() {\n return Companion_instance_102;\n }\n function SnapshotIgnoreComponent() {\n this.e2s_1 = Companion_instance_102.ID;\n }\n protoOf(SnapshotIgnoreComponent).x1k = function () {\n return this.e2s_1;\n };\n protoOf(SnapshotIgnoreComponent).eq = function (other) {\n return true;\n };\n function setExistingEntityStates($this, snapshot) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = snapshot.entityStates.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.snapshot.SnapshotService.setExistingEntityStates.' call\n var currentEntity = $this.entityManager.findEntity(element.entityId);\n var entityStateBeforeLoadingSnapshot = currentEntity == null ? null : new EntityState(element.entityId, currentEntity.components());\n var tmp1_safe_receiver = currentEntity == null ? null : currentEntity.components();\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element_0 = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapshot.SnapshotService.setExistingEntityStates..' call\n if (element_0.doStoreInSnapshot) {\n destination.q(element_0);\n }\n }\n tmp = destination;\n }\n var tmp2_safe_receiver = tmp;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = tmp2_safe_receiver.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.snapshot.SnapshotService.setExistingEntityStates..' call\n currentEntity.removeComponentInternal(element_1.typeId);\n }\n }\n var entityAfterSnapshot = currentEntity == null ? $this.entityManager.createEntityInternal(element.entityId) : currentEntity;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = element.components();\n var inductionVariable_0 = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable_0 < last_0) {\n var element_2 = indexedObject[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.snapshot.SnapshotService.setExistingEntityStates..' call\n entityAfterSnapshot.addComponentInternal(element_2);\n }\n entityAfterSnapshot.addComponent(new UpdatedFromSnapshotEventComponent(entityStateBeforeLoadingSnapshot, entityAfterSnapshot));\n entityAfterSnapshot.removeComponent(123);\n }\n }\n function removeEntitiesNoLongerPresent($this, snapshot) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = $this.entityManager.entities;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapshot.SnapshotService.removeEntitiesNoLongerPresent.' call\n if (!element.hasComponent(Companion_instance_102.ID)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.snapshot.SnapshotService.removeEntitiesNoLongerPresent.' call\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'kotlin.collections.none' call\n var this_1 = snapshot.entityStates;\n var tmp;\n if (isInterface(this_1, Collection)) {\n tmp = this_1.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$3 = true;\n break $l$block_0;\n }\n var tmp0_iterator_0 = this_1.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.snapshot.SnapshotService.removeEntitiesNoLongerPresent..' call\n if (element_1.entityId === element_0.id) {\n tmp$ret$3 = false;\n break $l$block_0;\n }\n }\n tmp$ret$3 = true;\n }\n if (tmp$ret$3) {\n destination_0.q(element_0);\n }\n }\n var entitiesToRemove = destination_0;\n var tmp_0 = Companion_getInstance_104().logger;\n tmp_0.debug(SnapshotService$removeEntitiesNoLongerPresent$lambda(entitiesToRemove));\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_1 = entitiesToRemove.t();\n while (tmp0_iterator_1.u()) {\n var element_2 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.snapshot.SnapshotService.removeEntitiesNoLongerPresent.' call\n element_2.addComponent(new UpdatedFromSnapshotEventComponent(createEntityState($this, element_2), null));\n element_2.removeComponent(123);\n $this.entityManager.removeEntityInternal(element_2);\n }\n }\n function createEntityState($this, entity) {\n return new EntityState(entity.id, entity.components());\n }\n function Companion_103() {\n Companion_instance_103 = this;\n this.logger = LoggerState_getInstance().m1m('SnapshotService');\n }\n protoOf(Companion_103).x1i = function () {\n return this.logger;\n };\n var Companion_instance_103;\n function Companion_getInstance_104() {\n if (Companion_instance_103 == null)\n new Companion_103();\n return Companion_instance_103;\n }\n function SnapshotService$removeEntitiesNoLongerPresent$lambda($entitiesToRemove) {\n return function () {\n // Inline function 'kotlin.collections.map' call\n var this_0 = $entitiesToRemove;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.snapshot.SnapshotService.removeEntitiesNoLongerPresent..' call\n destination.q(item);\n }\n return 'Will remove entities when loading snapshot: ' + destination;\n };\n }\n function SnapshotService(entityManager, sceneManager) {\n Companion_getInstance_104();\n this.entityManager = entityManager;\n this.sceneManager = sceneManager;\n }\n protoOf(SnapshotService).p1i = function () {\n return this.entityManager;\n };\n protoOf(SnapshotService).q1i = function () {\n return this.sceneManager;\n };\n protoOf(SnapshotService).takeSnapshot = function (name) {\n if (this.sceneManager.root.hasComponent(Companion_instance_101.id)) {\n // Inline function 'kotlin.error' call\n var message = 'Not allowed to take snapshot while another snapshot is being loaded.';\n throw IllegalStateException_init_$Create$(toString(message));\n }\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.entityManager.entities;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.snapshot.SnapshotService.takeSnapshot.' call\n if (!element.hasComponent(Companion_instance_102.ID)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.snapshot.SnapshotService.takeSnapshot.' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_1 = item.components();\n var destination_1 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.snapshot.SnapshotService.takeSnapshot..' call\n if (element_0.doStoreInSnapshot) {\n destination_1.q(element_0);\n }\n }\n var clonedComponents = copyToArray(destination_1);\n var tmp$ret$7 = new EntityState(item.id, clonedComponents);\n destination_0.q(tmp$ret$7);\n }\n var entityStates = destination_0;\n return new Snapshot(name, entityStates);\n };\n protoOf(SnapshotService).compare = function (snapshot1, snapshot2) {\n println(snapshot1);\n println(snapshot2);\n };\n protoOf(SnapshotService).loadSnapshot = function (snapshot) {\n this.sceneManager.root.addComponent(new IsLoadingSnapshotComponent());\n removeEntitiesNoLongerPresent(this, snapshot);\n setExistingEntityStates(this, snapshot);\n this.sceneManager.root.removeComponent(Companion_instance_101.id);\n };\n function Snapshot(name, entityStates) {\n this.name = name;\n this.entityStates = entityStates;\n }\n protoOf(Snapshot).mb = function () {\n return this.name;\n };\n protoOf(Snapshot).f2s = function () {\n return this.entityStates;\n };\n protoOf(Snapshot).g2s = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.entityStates;\n return copyToArray(this_0);\n };\n protoOf(Snapshot).af = function () {\n return this.name;\n };\n protoOf(Snapshot).bf = function () {\n return this.entityStates;\n };\n protoOf(Snapshot).h2s = function (name, entityStates) {\n return new Snapshot(name, entityStates);\n };\n protoOf(Snapshot).copy = function (name, entityStates, $super) {\n name = name === VOID ? this.name : name;\n entityStates = entityStates === VOID ? this.entityStates : entityStates;\n return this.h2s(name, entityStates);\n };\n protoOf(Snapshot).toString = function () {\n return 'Snapshot(name=' + this.name + ', entityStates=' + this.entityStates + ')';\n };\n protoOf(Snapshot).hashCode = function () {\n var result = getStringHashCode(this.name);\n result = imul(result, 31) + hashCode(this.entityStates) | 0;\n return result;\n };\n protoOf(Snapshot).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Snapshot))\n return false;\n var tmp0_other_with_cast = other instanceof Snapshot ? other : THROW_CCE();\n if (!(this.name === tmp0_other_with_cast.name))\n return false;\n if (!equals(this.entityStates, tmp0_other_with_cast.entityStates))\n return false;\n return true;\n };\n function Companion_104() {\n this.id = 123;\n }\n protoOf(Companion_104).s1k = function () {\n return this.id;\n };\n var Companion_instance_104;\n function Companion_getInstance_105() {\n return Companion_instance_104;\n }\n function UpdatedFromSnapshotEventComponent(entityStateBeforeLoadingSnapshot, entity) {\n this.entityStateBeforeLoadingSnapshot = entityStateBeforeLoadingSnapshot;\n this.entity = entity;\n this.k2i_1 = 123;\n this.l2i_1 = false;\n }\n protoOf(UpdatedFromSnapshotEventComponent).i2s = function () {\n return this.entityStateBeforeLoadingSnapshot;\n };\n protoOf(UpdatedFromSnapshotEventComponent).r23 = function () {\n return this.entity;\n };\n protoOf(UpdatedFromSnapshotEventComponent).x1k = function () {\n return this.k2i_1;\n };\n protoOf(UpdatedFromSnapshotEventComponent).eq = function (other) {\n return false;\n };\n protoOf(UpdatedFromSnapshotEventComponent).a1l = function () {\n return this.l2i_1;\n };\n protoOf(UpdatedFromSnapshotEventComponent).af = function () {\n return this.entityStateBeforeLoadingSnapshot;\n };\n protoOf(UpdatedFromSnapshotEventComponent).bf = function () {\n return this.entity;\n };\n protoOf(UpdatedFromSnapshotEventComponent).j2s = function (entityStateBeforeLoadingSnapshot, entity) {\n return new UpdatedFromSnapshotEventComponent(entityStateBeforeLoadingSnapshot, entity);\n };\n protoOf(UpdatedFromSnapshotEventComponent).copy = function (entityStateBeforeLoadingSnapshot, entity, $super) {\n entityStateBeforeLoadingSnapshot = entityStateBeforeLoadingSnapshot === VOID ? this.entityStateBeforeLoadingSnapshot : entityStateBeforeLoadingSnapshot;\n entity = entity === VOID ? this.entity : entity;\n return this.j2s(entityStateBeforeLoadingSnapshot, entity);\n };\n protoOf(UpdatedFromSnapshotEventComponent).toString = function () {\n return 'UpdatedFromSnapshotEventComponent(entityStateBeforeLoadingSnapshot=' + this.entityStateBeforeLoadingSnapshot + ', entity=' + this.entity + ')';\n };\n protoOf(UpdatedFromSnapshotEventComponent).hashCode = function () {\n var result = this.entityStateBeforeLoadingSnapshot == null ? 0 : hashCode(this.entityStateBeforeLoadingSnapshot);\n result = imul(result, 31) + (this.entity == null ? 0 : this.entity.hashCode()) | 0;\n return result;\n };\n protoOf(UpdatedFromSnapshotEventComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof UpdatedFromSnapshotEventComponent))\n return false;\n var tmp0_other_with_cast = other instanceof UpdatedFromSnapshotEventComponent ? other : THROW_CCE();\n if (!equals(this.entityStateBeforeLoadingSnapshot, tmp0_other_with_cast.entityStateBeforeLoadingSnapshot))\n return false;\n if (!equals(this.entity, tmp0_other_with_cast.entity))\n return false;\n return true;\n };\n function ApiSystemIds() {\n this.CONNECTION_PARENTING_SYSTEM_ID = 'ConnectionParentingSystem';\n this.AUTOMATIC_GROUP_BUILDER_SYSTEM_ID = 'AutomaticGroupBuilderSystem';\n this.HIERARCHY_SYSTEM_ID = 'HierarchySystem';\n this.SCENE_GRAPH_SYSTEM_ID = 'SceneGraphSystem';\n this.TRANSFORM_SYSTEM_ID = 'TransformSystem';\n this.DISABLE_CONNECTORS_SYSTEM_ID = 'DisableConnectorsSystem';\n this.RENDER_SYSTEM_ID = 'RenderSystem';\n this.WORLD_COLLIDER_UPDATE_SYSTEM_ID = 'WorldColliderUpdateSystem';\n this.VIEWER_PRESENCE_SYSTEM_ID = 'ViewerPresenceSystem';\n this.MODEL_LOADER_SYSTEM_ID = 'ModelLoaderSystem';\n this.VIEWER_OBJECT_TRANSFORM_SYSTEM_ID = 'ViewerObjectTransformSystem';\n this.VIEWER_OBJECT_VISIBILITY_SYSTEM_ID = 'ViewerObjectVisibilitySystem';\n }\n protoOf(ApiSystemIds).k2s = function () {\n return this.CONNECTION_PARENTING_SYSTEM_ID;\n };\n protoOf(ApiSystemIds).l2s = function () {\n return this.AUTOMATIC_GROUP_BUILDER_SYSTEM_ID;\n };\n protoOf(ApiSystemIds).m2s = function () {\n return this.HIERARCHY_SYSTEM_ID;\n };\n protoOf(ApiSystemIds).n2s = function () {\n return this.SCENE_GRAPH_SYSTEM_ID;\n };\n protoOf(ApiSystemIds).o2s = function () {\n return this.TRANSFORM_SYSTEM_ID;\n };\n protoOf(ApiSystemIds).p2s = function () {\n return this.DISABLE_CONNECTORS_SYSTEM_ID;\n };\n protoOf(ApiSystemIds).q2s = function () {\n return this.RENDER_SYSTEM_ID;\n };\n protoOf(ApiSystemIds).r2s = function () {\n return this.WORLD_COLLIDER_UPDATE_SYSTEM_ID;\n };\n protoOf(ApiSystemIds).s2s = function () {\n return this.VIEWER_PRESENCE_SYSTEM_ID;\n };\n protoOf(ApiSystemIds).t2s = function () {\n return this.MODEL_LOADER_SYSTEM_ID;\n };\n protoOf(ApiSystemIds).u2s = function () {\n return this.VIEWER_OBJECT_TRANSFORM_SYSTEM_ID;\n };\n protoOf(ApiSystemIds).v2s = function () {\n return this.VIEWER_OBJECT_VISIBILITY_SYSTEM_ID;\n };\n var ApiSystemIds_instance;\n function ApiSystemIds_getInstance() {\n return ApiSystemIds_instance;\n }\n function AlwaysHangDownComponent() {\n }\n protoOf(AlwaysHangDownComponent).x1k = function () {\n return this.id;\n };\n protoOf(AlwaysHangDownComponent).s1k = function () {\n return 26;\n };\n protoOf(AlwaysHangDownComponent).eq = function (other) {\n return true;\n };\n var AlwaysHangDownComponent_instance;\n function AlwaysHangDownComponent_getInstance() {\n return AlwaysHangDownComponent_instance;\n }\n function get_isHanging(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(AlwaysHangDownComponent_instance.id);\n }\n function Companion_105() {\n }\n protoOf(Companion_105).l17 = function () {\n return $serializer_getInstance_15();\n };\n var Companion_instance_105;\n function Companion_getInstance_106() {\n return Companion_instance_105;\n }\n function $serializer_15() {\n $serializer_instance_15 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.transforms.LocalTransformComponent.Serialized', this, 2);\n tmp0_serialDesc.cv('p', false);\n tmp0_serialDesc.cv('r', false);\n this.w2s_1 = tmp0_serialDesc;\n }\n protoOf($serializer_15).ok = function () {\n return this.w2s_1;\n };\n protoOf($serializer_15).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [$serializer_getInstance_8(), $serializer_getInstance_4()];\n };\n protoOf($serializer_15).qk = function (decoder) {\n var tmp0_desc = this.w2s_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_input = decoder.nn(tmp0_desc);\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_4(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_4(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return Serialized_init_$Create$_0(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);\n };\n protoOf($serializer_15).x2s = function (encoder, value) {\n var tmp0_desc = this.w2s_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.ep(tmp0_desc, 0, $serializer_getInstance_8(), value.y2s_1);\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance_4(), value.z2s_1);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_15).pk = function (encoder, value) {\n return this.x2s(encoder, value instanceof Serialized_0 ? value : THROW_CCE());\n };\n var $serializer_instance_15;\n function $serializer_getInstance_15() {\n if ($serializer_instance_15 == null)\n new $serializer_15();\n return $serializer_instance_15;\n }\n function Serialized_init_$Init$_0(seen1, p, r, serializationConstructorMarker, $this) {\n if (!(3 === (3 & seen1))) {\n throwMissingFieldException(seen1, 3, $serializer_getInstance_15().w2s_1);\n }\n $this.y2s_1 = p;\n $this.z2s_1 = r;\n return $this;\n }\n function Serialized_init_$Create$_0(seen1, p, r, serializationConstructorMarker) {\n return Serialized_init_$Init$_0(seen1, p, r, serializationConstructorMarker, objectCreate(protoOf(Serialized_0)));\n }\n function LocalTransformComponent$Companion$serializer$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n return Unit_instance;\n }\n function LocalTransformComponent_init_$Init$(pos, rot, $this) {\n LocalTransformComponent.call($this, new Transform(pos, rot));\n return $this;\n }\n function LocalTransformComponentFromPosAndRot(pos, rot) {\n return LocalTransformComponent_init_$Init$(pos, rot, objectCreate(protoOf(LocalTransformComponent)));\n }\n function Serialized_0(p, r) {\n this.y2s_1 = p;\n this.z2s_1 = r;\n }\n function Companion_106() {\n Companion_instance_106 = this;\n this.id = 6;\n this.IDENTITY = LocalTransformComponentFromPosAndRot(Companion_getInstance_61().ZERO, Companion_getInstance_57().IDENTITY);\n this.serializationKey = 'LocalTransformComponent';\n var tmp = this;\n tmp.v28_1 = Json(VOID, LocalTransformComponent$Companion$serializer$lambda);\n }\n protoOf(Companion_106).s1k = function () {\n return this.id;\n };\n protoOf(Companion_106).x2c = function () {\n return this.IDENTITY;\n };\n protoOf(Companion_106).p1l = function () {\n return this.serializationKey;\n };\n protoOf(Companion_106).fromJson = function (json) {\n var result = this.v28_1.l15(Companion_instance_105.l17(), json);\n return new LocalTransformComponent(new Transform(result.y2s_1, result.z2s_1));\n };\n var Companion_instance_106;\n function Companion_getInstance_107() {\n if (Companion_instance_106 == null)\n new Companion_106();\n return Companion_instance_106;\n }\n function LocalTransformComponent(transform) {\n Companion_getInstance_107();\n this.transform = transform;\n this.a2t_1 = false;\n }\n protoOf(LocalTransformComponent).d1x = function () {\n return this.transform;\n };\n protoOf(LocalTransformComponent).toJson = function (parse) {\n return Companion_getInstance_107().v28_1.k15(Companion_instance_105.l17(), new Serialized_0(this.transform.position, this.transform.rotation));\n };\n protoOf(LocalTransformComponent).serializationKey = function () {\n return 'LocalTransformComponent';\n };\n protoOf(LocalTransformComponent).z1k = function () {\n return this.a2t_1;\n };\n protoOf(LocalTransformComponent).x1k = function () {\n return 6;\n };\n protoOf(LocalTransformComponent).hashCode = function () {\n return this.transform.hashCode();\n };\n protoOf(LocalTransformComponent).equals = function (other) {\n var tmp;\n if (other instanceof LocalTransformComponent) {\n tmp = this.transform.equals(other.transform);\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(LocalTransformComponent).eq = function (other) {\n var otherLoc = other instanceof LocalTransformComponent ? other : THROW_CCE();\n return this.transform.equals(otherLoc.transform);\n };\n protoOf(LocalTransformComponent).moveInParentSpace = function (v) {\n return LocalTransformComponentFromPosAndRot(this.transform.position.plus(v), this.transform.rotation);\n };\n protoOf(LocalTransformComponent).applyMoveInParentSpace = function (entity, v) {\n if (v.notZero()) {\n entity.addComponent(this.moveInParentSpace(v));\n }\n return entity;\n };\n protoOf(LocalTransformComponent).b2t = function (q) {\n return LocalTransformComponentFromPosAndRot(this.transform.position, this.transform.rotation.times(q));\n };\n protoOf(LocalTransformComponent).rotate = function (entity, q) {\n if (!q.isIdentity) {\n if (this.transform.rotation.isIdentity) {\n entity.addComponent(LocalTransformComponentFromPosAndRot(this.transform.position, q));\n } else {\n entity.addComponent(this.b2t(q));\n }\n }\n return entity;\n };\n protoOf(LocalTransformComponent).transformToWorld = function (me) {\n var tmp0_safe_receiver = get_parent(me);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.transforms.LocalTransformComponent.transformToWorld.' call\n var tmp_0;\n if (this.transform.position.isZero() ? this.transform.rotation.isIdentity : false) {\n tmp_0 = get_worldTransform(tmp0_safe_receiver);\n } else {\n var parentWorld = get_worldTransform(tmp0_safe_receiver);\n var worldPos = parentWorld.transformPosition(this.transform.position);\n var worldRot = this.transform.rotation.times(parentWorld.rotation);\n tmp_0 = new Transform(worldPos, worldRot);\n }\n tmp = tmp_0;\n }\n var tmp1_elvis_lhs = tmp;\n return tmp1_elvis_lhs == null ? this.transform : tmp1_elvis_lhs;\n };\n protoOf(LocalTransformComponent).af = function () {\n return this.transform;\n };\n protoOf(LocalTransformComponent).c2t = function (transform) {\n return new LocalTransformComponent(transform);\n };\n protoOf(LocalTransformComponent).copy = function (transform, $super) {\n transform = transform === VOID ? this.transform : transform;\n return this.c2t(transform);\n };\n protoOf(LocalTransformComponent).toString = function () {\n return 'LocalTransformComponent(transform=' + this.transform + ')';\n };\n function get_localTransform(_this__u8e3s4) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(6);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.transform;\n return tmp1_elvis_lhs == null ? Companion_getInstance_60().IDENTITY : tmp1_elvis_lhs;\n }\n function Companion_107() {\n this.ID = 'TransformSystem';\n }\n protoOf(Companion_107).u1n = function () {\n return this.ID;\n };\n var Companion_instance_107;\n function Companion_getInstance_108() {\n return Companion_instance_107;\n }\n function TransformSystem() {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [10];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = ['HierarchySystem'];\n SystemBase.call(this, 'TransformSystem', 6, tmp, tmp$ret$5, null);\n }\n protoOf(TransformSystem).onAddComponent = function (entity, newComponent) {\n TransformUtils_instance.updateWorldTransform(entity);\n };\n protoOf(TransformSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n TransformUtils_instance.updateWorldTransform(entity);\n };\n protoOf(TransformSystem).onRemoveComponent = function (entity, oldComponent) {\n };\n function TransformUtils() {\n }\n protoOf(TransformUtils).worldTransform = function (entity) {\n return get_worldTransform(entity);\n };\n protoOf(TransformUtils).localTransform = function (entity) {\n return get_localTransform(entity);\n };\n protoOf(TransformUtils).worldPosition = function (entity) {\n return get_worldPosition(entity);\n };\n protoOf(TransformUtils).localPosition = function (entity) {\n return get_localTransform(entity).position;\n };\n protoOf(TransformUtils).worldRotation = function (entity) {\n return get_worldRotation(entity);\n };\n protoOf(TransformUtils).rotate = function (entity, rotation) {\n var localTransform = get_localTransform(entity);\n localTransform = new Transform(localTransform.position, localTransform.rotation.times(rotation));\n var localTransformComponent = new LocalTransformComponent(localTransform);\n entity.addComponent(localTransformComponent);\n };\n protoOf(TransformUtils).moveInParentSpace = function (entity, v) {\n var localTransformComponent = LocalTransformComponentFromPosAndRot(get_localTransform(entity).position.plus(v), get_localTransform(entity).rotation);\n entity.addComponent(localTransformComponent);\n };\n protoOf(TransformUtils).moveInLocalSpace = function (entity, v) {\n var localV = v.rotate(get_localTransform(entity).rotation);\n var localTransformComponent = LocalTransformComponentFromPosAndRot(get_localTransform(entity).position.plus(localV), get_localTransform(entity).rotation);\n entity.addComponent(localTransformComponent);\n };\n protoOf(TransformUtils).moveInWorldSpace = function (entity, v) {\n var newWorldPos = get_worldPosition(entity).plus(v);\n this.setWorldTransform(entity, new Transform(newWorldPos, get_worldRotation(entity)));\n };\n protoOf(TransformUtils).updateWorldTransform = function (entity) {\n var newWorld = Companion_getInstance_110().calculate(entity);\n var tmp;\n Companion_getInstance_110();\n if (!entity.hasComponent(10)) {\n tmp = true;\n } else {\n tmp = !newWorld.transform.equals(get_worldTransform(entity));\n }\n if (tmp) {\n entity.addComponent(newWorld);\n var tmp0_safe_receiver = get_parentComponent(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.allDescendants();\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.transforms.TransformUtils.updateWorldTransform.' call\n TransformUtils_instance.updateWorldTransform(element);\n }\n }\n }\n };\n protoOf(TransformUtils).applyWorldTransform = function (polyhedron, entity) {\n return polyhedron.transform(get_worldTransform(entity));\n };\n protoOf(TransformUtils).setLocalPosition = function (entity, position) {\n var old = get_localTransform(entity);\n this.setLocalTransform(entity, new Transform(position, old.rotation));\n };\n protoOf(TransformUtils).setLocalRotation = function (entity, rotation) {\n var old = get_localTransform(entity);\n this.setLocalTransform(entity, new Transform(old.position, rotation));\n };\n protoOf(TransformUtils).setLocalTransform = function (entity, transform) {\n entity.addComponent(new LocalTransformComponent(transform));\n };\n protoOf(TransformUtils).setWorldTransform = function (entity, transform) {\n var tmp0_safe_receiver = get_parent(entity);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_worldTransform(tmp0_safe_receiver);\n var parentTransform = tmp1_elvis_lhs == null ? Companion_getInstance_60().IDENTITY : tmp1_elvis_lhs;\n var relativePosition = parentTransform.inverseTransformPosition(transform.position);\n var relativeRotation = transform.rotation.times(parentTransform.rotation.inverse());\n var newLocalTransform = new Transform(relativePosition, relativeRotation);\n this.setLocalTransform(entity, newLocalTransform);\n };\n protoOf(TransformUtils).setWorldPosition = function (entity, position) {\n this.setWorldTransform(entity, new Transform(position, get_worldRotation(entity)));\n };\n var TransformUtils_instance;\n function TransformUtils_getInstance() {\n return TransformUtils_instance;\n }\n function Companion_108() {\n }\n protoOf(Companion_108).l17 = function () {\n return $serializer_getInstance_16();\n };\n var Companion_instance_108;\n function Companion_getInstance_109() {\n return Companion_instance_108;\n }\n function $serializer_16() {\n $serializer_instance_16 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.transforms.WorldTransformComponent.Serialized', this, 2);\n tmp0_serialDesc.cv('p', false);\n tmp0_serialDesc.cv('r', false);\n this.d2t_1 = tmp0_serialDesc;\n }\n protoOf($serializer_16).ok = function () {\n return this.d2t_1;\n };\n protoOf($serializer_16).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [$serializer_getInstance_8(), $serializer_getInstance_4()];\n };\n protoOf($serializer_16).qk = function (decoder) {\n var tmp0_desc = this.d2t_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_input = decoder.nn(tmp0_desc);\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_4(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_4(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return Serialized_init_$Create$_1(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);\n };\n protoOf($serializer_16).e2t = function (encoder, value) {\n var tmp0_desc = this.d2t_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.ep(tmp0_desc, 0, $serializer_getInstance_8(), value.f2t_1);\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance_4(), value.g2t_1);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_16).pk = function (encoder, value) {\n return this.e2t(encoder, value instanceof Serialized_1 ? value : THROW_CCE());\n };\n var $serializer_instance_16;\n function $serializer_getInstance_16() {\n if ($serializer_instance_16 == null)\n new $serializer_16();\n return $serializer_instance_16;\n }\n function Serialized_init_$Init$_1(seen1, p, r, serializationConstructorMarker, $this) {\n if (!(3 === (3 & seen1))) {\n throwMissingFieldException(seen1, 3, $serializer_getInstance_16().d2t_1);\n }\n $this.f2t_1 = p;\n $this.g2t_1 = r;\n return $this;\n }\n function Serialized_init_$Create$_1(seen1, p, r, serializationConstructorMarker) {\n return Serialized_init_$Init$_1(seen1, p, r, serializationConstructorMarker, objectCreate(protoOf(Serialized_1)));\n }\n function WorldTransformComponent$Companion$serializer$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n return Unit_instance;\n }\n function WorldTransformComponent_init_$Init$(pos, rot, $this) {\n WorldTransformComponent.call($this, new Transform(pos, rot));\n return $this;\n }\n function WorldTransformComponentFromPosAndRot(pos, rot) {\n return WorldTransformComponent_init_$Init$(pos, rot, objectCreate(protoOf(WorldTransformComponent)));\n }\n function Serialized_1(p, r) {\n this.f2t_1 = p;\n this.g2t_1 = r;\n }\n function Companion_109() {\n Companion_instance_109 = this;\n this.id = 10;\n this.IDENTITY = WorldTransformComponentFromPosAndRot(Companion_getInstance_61().ZERO, Companion_getInstance_57().IDENTITY);\n this.serializationKey = 'WorldTransformComponent';\n var tmp = this;\n tmp.h2t_1 = Json(VOID, WorldTransformComponent$Companion$serializer$lambda);\n }\n protoOf(Companion_109).s1k = function () {\n return this.id;\n };\n protoOf(Companion_109).x2c = function () {\n return this.IDENTITY;\n };\n protoOf(Companion_109).calculate = function (entity) {\n Companion_getInstance_107();\n var tmp0_elvis_lhs = entity.__getComponentForKotlin(6);\n var local = tmp0_elvis_lhs == null ? Companion_getInstance_107().IDENTITY : tmp0_elvis_lhs;\n var world = local.transformToWorld(entity);\n return new WorldTransformComponent(world);\n };\n protoOf(Companion_109).p1l = function () {\n return this.serializationKey;\n };\n protoOf(Companion_109).fromJson = function (json) {\n var result = this.h2t_1.l15(Companion_instance_108.l17(), json);\n return new WorldTransformComponent(new Transform(result.f2t_1, result.g2t_1));\n };\n var Companion_instance_109;\n function Companion_getInstance_110() {\n if (Companion_instance_109 == null)\n new Companion_109();\n return Companion_instance_109;\n }\n function WorldTransformComponent(transform) {\n Companion_getInstance_110();\n this.transform = transform;\n }\n protoOf(WorldTransformComponent).d1x = function () {\n return this.transform;\n };\n protoOf(WorldTransformComponent).x1k = function () {\n return 10;\n };\n protoOf(WorldTransformComponent).toJson = function (parse) {\n return Companion_getInstance_110().h2t_1.k15(Companion_instance_108.l17(), new Serialized_1(this.transform.position, this.transform.rotation));\n };\n protoOf(WorldTransformComponent).serializationKey = function () {\n return 'WorldTransformComponent';\n };\n protoOf(WorldTransformComponent).hashCode = function () {\n return this.transform.hashCode();\n };\n protoOf(WorldTransformComponent).equals = function (other) {\n var tmp;\n if (other instanceof WorldTransformComponent) {\n tmp = this.transform.equals(other.transform);\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(WorldTransformComponent).eq = function (other) {\n return (other instanceof WorldTransformComponent ? other : THROW_CCE()).transform.equals(this.transform);\n };\n protoOf(WorldTransformComponent).toString = function () {\n return 'World :' + this.transform;\n };\n protoOf(WorldTransformComponent).af = function () {\n return this.transform;\n };\n protoOf(WorldTransformComponent).c2t = function (transform) {\n return new WorldTransformComponent(transform);\n };\n protoOf(WorldTransformComponent).copy = function (transform, $super) {\n transform = transform === VOID ? this.transform : transform;\n return this.c2t(transform);\n };\n function get_worldTransform(_this__u8e3s4) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(10);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.transform;\n return tmp1_elvis_lhs == null ? Companion_getInstance_60().IDENTITY : tmp1_elvis_lhs;\n }\n function get_worldRotation(_this__u8e3s4) {\n return get_worldTransform(_this__u8e3s4).rotation;\n }\n function get_worldPosition(_this__u8e3s4) {\n return get_worldTransform(_this__u8e3s4).position;\n }\n function Measurable() {\n }\n function Measurer() {\n var tmp = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp.k2t_1 = LinkedHashMap_init_$Create$_0();\n this.l2t_1 = Monotonic_instance;\n var tmp_0 = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp_0.m2t_1 = LinkedHashMap_init_$Create$_0();\n }\n protoOf(Measurer).clear = function () {\n this.k2t_1.z();\n this.m2t_1.z();\n };\n protoOf(Measurer).start = function (id) {\n // Inline function 'kotlin.collections.set' call\n var this_0 = this.m2t_1;\n var value = new ValueTimeMark(this.l2t_1.da());\n this_0.r2(id, value);\n };\n protoOf(Measurer).stop = function (id) {\n var tmp0_safe_receiver = this.m2t_1.b3(id);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.utils.Measurer.stop.' call\n var duration = tmp0_safe_receiver.di();\n $l$block: {\n // Inline function 'com.ikea.core.utils.orElse' call\n var tmp0_safe_receiver_0 = this.k2t_1.b3(id);\n if ((tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.q(new Duration(duration))) == null) {\n var this_0 = this.k2t_1;\n var value = mutableListOf([new Duration(duration)]);\n this_0.r2(id, value);\n break $l$block;\n }\n }\n }\n };\n protoOf(Measurer).getMeasurements = function () {\n return this.k2t_1;\n };\n protoOf(Measurer).getMeasurementsFormatted = function () {\n // Inline function 'kotlin.collections.mutableListOf' call\n var result = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.k2t_1;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this_0.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.utils.Measurer.getMeasurementsFormatted.' call\n var tmp$ret$2 = new Triple(item.t2(), new Duration(sum(item.u2())), item.u2().n());\n destination.q(tmp$ret$2);\n }\n var idSumCalls = destination;\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(idSumCalls, 10));\n var tmp0_iterator_0 = idSumCalls.t();\n while (tmp0_iterator_0.u()) {\n var item_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.utils.Measurer.getMeasurementsFormatted.' call\n var tmp$ret$5 = item_0.ui_1.zh_1;\n destination_0.q(new Duration(tmp$ret$5));\n }\n var total = sum(destination_0);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_1 = idSumCalls.t();\n while (tmp0_iterator_1.u()) {\n var element = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.utils.Measurer.getMeasurementsFormatted.' call\n result.q(element.ti_1 + ' ' + element.ui_1 + ' (' + numberToLong(100).aa(_Duration___get_inWholeNanoseconds__impl__r5x4mr(element.ui_1.zh_1)).z9(_Duration___get_inWholeNanoseconds__impl__r5x4mr(total)).toString() + '%) calls: ' + element.vi_1);\n }\n sort(result);\n result.w1(0, 'Total: ' + new Duration(total));\n return result;\n };\n function sum(_this__u8e3s4) {\n var sum = Companion_getInstance().ja_1;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = _this__u8e3s4.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w().zh_1;\n // Inline function 'com.ikea.core.utils.sum.' call\n sum = Duration__plus_impl_yu9v8f(sum, element);\n }\n return sum;\n }\n function MutableStack(items) {\n this.n2t_1 = toMutableList(items);\n }\n protoOf(MutableStack).push = function (element) {\n return this.n2t_1.q(element);\n };\n protoOf(MutableStack).peek = function () {\n return last(this.n2t_1);\n };\n protoOf(MutableStack).pop = function () {\n return this.n2t_1.h1(this.n2t_1.n() - 1 | 0);\n };\n protoOf(MutableStack).isEmpty = function () {\n return this.n2t_1.b1();\n };\n protoOf(MutableStack).size = function () {\n return this.n2t_1.n();\n };\n protoOf(MutableStack).clear = function () {\n return this.n2t_1.z();\n };\n protoOf(MutableStack).toString = function () {\n return 'MutableStack(' + joinToString(this.n2t_1) + ')';\n };\n function mutableStackOf(elements) {\n return new MutableStack(elements.slice());\n }\n function UrlHelper() {\n }\n protoOf(UrlHelper).joinUrls = function (baseurl, url) {\n if (baseurl == null)\n return url;\n if (url == null)\n return baseurl;\n var urlDetails = this.getUrlDetails(url);\n if (!(urlDetails.protocolAndServer == null))\n return url;\n var baseUrlDetails = this.getUrlDetails(baseurl);\n var tmp0_safe_receiver = urlDetails.path;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : startsWith(tmp0_safe_receiver, '/');\n if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {\n var tmp2_elvis_lhs = baseUrlDetails.protocolAndServer;\n var protocolAndServer = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;\n return protocolAndServer + urlDetails.path;\n }\n var slash = endsWith(baseurl, '/') ? '' : '/';\n return baseurl + slash + url;\n };\n protoOf(UrlHelper).getUrlDetails = function (url) {\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n var lowerUrl = url.toLowerCase();\n if (startsWith(lowerUrl, 'http')) {\n var endOfProtocolPos = indexOf(url, '//');\n var startOfPath = indexOf(url, '/', endOfProtocolPos + 2 | 0);\n if (startOfPath === -1)\n startOfPath = url.length + 1 | 0;\n var protocolAndServer = substring(url, numberRangeToNumber(0, startOfPath - 1 | 0));\n // Inline function 'kotlin.text.substring' call\n var startIndex = startOfPath;\n // Inline function 'kotlin.js.asDynamic' call\n var path = url.substring(startIndex);\n return new UrlDetails(protocolAndServer, path);\n } else {\n return new UrlDetails(null, url);\n }\n };\n var UrlHelper_instance;\n function UrlHelper_getInstance() {\n return UrlHelper_instance;\n }\n function UrlDetails(protocolAndServer, path) {\n this.protocolAndServer = protocolAndServer;\n this.path = path;\n }\n protoOf(UrlDetails).o2t = function () {\n return this.protocolAndServer;\n };\n protoOf(UrlDetails).p2t = function () {\n return this.path;\n };\n protoOf(UrlDetails).af = function () {\n return this.protocolAndServer;\n };\n protoOf(UrlDetails).bf = function () {\n return this.path;\n };\n protoOf(UrlDetails).q2t = function (protocolAndServer, path) {\n return new UrlDetails(protocolAndServer, path);\n };\n protoOf(UrlDetails).copy = function (protocolAndServer, path, $super) {\n protocolAndServer = protocolAndServer === VOID ? this.protocolAndServer : protocolAndServer;\n path = path === VOID ? this.path : path;\n return this.q2t(protocolAndServer, path);\n };\n protoOf(UrlDetails).toString = function () {\n return 'UrlDetails(protocolAndServer=' + this.protocolAndServer + ', path=' + this.path + ')';\n };\n protoOf(UrlDetails).hashCode = function () {\n var result = this.protocolAndServer == null ? 0 : getStringHashCode(this.protocolAndServer);\n result = imul(result, 31) + (this.path == null ? 0 : getStringHashCode(this.path)) | 0;\n return result;\n };\n protoOf(UrlDetails).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof UrlDetails))\n return false;\n var tmp0_other_with_cast = other instanceof UrlDetails ? other : THROW_CCE();\n if (!(this.protocolAndServer == tmp0_other_with_cast.protocolAndServer))\n return false;\n if (!(this.path == tmp0_other_with_cast.path))\n return false;\n return true;\n };\n function toJson(_this__u8e3s4, key) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.utils.toJson.' call\n var it = toString(_this__u8e3s4);\n var tmp;\n if ((startsWith(it, '{') ? true : startsWith(it, '[')) ? true : startsWith(it, '\"')) {\n tmp = '\"' + key + '\":' + it;\n } else {\n if (typeof _this__u8e3s4 === 'number') {\n tmp = '\"' + key + '\":' + it;\n } else {\n if (typeof _this__u8e3s4 === 'number') {\n tmp = '\"' + key + '\":' + it;\n } else {\n if (typeof _this__u8e3s4 === 'number') {\n tmp = '\"' + key + '\":' + it;\n } else {\n if (typeof _this__u8e3s4 === 'boolean') {\n tmp = '\"' + key + '\":' + it;\n } else {\n if (_this__u8e3s4 instanceof Long) {\n tmp = '\"' + key + '\":' + it;\n } else {\n tmp = '\"' + key + '\":\"' + it + '\"';\n }\n }\n }\n }\n }\n }\n return tmp;\n }\n function Companion_110() {\n this.ID = 'NoValidConnectorAvailableValidationResult';\n }\n protoOf(Companion_110).u1n = function () {\n return this.ID;\n };\n var Companion_instance_110;\n function Companion_getInstance_111() {\n return Companion_instance_110;\n }\n function NoValidConnectorAvailableValidationResult(productRef) {\n ValidationResult.call(this, ValidationResultType_FAIL_getInstance(), productRef);\n }\n protoOf(NoValidConnectorAvailableValidationResult).s1k = function () {\n return 'NoValidConnectorAvailableValidationResult';\n };\n protoOf(NoValidConnectorAvailableValidationResult).toString = function () {\n return 'Validation failed for ' + this.productRef + ': No valid connector available';\n };\n function Companion_111() {\n this.ID = 'UnknownErrorValidationResult';\n }\n protoOf(Companion_111).u1n = function () {\n return this.ID;\n };\n var Companion_instance_111;\n function Companion_getInstance_112() {\n return Companion_instance_111;\n }\n function UnknownErrorValidationResult(productRef) {\n ValidationResult.call(this, ValidationResultType_FAIL_getInstance(), productRef);\n }\n protoOf(UnknownErrorValidationResult).s1k = function () {\n return 'UnknownErrorValidationResult';\n };\n protoOf(UnknownErrorValidationResult).toString = function () {\n return 'Validation failed for ' + this.productRef + ' for unknown reasons. This could be a bug';\n };\n function Companion_112() {\n }\n protoOf(Companion_112).noSnappingEntity = function (guest) {\n // Inline function 'kotlin.emptyArray' call\n var tmp = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [Companion_instance_114.noSnappingEntity(guest)];\n return new ValidSnapActionCandidateOrErrors(null, tmp, tmp$ret$3);\n };\n protoOf(Companion_112).noSnapCandidates = function (guest) {\n // Inline function 'kotlin.emptyArray' call\n var tmp = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [Companion_instance_114.noSnapCandidates(guest)];\n return new ValidSnapActionCandidateOrErrors(null, tmp, tmp$ret$3);\n };\n var Companion_instance_112;\n function Companion_getInstance_113() {\n return Companion_instance_112;\n }\n function ValidSnapActionCandidateOrErrors(snapActionCandidate, warnings, errors) {\n var tmp;\n if (warnings === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = warnings;\n }\n warnings = tmp;\n var tmp_0;\n if (errors === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = errors;\n }\n errors = tmp_0;\n this.snapActionCandidate = snapActionCandidate;\n this.warnings = warnings;\n this.errors = errors;\n }\n protoOf(ValidSnapActionCandidateOrErrors).x2p = function () {\n return this.snapActionCandidate;\n };\n protoOf(ValidSnapActionCandidateOrErrors).r2t = function () {\n return this.warnings;\n };\n protoOf(ValidSnapActionCandidateOrErrors).s2t = function () {\n return this.errors;\n };\n protoOf(ValidSnapActionCandidateOrErrors).t2t = function () {\n return !(this.snapActionCandidate == null);\n };\n protoOf(ValidSnapActionCandidateOrErrors).combineFailures = function (other) {\n if (!(this.snapActionCandidate == null)) {\n return this;\n }\n if (!(other.snapActionCandidate == null)) {\n return other;\n }\n // Inline function 'kotlin.collections.plus' call\n var this_0 = this.warnings;\n var elements = other.warnings;\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = this_0.concat(elements);\n // Inline function 'kotlin.collections.plus' call\n var this_1 = this.errors;\n var elements_0 = other.errors;\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = this_1.concat(elements_0);\n return new ValidSnapActionCandidateOrErrors(null, tmp, tmp$ret$3);\n };\n protoOf(ValidSnapActionCandidateOrErrors).af = function () {\n return this.snapActionCandidate;\n };\n protoOf(ValidSnapActionCandidateOrErrors).bf = function () {\n return this.warnings;\n };\n protoOf(ValidSnapActionCandidateOrErrors).g1k = function () {\n return this.errors;\n };\n protoOf(ValidSnapActionCandidateOrErrors).u2t = function (snapActionCandidate, warnings, errors) {\n return new ValidSnapActionCandidateOrErrors(snapActionCandidate, warnings, errors);\n };\n protoOf(ValidSnapActionCandidateOrErrors).copy = function (snapActionCandidate, warnings, errors, $super) {\n snapActionCandidate = snapActionCandidate === VOID ? this.snapActionCandidate : snapActionCandidate;\n warnings = warnings === VOID ? this.warnings : warnings;\n errors = errors === VOID ? this.errors : errors;\n return this.u2t(snapActionCandidate, warnings, errors);\n };\n protoOf(ValidSnapActionCandidateOrErrors).toString = function () {\n return 'ValidSnapActionCandidateOrErrors(snapActionCandidate=' + this.snapActionCandidate + ', warnings=' + toString(this.warnings) + ', errors=' + toString(this.errors) + ')';\n };\n protoOf(ValidSnapActionCandidateOrErrors).hashCode = function () {\n var result = this.snapActionCandidate == null ? 0 : hashCode(this.snapActionCandidate);\n result = imul(result, 31) + hashCode(this.warnings) | 0;\n result = imul(result, 31) + hashCode(this.errors) | 0;\n return result;\n };\n protoOf(ValidSnapActionCandidateOrErrors).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ValidSnapActionCandidateOrErrors))\n return false;\n var tmp0_other_with_cast = other instanceof ValidSnapActionCandidateOrErrors ? other : THROW_CCE();\n if (!equals(this.snapActionCandidate, tmp0_other_with_cast.snapActionCandidate))\n return false;\n if (!equals(this.warnings, tmp0_other_with_cast.warnings))\n return false;\n if (!equals(this.errors, tmp0_other_with_cast.errors))\n return false;\n return true;\n };\n function ValidationImpl() {\n this.x1n_1 = true;\n }\n protoOf(ValidationImpl).y1n = function () {\n return this.x1n_1;\n };\n protoOf(ValidationImpl).enable = function () {\n this.x1n_1 = true;\n };\n protoOf(ValidationImpl).disable = function () {\n this.x1n_1 = false;\n };\n function Validation() {\n }\n var ValidationResultType_WARNING_instance;\n var ValidationResultType_FAIL_instance;\n function values_8() {\n return [ValidationResultType_WARNING_getInstance(), ValidationResultType_FAIL_getInstance()];\n }\n function valueOf_8(value) {\n switch (value) {\n case 'WARNING':\n return ValidationResultType_WARNING_getInstance();\n case 'FAIL':\n return ValidationResultType_FAIL_getInstance();\n default:\n ValidationResultType_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var ValidationResultType_entriesInitialized;\n function ValidationResultType_initEntries() {\n if (ValidationResultType_entriesInitialized)\n return Unit_instance;\n ValidationResultType_entriesInitialized = true;\n ValidationResultType_WARNING_instance = new ValidationResultType('WARNING', 0);\n ValidationResultType_FAIL_instance = new ValidationResultType('FAIL', 1);\n }\n function ValidationResultType(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function Companion_113() {\n this.GENERIC_FAILURE = 'Generic ValidationResultFail';\n }\n protoOf(Companion_113).x2t = function () {\n return this.GENERIC_FAILURE;\n };\n var Companion_instance_113;\n function Companion_getInstance_114() {\n return Companion_instance_113;\n }\n function ValidationResultFail(message, productRef, rule) {\n ValidationResult.call(this, ValidationResultType_FAIL_getInstance(), productRef, rule);\n this.message = message;\n }\n protoOf(ValidationResultFail).md = function () {\n return this.message;\n };\n protoOf(ValidationResultFail).s1k = function () {\n var tmp0_safe_receiver = this.failedRule;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.id;\n return tmp1_elvis_lhs == null ? 'Generic ValidationResultFail' : tmp1_elvis_lhs;\n };\n protoOf(ValidationResultFail).toString = function () {\n return 'Validation failed: ' + this.message;\n };\n function ValidationResultWarning(message, productRef, rule) {\n ValidationResult.call(this, ValidationResultType_WARNING_getInstance(), productRef, rule);\n this.message = message;\n }\n protoOf(ValidationResultWarning).md = function () {\n return this.message;\n };\n protoOf(ValidationResultWarning).s1k = function () {\n return 'Generic ValidationResultWarning';\n };\n protoOf(ValidationResultWarning).toString = function () {\n return 'Validation warning: ' + this.message;\n };\n function ValidationResultType_WARNING_getInstance() {\n ValidationResultType_initEntries();\n return ValidationResultType_WARNING_instance;\n }\n function ValidationResultType_FAIL_getInstance() {\n ValidationResultType_initEntries();\n return ValidationResultType_FAIL_instance;\n }\n function Companion_114() {\n }\n protoOf(Companion_114).y2t = function (message, productRef, rule) {\n return new ValidationResultFail(message, productRef, rule);\n };\n protoOf(Companion_114).fail = function (message, productRef, rule, $super) {\n productRef = productRef === VOID ? null : productRef;\n rule = rule === VOID ? null : rule;\n return this.y2t(message, productRef, rule);\n };\n protoOf(Companion_114).z2t = function (message, productRef, rule) {\n return new ValidationResultWarning(message, productRef, rule);\n };\n protoOf(Companion_114).warning = function (message, productRef, rule, $super) {\n productRef = productRef === VOID ? null : productRef;\n rule = rule === VOID ? null : rule;\n return this.z2t(message, productRef, rule);\n };\n protoOf(Companion_114).noSnapCandidates = function (guest) {\n var tmp0_elvis_lhs = get_productRef(guest);\n return new ValidationResultFail('No snap candidates found', tmp0_elvis_lhs == null ? 'Entity ' + guest.id : tmp0_elvis_lhs, null);\n };\n protoOf(Companion_114).noSnappingEntity = function (guest) {\n var tmp0_elvis_lhs = get_productRef(guest);\n return new ValidationResultFail('No snapping entity found', tmp0_elvis_lhs == null ? 'Entity ' + guest.id : tmp0_elvis_lhs, null);\n };\n var Companion_instance_114;\n function Companion_getInstance_115() {\n return Companion_instance_114;\n }\n function ValidationResult(resultType, productRef, failedRule) {\n failedRule = failedRule === VOID ? null : failedRule;\n this.resultType = resultType;\n this.productRef = productRef;\n this.failedRule = failedRule;\n }\n protoOf(ValidationResult).b1o = function () {\n return this.resultType;\n };\n protoOf(ValidationResult).j1l = function () {\n return this.productRef;\n };\n protoOf(ValidationResult).c1o = function () {\n return this.failedRule;\n };\n protoOf(ValidationResult).toString = function () {\n var tmp;\n switch (this.resultType.x9_1) {\n case 1:\n tmp = 'Validation failed';\n break;\n case 0:\n tmp = 'Validation warned';\n break;\n default:\n noWhenBranchMatchedException();\n break;\n }\n return tmp;\n };\n function ValidationService() {\n }\n function fastComponent(entity, componentId) {\n var tmp0_safe_receiver = entity.getComponent(componentId);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = tmp0_safe_receiver;\n }\n return tmp;\n }\n function unsafeCast(obj) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return obj;\n }\n function echoStandardConsole(a) {\n console.log(a);\n }\n function getCoreVersion() {\n var tmp = require('../package.json').version;\n return (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE();\n }\n //region block: post-declaration\n defineProp(protoOf(ActionState), 'name', protoOf(ActionState).mb);\n defineProp(protoOf(ActionState), 'ordinal', protoOf(ActionState).nb);\n defineProp(protoOf(CoreServices), 'logger', protoOf(CoreServices).x1i);\n protoOf($serializer).sv = typeParametersSerializers;\n protoOf(AssemblyPartIdsComponent).z1k = get_serializable;\n protoOf(AssemblyPartIdsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AssemblyPartIdsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AssemblyPartIdsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AssemblyPartIdsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf($serializer_0).sv = typeParametersSerializers;\n protoOf(AssemblyPartsComponent).z1k = get_serializable;\n protoOf(AssemblyPartsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AssemblyPartsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AssemblyPartsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AssemblyPartsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(AssemblyStructureComponent).z1k = get_serializable;\n protoOf(AssemblyStructureComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AssemblyStructureComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AssemblyStructureComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AssemblyStructureComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf($serializer_1).sv = typeParametersSerializers;\n protoOf(ProductPartComponent).z1k = get_serializable_0;\n protoOf(ProductPartComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ProductPartComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ProductPartComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ProductPartComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ProductComponent).z1k = get_serializable;\n protoOf(ProductComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ProductComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ProductComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ProductComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(Companion_8), 'id', protoOf(Companion_8).s1k);\n protoOf(ProductStructureComponent).z1k = get_serializable;\n protoOf(ProductStructureComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ProductStructureComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ProductStructureComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ProductStructureComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(CircularBuffer), 'size', protoOf(CircularBuffer).n);\n protoOf(ColliderComponent).z1k = get_serializable;\n protoOf(ColliderComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ColliderComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ColliderComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ColliderComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ColliderShapeComponent).z1k = get_serializable;\n protoOf(ColliderShapeComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ColliderShapeComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ColliderShapeComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ColliderShapeComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ValidationImpl).findRoot = findRoot;\n defineProp(protoOf(ValidationImpl), 'isEnabled', function () {\n return this.y1n();\n });\n defineProp(protoOf(ValidationImpl), 'id', function () {\n return this.s1k();\n });\n defineProp(protoOf(ValidationResult), 'id', function () {\n return this.s1k();\n });\n defineProp(protoOf(CollisionValidationResult), 'aabbOfAllCollidedWith', protoOf(CollisionValidationResult).a1o);\n defineProp(protoOf(EcsSystemImpl), 'isEnabled', function () {\n return this.y1n();\n });\n defineProp(protoOf(EcsSystemImpl), 'systemsBeforeMe', function () {\n return this.x1o();\n });\n defineProp(protoOf(EcsSystemImpl), 'systemsAfterMe', function () {\n return this.y1o();\n });\n defineProp(protoOf(EcsSystemImpl), 'ignoreEntitiesWithComponents', function () {\n return this.a1p();\n });\n defineProp(protoOf(EcsSystemImpl), 'mandatoryComponents', function () {\n return this.z1o();\n });\n defineProp(protoOf(EcsSystemImpl), 'doingChangesOnComponent', function () {\n return this.w1o();\n });\n defineProp(protoOf(EcsSystemImpl), 'componentListeners', function () {\n return this.b1p();\n });\n defineProp(protoOf(EcsSystemImpl), 'id', function () {\n return this.s1k();\n });\n defineProp(protoOf(Connection), 'guestConnectionRoot', protoOf(Connection).t1v);\n defineProp(protoOf(Connection), 'hostConnectionRoot', protoOf(Connection).u1v);\n defineProp(protoOf(Connection), 'priority', protoOf(Connection).v1v);\n defineProp(protoOf(Connection), 'guestIsConnectionRoot', protoOf(Connection).x1v);\n defineProp(protoOf(Connection), 'guestConnectorWorldPosition', protoOf(Connection).y1v);\n defineProp(protoOf(Connection), 'hostConnectorWorldPosition', protoOf(Connection).z1v);\n protoOf(ConnectionRootComponent).z1k = get_serializable;\n protoOf(ConnectionRootComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ConnectionRootComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ConnectionRootComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ConnectionRootComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(GuestConnectionsComponent).z1k = get_serializable;\n protoOf(GuestConnectionsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(GuestConnectionsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(GuestConnectionsComponent), 'hasMultipleHosts', protoOf(GuestConnectionsComponent).e1w);\n defineProp(protoOf(GuestConnectionsComponent), 'highestPriorityConnection', protoOf(GuestConnectionsComponent).f1w);\n defineProp(protoOf(GuestConnectionsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(GuestConnectionsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(HostConnectionsComponent).z1k = get_serializable;\n protoOf(HostConnectionsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(HostConnectionsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(HostConnectionsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(HostConnectionsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(TemporarilyPauseConnectionParentingComponent).z1k = get_serializable;\n protoOf(TemporarilyPauseConnectionParentingComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(TemporarilyPauseConnectionParentingComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(TemporarilyPauseConnectionParentingComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(TemporarilyPauseConnectionParentingComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(Connector), 'key', function () {\n return this.t2();\n });\n defineProp(protoOf(Connector), 'type', function () {\n return this.a1x();\n });\n defineProp(protoOf(Connector), 'required', function () {\n return this.b1x();\n });\n defineProp(protoOf(Connector), 'worldSpaceOffsetOnHanging', function () {\n return this.c1x();\n });\n defineProp(protoOf(Connector), 'transform', function () {\n return this.d1x();\n });\n defineProp(protoOf(Connector), 'rotationalDegreeOfFreedom', function () {\n return this.e1x();\n });\n defineProp(protoOf(Connector), 'tagArray', function () {\n return this.g1x();\n }, function (value) {\n this.f1x(value);\n });\n defineProp(protoOf(Connector), 'offersArray', function () {\n return this.i1x();\n }, function (value) {\n this.h1x(value);\n });\n defineProp(protoOf(Connector), 'demandsArray', function () {\n return this.k1x();\n }, function (value) {\n this.j1x(value);\n });\n defineProp(protoOf(Connector), 'priority', function () {\n return this.v1v();\n });\n defineProp(protoOf(Connector), 'activationDistance', function () {\n return this.l1x();\n });\n defineProp(protoOf(Connector), 'enabled', function () {\n return this.m1x();\n });\n defineProp(protoOf(Connector), 'isContinuousConnector', function () {\n return this.n1x();\n });\n defineProp(protoOf(Connector), 'allSubConnectors', function () {\n return this.o1x();\n });\n defineProp(protoOf(Connector), 'hasSubConnectors', function () {\n return this.p1x();\n });\n protoOf(ConnectorsComponent).z1k = get_serializable;\n protoOf(ConnectorsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ConnectorsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ConnectorsComponent), 'tags', protoOf(ConnectorsComponent).c1y);\n defineProp(protoOf(ConnectorsComponent), 'hostConnectors', protoOf(ConnectorsComponent).d1y);\n defineProp(protoOf(ConnectorsComponent), 'guestConnectors', protoOf(ConnectorsComponent).e1y);\n defineProp(protoOf(ConnectorsComponent), 'alignmentConnectors', protoOf(ConnectorsComponent).f1y);\n defineProp(protoOf(ConnectorsComponent), 'requiredConnectors', protoOf(ConnectorsComponent).g1y);\n defineProp(protoOf(ConnectorsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ConnectorsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(DisabledConnectorsComponent).z1k = get_serializable;\n protoOf(DisabledConnectorsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DisabledConnectorsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DisabledConnectorsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DisabledConnectorsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(RelativeConnectorsComponent).z1k = get_serializable;\n protoOf(RelativeConnectorsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(RelativeConnectorsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(RelativeConnectorsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(RelativeConnectorsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(RotationDegreeOfFreedom), 'name', protoOf(RotationDegreeOfFreedom).mb);\n defineProp(protoOf(RotationDegreeOfFreedom), 'ordinal', protoOf(RotationDegreeOfFreedom).nb);\n protoOf(DebugLinesComponent).z1k = get_serializable;\n protoOf(DebugLinesComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DebugLinesComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DebugLinesComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DebugLinesComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(DebugSurfacesComponent).z1k = get_serializable;\n protoOf(DebugSurfacesComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DebugSurfacesComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DebugSurfacesComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DebugSurfacesComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(DragSurfacesComponent).z1k = get_serializable;\n protoOf(DragSurfacesComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DragSurfacesComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DragSurfacesComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DragSurfacesComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(DraggableComponent).z1k = get_serializable;\n protoOf(DraggableComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DraggableComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DraggableComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DraggableComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(SomethingIsDraggedComponent).z1k = get_serializable;\n defineProp(protoOf(SomethingIsDraggedComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(SomethingIsDraggedComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(SomethingIsDraggedComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DragType), 'name', protoOf(DragType).mb);\n defineProp(protoOf(DragType), 'ordinal', protoOf(DragType).nb);\n protoOf(ViewerDragEventComponent).z1k = get_serializable;\n defineProp(protoOf(ViewerDragEventComponent), 'rayFromCameraToDragEnd', protoOf(ViewerDragEventComponent).b24);\n defineProp(protoOf(ViewerDragEventComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ViewerDragEventComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(ViewerDragEventComponent), 'serializable', function () {\n return this.z1k();\n });\n protoOf(WorldDragSurfacesComponent).z1k = get_serializable;\n protoOf(WorldDragSurfacesComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(WorldDragSurfacesComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(WorldDragSurfacesComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(WorldDragSurfacesComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(WorldSpaceDragEventComponent).z1k = get_serializable;\n defineProp(protoOf(WorldSpaceDragEventComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(WorldSpaceDragEventComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(WorldSpaceDragEventComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(Entity), 'allComponents', protoOf(Entity).m24);\n defineProp(protoOf(Entity), 'isDisposed', protoOf(Entity).n24);\n defineProp(protoOf(EntityManagerImpl), 'entities', function () {\n return this.o24();\n });\n defineProp(protoOf(ComponentListenerImpl), 'ownerSystem', function () {\n return this.l24();\n });\n defineProp(protoOf(ComponentListenerImpl), 'componentId', function () {\n return this.v1o();\n });\n protoOf(AutomaticGroupComponent).z1k = get_serializable_0;\n protoOf(AutomaticGroupComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AutomaticGroupComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AutomaticGroupComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AutomaticGroupComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(AutomaticGroupIdCountComponent).z1k = get_serializable;\n protoOf(AutomaticGroupIdCountComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AutomaticGroupIdCountComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AutomaticGroupIdCountComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AutomaticGroupIdCountComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ManualGroupComponent).z1k = get_serializable_0;\n protoOf(ManualGroupComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ManualGroupComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ManualGroupComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ManualGroupComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ManualGroupIdCountComponent).z1k = get_serializable;\n protoOf(ManualGroupIdCountComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ManualGroupIdCountComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ManualGroupIdCountComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ManualGroupIdCountComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(StaticComponent).z1k = get_serializable;\n protoOf(StaticComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(StaticComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(StaticComponent), 'id', protoOf(StaticComponent).s1k);\n defineProp(protoOf(StaticComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(StaticComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ChildComponent).z1k = get_serializable;\n protoOf(ChildComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ChildComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ChildComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ChildComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(InSceneComponent).z1k = get_serializable;\n protoOf(InSceneComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(InSceneComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(InSceneComponent), 'id', protoOf(InSceneComponent).s1k);\n defineProp(protoOf(InSceneComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(InSceneComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ParentComponent).z1k = get_serializable;\n protoOf(ParentComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ParentComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ParentComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ParentComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(SceneComponent).z1k = get_serializable;\n protoOf(SceneComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(SceneComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(SceneComponent), 'id', protoOf(SceneComponent).s1k);\n defineProp(protoOf(SceneComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(SceneComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(HistoryEventType), 'name', protoOf(HistoryEventType).mb);\n defineProp(protoOf(HistoryEventType), 'ordinal', protoOf(HistoryEventType).nb);\n protoOf(HistoryChangedEventComponent).z1k = get_serializable;\n protoOf(HistoryChangedEventComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(HistoryChangedEventComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(HistoryChangedEventComponent), 'eventType', protoOf(HistoryChangedEventComponent).r2a);\n defineProp(protoOf(HistoryChangedEventComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(HistoryChangedEventComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(HistoryImpl).takeSnapshot = takeSnapshot;\n defineProp(protoOf(HistoryImpl), 'isPaused', function () {\n return this.g2a();\n });\n defineProp(protoOf(LogLevel), 'name', protoOf(LogLevel).mb);\n defineProp(protoOf(LogLevel), 'ordinal', protoOf(LogLevel).nb);\n protoOf(LoggerImpl).f2b = set_logLevel;\n protoOf(LoggerImpl).g2b = get_logLevel;\n defineProp(protoOf(LoggerImpl), 'level', function () {\n return this.e2b();\n }, function (value) {\n this.d2b(value);\n });\n defineProp(protoOf(LoggerImpl), 'logLevel', function () {\n return this.g2b();\n }, function (value) {\n this.f2b(value);\n });\n protoOf(LoggerWrap).f2b = set_logLevel;\n protoOf(LoggerWrap).g2b = get_logLevel;\n defineProp(protoOf(LoggerWrap), 'level', function () {\n return this.e2b();\n }, function (value) {\n this.d2b(value);\n });\n defineProp(protoOf(LoggerWrap), 'logLevel', function () {\n return this.g2b();\n }, function (value) {\n this.f2b(value);\n });\n protoOf(MockLogger).f2b = set_logLevel;\n protoOf(MockLogger).g2b = get_logLevel;\n defineProp(protoOf(MockLogger), 'level', function () {\n return this.e2b();\n }, function (value) {\n this.d2b(value);\n });\n defineProp(protoOf(MockLogger), 'logLevel', function () {\n return this.g2b();\n }, function (value) {\n this.f2b(value);\n });\n defineProp(protoOf(DualDouble), 'midPoint', protoOf(DualDouble).z2b);\n defineProp(protoOf(DualDouble), 'length', protoOf(DualDouble).a);\n protoOf($serializer_2).sv = typeParametersSerializers;\n defineProp(protoOf(Axis), 'name', protoOf(Axis).mb);\n defineProp(protoOf(Axis), 'ordinal', protoOf(Axis).nb);\n protoOf($serializer_3).sv = typeParametersSerializers;\n defineProp(protoOf(ModelTransform), 'transform', protoOf(ModelTransform).d1x);\n protoOf($serializer_4).sv = typeParametersSerializers;\n defineProp(protoOf(Quaternion), 'eulerDegrees', protoOf(Quaternion).m2d);\n defineProp(protoOf(RelationOriginAlongX), 'name', protoOf(RelationOriginAlongX).mb);\n defineProp(protoOf(RelationOriginAlongX), 'ordinal', protoOf(RelationOriginAlongX).nb);\n defineProp(protoOf(RelationOriginAlongY), 'name', protoOf(RelationOriginAlongY).mb);\n defineProp(protoOf(RelationOriginAlongY), 'ordinal', protoOf(RelationOriginAlongY).nb);\n defineProp(protoOf(RelationOriginAlongZ), 'name', protoOf(RelationOriginAlongZ).mb);\n defineProp(protoOf(RelationOriginAlongZ), 'ordinal', protoOf(RelationOriginAlongZ).nb);\n protoOf($serializer_5).sv = typeParametersSerializers;\n defineProp(protoOf(RelationOrigin), 'x', protoOf(RelationOrigin).i2d);\n defineProp(protoOf(RelationOrigin), 'y', protoOf(RelationOrigin).j2d);\n defineProp(protoOf(RelationOrigin), 'z', protoOf(RelationOrigin).k2d);\n protoOf($serializer_6).sv = typeParametersSerializers;\n protoOf(Size).alignBottom = alignBottom;\n protoOf(Size).alignTop = alignTop;\n protoOf(Size).alignRight = alignRight;\n protoOf(Size).alignLeft = alignLeft;\n protoOf(Size).alignFront = alignFront;\n protoOf(Size).alignBack = alignBack;\n defineProp(protoOf(Size), 'width', function () {\n return this.u2b();\n });\n defineProp(protoOf(Size), 'height', function () {\n return this.v2b();\n });\n defineProp(protoOf(Size), 'depth', function () {\n return this.w2b();\n });\n protoOf($serializer_7).sv = typeParametersSerializers;\n defineProp(protoOf(Transform), 'forward', protoOf(Transform).z2e);\n defineProp(protoOf(Transform), 'up', protoOf(Transform).a2f);\n defineProp(protoOf(Transform), 'right', protoOf(Transform).d2c);\n protoOf($serializer_8).sv = typeParametersSerializers;\n protoOf(Vector).alignBottom = alignBottom;\n protoOf(Vector).alignTop = alignTop;\n protoOf(Vector).alignRight = alignRight;\n protoOf(Vector).alignLeft = alignLeft;\n protoOf(Vector).alignFront = alignFront;\n protoOf(Vector).alignBack = alignBack;\n defineProp(protoOf(Vector), 'width', function () {\n return this.u2b();\n });\n defineProp(protoOf(Vector), 'height', function () {\n return this.v2b();\n });\n defineProp(protoOf(Vector), 'depth', function () {\n return this.w2b();\n });\n defineProp(protoOf(Vector), 'XXX', protoOf(Vector).n2f);\n defineProp(protoOf(Vector), 'XXY', protoOf(Vector).o2f);\n defineProp(protoOf(Vector), 'XXZ', protoOf(Vector).p2f);\n defineProp(protoOf(Vector), 'XYX', protoOf(Vector).q2f);\n defineProp(protoOf(Vector), 'XYY', protoOf(Vector).r2f);\n defineProp(protoOf(Vector), 'XYZ', protoOf(Vector).s2f);\n defineProp(protoOf(Vector), 'XZX', protoOf(Vector).t2f);\n defineProp(protoOf(Vector), 'XZY', protoOf(Vector).u2f);\n defineProp(protoOf(Vector), 'XZZ', protoOf(Vector).v2f);\n defineProp(protoOf(Vector), 'YXX', protoOf(Vector).w2f);\n defineProp(protoOf(Vector), 'YXY', protoOf(Vector).x2f);\n defineProp(protoOf(Vector), 'YXZ', protoOf(Vector).y2f);\n defineProp(protoOf(Vector), 'YYX', protoOf(Vector).z2f);\n defineProp(protoOf(Vector), 'YYY', protoOf(Vector).a2g);\n defineProp(protoOf(Vector), 'YYZ', protoOf(Vector).b2g);\n defineProp(protoOf(Vector), 'YZX', protoOf(Vector).c2g);\n defineProp(protoOf(Vector), 'YZY', protoOf(Vector).d2g);\n defineProp(protoOf(Vector), 'YZZ', protoOf(Vector).e2g);\n defineProp(protoOf(Vector), 'ZXX', protoOf(Vector).f2g);\n defineProp(protoOf(Vector), 'ZXY', protoOf(Vector).g2g);\n defineProp(protoOf(Vector), 'ZXZ', protoOf(Vector).h2g);\n defineProp(protoOf(Vector), 'ZYX', protoOf(Vector).i2g);\n defineProp(protoOf(Vector), 'ZYY', protoOf(Vector).j2g);\n defineProp(protoOf(Vector), 'ZYZ', protoOf(Vector).k2g);\n defineProp(protoOf(Vector), 'ZZX', protoOf(Vector).l2g);\n defineProp(protoOf(Vector), 'ZZY', protoOf(Vector).m2g);\n defineProp(protoOf(Vector), 'ZZZ', protoOf(Vector).n2g);\n defineProp(protoOf(Vector), 'XX', protoOf(Vector).o2g);\n defineProp(protoOf(Vector), 'XY', protoOf(Vector).p2g);\n defineProp(protoOf(Vector), 'XZ', protoOf(Vector).q2g);\n defineProp(protoOf(Vector), 'X0Z', protoOf(Vector).r2g);\n defineProp(protoOf(Vector), 'YX', protoOf(Vector).s2g);\n defineProp(protoOf(Vector), 'YY', protoOf(Vector).t2g);\n defineProp(protoOf(Vector), 'YZ', protoOf(Vector).u2g);\n defineProp(protoOf(Vector), 'ZX', protoOf(Vector).v2g);\n defineProp(protoOf(Vector), 'ZY', protoOf(Vector).w2g);\n defineProp(protoOf(Vector), 'ZZ', protoOf(Vector).x2g);\n defineProp(protoOf(Vector), 'size', protoOf(Vector).n);\n defineProp(protoOf(Vector), 'abs', protoOf(Vector).z2g);\n defineProp(protoOf(InnerMeasurement), 'distance', protoOf(InnerMeasurement).c2h);\n protoOf(DisplayNameComponent).z1k = get_serializable;\n protoOf(DisplayNameComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DisplayNameComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DisplayNameComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DisplayNameComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ProppingComponent).z1k = get_serializable;\n protoOf(ProppingComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ProppingComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ProppingComponent), 'id', protoOf(ProppingComponent).s1k);\n defineProp(protoOf(ProppingComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ProppingComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(TemplateDataComponent).z1k = get_serializable;\n protoOf(TemplateDataComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(TemplateDataComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(TemplateDataComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(TemplateDataComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(LoadedModelInfoComponent).z1k = get_serializable;\n defineProp(protoOf(LoadedModelInfoComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(LoadedModelInfoComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(LoadedModelInfoComponent), 'serializable', function () {\n return this.z1k();\n });\n protoOf(ModelInfoComponent).z1k = get_serializable;\n protoOf(ModelInfoComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ModelInfoComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ModelInfoComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ModelInfoComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(Companion_67), 'id', protoOf(Companion_67).s1k);\n protoOf(ModelTransformComponent).z1k = get_serializable;\n protoOf(ModelTransformComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ModelTransformComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ModelTransformComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ModelTransformComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(OutlineableComponent).z1k = get_serializable;\n protoOf(OutlineableComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(OutlineableComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(OutlineableComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(OutlineableComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(PauseViewerUpdatesComponent).z1k = get_serializable;\n protoOf(PauseViewerUpdatesComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(PauseViewerUpdatesComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(PauseViewerUpdatesComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(PauseViewerUpdatesComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(RenderedComponent).z1k = get_serializable;\n protoOf(RenderedComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(RenderedComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(RenderedComponent), 'id', protoOf(RenderedComponent).s1k);\n defineProp(protoOf(RenderedComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(RenderedComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ViewerComponent).z1k = get_serializable;\n protoOf(ViewerComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ViewerComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ViewerComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ViewerComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ViewerLineIdsComponent).z1k = get_serializable;\n defineProp(protoOf(ViewerLineIdsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ViewerLineIdsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(ViewerLineIdsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(Companion_73), 'id', protoOf(Companion_73).s1k);\n protoOf(ViewerObjectComponent).z1k = get_serializable;\n defineProp(protoOf(ViewerObjectComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ViewerObjectComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(ViewerObjectComponent), 'serializable', function () {\n return this.z1k();\n });\n protoOf(ViewerMock).loadModel = loadModel;\n protoOf(ViewerMock).createEmpty = createEmpty;\n protoOf(ViewerMock).createSphere = createSphere;\n protoOf(ViewerMock).cloneObject = cloneObject;\n protoOf(ViewerMock).createBox = createBox;\n protoOf(ViewerMock).createSurface = createSurface;\n protoOf(ViewerMock).createPlane = createPlane;\n protoOf(ViewerMock).groupMeshes = groupMeshes;\n protoOf(ViewerMock).debug = debug;\n protoOf(ViewerMock).createGhostModel = createGhostModel;\n protoOf(ViewerMock).createUiLine = createUiLine;\n protoOf(ViewerMock).createUiDashedLine = createUiDashedLine;\n protoOf(ViewerMock).updateUiLine = updateUiLine;\n protoOf(ViewerObjectMock).setPosition = setPosition;\n defineProp(protoOf(ViewerObjectMock), 'isVisible', protoOf(ViewerObjectMock).k2l);\n defineProp(protoOf(ViewerObjectMock), 'hasRegisteredInputEvents', function () {\n return this.o2j();\n });\n protoOf(ClickEventComponent).z1k = get_serializable;\n protoOf(ClickEventComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ClickEventComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ClickEventComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ClickEventComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(MultiSelectionEnabledComponent).z1k = get_serializable;\n protoOf(MultiSelectionEnabledComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(MultiSelectionEnabledComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(MultiSelectionEnabledComponent), 'id', protoOf(MultiSelectionEnabledComponent).s1k);\n defineProp(protoOf(MultiSelectionEnabledComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(MultiSelectionEnabledComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(SelectableComponent).z1k = get_serializable;\n protoOf(SelectableComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(SelectableComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(SelectableComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(SelectableComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(SelectedComponent).z1k = get_serializable;\n protoOf(SelectedComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(SelectedComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(SelectedComponent), 'id', protoOf(SelectedComponent).s1k);\n defineProp(protoOf(SelectedComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(SelectedComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf($serializer_9).sv = typeParametersSerializers;\n defineProp(protoOf(ComponentDeserializerRegistry), 'componentSerializers', protoOf(ComponentDeserializerRegistry).m2m);\n protoOf(PreviouslySerializedIdComponent).z1k = get_serializable;\n protoOf(PreviouslySerializedIdComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(PreviouslySerializedIdComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(PreviouslySerializedIdComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(PreviouslySerializedIdComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(SceneReloadingComponent).z1k = get_serializable;\n protoOf(SceneReloadingComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(SceneReloadingComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(SceneReloadingComponent), 'id', protoOf(SceneReloadingComponent).s1k);\n defineProp(protoOf(SceneReloadingComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(SceneReloadingComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf($serializer_10).sv = typeParametersSerializers;\n protoOf($serializer_11).sv = typeParametersSerializers;\n protoOf(SerializableGuestConnectionsComponent).z1k = get_serializable_0;\n protoOf(SerializableGuestConnectionsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(SerializableGuestConnectionsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(SerializableGuestConnectionsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(SerializableGuestConnectionsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(Companion_85), 'id', protoOf(Companion_85).s1k);\n protoOf(UnserializableEntityComponent).z1k = get_serializable;\n protoOf(UnserializableEntityComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(UnserializableEntityComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(UnserializableEntityComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(UnserializableEntityComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf($serializer_12).sv = typeParametersSerializers;\n protoOf(InterceptingAssemblyPartCatalog).createCustomAssembly = createCustomAssembly;\n protoOf(InterceptingAssemblyPartCatalog).createCustomAssemblySpecification = createCustomAssemblySpecification;\n protoOf(InterceptingAssemblyPartCatalog).beforeDeserialize = beforeDeserialize;\n protoOf(InterceptingAssemblyPartCatalog).beforeParsingComponents = beforeParsingComponents;\n protoOf(InterceptingAssemblyPartCatalog).beforeBuildingEntities = beforeBuildingEntities;\n protoOf(InterceptingAssemblyPartCatalog).afterDeserializeComplete = afterDeserializeComplete;\n defineProp(protoOf(InterceptingAssemblyPartCatalog), 'thisClassIsGuaranteedToNotModifyOrQueryCoreState', function () {\n return this.a1m();\n });\n protoOf($serializer_13).sv = typeParametersSerializers;\n protoOf(SerializableEntityV13).addComponent = addComponent;\n defineProp(protoOf(SerializableEntityV13), 'id', function () {\n return this.s1k();\n }, function (value) {\n this.u2m(value);\n });\n defineProp(protoOf(SerializableEntityV13), 'ref', function () {\n return this.w2m();\n }, function (value) {\n this.v2m(value);\n });\n defineProp(protoOf(SerializableEntityV13), 'parent', function () {\n return this.z27();\n }, function (value) {\n this.x2m(value);\n });\n defineProp(protoOf(SerializableEntityV13), 'serializedComponents', function () {\n return this.z2m();\n }, function (value) {\n this.y2m(value);\n });\n defineProp(protoOf(SerializableEntityV13), 'components', function () {\n return this.j1m();\n }, function (value) {\n this.a2n(value);\n });\n protoOf($serializer_14).sv = typeParametersSerializers;\n protoOf(SerializableTreeV13).entitiesArray = entitiesArray;\n defineProp(protoOf(SerializableTreeV13), 'entities', function () {\n return this.o24();\n }, function (value) {\n this.s2o(value);\n });\n defineProp(protoOf(SerializableTreeV13), 'roots', function () {\n return this.l2n();\n });\n defineProp(protoOf(SerializableTreeV13), 'version', function () {\n return this.m2n();\n });\n defineProp(protoOf(AxisAlignedBox), 'center', protoOf(AxisAlignedBox).g2p);\n defineProp(protoOf(AxisAlignedBox), 'width', protoOf(AxisAlignedBox).u2b);\n defineProp(protoOf(AxisAlignedBox), 'height', protoOf(AxisAlignedBox).v2b);\n defineProp(protoOf(AxisAlignedBox), 'depth', protoOf(AxisAlignedBox).w2b);\n defineProp(protoOf(AxisAlignedBox), 'size', protoOf(AxisAlignedBox).n);\n defineProp(protoOf(ConvexPolyhedron), 'axisAlignedBoundingBox', function () {\n return this.m2p();\n });\n defineProp(protoOf(ConvexPolyhedron), 'unsignedNormals', function () {\n return this.n2p();\n });\n defineProp(protoOf(Cuboid), 'size', protoOf(Cuboid).n);\n protoOf(PolyhedronGroup).transform = transform;\n defineProp(protoOf(PolyhedronGroup), 'axisAlignedBoundingBox', function () {\n return this.m2p();\n });\n defineProp(protoOf(Companion_95), 'id', protoOf(Companion_95).s1k);\n protoOf(MovedToCandidateSnapPositionComponent).z1k = get_serializable;\n protoOf(MovedToCandidateSnapPositionComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(MovedToCandidateSnapPositionComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(MovedToCandidateSnapPositionComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(MovedToCandidateSnapPositionComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(MovedToValidSnapPositionComponent).z1k = get_serializable;\n protoOf(MovedToValidSnapPositionComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(MovedToValidSnapPositionComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(MovedToValidSnapPositionComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(MovedToValidSnapPositionComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(Companion_97), 'id', protoOf(Companion_97).s1k);\n protoOf(RestrictAllowedRequiredHostsComponent).z1k = get_serializable;\n protoOf(RestrictAllowedRequiredHostsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(RestrictAllowedRequiredHostsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(RestrictAllowedRequiredHostsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(RestrictAllowedRequiredHostsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(SnapActionCandidateImpl).t2q = get_isAlignmentSnap;\n protoOf(SnapActionCandidateImpl).h1i = get_isDone;\n defineProp(protoOf(SnapActionCandidateImpl), 'alignmentInitiatorCandidate', function () {\n return this.n2q();\n });\n defineProp(protoOf(SnapActionCandidateImpl), 'state', function () {\n return this.g1i();\n }, function (value) {\n this.f1i(value);\n });\n defineProp(protoOf(SnapActionCandidateImpl), 'movement', function () {\n return this.o2q();\n });\n defineProp(protoOf(SnapActionCandidateImpl), 'deltaRotation', function () {\n return this.p2q();\n });\n defineProp(protoOf(SnapActionCandidateImpl), 'priority', function () {\n return this.v1v();\n });\n defineProp(protoOf(SnapActionCandidateImpl), 'guestRootToGuestDeltaTransform', function () {\n return this.q2q();\n });\n defineProp(protoOf(SnapActionCandidateImpl), 'guestRootToGuestConnectorDeltaTransform', function () {\n return this.r2q();\n });\n defineProp(protoOf(SnapActionCandidateImpl), 'guestEndTransform', function () {\n return this.s2q();\n });\n defineProp(protoOf(SnapActionCandidateImpl), 'isAlignmentSnap', function () {\n return this.t2q();\n });\n defineProp(protoOf(SnapActionCandidateImpl), 'isDone', function () {\n return this.h1i();\n });\n defineProp(protoOf(SnapAction), 'isAlignmentSnap', function () {\n return this.t2q();\n });\n defineProp(protoOf(SnapAction), 'isDone', function () {\n return this.h1i();\n });\n protoOf(SnapActionInProgressComponent).z1k = get_serializable;\n protoOf(SnapActionInProgressComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(SnapActionInProgressComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(SnapActionInProgressComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(SnapActionInProgressComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(Companion_99), 'id', protoOf(Companion_99).s1k);\n protoOf(SnapCandidateComponent).z1k = get_serializable;\n protoOf(SnapCandidateComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(SnapCandidateComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(SnapCandidateComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(SnapCandidateComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(SnapRootComponent).z1k = get_serializable;\n protoOf(SnapRootComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(SnapRootComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(SnapRootComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(SnapRootComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(SnapSettings), 'includeAllSubConnectors', function () {\n return this.r2r();\n });\n defineProp(protoOf(SnapSettings), 'includeInternalConnectors', function () {\n return this.s2r();\n });\n defineProp(protoOf(SnapSettings), 'includeHostAssemblyParts', function () {\n return this.t2r();\n });\n defineProp(protoOf(SnapSettings), 'includeAlignmentConnectorsOutsideActivationDistance', function () {\n return this.u2r();\n });\n defineProp(protoOf(Companion_101), 'id', protoOf(Companion_101).s1k);\n protoOf(IsLoadingSnapshotComponent).z1k = get_serializable;\n defineProp(protoOf(IsLoadingSnapshotComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(IsLoadingSnapshotComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(IsLoadingSnapshotComponent), 'serializable', function () {\n return this.z1k();\n });\n protoOf(SnapshotIgnoreComponent).z1k = get_serializable;\n protoOf(SnapshotIgnoreComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(SnapshotIgnoreComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(SnapshotIgnoreComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(SnapshotIgnoreComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(Snapshot), 'allEntityStates', protoOf(Snapshot).g2s);\n protoOf(UpdatedFromSnapshotEventComponent).z1k = get_serializable;\n defineProp(protoOf(UpdatedFromSnapshotEventComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(UpdatedFromSnapshotEventComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(UpdatedFromSnapshotEventComponent), 'serializable', function () {\n return this.z1k();\n });\n protoOf(AlwaysHangDownComponent).z1k = get_serializable;\n protoOf(AlwaysHangDownComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AlwaysHangDownComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AlwaysHangDownComponent), 'id', protoOf(AlwaysHangDownComponent).s1k);\n defineProp(protoOf(AlwaysHangDownComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AlwaysHangDownComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf($serializer_15).sv = typeParametersSerializers;\n protoOf(LocalTransformComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(LocalTransformComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(LocalTransformComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(LocalTransformComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf($serializer_16).sv = typeParametersSerializers;\n protoOf(WorldTransformComponent).z1k = get_serializable_0;\n protoOf(WorldTransformComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(WorldTransformComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(WorldTransformComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(WorldTransformComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(ValidSnapActionCandidateOrErrors), 'valid', protoOf(ValidSnapActionCandidateOrErrors).t2t);\n defineProp(protoOf(ValidationResultType), 'name', protoOf(ValidationResultType).mb);\n defineProp(protoOf(ValidationResultType), 'ordinal', protoOf(ValidationResultType).nb);\n //endregion\n //region block: init\n Companion_instance = new Companion();\n Companion_instance_0 = new Companion_0();\n Companion_instance_1 = new Companion_1();\n Companion_instance_3 = new Companion_3();\n Companion_instance_4 = new Companion_4();\n ProductCatalogFunctions_instance = new ProductCatalogFunctions();\n Companion_instance_6 = new Companion_6();\n Companion_instance_8 = new Companion_8();\n Companion_instance_9 = new Companion_9();\n Companion_instance_10 = new Companion_10();\n ColliderUtils_instance = new ColliderUtils();\n Companion_instance_11 = new Companion_11();\n CollisionUtils_instance = new CollisionUtils();\n Companion_instance_12 = new Companion_12();\n Companion_instance_13 = new Companion_13();\n Companion_instance_14 = new Companion_14();\n ComponentIdSpan_instance = new ComponentIdSpan();\n ComponentIds_instance = new ComponentIds();\n ComponentUtils_instance = new ComponentUtils();\n Companion_instance_15 = new Companion_15();\n Companion_instance_16 = new Companion_16();\n ConnectionUtils_instance = new ConnectionUtils();\n Companion_instance_18 = new Companion_18();\n Companion_instance_19 = new Companion_19();\n Companion_instance_20 = new Companion_20();\n Companion_instance_21 = new Companion_21();\n ConnectorTagConstants_instance = new ConnectorTagConstants();\n ConnectorType_instance = new ConnectorType();\n ConnectorUtils_instance = new ConnectorUtils();\n Companion_instance_23 = new Companion_23();\n Companion_instance_24 = new Companion_24();\n RelativeConnectorRepositioner_instance = new RelativeConnectorRepositioner();\n Companion_instance_25 = new Companion_25();\n RotationDegreeOfFreedomImpostor_instance = new RotationDegreeOfFreedomImpostor();\n Companion_instance_27 = new Companion_27();\n Companion_instance_28 = new Companion_28();\n Companion_instance_29 = new Companion_29();\n Companion_instance_30 = new Companion_30();\n Companion_instance_31 = new Companion_31();\n Companion_instance_32 = new Companion_32();\n Companion_instance_33 = new Companion_33();\n Companion_instance_34 = new Companion_34();\n Companion_instance_35 = new Companion_35();\n Companion_instance_41 = new Companion_41();\n EntityGroupUtils_instance = new EntityGroupUtils();\n Companion_instance_44 = new Companion_44();\n Companion_instance_45 = new Companion_45();\n Companion_instance_46 = new Companion_46();\n Companion_instance_48 = new Companion_48();\n HierarchyUtils_instance = new HierarchyUtils();\n InSceneComponent_instance = new InSceneComponent();\n Companion_instance_49 = new Companion_49();\n SceneComponent_instance = new SceneComponent();\n Companion_instance_50 = new Companion_50();\n HistoryEvent_instance = new HistoryEvent();\n Companion_instance_51 = new Companion_51();\n LogLevelJavascriptImpostor_instance = new LogLevelJavascriptImpostor();\n Companion_instance_52 = new Companion_52();\n Companion_instance_53 = new Companion_53();\n Companion_instance_54 = new Companion_54();\n Companion_instance_55 = new Companion_55();\n Companion_instance_61 = new Companion_61();\n ProductUtils_instance = new ProductUtils();\n ProppingComponent_instance = new ProppingComponent();\n Companion_instance_62 = new Companion_62();\n Companion_instance_63 = new Companion_63();\n RaycastUtils_instance = new RaycastUtils();\n Companion_instance_64 = new Companion_64();\n Companion_instance_65 = new Companion_65();\n Companion_instance_67 = new Companion_67();\n Companion_instance_68 = new Companion_68();\n Companion_instance_69 = new Companion_69();\n Companion_instance_70 = new Companion_70();\n RenderedComponent_instance = new RenderedComponent();\n Companion_instance_71 = new Companion_71();\n Companion_instance_72 = new Companion_72();\n Companion_instance_73 = new Companion_73();\n Companion_instance_75 = new Companion_75();\n Companion_instance_76 = new Companion_76();\n Companion_instance_78 = new Companion_78();\n MultiSelectionEnabledComponent_instance = new MultiSelectionEnabledComponent();\n Companion_instance_79 = new Companion_79();\n SelectedComponent_instance = new SelectedComponent();\n Companion_instance_82 = new Companion_82();\n SceneReloadingComponent_instance = new SceneReloadingComponent();\n Companion_instance_83 = new Companion_83();\n Companion_instance_85 = new Companion_85();\n Companion_instance_86 = new Companion_86();\n Companion_instance_87 = new Companion_87();\n Companion_instance_95 = new Companion_95();\n Companion_instance_96 = new Companion_96();\n Companion_instance_97 = new Companion_97();\n SelectAll_instance = new SelectAll();\n SortByPriorityInActivationDistanceThenDistance_instance = new SortByPriorityInActivationDistanceThenDistance();\n SortByPriorityThenDistance_instance = new SortByPriorityThenDistance();\n SortByDistance_instance = new SortByDistance();\n Companion_instance_98 = new Companion_98();\n Companion_instance_99 = new Companion_99();\n Companion_instance_100 = new Companion_100();\n SnapUtils_instance = new SnapUtils();\n Companion_instance_101 = new Companion_101();\n Companion_instance_102 = new Companion_102();\n Companion_instance_104 = new Companion_104();\n ApiSystemIds_instance = new ApiSystemIds();\n AlwaysHangDownComponent_instance = new AlwaysHangDownComponent();\n Companion_instance_105 = new Companion_105();\n Companion_instance_107 = new Companion_107();\n TransformUtils_instance = new TransformUtils();\n Companion_instance_108 = new Companion_108();\n UrlHelper_instance = new UrlHelper();\n Companion_instance_110 = new Companion_110();\n Companion_instance_111 = new Companion_111();\n Companion_instance_112 = new Companion_112();\n Companion_instance_113 = new Companion_113();\n Companion_instance_114 = new Companion_114();\n //endregion\n //region block: exports\n function $jsExportAll$(_) {\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$action = $com$ikea$core.action || ($com$ikea$core.action = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$action = $com$ikea$core.action || ($com$ikea$core.action = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$action = $com$ikea$core.action || ($com$ikea$core.action = {});\n $com$ikea$core$action.ActionState = ActionState;\n $com$ikea$core$action.ActionState.values = values;\n $com$ikea$core$action.ActionState.valueOf = valueOf;\n defineProp($com$ikea$core$action.ActionState, 'NOT_DONE', ActionState_NOT_DONE_getInstance);\n defineProp($com$ikea$core$action.ActionState, 'DONE', ActionState_DONE_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$api = $com$ikea$core.api || ($com$ikea$core.api = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$api = $com$ikea$core.api || ($com$ikea$core.api = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$api = $com$ikea$core.api || ($com$ikea$core.api = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$api = $com$ikea$core.api || ($com$ikea$core.api = {});\n $com$ikea$core$api.CoreServices = CoreServices;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$api = $com$ikea$core.api || ($com$ikea$core.api = {});\n $com$ikea$core$api.MissingCriticalModuleException = MissingCriticalModuleException;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$assemblies = $com$ikea$core.assemblies || ($com$ikea$core.assemblies = {});\n $com$ikea$core$assemblies.AddPartAction = AddPartAction;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$assemblies = $com$ikea$core.assemblies || ($com$ikea$core.assemblies = {});\n $com$ikea$core$assemblies.AssemblyBuilder = AssemblyBuilder;\n defineProp($com$ikea$core$assemblies.AssemblyBuilder, 'Companion', Companion_getInstance_0);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$assemblies = $com$ikea$core.assemblies || ($com$ikea$core.assemblies = {});\n $com$ikea$core$assemblies.AssemblyPart = AssemblyPart;\n $com$ikea$core$assemblies.AssemblyPartSnapInfo = AssemblyPartSnapInfo;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$assemblies = $com$ikea$core.assemblies || ($com$ikea$core.assemblies = {});\n $com$ikea$core$assemblies.AssemblyPartConnectorInfo = AssemblyPartConnectorInfo;\n defineProp($com$ikea$core$assemblies.AssemblyPartConnectorInfo, 'Companion', Companion_getInstance_1);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$assemblies = $com$ikea$core.assemblies || ($com$ikea$core.assemblies = {});\n $com$ikea$core$assemblies.AssemblyPartIdsComponent = AssemblyPartIdsComponent;\n defineProp($com$ikea$core$assemblies.AssemblyPartIdsComponent, 'Companion', Companion_getInstance_2);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$assemblies = $com$ikea$core.assemblies || ($com$ikea$core.assemblies = {});\n $com$ikea$core$assemblies.AssemblyStructureComponent = AssemblyStructureComponent;\n defineProp($com$ikea$core$assemblies.AssemblyStructureComponent, 'Companion', Companion_getInstance_4);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$assemblies = $com$ikea$core.assemblies || ($com$ikea$core.assemblies = {});\n $com$ikea$core$assemblies.PartPair = PartPair;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$assemblies = $com$ikea$core.assemblies || ($com$ikea$core.assemblies = {});\n $com$ikea$core$assemblies.ProductPartComponent = ProductPartComponent;\n defineProp($com$ikea$core$assemblies.ProductPartComponent, 'Companion', Companion_getInstance_6);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$assemblies = $com$ikea$core.assemblies || ($com$ikea$core.assemblies = {});\n $com$ikea$core$assemblies.RemovePartAction = RemovePartAction;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$catalog = $com$ikea$core.catalog || ($com$ikea$core.catalog = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$catalog = $com$ikea$core.catalog || ($com$ikea$core.catalog = {});\n defineProp($com$ikea$core$catalog, 'ProductCatalogFunctions', ProductCatalogFunctions_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$catalog = $com$ikea$core.catalog || ($com$ikea$core.catalog = {});\n $com$ikea$core$catalog.ProductComponent = ProductComponent;\n defineProp($com$ikea$core$catalog.ProductComponent, 'Companion', Companion_getInstance_7);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$catalog = $com$ikea$core.catalog || ($com$ikea$core.catalog = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$catalog = $com$ikea$core.catalog || ($com$ikea$core.catalog = {});\n $com$ikea$core$catalog.ProductSpecification = ProductSpecification;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$catalog = $com$ikea$core.catalog || ($com$ikea$core.catalog = {});\n $com$ikea$core$catalog.ProductStructureBuilder = ProductStructureBuilder;\n defineProp($com$ikea$core$catalog.ProductStructureBuilder, 'Companion', Companion_getInstance_8);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$catalog = $com$ikea$core.catalog || ($com$ikea$core.catalog = {});\n $com$ikea$core$catalog.ProductStructureComponent = ProductStructureComponent;\n defineProp($com$ikea$core$catalog.ProductStructureComponent, 'Companion', Companion_getInstance_9);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$catalog = $com$ikea$core.catalog || ($com$ikea$core.catalog = {});\n $com$ikea$core$catalog.ProductStructureConnection = ProductStructureConnection;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$catalog = $com$ikea$core.catalog || ($com$ikea$core.catalog = {});\n $com$ikea$core$catalog.ProductStructureItem = ProductStructureItem;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$collections = $com$ikea$core.collections || ($com$ikea$core.collections = {});\n $com$ikea$core$collections.CircularBuffer = CircularBuffer;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$collision = $com$ikea$core.collision || ($com$ikea$core.collision = {});\n $com$ikea$core$collision.ColliderComponent = ColliderComponent;\n defineProp($com$ikea$core$collision.ColliderComponent, 'Companion', Companion_getInstance_10);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$collision = $com$ikea$core.collision || ($com$ikea$core.collision = {});\n $com$ikea$core$collision.ColliderShapeComponent = ColliderShapeComponent;\n defineProp($com$ikea$core$collision.ColliderShapeComponent, 'Companion', Companion_getInstance_11);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$collision = $com$ikea$core.collision || ($com$ikea$core.collision = {});\n defineProp($com$ikea$core$collision, 'ColliderUtils', ColliderUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$collision = $com$ikea$core.collision || ($com$ikea$core.collision = {});\n $com$ikea$core$collision.Collision = Collision;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$collision = $com$ikea$core.collision || ($com$ikea$core.collision = {});\n $com$ikea$core$collision.CollisionConstants = CollisionConstants;\n defineProp($com$ikea$core$collision.CollisionConstants, 'Companion', Companion_getInstance_12);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$collision = $com$ikea$core.collision || ($com$ikea$core.collision = {});\n defineProp($com$ikea$core$collision, 'CollisionUtils', CollisionUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$collision = $com$ikea$core.collision || ($com$ikea$core.collision = {});\n $com$ikea$core$collision.CollisionValidation = CollisionValidation;\n defineProp($com$ikea$core$collision.CollisionValidation, 'Companion', Companion_getInstance_13);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$collision = $com$ikea$core.collision || ($com$ikea$core.collision = {});\n $com$ikea$core$collision.CollisionValidationResult = CollisionValidationResult;\n defineProp($com$ikea$core$collision.CollisionValidationResult, 'Companion', Companion_getInstance_14);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$collision = $com$ikea$core.collision || ($com$ikea$core.collision = {});\n $com$ikea$core$collision.WorldColliderUpdateSystem = WorldColliderUpdateSystem;\n defineProp($com$ikea$core$collision.WorldColliderUpdateSystem, 'Companion', Companion_getInstance_15);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$component = $com$ikea$core.component || ($com$ikea$core.component = {});\n defineProp($com$ikea$core$component, 'ComponentIdSpan', ComponentIdSpan_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$component = $com$ikea$core.component || ($com$ikea$core.component = {});\n defineProp($com$ikea$core$component, 'ComponentIds', ComponentIds_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$component = $com$ikea$core.component || ($com$ikea$core.component = {});\n defineProp($com$ikea$core$component, 'ComponentUtils', ComponentUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connections = $com$ikea$core.connections || ($com$ikea$core.connections = {});\n $com$ikea$core$connections.AlignmentConnection = AlignmentConnection;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connections = $com$ikea$core.connections || ($com$ikea$core.connections = {});\n $com$ikea$core$connections.ChildConnectionValidation = ChildConnectionValidation;\n defineProp($com$ikea$core$connections.ChildConnectionValidation, 'Companion', Companion_getInstance_16);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connections = $com$ikea$core.connections || ($com$ikea$core.connections = {});\n $com$ikea$core$connections.Connection = Connection;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connections = $com$ikea$core.connections || ($com$ikea$core.connections = {});\n $com$ikea$core$connections.ConnectionRootComponent = ConnectionRootComponent;\n defineProp($com$ikea$core$connections.ConnectionRootComponent, 'Companion', Companion_getInstance_17);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connections = $com$ikea$core.connections || ($com$ikea$core.connections = {});\n defineProp($com$ikea$core$connections, 'ConnectionUtils', ConnectionUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connections = $com$ikea$core.connections || ($com$ikea$core.connections = {});\n $com$ikea$core$connections.GuestConnectionsComponent = GuestConnectionsComponent;\n defineProp($com$ikea$core$connections.GuestConnectionsComponent, 'Companion', Companion_getInstance_18);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connections = $com$ikea$core.connections || ($com$ikea$core.connections = {});\n $com$ikea$core$connections.HostConnectionsComponent = HostConnectionsComponent;\n defineProp($com$ikea$core$connections.HostConnectionsComponent, 'Companion', Companion_getInstance_19);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connections = $com$ikea$core.connections || ($com$ikea$core.connections = {});\n $com$ikea$core$connections.TemporarilyPauseConnectionParentingComponent = TemporarilyPauseConnectionParentingComponent;\n defineProp($com$ikea$core$connections.TemporarilyPauseConnectionParentingComponent, 'Companion', Companion_getInstance_20);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connections = $com$ikea$core.connections || ($com$ikea$core.connections = {});\n $com$ikea$core$connections.UpdateHostConnectionsSystem = UpdateHostConnectionsSystem;\n defineProp($com$ikea$core$connections.UpdateHostConnectionsSystem, 'Companion', Companion_getInstance_21);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connections = $com$ikea$core.connections || ($com$ikea$core.connections = {});\n $com$ikea$core$connections.closestOnEdge = closestOnEdge;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.Connector = Connector;\n defineProp($com$ikea$core$connectors.Connector, 'Companion', Companion_getInstance_22);\n $com$ikea$core$connectors.allSubConnectors$factory = allSubConnectors$factory;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n defineProp($com$ikea$core$connectors, 'ConnectorTagConstants', ConnectorTagConstants_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n defineProp($com$ikea$core$connectors, 'ConnectorType', ConnectorType_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n defineProp($com$ikea$core$connectors, 'ConnectorUtils', ConnectorUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.ConnectorsComponent = ConnectorsComponent;\n defineProp($com$ikea$core$connectors.ConnectorsComponent, 'Companion', Companion_getInstance_23);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.DisableConnectorsSystem = DisableConnectorsSystem;\n defineProp($com$ikea$core$connectors.DisableConnectorsSystem, 'Companion', Companion_getInstance_24);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.DisabledConnectorsComponent = DisabledConnectorsComponent;\n defineProp($com$ikea$core$connectors.DisabledConnectorsComponent, 'Companion', Companion_getInstance_25);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.EdgeConnector = EdgeConnector;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.PointConnector = PointConnector;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.PointSeriesConnector = PointSeriesConnector;\n $com$ikea$core$connectors.direction$factory = direction$factory;\n $com$ikea$core$connectors.allSubConnectors$factory = allSubConnectors$factory_0;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.PointSeriesSubConnector = PointSeriesSubConnector;\n $com$ikea$core$connectors.series$factory = series$factory;\n $com$ikea$core$connectors.series$factory = series$factory_0;\n $com$ikea$core$connectors.series$factory = series$factory_1;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.RelativeConnectorData = RelativeConnectorData;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n defineProp($com$ikea$core$connectors, 'RelativeConnectorRepositioner', RelativeConnectorRepositioner_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.RelativeConnectorsComponent = RelativeConnectorsComponent;\n defineProp($com$ikea$core$connectors.RelativeConnectorsComponent, 'Companion', Companion_getInstance_26);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.RotationDegreeOfFreedom = RotationDegreeOfFreedom;\n $com$ikea$core$connectors.RotationDegreeOfFreedom.values = values_0;\n $com$ikea$core$connectors.RotationDegreeOfFreedom.valueOf = valueOf_0;\n defineProp($com$ikea$core$connectors.RotationDegreeOfFreedom, 'NONE', RotationDegreeOfFreedom_NONE_getInstance);\n defineProp($com$ikea$core$connectors.RotationDegreeOfFreedom, 'ONE', RotationDegreeOfFreedom_ONE_getInstance);\n defineProp($com$ikea$core$connectors, 'RotationDegreeOfFreedomImpostor', RotationDegreeOfFreedomImpostor_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$connectors = $com$ikea$core.connectors || ($com$ikea$core.connectors = {});\n $com$ikea$core$connectors.SurfaceConnector = SurfaceConnector;\n defineProp($com$ikea$core$connectors.SurfaceConnector, 'Companion', Companion_getInstance_27);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$debugutils = $com$ikea$core.debugutils || ($com$ikea$core.debugutils = {});\n $com$ikea$core$debugutils.DebugLine = DebugLine;\n $com$ikea$core$debugutils.DebugLinesComponent = DebugLinesComponent;\n defineProp($com$ikea$core$debugutils.DebugLinesComponent, 'Companion', Companion_getInstance_28);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$debugutils = $com$ikea$core.debugutils || ($com$ikea$core.debugutils = {});\n $com$ikea$core$debugutils.DebugSurfacesComponent = DebugSurfacesComponent;\n defineProp($com$ikea$core$debugutils.DebugSurfacesComponent, 'Companion', Companion_getInstance_29);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$dragging = $com$ikea$core.dragging || ($com$ikea$core.dragging = {});\n $com$ikea$core$dragging.DragSurfacesComponent = DragSurfacesComponent;\n defineProp($com$ikea$core$dragging.DragSurfacesComponent, 'Companion', Companion_getInstance_30);\n $com$ikea$core$dragging.DragSurface = DragSurface;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$dragging = $com$ikea$core.dragging || ($com$ikea$core.dragging = {});\n $com$ikea$core$dragging.DraggableComponent = DraggableComponent;\n defineProp($com$ikea$core$dragging.DraggableComponent, 'Companion', Companion_getInstance_31);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$dragging = $com$ikea$core.dragging || ($com$ikea$core.dragging = {});\n $com$ikea$core$dragging.SomethingIsDraggedComponent = SomethingIsDraggedComponent;\n defineProp($com$ikea$core$dragging.SomethingIsDraggedComponent, 'Companion', Companion_getInstance_32);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$dragging = $com$ikea$core.dragging || ($com$ikea$core.dragging = {});\n $com$ikea$core$dragging.DragType = DragType;\n $com$ikea$core$dragging.DragType.values = values_1;\n $com$ikea$core$dragging.DragType.valueOf = valueOf_1;\n defineProp($com$ikea$core$dragging.DragType, 'DragStart', DragType_DragStart_getInstance);\n defineProp($com$ikea$core$dragging.DragType, 'DragMove', DragType_DragMove_getInstance);\n defineProp($com$ikea$core$dragging.DragType, 'DragEnd', DragType_DragEnd_getInstance);\n $com$ikea$core$dragging.ViewerDragEventComponent = ViewerDragEventComponent;\n defineProp($com$ikea$core$dragging.ViewerDragEventComponent, 'Companion', Companion_getInstance_33);\n $com$ikea$core$dragging.rayFromCameraToDragEnd$factory = rayFromCameraToDragEnd$factory;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$dragging = $com$ikea$core.dragging || ($com$ikea$core.dragging = {});\n $com$ikea$core$dragging.WorldDragSurfaceUpdateSystem = WorldDragSurfaceUpdateSystem;\n defineProp($com$ikea$core$dragging.WorldDragSurfaceUpdateSystem, 'Companion', Companion_getInstance_34);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$dragging = $com$ikea$core.dragging || ($com$ikea$core.dragging = {});\n $com$ikea$core$dragging.WorldDragSurfacesComponent = WorldDragSurfacesComponent;\n defineProp($com$ikea$core$dragging.WorldDragSurfacesComponent, 'Companion', Companion_getInstance_35);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$dragging = $com$ikea$core.dragging || ($com$ikea$core.dragging = {});\n $com$ikea$core$dragging.WorldSpaceDragEventComponent = WorldSpaceDragEventComponent;\n defineProp($com$ikea$core$dragging.WorldSpaceDragEventComponent, 'Companion', Companion_getInstance_36);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$ecs = $com$ikea$core.ecs || ($com$ikea$core.ecs = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$ecs = $com$ikea$core.ecs || ($com$ikea$core.ecs = {});\n $com$ikea$core$ecs.ComponentHolder = ComponentHolder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$ecs = $com$ikea$core.ecs || ($com$ikea$core.ecs = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$ecs = $com$ikea$core.ecs || ($com$ikea$core.ecs = {});\n $com$ikea$core$ecs.Entity = Entity;\n defineProp($com$ikea$core$ecs.Entity, 'Companion', Companion_getInstance_37);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$ecs = $com$ikea$core.ecs || ($com$ikea$core.ecs = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$ecs = $com$ikea$core.ecs || ($com$ikea$core.ecs = {});\n $com$ikea$core$ecs.EntityManagerImpl = EntityManagerImpl;\n defineProp($com$ikea$core$ecs.EntityManagerImpl, 'Companion', Companion_getInstance_38);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$ecs = $com$ikea$core.ecs || ($com$ikea$core.ecs = {});\n $com$ikea$core$ecs.EntityManagerWatcherList = EntityManagerWatcherList;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$ecs = $com$ikea$core.ecs || ($com$ikea$core.ecs = {});\n $com$ikea$core$ecs.EcsSystemImpl = EcsSystemImpl;\n $com$ikea$core$ecs.ComponentListenerImpl = ComponentListenerImpl;\n $com$ikea$core$ecs.SystemBase = SystemBase;\n defineProp($com$ikea$core$ecs.SystemBase, 'Companion', Companion_getInstance_39);\n $com$ikea$core$ecs.SystemBase2 = SystemBase2;\n $com$ikea$core$ecs.SystemBase3 = SystemBase3;\n $com$ikea$core$ecs.SystemBase4 = SystemBase4;\n $com$ikea$core$ecs.SystemBase5 = SystemBase5;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$ecs = $com$ikea$core.ecs || ($com$ikea$core.ecs = {});\n defineProp($com$ikea$core$ecs, 'SystemGraphHelper', SystemGraphHelper_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$groups = $com$ikea$core.groups || ($com$ikea$core.groups = {});\n $com$ikea$core$groups.AutomaticGroupBuilderSystem = AutomaticGroupBuilderSystem;\n defineProp($com$ikea$core$groups.AutomaticGroupBuilderSystem, 'Companion', Companion_getInstance_40);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$groups = $com$ikea$core.groups || ($com$ikea$core.groups = {});\n $com$ikea$core$groups.AutomaticGroupComponent = AutomaticGroupComponent;\n defineProp($com$ikea$core$groups.AutomaticGroupComponent, 'Companion', Companion_getInstance_41);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$groups = $com$ikea$core.groups || ($com$ikea$core.groups = {});\n $com$ikea$core$groups.AutomaticGroupIdCountComponent = AutomaticGroupIdCountComponent;\n defineProp($com$ikea$core$groups.AutomaticGroupIdCountComponent, 'Companion', Companion_getInstance_42);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$groups = $com$ikea$core.groups || ($com$ikea$core.groups = {});\n defineProp($com$ikea$core$groups, 'EntityGroupUtils', EntityGroupUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$groups = $com$ikea$core.groups || ($com$ikea$core.groups = {});\n $com$ikea$core$groups.ManualEntityGroupBuilderService = ManualEntityGroupBuilderService;\n defineProp($com$ikea$core$groups.ManualEntityGroupBuilderService, 'Companion', Companion_getInstance_43);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$groups = $com$ikea$core.groups || ($com$ikea$core.groups = {});\n $com$ikea$core$groups.ManualGroupComponent = ManualGroupComponent;\n defineProp($com$ikea$core$groups.ManualGroupComponent, 'Companion', Companion_getInstance_44);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$groups = $com$ikea$core.groups || ($com$ikea$core.groups = {});\n $com$ikea$core$groups.ManualGroupConnectorValidation = ManualGroupConnectorValidation;\n defineProp($com$ikea$core$groups.ManualGroupConnectorValidation, 'Companion', Companion_getInstance_45);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$groups = $com$ikea$core.groups || ($com$ikea$core.groups = {});\n $com$ikea$core$groups.ManualGroupIdCountComponent = ManualGroupIdCountComponent;\n defineProp($com$ikea$core$groups.ManualGroupIdCountComponent, 'Companion', Companion_getInstance_46);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$groups = $com$ikea$core.groups || ($com$ikea$core.groups = {});\n defineProp($com$ikea$core$groups, 'StaticComponent', StaticComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n $com$ikea$core$hierarchies.ChildComponent = ChildComponent;\n defineProp($com$ikea$core$hierarchies.ChildComponent, 'Companion', Companion_getInstance_47);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n $com$ikea$core$hierarchies.ConnectionParentingSystem = ConnectionParentingSystem;\n defineProp($com$ikea$core$hierarchies.ConnectionParentingSystem, 'Companion', Companion_getInstance_48);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n $com$ikea$core$hierarchies.HierarchySystem = HierarchySystem;\n defineProp($com$ikea$core$hierarchies.HierarchySystem, 'Companion', Companion_getInstance_49);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n defineProp($com$ikea$core$hierarchies, 'HierarchyUtils', HierarchyUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n defineProp($com$ikea$core$hierarchies, 'InSceneComponent', InSceneComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n $com$ikea$core$hierarchies.ParentComponent = ParentComponent;\n $com$ikea$core$hierarchies.ParentComponent.generateHierarchy$default = generateHierarchy$default;\n defineProp($com$ikea$core$hierarchies.ParentComponent, 'Companion', Companion_getInstance_50);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n defineProp($com$ikea$core$hierarchies, 'SceneComponent', SceneComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n $com$ikea$core$hierarchies.SceneGraphSystem = SceneGraphSystem;\n defineProp($com$ikea$core$hierarchies.SceneGraphSystem, 'Companion', Companion_getInstance_51);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$history = $com$ikea$core.history || ($com$ikea$core.history = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$history = $com$ikea$core.history || ($com$ikea$core.history = {});\n $com$ikea$core$history.HistoryEventType = HistoryEventType;\n $com$ikea$core$history.HistoryEventType.values = values_2;\n $com$ikea$core$history.HistoryEventType.valueOf = valueOf_2;\n defineProp($com$ikea$core$history.HistoryEventType, 'TAKE_SNAPSHOT', HistoryEventType_TAKE_SNAPSHOT_getInstance);\n defineProp($com$ikea$core$history.HistoryEventType, 'UNDO', HistoryEventType_UNDO_getInstance);\n defineProp($com$ikea$core$history.HistoryEventType, 'REDO', HistoryEventType_REDO_getInstance);\n defineProp($com$ikea$core$history.HistoryEventType, 'CLEAR', HistoryEventType_CLEAR_getInstance);\n defineProp($com$ikea$core$history.HistoryEventType, 'DISCARD_SNAPSHOT', HistoryEventType_DISCARD_SNAPSHOT_getInstance);\n defineProp($com$ikea$core$history, 'HistoryEvent', HistoryEvent_getInstance);\n $com$ikea$core$history.HistoryChangedEventComponent = HistoryChangedEventComponent;\n defineProp($com$ikea$core$history.HistoryChangedEventComponent, 'Companion', Companion_getInstance_52);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$history = $com$ikea$core.history || ($com$ikea$core.history = {});\n $com$ikea$core$history.HistoryImpl = HistoryImpl;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$logging = $com$ikea$core.logging || ($com$ikea$core.logging = {});\n $com$ikea$core$logging.LogLevel = LogLevel;\n $com$ikea$core$logging.LogLevel.values = values_3;\n $com$ikea$core$logging.LogLevel.valueOf = valueOf_3;\n defineProp($com$ikea$core$logging.LogLevel, 'DEBUG', LogLevel_DEBUG_getInstance);\n defineProp($com$ikea$core$logging.LogLevel, 'INFO', LogLevel_INFO_getInstance);\n defineProp($com$ikea$core$logging.LogLevel, 'WARN', LogLevel_WARN_getInstance);\n defineProp($com$ikea$core$logging.LogLevel, 'ERROR', LogLevel_ERROR_getInstance);\n defineProp($com$ikea$core$logging.LogLevel, 'NONE', LogLevel_NONE_getInstance);\n defineProp($com$ikea$core$logging, 'LogLevelJavascriptImpostor', LogLevelJavascriptImpostor_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$logging = $com$ikea$core.logging || ($com$ikea$core.logging = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$logging = $com$ikea$core.logging || ($com$ikea$core.logging = {});\n $com$ikea$core$logging.LoggerImpl = LoggerImpl;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$logging = $com$ikea$core.logging || ($com$ikea$core.logging = {});\n $com$ikea$core$logging.MockLogger = MockLogger;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.AxisAngle = AxisAngle;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.Degrees = Degrees;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.DualDouble = DualDouble;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.Margin = Margin;\n defineProp($com$ikea$core$math.Margin, 'Companion', Companion_getInstance_53);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n defineProp($com$ikea$core$math, 'MathUtils', MathUtils_getInstance);\n MathUtils.prototype.Axis = Axis;\n MathUtils.prototype.Axis.values = values_4;\n MathUtils.prototype.Axis.valueOf = valueOf_4;\n defineProp(MathUtils.prototype.Axis, 'X', Axis_X_getInstance);\n defineProp(MathUtils.prototype.Axis, 'Y', Axis_Y_getInstance);\n defineProp(MathUtils.prototype.Axis, 'Z', Axis_Z_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.ModelTransform = ModelTransform;\n defineProp($com$ikea$core$math.ModelTransform, 'Companion', Companion_getInstance_54);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.Plane = Plane;\n defineProp($com$ikea$core$math.Plane, 'Companion', Companion_getInstance_55);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.Polygon = Polygon;\n defineProp($com$ikea$core$math.Polygon, 'Companion', Companion_getInstance_56);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.Quaternion = Quaternion;\n $com$ikea$core$math.Quaternion.QuaternionFromInts = QuaternionFromInts;\n $com$ikea$core$math.Quaternion.QuaternionFromDouble = QuaternionFromDouble;\n defineProp($com$ikea$core$math.Quaternion, 'Companion', Companion_getInstance_57);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.Radians = Radians;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.RelativeBoxOffset = RelativeBoxOffset;\n $com$ikea$core$math.RelationOriginAlongX = RelationOriginAlongX;\n $com$ikea$core$math.RelationOriginAlongX.values = values_5;\n $com$ikea$core$math.RelationOriginAlongX.valueOf = valueOf_5;\n defineProp($com$ikea$core$math.RelationOriginAlongX, 'LEFT', RelationOriginAlongX_LEFT_getInstance);\n defineProp($com$ikea$core$math.RelationOriginAlongX, 'CENTER', RelationOriginAlongX_CENTER_getInstance);\n defineProp($com$ikea$core$math.RelationOriginAlongX, 'RIGHT', RelationOriginAlongX_RIGHT_getInstance);\n defineProp($com$ikea$core$math, 'RelationOriginAlongXImpostor', RelationOriginAlongXImpostor_getInstance);\n $com$ikea$core$math.RelationOriginAlongY = RelationOriginAlongY;\n $com$ikea$core$math.RelationOriginAlongY.values = values_6;\n $com$ikea$core$math.RelationOriginAlongY.valueOf = valueOf_6;\n defineProp($com$ikea$core$math.RelationOriginAlongY, 'BOTTOM', RelationOriginAlongY_BOTTOM_getInstance);\n defineProp($com$ikea$core$math.RelationOriginAlongY, 'CENTER', RelationOriginAlongY_CENTER_getInstance);\n defineProp($com$ikea$core$math.RelationOriginAlongY, 'TOP', RelationOriginAlongY_TOP_getInstance);\n defineProp($com$ikea$core$math, 'RelationOriginAlongYImpostor', RelationOriginAlongYImpostor_getInstance);\n $com$ikea$core$math.RelationOriginAlongZ = RelationOriginAlongZ;\n $com$ikea$core$math.RelationOriginAlongZ.values = values_7;\n $com$ikea$core$math.RelationOriginAlongZ.valueOf = valueOf_7;\n defineProp($com$ikea$core$math.RelationOriginAlongZ, 'BACK', RelationOriginAlongZ_BACK_getInstance);\n defineProp($com$ikea$core$math.RelationOriginAlongZ, 'CENTER', RelationOriginAlongZ_CENTER_getInstance);\n defineProp($com$ikea$core$math.RelationOriginAlongZ, 'FRONT', RelationOriginAlongZ_FRONT_getInstance);\n defineProp($com$ikea$core$math, 'RelationOriginAlongZImpostor', RelationOriginAlongZImpostor_getInstance);\n $com$ikea$core$math.RelationOrigin = RelationOrigin;\n defineProp($com$ikea$core$math.RelationOrigin, 'Companion', Companion_getInstance_58);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.Size = Size;\n $com$ikea$core$math.Size.SizeFromVector = SizeFromVector;\n defineProp($com$ikea$core$math.Size, 'Companion', Companion_getInstance_59);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.Transform = Transform;\n defineProp($com$ikea$core$math.Transform, 'Companion', Companion_getInstance_60);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.Vector = Vector;\n $com$ikea$core$math.Vector.__VectorIntConstructorKotlin = __VectorIntConstructorKotlin;\n defineProp($com$ikea$core$math.Vector, 'Companion', Companion_getInstance_61);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$math = $com$ikea$core.math || ($com$ikea$core.math = {});\n $com$ikea$core$math.times = times;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$measuring = $com$ikea$core.measuring || ($com$ikea$core.measuring = {});\n $com$ikea$core$measuring.InnerMeasurement = InnerMeasurement;\n defineProp($com$ikea$core$measuring, 'MeasurementUtils', MeasurementUtils_getInstance);\n $com$ikea$core$measuring.distance$factory = distance$factory;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$nothing = $com$ikea$core.nothing || ($com$ikea$core.nothing = {});\n defineProp($com$ikea$core$nothing, 'nothing', get_nothing);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$products = $com$ikea$core.products || ($com$ikea$core.products = {});\n $com$ikea$core$products.DisplayNameComponent = DisplayNameComponent;\n defineProp($com$ikea$core$products.DisplayNameComponent, 'Companion', Companion_getInstance_62);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$products = $com$ikea$core.products || ($com$ikea$core.products = {});\n defineProp($com$ikea$core$products, 'ProductUtils', ProductUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$products = $com$ikea$core.products || ($com$ikea$core.products = {});\n defineProp($com$ikea$core$products, 'ProppingComponent', ProppingComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$products = $com$ikea$core.products || ($com$ikea$core.products = {});\n $com$ikea$core$products.TemplateDataComponent = TemplateDataComponent;\n defineProp($com$ikea$core$products.TemplateDataComponent, 'Companion', Companion_getInstance_63);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$raycasting = $com$ikea$core.raycasting || ($com$ikea$core.raycasting = {});\n $com$ikea$core$raycasting.Ray = Ray;\n defineProp($com$ikea$core$raycasting.Ray, 'Companion', Companion_getInstance_64);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$raycasting = $com$ikea$core.raycasting || ($com$ikea$core.raycasting = {});\n $com$ikea$core$raycasting.RaycastHit = RaycastHit;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$raycasting = $com$ikea$core.raycasting || ($com$ikea$core.raycasting = {});\n $com$ikea$core$raycasting.RaycastResult = RaycastResult;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$raycasting = $com$ikea$core.raycasting || ($com$ikea$core.raycasting = {});\n defineProp($com$ikea$core$raycasting, 'RaycastUtils', RaycastUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$raycasting = $com$ikea$core.raycasting || ($com$ikea$core.raycasting = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.LoadedModelInfoComponent = LoadedModelInfoComponent;\n defineProp($com$ikea$core$rendering.LoadedModelInfoComponent, 'Companion', Companion_getInstance_65);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.ModelInfoComponent = ModelInfoComponent;\n defineProp($com$ikea$core$rendering.ModelInfoComponent, 'Companion', Companion_getInstance_66);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.ModelLoaderSystem = ModelLoaderSystem;\n defineProp($com$ikea$core$rendering.ModelLoaderSystem, 'Companion', Companion_getInstance_67);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.ModelTransformComponent = ModelTransformComponent;\n defineProp($com$ikea$core$rendering.ModelTransformComponent, 'Companion', Companion_getInstance_68);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n defineProp($com$ikea$core$rendering, 'ModelUtils', ModelUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.OutlineableComponent = OutlineableComponent;\n defineProp($com$ikea$core$rendering.OutlineableComponent, 'Companion', Companion_getInstance_69);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.RenderSystem = RenderSystem;\n defineProp($com$ikea$core$rendering.RenderSystem, 'Companion', Companion_getInstance_71);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n defineProp($com$ikea$core$rendering, 'RenderedComponent', RenderedComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.ViewerComponent = ViewerComponent;\n defineProp($com$ikea$core$rendering.ViewerComponent, 'Companion', Companion_getInstance_72);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.ViewerLineIdsComponent = ViewerLineIdsComponent;\n defineProp($com$ikea$core$rendering.ViewerLineIdsComponent, 'Companion', Companion_getInstance_73);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.ViewerObjectComponent = ViewerObjectComponent;\n defineProp($com$ikea$core$rendering.ViewerObjectComponent, 'Companion', Companion_getInstance_74);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.ViewerObjectTransformSystem = ViewerObjectTransformSystem;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.ViewerObjectVisibilitySystem = ViewerObjectVisibilitySystem;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n $com$ikea$core$rendering.ViewerPresenceSystem = ViewerPresenceSystem;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n var $com$ikea$core$rendering$mock = $com$ikea$core$rendering.mock || ($com$ikea$core$rendering.mock = {});\n $com$ikea$core$rendering$mock.ViewerMock = ViewerMock;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$rendering = $com$ikea$core.rendering || ($com$ikea$core.rendering = {});\n var $com$ikea$core$rendering$mock = $com$ikea$core$rendering.mock || ($com$ikea$core$rendering.mock = {});\n $com$ikea$core$rendering$mock.MockDragGenerator = MockDragGenerator;\n defineProp($com$ikea$core$rendering$mock.MockDragGenerator, 'Companion', Companion_getInstance_75);\n $com$ikea$core$rendering$mock.ViewerObjectMock = ViewerObjectMock;\n defineProp($com$ikea$core$rendering$mock.ViewerObjectMock, 'Companion', Companion_getInstance_76);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$replace = $com$ikea$core.replace || ($com$ikea$core.replace = {});\n $com$ikea$core$replace.FastReplaceAction = FastReplaceAction;\n defineProp($com$ikea$core$replace.FastReplaceAction, 'Companion', Companion_getInstance_78);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$replace = $com$ikea$core.replace || ($com$ikea$core.replace = {});\n $com$ikea$core$replace.ReplaceAction = ReplaceAction;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$replace = $com$ikea$core.replace || ($com$ikea$core.replace = {});\n $com$ikea$core$replace.ReplacePartAction = ReplacePartAction;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$selection = $com$ikea$core.selection || ($com$ikea$core.selection = {});\n $com$ikea$core$selection.ClickEventComponent = ClickEventComponent;\n defineProp($com$ikea$core$selection.ClickEventComponent, 'Companion', Companion_getInstance_79);\n $com$ikea$core$selection.triggerClickEvent = triggerClickEvent;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$selection = $com$ikea$core.selection || ($com$ikea$core.selection = {});\n defineProp($com$ikea$core$selection, 'MultiSelectionEnabledComponent', MultiSelectionEnabledComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$selection = $com$ikea$core.selection || ($com$ikea$core.selection = {});\n $com$ikea$core$selection.SelectableComponent = SelectableComponent;\n defineProp($com$ikea$core$selection.SelectableComponent, 'Companion', Companion_getInstance_80);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$selection = $com$ikea$core.selection || ($com$ikea$core.selection = {});\n defineProp($com$ikea$core$selection, 'SelectedComponent', SelectedComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n $com$ikea$core$serialization.CatalogsHeader = CatalogsHeader;\n defineProp($com$ikea$core$serialization.CatalogsHeader, 'Companion', Companion_getInstance_81);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n $com$ikea$core$serialization.ComponentDeserializerRegistry = ComponentDeserializerRegistry;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n $com$ikea$core$serialization.JsonSerializer = JsonSerializer;\n defineProp($com$ikea$core$serialization.JsonSerializer, 'Companion', Companion_getInstance_82);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n $com$ikea$core$serialization.PreviouslySerializedIdComponent = PreviouslySerializedIdComponent;\n defineProp($com$ikea$core$serialization.PreviouslySerializedIdComponent, 'Companion', Companion_getInstance_83);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n defineProp($com$ikea$core$serialization, 'SceneReloadingComponent', SceneReloadingComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n $com$ikea$core$serialization.SerializableGuestConnectionsComponent = SerializableGuestConnectionsComponent;\n defineProp($com$ikea$core$serialization.SerializableGuestConnectionsComponent, 'Companion', Companion_getInstance_85);\n $com$ikea$core$serialization.SerializableGuestConnectionsComponent.SerializableConnection = SerializableConnection;\n defineProp($com$ikea$core$serialization.SerializableGuestConnectionsComponent.SerializableConnection, 'Companion', Companion_getInstance_84);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n $com$ikea$core$serialization.toJsonString = toJsonString;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n $com$ikea$core$serialization.UnserializableEntityComponent = UnserializableEntityComponent;\n defineProp($com$ikea$core$serialization.UnserializableEntityComponent, 'Companion', Companion_getInstance_86);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n $com$ikea$core$serialization.VersionHeader = VersionHeader;\n defineProp($com$ikea$core$serialization.VersionHeader, 'Companion', Companion_getInstance_87);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n var $com$ikea$core$serialization$entitytreebuilder = $com$ikea$core$serialization.entitytreebuilder || ($com$ikea$core$serialization.entitytreebuilder = {});\n $com$ikea$core$serialization$entitytreebuilder.ConnectionGraphBuildOrder = ConnectionGraphBuildOrder;\n defineProp($com$ikea$core$serialization$entitytreebuilder.ConnectionGraphBuildOrder, 'Companion', Companion_getInstance_88);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n var $com$ikea$core$serialization$entitytreebuilder = $com$ikea$core$serialization.entitytreebuilder || ($com$ikea$core$serialization.entitytreebuilder = {});\n $com$ikea$core$serialization$entitytreebuilder.EntityTreeBuilder = EntityTreeBuilder;\n $com$ikea$core$serialization$entitytreebuilder.EntityTreeBuilder.buildEntityTreeInternal$default = buildEntityTreeInternal$default;\n $com$ikea$core$serialization$entitytreebuilder.EntityTreeBuilder.buildEntityTreeNode$default = buildEntityTreeNode$default;\n $com$ikea$core$serialization$entitytreebuilder.EntityTreeBuilder.ShadowEntityWithParent = ShadowEntityWithParent;\n $com$ikea$core$serialization$entitytreebuilder.EntityTreeBuilder.NewEntityWithShadowChildren = NewEntityWithShadowChildren;\n defineProp($com$ikea$core$serialization$entitytreebuilder.EntityTreeBuilder, 'Companion', Companion_getInstance_89);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n var $com$ikea$core$serialization$v13 = $com$ikea$core$serialization.v13 || ($com$ikea$core$serialization.v13 = {});\n $com$ikea$core$serialization$v13.SerializableEntityV13 = SerializableEntityV13;\n defineProp($com$ikea$core$serialization$v13.SerializableEntityV13, 'Companion', Companion_getInstance_90);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$serialization = $com$ikea$core.serialization || ($com$ikea$core.serialization = {});\n var $com$ikea$core$serialization$v13 = $com$ikea$core$serialization.v13 || ($com$ikea$core$serialization.v13 = {});\n $com$ikea$core$serialization$v13.SerializableTreeV13 = SerializableTreeV13;\n defineProp($com$ikea$core$serialization$v13.SerializableTreeV13, 'Companion', Companion_getInstance_91);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$shapes = $com$ikea$core.shapes || ($com$ikea$core.shapes = {});\n $com$ikea$core$shapes.AxisAlignedBox = AxisAlignedBox;\n defineProp($com$ikea$core$shapes.AxisAlignedBox, 'Companion', Companion_getInstance_93);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$shapes = $com$ikea$core.shapes || ($com$ikea$core.shapes = {});\n $com$ikea$core$shapes.ConvexPolyhedron = ConvexPolyhedron;\n defineProp($com$ikea$core$shapes.ConvexPolyhedron, 'Companion', Companion_getInstance_94);\n $com$ikea$core$shapes.axisAlignedBoundingBox$factory = axisAlignedBoundingBox$factory;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$shapes = $com$ikea$core.shapes || ($com$ikea$core.shapes = {});\n $com$ikea$core$shapes.Face = Face;\n $com$ikea$core$shapes.Cuboid = Cuboid;\n $com$ikea$core$shapes.Cuboid.CuboidFromSize = CuboidFromSize;\n $com$ikea$core$shapes.Cuboid.CuboidFromSizeAndCenter = CuboidFromSizeAndCenter;\n defineProp($com$ikea$core$shapes.Cuboid, 'Companion', Companion_getInstance_95);\n $com$ikea$core$shapes.size$factory = size$factory;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$shapes = $com$ikea$core.shapes || ($com$ikea$core.shapes = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$shapes = $com$ikea$core.shapes || ($com$ikea$core.shapes = {});\n $com$ikea$core$shapes.PolyhedronGroup = PolyhedronGroup;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$shapes = $com$ikea$core.shapes || ($com$ikea$core.shapes = {});\n defineProp($com$ikea$core$shapes, 'PolyhedronUtils', PolyhedronUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n $com$ikea$core$snapping.MovedToCandidateSnapPositionComponent = MovedToCandidateSnapPositionComponent;\n defineProp($com$ikea$core$snapping.MovedToCandidateSnapPositionComponent, 'Companion', Companion_getInstance_96);\n $com$ikea$core$snapping.triggerMovedToCandidateSnapPositionComponent = triggerMovedToCandidateSnapPositionComponent;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n $com$ikea$core$snapping.MovedToValidSnapPositionComponent = MovedToValidSnapPositionComponent;\n defineProp($com$ikea$core$snapping.MovedToValidSnapPositionComponent, 'Companion', Companion_getInstance_97);\n $com$ikea$core$snapping.triggerMovedToValidSnapPositionComponent = triggerMovedToValidSnapPositionComponent;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n $com$ikea$core$snapping.RestrictAllowedRequiredHostsComponent = RestrictAllowedRequiredHostsComponent;\n defineProp($com$ikea$core$snapping.RestrictAllowedRequiredHostsComponent, 'Companion', Companion_getInstance_98);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n $com$ikea$core$snapping.SnapAction = SnapAction;\n $com$ikea$core$snapping.SnapAction.SnapActionFromCandidate = SnapActionFromCandidate;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n $com$ikea$core$snapping.SnapActionCandidateImpl = SnapActionCandidateImpl;\n $com$ikea$core$snapping.guestRootToGuestDeltaTransform$factory = guestRootToGuestDeltaTransform$factory;\n $com$ikea$core$snapping.guestRootToGuestConnectorDeltaTransform$factory = guestRootToGuestConnectorDeltaTransform$factory;\n $com$ikea$core$snapping.guestEndTransform$factory = guestEndTransform$factory;\n $com$ikea$core$snapping.inActivationDistance$factory = inActivationDistance$factory;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n defineProp($com$ikea$core$snapping, 'SnapActionCandidateSortAndSelectStrategies', SnapActionCandidateSortAndSelectStrategies_getInstance);\n defineProp($com$ikea$core$snapping, 'SelectAll', SelectAll_getInstance);\n defineProp($com$ikea$core$snapping, 'SortByPriorityInActivationDistanceThenDistance', SortByPriorityInActivationDistanceThenDistance_getInstance);\n defineProp($com$ikea$core$snapping, 'SortByPriorityThenDistance', SortByPriorityThenDistance_getInstance);\n defineProp($com$ikea$core$snapping, 'SortByDistance', SortByDistance_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n $com$ikea$core$snapping.SnapActionInProgressComponent = SnapActionInProgressComponent;\n defineProp($com$ikea$core$snapping.SnapActionInProgressComponent, 'Companion', Companion_getInstance_99);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n $com$ikea$core$snapping.SnapCandidateComponent = SnapCandidateComponent;\n defineProp($com$ikea$core$snapping.SnapCandidateComponent, 'Companion', Companion_getInstance_100);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n $com$ikea$core$snapping.SnapRootComponent = SnapRootComponent;\n defineProp($com$ikea$core$snapping.SnapRootComponent, 'Companion', Companion_getInstance_101);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n $com$ikea$core$snapping.SnapSettings = SnapSettings;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapping = $com$ikea$core.snapping || ($com$ikea$core.snapping = {});\n defineProp($com$ikea$core$snapping, 'SnapUtils', SnapUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapshot = $com$ikea$core.snapshot || ($com$ikea$core.snapshot = {});\n $com$ikea$core$snapshot.EntityState = EntityState;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapshot = $com$ikea$core.snapshot || ($com$ikea$core.snapshot = {});\n $com$ikea$core$snapshot.IsLoadingSnapshotComponent = IsLoadingSnapshotComponent;\n defineProp($com$ikea$core$snapshot.IsLoadingSnapshotComponent, 'Companion', Companion_getInstance_102);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapshot = $com$ikea$core.snapshot || ($com$ikea$core.snapshot = {});\n $com$ikea$core$snapshot.SnapshotIgnoreComponent = SnapshotIgnoreComponent;\n defineProp($com$ikea$core$snapshot.SnapshotIgnoreComponent, 'Companion', Companion_getInstance_103);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapshot = $com$ikea$core.snapshot || ($com$ikea$core.snapshot = {});\n $com$ikea$core$snapshot.SnapshotService = SnapshotService;\n defineProp($com$ikea$core$snapshot.SnapshotService, 'Companion', Companion_getInstance_104);\n $com$ikea$core$snapshot.Snapshot = Snapshot;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$snapshot = $com$ikea$core.snapshot || ($com$ikea$core.snapshot = {});\n $com$ikea$core$snapshot.UpdatedFromSnapshotEventComponent = UpdatedFromSnapshotEventComponent;\n defineProp($com$ikea$core$snapshot.UpdatedFromSnapshotEventComponent, 'Companion', Companion_getInstance_105);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$system = $com$ikea$core.system || ($com$ikea$core.system = {});\n defineProp($com$ikea$core$system, 'ApiSystemIds', ApiSystemIds_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$transforms = $com$ikea$core.transforms || ($com$ikea$core.transforms = {});\n defineProp($com$ikea$core$transforms, 'AlwaysHangDownComponent', AlwaysHangDownComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$transforms = $com$ikea$core.transforms || ($com$ikea$core.transforms = {});\n $com$ikea$core$transforms.LocalTransformComponent = LocalTransformComponent;\n $com$ikea$core$transforms.LocalTransformComponent.LocalTransformComponentFromPosAndRot = LocalTransformComponentFromPosAndRot;\n defineProp($com$ikea$core$transforms.LocalTransformComponent, 'Companion', Companion_getInstance_107);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$transforms = $com$ikea$core.transforms || ($com$ikea$core.transforms = {});\n $com$ikea$core$transforms.TransformSystem = TransformSystem;\n defineProp($com$ikea$core$transforms.TransformSystem, 'Companion', Companion_getInstance_108);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$transforms = $com$ikea$core.transforms || ($com$ikea$core.transforms = {});\n defineProp($com$ikea$core$transforms, 'TransformUtils', TransformUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$transforms = $com$ikea$core.transforms || ($com$ikea$core.transforms = {});\n $com$ikea$core$transforms.WorldTransformComponent = WorldTransformComponent;\n $com$ikea$core$transforms.WorldTransformComponent.WorldTransformComponentFromPosAndRot = WorldTransformComponentFromPosAndRot;\n defineProp($com$ikea$core$transforms.WorldTransformComponent, 'Companion', Companion_getInstance_110);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$utils = $com$ikea$core.utils || ($com$ikea$core.utils = {});\n $com$ikea$core$utils.Measurer = Measurer;\n $com$ikea$core$utils.sum = sum;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$utils = $com$ikea$core.utils || ($com$ikea$core.utils = {});\n $com$ikea$core$utils.MutableStack = MutableStack;\n $com$ikea$core$utils.mutableStackOf = mutableStackOf;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$utils = $com$ikea$core.utils || ($com$ikea$core.utils = {});\n defineProp($com$ikea$core$utils, 'UrlHelper', UrlHelper_getInstance);\n $com$ikea$core$utils.UrlDetails = UrlDetails;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$validation = $com$ikea$core.validation || ($com$ikea$core.validation = {});\n $com$ikea$core$validation.NoValidConnectorAvailableValidationResult = NoValidConnectorAvailableValidationResult;\n defineProp($com$ikea$core$validation.NoValidConnectorAvailableValidationResult, 'Companion', Companion_getInstance_111);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$validation = $com$ikea$core.validation || ($com$ikea$core.validation = {});\n $com$ikea$core$validation.UnknownErrorValidationResult = UnknownErrorValidationResult;\n defineProp($com$ikea$core$validation.UnknownErrorValidationResult, 'Companion', Companion_getInstance_112);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$validation = $com$ikea$core.validation || ($com$ikea$core.validation = {});\n $com$ikea$core$validation.ValidSnapActionCandidateOrErrors = ValidSnapActionCandidateOrErrors;\n defineProp($com$ikea$core$validation.ValidSnapActionCandidateOrErrors, 'Companion', Companion_getInstance_113);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$validation = $com$ikea$core.validation || ($com$ikea$core.validation = {});\n $com$ikea$core$validation.ValidationImpl = ValidationImpl;\n $com$ikea$core$validation.ValidationResultType = ValidationResultType;\n $com$ikea$core$validation.ValidationResultType.values = values_8;\n $com$ikea$core$validation.ValidationResultType.valueOf = valueOf_8;\n defineProp($com$ikea$core$validation.ValidationResultType, 'WARNING', ValidationResultType_WARNING_getInstance);\n defineProp($com$ikea$core$validation.ValidationResultType, 'FAIL', ValidationResultType_FAIL_getInstance);\n $com$ikea$core$validation.ValidationResultFail = ValidationResultFail;\n defineProp($com$ikea$core$validation.ValidationResultFail, 'Companion', Companion_getInstance_114);\n $com$ikea$core$validation.ValidationResultWarning = ValidationResultWarning;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$validation = $com$ikea$core.validation || ($com$ikea$core.validation = {});\n $com$ikea$core$validation.ValidationResult = ValidationResult;\n defineProp($com$ikea$core$validation.ValidationResult, 'Companion', Companion_getInstance_115);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$validation = $com$ikea$core.validation || ($com$ikea$core.validation = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$utils = $com$ikea$core.utils || ($com$ikea$core.utils = {});\n $com$ikea$core$utils.getCoreVersion = getCoreVersion;\n }\n $jsExportAll$(_);\n _.$jsExportAll$ = $jsExportAll$;\n _.$_$ = _.$_$ || {};\n _.$_$.a = CoreFactory;\n _.$_$.b = CoreModules;\n _.$_$.c = CoreServices;\n _.$_$.d = Core;\n _.$_$.e = AddPartAction;\n _.$_$.f = AssemblyPartSnapInfo;\n _.$_$.g = AssemblyPartsComponent;\n _.$_$.h = AssemblyPart;\n _.$_$.i = AssemblyStructureComponent;\n _.$_$.j = PartPair;\n _.$_$.k = ProductPartComponent;\n _.$_$.l = RemovePartAction;\n _.$_$.m = get_partKey;\n _.$_$.n = createCustomAssemblySpecification;\n _.$_$.o = createCustomAssembly;\n _.$_$.p = ProductCatalog;\n _.$_$.q = ProductComponent;\n _.$_$.r = ProductManager;\n _.$_$.s = ProductSpecification;\n _.$_$.t = ProductStructureComponent;\n _.$_$.u = ProductStructureConnection;\n _.$_$.v = ProductStructureItem;\n _.$_$.w = get_productRef;\n _.$_$.x = get_productRefOrEmptyString;\n _.$_$.y = ColliderShapeComponent;\n _.$_$.z = CollisionValidationResult;\n _.$_$.a1 = CollisionValidation;\n _.$_$.b1 = WorldColliderUpdateSystem;\n _.$_$.c1 = get_axisAlignedBoundingBoxForHierarchy;\n _.$_$.d1 = get_collider;\n _.$_$.e1 = get_colliderShapeComponent;\n _.$_$.f1 = get_objectOrientedBoundingBoxForHierarchy;\n _.$_$.g1 = get_draggableRootEntity;\n _.$_$.h1 = get_selectableRoot;\n _.$_$.i1 = get_snapRoot;\n _.$_$.j1 = ChildConnectionValidation;\n _.$_$.k1 = ConnectionRootComponent;\n _.$_$.l1 = Connection;\n _.$_$.m1 = GuestConnectionsComponent;\n _.$_$.n1 = HostConnectionsComponent;\n _.$_$.o1 = UpdateHostConnectionsSystem;\n _.$_$.p1 = centerOfConnections;\n _.$_$.q1 = get_guestConnections;\n _.$_$.r1 = get_guests;\n _.$_$.s1 = get_highestPriorityConnection;\n _.$_$.t1 = get_isConnectionRoot;\n _.$_$.u1 = ConnectorsComponent;\n _.$_$.v1 = Connector;\n _.$_$.w1 = DisableConnectorsSystem;\n _.$_$.x1 = DisabledConnectorsComponent;\n _.$_$.y1 = EdgeConnector;\n _.$_$.z1 = PointConnector;\n _.$_$.a2 = PointSeriesConnector;\n _.$_$.b2 = PointSeriesSubConnector;\n _.$_$.c2 = RelativeConnectorData;\n _.$_$.d2 = RelativeConnectorsComponent;\n _.$_$.e2 = valueOf_0;\n _.$_$.f2 = RotationDegreeOfFreedom;\n _.$_$.g2 = SurfaceConnector;\n _.$_$.h2 = get_connectorsComponent;\n _.$_$.i2 = get_guestConnectors;\n _.$_$.j2 = get_snappingEntitiesSequence;\n _.$_$.k2 = DebugLinesComponent;\n _.$_$.l2 = DebugLine;\n _.$_$.m2 = DebugSurfacesComponent;\n _.$_$.n2 = DragSurfacesComponent;\n _.$_$.o2 = DragSurface;\n _.$_$.p2 = valueOf_1;\n _.$_$.q2 = DraggableComponent;\n _.$_$.r2 = SomethingIsDraggedComponent;\n _.$_$.s2 = ViewerDragEventComponent;\n _.$_$.t2 = WorldDragSurfaceUpdateSystem;\n _.$_$.u2 = WorldSpaceDragEventComponent;\n _.$_$.v2 = get_doStoreInSnapshot;\n _.$_$.w2 = get_serializable;\n _.$_$.x2 = Component;\n _.$_$.y2 = EntityManagerImpl;\n _.$_$.z2 = EntityManagerWatcher;\n _.$_$.a3 = SystemBase2;\n _.$_$.b3 = SystemBase3;\n _.$_$.c3 = SystemBase4;\n _.$_$.d3 = SystemBase5;\n _.$_$.e3 = SystemBase;\n _.$_$.f3 = AutomaticGroupBuilderSystem;\n _.$_$.g3 = ManualEntityGroupBuilderService;\n _.$_$.h3 = ManualGroupConnectorValidation;\n _.$_$.i3 = get_isAutomaticGroup;\n _.$_$.j3 = ChildComponent;\n _.$_$.k3 = ConnectionParentingSystem;\n _.$_$.l3 = HierarchySystem;\n _.$_$.m3 = ParentComponent;\n _.$_$.n3 = SceneGraphSystem;\n _.$_$.o3 = SceneManager;\n _.$_$.p3 = get_children;\n _.$_$.q3 = get_descendants;\n _.$_$.r3 = filterInHierarchy;\n _.$_$.s3 = findInHierarchy;\n _.$_$.t3 = findWithComponentInUpwardsHierarchy;\n _.$_$.u3 = forEachInHierarchy;\n _.$_$.v3 = getHierarchyWithComponent;\n _.$_$.w3 = hasComponentInUpwardsHierarchy;\n _.$_$.x3 = get_hierarchy;\n _.$_$.y3 = hierarchyContains;\n _.$_$.z3 = hierarchyExceptSubTreeArray;\n _.$_$.a4 = hierarchyExceptSubTreesWithComponentArray;\n _.$_$.b4 = hierarchyExceptSubTreesWithComponentSequence;\n _.$_$.c4 = get_hierarchySequence;\n _.$_$.d4 = isDescendantOf;\n _.$_$.e4 = get_isInScene;\n _.$_$.f4 = get_parent;\n _.$_$.g4 = get_parentComponent;\n _.$_$.h4 = setParentMaintainWorldTransform;\n _.$_$.i4 = setParent;\n _.$_$.j4 = HistoryChangedEventComponent;\n _.$_$.k4 = valueOf_2;\n _.$_$.l4 = HistoryImpl;\n _.$_$.m4 = values_3;\n _.$_$.n4 = get_logLevel;\n _.$_$.o4 = set_logLevel;\n _.$_$.p4 = LoggerImpl;\n _.$_$.q4 = Logger;\n _.$_$.r4 = echoStandardConsole;\n _.$_$.s4 = Degrees;\n _.$_$.t4 = Margin;\n _.$_$.u4 = ModelTransform;\n _.$_$.v4 = Plane;\n _.$_$.w4 = Polygon;\n _.$_$.x4 = Radians;\n _.$_$.y4 = RelationOrigin;\n _.$_$.z4 = RelativeBoxOffset;\n _.$_$.a5 = Size;\n _.$_$.b5 = Transform;\n _.$_$.c5 = Vector;\n _.$_$.d5 = almostEquals;\n _.$_$.e5 = DisplayNameComponent;\n _.$_$.f5 = TemplateDataComponent;\n _.$_$.g5 = get_connectionRootEntity;\n _.$_$.h5 = get_displayName;\n _.$_$.i5 = get_immediateConnectionRootDescendants;\n _.$_$.j5 = get_isPropping;\n _.$_$.k5 = RaycastHit;\n _.$_$.l5 = RaycastResult;\n _.$_$.m5 = Ray;\n _.$_$.n5 = LoadedModelInfoComponent;\n _.$_$.o5 = ModelInfoComponent;\n _.$_$.p5 = ModelTransformComponent;\n _.$_$.q5 = OutlineableComponent;\n _.$_$.r5 = RenderSystem;\n _.$_$.s5 = ViewerComponent;\n _.$_$.t5 = ViewerLineIdsComponent;\n _.$_$.u5 = ViewerObjectComponent;\n _.$_$.v5 = ViewerObjectTransformSystem;\n _.$_$.w5 = ViewerObjectVisibilitySystem;\n _.$_$.x5 = ViewerPresenceSystem;\n _.$_$.y5 = pauseViewerUpdatesOnDraggedEntity;\n _.$_$.z5 = resumeViewerUpdatesOnDraggedEntity;\n _.$_$.a6 = get_viewerObject;\n _.$_$.b6 = FastReplaceAction;\n _.$_$.c6 = ReplaceAction;\n _.$_$.d6 = ReplacePartAction;\n _.$_$.e6 = ClickEventComponent;\n _.$_$.f6 = SelectableComponent;\n _.$_$.g6 = get_isSelected;\n _.$_$.h6 = ComponentDeserializerRegistry;\n _.$_$.i6 = ComponentDeserializer;\n _.$_$.j6 = JsonSerializable;\n _.$_$.k6 = JsonSerializer;\n _.$_$.l6 = afterDeserializeComplete;\n _.$_$.m6 = beforeDeserialize;\n _.$_$.n6 = beforeParsingComponents;\n _.$_$.o6 = get_serializable_0;\n _.$_$.p6 = SerializableComponent;\n _.$_$.q6 = UnserializableEntityComponent;\n _.$_$.r6 = AxisAlignedBox;\n _.$_$.s6 = ConvexPolyhedron;\n _.$_$.t6 = Face;\n _.$_$.u6 = PolyhedronGroup;\n _.$_$.v6 = merge;\n _.$_$.w6 = RestrictAllowedRequiredHostsComponent;\n _.$_$.x6 = SnapActionCandidateSortAndSelectStrategy;\n _.$_$.y6 = SnapCandidateComponent;\n _.$_$.z6 = SnapRootComponent;\n _.$_$.a7 = SnapSettings;\n _.$_$.b7 = get_snapRootSubTree;\n _.$_$.c7 = triggerMovedToValidSnapPositionComponent;\n _.$_$.d7 = IsLoadingSnapshotComponent;\n _.$_$.e7 = SnapshotIgnoreComponent;\n _.$_$.f7 = SnapshotService;\n _.$_$.g7 = LocalTransformComponent;\n _.$_$.h7 = TransformSystem;\n _.$_$.i7 = WorldTransformComponent;\n _.$_$.j7 = get_isHanging;\n _.$_$.k7 = get_localTransform;\n _.$_$.l7 = get_worldPosition;\n _.$_$.m7 = get_worldRotation;\n _.$_$.n7 = get_worldTransform;\n _.$_$.o7 = Measurer;\n _.$_$.p7 = getCoreVersion;\n _.$_$.q7 = NoValidConnectorAvailableValidationResult;\n _.$_$.r7 = UnknownErrorValidationResult;\n _.$_$.s7 = ValidSnapActionCandidateOrErrors;\n _.$_$.t7 = ValidationImpl;\n _.$_$.u7 = ValidationResultFail;\n _.$_$.v7 = ValidationResultWarning;\n _.$_$.w7 = ValidationResult;\n _.$_$.x7 = ValidationService;\n _.$_$.y7 = RotationDegreeOfFreedom_NONE_getInstance;\n _.$_$.z7 = RotationDegreeOfFreedom_ONE_getInstance;\n _.$_$.a8 = LogLevel_DEBUG_getInstance;\n _.$_$.b8 = LogLevel_ERROR_getInstance;\n _.$_$.c8 = LogLevel_INFO_getInstance;\n _.$_$.d8 = LogLevel_WARN_getInstance;\n _.$_$.e8 = RelationOriginAlongX_CENTER_getInstance;\n _.$_$.f8 = RelationOriginAlongX_LEFT_getInstance;\n _.$_$.g8 = RelationOriginAlongX_RIGHT_getInstance;\n _.$_$.h8 = RelationOriginAlongY_BOTTOM_getInstance;\n _.$_$.i8 = RelationOriginAlongY_CENTER_getInstance;\n _.$_$.j8 = RelationOriginAlongY_TOP_getInstance;\n _.$_$.k8 = RelationOriginAlongZ_BACK_getInstance;\n _.$_$.l8 = RelationOriginAlongZ_CENTER_getInstance;\n _.$_$.m8 = RelationOriginAlongZ_FRONT_getInstance;\n _.$_$.n8 = ValidationResultType_FAIL_getInstance;\n _.$_$.o8 = ValidationResultType_WARNING_getInstance;\n _.$_$.p8 = addHistoryModule;\n _.$_$.q8 = setLogModule;\n _.$_$.r8 = createEntityInternal;\n _.$_$.s8 = createEntity;\n _.$_$.t8 = createFromSpecificationInternal;\n _.$_$.u8 = createFromSpecification;\n _.$_$.v8 = evaluateSnapCandidates;\n _.$_$.w8 = evaluateSnapCandidate;\n _.$_$.x8 = getFirstValidSnapAction;\n _.$_$.y8 = validateCurrentState;\n _.$_$.z8 = validateSnaps;\n _.$_$.a9 = validateSnap;\n _.$_$.b9 = AssemblyPartsComponent_init_$Create$;\n _.$_$.c9 = QuaternionFromDouble;\n _.$_$.d9 = SizeFromVector;\n _.$_$.e9 = __VectorIntConstructorKotlin;\n _.$_$.f9 = CuboidFromSize;\n _.$_$.g9 = CuboidFromSizeAndCenter;\n _.$_$.h9 = LocalTransformComponentFromPosAndRot;\n _.$_$.i9 = Companion_instance;\n _.$_$.j9 = Companion_instance_1;\n _.$_$.k9 = Companion_getInstance_3;\n _.$_$.l9 = Companion_instance_3;\n _.$_$.m9 = Companion_getInstance_6;\n _.$_$.n9 = ProductCatalogFunctions_instance;\n _.$_$.o9 = Companion_instance_6;\n _.$_$.p9 = Companion_getInstance_8;\n _.$_$.q9 = Companion_instance_8;\n _.$_$.r9 = Companion_instance_9;\n _.$_$.s9 = Companion_instance_10;\n _.$_$.t9 = ColliderUtils_instance;\n _.$_$.u9 = CollisionUtils_instance;\n _.$_$.v9 = ComponentIdSpan_instance;\n _.$_$.w9 = ComponentIds_instance;\n _.$_$.x9 = ComponentUtils_instance;\n _.$_$.y9 = Companion_instance_15;\n _.$_$.z9 = Companion_instance_16;\n _.$_$.aa = ConnectionUtils_instance;\n _.$_$.ba = Companion_getInstance_18;\n _.$_$.ca = Companion_instance_20;\n _.$_$.da = Companion_instance_21;\n _.$_$.ea = ConnectorTagConstants_instance;\n _.$_$.fa = ConnectorType_instance;\n _.$_$.ga = ConnectorUtils_instance;\n _.$_$.ha = Companion_getInstance_23;\n _.$_$.ia = Companion_instance_24;\n _.$_$.ja = RelativeConnectorRepositioner_instance;\n _.$_$.ka = RotationDegreeOfFreedomImpostor_instance;\n _.$_$.la = Companion_instance_27;\n _.$_$.ma = Companion_instance_29;\n _.$_$.na = Companion_instance_30;\n _.$_$.oa = Companion_instance_31;\n _.$_$.pa = Companion_instance_32;\n _.$_$.qa = Companion_instance_34;\n _.$_$.ra = Companion_instance_35;\n _.$_$.sa = Companion_getInstance_39;\n _.$_$.ta = Companion_getInstance_41;\n _.$_$.ua = EntityGroupUtils_instance;\n _.$_$.va = Companion_getInstance_44;\n _.$_$.wa = StaticComponent_getInstance;\n _.$_$.xa = Companion_getInstance_48;\n _.$_$.ya = Companion_instance_48;\n _.$_$.za = HierarchyUtils_instance;\n _.$_$.ab = InSceneComponent_instance;\n _.$_$.bb = SceneComponent_instance;\n _.$_$.cb = Companion_instance_50;\n _.$_$.db = HistoryEvent_instance;\n _.$_$.eb = LogLevelJavascriptImpostor_instance;\n _.$_$.fb = LoggerState_getInstance;\n _.$_$.gb = MathUtils_getInstance;\n _.$_$.hb = $serializer_getInstance_3;\n _.$_$.ib = Companion_instance_54;\n _.$_$.jb = $serializer_getInstance_4;\n _.$_$.kb = Companion_getInstance_57;\n _.$_$.lb = Companion_getInstance_58;\n _.$_$.mb = RelationOriginAlongXImpostor_getInstance;\n _.$_$.nb = RelationOriginAlongYImpostor_getInstance;\n _.$_$.ob = RelationOriginAlongZImpostor_getInstance;\n _.$_$.pb = $serializer_getInstance_6;\n _.$_$.qb = $serializer_getInstance_7;\n _.$_$.rb = Companion_getInstance_60;\n _.$_$.sb = $serializer_getInstance_8;\n _.$_$.tb = Companion_getInstance_61;\n _.$_$.ub = VectorConstants_getInstance;\n _.$_$.vb = MeasurementUtils_getInstance;\n _.$_$.wb = ProductUtils_instance;\n _.$_$.xb = ProppingComponent_instance;\n _.$_$.yb = Companion_instance_62;\n _.$_$.zb = Companion_instance_63;\n _.$_$.ac = RaycastUtils_instance;\n _.$_$.bc = Companion_instance_64;\n _.$_$.cc = Companion_instance_65;\n _.$_$.dc = Companion_instance_67;\n _.$_$.ec = ModelUtils_getInstance;\n _.$_$.fc = RenderedComponent_instance;\n _.$_$.gc = Companion_instance_71;\n _.$_$.hc = Companion_instance_72;\n _.$_$.ic = Companion_instance_73;\n _.$_$.jc = Companion_instance_78;\n _.$_$.kc = MultiSelectionEnabledComponent_instance;\n _.$_$.lc = Companion_instance_79;\n _.$_$.mc = SelectedComponent_instance;\n _.$_$.nc = SceneReloadingComponent_instance;\n _.$_$.oc = Companion_getInstance_85;\n _.$_$.pc = Companion_getInstance_93;\n _.$_$.qc = PolyhedronUtils_getInstance;\n _.$_$.rc = Companion_instance_97;\n _.$_$.sc = SnapActionCandidateSortAndSelectStrategies_getInstance;\n _.$_$.tc = Companion_instance_99;\n _.$_$.uc = Companion_instance_100;\n _.$_$.vc = SnapUtils_instance;\n _.$_$.wc = Companion_instance_101;\n _.$_$.xc = Companion_instance_104;\n _.$_$.yc = ApiSystemIds_instance;\n _.$_$.zc = AlwaysHangDownComponent_instance;\n _.$_$.ad = Companion_getInstance_107;\n _.$_$.bd = Companion_instance_107;\n _.$_$.cd = TransformUtils_instance;\n _.$_$.dd = Companion_getInstance_110;\n _.$_$.ed = Companion_instance_112;\n _.$_$.fd = Companion_instance_114;\n //endregion\n return _;\n}));\n\n//# sourceMappingURL=core-core-api.js.map\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd)\n define(['exports', './core-core-api.js', './kotlin-kotlin-stdlib.js', './kotlinx-serialization-kotlinx-serialization-core.js', './kotlinx-serialization-kotlinx-serialization-json.js'], factory);\n else if (typeof exports === 'object')\n factory(module.exports, require('./core-core-api.js'), require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'));\n else {\n if (typeof this['core-core-api'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-stl'. Its dependency 'core-core-api' was not found. Please, check whether 'core-core-api' is loaded prior to 'core-core-stl'.\");\n }\n if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-stl'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'core-core-stl'.\");\n }\n if (typeof this['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-stl'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'core-core-stl'.\");\n }\n if (typeof this['kotlinx-serialization-kotlinx-serialization-json'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-stl'. Its dependency 'kotlinx-serialization-kotlinx-serialization-json' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-json' is loaded prior to 'core-core-stl'.\");\n }\n root['core-core-stl'] = factory(typeof this['core-core-stl'] === 'undefined' ? {} : this['core-core-stl'], this['core-core-api'], this['kotlin-kotlin-stdlib'], this['kotlinx-serialization-kotlinx-serialization-core'], this['kotlinx-serialization-kotlinx-serialization-json']);\n }\n}(this, function (_, kotlin_core_core_api, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json) {\n 'use strict';\n //region block: imports\n var imul = Math.imul;\n var sign = Math.sign;\n var Companion_getInstance = kotlin_core_core_api.$_$.ta;\n var Unit_instance = kotlin_kotlin.$_$.x3;\n var get_children = kotlin_core_core_api.$_$.p3;\n var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;\n var copyToArray = kotlin_kotlin.$_$.l5;\n var distinct = kotlin_kotlin.$_$.n5;\n var get_parent = kotlin_core_core_api.$_$.f4;\n var equals = kotlin_kotlin.$_$.t8;\n var ConnectionUtils_instance = kotlin_core_core_api.$_$.aa;\n var protoOf = kotlin_kotlin.$_$.u9;\n var objectMeta = kotlin_kotlin.$_$.t9;\n var setMetadataFor = kotlin_kotlin.$_$.v9;\n var SystemBase2 = kotlin_core_core_api.$_$.a3;\n var ComponentIds_instance = kotlin_core_core_api.$_$.w9;\n var Companion_getInstance_0 = kotlin_core_core_api.$_$.xa;\n var Companion_instance = kotlin_core_core_api.$_$.uc;\n var Companion_getInstance_1 = kotlin_core_core_api.$_$.ba;\n var classMeta = kotlin_kotlin.$_$.q8;\n var defineProp = kotlin_kotlin.$_$.s8;\n var VOID = kotlin_kotlin.$_$.e;\n var joinToString = kotlin_kotlin.$_$.f6;\n var getKClassFromExpression = kotlin_kotlin.$_$.c;\n var THROW_CCE = kotlin_kotlin.$_$.ad;\n var contentEquals = kotlin_kotlin.$_$.z4;\n var contentHashCode = kotlin_kotlin.$_$.a5;\n var get_serializable = kotlin_core_core_api.$_$.w2;\n var get_doStoreInSnapshot = kotlin_core_core_api.$_$.v2;\n var Component = kotlin_core_core_api.$_$.x2;\n var DoubleCompanionObject_instance = kotlin_kotlin.$_$.h3;\n var getNumberHashCode = kotlin_kotlin.$_$.x8;\n var LoggerState_getInstance = kotlin_core_core_api.$_$.fb;\n var get_descendants = kotlin_core_core_api.$_$.q3;\n var listOf = kotlin_kotlin.$_$.o6;\n var get_snapRoot = kotlin_core_core_api.$_$.i1;\n var get_highestPriorityConnection = kotlin_core_core_api.$_$.s1;\n var SnapActionCandidateSortAndSelectStrategies_getInstance = kotlin_core_core_api.$_$.sc;\n var SnapUtils_instance = kotlin_core_core_api.$_$.vc;\n var toList = kotlin_kotlin.$_$.v7;\n var sortedWith = kotlin_kotlin.$_$.m7;\n var Comparator = kotlin_kotlin.$_$.pc;\n var compareValues = kotlin_kotlin.$_$.d8;\n var SystemBase = kotlin_core_core_api.$_$.e3;\n var ConnectorTagConstants_instance = kotlin_core_core_api.$_$.ea;\n var Companion_instance_0 = kotlin_core_core_api.$_$.fd;\n var ValidationImpl = kotlin_core_core_api.$_$.t7;\n var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.q;\n var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.g;\n var Exception_init_$Create$ = kotlin_kotlin.$_$.z;\n var Map = kotlin_kotlin.$_$.g4;\n var isInterface = kotlin_kotlin.$_$.j9;\n var Companion_getInstance_2 = kotlin_core_core_api.$_$.ha;\n var ConnectorsComponent = kotlin_core_core_api.$_$.u1;\n var get_connectorsComponent = kotlin_core_core_api.$_$.h2;\n var contains = kotlin_kotlin.$_$.x4;\n var SurfaceConnector = kotlin_core_core_api.$_$.g2;\n var emptyList = kotlin_kotlin.$_$.o5;\n var any = kotlin_kotlin.$_$.o4;\n var getHierarchyWithComponent = kotlin_core_core_api.$_$.v3;\n var get_guestConnections = kotlin_core_core_api.$_$.q1;\n var HierarchyUtils_instance = kotlin_core_core_api.$_$.za;\n var Companion_instance_1 = kotlin_core_core_api.$_$.z9;\n var addAll = kotlin_kotlin.$_$.l4;\n var get_worldTransform = kotlin_core_core_api.$_$.n7;\n var SystemBase4 = kotlin_core_core_api.$_$.c3;\n var SceneReloadingComponent_instance = kotlin_core_core_api.$_$.nc;\n var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.s;\n var findInHierarchy = kotlin_core_core_api.$_$.s3;\n var Exception = kotlin_kotlin.$_$.uc;\n var collectionSizeOrDefault = kotlin_kotlin.$_$.v4;\n var addAll_0 = kotlin_kotlin.$_$.m4;\n var Vector = kotlin_core_core_api.$_$.c5;\n var ConnectorType_instance = kotlin_core_core_api.$_$.fa;\n var Transform = kotlin_core_core_api.$_$.b5;\n var PointConnector = kotlin_core_core_api.$_$.z1;\n var Pair = kotlin_kotlin.$_$.yc;\n var asSequence = kotlin_kotlin.$_$.s4;\n var map = kotlin_kotlin.$_$.za;\n var compareTo = kotlin_kotlin.$_$.r8;\n var EdgeConnector = kotlin_core_core_api.$_$.y1;\n var Companion_getInstance_3 = kotlin_core_core_api.$_$.pc;\n var objectCreate = kotlin_kotlin.$_$.s9;\n var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.d1;\n var listOf_0 = kotlin_kotlin.$_$.p6;\n var any_0 = kotlin_kotlin.$_$.p4;\n var toString = kotlin_kotlin.$_$.z9;\n var get_productRefOrEmptyString = kotlin_core_core_api.$_$.x;\n var roundToInt = kotlin_kotlin.$_$.ba;\n var ValidationResult = kotlin_core_core_api.$_$.w7;\n var ValidationResultType_FAIL_getInstance = kotlin_core_core_api.$_$.n8;\n var interfaceMeta = kotlin_kotlin.$_$.b9;\n var get_hierarchy = kotlin_core_core_api.$_$.x3;\n var get_isPropping = kotlin_core_core_api.$_$.j5;\n var PointSeriesSubConnector = kotlin_core_core_api.$_$.b2;\n var toList_0 = kotlin_kotlin.$_$.u7;\n var get_connectionRootEntity = kotlin_core_core_api.$_$.g5;\n var asSequence_0 = kotlin_kotlin.$_$.t4;\n var filter = kotlin_kotlin.$_$.ua;\n var onEach = kotlin_kotlin.$_$.bb;\n var mapNotNull = kotlin_kotlin.$_$.ya;\n var firstOrNull = kotlin_kotlin.$_$.va;\n var ModelUtils_getInstance = kotlin_core_core_api.$_$.ec;\n var setParent = kotlin_core_core_api.$_$.i4;\n var ValidSnapActionCandidateOrErrors = kotlin_core_core_api.$_$.s7;\n var SnapSettings = kotlin_core_core_api.$_$.a7;\n var Companion_instance_2 = kotlin_core_core_api.$_$.rc;\n var get_snappingEntitiesSequence = kotlin_core_core_api.$_$.j2;\n var Collection = kotlin_kotlin.$_$.z3;\n var any_1 = kotlin_kotlin.$_$.qa;\n var NoValidConnectorAvailableValidationResult = kotlin_core_core_api.$_$.q7;\n var UnknownErrorValidationResult = kotlin_core_core_api.$_$.r7;\n var TransformUtils_instance = kotlin_core_core_api.$_$.cd;\n var get_productRef = kotlin_core_core_api.$_$.w;\n var ensureNotNull = kotlin_kotlin.$_$.qd;\n var none = kotlin_kotlin.$_$.v6;\n var get_parentComponent = kotlin_core_core_api.$_$.g4;\n var firstOrNull_0 = kotlin_kotlin.$_$.u5;\n var hashCode = kotlin_kotlin.$_$.a9;\n var get_worldPosition = kotlin_core_core_api.$_$.l7;\n var firstOrNull_1 = kotlin_kotlin.$_$.t5;\n var sortedWith_0 = kotlin_kotlin.$_$.n7;\n var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.f1;\n var get_partKey = kotlin_core_core_api.$_$.m;\n var first = kotlin_kotlin.$_$.w5;\n var get_immediateConnectionRootDescendants = kotlin_core_core_api.$_$.i5;\n var getStringHashCode = kotlin_kotlin.$_$.z8;\n var SnapActionCandidateSortAndSelectStrategy = kotlin_core_core_api.$_$.x6;\n var get_displayName = kotlin_core_core_api.$_$.h5;\n var Companion_instance_3 = kotlin_core_core_api.$_$.ca;\n var filterNotNull = kotlin_kotlin.$_$.s5;\n var Companion_instance_4 = kotlin_core_core_api.$_$.oa;\n var distinct_0 = kotlin_kotlin.$_$.m5;\n var resumeViewerUpdatesOnDraggedEntity = kotlin_core_core_api.$_$.z5;\n var SomethingIsDraggedComponent = kotlin_core_core_api.$_$.r2;\n var pauseViewerUpdatesOnDraggedEntity = kotlin_core_core_api.$_$.y5;\n var Companion_instance_5 = kotlin_core_core_api.$_$.bc;\n var plus = kotlin_kotlin.$_$.cb;\n var setParentMaintainWorldTransform = kotlin_core_core_api.$_$.h4;\n var ViewerLineIdsComponent = kotlin_core_core_api.$_$.t5;\n var LogLevel_DEBUG_getInstance = kotlin_core_core_api.$_$.a8;\n var Companion_instance_6 = kotlin_core_core_api.$_$.la;\n var Companion_instance_7 = kotlin_core_core_api.$_$.xc;\n var Companion_instance_8 = kotlin_core_core_api.$_$.hc;\n var repeat = kotlin_kotlin.$_$.rb;\n var joinToString_0 = kotlin_kotlin.$_$.e6;\n var println = kotlin_kotlin.$_$.h8;\n var EntityManagerWatcher = kotlin_core_core_api.$_$.z2;\n var Measurer = kotlin_core_core_api.$_$.o7;\n var DebugLinesComponent = kotlin_core_core_api.$_$.k2;\n var PolyhedronGroup = kotlin_core_core_api.$_$.u6;\n var Companion_getInstance_4 = kotlin_core_core_api.$_$.tb;\n var DebugLine = kotlin_core_core_api.$_$.l2;\n var ConvexPolyhedron = kotlin_core_core_api.$_$.s6;\n var last = kotlin_kotlin.$_$.m6;\n var Companion_instance_9 = kotlin_core_core_api.$_$.qa;\n var InSceneComponent_instance = kotlin_core_core_api.$_$.ab;\n var Companion_instance_10 = kotlin_core_core_api.$_$.ma;\n var get_isInScene = kotlin_core_core_api.$_$.e4;\n var PolyhedronUtils_getInstance = kotlin_core_core_api.$_$.qc;\n var DebugSurfacesComponent = kotlin_core_core_api.$_$.m2;\n var get_colliderShapeComponent = kotlin_core_core_api.$_$.e1;\n var DragSurface = kotlin_core_core_api.$_$.o2;\n var DragSurfacesComponent = kotlin_core_core_api.$_$.n2;\n var Companion_instance_11 = kotlin_core_core_api.$_$.s9;\n var triggerMovedToValidSnapPositionComponent = kotlin_core_core_api.$_$.c7;\n var Companion_instance_12 = kotlin_core_core_api.$_$.ra;\n var filterInHierarchy = kotlin_core_core_api.$_$.r3;\n var Companion_instance_13 = kotlin_core_core_api.$_$.cc;\n var Companion_instance_14 = kotlin_core_core_api.$_$.dc;\n var Companion_getInstance_5 = kotlin_core_core_api.$_$.rb;\n var Companion_instance_15 = kotlin_core_core_api.$_$.ed;\n var CollisionUtils_instance = kotlin_core_core_api.$_$.u9;\n var hierarchyExceptSubTreeArray = kotlin_core_core_api.$_$.z3;\n var Companion_getInstance_6 = kotlin_core_core_api.$_$.kb;\n var forEachInHierarchy = kotlin_core_core_api.$_$.u3;\n var RaycastUtils_instance = kotlin_core_core_api.$_$.ac;\n var findWithComponentInUpwardsHierarchy = kotlin_core_core_api.$_$.t3;\n var get_draggableRootEntity = kotlin_core_core_api.$_$.g1;\n var Companion_instance_16 = kotlin_core_core_api.$_$.zb;\n var WorldSpaceDragEventComponent = kotlin_core_core_api.$_$.u2;\n var almostEquals = kotlin_core_core_api.$_$.d5;\n var Companion_instance_17 = kotlin_core_core_api.$_$.pa;\n var centerOfConnections = kotlin_core_core_api.$_$.p1;\n var hierarchyExceptSubTreesWithComponentSequence = kotlin_core_core_api.$_$.b4;\n var Companion_getInstance_7 = kotlin_core_core_api.$_$.sa;\n var UnserializableEntityComponent = kotlin_core_core_api.$_$.q6;\n var DisplayNameComponent = kotlin_core_core_api.$_$.e5;\n var plus_0 = kotlin_kotlin.$_$.x6;\n var isDescendantOf = kotlin_core_core_api.$_$.d4;\n var RaycastResult = kotlin_core_core_api.$_$.l5;\n var RaycastHit = kotlin_core_core_api.$_$.k5;\n var Plane = kotlin_core_core_api.$_$.v4;\n var get_hierarchySequence = kotlin_core_core_api.$_$.c4;\n var get_objectOrientedBoundingBoxForHierarchy = kotlin_core_core_api.$_$.f1;\n var Companion_instance_18 = kotlin_core_core_api.$_$.bd;\n var get_collider = kotlin_core_core_api.$_$.d1;\n var lazy = kotlin_kotlin.$_$.wd;\n var KProperty0 = kotlin_kotlin.$_$.ma;\n var THROW_ISE = kotlin_kotlin.$_$.cd;\n var getLocalDelegateReference = kotlin_kotlin.$_$.w8;\n var hierarchyContains = kotlin_core_core_api.$_$.y3;\n var ValidationResultType_WARNING_getInstance = kotlin_core_core_api.$_$.o8;\n var fillArrayVal = kotlin_kotlin.$_$.u8;\n var isArray = kotlin_kotlin.$_$.c9;\n var mutableListOf = kotlin_kotlin.$_$.u6;\n var mapCapacity = kotlin_kotlin.$_$.q6;\n var coerceAtLeast = kotlin_kotlin.$_$.fa;\n var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.p;\n var to = kotlin_kotlin.$_$.be;\n var HashSet_init_$Create$ = kotlin_kotlin.$_$.n;\n var LogLevel_ERROR_getInstance = kotlin_core_core_api.$_$.b8;\n var values = kotlin_core_core_api.$_$.m4;\n var echoStandardConsole = kotlin_core_core_api.$_$.r4;\n var toString_0 = kotlin_kotlin.$_$.ae;\n var LogLevel_WARN_getInstance = kotlin_core_core_api.$_$.d8;\n var LogLevel_INFO_getInstance = kotlin_core_core_api.$_$.c8;\n var set_logLevel = kotlin_core_core_api.$_$.o4;\n var get_logLevel = kotlin_core_core_api.$_$.n4;\n var Logger = kotlin_core_core_api.$_$.q4;\n var Exception_init_$Init$ = kotlin_kotlin.$_$.y;\n var captureStack = kotlin_kotlin.$_$.k8;\n var get_viewerObject = kotlin_core_core_api.$_$.a6;\n var get_isSelected = kotlin_core_core_api.$_$.g6;\n var SelectedComponent_instance = kotlin_core_core_api.$_$.mc;\n var hasComponentInUpwardsHierarchy = kotlin_core_core_api.$_$.w3;\n var Companion_instance_19 = kotlin_core_core_api.$_$.ya;\n var Companion_instance_20 = kotlin_core_core_api.$_$.cb;\n var get_worldRotation = kotlin_core_core_api.$_$.m7;\n var SnapCandidateComponent = kotlin_core_core_api.$_$.y6;\n var Companion_instance_21 = kotlin_core_core_api.$_$.tc;\n var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.k1;\n var addAll_1 = kotlin_kotlin.$_$.n4;\n var ValidationResultFail = kotlin_core_core_api.$_$.u7;\n var ValidationResultWarning = kotlin_core_core_api.$_$.v7;\n var get_axisAlignedBoundingBoxForHierarchy = kotlin_core_core_api.$_$.c1;\n var minus = kotlin_kotlin.$_$.ab;\n var RestrictAllowedRequiredHostsComponent = kotlin_core_core_api.$_$.w6;\n var ChildComponent = kotlin_core_core_api.$_$.j3;\n var LocalTransformComponentFromPosAndRot = kotlin_core_core_api.$_$.h9;\n var AxisAlignedBox = kotlin_core_core_api.$_$.r6;\n var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.i1;\n var CollisionValidationResult = kotlin_core_core_api.$_$.z;\n var plus_1 = kotlin_kotlin.$_$.b7;\n var IntCompanionObject_instance = kotlin_kotlin.$_$.j3;\n var CollisionValidation = kotlin_core_core_api.$_$.a1;\n var numberRangeToNumber = kotlin_kotlin.$_$.o9;\n var numberToInt = kotlin_kotlin.$_$.q9;\n var RenderedComponent_instance = kotlin_core_core_api.$_$.fc;\n var toMutableList = kotlin_kotlin.$_$.x7;\n var Companion_instance_22 = kotlin_core_core_api.$_$.r9;\n var flatten = kotlin_kotlin.$_$.y5;\n var get_snapRootSubTree = kotlin_core_core_api.$_$.b7;\n var get_guestConnectors = kotlin_core_core_api.$_$.i2;\n var get_isHanging = kotlin_core_core_api.$_$.j7;\n var get_localTransform = kotlin_core_core_api.$_$.k7;\n var Radians = kotlin_core_core_api.$_$.x4;\n var Connection = kotlin_core_core_api.$_$.l1;\n var GuestConnectionsComponent = kotlin_core_core_api.$_$.m1;\n var Companion_instance_23 = kotlin_core_core_api.$_$.na;\n var toSet = kotlin_kotlin.$_$.a8;\n var sorted = kotlin_kotlin.$_$.o7;\n var ColliderShapeComponent = kotlin_core_core_api.$_$.y;\n var AlwaysHangDownComponent_instance = kotlin_core_core_api.$_$.zc;\n var Default_getInstance = kotlin_kotlin.$_$.m3;\n var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.h1;\n var Companion_instance_24 = kotlin_core_core_api.$_$.l9;\n var AddPartAction = kotlin_core_core_api.$_$.e;\n var ReplacePartAction = kotlin_core_core_api.$_$.d6;\n var RemovePartAction = kotlin_core_core_api.$_$.l;\n var RelativeConnectorRepositioner_instance = kotlin_core_core_api.$_$.ja;\n var getBooleanHashCode = kotlin_kotlin.$_$.v8;\n var get_guests = kotlin_core_core_api.$_$.r1;\n var ReplaceAction = kotlin_core_core_api.$_$.c6;\n var FastReplaceAction = kotlin_core_core_api.$_$.b6;\n var get_isAutomaticGroup = kotlin_core_core_api.$_$.i3;\n var ComponentDeserializer = kotlin_core_core_api.$_$.i6;\n var getKClass = kotlin_kotlin.$_$.d;\n var ReferenceArraySerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i2;\n var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;\n var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d;\n var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b2;\n var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;\n var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o2;\n var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;\n var $serializer_getInstance = kotlin_core_core_api.$_$.sb;\n var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.n3;\n var $serializer_getInstance_0 = kotlin_core_core_api.$_$.qb;\n var DisabledConnectorsComponent = kotlin_core_core_api.$_$.x1;\n var Companion_instance_25 = kotlin_core_core_api.$_$.ia;\n var plus_2 = kotlin_kotlin.$_$.c7;\n var minus_0 = kotlin_kotlin.$_$.t6;\n var Connector = kotlin_core_core_api.$_$.v1;\n var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.h;\n var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q;\n var JsonSerializable = kotlin_core_core_api.$_$.j6;\n var get_serializable_0 = kotlin_core_core_api.$_$.o6;\n var SerializableComponent = kotlin_core_core_api.$_$.p6;\n var __VectorIntConstructorKotlin = kotlin_core_core_api.$_$.e9;\n var createCustomAssembly = kotlin_core_core_api.$_$.o;\n var createCustomAssemblySpecification = kotlin_core_core_api.$_$.n;\n var beforeDeserialize = kotlin_core_core_api.$_$.m6;\n var beforeParsingComponents = kotlin_core_core_api.$_$.n6;\n var afterDeserializeComplete = kotlin_core_core_api.$_$.l6;\n var ProductCatalog = kotlin_core_core_api.$_$.p;\n var StaticComponent_getInstance = kotlin_core_core_api.$_$.wa;\n var ConnectionRootComponent = kotlin_core_core_api.$_$.k1;\n var SnapRootComponent = kotlin_core_core_api.$_$.z6;\n var CuboidFromSize = kotlin_core_core_api.$_$.f9;\n var LocalTransformComponent = kotlin_core_core_api.$_$.g7;\n var WorldTransformComponent = kotlin_core_core_api.$_$.i7;\n var toMap = kotlin_kotlin.$_$.w7;\n var Degrees = kotlin_core_core_api.$_$.s4;\n var get_indices = kotlin_kotlin.$_$.d6;\n var mapOf = kotlin_kotlin.$_$.s6;\n var plus_3 = kotlin_kotlin.$_$.z6;\n var QuaternionFromDouble = kotlin_core_core_api.$_$.c9;\n var MultiSelectionEnabledComponent_instance = kotlin_core_core_api.$_$.kc;\n var get_selectableRoot = kotlin_core_core_api.$_$.h1;\n var Companion_instance_26 = kotlin_core_core_api.$_$.lc;\n var Companion_instance_27 = kotlin_core_core_api.$_$.jc;\n var Ray = kotlin_core_core_api.$_$.m5;\n var ViewerDragEventComponent = kotlin_core_core_api.$_$.s2;\n var ConnectorUtils_instance = kotlin_core_core_api.$_$.ga;\n var hierarchyExceptSubTreesWithComponentArray = kotlin_core_core_api.$_$.a4;\n var Companion_instance_28 = kotlin_core_core_api.$_$.y9;\n var CuboidFromSizeAndCenter = kotlin_core_core_api.$_$.g9;\n var Companion_instance_29 = kotlin_core_core_api.$_$.ic;\n var ViewerObjectComponent = kotlin_core_core_api.$_$.u5;\n var SystemBase3 = kotlin_core_core_api.$_$.b3;\n var Companion_instance_30 = kotlin_core_core_api.$_$.gc;\n var Companion_instance_31 = kotlin_core_core_api.$_$.wc;\n var emptyMap = kotlin_kotlin.$_$.p5;\n var Error_init_$Create$ = kotlin_kotlin.$_$.x;\n var mapOf_0 = kotlin_kotlin.$_$.r6;\n var SystemBase5 = kotlin_core_core_api.$_$.d3;\n var SceneComponent_instance = kotlin_core_core_api.$_$.bb;\n var toMutableMap = kotlin_kotlin.$_$.z7;\n var PointSeriesConnector = kotlin_core_core_api.$_$.a2;\n var Random = kotlin_kotlin.$_$.da;\n var toList_1 = kotlin_kotlin.$_$.fb;\n var flatten_0 = kotlin_kotlin.$_$.x5;\n var emptySequence = kotlin_kotlin.$_$.ta;\n var endsWith = kotlin_kotlin.$_$.jb;\n //endregion\n //region block: pre-declaration\n setMetadataFor(Companion, 'Companion', objectMeta);\n setMetadataFor(AlignmentConnectionCreationSystem, 'AlignmentConnectionCreationSystem', classMeta, SystemBase2);\n setMetadataFor(Companion_0, 'Companion', objectMeta);\n setMetadataFor(AlignmentConnectionsComponent, 'AlignmentConnectionsComponent', classMeta, VOID, [Component], AlignmentConnectionsComponent);\n setMetadataFor(AlignmentPlane, 'AlignmentPlane', classMeta);\n setMetadataFor(Companion_1, 'Companion', objectMeta);\n setMetadataFor(HandleUnderAlignmentComponent, 'HandleUnderAlignmentComponent', objectMeta, VOID, [Component]);\n setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(HandleRotationSystem, 'HandleRotationSystem', classMeta, SystemBase);\n setMetadataFor(HostConnectorRotationValidation, 'HostConnectorRotationValidation', classMeta, ValidationImpl, VOID, HostConnectorRotationValidation);\n setMetadataFor(AlignmentLinesReferenceCounter, 'AlignmentLinesReferenceCounter', classMeta, VOID, VOID, AlignmentLinesReferenceCounter);\n setMetadataFor(Companion_2, 'Companion', objectMeta);\n setMetadataFor(AlignmentLinesSystem, 'AlignmentLinesSystem', classMeta, SystemBase4);\n setMetadataFor(Companion_3, 'Companion', objectMeta);\n setMetadataFor(AlignmentLinesUtils, 'AlignmentLinesUtils', classMeta, VOID, VOID, AlignmentLinesUtils);\n setMetadataFor(IntersectionPointConnectors, 'IntersectionPointConnectors', classMeta);\n setMetadataFor(IntersectionPointsTracker, 'IntersectionPointsTracker', classMeta, VOID, VOID, IntersectionPointsTracker);\n setMetadataFor(Companion_4, 'Companion', objectMeta);\n setMetadataFor(RoomAlignmentEdgesComponent, 'RoomAlignmentEdgesComponent', classMeta, VOID, [Component]);\n setMetadataFor(SurfaceAlignmentLines, 'SurfaceAlignmentLines', classMeta);\n setMetadataFor(Companion_5, 'Companion', objectMeta);\n setMetadataFor(AllowedDoorPairsComponent, 'AllowedDoorPairsComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_6, 'Companion', objectMeta);\n setMetadataFor(AllowedDoorPairsValidation, 'AllowedDoorPairsValidation', classMeta, ValidationImpl, VOID, AllowedDoorPairsValidation);\n setMetadataFor(Companion_7, 'Companion', objectMeta);\n setMetadataFor(InvalidDoorPairsResult, 'InvalidDoorPairsResult', classMeta, ValidationResult);\n setMetadataFor(AssemblyInstructionsService, 'AssemblyInstructionsService', interfaceMeta);\n setMetadataFor(AssemblyInstructionsServiceImpl, 'AssemblyInstructionsServiceImpl', classMeta, VOID, [AssemblyInstructionsService], AssemblyInstructionsServiceImpl);\n setMetadataFor(PointSeriesAssemblyInstruction, 'PointSeriesAssemblyInstruction', interfaceMeta);\n setMetadataFor(PointSeriesAssemblyInstructionImpl, 'PointSeriesAssemblyInstructionImpl', classMeta, VOID, [PointSeriesAssemblyInstruction]);\n setMetadataFor(AutoAdaptFeature, 'AutoAdaptFeature', objectMeta);\n setMetadataFor(Companion_8, 'Companion', objectMeta);\n setMetadataFor(AutoAdaptProductSpecificationsSystem, 'AutoAdaptProductSpecificationsSystem', classMeta, SystemBase);\n setMetadataFor(AutoAdaptService, 'AutoAdaptService', classMeta);\n setMetadataFor(EntityWithSensorZone, 'EntityWithSensorZone', classMeta);\n setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(sam$kotlin_Comparator$0_1, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(sam$kotlin_Comparator$0_2, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(AutoAdaptUtils, 'AutoAdaptUtils', objectMeta);\n setMetadataFor(Companion_9, 'Companion', objectMeta);\n setMetadataFor(AutoAdaptChildFailedEventComponent, 'AutoAdaptChildFailedEventComponent', classMeta, VOID, [Component], AutoAdaptChildFailedEventComponent);\n setMetadataFor(sam$kotlin_Comparator$0_3, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(ChildInfo, 'ChildInfo', classMeta);\n setMetadataFor(PreferSameConnectorsStrategy, 'PreferSameConnectorsStrategy', classMeta, VOID, [SnapActionCandidateSortAndSelectStrategy]);\n setMetadataFor(Companion_10, 'Companion', objectMeta);\n setMetadataFor(AutoAdaptChildrenSystem, 'AutoAdaptChildrenSystem', classMeta, SystemBase);\n setMetadataFor(Companion_11, 'Companion', objectMeta);\n setMetadataFor(AutoAdaptDisposeFailedChildrenSystem, 'AutoAdaptDisposeFailedChildrenSystem', classMeta, SystemBase, VOID, AutoAdaptDisposeFailedChildrenSystem);\n setMetadataFor(Companion_12, 'Companion', objectMeta);\n setMetadataFor(AutoAdaptCacheSystem, 'AutoAdaptCacheSystem', classMeta, SystemBase);\n setMetadataFor(Companion_13, 'Companion', objectMeta);\n setMetadataFor(AutoAdaptCachedVariantsComponent, 'AutoAdaptCachedVariantsComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_14, 'Companion', objectMeta);\n setMetadataFor(AutoAdaptSessionComponent, 'AutoAdaptSessionComponent', classMeta, VOID, [Component], AutoAdaptSessionComponent);\n setMetadataFor(Companion_15, 'Companion', objectMeta);\n setMetadataFor(CleanCacheOnFinishedAutoAdaptSystem, 'CleanCacheOnFinishedAutoAdaptSystem', classMeta, SystemBase2, VOID, CleanCacheOnFinishedAutoAdaptSystem);\n setMetadataFor(Companion_16, 'Companion', objectMeta);\n setMetadataFor(AutoAdaptGuestComponent, 'AutoAdaptGuestComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_17, 'Companion', objectMeta);\n setMetadataFor(AutoAdaptHostComponent, 'AutoAdaptHostComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_18, 'Companion', objectMeta);\n setMetadataFor(AutoAdaptProductSpecificationsComponent, 'AutoAdaptProductSpecificationsComponent', classMeta, VOID, [Component]);\n setMetadataFor(SpecificationPair, 'SpecificationPair', classMeta);\n setMetadataFor(Companion_19, 'Companion', objectMeta);\n setMetadataFor(AutoAdaptVariantComponent, 'AutoAdaptVariantComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_20, 'Companion', objectMeta);\n setMetadataFor(ForceAutoAdaptWhenParentIsDraggedComponent, 'ForceAutoAdaptWhenParentIsDraggedComponent', classMeta, VOID, [Component], ForceAutoAdaptWhenParentIsDraggedComponent);\n setMetadataFor(Companion_21, 'Companion', objectMeta);\n setMetadataFor(ReplacedWithAutoAdaptEventComponent, 'ReplacedWithAutoAdaptEventComponent', classMeta, VOID, [Component]);\n function dragStart(draggedRootEntity) {\n }\n function dragStop(draggedRootEntity) {\n }\n setMetadataFor(DragStrategy, 'DragStrategy', interfaceMeta);\n setMetadataFor(AbstractDragStrategy, 'AbstractDragStrategy', classMeta, VOID, [DragStrategy]);\n setMetadataFor(AutoAdaptDragStrategy, 'AutoAdaptDragStrategy', classMeta, AbstractDragStrategy);\n setMetadataFor(Companion_22, 'Companion', objectMeta);\n setMetadataFor(DragSurfaceSelector, 'DragSurfaceSelector', interfaceMeta);\n setMetadataFor(DragSurfaceCanHostSelector, 'DragSurfaceCanHostSelector', classMeta, VOID, [DragSurfaceSelector], DragSurfaceCanHostSelector);\n setMetadataFor(DragSurfaceCanHostWithAutoAdaptSelector, 'DragSurfaceCanHostWithAutoAdaptSelector', classMeta, DragSurfaceCanHostSelector);\n setMetadataFor(ValidDragStrategyResult, 'ValidDragStrategyResult', classMeta);\n setMetadataFor(ValidAutoAdaptDragStrategyResult, 'ValidAutoAdaptDragStrategyResult', classMeta, ValidDragStrategyResult);\n setMetadataFor(Companion_23, 'Companion', objectMeta);\n setMetadataFor(DebugLineDrawingSystem, 'DebugLineDrawingSystem', classMeta, SystemBase2);\n setMetadataFor(LoggingEntityManagerWatcher, 'LoggingEntityManagerWatcher', classMeta, VOID, [EntityManagerWatcher]);\n setMetadataFor(DoneEntry, 'DoneEntry', objectMeta);\n setMetadataFor(AddEntry, 'AddEntry', classMeta);\n setMetadataFor(RemoveEntry, 'RemoveEntry', classMeta);\n setMetadataFor(CallEntry, 'CallEntry', classMeta);\n setMetadataFor(MeasuringEntityManagerWatcher, 'MeasuringEntityManagerWatcher', classMeta, VOID, [EntityManagerWatcher]);\n setMetadataFor(Companion_24, 'Companion', objectMeta);\n setMetadataFor(DragState, 'DragState', classMeta);\n setMetadataFor(Companion_25, 'Companion', objectMeta);\n setMetadataFor(DragStateComponent, 'DragStateComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_26, 'Companion', objectMeta);\n setMetadataFor(DragSurfaceNormalVisualizationSystem, 'DragSurfaceNormalVisualizationSystem', classMeta, SystemBase2);\n setMetadataFor(Companion_27, 'Companion', objectMeta);\n setMetadataFor(DragSurfaceVisualizationSystem, 'DragSurfaceVisualizationSystem', classMeta, SystemBase2);\n setMetadataFor(DragSurfacesUpdateSystem, 'DragSurfacesUpdateSystem', classMeta, SystemBase2);\n setMetadataFor(Companion_28, 'Companion', objectMeta);\n setMetadataFor(DragSystem, 'DragSystem', classMeta, SystemBase);\n setMetadataFor(Companion_29, 'Companion', objectMeta);\n setMetadataFor(DrawDragGhostSystem, 'DrawDragGhostSystem', classMeta, SystemBase);\n setMetadataFor(PostProcessDragStrategy, 'PostProcessDragStrategy', interfaceMeta);\n setMetadataFor(HigherPriorityAlignmentPostProcess, 'HigherPriorityAlignmentPostProcess', classMeta, VOID, [PostProcessDragStrategy]);\n setMetadataFor(IsDraggedComponent, 'IsDraggedComponent', objectMeta, VOID, [Component]);\n setMetadataFor(Companion_30, 'Companion', objectMeta);\n setMetadataFor(TakeSnapshotBeforeDragSystem, 'TakeSnapshotBeforeDragSystem', classMeta, SystemBase);\n setMetadataFor(FreeMoveComponent, 'FreeMoveComponent', objectMeta, VOID, [Component]);\n setMetadataFor(FreeMoveDragStrategy, 'FreeMoveDragStrategy', classMeta, AbstractDragStrategy);\n setMetadataFor(ResolveCollisionsDragStrategy, 'ResolveCollisionsDragStrategy', classMeta, AbstractDragStrategy);\n setMetadataFor(SnapCardinalDirectionsDragStrategy, 'SnapCardinalDirectionsDragStrategy', classMeta, AbstractDragStrategy);\n setMetadataFor(SnapClosestDragStrategy, 'SnapClosestDragStrategy', classMeta, AbstractDragStrategy);\n setMetadataFor(SnapClosestWithSubConnectorsDragStrategy, 'SnapClosestWithSubConnectorsDragStrategy', classMeta, AbstractDragStrategy);\n setMetadataFor(Companion_31, 'Companion', objectMeta);\n setMetadataFor(Companion_32, 'Companion', objectMeta);\n setMetadataFor(CanvasTo3DDragConverterSystem, 'CanvasTo3DDragConverterSystem', classMeta, SystemBase);\n setMetadataFor(DragSurfaceEntityPair, 'DragSurfaceEntityPair', classMeta);\n setMetadataFor(Companion_33, 'Companion', objectMeta);\n setMetadataFor(DragSurfaceOnlyRoomSelector, 'DragSurfaceOnlyRoomSelector', classMeta, VOID, [DragSurfaceSelector], DragSurfaceOnlyRoomSelector);\n setMetadataFor(Companion_34, 'Companion', objectMeta);\n setMetadataFor(LegacyCanvasTo3DDragConverterSystem, 'LegacyCanvasTo3DDragConverterSystem', classMeta, SystemBase);\n setMetadataFor(NoDragConverterDetector, 'NoDragConverterDetector', classMeta, SystemBase2);\n setMetadataFor(Companion_35, 'Companion', objectMeta);\n setMetadataFor(DragProjectionPointComponent, 'DragProjectionPointComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_36, 'Companion', objectMeta);\n setMetadataFor(GrabOffsetComponent, 'GrabOffsetComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_37, 'Companion', objectMeta);\n setMetadataFor(DragSurfacesChangedListener, 'DragSurfacesChangedListener', interfaceMeta);\n setMetadataFor(DragSurfaceProjector, 'DragSurfaceProjector', interfaceMeta, VOID, [DragSurfacesChangedListener]);\n setMetadataFor(AnyDragSurfaceProjector, 'AnyDragSurfaceProjector', classMeta, VOID, [DragSurfaceProjector]);\n setMetadataFor(Companion_38, 'Companion', objectMeta);\n setMetadataFor(DragSurfaceEntityPairsCacheComponent, 'DragSurfaceEntityPairsCacheComponent', classMeta, VOID, [Component], DragSurfaceEntityPairsCacheComponent);\n setMetadataFor(Companion_39, 'Companion', objectMeta);\n setMetadataFor(DragSurfaceUpdatesListenerSystem, 'DragSurfaceUpdatesListenerSystem', classMeta, SystemBase2);\n setMetadataFor(XYPlaneProjector, 'XYPlaneProjector', classMeta, VOID, [DragSurfaceProjector], XYPlaneProjector);\n setMetadataFor(Companion_40, 'Companion', objectMeta);\n setMetadataFor(FunctionalMarginComponent, 'FunctionalMarginComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_41, 'Companion', objectMeta);\n setMetadataFor(FunctionalMarginShapeComponent, 'FunctionalMarginShapeComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_42, 'Companion', objectMeta);\n setMetadataFor(FunctionalMarginSystem, 'FunctionalMarginSystem', classMeta, SystemBase2, VOID, FunctionalMarginSystem);\n setMetadataFor(Companion_43, 'Companion', objectMeta);\n setMetadataFor(FunctionalMarginValidation, 'FunctionalMarginValidation', classMeta, ValidationImpl);\n setMetadataFor(Companion_44, 'Companion', objectMeta);\n setMetadataFor(FunctionalMarginWarning, 'FunctionalMarginWarning', classMeta, ValidationResult);\n setMetadataFor(FunctionalZone, 'FunctionalZone', classMeta);\n setMetadataFor(Companion_45, 'Companion', objectMeta);\n setMetadataFor(FunctionalZonesLocalComponent, 'FunctionalZonesLocalComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_46, 'Companion', objectMeta);\n setMetadataFor(FunctionalZonesLocalToWorldSystem, 'FunctionalZonesLocalToWorldSystem', classMeta, SystemBase2);\n setMetadataFor(Companion_47, 'Companion', objectMeta);\n setMetadataFor(FunctionalZonesWorldComponent, 'FunctionalZonesWorldComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_48, 'Companion', objectMeta);\n setMetadataFor(ICFDataService, 'ICFDataService', classMeta);\n setMetadataFor(ICFProductData, 'ICFProductData', classMeta);\n setMetadataFor(Companion_49, 'Companion', objectMeta);\n setMetadataFor(LabelComponent, 'LabelComponent', classMeta, VOID, [Component]);\n setMetadataFor(DebugLogger, 'DebugLogger', classMeta, VOID, [Logger], DebugLogger);\n setMetadataFor(LoggerException, 'LoggerException', classMeta, Exception, VOID, LoggerException);\n setMetadataFor(Companion_50, 'Companion', objectMeta);\n setMetadataFor(ColoredOutlineComponent, 'ColoredOutlineComponent', classMeta, VOID, [Component], ColoredOutlineComponent);\n setMetadataFor(ColoredOutlineSystem, 'ColoredOutlineSystem', classMeta, SystemBase, VOID, ColoredOutlineSystem);\n setMetadataFor(Companion_51, 'Companion', objectMeta);\n setMetadataFor(OutlineBlockingComponent, 'OutlineBlockingComponent', classMeta, VOID, [Component], OutlineBlockingComponent);\n setMetadataFor(Companion_52, 'Companion', objectMeta);\n setMetadataFor(OutlineEntityGroupDeselectSystem, 'OutlineEntityGroupDeselectSystem', classMeta, SystemBase);\n setMetadataFor(Companion_53, 'Companion', objectMeta);\n setMetadataFor(OutlineSelectedSystem, 'OutlineSelectedSystem', classMeta, SystemBase, VOID, OutlineSelectedSystem);\n setMetadataFor(OutlineSystem, 'OutlineSystem', classMeta, SystemBase4, VOID, OutlineSystem);\n setMetadataFor(Companion_54, 'Companion', objectMeta);\n setMetadataFor(OutlinedComponent, 'OutlinedComponent', classMeta, VOID, [Component], OutlinedComponent);\n setMetadataFor(sam$kotlin_Comparator$0_4, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(AutoAdaptPlacementActor, 'AutoAdaptPlacementActor', classMeta);\n setMetadataFor(PlacementHelper, 'PlacementHelper', objectMeta);\n setMetadataFor(Companion_55, 'Companion', objectMeta);\n setMetadataFor(PlacementResult, 'PlacementResult', classMeta);\n setMetadataFor(PlacementService, 'PlacementService', classMeta);\n setMetadataFor(Companion_56, 'Companion', objectMeta);\n setMetadataFor(PlacementZoneByHeightComponent, 'PlacementZoneByHeightComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_57, 'Companion', objectMeta);\n setMetadataFor(RecommendedInitialPositionFromFloorComponent, 'RecommendedInitialPositionFromFloorComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_58, 'Companion', objectMeta);\n setMetadataFor(RecommendedInitialPositionFromParentComponent, 'RecommendedInitialPositionFromParentComponent', classMeta, VOID, [Component]);\n setMetadataFor(SearchDirectionsUtils, 'SearchDirectionsUtils', objectMeta);\n setMetadataFor(CandidateResult, 'CandidateResult', classMeta);\n setMetadataFor(Companion_59, 'Companion', objectMeta);\n setMetadataFor(SnapPlacementActor, 'SnapPlacementActor', classMeta);\n setMetadataFor(SortCriterion, 'SortCriterion', interfaceMeta);\n setMetadataFor(SortCriterionBase, 'SortCriterionBase', classMeta, VOID, [SortCriterion]);\n setMetadataFor(DistanceCriterion, 'DistanceCriterion', classMeta, SortCriterionBase, [SortCriterionBase, SortCriterion], DistanceCriterion);\n setMetadataFor(FilterCriterion, 'FilterCriterion', interfaceMeta);\n setMetadataFor(InActivationDistanceFilter, 'InActivationDistanceFilter', classMeta, VOID, [FilterCriterion], InActivationDistanceFilter);\n setMetadataFor(OriginalVariantCriterion, 'OriginalVariantCriterion', classMeta, SortCriterionBase, [SortCriterionBase, SortCriterion], OriginalVariantCriterion);\n setMetadataFor(PriorityCriterionSettings, 'PriorityCriterionSettings', interfaceMeta);\n setMetadataFor(PriorityCriterionSettings$Companion$all$1, VOID, classMeta, VOID, [PriorityCriterionSettings]);\n setMetadataFor(PriorityCriterionSettings$Companion$onlyInActivationDistance$1, VOID, classMeta, VOID, [PriorityCriterionSettings]);\n setMetadataFor(Companion_60, 'Companion', objectMeta);\n setMetadataFor(PriorityCriterion, 'PriorityCriterion', classMeta, SortCriterionBase, [SortCriterionBase, SortCriterion]);\n setMetadataFor(RecommendedDistanceFromFloorCriterion, 'RecommendedDistanceFromFloorCriterion', classMeta, SortCriterionBase, [SortCriterionBase, SortCriterion], RecommendedDistanceFromFloorCriterion);\n setMetadataFor(sam$kotlin_Comparator$0_5, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(sam$kotlin_Comparator$0_6, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(SnapSorter, 'SnapSorter', classMeta);\n setMetadataFor(SnapSorterBuilder, 'SnapSorterBuilder', classMeta, VOID, VOID, SnapSorterBuilder);\n setMetadataFor(WarningsCriterion, 'WarningsCriterion', classMeta, VOID, [SortCriterion], WarningsCriterion);\n setMetadataFor(sam$kotlin_Comparator$0_7, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(sam$kotlin_Comparator$0_8, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(SpaceFinderUtils, 'SpaceFinderUtils', objectMeta);\n setMetadataFor(ProppingData, 'ProppingData', classMeta);\n setMetadataFor(Companion_61, 'Companion', objectMeta);\n setMetadataFor(ProppingHostConnectorsComponent, 'ProppingHostConnectorsComponent', classMeta, VOID, [Component]);\n setMetadataFor(ProppingHostConnectorData, 'ProppingHostConnectorData', classMeta);\n setMetadataFor(Companion_62, 'Companion', objectMeta);\n setMetadataFor(ProppingInfoComponent, 'ProppingInfoComponent', classMeta, VOID, [Component]);\n setMetadataFor(PropHolderInfo, 'PropHolderInfo', classMeta);\n setMetadataFor(ProppingSubSystem, 'ProppingSubSystem', classMeta, SystemBase2);\n setMetadataFor(Companion_63, 'Companion', objectMeta);\n setMetadataFor(ProppingSystem, 'ProppingSystem', classMeta, SystemBase2);\n setMetadataFor(ProppingUtils, 'ProppingUtils', objectMeta);\n setMetadataFor(ProppingsAvailableForDemand, 'ProppingsAvailableForDemand', classMeta);\n setMetadataFor(Companion_64, 'Companion', objectMeta);\n setMetadataFor(SetPropHolderInfoSystem, 'SetPropHolderInfoSystem', classMeta, SystemBase, VOID, SetPropHolderInfoSystem);\n setMetadataFor(Companion_65, 'Companion', objectMeta);\n setMetadataFor(SetProppingHostConnectorDataSystem, 'SetProppingHostConnectorDataSystem', classMeta, SystemBase);\n setMetadataFor(Companion_66, 'Companion', objectMeta);\n setMetadataFor(CommunicationSizeComponent, 'CommunicationSizeComponent', classMeta, VOID, [Component]);\n setMetadataFor(DoorComponent, 'DoorComponent', objectMeta, VOID, [Component]);\n setMetadataFor(DoorFrontComponent, 'DoorFrontComponent', objectMeta, VOID, [Component]);\n setMetadataFor(DrawerComponent, 'DrawerComponent', objectMeta, VOID, [Component]);\n setMetadataFor(FrameComponent, 'FrameComponent', objectMeta, VOID, [Component]);\n setMetadataFor(HandleComponent, 'HandleComponent', objectMeta, VOID, [Component]);\n setMetadataFor(IncludedHandleComponent, 'IncludedHandleComponent', objectMeta, VOID, [Component]);\n setMetadataFor(LegComponent, 'LegComponent', objectMeta, VOID, [Component]);\n setMetadataFor(Companion_67, 'Companion', objectMeta);\n setMetadataFor(LightComponent, 'LightComponent', classMeta, VOID, [Component]);\n setMetadataFor(ReplaceAssemblyPartUtils, 'ReplaceAssemblyPartUtils', objectMeta);\n setMetadataFor(Companion_68, 'Companion', objectMeta);\n setMetadataFor(ReplacePartResult, 'ReplacePartResult', classMeta);\n setMetadataFor(ReplacePlacementResult, 'ReplacePlacementResult', classMeta);\n setMetadataFor(ReplaceUtils, 'ReplaceUtils', objectMeta);\n setMetadataFor(RoomComponentDeserializer, 'RoomComponentDeserializer', classMeta, VOID, [ComponentDeserializer], RoomComponentDeserializer);\n setMetadataFor(RoomConnectorConstants, 'RoomConnectorConstants', objectMeta);\n setMetadataFor(Companion_69, 'Companion', objectMeta);\n setMetadataFor($serializer, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(CoreRoomGeometryData, 'CoreRoomGeometryData', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_1});\n setMetadataFor(CoreRoomGeometry, 'CoreRoomGeometry', interfaceMeta);\n setMetadataFor(Companion_70, 'Companion', objectMeta);\n setMetadataFor($serializer_0, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(CoreRoomSurface, 'CoreRoomSurface', classMeta, VOID, [CoreRoomGeometry], VOID, VOID, {0: $serializer_getInstance_2});\n setMetadataFor(Companion_71, 'Companion', objectMeta);\n setMetadataFor($serializer_1, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomSurfaceGeometryImpl, 'RoomSurfaceGeometryImpl', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_3});\n setMetadataFor(Companion_72, 'Companion', objectMeta);\n setMetadataFor($serializer_2, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(CoreRoomEdge, 'CoreRoomEdge', classMeta, VOID, [CoreRoomGeometry], VOID, VOID, {0: $serializer_getInstance_4});\n setMetadataFor(Companion_73, 'Companion', objectMeta);\n setMetadataFor($serializer_3, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(CoreRoomVertex, 'CoreRoomVertex', classMeta, VOID, [CoreRoomGeometry], VOID, VOID, {0: $serializer_getInstance_5});\n setMetadataFor(Companion_74, 'Companion', objectMeta);\n setMetadataFor($serializer_4, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(CoreRoomObstacle, 'CoreRoomObstacle', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_6});\n setMetadataFor(Companion_75, 'Companion', objectMeta);\n setMetadataFor($serializer_5, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(CoreRoomBoundingBox, 'CoreRoomBoundingBox', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_7});\n setMetadataFor(RoomGeometryData, 'RoomGeometryData', interfaceMeta);\n setMetadataFor(RoomSurface, 'RoomSurface', interfaceMeta);\n setMetadataFor(RoomEdge, 'RoomEdge', interfaceMeta);\n setMetadataFor(RoomCorner, 'RoomCorner', interfaceMeta);\n setMetadataFor(RoomObstacle, 'RoomObstacle', interfaceMeta);\n setMetadataFor(RoomPoint3D, 'RoomPoint3D', interfaceMeta);\n setMetadataFor(RoomRotation, 'RoomRotation', interfaceMeta);\n setMetadataFor(RoomBoundingBox, 'RoomBoundingBox', interfaceMeta);\n setMetadataFor(RoomTransform, 'RoomTransform', interfaceMeta);\n setMetadataFor(RoomService, 'RoomService', classMeta);\n setMetadataFor(Companion_76, 'Companion', objectMeta);\n setMetadataFor(DisabledRoomConnectorsConfigComponent, 'DisabledRoomConnectorsConfigComponent', classMeta, VOID, [Component]);\n setMetadataFor(RoomComponent, 'RoomComponent', objectMeta, VOID, [Component]);\n setMetadataFor(Companion_77, 'Companion', objectMeta);\n setMetadataFor(RoomConnectorRelationsComponent, 'RoomConnectorRelationsComponent', classMeta, VOID, [Component]);\n setMetadataFor(RoomConnectorKeysForSurface, 'RoomConnectorKeysForSurface', classMeta);\n setMetadataFor(RoomConnectorKeysForEdge, 'RoomConnectorKeysForEdge', classMeta);\n setMetadataFor(RoomConnectorKeysForCorner, 'RoomConnectorKeysForCorner', classMeta);\n setMetadataFor(RoomConnectorsForSurface, 'RoomConnectorsForSurface', classMeta);\n setMetadataFor(RoomConnectorsForEdge, 'RoomConnectorsForEdge', classMeta);\n setMetadataFor(RoomConnectorsForCorner, 'RoomConnectorsForCorner', classMeta);\n setMetadataFor(Companion_78, 'Companion', objectMeta);\n setMetadataFor($serializer_6, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomDimensionsComponent, 'RoomDimensionsComponent', classMeta, VOID, [JsonSerializable, Component], VOID, VOID, {0: $serializer_getInstance_8});\n setMetadataFor(Companion_79, 'Companion', objectMeta);\n setMetadataFor($serializer_7, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomGeometryComponent, 'RoomGeometryComponent', classMeta, VOID, [SerializableComponent], VOID, VOID, {0: $serializer_getInstance_9});\n setMetadataFor(Companion_80, 'Companion', objectMeta);\n setMetadataFor(RoomPartComponent, 'RoomPartComponent', classMeta, VOID, [Component]);\n setMetadataFor(RoomRefToRoomComponentInterceptor, 'RoomRefToRoomComponentInterceptor', classMeta, VOID, [ProductCatalog], RoomRefToRoomComponentInterceptor);\n setMetadataFor(Companion_81, 'Companion', objectMeta);\n setMetadataFor(RoomDimensionToGeometrySystem, 'RoomDimensionToGeometrySystem', classMeta, SystemBase);\n setMetadataFor(RoomServiceDragSystem, 'RoomServiceDragSystem', classMeta, SystemBase);\n setMetadataFor(Companion_82, 'Companion', objectMeta);\n setMetadataFor(RoomSystem, 'RoomSystem', classMeta, SystemBase);\n setMetadataFor(Companion_83, 'Companion', objectMeta);\n setMetadataFor(RoomColliderUtilities, 'RoomColliderUtilities', classMeta, VOID, VOID, RoomColliderUtilities);\n setMetadataFor(RoomConnectorPair, 'RoomConnectorPair', classMeta);\n setMetadataFor(Companion_84, 'Companion', objectMeta);\n setMetadataFor(RoomConnectorRelationsMapper, 'RoomConnectorRelationsMapper', classMeta, VOID, VOID, RoomConnectorRelationsMapper);\n setMetadataFor(Wall, 'Wall', classMeta);\n setMetadataFor(Companion_85, 'Companion', objectMeta);\n setMetadataFor(RoomConnectorUtilities, 'RoomConnectorUtilities', classMeta, VOID, VOID, RoomConnectorUtilities);\n setMetadataFor(Companion_86, 'Companion', objectMeta);\n setMetadataFor(RoomGeometryUtilities, 'RoomGeometryUtilities', classMeta, VOID, VOID, RoomGeometryUtilities);\n setMetadataFor(StandardSelectionService, 'StandardSelectionService', classMeta);\n setMetadataFor(Companion_87, 'Companion', objectMeta);\n setMetadataFor(StandardSelectionSystem, 'StandardSelectionSystem', classMeta, SystemBase4);\n setMetadataFor(StlSystemIds, 'StlSystemIds', objectMeta);\n setMetadataFor(Companion_88, 'Companion', objectMeta);\n setMetadataFor(DragExtensions, 'DragExtensions', classMeta, VOID, VOID, DragExtensions);\n setMetadataFor(ViewerDragState, 'ViewerDragState', objectMeta);\n setMetadataFor(Companion_89, 'Companion', objectMeta);\n setMetadataFor(AllowedNumberOfChildrenOfTypeValidation, 'AllowedNumberOfChildrenOfTypeValidation', classMeta, ValidationImpl);\n setMetadataFor(Companion_90, 'Companion', objectMeta);\n setMetadataFor(DisallowSeparateRequiredHostsValidation, 'DisallowSeparateRequiredHostsValidation', classMeta, ValidationImpl);\n setMetadataFor(Companion_91, 'Companion', objectMeta);\n setMetadataFor(InvalidNumberOfChildren, 'InvalidNumberOfChildren', classMeta, ValidationResult);\n setMetadataFor(Companion_92, 'Companion', objectMeta);\n setMetadataFor(PlacementZoneValidation, 'PlacementZoneValidation', classMeta, ValidationImpl, VOID, PlacementZoneValidation);\n setMetadataFor(PlacementZoneWarning, 'PlacementZoneWarning', classMeta, ValidationResult);\n setMetadataFor(Companion_93, 'Companion', objectMeta);\n setMetadataFor(RequiredConnectorsSatisfiedValidation, 'RequiredConnectorsSatisfiedValidation', classMeta, ValidationImpl, VOID, RequiredConnectorsSatisfiedValidation);\n setMetadataFor(Companion_94, 'Companion', objectMeta);\n setMetadataFor(RequiredConnectorsValidationResult, 'RequiredConnectorsValidationResult', classMeta, ValidationResult);\n setMetadataFor(ValidationResultIds, 'ValidationResultIds', objectMeta);\n setMetadataFor(ValidationRuleIds, 'ValidationRuleIds', objectMeta);\n setMetadataFor(CoreVisualization, 'CoreVisualization', classMeta);\n setMetadataFor(VisualizationState, 'VisualizationState', classMeta, VOID, VOID, VisualizationState);\n setMetadataFor(Companion_95, 'Companion', objectMeta);\n setMetadataFor(ColliderVisualizationConfigComponent, 'ColliderVisualizationConfigComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_96, 'Companion', objectMeta);\n setMetadataFor(ColliderVisualizationNodeComponent, 'ColliderVisualizationNodeComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_97, 'Companion', objectMeta);\n setMetadataFor(ColliderVisualizerViewerObjectsComponent, 'ColliderVisualizerViewerObjectsComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_98, 'Companion', objectMeta);\n setMetadataFor(ConnectorVisualizationConfigComponent, 'ConnectorVisualizationConfigComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_99, 'Companion', objectMeta);\n setMetadataFor(ConnectorVisualizationNodeComponent, 'ConnectorVisualizationNodeComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_100, 'Companion', objectMeta);\n setMetadataFor(ConnectorVisualizerViewerObjectsComponent, 'ConnectorVisualizerViewerObjectsComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_101, 'Companion', objectMeta);\n setMetadataFor(DecoratorComponent, 'DecoratorComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_102, 'Companion', objectMeta);\n setMetadataFor(EntityColliderVisualizationComponent, 'EntityColliderVisualizationComponent', classMeta, VOID, [Component], EntityColliderVisualizationComponent);\n setMetadataFor(Companion_103, 'Companion', objectMeta);\n setMetadataFor(EntityConnectorVisualizationComponent, 'EntityConnectorVisualizationComponent', classMeta, VOID, [Component], EntityConnectorVisualizationComponent);\n setMetadataFor(ConnectorVisualizationData, 'ConnectorVisualizationData', interfaceMeta);\n setMetadataFor(Companion_104, 'Companion', objectMeta);\n setMetadataFor(PolyhedronVisualizationNodeComponent, 'PolyhedronVisualizationNodeComponent', classMeta, VOID, [Component], PolyhedronVisualizationNodeComponent);\n setMetadataFor(Companion_105, 'Companion', objectMeta);\n setMetadataFor(PolyhedronVisualizationSystem, 'PolyhedronVisualizationSystem', classMeta, SystemBase3);\n setMetadataFor(AutoAdaptHostZoneVisualizationSystem, 'AutoAdaptHostZoneVisualizationSystem', classMeta, PolyhedronVisualizationSystem);\n setMetadataFor(Companion_106, 'Companion', objectMeta);\n setMetadataFor(DragProjectionPointVisualizationSystem, 'DragProjectionPointVisualizationSystem', classMeta, PolyhedronVisualizationSystem);\n setMetadataFor(Companion_107, 'Companion', objectMeta);\n setMetadataFor(FunctionalMarginVisualizationSystem, 'FunctionalMarginVisualizationSystem', classMeta, PolyhedronVisualizationSystem);\n setMetadataFor(Companion_108, 'Companion', objectMeta);\n setMetadataFor(FunctionalZoneVisualizationSystem, 'FunctionalZoneVisualizationSystem', classMeta, PolyhedronVisualizationSystem);\n setMetadataFor(Companion_109, 'Companion', objectMeta);\n setMetadataFor(PolyhedronVisualizationHolderComponent, 'PolyhedronVisualizationHolderComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_110, 'Companion', objectMeta);\n setMetadataFor(ForcedComponentBaseSystem, 'ForcedComponentBaseSystem', classMeta, SystemBase4);\n setMetadataFor(ColliderVisualizationSystem, 'ColliderVisualizationSystem', classMeta, ForcedComponentBaseSystem);\n setMetadataFor(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1, VOID, classMeta, VOID, [ConnectorVisualizationData]);\n setMetadataFor(Companion_111, 'Companion', objectMeta);\n setMetadataFor(ConnectorVisualizationSystem, 'ConnectorVisualizationSystem', classMeta, ForcedComponentBaseSystem);\n setMetadataFor(Companion_112, 'Companion', objectMeta);\n setMetadataFor(EntityColliderVisualizationSystem, 'EntityColliderVisualizationSystem', classMeta, SystemBase5);\n setMetadataFor(Companion_113, 'Companion', objectMeta);\n setMetadataFor(CollisionVisualizationSceneDataComponent, 'CollisionVisualizationSceneDataComponent', classMeta, VOID, [Component]);\n setMetadataFor(CollisionVisualizationSceneData, 'CollisionVisualizationSceneData', classMeta, VOID, VOID, CollisionVisualizationSceneData);\n setMetadataFor(Companion_114, 'Companion', objectMeta);\n setMetadataFor(EntityCollisionVisualizationSystem, 'EntityCollisionVisualizationSystem', classMeta, SystemBase3);\n setMetadataFor(Companion_115, 'Companion', objectMeta);\n setMetadataFor(EntityConnectorVisualizationSystem, 'EntityConnectorVisualizationSystem', classMeta, SystemBase5);\n function createColliderVisualization(entity, polyhedron, color, collides, collisionData, $super) {\n color = color === VOID ? null : color;\n collides = collides === VOID ? false : collides;\n collisionData = collisionData === VOID ? null : collisionData;\n return this.b3w(entity, polyhedron, color, collides, collisionData);\n }\n setMetadataFor(ColliderVisualizer, 'ColliderVisualizer', interfaceMeta);\n setMetadataFor(CollisionVisualizationData, 'CollisionVisualizationData', classMeta);\n setMetadataFor(Color, 'Color', classMeta);\n setMetadataFor(ConnectorVisualizer, 'ConnectorVisualizer', interfaceMeta);\n setMetadataFor(Companion_116, 'Companion', objectMeta);\n setMetadataFor(Visualizer, 'Visualizer', interfaceMeta);\n setMetadataFor(DefaultVisualizer, 'DefaultVisualizer', classMeta, VOID, [Visualizer, ConnectorVisualizer, ColliderVisualizer]);\n setMetadataFor(Companion_117, 'Companion', objectMeta);\n setMetadataFor(VisualizerUtils, 'VisualizerUtils', classMeta, VOID, VOID, VisualizerUtils);\n //endregion\n function childConnectionAdded($this, entity, component) {\n handlePositionChange($this, entity);\n }\n function childConnectionRemoved($this, entity, component) {\n handlePositionChange($this, entity);\n }\n function childConnectionUpdated($this, entity, oldComponent, component) {\n handlePositionChange($this, entity);\n }\n function handlePositionChange($this, entity) {\n Companion_getInstance();\n if (entity.hasComponent(38)) {\n updateGroupAlignment($this, entity);\n } else {\n updateAlignment($this, entity);\n }\n }\n function updateGroupAlignment($this, entity) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_children(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignment.AlignmentConnectionCreationSystem.updateGroupAlignment.' call\n updateAlignment($this, element);\n }\n }\n function updateAlignment($this, entity) {\n var oldAlignments = getOldAlignmentConnections($this, entity);\n var newAlignments = matchingAlignmentConnections($this, entity);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_children(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignment.AlignmentConnectionCreationSystem.updateAlignment.' call\n handlePositionChange($this, element);\n }\n set_alignmentConnections(entity, newAlignments);\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$1 = oldAlignments.concat(newAlignments);\n updateRelativeAlignments($this, tmp$ret$1);\n }\n function getOldAlignmentConnections($this, entity) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(51);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.connections;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignment.AlignmentConnectionCreationSystem.getOldAlignmentConnections.' call\n if (!element.offeringEntity.isDisposed ? !element.demandingEntity.isDisposed : false) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var tmp2_safe_receiver = tmp;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_0 = copyToArray(tmp2_safe_receiver);\n }\n var tmp3_elvis_lhs = tmp_0;\n var tmp_1;\n if (tmp3_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp3_elvis_lhs;\n }\n return tmp_1;\n }\n function updateRelativeAlignments($this, connections) {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = connections.length;\n while (inductionVariable < last) {\n var element = connections[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.alignment.AlignmentConnectionCreationSystem.updateRelativeAlignments.' call\n var tmp;\n if (belongsToSameEntityGroup($this, element)) {\n tmp = null;\n } else {\n tmp = element.offeringEntity;\n }\n var tmp0_safe_receiver = tmp;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n var tmp0_iterator = distinct(destination).t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignment.AlignmentConnectionCreationSystem.updateRelativeAlignments.' call\n set_alignmentConnections(element_0, matchingAlignmentConnections($this, element_0));\n }\n }\n function belongsToSameEntityGroup($this, it) {\n var tmp;\n var tmp0_safe_receiver = get_parent(it.offeringEntity);\n var tmp_0;\n if (tmp0_safe_receiver == null) {\n tmp_0 = null;\n } else {\n Companion_getInstance();\n tmp_0 = tmp0_safe_receiver.hasComponent(38);\n }\n if (tmp_0 === true) {\n tmp = equals(get_parent(it.offeringEntity), get_parent(it.demandingEntity));\n } else {\n tmp = false;\n }\n return tmp;\n }\n function matchingAlignmentConnections($this, entity) {\n return ConnectionUtils_instance.matchingAlignmentConnections(entity, $this.u2v_1.sceneManager.entities);\n }\n function Companion() {\n this.ID = 'AlignmentConnectionCreationSystem';\n }\n protoOf(Companion).u1n = function () {\n return this.ID;\n };\n var Companion_instance_32;\n function Companion_getInstance_8() {\n return Companion_instance_32;\n }\n function AlignmentConnectionCreationSystem(coreServices) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [51];\n // Inline function 'kotlin.arrayOf' call\n Companion_getInstance_0();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = ['ConnectionParentingSystem'];\n SystemBase2.call(this, 'AlignmentConnectionCreationSystem', 104, 73, tmp, tmp$ret$5, null);\n this.u2v_1 = coreServices;\n this.v2v_1 = false;\n }\n protoOf(AlignmentConnectionCreationSystem).enable = function () {\n protoOf(SystemBase2).enable.call(this);\n this.v2v_1 = false;\n };\n protoOf(AlignmentConnectionCreationSystem).refreshAlignments = function (entities) {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = entities.length;\n while (inductionVariable < last) {\n var element = entities[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignment.AlignmentConnectionCreationSystem.refreshAlignments.' call\n if (element.hasComponent(47)) {\n destination.q(element);\n }\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignment.AlignmentConnectionCreationSystem.refreshAlignments.' call\n Companion_getInstance_1();\n var tmp0_safe_receiver = element_0.__getComponentForKotlin(104);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.alignment.AlignmentConnectionCreationSystem.refreshAlignments..' call\n childConnectionAdded(this, element_0, tmp0_safe_receiver);\n }\n }\n };\n protoOf(AlignmentConnectionCreationSystem).onAddComponent2 = function (entity, newComponent) {\n this.v2v_1 = true;\n };\n protoOf(AlignmentConnectionCreationSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n };\n protoOf(AlignmentConnectionCreationSystem).onRemoveComponent2 = function (entity, oldComponent) {\n this.v2v_1 = false;\n this.refreshAlignments(this.u2v_1.sceneManager.entities);\n };\n protoOf(AlignmentConnectionCreationSystem).onAddComponent = function (entity, newComponent) {\n if (!this.v2v_1) {\n childConnectionAdded(this, entity, newComponent);\n }\n };\n protoOf(AlignmentConnectionCreationSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n if (!this.v2v_1) {\n childConnectionUpdated(this, entity, oldComponent, newComponent);\n }\n };\n protoOf(AlignmentConnectionCreationSystem).onRemoveComponent = function (entity, oldComponent) {\n if (!this.v2v_1) {\n childConnectionRemoved(this, entity, oldComponent);\n }\n };\n function Companion_0() {\n this.id = 51;\n }\n protoOf(Companion_0).s1k = function () {\n return this.id;\n };\n var Companion_instance_33;\n function Companion_getInstance_9() {\n return Companion_instance_33;\n }\n function AlignmentConnectionsComponent$toString$lambda(it) {\n return it.toString();\n }\n function AlignmentConnectionsComponent(connections) {\n var tmp;\n if (connections === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = connections;\n }\n connections = tmp;\n this.connections = connections;\n }\n protoOf(AlignmentConnectionsComponent).d1w = function () {\n return this.connections;\n };\n protoOf(AlignmentConnectionsComponent).x1k = function () {\n return 51;\n };\n protoOf(AlignmentConnectionsComponent).toString = function () {\n return 'AlignmentConnectionsComponent[' + joinToString(this.connections, ';', VOID, VOID, VOID, VOID, AlignmentConnectionsComponent$toString$lambda) + ']';\n };\n protoOf(AlignmentConnectionsComponent).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof AlignmentConnectionsComponent))\n THROW_CCE();\n if (!contentEquals(this.connections, other.connections))\n return false;\n return true;\n };\n protoOf(AlignmentConnectionsComponent).hashCode = function () {\n return contentHashCode(this.connections);\n };\n protoOf(AlignmentConnectionsComponent).eq = function (other) {\n var otherAlignmentConnectionsComponent = other instanceof AlignmentConnectionsComponent ? other : THROW_CCE();\n return contentEquals(this.connections, otherAlignmentConnectionsComponent.connections);\n };\n function set_alignmentConnections(_this__u8e3s4, value) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (value.length === 0) {\n _this__u8e3s4.removeComponent(51);\n } else {\n _this__u8e3s4.addComponent(new AlignmentConnectionsComponent(value));\n }\n }\n function AlignmentPlane(planeNormal, planePoint, activationDistance) {\n var tmp;\n if (activationDistance === VOID) {\n tmp = 1.7976931348623157E308;\n } else {\n tmp = activationDistance;\n }\n activationDistance = tmp;\n this.planeNormal = planeNormal;\n this.planePoint = planePoint;\n this.activationDistance = activationDistance;\n }\n protoOf(AlignmentPlane).y23 = function () {\n return this.planeNormal;\n };\n protoOf(AlignmentPlane).x23 = function () {\n return this.planePoint;\n };\n protoOf(AlignmentPlane).l1x = function () {\n return this.activationDistance;\n };\n protoOf(AlignmentPlane).projectPointOnPlane = function (point) {\n return point.projectOnPlane(this.planeNormal, this.planePoint);\n };\n protoOf(AlignmentPlane).af = function () {\n return this.planeNormal;\n };\n protoOf(AlignmentPlane).bf = function () {\n return this.planePoint;\n };\n protoOf(AlignmentPlane).g1k = function () {\n return this.activationDistance;\n };\n protoOf(AlignmentPlane).w2v = function (planeNormal, planePoint, activationDistance) {\n return new AlignmentPlane(planeNormal, planePoint, activationDistance);\n };\n protoOf(AlignmentPlane).copy = function (planeNormal, planePoint, activationDistance, $super) {\n planeNormal = planeNormal === VOID ? this.planeNormal : planeNormal;\n planePoint = planePoint === VOID ? this.planePoint : planePoint;\n activationDistance = activationDistance === VOID ? this.activationDistance : activationDistance;\n return this.w2v(planeNormal, planePoint, activationDistance);\n };\n protoOf(AlignmentPlane).toString = function () {\n return 'AlignmentPlane(planeNormal=' + this.planeNormal + ', planePoint=' + this.planePoint + ', activationDistance=' + this.activationDistance + ')';\n };\n protoOf(AlignmentPlane).hashCode = function () {\n var result = this.planeNormal.hashCode();\n result = imul(result, 31) + this.planePoint.hashCode() | 0;\n result = imul(result, 31) + getNumberHashCode(this.activationDistance) | 0;\n return result;\n };\n protoOf(AlignmentPlane).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof AlignmentPlane))\n return false;\n var tmp0_other_with_cast = other instanceof AlignmentPlane ? other : THROW_CCE();\n if (!this.planeNormal.equals(tmp0_other_with_cast.planeNormal))\n return false;\n if (!this.planePoint.equals(tmp0_other_with_cast.planePoint))\n return false;\n if (!equals(this.activationDistance, tmp0_other_with_cast.activationDistance))\n return false;\n return true;\n };\n function Companion_1() {\n Companion_instance_34 = this;\n this.ID = 'HandleRotationSystem';\n this.x2v_1 = LoggerState_getInstance().m1m('HandleRotationSystem');\n }\n protoOf(Companion_1).u1n = function () {\n return this.ID;\n };\n var Companion_instance_34;\n function Companion_getInstance_10() {\n if (Companion_instance_34 == null)\n new Companion_1();\n return Companion_instance_34;\n }\n function onMoveToValidSnapPosition($this, entity, new_0) {\n checkAndCorrectRotation($this, entity);\n }\n function checkAndCorrectRotation($this, entity) {\n var isDoorOrHandle = (entity.hasComponent(HandleComponent_getInstance().id) ? true : entity.hasComponent(DoorComponent_getInstance().id)) ? true : entity.hasComponent(DoorFrontComponent_getInstance().id);\n if (!isDoorOrHandle) {\n return Unit_instance;\n }\n var tmp;\n if (entity.hasComponent(HandleComponent_getInstance().id)) {\n tmp = listOf(entity);\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_descendants(entity);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignment.HandleRotationSystem.checkAndCorrectRotation.' call\n if (element.hasComponent(HandleComponent_getInstance().id)) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var handles = tmp;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = handles.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignment.HandleRotationSystem.checkAndCorrectRotation.' call\n if (!isUnderAlignment($this, element_0)) {\n findAndApplyPossibleAlignment($this, element_0);\n }\n }\n }\n function findAndApplyPossibleAlignment($this, entity) {\n markAsUnderAlignment($this, entity);\n validateAndReSnap($this, entity);\n unmarkAsUnderAlignment($this, entity);\n }\n function validateAndReSnap($this, entity) {\n var tmp0_elvis_lhs = get_snapRoot(entity);\n var tmp1_elvis_lhs = get_parent(tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var parent = tmp;\n var tmp2_safe_receiver = get_highestPriorityConnection(entity);\n var currentConnector = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hostConnector;\n var possibleSnap = findValidSnapCandidate($this, entity, parent);\n if (!(possibleSnap == null) ? !equals(currentConnector, possibleSnap.hostConnector) : false) {\n possibleSnap.createAction().perform();\n } else if (possibleSnap == null) {\n var tmp_0 = Companion_getInstance_10().x2v_1;\n tmp_0.debug(HandleRotationSystem$validateAndReSnap$lambda(entity));\n }\n }\n function findValidSnapCandidate($this, entity, parent) {\n var tmp0_elvis_lhs = get_snapRoot(entity);\n var snappingGuestEntity = tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs;\n // Inline function 'kotlin.collections.sortedByDescending' call\n var this_0 = toList(SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_DISTANCE.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidates(snappingGuestEntity, parent)));\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp = HandleRotationSystem$findValidSnapCandidate$lambda;\n var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);\n var matchingSnaps = sortedWith(this_0, tmp$ret$0);\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$2 = copyToArray(matchingSnaps);\n var validationResults = $this.g2w_1.getFirstValidSnapAction(tmp$ret$2);\n return validationResults.snapActionCandidate;\n }\n function isUnderAlignment($this, entity) {\n return entity.hasComponent(HandleUnderAlignmentComponent_getInstance().j2w_1);\n }\n function markAsUnderAlignment($this, entity) {\n entity.addComponentInternal(HandleUnderAlignmentComponent_getInstance());\n }\n function unmarkAsUnderAlignment($this, entity) {\n entity.removeComponentInternal(HandleUnderAlignmentComponent_getInstance().j2w_1);\n }\n function HandleUnderAlignmentComponent() {\n HandleUnderAlignmentComponent_instance = this;\n this.j2w_1 = this.id;\n }\n protoOf(HandleUnderAlignmentComponent).x1k = function () {\n return this.j2w_1;\n };\n protoOf(HandleUnderAlignmentComponent).s1k = function () {\n return 52;\n };\n protoOf(HandleUnderAlignmentComponent).eq = function (other) {\n return true;\n };\n var HandleUnderAlignmentComponent_instance;\n function HandleUnderAlignmentComponent_getInstance() {\n if (HandleUnderAlignmentComponent_instance == null)\n new HandleUnderAlignmentComponent();\n return HandleUnderAlignmentComponent_instance;\n }\n function sam$kotlin_Comparator$0(function_0) {\n this.k2w_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0).u1j = function (a, b) {\n return this.k2w_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function HandleRotationSystem$validateAndReSnap$lambda($entity) {\n return function () {\n return 'No valid snap found when trying to ensure correct rotation of entity ' + $entity.id + ' ' + $entity;\n };\n }\n function HandleRotationSystem$findValidSnapCandidate$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.alignment.HandleRotationSystem.findValidSnapCandidate.' call\n var tmp = b.priority;\n // Inline function 'com.ikea.core.stl.alignment.HandleRotationSystem.findValidSnapCandidate.' call\n var tmp$ret$1 = a.priority;\n return compareValues(tmp, tmp$ret$1);\n }\n function HandleRotationSystem(validationService, sceneManager) {\n Companion_getInstance_10();\n SystemBase.call(this, 'HandleRotationSystem', 45);\n this.g2w_1 = validationService;\n this.h2w_1 = sceneManager;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.i2w_1 = [52];\n }\n protoOf(HandleRotationSystem).onAddComponent = function (entity, newComponent) {\n onMoveToValidSnapPosition(this, entity, newComponent);\n };\n protoOf(HandleRotationSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(HandleRotationSystem).onRemoveComponent = function (entity, oldComponent) {\n };\n protoOf(HandleRotationSystem).w1o = function () {\n return this.i2w_1;\n };\n function validateWithParent($this, guestConnector, hostEntity, hostConnector) {\n var tmp;\n if (guestConnector.hasTag('requireUpwardParent')) {\n var tmp_0;\n if (hostConnector.isRotatedUpward(hostEntity)) {\n tmp_0 = null;\n } else {\n tmp_0 = Companion_instance_0.fail('Guest connector requires a host connector that is rotated upwards.');\n }\n tmp = tmp_0;\n } else {\n if (guestConnector.hasTag('requireDownwardParent')) {\n var tmp_1;\n if (!hostConnector.isRotatedUpward(hostEntity)) {\n tmp_1 = null;\n } else {\n tmp_1 = Companion_instance_0.fail('Guest connector requires a host connector that is not rotated upwards.');\n }\n tmp = tmp_1;\n } else {\n tmp = null;\n }\n }\n return tmp;\n }\n function HostConnectorRotationValidation() {\n ValidationImpl.call(this);\n this.m2w_1 = 'HostConnectorRotationValidation';\n }\n protoOf(HostConnectorRotationValidation).s1k = function () {\n return this.m2w_1;\n };\n protoOf(HostConnectorRotationValidation).validateCurrentState = function (entity) {\n return null;\n };\n protoOf(HostConnectorRotationValidation).validateSnap = function (snapActionCandidate) {\n return validateWithParent(this, snapActionCandidate.guestConnector, snapActionCandidate.host, snapActionCandidate.hostConnector);\n };\n function getCloseKey($this, key) {\n return getCloseKeyFromSet(key, $this.o2w_1.o2(), $this.n2w_1);\n }\n function getCloseConnectorKey($this, key) {\n return getCloseKeyFromSet(key, $this.p2w_1.o2(), $this.n2w_1);\n }\n function AlignmentLinesReferenceCounter(epsilon) {\n epsilon = epsilon === VOID ? 1.0 : epsilon;\n this.n2w_1 = epsilon;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp.o2w_1 = LinkedHashMap_init_$Create$();\n var tmp_0 = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp_0.p2w_1 = LinkedHashMap_init_$Create$();\n }\n protoOf(AlignmentLinesReferenceCounter).q2w = function () {\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.p2w_1;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this_0.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesReferenceCounter..' call\n var tmp$ret$1 = item.u2().key;\n destination.q(tmp$ret$1);\n }\n return destination;\n };\n protoOf(AlignmentLinesReferenceCounter).addReferenceCount = function (key) {\n var usedKey = getCloseKey(this, key);\n var current = this.o2w_1.b3(usedKey);\n if (current == null ? true : current === 0) {\n // Inline function 'kotlin.collections.set' call\n this.o2w_1.r2(usedKey, 1);\n return true;\n }\n // Inline function 'kotlin.collections.set' call\n var this_0 = this.o2w_1;\n var value = current + 1 | 0;\n this_0.r2(usedKey, value);\n return false;\n };\n protoOf(AlignmentLinesReferenceCounter).subtractReferenceCount = function (key) {\n var usedKey = getCloseKey(this, key);\n var tmp0_elvis_lhs = this.o2w_1.b3(usedKey);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw Exception_init_$Create$('Tried to remove reference count at ' + key + ' where none existed Sender: ' + this);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var current = tmp;\n current = current - 1 | 0;\n if (current === 0) {\n this.o2w_1.v2(usedKey);\n } else {\n // Inline function 'kotlin.collections.set' call\n var this_0 = this.o2w_1;\n var value = current;\n this_0.r2(usedKey, value);\n }\n if (current === 0)\n return true;\n return false;\n };\n protoOf(AlignmentLinesReferenceCounter).registerConnector = function (connector, key) {\n var usedKey = getCloseKey(this, key);\n // Inline function 'kotlin.collections.contains' call\n // Inline function 'kotlin.collections.containsKey' call\n var this_0 = this.p2w_1;\n if ((isInterface(this_0, Map) ? this_0 : THROW_CCE()).y2(usedKey))\n throw Exception_init_$Create$('Cannot add several connectors to the same position, already has one at ' + key + ' Sender: ' + this);\n // Inline function 'kotlin.collections.set' call\n this.p2w_1.r2(usedKey, connector);\n };\n protoOf(AlignmentLinesReferenceCounter).unregisterConnector = function (key) {\n var usedKey = getCloseConnectorKey(this, key);\n this.p2w_1.v2(usedKey);\n };\n protoOf(AlignmentLinesReferenceCounter).getConnector = function (key) {\n var usedKey = getCloseConnectorKey(this, key);\n var tmp0_elvis_lhs = this.p2w_1.b3(usedKey);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw Exception_init_$Create$('No connector exists at ' + key + ' Sender: ' + this);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(AlignmentLinesReferenceCounter).hasConnector = function (key) {\n var usedKey = getCloseKey(this, key);\n return this.p2w_1.y2(usedKey);\n };\n protoOf(AlignmentLinesReferenceCounter).toString = function () {\n var str = '';\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this.o2w_1.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesReferenceCounter.toString.' call\n str = str + ('At: ' + element.t2() + ' has ' + element.u2() + ' entries\\n');\n }\n return str;\n };\n function Companion_2() {\n this.ID = 'AlignmentLinesSystem';\n }\n protoOf(Companion_2).u1n = function () {\n return this.ID;\n };\n var Companion_instance_35;\n function Companion_getInstance_11() {\n return Companion_instance_35;\n }\n function clearAlignmentEdgesFeature($this) {\n var tmp0_safe_receiver = $this.j2x_1;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p2x();\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.clearAlignmentEdgesFeature.' call\n var tmp0_safe_receiver_0 = $this.g2x_1;\n var tmp;\n if (tmp0_safe_receiver_0 == null) {\n tmp = null;\n } else {\n Companion_getInstance_2();\n tmp = tmp0_safe_receiver_0.__getComponentForKotlin(11);\n }\n var tmp1_safe_receiver_0 = tmp;\n var tmp_0;\n if (tmp1_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.clearAlignmentEdgesFeature..' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = tmp1_safe_receiver_0.connectors;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.clearAlignmentEdgesFeature...' call\n if (!tmp1_safe_receiver.p(element.key)) {\n destination.q(element);\n }\n }\n var connectorsToKeep = destination;\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$3 = copyToArray(connectorsToKeep);\n var newConnectorsComponent = new ConnectorsComponent(tmp$ret$3);\n var tmp0_safe_receiver_1 = $this.g2x_1;\n tmp_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.addComponent(newConnectorsComponent);\n }\n }\n }\n function initializeAlignmentEdgesFeature($this) {\n $this.j2x_1 = null;\n var tmp0_safe_receiver = $this.g2x_1;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_connectorsComponent(tmp0_safe_receiver);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.connectors;\n var tmp;\n if (tmp2_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.initializeAlignmentEdgesFeature.' call\n var tmp_0;\n // Inline function 'kotlin.collections.isEmpty' call\n if ($this.h2x_1.length === 0) {\n tmp_0 = true;\n } else {\n tmp_0 = contains($this.h2x_1, element.key);\n }\n if (tmp_0) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var tmp3_safe_receiver = tmp;\n var tmp_1;\n if (tmp3_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.filterIsInstance' call\n // Inline function 'kotlin.collections.filterIsInstanceTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = tmp3_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n if (element_0 instanceof SurfaceConnector) {\n destination_0.q(element_0);\n }\n }\n tmp_1 = destination_0;\n }\n var tmp4_elvis_lhs = tmp_1;\n var roomSurfaceConnectors = tmp4_elvis_lhs == null ? emptyList() : tmp4_elvis_lhs;\n if (!any(roomSurfaceConnectors))\n return Unit_instance;\n var tmp5_safe_receiver = $this.g2x_1;\n if (tmp5_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var newAlignments = new RoomAlignmentEdgesComponent($this.b2x_1, $this.c2x_1, $this.f2x_1, $this.d2x_1, $this.e2x_1, roomSurfaceConnectors, tmp5_safe_receiver);\n tmp5_safe_receiver.addComponent(newAlignments);\n $this.j2x_1 = newAlignments;\n var indexedObject = getHierarchyWithComponent(tmp5_safe_receiver, $this.a2x_1);\n var inductionVariable_0 = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable_0 < last_0) {\n var element_1 = indexedObject[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.initializeAlignmentEdgesFeature..' call\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = get_guestConnections(element_1);\n var inductionVariable_1 = 0;\n var last_1 = indexedObject_0.length;\n while (inductionVariable_1 < last_1) {\n var element_2 = indexedObject_0[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.initializeAlignmentEdgesFeature...' call\n var surfaceConnector = getSurfaceConnector($this, element_2);\n if (surfaceConnector == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n addRoomAlignmentsForAlignmentEntity($this, element_1, surfaceConnector);\n }\n }\n }\n }\n }\n function onAddConnection($this, entity, newConnection) {\n var tmp0_safe_receiver = getSurfaceConnector($this, newConnection);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n addRoomAlignmentsForAlignmentEntity($this, entity, tmp0_safe_receiver);\n }\n }\n function isPartOfDraggedHierarchy($this, entity) {\n return $this.m2x_1.p(entity);\n }\n function onRemoveConnection($this, entity, oldConnection) {\n var tmp0_safe_receiver = getSurfaceConnector($this, oldConnection);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n removeRoomAlignmentsForAlignmentEntity($this, entity, tmp0_safe_receiver, oldConnection);\n }\n }\n function onStartedDragging($this, entity) {\n var tmp0_elvis_lhs = get_snapRoot(entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var draggedEntity = tmp;\n var tmp_0 = HierarchyUtils_instance;\n tmp_0.forEachInHierarchy(draggedEntity, AlignmentLinesSystem$onStartedDragging$lambda($this));\n $this.l2x_1 = draggedEntity;\n addAll($this.m2x_1, getHierarchyWithComponent(draggedEntity, 28));\n $this.n2x_1 = get_worldTransform(draggedEntity);\n }\n function onStoppedDragging($this, entity) {\n var tmp0_elvis_lhs = $this.l2x_1;\n var draggedEntity = tmp0_elvis_lhs == null ? get_snapRoot(entity) : tmp0_elvis_lhs;\n var tmp;\n if (draggedEntity == null) {\n tmp = true;\n } else {\n var tmp1_safe_receiver = $this.n2x_1;\n tmp = (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.equals(get_worldTransform(draggedEntity))) === true;\n }\n if (tmp) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = $this.m2x_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.onStoppedDragging.' call\n Companion_getInstance_1();\n var tmp0_safe_receiver = element.__getComponentForKotlin(104);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n $this.onAddComponent(element, tmp0_safe_receiver);\n }\n }\n }\n clearDragged($this);\n }\n function clearDragged($this) {\n $this.n2x_1 = null;\n $this.l2x_1 = null;\n $this.m2x_1.z();\n }\n function isApplicableGuestEntity($this, entity) {\n var tmp1_elvis_lhs = entity == null ? null : entity.hasComponent($this.a2x_1);\n return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;\n }\n function getSurfaceConnector($this, connection) {\n if (get_isRoom(connection.hostConnectorEntity)) {\n var tmp;\n if (connection.hostConnector instanceof SurfaceConnector) {\n var sc = connection.hostConnector;\n tmp = sc instanceof SurfaceConnector ? sc : THROW_CCE();\n } else {\n tmp = null;\n }\n return tmp;\n }\n return null;\n }\n function addRoomAlignmentsForAlignmentEntity($this, entity, wallConnector) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var addedConnectors = ArrayList_init_$Create$();\n var tmp0_safe_receiver = $this.g2x_1;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.addRoomAlignmentsForAlignmentEntity.' call\n var tmp0_safe_receiver_0 = $this.j2x_1;\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.verticalAlignmentKeys;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.addRoomAlignmentsForAlignmentEntity..' call\n Companion_getInstance_12().addVertical(tmp0_safe_receiver, wallConnector, entity, element, addedConnectors);\n }\n }\n var tmp2_safe_receiver = $this.j2x_1;\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.horizontalAlignmentKeys;\n var tmp;\n if (tmp3_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = tmp3_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = tmp3_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.addRoomAlignmentsForAlignmentEntity..' call\n Companion_getInstance_12().addHorizontal(tmp0_safe_receiver, wallConnector, entity, element_0, addedConnectors);\n }\n tmp = Unit_instance;\n }\n }\n if (addedConnectors.b1())\n return Unit_instance;\n var tmp1_safe_receiver_0 = $this.g2x_1;\n var tmp2_elvis_lhs = tmp1_safe_receiver_0 == null ? null : get_connectorsComponent(tmp1_safe_receiver_0);\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$3 = [];\n tmp_0 = new ConnectorsComponent(tmp$ret$3);\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n var connectorsComponent = tmp_0;\n var tmp3_safe_receiver_0 = $this.g2x_1;\n if (tmp3_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.addRoomAlignmentsForAlignmentEntity.' call\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$4 = copyToArray(addedConnectors);\n $this.k2x_1.addComponent(tmp3_safe_receiver_0, connectorsComponent.plusConnectors(tmp$ret$4));\n }\n }\n function removeRoomAlignmentsForAlignmentEntity($this, entity, wallConnector, oldConnection) {\n var tmp;\n if (oldConnection.guestConnectorEntity.equals(entity)) {\n tmp = get_worldTransform(oldConnection.hostConnectorEntity).concatenate(oldConnection.hostGuestDeltaTransform);\n } else {\n tmp = get_worldTransform(oldConnection.hostConnectorEntity).concatenate(oldConnection.hostGuestDeltaTransform).concatenate(get_worldTransform(entity).delta(get_worldTransform(oldConnection.guestConnectorEntity)));\n }\n var oldTransform = tmp;\n // Inline function 'kotlin.collections.mutableListOf' call\n var removedConnectors = ArrayList_init_$Create$();\n var tmp1_safe_receiver = $this.g2x_1;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : get_connectorsComponent(tmp1_safe_receiver);\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n var connectorsComponent = tmp_0;\n var tmp3_safe_receiver = $this.g2x_1;\n if (tmp3_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.removeRoomAlignmentsForAlignmentEntity.' call\n var tmp0_safe_receiver = $this.j2x_1;\n var tmp1_safe_receiver_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.verticalAlignmentKeys;\n if (tmp1_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver_0.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.removeRoomAlignmentsForAlignmentEntity..' call\n Companion_getInstance_12().removeVertical(tmp3_safe_receiver, wallConnector, entity, element, removedConnectors, oldTransform);\n }\n }\n var tmp2_safe_receiver = $this.j2x_1;\n var tmp3_safe_receiver_0 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.horizontalAlignmentKeys;\n var tmp_1;\n if (tmp3_safe_receiver_0 == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = tmp3_safe_receiver_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = tmp3_safe_receiver_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.removeRoomAlignmentsForAlignmentEntity..' call\n Companion_getInstance_12().removeHorizontal(tmp3_safe_receiver, wallConnector, entity, element_0, removedConnectors, oldTransform);\n }\n tmp_1 = Unit_instance;\n }\n }\n if (!any(removedConnectors))\n return Unit_instance;\n var tmp_2 = connectorsComponent;\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$3 = copyToArray(removedConnectors);\n connectorsComponent = tmp_2.minusConnectors(tmp$ret$3);\n var tmp4_safe_receiver = $this.g2x_1;\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.removeRoomAlignmentsForAlignmentEntity.' call\n $this.k2x_1.addComponent(tmp4_safe_receiver, connectorsComponent);\n }\n }\n function onRoomRebuild($this, room) {\n $this.g2x_1 = room;\n if ($this.i2x_1)\n return Unit_instance;\n initializeAlignmentEdgesFeature($this);\n }\n function AlignmentLinesSystem$enable$lambda(it) {\n Companion_getInstance_88();\n return it.hasComponent(70);\n }\n function AlignmentLinesSystem$onStartedDragging$lambda(this$0) {\n return function (hierarchyMember) {\n Companion_getInstance_1();\n var tmp0_safe_receiver = hierarchyMember.__getComponentForKotlin(104);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n this$0.onRemoveComponent(hierarchyMember, tmp0_safe_receiver);\n }\n return Unit_instance;\n };\n }\n function AlignmentLinesSystem(coreServices, tagComponentId, activationDistance, priority, horizontalAlignmentKeys, verticalAlignmentKeys, offeredTags) {\n activationDistance = activationDistance === VOID ? 100.0 : activationDistance;\n priority = priority === VOID ? 5 : priority;\n var tmp;\n if (horizontalAlignmentKeys === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = ['line-align-bottom-left', 'line-align-top-right'];\n } else {\n tmp = horizontalAlignmentKeys;\n }\n horizontalAlignmentKeys = tmp;\n var tmp_0;\n if (verticalAlignmentKeys === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = ['line-align-bottom-left', 'line-align-top-right'];\n } else {\n tmp_0 = verticalAlignmentKeys;\n }\n verticalAlignmentKeys = tmp_0;\n var tmp_1;\n if (offeredTags === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_1 = ['frame'];\n } else {\n tmp_1 = offeredTags;\n }\n offeredTags = tmp_1;\n Companion_getInstance_1();\n Companion_getInstance_88();\n var tmp_2 = IsDraggedComponent_instance.id;\n var tmp_3 = SceneReloadingComponent_instance.id;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_4 = [11];\n // Inline function 'kotlin.arrayOf' call\n Companion_getInstance_0();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$14 = ['ConnectionParentingSystem', 'RoomSystem'];\n SystemBase4.call(this, 'AlignmentLinesSystem', 104, 70, tmp_2, tmp_3, tmp_4, tmp$ret$14, null);\n this.z2w_1 = coreServices;\n this.a2x_1 = tagComponentId;\n this.b2x_1 = activationDistance;\n this.c2x_1 = priority;\n this.d2x_1 = horizontalAlignmentKeys;\n this.e2x_1 = verticalAlignmentKeys;\n this.f2x_1 = offeredTags;\n this.g2x_1 = null;\n var tmp_5 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_5.h2x_1 = [];\n this.i2x_1 = false;\n this.j2x_1 = null;\n this.k2x_1 = this.z2w_1.entityManager;\n this.l2x_1 = null;\n var tmp_6 = this;\n // Inline function 'kotlin.collections.mutableSetOf' call\n tmp_6.m2x_1 = LinkedHashSet_init_$Create$();\n this.n2x_1 = null;\n this.enable();\n }\n protoOf(AlignmentLinesSystem).enable = function () {\n protoOf(SystemBase4).enable.call(this);\n this.i2x_1 = false;\n var tmp = this;\n var tmp_0 = this.z2w_1.sceneManager.scene;\n tmp.g2x_1 = findInHierarchy(tmp_0, AlignmentLinesSystem$enable$lambda);\n initializeAlignmentEdgesFeature(this);\n };\n protoOf(AlignmentLinesSystem).disable = function () {\n protoOf(SystemBase4).disable.call(this);\n clearAlignmentEdgesFeature(this);\n };\n protoOf(AlignmentLinesSystem).setRoomSurfaceKeys = function (keys) {\n this.h2x_1 = keys;\n clearAlignmentEdgesFeature(this);\n initializeAlignmentEdgesFeature(this);\n };\n protoOf(AlignmentLinesSystem).onAddComponent = function (entity, newComponent) {\n if (this.i2x_1)\n return Unit_instance;\n if (!isApplicableGuestEntity(this, entity))\n return Unit_instance;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = newComponent.connections;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.onAddComponent.' call\n onAddConnection(this, entity, element);\n }\n };\n protoOf(AlignmentLinesSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n if (this.i2x_1)\n return Unit_instance;\n this.onAddComponent(entity, newComponent);\n this.onRemoveComponent(entity, oldComponent);\n };\n protoOf(AlignmentLinesSystem).onRemoveComponent = function (entity, oldComponent) {\n if (this.i2x_1)\n return Unit_instance;\n if (!isApplicableGuestEntity(this, entity))\n return Unit_instance;\n if (isPartOfDraggedHierarchy(this, entity)) {\n return Unit_instance;\n }\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = oldComponent.connections;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignmentlines.AlignmentLinesSystem.onRemoveComponent.' call\n onRemoveConnection(this, entity, element);\n }\n };\n protoOf(AlignmentLinesSystem).onAddComponent2 = function (entity, newComponent) {\n onRoomRebuild(this, entity);\n };\n protoOf(AlignmentLinesSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n onRoomRebuild(this, entity);\n };\n protoOf(AlignmentLinesSystem).onRemoveComponent2 = function (entity, oldComponent) {\n };\n protoOf(AlignmentLinesSystem).onAddComponent3 = function (entity, newComponent) {\n onStartedDragging(this, entity);\n };\n protoOf(AlignmentLinesSystem).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n };\n protoOf(AlignmentLinesSystem).onRemoveComponent3 = function (entity, oldComponent) {\n onStoppedDragging(this, entity);\n };\n protoOf(AlignmentLinesSystem).onAddComponent4 = function (entity, newComponent) {\n this.i2x_1 = true;\n };\n protoOf(AlignmentLinesSystem).onUpdateComponent4 = function (entity, oldComponent, newComponent) {\n };\n protoOf(AlignmentLinesSystem).onRemoveComponent4 = function (entity, oldComponent) {\n this.i2x_1 = false;\n initializeAlignmentEdgesFeature(this);\n };\n function getConnectorOldPosition($this, oldTransform, connector) {\n return connector.getWorldPositionFromOwnerTransform(oldTransform);\n }\n function AlignmentLinesUtils$Companion$addVertical$lambda($alignmentEntity, $atAlignmentEntityConnector, $ex) {\n return function () {\n return 'Add vertical failed Entity id: ' + $alignmentEntity.id + ' connector: ' + $atAlignmentEntityConnector + ' ' + $ex;\n };\n }\n function AlignmentLinesUtils$Companion$addHorizontal$lambda($alignmentEntity, $atAlignmentEntityConnector, $ex) {\n return function () {\n return 'Add horizontal failed Entity id: ' + $alignmentEntity.id + ' connector: ' + $atAlignmentEntityConnector + ' ' + $ex;\n };\n }\n function AlignmentLinesUtils$Companion$removeHorizontal$lambda($alignmentEntity, $atConnector, $ex) {\n return function () {\n return 'Remove horizontal failed Entity id: ' + $alignmentEntity.id + ' connector: ' + $atConnector + ' ' + $ex;\n };\n }\n function AlignmentLinesUtils$Companion$removeVertical$lambda($alignmentEntity, $atConnector, $ex) {\n return function () {\n return 'Remove vertical failed Entity id: ' + $alignmentEntity.id + ' connector: ' + $atConnector + ' ' + $ex;\n };\n }\n function Companion_3() {\n Companion_instance_36 = this;\n this.q2x_1 = LoggerState_getInstance().m1m('AlignmentLinesUtils');\n }\n protoOf(Companion_3).addVertical = function (room, wallConnector, alignmentEntity, atAlignmentEntityConnector, addedConnectors) {\n try {\n var tmp0_elvis_lhs = room.__getComponentForKotlin(64);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var roomAlignments = tmp;\n var tmp1_elvis_lhs = roomAlignments.getAlignmentLinesForSurface(wallConnector);\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var alignmentLines = tmp_0;\n var tmp2_safe_receiver = get_connectorsComponent(alignmentEntity);\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.alignmentConnectors;\n var tmp_1;\n if (tmp3_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = tmp3_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.Companion.addVertical.' call\n if (element.key === atAlignmentEntityConnector) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp_1 = tmp$ret$1;\n }\n var tmp4_safe_receiver = tmp_1;\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var posWorld = tmp4_safe_receiver.getWorldPositionFromOwnerEntity(alignmentEntity);\n alignmentLines.addVerticalLine(posWorld, addedConnectors);\n }\n } catch ($p) {\n if ($p instanceof Exception) {\n var ex = $p;\n this.q2x_1.error(AlignmentLinesUtils$Companion$addVertical$lambda(alignmentEntity, atAlignmentEntityConnector, ex));\n } else {\n throw $p;\n }\n }\n };\n protoOf(Companion_3).addHorizontal = function (room, wallConnector, alignmentEntity, atAlignmentEntityConnector, addedConnectors) {\n try {\n var tmp0_elvis_lhs = room.__getComponentForKotlin(64);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var roomAlignments = tmp;\n var tmp1_elvis_lhs = roomAlignments.getAlignmentLinesForSurface(wallConnector);\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var alignmentLines = tmp_0;\n var tmp2_safe_receiver = get_connectorsComponent(alignmentEntity);\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.alignmentConnectors;\n var tmp_1;\n if (tmp3_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = tmp3_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.Companion.addHorizontal.' call\n if (element.key === atAlignmentEntityConnector) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp_1 = tmp$ret$1;\n }\n var tmp4_safe_receiver = tmp_1;\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var posWorld = tmp4_safe_receiver.getWorldPositionFromOwnerEntity(alignmentEntity);\n alignmentLines.addHorizontal(posWorld, addedConnectors);\n }\n } catch ($p) {\n if ($p instanceof Exception) {\n var ex = $p;\n this.q2x_1.error(AlignmentLinesUtils$Companion$addHorizontal$lambda(alignmentEntity, atAlignmentEntityConnector, ex));\n } else {\n throw $p;\n }\n }\n };\n protoOf(Companion_3).removeHorizontal = function (room, wallConnector, alignmentEntity, atConnector, removedConnectors, oldTransform) {\n try {\n var tmp0_elvis_lhs = room.__getComponentForKotlin(64);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw Exception_init_$Create$('Cannot remove alignment connectors unless there is a room with a ' + Companion_instance_37);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var roomAlignments = tmp;\n var tmp1_elvis_lhs = roomAlignments.getAlignmentLinesForSurface(wallConnector);\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var alignmentLines = tmp_0;\n var tmp2_safe_receiver = get_connectorsComponent(alignmentEntity);\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.alignmentConnectors;\n var tmp_1;\n if (tmp3_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = tmp3_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.Companion.removeHorizontal.' call\n if (element.key === atConnector) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp_1 = tmp$ret$1;\n }\n var tmp4_safe_receiver = tmp_1;\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var oldConnectorPosWorld = getConnectorOldPosition(Companion_getInstance_12(), oldTransform, tmp4_safe_receiver);\n alignmentLines.removeHorizontalLine(oldConnectorPosWorld, removedConnectors);\n }\n } catch ($p) {\n if ($p instanceof Exception) {\n var ex = $p;\n this.q2x_1.error(AlignmentLinesUtils$Companion$removeHorizontal$lambda(alignmentEntity, atConnector, ex));\n } else {\n throw $p;\n }\n }\n };\n protoOf(Companion_3).removeVertical = function (room, wallConnector, alignmentEntity, atConnector, removedConnectors, oldTransform) {\n try {\n var tmp0_elvis_lhs = room.__getComponentForKotlin(64);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw Exception_init_$Create$('Cannot remove alignment connectors unless there is a room with a ' + Companion_instance_37);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var roomAlignments = tmp;\n var tmp1_elvis_lhs = roomAlignments.getAlignmentLinesForSurface(wallConnector);\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var alignmentLines = tmp_0;\n var tmp2_safe_receiver = get_connectorsComponent(alignmentEntity);\n var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.alignmentConnectors;\n var tmp_1;\n if (tmp3_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = tmp3_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.Companion.removeVertical.' call\n if (element.key === atConnector) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp_1 = tmp$ret$1;\n }\n var tmp4_safe_receiver = tmp_1;\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var oldConnectorPosWorld = getConnectorOldPosition(Companion_getInstance_12(), oldTransform, tmp4_safe_receiver);\n alignmentLines.removeVerticalLine(oldConnectorPosWorld, removedConnectors);\n }\n } catch ($p) {\n if ($p instanceof Exception) {\n var ex = $p;\n this.q2x_1.error(AlignmentLinesUtils$Companion$removeVertical$lambda(alignmentEntity, atConnector, ex));\n } else {\n throw $p;\n }\n }\n };\n var Companion_instance_36;\n function Companion_getInstance_12() {\n if (Companion_instance_36 == null)\n new Companion_3();\n return Companion_instance_36;\n }\n function AlignmentLinesUtils() {\n Companion_getInstance_12();\n }\n function IntersectionPointConnectors(priority, tags, offers, localToParentTransform, activationDistance) {\n this.r2x_1 = priority;\n this.s2x_1 = tags;\n this.t2x_1 = offers;\n this.u2x_1 = localToParentTransform;\n this.v2x_1 = activationDistance;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp.w2x_1 = LinkedHashMap_init_$Create$();\n }\n protoOf(IntersectionPointConnectors).q2w = function () {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = this.w2x_1;\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this_0.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.IntersectionPointConnectors..' call\n // Inline function 'kotlin.collections.map' call\n var this_1 = element.u2().p2();\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));\n var tmp0_iterator_0 = this_1.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.IntersectionPointConnectors...' call\n var tmp$ret$1 = item.key;\n destination_0.q(tmp$ret$1);\n }\n var list = destination_0;\n addAll_0(destination, list);\n }\n return destination;\n };\n protoOf(IntersectionPointConnectors).addConnector = function (x, y) {\n var pos = new Vector(x, 0.0, y);\n var posWS = this.u2x_1.transformPosition(pos);\n var tmp0_key = 'Intersection alignment at ' + pos;\n var tmp2_transform = new Transform(posWS, this.u2x_1.rotation);\n var tmp3_priority = this.r2x_1;\n var tmp4_tagArray = this.s2x_1;\n // Inline function 'kotlin.collections.plus' call\n var this_0 = this.t2x_1;\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = ['intersection'];\n var tmp5_offersArray = this_0.concat(tmp$ret$3);\n var tmp6_activationDistance = this.v2x_1;\n var connector = new PointConnector(tmp0_key, 2, tmp2_transform, tmp3_priority, tmp6_activationDistance, VOID, tmp4_tagArray, tmp5_offersArray);\n if (!this.w2x_1.y2(x)) {\n // Inline function 'kotlin.collections.set' call\n var this_1 = this.w2x_1;\n // Inline function 'kotlin.collections.mutableMapOf' call\n var value = LinkedHashMap_init_$Create$();\n this_1.r2(x, value);\n }\n var tmp7_safe_receiver = this.w2x_1.b3(x);\n if ((tmp7_safe_receiver == null ? null : tmp7_safe_receiver.y2(y)) === true)\n throw Exception_init_$Create$('Already has connector at (' + x + ',' + y + ')');\n var tmp8_safe_receiver = this.w2x_1.b3(x);\n if (tmp8_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.set' call\n tmp8_safe_receiver.r2(y, connector);\n }\n return connector;\n };\n protoOf(IntersectionPointConnectors).removeConnector = function (x, y) {\n var tmp0_safe_receiver = this.w2x_1.b3(x);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v2(y);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n throw Exception_init_$Create$('No connector exist at (' + x + ', ' + y + ')');\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n };\n function IntersectionPointsTracker$addHorizontalLine$lambda($closeY) {\n return function (x) {\n return new Pair(x, $closeY);\n };\n }\n function IntersectionPointsTracker$addVerticalLine$lambda($closeX) {\n return function (y) {\n return new Pair($closeX, y);\n };\n }\n function IntersectionPointsTracker$removeHorizontalLine$lambda($closeY) {\n return function (x) {\n return new Pair(x, $closeY);\n };\n }\n function IntersectionPointsTracker$removeVerticalLine$lambda($closeX) {\n return function (y) {\n return new Pair($closeX, y);\n };\n }\n function IntersectionPointsTracker(epsilon) {\n epsilon = epsilon === VOID ? 1.0 : epsilon;\n this.x2x_1 = epsilon;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableSetOf' call\n tmp.y2x_1 = LinkedHashSet_init_$Create$();\n var tmp_0 = this;\n // Inline function 'kotlin.collections.mutableSetOf' call\n tmp_0.z2x_1 = LinkedHashSet_init_$Create$();\n }\n protoOf(IntersectionPointsTracker).addHorizontalLine = function (y) {\n var closeY = getCloseKeyFromSet(y, this.z2x_1, this.x2x_1);\n if (this.z2x_1.p(closeY))\n throw Exception_init_$Create$('Already contains a horizontal line at y:' + y);\n this.z2x_1.q(closeY);\n var tmp = asSequence(this.y2x_1);\n return map(tmp, IntersectionPointsTracker$addHorizontalLine$lambda(closeY));\n };\n protoOf(IntersectionPointsTracker).addVerticalLine = function (x) {\n var closeX = getCloseKeyFromSet(x, this.y2x_1, this.x2x_1);\n if (this.y2x_1.p(closeX))\n throw Exception_init_$Create$('Already contains a vertical line at x:' + closeX);\n this.y2x_1.q(closeX);\n var tmp = asSequence(this.z2x_1);\n return map(tmp, IntersectionPointsTracker$addVerticalLine$lambda(closeX));\n };\n protoOf(IntersectionPointsTracker).removeHorizontalLine = function (y) {\n var closeY = getCloseKeyFromSet(y, this.z2x_1, this.x2x_1);\n if (!this.z2x_1.p(closeY))\n throw Exception_init_$Create$('Does not contain a horizontal line at y:' + closeY);\n this.z2x_1.r(closeY);\n var tmp = asSequence(this.y2x_1);\n return map(tmp, IntersectionPointsTracker$removeHorizontalLine$lambda(closeY));\n };\n protoOf(IntersectionPointsTracker).removeVerticalLine = function (x) {\n var closeX = getCloseKeyFromSet(x, this.y2x_1, this.x2x_1);\n if (!this.y2x_1.p(closeX))\n throw Exception_init_$Create$('Does not contain a vertical line at x:' + closeX);\n this.y2x_1.r(closeX);\n var tmp = asSequence(this.z2x_1);\n return map(tmp, IntersectionPointsTracker$removeVerticalLine$lambda(closeX));\n };\n function Companion_4() {\n this.id = 64;\n }\n protoOf(Companion_4).s1k = function () {\n return this.id;\n };\n var Companion_instance_37;\n function Companion_getInstance_13() {\n return Companion_instance_37;\n }\n function RoomAlignmentEdgesComponent(activationDistance, priority, offeredTags, horizontalAlignmentKeys, verticalAlignmentKeys, surfaceConnectors, surfaceConnectorsOwnerEntity) {\n this.activationDistance = activationDistance;\n this.priority = priority;\n this.horizontalAlignmentKeys = horizontalAlignmentKeys;\n this.verticalAlignmentKeys = verticalAlignmentKeys;\n var tmp = this;\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(surfaceConnectors, 10));\n var tmp0_iterator = surfaceConnectors.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.RoomAlignmentEdgesComponent.surfacesAlignmentLines.' call\n var tmp$ret$0 = new SurfaceAlignmentLines(item, surfaceConnectorsOwnerEntity, this.priority, this.activationDistance, offeredTags);\n destination.q(tmp$ret$0);\n }\n tmp.o2x_1 = destination;\n }\n protoOf(RoomAlignmentEdgesComponent).l1x = function () {\n return this.activationDistance;\n };\n protoOf(RoomAlignmentEdgesComponent).v1v = function () {\n return this.priority;\n };\n protoOf(RoomAlignmentEdgesComponent).a2y = function () {\n return this.horizontalAlignmentKeys;\n };\n protoOf(RoomAlignmentEdgesComponent).b2y = function () {\n return this.verticalAlignmentKeys;\n };\n protoOf(RoomAlignmentEdgesComponent).getAlignmentLinesForSurface = function (surfaceConnector) {\n return this.getAlignmentLinesForSurfaceKey(surfaceConnector.p22_1);\n };\n protoOf(RoomAlignmentEdgesComponent).getAlignmentLinesForSurfaceKey = function (surfaceConnectorKey) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this.o2x_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.RoomAlignmentEdgesComponent.getAlignmentLinesForSurfaceKey.' call\n if (element.surfaceConnector.p22_1 === surfaceConnectorKey) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n };\n protoOf(RoomAlignmentEdgesComponent).x1k = function () {\n return 64;\n };\n protoOf(RoomAlignmentEdgesComponent).eq = function (other) {\n return false;\n };\n protoOf(RoomAlignmentEdgesComponent).p2x = function () {\n // Inline function 'kotlin.collections.mutableSetOf' call\n var connectorKeys = LinkedHashSet_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.o2x_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.RoomAlignmentEdgesComponent.getAllGeneratedAlignmentConnectors.' call\n connectorKeys.x(element.q2w());\n }\n return connectorKeys;\n };\n function getCloseKeyFromSet(key, set, epsilon) {\n if (!set.p(key)) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.minByOrNull' call\n var iterator = set.t();\n if (!iterator.u()) {\n tmp$ret$0 = null;\n break $l$block_0;\n }\n var minElem = iterator.w();\n if (!iterator.u()) {\n tmp$ret$0 = minElem;\n break $l$block_0;\n }\n // Inline function 'com.ikea.core.stl.alignmentlines.getCloseKeyFromSet.' call\n // Inline function 'kotlin.math.abs' call\n var x = minElem - key;\n var minValue = Math.abs(x);\n do {\n var e = iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.getCloseKeyFromSet.' call\n // Inline function 'kotlin.math.abs' call\n var x_0 = e - key;\n var v = Math.abs(x_0);\n if (compareTo(minValue, v) > 0) {\n minElem = e;\n minValue = v;\n }\n }\n while (iterator.u());\n tmp$ret$0 = minElem;\n }\n var closestAlternative = tmp$ret$0;\n var tmp;\n var tmp_0;\n if (closestAlternative == null) {\n tmp_0 = true;\n } else {\n // Inline function 'kotlin.math.abs' call\n var x_1 = closestAlternative - key;\n tmp_0 = Math.abs(x_1) >= epsilon;\n }\n if (tmp_0) {\n tmp = key;\n } else {\n tmp = closestAlternative;\n }\n return tmp;\n }\n return key;\n }\n function createHorizontalAlignmentConnector($this, height) {\n var halfWidth = $this.width / 2.0;\n var p1 = new Vector(halfWidth, VOID, height);\n var p2 = new Vector(-halfWidth, VOID, height);\n var p1EntitySpace = $this.surfaceConnector.y22_1.transformPosition(p1);\n var p2EntitySpace = $this.surfaceConnector.y22_1.transformPosition(p2);\n var tmp0_key = 'horizontal alignment height ' + height;\n var tmp2_rotation = $this.surfaceConnector.y22_1.rotation;\n var tmp3_priority = $this.d2y_1;\n // Inline function 'kotlin.emptyArray' call\n var tmp4_tagArray = [];\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$1 = $this.f2y_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = ['line'];\n var tmp5_offersArray = tmp$ret$1.concat(tmp$ret$4);\n var tmp6_activationDistance = $this.e2y_1;\n var connector = new EdgeConnector(tmp0_key, 2, p1EntitySpace, p2EntitySpace, tmp2_rotation, tmp3_priority, tmp6_activationDistance, VOID, tmp4_tagArray, tmp5_offersArray);\n $this.g2y_1.registerConnector(connector, height);\n return connector;\n }\n function createVerticalAlignmentConnector($this, x) {\n var halfHeight = $this.height * 0.5;\n var p1 = new Vector(x, 0.0, -halfHeight);\n var p2 = new Vector(x, 0.0, halfHeight);\n var p1EntitySpace = $this.surfaceConnector.y22_1.transformPosition(p1);\n var p2EntitySpace = $this.surfaceConnector.y22_1.transformPosition(p2);\n var tmp0_key = 'vertical alignment connector at x: ' + x;\n var tmp2_rotation = $this.surfaceConnector.y22_1.rotation;\n var tmp3_priority = $this.d2y_1;\n // Inline function 'kotlin.emptyArray' call\n var tmp4_tagArray = [];\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$1 = $this.f2y_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = ['line'];\n var tmp5_offersArray = tmp$ret$1.concat(tmp$ret$4);\n var tmp6_activationDistance = $this.e2y_1;\n var connector = new EdgeConnector(tmp0_key, 2, p1EntitySpace, p2EntitySpace, tmp2_rotation, tmp3_priority, tmp6_activationDistance, VOID, tmp4_tagArray, tmp5_offersArray);\n $this.h2y_1.registerConnector(connector, x);\n return connector;\n }\n function SurfaceAlignmentLines(surfaceConnector, ownerEntity, priority, activationDistance, offers, epsilon) {\n epsilon = epsilon === VOID ? 1.0 : epsilon;\n this.surfaceConnector = surfaceConnector;\n this.c2y_1 = ownerEntity;\n this.d2y_1 = priority;\n this.e2y_1 = activationDistance;\n this.f2y_1 = offers;\n this.g2y_1 = new AlignmentLinesReferenceCounter(epsilon);\n this.h2y_1 = new AlignmentLinesReferenceCounter(epsilon);\n this.i2y_1 = new IntersectionPointsTracker(epsilon);\n this.normal = this.surfaceConnector.plane.normal;\n this.center = this.surfaceConnector.y22_1.position;\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.surfaceConnector.vertices;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alignmentlines.SurfaceAlignmentLines.' call\n var tmp$ret$0 = this.surfaceConnector.y22_1.inverseTransformPosition(item);\n destination.q(tmp$ret$0);\n }\n var localSurfaceVertices = destination;\n var tmp = Companion_getInstance_3();\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$3 = copyToArray(localSurfaceVertices);\n var aabb = tmp.fromVertices(tmp$ret$3);\n var size = aabb.size;\n this.width = size.X;\n this.height = size.Z;\n var tmp_0 = this;\n var tmp0_localToParentTransform = this.surfaceConnector.y22_1;\n var tmp1_priority = this.d2y_1 + 1 | 0;\n // Inline function 'kotlin.emptyArray' call\n var tmp2_tags = [];\n var tmp3_offers = this.f2y_1;\n var tmp4_activationDistance = this.e2y_1;\n tmp_0.j2y_1 = new IntersectionPointConnectors(tmp1_priority, tmp2_tags, tmp3_offers, tmp0_localToParentTransform, tmp4_activationDistance);\n }\n protoOf(SurfaceAlignmentLines).k2y = function () {\n return this.surfaceConnector;\n };\n protoOf(SurfaceAlignmentLines).d23 = function () {\n return this.normal;\n };\n protoOf(SurfaceAlignmentLines).g2p = function () {\n return this.center;\n };\n protoOf(SurfaceAlignmentLines).u2b = function () {\n return this.width;\n };\n protoOf(SurfaceAlignmentLines).v2b = function () {\n return this.height;\n };\n protoOf(SurfaceAlignmentLines).q2w = function () {\n // Inline function 'kotlin.collections.mutableSetOf' call\n var keys = LinkedHashSet_init_$Create$();\n keys.x(this.j2y_1.q2w());\n keys.x(this.g2y_1.q2w());\n keys.x(this.h2y_1.q2w());\n return keys;\n };\n protoOf(SurfaceAlignmentLines).transformWorldSpaceToConnectorSpace = function (pointWorldSpace) {\n var ownerTransform = get_worldTransform(this.c2y_1);\n var posOwnerSpace = ownerTransform.inverseTransformPosition(pointWorldSpace);\n return this.surfaceConnector.y22_1.inverseTransformPosition(posOwnerSpace);\n };\n protoOf(SurfaceAlignmentLines).transformConnectorSpaceToWorldSpace = function (pointInConnectorSpace) {\n var ownerTransform = get_worldTransform(this.c2y_1);\n var posOwnerSpace = this.surfaceConnector.y22_1.transformPosition(pointInConnectorSpace);\n return ownerTransform.transformPosition(posOwnerSpace);\n };\n protoOf(SurfaceAlignmentLines).addVerticalLine = function (worldSpacePoint, addedConnectors) {\n var x = this.transformWorldSpaceToConnectorSpace(worldSpacePoint).X;\n if (this.h2y_1.addReferenceCount(x)) {\n var newEdgeConnector = createVerticalAlignmentConnector(this, x);\n addedConnectors.q(newEdgeConnector);\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = this.i2y_1.addVerticalLine(x).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.SurfaceAlignmentLines.addVerticalLine.' call\n var x_0 = element.af();\n var y = element.bf();\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var newPointConnector = this.j2y_1.addConnector(x_0, y);\n addedConnectors.q(newPointConnector);\n }\n }\n };\n protoOf(SurfaceAlignmentLines).addHorizontal = function (worldSpacePoint, addedConnectors) {\n var y = this.transformWorldSpaceToConnectorSpace(worldSpacePoint).Z;\n if (this.g2y_1.addReferenceCount(y)) {\n var horizontalConnector = createHorizontalAlignmentConnector(this, y);\n addedConnectors.q(horizontalConnector);\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = this.i2y_1.addHorizontalLine(y).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.SurfaceAlignmentLines.addHorizontal.' call\n var x = element.af();\n var y_0 = element.bf();\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var newPointConnector = this.j2y_1.addConnector(x, y_0);\n addedConnectors.q(newPointConnector);\n }\n }\n };\n protoOf(SurfaceAlignmentLines).removeHorizontalLine = function (worldSpacePoint, removedConnectors) {\n var y = this.transformWorldSpaceToConnectorSpace(worldSpacePoint).Z;\n if (this.g2y_1.subtractReferenceCount(y)) {\n var edgeToRemove = this.g2y_1.getConnector(y);\n this.g2y_1.unregisterConnector(y);\n removedConnectors.q(edgeToRemove);\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = this.i2y_1.removeHorizontalLine(y).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.SurfaceAlignmentLines.removeHorizontalLine.' call\n var x = element.af();\n var y_0 = element.bf();\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var removedPointConnector = this.j2y_1.removeConnector(x, y_0);\n removedConnectors.q(removedPointConnector);\n }\n }\n };\n protoOf(SurfaceAlignmentLines).removeVerticalLine = function (worldSpacePoint, removedConnectors) {\n var x = this.transformWorldSpaceToConnectorSpace(worldSpacePoint).X;\n if (this.h2y_1.subtractReferenceCount(x)) {\n var edgeToRemove = this.h2y_1.getConnector(x);\n this.h2y_1.unregisterConnector(x);\n removedConnectors.q(edgeToRemove);\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = this.i2y_1.removeVerticalLine(x).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alignmentlines.SurfaceAlignmentLines.removeVerticalLine.' call\n var x_0 = element.af();\n var y = element.bf();\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var removedPointConnector = this.j2y_1.removeConnector(x_0, y);\n removedConnectors.q(removedPointConnector);\n }\n }\n };\n function AllowedDoorPairsComponent_init_$Init$(width1, width2, $this) {\n width2 = width2 === VOID ? null : width2;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [new Pair(width1, width2)];\n AllowedDoorPairsComponent.call($this, tmp$ret$2);\n return $this;\n }\n function AllowedDoorPairsComponentFromInts(width1, width2) {\n return AllowedDoorPairsComponent_init_$Init$(width1, width2, objectCreate(protoOf(AllowedDoorPairsComponent)));\n }\n function AllowedDoorPairsComponent_init_$Init$_0(pairs, $this) {\n AllowedDoorPairsComponent.call($this, Companion_instance_38.toPairs(pairs));\n return $this;\n }\n function AllowedDoorPairsComponentFromArrays(pairs) {\n return AllowedDoorPairsComponent_init_$Init$_0(pairs, objectCreate(protoOf(AllowedDoorPairsComponent)));\n }\n function Companion_5() {\n this.id = 29;\n }\n protoOf(Companion_5).s1k = function () {\n return this.id;\n };\n protoOf(Companion_5).toPairs = function (values) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(values.length);\n var inductionVariable = 0;\n var last = values.length;\n while (inductionVariable < last) {\n var item = values[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alloweddoorpairs.Companion.toPairs.' call\n var tmp;\n switch (item.length) {\n case 1:\n tmp = new Pair(item[0], null);\n break;\n case 2:\n tmp = new Pair(item[0], item[1]);\n break;\n default:\n throw IllegalArgumentException_init_$Create$('Door pair must have one or two widths');\n }\n var tmp$ret$0 = tmp;\n destination.q(tmp$ret$0);\n }\n return copyToArray(destination);\n };\n var Companion_instance_38;\n function Companion_getInstance_14() {\n return Companion_instance_38;\n }\n function AllowedDoorPairsComponent(pairs) {\n this.pairs = pairs;\n var tmp = this;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = this.pairs;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alloweddoorpairs.AllowedDoorPairsComponent.allWidths.' call\n var width1 = element.af();\n var width2 = element.bf();\n var tmp_0;\n if (width2 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.alloweddoorpairs.AllowedDoorPairsComponent.allWidths..' call\n tmp_0 = listOf_0([width1, width2]);\n }\n var tmp1_elvis_lhs = tmp_0;\n var list = tmp1_elvis_lhs == null ? listOf(width1) : tmp1_elvis_lhs;\n addAll_0(destination, list);\n }\n tmp.l2y_1 = copyToArray(destination);\n }\n protoOf(AllowedDoorPairsComponent).m2y = function () {\n return this.pairs;\n };\n protoOf(AllowedDoorPairsComponent).x1k = function () {\n return 29;\n };\n protoOf(AllowedDoorPairsComponent).equals = function (other) {\n return other === other;\n };\n protoOf(AllowedDoorPairsComponent).hashCode = function () {\n var tmp;\n if (any_0(this.pairs)) {\n var tmp_0 = this.pairs[0].ye_1;\n var tmp0_elvis_lhs = this.pairs[0].ze_1;\n tmp = tmp_0 + (tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs) | 0;\n } else {\n tmp = 0;\n }\n return tmp;\n };\n protoOf(AllowedDoorPairsComponent).allows = function (oneDoorWidth, secondDoorWidth) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = this.pairs;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alloweddoorpairs.AllowedDoorPairsComponent.allows.' call\n var width1 = element.af();\n var width2 = element.bf();\n if ((width1 === oneDoorWidth ? width2 === secondDoorWidth : false) ? true : width2 === oneDoorWidth ? width1 === secondDoorWidth : false) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n return tmp$ret$1;\n };\n protoOf(AllowedDoorPairsComponent).isWidthAllowed = function (comSizeWidth) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = this.l2y_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alloweddoorpairs.AllowedDoorPairsComponent.isWidthAllowed.' call\n if (element === comSizeWidth) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n return tmp$ret$1;\n };\n protoOf(AllowedDoorPairsComponent).eq = function (other) {\n return false;\n };\n protoOf(AllowedDoorPairsComponent).af = function () {\n return this.pairs;\n };\n protoOf(AllowedDoorPairsComponent).n2y = function (pairs) {\n return new AllowedDoorPairsComponent(pairs);\n };\n protoOf(AllowedDoorPairsComponent).copy = function (pairs, $super) {\n pairs = pairs === VOID ? this.pairs : pairs;\n return this.n2y(pairs);\n };\n protoOf(AllowedDoorPairsComponent).toString = function () {\n return 'AllowedDoorPairsComponent(pairs=' + toString(this.pairs) + ')';\n };\n function validate($this, entity, snapActionCandidate) {\n var tmp1_elvis_lhs = snapActionCandidate == null ? null : snapActionCandidate.host;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var parent = tmp;\n var allowedDoorPairs = parent.__getComponentForKotlin(29);\n var entityIsDoor = entity.hasComponent(DoorComponent_getInstance().o2y_1);\n if (!(allowedDoorPairs == null) ? entityIsDoor : false) {\n return allowedToPlaceFrontOnFrame($this, allowedDoorPairs, entity, parent);\n }\n return null;\n }\n function allowedToPlaceFrontOnFrame($this, allowedDoorPairsComponent, newDoor, frame) {\n var existingDoors = findExistingDoorsOnFrame($this, frame, newDoor);\n if (existingDoors.n() >= 2) {\n return new InvalidDoorPairsResult('Not allowed to have more than 2 doors', get_productRefOrEmptyString(newDoor), $this);\n }\n var tmp;\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!existingDoors.b1()) {\n tmp = allowedToPlaceSecondDoor($this, allowedDoorPairsComponent, existingDoors.f1(0), newDoor);\n } else {\n tmp = allowedToPlaceFirstDoor($this, allowedDoorPairsComponent, newDoor);\n }\n return tmp;\n }\n function allowedToPlaceSecondDoor($this, allowedDoorPairsComponent, firstDoor, secondDoor) {\n var tmp0_safe_receiver = firstDoor.__getComponentForKotlin(33);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.size;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s2e_1;\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : roundToInt(tmp2_safe_receiver);\n var tmp;\n if (tmp3_elvis_lhs == null) {\n return new InvalidDoorPairsResult('Door ' + firstDoor.id + ' has no size component hence no width', get_productRefOrEmptyString(secondDoor), $this);\n } else {\n tmp = tmp3_elvis_lhs;\n }\n var firstDoorWidth = tmp;\n var tmp4_safe_receiver = secondDoor.__getComponentForKotlin(33);\n var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.size;\n var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.s2e_1;\n var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : roundToInt(tmp6_safe_receiver);\n var tmp_0;\n if (tmp7_elvis_lhs == null) {\n return new InvalidDoorPairsResult('Door ' + secondDoor.id + ' has no size component hence no width', get_productRefOrEmptyString(secondDoor), $this);\n } else {\n tmp_0 = tmp7_elvis_lhs;\n }\n var secondDoorWidth = tmp_0;\n if (!allowedDoorPairsComponent.isWidthAllowed(firstDoorWidth))\n return new InvalidDoorPairsResult('Door (' + firstDoor.id + ') of width ' + firstDoorWidth + ' not allowed on frame. Allowed widths: ' + allowedDoorPairsComponent.pairs, get_productRefOrEmptyString(secondDoor), $this);\n if (!allowedDoorPairsComponent.isWidthAllowed(secondDoorWidth))\n return new InvalidDoorPairsResult('Door (' + secondDoor.id + ') of width ' + secondDoorWidth + ' not allowed on frame. Allowed widths: ' + allowedDoorPairsComponent.pairs, get_productRefOrEmptyString(secondDoor), $this);\n var tmp_1;\n if (allowedDoorPairsComponent.allows(firstDoorWidth, secondDoorWidth)) {\n tmp_1 = null;\n } else {\n tmp_1 = new InvalidDoorPairsResult('Not allowed to pair a door of width ' + secondDoorWidth + ' with and existing door of width ' + firstDoorWidth + '. Allowed widths: ' + allowedDoorPairsComponent.pairs, get_productRefOrEmptyString(secondDoor), $this);\n }\n return tmp_1;\n }\n function allowedToPlaceFirstDoor($this, allowedDoorPairsComponent, firstDoor) {\n var tmp0_safe_receiver = firstDoor.__getComponentForKotlin(33);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.size;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s2e_1;\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : roundToInt(tmp2_safe_receiver);\n var tmp;\n if (tmp3_elvis_lhs == null) {\n return new InvalidDoorPairsResult('Door ' + firstDoor.id + ' has no size component hence no width', get_productRefOrEmptyString(firstDoor), $this);\n } else {\n tmp = tmp3_elvis_lhs;\n }\n var doorPhysicalWidth = tmp;\n var tmp_0;\n if (allowedDoorPairsComponent.isWidthAllowed(doorPhysicalWidth)) {\n tmp_0 = null;\n } else {\n tmp_0 = new InvalidDoorPairsResult('Door (' + firstDoor.id + ') of width ' + doorPhysicalWidth + ' not allowed on frame. Allowed widths: ' + allowedDoorPairsComponent.pairs, get_productRefOrEmptyString(firstDoor), $this);\n }\n return tmp_0;\n }\n function findExistingDoorsOnFrame($this, frame, newDoor) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_children(frame);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.alloweddoorpairs.AllowedDoorPairsValidation.findExistingDoorsOnFrame.' call\n if (element.hasComponent(DoorComponent_getInstance().o2y_1)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.alloweddoorpairs.AllowedDoorPairsValidation.findExistingDoorsOnFrame.' call\n if (!element_0.equals(newDoor)) {\n destination_0.q(element_0);\n }\n }\n return destination_0;\n }\n function Companion_6() {\n this.ID = 'AllowedDoorPairs';\n }\n protoOf(Companion_6).u1n = function () {\n return this.ID;\n };\n var Companion_instance_39;\n function Companion_getInstance_15() {\n return Companion_instance_39;\n }\n function AllowedDoorPairsValidation() {\n ValidationImpl.call(this);\n this.q2y_1 = 'AllowedDoorPairs';\n }\n protoOf(AllowedDoorPairsValidation).s1k = function () {\n return this.q2y_1;\n };\n protoOf(AllowedDoorPairsValidation).validateCurrentState = function (entity) {\n return validate(this, entity, null);\n };\n protoOf(AllowedDoorPairsValidation).validateSnap = function (snapActionCandidate) {\n return validate(this, snapActionCandidate.guestRoot, snapActionCandidate);\n };\n function Companion_7() {\n this.ID = 'InvalidDoorPairsResult';\n }\n protoOf(Companion_7).u1n = function () {\n return this.ID;\n };\n var Companion_instance_40;\n function Companion_getInstance_16() {\n return Companion_instance_40;\n }\n function InvalidDoorPairsResult(message, productRef, rule) {\n ValidationResult.call(this, ValidationResultType_FAIL_getInstance(), productRef, rule);\n this.r2y_1 = message;\n }\n protoOf(InvalidDoorPairsResult).s1k = function () {\n return 'InvalidDoorPairsResult';\n };\n protoOf(InvalidDoorPairsResult).toString = function () {\n return this.id + ': ' + this.r2y_1;\n };\n function AssemblyInstructionsService() {\n }\n function AssemblyInstructionsServiceImpl() {\n }\n protoOf(AssemblyInstructionsServiceImpl).getAssemblyInstructionsForPointSeries = function (root) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_hierarchy(root);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.assemblyinstructions.AssemblyInstructionsServiceImpl.getAssemblyInstructionsForPointSeries.' call\n if (!get_isPropping(element)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.assemblyinstructions.AssemblyInstructionsServiceImpl.getAssemblyInstructionsForPointSeries.' call\n Companion_getInstance_1();\n if (element_0.hasComponent(104)) {\n destination_0.q(element_0);\n }\n }\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = destination_0.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.assemblyinstructions.AssemblyInstructionsServiceImpl.getAssemblyInstructionsForPointSeries.' call\n var list = toList(get_guestConnections(element_1));\n addAll_0(destination_1, list);\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_2 = ArrayList_init_$Create$();\n var tmp0_iterator_1 = destination_1.t();\n while (tmp0_iterator_1.u()) {\n var element_2 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.stl.assemblyinstructions.AssemblyInstructionsServiceImpl.getAssemblyInstructionsForPointSeries.' call\n var tmp = element_2.hostConnector;\n if (tmp instanceof PointSeriesSubConnector) {\n destination_2.q(element_2);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_2, 10));\n var tmp0_iterator_2 = destination_2.t();\n while (tmp0_iterator_2.u()) {\n var item = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.stl.assemblyinstructions.AssemblyInstructionsServiceImpl.getAssemblyInstructionsForPointSeries.' call\n var tmp$ret$12 = new PointSeriesAssemblyInstructionImpl(item);\n destination_3.q(tmp$ret$12);\n }\n var this_1 = toList_0(destination_3);\n return copyToArray(this_1);\n };\n function PointSeriesAssemblyInstruction() {\n }\n function _get_hostSubConnector__a6nvli($this) {\n var tmp = $this.v2y_1.hostConnector;\n return tmp instanceof PointSeriesSubConnector ? tmp : THROW_CCE();\n }\n function PointSeriesAssemblyInstructionImpl(connection) {\n this.v2y_1 = connection;\n this.w2y_1 = _get_hostSubConnector__a6nvli(this).positionInSeries;\n this.x2y_1 = get_worldTransform(this.v2y_1.hostConnectorEntity).transformPosition(_get_hostSubConnector__a6nvli(this).positionInSeries);\n }\n protoOf(PointSeriesAssemblyInstructionImpl).i2q = function () {\n return this.v2y_1.hostConnectorEntity;\n };\n protoOf(PointSeriesAssemblyInstructionImpl).j2q = function () {\n return this.v2y_1.guestConnectorEntity;\n };\n protoOf(PointSeriesAssemblyInstructionImpl).t1v = function () {\n var tmp0_elvis_lhs = get_connectionRootEntity(this.guest);\n return tmp0_elvis_lhs == null ? this.guest : tmp0_elvis_lhs;\n };\n protoOf(PointSeriesAssemblyInstructionImpl).s2y = function () {\n return _get_hostSubConnector__a6nvli(this).hole;\n };\n protoOf(PointSeriesAssemblyInstructionImpl).t2y = function () {\n return this.w2y_1;\n };\n protoOf(PointSeriesAssemblyInstructionImpl).u2y = function () {\n return this.x2y_1;\n };\n protoOf(PointSeriesAssemblyInstructionImpl).y2y = function (connection) {\n return new PointSeriesAssemblyInstructionImpl(connection);\n };\n protoOf(PointSeriesAssemblyInstructionImpl).copy = function (connection, $super) {\n connection = connection === VOID ? this.v2y_1 : connection;\n return this.y2y(connection);\n };\n protoOf(PointSeriesAssemblyInstructionImpl).toString = function () {\n return 'PointSeriesAssemblyInstructionImpl(connection=' + this.v2y_1 + ')';\n };\n protoOf(PointSeriesAssemblyInstructionImpl).hashCode = function () {\n return this.v2y_1.hashCode();\n };\n protoOf(PointSeriesAssemblyInstructionImpl).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PointSeriesAssemblyInstructionImpl))\n return false;\n var tmp0_other_with_cast = other instanceof PointSeriesAssemblyInstructionImpl ? other : THROW_CCE();\n if (!this.v2y_1.equals(tmp0_other_with_cast.v2y_1))\n return false;\n return true;\n };\n function AutoAdaptFeature() {\n }\n protoOf(AutoAdaptFeature).start = function (coreServices) {\n var entityManager = coreServices.entityManager;\n // Inline function 'kotlin.collections.find' call\n var this_0 = entityManager.getSystemsRegistered();\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptFeature.start.' call\n var tmp = element.id;\n if (tmp === 'AutoAdaptCacheSystem') {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp_0 = tmp$ret$1;\n var preExistingCache = tmp_0 instanceof AutoAdaptCacheSystem ? tmp_0 : null;\n var autoAdaptCacheSystem = preExistingCache == null ? new AutoAdaptCacheSystem(coreServices.productManager) : preExistingCache;\n if (preExistingCache == null) {\n entityManager.registerSystem(autoAdaptCacheSystem);\n }\n // Inline function 'kotlin.collections.find' call\n var this_1 = entityManager.getSystemsRegistered();\n var tmp$ret$4;\n $l$block_0: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptFeature.start.' call\n var tmp_1 = element_0.id;\n Companion_getInstance_19();\n if (tmp_1 === 'AutoAdaptChildrenSystem') {\n tmp$ret$4 = element_0;\n break $l$block_0;\n }\n }\n tmp$ret$4 = null;\n }\n var tmp_2 = tmp$ret$4;\n var preExistingChildrenSystem = tmp_2 instanceof AutoAdaptChildrenSystem ? tmp_2 : null;\n var autoAdaptChildrenSystem = preExistingChildrenSystem == null ? new AutoAdaptChildrenSystem(coreServices) : preExistingChildrenSystem;\n if (preExistingChildrenSystem == null) {\n entityManager.registerSystem(autoAdaptChildrenSystem);\n }\n // Inline function 'kotlin.collections.find' call\n var this_2 = entityManager.getSystemsRegistered();\n var tmp$ret$7;\n $l$block_1: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_1 = 0;\n var last_1 = this_2.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = this_2[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptFeature.start.' call\n var tmp_3 = element_1.id;\n if (tmp_3 === 'CleanCacheOnFinishedAutoAdaptSystem') {\n tmp$ret$7 = element_1;\n break $l$block_1;\n }\n }\n tmp$ret$7 = null;\n }\n var tmp_4 = tmp$ret$7;\n var preExistingCleanCacheOnFinishedAutoAdaptSystem = tmp_4 instanceof CleanCacheOnFinishedAutoAdaptSystem ? tmp_4 : null;\n var cleanCacheOnFinishedAutoAdaptSystem = preExistingCleanCacheOnFinishedAutoAdaptSystem == null ? new CleanCacheOnFinishedAutoAdaptSystem() : preExistingCleanCacheOnFinishedAutoAdaptSystem;\n if (preExistingCleanCacheOnFinishedAutoAdaptSystem == null) {\n entityManager.registerSystem(cleanCacheOnFinishedAutoAdaptSystem);\n }\n // Inline function 'kotlin.collections.find' call\n var this_3 = entityManager.getSystemsRegistered();\n var tmp$ret$10;\n $l$block_2: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_2 = 0;\n var last_2 = this_3.length;\n while (inductionVariable_2 < last_2) {\n var element_2 = this_3[inductionVariable_2];\n inductionVariable_2 = inductionVariable_2 + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptFeature.start.' call\n var tmp_5 = element_2.id;\n Companion_getInstance_20();\n if (tmp_5 === 'AutoAdaptDisposeFailedChildrenSystem') {\n tmp$ret$10 = element_2;\n break $l$block_2;\n }\n }\n tmp$ret$10 = null;\n }\n var tmp_6 = tmp$ret$10;\n var preExistingDisposeFailedChildrenSystem = tmp_6 instanceof AutoAdaptDisposeFailedChildrenSystem ? tmp_6 : null;\n var disposeFailedChildrenSystem = preExistingDisposeFailedChildrenSystem == null ? new AutoAdaptDisposeFailedChildrenSystem() : preExistingDisposeFailedChildrenSystem;\n if (preExistingDisposeFailedChildrenSystem == null) {\n entityManager.registerSystem(disposeFailedChildrenSystem);\n }\n };\n var AutoAdaptFeature_instance;\n function AutoAdaptFeature_getInstance() {\n return AutoAdaptFeature_instance;\n }\n function update($this, entity, component) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_0 = component.variants;\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptProductSpecificationsSystem.update.' call\n var spec = $this.productManager.productSpecification(element);\n var tmp;\n if (spec == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptProductSpecificationsSystem.update..' call\n tmp = new SpecificationPair(element, spec);\n }\n var tmp0_safe_receiver = tmp;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n var pairs = copyToArray(destination);\n entity.addComponent(new AutoAdaptProductSpecificationsComponent(pairs));\n }\n function Companion_8() {\n this.ID = 'AutoAdaptProductSpecificationSystem';\n }\n protoOf(Companion_8).u1n = function () {\n return this.ID;\n };\n var Companion_instance_41;\n function Companion_getInstance_17() {\n return Companion_instance_41;\n }\n function AutoAdaptProductSpecificationsSystem(productManager) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [133];\n SystemBase.call(this, 'AutoAdaptProductSpecificationSystem', 126, tmp$ret$2);\n this.productManager = productManager;\n }\n protoOf(AutoAdaptProductSpecificationsSystem).u1i = function () {\n return this.productManager;\n };\n protoOf(AutoAdaptProductSpecificationsSystem).onAddComponent = function (entity, newComponent) {\n update(this, entity, newComponent);\n };\n protoOf(AutoAdaptProductSpecificationsSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n update(this, entity, newComponent);\n };\n protoOf(AutoAdaptProductSpecificationsSystem).onRemoveComponent = function (entity, oldComponent) {\n entity.removeComponent(133);\n };\n function snapToValidAutoAdaptedSnap($this, guest, host, snapSettings, sortAndSelectStrategy) {\n var snapValidationResult = findWithAutoAdapt($this, host, guest, snapSettings, sortAndSelectStrategy);\n return snapValidationResult;\n }\n function triggerReplaceEvent(_this__u8e3s4, $this, oldEntity) {\n var event = new ReplacedWithAutoAdaptEventComponent(oldEntity);\n _this__u8e3s4.entityManager.addComponent(_this__u8e3s4, event);\n _this__u8e3s4.entityManager.removeComponent(_this__u8e3s4, event.h2z_1);\n }\n function findWithAutoAdapt($this, host, guest, snapSettings, sortAndSelectStrategy) {\n guest.addComponent(new AutoAdaptSessionComponent());\n var invalidSnapResult = {_v: null};\n var tmp0_safe_receiver = get_snapRoot(guest);\n var originalParent = tmp0_safe_receiver == null ? null : get_parent(tmp0_safe_receiver);\n var tmp = asSequence_0(get_variantEntities(guest));\n var tmp_0 = filter(tmp, AutoAdaptService$findWithAutoAdapt$lambda(guest));\n var tmp_1 = filter(tmp_0, AutoAdaptService$findWithAutoAdapt$lambda_0($this, host));\n var tmp_2 = onEach(tmp_1, AutoAdaptService$findWithAutoAdapt$lambda_1($this, guest));\n var tmp_3 = onEach(tmp_2, AutoAdaptService$findWithAutoAdapt$lambda_2($this, guest));\n var tmp_4 = map(tmp_3, AutoAdaptService$findWithAutoAdapt$lambda_3(guest, $this, host, snapSettings, invalidSnapResult, sortAndSelectStrategy));\n var tmp_5 = onEach(tmp_4, AutoAdaptService$findWithAutoAdapt$lambda_4(invalidSnapResult));\n var validSnapResult = firstOrNull(mapNotNull(tmp_5, AutoAdaptService$findWithAutoAdapt$lambda_5($this)));\n var tmp2_safe_receiver = validSnapResult == null ? null : validSnapResult.snapActionCandidate;\n var autoAdaptedEntity = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.guestRoot;\n if (autoAdaptedEntity == null) {\n var tmp3_safe_receiver = get_snapRoot(guest);\n if (tmp3_safe_receiver == null)\n null;\n else {\n setParent(tmp3_safe_receiver, originalParent);\n }\n } else {\n ModelUtils_getInstance().hide(guest, true);\n ModelUtils_getInstance().show(autoAdaptedEntity, true);\n var tmp4_safe_receiver = get_snapRoot(guest);\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n triggerReplaceEvent(autoAdaptedEntity, $this, tmp4_safe_receiver);\n }\n }\n var tmp6_elvis_lhs = validSnapResult == null ? invalidSnapResult._v : validSnapResult;\n var tmp_6;\n if (tmp6_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n var tmp_7 = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = [Companion_instance_0.fail('No snap candidates', get_productRefOrEmptyString(guest), null)];\n tmp_6 = new ValidSnapActionCandidateOrErrors(null, tmp_7, tmp$ret$4);\n } else {\n tmp_6 = tmp6_elvis_lhs;\n }\n return tmp_6;\n }\n function findWithAutoAdapt$default($this, host, guest, snapSettings, sortAndSelectStrategy, $super) {\n snapSettings = snapSettings === VOID ? new SnapSettings(false, VOID, VOID, false) : snapSettings;\n return findWithAutoAdapt($this, host, guest, snapSettings, sortAndSelectStrategy);\n }\n function restrictAllowedRequiredHostsOnVariant($this, originalGuest, variant) {\n $l$block: {\n // Inline function 'com.ikea.core.utils.orElse' call\n var tmp0_safe_receiver = originalGuest.__getComponentForKotlin(Companion_instance_2.id);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptService.restrictAllowedRequiredHostsOnVariant.' call\n tmp = variant.addComponent(tmp0_safe_receiver);\n }\n if (tmp == null) {\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptService.restrictAllowedRequiredHostsOnVariant.' call\n variant.removeComponent(Companion_instance_2.id);\n break $l$block;\n }\n }\n }\n function canSnap($this, guest, host) {\n var tmp$ret$3;\n $l$block_1: {\n // Inline function 'kotlin.sequences.any' call\n var tmp0_iterator = get_snappingEntitiesSequence(guest).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptService.canSnap.' call\n var tmp0_safe_receiver = get_connectorsComponent(element);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.enabledConnectors;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var tmp_0;\n if (isInterface(tmp1_safe_receiver, Collection)) {\n tmp_0 = tmp1_safe_receiver.b1();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n var tmp0_iterator_0 = tmp1_safe_receiver.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptService.canSnap..' call\n if (any_1(element_0.findHostConnectorsWithMatchingTags(get_connectorsComponent(host)))) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n }\n tmp$ret$0 = false;\n }\n tmp = tmp$ret$0;\n }\n var tmp2_elvis_lhs = tmp;\n if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {\n tmp$ret$3 = true;\n break $l$block_1;\n }\n }\n tmp$ret$3 = false;\n }\n return tmp$ret$3;\n }\n function onlyValidSnap($this, snapResult) {\n var tmp;\n if (snapResult.valid) {\n tmp = snapResult;\n } else {\n tmp = null;\n }\n return tmp;\n }\n function snapToValidSnap($this, guest, host, includeSubConnectors, sortByWarnings, includeAlignmentConnectorsOutsideActivationDistance, sortAndSelectStrategy) {\n var anyResult = {_v: null};\n var snapSettings = new SnapSettings(includeSubConnectors, VOID, VOID, includeAlignmentConnectorsOutsideActivationDistance);\n var snapsSorted = sortAndSelectStrategy.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidates(guest, host, snapSettings));\n // Inline function 'kotlin.collections.isEmpty' call\n if (snapsSorted.length === 0) {\n // Inline function 'kotlin.emptyArray' call\n var tmp = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = [new NoValidConnectorAvailableValidationResult(get_productRefOrEmptyString(guest))];\n return new ValidSnapActionCandidateOrErrors(null, tmp, tmp$ret$4);\n }\n var bestWarning = {_v: null};\n var tmp_0 = asSequence_0(snapsSorted);\n var tmp_1 = map(tmp_0, AutoAdaptService$snapToValidSnap$lambda($this, anyResult, bestWarning));\n var valid = firstOrNull(filter(tmp_1, AutoAdaptService$snapToValidSnap$lambda_0(sortByWarnings)));\n var tmp1_elvis_lhs = valid == null ? bestWarning._v : valid;\n var tmp2_elvis_lhs = tmp1_elvis_lhs == null ? anyResult._v : tmp1_elvis_lhs;\n var tmp_2;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n var tmp_3 = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$8 = [new UnknownErrorValidationResult(get_productRefOrEmptyString(guest))];\n tmp_2 = new ValidSnapActionCandidateOrErrors(null, tmp_3, tmp$ret$8);\n } else {\n tmp_2 = tmp2_elvis_lhs;\n }\n return tmp_2;\n }\n function snapToValidSnap$default($this, guest, host, includeSubConnectors, sortByWarnings, includeAlignmentConnectorsOutsideActivationDistance, sortAndSelectStrategy, $super) {\n includeSubConnectors = includeSubConnectors === VOID ? false : includeSubConnectors;\n includeAlignmentConnectorsOutsideActivationDistance = includeAlignmentConnectorsOutsideActivationDistance === VOID ? false : includeAlignmentConnectorsOutsideActivationDistance;\n return snapToValidSnap($this, guest, host, includeSubConnectors, sortByWarnings, includeAlignmentConnectorsOutsideActivationDistance, sortAndSelectStrategy);\n }\n function snapAndValidateVariant($this, possibleVariant, host, snapSettings, earlyOut, sortAndSelectStrategy) {\n var firstInvalidResult = null;\n var snapsSorted = sortAndSelectStrategy.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidates(possibleVariant, host, snapSettings));\n // Inline function 'kotlin.collections.isEmpty' call\n if (snapsSorted.length === 0) {\n // Inline function 'kotlin.emptyArray' call\n var tmp = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = [new NoValidConnectorAvailableValidationResult(get_productRefOrEmptyString(possibleVariant))];\n return new ValidSnapActionCandidateOrErrors(null, tmp, tmp$ret$4);\n }\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = snapsSorted.length;\n while (inductionVariable < last) {\n var element = snapsSorted[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptService.snapAndValidateVariant.' call\n var result = $this.j2z_1.evaluateSnapCandidate(element, earlyOut ? true : !(firstInvalidResult == null));\n if (result.valid) {\n return result;\n }\n if (firstInvalidResult == null) {\n firstInvalidResult = result;\n }\n }\n var tmp0_elvis_lhs = firstInvalidResult;\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n var tmp_1 = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$8 = [new UnknownErrorValidationResult(get_productRefOrEmptyString(possibleVariant))];\n tmp_0 = new ValidSnapActionCandidateOrErrors(null, tmp_1, tmp$ret$8);\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n return tmp_0;\n }\n function snapAndValidateVariant$default($this, possibleVariant, host, snapSettings, earlyOut, sortAndSelectStrategy, $super) {\n snapSettings = snapSettings === VOID ? new SnapSettings(false, VOID, VOID, false) : snapSettings;\n return snapAndValidateVariant($this, possibleVariant, host, snapSettings, earlyOut, sortAndSelectStrategy);\n }\n function prepareVariantForSnapping($this, originalEntity, variant) {\n var tmp0_elvis_lhs = get_snapRoot(originalEntity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var originalRootEntity = tmp;\n setParent(variant, null);\n setParent(originalRootEntity, null);\n TransformUtils_instance.setWorldTransform(variant, get_worldTransform(originalRootEntity));\n }\n function findWithAutoAdapt$combineInvalidResult(invalidSnapResult, newFail) {\n if (newFail.valid)\n return Unit_instance;\n var tmp;\n if (invalidSnapResult._v == null) {\n tmp = newFail;\n } else {\n var tmp0_safe_receiver = invalidSnapResult._v;\n tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.combineFailures(newFail);\n }\n invalidSnapResult._v = tmp;\n }\n function AutoAdaptService$findWithAutoAdapt$lambda($guest) {\n return function (it) {\n return !(get_productRef(it) == get_productRef($guest));\n };\n }\n function AutoAdaptService$findWithAutoAdapt$lambda_0(this$0, $host) {\n return function (it) {\n var tmp0_elvis_lhs = get_snapRoot(it);\n return canSnap(this$0, tmp0_elvis_lhs == null ? it : tmp0_elvis_lhs, $host);\n };\n }\n function AutoAdaptService$findWithAutoAdapt$lambda_1(this$0, $guest) {\n return function (it) {\n restrictAllowedRequiredHostsOnVariant(this$0, $guest, it);\n return Unit_instance;\n };\n }\n function AutoAdaptService$findWithAutoAdapt$lambda_2(this$0, $guest) {\n return function (it) {\n prepareVariantForSnapping(this$0, $guest, it);\n return Unit_instance;\n };\n }\n function AutoAdaptService$findWithAutoAdapt$lambda_3($guest, this$0, $host, $snapSettings, $invalidSnapResult, $sortAndSelectStrategy) {\n return function (it) {\n it.addComponent(new AutoAdaptVariantComponent($guest));\n var result = snapAndValidateVariant(this$0, it, $host, $snapSettings, !($invalidSnapResult._v == null), $sortAndSelectStrategy);\n return result;\n };\n }\n function AutoAdaptService$findWithAutoAdapt$lambda_4($invalidSnapResult) {\n return function (it) {\n var tmp;\n if (!it.valid) {\n findWithAutoAdapt$combineInvalidResult($invalidSnapResult, it);\n tmp = Unit_instance;\n }\n return Unit_instance;\n };\n }\n function AutoAdaptService$findWithAutoAdapt$lambda_5(this$0) {\n return function (it) {\n return onlyValidSnap(this$0, it);\n };\n }\n function AutoAdaptService$snapToValidSnap$lambda(this$0, $anyResult, $bestWarning) {\n return function (it) {\n var res = this$0.j2z_1.evaluateSnapCandidate(it, !($anyResult._v == null));\n var tmp;\n if ($anyResult._v == null) {\n $anyResult._v = res;\n tmp = Unit_instance;\n }\n var tmp_0;\n if (res.valid ? any_0(res.warnings) : false) {\n var tmp_1;\n var tmp_2;\n if ($bestWarning._v == null) {\n tmp_2 = true;\n } else {\n // Inline function 'kotlin.collections.count' call\n var tmp_3 = ensureNotNull($bestWarning._v).warnings.length;\n // Inline function 'kotlin.collections.count' call\n tmp_2 = tmp_3 > res.warnings.length;\n }\n if (tmp_2) {\n $bestWarning._v = res;\n tmp_1 = Unit_instance;\n }\n tmp_0 = tmp_1;\n }\n var tmp_4;\n if ((!ensureNotNull($anyResult._v).valid ? !res.valid : false) ? !equals($anyResult._v, res) : false) {\n $anyResult._v = ensureNotNull($anyResult._v).combineFailures(res);\n tmp_4 = Unit_instance;\n }\n return res;\n };\n }\n function AutoAdaptService$snapToValidSnap$lambda_0($sortByWarnings) {\n return function (it) {\n return $sortByWarnings ? it.valid ? none(it.warnings) : false : it.valid;\n };\n }\n function AutoAdaptService(coreServices) {\n this.coreServices = coreServices;\n this.i2z_1 = this.coreServices.sceneManager;\n this.j2z_1 = this.coreServices.validations;\n }\n protoOf(AutoAdaptService).k2z = function () {\n return this.coreServices;\n };\n protoOf(AutoAdaptService).l2z = function (guest, host, snapSettings, sortByWarnings, sortAndSelectStrategy) {\n var snapWithoutAutoAdaptResult = snapToValidSnap(this, guest, host, snapSettings.includeAllSubConnectors, sortByWarnings, snapSettings.includeAlignmentConnectorsOutsideActivationDistance, sortAndSelectStrategy);\n var tmp;\n if (snapWithoutAutoAdaptResult.valid) {\n tmp = snapWithoutAutoAdaptResult;\n } else {\n var result = snapToValidAutoAdaptedSnap(this, guest, host, snapSettings, sortAndSelectStrategy);\n tmp = result.valid ? result : snapWithoutAutoAdaptResult.combineFailures(result);\n }\n return tmp;\n };\n protoOf(AutoAdaptService).findValidSnapActionWithAutoAdapt = function (guest, host, snapSettings, sortByWarnings, sortAndSelectStrategy, $super) {\n snapSettings = snapSettings === VOID ? new SnapSettings(VOID, VOID, VOID, true) : snapSettings;\n sortByWarnings = sortByWarnings === VOID ? true : sortByWarnings;\n sortAndSelectStrategy = sortAndSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE : sortAndSelectStrategy;\n return this.l2z(guest, host, snapSettings, sortByWarnings, sortAndSelectStrategy);\n };\n protoOf(AutoAdaptService).findClosestAutoAdaptHost = function (entity, point) {\n return AutoAdaptUtils_getInstance().findClosestAutoAdaptHost(this.i2z_1.scene, entity, point);\n };\n protoOf(AutoAdaptService).findAutoAdaptHostsContainingPoint = function (entity, point) {\n var tmp0_elvis_lhs = get_parentComponent(this.i2z_1.scene);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [];\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var scene = tmp;\n var allHosts = AutoAdaptUtils_getInstance().findAllAutoAdaptHostsInScene(scene, entity);\n return findAllHostsContainingPointSortedBySize(allHosts, point);\n };\n function findClosestHostContainingPoint(hosts, point) {\n return firstOrNull_0(findAllHostsContainingPointSortedBySize(hosts, point));\n }\n function findAllHostsContainingPointSortedBySize(hosts, point) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(hosts.length);\n var inductionVariable = 0;\n var last = hosts.length;\n while (inductionVariable < last) {\n var item = hosts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.findAllHostsContainingPointSortedBySize.' call\n var entity = item.af();\n var zone = item.bf();\n var rotatedPolyhedron = TransformUtils_instance.applyWorldTransform(zone, entity);\n var boundingBox = rotatedPolyhedron.axisAlignedBoundingBox;\n var tmp$ret$0 = new Pair(entity, boundingBox);\n destination.q(tmp$ret$0);\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.autoadapt.findAllHostsContainingPointSortedBySize.' call\n var boundingBox_0 = element.bf();\n if (boundingBox_0.containsPoint(point)) {\n destination_0.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_0, 10));\n var tmp0_iterator_0 = destination_0.t();\n while (tmp0_iterator_0.u()) {\n var item_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.autoadapt.findAllHostsContainingPointSortedBySize.' call\n var entity_0 = item_0.af();\n var boundingBox_1 = item_0.bf();\n var tmp$ret$6 = new Pair(entity_0, boundingBox_1.size.size);\n destination_1.q(tmp$ret$6);\n }\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp = findAllHostsContainingPointSortedBySize$lambda;\n var tmp$ret$9 = new sam$kotlin_Comparator$0_0(tmp);\n var this_0 = sortedWith(destination_1, tmp$ret$9);\n // Inline function 'kotlin.collections.mapTo' call\n var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator_1 = this_0.t();\n while (tmp0_iterator_1.u()) {\n var item_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.stl.autoadapt.findAllHostsContainingPointSortedBySize.' call\n var tmp$ret$11 = item_1.ye_1;\n destination_2.q(tmp$ret$11);\n }\n return copyToArray(destination_2);\n }\n function EntityWithSensorZone(entity, zone) {\n this.entity = entity;\n this.zone = zone;\n }\n protoOf(EntityWithSensorZone).r23 = function () {\n return this.entity;\n };\n protoOf(EntityWithSensorZone).m2z = function () {\n return this.zone;\n };\n protoOf(EntityWithSensorZone).af = function () {\n return this.entity;\n };\n protoOf(EntityWithSensorZone).bf = function () {\n return this.zone;\n };\n protoOf(EntityWithSensorZone).n2z = function (entity, zone) {\n return new EntityWithSensorZone(entity, zone);\n };\n protoOf(EntityWithSensorZone).copy = function (entity, zone, $super) {\n entity = entity === VOID ? this.entity : entity;\n zone = zone === VOID ? this.zone : zone;\n return this.n2z(entity, zone);\n };\n protoOf(EntityWithSensorZone).toString = function () {\n return 'EntityWithSensorZone(entity=' + this.entity + ', zone=' + this.zone + ')';\n };\n protoOf(EntityWithSensorZone).hashCode = function () {\n var result = this.entity.hashCode();\n result = imul(result, 31) + hashCode(this.zone) | 0;\n return result;\n };\n protoOf(EntityWithSensorZone).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof EntityWithSensorZone))\n return false;\n var tmp0_other_with_cast = other instanceof EntityWithSensorZone ? other : THROW_CCE();\n if (!this.entity.equals(tmp0_other_with_cast.entity))\n return false;\n if (!equals(this.zone, tmp0_other_with_cast.zone))\n return false;\n return true;\n };\n function sam$kotlin_Comparator$0_0(function_0) {\n this.o2z_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_0).u1j = function (a, b) {\n return this.o2z_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function findAllHostsContainingPointSortedBySize$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.autoadapt.findAllHostsContainingPointSortedBySize.' call\n var size = a.bf();\n var tmp = size;\n // Inline function 'com.ikea.core.stl.autoadapt.findAllHostsContainingPointSortedBySize.' call\n var size_0 = b.bf();\n return compareValues(tmp, size_0);\n }\n function findClosestHost($this, hosts, point) {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(hosts.length);\n var inductionVariable = 0;\n var last = hosts.length;\n while (inductionVariable < last) {\n var item = hosts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.findClosestHost.' call\n var testEntity = item.af();\n var testPosition = get_worldPosition(testEntity);\n var distance = point.minus(testPosition);\n var tmp$ret$0 = new Pair(distance.size, testEntity);\n destination.q(tmp$ret$0);\n }\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp = AutoAdaptUtils$findClosestHost$lambda;\n var tmp$ret$3 = new sam$kotlin_Comparator$0_1(tmp);\n var this_0 = sortedWith(destination, tmp$ret$3);\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.findClosestHost.' call\n var testEntity_0 = item_0.bf();\n destination_0.q(testEntity_0);\n }\n return firstOrNull_1(destination_0);\n }\n function sam$kotlin_Comparator$0_1(function_0) {\n this.p2z_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_1).u1j = function (a, b) {\n return this.p2z_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function sam$kotlin_Comparator$0_2(function_0) {\n this.q2z_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_2).u1j = function (a, b) {\n return this.q2z_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_2).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function AutoAdaptUtils$findClosestHost$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.findClosestHost.' call\n var distance = a.af();\n var tmp = distance;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.findClosestHost.' call\n var distance_0 = b.af();\n return compareValues(tmp, distance_0);\n }\n function AutoAdaptUtils$getAutoAdaptSnapCandidates$lambda($guest) {\n return function (a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.getAutoAdaptSnapCandidates.' call\n var tmp = b.id === $guest.id;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.getAutoAdaptSnapCandidates.' call\n var tmp$ret$1 = a.id === $guest.id;\n return compareValues(tmp, tmp$ret$1);\n };\n }\n function AutoAdaptUtils() {\n AutoAdaptUtils_instance = this;\n this.r2z_1 = new SnapSettings(false, false, false, true);\n this.s2z_1 = new SnapSettings(false, false, false, false);\n }\n protoOf(AutoAdaptUtils).findClosestAutoAdaptHost = function (hierarchy, entity, point) {\n var tmp0_elvis_lhs = get_parentComponent(hierarchy);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var scene = tmp;\n var allHosts = this.findAllAutoAdaptHostsInScene(scene, entity);\n var tmp1_elvis_lhs = findClosestHostContainingPoint(allHosts, point);\n return tmp1_elvis_lhs == null ? findClosestHost(this, allHosts, point) : tmp1_elvis_lhs;\n };\n protoOf(AutoAdaptUtils).findAllAutoAdaptHostsInScene = function (scene, entity) {\n var myHierarchy = get_hierarchy(entity);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = scene.allDescendants();\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.findAllAutoAdaptHostsInScene.' call\n if (!contains(myHierarchy, element)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_0 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.findAllAutoAdaptHostsInScene.' call\n var autoAdaptHostComponent = element_0.__getComponentForKotlin(127);\n var tmp;\n if (!(autoAdaptHostComponent == null)) {\n tmp = new EntityWithSensorZone(element_0, autoAdaptHostComponent.hostZone);\n } else {\n tmp = null;\n }\n var tmp0_safe_receiver = tmp;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_0.q(tmp0_safe_receiver);\n }\n }\n return copyToArray(destination_0);\n };\n protoOf(AutoAdaptUtils).getAutoAdaptVariants = function (entity) {\n return get_variantEntities(entity);\n };\n protoOf(AutoAdaptUtils).isAutoAdapted = function (entity) {\n return get_hasAutoAdapted(entity);\n };\n protoOf(AutoAdaptUtils).getAutoAdaptOriginalEntity = function (entity) {\n return get_autoAdaptOriginalEntity(entity);\n };\n protoOf(AutoAdaptUtils).t2z = function (guest, host, snapSettings) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_variantEntities(guest);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.getAutoAdaptSnapCandidates.' call\n TransformUtils_instance.setWorldTransform(element, get_worldTransform(guest));\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.sortedByDescending' call\n var this_0 = get_variantEntities(guest);\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp = AutoAdaptUtils$getAutoAdaptSnapCandidates$lambda(guest);\n var tmp$ret$0 = new sam$kotlin_Comparator$0_2(tmp);\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_1 = sortedWith_0(this_0, tmp$ret$0);\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_1.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.getAutoAdaptSnapCandidates.' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_2 = SnapUtils_instance.matchingSnapCandidatesOnHost(element_0, host, snapSettings);\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = this_2.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.getAutoAdaptSnapCandidates..' call\n if (!element_1.isAlignmentSnap) {\n destination_0.q(element_1);\n }\n }\n var list = destination_0;\n addAll_0(destination, list);\n }\n var candidates = copyToArray(destination);\n return candidates;\n };\n protoOf(AutoAdaptUtils).getAutoAdaptSnapCandidates = function (guest, host, snapSettings, $super) {\n snapSettings = snapSettings === VOID ? this.s2z_1 : snapSettings;\n return this.t2z(guest, host, snapSettings);\n };\n protoOf(AutoAdaptUtils).u2z = function (guest, hierarchyRoot, snapSettings) {\n var originalTransform = get_worldTransform(guest);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = get_variantEntities(guest);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.getAutoAdaptCandidatesInHierarchy.' call\n TransformUtils_instance.setWorldTransform(element, originalTransform);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_1 = get_hierarchy(hierarchyRoot);\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.AutoAdaptUtils.getAutoAdaptCandidatesInHierarchy..' call\n var list = SnapUtils_instance.matchingSnapCandidatesOnHost(element, element_0, snapSettings);\n addAll_0(destination_0, list);\n }\n var c = copyToArray(destination_0);\n SnapUtils_instance.replaceAlignmentSnapsWithRealSnapsWherePossible(c);\n var list_0 = toList(c);\n addAll_0(destination, list_0);\n }\n var candidatesIncludingAlignments = copyToArray(destination);\n return candidatesIncludingAlignments;\n };\n protoOf(AutoAdaptUtils).getAutoAdaptCandidatesInHierarchy = function (guest, hierarchyRoot, snapSettings, $super) {\n snapSettings = snapSettings === VOID ? this.r2z_1 : snapSettings;\n return this.u2z(guest, hierarchyRoot, snapSettings);\n };\n var AutoAdaptUtils_instance;\n function AutoAdaptUtils_getInstance() {\n if (AutoAdaptUtils_instance == null)\n new AutoAdaptUtils();\n return AutoAdaptUtils_instance;\n }\n function get_variantEntities(_this__u8e3s4) {\n if (!_this__u8e3s4.hasComponent(126)) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [_this__u8e3s4];\n }\n _this__u8e3s4.addComponent(new AutoAdaptSessionComponent());\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(128);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v2z_1;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [_this__u8e3s4];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n }\n function get_hasAutoAdapted(_this__u8e3s4) {\n return !(get_autoAdaptOriginalEntity(_this__u8e3s4) == null) ? !equals(get_autoAdaptOriginalEntity(_this__u8e3s4), _this__u8e3s4) : false;\n }\n function get_autoAdaptOriginalEntity(_this__u8e3s4) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(129);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.originalEntity;\n }\n function get_variants(_this__u8e3s4) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(126);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.variants;\n }\n function Companion_9() {\n this.w2z_1 = 132;\n }\n var Companion_instance_42;\n function Companion_getInstance_18() {\n return Companion_instance_42;\n }\n function AutoAdaptChildFailedEventComponent() {\n this.x2z_1 = 132;\n }\n protoOf(AutoAdaptChildFailedEventComponent).x1k = function () {\n return this.x2z_1;\n };\n protoOf(AutoAdaptChildFailedEventComponent).eq = function (other) {\n return false;\n };\n function sam$kotlin_Comparator$0_3(function_0) {\n this.y2z_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_3).u1j = function (a, b) {\n return this.y2z_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_3).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function AutoAdaptChildrenSystem$PreferSameConnectorsStrategy$sortAndSelect$lambda(this$0) {\n return function (a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.PreferSameConnectorsStrategy.sortAndSelect.' call\n var tmp = b.guestConnector.key === this$0.z2z_1.guestConnector;\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.PreferSameConnectorsStrategy.sortAndSelect.' call\n var tmp$ret$1 = a.guestConnector.key === this$0.z2z_1.guestConnector;\n return compareValues(tmp, tmp$ret$1);\n };\n }\n function AutoAdaptChildrenSystem$PreferSameConnectorsStrategy$sortAndSelect$lambda_0(this$0) {\n return function (a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.PreferSameConnectorsStrategy.sortAndSelect.' call\n var tmp = b.hostConnector.key === this$0.z2z_1.hostConnector;\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.PreferSameConnectorsStrategy.sortAndSelect.' call\n var tmp$ret$1 = a.hostConnector.key === this$0.z2z_1.hostConnector;\n return compareValues(tmp, tmp$ret$1);\n };\n }\n function onPostSnapAutoAdaptVariant($this, entity) {\n var tmp0_elvis_lhs = get_connectionRootEntity(entity);\n var root = tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs;\n if (!get_hasAutoAdapted(root))\n return Unit_instance;\n var tmp1_safe_receiver = get_autoAdaptOriginalEntity(root);\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.AutoAdaptChildrenSystem.onPostSnapAutoAdaptVariant.' call\n tmp = getChildrenToResnap($this, tmp1_safe_receiver);\n }\n var tmp2_elvis_lhs = tmp;\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n var childrenToResnap = tmp_0;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = childrenToResnap.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.AutoAdaptChildrenSystem.onPostSnapAutoAdaptVariant.' call\n reSnap($this, element, root);\n }\n }\n function reSnap($this, childInfo, host) {\n var tmp0_elvis_lhs = $this.coreServices.entityManager.findEntity(childInfo.originalEntityId);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n var message = 'Could not find entity any more';\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var originalChildEntity = tmp;\n var tmp_0 = Companion_getInstance_19().l30_1;\n tmp_0.debug(AutoAdaptChildrenSystem$reSnap$lambda(originalChildEntity, host));\n var assemblyEntities = HierarchyUtils_instance.getAssemblyEntities(host);\n var tmp1_safe_receiver = childInfo.hostPartKey;\n var tmp_1;\n if (tmp1_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.AutoAdaptChildrenSystem.reSnap.' call\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = assemblyEntities.length;\n while (inductionVariable < last) {\n var element = assemblyEntities[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.AutoAdaptChildrenSystem.reSnap..' call\n if (get_partKey(element) === tmp1_safe_receiver) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp_1 = tmp$ret$1;\n }\n var tmp2_elvis_lhs = tmp_1;\n var realHost = tmp2_elvis_lhs == null ? host : tmp2_elvis_lhs;\n originalChildEntity.addComponent(new AutoAdaptSessionComponent());\n var preferredGuest = getPreferredGuestVariant($this, originalChildEntity);\n var candidates = AutoAdaptUtils_getInstance().getAutoAdaptSnapCandidates(preferredGuest, realHost, new SnapSettings(true));\n var sortedCandidates = (new PreferSameConnectorsStrategy(childInfo)).sortAndSelect(candidates);\n var result = $this.coreServices.validations.getFirstValidSnapAction(sortedCandidates, false);\n var validCandidate = result.snapActionCandidate;\n if (!(validCandidate == null)) {\n validCandidate.createAction().perform();\n var tmp_2 = Companion_getInstance_19().l30_1;\n tmp_2.debug(AutoAdaptChildrenSystem$reSnap$lambda_0(validCandidate));\n } else {\n var tmp_3 = Companion_getInstance_19().l30_1;\n tmp_3.debug(AutoAdaptChildrenSystem$reSnap$lambda_1(result));\n originalChildEntity.addComponent(new AutoAdaptChildFailedEventComponent());\n originalChildEntity.removeComponent(125);\n Companion_getInstance_1();\n originalChildEntity.removeComponent(104);\n originalChildEntity.removeComponent(132);\n }\n }\n function getPreferredGuestVariant($this, originalEntity) {\n var forceAutoAdapt = originalEntity.hasComponent(130);\n // Inline function 'kotlin.takeIf' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.AutoAdaptChildrenSystem.getPreferredGuestVariant.' call\n if (forceAutoAdapt) {\n tmp = forceAutoAdapt;\n } else {\n tmp = null;\n }\n var tmp_0;\n if (tmp == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.AutoAdaptChildrenSystem.getPreferredGuestVariant.' call\n var tmp$ret$3;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var indexedObject = get_variantEntities(originalEntity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.AutoAdaptChildrenSystem.getPreferredGuestVariant..' call\n var tmp_1 = get_productRef(element);\n var tmp0_safe_receiver = get_variants(originalEntity);\n if (tmp_1 == (tmp0_safe_receiver == null ? null : first(tmp0_safe_receiver))) {\n tmp$ret$3 = element;\n break $l$block;\n }\n }\n tmp$ret$3 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$3;\n tmp_0 = tmp0_elvis_lhs == null ? originalEntity : tmp0_elvis_lhs;\n }\n var tmp1_elvis_lhs = tmp_0;\n var guest = tmp1_elvis_lhs == null ? originalEntity : tmp1_elvis_lhs;\n return guest;\n }\n function getChildrenToResnap($this, entity) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_immediateConnectionRootDescendants(entity);\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.AutoAdaptChildrenSystem.getChildrenToResnap.' call\n if (!get_isPropping(element)) {\n destination.q(element);\n }\n }\n var children = destination;\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_0 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = children.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.autoadapt.autoadaptchildren.AutoAdaptChildrenSystem.getChildrenToResnap.' call\n var tmp0_safe_receiver = createChildInfo($this, element_0);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_0.q(tmp0_safe_receiver);\n }\n }\n return destination_0;\n }\n function createChildInfo($this, entity) {\n var tmp0_safe_receiver = get_highestPriorityConnection(entity);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var partKey = get_partKey(tmp0_safe_receiver.hostConnectorEntity);\n return new ChildInfo(entity.id, tmp0_safe_receiver.guestConnector.key, tmp0_safe_receiver.hostConnector.key, partKey, getChildrenToResnap($this, entity));\n }\n return null;\n }\n function ChildInfo(originalEntityId, guestConnector, hostConnector, hostPartKey, childrenToResnap) {\n this.originalEntityId = originalEntityId;\n this.guestConnector = guestConnector;\n this.hostConnector = hostConnector;\n this.hostPartKey = hostPartKey;\n this.childrenToResnap = childrenToResnap;\n }\n protoOf(ChildInfo).m30 = function () {\n return this.originalEntityId;\n };\n protoOf(ChildInfo).p1v = function () {\n return this.guestConnector;\n };\n protoOf(ChildInfo).r1v = function () {\n return this.hostConnector;\n };\n protoOf(ChildInfo).n30 = function () {\n return this.hostPartKey;\n };\n protoOf(ChildInfo).o30 = function () {\n return this.childrenToResnap;\n };\n protoOf(ChildInfo).af = function () {\n return this.originalEntityId;\n };\n protoOf(ChildInfo).bf = function () {\n return this.guestConnector;\n };\n protoOf(ChildInfo).g1k = function () {\n return this.hostConnector;\n };\n protoOf(ChildInfo).h1k = function () {\n return this.hostPartKey;\n };\n protoOf(ChildInfo).i1k = function () {\n return this.childrenToResnap;\n };\n protoOf(ChildInfo).p30 = function (originalEntityId, guestConnector, hostConnector, hostPartKey, childrenToResnap) {\n return new ChildInfo(originalEntityId, guestConnector, hostConnector, hostPartKey, childrenToResnap);\n };\n protoOf(ChildInfo).copy = function (originalEntityId, guestConnector, hostConnector, hostPartKey, childrenToResnap, $super) {\n originalEntityId = originalEntityId === VOID ? this.originalEntityId : originalEntityId;\n guestConnector = guestConnector === VOID ? this.guestConnector : guestConnector;\n hostConnector = hostConnector === VOID ? this.hostConnector : hostConnector;\n hostPartKey = hostPartKey === VOID ? this.hostPartKey : hostPartKey;\n childrenToResnap = childrenToResnap === VOID ? this.childrenToResnap : childrenToResnap;\n return this.p30(originalEntityId, guestConnector, hostConnector, hostPartKey, childrenToResnap);\n };\n protoOf(ChildInfo).toString = function () {\n return 'ChildInfo(originalEntityId=' + this.originalEntityId + ', guestConnector=' + this.guestConnector + ', hostConnector=' + this.hostConnector + ', hostPartKey=' + this.hostPartKey + ', childrenToResnap=' + this.childrenToResnap + ')';\n };\n protoOf(ChildInfo).hashCode = function () {\n var result = this.originalEntityId;\n result = imul(result, 31) + getStringHashCode(this.guestConnector) | 0;\n result = imul(result, 31) + getStringHashCode(this.hostConnector) | 0;\n result = imul(result, 31) + (this.hostPartKey == null ? 0 : getStringHashCode(this.hostPartKey)) | 0;\n result = imul(result, 31) + hashCode(this.childrenToResnap) | 0;\n return result;\n };\n protoOf(ChildInfo).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ChildInfo))\n return false;\n var tmp0_other_with_cast = other instanceof ChildInfo ? other : THROW_CCE();\n if (!(this.originalEntityId === tmp0_other_with_cast.originalEntityId))\n return false;\n if (!(this.guestConnector === tmp0_other_with_cast.guestConnector))\n return false;\n if (!(this.hostConnector === tmp0_other_with_cast.hostConnector))\n return false;\n if (!(this.hostPartKey == tmp0_other_with_cast.hostPartKey))\n return false;\n if (!equals(this.childrenToResnap, tmp0_other_with_cast.childrenToResnap))\n return false;\n return true;\n };\n function PreferSameConnectorsStrategy(childInfo) {\n this.z2z_1 = childInfo;\n }\n protoOf(PreferSameConnectorsStrategy).sortAndSelect = function (snaps) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.sortedByDescending' call\n // Inline function 'kotlin.collections.sortedByDescending' call\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp = AutoAdaptChildrenSystem$PreferSameConnectorsStrategy$sortAndSelect$lambda(this);\n var tmp$ret$0 = new sam$kotlin_Comparator$0_3(tmp);\n var this_0 = sortedWith_0(snaps, tmp$ret$0);\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp_0 = AutoAdaptChildrenSystem$PreferSameConnectorsStrategy$sortAndSelect$lambda_0(this);\n var tmp$ret$2 = new sam$kotlin_Comparator$0_3(tmp_0);\n var this_1 = sortedWith(this_0, tmp$ret$2);\n return copyToArray(this_1);\n };\n function Companion_10() {\n Companion_instance_43 = this;\n this.ID = 'AutoAdaptChildrenSystem';\n this.l30_1 = LoggerState_getInstance().m1m('AutoAdaptChildrenSystem');\n }\n protoOf(Companion_10).u1n = function () {\n return this.ID;\n };\n var Companion_instance_43;\n function Companion_getInstance_19() {\n if (Companion_instance_43 == null)\n new Companion_10();\n return Companion_instance_43;\n }\n function AutoAdaptChildrenSystem$reSnap$lambda($originalChildEntity, $host) {\n return function () {\n return 'AutoAdaptChildrenSystem Re-snapping ' + get_displayName($originalChildEntity) + ' to ' + get_displayName($host);\n };\n }\n function AutoAdaptChildrenSystem$reSnap$lambda_0($validCandidate) {\n return function () {\n var tmp = 'AutoAdaptChildrenSystem successfully snapped ' + get_displayName($validCandidate.guest) + ' to ';\n var tmp0_safe_receiver = get_parent($validCandidate.guest);\n return tmp + (tmp0_safe_receiver == null ? null : get_displayName(tmp0_safe_receiver));\n };\n }\n function AutoAdaptChildrenSystem$reSnap$lambda_1($result) {\n return function () {\n return 'AutoAdaptChildrenSystem Could not re-snap: ' + $result;\n };\n }\n function AutoAdaptChildrenSystem(coreServices) {\n Companion_getInstance_19();\n Companion_getInstance_1();\n SystemBase.call(this, 'AutoAdaptChildrenSystem', 104);\n this.coreServices = coreServices;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n Companion_getInstance_1();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.i30_1 = [104];\n var tmp_0 = this;\n // Inline function 'kotlin.arrayOf' call\n Companion_getInstance_0();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0.j30_1 = ['ConnectionParentingSystem', 'UpdateHostConnectionsSystem'];\n var tmp_1 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_1.k30_1 = ['CleanCacheOnFinishedAutoAdaptSystem'];\n }\n protoOf(AutoAdaptChildrenSystem).k2z = function () {\n return this.coreServices;\n };\n protoOf(AutoAdaptChildrenSystem).w1o = function () {\n return this.i30_1;\n };\n protoOf(AutoAdaptChildrenSystem).x1o = function () {\n return this.j30_1;\n };\n protoOf(AutoAdaptChildrenSystem).y1o = function () {\n return this.k30_1;\n };\n protoOf(AutoAdaptChildrenSystem).onAddComponent = function (entity, newComponent) {\n onPostSnapAutoAdaptVariant(this, entity);\n };\n function Companion_11() {\n Companion_instance_44 = this;\n this.q30_1 = 'AutoAdaptDisposeFailedChildrenSystem';\n this.r30_1 = LoggerState_getInstance().m1m('AutoAdaptDisposeFailedChildrenSystem');\n }\n var Companion_instance_44;\n function Companion_getInstance_20() {\n if (Companion_instance_44 == null)\n new Companion_11();\n return Companion_instance_44;\n }\n function AutoAdaptDisposeFailedChildrenSystem$onRemoveComponent$lambda($entity) {\n return function () {\n return 'AutoAdaptDisposeFailedChildrenSystem Disposing entity ' + get_displayName($entity) + ' because auto adapt failed';\n };\n }\n function AutoAdaptDisposeFailedChildrenSystem() {\n Companion_getInstance_20();\n SystemBase.call(this, 'AutoAdaptDisposeFailedChildrenSystem', 132);\n }\n protoOf(AutoAdaptDisposeFailedChildrenSystem).onRemoveComponent = function (entity, oldComponent) {\n if (entity.isDisposed)\n return Unit_instance;\n var tmp = Companion_getInstance_20().r30_1;\n tmp.debug(AutoAdaptDisposeFailedChildrenSystem$onRemoveComponent$lambda(entity));\n entity.dispose();\n };\n function Companion_12() {\n this.s30_1 = 'AutoAdaptCacheSystem';\n }\n var Companion_instance_45;\n function Companion_getInstance_21() {\n return Companion_instance_45;\n }\n function AutoAdaptCacheSystem(productManager) {\n SystemBase.call(this, 'AutoAdaptCacheSystem', 125);\n this.b31_1 = productManager;\n }\n protoOf(AutoAdaptCacheSystem).onAddComponent = function (entity, newComponent) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(126);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.variants;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var variantProductRefs = tmp;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(variantProductRefs.length);\n var inductionVariable = 0;\n var last = variantProductRefs.length;\n while (inductionVariable < last) {\n var item = variantProductRefs[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'com.ikea.core.stl.autoadapt.cache.AutoAdaptCacheSystem.onAddComponent.' call\n if (item === get_productRef(entity)) {\n tmp$ret$0 = entity;\n break $l$block_0;\n }\n var tmp0_elvis_lhs = this.b31_1.createEntity(item);\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n tmp$ret$0 = null;\n break $l$block_0;\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n var variantEntity = tmp_0;\n variantEntity.addComponentInternal(newComponent);\n variantEntity.addComponent(new AutoAdaptVariantComponent(entity));\n tmp$ret$0 = variantEntity;\n }\n destination.q(tmp$ret$0);\n }\n var this_0 = filterNotNull(destination);\n var variants = copyToArray(this_0);\n var tmp_1;\n if (contains(variants, entity)) {\n tmp_1 = variants;\n } else {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$7 = [entity];\n tmp_1 = variants.concat(tmp$ret$7);\n }\n var actualVariants = tmp_1;\n var cachedVariantsComponent = new AutoAdaptCachedVariantsComponent(actualVariants);\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = variants.length;\n while (inductionVariable_0 < last_0) {\n var element = variants[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.cache.AutoAdaptCacheSystem.onAddComponent.' call\n element.addComponent(cachedVariantsComponent);\n }\n };\n protoOf(AutoAdaptCacheSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n this.onRemoveComponent(entity, oldComponent);\n this.onAddComponent(entity, newComponent);\n };\n protoOf(AutoAdaptCacheSystem).onRemoveComponent = function (entity, oldComponent) {\n var cache = entity.__getComponentForKotlin(128);\n var tmp1_safe_receiver = cache == null ? null : cache.v2z_1;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.cache.AutoAdaptCacheSystem.onRemoveComponent.' call\n element.removeComponentInternal(125);\n element.removeComponent(129);\n element.removeComponent(128);\n if (!element.equals(entity)) {\n element.dispose();\n }\n }\n }\n entity.removeComponent(129);\n };\n function Companion_13() {\n this.c31_1 = 128;\n }\n var Companion_instance_46;\n function Companion_getInstance_22() {\n return Companion_instance_46;\n }\n function AutoAdaptCachedVariantsComponent(variants) {\n this.v2z_1 = variants;\n }\n protoOf(AutoAdaptCachedVariantsComponent).x1k = function () {\n return 128;\n };\n protoOf(AutoAdaptCachedVariantsComponent).eq = function (other) {\n var otherC = other instanceof AutoAdaptCachedVariantsComponent ? other : THROW_CCE();\n var tmp;\n if (otherC.v2z_1.length === this.v2z_1.length) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.all' call\n var indexedObject = otherC.v2z_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.cache.AutoAdaptCachedVariantsComponent.eq.' call\n if (!contains(this.v2z_1, element)) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n tmp = tmp$ret$1;\n } else {\n tmp = false;\n }\n return tmp;\n };\n function Companion_14() {\n this.d31_1 = 125;\n }\n var Companion_instance_47;\n function Companion_getInstance_23() {\n return Companion_instance_47;\n }\n function AutoAdaptSessionComponent() {\n }\n protoOf(AutoAdaptSessionComponent).x1k = function () {\n return 125;\n };\n protoOf(AutoAdaptSessionComponent).eq = function (other) {\n return true;\n };\n function Companion_15() {\n this.e31_1 = 'CleanCacheOnFinishedAutoAdaptSystem';\n }\n var Companion_instance_48;\n function Companion_getInstance_24() {\n return Companion_instance_48;\n }\n function CleanCacheOnFinishedAutoAdaptSystem() {\n Companion_getInstance_1();\n SystemBase2.call(this, 'CleanCacheOnFinishedAutoAdaptSystem', 104, 66);\n }\n protoOf(CleanCacheOnFinishedAutoAdaptSystem).onAddComponent = function (entity, newComponent) {\n if (!entity.hasComponent(125))\n return Unit_instance;\n var original = get_autoAdaptOriginalEntity(entity);\n if (!(original == null) ? get_hasAutoAdapted(entity) : false) {\n ConnectionUtils_instance.disconnect(original);\n }\n entity.removeComponent(125);\n };\n protoOf(CleanCacheOnFinishedAutoAdaptSystem).onRemoveComponent2 = function (entity, oldComponent) {\n oldComponent.entity.removeComponent(125);\n };\n function Companion_16() {\n this.id = 126;\n }\n protoOf(Companion_16).s1k = function () {\n return this.id;\n };\n var Companion_instance_49;\n function Companion_getInstance_25() {\n return Companion_instance_49;\n }\n function AutoAdaptGuestComponent(variants, groupName) {\n groupName = groupName === VOID ? 'auto adapt group' : groupName;\n this.groupName = groupName;\n var tmp = this;\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = distinct_0(variants);\n tmp.variants = copyToArray(this_0);\n }\n protoOf(AutoAdaptGuestComponent).f31 = function () {\n return this.groupName;\n };\n protoOf(AutoAdaptGuestComponent).g31 = function () {\n return this.variants;\n };\n protoOf(AutoAdaptGuestComponent).x1k = function () {\n return 126;\n };\n protoOf(AutoAdaptGuestComponent).eq = function (other) {\n var otherC = other instanceof AutoAdaptGuestComponent ? other : THROW_CCE();\n var tmp;\n if (other.groupName === this.groupName ? otherC.variants.length === this.variants.length : false) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.all' call\n var indexedObject = otherC.variants;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.component.AutoAdaptGuestComponent.eq.' call\n if (!contains(this.variants, element)) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n tmp = tmp$ret$1;\n } else {\n tmp = false;\n }\n return tmp;\n };\n function Companion_17() {\n this.id = 127;\n }\n protoOf(Companion_17).s1k = function () {\n return this.id;\n };\n var Companion_instance_50;\n function Companion_getInstance_26() {\n return Companion_instance_50;\n }\n function AutoAdaptHostComponent(hostZone) {\n this.hostZone = hostZone;\n }\n protoOf(AutoAdaptHostComponent).h31 = function () {\n return this.hostZone;\n };\n protoOf(AutoAdaptHostComponent).x1k = function () {\n return 127;\n };\n protoOf(AutoAdaptHostComponent).eq = function (other) {\n return equals((other instanceof AutoAdaptHostComponent ? other : THROW_CCE()).hostZone, this.hostZone);\n };\n function Companion_18() {\n this.id = 133;\n }\n protoOf(Companion_18).s1k = function () {\n return this.id;\n };\n var Companion_instance_51;\n function Companion_getInstance_27() {\n return Companion_instance_51;\n }\n function AutoAdaptProductSpecificationsComponent(specifications) {\n this.specifications = specifications;\n this.i31_1 = 133;\n }\n protoOf(AutoAdaptProductSpecificationsComponent).j31 = function () {\n return this.specifications;\n };\n protoOf(AutoAdaptProductSpecificationsComponent).x1k = function () {\n return this.i31_1;\n };\n protoOf(AutoAdaptProductSpecificationsComponent).eq = function (other) {\n return this.equals(other);\n };\n protoOf(AutoAdaptProductSpecificationsComponent).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof AutoAdaptProductSpecificationsComponent))\n THROW_CCE();\n if (!contentEquals(this.specifications, other.specifications))\n return false;\n if (!(this.i31_1 === other.i31_1))\n return false;\n return true;\n };\n protoOf(AutoAdaptProductSpecificationsComponent).hashCode = function () {\n var result = contentHashCode(this.specifications);\n result = imul(31, result) + this.i31_1 | 0;\n return result;\n };\n protoOf(AutoAdaptProductSpecificationsComponent).af = function () {\n return this.specifications;\n };\n protoOf(AutoAdaptProductSpecificationsComponent).k31 = function (specifications) {\n return new AutoAdaptProductSpecificationsComponent(specifications);\n };\n protoOf(AutoAdaptProductSpecificationsComponent).copy = function (specifications, $super) {\n specifications = specifications === VOID ? this.specifications : specifications;\n return this.k31(specifications);\n };\n protoOf(AutoAdaptProductSpecificationsComponent).toString = function () {\n return 'AutoAdaptProductSpecificationsComponent(specifications=' + toString(this.specifications) + ')';\n };\n function SpecificationPair(productRef, specification) {\n this.productRef = productRef;\n this.specification = specification;\n }\n protoOf(SpecificationPair).j1l = function () {\n return this.productRef;\n };\n protoOf(SpecificationPair).l31 = function () {\n return this.specification;\n };\n protoOf(SpecificationPair).af = function () {\n return this.productRef;\n };\n protoOf(SpecificationPair).bf = function () {\n return this.specification;\n };\n protoOf(SpecificationPair).m31 = function (productRef, specification) {\n return new SpecificationPair(productRef, specification);\n };\n protoOf(SpecificationPair).copy = function (productRef, specification, $super) {\n productRef = productRef === VOID ? this.productRef : productRef;\n specification = specification === VOID ? this.specification : specification;\n return this.m31(productRef, specification);\n };\n protoOf(SpecificationPair).toString = function () {\n return 'SpecificationPair(productRef=' + this.productRef + ', specification=' + this.specification + ')';\n };\n protoOf(SpecificationPair).hashCode = function () {\n var result = getStringHashCode(this.productRef);\n result = imul(result, 31) + this.specification.hashCode() | 0;\n return result;\n };\n protoOf(SpecificationPair).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof SpecificationPair))\n return false;\n var tmp0_other_with_cast = other instanceof SpecificationPair ? other : THROW_CCE();\n if (!(this.productRef === tmp0_other_with_cast.productRef))\n return false;\n if (!this.specification.equals(tmp0_other_with_cast.specification))\n return false;\n return true;\n };\n function Companion_19() {\n this.id = 129;\n }\n protoOf(Companion_19).s1k = function () {\n return this.id;\n };\n var Companion_instance_52;\n function Companion_getInstance_28() {\n return Companion_instance_52;\n }\n function AutoAdaptVariantComponent(originalEntity) {\n this.originalEntity = originalEntity;\n }\n protoOf(AutoAdaptVariantComponent).n31 = function () {\n return this.originalEntity;\n };\n protoOf(AutoAdaptVariantComponent).x1k = function () {\n return 129;\n };\n protoOf(AutoAdaptVariantComponent).eq = function (other) {\n return (other instanceof AutoAdaptVariantComponent ? other : THROW_CCE()).originalEntity.equals(this.originalEntity);\n };\n function Companion_20() {\n this.id = 130;\n }\n protoOf(Companion_20).s1k = function () {\n return this.id;\n };\n var Companion_instance_53;\n function Companion_getInstance_29() {\n return Companion_instance_53;\n }\n function ForceAutoAdaptWhenParentIsDraggedComponent() {\n }\n protoOf(ForceAutoAdaptWhenParentIsDraggedComponent).x1k = function () {\n return 130;\n };\n protoOf(ForceAutoAdaptWhenParentIsDraggedComponent).eq = function (other) {\n return true;\n };\n function Companion_21() {\n this.id = 131;\n }\n protoOf(Companion_21).s1k = function () {\n return this.id;\n };\n var Companion_instance_54;\n function Companion_getInstance_30() {\n return Companion_instance_54;\n }\n function ReplacedWithAutoAdaptEventComponent(oldEntity) {\n this.oldEntity = oldEntity;\n this.h2z_1 = 131;\n }\n protoOf(ReplacedWithAutoAdaptEventComponent).y1l = function () {\n return this.oldEntity;\n };\n protoOf(ReplacedWithAutoAdaptEventComponent).x1k = function () {\n return this.h2z_1;\n };\n protoOf(ReplacedWithAutoAdaptEventComponent).eq = function (other) {\n if (!(other instanceof ReplacedWithAutoAdaptEventComponent))\n return false;\n return other.oldEntity.equals(this.oldEntity);\n };\n function snapOrAutoAdapt($this, draggedRoot) {\n var tmp0_elvis_lhs = AutoAdaptUtils_getInstance().findClosestAutoAdaptHost($this.coreServices.sceneManager.scene, draggedRoot, get_worldPosition(draggedRoot));\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var hoveredHost = tmp;\n var oldParent = get_parent(draggedRoot);\n var candidates = AutoAdaptUtils_getInstance().getAutoAdaptSnapCandidates(draggedRoot, hoveredHost);\n var sortedCandidates = sortAndSelect($this, candidates);\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = sortedCandidates.length;\n while (inductionVariable < last) {\n var element = sortedCandidates[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.drag.AutoAdaptDragStrategy.snapOrAutoAdapt.' call\n if (!element.guestRoot.equals(draggedRoot)) {\n setParent(draggedRoot, null);\n }\n var result = $this.coreServices.validations.evaluateSnapCandidate(element, true);\n if (result.valid) {\n if (draggedRoot.equals(element.guestRoot)) {\n setParent(draggedRoot, oldParent);\n } else {\n loadModelOfValidVariant($this, element.guestRoot);\n updateDraggedComponents($this, draggedRoot, element.guestRoot);\n setParent(element.guestRoot, $this.coreServices.sceneManager.scene);\n element.perform();\n }\n return new ValidAutoAdaptDragStrategyResult(element.guestRoot, element, result.warnings);\n }\n }\n setParent(draggedRoot, oldParent);\n return null;\n }\n function sortAndSelect($this, candidates) {\n var sortedCandidates = $this.s31_1.sortCandidates(candidates);\n if (any_0(sortedCandidates))\n return sortedCandidates;\n return $this.t31_1.sortCandidates(candidates);\n }\n function updateDraggedComponents($this, draggedRootEntity, foundEntityVariant) {\n draggedRootEntity.removeComponent(IsDraggedComponent_instance.id);\n foundEntityVariant.addComponent(IsDraggedComponent_instance);\n resumeViewerUpdatesOnDraggedEntity($this.coreServices.sceneManager);\n $this.coreServices.sceneManager.scene.addComponent(new SomethingIsDraggedComponent(foundEntityVariant));\n pauseViewerUpdatesOnDraggedEntity($this.coreServices.sceneManager);\n }\n function loadModelOfValidVariant($this, entity) {\n var tmp0_safe_receiver = $this.coreServices.coreModules.viewer();\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.autoadapt.drag.AutoAdaptDragStrategy.loadModelOfValidVariant.' call\n if (!entity.hasComponent(20)) {\n ModelUtils_getInstance().loadModelFromModelInfo(entity, tmp0_safe_receiver);\n }\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_children(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.drag.AutoAdaptDragStrategy.loadModelOfValidVariant..' call\n loadModelOfValidVariant($this, element);\n }\n }\n }\n function AutoAdaptDragStrategy(coreServices) {\n AbstractDragStrategy.call(this);\n this.p31_1 = coreServices;\n this.q31_1 = 'AutoAdaptDragStrategy';\n this.r31_1 = null;\n this.s31_1 = (new SnapSorterBuilder()).addInActivationDistanceFilter().addOriginalVariantCriterion().addConnectorPriorityCriterion(Companion_getInstance_69().onlyInActivationDistance).addDistanceCriterion().build();\n this.t31_1 = (new SnapSorterBuilder()).addConnectorPriorityCriterion(Companion_getInstance_69().all).addDistanceCriterion().build();\n }\n protoOf(AutoAdaptDragStrategy).k2z = function () {\n return this.p31_1;\n };\n protoOf(AutoAdaptDragStrategy).mb = function () {\n return this.q31_1;\n };\n protoOf(AutoAdaptDragStrategy).dragStart = function (draggedRootEntity) {\n var tmp0_elvis_lhs = get_variants(draggedRootEntity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var variants = tmp;\n // Inline function 'kotlin.collections.isEmpty' call\n if (variants.length === 0)\n return Unit_instance;\n this.r31_1 = draggedRootEntity.id;\n draggedRootEntity.addComponent(new AutoAdaptSessionComponent());\n };\n protoOf(AutoAdaptDragStrategy).dragMove = function (dragState) {\n var variants = get_variants(dragState.draggedRootEntity);\n if (variants == null)\n return null;\n // Inline function 'kotlin.collections.isEmpty' call\n if (variants.length === 0)\n return null;\n return snapOrAutoAdapt(this, dragState.draggedRootEntity);\n };\n function connectorsFromSpecifications($this, variants) {\n var tmp = asSequence_0(variants);\n return map(tmp, DragSurfaceCanHostWithAutoAdaptSelector$connectorsFromSpecifications$lambda);\n }\n function Companion_22() {\n Companion_instance_55 = this;\n this.logger = LoggerState_getInstance().m1m('DragSurfaceCanHostWithAutoAdaptSelector');\n }\n protoOf(Companion_22).x1i = function () {\n return this.logger;\n };\n var Companion_instance_55;\n function Companion_getInstance_31() {\n if (Companion_instance_55 == null)\n new Companion_22();\n return Companion_instance_55;\n }\n function DragSurfaceCanHostWithAutoAdaptSelector$lambda() {\n return \"System with id '\" + 'AutoAdaptProductSpecificationSystem' + \"' not enabled which is \" + 'required for this system to work. Did you forget to run ' + \"'new AutoAdaptProductSpecificationsSystem(entityManager, productManager)'\";\n }\n function DragSurfaceCanHostWithAutoAdaptSelector$canProjectDragOn$lambda(snappingGuest) {\n var tmp0_safe_receiver = get_connectorsComponent(snappingGuest);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;\n }\n function DragSurfaceCanHostWithAutoAdaptSelector$connectorsFromSpecifications$lambda(specificationPair) {\n Companion_getInstance_2();\n var tmp0_safe_receiver = specificationPair.specification._findComponentKt(11);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;\n }\n function DragSurfaceCanHostWithAutoAdaptSelector(entityManager) {\n Companion_getInstance_31();\n DragSurfaceCanHostSelector.call(this);\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = entityManager.getSystemsRegistered();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.autoadapt.drag.DragSurfaceCanHostWithAutoAdaptSelector.' call\n var tmp = element.id;\n if (tmp === 'AutoAdaptProductSpecificationSystem') {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n var requiredSystemEnabled = tmp$ret$1;\n if (!requiredSystemEnabled) {\n var tmp_0 = Companion_getInstance_31().logger;\n tmp_0.warn(DragSurfaceCanHostWithAutoAdaptSelector$lambda);\n }\n }\n protoOf(DragSurfaceCanHostWithAutoAdaptSelector).canProjectDragOn = function (draggedEntity, dragSurface) {\n var tmp0_safe_receiver = get_connectorsComponent(dragSurface.entity);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectors;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var hostConnectors = tmp;\n var tmp_0 = get_snappingGuestEntitiesSequence(draggedEntity);\n var childSequence = map(tmp_0, DragSurfaceCanHostWithAutoAdaptSelector$canProjectDragOn$lambda);\n var tmp2_safe_receiver = draggedEntity.__getComponentForKotlin(133);\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.specifications;\n var tmp_1;\n if (tmp3_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp3_elvis_lhs;\n }\n var variants = tmp_1;\n var variantConnectorsSequence = connectorsFromSpecifications(this, variants);\n return this.hasMatchingConnector(plus(childSequence, variantConnectorsSequence), hostConnectors, dragSurface.connectorKeys);\n };\n function ValidAutoAdaptDragStrategyResult(entity, snapCandidate, warnings) {\n ValidDragStrategyResult.call(this, entity, snapCandidate, warnings);\n }\n protoOf(ValidAutoAdaptDragStrategyResult).performFinalSnapAction = function (state, coreServices) {\n var tmp0_elvis_lhs = get_snapRoot(state.originalDraggableRoot);\n var originalEntity = tmp0_elvis_lhs == null ? state.originalDraggableRoot : tmp0_elvis_lhs;\n var tmp1_elvis_lhs = get_snapRoot(state.draggedRootEntity);\n var snappedEntity = tmp1_elvis_lhs == null ? state.draggedRootEntity : tmp1_elvis_lhs;\n var hasEntityChange = !originalEntity.equals(snappedEntity);\n if (hasEntityChange) {\n setParentMaintainWorldTransform(this.snapCandidate.guestRoot, null);\n }\n var snapActionCandidateFromStartDrag = this.snapCandidate.withInitialTransform(state.initialTransform);\n var hasTransformChange = !get_worldTransform(snapActionCandidateFromStartDrag.guest).equals(state.initialTransform);\n var tmp;\n if (hasEntityChange) {\n setParentMaintainWorldTransform(snappedEntity, null);\n TransformUtils_instance.setWorldTransform(originalEntity, state.initialTransform);\n this.snapCandidate.createAction().perform();\n tmp = true;\n } else if (hasTransformChange) {\n snapActionCandidateFromStartDrag.createAction().perform();\n tmp = true;\n } else {\n setParent(snappedEntity, state.originalParent);\n TransformUtils_instance.setWorldTransform(snappedEntity, state.initialTransform);\n var tmp2_safe_receiver = get_parent(snappedEntity);\n var oldParentComponent = tmp2_safe_receiver == null ? null : get_parentComponent(tmp2_safe_receiver);\n var tmp4_safe_receiver = oldParentComponent == null ? null : oldParentComponent.children;\n if ((tmp4_safe_receiver == null ? null : contains(tmp4_safe_receiver, snappedEntity)) === false) {\n var newParentComponent = oldParentComponent.addChild(snappedEntity);\n ensureNotNull(get_parent(snappedEntity)).addComponent(newParentComponent);\n }\n tmp = false;\n }\n return tmp;\n };\n function drawLines($this, entity, lines) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(lines.length);\n var inductionVariable = 0;\n var last = lines.length;\n while (inductionVariable < last) {\n var item = lines[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.debug.DebugLineDrawingSystem.drawLines.' call\n var tmp0_safe_receiver = $this.coreServices.coreModules.viewer();\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.createUiLine(item.start, item.end, item.color, item.thickness);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n throw Exception_init_$Create$('Something went wrong when drawing debug lines in ' + $this.id + ', viewer returned a null line id.');\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var lineId = tmp;\n destination.q(lineId);\n }\n var lineIds = copyToArray(destination);\n entity.addComponent(new ViewerLineIdsComponent(lineIds));\n }\n function cleanLines($this, lineIds) {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = lineIds.length;\n while (inductionVariable < last) {\n var element = lineIds[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.debug.DebugLineDrawingSystem.cleanLines.' call\n var tmp0_safe_receiver = $this.coreServices.coreModules.viewer();\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.removeUiLine(element);\n }\n }\n }\n function Companion_23() {\n Companion_instance_56 = this;\n var tmp = this;\n // Inline function 'kotlin.also' call\n var this_0 = LoggerState_getInstance().m1m('LineDrawingSystem');\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.debug.Companion.logger.' call\n this_0.level = LogLevel_DEBUG_getInstance();\n tmp.g32_1 = this_0;\n this.ID = 'DebugLineDrawingSystem';\n }\n protoOf(Companion_23).u1n = function () {\n return this.ID;\n };\n var Companion_instance_56;\n function Companion_getInstance_32() {\n if (Companion_instance_56 == null)\n new Companion_23();\n return Companion_instance_56;\n }\n function DebugLineDrawingSystem$onAddComponent$lambda() {\n return 'Added debug line component to an entity that already has a ViewerLineIds component.';\n }\n function DebugLineDrawingSystem$onUpdateComponent$lambda(this$0) {\n return function () {\n return 'Did not find ViewerLineIdsComponent when updating DebugLinesComponent in ' + this$0.id + '.';\n };\n }\n function DebugLineDrawingSystem$onRemoveComponent$lambda(this$0) {\n return function () {\n return 'Did not find ViewerLineIdsComponent when removing DebugLinesComponent in ' + this$0.id + '.';\n };\n }\n function DebugLineDrawingSystem(coreServices) {\n Companion_getInstance_32();\n SystemBase2.call(this, 'Line Drawing System', 92, 123);\n this.coreServices = coreServices;\n }\n protoOf(DebugLineDrawingSystem).k2z = function () {\n return this.coreServices;\n };\n protoOf(DebugLineDrawingSystem).onAddComponent = function (entity, newComponent) {\n if (entity.hasComponent(93)) {\n var tmp = Companion_getInstance_32().g32_1;\n tmp.warn(DebugLineDrawingSystem$onAddComponent$lambda);\n return Unit_instance;\n }\n drawLines(this, entity, newComponent.lines);\n };\n protoOf(DebugLineDrawingSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(93);\n var lineIds = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lineIds;\n if (!(lineIds == null)) {\n cleanLines(this, lineIds);\n entity.removeComponent(93);\n drawLines(this, entity, newComponent.lines);\n } else {\n var tmp = Companion_getInstance_32().g32_1;\n tmp.warn(DebugLineDrawingSystem$onUpdateComponent$lambda(this));\n }\n };\n protoOf(DebugLineDrawingSystem).onRemoveComponent = function (entity, oldComponent) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(93);\n var lineIds = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lineIds;\n if (!(lineIds == null)) {\n cleanLines(this, lineIds);\n entity.removeComponent(93);\n } else {\n var tmp = Companion_getInstance_32().g32_1;\n tmp.warn(DebugLineDrawingSystem$onRemoveComponent$lambda(this));\n }\n };\n protoOf(DebugLineDrawingSystem).onAddComponent2 = function (entity, newComponent) {\n var tmp0_safe_receiver = newComponent.entityStateBeforeLoadingSnapshot;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n tmp = tmp0_safe_receiver.getComponent(93);\n }\n var tmp1_safe_receiver = tmp;\n var oldLineIds = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.lineIds;\n if (!(oldLineIds == null)) {\n cleanLines(this, oldLineIds);\n }\n var newEntity = newComponent.entity;\n var tmp_0;\n if (newEntity == null) {\n tmp_0 = null;\n } else {\n tmp_0 = newEntity.__getComponentForKotlin(92);\n }\n var tmp3_safe_receiver = tmp_0;\n var newLines = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.lines;\n if (!(newEntity == null) ? !(newLines == null) : false) {\n drawLines(this, newEntity, newLines);\n }\n };\n protoOf(DebugLineDrawingSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n };\n protoOf(DebugLineDrawingSystem).onRemoveComponent2 = function (entity, oldComponent) {\n };\n function LoggingEntityManagerWatcher(entityManager, componentId) {\n this.h32_1 = entityManager;\n this.i32_1 = componentId;\n this.h32_1.addWatcher(this);\n var tmp = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp.j32_1 = ArrayList_init_$Create$();\n this.k32_1 = 0;\n }\n protoOf(LoggingEntityManagerWatcher).l32 = function () {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var this_0 = this.j32_1;\n var tmp;\n if (isInterface(this_0, Collection)) {\n tmp = this_0.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.debug.LoggingEntityManagerWatcher.checkTrace.' call\n if (element.v1o() === this.i32_1) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n }\n tmp$ret$0 = false;\n }\n var shouldPrint = tmp$ret$0;\n if (shouldPrint) {\n this.m32();\n this.h32_1.removeWatcher(this);\n }\n this.j32_1.z();\n };\n protoOf(LoggingEntityManagerWatcher).m32 = function () {\n // Inline function 'kotlin.collections.mutableListOf' call\n var result = ArrayList_init_$Create$();\n var indent = 0;\n var tmp0_iterator = this.j32_1.t();\n while (tmp0_iterator.u()) {\n var trace = tmp0_iterator.w();\n if (equals(trace, DoneEntry_instance)) {\n indent = indent - 1 | 0;\n } else {\n result.q(repeat(' ', imul(indent, 2)) + trace.n32());\n indent = indent + 1 | 0;\n }\n }\n println(joinToString_0(result, '\\n'));\n };\n protoOf(LoggingEntityManagerWatcher).beforeAddComponent = function (entity, component) {\n this.j32_1.q(new AddEntry(entity, component));\n this.k32_1 = this.k32_1 + 1 | 0;\n };\n protoOf(LoggingEntityManagerWatcher).afterAddComponent = function (entity, component) {\n this.j32_1.q(DoneEntry_instance);\n this.k32_1 = this.k32_1 - 1 | 0;\n if (this.k32_1 === 0) {\n this.l32();\n }\n };\n protoOf(LoggingEntityManagerWatcher).beforeRemoveComponent = function (entity, componentId) {\n this.j32_1.q(new RemoveEntry(entity, componentId));\n this.k32_1 = this.k32_1 + 1 | 0;\n };\n protoOf(LoggingEntityManagerWatcher).afterRemoveComponent = function (entity, componentId) {\n this.j32_1.q(DoneEntry_instance);\n this.k32_1 = this.k32_1 - 1 | 0;\n if (this.k32_1 === 0) {\n this.l32();\n }\n };\n protoOf(LoggingEntityManagerWatcher).beforeNotifyOnAdd = function (componentListener) {\n this.j32_1.q(new CallEntry(componentListener, 'onAdd'));\n };\n protoOf(LoggingEntityManagerWatcher).afterNotifyOnAdd = function (componentListener) {\n this.j32_1.q(DoneEntry_instance);\n };\n protoOf(LoggingEntityManagerWatcher).beforeNotifyOnUpdate = function (componentListener) {\n this.j32_1.q(new CallEntry(componentListener, 'onUpdate'));\n };\n protoOf(LoggingEntityManagerWatcher).afterNotifyOnUpdate = function (componentListener) {\n this.j32_1.q(DoneEntry_instance);\n };\n protoOf(LoggingEntityManagerWatcher).beforeNotifyOnRemove = function (componentListener) {\n this.j32_1.q(new CallEntry(componentListener, 'onRemove'));\n };\n protoOf(LoggingEntityManagerWatcher).afterNotifyOnRemove = function (componentListener) {\n this.j32_1.q(DoneEntry_instance);\n };\n function DoneEntry() {\n this.o32_1 = -1;\n this.p32_1 = '';\n }\n protoOf(DoneEntry).v1o = function () {\n return this.o32_1;\n };\n protoOf(DoneEntry).n32 = function () {\n return this.p32_1;\n };\n var DoneEntry_instance;\n function DoneEntry_getInstance() {\n return DoneEntry_instance;\n }\n function AddEntry(entity, component) {\n this.q32_1 = entity;\n this.r32_1 = component;\n this.s32_1 = this.r32_1.typeId;\n this.t32_1 = 'Adding ' + getKClassFromExpression(this.r32_1).v6() + ' (' + this.r32_1.typeId + ') to ' + get_displayName(this.q32_1);\n }\n protoOf(AddEntry).v1o = function () {\n return this.s32_1;\n };\n protoOf(AddEntry).n32 = function () {\n return this.t32_1;\n };\n function RemoveEntry(entity, componentId) {\n this.u32_1 = entity;\n this.v32_1 = componentId;\n this.w32_1 = 'Removing ' + componentName(this.v32_1) + ' from ' + get_displayName(this.u32_1);\n }\n protoOf(RemoveEntry).v1o = function () {\n return this.v32_1;\n };\n protoOf(RemoveEntry).n32 = function () {\n return this.w32_1;\n };\n function CallEntry(listener, method) {\n this.x32_1 = listener;\n this.y32_1 = -1;\n this.z32_1 = 'Calling ' + method + ' on ' + (!(this.x32_1.ownerSystem == null) ? ensureNotNull(this.x32_1.ownerSystem).id : getKClassFromExpression(this.x32_1).v6());\n }\n protoOf(CallEntry).v1o = function () {\n return this.y32_1;\n };\n protoOf(CallEntry).n32 = function () {\n return this.z32_1;\n };\n function idForAdd($this, componentListener) {\n var tmp0_safe_receiver = componentListener.ownerSystem;\n return '' + (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.id) + ' add ' + componentListener.componentId;\n }\n function idForUpdate($this, componentListener) {\n var tmp0_safe_receiver = componentListener.ownerSystem;\n return '' + (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.id) + ' update ' + componentListener.componentId;\n }\n function idForRemove($this, componentListener) {\n var tmp0_safe_receiver = componentListener.ownerSystem;\n return '' + (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.id) + ' remove ' + componentListener.componentId;\n }\n function MeasuringEntityManagerWatcher(entityManager) {\n this.entityManager = entityManager;\n this.measurer = new Measurer();\n }\n protoOf(MeasuringEntityManagerWatcher).p1i = function () {\n return this.entityManager;\n };\n protoOf(MeasuringEntityManagerWatcher).j2t = function () {\n return this.measurer;\n };\n protoOf(MeasuringEntityManagerWatcher).beforeAddComponent = function (entity, component) {\n };\n protoOf(MeasuringEntityManagerWatcher).afterAddComponent = function (entity, component) {\n };\n protoOf(MeasuringEntityManagerWatcher).beforeRemoveComponent = function (entity, componentId) {\n };\n protoOf(MeasuringEntityManagerWatcher).afterRemoveComponent = function (entity, componentId) {\n };\n protoOf(MeasuringEntityManagerWatcher).beforeNotifyOnAdd = function (componentListener) {\n this.measurer.start(idForAdd(this, componentListener));\n };\n protoOf(MeasuringEntityManagerWatcher).afterNotifyOnAdd = function (componentListener) {\n this.measurer.stop(idForAdd(this, componentListener));\n };\n protoOf(MeasuringEntityManagerWatcher).beforeNotifyOnUpdate = function (componentListener) {\n this.measurer.start(idForUpdate(this, componentListener));\n };\n protoOf(MeasuringEntityManagerWatcher).afterNotifyOnUpdate = function (componentListener) {\n this.measurer.stop(idForUpdate(this, componentListener));\n };\n protoOf(MeasuringEntityManagerWatcher).beforeNotifyOnRemove = function (componentListener) {\n this.measurer.start(idForRemove(this, componentListener));\n };\n protoOf(MeasuringEntityManagerWatcher).afterNotifyOnRemove = function (componentListener) {\n this.measurer.stop(idForRemove(this, componentListener));\n };\n function calculateEndTransform($this, point, entity) {\n return new Transform(point, get_worldTransform(entity).rotation);\n }\n function Companion_24() {\n }\n protoOf(Companion_24).basedOnEntity = function (entity, point, rayFromCameraToDragPoint) {\n var tmp0_elvis_lhs = get_snapRoot(entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n var message = \"Can't drag an entity with no draggable root. The entity or any of its ancestor needs to have the Draggable component\";\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var draggedEntity = tmp;\n var tmp1_originalParent = get_parent(draggedEntity);\n var tmp2_initialTransform = get_worldTransform(draggedEntity);\n var tmp3_dragEndTransform = calculateEndTransform(this, point, draggedEntity);\n return new DragState(entity, draggedEntity, tmp1_originalParent, point, tmp2_initialTransform, tmp3_dragEndTransform, rayFromCameraToDragPoint);\n };\n var Companion_instance_57;\n function Companion_getInstance_33() {\n return Companion_instance_57;\n }\n function DragState(originalDraggedEntity, draggedRootEntity, originalParent, dragPoint, initialTransform, dragEndTransform, rayFromCameraToDragPoint, validDragStrategyResult) {\n validDragStrategyResult = validDragStrategyResult === VOID ? null : validDragStrategyResult;\n this.originalDraggedEntity = originalDraggedEntity;\n this.draggedRootEntity = draggedRootEntity;\n this.originalParent = originalParent;\n this.dragPoint = dragPoint;\n this.initialTransform = initialTransform;\n this.dragEndTransform = dragEndTransform;\n this.rayFromCameraToDragPoint = rayFromCameraToDragPoint;\n this.validDragStrategyResult = validDragStrategyResult;\n }\n protoOf(DragState).a33 = function () {\n return this.originalDraggedEntity;\n };\n protoOf(DragState).b33 = function () {\n return this.draggedRootEntity;\n };\n protoOf(DragState).c33 = function () {\n return this.originalParent;\n };\n protoOf(DragState).d33 = function () {\n return this.dragPoint;\n };\n protoOf(DragState).l2q = function () {\n return this.initialTransform;\n };\n protoOf(DragState).e33 = function () {\n return this.dragEndTransform;\n };\n protoOf(DragState).h24 = function () {\n return this.rayFromCameraToDragPoint;\n };\n protoOf(DragState).f33 = function () {\n return this.validDragStrategyResult;\n };\n protoOf(DragState).g33 = function () {\n var tmp0_elvis_lhs = get_snapRoot(this.originalDraggedEntity);\n return tmp0_elvis_lhs == null ? this.originalDraggedEntity : tmp0_elvis_lhs;\n };\n protoOf(DragState).h33 = function () {\n var tmp0_safe_receiver = this.validDragStrategyResult;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.snapCandidate;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.endTransform;\n return tmp2_elvis_lhs == null ? this.initialTransform : tmp2_elvis_lhs;\n };\n protoOf(DragState).updateDragChange = function (point, rayFromCameraToDragPoint) {\n return this.copy(VOID, VOID, VOID, point, VOID, calculateEndTransform(Companion_instance_57, point, this.draggedRootEntity), rayFromCameraToDragPoint);\n };\n protoOf(DragState).updateWithDragStrategyResult = function (entity, validDragStrategyResult) {\n var tmp0_elvis_lhs = get_snapRoot(entity);\n return this.copy(VOID, tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs, VOID, VOID, VOID, VOID, VOID, validDragStrategyResult);\n };\n protoOf(DragState).af = function () {\n return this.originalDraggedEntity;\n };\n protoOf(DragState).bf = function () {\n return this.draggedRootEntity;\n };\n protoOf(DragState).g1k = function () {\n return this.originalParent;\n };\n protoOf(DragState).h1k = function () {\n return this.dragPoint;\n };\n protoOf(DragState).i1k = function () {\n return this.initialTransform;\n };\n protoOf(DragState).j1k = function () {\n return this.dragEndTransform;\n };\n protoOf(DragState).k1k = function () {\n return this.rayFromCameraToDragPoint;\n };\n protoOf(DragState).p1z = function () {\n return this.validDragStrategyResult;\n };\n protoOf(DragState).i33 = function (originalDraggedEntity, draggedRootEntity, originalParent, dragPoint, initialTransform, dragEndTransform, rayFromCameraToDragPoint, validDragStrategyResult) {\n return new DragState(originalDraggedEntity, draggedRootEntity, originalParent, dragPoint, initialTransform, dragEndTransform, rayFromCameraToDragPoint, validDragStrategyResult);\n };\n protoOf(DragState).copy = function (originalDraggedEntity, draggedRootEntity, originalParent, dragPoint, initialTransform, dragEndTransform, rayFromCameraToDragPoint, validDragStrategyResult, $super) {\n originalDraggedEntity = originalDraggedEntity === VOID ? this.originalDraggedEntity : originalDraggedEntity;\n draggedRootEntity = draggedRootEntity === VOID ? this.draggedRootEntity : draggedRootEntity;\n originalParent = originalParent === VOID ? this.originalParent : originalParent;\n dragPoint = dragPoint === VOID ? this.dragPoint : dragPoint;\n initialTransform = initialTransform === VOID ? this.initialTransform : initialTransform;\n dragEndTransform = dragEndTransform === VOID ? this.dragEndTransform : dragEndTransform;\n rayFromCameraToDragPoint = rayFromCameraToDragPoint === VOID ? this.rayFromCameraToDragPoint : rayFromCameraToDragPoint;\n validDragStrategyResult = validDragStrategyResult === VOID ? this.validDragStrategyResult : validDragStrategyResult;\n return this.i33(originalDraggedEntity, draggedRootEntity, originalParent, dragPoint, initialTransform, dragEndTransform, rayFromCameraToDragPoint, validDragStrategyResult);\n };\n protoOf(DragState).toString = function () {\n return 'DragState(originalDraggedEntity=' + this.originalDraggedEntity + ', draggedRootEntity=' + this.draggedRootEntity + ', originalParent=' + this.originalParent + ', dragPoint=' + this.dragPoint + ', initialTransform=' + this.initialTransform + ', dragEndTransform=' + this.dragEndTransform + ', rayFromCameraToDragPoint=' + this.rayFromCameraToDragPoint + ', validDragStrategyResult=' + this.validDragStrategyResult + ')';\n };\n protoOf(DragState).hashCode = function () {\n var result = this.originalDraggedEntity.hashCode();\n result = imul(result, 31) + this.draggedRootEntity.hashCode() | 0;\n result = imul(result, 31) + (this.originalParent == null ? 0 : this.originalParent.hashCode()) | 0;\n result = imul(result, 31) + this.dragPoint.hashCode() | 0;\n result = imul(result, 31) + this.initialTransform.hashCode() | 0;\n result = imul(result, 31) + this.dragEndTransform.hashCode() | 0;\n result = imul(result, 31) + this.rayFromCameraToDragPoint.hashCode() | 0;\n result = imul(result, 31) + (this.validDragStrategyResult == null ? 0 : hashCode(this.validDragStrategyResult)) | 0;\n return result;\n };\n protoOf(DragState).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof DragState))\n return false;\n var tmp0_other_with_cast = other instanceof DragState ? other : THROW_CCE();\n if (!this.originalDraggedEntity.equals(tmp0_other_with_cast.originalDraggedEntity))\n return false;\n if (!this.draggedRootEntity.equals(tmp0_other_with_cast.draggedRootEntity))\n return false;\n if (!equals(this.originalParent, tmp0_other_with_cast.originalParent))\n return false;\n if (!this.dragPoint.equals(tmp0_other_with_cast.dragPoint))\n return false;\n if (!this.initialTransform.equals(tmp0_other_with_cast.initialTransform))\n return false;\n if (!this.dragEndTransform.equals(tmp0_other_with_cast.dragEndTransform))\n return false;\n if (!this.rayFromCameraToDragPoint.equals(tmp0_other_with_cast.rayFromCameraToDragPoint))\n return false;\n if (!equals(this.validDragStrategyResult, tmp0_other_with_cast.validDragStrategyResult))\n return false;\n return true;\n };\n function Companion_25() {\n this.id = 69;\n }\n protoOf(Companion_25).s1k = function () {\n return this.id;\n };\n var Companion_instance_58;\n function Companion_getInstance_34() {\n return Companion_instance_58;\n }\n function DragStateComponent(dragState) {\n this.dragState = dragState;\n this.j33_1 = false;\n }\n protoOf(DragStateComponent).k33 = function () {\n return this.dragState;\n };\n protoOf(DragStateComponent).x1k = function () {\n return 69;\n };\n protoOf(DragStateComponent).eq = function (other) {\n return false;\n };\n protoOf(DragStateComponent).a1l = function () {\n return this.j33_1;\n };\n function Companion_26() {\n Companion_instance_59 = this;\n this.ID = 'DragSurfaceNormalVisualizationSystem';\n this.l33_1 = 500.0;\n this.m33_1 = 20.0;\n var tmp = this;\n // Inline function 'kotlin.also' call\n var this_0 = LoggerState_getInstance().m1m('DragSurfaceNormalVisualizationSystem');\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.dragging.Companion.logger.' call\n this_0.level = LogLevel_DEBUG_getInstance();\n tmp.n33_1 = this_0;\n }\n protoOf(Companion_26).u1n = function () {\n return this.ID;\n };\n var Companion_instance_59;\n function Companion_getInstance_35() {\n if (Companion_instance_59 == null)\n new Companion_26();\n return Companion_instance_59;\n }\n function drawLinesForEntity($this, entity, dragSurfaceComponent) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var lines = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = dragSurfaceComponent.surfaces;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSurfaceNormalVisualizationSystem.drawLinesForEntity.' call\n drawNormals($this, element.surface, lines);\n drawSurfaceEdges($this, element.surface, lines);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$1 = copyToArray(lines);\n entity.addComponent(new DebugLinesComponent(tmp$ret$1));\n }\n function drawNormals($this, polyhedron, lines) {\n if (polyhedron instanceof ConvexPolyhedron) {\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var indexedObject = polyhedron.faces;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var item = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSurfaceNormalVisualizationSystem.drawNormals.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var faceCenter = Companion_getInstance_4().ZERO;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = item.indices;\n var inductionVariable_0 = 0;\n var last_0 = indexedObject_0.length;\n while (inductionVariable_0 < last_0) {\n var element = indexedObject_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSurfaceNormalVisualizationSystem.drawNormals..' call\n faceCenter = faceCenter.plus(polyhedron.vertices[element]);\n }\n var tmp = faceCenter;\n // Inline function 'kotlin.collections.count' call\n var tmp$ret$0 = item.indices.length;\n faceCenter = tmp.__divIntForKotlin(tmp$ret$0);\n var faceNormal = polyhedron.normals[tmp1];\n var tmp_0;\n // Inline function 'kotlin.math.absoluteValue' call\n var this_0 = faceNormal.dot(Companion_getInstance_4().RIGHT);\n if (Math.abs(this_0) > 0.0) {\n tmp_0 = faceNormal.cross(Companion_getInstance_4().FORWARD);\n } else {\n tmp_0 = faceNormal.cross(Companion_getInstance_4().RIGHT);\n }\n var right = tmp_0;\n var end = faceCenter.plus(faceNormal.times(500.0));\n var color = getSurfaceColor($this, faceNormal);\n lines.q(new DebugLine(faceCenter, end, color, 20.0));\n lines.q(new DebugLine(end, end.minus(faceNormal.plus(right).times(0.1).times(500.0)), color, 20.0));\n lines.q(new DebugLine(end, end.minus(faceNormal.minus(right).times(0.1).times(500.0)), color, 20.0));\n }\n } else {\n if (polyhedron instanceof PolyhedronGroup) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_1 = polyhedron.polyhedra;\n var inductionVariable_1 = 0;\n var last_1 = indexedObject_1.length;\n while (inductionVariable_1 < last_1) {\n var element_0 = indexedObject_1[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSurfaceNormalVisualizationSystem.drawNormals.' call\n drawNormals($this, element_0, lines);\n }\n }\n }\n }\n function getSurfaceColor($this, faceNormal) {\n // Inline function 'kotlin.math.abs' call\n var x = faceNormal.X;\n var tmp = Math.abs(x);\n // Inline function 'kotlin.math.abs' call\n var x_0 = faceNormal.Y;\n var tmp_0 = Math.abs(x_0);\n // Inline function 'kotlin.math.abs' call\n var x_1 = faceNormal.Z;\n var tmp$ret$2 = Math.abs(x_1);\n var color = new Vector(tmp, tmp_0, tmp$ret$2);\n return color;\n }\n function drawSurfaceEdges($this, polyhedron, lines) {\n if (polyhedron instanceof ConvexPolyhedron) {\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var indexedObject = polyhedron.faces;\n var inductionVariable = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable < last_0) {\n var item = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSurfaceNormalVisualizationSystem.drawSurfaceEdges.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var faceNormal = polyhedron.normals[tmp1];\n var color = getSurfaceColor($this, faceNormal);\n var inductionVariable_0 = 1;\n var last_1 = item.indices.length;\n if (inductionVariable_0 < last_1)\n do {\n var i = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n var previous = polyhedron.vertices[item.indices[i - 1 | 0]];\n var next = polyhedron.vertices[item.indices[i]];\n lines.q(new DebugLine(previous, next, color, 20.0));\n }\n while (inductionVariable_0 < last_1);\n if (item.indices.length > 1) {\n var first_0 = polyhedron.vertices[first(item.indices)];\n var last_2 = polyhedron.vertices[last(item.indices)];\n lines.q(new DebugLine(first_0, last_2, color, 20.0));\n }\n }\n } else {\n if (polyhedron instanceof PolyhedronGroup) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = polyhedron.polyhedra;\n var inductionVariable_1 = 0;\n var last_3 = indexedObject_0.length;\n while (inductionVariable_1 < last_3) {\n var element = indexedObject_0[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSurfaceNormalVisualizationSystem.drawSurfaceEdges.' call\n drawSurfaceEdges($this, element, lines);\n }\n }\n }\n }\n function DragSurfaceNormalVisualizationSystem(coreServices) {\n Companion_getInstance_35();\n var tmp = InSceneComponent_instance.id;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [92];\n SystemBase2.call(this, 'DragSurfaceNormalVisualizationSystem', 91, tmp, tmp$ret$2);\n this.w33_1 = coreServices;\n }\n protoOf(DragSurfaceNormalVisualizationSystem).enable = function () {\n protoOf(SystemBase2).enable.call(this);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.w33_1.entityManager.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSurfaceNormalVisualizationSystem.enable.' call\n if (element.hasComponent(74)) {\n var dragSurface = element.__getComponentForKotlin(91);\n if (!(dragSurface == null)) {\n this.onAddComponent(element, dragSurface);\n }\n }\n }\n };\n protoOf(DragSurfaceNormalVisualizationSystem).disable = function () {\n protoOf(SystemBase2).disable.call(this);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.w33_1.entityManager.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSurfaceNormalVisualizationSystem.disable.' call\n if (element.hasComponent(74)) {\n var dragSurface = element.__getComponentForKotlin(91);\n if (!(dragSurface == null)) {\n this.onRemoveComponent(element, dragSurface);\n }\n }\n }\n };\n protoOf(DragSurfaceNormalVisualizationSystem).onAddComponent = function (entity, newComponent) {\n if (get_isInScene(entity)) {\n drawLinesForEntity(this, entity, newComponent);\n }\n };\n protoOf(DragSurfaceNormalVisualizationSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n if (get_isInScene(entity)) {\n drawLinesForEntity(this, entity, newComponent);\n }\n };\n protoOf(DragSurfaceNormalVisualizationSystem).onRemoveComponent = function (entity, oldComponent) {\n entity.removeComponent(92);\n };\n protoOf(DragSurfaceNormalVisualizationSystem).onAddComponent2 = function (entity, newComponent) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(91);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n drawLinesForEntity(this, entity, tmp0_safe_receiver);\n }\n };\n protoOf(DragSurfaceNormalVisualizationSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(91);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n drawLinesForEntity(this, entity, tmp0_safe_receiver);\n }\n };\n protoOf(DragSurfaceNormalVisualizationSystem).onRemoveComponent2 = function (entity, oldComponent) {\n entity.removeComponent(92);\n };\n function createDebugSurfaces($this, entity, newComponent) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = newComponent.surfaces;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSurfaceVisualizationSystem.createDebugSurfaces.' call\n var tmp$ret$0 = item.surface;\n destination.q(tmp$ret$0);\n }\n var allPolyhedrons = copyToArray(destination);\n var polygons = PolyhedronUtils_getInstance().getPolygonsFromPolyhedrons(allPolyhedrons);\n entity.addComponent(new DebugSurfacesComponent(polygons));\n }\n function Companion_27() {\n this.ID = 'DragSurfaceVisualizationSystem';\n }\n protoOf(Companion_27).u1n = function () {\n return this.ID;\n };\n var Companion_instance_60;\n function Companion_getInstance_36() {\n return Companion_instance_60;\n }\n function DragSurfaceVisualizationSystem(entityManager) {\n var tmp = InSceneComponent_instance.id;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = ['DebugSurfaceDrawingSystem'];\n SystemBase2.call(this, 'DragSurfaceVisualizationSystem', 91, tmp, VOID, VOID, tmp$ret$2);\n this.f34_1 = entityManager;\n }\n protoOf(DragSurfaceVisualizationSystem).enable = function () {\n protoOf(SystemBase2).enable.call(this);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.f34_1.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSurfaceVisualizationSystem.enable.' call\n var dragSurface = element.__getComponentForKotlin(91);\n if (!(dragSurface == null)) {\n this.onAddComponent(element, dragSurface);\n }\n }\n };\n protoOf(DragSurfaceVisualizationSystem).disable = function () {\n protoOf(SystemBase2).disable.call(this);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.f34_1.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSurfaceVisualizationSystem.disable.' call\n var dragSurface = element.__getComponentForKotlin(91);\n if (!(dragSurface == null)) {\n this.onRemoveComponent(element, dragSurface);\n }\n }\n };\n protoOf(DragSurfaceVisualizationSystem).onAddComponent = function (entity, newComponent) {\n if (get_isInScene(entity)) {\n createDebugSurfaces(this, entity, newComponent);\n }\n };\n protoOf(DragSurfaceVisualizationSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n if (get_isInScene(entity)) {\n entity.removeComponent(120);\n createDebugSurfaces(this, entity, newComponent);\n }\n };\n protoOf(DragSurfaceVisualizationSystem).onRemoveComponent = function (entity, oldComponent) {\n entity.removeComponent(120);\n };\n protoOf(DragSurfaceVisualizationSystem).onAddComponent2 = function (entity, newComponent) {\n entity.removeComponent(120);\n var worldDragSurfacesComponent = entity.__getComponentForKotlin(91);\n if (!(worldDragSurfacesComponent == null)) {\n createDebugSurfaces(this, entity, worldDragSurfacesComponent);\n }\n };\n protoOf(DragSurfaceVisualizationSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n entity.removeComponent(120);\n var worldDragSurfacesComponent = entity.__getComponentForKotlin(91);\n if (!(worldDragSurfacesComponent == null)) {\n createDebugSurfaces(this, entity, worldDragSurfacesComponent);\n }\n };\n protoOf(DragSurfaceVisualizationSystem).onRemoveComponent2 = function (entity, oldComponent) {\n entity.removeComponent(120);\n };\n function createDragSurface($this, entity) {\n var prevComponent = entity.__getComponentForKotlin(74);\n var tmp1_elvis_lhs = prevComponent == null ? null : prevComponent.basedOnCollider;\n var allowedToUpdate = tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;\n if (allowedToUpdate) {\n var tmp2_safe_receiver = get_colliderShapeComponent(entity);\n var collider = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.polyhedron;\n if (collider == null) {\n $this.entityManager.removeComponent(entity, 74);\n return Unit_instance;\n }\n var tmp3_safe_receiver = get_connectorsComponent(entity);\n var connectors = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.hostConnectors;\n if (connectors == null ? true : connectors.b1()) {\n $this.entityManager.removeComponent(entity, 74);\n return Unit_instance;\n }\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [new DragSurface(collider, null)];\n $this.entityManager.addComponent(entity, new DragSurfacesComponent(tmp$ret$2, true));\n }\n }\n function DragSurfacesUpdateSystem(entityManager) {\n Companion_getInstance_2();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [74];\n SystemBase2.call(this, 'DragSurfaceUpdateSystem', 19, 11, tmp$ret$2);\n this.entityManager = entityManager;\n this.enable();\n }\n protoOf(DragSurfacesUpdateSystem).p1i = function () {\n return this.entityManager;\n };\n protoOf(DragSurfacesUpdateSystem).onAddComponent = function (entity, newComponent) {\n createDragSurface(this, entity);\n };\n protoOf(DragSurfacesUpdateSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n createDragSurface(this, entity);\n };\n protoOf(DragSurfacesUpdateSystem).onRemoveComponent = function (entity, oldComponent) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(74);\n if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.basedOnCollider) === true) {\n this.entityManager.removeComponent(entity, 74);\n }\n };\n protoOf(DragSurfacesUpdateSystem).onAddComponent2 = function (entity, newComponent) {\n createDragSurface(this, entity);\n };\n protoOf(DragSurfacesUpdateSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n createDragSurface(this, entity);\n };\n protoOf(DragSurfacesUpdateSystem).onRemoveComponent2 = function (entity, oldComponent) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(74);\n if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.basedOnCollider) === true) {\n this.entityManager.removeComponent(entity, 74);\n }\n };\n function _get_sceneManager__lxhb6y($this) {\n return $this.w34_1.sceneManager;\n }\n function _get_history__d61b7h($this) {\n return $this.w34_1.coreModules.history();\n }\n function _get_state__b8zcm8($this) {\n var tmp = _get_sceneManager__lxhb6y($this).scene;\n var tmp0_safe_receiver = tmp.__getComponentForKotlin(69);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dragState;\n }\n function dragStart_0($this, entity, event) {\n var tmp0_elvis_lhs = get_snapRoot(entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var snapRoot = tmp;\n var newState = Companion_instance_57.basedOnEntity(entity, event.point, event.rayFromCameraToDragPoint);\n updateDragState($this, newState);\n if (addDragComponents($this, snapRoot, newState)) {\n runDragStartOnStrategies($this);\n }\n }\n function addDragComponents($this, draggableRootEntity, state) {\n var tmp = _get_sceneManager__lxhb6y($this).scene;\n if (tmp.hasComponent(66)) {\n var tmp_0 = Companion_getInstance_37().b35_1;\n tmp_0.info(DragSystem$addDragComponents$lambda);\n return false;\n }\n _get_sceneManager__lxhb6y($this).scene.addComponent(new DragStateComponent(state));\n _get_sceneManager__lxhb6y($this).scene.addComponent(new SomethingIsDraggedComponent(draggableRootEntity));\n draggableRootEntity.addComponent(IsDraggedComponent_instance);\n return true;\n }\n function dragMove($this, event) {\n var tmp0_elvis_lhs = _get_state__b8zcm8($this);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var dragState = tmp;\n pauseViewerUpdatesOnDraggedEntity(_get_sceneManager__lxhb6y($this));\n var tmp_0 = _get_sceneManager__lxhb6y($this).scene;\n if (!tmp_0.hasComponent(66)) {\n var tmp_1 = Companion_getInstance_37().b35_1;\n tmp_1.error(DragSystem$dragMove$lambda);\n }\n var newDragState = dragState.updateDragChange(event.point, event.rayFromCameraToDragPoint);\n updateDragState($this, newDragState);\n runDragMoveOnStrategies($this, newDragState);\n resumeViewerUpdatesOnDraggedEntity(_get_sceneManager__lxhb6y($this));\n }\n function dragStop_0($this) {\n var tmp0_elvis_lhs = _get_state__b8zcm8($this);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var dragState = tmp;\n var tmp_0 = _get_sceneManager__lxhb6y($this).scene;\n if (!tmp_0.hasComponent(66)) {\n var tmp_1 = Companion_getInstance_37().b35_1;\n tmp_1.error(DragSystem$dragStop$lambda);\n }\n if (isDragStartedEarlier($this)) {\n var tmp1_safe_receiver = dragState.validDragStrategyResult;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.performFinalSnapAction(dragState, $this.w34_1);\n var snapResult = tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs;\n if (!snapResult) {\n var tmp3_safe_receiver = _get_history__d61b7h($this);\n if (tmp3_safe_receiver == null)\n null;\n else {\n tmp3_safe_receiver.discardLatestSnapshot();\n }\n }\n runDragStopOnStrategies($this);\n }\n var tmp_2;\n var tmp4_safe_receiver = _get_state__b8zcm8($this);\n var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.draggedRootEntity;\n if (!((tmp5_safe_receiver == null ? null : tmp5_safe_receiver.isDisposed) === true)) {\n var tmp6_safe_receiver = _get_state__b8zcm8($this);\n tmp_2 = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.draggedRootEntity;\n } else {\n tmp_2 = null;\n }\n var draggedRoot = tmp_2;\n if (draggedRoot == null)\n null;\n else\n draggedRoot.removeComponent(IsDraggedComponent_instance.id);\n var tmp_3 = _get_sceneManager__lxhb6y($this).scene;\n tmp_3.removeComponent(66);\n var tmp_4 = _get_sceneManager__lxhb6y($this).scene;\n tmp_4.removeComponent(69);\n updateDragState($this, null);\n }\n function runDragStartOnStrategies($this) {\n var tmp0_safe_receiver = _get_state__b8zcm8($this);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var indexedObject = $this.x34_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSystem.runDragStartOnStrategies..' call\n element.dragStart(tmp0_safe_receiver.draggedRootEntity);\n }\n }\n }\n function runDragMoveOnStrategies($this, dragState) {\n var draggedRoot = dragState.draggedRootEntity;\n var worldTransformBefore = get_worldTransform(draggedRoot);\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = $this.x34_1;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSystem.runDragMoveOnStrategies.' call\n if (element.isEnabled) {\n destination.q(element);\n }\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.dragging.DragSystem.runDragMoveOnStrategies.' call\n TransformUtils_instance.setWorldTransform(draggedRoot, dragState.dragEndTransform);\n var validSnap = element_0.dragMove(dragState);\n if (!(validSnap == null)) {\n var tmp0_safe_receiver = $this.y34_1;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.performPostProcess(validSnap, dragState);\n validSnap = tmp1_elvis_lhs == null ? validSnap : tmp1_elvis_lhs;\n validSnap.snapCandidate.perform();\n var newDragState = dragState.updateWithDragStrategyResult(validSnap.entity, validSnap);\n updateDragState($this, newDragState);\n triggerMovedToValidSnapPositionComponent(newDragState.draggedRootEntity, validSnap.snapCandidate);\n return Unit_instance;\n }\n }\n TransformUtils_instance.setWorldTransform(draggedRoot, worldTransformBefore);\n }\n function updateDragState($this, newState) {\n if (!(newState == null)) {\n _get_sceneManager__lxhb6y($this).scene.addComponent(new DragStateComponent(newState));\n } else {\n var tmp = _get_sceneManager__lxhb6y($this).scene;\n tmp.removeComponent(69);\n }\n }\n function runDragStopOnStrategies($this) {\n var tmp0_safe_receiver = _get_state__b8zcm8($this);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var indexedObject = $this.x34_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DragSystem.runDragStopOnStrategies..' call\n element.dragStop(tmp0_safe_receiver.draggedRootEntity);\n }\n }\n }\n function isDragStartedEarlier($this) {\n return !(_get_state__b8zcm8($this) == null);\n }\n function Companion_28() {\n Companion_instance_61 = this;\n this.b35_1 = LoggerState_getInstance().m1m('DragSystem');\n this.ID = 'DragSystem';\n }\n protoOf(Companion_28).u1n = function () {\n return this.ID;\n };\n protoOf(Companion_28).createStandardDragSystem = function (coreServices) {\n // Inline function 'kotlin.arrayOf' call\n var tmp = new SnapClosestDragStrategy(coreServices);\n var tmp_0 = new SnapClosestWithSubConnectorsDragStrategy(coreServices);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [tmp, tmp_0, new ResolveCollisionsDragStrategy(31, coreServices), new SnapCardinalDirectionsDragStrategy(coreServices)];\n return new DragSystem(coreServices, tmp$ret$2);\n };\n protoOf(Companion_28).createAutoAdaptDragSystem = function (coreServices) {\n // Inline function 'kotlin.arrayOf' call\n var tmp = new AutoAdaptDragStrategy(coreServices);\n var tmp_0 = new SnapClosestDragStrategy(coreServices);\n var tmp_1 = new SnapClosestWithSubConnectorsDragStrategy(coreServices);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [tmp, tmp_0, tmp_1, new ResolveCollisionsDragStrategy(31, coreServices), new SnapCardinalDirectionsDragStrategy(coreServices)];\n return new DragSystem(coreServices, tmp$ret$2);\n };\n var Companion_instance_61;\n function Companion_getInstance_37() {\n if (Companion_instance_61 == null)\n new Companion_28();\n return Companion_instance_61;\n }\n function DragSystem$addDragComponents$lambda() {\n return 'Something is already dragged, ignoring drag start';\n }\n function DragSystem$dragMove$lambda() {\n return 'Illegal state: No SomethingIsDraggedComponent found in scene. dragMove was probably called before dragStart';\n }\n function DragSystem$dragStop$lambda() {\n return 'Illegal state: No SomethingIsDraggedComponent found in scene. dragEnd was probably called before dragStart';\n }\n function DragSystem(coreServices, dragStrategies) {\n Companion_getInstance_37();\n SystemBase.call(this, 'DragSystem', 85);\n this.w34_1 = coreServices;\n this.x34_1 = dragStrategies;\n this.y34_1 = new HigherPriorityAlignmentPostProcess(this.w34_1);\n this.z34_1 = new TakeSnapshotBeforeDragSystem(this.w34_1);\n new NoDragConverterDetector(this.w34_1.entityManager);\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.a35_1 = [66, 69, IsDraggedComponent_instance.id];\n }\n protoOf(DragSystem).onRegister = function () {\n protoOf(SystemBase).onRegister.call(this);\n this.z34_1.register(this.w34_1.entityManager);\n };\n protoOf(DragSystem).onUnregister = function () {\n protoOf(SystemBase).onUnregister.call(this);\n this.z34_1.unregister(this.w34_1.entityManager);\n };\n protoOf(DragSystem).enable = function () {\n protoOf(SystemBase).enable.call(this);\n this.z34_1.enable();\n };\n protoOf(DragSystem).disable = function () {\n protoOf(SystemBase).disable.call(this);\n this.z34_1.disable();\n };\n protoOf(DragSystem).onAddComponent = function (entity, newComponent) {\n dragStart_0(this, entity, newComponent);\n };\n protoOf(DragSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n dragMove(this, newComponent);\n };\n protoOf(DragSystem).onRemoveComponent = function (entity, oldComponent) {\n dragStop_0(this);\n };\n protoOf(DragSystem).w1o = function () {\n return this.a35_1;\n };\n protoOf(DragSystem).setPostProcessStrategy = function (postProcessDragStrategy) {\n this.y34_1 = postProcessDragStrategy;\n };\n protoOf(DragSystem).getDragStrategies = function () {\n return this.x34_1;\n };\n function _get_viewer__pq1i9z($this) {\n return $this.k35_1.coreModules.viewer();\n }\n function updateGhost($this, dragState) {\n var entity = dragState.draggedRootEntity;\n var transform = dragState.dragEndTransform;\n var offset = dragState.rayFromCameraToDragPoint.direction.times(0.4);\n if ($this.p35_1 == null) {\n $this.p35_1 = createGhost($this, entity);\n var tmp0_safe_receiver = $this.p35_1;\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver.setVisible(true);\n }\n var tmp1_safe_receiver = $this.p35_1;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.dragging.DrawDragGhostSystem.updateGhost.' call\n tmp1_safe_receiver.setPosition(transform.position.plus(offset)).setRotation(transform.rotation);\n }\n }\n function createGhost($this, entity) {\n var rootEntityTransform = get_worldTransform(entity);\n var tmp0_safe_receiver = _get_viewer__pq1i9z($this);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.createEmpty();\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var rootNode = tmp;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = filterInHierarchy(entity, DrawDragGhostSystem$createGhost$lambda);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.DrawDragGhostSystem.createGhost.' call\n var tmp0_safe_receiver_0 = element.__getComponentForKotlin(13);\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_safe_receiver_1 = tmp0_safe_receiver_0.modelUrl;\n if (tmp0_safe_receiver_1 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0;\n if (get_isPropping(entity)) {\n tmp_0 = Companion_getInstance_3().EMPTY_AABB;\n } else {\n var tmp0_safe_receiver_2 = get_colliderShapeComponent(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.polyhedron;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.axisAlignedBoundingBox;\n tmp_0 = tmp2_elvis_lhs == null ? Companion_getInstance_3().EMPTY_AABB : tmp2_elvis_lhs;\n }\n var aabb = tmp_0;\n var tmp3_safe_receiver = entity.__getComponentForKotlin(Companion_instance_14.id);\n var modelTransform = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.transform;\n var tmp_1 = get_worldTransform(element).delta(rootEntityTransform);\n var tmp5_elvis_lhs = modelTransform == null ? null : modelTransform.transform;\n var deltaTransform = tmp_1.concatenate(tmp5_elvis_lhs == null ? Companion_getInstance_5().IDENTITY : tmp5_elvis_lhs);\n var tmp7_elvis_lhs = modelTransform == null ? null : modelTransform.scale;\n var scale = tmp7_elvis_lhs == null ? Companion_getInstance_4().ONE : tmp7_elvis_lhs;\n var onModelLoaded = DrawDragGhostSystem$createGhost$lambda_0(scale, deltaTransform, rootNode);\n var tmp8_safe_receiver = _get_viewer__pq1i9z($this);\n if (tmp8_safe_receiver == null)\n null;\n else {\n tmp8_safe_receiver.createGhostModel(tmp0_safe_receiver_1, onModelLoaded, $this.l35_1, $this.m35_1, $this.n35_1, $this.o35_1, aabb.size);\n }\n }\n }\n }\n return rootNode;\n }\n function Companion_29() {\n this.ID = 'DrawDragGhostSystem';\n this.OFFSET_ALONG_VIEW_DIRECTION = 0.4;\n }\n protoOf(Companion_29).u1n = function () {\n return this.ID;\n };\n protoOf(Companion_29).r35 = function () {\n return this.OFFSET_ALONG_VIEW_DIRECTION;\n };\n var Companion_instance_62;\n function Companion_getInstance_38() {\n return Companion_instance_62;\n }\n function DrawDragGhostSystem$createGhost$lambda(it) {\n return it.hasComponent(13);\n }\n function DrawDragGhostSystem$createGhost$lambda_0($scale, $deltaTransform, $rootNode) {\n return function (viewerObject) {\n viewerObject.setScaleV($scale).setPosition($deltaTransform.position).setRotation($deltaTransform.rotation).setVisible(true).setParent($rootNode);\n return Unit_instance;\n };\n }\n function DrawDragGhostSystem(coreServices, r, g, b, alpha) {\n r = r === VOID ? 0.0 : r;\n g = g === VOID ? 0.0 : g;\n b = b === VOID ? 1.0 : b;\n alpha = alpha === VOID ? 0.5 : alpha;\n SystemBase.call(this, 'DrawDragGhostSystem', 69);\n this.k35_1 = coreServices;\n this.l35_1 = r;\n this.m35_1 = g;\n this.n35_1 = b;\n this.o35_1 = alpha;\n this.p35_1 = null;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.q35_1 = [];\n }\n protoOf(DrawDragGhostSystem).onAddComponent = function (entity, newComponent) {\n updateGhost(this, newComponent.dragState);\n };\n protoOf(DrawDragGhostSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n updateGhost(this, newComponent.dragState);\n };\n protoOf(DrawDragGhostSystem).onRemoveComponent = function (entity, oldComponent) {\n var tmp0_safe_receiver = this.p35_1;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.deleteObject();\n }\n this.p35_1 = null;\n };\n protoOf(DrawDragGhostSystem).w1o = function () {\n return this.q35_1;\n };\n function HigherPriorityAlignmentPostProcess(coreServices) {\n this.s35_1 = coreServices;\n }\n protoOf(HigherPriorityAlignmentPostProcess).performPostProcess = function (validResult, dragState) {\n TransformUtils_instance.setWorldTransform(dragState.draggedRootEntity, validResult.snapCandidate.endTransform);\n var tmp$ret$6;\n $l$block_0: {\n // Inline function 'kotlin.collections.maxByOrNull' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = SnapUtils_instance.matchingSnapActionCandidatesInScene(dragState.draggedRootEntity, this.s35_1.sceneManager);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.HigherPriorityAlignmentPostProcess.performPostProcess.' call\n if (!(element.alignmentInitiatorCandidate == null)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var this_1 = toList_0(destination);\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = this_1.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.dragging.HigherPriorityAlignmentPostProcess.performPostProcess.' call\n if (element_0.priority > validResult.snapCandidate.priority) {\n destination_0.q(element_0);\n }\n }\n var iterator = destination_0.t();\n if (!iterator.u()) {\n tmp$ret$6 = null;\n break $l$block_0;\n }\n var maxElem = iterator.w();\n if (!iterator.u()) {\n tmp$ret$6 = maxElem;\n break $l$block_0;\n }\n // Inline function 'com.ikea.core.stl.dragging.HigherPriorityAlignmentPostProcess.performPostProcess.' call\n var maxValue = maxElem.priority;\n do {\n var e = iterator.w();\n // Inline function 'com.ikea.core.stl.dragging.HigherPriorityAlignmentPostProcess.performPostProcess.' call\n var v = e.priority;\n if (compareTo(maxValue, v) < 0) {\n maxElem = e;\n maxValue = v;\n }\n }\n while (iterator.u());\n tmp$ret$6 = maxElem;\n }\n var tmp0_safe_receiver = tmp$ret$6;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.dragging.HigherPriorityAlignmentPostProcess.performPostProcess.' call\n tmp = this.s35_1.validations.evaluateSnapCandidate(tmp0_safe_receiver);\n }\n var newCandidateResult = tmp;\n var validCandidate = newCandidateResult == null ? null : newCandidateResult.snapActionCandidate;\n if (!(validCandidate == null)) {\n var newValidResult = new ValidDragStrategyResult(validCandidate.guestRoot, validCandidate, newCandidateResult.warnings);\n return newValidResult;\n }\n return validResult;\n };\n function IsDraggedComponent() {\n this.t35_1 = false;\n }\n protoOf(IsDraggedComponent).x1k = function () {\n return this.id;\n };\n protoOf(IsDraggedComponent).s1k = function () {\n return 65;\n };\n protoOf(IsDraggedComponent).a1l = function () {\n return this.t35_1;\n };\n protoOf(IsDraggedComponent).eq = function (other) {\n return true;\n };\n var IsDraggedComponent_instance;\n function IsDraggedComponent_getInstance() {\n return IsDraggedComponent_instance;\n }\n function get_isBeingDragged(_this__u8e3s4) {\n var tmp0_safe_receiver = get_snapRoot(_this__u8e3s4);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n tmp = tmp0_safe_receiver.hasComponent(65);\n }\n return tmp === true;\n }\n function PostProcessDragStrategy() {\n }\n function Companion_30() {\n this.u35_1 = 'TakeSnapshotBeforeDragSystem';\n }\n var Companion_instance_63;\n function Companion_getInstance_39() {\n return Companion_instance_63;\n }\n function TakeSnapshotBeforeDragSystem(coreServices) {\n SystemBase.call(this, 'TakeSnapshotBeforeDragSystem', 85);\n this.d36_1 = coreServices;\n }\n protoOf(TakeSnapshotBeforeDragSystem).onAddComponent = function (entity, newComponent) {\n if (get_snapRoot(entity) == null)\n return Unit_instance;\n var tmp0_safe_receiver = this.d36_1.coreModules.history();\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.takeSnapshot('drag start');\n }\n };\n function _get_validationService__6mut63($this) {\n return $this.coreServices.validations;\n }\n function AbstractDragStrategy() {\n this.u31_1 = true;\n }\n protoOf(AbstractDragStrategy).p1i = function () {\n return this.coreServices.entityManager;\n };\n protoOf(AbstractDragStrategy).y1n = function () {\n return this.u31_1;\n };\n protoOf(AbstractDragStrategy).enable = function () {\n this.u31_1 = true;\n };\n protoOf(AbstractDragStrategy).disable = function () {\n this.u31_1 = false;\n };\n protoOf(AbstractDragStrategy).v31 = function (guestEntity, hostEntity) {\n var tmp0_elvis_lhs = get_snapRoot(guestEntity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Companion_instance_15.noSnappingEntity(guestEntity);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var snappingGuest = tmp;\n var snapsByDistance = SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_DISTANCE.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidates(snappingGuest, hostEntity));\n var tmp1_elvis_lhs = firstOrNull_0(snapsByDistance);\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return Companion_instance_15.noSnapCandidates(guestEntity);\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var snapActionCandidate = tmp_0;\n return _get_validationService__6mut63(this).evaluateSnapCandidate(snapActionCandidate);\n };\n protoOf(AbstractDragStrategy).w31 = function (guestEntity) {\n var tmp0_elvis_lhs = get_snapRoot(guestEntity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Companion_instance_15.noSnappingEntity(guestEntity);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var snappingGuest = tmp;\n var snapsByDistance = SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_DISTANCE.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidatesInScene(snappingGuest, this.coreServices.sceneManager));\n var tmp1_elvis_lhs = firstOrNull_0(snapsByDistance);\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return Companion_instance_15.noSnapCandidates(guestEntity);\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var snapActionCandidate = tmp_0;\n return _get_validationService__6mut63(this).evaluateSnapCandidate(snapActionCandidate);\n };\n function DragStrategy() {\n }\n function FreeMoveComponent() {\n this.id = 67;\n }\n protoOf(FreeMoveComponent).x1k = function () {\n return 67;\n };\n protoOf(FreeMoveComponent).eq = function (other) {\n return true;\n };\n protoOf(FreeMoveComponent).s1k = function () {\n return this.id;\n };\n var FreeMoveComponent_instance;\n function FreeMoveComponent_getInstance() {\n return FreeMoveComponent_instance;\n }\n function FreeMoveDragStrategy(coreServices) {\n AbstractDragStrategy.call(this);\n this.f36_1 = coreServices;\n this.g36_1 = 'FreeMoveDragStrategy';\n }\n protoOf(FreeMoveDragStrategy).k2z = function () {\n return this.f36_1;\n };\n protoOf(FreeMoveDragStrategy).mb = function () {\n return this.g36_1;\n };\n protoOf(FreeMoveDragStrategy).dragMove = function (dragState) {\n if (!dragState.draggedRootEntity.hasComponent(67)) {\n return null;\n }\n var tmp0_safe_receiver = get_highestPriorityConnection(dragState.draggedRootEntity);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectorEntity;\n var tmp2_elvis_lhs = tmp1_elvis_lhs == null ? get_parent(dragState.draggedRootEntity) : tmp1_elvis_lhs;\n var currentHost = tmp2_elvis_lhs == null ? this.f36_1.sceneManager.scene : tmp2_elvis_lhs;\n var snap = SnapUtils_instance.createForcedSnapActionCandidate(dragState.draggedRootEntity, currentHost);\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n return new ValidDragStrategyResult(dragState.draggedRootEntity, snap, tmp$ret$0);\n };\n function findSnapWhereEntityDoesNotCollide($this, draggedEntity, delta) {\n var tmp0_elvis_lhs = get_snapRoot(draggedEntity);\n var entity = tmp0_elvis_lhs == null ? draggedEntity : tmp0_elvis_lhs;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = CollisionUtils_instance.getAllCollisions(entity, delta, hierarchyExceptSubTreeArray($this.j36_1.sceneManager.root, entity));\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.dragstrategy.ResolveCollisionsDragStrategy.findSnapWhereEntityDoesNotCollide.' call\n var validSnapResult = null;\n var snapResult = $this.v31(entity, element.other);\n if (snapResult.valid) {\n validSnapResult = snapResult;\n } else {\n var tmp0_safe_receiver = get_snapRoot(draggedEntity);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_worldTransform(tmp0_safe_receiver);\n var worldTransformBefore = tmp1_elvis_lhs == null ? Companion_getInstance_5().IDENTITY : tmp1_elvis_lhs;\n var testTransform = new Transform(get_worldPosition(draggedEntity).plus(element.interpenetration), get_worldTransform(draggedEntity).rotation);\n TransformUtils_instance.setWorldTransform(draggedEntity, testTransform);\n var snapToAnythingSnapResult = $this.w31(draggedEntity);\n if (snapToAnythingSnapResult.valid)\n validSnapResult = snapToAnythingSnapResult;\n TransformUtils_instance.setWorldTransform(draggedEntity, worldTransformBefore);\n }\n if (!(validSnapResult == null))\n return validSnapResult;\n }\n return null;\n }\n function hasConnectionThatDemandsContinuous($this, entity) {\n return !($this.i36_1 === -1) ? entity.hasComponent($this.i36_1) : false;\n }\n function ResolveCollisionsDragStrategy(resolveCollisionFeatureTag, coreServices) {\n AbstractDragStrategy.call(this);\n this.i36_1 = resolveCollisionFeatureTag;\n this.j36_1 = coreServices;\n this.k36_1 = 'ResolveCollisionsDragStrategy';\n this.l36_1 = false;\n }\n protoOf(ResolveCollisionsDragStrategy).k2z = function () {\n return this.j36_1;\n };\n protoOf(ResolveCollisionsDragStrategy).mb = function () {\n return this.k36_1;\n };\n protoOf(ResolveCollisionsDragStrategy).dragStart = function (draggedRootEntity) {\n this.l36_1 = hasConnectionThatDemandsContinuous(this, draggedRootEntity);\n };\n protoOf(ResolveCollisionsDragStrategy).dragStop = function (draggedRootEntity) {\n this.l36_1 = false;\n };\n protoOf(ResolveCollisionsDragStrategy).dragMove = function (dragState) {\n if (!this.l36_1) {\n return null;\n }\n var lastValidWorld = dragState.lastValidWorldTransform;\n var delta = dragState.dragEndTransform.position.minus(lastValidWorld.position);\n var validSnapResult = findSnapWhereEntityDoesNotCollide(this, dragState.draggedRootEntity, delta);\n var dragStrategyResult = Companion_instance_64.fromSnapResult(validSnapResult);\n return dragStrategyResult;\n };\n function tryLocalDirection($this, localDirection, host, draggedEntity, lastValidWorld, dragDelta, hostConnectorWorld) {\n var dragDeltaProjectedLocally = dragDelta.projectOn(hostConnectorWorld.transformVector(localDirection));\n var candidatePosition = lastValidWorld.position.plus(dragDeltaProjectedLocally);\n TransformUtils_instance.setWorldTransform(draggedEntity, new Transform(candidatePosition, get_worldTransform(draggedEntity).rotation));\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var indexedObject = SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidates(draggedEntity, host));\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.dragstrategy.SnapCardinalDirectionsDragStrategy.tryLocalDirection.' call\n if (element.inActivationDistance()) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var localProjectedCandidate = tmp$ret$1;\n var tmp;\n if (localProjectedCandidate == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.dragging.dragstrategy.SnapCardinalDirectionsDragStrategy.tryLocalDirection.' call\n tmp = $this.o36_1.evaluateSnapCandidate(localProjectedCandidate);\n }\n var result = tmp;\n var dragStrategyResult = Companion_instance_64.fromSnapResult(result);\n return dragStrategyResult;\n }\n function SnapCardinalDirectionsDragStrategy(coreServices) {\n AbstractDragStrategy.call(this);\n this.n36_1 = coreServices;\n this.o36_1 = this.n36_1.validations;\n this.p36_1 = 'SnapCardinalDirectionsDragStrategy';\n }\n protoOf(SnapCardinalDirectionsDragStrategy).k2z = function () {\n return this.n36_1;\n };\n protoOf(SnapCardinalDirectionsDragStrategy).mb = function () {\n return this.p36_1;\n };\n protoOf(SnapCardinalDirectionsDragStrategy).dragMove = function (dragState) {\n var draggedEntity = dragState.draggedRootEntity;\n var tmp0_safe_receiver = dragState.validDragStrategyResult;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.snapCandidate;\n var tmp3_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.hostConnector;\n var tmp;\n if (tmp3_elvis_lhs == null) {\n var tmp2_safe_receiver = get_highestPriorityConnection(draggedEntity);\n tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hostConnector;\n } else {\n tmp = tmp3_elvis_lhs;\n }\n var tmp4_elvis_lhs = tmp;\n var tmp_0;\n if (tmp4_elvis_lhs == null) {\n return null;\n } else {\n tmp_0 = tmp4_elvis_lhs;\n }\n var hostConnector = tmp_0;\n if (!(hostConnector instanceof SurfaceConnector))\n return null;\n var tmp5_safe_receiver = dragState.validDragStrategyResult;\n var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.snapCandidate;\n var tmp8_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.host;\n var tmp_1;\n if (tmp8_elvis_lhs == null) {\n var tmp7_safe_receiver = get_highestPriorityConnection(draggedEntity);\n tmp_1 = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.hostConnectorEntity;\n } else {\n tmp_1 = tmp8_elvis_lhs;\n }\n var tmp9_elvis_lhs = tmp_1;\n var tmp_2;\n if (tmp9_elvis_lhs == null) {\n return null;\n } else {\n tmp_2 = tmp9_elvis_lhs;\n }\n var host = tmp_2;\n var lastValidWorldTransform = dragState.lastValidWorldTransform;\n var dragDelta = dragState.dragEndTransform.position.minus(lastValidWorldTransform.position);\n var hostConnectorWorld = get_worldTransform(host).concatenate(hostConnector.transform);\n var horizontalResult = tryLocalDirection(this, Companion_getInstance_4().RIGHT, host, draggedEntity, lastValidWorldTransform, dragDelta, hostConnectorWorld);\n if (!(horizontalResult == null))\n return horizontalResult;\n var verticalResult = tryLocalDirection(this, Companion_getInstance_4().FORWARD, host, draggedEntity, lastValidWorldTransform, dragDelta, hostConnectorWorld);\n if (!(verticalResult == null))\n return verticalResult;\n return null;\n };\n function sortedSnaps($this, entity) {\n var includeAlignment = $this.includeAlignmentConnectorsOutsideActivationDistance;\n var tmp0_safe_receiver = get_snapRoot(entity);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.dragging.dragstrategy.SnapClosestDragStrategy.sortedSnaps.' call\n tmp = SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidatesInScene(tmp0_safe_receiver, $this.r36_1.sceneManager, new SnapSettings(VOID, VOID, VOID, includeAlignment)));\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var matchingSnapActionCandidates = tmp_0;\n return toList(matchingSnapActionCandidates);\n }\n function SnapClosestDragStrategy(coreServices) {\n AbstractDragStrategy.call(this);\n this.r36_1 = coreServices;\n this.includeAlignmentConnectorsOutsideActivationDistance = false;\n this.s36_1 = 'SnapClosestDragStrategy';\n this.t36_1 = this.r36_1.validations;\n this.rotationCostInMm = 500.0;\n }\n protoOf(SnapClosestDragStrategy).k2z = function () {\n return this.r36_1;\n };\n protoOf(SnapClosestDragStrategy).u36 = function (_set____db54di) {\n this.includeAlignmentConnectorsOutsideActivationDistance = _set____db54di;\n };\n protoOf(SnapClosestDragStrategy).u2r = function () {\n return this.includeAlignmentConnectorsOutsideActivationDistance;\n };\n protoOf(SnapClosestDragStrategy).mb = function () {\n return this.s36_1;\n };\n protoOf(SnapClosestDragStrategy).v36 = function (_set____db54di) {\n this.rotationCostInMm = _set____db54di;\n };\n protoOf(SnapClosestDragStrategy).w36 = function () {\n return this.rotationCostInMm;\n };\n protoOf(SnapClosestDragStrategy).dragMove = function (dragState) {\n var snapCandidates = sortedSnaps(this, dragState.draggedRootEntity);\n var distanceToLastValidSnap = dragState.lastValidWorldTransform.position.minus(dragState.dragEndTransform.position).size;\n var foundSnap = null;\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = snapCandidates.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.dragging.dragstrategy.SnapClosestDragStrategy.dragMove.' call\n var tmp0_safe_receiver = element.alignmentInitiatorCandidate;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.dragging.dragstrategy.SnapClosestDragStrategy.dragMove..' call\n tmp = tmp0_safe_receiver.hostConnector.activationDistance + tmp0_safe_receiver.guestConnector.activationDistance;\n }\n var tmp1_elvis_lhs = tmp;\n var activationDistance = tmp1_elvis_lhs == null ? element.hostConnector.activationDistance + element.guestConnector.activationDistance : tmp1_elvis_lhs;\n var deltaRotation = dragState.lastValidWorldTransform.rotation.inverse().times(element.endTransform.rotation);\n var distanceFromEndDragToSnap = element.endTransform.position.minus(dragState.dragEndTransform.position).size + (deltaRotation.almostEquals(Companion_getInstance_6().IDENTITY) ? 0.0 : this.rotationCostInMm);\n var isCloserThanLastValidSnap = distanceFromEndDragToSnap - activationDistance < distanceToLastValidSnap;\n if (isCloserThanLastValidSnap) {\n destination.q(element);\n }\n }\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.dragging.dragstrategy.SnapClosestDragStrategy.dragMove.' call\n if (foundSnap == null) {\n var res = this.t36_1.evaluateSnapCandidate(element_0);\n if (res.valid) {\n foundSnap = res;\n }\n }\n }\n var dragStrategyResult = Companion_instance_64.fromSnapResult(foundSnap);\n return dragStrategyResult;\n };\n function findValidSnapAmongSubConnectors($this, entity, rayFromCameraToDragPoint) {\n var tmp0_elvis_lhs = findHoveredHost($this, entity, rayFromCameraToDragPoint);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var hoveredHost = tmp;\n var result = {_v: null};\n forEachInHierarchy(hoveredHost, SnapClosestWithSubConnectorsDragStrategy$findValidSnapAmongSubConnectors$lambda(result, $this, entity));\n var dragResult = Companion_instance_64.fromSnapResult(result._v);\n return dragResult;\n }\n function findHoveredHost($this, entity, rayFromCameraToDragPoint) {\n var tmp0_elvis_lhs = RaycastUtils_instance.raycast(rayFromCameraToDragPoint, $this.b37_1.root, entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var result = tmp;\n return findWithComponentInUpwardsHierarchy(result.entity, FrameComponent_getInstance().id);\n }\n function sortedSnaps_0($this, entity, host) {\n var tmp0_safe_receiver = get_snapRoot(entity);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.dragging.dragstrategy.SnapClosestWithSubConnectorsDragStrategy.sortedSnaps.' call\n tmp = SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidates(tmp0_safe_receiver, host, new SnapSettings(true)));\n }\n var matchingSnapActionCandidates = tmp;\n return matchingSnapActionCandidates;\n }\n function SnapClosestWithSubConnectorsDragStrategy$findValidSnapAmongSubConnectors$lambda($result, this$0, $entity) {\n return function (host) {\n var tmp;\n if ($result._v == null) {\n var tmp0_safe_receiver = sortedSnaps_0(this$0, $entity, host);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.dragstrategy.SnapClosestWithSubConnectorsDragStrategy.findValidSnapAmongSubConnectors..' call\n if ($result._v == null) {\n var res = this$0.a37_1.evaluateSnapCandidate(element, true);\n if (res.valid) {\n $result._v = res;\n }\n }\n }\n }\n tmp = Unit_instance;\n }\n return Unit_instance;\n };\n }\n function SnapClosestWithSubConnectorsDragStrategy(coreServices) {\n AbstractDragStrategy.call(this);\n this.y36_1 = coreServices;\n this.z36_1 = 'SnapClosestWithSubConnectorsDragStrategy';\n this.a37_1 = this.y36_1.validations;\n this.b37_1 = this.y36_1.sceneManager;\n }\n protoOf(SnapClosestWithSubConnectorsDragStrategy).k2z = function () {\n return this.y36_1;\n };\n protoOf(SnapClosestWithSubConnectorsDragStrategy).mb = function () {\n return this.z36_1;\n };\n protoOf(SnapClosestWithSubConnectorsDragStrategy).dragMove = function (dragState) {\n return findValidSnapAmongSubConnectors(this, dragState.draggedRootEntity, dragState.rayFromCameraToDragPoint);\n };\n function Companion_31() {\n }\n protoOf(Companion_31).fromSnapResult = function (result) {\n var validCandidate = result == null ? null : result.snapActionCandidate;\n var tmp;\n if (validCandidate == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.dragging.dragstrategy.Companion.fromSnapResult.' call\n tmp = new ValidDragStrategyResult(validCandidate.guestRoot, validCandidate, result.warnings);\n }\n return tmp;\n };\n var Companion_instance_64;\n function Companion_getInstance_40() {\n return Companion_instance_64;\n }\n function ValidDragStrategyResult(entity, snapCandidate, warnings) {\n this.entity = entity;\n this.snapCandidate = snapCandidate;\n var tmp = this;\n var tmp_0;\n if (warnings == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = warnings;\n }\n tmp.warnings = tmp_0;\n }\n protoOf(ValidDragStrategyResult).r23 = function () {\n return this.entity;\n };\n protoOf(ValidDragStrategyResult).x31 = function () {\n return this.snapCandidate;\n };\n protoOf(ValidDragStrategyResult).r2t = function () {\n return this.warnings;\n };\n protoOf(ValidDragStrategyResult).performFinalSnapAction = function (state, coreServices) {\n var snapCandidate = this.snapCandidate.withInitialTransform(state.initialTransform);\n var hasTransformChange = !get_worldTransform(snapCandidate.guest).equals(state.initialTransform);\n var hasParentChange = !equals(get_parent(snapCandidate.guest), snapCandidate.host);\n var tmp;\n if (hasTransformChange ? true : hasParentChange) {\n snapCandidate.createAction().perform();\n tmp = true;\n } else {\n tmp = false;\n }\n return tmp;\n };\n function CanvasTo3DDragConverterSystem_init_$Init$(coreServices, projector, $this) {\n CanvasTo3DDragConverterSystem.call($this, coreServices.entityManager, coreServices.sceneManager, projector);\n return $this;\n }\n function CanvasTo3DDragConverterSystemFromCoreServices(coreServices, projector) {\n return CanvasTo3DDragConverterSystem_init_$Init$(coreServices, projector, objectCreate(protoOf(CanvasTo3DDragConverterSystem)));\n }\n function vectorFromGrabPointToDragPoint($this, entity, grabPoint) {\n var tmp0_elvis_lhs = get_draggableRootEntity(entity);\n var dragRoot = tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs;\n return get_dragProjectionPoint(dragRoot).minus(grabPoint);\n }\n function sendDragEvent($this, entity, currentlyDraggedEntity, event) {\n adjustDragOffsetWhenRotationChanges($this, entity, currentlyDraggedEntity, $this.p37_1);\n var worldGrabOffset = get_worldTransform(entity).transformVector(getLocalGrabOffset($this, entity));\n var offsetRay = Companion_instance_16.createFromPoints(event.cameraPosition, event.planePoint.plus(worldGrabOffset));\n var tmp0_elvis_lhs = $this.m37_1.project(offsetRay, entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var projectionHit = tmp;\n var movementDelta = projectionHit.minus(get_dragProjectionPoint(currentlyDraggedEntity));\n var newWorldPosition = get_worldPosition(currentlyDraggedEntity).plus(movementDelta);\n $this.p37_1 = calculateEndTransform_0($this, currentlyDraggedEntity, newWorldPosition);\n var ray = Companion_instance_16.createFromPoints(event.cameraPosition, newWorldPosition);\n var moveDragEvent = new WorldSpaceDragEventComponent(newWorldPosition, ray);\n $this.k37_1.addComponent(entity, moveDragEvent);\n }\n function getLocalGrabOffset($this, entity) {\n var grabOffsetComponent = entity.__getComponentForKotlin(94);\n var tmp1_elvis_lhs = grabOffsetComponent == null ? null : grabOffsetComponent.localGrabOffset;\n var localGrabOffset = tmp1_elvis_lhs == null ? Companion_getInstance_4().ZERO : tmp1_elvis_lhs;\n return localGrabOffset;\n }\n function findCurrentlyDraggedEntity($this) {\n var tmp = $this.l37_1.scene;\n var dragStateComponent = tmp.__getComponentForKotlin(69);\n var tmp1_safe_receiver = dragStateComponent == null ? null : dragStateComponent.dragState;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.validDragStrategyResult;\n var candidateSnapAction = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.snapCandidate;\n var tmp4_safe_receiver = candidateSnapAction == null ? null : candidateSnapAction.guest;\n var tmp7_elvis_lhs = tmp4_safe_receiver == null ? null : get_draggableRootEntity(tmp4_safe_receiver);\n var tmp_0;\n if (tmp7_elvis_lhs == null) {\n var tmp6_safe_receiver = dragStateComponent == null ? null : dragStateComponent.dragState;\n tmp_0 = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.draggedRootEntity;\n } else {\n tmp_0 = tmp7_elvis_lhs;\n }\n var realEntity = tmp_0;\n return realEntity;\n }\n function calculateEndTransform_0($this, entity, newPoint) {\n var tmp0_safe_receiver = get_snapRoot(entity);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_worldTransform(tmp0_safe_receiver);\n var currentTransform = tmp1_elvis_lhs == null ? get_worldTransform(entity) : tmp1_elvis_lhs;\n return new Transform(newPoint, currentTransform.rotation);\n }\n function adjustDragOffsetWhenRotationChanges($this, entity, realEntity, lastTransform) {\n var tmp0_elvis_lhs = get_draggableRootEntity(realEntity);\n var dragRoot = tmp0_elvis_lhs == null ? realEntity : tmp0_elvis_lhs;\n var currentTransform = get_worldTransform(dragRoot);\n if (!lastTransform.rotation.almostEquals(currentTransform.rotation)) {\n var localZRotationDelta = lastTransform.delta(currentTransform).rotation.eulerDegrees.Z;\n if (almostEquals(localZRotationDelta, 180.0) ? true : almostEquals(localZRotationDelta, -180.0)) {\n var tmp1_safe_receiver = entity.__getComponentForKotlin(94);\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.localGrabOffset;\n var oldOffset = tmp2_elvis_lhs == null ? Companion_getInstance_4().ZERO : tmp2_elvis_lhs;\n var newOffset = oldOffset.with(-oldOffset.X, -oldOffset.Y);\n entity.addComponent(new GrabOffsetComponent(newOffset));\n }\n }\n }\n function Companion_32() {\n Companion_instance_65 = this;\n this.ID = 'CanvasTo3DDragConverterSystem';\n this.s37_1 = LoggerState_getInstance().m1m('CanvasTo3DDragConverterSystem');\n }\n protoOf(Companion_32).u1n = function () {\n return this.ID;\n };\n var Companion_instance_65;\n function Companion_getInstance_41() {\n if (Companion_instance_65 == null)\n new Companion_32();\n return Companion_instance_65;\n }\n function CanvasTo3DDragConverterSystem(entityManager, sceneManager, projector) {\n Companion_getInstance_41();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [94, 85];\n SystemBase.call(this, 'CanvasTo3DDragConverterSystem', 84, tmp$ret$2);\n this.k37_1 = entityManager;\n this.l37_1 = sceneManager;\n this.m37_1 = projector;\n this.n37_1 = new DragSurfacesUpdateSystem(this.k37_1);\n this.o37_1 = new DragSurfaceUpdatesListenerSystem(this.m37_1, this.l37_1);\n this.p37_1 = Companion_getInstance_5().IDENTITY;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.q37_1 = [85];\n }\n protoOf(CanvasTo3DDragConverterSystem).onRegister = function () {\n protoOf(SystemBase).onRegister.call(this);\n this.n37_1.register(this.k37_1);\n this.o37_1.register(this.k37_1);\n };\n protoOf(CanvasTo3DDragConverterSystem).onUnregister = function () {\n protoOf(SystemBase).onUnregister.call(this);\n this.n37_1.unregister(this.k37_1);\n this.o37_1.unregister(this.k37_1);\n };\n protoOf(CanvasTo3DDragConverterSystem).enable = function () {\n protoOf(SystemBase).enable.call(this);\n this.n37_1.enable();\n this.o37_1.enable();\n };\n protoOf(CanvasTo3DDragConverterSystem).disable = function () {\n protoOf(SystemBase).disable.call(this);\n this.n37_1.disable();\n this.o37_1.disable();\n };\n protoOf(CanvasTo3DDragConverterSystem).onAddComponent = function (entity, newComponent) {\n var tmp0_safe_receiver = get_draggableRootEntity(entity);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.CanvasTo3DDragConverterSystem.onAddComponent.' call\n var grabPoint = newComponent.planePoint;\n var worldGrabOffset = vectorFromGrabPointToDragPoint(this, entity, grabPoint);\n var localGrabOffset = get_worldTransform(entity).inverseTransformVector(worldGrabOffset);\n entity.addComponent(new GrabOffsetComponent(localGrabOffset));\n this.p37_1 = get_worldTransform(tmp0_safe_receiver);\n sendDragEvent(this, entity, tmp0_safe_receiver, newComponent);\n }\n };\n protoOf(CanvasTo3DDragConverterSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n var tmp0_elvis_lhs = findCurrentlyDraggedEntity(this);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var draggedEntity = tmp;\n sendDragEvent(this, entity, draggedEntity, newComponent);\n };\n protoOf(CanvasTo3DDragConverterSystem).onRemoveComponent = function (entity, oldComponent) {\n this.k37_1.removeComponent(entity, 85);\n };\n protoOf(CanvasTo3DDragConverterSystem).w1o = function () {\n return this.q37_1;\n };\n protoOf(CanvasTo3DDragConverterSystem).setProjector = function (converter) {\n this.m37_1 = converter;\n };\n protoOf(CanvasTo3DDragConverterSystem).getProjector = function () {\n return this.m37_1;\n };\n function get_dragProjectionPoint(_this__u8e3s4) {\n var tmp0_elvis_lhs = get_draggableRootEntity(_this__u8e3s4);\n var dragRoot = tmp0_elvis_lhs == null ? _this__u8e3s4 : tmp0_elvis_lhs;\n var tmp1_safe_receiver = dragRoot.__getComponentForKotlin(113);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return TransformUtils_instance.worldTransform(_this__u8e3s4).transformPosition(tmp1_safe_receiver.projectionPoint);\n }\n var outgoingConnections = ConnectionUtils_instance.getExistingOutgoingGuestConnections(dragRoot);\n var connectionPoint = any_0(outgoingConnections) ? centerOfConnections(outgoingConnections) : get_worldPosition(_this__u8e3s4);\n return connectionPoint;\n }\n function DragSurfaceCanHostSelector$canProjectDragOn$lambda(snappingGuest) {\n var tmp0_safe_receiver = get_connectorsComponent(snappingGuest);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;\n }\n function DragSurfaceCanHostSelector() {\n }\n protoOf(DragSurfaceCanHostSelector).shouldBeTested = function (dragSurface) {\n return true;\n };\n protoOf(DragSurfaceCanHostSelector).canProjectDragOn = function (draggedEntity, dragSurface) {\n var tmp0_safe_receiver = get_connectorsComponent(dragSurface.entity);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectors;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var hostConnectors = tmp;\n var tmp_0 = get_snappingGuestEntitiesSequence(draggedEntity);\n var childSequence = map(tmp_0, DragSurfaceCanHostSelector$canProjectDragOn$lambda);\n return this.hasMatchingConnector(childSequence, hostConnectors, dragSurface.connectorKeys);\n };\n protoOf(DragSurfaceCanHostSelector).hasMatchingConnector = function (guestConnectorSequence, hostConnectors, connectorKeys) {\n var tmp$ret$5;\n $l$block_3: {\n // Inline function 'kotlin.sequences.any' call\n var tmp0_iterator = guestConnectorSequence.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.DragSurfaceCanHostSelector.hasMatchingConnector.' call\n var tmp$ret$0;\n $l$block_2: {\n // Inline function 'kotlin.collections.any' call\n var tmp;\n if (isInterface(element, Collection)) {\n tmp = element.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = false;\n break $l$block_2;\n }\n var tmp0_iterator_0 = element.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.DragSurfaceCanHostSelector.hasMatchingConnector..' call\n var tmp$ret$1;\n $l$block_1: {\n // Inline function 'kotlin.collections.any' call\n var tmp_0;\n if (isInterface(hostConnectors, Collection)) {\n tmp_0 = hostConnectors.b1();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$1 = false;\n break $l$block_1;\n }\n var tmp0_iterator_1 = hostConnectors.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.DragSurfaceCanHostSelector.hasMatchingConnector...' call\n if ((connectorKeys == null ? true : contains(connectorKeys, element_1.key)) ? element_0.hasMatchingTags(element_1) : false) {\n tmp$ret$1 = true;\n break $l$block_1;\n }\n }\n tmp$ret$1 = false;\n }\n if (tmp$ret$1) {\n tmp$ret$0 = true;\n break $l$block_2;\n }\n }\n tmp$ret$0 = false;\n }\n if (tmp$ret$0) {\n tmp$ret$5 = true;\n break $l$block_3;\n }\n }\n tmp$ret$5 = false;\n }\n return tmp$ret$5;\n };\n function get_snappingGuestEntitiesSequence(_this__u8e3s4) {\n var tmp = hierarchyExceptSubTreesWithComponentSequence(_this__u8e3s4, 47);\n return filter(tmp, _get_snappingGuestEntitiesSequence_$lambda_24h0hk);\n }\n function _get_snappingGuestEntitiesSequence_$lambda_24h0hk(it) {\n var tmp0_safe_receiver = get_connectorsComponent(it);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n return (tmp1_safe_receiver == null ? null : any(tmp1_safe_receiver)) === true;\n }\n function DragSurfaceEntityPair(entity, surface, connectorKeys) {\n this.entity = entity;\n this.surface = surface;\n this.connectorKeys = connectorKeys;\n }\n protoOf(DragSurfaceEntityPair).r23 = function () {\n return this.entity;\n };\n protoOf(DragSurfaceEntityPair).o23 = function () {\n return this.surface;\n };\n protoOf(DragSurfaceEntityPair).p23 = function () {\n return this.connectorKeys;\n };\n protoOf(DragSurfaceEntityPair).af = function () {\n return this.entity;\n };\n protoOf(DragSurfaceEntityPair).bf = function () {\n return this.surface;\n };\n protoOf(DragSurfaceEntityPair).g1k = function () {\n return this.connectorKeys;\n };\n protoOf(DragSurfaceEntityPair).t37 = function (entity, surface, connectorKeys) {\n return new DragSurfaceEntityPair(entity, surface, connectorKeys);\n };\n protoOf(DragSurfaceEntityPair).copy = function (entity, surface, connectorKeys, $super) {\n entity = entity === VOID ? this.entity : entity;\n surface = surface === VOID ? this.surface : surface;\n connectorKeys = connectorKeys === VOID ? this.connectorKeys : connectorKeys;\n return this.t37(entity, surface, connectorKeys);\n };\n protoOf(DragSurfaceEntityPair).toString = function () {\n return 'DragSurfaceEntityPair(entity=' + this.entity + ', surface=' + this.surface + ', connectorKeys=' + toString(this.connectorKeys) + ')';\n };\n protoOf(DragSurfaceEntityPair).hashCode = function () {\n var result = this.entity.hashCode();\n result = imul(result, 31) + hashCode(this.surface) | 0;\n result = imul(result, 31) + (this.connectorKeys == null ? 0 : hashCode(this.connectorKeys)) | 0;\n return result;\n };\n protoOf(DragSurfaceEntityPair).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof DragSurfaceEntityPair))\n return false;\n var tmp0_other_with_cast = other instanceof DragSurfaceEntityPair ? other : THROW_CCE();\n if (!this.entity.equals(tmp0_other_with_cast.entity))\n return false;\n if (!equals(this.surface, tmp0_other_with_cast.surface))\n return false;\n if (!equals(this.connectorKeys, tmp0_other_with_cast.connectorKeys))\n return false;\n return true;\n };\n function hasMatchingConnector($this, guestConnectorSequence, dragSurface) {\n var tmp$ret$3;\n $l$block_1: {\n // Inline function 'kotlin.sequences.any' call\n var tmp0_iterator = guestConnectorSequence.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.DragSurfaceOnlyRoomSelector.hasMatchingConnector.' call\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var tmp;\n if (isInterface(element, Collection)) {\n tmp = element.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n var tmp0_iterator_0 = element.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.DragSurfaceOnlyRoomSelector.hasMatchingConnector..' call\n var tmp_0;\n var tmp_1;\n var tmp0_safe_receiver = dragSurface.connectorKeys;\n if ((tmp0_safe_receiver == null ? null : firstOrNull_0(tmp0_safe_receiver)) === 'floor') {\n var tmp_2 = element_0.demands();\n RoomConnectorConstants_getInstance();\n tmp_1 = !contains(tmp_2, 'floor');\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp_0 = false;\n } else {\n var tmp_3;\n var tmp1_safe_receiver = dragSurface.connectorKeys;\n if ((tmp1_safe_receiver == null ? null : firstOrNull_0(tmp1_safe_receiver)) === 'ceiling') {\n var tmp_4 = element_0.demands();\n RoomConnectorConstants_getInstance();\n tmp_3 = !contains(tmp_4, 'ceiling');\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n tmp_0 = false;\n } else {\n tmp_0 = true;\n }\n }\n if (tmp_0) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n }\n tmp$ret$0 = false;\n }\n if (tmp$ret$0) {\n tmp$ret$3 = true;\n break $l$block_1;\n }\n }\n tmp$ret$3 = false;\n }\n return tmp$ret$3;\n }\n function Companion_33() {\n this.CEILING_CONNECTOR_KEY_PLACEHOLDER = 'ceiling';\n this.FLOOR_CONNECTOR_KEY_PLACEHOLDER = 'floor';\n }\n protoOf(Companion_33).u37 = function () {\n return this.CEILING_CONNECTOR_KEY_PLACEHOLDER;\n };\n protoOf(Companion_33).v37 = function () {\n return this.FLOOR_CONNECTOR_KEY_PLACEHOLDER;\n };\n protoOf(Companion_33).isFloorOrCeiling = function (dragSurface) {\n var tmp;\n var tmp0_safe_receiver = dragSurface.connectorKeys;\n if ((tmp0_safe_receiver == null ? null : firstOrNull_0(tmp0_safe_receiver)) === 'floor') {\n tmp = true;\n } else {\n var tmp1_safe_receiver = dragSurface.connectorKeys;\n tmp = (tmp1_safe_receiver == null ? null : firstOrNull_0(tmp1_safe_receiver)) === 'ceiling';\n }\n return tmp;\n };\n var Companion_instance_66;\n function Companion_getInstance_42() {\n return Companion_instance_66;\n }\n function DragSurfaceOnlyRoomSelector$canProjectDragOn$lambda(snappingGuest) {\n var tmp0_safe_receiver = get_connectorsComponent(snappingGuest);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestConnectors;\n return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;\n }\n function DragSurfaceOnlyRoomSelector() {\n }\n protoOf(DragSurfaceOnlyRoomSelector).shouldBeTested = function (dragSurface) {\n return get_isRoom(dragSurface.entity) ? true : get_isRoomPart(dragSurface.entity);\n };\n protoOf(DragSurfaceOnlyRoomSelector).canProjectDragOn = function (draggedEntity, dragSurface) {\n var tmp = get_snappingGuestEntitiesSequence(draggedEntity);\n var guestConnectorSequence = map(tmp, DragSurfaceOnlyRoomSelector$canProjectDragOn$lambda);\n return hasMatchingConnector(this, guestConnectorSequence, dragSurface);\n };\n function DragSurfaceSelector() {\n }\n function calculateCursorDelta($this, entity, projectionHit) {\n var tmp0_elvis_lhs = get_draggableRootEntity(entity);\n var realEntity = tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs;\n return get_worldPosition(realEntity).minus(projectionHit);\n }\n function rotateDragPointCursorDelta($this, entity, lastTransform, projectionHit) {\n var tmp0_safe_receiver = get_snapRoot(entity);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_worldTransform(tmp0_safe_receiver);\n var currentTransform = tmp1_elvis_lhs == null ? get_worldTransform(entity) : tmp1_elvis_lhs;\n if (!lastTransform.rotation.almostEquals(currentTransform.rotation)) {\n $this.h38_1 = calculateCursorDelta($this, entity, projectionHit);\n }\n }\n function setEndTransform($this, entity, newPoint) {\n var tmp0_safe_receiver = get_snapRoot(entity);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_worldTransform(tmp0_safe_receiver);\n var currentTransform = tmp1_elvis_lhs == null ? get_worldTransform(entity) : tmp1_elvis_lhs;\n return new Transform(newPoint.plus($this.h38_1), currentTransform.rotation);\n }\n function sendEvent($this, endTransform, cameraPosition, entity) {\n var moveDragEvent = new WorldSpaceDragEventComponent(endTransform.position, Companion_instance_16.createFromPoints(cameraPosition, endTransform.position));\n $this.e38_1.addComponent(entity, moveDragEvent);\n }\n function Companion_34() {\n this.ID = 'LegacyCanvasTo3DDragConverterSystem';\n }\n protoOf(Companion_34).u1n = function () {\n return this.ID;\n };\n var Companion_instance_67;\n function Companion_getInstance_43() {\n return Companion_instance_67;\n }\n function LegacyCanvasTo3DDragConverterSystem(entityManager, sceneManager, projector) {\n SystemBase.call(this, 'LegacyCanvasTo3DDragConverterSystem', 84);\n this.e38_1 = entityManager;\n this.f38_1 = projector;\n this.g38_1 = new DragSurfaceUpdatesListenerSystem(this.f38_1, sceneManager);\n this.h38_1 = Companion_getInstance_4().ZERO;\n this.i38_1 = Companion_getInstance_5().IDENTITY;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.j38_1 = [85];\n }\n protoOf(LegacyCanvasTo3DDragConverterSystem).onRegister = function () {\n protoOf(SystemBase).onRegister.call(this);\n this.g38_1.register(this.e38_1);\n };\n protoOf(LegacyCanvasTo3DDragConverterSystem).onUnregister = function () {\n protoOf(SystemBase).onUnregister.call(this);\n this.g38_1.unregister(this.e38_1);\n };\n protoOf(LegacyCanvasTo3DDragConverterSystem).enable = function () {\n protoOf(SystemBase).enable.call(this);\n this.g38_1.enable();\n };\n protoOf(LegacyCanvasTo3DDragConverterSystem).disable = function () {\n protoOf(SystemBase).disable.call(this);\n this.g38_1.disable();\n };\n protoOf(LegacyCanvasTo3DDragConverterSystem).onAddComponent = function (entity, newComponent) {\n var tmp0_elvis_lhs = get_draggableRootEntity(entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var draggedEntity = tmp;\n this.h38_1 = Companion_getInstance_4().ZERO;\n this.i38_1 = Companion_getInstance_5().IDENTITY;\n var tmp1_elvis_lhs = this.f38_1.project(newComponent.rayFromCameraToDragEnd, entity);\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var projectionHit = tmp_0;\n this.h38_1 = calculateCursorDelta(this, entity, projectionHit);\n var endPoint = projectionHit.plus(this.h38_1);\n this.i38_1 = new Transform(endPoint, get_worldTransform(draggedEntity).rotation);\n sendEvent(this, this.i38_1, newComponent.cameraPosition, entity);\n };\n protoOf(LegacyCanvasTo3DDragConverterSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n var tmp0_elvis_lhs = get_draggableRootEntity(entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var draggedEntity = tmp;\n var tmp1_elvis_lhs = this.f38_1.project(newComponent.rayFromCameraToDragEnd, entity);\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var projectionHit = tmp_0;\n rotateDragPointCursorDelta(this, draggedEntity, this.i38_1, projectionHit);\n this.i38_1 = setEndTransform(this, draggedEntity, projectionHit);\n sendEvent(this, this.i38_1, newComponent.cameraPosition, entity);\n };\n protoOf(LegacyCanvasTo3DDragConverterSystem).onRemoveComponent = function (entity, oldComponent) {\n this.e38_1.removeComponent(entity, 85);\n };\n protoOf(LegacyCanvasTo3DDragConverterSystem).w1o = function () {\n return this.j38_1;\n };\n protoOf(LegacyCanvasTo3DDragConverterSystem).setProjector = function (projector) {\n this.f38_1 = projector;\n };\n protoOf(LegacyCanvasTo3DDragConverterSystem).getProjector = function () {\n return this.f38_1;\n };\n function checkIfWorldDragWasDetected($this) {\n if ($this.s38_1 ? !$this.t38_1 : false) {\n var tmp = Companion_getInstance_7().logger;\n tmp.warn(NoDragConverterDetector$checkIfWorldDragWasDetected$lambda);\n }\n $this.disable();\n }\n function NoDragConverterDetector$checkIfWorldDragWasDetected$lambda() {\n return 'No converter for canvas drags to 3d drags detected. Did you forget to initiate ' + 'CanvasTo3DDragConverterSystem' + ' ?';\n }\n function NoDragConverterDetector(entityManager) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [];\n SystemBase2.call(this, 'NoDragConverterDetector', 84, 85, tmp$ret$2, null, null);\n this.register(entityManager);\n this.s38_1 = false;\n this.t38_1 = false;\n }\n protoOf(NoDragConverterDetector).onAddComponent = function (entity, newComponent) {\n this.s38_1 = true;\n };\n protoOf(NoDragConverterDetector).onUpdateComponent = function (entity, oldComponent, newComponent) {\n checkIfWorldDragWasDetected(this);\n };\n protoOf(NoDragConverterDetector).onRemoveComponent = function (entity, oldComponent) {\n };\n protoOf(NoDragConverterDetector).onAddComponent2 = function (entity, newComponent) {\n this.t38_1 = true;\n };\n protoOf(NoDragConverterDetector).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n };\n protoOf(NoDragConverterDetector).onRemoveComponent2 = function (entity, oldComponent) {\n };\n function Companion_35() {\n this.id = 113;\n }\n protoOf(Companion_35).s1k = function () {\n return this.id;\n };\n var Companion_instance_68;\n function Companion_getInstance_44() {\n return Companion_instance_68;\n }\n function DragProjectionPointComponent(projectionPoint) {\n this.projectionPoint = projectionPoint;\n }\n protoOf(DragProjectionPointComponent).u38 = function () {\n return this.projectionPoint;\n };\n protoOf(DragProjectionPointComponent).x1k = function () {\n return 113;\n };\n protoOf(DragProjectionPointComponent).eq = function (other) {\n return (other instanceof DragProjectionPointComponent ? other : THROW_CCE()).projectionPoint.equals(this.projectionPoint);\n };\n function Companion_36() {\n this.id = 94;\n }\n protoOf(Companion_36).s1k = function () {\n return this.id;\n };\n var Companion_instance_69;\n function Companion_getInstance_45() {\n return Companion_instance_69;\n }\n function GrabOffsetComponent(localGrabOffset) {\n this.localGrabOffset = localGrabOffset;\n this.r37_1 = 94;\n }\n protoOf(GrabOffsetComponent).v38 = function () {\n return this.localGrabOffset;\n };\n protoOf(GrabOffsetComponent).x1k = function () {\n return this.r37_1;\n };\n protoOf(GrabOffsetComponent).eq = function (other) {\n var tmp0_safe_receiver = other instanceof GrabOffsetComponent ? other : null;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.localGrabOffset;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.equals(this.localGrabOffset);\n return tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs;\n };\n protoOf(GrabOffsetComponent).af = function () {\n return this.localGrabOffset;\n };\n protoOf(GrabOffsetComponent).w38 = function (localGrabOffset) {\n return new GrabOffsetComponent(localGrabOffset);\n };\n protoOf(GrabOffsetComponent).copy = function (localGrabOffset, $super) {\n localGrabOffset = localGrabOffset === VOID ? this.localGrabOffset : localGrabOffset;\n return this.w38(localGrabOffset);\n };\n protoOf(GrabOffsetComponent).toString = function () {\n return 'GrabOffsetComponent(localGrabOffset=' + this.localGrabOffset + ')';\n };\n protoOf(GrabOffsetComponent).hashCode = function () {\n return this.localGrabOffset.hashCode();\n };\n protoOf(GrabOffsetComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof GrabOffsetComponent))\n return false;\n var tmp0_other_with_cast = other instanceof GrabOffsetComponent ? other : THROW_CCE();\n if (!this.localGrabOffset.equals(tmp0_other_with_cast.localGrabOffset))\n return false;\n return true;\n };\n function AnyDragSurfaceProjector_init_$Init$(coreServices, dragSurfaceSelector, $this) {\n dragSurfaceSelector = dragSurfaceSelector === VOID ? new DragSurfaceOnlyRoomSelector() : dragSurfaceSelector;\n AnyDragSurfaceProjector.call($this, coreServices.sceneManager, coreServices.entityManager, dragSurfaceSelector);\n return $this;\n }\n function AnyDragSurfaceProjectorFromCoreServices(coreServices, dragSurfaceSelector) {\n return AnyDragSurfaceProjector_init_$Init$(coreServices, dragSurfaceSelector, objectCreate(protoOf(AnyDragSurfaceProjector)));\n }\n function _get_cachedSurfacesEntity__1g8lxc($this) {\n if ($this.d39_1.isDisposed) {\n $this.d39_1 = $this.y38_1.createEntity();\n initCachedServiceEntity($this);\n }\n return $this.d39_1;\n }\n function initCachedServiceEntity($this) {\n setParent($this.d39_1, $this.x38_1.scene);\n $this.d39_1.addComponent(new UnserializableEntityComponent());\n $this.d39_1.addComponent(new DisplayNameComponent('Drag Surface Cache'));\n }\n function getSurfaces($this) {\n var tmp0_safe_receiver = get_projectorSurfacesComponent(_get_cachedSurfacesEntity__1g8lxc($this));\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.surfaces;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n }\n function getRoomSurfaces($this) {\n var tmp0_safe_receiver = get_projectorSurfacesComponent(_get_cachedSurfacesEntity__1g8lxc($this));\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.roomSurfaces;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n }\n function addSurfacesToCache($this, surfaces, roomSurfaces) {\n var tmp0_elvis_lhs = get_projectorSurfacesComponent(_get_cachedSurfacesEntity__1g8lxc($this));\n var component = tmp0_elvis_lhs == null ? new DragSurfaceEntityPairsCacheComponent() : tmp0_elvis_lhs;\n var newSurfaces = plus_0(component.surfaces, surfaces);\n var newRoomSurfaces = plus_0(component.roomSurfaces, roomSurfaces);\n _get_cachedSurfacesEntity__1g8lxc($this).addComponentInternal(new DragSurfaceEntityPairsCacheComponent(newSurfaces, newRoomSurfaces));\n }\n function selectDragPlane($this, ray, draggedEntity) {\n var bestDist = Infinity;\n var oldRayHit = equals($this.b39_1, draggedEntity) ? $this.a39_1 : null;\n $this.a39_1 = null;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = getSurfaces($this);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n $l$block_0: {\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.projector.AnyDragSurfaceProjector.selectDragPlane.' call\n var surfaceEntity = element.af();\n var surfacePlane = element.bf();\n if (surfaceEntity.equals(draggedEntity) ? true : isDescendantOf(surfaceEntity, draggedEntity)) {\n break $l$block_0;\n }\n var tmp1_elvis_lhs = surfacePlane.raycast(ray);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n break $l$block_0;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var rayResult = tmp;\n if ($this.z38_1.canProjectDragOn(draggedEntity, element)) {\n var distance = rayResult.point.distanceTo(ray.origin);\n if (distance < bestDist) {\n bestDist = distance;\n $this.a39_1 = rayResult;\n }\n }\n }\n }\n if ($this.a39_1 == null) {\n $this.a39_1 = tryToFindHitPointOutsideDragSurfaces($this, draggedEntity, ray, oldRayHit);\n }\n $this.b39_1 = draggedEntity;\n }\n function tryToFindHitPointOutsideDragSurfaces($this, draggedEntity, ray, oldRayHit) {\n var bestRoomHit = raycastAgainstRoom($this, draggedEntity, ray);\n var currentExtendedDragPlaneHit = findRayHitByExtendingLastDragPlane($this, oldRayHit, ray);\n var onlyHitRoom = currentExtendedDragPlaneHit == null ? !(bestRoomHit == null) : false;\n var onlyHitExtendedPlane = !(currentExtendedDragPlaneHit == null) ? bestRoomHit == null : false;\n var hitBothRoomAndExtendedPlane = !(currentExtendedDragPlaneHit == null) ? !(bestRoomHit == null) : false;\n var tmp;\n if (onlyHitRoom) {\n tmp = bestRoomHit == null ? null : bestRoomHit.asRaycastResult();\n } else if (onlyHitExtendedPlane) {\n tmp = currentExtendedDragPlaneHit;\n } else if (hitBothRoomAndExtendedPlane) {\n tmp = bestRoomHit == null ? null : bestRoomHit.asRaycastResult();\n } else if (!(oldRayHit == null)) {\n tmp = oldRayHit;\n } else {\n tmp = new RaycastResult(get_worldPosition(draggedEntity), ray.direction);\n }\n return tmp;\n }\n function raycastAgainstRoom($this, draggedEntity, ray) {\n var bestRoomHit = null;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = getRoomSurfaces($this);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n $l$block_0: {\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.projector.AnyDragSurfaceProjector.raycastAgainstRoom.' call\n var roomEntity = element.af();\n var roomPlane = element.bf();\n if (roomEntity.equals(draggedEntity) ? true : isDescendantOf(roomEntity, draggedEntity)) {\n break $l$block_0;\n }\n var tmp1_elvis_lhs = roomPlane.raycast(ray);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n break $l$block_0;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var rayResult = tmp;\n var distance = rayResult.point.distanceTo(ray.origin);\n var tmp2_safe_receiver = bestRoomHit;\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.distance;\n var tmp_0;\n if (tmp3_elvis_lhs == null) {\n tmp_0 = 1.7976931348623157E308;\n } else {\n tmp_0 = tmp3_elvis_lhs;\n }\n if (distance < tmp_0) {\n bestRoomHit = new RaycastHit(rayResult.point, roomEntity, distance, rayResult.surfaceNormal);\n }\n }\n }\n return bestRoomHit;\n }\n function findRayHitByExtendingLastDragPlane($this, oldRayHit, ray) {\n var currentExtendedDragPlaneHit = null;\n if (!(oldRayHit == null)) {\n var lastDragPlane = new Plane(oldRayHit.point, oldRayHit.surfaceNormal);\n var rayResult = lastDragPlane.raycast(ray);\n if (!(rayResult == null)) {\n currentExtendedDragPlaneHit = rayResult;\n }\n }\n return currentExtendedDragPlaneHit;\n }\n function Companion_37() {\n Companion_instance_70 = this;\n this.e39_1 = LoggerState_getInstance().m1m('AnyDragSurfaceProjector');\n }\n var Companion_instance_70;\n function Companion_getInstance_46() {\n if (Companion_instance_70 == null)\n new Companion_37();\n return Companion_instance_70;\n }\n function AnyDragSurfaceProjector(sceneManager, entityManager, dragSurfaceSelector) {\n Companion_getInstance_46();\n dragSurfaceSelector = dragSurfaceSelector === VOID ? new DragSurfaceOnlyRoomSelector() : dragSurfaceSelector;\n this.x38_1 = sceneManager;\n this.y38_1 = entityManager;\n this.z38_1 = dragSurfaceSelector;\n this.a39_1 = null;\n this.b39_1 = null;\n this.c39_1 = new DragSurfaceOnlyRoomSelector();\n this.d39_1 = this.y38_1.createEntity();\n initCachedServiceEntity(this);\n }\n protoOf(AnyDragSurfaceProjector).onDragSurfacesAdded = function (worldDragSurfacesComponent, entity) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = worldDragSurfacesComponent.surfaces;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.projector.AnyDragSurfaceProjector.onDragSurfacesAdded.' call\n var tmp$ret$0 = new DragSurfaceEntityPair(entity, item.surface, item.connectorKeys);\n destination.q(tmp$ret$0);\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.projector.AnyDragSurfaceProjector.onDragSurfacesAdded.' call\n if (!this.c39_1.shouldBeTested(element)) {\n destination_0.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = destination_0.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.projector.AnyDragSurfaceProjector.onDragSurfacesAdded.' call\n if (this.z38_1.shouldBeTested(element_0)) {\n destination_1.q(element_0);\n }\n }\n var surfaces = destination_1;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.map' call\n var this_1 = worldDragSurfacesComponent.surfaces;\n // Inline function 'kotlin.collections.mapTo' call\n var destination_2 = ArrayList_init_$Create$_0(this_1.length);\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var item_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.projector.AnyDragSurfaceProjector.onDragSurfacesAdded.' call\n var tmp$ret$9 = new DragSurfaceEntityPair(entity, item_0.surface, item_0.connectorKeys);\n destination_2.q(tmp$ret$9);\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_3 = ArrayList_init_$Create$();\n var tmp0_iterator_1 = destination_2.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.projector.AnyDragSurfaceProjector.onDragSurfacesAdded.' call\n if (this.c39_1.shouldBeTested(element_1)) {\n destination_3.q(element_1);\n }\n }\n var roomSurfaces = destination_3;\n addSurfacesToCache(this, surfaces, roomSurfaces);\n };\n protoOf(AnyDragSurfaceProjector).onDragSurfacesRemoved = function (entity) {\n var tmp0_elvis_lhs = get_projectorSurfacesComponent(_get_cachedSurfacesEntity__1g8lxc(this));\n var component = tmp0_elvis_lhs == null ? new DragSurfaceEntityPairsCacheComponent() : tmp0_elvis_lhs;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = component.surfaces;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.projector.AnyDragSurfaceProjector.onDragSurfacesRemoved.' call\n if (!element.entity.equals(entity)) {\n destination.q(element);\n }\n }\n var surfaces = copyToArray(destination);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_1 = component.roomSurfaces;\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.projector.AnyDragSurfaceProjector.onDragSurfacesRemoved.' call\n if (!element_0.entity.equals(entity)) {\n destination_0.q(element_0);\n }\n }\n var roomSurfaces = copyToArray(destination_0);\n _get_cachedSurfacesEntity__1g8lxc(this).addComponentInternal(new DragSurfaceEntityPairsCacheComponent(surfaces, roomSurfaces));\n };\n protoOf(AnyDragSurfaceProjector).project = function (ray, entity) {\n selectDragPlane(this, ray, entity);\n var tmp0_safe_receiver = this.a39_1;\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.point;\n };\n function Companion_38() {\n }\n protoOf(Companion_38).s1k = function () {\n return 81;\n };\n var Companion_instance_71;\n function Companion_getInstance_47() {\n return Companion_instance_71;\n }\n function DragSurfaceEntityPairsCacheComponent(surfaces, roomSurfaces) {\n var tmp;\n if (surfaces === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = surfaces;\n }\n surfaces = tmp;\n var tmp_0;\n if (roomSurfaces === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = roomSurfaces;\n }\n roomSurfaces = tmp_0;\n this.surfaces = surfaces;\n this.roomSurfaces = roomSurfaces;\n }\n protoOf(DragSurfaceEntityPairsCacheComponent).x1k = function () {\n return Companion_instance_71.id;\n };\n protoOf(DragSurfaceEntityPairsCacheComponent).eq = function (other) {\n return false;\n };\n function get_projectorSurfacesComponent(_this__u8e3s4) {\n return _this__u8e3s4.__getComponentForKotlin(Companion_instance_71.id);\n }\n function DragSurfaceProjector() {\n }\n function addSurfaceIfExists($this, entity) {\n var tmp0_elvis_lhs = entity.__getComponentForKotlin(91);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var component = tmp;\n $this.n39_1.onDragSurfacesAdded(component, entity);\n }\n function Companion_39() {\n this.ID = 'MultiWallConvertScreenDragsSystem';\n }\n protoOf(Companion_39).u1n = function () {\n return this.ID;\n };\n var Companion_instance_72;\n function Companion_getInstance_48() {\n return Companion_instance_72;\n }\n function DragSurfaceUpdatesListenerSystem$enable$lambda(it) {\n return it.hasComponent(91);\n }\n function DragSurfaceUpdatesListenerSystem(dragSurfacesChangedListener, sceneManager) {\n SystemBase2.call(this, 'MultiWallConvertScreenDragsSystem', 91, 5);\n this.n39_1 = dragSurfacesChangedListener;\n this.o39_1 = sceneManager;\n this.enable();\n }\n protoOf(DragSurfaceUpdatesListenerSystem).enable = function () {\n protoOf(SystemBase2).enable.call(this);\n // Inline function 'kotlin.sequences.forEach' call\n var tmp = get_hierarchySequence(this.o39_1.root);\n var tmp0_iterator = filter(tmp, DragSurfaceUpdatesListenerSystem$enable$lambda).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.dragging.viewerDragConversion.projector.DragSurfaceUpdatesListenerSystem.enable.' call\n addSurfaceIfExists(this, element);\n }\n };\n protoOf(DragSurfaceUpdatesListenerSystem).onAddComponent = function (entity, newComponent) {\n if (get_isInScene(entity)) {\n this.n39_1.onDragSurfacesAdded(newComponent, entity);\n }\n };\n protoOf(DragSurfaceUpdatesListenerSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n if (get_isInScene(entity)) {\n this.n39_1.onDragSurfacesRemoved(entity);\n this.n39_1.onDragSurfacesAdded(newComponent, entity);\n }\n };\n protoOf(DragSurfaceUpdatesListenerSystem).onRemoveComponent = function (entity, oldComponent) {\n this.n39_1.onDragSurfacesRemoved(entity);\n };\n protoOf(DragSurfaceUpdatesListenerSystem).onAddComponent2 = function (entity, newComponent) {\n var worldDragSurfacesComponent = entity.__getComponentForKotlin(91);\n if (!(worldDragSurfacesComponent == null)) {\n this.n39_1.onDragSurfacesAdded(worldDragSurfacesComponent, entity);\n }\n };\n protoOf(DragSurfaceUpdatesListenerSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n };\n protoOf(DragSurfaceUpdatesListenerSystem).onRemoveComponent2 = function (entity, oldComponent) {\n var worldDragSurfacesComponent = entity.__getComponentForKotlin(91);\n if (!(worldDragSurfacesComponent == null)) {\n this.n39_1.onDragSurfacesRemoved(entity);\n }\n };\n function DragSurfacesChangedListener() {\n }\n function entityHit($this, entity, ray) {\n var hit = RaycastUtils_instance.raycast(ray, entity);\n var cameraNormal = ray.direction.__timesIntForKotlin(-1);\n var tmp;\n if (hit == null) {\n var entityPlane = new Plane(get_worldPosition(entity), cameraNormal);\n var tmp0_safe_receiver = entityPlane.raycast(ray);\n tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.point;\n } else {\n tmp = hit.point;\n }\n var hitPoint = tmp;\n return hitPoint;\n }\n function XYPlaneProjector() {\n }\n protoOf(XYPlaneProjector).onDragSurfacesAdded = function (worldDragSurfacesComponent, entity) {\n };\n protoOf(XYPlaneProjector).onDragSurfacesRemoved = function (entity) {\n };\n protoOf(XYPlaneProjector).project = function (ray, entity) {\n var tmp0_elvis_lhs = entityHit(this, entity, ray);\n var planePoint = tmp0_elvis_lhs == null ? get_worldPosition(entity) : tmp0_elvis_lhs;\n var frontDragPlane = new Plane(planePoint, Companion_getInstance_4().FORWARD);\n var backDragPlane = new Plane(planePoint, Companion_getInstance_4().BACK);\n var tmp1_elvis_lhs = frontDragPlane.raycast(ray);\n var intersection = tmp1_elvis_lhs == null ? backDragPlane.raycast(ray) : tmp1_elvis_lhs;\n return intersection == null ? null : intersection.point;\n };\n function Companion_40() {\n this.id = 62;\n }\n protoOf(Companion_40).s1k = function () {\n return this.id;\n };\n var Companion_instance_73;\n function Companion_getInstance_49() {\n return Companion_instance_73;\n }\n function FunctionalMarginComponent(worldPolyhedron) {\n this.worldPolyhedron = worldPolyhedron;\n }\n protoOf(FunctionalMarginComponent).g1n = function () {\n return this.worldPolyhedron;\n };\n protoOf(FunctionalMarginComponent).x1k = function () {\n return 62;\n };\n protoOf(FunctionalMarginComponent).eq = function (other) {\n var o = other instanceof FunctionalMarginComponent ? other : THROW_CCE();\n return equals(o.worldPolyhedron, this.worldPolyhedron);\n };\n protoOf(FunctionalMarginComponent).af = function () {\n return this.worldPolyhedron;\n };\n protoOf(FunctionalMarginComponent).h1n = function (worldPolyhedron) {\n return new FunctionalMarginComponent(worldPolyhedron);\n };\n protoOf(FunctionalMarginComponent).copy = function (worldPolyhedron, $super) {\n worldPolyhedron = worldPolyhedron === VOID ? this.worldPolyhedron : worldPolyhedron;\n return this.h1n(worldPolyhedron);\n };\n protoOf(FunctionalMarginComponent).toString = function () {\n return 'FunctionalMarginComponent(worldPolyhedron=' + this.worldPolyhedron + ')';\n };\n protoOf(FunctionalMarginComponent).hashCode = function () {\n return hashCode(this.worldPolyhedron);\n };\n protoOf(FunctionalMarginComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof FunctionalMarginComponent))\n return false;\n var tmp0_other_with_cast = other instanceof FunctionalMarginComponent ? other : THROW_CCE();\n if (!equals(this.worldPolyhedron, tmp0_other_with_cast.worldPolyhedron))\n return false;\n return true;\n };\n function Companion_41() {\n this.id = 61;\n }\n protoOf(Companion_41).s1k = function () {\n return this.id;\n };\n var Companion_instance_74;\n function Companion_getInstance_50() {\n return Companion_instance_74;\n }\n function FunctionalMarginShapeComponent(margin) {\n this.margin = margin;\n }\n protoOf(FunctionalMarginShapeComponent).p39 = function () {\n return this.margin;\n };\n protoOf(FunctionalMarginShapeComponent).shape = function (me) {\n var oobb = get_objectOrientedBoundingBoxForHierarchy(me);\n return oobb.applyMargin(this.margin);\n };\n protoOf(FunctionalMarginShapeComponent).x1k = function () {\n return 61;\n };\n protoOf(FunctionalMarginShapeComponent).eq = function (other) {\n var o = other instanceof FunctionalMarginShapeComponent ? other : THROW_CCE();\n return o.margin.equals(this.margin);\n };\n protoOf(FunctionalMarginShapeComponent).af = function () {\n return this.margin;\n };\n protoOf(FunctionalMarginShapeComponent).q39 = function (margin) {\n return new FunctionalMarginShapeComponent(margin);\n };\n protoOf(FunctionalMarginShapeComponent).copy = function (margin, $super) {\n margin = margin === VOID ? this.margin : margin;\n return this.q39(margin);\n };\n protoOf(FunctionalMarginShapeComponent).toString = function () {\n return 'FunctionalMarginShapeComponent(margin=' + this.margin + ')';\n };\n protoOf(FunctionalMarginShapeComponent).hashCode = function () {\n return this.margin.hashCode();\n };\n protoOf(FunctionalMarginShapeComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof FunctionalMarginShapeComponent))\n return false;\n var tmp0_other_with_cast = other instanceof FunctionalMarginShapeComponent ? other : THROW_CCE();\n if (!this.margin.equals(tmp0_other_with_cast.margin))\n return false;\n return true;\n };\n function Companion_42() {\n this.ID = 'FunctionalMarginSystem';\n }\n protoOf(Companion_42).u1n = function () {\n return this.ID;\n };\n var Companion_instance_75;\n function Companion_getInstance_51() {\n return Companion_instance_75;\n }\n function updateFunctionalMarginShape($this, entity) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(61);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.functionalmargins.FunctionalMarginSystem.updateFunctionalMarginShape.' call\n var shape = TransformUtils_instance.applyWorldTransform(tmp0_safe_receiver.shape(entity), entity);\n entity.addComponent(new FunctionalMarginComponent(shape));\n }\n }\n function FunctionalMarginSystem() {\n SystemBase2.call(this, 'FunctionalMarginSystem', 10, 61);\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.z39_1 = [62];\n var tmp_0 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0.a3a_1 = ['TransformSystem'];\n }\n protoOf(FunctionalMarginSystem).w1o = function () {\n return this.z39_1;\n };\n protoOf(FunctionalMarginSystem).x1o = function () {\n return this.a3a_1;\n };\n protoOf(FunctionalMarginSystem).onAddComponent = function (entity, newComponent) {\n updateFunctionalMarginShape(this, entity);\n };\n protoOf(FunctionalMarginSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n updateFunctionalMarginShape(this, entity);\n };\n protoOf(FunctionalMarginSystem).onRemoveComponent = function (entity, oldComponent) {\n updateFunctionalMarginShape(this, entity);\n };\n protoOf(FunctionalMarginSystem).onAddComponent2 = function (entity, newComponent) {\n updateFunctionalMarginShape(this, entity);\n };\n protoOf(FunctionalMarginSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n updateFunctionalMarginShape(this, entity);\n };\n protoOf(FunctionalMarginSystem).onRemoveComponent2 = function (entity, oldComponent) {\n entity.removeComponent(62);\n };\n function Companion_43() {\n this.ID = 'FunctionalMargin';\n }\n protoOf(Companion_43).u1n = function () {\n return this.ID;\n };\n var Companion_instance_76;\n function Companion_getInstance_52() {\n return Companion_instance_76;\n }\n function validate_0($this, entity, snapActionCandidate) {\n var root = $this.findRoot(snapActionCandidate, entity);\n var tmp1_elvis_lhs = snapActionCandidate == null ? null : snapActionCandidate.host;\n var parent = tmp1_elvis_lhs == null ? get_parent(entity) : tmp1_elvis_lhs;\n var meAndMyHierarchy = get_hierarchy(entity);\n var tmp;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var inductionVariable = 0;\n var last = meAndMyHierarchy.length;\n while (inductionVariable < last) {\n var element = meAndMyHierarchy[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.functionalmargins.FunctionalMarginValidation.validate.' call\n if (element.hasComponent(61)) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n if (tmp$ret$1) {\n tmp = findInHierarchy(root, FunctionalMarginValidation$validate$lambda) == null;\n } else {\n tmp = false;\n }\n if (tmp) {\n return null;\n }\n var warn = {_v: null};\n var tmp2_safe_receiver = get_snapRoot(entity);\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : get_hierarchy(tmp2_safe_receiver);\n var snapRootHierarchy = tmp3_elvis_lhs == null ? meAndMyHierarchy : tmp3_elvis_lhs;\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = meAndMyHierarchy.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = meAndMyHierarchy[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n $l$block_0: {\n // Inline function 'com.ikea.core.stl.functionalmargins.FunctionalMarginValidation.validate.' call\n var tmp0_safe_receiver = element_0.__getComponentForKotlin(62);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_safe_receiver_0 = findInHierarchy(root, FunctionalMarginValidation$validate$lambda_0(snapRootHierarchy, tmp1_safe_receiver));\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_safe_receiver_1 = get_collider(tmp0_safe_receiver_0);\n var tmp1_safe_receiver_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.worldPolyhedron;\n var penetration = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.penetration(tmp1_safe_receiver);\n warn._v = new FunctionalMarginWarning(tmp0_safe_receiver_0, $this, penetration == null ? Companion_getInstance_4().ZERO : penetration);\n break $l$block_0;\n }\n }\n }\n }\n var myColliders$delegate = lazy(FunctionalMarginValidation$validate$lambda_1(meAndMyHierarchy));\n var tmp_0;\n if (warn._v == null) {\n // Inline function 'kotlin.collections.isNotEmpty' call\n tmp_0 = !validate$lambda(myColliders$delegate).b1();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n var tmp4_safe_receiver = $this.e3a_1;\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_1;\n if (!tmp4_safe_receiver.isDisposed) {\n validate$checkZoneCollisionWithMe(warn, parent, $this, snapRootHierarchy, myColliders$delegate, tmp4_safe_receiver);\n tmp_1 = Unit_instance;\n }\n }\n if (warn._v == null) {\n findInHierarchy(root, FunctionalMarginValidation$validate$checkZoneCollisionWithMe$ref(warn, parent, $this, snapRootHierarchy, myColliders$delegate));\n }\n }\n var tmp_2 = $this;\n var tmp5_safe_receiver = warn._v;\n tmp_2.e3a_1 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.otherEntity;\n return warn._v;\n }\n function validate$lambda($myColliders$delegate) {\n // Inline function 'kotlin.getValue' call\n getLocalDelegateReference('myColliders', KProperty0, false, function () {\n return THROW_ISE();\n });\n return $myColliders$delegate.u2();\n }\n function validate$checkZoneCollisionWithMe(warn, parent, this$0, snapRootHierarchy, myColliders$delegate, other) {\n if (!(warn._v == null))\n return false;\n if ((!(parent == null) ? !this$0.c3a_1 : false) ? hierarchyContains(other, parent) : false)\n return false;\n if (contains(snapRootHierarchy, other))\n return false;\n var funcZone = other.__getComponentForKotlin(62);\n var tmp;\n if (!(funcZone == null)) {\n var tmp$ret$0;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var this_0 = validate$lambda(myColliders$delegate);\n var tmp_0;\n if (isInterface(this_0, Collection)) {\n tmp_0 = this_0.b1();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = false;\n break $l$block;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n var pen = element.penetration(funcZone.worldPolyhedron);\n if (!(pen == null)) {\n warn._v = new FunctionalMarginWarning(other, this$0, pen);\n return true;\n }\n return false;\n }\n tmp$ret$0 = false;\n }\n tmp = tmp$ret$0;\n } else {\n tmp = false;\n }\n var found = tmp;\n return found;\n }\n function FunctionalMarginValidation$validate$lambda(it) {\n return it.hasComponent(62);\n }\n function FunctionalMarginValidation$validate$lambda_0($snapRootHierarchy, $worldFuncZone) {\n return function (other) {\n var tmp;\n if (!contains($snapRootHierarchy, other)) {\n var tmp0_safe_receiver = get_collider(other);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n tmp = !((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.penetration($worldFuncZone)) == null);\n } else {\n tmp = false;\n }\n return tmp;\n };\n }\n function FunctionalMarginValidation$validate$lambda_1($meAndMyHierarchy) {\n return function () {\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_0 = $meAndMyHierarchy;\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.functionalmargins.FunctionalMarginValidation.validate..' call\n var tmp0_safe_receiver = get_collider(element);\n var tmp0_safe_receiver_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver_0);\n }\n }\n return destination;\n };\n }\n function FunctionalMarginValidation$validate$checkZoneCollisionWithMe$ref($warn, $parent, this$0, $snapRootHierarchy, $myColliders$delegate) {\n var l = function (p0) {\n return validate$checkZoneCollisionWithMe($warn, $parent, this$0, $snapRootHierarchy, $myColliders$delegate, p0);\n };\n l.callableName = 'checkZoneCollisionWithMe';\n return l;\n }\n function FunctionalMarginValidation(generateWarningsForAncestors, entityManager) {\n ValidationImpl.call(this);\n this.c3a_1 = generateWarningsForAncestors;\n this.entityManager = entityManager;\n this.d3a_1 = 'FunctionalMargin';\n this.e3a_1 = null;\n }\n protoOf(FunctionalMarginValidation).p1i = function () {\n return this.entityManager;\n };\n protoOf(FunctionalMarginValidation).s1k = function () {\n return this.d3a_1;\n };\n protoOf(FunctionalMarginValidation).validateCurrentState = function (entity) {\n return validate_0(this, entity, null);\n };\n protoOf(FunctionalMarginValidation).validateSnap = function (snapActionCandidate) {\n return validate_0(this, snapActionCandidate.guestRoot, snapActionCandidate);\n };\n function Companion_44() {\n this.ID = 'FunctionalMarginWarning intersects';\n }\n protoOf(Companion_44).u1n = function () {\n return this.ID;\n };\n var Companion_instance_77;\n function Companion_getInstance_53() {\n return Companion_instance_77;\n }\n function FunctionalMarginWarning(otherEntity, functionalMarginRule, penetration) {\n ValidationResult.call(this, ValidationResultType_WARNING_getInstance(), get_productRefOrEmptyString(otherEntity), functionalMarginRule);\n this.otherEntity = otherEntity;\n this.functionalMarginRule = functionalMarginRule;\n this.penetration = penetration;\n }\n protoOf(FunctionalMarginWarning).f3a = function () {\n return this.otherEntity;\n };\n protoOf(FunctionalMarginWarning).g3a = function () {\n return this.functionalMarginRule;\n };\n protoOf(FunctionalMarginWarning).h3a = function () {\n return this.penetration;\n };\n protoOf(FunctionalMarginWarning).toString = function () {\n return this.id + ' ';\n };\n protoOf(FunctionalMarginWarning).s1k = function () {\n return 'FunctionalMarginWarning intersects';\n };\n protoOf(FunctionalMarginWarning).af = function () {\n return this.otherEntity;\n };\n protoOf(FunctionalMarginWarning).bf = function () {\n return this.functionalMarginRule;\n };\n protoOf(FunctionalMarginWarning).g1k = function () {\n return this.penetration;\n };\n protoOf(FunctionalMarginWarning).i3a = function (otherEntity, functionalMarginRule, penetration) {\n return new FunctionalMarginWarning(otherEntity, functionalMarginRule, penetration);\n };\n protoOf(FunctionalMarginWarning).copy = function (otherEntity, functionalMarginRule, penetration, $super) {\n otherEntity = otherEntity === VOID ? this.otherEntity : otherEntity;\n functionalMarginRule = functionalMarginRule === VOID ? this.functionalMarginRule : functionalMarginRule;\n penetration = penetration === VOID ? this.penetration : penetration;\n return this.i3a(otherEntity, functionalMarginRule, penetration);\n };\n protoOf(FunctionalMarginWarning).hashCode = function () {\n var result = this.otherEntity.hashCode();\n result = imul(result, 31) + hashCode(this.functionalMarginRule) | 0;\n result = imul(result, 31) + this.penetration.hashCode() | 0;\n return result;\n };\n protoOf(FunctionalMarginWarning).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof FunctionalMarginWarning))\n return false;\n var tmp0_other_with_cast = other instanceof FunctionalMarginWarning ? other : THROW_CCE();\n if (!this.otherEntity.equals(tmp0_other_with_cast.otherEntity))\n return false;\n if (!equals(this.functionalMarginRule, tmp0_other_with_cast.functionalMarginRule))\n return false;\n if (!this.penetration.equals(tmp0_other_with_cast.penetration))\n return false;\n return true;\n };\n function FunctionalZone(id, layer, polyhedron) {\n this.id = id;\n this.layer = layer;\n this.polyhedron = polyhedron;\n }\n protoOf(FunctionalZone).s1k = function () {\n return this.id;\n };\n protoOf(FunctionalZone).j3a = function () {\n return this.layer;\n };\n protoOf(FunctionalZone).i1n = function () {\n return this.polyhedron;\n };\n protoOf(FunctionalZone).af = function () {\n return this.id;\n };\n protoOf(FunctionalZone).bf = function () {\n return this.layer;\n };\n protoOf(FunctionalZone).g1k = function () {\n return this.polyhedron;\n };\n protoOf(FunctionalZone).k3a = function (id, layer, polyhedron) {\n return new FunctionalZone(id, layer, polyhedron);\n };\n protoOf(FunctionalZone).copy = function (id, layer, polyhedron, $super) {\n id = id === VOID ? this.id : id;\n layer = layer === VOID ? this.layer : layer;\n polyhedron = polyhedron === VOID ? this.polyhedron : polyhedron;\n return this.k3a(id, layer, polyhedron);\n };\n protoOf(FunctionalZone).toString = function () {\n return 'FunctionalZone(id=' + this.id + ', layer=' + this.layer + ', polyhedron=' + this.polyhedron + ')';\n };\n protoOf(FunctionalZone).hashCode = function () {\n var result = getStringHashCode(this.id);\n result = imul(result, 31) + getStringHashCode(this.layer) | 0;\n result = imul(result, 31) + hashCode(this.polyhedron) | 0;\n return result;\n };\n protoOf(FunctionalZone).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof FunctionalZone))\n return false;\n var tmp0_other_with_cast = other instanceof FunctionalZone ? other : THROW_CCE();\n if (!(this.id === tmp0_other_with_cast.id))\n return false;\n if (!(this.layer === tmp0_other_with_cast.layer))\n return false;\n if (!equals(this.polyhedron, tmp0_other_with_cast.polyhedron))\n return false;\n return true;\n };\n function Companion_45() {\n this.id = 121;\n }\n protoOf(Companion_45).s1k = function () {\n return this.id;\n };\n var Companion_instance_78;\n function Companion_getInstance_54() {\n return Companion_instance_78;\n }\n function FunctionalZonesLocalComponent(zones) {\n this.zones = zones;\n }\n protoOf(FunctionalZonesLocalComponent).l3a = function () {\n return this.zones;\n };\n protoOf(FunctionalZonesLocalComponent).x1k = function () {\n return 121;\n };\n protoOf(FunctionalZonesLocalComponent).eq = function (other) {\n var o = other instanceof FunctionalZonesLocalComponent ? other : THROW_CCE();\n return contentEquals(o.zones, this.zones);\n };\n protoOf(FunctionalZonesLocalComponent).equals = function (other) {\n var tmp;\n if (other instanceof FunctionalZonesLocalComponent) {\n tmp = this.eq(other);\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(FunctionalZonesLocalComponent).hashCode = function () {\n return contentHashCode(this.zones);\n };\n protoOf(FunctionalZonesLocalComponent).getWorldSpaceZones = function (transform) {\n // Inline function 'com.ikea.core.utils.mapToArray' call\n var this_0 = this.zones;\n // Inline function 'kotlin.arrayOfNulls' call\n var size = this_0.length;\n var arr = fillArrayVal(Array(size), null);\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.functionalzones.FunctionalZonesLocalComponent.getWorldSpaceZones.' call\n var zone = this_0[i];\n arr[i] = new FunctionalZone(zone.id, zone.layer, zone.polyhedron.transform(transform));\n }\n while (inductionVariable <= last);\n var tmp$ret$2 = isArray(arr) ? arr : THROW_CCE();\n return new FunctionalZonesWorldComponent(tmp$ret$2);\n };\n function Companion_46() {\n this.ID = 'FunctionalZonesLocalToWorldSystem';\n }\n protoOf(Companion_46).u1n = function () {\n return this.ID;\n };\n var Companion_instance_79;\n function Companion_getInstance_55() {\n return Companion_instance_79;\n }\n function updateFunctionalZonesInWorldSpace($this, entity) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(121);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.functionalzones.FunctionalZonesLocalToWorldSystem.updateFunctionalZonesInWorldSpace.' call\n var worldSpaceZonesComponent = tmp0_safe_receiver.getWorldSpaceZones(get_worldTransform(entity));\n $this.entityManager.addComponent(entity, worldSpaceZonesComponent);\n }\n }\n function FunctionalZonesLocalToWorldSystem(entityManager) {\n SystemBase2.call(this, 'FunctionalZonesLocalToWorldSystem', 10, 121);\n this.entityManager = entityManager;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.u3a_1 = [122];\n var tmp_0 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0.v3a_1 = ['TransformSystem'];\n }\n protoOf(FunctionalZonesLocalToWorldSystem).p1i = function () {\n return this.entityManager;\n };\n protoOf(FunctionalZonesLocalToWorldSystem).w1o = function () {\n return this.u3a_1;\n };\n protoOf(FunctionalZonesLocalToWorldSystem).x1o = function () {\n return this.v3a_1;\n };\n protoOf(FunctionalZonesLocalToWorldSystem).onAddComponent = function (entity, newComponent) {\n updateFunctionalZonesInWorldSpace(this, entity);\n };\n protoOf(FunctionalZonesLocalToWorldSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n updateFunctionalZonesInWorldSpace(this, entity);\n };\n protoOf(FunctionalZonesLocalToWorldSystem).onRemoveComponent = function (entity, oldComponent) {\n updateFunctionalZonesInWorldSpace(this, entity);\n };\n protoOf(FunctionalZonesLocalToWorldSystem).onAddComponent2 = function (entity, newComponent) {\n updateFunctionalZonesInWorldSpace(this, entity);\n };\n protoOf(FunctionalZonesLocalToWorldSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n updateFunctionalZonesInWorldSpace(this, entity);\n };\n protoOf(FunctionalZonesLocalToWorldSystem).onRemoveComponent2 = function (entity, oldComponent) {\n this.entityManager.removeComponent(entity, 122);\n };\n function Companion_47() {\n this.id = 122;\n }\n protoOf(Companion_47).s1k = function () {\n return this.id;\n };\n var Companion_instance_80;\n function Companion_getInstance_56() {\n return Companion_instance_80;\n }\n function FunctionalZonesWorldComponent(zones) {\n this.zones = zones;\n }\n protoOf(FunctionalZonesWorldComponent).l3a = function () {\n return this.zones;\n };\n protoOf(FunctionalZonesWorldComponent).x1k = function () {\n return 122;\n };\n protoOf(FunctionalZonesWorldComponent).eq = function (other) {\n var o = other instanceof FunctionalZonesWorldComponent ? other : THROW_CCE();\n return contentEquals(o.zones, this.zones);\n };\n protoOf(FunctionalZonesWorldComponent).equals = function (other) {\n var tmp;\n if (other instanceof FunctionalZonesWorldComponent) {\n tmp = this.eq(other);\n } else {\n tmp = false;\n }\n return tmp;\n };\n protoOf(FunctionalZonesWorldComponent).hashCode = function () {\n return contentHashCode(this.zones);\n };\n function setChildrenFromParents($this, productsData) {\n // Inline function 'kotlin.collections.mutableMapOf' call\n var childrenMap = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = productsData.length;\n while (inductionVariable < last) {\n var element = productsData[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.setChildrenFromParents.' call\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = element.parents;\n var inductionVariable_0 = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.setChildrenFromParents..' call\n var childrenList = childrenMap.b3(element_0.id);\n if (childrenList == null) {\n // Inline function 'kotlin.collections.set' call\n var key = element_0.id;\n var value = mutableListOf([element.entity]);\n childrenMap.r2(key, value);\n } else {\n childrenList.q(element.entity);\n }\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(productsData.length);\n var inductionVariable_1 = 0;\n var last_1 = productsData.length;\n while (inductionVariable_1 < last_1) {\n var item = productsData[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.setChildrenFromParents.' call\n var tmp0_safe_receiver = childrenMap.b3(item.entity.id);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp = copyToArray(tmp0_safe_receiver);\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var children = tmp_0;\n var tmp$ret$3 = item.copy(VOID, VOID, VOID, children);\n destination.q(tmp$ret$3);\n }\n return copyToArray(destination);\n }\n function createIntegerIds($this, productsData) {\n var nextId = 1;\n // Inline function 'kotlin.collections.associate' call\n var capacity = coerceAtLeast(mapCapacity(productsData.length), 16);\n // Inline function 'kotlin.collections.associateTo' call\n var destination = LinkedHashMap_init_$Create$_0(capacity);\n var inductionVariable = 0;\n var last = productsData.length;\n while (inductionVariable < last) {\n var element = productsData[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.plusAssign' call\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.createIntegerIds.' call\n var newId = nextId;\n nextId = nextId + 1 | 0;\n var pair = to(element.entity.id, newId);\n destination.r2(pair.ye_1, pair.ze_1);\n }\n var entityIdToIntId = destination;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(productsData.length);\n var inductionVariable_0 = 0;\n var last_0 = productsData.length;\n while (inductionVariable_0 < last_0) {\n var item = productsData[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.createIntegerIds.' call\n var tmp0_elvis_lhs = entityIdToIntId.b3(item.entity.id);\n var tmp1_id = tmp0_elvis_lhs == null ? 1 : tmp0_elvis_lhs;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_0 = item.children;\n var destination_1 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_1 = 0;\n var last_1 = this_0.length;\n while (inductionVariable_1 < last_1) {\n var element_0 = this_0[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.createIntegerIds..' call\n var tmp0_safe_receiver = entityIdToIntId.b3(element_0.id);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_1.q(tmp0_safe_receiver);\n }\n }\n var tmp2_children_ids = copyToArray(destination_1);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_1 = item.parents;\n var destination_2 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_2 = 0;\n var last_2 = this_1.length;\n while (inductionVariable_2 < last_2) {\n var element_1 = this_1[inductionVariable_2];\n inductionVariable_2 = inductionVariable_2 + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.createIntegerIds..' call\n var tmp0_safe_receiver_0 = entityIdToIntId.b3(element_1.id);\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_2.q(tmp0_safe_receiver_0);\n }\n }\n var tmp3_parent_ids = copyToArray(destination_2);\n var tmp$ret$13 = item.copy(tmp1_id, VOID, VOID, VOID, tmp3_parent_ids, tmp2_children_ids);\n destination_0.q(tmp$ret$13);\n }\n return copyToArray(destination_0);\n }\n function dataForEntity($this, entity, includedEntities) {\n var tmp = getParents($this, entity, includedEntities);\n // Inline function 'kotlin.emptyArray' call\n var tmp_0 = [];\n // Inline function 'kotlin.emptyArray' call\n var tmp_1 = [];\n // Inline function 'kotlin.emptyArray' call\n var tmp_2 = [];\n var tmp0_safe_receiver = get_colliderShapeComponent(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.polyhedron;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.axisAlignedBoundingBox;\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.size;\n return new ICFProductData(0, entity, tmp, tmp_0, tmp_1, tmp_2, tmp3_elvis_lhs == null ? Companion_getInstance_4().ZERO : tmp3_elvis_lhs, get_worldTransform(entity));\n }\n function getParents($this, entity, includedEntities) {\n var tmp;\n // Inline function 'kotlin.collections.isEmpty' call\n if (get_guestConnections(entity).length === 0) {\n tmp = getParentIdsFromChildCompoment($this, entity, includedEntities);\n } else {\n tmp = getParentIdsFromConnections($this, get_guestConnections(entity), includedEntities);\n }\n return tmp;\n }\n function getParentIdsFromChildCompoment($this, entity, includedEntities) {\n var tmp0_elvis_lhs = get_parent(entity);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n return [];\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var parent = tmp;\n var tmp_0;\n if (contains(includedEntities, parent.id)) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = [parent];\n } else {\n tmp_0 = getParents($this, parent, includedEntities);\n }\n return tmp_0;\n }\n function getParentIdsFromConnections($this, allParentConnections, includedEntities) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.distinctBy' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(allParentConnections.length);\n var inductionVariable = 0;\n var last = allParentConnections.length;\n while (inductionVariable < last) {\n var item = allParentConnections[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.getParentIdsFromConnections.' call\n var tmp$ret$0 = item.hostConnectorEntity;\n destination.q(tmp$ret$0);\n }\n var set = HashSet_init_$Create$();\n var list = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var e = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.getParentIdsFromConnections.' call\n var key = e.id;\n if (set.q(key)) {\n list.q(e);\n }\n }\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = list.t();\n while (tmp0_iterator_0.u()) {\n var element = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.getParentIdsFromConnections.' call\n var tmp;\n if (contains(includedEntities, element.id)) {\n tmp = listOf(element);\n } else {\n tmp = toList(getParents($this, element, includedEntities));\n }\n var list_0 = tmp;\n addAll_0(destination_0, list_0);\n }\n return copyToArray(destination_0);\n }\n function Companion_48() {\n Companion_instance_81 = this;\n this.logger = LoggerState_getInstance().m1m('ICFDataService');\n }\n protoOf(Companion_48).x1i = function () {\n return this.logger;\n };\n var Companion_instance_81;\n function Companion_getInstance_57() {\n if (Companion_instance_81 == null)\n new Companion_48();\n return Companion_instance_81;\n }\n function ICFDataService$getICFDataForEntities$lambda($entitiesNotInScene) {\n return function () {\n return 'One or more entities passed could not be found in scene: ' + $entitiesNotInScene;\n };\n }\n function ICFDataService(sceneManager) {\n Companion_getInstance_57();\n this.sceneManager = sceneManager;\n }\n protoOf(ICFDataService).q1i = function () {\n return this.sceneManager;\n };\n protoOf(ICFDataService).getICFDataForEntities = function (entityIds) {\n var entitiesInScene = this.sceneManager.entities;\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(entitiesInScene.length);\n var inductionVariable = 0;\n var last = entitiesInScene.length;\n while (inductionVariable < last) {\n var item = entitiesInScene[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.getICFDataForEntities.' call\n var tmp$ret$0 = item.id;\n destination.q(tmp$ret$0);\n }\n var entityIdsInScene = destination;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = entityIds.length;\n while (inductionVariable_0 < last_0) {\n var element = entityIds[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.getICFDataForEntities.' call\n if (!entityIdsInScene.p(element)) {\n destination_0.q(element);\n }\n }\n var entitiesNotInScene = destination_0;\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!entitiesNotInScene.b1()) {\n var tmp = Companion_getInstance_57().logger;\n tmp.error(ICFDataService$getICFDataForEntities$lambda(entitiesNotInScene));\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.sceneManager.entities;\n var destination_1 = ArrayList_init_$Create$();\n var inductionVariable_1 = 0;\n var last_1 = this_0.length;\n while (inductionVariable_1 < last_1) {\n var element_0 = this_0[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.getICFDataForEntities.' call\n if (contains(entityIds, element_0.id)) {\n destination_1.q(element_0);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_1, 10));\n var tmp0_iterator = destination_1.t();\n while (tmp0_iterator.u()) {\n var item_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.icf.ICFDataService.getICFDataForEntities.' call\n var tmp$ret$10 = dataForEntity(this, item_0, entityIds);\n destination_2.q(tmp$ret$10);\n }\n var productsData = copyToArray(destination_2);\n var dataWithChildren = setChildrenFromParents(this, productsData);\n return createIntegerIds(this, dataWithChildren);\n };\n function ICFProductData(id, entity, parents, children, parent_ids, children_ids, colliderDimensions, transform) {\n this.id = id;\n this.entity = entity;\n this.parents = parents;\n this.children = children;\n this.parent_ids = parent_ids;\n this.children_ids = children_ids;\n this.colliderDimensions = colliderDimensions;\n this.transform = transform;\n this.w3a_1 = 0;\n }\n protoOf(ICFProductData).s1k = function () {\n return this.id;\n };\n protoOf(ICFProductData).r23 = function () {\n return this.entity;\n };\n protoOf(ICFProductData).x3a = function () {\n return this.parents;\n };\n protoOf(ICFProductData).c1k = function () {\n return this.children;\n };\n protoOf(ICFProductData).y3a = function () {\n return this.parent_ids;\n };\n protoOf(ICFProductData).z3a = function () {\n return this.children_ids;\n };\n protoOf(ICFProductData).a3b = function () {\n return this.colliderDimensions;\n };\n protoOf(ICFProductData).d1x = function () {\n return this.transform;\n };\n protoOf(ICFProductData).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof ICFProductData))\n THROW_CCE();\n return this.entity.id === other.entity.id;\n };\n protoOf(ICFProductData).hashCode = function () {\n if (this.w3a_1 === 0) {\n this.w3a_1 = this.entity.id;\n }\n return this.w3a_1;\n };\n protoOf(ICFProductData).af = function () {\n return this.id;\n };\n protoOf(ICFProductData).bf = function () {\n return this.entity;\n };\n protoOf(ICFProductData).g1k = function () {\n return this.parents;\n };\n protoOf(ICFProductData).h1k = function () {\n return this.children;\n };\n protoOf(ICFProductData).i1k = function () {\n return this.parent_ids;\n };\n protoOf(ICFProductData).j1k = function () {\n return this.children_ids;\n };\n protoOf(ICFProductData).k1k = function () {\n return this.colliderDimensions;\n };\n protoOf(ICFProductData).p1z = function () {\n return this.transform;\n };\n protoOf(ICFProductData).b3b = function (id, entity, parents, children, parent_ids, children_ids, colliderDimensions, transform) {\n return new ICFProductData(id, entity, parents, children, parent_ids, children_ids, colliderDimensions, transform);\n };\n protoOf(ICFProductData).copy = function (id, entity, parents, children, parent_ids, children_ids, colliderDimensions, transform, $super) {\n id = id === VOID ? this.id : id;\n entity = entity === VOID ? this.entity : entity;\n parents = parents === VOID ? this.parents : parents;\n children = children === VOID ? this.children : children;\n parent_ids = parent_ids === VOID ? this.parent_ids : parent_ids;\n children_ids = children_ids === VOID ? this.children_ids : children_ids;\n colliderDimensions = colliderDimensions === VOID ? this.colliderDimensions : colliderDimensions;\n transform = transform === VOID ? this.transform : transform;\n return this.b3b(id, entity, parents, children, parent_ids, children_ids, colliderDimensions, transform);\n };\n protoOf(ICFProductData).toString = function () {\n return 'ICFProductData(id=' + this.id + ', entity=' + this.entity + ', parents=' + toString(this.parents) + ', children=' + toString(this.children) + ', parent_ids=' + toString(this.parent_ids) + ', children_ids=' + toString(this.children_ids) + ', colliderDimensions=' + this.colliderDimensions + ', transform=' + this.transform + ')';\n };\n function Companion_49() {\n this.id = 112;\n }\n protoOf(Companion_49).s1k = function () {\n return this.id;\n };\n var Companion_instance_82;\n function Companion_getInstance_58() {\n return Companion_instance_82;\n }\n function LabelComponent(text) {\n this.text = text;\n }\n protoOf(LabelComponent).c3b = function () {\n return this.text;\n };\n protoOf(LabelComponent).x1k = function () {\n return 112;\n };\n protoOf(LabelComponent).eq = function (other) {\n return this.text === (other instanceof LabelComponent ? other : THROW_CCE()).text;\n };\n function DebugLogger(level, levelToThrowException) {\n level = level === VOID ? LogLevel_DEBUG_getInstance() : level;\n levelToThrowException = levelToThrowException === VOID ? LogLevel_ERROR_getInstance() : levelToThrowException;\n this.d3b_1 = level;\n this.levelToThrowException = levelToThrowException;\n this.latestLoggedMessage = null;\n }\n protoOf(DebugLogger).d2b = function (_set____db54di) {\n this.d3b_1 = _set____db54di;\n };\n protoOf(DebugLogger).e2b = function () {\n return this.d3b_1;\n };\n protoOf(DebugLogger).e3b = function (_set____db54di) {\n this.levelToThrowException = _set____db54di;\n };\n protoOf(DebugLogger).f3b = function () {\n return this.levelToThrowException;\n };\n protoOf(DebugLogger).g3b = function (newLevel) {\n this.levelToThrowException = values()[newLevel];\n };\n protoOf(DebugLogger).h3b = function () {\n return this.levelToThrowException.x9_1;\n };\n protoOf(DebugLogger).i3b = function (_set____db54di) {\n this.latestLoggedMessage = _set____db54di;\n };\n protoOf(DebugLogger).j3b = function () {\n return this.latestLoggedMessage;\n };\n protoOf(DebugLogger).debug = function (f) {\n if (this.d3b_1.y9(LogLevel_DEBUG_getInstance()) <= 0) {\n this.latestLoggedMessage = f();\n echoStandardConsole(this.latestLoggedMessage);\n }\n if (this.levelToThrowException.y9(LogLevel_DEBUG_getInstance()) <= 0)\n throw new LoggerException(toString_0(f()));\n };\n protoOf(DebugLogger).error = function (f) {\n if (this.d3b_1.y9(LogLevel_ERROR_getInstance()) <= 0) {\n this.latestLoggedMessage = f();\n echoStandardConsole(this.latestLoggedMessage);\n }\n if (this.levelToThrowException.y9(LogLevel_ERROR_getInstance()) <= 0)\n throw new LoggerException(toString_0(f()));\n };\n protoOf(DebugLogger).warn = function (f) {\n if (this.d3b_1.y9(LogLevel_WARN_getInstance()) <= 0) {\n this.latestLoggedMessage = f();\n echoStandardConsole(this.latestLoggedMessage);\n }\n if (this.levelToThrowException.y9(LogLevel_WARN_getInstance()) <= 0)\n throw new LoggerException(toString_0(f()));\n };\n protoOf(DebugLogger).info = function (f) {\n if (this.d3b_1.y9(LogLevel_INFO_getInstance()) <= 0) {\n this.latestLoggedMessage = f();\n echoStandardConsole(this.latestLoggedMessage);\n }\n if (this.levelToThrowException.y9(LogLevel_INFO_getInstance()) <= 0)\n throw new LoggerException(toString_0(f()));\n };\n function LoggerException(msg) {\n msg = msg === VOID ? null : msg;\n Exception_init_$Init$(msg, this);\n captureStack(this, LoggerException);\n }\n function Companion_50() {\n this.id = 114;\n }\n protoOf(Companion_50).s1k = function () {\n return this.id;\n };\n var Companion_instance_83;\n function Companion_getInstance_59() {\n return Companion_instance_83;\n }\n function ColoredOutlineComponent(r, g, b) {\n r = r === VOID ? 0.0 : r;\n g = g === VOID ? 0.0 : g;\n b = b === VOID ? 1.0 : b;\n this.r = r;\n this.g = g;\n this.b = b;\n }\n protoOf(ColoredOutlineComponent).k3b = function () {\n return this.r;\n };\n protoOf(ColoredOutlineComponent).l3b = function () {\n return this.g;\n };\n protoOf(ColoredOutlineComponent).m3b = function () {\n return this.b;\n };\n protoOf(ColoredOutlineComponent).x1k = function () {\n return 114;\n };\n protoOf(ColoredOutlineComponent).eq = function (other) {\n var tmp;\n var tmp_0;\n if ((other instanceof ColoredOutlineComponent ? other : THROW_CCE()).r === this.r) {\n tmp_0 = other.g === this.g;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = other.b === this.b;\n } else {\n tmp = false;\n }\n return tmp;\n };\n function ColoredOutlineSystem() {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n SystemBase.call(this, 'ColoredOutlineSystem', 114, tmp$ret$0);\n }\n protoOf(ColoredOutlineSystem).onAddComponent = function (entity, newComponent) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = hierarchyExceptSubTreesWithComponentSequence(entity, 28).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.outlines.ColoredOutlineSystem.onAddComponent.' call\n var tmp0_safe_receiver = get_viewerObject(element);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n tmp0_safe_receiver.setOutlined(true);\n tmp0_safe_receiver.setOutlinedObjectColor(newComponent.r, newComponent.g, newComponent.b);\n }\n }\n };\n protoOf(ColoredOutlineSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n this.onAddComponent(entity, newComponent);\n };\n protoOf(ColoredOutlineSystem).onRemoveComponent = function (entity, oldComponent) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = hierarchyExceptSubTreesWithComponentSequence(entity, 28).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.outlines.ColoredOutlineSystem.onRemoveComponent.' call\n var tmp0_safe_receiver = get_viewerObject(element);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n tmp0_safe_receiver.removeOutlinedObjectColor();\n tmp0_safe_receiver.setOutlined(get_isSelected(entity));\n }\n }\n };\n function Companion_51() {\n this.id = 111;\n }\n protoOf(Companion_51).s1k = function () {\n return this.id;\n };\n var Companion_instance_84;\n function Companion_getInstance_60() {\n return Companion_instance_84;\n }\n function OutlineBlockingComponent() {\n }\n protoOf(OutlineBlockingComponent).x1k = function () {\n return 111;\n };\n protoOf(OutlineBlockingComponent).eq = function (other) {\n return true;\n };\n function Companion_52() {\n this.ID = 'OutlineEntityGroupDeselectSystem';\n }\n protoOf(Companion_52).u1n = function () {\n return this.ID;\n };\n var Companion_instance_85;\n function Companion_getInstance_61() {\n return Companion_instance_85;\n }\n function removeOutlineFromMembers($this, newComponent) {\n var indexedObject = newComponent.members;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var member = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var tmp;\n if (!member.hasComponent(SelectedComponent_instance.id)) {\n tmp = member.hasComponent(14);\n } else {\n tmp = false;\n }\n if (tmp) {\n member.removeComponent(14);\n }\n }\n }\n function OutlineEntityGroupDeselectSystem(entityManager) {\n Companion_getInstance();\n SystemBase.call(this, 'OutlineEntityGroupDeselectSystem', 38);\n this.entityManager = entityManager;\n }\n protoOf(OutlineEntityGroupDeselectSystem).p1i = function () {\n return this.entityManager;\n };\n protoOf(OutlineEntityGroupDeselectSystem).onAddComponent = function (entity, newComponent) {\n removeOutlineFromMembers(this, newComponent);\n };\n protoOf(OutlineEntityGroupDeselectSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n removeOutlineFromMembers(this, newComponent);\n };\n protoOf(OutlineEntityGroupDeselectSystem).onRemoveComponent = function (entity, oldComponent) {\n };\n function Companion_53() {\n this.ID = 'OutlineSelectedSystem';\n }\n protoOf(Companion_53).u1n = function () {\n return this.ID;\n };\n var Companion_instance_86;\n function Companion_getInstance_62() {\n return Companion_instance_86;\n }\n function OutlineSelectedSystem() {\n SystemBase.call(this, 'OutlineSelectedSystem', SelectedComponent_instance.id);\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.d3c_1 = [14];\n }\n protoOf(OutlineSelectedSystem).onAddComponent = function (entity, newComponent) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = hierarchyExceptSubTreesWithComponentSequence(entity, 0).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.outlines.OutlineSelectedSystem.onAddComponent.' call\n if (element.hasComponent(57)) {\n element.addComponent(new OutlinedComponent());\n }\n }\n };\n protoOf(OutlineSelectedSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(OutlineSelectedSystem).onRemoveComponent = function (entity, oldComponent) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = hierarchyExceptSubTreesWithComponentSequence(entity, 0).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.outlines.OutlineSelectedSystem.onRemoveComponent.' call\n element.removeComponent(14);\n }\n };\n protoOf(OutlineSelectedSystem).w1o = function () {\n return this.d3c_1;\n };\n function onStartedDragging_0($this, entity) {\n setBlockingOnEntity($this, entity, false);\n }\n function onStoppedDragging_0($this, entity) {\n updateOutline($this, entity);\n }\n function updateOutline($this, childEntity) {\n var doOutline = hasComponentInUpwardsHierarchy(childEntity, 14);\n outlineEntity($this, childEntity, doOutline);\n setBlockingOnEntity($this, childEntity, !doOutline);\n }\n function handleChildComponentChanged($this, childEntity, any) {\n updateOutline($this, childEntity);\n }\n function handleChildComponentChanged_0($this, childEntity, any, newChildComponent) {\n handleChildComponentChanged($this, childEntity, newChildComponent);\n }\n function handleOutlineRemoved($this, entity, removed) {\n if (!hasComponentInUpwardsHierarchy(entity, 14)) {\n outlineEntity($this, entity, false);\n setBlockingOnEntity($this, entity, true);\n }\n }\n function handleOutlineAdded($this, entity, added) {\n outlineEntity($this, entity, true);\n setBlockingOnEntity($this, entity, false);\n }\n function outlineEntity($this, entity, doOutline) {\n outlineEntity$setOutlined(doOutline, entity);\n }\n function setBlockingOnEntity($this, entity, doBlock) {\n setBlockingOnEntity$setBlocking(doBlock, entity);\n }\n function outlineEntity$setOutlined($doOutline, sub) {\n var tmp0_safe_receiver = get_viewerObject(sub);\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver.setOutlined($doOutline);\n var tmp1_safe_receiver = get_parentComponent(sub);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.children;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.outlines.OutlineSystem.outlineEntity.setOutlined.' call\n if (!element.hasComponent(14)) {\n outlineEntity$setOutlined($doOutline, element);\n }\n }\n }\n }\n function setBlockingOnEntity$setBlocking($doBlock, sub) {\n var tmp0_safe_receiver = get_viewerObject(sub);\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver.setBlockOutlined($doBlock);\n var tmp1_safe_receiver = get_parentComponent(sub);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.children;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.outlines.OutlineSystem.setBlockingOnEntity.setBlocking.' call\n if (!element.hasComponent(14)) {\n setBlockingOnEntity$setBlocking($doBlock, element);\n }\n }\n }\n }\n function OutlineSystem() {\n // Inline function 'kotlin.emptyArray' call\n var tmp = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = ['HierarchySystem', 'SceneGraphSystem'];\n SystemBase4.call(this, 'OutlineSystem', 85, 14, 17, 20, tmp, tmp$ret$3, null);\n }\n protoOf(OutlineSystem).onAddComponent = function (entity, newComponent) {\n onStartedDragging_0(this, entity);\n };\n protoOf(OutlineSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(OutlineSystem).onRemoveComponent = function (entity, oldComponent) {\n onStoppedDragging_0(this, entity);\n };\n protoOf(OutlineSystem).onAddComponent2 = function (entity, newComponent) {\n handleOutlineAdded(this, entity, newComponent);\n };\n protoOf(OutlineSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n };\n protoOf(OutlineSystem).onRemoveComponent2 = function (entity, oldComponent) {\n handleOutlineRemoved(this, entity, oldComponent);\n };\n protoOf(OutlineSystem).onAddComponent3 = function (entity, newComponent) {\n handleChildComponentChanged(this, entity, newComponent);\n };\n protoOf(OutlineSystem).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n handleChildComponentChanged_0(this, entity, oldComponent, newComponent);\n };\n protoOf(OutlineSystem).onRemoveComponent3 = function (entity, oldComponent) {\n };\n protoOf(OutlineSystem).onAddComponent4 = function (entity, newComponent) {\n updateOutline(this, entity);\n };\n protoOf(OutlineSystem).onUpdateComponent4 = function (entity, oldComponent, newComponent) {\n updateOutline(this, entity);\n };\n protoOf(OutlineSystem).onRemoveComponent4 = function (entity, oldComponent) {\n };\n function Companion_54() {\n this.id = 14;\n }\n protoOf(Companion_54).s1k = function () {\n return this.id;\n };\n var Companion_instance_87;\n function Companion_getInstance_63() {\n return Companion_instance_87;\n }\n function OutlinedComponent() {\n }\n protoOf(OutlinedComponent).x1k = function () {\n return 14;\n };\n protoOf(OutlinedComponent).eq = function (other) {\n return true;\n };\n function moveTo($this, entity, position) {\n var tmp0_elvis_lhs = get_snapRoot(entity);\n var entityToMove = tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs;\n TransformUtils_instance.setWorldTransform(entityToMove, new Transform(position, get_worldRotation(entityToMove)));\n }\n function doPlacement($this, entityToPlace, hosts, sortByWarnings, sortAndSelectStrategy) {\n entityToPlace.addComponent(new AutoAdaptSessionComponent());\n $this.f3c_1.addComponent(entityToPlace, new SnapCandidateComponent());\n var snapValidationResult = tryFindValidSnap($this, hosts, entityToPlace, sortByWarnings, sortAndSelectStrategy);\n var placementResult = Companion_instance_88.fromValidSnapActionCandidateOrErrors(snapValidationResult);\n var tmp0_safe_receiver = snapValidationResult.snapActionCandidate;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.createAction();\n if (tmp1_safe_receiver == null)\n null;\n else {\n tmp1_safe_receiver.perform();\n }\n var tmp2_elvis_lhs = placementResult.placedEntity;\n var actualEntity = tmp2_elvis_lhs == null ? entityToPlace : tmp2_elvis_lhs;\n actualEntity.removeComponent(Companion_instance_21.id);\n actualEntity.removeComponent(125);\n return placementResult;\n }\n function doPlacement$default($this, entityToPlace, hosts, sortByWarnings, sortAndSelectStrategy, $super) {\n sortAndSelectStrategy = sortAndSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE : sortAndSelectStrategy;\n return doPlacement($this, entityToPlace, hosts, sortByWarnings, sortAndSelectStrategy);\n }\n function tryFindValidSnap($this, hosts, entityToPlace, sortByWarnings, sortAndSelectStrategy) {\n var tmp;\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(hosts.length === 0)) {\n tmp = tryFindFirstValidSnapResult($this, entityToPlace, hosts, sortByWarnings, sortAndSelectStrategy);\n } else {\n tmp = tryAllHosts($this, entityToPlace, sortByWarnings);\n }\n var result = tmp;\n return result;\n }\n function tryFindValidSnap$default($this, hosts, entityToPlace, sortByWarnings, sortAndSelectStrategy, $super) {\n sortAndSelectStrategy = sortAndSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE : sortAndSelectStrategy;\n return tryFindValidSnap($this, hosts, entityToPlace, sortByWarnings, sortAndSelectStrategy);\n }\n function tryFindFirstValidSnapResult($this, entityToPlace, hosts, sortByWarnings, sortAndSelectStrategy) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var allResults = ArrayList_init_$Create$();\n // Inline function 'kotlin.sequences.find' call\n var tmp = asSequence_0(hosts);\n var tmp_0 = map(tmp, AutoAdaptPlacementActor$tryFindFirstValidSnapResult$lambda($this, entityToPlace, sortByWarnings, sortAndSelectStrategy));\n var this_0 = onEach(tmp_0, AutoAdaptPlacementActor$tryFindFirstValidSnapResult$lambda_0(allResults));\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlin.sequences.firstOrNull' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryFindFirstValidSnapResult.' call\n if (element.valid) {\n tmp$ret$2 = element;\n break $l$block;\n }\n }\n tmp$ret$2 = null;\n }\n var goodResult = tmp$ret$2;\n if (!(goodResult == null))\n return goodResult;\n var tmp_1;\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!allResults.b1()) {\n // Inline function 'kotlin.collections.reduce' call\n var iterator = allResults.t();\n if (!iterator.u())\n throw UnsupportedOperationException_init_$Create$(\"Empty collection can't be reduced.\");\n var accumulator = iterator.w();\n while (iterator.u()) {\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryFindFirstValidSnapResult.' call\n var prevResult = accumulator;\n var nextResult = iterator.w();\n accumulator = prevResult.combineFailures(nextResult);\n }\n tmp_1 = accumulator;\n } else {\n // Inline function 'kotlin.emptyArray' call\n var tmp_2 = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$10 = [Companion_instance_0.fail('No hosts to snap to', get_productRef(entityToPlace), null)];\n tmp_1 = new ValidSnapActionCandidateOrErrors(null, tmp_2, tmp$ret$10);\n }\n return tmp_1;\n }\n function tryFindFirstValidSnapResult$default($this, entityToPlace, hosts, sortByWarnings, sortAndSelectStrategy, $super) {\n sortAndSelectStrategy = sortAndSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE : sortAndSelectStrategy;\n return tryFindFirstValidSnapResult($this, entityToPlace, hosts, sortByWarnings, sortAndSelectStrategy);\n }\n function tryAllHosts($this, entityToPlace, sortByWarnings) {\n var variants = get_variantEntities(entityToPlace);\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = $this.g3c_1.entities;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n if (element.hasComponent(127)) {\n destination.q(element);\n }\n }\n var allHosts = destination;\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = variants.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = variants[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n // Inline function 'kotlin.collections.asIterable' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator = allHosts.t();\n while (tmp0_iterator.u()) {\n var element_1 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts..' call\n var list = asSequence_0(SnapUtils_instance.matchingSnapActionCandidates(element_0, element_1, new SnapSettings(true, VOID, VOID, true)));\n addAll_1(destination_1, list);\n }\n var list_0 = destination_1;\n addAll_0(destination_0, list_0);\n }\n var snaps = destination_0;\n // Inline function 'kotlin.collections.sortedByDescending' call\n // Inline function 'kotlin.collections.sortedByDescending' call\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp = AutoAdaptPlacementActor$tryAllHosts$lambda;\n var tmp$ret$10 = new sam$kotlin_Comparator$0_4(tmp);\n var this_1 = sortedWith(snaps, tmp$ret$10);\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_0 = AutoAdaptPlacementActor$tryAllHosts$lambda_0($this);\n var tmp$ret$12 = new sam$kotlin_Comparator$0_4(tmp_0);\n var this_2 = sortedWith(this_1, tmp$ret$12);\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp_1 = AutoAdaptPlacementActor$tryAllHosts$lambda_1;\n var tmp$ret$14 = new sam$kotlin_Comparator$0_4(tmp_1);\n var this_3 = sortedWith(this_2, tmp$ret$14);\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp_2 = AutoAdaptPlacementActor$tryAllHosts$lambda_2(entityToPlace);\n var tmp$ret$16 = new sam$kotlin_Comparator$0_4(tmp_2);\n var sortedSnaps = sortedWith(this_3, tmp$ret$16);\n var goodResult = null;\n var warningResult = null;\n var failedResult = null;\n // Inline function 'kotlin.collections.find' call\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator_0 = sortedSnaps.t();\n while (tmp0_iterator_0.u()) {\n var element_2 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n if (goodResult == null) {\n var myResult = $this.i3c_1.evaluateSnapCandidate(element_2);\n if (myResult.valid) {\n var tmp_3;\n if (!sortByWarnings) {\n tmp_3 = true;\n } else {\n // Inline function 'kotlin.collections.isEmpty' call\n tmp_3 = myResult.warnings.length === 0;\n }\n if (tmp_3) {\n goodResult = myResult;\n } else {\n if (warningResult == null ? true : myResult.warnings.length < ensureNotNull(warningResult).warnings.length) {\n warningResult = myResult;\n }\n }\n } else {\n var tmp0_safe_receiver = failedResult;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.combineFailures(myResult);\n failedResult = tmp1_elvis_lhs == null ? myResult : tmp1_elvis_lhs;\n }\n }\n if (!(goodResult == null)) {\n break $l$block;\n }\n }\n }\n var tmp$ret$31;\n $l$block_2: {\n // Inline function 'com.ikea.core.utils.otherwise' call\n var this_4 = goodResult;\n if (this_4 == null) {\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n var tmp$ret$29;\n $l$block_1: {\n // Inline function 'com.ikea.core.utils.otherwise' call\n var this_5 = warningResult;\n if (this_5 == null) {\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts..' call\n var tmp$ret$27;\n $l$block_0: {\n // Inline function 'com.ikea.core.utils.otherwise' call\n var this_6 = failedResult;\n if (this_6 == null) {\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts...' call\n // Inline function 'kotlin.emptyArray' call\n var tmp_4 = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$25 = [Companion_instance_0.fail('No hosts to snap to', get_productRef(entityToPlace), null)];\n tmp$ret$27 = new ValidSnapActionCandidateOrErrors(null, tmp_4, tmp$ret$25);\n break $l$block_0;\n }\n tmp$ret$27 = this_6;\n }\n tmp$ret$29 = tmp$ret$27;\n break $l$block_1;\n }\n tmp$ret$29 = this_5;\n }\n tmp$ret$31 = tmp$ret$29;\n break $l$block_2;\n }\n tmp$ret$31 = this_4;\n }\n return tmp$ret$31;\n }\n function recommendationDistance($this, candidate) {\n var result = Companion_getInstance_4().ZERO;\n var tmp = candidate.guestRoot;\n var tmp0_safe_receiver = tmp.__getComponentForKotlin(59);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.math.absoluteValue' call\n var this_0 = tmp0_safe_receiver.offsetY - candidate.endTransform.position.Y;\n var diff = Math.abs(this_0);\n result = new Vector(0.0, diff, 0.0);\n }\n var tmp_0 = candidate.guestRoot;\n if (tmp_0.__getComponentForKotlin(60) == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n $this.j3c_1.warn(AutoAdaptPlacementActor$recommendationDistance$lambda);\n }\n return result;\n }\n function sam$kotlin_Comparator$0_4(function_0) {\n this.k3c_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_4).u1j = function (a, b) {\n return this.k3c_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_4).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function AutoAdaptPlacementActor$tryFindFirstValidSnapResult$lambda(this$0, $entityToPlace, $sortByWarnings, $sortAndSelectStrategy) {\n return function (it) {\n return this$0.e3c_1.findValidSnapActionWithAutoAdapt($entityToPlace, it, new SnapSettings($sortByWarnings, VOID, VOID, $sortByWarnings), $sortByWarnings, $sortAndSelectStrategy);\n };\n }\n function AutoAdaptPlacementActor$tryFindFirstValidSnapResult$lambda_0($allResults) {\n return function (it) {\n $allResults.q(it);\n return Unit_instance;\n };\n }\n function AutoAdaptPlacementActor$tryAllHosts$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n var tmp = a.movement.size;\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n var tmp$ret$1 = b.movement.size;\n return compareValues(tmp, tmp$ret$1);\n }\n function AutoAdaptPlacementActor$tryAllHosts$lambda_0(this$0) {\n return function (a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n var tmp = recommendationDistance(this$0, a).size;\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n var tmp$ret$1 = recommendationDistance(this$0, b).size;\n return compareValues(tmp, tmp$ret$1);\n };\n }\n function AutoAdaptPlacementActor$tryAllHosts$lambda_1(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n var tmp = b.priority;\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n var tmp$ret$1 = a.priority;\n return compareValues(tmp, tmp$ret$1);\n }\n function AutoAdaptPlacementActor$tryAllHosts$lambda_2($entityToPlace) {\n return function (a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n var tmp = b.guest.equals($entityToPlace);\n // Inline function 'com.ikea.core.stl.placement.AutoAdaptPlacementActor.tryAllHosts.' call\n var tmp$ret$1 = a.guest.equals($entityToPlace);\n return compareValues(tmp, tmp$ret$1);\n };\n }\n function AutoAdaptPlacementActor$recommendationDistance$lambda() {\n return 'PositionFromParent is not yet implemented';\n }\n function AutoAdaptPlacementActor(autoAdaptService, entityManager, sceneManager, productManager, validationService) {\n this.e3c_1 = autoAdaptService;\n this.f3c_1 = entityManager;\n this.g3c_1 = sceneManager;\n this.h3c_1 = productManager;\n this.i3c_1 = validationService;\n this.j3c_1 = LoggerState_getInstance().m1m('AutoAdaptPlacementActor');\n }\n protoOf(AutoAdaptPlacementActor).autoAdaptToScene = function (entityToPlace, sortAndSelectStrategy) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n return doPlacement(this, entityToPlace, tmp$ret$0, true, sortAndSelectStrategy);\n };\n protoOf(AutoAdaptPlacementActor).autoAdaptToPosition = function (entityToPlace, initialPosition, sortByWarnings, sortAndSelectStrategy) {\n moveTo(this, entityToPlace, initialPosition);\n var hosts = this.e3c_1.findAutoAdaptHostsContainingPoint(entityToPlace, initialPosition);\n return doPlacement(this, entityToPlace, hosts, sortByWarnings, sortAndSelectStrategy);\n };\n protoOf(AutoAdaptPlacementActor).autoAdaptToHost = function (entityToPlace, host, sortAndSelectStrategy) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [host];\n return doPlacement(this, entityToPlace, tmp$ret$2, true, sortAndSelectStrategy);\n };\n protoOf(AutoAdaptPlacementActor).autoAdaptToTargets = function (entityToPlace, targets, sortAndSelectStrategy) {\n return doPlacement(this, entityToPlace, targets, true, sortAndSelectStrategy);\n };\n function trySnap($this, coreServices, snapActionCandidates, guest) {\n var validSnaps = SpaceFinderUtils_getInstance().getNewValidCandidatesOnSameConnectorsUsingSearchDirections(coreServices.validations, snapActionCandidates, 5);\n var bestValidResult = $this.l3c_1.bestResult(validSnaps);\n var bestValidCandidate = bestValidResult == null ? null : bestValidResult.snapActionCandidate;\n if (bestValidCandidate == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n bestValidCandidate.createAction().perform();\n return Companion_instance_88.fromValidSnapActionCandidateOrErrors(bestValidResult);\n }\n var topCandidate = $this.l3c_1.bestCandidate(snapActionCandidates);\n if (!(topCandidate == null)) {\n var failedResult = coreServices.validations.evaluateSnapCandidate(topCandidate, false);\n return Companion_instance_88.fromValidSnapActionCandidateOrErrors(failedResult);\n }\n return Companion_instance_88.failWithMessage('No valid snap found', get_productRefOrEmptyString(guest));\n }\n function PlacementHelper() {\n PlacementHelper_instance = this;\n this.l3c_1 = (new SnapSorterBuilder()).addConnectorPriorityCriterion(Companion_getInstance_69().all).addOriginalVariantCriterion().addDistanceCriterion().build();\n }\n protoOf(PlacementHelper).snapToScene = function (guest, coreServices) {\n var snapActionCandidates = AutoAdaptUtils_getInstance().getAutoAdaptCandidatesInHierarchy(guest, coreServices.sceneManager.scene, new SnapSettings(true, VOID, VOID, true));\n return trySnap(this, coreServices, snapActionCandidates, guest);\n };\n protoOf(PlacementHelper).snapToHost = function (guest, host, coreServices) {\n var snapActionCandidates = AutoAdaptUtils_getInstance().getAutoAdaptCandidatesInHierarchy(guest, host);\n return trySnap(this, coreServices, snapActionCandidates, guest);\n };\n var PlacementHelper_instance;\n function PlacementHelper_getInstance() {\n if (PlacementHelper_instance == null)\n new PlacementHelper();\n return PlacementHelper_instance;\n }\n function Companion_55() {\n }\n protoOf(Companion_55).fromValidationResult = function (warningsAndErrors, placedEntity) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = warningsAndErrors.length;\n while (inductionVariable < last) {\n var element = warningsAndErrors[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.Companion.fromValidationResult.' call\n if (element.resultType.equals(ValidationResultType_WARNING_getInstance())) {\n destination.q(element);\n }\n }\n var warnings = copyToArray(destination);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = warningsAndErrors.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = warningsAndErrors[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.Companion.fromValidationResult.' call\n if (element_0.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n destination_0.q(element_0);\n }\n }\n var errors = copyToArray(destination_0);\n return new PlacementResult(warnings, errors, placedEntity);\n };\n protoOf(Companion_55).fromValidSnapActionCandidateOrErrors = function (result) {\n var tmp0_safe_receiver = result.snapActionCandidate;\n return new PlacementResult(result.warnings, result.errors, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.guestRoot);\n };\n protoOf(Companion_55).ok = function (placedEntity) {\n // Inline function 'kotlin.emptyArray' call\n var tmp = [];\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$1 = [];\n return new PlacementResult(tmp, tmp$ret$1, placedEntity);\n };\n protoOf(Companion_55).m3c = function (message, productRef, rule) {\n // Inline function 'kotlin.emptyArray' call\n var tmp = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [new ValidationResultFail(message, productRef, rule)];\n return new PlacementResult(tmp, tmp$ret$3, null);\n };\n protoOf(Companion_55).failWithMessage = function (message, productRef, rule, $super) {\n rule = rule === VOID ? null : rule;\n return this.m3c(message, productRef, rule);\n };\n protoOf(Companion_55).failWithErrors = function (results) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n return new PlacementResult(tmp$ret$0, results, null);\n };\n protoOf(Companion_55).warn = function (message, placedEntity, productRef, rule) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [new ValidationResultWarning(message, productRef, rule)];\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$3 = [];\n return new PlacementResult(tmp, tmp$ret$3, placedEntity);\n };\n var Companion_instance_88;\n function Companion_getInstance_64() {\n return Companion_instance_88;\n }\n function PlacementResult(warnings, errors, entity) {\n this.warnings = warnings;\n this.errors = errors;\n var tmp = this;\n var tmp1_elvis_lhs = entity == null ? null : get_snapRoot(entity);\n tmp.placedEntity = tmp1_elvis_lhs == null ? entity : tmp1_elvis_lhs;\n }\n protoOf(PlacementResult).r2t = function () {\n return this.warnings;\n };\n protoOf(PlacementResult).s2t = function () {\n return this.errors;\n };\n protoOf(PlacementResult).t2t = function () {\n return none(this.errors);\n };\n protoOf(PlacementResult).n3c = function () {\n return this.placedEntity;\n };\n protoOf(PlacementResult).toString = function () {\n var tmp0_safe_receiver = firstOrNull_0(this.errors);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return 'Placement error ' + tmp0_safe_receiver;\n }\n var tmp1_safe_receiver = firstOrNull_0(this.warnings);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return 'Placement warning ' + tmp1_safe_receiver;\n }\n return 'Placement OK';\n };\n function get_logger() {\n _init_properties_PlacementService_kt__rip640();\n return logger;\n }\n var logger;\n function noAutoAdaptServiceResult($this, productRef) {\n return Companion_instance_88.failWithMessage('No AutoAdaptService, so no auto adapting allowed', productRef, null);\n }\n function autoAdaptToScene($this, entityToPlace, sortAndSelectStrategy) {\n if ($this.p3c_1 == null)\n return noAutoAdaptServiceResult($this, get_productRefOrEmptyString(entityToPlace));\n if ($this.q3c_1 == null)\n return noAutoAdaptServiceResult($this, get_productRefOrEmptyString(entityToPlace));\n return $this.q3c_1.autoAdaptToScene(entityToPlace, sortAndSelectStrategy);\n }\n function autoAdaptToPosition($this, entityToPlace, initialPosition, sortByWarnings, sortAndSelectStrategy) {\n if ($this.p3c_1 == null)\n return noAutoAdaptServiceResult($this, get_productRefOrEmptyString(entityToPlace));\n if ($this.q3c_1 == null)\n return noAutoAdaptServiceResult($this, get_productRefOrEmptyString(entityToPlace));\n return $this.q3c_1.autoAdaptToPosition(entityToPlace, initialPosition, sortByWarnings, sortAndSelectStrategy);\n }\n function autoAdaptToTarget($this, entityToPlace, target, sortAndSelectStrategy) {\n if ($this.p3c_1 == null)\n return noAutoAdaptServiceResult($this, get_productRefOrEmptyString(entityToPlace));\n if ($this.q3c_1 == null)\n return noAutoAdaptServiceResult($this, get_productRefOrEmptyString(entityToPlace));\n return $this.q3c_1.autoAdaptToHost(entityToPlace, target, sortAndSelectStrategy);\n }\n function canAutoAdapt($this, entityToPlace) {\n var tmp;\n if (!($this.p3c_1 == null)) {\n tmp = entityToPlace.hasComponent(126);\n } else {\n tmp = false;\n }\n return tmp;\n }\n function getInitialPosition($this, entityToPlace, closeTo) {\n var tmp1_safe_receiver = recommendedPosition(entityToPlace, closeTo == null ? get_worldPosition(entityToPlace) : closeTo);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp1_safe_receiver;\n }\n if (closeTo == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return closeTo;\n }\n var tmp3_safe_receiver = get_axisAlignedBoundingBoxForHierarchy(entityToPlace);\n if (tmp3_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return new Vector(VOID, -tmp3_safe_receiver.min.Y);\n }\n return Companion_getInstance_4().ZERO;\n }\n function autoAdaptToTargets($this, entityToPlace, targets, sortAndSelectStrategy) {\n if ($this.p3c_1 == null)\n return noAutoAdaptServiceResult($this, get_productRefOrEmptyString(entityToPlace));\n if ($this.q3c_1 == null)\n return noAutoAdaptServiceResult($this, get_productRefOrEmptyString(entityToPlace));\n return $this.q3c_1.autoAdaptToTargets(entityToPlace, targets, sortAndSelectStrategy);\n }\n function PlacementService$snapToTarget$lambda(this$0, $entityToPlace, $sortAndSelectStrategy) {\n return function (host) {\n var tmp;\n if (canAutoAdapt(this$0, $entityToPlace)) {\n tmp = autoAdaptToTarget(this$0, $entityToPlace, host, $sortAndSelectStrategy);\n } else {\n tmp = this$0.r3c_1.snapToTarget($entityToPlace, host, $sortAndSelectStrategy);\n }\n return tmp;\n };\n }\n function PlacementService$snapToConnector$lambda($guestConnectorKey) {\n return function (it) {\n var tmp0_safe_receiver = get_connectorsComponent(it);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.getConnectorByKey($guestConnectorKey);\n };\n }\n function PlacementService$snapToConnector$lambda_0($hostConnectorKey) {\n return function (it) {\n var tmp0_safe_receiver = get_connectorsComponent(it);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.getConnectorByKey($hostConnectorKey);\n };\n }\n function PlacementService$dissolveEntity$lambda() {\n return 'Trying to dissolve an entity with no parent, which is not allowed. Use ConnectionUtils.disconnectAndDisposeEntityAndHierarchy() instead.';\n }\n function PlacementService$replaceProductParts$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {\n return Unit_instance;\n }\n function PlacementService(coreServices, autoAdaptService) {\n autoAdaptService = autoAdaptService === VOID ? null : autoAdaptService;\n this.o3c_1 = coreServices;\n this.p3c_1 = autoAdaptService;\n var tmp = this;\n var tmp_0;\n if (this.p3c_1 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.placement.PlacementService.autoAdaptPlacementActor.' call\n tmp_0 = new AutoAdaptPlacementActor(this.p3c_1, this.o3c_1.entityManager, this.o3c_1.sceneManager, this.o3c_1.productManager, this.o3c_1.validations);\n }\n tmp.q3c_1 = tmp_0;\n this.r3c_1 = new SnapPlacementActor(this.o3c_1.entityManager, this.o3c_1.sceneManager, this.o3c_1.validations);\n }\n protoOf(PlacementService).s3c = function (entityToPlace, initialPosition, ignoreWarnings, searchDirections, sortAndSelectStrategy) {\n var result = canAutoAdapt(this, entityToPlace) ? autoAdaptToPosition(this, entityToPlace, initialPosition, !ignoreWarnings, sortAndSelectStrategy) : null;\n if (result == null ? true : !result.valid) {\n result = this.r3c_1.snapToSceneFromPosition(entityToPlace, initialPosition, !ignoreWarnings, searchDirections, sortAndSelectStrategy);\n }\n return result;\n };\n protoOf(PlacementService).snapToPosition = function (entityToPlace, initialPosition, ignoreWarnings, searchDirections, sortAndSelectStrategy, $super) {\n var tmp;\n if (searchDirections === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [Companion_getInstance_4().LEFT, Companion_getInstance_4().RIGHT, Companion_getInstance_4().UP, Companion_getInstance_4().DOWN, Companion_getInstance_4().BACK, Companion_getInstance_4().FORWARD];\n } else {\n tmp = searchDirections;\n }\n searchDirections = tmp;\n sortAndSelectStrategy = sortAndSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE : sortAndSelectStrategy;\n return this.s3c(entityToPlace, initialPosition, ignoreWarnings, searchDirections, sortAndSelectStrategy);\n };\n protoOf(PlacementService).t3c = function (entityToPlace, closeTo, searchDirections, sortAndSelectStrategy) {\n var originalTransform = get_worldTransform(entityToPlace);\n var recommendedPos = getInitialPosition(this, entityToPlace, closeTo);\n TransformUtils_instance.setWorldTransform(entityToPlace, new Transform(recommendedPos, originalTransform.rotation));\n var result = canAutoAdapt(this, entityToPlace) ? autoAdaptToScene(this, entityToPlace, sortAndSelectStrategy) : null;\n if (result == null ? true : !result.valid) {\n result = this.r3c_1.snapToSceneFromPosition(entityToPlace, recommendedPos, true, searchDirections, sortAndSelectStrategy);\n }\n if (!result.valid) {\n TransformUtils_instance.setWorldTransform(entityToPlace, originalTransform);\n }\n return result;\n };\n protoOf(PlacementService).snapToScene = function (entityToPlace, closeTo, searchDirections, sortAndSelectStrategy, $super) {\n closeTo = closeTo === VOID ? null : closeTo;\n var tmp;\n if (searchDirections === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [Companion_getInstance_4().LEFT, Companion_getInstance_4().RIGHT, Companion_getInstance_4().UP, Companion_getInstance_4().DOWN, Companion_getInstance_4().BACK, Companion_getInstance_4().FORWARD];\n } else {\n tmp = searchDirections;\n }\n searchDirections = tmp;\n sortAndSelectStrategy = sortAndSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_THEN_DISTANCE : sortAndSelectStrategy;\n return this.t3c(entityToPlace, closeTo, searchDirections, sortAndSelectStrategy);\n };\n protoOf(PlacementService).u3c = function (entityToPlace, target, sortAndSelectStrategy) {\n var originalTransform = get_worldTransform(entityToPlace);\n var tmp0_elvis_lhs = recommendedPosition(entityToPlace, get_worldPosition(entityToPlace));\n var recommendedPos = tmp0_elvis_lhs == null ? originalTransform.position : tmp0_elvis_lhs;\n TransformUtils_instance.setWorldTransform(entityToPlace, new Transform(recommendedPos, originalTransform.rotation));\n var snapExact = PlacementService$snapToTarget$lambda(this, entityToPlace, sortAndSelectStrategy);\n var exactResult = snapExact(target);\n if (exactResult.valid) {\n return exactResult;\n }\n var eligibleHosts = minus(hierarchyExceptSubTreesWithComponentSequence(target, 28), target);\n var tmp1_iterator = eligibleHosts.t();\n while (tmp1_iterator.u()) {\n var host = tmp1_iterator.w();\n var result = snapExact(host);\n if (result.valid) {\n return result;\n }\n }\n TransformUtils_instance.setWorldTransform(entityToPlace, originalTransform);\n return exactResult;\n };\n protoOf(PlacementService).snapToTarget = function (entityToPlace, target, sortAndSelectStrategy, $super) {\n sortAndSelectStrategy = sortAndSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_THEN_DISTANCE : sortAndSelectStrategy;\n return this.u3c(entityToPlace, target, sortAndSelectStrategy);\n };\n protoOf(PlacementService).v3c = function (entityToPlace, targets, sortAndSelectStrategy) {\n var originalTransform = get_worldTransform(entityToPlace);\n var tmp0_elvis_lhs = recommendedPosition(entityToPlace, get_worldPosition(entityToPlace));\n var recommendedPos = tmp0_elvis_lhs == null ? originalTransform.position : tmp0_elvis_lhs;\n TransformUtils_instance.setWorldTransform(entityToPlace, new Transform(recommendedPos, originalTransform.rotation));\n entityToPlace.addComponent(new RestrictAllowedRequiredHostsComponent(targets));\n var tmp;\n if (canAutoAdapt(this, entityToPlace)) {\n tmp = autoAdaptToTargets(this, entityToPlace, targets, sortAndSelectStrategy);\n } else {\n tmp = this.r3c_1.snapToTargets(entityToPlace, targets, sortAndSelectStrategy);\n }\n var result = tmp;\n var tmp1_elvis_lhs = result.placedEntity;\n (tmp1_elvis_lhs == null ? entityToPlace : tmp1_elvis_lhs).removeComponent(Companion_instance_2.id);\n return result;\n };\n protoOf(PlacementService).snapToTargets = function (entityToPlace, targets, sortAndSelectStrategy, $super) {\n sortAndSelectStrategy = sortAndSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_THEN_DISTANCE : sortAndSelectStrategy;\n return this.v3c(entityToPlace, targets, sortAndSelectStrategy);\n };\n protoOf(PlacementService).alignToTarget = function (entityToPlace, target) {\n return this.r3c_1.alignToTarget(entityToPlace, target);\n };\n protoOf(PlacementService).alignToTargetSpecificConnectors = function (entityToPlace, entityAlignmentConnectorKey, target, targetAlignmentConnectorKey) {\n return this.r3c_1.alignToTarget(entityToPlace, target, entityAlignmentConnectorKey, targetAlignmentConnectorKey);\n };\n protoOf(PlacementService).addToScene = function (entityToPlace) {\n this.o3c_1.entityManager.addComponent(entityToPlace, new ChildComponent(this.o3c_1.sceneManager.scene));\n return Companion_instance_88.ok(entityToPlace);\n };\n protoOf(PlacementService).w3c = function (entityToPlace, position, rotationEulerDegrees) {\n var pos = position == null ? Companion_getInstance_4().ZERO : position;\n var rot = rotationEulerDegrees == null ? Companion_getInstance_4().ZERO : rotationEulerDegrees;\n this.o3c_1.entityManager.addComponent(entityToPlace, LocalTransformComponentFromPosAndRot(pos, Companion_getInstance_6().fromEulerDegreesVector(rot)));\n setParent(entityToPlace, this.o3c_1.sceneManager.scene);\n };\n protoOf(PlacementService).forcePlaceEntity = function (entityToPlace, position, rotationEulerDegrees, $super) {\n position = position === VOID ? null : position;\n rotationEulerDegrees = rotationEulerDegrees === VOID ? null : rotationEulerDegrees;\n return this.w3c(entityToPlace, position, rotationEulerDegrees);\n };\n protoOf(PlacementService).x3c = function (entityToPlace, target, sortAndSelectStrategy) {\n var originalTransform = get_worldTransform(entityToPlace);\n var tmp0_elvis_lhs = recommendedPosition(entityToPlace, get_worldPosition(entityToPlace));\n var recommendedPos = tmp0_elvis_lhs == null ? originalTransform.position : tmp0_elvis_lhs;\n TransformUtils_instance.setWorldTransform(entityToPlace, new Transform(recommendedPos, originalTransform.rotation));\n var exactResult = this.r3c_1.forceSnapToTarget(entityToPlace, target, sortAndSelectStrategy);\n if (exactResult.valid) {\n return exactResult;\n }\n var eligibleHosts = minus(hierarchyExceptSubTreesWithComponentSequence(target, 28), target);\n var tmp1_iterator = eligibleHosts.t();\n while (tmp1_iterator.u()) {\n var host = tmp1_iterator.w();\n var result = this.r3c_1.forceSnapToTarget(entityToPlace, host, sortAndSelectStrategy);\n if (result.valid) {\n return result;\n }\n }\n TransformUtils_instance.setWorldTransform(entityToPlace, originalTransform);\n return exactResult;\n };\n protoOf(PlacementService).forceSnapEntity = function (entityToPlace, target, sortAndSelectStrategy, $super) {\n sortAndSelectStrategy = sortAndSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_THEN_DISTANCE : sortAndSelectStrategy;\n return this.x3c(entityToPlace, target, sortAndSelectStrategy);\n };\n protoOf(PlacementService).y3c = function (hostEntity, guestEntity, connectorOnHostKey, connectorOnGuestKey) {\n SnapUtils_instance.createForcedSnapActionCandidate(hostEntity, guestEntity, connectorOnHostKey, connectorOnGuestKey).createAction().perform();\n };\n protoOf(PlacementService).forceSnapEntityWithConnectors = function (hostEntity, guestEntity, connectorOnHostKey, connectorOnGuestKey, $super) {\n connectorOnHostKey = connectorOnHostKey === VOID ? '' : connectorOnHostKey;\n connectorOnGuestKey = connectorOnGuestKey === VOID ? '' : connectorOnGuestKey;\n return this.y3c(hostEntity, guestEntity, connectorOnHostKey, connectorOnGuestKey);\n };\n protoOf(PlacementService).snapToConnector = function (guestEntity, guestConnectorKey, hostEntity, hostConnectorKey) {\n var tmp = get_hierarchySequence(guestEntity);\n var guestConnector = firstOrNull(mapNotNull(tmp, PlacementService$snapToConnector$lambda(guestConnectorKey)));\n var tmp_0 = get_hierarchySequence(hostEntity);\n var hostConnector = firstOrNull(mapNotNull(tmp_0, PlacementService$snapToConnector$lambda_0(hostConnectorKey)));\n var tmp_1;\n if (!(hostConnector == null) ? !(guestConnector == null) : false) {\n tmp_1 = this.r3c_1.snapToConnector(guestEntity, guestConnector, hostEntity, hostConnector);\n } else if (guestConnector == null) {\n tmp_1 = Companion_instance_88.failWithMessage('guestEntity ' + guestEntity + ' has no connector with key ' + guestConnectorKey, '', null);\n } else if (hostConnector == null) {\n tmp_1 = Companion_instance_88.failWithMessage('hostEntity ' + hostEntity + ' has no connector with key ' + hostConnectorKey, '', null);\n } else {\n tmp_1 = Companion_instance_88.failWithMessage('guestEntity ' + guestEntity + ' has no connector with key ' + guestConnectorKey + ' and hostEntity ' + hostEntity + ' has no connector with key ' + hostConnectorKey, '', null);\n }\n return tmp_1;\n };\n protoOf(PlacementService).dissolveEntity = function (dissolvingEntity) {\n var dissolvingEntityParent = get_parent(dissolvingEntity);\n if (dissolvingEntityParent == null) {\n var tmp = get_logger();\n tmp.warn(PlacementService$dissolveEntity$lambda);\n // Inline function 'kotlin.emptyArray' call\n return [];\n }\n var dissolvingEntityDescendants = get_immediateConnectionRootDescendants(dissolvingEntity);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = dissolvingEntityDescendants.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.PlacementService.dissolveEntity.' call\n ConnectionUtils_instance.disconnect(element);\n }\n ConnectionUtils_instance.disconnectAndDisposeEntityAndHierarchy(dissolvingEntity);\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(dissolvingEntityDescendants, 10));\n var tmp0_iterator_0 = dissolvingEntityDescendants.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.placement.PlacementService.dissolveEntity.' call\n var tmp0_elvis_lhs = get_snapRoot(item);\n var entityRoot = tmp0_elvis_lhs == null ? item : tmp0_elvis_lhs;\n var candidates = SnapUtils_instance.matchingSnapActionCandidates(entityRoot, dissolvingEntityParent, new SnapSettings(true, false, true, true));\n var sortedCandidates = SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_DISTANCE.sortAndSelect(candidates);\n var result = this.o3c_1.validations.getFirstValidSnapAction(sortedCandidates);\n var tmp1_safe_receiver = result.snapActionCandidate;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.createAction();\n if (tmp2_safe_receiver == null)\n null;\n else {\n tmp2_safe_receiver.perform();\n }\n var tmp$ret$1 = new PlacementResult(result.warnings, result.errors, item);\n destination.q(tmp$ret$1);\n }\n var results = destination;\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(results);\n };\n protoOf(PlacementService).replaceEntity = function (entityToRemove, entityToAdd, allowedMovementsOfChildrenInMilliMeter) {\n return ReplaceUtils_instance.replaceEntity(entityToRemove, entityToAdd, allowedMovementsOfChildrenInMilliMeter, this.o3c_1);\n };\n protoOf(PlacementService).fastReplaceEntity = function (entityToRemove, entityToAdd) {\n return ReplaceUtils_instance.fastReplaceEntity(entityToRemove, entityToAdd, this.o3c_1);\n };\n protoOf(PlacementService).z3c = function (connectionRoot, partsMap, onReplace) {\n return ReplaceAssemblyPartUtils_getInstance().replaceProductParts(connectionRoot, partsMap, this.o3c_1, onReplace);\n };\n protoOf(PlacementService).replaceProductParts = function (connectionRoot, partsMap, onReplace, $super) {\n var tmp;\n if (onReplace === VOID) {\n tmp = PlacementService$replaceProductParts$lambda;\n } else {\n tmp = onReplace;\n }\n onReplace = tmp;\n return this.z3c(connectionRoot, partsMap, onReplace);\n };\n function recommendedPosition(_this__u8e3s4, originalPosition) {\n _init_properties_PlacementService_kt__rip640();\n var result = null;\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(59);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n result = originalPosition.copy(VOID, tmp0_safe_receiver.offsetY);\n }\n if (_this__u8e3s4.__getComponentForKotlin(60) == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp = get_logger();\n tmp.warn(recommendedPosition$lambda);\n }\n return result;\n }\n function recommendedPosition$lambda() {\n _init_properties_PlacementService_kt__rip640();\n return 'PositionFromParent is not yet implemented';\n }\n var properties_initialized_PlacementService_kt_qk8kha;\n function _init_properties_PlacementService_kt__rip640() {\n if (!properties_initialized_PlacementService_kt_qk8kha) {\n properties_initialized_PlacementService_kt_qk8kha = true;\n logger = LoggerState_getInstance().m1m('PlacementService');\n }\n }\n function Companion_56() {\n this.id = 58;\n }\n protoOf(Companion_56).s1k = function () {\n return this.id;\n };\n var Companion_instance_89;\n function Companion_getInstance_65() {\n return Companion_instance_89;\n }\n function PlacementZoneByHeightComponent(minY, maxY) {\n this.minY = minY;\n this.maxY = maxY;\n this.a3d_1 = 58;\n }\n protoOf(PlacementZoneByHeightComponent).b3d = function () {\n return this.minY;\n };\n protoOf(PlacementZoneByHeightComponent).c3d = function () {\n return this.maxY;\n };\n protoOf(PlacementZoneByHeightComponent).x1k = function () {\n return this.a3d_1;\n };\n protoOf(PlacementZoneByHeightComponent).eq = function (other) {\n var o = other instanceof PlacementZoneByHeightComponent ? other : THROW_CCE();\n return o.minY === this.minY ? o.maxY === this.maxY : false;\n };\n protoOf(PlacementZoneByHeightComponent).af = function () {\n return this.minY;\n };\n protoOf(PlacementZoneByHeightComponent).bf = function () {\n return this.maxY;\n };\n protoOf(PlacementZoneByHeightComponent).d3d = function (minY, maxY) {\n return new PlacementZoneByHeightComponent(minY, maxY);\n };\n protoOf(PlacementZoneByHeightComponent).copy = function (minY, maxY, $super) {\n minY = minY === VOID ? this.minY : minY;\n maxY = maxY === VOID ? this.maxY : maxY;\n return this.d3d(minY, maxY);\n };\n protoOf(PlacementZoneByHeightComponent).toString = function () {\n return 'PlacementZoneByHeightComponent(minY=' + this.minY + ', maxY=' + this.maxY + ')';\n };\n protoOf(PlacementZoneByHeightComponent).hashCode = function () {\n var result = this.minY;\n result = imul(result, 31) + this.maxY | 0;\n return result;\n };\n protoOf(PlacementZoneByHeightComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PlacementZoneByHeightComponent))\n return false;\n var tmp0_other_with_cast = other instanceof PlacementZoneByHeightComponent ? other : THROW_CCE();\n if (!(this.minY === tmp0_other_with_cast.minY))\n return false;\n if (!(this.maxY === tmp0_other_with_cast.maxY))\n return false;\n return true;\n };\n function Companion_57() {\n this.id = 59;\n }\n protoOf(Companion_57).s1k = function () {\n return this.id;\n };\n var Companion_instance_90;\n function Companion_getInstance_66() {\n return Companion_instance_90;\n }\n function RecommendedInitialPositionFromFloorComponent(offsetY) {\n this.offsetY = offsetY;\n }\n protoOf(RecommendedInitialPositionFromFloorComponent).e3d = function () {\n return this.offsetY;\n };\n protoOf(RecommendedInitialPositionFromFloorComponent).x1k = function () {\n return 59;\n };\n protoOf(RecommendedInitialPositionFromFloorComponent).eq = function (other) {\n var o = other instanceof RecommendedInitialPositionFromFloorComponent ? other : THROW_CCE();\n return o.offsetY === this.offsetY;\n };\n protoOf(RecommendedInitialPositionFromFloorComponent).af = function () {\n return this.offsetY;\n };\n protoOf(RecommendedInitialPositionFromFloorComponent).f3d = function (offsetY) {\n return new RecommendedInitialPositionFromFloorComponent(offsetY);\n };\n protoOf(RecommendedInitialPositionFromFloorComponent).copy = function (offsetY, $super) {\n offsetY = offsetY === VOID ? this.offsetY : offsetY;\n return this.f3d(offsetY);\n };\n protoOf(RecommendedInitialPositionFromFloorComponent).toString = function () {\n return 'RecommendedInitialPositionFromFloorComponent(offsetY=' + this.offsetY + ')';\n };\n protoOf(RecommendedInitialPositionFromFloorComponent).hashCode = function () {\n return this.offsetY;\n };\n protoOf(RecommendedInitialPositionFromFloorComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RecommendedInitialPositionFromFloorComponent))\n return false;\n var tmp0_other_with_cast = other instanceof RecommendedInitialPositionFromFloorComponent ? other : THROW_CCE();\n if (!(this.offsetY === tmp0_other_with_cast.offsetY))\n return false;\n return true;\n };\n function Companion_58() {\n this.id = 60;\n }\n protoOf(Companion_58).s1k = function () {\n return this.id;\n };\n var Companion_instance_91;\n function Companion_getInstance_67() {\n return Companion_instance_91;\n }\n function RecommendedInitialPositionFromParentComponent(referencePoint, offsetX, offsetY, offsetZ) {\n this.referencePoint = referencePoint;\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n this.offsetZ = offsetZ;\n }\n protoOf(RecommendedInitialPositionFromParentComponent).g3d = function () {\n return this.referencePoint;\n };\n protoOf(RecommendedInitialPositionFromParentComponent).h3d = function () {\n return this.offsetX;\n };\n protoOf(RecommendedInitialPositionFromParentComponent).e3d = function () {\n return this.offsetY;\n };\n protoOf(RecommendedInitialPositionFromParentComponent).i3d = function () {\n return this.offsetZ;\n };\n protoOf(RecommendedInitialPositionFromParentComponent).x1k = function () {\n return 60;\n };\n protoOf(RecommendedInitialPositionFromParentComponent).eq = function (other) {\n var o = other instanceof RecommendedInitialPositionFromParentComponent ? other : THROW_CCE();\n return ((o.referencePoint.equals(this.referencePoint) ? o.offsetX == this.offsetX : false) ? o.offsetY == this.offsetY : false) ? o.offsetZ == this.offsetZ : false;\n };\n protoOf(RecommendedInitialPositionFromParentComponent).af = function () {\n return this.referencePoint;\n };\n protoOf(RecommendedInitialPositionFromParentComponent).bf = function () {\n return this.offsetX;\n };\n protoOf(RecommendedInitialPositionFromParentComponent).g1k = function () {\n return this.offsetY;\n };\n protoOf(RecommendedInitialPositionFromParentComponent).h1k = function () {\n return this.offsetZ;\n };\n protoOf(RecommendedInitialPositionFromParentComponent).j3d = function (referencePoint, offsetX, offsetY, offsetZ) {\n return new RecommendedInitialPositionFromParentComponent(referencePoint, offsetX, offsetY, offsetZ);\n };\n protoOf(RecommendedInitialPositionFromParentComponent).copy = function (referencePoint, offsetX, offsetY, offsetZ, $super) {\n referencePoint = referencePoint === VOID ? this.referencePoint : referencePoint;\n offsetX = offsetX === VOID ? this.offsetX : offsetX;\n offsetY = offsetY === VOID ? this.offsetY : offsetY;\n offsetZ = offsetZ === VOID ? this.offsetZ : offsetZ;\n return this.j3d(referencePoint, offsetX, offsetY, offsetZ);\n };\n protoOf(RecommendedInitialPositionFromParentComponent).toString = function () {\n return 'RecommendedInitialPositionFromParentComponent(referencePoint=' + this.referencePoint + ', offsetX=' + this.offsetX + ', offsetY=' + this.offsetY + ', offsetZ=' + this.offsetZ + ')';\n };\n protoOf(RecommendedInitialPositionFromParentComponent).hashCode = function () {\n var result = this.referencePoint.hashCode();\n result = imul(result, 31) + (this.offsetX == null ? 0 : this.offsetX) | 0;\n result = imul(result, 31) + (this.offsetY == null ? 0 : this.offsetY) | 0;\n result = imul(result, 31) + (this.offsetZ == null ? 0 : this.offsetZ) | 0;\n return result;\n };\n protoOf(RecommendedInitialPositionFromParentComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RecommendedInitialPositionFromParentComponent))\n return false;\n var tmp0_other_with_cast = other instanceof RecommendedInitialPositionFromParentComponent ? other : THROW_CCE();\n if (!this.referencePoint.equals(tmp0_other_with_cast.referencePoint))\n return false;\n if (!(this.offsetX == tmp0_other_with_cast.offsetX))\n return false;\n if (!(this.offsetY == tmp0_other_with_cast.offsetY))\n return false;\n if (!(this.offsetZ == tmp0_other_with_cast.offsetZ))\n return false;\n return true;\n };\n function getNewPositionToTheSide($this, otherAabb, candidate, ownAabb, direction) {\n var tmp;\n if (direction.equals(Companion_getInstance_4().LEFT) ? true : direction.equals(Companion_getInstance_4().RIGHT)) {\n var dist = otherAabb.center.X + direction.normalize().X * (otherAabb.size.X * 0.5 + ownAabb.size.X * 0.5) - ownAabb.center.X;\n var hostConnectorWorldSpaceRot = get_worldRotation(candidate.host).times(candidate.hostConnector.transform.rotation);\n var tmp_0 = direction.rotate(hostConnectorWorldSpaceRot);\n // Inline function 'kotlin.math.absoluteValue' call\n var tmp$ret$0 = Math.abs(dist);\n var movement = tmp_0.times(tmp$ret$0);\n tmp = candidate.endTransform.position.plus(movement);\n } else if (direction.equals(Companion_getInstance_4().UP) ? true : direction.equals(Companion_getInstance_4().DOWN)) {\n tmp = candidate.endTransform.position.plus(new Vector(VOID, otherAabb.center.Y + direction.normalize().Y * (otherAabb.size.Y * 0.5 + ownAabb.size.Y * 0.5) - ownAabb.center.Y));\n } else {\n tmp = candidate.endTransform.position.plus(new Vector(VOID, VOID, otherAabb.center.Z + direction.normalize().Z * (otherAabb.size.Z * 0.5 + ownAabb.size.Z * 0.5) - ownAabb.center.Z));\n }\n return tmp;\n }\n function SearchDirectionsUtils() {\n }\n protoOf(SearchDirectionsUtils).findNewPositionOnSidesOfCollidingEntity = function (entity, candidate, collisionValidationResult, searchDirections, prioritizeSolvingRoomCollisions) {\n candidate.perform();\n var tmp0_elvis_lhs = get_axisAlignedBoundingBoxForHierarchy(entity);\n var ownAabb = tmp0_elvis_lhs == null ? new AxisAlignedBox(Companion_getInstance_4().ZERO, Companion_getInstance_4().ZERO) : tmp0_elvis_lhs;\n candidate.rollback();\n var tmp;\n if (prioritizeSolvingRoomCollisions) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = collisionValidationResult.collisions;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.SearchDirectionsUtils.findNewPositionOnSidesOfCollidingEntity.' call\n if (get_isRoom(element.other)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n tmp = tmp$ret$1;\n } else {\n tmp = false;\n }\n if (tmp) {\n // Inline function 'kotlin.math.max' call\n // Inline function 'kotlin.math.max' call\n var a = ownAabb.width;\n var b = ownAabb.height;\n var a_0 = Math.max(a, b);\n var b_0 = ownAabb.depth;\n var largest = Math.max(a_0, b_0);\n var hostConnectorWorldSpaceRot = get_worldRotation(candidate.host).times(candidate.hostConnector.transform.rotation);\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(searchDirections.length);\n var inductionVariable_0 = 0;\n var last_0 = searchDirections.length;\n while (inductionVariable_0 < last_0) {\n var item = searchDirections[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.SearchDirectionsUtils.findNewPositionOnSidesOfCollidingEntity.' call\n var tmp$ret$4 = candidate.endTransform.position.plus(item.normalize().rotate(hostConnectorWorldSpaceRot).times(largest).times(0.5));\n destination.q(tmp$ret$4);\n }\n var newPositions = destination;\n return newPositions;\n }\n var otherAabb = collisionValidationResult.aabbOfAllCollidedWith;\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(searchDirections.length);\n var inductionVariable_1 = 0;\n var last_1 = searchDirections.length;\n while (inductionVariable_1 < last_1) {\n var item_0 = searchDirections[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.SearchDirectionsUtils.findNewPositionOnSidesOfCollidingEntity.' call\n var tmp$ret$7 = getNewPositionToTheSide(SearchDirectionsUtils_instance, otherAabb, candidate, ownAabb, item_0);\n destination_0.q(tmp$ret$7);\n }\n return destination_0;\n };\n var SearchDirectionsUtils_instance;\n function SearchDirectionsUtils_getInstance() {\n return SearchDirectionsUtils_instance;\n }\n function findBestCandidatesInTarget($this, entityToPlace, target, snapActionCandidates, sortAndSelectStrategy) {\n var result = $this.findBestCandidateAndSnap(entityToPlace, snapActionCandidates, true);\n var tmp;\n if (!result.valid) {\n var tmp_0 = get_worldPosition(entityToPlace);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [Companion_getInstance_4().LEFT, Companion_getInstance_4().RIGHT, Companion_getInstance_4().UP, Companion_getInstance_4().DOWN, Companion_getInstance_4().BACK, Companion_getInstance_4().FORWARD];\n tmp = $this.snapToHostFromPosition(entityToPlace, target, tmp_0, true, tmp$ret$2, sortAndSelectStrategy);\n } else {\n tmp = result;\n }\n return tmp;\n }\n function getSnapActionCandidates($this, snappingGuestEntity, target, sortAndSelectStrategy) {\n var tmp;\n if (snappingGuestEntity == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.getSnapActionCandidates.' call\n tmp = sortAndSelectStrategy.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidates(snappingGuestEntity, target, $this.snapSettings));\n }\n return tmp;\n }\n function getSnappingEntity($this, entityToAdd) {\n var tmp3_elvis_lhs = get_snapRoot(entityToAdd);\n var tmp;\n if (tmp3_elvis_lhs == null) {\n var tmp0_safe_receiver = get_parentComponent(entityToAdd);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.first' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.getSnappingEntity.' call\n if (!(get_connectorsComponent(element) == null)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n throw NoSuchElementException_init_$Create$('Array contains no element matching the predicate.');\n }\n tmp_0 = tmp$ret$1;\n }\n var tmp2_safe_receiver = tmp_0;\n tmp = tmp2_safe_receiver == null ? null : get_snapRoot(tmp2_safe_receiver);\n } else {\n tmp = tmp3_elvis_lhs;\n }\n return tmp;\n }\n function findBestSnap($this, snapActionCandidates, addedEntity, sortAndSelectStrategy, sortByWarnings, searchDirections) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (snapActionCandidates.length === 0) {\n return failDueToNoSnaps($this, addedEntity);\n }\n $this.k3d_1.addComponent(addedEntity, new SnapCandidateComponent());\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(snapActionCandidates.length);\n var inductionVariable = 0;\n var last = snapActionCandidates.length;\n while (inductionVariable < last) {\n var item = snapActionCandidates[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findBestSnap.' call\n var tmp$ret$1 = validate_1($this, item, $this.m3d_1);\n destination.q(tmp$ret$1);\n }\n var validatedCandidates = destination;\n var bestSoFar = null;\n var tmp0_iterator = validatedCandidates.t();\n while (tmp0_iterator.u()) {\n var cr = tmp0_iterator.w();\n if (cr.valid()) {\n bestSoFar = best($this, cr, bestSoFar, sortAndSelectStrategy, sortByWarnings);\n } else if (cr.candidate.hostConnector.isContinuousConnector ? cr.candidate.alignmentInitiatorCandidate == null : false) {\n bestSoFar = findBestValidPositionOnConnector$default($this, validatedCandidates, bestSoFar, listOf(cr), addedEntity, cr.candidate, searchDirections, $this.m3d_1, sortAndSelectStrategy, sortByWarnings);\n }\n }\n var tmp;\n if (!(bestSoFar == null)) {\n var warnings = bestSoFar.results;\n tmp = performSnapAction($this, addedEntity, bestSoFar.candidate, warnings);\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = validatedCandidates.t();\n while (tmp0_iterator_0.u()) {\n var element = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findBestSnap.' call\n var list = toList(element.results);\n addAll_0(destination_0, list);\n }\n var allResults = copyToArray(destination_0);\n tmp = performSnapAction($this, addedEntity, null, allResults);\n }\n var placementResult = tmp;\n $this.k3d_1.removeComponent(addedEntity, Companion_instance_21.id);\n return placementResult;\n }\n function validate_1($this, candidate, validationService) {\n var candidateResult = new CandidateResult(candidate, validationService.validateSnap(candidate));\n return candidateResult;\n }\n function getAlignmentCandidatesThatResolvesCollision($this, candidates, failedCandidateResult) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = failedCandidateResult.results;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.getAlignmentCandidatesThatResolvesCollision.' call\n if (element instanceof CollisionValidationResult) {\n var tmp0_safe_receiver = firstOrNull_0(element.collisions);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.other;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = candidates.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.getAlignmentCandidatesThatResolvesCollision...' call\n var tmp;\n var tmp0_safe_receiver_0 = element_0.candidate.alignmentInitiatorCandidate;\n if (equals(tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.host, tmp1_safe_receiver)) {\n tmp = element_0.valid();\n } else {\n tmp = false;\n }\n if (tmp) {\n destination.q(element_0);\n }\n }\n return destination;\n }\n }\n }\n return emptyList();\n }\n function CandidateResult(candidate, results) {\n this.candidate = candidate;\n this.results = results;\n this.n3d_1 = 0;\n }\n protoOf(CandidateResult).o3d = function () {\n return this.candidate;\n };\n protoOf(CandidateResult).p3d = function () {\n return this.results;\n };\n protoOf(CandidateResult).valid = function () {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var indexedObject = this.results;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.CandidateResult.valid.' call\n if (element.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n return tmp$ret$1;\n };\n protoOf(CandidateResult).countWarnings = function () {\n // Inline function 'kotlin.collections.count' call\n var count = 0;\n var indexedObject = this.results;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.CandidateResult.countWarnings.' call\n if (element.resultType.equals(ValidationResultType_WARNING_getInstance())) {\n count = count + 1 | 0;\n }\n }\n return count;\n };\n protoOf(CandidateResult).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof CandidateResult))\n THROW_CCE();\n if (!equals(this.candidate, other.candidate))\n return false;\n return true;\n };\n protoOf(CandidateResult).hashCode = function () {\n if (this.n3d_1 === 0)\n this.n3d_1 = hashCode(this.candidate);\n return this.n3d_1;\n };\n protoOf(CandidateResult).af = function () {\n return this.candidate;\n };\n protoOf(CandidateResult).bf = function () {\n return this.results;\n };\n protoOf(CandidateResult).q3d = function (candidate, results) {\n return new CandidateResult(candidate, results);\n };\n protoOf(CandidateResult).copy = function (candidate, results, $super) {\n candidate = candidate === VOID ? this.candidate : candidate;\n results = results === VOID ? this.results : results;\n return this.q3d(candidate, results);\n };\n protoOf(CandidateResult).toString = function () {\n return 'CandidateResult(candidate=' + this.candidate + ', results=' + toString(this.results) + ')';\n };\n function findBestValidPositionOnConnector($this, validatedCandidates, bestSoFar, failed, entityToAdd, candidate, searchDirections, validationService, sortAndSelectStrategy, sortByWarnings, triedPositions, level) {\n if (level >= 5) {\n var tmp = Companion_getInstance_68().logger;\n tmp.info(SnapPlacementActor$findBestValidPositionOnConnector$lambda(level));\n return bestSoFar;\n }\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = failed.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findBestValidPositionOnConnector.' call\n var list = getAlignmentCandidatesThatResolvesCollision($this, validatedCandidates, element);\n addAll_0(destination, list);\n }\n var validAlignments = destination;\n var localBest = null;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = validAlignments.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findBestValidPositionOnConnector.' call\n localBest = best($this, element_0, localBest, sortAndSelectStrategy, sortByWarnings);\n }\n var tmp0_safe_receiver = localBest;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return best($this, tmp0_safe_receiver, bestSoFar, sortAndSelectStrategy, sortByWarnings);\n }\n var initialTransform = get_worldTransform(entityToAdd);\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterNot' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator_1 = failed.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findBestValidPositionOnConnector.' call\n var list_0 = findNewPositionThatMightSatisfyFailedResult($this, element_1, entityToAdd, searchDirections, level);\n addAll_0(destination_0, list_0);\n }\n // Inline function 'kotlin.collections.filterNotTo' call\n var this_0 = distinct(destination_0);\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator_2 = this_0.t();\n while (tmp0_iterator_2.u()) {\n var element_2 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findBestValidPositionOnConnector.' call\n if (!triedPositions.p(element_2)) {\n destination_1.q(element_2);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_2 = ArrayList_init_$Create$();\n var tmp0_iterator_3 = destination_1.t();\n while (tmp0_iterator_3.u()) {\n var element_3 = tmp0_iterator_3.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findBestValidPositionOnConnector.' call\n if (bestSoFar == null ? true : initialTransform.position.distanceTo(element_3) < bestSoFar.candidate.movement.size) {\n destination_2.q(element_3);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_3 = ArrayList_init_$Create$();\n var tmp0_iterator_4 = destination_2.t();\n while (tmp0_iterator_4.u()) {\n var element_4 = tmp0_iterator_4.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findBestValidPositionOnConnector.' call\n if (SnapUtils_instance.isNewPositionOnHostConnector(candidate, element_4)) {\n destination_3.q(element_4);\n }\n }\n var newPositions = destination_3;\n if (newPositions.b1() ? !(bestSoFar == null) : false) {\n return bestSoFar;\n }\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(newPositions, 10));\n var tmp0_iterator_5 = newPositions.t();\n while (tmp0_iterator_5.u()) {\n var item = tmp0_iterator_5.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findBestValidPositionOnConnector.' call\n var newCandidate = SnapUtils_instance.createCandidate(candidate.guest, candidate.guestConnector, candidate.host, candidate.hostConnector, candidate.endTransform.copy(item), VOID, VOID, initialTransform);\n var tmp$ret$16 = validate_1($this, newCandidate, validationService);\n destination_4.q(tmp$ret$16);\n }\n var newResults = destination_4;\n localBest = null;\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_5 = ArrayList_init_$Create$();\n var tmp0_iterator_6 = newResults.t();\n while (tmp0_iterator_6.u()) {\n var element_5 = tmp0_iterator_6.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findBestValidPositionOnConnector.' call\n if (element_5.valid()) {\n destination_5.q(element_5);\n }\n }\n var tmp0_iterator_7 = destination_5.t();\n while (tmp0_iterator_7.u()) {\n var element_6 = tmp0_iterator_7.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findBestValidPositionOnConnector.' call\n localBest = best($this, element_6, localBest, sortAndSelectStrategy, sortByWarnings);\n }\n var tmp1_safe_receiver = localBest;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return best($this, tmp1_safe_receiver, bestSoFar, sortAndSelectStrategy, sortByWarnings);\n }\n return findBestValidPositionOnConnector($this, validatedCandidates, bestSoFar, newResults, entityToAdd, candidate, searchDirections, validationService, sortAndSelectStrategy, sortByWarnings, plus_1(triedPositions, newPositions), level + 1 | 0);\n }\n function findBestValidPositionOnConnector$default($this, validatedCandidates, bestSoFar, failed, entityToAdd, candidate, searchDirections, validationService, sortAndSelectStrategy, sortByWarnings, triedPositions, level, $super) {\n triedPositions = triedPositions === VOID ? emptyList() : triedPositions;\n level = level === VOID ? 0 : level;\n return findBestValidPositionOnConnector($this, validatedCandidates, bestSoFar, failed, entityToAdd, candidate, searchDirections, validationService, sortAndSelectStrategy, sortByWarnings, triedPositions, level);\n }\n function findNewPositionThatMightSatisfyFailedResult($this, failed, entityToAdd, searchDirections, level) {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = failed.results;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.findNewPositionThatMightSatisfyFailedResult.' call\n var tmp;\n if (element instanceof CollisionValidationResult) {\n tmp = SearchDirectionsUtils_instance.findNewPositionOnSidesOfCollidingEntity(entityToAdd, failed.candidate, element, searchDirections, level === 0);\n } else {\n tmp = emptyList();\n }\n var list = tmp;\n addAll_0(destination, list);\n }\n return destination;\n }\n function best($this, candidate, bestSoFar, sortAndSelectStrategy, sortByWarnings) {\n if (!candidate.valid())\n return bestSoFar;\n if (bestSoFar == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n if (sortByWarnings ? candidate.countWarnings() < bestSoFar.countWarnings() : false) {\n tmp = candidate;\n } else {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [bestSoFar.candidate, candidate.candidate];\n var first = firstOrNull_0(sortAndSelectStrategy.sortAndSelect(tmp$ret$2));\n tmp = equals(first, candidate.candidate) ? candidate : bestSoFar;\n }\n return tmp;\n }\n return candidate;\n }\n function moveToPosition($this, entity, position) {\n var tmp0_elvis_lhs = get_snapRoot(entity);\n var snapRoot = tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs;\n if (snapRoot.equals(entity)) {\n TransformUtils_instance.setWorldTransform(entity, new Transform(position, get_worldRotation(entity)));\n } else {\n var delta = position.minus(get_worldPosition(entity));\n TransformUtils_instance.setWorldTransform(snapRoot, new Transform(get_worldPosition(snapRoot).plus(delta), get_worldRotation(snapRoot)));\n }\n }\n function failDueToNoSnaps($this, entity) {\n return Companion_instance_88.failWithMessage('Found no snap action candidates', get_productRefOrEmptyString(entity), null);\n }\n function performSnapAction($this, entity, snapActionCandidate, results) {\n if (snapActionCandidate == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var snapAction = snapActionCandidate.createAction();\n snapAction.perform();\n var tmp;\n if (any_0(results)) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n tmp = new PlacementResult(results, tmp$ret$0, snapActionCandidate.guest);\n } else {\n tmp = Companion_instance_88.ok(entity);\n }\n return tmp;\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = results.length;\n while (inductionVariable < last) {\n var element = results[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.performSnapAction.' call\n if (element.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n destination.q(element);\n }\n }\n var errors = copyToArray(destination);\n var tmp_0;\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(errors.length === 0)) {\n tmp_0 = Companion_instance_88.failWithErrors(errors);\n } else {\n tmp_0 = failDueToNoSnaps($this, entity);\n }\n return tmp_0;\n }\n function Companion_59() {\n Companion_instance_92 = this;\n this.MAX_SEARCH_LVL_SNAP_TO_SCENE = 5;\n this.logger = LoggerState_getInstance().m1m('SnapPlacementActor');\n }\n protoOf(Companion_59).r3d = function () {\n return this.MAX_SEARCH_LVL_SNAP_TO_SCENE;\n };\n protoOf(Companion_59).x1i = function () {\n return this.logger;\n };\n var Companion_instance_92;\n function Companion_getInstance_68() {\n if (Companion_instance_92 == null)\n new Companion_59();\n return Companion_instance_92;\n }\n function SnapPlacementActor$snapToTargets$lambda(this$0, $entityToPlace, $snapActionCandidates, $sortAndSelectStrategy) {\n return function (target) {\n return findBestCandidatesInTarget(this$0, $entityToPlace, target, $snapActionCandidates, $sortAndSelectStrategy);\n };\n }\n function SnapPlacementActor$findBestValidPositionOnConnector$lambda($level) {\n return function () {\n return 'Reached too deep (lvl: ' + $level + ') when searching for non colliding placement';\n };\n }\n function SnapPlacementActor(entityManager, sceneManager, validationService) {\n Companion_getInstance_68();\n this.k3d_1 = entityManager;\n this.l3d_1 = sceneManager;\n this.m3d_1 = validationService;\n this.snapSettings = new SnapSettings(true, false, false, true);\n }\n protoOf(SnapPlacementActor).s3d = function () {\n return this.snapSettings;\n };\n protoOf(SnapPlacementActor).t3d = function (entityToPlace, target, entityAlignmentConnectorKey, targetAlignmentConnectorKey) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = SnapUtils_instance.matchingSnapActionCandidatesInScene(entityToPlace, this.l3d_1, this.snapSettings);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.alignToTarget.' call\n if (element.hostConnector.isContinuousConnector) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.alignToTarget.' call\n var tmp = element_0.guestConnector.type;\n if (tmp === 0) {\n destination_0.q(element_0);\n }\n }\n var continuousCandidates = destination_0;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_1 = SnapUtils_instance.matchingSnapCandidatesOnHost(entityToPlace, target, this.snapSettings);\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = this_1.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.alignToTarget.' call\n var tmp_0 = element_1.guestConnector.type;\n if (tmp_0 === 2) {\n destination_1.q(element_1);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_2 = ArrayList_init_$Create$();\n var tmp0_iterator_1 = destination_1.t();\n while (tmp0_iterator_1.u()) {\n var element_2 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.alignToTarget.' call\n if (entityAlignmentConnectorKey == null ? true : element_2.guestConnector.key === entityAlignmentConnectorKey) {\n destination_2.q(element_2);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_3 = ArrayList_init_$Create$();\n var tmp0_iterator_2 = destination_2.t();\n while (tmp0_iterator_2.u()) {\n var element_3 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.alignToTarget.' call\n if (targetAlignmentConnectorKey == null ? true : element_3.hostConnector.key === targetAlignmentConnectorKey) {\n destination_3.q(element_3);\n }\n }\n var alignmentCandidates = toList_0(destination_3);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_4 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_3 = alignmentCandidates.t();\n while (tmp0_iterator_3.u()) {\n var element_4 = tmp0_iterator_3.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.alignToTarget.' call\n var tmp0_safe_receiver = SnapUtils_instance.tryToReplaceAlignmentWithRealCandidate(element_4, continuousCandidates);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_4.q(tmp0_safe_receiver);\n }\n }\n var foundAlignedCandidates = copyToArray(destination_4);\n this.k3d_1.addComponent(entityToPlace, new SnapCandidateComponent());\n var tmp0_container = this.m3d_1.getFirstValidSnapAction(foundAlignedCandidates, true);\n var candidate = tmp0_container.af();\n var results = tmp0_container.bf();\n var placementResult = performSnapAction(this, entityToPlace, candidate, results);\n this.k3d_1.removeComponent(entityToPlace, Companion_instance_21.id);\n return placementResult;\n };\n protoOf(SnapPlacementActor).alignToTarget = function (entityToPlace, target, entityAlignmentConnectorKey, targetAlignmentConnectorKey, $super) {\n entityAlignmentConnectorKey = entityAlignmentConnectorKey === VOID ? null : entityAlignmentConnectorKey;\n targetAlignmentConnectorKey = targetAlignmentConnectorKey === VOID ? null : targetAlignmentConnectorKey;\n return this.t3d(entityToPlace, target, entityAlignmentConnectorKey, targetAlignmentConnectorKey);\n };\n protoOf(SnapPlacementActor).snapToTarget = function (entityToPlace, target, sortAndSelectStrategy) {\n var snappingGuestEntity = getSnappingEntity(this, entityToPlace);\n var tmp0_elvis_lhs = getSnapActionCandidates(this, snappingGuestEntity, target, sortAndSelectStrategy);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var snapActionCandidates = tmp;\n return findBestCandidatesInTarget(this, entityToPlace, target, snapActionCandidates, sortAndSelectStrategy);\n };\n protoOf(SnapPlacementActor).forceSnapToTarget = function (entity, target, sortAndSelectStrategy) {\n var snappingGuestEntity = getSnappingEntity(this, entity);\n var tmp0_safe_receiver = getSnapActionCandidates(this, snappingGuestEntity, target, sortAndSelectStrategy);\n var snapActionCandidate = tmp0_safe_receiver == null ? null : firstOrNull_0(tmp0_safe_receiver);\n if (snapActionCandidate == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n this.k3d_1.addComponent(entity, new SnapCandidateComponent());\n if (get_parent(entity) == null) {\n this.k3d_1.addComponent(entity, new ChildComponent(this.l3d_1.scene));\n }\n var snapAction = snapActionCandidate.createAction();\n snapAction.perform();\n this.k3d_1.removeComponent(entity, Companion_instance_21.id);\n return Companion_instance_88.ok(entity);\n }\n return Companion_instance_88.failWithMessage('No possible snapActions in target', get_productRefOrEmptyString(entity), null);\n };\n protoOf(SnapPlacementActor).snapToTargets = function (entityToPlace, targets, sortAndSelectStrategy) {\n var tmp0_elvis_lhs = getSnappingEntity(this, entityToPlace);\n var snappingGuestEntity = tmp0_elvis_lhs == null ? entityToPlace : tmp0_elvis_lhs;\n var snapActionCandidates = sortAndSelectStrategy.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidatesMultipleHosts(snappingGuestEntity, targets, new SnapSettings(true, false, true, true)));\n var tmp$ret$4;\n $l$block_0: {\n // Inline function 'com.ikea.core.utils.otherwise' call\n // Inline function 'kotlin.sequences.find' call\n var tmp = asSequence_0(targets);\n var this_0 = map(tmp, SnapPlacementActor$snapToTargets$lambda(this, entityToPlace, snapActionCandidates, sortAndSelectStrategy));\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.sequences.firstOrNull' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.snapToTargets.' call\n if (element.valid) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var this_1 = tmp$ret$1;\n if (this_1 == null) {\n // Inline function 'com.ikea.core.stl.placement.SnapPlacementActor.snapToTargets.' call\n tmp$ret$4 = Companion_instance_88.failWithMessage('No valid snap for entity', get_productRefOrEmptyString(entityToPlace), null);\n break $l$block_0;\n }\n tmp$ret$4 = this_1;\n }\n return tmp$ret$4;\n };\n protoOf(SnapPlacementActor).u3d = function (addedEntity, initialPosition, sortByWarnings, searchDirections, sortAndSelectStrategy) {\n moveToPosition(this, addedEntity, initialPosition);\n var tmp0_elvis_lhs = get_snapRoot(addedEntity);\n var snappingGuestEntity = tmp0_elvis_lhs == null ? addedEntity : tmp0_elvis_lhs;\n var snapActionCandidates = sortAndSelectStrategy.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidatesInScene(snappingGuestEntity, this.l3d_1, this.snapSettings));\n return findBestSnap(this, snapActionCandidates, addedEntity, sortAndSelectStrategy, sortByWarnings, searchDirections);\n };\n protoOf(SnapPlacementActor).snapToSceneFromPosition = function (addedEntity, initialPosition, sortByWarnings, searchDirections, sortAndSelectStrategy, $super) {\n sortAndSelectStrategy = sortAndSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE : sortAndSelectStrategy;\n return this.u3d(addedEntity, initialPosition, sortByWarnings, searchDirections, sortAndSelectStrategy);\n };\n protoOf(SnapPlacementActor).v3d = function (addedEntity, target, initialPosition, sortByWarnings, searchDirections, sortAndSelectStrategy) {\n moveToPosition(this, addedEntity, initialPosition);\n var tmp0_elvis_lhs = get_snapRoot(addedEntity);\n var snappingGuestEntity = tmp0_elvis_lhs == null ? addedEntity : tmp0_elvis_lhs;\n var snapActionCandidates = sortAndSelectStrategy.sortAndSelect(SnapUtils_instance.matchingSnapActionCandidates(snappingGuestEntity, target, this.snapSettings));\n return findBestSnap(this, snapActionCandidates, addedEntity, sortAndSelectStrategy, sortByWarnings, searchDirections);\n };\n protoOf(SnapPlacementActor).snapToHostFromPosition = function (addedEntity, target, initialPosition, sortByWarnings, searchDirections, sortAndSelectStrategy, $super) {\n sortAndSelectStrategy = sortAndSelectStrategy === VOID ? SnapActionCandidateSortAndSelectStrategies_getInstance().SORT_BY_PRIORITY_IN_ACTIVATION_DISTANCE_THEN_DISTANCE : sortAndSelectStrategy;\n return this.v3d(addedEntity, target, initialPosition, sortByWarnings, searchDirections, sortAndSelectStrategy);\n };\n protoOf(SnapPlacementActor).findBestCandidateAndSnap = function (entity, snapActionCandidates, sortByWarnings) {\n if (snapActionCandidates == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n this.k3d_1.addComponent(entity, new SnapCandidateComponent());\n var res = this.m3d_1.getFirstValidSnapAction(snapActionCandidates, sortByWarnings);\n // Inline function 'kotlin.collections.plus' call\n var this_0 = res.errors;\n var elements = res.warnings;\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$1 = this_0.concat(elements);\n var placementResult = performSnapAction(this, entity, res.snapActionCandidate, tmp$ret$1);\n this.k3d_1.removeComponent(entity, Companion_instance_21.id);\n return placementResult;\n }\n return failDueToNoSnaps(this, entity);\n };\n protoOf(SnapPlacementActor).snapToConnector = function (guestEntity, guestConnector, hostEntity, hostConnector) {\n var snapActionCandidate = SnapUtils_instance.createSnapCandidate(guestEntity, guestConnector, hostEntity, hostConnector);\n var tmp;\n if (!(snapActionCandidate == null)) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [snapActionCandidate];\n tmp = this.findBestCandidateAndSnap(guestEntity, tmp$ret$2, true);\n } else {\n tmp = failDueToNoSnaps(this, guestEntity);\n }\n return tmp;\n };\n function DistanceCriterion() {\n SortCriterionBase.call(this);\n }\n protoOf(DistanceCriterion).w3d = function (a, b) {\n var tmp;\n if (a.movement.size < b.movement.size) {\n tmp = 1;\n } else if (a.movement.size > b.movement.size) {\n tmp = -1;\n } else {\n tmp = 0;\n }\n return tmp;\n };\n function FilterCriterion() {\n }\n function InActivationDistanceFilter() {\n }\n protoOf(InActivationDistanceFilter).filterCandidates = function (candidates) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = candidates.length;\n while (inductionVariable < last) {\n var element = candidates[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.snapsorting.InActivationDistanceFilter.filterCandidates.' call\n if (this.filterCandidate(element)) {\n destination.q(element);\n }\n }\n return copyToArray(destination);\n };\n protoOf(InActivationDistanceFilter).filterCandidate = function (candidate) {\n return (candidate == null ? null : candidate.inActivationDistance()) === true;\n };\n function OriginalVariantCriterion() {\n SortCriterionBase.call(this);\n }\n protoOf(OriginalVariantCriterion).w3d = function (a, b) {\n var tmp;\n if (get_hasAutoAdapted(a.guestRoot) === get_hasAutoAdapted(b.guestRoot)) {\n tmp = 0;\n } else if (!get_hasAutoAdapted(a.guestRoot)) {\n tmp = 1;\n } else {\n tmp = -1;\n }\n return tmp;\n };\n function PriorityCriterionSettings$Companion$all$1() {\n this.x3d_1 = false;\n }\n protoOf(PriorityCriterionSettings$Companion$all$1).y3d = function () {\n return this.x3d_1;\n };\n function PriorityCriterionSettings$Companion$onlyInActivationDistance$1() {\n this.z3d_1 = true;\n }\n protoOf(PriorityCriterionSettings$Companion$onlyInActivationDistance$1).y3d = function () {\n return this.z3d_1;\n };\n function Companion_60() {\n Companion_instance_93 = this;\n var tmp = this;\n tmp.all = new PriorityCriterionSettings$Companion$all$1();\n var tmp_0 = this;\n tmp_0.onlyInActivationDistance = new PriorityCriterionSettings$Companion$onlyInActivationDistance$1();\n }\n protoOf(Companion_60).a3e = function () {\n return this.all;\n };\n protoOf(Companion_60).y3d = function () {\n return this.onlyInActivationDistance;\n };\n var Companion_instance_93;\n function Companion_getInstance_69() {\n if (Companion_instance_93 == null)\n new Companion_60();\n return Companion_instance_93;\n }\n function PriorityCriterionSettings() {\n }\n function PriorityCriterion(settings) {\n SortCriterionBase.call(this);\n this.b3e_1 = settings;\n }\n protoOf(PriorityCriterion).w3d = function (a, b) {\n var tmp;\n if (a.inActivationDistance() ? true : !this.b3e_1.onlyInActivationDistance) {\n tmp = a.priority;\n } else {\n tmp = IntCompanionObject_instance.MIN_VALUE;\n }\n var aPrio = tmp;\n var tmp_0;\n if (b.inActivationDistance() ? true : !this.b3e_1.onlyInActivationDistance) {\n tmp_0 = b.priority;\n } else {\n tmp_0 = IntCompanionObject_instance.MIN_VALUE;\n }\n var bPrio = tmp_0;\n return compareTo(aPrio, bPrio);\n };\n function recommendationDistance_0($this, candidate) {\n var result = 0.0;\n var tmp = candidate.guestRoot;\n var tmp0_safe_receiver = tmp.__getComponentForKotlin(59);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.math.absoluteValue' call\n var this_0 = tmp0_safe_receiver.offsetY - candidate.endTransform.position.Y;\n result = Math.abs(this_0);\n }\n var tmp_0 = candidate.guestRoot;\n if (tmp_0.__getComponentForKotlin(60) == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n $this.c3e_1.warn(RecommendedDistanceFromFloorCriterion$recommendationDistance$lambda);\n }\n return result;\n }\n function RecommendedDistanceFromFloorCriterion$recommendationDistance$lambda() {\n return 'PositionFromParent is not yet implemented';\n }\n function RecommendedDistanceFromFloorCriterion() {\n SortCriterionBase.call(this);\n this.c3e_1 = LoggerState_getInstance().m1m('RecommendedDistanceCriterion');\n }\n protoOf(RecommendedDistanceFromFloorCriterion).w3d = function (a, b) {\n var aDist = recommendationDistance_0(this, a);\n var bDist = recommendationDistance_0(this, b);\n return compareTo(bDist, aDist);\n };\n function bestResult($this, a, b) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstNotNullOfOrNull' call\n var tmp0_iterator = $this.d3e_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.snapsorting.SnapSorter.bestResult.' call\n var result = element.bestResult(a, b);\n if (!(result == null)) {\n tmp$ret$1 = result;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var best = tmp$ret$1;\n return best;\n }\n function bestCandidate($this, a, b) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstNotNullOfOrNull' call\n var tmp0_iterator = $this.d3e_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.snapsorting.SnapSorter.bestCandidate.' call\n var result = element.bestCandidate(a, b);\n if (!(result == null)) {\n tmp$ret$1 = result;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n }\n function sam$kotlin_Comparator$0_5(function_0) {\n this.f3e_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_5).u1j = function (a, b) {\n return this.f3e_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_5).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function sam$kotlin_Comparator$0_6(function_0) {\n this.g3e_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_6).u1j = function (a, b) {\n return this.g3e_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_6).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function SnapSorter$sortResults$lambda(this$0) {\n return function (a, b) {\n var best = bestResult(this$0, a, b);\n var tmp;\n if (best == null) {\n tmp = 0;\n } else if (equals(best, a)) {\n tmp = -1;\n } else {\n tmp = 1;\n }\n return tmp;\n };\n }\n function SnapSorter$sortCandidates$lambda(this$0) {\n return function (a, b) {\n var best = bestCandidate(this$0, a, b);\n var tmp;\n if (best == null) {\n tmp = 0;\n } else if (equals(best, a)) {\n tmp = -1;\n } else {\n tmp = 1;\n }\n return tmp;\n };\n }\n function SnapSorter(sortCriteria, filters) {\n this.d3e_1 = sortCriteria;\n this.e3e_1 = filters;\n }\n protoOf(SnapSorter).filterResults = function (results) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = results.length;\n while (inductionVariable < last) {\n var element = results[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.snapsorting.SnapSorter.filterResults.' call\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = this.e3e_1;\n var tmp;\n if (isInterface(this_0, Collection)) {\n tmp = this_0.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.snapsorting.SnapSorter.filterResults..' call\n if (!element_0.filterCandidate(element.snapActionCandidate)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n if (tmp$ret$0) {\n destination.q(element);\n }\n }\n return copyToArray(destination);\n };\n protoOf(SnapSorter).filterCandidates = function (snapCandidates) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = snapCandidates.length;\n while (inductionVariable < last) {\n var element = snapCandidates[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.snapsorting.SnapSorter.filterCandidates.' call\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = this.e3e_1;\n var tmp;\n if (isInterface(this_0, Collection)) {\n tmp = this_0.b1();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.snapsorting.SnapSorter.filterCandidates..' call\n if (!element_0.filterCandidate(element)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n if (tmp$ret$0) {\n destination.q(element);\n }\n }\n return copyToArray(destination);\n };\n protoOf(SnapSorter).sortResults = function (results) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = this.filterResults(results);\n var tmp_0 = SnapSorter$sortResults$lambda(this);\n var this_0 = sortedWith_0(tmp, new sam$kotlin_Comparator$0_5(tmp_0));\n return copyToArray(this_0);\n };\n protoOf(SnapSorter).sortCandidates = function (snapCandidates) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = this.filterCandidates(snapCandidates);\n var tmp_0 = SnapSorter$sortCandidates$lambda(this);\n var this_0 = sortedWith_0(tmp, new sam$kotlin_Comparator$0_6(tmp_0));\n return copyToArray(this_0);\n };\n protoOf(SnapSorter).bestCandidate = function (snapCandidates) {\n var bestSoFar = null;\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = snapCandidates.length;\n while (inductionVariable < last) {\n var element = snapCandidates[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.snapsorting.SnapSorter.bestCandidate.' call\n var tmp0_safe_receiver = bestSoFar;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.placement.snapsorting.SnapSorter.bestCandidate..' call\n tmp = bestCandidate(this, tmp0_safe_receiver, element);\n }\n var tmp1_elvis_lhs = tmp;\n bestSoFar = tmp1_elvis_lhs == null ? element : tmp1_elvis_lhs;\n }\n return bestSoFar;\n };\n protoOf(SnapSorter).bestResult = function (results) {\n var bestSoFar = null;\n var failingBestSoFar = null;\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = results.length;\n while (inductionVariable < last) {\n var element = results[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.snapsorting.SnapSorter.bestResult.' call\n if (element.valid) {\n var tmp0_safe_receiver = bestSoFar;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.placement.snapsorting.SnapSorter.bestResult..' call\n tmp = bestResult(this, tmp0_safe_receiver, element);\n }\n var tmp1_elvis_lhs = tmp;\n bestSoFar = tmp1_elvis_lhs == null ? element : tmp1_elvis_lhs;\n } else {\n var tmp_0;\n if (bestSoFar == null) {\n var tmp2_safe_receiver = failingBestSoFar;\n var tmp_1;\n if (tmp2_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.placement.snapsorting.SnapSorter.bestResult..' call\n tmp_1 = bestResult(this, tmp2_safe_receiver, element);\n }\n var tmp3_elvis_lhs = tmp_1;\n tmp_0 = tmp3_elvis_lhs == null ? element : tmp3_elvis_lhs;\n } else {\n tmp_0 = null;\n }\n failingBestSoFar = tmp_0;\n }\n }\n var tmp0_elvis_lhs = bestSoFar;\n return tmp0_elvis_lhs == null ? failingBestSoFar : tmp0_elvis_lhs;\n };\n function SnapSorterBuilder() {\n var tmp = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp.h3e_1 = ArrayList_init_$Create$();\n var tmp_0 = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp_0.i3e_1 = ArrayList_init_$Create$();\n }\n protoOf(SnapSorterBuilder).build = function () {\n return new SnapSorter(this.h3e_1, this.i3e_1);\n };\n protoOf(SnapSorterBuilder).addInActivationDistanceFilter = function () {\n this.i3e_1.q(new InActivationDistanceFilter());\n return this;\n };\n protoOf(SnapSorterBuilder).addDistanceCriterion = function () {\n this.h3e_1.q(new DistanceCriterion());\n return this;\n };\n protoOf(SnapSorterBuilder).addOriginalVariantCriterion = function () {\n this.h3e_1.q(new OriginalVariantCriterion());\n return this;\n };\n protoOf(SnapSorterBuilder).addConnectorPriorityCriterion = function (settings) {\n this.h3e_1.q(new PriorityCriterion(settings));\n return this;\n };\n protoOf(SnapSorterBuilder).addRecommendedDistanceFromFloorCriterion = function () {\n this.h3e_1.q(new RecommendedDistanceFromFloorCriterion());\n return this;\n };\n protoOf(SnapSorterBuilder).addWarningsCriterion = function () {\n this.h3e_1.q(new WarningsCriterion());\n return this;\n };\n protoOf(SnapSorterBuilder).addCustomCriterion = function (sortCriterion) {\n this.h3e_1.q(sortCriterion);\n return this;\n };\n protoOf(SnapSorterBuilder).addCustomFilter = function (filterCriterion) {\n this.i3e_1.q(filterCriterion);\n return this;\n };\n function SortCriterion() {\n }\n function SortCriterionBase() {\n }\n protoOf(SortCriterionBase).bestResult = function (a, b) {\n var tmp0_elvis_lhs = a.snapActionCandidate;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return b;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var aSnap = tmp;\n var tmp1_elvis_lhs = b.snapActionCandidate;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return a;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var bSnap = tmp_0;\n var c = this.w3d(aSnap, bSnap);\n var tmp_1;\n if (c === 0) {\n tmp_1 = null;\n } else if (c > 0) {\n tmp_1 = a;\n } else {\n tmp_1 = b;\n }\n return tmp_1;\n };\n protoOf(SortCriterionBase).bestCandidate = function (a, b) {\n var c = this.w3d(a, b);\n var tmp;\n if (c === 0) {\n tmp = null;\n } else if (c > 0) {\n tmp = a;\n } else {\n tmp = b;\n }\n return tmp;\n };\n function WarningsCriterion() {\n }\n protoOf(WarningsCriterion).bestResult = function (a, b) {\n if (a.snapActionCandidate == null ? b.snapActionCandidate == null : false) {\n return null;\n }\n if (a.snapActionCandidate == null)\n return b;\n if (b.snapActionCandidate == null)\n return a;\n var aWarnings = a.warnings.length;\n var bWarnings = b.warnings.length;\n var tmp;\n if (aWarnings > bWarnings) {\n tmp = b;\n } else if (aWarnings < bWarnings) {\n tmp = a;\n } else {\n tmp = null;\n }\n return tmp;\n };\n protoOf(WarningsCriterion).bestCandidate = function (a, b) {\n return null;\n };\n function sam$kotlin_Comparator$0_7(function_0) {\n this.j3e_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_7).u1j = function (a, b) {\n return this.j3e_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_7).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function sam$kotlin_Comparator$0_8(function_0) {\n this.k3e_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_8).u1j = function (a, b) {\n return this.k3e_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_8).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function SpaceFinderUtils$getNewValidCandidatesOnSameConnectorsUsingSearchDirections$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n var tmp = a.ye_1.movement.size;\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n var tmp$ret$1 = b.ye_1.movement.size;\n return compareValues(tmp, tmp$ret$1);\n }\n function SpaceFinderUtils$getNewValidCandidatesOnSameConnectorsUsingSearchDirections$lambda_0(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n var tmp = a.movement.size;\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n var tmp$ret$1 = b.movement.size;\n return compareValues(tmp, tmp$ret$1);\n }\n function SpaceFinderUtils$getNewCandidatesOnSameConnectorUsingSearchDirections$lambda($candidateWithContinuousHost) {\n return function (a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewCandidatesOnSameConnectorUsingSearchDirections.' call\n var tmp = $candidateWithContinuousHost.endTransform.position.distanceTo(a);\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewCandidatesOnSameConnectorUsingSearchDirections.' call\n var tmp$ret$1 = $candidateWithContinuousHost.endTransform.position.distanceTo(b);\n return compareValues(tmp, tmp$ret$1);\n };\n }\n function SpaceFinderUtils() {\n SpaceFinderUtils_instance = this;\n this.l3e_1 = LoggerState_getInstance().m1m('SpaceFinderUtils');\n }\n protoOf(SpaceFinderUtils).getNewValidCandidatesOnSameConnectorsUsingSearchDirections = function (validationService, originalSnaps, iterations) {\n // Inline function 'kotlin.collections.mutableSetOf' call\n var testedHostConnectors = LinkedHashSet_init_$Create$();\n // Inline function 'kotlin.collections.mutableListOf' call\n var searchDirectionCandidates = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(originalSnaps.length);\n var inductionVariable = 0;\n var last = originalSnaps.length;\n while (inductionVariable < last) {\n var item = originalSnaps[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n var tmp$ret$2 = new Pair(item, validationService.evaluateSnapCandidate(item, true));\n destination.q(tmp$ret$2);\n }\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp = SpaceFinderUtils$getNewValidCandidatesOnSameConnectorsUsingSearchDirections$lambda;\n var tmp$ret$5 = new sam$kotlin_Comparator$0_7(tmp);\n var results = sortedWith(destination, tmp$ret$5);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = results.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n if (!element.ze_1.valid) {\n destination_0.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_0, 10));\n var tmp0_iterator_0 = destination_0.t();\n while (tmp0_iterator_0.u()) {\n var item_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n var tmp$ret$10 = item_0.ye_1;\n destination_1.q(tmp$ret$10);\n }\n var invalidSnaps = copyToArray(destination_1);\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_2 = ArrayList_init_$Create$();\n var tmp0_iterator_1 = results.t();\n while (tmp0_iterator_1.u()) {\n var element_0 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n if (element_0.ze_1.valid) {\n destination_2.q(element_0);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_2, 10));\n var tmp0_iterator_2 = destination_2.t();\n while (tmp0_iterator_2.u()) {\n var item_1 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n var tmp$ret$17 = item_1.ze_1;\n destination_3.q(tmp$ret$17);\n }\n var originallyValidSnaps = destination_3;\n // Inline function 'kotlin.collections.find' call\n var this_0 = validationService.validations;\n var tmp$ret$21;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_0 = 0;\n var last_0 = this_0.length;\n while (inductionVariable_0 < last_0) {\n var element_1 = this_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n var tmp_0;\n if (element_1 instanceof CollisionValidation) {\n tmp_0 = element_1.isEnabled;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$21 = element_1;\n break $l$block;\n }\n }\n tmp$ret$21 = null;\n }\n var tmp_1 = tmp$ret$21;\n var collisionValidation = (tmp_1 == null ? true : tmp_1 instanceof CollisionValidation) ? tmp_1 : THROW_CCE();\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_2 = SpaceFinderUtils$getNewValidCandidatesOnSameConnectorsUsingSearchDirections$lambda_0;\n var tmp$ret$23 = new sam$kotlin_Comparator$0_7(tmp_2);\n var tmp0_iterator_3 = sortedWith_0(invalidSnaps, tmp$ret$23).t();\n while (tmp0_iterator_3.u()) {\n var element_2 = tmp0_iterator_3.w();\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n var isCandidateForSearchDirections = element_2.hostConnector.isContinuousConnector ? !testedHostConnectors.p(element_2.hostConnector) : false;\n if (isCandidateForSearchDirections) {\n var newCandidates = SpaceFinderUtils_getInstance().getNewCandidatesOnSameConnectorUsingSearchDirections(element_2, iterations, collisionValidation);\n addAll(searchDirectionCandidates, newCandidates);\n testedHostConnectors.q(element_2.hostConnector);\n }\n }\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(searchDirectionCandidates, 10));\n var tmp0_iterator_4 = searchDirectionCandidates.t();\n while (tmp0_iterator_4.u()) {\n var item_2 = tmp0_iterator_4.w();\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n var tmp$ret$25 = validationService.evaluateSnapCandidate(item_2, true);\n destination_4.q(tmp$ret$25);\n }\n var validatedSearchDirectionSnaps = destination_4;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_5 = ArrayList_init_$Create$();\n var tmp0_iterator_5 = validatedSearchDirectionSnaps.t();\n while (tmp0_iterator_5.u()) {\n var element_3 = tmp0_iterator_5.w();\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewValidCandidatesOnSameConnectorsUsingSearchDirections.' call\n if (element_3.valid) {\n destination_5.q(element_3);\n }\n }\n var this_1 = plus_1(originallyValidSnaps, destination_5);\n var validSnaps = copyToArray(this_1);\n return validSnaps;\n };\n protoOf(SpaceFinderUtils).m3e = function (candidateWithContinuousHost, directionConnectorSpace, entityCollidedWith, extraSizeMultiplesMovedOut) {\n var guestWorld = candidateWithContinuousHost.endTransform;\n var hostWorld = get_worldTransform(candidateWithContinuousHost.host);\n var sizeWorldSpace = guestWorld.transformVector(get_objectOrientedBoundingBoxForHierarchy(candidateWithContinuousHost.guestRoot).size);\n var hostConnectorWorldTransform = hostWorld.concatenate(candidateWithContinuousHost.hostConnector.transform);\n var sizeHostConnectorSpace = hostConnectorWorldTransform.inverseTransformVector(sizeWorldSpace);\n var guestPositionInHostConnectorSpace = hostConnectorWorldTransform.inverseTransformPosition(guestWorld.position);\n var collidedSizeLocalSpace = get_objectOrientedBoundingBoxForHierarchy(entityCollidedWith);\n var collidedSizeWorldSpace = collidedSizeLocalSpace.transform(get_worldTransform(entityCollidedWith));\n var collidedSizeConnectorSpace = collidedSizeWorldSpace.transform(hostConnectorWorldTransform.inverse()).axisAlignedBoundingBox;\n var diffBetweenEntities = collidedSizeConnectorSpace.center.minus(guestPositionInHostConnectorSpace);\n // Inline function 'kotlin.math.sign' call\n var x = directionConnectorSpace.dot(diffBetweenEntities);\n var signMove = sign(x);\n // Inline function 'kotlin.math.abs' call\n var x_0 = directionConnectorSpace.dot(diffBetweenEntities);\n var moveToSamePosition = signMove * Math.abs(x_0);\n // Inline function 'kotlin.math.abs' call\n var x_1 = sizeHostConnectorSpace.dot(directionConnectorSpace);\n var moveDueToOwnSize = Math.abs(x_1);\n var extraSizeMultiplesMovedOutVector = moveDueToOwnSize * extraSizeMultiplesMovedOut;\n // Inline function 'kotlin.math.abs' call\n var x_2 = collidedSizeConnectorSpace.size.dot(directionConnectorSpace);\n var move = moveToSamePosition + Math.abs(x_2) / 2 + moveDueToOwnSize / 2 + extraSizeMultiplesMovedOutVector;\n var moveWorldSpace = hostConnectorWorldTransform.transformVector(directionConnectorSpace.times(move));\n var worldSpacePosition = candidateWithContinuousHost.endTransform.position.plus(moveWorldSpace);\n return worldSpacePosition;\n };\n protoOf(SpaceFinderUtils).getPositionToDirectionOfCollision = function (candidateWithContinuousHost, directionConnectorSpace, entityCollidedWith, extraSizeMultiplesMovedOut, $super) {\n extraSizeMultiplesMovedOut = extraSizeMultiplesMovedOut === VOID ? 0 : extraSizeMultiplesMovedOut;\n return this.m3e(candidateWithContinuousHost, directionConnectorSpace, entityCollidedWith, extraSizeMultiplesMovedOut);\n };\n protoOf(SpaceFinderUtils).n3e = function (candidateWithContinuousHost, iterations, collisionValidation) {\n if (!candidateWithContinuousHost.hostConnector.isContinuousConnector) {\n // Inline function 'kotlin.emptyArray' call\n return [];\n }\n var size = get_objectOrientedBoundingBoxForHierarchy(candidateWithContinuousHost.guestRoot).size;\n // Inline function 'kotlin.collections.mutableListOf' call\n var positions = ArrayList_init_$Create$();\n candidateWithContinuousHost.perform();\n var collisionResult = collisionValidation == null ? null : collisionValidation.validateSnap(candidateWithContinuousHost);\n candidateWithContinuousHost.rollback();\n var tmp2_safe_receiver = collisionResult == null ? null : collisionResult.collisions;\n var tmp;\n if (tmp2_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$3;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewCandidatesOnSameConnectorUsingSearchDirections.' call\n var tmp_0;\n if (!element.other.hasComponent(RoomComponent_instance.id)) {\n tmp_0 = !element.other.hasComponent(103);\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$3 = element;\n break $l$block;\n }\n }\n tmp$ret$3 = null;\n }\n tmp = tmp$ret$3;\n }\n var tmp3_safe_receiver = tmp;\n var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.other;\n var entityCollidedWith = tmp4_safe_receiver == null ? null : get_snapRoot(tmp4_safe_receiver);\n if (!(entityCollidedWith == null)) {\n var iterationsOnSide = iterations / 2 | 0;\n var leftPos = this.getPositionToDirectionOfCollision(candidateWithContinuousHost, Companion_getInstance_4().LEFT, entityCollidedWith, iterationsOnSide);\n var leftSidePositions = this.getPositionsOnConnector(candidateWithContinuousHost, size, iterationsOnSide, leftPos, false);\n addAll(positions, leftSidePositions);\n var rightPos = this.getPositionToDirectionOfCollision(candidateWithContinuousHost, Companion_getInstance_4().RIGHT, entityCollidedWith, iterationsOnSide);\n var rightSidePositions = this.getPositionsOnConnector(candidateWithContinuousHost, size, iterationsOnSide, rightPos, false);\n addAll(positions, rightSidePositions);\n var forwardPos = this.getPositionToDirectionOfCollision(candidateWithContinuousHost, Companion_getInstance_4().FORWARD, entityCollidedWith, iterationsOnSide);\n var forwardSidePositions = this.getPositionsOnConnector(candidateWithContinuousHost, size, iterationsOnSide, forwardPos, false);\n addAll(positions, forwardSidePositions);\n var backwardPos = this.getPositionToDirectionOfCollision(candidateWithContinuousHost, Companion_getInstance_4().BACK, entityCollidedWith, iterationsOnSide);\n var backSidePositions = this.getPositionsOnConnector(candidateWithContinuousHost, size, iterationsOnSide, backwardPos, false);\n addAll(positions, backSidePositions);\n } else {\n var newPositions = this.getPositionsOnConnector(candidateWithContinuousHost, size, iterations);\n addAll(positions, newPositions);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_1 = SpaceFinderUtils$getNewCandidatesOnSameConnectorUsingSearchDirections$lambda(candidateWithContinuousHost);\n var tmp$ret$5 = new sam$kotlin_Comparator$0_8(tmp_1);\n var this_0 = sortedWith(positions, tmp$ret$5);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getNewCandidatesOnSameConnectorUsingSearchDirections.' call\n var tmp$ret$7 = candidateWithContinuousHost.withNewPosition(item);\n destination.q(tmp$ret$7);\n }\n var newCandidates = copyToArray(destination);\n return newCandidates;\n };\n protoOf(SpaceFinderUtils).getNewCandidatesOnSameConnectorUsingSearchDirections = function (candidateWithContinuousHost, iterations, collisionValidation, $super) {\n collisionValidation = collisionValidation === VOID ? null : collisionValidation;\n return this.n3e(candidateWithContinuousHost, iterations, collisionValidation);\n };\n protoOf(SpaceFinderUtils).o3e = function (candidateWithContinuousHost, size, iterations, overridePosition, ignoreSamePosition) {\n var hostWorld = get_worldTransform(candidateWithContinuousHost.host);\n var hostConnectorWorldTransform = hostWorld.concatenate(candidateWithContinuousHost.hostConnector.transform);\n var endTransform = overridePosition == null ? candidateWithContinuousHost.endTransform : new Transform(overridePosition, candidateWithContinuousHost.endTransform.rotation);\n var guestEndTransformWorld = endTransform.concatenate(candidateWithContinuousHost.guestRootToGuestDeltaTransform);\n var guestConnectorWorldPos = guestEndTransformWorld.transformPosition(candidateWithContinuousHost.guestConnector.transform.position);\n var guestConnectorHostSpacePos = hostWorld.inverseTransformPosition(guestConnectorWorldPos);\n var hostConnector = candidateWithContinuousHost.hostConnector;\n var tmp;\n if (hostConnector instanceof EdgeConnector) {\n var transformedSizeWorld = endTransform.transformVector(size);\n var transformedSizeHostLocal = hostWorld.inverseTransformVector(transformedSizeWorld);\n var sizeAlongHostConnector = hostConnector.direction.dot(transformedSizeHostLocal);\n var incrementHostSpace = hostConnector.direction.times(sizeAlongHostConnector);\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_0 = numberRangeToNumber(-iterations | 0, iterations);\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getPositionsOnConnector.' call\n var incrementLocalSpace = incrementHostSpace.__timesIntForKotlin(element);\n var isOnConnector = hostConnector.contains(guestConnectorHostSpacePos.plus(incrementLocalSpace));\n var tmp_0;\n if ((ignoreSamePosition ? element === 0 : false) ? true : !isOnConnector) {\n tmp_0 = null;\n } else {\n var posWorldSpace = endTransform.position.plus(hostWorld.transformVector(incrementLocalSpace));\n tmp_0 = posWorldSpace;\n }\n var tmp0_safe_receiver = tmp_0;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n tmp = destination;\n } else {\n if (hostConnector instanceof SurfaceConnector) {\n var rightGuestSpace = endTransform.inverseTransformVector(hostConnectorWorldTransform.right);\n var forwardGuestSpace = endTransform.inverseTransformVector(hostConnectorWorldTransform.forward);\n var moveAmountRight = rightGuestSpace.dot(size);\n var moveAmountForward = forwardGuestSpace.dot(size);\n var right = hostConnectorWorldTransform.right.times(moveAmountRight);\n var forward = hostConnectorWorldTransform.forward.times(moveAmountForward);\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_1 = numberRangeToNumber(-iterations | 0, iterations);\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = this_1.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getPositionsOnConnector.' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_2 = numberRangeToNumber(-iterations | 0, iterations);\n var destination_1 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_1 = this_2.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.placement.utils.SpaceFinderUtils.getPositionsOnConnector..' call\n var incrementWorldSpace = right.__timesIntForKotlin(element_0).plus(forward.__timesIntForKotlin(element_1));\n var incrementLocalSpace_0 = hostWorld.inverseTransformVector(incrementWorldSpace);\n var isOnConnector_0 = hostConnector.contains(guestConnectorHostSpacePos.plus(incrementLocalSpace_0));\n var tmp_1;\n if (((ignoreSamePosition ? element_0 === 0 : false) ? element_1 === 0 : false) ? true : !isOnConnector_0) {\n tmp_1 = null;\n } else {\n var posWorldSpace_0 = endTransform.position.plus(incrementWorldSpace);\n tmp_1 = posWorldSpace_0;\n }\n var tmp0_safe_receiver_0 = tmp_1;\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_1.q(tmp0_safe_receiver_0);\n }\n }\n var list = destination_1;\n addAll_0(destination_0, list);\n }\n tmp = destination_0;\n } else {\n tmp = emptyList();\n }\n }\n var result = tmp;\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(result);\n };\n protoOf(SpaceFinderUtils).getPositionsOnConnector = function (candidateWithContinuousHost, size, iterations, overridePosition, ignoreSamePosition, $super) {\n overridePosition = overridePosition === VOID ? null : overridePosition;\n ignoreSamePosition = ignoreSamePosition === VOID ? true : ignoreSamePosition;\n return this.o3e(candidateWithContinuousHost, size, iterations, overridePosition, ignoreSamePosition);\n };\n var SpaceFinderUtils_instance;\n function SpaceFinderUtils_getInstance() {\n if (SpaceFinderUtils_instance == null)\n new SpaceFinderUtils();\n return SpaceFinderUtils_instance;\n }\n function ProppingData(productRef, spec, colliderBox, guestConnector, demands) {\n this.productRef = productRef;\n this.spec = spec;\n this.colliderBox = colliderBox;\n this.guestConnector = guestConnector;\n this.demands = demands;\n }\n protoOf(ProppingData).j1l = function () {\n return this.productRef;\n };\n protoOf(ProppingData).p3e = function () {\n return this.spec;\n };\n protoOf(ProppingData).q3e = function () {\n return this.colliderBox;\n };\n protoOf(ProppingData).p1v = function () {\n return this.guestConnector;\n };\n protoOf(ProppingData).r3e = function () {\n return this.demands;\n };\n protoOf(ProppingData).height = function () {\n return numberToInt(this.colliderBox.axisAlignedBoundingBox.height);\n };\n protoOf(ProppingData).af = function () {\n return this.productRef;\n };\n protoOf(ProppingData).bf = function () {\n return this.spec;\n };\n protoOf(ProppingData).g1k = function () {\n return this.colliderBox;\n };\n protoOf(ProppingData).h1k = function () {\n return this.guestConnector;\n };\n protoOf(ProppingData).i1k = function () {\n return this.demands;\n };\n protoOf(ProppingData).s3e = function (productRef, spec, colliderBox, guestConnector, demands) {\n return new ProppingData(productRef, spec, colliderBox, guestConnector, demands);\n };\n protoOf(ProppingData).copy = function (productRef, spec, colliderBox, guestConnector, demands, $super) {\n productRef = productRef === VOID ? this.productRef : productRef;\n spec = spec === VOID ? this.spec : spec;\n colliderBox = colliderBox === VOID ? this.colliderBox : colliderBox;\n guestConnector = guestConnector === VOID ? this.guestConnector : guestConnector;\n demands = demands === VOID ? this.demands : demands;\n return this.s3e(productRef, spec, colliderBox, guestConnector, demands);\n };\n protoOf(ProppingData).toString = function () {\n return 'ProppingData(productRef=' + this.productRef + ', spec=' + this.spec + ', colliderBox=' + this.colliderBox + ', guestConnector=' + this.guestConnector + ', demands=' + this.demands + ')';\n };\n protoOf(ProppingData).hashCode = function () {\n var result = getStringHashCode(this.productRef);\n result = imul(result, 31) + this.spec.hashCode() | 0;\n result = imul(result, 31) + hashCode(this.colliderBox) | 0;\n result = imul(result, 31) + this.guestConnector.hashCode() | 0;\n result = imul(result, 31) + getStringHashCode(this.demands) | 0;\n return result;\n };\n protoOf(ProppingData).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ProppingData))\n return false;\n var tmp0_other_with_cast = other instanceof ProppingData ? other : THROW_CCE();\n if (!(this.productRef === tmp0_other_with_cast.productRef))\n return false;\n if (!this.spec.equals(tmp0_other_with_cast.spec))\n return false;\n if (!equals(this.colliderBox, tmp0_other_with_cast.colliderBox))\n return false;\n if (!this.guestConnector.equals(tmp0_other_with_cast.guestConnector))\n return false;\n if (!(this.demands === tmp0_other_with_cast.demands))\n return false;\n return true;\n };\n function Companion_61() {\n this.ID = 2;\n }\n protoOf(Companion_61).u1n = function () {\n return this.ID;\n };\n var Companion_instance_94;\n function Companion_getInstance_70() {\n return Companion_instance_94;\n }\n function ProppingHostConnectorsComponent(proppingHostConnectors) {\n this.proppingHostConnectors = proppingHostConnectors;\n }\n protoOf(ProppingHostConnectorsComponent).t3e = function () {\n return this.proppingHostConnectors;\n };\n protoOf(ProppingHostConnectorsComponent).x1k = function () {\n return 2;\n };\n protoOf(ProppingHostConnectorsComponent).eq = function (other) {\n if (!(other instanceof ProppingHostConnectorsComponent))\n THROW_CCE();\n return contentEquals(this.proppingHostConnectors, other.proppingHostConnectors);\n };\n function get_proppingHostConnectors(_this__u8e3s4) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(2);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.proppingHostConnectors;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n }\n function get_proppingHostEntitiesInHierarchy(_this__u8e3s4) {\n var tmp = HierarchyUtils_instance;\n return tmp.getDescendantsWithComponent(_this__u8e3s4, 2);\n }\n function ProppingHostConnectorData(propHoldingEntity, proppingHostConnector) {\n this.propHoldingEntity = propHoldingEntity;\n this.proppingHostConnector = proppingHostConnector;\n }\n protoOf(ProppingHostConnectorData).u3e = function () {\n return this.propHoldingEntity;\n };\n protoOf(ProppingHostConnectorData).v3e = function () {\n return this.proppingHostConnector;\n };\n protoOf(ProppingHostConnectorData).af = function () {\n return this.propHoldingEntity;\n };\n protoOf(ProppingHostConnectorData).bf = function () {\n return this.proppingHostConnector;\n };\n protoOf(ProppingHostConnectorData).w3e = function (propHoldingEntity, proppingHostConnector) {\n return new ProppingHostConnectorData(propHoldingEntity, proppingHostConnector);\n };\n protoOf(ProppingHostConnectorData).copy = function (propHoldingEntity, proppingHostConnector, $super) {\n propHoldingEntity = propHoldingEntity === VOID ? this.propHoldingEntity : propHoldingEntity;\n proppingHostConnector = proppingHostConnector === VOID ? this.proppingHostConnector : proppingHostConnector;\n return this.w3e(propHoldingEntity, proppingHostConnector);\n };\n protoOf(ProppingHostConnectorData).toString = function () {\n return 'ProppingHostConnectorData(propHoldingEntity=' + this.propHoldingEntity + ', proppingHostConnector=' + this.proppingHostConnector + ')';\n };\n protoOf(ProppingHostConnectorData).hashCode = function () {\n var result = this.propHoldingEntity.hashCode();\n result = imul(result, 31) + this.proppingHostConnector.hashCode() | 0;\n return result;\n };\n protoOf(ProppingHostConnectorData).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ProppingHostConnectorData))\n return false;\n var tmp0_other_with_cast = other instanceof ProppingHostConnectorData ? other : THROW_CCE();\n if (!this.propHoldingEntity.equals(tmp0_other_with_cast.propHoldingEntity))\n return false;\n if (!this.proppingHostConnector.equals(tmp0_other_with_cast.proppingHostConnector))\n return false;\n return true;\n };\n function Companion_62() {\n this.ID = 87;\n }\n protoOf(Companion_62).u1n = function () {\n return this.ID;\n };\n var Companion_instance_95;\n function Companion_getInstance_71() {\n return Companion_instance_95;\n }\n function ProppingInfoComponent(propHolderInfos) {\n this.propHolderInfos = propHolderInfos;\n }\n protoOf(ProppingInfoComponent).x3e = function () {\n return this.propHolderInfos;\n };\n protoOf(ProppingInfoComponent).x1k = function () {\n return 87;\n };\n protoOf(ProppingInfoComponent).eq = function (other) {\n return false;\n };\n protoOf(ProppingInfoComponent).af = function () {\n return this.propHolderInfos;\n };\n protoOf(ProppingInfoComponent).y3e = function (propHolderInfos) {\n return new ProppingInfoComponent(propHolderInfos);\n };\n protoOf(ProppingInfoComponent).copy = function (propHolderInfos, $super) {\n propHolderInfos = propHolderInfos === VOID ? this.propHolderInfos : propHolderInfos;\n return this.y3e(propHolderInfos);\n };\n protoOf(ProppingInfoComponent).toString = function () {\n return 'ProppingInfoComponent(propHolderInfos=' + this.propHolderInfos + ')';\n };\n protoOf(ProppingInfoComponent).hashCode = function () {\n return hashCode(this.propHolderInfos);\n };\n protoOf(ProppingInfoComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ProppingInfoComponent))\n return false;\n var tmp0_other_with_cast = other instanceof ProppingInfoComponent ? other : THROW_CCE();\n if (!equals(this.propHolderInfos, tmp0_other_with_cast.propHolderInfos))\n return false;\n return true;\n };\n function PropHolderInfo(connector, propping, colliderBox, oldPropping, shapeComponent) {\n shapeComponent = shapeComponent === VOID ? null : shapeComponent;\n this.connector = connector;\n this.propping = propping;\n this.colliderBox = colliderBox;\n this.oldPropping = oldPropping;\n this.shapeComponent = shapeComponent;\n }\n protoOf(PropHolderInfo).n1k = function () {\n return this.connector;\n };\n protoOf(PropHolderInfo).z3e = function () {\n return this.propping;\n };\n protoOf(PropHolderInfo).q3e = function () {\n return this.colliderBox;\n };\n protoOf(PropHolderInfo).a3f = function () {\n return this.oldPropping;\n };\n protoOf(PropHolderInfo).b3f = function () {\n return this.shapeComponent;\n };\n protoOf(PropHolderInfo).af = function () {\n return this.connector;\n };\n protoOf(PropHolderInfo).bf = function () {\n return this.propping;\n };\n protoOf(PropHolderInfo).g1k = function () {\n return this.colliderBox;\n };\n protoOf(PropHolderInfo).h1k = function () {\n return this.oldPropping;\n };\n protoOf(PropHolderInfo).i1k = function () {\n return this.shapeComponent;\n };\n protoOf(PropHolderInfo).c3f = function (connector, propping, colliderBox, oldPropping, shapeComponent) {\n return new PropHolderInfo(connector, propping, colliderBox, oldPropping, shapeComponent);\n };\n protoOf(PropHolderInfo).copy = function (connector, propping, colliderBox, oldPropping, shapeComponent, $super) {\n connector = connector === VOID ? this.connector : connector;\n propping = propping === VOID ? this.propping : propping;\n colliderBox = colliderBox === VOID ? this.colliderBox : colliderBox;\n oldPropping = oldPropping === VOID ? this.oldPropping : oldPropping;\n shapeComponent = shapeComponent === VOID ? this.shapeComponent : shapeComponent;\n return this.c3f(connector, propping, colliderBox, oldPropping, shapeComponent);\n };\n protoOf(PropHolderInfo).toString = function () {\n return 'PropHolderInfo(connector=' + this.connector + ', propping=' + this.propping + ', colliderBox=' + this.colliderBox + ', oldPropping=' + this.oldPropping + ', shapeComponent=' + this.shapeComponent + ')';\n };\n protoOf(PropHolderInfo).hashCode = function () {\n var result = this.connector.hashCode();\n result = imul(result, 31) + (this.propping == null ? 0 : this.propping.hashCode()) | 0;\n result = imul(result, 31) + (this.colliderBox == null ? 0 : hashCode(this.colliderBox)) | 0;\n result = imul(result, 31) + (this.oldPropping == null ? 0 : this.oldPropping.hashCode()) | 0;\n result = imul(result, 31) + (this.shapeComponent == null ? 0 : this.shapeComponent.hashCode()) | 0;\n return result;\n };\n protoOf(PropHolderInfo).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PropHolderInfo))\n return false;\n var tmp0_other_with_cast = other instanceof PropHolderInfo ? other : THROW_CCE();\n if (!this.connector.equals(tmp0_other_with_cast.connector))\n return false;\n if (!equals(this.propping, tmp0_other_with_cast.propping))\n return false;\n if (!equals(this.colliderBox, tmp0_other_with_cast.colliderBox))\n return false;\n if (!equals(this.oldPropping, tmp0_other_with_cast.oldPropping))\n return false;\n if (!equals(this.shapeComponent, tmp0_other_with_cast.shapeComponent))\n return false;\n return true;\n };\n function getPropHolderInfo(_this__u8e3s4, connector) {\n var tmp0_safe_receiver = _this__u8e3s4.__getComponentForKotlin(87);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.propHolderInfos;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = tmp1_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.propping.getPropHolderInfo.' call\n if (element.connector.key === connector.key) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp = tmp$ret$1;\n }\n return tmp;\n }\n function getPropping(_this__u8e3s4, connector) {\n var tmp0_safe_receiver = getPropHolderInfo(_this__u8e3s4, connector);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.propping;\n }\n function setPropping(_this__u8e3s4, proppingHostConnector, propping) {\n setProppingProperty(_this__u8e3s4, proppingHostConnector, setPropping$lambda(propping));\n if (!(propping == null)) {\n clearOldPropping(_this__u8e3s4, proppingHostConnector);\n }\n }\n function getColliderBox(_this__u8e3s4, connector) {\n var tmp0_safe_receiver = getPropHolderInfo(_this__u8e3s4, connector);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.colliderBox;\n }\n function getOldPropping(_this__u8e3s4, connector) {\n var tmp0_safe_receiver = getPropHolderInfo(_this__u8e3s4, connector);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oldPropping;\n }\n function setOldPropping(_this__u8e3s4, proppingHostConnector, oldPropping) {\n setProppingProperty(_this__u8e3s4, proppingHostConnector, setOldPropping$lambda(oldPropping));\n }\n function removePropping(_this__u8e3s4, proppingHostConnector) {\n var tmp0_elvis_lhs = getPropping(_this__u8e3s4, proppingHostConnector);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var currentPropping = tmp;\n var tmp1_safe_receiver = getOldPropping(_this__u8e3s4, proppingHostConnector);\n if (tmp1_safe_receiver == null)\n null;\n else {\n tmp1_safe_receiver.dispose();\n }\n setOldPropping(_this__u8e3s4, proppingHostConnector, currentPropping);\n currentPropping.removeComponent(RenderedComponent_instance.id);\n setPropping(_this__u8e3s4, proppingHostConnector, null);\n }\n function clearOldPropping(_this__u8e3s4, proppingHostConnector) {\n var oldPropping = getOldPropping(_this__u8e3s4, proppingHostConnector);\n setProppingProperty(_this__u8e3s4, proppingHostConnector, clearOldPropping$lambda);\n if (!((oldPropping == null ? null : oldPropping.isDisposed) === true)) {\n if (oldPropping == null)\n null;\n else {\n oldPropping.dispose();\n }\n }\n }\n function restoreOldPropping(_this__u8e3s4, proppingHostConnector) {\n var propping = getOldPropping(_this__u8e3s4, proppingHostConnector);\n setOldPropping(_this__u8e3s4, proppingHostConnector, null);\n if (propping == null)\n null;\n else {\n setParentMaintainWorldTransform(propping, _this__u8e3s4);\n }\n setPropping(_this__u8e3s4, proppingHostConnector, propping);\n var tmp1_safe_receiver = getShapeComponent(_this__u8e3s4, proppingHostConnector);\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.propping.restoreOldPropping.' call\n propping == null || propping.addComponent(tmp1_safe_receiver);\n }\n if (_this__u8e3s4.hasComponent(9)) {\n if (propping == null)\n null;\n else\n propping.addComponent(RenderedComponent_instance);\n }\n setOldPropping(_this__u8e3s4, proppingHostConnector, null);\n }\n function getShapeComponent(_this__u8e3s4, connector) {\n var tmp0_safe_receiver = getPropHolderInfo(_this__u8e3s4, connector);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.shapeComponent;\n }\n function setProppingProperty(_this__u8e3s4, connector, a) {\n var tmp;\n if (_this__u8e3s4.hasComponent(87)) {\n tmp = _this__u8e3s4.getComponentUnsafe(87);\n } else {\n _this__u8e3s4.addComponent(new ProppingInfoComponent(emptyList()));\n tmp = _this__u8e3s4.getComponentUnsafe(87);\n }\n var proppingComponent = tmp;\n var propHolderInfos = proppingComponent.propHolderInfos;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.indexOfFirst' call\n var index = 0;\n var tmp0_iterator = propHolderInfos.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.propping.setProppingProperty.' call\n if (item.connector.key === connector.key) {\n tmp$ret$1 = index;\n break $l$block;\n }\n index = index + 1 | 0;\n }\n tmp$ret$1 = -1;\n }\n var propHolderInfoIndex = tmp$ret$1;\n var newPropHolderInfo = a(propHolderInfos.f1(propHolderInfoIndex));\n var newPropHoldInfos = toMutableList(propHolderInfos);\n newPropHoldInfos.o(propHolderInfoIndex, newPropHolderInfo);\n _this__u8e3s4.addComponent(new ProppingInfoComponent(newPropHoldInfos));\n }\n function setPropping$lambda($propping) {\n return function (it) {\n return it.copy(VOID, $propping);\n };\n }\n function setOldPropping$lambda($oldPropping) {\n return function (it) {\n return it.copy(VOID, VOID, VOID, $oldPropping);\n };\n }\n function clearOldPropping$lambda(it) {\n return it.copy(VOID, VOID, VOID, null);\n }\n function ProppingSubSystem(proppingSystem) {\n Companion_getInstance_72();\n var tmp = 'ProppingSystem' + '-internal';\n // Inline function 'kotlin.emptyArray' call\n var tmp_0 = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = ['HierarchySystem', 'TransformSystem', 'SceneGraphSystem'];\n SystemBase2.call(this, tmp, 66, 73, tmp_0, tmp$ret$3, null);\n this.proppingSystem = proppingSystem;\n }\n protoOf(ProppingSubSystem).onAddComponent = function (entity, newComponent) {\n this.proppingSystem.a3g(newComponent);\n };\n protoOf(ProppingSubSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(ProppingSubSystem).onRemoveComponent = function (entity, oldComponent) {\n this.proppingSystem.b3g();\n };\n protoOf(ProppingSubSystem).onAddComponent2 = function (entity, newComponent) {\n };\n protoOf(ProppingSubSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n };\n protoOf(ProppingSubSystem).onRemoveComponent2 = function (entity, oldComponent) {\n this.proppingSystem.b3g();\n };\n function onStartedDragging_1($this, draggedEntity) {\n if (!$this.isEnabled)\n return Unit_instance;\n var draggedHierarchy = get_hierarchy(draggedEntity);\n if (get_isPropping(draggedEntity)) {\n var tmp = $this;\n var tmp0_safe_receiver = get_parent(draggedEntity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_proppingHostConnectors(tmp0_safe_receiver);\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.onStartedDragging.' call\n if (equals(getPropping(element.propHoldingEntity, element.proppingHostConnector), draggedEntity)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp_0 = tmp$ret$1;\n }\n tmp.z3f_1 = tmp_0;\n var tmp2_safe_receiver = get_viewerObject(draggedEntity);\n if (tmp2_safe_receiver == null)\n null;\n else {\n tmp2_safe_receiver.setEnabled(false);\n }\n }\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = draggedHierarchy.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = draggedHierarchy[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.onStartedDragging.' call\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_proppingHostConnectors(element_0);\n var inductionVariable_1 = 0;\n var last_1 = indexedObject.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = indexedObject[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.onStartedDragging..' call\n var propping = getPropping(element_1.propHoldingEntity, element_1.proppingHostConnector);\n if (!(propping == null) ? !equals(propping, draggedEntity) : false) {\n removePropping(element_1.propHoldingEntity, element_1.proppingHostConnector);\n }\n }\n }\n }\n function onDragMove($this) {\n var tmp0_safe_receiver = $this.y3f_1;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n tmp = tmp0_safe_receiver.__getComponentForKotlin(24);\n }\n var tmp1_safe_receiver = tmp;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.worldPolyhedron;\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n var movedPolyhedron = tmp_0;\n var tmp3_safe_receiver = $this.y3f_1;\n var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : get_hierarchy(tmp3_safe_receiver);\n var tmp_1;\n if (tmp4_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_1 = tmp4_elvis_lhs;\n }\n var movedHierarchy = tmp_1;\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = get_proppingHostEntitiesInHierarchy($this.t3f_1.sceneManager.scene);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.onDragMove.' call\n var tmp$ret$0 = get_proppingHostConnectors(item);\n destination.q(tmp$ret$0);\n }\n var tmp$ret$3 = copyToArray(destination);\n var tmp0_iterator = flatten(tmp$ret$3).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n $l$block_1: {\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.onDragMove.' call\n if (!element.propHoldingEntity.hasComponent(9)) {\n break $l$block_1;\n }\n var tmp0_elvis_lhs = getPropHolderInfo(element.propHoldingEntity, element.proppingHostConnector);\n var tmp_2;\n if (tmp0_elvis_lhs == null) {\n break $l$block_1;\n } else {\n tmp_2 = tmp0_elvis_lhs;\n }\n var propInfo = tmp_2;\n if (contains(movedHierarchy, element.propHoldingEntity)) {\n break $l$block_1;\n }\n var tmp1_safe_receiver_0 = propInfo.colliderBox;\n var tmp2_safe_receiver = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.penetration(movedPolyhedron);\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.notZero();\n var hit = tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs;\n if (hit) {\n var tmp4_safe_receiver = propInfo.propping;\n if (tmp4_safe_receiver == null)\n null;\n else\n tmp4_safe_receiver.removeComponent(RenderedComponent_instance.id);\n } else {\n var tmp5_safe_receiver = propInfo.propping;\n if (tmp5_safe_receiver == null)\n null;\n else\n tmp5_safe_receiver.addComponent(RenderedComponent_instance);\n }\n }\n }\n }\n function onStoppedDragging_1($this, originalEntity) {\n var theEntityThatWasDraggedIsNoLongerInScene = !get_isInScene(originalEntity);\n if (theEntityThatWasDraggedIsNoLongerInScene) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_proppingHostConnectors(originalEntity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.onStoppedDragging.' call\n var propInfo = getPropHolderInfo(originalEntity, element.proppingHostConnector);\n var tmp1_safe_receiver = propInfo == null ? null : propInfo.oldPropping;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n setOldPropping(originalEntity, element.proppingHostConnector, null);\n $this.t3f_1.entityManager.disposeEntity(tmp1_safe_receiver);\n }\n }\n }\n var tmp0_safe_receiver = $this.z3f_1;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var propInfo_0 = getPropHolderInfo(tmp0_safe_receiver.propHoldingEntity, tmp0_safe_receiver.proppingHostConnector);\n var tmp1_safe_receiver_0 = propInfo_0 == null ? null : propInfo_0.oldPropping;\n var tmp2_safe_receiver = tmp1_safe_receiver_0 == null ? null : get_viewerObject(tmp1_safe_receiver_0);\n if (tmp2_safe_receiver == null)\n null;\n else {\n tmp2_safe_receiver.setEnabled(true);\n }\n removePropping(tmp0_safe_receiver.propHoldingEntity, tmp0_safe_receiver.proppingHostConnector);\n }\n $this.z3f_1 = null;\n }\n function handleAddedEntityToScene($this, entity) {\n if (get_isPropping(entity))\n return Unit_instance;\n var tmp;\n if (entity.hasComponent(2)) {\n tmp = true;\n } else {\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n tmp = !(getProppingCollidingWithEntity($this, entity).length === 0);\n }\n var needToUpdatePropping = tmp;\n if (needToUpdatePropping) {\n $this.b3g();\n }\n }\n function onDisconnect($this, entity) {\n if (entity.isDisposed ? true : get_isPropping(entity))\n return Unit_instance;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_proppingHostConnectors(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.onDisconnect.' call\n var propInfo = getPropHolderInfo(element.propHoldingEntity, element.proppingHostConnector);\n var tmp1_safe_receiver = propInfo == null ? null : propInfo.propping;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n if (!get_isBeingDragged(tmp1_safe_receiver)) {\n $this.t3f_1.entityManager.disposeEntity(tmp1_safe_receiver);\n tmp = Unit_instance;\n }\n }\n }\n }\n function clearProps($this) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_proppingHostEntitiesInHierarchy($this.t3f_1.sceneManager.scene);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.clearProps.' call\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = get_proppingHostConnectors(element);\n var inductionVariable_0 = 0;\n var last_0 = indexedObject_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.clearProps..' call\n removePropping(element, element_0.proppingHostConnector);\n }\n }\n }\n function getProppingCollidingWithEntity($this, entity) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(24);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n return [];\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var movedPolyhedron = tmp;\n var entityHierarchy = get_hierarchy(entity);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = get_proppingHostEntitiesInHierarchy($this.t3f_1.sceneManager.scene);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.getProppingCollidingWithEntity.' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_1 = get_proppingHostConnectors(element);\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n var tmp$ret$1;\n $l$block_0: {\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.getProppingCollidingWithEntity..' call\n if (!element_0.propHoldingEntity.hasComponent(9)) {\n tmp$ret$1 = false;\n break $l$block_0;\n }\n if (contains(entityHierarchy, element_0.propHoldingEntity)) {\n tmp$ret$1 = false;\n break $l$block_0;\n }\n var propInfo = getPropHolderInfo(element, element_0.proppingHostConnector);\n var tmp1_safe_receiver = propInfo == null ? null : propInfo.colliderBox;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.penetration(movedPolyhedron);\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.notZero();\n tmp$ret$1 = tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs;\n }\n if (tmp$ret$1) {\n destination_0.q(element_0);\n }\n }\n var list = destination_0;\n addAll_0(destination, list);\n }\n return copyToArray(destination);\n }\n function Companion_63() {\n Companion_instance_96 = this;\n this.ID = 'ProppingSystem';\n this.TAG_PROPPING = 'propping-connector';\n this.c3g_1 = LoggerState_getInstance().m1m('ProppingSystem');\n }\n protoOf(Companion_63).u1n = function () {\n return this.ID;\n };\n protoOf(Companion_63).d3g = function () {\n return this.TAG_PROPPING;\n };\n var Companion_instance_96;\n function Companion_getInstance_72() {\n if (Companion_instance_96 == null)\n new Companion_63();\n return Companion_instance_96;\n }\n function ProppingSystem$lambda$lambda(map) {\n var tmp = map.t2();\n // Inline function 'kotlin.collections.sumOf' call\n var sum = 0;\n var tmp0_iterator = map.u2().f3g_1.p2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n var tmp_0 = sum;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem...' call\n sum = tmp_0 + element.n() | 0;\n }\n return tmp + ': ' + sum;\n }\n function ProppingSystem$lambda(this$0) {\n return function () {\n var tmp = this$0.x3f_1.q2();\n var mappedProps = joinToString_0(tmp, ' | ', VOID, VOID, VOID, VOID, ProppingSystem$lambda$lambda);\n return 'loaded props ' + mappedProps;\n };\n }\n function ProppingSystem(proppingCatalog, coreServices) {\n Companion_getInstance_72();\n Companion_getInstance_1();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [];\n // Inline function 'kotlin.arrayOf' call\n Companion_getInstance_0();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = ['ConnectionParentingSystem', 'UpdateHostConnectionsSystem', 'TakeSnapshotBeforeDragSystem'];\n // Inline function 'kotlin.arrayOf' call\n Companion_getInstance_37();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$8 = ['DragSystem'];\n SystemBase2.call(this, 'ProppingSystem', 85, 104, tmp, tmp_0, tmp$ret$8);\n this.t3f_1 = coreServices;\n this.u3f_1 = new ProppingSubSystem(this);\n this.v3f_1 = new SetPropHolderInfoSystem();\n this.w3f_1 = new SetProppingHostConnectorDataSystem(this.t3f_1.sceneManager);\n this.y3f_1 = null;\n this.z3f_1 = null;\n this.x3f_1 = ProppingUtils_instance.g3g(proppingCatalog);\n var tmp_1 = Companion_getInstance_72().c3g_1;\n tmp_1.info(ProppingSystem$lambda(this));\n this.b3g();\n }\n protoOf(ProppingSystem).onRegister = function () {\n protoOf(SystemBase2).onRegister.call(this);\n this.u3f_1.register(this.t3f_1.entityManager);\n this.v3f_1.register(this.t3f_1.entityManager);\n this.w3f_1.register(this.t3f_1.entityManager);\n };\n protoOf(ProppingSystem).onUnregister = function () {\n protoOf(SystemBase2).onUnregister.call(this);\n this.u3f_1.unregister(this.t3f_1.entityManager);\n this.v3f_1.unregister(this.t3f_1.entityManager);\n this.w3f_1.unregister(this.t3f_1.entityManager);\n };\n protoOf(ProppingSystem).enable = function () {\n protoOf(SystemBase2).enable.call(this);\n this.u3f_1.enable();\n this.v3f_1.enable();\n this.w3f_1.enable();\n this.b3g();\n };\n protoOf(ProppingSystem).disable = function () {\n this.u3f_1.disable();\n this.v3f_1.disable();\n this.w3f_1.disable();\n protoOf(SystemBase2).disable.call(this);\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = get_proppingHostEntitiesInHierarchy(this.t3f_1.sceneManager.scene);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.disable.' call\n var tmp$ret$0 = get_proppingHostConnectors(item);\n destination.q(tmp$ret$0);\n }\n var tmp$ret$3 = copyToArray(destination);\n var tmp0_iterator = flatten(tmp$ret$3).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.disable.' call\n var propHolderInfo = getPropHolderInfo(element.propHoldingEntity, element.proppingHostConnector);\n var tmp1_safe_receiver = propHolderInfo == null ? null : propHolderInfo.propping;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n this.t3f_1.entityManager.disposeEntity(tmp1_safe_receiver);\n setPropping(element.propHoldingEntity, element.proppingHostConnector, null);\n }\n }\n };\n protoOf(ProppingSystem).onAddComponent = function (entity, newComponent) {\n onStartedDragging_1(this, entity);\n };\n protoOf(ProppingSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n onDragMove(this);\n };\n protoOf(ProppingSystem).onRemoveComponent = function (entity, oldComponent) {\n onStoppedDragging_1(this, entity);\n };\n protoOf(ProppingSystem).onAddComponent2 = function (entity, newComponent) {\n if (get_isPropping(entity))\n return Unit_instance;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_snapRootSubTree(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.onAddComponent2.' call\n handleAddedEntityToScene(this, element);\n }\n };\n protoOf(ProppingSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n if (get_isPropping(entity))\n return Unit_instance;\n this.b3g();\n };\n protoOf(ProppingSystem).onRemoveComponent2 = function (entity, oldComponent) {\n if (get_isPropping(entity))\n return Unit_instance;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_snapRootSubTree(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingSystem.onRemoveComponent2.' call\n onDisconnect(this, element);\n }\n };\n protoOf(ProppingSystem).dispose = function () {\n this.disable();\n this.unregister(this.t3f_1.entityManager);\n };\n protoOf(ProppingSystem).a3g = function (c) {\n this.y3f_1 = c.entity;\n };\n protoOf(ProppingSystem).b3g = function () {\n if (!this.isEnabled)\n return Unit_instance;\n clearProps(this);\n ProppingUtils_instance.h3g(this.x3f_1, this.t3f_1.entityManager, this.t3f_1.sceneManager, this.t3f_1.productManager);\n };\n function createAndAddPropping($this, proppingHostConnectorData, data, productManager) {\n var propHoldingEntity = proppingHostConnectorData.propHoldingEntity;\n var proppingHostConnector = proppingHostConnectorData.proppingHostConnector;\n var propInfoBefore = getPropHolderInfo(propHoldingEntity, proppingHostConnector);\n var oldProppingBefore = propInfoBefore == null ? null : propInfoBefore.oldPropping;\n removePropping(propHoldingEntity, proppingHostConnector);\n var wantToAddBackOldPropping = !(oldProppingBefore == null) ? get_productRef(oldProppingBefore) === data.productRef : false;\n if (wantToAddBackOldPropping) {\n restoreOldPropping(propHoldingEntity, proppingHostConnector);\n if ((oldProppingBefore == null ? null : get_isHanging(oldProppingBefore)) === true) {\n var tmp2_safe_receiver = get_guestConnectors(oldProppingBefore);\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : firstOrNull_1(tmp2_safe_receiver);\n var tmp;\n if (tmp3_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp3_elvis_lhs;\n }\n adjustToHangDown($this, oldProppingBefore, tmp, propHoldingEntity, proppingHostConnector);\n }\n return Unit_instance;\n }\n clearOldPropping(propHoldingEntity, proppingHostConnector);\n var newPropping = productManager.createFromSpecification(data.productRef, data.spec);\n setPropping(propHoldingEntity, proppingHostConnector, newPropping);\n if (newPropping == null)\n return Unit_instance;\n setParentMaintainWorldTransform(newPropping, proppingHostConnectorData.propHoldingEntity);\n // Inline function 'kotlin.collections.find' call\n var this_0 = ensureNotNull(get_connectorsComponent(newPropping)).guestConnectors;\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.createAndAddPropping.' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = element.demands();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element_0 = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.createAndAddPropping..' call\n if (element_0 === data.demands) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n if (tmp$ret$1) {\n tmp$ret$3 = element;\n break $l$block_0;\n }\n }\n tmp$ret$3 = null;\n }\n var tmp$ret$4 = tmp$ret$3;\n var guestConnector = ensureNotNull(tmp$ret$4);\n var snapCandidate = SnapUtils_instance.createCandidate(newPropping, guestConnector, proppingHostConnectorData.propHoldingEntity, proppingHostConnector);\n snapCandidate.createAction().perform();\n if (get_isHanging(newPropping)) {\n adjustToHangDown($this, newPropping, snapCandidate.guestConnector, snapCandidate.host, snapCandidate.hostConnector);\n }\n }\n function adjustToHangDown($this, propping, guestConnector, host, hostConnector) {\n if (!get_isHanging(propping))\n return Unit_instance;\n if (get_worldTransform(propping).up.equals(Companion_getInstance_4().UP))\n return Unit_instance;\n var localRot = get_localTransform(propping).rotation;\n var tmp0_safe_receiver = get_parent(propping);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_worldTransform(tmp0_safe_receiver);\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rotation;\n var parentRotation = tmp2_elvis_lhs == null ? Companion_getInstance_6().IDENTITY : tmp2_elvis_lhs;\n var yAngle = localRot.toEuler().Y + parentRotation.toEuler().Y;\n var rotationAroundY = Companion_getInstance_6().fromEuler(new Radians(0.0), new Radians(yAngle), new Radians(0.0));\n var newLocalRot = rotationAroundY.times(parentRotation.inverse());\n var adjustment = Companion_getInstance_4().UP.times(hostConnector.worldSpaceOffsetOnHanging).rotate(parentRotation.inverse());\n var newLocalPos = hostConnector.transform.position.plus(adjustment).minus(guestConnector.transform.position.rotate(newLocalRot));\n propping.addComponent(LocalTransformComponentFromPosAndRot(newLocalPos, newLocalRot));\n if (!propping.hasComponent(28))\n return Unit_instance;\n var connectorsDeltaTransform = hostConnector.getDeltaTransformToGuestConnectorEntity(host, propping, guestConnector);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [new Connection(propping, guestConnector, host, hostConnector, connectorsDeltaTransform)];\n propping.addComponent(new GuestConnectionsComponent(tmp$ret$2));\n var tmp3_safe_receiver = get_viewerObject(propping);\n if (tmp3_safe_receiver == null)\n null;\n else\n tmp3_safe_receiver.setPosition(get_worldPosition(propping));\n var tmp4_safe_receiver = get_viewerObject(propping);\n if (tmp4_safe_receiver == null)\n null;\n else\n tmp4_safe_receiver.setRotation(get_worldRotation(propping));\n }\n function addProppingColliders($this, proppingHostEntity, proppingHostConnector) {\n var tmp0_elvis_lhs = getPropHolderInfo(proppingHostEntity, proppingHostConnector);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var propInfo = tmp;\n var tmp1_elvis_lhs = propInfo.propping;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var propping = tmp_0;\n var tmp2_elvis_lhs = propInfo.shapeComponent;\n var tmp_1;\n if (tmp2_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_1 = tmp2_elvis_lhs;\n }\n var shapeComponent = tmp_1;\n propping.addComponent(shapeComponent);\n }\n function removeProppingColliders($this, proppingHostEntity, proppingHostConnector) {\n var tmp0_elvis_lhs = getPropHolderInfo(proppingHostEntity, proppingHostConnector);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var propInfo = tmp;\n var tmp1_elvis_lhs = propInfo.propping;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var propping = tmp_0;\n var tmp2_safe_receiver = propping.__getComponentForKotlin(24);\n var colliderBox = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.worldPolyhedron;\n var shapeComponent = get_colliderShapeComponent(propping);\n propping.removeComponent(19);\n propping.removeComponent(24);\n propping.removeComponent(47);\n propping.removeComponent(3);\n setProppingProperty(proppingHostEntity, proppingHostConnector, ProppingUtils$removeProppingColliders$lambda(colliderBox, shapeComponent));\n }\n function ProppingUtils$removeProppingColliders$lambda($colliderBox, $shapeComponent) {\n return function (it) {\n return it.copy(VOID, VOID, $colliderBox, VOID, $shapeComponent);\n };\n }\n function ProppingUtils() {\n }\n protoOf(ProppingUtils).g3g = function (proppingCatalog) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var demandToProppingData = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = proppingCatalog.allProductRefs();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n $l$block_1: {\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.calculateAvailableProppingMap.' call\n var tmp0_elvis_lhs = proppingCatalog.productSpecification(element);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n break $l$block_1;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var spec = tmp;\n var tmp1_safe_receiver = spec._findComponentKt(19);\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.polyhedron;\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n break $l$block_1;\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n var colliderBox = tmp_0;\n var tmp3_elvis_lhs = spec._findComponentKt(11);\n var tmp_1;\n if (tmp3_elvis_lhs == null) {\n break $l$block_1;\n } else {\n tmp_1 = tmp3_elvis_lhs;\n }\n var snappable = tmp_1;\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = snappable.guestConnectors;\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.calculateAvailableProppingMap..' call\n Companion_getInstance_72();\n if (element_0.hasTag('propping-connector')) {\n destination.q(element_0);\n }\n }\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.calculateAvailableProppingMap..' call\n var demand = element_1.demands()[0];\n demandToProppingData.q(new ProppingData(element, spec, colliderBox, element_1, demand));\n }\n }\n }\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(demandToProppingData, 10));\n var tmp0_iterator_1 = demandToProppingData.t();\n while (tmp0_iterator_1.u()) {\n var item = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.calculateAvailableProppingMap.' call\n var tmp$ret$5 = item.demands;\n destination_0.q(tmp$ret$5);\n }\n var demandKeys = toSet(destination_0);\n // Inline function 'kotlin.collections.mutableMapOf' call\n var demandToProppingMap = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_2 = demandKeys.t();\n while (tmp0_iterator_2.u()) {\n var element_2 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.calculateAvailableProppingMap.' call\n // Inline function 'kotlin.collections.groupBy' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator_3 = demandToProppingData.t();\n while (tmp0_iterator_3.u()) {\n var element_3 = tmp0_iterator_3.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.calculateAvailableProppingMap..' call\n if (element_3.demands === element_2) {\n destination_1.q(element_3);\n }\n }\n // Inline function 'kotlin.collections.groupByTo' call\n var destination_2 = LinkedHashMap_init_$Create$();\n var tmp0_iterator_4 = destination_1.t();\n while (tmp0_iterator_4.u()) {\n var element_4 = tmp0_iterator_4.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.calculateAvailableProppingMap..' call\n var key = element_4.height();\n // Inline function 'kotlin.collections.getOrPut' call\n var value = destination_2.b3(key);\n var tmp_2;\n if (value == null) {\n // Inline function 'kotlin.collections.groupByTo.' call\n var answer = ArrayList_init_$Create$();\n destination_2.r2(key, answer);\n tmp_2 = answer;\n } else {\n tmp_2 = value;\n }\n var list = tmp_2;\n list.q(element_4);\n }\n var props = destination_2;\n var sizes = sorted(toList_0(props.o2()));\n // Inline function 'kotlin.collections.set' call\n var value_0 = new ProppingsAvailableForDemand(sizes, props);\n demandToProppingMap.r2(element_2, value_0);\n }\n return demandToProppingMap;\n };\n protoOf(ProppingUtils).i3g = function (holder, proppingsAvailableForDemand, entityManager, sceneEntities) {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = proppingsAvailableForDemand.f3g_1.p2();\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.findProppingsThatFit.' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = element.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.findProppingsThatFit..' call\n if (ProppingUtils_instance.j3g(holder, element_0, entityManager, sceneEntities)) {\n destination_0.q(element_0);\n }\n }\n var list = destination_0;\n addAll_0(destination, list);\n }\n return destination;\n };\n protoOf(ProppingUtils).j3g = function (holder, propping, entityManager, sceneEntities) {\n var e = entityManager.createEntity();\n var worldTransform = propping.guestConnector.calculateEndTransform(get_worldTransform(holder.propHoldingEntity), holder.proppingHostConnector, Companion_getInstance_5().IDENTITY, Companion_getInstance_5().IDENTITY);\n setParent(e, holder.propHoldingEntity);\n TransformUtils_instance.setWorldTransform(e, worldTransform);\n e.addComponentInternal(new DisplayNameComponent('Propping fit test'));\n e.addComponent(new ColliderShapeComponent(propping.colliderBox));\n if (propping.spec.hasComponent(AlwaysHangDownComponent_instance.id)) {\n e.addComponent(AlwaysHangDownComponent_instance);\n adjustToHangDown(this, e, propping.guestConnector, holder.propHoldingEntity, holder.proppingHostConnector);\n }\n var collision = CollisionUtils_instance.getFirstCollision(e, null, sceneEntities);\n entityManager.disposeEntity(e);\n return collision == null;\n };\n protoOf(ProppingUtils).h3g = function (demandToProppingMap, entityManager, sceneManager, productManager) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = get_proppingHostEntitiesInHierarchy(sceneManager.scene);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.addProppingWherePossible.' call\n var tmp$ret$0 = get_proppingHostConnectors(item);\n destination.q(tmp$ret$0);\n }\n var tmp$ret$3 = copyToArray(destination);\n var proppingHolders = flatten(tmp$ret$3);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = proppingHolders.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.addProppingWherePossible.' call\n addProppingColliders(ProppingUtils_instance, element.propHoldingEntity, element.proppingHostConnector);\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = proppingHolders.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n $l$block_6: {\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.addProppingWherePossible.' call\n var proppingHostConnector = element_0.proppingHostConnector;\n var propHoldingEntity = element_0.propHoldingEntity;\n // Inline function 'kotlin.collections.get' call\n var key = firstOrNull_0(proppingHostConnector.offers());\n var tmp0_elvis_lhs = (isInterface(demandToProppingMap, Map) ? demandToProppingMap : THROW_CCE()).b3(key);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n break $l$block_6;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var proppingsAvailableForDemand = tmp;\n if (proppingsAvailableForDemand.f3g_1.b1()) {\n break $l$block_6;\n }\n var potentialProppingsThatFit = ProppingUtils_instance.i3g(element_0, proppingsAvailableForDemand, entityManager, sceneManager.entities);\n var propInfoBefore = getPropHolderInfo(propHoldingEntity, proppingHostConnector);\n var tmp_0;\n if (!((propInfoBefore == null ? null : propInfoBefore.oldPropping) == null)) {\n var tmp$ret$6;\n $l$block_2: {\n // Inline function 'kotlin.collections.any' call\n var tmp_1;\n if (isInterface(potentialProppingsThatFit, Collection)) {\n tmp_1 = potentialProppingsThatFit.b1();\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp$ret$6 = false;\n break $l$block_2;\n }\n var tmp0_iterator_1 = potentialProppingsThatFit.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.addProppingWherePossible..' call\n if (element_1.productRef === get_productRef(propInfoBefore.oldPropping)) {\n tmp$ret$6 = true;\n break $l$block_2;\n }\n }\n tmp$ret$6 = false;\n }\n tmp_0 = tmp$ret$6;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n restoreOldPropping(propHoldingEntity, proppingHostConnector);\n if (get_isHanging(propInfoBefore.oldPropping)) {\n var tmp2_safe_receiver = get_guestConnectors(propInfoBefore.oldPropping);\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : firstOrNull_1(tmp2_safe_receiver);\n var tmp_2;\n if (tmp3_elvis_lhs == null) {\n break $l$block_6;\n } else {\n tmp_2 = tmp3_elvis_lhs;\n }\n var guestConnector = tmp_2;\n adjustToHangDown(ProppingUtils_instance, propInfoBefore.oldPropping, guestConnector, propHoldingEntity, proppingHostConnector);\n }\n break $l$block_6;\n }\n if (any(potentialProppingsThatFit)) {\n // Inline function 'kotlin.let' call\n var tmp$ret$11;\n $l$block_5: {\n // Inline function 'kotlin.collections.maxBy' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(potentialProppingsThatFit, 10));\n var tmp0_iterator_2 = potentialProppingsThatFit.t();\n while (tmp0_iterator_2.u()) {\n var item_0 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.addProppingWherePossible..' call\n var tmp$ret$8 = new Pair(Default_getInstance().ah(item_0.height()), item_0);\n destination_0.q(tmp$ret$8);\n }\n var iterator = destination_0.t();\n if (!iterator.u())\n throw NoSuchElementException_init_$Create$_0();\n var maxElem = iterator.w();\n if (!iterator.u()) {\n tmp$ret$11 = maxElem;\n break $l$block_5;\n }\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.addProppingWherePossible..' call\n var maxValue = maxElem.ye_1;\n do {\n var e = iterator.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.addProppingWherePossible..' call\n var v = e.ye_1;\n if (compareTo(maxValue, v) < 0) {\n maxElem = e;\n maxValue = v;\n }\n }\n while (iterator.u());\n tmp$ret$11 = maxElem;\n }\n // Inline function 'kotlin.contracts.contract' call\n var selectedPropping = tmp$ret$11.ze_1;\n createAndAddPropping(ProppingUtils_instance, element_0, selectedPropping, productManager);\n break $l$block_6;\n }\n var tmp4_safe_receiver = getOldPropping(propHoldingEntity, proppingHostConnector);\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n entityManager.disposeEntity(tmp4_safe_receiver);\n clearOldPropping(propHoldingEntity, proppingHostConnector);\n }\n }\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_3 = proppingHolders.t();\n while (tmp0_iterator_3.u()) {\n var element_2 = tmp0_iterator_3.w();\n // Inline function 'com.ikea.core.stl.propping.ProppingUtils.addProppingWherePossible.' call\n removeProppingColliders(ProppingUtils_instance, element_2.propHoldingEntity, element_2.proppingHostConnector);\n }\n };\n var ProppingUtils_instance;\n function ProppingUtils_getInstance() {\n return ProppingUtils_instance;\n }\n function ProppingsAvailableForDemand(allSizes, heightProppingForSize) {\n this.e3g_1 = allSizes;\n this.f3g_1 = heightProppingForSize;\n }\n protoOf(ProppingsAvailableForDemand).toString = function () {\n return 'ProppingsAvailableForDemand(allSizes=' + this.e3g_1 + ', heightProppingForSize=' + this.f3g_1 + ')';\n };\n protoOf(ProppingsAvailableForDemand).hashCode = function () {\n var result = hashCode(this.e3g_1);\n result = imul(result, 31) + hashCode(this.f3g_1) | 0;\n return result;\n };\n protoOf(ProppingsAvailableForDemand).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ProppingsAvailableForDemand))\n return false;\n var tmp0_other_with_cast = other instanceof ProppingsAvailableForDemand ? other : THROW_CCE();\n if (!equals(this.e3g_1, tmp0_other_with_cast.e3g_1))\n return false;\n if (!equals(this.f3g_1, tmp0_other_with_cast.f3g_1))\n return false;\n return true;\n };\n function Companion_64() {\n this.k3g_1 = 'SetPropHolderInfoSystem';\n }\n var Companion_instance_97;\n function Companion_getInstance_73() {\n return Companion_instance_97;\n }\n function SetPropHolderInfoSystem() {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [87];\n SystemBase.call(this, 'SetPropHolderInfoSystem', 2, tmp$ret$2);\n }\n protoOf(SetPropHolderInfoSystem).s1k = function () {\n return 'SetPropHolderInfoSystem';\n };\n protoOf(SetPropHolderInfoSystem).onAddComponent = function (entity, newComponent) {\n // Inline function 'kotlin.collections.map' call\n var this_0 = newComponent.proppingHostConnectors;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.SetPropHolderInfoSystem.onAddComponent.' call\n var tmp$ret$0 = new PropHolderInfo(item.proppingHostConnector, null, null, null);\n destination.q(tmp$ret$0);\n }\n var newInfoComponent = new ProppingInfoComponent(destination);\n entity.addComponent(newInfoComponent);\n };\n protoOf(SetPropHolderInfoSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(SetPropHolderInfoSystem).onRemoveComponent = function (entity, oldComponent) {\n };\n function handleEntityAddedToScene($this, entity) {\n var tmp0_safe_receiver = get_connectorsComponent(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectors;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = tmp1_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.propping.SetProppingHostConnectorDataSystem.handleEntityAddedToScene.' call\n Companion_getInstance_72();\n if (element.hasTag('propping-connector')) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var tmp2_safe_receiver = tmp;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = tmp2_safe_receiver.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.propping.SetProppingHostConnectorDataSystem.handleEntityAddedToScene.' call\n var tmp_1 = element_0.allSubConnectors;\n var list = map(tmp_1, SetProppingHostConnectorDataSystem$handleEntityAddedToScene$lambda(entity));\n addAll_1(destination_0, list);\n }\n tmp_0 = destination_0;\n }\n var proppingHostConnectorData = tmp_0;\n // Inline function 'kotlin.collections.isNullOrEmpty' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(proppingHostConnectorData == null ? true : proppingHostConnectorData.b1())) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$7 = copyToArray(proppingHostConnectorData);\n entity.addComponent(new ProppingHostConnectorsComponent(tmp$ret$7));\n }\n }\n function Companion_65() {\n this.t3g_1 = 'SetPropHolderDataSystem';\n }\n var Companion_instance_98;\n function Companion_getInstance_74() {\n return Companion_instance_98;\n }\n function SetProppingHostConnectorDataSystem$handleEntityAddedToScene$lambda($entity) {\n return function (subHostConnector) {\n return new ProppingHostConnectorData($entity, subHostConnector);\n };\n }\n function SetProppingHostConnectorDataSystem(sceneManager) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [2];\n SystemBase.call(this, 'SetPropHolderDataSystem', 5, tmp$ret$2);\n this.c3h_1 = sceneManager;\n }\n protoOf(SetProppingHostConnectorDataSystem).s1k = function () {\n return 'SetPropHolderDataSystem';\n };\n protoOf(SetProppingHostConnectorDataSystem).enable = function () {\n protoOf(SystemBase).enable.call(this);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.c3h_1.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.propping.SetProppingHostConnectorDataSystem.enable.' call\n handleEntityAddedToScene(this, element);\n }\n };\n protoOf(SetProppingHostConnectorDataSystem).onAddComponent = function (entity, newComponent) {\n handleEntityAddedToScene(this, entity);\n };\n protoOf(SetProppingHostConnectorDataSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(SetProppingHostConnectorDataSystem).onRemoveComponent = function (entity, oldComponent) {\n };\n function Companion_66() {\n this.id = 33;\n }\n protoOf(Companion_66).s1k = function () {\n return this.id;\n };\n var Companion_instance_99;\n function Companion_getInstance_75() {\n return Companion_instance_99;\n }\n function CommunicationSizeComponent(size) {\n this.size = size;\n }\n protoOf(CommunicationSizeComponent).n = function () {\n return this.size;\n };\n protoOf(CommunicationSizeComponent).x1k = function () {\n return 33;\n };\n protoOf(CommunicationSizeComponent).eq = function (other) {\n return (other instanceof CommunicationSizeComponent ? other : THROW_CCE()).size.equals(this.size);\n };\n function DoorComponent() {\n DoorComponent_instance = this;\n this.o2y_1 = this.id;\n }\n protoOf(DoorComponent).x1k = function () {\n return this.o2y_1;\n };\n protoOf(DoorComponent).s1k = function () {\n return 30;\n };\n protoOf(DoorComponent).eq = function (other) {\n return true;\n };\n var DoorComponent_instance;\n function DoorComponent_getInstance() {\n if (DoorComponent_instance == null)\n new DoorComponent();\n return DoorComponent_instance;\n }\n function DoorFrontComponent() {\n DoorFrontComponent_instance = this;\n this.d3h_1 = this.id;\n }\n protoOf(DoorFrontComponent).x1k = function () {\n return this.d3h_1;\n };\n protoOf(DoorFrontComponent).s1k = function () {\n return 32;\n };\n protoOf(DoorFrontComponent).eq = function (other) {\n return true;\n };\n var DoorFrontComponent_instance;\n function DoorFrontComponent_getInstance() {\n if (DoorFrontComponent_instance == null)\n new DoorFrontComponent();\n return DoorFrontComponent_instance;\n }\n function DrawerComponent() {\n DrawerComponent_instance = this;\n this.e3h_1 = this.id;\n }\n protoOf(DrawerComponent).x1k = function () {\n return this.e3h_1;\n };\n protoOf(DrawerComponent).s1k = function () {\n return 50;\n };\n protoOf(DrawerComponent).eq = function (other) {\n return true;\n };\n var DrawerComponent_instance;\n function DrawerComponent_getInstance() {\n if (DrawerComponent_instance == null)\n new DrawerComponent();\n return DrawerComponent_instance;\n }\n function FrameComponent() {\n FrameComponent_instance = this;\n this.f3h_1 = this.id;\n }\n protoOf(FrameComponent).x1k = function () {\n return this.f3h_1;\n };\n protoOf(FrameComponent).s1k = function () {\n return 31;\n };\n protoOf(FrameComponent).eq = function (other) {\n return true;\n };\n var FrameComponent_instance;\n function FrameComponent_getInstance() {\n if (FrameComponent_instance == null)\n new FrameComponent();\n return FrameComponent_instance;\n }\n function HandleComponent() {\n HandleComponent_instance = this;\n this.g3h_1 = this.id;\n }\n protoOf(HandleComponent).x1k = function () {\n return this.g3h_1;\n };\n protoOf(HandleComponent).s1k = function () {\n return 39;\n };\n protoOf(HandleComponent).eq = function (other) {\n return true;\n };\n var HandleComponent_instance;\n function HandleComponent_getInstance() {\n if (HandleComponent_instance == null)\n new HandleComponent();\n return HandleComponent_instance;\n }\n function IncludedHandleComponent() {\n IncludedHandleComponent_instance = this;\n this.h3h_1 = this.id;\n }\n protoOf(IncludedHandleComponent).x1k = function () {\n return this.h3h_1;\n };\n protoOf(IncludedHandleComponent).s1k = function () {\n return 46;\n };\n protoOf(IncludedHandleComponent).eq = function (other) {\n return true;\n };\n var IncludedHandleComponent_instance;\n function IncludedHandleComponent_getInstance() {\n if (IncludedHandleComponent_instance == null)\n new IncludedHandleComponent();\n return IncludedHandleComponent_instance;\n }\n function LegComponent() {\n LegComponent_instance = this;\n this.i3h_1 = this.id;\n }\n protoOf(LegComponent).x1k = function () {\n return this.i3h_1;\n };\n protoOf(LegComponent).s1k = function () {\n return 48;\n };\n protoOf(LegComponent).eq = function (other) {\n return true;\n };\n var LegComponent_instance;\n function LegComponent_getInstance() {\n if (LegComponent_instance == null)\n new LegComponent();\n return LegComponent_instance;\n }\n function Companion_67() {\n this.id = 63;\n }\n protoOf(Companion_67).s1k = function () {\n return this.id;\n };\n var Companion_instance_100;\n function Companion_getInstance_76() {\n return Companion_instance_100;\n }\n function LightComponent(type) {\n this.type = type;\n this.j3h_1 = 63;\n }\n protoOf(LightComponent).a1x = function () {\n return this.type;\n };\n protoOf(LightComponent).x1k = function () {\n return this.j3h_1;\n };\n protoOf(LightComponent).eq = function (other) {\n return this.j3h_1 === other.typeId;\n };\n function rollbackAndCollectFailedResult($this, replacePartsResult, failedReplaces, connectionRoot) {\n // Inline function 'kotlin.collections.onEach' call\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.onEach.' call\n var tmp0_iterator = replacePartsResult.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.replace.ReplaceAssemblyPartUtils.rollbackAndCollectFailedResult.' call\n if (element.valid) {\n var tmp0_safe_receiver = element.rollback;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n tmp0_safe_receiver();\n }\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(failedReplaces, 10));\n var tmp0_iterator_0 = failedReplaces.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.replace.ReplaceAssemblyPartUtils.rollbackAndCollectFailedResult.' call\n var tmp0_elvis_lhs = item.newEntity;\n var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? item.originalEntity : tmp0_elvis_lhs;\n var ent = tmp1_elvis_lhs == null ? connectionRoot : tmp1_elvis_lhs;\n var tmp2_elvis_lhs = item.errorMessage;\n var tmp3_elvis_lhs = tmp2_elvis_lhs == null ? get_displayName(ent) : tmp2_elvis_lhs;\n var msg = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;\n var tmp$ret$3 = Companion_instance_0.fail(msg, get_productRef(ent), null);\n destination.q(tmp$ret$3);\n }\n var errors = copyToArray(destination);\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$7 = [];\n return new PlacementResult(tmp$ret$7, errors, null);\n }\n function findPart($this, connectionRoot, partKey) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = get_descendants(connectionRoot);\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.replace.ReplaceAssemblyPartUtils.findPart.' call\n if (get_partKey(element) === partKey) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n }\n function internalCreateActionForReplaceProductPart($this, connectionRoot, partKey, entityToRemove, entityToAdd, productManager, entityManager, validationService, sceneManager) {\n var tmp0_elvis_lhs = getAssemblyStructure($this, connectionRoot, productManager);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Companion_instance_101.fail(null, 'Can only replace part if the product root has an assembly structure', entityToRemove, entityToAdd);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var assemblyStructure = tmp;\n var oldParent = entityToRemove == null ? null : get_parent(entityToRemove);\n var tmp2_elvis_lhs = findPartAndParentPart$default($this, assemblyStructure.parts, partKey);\n var tmp3_container = tmp2_elvis_lhs == null ? new Pair(null, null) : tmp2_elvis_lhs;\n var assemblyPart = tmp3_container.af();\n var parentPart = tmp3_container.bf();\n var tmp_0;\n if (assemblyPart == null) {\n $this.l3h_1.warn(ReplaceAssemblyPartUtils$internalCreateActionForReplaceProductPart$lambda(partKey, connectionRoot));\n tmp_0 = new ReplacePartResult(true, null, null, null, null);\n } else if (!(entityToRemove == null)) {\n if (oldParent == null)\n return Companion_instance_101.fail(null, 'Old part did not have a parent. This is an illegal state', entityToRemove, entityToAdd);\n var tmp_1;\n if (entityToAdd == null) {\n tmp_1 = createRemovePartAction($this, entityToRemove, assemblyPart, oldParent, entityToAdd, entityManager, validationService);\n } else {\n tmp_1 = createReplacePartAction($this, entityToAdd, entityToRemove, assemblyPart, oldParent, entityManager, validationService, sceneManager);\n }\n tmp_0 = tmp_1;\n } else if (!(entityToAdd == null)) {\n tmp_0 = createAddPartAction($this, parentPart, connectionRoot, entityToAdd, assemblyPart, entityToRemove, entityManager, validationService);\n } else {\n tmp_0 = new ReplacePartResult(true, null, null, null, null);\n }\n return tmp_0;\n }\n function getAssemblyStructure($this, connectionRoot, productManager) {\n var connectionRootProductRef = get_productRef(connectionRoot);\n var tmp;\n if (connectionRootProductRef == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.replace.ReplaceAssemblyPartUtils.getAssemblyStructure.' call\n tmp = productManager.productSpecification(connectionRootProductRef);\n }\n var oldAssemblySpecification = tmp;\n var tmp_0;\n if (oldAssemblySpecification == null) {\n tmp_0 = null;\n } else {\n tmp_0 = oldAssemblySpecification._findComponentKt(12);\n }\n var structureFromSpecification = tmp_0;\n var tmp_1;\n if (structureFromSpecification == null) {\n tmp_1 = connectionRoot.__getComponentForKotlin(12);\n } else {\n tmp_1 = structureFromSpecification;\n }\n return tmp_1;\n }\n function createAddPartAction($this, parentPart, connectionRoot, entityToAdd, assemblyPart, entityToRemove, entityManager, validationService) {\n var tmp;\n if (parentPart == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.replace.ReplaceAssemblyPartUtils.createAddPartAction.' call\n // Inline function 'kotlin.sequences.find' call\n var this_0 = hierarchyExceptSubTreesWithComponentSequence(connectionRoot, 28);\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.sequences.firstOrNull' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.replace.ReplaceAssemblyPartUtils.createAddPartAction..' call\n if (get_partKey(element) === parentPart.partKey) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp = tmp$ret$1;\n }\n var tmp1_elvis_lhs = tmp;\n var parent = tmp1_elvis_lhs == null ? connectionRoot : tmp1_elvis_lhs;\n var replaceAction = new AddPartAction(entityToAdd, assemblyPart, parent, entityManager, validationService);\n var tmp_0 = Companion_instance_101;\n return tmp_0.ok(replaceAction, AddPartAction$rollback$ref(replaceAction), entityToRemove, entityToAdd);\n }\n function createReplacePartAction($this, entityToAdd, entityToRemove, assemblyPart, oldParent, entityManager, validationService, sceneManager) {\n TransformUtils_instance.setWorldTransform(entityToAdd, get_worldTransform(entityToRemove));\n var replaceAction = new ReplacePartAction(entityToRemove, entityToAdd, assemblyPart, oldParent, entityManager, validationService, sceneManager);\n var tmp = Companion_instance_101;\n return tmp.ok(replaceAction, ReplacePartAction$rollback$ref(replaceAction), entityToRemove, entityToAdd);\n }\n function createRemovePartAction($this, entityToRemove, assemblyPart, oldParent, entityToAdd, entityManager, validationService) {\n var removePartAction = new RemovePartAction(entityToRemove, assemblyPart, oldParent, entityManager, validationService);\n var tmp = Companion_instance_101;\n return tmp.ok(removePartAction, RemovePartAction$rollback$ref(removePartAction), entityToRemove, entityToAdd);\n }\n function findPartAndParentPart($this, assemblyParts, partKey, parentPart) {\n var tmp;\n if (assemblyParts == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = assemblyParts.length;\n while (inductionVariable < last) {\n var element = assemblyParts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.replace.ReplaceAssemblyPartUtils.findPartAndParentPart.' call\n var tmp_0;\n if (element.partKey === partKey) {\n tmp_0 = new Pair(element, parentPart);\n } else {\n tmp_0 = findPartAndParentPart(ReplaceAssemblyPartUtils_getInstance(), element.children, partKey, element);\n }\n var tmp0_safe_receiver = tmp_0;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n tmp = destination;\n }\n var tmp1_safe_receiver = tmp;\n return tmp1_safe_receiver == null ? null : firstOrNull_1(tmp1_safe_receiver);\n }\n function findPartAndParentPart$default($this, assemblyParts, partKey, parentPart, $super) {\n parentPart = parentPart === VOID ? null : parentPart;\n return findPartAndParentPart($this, assemblyParts, partKey, parentPart);\n }\n function ReplaceAssemblyPartUtils$replaceProductParts$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {\n return Unit_instance;\n }\n function ReplaceAssemblyPartUtils$createActionForReplaceProductPart$lambda($msg) {\n return function () {\n return $msg;\n };\n }\n function ReplaceAssemblyPartUtils$internalCreateActionForReplaceProductPart$lambda($partKey, $connectionRoot) {\n return function () {\n return 'partKey ' + $partKey + ' does not exist in the product hierarchy of ' + $connectionRoot + '. Will be ignored.';\n };\n }\n function AddPartAction$rollback$ref($boundThis) {\n var l = function () {\n $boundThis.rollback();\n return Unit_instance;\n };\n l.callableName = 'rollback';\n return l;\n }\n function ReplacePartAction$rollback$ref($boundThis) {\n var l = function () {\n $boundThis.rollback();\n return Unit_instance;\n };\n l.callableName = 'rollback';\n return l;\n }\n function RemovePartAction$rollback$ref($boundThis) {\n var l = function () {\n $boundThis.rollback();\n return Unit_instance;\n };\n l.callableName = 'rollback';\n return l;\n }\n function ReplaceAssemblyPartUtils() {\n ReplaceAssemblyPartUtils_instance = this;\n this.k3h_1 = '';\n this.l3h_1 = LoggerState_getInstance().m1m('ReplaceAssemblyPartUtils');\n }\n protoOf(ReplaceAssemblyPartUtils).m3h = function (connectionRoot, partsMap, coreServices, onReplace) {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(partsMap.length);\n var inductionVariable = 0;\n var last = partsMap.length;\n while (inductionVariable < last) {\n var item = partsMap[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.replace.ReplaceAssemblyPartUtils.replaceProductParts.' call\n var result = ReplaceAssemblyPartUtils_getInstance().createActionForReplaceProductPart(connectionRoot, item.partKey, item.productRef, coreServices);\n var tmp0_safe_receiver = result.action;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.perform();\n }\n destination.q(result);\n }\n var replacePartsResults = destination;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = replacePartsResults.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.replace.ReplaceAssemblyPartUtils.replaceProductParts.' call\n if (!element.valid) {\n destination_0.q(element);\n }\n }\n var failedReplaces = destination_0;\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!failedReplaces.b1()) {\n return rollbackAndCollectFailedResult(this, replacePartsResults, failedReplaces, connectionRoot);\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = replacePartsResults.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.replace.ReplaceAssemblyPartUtils.replaceProductParts.' call\n if (element_0.valid ? !(element_0.action == null) : false) {\n destination_1.q(element_0);\n }\n }\n var validReplaceResults = destination_1;\n // Inline function 'kotlin.collections.onEach' call\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.onEach.' call\n var tmp0_iterator_1 = validReplaceResults.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.stl.replace.ReplaceAssemblyPartUtils.replaceProductParts.' call\n if (!(element_1.originalEntity == null) ? !(element_1.newEntity == null) : false) {\n onReplace(element_1.originalEntity, element_1.newEntity);\n }\n }\n RelativeConnectorRepositioner_instance.repositionRelativeConnectorsFromBounds(connectionRoot);\n }\n return Companion_instance_88.ok(connectionRoot);\n };\n protoOf(ReplaceAssemblyPartUtils).replaceProductParts = function (connectionRoot, partsMap, coreServices, onReplace, $super) {\n var tmp;\n if (onReplace === VOID) {\n tmp = ReplaceAssemblyPartUtils$replaceProductParts$lambda;\n } else {\n tmp = onReplace;\n }\n onReplace = tmp;\n return this.m3h(connectionRoot, partsMap, coreServices, onReplace);\n };\n protoOf(ReplaceAssemblyPartUtils).createActionForReplaceProductPart = function (connectionRoot, partKey, productRef, coreServices) {\n var originalPart = findPart(this, connectionRoot, partKey);\n var notSameProduct = !(productRef === (originalPart == null ? null : get_productRef(originalPart)));\n var tmp;\n if (originalPart == null ? productRef === '' : false) {\n tmp = new ReplacePartResult(true, null, null, originalPart);\n } else if (notSameProduct) {\n var tmp_0;\n if (productRef === '') {\n tmp_0 = null;\n } else {\n var newEntity = coreServices.productManager.createEntity(productRef);\n if (newEntity == null) {\n var msg = 'Trying to replace ' + (originalPart == null ? null : get_productRef(originalPart)) + ' with an invalid product ref.';\n this.l3h_1.error(ReplaceAssemblyPartUtils$createActionForReplaceProductPart$lambda(msg));\n return Companion_instance_101.fail(null, msg, originalPart, null);\n }\n tmp_0 = newEntity;\n }\n var newPart = tmp_0;\n tmp = internalCreateActionForReplaceProductPart(this, connectionRoot, partKey, originalPart, newPart, coreServices.productManager, coreServices.entityManager, coreServices.validations, coreServices.sceneManager);\n } else {\n tmp = new ReplacePartResult(true, null, null, null, originalPart);\n }\n return tmp;\n };\n var ReplaceAssemblyPartUtils_instance;\n function ReplaceAssemblyPartUtils_getInstance() {\n if (ReplaceAssemblyPartUtils_instance == null)\n new ReplaceAssemblyPartUtils();\n return ReplaceAssemblyPartUtils_instance;\n }\n function Companion_68() {\n }\n protoOf(Companion_68).fail = function (rollback, errorMessage, originalEntity, newEntity) {\n return new ReplacePartResult(false, null, rollback, errorMessage, originalEntity, newEntity);\n };\n protoOf(Companion_68).ok = function (action, rollback, originalEntity, newEntity) {\n return new ReplacePartResult(true, action, rollback, null, originalEntity, newEntity);\n };\n var Companion_instance_101;\n function Companion_getInstance_77() {\n return Companion_instance_101;\n }\n function ReplacePartResult(valid, action, rollback, errorMessage, originalEntity, newEntity) {\n rollback = rollback === VOID ? null : rollback;\n errorMessage = errorMessage === VOID ? null : errorMessage;\n originalEntity = originalEntity === VOID ? null : originalEntity;\n newEntity = newEntity === VOID ? null : newEntity;\n this.valid = valid;\n this.action = action;\n this.rollback = rollback;\n this.errorMessage = errorMessage;\n this.originalEntity = originalEntity;\n this.newEntity = newEntity;\n }\n protoOf(ReplacePartResult).t2t = function () {\n return this.valid;\n };\n protoOf(ReplacePartResult).n3h = function () {\n return this.action;\n };\n protoOf(ReplacePartResult).o3h = function () {\n return this.rollback;\n };\n protoOf(ReplacePartResult).p3h = function () {\n return this.errorMessage;\n };\n protoOf(ReplacePartResult).n31 = function () {\n return this.originalEntity;\n };\n protoOf(ReplacePartResult).e1j = function () {\n return this.newEntity;\n };\n protoOf(ReplacePartResult).af = function () {\n return this.valid;\n };\n protoOf(ReplacePartResult).bf = function () {\n return this.action;\n };\n protoOf(ReplacePartResult).g1k = function () {\n return this.rollback;\n };\n protoOf(ReplacePartResult).h1k = function () {\n return this.errorMessage;\n };\n protoOf(ReplacePartResult).i1k = function () {\n return this.originalEntity;\n };\n protoOf(ReplacePartResult).j1k = function () {\n return this.newEntity;\n };\n protoOf(ReplacePartResult).q3h = function (valid, action, rollback, errorMessage, originalEntity, newEntity) {\n return new ReplacePartResult(valid, action, rollback, errorMessage, originalEntity, newEntity);\n };\n protoOf(ReplacePartResult).copy = function (valid, action, rollback, errorMessage, originalEntity, newEntity, $super) {\n valid = valid === VOID ? this.valid : valid;\n action = action === VOID ? this.action : action;\n rollback = rollback === VOID ? this.rollback : rollback;\n errorMessage = errorMessage === VOID ? this.errorMessage : errorMessage;\n originalEntity = originalEntity === VOID ? this.originalEntity : originalEntity;\n newEntity = newEntity === VOID ? this.newEntity : newEntity;\n return this.q3h(valid, action, rollback, errorMessage, originalEntity, newEntity);\n };\n protoOf(ReplacePartResult).toString = function () {\n return 'ReplacePartResult(valid=' + this.valid + ', action=' + this.action + ', rollback=' + this.rollback + ', errorMessage=' + this.errorMessage + ', originalEntity=' + this.originalEntity + ', newEntity=' + this.newEntity + ')';\n };\n protoOf(ReplacePartResult).hashCode = function () {\n var result = getBooleanHashCode(this.valid);\n result = imul(result, 31) + (this.action == null ? 0 : hashCode(this.action)) | 0;\n result = imul(result, 31) + (this.rollback == null ? 0 : hashCode(this.rollback)) | 0;\n result = imul(result, 31) + (this.errorMessage == null ? 0 : getStringHashCode(this.errorMessage)) | 0;\n result = imul(result, 31) + (this.originalEntity == null ? 0 : this.originalEntity.hashCode()) | 0;\n result = imul(result, 31) + (this.newEntity == null ? 0 : this.newEntity.hashCode()) | 0;\n return result;\n };\n protoOf(ReplacePartResult).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ReplacePartResult))\n return false;\n var tmp0_other_with_cast = other instanceof ReplacePartResult ? other : THROW_CCE();\n if (!(this.valid === tmp0_other_with_cast.valid))\n return false;\n if (!equals(this.action, tmp0_other_with_cast.action))\n return false;\n if (!equals(this.rollback, tmp0_other_with_cast.rollback))\n return false;\n if (!(this.errorMessage == tmp0_other_with_cast.errorMessage))\n return false;\n if (!equals(this.originalEntity, tmp0_other_with_cast.originalEntity))\n return false;\n if (!equals(this.newEntity, tmp0_other_with_cast.newEntity))\n return false;\n return true;\n };\n function ReplacePlacementResult(replacedEntityResult, childrenResult) {\n this.replacedEntityResult = replacedEntityResult;\n this.childrenResult = childrenResult;\n this.r3h_1 = 0;\n }\n protoOf(ReplacePlacementResult).s3h = function () {\n return this.replacedEntityResult;\n };\n protoOf(ReplacePlacementResult).t3h = function () {\n return this.childrenResult;\n };\n protoOf(ReplacePlacementResult).equals = function (other) {\n return this === other;\n };\n protoOf(ReplacePlacementResult).hashCode = function () {\n if (this.r3h_1 === 0) {\n this.r3h_1 = hashCode(this.replacedEntityResult) + contentHashCode(this.childrenResult) | 0;\n }\n return this.r3h_1;\n };\n protoOf(ReplacePlacementResult).af = function () {\n return this.replacedEntityResult;\n };\n protoOf(ReplacePlacementResult).bf = function () {\n return this.childrenResult;\n };\n protoOf(ReplacePlacementResult).u3h = function (replacedEntityResult, childrenResult) {\n return new ReplacePlacementResult(replacedEntityResult, childrenResult);\n };\n protoOf(ReplacePlacementResult).copy = function (replacedEntityResult, childrenResult, $super) {\n replacedEntityResult = replacedEntityResult === VOID ? this.replacedEntityResult : replacedEntityResult;\n childrenResult = childrenResult === VOID ? this.childrenResult : childrenResult;\n return this.u3h(replacedEntityResult, childrenResult);\n };\n protoOf(ReplacePlacementResult).toString = function () {\n return 'ReplacePlacementResult(replacedEntityResult=' + this.replacedEntityResult + ', childrenResult=' + toString(this.childrenResult) + ')';\n };\n function replaceEntityInternal($this, entityToRemove, entityToAdd, allowedMovementsOfChildrenInMilliMeter, doItFast, coreServices) {\n var hostedEntitiesBeforeReplace = get_guests(entityToRemove);\n TransformUtils_instance.setWorldTransform(entityToAdd, get_worldTransform(entityToRemove));\n var replaceAction = doItFast ? new FastReplaceAction(entityToRemove, entityToAdd, coreServices.entityManager, null, coreServices.sceneManager) : new ReplaceAction(entityToRemove, entityToAdd, allowedMovementsOfChildrenInMilliMeter, null, coreServices.sceneManager);\n replaceAction.perform();\n if (get_parent(entityToAdd) == null) {\n var tmp = Companion_instance_88;\n var tmp0_elvis_lhs = get_productRef(entityToAdd);\n var tmp_0 = tmp.failWithMessage('The new entity could not snap to scene', tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n return new ReplacePlacementResult(tmp_0, tmp$ret$0);\n }\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.replace.ReplaceUtils.replaceEntityInternal.' call\n coreServices.validations;\n var mainResult = Companion_instance_88.fromValidationResult(coreServices.validations.validateCurrentState(entityToAdd, false), entityToAdd);\n var childrenResult = validateChildren($this, entityToAdd, hostedEntitiesBeforeReplace, coreServices.validations);\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$3 = copyToArray(childrenResult);\n return new ReplacePlacementResult(mainResult, tmp$ret$3);\n }\n function validateChildren($this, entityToAdd, childrenBeforeReplace, validationService) {\n var hostedEntitiesAfterReplace = get_guests(entityToAdd);\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = childrenBeforeReplace.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.replace.ReplaceUtils.validateChildren.' call\n if (!element.isDisposed) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.replace.ReplaceUtils.validateChildren.' call\n var existsAfterReplace = hostedEntitiesAfterReplace.p(item);\n var tmp;\n if (existsAfterReplace) {\n tmp = validationService == null ? null : validationService.validateCurrentState(item);\n } else {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [new ValidationResultFail('Descendant entity ' + item + ' was removed during replace. Possibly because no matching connectors were found', get_productRefOrEmptyString(item), null)];\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var validationResults = tmp_0;\n var tmp$ret$7 = Companion_instance_88.fromValidationResult(validationResults, item);\n destination_0.q(tmp$ret$7);\n }\n return destination_0;\n }\n function ReplaceUtils() {\n }\n protoOf(ReplaceUtils).replaceEntity = function (entityToRemove, entityToAdd, allowedMovementsOfChildrenInMilliMeter, coreServices) {\n var tmp0_safe_receiver = get_parent(entityToRemove);\n var doItFast = (tmp0_safe_receiver == null ? null : get_isAutomaticGroup(tmp0_safe_receiver)) === true;\n return replaceEntityInternal(this, entityToRemove, entityToAdd, allowedMovementsOfChildrenInMilliMeter, doItFast, coreServices);\n };\n protoOf(ReplaceUtils).fastReplaceEntity = function (entityToRemove, entityToAdd, coreServices) {\n var tmp0_safe_receiver = get_parent(entityToRemove);\n var doItFast = (tmp0_safe_receiver == null ? null : get_isAutomaticGroup(tmp0_safe_receiver)) === true;\n return replaceEntityInternal(this, entityToRemove, entityToAdd, 0.0, doItFast, coreServices);\n };\n var ReplaceUtils_instance;\n function ReplaceUtils_getInstance() {\n return ReplaceUtils_instance;\n }\n function RoomComponentDeserializer() {\n this.v3h_1 = true;\n }\n protoOf(RoomComponentDeserializer).a1m = function () {\n return this.v3h_1;\n };\n protoOf(RoomComponentDeserializer).canHandle = function (serializationKey) {\n var tmp;\n Companion_getInstance_87();\n if (serializationKey === 'RoomDimensionsComponent') {\n tmp = true;\n } else {\n Companion_getInstance_88();\n if (serializationKey === 'RoomGeometry') {\n tmp = true;\n } else {\n tmp = false;\n }\n }\n return tmp;\n };\n protoOf(RoomComponentDeserializer).deserialize = function (serializationKey, json) {\n var tmp;\n Companion_getInstance_87();\n if (serializationKey === 'RoomDimensionsComponent') {\n tmp = Companion_getInstance_87().fromJson(json);\n } else {\n Companion_getInstance_88();\n if (serializationKey === 'RoomGeometry') {\n tmp = Companion_getInstance_88().fromJson(json);\n } else {\n var message = 'No component deserializer found even though we promised that we had one';\n throw IllegalStateException_init_$Create$(toString(message));\n }\n }\n return tmp;\n };\n function RoomConnectorConstants() {\n RoomConnectorConstants_instance = this;\n this.w3h_1 = 'continuous';\n this.FLOOR_CONNECTOR_KEY = 'ground';\n this.CEILING_CONNECTOR_KEY = 'ceiling';\n this.BACK_WALL_KEY = 'back-wall';\n this.LEFT_WALL_KEY = 'left-wall';\n this.RIGHT_WALL_KEY = 'right-wall';\n this.FRONT_WALL_KEY = 'front-wall';\n this.BACK_WALL_FLOOR_EDGE_KEY = 'back-wall-floor-edge';\n this.LEFT_WALL_FLOOR_EDGE_KEY = 'left-wall-floor-edge';\n this.RIGHT_WALL_FLOOR_EDGE_KEY = 'right-wall-floor-edge';\n this.FRONT_WALL_FLOOR_EDGE_KEY = 'front-wall-floor-edge';\n this.BACK_WALL_CEILING_EDGE_KEY = 'back-wall-ceiling-edge';\n this.LEFT_WALL_CEILING_EDGE_KEY = 'left-wall-ceiling-edge';\n this.RIGHT_WALL_CEILING_EDGE_KEY = 'right-wall-ceiling-edge';\n this.FRONT_WALL_CEILING_EDGE_KEY = 'front-wall-ceiling-edge';\n this.LEFT_BACK_CORNER_KEY = 'back-left-corner';\n this.RIGHT_BACK_CORNER_KEY = 'back-right-corner';\n this.LEFT_FRONT_CORNER_KEY = 'front-left-corner';\n this.RIGHT_FRONT_CORNER_KEY = 'front-right-corner';\n this.LEFT_BACK_CEILING_CORNER_KEY = 'back-left-corner-ceiling';\n this.RIGHT_BACK_CEILING_CORNER_KEY = 'back-right-corner-ceiling';\n this.LEFT_FRONT_CEILING_CORNER_KEY = 'front-left-corner-ceiling';\n this.RIGHT_FRONT_CEILING_CORNER_KEY = 'front-right-corner-ceiling';\n this.EDGE_WALL_CEILING_OFFER = 'wall-ceiling-edge';\n this.EDGE_WALL_FLOOR_OFFER = 'wall-floor-edge';\n this.EDGE_WALL_WALL_OFFER = 'wall-wall-edge';\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.EDGE_WALL_CEILING_OFFERS = ['wall-ceiling-edge', 'continuous'];\n var tmp_0 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0.EDGE_WALL_FLOOR_OFFERS = ['wall-floor-edge', 'continuous'];\n var tmp_1 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_1.EDGE_WALL_WALL_OFFERS = ['wall-wall-edge', 'continuous'];\n this.POINT_WALL_FLOOR_OFFER = 'wall-corner';\n this.POINT_WALL_CEILING_OFFER = 'ceiling-corner';\n this.WALL_OFFER = 'wall';\n this.FLOOR_OFFER = 'floor';\n this.CEILING_OFFER = 'ceiling';\n var tmp_2 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_2.FLOOR_OFFERS = ['floor', 'continuous'];\n var tmp_3 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_3.WALL_OFFERS = ['wall', 'continuous'];\n var tmp_4 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_4.CEILING_OFFERS = ['ceiling', 'continuous'];\n }\n protoOf(RoomConnectorConstants).x3h = function () {\n return this.FLOOR_CONNECTOR_KEY;\n };\n protoOf(RoomConnectorConstants).y3h = function () {\n return this.CEILING_CONNECTOR_KEY;\n };\n protoOf(RoomConnectorConstants).z3h = function () {\n return this.BACK_WALL_KEY;\n };\n protoOf(RoomConnectorConstants).a3i = function () {\n return this.LEFT_WALL_KEY;\n };\n protoOf(RoomConnectorConstants).b3i = function () {\n return this.RIGHT_WALL_KEY;\n };\n protoOf(RoomConnectorConstants).c3i = function () {\n return this.FRONT_WALL_KEY;\n };\n protoOf(RoomConnectorConstants).d3i = function () {\n return this.BACK_WALL_FLOOR_EDGE_KEY;\n };\n protoOf(RoomConnectorConstants).e3i = function () {\n return this.LEFT_WALL_FLOOR_EDGE_KEY;\n };\n protoOf(RoomConnectorConstants).f3i = function () {\n return this.RIGHT_WALL_FLOOR_EDGE_KEY;\n };\n protoOf(RoomConnectorConstants).g3i = function () {\n return this.FRONT_WALL_FLOOR_EDGE_KEY;\n };\n protoOf(RoomConnectorConstants).h3i = function () {\n return this.BACK_WALL_CEILING_EDGE_KEY;\n };\n protoOf(RoomConnectorConstants).i3i = function () {\n return this.LEFT_WALL_CEILING_EDGE_KEY;\n };\n protoOf(RoomConnectorConstants).j3i = function () {\n return this.RIGHT_WALL_CEILING_EDGE_KEY;\n };\n protoOf(RoomConnectorConstants).k3i = function () {\n return this.FRONT_WALL_CEILING_EDGE_KEY;\n };\n protoOf(RoomConnectorConstants).l3i = function () {\n return this.LEFT_BACK_CORNER_KEY;\n };\n protoOf(RoomConnectorConstants).m3i = function () {\n return this.RIGHT_BACK_CORNER_KEY;\n };\n protoOf(RoomConnectorConstants).n3i = function () {\n return this.LEFT_FRONT_CORNER_KEY;\n };\n protoOf(RoomConnectorConstants).o3i = function () {\n return this.RIGHT_FRONT_CORNER_KEY;\n };\n protoOf(RoomConnectorConstants).p3i = function () {\n return this.LEFT_BACK_CEILING_CORNER_KEY;\n };\n protoOf(RoomConnectorConstants).q3i = function () {\n return this.RIGHT_BACK_CEILING_CORNER_KEY;\n };\n protoOf(RoomConnectorConstants).r3i = function () {\n return this.LEFT_FRONT_CEILING_CORNER_KEY;\n };\n protoOf(RoomConnectorConstants).s3i = function () {\n return this.RIGHT_FRONT_CEILING_CORNER_KEY;\n };\n protoOf(RoomConnectorConstants).t3i = function () {\n return this.EDGE_WALL_CEILING_OFFER;\n };\n protoOf(RoomConnectorConstants).u3i = function () {\n return this.EDGE_WALL_FLOOR_OFFER;\n };\n protoOf(RoomConnectorConstants).v3i = function () {\n return this.EDGE_WALL_WALL_OFFER;\n };\n protoOf(RoomConnectorConstants).w3i = function () {\n return this.EDGE_WALL_CEILING_OFFERS;\n };\n protoOf(RoomConnectorConstants).x3i = function () {\n return this.EDGE_WALL_FLOOR_OFFERS;\n };\n protoOf(RoomConnectorConstants).y3i = function () {\n return this.EDGE_WALL_WALL_OFFERS;\n };\n protoOf(RoomConnectorConstants).z3i = function () {\n return this.POINT_WALL_FLOOR_OFFER;\n };\n protoOf(RoomConnectorConstants).a3j = function () {\n return this.POINT_WALL_CEILING_OFFER;\n };\n protoOf(RoomConnectorConstants).b3j = function () {\n return this.WALL_OFFER;\n };\n protoOf(RoomConnectorConstants).c3j = function () {\n return this.FLOOR_OFFER;\n };\n protoOf(RoomConnectorConstants).d3j = function () {\n return this.CEILING_OFFER;\n };\n protoOf(RoomConnectorConstants).e3j = function () {\n return this.FLOOR_OFFERS;\n };\n protoOf(RoomConnectorConstants).f3j = function () {\n return this.WALL_OFFERS;\n };\n protoOf(RoomConnectorConstants).g3j = function () {\n return this.CEILING_OFFERS;\n };\n protoOf(RoomConnectorConstants).hasFloorPlacement = function (connection) {\n return connection.hostConnector.isOffering('floor') ? true : connection.hostConnector.isOffering('wall-floor-edge');\n };\n protoOf(RoomConnectorConstants).hasWallPlacement = function (connection) {\n return connection.hostConnector.isOffering('wall');\n };\n protoOf(RoomConnectorConstants).hasCornerPlacement = function (connection) {\n return connection.hostConnector.isOffering(this.POINT_WALL_FLOOR_OFFER);\n };\n var RoomConnectorConstants_instance;\n function RoomConnectorConstants_getInstance() {\n if (RoomConnectorConstants_instance == null)\n new RoomConnectorConstants();\n return RoomConnectorConstants_instance;\n }\n function Companion_69() {\n Companion_instance_102 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.h3j_1 = [new ReferenceArraySerializer(getKClass(CoreRoomSurface), $serializer_getInstance_2()), null, null, new ReferenceArraySerializer(getKClass(CoreRoomEdge), $serializer_getInstance_4()), new ReferenceArraySerializer(getKClass(CoreRoomVertex), $serializer_getInstance_5()), new ReferenceArraySerializer(getKClass(CoreRoomObstacle), $serializer_getInstance_6())];\n }\n protoOf(Companion_69).l17 = function () {\n return $serializer_getInstance_1();\n };\n var Companion_instance_102;\n function Companion_getInstance_78() {\n if (Companion_instance_102 == null)\n new Companion_69();\n return Companion_instance_102;\n }\n function $serializer() {\n $serializer_instance = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.stl.room.CoreRoomGeometryData', this, 6);\n tmp0_serialDesc.cv('walls', false);\n tmp0_serialDesc.cv('floor', false);\n tmp0_serialDesc.cv('ceiling', false);\n tmp0_serialDesc.cv('edges', false);\n tmp0_serialDesc.cv('vertices', false);\n tmp0_serialDesc.cv('obstacles', true);\n this.i3j_1 = tmp0_serialDesc;\n }\n protoOf($serializer).ok = function () {\n return this.i3j_1;\n };\n protoOf($serializer).rv = function () {\n var tmp0_cached = Companion_getInstance_78().h3j_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [tmp0_cached[0], $serializer_getInstance_2(), $serializer_getInstance_2(), tmp0_cached[3], tmp0_cached[4], tmp0_cached[5]];\n };\n protoOf($serializer).qk = function (decoder) {\n var tmp0_desc = this.i3j_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_local5 = null;\n var tmp10_input = decoder.nn(tmp0_desc);\n var tmp11_cached = Companion_getInstance_78().h3j_1;\n if (tmp10_input.do()) {\n tmp4_local0 = tmp10_input.zn(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp10_input.zn(tmp0_desc, 1, $serializer_getInstance_2(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp10_input.zn(tmp0_desc, 2, $serializer_getInstance_2(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp10_input.zn(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp10_input.zn(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n tmp9_local5 = tmp10_input.zn(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp10_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp10_input.zn(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp10_input.zn(tmp0_desc, 1, $serializer_getInstance_2(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp10_input.zn(tmp0_desc, 2, $serializer_getInstance_2(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp10_input.zn(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp10_input.zn(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n case 5:\n tmp9_local5 = tmp10_input.zn(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp10_input.on(tmp0_desc);\n return CoreRoomGeometryData_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);\n };\n protoOf($serializer).j3j = function (encoder, value) {\n var tmp0_desc = this.i3j_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_78().h3j_1;\n tmp1_output.ep(tmp0_desc, 0, tmp2_cached[0], value.walls);\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance_2(), value.floor);\n tmp1_output.ep(tmp0_desc, 2, $serializer_getInstance_2(), value.ceiling);\n tmp1_output.ep(tmp0_desc, 3, tmp2_cached[3], value.edges);\n tmp1_output.ep(tmp0_desc, 4, tmp2_cached[4], value.vertices);\n var tmp;\n if (tmp1_output.kp(tmp0_desc, 5)) {\n tmp = true;\n } else {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n tmp = !equals(value.obstacles, tmp$ret$0);\n }\n if (tmp) {\n tmp1_output.ep(tmp0_desc, 5, tmp2_cached[5], value.obstacles);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer).pk = function (encoder, value) {\n return this.j3j(encoder, value instanceof CoreRoomGeometryData ? value : THROW_CCE());\n };\n var $serializer_instance;\n function $serializer_getInstance_1() {\n if ($serializer_instance == null)\n new $serializer();\n return $serializer_instance;\n }\n function CoreRoomGeometryData_init_$Init$(seen1, walls, floor, ceiling, edges, vertices, obstacles, serializationConstructorMarker, $this) {\n if (!(31 === (31 & seen1))) {\n throwMissingFieldException(seen1, 31, $serializer_getInstance_1().i3j_1);\n }\n $this.walls = walls;\n $this.floor = floor;\n $this.ceiling = ceiling;\n $this.edges = edges;\n $this.vertices = vertices;\n if (0 === (seen1 & 32)) {\n var tmp = $this;\n // Inline function 'kotlin.emptyArray' call\n tmp.obstacles = [];\n } else\n $this.obstacles = obstacles;\n return $this;\n }\n function CoreRoomGeometryData_init_$Create$(seen1, walls, floor, ceiling, edges, vertices, obstacles, serializationConstructorMarker) {\n return CoreRoomGeometryData_init_$Init$(seen1, walls, floor, ceiling, edges, vertices, obstacles, serializationConstructorMarker, objectCreate(protoOf(CoreRoomGeometryData)));\n }\n function CoreRoomGeometryData(walls, floor, ceiling, edges, vertices, obstacles) {\n Companion_getInstance_78();\n var tmp;\n if (obstacles === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = obstacles;\n }\n obstacles = tmp;\n this.walls = walls;\n this.floor = floor;\n this.ceiling = ceiling;\n this.edges = edges;\n this.vertices = vertices;\n this.obstacles = obstacles;\n }\n protoOf(CoreRoomGeometryData).k3j = function () {\n return this.walls;\n };\n protoOf(CoreRoomGeometryData).l3j = function () {\n return this.floor;\n };\n protoOf(CoreRoomGeometryData).m3j = function () {\n return this.ceiling;\n };\n protoOf(CoreRoomGeometryData).n3j = function () {\n return this.edges;\n };\n protoOf(CoreRoomGeometryData).b23 = function () {\n return this.vertices;\n };\n protoOf(CoreRoomGeometryData).o3j = function () {\n return this.obstacles;\n };\n protoOf(CoreRoomGeometryData).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof CoreRoomGeometryData))\n THROW_CCE();\n if (!contentEquals(this.walls, other.walls))\n return false;\n if (!this.floor.equals(other.floor))\n return false;\n if (!this.ceiling.equals(other.ceiling))\n return false;\n if (!contentEquals(this.edges, other.edges))\n return false;\n if (!contentEquals(this.vertices, other.vertices))\n return false;\n if (!contentEquals(this.obstacles, other.obstacles))\n return false;\n return true;\n };\n protoOf(CoreRoomGeometryData).hashCode = function () {\n var result = contentHashCode(this.walls);\n result = imul(11, result) + this.floor.hashCode() | 0;\n result = imul(23, result) + this.ceiling.hashCode() | 0;\n result = imul(31, result) + contentHashCode(this.edges) | 0;\n result = imul(19, result) + contentHashCode(this.vertices) | 0;\n return result;\n };\n protoOf(CoreRoomGeometryData).af = function () {\n return this.walls;\n };\n protoOf(CoreRoomGeometryData).bf = function () {\n return this.floor;\n };\n protoOf(CoreRoomGeometryData).g1k = function () {\n return this.ceiling;\n };\n protoOf(CoreRoomGeometryData).h1k = function () {\n return this.edges;\n };\n protoOf(CoreRoomGeometryData).i1k = function () {\n return this.vertices;\n };\n protoOf(CoreRoomGeometryData).j1k = function () {\n return this.obstacles;\n };\n protoOf(CoreRoomGeometryData).p3j = function (walls, floor, ceiling, edges, vertices, obstacles) {\n return new CoreRoomGeometryData(walls, floor, ceiling, edges, vertices, obstacles);\n };\n protoOf(CoreRoomGeometryData).copy = function (walls, floor, ceiling, edges, vertices, obstacles, $super) {\n walls = walls === VOID ? this.walls : walls;\n floor = floor === VOID ? this.floor : floor;\n ceiling = ceiling === VOID ? this.ceiling : ceiling;\n edges = edges === VOID ? this.edges : edges;\n vertices = vertices === VOID ? this.vertices : vertices;\n obstacles = obstacles === VOID ? this.obstacles : obstacles;\n return this.p3j(walls, floor, ceiling, edges, vertices, obstacles);\n };\n protoOf(CoreRoomGeometryData).toString = function () {\n return 'CoreRoomGeometryData(walls=' + toString(this.walls) + ', floor=' + this.floor + ', ceiling=' + this.ceiling + ', edges=' + toString(this.edges) + ', vertices=' + toString(this.vertices) + ', obstacles=' + toString(this.obstacles) + ')';\n };\n function CoreRoomGeometry() {\n }\n function Companion_70() {\n }\n protoOf(Companion_70).l17 = function () {\n return $serializer_getInstance_2();\n };\n var Companion_instance_103;\n function Companion_getInstance_79() {\n return Companion_instance_103;\n }\n function $serializer_0() {\n $serializer_instance_0 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.stl.room.CoreRoomSurface', this, 2);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('s', false);\n this.q3j_1 = tmp0_serialDesc;\n }\n protoOf($serializer_0).ok = function () {\n return this.q3j_1;\n };\n protoOf($serializer_0).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), $serializer_getInstance_3()];\n };\n protoOf($serializer_0).qk = function (decoder) {\n var tmp0_desc = this.q3j_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_input = decoder.nn(tmp0_desc);\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_3(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_3(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return CoreRoomSurface_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);\n };\n protoOf($serializer_0).r3j = function (encoder, value) {\n var tmp0_desc = this.q3j_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance_3(), value.surfaceGeometry);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_0).pk = function (encoder, value) {\n return this.r3j(encoder, value instanceof CoreRoomSurface ? value : THROW_CCE());\n };\n var $serializer_instance_0;\n function $serializer_getInstance_2() {\n if ($serializer_instance_0 == null)\n new $serializer_0();\n return $serializer_instance_0;\n }\n function CoreRoomSurface_init_$Init$(seen1, id, surfaceGeometry, serializationConstructorMarker, $this) {\n if (!(3 === (3 & seen1))) {\n throwMissingFieldException(seen1, 3, $serializer_getInstance_2().q3j_1);\n }\n $this.id = id;\n $this.surfaceGeometry = surfaceGeometry;\n return $this;\n }\n function CoreRoomSurface_init_$Create$(seen1, id, surfaceGeometry, serializationConstructorMarker) {\n return CoreRoomSurface_init_$Init$(seen1, id, surfaceGeometry, serializationConstructorMarker, objectCreate(protoOf(CoreRoomSurface)));\n }\n function CoreRoomSurface(id, surfaceGeometry) {\n this.id = id;\n this.surfaceGeometry = surfaceGeometry;\n }\n protoOf(CoreRoomSurface).s1k = function () {\n return this.id;\n };\n protoOf(CoreRoomSurface).s3j = function () {\n return this.surfaceGeometry;\n };\n protoOf(CoreRoomSurface).af = function () {\n return this.id;\n };\n protoOf(CoreRoomSurface).bf = function () {\n return this.surfaceGeometry;\n };\n protoOf(CoreRoomSurface).t3j = function (id, surfaceGeometry) {\n return new CoreRoomSurface(id, surfaceGeometry);\n };\n protoOf(CoreRoomSurface).copy = function (id, surfaceGeometry, $super) {\n id = id === VOID ? this.id : id;\n surfaceGeometry = surfaceGeometry === VOID ? this.surfaceGeometry : surfaceGeometry;\n return this.t3j(id, surfaceGeometry);\n };\n protoOf(CoreRoomSurface).toString = function () {\n return 'CoreRoomSurface(id=' + this.id + ', surfaceGeometry=' + this.surfaceGeometry + ')';\n };\n protoOf(CoreRoomSurface).hashCode = function () {\n var result = getStringHashCode(this.id);\n result = imul(result, 31) + this.surfaceGeometry.hashCode() | 0;\n return result;\n };\n protoOf(CoreRoomSurface).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof CoreRoomSurface))\n return false;\n var tmp0_other_with_cast = other instanceof CoreRoomSurface ? other : THROW_CCE();\n if (!(this.id === tmp0_other_with_cast.id))\n return false;\n if (!this.surfaceGeometry.equals(tmp0_other_with_cast.surfaceGeometry))\n return false;\n return true;\n };\n function Companion_71() {\n Companion_instance_104 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.u3j_1 = [new ReferenceArraySerializer(getKClass(Vector), $serializer_getInstance())];\n }\n protoOf(Companion_71).l17 = function () {\n return $serializer_getInstance_3();\n };\n var Companion_instance_104;\n function Companion_getInstance_80() {\n if (Companion_instance_104 == null)\n new Companion_71();\n return Companion_instance_104;\n }\n function $serializer_1() {\n $serializer_instance_1 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.stl.room.RoomSurfaceGeometryImpl', this, 1);\n tmp0_serialDesc.cv('p', false);\n this.v3j_1 = tmp0_serialDesc;\n }\n protoOf($serializer_1).ok = function () {\n return this.v3j_1;\n };\n protoOf($serializer_1).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [Companion_getInstance_80().u3j_1[0]];\n };\n protoOf($serializer_1).qk = function (decoder) {\n var tmp0_desc = this.v3j_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_input = decoder.nn(tmp0_desc);\n var tmp6_cached = Companion_getInstance_80().u3j_1;\n if (tmp5_input.do()) {\n tmp4_local0 = tmp5_input.zn(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp5_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp5_input.zn(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp5_input.on(tmp0_desc);\n return RoomSurfaceGeometryImpl_init_$Create$(tmp3_bitMask0, tmp4_local0, null);\n };\n protoOf($serializer_1).w3j = function (encoder, value) {\n var tmp0_desc = this.v3j_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_80().u3j_1;\n tmp1_output.ep(tmp0_desc, 0, tmp2_cached[0], value.points);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_1).pk = function (encoder, value) {\n return this.w3j(encoder, value instanceof RoomSurfaceGeometryImpl ? value : THROW_CCE());\n };\n var $serializer_instance_1;\n function $serializer_getInstance_3() {\n if ($serializer_instance_1 == null)\n new $serializer_1();\n return $serializer_instance_1;\n }\n function RoomSurfaceGeometryImpl_init_$Init$(seen1, points, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_3().v3j_1);\n }\n $this.points = points;\n return $this;\n }\n function RoomSurfaceGeometryImpl_init_$Create$(seen1, points, serializationConstructorMarker) {\n return RoomSurfaceGeometryImpl_init_$Init$(seen1, points, serializationConstructorMarker, objectCreate(protoOf(RoomSurfaceGeometryImpl)));\n }\n function RoomSurfaceGeometryImpl(points) {\n Companion_getInstance_80();\n this.points = points;\n }\n protoOf(RoomSurfaceGeometryImpl).x3j = function () {\n return this.points;\n };\n protoOf(RoomSurfaceGeometryImpl).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof RoomSurfaceGeometryImpl))\n THROW_CCE();\n if (!contentEquals(this.points, other.points))\n return false;\n return true;\n };\n protoOf(RoomSurfaceGeometryImpl).hashCode = function () {\n return contentHashCode(this.points);\n };\n protoOf(RoomSurfaceGeometryImpl).af = function () {\n return this.points;\n };\n protoOf(RoomSurfaceGeometryImpl).y3j = function (points) {\n return new RoomSurfaceGeometryImpl(points);\n };\n protoOf(RoomSurfaceGeometryImpl).copy = function (points, $super) {\n points = points === VOID ? this.points : points;\n return this.y3j(points);\n };\n protoOf(RoomSurfaceGeometryImpl).toString = function () {\n return 'RoomSurfaceGeometryImpl(points=' + toString(this.points) + ')';\n };\n function Companion_72() {\n }\n protoOf(Companion_72).l17 = function () {\n return $serializer_getInstance_4();\n };\n var Companion_instance_105;\n function Companion_getInstance_81() {\n return Companion_instance_105;\n }\n function $serializer_2() {\n $serializer_instance_2 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.stl.room.CoreRoomEdge', this, 5);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('s1', false);\n tmp0_serialDesc.cv('s2', false);\n tmp0_serialDesc.cv('p1', false);\n tmp0_serialDesc.cv('p2', false);\n this.z3j_1 = tmp0_serialDesc;\n }\n protoOf($serializer_2).ok = function () {\n return this.z3j_1;\n };\n protoOf($serializer_2).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), $serializer_getInstance(), $serializer_getInstance()];\n };\n protoOf($serializer_2).qk = function (decoder) {\n var tmp0_desc = this.z3j_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_input = decoder.nn(tmp0_desc);\n if (tmp9_input.do()) {\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp9_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp9_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp9_input.zn(tmp0_desc, 3, $serializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp9_input.zn(tmp0_desc, 4, $serializer_getInstance(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp9_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp9_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp9_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp9_input.zn(tmp0_desc, 3, $serializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp9_input.zn(tmp0_desc, 4, $serializer_getInstance(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp9_input.on(tmp0_desc);\n return CoreRoomEdge_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);\n };\n protoOf($serializer_2).a3k = function (encoder, value) {\n var tmp0_desc = this.z3j_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.cp(tmp0_desc, 1, value.surfaceId1);\n tmp1_output.cp(tmp0_desc, 2, value.surfaceId2);\n tmp1_output.ep(tmp0_desc, 3, $serializer_getInstance(), value.point1);\n tmp1_output.ep(tmp0_desc, 4, $serializer_getInstance(), value.point2);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_2).pk = function (encoder, value) {\n return this.a3k(encoder, value instanceof CoreRoomEdge ? value : THROW_CCE());\n };\n var $serializer_instance_2;\n function $serializer_getInstance_4() {\n if ($serializer_instance_2 == null)\n new $serializer_2();\n return $serializer_instance_2;\n }\n function CoreRoomEdge_init_$Init$(seen1, id, surfaceId1, surfaceId2, point1, point2, serializationConstructorMarker, $this) {\n if (!(31 === (31 & seen1))) {\n throwMissingFieldException(seen1, 31, $serializer_getInstance_4().z3j_1);\n }\n $this.id = id;\n $this.surfaceId1 = surfaceId1;\n $this.surfaceId2 = surfaceId2;\n $this.point1 = point1;\n $this.point2 = point2;\n return $this;\n }\n function CoreRoomEdge_init_$Create$(seen1, id, surfaceId1, surfaceId2, point1, point2, serializationConstructorMarker) {\n return CoreRoomEdge_init_$Init$(seen1, id, surfaceId1, surfaceId2, point1, point2, serializationConstructorMarker, objectCreate(protoOf(CoreRoomEdge)));\n }\n function CoreRoomEdge(id, surfaceId1, surfaceId2, point1, point2) {\n this.id = id;\n this.surfaceId1 = surfaceId1;\n this.surfaceId2 = surfaceId2;\n this.point1 = point1;\n this.point2 = point2;\n }\n protoOf(CoreRoomEdge).s1k = function () {\n return this.id;\n };\n protoOf(CoreRoomEdge).b3k = function () {\n return this.surfaceId1;\n };\n protoOf(CoreRoomEdge).c3k = function () {\n return this.surfaceId2;\n };\n protoOf(CoreRoomEdge).d3k = function () {\n return this.point1;\n };\n protoOf(CoreRoomEdge).e3k = function () {\n return this.point2;\n };\n protoOf(CoreRoomEdge).af = function () {\n return this.id;\n };\n protoOf(CoreRoomEdge).bf = function () {\n return this.surfaceId1;\n };\n protoOf(CoreRoomEdge).g1k = function () {\n return this.surfaceId2;\n };\n protoOf(CoreRoomEdge).h1k = function () {\n return this.point1;\n };\n protoOf(CoreRoomEdge).i1k = function () {\n return this.point2;\n };\n protoOf(CoreRoomEdge).f3k = function (id, surfaceId1, surfaceId2, point1, point2) {\n return new CoreRoomEdge(id, surfaceId1, surfaceId2, point1, point2);\n };\n protoOf(CoreRoomEdge).copy = function (id, surfaceId1, surfaceId2, point1, point2, $super) {\n id = id === VOID ? this.id : id;\n surfaceId1 = surfaceId1 === VOID ? this.surfaceId1 : surfaceId1;\n surfaceId2 = surfaceId2 === VOID ? this.surfaceId2 : surfaceId2;\n point1 = point1 === VOID ? this.point1 : point1;\n point2 = point2 === VOID ? this.point2 : point2;\n return this.f3k(id, surfaceId1, surfaceId2, point1, point2);\n };\n protoOf(CoreRoomEdge).toString = function () {\n return 'CoreRoomEdge(id=' + this.id + ', surfaceId1=' + this.surfaceId1 + ', surfaceId2=' + this.surfaceId2 + ', point1=' + this.point1 + ', point2=' + this.point2 + ')';\n };\n protoOf(CoreRoomEdge).hashCode = function () {\n var result = getStringHashCode(this.id);\n result = imul(result, 31) + getStringHashCode(this.surfaceId1) | 0;\n result = imul(result, 31) + getStringHashCode(this.surfaceId2) | 0;\n result = imul(result, 31) + this.point1.hashCode() | 0;\n result = imul(result, 31) + this.point2.hashCode() | 0;\n return result;\n };\n protoOf(CoreRoomEdge).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof CoreRoomEdge))\n return false;\n var tmp0_other_with_cast = other instanceof CoreRoomEdge ? other : THROW_CCE();\n if (!(this.id === tmp0_other_with_cast.id))\n return false;\n if (!(this.surfaceId1 === tmp0_other_with_cast.surfaceId1))\n return false;\n if (!(this.surfaceId2 === tmp0_other_with_cast.surfaceId2))\n return false;\n if (!this.point1.equals(tmp0_other_with_cast.point1))\n return false;\n if (!this.point2.equals(tmp0_other_with_cast.point2))\n return false;\n return true;\n };\n function Companion_73() {\n Companion_instance_106 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.g3k_1 = [null, null, new ReferenceArraySerializer(PrimitiveClasses_getInstance().u7(), StringSerializer_getInstance()), new ReferenceArraySerializer(PrimitiveClasses_getInstance().u7(), StringSerializer_getInstance())];\n }\n protoOf(Companion_73).l17 = function () {\n return $serializer_getInstance_5();\n };\n var Companion_instance_106;\n function Companion_getInstance_82() {\n if (Companion_instance_106 == null)\n new Companion_73();\n return Companion_instance_106;\n }\n function $serializer_3() {\n $serializer_instance_3 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.stl.room.CoreRoomVertex', this, 4);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('p', false);\n tmp0_serialDesc.cv('s', false);\n tmp0_serialDesc.cv('e', false);\n this.h3k_1 = tmp0_serialDesc;\n }\n protoOf($serializer_3).ok = function () {\n return this.h3k_1;\n };\n protoOf($serializer_3).rv = function () {\n var tmp0_cached = Companion_getInstance_82().g3k_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), $serializer_getInstance(), tmp0_cached[2], tmp0_cached[3]];\n };\n protoOf($serializer_3).qk = function (decoder) {\n var tmp0_desc = this.h3k_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_input = decoder.nn(tmp0_desc);\n var tmp9_cached = Companion_getInstance_82().g3k_1;\n if (tmp8_input.do()) {\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp8_input.zn(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp8_input.zn(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp8_input.zn(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp8_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp8_input.zn(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp8_input.zn(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp8_input.zn(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp8_input.on(tmp0_desc);\n return CoreRoomVertex_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);\n };\n protoOf($serializer_3).i3k = function (encoder, value) {\n var tmp0_desc = this.h3k_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_82().g3k_1;\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance(), value.point);\n tmp1_output.ep(tmp0_desc, 2, tmp2_cached[2], value.surfaces);\n tmp1_output.ep(tmp0_desc, 3, tmp2_cached[3], value.edges);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_3).pk = function (encoder, value) {\n return this.i3k(encoder, value instanceof CoreRoomVertex ? value : THROW_CCE());\n };\n var $serializer_instance_3;\n function $serializer_getInstance_5() {\n if ($serializer_instance_3 == null)\n new $serializer_3();\n return $serializer_instance_3;\n }\n function CoreRoomVertex_init_$Init$(seen1, id, point, surfaces, edges, serializationConstructorMarker, $this) {\n if (!(15 === (15 & seen1))) {\n throwMissingFieldException(seen1, 15, $serializer_getInstance_5().h3k_1);\n }\n $this.id = id;\n $this.point = point;\n $this.surfaces = surfaces;\n $this.edges = edges;\n return $this;\n }\n function CoreRoomVertex_init_$Create$(seen1, id, point, surfaces, edges, serializationConstructorMarker) {\n return CoreRoomVertex_init_$Init$(seen1, id, point, surfaces, edges, serializationConstructorMarker, objectCreate(protoOf(CoreRoomVertex)));\n }\n function CoreRoomVertex(id, point, surfaces, edges) {\n Companion_getInstance_82();\n this.id = id;\n this.point = point;\n this.surfaces = surfaces;\n this.edges = edges;\n }\n protoOf(CoreRoomVertex).s1k = function () {\n return this.id;\n };\n protoOf(CoreRoomVertex).g24 = function () {\n return this.point;\n };\n protoOf(CoreRoomVertex).l23 = function () {\n return this.surfaces;\n };\n protoOf(CoreRoomVertex).n3j = function () {\n return this.edges;\n };\n protoOf(CoreRoomVertex).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof CoreRoomVertex))\n THROW_CCE();\n if (!(this.id === other.id))\n return false;\n if (!this.point.equals(other.point))\n return false;\n if (!contentEquals(this.surfaces, other.surfaces))\n return false;\n if (!contentEquals(this.edges, other.edges))\n return false;\n return true;\n };\n protoOf(CoreRoomVertex).hashCode = function () {\n var result = getStringHashCode(this.id);\n result = imul(31, result) + this.point.hashCode() | 0;\n result = imul(31, result) + contentHashCode(this.surfaces) | 0;\n result = imul(31, result) + contentHashCode(this.edges) | 0;\n return result;\n };\n protoOf(CoreRoomVertex).af = function () {\n return this.id;\n };\n protoOf(CoreRoomVertex).bf = function () {\n return this.point;\n };\n protoOf(CoreRoomVertex).g1k = function () {\n return this.surfaces;\n };\n protoOf(CoreRoomVertex).h1k = function () {\n return this.edges;\n };\n protoOf(CoreRoomVertex).j3k = function (id, point, surfaces, edges) {\n return new CoreRoomVertex(id, point, surfaces, edges);\n };\n protoOf(CoreRoomVertex).copy = function (id, point, surfaces, edges, $super) {\n id = id === VOID ? this.id : id;\n point = point === VOID ? this.point : point;\n surfaces = surfaces === VOID ? this.surfaces : surfaces;\n edges = edges === VOID ? this.edges : edges;\n return this.j3k(id, point, surfaces, edges);\n };\n protoOf(CoreRoomVertex).toString = function () {\n return 'CoreRoomVertex(id=' + this.id + ', point=' + this.point + ', surfaces=' + toString(this.surfaces) + ', edges=' + toString(this.edges) + ')';\n };\n function Companion_74() {\n }\n protoOf(Companion_74).l17 = function () {\n return $serializer_getInstance_6();\n };\n var Companion_instance_107;\n function Companion_getInstance_83() {\n return Companion_instance_107;\n }\n function $serializer_4() {\n $serializer_instance_4 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.stl.room.CoreRoomObstacle', this, 3);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('t', false);\n tmp0_serialDesc.cv('b', false);\n this.k3k_1 = tmp0_serialDesc;\n }\n protoOf($serializer_4).ok = function () {\n return this.k3k_1;\n };\n protoOf($serializer_4).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), $serializer_getInstance_7()];\n };\n protoOf($serializer_4).qk = function (decoder) {\n var tmp0_desc = this.k3k_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, $serializer_getInstance_7(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, $serializer_getInstance_7(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return CoreRoomObstacle_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_4).l3k = function (encoder, value) {\n var tmp0_desc = this.k3k_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.cp(tmp0_desc, 1, value.type);\n tmp1_output.ep(tmp0_desc, 2, $serializer_getInstance_7(), value.boundingBox);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_4).pk = function (encoder, value) {\n return this.l3k(encoder, value instanceof CoreRoomObstacle ? value : THROW_CCE());\n };\n var $serializer_instance_4;\n function $serializer_getInstance_6() {\n if ($serializer_instance_4 == null)\n new $serializer_4();\n return $serializer_instance_4;\n }\n function CoreRoomObstacle_init_$Init$(seen1, id, type, boundingBox, serializationConstructorMarker, $this) {\n if (!(7 === (7 & seen1))) {\n throwMissingFieldException(seen1, 7, $serializer_getInstance_6().k3k_1);\n }\n $this.id = id;\n $this.type = type;\n $this.boundingBox = boundingBox;\n return $this;\n }\n function CoreRoomObstacle_init_$Create$(seen1, id, type, boundingBox, serializationConstructorMarker) {\n return CoreRoomObstacle_init_$Init$(seen1, id, type, boundingBox, serializationConstructorMarker, objectCreate(protoOf(CoreRoomObstacle)));\n }\n function CoreRoomObstacle(id, type, boundingBox) {\n this.id = id;\n this.type = type;\n this.boundingBox = boundingBox;\n }\n protoOf(CoreRoomObstacle).s1k = function () {\n return this.id;\n };\n protoOf(CoreRoomObstacle).a1x = function () {\n return this.type;\n };\n protoOf(CoreRoomObstacle).m3k = function () {\n return this.boundingBox;\n };\n protoOf(CoreRoomObstacle).af = function () {\n return this.id;\n };\n protoOf(CoreRoomObstacle).bf = function () {\n return this.type;\n };\n protoOf(CoreRoomObstacle).g1k = function () {\n return this.boundingBox;\n };\n protoOf(CoreRoomObstacle).n3k = function (id, type, boundingBox) {\n return new CoreRoomObstacle(id, type, boundingBox);\n };\n protoOf(CoreRoomObstacle).copy = function (id, type, boundingBox, $super) {\n id = id === VOID ? this.id : id;\n type = type === VOID ? this.type : type;\n boundingBox = boundingBox === VOID ? this.boundingBox : boundingBox;\n return this.n3k(id, type, boundingBox);\n };\n protoOf(CoreRoomObstacle).toString = function () {\n return 'CoreRoomObstacle(id=' + this.id + ', type=' + this.type + ', boundingBox=' + this.boundingBox + ')';\n };\n protoOf(CoreRoomObstacle).hashCode = function () {\n var result = getStringHashCode(this.id);\n result = imul(result, 31) + getStringHashCode(this.type) | 0;\n result = imul(result, 31) + this.boundingBox.hashCode() | 0;\n return result;\n };\n protoOf(CoreRoomObstacle).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof CoreRoomObstacle))\n return false;\n var tmp0_other_with_cast = other instanceof CoreRoomObstacle ? other : THROW_CCE();\n if (!(this.id === tmp0_other_with_cast.id))\n return false;\n if (!(this.type === tmp0_other_with_cast.type))\n return false;\n if (!this.boundingBox.equals(tmp0_other_with_cast.boundingBox))\n return false;\n return true;\n };\n function Companion_75() {\n }\n protoOf(Companion_75).l17 = function () {\n return $serializer_getInstance_7();\n };\n var Companion_instance_108;\n function Companion_getInstance_84() {\n return Companion_instance_108;\n }\n function $serializer_5() {\n $serializer_instance_5 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.stl.room.CoreRoomBoundingBox', this, 2);\n tmp0_serialDesc.cv('s', false);\n tmp0_serialDesc.cv('t', false);\n this.o3k_1 = tmp0_serialDesc;\n }\n protoOf($serializer_5).ok = function () {\n return this.o3k_1;\n };\n protoOf($serializer_5).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [$serializer_getInstance(), $serializer_getInstance_0()];\n };\n protoOf($serializer_5).qk = function (decoder) {\n var tmp0_desc = this.o3k_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_input = decoder.nn(tmp0_desc);\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_0(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_0(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return CoreRoomBoundingBox_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);\n };\n protoOf($serializer_5).p3k = function (encoder, value) {\n var tmp0_desc = this.o3k_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.ep(tmp0_desc, 0, $serializer_getInstance(), value.size);\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance_0(), value.transform);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_5).pk = function (encoder, value) {\n return this.p3k(encoder, value instanceof CoreRoomBoundingBox ? value : THROW_CCE());\n };\n var $serializer_instance_5;\n function $serializer_getInstance_7() {\n if ($serializer_instance_5 == null)\n new $serializer_5();\n return $serializer_instance_5;\n }\n function CoreRoomBoundingBox_init_$Init$(seen1, size, transform, serializationConstructorMarker, $this) {\n if (!(3 === (3 & seen1))) {\n throwMissingFieldException(seen1, 3, $serializer_getInstance_7().o3k_1);\n }\n $this.size = size;\n $this.transform = transform;\n return $this;\n }\n function CoreRoomBoundingBox_init_$Create$(seen1, size, transform, serializationConstructorMarker) {\n return CoreRoomBoundingBox_init_$Init$(seen1, size, transform, serializationConstructorMarker, objectCreate(protoOf(CoreRoomBoundingBox)));\n }\n function CoreRoomBoundingBox(size, transform) {\n this.size = size;\n this.transform = transform;\n }\n protoOf(CoreRoomBoundingBox).n = function () {\n return this.size;\n };\n protoOf(CoreRoomBoundingBox).d1x = function () {\n return this.transform;\n };\n protoOf(CoreRoomBoundingBox).af = function () {\n return this.size;\n };\n protoOf(CoreRoomBoundingBox).bf = function () {\n return this.transform;\n };\n protoOf(CoreRoomBoundingBox).q3k = function (size, transform) {\n return new CoreRoomBoundingBox(size, transform);\n };\n protoOf(CoreRoomBoundingBox).copy = function (size, transform, $super) {\n size = size === VOID ? this.size : size;\n transform = transform === VOID ? this.transform : transform;\n return this.q3k(size, transform);\n };\n protoOf(CoreRoomBoundingBox).toString = function () {\n return 'CoreRoomBoundingBox(size=' + this.size + ', transform=' + this.transform + ')';\n };\n protoOf(CoreRoomBoundingBox).hashCode = function () {\n var result = this.size.hashCode();\n result = imul(result, 31) + this.transform.hashCode() | 0;\n return result;\n };\n protoOf(CoreRoomBoundingBox).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof CoreRoomBoundingBox))\n return false;\n var tmp0_other_with_cast = other instanceof CoreRoomBoundingBox ? other : THROW_CCE();\n if (!this.size.equals(tmp0_other_with_cast.size))\n return false;\n if (!this.transform.equals(tmp0_other_with_cast.transform))\n return false;\n return true;\n };\n function RoomGeometryData() {\n }\n function RoomSurface() {\n }\n function RoomEdge() {\n }\n function RoomCorner() {\n }\n function RoomObstacle() {\n }\n function RoomPoint3D() {\n }\n function RoomRotation() {\n }\n function RoomBoundingBox() {\n }\n function RoomTransform() {\n }\n function getOrCreateConfigEntity($this) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = $this.entityManager.entities;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.RoomService.getOrCreateConfigEntity.' call\n if (element.hasComponent(75)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var currentEntity = tmp$ret$1;\n var tmp;\n if (!(currentEntity == null)) {\n tmp = currentEntity;\n } else {\n var entity = $this.entityManager.createEntity();\n entity.addComponent(new DisplayNameComponent('RoomService config entity'));\n entity.addComponent(new DisabledRoomConnectorsConfigComponent(emptyList()));\n tmp = entity;\n }\n return tmp;\n }\n function addDisabledConnector($this, keys) {\n // Inline function 'kotlin.collections.fold' call\n var accumulator = _get_disabledRoomConnectorsConfigComponent__5usulp($this.w3k_1, $this);\n var tmp0_iterator = keys.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.RoomService.addDisabledConnector.' call\n var tmp0_safe_receiver = accumulator;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.addEnabledConnector(element);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n accumulator = tmp;\n }\n var tmp0_elvis_lhs = accumulator;\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n var newValue = tmp_0;\n $this.w3k_1.addComponent(newValue);\n }\n function removeDisabledConnector($this, keys) {\n // Inline function 'kotlin.collections.fold' call\n var accumulator = _get_disabledRoomConnectorsConfigComponent__5usulp($this.w3k_1, $this);\n var tmp0_iterator = keys.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.RoomService.removeDisabledConnector.' call\n var tmp0_safe_receiver = accumulator;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.removeEnabledConnector(element);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n accumulator = tmp;\n }\n var tmp0_elvis_lhs = accumulator;\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n var newValue = tmp_0;\n $this.w3k_1.addComponent(newValue);\n }\n function generateDisabledConnectorsComponent($this, room) {\n var tmp0_elvis_lhs = _get_disabledRoomConnectorsConfigComponent__5usulp($this.w3k_1, $this);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var disabledRoomConnectorsComponent = tmp;\n var tmp2_elvis_lhs = room == null ? $this.getRoom() : room;\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n return null;\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n var actualRoom = tmp_0;\n var tmp3_safe_receiver = get_connectorsComponent(actualRoom);\n var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.connectors;\n var tmp_1;\n if (tmp4_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp4_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp4_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.RoomService.generateDisabledConnectorsComponent.' call\n if (disabledRoomConnectorsComponent.connectorKeys.p(element.key)) {\n destination.q(element);\n }\n }\n tmp_1 = destination;\n }\n var tmp5_safe_receiver = tmp_1;\n var tmp_2;\n if (tmp5_safe_receiver == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp5_safe_receiver, 10));\n var tmp0_iterator = tmp5_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.RoomService.generateDisabledConnectorsComponent.' call\n var tmp$ret$3 = item.key;\n destination_0.q(tmp$ret$3);\n }\n tmp_2 = destination_0;\n }\n var tmp6_elvis_lhs = tmp_2;\n var disabledRoomConnectors = tmp6_elvis_lhs == null ? emptyList() : tmp6_elvis_lhs;\n var tmp_3;\n if (any(disabledRoomConnectors)) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$6 = copyToArray(disabledRoomConnectors);\n tmp_3 = new DisabledConnectorsComponent(tmp$ret$6);\n } else {\n tmp_3 = null;\n }\n return tmp_3;\n }\n function generateDisabledConnectorsComponent$default($this, room, $super) {\n room = room === VOID ? null : room;\n return generateDisabledConnectorsComponent($this, room);\n }\n function _get_disabledRoomConnectorsConfigComponent__5usulp(_this__u8e3s4, $this) {\n return _this__u8e3s4.__getComponentForKotlin(75);\n }\n function RoomService$getRoom$lambda(it) {\n return it.hasComponent(RoomComponent_instance.id);\n }\n function RoomService(entityManager, sceneManager) {\n this.entityManager = entityManager;\n this.sceneManager = sceneManager;\n this.w3k_1 = getOrCreateConfigEntity(this);\n }\n protoOf(RoomService).p1i = function () {\n return this.entityManager;\n };\n protoOf(RoomService).q1i = function () {\n return this.sceneManager;\n };\n protoOf(RoomService).getRoom = function () {\n var tmp = this.sceneManager.root;\n return findInHierarchy(tmp, RoomService$getRoom$lambda);\n };\n protoOf(RoomService).createOrUpdateRectangularRoom = function (dimensions) {\n var oldRoom = this.getRoom();\n var tmp;\n if (oldRoom == null) {\n var room = this.entityManager.createEntity();\n tmp = room;\n } else {\n tmp = oldRoom;\n }\n var room_0 = tmp;\n var coreRoomGeometryData = Companion_getInstance_95().generateRectangularRoom(dimensions);\n this.entityManager.addComponent(room_0, new RoomGeometryComponent(coreRoomGeometryData));\n setParent(room_0, this.sceneManager.scene);\n return room_0;\n };\n protoOf(RoomService).y3k = function (roomGeometryData, scale) {\n var tmp0_elvis_lhs = Companion_getInstance_95().interfaceFormatToInternalFormat(roomGeometryData, scale);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var coreRoomGeometryData = tmp;\n var oldRoom = this.getRoom();\n var tmp_0;\n if (oldRoom == null) {\n var room = this.entityManager.createEntity();\n tmp_0 = room;\n } else {\n tmp_0 = oldRoom;\n }\n var room_0 = tmp_0;\n this.entityManager.addComponent(room_0, new RoomGeometryComponent(coreRoomGeometryData));\n setParent(room_0, this.sceneManager.scene);\n return room_0;\n };\n protoOf(RoomService).createOrUpdateRoomFromGeometry = function (roomGeometryData, scale, $super) {\n scale = scale === VOID ? 1000.0 : scale;\n return this.y3k(roomGeometryData, scale);\n };\n protoOf(RoomService).enableFloorConnectors = function () {\n var tmp0_safe_receiver = this.getRoom();\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_connectorsComponent(tmp0_safe_receiver);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.connectors;\n var tmp;\n if (tmp2_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.RoomService.enableFloorConnectors.' call\n RoomConnectorConstants_getInstance();\n if (element.isOffering('floor')) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var tmp3_elvis_lhs = tmp;\n var tmp_0;\n if (tmp3_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp3_elvis_lhs;\n }\n var floorConnectors = tmp_0;\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(floorConnectors, 10));\n var tmp0_iterator = floorConnectors.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.RoomService.enableFloorConnectors.' call\n var tmp$ret$3 = item.key;\n destination_0.q(tmp$ret$3);\n }\n removeDisabledConnector(this, destination_0);\n this.applyDisabledConnectorsConfigToRoom();\n };\n protoOf(RoomService).disableFloorConnectors = function () {\n var tmp0_safe_receiver = this.getRoom();\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_connectorsComponent(tmp0_safe_receiver);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.connectors;\n var tmp;\n if (tmp2_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.RoomService.disableFloorConnectors.' call\n RoomConnectorConstants_getInstance();\n if (element.isOffering('floor')) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp = tmp$ret$1;\n }\n var tmp3_elvis_lhs = tmp;\n var tmp_0;\n if (tmp3_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_0 = tmp3_elvis_lhs;\n }\n var floorConnector = tmp_0;\n addDisabledConnector(this, listOf(floorConnector.key));\n this.applyDisabledConnectorsConfigToRoom();\n };\n protoOf(RoomService).setEnabledStateForRoomConnector = function (connectorKey, enabled) {\n if (enabled) {\n removeDisabledConnector(this, listOf(connectorKey));\n } else {\n addDisabledConnector(this, listOf(connectorKey));\n }\n this.applyDisabledConnectorsConfigToRoom();\n };\n protoOf(RoomService).enableAllRoomConnectors = function () {\n this.w3k_1.addComponent(new DisabledRoomConnectorsConfigComponent(emptyList()));\n this.applyDisabledConnectorsConfigToRoom();\n };\n protoOf(RoomService).disableAllRoomConnectors = function () {\n var tmp0_safe_receiver = this.getRoom();\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_connectorsComponent(tmp0_safe_receiver);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.connectors;\n var tmp;\n if (tmp2_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(tmp2_safe_receiver.length);\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var item = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.RoomService.disableAllRoomConnectors.' call\n var tmp$ret$0 = item.key;\n destination.q(tmp$ret$0);\n }\n tmp = destination;\n }\n var tmp3_elvis_lhs = tmp;\n var allConnectors = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;\n this.w3k_1.addComponent(new DisabledRoomConnectorsConfigComponent(allConnectors));\n this.applyDisabledConnectorsConfigToRoom();\n };\n protoOf(RoomService).roomSurfaceConnectorsWithNormal = function (normal) {\n var tmp0_elvis_lhs = this.getRoom();\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n return [];\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var room = tmp;\n var normalizedNormal = normal.normalize();\n var tmp1_safe_receiver = get_connectorsComponent(room);\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.connectors;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.room.RoomService.roomSurfaceConnectorsWithNormal.' call\n var tmp0_safe_receiver = element instanceof SurfaceConnector ? element : null;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n tmp_0 = destination;\n }\n var tmp3_safe_receiver = tmp_0;\n var tmp_1;\n if (tmp3_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = tmp3_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.RoomService.roomSurfaceConnectorsWithNormal.' call\n var surfaceNormal = element_0.plane.normal.normalize();\n if (surfaceNormal.equals(normalizedNormal)) {\n destination_0.q(element_0);\n }\n }\n tmp_1 = destination_0;\n }\n var tmp4_safe_receiver = tmp_1;\n var tmp_2;\n if (tmp4_safe_receiver == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_2 = copyToArray(tmp4_safe_receiver);\n }\n var tmp5_elvis_lhs = tmp_2;\n var tmp_3;\n if (tmp5_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_3 = [];\n } else {\n tmp_3 = tmp5_elvis_lhs;\n }\n return tmp_3;\n };\n protoOf(RoomService).roomConnectorsForSurface = function (surfaceConnector) {\n var tmp0_elvis_lhs = this.getRoom();\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var room = tmp;\n var tmp1_elvis_lhs = room.__getComponentForKotlin(76);\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return null;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var roomConnectorRelations = tmp_0;\n var tmp2_safe_receiver = get_connectorsComponent(room);\n return roomConnectorRelations.connectorsForSurface(surfaceConnector, tmp2_safe_receiver == null ? null : tmp2_safe_receiver.connectors);\n };\n protoOf(RoomService).z3k = function (room) {\n var safeRoom = room == null ? this.getRoom() : room;\n var disabledConnectorsComponent = generateDisabledConnectorsComponent(this, safeRoom);\n if (disabledConnectorsComponent == null) {\n if (safeRoom == null)\n null;\n else {\n safeRoom.removeComponent(71);\n }\n } else {\n var tmp;\n if (safeRoom == null) {\n tmp = null;\n } else {\n tmp = safeRoom.__getComponentForKotlin(71);\n }\n if (!(tmp == null)) {\n safeRoom.removeComponent(71);\n }\n if (safeRoom == null)\n null;\n else\n safeRoom.addComponent(disabledConnectorsComponent);\n }\n };\n protoOf(RoomService).applyDisabledConnectorsConfigToRoom = function (room, $super) {\n room = room === VOID ? null : room;\n return this.z3k(room);\n };\n function Companion_76() {\n this.id = 75;\n }\n protoOf(Companion_76).s1k = function () {\n return this.id;\n };\n var Companion_instance_109;\n function Companion_getInstance_85() {\n return Companion_instance_109;\n }\n function DisabledRoomConnectorsConfigComponent(connectorKeys) {\n this.connectorKeys = connectorKeys;\n this.x3k_1 = 75;\n }\n protoOf(DisabledRoomConnectorsConfigComponent).x1k = function () {\n return this.x3k_1;\n };\n protoOf(DisabledRoomConnectorsConfigComponent).eq = function (other) {\n return (other instanceof DisabledRoomConnectorsConfigComponent ? other : THROW_CCE()).equals(this);\n };\n protoOf(DisabledRoomConnectorsConfigComponent).addEnabledConnector = function (key) {\n var tmp;\n if (this.connectorKeys.p(key)) {\n tmp = this;\n } else {\n tmp = this.copy(plus_2(this.connectorKeys, key));\n }\n return tmp;\n };\n protoOf(DisabledRoomConnectorsConfigComponent).removeEnabledConnector = function (key) {\n var tmp;\n if (this.connectorKeys.p(key)) {\n tmp = this.copy(minus_0(this.connectorKeys, key));\n } else {\n tmp = this;\n }\n return tmp;\n };\n protoOf(DisabledRoomConnectorsConfigComponent).a3l = function (connectorKeys) {\n return new DisabledRoomConnectorsConfigComponent(connectorKeys);\n };\n protoOf(DisabledRoomConnectorsConfigComponent).copy = function (connectorKeys, $super) {\n connectorKeys = connectorKeys === VOID ? this.connectorKeys : connectorKeys;\n return this.a3l(connectorKeys);\n };\n protoOf(DisabledRoomConnectorsConfigComponent).toString = function () {\n return 'DisabledRoomConnectorsConfigComponent(connectorKeys=' + this.connectorKeys + ')';\n };\n protoOf(DisabledRoomConnectorsConfigComponent).hashCode = function () {\n return hashCode(this.connectorKeys);\n };\n protoOf(DisabledRoomConnectorsConfigComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof DisabledRoomConnectorsConfigComponent))\n return false;\n var tmp0_other_with_cast = other instanceof DisabledRoomConnectorsConfigComponent ? other : THROW_CCE();\n if (!equals(this.connectorKeys, tmp0_other_with_cast.connectorKeys))\n return false;\n return true;\n };\n function RoomComponent() {\n }\n protoOf(RoomComponent).x1k = function () {\n return this.id;\n };\n protoOf(RoomComponent).s1k = function () {\n return 53;\n };\n protoOf(RoomComponent).eq = function (other) {\n return true;\n };\n var RoomComponent_instance;\n function RoomComponent_getInstance() {\n return RoomComponent_instance;\n }\n function get_isRoom(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(RoomComponent_instance.id);\n }\n function filterConnectors($this, connectors, keys) {\n var tmp;\n if (connectors == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = connectors.length;\n while (inductionVariable < last) {\n var element = connectors[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.component.RoomConnectorRelationsComponent.filterConnectors.' call\n if ((keys == null ? null : contains(keys, element.key)) === true) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var tmp1_safe_receiver = tmp;\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_0 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = tmp1_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.room.component.RoomConnectorRelationsComponent.filterConnectors.' call\n var tmp0_safe_receiver = element_0 instanceof Connector ? element_0 : null;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_0.q(tmp0_safe_receiver);\n }\n }\n tmp_0 = destination_0;\n }\n var tmp2_elvis_lhs = tmp_0;\n return tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;\n }\n function Companion_77() {\n this.id = 76;\n }\n protoOf(Companion_77).s1k = function () {\n return this.id;\n };\n var Companion_instance_110;\n function Companion_getInstance_86() {\n return Companion_instance_110;\n }\n function RoomConnectorRelationsComponent(connectorsFromSurfaceKey, connectorsFromEdgeKey, connectorsFromCornerKey) {\n this.b3l_1 = connectorsFromSurfaceKey;\n this.c3l_1 = connectorsFromEdgeKey;\n this.d3l_1 = connectorsFromCornerKey;\n }\n protoOf(RoomConnectorRelationsComponent).x1k = function () {\n return 76;\n };\n protoOf(RoomConnectorRelationsComponent).eq = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RoomConnectorRelationsComponent))\n THROW_CCE();\n if (!equals(this.b3l_1, other.b3l_1))\n return false;\n if (!equals(this.c3l_1, other.c3l_1))\n return false;\n if (!equals(this.d3l_1, other.d3l_1))\n return false;\n return true;\n };\n protoOf(RoomConnectorRelationsComponent).connectorKeysForSurface = function (connectorKey) {\n return this.b3l_1.b3(connectorKey);\n };\n protoOf(RoomConnectorRelationsComponent).connectorsForSurface = function (connector, roomConnectors) {\n var relatedToSurface = this.connectorKeysForSurface(connector.p22_1);\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = filterConnectors(this, roomConnectors, relatedToSurface == null ? null : relatedToSurface.edgeKeys);\n var edges = copyToArray(this_0);\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_1 = filterConnectors(this, roomConnectors, relatedToSurface == null ? null : relatedToSurface.cornerKeys);\n var corners = copyToArray(this_1);\n return new RoomConnectorsForSurface(connector, edges, corners);\n };\n protoOf(RoomConnectorRelationsComponent).connectorKeysForEdge = function (connectorKey) {\n return this.c3l_1.b3(connectorKey);\n };\n protoOf(RoomConnectorRelationsComponent).connectorsForEdge = function (connector, roomConnectors) {\n var relatedToEdge = this.connectorKeysForEdge(connector.y1y_1);\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = filterConnectors(this, roomConnectors, relatedToEdge == null ? null : relatedToEdge.surfaceKeys);\n var surfaces = copyToArray(this_0);\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_1 = filterConnectors(this, roomConnectors, relatedToEdge == null ? null : relatedToEdge.cornerKeys);\n var corners = copyToArray(this_1);\n return new RoomConnectorsForEdge(connector, corners, surfaces);\n };\n protoOf(RoomConnectorRelationsComponent).connectorKeysForCorner = function (connectorKey) {\n return this.d3l_1.b3(connectorKey);\n };\n protoOf(RoomConnectorRelationsComponent).connectorsForCorner = function (connector, roomConnectors) {\n var relatedToCorner = this.connectorKeysForCorner(connector.b20_1);\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = filterConnectors(this, roomConnectors, relatedToCorner == null ? null : relatedToCorner.edgeKeys);\n var edges = copyToArray(this_0);\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_1 = filterConnectors(this, roomConnectors, relatedToCorner == null ? null : relatedToCorner.surfaceKeys);\n var surfaces = copyToArray(this_1);\n return new RoomConnectorsForCorner(connector, edges, surfaces);\n };\n function RoomConnectorKeysForSurface(surfaceKey, edgeKeys, cornerKeys) {\n this.surfaceKey = surfaceKey;\n this.edgeKeys = edgeKeys;\n this.cornerKeys = cornerKeys;\n }\n protoOf(RoomConnectorKeysForSurface).e3l = function () {\n return this.surfaceKey;\n };\n protoOf(RoomConnectorKeysForSurface).f3l = function () {\n return this.edgeKeys;\n };\n protoOf(RoomConnectorKeysForSurface).g3l = function () {\n return this.cornerKeys;\n };\n protoOf(RoomConnectorKeysForSurface).af = function () {\n return this.surfaceKey;\n };\n protoOf(RoomConnectorKeysForSurface).bf = function () {\n return this.edgeKeys;\n };\n protoOf(RoomConnectorKeysForSurface).g1k = function () {\n return this.cornerKeys;\n };\n protoOf(RoomConnectorKeysForSurface).h3l = function (surfaceKey, edgeKeys, cornerKeys) {\n return new RoomConnectorKeysForSurface(surfaceKey, edgeKeys, cornerKeys);\n };\n protoOf(RoomConnectorKeysForSurface).copy = function (surfaceKey, edgeKeys, cornerKeys, $super) {\n surfaceKey = surfaceKey === VOID ? this.surfaceKey : surfaceKey;\n edgeKeys = edgeKeys === VOID ? this.edgeKeys : edgeKeys;\n cornerKeys = cornerKeys === VOID ? this.cornerKeys : cornerKeys;\n return this.h3l(surfaceKey, edgeKeys, cornerKeys);\n };\n protoOf(RoomConnectorKeysForSurface).toString = function () {\n return 'RoomConnectorKeysForSurface(surfaceKey=' + this.surfaceKey + ', edgeKeys=' + toString(this.edgeKeys) + ', cornerKeys=' + toString(this.cornerKeys) + ')';\n };\n protoOf(RoomConnectorKeysForSurface).hashCode = function () {\n var result = getStringHashCode(this.surfaceKey);\n result = imul(result, 31) + hashCode(this.edgeKeys) | 0;\n result = imul(result, 31) + hashCode(this.cornerKeys) | 0;\n return result;\n };\n protoOf(RoomConnectorKeysForSurface).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RoomConnectorKeysForSurface))\n return false;\n var tmp0_other_with_cast = other instanceof RoomConnectorKeysForSurface ? other : THROW_CCE();\n if (!(this.surfaceKey === tmp0_other_with_cast.surfaceKey))\n return false;\n if (!equals(this.edgeKeys, tmp0_other_with_cast.edgeKeys))\n return false;\n if (!equals(this.cornerKeys, tmp0_other_with_cast.cornerKeys))\n return false;\n return true;\n };\n function RoomConnectorKeysForEdge(edgeKey, cornerKeys, surfaceKeys) {\n this.edgeKey = edgeKey;\n this.cornerKeys = cornerKeys;\n this.surfaceKeys = surfaceKeys;\n }\n protoOf(RoomConnectorKeysForEdge).i3l = function () {\n return this.edgeKey;\n };\n protoOf(RoomConnectorKeysForEdge).g3l = function () {\n return this.cornerKeys;\n };\n protoOf(RoomConnectorKeysForEdge).j3l = function () {\n return this.surfaceKeys;\n };\n protoOf(RoomConnectorKeysForEdge).af = function () {\n return this.edgeKey;\n };\n protoOf(RoomConnectorKeysForEdge).bf = function () {\n return this.cornerKeys;\n };\n protoOf(RoomConnectorKeysForEdge).g1k = function () {\n return this.surfaceKeys;\n };\n protoOf(RoomConnectorKeysForEdge).h3l = function (edgeKey, cornerKeys, surfaceKeys) {\n return new RoomConnectorKeysForEdge(edgeKey, cornerKeys, surfaceKeys);\n };\n protoOf(RoomConnectorKeysForEdge).copy = function (edgeKey, cornerKeys, surfaceKeys, $super) {\n edgeKey = edgeKey === VOID ? this.edgeKey : edgeKey;\n cornerKeys = cornerKeys === VOID ? this.cornerKeys : cornerKeys;\n surfaceKeys = surfaceKeys === VOID ? this.surfaceKeys : surfaceKeys;\n return this.h3l(edgeKey, cornerKeys, surfaceKeys);\n };\n protoOf(RoomConnectorKeysForEdge).toString = function () {\n return 'RoomConnectorKeysForEdge(edgeKey=' + this.edgeKey + ', cornerKeys=' + toString(this.cornerKeys) + ', surfaceKeys=' + toString(this.surfaceKeys) + ')';\n };\n protoOf(RoomConnectorKeysForEdge).hashCode = function () {\n var result = getStringHashCode(this.edgeKey);\n result = imul(result, 31) + hashCode(this.cornerKeys) | 0;\n result = imul(result, 31) + hashCode(this.surfaceKeys) | 0;\n return result;\n };\n protoOf(RoomConnectorKeysForEdge).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RoomConnectorKeysForEdge))\n return false;\n var tmp0_other_with_cast = other instanceof RoomConnectorKeysForEdge ? other : THROW_CCE();\n if (!(this.edgeKey === tmp0_other_with_cast.edgeKey))\n return false;\n if (!equals(this.cornerKeys, tmp0_other_with_cast.cornerKeys))\n return false;\n if (!equals(this.surfaceKeys, tmp0_other_with_cast.surfaceKeys))\n return false;\n return true;\n };\n function RoomConnectorKeysForCorner(cornerKey, edgeKeys, surfaceKeys) {\n this.cornerKey = cornerKey;\n this.edgeKeys = edgeKeys;\n this.surfaceKeys = surfaceKeys;\n }\n protoOf(RoomConnectorKeysForCorner).k3l = function () {\n return this.cornerKey;\n };\n protoOf(RoomConnectorKeysForCorner).f3l = function () {\n return this.edgeKeys;\n };\n protoOf(RoomConnectorKeysForCorner).j3l = function () {\n return this.surfaceKeys;\n };\n protoOf(RoomConnectorKeysForCorner).af = function () {\n return this.cornerKey;\n };\n protoOf(RoomConnectorKeysForCorner).bf = function () {\n return this.edgeKeys;\n };\n protoOf(RoomConnectorKeysForCorner).g1k = function () {\n return this.surfaceKeys;\n };\n protoOf(RoomConnectorKeysForCorner).h3l = function (cornerKey, edgeKeys, surfaceKeys) {\n return new RoomConnectorKeysForCorner(cornerKey, edgeKeys, surfaceKeys);\n };\n protoOf(RoomConnectorKeysForCorner).copy = function (cornerKey, edgeKeys, surfaceKeys, $super) {\n cornerKey = cornerKey === VOID ? this.cornerKey : cornerKey;\n edgeKeys = edgeKeys === VOID ? this.edgeKeys : edgeKeys;\n surfaceKeys = surfaceKeys === VOID ? this.surfaceKeys : surfaceKeys;\n return this.h3l(cornerKey, edgeKeys, surfaceKeys);\n };\n protoOf(RoomConnectorKeysForCorner).toString = function () {\n return 'RoomConnectorKeysForCorner(cornerKey=' + this.cornerKey + ', edgeKeys=' + toString(this.edgeKeys) + ', surfaceKeys=' + toString(this.surfaceKeys) + ')';\n };\n protoOf(RoomConnectorKeysForCorner).hashCode = function () {\n var result = getStringHashCode(this.cornerKey);\n result = imul(result, 31) + hashCode(this.edgeKeys) | 0;\n result = imul(result, 31) + hashCode(this.surfaceKeys) | 0;\n return result;\n };\n protoOf(RoomConnectorKeysForCorner).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RoomConnectorKeysForCorner))\n return false;\n var tmp0_other_with_cast = other instanceof RoomConnectorKeysForCorner ? other : THROW_CCE();\n if (!(this.cornerKey === tmp0_other_with_cast.cornerKey))\n return false;\n if (!equals(this.edgeKeys, tmp0_other_with_cast.edgeKeys))\n return false;\n if (!equals(this.surfaceKeys, tmp0_other_with_cast.surfaceKeys))\n return false;\n return true;\n };\n function RoomConnectorsForSurface(surface, edges, corners) {\n this.surface = surface;\n this.edges = edges;\n this.corners = corners;\n }\n protoOf(RoomConnectorsForSurface).o23 = function () {\n return this.surface;\n };\n protoOf(RoomConnectorsForSurface).n3j = function () {\n return this.edges;\n };\n protoOf(RoomConnectorsForSurface).r3k = function () {\n return this.corners;\n };\n protoOf(RoomConnectorsForSurface).af = function () {\n return this.surface;\n };\n protoOf(RoomConnectorsForSurface).bf = function () {\n return this.edges;\n };\n protoOf(RoomConnectorsForSurface).g1k = function () {\n return this.corners;\n };\n protoOf(RoomConnectorsForSurface).l3l = function (surface, edges, corners) {\n return new RoomConnectorsForSurface(surface, edges, corners);\n };\n protoOf(RoomConnectorsForSurface).copy = function (surface, edges, corners, $super) {\n surface = surface === VOID ? this.surface : surface;\n edges = edges === VOID ? this.edges : edges;\n corners = corners === VOID ? this.corners : corners;\n return this.l3l(surface, edges, corners);\n };\n protoOf(RoomConnectorsForSurface).toString = function () {\n return 'RoomConnectorsForSurface(surface=' + this.surface + ', edges=' + toString(this.edges) + ', corners=' + toString(this.corners) + ')';\n };\n protoOf(RoomConnectorsForSurface).hashCode = function () {\n var result = this.surface.hashCode();\n result = imul(result, 31) + hashCode(this.edges) | 0;\n result = imul(result, 31) + hashCode(this.corners) | 0;\n return result;\n };\n protoOf(RoomConnectorsForSurface).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RoomConnectorsForSurface))\n return false;\n var tmp0_other_with_cast = other instanceof RoomConnectorsForSurface ? other : THROW_CCE();\n if (!this.surface.equals(tmp0_other_with_cast.surface))\n return false;\n if (!equals(this.edges, tmp0_other_with_cast.edges))\n return false;\n if (!equals(this.corners, tmp0_other_with_cast.corners))\n return false;\n return true;\n };\n function RoomConnectorsForEdge(edge, corners, surfaces) {\n this.edge = edge;\n this.corners = corners;\n this.surfaces = surfaces;\n }\n protoOf(RoomConnectorsForEdge).m3l = function () {\n return this.edge;\n };\n protoOf(RoomConnectorsForEdge).r3k = function () {\n return this.corners;\n };\n protoOf(RoomConnectorsForEdge).l23 = function () {\n return this.surfaces;\n };\n protoOf(RoomConnectorsForEdge).af = function () {\n return this.edge;\n };\n protoOf(RoomConnectorsForEdge).bf = function () {\n return this.corners;\n };\n protoOf(RoomConnectorsForEdge).g1k = function () {\n return this.surfaces;\n };\n protoOf(RoomConnectorsForEdge).n3l = function (edge, corners, surfaces) {\n return new RoomConnectorsForEdge(edge, corners, surfaces);\n };\n protoOf(RoomConnectorsForEdge).copy = function (edge, corners, surfaces, $super) {\n edge = edge === VOID ? this.edge : edge;\n corners = corners === VOID ? this.corners : corners;\n surfaces = surfaces === VOID ? this.surfaces : surfaces;\n return this.n3l(edge, corners, surfaces);\n };\n protoOf(RoomConnectorsForEdge).toString = function () {\n return 'RoomConnectorsForEdge(edge=' + this.edge + ', corners=' + toString(this.corners) + ', surfaces=' + toString(this.surfaces) + ')';\n };\n protoOf(RoomConnectorsForEdge).hashCode = function () {\n var result = this.edge.hashCode();\n result = imul(result, 31) + hashCode(this.corners) | 0;\n result = imul(result, 31) + hashCode(this.surfaces) | 0;\n return result;\n };\n protoOf(RoomConnectorsForEdge).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RoomConnectorsForEdge))\n return false;\n var tmp0_other_with_cast = other instanceof RoomConnectorsForEdge ? other : THROW_CCE();\n if (!this.edge.equals(tmp0_other_with_cast.edge))\n return false;\n if (!equals(this.corners, tmp0_other_with_cast.corners))\n return false;\n if (!equals(this.surfaces, tmp0_other_with_cast.surfaces))\n return false;\n return true;\n };\n function RoomConnectorsForCorner(corner, edges, surfaces) {\n this.corner = corner;\n this.edges = edges;\n this.surfaces = surfaces;\n }\n protoOf(RoomConnectorsForCorner).o3l = function () {\n return this.corner;\n };\n protoOf(RoomConnectorsForCorner).n3j = function () {\n return this.edges;\n };\n protoOf(RoomConnectorsForCorner).l23 = function () {\n return this.surfaces;\n };\n protoOf(RoomConnectorsForCorner).af = function () {\n return this.corner;\n };\n protoOf(RoomConnectorsForCorner).bf = function () {\n return this.edges;\n };\n protoOf(RoomConnectorsForCorner).g1k = function () {\n return this.surfaces;\n };\n protoOf(RoomConnectorsForCorner).p3l = function (corner, edges, surfaces) {\n return new RoomConnectorsForCorner(corner, edges, surfaces);\n };\n protoOf(RoomConnectorsForCorner).copy = function (corner, edges, surfaces, $super) {\n corner = corner === VOID ? this.corner : corner;\n edges = edges === VOID ? this.edges : edges;\n surfaces = surfaces === VOID ? this.surfaces : surfaces;\n return this.p3l(corner, edges, surfaces);\n };\n protoOf(RoomConnectorsForCorner).toString = function () {\n return 'RoomConnectorsForCorner(corner=' + this.corner + ', edges=' + toString(this.edges) + ', surfaces=' + toString(this.surfaces) + ')';\n };\n protoOf(RoomConnectorsForCorner).hashCode = function () {\n var result = this.corner.hashCode();\n result = imul(result, 31) + hashCode(this.edges) | 0;\n result = imul(result, 31) + hashCode(this.surfaces) | 0;\n return result;\n };\n protoOf(RoomConnectorsForCorner).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RoomConnectorsForCorner))\n return false;\n var tmp0_other_with_cast = other instanceof RoomConnectorsForCorner ? other : THROW_CCE();\n if (!this.corner.equals(tmp0_other_with_cast.corner))\n return false;\n if (!equals(this.edges, tmp0_other_with_cast.edges))\n return false;\n if (!equals(this.surfaces, tmp0_other_with_cast.surfaces))\n return false;\n return true;\n };\n function RoomDimensionsComponent$Companion$serializer$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n return Unit_instance;\n }\n function Companion_78() {\n Companion_instance_111 = this;\n this.id = 41;\n this.serializationKey = 'RoomDimensionsComponent';\n var tmp = this;\n tmp.q3l_1 = Json(VOID, RoomDimensionsComponent$Companion$serializer$lambda);\n }\n protoOf(Companion_78).s1k = function () {\n return this.id;\n };\n protoOf(Companion_78).p1l = function () {\n return this.serializationKey;\n };\n protoOf(Companion_78).fromJson = function (json) {\n return this.q3l_1.l15(this.l17(), json);\n };\n protoOf(Companion_78).l17 = function () {\n return $serializer_getInstance_8();\n };\n var Companion_instance_111;\n function Companion_getInstance_87() {\n if (Companion_instance_111 == null)\n new Companion_78();\n return Companion_instance_111;\n }\n function $serializer_6() {\n $serializer_instance_6 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.stl.room.component.RoomDimensionsComponent', this, 2);\n tmp0_serialDesc.cv('d', false);\n tmp0_serialDesc.cv('serializable', true);\n this.r3l_1 = tmp0_serialDesc;\n }\n protoOf($serializer_6).ok = function () {\n return this.r3l_1;\n };\n protoOf($serializer_6).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [$serializer_getInstance(), BooleanSerializer_getInstance()];\n };\n protoOf($serializer_6).qk = function (decoder) {\n var tmp0_desc = this.r3l_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = false;\n var tmp6_input = decoder.nn(tmp0_desc);\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.pn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.pn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return RoomDimensionsComponent_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);\n };\n protoOf($serializer_6).s3l = function (encoder, value) {\n var tmp0_desc = this.r3l_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.ep(tmp0_desc, 0, $serializer_getInstance(), value.dimensions);\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.t3l_1 === false)) {\n tmp1_output.uo(tmp0_desc, 1, value.t3l_1);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_6).pk = function (encoder, value) {\n return this.s3l(encoder, value instanceof RoomDimensionsComponent ? value : THROW_CCE());\n };\n var $serializer_instance_6;\n function $serializer_getInstance_8() {\n if ($serializer_instance_6 == null)\n new $serializer_6();\n return $serializer_instance_6;\n }\n function RoomDimensionsComponent_init_$Init$(seen1, dimensions, serializable, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_8().r3l_1);\n }\n $this.dimensions = dimensions;\n if (0 === (seen1 & 2))\n $this.t3l_1 = false;\n else\n $this.t3l_1 = serializable;\n return $this;\n }\n function RoomDimensionsComponent_init_$Create$(seen1, dimensions, serializable, serializationConstructorMarker) {\n return RoomDimensionsComponent_init_$Init$(seen1, dimensions, serializable, serializationConstructorMarker, objectCreate(protoOf(RoomDimensionsComponent)));\n }\n function RoomDimensionsComponent(dimensions) {\n Companion_getInstance_87();\n this.dimensions = dimensions;\n this.t3l_1 = false;\n }\n protoOf(RoomDimensionsComponent).u3l = function () {\n return this.dimensions;\n };\n protoOf(RoomDimensionsComponent).x1k = function () {\n return 41;\n };\n protoOf(RoomDimensionsComponent).z1k = function () {\n return this.t3l_1;\n };\n protoOf(RoomDimensionsComponent).toJson = function (parse) {\n return Companion_getInstance_87().q3l_1.k15(Companion_getInstance_87().l17(), this);\n };\n protoOf(RoomDimensionsComponent).toJsonElement = function () {\n return Companion_getInstance_87().q3l_1.k15(Companion_getInstance_87().l17(), this);\n };\n protoOf(RoomDimensionsComponent).serializationKey = function () {\n return 'RoomDimensionsComponent';\n };\n protoOf(RoomDimensionsComponent).eq = function (other) {\n return (other instanceof RoomDimensionsComponent ? other : THROW_CCE()).dimensions.equals(this.dimensions);\n };\n protoOf(RoomDimensionsComponent).af = function () {\n return this.dimensions;\n };\n protoOf(RoomDimensionsComponent).w38 = function (dimensions) {\n return new RoomDimensionsComponent(dimensions);\n };\n protoOf(RoomDimensionsComponent).copy = function (dimensions, $super) {\n dimensions = dimensions === VOID ? this.dimensions : dimensions;\n return this.w38(dimensions);\n };\n protoOf(RoomDimensionsComponent).toString = function () {\n return 'RoomDimensionsComponent(dimensions=' + this.dimensions + ')';\n };\n protoOf(RoomDimensionsComponent).hashCode = function () {\n return this.dimensions.hashCode();\n };\n protoOf(RoomDimensionsComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RoomDimensionsComponent))\n return false;\n var tmp0_other_with_cast = other instanceof RoomDimensionsComponent ? other : THROW_CCE();\n if (!this.dimensions.equals(tmp0_other_with_cast.dimensions))\n return false;\n return true;\n };\n function RoomGeometryComponent$Companion$serializer$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n $this$Json.l16_1 = 'itemType';\n return Unit_instance;\n }\n function Companion_79() {\n Companion_instance_112 = this;\n this.id = 70;\n this.serializationKey = 'RoomGeometry';\n var tmp = this;\n tmp.v3l_1 = Json(VOID, RoomGeometryComponent$Companion$serializer$lambda);\n }\n protoOf(Companion_79).s1k = function () {\n return this.id;\n };\n protoOf(Companion_79).p1l = function () {\n return this.serializationKey;\n };\n protoOf(Companion_79).fromJson = function (json) {\n return this.v3l_1.l15(this.l17(), json);\n };\n protoOf(Companion_79).l17 = function () {\n return $serializer_getInstance_9();\n };\n var Companion_instance_112;\n function Companion_getInstance_88() {\n if (Companion_instance_112 == null)\n new Companion_79();\n return Companion_instance_112;\n }\n function $serializer_7() {\n $serializer_instance_7 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.stl.room.component.RoomGeometryComponent', this, 1);\n tmp0_serialDesc.cv('data', false);\n this.w3l_1 = tmp0_serialDesc;\n }\n protoOf($serializer_7).ok = function () {\n return this.w3l_1;\n };\n protoOf($serializer_7).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [$serializer_getInstance_1()];\n };\n protoOf($serializer_7).qk = function (decoder) {\n var tmp0_desc = this.w3l_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.zn(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.zn(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return RoomGeometryComponent_init_$Create$(tmp3_bitMask0, tmp4_local0, null);\n };\n protoOf($serializer_7).x3l = function (encoder, value) {\n var tmp0_desc = this.w3l_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.ep(tmp0_desc, 0, $serializer_getInstance_1(), value.roomGeometryData);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_7).pk = function (encoder, value) {\n return this.x3l(encoder, value instanceof RoomGeometryComponent ? value : THROW_CCE());\n };\n var $serializer_instance_7;\n function $serializer_getInstance_9() {\n if ($serializer_instance_7 == null)\n new $serializer_7();\n return $serializer_instance_7;\n }\n function RoomGeometryComponent_init_$Init$(seen1, roomGeometryData, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_9().w3l_1);\n }\n $this.roomGeometryData = roomGeometryData;\n $this.surfaces = Companion_getInstance_95().generateWallMap($this.roomGeometryData);\n $this.dimensions = Companion_getInstance_92().getDimensions($this.roomGeometryData);\n return $this;\n }\n function RoomGeometryComponent_init_$Create$(seen1, roomGeometryData, serializationConstructorMarker) {\n return RoomGeometryComponent_init_$Init$(seen1, roomGeometryData, serializationConstructorMarker, objectCreate(protoOf(RoomGeometryComponent)));\n }\n function RoomGeometryComponent(roomGeometryData) {\n Companion_getInstance_88();\n this.roomGeometryData = roomGeometryData;\n this.surfaces = Companion_getInstance_95().generateWallMap(this.roomGeometryData);\n this.dimensions = Companion_getInstance_92().getDimensions(this.roomGeometryData);\n }\n protoOf(RoomGeometryComponent).y3l = function () {\n return this.roomGeometryData;\n };\n protoOf(RoomGeometryComponent).toJson = function (parse) {\n return Companion_getInstance_88().v3l_1.k15(Companion_getInstance_88().l17(), this);\n };\n protoOf(RoomGeometryComponent).serializationKey = function () {\n return 'RoomGeometry';\n };\n protoOf(RoomGeometryComponent).l23 = function () {\n return this.surfaces;\n };\n protoOf(RoomGeometryComponent).u3l = function () {\n return this.dimensions;\n };\n protoOf(RoomGeometryComponent).x1k = function () {\n return 70;\n };\n protoOf(RoomGeometryComponent).eq = function (other) {\n return (other instanceof RoomGeometryComponent ? other : THROW_CCE()).roomGeometryData.equals(this.roomGeometryData);\n };\n protoOf(RoomGeometryComponent).af = function () {\n return this.roomGeometryData;\n };\n protoOf(RoomGeometryComponent).z3l = function (roomGeometryData) {\n return new RoomGeometryComponent(roomGeometryData);\n };\n protoOf(RoomGeometryComponent).copy = function (roomGeometryData, $super) {\n roomGeometryData = roomGeometryData === VOID ? this.roomGeometryData : roomGeometryData;\n return this.z3l(roomGeometryData);\n };\n protoOf(RoomGeometryComponent).toString = function () {\n return 'RoomGeometryComponent(roomGeometryData=' + this.roomGeometryData + ')';\n };\n protoOf(RoomGeometryComponent).hashCode = function () {\n return this.roomGeometryData.hashCode();\n };\n protoOf(RoomGeometryComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RoomGeometryComponent))\n return false;\n var tmp0_other_with_cast = other instanceof RoomGeometryComponent ? other : THROW_CCE();\n if (!this.roomGeometryData.equals(tmp0_other_with_cast.roomGeometryData))\n return false;\n return true;\n };\n function Companion_80() {\n this.id = 103;\n }\n protoOf(Companion_80).s1k = function () {\n return this.id;\n };\n var Companion_instance_113;\n function Companion_getInstance_89() {\n return Companion_instance_113;\n }\n function RoomPartComponent(type) {\n this.type = type;\n }\n protoOf(RoomPartComponent).a1x = function () {\n return this.type;\n };\n protoOf(RoomPartComponent).x1k = function () {\n return 103;\n };\n protoOf(RoomPartComponent).eq = function (other) {\n return (other instanceof RoomPartComponent ? other : THROW_CCE()).type === this.type;\n };\n protoOf(RoomPartComponent).af = function () {\n return this.type;\n };\n protoOf(RoomPartComponent).q1l = function (type) {\n return new RoomPartComponent(type);\n };\n protoOf(RoomPartComponent).copy = function (type, $super) {\n type = type === VOID ? this.type : type;\n return this.q1l(type);\n };\n protoOf(RoomPartComponent).toString = function () {\n return 'RoomPartComponent(type=' + this.type + ')';\n };\n protoOf(RoomPartComponent).hashCode = function () {\n return getStringHashCode(this.type);\n };\n protoOf(RoomPartComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RoomPartComponent))\n return false;\n var tmp0_other_with_cast = other instanceof RoomPartComponent ? other : THROW_CCE();\n if (!(this.type === tmp0_other_with_cast.type))\n return false;\n return true;\n };\n function get_isRoomPart(_this__u8e3s4) {\n return _this__u8e3s4.hasComponent(103);\n }\n function RoomRefToRoomComponentInterceptor() {\n this.a3m_1 = true;\n }\n protoOf(RoomRefToRoomComponentInterceptor).a1m = function () {\n return this.a3m_1;\n };\n protoOf(RoomRefToRoomComponentInterceptor).productSpecification = function (productRef) {\n return null;\n };\n protoOf(RoomRefToRoomComponentInterceptor).rangeId = function () {\n return 'RoomCatalog';\n };\n protoOf(RoomRefToRoomComponentInterceptor).rangeVersion = function () {\n return '0.1';\n };\n protoOf(RoomRefToRoomComponentInterceptor).toString = function () {\n return this.rangeId() + ' ' + this.rangeVersion();\n };\n protoOf(RoomRefToRoomComponentInterceptor).allProductRefs = function () {\n // Inline function 'kotlin.emptyArray' call\n return [];\n };\n protoOf(RoomRefToRoomComponentInterceptor).beforeBuildingEntities = function (serializableTree, catalogVersion) {\n if (serializableTree.version === '1.0') {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = serializableTree.entities.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.interceptor.RoomRefToRoomComponentInterceptor.beforeBuildingEntities.' call\n if ((element.ref === 'room-10000x2500x10000' ? true : element.ref === 'room-5000x2500x4000') ? true : element.ref === 'room') {\n var component = new RoomDimensionsComponent(__VectorIntConstructorKotlin(5000, 2500, 4000));\n var tmp0_safe_receiver = element.serializedComponents;\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver.r2(component.serializationKey(), component.toJsonElement());\n }\n }\n }\n if (serializableTree.version === '1.2') {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = serializableTree.entities.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.room.interceptor.RoomRefToRoomComponentInterceptor.beforeBuildingEntities.' call\n if ((element_0.ref === 'room-10000x2500x10000' ? true : element_0.ref === 'room-5000x2500x4000') ? true : element_0.ref === 'room') {\n var tmp0_elvis_lhs = element_0.components;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var oldComponents = tmp;\n var component_0 = new RoomDimensionsComponent(__VectorIntConstructorKotlin(5000, 2500, 4000));\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = [component_0];\n element_0.components = oldComponents.concat(tmp$ret$4);\n }\n }\n }\n };\n function Companion_81() {\n this.ID = 'RoomDimensionToGeometrySystem';\n }\n protoOf(Companion_81).u1n = function () {\n return this.ID;\n };\n var Companion_instance_114;\n function Companion_getInstance_90() {\n return Companion_instance_114;\n }\n function createGeometry($this, room, dimensions) {\n var roomGeometryData = Companion_getInstance_95().generateRectangularRoom(dimensions);\n $this.entityManager.addComponent(room, RoomComponent_instance);\n $this.entityManager.addComponent(room, new RoomGeometryComponent(roomGeometryData));\n $this.entityManager.addComponent(room, StaticComponent_getInstance());\n Companion_getInstance_87();\n $this.entityManager.removeComponent(room, 41);\n }\n function RoomDimensionToGeometrySystem(entityManager) {\n Companion_getInstance_87();\n SystemBase.call(this, 'RoomDimensionToGeometrySystem', 41);\n this.entityManager = entityManager;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.j3m_1 = ['RoomSystem'];\n var tmp_0 = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0.k3m_1 = [70, 53];\n }\n protoOf(RoomDimensionToGeometrySystem).p1i = function () {\n return this.entityManager;\n };\n protoOf(RoomDimensionToGeometrySystem).onAddComponent = function (entity, newComponent) {\n createGeometry(this, entity, newComponent.dimensions);\n };\n protoOf(RoomDimensionToGeometrySystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n createGeometry(this, entity, newComponent.dimensions);\n };\n protoOf(RoomDimensionToGeometrySystem).onRemoveComponent = function (entity, oldComponent) {\n };\n protoOf(RoomDimensionToGeometrySystem).y1o = function () {\n return this.j3m_1;\n };\n protoOf(RoomDimensionToGeometrySystem).w1o = function () {\n return this.k3m_1;\n };\n function RoomServiceDragSystem(entityManager) {\n SystemBase.call(this, 'RoomServiceDragSystem', 70);\n this.entityManager = entityManager;\n // Inline function 'kotlin.collections.find' call\n var this_0 = this.entityManager.entities;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.system.RoomServiceDragSystem.' call\n if (element.hasComponent(70)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_safe_receiver = tmp$ret$1;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n this.onAddComponent(tmp0_safe_receiver, ensureNotNull(tmp0_safe_receiver.__getComponentForKotlin(70)));\n }\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.t3m_1 = [74];\n }\n protoOf(RoomServiceDragSystem).p1i = function () {\n return this.entityManager;\n };\n protoOf(RoomServiceDragSystem).onAddComponent = function (entity, newComponent) {\n // Inline function 'kotlin.collections.map' call\n var this_0 = newComponent.roomGeometryData.walls;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.system.RoomServiceDragSystem.onAddComponent.' call\n var tmp$ret$0 = PolyhedronUtils_getInstance().singleSidedPolyhedronFromPolygon(item.surfaceGeometry.points);\n destination.q(tmp$ret$0);\n }\n var walls = destination;\n var floor = PolyhedronUtils_getInstance().singleSidedPolyhedronFromPolygon(newComponent.roomGeometryData.floor.surfaceGeometry.points);\n var ceiling = PolyhedronUtils_getInstance().singleSidedPolyhedronFromPolygon(newComponent.roomGeometryData.ceiling.surfaceGeometry.points);\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(walls, 10));\n var tmp0_iterator = walls.t();\n while (tmp0_iterator.u()) {\n var item_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.system.RoomServiceDragSystem.onAddComponent.' call\n var tmp$ret$3 = new DragSurface(item_0, null);\n destination_0.q(tmp$ret$3);\n }\n var this_1 = copyToArray(destination_0);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$9 = ['floor'];\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$13 = [new DragSurface(floor, tmp$ret$9)];\n var this_2 = this_1.concat(tmp$ret$13);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$17 = ['ceiling'];\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$21 = [new DragSurface(ceiling, tmp$ret$17)];\n var surfaces = this_2.concat(tmp$ret$21);\n entity.addComponent(new DragSurfacesComponent(surfaces));\n };\n protoOf(RoomServiceDragSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n this.onAddComponent(entity, newComponent);\n };\n protoOf(RoomServiceDragSystem).onRemoveComponent = function (entity, oldComponent) {\n entity.removeComponent(74);\n };\n protoOf(RoomServiceDragSystem).w1o = function () {\n return this.t3m_1;\n };\n function Companion_82() {\n this.ID = 'RoomSystem';\n }\n protoOf(Companion_82).u1n = function () {\n return this.ID;\n };\n var Companion_instance_115;\n function Companion_getInstance_91() {\n return Companion_instance_115;\n }\n function removeOldData($this, room) {\n Companion_getInstance_2();\n $this.d3n_1.removeComponent(room, 11);\n $this.d3n_1.removeComponent(room, 19);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = filterInHierarchy(room, RoomSystem$removeOldData$lambda);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.system.RoomSystem.removeOldData.' call\n $this.d3n_1.disposeEntity(element);\n }\n }\n function addStandardRoomComponents($this, room) {\n $this.d3n_1.addComponent(room, RoomComponent_instance);\n $this.d3n_1.addComponent(room, new ConnectionRootComponent());\n $this.d3n_1.addComponent(room, new SnapRootComponent());\n $this.d3n_1.addComponent(room, new DisplayNameComponent('Room'));\n $this.d3n_1.addComponent(room, StaticComponent_getInstance());\n }\n function generateRoom($this, room, roomGeometryComponent) {\n addStandardRoomComponents($this, room);\n var roomGeometry = roomGeometryComponent.roomGeometryData;\n var colliders = generateColliders($this, roomGeometry);\n var connectorComponents = generateConnectors($this, roomGeometryComponent);\n var obstacles = generateObstacleEntities($this, roomGeometry);\n var i = 0;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(colliders.length);\n var inductionVariable = 0;\n var last = colliders.length;\n while (inductionVariable < last) {\n var item = colliders[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.system.RoomSystem.generateRoom.' call\n var tmp0 = i;\n i = tmp0 + 1 | 0;\n var tmp$ret$0 = 'room-' + tmp0;\n destination.q(tmp$ret$0);\n }\n var colliderIds = copyToArray(destination);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = obstacles.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.system.RoomSystem.generateRoom.' call\n setParentMaintainWorldTransform(element, room);\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = connectorComponents.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.room.system.RoomSystem.generateRoom.' call\n $this.d3n_1.addComponent(room, element_0);\n }\n $this.d3n_1.addComponent(room, new ColliderShapeComponent(new PolyhedronGroup(colliders), colliderIds));\n $this.d3n_1.addComponent(room, RoomComponent_instance);\n $this.d3n_1.addComponent(room, StaticComponent_getInstance());\n $this.d3n_1.addComponent(room, new DisplayNameComponent('Room'));\n $this.roomService.applyDisabledConnectorsConfigToRoom(room);\n }\n function generateObstacleEntities($this, roomGeometry) {\n // Inline function 'kotlin.collections.map' call\n var this_0 = roomGeometry.obstacles;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.system.RoomSystem.generateObstacleEntities.' call\n var obstaclePolyhedron = CuboidFromSize(item.boundingBox.size);\n var transform = new Transform(item.boundingBox.transform.position, item.boundingBox.transform.rotation);\n var obstacleEntity = $this.d3n_1.createEntity();\n obstacleEntity.addComponent(new DisplayNameComponent(item.type + '-' + item.id));\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [item.type + '-' + item.id];\n obstacleEntity.addComponent(new ColliderShapeComponent(obstaclePolyhedron, tmp$ret$2));\n obstacleEntity.addComponent(new LocalTransformComponent(transform));\n obstacleEntity.addComponent(new WorldTransformComponent(transform));\n obstacleEntity.addComponent(new RoomPartComponent(item.type));\n destination.q(obstacleEntity);\n }\n return destination;\n }\n function generateColliders($this, roomGeometry) {\n var generateWallColliders = Companion_getInstance_92().generateWallColliders(roomGeometry.walls);\n var floorPolyhedron = Companion_getInstance_92().generateSurfaceCollider(roomGeometry.floor.surfaceGeometry);\n var ceilingPolyhedron = Companion_getInstance_92().generateSurfaceCollider(roomGeometry.ceiling.surfaceGeometry);\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.js.asDynamic' call\n return generateWallColliders.concat(floorPolyhedron).concat(ceilingPolyhedron);\n }\n function generateConnectors($this, roomGeometryComponent) {\n var roomGeometryData = roomGeometryComponent.roomGeometryData;\n var generatedWallConnectors = Companion_instance_118.generateWallConnectors(roomGeometryData.walls);\n var generatedEdgeConnectors = Companion_instance_118.generateEdgeConnectors(roomGeometryData.edges, roomGeometryComponent.surfaces);\n var generatedPointConnectors = Companion_instance_118.generatePointConnectors(roomGeometryData.vertices, roomGeometryComponent.surfaces);\n var floorConnector = Companion_instance_118.generateFloorConnector(roomGeometryData.floor);\n var ceilingConnector = Companion_instance_118.generateCeilingConnector(roomGeometryData.ceiling);\n var tmp = Companion_instance_117;\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [floorConnector];\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = generatedWallConnectors.concat(tmp$ret$3);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$8 = [ceilingConnector];\n var tmp$ret$9 = tmp$ret$5.concat(tmp$ret$8);\n var connectorMappings = tmp.createRelationsComponent(tmp$ret$9, generatedEdgeConnectors, generatedPointConnectors);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(generatedEdgeConnectors.length);\n var inductionVariable = 0;\n var last = generatedEdgeConnectors.length;\n while (inductionVariable < last) {\n var item = generatedEdgeConnectors[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.system.RoomSystem.generateConnectors.' call\n var tmp$ret$10 = item.connector;\n destination.q(tmp$ret$10);\n }\n var tmp_0 = destination;\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(generatedPointConnectors.length);\n var inductionVariable_0 = 0;\n var last_0 = generatedPointConnectors.length;\n while (inductionVariable_0 < last_0) {\n var item_0 = generatedPointConnectors[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.system.RoomSystem.generateConnectors.' call\n var tmp$ret$13 = item_0.connector;\n destination_0.q(tmp$ret$13);\n }\n var tmp_1 = plus_1(tmp_0, destination_0);\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(generatedWallConnectors.length);\n var inductionVariable_1 = 0;\n var last_1 = generatedWallConnectors.length;\n while (inductionVariable_1 < last_1) {\n var item_1 = generatedWallConnectors[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.system.RoomSystem.generateConnectors.' call\n var tmp$ret$16 = item_1.connector;\n destination_1.q(tmp$ret$16);\n }\n var this_0 = plus_2(plus_2(plus_1(tmp_1, destination_1), floorConnector.connector), ceilingConnector.connector);\n var connectors = copyToArray(this_0);\n return listOf_0([connectorMappings, new ConnectorsComponent(connectors)]);\n }\n function RoomSystem$removeOldData$lambda(it) {\n return get_isRoomPart(it);\n }\n function RoomSystem(roomService, coreServices) {\n Companion_getInstance_88();\n SystemBase.call(this, 'RoomSystem', 70);\n this.roomService = roomService;\n this.c3n_1 = coreServices;\n this.d3n_1 = this.c3n_1.entityManager;\n this.e3n_1 = new RoomDimensionToGeometrySystem(this.d3n_1);\n this.f3n_1 = new RoomServiceDragSystem(this.d3n_1);\n this.g3n_1 = new RoomComponentDeserializer();\n this.h3n_1 = new RoomRefToRoomComponentInterceptor();\n this.enable();\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.i3n_1 = [11, 53, 19];\n }\n protoOf(RoomSystem).j3n = function () {\n return this.roomService;\n };\n protoOf(RoomSystem).onRegister = function () {\n protoOf(SystemBase).onRegister.call(this);\n this.e3n_1.register(this.d3n_1);\n this.f3n_1.register(this.d3n_1);\n };\n protoOf(RoomSystem).onUnregister = function () {\n protoOf(SystemBase).onUnregister.call(this);\n this.e3n_1.unregister(this.d3n_1);\n this.f3n_1.unregister(this.d3n_1);\n };\n protoOf(RoomSystem).enable = function () {\n protoOf(SystemBase).enable.call(this);\n this.e3n_1.enable();\n this.f3n_1.enable();\n this.c3n_1.componentDeserializerRegistry.register(this.g3n_1);\n this.c3n_1.productManager.addCatalog(this.h3n_1);\n };\n protoOf(RoomSystem).disable = function () {\n protoOf(SystemBase).disable.call(this);\n this.e3n_1.disable();\n this.f3n_1.disable();\n this.c3n_1.componentDeserializerRegistry.unregister(this.g3n_1);\n this.c3n_1.productManager.removeCatalog(this.h3n_1);\n };\n protoOf(RoomSystem).onAddComponent = function (room, newRoomGeometryComponent) {\n generateRoom(this, room, newRoomGeometryComponent);\n };\n protoOf(RoomSystem).onUpdateComponent = function (room, oldComponent, newComponent) {\n removeOldData(this, room);\n generateRoom(this, room, newComponent);\n };\n protoOf(RoomSystem).onRemoveComponent = function (room, oldComponent) {\n removeOldData(this, room);\n };\n protoOf(RoomSystem).w1o = function () {\n return this.i3n_1;\n };\n function RoomColliderUtilities$Companion$generateWallColliders$lambda($e) {\n return function () {\n return $e.message;\n };\n }\n function RoomColliderUtilities$Companion$generateWallColliders$lambda_0() {\n return 'Could not generate wall collider. Adding empty collider.';\n }\n function RoomColliderUtilities$Companion$generateWallColliders$lambda_1($wall) {\n return function () {\n return 'Wall surface geometry: ' + $wall.surfaceGeometry;\n };\n }\n function Companion_83() {\n Companion_instance_116 = this;\n this.logger = LoggerState_getInstance().m1m('RoomColliderUtilities');\n }\n protoOf(Companion_83).x1i = function () {\n return this.logger;\n };\n protoOf(Companion_83).generateWallColliders = function (walls) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var generatedColliders = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = walls.length;\n while (inductionVariable < last) {\n var wall = walls[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n try {\n var colliders = this.generateSurfaceCollider(wall.surfaceGeometry);\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = colliders.length;\n while (inductionVariable_0 < last_0) {\n var element = colliders[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.generateWallColliders.' call\n generatedColliders.q(element);\n }\n } catch ($p) {\n if ($p instanceof Exception) {\n var e = $p;\n this.logger.error(RoomColliderUtilities$Companion$generateWallColliders$lambda(e));\n this.logger.error(RoomColliderUtilities$Companion$generateWallColliders$lambda_0);\n this.logger.error(RoomColliderUtilities$Companion$generateWallColliders$lambda_1(wall));\n } else {\n throw $p;\n }\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(generatedColliders);\n };\n protoOf(Companion_83).generateSurfaceCollider = function (surfaceGeometry) {\n var thickness = 30.0;\n var tmp;\n if (PolyhedronUtils_getInstance().isConvexPolygon(surfaceGeometry.points)) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [PolyhedronUtils_getInstance().polyhedronFromPolygon(surfaceGeometry.points, thickness)];\n } else {\n var triangles = PolyhedronUtils_getInstance().earClipTriangulation(surfaceGeometry.points);\n // Inline function 'kotlin.collections.mutableListOf' call\n var polyhedrons = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = triangles.length;\n while (inductionVariable < last) {\n var element = triangles[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.generateSurfaceCollider.' call\n polyhedrons.q(PolyhedronUtils_getInstance().polyhedronFromPolygon(element, thickness));\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp = copyToArray(polyhedrons);\n }\n return tmp;\n };\n protoOf(Companion_83).getDimensions = function (convertedData) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = convertedData.walls;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.getDimensions.' call\n var list = toList(element.surfaceGeometry.points);\n addAll_0(destination, list);\n }\n var vertices = copyToArray(destination);\n return Companion_getInstance_3().fromVertices(vertices);\n };\n var Companion_instance_116;\n function Companion_getInstance_92() {\n if (Companion_instance_116 == null)\n new Companion_83();\n return Companion_instance_116;\n }\n function RoomColliderUtilities() {\n Companion_getInstance_92();\n }\n function RoomConnectorPair(connector, geometry) {\n this.connector = connector;\n this.geometry = geometry;\n }\n protoOf(RoomConnectorPair).n1k = function () {\n return this.connector;\n };\n protoOf(RoomConnectorPair).k3n = function () {\n return this.geometry;\n };\n protoOf(RoomConnectorPair).af = function () {\n return this.connector;\n };\n protoOf(RoomConnectorPair).bf = function () {\n return this.geometry;\n };\n protoOf(RoomConnectorPair).l3n = function (connector, geometry) {\n return new RoomConnectorPair(connector, geometry);\n };\n protoOf(RoomConnectorPair).copy = function (connector, geometry, $super) {\n connector = connector === VOID ? this.connector : connector;\n geometry = geometry === VOID ? this.geometry : geometry;\n return this.l3n(connector, geometry);\n };\n protoOf(RoomConnectorPair).toString = function () {\n return 'RoomConnectorPair(connector=' + this.connector + ', geometry=' + this.geometry + ')';\n };\n protoOf(RoomConnectorPair).hashCode = function () {\n var result = this.connector.hashCode();\n result = imul(result, 31) + hashCode(this.geometry) | 0;\n return result;\n };\n protoOf(RoomConnectorPair).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RoomConnectorPair))\n return false;\n var tmp0_other_with_cast = other instanceof RoomConnectorPair ? other : THROW_CCE();\n if (!equals(this.connector, tmp0_other_with_cast.connector))\n return false;\n if (!equals(this.geometry, tmp0_other_with_cast.geometry))\n return false;\n return true;\n };\n function collectRoomConnectorsForCorner($this, cornerToSurface, cornerToEdge) {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(cornerToSurface.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = cornerToSurface.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.collectRoomConnectorsForCorner.' call\n var corner = item.t2();\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = item.u2();\n var surfaces = copyToArray(this_0);\n var tmp0_safe_receiver = cornerToEdge.b3(item.t2());\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp = copyToArray(tmp0_safe_receiver);\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var edges = tmp_0;\n var tmp$ret$4 = to(corner, new RoomConnectorKeysForCorner(corner, edges, surfaces));\n destination.q(tmp$ret$4);\n }\n return toMap(destination);\n }\n function collectRoomConnectorsForEdge($this, edgeToSurface, edgeToCorner) {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(edgeToSurface.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = edgeToSurface.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.collectRoomConnectorsForEdge.' call\n var edge = item.t2();\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = item.u2();\n var surfaces = copyToArray(this_0);\n var tmp0_safe_receiver = edgeToCorner.b3(item.t2());\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp = copyToArray(tmp0_safe_receiver);\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var corners = tmp_0;\n var tmp$ret$4 = to(edge, new RoomConnectorKeysForEdge(edge, corners, surfaces));\n destination.q(tmp$ret$4);\n }\n return toMap(destination);\n }\n function collectRommConnectorsForSurface($this, surfaceToEdge, surfaceToCorner) {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(surfaceToEdge.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = surfaceToEdge.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.collectRommConnectorsForSurface.' call\n var surface = item.t2();\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = item.u2();\n var edges = copyToArray(this_0);\n var tmp0_safe_receiver = surfaceToCorner.b3(item.t2());\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp = copyToArray(tmp0_safe_receiver);\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var corners = tmp_0;\n var tmp$ret$4 = to(surface, new RoomConnectorKeysForSurface(surface, edges, corners));\n destination.q(tmp$ret$4);\n }\n return toMap(destination);\n }\n function addConnector($this, mapSet, key, connectorKey) {\n // Inline function 'kotlin.collections.getOrPut' call\n var value = mapSet.b3(key);\n var tmp;\n if (value == null) {\n // Inline function 'com.ikea.core.stl.room.utils.Companion.addConnector.' call\n // Inline function 'kotlin.collections.mutableSetOf' call\n var answer = LinkedHashSet_init_$Create$();\n mapSet.r2(key, answer);\n tmp = answer;\n } else {\n tmp = value;\n }\n var current = tmp;\n current.q(connectorKey);\n }\n function Companion_84() {\n }\n protoOf(Companion_84).createRelationsComponent = function (surfacesPairs, edgePairs, cornerPairs) {\n // Inline function 'kotlin.collections.mutableMapOf' call\n var edgeToSurface = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.mutableMapOf' call\n var edgeToCorner = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.mutableMapOf' call\n var surfaceToEdge = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.mutableMapOf' call\n var surfaceToCorner = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.mutableMapOf' call\n var cornerToEdge = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.mutableMapOf' call\n var cornerToSurface = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = surfacesPairs.length;\n while (inductionVariable < last) {\n var element = surfacesPairs[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.createRelationsComponent.' call\n var surfaceConnector = element.connector;\n var surfaceGeometry = element.geometry;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = edgePairs.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = edgePairs[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.createRelationsComponent..' call\n if (element_0.geometry.surfaceId1 === surfaceGeometry.id ? true : element_0.geometry.surfaceId2 === surfaceGeometry.id) {\n destination.q(element_0);\n }\n }\n var edges = destination;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_1 = 0;\n var last_1 = cornerPairs.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = cornerPairs[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.createRelationsComponent..' call\n var cornerGeometry = element_1.bf();\n if (contains(element.geometry.surfaceGeometry.points, cornerGeometry.point)) {\n destination_0.q(element_1);\n }\n }\n var surfaceCorners = destination_0;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = edges.t();\n while (tmp0_iterator.u()) {\n var element_2 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.createRelationsComponent..' call\n var edgeConnectorKey = element_2.connector.y1y_1;\n addConnector(Companion_instance_117, surfaceToEdge, surfaceConnector.p22_1, edgeConnectorKey);\n addConnector(Companion_instance_117, edgeToSurface, edgeConnectorKey, surfaceConnector.p22_1);\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_1 = ArrayList_init_$Create$();\n var inductionVariable_2 = 0;\n var last_2 = cornerPairs.length;\n while (inductionVariable_2 < last_2) {\n var element_3 = cornerPairs[inductionVariable_2];\n inductionVariable_2 = inductionVariable_2 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.createRelationsComponent...' call\n var cornerConnector = element_3.af();\n var edgeGeometry = element_2.geometry;\n if (cornerConnector.d20_1.position.equals(edgeGeometry.point1) ? true : cornerConnector.d20_1.position.equals(edgeGeometry.point2)) {\n destination_1.q(element_3);\n }\n }\n var cornersForEdge = destination_1;\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(cornersForEdge, 10));\n var tmp0_iterator_0 = cornersForEdge.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.createRelationsComponent...' call\n var tmp$ret$15 = item.connector.b20_1;\n destination_2.q(tmp$ret$15);\n }\n var tmp0_iterator_1 = destination_2.t();\n while (tmp0_iterator_1.u()) {\n var element_4 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.createRelationsComponent...' call\n addConnector(Companion_instance_117, edgeToCorner, edgeConnectorKey, element_4);\n addConnector(Companion_instance_117, cornerToEdge, element_4, edgeConnectorKey);\n }\n }\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(surfaceCorners, 10));\n var tmp0_iterator_2 = surfaceCorners.t();\n while (tmp0_iterator_2.u()) {\n var item_0 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.createRelationsComponent..' call\n var tmp$ret$18 = item_0.connector.b20_1;\n destination_3.q(tmp$ret$18);\n }\n var tmp0_iterator_3 = destination_3.t();\n while (tmp0_iterator_3.u()) {\n var element_5 = tmp0_iterator_3.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.createRelationsComponent..' call\n addConnector(Companion_instance_117, surfaceToCorner, surfaceConnector.p22_1, element_5);\n addConnector(Companion_instance_117, cornerToSurface, element_5, surfaceConnector.p22_1);\n }\n }\n var surfaceToConnectorsMap = collectRommConnectorsForSurface(this, surfaceToEdge, surfaceToCorner);\n var edgeToConnectorsMap = collectRoomConnectorsForEdge(this, edgeToSurface, edgeToCorner);\n var cornerToConnectorsMap = collectRoomConnectorsForCorner(this, cornerToSurface, cornerToEdge);\n return new RoomConnectorRelationsComponent(surfaceToConnectorsMap, edgeToConnectorsMap, cornerToConnectorsMap);\n };\n var Companion_instance_117;\n function Companion_getInstance_93() {\n return Companion_instance_117;\n }\n function RoomConnectorRelationsMapper() {\n }\n function includesSurfaceWithNormal($this, surfaces, normal) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable = 0;\n var last = surfaces.length;\n while (inductionVariable < last) {\n var element = surfaces[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.includesSurfaceWithNormal.' call\n var points = element.surfaceGeometry.points;\n var surfaceNormal = PolyhedronUtils_getInstance().surfaceNormal(points);\n if (surfaceNormal.equals(normal)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n return tmp$ret$1;\n }\n function generateOfferStringForFloorCornerAngle($this, surfaceGeometries, corner) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(surfaceGeometries.length);\n var inductionVariable = 0;\n var last = surfaceGeometries.length;\n while (inductionVariable < last) {\n var item = surfaceGeometries[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.generateOfferStringForFloorCornerAngle.' call\n var points = item.surfaceGeometry.points;\n var normal = PolyhedronUtils_getInstance().generateNormalFromCounterClockwiseTriangle(points[0], points[1], points[2]);\n var tmp$ret$0 = new Wall(item, normal);\n destination.q(tmp$ret$0);\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.generateOfferStringForFloorCornerAngle.' call\n var normal_0 = element.component2();\n if (almostEquals(normal_0.Y, 0.0, 1.0E-4)) {\n destination_0.q(element);\n }\n }\n var walls = destination_0;\n var tmp;\n if (walls.n() === 2) {\n var tmp0_container = pickWallsInOrder($this, walls.f1(0), walls.f1(1), corner);\n var firstWall = tmp0_container.af();\n var secondWall = tmp0_container.bf();\n var degreeInt = roundToInt((new Radians(firstWall.normal.signedAngle(secondWall.normal))).toDegree().value);\n var tmp_0;\n if (degreeInt < 0) {\n tmp_0 = 360 + degreeInt | 0;\n } else {\n tmp_0 = degreeInt;\n }\n var positiveAngle = tmp_0;\n tmp = '' + positiveAngle + '-degrees';\n } else {\n tmp = null;\n }\n return tmp;\n }\n function pickWallsInOrder($this, wall1, wall2, corner) {\n var wall1NextVertex = nextVertexFrom($this, corner, wall1);\n var tmp;\n if (wall1NextVertex.Y === corner.point.Y) {\n tmp = new Pair(wall1, wall2);\n } else {\n tmp = new Pair(wall2, wall1);\n }\n return tmp;\n }\n function nextVertexFrom($this, corner, wall1) {\n var points = wall1.surface.surfaceGeometry.points;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.indexOfFirst' call\n var inductionVariable = 0;\n var last = points.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.nextVertexFrom.' call\n if (points[index].equals(corner.point)) {\n tmp$ret$1 = index;\n break $l$block;\n }\n }\n while (inductionVariable <= last);\n tmp$ret$1 = -1;\n }\n var index_0 = tmp$ret$1;\n var nextIndex = (index_0 + 1 | 0) % points.length | 0;\n return points[nextIndex];\n }\n function Wall(surface, normal) {\n this.surface = surface;\n this.normal = normal;\n }\n protoOf(Wall).component2 = function () {\n return this.normal;\n };\n protoOf(Wall).m3n = function (surface, normal) {\n return new Wall(surface, normal);\n };\n protoOf(Wall).copy = function (surface, normal, $super) {\n surface = surface === VOID ? this.surface : surface;\n normal = normal === VOID ? this.normal : normal;\n return this.m3n(surface, normal);\n };\n protoOf(Wall).toString = function () {\n return 'Wall(surface=' + this.surface + ', normal=' + this.normal + ')';\n };\n protoOf(Wall).hashCode = function () {\n var result = this.surface.hashCode();\n result = imul(result, 31) + this.normal.hashCode() | 0;\n return result;\n };\n protoOf(Wall).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Wall))\n return false;\n var tmp0_other_with_cast = other instanceof Wall ? other : THROW_CCE();\n if (!this.surface.equals(tmp0_other_with_cast.surface))\n return false;\n if (!this.normal.equals(tmp0_other_with_cast.normal))\n return false;\n return true;\n };\n function Companion_85() {\n }\n protoOf(Companion_85).generateWallConnectors = function (walls) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(walls.length);\n var inductionVariable = 0;\n var last = walls.length;\n while (inductionVariable < last) {\n var item = walls[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.generateWallConnectors.' call\n var wallConnector = Companion_instance_118.generateSurfaceConnector(item.id, item.surfaceGeometry);\n var tmp$ret$0 = new RoomConnectorPair(wallConnector, item);\n destination.q(tmp$ret$0);\n }\n return copyToArray(destination);\n };\n protoOf(Companion_85).generateEdgeConnectors = function (edges, surfaces) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(edges.length);\n var inductionVariable = 0;\n var last = edges.length;\n while (inductionVariable < last) {\n var item = edges[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.generateEdgeConnectors.' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filterKeys' call\n var result = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = surfaces.q2().t();\n while (tmp0_iterator.u()) {\n var entry = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.generateEdgeConnectors..' call\n var it = entry.t2();\n if (it === item.surfaceId1 ? true : it === item.surfaceId2) {\n result.r2(entry.t2(), entry.u2());\n }\n }\n var this_0 = result.p2();\n var surfacesForThisEdge = copyToArray(this_0);\n var tmp;\n if (includesSurfaceWithNormal(Companion_instance_118, surfacesForThisEdge, Companion_getInstance_4().DOWN)) {\n tmp = RoomConnectorConstants_getInstance().EDGE_WALL_CEILING_OFFERS;\n } else if (includesSurfaceWithNormal(Companion_instance_118, surfacesForThisEdge, Companion_getInstance_4().UP)) {\n tmp = RoomConnectorConstants_getInstance().EDGE_WALL_FLOOR_OFFERS;\n } else {\n tmp = RoomConnectorConstants_getInstance().EDGE_WALL_WALL_OFFERS;\n }\n var offers = tmp;\n var normal = Companion_instance_118.generateMeanNormalFromAdjacentSurfaces(surfacesForThisEdge);\n var tmp$ret$4 = new RoomConnectorPair(Companion_instance_118.generateEdge(item, normal.unaryMinus(), Companion_getInstance_4().UP, offers), item);\n destination.q(tmp$ret$4);\n }\n return copyToArray(destination);\n };\n protoOf(Companion_85).generateFloorConnector = function (floorGeometryData) {\n var tmp0_key = floorGeometryData.id;\n var tmp2_offersArray = RoomConnectorConstants_getInstance().FLOOR_OFFERS;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp3_demandsArray = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp4_tagArray = [];\n var tmp5_vertices = floorGeometryData.surfaceGeometry.points;\n var connector = new SurfaceConnector(tmp0_key, 1, tmp5_vertices, VOID, VOID, true, tmp4_tagArray, tmp2_offersArray, tmp3_demandsArray);\n return new RoomConnectorPair(connector, floorGeometryData);\n };\n protoOf(Companion_85).generateCeilingConnector = function (ceilingGeometryData) {\n var tmp0_key = ceilingGeometryData.id;\n var tmp2_offersArray = RoomConnectorConstants_getInstance().CEILING_OFFERS;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp3_demandsArray = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp4_tagArray = [];\n var tmp5_vertices = ceilingGeometryData.surfaceGeometry.points;\n var connector = new SurfaceConnector(tmp0_key, 1, tmp5_vertices, VOID, VOID, true, tmp4_tagArray, tmp2_offersArray, tmp3_demandsArray);\n return new RoomConnectorPair(connector, ceilingGeometryData);\n };\n protoOf(Companion_85).generateSurfaceConnector = function (id, surfaceGeometry) {\n var tmp1_vertices = surfaceGeometry.points;\n var tmp2_offersArray = RoomConnectorConstants_getInstance().WALL_OFFERS;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp3_demandsArray = [];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp4_tagArray = [];\n return new SurfaceConnector(id, 1, tmp1_vertices, VOID, VOID, true, tmp4_tagArray, tmp2_offersArray, tmp3_demandsArray);\n };\n protoOf(Companion_85).generateEdge = function (edge, forwards, upwards, offers) {\n var edgeRotation = Companion_getInstance_6().fromEulerDegrees(new Degrees(90.0)).times(Companion_getInstance_6().fromLookDirectionUnsafe(forwards, upwards));\n return new EdgeConnector(edge.id, 1, edge.point1, edge.point2, edgeRotation, VOID, VOID, VOID, VOID, offers);\n };\n protoOf(Companion_85).generatePointConnectors = function (points, surfaces) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(points.length);\n var inductionVariable = 0;\n var last = points.length;\n while (inductionVariable < last) {\n var item = points[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.generatePointConnectors.' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filterKeys' call\n var result = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = surfaces.q2().t();\n while (tmp0_iterator.u()) {\n var entry = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.generatePointConnectors..' call\n var it = entry.t2();\n if (contains(item.surfaces, it)) {\n result.r2(entry.t2(), entry.u2());\n }\n }\n var this_0 = result.p2();\n var surfacesForThisPoint = copyToArray(this_0);\n var isCeiling = includesSurfaceWithNormal(Companion_instance_118, surfacesForThisPoint, Companion_getInstance_4().DOWN);\n var tmp;\n if (isCeiling) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [RoomConnectorConstants_getInstance().POINT_WALL_CEILING_OFFER];\n } else if (includesSurfaceWithNormal(Companion_instance_118, surfacesForThisPoint, Companion_getInstance_4().UP)) {\n var offerForCornerAngle = generateOfferStringForFloorCornerAngle(Companion_instance_118, surfacesForThisPoint, item);\n var tmp_0;\n if (!(offerForCornerAngle == null)) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = [RoomConnectorConstants_getInstance().POINT_WALL_FLOOR_OFFER, offerForCornerAngle];\n } else {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = [RoomConnectorConstants_getInstance().POINT_WALL_FLOOR_OFFER];\n }\n tmp = tmp_0;\n } else {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n }\n var offers = tmp;\n var pointNormal = Companion_instance_118.generateMeanNormalFromAdjacentSurfaces(surfacesForThisPoint);\n var tmp$ret$14 = new RoomConnectorPair(Companion_instance_118.generatePoint(item, pointNormal.X0Z.normalize().unaryMinus(), Companion_getInstance_4().UP, offers), item);\n destination.q(tmp$ret$14);\n }\n return copyToArray(destination);\n };\n protoOf(Companion_85).generatePoint = function (point, connectorUp, roomUp, offers) {\n var pointRotation = Companion_getInstance_6().fromLookDirection(connectorUp, roomUp);\n var connectorTransform = new Transform(point.point, pointRotation);\n return new PointConnector(point.id, 1, connectorTransform, VOID, VOID, VOID, VOID, offers);\n };\n protoOf(Companion_85).generateMeanNormalFromAdjacentSurfaces = function (surfaceGeometries) {\n var meanNormal = Companion_getInstance_4().ZERO;\n var inductionVariable = 0;\n var last = surfaceGeometries.length;\n while (inductionVariable < last) {\n var surface = surfaceGeometries[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var points = surface.surfaceGeometry.points;\n meanNormal = meanNormal.plus(PolyhedronUtils_getInstance().surfaceNormal(points));\n }\n return meanNormal.normalize();\n };\n var Companion_instance_118;\n function Companion_getInstance_94() {\n return Companion_instance_118;\n }\n function RoomConnectorUtilities() {\n }\n function validateAndFixNoCollinearPointsInSurface($this, originalSurface) {\n var vertices = originalSurface;\n var previousIndex = vertices.length - 1 | 0;\n // Inline function 'kotlin.collections.mutableListOf' call\n var listOfVerticesToRemove = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = vertices.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (vertices[index].minus(vertices[previousIndex]).cross(vertices[(index + 1 | 0) % vertices.length | 0].minus(vertices[index])).size < 0.001) {\n $this.n3n_1.warn(RoomGeometryUtilities$Companion$validateAndFixNoCollinearPointsInSurface$lambda(index));\n listOfVerticesToRemove.q(index);\n }\n previousIndex = index;\n }\n while (inductionVariable <= last);\n // Inline function 'kotlin.collections.count' call\n if (listOfVerticesToRemove.n() > 0) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_indices(vertices);\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.validateAndFixNoCollinearPointsInSurface.' call\n if (!listOfVerticesToRemove.p(element)) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.validateAndFixNoCollinearPointsInSurface.' call\n var tmp$ret$5 = vertices[item];\n destination_0.q(tmp$ret$5);\n }\n return copyToArray(destination_0);\n }\n return originalSurface;\n }\n function validatePlanarSurface($this, coreRoomSurface) {\n var polygon = coreRoomSurface.surfaceGeometry.points;\n var planeNormal = PolyhedronUtils_getInstance().surfaceNormal(polygon);\n var polygonPlane = new Plane(polygon[0], planeNormal);\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var inductionVariable = 0;\n var last = polygon.length;\n while (inductionVariable < last) {\n var item = polygon[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.validatePlanarSurface.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n if (!polygonPlane.contains(item))\n throw Exception_init_$Create$('Polygon supplied to ' + coreRoomSurface.id + ' is not planar, please ensure that each surface in RoomGeometryFormat is planar. The non-planar vertex was found at index ' + tmp1);\n }\n }\n function convertId($this, oldId) {\n // Inline function 'kotlin.collections.getOrElse' call\n var tmp0_elvis_lhs = $this.connectorKeyMap.b3(oldId);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'com.ikea.core.stl.room.utils.Companion.convertId.' call\n tmp = oldId;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n }\n function convertFromPoint3DToVector(_this__u8e3s4, $this, scale) {\n return new Vector(_this__u8e3s4.x * scale, _this__u8e3s4.y * scale, _this__u8e3s4.z * scale);\n }\n function RoomGeometryUtilities$Companion$interfaceFormatToInternalFormat$lambda() {\n return \"A surface with type 'FLOOR' and a surface with type 'CEILING' is both required\";\n }\n function RoomGeometryUtilities$Companion$validateAndFixNoCollinearPointsInSurface$lambda($index) {\n return function () {\n return 'Vertex supplied to room geometry at index ' + $index + ' is collinear, removing vertex.';\n };\n }\n function Companion_86() {\n Companion_instance_119 = this;\n this.n3n_1 = LoggerState_getInstance().m1m('RoomGeometryUtilities');\n this.connectorKeyMap = mapOf([to('z-', 'back-wall'), to('x-', 'left-wall'), to('x+', 'right-wall'), to('z+', 'front-wall'), to('z-floor', 'back-wall-floor-edge'), to('x-floor', 'left-wall-floor-edge'), to('x+floor', 'right-wall-floor-edge'), to('z+floor', 'front-wall-floor-edge'), to('c-z-x-floor', 'back-left-corner'), to('c-z-x+floor', 'back-right-corner'), to('c-z+x-floor', 'front-left-corner'), to('c-x+z+floor', 'front-right-corner')]);\n }\n protoOf(Companion_86).generateWallMap = function (convertedData) {\n // Inline function 'kotlin.collections.map' call\n var this_0 = convertedData.walls;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.generateWallMap.' call\n destination.q(item);\n }\n var allWallSurfaces = destination;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = [convertedData.floor, convertedData.ceiling];\n var allSurfaces = plus_3(allWallSurfaces, tmp$ret$5);\n // Inline function 'kotlin.collections.associateBy' call\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(allSurfaces, 10)), 16);\n // Inline function 'kotlin.collections.associateByTo' call\n var destination_0 = LinkedHashMap_init_$Create$_0(capacity);\n var tmp0_iterator = allSurfaces.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.generateWallMap.' call\n var tmp$ret$6 = element.id;\n destination_0.r2(tmp$ret$6, element);\n }\n return destination_0;\n };\n protoOf(Companion_86).generateRectangularRoom = function (dimensions) {\n var right = dimensions.X / 2;\n var left = -(dimensions.X / 2);\n var front = dimensions.Z;\n var up = dimensions.Y;\n var backRightCeiling = new Vector(right, up, 0.0);\n var frontRightCeiling = new Vector(right, up, front);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var rightWallVertices = [new Vector(right, 0.0, front), frontRightCeiling, backRightCeiling, new Vector(right, 0.0, 0.0)];\n RoomConnectorConstants_getInstance();\n var rightWall = new CoreRoomSurface('right-wall', new RoomSurfaceGeometryImpl(rightWallVertices));\n var backLeftCeiling = new Vector(left, up, 0.0);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var backWallVertices = [new Vector(left, 0.0, 0.0), new Vector(right, 0.0, 0.0), backRightCeiling, backLeftCeiling];\n RoomConnectorConstants_getInstance();\n var backWall = new CoreRoomSurface('back-wall', new RoomSurfaceGeometryImpl(backWallVertices));\n var frontLeftCeiling = new Vector(left, up, front);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var leftWallVertices = [new Vector(left, 0.0, front), new Vector(left, 0.0, 0.0), backLeftCeiling, frontLeftCeiling];\n RoomConnectorConstants_getInstance();\n var leftWall = new CoreRoomSurface('left-wall', new RoomSurfaceGeometryImpl(leftWallVertices));\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var frontWallVertices = [new Vector(right, 0.0, front), new Vector(left, 0.0, front), frontLeftCeiling, frontRightCeiling];\n RoomConnectorConstants_getInstance();\n var frontWall = new CoreRoomSurface('front-wall', new RoomSurfaceGeometryImpl(frontWallVertices));\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var floorVertices = [new Vector(left, 0.0, 0.0), new Vector(left, 0.0, front), new Vector(right, 0.0, front), new Vector(right, 0.0, 0.0)];\n RoomConnectorConstants_getInstance();\n var floor = new CoreRoomSurface('ground', new RoomSurfaceGeometryImpl(floorVertices));\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var ceilingVertices = [backLeftCeiling, backRightCeiling, frontRightCeiling, frontLeftCeiling];\n RoomConnectorConstants_getInstance();\n var ceiling = new CoreRoomSurface('ceiling', new RoomSurfaceGeometryImpl(ceilingVertices));\n RoomConnectorConstants_getInstance();\n var backEdge = new CoreRoomEdge('back-wall-floor-edge', backWall.id, floor.id, new Vector(left, 0.0, 0.0), new Vector(right, 0.0, 0.0));\n RoomConnectorConstants_getInstance();\n var leftEdge = new CoreRoomEdge('left-wall-floor-edge', leftWall.id, floor.id, new Vector(left, 0.0, front), new Vector(left, 0.0, 0.0));\n RoomConnectorConstants_getInstance();\n var rightEdge = new CoreRoomEdge('right-wall-floor-edge', rightWall.id, floor.id, new Vector(right, 0.0, front), new Vector(right, 0.0, 0.0));\n RoomConnectorConstants_getInstance();\n var frontEdge = new CoreRoomEdge('front-wall-floor-edge', frontWall.id, floor.id, new Vector(left, 0.0, front), new Vector(right, 0.0, front));\n RoomConnectorConstants_getInstance();\n var backCeilingEdge = new CoreRoomEdge('back-wall-ceiling-edge', backWall.id, ceiling.id, backLeftCeiling, backRightCeiling);\n RoomConnectorConstants_getInstance();\n var leftCeilingEdge = new CoreRoomEdge('left-wall-ceiling-edge', leftWall.id, ceiling.id, frontLeftCeiling, backLeftCeiling);\n RoomConnectorConstants_getInstance();\n var rightCeilingEdge = new CoreRoomEdge('right-wall-ceiling-edge', rightWall.id, ceiling.id, frontRightCeiling, backRightCeiling);\n RoomConnectorConstants_getInstance();\n var frontCeilingEdge = new CoreRoomEdge('front-wall-ceiling-edge', frontWall.id, ceiling.id, frontLeftCeiling, frontRightCeiling);\n RoomConnectorConstants_getInstance();\n var tmp = new Vector(left, 0.0, 0.0);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = [backWall.id, leftWall.id, floor.id];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$23 = [backEdge.id, leftEdge.id];\n var backLeftVertex = new CoreRoomVertex('back-left-corner', tmp, tmp_0, tmp$ret$23);\n RoomConnectorConstants_getInstance();\n var tmp_1 = new Vector(right, 0.0, 0.0);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_2 = [backWall.id, rightWall.id, floor.id];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$29 = [backEdge.id, rightEdge.id];\n var backRightVertex = new CoreRoomVertex('back-right-corner', tmp_1, tmp_2, tmp$ret$29);\n RoomConnectorConstants_getInstance();\n var tmp_3 = new Vector(right, 0.0, front);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_4 = [frontWall.id, rightWall.id, floor.id];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$35 = [frontEdge.id, leftEdge.id];\n var frontRightVertex = new CoreRoomVertex('front-right-corner', tmp_3, tmp_4, tmp$ret$35);\n RoomConnectorConstants_getInstance();\n var tmp_5 = new Vector(left, 0.0, front);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_6 = [frontWall.id, leftWall.id, floor.id];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$41 = [frontEdge.id, rightEdge.id];\n var frontLeftVertex = new CoreRoomVertex('front-left-corner', tmp_5, tmp_6, tmp$ret$41);\n RoomConnectorConstants_getInstance();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_7 = [backWall.id, leftWall.id, ceiling.id];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$47 = [backCeilingEdge.id, leftCeilingEdge.id];\n var backLeftCeilingVertex = new CoreRoomVertex('back-left-corner-ceiling', backLeftCeiling, tmp_7, tmp$ret$47);\n RoomConnectorConstants_getInstance();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_8 = [backWall.id, rightWall.id, ceiling.id];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$53 = [backCeilingEdge.id, rightCeilingEdge.id];\n var backRightCeilingVertex = new CoreRoomVertex('back-right-corner-ceiling', backRightCeiling, tmp_8, tmp$ret$53);\n RoomConnectorConstants_getInstance();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_9 = [frontWall.id, rightWall.id, ceiling.id];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$59 = [frontCeilingEdge.id, leftCeilingEdge.id];\n var frontRightCeilingVertex = new CoreRoomVertex('front-right-corner-ceiling', frontRightCeiling, tmp_9, tmp$ret$59);\n RoomConnectorConstants_getInstance();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_10 = [frontWall.id, leftWall.id, ceiling.id];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$65 = [frontCeilingEdge.id, rightCeilingEdge.id];\n var frontLeftCeilingVertex = new CoreRoomVertex('front-left-corner-ceiling', frontLeftCeiling, tmp_10, tmp$ret$65);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_11 = [rightWall, backWall, leftWall, frontWall];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_12 = [backEdge, leftEdge, rightEdge, frontEdge, backCeilingEdge, leftCeilingEdge, rightCeilingEdge, frontCeilingEdge];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_13 = [backLeftVertex, backRightVertex, frontRightVertex, frontLeftVertex, backLeftCeilingVertex, backRightCeilingVertex, frontRightCeilingVertex, frontLeftCeilingVertex];\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$75 = [];\n return new CoreRoomGeometryData(tmp_11, floor, ceiling, tmp_12, tmp_13, tmp$ret$75);\n };\n protoOf(Companion_86).interfaceFormatToInternalFormat = function (roomGeometryData, scale) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = roomGeometryData.surfaces;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat.' call\n if (element.type === 'WALL') {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat.' call\n var tmp = convertId(Companion_getInstance_95(), item.id);\n var tmp_0 = Companion_getInstance_95();\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_1 = item.vertices;\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(this_1.length);\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var item_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat..' call\n var tmp$ret$3 = convertFromPoint3DToVector(item_0, Companion_getInstance_95(), scale);\n destination_1.q(tmp$ret$3);\n }\n var tmp$ret$6 = copyToArray(destination_1);\n var tmp$ret$7 = new CoreRoomSurface(tmp, new RoomSurfaceGeometryImpl(validateAndFixNoCollinearPointsInSurface(tmp_0, tmp$ret$6)));\n destination_0.q(tmp$ret$7);\n }\n var convertedWalls = copyToArray(destination_0);\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_1 = 0;\n var last_1 = convertedWalls.length;\n while (inductionVariable_1 < last_1) {\n var element_0 = convertedWalls[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat.' call\n validatePlanarSurface(Companion_getInstance_95(), element_0);\n }\n var tmp0_safe_receiver = roomGeometryData.obstacles;\n var tmp_1;\n if (tmp0_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_2 = ArrayList_init_$Create$_0(tmp0_safe_receiver.length);\n var inductionVariable_2 = 0;\n var last_2 = tmp0_safe_receiver.length;\n while (inductionVariable_2 < last_2) {\n var item_1 = tmp0_safe_receiver[inductionVariable_2];\n inductionVariable_2 = inductionVariable_2 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat.' call\n var inputRotation = item_1.boundingBox.transform.rotation;\n var inputPosition = item_1.boundingBox.transform.position;\n var rotation = QuaternionFromDouble(inputRotation.w, inputRotation.x, inputRotation.y, inputRotation.z);\n var localPosition = convertFromPoint3DToVector(inputPosition, Companion_getInstance_95(), scale);\n var tmp$ret$11 = new CoreRoomObstacle(item_1.id, item_1.type, new CoreRoomBoundingBox(convertFromPoint3DToVector(item_1.boundingBox.size, Companion_getInstance_95(), scale), new Transform(localPosition, rotation)));\n destination_2.q(tmp$ret$11);\n }\n tmp_1 = destination_2;\n }\n var tmp1_safe_receiver = tmp_1;\n var tmp_2;\n if (tmp1_safe_receiver == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_2 = copyToArray(tmp1_safe_receiver);\n }\n var tmp2_elvis_lhs = tmp_2;\n var tmp_3;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_3 = [];\n } else {\n tmp_3 = tmp2_elvis_lhs;\n }\n var obstacles = tmp_3;\n // Inline function 'kotlin.collections.find' call\n var this_2 = roomGeometryData.surfaces;\n var tmp$ret$17;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_3 = 0;\n var last_3 = this_2.length;\n while (inductionVariable_3 < last_3) {\n var element_1 = this_2[inductionVariable_3];\n inductionVariable_3 = inductionVariable_3 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat.' call\n if (element_1.type === 'FLOOR') {\n tmp$ret$17 = element_1;\n break $l$block;\n }\n }\n tmp$ret$17 = null;\n }\n var floor = tmp$ret$17;\n // Inline function 'kotlin.collections.find' call\n var this_3 = roomGeometryData.surfaces;\n var tmp$ret$20;\n $l$block_0: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_4 = 0;\n var last_4 = this_3.length;\n while (inductionVariable_4 < last_4) {\n var element_2 = this_3[inductionVariable_4];\n inductionVariable_4 = inductionVariable_4 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat.' call\n if (element_2.type === 'CEILING') {\n tmp$ret$20 = element_2;\n break $l$block_0;\n }\n }\n tmp$ret$20 = null;\n }\n var ceiling = tmp$ret$20;\n var tmp_4;\n if (!(floor == null) ? !(ceiling == null) : false) {\n var tmp_5 = convertId(this, floor.id);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_4 = floor.vertices;\n // Inline function 'kotlin.collections.mapTo' call\n var destination_3 = ArrayList_init_$Create$_0(this_4.length);\n var inductionVariable_5 = 0;\n var last_5 = this_4.length;\n while (inductionVariable_5 < last_5) {\n var item_2 = this_4[inductionVariable_5];\n inductionVariable_5 = inductionVariable_5 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat.' call\n var tmp$ret$22 = convertFromPoint3DToVector(item_2, Companion_getInstance_95(), scale);\n destination_3.q(tmp$ret$22);\n }\n var tmp$ret$25 = copyToArray(destination_3);\n var convertedFloor = new CoreRoomSurface(tmp_5, new RoomSurfaceGeometryImpl(validateAndFixNoCollinearPointsInSurface(this, tmp$ret$25)));\n validatePlanarSurface(this, convertedFloor);\n var tmp_6 = convertId(this, ceiling.id);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_5 = ceiling.vertices;\n // Inline function 'kotlin.collections.mapTo' call\n var destination_4 = ArrayList_init_$Create$_0(this_5.length);\n var inductionVariable_6 = 0;\n var last_6 = this_5.length;\n while (inductionVariable_6 < last_6) {\n var item_3 = this_5[inductionVariable_6];\n inductionVariable_6 = inductionVariable_6 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat.' call\n var tmp$ret$26 = convertFromPoint3DToVector(item_3, Companion_getInstance_95(), scale);\n destination_4.q(tmp$ret$26);\n }\n var tmp$ret$29 = copyToArray(destination_4);\n var convertedCeiling = new CoreRoomSurface(tmp_6, new RoomSurfaceGeometryImpl(validateAndFixNoCollinearPointsInSurface(this, tmp$ret$29)));\n validatePlanarSurface(this, convertedCeiling);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_6 = roomGeometryData.edges;\n // Inline function 'kotlin.collections.mapTo' call\n var destination_5 = ArrayList_init_$Create$_0(this_6.length);\n var inductionVariable_7 = 0;\n var last_7 = this_6.length;\n while (inductionVariable_7 < last_7) {\n var item_4 = this_6[inductionVariable_7];\n inductionVariable_7 = inductionVariable_7 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat.' call\n var tmp$ret$30 = new CoreRoomEdge(convertId(Companion_getInstance_95(), item_4.id), convertId(Companion_getInstance_95(), item_4.surface1), convertId(Companion_getInstance_95(), item_4.surface2), convertFromPoint3DToVector(item_4.vertex1, Companion_getInstance_95(), scale), convertFromPoint3DToVector(item_4.vertex2, Companion_getInstance_95(), scale));\n destination_5.q(tmp$ret$30);\n }\n var convertedEdges = copyToArray(destination_5);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_7 = roomGeometryData.corners;\n // Inline function 'kotlin.collections.mapTo' call\n var destination_6 = ArrayList_init_$Create$_0(this_7.length);\n var inductionVariable_8 = 0;\n var last_8 = this_7.length;\n while (inductionVariable_8 < last_8) {\n var item_5 = this_7[inductionVariable_8];\n inductionVariable_8 = inductionVariable_8 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat.' call\n var tmp_7 = convertId(Companion_getInstance_95(), item_5.id);\n var tmp_8 = convertFromPoint3DToVector(item_5.position, Companion_getInstance_95(), scale);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_8 = item_5.surfaces;\n // Inline function 'kotlin.collections.mapTo' call\n var destination_7 = ArrayList_init_$Create$_0(this_8.length);\n var inductionVariable_9 = 0;\n var last_9 = this_8.length;\n while (inductionVariable_9 < last_9) {\n var item_6 = this_8[inductionVariable_9];\n inductionVariable_9 = inductionVariable_9 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat..' call\n var tmp$ret$34 = convertId(Companion_getInstance_95(), item_6);\n destination_7.q(tmp$ret$34);\n }\n var tmp_9 = copyToArray(destination_7);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_9 = item_5.edges;\n // Inline function 'kotlin.collections.mapTo' call\n var destination_8 = ArrayList_init_$Create$_0(this_9.length);\n var inductionVariable_10 = 0;\n var last_10 = this_9.length;\n while (inductionVariable_10 < last_10) {\n var item_7 = this_9[inductionVariable_10];\n inductionVariable_10 = inductionVariable_10 + 1 | 0;\n // Inline function 'com.ikea.core.stl.room.utils.Companion.interfaceFormatToInternalFormat..' call\n var tmp$ret$38 = convertId(Companion_getInstance_95(), item_7);\n destination_8.q(tmp$ret$38);\n }\n var tmp$ret$41 = copyToArray(destination_8);\n var tmp$ret$42 = new CoreRoomVertex(tmp_7, tmp_8, tmp_9, tmp$ret$41);\n destination_6.q(tmp$ret$42);\n }\n var convertedVertices = copyToArray(destination_6);\n tmp_4 = new CoreRoomGeometryData(convertedWalls, convertedFloor, convertedCeiling, convertedEdges, convertedVertices, obstacles);\n } else {\n this.n3n_1.warn(RoomGeometryUtilities$Companion$interfaceFormatToInternalFormat$lambda);\n tmp_4 = null;\n }\n return tmp_4;\n };\n protoOf(Companion_86).o3n = function () {\n return this.connectorKeyMap;\n };\n var Companion_instance_119;\n function Companion_getInstance_95() {\n if (Companion_instance_119 == null)\n new Companion_86();\n return Companion_instance_119;\n }\n function RoomGeometryUtilities() {\n Companion_getInstance_95();\n }\n function StandardSelectionService(entityManager) {\n this.entityManager = entityManager;\n this.p3n_1 = this.entityManager.createEntity();\n this.entityManager.addComponent(this.p3n_1, new DisplayNameComponent('Config-StandardSelectionService'));\n }\n protoOf(StandardSelectionService).p1i = function () {\n return this.entityManager;\n };\n protoOf(StandardSelectionService).isMultiSelect = function () {\n return this.p3n_1.hasComponent(MultiSelectionEnabledComponent_instance.id);\n };\n protoOf(StandardSelectionService).setMultiSelect = function (multiSelect) {\n if (multiSelect) {\n this.entityManager.addComponent(this.p3n_1, MultiSelectionEnabledComponent_instance);\n } else {\n this.entityManager.removeComponent(this.p3n_1, MultiSelectionEnabledComponent_instance.id);\n }\n };\n protoOf(StandardSelectionService).select = function (entity) {\n var tmp0_safe_receiver = get_selectableRoot(entity);\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver.addComponent(SelectedComponent_instance);\n };\n protoOf(StandardSelectionService).toggle = function (entity) {\n var tmp0_elvis_lhs = get_selectableRoot(entity);\n var e = tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs;\n if (e.hasComponent(SelectedComponent_instance.id)) {\n this.unselect(e);\n } else {\n this.select(e);\n }\n };\n protoOf(StandardSelectionService).unselect = function (entity) {\n this.entityManager.removeComponent(entity, SelectedComponent_instance.id);\n };\n protoOf(StandardSelectionService).unselectAll = function () {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.entityManager.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n this.unselect(element);\n }\n };\n function StandardSelectionSystem_init_$Init$(coreServices, $this) {\n StandardSelectionSystem.call($this, coreServices.entityManager, coreServices.sceneManager);\n return $this;\n }\n function StandardSelectionSystemFromCoreServices(coreServices) {\n return StandardSelectionSystem_init_$Init$(coreServices, objectCreate(protoOf(StandardSelectionSystem)));\n }\n function onClickNothing($this) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = $this.y3n_1.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.selection.StandardSelectionSystem.onClickNothing.' call\n $this.y3n_1.removeComponent(element, SelectedComponent_instance.id);\n }\n }\n function onEntityClicked($this, entity) {\n var tmp0_elvis_lhs = get_selectableRoot(entity);\n var selectableRootEntity = tmp0_elvis_lhs == null ? entity : tmp0_elvis_lhs;\n if (selectableRootEntity.hasComponent(SelectedComponent_instance.id)) {\n $this.y3n_1.removeComponent(selectableRootEntity, SelectedComponent_instance.id);\n } else {\n if (selectableRootEntity.hasComponent(1)) {\n $this.y3n_1.addComponent(selectableRootEntity, SelectedComponent_instance);\n }\n }\n }\n function onEntityReplaced($this, oldEntity, entity) {\n var tmp;\n if (oldEntity.hasComponent(SelectedComponent_instance.id)) {\n tmp = entity.hasComponent(1);\n } else {\n tmp = false;\n }\n if (tmp) {\n oldEntity.removeComponent(SelectedComponent_instance.id);\n entity.addComponent(SelectedComponent_instance);\n }\n }\n function onEntityDeleted($this, entity) {\n entity.removeComponent(SelectedComponent_instance.id);\n }\n function onEntitySelected($this, entity) {\n if (!$this.a3o_1) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = $this.y3n_1.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.selection.StandardSelectionSystem.onEntitySelected.' call\n if (!entity.equals(element)) {\n $this.y3n_1.removeComponent(element, SelectedComponent_instance.id);\n }\n }\n }\n }\n function Companion_87() {\n this.ID = 'StandardSelectionSystem';\n }\n protoOf(Companion_87).u1n = function () {\n return this.ID;\n };\n var Companion_instance_120;\n function Companion_getInstance_96() {\n return Companion_instance_120;\n }\n function StandardSelectionSystem$onEntityDeleted$ref($boundThis) {\n var l = function (p0) {\n onEntityDeleted($boundThis, p0);\n return Unit_instance;\n };\n l.callableName = 'onEntityDeleted';\n return l;\n }\n function StandardSelectionSystem(entityManager, sceneManager) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [0];\n SystemBase4.call(this, 'StandardSelectionSystem', 131, 86, 0, 56, tmp$ret$2, null, null);\n this.y3n_1 = entityManager;\n this.z3n_1 = sceneManager;\n this.a3o_1 = false;\n this.y3n_1.subscribeEntityRemoved(StandardSelectionSystem$onEntityDeleted$ref(this));\n var tmp = this;\n var tmp$ret$4;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = this.y3n_1.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.selection.StandardSelectionSystem.' call\n if (element.hasComponent(56)) {\n tmp$ret$4 = true;\n break $l$block;\n }\n }\n tmp$ret$4 = false;\n }\n tmp.a3o_1 = tmp$ret$4;\n }\n protoOf(StandardSelectionSystem).onAddComponent = function (entity, newComponent) {\n onEntityReplaced(this, newComponent.oldEntity, entity);\n };\n protoOf(StandardSelectionSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(StandardSelectionSystem).onRemoveComponent = function (entity, oldComponent) {\n };\n protoOf(StandardSelectionSystem).onAddComponent2 = function (entity, newComponent) {\n if (this.z3n_1.scene.equals(entity)) {\n onClickNothing(this);\n } else {\n onEntityClicked(this, entity);\n }\n };\n protoOf(StandardSelectionSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n };\n protoOf(StandardSelectionSystem).onRemoveComponent2 = function (entity, oldComponent) {\n };\n protoOf(StandardSelectionSystem).onAddComponent3 = function (entity, newComponent) {\n onEntitySelected(this, entity);\n };\n protoOf(StandardSelectionSystem).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n };\n protoOf(StandardSelectionSystem).onRemoveComponent3 = function (entity, oldComponent) {\n };\n protoOf(StandardSelectionSystem).onAddComponent4 = function (entity, newComponent) {\n this.a3o_1 = true;\n };\n protoOf(StandardSelectionSystem).onUpdateComponent4 = function (entity, oldComponent, newComponent) {\n };\n protoOf(StandardSelectionSystem).onRemoveComponent4 = function (entity, oldComponent) {\n this.a3o_1 = false;\n };\n function StlSystemIds() {\n this.ALIGNMENT_CONNECTION_CREATION_SYSTEM = 'AlignmentConnectionCreationSystem';\n this.ALIGNMENT_LINES_SYSTEM_ID = 'AlignmentLinesSystem';\n this.DRAG_SYSTEM_ID = 'DragSystem';\n this.HANDLE_ROTATION_SYSTEM_ID = 'HandleRotationSystem';\n this.FUNCTIONAL_MARGIN_SYSTEM_ID = 'FunctionalMarginSystem';\n this.OUTLINE_SELECTED_SYSTEM_ID = 'OutlineSelectedSystem';\n this.PROPPING_SYSTEM_ID = 'ProppingSystem';\n this.ROOM_SYSTEM_ID = 'RoomSystem';\n this.ROOM_DIMENSION_TO_GEOMETRY_SYSTEM_ID = 'RoomDimensionToGeometrySystem';\n this.LEGACY_CANVAS_TO_3D_DRAG_CONVERTER_SYSTEM = 'LegacyCanvasTo3DDragConverterSystem';\n this.CANVAS_TO_3D_DRAG_CONVERTER_SYSTEM = 'CanvasTo3DDragConverterSystem';\n this.AUTO_ADAPT_PRODUCT_SPECIFICATION_SYSTEM_ID = 'AutoAdaptProductSpecificationSystem';\n this.STANDARD_SELECTION_SYSTEM_SYSTEM_ID = 'StandardSelectionSystem';\n this.AUTO_ADAPT_DISPOSE_FAILED_CHILDREN_SYSTEM_ID = 'AutoAdaptDisposeFailedChildrenSystem';\n }\n protoOf(StlSystemIds).b3o = function () {\n return this.ALIGNMENT_CONNECTION_CREATION_SYSTEM;\n };\n protoOf(StlSystemIds).c3o = function () {\n return this.ALIGNMENT_LINES_SYSTEM_ID;\n };\n protoOf(StlSystemIds).d3o = function () {\n return this.DRAG_SYSTEM_ID;\n };\n protoOf(StlSystemIds).e3o = function () {\n return this.HANDLE_ROTATION_SYSTEM_ID;\n };\n protoOf(StlSystemIds).f3o = function () {\n return this.FUNCTIONAL_MARGIN_SYSTEM_ID;\n };\n protoOf(StlSystemIds).g3o = function () {\n return this.OUTLINE_SELECTED_SYSTEM_ID;\n };\n protoOf(StlSystemIds).h3o = function () {\n return this.PROPPING_SYSTEM_ID;\n };\n protoOf(StlSystemIds).i3o = function () {\n return this.ROOM_SYSTEM_ID;\n };\n protoOf(StlSystemIds).j3o = function () {\n return this.ROOM_DIMENSION_TO_GEOMETRY_SYSTEM_ID;\n };\n protoOf(StlSystemIds).k3o = function () {\n return this.LEGACY_CANVAS_TO_3D_DRAG_CONVERTER_SYSTEM;\n };\n protoOf(StlSystemIds).l3o = function () {\n return this.CANVAS_TO_3D_DRAG_CONVERTER_SYSTEM;\n };\n protoOf(StlSystemIds).m3o = function () {\n return this.AUTO_ADAPT_PRODUCT_SPECIFICATION_SYSTEM_ID;\n };\n protoOf(StlSystemIds).n3o = function () {\n return this.STANDARD_SELECTION_SYSTEM_SYSTEM_ID;\n };\n protoOf(StlSystemIds).o3o = function () {\n return this.AUTO_ADAPT_DISPOSE_FAILED_CHILDREN_SYSTEM_ID;\n };\n var StlSystemIds_instance;\n function StlSystemIds_getInstance() {\n return StlSystemIds_instance;\n }\n function Companion_88() {\n Companion_instance_121 = this;\n this.accumulatedDelta = Companion_getInstance_4().ZERO;\n this.originalPosition = Companion_getInstance_4().ZERO;\n }\n protoOf(Companion_88).p3o = function (_set____db54di) {\n this.accumulatedDelta = _set____db54di;\n };\n protoOf(Companion_88).q3o = function () {\n return this.accumulatedDelta;\n };\n protoOf(Companion_88).r3o = function (_set____db54di) {\n this.originalPosition = _set____db54di;\n };\n protoOf(Companion_88).s3o = function () {\n return this.originalPosition;\n };\n protoOf(Companion_88).t3o = function (_this__u8e3s4, coreServices, delta, steps) {\n return simulateEntireDragInSteps(_this__u8e3s4, coreServices, delta, steps);\n };\n protoOf(Companion_88).simulateEntireDragInSteps = function (_this__u8e3s4, coreServices, delta, steps, $super) {\n steps = steps === VOID ? 100 : steps;\n return this.t3o(_this__u8e3s4, coreServices, delta, steps);\n };\n protoOf(Companion_88).simulateEntireDrag = function (_this__u8e3s4, coreServices, delta) {\n return simulateEntireDrag(_this__u8e3s4, coreServices, delta);\n };\n protoOf(Companion_88).simulateStartDrag = function (_this__u8e3s4, coreServices) {\n return simulateStartDrag(_this__u8e3s4, coreServices);\n };\n protoOf(Companion_88).simulateOngoingDrag = function (_this__u8e3s4, coreServices, delta) {\n return simulateOngoingDrag(_this__u8e3s4, coreServices, delta);\n };\n protoOf(Companion_88).simulateEndDrag = function (_this__u8e3s4, coreServices) {\n return simulateEndDrag(_this__u8e3s4, coreServices);\n };\n var Companion_instance_121;\n function Companion_getInstance_97() {\n if (Companion_instance_121 == null)\n new Companion_88();\n return Companion_instance_121;\n }\n function DragExtensions() {\n Companion_getInstance_97();\n }\n function simulateEntireDragInSteps(_this__u8e3s4, coreServices, totalDelta, steps) {\n steps = steps === VOID ? 100 : steps;\n simulateStartDrag(_this__u8e3s4, coreServices);\n var delta = totalDelta.__divIntForKotlin(steps);\n var inductionVariable = 1;\n if (inductionVariable <= steps)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n simulateOngoingDrag(_this__u8e3s4, coreServices, delta);\n }\n while (!(i === steps));\n simulateEndDrag(_this__u8e3s4, coreServices);\n }\n function simulateEntireDrag(_this__u8e3s4, coreServices, delta) {\n simulateStartDrag(_this__u8e3s4, coreServices);\n simulateOngoingDrag(_this__u8e3s4, coreServices, delta);\n simulateEndDrag(_this__u8e3s4, coreServices);\n }\n function rayFromMiddleOfRoomToDragPoint(point, coreServices) {\n var defaultCamPos = __VectorIntConstructorKotlin(0, 0, 2000);\n var defaultRay = new Ray(defaultCamPos, point.minus(defaultCamPos));\n // Inline function 'kotlin.collections.find' call\n var this_0 = coreServices.sceneManager.entities;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.test.rayFromMiddleOfRoomToDragPoint.' call\n Companion_getInstance_88();\n if (element.hasComponent(70)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return defaultRay;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var room = tmp;\n Companion_getInstance_88();\n var tmp1_elvis_lhs = room.__getComponentForKotlin(70);\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n return defaultRay;\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var roomDimensions = tmp_0;\n var middleOfRoom = new Vector(0.0, roomDimensions.dimensions.height / 2, roomDimensions.dimensions.depth / 2);\n return new Ray(middleOfRoom, point.minus(middleOfRoom));\n }\n function simulateStartDrag(_this__u8e3s4, coreServices, point) {\n point = point === VOID ? null : point;\n var tmp0_elvis_lhs = get_draggableRootEntity(_this__u8e3s4);\n var draggedEntity = tmp0_elvis_lhs == null ? _this__u8e3s4 : tmp0_elvis_lhs;\n var dragPoint = point == null ? get_worldPosition(draggedEntity) : point;\n Companion_getInstance_97().accumulatedDelta = Companion_getInstance_4().ZERO;\n Companion_getInstance_97().originalPosition = dragPoint;\n draggedEntity.addComponent(new WorldSpaceDragEventComponent(dragPoint, rayFromMiddleOfRoomToDragPoint(dragPoint, coreServices)));\n }\n function simulateOngoingDrag(_this__u8e3s4, coreServices, delta) {\n var tmp0_elvis_lhs = get_draggableRootEntity(_this__u8e3s4);\n var draggedEntity = tmp0_elvis_lhs == null ? _this__u8e3s4 : tmp0_elvis_lhs;\n var tmp1_this = Companion_getInstance_97();\n tmp1_this.accumulatedDelta = tmp1_this.accumulatedDelta.plus(delta);\n var point = Companion_getInstance_97().originalPosition.plus(Companion_getInstance_97().accumulatedDelta);\n draggedEntity.addComponent(new WorldSpaceDragEventComponent(point, rayFromMiddleOfRoomToDragPoint(point, coreServices)));\n }\n function simulateEndDrag(_this__u8e3s4, coreServices) {\n var tmp0_elvis_lhs = get_draggableRootEntity(_this__u8e3s4);\n var draggedEntity = tmp0_elvis_lhs == null ? _this__u8e3s4 : tmp0_elvis_lhs;\n Companion_getInstance_97().accumulatedDelta = Companion_getInstance_4().ZERO;\n Companion_getInstance_97().originalPosition = Companion_getInstance_4().ZERO;\n coreServices.entityManager.removeComponent(draggedEntity, 85);\n }\n function ViewerDragState() {\n ViewerDragState_instance = this;\n this.worldCameraPosition = Companion_getInstance_4().ZERO;\n this.accumulatedDelta = Companion_getInstance_4().ZERO;\n this.originalPosition = Companion_getInstance_4().ZERO;\n }\n protoOf(ViewerDragState).u3o = function (_set____db54di) {\n this.worldCameraPosition = _set____db54di;\n };\n protoOf(ViewerDragState).v3o = function () {\n return this.worldCameraPosition;\n };\n protoOf(ViewerDragState).p3o = function (_set____db54di) {\n this.accumulatedDelta = _set____db54di;\n };\n protoOf(ViewerDragState).q3o = function () {\n return this.accumulatedDelta;\n };\n protoOf(ViewerDragState).r3o = function (_set____db54di) {\n this.originalPosition = _set____db54di;\n };\n protoOf(ViewerDragState).s3o = function () {\n return this.originalPosition;\n };\n protoOf(ViewerDragState).reset = function () {\n this.worldCameraPosition = Companion_getInstance_4().ZERO;\n this.accumulatedDelta = Companion_getInstance_4().ZERO;\n this.originalPosition = Companion_getInstance_4().ZERO;\n };\n var ViewerDragState_instance;\n function ViewerDragState_getInstance() {\n if (ViewerDragState_instance == null)\n new ViewerDragState();\n return ViewerDragState_instance;\n }\n function simulateEntireViewerDragInSteps(_this__u8e3s4, coreServices, totalDelta, localGrabPoint, worldCameraPosition, steps) {\n localGrabPoint = localGrabPoint === VOID ? Companion_getInstance_4().ZERO : localGrabPoint;\n worldCameraPosition = worldCameraPosition === VOID ? Companion_getInstance_4().BACK.__timesIntForKotlin(8000).plus(Companion_getInstance_4().UP.times(1000.0)) : worldCameraPosition;\n steps = steps === VOID ? 100 : steps;\n simulateViewerStartDrag(_this__u8e3s4, coreServices, localGrabPoint, worldCameraPosition);\n var delta = totalDelta.__divIntForKotlin(steps);\n var inductionVariable = 1;\n if (inductionVariable <= steps)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n simulateViewerOngoingDrag(_this__u8e3s4, coreServices, delta);\n }\n while (!(i === steps));\n simulateViewerEndDrag(_this__u8e3s4, coreServices);\n }\n function simulateViewerStartDrag(_this__u8e3s4, coreServices, localGrabPoint, worldCameraPosition) {\n localGrabPoint = localGrabPoint === VOID ? Companion_getInstance_4().ZERO : localGrabPoint;\n worldCameraPosition = worldCameraPosition === VOID ? Companion_getInstance_4().BACK.__timesIntForKotlin(3000) : worldCameraPosition;\n var dragPoint = get_worldTransform(_this__u8e3s4).transformPosition(localGrabPoint);\n ViewerDragState_getInstance().accumulatedDelta = Companion_getInstance_4().ZERO;\n ViewerDragState_getInstance().originalPosition = dragPoint;\n ViewerDragState_getInstance().worldCameraPosition = worldCameraPosition;\n var normal = worldCameraPosition.minus(dragPoint).normalize();\n coreServices.entityManager.addComponent(_this__u8e3s4, new ViewerDragEventComponent(dragPoint, normal, Companion_getInstance_4().ZERO, worldCameraPosition));\n }\n function simulateViewerOngoingDrag(_this__u8e3s4, coreServices, delta) {\n var tmp0_this = ViewerDragState_getInstance();\n tmp0_this.accumulatedDelta = tmp0_this.accumulatedDelta.plus(delta);\n var point = ViewerDragState_getInstance().originalPosition.plus(ViewerDragState_getInstance().accumulatedDelta);\n var normal = ViewerDragState_getInstance().worldCameraPosition.minus(point).normalize();\n coreServices.entityManager.addComponent(_this__u8e3s4, new ViewerDragEventComponent(point, normal, Companion_getInstance_4().ZERO, ViewerDragState_getInstance().worldCameraPosition));\n }\n function simulateViewerEndDrag(_this__u8e3s4, coreServices) {\n ViewerDragState_getInstance().reset();\n coreServices.entityManager.removeComponent(_this__u8e3s4, 84);\n }\n function Companion_89() {\n this.ID = 'AllowedNumberOfChildrenOfType';\n }\n protoOf(Companion_89).u1n = function () {\n return this.ID;\n };\n var Companion_instance_122;\n function Companion_getInstance_98() {\n return Companion_instance_122;\n }\n function validate_2($this, entity, snapActionCandidate) {\n var tmp1_elvis_lhs = snapActionCandidate == null ? null : snapActionCandidate.host;\n var tmp2_elvis_lhs = tmp1_elvis_lhs == null ? get_parent(entity) : tmp1_elvis_lhs;\n var tmp;\n if (tmp2_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp2_elvis_lhs;\n }\n var parent = tmp;\n var ancestor = oldestAncestorWithComponent(parent, $this, $this.x3o_1);\n if (ancestor == null) {\n return null;\n }\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_children(ancestor);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.validation.AllowedNumberOfChildrenOfTypeValidation.validate.' call\n if (!element.equals(entity)) {\n destination.q(element);\n }\n }\n var currentChildrenWithComponent = countDescendantsWithComponent($this, destination, $this.y3o_1);\n var tmp3_safe_receiver = entity.__getComponentForKotlin(129);\n var originalEntity = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.originalEntity;\n var interestingChild = countEntitiesInHierarchyWithComponent($this, originalEntity == null ? entity : originalEntity, $this.y3o_1);\n var totalChildrenWithComponent = currentChildrenWithComponent + interestingChild | 0;\n var tmp_0;\n if (totalChildrenWithComponent <= $this.z3o_1) {\n tmp_0 = null;\n } else {\n tmp_0 = new InvalidNumberOfChildren('To many (max: ' + $this.z3o_1 + ') children with component ' + $this.y3o_1 + ' to parent with component ' + $this.x3o_1 + '. Children before: ' + currentChildrenWithComponent + '. Children now: ' + totalChildrenWithComponent, get_productRefOrEmptyString(entity), $this);\n }\n return tmp_0;\n }\n function countEntitiesInHierarchyWithComponent($this, entity, componentId) {\n var sum = 0;\n if (entity.hasComponent(componentId)) {\n sum = sum + 1 | 0;\n }\n var tmp = sum;\n // Inline function 'kotlin.collections.sumOf' call\n var sum_0 = 0;\n var indexedObject = get_descendants(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var tmp_0 = sum_0;\n // Inline function 'com.ikea.core.stl.validation.AllowedNumberOfChildrenOfTypeValidation.countEntitiesInHierarchyWithComponent.' call\n sum_0 = tmp_0 + countEntitiesInHierarchyWithComponent($this, element, componentId) | 0;\n }\n sum = tmp + sum_0 | 0;\n return sum;\n }\n function countDescendantsWithComponent($this, descendants, componentId) {\n // Inline function 'kotlin.collections.sumOf' call\n var sum = 0;\n var tmp0_iterator = descendants.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n var tmp = sum;\n // Inline function 'com.ikea.core.stl.validation.AllowedNumberOfChildrenOfTypeValidation.countDescendantsWithComponent.' call\n sum = tmp + countEntitiesInHierarchyWithComponent($this, element, componentId) | 0;\n }\n return sum;\n }\n function oldestAncestorWithComponent(_this__u8e3s4, $this, componentId) {\n var tmp0_safe_receiver = get_parent(_this__u8e3s4);\n var ancestorWithComponent = tmp0_safe_receiver == null ? null : oldestAncestorWithComponent(tmp0_safe_receiver, $this, componentId);\n if (!(ancestorWithComponent == null)) {\n return ancestorWithComponent;\n }\n if (_this__u8e3s4.hasComponent(componentId)) {\n return _this__u8e3s4;\n }\n return null;\n }\n function AllowedNumberOfChildrenOfTypeValidation(hostComponentId, childComponentId, allowedChildrenCnt) {\n ValidationImpl.call(this);\n this.x3o_1 = hostComponentId;\n this.y3o_1 = childComponentId;\n this.z3o_1 = allowedChildrenCnt;\n this.a3p_1 = 'AllowedNumberOfChildrenOfType';\n }\n protoOf(AllowedNumberOfChildrenOfTypeValidation).s1k = function () {\n return this.a3p_1;\n };\n protoOf(AllowedNumberOfChildrenOfTypeValidation).validateCurrentState = function (entity) {\n return validate_2(this, entity, null);\n };\n protoOf(AllowedNumberOfChildrenOfTypeValidation).validateSnap = function (snapActionCandidate) {\n return validate_2(this, snapActionCandidate.guestRoot, snapActionCandidate);\n };\n function Companion_90() {\n this.ID = 'DisallowSeparateRequiredHosts';\n }\n protoOf(Companion_90).u1n = function () {\n return this.ID;\n };\n var Companion_instance_123;\n function Companion_getInstance_99() {\n return Companion_instance_123;\n }\n function validate_3($this, entity, snapActionCandidate) {\n if (!entity.hasComponent($this.c3p_1))\n return null;\n var tmp1_elvis_lhs = snapActionCandidate == null ? null : snapActionCandidate.guestRoot;\n var tmp2_elvis_lhs = tmp1_elvis_lhs == null ? get_snapRoot(entity) : tmp1_elvis_lhs;\n var guestRoot = tmp2_elvis_lhs == null ? entity : tmp2_elvis_lhs;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = ConnectionUtils_instance.calculateAllConnectionsToHierarchy(guestRoot, $this.d3p_1.root);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.validation.DisallowSeparateRequiredHostsValidation.validate.' call\n if (element.guestConnector.required) {\n destination.q(element);\n }\n }\n var requiredConnections = destination;\n var tmp3_safe_receiver = firstOrNull_1(requiredConnections);\n var firstRequiredHostRoot = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.hostConnectionRoot;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = requiredConnections.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.validation.DisallowSeparateRequiredHostsValidation.validate.' call\n if (!element_0.hostConnectionRoot.equals(firstRequiredHostRoot)) {\n var tmp = Companion_instance_0;\n return tmp.fail('' + DisallowSeparateRequiredHostsValidation$_init_$ref_9l13xe() + ' failed for ' + entity + ' as it tried to snap to more than one different host with required connectors', get_productRefOrEmptyString(entity), $this);\n }\n }\n return null;\n }\n function DisallowSeparateRequiredHostsValidation$_init_$ref_9l13xe() {\n var l = function (p0, p1) {\n return new DisallowSeparateRequiredHostsValidation(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function DisallowSeparateRequiredHostsValidation(component, sceneManager) {\n ValidationImpl.call(this);\n this.c3p_1 = component;\n this.d3p_1 = sceneManager;\n this.e3p_1 = 'DisallowSeparateRequiredHosts';\n }\n protoOf(DisallowSeparateRequiredHostsValidation).s1k = function () {\n return this.e3p_1;\n };\n protoOf(DisallowSeparateRequiredHostsValidation).validateCurrentState = function (entity) {\n return validate_3(this, entity, null);\n };\n protoOf(DisallowSeparateRequiredHostsValidation).validateSnap = function (snapActionCandidate) {\n return validate_3(this, snapActionCandidate.guestRoot, snapActionCandidate);\n };\n function Companion_91() {\n this.ID = 'InvalidNumberOfChildren';\n }\n protoOf(Companion_91).u1n = function () {\n return this.ID;\n };\n var Companion_instance_124;\n function Companion_getInstance_100() {\n return Companion_instance_124;\n }\n function InvalidNumberOfChildren(message, productRef, rule) {\n ValidationResult.call(this, ValidationResultType_FAIL_getInstance(), productRef, rule);\n this.f3p_1 = message;\n }\n protoOf(InvalidNumberOfChildren).s1k = function () {\n return 'InvalidNumberOfChildren';\n };\n protoOf(InvalidNumberOfChildren).toString = function () {\n return this.id + ': ' + this.f3p_1;\n };\n function Companion_92() {\n this.ID = 'PlacementZone';\n }\n protoOf(Companion_92).u1n = function () {\n return this.ID;\n };\n var Companion_instance_125;\n function Companion_getInstance_101() {\n return Companion_instance_125;\n }\n function validate_4($this, entity, snapActionCandidate) {\n var tmp1_safe_receiver = snapActionCandidate == null ? null : snapActionCandidate.endTransform;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.position;\n var tmp6_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.Y;\n var tmp;\n if (tmp6_elvis_lhs == null) {\n var tmp3_safe_receiver = entity.__getComponentForKotlin(10);\n var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.transform;\n var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.position;\n tmp = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.Y;\n } else {\n tmp = tmp6_elvis_lhs;\n }\n var tmp7_elvis_lhs = tmp;\n var tmp_0;\n if (tmp7_elvis_lhs == null) {\n return null;\n } else {\n tmp_0 = tmp7_elvis_lhs;\n }\n var worldY = tmp_0;\n var tmp8_safe_receiver = entity.__getComponentForKotlin(58);\n if (tmp8_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_1;\n if (tmp8_safe_receiver.minY > worldY ? true : tmp8_safe_receiver.maxY < worldY) {\n return new PlacementZoneWarning(get_productRefOrEmptyString(entity), $this);\n }\n }\n return null;\n }\n function PlacementZoneValidation() {\n ValidationImpl.call(this);\n this.h3p_1 = 'PlacementZone';\n }\n protoOf(PlacementZoneValidation).s1k = function () {\n return this.h3p_1;\n };\n protoOf(PlacementZoneValidation).validateCurrentState = function (entity) {\n return validate_4(this, entity, null);\n };\n protoOf(PlacementZoneValidation).validateSnap = function (snapActionCandidate) {\n return validate_4(this, snapActionCandidate.guestRoot, snapActionCandidate);\n };\n function PlacementZoneWarning(ref, placementZoneRule) {\n ValidationResult.call(this, ValidationResultType_WARNING_getInstance(), ref, placementZoneRule);\n this.ref = ref;\n this.placementZoneRule = placementZoneRule;\n }\n protoOf(PlacementZoneWarning).w2m = function () {\n return this.ref;\n };\n protoOf(PlacementZoneWarning).i3p = function () {\n return this.placementZoneRule;\n };\n protoOf(PlacementZoneWarning).s1k = function () {\n return 'PlacementZoneWarning';\n };\n protoOf(PlacementZoneWarning).toString = function () {\n return 'The product ' + this.ref + ' is not placed within its Placement Zone';\n };\n protoOf(PlacementZoneWarning).af = function () {\n return this.ref;\n };\n protoOf(PlacementZoneWarning).bf = function () {\n return this.placementZoneRule;\n };\n protoOf(PlacementZoneWarning).j3p = function (ref, placementZoneRule) {\n return new PlacementZoneWarning(ref, placementZoneRule);\n };\n protoOf(PlacementZoneWarning).copy = function (ref, placementZoneRule, $super) {\n ref = ref === VOID ? this.ref : ref;\n placementZoneRule = placementZoneRule === VOID ? this.placementZoneRule : placementZoneRule;\n return this.j3p(ref, placementZoneRule);\n };\n protoOf(PlacementZoneWarning).hashCode = function () {\n var result = getStringHashCode(this.ref);\n result = imul(result, 31) + hashCode(this.placementZoneRule) | 0;\n return result;\n };\n protoOf(PlacementZoneWarning).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PlacementZoneWarning))\n return false;\n var tmp0_other_with_cast = other instanceof PlacementZoneWarning ? other : THROW_CCE();\n if (!(this.ref === tmp0_other_with_cast.ref))\n return false;\n if (!equals(this.placementZoneRule, tmp0_other_with_cast.placementZoneRule))\n return false;\n return true;\n };\n function Companion_93() {\n this.ID = 'RequiredConnectorsSatisfied';\n }\n protoOf(Companion_93).u1n = function () {\n return this.ID;\n };\n var Companion_instance_126;\n function Companion_getInstance_102() {\n return Companion_instance_126;\n }\n function validate_5($this, entity, snapActionCandidate) {\n if (!hasRequiredConnectors($this, entity)) {\n return null;\n }\n var root = $this.findRoot(snapActionCandidate, entity);\n var hostEntities = filterInHierarchy(root, RequiredConnectorsSatisfiedValidation$validate$lambda);\n var hostCandidate = snapActionCandidate == null ? null : snapActionCandidate.host;\n if (hostCandidate == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n if (!contains(hostEntities, hostCandidate)) {\n // Inline function 'kotlin.collections.plus' call\n var this_0 = hostEntities;\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [snapActionCandidate.host];\n hostEntities = this_0.concat(tmp$ret$3);\n tmp = Unit_instance;\n }\n }\n var failedConnectors = ConnectorUtils_instance.findUnfulfilledRequiredConnectors(hostEntities, entity);\n var tmp_0;\n // Inline function 'kotlin.collections.isEmpty' call\n if (failedConnectors.length === 0) {\n tmp_0 = null;\n } else {\n tmp_0 = new RequiredConnectorsValidationResult(failedConnectors, entity, $this);\n }\n return tmp_0;\n }\n function hasRequiredConnectors($this, entity) {\n var tmp$ret$2;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = hierarchyExceptSubTreesWithComponentArray(entity, 47);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.validation.RequiredConnectorsSatisfiedValidation.hasRequiredConnectors.' call\n var tmp0_safe_receiver = get_connectorsComponent(element);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.requiredConnectors;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.isNotEmpty' call\n tmp = !tmp1_safe_receiver.b1();\n }\n if (tmp === true) {\n tmp$ret$2 = true;\n break $l$block;\n }\n }\n tmp$ret$2 = false;\n }\n return tmp$ret$2;\n }\n function RequiredConnectorsSatisfiedValidation$validate$lambda(it) {\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.orEmpty' call\n var tmp0_safe_receiver = get_connectorsComponent(it);\n var tmp0_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostConnectors;\n return !(tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs).b1();\n }\n function RequiredConnectorsSatisfiedValidation() {\n ValidationImpl.call(this);\n this.l3p_1 = 'RequiredConnectorsSatisfied';\n }\n protoOf(RequiredConnectorsSatisfiedValidation).s1k = function () {\n return this.l3p_1;\n };\n protoOf(RequiredConnectorsSatisfiedValidation).validateCurrentState = function (entity) {\n return validate_5(this, entity, null);\n };\n protoOf(RequiredConnectorsSatisfiedValidation).validateSnap = function (snapActionCandidate) {\n return validate_5(this, snapActionCandidate.guestRoot, snapActionCandidate);\n };\n function Companion_94() {\n this.ID = 'RequiredConnectorsValidationResult';\n }\n protoOf(Companion_94).u1n = function () {\n return this.ID;\n };\n var Companion_instance_127;\n function Companion_getInstance_103() {\n return Companion_instance_127;\n }\n function RequiredConnectorsValidationResult$toString$lambda(connector) {\n return toString(connector);\n }\n function RequiredConnectorsValidationResult(unfulfilledConnectors, entity, rule) {\n ValidationResult.call(this, ValidationResultType_FAIL_getInstance(), get_productRef(entity), rule);\n this.unfulfilledConnectors = unfulfilledConnectors;\n this.entity = entity;\n }\n protoOf(RequiredConnectorsValidationResult).m3p = function () {\n return this.unfulfilledConnectors;\n };\n protoOf(RequiredConnectorsValidationResult).r23 = function () {\n return this.entity;\n };\n protoOf(RequiredConnectorsValidationResult).s1k = function () {\n return 'RequiredConnectorsValidationResult';\n };\n protoOf(RequiredConnectorsValidationResult).toString = function () {\n var tmp = get_productRefOrEmptyString(this.entity);\n var tmp_0 = get_worldTransform(this.entity);\n return 'Product ' + tmp + ' did not find required connectors needed to support it at ' + tmp_0 + '. Non satisfied connectors: [' + joinToString(this.unfulfilledConnectors, VOID, VOID, VOID, VOID, VOID, RequiredConnectorsValidationResult$toString$lambda) + ']';\n };\n function ValidationResultIds() {\n this.InvalidNumberOfChildrenId = 'InvalidNumberOfChildren';\n this.CollisionValidationResultId = 'CollisionValidationResult';\n this.FunctionalMarginWarningId = 'FunctionalMarginWarning intersects';\n this.RequiredConnectorsValidationResultId = 'RequiredConnectorsValidationResult';\n this.NoValidConnectorAvailableValidationResultId = 'NoValidConnectorAvailableValidationResult';\n this.UnknownErrorValidationResultId = 'UnknownErrorValidationResult';\n this.InvalidDoorPairsResultId = 'InvalidDoorPairsResult';\n }\n protoOf(ValidationResultIds).n3p = function () {\n return this.InvalidNumberOfChildrenId;\n };\n protoOf(ValidationResultIds).o3p = function () {\n return this.CollisionValidationResultId;\n };\n protoOf(ValidationResultIds).p3p = function () {\n return this.FunctionalMarginWarningId;\n };\n protoOf(ValidationResultIds).q3p = function () {\n return this.RequiredConnectorsValidationResultId;\n };\n protoOf(ValidationResultIds).r3p = function () {\n return this.NoValidConnectorAvailableValidationResultId;\n };\n protoOf(ValidationResultIds).s3p = function () {\n return this.UnknownErrorValidationResultId;\n };\n protoOf(ValidationResultIds).t3p = function () {\n return this.InvalidDoorPairsResultId;\n };\n protoOf(ValidationResultIds).isCollisionValidationResult = function (validationResult) {\n return validationResult.id === 'CollisionValidationResult';\n };\n protoOf(ValidationResultIds).isInvalidNumberOfChildrenValidationResult = function (validationResult) {\n return validationResult.id === 'InvalidNumberOfChildren';\n };\n protoOf(ValidationResultIds).isChildConnectionValidationResult = function (validationResult) {\n var tmp0_safe_receiver = validationResult.failedRule;\n var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.id;\n return tmp === 'ChildConnection';\n };\n protoOf(ValidationResultIds).isFunctionalMarginWarningValidationResult = function (validationResult) {\n return validationResult.id === 'FunctionalMarginWarning intersects';\n };\n protoOf(ValidationResultIds).isRequiredConnectorsValidationResult = function (validationResult) {\n return validationResult.id === 'RequiredConnectorsValidationResult';\n };\n protoOf(ValidationResultIds).isNoValidConnectorAvailableValidationResult = function (validationResult) {\n return validationResult.id === 'NoValidConnectorAvailableValidationResult';\n };\n protoOf(ValidationResultIds).isUnknownErrorValidationResult = function (validationResult) {\n return validationResult.id === 'UnknownErrorValidationResult';\n };\n protoOf(ValidationResultIds).isInvalidDoorPairsResult = function (validationResult) {\n return validationResult.id === 'InvalidDoorPairsResult';\n };\n var ValidationResultIds_instance;\n function ValidationResultIds_getInstance() {\n return ValidationResultIds_instance;\n }\n function ValidationRuleIds() {\n this.CollisionValidationRuleId = 'Collision';\n this.ChildConnectionValidationId = 'ChildConnection';\n this.ManualGroupConnectorValidationId = 'ManualGroupConnectorValidation';\n this.RequiredConnectorsSatisfiedValidationId = 'RequiredConnectorsSatisfied';\n this.AllowedDoorPairsValidationId = 'AllowedDoorPairs';\n this.FunctionalMarginValidationId = 'FunctionalMargin';\n this.AllowedNumberOfChildrenOfTypeValidationId = 'AllowedNumberOfChildrenOfType';\n this.DisallowSeparateRequiredHostsValidationId = 'DisallowSeparateRequiredHosts';\n this.PlacementZoneValidationId = 'PlacementZone';\n }\n protoOf(ValidationRuleIds).u3p = function () {\n return this.CollisionValidationRuleId;\n };\n protoOf(ValidationRuleIds).v3p = function () {\n return this.ChildConnectionValidationId;\n };\n protoOf(ValidationRuleIds).w3p = function () {\n return this.ManualGroupConnectorValidationId;\n };\n protoOf(ValidationRuleIds).x3p = function () {\n return this.RequiredConnectorsSatisfiedValidationId;\n };\n protoOf(ValidationRuleIds).y3p = function () {\n return this.AllowedDoorPairsValidationId;\n };\n protoOf(ValidationRuleIds).z3p = function () {\n return this.FunctionalMarginValidationId;\n };\n protoOf(ValidationRuleIds).a3q = function () {\n return this.AllowedNumberOfChildrenOfTypeValidationId;\n };\n protoOf(ValidationRuleIds).b3q = function () {\n return this.DisallowSeparateRequiredHostsValidationId;\n };\n protoOf(ValidationRuleIds).c3q = function () {\n return this.PlacementZoneValidationId;\n };\n var ValidationRuleIds_instance;\n function ValidationRuleIds_getInstance() {\n return ValidationRuleIds_instance;\n }\n function toggle($this, system) {\n if (system.isEnabled) {\n system.disable();\n } else {\n system.enable();\n }\n }\n function setEnabled($this, system, enabled) {\n if (!system.isEnabled) {\n if (enabled) {\n system.enable();\n }\n } else {\n if (!enabled) {\n system.disable();\n }\n }\n }\n function setEnabled$default($this, system, enabled, $super) {\n enabled = enabled === VOID ? true : enabled;\n return setEnabled($this, system, enabled);\n }\n function CoreVisualization(coreServices, colliderVisualizer, connectorVisualizer) {\n this.coreServices = coreServices;\n var systems = this.coreServices.entityManager.getSystemsRegistered();\n var tmp = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = systems.length;\n while (inductionVariable < last) {\n var element = systems[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n var tmp_0 = element.id;\n if (tmp_0 === 'EntityColliderVisualizationSystem') {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp_1 = tmp$ret$1;\n var tmp0_elvis_lhs = (tmp_1 == null ? true : tmp_1 instanceof EntityColliderVisualizationSystem) ? tmp_1 : THROW_CCE();\n var tmp_2;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_0 = new EntityColliderVisualizationSystem(this.coreServices, colliderVisualizer);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_0);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_0.disable();\n tmp_2 = this_0;\n } else {\n tmp_2 = tmp0_elvis_lhs;\n }\n tmp.entityColliderVisualizationSystem = tmp_2;\n var tmp_3 = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$6;\n $l$block_0: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_0 = 0;\n var last_0 = systems.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = systems[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n var tmp_4 = element_0.id;\n if (tmp_4 === 'EntityCollisionVisualizationSystem') {\n tmp$ret$6 = element_0;\n break $l$block_0;\n }\n }\n tmp$ret$6 = null;\n }\n var tmp_5 = tmp$ret$6;\n var tmp1_elvis_lhs = (tmp_5 == null ? true : tmp_5 instanceof EntityCollisionVisualizationSystem) ? tmp_5 : THROW_CCE();\n var tmp_6;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_1 = new EntityCollisionVisualizationSystem(this.coreServices);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_1);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_1.disable();\n tmp_6 = this_1;\n } else {\n tmp_6 = tmp1_elvis_lhs;\n }\n tmp_3.entityCollisionVisualizationSystem = tmp_6;\n var tmp_7 = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$11;\n $l$block_1: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_1 = 0;\n var last_1 = systems.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = systems[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n var tmp_8 = element_1.id;\n Companion_getInstance_124();\n if (tmp_8 === 'EntityConnectorVisualizationSystem') {\n tmp$ret$11 = element_1;\n break $l$block_1;\n }\n }\n tmp$ret$11 = null;\n }\n var tmp_9 = tmp$ret$11;\n var tmp2_elvis_lhs = (tmp_9 == null ? true : tmp_9 instanceof EntityConnectorVisualizationSystem) ? tmp_9 : THROW_CCE();\n var tmp_10;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_2 = new EntityConnectorVisualizationSystem(this.coreServices, connectorVisualizer);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_2);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_2.disable();\n tmp_10 = this_2;\n } else {\n tmp_10 = tmp2_elvis_lhs;\n }\n tmp_7.entityConnectorVisualizationSystem = tmp_10;\n var tmp_11 = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$16;\n $l$block_2: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_2 = 0;\n var last_2 = systems.length;\n while (inductionVariable_2 < last_2) {\n var element_2 = systems[inductionVariable_2];\n inductionVariable_2 = inductionVariable_2 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n var tmp_12 = element_2.id;\n if (tmp_12 === 'ColliderVisualizationSystem') {\n tmp$ret$16 = element_2;\n break $l$block_2;\n }\n }\n tmp$ret$16 = null;\n }\n var tmp_13 = tmp$ret$16;\n var tmp3_elvis_lhs = (tmp_13 == null ? true : tmp_13 instanceof ColliderVisualizationSystem) ? tmp_13 : THROW_CCE();\n var tmp_14;\n if (tmp3_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_3 = new ColliderVisualizationSystem(this.coreServices);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_3);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_3.disable();\n tmp_14 = this_3;\n } else {\n tmp_14 = tmp3_elvis_lhs;\n }\n tmp_11.colliderVisualizationSystem = tmp_14;\n var tmp_15 = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$21;\n $l$block_3: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_3 = 0;\n var last_3 = systems.length;\n while (inductionVariable_3 < last_3) {\n var element_3 = systems[inductionVariable_3];\n inductionVariable_3 = inductionVariable_3 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n var tmp_16 = element_3.id;\n if (tmp_16 === 'ConnectorVisualizationSystem') {\n tmp$ret$21 = element_3;\n break $l$block_3;\n }\n }\n tmp$ret$21 = null;\n }\n var tmp_17 = tmp$ret$21;\n var tmp4_elvis_lhs = (tmp_17 == null ? true : tmp_17 instanceof ConnectorVisualizationSystem) ? tmp_17 : THROW_CCE();\n var tmp_18;\n if (tmp4_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_4 = new ConnectorVisualizationSystem(this.coreServices);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_4);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_4.disable();\n tmp_18 = this_4;\n } else {\n tmp_18 = tmp4_elvis_lhs;\n }\n tmp_15.connectorVisualizationSystem = tmp_18;\n var tmp_19 = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$26;\n $l$block_4: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_4 = 0;\n var last_4 = systems.length;\n while (inductionVariable_4 < last_4) {\n var element_4 = systems[inductionVariable_4];\n inductionVariable_4 = inductionVariable_4 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n var tmp_20 = element_4.id;\n if (tmp_20 === 'FunctionalMarginVisualizationSystem') {\n tmp$ret$26 = element_4;\n break $l$block_4;\n }\n }\n tmp$ret$26 = null;\n }\n var tmp_21 = tmp$ret$26;\n var tmp5_elvis_lhs = (tmp_21 == null ? true : tmp_21 instanceof FunctionalMarginVisualizationSystem) ? tmp_21 : THROW_CCE();\n var tmp_22;\n if (tmp5_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_5 = new FunctionalMarginVisualizationSystem(this.coreServices);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_5);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_5.disable();\n tmp_22 = this_5;\n } else {\n tmp_22 = tmp5_elvis_lhs;\n }\n tmp_19.functionalMarginVisualizationSystem = tmp_22;\n var tmp_23 = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$31;\n $l$block_5: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_5 = 0;\n var last_5 = systems.length;\n while (inductionVariable_5 < last_5) {\n var element_5 = systems[inductionVariable_5];\n inductionVariable_5 = inductionVariable_5 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n var tmp_24 = element_5.id;\n if (tmp_24 === 'AutoAdaptHostZoneVisualizationSystem') {\n tmp$ret$31 = element_5;\n break $l$block_5;\n }\n }\n tmp$ret$31 = null;\n }\n var tmp_25 = tmp$ret$31;\n var tmp6_elvis_lhs = (tmp_25 == null ? true : tmp_25 instanceof AutoAdaptHostZoneVisualizationSystem) ? tmp_25 : THROW_CCE();\n var tmp_26;\n if (tmp6_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_6 = new AutoAdaptHostZoneVisualizationSystem(this.coreServices);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_6);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_6.disable();\n tmp_26 = this_6;\n } else {\n tmp_26 = tmp6_elvis_lhs;\n }\n tmp_23.autoAdaptHostZoneVisualizationSystem = tmp_26;\n var tmp_27 = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$36;\n $l$block_6: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_6 = 0;\n var last_6 = systems.length;\n while (inductionVariable_6 < last_6) {\n var element_6 = systems[inductionVariable_6];\n inductionVariable_6 = inductionVariable_6 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n var tmp_28 = element_6.id;\n Companion_getInstance_35();\n if (tmp_28 === 'DragSurfaceNormalVisualizationSystem') {\n tmp$ret$36 = element_6;\n break $l$block_6;\n }\n }\n tmp$ret$36 = null;\n }\n var tmp7_elvis_lhs = tmp$ret$36;\n var tmp_29;\n if (tmp7_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_7 = new DragSurfaceNormalVisualizationSystem(this.coreServices);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_7);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_7.disable();\n tmp_29 = this_7;\n } else {\n tmp_29 = tmp7_elvis_lhs;\n }\n var tmp_30 = tmp_29;\n tmp_27.dragSurfaceNormalVisualizationSystem = tmp_30 instanceof DragSurfaceNormalVisualizationSystem ? tmp_30 : THROW_CCE();\n var tmp_31 = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$41;\n $l$block_7: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_7 = 0;\n var last_7 = systems.length;\n while (inductionVariable_7 < last_7) {\n var element_7 = systems[inductionVariable_7];\n inductionVariable_7 = inductionVariable_7 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n var tmp_32 = element_7.id;\n if (tmp_32 === 'DragProjectionPointVisualizationSystem') {\n tmp$ret$41 = element_7;\n break $l$block_7;\n }\n }\n tmp$ret$41 = null;\n }\n var tmp8_elvis_lhs = tmp$ret$41;\n var tmp_33;\n if (tmp8_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_8 = new DragProjectionPointVisualizationSystem(this.coreServices);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_8);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_8.disable();\n tmp_33 = this_8;\n } else {\n tmp_33 = tmp8_elvis_lhs;\n }\n var tmp_34 = tmp_33;\n tmp_31.dragProjectionPointVisualizationSystem = tmp_34 instanceof DragProjectionPointVisualizationSystem ? tmp_34 : THROW_CCE();\n var tmp_35 = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$46;\n $l$block_8: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_8 = 0;\n var last_8 = systems.length;\n while (inductionVariable_8 < last_8) {\n var element_8 = systems[inductionVariable_8];\n inductionVariable_8 = inductionVariable_8 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n var tmp_36 = element_8.id;\n if (tmp_36 === 'FunctionalZoneVisualizationSystem') {\n tmp$ret$46 = element_8;\n break $l$block_8;\n }\n }\n tmp$ret$46 = null;\n }\n var tmp9_elvis_lhs = tmp$ret$46;\n var tmp_37;\n if (tmp9_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_9 = new FunctionalZoneVisualizationSystem(this.coreServices);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_9);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_9.disable();\n tmp_37 = this_9;\n } else {\n tmp_37 = tmp9_elvis_lhs;\n }\n var tmp_38 = tmp_37;\n tmp_35.functionalZoneVisualizationSystem = tmp_38 instanceof FunctionalZoneVisualizationSystem ? tmp_38 : THROW_CCE();\n var tmp_39 = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$51;\n $l$block_9: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_9 = 0;\n var last_9 = systems.length;\n while (inductionVariable_9 < last_9) {\n var element_9 = systems[inductionVariable_9];\n inductionVariable_9 = inductionVariable_9 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n var tmp_40 = element_9.id;\n Companion_getInstance_32();\n if (tmp_40 === 'DebugLineDrawingSystem') {\n tmp$ret$51 = element_9;\n break $l$block_9;\n }\n }\n tmp$ret$51 = null;\n }\n var tmp10_elvis_lhs = tmp$ret$51;\n var tmp_41;\n if (tmp10_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_10 = new DebugLineDrawingSystem(this.coreServices);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_10);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_10.disable();\n tmp_41 = this_10;\n } else {\n tmp_41 = tmp10_elvis_lhs;\n }\n var tmp_42 = tmp_41;\n tmp_39.debugLineDrawingSystem = tmp_42 instanceof DebugLineDrawingSystem ? tmp_42 : THROW_CCE();\n var tmp_43 = this;\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$56;\n $l$block_10: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_10 = 0;\n var last_10 = systems.length;\n while (inductionVariable_10 < last_10) {\n var element_10 = systems[inductionVariable_10];\n inductionVariable_10 = inductionVariable_10 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n if (element_10.id === Companion_instance_60.ID) {\n tmp$ret$56 = element_10;\n break $l$block_10;\n }\n }\n tmp$ret$56 = null;\n }\n var tmp11_elvis_lhs = tmp$ret$56;\n var tmp_44;\n if (tmp11_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n // Inline function 'kotlin.also' call\n var this_11 = new DragSurfaceVisualizationSystem(this.coreServices.entityManager);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this.coreServices.entityManager.registerSystem(this_11);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.CoreVisualization.' call\n this_11.disable();\n tmp_44 = this_11;\n } else {\n tmp_44 = tmp11_elvis_lhs;\n }\n var tmp_45 = tmp_44;\n tmp_43.dragSurfaceVisualizationSystem = tmp_45 instanceof DragSurfaceVisualizationSystem ? tmp_45 : THROW_CCE();\n this.autoAdaptHostZoneVisualizationSystem.alpha = 0.5;\n this.functionalMarginVisualizationSystem.alpha = 0.5;\n }\n protoOf(CoreVisualization).k2z = function () {\n return this.coreServices;\n };\n protoOf(CoreVisualization).o3q = function () {\n return this.entityColliderVisualizationSystem;\n };\n protoOf(CoreVisualization).p3q = function () {\n return this.entityCollisionVisualizationSystem;\n };\n protoOf(CoreVisualization).q3q = function () {\n return this.entityConnectorVisualizationSystem;\n };\n protoOf(CoreVisualization).r3q = function () {\n return this.colliderVisualizationSystem;\n };\n protoOf(CoreVisualization).s3q = function () {\n return this.connectorVisualizationSystem;\n };\n protoOf(CoreVisualization).t3q = function () {\n return this.debugLineDrawingSystem;\n };\n protoOf(CoreVisualization).u3q = function () {\n return this.functionalMarginVisualizationSystem;\n };\n protoOf(CoreVisualization).v3q = function () {\n return this.autoAdaptHostZoneVisualizationSystem;\n };\n protoOf(CoreVisualization).w3q = function () {\n return this.dragSurfaceNormalVisualizationSystem;\n };\n protoOf(CoreVisualization).x3q = function () {\n return this.dragSurfaceVisualizationSystem;\n };\n protoOf(CoreVisualization).y3q = function () {\n return this.dragProjectionPointVisualizationSystem;\n };\n protoOf(CoreVisualization).z3q = function () {\n return this.functionalZoneVisualizationSystem;\n };\n protoOf(CoreVisualization).toggleEntityColliders = function () {\n return toggle(this, this.entityColliderVisualizationSystem);\n };\n protoOf(CoreVisualization).toggleEntityCollisions = function () {\n return toggle(this, this.entityCollisionVisualizationSystem);\n };\n protoOf(CoreVisualization).toggleEntityConnectors = function () {\n return toggle(this, this.entityConnectorVisualizationSystem);\n };\n protoOf(CoreVisualization).toggleColliders = function () {\n toggle(this, this.colliderVisualizationSystem);\n if (this.colliderVisualizationSystem.isEnabled) {\n setEnabled$default(this, this.entityColliderVisualizationSystem);\n setEnabled$default(this, this.entityCollisionVisualizationSystem);\n }\n };\n protoOf(CoreVisualization).toggleConnectors = function () {\n toggle(this, this.connectorVisualizationSystem);\n if (this.connectorVisualizationSystem.isEnabled) {\n setEnabled$default(this, this.entityConnectorVisualizationSystem);\n }\n };\n protoOf(CoreVisualization).toggleAutoAdaptHostZone = function () {\n return toggle(this, this.autoAdaptHostZoneVisualizationSystem);\n };\n protoOf(CoreVisualization).toggleFunctionalMargin = function () {\n return toggle(this, this.functionalMarginVisualizationSystem);\n };\n protoOf(CoreVisualization).toggleDragSurfaces = function () {\n return toggle(this, this.dragSurfaceNormalVisualizationSystem);\n };\n protoOf(CoreVisualization).toggleDragProjectionPoint = function () {\n return toggle(this, this.dragProjectionPointVisualizationSystem);\n };\n protoOf(CoreVisualization).toggleDragSurfaceVisualizationSystem = function () {\n return toggle(this, this.dragSurfaceVisualizationSystem);\n };\n protoOf(CoreVisualization).toggleDebugLineDrawingSystem = function () {\n return toggle(this, this.debugLineDrawingSystem);\n };\n protoOf(CoreVisualization).toggleFunctionalZone = function () {\n return toggle(this, this.functionalZoneVisualizationSystem);\n };\n protoOf(CoreVisualization).setVisualizationState = function (state) {\n setEnabled(this, this.entityColliderVisualizationSystem, state.colliderVisualizationEnabled);\n setEnabled(this, this.colliderVisualizationSystem, state.visualizeAllColliders);\n setEnabled(this, this.entityCollisionVisualizationSystem, state.collisionVisualizationEnabled);\n setEnabled(this, this.entityConnectorVisualizationSystem, state.connectorVisualizationEnabled);\n setEnabled(this, this.connectorVisualizationSystem, state.visualizeAllConnectors);\n this.connectorVisualizationSystem.connectorActivationDistanceVisualizationEnabled = state.connectorActivationDistanceVisualizationEnabled;\n this.connectorVisualizationSystem.connectorTransformVisualizationEnabled = state.connectorTransformVisualizationEnabled;\n setEnabled(this, this.functionalMarginVisualizationSystem, state.functionalMarginVisualizationEnabled);\n setEnabled(this, this.autoAdaptHostZoneVisualizationSystem, state.autoAdaptHostZoneVisualizationEnabled);\n setEnabled(this, this.dragSurfaceNormalVisualizationSystem, state.dragSurfaceNormalVisualizationEnabled);\n setEnabled(this, this.dragProjectionPointVisualizationSystem, state.dragProjectionPointVisualizationEnabled);\n setEnabled(this, this.functionalZoneVisualizationSystem, state.functionalZoneVisualizationEnabled);\n setEnabled(this, this.debugLineDrawingSystem, state.debugLineDrawingSystem);\n setEnabled(this, this.dragSurfaceVisualizationSystem, state.dragSurfaceVisualizationSystem);\n };\n protoOf(CoreVisualization).getVisualizationState = function () {\n return new VisualizationState(this.entityColliderVisualizationSystem.isEnabled, this.colliderVisualizationSystem.isEnabled, this.entityCollisionVisualizationSystem.isEnabled, this.entityConnectorVisualizationSystem.isEnabled, this.connectorVisualizationSystem.isEnabled, this.connectorVisualizationSystem.connectorActivationDistanceVisualizationEnabled, this.connectorVisualizationSystem.connectorTransformVisualizationEnabled, this.functionalMarginVisualizationSystem.isEnabled, this.autoAdaptHostZoneVisualizationSystem.isEnabled, this.debugLineDrawingSystem.isEnabled, this.dragSurfaceVisualizationSystem.isEnabled);\n };\n function VisualizationState(colliderVisualizationEnabled, visualizeAllColliders, collisionVisualizationEnabled, connectorVisualizationEnabled, visualizeAllConnectors, connectorActivationDistanceVisualizationEnabled, connectorTransformVisualizationEnabled, functionalMarginVisualizationEnabled, autoAdaptHostZoneVisualizationEnabled, dragSurfaceNormalVisualizationEnabled, dragProjectionPointVisualizationEnabled, functionalZoneVisualizationEnabled, debugLineDrawingSystem, dragSurfaceVisualizationSystem) {\n colliderVisualizationEnabled = colliderVisualizationEnabled === VOID ? false : colliderVisualizationEnabled;\n visualizeAllColliders = visualizeAllColliders === VOID ? false : visualizeAllColliders;\n collisionVisualizationEnabled = collisionVisualizationEnabled === VOID ? false : collisionVisualizationEnabled;\n connectorVisualizationEnabled = connectorVisualizationEnabled === VOID ? false : connectorVisualizationEnabled;\n visualizeAllConnectors = visualizeAllConnectors === VOID ? false : visualizeAllConnectors;\n connectorActivationDistanceVisualizationEnabled = connectorActivationDistanceVisualizationEnabled === VOID ? false : connectorActivationDistanceVisualizationEnabled;\n connectorTransformVisualizationEnabled = connectorTransformVisualizationEnabled === VOID ? false : connectorTransformVisualizationEnabled;\n functionalMarginVisualizationEnabled = functionalMarginVisualizationEnabled === VOID ? false : functionalMarginVisualizationEnabled;\n autoAdaptHostZoneVisualizationEnabled = autoAdaptHostZoneVisualizationEnabled === VOID ? false : autoAdaptHostZoneVisualizationEnabled;\n dragSurfaceNormalVisualizationEnabled = dragSurfaceNormalVisualizationEnabled === VOID ? false : dragSurfaceNormalVisualizationEnabled;\n dragProjectionPointVisualizationEnabled = dragProjectionPointVisualizationEnabled === VOID ? false : dragProjectionPointVisualizationEnabled;\n functionalZoneVisualizationEnabled = functionalZoneVisualizationEnabled === VOID ? false : functionalZoneVisualizationEnabled;\n debugLineDrawingSystem = debugLineDrawingSystem === VOID ? false : debugLineDrawingSystem;\n dragSurfaceVisualizationSystem = dragSurfaceVisualizationSystem === VOID ? false : dragSurfaceVisualizationSystem;\n this.colliderVisualizationEnabled = colliderVisualizationEnabled;\n this.visualizeAllColliders = visualizeAllColliders;\n this.collisionVisualizationEnabled = collisionVisualizationEnabled;\n this.connectorVisualizationEnabled = connectorVisualizationEnabled;\n this.visualizeAllConnectors = visualizeAllConnectors;\n this.connectorActivationDistanceVisualizationEnabled = connectorActivationDistanceVisualizationEnabled;\n this.connectorTransformVisualizationEnabled = connectorTransformVisualizationEnabled;\n this.functionalMarginVisualizationEnabled = functionalMarginVisualizationEnabled;\n this.autoAdaptHostZoneVisualizationEnabled = autoAdaptHostZoneVisualizationEnabled;\n this.dragSurfaceNormalVisualizationEnabled = dragSurfaceNormalVisualizationEnabled;\n this.dragProjectionPointVisualizationEnabled = dragProjectionPointVisualizationEnabled;\n this.functionalZoneVisualizationEnabled = functionalZoneVisualizationEnabled;\n this.debugLineDrawingSystem = debugLineDrawingSystem;\n this.dragSurfaceVisualizationSystem = dragSurfaceVisualizationSystem;\n }\n protoOf(VisualizationState).a3r = function () {\n return this.colliderVisualizationEnabled;\n };\n protoOf(VisualizationState).b3r = function () {\n return this.visualizeAllColliders;\n };\n protoOf(VisualizationState).c3r = function () {\n return this.collisionVisualizationEnabled;\n };\n protoOf(VisualizationState).d3r = function () {\n return this.connectorVisualizationEnabled;\n };\n protoOf(VisualizationState).e3r = function () {\n return this.visualizeAllConnectors;\n };\n protoOf(VisualizationState).f3r = function () {\n return this.connectorActivationDistanceVisualizationEnabled;\n };\n protoOf(VisualizationState).g3r = function () {\n return this.connectorTransformVisualizationEnabled;\n };\n protoOf(VisualizationState).h3r = function () {\n return this.functionalMarginVisualizationEnabled;\n };\n protoOf(VisualizationState).i3r = function () {\n return this.autoAdaptHostZoneVisualizationEnabled;\n };\n protoOf(VisualizationState).j3r = function () {\n return this.dragSurfaceNormalVisualizationEnabled;\n };\n protoOf(VisualizationState).k3r = function () {\n return this.dragProjectionPointVisualizationEnabled;\n };\n protoOf(VisualizationState).l3r = function () {\n return this.functionalZoneVisualizationEnabled;\n };\n protoOf(VisualizationState).t3q = function () {\n return this.debugLineDrawingSystem;\n };\n protoOf(VisualizationState).x3q = function () {\n return this.dragSurfaceVisualizationSystem;\n };\n protoOf(VisualizationState).af = function () {\n return this.colliderVisualizationEnabled;\n };\n protoOf(VisualizationState).bf = function () {\n return this.visualizeAllColliders;\n };\n protoOf(VisualizationState).g1k = function () {\n return this.collisionVisualizationEnabled;\n };\n protoOf(VisualizationState).h1k = function () {\n return this.connectorVisualizationEnabled;\n };\n protoOf(VisualizationState).i1k = function () {\n return this.visualizeAllConnectors;\n };\n protoOf(VisualizationState).j1k = function () {\n return this.connectorActivationDistanceVisualizationEnabled;\n };\n protoOf(VisualizationState).k1k = function () {\n return this.connectorTransformVisualizationEnabled;\n };\n protoOf(VisualizationState).p1z = function () {\n return this.functionalMarginVisualizationEnabled;\n };\n protoOf(VisualizationState).q1z = function () {\n return this.autoAdaptHostZoneVisualizationEnabled;\n };\n protoOf(VisualizationState).r1z = function () {\n return this.dragSurfaceNormalVisualizationEnabled;\n };\n protoOf(VisualizationState).s1z = function () {\n return this.dragProjectionPointVisualizationEnabled;\n };\n protoOf(VisualizationState).t1z = function () {\n return this.functionalZoneVisualizationEnabled;\n };\n protoOf(VisualizationState).s21 = function () {\n return this.debugLineDrawingSystem;\n };\n protoOf(VisualizationState).t21 = function () {\n return this.dragSurfaceVisualizationSystem;\n };\n protoOf(VisualizationState).m3r = function (colliderVisualizationEnabled, visualizeAllColliders, collisionVisualizationEnabled, connectorVisualizationEnabled, visualizeAllConnectors, connectorActivationDistanceVisualizationEnabled, connectorTransformVisualizationEnabled, functionalMarginVisualizationEnabled, autoAdaptHostZoneVisualizationEnabled, dragSurfaceNormalVisualizationEnabled, dragProjectionPointVisualizationEnabled, functionalZoneVisualizationEnabled, debugLineDrawingSystem, dragSurfaceVisualizationSystem) {\n return new VisualizationState(colliderVisualizationEnabled, visualizeAllColliders, collisionVisualizationEnabled, connectorVisualizationEnabled, visualizeAllConnectors, connectorActivationDistanceVisualizationEnabled, connectorTransformVisualizationEnabled, functionalMarginVisualizationEnabled, autoAdaptHostZoneVisualizationEnabled, dragSurfaceNormalVisualizationEnabled, dragProjectionPointVisualizationEnabled, functionalZoneVisualizationEnabled, debugLineDrawingSystem, dragSurfaceVisualizationSystem);\n };\n protoOf(VisualizationState).copy = function (colliderVisualizationEnabled, visualizeAllColliders, collisionVisualizationEnabled, connectorVisualizationEnabled, visualizeAllConnectors, connectorActivationDistanceVisualizationEnabled, connectorTransformVisualizationEnabled, functionalMarginVisualizationEnabled, autoAdaptHostZoneVisualizationEnabled, dragSurfaceNormalVisualizationEnabled, dragProjectionPointVisualizationEnabled, functionalZoneVisualizationEnabled, debugLineDrawingSystem, dragSurfaceVisualizationSystem, $super) {\n colliderVisualizationEnabled = colliderVisualizationEnabled === VOID ? this.colliderVisualizationEnabled : colliderVisualizationEnabled;\n visualizeAllColliders = visualizeAllColliders === VOID ? this.visualizeAllColliders : visualizeAllColliders;\n collisionVisualizationEnabled = collisionVisualizationEnabled === VOID ? this.collisionVisualizationEnabled : collisionVisualizationEnabled;\n connectorVisualizationEnabled = connectorVisualizationEnabled === VOID ? this.connectorVisualizationEnabled : connectorVisualizationEnabled;\n visualizeAllConnectors = visualizeAllConnectors === VOID ? this.visualizeAllConnectors : visualizeAllConnectors;\n connectorActivationDistanceVisualizationEnabled = connectorActivationDistanceVisualizationEnabled === VOID ? this.connectorActivationDistanceVisualizationEnabled : connectorActivationDistanceVisualizationEnabled;\n connectorTransformVisualizationEnabled = connectorTransformVisualizationEnabled === VOID ? this.connectorTransformVisualizationEnabled : connectorTransformVisualizationEnabled;\n functionalMarginVisualizationEnabled = functionalMarginVisualizationEnabled === VOID ? this.functionalMarginVisualizationEnabled : functionalMarginVisualizationEnabled;\n autoAdaptHostZoneVisualizationEnabled = autoAdaptHostZoneVisualizationEnabled === VOID ? this.autoAdaptHostZoneVisualizationEnabled : autoAdaptHostZoneVisualizationEnabled;\n dragSurfaceNormalVisualizationEnabled = dragSurfaceNormalVisualizationEnabled === VOID ? this.dragSurfaceNormalVisualizationEnabled : dragSurfaceNormalVisualizationEnabled;\n dragProjectionPointVisualizationEnabled = dragProjectionPointVisualizationEnabled === VOID ? this.dragProjectionPointVisualizationEnabled : dragProjectionPointVisualizationEnabled;\n functionalZoneVisualizationEnabled = functionalZoneVisualizationEnabled === VOID ? this.functionalZoneVisualizationEnabled : functionalZoneVisualizationEnabled;\n debugLineDrawingSystem = debugLineDrawingSystem === VOID ? this.debugLineDrawingSystem : debugLineDrawingSystem;\n dragSurfaceVisualizationSystem = dragSurfaceVisualizationSystem === VOID ? this.dragSurfaceVisualizationSystem : dragSurfaceVisualizationSystem;\n return this.m3r(colliderVisualizationEnabled, visualizeAllColliders, collisionVisualizationEnabled, connectorVisualizationEnabled, visualizeAllConnectors, connectorActivationDistanceVisualizationEnabled, connectorTransformVisualizationEnabled, functionalMarginVisualizationEnabled, autoAdaptHostZoneVisualizationEnabled, dragSurfaceNormalVisualizationEnabled, dragProjectionPointVisualizationEnabled, functionalZoneVisualizationEnabled, debugLineDrawingSystem, dragSurfaceVisualizationSystem);\n };\n protoOf(VisualizationState).toString = function () {\n return 'VisualizationState(colliderVisualizationEnabled=' + this.colliderVisualizationEnabled + ', visualizeAllColliders=' + this.visualizeAllColliders + ', collisionVisualizationEnabled=' + this.collisionVisualizationEnabled + ', connectorVisualizationEnabled=' + this.connectorVisualizationEnabled + ', visualizeAllConnectors=' + this.visualizeAllConnectors + ', connectorActivationDistanceVisualizationEnabled=' + this.connectorActivationDistanceVisualizationEnabled + ', connectorTransformVisualizationEnabled=' + this.connectorTransformVisualizationEnabled + ', functionalMarginVisualizationEnabled=' + this.functionalMarginVisualizationEnabled + ', autoAdaptHostZoneVisualizationEnabled=' + this.autoAdaptHostZoneVisualizationEnabled + ', dragSurfaceNormalVisualizationEnabled=' + this.dragSurfaceNormalVisualizationEnabled + ', dragProjectionPointVisualizationEnabled=' + this.dragProjectionPointVisualizationEnabled + ', functionalZoneVisualizationEnabled=' + this.functionalZoneVisualizationEnabled + ', debugLineDrawingSystem=' + this.debugLineDrawingSystem + ', dragSurfaceVisualizationSystem=' + this.dragSurfaceVisualizationSystem + ')';\n };\n protoOf(VisualizationState).hashCode = function () {\n var result = getBooleanHashCode(this.colliderVisualizationEnabled);\n result = imul(result, 31) + getBooleanHashCode(this.visualizeAllColliders) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.collisionVisualizationEnabled) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.connectorVisualizationEnabled) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.visualizeAllConnectors) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.connectorActivationDistanceVisualizationEnabled) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.connectorTransformVisualizationEnabled) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.functionalMarginVisualizationEnabled) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.autoAdaptHostZoneVisualizationEnabled) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.dragSurfaceNormalVisualizationEnabled) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.dragProjectionPointVisualizationEnabled) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.functionalZoneVisualizationEnabled) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.debugLineDrawingSystem) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.dragSurfaceVisualizationSystem) | 0;\n return result;\n };\n protoOf(VisualizationState).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof VisualizationState))\n return false;\n var tmp0_other_with_cast = other instanceof VisualizationState ? other : THROW_CCE();\n if (!(this.colliderVisualizationEnabled === tmp0_other_with_cast.colliderVisualizationEnabled))\n return false;\n if (!(this.visualizeAllColliders === tmp0_other_with_cast.visualizeAllColliders))\n return false;\n if (!(this.collisionVisualizationEnabled === tmp0_other_with_cast.collisionVisualizationEnabled))\n return false;\n if (!(this.connectorVisualizationEnabled === tmp0_other_with_cast.connectorVisualizationEnabled))\n return false;\n if (!(this.visualizeAllConnectors === tmp0_other_with_cast.visualizeAllConnectors))\n return false;\n if (!(this.connectorActivationDistanceVisualizationEnabled === tmp0_other_with_cast.connectorActivationDistanceVisualizationEnabled))\n return false;\n if (!(this.connectorTransformVisualizationEnabled === tmp0_other_with_cast.connectorTransformVisualizationEnabled))\n return false;\n if (!(this.functionalMarginVisualizationEnabled === tmp0_other_with_cast.functionalMarginVisualizationEnabled))\n return false;\n if (!(this.autoAdaptHostZoneVisualizationEnabled === tmp0_other_with_cast.autoAdaptHostZoneVisualizationEnabled))\n return false;\n if (!(this.dragSurfaceNormalVisualizationEnabled === tmp0_other_with_cast.dragSurfaceNormalVisualizationEnabled))\n return false;\n if (!(this.dragProjectionPointVisualizationEnabled === tmp0_other_with_cast.dragProjectionPointVisualizationEnabled))\n return false;\n if (!(this.functionalZoneVisualizationEnabled === tmp0_other_with_cast.functionalZoneVisualizationEnabled))\n return false;\n if (!(this.debugLineDrawingSystem === tmp0_other_with_cast.debugLineDrawingSystem))\n return false;\n if (!(this.dragSurfaceVisualizationSystem === tmp0_other_with_cast.dragSurfaceVisualizationSystem))\n return false;\n return true;\n };\n function Companion_95() {\n this.id = 109;\n }\n protoOf(Companion_95).s1k = function () {\n return this.id;\n };\n var Companion_instance_128;\n function Companion_getInstance_104() {\n return Companion_instance_128;\n }\n function ColliderVisualizationConfigComponent(includeRoom) {\n this.includeRoom = includeRoom;\n }\n protoOf(ColliderVisualizationConfigComponent).n3r = function () {\n return this.includeRoom;\n };\n protoOf(ColliderVisualizationConfigComponent).x1k = function () {\n return 109;\n };\n protoOf(ColliderVisualizationConfigComponent).eq = function (other) {\n var o = other instanceof ColliderVisualizationConfigComponent ? other : THROW_CCE();\n return o.includeRoom === this.includeRoom;\n };\n protoOf(ColliderVisualizationConfigComponent).af = function () {\n return this.includeRoom;\n };\n protoOf(ColliderVisualizationConfigComponent).o3r = function (includeRoom) {\n return new ColliderVisualizationConfigComponent(includeRoom);\n };\n protoOf(ColliderVisualizationConfigComponent).copy = function (includeRoom, $super) {\n includeRoom = includeRoom === VOID ? this.includeRoom : includeRoom;\n return this.o3r(includeRoom);\n };\n protoOf(ColliderVisualizationConfigComponent).toString = function () {\n return 'ColliderVisualizationConfigComponent(includeRoom=' + this.includeRoom + ')';\n };\n protoOf(ColliderVisualizationConfigComponent).hashCode = function () {\n return getBooleanHashCode(this.includeRoom);\n };\n protoOf(ColliderVisualizationConfigComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ColliderVisualizationConfigComponent))\n return false;\n var tmp0_other_with_cast = other instanceof ColliderVisualizationConfigComponent ? other : THROW_CCE();\n if (!(this.includeRoom === tmp0_other_with_cast.includeRoom))\n return false;\n return true;\n };\n function Companion_96() {\n }\n protoOf(Companion_96).s1k = function () {\n return 23;\n };\n var Companion_instance_129;\n function Companion_getInstance_105() {\n return Companion_instance_129;\n }\n function ColliderVisualizationNodeComponent(ownerEntity, color, collidingBoundIds) {\n this.ownerEntity = ownerEntity;\n this.color = color;\n this.collidingBoundIds = collidingBoundIds;\n }\n protoOf(ColliderVisualizationNodeComponent).p3r = function () {\n return this.ownerEntity;\n };\n protoOf(ColliderVisualizationNodeComponent).h23 = function () {\n return this.color;\n };\n protoOf(ColliderVisualizationNodeComponent).q3r = function () {\n return this.collidingBoundIds;\n };\n protoOf(ColliderVisualizationNodeComponent).x1k = function () {\n return Companion_instance_129.id;\n };\n protoOf(ColliderVisualizationNodeComponent).eq = function (other) {\n return (other instanceof ColliderVisualizationNodeComponent ? other : THROW_CCE()).equals(this);\n };\n protoOf(ColliderVisualizationNodeComponent).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof ColliderVisualizationNodeComponent))\n THROW_CCE();\n if (!this.ownerEntity.equals(other.ownerEntity))\n return false;\n if (!equals(this.color, other.color))\n return false;\n if (!contentEquals(this.collidingBoundIds, other.collidingBoundIds))\n return false;\n return true;\n };\n protoOf(ColliderVisualizationNodeComponent).hashCode = function () {\n var result = this.ownerEntity.hashCode();\n var tmp = imul(31, result);\n var tmp0_safe_receiver = this.color;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hashCode();\n result = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;\n result = imul(31, result) + contentHashCode(this.collidingBoundIds) | 0;\n return result;\n };\n protoOf(ColliderVisualizationNodeComponent).af = function () {\n return this.ownerEntity;\n };\n protoOf(ColliderVisualizationNodeComponent).bf = function () {\n return this.color;\n };\n protoOf(ColliderVisualizationNodeComponent).g1k = function () {\n return this.collidingBoundIds;\n };\n protoOf(ColliderVisualizationNodeComponent).r3r = function (ownerEntity, color, collidingBoundIds) {\n return new ColliderVisualizationNodeComponent(ownerEntity, color, collidingBoundIds);\n };\n protoOf(ColliderVisualizationNodeComponent).copy = function (ownerEntity, color, collidingBoundIds, $super) {\n ownerEntity = ownerEntity === VOID ? this.ownerEntity : ownerEntity;\n color = color === VOID ? this.color : color;\n collidingBoundIds = collidingBoundIds === VOID ? this.collidingBoundIds : collidingBoundIds;\n return this.r3r(ownerEntity, color, collidingBoundIds);\n };\n protoOf(ColliderVisualizationNodeComponent).toString = function () {\n return 'ColliderVisualizationNodeComponent(ownerEntity=' + this.ownerEntity + ', color=' + this.color + ', collidingBoundIds=' + toString(this.collidingBoundIds) + ')';\n };\n function Companion_97() {\n this.id = 98;\n }\n protoOf(Companion_97).s1k = function () {\n return this.id;\n };\n var Companion_instance_130;\n function Companion_getInstance_106() {\n return Companion_instance_130;\n }\n function ColliderVisualizerViewerObjectsComponent(viewerObjets) {\n this.viewerObjets = viewerObjets;\n this.s3r_1 = false;\n }\n protoOf(ColliderVisualizerViewerObjectsComponent).t3r = function () {\n return this.viewerObjets;\n };\n protoOf(ColliderVisualizerViewerObjectsComponent).x1k = function () {\n return 98;\n };\n protoOf(ColliderVisualizerViewerObjectsComponent).eq = function (other) {\n return true;\n };\n protoOf(ColliderVisualizerViewerObjectsComponent).a1l = function () {\n return this.s3r_1;\n };\n protoOf(ColliderVisualizerViewerObjectsComponent).af = function () {\n return this.viewerObjets;\n };\n protoOf(ColliderVisualizerViewerObjectsComponent).u3r = function (viewerObjets) {\n return new ColliderVisualizerViewerObjectsComponent(viewerObjets);\n };\n protoOf(ColliderVisualizerViewerObjectsComponent).copy = function (viewerObjets, $super) {\n viewerObjets = viewerObjets === VOID ? this.viewerObjets : viewerObjets;\n return this.u3r(viewerObjets);\n };\n protoOf(ColliderVisualizerViewerObjectsComponent).toString = function () {\n return 'ColliderVisualizerViewerObjectsComponent(viewerObjets=' + this.viewerObjets + ')';\n };\n protoOf(ColliderVisualizerViewerObjectsComponent).hashCode = function () {\n return hashCode(this.viewerObjets);\n };\n protoOf(ColliderVisualizerViewerObjectsComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ColliderVisualizerViewerObjectsComponent))\n return false;\n var tmp0_other_with_cast = other instanceof ColliderVisualizerViewerObjectsComponent ? other : THROW_CCE();\n if (!equals(this.viewerObjets, tmp0_other_with_cast.viewerObjets))\n return false;\n return true;\n };\n function Companion_98() {\n this.id = 110;\n }\n protoOf(Companion_98).s1k = function () {\n return this.id;\n };\n var Companion_instance_131;\n function Companion_getInstance_107() {\n return Companion_instance_131;\n }\n function ConnectorVisualizationConfigComponent(includeRoom) {\n this.includeRoom = includeRoom;\n }\n protoOf(ConnectorVisualizationConfigComponent).n3r = function () {\n return this.includeRoom;\n };\n protoOf(ConnectorVisualizationConfigComponent).x1k = function () {\n return 110;\n };\n protoOf(ConnectorVisualizationConfigComponent).eq = function (other) {\n var o = other instanceof ConnectorVisualizationConfigComponent ? other : THROW_CCE();\n return o.includeRoom === this.includeRoom;\n };\n protoOf(ConnectorVisualizationConfigComponent).af = function () {\n return this.includeRoom;\n };\n protoOf(ConnectorVisualizationConfigComponent).o3r = function (includeRoom) {\n return new ConnectorVisualizationConfigComponent(includeRoom);\n };\n protoOf(ConnectorVisualizationConfigComponent).copy = function (includeRoom, $super) {\n includeRoom = includeRoom === VOID ? this.includeRoom : includeRoom;\n return this.o3r(includeRoom);\n };\n protoOf(ConnectorVisualizationConfigComponent).toString = function () {\n return 'ConnectorVisualizationConfigComponent(includeRoom=' + this.includeRoom + ')';\n };\n protoOf(ConnectorVisualizationConfigComponent).hashCode = function () {\n return getBooleanHashCode(this.includeRoom);\n };\n protoOf(ConnectorVisualizationConfigComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ConnectorVisualizationConfigComponent))\n return false;\n var tmp0_other_with_cast = other instanceof ConnectorVisualizationConfigComponent ? other : THROW_CCE();\n if (!(this.includeRoom === tmp0_other_with_cast.includeRoom))\n return false;\n return true;\n };\n function Companion_99() {\n }\n protoOf(Companion_99).s1k = function () {\n return 22;\n };\n var Companion_instance_132;\n function Companion_getInstance_108() {\n return Companion_instance_132;\n }\n function ConnectorVisualizationNodeComponent(ownerEntity, data, offersFilter, demandsFilter) {\n this.ownerEntity = ownerEntity;\n this.data = data;\n this.offersFilter = offersFilter;\n this.demandsFilter = demandsFilter;\n }\n protoOf(ConnectorVisualizationNodeComponent).p3r = function () {\n return this.ownerEntity;\n };\n protoOf(ConnectorVisualizationNodeComponent).v3r = function () {\n return this.data;\n };\n protoOf(ConnectorVisualizationNodeComponent).w3r = function () {\n return this.offersFilter;\n };\n protoOf(ConnectorVisualizationNodeComponent).x3r = function () {\n return this.demandsFilter;\n };\n protoOf(ConnectorVisualizationNodeComponent).x1k = function () {\n return Companion_instance_132.id;\n };\n protoOf(ConnectorVisualizationNodeComponent).eq = function (other) {\n return (other instanceof ConnectorVisualizationNodeComponent ? other : THROW_CCE()).equals(this);\n };\n protoOf(ConnectorVisualizationNodeComponent).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof ConnectorVisualizationNodeComponent))\n THROW_CCE();\n if (!this.ownerEntity.equals(other.ownerEntity))\n return false;\n if (!(this.data == null)) {\n if (other.data == null)\n return false;\n if (!contentEquals(this.data, other.data))\n return false;\n } else if (!(other.data == null))\n return false;\n if (!(this.offersFilter == null)) {\n if (other.offersFilter == null)\n return false;\n if (!contentEquals(this.offersFilter, other.offersFilter))\n return false;\n } else if (!(other.offersFilter == null))\n return false;\n if (!(this.demandsFilter == null)) {\n if (other.demandsFilter == null)\n return false;\n if (!contentEquals(this.demandsFilter, other.demandsFilter))\n return false;\n } else if (!(other.demandsFilter == null))\n return false;\n return true;\n };\n protoOf(ConnectorVisualizationNodeComponent).hashCode = function () {\n var result = this.ownerEntity.hashCode();\n var tmp = imul(31, result);\n var tmp0_safe_receiver = this.data;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : contentHashCode(tmp0_safe_receiver);\n result = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;\n var tmp_0 = imul(31, result);\n var tmp2_safe_receiver = this.offersFilter;\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : contentHashCode(tmp2_safe_receiver);\n result = tmp_0 + (tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs) | 0;\n var tmp_1 = imul(31, result);\n var tmp4_safe_receiver = this.demandsFilter;\n var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : contentHashCode(tmp4_safe_receiver);\n result = tmp_1 + (tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs) | 0;\n return result;\n };\n protoOf(ConnectorVisualizationNodeComponent).af = function () {\n return this.ownerEntity;\n };\n protoOf(ConnectorVisualizationNodeComponent).bf = function () {\n return this.data;\n };\n protoOf(ConnectorVisualizationNodeComponent).g1k = function () {\n return this.offersFilter;\n };\n protoOf(ConnectorVisualizationNodeComponent).h1k = function () {\n return this.demandsFilter;\n };\n protoOf(ConnectorVisualizationNodeComponent).y3r = function (ownerEntity, data, offersFilter, demandsFilter) {\n return new ConnectorVisualizationNodeComponent(ownerEntity, data, offersFilter, demandsFilter);\n };\n protoOf(ConnectorVisualizationNodeComponent).copy = function (ownerEntity, data, offersFilter, demandsFilter, $super) {\n ownerEntity = ownerEntity === VOID ? this.ownerEntity : ownerEntity;\n data = data === VOID ? this.data : data;\n offersFilter = offersFilter === VOID ? this.offersFilter : offersFilter;\n demandsFilter = demandsFilter === VOID ? this.demandsFilter : demandsFilter;\n return this.y3r(ownerEntity, data, offersFilter, demandsFilter);\n };\n protoOf(ConnectorVisualizationNodeComponent).toString = function () {\n return 'ConnectorVisualizationNodeComponent(ownerEntity=' + this.ownerEntity + ', data=' + toString(this.data) + ', offersFilter=' + toString(this.offersFilter) + ', demandsFilter=' + toString(this.demandsFilter) + ')';\n };\n function Companion_100() {\n this.id = 99;\n }\n protoOf(Companion_100).s1k = function () {\n return this.id;\n };\n var Companion_instance_133;\n function Companion_getInstance_109() {\n return Companion_instance_133;\n }\n function ConnectorVisualizerViewerObjectsComponent(viewerObjets) {\n this.viewerObjets = viewerObjets;\n this.z3r_1 = false;\n }\n protoOf(ConnectorVisualizerViewerObjectsComponent).t3r = function () {\n return this.viewerObjets;\n };\n protoOf(ConnectorVisualizerViewerObjectsComponent).x1k = function () {\n return 99;\n };\n protoOf(ConnectorVisualizerViewerObjectsComponent).eq = function (other) {\n return true;\n };\n protoOf(ConnectorVisualizerViewerObjectsComponent).a1l = function () {\n return this.z3r_1;\n };\n protoOf(ConnectorVisualizerViewerObjectsComponent).af = function () {\n return this.viewerObjets;\n };\n protoOf(ConnectorVisualizerViewerObjectsComponent).u3r = function (viewerObjets) {\n return new ConnectorVisualizerViewerObjectsComponent(viewerObjets);\n };\n protoOf(ConnectorVisualizerViewerObjectsComponent).copy = function (viewerObjets, $super) {\n viewerObjets = viewerObjets === VOID ? this.viewerObjets : viewerObjets;\n return this.u3r(viewerObjets);\n };\n protoOf(ConnectorVisualizerViewerObjectsComponent).toString = function () {\n return 'ConnectorVisualizerViewerObjectsComponent(viewerObjets=' + this.viewerObjets + ')';\n };\n protoOf(ConnectorVisualizerViewerObjectsComponent).hashCode = function () {\n return hashCode(this.viewerObjets);\n };\n protoOf(ConnectorVisualizerViewerObjectsComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ConnectorVisualizerViewerObjectsComponent))\n return false;\n var tmp0_other_with_cast = other instanceof ConnectorVisualizerViewerObjectsComponent ? other : THROW_CCE();\n if (!equals(this.viewerObjets, tmp0_other_with_cast.viewerObjets))\n return false;\n return true;\n };\n function Companion_101() {\n this.id = 83;\n }\n protoOf(Companion_101).s1k = function () {\n return this.id;\n };\n var Companion_instance_134;\n function Companion_getInstance_110() {\n return Companion_instance_134;\n }\n function DecoratorComponent(placeholder, decorator, model, modelVisible, decoratorVisible) {\n modelVisible = modelVisible === VOID ? true : modelVisible;\n decoratorVisible = decoratorVisible === VOID ? false : decoratorVisible;\n this.placeholder = placeholder;\n this.decorator = decorator;\n this.model = model;\n this.modelVisible = modelVisible;\n this.decoratorVisible = decoratorVisible;\n }\n protoOf(DecoratorComponent).a3s = function () {\n return this.placeholder;\n };\n protoOf(DecoratorComponent).b3s = function () {\n return this.decorator;\n };\n protoOf(DecoratorComponent).u2h = function () {\n return this.model;\n };\n protoOf(DecoratorComponent).c3s = function () {\n return this.modelVisible;\n };\n protoOf(DecoratorComponent).d3s = function () {\n return this.decoratorVisible;\n };\n protoOf(DecoratorComponent).x1k = function () {\n return 83;\n };\n protoOf(DecoratorComponent).eq = function (other) {\n var o = other instanceof DecoratorComponent ? other : THROW_CCE();\n if (!(o.modelVisible === this.modelVisible))\n return false;\n if (!(o.decoratorVisible === this.decoratorVisible))\n return false;\n return (equals(o.placeholder, this.placeholder) ? equals(o.decorator, this.decorator) : false) ? equals(o.model, this.model) : false;\n };\n protoOf(DecoratorComponent).af = function () {\n return this.placeholder;\n };\n protoOf(DecoratorComponent).bf = function () {\n return this.decorator;\n };\n protoOf(DecoratorComponent).g1k = function () {\n return this.model;\n };\n protoOf(DecoratorComponent).h1k = function () {\n return this.modelVisible;\n };\n protoOf(DecoratorComponent).i1k = function () {\n return this.decoratorVisible;\n };\n protoOf(DecoratorComponent).e3s = function (placeholder, decorator, model, modelVisible, decoratorVisible) {\n return new DecoratorComponent(placeholder, decorator, model, modelVisible, decoratorVisible);\n };\n protoOf(DecoratorComponent).copy = function (placeholder, decorator, model, modelVisible, decoratorVisible, $super) {\n placeholder = placeholder === VOID ? this.placeholder : placeholder;\n decorator = decorator === VOID ? this.decorator : decorator;\n model = model === VOID ? this.model : model;\n modelVisible = modelVisible === VOID ? this.modelVisible : modelVisible;\n decoratorVisible = decoratorVisible === VOID ? this.decoratorVisible : decoratorVisible;\n return this.e3s(placeholder, decorator, model, modelVisible, decoratorVisible);\n };\n protoOf(DecoratorComponent).toString = function () {\n return 'DecoratorComponent(placeholder=' + this.placeholder + ', decorator=' + this.decorator + ', model=' + this.model + ', modelVisible=' + this.modelVisible + ', decoratorVisible=' + this.decoratorVisible + ')';\n };\n protoOf(DecoratorComponent).hashCode = function () {\n var result = hashCode(this.placeholder);\n result = imul(result, 31) + hashCode(this.decorator) | 0;\n result = imul(result, 31) + (this.model == null ? 0 : hashCode(this.model)) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.modelVisible) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.decoratorVisible) | 0;\n return result;\n };\n protoOf(DecoratorComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof DecoratorComponent))\n return false;\n var tmp0_other_with_cast = other instanceof DecoratorComponent ? other : THROW_CCE();\n if (!equals(this.placeholder, tmp0_other_with_cast.placeholder))\n return false;\n if (!equals(this.decorator, tmp0_other_with_cast.decorator))\n return false;\n if (!equals(this.model, tmp0_other_with_cast.model))\n return false;\n if (!(this.modelVisible === tmp0_other_with_cast.modelVisible))\n return false;\n if (!(this.decoratorVisible === tmp0_other_with_cast.decoratorVisible))\n return false;\n return true;\n };\n function Companion_102() {\n this.id = 78;\n }\n protoOf(Companion_102).s1k = function () {\n return this.id;\n };\n var Companion_instance_135;\n function Companion_getInstance_111() {\n return Companion_instance_135;\n }\n function EntityColliderVisualizationComponent(color, collidingBoundIds, isGenerated) {\n color = color === VOID ? new Color('#1784ba', 0.0901, 0.5176, 0.7294) : color;\n var tmp;\n if (collidingBoundIds === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = collidingBoundIds;\n }\n collidingBoundIds = tmp;\n isGenerated = isGenerated === VOID ? false : isGenerated;\n this.color = color;\n this.collidingBoundIds = collidingBoundIds;\n this.isGenerated = isGenerated;\n this.f3s_1 = false;\n }\n protoOf(EntityColliderVisualizationComponent).h23 = function () {\n return this.color;\n };\n protoOf(EntityColliderVisualizationComponent).q3r = function () {\n return this.collidingBoundIds;\n };\n protoOf(EntityColliderVisualizationComponent).g3s = function () {\n return this.isGenerated;\n };\n protoOf(EntityColliderVisualizationComponent).x1k = function () {\n return 78;\n };\n protoOf(EntityColliderVisualizationComponent).a1l = function () {\n return this.f3s_1;\n };\n protoOf(EntityColliderVisualizationComponent).eq = function (other) {\n if (!(other instanceof EntityColliderVisualizationComponent))\n THROW_CCE();\n if (!(this.color.color === other.color.color))\n return false;\n if (!contentEquals(this.collidingBoundIds, other.collidingBoundIds))\n return false;\n return true;\n };\n protoOf(EntityColliderVisualizationComponent).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof EntityColliderVisualizationComponent))\n THROW_CCE();\n if (!(this.color.color === other.color.color))\n return false;\n if (!contentEquals(this.collidingBoundIds, other.collidingBoundIds))\n return false;\n return true;\n };\n protoOf(EntityColliderVisualizationComponent).hashCode = function () {\n var result = this.color.hashCode();\n result = imul(31, result) + contentHashCode(this.collidingBoundIds) | 0;\n return result;\n };\n protoOf(EntityColliderVisualizationComponent).af = function () {\n return this.color;\n };\n protoOf(EntityColliderVisualizationComponent).bf = function () {\n return this.collidingBoundIds;\n };\n protoOf(EntityColliderVisualizationComponent).g1k = function () {\n return this.isGenerated;\n };\n protoOf(EntityColliderVisualizationComponent).i3s = function (color, collidingBoundIds, isGenerated) {\n return new EntityColliderVisualizationComponent(color, collidingBoundIds, isGenerated);\n };\n protoOf(EntityColliderVisualizationComponent).copy = function (color, collidingBoundIds, isGenerated, $super) {\n color = color === VOID ? this.color : color;\n collidingBoundIds = collidingBoundIds === VOID ? this.collidingBoundIds : collidingBoundIds;\n isGenerated = isGenerated === VOID ? this.isGenerated : isGenerated;\n return this.i3s(color, collidingBoundIds, isGenerated);\n };\n protoOf(EntityColliderVisualizationComponent).toString = function () {\n return 'EntityColliderVisualizationComponent(color=' + this.color + ', collidingBoundIds=' + toString(this.collidingBoundIds) + ', isGenerated=' + this.isGenerated + ')';\n };\n function Companion_103() {\n this.id = 77;\n }\n protoOf(Companion_103).s1k = function () {\n return this.id;\n };\n var Companion_instance_136;\n function Companion_getInstance_112() {\n return Companion_instance_136;\n }\n function EntityConnectorVisualizationComponent(data) {\n data = data === VOID ? null : data;\n this.data = data;\n this.j3s_1 = 77;\n this.k3s_1 = false;\n }\n protoOf(EntityConnectorVisualizationComponent).v3r = function () {\n return this.data;\n };\n protoOf(EntityConnectorVisualizationComponent).x1k = function () {\n return this.j3s_1;\n };\n protoOf(EntityConnectorVisualizationComponent).a1l = function () {\n return this.k3s_1;\n };\n protoOf(EntityConnectorVisualizationComponent).eq = function (other) {\n if (this === other)\n return true;\n if (!getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof EntityConnectorVisualizationComponent))\n THROW_CCE();\n if (!contentEquals(this.data, other.data))\n return false;\n return true;\n };\n function ConnectorVisualizationData() {\n }\n function Companion_104() {\n }\n protoOf(Companion_104).s1k = function () {\n return 108;\n };\n var Companion_instance_137;\n function Companion_getInstance_113() {\n return Companion_instance_137;\n }\n function PolyhedronVisualizationNodeComponent() {\n }\n protoOf(PolyhedronVisualizationNodeComponent).x1k = function () {\n return Companion_instance_137.id;\n };\n protoOf(PolyhedronVisualizationNodeComponent).eq = function (other) {\n return true;\n };\n function Companion_105() {\n this.ID = 'AutoAdaptHostZoneVisualizationSystem';\n }\n protoOf(Companion_105).u1n = function () {\n return this.ID;\n };\n var Companion_instance_138;\n function Companion_getInstance_114() {\n return Companion_instance_138;\n }\n function AutoAdaptHostZoneVisualizationSystem(coreServices) {\n PolyhedronVisualizationSystem.call(this, 'AutoAdaptHostZoneVisualizationSystem', coreServices);\n }\n protoOf(AutoAdaptHostZoneVisualizationSystem).getPolyhedron = function (entity) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(127);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hostZone;\n };\n protoOf(AutoAdaptHostZoneVisualizationSystem).getColor = function (entity, polyhedron) {\n var blue = 0.5 + Default_getInstance().bh(0.3, 0.5);\n return new Color('autoadapthostzone', 0.0, 0.0, blue);\n };\n function Companion_106() {\n this.ID = 'DragProjectionPointVisualizationSystem';\n }\n protoOf(Companion_106).u1n = function () {\n return this.ID;\n };\n var Companion_instance_139;\n function Companion_getInstance_115() {\n return Companion_instance_139;\n }\n function DragProjectionPointVisualizationSystem(coreServices) {\n PolyhedronVisualizationSystem.call(this, 'DragProjectionPointVisualizationSystem', coreServices);\n }\n protoOf(DragProjectionPointVisualizationSystem).getPolyhedron = function (entity) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(113);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.projectionPoint;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var projectionPoint = tmp;\n return CuboidFromSizeAndCenter(__VectorIntConstructorKotlin(50, 50, 50), projectionPoint);\n };\n protoOf(DragProjectionPointVisualizationSystem).getColor = function (entity, polyhedron) {\n return new Color('dragprojectionpoint', 1.0, 0.0, 0.0);\n };\n function Companion_107() {\n this.ID = 'FunctionalMarginVisualizationSystem';\n }\n protoOf(Companion_107).u1n = function () {\n return this.ID;\n };\n var Companion_instance_140;\n function Companion_getInstance_116() {\n return Companion_instance_140;\n }\n function FunctionalMarginVisualizationSystem(coreServices) {\n PolyhedronVisualizationSystem.call(this, 'FunctionalMarginVisualizationSystem', coreServices);\n }\n protoOf(FunctionalMarginVisualizationSystem).getPolyhedron = function (entity) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(61);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.shape(entity);\n };\n protoOf(FunctionalMarginVisualizationSystem).getColor = function (entity, polyhedron) {\n var green = Default_getInstance().bh(0.5, 1.0);\n return new Color('functionalmargin', 0.0, green, 0.0);\n };\n function Companion_108() {\n this.ID = 'FunctionalZoneVisualizationSystem';\n }\n protoOf(Companion_108).u1n = function () {\n return this.ID;\n };\n var Companion_instance_141;\n function Companion_getInstance_117() {\n return Companion_instance_141;\n }\n function FunctionalZoneVisualizationSystem(coreServices) {\n PolyhedronVisualizationSystem.call(this, 'FunctionalZoneVisualizationSystem', coreServices);\n }\n protoOf(FunctionalZoneVisualizationSystem).getPolyhedron = function (entity) {\n var tmp0_elvis_lhs = entity.__getComponentForKotlin(121);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var functionalZonesComponent = tmp;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = functionalZonesComponent.zones;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.polyhedron.FunctionalZoneVisualizationSystem.getPolyhedron.' call\n var tmp$ret$0 = item.polyhedron;\n destination.q(tmp$ret$0);\n }\n var polyhedrons = copyToArray(destination);\n return new PolyhedronGroup(polyhedrons);\n };\n protoOf(FunctionalZoneVisualizationSystem).getColor = function (entity, polyhedron) {\n var blue = Default_getInstance().bh(0.5, 0.8);\n return new Color('functional zone', 0.9, 0.9, blue);\n };\n function Companion_109() {\n this.id = 102;\n }\n protoOf(Companion_109).s1k = function () {\n return this.id;\n };\n var Companion_instance_142;\n function Companion_getInstance_118() {\n return Companion_instance_142;\n }\n function PolyhedronVisualizationHolderComponent(systemId) {\n this.systemId = systemId;\n this.v3s_1 = 102;\n }\n protoOf(PolyhedronVisualizationHolderComponent).w3s = function () {\n return this.systemId;\n };\n protoOf(PolyhedronVisualizationHolderComponent).x1k = function () {\n return this.v3s_1;\n };\n protoOf(PolyhedronVisualizationHolderComponent).eq = function (other) {\n var tmp0_safe_receiver = other instanceof PolyhedronVisualizationHolderComponent ? other : null;\n return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.systemId) === this.systemId;\n };\n protoOf(PolyhedronVisualizationHolderComponent).af = function () {\n return this.systemId;\n };\n protoOf(PolyhedronVisualizationHolderComponent).q1l = function (systemId) {\n return new PolyhedronVisualizationHolderComponent(systemId);\n };\n protoOf(PolyhedronVisualizationHolderComponent).copy = function (systemId, $super) {\n systemId = systemId === VOID ? this.systemId : systemId;\n return this.q1l(systemId);\n };\n protoOf(PolyhedronVisualizationHolderComponent).toString = function () {\n return 'PolyhedronVisualizationHolderComponent(systemId=' + this.systemId + ')';\n };\n protoOf(PolyhedronVisualizationHolderComponent).hashCode = function () {\n return getStringHashCode(this.systemId);\n };\n protoOf(PolyhedronVisualizationHolderComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PolyhedronVisualizationHolderComponent))\n return false;\n var tmp0_other_with_cast = other instanceof PolyhedronVisualizationHolderComponent ? other : THROW_CCE();\n if (!(this.systemId === tmp0_other_with_cast.systemId))\n return false;\n return true;\n };\n function _get_viewer__pq1i9z_0($this) {\n return $this.l3q_1.coreModules.viewer();\n }\n function createAllVisualizations($this) {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = $this.l3q_1.sceneManager.entities;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.polyhedron.PolyhedronVisualizationSystem.createAllVisualizations.' call\n if (element.hasComponent(InSceneComponent_instance.id)) {\n destination.q(element);\n }\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.polyhedron.PolyhedronVisualizationSystem.createAllVisualizations.' call\n createPolyhedronVisualization($this, element_0);\n }\n }\n function clearVisualizationEntities($this) {\n clearEntityHierarchy($this, $this.l3q_1.sceneManager.scene);\n }\n function hasHolderComponent($this, it) {\n var tmp0_safe_receiver = it.__getComponentForKotlin(102);\n return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.systemId) === $this.id;\n }\n function clearEntityHierarchy($this, entity) {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_descendants(entity);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.polyhedron.PolyhedronVisualizationSystem.clearEntityHierarchy.' call\n if (hasHolderComponent($this, element)) {\n destination.q(element);\n }\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.polyhedron.PolyhedronVisualizationSystem.clearEntityHierarchy.' call\n var tmp0_safe_receiver = element_0.__getComponentForKotlin(Companion_instance_29.id);\n var viewerObject = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.viewerObject;\n $this.m3q_1.disposeEntity(element_0);\n if (viewerObject == null)\n null;\n else {\n viewerObject.deleteObject();\n }\n }\n }\n function createPolyhedronVisualization($this, entity) {\n var poly = $this.getPolyhedron(entity);\n if (poly == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.polyhedron.PolyhedronVisualizationSystem.createPolyhedronVisualization.' call\n var tmp0_safe_receiver = _get_viewer__pq1i9z_0($this);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var parent = createHolderEntity($this, entity);\n var viewerObject = createPolyhedronVisualization$default($this, tmp0_safe_receiver, poly, parent);\n var tmp0_safe_receiver_0 = get_viewerObject(entity);\n if ((tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.getVisible()) === false) {\n if (viewerObject == null)\n null;\n else\n viewerObject.setVisible(false);\n }\n var tmp_0;\n if (!(viewerObject == null)) {\n parent.addComponent(new ViewerObjectComponent(viewerObject));\n tmp_0 = Unit_instance;\n }\n tmp = Unit_instance;\n }\n }\n }\n function createHolderEntity($this, entity) {\n var visualizerHolder = $this.m3q_1.createEntity();\n setParent(visualizerHolder, entity);\n visualizerHolder.addComponent(new DisplayNameComponent('PolyhedronVisualizerNode[' + $this.id + ']'));\n visualizerHolder.addComponent(RenderedComponent_instance);\n visualizerHolder.addComponent(new PolyhedronVisualizationHolderComponent($this.id));\n visualizerHolder.addComponent(new PolyhedronVisualizationNodeComponent());\n visualizerHolder.addComponent(new UnserializableEntityComponent());\n return visualizerHolder;\n }\n function createPolyhedronVisualization_0($this, viewer, polyhedron, entity, parent) {\n var color = $this.getColor(entity, polyhedron);\n if (polyhedron instanceof ConvexPolyhedron)\n return createPolyhedronVisualization_2($this, viewer, polyhedron, entity, parent, color);\n else {\n if (polyhedron instanceof PolyhedronGroup)\n return createPolyhedronVisualization_1($this, viewer, polyhedron, entity, parent, color);\n }\n return null;\n }\n function createPolyhedronVisualization$default($this, viewer, polyhedron, entity, parent, $super) {\n parent = parent === VOID ? viewer.createSphere(0.001) : parent;\n return createPolyhedronVisualization_0($this, viewer, polyhedron, entity, parent);\n }\n function createPolyhedronVisualization_1($this, viewer, polyhedron, entity, parent, color) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = polyhedron.polyhedra;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.polyhedron.PolyhedronVisualizationSystem.createPolyhedronVisualization.' call\n if (element instanceof ConvexPolyhedron) {\n createPolyhedronVisualization_2($this, viewer, element, entity, parent, color);\n }\n }\n return parent;\n }\n function createPolyhedronVisualization_2($this, viewer, polyhedron, entity, parent, color) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (polyhedron.vertices.length === 0)\n return null;\n var vertices = polyhedron.vertices;\n // Inline function 'kotlin.collections.map' call\n var this_0 = polyhedron.faces;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.polyhedron.PolyhedronVisualizationSystem.createPolyhedronVisualization.' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_1 = item.indices;\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(this_1.length);\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var item_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.polyhedron.PolyhedronVisualizationSystem.createPolyhedronVisualization..' call\n var tmp$ret$1 = vertices[item_0];\n destination_0.q(tmp$ret$1);\n }\n var tmp$ret$5 = copyToArray(destination_0);\n destination.q(tmp$ret$5);\n }\n var vectorFaces = destination;\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(vectorFaces, 10));\n var tmp0_iterator = vectorFaces.t();\n while (tmp0_iterator.u()) {\n var item_1 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.polyhedron.PolyhedronVisualizationSystem.createPolyhedronVisualization.' call\n var normal = PolyhedronUtils_getInstance().surfaceNormal(item_1);\n var viewerObject = viewer.createSurface(item_1, normal, entity);\n viewerObject.setBaseColor(color.r, color.g, color.b);\n setTransparency($this, viewerObject);\n destination_1.q(viewerObject);\n }\n var viewerObjects = destination_1;\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$11 = copyToArray(viewerObjects);\n var group = viewer.groupMeshes(tmp$ret$11, entity);\n group.setParent(parent);\n return parent;\n }\n function setTransparency($this, viewerObject) {\n return viewerObject.setTransparency($this.alpha);\n }\n function PolyhedronVisualizationSystem(id, coreServices) {\n var tmp = InSceneComponent_instance.id;\n SystemBase3.call(this, id, tmp, 82, Companion_instance_31.id);\n this.l3q_1 = coreServices;\n this.m3q_1 = this.l3q_1.entityManager;\n this.alpha = 0.8;\n this.colorRandomizationAmount = 0.5;\n var tmp_0 = this;\n // Inline function 'kotlin.emptyArray' call\n tmp_0.n3q_1 = [];\n }\n protoOf(PolyhedronVisualizationSystem).r3s = function (_set____db54di) {\n this.alpha = _set____db54di;\n };\n protoOf(PolyhedronVisualizationSystem).s3s = function () {\n return this.alpha;\n };\n protoOf(PolyhedronVisualizationSystem).t3s = function (_set____db54di) {\n this.colorRandomizationAmount = _set____db54di;\n };\n protoOf(PolyhedronVisualizationSystem).u3s = function () {\n return this.colorRandomizationAmount;\n };\n protoOf(PolyhedronVisualizationSystem).enable = function () {\n if (this.isEnabled)\n return Unit_instance;\n protoOf(SystemBase3).enable.call(this);\n createAllVisualizations(this);\n };\n protoOf(PolyhedronVisualizationSystem).disable = function () {\n if (!this.isEnabled)\n return Unit_instance;\n protoOf(SystemBase3).disable.call(this);\n clearVisualizationEntities(this);\n };\n protoOf(PolyhedronVisualizationSystem).w1o = function () {\n return this.n3q_1;\n };\n protoOf(PolyhedronVisualizationSystem).onAddComponent = function (entity, newComponent) {\n createPolyhedronVisualization(this, entity);\n };\n protoOf(PolyhedronVisualizationSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n createPolyhedronVisualization(this, entity);\n };\n protoOf(PolyhedronVisualizationSystem).onRemoveComponent = function (entity, oldComponent) {\n clearEntityHierarchy(this, entity);\n };\n protoOf(PolyhedronVisualizationSystem).onAddComponent2 = function (entity, newComponent) {\n createAllVisualizations(this);\n };\n protoOf(PolyhedronVisualizationSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n this.onRemoveComponent2(entity, oldComponent);\n this.onAddComponent2(entity, newComponent);\n };\n protoOf(PolyhedronVisualizationSystem).onRemoveComponent2 = function (entity, oldComponent) {\n clearVisualizationEntities(this);\n };\n protoOf(PolyhedronVisualizationSystem).onAddComponent3 = function (entity, newComponent) {\n clearVisualizationEntities(this);\n };\n protoOf(PolyhedronVisualizationSystem).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n };\n protoOf(PolyhedronVisualizationSystem).onRemoveComponent3 = function (entity, oldComponent) {\n clearVisualizationEntities(this);\n createAllVisualizations(this);\n };\n function Companion_110() {\n this.ID = 'ColliderVisualizationSystem';\n }\n protoOf(Companion_110).u1n = function () {\n return this.ID;\n };\n protoOf(Companion_110).createEntityColliderVisualizationComponent = function () {\n return new EntityColliderVisualizationComponent(VOID, VOID, true);\n };\n var Companion_instance_143;\n function Companion_getInstance_119() {\n return Companion_instance_143;\n }\n function ColliderVisualizationSystem(coreServices) {\n ForcedComponentBaseSystem.call(this, 'ColliderVisualizationSystem', 78, Companion_instance_143.createEntityColliderVisualizationComponent(), coreServices);\n this.configEntity.addComponent(new ColliderVisualizationConfigComponent(false));\n this.enable();\n }\n protoOf(ColliderVisualizationSystem).n3t = function (value) {\n var wasEnabled = this.isEnabled;\n this.disable();\n this.configEntity.addComponent(new ColliderVisualizationConfigComponent(value));\n if (wasEnabled) {\n this.enable();\n }\n };\n protoOf(ColliderVisualizationSystem).n3r = function () {\n return this.configEntity.getComponentUnsafe(109).includeRoom;\n };\n protoOf(ColliderVisualizationSystem).entityIsEligibleForComponent = function (entity) {\n var tmp;\n if (entity.hasComponent(RoomComponent_instance.id) ? !this.includeRoom : false) {\n tmp = false;\n } else {\n var tmp_0;\n if (entity.hasComponent(103)) {\n tmp_0 = !this.includeRoom;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = false;\n } else {\n if (entity.hasComponent(Companion_instance_129.id)) {\n tmp = false;\n } else {\n if (!get_isInScene(entity)) {\n tmp = false;\n } else {\n tmp = true;\n }\n }\n }\n }\n return tmp;\n };\n function ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1($showActivationDistance, $showTransform) {\n this.r3t_1 = '';\n this.s3t_1 = '';\n this.t3t_1 = false;\n this.u3t_1 = true;\n this.v3t_1 = false;\n var tmp = this;\n tmp.w3t_1 = $showActivationDistance == null ? false : $showActivationDistance;\n var tmp_0 = this;\n tmp_0.x3t_1 = $showTransform == null ? false : $showTransform;\n }\n protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1).z21 = function () {\n return this.r3t_1;\n };\n protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1).l3s = function () {\n return this.s3t_1;\n };\n protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1).m3s = function () {\n return this.t3t_1;\n };\n protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1).n3s = function () {\n return this.u3t_1;\n };\n protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1).o3s = function () {\n return this.v3t_1;\n };\n protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1).p3s = function () {\n return this.w3t_1;\n };\n protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1).q3s = function () {\n return this.x3t_1;\n };\n function setEnabledFeatures($this, activationDistanceActivate, transformActivate) {\n $this.setConfigComponent(Companion_instance_144.createEntityConnectorVisualizationComponent(activationDistanceActivate, transformActivate));\n }\n function Companion_111() {\n this.ID = 'ConnectorVisualizationSystem';\n }\n protoOf(Companion_111).u1n = function () {\n return this.ID;\n };\n protoOf(Companion_111).y3t = function (showActivationDistance, showTransform) {\n var data = new ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1(showActivationDistance, showTransform);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [data];\n return new EntityConnectorVisualizationComponent(tmp$ret$2);\n };\n protoOf(Companion_111).createEntityConnectorVisualizationComponent = function (showActivationDistance, showTransform, $super) {\n showActivationDistance = showActivationDistance === VOID ? null : showActivationDistance;\n showTransform = showTransform === VOID ? null : showTransform;\n return this.y3t(showActivationDistance, showTransform);\n };\n var Companion_instance_144;\n function Companion_getInstance_120() {\n return Companion_instance_144;\n }\n function ConnectorVisualizationSystem(coreServices) {\n ForcedComponentBaseSystem.call(this, 'ConnectorVisualizationSystem', 77, Companion_instance_144.createEntityConnectorVisualizationComponent(), coreServices);\n this.h3u_1 = coreServices.entityManager;\n this.configEntity.addComponent(new ConnectorVisualizationConfigComponent(false));\n this.enable();\n }\n protoOf(ConnectorVisualizationSystem).n3t = function (value) {\n var wasEnabled = this.isEnabled;\n this.disable();\n this.configEntity.addComponent(new ConnectorVisualizationConfigComponent(value));\n if (wasEnabled) {\n this.enable();\n }\n };\n protoOf(ConnectorVisualizationSystem).n3r = function () {\n return this.configEntity.getComponentUnsafe(110).includeRoom;\n };\n protoOf(ConnectorVisualizationSystem).entityIsEligibleForComponent = function (entity) {\n var tmp;\n if (entity.hasComponent(RoomComponent_instance.id) ? !this.includeRoom : false) {\n tmp = false;\n } else {\n var tmp_0;\n if (entity.hasComponent(103)) {\n tmp_0 = !this.includeRoom;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = false;\n } else {\n if (entity.hasComponent(Companion_instance_132.id)) {\n tmp = false;\n } else {\n if (!get_isInScene(entity)) {\n tmp = false;\n } else {\n tmp = true;\n }\n }\n }\n }\n return tmp;\n };\n protoOf(ConnectorVisualizationSystem).i3u = function (value) {\n setEnabledFeatures(this, value, this.connectorTransformVisualizationEnabled);\n };\n protoOf(ConnectorVisualizationSystem).f3r = function () {\n var tmp0_safe_receiver = this.getForcedComponentConfigUnsafe(77).data;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver[0];\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.showActivationDistance;\n return tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs;\n };\n protoOf(ConnectorVisualizationSystem).j3u = function (value) {\n setEnabledFeatures(this, this.connectorActivationDistanceVisualizationEnabled, value);\n };\n protoOf(ConnectorVisualizationSystem).g3r = function () {\n var tmp0_safe_receiver = this.getForcedComponentConfigUnsafe(77).data;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver[0];\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.showTransform;\n return tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs;\n };\n function generateColliderShapeBounds($this, entity, ids, polyhedron, colliderVisualizer, color, collidingBoundIds) {\n var tmp;\n if (polyhedron instanceof ConvexPolyhedron) {\n var tmp_0 = ids[0];\n var tmp1_safe_receiver = get_viewerObject(entity);\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.getScale();\n var tmp3_safe_receiver = createVisualization($this, entity, tmp_0, polyhedron, colliderVisualizer, tmp2_elvis_lhs == null ? Companion_getInstance_4().ONE : tmp2_elvis_lhs, color, collidingBoundIds);\n var tmp_1;\n if (tmp3_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.generateColliderShapeBounds.' call\n var id = tmp3_safe_receiver.af();\n var viewerObject = tmp3_safe_receiver.bf();\n tmp_1 = mapOf_0(to(id, viewerObject));\n }\n var tmp4_elvis_lhs = tmp_1;\n tmp = tmp4_elvis_lhs == null ? emptyMap() : tmp4_elvis_lhs;\n } else {\n if (polyhedron instanceof PolyhedronGroup) {\n // Inline function 'kotlin.collections.associate' call\n // Inline function 'kotlin.collections.mapIndexedNotNull' call\n // Inline function 'kotlin.collections.mapIndexedNotNullTo' call\n var this_0 = polyhedron.polyhedra;\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapIndexedNotNullTo.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.generateColliderShapeBounds.' call\n var tmp_2;\n var tmp_3;\n if (item instanceof ConvexPolyhedron) {\n tmp_3 = ids.length > tmp1;\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n var tmp_4 = Companion_instance_145;\n var tmp_5 = ids[tmp1];\n var tmp0_safe_receiver = get_viewerObject(entity);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.getScale();\n tmp_2 = createVisualization(tmp_4, entity, tmp_5, item, colliderVisualizer, tmp1_elvis_lhs == null ? Companion_getInstance_4().ONE : tmp1_elvis_lhs, color, collidingBoundIds);\n } else {\n throw Error_init_$Create$('Unsupported collider type or no id');\n }\n var tmp0_safe_receiver_0 = tmp_2;\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver_0);\n }\n }\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination, 10)), 16);\n // Inline function 'kotlin.collections.associateTo' call\n var destination_0 = LinkedHashMap_init_$Create$_0(capacity);\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.plusAssign' call\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.generateColliderShapeBounds.' call\n var id_0 = element.af();\n var viewerObject_0 = element.bf();\n var pair = to(id_0, viewerObject_0);\n destination_0.r2(pair.ye_1, pair.ze_1);\n }\n tmp = destination_0;\n } else {\n tmp = emptyMap();\n }\n }\n return tmp;\n }\n function createVisualization($this, entity, id, polyhedron, colliderVisualizer, scale, color, collidingBoundIds) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (polyhedron.vertices.length === 0)\n return null;\n var tmp0_safe_receiver = colliderVisualizer.createColliderVisualization(entity, polyhedron, color, contains(collidingBoundIds, id));\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n tmp0_safe_receiver.setScale(1.0 / scale.X, 1.0 / scale.Y, 1.0 / scale.Z);\n tmp0_safe_receiver.setVisible(true);\n return new Pair(id, tmp0_safe_receiver);\n }\n return tmp;\n }\n function _get_sceneManager__lxhb6y_0($this) {\n return $this.coreServices.sceneManager;\n }\n function hasNoVisualization($this, entity) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = get_children(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityColliderVisualizationSystem.hasNoVisualization.' call\n if (element.hasComponent(98)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n return !tmp$ret$1;\n }\n function hasNewVisualizationData($this, entity, colliderVisualizationData) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstNotNullOfOrNull' call\n var indexedObject = get_children(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityColliderVisualizationSystem.hasNewVisualizationData.' call\n var result = _get_colliderVisualizationNode__i436cf(element, $this);\n if (!(result == null)) {\n tmp$ret$1 = result;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var currentVisualizationNodeData = tmp$ret$1;\n var newVisualizationNodeData = generateNodeData($this, entity, colliderVisualizationData.color, colliderVisualizationData.collidingBoundIds);\n return !newVisualizationNodeData.equals(currentVisualizationNodeData);\n }\n function generateNodeData($this, entity, color, collidingBoundIds) {\n return new ColliderVisualizationNodeComponent(entity, color, collidingBoundIds);\n }\n function addDecoration($this, entity, polyhedron, ids, color, collidingBoundIds) {\n var visualizerHolder = $this.s3u_1.createEntity();\n visualizerHolder.addComponent(generateNodeData($this, entity, color, collidingBoundIds));\n visualizerHolder.addComponent(new UnserializableEntityComponent());\n visualizerHolder.addComponent(new DisplayNameComponent('ColliderVisualizerNode'));\n visualizerHolder.addComponent(RenderedComponent_instance);\n setParent(visualizerHolder, entity);\n // Inline function 'kotlin.collections.mutableMapOf' call\n var viewerObjects = LinkedHashMap_init_$Create$();\n var tmp;\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(ids.length === 0)) {\n var parent = $this.colliderVisualizer.createParent(visualizerHolder);\n if (parent == null)\n null;\n else {\n parent.registerInputEvents();\n }\n var polyhedronDecorator = generateColliderShapeBounds(Companion_instance_145, visualizerHolder, ids, polyhedron, $this.colliderVisualizer, color, collidingBoundIds);\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = polyhedronDecorator.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityColliderVisualizationSystem.addDecoration.' call\n // Inline function 'kotlin.collections.component1' call\n var id = element.t2();\n // Inline function 'kotlin.collections.component2' call\n var viewerObject = element.u2();\n viewerObject.registerInputEvents();\n viewerObject.setParent(parent);\n // Inline function 'kotlin.collections.set' call\n viewerObjects.r2(id, viewerObject);\n }\n visualizerHolder.addComponent(new ColliderVisualizerViewerObjectsComponent(viewerObjects));\n tmp = parent;\n } else {\n $this.s3u_1.disposeEntity(visualizerHolder);\n tmp = null;\n }\n var viewerObject_0 = tmp;\n if (viewerObject_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.system.EntityColliderVisualizationSystem.addDecoration.' call\n visualizerHolder.addComponent(new ViewerObjectComponent(viewerObject_0));\n }\n }\n function updateDecoration($this, entity, polyhedron, ids, color, collidingBoundIds) {\n removeDecoration($this, entity);\n addDecoration($this, entity, polyhedron, ids, color, collidingBoundIds);\n }\n function findVisualizerHolder($this, entity) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = get_children(entity);\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityColliderVisualizationSystem.findVisualizerHolder.' call\n if (element.hasComponent(Companion_instance_129.id)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n }\n function removeDecoration($this, entity) {\n var holder = findVisualizerHolder($this, entity);\n var tmp1_safe_receiver = holder == null ? null : holder.__getComponentForKotlin(Companion_instance_29.id);\n var viewerObject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.viewerObject;\n if (holder == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n $this.s3u_1.disposeEntity(holder);\n }\n if (viewerObject == null)\n null;\n else {\n viewerObject.deleteObject();\n }\n }\n function componentsChanged($this, entity) {\n var colliderComponent = entity.__getComponentForKotlin(19);\n var visualizationComponent = entity.__getComponentForKotlin(78);\n if (!(visualizationComponent == null) ? !(colliderComponent == null) : false) {\n var tmp0_elvis_lhs = colliderComponent.ids;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp0_elvis_lhs;\n }\n updateDecoration($this, entity, colliderComponent.polyhedron, tmp, visualizationComponent.color, visualizationComponent.collidingBoundIds);\n } else {\n removeDecoration($this, entity);\n }\n }\n function updateColors($this, entity, color, collidingBoundIds) {\n var holder = findVisualizerHolder($this, entity);\n var tmp;\n if (holder == null) {\n tmp = null;\n } else {\n tmp = holder.__getComponentForKotlin(98);\n }\n var tmp1_safe_receiver = tmp;\n var viewerObjects = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.viewerObjets;\n if (viewerObjects == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = viewerObjects.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityColliderVisualizationSystem.updateColors.' call\n // Inline function 'kotlin.collections.component1' call\n var id = element.t2();\n // Inline function 'kotlin.collections.component2' call\n var viewerObject = element.u2();\n if (contains(collidingBoundIds, id)) {\n $this.colliderVisualizer.indicateCollision(viewerObject);\n } else if (!(color == null)) {\n $this.colliderVisualizer.setColor(viewerObject, color);\n }\n }\n }\n }\n function _get_colliderVisualizationNode__i436cf(_this__u8e3s4, $this) {\n return _this__u8e3s4.__getComponentForKotlin(Companion_instance_129.id);\n }\n function Companion_112() {\n this.ID = 'EntityColliderVisualizationSystem';\n }\n protoOf(Companion_112).u1n = function () {\n return this.ID;\n };\n var Companion_instance_145;\n function Companion_getInstance_121() {\n return Companion_instance_145;\n }\n function EntityColliderVisualizationSystem(coreServices, colliderVisualizer) {\n var tmp = Companion_instance_31.id;\n // Inline function 'kotlin.emptyArray' call\n var tmp_0 = [];\n // Inline function 'kotlin.emptyArray' call\n var tmp_1 = [];\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$2 = [];\n SystemBase5.call(this, 'EntityColliderVisualizationSystem', 19, 78, 82, tmp, 123, tmp_0, tmp_1, tmp$ret$2);\n this.coreServices = coreServices;\n this.colliderVisualizer = colliderVisualizer;\n this.s3u_1 = this.coreServices.entityManager;\n this.enable();\n }\n protoOf(EntityColliderVisualizationSystem).k2z = function () {\n return this.coreServices;\n };\n protoOf(EntityColliderVisualizationSystem).t3u = function (_set____db54di) {\n this.colliderVisualizer = _set____db54di;\n };\n protoOf(EntityColliderVisualizationSystem).u3u = function () {\n return this.colliderVisualizer;\n };\n protoOf(EntityColliderVisualizationSystem).onAddComponent3 = function (entity, newComponent) {\n this.refresh();\n };\n protoOf(EntityColliderVisualizationSystem).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n this.refresh();\n };\n protoOf(EntityColliderVisualizationSystem).onRemoveComponent3 = function (entity, oldComponent) {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_hierarchy(_get_sceneManager__lxhb6y_0(this).root);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityColliderVisualizationSystem.onRemoveComponent3.' call\n if (!element.hasComponent(Companion_instance_129.id)) {\n destination.q(element);\n }\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityColliderVisualizationSystem.onRemoveComponent3.' call\n removeDecoration(this, element_0);\n }\n this.refresh();\n };\n protoOf(EntityColliderVisualizationSystem).onAddComponent5 = function (entity, newComponent) {\n var tmp0_safe_receiver = newComponent.entityStateBeforeLoadingSnapshot;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hasComponent(Companion_instance_129.id);\n var wasAColliderVisualizationNode = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;\n if (!wasAColliderVisualizationNode) {\n return Unit_instance;\n }\n var newEntity = newComponent.entity;\n var newData = newEntity == null ? null : newEntity.__getComponentForKotlin(Companion_instance_129.id);\n var entityWasRemoved = newEntity == null;\n var shouldRemoveVisualization = newData == null;\n if (entityWasRemoved ? true : shouldRemoveVisualization) {\n var tmp3_safe_receiver = newComponent.entityStateBeforeLoadingSnapshot;\n var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.getComponent(Companion_instance_29.id);\n var oldParentViewerObject = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.viewerObject;\n if (oldParentViewerObject == null)\n null;\n else {\n oldParentViewerObject.deleteObject();\n }\n }\n };\n protoOf(EntityColliderVisualizationSystem).onUpdateComponent5 = function (entity, oldComponent, newComponent) {\n };\n protoOf(EntityColliderVisualizationSystem).onRemoveComponent5 = function (entity, oldComponent) {\n };\n protoOf(EntityColliderVisualizationSystem).onAddComponent4 = function (entity, newComponent) {\n };\n protoOf(EntityColliderVisualizationSystem).onUpdateComponent4 = function (entity, oldComponent, newComponent) {\n };\n protoOf(EntityColliderVisualizationSystem).onRemoveComponent4 = function (entity, oldComponent) {\n this.refresh();\n };\n protoOf(EntityColliderVisualizationSystem).enable = function () {\n protoOf(SystemBase5).enable.call(this);\n this.refresh();\n };\n protoOf(EntityColliderVisualizationSystem).disable = function () {\n protoOf(SystemBase5).disable.call(this);\n this.refresh();\n };\n protoOf(EntityColliderVisualizationSystem).refresh = function () {\n if (this.isEnabled) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = get_hierarchySequence(_get_sceneManager__lxhb6y_0(this).root).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityColliderVisualizationSystem.refresh.' call\n var colliderVisualizationData = element.__getComponentForKotlin(78);\n var colliderComponent = element.__getComponentForKotlin(19);\n if (!(colliderVisualizationData == null) ? !(colliderComponent == null) : false) {\n if (hasNoVisualization(this, element) ? true : hasNewVisualizationData(this, element, colliderVisualizationData)) {\n var tmp0_elvis_lhs = colliderComponent.ids;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = tmp0_elvis_lhs;\n }\n updateDecoration(this, element, colliderComponent.polyhedron, tmp, colliderVisualizationData.color, colliderVisualizationData.collidingBoundIds);\n }\n } else {\n removeDecoration(this, element);\n }\n }\n } else {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.s3u_1.entities;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element_0 = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityColliderVisualizationSystem.refresh.' call\n if (!element_0.hasComponent(Companion_instance_129.id)) {\n destination.q(element_0);\n }\n }\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityColliderVisualizationSystem.refresh.' call\n removeDecoration(this, element_1);\n }\n }\n };\n protoOf(EntityColliderVisualizationSystem).setVisualizer = function (colliderVisualizer) {\n this.colliderVisualizer = colliderVisualizer;\n };\n protoOf(EntityColliderVisualizationSystem).onAddComponent = function (entity, newComponent) {\n var tmp;\n if (entity.hasComponent(78)) {\n tmp = get_isInScene(entity);\n } else {\n tmp = false;\n }\n if (tmp) {\n componentsChanged(this, entity);\n }\n };\n protoOf(EntityColliderVisualizationSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n var tmp;\n if (entity.hasComponent(78)) {\n tmp = get_isInScene(entity);\n } else {\n tmp = false;\n }\n if (tmp) {\n componentsChanged(this, entity);\n }\n };\n protoOf(EntityColliderVisualizationSystem).onRemoveComponent = function (entity, oldComponent) {\n removeDecoration(this, entity);\n };\n protoOf(EntityColliderVisualizationSystem).onAddComponent2 = function (entity, newComponent) {\n if (get_isInScene(entity)) {\n componentsChanged(this, entity);\n }\n };\n protoOf(EntityColliderVisualizationSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n if (get_isInScene(entity)) {\n updateColors(this, entity, newComponent.color, newComponent.collidingBoundIds);\n }\n };\n protoOf(EntityColliderVisualizationSystem).onRemoveComponent2 = function (entity, oldComponent) {\n removeDecoration(this, entity);\n };\n function Companion_113() {\n this.ID = 4;\n }\n protoOf(Companion_113).u1n = function () {\n return this.ID;\n };\n var Companion_instance_146;\n function Companion_getInstance_122() {\n return Companion_instance_146;\n }\n function CollisionVisualizationSceneDataComponent(data) {\n this.data = data;\n }\n protoOf(CollisionVisualizationSceneDataComponent).v3r = function () {\n return this.data;\n };\n protoOf(CollisionVisualizationSceneDataComponent).x1k = function () {\n return 4;\n };\n protoOf(CollisionVisualizationSceneDataComponent).eq = function (other) {\n return equals(this.data, (other instanceof CollisionVisualizationSceneDataComponent ? other : THROW_CCE()).data);\n };\n function CollisionVisualizationSceneData(collisions, collisionMap) {\n var tmp;\n if (collisions === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = collisions;\n }\n collisions = tmp;\n var tmp_0;\n if (collisionMap === VOID) {\n // Inline function 'kotlin.collections.mapOf' call\n tmp_0 = emptyMap();\n } else {\n tmp_0 = collisionMap;\n }\n collisionMap = tmp_0;\n this.collisions = collisions;\n this.collisionMap = collisionMap;\n }\n protoOf(CollisionVisualizationSceneData).v3u = function (_set____db54di) {\n this.collisions = _set____db54di;\n };\n protoOf(CollisionVisualizationSceneData).z1n = function () {\n return this.collisions;\n };\n protoOf(CollisionVisualizationSceneData).w3u = function (_set____db54di) {\n this.collisionMap = _set____db54di;\n };\n protoOf(CollisionVisualizationSceneData).x3u = function () {\n return this.collisionMap;\n };\n function _get_sceneManager__lxhb6y_1($this) {\n return $this.coreServices.sceneManager;\n }\n function _get_collisionData__2ruset($this) {\n var tmp0_safe_receiver = _get_sceneManager__lxhb6y_1($this).scene.__getComponentForKotlin(4);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.data;\n }\n function detectCollision($this, entity) {\n var tmp0_elvis_lhs = _get_collisionData__2ruset($this);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var data = tmp;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.sequences.any' call\n var tmp0_iterator = get_hierarchySequence(entity).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.detectCollision.' call\n if (element.hasComponent(24)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n if (tmp$ret$1) {\n // Inline function 'kotlin.collections.mutableMapOf' call\n var map = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator_0 = data.collisionMap.q2().t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.detectCollision.' call\n // Inline function 'kotlin.collections.set' call\n var this_0 = map;\n var key = element_0.t2();\n // Inline function 'kotlin.emptyArray' call\n var value = [];\n this_0.r2(key, value);\n }\n foldCollisions($this, collisionsWithoutEntity($this, entity), map);\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.detectCollision.' call\n var entityCollisions = Companion_instance_150.getCollisions(entity, get_hierarchySequence(_get_sceneManager__lxhb6y_1($this).root));\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(entityCollisions.length);\n var inductionVariable = 0;\n var last = entityCollisions.length;\n while (inductionVariable < last) {\n var item = entityCollisions[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.detectCollision..' call\n var tmp$ret$5 = new CollisionVisualizationData(item.penetration, item.otherEntity, item.otherBoundId, item.entity, item.boundId);\n destination.q(tmp$ret$5);\n }\n var newCollisions = plus_0(entityCollisions, destination);\n map = foldCollisions($this, newCollisions, map);\n data.collisionMap = map;\n applyCollisions($this);\n }\n }\n function applyCollisions($this) {\n var tmp0_safe_receiver = _get_sceneManager__lxhb6y_1($this).scene.__getComponentForKotlin(4);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.data;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var data = tmp;\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = data.collisionMap.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.applyCollisions.' call\n addColliderVisualizationComponent($this, element.t2(), element.u2());\n }\n var tmp_0 = data;\n // Inline function 'kotlin.collections.filterValues' call\n var this_0 = data.collisionMap;\n var result = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator_0 = this_0.q2().t();\n while (tmp0_iterator_0.u()) {\n var entry = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.applyCollisions.' call\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(entry.u2().length === 0)) {\n result.r2(entry.t2(), entry.u2());\n }\n }\n tmp_0.collisionMap = result;\n }\n function foldCollisions($this, collisionData, map) {\n // Inline function 'kotlin.collections.fold' call\n var accumulator = map;\n var inductionVariable = 0;\n var last = collisionData.length;\n while (inductionVariable < last) {\n var element = collisionData[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.foldCollisions.' call\n var acc = accumulator;\n // Inline function 'kotlin.collections.set' call\n var key = element.entity;\n var tmp0_safe_receiver = acc.b3(element.entity);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = [element.boundId];\n tmp = tmp0_safe_receiver.concat(tmp$ret$4);\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = [element.boundId];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var value = tmp_0;\n acc.r2(key, value);\n accumulator = acc;\n }\n return accumulator;\n }\n function foldCollisions$default($this, collisionData, map, $super) {\n var tmp;\n if (map === VOID) {\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp = LinkedHashMap_init_$Create$();\n } else {\n tmp = map;\n }\n map = tmp;\n return foldCollisions($this, collisionData, map);\n }\n function collisionsWithoutEntity($this, entity) {\n var tmp0_safe_receiver = _get_collisionData__2ruset($this);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.collisions;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.collisionsWithoutEntity.' call\n if (!element.entity.equals(entity) ? true : !element.otherEntity.equals(entity)) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var tmp2_safe_receiver = tmp;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_0 = copyToArray(tmp2_safe_receiver);\n }\n var tmp3_elvis_lhs = tmp_0;\n var tmp_1;\n if (tmp3_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp3_elvis_lhs;\n }\n return tmp_1;\n }\n function clearCollisions($this) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = get_hierarchySequence(_get_sceneManager__lxhb6y_1($this).root).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.clearCollisions.' call\n var tmp0_safe_receiver = element.__getComponentForKotlin(78);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(tmp0_safe_receiver.collidingBoundIds.length === 0)) {\n element.addComponent(new EntityColliderVisualizationComponent(tmp0_safe_receiver.color));\n tmp = Unit_instance;\n }\n }\n }\n }\n function addColliderVisualizationComponent($this, entity, boundIds) {\n var component = entity.__getComponentForKotlin(78);\n if (component == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.addColliderVisualizationComponent.' call\n entity.addComponent(new EntityColliderVisualizationComponent(component.color, boundIds));\n }\n }\n function Companion_114() {\n this.ID = 'EntityCollisionVisualizationSystem';\n }\n protoOf(Companion_114).u1n = function () {\n return this.ID;\n };\n var Companion_instance_147;\n function Companion_getInstance_123() {\n return Companion_instance_147;\n }\n function EntityCollisionVisualizationSystem(coreServices) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [78];\n // Inline function 'kotlin.emptyArray' call\n var tmp_0 = [];\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$4 = [];\n SystemBase3.call(this, 'EntityCollisionVisualizationSystem', 19, 69, 5, tmp, tmp_0, tmp$ret$4);\n this.coreServices = coreServices;\n this.g3v_1 = this.coreServices.entityManager;\n this.enable();\n }\n protoOf(EntityCollisionVisualizationSystem).k2z = function () {\n return this.coreServices;\n };\n protoOf(EntityCollisionVisualizationSystem).enable = function () {\n protoOf(SystemBase3).enable.call(this);\n _get_sceneManager__lxhb6y_1(this).scene.addComponent(new CollisionVisualizationSceneDataComponent(new CollisionVisualizationSceneData()));\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = get_hierarchySequence(_get_sceneManager__lxhb6y_1(this).root).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.enable.' call\n detectCollision(this, element);\n }\n };\n protoOf(EntityCollisionVisualizationSystem).disable = function () {\n protoOf(SystemBase3).disable.call(this);\n _get_sceneManager__lxhb6y_1(this).scene.removeComponent(4);\n clearCollisions(this);\n };\n protoOf(EntityCollisionVisualizationSystem).getCollisionData = function (entity, boundId) {\n var tmp0_elvis_lhs = _get_collisionData__2ruset(this);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var data = tmp;\n // Inline function 'kotlin.collections.find' call\n var this_0 = data.collisions;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.getCollisionData.' call\n if (element.entity.equals(entity) ? element.boundId === boundId : false) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n };\n protoOf(EntityCollisionVisualizationSystem).onAddComponent = function (entity, newComponent) {\n if (get_isInScene(entity)) {\n detectCollision(this, entity);\n }\n };\n protoOf(EntityCollisionVisualizationSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n if (get_isInScene(entity)) {\n detectCollision(this, entity);\n }\n };\n protoOf(EntityCollisionVisualizationSystem).onRemoveComponent = function (entity, oldComponent) {\n var tmp0_safe_receiver = _get_collisionData__2ruset(this);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.collisions;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.onRemoveComponent.' call\n if (element.otherEntity.equals(entity)) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var tmp2_safe_receiver = tmp;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = tmp2_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.onRemoveComponent.' call\n if (get_isInScene(element_0.entity)) {\n detectCollision(this, element_0.entity);\n }\n }\n }\n };\n protoOf(EntityCollisionVisualizationSystem).onAddComponent2 = function (entity, newComponent) {\n detectCollision(this, newComponent.dragState.draggedRootEntity);\n };\n protoOf(EntityCollisionVisualizationSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n detectCollision(this, newComponent.dragState.draggedRootEntity);\n };\n protoOf(EntityCollisionVisualizationSystem).onRemoveComponent2 = function (entity, oldComponent) {\n detectCollision(this, oldComponent.dragState.draggedRootEntity);\n };\n protoOf(EntityCollisionVisualizationSystem).onAddComponent3 = function (entity, newComponent) {\n if (entity.hasComponent(SceneComponent_instance.id)) {\n entity.addComponent(new CollisionVisualizationSceneDataComponent(new CollisionVisualizationSceneData()));\n return Unit_instance;\n }\n detectCollision(this, entity);\n };\n protoOf(EntityCollisionVisualizationSystem).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n detectCollision(this, entity);\n };\n protoOf(EntityCollisionVisualizationSystem).onRemoveComponent3 = function (entity, oldComponent) {\n var tmp0_safe_receiver = _get_collisionData__2ruset(this);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.collisions;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.onRemoveComponent3.' call\n if (element.otherEntity.equals(entity)) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var tmp2_safe_receiver = tmp;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = tmp2_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityCollisionVisualizationSystem.onRemoveComponent3.' call\n detectCollision(this, element_0.entity);\n }\n }\n };\n function generateConnectorsDecorator($this, entity, connectorVisualizer, offersFilter, demandsFilter, visualizationData) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(11);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.generateConnectorsDecorator.' call\n var filteredConnectors = getFilteredEnabledConnectors(Companion_getInstance_124(), tmp0_safe_receiver.enabledConnectors, offersFilter, demandsFilter);\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = filteredConnectors.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.generateConnectorsDecorator..' call\n var tmp_0;\n if (visualizationData == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.generateConnectorsDecorator...' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = visualizationData.length;\n while (inductionVariable < last) {\n var element_0 = visualizationData[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.generateConnectorsDecorator....' call\n if (element_0.connectorKey === element.key) {\n tmp$ret$1 = element_0;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$1;\n var tmp_1;\n if (tmp0_elvis_lhs == null) {\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_0 = 0;\n var last_0 = visualizationData.length;\n while (inductionVariable_0 < last_0) {\n var element_1 = visualizationData[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.generateConnectorsDecorator....' call\n if (element_1.connectorKey === '') {\n tmp$ret$3 = element_1;\n break $l$block_0;\n }\n }\n tmp$ret$3 = null;\n }\n tmp_1 = tmp$ret$3;\n } else {\n tmp_1 = tmp0_elvis_lhs;\n }\n tmp_0 = tmp_1;\n }\n var data = tmp_0;\n var c = createConnectorViewerObject(Companion_getInstance_124(), entity, connectorVisualizer, element, data);\n var tmp0_safe_receiver_0 = !(c == null) ? to(element.key, c) : null;\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver_0);\n }\n }\n tmp = toMutableMap(toMap(destination));\n }\n var tmp1_elvis_lhs = tmp;\n var map = tmp1_elvis_lhs == null ? emptyMap() : tmp1_elvis_lhs;\n return map;\n }\n function createConnectorViewerObject($this, entity, connectorVisualizer, connector, data) {\n var tmp;\n if (connector instanceof PointConnector) {\n tmp = connectorVisualizer.createPointConnector(entity, connector, connector.transform.position, data);\n } else {\n if (connector instanceof PointSeriesConnector) {\n tmp = connectorVisualizer.createPointSeriesConnector(entity, connector, data);\n } else {\n if (connector instanceof SurfaceConnector) {\n tmp = connectorVisualizer.createSurfaceConnector(entity, connector, data);\n } else {\n if (connector instanceof EdgeConnector) {\n tmp = connectorVisualizer.createEdgeConnector(entity, connector, 10.0, data);\n } else {\n tmp = connectorVisualizer.createUnknown(entity, connector, data);\n }\n }\n }\n }\n var viewerObject = tmp;\n if (viewerObject == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.createConnectorViewerObject.' call\n viewerObject.setVisible(true);\n }\n var tmp2_safe_receiver = connectorVisualizer.createTransform(entity, connector, data);\n if (tmp2_safe_receiver == null)\n null;\n else\n tmp2_safe_receiver.setParent(viewerObject);\n return viewerObject;\n }\n function getFilteredEnabledConnectors($this, enabledConnectors, offersFilter, demandsFilter) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = enabledConnectors.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.getFilteredEnabledConnectors.' call\n var tmp;\n if (offersFilter == null) {\n tmp = true;\n } else {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable = 0;\n var last = offersFilter.length;\n while (inductionVariable < last) {\n var element_0 = offersFilter[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.getFilteredEnabledConnectors..' call\n if (contains(element.offers(), element_0)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n tmp = tmp$ret$1;\n }\n if (tmp) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.getFilteredEnabledConnectors.' call\n var tmp_0;\n if (demandsFilter == null) {\n tmp_0 = true;\n } else {\n var tmp$ret$6;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable_0 = 0;\n var last_0 = demandsFilter.length;\n while (inductionVariable_0 < last_0) {\n var element_2 = demandsFilter[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.getFilteredEnabledConnectors..' call\n if (contains(element_1.demands(), element_2)) {\n tmp$ret$6 = true;\n break $l$block_0;\n }\n }\n tmp$ret$6 = false;\n }\n tmp_0 = tmp$ret$6;\n }\n if (tmp_0) {\n destination_0.q(element_1);\n }\n }\n return destination_0;\n }\n function EntityConnectorVisualizationSystem$Companion$runOnDecoratable$lambda(entity, runner) {\n Companion_getInstance_2();\n var tmp0_safe_receiver = entity.__getComponentForKotlin(11);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.runOnDecoratable..' call\n var tmp0_safe_receiver_0 = entity.__getComponentForKotlin(77);\n var tmp_0;\n if (tmp0_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.system.Companion.runOnDecoratable...' call\n runner(tmp0_safe_receiver, tmp0_safe_receiver_0);\n tmp_0 = entity;\n }\n tmp = tmp_0;\n }\n return tmp;\n }\n function hasNoVisualization_0($this, entity) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = get_children(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityConnectorVisualizationSystem.hasNoVisualization.' call\n if (element.hasComponent(99)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n return !tmp$ret$1;\n }\n function hasNewVisualizationData_0($this, entity, connectorVisualizationData) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstNotNullOfOrNull' call\n var indexedObject = get_children(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityConnectorVisualizationSystem.hasNewVisualizationData.' call\n var result = _get_connectorVisualizationNode__spb9ou(element, $this);\n if (!(result == null)) {\n tmp$ret$1 = result;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var currentVisualizationNodeData = tmp$ret$1;\n var newVisualizationNodeData = generateNodeData_0($this, entity, connectorVisualizationData.data);\n return !newVisualizationNodeData.equals(currentVisualizationNodeData);\n }\n function generateNodeData_0($this, entity, data) {\n return new ConnectorVisualizationNodeComponent(entity, data, $this.s3v_1, $this.t3v_1);\n }\n function addDecoration_0($this, entity, visualizationHolder, data) {\n visualizationHolder.addComponent(generateNodeData_0($this, entity, data));\n visualizationHolder.addComponent(new DisplayNameComponent('ConnectorVisualizerNode'));\n visualizationHolder.addComponent(RenderedComponent_instance);\n visualizationHolder.addComponent(new UnserializableEntityComponent());\n setParent(visualizationHolder, entity);\n // Inline function 'kotlin.collections.mutableMapOf' call\n var viewerObjects = LinkedHashMap_init_$Create$();\n var parent = $this.connectorVisualizer.createParent(visualizationHolder);\n if (parent == null)\n null;\n else {\n parent.registerInputEvents();\n }\n var connectorsDecorator = generateConnectorsDecorator(Companion_getInstance_124(), entity, $this.connectorVisualizer, $this.s3v_1, $this.t3v_1, data);\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = connectorsDecorator.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityConnectorVisualizationSystem.addDecoration.' call\n // Inline function 'kotlin.collections.component1' call\n var id = element.t2();\n // Inline function 'kotlin.collections.component2' call\n var viewerObject = element.u2();\n viewerObject.setParent(parent);\n // Inline function 'kotlin.collections.set' call\n viewerObjects.r2(id, viewerObject);\n }\n visualizationHolder.addComponent(new ConnectorVisualizerViewerObjectsComponent(viewerObjects));\n if (parent == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.system.EntityConnectorVisualizationSystem.addDecoration.' call\n visualizationHolder.addComponent(new ViewerObjectComponent(parent));\n }\n }\n function removeDecoration_0($this, entity) {\n var holder = findVisualizerHolder_0($this, entity);\n var tmp1_safe_receiver = holder == null ? null : holder.__getComponentForKotlin(Companion_instance_29.id);\n var viewerObject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.viewerObject;\n if (holder == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n $this.q3v_1.disposeEntity(holder);\n }\n if (viewerObject == null)\n null;\n else {\n viewerObject.deleteObject();\n }\n }\n function findVisualizerHolder_0($this, entity) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = get_children(entity);\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityConnectorVisualizationSystem.findVisualizerHolder.' call\n if (element.hasComponent(Companion_instance_132.id)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n }\n function updateDecoration_0($this, entity, data) {\n removeDecoration_0($this, entity);\n var visualizerHolder = $this.q3v_1.createEntity();\n addDecoration_0($this, entity, visualizerHolder, data);\n }\n function componentsChanged_0($this, entity) {\n var tmp = Companion_getInstance_124().u3v_1;\n if (tmp(entity, EntityConnectorVisualizationSystem$componentsChanged$lambda($this, entity)) == null) {\n removeDecoration_0($this, entity);\n }\n }\n function Companion_115() {\n Companion_instance_148 = this;\n this.ID = 'EntityConnectorVisualizationSystem';\n var tmp = this;\n tmp.u3v_1 = EntityConnectorVisualizationSystem$Companion$runOnDecoratable$lambda;\n this.v3v_1 = 10.0;\n this.w3v_1 = 5.0;\n }\n protoOf(Companion_115).u1n = function () {\n return this.ID;\n };\n var Companion_instance_148;\n function Companion_getInstance_124() {\n if (Companion_instance_148 == null)\n new Companion_115();\n return Companion_instance_148;\n }\n function _get_connectorVisualizationNode__spb9ou(_this__u8e3s4, $this) {\n return _this__u8e3s4.__getComponentForKotlin(Companion_instance_132.id);\n }\n function EntityConnectorVisualizationSystem$componentsChanged$lambda(this$0, $entity) {\n return function (_anonymous_parameter_0__qggqh8, visualizationComponent) {\n updateDecoration_0(this$0, $entity, visualizationComponent.data);\n return Unit_instance;\n };\n }\n function EntityConnectorVisualizationSystem(coreServices, connectorVisualizer) {\n Companion_getInstance_124();\n var tmp = Companion_instance_31.id;\n // Inline function 'kotlin.emptyArray' call\n var tmp_0 = [];\n // Inline function 'kotlin.emptyArray' call\n var tmp_1 = [];\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$2 = [];\n SystemBase5.call(this, 'EntityConnectorVisualizationSystem', 11, 77, 82, tmp, 123, tmp_0, tmp_1, tmp$ret$2);\n this.coreServices = coreServices;\n this.connectorVisualizer = connectorVisualizer;\n this.q3v_1 = this.coreServices.entityManager;\n this.r3v_1 = this.coreServices.sceneManager;\n this.enable();\n this.s3v_1 = null;\n this.t3v_1 = null;\n }\n protoOf(EntityConnectorVisualizationSystem).k2z = function () {\n return this.coreServices;\n };\n protoOf(EntityConnectorVisualizationSystem).x3v = function (_set____db54di) {\n this.connectorVisualizer = _set____db54di;\n };\n protoOf(EntityConnectorVisualizationSystem).y3v = function () {\n return this.connectorVisualizer;\n };\n protoOf(EntityConnectorVisualizationSystem).onAddComponent3 = function (entity, newComponent) {\n this.refresh();\n };\n protoOf(EntityConnectorVisualizationSystem).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n this.refresh();\n };\n protoOf(EntityConnectorVisualizationSystem).onRemoveComponent3 = function (entity, oldComponent) {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_hierarchy(this.r3v_1.root);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityConnectorVisualizationSystem.onRemoveComponent3.' call\n if (!element.hasComponent(Companion_instance_132.id)) {\n destination.q(element);\n }\n }\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityConnectorVisualizationSystem.onRemoveComponent3.' call\n removeDecoration_0(this, element_0);\n }\n this.refresh();\n };\n protoOf(EntityConnectorVisualizationSystem).onAddComponent5 = function (entity, newComponent) {\n var tmp0_safe_receiver = newComponent.entityStateBeforeLoadingSnapshot;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hasComponent(Companion_instance_132.id);\n var wasAConnectorVisualizationNode = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;\n if (!wasAConnectorVisualizationNode) {\n return Unit_instance;\n }\n var newEntity = newComponent.entity;\n var newData = newEntity == null ? null : newEntity.__getComponentForKotlin(Companion_instance_132.id);\n var entityWasRemoved = newEntity == null;\n var shouldRemoveVisualization = newData == null;\n if (entityWasRemoved ? true : shouldRemoveVisualization) {\n var tmp3_safe_receiver = newComponent.entityStateBeforeLoadingSnapshot;\n var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.getComponent(Companion_instance_29.id);\n var oldParentViewerObject = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.viewerObject;\n if (oldParentViewerObject == null)\n null;\n else {\n oldParentViewerObject.deleteObject();\n }\n }\n };\n protoOf(EntityConnectorVisualizationSystem).onRemoveComponent5 = function (entity, oldComponent) {\n };\n protoOf(EntityConnectorVisualizationSystem).onUpdateComponent5 = function (entity, oldComponent, newComponent) {\n };\n protoOf(EntityConnectorVisualizationSystem).onAddComponent4 = function (entity, newComponent) {\n };\n protoOf(EntityConnectorVisualizationSystem).onUpdateComponent4 = function (entity, oldComponent, newComponent) {\n };\n protoOf(EntityConnectorVisualizationSystem).onRemoveComponent4 = function (entity, oldComponent) {\n this.refresh();\n };\n protoOf(EntityConnectorVisualizationSystem).enable = function () {\n protoOf(SystemBase5).enable.call(this);\n this.refresh();\n };\n protoOf(EntityConnectorVisualizationSystem).disable = function () {\n protoOf(SystemBase5).disable.call(this);\n this.refresh();\n };\n protoOf(EntityConnectorVisualizationSystem).z3v = function (value) {\n this.s3v_1 = value;\n this.refresh();\n };\n protoOf(EntityConnectorVisualizationSystem).w3r = function () {\n return this.s3v_1;\n };\n protoOf(EntityConnectorVisualizationSystem).a3w = function (value) {\n this.t3v_1 = value;\n this.refresh();\n };\n protoOf(EntityConnectorVisualizationSystem).x3r = function () {\n return this.t3v_1;\n };\n protoOf(EntityConnectorVisualizationSystem).refresh = function () {\n if (this.isEnabled) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = get_hierarchySequence(this.r3v_1.root).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityConnectorVisualizationSystem.refresh.' call\n var connectorVisualizationData = element.__getComponentForKotlin(77);\n if (!(connectorVisualizationData == null)) {\n if (hasNoVisualization_0(this, element) ? true : hasNewVisualizationData_0(this, element, connectorVisualizationData)) {\n updateDecoration_0(this, element, connectorVisualizationData.data);\n }\n } else {\n removeDecoration_0(this, element);\n }\n }\n } else {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.q3v_1.entities;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element_0 = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.EntityConnectorVisualizationSystem.refresh.' call\n if (!element_0.hasComponent(Companion_instance_132.id)) {\n destination.q(element_0);\n }\n }\n var tmp0_iterator_0 = destination.t();\n while (tmp0_iterator_0.u()) {\n var element_1 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.stl.visualization.system.EntityConnectorVisualizationSystem.refresh.' call\n removeDecoration_0(this, element_1);\n }\n }\n };\n protoOf(EntityConnectorVisualizationSystem).setVisualizer = function (connectorVisualizer) {\n this.connectorVisualizer = connectorVisualizer;\n this.refresh();\n };\n protoOf(EntityConnectorVisualizationSystem).onAddComponent = function (entity, newComponent) {\n if (entity.hasComponent(77)) {\n componentsChanged_0(this, entity);\n }\n };\n protoOf(EntityConnectorVisualizationSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n if (entity.hasComponent(77)) {\n componentsChanged_0(this, entity);\n }\n };\n protoOf(EntityConnectorVisualizationSystem).onRemoveComponent = function (entity, oldComponent) {\n removeDecoration_0(this, entity);\n };\n protoOf(EntityConnectorVisualizationSystem).onAddComponent2 = function (entity, newComponent) {\n if (get_isInScene(entity)) {\n componentsChanged_0(this, entity);\n }\n };\n protoOf(EntityConnectorVisualizationSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n if (newComponent.data == null) {\n removeDecoration_0(this, entity);\n } else {\n if (get_isInScene(entity)) {\n updateDecoration_0(this, entity, newComponent.data);\n }\n }\n };\n protoOf(EntityConnectorVisualizationSystem).onRemoveComponent2 = function (entity, oldComponent) {\n removeDecoration_0(this, entity);\n };\n function addConfigComponentToEntities($this, newComponent, oldComponent) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp = get_hierarchySequence($this.coreServices.sceneManager.root);\n var tmp0_iterator = filter(tmp, ForcedComponentBaseSystem$addConfigComponentToEntities$lambda($this)).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.system.ForcedComponentBaseSystem.addConfigComponentToEntities.' call\n var tmp0_safe_receiver = element.__getComponentForKotlin($this.componentId);\n var tmp_0;\n if (tmp0_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_1;\n if (equals(tmp0_safe_receiver, oldComponent)) {\n element.addComponent(newComponent);\n tmp_1 = Unit_instance;\n }\n tmp_0 = Unit_instance;\n }\n if (tmp_0 == null)\n element.addComponent(newComponent);\n }\n }\n function addConfigComponentToEntities$default($this, newComponent, oldComponent, $super) {\n oldComponent = oldComponent === VOID ? null : oldComponent;\n return addConfigComponentToEntities($this, newComponent, oldComponent);\n }\n function removeConfigComponentFromEntities($this, configComponent) {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = $this.coreServices.entityManager.entities;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.system.ForcedComponentBaseSystem.removeConfigComponentFromEntities.' call\n if (!element.equals($this.configEntity) ? !element.isDisposed : false) {\n removeConfigComponentFromEntity($this, element, configComponent);\n }\n }\n }\n function removeConfigComponentFromEntities$default($this, configComponent, $super) {\n configComponent = configComponent === VOID ? null : configComponent;\n return removeConfigComponentFromEntities($this, configComponent);\n }\n function removeConfigComponentFromEntity($this, entity, configComponent) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin($this.componentId);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n if (equals(tmp0_safe_receiver, configComponent)) {\n entity.removeComponent($this.componentId);\n tmp = Unit_instance;\n }\n }\n }\n function removeConfigComponentFromEntity$default($this, entity, configComponent, $super) {\n configComponent = configComponent === VOID ? null : configComponent;\n return removeConfigComponentFromEntity($this, entity, configComponent);\n }\n function refreshComponentOnEntity($this, entity) {\n if ($this.isEnabled) {\n if (!$this.isLoading ? $this.entityIsEligibleForComponent(entity) : false) {\n entity.addComponent($this.getForcedComponentConfigUnsafe($this.componentId));\n }\n } else {\n removeConfigComponentFromEntity($this, entity, $this.getForcedComponentConfigUnsafe($this.componentId));\n }\n }\n function ForcedComponentBaseSystem$addConfigComponentToEntities$lambda(this$0) {\n return function (it) {\n return this$0.entityIsEligibleForComponent(it);\n };\n }\n function ForcedComponentBaseSystem(id, componentId, forcedComponent, coreServices) {\n var tmp = InSceneComponent_instance.id;\n var tmp_0 = SceneReloadingComponent_instance.id;\n SystemBase4.call(this, id, componentId, tmp, tmp_0, 123);\n this.coreServices = coreServices;\n this.configEntity = this.coreServices.entityManager.createEntity();\n this.isLoading = false;\n this.configEntity.addComponent(forcedComponent);\n this.configEntity.addComponent(new DisplayNameComponent('ForcedComponentConfigEntity-Component:' + componentId));\n }\n protoOf(ForcedComponentBaseSystem).k2z = function () {\n return this.coreServices;\n };\n protoOf(ForcedComponentBaseSystem).o3t = function () {\n return this.configEntity;\n };\n protoOf(ForcedComponentBaseSystem).p3t = function (_set____db54di) {\n this.isLoading = _set____db54di;\n };\n protoOf(ForcedComponentBaseSystem).q3t = function () {\n return this.isLoading;\n };\n protoOf(ForcedComponentBaseSystem).enable = function () {\n protoOf(SystemBase4).enable.call(this);\n if (this.isLoading)\n return Unit_instance;\n addConfigComponentToEntities$default(this, this.getForcedComponentConfigUnsafe(this.componentId));\n };\n protoOf(ForcedComponentBaseSystem).disable = function () {\n protoOf(SystemBase4).disable.call(this);\n removeConfigComponentFromEntities(this, this.getForcedComponentConfigUnsafe(this.componentId));\n };\n protoOf(ForcedComponentBaseSystem).setConfigComponent = function (configComponent) {\n var oldComponent = this.configEntity.getComponentUnsafe(this.componentId);\n if (!equals(oldComponent, configComponent)) {\n this.configEntity.addComponent(configComponent);\n if (this.isEnabled) {\n removeConfigComponentFromEntities$default(this);\n addConfigComponentToEntities(this, configComponent, oldComponent);\n }\n }\n };\n protoOf(ForcedComponentBaseSystem).onAddComponent2 = function (entity, newComponent) {\n refreshComponentOnEntity(this, entity);\n };\n protoOf(ForcedComponentBaseSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n };\n protoOf(ForcedComponentBaseSystem).onRemoveComponent2 = function (entity, oldComponent) {\n };\n protoOf(ForcedComponentBaseSystem).onAddComponent3 = function (entity, newComponent) {\n this.isLoading = true;\n };\n protoOf(ForcedComponentBaseSystem).onRemoveComponent3 = function (entity, oldComponent) {\n this.isLoading = false;\n if (this.isEnabled) {\n this.enable();\n }\n };\n protoOf(ForcedComponentBaseSystem).onUpdateComponent3 = function (entity, oldComponent, newComponent) {\n };\n protoOf(ForcedComponentBaseSystem).onAddComponent4 = function (entity, newComponent) {\n if (!this.isEnabled)\n return Unit_instance;\n var tmp0_elvis_lhs = newComponent.entity;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var newEntity = tmp;\n var isNew = newComponent.entityStateBeforeLoadingSnapshot == null;\n if (isNew ? this.entityIsEligibleForComponent(entity) : false) {\n newEntity.addComponentInternal(this.getForcedComponentConfigUnsafe(this.componentId));\n }\n };\n protoOf(ForcedComponentBaseSystem).onUpdateComponent4 = function (entity, oldComponent, newComponent) {\n };\n protoOf(ForcedComponentBaseSystem).onRemoveComponent4 = function (entity, oldComponent) {\n };\n protoOf(ForcedComponentBaseSystem).onAddComponent = function (entity, newComponent) {\n };\n protoOf(ForcedComponentBaseSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(ForcedComponentBaseSystem).onRemoveComponent = function (entity, oldComponent) {\n var configComponent = this.getForcedComponentConfigUnsafe(this.componentId);\n if (!equals(oldComponent, configComponent) ? this.isEnabled : false) {\n entity.addComponent(configComponent);\n }\n };\n protoOf(ForcedComponentBaseSystem).getForcedComponentConfigUnsafe = function (componentId) {\n var component = this.configEntity.__getComponentForKotlin(componentId);\n var tmp;\n if (component == null) {\n throw Exception_init_$Create$('Config entity missing forced component ' + componentId);\n } else {\n tmp = component;\n }\n return tmp;\n };\n function ColliderVisualizer() {\n }\n function CollisionVisualizationData(penetration, entity, boundId, otherEntity, otherBoundId) {\n this.penetration = penetration;\n this.entity = entity;\n this.boundId = boundId;\n this.otherEntity = otherEntity;\n this.otherBoundId = otherBoundId;\n this.h3v_1 = 0;\n }\n protoOf(CollisionVisualizationData).h3a = function () {\n return this.penetration;\n };\n protoOf(CollisionVisualizationData).r23 = function () {\n return this.entity;\n };\n protoOf(CollisionVisualizationData).c3w = function () {\n return this.boundId;\n };\n protoOf(CollisionVisualizationData).f3a = function () {\n return this.otherEntity;\n };\n protoOf(CollisionVisualizationData).d3w = function () {\n return this.otherBoundId;\n };\n protoOf(CollisionVisualizationData).equals = function (other) {\n if (other === this)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof CollisionVisualizationData))\n THROW_CCE();\n if (!(other.entity.id === this.entity.id))\n return false;\n if (!(other.boundId === this.boundId))\n return false;\n if (!(other.otherEntity.id === this.otherEntity.id))\n return false;\n if (!(other.otherBoundId === this.otherBoundId))\n return false;\n return true;\n };\n protoOf(CollisionVisualizationData).hashCode = function () {\n if (this.h3v_1 === 0) {\n this.h3v_1 = this.entity.hashCode() + this.penetration.hashCode() | 0;\n }\n return this.h3v_1;\n };\n protoOf(CollisionVisualizationData).af = function () {\n return this.penetration;\n };\n protoOf(CollisionVisualizationData).bf = function () {\n return this.entity;\n };\n protoOf(CollisionVisualizationData).g1k = function () {\n return this.boundId;\n };\n protoOf(CollisionVisualizationData).h1k = function () {\n return this.otherEntity;\n };\n protoOf(CollisionVisualizationData).i1k = function () {\n return this.otherBoundId;\n };\n protoOf(CollisionVisualizationData).e3w = function (penetration, entity, boundId, otherEntity, otherBoundId) {\n return new CollisionVisualizationData(penetration, entity, boundId, otherEntity, otherBoundId);\n };\n protoOf(CollisionVisualizationData).copy = function (penetration, entity, boundId, otherEntity, otherBoundId, $super) {\n penetration = penetration === VOID ? this.penetration : penetration;\n entity = entity === VOID ? this.entity : entity;\n boundId = boundId === VOID ? this.boundId : boundId;\n otherEntity = otherEntity === VOID ? this.otherEntity : otherEntity;\n otherBoundId = otherBoundId === VOID ? this.otherBoundId : otherBoundId;\n return this.e3w(penetration, entity, boundId, otherEntity, otherBoundId);\n };\n protoOf(CollisionVisualizationData).toString = function () {\n return 'CollisionVisualizationData(penetration=' + this.penetration + ', entity=' + this.entity + ', boundId=' + this.boundId + ', otherEntity=' + this.otherEntity + ', otherBoundId=' + this.otherBoundId + ')';\n };\n function Color(color, r, g, b) {\n this.color = color;\n this.r = r;\n this.g = g;\n this.b = b;\n this.h3s_1 = 0;\n }\n protoOf(Color).h23 = function () {\n return this.color;\n };\n protoOf(Color).k3b = function () {\n return this.r;\n };\n protoOf(Color).l3b = function () {\n return this.g;\n };\n protoOf(Color).m3b = function () {\n return this.b;\n };\n protoOf(Color).equals = function (other) {\n if (!(other instanceof Color))\n return false;\n return other.color === this.color;\n };\n protoOf(Color).hashCode = function () {\n if (this.h3s_1 === 0)\n this.h3s_1 = getStringHashCode(this.color);\n return this.h3s_1;\n };\n protoOf(Color).af = function () {\n return this.color;\n };\n protoOf(Color).bf = function () {\n return this.r;\n };\n protoOf(Color).g1k = function () {\n return this.g;\n };\n protoOf(Color).h1k = function () {\n return this.b;\n };\n protoOf(Color).f3w = function (color, r, g, b) {\n return new Color(color, r, g, b);\n };\n protoOf(Color).copy = function (color, r, g, b, $super) {\n color = color === VOID ? this.color : color;\n r = r === VOID ? this.r : r;\n g = g === VOID ? this.g : g;\n b = b === VOID ? this.b : b;\n return this.f3w(color, r, g, b);\n };\n protoOf(Color).toString = function () {\n return 'Color(color=' + this.color + ', r=' + this.r + ', g=' + this.g + ', b=' + this.b + ')';\n };\n function ConnectorVisualizer() {\n }\n function setBaseColor($this, viewerObject) {\n var green = 0.5 + Default_getInstance().bh(0.0, 0.5);\n return viewerObject.setBaseColor(0.0, green, 0.0);\n }\n function setCollideColor($this, viewerObject) {\n var red = 0.5 + Default_getInstance().bh(0.0, 0.5);\n return viewerObject.setBaseColor(red, 0.0, 0.0);\n }\n function setTransparency_0($this, viewerObject) {\n return viewerObject.setTransparency(0.8);\n }\n function getColorSeed($this, connector) {\n var seed = 0;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = connector.tags();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.getColorSeed.' call\n seed = seed + getStringHashCode(element) | 0;\n }\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = connector.offers();\n var inductionVariable_0 = 0;\n var last_0 = indexedObject_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.getColorSeed.' call\n seed = seed + getStringHashCode(element_0) | 0;\n }\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_1 = connector.demands();\n var inductionVariable_1 = 0;\n var last_1 = indexedObject_1.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = indexedObject_1[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.getColorSeed.' call\n seed = seed + getStringHashCode(element_1) | 0;\n }\n return seed;\n }\n function createCube($this, size, color, transparent, position, viewer) {\n return createBox($this, size, size, size, color, transparent, position, viewer);\n }\n function createCube$default($this, size, color, transparent, position, viewer, $super) {\n transparent = transparent === VOID ? false : transparent;\n return createCube($this, size, color, transparent, position, viewer);\n }\n function createBox($this, width, height, depth, color, transparent, position, viewer) {\n return setRandomColor(viewer.createBox(width, height, depth).setPosition(position), color, transparent);\n }\n function createBox$default($this, width, height, depth, color, transparent, position, viewer, $super) {\n transparent = transparent === VOID ? false : transparent;\n return createBox($this, width, height, depth, color, transparent, position, viewer);\n }\n function createLine($this, p1, p2, thickness, color, viewer) {\n var line = p2.minus(p1);\n var center = p2.plus(p1).__divIntForKotlin(2);\n var length = line.size;\n var rotation = (new Vector(length, 0.0, 0.0)).getRotationTo(line);\n return setRandomColor(viewer.createBox(length, thickness, thickness).setPosition(center).setRotation(rotation), color, false);\n }\n function createSphere($this, radius, color, transparent, position, viewer) {\n return setRandomColor(viewer.createSphere(radius).setPosition(position), color, transparent);\n }\n function createSphere$default($this, radius, color, transparent, position, viewer, $super) {\n transparent = transparent === VOID ? false : transparent;\n return createSphere($this, radius, color, transparent, position, viewer);\n }\n function Companion_116() {\n Companion_instance_149 = this;\n this.g3w_1 = LoggerState_getInstance().m1m('DefaultVisualizer');\n this.pointConnectorSize = 40.0;\n this.subConnectorSize = 10.0;\n this.colorRandomizationAmount = 0.5;\n this.alpha = 0.8;\n }\n protoOf(Companion_116).h3w = function () {\n return this.pointConnectorSize;\n };\n protoOf(Companion_116).i3w = function () {\n return this.subConnectorSize;\n };\n protoOf(Companion_116).u3s = function () {\n return this.colorRandomizationAmount;\n };\n protoOf(Companion_116).s3s = function () {\n return this.alpha;\n };\n var Companion_instance_149;\n function Companion_getInstance_125() {\n if (Companion_instance_149 == null)\n new Companion_116();\n return Companion_instance_149;\n }\n function DefaultVisualizer$defaultOnConnectorClick$lambda(_anonymous_parameter_0__qggqh8, connector) {\n println(connector.key);\n return Unit_instance;\n }\n function DefaultVisualizer$createPointConnector$lambda(this$0, $entity, $connector) {\n return function () {\n this$0.m3w_1($entity, $connector);\n return Unit_instance;\n };\n }\n function DefaultVisualizer$createUnknown$lambda() {\n return 'Unknown connector implementation, unable to visualize';\n }\n function DefaultVisualizer(coreServices, transformModel) {\n Companion_getInstance_125();\n this.j3w_1 = coreServices;\n this.k3w_1 = transformModel;\n var tmp = this;\n tmp.l3w_1 = DefaultVisualizer$defaultOnConnectorClick$lambda;\n this.m3w_1 = this.l3w_1;\n }\n protoOf(DefaultVisualizer).l2j = function () {\n return this.j3w_1.coreModules.viewer();\n };\n protoOf(DefaultVisualizer).setOnConnectorClick = function (onClick) {\n var tmp = this;\n tmp.m3w_1 = onClick == null ? this.l3w_1 : onClick;\n };\n protoOf(DefaultVisualizer).createParent = function (entity) {\n var tmp0_safe_receiver = this.viewer;\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.createEmpty();\n };\n protoOf(DefaultVisualizer).createPlaceHolderModel = function (entity, entityManager) {\n var tmp0_safe_receiver = this.viewer;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.DefaultVisualizer.createPlaceHolderModel.' call\n var placeholder = tmp0_safe_receiver.createSphere(0.02, entity);\n var tmp0_safe_receiver_0 = entity.__getComponentForKotlin(6);\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.DefaultVisualizer.createPlaceHolderModel..' call\n placeholder.setRotation(tmp0_safe_receiver_0.transform.rotation);\n placeholder.setPosition(tmp0_safe_receiver_0.transform.position);\n var tmp0_safe_receiver_1 = get_viewerObject(entity);\n if (tmp0_safe_receiver_1 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.DefaultVisualizer.createPlaceHolderModel...' call\n placeholder.setScaleV(tmp0_safe_receiver_1.getScale());\n }\n }\n tmp = placeholder;\n }\n return tmp;\n };\n protoOf(DefaultVisualizer).createDecoratorModel = function (entity, entityManager) {\n var tmp0_safe_receiver = this.viewer;\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.createSphere(0.02, entity);\n };\n protoOf(DefaultVisualizer).b3w = function (entity, polyhedron, color, collides, collisionData) {\n var vertices = polyhedron.vertices;\n // Inline function 'kotlin.collections.map' call\n var this_0 = polyhedron.faces;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.visualizer.DefaultVisualizer.createColliderVisualization.' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_1 = item.indices;\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(this_1.length);\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var item_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.visualizer.DefaultVisualizer.createColliderVisualization..' call\n var tmp$ret$0 = vertices[item_0];\n destination_0.q(tmp$ret$0);\n }\n var tmp$ret$4 = copyToArray(destination_0);\n destination.q(tmp$ret$4);\n }\n var faces = destination;\n var tmp0_safe_receiver = this.viewer;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.DefaultVisualizer.createColliderVisualization.' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(faces, 10));\n var tmp0_iterator = faces.t();\n while (tmp0_iterator.u()) {\n var item_1 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.stl.visualization.visualizer.DefaultVisualizer.createColliderVisualization..' call\n var normal = PolyhedronUtils_getInstance().surfaceNormal(item_1);\n var viewerObject = tmp0_safe_receiver.createSurface(item_1, normal, entity);\n if (collides) {\n setCollideColor(Companion_getInstance_125(), viewerObject);\n } else {\n if (!(color == null)) {\n viewerObject.setBaseColor(color.r, color.g, color.b);\n } else {\n setBaseColor(Companion_getInstance_125(), viewerObject);\n }\n }\n setTransparency_0(Companion_getInstance_125(), viewerObject);\n destination_1.q(viewerObject);\n }\n var viewerObjects = destination_1;\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$10 = copyToArray(viewerObjects);\n var colliderVis = tmp0_safe_receiver.groupMeshes(tmp$ret$10, entity);\n tmp = colliderVis;\n }\n return tmp;\n };\n protoOf(DefaultVisualizer).setColor = function (bound, color) {\n bound.setBaseColor(color.r, color.g, color.b);\n };\n protoOf(DefaultVisualizer).indicateCollision = function (bound) {\n setCollideColor(Companion_getInstance_125(), bound);\n };\n protoOf(DefaultVisualizer).createColliderGroupParent = function (entity, polyhedron) {\n var tmp0_safe_receiver = this.viewer;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp0_safe_receiver.createSphere(0.001);\n }\n return tmp;\n };\n protoOf(DefaultVisualizer).createPointConnector = function (entity, connector, position, data) {\n var tmp0_safe_receiver = this.viewer;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.DefaultVisualizer.createPointConnector.' call\n var tmp_0;\n if (data == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.DefaultVisualizer.createPointConnector..' call\n var tmp_1;\n if (data.visible) {\n var tmp0_subject = connector.c20_1;\n var tmp_2;\n if (tmp0_subject === 1) {\n tmp_2 = createCube(Companion_getInstance_125(), 40.0, 1, false, position, tmp0_safe_receiver);\n } else {\n if (tmp0_subject === 0) {\n tmp_2 = createCube(Companion_getInstance_125(), 40.0, 1, false, position, tmp0_safe_receiver).setRotation(Companion_getInstance_6().fromEulerDegrees(new Degrees(35.264), VOID, new Degrees(45.0)));\n } else {\n tmp_2 = createSphere(Companion_getInstance_125(), 20.0, 1, false, position, tmp0_safe_receiver);\n }\n }\n var box = tmp_2;\n if (data.selected) {\n box.setBaseColor(1.0, 0.0, 0.0);\n } else {\n setRandomColor(box, getColorSeed(Companion_getInstance_125(), connector), false);\n }\n box.makeClickable(DefaultVisualizer$createPointConnector$lambda(this, entity, connector));\n var tmp_3;\n if (data.showActivationDistance) {\n // Inline function 'kotlin.takeIf' call\n var this_0 = connector.f20_1;\n // Inline function 'kotlin.contracts.contract' call\n var tmp_4;\n // Inline function 'com.ikea.core.stl.visualization.visualizer.DefaultVisualizer.createPointConnector...' call\n if (this_0 > 0.0) {\n tmp_4 = this_0;\n } else {\n tmp_4 = null;\n }\n var tmp1_safe_receiver = tmp_4;\n var tmp_5;\n if (tmp1_safe_receiver == null) {\n tmp_5 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var sphere = createSphere(Companion_getInstance_125(), tmp1_safe_receiver, 1, true, position, tmp0_safe_receiver);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = [box, sphere];\n return tmp0_safe_receiver.groupMeshes(tmp$ret$4);\n }\n tmp_3 = tmp_5;\n } else {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$8 = [box];\n return tmp0_safe_receiver.groupMeshes(tmp$ret$8);\n }\n tmp_1 = tmp_3;\n } else {\n return null;\n }\n tmp_0 = tmp_1;\n }\n var tmp1_elvis_lhs = tmp_0;\n tmp = tmp1_elvis_lhs == null ? createCube(Companion_getInstance_125(), 40.0, 1, false, position, tmp0_safe_receiver) : tmp1_elvis_lhs;\n }\n return tmp;\n };\n protoOf(DefaultVisualizer).createPointSeriesConnector = function (entity, connector, data) {\n var tmp0_safe_receiver = this.viewer;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0 = 0;\n var tmp_1 = connector.subConnectorCount;\n // Inline function 'kotlin.arrayOfNulls' call\n var tmp_2 = fillArrayVal(Array(tmp_1), null);\n while (tmp_0 < tmp_1) {\n var tmp_3 = tmp_0;\n tmp_2[tmp_3] = createCube(Companion_getInstance_125(), 10.0, 1, false, connector.getSubConnectorPosition(tmp_3), tmp0_safe_receiver).setBaseColor(1.0, 1.0, 0.0);\n tmp_0 = tmp_0 + 1 | 0;\n }\n var subConnectors = tmp_2;\n return tmp0_safe_receiver.groupMeshes(subConnectors);\n }\n return tmp;\n };\n protoOf(DefaultVisualizer).createSurfaceConnector = function (entity, connector, data) {\n var tmp0_safe_receiver = this.viewer;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var viewerObj = tmp0_safe_receiver.createSurface(connector.vertices, connector.normal, entity);\n return viewerObj;\n }\n return tmp;\n };\n protoOf(DefaultVisualizer).createEdgeConnector = function (entity, connector, thickness, data) {\n var tmp0_safe_receiver = this.viewer;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var colorSeed = getColorSeed(Companion_getInstance_125(), connector);\n return createLine(Companion_getInstance_125(), connector.p1, connector.p2, thickness, colorSeed, tmp0_safe_receiver);\n }\n return tmp;\n };\n protoOf(DefaultVisualizer).createUnknown = function (entity, connector, data) {\n var tmp0_safe_receiver = this.viewer;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0 = Companion_getInstance_125().g3w_1;\n tmp_0.debug(DefaultVisualizer$createUnknown$lambda);\n return tmp0_safe_receiver.createEmpty();\n }\n return tmp;\n };\n protoOf(DefaultVisualizer).createTransform = function (entity, connector, data) {\n var tmp;\n var tmp_0;\n if ((data == null ? null : data.showTransform) === true) {\n tmp_0 = !(this.k3w_1 == null);\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n var tmp3_safe_receiver = this.viewer;\n var tmp_1;\n if (tmp3_safe_receiver == null) {\n tmp_1 = null;\n } else {\n var tmp1_elvis_lhs = this.k3w_1.modelUrl;\n var tmp_2 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;\n var tmp2_elvis_lhs = this.k3w_1.texture;\n tmp_1 = tmp3_safe_receiver.loadModel(null, tmp_2, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs, null, null);\n }\n var viewerObject = tmp_1;\n if (viewerObject == null)\n null;\n else\n viewerObject.setRotation(connector.transform.rotation);\n tmp = viewerObject;\n } else {\n tmp = null;\n }\n return tmp;\n };\n function setRandomColor(_this__u8e3s4, seed, transparent) {\n var random = Random(seed);\n if (transparent) {\n _this__u8e3s4.setTransparency(0.25);\n }\n return _this__u8e3s4.setBaseColor(random.zg(), random.zg(), random.zg());\n }\n function Visualizer() {\n }\n function getCollisionsForEntity($this, entity, root) {\n var collisions = getWorldCollision($this, entity, root);\n return flatten_0(toList_1(mapNotNull(collisions, VisualizerUtils$Companion$getCollisionsForEntity$lambda(entity))));\n }\n function getWorldCollision($this, entity, root) {\n var tmp0_safe_receiver = get_collider(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.getWorldCollision.' call\n tmp = mapNotNull(root, VisualizerUtils$Companion$getWorldCollision$lambda(tmp1_safe_receiver));\n }\n var tmp2_elvis_lhs = tmp;\n return tmp2_elvis_lhs == null ? emptySequence() : tmp2_elvis_lhs;\n }\n function getBoundCollisions($this, entity, otherEntity, collisionPairs, otherCollisionPairs) {\n // Inline function 'kotlin.collections.mapIndexed' call\n var this_0 = collisionPairs.ye_1;\n // Inline function 'kotlin.collections.mapIndexedTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var index = 0;\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.getBoundCollisions.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n // Inline function 'kotlin.collections.mapIndexedNotNull' call\n // Inline function 'kotlin.collections.mapIndexedNotNullTo' call\n var this_1 = otherCollisionPairs.ye_1;\n var destination_0 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index_0 = 0;\n var inductionVariable_0 = 0;\n var last_0 = this_1.length;\n while (inductionVariable_0 < last_0) {\n var item_0 = this_1[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'kotlin.collections.mapIndexedNotNullTo.' call\n var tmp1_0 = index_0;\n index_0 = tmp1_0 + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.getBoundCollisions..' call\n var tmp0_safe_receiver = item_0.penetration(item);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.getBoundCollisions...' call\n tmp = !(entity.id === otherEntity.id) ? new CollisionVisualizationData(tmp0_safe_receiver, entity, collisionPairs.ze_1[tmp1], otherEntity, otherCollisionPairs.ze_1[tmp1_0]) : null;\n }\n var tmp0_safe_receiver_0 = tmp;\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_0.q(tmp0_safe_receiver_0);\n }\n }\n destination.q(destination_0);\n }\n return flatten_0(destination);\n }\n function createWorldColliderShapePairs($this, entity) {\n var tmp0_safe_receiver = get_colliderShapeComponent(entity);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.createWorldColliderShapePairs.' call\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.createWorldColliderShapePairs..' call\n var worldTransform = get_worldTransform(entity);\n var tmp0_safe_receiver_0 = tmp0_safe_receiver.ids;\n var tmp_0;\n if (tmp0_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.createWorldColliderShapePairs...' call\n var tmp_1 = tmp0_safe_receiver.polyhedron;\n var tmp0_safe_receiver_1 = tmp_1 instanceof PolyhedronGroup ? tmp_1 : null;\n var tmp_2;\n if (tmp0_safe_receiver_1 == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.createWorldColliderShapePairs....' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = tmp0_safe_receiver_1.polyhedra;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.createWorldColliderShapePairs.....' call\n var tmp$ret$0 = item.transform(worldTransform);\n destination.q(tmp$ret$0);\n }\n var tmp$ret$3 = copyToArray(destination);\n tmp_2 = new Pair(tmp$ret$3, tmp0_safe_receiver_0);\n }\n var tmp1_elvis_lhs = tmp_2;\n var tmp_3;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$8 = [tmp0_safe_receiver.polyhedron.transform(worldTransform)];\n tmp_3 = new Pair(tmp$ret$8, tmp0_safe_receiver_0);\n } else {\n tmp_3 = tmp1_elvis_lhs;\n }\n tmp_0 = tmp_3;\n }\n tmp = tmp_0;\n }\n return tmp;\n }\n function VisualizerUtils$Companion$getCollisions$lambda($root) {\n return function (child) {\n return getCollisionsForEntity(Companion_instance_150, child, $root);\n };\n }\n function VisualizerUtils$Companion$getCollisionsForEntity$lambda($entity) {\n return function (other) {\n var tmp0_safe_receiver = createWorldColliderShapePairs(Companion_instance_150, $entity);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.getCollisionsForEntity..' call\n var tmp0_safe_receiver_0 = createWorldColliderShapePairs(Companion_instance_150, other);\n var tmp_0;\n if (tmp0_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.getCollisionsForEntity...' call\n tmp_0 = getBoundCollisions(Companion_instance_150, $entity, other, tmp0_safe_receiver, tmp0_safe_receiver_0);\n }\n tmp = tmp_0;\n }\n return tmp;\n };\n }\n function VisualizerUtils$Companion$getWorldCollision$lambda($worldPolyhedron) {\n return function (other) {\n var tmp0_safe_receiver = get_collider(other);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.getWorldCollision...' call\n var tmp_0;\n if (tmp1_safe_receiver.penetration($worldPolyhedron) == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.stl.visualization.visualizer.Companion.getWorldCollision....' call\n tmp_0 = other;\n }\n tmp = tmp_0;\n }\n return tmp;\n };\n }\n function Companion_117() {\n }\n protoOf(Companion_117).getCollisions = function (entity, root) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = get_hierarchySequence(entity);\n var this_0 = flatten_0(toList_1(map(tmp, VisualizerUtils$Companion$getCollisions$lambda(root))));\n return copyToArray(this_0);\n };\n var Companion_instance_150;\n function Companion_getInstance_126() {\n return Companion_instance_150;\n }\n function VisualizerUtils() {\n }\n function componentName(componentId) {\n var tmp = Object.keys(ComponentIds).find(function (id) {\n return ComponentIds[id] === componentId;\n }) || 'unknown';\n var name = (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE();\n if (endsWith(name, '_ID')) {\n // Inline function 'kotlin.text.substring' call\n var this_0 = name;\n var endIndex = name.length - 3 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n name = this_0.substring(0, endIndex);\n }\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n return name.toLowerCase() + ' (' + componentId + ')';\n }\n //region block: post-declaration\n protoOf(AlignmentConnectionsComponent).z1k = get_serializable;\n protoOf(AlignmentConnectionsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AlignmentConnectionsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AlignmentConnectionsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AlignmentConnectionsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(HandleUnderAlignmentComponent).z1k = get_serializable;\n protoOf(HandleUnderAlignmentComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(HandleUnderAlignmentComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(HandleUnderAlignmentComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(HandleUnderAlignmentComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(RoomAlignmentEdgesComponent).z1k = get_serializable;\n protoOf(RoomAlignmentEdgesComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(RoomAlignmentEdgesComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(RoomAlignmentEdgesComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(RoomAlignmentEdgesComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(AllowedDoorPairsComponent).z1k = get_serializable;\n protoOf(AllowedDoorPairsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AllowedDoorPairsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AllowedDoorPairsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AllowedDoorPairsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(PointSeriesAssemblyInstructionImpl), 'host', function () {\n return this.i2q();\n });\n defineProp(protoOf(PointSeriesAssemblyInstructionImpl), 'guest', function () {\n return this.j2q();\n });\n defineProp(protoOf(PointSeriesAssemblyInstructionImpl), 'guestConnectionRoot', function () {\n return this.t1v();\n });\n defineProp(protoOf(PointSeriesAssemblyInstructionImpl), 'holeNumber', function () {\n return this.s2y();\n });\n defineProp(protoOf(PointSeriesAssemblyInstructionImpl), 'holePositionHostSpace', function () {\n return this.t2y();\n });\n defineProp(protoOf(PointSeriesAssemblyInstructionImpl), 'holePositionWorldSpace', function () {\n return this.u2y();\n });\n protoOf(AutoAdaptChildFailedEventComponent).z1k = get_serializable;\n protoOf(AutoAdaptChildFailedEventComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AutoAdaptChildFailedEventComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AutoAdaptChildFailedEventComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AutoAdaptChildFailedEventComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(AutoAdaptCachedVariantsComponent).z1k = get_serializable;\n protoOf(AutoAdaptCachedVariantsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AutoAdaptCachedVariantsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AutoAdaptCachedVariantsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AutoAdaptCachedVariantsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(AutoAdaptSessionComponent).z1k = get_serializable;\n protoOf(AutoAdaptSessionComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AutoAdaptSessionComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AutoAdaptSessionComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AutoAdaptSessionComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(AutoAdaptGuestComponent).z1k = get_serializable;\n protoOf(AutoAdaptGuestComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AutoAdaptGuestComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AutoAdaptGuestComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AutoAdaptGuestComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(AutoAdaptHostComponent).z1k = get_serializable;\n protoOf(AutoAdaptHostComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AutoAdaptHostComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AutoAdaptHostComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AutoAdaptHostComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(AutoAdaptProductSpecificationsComponent).z1k = get_serializable;\n protoOf(AutoAdaptProductSpecificationsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AutoAdaptProductSpecificationsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AutoAdaptProductSpecificationsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AutoAdaptProductSpecificationsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(AutoAdaptVariantComponent).z1k = get_serializable;\n protoOf(AutoAdaptVariantComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(AutoAdaptVariantComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(AutoAdaptVariantComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(AutoAdaptVariantComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ForceAutoAdaptWhenParentIsDraggedComponent).z1k = get_serializable;\n protoOf(ForceAutoAdaptWhenParentIsDraggedComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ForceAutoAdaptWhenParentIsDraggedComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ForceAutoAdaptWhenParentIsDraggedComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ForceAutoAdaptWhenParentIsDraggedComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ReplacedWithAutoAdaptEventComponent).z1k = get_serializable;\n protoOf(ReplacedWithAutoAdaptEventComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ReplacedWithAutoAdaptEventComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ReplacedWithAutoAdaptEventComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ReplacedWithAutoAdaptEventComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(AbstractDragStrategy).dragStart = dragStart;\n protoOf(AbstractDragStrategy).dragStop = dragStop;\n defineProp(protoOf(AbstractDragStrategy), 'coreServices', function () {\n return this.k2z();\n });\n defineProp(protoOf(AbstractDragStrategy), 'entityManager', protoOf(AbstractDragStrategy).p1i);\n defineProp(protoOf(AbstractDragStrategy), 'isEnabled', function () {\n return this.y1n();\n });\n defineProp(protoOf(AbstractDragStrategy), 'name', function () {\n return this.mb();\n });\n defineProp(protoOf(DragState), 'originalDraggableRoot', protoOf(DragState).g33);\n defineProp(protoOf(DragState), 'lastValidWorldTransform', protoOf(DragState).h33);\n protoOf(DragStateComponent).z1k = get_serializable;\n defineProp(protoOf(DragStateComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DragStateComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(DragStateComponent), 'serializable', function () {\n return this.z1k();\n });\n protoOf(IsDraggedComponent).z1k = get_serializable;\n defineProp(protoOf(IsDraggedComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(IsDraggedComponent), 'id', protoOf(IsDraggedComponent).s1k);\n defineProp(protoOf(IsDraggedComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(IsDraggedComponent), 'serializable', function () {\n return this.z1k();\n });\n protoOf(FreeMoveComponent).z1k = get_serializable;\n protoOf(FreeMoveComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(FreeMoveComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(FreeMoveComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(FreeMoveComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(DragProjectionPointComponent).z1k = get_serializable;\n protoOf(DragProjectionPointComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DragProjectionPointComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DragProjectionPointComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DragProjectionPointComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(GrabOffsetComponent).z1k = get_serializable;\n protoOf(GrabOffsetComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(GrabOffsetComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(GrabOffsetComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(GrabOffsetComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(Companion_38), 'id', protoOf(Companion_38).s1k);\n protoOf(DragSurfaceEntityPairsCacheComponent).z1k = get_serializable;\n protoOf(DragSurfaceEntityPairsCacheComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DragSurfaceEntityPairsCacheComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DragSurfaceEntityPairsCacheComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DragSurfaceEntityPairsCacheComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(FunctionalMarginComponent).z1k = get_serializable;\n protoOf(FunctionalMarginComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(FunctionalMarginComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(FunctionalMarginComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(FunctionalMarginComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(FunctionalMarginShapeComponent).z1k = get_serializable;\n protoOf(FunctionalMarginShapeComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(FunctionalMarginShapeComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(FunctionalMarginShapeComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(FunctionalMarginShapeComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(FunctionalZonesLocalComponent).z1k = get_serializable;\n protoOf(FunctionalZonesLocalComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(FunctionalZonesLocalComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(FunctionalZonesLocalComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(FunctionalZonesLocalComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(FunctionalZonesWorldComponent).z1k = get_serializable;\n protoOf(FunctionalZonesWorldComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(FunctionalZonesWorldComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(FunctionalZonesWorldComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(FunctionalZonesWorldComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(LabelComponent).z1k = get_serializable;\n protoOf(LabelComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(LabelComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(LabelComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(LabelComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(DebugLogger).f2b = set_logLevel;\n protoOf(DebugLogger).g2b = get_logLevel;\n defineProp(protoOf(DebugLogger), 'level', function () {\n return this.e2b();\n }, function (value) {\n this.d2b(value);\n });\n defineProp(protoOf(DebugLogger), 'exceptionLevel', protoOf(DebugLogger).h3b, protoOf(DebugLogger).g3b);\n defineProp(protoOf(DebugLogger), 'logLevel', function () {\n return this.g2b();\n }, function (value) {\n this.f2b(value);\n });\n protoOf(ColoredOutlineComponent).z1k = get_serializable;\n protoOf(ColoredOutlineComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ColoredOutlineComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ColoredOutlineComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ColoredOutlineComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(OutlineBlockingComponent).z1k = get_serializable;\n protoOf(OutlineBlockingComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(OutlineBlockingComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(OutlineBlockingComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(OutlineBlockingComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(OutlinedComponent).z1k = get_serializable;\n protoOf(OutlinedComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(OutlinedComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(OutlinedComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(OutlinedComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(PlacementResult), 'valid', protoOf(PlacementResult).t2t);\n protoOf(PlacementZoneByHeightComponent).z1k = get_serializable;\n protoOf(PlacementZoneByHeightComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(PlacementZoneByHeightComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(PlacementZoneByHeightComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(PlacementZoneByHeightComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(RecommendedInitialPositionFromFloorComponent).z1k = get_serializable;\n protoOf(RecommendedInitialPositionFromFloorComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(RecommendedInitialPositionFromFloorComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(RecommendedInitialPositionFromFloorComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(RecommendedInitialPositionFromFloorComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(RecommendedInitialPositionFromParentComponent).z1k = get_serializable;\n protoOf(RecommendedInitialPositionFromParentComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(RecommendedInitialPositionFromParentComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(RecommendedInitialPositionFromParentComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(RecommendedInitialPositionFromParentComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(PriorityCriterionSettings$Companion$all$1), 'onlyInActivationDistance', function () {\n return this.y3d();\n });\n defineProp(protoOf(PriorityCriterionSettings$Companion$onlyInActivationDistance$1), 'onlyInActivationDistance', function () {\n return this.y3d();\n });\n protoOf(ProppingHostConnectorsComponent).z1k = get_serializable;\n protoOf(ProppingHostConnectorsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ProppingHostConnectorsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ProppingHostConnectorsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ProppingHostConnectorsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ProppingInfoComponent).z1k = get_serializable;\n protoOf(ProppingInfoComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ProppingInfoComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ProppingInfoComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ProppingInfoComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(CommunicationSizeComponent).z1k = get_serializable;\n protoOf(CommunicationSizeComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(CommunicationSizeComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(CommunicationSizeComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(CommunicationSizeComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(DoorComponent).z1k = get_serializable;\n protoOf(DoorComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DoorComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DoorComponent), 'id', protoOf(DoorComponent).s1k);\n defineProp(protoOf(DoorComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DoorComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(DoorFrontComponent).z1k = get_serializable;\n protoOf(DoorFrontComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DoorFrontComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DoorFrontComponent), 'id', protoOf(DoorFrontComponent).s1k);\n defineProp(protoOf(DoorFrontComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DoorFrontComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(DrawerComponent).z1k = get_serializable;\n protoOf(DrawerComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DrawerComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DrawerComponent), 'id', protoOf(DrawerComponent).s1k);\n defineProp(protoOf(DrawerComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DrawerComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(FrameComponent).z1k = get_serializable;\n protoOf(FrameComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(FrameComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(FrameComponent), 'id', protoOf(FrameComponent).s1k);\n defineProp(protoOf(FrameComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(FrameComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(HandleComponent).z1k = get_serializable;\n protoOf(HandleComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(HandleComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(HandleComponent), 'id', protoOf(HandleComponent).s1k);\n defineProp(protoOf(HandleComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(HandleComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(IncludedHandleComponent).z1k = get_serializable;\n protoOf(IncludedHandleComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(IncludedHandleComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(IncludedHandleComponent), 'id', protoOf(IncludedHandleComponent).s1k);\n defineProp(protoOf(IncludedHandleComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(IncludedHandleComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(LegComponent).z1k = get_serializable;\n protoOf(LegComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(LegComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(LegComponent), 'id', protoOf(LegComponent).s1k);\n defineProp(protoOf(LegComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(LegComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(LightComponent).z1k = get_serializable;\n protoOf(LightComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(LightComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(LightComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(LightComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(RoomComponentDeserializer), 'thisClassIsGuaranteedToNotModifyOrQueryCoreState', function () {\n return this.a1m();\n });\n protoOf($serializer).sv = typeParametersSerializers;\n protoOf($serializer_0).sv = typeParametersSerializers;\n protoOf($serializer_1).sv = typeParametersSerializers;\n protoOf($serializer_2).sv = typeParametersSerializers;\n protoOf($serializer_3).sv = typeParametersSerializers;\n protoOf($serializer_4).sv = typeParametersSerializers;\n protoOf($serializer_5).sv = typeParametersSerializers;\n protoOf(DisabledRoomConnectorsConfigComponent).z1k = get_serializable;\n protoOf(DisabledRoomConnectorsConfigComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DisabledRoomConnectorsConfigComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DisabledRoomConnectorsConfigComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DisabledRoomConnectorsConfigComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(RoomComponent).z1k = get_serializable;\n protoOf(RoomComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(RoomComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(RoomComponent), 'id', protoOf(RoomComponent).s1k);\n defineProp(protoOf(RoomComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(RoomComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(RoomConnectorRelationsComponent).z1k = get_serializable;\n protoOf(RoomConnectorRelationsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(RoomConnectorRelationsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(RoomConnectorRelationsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(RoomConnectorRelationsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf($serializer_6).sv = typeParametersSerializers;\n protoOf(RoomDimensionsComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(RoomDimensionsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(RoomDimensionsComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(RoomDimensionsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf($serializer_7).sv = typeParametersSerializers;\n protoOf(RoomGeometryComponent).z1k = get_serializable_0;\n protoOf(RoomGeometryComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(RoomGeometryComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(RoomGeometryComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(RoomGeometryComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(RoomPartComponent).z1k = get_serializable;\n protoOf(RoomPartComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(RoomPartComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(RoomPartComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(RoomPartComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(RoomRefToRoomComponentInterceptor).createCustomAssembly = createCustomAssembly;\n protoOf(RoomRefToRoomComponentInterceptor).createCustomAssemblySpecification = createCustomAssemblySpecification;\n protoOf(RoomRefToRoomComponentInterceptor).beforeDeserialize = beforeDeserialize;\n protoOf(RoomRefToRoomComponentInterceptor).beforeParsingComponents = beforeParsingComponents;\n protoOf(RoomRefToRoomComponentInterceptor).afterDeserializeComplete = afterDeserializeComplete;\n defineProp(protoOf(RoomRefToRoomComponentInterceptor), 'thisClassIsGuaranteedToNotModifyOrQueryCoreState', function () {\n return this.a1m();\n });\n protoOf(ColliderVisualizationConfigComponent).z1k = get_serializable;\n protoOf(ColliderVisualizationConfigComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ColliderVisualizationConfigComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ColliderVisualizationConfigComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ColliderVisualizationConfigComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(Companion_96), 'id', protoOf(Companion_96).s1k);\n protoOf(ColliderVisualizationNodeComponent).z1k = get_serializable;\n protoOf(ColliderVisualizationNodeComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ColliderVisualizationNodeComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ColliderVisualizationNodeComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ColliderVisualizationNodeComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ColliderVisualizerViewerObjectsComponent).z1k = get_serializable;\n defineProp(protoOf(ColliderVisualizerViewerObjectsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ColliderVisualizerViewerObjectsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(ColliderVisualizerViewerObjectsComponent), 'serializable', function () {\n return this.z1k();\n });\n protoOf(ConnectorVisualizationConfigComponent).z1k = get_serializable;\n protoOf(ConnectorVisualizationConfigComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ConnectorVisualizationConfigComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ConnectorVisualizationConfigComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ConnectorVisualizationConfigComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(Companion_99), 'id', protoOf(Companion_99).s1k);\n protoOf(ConnectorVisualizationNodeComponent).z1k = get_serializable;\n protoOf(ConnectorVisualizationNodeComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(ConnectorVisualizationNodeComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ConnectorVisualizationNodeComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(ConnectorVisualizationNodeComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(ConnectorVisualizerViewerObjectsComponent).z1k = get_serializable;\n defineProp(protoOf(ConnectorVisualizerViewerObjectsComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(ConnectorVisualizerViewerObjectsComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(ConnectorVisualizerViewerObjectsComponent), 'serializable', function () {\n return this.z1k();\n });\n protoOf(DecoratorComponent).z1k = get_serializable;\n protoOf(DecoratorComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(DecoratorComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(DecoratorComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(DecoratorComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(EntityColliderVisualizationComponent).z1k = get_serializable;\n defineProp(protoOf(EntityColliderVisualizationComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(EntityColliderVisualizationComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(EntityColliderVisualizationComponent), 'serializable', function () {\n return this.z1k();\n });\n protoOf(EntityConnectorVisualizationComponent).z1k = get_serializable;\n defineProp(protoOf(EntityConnectorVisualizationComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(EntityConnectorVisualizationComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(EntityConnectorVisualizationComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(Companion_104), 'id', protoOf(Companion_104).s1k);\n protoOf(PolyhedronVisualizationNodeComponent).z1k = get_serializable;\n protoOf(PolyhedronVisualizationNodeComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(PolyhedronVisualizationNodeComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(PolyhedronVisualizationNodeComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(PolyhedronVisualizationNodeComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(PolyhedronVisualizationHolderComponent).z1k = get_serializable;\n protoOf(PolyhedronVisualizationHolderComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(PolyhedronVisualizationHolderComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(PolyhedronVisualizationHolderComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(PolyhedronVisualizationHolderComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(ColliderVisualizationSystem), 'includeRoom', protoOf(ColliderVisualizationSystem).n3r, protoOf(ColliderVisualizationSystem).n3t);\n defineProp(protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1), 'connectorKey', function () {\n return this.z21();\n });\n defineProp(protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1), 'style', function () {\n return this.l3s();\n });\n defineProp(protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1), 'selected', function () {\n return this.m3s();\n });\n defineProp(protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1), 'visible', function () {\n return this.n3s();\n });\n defineProp(protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1), 'active', function () {\n return this.o3s();\n });\n defineProp(protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1), 'showActivationDistance', function () {\n return this.p3s();\n });\n defineProp(protoOf(ConnectorVisualizationSystem$Companion$createEntityConnectorVisualizationComponent$data$1), 'showTransform', function () {\n return this.q3s();\n });\n defineProp(protoOf(ConnectorVisualizationSystem), 'includeRoom', protoOf(ConnectorVisualizationSystem).n3r, protoOf(ConnectorVisualizationSystem).n3t);\n defineProp(protoOf(ConnectorVisualizationSystem), 'connectorActivationDistanceVisualizationEnabled', protoOf(ConnectorVisualizationSystem).f3r, protoOf(ConnectorVisualizationSystem).i3u);\n defineProp(protoOf(ConnectorVisualizationSystem), 'connectorTransformVisualizationEnabled', protoOf(ConnectorVisualizationSystem).g3r, protoOf(ConnectorVisualizationSystem).j3u);\n protoOf(CollisionVisualizationSceneDataComponent).z1k = get_serializable;\n protoOf(CollisionVisualizationSceneDataComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(CollisionVisualizationSceneDataComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(CollisionVisualizationSceneDataComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(CollisionVisualizationSceneDataComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(EntityConnectorVisualizationSystem), 'offersFilter', protoOf(EntityConnectorVisualizationSystem).w3r, protoOf(EntityConnectorVisualizationSystem).z3v);\n defineProp(protoOf(EntityConnectorVisualizationSystem), 'demandsFilter', protoOf(EntityConnectorVisualizationSystem).x3r, protoOf(EntityConnectorVisualizationSystem).a3w);\n protoOf(DefaultVisualizer).createColliderVisualization = createColliderVisualization;\n defineProp(protoOf(DefaultVisualizer), 'viewer', protoOf(DefaultVisualizer).l2j);\n //endregion\n //region block: init\n Companion_instance_32 = new Companion();\n Companion_instance_33 = new Companion_0();\n Companion_instance_35 = new Companion_2();\n Companion_instance_37 = new Companion_4();\n Companion_instance_38 = new Companion_5();\n Companion_instance_39 = new Companion_6();\n Companion_instance_40 = new Companion_7();\n AutoAdaptFeature_instance = new AutoAdaptFeature();\n Companion_instance_41 = new Companion_8();\n Companion_instance_42 = new Companion_9();\n Companion_instance_45 = new Companion_12();\n Companion_instance_46 = new Companion_13();\n Companion_instance_47 = new Companion_14();\n Companion_instance_48 = new Companion_15();\n Companion_instance_49 = new Companion_16();\n Companion_instance_50 = new Companion_17();\n Companion_instance_51 = new Companion_18();\n Companion_instance_52 = new Companion_19();\n Companion_instance_53 = new Companion_20();\n Companion_instance_54 = new Companion_21();\n DoneEntry_instance = new DoneEntry();\n Companion_instance_57 = new Companion_24();\n Companion_instance_58 = new Companion_25();\n Companion_instance_60 = new Companion_27();\n Companion_instance_62 = new Companion_29();\n IsDraggedComponent_instance = new IsDraggedComponent();\n Companion_instance_63 = new Companion_30();\n FreeMoveComponent_instance = new FreeMoveComponent();\n Companion_instance_64 = new Companion_31();\n Companion_instance_66 = new Companion_33();\n Companion_instance_67 = new Companion_34();\n Companion_instance_68 = new Companion_35();\n Companion_instance_69 = new Companion_36();\n Companion_instance_71 = new Companion_38();\n Companion_instance_72 = new Companion_39();\n Companion_instance_73 = new Companion_40();\n Companion_instance_74 = new Companion_41();\n Companion_instance_75 = new Companion_42();\n Companion_instance_76 = new Companion_43();\n Companion_instance_77 = new Companion_44();\n Companion_instance_78 = new Companion_45();\n Companion_instance_79 = new Companion_46();\n Companion_instance_80 = new Companion_47();\n Companion_instance_82 = new Companion_49();\n Companion_instance_83 = new Companion_50();\n Companion_instance_84 = new Companion_51();\n Companion_instance_85 = new Companion_52();\n Companion_instance_86 = new Companion_53();\n Companion_instance_87 = new Companion_54();\n Companion_instance_88 = new Companion_55();\n Companion_instance_89 = new Companion_56();\n Companion_instance_90 = new Companion_57();\n Companion_instance_91 = new Companion_58();\n SearchDirectionsUtils_instance = new SearchDirectionsUtils();\n Companion_instance_94 = new Companion_61();\n Companion_instance_95 = new Companion_62();\n ProppingUtils_instance = new ProppingUtils();\n Companion_instance_97 = new Companion_64();\n Companion_instance_98 = new Companion_65();\n Companion_instance_99 = new Companion_66();\n Companion_instance_100 = new Companion_67();\n Companion_instance_101 = new Companion_68();\n ReplaceUtils_instance = new ReplaceUtils();\n Companion_instance_103 = new Companion_70();\n Companion_instance_105 = new Companion_72();\n Companion_instance_107 = new Companion_74();\n Companion_instance_108 = new Companion_75();\n Companion_instance_109 = new Companion_76();\n RoomComponent_instance = new RoomComponent();\n Companion_instance_110 = new Companion_77();\n Companion_instance_113 = new Companion_80();\n Companion_instance_114 = new Companion_81();\n Companion_instance_115 = new Companion_82();\n Companion_instance_117 = new Companion_84();\n Companion_instance_118 = new Companion_85();\n Companion_instance_120 = new Companion_87();\n StlSystemIds_instance = new StlSystemIds();\n Companion_instance_122 = new Companion_89();\n Companion_instance_123 = new Companion_90();\n Companion_instance_124 = new Companion_91();\n Companion_instance_125 = new Companion_92();\n Companion_instance_126 = new Companion_93();\n Companion_instance_127 = new Companion_94();\n ValidationResultIds_instance = new ValidationResultIds();\n ValidationRuleIds_instance = new ValidationRuleIds();\n Companion_instance_128 = new Companion_95();\n Companion_instance_129 = new Companion_96();\n Companion_instance_130 = new Companion_97();\n Companion_instance_131 = new Companion_98();\n Companion_instance_132 = new Companion_99();\n Companion_instance_133 = new Companion_100();\n Companion_instance_134 = new Companion_101();\n Companion_instance_135 = new Companion_102();\n Companion_instance_136 = new Companion_103();\n Companion_instance_137 = new Companion_104();\n Companion_instance_138 = new Companion_105();\n Companion_instance_139 = new Companion_106();\n Companion_instance_140 = new Companion_107();\n Companion_instance_141 = new Companion_108();\n Companion_instance_142 = new Companion_109();\n Companion_instance_143 = new Companion_110();\n Companion_instance_144 = new Companion_111();\n Companion_instance_145 = new Companion_112();\n Companion_instance_146 = new Companion_113();\n Companion_instance_147 = new Companion_114();\n Companion_instance_150 = new Companion_117();\n //endregion\n //region block: exports\n function $jsExportAll$(_) {\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignment = $com$ikea$core$stl.alignment || ($com$ikea$core$stl.alignment = {});\n $com$ikea$core$stl$alignment.AlignmentConnectionCreationSystem = AlignmentConnectionCreationSystem;\n defineProp($com$ikea$core$stl$alignment.AlignmentConnectionCreationSystem, 'Companion', Companion_getInstance_8);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignment = $com$ikea$core$stl.alignment || ($com$ikea$core$stl.alignment = {});\n $com$ikea$core$stl$alignment.AlignmentConnectionsComponent = AlignmentConnectionsComponent;\n defineProp($com$ikea$core$stl$alignment.AlignmentConnectionsComponent, 'Companion', Companion_getInstance_9);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignment = $com$ikea$core$stl.alignment || ($com$ikea$core$stl.alignment = {});\n $com$ikea$core$stl$alignment.AlignmentPlane = AlignmentPlane;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignment = $com$ikea$core$stl.alignment || ($com$ikea$core$stl.alignment = {});\n $com$ikea$core$stl$alignment.HandleRotationSystem = HandleRotationSystem;\n defineProp($com$ikea$core$stl$alignment.HandleRotationSystem, 'Companion', Companion_getInstance_10);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignment = $com$ikea$core$stl.alignment || ($com$ikea$core$stl.alignment = {});\n $com$ikea$core$stl$alignment.HostConnectorRotationValidation = HostConnectorRotationValidation;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignmentlines = $com$ikea$core$stl.alignmentlines || ($com$ikea$core$stl.alignmentlines = {});\n $com$ikea$core$stl$alignmentlines.AlignmentLinesReferenceCounter = AlignmentLinesReferenceCounter;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignmentlines = $com$ikea$core$stl.alignmentlines || ($com$ikea$core$stl.alignmentlines = {});\n $com$ikea$core$stl$alignmentlines.AlignmentLinesSystem = AlignmentLinesSystem;\n defineProp($com$ikea$core$stl$alignmentlines.AlignmentLinesSystem, 'Companion', Companion_getInstance_11);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignmentlines = $com$ikea$core$stl.alignmentlines || ($com$ikea$core$stl.alignmentlines = {});\n $com$ikea$core$stl$alignmentlines.AlignmentLinesUtils = AlignmentLinesUtils;\n defineProp($com$ikea$core$stl$alignmentlines.AlignmentLinesUtils, 'Companion', Companion_getInstance_12);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignmentlines = $com$ikea$core$stl.alignmentlines || ($com$ikea$core$stl.alignmentlines = {});\n $com$ikea$core$stl$alignmentlines.IntersectionPointConnectors = IntersectionPointConnectors;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignmentlines = $com$ikea$core$stl.alignmentlines || ($com$ikea$core$stl.alignmentlines = {});\n $com$ikea$core$stl$alignmentlines.IntersectionPointsTracker = IntersectionPointsTracker;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignmentlines = $com$ikea$core$stl.alignmentlines || ($com$ikea$core$stl.alignmentlines = {});\n $com$ikea$core$stl$alignmentlines.RoomAlignmentEdgesComponent = RoomAlignmentEdgesComponent;\n defineProp($com$ikea$core$stl$alignmentlines.RoomAlignmentEdgesComponent, 'Companion', Companion_getInstance_13);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignmentlines = $com$ikea$core$stl.alignmentlines || ($com$ikea$core$stl.alignmentlines = {});\n $com$ikea$core$stl$alignmentlines.getCloseKeyFromSet = getCloseKeyFromSet;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alignmentlines = $com$ikea$core$stl.alignmentlines || ($com$ikea$core$stl.alignmentlines = {});\n $com$ikea$core$stl$alignmentlines.SurfaceAlignmentLines = SurfaceAlignmentLines;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alloweddoorpairs = $com$ikea$core$stl.alloweddoorpairs || ($com$ikea$core$stl.alloweddoorpairs = {});\n $com$ikea$core$stl$alloweddoorpairs.AllowedDoorPairsComponent = AllowedDoorPairsComponent;\n $com$ikea$core$stl$alloweddoorpairs.AllowedDoorPairsComponent.AllowedDoorPairsComponentFromInts = AllowedDoorPairsComponentFromInts;\n $com$ikea$core$stl$alloweddoorpairs.AllowedDoorPairsComponent.AllowedDoorPairsComponentFromArrays = AllowedDoorPairsComponentFromArrays;\n defineProp($com$ikea$core$stl$alloweddoorpairs.AllowedDoorPairsComponent, 'Companion', Companion_getInstance_14);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alloweddoorpairs = $com$ikea$core$stl.alloweddoorpairs || ($com$ikea$core$stl.alloweddoorpairs = {});\n $com$ikea$core$stl$alloweddoorpairs.AllowedDoorPairsValidation = AllowedDoorPairsValidation;\n defineProp($com$ikea$core$stl$alloweddoorpairs.AllowedDoorPairsValidation, 'Companion', Companion_getInstance_15);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$alloweddoorpairs = $com$ikea$core$stl.alloweddoorpairs || ($com$ikea$core$stl.alloweddoorpairs = {});\n $com$ikea$core$stl$alloweddoorpairs.InvalidDoorPairsResult = InvalidDoorPairsResult;\n defineProp($com$ikea$core$stl$alloweddoorpairs.InvalidDoorPairsResult, 'Companion', Companion_getInstance_16);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$assemblyinstructions = $com$ikea$core$stl.assemblyinstructions || ($com$ikea$core$stl.assemblyinstructions = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$assemblyinstructions = $com$ikea$core$stl.assemblyinstructions || ($com$ikea$core$stl.assemblyinstructions = {});\n $com$ikea$core$stl$assemblyinstructions.AssemblyInstructionsServiceImpl = AssemblyInstructionsServiceImpl;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$assemblyinstructions = $com$ikea$core$stl.assemblyinstructions || ($com$ikea$core$stl.assemblyinstructions = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$assemblyinstructions = $com$ikea$core$stl.assemblyinstructions || ($com$ikea$core$stl.assemblyinstructions = {});\n $com$ikea$core$stl$assemblyinstructions.PointSeriesAssemblyInstructionImpl = PointSeriesAssemblyInstructionImpl;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n defineProp($com$ikea$core$stl$autoadapt, 'AutoAdaptFeature', AutoAdaptFeature_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n $com$ikea$core$stl$autoadapt.AutoAdaptProductSpecificationsSystem = AutoAdaptProductSpecificationsSystem;\n defineProp($com$ikea$core$stl$autoadapt.AutoAdaptProductSpecificationsSystem, 'Companion', Companion_getInstance_17);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n $com$ikea$core$stl$autoadapt.AutoAdaptService = AutoAdaptService;\n $com$ikea$core$stl$autoadapt.AutoAdaptService.findWithAutoAdapt$default = findWithAutoAdapt$default;\n $com$ikea$core$stl$autoadapt.AutoAdaptService.snapToValidSnap$default = snapToValidSnap$default;\n $com$ikea$core$stl$autoadapt.AutoAdaptService.snapAndValidateVariant$default = snapAndValidateVariant$default;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n $com$ikea$core$stl$autoadapt.EntityWithSensorZone = EntityWithSensorZone;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n defineProp($com$ikea$core$stl$autoadapt, 'AutoAdaptUtils', AutoAdaptUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n var $com$ikea$core$stl$autoadapt$autoadaptchildren = $com$ikea$core$stl$autoadapt.autoadaptchildren || ($com$ikea$core$stl$autoadapt.autoadaptchildren = {});\n $com$ikea$core$stl$autoadapt$autoadaptchildren.AutoAdaptChildrenSystem = AutoAdaptChildrenSystem;\n $com$ikea$core$stl$autoadapt$autoadaptchildren.AutoAdaptChildrenSystem.ChildInfo = ChildInfo;\n $com$ikea$core$stl$autoadapt$autoadaptchildren.AutoAdaptChildrenSystem.PreferSameConnectorsStrategy = PreferSameConnectorsStrategy;\n defineProp($com$ikea$core$stl$autoadapt$autoadaptchildren.AutoAdaptChildrenSystem, 'Companion', Companion_getInstance_19);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n var $com$ikea$core$stl$autoadapt$component = $com$ikea$core$stl$autoadapt.component || ($com$ikea$core$stl$autoadapt.component = {});\n $com$ikea$core$stl$autoadapt$component.AutoAdaptGuestComponent = AutoAdaptGuestComponent;\n defineProp($com$ikea$core$stl$autoadapt$component.AutoAdaptGuestComponent, 'Companion', Companion_getInstance_25);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n var $com$ikea$core$stl$autoadapt$component = $com$ikea$core$stl$autoadapt.component || ($com$ikea$core$stl$autoadapt.component = {});\n $com$ikea$core$stl$autoadapt$component.AutoAdaptHostComponent = AutoAdaptHostComponent;\n defineProp($com$ikea$core$stl$autoadapt$component.AutoAdaptHostComponent, 'Companion', Companion_getInstance_26);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n var $com$ikea$core$stl$autoadapt$component = $com$ikea$core$stl$autoadapt.component || ($com$ikea$core$stl$autoadapt.component = {});\n $com$ikea$core$stl$autoadapt$component.AutoAdaptProductSpecificationsComponent = AutoAdaptProductSpecificationsComponent;\n defineProp($com$ikea$core$stl$autoadapt$component.AutoAdaptProductSpecificationsComponent, 'Companion', Companion_getInstance_27);\n $com$ikea$core$stl$autoadapt$component.SpecificationPair = SpecificationPair;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n var $com$ikea$core$stl$autoadapt$component = $com$ikea$core$stl$autoadapt.component || ($com$ikea$core$stl$autoadapt.component = {});\n $com$ikea$core$stl$autoadapt$component.AutoAdaptVariantComponent = AutoAdaptVariantComponent;\n defineProp($com$ikea$core$stl$autoadapt$component.AutoAdaptVariantComponent, 'Companion', Companion_getInstance_28);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n var $com$ikea$core$stl$autoadapt$component = $com$ikea$core$stl$autoadapt.component || ($com$ikea$core$stl$autoadapt.component = {});\n $com$ikea$core$stl$autoadapt$component.ForceAutoAdaptWhenParentIsDraggedComponent = ForceAutoAdaptWhenParentIsDraggedComponent;\n defineProp($com$ikea$core$stl$autoadapt$component.ForceAutoAdaptWhenParentIsDraggedComponent, 'Companion', Companion_getInstance_29);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n var $com$ikea$core$stl$autoadapt$component = $com$ikea$core$stl$autoadapt.component || ($com$ikea$core$stl$autoadapt.component = {});\n $com$ikea$core$stl$autoadapt$component.ReplacedWithAutoAdaptEventComponent = ReplacedWithAutoAdaptEventComponent;\n defineProp($com$ikea$core$stl$autoadapt$component.ReplacedWithAutoAdaptEventComponent, 'Companion', Companion_getInstance_30);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n var $com$ikea$core$stl$autoadapt$drag = $com$ikea$core$stl$autoadapt.drag || ($com$ikea$core$stl$autoadapt.drag = {});\n $com$ikea$core$stl$autoadapt$drag.AutoAdaptDragStrategy = AutoAdaptDragStrategy;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n var $com$ikea$core$stl$autoadapt$drag = $com$ikea$core$stl$autoadapt.drag || ($com$ikea$core$stl$autoadapt.drag = {});\n $com$ikea$core$stl$autoadapt$drag.DragSurfaceCanHostWithAutoAdaptSelector = DragSurfaceCanHostWithAutoAdaptSelector;\n defineProp($com$ikea$core$stl$autoadapt$drag.DragSurfaceCanHostWithAutoAdaptSelector, 'Companion', Companion_getInstance_31);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$autoadapt = $com$ikea$core$stl.autoadapt || ($com$ikea$core$stl.autoadapt = {});\n var $com$ikea$core$stl$autoadapt$drag = $com$ikea$core$stl$autoadapt.drag || ($com$ikea$core$stl$autoadapt.drag = {});\n $com$ikea$core$stl$autoadapt$drag.ValidAutoAdaptDragStrategyResult = ValidAutoAdaptDragStrategyResult;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$debug = $com$ikea$core$stl.debug || ($com$ikea$core$stl.debug = {});\n $com$ikea$core$stl$debug.DebugLineDrawingSystem = DebugLineDrawingSystem;\n defineProp($com$ikea$core$stl$debug.DebugLineDrawingSystem, 'Companion', Companion_getInstance_32);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$debug = $com$ikea$core$stl.debug || ($com$ikea$core$stl.debug = {});\n $com$ikea$core$stl$debug.MeasuringEntityManagerWatcher = MeasuringEntityManagerWatcher;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n $com$ikea$core$stl$dragging.DragState = DragState;\n defineProp($com$ikea$core$stl$dragging.DragState, 'Companion', Companion_getInstance_33);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n $com$ikea$core$stl$dragging.DragStateComponent = DragStateComponent;\n defineProp($com$ikea$core$stl$dragging.DragStateComponent, 'Companion', Companion_getInstance_34);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n $com$ikea$core$stl$dragging.DragSurfaceNormalVisualizationSystem = DragSurfaceNormalVisualizationSystem;\n defineProp($com$ikea$core$stl$dragging.DragSurfaceNormalVisualizationSystem, 'Companion', Companion_getInstance_35);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n $com$ikea$core$stl$dragging.DragSurfaceVisualizationSystem = DragSurfaceVisualizationSystem;\n defineProp($com$ikea$core$stl$dragging.DragSurfaceVisualizationSystem, 'Companion', Companion_getInstance_36);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n $com$ikea$core$stl$dragging.DragSurfacesUpdateSystem = DragSurfacesUpdateSystem;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n $com$ikea$core$stl$dragging.DragSystem = DragSystem;\n defineProp($com$ikea$core$stl$dragging.DragSystem, 'Companion', Companion_getInstance_37);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n $com$ikea$core$stl$dragging.DrawDragGhostSystem = DrawDragGhostSystem;\n defineProp($com$ikea$core$stl$dragging.DrawDragGhostSystem, 'Companion', Companion_getInstance_38);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n $com$ikea$core$stl$dragging.HigherPriorityAlignmentPostProcess = HigherPriorityAlignmentPostProcess;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n defineProp($com$ikea$core$stl$dragging, 'IsDraggedComponent', IsDraggedComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$dragstrategy = $com$ikea$core$stl$dragging.dragstrategy || ($com$ikea$core$stl$dragging.dragstrategy = {});\n $com$ikea$core$stl$dragging$dragstrategy.AbstractDragStrategy = AbstractDragStrategy;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$dragstrategy = $com$ikea$core$stl$dragging.dragstrategy || ($com$ikea$core$stl$dragging.dragstrategy = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$dragstrategy = $com$ikea$core$stl$dragging.dragstrategy || ($com$ikea$core$stl$dragging.dragstrategy = {});\n defineProp($com$ikea$core$stl$dragging$dragstrategy, 'FreeMoveComponent', FreeMoveComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$dragstrategy = $com$ikea$core$stl$dragging.dragstrategy || ($com$ikea$core$stl$dragging.dragstrategy = {});\n $com$ikea$core$stl$dragging$dragstrategy.FreeMoveDragStrategy = FreeMoveDragStrategy;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$dragstrategy = $com$ikea$core$stl$dragging.dragstrategy || ($com$ikea$core$stl$dragging.dragstrategy = {});\n $com$ikea$core$stl$dragging$dragstrategy.ResolveCollisionsDragStrategy = ResolveCollisionsDragStrategy;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$dragstrategy = $com$ikea$core$stl$dragging.dragstrategy || ($com$ikea$core$stl$dragging.dragstrategy = {});\n $com$ikea$core$stl$dragging$dragstrategy.SnapCardinalDirectionsDragStrategy = SnapCardinalDirectionsDragStrategy;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$dragstrategy = $com$ikea$core$stl$dragging.dragstrategy || ($com$ikea$core$stl$dragging.dragstrategy = {});\n $com$ikea$core$stl$dragging$dragstrategy.SnapClosestDragStrategy = SnapClosestDragStrategy;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$dragstrategy = $com$ikea$core$stl$dragging.dragstrategy || ($com$ikea$core$stl$dragging.dragstrategy = {});\n $com$ikea$core$stl$dragging$dragstrategy.SnapClosestWithSubConnectorsDragStrategy = SnapClosestWithSubConnectorsDragStrategy;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$dragstrategy = $com$ikea$core$stl$dragging.dragstrategy || ($com$ikea$core$stl$dragging.dragstrategy = {});\n $com$ikea$core$stl$dragging$dragstrategy.ValidDragStrategyResult = ValidDragStrategyResult;\n defineProp($com$ikea$core$stl$dragging$dragstrategy.ValidDragStrategyResult, 'Companion', Companion_getInstance_40);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n $com$ikea$core$stl$dragging$viewerDragConversion.CanvasTo3DDragConverterSystem = CanvasTo3DDragConverterSystem;\n $com$ikea$core$stl$dragging$viewerDragConversion.CanvasTo3DDragConverterSystem.CanvasTo3DDragConverterSystemFromCoreServices = CanvasTo3DDragConverterSystemFromCoreServices;\n defineProp($com$ikea$core$stl$dragging$viewerDragConversion.CanvasTo3DDragConverterSystem, 'Companion', Companion_getInstance_41);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n $com$ikea$core$stl$dragging$viewerDragConversion.DragSurfaceCanHostSelector = DragSurfaceCanHostSelector;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n $com$ikea$core$stl$dragging$viewerDragConversion.DragSurfaceEntityPair = DragSurfaceEntityPair;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n $com$ikea$core$stl$dragging$viewerDragConversion.DragSurfaceOnlyRoomSelector = DragSurfaceOnlyRoomSelector;\n defineProp($com$ikea$core$stl$dragging$viewerDragConversion.DragSurfaceOnlyRoomSelector, 'Companion', Companion_getInstance_42);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n $com$ikea$core$stl$dragging$viewerDragConversion.LegacyCanvasTo3DDragConverterSystem = LegacyCanvasTo3DDragConverterSystem;\n defineProp($com$ikea$core$stl$dragging$viewerDragConversion.LegacyCanvasTo3DDragConverterSystem, 'Companion', Companion_getInstance_43);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n $com$ikea$core$stl$dragging$viewerDragConversion.NoDragConverterDetector = NoDragConverterDetector;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion$component = $com$ikea$core$stl$dragging$viewerDragConversion.component || ($com$ikea$core$stl$dragging$viewerDragConversion.component = {});\n $com$ikea$core$stl$dragging$viewerDragConversion$component.DragProjectionPointComponent = DragProjectionPointComponent;\n defineProp($com$ikea$core$stl$dragging$viewerDragConversion$component.DragProjectionPointComponent, 'Companion', Companion_getInstance_44);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion$component = $com$ikea$core$stl$dragging$viewerDragConversion.component || ($com$ikea$core$stl$dragging$viewerDragConversion.component = {});\n $com$ikea$core$stl$dragging$viewerDragConversion$component.GrabOffsetComponent = GrabOffsetComponent;\n defineProp($com$ikea$core$stl$dragging$viewerDragConversion$component.GrabOffsetComponent, 'Companion', Companion_getInstance_45);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion$projector = $com$ikea$core$stl$dragging$viewerDragConversion.projector || ($com$ikea$core$stl$dragging$viewerDragConversion.projector = {});\n $com$ikea$core$stl$dragging$viewerDragConversion$projector.AnyDragSurfaceProjector = AnyDragSurfaceProjector;\n $com$ikea$core$stl$dragging$viewerDragConversion$projector.AnyDragSurfaceProjector.AnyDragSurfaceProjectorFromCoreServices = AnyDragSurfaceProjectorFromCoreServices;\n defineProp($com$ikea$core$stl$dragging$viewerDragConversion$projector.AnyDragSurfaceProjector, 'Companion', Companion_getInstance_46);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion$projector = $com$ikea$core$stl$dragging$viewerDragConversion.projector || ($com$ikea$core$stl$dragging$viewerDragConversion.projector = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion$projector = $com$ikea$core$stl$dragging$viewerDragConversion.projector || ($com$ikea$core$stl$dragging$viewerDragConversion.projector = {});\n $com$ikea$core$stl$dragging$viewerDragConversion$projector.DragSurfaceUpdatesListenerSystem = DragSurfaceUpdatesListenerSystem;\n defineProp($com$ikea$core$stl$dragging$viewerDragConversion$projector.DragSurfaceUpdatesListenerSystem, 'Companion', Companion_getInstance_48);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$dragging = $com$ikea$core$stl.dragging || ($com$ikea$core$stl.dragging = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion = $com$ikea$core$stl$dragging.viewerDragConversion || ($com$ikea$core$stl$dragging.viewerDragConversion = {});\n var $com$ikea$core$stl$dragging$viewerDragConversion$projector = $com$ikea$core$stl$dragging$viewerDragConversion.projector || ($com$ikea$core$stl$dragging$viewerDragConversion.projector = {});\n $com$ikea$core$stl$dragging$viewerDragConversion$projector.XYPlaneProjector = XYPlaneProjector;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$functionalmargins = $com$ikea$core$stl.functionalmargins || ($com$ikea$core$stl.functionalmargins = {});\n $com$ikea$core$stl$functionalmargins.FunctionalMarginComponent = FunctionalMarginComponent;\n defineProp($com$ikea$core$stl$functionalmargins.FunctionalMarginComponent, 'Companion', Companion_getInstance_49);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$functionalmargins = $com$ikea$core$stl.functionalmargins || ($com$ikea$core$stl.functionalmargins = {});\n $com$ikea$core$stl$functionalmargins.FunctionalMarginShapeComponent = FunctionalMarginShapeComponent;\n defineProp($com$ikea$core$stl$functionalmargins.FunctionalMarginShapeComponent, 'Companion', Companion_getInstance_50);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$functionalmargins = $com$ikea$core$stl.functionalmargins || ($com$ikea$core$stl.functionalmargins = {});\n $com$ikea$core$stl$functionalmargins.FunctionalMarginSystem = FunctionalMarginSystem;\n defineProp($com$ikea$core$stl$functionalmargins.FunctionalMarginSystem, 'Companion', Companion_getInstance_51);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$functionalmargins = $com$ikea$core$stl.functionalmargins || ($com$ikea$core$stl.functionalmargins = {});\n $com$ikea$core$stl$functionalmargins.FunctionalMarginValidation = FunctionalMarginValidation;\n defineProp($com$ikea$core$stl$functionalmargins.FunctionalMarginValidation, 'Companion', Companion_getInstance_52);\n $com$ikea$core$stl$functionalmargins.FunctionalMarginWarning = FunctionalMarginWarning;\n defineProp($com$ikea$core$stl$functionalmargins.FunctionalMarginWarning, 'Companion', Companion_getInstance_53);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$functionalzones = $com$ikea$core$stl.functionalzones || ($com$ikea$core$stl.functionalzones = {});\n $com$ikea$core$stl$functionalzones.FunctionalZone = FunctionalZone;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$functionalzones = $com$ikea$core$stl.functionalzones || ($com$ikea$core$stl.functionalzones = {});\n $com$ikea$core$stl$functionalzones.FunctionalZonesLocalComponent = FunctionalZonesLocalComponent;\n defineProp($com$ikea$core$stl$functionalzones.FunctionalZonesLocalComponent, 'Companion', Companion_getInstance_54);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$functionalzones = $com$ikea$core$stl.functionalzones || ($com$ikea$core$stl.functionalzones = {});\n $com$ikea$core$stl$functionalzones.FunctionalZonesLocalToWorldSystem = FunctionalZonesLocalToWorldSystem;\n defineProp($com$ikea$core$stl$functionalzones.FunctionalZonesLocalToWorldSystem, 'Companion', Companion_getInstance_55);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$functionalzones = $com$ikea$core$stl.functionalzones || ($com$ikea$core$stl.functionalzones = {});\n $com$ikea$core$stl$functionalzones.FunctionalZonesWorldComponent = FunctionalZonesWorldComponent;\n defineProp($com$ikea$core$stl$functionalzones.FunctionalZonesWorldComponent, 'Companion', Companion_getInstance_56);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$icf = $com$ikea$core$stl.icf || ($com$ikea$core$stl.icf = {});\n $com$ikea$core$stl$icf.ICFDataService = ICFDataService;\n defineProp($com$ikea$core$stl$icf.ICFDataService, 'Companion', Companion_getInstance_57);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$icf = $com$ikea$core$stl.icf || ($com$ikea$core$stl.icf = {});\n $com$ikea$core$stl$icf.ICFProductData = ICFProductData;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$label = $com$ikea$core$stl.label || ($com$ikea$core$stl.label = {});\n $com$ikea$core$stl$label.LabelComponent = LabelComponent;\n defineProp($com$ikea$core$stl$label.LabelComponent, 'Companion', Companion_getInstance_58);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$logging = $com$ikea$core$stl.logging || ($com$ikea$core$stl.logging = {});\n $com$ikea$core$stl$logging.DebugLogger = DebugLogger;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$logging = $com$ikea$core.logging || ($com$ikea$core.logging = {});\n $com$ikea$core$logging.LoggerException = LoggerException;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$outlines = $com$ikea$core$stl.outlines || ($com$ikea$core$stl.outlines = {});\n $com$ikea$core$stl$outlines.ColoredOutlineComponent = ColoredOutlineComponent;\n defineProp($com$ikea$core$stl$outlines.ColoredOutlineComponent, 'Companion', Companion_getInstance_59);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$outlines = $com$ikea$core$stl.outlines || ($com$ikea$core$stl.outlines = {});\n $com$ikea$core$stl$outlines.ColoredOutlineSystem = ColoredOutlineSystem;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$outlines = $com$ikea$core$stl.outlines || ($com$ikea$core$stl.outlines = {});\n $com$ikea$core$stl$outlines.OutlineBlockingComponent = OutlineBlockingComponent;\n defineProp($com$ikea$core$stl$outlines.OutlineBlockingComponent, 'Companion', Companion_getInstance_60);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$outlines = $com$ikea$core$stl.outlines || ($com$ikea$core$stl.outlines = {});\n $com$ikea$core$stl$outlines.OutlineEntityGroupDeselectSystem = OutlineEntityGroupDeselectSystem;\n defineProp($com$ikea$core$stl$outlines.OutlineEntityGroupDeselectSystem, 'Companion', Companion_getInstance_61);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$outlines = $com$ikea$core$stl.outlines || ($com$ikea$core$stl.outlines = {});\n $com$ikea$core$stl$outlines.OutlineSelectedSystem = OutlineSelectedSystem;\n defineProp($com$ikea$core$stl$outlines.OutlineSelectedSystem, 'Companion', Companion_getInstance_62);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$outlines = $com$ikea$core$stl.outlines || ($com$ikea$core$stl.outlines = {});\n $com$ikea$core$stl$outlines.OutlineSystem = OutlineSystem;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$outlines = $com$ikea$core$stl.outlines || ($com$ikea$core$stl.outlines = {});\n $com$ikea$core$stl$outlines.OutlinedComponent = OutlinedComponent;\n defineProp($com$ikea$core$stl$outlines.OutlinedComponent, 'Companion', Companion_getInstance_63);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n $com$ikea$core$stl$placement.AutoAdaptPlacementActor = AutoAdaptPlacementActor;\n $com$ikea$core$stl$placement.AutoAdaptPlacementActor.doPlacement$default = doPlacement$default;\n $com$ikea$core$stl$placement.AutoAdaptPlacementActor.tryFindValidSnap$default = tryFindValidSnap$default;\n $com$ikea$core$stl$placement.AutoAdaptPlacementActor.tryFindFirstValidSnapResult$default = tryFindFirstValidSnapResult$default;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n defineProp($com$ikea$core$stl$placement, 'PlacementHelper', PlacementHelper_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n $com$ikea$core$stl$placement.PlacementResult = PlacementResult;\n defineProp($com$ikea$core$stl$placement.PlacementResult, 'Companion', Companion_getInstance_64);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n $com$ikea$core$stl$placement.PlacementService = PlacementService;\n $com$ikea$core$stl$placement.recommendedPosition = recommendedPosition;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n $com$ikea$core$stl$placement.PlacementZoneByHeightComponent = PlacementZoneByHeightComponent;\n defineProp($com$ikea$core$stl$placement.PlacementZoneByHeightComponent, 'Companion', Companion_getInstance_65);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n $com$ikea$core$stl$placement.RecommendedInitialPositionFromFloorComponent = RecommendedInitialPositionFromFloorComponent;\n defineProp($com$ikea$core$stl$placement.RecommendedInitialPositionFromFloorComponent, 'Companion', Companion_getInstance_66);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n $com$ikea$core$stl$placement.RecommendedInitialPositionFromParentComponent = RecommendedInitialPositionFromParentComponent;\n defineProp($com$ikea$core$stl$placement.RecommendedInitialPositionFromParentComponent, 'Companion', Companion_getInstance_67);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n defineProp($com$ikea$core$stl$placement, 'SearchDirectionsUtils', SearchDirectionsUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n $com$ikea$core$stl$placement.SnapPlacementActor = SnapPlacementActor;\n $com$ikea$core$stl$placement.SnapPlacementActor.findBestValidPositionOnConnector$default = findBestValidPositionOnConnector$default;\n $com$ikea$core$stl$placement.SnapPlacementActor.CandidateResult = CandidateResult;\n defineProp($com$ikea$core$stl$placement.SnapPlacementActor, 'Companion', Companion_getInstance_68);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n var $com$ikea$core$stl$placement$snapsorting = $com$ikea$core$stl$placement.snapsorting || ($com$ikea$core$stl$placement.snapsorting = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n var $com$ikea$core$stl$placement$snapsorting = $com$ikea$core$stl$placement.snapsorting || ($com$ikea$core$stl$placement.snapsorting = {});\n $com$ikea$core$stl$placement$snapsorting.PriorityCriterion = PriorityCriterion;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n var $com$ikea$core$stl$placement$snapsorting = $com$ikea$core$stl$placement.snapsorting || ($com$ikea$core$stl$placement.snapsorting = {});\n $com$ikea$core$stl$placement$snapsorting.SnapSorter = SnapSorter;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n var $com$ikea$core$stl$placement$snapsorting = $com$ikea$core$stl$placement.snapsorting || ($com$ikea$core$stl$placement.snapsorting = {});\n $com$ikea$core$stl$placement$snapsorting.SnapSorterBuilder = SnapSorterBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n var $com$ikea$core$stl$placement$snapsorting = $com$ikea$core$stl$placement.snapsorting || ($com$ikea$core$stl$placement.snapsorting = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$placement = $com$ikea$core$stl.placement || ($com$ikea$core$stl.placement = {});\n var $com$ikea$core$stl$placement$utils = $com$ikea$core$stl$placement.utils || ($com$ikea$core$stl$placement.utils = {});\n defineProp($com$ikea$core$stl$placement$utils, 'SpaceFinderUtils', SpaceFinderUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$propping = $com$ikea$core$stl.propping || ($com$ikea$core$stl.propping = {});\n $com$ikea$core$stl$propping.ProppingData = ProppingData;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$propping = $com$ikea$core$stl.propping || ($com$ikea$core$stl.propping = {});\n $com$ikea$core$stl$propping.ProppingHostConnectorsComponent = ProppingHostConnectorsComponent;\n defineProp($com$ikea$core$stl$propping.ProppingHostConnectorsComponent, 'Companion', Companion_getInstance_70);\n $com$ikea$core$stl$propping.ProppingHostConnectorData = ProppingHostConnectorData;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$propping = $com$ikea$core$stl.propping || ($com$ikea$core$stl.propping = {});\n $com$ikea$core$stl$propping.ProppingInfoComponent = ProppingInfoComponent;\n defineProp($com$ikea$core$stl$propping.ProppingInfoComponent, 'Companion', Companion_getInstance_71);\n $com$ikea$core$stl$propping.PropHolderInfo = PropHolderInfo;\n $com$ikea$core$stl$propping.getPropHolderInfo = getPropHolderInfo;\n $com$ikea$core$stl$propping.getPropping = getPropping;\n $com$ikea$core$stl$propping.setPropping = setPropping;\n $com$ikea$core$stl$propping.getColliderBox = getColliderBox;\n $com$ikea$core$stl$propping.getOldPropping = getOldPropping;\n $com$ikea$core$stl$propping.setOldPropping = setOldPropping;\n $com$ikea$core$stl$propping.removePropping = removePropping;\n $com$ikea$core$stl$propping.clearOldPropping = clearOldPropping;\n $com$ikea$core$stl$propping.restoreOldPropping = restoreOldPropping;\n $com$ikea$core$stl$propping.getShapeComponent = getShapeComponent;\n $com$ikea$core$stl$propping.setProppingProperty = setProppingProperty;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$propping = $com$ikea$core$stl.propping || ($com$ikea$core$stl.propping = {});\n $com$ikea$core$stl$propping.ProppingSystem = ProppingSystem;\n defineProp($com$ikea$core$stl$propping.ProppingSystem, 'Companion', Companion_getInstance_72);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$range = $com$ikea$core$stl.range || ($com$ikea$core$stl.range = {});\n $com$ikea$core$stl$range.CommunicationSizeComponent = CommunicationSizeComponent;\n defineProp($com$ikea$core$stl$range.CommunicationSizeComponent, 'Companion', Companion_getInstance_75);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$range = $com$ikea$core$stl.range || ($com$ikea$core$stl.range = {});\n defineProp($com$ikea$core$stl$range, 'DoorComponent', DoorComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$range = $com$ikea$core$stl.range || ($com$ikea$core$stl.range = {});\n defineProp($com$ikea$core$stl$range, 'DoorFrontComponent', DoorFrontComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$range = $com$ikea$core$stl.range || ($com$ikea$core$stl.range = {});\n defineProp($com$ikea$core$stl$range, 'DrawerComponent', DrawerComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$range = $com$ikea$core$stl.range || ($com$ikea$core$stl.range = {});\n defineProp($com$ikea$core$stl$range, 'FrameComponent', FrameComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$range = $com$ikea$core$stl.range || ($com$ikea$core$stl.range = {});\n defineProp($com$ikea$core$stl$range, 'HandleComponent', HandleComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$range = $com$ikea$core$stl.range || ($com$ikea$core$stl.range = {});\n defineProp($com$ikea$core$stl$range, 'IncludedHandleComponent', IncludedHandleComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$range = $com$ikea$core$stl.range || ($com$ikea$core$stl.range = {});\n defineProp($com$ikea$core$stl$range, 'LegComponent', LegComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$range = $com$ikea$core$stl.range || ($com$ikea$core$stl.range = {});\n $com$ikea$core$stl$range.LightComponent = LightComponent;\n defineProp($com$ikea$core$stl$range.LightComponent, 'Companion', Companion_getInstance_76);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$replace = $com$ikea$core$stl.replace || ($com$ikea$core$stl.replace = {});\n defineProp($com$ikea$core$stl$replace, 'ReplaceAssemblyPartUtils', ReplaceAssemblyPartUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$replace = $com$ikea$core$stl.replace || ($com$ikea$core$stl.replace = {});\n $com$ikea$core$stl$replace.ReplacePartResult = ReplacePartResult;\n defineProp($com$ikea$core$stl$replace.ReplacePartResult, 'Companion', Companion_getInstance_77);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$replace = $com$ikea$core$stl.replace || ($com$ikea$core$stl.replace = {});\n $com$ikea$core$stl$replace.ReplacePlacementResult = ReplacePlacementResult;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$replace = $com$ikea$core$stl.replace || ($com$ikea$core$stl.replace = {});\n defineProp($com$ikea$core$stl$replace, 'ReplaceUtils', ReplaceUtils_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n $com$ikea$core$stl$room.RoomComponentDeserializer = RoomComponentDeserializer;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n defineProp($com$ikea$core$stl$room, 'RoomConnectorConstants', RoomConnectorConstants_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n $com$ikea$core$stl$room.CoreRoomGeometryData = CoreRoomGeometryData;\n defineProp($com$ikea$core$stl$room.CoreRoomGeometryData, 'Companion', Companion_getInstance_78);\n $com$ikea$core$stl$room.CoreRoomSurface = CoreRoomSurface;\n defineProp($com$ikea$core$stl$room.CoreRoomSurface, 'Companion', Companion_getInstance_79);\n $com$ikea$core$stl$room.RoomSurfaceGeometryImpl = RoomSurfaceGeometryImpl;\n defineProp($com$ikea$core$stl$room.RoomSurfaceGeometryImpl, 'Companion', Companion_getInstance_80);\n $com$ikea$core$stl$room.CoreRoomEdge = CoreRoomEdge;\n defineProp($com$ikea$core$stl$room.CoreRoomEdge, 'Companion', Companion_getInstance_81);\n $com$ikea$core$stl$room.CoreRoomVertex = CoreRoomVertex;\n defineProp($com$ikea$core$stl$room.CoreRoomVertex, 'Companion', Companion_getInstance_82);\n $com$ikea$core$stl$room.CoreRoomObstacle = CoreRoomObstacle;\n defineProp($com$ikea$core$stl$room.CoreRoomObstacle, 'Companion', Companion_getInstance_83);\n $com$ikea$core$stl$room.CoreRoomBoundingBox = CoreRoomBoundingBox;\n defineProp($com$ikea$core$stl$room.CoreRoomBoundingBox, 'Companion', Companion_getInstance_84);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n $com$ikea$core$stl$room.RoomService = RoomService;\n $com$ikea$core$stl$room.RoomService.generateDisabledConnectorsComponent$default = generateDisabledConnectorsComponent$default;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$component = $com$ikea$core$stl$room.component || ($com$ikea$core$stl$room.component = {});\n defineProp($com$ikea$core$stl$room$component, 'RoomComponent', RoomComponent_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$component = $com$ikea$core$stl$room.component || ($com$ikea$core$stl$room.component = {});\n $com$ikea$core$stl$room$component.RoomConnectorRelationsComponent = RoomConnectorRelationsComponent;\n defineProp($com$ikea$core$stl$room$component.RoomConnectorRelationsComponent, 'Companion', Companion_getInstance_86);\n $com$ikea$core$stl$room$component.RoomConnectorKeysForSurface = RoomConnectorKeysForSurface;\n $com$ikea$core$stl$room$component.RoomConnectorKeysForEdge = RoomConnectorKeysForEdge;\n $com$ikea$core$stl$room$component.RoomConnectorKeysForCorner = RoomConnectorKeysForCorner;\n $com$ikea$core$stl$room$component.RoomConnectorsForSurface = RoomConnectorsForSurface;\n $com$ikea$core$stl$room$component.RoomConnectorsForEdge = RoomConnectorsForEdge;\n $com$ikea$core$stl$room$component.RoomConnectorsForCorner = RoomConnectorsForCorner;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$component = $com$ikea$core$stl$room.component || ($com$ikea$core$stl$room.component = {});\n $com$ikea$core$stl$room$component.RoomDimensionsComponent = RoomDimensionsComponent;\n defineProp($com$ikea$core$stl$room$component.RoomDimensionsComponent, 'Companion', Companion_getInstance_87);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$component = $com$ikea$core$stl$room.component || ($com$ikea$core$stl$room.component = {});\n $com$ikea$core$stl$room$component.RoomGeometryComponent = RoomGeometryComponent;\n defineProp($com$ikea$core$stl$room$component.RoomGeometryComponent, 'Companion', Companion_getInstance_88);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$component = $com$ikea$core$stl$room.component || ($com$ikea$core$stl$room.component = {});\n $com$ikea$core$stl$room$component.RoomPartComponent = RoomPartComponent;\n defineProp($com$ikea$core$stl$room$component.RoomPartComponent, 'Companion', Companion_getInstance_89);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$interceptor = $com$ikea$core$stl$room.interceptor || ($com$ikea$core$stl$room.interceptor = {});\n $com$ikea$core$stl$room$interceptor.RoomRefToRoomComponentInterceptor = RoomRefToRoomComponentInterceptor;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$system = $com$ikea$core$stl$room.system || ($com$ikea$core$stl$room.system = {});\n $com$ikea$core$stl$room$system.RoomDimensionToGeometrySystem = RoomDimensionToGeometrySystem;\n defineProp($com$ikea$core$stl$room$system.RoomDimensionToGeometrySystem, 'Companion', Companion_getInstance_90);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$system = $com$ikea$core$stl$room.system || ($com$ikea$core$stl$room.system = {});\n $com$ikea$core$stl$room$system.RoomServiceDragSystem = RoomServiceDragSystem;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$system = $com$ikea$core$stl$room.system || ($com$ikea$core$stl$room.system = {});\n $com$ikea$core$stl$room$system.RoomSystem = RoomSystem;\n defineProp($com$ikea$core$stl$room$system.RoomSystem, 'Companion', Companion_getInstance_91);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$utils = $com$ikea$core$stl$room.utils || ($com$ikea$core$stl$room.utils = {});\n $com$ikea$core$stl$room$utils.RoomColliderUtilities = RoomColliderUtilities;\n defineProp($com$ikea$core$stl$room$utils.RoomColliderUtilities, 'Companion', Companion_getInstance_92);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$utils = $com$ikea$core$stl$room.utils || ($com$ikea$core$stl$room.utils = {});\n $com$ikea$core$stl$room$utils.RoomConnectorPair = RoomConnectorPair;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$utils = $com$ikea$core$stl$room.utils || ($com$ikea$core$stl$room.utils = {});\n $com$ikea$core$stl$room$utils.RoomConnectorRelationsMapper = RoomConnectorRelationsMapper;\n defineProp($com$ikea$core$stl$room$utils.RoomConnectorRelationsMapper, 'Companion', Companion_getInstance_93);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$utils = $com$ikea$core$stl$room.utils || ($com$ikea$core$stl$room.utils = {});\n $com$ikea$core$stl$room$utils.RoomConnectorUtilities = RoomConnectorUtilities;\n defineProp($com$ikea$core$stl$room$utils.RoomConnectorUtilities, 'Companion', Companion_getInstance_94);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$room = $com$ikea$core$stl.room || ($com$ikea$core$stl.room = {});\n var $com$ikea$core$stl$room$utils = $com$ikea$core$stl$room.utils || ($com$ikea$core$stl$room.utils = {});\n $com$ikea$core$stl$room$utils.RoomGeometryUtilities = RoomGeometryUtilities;\n defineProp($com$ikea$core$stl$room$utils.RoomGeometryUtilities, 'Companion', Companion_getInstance_95);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$selection = $com$ikea$core$stl.selection || ($com$ikea$core$stl.selection = {});\n $com$ikea$core$stl$selection.StandardSelectionService = StandardSelectionService;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$selection = $com$ikea$core$stl.selection || ($com$ikea$core$stl.selection = {});\n $com$ikea$core$stl$selection.StandardSelectionSystem = StandardSelectionSystem;\n $com$ikea$core$stl$selection.StandardSelectionSystem.StandardSelectionSystemFromCoreServices = StandardSelectionSystemFromCoreServices;\n defineProp($com$ikea$core$stl$selection.StandardSelectionSystem, 'Companion', Companion_getInstance_96);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$system = $com$ikea$core$stl.system || ($com$ikea$core$stl.system = {});\n defineProp($com$ikea$core$stl$system, 'StlSystemIds', StlSystemIds_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$test = $com$ikea$core$stl.test || ($com$ikea$core$stl.test = {});\n $com$ikea$core$stl$test.DragExtensions = DragExtensions;\n defineProp($com$ikea$core$stl$test.DragExtensions, 'Companion', Companion_getInstance_97);\n $com$ikea$core$stl$test.simulateEntireDragInSteps = simulateEntireDragInSteps;\n $com$ikea$core$stl$test.simulateEntireDrag = simulateEntireDrag;\n $com$ikea$core$stl$test.simulateStartDrag = simulateStartDrag;\n $com$ikea$core$stl$test.simulateOngoingDrag = simulateOngoingDrag;\n $com$ikea$core$stl$test.simulateEndDrag = simulateEndDrag;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$test = $com$ikea$core$stl.test || ($com$ikea$core$stl.test = {});\n defineProp($com$ikea$core$stl$test, 'ViewerDragState', ViewerDragState_getInstance);\n $com$ikea$core$stl$test.simulateEntireViewerDragInSteps = simulateEntireViewerDragInSteps;\n $com$ikea$core$stl$test.simulateViewerStartDrag = simulateViewerStartDrag;\n $com$ikea$core$stl$test.simulateViewerOngoingDrag = simulateViewerOngoingDrag;\n $com$ikea$core$stl$test.simulateViewerEndDrag = simulateViewerEndDrag;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$validation = $com$ikea$core$stl.validation || ($com$ikea$core$stl.validation = {});\n $com$ikea$core$stl$validation.AllowedNumberOfChildrenOfTypeValidation = AllowedNumberOfChildrenOfTypeValidation;\n defineProp($com$ikea$core$stl$validation.AllowedNumberOfChildrenOfTypeValidation, 'Companion', Companion_getInstance_98);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$validation = $com$ikea$core$stl.validation || ($com$ikea$core$stl.validation = {});\n $com$ikea$core$stl$validation.DisallowSeparateRequiredHostsValidation = DisallowSeparateRequiredHostsValidation;\n defineProp($com$ikea$core$stl$validation.DisallowSeparateRequiredHostsValidation, 'Companion', Companion_getInstance_99);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$validation = $com$ikea$core$stl.validation || ($com$ikea$core$stl.validation = {});\n $com$ikea$core$stl$validation.InvalidNumberOfChildren = InvalidNumberOfChildren;\n defineProp($com$ikea$core$stl$validation.InvalidNumberOfChildren, 'Companion', Companion_getInstance_100);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$validation = $com$ikea$core$stl.validation || ($com$ikea$core$stl.validation = {});\n $com$ikea$core$stl$validation.PlacementZoneValidation = PlacementZoneValidation;\n defineProp($com$ikea$core$stl$validation.PlacementZoneValidation, 'Companion', Companion_getInstance_101);\n $com$ikea$core$stl$validation.PlacementZoneWarning = PlacementZoneWarning;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$validation = $com$ikea$core$stl.validation || ($com$ikea$core$stl.validation = {});\n $com$ikea$core$stl$validation.RequiredConnectorsSatisfiedValidation = RequiredConnectorsSatisfiedValidation;\n defineProp($com$ikea$core$stl$validation.RequiredConnectorsSatisfiedValidation, 'Companion', Companion_getInstance_102);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$validation = $com$ikea$core$stl.validation || ($com$ikea$core$stl.validation = {});\n $com$ikea$core$stl$validation.RequiredConnectorsValidationResult = RequiredConnectorsValidationResult;\n defineProp($com$ikea$core$stl$validation.RequiredConnectorsValidationResult, 'Companion', Companion_getInstance_103);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$validation = $com$ikea$core$stl.validation || ($com$ikea$core$stl.validation = {});\n defineProp($com$ikea$core$stl$validation, 'ValidationResultIds', ValidationResultIds_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$validation = $com$ikea$core$stl.validation || ($com$ikea$core$stl.validation = {});\n defineProp($com$ikea$core$stl$validation, 'ValidationRuleIds', ValidationRuleIds_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n $com$ikea$core$stl$visualization.CoreVisualization = CoreVisualization;\n $com$ikea$core$stl$visualization.CoreVisualization.setEnabled$default = setEnabled$default;\n $com$ikea$core$stl$visualization.VisualizationState = VisualizationState;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$component = $com$ikea$core$stl$visualization.component || ($com$ikea$core$stl$visualization.component = {});\n $com$ikea$core$stl$visualization$component.ColliderVisualizationConfigComponent = ColliderVisualizationConfigComponent;\n defineProp($com$ikea$core$stl$visualization$component.ColliderVisualizationConfigComponent, 'Companion', Companion_getInstance_104);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$component = $com$ikea$core$stl$visualization.component || ($com$ikea$core$stl$visualization.component = {});\n $com$ikea$core$stl$visualization$component.ColliderVisualizationNodeComponent = ColliderVisualizationNodeComponent;\n defineProp($com$ikea$core$stl$visualization$component.ColliderVisualizationNodeComponent, 'Companion', Companion_getInstance_105);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$component = $com$ikea$core$stl$visualization.component || ($com$ikea$core$stl$visualization.component = {});\n $com$ikea$core$stl$visualization$component.ColliderVisualizerViewerObjectsComponent = ColliderVisualizerViewerObjectsComponent;\n defineProp($com$ikea$core$stl$visualization$component.ColliderVisualizerViewerObjectsComponent, 'Companion', Companion_getInstance_106);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$component = $com$ikea$core$stl$visualization.component || ($com$ikea$core$stl$visualization.component = {});\n $com$ikea$core$stl$visualization$component.ConnectorVisualizationConfigComponent = ConnectorVisualizationConfigComponent;\n defineProp($com$ikea$core$stl$visualization$component.ConnectorVisualizationConfigComponent, 'Companion', Companion_getInstance_107);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$component = $com$ikea$core$stl$visualization.component || ($com$ikea$core$stl$visualization.component = {});\n $com$ikea$core$stl$visualization$component.ConnectorVisualizationNodeComponent = ConnectorVisualizationNodeComponent;\n defineProp($com$ikea$core$stl$visualization$component.ConnectorVisualizationNodeComponent, 'Companion', Companion_getInstance_108);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$component = $com$ikea$core$stl$visualization.component || ($com$ikea$core$stl$visualization.component = {});\n $com$ikea$core$stl$visualization$component.ConnectorVisualizerViewerObjectsComponent = ConnectorVisualizerViewerObjectsComponent;\n defineProp($com$ikea$core$stl$visualization$component.ConnectorVisualizerViewerObjectsComponent, 'Companion', Companion_getInstance_109);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$component = $com$ikea$core$stl$visualization.component || ($com$ikea$core$stl$visualization.component = {});\n $com$ikea$core$stl$visualization$component.DecoratorComponent = DecoratorComponent;\n defineProp($com$ikea$core$stl$visualization$component.DecoratorComponent, 'Companion', Companion_getInstance_110);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$component = $com$ikea$core$stl$visualization.component || ($com$ikea$core$stl$visualization.component = {});\n $com$ikea$core$stl$visualization$component.EntityColliderVisualizationComponent = EntityColliderVisualizationComponent;\n defineProp($com$ikea$core$stl$visualization$component.EntityColliderVisualizationComponent, 'Companion', Companion_getInstance_111);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$component = $com$ikea$core$stl$visualization.component || ($com$ikea$core$stl$visualization.component = {});\n $com$ikea$core$stl$visualization$component.EntityConnectorVisualizationComponent = EntityConnectorVisualizationComponent;\n defineProp($com$ikea$core$stl$visualization$component.EntityConnectorVisualizationComponent, 'Companion', Companion_getInstance_112);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$component = $com$ikea$core$stl$visualization.component || ($com$ikea$core$stl$visualization.component = {});\n $com$ikea$core$stl$visualization$component.PolyhedronVisualizationNodeComponent = PolyhedronVisualizationNodeComponent;\n defineProp($com$ikea$core$stl$visualization$component.PolyhedronVisualizationNodeComponent, 'Companion', Companion_getInstance_113);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$polyhedron = $com$ikea$core$stl$visualization.polyhedron || ($com$ikea$core$stl$visualization.polyhedron = {});\n $com$ikea$core$stl$visualization$polyhedron.AutoAdaptHostZoneVisualizationSystem = AutoAdaptHostZoneVisualizationSystem;\n defineProp($com$ikea$core$stl$visualization$polyhedron.AutoAdaptHostZoneVisualizationSystem, 'Companion', Companion_getInstance_114);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$polyhedron = $com$ikea$core$stl$visualization.polyhedron || ($com$ikea$core$stl$visualization.polyhedron = {});\n $com$ikea$core$stl$visualization$polyhedron.DragProjectionPointVisualizationSystem = DragProjectionPointVisualizationSystem;\n defineProp($com$ikea$core$stl$visualization$polyhedron.DragProjectionPointVisualizationSystem, 'Companion', Companion_getInstance_115);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$polyhedron = $com$ikea$core$stl$visualization.polyhedron || ($com$ikea$core$stl$visualization.polyhedron = {});\n $com$ikea$core$stl$visualization$polyhedron.FunctionalMarginVisualizationSystem = FunctionalMarginVisualizationSystem;\n defineProp($com$ikea$core$stl$visualization$polyhedron.FunctionalMarginVisualizationSystem, 'Companion', Companion_getInstance_116);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$polyhedron = $com$ikea$core$stl$visualization.polyhedron || ($com$ikea$core$stl$visualization.polyhedron = {});\n $com$ikea$core$stl$visualization$polyhedron.FunctionalZoneVisualizationSystem = FunctionalZoneVisualizationSystem;\n defineProp($com$ikea$core$stl$visualization$polyhedron.FunctionalZoneVisualizationSystem, 'Companion', Companion_getInstance_117);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$polyhedron = $com$ikea$core$stl$visualization.polyhedron || ($com$ikea$core$stl$visualization.polyhedron = {});\n $com$ikea$core$stl$visualization$polyhedron.PolyhedronVisualizationHolderComponent = PolyhedronVisualizationHolderComponent;\n defineProp($com$ikea$core$stl$visualization$polyhedron.PolyhedronVisualizationHolderComponent, 'Companion', Companion_getInstance_118);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$polyhedron = $com$ikea$core$stl$visualization.polyhedron || ($com$ikea$core$stl$visualization.polyhedron = {});\n $com$ikea$core$stl$visualization$polyhedron.PolyhedronVisualizationSystem = PolyhedronVisualizationSystem;\n $com$ikea$core$stl$visualization$polyhedron.PolyhedronVisualizationSystem.createPolyhedronVisualization$default = createPolyhedronVisualization$default;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$system = $com$ikea$core$stl$visualization.system || ($com$ikea$core$stl$visualization.system = {});\n $com$ikea$core$stl$visualization$system.ColliderVisualizationSystem = ColliderVisualizationSystem;\n defineProp($com$ikea$core$stl$visualization$system.ColliderVisualizationSystem, 'Companion', Companion_getInstance_119);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$system = $com$ikea$core$stl$visualization.system || ($com$ikea$core$stl$visualization.system = {});\n $com$ikea$core$stl$visualization$system.ConnectorVisualizationSystem = ConnectorVisualizationSystem;\n defineProp($com$ikea$core$stl$visualization$system.ConnectorVisualizationSystem, 'Companion', Companion_getInstance_120);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$system = $com$ikea$core$stl$visualization.system || ($com$ikea$core$stl$visualization.system = {});\n $com$ikea$core$stl$visualization$system.EntityColliderVisualizationSystem = EntityColliderVisualizationSystem;\n defineProp($com$ikea$core$stl$visualization$system.EntityColliderVisualizationSystem, 'Companion', Companion_getInstance_121);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$system = $com$ikea$core$stl$visualization.system || ($com$ikea$core$stl$visualization.system = {});\n $com$ikea$core$stl$visualization$system.CollisionVisualizationSceneDataComponent = CollisionVisualizationSceneDataComponent;\n defineProp($com$ikea$core$stl$visualization$system.CollisionVisualizationSceneDataComponent, 'Companion', Companion_getInstance_122);\n $com$ikea$core$stl$visualization$system.CollisionVisualizationSceneData = CollisionVisualizationSceneData;\n $com$ikea$core$stl$visualization$system.EntityCollisionVisualizationSystem = EntityCollisionVisualizationSystem;\n $com$ikea$core$stl$visualization$system.EntityCollisionVisualizationSystem.foldCollisions$default = foldCollisions$default;\n defineProp($com$ikea$core$stl$visualization$system.EntityCollisionVisualizationSystem, 'Companion', Companion_getInstance_123);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$system = $com$ikea$core$stl$visualization.system || ($com$ikea$core$stl$visualization.system = {});\n $com$ikea$core$stl$visualization$system.EntityConnectorVisualizationSystem = EntityConnectorVisualizationSystem;\n defineProp($com$ikea$core$stl$visualization$system.EntityConnectorVisualizationSystem, 'Companion', Companion_getInstance_124);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$system = $com$ikea$core$stl$visualization.system || ($com$ikea$core$stl$visualization.system = {});\n $com$ikea$core$stl$visualization$system.ForcedComponentBaseSystem = ForcedComponentBaseSystem;\n $com$ikea$core$stl$visualization$system.ForcedComponentBaseSystem.addConfigComponentToEntities$default = addConfigComponentToEntities$default;\n $com$ikea$core$stl$visualization$system.ForcedComponentBaseSystem.removeConfigComponentFromEntities$default = removeConfigComponentFromEntities$default;\n $com$ikea$core$stl$visualization$system.ForcedComponentBaseSystem.removeConfigComponentFromEntity$default = removeConfigComponentFromEntity$default;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$visualizer = $com$ikea$core$stl$visualization.visualizer || ($com$ikea$core$stl$visualization.visualizer = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$visualizer = $com$ikea$core$stl$visualization.visualizer || ($com$ikea$core$stl$visualization.visualizer = {});\n $com$ikea$core$stl$visualization$visualizer.CollisionVisualizationData = CollisionVisualizationData;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$visualizer = $com$ikea$core$stl$visualization.visualizer || ($com$ikea$core$stl$visualization.visualizer = {});\n $com$ikea$core$stl$visualization$visualizer.Color = Color;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$visualizer = $com$ikea$core$stl$visualization.visualizer || ($com$ikea$core$stl$visualization.visualizer = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$visualizer = $com$ikea$core$stl$visualization.visualizer || ($com$ikea$core$stl$visualization.visualizer = {});\n $com$ikea$core$stl$visualization$visualizer.DefaultVisualizer = DefaultVisualizer;\n defineProp($com$ikea$core$stl$visualization$visualizer.DefaultVisualizer, 'Companion', Companion_getInstance_125);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$visualizer = $com$ikea$core$stl$visualization.visualizer || ($com$ikea$core$stl$visualization.visualizer = {});\n $com$ikea$core$stl$visualization$visualizer.setRandomColor = setRandomColor;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$visualizer = $com$ikea$core$stl$visualization.visualizer || ($com$ikea$core$stl$visualization.visualizer = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$stl = $com$ikea$core.stl || ($com$ikea$core.stl = {});\n var $com$ikea$core$stl$visualization = $com$ikea$core$stl.visualization || ($com$ikea$core$stl.visualization = {});\n var $com$ikea$core$stl$visualization$visualizer = $com$ikea$core$stl$visualization.visualizer || ($com$ikea$core$stl$visualization.visualizer = {});\n $com$ikea$core$stl$visualization$visualizer.VisualizerUtils = VisualizerUtils;\n defineProp($com$ikea$core$stl$visualization$visualizer.VisualizerUtils, 'Companion', Companion_getInstance_126);\n }\n $jsExportAll$(_);\n _.$jsExportAll$ = $jsExportAll$;\n _.$_$ = _.$_$ || {};\n _.$_$.a = AlignmentConnectionCreationSystem;\n _.$_$.b = AlignmentConnectionsComponent;\n _.$_$.c = AlignmentPlane;\n _.$_$.d = HandleRotationSystem;\n _.$_$.e = HostConnectorRotationValidation;\n _.$_$.f = AlignmentLinesSystem;\n _.$_$.g = AllowedDoorPairsComponent;\n _.$_$.h = AllowedDoorPairsValidation;\n _.$_$.i = AssemblyInstructionsServiceImpl;\n _.$_$.j = AutoAdaptSessionComponent;\n _.$_$.k = AutoAdaptGuestComponent;\n _.$_$.l = AutoAdaptHostComponent;\n _.$_$.m = AutoAdaptVariantComponent;\n _.$_$.n = ForceAutoAdaptWhenParentIsDraggedComponent;\n _.$_$.o = ReplacedWithAutoAdaptEventComponent;\n _.$_$.p = AutoAdaptDragStrategy;\n _.$_$.q = DragSurfaceCanHostWithAutoAdaptSelector;\n _.$_$.r = AutoAdaptProductSpecificationsSystem;\n _.$_$.s = AutoAdaptService;\n _.$_$.t = get_variantEntities;\n _.$_$.u = DebugLineDrawingSystem;\n _.$_$.v = LoggingEntityManagerWatcher;\n _.$_$.w = MeasuringEntityManagerWatcher;\n _.$_$.x = ResolveCollisionsDragStrategy;\n _.$_$.y = SnapCardinalDirectionsDragStrategy;\n _.$_$.z = SnapClosestDragStrategy;\n _.$_$.a1 = SnapClosestWithSubConnectorsDragStrategy;\n _.$_$.b1 = ValidDragStrategyResult;\n _.$_$.c1 = DragProjectionPointComponent;\n _.$_$.d1 = XYPlaneProjector;\n _.$_$.e1 = DragSurfaceCanHostSelector;\n _.$_$.f1 = DragSurfaceOnlyRoomSelector;\n _.$_$.g1 = LegacyCanvasTo3DDragConverterSystem;\n _.$_$.h1 = DragStateComponent;\n _.$_$.i1 = DragState;\n _.$_$.j1 = DragSurfaceNormalVisualizationSystem;\n _.$_$.k1 = DragSurfaceVisualizationSystem;\n _.$_$.l1 = DragSystem;\n _.$_$.m1 = DrawDragGhostSystem;\n _.$_$.n1 = HigherPriorityAlignmentPostProcess;\n _.$_$.o1 = FunctionalMarginComponent;\n _.$_$.p1 = FunctionalMarginShapeComponent;\n _.$_$.q1 = FunctionalMarginSystem;\n _.$_$.r1 = FunctionalMarginValidation;\n _.$_$.s1 = FunctionalZonesLocalComponent;\n _.$_$.t1 = FunctionalZonesLocalToWorldSystem;\n _.$_$.u1 = FunctionalZone;\n _.$_$.v1 = ICFDataService;\n _.$_$.w1 = LabelComponent;\n _.$_$.x1 = DebugLogger;\n _.$_$.y1 = ColoredOutlineComponent;\n _.$_$.z1 = ColoredOutlineSystem;\n _.$_$.a2 = OutlineBlockingComponent;\n _.$_$.b2 = OutlineEntityGroupDeselectSystem;\n _.$_$.c2 = OutlineSelectedSystem;\n _.$_$.d2 = OutlineSystem;\n _.$_$.e2 = OutlinedComponent;\n _.$_$.f2 = SnapSorterBuilder;\n _.$_$.g2 = PlacementResult;\n _.$_$.h2 = PlacementService;\n _.$_$.i2 = PlacementZoneByHeightComponent;\n _.$_$.j2 = RecommendedInitialPositionFromFloorComponent;\n _.$_$.k2 = SnapPlacementActor;\n _.$_$.l2 = recommendedPosition;\n _.$_$.m2 = ProppingSystem;\n _.$_$.n2 = CommunicationSizeComponent;\n _.$_$.o2 = LightComponent;\n _.$_$.p2 = ReplacePartResult;\n _.$_$.q2 = RoomDimensionsComponent;\n _.$_$.r2 = RoomPartComponent;\n _.$_$.s2 = RoomSystem;\n _.$_$.t2 = RoomBoundingBox;\n _.$_$.u2 = RoomComponentDeserializer;\n _.$_$.v2 = RoomCorner;\n _.$_$.w2 = RoomEdge;\n _.$_$.x2 = RoomGeometryData;\n _.$_$.y2 = RoomObstacle;\n _.$_$.z2 = RoomPoint3D;\n _.$_$.a3 = RoomRotation;\n _.$_$.b3 = RoomService;\n _.$_$.c3 = RoomSurface;\n _.$_$.d3 = RoomTransform;\n _.$_$.e3 = StandardSelectionService;\n _.$_$.f3 = AllowedNumberOfChildrenOfTypeValidation;\n _.$_$.g3 = DisallowSeparateRequiredHostsValidation;\n _.$_$.h3 = PlacementZoneValidation;\n _.$_$.i3 = RequiredConnectorsSatisfiedValidation;\n _.$_$.j3 = ConnectorVisualizationData;\n _.$_$.k3 = DecoratorComponent;\n _.$_$.l3 = EntityColliderVisualizationComponent;\n _.$_$.m3 = EntityConnectorVisualizationComponent;\n _.$_$.n3 = AutoAdaptHostZoneVisualizationSystem;\n _.$_$.o3 = DragProjectionPointVisualizationSystem;\n _.$_$.p3 = FunctionalMarginVisualizationSystem;\n _.$_$.q3 = FunctionalZoneVisualizationSystem;\n _.$_$.r3 = ColliderVisualizationSystem;\n _.$_$.s3 = ConnectorVisualizationSystem;\n _.$_$.t3 = EntityColliderVisualizationSystem;\n _.$_$.u3 = EntityCollisionVisualizationSystem;\n _.$_$.v3 = EntityConnectorVisualizationSystem;\n _.$_$.w3 = Color;\n _.$_$.x3 = DefaultVisualizer;\n _.$_$.y3 = CoreVisualization;\n _.$_$.z3 = AllowedDoorPairsComponentFromArrays;\n _.$_$.a4 = AnyDragSurfaceProjectorFromCoreServices;\n _.$_$.b4 = CanvasTo3DDragConverterSystemFromCoreServices;\n _.$_$.c4 = StandardSelectionSystemFromCoreServices;\n _.$_$.d4 = Companion_instance_47;\n _.$_$.e4 = Companion_instance_49;\n _.$_$.f4 = Companion_instance_50;\n _.$_$.g4 = AutoAdaptFeature_instance;\n _.$_$.h4 = AutoAdaptUtils_getInstance;\n _.$_$.i4 = FreeMoveComponent_instance;\n _.$_$.j4 = IsDraggedComponent_instance;\n _.$_$.k4 = SpaceFinderUtils_getInstance;\n _.$_$.l4 = PlacementHelper_getInstance;\n _.$_$.m4 = Companion_instance_88;\n _.$_$.n4 = Companion_instance_90;\n _.$_$.o4 = Companion_instance_91;\n _.$_$.p4 = SearchDirectionsUtils_instance;\n _.$_$.q4 = DoorComponent_getInstance;\n _.$_$.r4 = DoorFrontComponent_getInstance;\n _.$_$.s4 = DrawerComponent_getInstance;\n _.$_$.t4 = FrameComponent_getInstance;\n _.$_$.u4 = HandleComponent_getInstance;\n _.$_$.v4 = LegComponent_getInstance;\n _.$_$.w4 = ReplaceAssemblyPartUtils_getInstance;\n _.$_$.x4 = ReplaceUtils_instance;\n _.$_$.y4 = RoomComponent_instance;\n _.$_$.z4 = RoomConnectorConstants_getInstance;\n _.$_$.a5 = StlSystemIds_instance;\n _.$_$.b5 = Companion_getInstance_97;\n _.$_$.c5 = ValidationResultIds_instance;\n _.$_$.d5 = ValidationRuleIds_instance;\n //endregion\n return _;\n}));\n\n//# sourceMappingURL=core-core-stl.js.map\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd)\n define(['exports', './kotlinx-serialization-kotlinx-serialization-core.js', './kotlin-kotlin-stdlib.js', './core-core-api.js', './kotlinx-serialization-kotlinx-serialization-json.js', './core-core-stl.js'], factory);\n else if (typeof exports === 'object')\n factory(module.exports, require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlin-kotlin-stdlib.js'), require('./core-core-api.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./core-core-stl.js'));\n else {\n if (typeof this['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-range-dynamic-range'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'core-core-range-dynamic-range'.\");\n }\n if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-range-dynamic-range'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'core-core-range-dynamic-range'.\");\n }\n if (typeof this['core-core-api'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-range-dynamic-range'. Its dependency 'core-core-api' was not found. Please, check whether 'core-core-api' is loaded prior to 'core-core-range-dynamic-range'.\");\n }\n if (typeof this['kotlinx-serialization-kotlinx-serialization-json'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-range-dynamic-range'. Its dependency 'kotlinx-serialization-kotlinx-serialization-json' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-json' is loaded prior to 'core-core-range-dynamic-range'.\");\n }\n if (typeof this['core-core-stl'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-range-dynamic-range'. Its dependency 'core-core-stl' was not found. Please, check whether 'core-core-stl' is loaded prior to 'core-core-range-dynamic-range'.\");\n }\n root['core-core-range-dynamic-range'] = factory(typeof this['core-core-range-dynamic-range'] === 'undefined' ? {} : this['core-core-range-dynamic-range'], this['kotlinx-serialization-kotlinx-serialization-core'], this['kotlin-kotlin-stdlib'], this['core-core-api'], this['kotlinx-serialization-kotlinx-serialization-json'], this['core-core-stl']);\n }\n}(this, function (_, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_kotlin, kotlin_core_core_api, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_core_core_stl) {\n 'use strict';\n //region block: imports\n var imul = Math.imul;\n var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;\n var Companion_instance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p;\n var toString = kotlin_kotlin.$_$.z9;\n var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.f1;\n var SerializationException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w2;\n var protoOf = kotlin_kotlin.$_$.u9;\n var THROW_CCE = kotlin_kotlin.$_$.ad;\n var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t2;\n var objectMeta = kotlin_kotlin.$_$.t9;\n var setMetadataFor = kotlin_kotlin.$_$.v9;\n var VOID = kotlin_kotlin.$_$.e;\n var getStringHashCode = kotlin_kotlin.$_$.z8;\n var classMeta = kotlin_kotlin.$_$.q8;\n var defineProp = kotlin_kotlin.$_$.s8;\n var charSequenceLength = kotlin_kotlin.$_$.o8;\n var LoggerState_getInstance = kotlin_core_core_api.$_$.fb;\n var Exception = kotlin_kotlin.$_$.uc;\n var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;\n var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.c;\n var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e2;\n var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x;\n var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s;\n var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d;\n var Unit_instance = kotlin_kotlin.$_$.x3;\n var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b2;\n var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;\n var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o2;\n var objectCreate = kotlin_kotlin.$_$.s9;\n var hashCode = kotlin_kotlin.$_$.a9;\n var equals = kotlin_kotlin.$_$.t8;\n var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.q;\n var reversedArray = kotlin_kotlin.$_$.g7;\n var Exception_init_$Create$ = kotlin_kotlin.$_$.z;\n var collectionSizeOrDefault = kotlin_kotlin.$_$.v4;\n var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;\n var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.h;\n var AssemblyStructureComponent = kotlin_core_core_api.$_$.i;\n var AssemblyPartsComponent = kotlin_core_core_api.$_$.g;\n var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.s;\n var mapCapacity = kotlin_kotlin.$_$.q6;\n var coerceAtLeast = kotlin_kotlin.$_$.fa;\n var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.p;\n var copyToArray = kotlin_kotlin.$_$.l5;\n var emptyList = kotlin_kotlin.$_$.o5;\n var toString_0 = kotlin_kotlin.$_$.ae;\n var Error_0 = kotlin_kotlin.$_$.tc;\n var ListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v;\n var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.h;\n var to = kotlin_kotlin.$_$.be;\n var toMap = kotlin_kotlin.$_$.w7;\n var emptyMap = kotlin_kotlin.$_$.p5;\n var Companion_getInstance = kotlin_core_core_api.$_$.k9;\n var toMutableList = kotlin_kotlin.$_$.y7;\n var Pair = kotlin_kotlin.$_$.yc;\n var createCustomAssembly = kotlin_core_core_api.$_$.o;\n var createCustomAssemblySpecification = kotlin_core_core_api.$_$.n;\n var ProductCatalog = kotlin_core_core_api.$_$.p;\n var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z1;\n var getKClassFromExpression = kotlin_kotlin.$_$.c;\n var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.n3;\n var ReferenceArraySerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i2;\n var ComponentIds_instance = kotlin_core_core_api.$_$.w9;\n var get_serializable = kotlin_core_core_api.$_$.w2;\n var get_doStoreInSnapshot = kotlin_core_core_api.$_$.v2;\n var Component = kotlin_core_core_api.$_$.x2;\n var $serializer_getInstance = kotlin_core_core_api.$_$.sb;\n var $serializer_getInstance_0 = kotlin_core_core_api.$_$.pb;\n var getKClass = kotlin_kotlin.$_$.d;\n var $serializer_getInstance_1 = kotlin_core_core_api.$_$.hb;\n var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q;\n var getBooleanHashCode = kotlin_kotlin.$_$.v8;\n var ConnectorVisualizationData = kotlin_core_core_stl.$_$.j3;\n var get_hierarchySequence = kotlin_core_core_api.$_$.c4;\n var mapNotNull = kotlin_kotlin.$_$.ya;\n var Companion_instance_0 = kotlin_core_core_api.$_$.yb;\n var Comparator = kotlin_kotlin.$_$.pc;\n var EntityConnectorVisualizationComponent = kotlin_core_core_stl.$_$.m3;\n var compareValues = kotlin_kotlin.$_$.d8;\n var Collection = kotlin_kotlin.$_$.z3;\n var isInterface = kotlin_kotlin.$_$.j9;\n var plus = kotlin_kotlin.$_$.b7;\n var toMutableList_0 = kotlin_kotlin.$_$.x7;\n var sortWith = kotlin_kotlin.$_$.k7;\n var sortWith_0 = kotlin_kotlin.$_$.l7;\n var SizeFromVector = kotlin_core_core_api.$_$.d9;\n var ColliderShapeComponent = kotlin_core_core_api.$_$.y;\n var ConnectorsComponent = kotlin_core_core_api.$_$.u1;\n var contains = kotlin_kotlin.$_$.x4;\n var filter = kotlin_kotlin.$_$.ua;\n var Map = kotlin_kotlin.$_$.g4;\n var toList = kotlin_kotlin.$_$.v7;\n var listOf = kotlin_kotlin.$_$.p6;\n var plus_0 = kotlin_kotlin.$_$.z6;\n var ProductSpecification = kotlin_core_core_api.$_$.s;\n var ModelInfoComponent = kotlin_core_core_api.$_$.o5;\n var RelativeConnectorsComponent = kotlin_core_core_api.$_$.d2;\n var SelectableComponent = kotlin_core_core_api.$_$.f6;\n var DraggableComponent = kotlin_core_core_api.$_$.q2;\n var ConnectionRootComponent = kotlin_core_core_api.$_$.k1;\n var DisplayNameComponent = kotlin_core_core_api.$_$.e5;\n var Vector = kotlin_core_core_api.$_$.c5;\n var TemplateDataComponent = kotlin_core_core_api.$_$.f5;\n var AlwaysHangDownComponent_instance = kotlin_core_core_api.$_$.zc;\n var UnserializableEntityComponent = kotlin_core_core_api.$_$.q6;\n var OutlineableComponent = kotlin_core_core_api.$_$.q5;\n var RecommendedInitialPositionFromFloorComponent = kotlin_core_core_stl.$_$.j2;\n var FunctionalMarginShapeComponent = kotlin_core_core_stl.$_$.p1;\n var FunctionalZonesLocalComponent = kotlin_core_core_stl.$_$.s1;\n var PlacementZoneByHeightComponent = kotlin_core_core_stl.$_$.i2;\n var AutoAdaptHostComponent = kotlin_core_core_stl.$_$.l;\n var isBlank = kotlin_kotlin.$_$.nb;\n var ModelTransformComponent = kotlin_core_core_api.$_$.p5;\n var AllowedDoorPairsComponent = kotlin_core_core_stl.$_$.g;\n var sortedWith = kotlin_kotlin.$_$.m7;\n var AutoAdaptGuestComponent = kotlin_core_core_stl.$_$.k;\n var CommunicationSizeComponent = kotlin_core_core_stl.$_$.n2;\n var LegComponent_getInstance = kotlin_core_core_stl.$_$.v4;\n var FrameComponent_getInstance = kotlin_core_core_stl.$_$.t4;\n var DoorComponent_getInstance = kotlin_core_core_stl.$_$.q4;\n var DoorFrontComponent_getInstance = kotlin_core_core_stl.$_$.r4;\n var HandleComponent_getInstance = kotlin_core_core_stl.$_$.u4;\n var DrawerComponent_getInstance = kotlin_core_core_stl.$_$.s4;\n var LightComponent = kotlin_core_core_stl.$_$.o2;\n var plus_1 = kotlin_kotlin.$_$.y6;\n var ProppingComponent_instance = kotlin_core_core_api.$_$.xb;\n var DragSurfacesComponent = kotlin_core_core_api.$_$.n2;\n var Companion_getInstance_0 = kotlin_core_core_api.$_$.pc;\n var DragProjectionPointComponent = kotlin_core_core_stl.$_$.c1;\n var ProductStructureConnection = kotlin_core_core_api.$_$.u;\n var ProductStructureItem = kotlin_core_core_api.$_$.v;\n var ProductStructureComponent = kotlin_core_core_api.$_$.t;\n var interfaceMeta = kotlin_kotlin.$_$.b9;\n var FunctionalZone = kotlin_core_core_stl.$_$.u1;\n var DoubleSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r;\n var AssemblyPartSnapInfo = kotlin_core_core_api.$_$.f;\n var Companion_getInstance_1 = kotlin_core_core_api.$_$.rb;\n var AssemblyPart = kotlin_core_core_api.$_$.h;\n var Companion_getInstance_2 = kotlin_core_core_api.$_$.kb;\n var Degrees = kotlin_core_core_api.$_$.s4;\n var Transform = kotlin_core_core_api.$_$.b5;\n var plus_2 = kotlin_kotlin.$_$.x6;\n var STRING_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i;\n var PrimitiveSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h1;\n var buildClassSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.n1;\n var PolyhedronUtils_getInstance = kotlin_core_core_api.$_$.qc;\n var Margin = kotlin_core_core_api.$_$.t4;\n var ensureNotNull = kotlin_kotlin.$_$.qd;\n var Size = kotlin_core_core_api.$_$.a5;\n var isArray = kotlin_kotlin.$_$.c9;\n var addAll = kotlin_kotlin.$_$.m4;\n var merge = kotlin_core_core_api.$_$.v6;\n var DOUBLE_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g;\n var isNaN_0 = kotlin_kotlin.$_$.ud;\n var DoubleCompanionObject_instance = kotlin_kotlin.$_$.h3;\n var getNumberHashCode = kotlin_kotlin.$_$.x8;\n var StringCompanionObject_instance = kotlin_kotlin.$_$.l3;\n var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;\n var ArraySerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u;\n var BOOLEAN_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f;\n var INT_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h;\n var Companion_getInstance_3 = kotlin_core_core_api.$_$.tb;\n var ConnectorType_instance = kotlin_core_core_api.$_$.fa;\n var Companion_instance_1 = kotlin_core_core_api.$_$.da;\n var NotImplementedError = kotlin_kotlin.$_$.xc;\n var RotationDegreeOfFreedom_ONE_getInstance = kotlin_core_core_api.$_$.z7;\n var RotationDegreeOfFreedom_NONE_getInstance = kotlin_core_core_api.$_$.y7;\n var PointConnector = kotlin_core_core_api.$_$.z1;\n var PointSeriesConnector = kotlin_core_core_api.$_$.a2;\n var EdgeConnector = kotlin_core_core_api.$_$.y1;\n var SurfaceConnector = kotlin_core_core_api.$_$.g2;\n var Companion_instance_2 = kotlin_core_core_api.$_$.ib;\n var RelativeConnectorRepositioner_instance = kotlin_core_core_api.$_$.ja;\n var ConnectorTagConstants_instance = kotlin_core_core_api.$_$.ea;\n var numberToInt = kotlin_kotlin.$_$.q9;\n var RelationOrigin = kotlin_core_core_api.$_$.y4;\n var firstOrNull = kotlin_kotlin.$_$.u5;\n var RelativeBoxOffset = kotlin_core_core_api.$_$.z4;\n var RelativeConnectorData = kotlin_core_core_api.$_$.c2;\n var CuboidFromSizeAndCenter = kotlin_core_core_api.$_$.g9;\n var DragSurface = kotlin_core_core_api.$_$.o2;\n var arrayOf = kotlin_kotlin.$_$.nd;\n var createKType = kotlin_kotlin.$_$.a;\n var serializer_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a3;\n var listSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r1;\n var serializer_1 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b3;\n var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.a;\n var get_jsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.n;\n var get_double = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.j;\n var Companion_instance_3 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b;\n var get_jsonArray = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.l;\n var JsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.f;\n var Companion_getInstance_4 = kotlin_core_core_api.$_$.lb;\n var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.g;\n var get_jsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.m;\n var JsonArray = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.d;\n var lazy = kotlin_kotlin.$_$.wd;\n var KProperty1 = kotlin_kotlin.$_$.na;\n var getPropertyCallableRef = kotlin_kotlin.$_$.y8;\n var createAnnotatedEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k2;\n var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.f;\n var lazy_0 = kotlin_kotlin.$_$.vd;\n var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j2;\n var THROW_IAE = kotlin_kotlin.$_$.bd;\n var Enum = kotlin_kotlin.$_$.sc;\n var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.i1;\n var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l2;\n var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.w;\n var charSequenceGet = kotlin_kotlin.$_$.n8;\n var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.o1;\n var toDouble = kotlin_kotlin.$_$.cc;\n var contains_0 = kotlin_kotlin.$_$.ib;\n var noWhenBranchMatchedException = kotlin_kotlin.$_$.xd;\n var round = kotlin_kotlin.$_$.ca;\n var $serializer_getInstance_2 = kotlin_core_core_api.$_$.jb;\n var get_doubleOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.k;\n var joinToString = kotlin_kotlin.$_$.e6;\n var RelationOriginAlongX_CENTER_getInstance = kotlin_core_core_api.$_$.e8;\n var RelationOriginAlongX_RIGHT_getInstance = kotlin_core_core_api.$_$.g8;\n var contains_1 = kotlin_kotlin.$_$.hb;\n var RelationOriginAlongX_LEFT_getInstance = kotlin_core_core_api.$_$.f8;\n var RelationOriginAlongY_CENTER_getInstance = kotlin_core_core_api.$_$.i8;\n var RelationOriginAlongY_BOTTOM_getInstance = kotlin_core_core_api.$_$.h8;\n var RelationOriginAlongY_TOP_getInstance = kotlin_core_core_api.$_$.j8;\n var RelationOriginAlongZ_CENTER_getInstance = kotlin_core_core_api.$_$.l8;\n var RelationOriginAlongZ_BACK_getInstance = kotlin_core_core_api.$_$.k8;\n var RelationOriginAlongZ_FRONT_getInstance = kotlin_core_core_api.$_$.m8;\n var valueOf = kotlin_core_core_api.$_$.e2;\n var RotationDegreeOfFreedom = kotlin_core_core_api.$_$.f2;\n var Exception_init_$Init$ = kotlin_kotlin.$_$.a1;\n var captureStack = kotlin_kotlin.$_$.k8;\n var serializer_2 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b1;\n var JsonDecoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.e;\n var SerializationException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c;\n var trimIndent = kotlin_kotlin.$_$.lc;\n var joinToString_0 = kotlin_kotlin.$_$.f6;\n var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.k1;\n var get_lastIndex = kotlin_kotlin.$_$.i6;\n //endregion\n //region block: pre-declaration\n setMetadataFor(CustomSerializer, 'CustomSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(AutoAdaptGroup, 'AutoAdaptGroup', classMeta, VOID, VOID, VOID, VOID, {0: CustomSerializer_getInstance});\n setMetadataFor(Companion, 'Companion', objectMeta);\n setMetadataFor(DynamicComponentResolver, 'DynamicComponentResolver', classMeta);\n setMetadataFor(Companion_0, 'Companion', objectMeta);\n setMetadataFor($serializer, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(DynamicProduct, 'DynamicProduct', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_3});\n setMetadataFor(Companion_1, 'Companion', objectMeta);\n setMetadataFor(DynamicProductCatalog$generateAssemblyComponents$1, VOID, classMeta);\n setMetadataFor(DynamicProductCatalog, 'DynamicProductCatalog', classMeta, VOID, [ProductCatalog]);\n setMetadataFor(Companion_2, 'Companion', objectMeta);\n setMetadataFor($serializer_0, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(PackedProductData, 'PackedProductData', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_4});\n setMetadataFor(Companion_3, 'Companion', objectMeta);\n setMetadataFor($serializer_1, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(DynamicProductData, 'DynamicProductData', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_5});\n setMetadataFor(Companion_4, 'Companion', objectMeta);\n setMetadataFor($serializer_2, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(DynamicTemplateData, 'DynamicTemplateData', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_6});\n setMetadataFor(Companion_5, 'Companion', objectMeta);\n setMetadataFor($serializer_3, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(PackedProduct, 'PackedProduct', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_7});\n setMetadataFor(Companion_6, 'Companion', objectMeta);\n setMetadataFor($serializer_4, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(ProductTemplate, 'ProductTemplate', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_8});\n setMetadataFor(MetaDataComponent, 'MetaDataComponent', classMeta, VOID, [Component]);\n setMetadataFor(Companion_7, 'Companion', objectMeta);\n setMetadataFor(VisualLightSourceComponent, 'VisualLightSourceComponent', classMeta, VOID, [Component], VisualLightSourceComponent);\n setMetadataFor(Companion_8, 'Companion', objectMeta);\n setMetadataFor($serializer_5, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Bounds, 'Bounds', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_9});\n setMetadataFor(Companion_9, 'Companion', objectMeta);\n setMetadataFor($serializer_6, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(CatalogTemplateData, 'CatalogTemplateData', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_10});\n setMetadataFor(Companion_10, 'Companion', objectMeta);\n setMetadataFor($serializer_7, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(ModelRenderInfo, 'ModelRenderInfo', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_11});\n setMetadataFor(Companion_11, 'Companion', objectMeta);\n setMetadataFor($serializer_8, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Part, 'Part', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_12});\n setMetadataFor(Companion_12, 'Companion', objectMeta);\n setMetadataFor($serializer_9, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(ProductComponent, 'ProductComponent', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_13});\n setMetadataFor(TemplateEditorConnectorData, 'TemplateEditorConnectorData', classMeta, VOID, [ConnectorVisualizationData]);\n setMetadataFor(ProductTemplateDTO, 'ProductTemplateDTO', classMeta);\n setMetadataFor(Companion_13, 'Companion', objectMeta);\n setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(sam$kotlin_Comparator$0_1, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(TemplateEditorService$runOnFilteredSceneEntities$1$1$1$1, VOID, classMeta);\n setMetadataFor(TemplateEditorService, 'TemplateEditorService', classMeta);\n setMetadataFor(DynamicProductSpecifier, 'DynamicProductSpecifier', interfaceMeta);\n setMetadataFor(DynamicComponentBuilder, 'DynamicComponentBuilder', classMeta, VOID, [DynamicProductSpecifier]);\n setMetadataFor(DynamicAssembly, 'DynamicAssembly', classMeta, DynamicComponentBuilder);\n setMetadataFor(Companion_14, 'Companion', objectMeta);\n setMetadataFor(sam$kotlin_Comparator$0_2, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(Companion_15, 'Companion', objectMeta);\n setMetadataFor(DynamicShape, 'DynamicShape', classMeta, DynamicComponentBuilder);\n setMetadataFor(Companion_16, 'Companion', objectMeta);\n setMetadataFor($serializer_10, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(AssemblyChild, 'AssemblyChild', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_14});\n setMetadataFor(Companion_17, 'Companion', objectMeta);\n setMetadataFor($serializer_11, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(AssemblyTemplate, 'AssemblyTemplate', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_15});\n setMetadataFor(CustomSerializer_0, 'CustomSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(AutoAdaptHostTemplate, 'AutoAdaptHostTemplate', classMeta, VOID, VOID, AutoAdaptHostTemplate, VOID, {0: CustomSerializer_getInstance_0});\n setMetadataFor(Companion_18, 'Companion', objectMeta, VOID, [KSerializer]);\n setMetadataFor(BoundItemTemplate, 'BoundItemTemplate', classMeta, VOID, VOID, VOID, VOID, {0: Companion_getInstance_24});\n setMetadataFor(Companion_19, 'Companion', objectMeta, VOID, [KSerializer]);\n setMetadataFor(Compartment, 'Compartment', classMeta, VOID, VOID, Compartment, VOID, {0: Companion_getInstance_25});\n setMetadataFor(Companion_20, 'Companion', objectMeta);\n setMetadataFor($serializer_12, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(ComponentsTemplate, 'ComponentsTemplate', classMeta, VOID, VOID, ComponentsTemplate, VOID, {0: $serializer_getInstance_16});\n setMetadataFor(Companion_21, 'Companion', objectMeta, VOID, [KSerializer]);\n setMetadataFor(ConnectorItemTemplate, 'ConnectorItemTemplate', classMeta, VOID, VOID, VOID, VOID, {0: Companion_getInstance_27});\n setMetadataFor(Companion_22, 'Companion', objectMeta, VOID, [KSerializer]);\n setMetadataFor(Dimension, 'Dimension', classMeta, VOID, VOID, Dimension, VOID, {0: Companion_getInstance_28});\n setMetadataFor(Companion_23, 'Companion', objectMeta);\n setMetadataFor($serializer_13, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(DragSurfaceTemplate, 'DragSurfaceTemplate', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_17});\n setMetadataFor(CustomSerializer_1, 'CustomSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(DragSurfacesTemplate, 'DragSurfacesTemplate', classMeta, VOID, VOID, VOID, VOID, {0: CustomSerializer_getInstance_1});\n setMetadataFor(Companion_24, 'Companion', objectMeta);\n setMetadataFor(DynamicRangeUtils, 'DynamicRangeUtils', classMeta, VOID, VOID, DynamicRangeUtils);\n setMetadataFor(Companion_25, 'Companion', objectMeta);\n setMetadataFor($serializer_14, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(LightTemplate, 'LightTemplate', classMeta, VOID, VOID, LightTemplate, VOID, {0: $serializer_getInstance_18});\n setMetadataFor(MarginTemplateSerializer, 'MarginTemplateSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(MarginTemplate, 'MarginTemplate', classMeta, VOID, VOID, MarginTemplate, VOID, {0: MarginTemplateSerializer_getInstance});\n setMetadataFor(Companion_26, 'Companion', objectMeta);\n setMetadataFor($serializer_15, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(Model3DTemplate, 'Model3DTemplate', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_19});\n setMetadataFor(CustomSerializer_2, 'CustomSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(OriginTemplate, 'OriginTemplate', classMeta, VOID, VOID, VOID, VOID, {0: CustomSerializer_getInstance_2});\n setMetadataFor(Companion_27, 'Companion', objectMeta);\n setMetadataFor($serializer_16, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(PlacementZoneByHeightTemplate, 'PlacementZoneByHeightTemplate', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_20});\n setMetadataFor(PositionTemplateSerializer, 'PositionTemplateSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(PositionTemplate, 'PositionTemplate', classMeta, VOID, VOID, VOID, VOID, {0: PositionTemplateSerializer_getInstance});\n setMetadataFor(Companion_28, 'Companion', objectMeta);\n setMetadataFor($serializer_17, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(VisualLightSourceTemplate, 'VisualLightSourceTemplate', classMeta, VOID, VOID, VisualLightSourceTemplate, VOID, {0: $serializer_getInstance_21});\n setMetadataFor(Companion_29, 'Companion', objectMeta);\n setMetadataFor($serializer_18, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(ProductStructureConnectionTemplate, 'ProductStructureConnectionTemplate', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_22});\n setMetadataFor(Companion_30, 'Companion', objectMeta);\n setMetadataFor($serializer_19, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(ProductStructureItemTemplate, 'ProductStructureItemTemplate', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_23});\n setMetadataFor(Companion_31, 'Companion', objectMeta, VOID, [SerializerFactory]);\n setMetadataFor(OriginRelativeTo, 'OriginRelativeTo', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_37});\n setMetadataFor(OriginRelativeToImpostor, 'OriginRelativeToImpostor', objectMeta);\n setMetadataFor(Companion_32, 'Companion', objectMeta);\n setMetadataFor(PositionType, 'PositionType', classMeta, Enum);\n setMetadataFor(PositionTypeImpostor, 'PositionTypeImpostor', objectMeta);\n setMetadataFor(Companion_33, 'Companion', objectMeta);\n setMetadataFor($serializer_20, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(PositionValue, 'PositionValue', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_24});\n setMetadataFor(Companion_34, 'Companion', objectMeta, VOID, [KSerializer]);\n setMetadataFor(RelativePosition, 'RelativePosition', classMeta, VOID, VOID, VOID, VOID, {0: Companion_getInstance_40});\n setMetadataFor(RelativeTransformSerializer, 'RelativeTransformSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(RelativeTransform, 'RelativeTransform', classMeta, VOID, VOID, RelativeTransform, VOID, {0: RelativeTransformSerializer_getInstance});\n setMetadataFor(NamedTransformObjectDeserializer, 'NamedTransformObjectDeserializer', objectMeta);\n setMetadataFor(RelationOriginSerializer, 'RelationOriginSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(RelativeTransformDeserializer, 'RelativeTransformDeserializer', objectMeta);\n setMetadataFor(RotationDegreeOfFreedomSerializer, 'RotationDegreeOfFreedomSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(DynamicRangeParseError, 'DynamicRangeParseError', classMeta, Exception);\n setMetadataFor(SizeSerializer, 'SizeSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(SpacingSerializer, 'SpacingSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(CatalogGenerator, 'CatalogGenerator', classMeta, VOID, VOID, CatalogGenerator);\n setMetadataFor(parseMeta$result$1, VOID, classMeta);\n //endregion\n function CustomSerializer() {\n CustomSerializer_instance = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.catalog.AutoAdaptGroup', null, 2);\n tmp0_serialDesc.cv('key', false);\n tmp0_serialDesc.cv('priority', false);\n this.j3x_1 = tmp0_serialDesc;\n }\n protoOf(CustomSerializer).qk = function (decoder) {\n try {\n var key = decoder.in();\n return new AutoAdaptGroup(key, 0);\n } catch ($p) {\n if ($p instanceof SerializationException) {\n var e = $p;\n // Inline function 'kotlin.run' call\n // Inline function 'kotlin.contracts.contract' call\n var $this$run = decoder.nn(this.j3x_1);\n var key_0 = null;\n var priority = null;\n $l$loop: while (true) {\n var index = $this$run.eo(CustomSerializer_getInstance().j3x_1);\n if (index === -1)\n break $l$loop;\n switch (index) {\n case 0:\n key_0 = $this$run.xn(CustomSerializer_getInstance().j3x_1, 0);\n break;\n case 1:\n priority = $this$run.sn(CustomSerializer_getInstance().j3x_1, 1);\n break;\n default:\n // Inline function 'kotlin.error' call\n\n var message = 'AutoAdaptGroup: unexpected index: ' + index;\n throw IllegalStateException_init_$Create$(toString(message));\n }\n }\n $this$run.on(CustomSerializer_getInstance().j3x_1);\n if (key_0 == null) {\n // Inline function 'kotlin.error' call\n var message_0 = 'AutoAdaptGroup: key must be specified';\n throw IllegalStateException_init_$Create$(toString(message_0));\n }\n var tmp = key_0;\n var tmp1_elvis_lhs = priority;\n return new AutoAdaptGroup(tmp, tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs);\n } else {\n throw $p;\n }\n }\n };\n protoOf(CustomSerializer).ok = function () {\n return this.j3x_1;\n };\n protoOf(CustomSerializer).k3x = function (encoder, value) {\n var tmp0_desc = this.j3x_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.key);\n tmp1_output.xo(tmp0_desc, 1, value.priority);\n tmp1_output.on(tmp0_desc);\n };\n protoOf(CustomSerializer).pk = function (encoder, value) {\n return this.k3x(encoder, value instanceof AutoAdaptGroup ? value : THROW_CCE());\n };\n protoOf(CustomSerializer).l17 = function () {\n return CustomSerializer_getInstance();\n };\n var CustomSerializer_instance;\n function CustomSerializer_getInstance() {\n if (CustomSerializer_instance == null)\n new CustomSerializer();\n return CustomSerializer_instance;\n }\n function AutoAdaptGroup(key, priority) {\n CustomSerializer_getInstance();\n this.key = key;\n this.priority = priority;\n }\n protoOf(AutoAdaptGroup).t2 = function () {\n return this.key;\n };\n protoOf(AutoAdaptGroup).v1v = function () {\n return this.priority;\n };\n protoOf(AutoAdaptGroup).af = function () {\n return this.key;\n };\n protoOf(AutoAdaptGroup).bf = function () {\n return this.priority;\n };\n protoOf(AutoAdaptGroup).w2o = function (key, priority) {\n return new AutoAdaptGroup(key, priority);\n };\n protoOf(AutoAdaptGroup).copy = function (key, priority, $super) {\n key = key === VOID ? this.key : key;\n priority = priority === VOID ? this.priority : priority;\n return this.w2o(key, priority);\n };\n protoOf(AutoAdaptGroup).toString = function () {\n return 'AutoAdaptGroup(key=' + this.key + ', priority=' + this.priority + ')';\n };\n protoOf(AutoAdaptGroup).hashCode = function () {\n var result = getStringHashCode(this.key);\n result = imul(result, 31) + this.priority | 0;\n return result;\n };\n protoOf(AutoAdaptGroup).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof AutoAdaptGroup))\n return false;\n var tmp0_other_with_cast = other instanceof AutoAdaptGroup ? other : THROW_CCE();\n if (!(this.key === tmp0_other_with_cast.key))\n return false;\n if (!(this.priority === tmp0_other_with_cast.priority))\n return false;\n return true;\n };\n function modelRenderInfo($this, dynamicProduct) {\n // Inline function 'kotlin.text.isNullOrEmpty' call\n var this_0 = dynamicProduct.modelURI;\n // Inline function 'kotlin.contracts.contract' call\n if (this_0 == null ? true : charSequenceLength(this_0) === 0)\n return null;\n return new ModelRenderInfo($this.l3x_1, dynamicProduct.modelURI, '');\n }\n function Companion() {\n Companion_instance_4 = this;\n this.logger = LoggerState_getInstance().m1m('DynamicComponentResolver');\n }\n protoOf(Companion).x1i = function () {\n return this.logger;\n };\n var Companion_instance_4;\n function Companion_getInstance_5() {\n if (Companion_instance_4 == null)\n new Companion();\n return Companion_instance_4;\n }\n function DynamicComponentResolver$builder$lambda($templateId) {\n return function () {\n return \"No template found for for '\" + $templateId + \"'.\";\n };\n }\n function DynamicComponentResolver$builder$lambda_0($templateId, $e) {\n return function () {\n return \"There are errors in the loaded data for '\" + $templateId + \"'. (\" + $e.message + ')';\n };\n }\n function DynamicComponentResolver(catalog, modelRootUrl) {\n Companion_getInstance_5();\n modelRootUrl = modelRootUrl === VOID ? null : modelRootUrl;\n this.catalog = catalog;\n this.l3x_1 = modelRootUrl;\n }\n protoOf(DynamicComponentResolver).m3x = function () {\n return this.catalog;\n };\n protoOf(DynamicComponentResolver).builder = function (productInfo) {\n var templateId = productInfo.template.id;\n var tmp;\n try {\n var productTemplate = this.catalog.findTemplateDTO(templateId);\n var tmp_0;\n if (!(productTemplate == null)) {\n var tmp_1;\n if (!(productTemplate.components.assembly == null)) {\n tmp_1 = new DynamicAssembly(productInfo, productInfo.template, productTemplate, this.catalog);\n } else {\n tmp_1 = new DynamicShape(productInfo, productInfo.template, modelRenderInfo(this, productInfo), productTemplate, this.catalog);\n }\n tmp_0 = tmp_1;\n } else {\n var tmp_2 = Companion_getInstance_5().logger;\n tmp_2.warn(DynamicComponentResolver$builder$lambda(templateId));\n tmp_0 = null;\n }\n tmp = tmp_0;\n } catch ($p) {\n var tmp_3;\n if ($p instanceof Exception) {\n var e = $p;\n var tmp_4 = Companion_getInstance_5().logger;\n tmp_4.warn(DynamicComponentResolver$builder$lambda_0(templateId, e));\n tmp_3 = null;\n } else {\n throw $p;\n }\n tmp = tmp_3;\n }\n return tmp;\n };\n function Companion_0() {\n Companion_instance_5 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.p3x_1 = [null, null, null, null, null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance()), null];\n }\n protoOf(Companion_0).fromPackedProduct = function (packed) {\n var tmp0_safe_receiver = packed.components.product;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.catalog.Companion.fromPackedProduct.' call\n var tmp0_safe_receiver_0 = packed.components.model3D;\n var tmp_0;\n if (tmp0_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.catalog.Companion.fromPackedProduct..' call\n tmp_0 = new ModelRenderInfo(tmp0_safe_receiver_0.modelRootURL, tmp0_safe_receiver_0.modelURI, null);\n }\n var modelInfo = tmp_0;\n var tmp1_safe_receiver = packed.components.model3D;\n var template = new CatalogTemplateData(tmp0_safe_receiver.productGroup, tmp0_safe_receiver.size, tmp0_safe_receiver.comSize, '', tmp0_safe_receiver.parts, modelInfo, tmp1_safe_receiver == null ? null : tmp1_safe_receiver.modelTransform);\n var tmp2_elvis_lhs = tmp0_safe_receiver.dexfId;\n var tmp_1 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;\n var tmp_2 = modelInfo == null ? null : modelInfo.model;\n var tmp4_elvis_lhs = tmp0_safe_receiver.description;\n var tmp_3 = tmp4_elvis_lhs == null ? '' : tmp4_elvis_lhs;\n var tmp5_safe_receiver = tmp0_safe_receiver.autoAdaptGroup;\n var tmp_4;\n if (tmp5_safe_receiver == null) {\n tmp_4 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.catalog.Companion.fromPackedProduct..' call\n tmp_4 = new AutoAdaptGroup(tmp5_safe_receiver, 0);\n }\n tmp = new DynamicProduct(tmp0_safe_receiver.id, tmp0_safe_receiver.type, tmp_1, tmp_2, tmp_3, template, tmp0_safe_receiver.typeCode, tmp0_safe_receiver.partsInPackage, tmp_4, tmp0_safe_receiver.meta);\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_5;\n if (tmp1_elvis_lhs == null) {\n var message = 'Space product ' + packed.id + ' is missing product component';\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n tmp_5 = tmp1_elvis_lhs;\n }\n return tmp_5;\n };\n protoOf(Companion_0).l17 = function () {\n return $serializer_getInstance_3();\n };\n var Companion_instance_5;\n function Companion_getInstance_6() {\n if (Companion_instance_5 == null)\n new Companion_0();\n return Companion_instance_5;\n }\n function $serializer() {\n $serializer_instance = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.catalog.DynamicProduct', this, 11);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('type', true);\n tmp0_serialDesc.cv('dexf', true);\n tmp0_serialDesc.cv('modelURI', true);\n tmp0_serialDesc.cv('desc', true);\n tmp0_serialDesc.cv('template', false);\n tmp0_serialDesc.cv('typeCode', true);\n tmp0_serialDesc.cv('partsInPackage', true);\n tmp0_serialDesc.cv('autoAdaptGroup', true);\n tmp0_serialDesc.cv('meta', true);\n tmp0_serialDesc.cv('dexfAssetName', true);\n this.q3x_1 = tmp0_serialDesc;\n }\n protoOf($serializer).ok = function () {\n return this.q3x_1;\n };\n protoOf($serializer).rv = function () {\n var tmp0_cached = Companion_getInstance_6().p3x_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), $serializer_getInstance_10(), get_nullable(IntSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(CustomSerializer_getInstance()), get_nullable(tmp0_cached[9]), get_nullable(StringSerializer_getInstance())];\n };\n protoOf($serializer).qk = function (decoder) {\n var tmp0_desc = this.q3x_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_local5 = null;\n var tmp10_local6 = null;\n var tmp11_local7 = null;\n var tmp12_local8 = null;\n var tmp13_local9 = null;\n var tmp14_local10 = null;\n var tmp15_input = decoder.nn(tmp0_desc);\n var tmp16_cached = Companion_getInstance_6().p3x_1;\n if (tmp15_input.do()) {\n tmp4_local0 = tmp15_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp15_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp15_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp15_input.bo(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp15_input.xn(tmp0_desc, 4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n tmp9_local5 = tmp15_input.zn(tmp0_desc, 5, $serializer_getInstance_10(), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n tmp10_local6 = tmp15_input.bo(tmp0_desc, 6, IntSerializer_getInstance(), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n tmp11_local7 = tmp15_input.bo(tmp0_desc, 7, IntSerializer_getInstance(), tmp11_local7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n tmp12_local8 = tmp15_input.bo(tmp0_desc, 8, CustomSerializer_getInstance(), tmp12_local8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n tmp13_local9 = tmp15_input.bo(tmp0_desc, 9, tmp16_cached[9], tmp13_local9);\n tmp3_bitMask0 = tmp3_bitMask0 | 512;\n tmp14_local10 = tmp15_input.bo(tmp0_desc, 10, StringSerializer_getInstance(), tmp14_local10);\n tmp3_bitMask0 = tmp3_bitMask0 | 1024;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp15_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp15_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp15_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp15_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp15_input.bo(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp15_input.xn(tmp0_desc, 4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n case 5:\n tmp9_local5 = tmp15_input.zn(tmp0_desc, 5, $serializer_getInstance_10(), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n break;\n case 6:\n tmp10_local6 = tmp15_input.bo(tmp0_desc, 6, IntSerializer_getInstance(), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n break;\n case 7:\n tmp11_local7 = tmp15_input.bo(tmp0_desc, 7, IntSerializer_getInstance(), tmp11_local7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n break;\n case 8:\n tmp12_local8 = tmp15_input.bo(tmp0_desc, 8, CustomSerializer_getInstance(), tmp12_local8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n break;\n case 9:\n tmp13_local9 = tmp15_input.bo(tmp0_desc, 9, tmp16_cached[9], tmp13_local9);\n tmp3_bitMask0 = tmp3_bitMask0 | 512;\n break;\n case 10:\n tmp14_local10 = tmp15_input.bo(tmp0_desc, 10, StringSerializer_getInstance(), tmp14_local10);\n tmp3_bitMask0 = tmp3_bitMask0 | 1024;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp15_input.on(tmp0_desc);\n return DynamicProduct_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, null);\n };\n protoOf($serializer).r3x = function (encoder, value) {\n var tmp0_desc = this.q3x_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_6().p3x_1;\n tmp1_output.cp(tmp0_desc, 0, value.id);\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.type == null)) {\n tmp1_output.gp(tmp0_desc, 1, StringSerializer_getInstance(), value.type);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.dexf == null)) {\n tmp1_output.gp(tmp0_desc, 2, StringSerializer_getInstance(), value.dexf);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.modelURI == null)) {\n tmp1_output.gp(tmp0_desc, 3, StringSerializer_getInstance(), value.modelURI);\n }\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.desc === '')) {\n tmp1_output.cp(tmp0_desc, 4, value.desc);\n }\n tmp1_output.ep(tmp0_desc, 5, $serializer_getInstance_10(), value.template);\n if (tmp1_output.kp(tmp0_desc, 6) ? true : !(value.typeCode == null)) {\n tmp1_output.gp(tmp0_desc, 6, IntSerializer_getInstance(), value.typeCode);\n }\n if (tmp1_output.kp(tmp0_desc, 7) ? true : !(value.partsInPackage == null)) {\n tmp1_output.gp(tmp0_desc, 7, IntSerializer_getInstance(), value.partsInPackage);\n }\n if (tmp1_output.kp(tmp0_desc, 8) ? true : !(value.autoAdaptGroup == null)) {\n tmp1_output.gp(tmp0_desc, 8, CustomSerializer_getInstance(), value.autoAdaptGroup);\n }\n if (tmp1_output.kp(tmp0_desc, 9) ? true : !(value.meta == null)) {\n tmp1_output.gp(tmp0_desc, 9, tmp2_cached[9], value.meta);\n }\n if (tmp1_output.kp(tmp0_desc, 10) ? true : !(value.dexfAssetName == null)) {\n tmp1_output.gp(tmp0_desc, 10, StringSerializer_getInstance(), value.dexfAssetName);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer).pk = function (encoder, value) {\n return this.r3x(encoder, value instanceof DynamicProduct ? value : THROW_CCE());\n };\n var $serializer_instance;\n function $serializer_getInstance_3() {\n if ($serializer_instance == null)\n new $serializer();\n return $serializer_instance;\n }\n function DynamicProduct_init_$Init$(seen1, id, type, dexf, modelURI, desc, template, typeCode, partsInPackage, autoAdaptGroup, meta, dexfAssetName, serializationConstructorMarker, $this) {\n if (!(33 === (33 & seen1))) {\n throwMissingFieldException(seen1, 33, $serializer_getInstance_3().q3x_1);\n }\n $this.id = id;\n if (0 === (seen1 & 2))\n $this.type = null;\n else\n $this.type = type;\n if (0 === (seen1 & 4))\n $this.dexf = null;\n else\n $this.dexf = dexf;\n if (0 === (seen1 & 8))\n $this.modelURI = null;\n else\n $this.modelURI = modelURI;\n if (0 === (seen1 & 16))\n $this.desc = '';\n else\n $this.desc = desc;\n $this.template = template;\n if (0 === (seen1 & 64))\n $this.typeCode = null;\n else\n $this.typeCode = typeCode;\n if (0 === (seen1 & 128))\n $this.partsInPackage = null;\n else\n $this.partsInPackage = partsInPackage;\n if (0 === (seen1 & 256))\n $this.autoAdaptGroup = null;\n else\n $this.autoAdaptGroup = autoAdaptGroup;\n if (0 === (seen1 & 512))\n $this.meta = null;\n else\n $this.meta = meta;\n if (0 === (seen1 & 1024))\n $this.dexfAssetName = null;\n else\n $this.dexfAssetName = dexfAssetName;\n return $this;\n }\n function DynamicProduct_init_$Create$(seen1, id, type, dexf, modelURI, desc, template, typeCode, partsInPackage, autoAdaptGroup, meta, dexfAssetName, serializationConstructorMarker) {\n return DynamicProduct_init_$Init$(seen1, id, type, dexf, modelURI, desc, template, typeCode, partsInPackage, autoAdaptGroup, meta, dexfAssetName, serializationConstructorMarker, objectCreate(protoOf(DynamicProduct)));\n }\n function DynamicProduct(id, type, dexf, modelURI, desc, template, typeCode, partsInPackage, autoAdaptGroup, meta, dexfAssetName) {\n Companion_getInstance_6();\n type = type === VOID ? null : type;\n dexf = dexf === VOID ? null : dexf;\n modelURI = modelURI === VOID ? null : modelURI;\n desc = desc === VOID ? '' : desc;\n typeCode = typeCode === VOID ? null : typeCode;\n partsInPackage = partsInPackage === VOID ? null : partsInPackage;\n autoAdaptGroup = autoAdaptGroup === VOID ? null : autoAdaptGroup;\n meta = meta === VOID ? null : meta;\n dexfAssetName = dexfAssetName === VOID ? null : dexfAssetName;\n this.id = id;\n this.type = type;\n this.dexf = dexf;\n this.modelURI = modelURI;\n this.desc = desc;\n this.template = template;\n this.typeCode = typeCode;\n this.partsInPackage = partsInPackage;\n this.autoAdaptGroup = autoAdaptGroup;\n this.meta = meta;\n this.dexfAssetName = dexfAssetName;\n }\n protoOf(DynamicProduct).s1k = function () {\n return this.id;\n };\n protoOf(DynamicProduct).a1x = function () {\n return this.type;\n };\n protoOf(DynamicProduct).s3x = function () {\n return this.dexf;\n };\n protoOf(DynamicProduct).t3x = function () {\n return this.modelURI;\n };\n protoOf(DynamicProduct).u3x = function () {\n return this.desc;\n };\n protoOf(DynamicProduct).v3x = function () {\n return this.template;\n };\n protoOf(DynamicProduct).w3x = function () {\n return this.typeCode;\n };\n protoOf(DynamicProduct).x3x = function () {\n return this.partsInPackage;\n };\n protoOf(DynamicProduct).y3x = function () {\n return this.autoAdaptGroup;\n };\n protoOf(DynamicProduct).z3x = function () {\n return this.meta;\n };\n protoOf(DynamicProduct).a3y = function () {\n return this.dexfAssetName;\n };\n protoOf(DynamicProduct).isMultipartAssembly = function () {\n var tmp0_safe_receiver = this.template.parts;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n tmp = !(tmp0_safe_receiver.length === 0);\n }\n var tmp1_elvis_lhs = tmp;\n return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;\n };\n protoOf(DynamicProduct).af = function () {\n return this.id;\n };\n protoOf(DynamicProduct).bf = function () {\n return this.type;\n };\n protoOf(DynamicProduct).g1k = function () {\n return this.dexf;\n };\n protoOf(DynamicProduct).h1k = function () {\n return this.modelURI;\n };\n protoOf(DynamicProduct).i1k = function () {\n return this.desc;\n };\n protoOf(DynamicProduct).j1k = function () {\n return this.template;\n };\n protoOf(DynamicProduct).k1k = function () {\n return this.typeCode;\n };\n protoOf(DynamicProduct).p1z = function () {\n return this.partsInPackage;\n };\n protoOf(DynamicProduct).q1z = function () {\n return this.autoAdaptGroup;\n };\n protoOf(DynamicProduct).r1z = function () {\n return this.meta;\n };\n protoOf(DynamicProduct).s1z = function () {\n return this.dexfAssetName;\n };\n protoOf(DynamicProduct).b3y = function (id, type, dexf, modelURI, desc, template, typeCode, partsInPackage, autoAdaptGroup, meta, dexfAssetName) {\n return new DynamicProduct(id, type, dexf, modelURI, desc, template, typeCode, partsInPackage, autoAdaptGroup, meta, dexfAssetName);\n };\n protoOf(DynamicProduct).copy = function (id, type, dexf, modelURI, desc, template, typeCode, partsInPackage, autoAdaptGroup, meta, dexfAssetName, $super) {\n id = id === VOID ? this.id : id;\n type = type === VOID ? this.type : type;\n dexf = dexf === VOID ? this.dexf : dexf;\n modelURI = modelURI === VOID ? this.modelURI : modelURI;\n desc = desc === VOID ? this.desc : desc;\n template = template === VOID ? this.template : template;\n typeCode = typeCode === VOID ? this.typeCode : typeCode;\n partsInPackage = partsInPackage === VOID ? this.partsInPackage : partsInPackage;\n autoAdaptGroup = autoAdaptGroup === VOID ? this.autoAdaptGroup : autoAdaptGroup;\n meta = meta === VOID ? this.meta : meta;\n dexfAssetName = dexfAssetName === VOID ? this.dexfAssetName : dexfAssetName;\n return this.b3y(id, type, dexf, modelURI, desc, template, typeCode, partsInPackage, autoAdaptGroup, meta, dexfAssetName);\n };\n protoOf(DynamicProduct).toString = function () {\n return 'DynamicProduct(id=' + this.id + ', type=' + this.type + ', dexf=' + this.dexf + ', modelURI=' + this.modelURI + ', desc=' + this.desc + ', template=' + this.template + ', typeCode=' + this.typeCode + ', partsInPackage=' + this.partsInPackage + ', autoAdaptGroup=' + this.autoAdaptGroup + ', meta=' + this.meta + ', dexfAssetName=' + this.dexfAssetName + ')';\n };\n protoOf(DynamicProduct).hashCode = function () {\n var result = getStringHashCode(this.id);\n result = imul(result, 31) + (this.type == null ? 0 : getStringHashCode(this.type)) | 0;\n result = imul(result, 31) + (this.dexf == null ? 0 : getStringHashCode(this.dexf)) | 0;\n result = imul(result, 31) + (this.modelURI == null ? 0 : getStringHashCode(this.modelURI)) | 0;\n result = imul(result, 31) + getStringHashCode(this.desc) | 0;\n result = imul(result, 31) + this.template.hashCode() | 0;\n result = imul(result, 31) + (this.typeCode == null ? 0 : this.typeCode) | 0;\n result = imul(result, 31) + (this.partsInPackage == null ? 0 : this.partsInPackage) | 0;\n result = imul(result, 31) + (this.autoAdaptGroup == null ? 0 : this.autoAdaptGroup.hashCode()) | 0;\n result = imul(result, 31) + (this.meta == null ? 0 : hashCode(this.meta)) | 0;\n result = imul(result, 31) + (this.dexfAssetName == null ? 0 : getStringHashCode(this.dexfAssetName)) | 0;\n return result;\n };\n protoOf(DynamicProduct).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof DynamicProduct))\n return false;\n var tmp0_other_with_cast = other instanceof DynamicProduct ? other : THROW_CCE();\n if (!(this.id === tmp0_other_with_cast.id))\n return false;\n if (!(this.type == tmp0_other_with_cast.type))\n return false;\n if (!(this.dexf == tmp0_other_with_cast.dexf))\n return false;\n if (!(this.modelURI == tmp0_other_with_cast.modelURI))\n return false;\n if (!(this.desc === tmp0_other_with_cast.desc))\n return false;\n if (!this.template.equals(tmp0_other_with_cast.template))\n return false;\n if (!(this.typeCode == tmp0_other_with_cast.typeCode))\n return false;\n if (!(this.partsInPackage == tmp0_other_with_cast.partsInPackage))\n return false;\n if (!equals(this.autoAdaptGroup, tmp0_other_with_cast.autoAdaptGroup))\n return false;\n if (!equals(this.meta, tmp0_other_with_cast.meta))\n return false;\n if (!(this.dexfAssetName == tmp0_other_with_cast.dexfAssetName))\n return false;\n return true;\n };\n function DynamicProductCatalog$Companion$jsonParser$lambda($this$Json) {\n $this$Json.f16_1 = true;\n $this$Json.e16_1 = true;\n return Unit_instance;\n }\n function getProductInfo($this, productId) {\n return $this.d3y_1.b3(productId);\n }\n function parseTemplates($this, json) {\n var templates = Companion_getInstance_7().jsonParser.j15(Companion_getInstance_10().l17(), json).templates;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = templates.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.parseTemplates.' call\n var tmp0_safe_receiver = element.components.bounds;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element_0 = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.parseTemplates..' call\n element_0.sourceTemplateId = element.templateId;\n }\n }\n var tmp1_safe_receiver = element.components.connectors;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = tmp1_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element_1 = tmp1_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.parseTemplates..' call\n element_1.sourceTemplateId = element.templateId;\n }\n }\n }\n return resolveTemplateInheritance($this, templates);\n }\n function resolveTemplateInheritance($this, templates) {\n // Inline function 'kotlin.collections.mutableMapOf' call\n var resolved = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = templates.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.resolveTemplateInheritance.' call\n if (resolved.b3(element.templateId) == null) {\n resolve($this, element, resolved, templates);\n }\n }\n return resolved;\n }\n function resolve($this, productTemplate, resolved, unresolved) {\n if (productTemplate.inherits == null) {\n // Inline function 'kotlin.collections.set' call\n var key = productTemplate.templateId;\n resolved.r2(key, productTemplate);\n return productTemplate;\n } else {\n var resultingTemplate = productTemplate;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = reversedArray(productTemplate.inherits);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.resolve.' call\n var extended = resolved.b3(element);\n if (extended == null) {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = unresolved.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.resolve..' call\n if (element_0.templateId === element) {\n tmp$ret$1 = element_0;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw Exception_init_$Create$(\"Template '\" + productTemplate.templateId + \"' extends '\" + element + \"' that cannot be found\");\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var unresolvedExtended = tmp;\n extended = resolve($this, unresolvedExtended, resolved, unresolved);\n }\n resultingTemplate = resultingTemplate.inherit(extended);\n }\n // Inline function 'kotlin.collections.set' call\n var key_0 = resultingTemplate.templateId;\n var value = resultingTemplate;\n resolved.r2(key_0, value);\n return resultingTemplate;\n }\n }\n function parseInfo($this, json) {\n var parsed = Companion_getInstance_7().jsonParser.j15(Companion_getInstance_9().l17(), json);\n $this.g3y_1 = parsed.range;\n $this.h3y_1 = parsed.rangeVersion;\n return parsed.products;\n }\n function parseAndAddPackage($this, json) {\n var parsed = Companion_getInstance_7().jsonParser.j15(Companion_getInstance_8().l17(), json);\n // Inline function 'kotlin.collections.map' call\n var this_0 = parsed.products;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n var product = Companion_getInstance_6().fromPackedProduct(item);\n var template = Companion_getInstance_12().fromPackedProduct(item);\n // Inline function 'kotlin.collections.set' call\n var this_1 = $this.d3y_1;\n var key = product.id;\n this_1.r2(key, product);\n var this_2 = $this.f3y_1;\n var key_0 = template.templateId;\n this_2.r2(key_0, template);\n destination.q(Unit_instance);\n }\n $this.g3y_1 = parsed.range;\n $this.h3y_1 = parsed.rangeVersion;\n }\n function Companion_1() {\n Companion_instance_6 = this;\n var tmp = this;\n tmp.jsonParser = Json(VOID, DynamicProductCatalog$Companion$jsonParser$lambda);\n }\n protoOf(Companion_1).q3y = function () {\n return this.jsonParser;\n };\n var Companion_instance_6;\n function Companion_getInstance_7() {\n if (Companion_instance_6 == null)\n new Companion_1();\n return Companion_instance_6;\n }\n function DynamicProductCatalog$generateAssemblyComponents$1($assemblyComponents) {\n this.structure = new AssemblyStructureComponent($assemblyComponents.ye_1);\n this.parts = new AssemblyPartsComponent($assemblyComponents.ze_1);\n }\n function DynamicProductCatalog(productInfoJson, templatesJson, modelRootUrl) {\n Companion_getInstance_7();\n templatesJson = templatesJson === VOID ? null : templatesJson;\n modelRootUrl = modelRootUrl === VOID ? null : modelRootUrl;\n this.c3y_1 = true;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp.d3y_1 = LinkedHashMap_init_$Create$();\n var tmp_0 = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp_0.f3y_1 = LinkedHashMap_init_$Create$();\n this.g3y_1 = 'dynamic';\n this.h3y_1 = '0';\n var tmp_1 = this;\n // Inline function 'kotlin.collections.mutableSetOf' call\n tmp_1.i3y_1 = LinkedHashSet_init_$Create$();\n if (!(templatesJson == null)) {\n // Inline function 'kotlin.collections.plusAssign' call\n var this_0 = this.d3y_1;\n // Inline function 'kotlin.collections.associateBy' call\n var this_1 = parseInfo(this, productInfoJson);\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_1, 10)), 16);\n // Inline function 'kotlin.collections.associateByTo' call\n var destination = LinkedHashMap_init_$Create$_0(capacity);\n var tmp0_iterator = this_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.' call\n var tmp$ret$3 = element.id;\n destination.r2(tmp$ret$3, element);\n }\n this_0.s2(destination);\n this.f3y_1.s2(parseTemplates(this, templatesJson));\n } else {\n parseAndAddPackage(this, productInfoJson);\n }\n this.e3y_1 = new DynamicComponentResolver(this, modelRootUrl);\n }\n protoOf(DynamicProductCatalog).a1m = function () {\n return this.c3y_1;\n };\n protoOf(DynamicProductCatalog).addInterceptor = function (interceptor) {\n this.i3y_1.q(interceptor);\n };\n protoOf(DynamicProductCatalog).removeInterceptor = function (interceptor) {\n this.i3y_1.r(interceptor);\n };\n protoOf(DynamicProductCatalog).rangeId = function () {\n return this.g3y_1;\n };\n protoOf(DynamicProductCatalog).rangeVersion = function () {\n return this.h3y_1;\n };\n protoOf(DynamicProductCatalog).beforeDeserialize = function (json, catalogVersion) {\n var res = json;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.i3y_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.beforeDeserialize.' call\n res = element.beforeDeserialize(res, catalogVersion);\n }\n return res;\n };\n protoOf(DynamicProductCatalog).beforeBuildingEntities = function (serializableTree, catalogVersion) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.i3y_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.beforeBuildingEntities.' call\n element.beforeBuildingEntities(serializableTree, catalogVersion);\n }\n };\n protoOf(DynamicProductCatalog).beforeParsingComponents = function (serializableTree, catalogVersion) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.i3y_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.beforeParsingComponents.' call\n element.beforeParsingComponents(serializableTree, catalogVersion);\n }\n };\n protoOf(DynamicProductCatalog).afterDeserializeComplete = function (root, catalogVersion) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.i3y_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.afterDeserializeComplete.' call\n element.afterDeserializeComplete(root, catalogVersion);\n }\n };\n protoOf(DynamicProductCatalog).allProductRefs = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.d3y_1.o2();\n return copyToArray(this_0);\n };\n protoOf(DynamicProductCatalog).findProductDTO = function (id) {\n return getProductInfo(this, id);\n };\n protoOf(DynamicProductCatalog).productDTOs = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.d3y_1.p2();\n return copyToArray(this_0);\n };\n protoOf(DynamicProductCatalog).findTemplateDTO = function (id) {\n return this.f3y_1.b3(id);\n };\n protoOf(DynamicProductCatalog).findTemplateDTOFromProductRef = function (productRef) {\n var product = this.findProductDTO(productRef);\n var tmp;\n if (product == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.findTemplateDTOFromProductRef.' call\n tmp = this.f3y_1.b3(product.template.id);\n }\n return tmp;\n };\n protoOf(DynamicProductCatalog).templateDTOs = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.f3y_1.p2();\n return copyToArray(this_0);\n };\n protoOf(DynamicProductCatalog).productSpecification = function (productRef) {\n var product = this.findProductDTO(productRef);\n var tmp;\n if (product == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.productSpecification.' call\n var tmp0_safe_receiver = this.e3y_1.builder(product);\n tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.buildSpecification();\n }\n return tmp;\n };\n protoOf(DynamicProductCatalog).setTemplate = function (templatesJson) {\n try {\n resolve(this, Companion_getInstance_7().jsonParser.j15(Companion_getInstance_12().l17(), templatesJson), this.f3y_1, emptyList());\n } catch ($p) {\n if ($p instanceof Error_0) {\n var e = $p;\n // Inline function 'kotlin.error' call\n var message = toString_0(e.message);\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n throw $p;\n }\n }\n };\n protoOf(DynamicProductCatalog).setTemplateObject = function (template) {\n try {\n resolve(this, template, this.f3y_1, emptyList());\n } catch ($p) {\n if ($p instanceof Error_0) {\n var e = $p;\n // Inline function 'kotlin.error' call\n var message = toString_0(e.message);\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n throw $p;\n }\n }\n };\n protoOf(DynamicProductCatalog).setMultipleTemplates = function (templatesJson) {\n try {\n var unresolved = Companion_getInstance_7().jsonParser.j15(ListSerializer(Companion_getInstance_12().l17()), templatesJson);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = unresolved.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.setMultipleTemplates.' call\n resolve(this, element, this.f3y_1, unresolved);\n }\n } catch ($p) {\n if ($p instanceof Error_0) {\n var e = $p;\n // Inline function 'kotlin.error' call\n var message = toString_0(e.message);\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n throw $p;\n }\n }\n };\n protoOf(DynamicProductCatalog).setProduct = function (productJson) {\n try {\n var tmp0_safe_receiver = Companion_getInstance_7().jsonParser.j15(Companion_getInstance_6().l17(), productJson);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var this_0 = this.d3y_1;\n var key = tmp0_safe_receiver.id;\n this_0.r2(key, tmp0_safe_receiver);\n }\n } catch ($p) {\n if ($p instanceof Error_0) {\n var e = $p;\n // Inline function 'kotlin.error' call\n var message = toString_0(e.message);\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n throw $p;\n }\n }\n };\n protoOf(DynamicProductCatalog).setMultipleProducts = function (productsJson) {\n try {\n // Inline function 'kotlin.collections.map' call\n var this_0 = Companion_getInstance_7().jsonParser.j15(ListSerializer(Companion_getInstance_6().l17()), productsJson);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n var this_1 = this.d3y_1;\n var key = item.id;\n this_1.r2(key, item);\n destination.q(Unit_instance);\n }\n } catch ($p) {\n if ($p instanceof Error_0) {\n var e = $p;\n // Inline function 'kotlin.error' call\n var message = toString_0(e.message);\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n throw $p;\n }\n }\n };\n protoOf(DynamicProductCatalog).setFromPackedProducts = function (packedJson) {\n try {\n // Inline function 'kotlin.collections.map' call\n var this_0 = Companion_getInstance_7().jsonParser.j15(ListSerializer(Companion_getInstance_11().l17()), packedJson);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n var product = Companion_getInstance_6().fromPackedProduct(item);\n var template = Companion_getInstance_12().fromPackedProduct(item);\n // Inline function 'kotlin.collections.set' call\n var this_1 = this.d3y_1;\n var key = product.id;\n this_1.r2(key, product);\n var this_2 = this.f3y_1;\n var key_0 = template.templateId;\n this_2.r2(key_0, template);\n destination.q(Unit_instance);\n }\n } catch ($p) {\n if ($p instanceof Error_0) {\n var e = $p;\n // Inline function 'kotlin.error' call\n var message = toString_0(e.message);\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n throw $p;\n }\n }\n };\n protoOf(DynamicProductCatalog).hasTemplateFor = function (templateId) {\n return this.f3y_1.y2(templateId);\n };\n protoOf(DynamicProductCatalog).createCustomAssemblyWithOtherParts = function (originalProduct, parts) {\n var tmp0_elvis_lhs = this.findProductDTO(originalProduct);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var originalDynamicProduct = tmp;\n var oldParts = originalDynamicProduct.template.parts;\n var tmp_0;\n if (oldParts == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = oldParts.length;\n while (inductionVariable < last) {\n var element = oldParts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n var tmp$ret$0;\n $l$block: {\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.createCustomAssembly.' call\n var tmp0_safe_receiver = getProductInfo(this, element.id);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.template;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.id;\n var tmp_1;\n if (tmp2_elvis_lhs == null) {\n tmp$ret$0 = null;\n break $l$block;\n } else {\n tmp_1 = tmp2_elvis_lhs;\n }\n var templateForOldPart = tmp_1;\n tmp$ret$0 = to(templateForOldPart, element.id);\n }\n var tmp0_safe_receiver_0 = tmp$ret$0;\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver_0);\n }\n }\n tmp_0 = destination;\n }\n var tmp2_safe_receiver = tmp_0;\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toMap(tmp2_safe_receiver);\n var oldPartsTemplates = tmp3_elvis_lhs == null ? emptyMap() : tmp3_elvis_lhs;\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_0 = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = parts.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = parts[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n var tmp$ret$4;\n $l$block_1: {\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.createCustomAssembly.' call\n var tmp0_safe_receiver_1 = getProductInfo(this, element_0);\n var tmp1_safe_receiver_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.template;\n var tmp2_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.id;\n var tmp_2;\n if (tmp2_elvis_lhs_0 == null) {\n tmp$ret$4 = null;\n break $l$block_1;\n } else {\n tmp_2 = tmp2_elvis_lhs_0;\n }\n var templateForNewPart = tmp_2;\n var tmp3_elvis_lhs_0 = oldPartsTemplates.b3(templateForNewPart);\n var tmp_3;\n if (tmp3_elvis_lhs_0 == null) {\n tmp$ret$4 = null;\n break $l$block_1;\n } else {\n tmp_3 = tmp3_elvis_lhs_0;\n }\n var oldPartWithSameTemplate = tmp_3;\n tmp$ret$4 = to(oldPartWithSameTemplate, element_0);\n }\n var tmp0_safe_receiver_2 = tmp$ret$4;\n if (tmp0_safe_receiver_2 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_0.q(tmp0_safe_receiver_2);\n }\n }\n var replaceMap = toMap(destination_0);\n var specification = this.productSpecification(originalProduct);\n var tmp_4;\n if (specification == null) {\n tmp_4 = null;\n } else {\n Companion_getInstance();\n tmp_4 = specification._findComponentKt(43);\n }\n var partsComponent = tmp_4;\n var tmp6_safe_receiver = partsComponent == null ? null : partsComponent.i1l_1;\n var tmp_5;\n if (tmp6_safe_receiver == null) {\n tmp_5 = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$(tmp6_safe_receiver.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = tmp6_safe_receiver.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.createCustomAssembly.' call\n var newPartProductRef = replaceMap.b3(item.u2());\n var tmp_6;\n if (!(newPartProductRef == null)) {\n tmp_6 = to(item.t2(), newPartProductRef);\n } else {\n tmp_6 = to(item.t2(), item.u2());\n }\n var tmp$ret$9 = tmp_6;\n destination_1.q(tmp$ret$9);\n }\n tmp_5 = destination_1;\n }\n var tmp7_safe_receiver = tmp_5;\n var newPartsMap = tmp7_safe_receiver == null ? null : toMap(tmp7_safe_receiver);\n var tmp_7;\n if (!(newPartsMap == null)) {\n tmp_7 = specification.addComponent(new AssemblyPartsComponent(newPartsMap));\n } else {\n tmp_7 = specification;\n }\n return tmp_7;\n };\n protoOf(DynamicProductCatalog).generateAssemblyComponents = function (assemblyJson, productRef) {\n var tmp0_safe_receiver = this.findProductDTO(productRef);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.generateAssemblyComponents.' call\n var tmp_0;\n if (!(tmp0_safe_receiver.template.parts == null)) {\n var template = Companion_getInstance_7().jsonParser.j15(Companion_getInstance_23().l17(), assemblyJson);\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.catalog.DynamicProductCatalog.generateAssemblyComponents..' call\n var templateChildren = template.children;\n tmp_0 = Companion_getInstance_23().mapGeneratorPartsToTemplateChildren(this, toMutableList(tmp0_safe_receiver.template.parts), templateChildren, tmp0_safe_receiver.template.size);\n } else {\n tmp_0 = null;\n }\n tmp = tmp_0;\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_1;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$4 = [];\n tmp_1 = new Pair(tmp$ret$4, emptyMap());\n } else {\n tmp_1 = tmp1_elvis_lhs;\n }\n var assemblyComponents = tmp_1;\n return new DynamicProductCatalog$generateAssemblyComponents$1(assemblyComponents);\n };\n protoOf(DynamicProductCatalog).toString = function () {\n return 'Dynamic Range';\n };\n function Companion_2() {\n Companion_instance_7 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.p3y_1 = [null, null, null, new ArrayListSerializer($serializer_getInstance_7()), null];\n }\n protoOf(Companion_2).l17 = function () {\n return $serializer_getInstance_4();\n };\n var Companion_instance_7;\n function Companion_getInstance_8() {\n if (Companion_instance_7 == null)\n new Companion_2();\n return Companion_instance_7;\n }\n function $serializer_0() {\n $serializer_instance_0 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.catalog.PackedProductData', this, 5);\n tmp0_serialDesc.cv('range', false);\n tmp0_serialDesc.cv('schemaVersion', false);\n tmp0_serialDesc.cv('rangeVersion', false);\n tmp0_serialDesc.cv('products', false);\n tmp0_serialDesc.cv('assetSource', true);\n this.v3y_1 = tmp0_serialDesc;\n }\n protoOf($serializer_0).ok = function () {\n return this.v3y_1;\n };\n protoOf($serializer_0).rv = function () {\n var tmp0_cached = Companion_getInstance_8().p3y_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[3], get_nullable(StringSerializer_getInstance())];\n };\n protoOf($serializer_0).qk = function (decoder) {\n var tmp0_desc = this.v3y_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_input = decoder.nn(tmp0_desc);\n var tmp10_cached = Companion_getInstance_8().p3y_1;\n if (tmp9_input.do()) {\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp9_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp9_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp9_input.zn(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp9_input.bo(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp9_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp9_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp9_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp9_input.zn(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp9_input.bo(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp9_input.on(tmp0_desc);\n return PackedProductData_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);\n };\n protoOf($serializer_0).w3y = function (encoder, value) {\n var tmp0_desc = this.v3y_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_8().p3y_1;\n tmp1_output.cp(tmp0_desc, 0, value.range);\n tmp1_output.cp(tmp0_desc, 1, value.schemaVersion);\n tmp1_output.cp(tmp0_desc, 2, value.rangeVersion);\n tmp1_output.ep(tmp0_desc, 3, tmp2_cached[3], value.products);\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.assetSource == null)) {\n tmp1_output.gp(tmp0_desc, 4, StringSerializer_getInstance(), value.assetSource);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_0).pk = function (encoder, value) {\n return this.w3y(encoder, value instanceof PackedProductData ? value : THROW_CCE());\n };\n var $serializer_instance_0;\n function $serializer_getInstance_4() {\n if ($serializer_instance_0 == null)\n new $serializer_0();\n return $serializer_instance_0;\n }\n function PackedProductData_init_$Init$(seen1, range, schemaVersion, rangeVersion, products, assetSource, serializationConstructorMarker, $this) {\n if (!(15 === (15 & seen1))) {\n throwMissingFieldException(seen1, 15, $serializer_getInstance_4().v3y_1);\n }\n $this.range = range;\n $this.schemaVersion = schemaVersion;\n $this.rangeVersion = rangeVersion;\n $this.products = products;\n if (0 === (seen1 & 16))\n $this.assetSource = null;\n else\n $this.assetSource = assetSource;\n return $this;\n }\n function PackedProductData_init_$Create$(seen1, range, schemaVersion, rangeVersion, products, assetSource, serializationConstructorMarker) {\n return PackedProductData_init_$Init$(seen1, range, schemaVersion, rangeVersion, products, assetSource, serializationConstructorMarker, objectCreate(protoOf(PackedProductData)));\n }\n function PackedProductData(range, schemaVersion, rangeVersion, products, assetSource) {\n Companion_getInstance_8();\n assetSource = assetSource === VOID ? null : assetSource;\n this.range = range;\n this.schemaVersion = schemaVersion;\n this.rangeVersion = rangeVersion;\n this.products = products;\n this.assetSource = assetSource;\n }\n protoOf(PackedProductData).x3y = function () {\n return this.range;\n };\n protoOf(PackedProductData).y3y = function () {\n return this.schemaVersion;\n };\n protoOf(PackedProductData).z3y = function () {\n return this.rangeVersion;\n };\n protoOf(PackedProductData).n1m = function () {\n return this.products;\n };\n protoOf(PackedProductData).a3z = function () {\n return this.assetSource;\n };\n protoOf(PackedProductData).af = function () {\n return this.range;\n };\n protoOf(PackedProductData).bf = function () {\n return this.schemaVersion;\n };\n protoOf(PackedProductData).g1k = function () {\n return this.rangeVersion;\n };\n protoOf(PackedProductData).h1k = function () {\n return this.products;\n };\n protoOf(PackedProductData).i1k = function () {\n return this.assetSource;\n };\n protoOf(PackedProductData).b3z = function (range, schemaVersion, rangeVersion, products, assetSource) {\n return new PackedProductData(range, schemaVersion, rangeVersion, products, assetSource);\n };\n protoOf(PackedProductData).copy = function (range, schemaVersion, rangeVersion, products, assetSource, $super) {\n range = range === VOID ? this.range : range;\n schemaVersion = schemaVersion === VOID ? this.schemaVersion : schemaVersion;\n rangeVersion = rangeVersion === VOID ? this.rangeVersion : rangeVersion;\n products = products === VOID ? this.products : products;\n assetSource = assetSource === VOID ? this.assetSource : assetSource;\n return this.b3z(range, schemaVersion, rangeVersion, products, assetSource);\n };\n protoOf(PackedProductData).toString = function () {\n return 'PackedProductData(range=' + this.range + ', schemaVersion=' + this.schemaVersion + ', rangeVersion=' + this.rangeVersion + ', products=' + this.products + ', assetSource=' + this.assetSource + ')';\n };\n protoOf(PackedProductData).hashCode = function () {\n var result = getStringHashCode(this.range);\n result = imul(result, 31) + getStringHashCode(this.schemaVersion) | 0;\n result = imul(result, 31) + getStringHashCode(this.rangeVersion) | 0;\n result = imul(result, 31) + hashCode(this.products) | 0;\n result = imul(result, 31) + (this.assetSource == null ? 0 : getStringHashCode(this.assetSource)) | 0;\n return result;\n };\n protoOf(PackedProductData).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PackedProductData))\n return false;\n var tmp0_other_with_cast = other instanceof PackedProductData ? other : THROW_CCE();\n if (!(this.range === tmp0_other_with_cast.range))\n return false;\n if (!(this.schemaVersion === tmp0_other_with_cast.schemaVersion))\n return false;\n if (!(this.rangeVersion === tmp0_other_with_cast.rangeVersion))\n return false;\n if (!equals(this.products, tmp0_other_with_cast.products))\n return false;\n if (!(this.assetSource == tmp0_other_with_cast.assetSource))\n return false;\n return true;\n };\n function Companion_3() {\n Companion_instance_8 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.o3y_1 = [null, null, null, new ArrayListSerializer($serializer_getInstance_3())];\n }\n protoOf(Companion_3).l17 = function () {\n return $serializer_getInstance_5();\n };\n var Companion_instance_8;\n function Companion_getInstance_9() {\n if (Companion_instance_8 == null)\n new Companion_3();\n return Companion_instance_8;\n }\n function $serializer_1() {\n $serializer_instance_1 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.catalog.DynamicProductData', this, 4);\n tmp0_serialDesc.cv('range', false);\n tmp0_serialDesc.cv('schemaVersion', false);\n tmp0_serialDesc.cv('rangeVersion', false);\n tmp0_serialDesc.cv('products', false);\n this.c3z_1 = tmp0_serialDesc;\n }\n protoOf($serializer_1).ok = function () {\n return this.c3z_1;\n };\n protoOf($serializer_1).rv = function () {\n var tmp0_cached = Companion_getInstance_9().o3y_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[3]];\n };\n protoOf($serializer_1).qk = function (decoder) {\n var tmp0_desc = this.c3z_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_input = decoder.nn(tmp0_desc);\n var tmp9_cached = Companion_getInstance_9().o3y_1;\n if (tmp8_input.do()) {\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp8_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp8_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp8_input.zn(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp8_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp8_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp8_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp8_input.zn(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp8_input.on(tmp0_desc);\n return DynamicProductData_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);\n };\n protoOf($serializer_1).d3z = function (encoder, value) {\n var tmp0_desc = this.c3z_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_9().o3y_1;\n tmp1_output.cp(tmp0_desc, 0, value.range);\n tmp1_output.cp(tmp0_desc, 1, value.schemaVersion);\n tmp1_output.cp(tmp0_desc, 2, value.rangeVersion);\n tmp1_output.ep(tmp0_desc, 3, tmp2_cached[3], value.products);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_1).pk = function (encoder, value) {\n return this.d3z(encoder, value instanceof DynamicProductData ? value : THROW_CCE());\n };\n var $serializer_instance_1;\n function $serializer_getInstance_5() {\n if ($serializer_instance_1 == null)\n new $serializer_1();\n return $serializer_instance_1;\n }\n function DynamicProductData_init_$Init$(seen1, range, schemaVersion, rangeVersion, products, serializationConstructorMarker, $this) {\n if (!(15 === (15 & seen1))) {\n throwMissingFieldException(seen1, 15, $serializer_getInstance_5().c3z_1);\n }\n $this.range = range;\n $this.schemaVersion = schemaVersion;\n $this.rangeVersion = rangeVersion;\n $this.products = products;\n return $this;\n }\n function DynamicProductData_init_$Create$(seen1, range, schemaVersion, rangeVersion, products, serializationConstructorMarker) {\n return DynamicProductData_init_$Init$(seen1, range, schemaVersion, rangeVersion, products, serializationConstructorMarker, objectCreate(protoOf(DynamicProductData)));\n }\n function DynamicProductData(range, schemaVersion, rangeVersion, products) {\n Companion_getInstance_9();\n this.range = range;\n this.schemaVersion = schemaVersion;\n this.rangeVersion = rangeVersion;\n this.products = products;\n }\n protoOf(DynamicProductData).x3y = function () {\n return this.range;\n };\n protoOf(DynamicProductData).y3y = function () {\n return this.schemaVersion;\n };\n protoOf(DynamicProductData).z3y = function () {\n return this.rangeVersion;\n };\n protoOf(DynamicProductData).n1m = function () {\n return this.products;\n };\n protoOf(DynamicProductData).af = function () {\n return this.range;\n };\n protoOf(DynamicProductData).bf = function () {\n return this.schemaVersion;\n };\n protoOf(DynamicProductData).g1k = function () {\n return this.rangeVersion;\n };\n protoOf(DynamicProductData).h1k = function () {\n return this.products;\n };\n protoOf(DynamicProductData).e3z = function (range, schemaVersion, rangeVersion, products) {\n return new DynamicProductData(range, schemaVersion, rangeVersion, products);\n };\n protoOf(DynamicProductData).copy = function (range, schemaVersion, rangeVersion, products, $super) {\n range = range === VOID ? this.range : range;\n schemaVersion = schemaVersion === VOID ? this.schemaVersion : schemaVersion;\n rangeVersion = rangeVersion === VOID ? this.rangeVersion : rangeVersion;\n products = products === VOID ? this.products : products;\n return this.e3z(range, schemaVersion, rangeVersion, products);\n };\n protoOf(DynamicProductData).toString = function () {\n return 'DynamicProductData(range=' + this.range + ', schemaVersion=' + this.schemaVersion + ', rangeVersion=' + this.rangeVersion + ', products=' + this.products + ')';\n };\n protoOf(DynamicProductData).hashCode = function () {\n var result = getStringHashCode(this.range);\n result = imul(result, 31) + getStringHashCode(this.schemaVersion) | 0;\n result = imul(result, 31) + getStringHashCode(this.rangeVersion) | 0;\n result = imul(result, 31) + hashCode(this.products) | 0;\n return result;\n };\n protoOf(DynamicProductData).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof DynamicProductData))\n return false;\n var tmp0_other_with_cast = other instanceof DynamicProductData ? other : THROW_CCE();\n if (!(this.range === tmp0_other_with_cast.range))\n return false;\n if (!(this.schemaVersion === tmp0_other_with_cast.schemaVersion))\n return false;\n if (!(this.rangeVersion === tmp0_other_with_cast.rangeVersion))\n return false;\n if (!equals(this.products, tmp0_other_with_cast.products))\n return false;\n return true;\n };\n function Companion_4() {\n Companion_instance_9 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.j3y_1 = [null, null, null, new ArrayListSerializer($serializer_getInstance_8()), null];\n }\n protoOf(Companion_4).l17 = function () {\n return $serializer_getInstance_6();\n };\n var Companion_instance_9;\n function Companion_getInstance_10() {\n if (Companion_instance_9 == null)\n new Companion_4();\n return Companion_instance_9;\n }\n function $serializer_2() {\n $serializer_instance_2 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.catalog.DynamicTemplateData', this, 5);\n tmp0_serialDesc.cv('range', false);\n tmp0_serialDesc.cv('rangeVersion', false);\n tmp0_serialDesc.cv('schemaVersion', false);\n tmp0_serialDesc.cv('templates', false);\n tmp0_serialDesc.cv('assetSource', true);\n this.f3z_1 = tmp0_serialDesc;\n }\n protoOf($serializer_2).ok = function () {\n return this.f3z_1;\n };\n protoOf($serializer_2).rv = function () {\n var tmp0_cached = Companion_getInstance_10().j3y_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[3], get_nullable(StringSerializer_getInstance())];\n };\n protoOf($serializer_2).qk = function (decoder) {\n var tmp0_desc = this.f3z_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_input = decoder.nn(tmp0_desc);\n var tmp10_cached = Companion_getInstance_10().j3y_1;\n if (tmp9_input.do()) {\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp9_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp9_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp9_input.zn(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp9_input.bo(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp9_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp9_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp9_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp9_input.zn(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp9_input.bo(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp9_input.on(tmp0_desc);\n return DynamicTemplateData_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);\n };\n protoOf($serializer_2).g3z = function (encoder, value) {\n var tmp0_desc = this.f3z_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_10().j3y_1;\n tmp1_output.cp(tmp0_desc, 0, value.range);\n tmp1_output.cp(tmp0_desc, 1, value.rangeVersion);\n tmp1_output.cp(tmp0_desc, 2, value.schemaVersion);\n tmp1_output.ep(tmp0_desc, 3, tmp2_cached[3], value.templates);\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.assetSource == null)) {\n tmp1_output.gp(tmp0_desc, 4, StringSerializer_getInstance(), value.assetSource);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_2).pk = function (encoder, value) {\n return this.g3z(encoder, value instanceof DynamicTemplateData ? value : THROW_CCE());\n };\n var $serializer_instance_2;\n function $serializer_getInstance_6() {\n if ($serializer_instance_2 == null)\n new $serializer_2();\n return $serializer_instance_2;\n }\n function DynamicTemplateData_init_$Init$(seen1, range, rangeVersion, schemaVersion, templates, assetSource, serializationConstructorMarker, $this) {\n if (!(15 === (15 & seen1))) {\n throwMissingFieldException(seen1, 15, $serializer_getInstance_6().f3z_1);\n }\n $this.range = range;\n $this.rangeVersion = rangeVersion;\n $this.schemaVersion = schemaVersion;\n $this.templates = templates;\n if (0 === (seen1 & 16))\n $this.assetSource = null;\n else\n $this.assetSource = assetSource;\n return $this;\n }\n function DynamicTemplateData_init_$Create$(seen1, range, rangeVersion, schemaVersion, templates, assetSource, serializationConstructorMarker) {\n return DynamicTemplateData_init_$Init$(seen1, range, rangeVersion, schemaVersion, templates, assetSource, serializationConstructorMarker, objectCreate(protoOf(DynamicTemplateData)));\n }\n function DynamicTemplateData(range, rangeVersion, schemaVersion, templates, assetSource) {\n Companion_getInstance_10();\n assetSource = assetSource === VOID ? null : assetSource;\n this.range = range;\n this.rangeVersion = rangeVersion;\n this.schemaVersion = schemaVersion;\n this.templates = templates;\n this.assetSource = assetSource;\n }\n protoOf(DynamicTemplateData).x3y = function () {\n return this.range;\n };\n protoOf(DynamicTemplateData).z3y = function () {\n return this.rangeVersion;\n };\n protoOf(DynamicTemplateData).y3y = function () {\n return this.schemaVersion;\n };\n protoOf(DynamicTemplateData).h3z = function () {\n return this.templates;\n };\n protoOf(DynamicTemplateData).a3z = function () {\n return this.assetSource;\n };\n protoOf(DynamicTemplateData).af = function () {\n return this.range;\n };\n protoOf(DynamicTemplateData).bf = function () {\n return this.rangeVersion;\n };\n protoOf(DynamicTemplateData).g1k = function () {\n return this.schemaVersion;\n };\n protoOf(DynamicTemplateData).h1k = function () {\n return this.templates;\n };\n protoOf(DynamicTemplateData).i1k = function () {\n return this.assetSource;\n };\n protoOf(DynamicTemplateData).i3z = function (range, rangeVersion, schemaVersion, templates, assetSource) {\n return new DynamicTemplateData(range, rangeVersion, schemaVersion, templates, assetSource);\n };\n protoOf(DynamicTemplateData).copy = function (range, rangeVersion, schemaVersion, templates, assetSource, $super) {\n range = range === VOID ? this.range : range;\n rangeVersion = rangeVersion === VOID ? this.rangeVersion : rangeVersion;\n schemaVersion = schemaVersion === VOID ? this.schemaVersion : schemaVersion;\n templates = templates === VOID ? this.templates : templates;\n assetSource = assetSource === VOID ? this.assetSource : assetSource;\n return this.i3z(range, rangeVersion, schemaVersion, templates, assetSource);\n };\n protoOf(DynamicTemplateData).toString = function () {\n return 'DynamicTemplateData(range=' + this.range + ', rangeVersion=' + this.rangeVersion + ', schemaVersion=' + this.schemaVersion + ', templates=' + this.templates + ', assetSource=' + this.assetSource + ')';\n };\n protoOf(DynamicTemplateData).hashCode = function () {\n var result = getStringHashCode(this.range);\n result = imul(result, 31) + getStringHashCode(this.rangeVersion) | 0;\n result = imul(result, 31) + getStringHashCode(this.schemaVersion) | 0;\n result = imul(result, 31) + hashCode(this.templates) | 0;\n result = imul(result, 31) + (this.assetSource == null ? 0 : getStringHashCode(this.assetSource)) | 0;\n return result;\n };\n protoOf(DynamicTemplateData).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof DynamicTemplateData))\n return false;\n var tmp0_other_with_cast = other instanceof DynamicTemplateData ? other : THROW_CCE();\n if (!(this.range === tmp0_other_with_cast.range))\n return false;\n if (!(this.rangeVersion === tmp0_other_with_cast.rangeVersion))\n return false;\n if (!(this.schemaVersion === tmp0_other_with_cast.schemaVersion))\n return false;\n if (!equals(this.templates, tmp0_other_with_cast.templates))\n return false;\n if (!(this.assetSource == tmp0_other_with_cast.assetSource))\n return false;\n return true;\n };\n function Companion_5() {\n Companion_instance_10 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.s3y_1 = [null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null];\n }\n protoOf(Companion_5).l17 = function () {\n return $serializer_getInstance_7();\n };\n var Companion_instance_10;\n function Companion_getInstance_11() {\n if (Companion_instance_10 == null)\n new Companion_5();\n return Companion_instance_10;\n }\n function $serializer_3() {\n $serializer_instance_3 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.catalog.PackedProduct', this, 4);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('name', false);\n tmp0_serialDesc.cv('config', true);\n tmp0_serialDesc.cv('components', false);\n this.j3z_1 = tmp0_serialDesc;\n }\n protoOf($serializer_3).ok = function () {\n return this.j3z_1;\n };\n protoOf($serializer_3).rv = function () {\n var tmp0_cached = Companion_getInstance_11().s3y_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[2]), $serializer_getInstance_16()];\n };\n protoOf($serializer_3).qk = function (decoder) {\n var tmp0_desc = this.j3z_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_input = decoder.nn(tmp0_desc);\n var tmp9_cached = Companion_getInstance_11().s3y_1;\n if (tmp8_input.do()) {\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp8_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp8_input.bo(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp8_input.zn(tmp0_desc, 3, $serializer_getInstance_16(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp8_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp8_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp8_input.bo(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp8_input.zn(tmp0_desc, 3, $serializer_getInstance_16(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp8_input.on(tmp0_desc);\n return PackedProduct_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);\n };\n protoOf($serializer_3).k3z = function (encoder, value) {\n var tmp0_desc = this.j3z_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_11().s3y_1;\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.gp(tmp0_desc, 1, StringSerializer_getInstance(), value.name);\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.config == null)) {\n tmp1_output.gp(tmp0_desc, 2, tmp2_cached[2], value.config);\n }\n tmp1_output.ep(tmp0_desc, 3, $serializer_getInstance_16(), value.components);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_3).pk = function (encoder, value) {\n return this.k3z(encoder, value instanceof PackedProduct ? value : THROW_CCE());\n };\n var $serializer_instance_3;\n function $serializer_getInstance_7() {\n if ($serializer_instance_3 == null)\n new $serializer_3();\n return $serializer_instance_3;\n }\n function PackedProduct_init_$Init$(seen1, id, name, config, components, serializationConstructorMarker, $this) {\n if (!(11 === (11 & seen1))) {\n throwMissingFieldException(seen1, 11, $serializer_getInstance_7().j3z_1);\n }\n $this.id = id;\n $this.name = name;\n if (0 === (seen1 & 4))\n $this.config = null;\n else\n $this.config = config;\n $this.components = components;\n return $this;\n }\n function PackedProduct_init_$Create$(seen1, id, name, config, components, serializationConstructorMarker) {\n return PackedProduct_init_$Init$(seen1, id, name, config, components, serializationConstructorMarker, objectCreate(protoOf(PackedProduct)));\n }\n function PackedProduct(id, name, config, components) {\n Companion_getInstance_11();\n config = config === VOID ? null : config;\n this.id = id;\n this.name = name;\n this.config = config;\n this.components = components;\n }\n protoOf(PackedProduct).s1k = function () {\n return this.id;\n };\n protoOf(PackedProduct).mb = function () {\n return this.name;\n };\n protoOf(PackedProduct).l3z = function () {\n return this.config;\n };\n protoOf(PackedProduct).j1m = function () {\n return this.components;\n };\n protoOf(PackedProduct).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof PackedProduct))\n THROW_CCE();\n if (!(this.id === other.id))\n return false;\n return true;\n };\n protoOf(PackedProduct).hashCode = function () {\n return getStringHashCode(this.id);\n };\n protoOf(PackedProduct).af = function () {\n return this.id;\n };\n protoOf(PackedProduct).bf = function () {\n return this.name;\n };\n protoOf(PackedProduct).g1k = function () {\n return this.config;\n };\n protoOf(PackedProduct).h1k = function () {\n return this.components;\n };\n protoOf(PackedProduct).m3z = function (id, name, config, components) {\n return new PackedProduct(id, name, config, components);\n };\n protoOf(PackedProduct).copy = function (id, name, config, components, $super) {\n id = id === VOID ? this.id : id;\n name = name === VOID ? this.name : name;\n config = config === VOID ? this.config : config;\n components = components === VOID ? this.components : components;\n return this.m3z(id, name, config, components);\n };\n protoOf(PackedProduct).toString = function () {\n return 'PackedProduct(id=' + this.id + ', name=' + this.name + ', config=' + this.config + ', components=' + this.components + ')';\n };\n function Companion_6() {\n Companion_instance_11 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.r3y_1 = [null, null, null, new ReferenceArraySerializer(PrimitiveClasses_getInstance().u7(), StringSerializer_getInstance())];\n }\n protoOf(Companion_6).fromPackedProduct = function (packed) {\n var tmp0_elvis_lhs = packed.components.product;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n var message = 'Space product ' + packed.id;\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var product = tmp;\n var template = new ProductTemplate(product.productGroup, product.productGroup, packed.components);\n template.components.product = null;\n return template;\n };\n protoOf(Companion_6).l17 = function () {\n return $serializer_getInstance_8();\n };\n var Companion_instance_11;\n function Companion_getInstance_12() {\n if (Companion_instance_11 == null)\n new Companion_6();\n return Companion_instance_11;\n }\n function $serializer_4() {\n $serializer_instance_4 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.catalog.ProductTemplate', this, 4);\n tmp0_serialDesc.cv('templateId', false);\n tmp0_serialDesc.cv('name', true);\n tmp0_serialDesc.cv('components', false);\n tmp0_serialDesc.cv('inherits', true);\n this.n3z_1 = tmp0_serialDesc;\n }\n protoOf($serializer_4).ok = function () {\n return this.n3z_1;\n };\n protoOf($serializer_4).rv = function () {\n var tmp0_cached = Companion_getInstance_12().r3y_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), $serializer_getInstance_16(), get_nullable(tmp0_cached[3])];\n };\n protoOf($serializer_4).qk = function (decoder) {\n var tmp0_desc = this.n3z_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp9_input = decoder.nn(tmp0_desc);\n var tmp10_cached = Companion_getInstance_12().r3y_1;\n if (tmp9_input.do()) {\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp9_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp9_input.zn(tmp0_desc, 2, $serializer_getInstance_16(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp9_input.bo(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp9_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp9_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp9_input.zn(tmp0_desc, 2, $serializer_getInstance_16(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp9_input.bo(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp9_input.on(tmp0_desc);\n return ProductTemplate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);\n };\n protoOf($serializer_4).o3z = function (encoder, value) {\n var tmp0_desc = this.n3z_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_12().r3y_1;\n tmp1_output.cp(tmp0_desc, 0, value.templateId);\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.name === '')) {\n tmp1_output.gp(tmp0_desc, 1, StringSerializer_getInstance(), value.name);\n }\n tmp1_output.ep(tmp0_desc, 2, $serializer_getInstance_16(), value.components);\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.inherits == null)) {\n tmp1_output.gp(tmp0_desc, 3, tmp2_cached[3], value.inherits);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_4).pk = function (encoder, value) {\n return this.o3z(encoder, value instanceof ProductTemplate ? value : THROW_CCE());\n };\n var $serializer_instance_4;\n function $serializer_getInstance_8() {\n if ($serializer_instance_4 == null)\n new $serializer_4();\n return $serializer_instance_4;\n }\n function ProductTemplate_init_$Init$(seen1, templateId, name, components, inherits, serializationConstructorMarker, $this) {\n if (!(5 === (5 & seen1))) {\n throwMissingFieldException(seen1, 5, $serializer_getInstance_8().n3z_1);\n }\n $this.templateId = templateId;\n if (0 === (seen1 & 2))\n $this.name = '';\n else\n $this.name = name;\n $this.components = components;\n if (0 === (seen1 & 8))\n $this.inherits = null;\n else\n $this.inherits = inherits;\n $this.o3x_1 = 0;\n return $this;\n }\n function ProductTemplate_init_$Create$(seen1, templateId, name, components, inherits, serializationConstructorMarker) {\n return ProductTemplate_init_$Init$(seen1, templateId, name, components, inherits, serializationConstructorMarker, objectCreate(protoOf(ProductTemplate)));\n }\n function ProductTemplate(templateId, name, components, inherits) {\n Companion_getInstance_12();\n name = name === VOID ? '' : name;\n inherits = inherits === VOID ? null : inherits;\n this.templateId = templateId;\n this.name = name;\n this.components = components;\n this.inherits = inherits;\n this.o3x_1 = 0;\n }\n protoOf(ProductTemplate).f2h = function () {\n return this.templateId;\n };\n protoOf(ProductTemplate).mb = function () {\n return this.name;\n };\n protoOf(ProductTemplate).j1m = function () {\n return this.components;\n };\n protoOf(ProductTemplate).p3z = function () {\n return this.inherits;\n };\n protoOf(ProductTemplate).q3z = function (templateData, overrideSize) {\n var tmp;\n // Inline function 'kotlin.collections.isNullOrEmpty' call\n var this_0 = this.components.connectors;\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0;\n if (this_0 == null) {\n tmp_0 = true;\n } else {\n // Inline function 'kotlin.collections.isEmpty' call\n tmp_0 = this_0.length === 0;\n }\n if (tmp_0) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [];\n } else {\n var tmp2_safe_receiver = this.components.connectors;\n var tmp_1;\n if (tmp2_safe_receiver == null) {\n tmp_1 = null;\n } else {\n var tmp_2 = overrideSize == null ? templateData.size : overrideSize;\n var tmp1_elvis_lhs = templateData.family;\n tmp_1 = getConnectorsForSize(tmp2_safe_receiver, tmp_2, templateData.comSize, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs, templateData.id);\n }\n var tmp3_elvis_lhs = tmp_1;\n var tmp_3;\n if (tmp3_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_3 = [];\n } else {\n tmp_3 = tmp3_elvis_lhs;\n }\n tmp = tmp_3;\n }\n return tmp;\n };\n protoOf(ProductTemplate).getConnectors = function (templateData, overrideSize, $super) {\n overrideSize = overrideSize === VOID ? null : overrideSize;\n return this.q3z(templateData, overrideSize);\n };\n protoOf(ProductTemplate).getRelativeConnectorData = function (size) {\n var tmp0_safe_receiver = this.components.connectors;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$_0();\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.catalog.ProductTemplate.getRelativeConnectorData.' call\n if (element.isRelativeToBounds()) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var tmp1_safe_receiver = tmp;\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(tmp1_safe_receiver, 10));\n var tmp0_iterator = tmp1_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.catalog.ProductTemplate.getRelativeConnectorData.' call\n var tmp$ret$3 = item.createRelativeConnectorData(size);\n destination_0.q(tmp$ret$3);\n }\n tmp_0 = destination_0;\n }\n var tmp2_safe_receiver = tmp_0;\n var tmp_1;\n if (tmp2_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_1 = copyToArray(tmp2_safe_receiver);\n }\n return tmp_1;\n };\n protoOf(ProductTemplate).inherit = function (extended) {\n var components = this.components.inherit(extended.components);\n return new ProductTemplate(this.templateId, this.name, components, null);\n };\n protoOf(ProductTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof ProductTemplate))\n THROW_CCE();\n if (!(this.templateId === other.templateId))\n return false;\n if (!(this.name == other.name))\n return false;\n return true;\n };\n protoOf(ProductTemplate).hashCode = function () {\n if (this.o3x_1 === 0) {\n var tmp = this;\n var tmp_0 = imul(31, getStringHashCode(this.templateId));\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver = this.name;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n tmp.o3x_1 = tmp_0 + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;\n }\n return this.o3x_1;\n };\n protoOf(ProductTemplate).af = function () {\n return this.templateId;\n };\n protoOf(ProductTemplate).bf = function () {\n return this.name;\n };\n protoOf(ProductTemplate).g1k = function () {\n return this.components;\n };\n protoOf(ProductTemplate).h1k = function () {\n return this.inherits;\n };\n protoOf(ProductTemplate).r3z = function (templateId, name, components, inherits) {\n return new ProductTemplate(templateId, name, components, inherits);\n };\n protoOf(ProductTemplate).copy = function (templateId, name, components, inherits, $super) {\n templateId = templateId === VOID ? this.templateId : templateId;\n name = name === VOID ? this.name : name;\n components = components === VOID ? this.components : components;\n inherits = inherits === VOID ? this.inherits : inherits;\n return this.r3z(templateId, name, components, inherits);\n };\n protoOf(ProductTemplate).toString = function () {\n return 'ProductTemplate(templateId=' + this.templateId + ', name=' + this.name + ', components=' + this.components + ', inherits=' + toString(this.inherits) + ')';\n };\n function MetaDataComponent(data) {\n this.data = data;\n this.s3z_1 = this.id;\n }\n protoOf(MetaDataComponent).v3r = function () {\n return this.data;\n };\n protoOf(MetaDataComponent).x1k = function () {\n return this.s3z_1;\n };\n protoOf(MetaDataComponent).s1k = function () {\n return 40;\n };\n protoOf(MetaDataComponent).t3z = function () {\n return parseMeta(this.data);\n };\n protoOf(MetaDataComponent).eq = function (other) {\n return equals((other instanceof MetaDataComponent ? other : THROW_CCE()).data, this.data);\n };\n protoOf(MetaDataComponent).af = function () {\n return this.data;\n };\n protoOf(MetaDataComponent).u3z = function (data) {\n return new MetaDataComponent(data);\n };\n protoOf(MetaDataComponent).copy = function (data, $super) {\n data = data === VOID ? this.data : data;\n return this.u3z(data);\n };\n protoOf(MetaDataComponent).toString = function () {\n return 'MetaDataComponent(data=' + this.data + ')';\n };\n protoOf(MetaDataComponent).hashCode = function () {\n return hashCode(this.data);\n };\n protoOf(MetaDataComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof MetaDataComponent))\n return false;\n var tmp0_other_with_cast = other instanceof MetaDataComponent ? other : THROW_CCE();\n if (!equals(this.data, tmp0_other_with_cast.data))\n return false;\n return true;\n };\n function Companion_7() {\n this.id = 72;\n }\n protoOf(Companion_7).s1k = function () {\n return this.id;\n };\n var Companion_instance_12;\n function Companion_getInstance_13() {\n return Companion_instance_12;\n }\n function VisualLightSourceComponent(type, intensity, colorTemperature) {\n type = type === VOID ? null : type;\n intensity = intensity === VOID ? null : intensity;\n colorTemperature = colorTemperature === VOID ? null : colorTemperature;\n this.type = type;\n this.intensity = intensity;\n this.colorTemperature = colorTemperature;\n this.v3z_1 = 72;\n }\n protoOf(VisualLightSourceComponent).a1x = function () {\n return this.type;\n };\n protoOf(VisualLightSourceComponent).w3z = function () {\n return this.intensity;\n };\n protoOf(VisualLightSourceComponent).x3z = function () {\n return this.colorTemperature;\n };\n protoOf(VisualLightSourceComponent).x1k = function () {\n return this.v3z_1;\n };\n protoOf(VisualLightSourceComponent).eq = function (other) {\n var o = other instanceof VisualLightSourceComponent ? other : THROW_CCE();\n return (this.v3z_1 === o.v3z_1 ? this.intensity == other.intensity : false) ? this.colorTemperature == o.colorTemperature : false;\n };\n function Bounds$Companion$parse$lambda($this$Json) {\n $this$Json.f16_1 = true;\n return Unit_instance;\n }\n function Companion_8() {\n }\n protoOf(Companion_8).parse = function (json) {\n var jsons = Json(VOID, Bounds$Companion$parse$lambda);\n return jsons.j15(this.l17(), json);\n };\n protoOf(Companion_8).l17 = function () {\n return $serializer_getInstance_9();\n };\n var Companion_instance_13;\n function Companion_getInstance_14() {\n return Companion_instance_13;\n }\n function $serializer_5() {\n $serializer_instance_5 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.productdata.Bounds', this, 3);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('pivot', false);\n tmp0_serialDesc.cv('size', false);\n this.y3z_1 = tmp0_serialDesc;\n }\n protoOf($serializer_5).ok = function () {\n return this.y3z_1;\n };\n protoOf($serializer_5).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), $serializer_getInstance(), $serializer_getInstance_0()];\n };\n protoOf($serializer_5).qk = function (decoder) {\n var tmp0_desc = this.y3z_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.zn(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.zn(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return Bounds_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_5).z3z = function (encoder, value) {\n var tmp0_desc = this.y3z_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance(), value.pivot);\n tmp1_output.ep(tmp0_desc, 2, $serializer_getInstance_0(), value.size);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_5).pk = function (encoder, value) {\n return this.z3z(encoder, value instanceof Bounds ? value : THROW_CCE());\n };\n var $serializer_instance_5;\n function $serializer_getInstance_9() {\n if ($serializer_instance_5 == null)\n new $serializer_5();\n return $serializer_instance_5;\n }\n function Bounds_init_$Init$(seen1, id, pivot, size, serializationConstructorMarker, $this) {\n if (!(7 === (7 & seen1))) {\n throwMissingFieldException(seen1, 7, $serializer_getInstance_9().y3z_1);\n }\n $this.id = id;\n $this.pivot = pivot;\n $this.size = size;\n return $this;\n }\n function Bounds_init_$Create$(seen1, id, pivot, size, serializationConstructorMarker) {\n return Bounds_init_$Init$(seen1, id, pivot, size, serializationConstructorMarker, objectCreate(protoOf(Bounds)));\n }\n function Bounds(id, pivot, size) {\n this.id = id;\n this.pivot = pivot;\n this.size = size;\n }\n protoOf(Bounds).s1k = function () {\n return this.id;\n };\n protoOf(Bounds).a40 = function () {\n return this.pivot;\n };\n protoOf(Bounds).n = function () {\n return this.size;\n };\n protoOf(Bounds).af = function () {\n return this.id;\n };\n protoOf(Bounds).bf = function () {\n return this.pivot;\n };\n protoOf(Bounds).g1k = function () {\n return this.size;\n };\n protoOf(Bounds).b40 = function (id, pivot, size) {\n return new Bounds(id, pivot, size);\n };\n protoOf(Bounds).copy = function (id, pivot, size, $super) {\n id = id === VOID ? this.id : id;\n pivot = pivot === VOID ? this.pivot : pivot;\n size = size === VOID ? this.size : size;\n return this.b40(id, pivot, size);\n };\n protoOf(Bounds).toString = function () {\n return 'Bounds(id=' + this.id + ', pivot=' + this.pivot + ', size=' + this.size + ')';\n };\n protoOf(Bounds).hashCode = function () {\n var result = getStringHashCode(this.id);\n result = imul(result, 31) + this.pivot.hashCode() | 0;\n result = imul(result, 31) + this.size.hashCode() | 0;\n return result;\n };\n protoOf(Bounds).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Bounds))\n return false;\n var tmp0_other_with_cast = other instanceof Bounds ? other : THROW_CCE();\n if (!(this.id === tmp0_other_with_cast.id))\n return false;\n if (!this.pivot.equals(tmp0_other_with_cast.pivot))\n return false;\n if (!this.size.equals(tmp0_other_with_cast.size))\n return false;\n return true;\n };\n function Companion_9() {\n Companion_instance_14 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.c40_1 = [null, null, null, null, new ReferenceArraySerializer(getKClass(Part), $serializer_getInstance_12()), null, null, null, null, null];\n }\n protoOf(Companion_9).l17 = function () {\n return $serializer_getInstance_10();\n };\n var Companion_instance_14;\n function Companion_getInstance_15() {\n if (Companion_instance_14 == null)\n new Companion_9();\n return Companion_instance_14;\n }\n function $serializer_6() {\n $serializer_instance_6 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.productdata.CatalogTemplateData', this, 10);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('size', false);\n tmp0_serialDesc.cv('comSize', false);\n tmp0_serialDesc.cv('family', true);\n tmp0_serialDesc.cv('parts', true);\n tmp0_serialDesc.cv('modelInfo', true);\n tmp0_serialDesc.cv('modelTransform', true);\n tmp0_serialDesc.cv('isExterior', true);\n tmp0_serialDesc.cv('isInterior', true);\n tmp0_serialDesc.cv('variant', true);\n this.d40_1 = tmp0_serialDesc;\n }\n protoOf($serializer_6).ok = function () {\n return this.d40_1;\n };\n protoOf($serializer_6).rv = function () {\n var tmp0_cached = Companion_getInstance_15().c40_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), $serializer_getInstance_0(), $serializer_getInstance_0(), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[4]), get_nullable($serializer_getInstance_11()), get_nullable($serializer_getInstance_1()), BooleanSerializer_getInstance(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];\n };\n protoOf($serializer_6).qk = function (decoder) {\n var tmp0_desc = this.d40_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_local5 = null;\n var tmp10_local6 = null;\n var tmp11_local7 = false;\n var tmp12_local8 = false;\n var tmp13_local9 = null;\n var tmp14_input = decoder.nn(tmp0_desc);\n var tmp15_cached = Companion_getInstance_15().c40_1;\n if (tmp14_input.do()) {\n tmp4_local0 = tmp14_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp14_input.zn(tmp0_desc, 1, $serializer_getInstance_0(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp14_input.zn(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp14_input.bo(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp14_input.bo(tmp0_desc, 4, tmp15_cached[4], tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n tmp9_local5 = tmp14_input.bo(tmp0_desc, 5, $serializer_getInstance_11(), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n tmp10_local6 = tmp14_input.bo(tmp0_desc, 6, $serializer_getInstance_1(), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n tmp11_local7 = tmp14_input.pn(tmp0_desc, 7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n tmp12_local8 = tmp14_input.pn(tmp0_desc, 8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n tmp13_local9 = tmp14_input.bo(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);\n tmp3_bitMask0 = tmp3_bitMask0 | 512;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp14_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp14_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp14_input.zn(tmp0_desc, 1, $serializer_getInstance_0(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp14_input.zn(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp14_input.bo(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp14_input.bo(tmp0_desc, 4, tmp15_cached[4], tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n case 5:\n tmp9_local5 = tmp14_input.bo(tmp0_desc, 5, $serializer_getInstance_11(), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n break;\n case 6:\n tmp10_local6 = tmp14_input.bo(tmp0_desc, 6, $serializer_getInstance_1(), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n break;\n case 7:\n tmp11_local7 = tmp14_input.pn(tmp0_desc, 7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n break;\n case 8:\n tmp12_local8 = tmp14_input.pn(tmp0_desc, 8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n break;\n case 9:\n tmp13_local9 = tmp14_input.bo(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);\n tmp3_bitMask0 = tmp3_bitMask0 | 512;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp14_input.on(tmp0_desc);\n return CatalogTemplateData_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, null);\n };\n protoOf($serializer_6).e40 = function (encoder, value) {\n var tmp0_desc = this.d40_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_15().c40_1;\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance_0(), value.size);\n tmp1_output.ep(tmp0_desc, 2, $serializer_getInstance_0(), value.comSize);\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.family === '')) {\n tmp1_output.gp(tmp0_desc, 3, StringSerializer_getInstance(), value.family);\n }\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.parts == null)) {\n tmp1_output.gp(tmp0_desc, 4, tmp2_cached[4], value.parts);\n }\n if (tmp1_output.kp(tmp0_desc, 5) ? true : !(value.modelInfo == null)) {\n tmp1_output.gp(tmp0_desc, 5, $serializer_getInstance_11(), value.modelInfo);\n }\n if (tmp1_output.kp(tmp0_desc, 6) ? true : !(value.modelTransform == null)) {\n tmp1_output.gp(tmp0_desc, 6, $serializer_getInstance_1(), value.modelTransform);\n }\n if (tmp1_output.kp(tmp0_desc, 7) ? true : !(value.isExterior === false)) {\n tmp1_output.uo(tmp0_desc, 7, value.isExterior);\n }\n if (tmp1_output.kp(tmp0_desc, 8) ? true : !(value.isInterior === false)) {\n tmp1_output.uo(tmp0_desc, 8, value.isInterior);\n }\n if (tmp1_output.kp(tmp0_desc, 9) ? true : !(value.variant == null)) {\n tmp1_output.gp(tmp0_desc, 9, StringSerializer_getInstance(), value.variant);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_6).pk = function (encoder, value) {\n return this.e40(encoder, value instanceof CatalogTemplateData ? value : THROW_CCE());\n };\n var $serializer_instance_6;\n function $serializer_getInstance_10() {\n if ($serializer_instance_6 == null)\n new $serializer_6();\n return $serializer_instance_6;\n }\n function CatalogTemplateData_init_$Init$(seen1, id, size, comSize, family, parts, modelInfo, modelTransform, isExterior, isInterior, variant, serializationConstructorMarker, $this) {\n if (!(7 === (7 & seen1))) {\n throwMissingFieldException(seen1, 7, $serializer_getInstance_10().d40_1);\n }\n $this.id = id;\n $this.size = size;\n $this.comSize = comSize;\n if (0 === (seen1 & 8))\n $this.family = '';\n else\n $this.family = family;\n if (0 === (seen1 & 16))\n $this.parts = null;\n else\n $this.parts = parts;\n if (0 === (seen1 & 32))\n $this.modelInfo = null;\n else\n $this.modelInfo = modelInfo;\n if (0 === (seen1 & 64))\n $this.modelTransform = null;\n else\n $this.modelTransform = modelTransform;\n if (0 === (seen1 & 128))\n $this.isExterior = false;\n else\n $this.isExterior = isExterior;\n if (0 === (seen1 & 256))\n $this.isInterior = false;\n else\n $this.isInterior = isInterior;\n if (0 === (seen1 & 512))\n $this.variant = null;\n else\n $this.variant = variant;\n return $this;\n }\n function CatalogTemplateData_init_$Create$(seen1, id, size, comSize, family, parts, modelInfo, modelTransform, isExterior, isInterior, variant, serializationConstructorMarker) {\n return CatalogTemplateData_init_$Init$(seen1, id, size, comSize, family, parts, modelInfo, modelTransform, isExterior, isInterior, variant, serializationConstructorMarker, objectCreate(protoOf(CatalogTemplateData)));\n }\n function CatalogTemplateData(id, size, comSize, family, parts, modelInfo, modelTransform, isExterior, isInterior, variant) {\n Companion_getInstance_15();\n family = family === VOID ? '' : family;\n parts = parts === VOID ? null : parts;\n modelInfo = modelInfo === VOID ? null : modelInfo;\n modelTransform = modelTransform === VOID ? null : modelTransform;\n isExterior = isExterior === VOID ? false : isExterior;\n isInterior = isInterior === VOID ? false : isInterior;\n variant = variant === VOID ? null : variant;\n this.id = id;\n this.size = size;\n this.comSize = comSize;\n this.family = family;\n this.parts = parts;\n this.modelInfo = modelInfo;\n this.modelTransform = modelTransform;\n this.isExterior = isExterior;\n this.isInterior = isInterior;\n this.variant = variant;\n }\n protoOf(CatalogTemplateData).s1k = function () {\n return this.id;\n };\n protoOf(CatalogTemplateData).n = function () {\n return this.size;\n };\n protoOf(CatalogTemplateData).g2h = function () {\n return this.comSize;\n };\n protoOf(CatalogTemplateData).h2h = function () {\n return this.family;\n };\n protoOf(CatalogTemplateData).w1k = function () {\n return this.parts;\n };\n protoOf(CatalogTemplateData).f40 = function (_set____db54di) {\n this.modelInfo = _set____db54di;\n };\n protoOf(CatalogTemplateData).g40 = function () {\n return this.modelInfo;\n };\n protoOf(CatalogTemplateData).h40 = function () {\n return this.modelTransform;\n };\n protoOf(CatalogTemplateData).i40 = function () {\n return this.isExterior;\n };\n protoOf(CatalogTemplateData).j40 = function () {\n return this.isInterior;\n };\n protoOf(CatalogTemplateData).e1k = function () {\n return this.variant;\n };\n protoOf(CatalogTemplateData).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof CatalogTemplateData))\n THROW_CCE();\n if (!(this.id === other.id))\n return false;\n return true;\n };\n protoOf(CatalogTemplateData).hashCode = function () {\n return getStringHashCode(this.id);\n };\n protoOf(CatalogTemplateData).af = function () {\n return this.id;\n };\n protoOf(CatalogTemplateData).bf = function () {\n return this.size;\n };\n protoOf(CatalogTemplateData).g1k = function () {\n return this.comSize;\n };\n protoOf(CatalogTemplateData).h1k = function () {\n return this.family;\n };\n protoOf(CatalogTemplateData).i1k = function () {\n return this.parts;\n };\n protoOf(CatalogTemplateData).j1k = function () {\n return this.modelInfo;\n };\n protoOf(CatalogTemplateData).k1k = function () {\n return this.modelTransform;\n };\n protoOf(CatalogTemplateData).p1z = function () {\n return this.isExterior;\n };\n protoOf(CatalogTemplateData).q1z = function () {\n return this.isInterior;\n };\n protoOf(CatalogTemplateData).r1z = function () {\n return this.variant;\n };\n protoOf(CatalogTemplateData).k40 = function (id, size, comSize, family, parts, modelInfo, modelTransform, isExterior, isInterior, variant) {\n return new CatalogTemplateData(id, size, comSize, family, parts, modelInfo, modelTransform, isExterior, isInterior, variant);\n };\n protoOf(CatalogTemplateData).copy = function (id, size, comSize, family, parts, modelInfo, modelTransform, isExterior, isInterior, variant, $super) {\n id = id === VOID ? this.id : id;\n size = size === VOID ? this.size : size;\n comSize = comSize === VOID ? this.comSize : comSize;\n family = family === VOID ? this.family : family;\n parts = parts === VOID ? this.parts : parts;\n modelInfo = modelInfo === VOID ? this.modelInfo : modelInfo;\n modelTransform = modelTransform === VOID ? this.modelTransform : modelTransform;\n isExterior = isExterior === VOID ? this.isExterior : isExterior;\n isInterior = isInterior === VOID ? this.isInterior : isInterior;\n variant = variant === VOID ? this.variant : variant;\n return this.k40(id, size, comSize, family, parts, modelInfo, modelTransform, isExterior, isInterior, variant);\n };\n protoOf(CatalogTemplateData).toString = function () {\n return 'CatalogTemplateData(id=' + this.id + ', size=' + this.size + ', comSize=' + this.comSize + ', family=' + this.family + ', parts=' + toString(this.parts) + ', modelInfo=' + this.modelInfo + ', modelTransform=' + this.modelTransform + ', isExterior=' + this.isExterior + ', isInterior=' + this.isInterior + ', variant=' + this.variant + ')';\n };\n function Companion_10() {\n }\n protoOf(Companion_10).l17 = function () {\n return $serializer_getInstance_11();\n };\n var Companion_instance_15;\n function Companion_getInstance_16() {\n return Companion_instance_15;\n }\n function $serializer_7() {\n $serializer_instance_7 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.productdata.ModelRenderInfo', this, 3);\n tmp0_serialDesc.cv('modelRootUrl', false);\n tmp0_serialDesc.cv('model', false);\n tmp0_serialDesc.cv('texture', false);\n this.l40_1 = tmp0_serialDesc;\n }\n protoOf($serializer_7).ok = function () {\n return this.l40_1;\n };\n protoOf($serializer_7).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];\n };\n protoOf($serializer_7).qk = function (decoder) {\n var tmp0_desc = this.l40_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.bo(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.bo(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return ModelRenderInfo_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_7).m40 = function (encoder, value) {\n var tmp0_desc = this.l40_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.gp(tmp0_desc, 0, StringSerializer_getInstance(), value.modelRootUrl);\n tmp1_output.gp(tmp0_desc, 1, StringSerializer_getInstance(), value.model);\n tmp1_output.gp(tmp0_desc, 2, StringSerializer_getInstance(), value.texture);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_7).pk = function (encoder, value) {\n return this.m40(encoder, value instanceof ModelRenderInfo ? value : THROW_CCE());\n };\n var $serializer_instance_7;\n function $serializer_getInstance_11() {\n if ($serializer_instance_7 == null)\n new $serializer_7();\n return $serializer_instance_7;\n }\n function ModelRenderInfo_init_$Init$(seen1, modelRootUrl, model, texture, serializationConstructorMarker, $this) {\n if (!(7 === (7 & seen1))) {\n throwMissingFieldException(seen1, 7, $serializer_getInstance_11().l40_1);\n }\n $this.modelRootUrl = modelRootUrl;\n $this.model = model;\n $this.texture = texture;\n return $this;\n }\n function ModelRenderInfo_init_$Create$(seen1, modelRootUrl, model, texture, serializationConstructorMarker) {\n return ModelRenderInfo_init_$Init$(seen1, modelRootUrl, model, texture, serializationConstructorMarker, objectCreate(protoOf(ModelRenderInfo)));\n }\n function ModelRenderInfo(modelRootUrl, model, texture) {\n this.modelRootUrl = modelRootUrl;\n this.model = model;\n this.texture = texture;\n }\n protoOf(ModelRenderInfo).t2h = function () {\n return this.modelRootUrl;\n };\n protoOf(ModelRenderInfo).u2h = function () {\n return this.model;\n };\n protoOf(ModelRenderInfo).v2h = function () {\n return this.texture;\n };\n protoOf(ModelRenderInfo).af = function () {\n return this.modelRootUrl;\n };\n protoOf(ModelRenderInfo).bf = function () {\n return this.model;\n };\n protoOf(ModelRenderInfo).g1k = function () {\n return this.texture;\n };\n protoOf(ModelRenderInfo).x2h = function (modelRootUrl, model, texture) {\n return new ModelRenderInfo(modelRootUrl, model, texture);\n };\n protoOf(ModelRenderInfo).copy = function (modelRootUrl, model, texture, $super) {\n modelRootUrl = modelRootUrl === VOID ? this.modelRootUrl : modelRootUrl;\n model = model === VOID ? this.model : model;\n texture = texture === VOID ? this.texture : texture;\n return this.x2h(modelRootUrl, model, texture);\n };\n protoOf(ModelRenderInfo).toString = function () {\n return 'ModelRenderInfo(modelRootUrl=' + this.modelRootUrl + ', model=' + this.model + ', texture=' + this.texture + ')';\n };\n protoOf(ModelRenderInfo).hashCode = function () {\n var result = this.modelRootUrl == null ? 0 : getStringHashCode(this.modelRootUrl);\n result = imul(result, 31) + (this.model == null ? 0 : getStringHashCode(this.model)) | 0;\n result = imul(result, 31) + (this.texture == null ? 0 : getStringHashCode(this.texture)) | 0;\n return result;\n };\n protoOf(ModelRenderInfo).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ModelRenderInfo))\n return false;\n var tmp0_other_with_cast = other instanceof ModelRenderInfo ? other : THROW_CCE();\n if (!(this.modelRootUrl == tmp0_other_with_cast.modelRootUrl))\n return false;\n if (!(this.model == tmp0_other_with_cast.model))\n return false;\n if (!(this.texture == tmp0_other_with_cast.texture))\n return false;\n return true;\n };\n function Companion_11() {\n }\n protoOf(Companion_11).l17 = function () {\n return $serializer_getInstance_12();\n };\n var Companion_instance_16;\n function Companion_getInstance_17() {\n return Companion_instance_16;\n }\n function $serializer_8() {\n $serializer_instance_8 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.productdata.Part', this, 4);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('partKey', false);\n tmp0_serialDesc.cv('main', true);\n tmp0_serialDesc.cv('included', true);\n this.n40_1 = tmp0_serialDesc;\n }\n protoOf($serializer_8).ok = function () {\n return this.n40_1;\n };\n protoOf($serializer_8).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), BooleanSerializer_getInstance(), BooleanSerializer_getInstance()];\n };\n protoOf($serializer_8).qk = function (decoder) {\n var tmp0_desc = this.n40_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = false;\n var tmp7_local3 = false;\n var tmp8_input = decoder.nn(tmp0_desc);\n if (tmp8_input.do()) {\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp8_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp8_input.pn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp8_input.pn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp8_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp8_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp8_input.pn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp8_input.pn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp8_input.on(tmp0_desc);\n return Part_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);\n };\n protoOf($serializer_8).o40 = function (encoder, value) {\n var tmp0_desc = this.n40_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.cp(tmp0_desc, 1, value.partKey);\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.main === false)) {\n tmp1_output.uo(tmp0_desc, 2, value.main);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.included === false)) {\n tmp1_output.uo(tmp0_desc, 3, value.included);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_8).pk = function (encoder, value) {\n return this.o40(encoder, value instanceof Part ? value : THROW_CCE());\n };\n var $serializer_instance_8;\n function $serializer_getInstance_12() {\n if ($serializer_instance_8 == null)\n new $serializer_8();\n return $serializer_instance_8;\n }\n function Part_init_$Init$(seen1, id, partKey, main, included, serializationConstructorMarker, $this) {\n if (!(3 === (3 & seen1))) {\n throwMissingFieldException(seen1, 3, $serializer_getInstance_12().n40_1);\n }\n $this.id = id;\n $this.partKey = partKey;\n if (0 === (seen1 & 4))\n $this.main = false;\n else\n $this.main = main;\n if (0 === (seen1 & 8))\n $this.included = false;\n else\n $this.included = included;\n return $this;\n }\n function Part_init_$Create$(seen1, id, partKey, main, included, serializationConstructorMarker) {\n return Part_init_$Init$(seen1, id, partKey, main, included, serializationConstructorMarker, objectCreate(protoOf(Part)));\n }\n function Part(id, partKey, main, included) {\n main = main === VOID ? false : main;\n included = included === VOID ? false : included;\n this.id = id;\n this.partKey = partKey;\n this.main = main;\n this.included = included;\n }\n protoOf(Part).s1k = function () {\n return this.id;\n };\n protoOf(Part).z1j = function () {\n return this.partKey;\n };\n protoOf(Part).t1k = function () {\n return this.main;\n };\n protoOf(Part).p40 = function () {\n return this.included;\n };\n protoOf(Part).af = function () {\n return this.id;\n };\n protoOf(Part).bf = function () {\n return this.partKey;\n };\n protoOf(Part).g1k = function () {\n return this.main;\n };\n protoOf(Part).h1k = function () {\n return this.included;\n };\n protoOf(Part).q40 = function (id, partKey, main, included) {\n return new Part(id, partKey, main, included);\n };\n protoOf(Part).copy = function (id, partKey, main, included, $super) {\n id = id === VOID ? this.id : id;\n partKey = partKey === VOID ? this.partKey : partKey;\n main = main === VOID ? this.main : main;\n included = included === VOID ? this.included : included;\n return this.q40(id, partKey, main, included);\n };\n protoOf(Part).toString = function () {\n return 'Part(id=' + this.id + ', partKey=' + this.partKey + ', main=' + this.main + ', included=' + this.included + ')';\n };\n protoOf(Part).hashCode = function () {\n var result = getStringHashCode(this.id);\n result = imul(result, 31) + getStringHashCode(this.partKey) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.main) | 0;\n result = imul(result, 31) + getBooleanHashCode(this.included) | 0;\n return result;\n };\n protoOf(Part).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Part))\n return false;\n var tmp0_other_with_cast = other instanceof Part ? other : THROW_CCE();\n if (!(this.id === tmp0_other_with_cast.id))\n return false;\n if (!(this.partKey === tmp0_other_with_cast.partKey))\n return false;\n if (!(this.main === tmp0_other_with_cast.main))\n return false;\n if (!(this.included === tmp0_other_with_cast.included))\n return false;\n return true;\n };\n function Companion_12() {\n Companion_instance_17 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.r40_1 = [null, null, null, null, null, null, null, null, null, null, null, new ReferenceArraySerializer(getKClass(Part), $serializer_getInstance_12()), new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];\n }\n protoOf(Companion_12).l17 = function () {\n return $serializer_getInstance_13();\n };\n var Companion_instance_17;\n function Companion_getInstance_18() {\n if (Companion_instance_17 == null)\n new Companion_12();\n return Companion_instance_17;\n }\n function $serializer_9() {\n $serializer_instance_9 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.productdata.ProductComponent', this, 13);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('range', false);\n tmp0_serialDesc.cv('description', true);\n tmp0_serialDesc.cv('dexfId', true);\n tmp0_serialDesc.cv('size', false);\n tmp0_serialDesc.cv('comSize', false);\n tmp0_serialDesc.cv('productGroup', false);\n tmp0_serialDesc.cv('autoAdaptGroup', true);\n tmp0_serialDesc.cv('type', true);\n tmp0_serialDesc.cv('typeCode', true);\n tmp0_serialDesc.cv('partsInPackage', true);\n tmp0_serialDesc.cv('parts', true);\n tmp0_serialDesc.cv('meta', true);\n this.s40_1 = tmp0_serialDesc;\n }\n protoOf($serializer_9).ok = function () {\n return this.s40_1;\n };\n protoOf($serializer_9).rv = function () {\n var tmp0_cached = Companion_getInstance_18().r40_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), $serializer_getInstance_0(), $serializer_getInstance_0(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), get_nullable(IntSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(tmp0_cached[11]), get_nullable(tmp0_cached[12])];\n };\n protoOf($serializer_9).qk = function (decoder) {\n var tmp0_desc = this.s40_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_local5 = null;\n var tmp10_local6 = null;\n var tmp11_local7 = null;\n var tmp12_local8 = null;\n var tmp13_local9 = null;\n var tmp14_local10 = null;\n var tmp15_local11 = null;\n var tmp16_local12 = null;\n var tmp17_input = decoder.nn(tmp0_desc);\n var tmp18_cached = Companion_getInstance_18().r40_1;\n if (tmp17_input.do()) {\n tmp4_local0 = tmp17_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp17_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp17_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp17_input.bo(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp17_input.zn(tmp0_desc, 4, $serializer_getInstance_0(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n tmp9_local5 = tmp17_input.zn(tmp0_desc, 5, $serializer_getInstance_0(), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n tmp10_local6 = tmp17_input.xn(tmp0_desc, 6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n tmp11_local7 = tmp17_input.bo(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n tmp12_local8 = tmp17_input.xn(tmp0_desc, 8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n tmp13_local9 = tmp17_input.bo(tmp0_desc, 9, IntSerializer_getInstance(), tmp13_local9);\n tmp3_bitMask0 = tmp3_bitMask0 | 512;\n tmp14_local10 = tmp17_input.bo(tmp0_desc, 10, IntSerializer_getInstance(), tmp14_local10);\n tmp3_bitMask0 = tmp3_bitMask0 | 1024;\n tmp15_local11 = tmp17_input.bo(tmp0_desc, 11, tmp18_cached[11], tmp15_local11);\n tmp3_bitMask0 = tmp3_bitMask0 | 2048;\n tmp16_local12 = tmp17_input.bo(tmp0_desc, 12, tmp18_cached[12], tmp16_local12);\n tmp3_bitMask0 = tmp3_bitMask0 | 4096;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp17_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp17_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp17_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp17_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp17_input.bo(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp17_input.zn(tmp0_desc, 4, $serializer_getInstance_0(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n case 5:\n tmp9_local5 = tmp17_input.zn(tmp0_desc, 5, $serializer_getInstance_0(), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n break;\n case 6:\n tmp10_local6 = tmp17_input.xn(tmp0_desc, 6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n break;\n case 7:\n tmp11_local7 = tmp17_input.bo(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n break;\n case 8:\n tmp12_local8 = tmp17_input.xn(tmp0_desc, 8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n break;\n case 9:\n tmp13_local9 = tmp17_input.bo(tmp0_desc, 9, IntSerializer_getInstance(), tmp13_local9);\n tmp3_bitMask0 = tmp3_bitMask0 | 512;\n break;\n case 10:\n tmp14_local10 = tmp17_input.bo(tmp0_desc, 10, IntSerializer_getInstance(), tmp14_local10);\n tmp3_bitMask0 = tmp3_bitMask0 | 1024;\n break;\n case 11:\n tmp15_local11 = tmp17_input.bo(tmp0_desc, 11, tmp18_cached[11], tmp15_local11);\n tmp3_bitMask0 = tmp3_bitMask0 | 2048;\n break;\n case 12:\n tmp16_local12 = tmp17_input.bo(tmp0_desc, 12, tmp18_cached[12], tmp16_local12);\n tmp3_bitMask0 = tmp3_bitMask0 | 4096;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp17_input.on(tmp0_desc);\n return ProductComponent_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, tmp16_local12, null);\n };\n protoOf($serializer_9).t40 = function (encoder, value) {\n var tmp0_desc = this.s40_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_18().r40_1;\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.cp(tmp0_desc, 1, value.range);\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.description == null)) {\n tmp1_output.gp(tmp0_desc, 2, StringSerializer_getInstance(), value.description);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.dexfId == null)) {\n tmp1_output.gp(tmp0_desc, 3, StringSerializer_getInstance(), value.dexfId);\n }\n tmp1_output.ep(tmp0_desc, 4, $serializer_getInstance_0(), value.size);\n tmp1_output.ep(tmp0_desc, 5, $serializer_getInstance_0(), value.comSize);\n tmp1_output.cp(tmp0_desc, 6, value.productGroup);\n if (tmp1_output.kp(tmp0_desc, 7) ? true : !(value.autoAdaptGroup == null)) {\n tmp1_output.gp(tmp0_desc, 7, StringSerializer_getInstance(), value.autoAdaptGroup);\n }\n if (tmp1_output.kp(tmp0_desc, 8) ? true : !(value.type === '')) {\n tmp1_output.cp(tmp0_desc, 8, value.type);\n }\n if (tmp1_output.kp(tmp0_desc, 9) ? true : !(value.typeCode == null)) {\n tmp1_output.gp(tmp0_desc, 9, IntSerializer_getInstance(), value.typeCode);\n }\n if (tmp1_output.kp(tmp0_desc, 10) ? true : !(value.partsInPackage === 1)) {\n tmp1_output.gp(tmp0_desc, 10, IntSerializer_getInstance(), value.partsInPackage);\n }\n if (tmp1_output.kp(tmp0_desc, 11) ? true : !(value.parts == null)) {\n tmp1_output.gp(tmp0_desc, 11, tmp2_cached[11], value.parts);\n }\n if (tmp1_output.kp(tmp0_desc, 12) ? true : !(value.meta == null)) {\n tmp1_output.gp(tmp0_desc, 12, tmp2_cached[12], value.meta);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_9).pk = function (encoder, value) {\n return this.t40(encoder, value instanceof ProductComponent ? value : THROW_CCE());\n };\n var $serializer_instance_9;\n function $serializer_getInstance_13() {\n if ($serializer_instance_9 == null)\n new $serializer_9();\n return $serializer_instance_9;\n }\n function ProductComponent_init_$Init$(seen1, id, range, description, dexfId, size, comSize, productGroup, autoAdaptGroup, type, typeCode, partsInPackage, parts, meta, serializationConstructorMarker, $this) {\n if (!(115 === (115 & seen1))) {\n throwMissingFieldException(seen1, 115, $serializer_getInstance_13().s40_1);\n }\n $this.id = id;\n $this.range = range;\n if (0 === (seen1 & 4))\n $this.description = null;\n else\n $this.description = description;\n if (0 === (seen1 & 8))\n $this.dexfId = null;\n else\n $this.dexfId = dexfId;\n $this.size = size;\n $this.comSize = comSize;\n $this.productGroup = productGroup;\n if (0 === (seen1 & 128))\n $this.autoAdaptGroup = null;\n else\n $this.autoAdaptGroup = autoAdaptGroup;\n if (0 === (seen1 & 256))\n $this.type = '';\n else\n $this.type = type;\n if (0 === (seen1 & 512))\n $this.typeCode = null;\n else\n $this.typeCode = typeCode;\n if (0 === (seen1 & 1024))\n $this.partsInPackage = 1;\n else\n $this.partsInPackage = partsInPackage;\n if (0 === (seen1 & 2048))\n $this.parts = null;\n else\n $this.parts = parts;\n if (0 === (seen1 & 4096))\n $this.meta = null;\n else\n $this.meta = meta;\n return $this;\n }\n function ProductComponent_init_$Create$(seen1, id, range, description, dexfId, size, comSize, productGroup, autoAdaptGroup, type, typeCode, partsInPackage, parts, meta, serializationConstructorMarker) {\n return ProductComponent_init_$Init$(seen1, id, range, description, dexfId, size, comSize, productGroup, autoAdaptGroup, type, typeCode, partsInPackage, parts, meta, serializationConstructorMarker, objectCreate(protoOf(ProductComponent)));\n }\n function ProductComponent(id, range, description, dexfId, size, comSize, productGroup, autoAdaptGroup, type, typeCode, partsInPackage, parts, meta) {\n Companion_getInstance_18();\n description = description === VOID ? null : description;\n dexfId = dexfId === VOID ? null : dexfId;\n autoAdaptGroup = autoAdaptGroup === VOID ? null : autoAdaptGroup;\n type = type === VOID ? '' : type;\n typeCode = typeCode === VOID ? null : typeCode;\n partsInPackage = partsInPackage === VOID ? 1 : partsInPackage;\n parts = parts === VOID ? null : parts;\n meta = meta === VOID ? null : meta;\n this.id = id;\n this.range = range;\n this.description = description;\n this.dexfId = dexfId;\n this.size = size;\n this.comSize = comSize;\n this.productGroup = productGroup;\n this.autoAdaptGroup = autoAdaptGroup;\n this.type = type;\n this.typeCode = typeCode;\n this.partsInPackage = partsInPackage;\n this.parts = parts;\n this.meta = meta;\n }\n protoOf(ProductComponent).s1k = function () {\n return this.id;\n };\n protoOf(ProductComponent).x3y = function () {\n return this.range;\n };\n protoOf(ProductComponent).u40 = function () {\n return this.description;\n };\n protoOf(ProductComponent).v40 = function () {\n return this.dexfId;\n };\n protoOf(ProductComponent).n = function () {\n return this.size;\n };\n protoOf(ProductComponent).g2h = function () {\n return this.comSize;\n };\n protoOf(ProductComponent).w40 = function () {\n return this.productGroup;\n };\n protoOf(ProductComponent).y3x = function () {\n return this.autoAdaptGroup;\n };\n protoOf(ProductComponent).a1x = function () {\n return this.type;\n };\n protoOf(ProductComponent).w3x = function () {\n return this.typeCode;\n };\n protoOf(ProductComponent).x3x = function () {\n return this.partsInPackage;\n };\n protoOf(ProductComponent).w1k = function () {\n return this.parts;\n };\n protoOf(ProductComponent).z3x = function () {\n return this.meta;\n };\n protoOf(ProductComponent).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof ProductComponent))\n THROW_CCE();\n if (!(this.id === other.id))\n return false;\n return true;\n };\n protoOf(ProductComponent).hashCode = function () {\n return getStringHashCode(this.id);\n };\n protoOf(ProductComponent).af = function () {\n return this.id;\n };\n protoOf(ProductComponent).bf = function () {\n return this.range;\n };\n protoOf(ProductComponent).g1k = function () {\n return this.description;\n };\n protoOf(ProductComponent).h1k = function () {\n return this.dexfId;\n };\n protoOf(ProductComponent).i1k = function () {\n return this.size;\n };\n protoOf(ProductComponent).j1k = function () {\n return this.comSize;\n };\n protoOf(ProductComponent).k1k = function () {\n return this.productGroup;\n };\n protoOf(ProductComponent).p1z = function () {\n return this.autoAdaptGroup;\n };\n protoOf(ProductComponent).q1z = function () {\n return this.type;\n };\n protoOf(ProductComponent).r1z = function () {\n return this.typeCode;\n };\n protoOf(ProductComponent).s1z = function () {\n return this.partsInPackage;\n };\n protoOf(ProductComponent).t1z = function () {\n return this.parts;\n };\n protoOf(ProductComponent).s21 = function () {\n return this.meta;\n };\n protoOf(ProductComponent).x40 = function (id, range, description, dexfId, size, comSize, productGroup, autoAdaptGroup, type, typeCode, partsInPackage, parts, meta) {\n return new ProductComponent(id, range, description, dexfId, size, comSize, productGroup, autoAdaptGroup, type, typeCode, partsInPackage, parts, meta);\n };\n protoOf(ProductComponent).copy = function (id, range, description, dexfId, size, comSize, productGroup, autoAdaptGroup, type, typeCode, partsInPackage, parts, meta, $super) {\n id = id === VOID ? this.id : id;\n range = range === VOID ? this.range : range;\n description = description === VOID ? this.description : description;\n dexfId = dexfId === VOID ? this.dexfId : dexfId;\n size = size === VOID ? this.size : size;\n comSize = comSize === VOID ? this.comSize : comSize;\n productGroup = productGroup === VOID ? this.productGroup : productGroup;\n autoAdaptGroup = autoAdaptGroup === VOID ? this.autoAdaptGroup : autoAdaptGroup;\n type = type === VOID ? this.type : type;\n typeCode = typeCode === VOID ? this.typeCode : typeCode;\n partsInPackage = partsInPackage === VOID ? this.partsInPackage : partsInPackage;\n parts = parts === VOID ? this.parts : parts;\n meta = meta === VOID ? this.meta : meta;\n return this.x40(id, range, description, dexfId, size, comSize, productGroup, autoAdaptGroup, type, typeCode, partsInPackage, parts, meta);\n };\n protoOf(ProductComponent).toString = function () {\n return 'ProductComponent(id=' + this.id + ', range=' + this.range + ', description=' + this.description + ', dexfId=' + this.dexfId + ', size=' + this.size + ', comSize=' + this.comSize + ', productGroup=' + this.productGroup + ', autoAdaptGroup=' + this.autoAdaptGroup + ', type=' + this.type + ', typeCode=' + this.typeCode + ', partsInPackage=' + this.partsInPackage + ', parts=' + toString(this.parts) + ', meta=' + this.meta + ')';\n };\n function TemplateEditorConnectorData(connectorKey, style, selected, visible, active, showActivationDistance, showTransform, connector) {\n this.y40_1 = connectorKey;\n this.z40_1 = style;\n this.a41_1 = selected;\n this.b41_1 = visible;\n this.c41_1 = active;\n this.d41_1 = showActivationDistance;\n this.e41_1 = showTransform;\n this.connector = connector;\n }\n protoOf(TemplateEditorConnectorData).z21 = function () {\n return this.y40_1;\n };\n protoOf(TemplateEditorConnectorData).l3s = function () {\n return this.z40_1;\n };\n protoOf(TemplateEditorConnectorData).m3s = function () {\n return this.a41_1;\n };\n protoOf(TemplateEditorConnectorData).n3s = function () {\n return this.b41_1;\n };\n protoOf(TemplateEditorConnectorData).o3s = function () {\n return this.c41_1;\n };\n protoOf(TemplateEditorConnectorData).f41 = function (_set____db54di) {\n this.d41_1 = _set____db54di;\n };\n protoOf(TemplateEditorConnectorData).p3s = function () {\n return this.d41_1;\n };\n protoOf(TemplateEditorConnectorData).g41 = function (_set____db54di) {\n this.e41_1 = _set____db54di;\n };\n protoOf(TemplateEditorConnectorData).q3s = function () {\n return this.e41_1;\n };\n protoOf(TemplateEditorConnectorData).h41 = function (_set____db54di) {\n this.connector = _set____db54di;\n };\n protoOf(TemplateEditorConnectorData).n1k = function () {\n return this.connector;\n };\n function ProductTemplateDTO(template, dirty) {\n dirty = dirty === VOID ? false : dirty;\n this.template = template;\n this.dirty = dirty;\n }\n protoOf(ProductTemplateDTO).v3x = function () {\n return this.template;\n };\n protoOf(ProductTemplateDTO).i41 = function (_set____db54di) {\n this.dirty = _set____db54di;\n };\n protoOf(ProductTemplateDTO).j41 = function () {\n return this.dirty;\n };\n protoOf(ProductTemplateDTO).af = function () {\n return this.template;\n };\n protoOf(ProductTemplateDTO).bf = function () {\n return this.dirty;\n };\n protoOf(ProductTemplateDTO).k41 = function (template, dirty) {\n return new ProductTemplateDTO(template, dirty);\n };\n protoOf(ProductTemplateDTO).copy = function (template, dirty, $super) {\n template = template === VOID ? this.template : template;\n dirty = dirty === VOID ? this.dirty : dirty;\n return this.k41(template, dirty);\n };\n protoOf(ProductTemplateDTO).toString = function () {\n return 'ProductTemplateDTO(template=' + this.template + ', dirty=' + this.dirty + ')';\n };\n protoOf(ProductTemplateDTO).hashCode = function () {\n var result = this.template.hashCode();\n result = imul(result, 31) + getBooleanHashCode(this.dirty) | 0;\n return result;\n };\n protoOf(ProductTemplateDTO).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ProductTemplateDTO))\n return false;\n var tmp0_other_with_cast = other instanceof ProductTemplateDTO ? other : THROW_CCE();\n if (!this.template.equals(tmp0_other_with_cast.template))\n return false;\n if (!(this.dirty === tmp0_other_with_cast.dirty))\n return false;\n return true;\n };\n function generateConnectorsData($this, template) {\n var tmp0_safe_receiver = template.components.connectors;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(tmp0_safe_receiver.length);\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var item = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.service.Companion.generateConnectorsData.' call\n var tmp$ret$0 = new TemplateEditorConnectorData(item.name, 'default', false, true, true, false, true, item);\n destination.q(tmp$ret$0);\n }\n tmp = destination;\n }\n var tmp1_safe_receiver = tmp;\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_0 = copyToArray(tmp1_safe_receiver);\n }\n var tmp2_elvis_lhs = tmp_0;\n var tmp_1;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.run' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.Companion.generateConnectorsData.' call\n var tmp_2 = Companion_getInstance_19().l41_1;\n tmp_2.warn(TemplateEditorService$Companion$generateConnectorsData$lambda(template));\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp2_elvis_lhs;\n }\n return tmp_1;\n }\n function TemplateEditorService$Companion$generateConnectorsData$lambda($template) {\n return function () {\n return \"Visualization error: No connectors in template '\" + $template + \".templateId'\";\n };\n }\n function _get_sceneManager__lxhb6y($this) {\n return $this.coreServices.sceneManager;\n }\n function runOnFilteredSceneEntities($this, templateIds, runner) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp = get_hierarchySequence(_get_sceneManager__lxhb6y($this).root);\n var tmp0_iterator = mapNotNull(tmp, TemplateEditorService$runOnFilteredSceneEntities$lambda($this, templateIds)).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.runOnFilteredSceneEntities.' call\n runner(element.template, element.templateData, element.entity);\n }\n }\n function Companion_13() {\n Companion_instance_18 = this;\n this.l41_1 = LoggerState_getInstance().m1m('TemplateEditorService');\n }\n var Companion_instance_18;\n function Companion_getInstance_19() {\n if (Companion_instance_18 == null)\n new Companion_13();\n return Companion_instance_18;\n }\n function _get_templateDataSafe__803856(_this__u8e3s4, $this) {\n var tmp;\n if (!_this__u8e3s4.isDisposed) {\n tmp = _this__u8e3s4.__getComponentForKotlin(49);\n } else {\n tmp = null;\n }\n return tmp;\n }\n function sam$kotlin_Comparator$0(function_0) {\n this.r41_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0).u1j = function (a, b) {\n return this.r41_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function sam$kotlin_Comparator$0_0(function_0) {\n this.s41_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_0).u1j = function (a, b) {\n return this.s41_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function sam$kotlin_Comparator$0_1(function_0) {\n this.t41_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_1).u1j = function (a, b) {\n return this.t41_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function TemplateEditorService$visualizeConnectors$lambda($it) {\n return function (entity) {\n entity.addComponent(new EntityConnectorVisualizationComponent($it));\n return Unit_instance;\n };\n }\n function TemplateEditorService$visualizeConnectors$lambda_0($templateId) {\n return function () {\n return \"Visualization error: Template '\" + $templateId + \"' not found in catalog\";\n };\n }\n function TemplateEditorService$visualizeConnectors$lambda_1(entity) {\n entity.removeComponent(77);\n return Unit_instance;\n }\n function TemplateEditorService$selectConnector$lambda($it) {\n return function (entity) {\n entity.addComponent(new EntityConnectorVisualizationComponent($it));\n return Unit_instance;\n };\n }\n function TemplateEditorService$selectConnector$lambda_0($templateId) {\n return function () {\n return \"Visualization error: Template '\" + $templateId + \"' not found in catalog\";\n };\n }\n function TemplateEditorService$openTemplate$lambda($templateId) {\n return function () {\n return \"Open error: Template '\" + $templateId + \"' not found in catalog\";\n };\n }\n function TemplateEditorService$updateConnectors$lambda$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateConnectors...' call\n var tmp = a.name;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateConnectors...' call\n var tmp$ret$1 = b.name;\n return compareValues(tmp, tmp$ret$1);\n }\n function TemplateEditorService$updateConnectors$lambda(this$0, $group) {\n return function (template) {\n this$0.openTemplate(template.templateId, true);\n var tmp0_safe_receiver = template.components.connectors;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$_0();\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateConnectors...' call\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var this_0 = $group.u2();\n var tmp_0;\n if (isInterface(this_0, Collection)) {\n tmp_0 = this_0.b1();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateConnectors....' call\n if (element.name === element_0.name) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n }\n tmp$ret$0 = false;\n }\n if (!tmp$ret$0) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var tmp1_safe_receiver = tmp;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : plus(tmp1_safe_receiver, $group.u2());\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toMutableList_0(tmp2_safe_receiver);\n var connectors = tmp3_elvis_lhs == null ? toMutableList_0($group.u2()) : tmp3_elvis_lhs;\n var tmp_1;\n if (connectors.n() > 1) {\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_2 = TemplateEditorService$updateConnectors$lambda$lambda;\n var tmp$ret$5 = new sam$kotlin_Comparator$0(tmp_2);\n sortWith(connectors, tmp$ret$5);\n tmp_1 = Unit_instance;\n }\n var tmp_3 = template.components;\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_3.connectors = copyToArray(connectors);\n return Unit_instance;\n };\n }\n function TemplateEditorService$addConnector$lambda$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.addConnector...' call\n var tmp = a.name;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.addConnector...' call\n var tmp$ret$1 = b.name;\n return compareValues(tmp, tmp$ret$1);\n }\n function TemplateEditorService$addConnector$lambda(this$0, $connectorItemTemplate, $data, $updateScene) {\n return function (template) {\n this$0.openTemplate(template.templateId, true);\n var tmp0_safe_receiver = template.components.connectors;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var c = toMutableList(tmp0_safe_receiver);\n c.q($connectorItemTemplate);\n // Inline function 'kotlin.collections.sortBy' call\n if (c.n() > 1) {\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp = TemplateEditorService$addConnector$lambda$lambda;\n var tmp$ret$0 = new sam$kotlin_Comparator$0_0(tmp);\n sortWith(c, tmp$ret$0);\n }\n var tmp_0 = template.components;\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_0.connectors = copyToArray(c);\n var tmp_1;\n if (!($data == null)) {\n var tmp0_safe_receiver_0 = this$0.o41_1.b3(template.templateId);\n var tmp_2;\n if (tmp0_safe_receiver_0 == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.addConnector...' call\n var d = toMutableList(tmp0_safe_receiver_0);\n $data.connector = $connectorItemTemplate;\n tmp_2 = d.q($data);\n }\n if (tmp_2 == null) {\n // Inline function 'kotlin.run' call\n // Inline function 'kotlin.contracts.contract' call\n var $this$run = this$0;\n $data.connector = $connectorItemTemplate;\n var this_0 = $this$run.o41_1;\n var key = template.templateId;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var value = [$data];\n this_0.r2(key, value);\n }\n var tmp_3;\n if ($updateScene) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$10 = [template.templateId];\n this$0.updateSceneWithConnectors(tmp$ret$10);\n tmp_3 = Unit_instance;\n }\n tmp_1 = tmp_3;\n }\n }\n return Unit_instance;\n };\n }\n function TemplateEditorService$updateConnector$lambda$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateConnector..' call\n var tmp = a.name;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateConnector..' call\n var tmp$ret$1 = b.name;\n return compareValues(tmp, tmp$ret$1);\n }\n function TemplateEditorService$updateConnector$lambda(this$0, $connectorItemTemplate, $updateScene) {\n return function (template) {\n this$0.openTemplate(template.templateId, true);\n var tmp0_safe_receiver = template.components.connectors;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(tmp0_safe_receiver.length);\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var item = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateConnector..' call\n var tmp_0;\n if (item.name === $connectorItemTemplate.name) {\n tmp_0 = $connectorItemTemplate;\n } else {\n tmp_0 = item;\n }\n var tmp$ret$0 = tmp_0;\n destination.q(tmp$ret$0);\n }\n tmp = destination;\n }\n var tmp1_safe_receiver = tmp;\n var tmp_1;\n if (tmp1_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_1 = copyToArray(tmp1_safe_receiver);\n }\n var tmp2_elvis_lhs = tmp_1;\n var tmp_2;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_2 = [];\n } else {\n tmp_2 = tmp2_elvis_lhs;\n }\n var connectors = tmp_2;\n var tmp_3;\n if (connectors.length > 1) {\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_4 = TemplateEditorService$updateConnector$lambda$lambda;\n var tmp$ret$5 = new sam$kotlin_Comparator$0_1(tmp_4);\n sortWith_0(connectors, tmp$ret$5);\n tmp_3 = Unit_instance;\n }\n var tmp3_safe_receiver = this$0.o41_1.b3(template.templateId);\n var tmp_5;\n if (tmp3_safe_receiver == null) {\n tmp_5 = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$7;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_0 = 0;\n var last_0 = tmp3_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element = tmp3_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateConnector..' call\n if (element.y40_1 === $connectorItemTemplate.name) {\n tmp$ret$7 = element;\n break $l$block;\n }\n }\n tmp$ret$7 = null;\n }\n tmp_5 = tmp$ret$7;\n }\n var tmp4_safe_receiver = tmp_5;\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n tmp4_safe_receiver.connector = $connectorItemTemplate;\n }\n template.components.connectors = connectors;\n var tmp_6;\n if ($updateScene) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$12 = [template.templateId];\n this$0.updateSceneWithConnectors(tmp$ret$12);\n tmp_6 = Unit_instance;\n }\n return Unit_instance;\n };\n }\n function TemplateEditorService$renameConnector$lambda(this$0, $connectorName, $newConnector, $newConnectorName) {\n return function (template) {\n this$0.openTemplate(template.templateId, true);\n var tmp = template.components;\n var tmp0_safe_receiver = template.components.connectors;\n var tmp_0;\n if (tmp0_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(tmp0_safe_receiver.length);\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var item = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.renameConnector..' call\n var tmp_1;\n if (item.name === $connectorName) {\n $newConnector._v = new ConnectorItemTemplate(item.lastPosition, $newConnectorName, item.position, item.vertices, item.priority, item.spacing, item.activationDistance, item.tags, item.demands, item.offers, item.type, item.axis, item.angle, item.required, item.requireUpwardParent, item.requireDownwardParent, item.sourceTemplateId);\n var tmp0_elvis_lhs = $newConnector._v;\n tmp_1 = tmp0_elvis_lhs == null ? item : tmp0_elvis_lhs;\n } else {\n tmp_1 = item;\n }\n var tmp$ret$0 = tmp_1;\n destination.q(tmp$ret$0);\n }\n tmp_0 = destination;\n }\n var tmp1_safe_receiver = tmp_0;\n var tmp_2;\n if (tmp1_safe_receiver == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_2 = copyToArray(tmp1_safe_receiver);\n }\n tmp.connectors = tmp_2;\n return Unit_instance;\n };\n }\n function TemplateEditorService$deleteConnector$lambda(this$0, $connectorItemTemplate) {\n return function (template) {\n this$0.openTemplate(template.templateId, true);\n var tmp0_safe_receiver = template.components.connectors;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$_0();\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.deleteConnector..' call\n if (!(element.name === $connectorItemTemplate.name)) {\n destination.q(element);\n }\n }\n tmp = destination;\n }\n var tmp1_safe_receiver = tmp;\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_0 = copyToArray(tmp1_safe_receiver);\n }\n var connectors = tmp_0;\n var tmp_1 = template.components;\n var tmp_2;\n var tmp_3;\n if (!(connectors == null)) {\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n tmp_3 = !(connectors.length === 0);\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n tmp_2 = connectors;\n } else {\n tmp_2 = null;\n }\n tmp_1.connectors = tmp_2;\n return Unit_instance;\n };\n }\n function TemplateEditorService$updateSceneWithBounds$lambda($entities) {\n return function (template, templateData, entity) {\n var tmp0_safe_receiver = template.components.bounds;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_safe_receiver_0 = getPolyhedronForSize(tmp0_safe_receiver, SizeFromVector(templateData.size));\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n entity.addComponent(new ColliderShapeComponent(tmp0_safe_receiver_0.ye_1, tmp0_safe_receiver_0.ze_1));\n $entities.q(entity);\n }\n }\n return Unit_instance;\n };\n }\n function TemplateEditorService$updateSceneWithConnectors$lambda($entities) {\n return function (template, templateData, entity) {\n var tmp0_safe_receiver = template.components.connectors;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp = SizeFromVector(templateData.size);\n var tmp_0 = SizeFromVector(templateData.comSize);\n var tmp0_elvis_lhs = templateData.family;\n var connectors = getConnectorsForSize(tmp0_safe_receiver, tmp, tmp_0, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, template.templateId);\n entity.addComponent(new ConnectorsComponent(connectors));\n $entities.q(entity);\n }\n return Unit_instance;\n };\n }\n function TemplateEditorService$runOnFilteredSceneEntities$1$1$1$1($it, $templateData, $entity) {\n this.template = $it;\n this.templateData = $templateData;\n this.entity = $entity;\n }\n function TemplateEditorService$runOnFilteredSceneEntities$lambda(this$0, $templateIds) {\n return function (entity) {\n var tmp0_safe_receiver = _get_templateDataSafe__803856(entity, this$0);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.runOnFilteredSceneEntities..' call\n var tmp_0;\n if (contains($templateIds, tmp0_safe_receiver.templateId)) {\n var tmp0_safe_receiver_0 = this$0.dynamicCatalog.findTemplateDTO(tmp0_safe_receiver.templateId);\n var tmp_1;\n if (tmp0_safe_receiver_0 == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.runOnFilteredSceneEntities...' call\n tmp_1 = new TemplateEditorService$runOnFilteredSceneEntities$1$1$1$1(tmp0_safe_receiver_0, tmp0_safe_receiver, entity);\n }\n tmp_0 = tmp_1;\n } else {\n tmp_0 = null;\n }\n tmp = tmp_0;\n }\n return tmp;\n };\n }\n function TemplateEditorService$runOnTemplate$lambda(this$0) {\n return function (templateId, runner) {\n var tmp0_safe_receiver = this$0.dynamicCatalog.findTemplateDTO(templateId);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.runOnTemplate..' call\n runner(tmp0_safe_receiver);\n tmp = tmp0_safe_receiver;\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n var message = 'Template ' + templateId + ' does not exist in catalog';\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n return tmp_0;\n };\n }\n function TemplateEditorService$runOnEntitiesBasedOn$lambda$lambda(this$0, $templateId) {\n return function (it) {\n var tmp0_safe_receiver = _get_templateDataSafe__803856(it, this$0);\n return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.templateId) === $templateId;\n };\n }\n function TemplateEditorService$runOnEntitiesBasedOn$lambda(this$0) {\n return function (templateId, runner) {\n var tmp = get_hierarchySequence(_get_sceneManager__lxhb6y(this$0).root);\n var tmp0_iterator = filter(tmp, TemplateEditorService$runOnEntitiesBasedOn$lambda$lambda(this$0, templateId)).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.runOnEntitiesBasedOn..' call\n runner(element);\n }\n return Unit_instance;\n };\n }\n function TemplateEditorService$initializeFromCatalog$lambda(this$0, $templateComponent) {\n return function (it) {\n var tmp0_safe_receiver = _get_templateDataSafe__803856(it, this$0);\n return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.templateId) === $templateComponent.templateId;\n };\n }\n function TemplateEditorService(coreServices, dynamicCatalog) {\n Companion_getInstance_19();\n this.coreServices = coreServices;\n this.dynamicCatalog = dynamicCatalog;\n this.m41_1 = this.coreServices.entityManager;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp.n41_1 = LinkedHashMap_init_$Create$();\n var tmp_0 = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp_0.o41_1 = LinkedHashMap_init_$Create$();\n var tmp_1 = this;\n tmp_1.p41_1 = TemplateEditorService$runOnTemplate$lambda(this);\n var tmp_2 = this;\n tmp_2.q41_1 = TemplateEditorService$runOnEntitiesBasedOn$lambda(this);\n }\n protoOf(TemplateEditorService).k2z = function () {\n return this.coreServices;\n };\n protoOf(TemplateEditorService).u41 = function (_set____db54di) {\n this.dynamicCatalog = _set____db54di;\n };\n protoOf(TemplateEditorService).v41 = function () {\n return this.dynamicCatalog;\n };\n protoOf(TemplateEditorService).templateDTOs = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.n41_1;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(this_0.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this_0.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.templateDTOs.' call\n var tmp$ret$1 = item.u2();\n destination.q(tmp$ret$1);\n }\n return copyToArray(destination);\n };\n protoOf(TemplateEditorService).setCatalog = function (catalog) {\n this.dynamicCatalog = catalog;\n };\n protoOf(TemplateEditorService).hasConnectorsData = function (entity) {\n // Inline function 'kotlin.let' call\n var tmp0_safe_receiver = _get_templateDataSafe__803856(entity, this);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.hasConnectorsData.' call\n var it = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.templateId;\n // Inline function 'kotlin.collections.contains' call\n // Inline function 'kotlin.collections.containsKey' call\n var this_0 = this.o41_1;\n return (isInterface(this_0, Map) ? this_0 : THROW_CCE()).y2(it);\n };\n protoOf(TemplateEditorService).getConnectorsData = function (entity) {\n var tmp0_safe_receiver = _get_templateDataSafe__803856(entity, this);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.getConnectorsData.' call\n var tmp0_elvis_lhs = this.o41_1.b3(tmp0_safe_receiver.templateId);\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.run' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.getConnectorsData..' call\n var tmp0_safe_receiver_0 = this.dynamicCatalog.findTemplateDTO(tmp0_safe_receiver.templateId);\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var this_0 = this.o41_1;\n var key = tmp0_safe_receiver.templateId;\n var value = generateConnectorsData(Companion_getInstance_19(), tmp0_safe_receiver_0);\n this_0.r2(key, value);\n }\n tmp_0 = this.o41_1.b3(tmp0_safe_receiver.templateId);\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n tmp = tmp_0;\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_1;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp1_elvis_lhs;\n }\n return tmp_1;\n };\n protoOf(TemplateEditorService).getConnectors = function (entity) {\n var tmp0_safe_receiver = _get_templateDataSafe__803856(entity, this);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.getConnectors.' call\n var tmp0_safe_receiver_0 = this.dynamicCatalog.findTemplateDTO(tmp0_safe_receiver.templateId);\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.components;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.connectors;\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n tmp = tmp_0;\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_1;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp1_elvis_lhs;\n }\n return tmp_1;\n };\n protoOf(TemplateEditorService).getBounds = function (entity) {\n var tmp0_safe_receiver = _get_templateDataSafe__803856(entity, this);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.getBounds.' call\n var tmp0_safe_receiver_0 = this.dynamicCatalog.findTemplateDTO(tmp0_safe_receiver.templateId);\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.components;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.bounds;\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n tmp = tmp_0;\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_1;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp1_elvis_lhs;\n }\n return tmp_1;\n };\n protoOf(TemplateEditorService).w41 = function (entity, show, data) {\n var tmp0_safe_receiver = _get_templateDataSafe__803856(entity, this);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n this.visualizeConnectors(tmp0_safe_receiver.templateId, show, data);\n var tmp0_elvis_lhs = this.o41_1.b3(tmp0_safe_receiver.templateId);\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n return tmp_0;\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_1;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp1_elvis_lhs;\n }\n return tmp_1;\n };\n protoOf(TemplateEditorService).visualizeConnectorsOf = function (entity, show, data, $super) {\n data = data === VOID ? null : data;\n return this.w41(entity, show, data);\n };\n protoOf(TemplateEditorService).x41 = function (templateId, show, data) {\n if (!(data == null)) {\n // Inline function 'kotlin.collections.set' call\n var this_0 = this.o41_1;\n var tmp0_safe_receiver = this.o41_1.b3(templateId);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.visualizeConnectors.' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(tmp0_safe_receiver.length);\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var item = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.visualizeConnectors..' call\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_0 = 0;\n var last_0 = data.length;\n while (inductionVariable_0 < last_0) {\n var element = data[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.visualizeConnectors...' call\n if (element.y40_1 === item.y40_1) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$1;\n var tmp$ret$3 = tmp0_elvis_lhs == null ? item : tmp0_elvis_lhs;\n destination.q(tmp$ret$3);\n }\n tmp = copyToArray(destination);\n }\n var tmp1_elvis_lhs = tmp;\n var value = tmp1_elvis_lhs == null ? data : tmp1_elvis_lhs;\n this_0.r2(templateId, value);\n } else {\n // Inline function 'kotlin.collections.contains' call\n // Inline function 'kotlin.collections.containsKey' call\n var this_1 = this.o41_1;\n if (!(isInterface(this_1, Map) ? this_1 : THROW_CCE()).y2(templateId)) {\n var tmp2_safe_receiver = this.dynamicCatalog.findTemplateDTO(templateId);\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var this_2 = this.o41_1;\n var value_0 = generateConnectorsData(Companion_getInstance_19(), tmp2_safe_receiver);\n this_2.r2(templateId, value_0);\n }\n }\n }\n if (show) {\n var tmp3_safe_receiver = this.o41_1.b3(templateId);\n var tmp_0;\n if (tmp3_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n this.q41_1(templateId, TemplateEditorService$visualizeConnectors$lambda(tmp3_safe_receiver));\n tmp_0 = Unit_instance;\n }\n if (tmp_0 == null) {\n var tmp_1 = Companion_getInstance_19().l41_1;\n tmp_1.warn(TemplateEditorService$visualizeConnectors$lambda_0(templateId));\n }\n } else {\n this.q41_1(templateId, TemplateEditorService$visualizeConnectors$lambda_1);\n }\n var tmp5_elvis_lhs = this.o41_1.b3(templateId);\n var tmp_2;\n if (tmp5_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_2 = [];\n } else {\n tmp_2 = tmp5_elvis_lhs;\n }\n return tmp_2;\n };\n protoOf(TemplateEditorService).visualizeConnectors = function (templateId, show, data, $super) {\n data = data === VOID ? null : data;\n return this.x41(templateId, show, data);\n };\n protoOf(TemplateEditorService).y41 = function (entity, key) {\n var tmp0_safe_receiver = _get_templateDataSafe__803856(entity, this);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return this.selectConnector(tmp0_safe_receiver.templateId, key, entity.hasComponent(77));\n }\n var tmp1_elvis_lhs = tmp;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n return tmp_0;\n };\n protoOf(TemplateEditorService).selectConnectorOf = function (entity, key, $super) {\n key = key === VOID ? null : key;\n return this.y41(entity, key);\n };\n protoOf(TemplateEditorService).z41 = function (templateId, key, show) {\n var tmp0_safe_receiver = this.o41_1.b3(templateId);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var this_0 = this.o41_1;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(tmp0_safe_receiver.length);\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var item = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.selectConnector..' call\n var tmp$ret$0 = new TemplateEditorConnectorData(item.y40_1, item.z40_1, item.y40_1 === key, item.b41_1, item.c41_1, item.d41_1, true, item.connector);\n destination.q(tmp$ret$0);\n }\n var value = copyToArray(destination);\n this_0.r2(templateId, value);\n }\n if (show) {\n var tmp1_safe_receiver = this.o41_1.b3(templateId);\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n this.q41_1(templateId, TemplateEditorService$selectConnector$lambda(tmp1_safe_receiver));\n tmp = Unit_instance;\n }\n if (tmp == null) {\n var tmp_0 = Companion_getInstance_19().l41_1;\n tmp_0.warn(TemplateEditorService$selectConnector$lambda_0(templateId));\n }\n }\n var tmp3_elvis_lhs = this.o41_1.b3(templateId);\n var tmp_1;\n if (tmp3_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp3_elvis_lhs;\n }\n return tmp_1;\n };\n protoOf(TemplateEditorService).selectConnector = function (templateId, key, show, $super) {\n key = key === VOID ? null : key;\n return this.z41(templateId, key, show);\n };\n protoOf(TemplateEditorService).a42 = function (templateId, isDirty) {\n if (!this.n41_1.y2(templateId)) {\n var tmp0_safe_receiver = this.dynamicCatalog.findTemplateDTO(templateId);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var clone = Companion_getInstance_7().jsonParser.j15(Companion_getInstance_12().l17(), Companion_getInstance_30().productTemplateToJson(tmp0_safe_receiver));\n var this_0 = this.n41_1;\n var value = new ProductTemplateDTO(clone, isDirty);\n this_0.r2(templateId, value);\n tmp = Unit_instance;\n }\n if (tmp == null) {\n var tmp_0 = Companion_getInstance_19().l41_1;\n tmp_0.warn(TemplateEditorService$openTemplate$lambda(templateId));\n }\n } else {\n var tmp2_safe_receiver = this.n41_1.b3(templateId);\n if (tmp2_safe_receiver != null)\n tmp2_safe_receiver.dirty = isDirty;\n }\n };\n protoOf(TemplateEditorService).openTemplate = function (templateId, isDirty, $super) {\n isDirty = isDirty === VOID ? false : isDirty;\n return this.a42(templateId, isDirty);\n };\n protoOf(TemplateEditorService).b42 = function (entity, boundsTemplate, updateScene) {\n var tmp0_safe_receiver = _get_templateDataSafe__803856(entity, this);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateBounds.' call\n var tmp0_safe_receiver_0 = this.dynamicCatalog.findTemplateDTO(tmp0_safe_receiver.templateId);\n var tmp_0;\n if (tmp0_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateBounds..' call\n this.openTemplate(tmp0_safe_receiver_0.templateId, true);\n tmp0_safe_receiver_0.components.bounds = boundsTemplate;\n tmp_0 = tmp0_safe_receiver_0;\n }\n tmp = tmp_0;\n }\n var tmp2_elvis_lhs = tmp;\n var tmp_1;\n if (tmp2_elvis_lhs == null) {\n var tmp1_safe_receiver = _get_templateDataSafe__803856(entity, this);\n var message = 'Template ' + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.templateId) + ' does not exist in catalog';\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n tmp_1 = tmp2_elvis_lhs;\n }\n var template = tmp_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var templateIds = [template.templateId];\n if (updateScene) {\n this.updateSceneWithBounds(templateIds);\n }\n return templateIds;\n };\n protoOf(TemplateEditorService).updateBounds = function (entity, boundsTemplate, updateScene, $super) {\n updateScene = updateScene === VOID ? true : updateScene;\n return this.b42(entity, boundsTemplate, updateScene);\n };\n protoOf(TemplateEditorService).c42 = function (connectorsTemplate, updateScene) {\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.groupBy' call\n // Inline function 'kotlin.collections.groupByTo' call\n var this_0 = toList(connectorsTemplate);\n var destination = LinkedHashMap_init_$Create$();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateConnectors.' call\n var key = element.sourceTemplateId;\n // Inline function 'kotlin.collections.getOrPut' call\n var value = destination.b3(key);\n var tmp;\n if (value == null) {\n // Inline function 'kotlin.collections.groupByTo.' call\n var answer = ArrayList_init_$Create$_0();\n destination.r2(key, answer);\n tmp = answer;\n } else {\n tmp = value;\n }\n var list = tmp;\n list.q(element);\n }\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_0 = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator_0 = destination.q2().t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateConnectors.' call\n var tmp_0 = element_0.t2();\n var template = this.p41_1(tmp_0, TemplateEditorService$updateConnectors$lambda(this, element_0));\n if (template == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_0.q(template);\n }\n }\n var templates = destination_0;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(templates, 10));\n var tmp0_iterator_1 = templates.t();\n while (tmp0_iterator_1.u()) {\n var item = tmp0_iterator_1.w();\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.updateConnectors.' call\n var tmp$ret$10 = item.templateId;\n destination_1.q(tmp$ret$10);\n }\n var templateIds = copyToArray(destination_1);\n if (updateScene) {\n this.updateSceneWithConnectors(templateIds);\n }\n return templateIds;\n };\n protoOf(TemplateEditorService).updateConnectors = function (connectorsTemplate, updateScene, $super) {\n updateScene = updateScene === VOID ? true : updateScene;\n return this.c42(connectorsTemplate, updateScene);\n };\n protoOf(TemplateEditorService).d42 = function (connectorItemTemplate, updateScene, data) {\n var tmp = connectorItemTemplate.sourceTemplateId;\n this.p41_1(tmp, TemplateEditorService$addConnector$lambda(this, connectorItemTemplate, data, updateScene));\n var tmp0_elvis_lhs = this.o41_1.b3(connectorItemTemplate.sourceTemplateId);\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n return tmp_0;\n };\n protoOf(TemplateEditorService).addConnector = function (connectorItemTemplate, updateScene, data, $super) {\n updateScene = updateScene === VOID ? true : updateScene;\n data = data === VOID ? null : data;\n return this.d42(connectorItemTemplate, updateScene, data);\n };\n protoOf(TemplateEditorService).e42 = function (connectorItemTemplate, updateScene) {\n var tmp = connectorItemTemplate.sourceTemplateId;\n this.p41_1(tmp, TemplateEditorService$updateConnector$lambda(this, connectorItemTemplate, updateScene));\n var tmp0_elvis_lhs = this.o41_1.b3(connectorItemTemplate.sourceTemplateId);\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n return tmp_0;\n };\n protoOf(TemplateEditorService).updateConnector = function (connectorItemTemplate, updateScene, $super) {\n updateScene = updateScene === VOID ? true : updateScene;\n return this.e42(connectorItemTemplate, updateScene);\n };\n protoOf(TemplateEditorService).renameConnector = function (templateId, connectorName, newConnectorName) {\n var newConnector = {_v: null};\n var template = this.p41_1(templateId, TemplateEditorService$renameConnector$lambda(this, connectorName, newConnector, newConnectorName));\n var tmp0_safe_receiver = newConnector._v;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.renameConnector.' call\n var tmp0_safe_receiver_0 = this.o41_1.b3(template.templateId);\n var tmp;\n if (tmp0_safe_receiver_0 == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver_0.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.renameConnector..' call\n if (element.y40_1 === connectorName) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp = tmp$ret$1;\n }\n var tmp1_safe_receiver = tmp;\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n tmp1_safe_receiver.connector = tmp0_safe_receiver;\n tmp_0 = Unit_instance;\n }\n }\n var tmp1_elvis_lhs = this.o41_1.b3(templateId);\n var tmp_1;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp1_elvis_lhs;\n }\n return tmp_1;\n };\n protoOf(TemplateEditorService).f42 = function (connectorItemTemplate, updateScene) {\n var tmp = connectorItemTemplate.sourceTemplateId;\n var template = this.p41_1(tmp, TemplateEditorService$deleteConnector$lambda(this, connectorItemTemplate));\n var tmp_0;\n if (updateScene) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [template.templateId];\n tmp_0 = this.updateSceneWithConnectors(tmp$ret$2);\n } else {\n tmp_0 = null;\n }\n return tmp_0;\n };\n protoOf(TemplateEditorService).deleteConnector = function (connectorItemTemplate, updateScene, $super) {\n updateScene = updateScene === VOID ? true : updateScene;\n return this.f42(connectorItemTemplate, updateScene);\n };\n protoOf(TemplateEditorService).updateSceneWithBounds = function (templateIds) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var entities = ArrayList_init_$Create$_0();\n runOnFilteredSceneEntities(this, templateIds, TemplateEditorService$updateSceneWithBounds$lambda(entities));\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(entities);\n };\n protoOf(TemplateEditorService).updateSceneWithConnectors = function (templateIds) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var entities = ArrayList_init_$Create$_0();\n runOnFilteredSceneEntities(this, templateIds, TemplateEditorService$updateSceneWithConnectors$lambda(entities));\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(entities);\n };\n protoOf(TemplateEditorService).initializeFromCatalog = function (entity, initializer) {\n var tmp0_safe_receiver = entity.__getComponentForKotlin(49);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.initializeFromCatalog.' call\n var tmp0_safe_receiver_0 = this.dynamicCatalog.findTemplateDTO(tmp0_safe_receiver.templateId);\n var tmp;\n if (tmp0_safe_receiver_0 == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0 = get_hierarchySequence(_get_sceneManager__lxhb6y(this).root);\n var tmp0_iterator = filter(tmp_0, TemplateEditorService$initializeFromCatalog$lambda(this, tmp0_safe_receiver)).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.service.TemplateEditorService.initializeFromCatalog...' call\n initializer(element, tmp0_safe_receiver_0);\n }\n tmp = Unit_instance;\n }\n }\n };\n function assemblyComponents($this) {\n var tmp0_safe_receiver = $this.h42_1.parts;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toMutableList(tmp0_safe_receiver);\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicAssembly.assemblyComponents.' call\n var tmp0_safe_receiver_0 = $this.i42_1.components.assembly;\n var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.children;\n var tmp_0;\n if (tmp1_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicAssembly.assemblyComponents..' call\n tmp_0 = Companion_getInstance_23().mapGeneratorPartsToTemplateChildren($this.j42_1, tmp1_safe_receiver, tmp1_safe_receiver_0, $this.h42_1.size);\n }\n tmp = tmp_0;\n }\n var tmp2_elvis_lhs = tmp;\n var tmp_1;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$4 = [];\n tmp_1 = new Pair(tmp$ret$4, emptyMap());\n } else {\n tmp_1 = tmp2_elvis_lhs;\n }\n var tmp3_container = tmp_1;\n var assemblyParts = tmp3_container.af();\n var partsMap = tmp3_container.bf();\n return listOf([new AssemblyStructureComponent(assemblyParts), new AssemblyPartsComponent(partsMap)]);\n }\n function DynamicAssembly(product, templateData, template, catalog) {\n DynamicComponentBuilder.call(this);\n this.g42_1 = product;\n this.h42_1 = templateData;\n this.i42_1 = template;\n this.j42_1 = catalog;\n var tmp = this;\n var tmp0_elvis_lhs = this.h42_1.family;\n tmp.k42_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;\n var tmp_0 = this;\n var tmp0_elvis_lhs_0 = this.i42_1.name;\n tmp_0.l42_1 = tmp0_elvis_lhs_0 == null ? this.i42_1.templateId : tmp0_elvis_lhs_0;\n this.m42_1 = null;\n }\n protoOf(DynamicAssembly).n42 = function () {\n return this.g42_1;\n };\n protoOf(DynamicAssembly).o42 = function () {\n return this.h42_1;\n };\n protoOf(DynamicAssembly).v3x = function () {\n return this.i42_1;\n };\n protoOf(DynamicAssembly).m3x = function () {\n return this.j42_1;\n };\n protoOf(DynamicAssembly).h2h = function () {\n return this.k42_1;\n };\n protoOf(DynamicAssembly).p42 = function (_set____db54di) {\n this.l42_1 = _set____db54di;\n };\n protoOf(DynamicAssembly).mb = function () {\n return this.l42_1;\n };\n protoOf(DynamicAssembly).g40 = function () {\n return this.m42_1;\n };\n protoOf(DynamicAssembly).boundIds = function () {\n return null;\n };\n protoOf(DynamicAssembly).colliders = function () {\n return null;\n };\n protoOf(DynamicAssembly).functionalZones = function () {\n return null;\n };\n protoOf(DynamicAssembly).connections = function () {\n return this.i42_1.getConnectors(this.h42_1);\n };\n protoOf(DynamicAssembly).buildSpecification = function () {\n var components = plus_0(assemblyComponents(this), this.componentsFromTemplate());\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$0 = copyToArray(components);\n return new ProductSpecification(tmp$ret$0);\n };\n function createModelInfoComponent($this, modelInfo) {\n return new ModelInfoComponent(modelInfo.modelRootUrl, modelInfo.model, '');\n }\n function overrideComponent($this, keep, component, productSpecification) {\n var tmp;\n if (keep ? !productSpecification.hasComponent(component.typeId) : false) {\n tmp = productSpecification.addComponent(component);\n } else if (!keep ? productSpecification.hasComponent(component.typeId) : false) {\n tmp = productSpecification.removeComponent(component.typeId);\n } else {\n tmp = productSpecification;\n }\n return tmp;\n }\n function descriptiveName($this) {\n if ((!($this.templateData.comSize.s2e_1 === 0.0) ? true : !($this.templateData.comSize.t2e_1 === 0.0)) ? true : !($this.templateData.comSize.u2e_1 === 0.0))\n return $this.product.id + ' ' + $this.templateData.comSize.s2e_1 + 'x' + $this.templateData.comSize.t2e_1 + 'x' + $this.templateData.comSize.u2e_1;\n return $this.family + ' ' + $this.name;\n }\n function relativeConnectors($this, size) {\n var relativeConnectors = $this.template.getRelativeConnectorData(size);\n var tmp;\n if (!(relativeConnectors == null)) {\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n tmp = !(relativeConnectors.length === 0);\n } else {\n tmp = false;\n }\n if (tmp) {\n return new RelativeConnectorsComponent(relativeConnectors);\n }\n return null;\n }\n function Companion_14() {\n }\n protoOf(Companion_14).overrideComponentsFromTemplate = function (productSpecification, componentsTemplate) {\n var tmp0_elvis_lhs = componentsTemplate.selectable;\n var tmp = tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs;\n var tmp_0 = new SelectableComponent();\n var tmp1_elvis_lhs = componentsTemplate.draggable;\n return overrideComponent(this, tmp, tmp_0, overrideComponent(this, tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs, new DraggableComponent(), productSpecification));\n };\n protoOf(Companion_14).removeTemplateComponents = function (productSpecification) {\n // Inline function 'kotlin.collections.filterNot' call\n // Inline function 'kotlin.collections.filterNotTo' call\n var this_0 = productSpecification.components;\n var destination = ArrayList_init_$Create$_0();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.shape.Companion.removeTemplateComponents.' call\n var tmp;\n var tmp_0;\n if (element instanceof DraggableComponent) {\n tmp_0 = true;\n } else {\n tmp_0 = element instanceof SelectableComponent;\n }\n if (tmp_0) {\n tmp = true;\n } else {\n tmp = element instanceof ConnectionRootComponent;\n }\n if (!tmp) {\n destination.q(element);\n }\n }\n var filteredComponents = destination;\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$3 = copyToArray(filteredComponents);\n return new ProductSpecification(tmp$ret$3);\n };\n var Companion_instance_19;\n function Companion_getInstance_20() {\n return Companion_instance_19;\n }\n function sam$kotlin_Comparator$0_2(function_0) {\n this.q42_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_2).u1j = function (a, b) {\n return this.q42_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_2).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function DynamicComponentBuilder$componentsFromTemplate$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate..' call\n var tmp0_safe_receiver = b.autoAdaptGroup;\n var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.priority;\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate..' call\n var tmp0_safe_receiver_0 = a.autoAdaptGroup;\n var tmp$ret$1 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.priority;\n return compareValues(tmp, tmp$ret$1);\n }\n function DynamicComponentBuilder() {\n }\n protoOf(DynamicComponentBuilder).componentsFromTemplate = function () {\n // Inline function 'kotlin.collections.mutableListOf' call\n var components = ArrayList_init_$Create$_0();\n components.q(new DisplayNameComponent(descriptiveName(this)));\n components.q(new ConnectionRootComponent());\n components.q(new TemplateDataComponent(this.templateData.id, new Vector(this.templateData.size.s2e_1, this.templateData.size.t2e_1, this.templateData.size.u2e_1), new Vector(this.templateData.comSize.s2e_1, this.templateData.comSize.t2e_1, this.templateData.comSize.u2e_1), this.templateData.family, this.templateData.variant));\n if (this.template.components.draggable === true) {\n components.q(new DraggableComponent());\n }\n if (this.template.components.alwaysHangDown === true) {\n components.q(AlwaysHangDownComponent_instance);\n }\n if (this.template.components.serializeEntity === false) {\n components.q(new UnserializableEntityComponent());\n }\n if (this.template.components.selectable === true) {\n components.q(new SelectableComponent());\n }\n if (this.template.components.outlineable === true) {\n components.q(new OutlineableComponent());\n }\n var tmp0_safe_receiver = this.connections();\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n components.q(new ConnectorsComponent(tmp0_safe_receiver));\n }\n var tmp1_safe_receiver = this.colliders();\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n components.q(new ColliderShapeComponent(tmp1_safe_receiver.ye_1, tmp1_safe_receiver.ze_1));\n tmp = tmp1_safe_receiver.ye_1;\n }\n var collider = tmp;\n var tmp2_safe_receiver = this.template.components.recommendedInitialPositionFromFloor;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n components.q(new RecommendedInitialPositionFromFloorComponent(tmp2_safe_receiver));\n }\n var tmp3_safe_receiver = this.template.components.functionalMargin;\n if (tmp3_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n components.q(new FunctionalMarginShapeComponent(tmp3_safe_receiver.toMargin()));\n }\n var tmp4_safe_receiver = this.functionalZones();\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n components.q(new FunctionalZonesLocalComponent(tmp4_safe_receiver));\n }\n var tmp5_safe_receiver = this.template.components.placementZoneByHeight;\n if (tmp5_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n components.q(new PlacementZoneByHeightComponent(tmp5_safe_receiver.minY, tmp5_safe_receiver.maxY));\n }\n var tmp6_safe_receiver = relativeConnectors(this, this.templateData.size);\n if (tmp6_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n components.q(tmp6_safe_receiver);\n }\n var tmp7_safe_receiver = this.template.components.autoAdaptHost;\n if (tmp7_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n var tmp0_safe_receiver_0 = tmp7_safe_receiver.hostZone;\n var tmp2_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.getPolyhedronForSize(this.templateData.size);\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n var tmp1_safe_receiver_0 = this.colliders();\n tmp_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.ye_1;\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n var hostZone = tmp_0;\n var tmp_1;\n if (hostZone == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate..' call\n components.q(new AutoAdaptHostComponent(hostZone));\n tmp_1 = hostZone;\n }\n }\n var tmp8_safe_receiver = this.modelInfo;\n if (tmp8_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n var tmp0_safe_receiver_1 = tmp8_safe_receiver.model;\n var tmp_2;\n if (tmp0_safe_receiver_1 == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.text.isNotBlank' call\n tmp_2 = !isBlank(tmp0_safe_receiver_1);\n }\n if (tmp_2 === true) {\n components.q(createModelInfoComponent(Companion_instance_19, tmp8_safe_receiver));\n }\n var tmp1_safe_receiver_1 = this.templateData.modelTransform;\n var tmp_3;\n if (tmp1_safe_receiver_1 == null) {\n tmp_3 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate..' call\n tmp_3 = components.q(new ModelTransformComponent(tmp1_safe_receiver_1));\n }\n }\n var tmp9_safe_receiver = this.template.components.allowedDoorPairs;\n if (tmp9_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp9_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp9_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate..' call\n var tmp0_safe_receiver_2 = element.length === 2 ? element[0] === 0 ? new Pair(element[1], null) : element[1] === 0 ? new Pair(element[0], null) : new Pair(element[0], element[1]) : null;\n if (tmp0_safe_receiver_2 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver_2);\n }\n }\n var doorPairs = destination;\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$27 = copyToArray(doorPairs);\n components.q(new AllowedDoorPairsComponent(tmp$ret$27));\n }\n var tmp10_safe_receiver = this.product.autoAdaptGroup;\n if (tmp10_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.sortedByDescending' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.catalog.productDTOs();\n var destination_0 = ArrayList_init_$Create$_0();\n var inductionVariable_0 = 0;\n var last_0 = this_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate..' call\n var tmp0_safe_receiver_3 = element_0.autoAdaptGroup;\n if ((tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.key) === tmp10_safe_receiver.key) {\n destination_0.q(element_0);\n }\n }\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp_4 = DynamicComponentBuilder$componentsFromTemplate$lambda;\n var tmp$ret$32 = new sam$kotlin_Comparator$0_2(tmp_4);\n var this_1 = sortedWith(destination_0, tmp$ret$32);\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));\n var tmp0_iterator = this_1.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate..' call\n var tmp$ret$34 = item.id;\n destination_1.q(tmp$ret$34);\n }\n var variants = copyToArray(destination_1);\n components.q(new AutoAdaptGuestComponent(variants, tmp10_safe_receiver.key));\n }\n var tmp11_safe_receiver = this.template.components.communicationSize;\n var tmp_5;\n if (tmp11_safe_receiver == null) {\n tmp_5 = null;\n } else {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n components.q(new CommunicationSizeComponent(tmp11_safe_receiver));\n tmp_5 = tmp11_safe_receiver;\n }\n if (tmp_5 == null)\n components.q(new CommunicationSizeComponent(this.templateData.comSize));\n if (this.template.components.leg === true) {\n components.q(LegComponent_getInstance());\n }\n if (this.template.components.frame === true) {\n components.q(FrameComponent_getInstance());\n }\n if (this.template.components.door === true) {\n components.q(DoorComponent_getInstance());\n }\n if (this.template.components.doorFront === true) {\n components.q(DoorFrontComponent_getInstance());\n }\n if (this.template.components.handle === true) {\n components.q(HandleComponent_getInstance());\n }\n if (this.template.components.drawer === true) {\n components.q(DrawerComponent_getInstance());\n }\n var tmp13_safe_receiver = this.template.components.light;\n if (tmp13_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n components.q(new LightComponent(tmp13_safe_receiver.type));\n }\n var tmp14_safe_receiver = this.template.components.visualLightSource;\n if (tmp14_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n components.q(new VisualLightSourceComponent(tmp14_safe_receiver.type, tmp14_safe_receiver.intensity, tmp14_safe_receiver.colorTemperature));\n }\n var tmp16_elvis_lhs = this.template.components.meta;\n var tmp_6 = tmp16_elvis_lhs == null ? emptyMap() : tmp16_elvis_lhs;\n var tmp15_elvis_lhs = this.product.meta;\n var mergedMeta = plus_1(tmp_6, tmp15_elvis_lhs == null ? emptyMap() : tmp15_elvis_lhs);\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!mergedMeta.b1()) {\n components.q(new MetaDataComponent(mergedMeta));\n }\n var tmp17_elvis_lhs = this.template.components.propping;\n if (tmp17_elvis_lhs == null ? false : tmp17_elvis_lhs) {\n components.q(ProppingComponent_instance);\n }\n var tmp18_safe_receiver = this.template.components.dragSurfaces;\n if (tmp18_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n var dragSurfaces = tmp18_safe_receiver.generateDragSurface(this.templateData.size, collider);\n var tmp_7;\n if (dragSurfaces == null) {\n tmp_7 = null;\n } else {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate..' call\n components.q(new DragSurfacesComponent(dragSurfaces, false));\n tmp_7 = dragSurfaces;\n }\n }\n var tmp19_safe_receiver = this.template.components.dragProjectionPoint;\n if (tmp19_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n var point = tmp19_safe_receiver.applyToBox(Companion_getInstance_0().fromSize(this.templateData.size.vector)).position;\n components.q(new DragProjectionPointComponent(point));\n }\n var tmp20_safe_receiver = this.template.components.productStructure;\n if (tmp20_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate.' call\n var sizeAABB = Companion_getInstance_0().fromSize(this.templateData.size.vector);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_2 = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_1 = 0;\n var last_1 = tmp20_safe_receiver.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = tmp20_safe_receiver[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n var tmp$ret$54;\n $l$block_0: {\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate..' call\n var tmp0_safe_receiver_4 = this.product.template.parts;\n var tmp_8;\n if (tmp0_safe_receiver_4 == null) {\n tmp_8 = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$52;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_2 = 0;\n var last_2 = tmp0_safe_receiver_4.length;\n while (inductionVariable_2 < last_2) {\n var element_2 = tmp0_safe_receiver_4[inductionVariable_2];\n inductionVariable_2 = inductionVariable_2 + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate...' call\n if (element_2.partKey === element_1.partKey) {\n tmp$ret$52 = element_2;\n break $l$block;\n }\n }\n tmp$ret$52 = null;\n }\n tmp_8 = tmp$ret$52;\n }\n var tmp1_safe_receiver_2 = tmp_8;\n var tmp2_elvis_lhs_0 = tmp1_safe_receiver_2 == null ? null : tmp1_safe_receiver_2.id;\n var tmp_9;\n if (tmp2_elvis_lhs_0 == null) {\n tmp$ret$54 = null;\n break $l$block_0;\n } else {\n tmp_9 = tmp2_elvis_lhs_0;\n }\n var productRef = tmp_9;\n var tmp3_safe_receiver_0 = element_1.snap;\n var tmp_10;\n if (tmp3_safe_receiver_0 == null) {\n tmp_10 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.shape.DynamicComponentBuilder.componentsFromTemplate...' call\n tmp_10 = new ProductStructureConnection(tmp3_safe_receiver_0.offeringPartKey, tmp3_safe_receiver_0.demandingConnector, tmp3_safe_receiver_0.offeringConnector);\n }\n tmp$ret$54 = new ProductStructureItem(element_1.partKey, productRef, tmp_10, element_1.transform.applyToBox(sizeAABB));\n }\n var tmp0_safe_receiver_5 = tmp$ret$54;\n if (tmp0_safe_receiver_5 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_2.q(tmp0_safe_receiver_5);\n }\n }\n var tmp$ret$60 = copyToArray(destination_2);\n components.q(new ProductStructureComponent(tmp$ret$60));\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(components);\n };\n function DynamicProductSpecifier() {\n }\n function Companion_15() {\n this.TYPENAME_IDENTIFIER = 'DynamicShape';\n }\n protoOf(Companion_15).r42 = function () {\n return this.TYPENAME_IDENTIFIER;\n };\n var Companion_instance_20;\n function Companion_getInstance_21() {\n return Companion_instance_20;\n }\n function DynamicShape(product, templateData, modelInfo, template, catalog) {\n DynamicComponentBuilder.call(this);\n this.s42_1 = product;\n this.t42_1 = templateData;\n this.u42_1 = modelInfo;\n this.v42_1 = template;\n this.w42_1 = catalog;\n var tmp = this;\n var tmp0_elvis_lhs = this.t42_1.family;\n tmp.x42_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;\n var tmp_0 = this;\n var tmp0_elvis_lhs_0 = this.v42_1.name;\n tmp_0.y42_1 = tmp0_elvis_lhs_0 == null ? this.v42_1.templateId : tmp0_elvis_lhs_0;\n }\n protoOf(DynamicShape).n42 = function () {\n return this.s42_1;\n };\n protoOf(DynamicShape).o42 = function () {\n return this.t42_1;\n };\n protoOf(DynamicShape).g40 = function () {\n return this.u42_1;\n };\n protoOf(DynamicShape).v3x = function () {\n return this.v42_1;\n };\n protoOf(DynamicShape).m3x = function () {\n return this.w42_1;\n };\n protoOf(DynamicShape).h2h = function () {\n return this.x42_1;\n };\n protoOf(DynamicShape).p42 = function (_set____db54di) {\n this.y42_1 = _set____db54di;\n };\n protoOf(DynamicShape).mb = function () {\n return this.y42_1;\n };\n protoOf(DynamicShape).boundIds = function () {\n var tmp0_safe_receiver = this.v42_1.components.bounds;\n return tmp0_safe_receiver == null ? null : getBoundIds(tmp0_safe_receiver);\n };\n protoOf(DynamicShape).colliders = function () {\n var tmp0_safe_receiver = this.v42_1.components.bounds;\n return tmp0_safe_receiver == null ? null : getPolyhedronForSize(tmp0_safe_receiver, this.t42_1.size);\n };\n protoOf(DynamicShape).functionalZones = function () {\n var tmp0_safe_receiver = this.v42_1.components.functionalZones;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(tmp0_safe_receiver.length);\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var item = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.shape.DynamicShape.functionalZones.' call\n var tmp$ret$0 = new FunctionalZone(item.id, item.layer, item.getPolyhedronForSize(this.t42_1.size));\n destination.q(tmp$ret$0);\n }\n tmp = destination;\n }\n var tmp1_safe_receiver = tmp;\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_0 = copyToArray(tmp1_safe_receiver);\n }\n return tmp_0;\n };\n protoOf(DynamicShape).connections = function () {\n return this.v42_1.getConnectors(this.t42_1);\n };\n protoOf(DynamicShape).buildSpecification = function () {\n return new ProductSpecification(this.componentsFromTemplate());\n };\n protoOf(DynamicShape).af = function () {\n return this.s42_1;\n };\n protoOf(DynamicShape).bf = function () {\n return this.t42_1;\n };\n protoOf(DynamicShape).g1k = function () {\n return this.u42_1;\n };\n protoOf(DynamicShape).h1k = function () {\n return this.v42_1;\n };\n protoOf(DynamicShape).i1k = function () {\n return this.w42_1;\n };\n protoOf(DynamicShape).z42 = function (product, templateData, modelInfo, template, catalog) {\n return new DynamicShape(product, templateData, modelInfo, template, catalog);\n };\n protoOf(DynamicShape).copy = function (product, templateData, modelInfo, template, catalog, $super) {\n product = product === VOID ? this.s42_1 : product;\n templateData = templateData === VOID ? this.t42_1 : templateData;\n modelInfo = modelInfo === VOID ? this.u42_1 : modelInfo;\n template = template === VOID ? this.v42_1 : template;\n catalog = catalog === VOID ? this.w42_1 : catalog;\n return this.z42(product, templateData, modelInfo, template, catalog);\n };\n protoOf(DynamicShape).toString = function () {\n return 'DynamicShape(product=' + this.s42_1 + ', templateData=' + this.t42_1 + ', modelInfo=' + this.u42_1 + ', template=' + this.v42_1 + ', catalog=' + this.w42_1 + ')';\n };\n protoOf(DynamicShape).hashCode = function () {\n var result = this.s42_1.hashCode();\n result = imul(result, 31) + this.t42_1.hashCode() | 0;\n result = imul(result, 31) + (this.u42_1 == null ? 0 : this.u42_1.hashCode()) | 0;\n result = imul(result, 31) + this.v42_1.hashCode() | 0;\n result = imul(result, 31) + hashCode(this.w42_1) | 0;\n return result;\n };\n protoOf(DynamicShape).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof DynamicShape))\n return false;\n var tmp0_other_with_cast = other instanceof DynamicShape ? other : THROW_CCE();\n if (!this.s42_1.equals(tmp0_other_with_cast.s42_1))\n return false;\n if (!this.t42_1.equals(tmp0_other_with_cast.t42_1))\n return false;\n if (!equals(this.u42_1, tmp0_other_with_cast.u42_1))\n return false;\n if (!this.v42_1.equals(tmp0_other_with_cast.v42_1))\n return false;\n if (!equals(this.w42_1, tmp0_other_with_cast.w42_1))\n return false;\n return true;\n };\n function extractHash($this) {\n var tmp0_safe_receiver = $this.templateId;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : getStringHashCode(tmp0_safe_receiver);\n var result = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n result = imul(31, result) + getStringHashCode($this.partKey) | 0;\n return result;\n }\n function Companion_16() {\n Companion_instance_21 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.b43_1 = [null, null, null, null, null, new ReferenceArraySerializer(PrimitiveClasses_getInstance().s7(), DoubleSerializer_getInstance()), null, null, null];\n }\n protoOf(Companion_16).l17 = function () {\n return $serializer_getInstance_14();\n };\n var Companion_instance_21;\n function Companion_getInstance_22() {\n if (Companion_instance_21 == null)\n new Companion_16();\n return Companion_instance_21;\n }\n function $serializer_10() {\n $serializer_instance_10 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.AssemblyChild', this, 9);\n tmp0_serialDesc.cv('templateId', true);\n tmp0_serialDesc.cv('partKey', false);\n tmp0_serialDesc.cv('connector', true);\n tmp0_serialDesc.cv('connectorOnHost', true);\n tmp0_serialDesc.cv('position', true);\n tmp0_serialDesc.cv('transform', true);\n tmp0_serialDesc.cv('components', true);\n tmp0_serialDesc.cv('children', true);\n tmp0_serialDesc.cv('locked', true);\n this.c43_1 = tmp0_serialDesc;\n }\n protoOf($serializer_10).ok = function () {\n return this.c43_1;\n };\n protoOf($serializer_10).rv = function () {\n var tmp0_cached = Companion_getInstance_22().b43_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(PositionTemplateSerializer_getInstance()), get_nullable(tmp0_cached[5]), get_nullable($serializer_getInstance_16()), get_nullable(new ReferenceArraySerializer(getKClass(AssemblyChild), $serializer_getInstance_14())), get_nullable(BooleanSerializer_getInstance())];\n };\n protoOf($serializer_10).qk = function (decoder) {\n var tmp0_desc = this.c43_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_local5 = null;\n var tmp10_local6 = null;\n var tmp11_local7 = null;\n var tmp12_local8 = null;\n var tmp14_input = decoder.nn(tmp0_desc);\n var tmp15_cached = Companion_getInstance_22().b43_1;\n if (tmp14_input.do()) {\n tmp4_local0 = tmp14_input.bo(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp14_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp14_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp14_input.bo(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp14_input.bo(tmp0_desc, 4, PositionTemplateSerializer_getInstance(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n tmp9_local5 = tmp14_input.bo(tmp0_desc, 5, tmp15_cached[5], tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n tmp10_local6 = tmp14_input.bo(tmp0_desc, 6, $serializer_getInstance_16(), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n tmp11_local7 = tmp14_input.bo(tmp0_desc, 7, new ReferenceArraySerializer(getKClass(AssemblyChild), $serializer_getInstance_14()), tmp11_local7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n tmp12_local8 = tmp14_input.bo(tmp0_desc, 8, BooleanSerializer_getInstance(), tmp12_local8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp14_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp14_input.bo(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp14_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp14_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp14_input.bo(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp14_input.bo(tmp0_desc, 4, PositionTemplateSerializer_getInstance(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n case 5:\n tmp9_local5 = tmp14_input.bo(tmp0_desc, 5, tmp15_cached[5], tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n break;\n case 6:\n tmp10_local6 = tmp14_input.bo(tmp0_desc, 6, $serializer_getInstance_16(), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n break;\n case 7:\n tmp11_local7 = tmp14_input.bo(tmp0_desc, 7, new ReferenceArraySerializer(getKClass(AssemblyChild), $serializer_getInstance_14()), tmp11_local7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n break;\n case 8:\n tmp12_local8 = tmp14_input.bo(tmp0_desc, 8, BooleanSerializer_getInstance(), tmp12_local8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp14_input.on(tmp0_desc);\n return AssemblyChild_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, null);\n };\n protoOf($serializer_10).d43 = function (encoder, value) {\n var tmp0_desc = this.c43_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_22().b43_1;\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !(value.templateId === '')) {\n tmp1_output.gp(tmp0_desc, 0, StringSerializer_getInstance(), value.templateId);\n }\n tmp1_output.cp(tmp0_desc, 1, value.partKey);\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.connector == null)) {\n tmp1_output.gp(tmp0_desc, 2, StringSerializer_getInstance(), value.connector);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.connectorOnHost == null)) {\n tmp1_output.gp(tmp0_desc, 3, StringSerializer_getInstance(), value.connectorOnHost);\n }\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.position == null)) {\n tmp1_output.gp(tmp0_desc, 4, PositionTemplateSerializer_getInstance(), value.position);\n }\n if (tmp1_output.kp(tmp0_desc, 5) ? true : !(value.transform == null)) {\n tmp1_output.gp(tmp0_desc, 5, tmp2_cached[5], value.transform);\n }\n if (tmp1_output.kp(tmp0_desc, 6) ? true : !(value.components == null)) {\n tmp1_output.gp(tmp0_desc, 6, $serializer_getInstance_16(), value.components);\n }\n if (tmp1_output.kp(tmp0_desc, 7) ? true : !(value.children == null)) {\n tmp1_output.gp(tmp0_desc, 7, new ReferenceArraySerializer(getKClass(AssemblyChild), $serializer_getInstance_14()), value.children);\n }\n if (tmp1_output.kp(tmp0_desc, 8) ? true : !(value.locked === true)) {\n tmp1_output.gp(tmp0_desc, 8, BooleanSerializer_getInstance(), value.locked);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_10).pk = function (encoder, value) {\n return this.d43(encoder, value instanceof AssemblyChild ? value : THROW_CCE());\n };\n var $serializer_instance_10;\n function $serializer_getInstance_14() {\n if ($serializer_instance_10 == null)\n new $serializer_10();\n return $serializer_instance_10;\n }\n function AssemblyChild_init_$Init$(seen1, templateId, partKey, connector, connectorOnHost, position, transform, components, children, locked, serializationConstructorMarker, $this) {\n if (!(2 === (2 & seen1))) {\n throwMissingFieldException(seen1, 2, $serializer_getInstance_14().c43_1);\n }\n if (0 === (seen1 & 1))\n $this.templateId = '';\n else\n $this.templateId = templateId;\n $this.partKey = partKey;\n if (0 === (seen1 & 4))\n $this.connector = null;\n else\n $this.connector = connector;\n if (0 === (seen1 & 8))\n $this.connectorOnHost = null;\n else\n $this.connectorOnHost = connectorOnHost;\n if (0 === (seen1 & 16))\n $this.position = null;\n else\n $this.position = position;\n if (0 === (seen1 & 32))\n $this.transform = null;\n else\n $this.transform = transform;\n if (0 === (seen1 & 64))\n $this.components = null;\n else\n $this.components = components;\n if (0 === (seen1 & 128))\n $this.children = null;\n else\n $this.children = children;\n if (0 === (seen1 & 256))\n $this.locked = true;\n else\n $this.locked = locked;\n $this.a43_1 = extractHash($this);\n return $this;\n }\n function AssemblyChild_init_$Create$(seen1, templateId, partKey, connector, connectorOnHost, position, transform, components, children, locked, serializationConstructorMarker) {\n return AssemblyChild_init_$Init$(seen1, templateId, partKey, connector, connectorOnHost, position, transform, components, children, locked, serializationConstructorMarker, objectCreate(protoOf(AssemblyChild)));\n }\n function AssemblyChild(templateId, partKey, connector, connectorOnHost, position, transform, components, children, locked) {\n Companion_getInstance_22();\n templateId = templateId === VOID ? '' : templateId;\n connector = connector === VOID ? null : connector;\n connectorOnHost = connectorOnHost === VOID ? null : connectorOnHost;\n position = position === VOID ? null : position;\n transform = transform === VOID ? null : transform;\n components = components === VOID ? null : components;\n children = children === VOID ? null : children;\n locked = locked === VOID ? true : locked;\n this.templateId = templateId;\n this.partKey = partKey;\n this.connector = connector;\n this.connectorOnHost = connectorOnHost;\n this.position = position;\n this.transform = transform;\n this.components = components;\n this.children = children;\n this.locked = locked;\n this.a43_1 = extractHash(this);\n }\n protoOf(AssemblyChild).f2h = function () {\n return this.templateId;\n };\n protoOf(AssemblyChild).z1j = function () {\n return this.partKey;\n };\n protoOf(AssemblyChild).n1k = function () {\n return this.connector;\n };\n protoOf(AssemblyChild).m1k = function () {\n return this.connectorOnHost;\n };\n protoOf(AssemblyChild).ct = function () {\n return this.position;\n };\n protoOf(AssemblyChild).d1x = function () {\n return this.transform;\n };\n protoOf(AssemblyChild).j1m = function () {\n return this.components;\n };\n protoOf(AssemblyChild).c1k = function () {\n return this.children;\n };\n protoOf(AssemblyChild).d1k = function () {\n return this.locked;\n };\n protoOf(AssemblyChild).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof AssemblyChild))\n THROW_CCE();\n if (!(this.templateId == other.templateId))\n return false;\n if (!(this.partKey === other.partKey))\n return false;\n return true;\n };\n protoOf(AssemblyChild).hashCode = function () {\n return this.a43_1;\n };\n protoOf(AssemblyChild).af = function () {\n return this.templateId;\n };\n protoOf(AssemblyChild).bf = function () {\n return this.partKey;\n };\n protoOf(AssemblyChild).g1k = function () {\n return this.connector;\n };\n protoOf(AssemblyChild).h1k = function () {\n return this.connectorOnHost;\n };\n protoOf(AssemblyChild).i1k = function () {\n return this.position;\n };\n protoOf(AssemblyChild).j1k = function () {\n return this.transform;\n };\n protoOf(AssemblyChild).k1k = function () {\n return this.components;\n };\n protoOf(AssemblyChild).p1z = function () {\n return this.children;\n };\n protoOf(AssemblyChild).q1z = function () {\n return this.locked;\n };\n protoOf(AssemblyChild).e43 = function (templateId, partKey, connector, connectorOnHost, position, transform, components, children, locked) {\n return new AssemblyChild(templateId, partKey, connector, connectorOnHost, position, transform, components, children, locked);\n };\n protoOf(AssemblyChild).copy = function (templateId, partKey, connector, connectorOnHost, position, transform, components, children, locked, $super) {\n templateId = templateId === VOID ? this.templateId : templateId;\n partKey = partKey === VOID ? this.partKey : partKey;\n connector = connector === VOID ? this.connector : connector;\n connectorOnHost = connectorOnHost === VOID ? this.connectorOnHost : connectorOnHost;\n position = position === VOID ? this.position : position;\n transform = transform === VOID ? this.transform : transform;\n components = components === VOID ? this.components : components;\n children = children === VOID ? this.children : children;\n locked = locked === VOID ? this.locked : locked;\n return this.e43(templateId, partKey, connector, connectorOnHost, position, transform, components, children, locked);\n };\n protoOf(AssemblyChild).toString = function () {\n return 'AssemblyChild(templateId=' + this.templateId + ', partKey=' + this.partKey + ', connector=' + this.connector + ', connectorOnHost=' + this.connectorOnHost + ', position=' + this.position + ', transform=' + toString(this.transform) + ', components=' + this.components + ', children=' + toString(this.children) + ', locked=' + this.locked + ')';\n };\n function Companion_17() {\n Companion_instance_22 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.t3y_1 = [new ReferenceArraySerializer(getKClass(AssemblyChild), $serializer_getInstance_14())];\n }\n protoOf(Companion_17).mapGeneratorPartsToTemplateChildren = function (catalog, catalogParts, templateChildren, catalogSize) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var assemblyParts = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.mutableMapOf' call\n var partsMap = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = templateChildren.length;\n while (inductionVariable < last) {\n var element = templateChildren[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.Companion.mapGeneratorPartsToTemplateChildren.' call\n var tmp$ret$3;\n $l$block: {\n // Inline function 'kotlin.collections.indexOfFirst' call\n var index = 0;\n var tmp0_iterator = catalogParts.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.template.Companion.mapGeneratorPartsToTemplateChildren..' call\n if (item.partKey === element.partKey) {\n tmp$ret$3 = index;\n break $l$block;\n }\n index = index + 1 | 0;\n }\n tmp$ret$3 = -1;\n }\n var generatorPartIndex = tmp$ret$3;\n var tmp;\n if (!(element.connector == null) ? !(element.connectorOnHost == null) : false) {\n tmp = new AssemblyPartSnapInfo(element.connectorOnHost, element.connector);\n } else {\n tmp = null;\n }\n var snapInfo = tmp;\n if (generatorPartIndex > -1) {\n var generatorPart = catalogParts.h1(generatorPartIndex);\n var tmp_0;\n if (!(element.children == null)) {\n var tmp0_safe_receiver = catalog.findProductDTO(generatorPart.id);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.template;\n var childCatalogSize = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.size;\n tmp_0 = Companion_getInstance_23().mapGeneratorPartsToTemplateChildren(catalog, catalogParts, element.children, childCatalogSize);\n } else {\n tmp_0 = new Pair(null, null);\n }\n var tmp2_container = tmp_0;\n var children = tmp2_container.af();\n var childrenParts = tmp2_container.bf();\n if (childrenParts == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n partsMap.s2(childrenParts);\n }\n var tmp_1;\n if (!(element.position == null)) {\n var tmp_2;\n if (!(catalogSize == null)) {\n tmp_2 = element.position.applyToBox(Companion_getInstance_0().fromSize(catalogSize.vector));\n } else {\n tmp_2 = element.position.absoluteTransform;\n }\n tmp_1 = tmp_2;\n } else if (!(element.transform == null)) {\n tmp_1 = new Transform(new Vector(element.transform[0], element.transform[1], element.transform[2]), Companion_getInstance_2().fromEulerDegrees(new Degrees(element.transform[3]), new Degrees(element.transform[4]), new Degrees(element.transform[5])));\n } else {\n tmp_1 = Companion_getInstance_1().IDENTITY;\n }\n var transform = tmp_1;\n var tmp4_elvis_lhs = element.locked;\n var assemblyPart = new AssemblyPart(element.partKey, transform, snapInfo, children, tmp4_elvis_lhs == null ? true : tmp4_elvis_lhs);\n // Inline function 'kotlin.collections.set' call\n var key = element.partKey;\n var value = generatorPart.id;\n partsMap.r2(key, value);\n assemblyParts.q(assemblyPart);\n } else {\n var tmp5_safe_receiver = element.position;\n var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.absoluteTransform;\n var transform_0 = tmp6_elvis_lhs == null ? Companion_getInstance_1().IDENTITY : tmp6_elvis_lhs;\n var tmp7_elvis_lhs = element.locked;\n var assemblyPart_0 = new AssemblyPart(element.partKey, transform_0, snapInfo, null, tmp7_elvis_lhs == null ? true : tmp7_elvis_lhs);\n // Inline function 'kotlin.collections.set' call\n var key_0 = element.partKey;\n partsMap.r2(key_0, '');\n assemblyParts.q(assemblyPart_0);\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$5 = copyToArray(assemblyParts);\n return new Pair(tmp$ret$5, partsMap);\n };\n protoOf(Companion_17).l17 = function () {\n return $serializer_getInstance_15();\n };\n var Companion_instance_22;\n function Companion_getInstance_23() {\n if (Companion_instance_22 == null)\n new Companion_17();\n return Companion_instance_22;\n }\n function $serializer_11() {\n $serializer_instance_11 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.AssemblyTemplate', this, 1);\n tmp0_serialDesc.cv('children', false);\n this.f43_1 = tmp0_serialDesc;\n }\n protoOf($serializer_11).ok = function () {\n return this.f43_1;\n };\n protoOf($serializer_11).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [Companion_getInstance_23().t3y_1[0]];\n };\n protoOf($serializer_11).qk = function (decoder) {\n var tmp0_desc = this.f43_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp6_input = decoder.nn(tmp0_desc);\n var tmp7_cached = Companion_getInstance_23().t3y_1;\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return AssemblyTemplate_init_$Create$(tmp3_bitMask0, tmp4_local0, null);\n };\n protoOf($serializer_11).g43 = function (encoder, value) {\n var tmp0_desc = this.f43_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_23().t3y_1;\n tmp1_output.ep(tmp0_desc, 0, tmp2_cached[0], value.children);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_11).pk = function (encoder, value) {\n return this.g43(encoder, value instanceof AssemblyTemplate ? value : THROW_CCE());\n };\n var $serializer_instance_11;\n function $serializer_getInstance_15() {\n if ($serializer_instance_11 == null)\n new $serializer_11();\n return $serializer_instance_11;\n }\n function AssemblyTemplate_init_$Init$(seen1, children, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_15().f43_1);\n }\n $this.children = children;\n var tmp = $this;\n // Inline function 'kotlin.collections.sumOf' call\n var sum = 0;\n var indexedObject = $this.children;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var tmp_0 = sum;\n // Inline function 'com.ikea.range.dynamic.template.AssemblyTemplate..' call\n sum = tmp_0 + element.hashCode() | 0;\n }\n tmp.u3y_1 = sum;\n return $this;\n }\n function AssemblyTemplate_init_$Create$(seen1, children, serializationConstructorMarker) {\n return AssemblyTemplate_init_$Init$(seen1, children, serializationConstructorMarker, objectCreate(protoOf(AssemblyTemplate)));\n }\n function AssemblyTemplate(children) {\n Companion_getInstance_23();\n this.children = children;\n var tmp = this;\n // Inline function 'kotlin.collections.sumOf' call\n var sum = 0;\n var indexedObject = this.children;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var tmp_0 = sum;\n // Inline function 'com.ikea.range.dynamic.template.AssemblyTemplate._hashCode.' call\n sum = tmp_0 + element.hashCode() | 0;\n }\n tmp.u3y_1 = sum;\n }\n protoOf(AssemblyTemplate).c1k = function () {\n return this.children;\n };\n protoOf(AssemblyTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof AssemblyTemplate))\n THROW_CCE();\n if (!(other.children.length === this.children.length))\n return false;\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var indexedObject = this.children;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var item = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.AssemblyTemplate.equals.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n if (!item.equals(other.children[tmp1]))\n return false;\n }\n return true;\n };\n protoOf(AssemblyTemplate).hashCode = function () {\n return this.u3y_1;\n };\n protoOf(AssemblyTemplate).inherit = function (extendedAssembly) {\n var tmp;\n if (extendedAssembly == null) {\n tmp = this;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = extendedAssembly.children;\n var destination = ArrayList_init_$Create$_0();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.AssemblyTemplate.inherit.' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var indexedObject = this.children;\n var inductionVariable_0 = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.AssemblyTemplate.inherit..' call\n if (element_0.partKey === element.partKey) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n if (tmp$ret$1) {\n destination.q(element);\n }\n }\n var combinedChildren = plus_2(this.children, destination);\n tmp = new AssemblyTemplate(combinedChildren);\n }\n return tmp;\n };\n protoOf(AssemblyTemplate).af = function () {\n return this.children;\n };\n protoOf(AssemblyTemplate).h43 = function (children) {\n return new AssemblyTemplate(children);\n };\n protoOf(AssemblyTemplate).copy = function (children, $super) {\n children = children === VOID ? this.children : children;\n return this.h43(children);\n };\n protoOf(AssemblyTemplate).toString = function () {\n return 'AssemblyTemplate(children=' + toString(this.children) + ')';\n };\n function CustomSerializer_0() {\n CustomSerializer_instance_0 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.AutoAdaptHostTemplate', null, 1);\n tmp0_serialDesc.cv('hostZone', true);\n this.i43_1 = tmp0_serialDesc;\n }\n protoOf(CustomSerializer_0).qk = function (decoder) {\n var template = null;\n try {\n var value = decoder.an();\n if (value) {\n template = new AutoAdaptHostTemplate(new Dimension(0.0, 0.0, VOID, 0.0, VOID, 0.0, 0.0, 0.0));\n }\n } catch ($p) {\n if ($p instanceof SerializationException) {\n var e = $p;\n // Inline function 'kotlin.run' call\n // Inline function 'kotlin.contracts.contract' call\n var $this$run = decoder.nn(this.i43_1);\n var i = $this$run.eo(CustomSerializer_getInstance_0().i43_1);\n if (!(i === -1)) {\n var hostZone = $this$run.ao(CustomSerializer_getInstance_0().i43_1, i, Companion_getInstance_28().l17());\n template = new AutoAdaptHostTemplate(hostZone);\n } else {\n // Inline function 'kotlin.error' call\n var message = 'AutoAdaptHost: error found in JSON.';\n throw IllegalStateException_init_$Create$(toString(message));\n }\n $this$run.on(CustomSerializer_getInstance_0().i43_1);\n } else {\n throw $p;\n }\n }\n return template;\n };\n protoOf(CustomSerializer_0).ok = function () {\n return this.i43_1;\n };\n protoOf(CustomSerializer_0).k43 = function (encoder, value) {\n var tmp0_desc = this.i43_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !(value.hostZone == null)) {\n tmp1_output.gp(tmp0_desc, 0, Companion_getInstance_28(), value.hostZone);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf(CustomSerializer_0).pk = function (encoder, value) {\n return this.k43(encoder, (value == null ? true : value instanceof AutoAdaptHostTemplate) ? value : THROW_CCE());\n };\n protoOf(CustomSerializer_0).l17 = function () {\n return CustomSerializer_getInstance_0();\n };\n var CustomSerializer_instance_0;\n function CustomSerializer_getInstance_0() {\n if (CustomSerializer_instance_0 == null)\n new CustomSerializer_0();\n return CustomSerializer_instance_0;\n }\n function AutoAdaptHostTemplate(hostZone) {\n CustomSerializer_getInstance_0();\n hostZone = hostZone === VOID ? null : hostZone;\n this.hostZone = hostZone;\n }\n protoOf(AutoAdaptHostTemplate).h31 = function () {\n return this.hostZone;\n };\n protoOf(AutoAdaptHostTemplate).af = function () {\n return this.hostZone;\n };\n protoOf(AutoAdaptHostTemplate).l43 = function (hostZone) {\n return new AutoAdaptHostTemplate(hostZone);\n };\n protoOf(AutoAdaptHostTemplate).copy = function (hostZone, $super) {\n hostZone = hostZone === VOID ? this.hostZone : hostZone;\n return this.l43(hostZone);\n };\n protoOf(AutoAdaptHostTemplate).toString = function () {\n return 'AutoAdaptHostTemplate(hostZone=' + this.hostZone + ')';\n };\n protoOf(AutoAdaptHostTemplate).hashCode = function () {\n return this.hostZone == null ? 0 : this.hostZone.hashCode();\n };\n protoOf(AutoAdaptHostTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof AutoAdaptHostTemplate))\n return false;\n var tmp0_other_with_cast = other instanceof AutoAdaptHostTemplate ? other : THROW_CCE();\n if (!equals(this.hostZone, tmp0_other_with_cast.hostZone))\n return false;\n return true;\n };\n function BoundItemTemplate$Companion$descriptor$lambda($this$buildClassSerialDescriptor) {\n $this$buildClassSerialDescriptor.cl('id', PrimitiveSerialDescriptor('id', STRING_getInstance()));\n $this$buildClassSerialDescriptor.cl('type', PrimitiveSerialDescriptor('type', STRING_getInstance()));\n $this$buildClassSerialDescriptor.cl('layer', PrimitiveSerialDescriptor('layer', STRING_getInstance()));\n $this$buildClassSerialDescriptor.cl('dimension', Companion_getInstance_28().j43_1);\n $this$buildClassSerialDescriptor.cl('margin', MarginTemplateSerializer_getInstance().m43_1);\n $this$buildClassSerialDescriptor.cl('padding', MarginTemplateSerializer_getInstance().m43_1);\n $this$buildClassSerialDescriptor.cl('compartment', Companion_getInstance_25().n43_1);\n return Unit_instance;\n }\n function Companion_18() {\n Companion_instance_23 = this;\n var tmp = this;\n tmp.o43_1 = buildClassSerialDescriptor('BoundItemTemplate', [], BoundItemTemplate$Companion$descriptor$lambda);\n }\n protoOf(Companion_18).ok = function () {\n return this.o43_1;\n };\n protoOf(Companion_18).qk = function (decoder) {\n // Inline function 'kotlinx.serialization.encoding.decodeStructure' call\n var descriptor = this.o43_1;\n var composite = decoder.nn(descriptor);\n // Inline function 'com.ikea.range.dynamic.template.Companion.deserialize.' call\n var id = '';\n var type = 'box';\n var layer = 'collision';\n var dimension = null;\n var margin = null;\n var padding = null;\n var compartment = null;\n loop: while (true) {\n var index = composite.eo(Companion_getInstance_24().o43_1);\n if (index === 0)\n id = composite.xn(Companion_getInstance_24().o43_1, 0);\n else {\n if (index === 1)\n type = composite.xn(Companion_getInstance_24().o43_1, 1);\n else {\n if (index === 2)\n layer = composite.xn(Companion_getInstance_24().o43_1, 2);\n else {\n if (index === 3)\n dimension = composite.ao(Companion_getInstance_24().o43_1, 3, Companion_getInstance_28().l17());\n else {\n if (index === 4)\n margin = composite.ao(Companion_getInstance_24().o43_1, 4, MarginTemplateSerializer_getInstance().l17());\n else {\n if (index === 5)\n padding = composite.ao(Companion_getInstance_24().o43_1, 5, MarginTemplateSerializer_getInstance().l17());\n else {\n if (index === 6)\n compartment = composite.ao(Companion_getInstance_24().o43_1, 6, Companion_getInstance_25().l17());\n else {\n if (index === -1)\n break loop;\n else {\n var message = 'Unexpected index: ' + index;\n throw IllegalStateException_init_$Create$(toString(message));\n }\n }\n }\n }\n }\n }\n }\n }\n }\n var result = new BoundItemTemplate(dimension, id, type, layer, margin, padding, compartment);\n composite.on(descriptor);\n return result;\n };\n protoOf(Companion_18).p43 = function (encoder, value) {\n var enc = encoder.nn(this.o43_1);\n enc.cp(this.o43_1, 0, value.id);\n enc.cp(this.o43_1, 1, value.type);\n enc.cp(this.o43_1, 2, value.layer);\n var tmp0_safe_receiver = value.dimension;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n enc.ep(Companion_getInstance_24().o43_1, 3, Companion_getInstance_28().l17(), tmp0_safe_receiver);\n }\n var tmp1_safe_receiver = value.margin;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n enc.ep(Companion_getInstance_24().o43_1, 4, MarginTemplateSerializer_getInstance().l17(), tmp1_safe_receiver);\n }\n var tmp2_safe_receiver = value.padding;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n enc.ep(Companion_getInstance_24().o43_1, 5, MarginTemplateSerializer_getInstance().l17(), tmp2_safe_receiver);\n }\n var tmp3_safe_receiver = value.compartment;\n if (tmp3_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n enc.ep(Companion_getInstance_24().o43_1, 6, Companion_getInstance_25().l17(), tmp3_safe_receiver);\n }\n enc.on(this.o43_1);\n };\n protoOf(Companion_18).pk = function (encoder, value) {\n return this.p43(encoder, value instanceof BoundItemTemplate ? value : THROW_CCE());\n };\n protoOf(Companion_18).l17 = function () {\n return Companion_getInstance_24();\n };\n var Companion_instance_23;\n function Companion_getInstance_24() {\n if (Companion_instance_23 == null)\n new Companion_18();\n return Companion_instance_23;\n }\n function BoundItemTemplate(dimension, id, type, layer, margin, padding, compartment, sourceTemplateId) {\n Companion_getInstance_24();\n dimension = dimension === VOID ? null : dimension;\n type = type === VOID ? 'box' : type;\n layer = layer === VOID ? 'collision' : layer;\n margin = margin === VOID ? null : margin;\n padding = padding === VOID ? null : padding;\n compartment = compartment === VOID ? null : compartment;\n sourceTemplateId = sourceTemplateId === VOID ? '' : sourceTemplateId;\n this.dimension = dimension;\n this.id = id;\n this.type = type;\n this.layer = layer;\n this.margin = margin;\n this.padding = padding;\n this.compartment = compartment;\n this.sourceTemplateId = sourceTemplateId;\n this.k3y_1 = 0;\n }\n protoOf(BoundItemTemplate).q43 = function () {\n return this.dimension;\n };\n protoOf(BoundItemTemplate).s1k = function () {\n return this.id;\n };\n protoOf(BoundItemTemplate).a1x = function () {\n return this.type;\n };\n protoOf(BoundItemTemplate).j3a = function () {\n return this.layer;\n };\n protoOf(BoundItemTemplate).p39 = function () {\n return this.margin;\n };\n protoOf(BoundItemTemplate).r43 = function () {\n return this.padding;\n };\n protoOf(BoundItemTemplate).s43 = function () {\n return this.compartment;\n };\n protoOf(BoundItemTemplate).t43 = function (_set____db54di) {\n this.sourceTemplateId = _set____db54di;\n };\n protoOf(BoundItemTemplate).u43 = function () {\n return this.sourceTemplateId;\n };\n protoOf(BoundItemTemplate).getPolyhedronsForSize = function (size) {\n var tmp;\n if (this.type === 'frame') {\n var tmp_0 = PolyhedronUtils_getInstance();\n var tmp0_safe_receiver = this.margin;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.toMargin();\n var tmp_1 = tmp1_elvis_lhs == null ? new Margin() : tmp1_elvis_lhs;\n var tmp_2 = ensureNotNull(this.padding).toMargin();\n var tmp2_safe_receiver = this.compartment;\n var tmp_3;\n if (tmp2_safe_receiver == null) {\n tmp_3 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.BoundItemTemplate.getPolyhedronsForSize.' call\n var tmp0_elvis_lhs = tmp2_safe_receiver.width;\n var tmp_4 = tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;\n var tmp1_elvis_lhs_0 = tmp2_safe_receiver.height;\n tmp_3 = new Size(tmp_4, tmp1_elvis_lhs_0 == null ? 0.0 : tmp1_elvis_lhs_0);\n }\n var tmp_5 = tmp_0.createFramePolyhedrons(size, tmp_1, tmp_2, tmp_3);\n tmp = isArray(tmp_5) ? tmp_5 : THROW_CCE();\n } else {\n var tmp_6;\n if (this.dimension == null) {\n tmp_6 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.BoundItemTemplate.getPolyhedronsForSize.' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_6 = [this.dimension.getPolyhedronForSize(size)];\n }\n var tmp7_elvis_lhs = tmp_6;\n var tmp_7;\n if (tmp7_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n var tmp4_width = size.s2e_1;\n var tmp5_height = size.t2e_1;\n var tmp6_depth = size.u2e_1;\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_7 = [(new Dimension(VOID, VOID, tmp6_depth, VOID, tmp5_height, VOID, VOID, VOID, tmp4_width)).getPolyhedronForSize(size)];\n } else {\n tmp_7 = tmp7_elvis_lhs;\n }\n tmp = tmp_7;\n }\n return tmp;\n };\n protoOf(BoundItemTemplate).getPolyhedronForSize = function (size) {\n var tmp;\n if (this.dimension == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.BoundItemTemplate.getPolyhedronForSize.' call\n tmp = this.dimension.getPolyhedronForSize(size);\n }\n var tmp4_elvis_lhs = tmp;\n var tmp_0;\n if (tmp4_elvis_lhs == null) {\n var tmp1_width = size.s2e_1;\n var tmp2_height = size.t2e_1;\n var tmp3_depth = size.u2e_1;\n tmp_0 = (new Dimension(VOID, VOID, tmp3_depth, VOID, tmp2_height, VOID, VOID, VOID, tmp1_width)).getPolyhedronForSize(size);\n } else {\n tmp_0 = tmp4_elvis_lhs;\n }\n return tmp_0;\n };\n protoOf(BoundItemTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof BoundItemTemplate))\n THROW_CCE();\n if (!equals(this.dimension, other.dimension))\n return false;\n if (!(this.id === other.id))\n return false;\n return true;\n };\n protoOf(BoundItemTemplate).hashCode = function () {\n if (this.k3y_1 === 0) {\n var tmp = this;\n var tmp0_safe_receiver = this.dimension;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hashCode();\n tmp.k3y_1 = imul(31, tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) + getStringHashCode(this.id) | 0;\n }\n return this.k3y_1;\n };\n protoOf(BoundItemTemplate).clone = function () {\n var tmp0_safe_receiver = this.dimension;\n var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.clone();\n var tmp1_safe_receiver = this.margin;\n var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.clone();\n var tmp2_safe_receiver = this.padding;\n var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.clone();\n var tmp3_safe_receiver = this.compartment;\n var tmp_2;\n if (tmp3_safe_receiver == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.BoundItemTemplate.clone.' call\n tmp_2 = new Compartment(tmp3_safe_receiver.width, tmp3_safe_receiver.height);\n }\n return new BoundItemTemplate(tmp, this.id, this.type, this.layer, tmp_0, tmp_1, tmp_2, this.sourceTemplateId);\n };\n protoOf(BoundItemTemplate).af = function () {\n return this.dimension;\n };\n protoOf(BoundItemTemplate).bf = function () {\n return this.id;\n };\n protoOf(BoundItemTemplate).g1k = function () {\n return this.type;\n };\n protoOf(BoundItemTemplate).h1k = function () {\n return this.layer;\n };\n protoOf(BoundItemTemplate).i1k = function () {\n return this.margin;\n };\n protoOf(BoundItemTemplate).j1k = function () {\n return this.padding;\n };\n protoOf(BoundItemTemplate).k1k = function () {\n return this.compartment;\n };\n protoOf(BoundItemTemplate).p1z = function () {\n return this.sourceTemplateId;\n };\n protoOf(BoundItemTemplate).v43 = function (dimension, id, type, layer, margin, padding, compartment, sourceTemplateId) {\n return new BoundItemTemplate(dimension, id, type, layer, margin, padding, compartment, sourceTemplateId);\n };\n protoOf(BoundItemTemplate).copy = function (dimension, id, type, layer, margin, padding, compartment, sourceTemplateId, $super) {\n dimension = dimension === VOID ? this.dimension : dimension;\n id = id === VOID ? this.id : id;\n type = type === VOID ? this.type : type;\n layer = layer === VOID ? this.layer : layer;\n margin = margin === VOID ? this.margin : margin;\n padding = padding === VOID ? this.padding : padding;\n compartment = compartment === VOID ? this.compartment : compartment;\n sourceTemplateId = sourceTemplateId === VOID ? this.sourceTemplateId : sourceTemplateId;\n return this.v43(dimension, id, type, layer, margin, padding, compartment, sourceTemplateId);\n };\n protoOf(BoundItemTemplate).toString = function () {\n return 'BoundItemTemplate(dimension=' + this.dimension + ', id=' + this.id + ', type=' + this.type + ', layer=' + this.layer + ', margin=' + this.margin + ', padding=' + this.padding + ', compartment=' + this.compartment + ', sourceTemplateId=' + this.sourceTemplateId + ')';\n };\n function getPolyhedronForSize(_this__u8e3s4, size) {\n try {\n var tmp;\n if (size.equals(new Size())) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.mutableListOf' call\n var ids = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$_0();\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n while (inductionVariable < last) {\n var element = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.getPolyhedronForSize.' call\n var b = toList(element.getPolyhedronsForSize(size));\n if (b.n() > 1) {\n var inductionVariable_0 = 1;\n var last_0 = b.n();\n if (inductionVariable_0 <= last_0)\n do {\n var i = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n ids.q(element.id + ':' + i);\n }\n while (!(i === last_0));\n } else {\n ids.q(element.id);\n }\n var list = b;\n addAll(destination, list);\n }\n var polyhedra = copyToArray(destination);\n var tmp_0;\n // Inline function 'kotlin.collections.isEmpty' call\n if (polyhedra.length === 0) {\n tmp_0 = null;\n } else {\n if (polyhedra.length === 1) {\n tmp_0 = polyhedra[0];\n } else {\n tmp_0 = merge(polyhedra);\n }\n }\n var polyhedron = tmp_0;\n var tmp_1;\n if (polyhedron == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.getPolyhedronForSize.' call\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$6 = copyToArray(ids);\n tmp_1 = new Pair(polyhedron, tmp$ret$6);\n }\n return tmp_1;\n }\n return tmp;\n } catch ($p) {\n if ($p instanceof Error_0) {\n var e = $p;\n // Inline function 'kotlin.error' call\n var message = 'Specification of bounds not valid';\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n throw $p;\n }\n }\n }\n function getBoundIds(_this__u8e3s4) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(_this__u8e3s4.length);\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n while (inductionVariable < last) {\n var item = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.getBoundIds.' call\n item.type;\n var tmp$ret$0 = item.id;\n destination.q(tmp$ret$0);\n }\n return copyToArray(destination);\n }\n function inherit(_this__u8e3s4, extendedBounds) {\n var tmp;\n if (extendedBounds == null) {\n tmp = _this__u8e3s4;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$_0();\n var inductionVariable = 0;\n var last = extendedBounds.length;\n while (inductionVariable < last) {\n var element = extendedBounds[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.inherit.' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var inductionVariable_0 = 0;\n var last_0 = _this__u8e3s4.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = _this__u8e3s4[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.inherit..' call\n if (element_0.id === element.id) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n if (tmp$ret$1) {\n destination.q(element);\n }\n }\n tmp = plus_2(_this__u8e3s4, destination);\n }\n return tmp;\n }\n function Compartment$Companion$descriptor$lambda($this$buildClassSerialDescriptor) {\n $this$buildClassSerialDescriptor.cl('width', PrimitiveSerialDescriptor('width', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('height', PrimitiveSerialDescriptor('height', DOUBLE_getInstance()));\n return Unit_instance;\n }\n function Companion_19() {\n Companion_instance_24 = this;\n var tmp = this;\n tmp.n43_1 = buildClassSerialDescriptor('Compartment', [], Compartment$Companion$descriptor$lambda);\n }\n protoOf(Companion_19).ok = function () {\n return this.n43_1;\n };\n protoOf(Companion_19).w43 = function (encoder, value) {\n var enc = encoder.nn(this.n43_1);\n if (value.width == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n if (!isNaN_0(value.width)) {\n enc.ap(Companion_getInstance_25().n43_1, 0, value.width);\n tmp = Unit_instance;\n }\n }\n if (value.height == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0;\n if (!isNaN_0(value.height)) {\n enc.ap(Companion_getInstance_25().n43_1, 1, value.height);\n tmp_0 = Unit_instance;\n }\n }\n enc.on(this.n43_1);\n };\n protoOf(Companion_19).pk = function (encoder, value) {\n return this.w43(encoder, value instanceof Compartment ? value : THROW_CCE());\n };\n protoOf(Companion_19).qk = function (decoder) {\n var tmp0_desc = this.n43_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_input = decoder.nn(tmp0_desc);\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.bo(tmp0_desc, 0, DoubleSerializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.bo(tmp0_desc, 1, DoubleSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.bo(tmp0_desc, 0, DoubleSerializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.bo(tmp0_desc, 1, DoubleSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n if (!(0 === (0 & tmp3_bitMask0))) {\n throwMissingFieldException(tmp3_bitMask0, 0, tmp0_desc);\n }\n if (0 === (tmp3_bitMask0 & 1)) {\n tmp4_local0 = NaN;\n }\n if (0 === (tmp3_bitMask0 & 2)) {\n tmp5_local1 = NaN;\n }\n return new Compartment(tmp4_local0, tmp5_local1);\n };\n protoOf(Companion_19).l17 = function () {\n return Companion_getInstance_25();\n };\n var Companion_instance_24;\n function Companion_getInstance_25() {\n if (Companion_instance_24 == null)\n new Companion_19();\n return Companion_instance_24;\n }\n function Compartment(width, height) {\n Companion_getInstance_25();\n var tmp;\n if (width === VOID) {\n tmp = NaN;\n } else {\n tmp = width;\n }\n width = tmp;\n var tmp_0;\n if (height === VOID) {\n tmp_0 = NaN;\n } else {\n tmp_0 = height;\n }\n height = tmp_0;\n this.width = width;\n this.height = height;\n }\n protoOf(Compartment).u2b = function () {\n return this.width;\n };\n protoOf(Compartment).v2b = function () {\n return this.height;\n };\n protoOf(Compartment).af = function () {\n return this.width;\n };\n protoOf(Compartment).bf = function () {\n return this.height;\n };\n protoOf(Compartment).x43 = function (width, height) {\n return new Compartment(width, height);\n };\n protoOf(Compartment).copy = function (width, height, $super) {\n width = width === VOID ? this.width : width;\n height = height === VOID ? this.height : height;\n return this.x43(width, height);\n };\n protoOf(Compartment).toString = function () {\n return 'Compartment(width=' + this.width + ', height=' + this.height + ')';\n };\n protoOf(Compartment).hashCode = function () {\n var result = this.width == null ? 0 : getNumberHashCode(this.width);\n result = imul(result, 31) + (this.height == null ? 0 : getNumberHashCode(this.height)) | 0;\n return result;\n };\n protoOf(Compartment).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Compartment))\n return false;\n var tmp0_other_with_cast = other instanceof Compartment ? other : THROW_CCE();\n if (!equals(this.width, tmp0_other_with_cast.width))\n return false;\n if (!equals(this.height, tmp0_other_with_cast.height))\n return false;\n return true;\n };\n function Companion_20() {\n Companion_instance_25 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.y43_1 = [new ReferenceArraySerializer(getKClass(BoundItemTemplate), Companion_getInstance_24()), new ReferenceArraySerializer(getKClass(BoundItemTemplate), Companion_getInstance_24()), new ReferenceArraySerializer(getKClass(ConnectorItemTemplate), Companion_getInstance_27()), null, null, null, null, new ReferenceArraySerializer(PrimitiveClasses_getInstance().t7(), new ReferenceArraySerializer(PrimitiveClasses_getInstance().q7(), IntSerializer_getInstance())), null, null, null, null, null, null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance()), null, null, null, null, null, null, null, null, null, null, null, new ReferenceArraySerializer(getKClass(ProductStructureItemTemplate), $serializer_getInstance_23())];\n }\n protoOf(Companion_20).extendMeta = function (primary, secondary) {\n if (primary == null)\n return secondary;\n if (secondary == null)\n return primary;\n return plus_1(secondary, primary);\n };\n protoOf(Companion_20).l17 = function () {\n return $serializer_getInstance_16();\n };\n var Companion_instance_25;\n function Companion_getInstance_26() {\n if (Companion_instance_25 == null)\n new Companion_20();\n return Companion_instance_25;\n }\n function $serializer_12() {\n $serializer_instance_12 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.ComponentsTemplate', this, 31);\n tmp0_serialDesc.cv('bounds', true);\n tmp0_serialDesc.cv('functionalZones', true);\n tmp0_serialDesc.cv('connectors', true);\n tmp0_serialDesc.cv('assembly', true);\n tmp0_serialDesc.cv('selectable', true);\n tmp0_serialDesc.cv('outlineable', true);\n tmp0_serialDesc.cv('draggable', true);\n tmp0_serialDesc.cv('allowedDoorPairs', true);\n tmp0_serialDesc.cv('autoAdaptHost', true);\n tmp0_serialDesc.cv('communicationSize', true);\n tmp0_serialDesc.cv('door', true);\n tmp0_serialDesc.cv('doorFront', true);\n tmp0_serialDesc.cv('handle', true);\n tmp0_serialDesc.cv('drawer', true);\n tmp0_serialDesc.cv('frame', true);\n tmp0_serialDesc.cv('leg', true);\n tmp0_serialDesc.cv('light', true);\n tmp0_serialDesc.cv('outlined', true);\n tmp0_serialDesc.cv('meta', true);\n tmp0_serialDesc.cv('propping', true);\n tmp0_serialDesc.cv('alwaysHangDown', true);\n tmp0_serialDesc.cv('serializeEntity', true);\n tmp0_serialDesc.cv('placementZoneByHeight', true);\n tmp0_serialDesc.cv('functionalMargin', true);\n tmp0_serialDesc.cv('recommendedInitialPositionFromFloor', true);\n tmp0_serialDesc.cv('visualLightSource', true);\n tmp0_serialDesc.cv('model3D', true);\n tmp0_serialDesc.cv('product', true);\n tmp0_serialDesc.cv('dragSurfaces', true);\n tmp0_serialDesc.cv('dragProjectionPoint', true);\n tmp0_serialDesc.cv('productStructure', true);\n this.z43_1 = tmp0_serialDesc;\n }\n protoOf($serializer_12).ok = function () {\n return this.z43_1;\n };\n protoOf($serializer_12).rv = function () {\n var tmp0_cached = Companion_getInstance_26().y43_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [get_nullable(tmp0_cached[0]), get_nullable(tmp0_cached[1]), get_nullable(tmp0_cached[2]), get_nullable($serializer_getInstance_15()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(tmp0_cached[7]), get_nullable(CustomSerializer_getInstance_0()), get_nullable($serializer_getInstance_0()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable($serializer_getInstance_18()), get_nullable(BooleanSerializer_getInstance()), get_nullable(tmp0_cached[18]), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable($serializer_getInstance_20()), get_nullable(MarginTemplateSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable($serializer_getInstance_21()), get_nullable($serializer_getInstance_19()), get_nullable($serializer_getInstance_13()), get_nullable(CustomSerializer_getInstance_1()), get_nullable(PositionTemplateSerializer_getInstance()), get_nullable(tmp0_cached[30])];\n };\n protoOf($serializer_12).qk = function (decoder) {\n var tmp0_desc = this.z43_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_local5 = null;\n var tmp10_local6 = null;\n var tmp11_local7 = null;\n var tmp12_local8 = null;\n var tmp13_local9 = null;\n var tmp14_local10 = null;\n var tmp15_local11 = null;\n var tmp16_local12 = null;\n var tmp17_local13 = null;\n var tmp18_local14 = null;\n var tmp19_local15 = null;\n var tmp20_local16 = null;\n var tmp21_local17 = null;\n var tmp22_local18 = null;\n var tmp23_local19 = null;\n var tmp24_local20 = null;\n var tmp25_local21 = null;\n var tmp26_local22 = null;\n var tmp27_local23 = null;\n var tmp28_local24 = null;\n var tmp29_local25 = null;\n var tmp30_local26 = null;\n var tmp31_local27 = null;\n var tmp32_local28 = null;\n var tmp33_local29 = null;\n var tmp34_local30 = null;\n var tmp36_input = decoder.nn(tmp0_desc);\n var tmp37_cached = Companion_getInstance_26().y43_1;\n if (tmp36_input.do()) {\n tmp4_local0 = tmp36_input.bo(tmp0_desc, 0, tmp37_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp36_input.bo(tmp0_desc, 1, tmp37_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp36_input.bo(tmp0_desc, 2, tmp37_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp36_input.bo(tmp0_desc, 3, $serializer_getInstance_15(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp36_input.bo(tmp0_desc, 4, BooleanSerializer_getInstance(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n tmp9_local5 = tmp36_input.bo(tmp0_desc, 5, BooleanSerializer_getInstance(), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n tmp10_local6 = tmp36_input.bo(tmp0_desc, 6, BooleanSerializer_getInstance(), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n tmp11_local7 = tmp36_input.bo(tmp0_desc, 7, tmp37_cached[7], tmp11_local7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n tmp12_local8 = tmp36_input.bo(tmp0_desc, 8, CustomSerializer_getInstance_0(), tmp12_local8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n tmp13_local9 = tmp36_input.bo(tmp0_desc, 9, $serializer_getInstance_0(), tmp13_local9);\n tmp3_bitMask0 = tmp3_bitMask0 | 512;\n tmp14_local10 = tmp36_input.bo(tmp0_desc, 10, BooleanSerializer_getInstance(), tmp14_local10);\n tmp3_bitMask0 = tmp3_bitMask0 | 1024;\n tmp15_local11 = tmp36_input.bo(tmp0_desc, 11, BooleanSerializer_getInstance(), tmp15_local11);\n tmp3_bitMask0 = tmp3_bitMask0 | 2048;\n tmp16_local12 = tmp36_input.bo(tmp0_desc, 12, BooleanSerializer_getInstance(), tmp16_local12);\n tmp3_bitMask0 = tmp3_bitMask0 | 4096;\n tmp17_local13 = tmp36_input.bo(tmp0_desc, 13, BooleanSerializer_getInstance(), tmp17_local13);\n tmp3_bitMask0 = tmp3_bitMask0 | 8192;\n tmp18_local14 = tmp36_input.bo(tmp0_desc, 14, BooleanSerializer_getInstance(), tmp18_local14);\n tmp3_bitMask0 = tmp3_bitMask0 | 16384;\n tmp19_local15 = tmp36_input.bo(tmp0_desc, 15, BooleanSerializer_getInstance(), tmp19_local15);\n tmp3_bitMask0 = tmp3_bitMask0 | 32768;\n tmp20_local16 = tmp36_input.bo(tmp0_desc, 16, $serializer_getInstance_18(), tmp20_local16);\n tmp3_bitMask0 = tmp3_bitMask0 | 65536;\n tmp21_local17 = tmp36_input.bo(tmp0_desc, 17, BooleanSerializer_getInstance(), tmp21_local17);\n tmp3_bitMask0 = tmp3_bitMask0 | 131072;\n tmp22_local18 = tmp36_input.bo(tmp0_desc, 18, tmp37_cached[18], tmp22_local18);\n tmp3_bitMask0 = tmp3_bitMask0 | 262144;\n tmp23_local19 = tmp36_input.bo(tmp0_desc, 19, BooleanSerializer_getInstance(), tmp23_local19);\n tmp3_bitMask0 = tmp3_bitMask0 | 524288;\n tmp24_local20 = tmp36_input.bo(tmp0_desc, 20, BooleanSerializer_getInstance(), tmp24_local20);\n tmp3_bitMask0 = tmp3_bitMask0 | 1048576;\n tmp25_local21 = tmp36_input.bo(tmp0_desc, 21, BooleanSerializer_getInstance(), tmp25_local21);\n tmp3_bitMask0 = tmp3_bitMask0 | 2097152;\n tmp26_local22 = tmp36_input.bo(tmp0_desc, 22, $serializer_getInstance_20(), tmp26_local22);\n tmp3_bitMask0 = tmp3_bitMask0 | 4194304;\n tmp27_local23 = tmp36_input.bo(tmp0_desc, 23, MarginTemplateSerializer_getInstance(), tmp27_local23);\n tmp3_bitMask0 = tmp3_bitMask0 | 8388608;\n tmp28_local24 = tmp36_input.bo(tmp0_desc, 24, IntSerializer_getInstance(), tmp28_local24);\n tmp3_bitMask0 = tmp3_bitMask0 | 16777216;\n tmp29_local25 = tmp36_input.bo(tmp0_desc, 25, $serializer_getInstance_21(), tmp29_local25);\n tmp3_bitMask0 = tmp3_bitMask0 | 33554432;\n tmp30_local26 = tmp36_input.bo(tmp0_desc, 26, $serializer_getInstance_19(), tmp30_local26);\n tmp3_bitMask0 = tmp3_bitMask0 | 67108864;\n tmp31_local27 = tmp36_input.bo(tmp0_desc, 27, $serializer_getInstance_13(), tmp31_local27);\n tmp3_bitMask0 = tmp3_bitMask0 | 134217728;\n tmp32_local28 = tmp36_input.bo(tmp0_desc, 28, CustomSerializer_getInstance_1(), tmp32_local28);\n tmp3_bitMask0 = tmp3_bitMask0 | 268435456;\n tmp33_local29 = tmp36_input.bo(tmp0_desc, 29, PositionTemplateSerializer_getInstance(), tmp33_local29);\n tmp3_bitMask0 = tmp3_bitMask0 | 536870912;\n tmp34_local30 = tmp36_input.bo(tmp0_desc, 30, tmp37_cached[30], tmp34_local30);\n tmp3_bitMask0 = tmp3_bitMask0 | 1073741824;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp36_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp36_input.bo(tmp0_desc, 0, tmp37_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp36_input.bo(tmp0_desc, 1, tmp37_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp36_input.bo(tmp0_desc, 2, tmp37_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp36_input.bo(tmp0_desc, 3, $serializer_getInstance_15(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp36_input.bo(tmp0_desc, 4, BooleanSerializer_getInstance(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n case 5:\n tmp9_local5 = tmp36_input.bo(tmp0_desc, 5, BooleanSerializer_getInstance(), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n break;\n case 6:\n tmp10_local6 = tmp36_input.bo(tmp0_desc, 6, BooleanSerializer_getInstance(), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n break;\n case 7:\n tmp11_local7 = tmp36_input.bo(tmp0_desc, 7, tmp37_cached[7], tmp11_local7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n break;\n case 8:\n tmp12_local8 = tmp36_input.bo(tmp0_desc, 8, CustomSerializer_getInstance_0(), tmp12_local8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n break;\n case 9:\n tmp13_local9 = tmp36_input.bo(tmp0_desc, 9, $serializer_getInstance_0(), tmp13_local9);\n tmp3_bitMask0 = tmp3_bitMask0 | 512;\n break;\n case 10:\n tmp14_local10 = tmp36_input.bo(tmp0_desc, 10, BooleanSerializer_getInstance(), tmp14_local10);\n tmp3_bitMask0 = tmp3_bitMask0 | 1024;\n break;\n case 11:\n tmp15_local11 = tmp36_input.bo(tmp0_desc, 11, BooleanSerializer_getInstance(), tmp15_local11);\n tmp3_bitMask0 = tmp3_bitMask0 | 2048;\n break;\n case 12:\n tmp16_local12 = tmp36_input.bo(tmp0_desc, 12, BooleanSerializer_getInstance(), tmp16_local12);\n tmp3_bitMask0 = tmp3_bitMask0 | 4096;\n break;\n case 13:\n tmp17_local13 = tmp36_input.bo(tmp0_desc, 13, BooleanSerializer_getInstance(), tmp17_local13);\n tmp3_bitMask0 = tmp3_bitMask0 | 8192;\n break;\n case 14:\n tmp18_local14 = tmp36_input.bo(tmp0_desc, 14, BooleanSerializer_getInstance(), tmp18_local14);\n tmp3_bitMask0 = tmp3_bitMask0 | 16384;\n break;\n case 15:\n tmp19_local15 = tmp36_input.bo(tmp0_desc, 15, BooleanSerializer_getInstance(), tmp19_local15);\n tmp3_bitMask0 = tmp3_bitMask0 | 32768;\n break;\n case 16:\n tmp20_local16 = tmp36_input.bo(tmp0_desc, 16, $serializer_getInstance_18(), tmp20_local16);\n tmp3_bitMask0 = tmp3_bitMask0 | 65536;\n break;\n case 17:\n tmp21_local17 = tmp36_input.bo(tmp0_desc, 17, BooleanSerializer_getInstance(), tmp21_local17);\n tmp3_bitMask0 = tmp3_bitMask0 | 131072;\n break;\n case 18:\n tmp22_local18 = tmp36_input.bo(tmp0_desc, 18, tmp37_cached[18], tmp22_local18);\n tmp3_bitMask0 = tmp3_bitMask0 | 262144;\n break;\n case 19:\n tmp23_local19 = tmp36_input.bo(tmp0_desc, 19, BooleanSerializer_getInstance(), tmp23_local19);\n tmp3_bitMask0 = tmp3_bitMask0 | 524288;\n break;\n case 20:\n tmp24_local20 = tmp36_input.bo(tmp0_desc, 20, BooleanSerializer_getInstance(), tmp24_local20);\n tmp3_bitMask0 = tmp3_bitMask0 | 1048576;\n break;\n case 21:\n tmp25_local21 = tmp36_input.bo(tmp0_desc, 21, BooleanSerializer_getInstance(), tmp25_local21);\n tmp3_bitMask0 = tmp3_bitMask0 | 2097152;\n break;\n case 22:\n tmp26_local22 = tmp36_input.bo(tmp0_desc, 22, $serializer_getInstance_20(), tmp26_local22);\n tmp3_bitMask0 = tmp3_bitMask0 | 4194304;\n break;\n case 23:\n tmp27_local23 = tmp36_input.bo(tmp0_desc, 23, MarginTemplateSerializer_getInstance(), tmp27_local23);\n tmp3_bitMask0 = tmp3_bitMask0 | 8388608;\n break;\n case 24:\n tmp28_local24 = tmp36_input.bo(tmp0_desc, 24, IntSerializer_getInstance(), tmp28_local24);\n tmp3_bitMask0 = tmp3_bitMask0 | 16777216;\n break;\n case 25:\n tmp29_local25 = tmp36_input.bo(tmp0_desc, 25, $serializer_getInstance_21(), tmp29_local25);\n tmp3_bitMask0 = tmp3_bitMask0 | 33554432;\n break;\n case 26:\n tmp30_local26 = tmp36_input.bo(tmp0_desc, 26, $serializer_getInstance_19(), tmp30_local26);\n tmp3_bitMask0 = tmp3_bitMask0 | 67108864;\n break;\n case 27:\n tmp31_local27 = tmp36_input.bo(tmp0_desc, 27, $serializer_getInstance_13(), tmp31_local27);\n tmp3_bitMask0 = tmp3_bitMask0 | 134217728;\n break;\n case 28:\n tmp32_local28 = tmp36_input.bo(tmp0_desc, 28, CustomSerializer_getInstance_1(), tmp32_local28);\n tmp3_bitMask0 = tmp3_bitMask0 | 268435456;\n break;\n case 29:\n tmp33_local29 = tmp36_input.bo(tmp0_desc, 29, PositionTemplateSerializer_getInstance(), tmp33_local29);\n tmp3_bitMask0 = tmp3_bitMask0 | 536870912;\n break;\n case 30:\n tmp34_local30 = tmp36_input.bo(tmp0_desc, 30, tmp37_cached[30], tmp34_local30);\n tmp3_bitMask0 = tmp3_bitMask0 | 1073741824;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp36_input.on(tmp0_desc);\n return ComponentsTemplate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, tmp16_local12, tmp17_local13, tmp18_local14, tmp19_local15, tmp20_local16, tmp21_local17, tmp22_local18, tmp23_local19, tmp24_local20, tmp25_local21, tmp26_local22, tmp27_local23, tmp28_local24, tmp29_local25, tmp30_local26, tmp31_local27, tmp32_local28, tmp33_local29, tmp34_local30, null);\n };\n protoOf($serializer_12).a44 = function (encoder, value) {\n var tmp0_desc = this.z43_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_26().y43_1;\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !(value.bounds == null)) {\n tmp1_output.gp(tmp0_desc, 0, tmp2_cached[0], value.bounds);\n }\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.functionalZones == null)) {\n tmp1_output.gp(tmp0_desc, 1, tmp2_cached[1], value.functionalZones);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.connectors == null)) {\n tmp1_output.gp(tmp0_desc, 2, tmp2_cached[2], value.connectors);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.assembly == null)) {\n tmp1_output.gp(tmp0_desc, 3, $serializer_getInstance_15(), value.assembly);\n }\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.selectable == null)) {\n tmp1_output.gp(tmp0_desc, 4, BooleanSerializer_getInstance(), value.selectable);\n }\n if (tmp1_output.kp(tmp0_desc, 5) ? true : !(value.outlineable == null)) {\n tmp1_output.gp(tmp0_desc, 5, BooleanSerializer_getInstance(), value.outlineable);\n }\n if (tmp1_output.kp(tmp0_desc, 6) ? true : !(value.draggable == null)) {\n tmp1_output.gp(tmp0_desc, 6, BooleanSerializer_getInstance(), value.draggable);\n }\n if (tmp1_output.kp(tmp0_desc, 7) ? true : !(value.allowedDoorPairs == null)) {\n tmp1_output.gp(tmp0_desc, 7, tmp2_cached[7], value.allowedDoorPairs);\n }\n if (tmp1_output.kp(tmp0_desc, 8) ? true : !(value.autoAdaptHost == null)) {\n tmp1_output.gp(tmp0_desc, 8, CustomSerializer_getInstance_0(), value.autoAdaptHost);\n }\n if (tmp1_output.kp(tmp0_desc, 9) ? true : !(value.communicationSize == null)) {\n tmp1_output.gp(tmp0_desc, 9, $serializer_getInstance_0(), value.communicationSize);\n }\n if (tmp1_output.kp(tmp0_desc, 10) ? true : !(value.door == null)) {\n tmp1_output.gp(tmp0_desc, 10, BooleanSerializer_getInstance(), value.door);\n }\n if (tmp1_output.kp(tmp0_desc, 11) ? true : !(value.doorFront == null)) {\n tmp1_output.gp(tmp0_desc, 11, BooleanSerializer_getInstance(), value.doorFront);\n }\n if (tmp1_output.kp(tmp0_desc, 12) ? true : !(value.handle == null)) {\n tmp1_output.gp(tmp0_desc, 12, BooleanSerializer_getInstance(), value.handle);\n }\n if (tmp1_output.kp(tmp0_desc, 13) ? true : !(value.drawer == null)) {\n tmp1_output.gp(tmp0_desc, 13, BooleanSerializer_getInstance(), value.drawer);\n }\n if (tmp1_output.kp(tmp0_desc, 14) ? true : !(value.frame == null)) {\n tmp1_output.gp(tmp0_desc, 14, BooleanSerializer_getInstance(), value.frame);\n }\n if (tmp1_output.kp(tmp0_desc, 15) ? true : !(value.leg == null)) {\n tmp1_output.gp(tmp0_desc, 15, BooleanSerializer_getInstance(), value.leg);\n }\n if (tmp1_output.kp(tmp0_desc, 16) ? true : !(value.light == null)) {\n tmp1_output.gp(tmp0_desc, 16, $serializer_getInstance_18(), value.light);\n }\n if (tmp1_output.kp(tmp0_desc, 17) ? true : !(value.outlined == null)) {\n tmp1_output.gp(tmp0_desc, 17, BooleanSerializer_getInstance(), value.outlined);\n }\n if (tmp1_output.kp(tmp0_desc, 18) ? true : !(value.meta == null)) {\n tmp1_output.gp(tmp0_desc, 18, tmp2_cached[18], value.meta);\n }\n if (tmp1_output.kp(tmp0_desc, 19) ? true : !(value.propping == null)) {\n tmp1_output.gp(tmp0_desc, 19, BooleanSerializer_getInstance(), value.propping);\n }\n if (tmp1_output.kp(tmp0_desc, 20) ? true : !(value.alwaysHangDown == null)) {\n tmp1_output.gp(tmp0_desc, 20, BooleanSerializer_getInstance(), value.alwaysHangDown);\n }\n if (tmp1_output.kp(tmp0_desc, 21) ? true : !(value.serializeEntity == null)) {\n tmp1_output.gp(tmp0_desc, 21, BooleanSerializer_getInstance(), value.serializeEntity);\n }\n if (tmp1_output.kp(tmp0_desc, 22) ? true : !(value.placementZoneByHeight == null)) {\n tmp1_output.gp(tmp0_desc, 22, $serializer_getInstance_20(), value.placementZoneByHeight);\n }\n if (tmp1_output.kp(tmp0_desc, 23) ? true : !(value.functionalMargin == null)) {\n tmp1_output.gp(tmp0_desc, 23, MarginTemplateSerializer_getInstance(), value.functionalMargin);\n }\n if (tmp1_output.kp(tmp0_desc, 24) ? true : !(value.recommendedInitialPositionFromFloor == null)) {\n tmp1_output.gp(tmp0_desc, 24, IntSerializer_getInstance(), value.recommendedInitialPositionFromFloor);\n }\n if (tmp1_output.kp(tmp0_desc, 25) ? true : !(value.visualLightSource == null)) {\n tmp1_output.gp(tmp0_desc, 25, $serializer_getInstance_21(), value.visualLightSource);\n }\n if (tmp1_output.kp(tmp0_desc, 26) ? true : !(value.model3D == null)) {\n tmp1_output.gp(tmp0_desc, 26, $serializer_getInstance_19(), value.model3D);\n }\n if (tmp1_output.kp(tmp0_desc, 27) ? true : !(value.product == null)) {\n tmp1_output.gp(tmp0_desc, 27, $serializer_getInstance_13(), value.product);\n }\n if (tmp1_output.kp(tmp0_desc, 28) ? true : !(value.dragSurfaces == null)) {\n tmp1_output.gp(tmp0_desc, 28, CustomSerializer_getInstance_1(), value.dragSurfaces);\n }\n if (tmp1_output.kp(tmp0_desc, 29) ? true : !(value.dragProjectionPoint == null)) {\n tmp1_output.gp(tmp0_desc, 29, PositionTemplateSerializer_getInstance(), value.dragProjectionPoint);\n }\n if (tmp1_output.kp(tmp0_desc, 30) ? true : !(value.productStructure == null)) {\n tmp1_output.gp(tmp0_desc, 30, tmp2_cached[30], value.productStructure);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_12).pk = function (encoder, value) {\n return this.a44(encoder, value instanceof ComponentsTemplate ? value : THROW_CCE());\n };\n var $serializer_instance_12;\n function $serializer_getInstance_16() {\n if ($serializer_instance_12 == null)\n new $serializer_12();\n return $serializer_instance_12;\n }\n function ComponentsTemplate_init_$Init$(seen1, bounds, functionalZones, connectors, assembly, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, communicationSize, door, doorFront, handle, drawer, frame, leg, light, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, model3D, product, dragSurfaces, dragProjectionPoint, productStructure, serializationConstructorMarker, $this) {\n if (!(0 === (0 & seen1))) {\n throwMissingFieldException(seen1, 0, $serializer_getInstance_16().z43_1);\n }\n if (0 === (seen1 & 1))\n $this.bounds = null;\n else\n $this.bounds = bounds;\n if (0 === (seen1 & 2))\n $this.functionalZones = null;\n else\n $this.functionalZones = functionalZones;\n if (0 === (seen1 & 4))\n $this.connectors = null;\n else\n $this.connectors = connectors;\n if (0 === (seen1 & 8))\n $this.assembly = null;\n else\n $this.assembly = assembly;\n if (0 === (seen1 & 16))\n $this.selectable = null;\n else\n $this.selectable = selectable;\n if (0 === (seen1 & 32))\n $this.outlineable = null;\n else\n $this.outlineable = outlineable;\n if (0 === (seen1 & 64))\n $this.draggable = null;\n else\n $this.draggable = draggable;\n if (0 === (seen1 & 128))\n $this.allowedDoorPairs = null;\n else\n $this.allowedDoorPairs = allowedDoorPairs;\n if (0 === (seen1 & 256))\n $this.autoAdaptHost = null;\n else\n $this.autoAdaptHost = autoAdaptHost;\n if (0 === (seen1 & 512))\n $this.communicationSize = null;\n else\n $this.communicationSize = communicationSize;\n if (0 === (seen1 & 1024))\n $this.door = null;\n else\n $this.door = door;\n if (0 === (seen1 & 2048))\n $this.doorFront = null;\n else\n $this.doorFront = doorFront;\n if (0 === (seen1 & 4096))\n $this.handle = null;\n else\n $this.handle = handle;\n if (0 === (seen1 & 8192))\n $this.drawer = null;\n else\n $this.drawer = drawer;\n if (0 === (seen1 & 16384))\n $this.frame = null;\n else\n $this.frame = frame;\n if (0 === (seen1 & 32768))\n $this.leg = null;\n else\n $this.leg = leg;\n if (0 === (seen1 & 65536))\n $this.light = null;\n else\n $this.light = light;\n if (0 === (seen1 & 131072))\n $this.outlined = null;\n else\n $this.outlined = outlined;\n if (0 === (seen1 & 262144))\n $this.meta = null;\n else\n $this.meta = meta;\n if (0 === (seen1 & 524288))\n $this.propping = null;\n else\n $this.propping = propping;\n if (0 === (seen1 & 1048576))\n $this.alwaysHangDown = null;\n else\n $this.alwaysHangDown = alwaysHangDown;\n if (0 === (seen1 & 2097152))\n $this.serializeEntity = null;\n else\n $this.serializeEntity = serializeEntity;\n if (0 === (seen1 & 4194304))\n $this.placementZoneByHeight = null;\n else\n $this.placementZoneByHeight = placementZoneByHeight;\n if (0 === (seen1 & 8388608))\n $this.functionalMargin = null;\n else\n $this.functionalMargin = functionalMargin;\n if (0 === (seen1 & 16777216))\n $this.recommendedInitialPositionFromFloor = null;\n else\n $this.recommendedInitialPositionFromFloor = recommendedInitialPositionFromFloor;\n if (0 === (seen1 & 33554432))\n $this.visualLightSource = null;\n else\n $this.visualLightSource = visualLightSource;\n if (0 === (seen1 & 67108864))\n $this.model3D = null;\n else\n $this.model3D = model3D;\n if (0 === (seen1 & 134217728))\n $this.product = null;\n else\n $this.product = product;\n if (0 === (seen1 & 268435456))\n $this.dragSurfaces = null;\n else\n $this.dragSurfaces = dragSurfaces;\n if (0 === (seen1 & 536870912))\n $this.dragProjectionPoint = null;\n else\n $this.dragProjectionPoint = dragProjectionPoint;\n if (0 === (seen1 & 1073741824))\n $this.productStructure = null;\n else\n $this.productStructure = productStructure;\n $this.n3x_1 = 0;\n return $this;\n }\n function ComponentsTemplate_init_$Create$(seen1, bounds, functionalZones, connectors, assembly, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, communicationSize, door, doorFront, handle, drawer, frame, leg, light, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, model3D, product, dragSurfaces, dragProjectionPoint, productStructure, serializationConstructorMarker) {\n return ComponentsTemplate_init_$Init$(seen1, bounds, functionalZones, connectors, assembly, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, communicationSize, door, doorFront, handle, drawer, frame, leg, light, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, model3D, product, dragSurfaces, dragProjectionPoint, productStructure, serializationConstructorMarker, objectCreate(protoOf(ComponentsTemplate)));\n }\n function ComponentsTemplate(bounds, functionalZones, connectors, assembly, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, communicationSize, door, doorFront, handle, drawer, frame, leg, light, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, model3D, product, dragSurfaces, dragProjectionPoint, productStructure) {\n Companion_getInstance_26();\n bounds = bounds === VOID ? null : bounds;\n functionalZones = functionalZones === VOID ? null : functionalZones;\n connectors = connectors === VOID ? null : connectors;\n assembly = assembly === VOID ? null : assembly;\n selectable = selectable === VOID ? null : selectable;\n outlineable = outlineable === VOID ? null : outlineable;\n draggable = draggable === VOID ? null : draggable;\n allowedDoorPairs = allowedDoorPairs === VOID ? null : allowedDoorPairs;\n autoAdaptHost = autoAdaptHost === VOID ? null : autoAdaptHost;\n communicationSize = communicationSize === VOID ? null : communicationSize;\n door = door === VOID ? null : door;\n doorFront = doorFront === VOID ? null : doorFront;\n handle = handle === VOID ? null : handle;\n drawer = drawer === VOID ? null : drawer;\n frame = frame === VOID ? null : frame;\n leg = leg === VOID ? null : leg;\n light = light === VOID ? null : light;\n outlined = outlined === VOID ? null : outlined;\n meta = meta === VOID ? null : meta;\n propping = propping === VOID ? null : propping;\n alwaysHangDown = alwaysHangDown === VOID ? null : alwaysHangDown;\n serializeEntity = serializeEntity === VOID ? null : serializeEntity;\n placementZoneByHeight = placementZoneByHeight === VOID ? null : placementZoneByHeight;\n functionalMargin = functionalMargin === VOID ? null : functionalMargin;\n recommendedInitialPositionFromFloor = recommendedInitialPositionFromFloor === VOID ? null : recommendedInitialPositionFromFloor;\n visualLightSource = visualLightSource === VOID ? null : visualLightSource;\n model3D = model3D === VOID ? null : model3D;\n product = product === VOID ? null : product;\n dragSurfaces = dragSurfaces === VOID ? null : dragSurfaces;\n dragProjectionPoint = dragProjectionPoint === VOID ? null : dragProjectionPoint;\n productStructure = productStructure === VOID ? null : productStructure;\n this.bounds = bounds;\n this.functionalZones = functionalZones;\n this.connectors = connectors;\n this.assembly = assembly;\n this.selectable = selectable;\n this.outlineable = outlineable;\n this.draggable = draggable;\n this.allowedDoorPairs = allowedDoorPairs;\n this.autoAdaptHost = autoAdaptHost;\n this.communicationSize = communicationSize;\n this.door = door;\n this.doorFront = doorFront;\n this.handle = handle;\n this.drawer = drawer;\n this.frame = frame;\n this.leg = leg;\n this.light = light;\n this.outlined = outlined;\n this.meta = meta;\n this.propping = propping;\n this.alwaysHangDown = alwaysHangDown;\n this.serializeEntity = serializeEntity;\n this.placementZoneByHeight = placementZoneByHeight;\n this.functionalMargin = functionalMargin;\n this.recommendedInitialPositionFromFloor = recommendedInitialPositionFromFloor;\n this.visualLightSource = visualLightSource;\n this.model3D = model3D;\n this.product = product;\n this.dragSurfaces = dragSurfaces;\n this.dragProjectionPoint = dragProjectionPoint;\n this.productStructure = productStructure;\n this.n3x_1 = 0;\n }\n protoOf(ComponentsTemplate).b44 = function (_set____db54di) {\n this.bounds = _set____db54di;\n };\n protoOf(ComponentsTemplate).c44 = function () {\n return this.bounds;\n };\n protoOf(ComponentsTemplate).d44 = function (_set____db54di) {\n this.functionalZones = _set____db54di;\n };\n protoOf(ComponentsTemplate).e44 = function () {\n return this.functionalZones;\n };\n protoOf(ComponentsTemplate).f44 = function (_set____db54di) {\n this.connectors = _set____db54di;\n };\n protoOf(ComponentsTemplate).a1y = function () {\n return this.connectors;\n };\n protoOf(ComponentsTemplate).g44 = function (_set____db54di) {\n this.assembly = _set____db54di;\n };\n protoOf(ComponentsTemplate).h44 = function () {\n return this.assembly;\n };\n protoOf(ComponentsTemplate).i44 = function (_set____db54di) {\n this.selectable = _set____db54di;\n };\n protoOf(ComponentsTemplate).j44 = function () {\n return this.selectable;\n };\n protoOf(ComponentsTemplate).k44 = function (_set____db54di) {\n this.outlineable = _set____db54di;\n };\n protoOf(ComponentsTemplate).l44 = function () {\n return this.outlineable;\n };\n protoOf(ComponentsTemplate).m44 = function (_set____db54di) {\n this.draggable = _set____db54di;\n };\n protoOf(ComponentsTemplate).n44 = function () {\n return this.draggable;\n };\n protoOf(ComponentsTemplate).o44 = function (_set____db54di) {\n this.allowedDoorPairs = _set____db54di;\n };\n protoOf(ComponentsTemplate).p44 = function () {\n return this.allowedDoorPairs;\n };\n protoOf(ComponentsTemplate).q44 = function (_set____db54di) {\n this.autoAdaptHost = _set____db54di;\n };\n protoOf(ComponentsTemplate).r44 = function () {\n return this.autoAdaptHost;\n };\n protoOf(ComponentsTemplate).s44 = function (_set____db54di) {\n this.communicationSize = _set____db54di;\n };\n protoOf(ComponentsTemplate).t44 = function () {\n return this.communicationSize;\n };\n protoOf(ComponentsTemplate).u44 = function (_set____db54di) {\n this.door = _set____db54di;\n };\n protoOf(ComponentsTemplate).v44 = function () {\n return this.door;\n };\n protoOf(ComponentsTemplate).w44 = function (_set____db54di) {\n this.doorFront = _set____db54di;\n };\n protoOf(ComponentsTemplate).x44 = function () {\n return this.doorFront;\n };\n protoOf(ComponentsTemplate).y44 = function (_set____db54di) {\n this.handle = _set____db54di;\n };\n protoOf(ComponentsTemplate).z44 = function () {\n return this.handle;\n };\n protoOf(ComponentsTemplate).a45 = function (_set____db54di) {\n this.drawer = _set____db54di;\n };\n protoOf(ComponentsTemplate).b45 = function () {\n return this.drawer;\n };\n protoOf(ComponentsTemplate).c45 = function (_set____db54di) {\n this.frame = _set____db54di;\n };\n protoOf(ComponentsTemplate).d45 = function () {\n return this.frame;\n };\n protoOf(ComponentsTemplate).e45 = function (_set____db54di) {\n this.leg = _set____db54di;\n };\n protoOf(ComponentsTemplate).f45 = function () {\n return this.leg;\n };\n protoOf(ComponentsTemplate).g45 = function (_set____db54di) {\n this.light = _set____db54di;\n };\n protoOf(ComponentsTemplate).h45 = function () {\n return this.light;\n };\n protoOf(ComponentsTemplate).i45 = function (_set____db54di) {\n this.outlined = _set____db54di;\n };\n protoOf(ComponentsTemplate).j45 = function () {\n return this.outlined;\n };\n protoOf(ComponentsTemplate).k45 = function (_set____db54di) {\n this.meta = _set____db54di;\n };\n protoOf(ComponentsTemplate).z3x = function () {\n return this.meta;\n };\n protoOf(ComponentsTemplate).l45 = function (_set____db54di) {\n this.propping = _set____db54di;\n };\n protoOf(ComponentsTemplate).z3e = function () {\n return this.propping;\n };\n protoOf(ComponentsTemplate).m45 = function (_set____db54di) {\n this.alwaysHangDown = _set____db54di;\n };\n protoOf(ComponentsTemplate).n45 = function () {\n return this.alwaysHangDown;\n };\n protoOf(ComponentsTemplate).o45 = function (_set____db54di) {\n this.serializeEntity = _set____db54di;\n };\n protoOf(ComponentsTemplate).p45 = function () {\n return this.serializeEntity;\n };\n protoOf(ComponentsTemplate).q45 = function (_set____db54di) {\n this.placementZoneByHeight = _set____db54di;\n };\n protoOf(ComponentsTemplate).r45 = function () {\n return this.placementZoneByHeight;\n };\n protoOf(ComponentsTemplate).s45 = function (_set____db54di) {\n this.functionalMargin = _set____db54di;\n };\n protoOf(ComponentsTemplate).t45 = function () {\n return this.functionalMargin;\n };\n protoOf(ComponentsTemplate).u45 = function (_set____db54di) {\n this.recommendedInitialPositionFromFloor = _set____db54di;\n };\n protoOf(ComponentsTemplate).v45 = function () {\n return this.recommendedInitialPositionFromFloor;\n };\n protoOf(ComponentsTemplate).w45 = function (_set____db54di) {\n this.visualLightSource = _set____db54di;\n };\n protoOf(ComponentsTemplate).x45 = function () {\n return this.visualLightSource;\n };\n protoOf(ComponentsTemplate).y45 = function (_set____db54di) {\n this.model3D = _set____db54di;\n };\n protoOf(ComponentsTemplate).z45 = function () {\n return this.model3D;\n };\n protoOf(ComponentsTemplate).a46 = function (_set____db54di) {\n this.product = _set____db54di;\n };\n protoOf(ComponentsTemplate).n42 = function () {\n return this.product;\n };\n protoOf(ComponentsTemplate).b46 = function (_set____db54di) {\n this.dragSurfaces = _set____db54di;\n };\n protoOf(ComponentsTemplate).c46 = function () {\n return this.dragSurfaces;\n };\n protoOf(ComponentsTemplate).d46 = function (_set____db54di) {\n this.dragProjectionPoint = _set____db54di;\n };\n protoOf(ComponentsTemplate).e46 = function () {\n return this.dragProjectionPoint;\n };\n protoOf(ComponentsTemplate).f46 = function (_set____db54di) {\n this.productStructure = _set____db54di;\n };\n protoOf(ComponentsTemplate).g46 = function () {\n return this.productStructure;\n };\n protoOf(ComponentsTemplate).inherit = function (extendedComponents) {\n var tmp0_safe_receiver = this.bounds;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : inherit(tmp0_safe_receiver, extendedComponents.bounds);\n var tmp = tmp1_elvis_lhs == null ? extendedComponents.bounds : tmp1_elvis_lhs;\n var tmp2_safe_receiver = this.functionalZones;\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : inherit(tmp2_safe_receiver, extendedComponents.functionalZones);\n var tmp_0 = tmp3_elvis_lhs == null ? extendedComponents.functionalZones : tmp3_elvis_lhs;\n var tmp4_safe_receiver = this.connectors;\n var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : inherit_0(tmp4_safe_receiver, extendedComponents.connectors);\n var tmp_1 = tmp5_elvis_lhs == null ? extendedComponents.connectors : tmp5_elvis_lhs;\n var tmp6_safe_receiver = this.assembly;\n var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.inherit(extendedComponents.assembly);\n var tmp_2 = tmp7_elvis_lhs == null ? extendedComponents.assembly : tmp7_elvis_lhs;\n var tmp8_elvis_lhs = this.selectable;\n var tmp_3 = tmp8_elvis_lhs == null ? extendedComponents.selectable : tmp8_elvis_lhs;\n var tmp9_elvis_lhs = this.outlineable;\n var tmp_4 = tmp9_elvis_lhs == null ? extendedComponents.outlineable : tmp9_elvis_lhs;\n var tmp10_elvis_lhs = this.draggable;\n var tmp_5 = tmp10_elvis_lhs == null ? extendedComponents.draggable : tmp10_elvis_lhs;\n var tmp11_elvis_lhs = this.allowedDoorPairs;\n var tmp_6 = tmp11_elvis_lhs == null ? extendedComponents.allowedDoorPairs : tmp11_elvis_lhs;\n var tmp12_elvis_lhs = this.autoAdaptHost;\n var tmp_7 = tmp12_elvis_lhs == null ? extendedComponents.autoAdaptHost : tmp12_elvis_lhs;\n var tmp13_elvis_lhs = this.communicationSize;\n var tmp_8 = tmp13_elvis_lhs == null ? extendedComponents.communicationSize : tmp13_elvis_lhs;\n var tmp14_elvis_lhs = this.door;\n var tmp_9 = tmp14_elvis_lhs == null ? extendedComponents.door : tmp14_elvis_lhs;\n var tmp15_elvis_lhs = this.doorFront;\n var tmp_10 = tmp15_elvis_lhs == null ? extendedComponents.doorFront : tmp15_elvis_lhs;\n var tmp16_elvis_lhs = this.handle;\n var tmp_11 = tmp16_elvis_lhs == null ? extendedComponents.handle : tmp16_elvis_lhs;\n var tmp17_elvis_lhs = this.drawer;\n var tmp_12 = tmp17_elvis_lhs == null ? extendedComponents.drawer : tmp17_elvis_lhs;\n var tmp18_elvis_lhs = this.frame;\n var tmp_13 = tmp18_elvis_lhs == null ? extendedComponents.frame : tmp18_elvis_lhs;\n var tmp19_elvis_lhs = this.leg;\n var tmp_14 = tmp19_elvis_lhs == null ? extendedComponents.leg : tmp19_elvis_lhs;\n var tmp20_elvis_lhs = this.light;\n var tmp_15 = tmp20_elvis_lhs == null ? extendedComponents.light : tmp20_elvis_lhs;\n var tmp21_elvis_lhs = this.outlined;\n var tmp_16 = tmp21_elvis_lhs == null ? extendedComponents.outlined : tmp21_elvis_lhs;\n var tmp_17 = Companion_getInstance_26().extendMeta(this.meta, extendedComponents.meta);\n var tmp22_elvis_lhs = this.propping;\n var tmp_18 = tmp22_elvis_lhs == null ? extendedComponents.propping : tmp22_elvis_lhs;\n var tmp23_elvis_lhs = this.alwaysHangDown;\n var tmp_19 = tmp23_elvis_lhs == null ? extendedComponents.alwaysHangDown : tmp23_elvis_lhs;\n var tmp24_elvis_lhs = this.serializeEntity;\n var tmp_20 = tmp24_elvis_lhs == null ? extendedComponents.serializeEntity : tmp24_elvis_lhs;\n var tmp25_elvis_lhs = this.placementZoneByHeight;\n var tmp_21 = tmp25_elvis_lhs == null ? extendedComponents.placementZoneByHeight : tmp25_elvis_lhs;\n var tmp26_elvis_lhs = this.functionalMargin;\n var tmp_22 = tmp26_elvis_lhs == null ? extendedComponents.functionalMargin : tmp26_elvis_lhs;\n var tmp27_elvis_lhs = this.recommendedInitialPositionFromFloor;\n var tmp_23 = tmp27_elvis_lhs == null ? extendedComponents.recommendedInitialPositionFromFloor : tmp27_elvis_lhs;\n var tmp28_elvis_lhs = this.visualLightSource;\n var tmp_24 = tmp28_elvis_lhs == null ? extendedComponents.visualLightSource : tmp28_elvis_lhs;\n var tmp29_elvis_lhs = this.dragSurfaces;\n var tmp_25 = tmp29_elvis_lhs == null ? extendedComponents.dragSurfaces : tmp29_elvis_lhs;\n var tmp30_elvis_lhs = this.dragProjectionPoint;\n return new ComponentsTemplate(tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, tmp_11, tmp_12, tmp_13, tmp_14, tmp_15, tmp_16, tmp_17, tmp_18, tmp_19, tmp_20, tmp_21, tmp_22, tmp_23, tmp_24, VOID, VOID, tmp_25, tmp30_elvis_lhs == null ? extendedComponents.dragProjectionPoint : tmp30_elvis_lhs);\n };\n protoOf(ComponentsTemplate).equals = function (other) {\n return other === this;\n };\n protoOf(ComponentsTemplate).hashCode = function () {\n if (this.n3x_1 === 0) {\n var tmp = this;\n var tmp2_safe_receiver = this.communicationSize;\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hashCode();\n var tmp_0 = tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs;\n var tmp0_safe_receiver = this.product;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hashCode();\n tmp.n3x_1 = (tmp_0 + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0) + 1 | 0;\n }\n return this.n3x_1;\n };\n protoOf(ComponentsTemplate).getPolyhedronForSize = function (size) {\n var tmp0_safe_receiver = this.bounds;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : getPolyhedronForSize(tmp0_safe_receiver, size);\n return tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ye_1;\n };\n protoOf(ComponentsTemplate).af = function () {\n return this.bounds;\n };\n protoOf(ComponentsTemplate).bf = function () {\n return this.functionalZones;\n };\n protoOf(ComponentsTemplate).g1k = function () {\n return this.connectors;\n };\n protoOf(ComponentsTemplate).h1k = function () {\n return this.assembly;\n };\n protoOf(ComponentsTemplate).i1k = function () {\n return this.selectable;\n };\n protoOf(ComponentsTemplate).j1k = function () {\n return this.outlineable;\n };\n protoOf(ComponentsTemplate).k1k = function () {\n return this.draggable;\n };\n protoOf(ComponentsTemplate).p1z = function () {\n return this.allowedDoorPairs;\n };\n protoOf(ComponentsTemplate).q1z = function () {\n return this.autoAdaptHost;\n };\n protoOf(ComponentsTemplate).r1z = function () {\n return this.communicationSize;\n };\n protoOf(ComponentsTemplate).s1z = function () {\n return this.door;\n };\n protoOf(ComponentsTemplate).t1z = function () {\n return this.doorFront;\n };\n protoOf(ComponentsTemplate).s21 = function () {\n return this.handle;\n };\n protoOf(ComponentsTemplate).t21 = function () {\n return this.drawer;\n };\n protoOf(ComponentsTemplate).h46 = function () {\n return this.frame;\n };\n protoOf(ComponentsTemplate).i46 = function () {\n return this.leg;\n };\n protoOf(ComponentsTemplate).j46 = function () {\n return this.light;\n };\n protoOf(ComponentsTemplate).k46 = function () {\n return this.outlined;\n };\n protoOf(ComponentsTemplate).l46 = function () {\n return this.meta;\n };\n protoOf(ComponentsTemplate).m46 = function () {\n return this.propping;\n };\n protoOf(ComponentsTemplate).n46 = function () {\n return this.alwaysHangDown;\n };\n protoOf(ComponentsTemplate).o46 = function () {\n return this.serializeEntity;\n };\n protoOf(ComponentsTemplate).p46 = function () {\n return this.placementZoneByHeight;\n };\n protoOf(ComponentsTemplate).q46 = function () {\n return this.functionalMargin;\n };\n protoOf(ComponentsTemplate).r46 = function () {\n return this.recommendedInitialPositionFromFloor;\n };\n protoOf(ComponentsTemplate).s46 = function () {\n return this.visualLightSource;\n };\n protoOf(ComponentsTemplate).t46 = function () {\n return this.model3D;\n };\n protoOf(ComponentsTemplate).u46 = function () {\n return this.product;\n };\n protoOf(ComponentsTemplate).v46 = function () {\n return this.dragSurfaces;\n };\n protoOf(ComponentsTemplate).w46 = function () {\n return this.dragProjectionPoint;\n };\n protoOf(ComponentsTemplate).x46 = function () {\n return this.productStructure;\n };\n protoOf(ComponentsTemplate).y46 = function (bounds, functionalZones, connectors, assembly, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, communicationSize, door, doorFront, handle, drawer, frame, leg, light, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, model3D, product, dragSurfaces, dragProjectionPoint, productStructure) {\n return new ComponentsTemplate(bounds, functionalZones, connectors, assembly, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, communicationSize, door, doorFront, handle, drawer, frame, leg, light, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, model3D, product, dragSurfaces, dragProjectionPoint, productStructure);\n };\n protoOf(ComponentsTemplate).copy = function (bounds, functionalZones, connectors, assembly, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, communicationSize, door, doorFront, handle, drawer, frame, leg, light, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, model3D, product, dragSurfaces, dragProjectionPoint, productStructure, $super) {\n bounds = bounds === VOID ? this.bounds : bounds;\n functionalZones = functionalZones === VOID ? this.functionalZones : functionalZones;\n connectors = connectors === VOID ? this.connectors : connectors;\n assembly = assembly === VOID ? this.assembly : assembly;\n selectable = selectable === VOID ? this.selectable : selectable;\n outlineable = outlineable === VOID ? this.outlineable : outlineable;\n draggable = draggable === VOID ? this.draggable : draggable;\n allowedDoorPairs = allowedDoorPairs === VOID ? this.allowedDoorPairs : allowedDoorPairs;\n autoAdaptHost = autoAdaptHost === VOID ? this.autoAdaptHost : autoAdaptHost;\n communicationSize = communicationSize === VOID ? this.communicationSize : communicationSize;\n door = door === VOID ? this.door : door;\n doorFront = doorFront === VOID ? this.doorFront : doorFront;\n handle = handle === VOID ? this.handle : handle;\n drawer = drawer === VOID ? this.drawer : drawer;\n frame = frame === VOID ? this.frame : frame;\n leg = leg === VOID ? this.leg : leg;\n light = light === VOID ? this.light : light;\n outlined = outlined === VOID ? this.outlined : outlined;\n meta = meta === VOID ? this.meta : meta;\n propping = propping === VOID ? this.propping : propping;\n alwaysHangDown = alwaysHangDown === VOID ? this.alwaysHangDown : alwaysHangDown;\n serializeEntity = serializeEntity === VOID ? this.serializeEntity : serializeEntity;\n placementZoneByHeight = placementZoneByHeight === VOID ? this.placementZoneByHeight : placementZoneByHeight;\n functionalMargin = functionalMargin === VOID ? this.functionalMargin : functionalMargin;\n recommendedInitialPositionFromFloor = recommendedInitialPositionFromFloor === VOID ? this.recommendedInitialPositionFromFloor : recommendedInitialPositionFromFloor;\n visualLightSource = visualLightSource === VOID ? this.visualLightSource : visualLightSource;\n model3D = model3D === VOID ? this.model3D : model3D;\n product = product === VOID ? this.product : product;\n dragSurfaces = dragSurfaces === VOID ? this.dragSurfaces : dragSurfaces;\n dragProjectionPoint = dragProjectionPoint === VOID ? this.dragProjectionPoint : dragProjectionPoint;\n productStructure = productStructure === VOID ? this.productStructure : productStructure;\n return this.y46(bounds, functionalZones, connectors, assembly, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, communicationSize, door, doorFront, handle, drawer, frame, leg, light, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, model3D, product, dragSurfaces, dragProjectionPoint, productStructure);\n };\n protoOf(ComponentsTemplate).toString = function () {\n return 'ComponentsTemplate(bounds=' + toString(this.bounds) + ', functionalZones=' + toString(this.functionalZones) + ', connectors=' + toString(this.connectors) + ', assembly=' + this.assembly + ', selectable=' + this.selectable + ', outlineable=' + this.outlineable + ', draggable=' + this.draggable + ', allowedDoorPairs=' + toString(this.allowedDoorPairs) + ', autoAdaptHost=' + this.autoAdaptHost + ', communicationSize=' + this.communicationSize + ', door=' + this.door + ', doorFront=' + this.doorFront + ', handle=' + this.handle + ', drawer=' + this.drawer + ', frame=' + this.frame + ', leg=' + this.leg + ', light=' + this.light + ', outlined=' + this.outlined + ', meta=' + this.meta + ', propping=' + this.propping + ', alwaysHangDown=' + this.alwaysHangDown + ', serializeEntity=' + this.serializeEntity + ', placementZoneByHeight=' + this.placementZoneByHeight + ', functionalMargin=' + this.functionalMargin + ', recommendedInitialPositionFromFloor=' + this.recommendedInitialPositionFromFloor + ', visualLightSource=' + this.visualLightSource + ', model3D=' + this.model3D + ', product=' + this.product + ', dragSurfaces=' + this.dragSurfaces + ', dragProjectionPoint=' + this.dragProjectionPoint + ', productStructure=' + toString(this.productStructure) + ')';\n };\n function ConnectorItemTemplate$Companion$descriptor$lambda($this$buildClassSerialDescriptor) {\n $this$buildClassSerialDescriptor.cl('name', PrimitiveSerialDescriptor('name', STRING_getInstance()));\n $this$buildClassSerialDescriptor.cl('type', PrimitiveSerialDescriptor('type', STRING_getInstance()));\n $this$buildClassSerialDescriptor.cl('position', PositionTemplateSerializer_getInstance().a47_1);\n $this$buildClassSerialDescriptor.cl('lastPosition', PositionTemplateSerializer_getInstance().a47_1);\n $this$buildClassSerialDescriptor.cl('spacing', PrimitiveSerialDescriptor('type', STRING_getInstance()));\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer = serializer(StringCompanionObject_instance);\n var tmp$ret$0 = ArraySerializer(PrimitiveClasses_getInstance().u7(), elementSerializer);\n $this$buildClassSerialDescriptor.cl('offers', tmp$ret$0.ok());\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer_0 = serializer(StringCompanionObject_instance);\n var tmp$ret$1 = ArraySerializer(PrimitiveClasses_getInstance().u7(), elementSerializer_0);\n $this$buildClassSerialDescriptor.cl('demands', tmp$ret$1.ok());\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer_1 = serializer(StringCompanionObject_instance);\n var tmp$ret$2 = ArraySerializer(PrimitiveClasses_getInstance().u7(), elementSerializer_1);\n $this$buildClassSerialDescriptor.cl('tags', tmp$ret$2.ok());\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer_2 = PositionTemplateSerializer_getInstance().l17();\n var tmp$ret$3 = ArraySerializer(getKClass(PositionTemplate), elementSerializer_2);\n $this$buildClassSerialDescriptor.cl('vertices', tmp$ret$3.ok());\n $this$buildClassSerialDescriptor.cl('required', PrimitiveSerialDescriptor('required', BOOLEAN_getInstance()));\n $this$buildClassSerialDescriptor.cl('priority', PrimitiveSerialDescriptor('priority', INT_getInstance()));\n $this$buildClassSerialDescriptor.cl('activationDistance', PrimitiveSerialDescriptor('activationDistance', INT_getInstance()));\n $this$buildClassSerialDescriptor.cl('requireUpwardParent', PrimitiveSerialDescriptor('requireUpwardParent', BOOLEAN_getInstance()));\n $this$buildClassSerialDescriptor.cl('requireDownwardParent', PrimitiveSerialDescriptor('requireDownwardParent', BOOLEAN_getInstance()));\n $this$buildClassSerialDescriptor.cl('rotationDegreeOfFreedom', PrimitiveSerialDescriptor('type', STRING_getInstance()));\n return Unit_instance;\n }\n function _get_allPositions__bakiw2($this) {\n return $this.l3y_1;\n }\n function _get_firstPosition__de1tzc($this) {\n return $this.m3y_1;\n }\n function createConnector($this, type, size) {\n var tmp5_key = $this.name;\n var tmp6_transform = new Transform(Companion_getInstance_3().ZERO, _get_firstPosition__de1tzc($this).rotation);\n var tmp1_safe_receiver = $this.activationDistance;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;\n var tmp;\n if (tmp2_elvis_lhs == null) {\n var tmp_0;\n if (type === 1) {\n tmp_0 = 0.0;\n } else {\n tmp_0 = 200.0;\n }\n tmp = tmp_0;\n } else {\n tmp = tmp2_elvis_lhs;\n }\n var tmp7_activationDistance = tmp;\n var tmp0_elvis_lhs = $this.priority;\n var tmp8_priority = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;\n // Inline function 'kotlin.text.uppercase' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp3_subject = $this.rotationDegreeOfFreedom.toUpperCase();\n var tmp_1;\n if (tmp3_subject === RotationDegreeOfFreedom_NONE_getInstance().toString()) {\n tmp_1 = RotationDegreeOfFreedom_NONE_getInstance().x9_1;\n } else if (tmp3_subject === RotationDegreeOfFreedom_ONE_getInstance().toString()) {\n tmp_1 = RotationDegreeOfFreedom_ONE_getInstance().x9_1;\n } else {\n throw new NotImplementedError($this.rotationDegreeOfFreedom);\n }\n var tmp9_rotationalDegreeOfFreedom = tmp_1;\n var tmp4_elvis_lhs = $this.required;\n var tmp10_required = tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs;\n var pointConnector = new PointConnector(tmp5_key, type, tmp6_transform, tmp8_priority, tmp7_activationDistance, VOID, VOID, VOID, VOID, VOID, tmp9_rotationalDegreeOfFreedom, tmp10_required);\n return createRepositionedConnector($this, pointConnector, size);\n }\n function createSeriesConnector($this, type, size) {\n var tmp = Companion_getInstance_3().ZERO;\n var tmp_0 = Companion_getInstance_3().UP;\n var tmp_1 = _get_firstPosition__de1tzc($this).absoluteTransform.rotation;\n var tmp0_elvis_lhs = $this.priority;\n var tmp_2 = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;\n var tmp1_safe_receiver = $this.activationDistance;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;\n var tmp_3;\n if (tmp2_elvis_lhs == null) {\n var tmp_4;\n if (type === 1) {\n tmp_4 = 0.0;\n } else {\n tmp_4 = 200.0;\n }\n tmp_3 = tmp_4;\n } else {\n tmp_3 = tmp2_elvis_lhs;\n }\n var tmp_5 = tmp_3;\n var tmp_6 = ensureNotNull($this.spacing);\n var tmp3_elvis_lhs = $this.required;\n var seriesConnector = new PointSeriesConnector($this.name, type, tmp, tmp_0, tmp_1, tmp_2, tmp_5, VOID, VOID, VOID, VOID, VOID, tmp_6, tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs);\n return createRepositionedConnector($this, seriesConnector, size);\n }\n function createEdgeConnector($this, type, size) {\n var tmp = Companion_getInstance_3().ZERO;\n var tmp_0 = Companion_getInstance_3().UP;\n var tmp_1 = _get_firstPosition__de1tzc($this).absoluteTransform.rotation;\n var tmp0_elvis_lhs = $this.priority;\n var tmp_2 = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;\n var tmp1_safe_receiver = $this.activationDistance;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;\n var tmp_3;\n if (tmp2_elvis_lhs == null) {\n var tmp_4;\n if (type === 1) {\n tmp_4 = 0.0;\n } else {\n tmp_4 = 200.0;\n }\n tmp_3 = tmp_4;\n } else {\n tmp_3 = tmp2_elvis_lhs;\n }\n var tmp_5 = tmp_3;\n var tmp3_elvis_lhs = $this.required;\n var edgeConnector = new EdgeConnector($this.name, type, tmp, tmp_0, tmp_1, tmp_2, tmp_5, VOID, VOID, VOID, VOID, tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs);\n return createRepositionedConnector($this, edgeConnector, size);\n }\n function createSurfaceConnector($this, type, size) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = _get_allPositions__bakiw2($this);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.ConnectorItemTemplate.createSurfaceConnector.' call\n if (!element.rotation.equals(Companion_getInstance_2().IDENTITY)) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n if (tmp$ret$1) {\n var tmp = Companion_getInstance_27().logger;\n tmp.warn(ConnectorItemTemplate$createSurfaceConnector$lambda);\n }\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = [Companion_getInstance_3().LEFT, Companion_getInstance_3().UP, Companion_getInstance_3().RIGHT];\n var tmp0_elvis_lhs = $this.priority;\n var tmp_1 = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;\n var tmp1_safe_receiver = $this.activationDistance;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;\n var tmp_2;\n if (tmp2_elvis_lhs == null) {\n var tmp_3;\n if (type === 1) {\n tmp_3 = 0.0;\n } else {\n tmp_3 = 200.0;\n }\n tmp_2 = tmp_3;\n } else {\n tmp_2 = tmp2_elvis_lhs;\n }\n var tmp_4 = tmp_2;\n var tmp3_elvis_lhs = $this.required;\n var surfaceConnector = new SurfaceConnector($this.name, type, tmp_0, tmp_1, tmp_4, VOID, VOID, VOID, VOID, tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs);\n var tmp_5 = createRepositionedConnector($this, surfaceConnector, size);\n var tmp4_elvis_lhs = tmp_5 instanceof SurfaceConnector ? tmp_5 : null;\n var tmp_6;\n if (tmp4_elvis_lhs == null) {\n var message = 'A surface connector cannot not magically transform itself to a non SurfaceConnector';\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n tmp_6 = tmp4_elvis_lhs;\n }\n surfaceConnector = tmp_6;\n if (surfaceConnector.vertices.length > 3) {\n var vertices = surfaceConnector.vertices;\n var plane = Companion_instance_2.createFromPoints(vertices[0], vertices[1], vertices[2]);\n var inductionVariable_0 = 3;\n var last_0 = _get_allPositions__bakiw2($this).length;\n if (inductionVariable_0 < last_0)\n do {\n var i = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n var point = vertices[i];\n if (!plane.contains(point, 0.1)) {\n var tmp_7 = Companion_getInstance_27().logger;\n tmp_7.error(ConnectorItemTemplate$createSurfaceConnector$lambda_0(vertices, plane, point));\n }\n }\n while (inductionVariable_0 < last_0);\n }\n return surfaceConnector;\n }\n function createRepositionedConnector($this, connector, size) {\n var relativeConnectorInfo = $this.createRelativeConnectorData(size);\n var aabbFromSize = Companion_getInstance_0().fromSize(size.vector);\n return RelativeConnectorRepositioner_instance.repositionConnector(connector, relativeConnectorInfo, aabbFromSize);\n }\n function addTags($this, connector, tags) {\n if (tags == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tags.length;\n while (inductionVariable < last) {\n var element = tags[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.ConnectorItemTemplate.addTags.' call\n connector.withTag(element);\n }\n }\n }\n function addConnectorTags($this, connector, comSize, family, templateRef) {\n var tmp0_safe_receiver = $this.demands;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.ConnectorItemTemplate.addConnectorTags.' call\n connector.setDemands(convertMagicLabels($this, tmp0_safe_receiver, comSize, family, templateRef).slice());\n }\n var tmp1_safe_receiver = $this.offers;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.ConnectorItemTemplate.addConnectorTags.' call\n connector.setOffers(convertMagicLabels($this, tmp1_safe_receiver, comSize, family, templateRef).slice());\n }\n if (!($this.requireUpwardParent == null) ? $this.requireUpwardParent : false) {\n connector.withTag('requireUpwardParent');\n }\n if (!($this.requireDownwardParent == null) ? $this.requireDownwardParent : false) {\n connector.withTag('requireDownwardParent');\n }\n return connector;\n }\n function convertMagicLabels($this, labels, comSize, family, templateRef) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = labels.length;\n while (inductionVariable < last) {\n var element = labels[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.range.dynamic.template.ConnectorItemTemplate.convertMagicLabels.' call\n switch (element) {\n case 'surface':\n var tmp$ret$0 = null;\n break;\n case 'family':\n tmp$ret$0 = 'family:' + family;\n break;\n case 'id':\n tmp$ret$0 = 'id:' + templateRef;\n break;\n case 'w':\n tmp$ret$0 = 'w:' + numberToInt(comSize.s2e_1);\n break;\n case 'h':\n tmp$ret$0 = 'h:' + numberToInt(comSize.t2e_1);\n break;\n case 'd':\n tmp$ret$0 = 'd:' + numberToInt(comSize.u2e_1);\n break;\n default:\n tmp$ret$0 = element;\n break;\n }\n var tmp0_safe_receiver = tmp$ret$0;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n return copyToArray(destination);\n }\n function Companion_21() {\n Companion_instance_26 = this;\n this.logger = LoggerState_getInstance().m1m('ConnectorItemTemplate');\n var tmp = this;\n tmp.d47_1 = buildClassSerialDescriptor('ConnectorItemTemplate', [], ConnectorItemTemplate$Companion$descriptor$lambda);\n }\n protoOf(Companion_21).x1i = function () {\n return this.logger;\n };\n protoOf(Companion_21).ok = function () {\n return this.d47_1;\n };\n protoOf(Companion_21).qk = function (decoder) {\n // Inline function 'kotlinx.serialization.encoding.decodeStructure' call\n var descriptor = this.d47_1;\n var composite = decoder.nn(descriptor);\n // Inline function 'com.ikea.range.dynamic.template.Companion.deserialize.' call\n var name = '';\n var type = 'internal';\n var position = PositionTemplateSerializer_getInstance().IDENTITY;\n var lastPosition = null;\n var spacing = null;\n var offers = null;\n var demands = null;\n var tags = null;\n var vertices = null;\n var required = false;\n var priority = null;\n var activationDistance = null;\n var requireUpwardParent = false;\n var requireDownwardParent = false;\n var rotationDegreeOfFreedom = RotationDegreeOfFreedom_NONE_getInstance().toString();\n loop: while (true) {\n var index = composite.eo(Companion_getInstance_27().d47_1);\n if (index === 0)\n name = composite.xn(Companion_getInstance_27().d47_1, 0);\n else {\n if (index === 1)\n type = composite.xn(Companion_getInstance_27().d47_1, 1);\n else {\n if (index === 2)\n position = composite.ao(Companion_getInstance_27().d47_1, 2, PositionTemplateSerializer_getInstance().l17());\n else {\n if (index === 3)\n lastPosition = composite.ao(Companion_getInstance_27().d47_1, 3, PositionTemplateSerializer_getInstance().l17());\n else {\n if (index === 4)\n spacing = composite.vn(Companion_getInstance_27().d47_1, 4);\n else {\n if (index === 5) {\n var tmp = Companion_getInstance_27().d47_1;\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer = serializer(StringCompanionObject_instance);\n var tmp$ret$0 = ArraySerializer(PrimitiveClasses_getInstance().u7(), elementSerializer);\n offers = composite.ao(tmp, 5, tmp$ret$0);\n } else {\n if (index === 6) {\n var tmp_0 = Companion_getInstance_27().d47_1;\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer_0 = serializer(StringCompanionObject_instance);\n var tmp$ret$1 = ArraySerializer(PrimitiveClasses_getInstance().u7(), elementSerializer_0);\n demands = composite.ao(tmp_0, 6, tmp$ret$1);\n } else {\n if (index === 7) {\n var tmp_1 = Companion_getInstance_27().d47_1;\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer_1 = serializer(StringCompanionObject_instance);\n var tmp$ret$2 = ArraySerializer(PrimitiveClasses_getInstance().u7(), elementSerializer_1);\n tags = composite.ao(tmp_1, 7, tmp$ret$2);\n } else {\n if (index === 8) {\n var tmp_2 = Companion_getInstance_27().d47_1;\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer_2 = PositionTemplateSerializer_getInstance().l17();\n var tmp$ret$3 = ArraySerializer(getKClass(PositionTemplate), elementSerializer_2);\n vertices = composite.ao(tmp_2, 8, tmp$ret$3);\n } else {\n if (index === 9)\n required = composite.pn(Companion_getInstance_27().d47_1, 9);\n else {\n if (index === 10)\n priority = composite.sn(Companion_getInstance_27().d47_1, 10);\n else {\n if (index === 11)\n activationDistance = composite.sn(Companion_getInstance_27().d47_1, 11);\n else {\n if (index === 12)\n requireUpwardParent = composite.pn(Companion_getInstance_27().d47_1, 12);\n else {\n if (index === 13)\n requireDownwardParent = composite.pn(Companion_getInstance_27().d47_1, 13);\n else {\n if (index === 14)\n rotationDegreeOfFreedom = composite.xn(Companion_getInstance_27().d47_1, 14);\n else {\n if (index === -1)\n break loop;\n else {\n var message = 'Unexpected index: ' + index;\n throw IllegalStateException_init_$Create$(toString(message));\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n var result = new ConnectorItemTemplate(lastPosition, name, position, vertices, priority, spacing, activationDistance, tags, demands, offers, type, VOID, VOID, required, requireUpwardParent, requireDownwardParent, VOID, rotationDegreeOfFreedom);\n composite.on(descriptor);\n return result;\n };\n protoOf(Companion_21).e47 = function (encoder, value) {\n var enc = encoder.nn(this.d47_1);\n enc.cp(this.d47_1, 0, value.name);\n enc.cp(this.d47_1, 1, value.type);\n if (value.vertices == null) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var it = value.position;\n enc.ep(Companion_getInstance_27().d47_1, 2, PositionTemplateSerializer_getInstance().l17(), it);\n var tmp0_safe_receiver = value.lastPosition;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n enc.ep(Companion_getInstance_27().d47_1, 3, PositionTemplateSerializer_getInstance().l17(), tmp0_safe_receiver);\n }\n if (value.spacing == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp;\n if (value.spacing > 0.0) {\n enc.ap(Companion_getInstance_27().d47_1, 4, value.spacing);\n tmp = Unit_instance;\n }\n }\n }\n var tmp2_safe_receiver = value.offers;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0 = Companion_getInstance_27().d47_1;\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer = serializer(StringCompanionObject_instance);\n var tmp$ret$3 = ArraySerializer(PrimitiveClasses_getInstance().u7(), elementSerializer);\n enc.ep(tmp_0, 5, tmp$ret$3, tmp2_safe_receiver);\n }\n var tmp3_safe_receiver = value.demands;\n if (tmp3_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_1 = Companion_getInstance_27().d47_1;\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer_0 = serializer(StringCompanionObject_instance);\n var tmp$ret$5 = ArraySerializer(PrimitiveClasses_getInstance().u7(), elementSerializer_0);\n enc.ep(tmp_1, 6, tmp$ret$5, tmp3_safe_receiver);\n }\n var tmp4_safe_receiver = value.tags;\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_2 = Companion_getInstance_27().d47_1;\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer_1 = serializer(StringCompanionObject_instance);\n var tmp$ret$7 = ArraySerializer(PrimitiveClasses_getInstance().u7(), elementSerializer_1);\n enc.ep(tmp_2, 7, tmp$ret$7, tmp4_safe_receiver);\n }\n var tmp5_safe_receiver = value.vertices;\n if (tmp5_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_3 = Companion_getInstance_27().d47_1;\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer_2 = PositionTemplateSerializer_getInstance().l17();\n var tmp$ret$9 = ArraySerializer(getKClass(PositionTemplate), elementSerializer_2);\n enc.ep(tmp_3, 8, tmp$ret$9, tmp5_safe_receiver);\n }\n var tmp6_safe_receiver = value.required;\n if (tmp6_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_4;\n if (tmp6_safe_receiver) {\n enc.uo(Companion_getInstance_27().d47_1, 9, tmp6_safe_receiver);\n tmp_4 = Unit_instance;\n }\n }\n var tmp7_safe_receiver = value.priority;\n if (tmp7_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_5;\n if (!(tmp7_safe_receiver === 0)) {\n enc.xo(Companion_getInstance_27().d47_1, 10, tmp7_safe_receiver);\n tmp_5 = Unit_instance;\n }\n }\n var tmp8_safe_receiver = value.activationDistance;\n if (tmp8_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_6;\n if (value.type === 'host' ? !(tmp8_safe_receiver === 0) : false) {\n enc.xo(Companion_getInstance_27().d47_1, 11, tmp8_safe_receiver);\n tmp_6 = Unit_instance;\n } else if (value.type === 'guest' ? !(tmp8_safe_receiver === 200) : false) {\n enc.xo(Companion_getInstance_27().d47_1, 11, tmp8_safe_receiver);\n tmp_6 = Unit_instance;\n } else {\n enc.xo(Companion_getInstance_27().d47_1, 11, tmp8_safe_receiver);\n tmp_6 = Unit_instance;\n }\n }\n enc.cp(this.d47_1, 14, value.rotationDegreeOfFreedom);\n enc.on(this.d47_1);\n };\n protoOf(Companion_21).pk = function (encoder, value) {\n return this.e47(encoder, value instanceof ConnectorItemTemplate ? value : THROW_CCE());\n };\n protoOf(Companion_21).l17 = function () {\n return Companion_getInstance_27();\n };\n var Companion_instance_26;\n function Companion_getInstance_27() {\n if (Companion_instance_26 == null)\n new Companion_21();\n return Companion_instance_26;\n }\n function ConnectorItemTemplate$createSurfaceConnector$lambda() {\n return 'Rotation was specified on one or more vertices that defines a surface. A surface connector will determine its rotation by the normal of the surface, therefor the rotation implicitly specified will be ignored.';\n }\n function ConnectorItemTemplate$createSurfaceConnector$lambda_0($vertices, $plane, $point) {\n return function () {\n return 'All vertices specified for a surface was not in the same plane ' + $vertices + ' plane ' + $plane + ', point ' + $point;\n };\n }\n function ConnectorItemTemplate(lastPosition, name, position, vertices, priority, spacing, activationDistance, tags, demands, offers, type, axis, angle, required, requireUpwardParent, requireDownwardParent, sourceTemplateId, rotationDegreeOfFreedom) {\n Companion_getInstance_27();\n lastPosition = lastPosition === VOID ? null : lastPosition;\n position = position === VOID ? PositionTemplateSerializer_getInstance().IDENTITY : position;\n vertices = vertices === VOID ? null : vertices;\n priority = priority === VOID ? null : priority;\n spacing = spacing === VOID ? null : spacing;\n activationDistance = activationDistance === VOID ? null : activationDistance;\n tags = tags === VOID ? null : tags;\n demands = demands === VOID ? null : demands;\n offers = offers === VOID ? null : offers;\n type = type === VOID ? 'internal' : type;\n axis = axis === VOID ? 'Y' : axis;\n angle = angle === VOID ? 0.0 : angle;\n required = required === VOID ? false : required;\n requireUpwardParent = requireUpwardParent === VOID ? false : requireUpwardParent;\n requireDownwardParent = requireDownwardParent === VOID ? false : requireDownwardParent;\n sourceTemplateId = sourceTemplateId === VOID ? '' : sourceTemplateId;\n rotationDegreeOfFreedom = rotationDegreeOfFreedom === VOID ? RotationDegreeOfFreedom_NONE_getInstance().toString() : rotationDegreeOfFreedom;\n this.lastPosition = lastPosition;\n this.name = name;\n this.position = position;\n this.vertices = vertices;\n this.priority = priority;\n this.spacing = spacing;\n this.activationDistance = activationDistance;\n this.tags = tags;\n this.demands = demands;\n this.offers = offers;\n this.type = type;\n this.axis = axis;\n this.angle = angle;\n this.required = required;\n this.requireUpwardParent = requireUpwardParent;\n this.requireDownwardParent = requireDownwardParent;\n this.sourceTemplateId = sourceTemplateId;\n this.rotationDegreeOfFreedom = rotationDegreeOfFreedom;\n var tmp = this;\n // Inline function 'kotlin.emptyArray' call\n tmp.l3y_1 = [];\n this.m3y_1 = new PositionTemplate(new OriginTemplate(new RelationOrigin(), OriginRelativeTo_SIZE_getInstance()));\n var tmp_0 = this;\n var tmp_1;\n if (!(this.vertices == null)) {\n tmp_1 = this.vertices;\n } else {\n // Inline function 'kotlin.collections.mutableListOf' call\n var mutablePositions = ArrayList_init_$Create$_0();\n mutablePositions.q(this.position);\n if (!(this.lastPosition == null)) {\n mutablePositions.q(this.lastPosition);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_1 = copyToArray(mutablePositions);\n }\n tmp_0.l3y_1 = tmp_1;\n var tmp_2 = this;\n var tmp0_elvis_lhs = firstOrNull(this.l3y_1);\n var tmp_3;\n if (tmp0_elvis_lhs == null) {\n var message = 'IllegalState: A connector requires position or vertexPositions';\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n tmp_3 = tmp0_elvis_lhs;\n }\n tmp_2.m3y_1 = tmp_3;\n this.n3y_1 = 0;\n }\n protoOf(ConnectorItemTemplate).f47 = function () {\n return this.lastPosition;\n };\n protoOf(ConnectorItemTemplate).mb = function () {\n return this.name;\n };\n protoOf(ConnectorItemTemplate).ct = function () {\n return this.position;\n };\n protoOf(ConnectorItemTemplate).b23 = function () {\n return this.vertices;\n };\n protoOf(ConnectorItemTemplate).v1v = function () {\n return this.priority;\n };\n protoOf(ConnectorItemTemplate).g47 = function () {\n return this.spacing;\n };\n protoOf(ConnectorItemTemplate).l1x = function () {\n return this.activationDistance;\n };\n protoOf(ConnectorItemTemplate).c1y = function () {\n return this.tags;\n };\n protoOf(ConnectorItemTemplate).r3e = function () {\n return this.demands;\n };\n protoOf(ConnectorItemTemplate).h47 = function () {\n return this.offers;\n };\n protoOf(ConnectorItemTemplate).a1x = function () {\n return this.type;\n };\n protoOf(ConnectorItemTemplate).q2b = function () {\n return this.axis;\n };\n protoOf(ConnectorItemTemplate).r2b = function () {\n return this.angle;\n };\n protoOf(ConnectorItemTemplate).b1x = function () {\n return this.required;\n };\n protoOf(ConnectorItemTemplate).i47 = function () {\n return this.requireUpwardParent;\n };\n protoOf(ConnectorItemTemplate).j47 = function () {\n return this.requireDownwardParent;\n };\n protoOf(ConnectorItemTemplate).t43 = function (_set____db54di) {\n this.sourceTemplateId = _set____db54di;\n };\n protoOf(ConnectorItemTemplate).u43 = function () {\n return this.sourceTemplateId;\n };\n protoOf(ConnectorItemTemplate).k47 = function () {\n return this.rotationDegreeOfFreedom;\n };\n protoOf(ConnectorItemTemplate).isHost = function () {\n return this.type === 'host';\n };\n protoOf(ConnectorItemTemplate).isRelativeToBounds = function () {\n return _get_firstPosition__de1tzc(this).origin.kotlinRelativeTo.equals(OriginRelativeTo_BOUND_getInstance());\n };\n protoOf(ConnectorItemTemplate).getConnectorForSize = function (size, applyLabels) {\n var tmp;\n switch (this.type) {\n case 'guest':\n tmp = createConnector(this, 0, size);\n break;\n case 'host':\n var tmp_0;\n if (!(this.vertices == null)) {\n tmp_0 = createSurfaceConnector(this, 1, size);\n } else if (!(this.lastPosition == null) ? !(this.spacing == null) : false) {\n tmp_0 = createSeriesConnector(this, 1, size);\n } else if (!(this.lastPosition == null) ? this.spacing == null : false) {\n tmp_0 = createEdgeConnector(this, 1, size);\n } else {\n tmp_0 = createConnector(this, 1, size);\n }\n\n tmp = tmp_0;\n break;\n case 'align':\n var tmp_1;\n if (this.lastPosition == null) {\n tmp_1 = createConnector(this, 2, size);\n } else if (this.spacing == null) {\n tmp_1 = createEdgeConnector(this, 2, size);\n } else {\n tmp_1 = createSeriesConnector(this, 2, size);\n }\n\n tmp = tmp_1;\n break;\n case 'internal':\n tmp = createConnector(this, 3, size);\n break;\n default:\n var message = 'Connection type ' + this.type + ' not implemented';\n throw IllegalStateException_init_$Create$(toString(message));\n }\n var connector = tmp;\n applyLabels(connector);\n addTags(this, connector, this.tags);\n return connector;\n };\n protoOf(ConnectorItemTemplate).applyMagicLabels = function (connector, comSize, family, templateRef) {\n addConnectorTags(this, connector, comSize, family, templateRef);\n };\n protoOf(ConnectorItemTemplate).createRelativeConnectorData = function (size) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = _get_allPositions__bakiw2(this);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.ConnectorItemTemplate.createRelativeConnectorData.' call\n var position = item.relativeTransform.getPosition(size);\n var tmp$ret$0 = new RelativeBoxOffset(item.origin.relation, position);\n destination.q(tmp$ret$0);\n }\n var relativePositions = copyToArray(destination);\n return new RelativeConnectorData(this.name, relativePositions);\n };\n protoOf(ConnectorItemTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof ConnectorItemTemplate))\n THROW_CCE();\n if (!(this.name === other.name))\n return false;\n if (!this.position.equals(other.position))\n return false;\n return true;\n };\n protoOf(ConnectorItemTemplate).hashCode = function () {\n if (this.n3y_1 === 0) {\n this.n3y_1 = imul(31, getStringHashCode(this.name)) + this.position.hashCode() | 0;\n }\n return this.n3y_1;\n };\n protoOf(ConnectorItemTemplate).af = function () {\n return this.lastPosition;\n };\n protoOf(ConnectorItemTemplate).bf = function () {\n return this.name;\n };\n protoOf(ConnectorItemTemplate).g1k = function () {\n return this.position;\n };\n protoOf(ConnectorItemTemplate).h1k = function () {\n return this.vertices;\n };\n protoOf(ConnectorItemTemplate).i1k = function () {\n return this.priority;\n };\n protoOf(ConnectorItemTemplate).j1k = function () {\n return this.spacing;\n };\n protoOf(ConnectorItemTemplate).k1k = function () {\n return this.activationDistance;\n };\n protoOf(ConnectorItemTemplate).p1z = function () {\n return this.tags;\n };\n protoOf(ConnectorItemTemplate).q1z = function () {\n return this.demands;\n };\n protoOf(ConnectorItemTemplate).r1z = function () {\n return this.offers;\n };\n protoOf(ConnectorItemTemplate).s1z = function () {\n return this.type;\n };\n protoOf(ConnectorItemTemplate).t1z = function () {\n return this.axis;\n };\n protoOf(ConnectorItemTemplate).s21 = function () {\n return this.angle;\n };\n protoOf(ConnectorItemTemplate).t21 = function () {\n return this.required;\n };\n protoOf(ConnectorItemTemplate).h46 = function () {\n return this.requireUpwardParent;\n };\n protoOf(ConnectorItemTemplate).i46 = function () {\n return this.requireDownwardParent;\n };\n protoOf(ConnectorItemTemplate).j46 = function () {\n return this.sourceTemplateId;\n };\n protoOf(ConnectorItemTemplate).k46 = function () {\n return this.rotationDegreeOfFreedom;\n };\n protoOf(ConnectorItemTemplate).l47 = function (lastPosition, name, position, vertices, priority, spacing, activationDistance, tags, demands, offers, type, axis, angle, required, requireUpwardParent, requireDownwardParent, sourceTemplateId, rotationDegreeOfFreedom) {\n return new ConnectorItemTemplate(lastPosition, name, position, vertices, priority, spacing, activationDistance, tags, demands, offers, type, axis, angle, required, requireUpwardParent, requireDownwardParent, sourceTemplateId, rotationDegreeOfFreedom);\n };\n protoOf(ConnectorItemTemplate).copy = function (lastPosition, name, position, vertices, priority, spacing, activationDistance, tags, demands, offers, type, axis, angle, required, requireUpwardParent, requireDownwardParent, sourceTemplateId, rotationDegreeOfFreedom, $super) {\n lastPosition = lastPosition === VOID ? this.lastPosition : lastPosition;\n name = name === VOID ? this.name : name;\n position = position === VOID ? this.position : position;\n vertices = vertices === VOID ? this.vertices : vertices;\n priority = priority === VOID ? this.priority : priority;\n spacing = spacing === VOID ? this.spacing : spacing;\n activationDistance = activationDistance === VOID ? this.activationDistance : activationDistance;\n tags = tags === VOID ? this.tags : tags;\n demands = demands === VOID ? this.demands : demands;\n offers = offers === VOID ? this.offers : offers;\n type = type === VOID ? this.type : type;\n axis = axis === VOID ? this.axis : axis;\n angle = angle === VOID ? this.angle : angle;\n required = required === VOID ? this.required : required;\n requireUpwardParent = requireUpwardParent === VOID ? this.requireUpwardParent : requireUpwardParent;\n requireDownwardParent = requireDownwardParent === VOID ? this.requireDownwardParent : requireDownwardParent;\n sourceTemplateId = sourceTemplateId === VOID ? this.sourceTemplateId : sourceTemplateId;\n rotationDegreeOfFreedom = rotationDegreeOfFreedom === VOID ? this.rotationDegreeOfFreedom : rotationDegreeOfFreedom;\n return this.l47(lastPosition, name, position, vertices, priority, spacing, activationDistance, tags, demands, offers, type, axis, angle, required, requireUpwardParent, requireDownwardParent, sourceTemplateId, rotationDegreeOfFreedom);\n };\n protoOf(ConnectorItemTemplate).toString = function () {\n return 'ConnectorItemTemplate(lastPosition=' + this.lastPosition + ', name=' + this.name + ', position=' + this.position + ', vertices=' + toString(this.vertices) + ', priority=' + this.priority + ', spacing=' + this.spacing + ', activationDistance=' + this.activationDistance + ', tags=' + toString(this.tags) + ', demands=' + toString(this.demands) + ', offers=' + toString(this.offers) + ', type=' + this.type + ', axis=' + this.axis + ', angle=' + this.angle + ', required=' + this.required + ', requireUpwardParent=' + this.requireUpwardParent + ', requireDownwardParent=' + this.requireDownwardParent + ', sourceTemplateId=' + this.sourceTemplateId + ', rotationDegreeOfFreedom=' + this.rotationDegreeOfFreedom + ')';\n };\n function getConnectorsForSize(_this__u8e3s4, size, comSize, family, templateRef) {\n var tmp;\n // Inline function 'kotlin.collections.isEmpty' call\n if (_this__u8e3s4.length === 0) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(_this__u8e3s4.length);\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n while (inductionVariable < last) {\n var item = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.getConnectorsForSize.' call\n var tmp$ret$2 = item.getConnectorForSize(size, getConnectorsForSize$lambda(item, comSize, family, templateRef));\n destination.q(tmp$ret$2);\n }\n tmp = copyToArray(destination);\n }\n return tmp;\n }\n function inherit_0(_this__u8e3s4, extendedConnectors) {\n var tmp;\n if (extendedConnectors == null) {\n tmp = _this__u8e3s4;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$_0();\n var inductionVariable = 0;\n var last = extendedConnectors.length;\n while (inductionVariable < last) {\n var element = extendedConnectors[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.inherit.' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var inductionVariable_0 = 0;\n var last_0 = _this__u8e3s4.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = _this__u8e3s4[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.inherit..' call\n if (element_0.name === element.name) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n if (tmp$ret$1) {\n destination.q(element);\n }\n }\n tmp = plus_2(_this__u8e3s4, destination);\n }\n return tmp;\n }\n function getConnectorsForSize$lambda($connectorItem, $comSize, $family, $templateRef) {\n return function (it) {\n $connectorItem.applyMagicLabels(it, $comSize, $family, $templateRef);\n return Unit_instance;\n };\n }\n function calculateAxis($this, max, min, length, maxLength) {\n return (isNaN_0(max) ? isNaN_0(min) : false) ? 0.0 : isNaN_0(max) ? -maxLength / 2.0 + length / 2.0 + min : maxLength / 2.0 - length / 2.0 - max;\n }\n function Dimension$Companion$descriptor$lambda($this$buildClassSerialDescriptor) {\n $this$buildClassSerialDescriptor.cl('width', PrimitiveSerialDescriptor('width', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('left', PrimitiveSerialDescriptor('left', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('right', PrimitiveSerialDescriptor('right', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('height', PrimitiveSerialDescriptor('height', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('top', PrimitiveSerialDescriptor('top', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('bottom', PrimitiveSerialDescriptor('bottom', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('depth', PrimitiveSerialDescriptor('depth', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('front', PrimitiveSerialDescriptor('front', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('back', PrimitiveSerialDescriptor('back', DOUBLE_getInstance()));\n return Unit_instance;\n }\n function Companion_22() {\n Companion_instance_27 = this;\n var tmp = this;\n tmp.j43_1 = buildClassSerialDescriptor('Dimension', [], Dimension$Companion$descriptor$lambda);\n }\n protoOf(Companion_22).ok = function () {\n return this.j43_1;\n };\n protoOf(Companion_22).qk = function (decoder) {\n // Inline function 'kotlinx.serialization.encoding.decodeStructure' call\n var descriptor = this.j43_1;\n var composite = decoder.nn(descriptor);\n // Inline function 'com.ikea.range.dynamic.template.Companion.deserialize.' call\n var width = NaN;\n var left = NaN;\n var right = NaN;\n var height = NaN;\n var top = NaN;\n var bottom = NaN;\n var depth = NaN;\n var front = NaN;\n var back = NaN;\n loop: while (true) {\n var index = composite.eo(Companion_getInstance_28().j43_1);\n if (index === 0)\n width = composite.vn(Companion_getInstance_28().j43_1, 0);\n else {\n if (index === 1)\n left = composite.vn(Companion_getInstance_28().j43_1, 1);\n else {\n if (index === 2)\n right = composite.vn(Companion_getInstance_28().j43_1, 2);\n else {\n if (index === 3)\n height = composite.vn(Companion_getInstance_28().j43_1, 3);\n else {\n if (index === 4)\n top = composite.vn(Companion_getInstance_28().j43_1, 4);\n else {\n if (index === 5)\n bottom = composite.vn(Companion_getInstance_28().j43_1, 5);\n else {\n if (index === 6)\n depth = composite.vn(Companion_getInstance_28().j43_1, 6);\n else {\n if (index === 7)\n front = composite.vn(Companion_getInstance_28().j43_1, 7);\n else {\n if (index === 8)\n back = composite.vn(Companion_getInstance_28().j43_1, 8);\n else {\n if (index === -1)\n break loop;\n else {\n var message = 'Unexpected index: ' + index;\n throw IllegalStateException_init_$Create$(toString(message));\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n if (isNaN_0(width) ? isNaN_0(left) : false)\n left = 0.0;\n if (isNaN_0(width) ? isNaN_0(right) : false)\n right = 0.0;\n if (isNaN_0(height) ? isNaN_0(top) : false)\n top = 0.0;\n if (isNaN_0(height) ? isNaN_0(bottom) : false)\n bottom = 0.0;\n if (isNaN_0(depth) ? isNaN_0(front) : false)\n front = 0.0;\n if (isNaN_0(depth) ? isNaN_0(back) : false)\n back = 0.0;\n var result = new Dimension(back, bottom, depth, front, height, left, right, top, width);\n composite.on(descriptor);\n return result;\n };\n protoOf(Companion_22).m47 = function (encoder, value) {\n var enc = encoder.nn(this.j43_1);\n if (!isNaN_0(value.width)) {\n enc.ap(this.j43_1, 0, value.width);\n }\n if (!isNaN_0(value.left)) {\n enc.ap(this.j43_1, 1, value.left);\n }\n if (!isNaN_0(value.right)) {\n enc.ap(this.j43_1, 2, value.right);\n }\n if (!isNaN_0(value.height)) {\n enc.ap(this.j43_1, 3, value.height);\n }\n if (!isNaN_0(value.top)) {\n enc.ap(this.j43_1, 4, value.top);\n }\n if (!isNaN_0(value.bottom)) {\n enc.ap(this.j43_1, 5, value.bottom);\n }\n if (!isNaN_0(value.depth)) {\n enc.ap(this.j43_1, 6, value.depth);\n }\n if (!isNaN_0(value.front)) {\n enc.ap(this.j43_1, 7, value.front);\n }\n if (!isNaN_0(value.back)) {\n enc.ap(this.j43_1, 8, value.back);\n }\n enc.on(this.j43_1);\n };\n protoOf(Companion_22).pk = function (encoder, value) {\n return this.m47(encoder, value instanceof Dimension ? value : THROW_CCE());\n };\n protoOf(Companion_22).l17 = function () {\n return Companion_getInstance_28();\n };\n var Companion_instance_27;\n function Companion_getInstance_28() {\n if (Companion_instance_27 == null)\n new Companion_22();\n return Companion_instance_27;\n }\n function Dimension$lambda(this$0) {\n return function () {\n return \"Properties 'width' (\" + this$0.width + \"), 'left' (\" + this$0.left + \") and 'right' (\" + this$0.right + ') are conflicting';\n };\n }\n function Dimension$lambda_0(this$0) {\n return function () {\n return \"Properties 'height' (\" + this$0.height + \"), 'top' (\" + this$0.top + \") and 'bottom' (\" + this$0.bottom + ') are conflicting';\n };\n }\n function Dimension$lambda_1(this$0) {\n return function () {\n return \"Properties 'depth' (\" + this$0.depth + \"), 'front' (\" + this$0.front + \") and 'back' (\" + this$0.back + ') are conflicting';\n };\n }\n function Dimension(back, bottom, depth, front, height, left, right, top, width) {\n Companion_getInstance_28();\n var tmp;\n if (back === VOID) {\n tmp = NaN;\n } else {\n tmp = back;\n }\n back = tmp;\n var tmp_0;\n if (bottom === VOID) {\n tmp_0 = NaN;\n } else {\n tmp_0 = bottom;\n }\n bottom = tmp_0;\n var tmp_1;\n if (depth === VOID) {\n tmp_1 = NaN;\n } else {\n tmp_1 = depth;\n }\n depth = tmp_1;\n var tmp_2;\n if (front === VOID) {\n tmp_2 = NaN;\n } else {\n tmp_2 = front;\n }\n front = tmp_2;\n var tmp_3;\n if (height === VOID) {\n tmp_3 = NaN;\n } else {\n tmp_3 = height;\n }\n height = tmp_3;\n var tmp_4;\n if (left === VOID) {\n tmp_4 = NaN;\n } else {\n tmp_4 = left;\n }\n left = tmp_4;\n var tmp_5;\n if (right === VOID) {\n tmp_5 = NaN;\n } else {\n tmp_5 = right;\n }\n right = tmp_5;\n var tmp_6;\n if (top === VOID) {\n tmp_6 = NaN;\n } else {\n tmp_6 = top;\n }\n top = tmp_6;\n var tmp_7;\n if (width === VOID) {\n tmp_7 = NaN;\n } else {\n tmp_7 = width;\n }\n width = tmp_7;\n this.back = back;\n this.bottom = bottom;\n this.depth = depth;\n this.front = front;\n this.height = height;\n this.left = left;\n this.right = right;\n this.top = top;\n this.width = width;\n this.n47_1 = LoggerState_getInstance().m1m('Dimension');\n if ((!isNaN_0(this.width) ? !isNaN_0(this.left) : false) ? !isNaN_0(this.right) : false) {\n this.n47_1.warn(Dimension$lambda(this));\n }\n if ((!isNaN_0(this.height) ? !isNaN_0(this.top) : false) ? !isNaN_0(this.bottom) : false) {\n this.n47_1.warn(Dimension$lambda_0(this));\n }\n if ((!isNaN_0(this.depth) ? !isNaN_0(this.front) : false) ? !isNaN_0(this.back) : false) {\n this.n47_1.warn(Dimension$lambda_1(this));\n }\n }\n protoOf(Dimension).g2c = function () {\n return this.back;\n };\n protoOf(Dimension).e2c = function () {\n return this.bottom;\n };\n protoOf(Dimension).w2b = function () {\n return this.depth;\n };\n protoOf(Dimension).h2c = function () {\n return this.front;\n };\n protoOf(Dimension).v2b = function () {\n return this.height;\n };\n protoOf(Dimension).f2c = function () {\n return this.left;\n };\n protoOf(Dimension).d2c = function () {\n return this.right;\n };\n protoOf(Dimension).c2c = function () {\n return this.top;\n };\n protoOf(Dimension).u2b = function () {\n return this.width;\n };\n protoOf(Dimension).getPolyhedronForSize = function (size) {\n var w = isNaN_0(this.width) ? size.s2e_1 - this.right - this.left : this.width;\n var h = isNaN_0(this.height) ? size.t2e_1 - this.top - this.bottom : this.height;\n var d = isNaN_0(this.depth) ? size.u2e_1 - this.back - this.front : this.depth;\n var x = calculateAxis(Companion_getInstance_28(), this.right, this.left, w, size.s2e_1);\n var y = calculateAxis(Companion_getInstance_28(), this.top, this.bottom, h, size.t2e_1);\n var z = -calculateAxis(Companion_getInstance_28(), this.back, this.front, d, size.u2e_1);\n return CuboidFromSizeAndCenter(new Vector(w, h, d), new Vector(x, y, z));\n };\n protoOf(Dimension).clone = function () {\n return this.copy();\n };\n protoOf(Dimension).af = function () {\n return this.back;\n };\n protoOf(Dimension).bf = function () {\n return this.bottom;\n };\n protoOf(Dimension).g1k = function () {\n return this.depth;\n };\n protoOf(Dimension).h1k = function () {\n return this.front;\n };\n protoOf(Dimension).i1k = function () {\n return this.height;\n };\n protoOf(Dimension).j1k = function () {\n return this.left;\n };\n protoOf(Dimension).k1k = function () {\n return this.right;\n };\n protoOf(Dimension).p1z = function () {\n return this.top;\n };\n protoOf(Dimension).q1z = function () {\n return this.width;\n };\n protoOf(Dimension).o47 = function (back, bottom, depth, front, height, left, right, top, width) {\n return new Dimension(back, bottom, depth, front, height, left, right, top, width);\n };\n protoOf(Dimension).copy = function (back, bottom, depth, front, height, left, right, top, width, $super) {\n back = back === VOID ? this.back : back;\n bottom = bottom === VOID ? this.bottom : bottom;\n depth = depth === VOID ? this.depth : depth;\n front = front === VOID ? this.front : front;\n height = height === VOID ? this.height : height;\n left = left === VOID ? this.left : left;\n right = right === VOID ? this.right : right;\n top = top === VOID ? this.top : top;\n width = width === VOID ? this.width : width;\n return this.o47(back, bottom, depth, front, height, left, right, top, width);\n };\n protoOf(Dimension).toString = function () {\n return 'Dimension(back=' + this.back + ', bottom=' + this.bottom + ', depth=' + this.depth + ', front=' + this.front + ', height=' + this.height + ', left=' + this.left + ', right=' + this.right + ', top=' + this.top + ', width=' + this.width + ')';\n };\n protoOf(Dimension).hashCode = function () {\n var result = getNumberHashCode(this.back);\n result = imul(result, 31) + getNumberHashCode(this.bottom) | 0;\n result = imul(result, 31) + getNumberHashCode(this.depth) | 0;\n result = imul(result, 31) + getNumberHashCode(this.front) | 0;\n result = imul(result, 31) + getNumberHashCode(this.height) | 0;\n result = imul(result, 31) + getNumberHashCode(this.left) | 0;\n result = imul(result, 31) + getNumberHashCode(this.right) | 0;\n result = imul(result, 31) + getNumberHashCode(this.top) | 0;\n result = imul(result, 31) + getNumberHashCode(this.width) | 0;\n return result;\n };\n protoOf(Dimension).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Dimension))\n return false;\n var tmp0_other_with_cast = other instanceof Dimension ? other : THROW_CCE();\n if (!equals(this.back, tmp0_other_with_cast.back))\n return false;\n if (!equals(this.bottom, tmp0_other_with_cast.bottom))\n return false;\n if (!equals(this.depth, tmp0_other_with_cast.depth))\n return false;\n if (!equals(this.front, tmp0_other_with_cast.front))\n return false;\n if (!equals(this.height, tmp0_other_with_cast.height))\n return false;\n if (!equals(this.left, tmp0_other_with_cast.left))\n return false;\n if (!equals(this.right, tmp0_other_with_cast.right))\n return false;\n if (!equals(this.top, tmp0_other_with_cast.top))\n return false;\n if (!equals(this.width, tmp0_other_with_cast.width))\n return false;\n return true;\n };\n function get_logger() {\n _init_properties_DragSurfaceTemplate_kt__pafc5d();\n return logger;\n }\n var logger;\n function createPolyhedronFromVertices($this, vertices, size) {\n var aabbFromSize = Companion_getInstance_0().fromSize(size.vector);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(vertices.length);\n var inductionVariable = 0;\n var last = vertices.length;\n while (inductionVariable < last) {\n var item = vertices[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.DragSurfaceTemplate.createPolyhedronFromVertices.' call\n var position = item.relativeTransform.getPosition(size);\n var tmp$ret$0 = new RelativeBoxOffset(item.origin.relation, position);\n destination.q(tmp$ret$0);\n }\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(destination, 10));\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var item_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.template.DragSurfaceTemplate.createPolyhedronFromVertices.' call\n var tmp$ret$3 = item_0.applyToBox(aabbFromSize);\n destination_0.q(tmp$ret$3);\n }\n var absoluteVertices = copyToArray(destination_0);\n return PolyhedronUtils_getInstance().singleSidedPolyhedronFromPolygon(absoluteVertices);\n }\n function Companion_23() {\n Companion_instance_28 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.p47_1 = [null, null, null, new ReferenceArraySerializer(PrimitiveClasses_getInstance().u7(), StringSerializer_getInstance()), new ReferenceArraySerializer(getKClass(PositionTemplate), PositionTemplateSerializer_getInstance())];\n }\n protoOf(Companion_23).l17 = function () {\n return $serializer_getInstance_17();\n };\n var Companion_instance_28;\n function Companion_getInstance_29() {\n if (Companion_instance_28 == null)\n new Companion_23();\n return Companion_instance_28;\n }\n function $serializer_13() {\n $serializer_instance_13 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.DragSurfaceTemplate', this, 5);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('type', true);\n tmp0_serialDesc.cv('dimension', true);\n tmp0_serialDesc.cv('connectors', true);\n tmp0_serialDesc.cv('vertices', true);\n this.q47_1 = tmp0_serialDesc;\n }\n protoOf($serializer_13).ok = function () {\n return this.q47_1;\n };\n protoOf($serializer_13).rv = function () {\n var tmp0_cached = Companion_getInstance_29().p47_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(Companion_getInstance_28()), get_nullable(tmp0_cached[3]), get_nullable(tmp0_cached[4])];\n };\n protoOf($serializer_13).qk = function (decoder) {\n var tmp0_desc = this.q47_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_input = decoder.nn(tmp0_desc);\n var tmp10_cached = Companion_getInstance_29().p47_1;\n if (tmp9_input.do()) {\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp9_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp9_input.bo(tmp0_desc, 2, Companion_getInstance_28(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp9_input.bo(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp9_input.bo(tmp0_desc, 4, tmp10_cached[4], tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp9_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp9_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp9_input.bo(tmp0_desc, 2, Companion_getInstance_28(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp9_input.bo(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp9_input.bo(tmp0_desc, 4, tmp10_cached[4], tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp9_input.on(tmp0_desc);\n return DragSurfaceTemplate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);\n };\n protoOf($serializer_13).r47 = function (encoder, value) {\n var tmp0_desc = this.q47_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_29().p47_1;\n tmp1_output.cp(tmp0_desc, 0, value.id);\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.type === 'box')) {\n tmp1_output.gp(tmp0_desc, 1, StringSerializer_getInstance(), value.type);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.dimension == null)) {\n tmp1_output.gp(tmp0_desc, 2, Companion_getInstance_28(), value.dimension);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.connectors == null)) {\n tmp1_output.gp(tmp0_desc, 3, tmp2_cached[3], value.connectors);\n }\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.vertices == null)) {\n tmp1_output.gp(tmp0_desc, 4, tmp2_cached[4], value.vertices);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_13).pk = function (encoder, value) {\n return this.r47(encoder, value instanceof DragSurfaceTemplate ? value : THROW_CCE());\n };\n var $serializer_instance_13;\n function $serializer_getInstance_17() {\n if ($serializer_instance_13 == null)\n new $serializer_13();\n return $serializer_instance_13;\n }\n function DragSurfaceTemplate_init_$Init$(seen1, id, type, dimension, connectors, vertices, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_17().q47_1);\n }\n $this.id = id;\n if (0 === (seen1 & 2))\n $this.type = 'box';\n else\n $this.type = type;\n if (0 === (seen1 & 4))\n $this.dimension = null;\n else\n $this.dimension = dimension;\n if (0 === (seen1 & 8))\n $this.connectors = null;\n else\n $this.connectors = connectors;\n if (0 === (seen1 & 16))\n $this.vertices = null;\n else\n $this.vertices = vertices;\n return $this;\n }\n function DragSurfaceTemplate_init_$Create$(seen1, id, type, dimension, connectors, vertices, serializationConstructorMarker) {\n return DragSurfaceTemplate_init_$Init$(seen1, id, type, dimension, connectors, vertices, serializationConstructorMarker, objectCreate(protoOf(DragSurfaceTemplate)));\n }\n function DragSurfaceTemplate$generateDragSurface$lambda() {\n return 'No vertices was specified for type=surface';\n }\n function DragSurfaceTemplate$generateDragSurface$lambda_0(this$0) {\n return function () {\n return 'Unsupported type ' + this$0.type;\n };\n }\n function DragSurfaceTemplate(id, type, dimension, connectors, vertices) {\n Companion_getInstance_29();\n type = type === VOID ? 'box' : type;\n dimension = dimension === VOID ? null : dimension;\n connectors = connectors === VOID ? null : connectors;\n vertices = vertices === VOID ? null : vertices;\n this.id = id;\n this.type = type;\n this.dimension = dimension;\n this.connectors = connectors;\n this.vertices = vertices;\n }\n protoOf(DragSurfaceTemplate).s1k = function () {\n return this.id;\n };\n protoOf(DragSurfaceTemplate).a1x = function () {\n return this.type;\n };\n protoOf(DragSurfaceTemplate).q43 = function () {\n return this.dimension;\n };\n protoOf(DragSurfaceTemplate).a1y = function () {\n return this.connectors;\n };\n protoOf(DragSurfaceTemplate).b23 = function () {\n return this.vertices;\n };\n protoOf(DragSurfaceTemplate).generateDragSurface = function (size) {\n var tmp;\n switch (this.type) {\n case 'box':\n var tmp_0;\n if (this.dimension == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.DragSurfaceTemplate.generateDragSurface.' call\n tmp_0 = this.dimension.getPolyhedronForSize(size);\n }\n\n var tmp5_elvis_lhs = tmp_0;\n var tmp_1;\n if (tmp5_elvis_lhs == null) {\n var tmp2_width = size.s2e_1;\n var tmp3_height = size.t2e_1;\n var tmp4_depth = size.u2e_1;\n tmp_1 = (new Dimension(VOID, VOID, tmp4_depth, VOID, tmp3_height, VOID, VOID, VOID, tmp2_width)).getPolyhedronForSize(size);\n } else {\n tmp_1 = tmp5_elvis_lhs;\n }\n\n tmp = tmp_1;\n break;\n case 'surface':\n var tmp$ret$5;\n $l$block: {\n // Inline function 'com.ikea.core.utils.orElse' call\n var tmp_2;\n if (this.vertices == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.DragSurfaceTemplate.generateDragSurface.' call\n tmp_2 = createPolyhedronFromVertices(this, this.vertices, size);\n }\n var this_0 = tmp_2;\n if (this_0 == null) {\n // Inline function 'com.ikea.range.dynamic.template.DragSurfaceTemplate.generateDragSurface.' call\n var tmp_3 = get_logger();\n tmp_3.error(DragSurfaceTemplate$generateDragSurface$lambda);\n tmp$ret$5 = null;\n break $l$block;\n }\n tmp$ret$5 = this_0;\n }\n\n tmp = tmp$ret$5;\n break;\n default:\n var tmp_4 = get_logger();\n tmp_4.error(DragSurfaceTemplate$generateDragSurface$lambda_0(this));\n tmp = null;\n break;\n }\n var polyhedron = tmp;\n var tmp_5;\n if (polyhedron == null) {\n tmp_5 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.DragSurfaceTemplate.generateDragSurface.' call\n tmp_5 = new DragSurface(polyhedron, this.connectors);\n }\n return tmp_5;\n };\n protoOf(DragSurfaceTemplate).af = function () {\n return this.id;\n };\n protoOf(DragSurfaceTemplate).bf = function () {\n return this.type;\n };\n protoOf(DragSurfaceTemplate).g1k = function () {\n return this.dimension;\n };\n protoOf(DragSurfaceTemplate).h1k = function () {\n return this.connectors;\n };\n protoOf(DragSurfaceTemplate).i1k = function () {\n return this.vertices;\n };\n protoOf(DragSurfaceTemplate).s47 = function (id, type, dimension, connectors, vertices) {\n return new DragSurfaceTemplate(id, type, dimension, connectors, vertices);\n };\n protoOf(DragSurfaceTemplate).copy = function (id, type, dimension, connectors, vertices, $super) {\n id = id === VOID ? this.id : id;\n type = type === VOID ? this.type : type;\n dimension = dimension === VOID ? this.dimension : dimension;\n connectors = connectors === VOID ? this.connectors : connectors;\n vertices = vertices === VOID ? this.vertices : vertices;\n return this.s47(id, type, dimension, connectors, vertices);\n };\n protoOf(DragSurfaceTemplate).toString = function () {\n return 'DragSurfaceTemplate(id=' + this.id + ', type=' + this.type + ', dimension=' + this.dimension + ', connectors=' + toString(this.connectors) + ', vertices=' + toString(this.vertices) + ')';\n };\n protoOf(DragSurfaceTemplate).hashCode = function () {\n var result = getStringHashCode(this.id);\n result = imul(result, 31) + (this.type == null ? 0 : getStringHashCode(this.type)) | 0;\n result = imul(result, 31) + (this.dimension == null ? 0 : this.dimension.hashCode()) | 0;\n result = imul(result, 31) + (this.connectors == null ? 0 : hashCode(this.connectors)) | 0;\n result = imul(result, 31) + (this.vertices == null ? 0 : hashCode(this.vertices)) | 0;\n return result;\n };\n protoOf(DragSurfaceTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof DragSurfaceTemplate))\n return false;\n var tmp0_other_with_cast = other instanceof DragSurfaceTemplate ? other : THROW_CCE();\n if (!(this.id === tmp0_other_with_cast.id))\n return false;\n if (!(this.type == tmp0_other_with_cast.type))\n return false;\n if (!equals(this.dimension, tmp0_other_with_cast.dimension))\n return false;\n if (!equals(this.connectors, tmp0_other_with_cast.connectors))\n return false;\n if (!equals(this.vertices, tmp0_other_with_cast.vertices))\n return false;\n return true;\n };\n function CustomSerializer_1() {\n CustomSerializer_instance_1 = this;\n var tmp = this;\n // Inline function 'kotlinx.serialization.descriptors.listSerialDescriptor' call\n // Inline function 'kotlinx.serialization.serializer' call\n // Inline function 'kotlinx.serialization.internal.cast' call\n var this_0 = serializer_0(createKType(getKClass(DragSurfaceTemplate), arrayOf([]), false));\n var tmp$ret$1 = isInterface(this_0, KSerializer) ? this_0 : THROW_CCE();\n tmp.t47_1 = listSerialDescriptor(tmp$ret$1.ok());\n }\n protoOf(CustomSerializer_1).ok = function () {\n return this.t47_1;\n };\n protoOf(CustomSerializer_1).qk = function (decoder) {\n try {\n var sameAsCollider = decoder.an();\n return new DragSurfacesTemplate(sameAsCollider);\n } catch ($p) {\n if ($p instanceof SerializationException) {\n var e = $p;\n // Inline function 'kotlinx.serialization.encoding.decodeStructure' call\n var descriptor = this.t47_1;\n var composite = decoder.nn(descriptor);\n // Inline function 'com.ikea.range.dynamic.template.CustomSerializer.deserialize.' call\n // Inline function 'kotlin.collections.mutableListOf' call\n var surfaces = ArrayList_init_$Create$_0();\n loop: while (true) {\n var index = composite.eo(CustomSerializer_getInstance_1().t47_1);\n if (index === -1)\n break loop;\n else {\n surfaces.q(composite.ao(CustomSerializer_getInstance_1().t47_1, index, Companion_getInstance_29().l17()));\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$1 = copyToArray(surfaces);\n var result = new DragSurfacesTemplate(false, tmp$ret$1);\n composite.on(descriptor);\n return result;\n } else {\n throw $p;\n }\n }\n };\n protoOf(CustomSerializer_1).u47 = function (encoder, value) {\n if (value.sameAsCollider) {\n encoder.jo(true);\n } else {\n var enc = encoder.nn(this.t47_1);\n var tmp0_safe_receiver = value.surfaces;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var item = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.CustomSerializer.serialize.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n enc.ep(CustomSerializer_getInstance_1().t47_1, tmp1, Companion_getInstance_29().l17(), item);\n }\n }\n enc.on(this.t47_1);\n }\n };\n protoOf(CustomSerializer_1).pk = function (encoder, value) {\n return this.u47(encoder, value instanceof DragSurfacesTemplate ? value : THROW_CCE());\n };\n protoOf(CustomSerializer_1).l17 = function () {\n return CustomSerializer_getInstance_1();\n };\n var CustomSerializer_instance_1;\n function CustomSerializer_getInstance_1() {\n if (CustomSerializer_instance_1 == null)\n new CustomSerializer_1();\n return CustomSerializer_instance_1;\n }\n function DragSurfacesTemplate(sameAsCollider, surfaces) {\n CustomSerializer_getInstance_1();\n surfaces = surfaces === VOID ? null : surfaces;\n this.sameAsCollider = sameAsCollider;\n this.surfaces = surfaces;\n }\n protoOf(DragSurfacesTemplate).v47 = function () {\n return this.sameAsCollider;\n };\n protoOf(DragSurfacesTemplate).l23 = function () {\n return this.surfaces;\n };\n protoOf(DragSurfacesTemplate).generateDragSurface = function (size, collider) {\n var tmp;\n if (this.sameAsCollider) {\n var tmp_0;\n if (collider == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.DragSurfacesTemplate.generateDragSurface.' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = [new DragSurface(collider, null)];\n }\n tmp = tmp_0;\n } else {\n var tmp1_safe_receiver = this.surfaces;\n var tmp_1;\n if (tmp1_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.range.dynamic.template.DragSurfacesTemplate.generateDragSurface.' call\n var tmp0_safe_receiver = element.generateDragSurface(size);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n tmp_1 = destination;\n }\n var tmp2_safe_receiver = tmp_1;\n var tmp_2;\n if (tmp2_safe_receiver == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_2 = copyToArray(tmp2_safe_receiver);\n }\n var tmp3_elvis_lhs = tmp_2;\n var tmp_3;\n if (tmp3_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_3 = [];\n } else {\n tmp_3 = tmp3_elvis_lhs;\n }\n var polyhedronForSurfaces = tmp_3;\n var tmp_4;\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(polyhedronForSurfaces.length === 0)) {\n tmp_4 = polyhedronForSurfaces;\n } else {\n tmp_4 = null;\n }\n tmp = tmp_4;\n }\n return tmp;\n };\n protoOf(DragSurfacesTemplate).af = function () {\n return this.sameAsCollider;\n };\n protoOf(DragSurfacesTemplate).bf = function () {\n return this.surfaces;\n };\n protoOf(DragSurfacesTemplate).w47 = function (sameAsCollider, surfaces) {\n return new DragSurfacesTemplate(sameAsCollider, surfaces);\n };\n protoOf(DragSurfacesTemplate).copy = function (sameAsCollider, surfaces, $super) {\n sameAsCollider = sameAsCollider === VOID ? this.sameAsCollider : sameAsCollider;\n surfaces = surfaces === VOID ? this.surfaces : surfaces;\n return this.w47(sameAsCollider, surfaces);\n };\n protoOf(DragSurfacesTemplate).toString = function () {\n return 'DragSurfacesTemplate(sameAsCollider=' + this.sameAsCollider + ', surfaces=' + toString(this.surfaces) + ')';\n };\n protoOf(DragSurfacesTemplate).hashCode = function () {\n var result = getBooleanHashCode(this.sameAsCollider);\n result = imul(result, 31) + (this.surfaces == null ? 0 : hashCode(this.surfaces)) | 0;\n return result;\n };\n protoOf(DragSurfacesTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof DragSurfacesTemplate))\n return false;\n var tmp0_other_with_cast = other instanceof DragSurfacesTemplate ? other : THROW_CCE();\n if (!(this.sameAsCollider === tmp0_other_with_cast.sameAsCollider))\n return false;\n if (!equals(this.surfaces, tmp0_other_with_cast.surfaces))\n return false;\n return true;\n };\n var properties_initialized_DragSurfaceTemplate_kt_d8qnnn;\n function _init_properties_DragSurfaceTemplate_kt__pafc5d() {\n if (!properties_initialized_DragSurfaceTemplate_kt_d8qnnn) {\n properties_initialized_DragSurfaceTemplate_kt_d8qnnn = true;\n logger = LoggerState_getInstance().m1m('DragSurfaceTemplate');\n }\n }\n function DynamicRangeUtils$Companion$StrictPretty$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n return Unit_instance;\n }\n function DynamicRangeUtils$Companion$AssemblyPretty$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n $this$Json.c16_1 = false;\n return Unit_instance;\n }\n function DynamicRangeUtils$Companion$createConnector$lambda($template, $comSize, $family, $templateId) {\n return function (it) {\n $template.applyMagicLabels(it, new Size($comSize[0], $comSize[1], $comSize[2]), $family, $templateId);\n return Unit_instance;\n };\n }\n function Companion_24() {\n Companion_instance_29 = this;\n var tmp = this;\n tmp.x47_1 = Json(VOID, DynamicRangeUtils$Companion$StrictPretty$lambda);\n var tmp_0 = this;\n tmp_0.y47_1 = Json(VOID, DynamicRangeUtils$Companion$AssemblyPretty$lambda);\n }\n protoOf(Companion_24).createConnector = function (connectorJson, size, comSize, family, templateId) {\n // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call\n var this_0 = this.x47_1;\n // Inline function 'kotlinx.serialization.serializer' call\n var this_1 = this_0.co();\n // Inline function 'kotlinx.serialization.internal.cast' call\n var this_2 = serializer_1(this_1, createKType(getKClass(ConnectorItemTemplate), arrayOf([]), false));\n var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();\n var template = this_0.j15(tmp$ret$1, connectorJson);\n var tmp = new Size(size[0], size[1], size[2]);\n return template.getConnectorForSize(tmp, DynamicRangeUtils$Companion$createConnector$lambda(template, comSize, family, templateId));\n };\n protoOf(Companion_24).arrayToMargin = function (margin) {\n var tmp0_top = margin[0];\n var tmp1_bottom = margin[1];\n var tmp2_left = margin[2];\n var tmp3_right = margin[3];\n var tmp4_front = margin[4];\n var tmp5_back = margin[5];\n return new Margin(tmp0_top, tmp3_right, tmp1_bottom, tmp2_left, tmp5_back, tmp4_front);\n };\n protoOf(Companion_24).assemblyToJson = function (assembly) {\n // Inline function 'kotlinx.serialization.encodeToString' call\n var this_0 = this.y47_1;\n // Inline function 'kotlinx.serialization.serializer' call\n var this_1 = this_0.co();\n // Inline function 'kotlinx.serialization.internal.cast' call\n var this_2 = serializer_1(this_1, createKType(getKClass(AssemblyTemplate), arrayOf([]), false));\n var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();\n return this_0.i15(tmp$ret$1, assembly);\n };\n protoOf(Companion_24).boundsToJson = function (bounds) {\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer = Companion_getInstance_24().l17();\n var tmp$ret$0 = ArraySerializer(getKClass(BoundItemTemplate), elementSerializer);\n return this.x47_1.i15(tmp$ret$0, bounds);\n };\n protoOf(Companion_24).connectorsToJson = function (connectors) {\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer = Companion_getInstance_27();\n var tmp$ret$0 = ArraySerializer(getKClass(ConnectorItemTemplate), elementSerializer);\n return this.x47_1.i15(tmp$ret$0, connectors);\n };\n protoOf(Companion_24).jsonToAssembly = function (json) {\n return Default_getInstance().j15(Companion_getInstance_23().l17(), json);\n };\n protoOf(Companion_24).jsonToBounds = function (json) {\n var tmp = Default_getInstance();\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer = Companion_getInstance_24().l17();\n var tmp$ret$0 = ArraySerializer(getKClass(BoundItemTemplate), elementSerializer);\n return tmp.j15(tmp$ret$0, json);\n };\n protoOf(Companion_24).jsonToConnectors = function (json) {\n var tmp = Default_getInstance();\n // Inline function 'kotlinx.serialization.builtins.ArraySerializer' call\n var elementSerializer = Companion_getInstance_27().l17();\n var tmp$ret$0 = ArraySerializer(getKClass(ConnectorItemTemplate), elementSerializer);\n return tmp.j15(tmp$ret$0, json);\n };\n protoOf(Companion_24).productTemplateToJson = function (template) {\n try {\n return this.x47_1.i15(Companion_getInstance_12().l17(), template);\n } catch ($p) {\n if ($p instanceof Error_0) {\n var e = $p;\n // Inline function 'kotlin.error' call\n var message = toString_0(e.message);\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n throw $p;\n }\n }\n };\n var Companion_instance_29;\n function Companion_getInstance_30() {\n if (Companion_instance_29 == null)\n new Companion_24();\n return Companion_instance_29;\n }\n function DynamicRangeUtils() {\n Companion_getInstance_30();\n }\n function Companion_25() {\n }\n protoOf(Companion_25).l17 = function () {\n return $serializer_getInstance_18();\n };\n var Companion_instance_30;\n function Companion_getInstance_31() {\n return Companion_instance_30;\n }\n function $serializer_14() {\n $serializer_instance_14 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.LightTemplate', this, 1);\n tmp0_serialDesc.cv('type', true);\n this.z47_1 = tmp0_serialDesc;\n }\n protoOf($serializer_14).ok = function () {\n return this.z47_1;\n };\n protoOf($serializer_14).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [get_nullable(StringSerializer_getInstance())];\n };\n protoOf($serializer_14).qk = function (decoder) {\n var tmp0_desc = this.z47_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_input = decoder.nn(tmp0_desc);\n if (tmp5_input.do()) {\n tmp4_local0 = tmp5_input.bo(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp5_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp5_input.bo(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp5_input.on(tmp0_desc);\n return LightTemplate_init_$Create$(tmp3_bitMask0, tmp4_local0, null);\n };\n protoOf($serializer_14).a48 = function (encoder, value) {\n var tmp0_desc = this.z47_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !(value.type == null)) {\n tmp1_output.gp(tmp0_desc, 0, StringSerializer_getInstance(), value.type);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_14).pk = function (encoder, value) {\n return this.a48(encoder, value instanceof LightTemplate ? value : THROW_CCE());\n };\n var $serializer_instance_14;\n function $serializer_getInstance_18() {\n if ($serializer_instance_14 == null)\n new $serializer_14();\n return $serializer_instance_14;\n }\n function LightTemplate_init_$Init$(seen1, type, serializationConstructorMarker, $this) {\n if (!(0 === (0 & seen1))) {\n throwMissingFieldException(seen1, 0, $serializer_getInstance_18().z47_1);\n }\n if (0 === (seen1 & 1))\n $this.type = null;\n else\n $this.type = type;\n return $this;\n }\n function LightTemplate_init_$Create$(seen1, type, serializationConstructorMarker) {\n return LightTemplate_init_$Init$(seen1, type, serializationConstructorMarker, objectCreate(protoOf(LightTemplate)));\n }\n function LightTemplate(type) {\n type = type === VOID ? null : type;\n this.type = type;\n }\n protoOf(LightTemplate).a1x = function () {\n return this.type;\n };\n protoOf(LightTemplate).af = function () {\n return this.type;\n };\n protoOf(LightTemplate).b48 = function (type) {\n return new LightTemplate(type);\n };\n protoOf(LightTemplate).copy = function (type, $super) {\n type = type === VOID ? this.type : type;\n return this.b48(type);\n };\n protoOf(LightTemplate).toString = function () {\n return 'LightTemplate(type=' + this.type + ')';\n };\n protoOf(LightTemplate).hashCode = function () {\n return this.type == null ? 0 : getStringHashCode(this.type);\n };\n protoOf(LightTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof LightTemplate))\n return false;\n var tmp0_other_with_cast = other instanceof LightTemplate ? other : THROW_CCE();\n if (!(this.type == tmp0_other_with_cast.type))\n return false;\n return true;\n };\n function d(_this__u8e3s4, $this, key) {\n var tmp0_safe_receiver = _this__u8e3s4.o17(key);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : get_double(tmp1_safe_receiver);\n return tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs;\n }\n function encodeNonZeroDoubleElement(_this__u8e3s4, $this, descriptor, index, value) {\n if (!(value === 0.0)) {\n _this__u8e3s4.ap(descriptor, index, value);\n }\n }\n function MarginTemplate$MarginTemplateSerializer$descriptor$lambda($this$buildClassSerialDescriptor) {\n $this$buildClassSerialDescriptor.cl('top', PrimitiveSerialDescriptor('top', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('bottom', PrimitiveSerialDescriptor('bottom', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('left', PrimitiveSerialDescriptor('left', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('right', PrimitiveSerialDescriptor('right', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('front', PrimitiveSerialDescriptor('front', DOUBLE_getInstance()));\n $this$buildClassSerialDescriptor.cl('back', PrimitiveSerialDescriptor('back', DOUBLE_getInstance()));\n return Unit_instance;\n }\n function MarginTemplateSerializer() {\n MarginTemplateSerializer_instance = this;\n var tmp = this;\n tmp.m43_1 = buildClassSerialDescriptor('MarginTemplate', [], MarginTemplate$MarginTemplateSerializer$descriptor$lambda);\n }\n protoOf(MarginTemplateSerializer).qk = function (decoder) {\n var element = decoder.mn(Companion_instance_3.l17());\n var tmp;\n if (element instanceof JsonObject) {\n var top = d(element, this, 'top');\n var bottom = d(element, this, 'bottom');\n var left = d(element, this, 'left');\n var right = d(element, this, 'right');\n var front = d(element, this, 'front');\n var back = d(element, this, 'back');\n tmp = new MarginTemplate(top, bottom, left, right, front, back);\n } else {\n // Inline function 'kotlin.collections.map' call\n var this_0 = get_jsonArray(element);\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.template.MarginTemplateSerializer.deserialize.' call\n var tmp$ret$0 = get_double(get_jsonPrimitive(item));\n destination.q(tmp$ret$0);\n }\n var array = destination;\n tmp = new MarginTemplate(array.f1(0), array.f1(1), array.f1(2), array.f1(3), array.f1(4), array.f1(5));\n }\n return tmp;\n };\n protoOf(MarginTemplateSerializer).ok = function () {\n return this.m43_1;\n };\n protoOf(MarginTemplateSerializer).c48 = function (encoder, value) {\n var enc = encoder.nn(this.m43_1);\n encodeNonZeroDoubleElement(enc, this, this.m43_1, 0, value.top);\n encodeNonZeroDoubleElement(enc, this, this.m43_1, 1, value.bottom);\n encodeNonZeroDoubleElement(enc, this, this.m43_1, 2, value.left);\n encodeNonZeroDoubleElement(enc, this, this.m43_1, 3, value.right);\n encodeNonZeroDoubleElement(enc, this, this.m43_1, 4, value.front);\n encodeNonZeroDoubleElement(enc, this, this.m43_1, 5, value.back);\n enc.on(this.m43_1);\n };\n protoOf(MarginTemplateSerializer).pk = function (encoder, value) {\n return this.c48(encoder, value instanceof MarginTemplate ? value : THROW_CCE());\n };\n protoOf(MarginTemplateSerializer).l17 = function () {\n return MarginTemplateSerializer_getInstance();\n };\n var MarginTemplateSerializer_instance;\n function MarginTemplateSerializer_getInstance() {\n if (MarginTemplateSerializer_instance == null)\n new MarginTemplateSerializer();\n return MarginTemplateSerializer_instance;\n }\n function MarginTemplate(top, bottom, left, right, front, back) {\n MarginTemplateSerializer_getInstance();\n top = top === VOID ? 0.0 : top;\n bottom = bottom === VOID ? 0.0 : bottom;\n left = left === VOID ? 0.0 : left;\n right = right === VOID ? 0.0 : right;\n front = front === VOID ? 0.0 : front;\n back = back === VOID ? 0.0 : back;\n this.top = top;\n this.bottom = bottom;\n this.left = left;\n this.right = right;\n this.front = front;\n this.back = back;\n }\n protoOf(MarginTemplate).c2c = function () {\n return this.top;\n };\n protoOf(MarginTemplate).e2c = function () {\n return this.bottom;\n };\n protoOf(MarginTemplate).f2c = function () {\n return this.left;\n };\n protoOf(MarginTemplate).d2c = function () {\n return this.right;\n };\n protoOf(MarginTemplate).h2c = function () {\n return this.front;\n };\n protoOf(MarginTemplate).g2c = function () {\n return this.back;\n };\n protoOf(MarginTemplate).toMargin = function () {\n return new Margin(this.top, this.right, this.bottom, this.left, this.back, this.front);\n };\n protoOf(MarginTemplate).clone = function () {\n return this.copy();\n };\n protoOf(MarginTemplate).af = function () {\n return this.top;\n };\n protoOf(MarginTemplate).bf = function () {\n return this.bottom;\n };\n protoOf(MarginTemplate).g1k = function () {\n return this.left;\n };\n protoOf(MarginTemplate).h1k = function () {\n return this.right;\n };\n protoOf(MarginTemplate).i1k = function () {\n return this.front;\n };\n protoOf(MarginTemplate).j1k = function () {\n return this.back;\n };\n protoOf(MarginTemplate).i2c = function (top, bottom, left, right, front, back) {\n return new MarginTemplate(top, bottom, left, right, front, back);\n };\n protoOf(MarginTemplate).copy = function (top, bottom, left, right, front, back, $super) {\n top = top === VOID ? this.top : top;\n bottom = bottom === VOID ? this.bottom : bottom;\n left = left === VOID ? this.left : left;\n right = right === VOID ? this.right : right;\n front = front === VOID ? this.front : front;\n back = back === VOID ? this.back : back;\n return this.i2c(top, bottom, left, right, front, back);\n };\n protoOf(MarginTemplate).toString = function () {\n return 'MarginTemplate(top=' + this.top + ', bottom=' + this.bottom + ', left=' + this.left + ', right=' + this.right + ', front=' + this.front + ', back=' + this.back + ')';\n };\n protoOf(MarginTemplate).hashCode = function () {\n var result = getNumberHashCode(this.top);\n result = imul(result, 31) + getNumberHashCode(this.bottom) | 0;\n result = imul(result, 31) + getNumberHashCode(this.left) | 0;\n result = imul(result, 31) + getNumberHashCode(this.right) | 0;\n result = imul(result, 31) + getNumberHashCode(this.front) | 0;\n result = imul(result, 31) + getNumberHashCode(this.back) | 0;\n return result;\n };\n protoOf(MarginTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof MarginTemplate))\n return false;\n var tmp0_other_with_cast = other instanceof MarginTemplate ? other : THROW_CCE();\n if (!equals(this.top, tmp0_other_with_cast.top))\n return false;\n if (!equals(this.bottom, tmp0_other_with_cast.bottom))\n return false;\n if (!equals(this.left, tmp0_other_with_cast.left))\n return false;\n if (!equals(this.right, tmp0_other_with_cast.right))\n return false;\n if (!equals(this.front, tmp0_other_with_cast.front))\n return false;\n if (!equals(this.back, tmp0_other_with_cast.back))\n return false;\n return true;\n };\n function Companion_26() {\n }\n protoOf(Companion_26).l17 = function () {\n return $serializer_getInstance_19();\n };\n var Companion_instance_31;\n function Companion_getInstance_32() {\n return Companion_instance_31;\n }\n function $serializer_15() {\n $serializer_instance_15 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.Model3DTemplate', this, 3);\n tmp0_serialDesc.cv('modelURI', false);\n tmp0_serialDesc.cv('modelRootURL', true);\n tmp0_serialDesc.cv('modelTransform', true);\n this.d48_1 = tmp0_serialDesc;\n }\n protoOf($serializer_15).ok = function () {\n return this.d48_1;\n };\n protoOf($serializer_15).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_1())];\n };\n protoOf($serializer_15).qk = function (decoder) {\n var tmp0_desc = this.d48_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.bo(tmp0_desc, 2, $serializer_getInstance_1(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.bo(tmp0_desc, 2, $serializer_getInstance_1(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return Model3DTemplate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_15).e48 = function (encoder, value) {\n var tmp0_desc = this.d48_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.modelURI);\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.modelRootURL == null)) {\n tmp1_output.gp(tmp0_desc, 1, StringSerializer_getInstance(), value.modelRootURL);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.modelTransform == null)) {\n tmp1_output.gp(tmp0_desc, 2, $serializer_getInstance_1(), value.modelTransform);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_15).pk = function (encoder, value) {\n return this.e48(encoder, value instanceof Model3DTemplate ? value : THROW_CCE());\n };\n var $serializer_instance_15;\n function $serializer_getInstance_19() {\n if ($serializer_instance_15 == null)\n new $serializer_15();\n return $serializer_instance_15;\n }\n function Model3DTemplate_init_$Init$(seen1, modelURI, modelRootURL, modelTransform, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_19().d48_1);\n }\n $this.modelURI = modelURI;\n if (0 === (seen1 & 2))\n $this.modelRootURL = null;\n else\n $this.modelRootURL = modelRootURL;\n if (0 === (seen1 & 4))\n $this.modelTransform = null;\n else\n $this.modelTransform = modelTransform;\n return $this;\n }\n function Model3DTemplate_init_$Create$(seen1, modelURI, modelRootURL, modelTransform, serializationConstructorMarker) {\n return Model3DTemplate_init_$Init$(seen1, modelURI, modelRootURL, modelTransform, serializationConstructorMarker, objectCreate(protoOf(Model3DTemplate)));\n }\n function Model3DTemplate(modelURI, modelRootURL, modelTransform) {\n modelRootURL = modelRootURL === VOID ? null : modelRootURL;\n modelTransform = modelTransform === VOID ? null : modelTransform;\n this.modelURI = modelURI;\n this.modelRootURL = modelRootURL;\n this.modelTransform = modelTransform;\n }\n protoOf(Model3DTemplate).t3x = function () {\n return this.modelURI;\n };\n protoOf(Model3DTemplate).f48 = function () {\n return this.modelRootURL;\n };\n protoOf(Model3DTemplate).h40 = function () {\n return this.modelTransform;\n };\n protoOf(Model3DTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof Model3DTemplate))\n THROW_CCE();\n if (!(this.modelURI === other.modelURI))\n return false;\n if (!(this.modelRootURL == other.modelRootURL))\n return false;\n return true;\n };\n protoOf(Model3DTemplate).hashCode = function () {\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver = this.modelRootURL;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n };\n protoOf(Model3DTemplate).af = function () {\n return this.modelURI;\n };\n protoOf(Model3DTemplate).bf = function () {\n return this.modelRootURL;\n };\n protoOf(Model3DTemplate).g1k = function () {\n return this.modelTransform;\n };\n protoOf(Model3DTemplate).g48 = function (modelURI, modelRootURL, modelTransform) {\n return new Model3DTemplate(modelURI, modelRootURL, modelTransform);\n };\n protoOf(Model3DTemplate).copy = function (modelURI, modelRootURL, modelTransform, $super) {\n modelURI = modelURI === VOID ? this.modelURI : modelURI;\n modelRootURL = modelRootURL === VOID ? this.modelRootURL : modelRootURL;\n modelTransform = modelTransform === VOID ? this.modelTransform : modelTransform;\n return this.g48(modelURI, modelRootURL, modelTransform);\n };\n protoOf(Model3DTemplate).toString = function () {\n return 'Model3DTemplate(modelURI=' + this.modelURI + ', modelRootURL=' + this.modelRootURL + ', modelTransform=' + this.modelTransform + ')';\n };\n function parseRelativeTo($this, element) {\n var tmp = \"Could not parse field 'relativeTo' as OriginRelativeTo from object: \" + element;\n return parseAndCatch(tmp, OriginTemplate$CustomSerializer$parseRelativeTo$lambda(element));\n }\n function parseOrigin($this, element) {\n var tmp = \"Could not parse field 'relation' as RelationOrigin from object: \" + element;\n return parseAndCatch(tmp, OriginTemplate$CustomSerializer$parseOrigin$lambda(element));\n }\n function parseSimpleOrigin($this, element) {\n var tmp = 'Could not parse origin as RelationOrigin from object: ' + element;\n return parseAndCatch(tmp, OriginTemplate$CustomSerializer$parseSimpleOrigin$lambda(element));\n }\n function OriginTemplate$CustomSerializer$jsonParser$lambda($this$Json) {\n $this$Json.f16_1 = true;\n return Unit_instance;\n }\n function OriginTemplate$CustomSerializer$parseRelativeTo$lambda($element) {\n return function () {\n return CustomSerializer_getInstance_2().jsonParser.j15(Companion_getInstance_37().l17(), toString_0($element.o17('relativeTo')));\n };\n }\n function OriginTemplate$CustomSerializer$parseOrigin$lambda($element) {\n return function () {\n return CustomSerializer_getInstance_2().jsonParser.j15(RelationOriginSerializer_getInstance(), toString_0($element.o17('relation')));\n };\n }\n function OriginTemplate$CustomSerializer$parseSimpleOrigin$lambda($element) {\n return function () {\n return CustomSerializer_getInstance_2().jsonParser.j15(RelationOriginSerializer_getInstance(), $element.toString());\n };\n }\n function OriginTemplate$CustomSerializer$descriptor$lambda($this$buildClassSerialDescriptor) {\n $this$buildClassSerialDescriptor.cl('relation', Companion_getInstance_4().l17().ok());\n $this$buildClassSerialDescriptor.cl('relativeTo', Companion_getInstance_1().l17().ok());\n return Unit_instance;\n }\n function CustomSerializer_2() {\n CustomSerializer_instance_2 = this;\n var tmp = this;\n tmp.jsonParser = Json(VOID, OriginTemplate$CustomSerializer$jsonParser$lambda);\n var tmp_0 = this;\n tmp_0.h48_1 = buildClassSerialDescriptor('OriginTemplate', [], OriginTemplate$CustomSerializer$descriptor$lambda);\n }\n protoOf(CustomSerializer_2).q3y = function () {\n return this.jsonParser;\n };\n protoOf(CustomSerializer_2).qk = function (decoder) {\n var element = decoder.mn(Companion_instance_3.l17());\n var tmp;\n if (element instanceof JsonObject) {\n tmp = new OriginTemplate(parseOrigin(this, element), parseRelativeTo(this, element));\n } else {\n if (element instanceof JsonPrimitive) {\n tmp = new OriginTemplate(parseSimpleOrigin(this, element), OriginRelativeTo_SIZE_getInstance());\n } else {\n var message = 'Origin malformed in JSON: ' + element;\n throw IllegalStateException_init_$Create$(toString(message));\n }\n }\n return tmp;\n };\n protoOf(CustomSerializer_2).ok = function () {\n return this.h48_1;\n };\n protoOf(CustomSerializer_2).j48 = function (encoder, value) {\n if (!value.relation.equals(new RelationOrigin()) ? !value.kotlinRelativeTo.equals(OriginRelativeTo_SIZE_getInstance()) : false) {\n var comp = encoder.nn(this.h48_1);\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$1 = value.kotlinRelativeTo.toString().toLowerCase();\n comp.cp(this.h48_1, 1, tmp$ret$1);\n comp.cp(this.h48_1, 0, value.relation.toString());\n comp.on(this.h48_1);\n } else if (!value.kotlinRelativeTo.equals(OriginRelativeTo_SIZE_getInstance())) {\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = value.kotlinRelativeTo.toString().toLowerCase();\n encoder.ro(tmp$ret$3);\n } else if (!value.relation.equals(new RelationOrigin())) {\n encoder.ro(value.relation.toString());\n }\n };\n protoOf(CustomSerializer_2).pk = function (encoder, value) {\n return this.j48(encoder, value instanceof OriginTemplate ? value : THROW_CCE());\n };\n protoOf(CustomSerializer_2).l17 = function () {\n return CustomSerializer_getInstance_2();\n };\n var CustomSerializer_instance_2;\n function CustomSerializer_getInstance_2() {\n if (CustomSerializer_instance_2 == null)\n new CustomSerializer_2();\n return CustomSerializer_instance_2;\n }\n function OriginTemplate(relation, relativeTo) {\n CustomSerializer_getInstance_2();\n this.relation = relation;\n this.kotlinRelativeTo = relativeTo;\n this.isDefault = this.relation.equals(new RelationOrigin()) ? this.kotlinRelativeTo.equals(OriginRelativeTo_SIZE_getInstance()) : false;\n }\n protoOf(OriginTemplate).k48 = function () {\n return this.relation;\n };\n protoOf(OriginTemplate).l48 = function () {\n return this.kotlinRelativeTo;\n };\n protoOf(OriginTemplate).m48 = function () {\n return this.isDefault;\n };\n protoOf(OriginTemplate).q2d = function () {\n return this.kotlinRelativeTo.x9_1;\n };\n protoOf(OriginTemplate).af = function () {\n return this.relation;\n };\n protoOf(OriginTemplate).bf = function () {\n return this.kotlinRelativeTo;\n };\n protoOf(OriginTemplate).n48 = function (relation, relativeTo) {\n return new OriginTemplate(relation, relativeTo);\n };\n protoOf(OriginTemplate).copy = function (relation, relativeTo, $super) {\n relation = relation === VOID ? this.relation : relation;\n relativeTo = relativeTo === VOID ? this.kotlinRelativeTo : relativeTo;\n return this.n48(relation, relativeTo);\n };\n protoOf(OriginTemplate).toString = function () {\n return 'OriginTemplate(relation=' + this.relation + ', relativeTo=' + this.kotlinRelativeTo + ')';\n };\n protoOf(OriginTemplate).hashCode = function () {\n var result = this.relation.hashCode();\n result = imul(result, 31) + this.kotlinRelativeTo.hashCode() | 0;\n return result;\n };\n protoOf(OriginTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof OriginTemplate))\n return false;\n var tmp0_other_with_cast = other instanceof OriginTemplate ? other : THROW_CCE();\n if (!this.relation.equals(tmp0_other_with_cast.relation))\n return false;\n if (!this.kotlinRelativeTo.equals(tmp0_other_with_cast.kotlinRelativeTo))\n return false;\n return true;\n };\n function Companion_27() {\n }\n protoOf(Companion_27).l17 = function () {\n return $serializer_getInstance_20();\n };\n var Companion_instance_32;\n function Companion_getInstance_33() {\n return Companion_instance_32;\n }\n function $serializer_16() {\n $serializer_instance_16 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.PlacementZoneByHeightTemplate', this, 2);\n tmp0_serialDesc.cv('minY', false);\n tmp0_serialDesc.cv('maxY', false);\n this.o48_1 = tmp0_serialDesc;\n }\n protoOf($serializer_16).ok = function () {\n return this.o48_1;\n };\n protoOf($serializer_16).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [IntSerializer_getInstance(), IntSerializer_getInstance()];\n };\n protoOf($serializer_16).qk = function (decoder) {\n var tmp0_desc = this.o48_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = 0;\n var tmp5_local1 = 0;\n var tmp6_input = decoder.nn(tmp0_desc);\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.sn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.sn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.sn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.sn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return PlacementZoneByHeightTemplate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);\n };\n protoOf($serializer_16).p48 = function (encoder, value) {\n var tmp0_desc = this.o48_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.xo(tmp0_desc, 0, value.minY);\n tmp1_output.xo(tmp0_desc, 1, value.maxY);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_16).pk = function (encoder, value) {\n return this.p48(encoder, value instanceof PlacementZoneByHeightTemplate ? value : THROW_CCE());\n };\n var $serializer_instance_16;\n function $serializer_getInstance_20() {\n if ($serializer_instance_16 == null)\n new $serializer_16();\n return $serializer_instance_16;\n }\n function PlacementZoneByHeightTemplate_init_$Init$(seen1, minY, maxY, serializationConstructorMarker, $this) {\n if (!(3 === (3 & seen1))) {\n throwMissingFieldException(seen1, 3, $serializer_getInstance_20().o48_1);\n }\n $this.minY = minY;\n $this.maxY = maxY;\n return $this;\n }\n function PlacementZoneByHeightTemplate_init_$Create$(seen1, minY, maxY, serializationConstructorMarker) {\n return PlacementZoneByHeightTemplate_init_$Init$(seen1, minY, maxY, serializationConstructorMarker, objectCreate(protoOf(PlacementZoneByHeightTemplate)));\n }\n function PlacementZoneByHeightTemplate(minY, maxY) {\n this.minY = minY;\n this.maxY = maxY;\n }\n protoOf(PlacementZoneByHeightTemplate).b3d = function () {\n return this.minY;\n };\n protoOf(PlacementZoneByHeightTemplate).c3d = function () {\n return this.maxY;\n };\n protoOf(PlacementZoneByHeightTemplate).af = function () {\n return this.minY;\n };\n protoOf(PlacementZoneByHeightTemplate).bf = function () {\n return this.maxY;\n };\n protoOf(PlacementZoneByHeightTemplate).d3d = function (minY, maxY) {\n return new PlacementZoneByHeightTemplate(minY, maxY);\n };\n protoOf(PlacementZoneByHeightTemplate).copy = function (minY, maxY, $super) {\n minY = minY === VOID ? this.minY : minY;\n maxY = maxY === VOID ? this.maxY : maxY;\n return this.d3d(minY, maxY);\n };\n protoOf(PlacementZoneByHeightTemplate).toString = function () {\n return 'PlacementZoneByHeightTemplate(minY=' + this.minY + ', maxY=' + this.maxY + ')';\n };\n protoOf(PlacementZoneByHeightTemplate).hashCode = function () {\n var result = this.minY;\n result = imul(result, 31) + this.maxY | 0;\n return result;\n };\n protoOf(PlacementZoneByHeightTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PlacementZoneByHeightTemplate))\n return false;\n var tmp0_other_with_cast = other instanceof PlacementZoneByHeightTemplate ? other : THROW_CCE();\n if (!(this.minY === tmp0_other_with_cast.minY))\n return false;\n if (!(this.maxY === tmp0_other_with_cast.maxY))\n return false;\n return true;\n };\n function parseOrigin_0($this, element) {\n var tmp = \"Could not parse field 'origin' as OriginTemplate from object: \" + element;\n return parseAndCatch(tmp, PositionTemplate$PositionTemplateSerializer$parseOrigin$lambda(element));\n }\n function parseRelativeTransform($this, element) {\n var tmp = \"Could not parse field 'transform' as RelativeTransform from object: \" + element;\n return parseAndCatch(tmp, PositionTemplate$PositionTemplateSerializer$parseRelativeTransform$lambda(element));\n }\n function parseRelativeTransformAsArray($this, element) {\n var tmp = 'Could not parse RelativeTransform from object: ' + element;\n return parseAndCatch(tmp, PositionTemplate$PositionTemplateSerializer$parseRelativeTransformAsArray$lambda(element));\n }\n function PositionTemplate$PositionTemplateSerializer$jsonParser$lambda($this$Json) {\n $this$Json.f16_1 = true;\n return Unit_instance;\n }\n function PositionTemplate$PositionTemplateSerializer$parseOrigin$lambda($element) {\n return function () {\n return PositionTemplateSerializer_getInstance().z46_1.j15(CustomSerializer_getInstance_2().l17(), toString_0($element.o17('origin')));\n };\n }\n function PositionTemplate$PositionTemplateSerializer$parseRelativeTransform$lambda($element) {\n return function () {\n var tmp;\n try {\n var tmp_0 = RelativeTransformDeserializer_instance;\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_0 = get_jsonArray($element);\n var destination = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.range.dynamic.template.PositionTemplateSerializer.parseRelativeTransform..' call\n var tmp0_safe_receiver = get_jsonPrimitive(element).p17();\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n tmp = tmp_0.deserialize(destination);\n } catch ($p) {\n var tmp_1;\n if ($p instanceof Exception) {\n var e = $p;\n tmp_1 = NamedTransformObjectDeserializer_instance.deserialize(get_jsonObject($element));\n } else {\n throw $p;\n }\n tmp = tmp_1;\n }\n return tmp;\n };\n }\n function PositionTemplate$PositionTemplateSerializer$parseRelativeTransformAsArray$lambda($element) {\n return function () {\n var tmp = RelativeTransformDeserializer_instance;\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_0 = get_jsonArray($element);\n var destination = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.range.dynamic.template.PositionTemplateSerializer.parseRelativeTransformAsArray..' call\n var tmp0_safe_receiver = get_jsonPrimitive(element).p17();\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n return tmp.deserialize(destination);\n };\n }\n function PositionTemplate$PositionTemplateSerializer$descriptor$lambda($this$buildClassSerialDescriptor) {\n $this$buildClassSerialDescriptor.cl('origin', CustomSerializer_getInstance_2().l17().ok());\n $this$buildClassSerialDescriptor.cl('transform', RelativeTransformSerializer_getInstance().l17().ok());\n return Unit_instance;\n }\n function PositionTemplate_init_$Init$(origin, transform, $this) {\n PositionTemplate.call($this, PositionTemplateSerializer_getInstance().z46_1.j15(CustomSerializer_getInstance_2().l17(), origin), RelativeTransformFromVector(transform.position, transform.rotation));\n return $this;\n }\n function PositionTemplateFromString(origin, transform) {\n return PositionTemplate_init_$Init$(origin, transform, objectCreate(protoOf(PositionTemplate)));\n }\n function PositionTemplateSerializer() {\n PositionTemplateSerializer_instance = this;\n this.IDENTITY = new PositionTemplate(new OriginTemplate(new RelationOrigin(), OriginRelativeTo_SIZE_getInstance()), new RelativeTransform());\n var tmp = this;\n tmp.z46_1 = Json(VOID, PositionTemplate$PositionTemplateSerializer$jsonParser$lambda);\n var tmp_0 = this;\n tmp_0.a47_1 = buildClassSerialDescriptor('PositionTemplate', [], PositionTemplate$PositionTemplateSerializer$descriptor$lambda);\n }\n protoOf(PositionTemplateSerializer).x2c = function () {\n return this.IDENTITY;\n };\n protoOf(PositionTemplateSerializer).qk = function (decoder) {\n var element = decoder.mn(Companion_instance_3.l17());\n var tmp;\n if (element instanceof JsonObject) {\n var tmp_0;\n if (element.o17('origin') == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.PositionTemplateSerializer.deserialize.' call\n var tmp0_safe_receiver = element.o17('transform');\n var tmp_1;\n if (tmp0_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.PositionTemplateSerializer.deserialize..' call\n tmp_1 = new PositionTemplate(parseOrigin_0(PositionTemplateSerializer_getInstance(), element), parseRelativeTransform(PositionTemplateSerializer_getInstance(), tmp0_safe_receiver));\n }\n var tmp1_elvis_lhs = tmp_1;\n tmp_0 = tmp1_elvis_lhs == null ? new PositionTemplate(parseOrigin_0(PositionTemplateSerializer_getInstance(), element), new RelativeTransform()) : tmp1_elvis_lhs;\n }\n var tmp2_elvis_lhs = tmp_0;\n var tmp_2;\n if (tmp2_elvis_lhs == null) {\n var tmp1_safe_receiver = element.o17('transform');\n var tmp_3;\n if (tmp1_safe_receiver == null) {\n tmp_3 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.dynamic.template.PositionTemplateSerializer.deserialize.' call\n tmp_3 = new PositionTemplate(new OriginTemplate(new RelationOrigin(), OriginRelativeTo_SIZE_getInstance()), parseRelativeTransform(PositionTemplateSerializer_getInstance(), tmp1_safe_receiver));\n }\n tmp_2 = tmp_3;\n } else {\n tmp_2 = tmp2_elvis_lhs;\n }\n var tmp3_elvis_lhs = tmp_2;\n tmp = tmp3_elvis_lhs == null ? new PositionTemplate(new OriginTemplate(new RelationOrigin(), OriginRelativeTo_SIZE_getInstance()), parseRelativeTransform(this, element)) : tmp3_elvis_lhs;\n } else {\n if (element instanceof JsonArray) {\n tmp = new PositionTemplate(new OriginTemplate(new RelationOrigin(), OriginRelativeTo_SIZE_getInstance()), parseRelativeTransformAsArray(this, element));\n } else {\n tmp = new PositionTemplate(new OriginTemplate(this.z46_1.j15(RelationOriginSerializer_getInstance(), toString(element)), OriginRelativeTo_SIZE_getInstance()), new RelativeTransform());\n }\n }\n return tmp;\n };\n protoOf(PositionTemplateSerializer).ok = function () {\n return this.a47_1;\n };\n protoOf(PositionTemplateSerializer).r48 = function (encoder, value) {\n var transform = (!value.b47_1.position.isOrigin ? true : !value.b47_1.rotation.equals(Companion_getInstance_2().IDENTITY)) ? value.b47_1 : null;\n var origin = !value.origin.isDefault ? value.origin : null;\n if (!(transform == null) ? !(origin == null) : false) {\n var comp = encoder.nn(this.a47_1);\n comp.ep(this.a47_1, 0, CustomSerializer_getInstance_2().l17(), origin);\n comp.ep(this.a47_1, 1, RelativeTransformSerializer_getInstance().l17(), transform);\n comp.on(this.a47_1);\n } else if (!(transform == null)) {\n var desc = ListSerializer(Companion_getInstance_39().l17()).ok();\n var comp_0 = encoder.jp(desc, 6);\n RelativeTransformSerializer_getInstance().encodeToArray(comp_0, desc, transform, 0);\n comp_0.on(this.a47_1);\n } else if (!(origin == null)) {\n if (origin.kotlinRelativeTo.equals(OriginRelativeTo_SIZE_getInstance())) {\n encoder.ro(origin.relation.toString());\n } else {\n var comp_1 = encoder.nn(this.a47_1);\n comp_1.ep(this.a47_1, 0, CustomSerializer_getInstance_2().l17(), origin);\n comp_1.on(this.a47_1);\n }\n } else {\n encoder.ro('center');\n }\n };\n protoOf(PositionTemplateSerializer).pk = function (encoder, value) {\n return this.r48(encoder, value instanceof PositionTemplate ? value : THROW_CCE());\n };\n protoOf(PositionTemplateSerializer).l17 = function () {\n return PositionTemplateSerializer_getInstance();\n };\n var PositionTemplateSerializer_instance;\n function PositionTemplateSerializer_getInstance() {\n if (PositionTemplateSerializer_instance == null)\n new PositionTemplateSerializer();\n return PositionTemplateSerializer_instance;\n }\n function PositionTemplate$absoluteTransform$delegate$lambda(this$0) {\n return function () {\n return new Transform(this$0.b47_1.position.getAbsolutePosition(), this$0.b47_1.rotation);\n };\n }\n function PositionTemplate(origin, transform) {\n PositionTemplateSerializer_getInstance();\n transform = transform === VOID ? new RelativeTransform() : transform;\n this.origin = origin;\n this.b47_1 = transform;\n var tmp = this;\n tmp.c47_1 = lazy(PositionTemplate$absoluteTransform$delegate$lambda(this));\n this.rotation = this.b47_1.rotation;\n }\n protoOf(PositionTemplate).j2h = function () {\n return this.origin;\n };\n protoOf(PositionTemplate).a1k = function () {\n return this.b47_1;\n };\n protoOf(PositionTemplate).x48 = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.c47_1;\n absoluteTransform$factory();\n return this_0.u2();\n };\n protoOf(PositionTemplate).v1k = function () {\n return this.rotation;\n };\n protoOf(PositionTemplate).applyToBox = function (aabb) {\n var tmp;\n switch (this.origin.relation.xKotlinEnum.x9_1) {\n case 0:\n tmp = aabb.min.X + this.b47_1.position.getRelativePosition(SizeFromVector(aabb.size)).X;\n break;\n case 2:\n tmp = aabb.max.X + this.b47_1.position.getRelativePosition(SizeFromVector(aabb.size)).X;\n break;\n default:\n tmp = this.b47_1.position.getRelativePosition(SizeFromVector(aabb.size)).X;\n break;\n }\n var tmp_0;\n switch (this.origin.relation.yKotlinEnum.x9_1) {\n case 2:\n tmp_0 = aabb.max.Y + this.b47_1.position.getRelativePosition(SizeFromVector(aabb.size)).Y;\n break;\n case 0:\n tmp_0 = aabb.min.Y + this.b47_1.position.getRelativePosition(SizeFromVector(aabb.size)).Y;\n break;\n default:\n tmp_0 = this.b47_1.position.getRelativePosition(SizeFromVector(aabb.size)).Y;\n break;\n }\n var tmp0 = this.origin.relation.zKotlinEnum.x9_1;\n return new Transform(new Vector(tmp, tmp_0, tmp0 === 0 ? aabb.min.Z + this.b47_1.position.getRelativePosition(SizeFromVector(aabb.size)).Z : tmp0 === 2 ? aabb.max.Z + this.b47_1.position.getRelativePosition(SizeFromVector(aabb.size)).Z : this.b47_1.position.getRelativePosition(SizeFromVector(aabb.size)).Z), this.b47_1.rotation);\n };\n protoOf(PositionTemplate).af = function () {\n return this.origin;\n };\n protoOf(PositionTemplate).y48 = function (origin, transform) {\n return new PositionTemplate(origin, transform);\n };\n protoOf(PositionTemplate).copy = function (origin, transform, $super) {\n origin = origin === VOID ? this.origin : origin;\n transform = transform === VOID ? this.b47_1 : transform;\n return this.y48(origin, transform);\n };\n protoOf(PositionTemplate).toString = function () {\n return 'PositionTemplate(origin=' + this.origin + ', transform=' + this.b47_1 + ')';\n };\n protoOf(PositionTemplate).hashCode = function () {\n var result = this.origin.hashCode();\n result = imul(result, 31) + this.b47_1.hashCode() | 0;\n return result;\n };\n protoOf(PositionTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PositionTemplate))\n return false;\n var tmp0_other_with_cast = other instanceof PositionTemplate ? other : THROW_CCE();\n if (!this.origin.equals(tmp0_other_with_cast.origin))\n return false;\n if (!this.b47_1.equals(tmp0_other_with_cast.b47_1))\n return false;\n return true;\n };\n function absoluteTransform$factory() {\n return getPropertyCallableRef('absoluteTransform', 1, KProperty1, function (receiver) {\n return receiver.absoluteTransform;\n }, null);\n }\n function Companion_28() {\n }\n protoOf(Companion_28).l17 = function () {\n return $serializer_getInstance_21();\n };\n var Companion_instance_33;\n function Companion_getInstance_34() {\n return Companion_instance_33;\n }\n function $serializer_17() {\n $serializer_instance_17 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.VisualLightSourceTemplate', this, 3);\n tmp0_serialDesc.cv('type', true);\n tmp0_serialDesc.cv('intensity', true);\n tmp0_serialDesc.cv('colorTemperature', true);\n this.z48_1 = tmp0_serialDesc;\n }\n protoOf($serializer_17).ok = function () {\n return this.z48_1;\n };\n protoOf($serializer_17).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [get_nullable(StringSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(IntSerializer_getInstance())];\n };\n protoOf($serializer_17).qk = function (decoder) {\n var tmp0_desc = this.z48_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.bo(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, IntSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.bo(tmp0_desc, 2, IntSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.bo(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, IntSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.bo(tmp0_desc, 2, IntSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return VisualLightSourceTemplate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_17).a49 = function (encoder, value) {\n var tmp0_desc = this.z48_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !(value.type == null)) {\n tmp1_output.gp(tmp0_desc, 0, StringSerializer_getInstance(), value.type);\n }\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.intensity == null)) {\n tmp1_output.gp(tmp0_desc, 1, IntSerializer_getInstance(), value.intensity);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.colorTemperature == null)) {\n tmp1_output.gp(tmp0_desc, 2, IntSerializer_getInstance(), value.colorTemperature);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_17).pk = function (encoder, value) {\n return this.a49(encoder, value instanceof VisualLightSourceTemplate ? value : THROW_CCE());\n };\n var $serializer_instance_17;\n function $serializer_getInstance_21() {\n if ($serializer_instance_17 == null)\n new $serializer_17();\n return $serializer_instance_17;\n }\n function VisualLightSourceTemplate_init_$Init$(seen1, type, intensity, colorTemperature, serializationConstructorMarker, $this) {\n if (!(0 === (0 & seen1))) {\n throwMissingFieldException(seen1, 0, $serializer_getInstance_21().z48_1);\n }\n if (0 === (seen1 & 1))\n $this.type = null;\n else\n $this.type = type;\n if (0 === (seen1 & 2))\n $this.intensity = null;\n else\n $this.intensity = intensity;\n if (0 === (seen1 & 4))\n $this.colorTemperature = null;\n else\n $this.colorTemperature = colorTemperature;\n return $this;\n }\n function VisualLightSourceTemplate_init_$Create$(seen1, type, intensity, colorTemperature, serializationConstructorMarker) {\n return VisualLightSourceTemplate_init_$Init$(seen1, type, intensity, colorTemperature, serializationConstructorMarker, objectCreate(protoOf(VisualLightSourceTemplate)));\n }\n function VisualLightSourceTemplate(type, intensity, colorTemperature) {\n type = type === VOID ? null : type;\n intensity = intensity === VOID ? null : intensity;\n colorTemperature = colorTemperature === VOID ? null : colorTemperature;\n this.type = type;\n this.intensity = intensity;\n this.colorTemperature = colorTemperature;\n }\n protoOf(VisualLightSourceTemplate).a1x = function () {\n return this.type;\n };\n protoOf(VisualLightSourceTemplate).w3z = function () {\n return this.intensity;\n };\n protoOf(VisualLightSourceTemplate).x3z = function () {\n return this.colorTemperature;\n };\n protoOf(VisualLightSourceTemplate).af = function () {\n return this.type;\n };\n protoOf(VisualLightSourceTemplate).bf = function () {\n return this.intensity;\n };\n protoOf(VisualLightSourceTemplate).g1k = function () {\n return this.colorTemperature;\n };\n protoOf(VisualLightSourceTemplate).b49 = function (type, intensity, colorTemperature) {\n return new VisualLightSourceTemplate(type, intensity, colorTemperature);\n };\n protoOf(VisualLightSourceTemplate).copy = function (type, intensity, colorTemperature, $super) {\n type = type === VOID ? this.type : type;\n intensity = intensity === VOID ? this.intensity : intensity;\n colorTemperature = colorTemperature === VOID ? this.colorTemperature : colorTemperature;\n return this.b49(type, intensity, colorTemperature);\n };\n protoOf(VisualLightSourceTemplate).toString = function () {\n return 'VisualLightSourceTemplate(type=' + this.type + ', intensity=' + this.intensity + ', colorTemperature=' + this.colorTemperature + ')';\n };\n protoOf(VisualLightSourceTemplate).hashCode = function () {\n var result = this.type == null ? 0 : getStringHashCode(this.type);\n result = imul(result, 31) + (this.intensity == null ? 0 : this.intensity) | 0;\n result = imul(result, 31) + (this.colorTemperature == null ? 0 : this.colorTemperature) | 0;\n return result;\n };\n protoOf(VisualLightSourceTemplate).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof VisualLightSourceTemplate))\n return false;\n var tmp0_other_with_cast = other instanceof VisualLightSourceTemplate ? other : THROW_CCE();\n if (!(this.type == tmp0_other_with_cast.type))\n return false;\n if (!(this.intensity == tmp0_other_with_cast.intensity))\n return false;\n if (!(this.colorTemperature == tmp0_other_with_cast.colorTemperature))\n return false;\n return true;\n };\n function Companion_29() {\n }\n protoOf(Companion_29).l17 = function () {\n return $serializer_getInstance_22();\n };\n var Companion_instance_34;\n function Companion_getInstance_35() {\n return Companion_instance_34;\n }\n function $serializer_18() {\n $serializer_instance_18 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.hierarchy.ProductStructureConnectionTemplate', this, 3);\n tmp0_serialDesc.cv('offeringPartKey', false);\n tmp0_serialDesc.cv('demandingConnector', false);\n tmp0_serialDesc.cv('offeringConnector', false);\n this.c49_1 = tmp0_serialDesc;\n }\n protoOf($serializer_18).ok = function () {\n return this.c49_1;\n };\n protoOf($serializer_18).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance()];\n };\n protoOf($serializer_18).qk = function (decoder) {\n var tmp0_desc = this.c49_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return ProductStructureConnectionTemplate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_18).d49 = function (encoder, value) {\n var tmp0_desc = this.c49_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.offeringPartKey);\n tmp1_output.cp(tmp0_desc, 1, value.demandingConnector);\n tmp1_output.cp(tmp0_desc, 2, value.offeringConnector);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_18).pk = function (encoder, value) {\n return this.d49(encoder, value instanceof ProductStructureConnectionTemplate ? value : THROW_CCE());\n };\n var $serializer_instance_18;\n function $serializer_getInstance_22() {\n if ($serializer_instance_18 == null)\n new $serializer_18();\n return $serializer_instance_18;\n }\n function ProductStructureConnectionTemplate_init_$Init$(seen1, offeringPartKey, demandingConnector, offeringConnector, serializationConstructorMarker, $this) {\n if (!(7 === (7 & seen1))) {\n throwMissingFieldException(seen1, 7, $serializer_getInstance_22().c49_1);\n }\n $this.offeringPartKey = offeringPartKey;\n $this.demandingConnector = demandingConnector;\n $this.offeringConnector = offeringConnector;\n return $this;\n }\n function ProductStructureConnectionTemplate_init_$Create$(seen1, offeringPartKey, demandingConnector, offeringConnector, serializationConstructorMarker) {\n return ProductStructureConnectionTemplate_init_$Init$(seen1, offeringPartKey, demandingConnector, offeringConnector, serializationConstructorMarker, objectCreate(protoOf(ProductStructureConnectionTemplate)));\n }\n function ProductStructureConnectionTemplate(offeringPartKey, demandingConnector, offeringConnector) {\n this.offeringPartKey = offeringPartKey;\n this.demandingConnector = demandingConnector;\n this.offeringConnector = offeringConnector;\n }\n protoOf(ProductStructureConnectionTemplate).o1m = function () {\n return this.offeringPartKey;\n };\n protoOf(ProductStructureConnectionTemplate).p1m = function () {\n return this.demandingConnector;\n };\n protoOf(ProductStructureConnectionTemplate).q1m = function () {\n return this.offeringConnector;\n };\n function Companion_30() {\n }\n protoOf(Companion_30).l17 = function () {\n return $serializer_getInstance_23();\n };\n var Companion_instance_35;\n function Companion_getInstance_36() {\n return Companion_instance_35;\n }\n function $serializer_19() {\n $serializer_instance_19 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.hierarchy.ProductStructureItemTemplate', this, 3);\n tmp0_serialDesc.cv('partKey', false);\n tmp0_serialDesc.cv('snap', true);\n tmp0_serialDesc.cv('transform', true);\n this.e49_1 = tmp0_serialDesc;\n }\n protoOf($serializer_19).ok = function () {\n return this.e49_1;\n };\n protoOf($serializer_19).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), get_nullable($serializer_getInstance_22()), PositionTemplateSerializer_getInstance()];\n };\n protoOf($serializer_19).qk = function (decoder) {\n var tmp0_desc = this.e49_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, $serializer_getInstance_22(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, PositionTemplateSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, $serializer_getInstance_22(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, PositionTemplateSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return ProductStructureItemTemplate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_19).f49 = function (encoder, value) {\n var tmp0_desc = this.e49_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.partKey);\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.snap == null)) {\n tmp1_output.gp(tmp0_desc, 1, $serializer_getInstance_22(), value.snap);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !value.transform.equals(PositionTemplateSerializer_getInstance().IDENTITY)) {\n tmp1_output.ep(tmp0_desc, 2, PositionTemplateSerializer_getInstance(), value.transform);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_19).pk = function (encoder, value) {\n return this.f49(encoder, value instanceof ProductStructureItemTemplate ? value : THROW_CCE());\n };\n var $serializer_instance_19;\n function $serializer_getInstance_23() {\n if ($serializer_instance_19 == null)\n new $serializer_19();\n return $serializer_instance_19;\n }\n function ProductStructureItemTemplate_init_$Init$(seen1, partKey, snap, transform, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_23().e49_1);\n }\n $this.partKey = partKey;\n if (0 === (seen1 & 2))\n $this.snap = null;\n else\n $this.snap = snap;\n if (0 === (seen1 & 4))\n $this.transform = PositionTemplateSerializer_getInstance().IDENTITY;\n else\n $this.transform = transform;\n return $this;\n }\n function ProductStructureItemTemplate_init_$Create$(seen1, partKey, snap, transform, serializationConstructorMarker) {\n return ProductStructureItemTemplate_init_$Init$(seen1, partKey, snap, transform, serializationConstructorMarker, objectCreate(protoOf(ProductStructureItemTemplate)));\n }\n function ProductStructureItemTemplate(partKey, snap, transform) {\n snap = snap === VOID ? null : snap;\n transform = transform === VOID ? PositionTemplateSerializer_getInstance().IDENTITY : transform;\n this.partKey = partKey;\n this.snap = snap;\n this.transform = transform;\n }\n protoOf(ProductStructureItemTemplate).z1j = function () {\n return this.partKey;\n };\n protoOf(ProductStructureItemTemplate).s1m = function () {\n return this.snap;\n };\n protoOf(ProductStructureItemTemplate).d1x = function () {\n return this.transform;\n };\n function _get_$cachedSerializer__te6jhj($this) {\n return $this.i48_1.u2();\n }\n function OriginRelativeTo$Companion$_anonymous__8s7o4e() {\n var tmp = values();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = ['bound', 'size'];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = [null, null];\n return createAnnotatedEnumSerializer('com.ikea.range.dynamic.template.objects.OriginRelativeTo', tmp, tmp_0, tmp$ret$5, null);\n }\n var OriginRelativeTo_BOUND_instance;\n var OriginRelativeTo_SIZE_instance;\n function Companion_31() {\n Companion_instance_36 = this;\n var tmp = this;\n var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();\n tmp.i48_1 = lazy_0(tmp_0, OriginRelativeTo$Companion$_anonymous__8s7o4e);\n }\n protoOf(Companion_31).l17 = function () {\n return _get_$cachedSerializer__te6jhj(this);\n };\n protoOf(Companion_31).ew = function (typeParamsSerializers) {\n return this.l17();\n };\n var Companion_instance_36;\n function Companion_getInstance_37() {\n OriginRelativeTo_initEntries();\n if (Companion_instance_36 == null)\n new Companion_31();\n return Companion_instance_36;\n }\n function values() {\n return [OriginRelativeTo_BOUND_getInstance(), OriginRelativeTo_SIZE_getInstance()];\n }\n function valueOf_0(value) {\n switch (value) {\n case 'BOUND':\n return OriginRelativeTo_BOUND_getInstance();\n case 'SIZE':\n return OriginRelativeTo_SIZE_getInstance();\n default:\n OriginRelativeTo_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var OriginRelativeTo_entriesInitialized;\n function OriginRelativeTo_initEntries() {\n if (OriginRelativeTo_entriesInitialized)\n return Unit_instance;\n OriginRelativeTo_entriesInitialized = true;\n OriginRelativeTo_BOUND_instance = new OriginRelativeTo('BOUND', 0);\n OriginRelativeTo_SIZE_instance = new OriginRelativeTo('SIZE', 1);\n Companion_getInstance_37();\n }\n function OriginRelativeTo(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function OriginRelativeTo_BOUND_getInstance() {\n OriginRelativeTo_initEntries();\n return OriginRelativeTo_BOUND_instance;\n }\n function OriginRelativeTo_SIZE_getInstance() {\n OriginRelativeTo_initEntries();\n return OriginRelativeTo_SIZE_instance;\n }\n function OriginRelativeToImpostor() {\n OriginRelativeToImpostor_instance = this;\n this.BOUND = 0;\n this.SIZE = 1;\n this.i49_1 = values();\n }\n protoOf(OriginRelativeToImpostor).j49 = function () {\n return this.BOUND;\n };\n protoOf(OriginRelativeToImpostor).k49 = function () {\n return this.SIZE;\n };\n protoOf(OriginRelativeToImpostor).toEnum = function (value) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.first' call\n var indexedObject = this.i49_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.objects.OriginRelativeToImpostor.toEnum.' call\n if (element.x9_1 === value) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n throw NoSuchElementException_init_$Create$('Array contains no element matching the predicate.');\n }\n return tmp$ret$1;\n };\n var OriginRelativeToImpostor_instance;\n function OriginRelativeToImpostor_getInstance() {\n if (OriginRelativeToImpostor_instance == null)\n new OriginRelativeToImpostor();\n return OriginRelativeToImpostor_instance;\n }\n var PositionType_ABSOLUTE_instance;\n var PositionType_PERCENTAGE_RELATIVE_SIZE_instance;\n function Companion_32() {\n Companion_instance_37 = this;\n this.l49_1 = values_0();\n }\n protoOf(Companion_32).getByValue = function (value) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.first' call\n var indexedObject = this.l49_1;\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.template.objects.Companion.getByValue.' call\n if (element.x9_1 === value) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n throw NoSuchElementException_init_$Create$('Array contains no element matching the predicate.');\n }\n return tmp$ret$1;\n };\n var Companion_instance_37;\n function Companion_getInstance_38() {\n PositionType_initEntries();\n if (Companion_instance_37 == null)\n new Companion_32();\n return Companion_instance_37;\n }\n function values_0() {\n return [PositionType_ABSOLUTE_getInstance(), PositionType_PERCENTAGE_RELATIVE_SIZE_getInstance()];\n }\n function valueOf_1(value) {\n switch (value) {\n case 'ABSOLUTE':\n return PositionType_ABSOLUTE_getInstance();\n case 'PERCENTAGE_RELATIVE_SIZE':\n return PositionType_PERCENTAGE_RELATIVE_SIZE_getInstance();\n default:\n PositionType_initEntries();\n THROW_IAE('No enum constant value.');\n break;\n }\n }\n var PositionType_entriesInitialized;\n function PositionType_initEntries() {\n if (PositionType_entriesInitialized)\n return Unit_instance;\n PositionType_entriesInitialized = true;\n PositionType_ABSOLUTE_instance = new PositionType('ABSOLUTE', 0);\n PositionType_PERCENTAGE_RELATIVE_SIZE_instance = new PositionType('PERCENTAGE_RELATIVE_SIZE', 1);\n Companion_getInstance_38();\n }\n function PositionType(name, ordinal) {\n Enum.call(this, name, ordinal);\n }\n function PositionType_ABSOLUTE_getInstance() {\n PositionType_initEntries();\n return PositionType_ABSOLUTE_instance;\n }\n function PositionType_PERCENTAGE_RELATIVE_SIZE_getInstance() {\n PositionType_initEntries();\n return PositionType_PERCENTAGE_RELATIVE_SIZE_instance;\n }\n function PositionTypeImpostor() {\n this.ABSOLUTE = 0;\n this.PERCENTAGE_RELATIVE_SIZE = 1;\n }\n protoOf(PositionTypeImpostor).o49 = function () {\n return this.ABSOLUTE;\n };\n protoOf(PositionTypeImpostor).p49 = function () {\n return this.PERCENTAGE_RELATIVE_SIZE;\n };\n var PositionTypeImpostor_instance;\n function PositionTypeImpostor_getInstance() {\n return PositionTypeImpostor_instance;\n }\n function Companion_33() {\n Companion_instance_38 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.w48_1 = [null, createSimpleEnumSerializer('com.ikea.range.dynamic.template.objects.PositionType', values_0())];\n }\n protoOf(Companion_33).fromString = function (s) {\n var tmp;\n if (s == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.text.filter' call\n // Inline function 'kotlin.text.filterTo' call\n var destination = StringBuilder_init_$Create$();\n var inductionVariable = 0;\n var last = charSequenceLength(s);\n if (inductionVariable < last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var element = charSequenceGet(s, index);\n // Inline function 'com.ikea.range.dynamic.template.objects.Companion.fromString.' call\n if (!(element === _Char___init__impl__6a9atx(37))) {\n destination.z5(element);\n }\n }\n while (inductionVariable < last);\n tmp = destination.toString();\n }\n var tmp1_safe_receiver = tmp;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toDouble(tmp1_safe_receiver);\n return new PositionValue(tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs, (!(s == null) ? contains_0(s, _Char___init__impl__6a9atx(37)) : false) ? PositionType_PERCENTAGE_RELATIVE_SIZE_getInstance() : PositionType_ABSOLUTE_getInstance());\n };\n protoOf(Companion_33).l17 = function () {\n return $serializer_getInstance_24();\n };\n var Companion_instance_38;\n function Companion_getInstance_39() {\n if (Companion_instance_38 == null)\n new Companion_33();\n return Companion_instance_38;\n }\n function $serializer_20() {\n $serializer_instance_20 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.objects.PositionValue', this, 2);\n tmp0_serialDesc.cv('value', false);\n tmp0_serialDesc.cv('type', true);\n this.q49_1 = tmp0_serialDesc;\n }\n protoOf($serializer_20).ok = function () {\n return this.q49_1;\n };\n protoOf($serializer_20).rv = function () {\n var tmp0_cached = Companion_getInstance_39().w48_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [DoubleSerializer_getInstance(), tmp0_cached[1]];\n };\n protoOf($serializer_20).qk = function (decoder) {\n var tmp0_desc = this.q49_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = 0.0;\n var tmp5_local1 = null;\n var tmp6_input = decoder.nn(tmp0_desc);\n var tmp7_cached = Companion_getInstance_39().w48_1;\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return PositionValue_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);\n };\n protoOf($serializer_20).r49 = function (encoder, value) {\n var tmp0_desc = this.q49_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_39().w48_1;\n tmp1_output.ap(tmp0_desc, 0, value.value);\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !value.typeKotlin.equals(PositionType_ABSOLUTE_getInstance())) {\n tmp1_output.ep(tmp0_desc, 1, tmp2_cached[1], value.typeKotlin);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_20).pk = function (encoder, value) {\n return this.r49(encoder, value instanceof PositionValue ? value : THROW_CCE());\n };\n var $serializer_instance_20;\n function $serializer_getInstance_24() {\n if ($serializer_instance_20 == null)\n new $serializer_20();\n return $serializer_instance_20;\n }\n function PositionValue_init_$Init$(seen1, value, type, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_24().q49_1);\n }\n $this.value = value;\n if (0 === (seen1 & 2))\n $this.typeKotlin = PositionType_ABSOLUTE_getInstance();\n else\n $this.typeKotlin = type;\n return $this;\n }\n function PositionValue_init_$Create$(seen1, value, type, serializationConstructorMarker) {\n return PositionValue_init_$Init$(seen1, value, type, serializationConstructorMarker, objectCreate(protoOf(PositionValue)));\n }\n function PositionValue(value, type) {\n Companion_getInstance_39();\n type = type === VOID ? PositionType_ABSOLUTE_getInstance() : type;\n this.value = value;\n this.typeKotlin = type;\n }\n protoOf(PositionValue).u2 = function () {\n return this.value;\n };\n protoOf(PositionValue).s49 = function () {\n return this.typeKotlin;\n };\n protoOf(PositionValue).a1x = function () {\n return this.typeKotlin.x9_1;\n };\n protoOf(PositionValue).af = function () {\n return this.value;\n };\n protoOf(PositionValue).bf = function () {\n return this.typeKotlin;\n };\n protoOf(PositionValue).t49 = function (value, type) {\n return new PositionValue(value, type);\n };\n protoOf(PositionValue).copy = function (value, type, $super) {\n value = value === VOID ? this.value : value;\n type = type === VOID ? this.typeKotlin : type;\n return this.t49(value, type);\n };\n protoOf(PositionValue).toString = function () {\n return 'PositionValue(value=' + this.value + ', type=' + this.typeKotlin + ')';\n };\n protoOf(PositionValue).hashCode = function () {\n var result = getNumberHashCode(this.value);\n result = imul(result, 31) + this.typeKotlin.hashCode() | 0;\n return result;\n };\n protoOf(PositionValue).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PositionValue))\n return false;\n var tmp0_other_with_cast = other instanceof PositionValue ? other : THROW_CCE();\n if (!equals(this.value, tmp0_other_with_cast.value))\n return false;\n if (!this.typeKotlin.equals(tmp0_other_with_cast.typeKotlin))\n return false;\n return true;\n };\n function RelativePosition$Companion$descriptor$lambda($this$buildClassSerialDescriptor) {\n $this$buildClassSerialDescriptor.cl('x', Companion_getInstance_39().l17().ok());\n $this$buildClassSerialDescriptor.cl('y', Companion_getInstance_39().l17().ok());\n $this$buildClassSerialDescriptor.cl('z', Companion_getInstance_39().l17().ok());\n return Unit_instance;\n }\n function RelativePosition_init_$Init$(position, $this) {\n RelativePosition.call($this, new PositionValue(position.X), new PositionValue(position.Y), new PositionValue(position.Z));\n return $this;\n }\n function RelativePositionFromPosition(position) {\n return RelativePosition_init_$Init$(position, objectCreate(protoOf(RelativePosition)));\n }\n function _get_hasAnyPercentage__wplq75($this) {\n return ($this.s48_1.typeKotlin.equals(PositionType_PERCENTAGE_RELATIVE_SIZE_getInstance()) ? true : $this.t48_1.typeKotlin.equals(PositionType_PERCENTAGE_RELATIVE_SIZE_getInstance())) ? true : $this.u48_1.typeKotlin.equals(PositionType_PERCENTAGE_RELATIVE_SIZE_getInstance());\n }\n function Companion_34() {\n Companion_instance_39 = this;\n this.logger = LoggerState_getInstance().m1m('RelativePosition');\n var tmp = this;\n tmp.u49_1 = buildClassSerialDescriptor('RelativePosition', [], RelativePosition$Companion$descriptor$lambda);\n }\n protoOf(Companion_34).x1i = function () {\n return this.logger;\n };\n protoOf(Companion_34).v49 = function (encoder, descriptor, position, startIndex) {\n this.encodePositionValue(encoder, descriptor, position.s48_1, startIndex);\n this.encodePositionValue(encoder, descriptor, position.t48_1, startIndex + 1 | 0);\n this.encodePositionValue(encoder, descriptor, position.u48_1, startIndex + 2 | 0);\n };\n protoOf(Companion_34).encodeToArray = function (encoder, descriptor, position, startIndex, $super) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n return this.v49(encoder, descriptor, position, startIndex);\n };\n protoOf(Companion_34).encodePositionValue = function (encoder, descriptor, position, index) {\n if (position.typeKotlin.equals(PositionType_ABSOLUTE_getInstance())) {\n encoder.ap(descriptor, index, position.value);\n } else {\n encoder.cp(descriptor, index, '' + position.value + '%');\n }\n };\n protoOf(Companion_34).ok = function () {\n return this.u49_1;\n };\n protoOf(Companion_34).w49 = function (encoder, value) {\n var enc = encoder.nn(this.u49_1);\n if (!(value.s48_1.value === 0.0)) {\n this.encodePositionValue(enc, this.u49_1, value.s48_1, 0);\n }\n if (!(value.t48_1.value === 0.0)) {\n this.encodePositionValue(enc, this.u49_1, value.t48_1, 1);\n }\n if (!(value.u48_1.value === 0.0)) {\n this.encodePositionValue(enc, this.u49_1, value.u48_1, 2);\n }\n enc.on(this.u49_1);\n };\n protoOf(Companion_34).pk = function (encoder, value) {\n return this.w49(encoder, value instanceof RelativePosition ? value : THROW_CCE());\n };\n protoOf(Companion_34).qk = function (decoder) {\n var tmp0_desc = this.u49_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp9_input = decoder.nn(tmp0_desc);\n if (!tmp9_input.do())\n while (tmp1_flag) {\n tmp2_index = tmp9_input.eo(tmp0_desc);\n if (tmp2_index === -1)\n tmp1_flag = false;\n else\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n tmp9_input.on(tmp0_desc);\n if (!(0 === (0 & 0))) {\n throwMissingFieldException(0, 0, tmp0_desc);\n }\n return new RelativePosition(null, null, null);\n };\n protoOf(Companion_34).l17 = function () {\n return Companion_getInstance_40();\n };\n var Companion_instance_39;\n function Companion_getInstance_40() {\n if (Companion_instance_39 == null)\n new Companion_34();\n return Companion_instance_39;\n }\n function RelativePosition$getAbsolutePosition$lambda() {\n return \"Can't use absolute position on a transform defined with relative axes\";\n }\n function RelativePosition(x, y, z) {\n Companion_getInstance_40();\n this.s48_1 = x;\n this.t48_1 = y;\n this.u48_1 = z;\n this.v48_1 = new Vector(this.s48_1.value, this.t48_1.value, this.u48_1.value);\n this.isOrigin = (this.s48_1.value === 0.0 ? this.t48_1.value === 0.0 : false) ? this.u48_1.value === 0.0 : false;\n }\n protoOf(RelativePosition).getAbsolutePosition = function () {\n if (_get_hasAnyPercentage__wplq75(this)) {\n var tmp = Companion_getInstance_40().logger;\n tmp.error(RelativePosition$getAbsolutePosition$lambda);\n }\n return this.v48_1;\n };\n protoOf(RelativePosition).x49 = function () {\n return this.isOrigin;\n };\n protoOf(RelativePosition).getRelativePosition = function (size) {\n var tmp;\n switch (this.s48_1.typeKotlin.x9_1) {\n case 0:\n tmp = this.v48_1.X;\n break;\n case 1:\n tmp = size.s2e_1 * 0.01 * this.v48_1.X;\n break;\n default:\n noWhenBranchMatchedException();\n break;\n }\n var tmp_0 = tmp;\n var tmp_1;\n switch (this.t48_1.typeKotlin.x9_1) {\n case 0:\n tmp_1 = this.v48_1.Y;\n break;\n case 1:\n tmp_1 = size.t2e_1 * 0.01 * this.v48_1.Y;\n break;\n default:\n noWhenBranchMatchedException();\n break;\n }\n var tmp_2 = tmp_1;\n var tmp_3;\n switch (this.u48_1.typeKotlin.x9_1) {\n case 0:\n tmp_3 = this.v48_1.Z;\n break;\n case 1:\n tmp_3 = size.u2e_1 * 0.01 * this.v48_1.Z;\n break;\n default:\n noWhenBranchMatchedException();\n break;\n }\n return new Vector(tmp_0, tmp_2, tmp_3);\n };\n protoOf(RelativePosition).y49 = function (x, y, z) {\n return new RelativePosition(x, y, z);\n };\n protoOf(RelativePosition).copy = function (x, y, z, $super) {\n x = x === VOID ? this.s48_1 : x;\n y = y === VOID ? this.t48_1 : y;\n z = z === VOID ? this.u48_1 : z;\n return this.y49(x, y, z);\n };\n protoOf(RelativePosition).toString = function () {\n return 'RelativePosition(x=' + this.s48_1 + ', y=' + this.t48_1 + ', z=' + this.u48_1 + ')';\n };\n protoOf(RelativePosition).hashCode = function () {\n var result = this.s48_1.hashCode();\n result = imul(result, 31) + this.t48_1.hashCode() | 0;\n result = imul(result, 31) + this.u48_1.hashCode() | 0;\n return result;\n };\n protoOf(RelativePosition).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RelativePosition))\n return false;\n var tmp0_other_with_cast = other instanceof RelativePosition ? other : THROW_CCE();\n if (!this.s48_1.equals(tmp0_other_with_cast.s48_1))\n return false;\n if (!this.t48_1.equals(tmp0_other_with_cast.t48_1))\n return false;\n if (!this.u48_1.equals(tmp0_other_with_cast.u48_1))\n return false;\n return true;\n };\n function RelativeTransform_init_$Init$(position, rotation, $this) {\n RelativeTransform.call($this, RelativePositionFromPosition(position), rotation);\n return $this;\n }\n function RelativeTransformFromVector(position, rotation) {\n return RelativeTransform_init_$Init$(position, rotation, objectCreate(protoOf(RelativeTransform)));\n }\n function RelativeTransformSerializer() {\n RelativeTransformSerializer_instance = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.dynamic.template.objects.RelativeTransform', null, 2);\n tmp0_serialDesc.cv('position', true);\n tmp0_serialDesc.cv('rotation', true);\n this.q48_1 = tmp0_serialDesc;\n }\n protoOf(RelativeTransformSerializer).z49 = function (encoder, descriptor, transform, startIndex) {\n Companion_getInstance_40().encodeToArray(encoder, descriptor, transform.position, startIndex);\n this.encodeRotationToArray(encoder, descriptor, transform.rotation, startIndex + 3 | 0);\n };\n protoOf(RelativeTransformSerializer).encodeToArray = function (encoder, descriptor, transform, startIndex, $super) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n return this.z49(encoder, descriptor, transform, startIndex);\n };\n protoOf(RelativeTransformSerializer).a4a = function (encoder, descriptor, rotation, startIndex) {\n var rotationEuler = rotation.toEulerDegrees();\n encoder.ap(descriptor, startIndex + 3 | 0, round(rotationEuler.X * 1000) / 1000);\n encoder.ap(descriptor, startIndex + 3 | 0, round(rotationEuler.Y * 1000) / 1000);\n encoder.ap(descriptor, startIndex + 3 | 0, round(rotationEuler.Z * 1000) / 1000);\n };\n protoOf(RelativeTransformSerializer).encodeRotationToArray = function (encoder, descriptor, rotation, startIndex, $super) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n return this.a4a(encoder, descriptor, rotation, startIndex);\n };\n protoOf(RelativeTransformSerializer).b4a = function (encoder, value) {\n var desc = ListSerializer(Companion_getInstance_39().l17()).ok();\n var comp = encoder.jp(desc, 6);\n this.encodeToArray(comp, desc, value, 0);\n comp.on(this.q48_1);\n };\n protoOf(RelativeTransformSerializer).pk = function (encoder, value) {\n return this.b4a(encoder, value instanceof RelativeTransform ? value : THROW_CCE());\n };\n protoOf(RelativeTransformSerializer).ok = function () {\n return this.q48_1;\n };\n protoOf(RelativeTransformSerializer).qk = function (decoder) {\n var tmp0_desc = this.q48_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_input = decoder.nn(tmp0_desc);\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, Companion_getInstance_40(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_2(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, Companion_getInstance_40(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_2(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n if (!(0 === (0 & tmp3_bitMask0))) {\n throwMissingFieldException(tmp3_bitMask0, 0, tmp0_desc);\n }\n if (0 === (tmp3_bitMask0 & 1))\n tmp4_local0 = RelativePositionFromPosition(Companion_getInstance_3().ZERO);\n if (0 === (tmp3_bitMask0 & 2))\n tmp5_local1 = Companion_getInstance_2().IDENTITY;\n return new RelativeTransform(tmp4_local0, tmp5_local1);\n };\n protoOf(RelativeTransformSerializer).l17 = function () {\n return RelativeTransformSerializer_getInstance();\n };\n var RelativeTransformSerializer_instance;\n function RelativeTransformSerializer_getInstance() {\n if (RelativeTransformSerializer_instance == null)\n new RelativeTransformSerializer();\n return RelativeTransformSerializer_instance;\n }\n function RelativeTransform(position, rotation) {\n RelativeTransformSerializer_getInstance();\n position = position === VOID ? RelativePositionFromPosition(Companion_getInstance_3().ZERO) : position;\n rotation = rotation === VOID ? Companion_getInstance_2().IDENTITY : rotation;\n this.position = position;\n this.rotation = rotation;\n }\n protoOf(RelativeTransform).ct = function () {\n return this.position;\n };\n protoOf(RelativeTransform).v1k = function () {\n return this.rotation;\n };\n protoOf(RelativeTransform).getPosition = function (size) {\n return this.position.getRelativePosition(size);\n };\n protoOf(RelativeTransform).af = function () {\n return this.position;\n };\n protoOf(RelativeTransform).bf = function () {\n return this.rotation;\n };\n protoOf(RelativeTransform).c4a = function (position, rotation) {\n return new RelativeTransform(position, rotation);\n };\n protoOf(RelativeTransform).copy = function (position, rotation, $super) {\n position = position === VOID ? this.position : position;\n rotation = rotation === VOID ? this.rotation : rotation;\n return this.c4a(position, rotation);\n };\n protoOf(RelativeTransform).toString = function () {\n return 'RelativeTransform(position=' + this.position + ', rotation=' + this.rotation + ')';\n };\n protoOf(RelativeTransform).hashCode = function () {\n var result = this.position.hashCode();\n result = imul(result, 31) + this.rotation.hashCode() | 0;\n return result;\n };\n protoOf(RelativeTransform).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof RelativeTransform))\n return false;\n var tmp0_other_with_cast = other instanceof RelativeTransform ? other : THROW_CCE();\n if (!this.position.equals(tmp0_other_with_cast.position))\n return false;\n if (!this.rotation.equals(tmp0_other_with_cast.rotation))\n return false;\n return true;\n };\n function getPositionValue(_this__u8e3s4, $this, key) {\n var tmp = Companion_getInstance_39();\n var tmp0_safe_receiver = _this__u8e3s4.o17(key);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);\n return tmp.fromString(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.p17());\n }\n function getDegrees(_this__u8e3s4, $this, key) {\n var tmp0_safe_receiver = _this__u8e3s4.o17(key);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : get_doubleOrNull(tmp1_safe_receiver);\n return new Degrees(tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs);\n }\n function NamedTransformObjectDeserializer() {\n }\n protoOf(NamedTransformObjectDeserializer).deserialize = function (jo) {\n return new RelativeTransform(new RelativePosition(getPositionValue(jo, this, 'x'), getPositionValue(jo, this, 'y'), getPositionValue(jo, this, 'z')), Companion_getInstance_2().fromEulerDegrees(getDegrees(jo, this, 'rx'), getDegrees(jo, this, 'ry'), getDegrees(jo, this, 'rz')));\n };\n var NamedTransformObjectDeserializer_instance;\n function NamedTransformObjectDeserializer_getInstance() {\n return NamedTransformObjectDeserializer_instance;\n }\n function RelationOriginSerializer() {\n RelationOriginSerializer_instance = this;\n this.d4a_1 = PrimitiveSerialDescriptor('Origin', STRING_getInstance());\n }\n protoOf(RelationOriginSerializer).ok = function () {\n return this.d4a_1;\n };\n protoOf(RelationOriginSerializer).l2e = function (encoder, value) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = value.xKotlinEnum.w9_1.toLowerCase();\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = value.yKotlinEnum.w9_1.toLowerCase();\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$5 = value.zKotlinEnum.w9_1.toLowerCase();\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = listOf([tmp, tmp_0, tmp$ret$5]);\n var destination = ArrayList_init_$Create$_0();\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.template.serializers.RelationOriginSerializer.serialize.' call\n if (!(element === 'center')) {\n destination.q(element);\n }\n }\n encoder.ro(joinToString(destination, '-'));\n };\n protoOf(RelationOriginSerializer).pk = function (encoder, value) {\n return this.l2e(encoder, value instanceof RelationOrigin ? value : THROW_CCE());\n };\n protoOf(RelationOriginSerializer).qk = function (decoder) {\n var text = decoder.in();\n return new RelationOrigin(contains_1(text, 'left') ? RelationOriginAlongX_LEFT_getInstance() : contains_1(text, 'right') ? RelationOriginAlongX_RIGHT_getInstance() : RelationOriginAlongX_CENTER_getInstance(), contains_1(text, 'top') ? RelationOriginAlongY_TOP_getInstance() : contains_1(text, 'bottom') ? RelationOriginAlongY_BOTTOM_getInstance() : RelationOriginAlongY_CENTER_getInstance(), contains_1(text, 'front') ? RelationOriginAlongZ_FRONT_getInstance() : contains_1(text, 'back') ? RelationOriginAlongZ_BACK_getInstance() : RelationOriginAlongZ_CENTER_getInstance());\n };\n var RelationOriginSerializer_instance;\n function RelationOriginSerializer_getInstance() {\n if (RelationOriginSerializer_instance == null)\n new RelationOriginSerializer();\n return RelationOriginSerializer_instance;\n }\n function RelativeTransformDeserializer() {\n }\n protoOf(RelativeTransformDeserializer).deserialize = function (elements) {\n var relativePosition = new RelativePosition(Companion_getInstance_39().fromString(elements.f1(0)), Companion_getInstance_39().fromString(elements.f1(1)), Companion_getInstance_39().fromString(elements.f1(2)));\n var rotation = Companion_getInstance_2().fromEulerDegrees(new Degrees(toDouble(elements.f1(3))), new Degrees(toDouble(elements.f1(4))), new Degrees(toDouble(elements.f1(5))));\n return new RelativeTransform(relativePosition, rotation);\n };\n var RelativeTransformDeserializer_instance;\n function RelativeTransformDeserializer_getInstance() {\n return RelativeTransformDeserializer_instance;\n }\n function RotationDegreeOfFreedomSerializer() {\n RotationDegreeOfFreedomSerializer_instance = this;\n var tmp = this;\n // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call\n // Inline function 'kotlinx.serialization.serializer' call\n // Inline function 'kotlinx.serialization.internal.cast' call\n var this_0 = serializer_0(createKType(PrimitiveClasses_getInstance().u7(), arrayOf([]), false));\n tmp.e4a_1 = (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).ok();\n }\n protoOf(RotationDegreeOfFreedomSerializer).ok = function () {\n return this.e4a_1;\n };\n protoOf(RotationDegreeOfFreedomSerializer).qk = function (decoder) {\n var s = decoder.in();\n // Inline function 'kotlin.text.uppercase' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$1 = s.toUpperCase();\n return valueOf(tmp$ret$1);\n };\n protoOf(RotationDegreeOfFreedomSerializer).f4a = function (encoder, value) {\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$1 = value.w9_1.toLowerCase();\n encoder.ro(tmp$ret$1);\n };\n protoOf(RotationDegreeOfFreedomSerializer).pk = function (encoder, value) {\n return this.f4a(encoder, value instanceof RotationDegreeOfFreedom ? value : THROW_CCE());\n };\n var RotationDegreeOfFreedomSerializer_instance;\n function RotationDegreeOfFreedomSerializer_getInstance() {\n if (RotationDegreeOfFreedomSerializer_instance == null)\n new RotationDegreeOfFreedomSerializer();\n return RotationDegreeOfFreedomSerializer_instance;\n }\n function get_logger_0() {\n _init_properties_Serializers_kt__wkoiy7();\n return logger_0;\n }\n var logger_0;\n function DynamicRangeParseError(msg, cause) {\n Exception_init_$Init$(msg, cause, this);\n captureStack(this, DynamicRangeParseError);\n }\n function parseAndCatch(errorMsg, parseCallback) {\n _init_properties_Serializers_kt__wkoiy7();\n try {\n return parseCallback();\n } catch ($p) {\n if ($p instanceof Exception) {\n var e = $p;\n var tmp = get_logger_0();\n tmp.error(parseAndCatch$lambda(errorMsg));\n throw new DynamicRangeParseError(errorMsg, e);\n } else {\n throw $p;\n }\n }\n }\n function parseAndCatch$lambda($errorMsg) {\n return function () {\n return $errorMsg;\n };\n }\n var properties_initialized_Serializers_kt_i0ph73;\n function _init_properties_Serializers_kt__wkoiy7() {\n if (!properties_initialized_Serializers_kt_i0ph73) {\n properties_initialized_Serializers_kt_i0ph73 = true;\n logger_0 = LoggerState_getInstance().m1m('DynamicRangeSerializers');\n }\n }\n function SizeSerializer() {\n SizeSerializer_instance = this;\n this.g4a_1 = ListSerializer(serializer_2(DoubleCompanionObject_instance));\n this.h4a_1 = this.g4a_1.ok();\n }\n protoOf(SizeSerializer).ok = function () {\n return this.h4a_1;\n };\n protoOf(SizeSerializer).r2e = function (encoder, value) {\n var list = listOf([value.s2e_1, value.t2e_1, value.u2e_1]);\n encoder.fp(this.g4a_1, list);\n };\n protoOf(SizeSerializer).pk = function (encoder, value) {\n return this.r2e(encoder, value instanceof Size ? value : THROW_CCE());\n };\n protoOf(SizeSerializer).qk = function (decoder) {\n var list = decoder.mn(this.g4a_1);\n return new Size(list.f1(0), list.f1(1), list.f1(2));\n };\n var SizeSerializer_instance;\n function SizeSerializer_getInstance() {\n if (SizeSerializer_instance == null)\n new SizeSerializer();\n return SizeSerializer_instance;\n }\n function SpacingSerializer() {\n SpacingSerializer_instance = this;\n this.i4a_1 = ListSerializer(serializer_2(DoubleCompanionObject_instance));\n this.j4a_1 = this.i4a_1.ok();\n }\n protoOf(SpacingSerializer).ok = function () {\n return this.j4a_1;\n };\n protoOf(SpacingSerializer).x10 = function (encoder, value) {\n encoder.po(value);\n };\n protoOf(SpacingSerializer).pk = function (encoder, value) {\n return this.x10(encoder, (!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE());\n };\n protoOf(SpacingSerializer).qk = function (decoder) {\n var jsonDecoder = isInterface(decoder, JsonDecoder) ? decoder : THROW_CCE();\n var jsonData = jsonDecoder.k17();\n var tmp;\n if (jsonData instanceof JsonArray) {\n tmp = (new Vector(get_double(get_jsonPrimitive(jsonData.f1(0))), get_double(get_jsonPrimitive(jsonData.f1(1))), get_double(get_jsonPrimitive(jsonData.f1(2))))).size;\n } else {\n if (jsonData instanceof JsonPrimitive) {\n tmp = get_double(jsonData);\n } else {\n throw SerializationException_init_$Create$('Unexpected JSON value for spacing');\n }\n }\n var value = tmp;\n return value;\n };\n var SpacingSerializer_instance;\n function SpacingSerializer_getInstance() {\n if (SpacingSerializer_instance == null)\n new SpacingSerializer();\n return SpacingSerializer_instance;\n }\n function CatalogGenerator() {\n this.k4a_1 = 0;\n }\n protoOf(CatalogGenerator).resetItemId = function () {\n this.k4a_1 = 0;\n };\n protoOf(CatalogGenerator).nextItemId = function () {\n var tmp1 = this.k4a_1;\n this.k4a_1 = tmp1 + 1 | 0;\n return tmp1;\n };\n protoOf(CatalogGenerator).l4a = function (id, templateId, size) {\n var tmp;\n if (!(size == null)) {\n tmp = trimIndent('\\n \"size\": {\\n \"width\": ' + size.s2e_1 + ',\\n \"depth\": ' + size.u2e_1 + ',\\n \"height\": ' + size.t2e_1 + '\\n },\\n \"comSize\": {\\n \"width\": ' + size.s2e_1 + ',\\n \"depth\": ' + size.u2e_1 + ',\\n \"height\": ' + size.t2e_1 + '\\n }\\n ');\n } else {\n tmp = '\"size\": {\\n \"width\": 500,\\n \"depth\": 300,\\n \"height\": 2100\\n },\\n \"comSize\": {\\n \"width\": 500,\\n \"depth\": 300,\\n \"height\": 2100\\n }';\n }\n var sizeStr = tmp;\n return trimIndent('\\n {\\n \"id\": \"' + id + '\",\\n \"template\": {\\n \"id\": \"' + templateId + '\",\\n ' + sizeStr + '\\n }\\n }\\n ');\n };\n protoOf(CatalogGenerator).generateProduct = function (id, templateId, size, $super) {\n id = id === VOID ? 'product-' + this.nextItemId() : id;\n size = size === VOID ? null : size;\n return this.l4a(id, templateId, size);\n };\n protoOf(CatalogGenerator).m4a = function (componentsStr, id, inherits) {\n var tmp;\n if (!(inherits == null)) {\n var list = joinToString_0(inherits, '\", \"', '\"', '\"');\n tmp = trimIndent('\\n \"inherits\": [\\n ' + list + '\\n ],\\n ');\n } else {\n tmp = '';\n }\n var inheritsStr = tmp;\n return trimIndent('\\n {\\n \"templateId\": \"' + id + '\",\\n \"name\": \"My Test Product\",\\n ' + inheritsStr + '\\n \"components\": {\\n ' + componentsStr + '\\n }\\n }\\n ');\n };\n protoOf(CatalogGenerator).generateTemplate = function (componentsStr, id, inherits, $super) {\n id = id === VOID ? 'template-' + this.nextItemId() : id;\n inherits = inherits === VOID ? null : inherits;\n return this.m4a(componentsStr, id, inherits);\n };\n protoOf(CatalogGenerator).n4a = function (components, id, inherits) {\n var tmp;\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(components.length === 0)) {\n // Inline function 'kotlin.collections.reduce' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (components.length === 0)\n throw UnsupportedOperationException_init_$Create$(\"Empty array can't be reduced.\");\n var accumulator = components[0];\n var inductionVariable = 1;\n var last = get_lastIndex(components);\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.dynamic.testutils.CatalogGenerator.generateTemplateFromList.' call\n var acc = accumulator;\n var curr = components[index];\n accumulator = trimIndent('\\n ' + acc + ',\\n ' + curr + '\\n ');\n }\n while (!(index === last));\n tmp = accumulator;\n } else {\n tmp = '';\n }\n var componentsStr = tmp;\n return this.generateTemplate(componentsStr, id, inherits);\n };\n protoOf(CatalogGenerator).generateTemplateFromList = function (components, id, inherits, $super) {\n var tmp;\n if (components === VOID) {\n // Inline function 'kotlin.emptyArray' call\n tmp = [];\n } else {\n tmp = components;\n }\n components = tmp;\n id = id === VOID ? 'template-' + this.nextItemId() : id;\n inherits = inherits === VOID ? null : inherits;\n return this.n4a(components, id, inherits);\n };\n protoOf(CatalogGenerator).generateTemplateFile = function (templates) {\n var templatsStr = joinToString_0(templates, ',\\n');\n return trimIndent('\\n {\\n \"range\": \"test-range\",\\n \"schemaVersion\": \"draft-01\",\\n \"rangeVersion\": \"1.0\",\\n \"templates\": [\\n ' + templatsStr + '\\n ]\\n }\\n ');\n };\n protoOf(CatalogGenerator).generateCatalog = function (products) {\n var productsStr = joinToString_0(products, ',\\n');\n return trimIndent('\\n {\\n \"range\": \"test-range\",\\n \"schemaVersion\": \"draft-01\",\\n \"rangeVersion\": \"1.0\",\\n \"products\": [\\n ' + productsStr + '\\n ]\\n }\\n ');\n };\n function parseMeta(data) {\n var result = new parseMeta$result$1();\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = data.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.dynamic.components.parseMeta.' call\n // Inline function 'kotlin.collections.component1' call\n var key = element.t2();\n // Inline function 'kotlin.collections.component2' call\n var value = element.u2();\n var json = toString(value);\n if (!(json === ''))\n result[key] = JSON.parse(json);\n }\n return result;\n }\n function parseMeta$result$1() {\n }\n //region block: post-declaration\n protoOf($serializer).sv = typeParametersSerializers;\n protoOf(DynamicProductCatalog).createCustomAssembly = createCustomAssembly;\n protoOf(DynamicProductCatalog).createCustomAssemblySpecification = createCustomAssemblySpecification;\n defineProp(protoOf(DynamicProductCatalog), 'thisClassIsGuaranteedToNotModifyOrQueryCoreState', function () {\n return this.a1m();\n });\n protoOf($serializer_0).sv = typeParametersSerializers;\n protoOf($serializer_1).sv = typeParametersSerializers;\n protoOf($serializer_2).sv = typeParametersSerializers;\n protoOf($serializer_3).sv = typeParametersSerializers;\n protoOf($serializer_4).sv = typeParametersSerializers;\n protoOf(MetaDataComponent).z1k = get_serializable;\n protoOf(MetaDataComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(MetaDataComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(MetaDataComponent), 'id', protoOf(MetaDataComponent).s1k);\n defineProp(protoOf(MetaDataComponent), 'metaData', protoOf(MetaDataComponent).t3z);\n defineProp(protoOf(MetaDataComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(MetaDataComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf(VisualLightSourceComponent).z1k = get_serializable;\n protoOf(VisualLightSourceComponent).a1l = get_doStoreInSnapshot;\n defineProp(protoOf(VisualLightSourceComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(VisualLightSourceComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(VisualLightSourceComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n protoOf($serializer_5).sv = typeParametersSerializers;\n protoOf($serializer_6).sv = typeParametersSerializers;\n protoOf($serializer_7).sv = typeParametersSerializers;\n protoOf($serializer_8).sv = typeParametersSerializers;\n protoOf($serializer_9).sv = typeParametersSerializers;\n defineProp(protoOf(TemplateEditorConnectorData), 'connectorKey', function () {\n return this.z21();\n });\n defineProp(protoOf(TemplateEditorConnectorData), 'style', function () {\n return this.l3s();\n });\n defineProp(protoOf(TemplateEditorConnectorData), 'selected', function () {\n return this.m3s();\n });\n defineProp(protoOf(TemplateEditorConnectorData), 'visible', function () {\n return this.n3s();\n });\n defineProp(protoOf(TemplateEditorConnectorData), 'active', function () {\n return this.o3s();\n });\n defineProp(protoOf(TemplateEditorConnectorData), 'showActivationDistance', function () {\n return this.p3s();\n }, function (value) {\n this.f41(value);\n });\n defineProp(protoOf(TemplateEditorConnectorData), 'showTransform', function () {\n return this.q3s();\n }, function (value) {\n this.g41(value);\n });\n defineProp(protoOf(DynamicComponentBuilder), 'product', function () {\n return this.n42();\n });\n defineProp(protoOf(DynamicComponentBuilder), 'templateData', function () {\n return this.o42();\n });\n defineProp(protoOf(DynamicComponentBuilder), 'template', function () {\n return this.v3x();\n });\n defineProp(protoOf(DynamicComponentBuilder), 'modelInfo', function () {\n return this.g40();\n });\n defineProp(protoOf(DynamicComponentBuilder), 'family', function () {\n return this.h2h();\n });\n defineProp(protoOf(DynamicComponentBuilder), 'name', function () {\n return this.mb();\n });\n defineProp(protoOf(DynamicComponentBuilder), 'catalog', function () {\n return this.m3x();\n });\n defineProp(protoOf(DynamicAssembly), 'name', function () {\n return this.mb();\n }, function (value) {\n this.p42(value);\n });\n defineProp(protoOf(DynamicShape), 'name', function () {\n return this.mb();\n }, function (value) {\n this.p42(value);\n });\n protoOf($serializer_10).sv = typeParametersSerializers;\n protoOf($serializer_11).sv = typeParametersSerializers;\n protoOf($serializer_12).sv = typeParametersSerializers;\n protoOf($serializer_13).sv = typeParametersSerializers;\n protoOf($serializer_14).sv = typeParametersSerializers;\n protoOf($serializer_15).sv = typeParametersSerializers;\n defineProp(protoOf(OriginTemplate), 'relativeTo', protoOf(OriginTemplate).q2d);\n protoOf($serializer_16).sv = typeParametersSerializers;\n defineProp(protoOf(PositionTemplate), 'relativeTransform', protoOf(PositionTemplate).a1k);\n defineProp(protoOf(PositionTemplate), 'absoluteTransform', protoOf(PositionTemplate).x48);\n protoOf($serializer_17).sv = typeParametersSerializers;\n protoOf($serializer_18).sv = typeParametersSerializers;\n protoOf($serializer_19).sv = typeParametersSerializers;\n defineProp(protoOf(OriginRelativeTo), 'name', protoOf(OriginRelativeTo).mb);\n defineProp(protoOf(OriginRelativeTo), 'ordinal', protoOf(OriginRelativeTo).nb);\n defineProp(protoOf(PositionType), 'name', protoOf(PositionType).mb);\n defineProp(protoOf(PositionType), 'ordinal', protoOf(PositionType).nb);\n protoOf($serializer_20).sv = typeParametersSerializers;\n defineProp(protoOf(PositionValue), 'type', protoOf(PositionValue).a1x);\n //endregion\n //region block: init\n Companion_instance_12 = new Companion_7();\n Companion_instance_13 = new Companion_8();\n Companion_instance_15 = new Companion_10();\n Companion_instance_16 = new Companion_11();\n Companion_instance_19 = new Companion_14();\n Companion_instance_20 = new Companion_15();\n Companion_instance_30 = new Companion_25();\n Companion_instance_31 = new Companion_26();\n Companion_instance_32 = new Companion_27();\n Companion_instance_33 = new Companion_28();\n Companion_instance_34 = new Companion_29();\n Companion_instance_35 = new Companion_30();\n PositionTypeImpostor_instance = new PositionTypeImpostor();\n NamedTransformObjectDeserializer_instance = new NamedTransformObjectDeserializer();\n RelativeTransformDeserializer_instance = new RelativeTransformDeserializer();\n //endregion\n //region block: exports\n function $jsExportAll$(_) {\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$catalog = $com$ikea$range$dynamic.catalog || ($com$ikea$range$dynamic.catalog = {});\n $com$ikea$range$dynamic$catalog.AutoAdaptGroup = AutoAdaptGroup;\n defineProp($com$ikea$range$dynamic$catalog.AutoAdaptGroup, 'CustomSerializer', CustomSerializer_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$catalog = $com$ikea$range$dynamic.catalog || ($com$ikea$range$dynamic.catalog = {});\n $com$ikea$range$dynamic$catalog.DynamicComponentResolver = DynamicComponentResolver;\n defineProp($com$ikea$range$dynamic$catalog.DynamicComponentResolver, 'Companion', Companion_getInstance_5);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$catalog = $com$ikea$range$dynamic.catalog || ($com$ikea$range$dynamic.catalog = {});\n $com$ikea$range$dynamic$catalog.DynamicProduct = DynamicProduct;\n defineProp($com$ikea$range$dynamic$catalog.DynamicProduct, 'Companion', Companion_getInstance_6);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$catalog = $com$ikea$range$dynamic.catalog || ($com$ikea$range$dynamic.catalog = {});\n $com$ikea$range$dynamic$catalog.DynamicProductCatalog = DynamicProductCatalog;\n defineProp($com$ikea$range$dynamic$catalog.DynamicProductCatalog, 'Companion', Companion_getInstance_7);\n $com$ikea$range$dynamic$catalog.PackedProductData = PackedProductData;\n defineProp($com$ikea$range$dynamic$catalog.PackedProductData, 'Companion', Companion_getInstance_8);\n $com$ikea$range$dynamic$catalog.DynamicProductData = DynamicProductData;\n defineProp($com$ikea$range$dynamic$catalog.DynamicProductData, 'Companion', Companion_getInstance_9);\n $com$ikea$range$dynamic$catalog.DynamicTemplateData = DynamicTemplateData;\n defineProp($com$ikea$range$dynamic$catalog.DynamicTemplateData, 'Companion', Companion_getInstance_10);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$catalog = $com$ikea$range$dynamic.catalog || ($com$ikea$range$dynamic.catalog = {});\n $com$ikea$range$dynamic$catalog.PackedProduct = PackedProduct;\n defineProp($com$ikea$range$dynamic$catalog.PackedProduct, 'Companion', Companion_getInstance_11);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$catalog = $com$ikea$range$dynamic.catalog || ($com$ikea$range$dynamic.catalog = {});\n $com$ikea$range$dynamic$catalog.ProductTemplate = ProductTemplate;\n defineProp($com$ikea$range$dynamic$catalog.ProductTemplate, 'Companion', Companion_getInstance_12);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$components = $com$ikea$range$dynamic.components || ($com$ikea$range$dynamic.components = {});\n $com$ikea$range$dynamic$components.MetaDataComponent = MetaDataComponent;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$components = $com$ikea$range$dynamic.components || ($com$ikea$range$dynamic.components = {});\n $com$ikea$range$dynamic$components.VisualLightSourceComponent = VisualLightSourceComponent;\n defineProp($com$ikea$range$dynamic$components.VisualLightSourceComponent, 'Companion', Companion_getInstance_13);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$productdata = $com$ikea$range$dynamic.productdata || ($com$ikea$range$dynamic.productdata = {});\n $com$ikea$range$dynamic$productdata.Bounds = Bounds;\n defineProp($com$ikea$range$dynamic$productdata.Bounds, 'Companion', Companion_getInstance_14);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$productdata = $com$ikea$range$dynamic.productdata || ($com$ikea$range$dynamic.productdata = {});\n $com$ikea$range$dynamic$productdata.CatalogTemplateData = CatalogTemplateData;\n defineProp($com$ikea$range$dynamic$productdata.CatalogTemplateData, 'Companion', Companion_getInstance_15);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$productdata = $com$ikea$range$dynamic.productdata || ($com$ikea$range$dynamic.productdata = {});\n $com$ikea$range$dynamic$productdata.ModelRenderInfo = ModelRenderInfo;\n defineProp($com$ikea$range$dynamic$productdata.ModelRenderInfo, 'Companion', Companion_getInstance_16);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$productdata = $com$ikea$range$dynamic.productdata || ($com$ikea$range$dynamic.productdata = {});\n $com$ikea$range$dynamic$productdata.Part = Part;\n defineProp($com$ikea$range$dynamic$productdata.Part, 'Companion', Companion_getInstance_17);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$productdata = $com$ikea$range$dynamic.productdata || ($com$ikea$range$dynamic.productdata = {});\n $com$ikea$range$dynamic$productdata.ProductComponent = ProductComponent;\n defineProp($com$ikea$range$dynamic$productdata.ProductComponent, 'Companion', Companion_getInstance_18);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$service = $com$ikea$range$dynamic.service || ($com$ikea$range$dynamic.service = {});\n $com$ikea$range$dynamic$service.TemplateEditorConnectorData = TemplateEditorConnectorData;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$service = $com$ikea$range$dynamic.service || ($com$ikea$range$dynamic.service = {});\n $com$ikea$range$dynamic$service.ProductTemplateDTO = ProductTemplateDTO;\n $com$ikea$range$dynamic$service.TemplateEditorService = TemplateEditorService;\n defineProp($com$ikea$range$dynamic$service.TemplateEditorService, 'Companion', Companion_getInstance_19);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$shape = $com$ikea$range$dynamic.shape || ($com$ikea$range$dynamic.shape = {});\n $com$ikea$range$dynamic$shape.DynamicAssembly = DynamicAssembly;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$shape = $com$ikea$range$dynamic.shape || ($com$ikea$range$dynamic.shape = {});\n $com$ikea$range$dynamic$shape.DynamicComponentBuilder = DynamicComponentBuilder;\n defineProp($com$ikea$range$dynamic$shape.DynamicComponentBuilder, 'Companion', Companion_getInstance_20);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$shape = $com$ikea$range$dynamic.shape || ($com$ikea$range$dynamic.shape = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$shape = $com$ikea$range$dynamic.shape || ($com$ikea$range$dynamic.shape = {});\n $com$ikea$range$dynamic$shape.DynamicShape = DynamicShape;\n defineProp($com$ikea$range$dynamic$shape.DynamicShape, 'Companion', Companion_getInstance_21);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.AssemblyChild = AssemblyChild;\n defineProp($com$ikea$range$dynamic$template.AssemblyChild, 'Companion', Companion_getInstance_22);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.AssemblyTemplate = AssemblyTemplate;\n defineProp($com$ikea$range$dynamic$template.AssemblyTemplate, 'Companion', Companion_getInstance_23);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.AutoAdaptHostTemplate = AutoAdaptHostTemplate;\n defineProp($com$ikea$range$dynamic$template.AutoAdaptHostTemplate, 'CustomSerializer', CustomSerializer_getInstance_0);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.BoundItemTemplate = BoundItemTemplate;\n defineProp($com$ikea$range$dynamic$template.BoundItemTemplate, 'Companion', Companion_getInstance_24);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.Compartment = Compartment;\n defineProp($com$ikea$range$dynamic$template.Compartment, 'Companion', Companion_getInstance_25);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.ComponentsTemplate = ComponentsTemplate;\n defineProp($com$ikea$range$dynamic$template.ComponentsTemplate, 'Companion', Companion_getInstance_26);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.ConnectorItemTemplate = ConnectorItemTemplate;\n defineProp($com$ikea$range$dynamic$template.ConnectorItemTemplate, 'Companion', Companion_getInstance_27);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.getConnectorsForSize = getConnectorsForSize;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.Dimension = Dimension;\n defineProp($com$ikea$range$dynamic$template.Dimension, 'Companion', Companion_getInstance_28);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.DragSurfaceTemplate = DragSurfaceTemplate;\n defineProp($com$ikea$range$dynamic$template.DragSurfaceTemplate, 'Companion', Companion_getInstance_29);\n $com$ikea$range$dynamic$template.DragSurfacesTemplate = DragSurfacesTemplate;\n defineProp($com$ikea$range$dynamic$template.DragSurfacesTemplate, 'CustomSerializer', CustomSerializer_getInstance_1);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.DynamicRangeUtils = DynamicRangeUtils;\n defineProp($com$ikea$range$dynamic$template.DynamicRangeUtils, 'Companion', Companion_getInstance_30);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.LightTemplate = LightTemplate;\n defineProp($com$ikea$range$dynamic$template.LightTemplate, 'Companion', Companion_getInstance_31);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.MarginTemplate = MarginTemplate;\n defineProp($com$ikea$range$dynamic$template.MarginTemplate, 'MarginTemplateSerializer', MarginTemplateSerializer_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.Model3DTemplate = Model3DTemplate;\n defineProp($com$ikea$range$dynamic$template.Model3DTemplate, 'Companion', Companion_getInstance_32);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.OriginTemplate = OriginTemplate;\n defineProp($com$ikea$range$dynamic$template.OriginTemplate, 'CustomSerializer', CustomSerializer_getInstance_2);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.PlacementZoneByHeightTemplate = PlacementZoneByHeightTemplate;\n defineProp($com$ikea$range$dynamic$template.PlacementZoneByHeightTemplate, 'Companion', Companion_getInstance_33);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.PositionTemplate = PositionTemplate;\n $com$ikea$range$dynamic$template.PositionTemplate.PositionTemplateFromString = PositionTemplateFromString;\n defineProp($com$ikea$range$dynamic$template.PositionTemplate, 'PositionTemplateSerializer', PositionTemplateSerializer_getInstance);\n $com$ikea$range$dynamic$template.absoluteTransform$factory = absoluteTransform$factory;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n $com$ikea$range$dynamic$template.VisualLightSourceTemplate = VisualLightSourceTemplate;\n defineProp($com$ikea$range$dynamic$template.VisualLightSourceTemplate, 'Companion', Companion_getInstance_34);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$hierarchy = $com$ikea$range$dynamic$template.hierarchy || ($com$ikea$range$dynamic$template.hierarchy = {});\n $com$ikea$range$dynamic$template$hierarchy.ProductStructureConnectionTemplate = ProductStructureConnectionTemplate;\n defineProp($com$ikea$range$dynamic$template$hierarchy.ProductStructureConnectionTemplate, 'Companion', Companion_getInstance_35);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$hierarchy = $com$ikea$range$dynamic$template.hierarchy || ($com$ikea$range$dynamic$template.hierarchy = {});\n $com$ikea$range$dynamic$template$hierarchy.ProductStructureItemTemplate = ProductStructureItemTemplate;\n defineProp($com$ikea$range$dynamic$template$hierarchy.ProductStructureItemTemplate, 'Companion', Companion_getInstance_36);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$objects = $com$ikea$range$dynamic$template.objects || ($com$ikea$range$dynamic$template.objects = {});\n $com$ikea$range$dynamic$template$objects.OriginRelativeTo = OriginRelativeTo;\n $com$ikea$range$dynamic$template$objects.OriginRelativeTo.values = values;\n $com$ikea$range$dynamic$template$objects.OriginRelativeTo.valueOf = valueOf_0;\n defineProp($com$ikea$range$dynamic$template$objects.OriginRelativeTo, 'BOUND', OriginRelativeTo_BOUND_getInstance);\n defineProp($com$ikea$range$dynamic$template$objects.OriginRelativeTo, 'SIZE', OriginRelativeTo_SIZE_getInstance);\n defineProp($com$ikea$range$dynamic$template$objects.OriginRelativeTo, 'Companion', Companion_getInstance_37);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$objects = $com$ikea$range$dynamic$template.objects || ($com$ikea$range$dynamic$template.objects = {});\n defineProp($com$ikea$range$dynamic$template$objects, 'OriginRelativeToImpostor', OriginRelativeToImpostor_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$objects = $com$ikea$range$dynamic$template.objects || ($com$ikea$range$dynamic$template.objects = {});\n $com$ikea$range$dynamic$template$objects.PositionType = PositionType;\n $com$ikea$range$dynamic$template$objects.PositionType.values = values_0;\n $com$ikea$range$dynamic$template$objects.PositionType.valueOf = valueOf_1;\n defineProp($com$ikea$range$dynamic$template$objects.PositionType, 'ABSOLUTE', PositionType_ABSOLUTE_getInstance);\n defineProp($com$ikea$range$dynamic$template$objects.PositionType, 'PERCENTAGE_RELATIVE_SIZE', PositionType_PERCENTAGE_RELATIVE_SIZE_getInstance);\n defineProp($com$ikea$range$dynamic$template$objects.PositionType, 'Companion', Companion_getInstance_38);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$objects = $com$ikea$range$dynamic$template.objects || ($com$ikea$range$dynamic$template.objects = {});\n defineProp($com$ikea$range$dynamic$template$objects, 'PositionTypeImpostor', PositionTypeImpostor_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$objects = $com$ikea$range$dynamic$template.objects || ($com$ikea$range$dynamic$template.objects = {});\n $com$ikea$range$dynamic$template$objects.PositionValue = PositionValue;\n defineProp($com$ikea$range$dynamic$template$objects.PositionValue, 'Companion', Companion_getInstance_39);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$objects = $com$ikea$range$dynamic$template.objects || ($com$ikea$range$dynamic$template.objects = {});\n $com$ikea$range$dynamic$template$objects.RelativePosition = RelativePosition;\n $com$ikea$range$dynamic$template$objects.RelativePosition.RelativePositionFromPosition = RelativePositionFromPosition;\n defineProp($com$ikea$range$dynamic$template$objects.RelativePosition, 'Companion', Companion_getInstance_40);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$objects = $com$ikea$range$dynamic$template.objects || ($com$ikea$range$dynamic$template.objects = {});\n $com$ikea$range$dynamic$template$objects.RelativeTransform = RelativeTransform;\n $com$ikea$range$dynamic$template$objects.RelativeTransform.RelativeTransformFromVector = RelativeTransformFromVector;\n defineProp($com$ikea$range$dynamic$template$objects.RelativeTransform, 'RelativeTransformSerializer', RelativeTransformSerializer_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$serializers = $com$ikea$range$dynamic$template.serializers || ($com$ikea$range$dynamic$template.serializers = {});\n defineProp($com$ikea$range$dynamic$template$serializers, 'NamedTransformObjectDeserializer', NamedTransformObjectDeserializer_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$serializers = $com$ikea$range$dynamic$template.serializers || ($com$ikea$range$dynamic$template.serializers = {});\n defineProp($com$ikea$range$dynamic$template$serializers, 'RelationOriginSerializer', RelationOriginSerializer_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$serializers = $com$ikea$range$dynamic$template.serializers || ($com$ikea$range$dynamic$template.serializers = {});\n defineProp($com$ikea$range$dynamic$template$serializers, 'RelativeTransformDeserializer', RelativeTransformDeserializer_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$serializers = $com$ikea$range$dynamic$template.serializers || ($com$ikea$range$dynamic$template.serializers = {});\n defineProp($com$ikea$range$dynamic$template$serializers, 'RotationDegreeOfFreedomSerializer', RotationDegreeOfFreedomSerializer_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$serializers = $com$ikea$range$dynamic$template.serializers || ($com$ikea$range$dynamic$template.serializers = {});\n $com$ikea$range$dynamic$template$serializers.DynamicRangeParseError = DynamicRangeParseError;\n $com$ikea$range$dynamic$template$serializers.parseAndCatch = parseAndCatch;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$serializers = $com$ikea$range$dynamic$template.serializers || ($com$ikea$range$dynamic$template.serializers = {});\n defineProp($com$ikea$range$dynamic$template$serializers, 'SizeSerializer', SizeSerializer_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$template = $com$ikea$range$dynamic.template || ($com$ikea$range$dynamic.template = {});\n var $com$ikea$range$dynamic$template$serializers = $com$ikea$range$dynamic$template.serializers || ($com$ikea$range$dynamic$template.serializers = {});\n defineProp($com$ikea$range$dynamic$template$serializers, 'SpacingSerializer', SpacingSerializer_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$dynamic = $com$ikea$range.dynamic || ($com$ikea$range.dynamic = {});\n var $com$ikea$range$dynamic$testutils = $com$ikea$range$dynamic.testutils || ($com$ikea$range$dynamic.testutils = {});\n $com$ikea$range$dynamic$testutils.CatalogGenerator = CatalogGenerator;\n }\n $jsExportAll$(_);\n _.$jsExportAll$ = $jsExportAll$;\n _.$_$ = _.$_$ || {};\n _.$_$.a = DynamicProductCatalog;\n _.$_$.b = DynamicProduct;\n _.$_$.c = ProductTemplate;\n _.$_$.d = MetaDataComponent;\n _.$_$.e = VisualLightSourceComponent;\n _.$_$.f = CatalogTemplateData;\n _.$_$.g = ModelRenderInfo;\n _.$_$.h = Part;\n _.$_$.i = TemplateEditorService;\n _.$_$.j = ProductStructureItemTemplate;\n _.$_$.k = PositionValue;\n _.$_$.l = RelativePosition;\n _.$_$.m = RelativeTransform;\n _.$_$.n = BoundItemTemplate;\n _.$_$.o = Compartment;\n _.$_$.p = ConnectorItemTemplate;\n _.$_$.q = Dimension;\n _.$_$.r = OriginTemplate;\n _.$_$.s = PositionTemplate;\n _.$_$.t = CatalogGenerator;\n _.$_$.u = CustomSerializer_getInstance;\n _.$_$.v = $serializer_getInstance_12;\n _.$_$.w = $serializer_getInstance_23;\n _.$_$.x = OriginRelativeToImpostor_getInstance;\n _.$_$.y = Companion_getInstance_38;\n _.$_$.z = PositionTypeImpostor_instance;\n _.$_$.a1 = CustomSerializer_getInstance_0;\n _.$_$.b1 = Companion_getInstance_27;\n _.$_$.c1 = Companion_getInstance_28;\n _.$_$.d1 = CustomSerializer_getInstance_1;\n _.$_$.e1 = Companion_getInstance_30;\n _.$_$.f1 = MarginTemplateSerializer_getInstance;\n _.$_$.g1 = $serializer_getInstance_20;\n _.$_$.h1 = PositionTemplateSerializer_getInstance;\n _.$_$.i1 = $serializer_getInstance_21;\n //endregion\n return _;\n}));\n\n//# sourceMappingURL=core-core-range-dynamic-range.js.map\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd)\n define(['exports', './core-core-stl.js', './kotlin-kotlin-stdlib.js', './core-core-api.js'], factory);\n else if (typeof exports === 'object')\n factory(module.exports, require('./core-core-stl.js'), require('./kotlin-kotlin-stdlib.js'), require('./core-core-api.js'));\n else {\n if (typeof this['core-core-stl'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-experimental'. Its dependency 'core-core-stl' was not found. Please, check whether 'core-core-stl' is loaded prior to 'core-core-experimental'.\");\n }\n if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-experimental'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'core-core-experimental'.\");\n }\n if (typeof this['core-core-api'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-experimental'. Its dependency 'core-core-api' was not found. Please, check whether 'core-core-api' is loaded prior to 'core-core-experimental'.\");\n }\n root['core-core-experimental'] = factory(typeof this['core-core-experimental'] === 'undefined' ? {} : this['core-core-experimental'], this['core-core-stl'], this['kotlin-kotlin-stdlib'], this['core-core-api']);\n }\n}(this, function (_, kotlin_core_core_stl, kotlin_kotlin, kotlin_core_core_api) {\n 'use strict';\n //region block: imports\n var imul = Math.imul;\n var PlacementService = kotlin_core_core_stl.$_$.h2;\n var VOID = kotlin_kotlin.$_$.e;\n var protoOf = kotlin_kotlin.$_$.u9;\n var RestrictAllowedRequiredHostsComponent = kotlin_core_core_api.$_$.w6;\n var Unit_instance = kotlin_kotlin.$_$.x3;\n var Companion_instance = kotlin_core_core_api.$_$.rc;\n var classMeta = kotlin_kotlin.$_$.q8;\n var setMetadataFor = kotlin_kotlin.$_$.v9;\n var get_snapRoot = kotlin_core_core_api.$_$.i1;\n var get_parentComponent = kotlin_core_core_api.$_$.g4;\n var get_connectorsComponent = kotlin_core_core_api.$_$.h2;\n var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.i1;\n var AutoAdaptSessionComponent = kotlin_core_core_stl.$_$.j;\n var get_variantEntities = kotlin_core_core_stl.$_$.t;\n var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;\n var SnapUtils_instance = kotlin_core_core_api.$_$.vc;\n var first = kotlin_kotlin.$_$.w5;\n var SnapSettings = kotlin_core_core_api.$_$.a7;\n var toList = kotlin_kotlin.$_$.v7;\n var addAll = kotlin_kotlin.$_$.m4;\n var copyToArray = kotlin_kotlin.$_$.l5;\n var get_worldTransform = kotlin_core_core_api.$_$.n7;\n var TransformUtils_instance = kotlin_core_core_api.$_$.cd;\n var Companion_instance_0 = kotlin_core_core_stl.$_$.e4;\n var get_hierarchy = kotlin_core_core_api.$_$.x3;\n var Companion_instance_1 = kotlin_core_core_stl.$_$.f4;\n var Companion_instance_2 = kotlin_core_core_stl.$_$.d4;\n var Companion_instance_3 = kotlin_core_core_stl.$_$.m4;\n var PlacementResult = kotlin_core_core_stl.$_$.g2;\n var any = kotlin_kotlin.$_$.p4;\n var ValidationResultType_FAIL_getInstance = kotlin_core_core_api.$_$.n8;\n var get_productRefOrEmptyString = kotlin_core_core_api.$_$.x;\n var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.g;\n var Companion_getInstance = kotlin_core_core_api.$_$.tb;\n var firstOrNull = kotlin_kotlin.$_$.u5;\n var equals = kotlin_kotlin.$_$.t8;\n var CollisionValidationResult = kotlin_core_core_api.$_$.z;\n var emptyList = kotlin_kotlin.$_$.o5;\n var SearchDirectionsUtils_instance = kotlin_core_core_stl.$_$.p4;\n var objectMeta = kotlin_kotlin.$_$.t9;\n var Comparator = kotlin_kotlin.$_$.pc;\n var compareValues = kotlin_kotlin.$_$.d8;\n var sortedWith = kotlin_kotlin.$_$.n7;\n var listOf = kotlin_kotlin.$_$.o6;\n var distinct = kotlin_kotlin.$_$.n5;\n var collectionSizeOrDefault = kotlin_kotlin.$_$.v4;\n var plus = kotlin_kotlin.$_$.b7;\n var defineProp = kotlin_kotlin.$_$.s8;\n var interfaceMeta = kotlin_kotlin.$_$.b9;\n var IntCompanionObject_instance = kotlin_kotlin.$_$.j3;\n var Companion_instance_4 = kotlin_core_core_stl.$_$.n4;\n var Vector = kotlin_core_core_api.$_$.c5;\n var Companion_instance_5 = kotlin_core_core_stl.$_$.o4;\n var LoggerState_getInstance = kotlin_core_core_api.$_$.fb;\n var get_worldRotation = kotlin_core_core_api.$_$.m7;\n var Transform = kotlin_core_core_api.$_$.b5;\n var get_worldPosition = kotlin_core_core_api.$_$.l7;\n var recommendedPosition = kotlin_core_core_stl.$_$.l2;\n var ValidationResultType_WARNING_getInstance = kotlin_core_core_api.$_$.o8;\n var toString = kotlin_kotlin.$_$.z9;\n var hashCode = kotlin_kotlin.$_$.a9;\n var THROW_CCE = kotlin_kotlin.$_$.ad;\n //endregion\n //region block: pre-declaration\n setMetadataFor(ExperimentalPlacementService, 'ExperimentalPlacementService', classMeta, PlacementService);\n setMetadataFor(LegacyPlacementHelper, 'LegacyPlacementHelper', classMeta);\n setMetadataFor(Companion, 'Companion', objectMeta);\n setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(SnapList, 'SnapList', classMeta);\n setMetadataFor(SortBuilder, 'SortBuilder', classMeta, VOID, VOID, SortBuilder);\n setMetadataFor(Sorter, 'Sorter', interfaceMeta);\n setMetadataFor(CombinedSorter, 'CombinedSorter', classMeta, VOID, [Sorter]);\n setMetadataFor(SorterByDistance, 'SorterByDistance', classMeta, VOID, [Sorter], SorterByDistance);\n setMetadataFor(OriginalSorter, 'OriginalSorter', classMeta, VOID, [Sorter]);\n setMetadataFor(PrioritySorter, 'PrioritySorter', classMeta, VOID, [Sorter]);\n setMetadataFor(WarningsSorter, 'WarningsSorter', classMeta, VOID, [Sorter], WarningsSorter);\n setMetadataFor(RecommendedDistanceSorter, 'RecommendedDistanceSorter', classMeta, VOID, [Sorter], RecommendedDistanceSorter);\n setMetadataFor(StartPositioner, 'StartPositioner', classMeta);\n setMetadataFor(ValidatedSnap, 'ValidatedSnap', classMeta);\n //endregion\n function ExperimentalPlacementService(coreServices, autoAdaptService) {\n autoAdaptService = autoAdaptService === VOID ? null : autoAdaptService;\n PlacementService.call(this, coreServices, autoAdaptService);\n this.coreServices = coreServices;\n this.autoAdaptService = autoAdaptService;\n }\n protoOf(ExperimentalPlacementService).k2z = function () {\n return this.coreServices;\n };\n protoOf(ExperimentalPlacementService).r3w = function () {\n return this.autoAdaptService;\n };\n protoOf(ExperimentalPlacementService).s3c = function (entityToPlace, initialPosition, ignoreWarnings, searchDirections, sortAndSelectStrategy) {\n var placementHelper = new LegacyPlacementHelper(entityToPlace, this.coreServices);\n placementHelper.startPoisitoiner(entityToPlace).orAt(initialPosition).move();\n var sortBuilder = placementHelper.sortBuilder();\n var tmp;\n if (ignoreWarnings) {\n tmp = sortBuilder;\n } else {\n tmp = sortBuilder.sortByWarnings();\n }\n var sortBuilderWithWarnings = tmp;\n var sorter = sortBuilderWithWarnings.sortByOriginalFirst(entityToPlace).sortByPriority(true).sortByDistance().build();\n var snaps = placementHelper.findAllSnapsWithAutoAdapt();\n var validatedSnaps = placementHelper.validateSnaps(snaps);\n var snap = placementHelper.firstValidWhenExtendingSearchOnContinuousConnectors(validatedSnaps, sorter, searchDirections);\n return placementHelper.commitSnap(snap);\n };\n protoOf(ExperimentalPlacementService).t3c = function (entityToPlace, closeTo, searchDirections, sortAndSelectStrategy) {\n var placementHelper = new LegacyPlacementHelper(entityToPlace, this.coreServices);\n placementHelper.startPoisitoiner(entityToPlace).atRecommendedPosition().orAt(closeTo).move();\n var sortBuilder = placementHelper.sortBuilder();\n var sorter = sortBuilder.sortByWarnings().sortByOriginalFirst(entityToPlace).sortByPriority(false).sortByRecommendedDistance().sortByDistance().build();\n var snaps = placementHelper.findAllSnapsWithAutoAdapt();\n var validatedSnaps = placementHelper.validateSnaps(snaps);\n var snap = placementHelper.firstValidWhenExtendingSearchOnContinuousConnectors(validatedSnaps, sorter, searchDirections);\n return placementHelper.commitSnap(snap);\n };\n protoOf(ExperimentalPlacementService).u3c = function (entityToPlace, target, sortAndSelectStrategy) {\n var placementHelper = new LegacyPlacementHelper(entityToPlace, this.coreServices);\n placementHelper.startPoisitoiner(entityToPlace).atRecommendedPosition().move();\n var sortBuilder = placementHelper.sortBuilder();\n var sorter = sortBuilder.sortByWarnings().sortByOriginalFirst(entityToPlace).sortByPriority(false).sortByRecommendedDistance().sortByDistance().build();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [target];\n var snaps = placementHelper.finaAllSnapsToWithAutoAdapt(tmp$ret$2);\n var validatedSnaps = placementHelper.validateSnaps(snaps);\n var snap = placementHelper.firstValidWhenExtendingSearchOnContinuousConnectors(validatedSnaps, sorter);\n return placementHelper.commitSnap(snap);\n };\n protoOf(ExperimentalPlacementService).v3c = function (entityToPlace, targets, sortAndSelectStrategy) {\n var placementHelper = new LegacyPlacementHelper(entityToPlace, this.coreServices);\n placementHelper.startPoisitoiner(entityToPlace).atRecommendedPosition().move();\n var sortBuilder = placementHelper.sortBuilder();\n var sorter = sortBuilder.sortByWarnings().sortByOriginalFirst(entityToPlace).sortByPriority(false).sortByRecommendedDistance().sortByDistance().build();\n entityToPlace.addComponent(new RestrictAllowedRequiredHostsComponent(targets));\n var snaps = placementHelper.finaAllSnapsToWithAutoAdapt(targets);\n var validatedSnaps = placementHelper.validateSnaps(snaps);\n var snap = placementHelper.firstValidWhenExtendingSearchOnContinuousConnectors(validatedSnaps, sorter);\n var result = placementHelper.commitSnap(snap);\n entityToPlace.removeComponent(Companion_instance.id);\n var tmp0_safe_receiver = result.placedEntity;\n if (tmp0_safe_receiver == null)\n null;\n else\n tmp0_safe_receiver.removeComponent(Companion_instance.id);\n return result;\n };\n protoOf(ExperimentalPlacementService).x3c = function (entityToPlace, target, sortAndSelectStrategy) {\n var placementHelper = new LegacyPlacementHelper(entityToPlace, this.coreServices);\n placementHelper.startPoisitoiner(entityToPlace).atRecommendedPosition().move();\n var sortBuilder = placementHelper.sortBuilder();\n var sorter = sortBuilder.sortByWarnings().sortByOriginalFirst(entityToPlace).sortByPriority(false).sortByRecommendedDistance().sortByDistance().build();\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [target];\n var snaps = placementHelper.finaAllSnapsToWithAutoAdapt(tmp$ret$2);\n var validatedSnaps = placementHelper.validateSnaps(snaps);\n var snap = placementHelper.firstValid(validatedSnaps, sorter);\n return placementHelper.forceCommitSnap(snap);\n };\n function findSnaps($this, hosts) {\n var tmp3_elvis_lhs = get_snapRoot($this.entity);\n var tmp;\n if (tmp3_elvis_lhs == null) {\n var tmp0_safe_receiver = get_parentComponent($this.entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.children;\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.first' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.LegacyPlacementHelper.findSnaps.' call\n if (!(get_connectorsComponent(element) == null)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n throw NoSuchElementException_init_$Create$('Array contains no element matching the predicate.');\n }\n tmp_0 = tmp$ret$1;\n }\n var tmp2_safe_receiver = tmp_0;\n tmp = tmp2_safe_receiver == null ? null : get_snapRoot(tmp2_safe_receiver);\n } else {\n tmp = tmp3_elvis_lhs;\n }\n var tmp4_elvis_lhs = tmp;\n var snappingEntity = tmp4_elvis_lhs == null ? $this.entity : tmp4_elvis_lhs;\n snappingEntity.addComponent(new AutoAdaptSessionComponent());\n moveVariantsToEntityPosition($this, snappingEntity);\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var this_0 = get_variantEntities(snappingEntity);\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = this_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = this_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.LegacyPlacementHelper.findSnaps.' call\n var tmp_1;\n // Inline function 'kotlin.collections.isNullOrEmpty' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_2;\n if (hosts == null) {\n tmp_2 = true;\n } else {\n // Inline function 'kotlin.collections.isEmpty' call\n tmp_2 = hosts.length === 0;\n }\n if (tmp_2) {\n tmp_1 = SnapUtils_instance.matchingSnapActionCandidatesInScene(element_0, $this.sceneManager, new SnapSettings(true, VOID, VOID, true));\n } else {\n if (hosts.length > 1) {\n tmp_1 = SnapUtils_instance.matchingSnapActionCandidatesMultipleHosts(element_0, hosts, new SnapSettings(true, VOID, VOID, true));\n } else {\n tmp_1 = SnapUtils_instance.matchingSnapActionCandidates(element_0, first(hosts), new SnapSettings(true, VOID, true, true));\n }\n }\n var snapsForGuest = tmp_1;\n var list = toList(snapsForGuest);\n addAll(destination, list);\n }\n var snaps = destination;\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(snaps);\n }\n function moveVariantsToEntityPosition($this, entity) {\n var originalTransform = get_worldTransform(entity);\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_variantEntities(entity);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.LegacyPlacementHelper.moveVariantsToEntityPosition.' call\n TransformUtils_instance.setWorldTransform(element, originalTransform);\n }\n }\n function LegacyPlacementHelper(entity, coreServices) {\n this.entity = entity;\n this.coreServices = coreServices;\n this.entityManager = this.coreServices.entityManager;\n this.sceneManager = this.coreServices.sceneManager;\n this.productManager = this.coreServices.productManager;\n var tmp = this;\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n tmp.s3w_1 = new SnapList(this.entity, tmp$ret$0, this.coreServices);\n }\n protoOf(LegacyPlacementHelper).r23 = function () {\n return this.entity;\n };\n protoOf(LegacyPlacementHelper).k2z = function () {\n return this.coreServices;\n };\n protoOf(LegacyPlacementHelper).p1i = function () {\n return this.entityManager;\n };\n protoOf(LegacyPlacementHelper).q1i = function () {\n return this.sceneManager;\n };\n protoOf(LegacyPlacementHelper).u1i = function () {\n return this.productManager;\n };\n protoOf(LegacyPlacementHelper).startPoisitoiner = function (entityToPlace) {\n return new StartPositioner(entityToPlace, this.entityManager);\n };\n protoOf(LegacyPlacementHelper).findAllSnapsWithAutoAdapt = function () {\n var canAutoAdapt = this.entity.hasComponent(126);\n var tmp;\n if (canAutoAdapt) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = get_hierarchy(this.sceneManager.root);\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.LegacyPlacementHelper.findAllSnapsWithAutoAdapt.' call\n if (element.hasComponent(127)) {\n destination.q(element);\n }\n }\n tmp = destination;\n } else {\n tmp = null;\n }\n var hosts = tmp;\n var tmp_0;\n if (hosts == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_0 = copyToArray(hosts);\n }\n return findSnaps(this, tmp_0);\n };\n protoOf(LegacyPlacementHelper).finaAllSnapsToWithAutoAdapt = function (targets) {\n return findSnaps(this, targets);\n };\n protoOf(LegacyPlacementHelper).commitSnap = function (validatedSnap) {\n var tmp;\n if ((validatedSnap == null ? null : validatedSnap.isValid) === true) {\n tmp = validatedSnap.snap;\n } else {\n tmp = null;\n }\n var snapActionCandidate = tmp;\n var tmp2_elvis_lhs = validatedSnap == null ? null : validatedSnap.result;\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n var results = tmp_0;\n if (snapActionCandidate == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n snapActionCandidate.createAction().perform();\n var tmp_1 = snapActionCandidate.guestRoot;\n tmp_1.removeComponent(125);\n var tmp_2;\n if (any(results)) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$1 = [];\n tmp_2 = new PlacementResult(results, tmp$ret$1, snapActionCandidate.guestRoot);\n } else {\n tmp_2 = Companion_instance_3.ok(snapActionCandidate.guestRoot);\n }\n return tmp_2;\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = results.length;\n while (inductionVariable < last) {\n var element = results[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.LegacyPlacementHelper.commitSnap.' call\n if (element.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n destination.q(element);\n }\n }\n var errors = copyToArray(destination);\n this.entity.removeComponent(125);\n var tmp_3;\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(errors.length === 0)) {\n tmp_3 = Companion_instance_3.failWithErrors(errors);\n } else {\n tmp_3 = Companion_instance_3.failWithMessage('No snap found', get_productRefOrEmptyString(this.entity));\n }\n return tmp_3;\n };\n protoOf(LegacyPlacementHelper).forceCommitSnap = function (validatedSnap) {\n var tmp1_safe_receiver = validatedSnap == null ? null : validatedSnap.snap;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n tmp1_safe_receiver.createAction().perform();\n return Companion_instance_3.ok(this.entity);\n }\n return Companion_instance_3.failWithMessage('No possible snapActions in target', get_productRefOrEmptyString(this.entity));\n };\n protoOf(LegacyPlacementHelper).sortBuilder = function () {\n return new SortBuilder();\n };\n protoOf(LegacyPlacementHelper).validateSnaps = function (snaps) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(snaps.length);\n var inductionVariable = 0;\n var last = snaps.length;\n while (inductionVariable < last) {\n var item = snaps[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.LegacyPlacementHelper.validateSnaps.' call\n var result = this.coreServices.validations.validateSnap(item);\n var tmp$ret$0 = new ValidatedSnap(item, result);\n destination.q(tmp$ret$0);\n }\n return copyToArray(destination);\n };\n protoOf(LegacyPlacementHelper).t3w = function (validatedSnaps, sorter, searchDirections) {\n return this.s3w_1.firstValidWhenExtendingSearchOnContinuousConnectors(validatedSnaps, sorter, searchDirections);\n };\n protoOf(LegacyPlacementHelper).firstValidWhenExtendingSearchOnContinuousConnectors = function (validatedSnaps, sorter, searchDirections, $super) {\n var tmp;\n if (searchDirections === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [Companion_getInstance().LEFT, Companion_getInstance().RIGHT, Companion_getInstance().UP, Companion_getInstance().DOWN, Companion_getInstance().BACK, Companion_getInstance().FORWARD];\n } else {\n tmp = searchDirections;\n }\n searchDirections = tmp;\n return this.t3w(validatedSnaps, sorter, searchDirections);\n };\n protoOf(LegacyPlacementHelper).firstValid = function (validatedSnaps, sorter) {\n return this.s3w_1.firstValid(validatedSnaps, sorter);\n };\n function best($this, candidate, bestSoFar, sorter) {\n if (!candidate.isValid)\n return bestSoFar;\n if (bestSoFar == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return sorter.aaa(bestSoFar, candidate);\n }\n return candidate;\n }\n function validate($this, candidate, validationService) {\n var candidateResult = new ValidatedSnap(candidate, validationService.validateSnap(candidate));\n return candidateResult;\n }\n function getAlignmentCandidatesThatResolvesCollision($this, candidates, failedCandidateResult) {\n var tmp0_safe_receiver = failedCandidateResult.result;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.getAlignmentCandidatesThatResolvesCollision.' call\n if (element instanceof CollisionValidationResult) {\n var tmp0_safe_receiver_0 = firstOrNull(element.collisions);\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.other;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = candidates.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.getAlignmentCandidatesThatResolvesCollision...' call\n var tmp;\n var tmp0_safe_receiver_1 = element_0.snap.alignmentInitiatorCandidate;\n if (equals(tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.host, tmp1_safe_receiver)) {\n tmp = element_0.isValid;\n } else {\n tmp = false;\n }\n if (tmp) {\n destination.q(element_0);\n }\n }\n return destination;\n }\n }\n }\n }\n return emptyList();\n }\n function findNewPositionThatMightSatisfyFailedResult($this, failed, entityToAdd, searchDirections, level) {\n var tmp0_safe_receiver = failed.result;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.findNewPositionThatMightSatisfyFailedResult.' call\n var tmp_0;\n if (element instanceof CollisionValidationResult) {\n tmp_0 = SearchDirectionsUtils_instance.findNewPositionOnSidesOfCollidingEntity(entityToAdd, failed.snap, element, searchDirections, level === 0);\n } else {\n tmp_0 = emptyList();\n }\n var list = tmp_0;\n addAll(destination, list);\n }\n tmp = destination;\n }\n var tmp1_elvis_lhs = tmp;\n return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;\n }\n function Companion() {\n this.MAX_SEARCH_LVL_SNAP_TO_SCENE = 5;\n }\n protoOf(Companion).r3d = function () {\n return this.MAX_SEARCH_LVL_SNAP_TO_SCENE;\n };\n var Companion_instance_6;\n function Companion_getInstance_0() {\n return Companion_instance_6;\n }\n function sam$kotlin_Comparator$0(function_0) {\n this.u3w_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0).u1j = function (a, b) {\n return this.u3w_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function SnapList$sortByDistance$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.sortByDistance.' call\n var tmp = a.snap.movement.size;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.sortByDistance.' call\n var tmp$ret$1 = b.snap.movement.size;\n return compareValues(tmp, tmp$ret$1);\n }\n function SnapList(entity, snaps, coreServices) {\n this.entity = entity;\n this.snaps = snaps;\n this.coreServices = coreServices;\n var tmp = this;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.snaps;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.validatedSnaps.' call\n var tmp$ret$0 = new ValidatedSnap(item, null);\n destination.q(tmp$ret$0);\n }\n tmp.validatedSnaps = copyToArray(destination);\n this.validataionService = this.coreServices.validations;\n }\n protoOf(SnapList).r23 = function () {\n return this.entity;\n };\n protoOf(SnapList).v3w = function () {\n return this.snaps;\n };\n protoOf(SnapList).k2z = function () {\n return this.coreServices;\n };\n protoOf(SnapList).w3w = function (_set____db54di) {\n this.validatedSnaps = _set____db54di;\n };\n protoOf(SnapList).x3w = function () {\n return this.validatedSnaps;\n };\n protoOf(SnapList).y3w = function () {\n return this.validataionService;\n };\n protoOf(SnapList).sortByDistance = function () {\n var tmp = this;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.sortedBy' call\n var this_0 = this.validatedSnaps;\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_0 = SnapList$sortByDistance$lambda;\n var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp_0);\n var this_1 = sortedWith(this_0, tmp$ret$0);\n tmp.validatedSnaps = copyToArray(this_1);\n };\n protoOf(SnapList).validateAll = function () {\n var tmp = this;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var this_0 = this.validatedSnaps;\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.validateAll.' call\n var snap = element.af();\n var result = this.coreServices.validations.validateSnap(snap);\n var tmp0_safe_receiver = new ValidatedSnap(snap, result);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n tmp.validatedSnaps = copyToArray(destination);\n };\n protoOf(SnapList).firstValid = function (validatedSnaps, sorter) {\n var bestSoFar = null;\n var inductionVariable = 0;\n var last = validatedSnaps.length;\n while (inductionVariable < last) {\n var cr = validatedSnaps[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n if (cr.isValid) {\n bestSoFar = best(this, cr, bestSoFar, sorter);\n }\n }\n var tmp;\n if (!(bestSoFar == null)) {\n tmp = bestSoFar;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = validatedSnaps.length;\n while (inductionVariable_0 < last_0) {\n var element = validatedSnaps[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.firstValid.' call\n var tmp0_safe_receiver = element.result;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toList(tmp0_safe_receiver);\n var list = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;\n addAll(destination, list);\n }\n var allResults = copyToArray(destination);\n var tmp1_safe_receiver = firstOrNull(validatedSnaps);\n tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.copy(VOID, allResults);\n }\n return tmp;\n };\n protoOf(SnapList).t3w = function (validatedSnaps, sorter, searchDirections) {\n var bestSoFar = null;\n var inductionVariable = 0;\n var last = validatedSnaps.length;\n while (inductionVariable < last) {\n var cr = validatedSnaps[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n if (cr.isValid) {\n bestSoFar = best(this, cr, bestSoFar, sorter);\n } else if (cr.snap.hostConnector.isContinuousConnector ? cr.snap.alignmentInitiatorCandidate == null : false) {\n bestSoFar = this.findBestValidPositionOnConnector(toList(validatedSnaps), bestSoFar, listOf(cr), this.entity, cr.snap, searchDirections, this.validataionService, sorter);\n }\n }\n var tmp;\n if (!(bestSoFar == null)) {\n tmp = bestSoFar;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = validatedSnaps.length;\n while (inductionVariable_0 < last_0) {\n var element = validatedSnaps[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.firstValidWhenExtendingSearchOnContinuousConnectors.' call\n var tmp0_safe_receiver = element.result;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toList(tmp0_safe_receiver);\n var list = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;\n addAll(destination, list);\n }\n var allResults = copyToArray(destination);\n var tmp1_safe_receiver = firstOrNull(validatedSnaps);\n tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.copy(VOID, allResults);\n }\n return tmp;\n };\n protoOf(SnapList).firstValidWhenExtendingSearchOnContinuousConnectors = function (validatedSnaps, sorter, searchDirections, $super) {\n var tmp;\n if (searchDirections === VOID) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = [Companion_getInstance().LEFT, Companion_getInstance().RIGHT, Companion_getInstance().UP, Companion_getInstance().DOWN, Companion_getInstance().BACK, Companion_getInstance().FORWARD];\n } else {\n tmp = searchDirections;\n }\n searchDirections = tmp;\n return this.t3w(validatedSnaps, sorter, searchDirections);\n };\n protoOf(SnapList).z3w = function (validatedCandidates, bestSoFar, failed, entityToAdd, candidate, searchDirections, validationService, sorter, triedPositions, level) {\n if (level >= 5) {\n return bestSoFar;\n }\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = failed.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.findBestValidPositionOnConnector.' call\n var list = getAlignmentCandidatesThatResolvesCollision(this, validatedCandidates, element);\n addAll(destination, list);\n }\n var validAlignments = destination;\n var localBest = null;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = validAlignments.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.findBestValidPositionOnConnector.' call\n localBest = best(this, element_0, localBest, sorter);\n }\n var tmp0_safe_receiver = localBest;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return best(this, tmp0_safe_receiver, bestSoFar, sorter);\n }\n var initialTransform = get_worldTransform(entityToAdd);\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterNot' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator_1 = failed.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.findBestValidPositionOnConnector.' call\n var list_0 = findNewPositionThatMightSatisfyFailedResult(this, element_1, entityToAdd, searchDirections, level);\n addAll(destination_0, list_0);\n }\n // Inline function 'kotlin.collections.filterNotTo' call\n var this_0 = distinct(destination_0);\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator_2 = this_0.t();\n while (tmp0_iterator_2.u()) {\n var element_2 = tmp0_iterator_2.w();\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.findBestValidPositionOnConnector.' call\n if (!triedPositions.p(element_2)) {\n destination_1.q(element_2);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_2 = ArrayList_init_$Create$();\n var tmp0_iterator_3 = destination_1.t();\n while (tmp0_iterator_3.u()) {\n var element_3 = tmp0_iterator_3.w();\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.findBestValidPositionOnConnector.' call\n if (bestSoFar == null ? true : initialTransform.position.distanceTo(element_3) < bestSoFar.snap.movement.size) {\n destination_2.q(element_3);\n }\n }\n // Inline function 'kotlin.collections.filterTo' call\n var destination_3 = ArrayList_init_$Create$();\n var tmp0_iterator_4 = destination_2.t();\n while (tmp0_iterator_4.u()) {\n var element_4 = tmp0_iterator_4.w();\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.findBestValidPositionOnConnector.' call\n if (SnapUtils_instance.isNewPositionOnHostConnector(candidate, element_4)) {\n destination_3.q(element_4);\n }\n }\n var newPositions = destination_3;\n if (newPositions.b1() ? !(bestSoFar == null) : false) {\n return bestSoFar;\n }\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(newPositions, 10));\n var tmp0_iterator_5 = newPositions.t();\n while (tmp0_iterator_5.u()) {\n var item = tmp0_iterator_5.w();\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.findBestValidPositionOnConnector.' call\n var newCandidate = SnapUtils_instance.createCandidate(candidate.guest, candidate.guestConnector, candidate.host, candidate.hostConnector, candidate.endTransform.copy(item), VOID, VOID, initialTransform);\n var tmp$ret$16 = validate(this, newCandidate, validationService);\n destination_4.q(tmp$ret$16);\n }\n var newResults = destination_4;\n localBest = null;\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_5 = ArrayList_init_$Create$();\n var tmp0_iterator_6 = newResults.t();\n while (tmp0_iterator_6.u()) {\n var element_5 = tmp0_iterator_6.w();\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.findBestValidPositionOnConnector.' call\n if (element_5.isValid) {\n destination_5.q(element_5);\n }\n }\n var tmp0_iterator_7 = destination_5.t();\n while (tmp0_iterator_7.u()) {\n var element_6 = tmp0_iterator_7.w();\n // Inline function 'com.ikea.core.experimental.placement.twopointo.SnapList.findBestValidPositionOnConnector.' call\n localBest = best(this, element_6, localBest, sorter);\n }\n var tmp1_safe_receiver = localBest;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return best(this, tmp1_safe_receiver, bestSoFar, sorter);\n }\n return this.findBestValidPositionOnConnector(validatedCandidates, bestSoFar, newResults, entityToAdd, candidate, searchDirections, validationService, sorter, plus(triedPositions, newPositions), level + 1 | 0);\n };\n protoOf(SnapList).findBestValidPositionOnConnector = function (validatedCandidates, bestSoFar, failed, entityToAdd, candidate, searchDirections, validationService, sorter, triedPositions, level, $super) {\n triedPositions = triedPositions === VOID ? emptyList() : triedPositions;\n level = level === VOID ? 0 : level;\n return this.z3w(validatedCandidates, bestSoFar, failed, entityToAdd, candidate, searchDirections, validationService, sorter, triedPositions, level);\n };\n function get_logger() {\n _init_properties_SortBuilder_kt__dwrk6j();\n return logger;\n }\n var logger;\n function SortBuilder() {\n var tmp = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp.a3x_1 = ArrayList_init_$Create$();\n }\n protoOf(SortBuilder).sortByDistance = function () {\n this.a3x_1.q(new SorterByDistance());\n return this;\n };\n protoOf(SortBuilder).build = function () {\n return new CombinedSorter(this.a3x_1);\n };\n protoOf(SortBuilder).sortByOriginalFirst = function (entityToPlace) {\n this.a3x_1.q(new OriginalSorter(entityToPlace));\n return this;\n };\n protoOf(SortBuilder).sortByPriority = function (onlyInActivationDistance) {\n this.a3x_1.q(new PrioritySorter(onlyInActivationDistance));\n return this;\n };\n protoOf(SortBuilder).sortByRecommendedDistance = function () {\n this.a3x_1.q(new RecommendedDistanceSorter());\n return this;\n };\n protoOf(SortBuilder).sortByWarnings = function () {\n this.a3x_1.q(new WarningsSorter());\n return this;\n };\n function Sorter() {\n }\n function CombinedSorter(sorters) {\n this.sorters = sorters;\n }\n protoOf(CombinedSorter).b3x = function () {\n return this.sorters;\n };\n protoOf(CombinedSorter).aaa = function (a, b) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstNotNullOfOrNull' call\n var tmp0_iterator = this.sorters.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.experimental.placement.twopointo.CombinedSorter.sort.' call\n var result = element.aaa(a, b);\n if (!(result == null)) {\n tmp$ret$1 = result;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var best = tmp$ret$1;\n return best == null ? a : best;\n };\n function SorterByDistance() {\n }\n protoOf(SorterByDistance).aaa = function (a, b) {\n var tmp;\n if (a.snap.movement.size < b.snap.movement.size) {\n tmp = a;\n } else if (a.snap.movement.size > b.snap.movement.size) {\n tmp = b;\n } else {\n tmp = null;\n }\n return tmp;\n };\n function OriginalSorter(originalEntity) {\n this.c3x_1 = originalEntity;\n }\n protoOf(OriginalSorter).aaa = function (a, b) {\n var aIsOriginal = a.snap.guestRoot.equals(this.c3x_1);\n var bIsOriginal = b.snap.guestRoot.equals(this.c3x_1);\n var tmp;\n if (aIsOriginal ? bIsOriginal : false) {\n tmp = null;\n } else if (aIsOriginal) {\n tmp = a;\n } else {\n tmp = b;\n }\n return tmp;\n };\n function PrioritySorter(onlyInActivationDistance) {\n this.onlyInActivationDistance = onlyInActivationDistance;\n }\n protoOf(PrioritySorter).y3d = function () {\n return this.onlyInActivationDistance;\n };\n protoOf(PrioritySorter).aaa = function (a, b) {\n var tmp;\n if (a.snap.inActivationDistance() ? true : !this.onlyInActivationDistance) {\n tmp = a.snap.priority;\n } else {\n tmp = IntCompanionObject_instance.MIN_VALUE;\n }\n var aPrio = tmp;\n var tmp_0;\n if (b.snap.inActivationDistance() ? true : !this.onlyInActivationDistance) {\n tmp_0 = b.snap.priority;\n } else {\n tmp_0 = IntCompanionObject_instance.MIN_VALUE;\n }\n var bPrio = tmp_0;\n var tmp_1;\n if (aPrio > bPrio) {\n tmp_1 = a;\n } else if (aPrio < bPrio) {\n tmp_1 = b;\n } else {\n tmp_1 = null;\n }\n return tmp_1;\n };\n function WarningsSorter() {\n }\n protoOf(WarningsSorter).aaa = function (a, b) {\n var aWarnings = a.countWarnings();\n var bWarnings = b.countWarnings();\n var tmp;\n if (aWarnings > bWarnings) {\n tmp = b;\n } else if (aWarnings < bWarnings) {\n tmp = a;\n } else {\n tmp = null;\n }\n return tmp;\n };\n function recommendationDistance($this, candidate) {\n var result = Companion_getInstance().ZERO;\n var tmp = candidate.guestRoot;\n var tmp0_safe_receiver = tmp.__getComponentForKotlin(59);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.math.absoluteValue' call\n var this_0 = tmp0_safe_receiver.offsetY - candidate.endTransform.position.Y;\n var diff = Math.abs(this_0);\n result = new Vector(0.0, diff, 0.0);\n }\n var tmp_0 = candidate.guestRoot;\n if (tmp_0.__getComponentForKotlin(60) == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_1 = get_logger();\n tmp_1.warn(RecommendedDistanceSorter$recommendationDistance$lambda);\n }\n return result;\n }\n function RecommendedDistanceSorter$recommendationDistance$lambda() {\n return 'PositionFromParent is not yet implemented';\n }\n function RecommendedDistanceSorter() {\n }\n protoOf(RecommendedDistanceSorter).aaa = function (a, b) {\n var aDist = recommendationDistance(this, a.snap).size;\n var bDist = recommendationDistance(this, b.snap).size;\n var tmp;\n if (aDist < bDist) {\n tmp = a;\n } else if (aDist > bDist) {\n tmp = b;\n } else {\n tmp = null;\n }\n return tmp;\n };\n var properties_initialized_SortBuilder_kt_lj95wt;\n function _init_properties_SortBuilder_kt__dwrk6j() {\n if (!properties_initialized_SortBuilder_kt_lj95wt) {\n properties_initialized_SortBuilder_kt_lj95wt = true;\n logger = LoggerState_getInstance().m1m('RecommendedDistanceSorter');\n }\n }\n function StartPositioner(entity, entityManager) {\n this.entity = entity;\n this.entityManager = entityManager;\n this.d3x_1 = false;\n }\n protoOf(StartPositioner).r23 = function () {\n return this.entity;\n };\n protoOf(StartPositioner).p1i = function () {\n return this.entityManager;\n };\n protoOf(StartPositioner).at = function (vector) {\n if (vector == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n TransformUtils_instance.setWorldTransform(this.entity, new Transform(vector, get_worldRotation(this.entity)));\n this.d3x_1 = true;\n }\n return this;\n };\n protoOf(StartPositioner).atRecommendedPosition = function () {\n var tmp0_safe_receiver = recommendedPosition(this.entity, get_worldPosition(this.entity));\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n TransformUtils_instance.setWorldTransform(this.entity, new Transform(tmp0_safe_receiver, get_worldRotation(this.entity)));\n this.d3x_1 = true;\n }\n return this;\n };\n protoOf(StartPositioner).orAtRecommendedPosition = function () {\n if (!this.d3x_1) {\n this.atRecommendedPosition();\n }\n return this;\n };\n protoOf(StartPositioner).orAt = function (vector) {\n if (!this.d3x_1) {\n if (vector == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.experimental.placement.twopointo.StartPositioner.orAt.' call\n this.at(vector);\n }\n }\n return this;\n };\n protoOf(StartPositioner).move = function () {\n };\n function ValidatedSnap(snap, result) {\n result = result === VOID ? null : result;\n this.snap = snap;\n this.result = result;\n var tmp = this;\n var tmp0_safe_receiver = this.result;\n var tmp_0;\n if (tmp0_safe_receiver == null) {\n tmp_0 = null;\n } else {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.ValidatedSnap.isValid.' call\n if (element.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n tmp_0 = tmp$ret$1;\n }\n var tmp1_elvis_lhs = tmp_0;\n tmp.isValid = tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;\n }\n protoOf(ValidatedSnap).s1m = function () {\n return this.snap;\n };\n protoOf(ValidatedSnap).e3x = function (_set____db54di) {\n this.result = _set____db54di;\n };\n protoOf(ValidatedSnap).f3x = function () {\n return this.result;\n };\n protoOf(ValidatedSnap).g3x = function () {\n return this.isValid;\n };\n protoOf(ValidatedSnap).h3x = function () {\n return !(this.result == null);\n };\n protoOf(ValidatedSnap).countWarnings = function () {\n var tmp0_safe_receiver = this.result;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.count' call\n var count = 0;\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.experimental.placement.twopointo.ValidatedSnap.countWarnings.' call\n if (element.resultType.equals(ValidationResultType_WARNING_getInstance())) {\n count = count + 1 | 0;\n }\n }\n tmp = count;\n }\n var tmp1_elvis_lhs = tmp;\n return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n };\n protoOf(ValidatedSnap).af = function () {\n return this.snap;\n };\n protoOf(ValidatedSnap).bf = function () {\n return this.result;\n };\n protoOf(ValidatedSnap).i3x = function (snap, result) {\n return new ValidatedSnap(snap, result);\n };\n protoOf(ValidatedSnap).copy = function (snap, result, $super) {\n snap = snap === VOID ? this.snap : snap;\n result = result === VOID ? this.result : result;\n return this.i3x(snap, result);\n };\n protoOf(ValidatedSnap).toString = function () {\n return 'ValidatedSnap(snap=' + this.snap + ', result=' + toString(this.result) + ')';\n };\n protoOf(ValidatedSnap).hashCode = function () {\n var result = hashCode(this.snap);\n result = imul(result, 31) + (this.result == null ? 0 : hashCode(this.result)) | 0;\n return result;\n };\n protoOf(ValidatedSnap).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ValidatedSnap))\n return false;\n var tmp0_other_with_cast = other instanceof ValidatedSnap ? other : THROW_CCE();\n if (!equals(this.snap, tmp0_other_with_cast.snap))\n return false;\n if (!equals(this.result, tmp0_other_with_cast.result))\n return false;\n return true;\n };\n //region block: post-declaration\n defineProp(protoOf(ValidatedSnap), 'isValidated', protoOf(ValidatedSnap).h3x);\n //endregion\n //region block: init\n Companion_instance_6 = new Companion();\n //endregion\n //region block: exports\n function $jsExportAll$(_) {\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$experimental = $com$ikea$core.experimental || ($com$ikea$core.experimental = {});\n var $com$ikea$core$experimental$placement = $com$ikea$core$experimental.placement || ($com$ikea$core$experimental.placement = {});\n $com$ikea$core$experimental$placement.ExperimentalPlacementService = ExperimentalPlacementService;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$experimental = $com$ikea$core.experimental || ($com$ikea$core.experimental = {});\n var $com$ikea$core$experimental$placement = $com$ikea$core$experimental.placement || ($com$ikea$core$experimental.placement = {});\n var $com$ikea$core$experimental$placement$twopointo = $com$ikea$core$experimental$placement.twopointo || ($com$ikea$core$experimental$placement.twopointo = {});\n $com$ikea$core$experimental$placement$twopointo.LegacyPlacementHelper = LegacyPlacementHelper;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$experimental = $com$ikea$core.experimental || ($com$ikea$core.experimental = {});\n var $com$ikea$core$experimental$placement = $com$ikea$core$experimental.placement || ($com$ikea$core$experimental.placement = {});\n var $com$ikea$core$experimental$placement$twopointo = $com$ikea$core$experimental$placement.twopointo || ($com$ikea$core$experimental$placement.twopointo = {});\n $com$ikea$core$experimental$placement$twopointo.SnapList = SnapList;\n defineProp($com$ikea$core$experimental$placement$twopointo.SnapList, 'Companion', Companion_getInstance_0);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$experimental = $com$ikea$core.experimental || ($com$ikea$core.experimental = {});\n var $com$ikea$core$experimental$placement = $com$ikea$core$experimental.placement || ($com$ikea$core$experimental.placement = {});\n var $com$ikea$core$experimental$placement$twopointo = $com$ikea$core$experimental$placement.twopointo || ($com$ikea$core$experimental$placement.twopointo = {});\n $com$ikea$core$experimental$placement$twopointo.SortBuilder = SortBuilder;\n $com$ikea$core$experimental$placement$twopointo.CombinedSorter = CombinedSorter;\n $com$ikea$core$experimental$placement$twopointo.SorterByDistance = SorterByDistance;\n $com$ikea$core$experimental$placement$twopointo.OriginalSorter = OriginalSorter;\n $com$ikea$core$experimental$placement$twopointo.PrioritySorter = PrioritySorter;\n $com$ikea$core$experimental$placement$twopointo.WarningsSorter = WarningsSorter;\n $com$ikea$core$experimental$placement$twopointo.RecommendedDistanceSorter = RecommendedDistanceSorter;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$experimental = $com$ikea$core.experimental || ($com$ikea$core.experimental = {});\n var $com$ikea$core$experimental$placement = $com$ikea$core$experimental.placement || ($com$ikea$core$experimental.placement = {});\n var $com$ikea$core$experimental$placement$twopointo = $com$ikea$core$experimental$placement.twopointo || ($com$ikea$core$experimental$placement.twopointo = {});\n $com$ikea$core$experimental$placement$twopointo.StartPositioner = StartPositioner;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$experimental = $com$ikea$core.experimental || ($com$ikea$core.experimental = {});\n var $com$ikea$core$experimental$placement = $com$ikea$core$experimental.placement || ($com$ikea$core$experimental.placement = {});\n var $com$ikea$core$experimental$placement$twopointo = $com$ikea$core$experimental$placement.twopointo || ($com$ikea$core$experimental$placement.twopointo = {});\n $com$ikea$core$experimental$placement$twopointo.ValidatedSnap = ValidatedSnap;\n }\n $jsExportAll$(_);\n _.$jsExportAll$ = $jsExportAll$;\n _.$_$ = _.$_$ || {};\n _.$_$.a = LegacyPlacementHelper;\n _.$_$.b = ValidatedSnap;\n _.$_$.c = ExperimentalPlacementService;\n //endregion\n return _;\n}));\n\n//# sourceMappingURL=core-core-experimental.js.map\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd)\n define(['exports', './kotlin-kotlin-stdlib.js', './core-core-api.js', './core-core-range-dynamic-range.js', './core-core-stl.js', './kotlinx-serialization-kotlinx-serialization-json.js', './kotlinx-serialization-kotlinx-serialization-core.js'], factory);\n else if (typeof exports === 'object')\n factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./core-core-api.js'), require('./core-core-range-dynamic-range.js'), require('./core-core-stl.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'));\n else {\n if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {\n throw new Error(\"Error loading module 'ipex-range-format'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'ipex-range-format'.\");\n }\n if (typeof this['core-core-api'] === 'undefined') {\n throw new Error(\"Error loading module 'ipex-range-format'. Its dependency 'core-core-api' was not found. Please, check whether 'core-core-api' is loaded prior to 'ipex-range-format'.\");\n }\n if (typeof this['core-core-range-dynamic-range'] === 'undefined') {\n throw new Error(\"Error loading module 'ipex-range-format'. Its dependency 'core-core-range-dynamic-range' was not found. Please, check whether 'core-core-range-dynamic-range' is loaded prior to 'ipex-range-format'.\");\n }\n if (typeof this['core-core-stl'] === 'undefined') {\n throw new Error(\"Error loading module 'ipex-range-format'. Its dependency 'core-core-stl' was not found. Please, check whether 'core-core-stl' is loaded prior to 'ipex-range-format'.\");\n }\n if (typeof this['kotlinx-serialization-kotlinx-serialization-json'] === 'undefined') {\n throw new Error(\"Error loading module 'ipex-range-format'. Its dependency 'kotlinx-serialization-kotlinx-serialization-json' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-json' is loaded prior to 'ipex-range-format'.\");\n }\n if (typeof this['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {\n throw new Error(\"Error loading module 'ipex-range-format'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'ipex-range-format'.\");\n }\n root['ipex-range-format'] = factory(typeof this['ipex-range-format'] === 'undefined' ? {} : this['ipex-range-format'], this['kotlin-kotlin-stdlib'], this['core-core-api'], this['core-core-range-dynamic-range'], this['core-core-stl'], this['kotlinx-serialization-kotlinx-serialization-json'], this['kotlinx-serialization-kotlinx-serialization-core']);\n }\n}(this, function (_, kotlin_kotlin, kotlin_core_core_api, kotlin_core_core_range_dynamic_range, kotlin_core_core_stl, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core) {\n 'use strict';\n //region block: imports\n var imul = Math.imul;\n var protoOf = kotlin_kotlin.$_$.u9;\n var interfaceMeta = kotlin_kotlin.$_$.b9;\n var setMetadataFor = kotlin_kotlin.$_$.v9;\n var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;\n var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.g;\n var Unit_instance = kotlin_kotlin.$_$.x3;\n var copyToArray = kotlin_kotlin.$_$.l5;\n var merge = kotlin_core_core_api.$_$.v6;\n var toString = kotlin_kotlin.$_$.z9;\n var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.f1;\n var Error_0 = kotlin_kotlin.$_$.tc;\n var VOID = kotlin_kotlin.$_$.e;\n var Dimension = kotlin_core_core_range_dynamic_range.$_$.q;\n var classMeta = kotlin_kotlin.$_$.q8;\n var filterNotNull = kotlin_kotlin.$_$.s5;\n var SelectableComponent = kotlin_core_core_api.$_$.f6;\n var OutlineableComponent = kotlin_core_core_api.$_$.q5;\n var DraggableComponent = kotlin_core_core_api.$_$.q2;\n var DoorComponent_getInstance = kotlin_core_core_stl.$_$.q4;\n var DoorFrontComponent_getInstance = kotlin_core_core_stl.$_$.r4;\n var HandleComponent_getInstance = kotlin_core_core_stl.$_$.u4;\n var DrawerComponent_getInstance = kotlin_core_core_stl.$_$.s4;\n var FrameComponent_getInstance = kotlin_core_core_stl.$_$.t4;\n var LegComponent_getInstance = kotlin_core_core_stl.$_$.v4;\n var OutlinedComponent = kotlin_core_core_stl.$_$.e2;\n var ProppingComponent_instance = kotlin_core_core_api.$_$.xb;\n var AlwaysHangDownComponent_instance = kotlin_core_core_api.$_$.zc;\n var UnserializableEntityComponent = kotlin_core_core_api.$_$.q6;\n var listOf = kotlin_kotlin.$_$.p6;\n var ProductComponent = kotlin_core_core_api.$_$.q;\n var plus = kotlin_kotlin.$_$.c7;\n var ProductSpecification = kotlin_core_core_api.$_$.s;\n var AllowedDoorPairsComponentFromArrays = kotlin_core_core_stl.$_$.z3;\n var toMutableList = kotlin_kotlin.$_$.y7;\n var emptyMap = kotlin_kotlin.$_$.p5;\n var Pair = kotlin_kotlin.$_$.yc;\n var AssemblyStructureComponent = kotlin_core_core_api.$_$.i;\n var AssemblyPartsComponent = kotlin_core_core_api.$_$.g;\n var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.q;\n var AssemblyPartSnapInfo = kotlin_core_core_api.$_$.f;\n var Companion_getInstance = kotlin_core_core_api.$_$.rb;\n var AssemblyPart = kotlin_core_core_api.$_$.h;\n var Vector = kotlin_core_core_api.$_$.c5;\n var Companion_getInstance_0 = kotlin_core_core_api.$_$.kb;\n var Degrees = kotlin_core_core_api.$_$.s4;\n var Transform = kotlin_core_core_api.$_$.b5;\n var Companion_getInstance_1 = kotlin_core_core_api.$_$.pc;\n var emptyList = kotlin_kotlin.$_$.o5;\n var Comparator = kotlin_kotlin.$_$.pc;\n var compareValues = kotlin_kotlin.$_$.d8;\n var sortedWith = kotlin_kotlin.$_$.m7;\n var collectionSizeOrDefault = kotlin_kotlin.$_$.v4;\n var AutoAdaptGuestComponent = kotlin_core_core_stl.$_$.k;\n var AutoAdaptHostComponent = kotlin_core_core_stl.$_$.l;\n var ColliderShapeComponent = kotlin_core_core_api.$_$.y;\n var Size = kotlin_core_core_api.$_$.a5;\n var THROW_CCE = kotlin_kotlin.$_$.ad;\n var ConnectorTagConstants_instance = kotlin_core_core_api.$_$.ea;\n var charSequenceLength = kotlin_kotlin.$_$.o8;\n var charSequenceGet = kotlin_kotlin.$_$.n8;\n var toString_0 = kotlin_kotlin.$_$.r1;\n var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.o1;\n var ConnectorsComponent = kotlin_core_core_api.$_$.u1;\n var DragProjectionPointComponent = kotlin_core_core_stl.$_$.c1;\n var DragSurface = kotlin_core_core_api.$_$.o2;\n var DragSurfacesComponent = kotlin_core_core_api.$_$.n2;\n var FunctionalMarginShapeComponent = kotlin_core_core_stl.$_$.p1;\n var FunctionalZone = kotlin_core_core_stl.$_$.u1;\n var FunctionalZonesLocalComponent = kotlin_core_core_stl.$_$.s1;\n var LightComponent = kotlin_core_core_stl.$_$.o2;\n var MetaDataComponent = kotlin_core_core_range_dynamic_range.$_$.d;\n var ModelInfoComponent = kotlin_core_core_api.$_$.o5;\n var ModelTransformComponent = kotlin_core_core_api.$_$.p5;\n var PlacementZoneByHeightComponent = kotlin_core_core_stl.$_$.i2;\n var hashCode = kotlin_kotlin.$_$.a9;\n var equals = kotlin_kotlin.$_$.t8;\n var ProductStructureConnection = kotlin_core_core_api.$_$.u;\n var ProductStructureItem = kotlin_core_core_api.$_$.v;\n var ProductStructureComponent = kotlin_core_core_api.$_$.t;\n var RecommendedInitialPositionFromFloorComponent = kotlin_core_core_stl.$_$.j2;\n var RelativeConnectorsComponent = kotlin_core_core_api.$_$.d2;\n var ConnectionRootComponent = kotlin_core_core_api.$_$.k1;\n var DisplayNameComponent = kotlin_core_core_api.$_$.e5;\n var VisualLightSourceComponent = kotlin_core_core_range_dynamic_range.$_$.e;\n var addAll = kotlin_kotlin.$_$.m4;\n var HashSet_init_$Create$ = kotlin_kotlin.$_$.n;\n var toMutableList_0 = kotlin_kotlin.$_$.x7;\n var contains = kotlin_kotlin.$_$.x4;\n var listOf_0 = kotlin_kotlin.$_$.o6;\n var Regex_init_$Create$ = kotlin_kotlin.$_$.u;\n var map = kotlin_kotlin.$_$.za;\n var addAll_0 = kotlin_kotlin.$_$.n4;\n var distinct = kotlin_kotlin.$_$.n5;\n var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.h;\n var objectMeta = kotlin_kotlin.$_$.t9;\n var replace = kotlin_kotlin.$_$.sb;\n var firstOrNull = kotlin_kotlin.$_$.u5;\n var defineProp = kotlin_kotlin.$_$.s8;\n var LoggerState_getInstance = kotlin_core_core_api.$_$.fb;\n var joinToString = kotlin_kotlin.$_$.e6;\n var toString_1 = kotlin_kotlin.$_$.ae;\n var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.s;\n var mutableListOf = kotlin_kotlin.$_$.u6;\n var removeAll = kotlin_kotlin.$_$.d7;\n var createCustomAssembly = kotlin_core_core_api.$_$.o;\n var createCustomAssemblySpecification = kotlin_core_core_api.$_$.n;\n var ProductCatalog = kotlin_core_core_api.$_$.p;\n var reversedArray = kotlin_kotlin.$_$.g7;\n var Exception_init_$Create$ = kotlin_kotlin.$_$.z;\n var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.n3;\n var DoubleSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r;\n var ReferenceArraySerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i2;\n var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;\n var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;\n var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x;\n var PositionTemplateSerializer_getInstance = kotlin_core_core_range_dynamic_range.$_$.h1;\n var getKClass = kotlin_kotlin.$_$.d;\n var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q;\n var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d;\n var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b2;\n var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;\n var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o2;\n var objectCreate = kotlin_kotlin.$_$.s9;\n var Companion_getInstance_2 = kotlin_core_core_range_dynamic_range.$_$.c1;\n var Companion_instance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b;\n var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.g;\n var get_contentOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.i;\n var toIntOrNull = kotlin_kotlin.$_$.dc;\n var Exception = kotlin_kotlin.$_$.uc;\n var JsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.f;\n var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t2;\n var toMutableMap = kotlin_kotlin.$_$.z7;\n var plus_0 = kotlin_kotlin.$_$.x6;\n var plus_1 = kotlin_kotlin.$_$.y6;\n var sort = kotlin_kotlin.$_$.p7;\n var joinToString_0 = kotlin_kotlin.$_$.f6;\n var ConnectorItemTemplate = kotlin_core_core_range_dynamic_range.$_$.p;\n var Companion_getInstance_3 = kotlin_core_core_range_dynamic_range.$_$.b1;\n var ProductStructureItemTemplate = kotlin_core_core_range_dynamic_range.$_$.j;\n var $serializer_getInstance = kotlin_core_core_range_dynamic_range.$_$.w;\n var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s;\n var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.c;\n var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e2;\n var PolymorphicSerializer_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a;\n var CustomSerializer_getInstance = kotlin_core_core_range_dynamic_range.$_$.u;\n var $serializer_getInstance_0 = kotlin_core_core_api.$_$.hb;\n var CustomSerializer_getInstance_0 = kotlin_core_core_range_dynamic_range.$_$.a1;\n var $serializer_getInstance_1 = kotlin_core_core_range_dynamic_range.$_$.g1;\n var MarginTemplateSerializer_getInstance = kotlin_core_core_range_dynamic_range.$_$.f1;\n var $serializer_getInstance_2 = kotlin_core_core_range_dynamic_range.$_$.i1;\n var CustomSerializer_getInstance_1 = kotlin_core_core_range_dynamic_range.$_$.d1;\n var throwArrayMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.n2;\n var Part = kotlin_core_core_range_dynamic_range.$_$.h;\n var $serializer_getInstance_3 = kotlin_core_core_range_dynamic_range.$_$.v;\n var $serializer_getInstance_4 = kotlin_core_core_api.$_$.pb;\n var mapCapacity = kotlin_kotlin.$_$.q6;\n var coerceAtLeast = kotlin_kotlin.$_$.fa;\n var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.p;\n var get_elementNames = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p1;\n var get_jsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.m;\n var contains_0 = kotlin_kotlin.$_$.w4;\n var to = kotlin_kotlin.$_$.be;\n var toMap = kotlin_kotlin.$_$.w7;\n var get_jsonArray = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.l;\n //endregion\n //region block: pre-declaration\n setMetadataFor(ComponentMultiBuilder, 'ComponentMultiBuilder', interfaceMeta);\n setMetadataFor(ComponentSingleBuilder, 'ComponentSingleBuilder', interfaceMeta);\n setMetadataFor(ComponentsCommonData, 'ComponentsCommonData', classMeta);\n setMetadataFor(CustomComponentBuilder, 'CustomComponentBuilder', interfaceMeta);\n setMetadataFor(StaticComponentBuilder, 'StaticComponentBuilder', classMeta, VOID, [CustomComponentBuilder]);\n setMetadataFor(ProductSpecificationBuilder, 'ProductSpecificationBuilder', classMeta);\n setMetadataFor(AllowedDoorPairsComponentBuilder, 'AllowedDoorPairsComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], AllowedDoorPairsComponentBuilder);\n setMetadataFor(AssemblyComponentsBuilder, 'AssemblyComponentsBuilder', classMeta, VOID, [ComponentMultiBuilder]);\n setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(AutoAdaptGuestComponentBuilder, 'AutoAdaptGuestComponentBuilder', classMeta, VOID, [ComponentSingleBuilder]);\n setMetadataFor(AutoAdaptHostComponentBuilder, 'AutoAdaptHostComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], AutoAdaptHostComponentBuilder);\n setMetadataFor(BooleanComponentBuilder, 'BooleanComponentBuilder', classMeta, VOID, [ComponentSingleBuilder]);\n setMetadataFor(ColliderShapeComponentBuilder, 'ColliderShapeComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], ColliderShapeComponentBuilder);\n setMetadataFor(ConnectorsComponentBuilder, 'ConnectorsComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], ConnectorsComponentBuilder);\n setMetadataFor(DragProjectionPointComponentBuilder, 'DragProjectionPointComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], DragProjectionPointComponentBuilder);\n setMetadataFor(DragSurfacesComponentBuilder, 'DragSurfacesComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], DragSurfacesComponentBuilder);\n setMetadataFor(FunctionalMarginShapeComponentBuilder, 'FunctionalMarginShapeComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], FunctionalMarginShapeComponentBuilder);\n setMetadataFor(FunctionalZonesLocalComponentBuilder, 'FunctionalZonesLocalComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], FunctionalZonesLocalComponentBuilder);\n setMetadataFor(LightComponentBuilder, 'LightComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], LightComponentBuilder);\n setMetadataFor(MetaDataComponentBuilder, 'MetaDataComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], MetaDataComponentBuilder);\n setMetadataFor(ModelInfoComponentBuilder, 'ModelInfoComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], ModelInfoComponentBuilder);\n setMetadataFor(ModelTransformComponentBuilder, 'ModelTransformComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], ModelTransformComponentBuilder);\n setMetadataFor(PlacementZoneByHeightComponentBuilder, 'PlacementZoneByHeightComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], PlacementZoneByHeightComponentBuilder);\n setMetadataFor(PolyhedronColliderIdsPair, 'PolyhedronColliderIdsPair', classMeta);\n setMetadataFor(ProductStructureComponentBuilder, 'ProductStructureComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], ProductStructureComponentBuilder);\n setMetadataFor(ProppingComponentBuilder, 'ProppingComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], ProppingComponentBuilder);\n setMetadataFor(RecommendedInitialPositionFromFloorComponentBuilder, 'RecommendedInitialPositionFromFloorComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], RecommendedInitialPositionFromFloorComponentBuilder);\n setMetadataFor(RelativeConnectorsComponentBuilder, 'RelativeConnectorsComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], RelativeConnectorsComponentBuilder);\n setMetadataFor(RequiredComponentsBuilder, 'RequiredComponentsBuilder', classMeta, VOID, [ComponentMultiBuilder], RequiredComponentsBuilder);\n setMetadataFor(VisualLightSourceComponentBuilder, 'VisualLightSourceComponentBuilder', classMeta, VOID, [ComponentSingleBuilder], VisualLightSourceComponentBuilder);\n setMetadataFor(Companion, 'Companion', objectMeta);\n setMetadataFor(IPEXRangeFormatCatalog, 'IPEXRangeFormatCatalog', classMeta, VOID, [ProductCatalog], IPEXRangeFormatCatalog);\n setMetadataFor(AmendableCatalog, 'AmendableCatalog', classMeta, IPEXRangeFormatCatalog, VOID, AmendableCatalog);\n setMetadataFor(Companion_0, 'Companion', objectMeta);\n setMetadataFor(InheritanceResolver, 'InheritanceResolver', classMeta);\n setMetadataFor(ReadOnlyItemRepository, 'ReadOnlyItemRepository', interfaceMeta);\n setMetadataFor(ItemRepository, 'ItemRepository', classMeta, VOID, [ReadOnlyItemRepository], ItemRepository);\n setMetadataFor(Companion_1, 'Companion', objectMeta);\n setMetadataFor($serializer, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(AssemblyChildDTO, 'AssemblyChildDTO', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_5});\n setMetadataFor(Companion_2, 'Companion', objectMeta);\n setMetadataFor($serializer_0, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(ColliderDTO, 'ColliderDTO', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_6});\n setMetadataFor(CustomSerializer, 'CustomSerializer', objectMeta, VOID, [KSerializer]);\n setMetadataFor(ProductDTO, 'ProductDTO', classMeta, VOID, VOID, VOID, VOID, {0: CustomSerializer_getInstance_2});\n setMetadataFor(Companion_3, 'Companion', objectMeta);\n setMetadataFor($serializer_1, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(ItemComponentsDTO, 'ItemComponentsDTO', classMeta, VOID, VOID, ItemComponentsDTO, VOID, {0: $serializer_getInstance_7});\n setMetadataFor(Companion_4, 'Companion', objectMeta);\n setMetadataFor($serializer_2, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(ItemParametersDTO, 'ItemParametersDTO', classMeta, VOID, VOID, ItemParametersDTO, VOID, {0: $serializer_getInstance_8});\n setMetadataFor(Companion_5, 'Companion', objectMeta);\n setMetadataFor($serializer_3, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RangeItemDTO, 'RangeItemDTO', classMeta, VOID, VOID, RangeItemDTO, VOID, {0: $serializer_getInstance_9});\n setMetadataFor(Companion_6, 'Companion', objectMeta);\n setMetadataFor(ItemParser, 'ItemParser', classMeta, VOID, VOID, ItemParser);\n //endregion\n function ComponentMultiBuilder() {\n }\n function ComponentSingleBuilder() {\n }\n function buildColliders($this, data, item) {\n var tmp0_safe_receiver = item.parameters;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.size;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.ComponentsCommonData.buildColliders.' call\n var tmp_0;\n try {\n // Inline function 'kotlin.collections.mutableListOf' call\n var ids = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(data.length);\n var inductionVariable = 0;\n var last = data.length;\n while (inductionVariable < last) {\n var item_0 = data[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.builder.ComponentsCommonData.buildColliders..' call\n ids.q(item_0.id);\n var tmp$ret$1 = $this.getPolyhedronForSize(item_0.dimension, tmp1_safe_receiver);\n destination.q(tmp$ret$1);\n }\n var polyhedra = copyToArray(destination);\n var tmp_1 = $this;\n var tmp_2;\n // Inline function 'kotlin.collections.isEmpty' call\n if (polyhedra.length === 0) {\n tmp_2 = null;\n } else {\n var tmp_3 = merge(polyhedra);\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$6 = copyToArray(ids);\n tmp_2 = new PolyhedronColliderIdsPair(tmp_3, tmp$ret$6);\n }\n tmp_1.o4a_1 = tmp_2;\n tmp_0 = $this.o4a_1;\n } catch ($p) {\n var tmp_4;\n if ($p instanceof Error_0) {\n var e = $p;\n var message = 'Specification of collider not valid. ' + e.message;\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n throw $p;\n }\n }\n tmp = tmp_0;\n }\n var tmp2_elvis_lhs = tmp;\n var tmp_5;\n if (tmp2_elvis_lhs == null) {\n var message_0 = 'No size set on ' + item.id;\n throw IllegalStateException_init_$Create$(toString(message_0));\n } else {\n tmp_5 = tmp2_elvis_lhs;\n }\n return tmp_5;\n }\n function ComponentsCommonData(item, modelRootURL) {\n modelRootURL = modelRootURL === VOID ? null : modelRootURL;\n this.item = item;\n this.modelRootURL = modelRootURL;\n this.o4a_1 = null;\n }\n protoOf(ComponentsCommonData).p4a = function () {\n return this.item;\n };\n protoOf(ComponentsCommonData).f48 = function () {\n return this.modelRootURL;\n };\n protoOf(ComponentsCommonData).getColliders = function (colliders) {\n var tmp;\n if (colliders == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.ComponentsCommonData.getColliders.' call\n var tmp0_elvis_lhs = this.o4a_1;\n tmp = tmp0_elvis_lhs == null ? buildColliders(this, colliders, this.item) : tmp0_elvis_lhs;\n }\n return tmp;\n };\n protoOf(ComponentsCommonData).getPolyhedronForSize = function (dimension, size) {\n var tmp;\n if (dimension == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.ComponentsCommonData.getPolyhedronForSize.' call\n tmp = dimension.getPolyhedronForSize(size);\n }\n var tmp4_elvis_lhs = tmp;\n var tmp_0;\n if (tmp4_elvis_lhs == null) {\n var tmp1_width = size.s2e_1;\n var tmp2_height = size.t2e_1;\n var tmp3_depth = size.u2e_1;\n tmp_0 = (new Dimension(VOID, VOID, tmp3_depth, VOID, tmp2_height, VOID, VOID, VOID, tmp1_width)).getPolyhedronForSize(size);\n } else {\n tmp_0 = tmp4_elvis_lhs;\n }\n return tmp_0;\n };\n function CustomComponentBuilder() {\n }\n function StaticComponentBuilder(component) {\n this.q4a_1 = component;\n }\n protoOf(StaticComponentBuilder).r4a = function (rangeItem, components, commonData) {\n return this.q4a_1;\n };\n protoOf(StaticComponentBuilder).build = function (rangeItem, components, commonData) {\n return this.r4a(rangeItem, components, commonData);\n };\n protoOf(StaticComponentBuilder).s4a = function (parentCustomComponentBuilder) {\n return this;\n };\n protoOf(StaticComponentBuilder).inherit = function (parentCustomComponentBuilder) {\n return this.s4a(parentCustomComponentBuilder);\n };\n function buildComponents($this, rangeItem) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var allComponents = ArrayList_init_$Create$();\n var commonData = new ComponentsCommonData(rangeItem, $this.t4a_1);\n if (!(rangeItem.components == null)) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = rangeItem.components.customComponents.p2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.builder.ProductSpecificationBuilder.buildComponents.' call\n allComponents.q(element.build(rangeItem, rangeItem.components, commonData));\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = $this.u4a_1.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.range.ipex.range.builder.ProductSpecificationBuilder.buildComponents.' call\n allComponents.q(element_0.buildSingle(rangeItem, rangeItem.components, commonData));\n }\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_1 = $this.v4a_1.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'com.ikea.range.ipex.range.builder.ProductSpecificationBuilder.buildComponents.' call\n allComponents.x(element_1.buildMulti(rangeItem, rangeItem.components, commonData));\n }\n }\n return filterNotNull(allComponents);\n }\n function ProductSpecificationBuilder$singleBuilders$lambda() {\n return new SelectableComponent();\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_0(it) {\n return it.selectable === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_1() {\n return new OutlineableComponent();\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_2(it) {\n return it.outlineable === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_3() {\n return new DraggableComponent();\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_4(it) {\n return it.draggable === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_5() {\n return DoorComponent_getInstance();\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_6(it) {\n return it.door === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_7() {\n return DoorFrontComponent_getInstance();\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_8(it) {\n return it.doorFront === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_9() {\n return HandleComponent_getInstance();\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_10(it) {\n return it.handle === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_11() {\n return DrawerComponent_getInstance();\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_12(it) {\n return it.drawer === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_13() {\n return FrameComponent_getInstance();\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_14(it) {\n return it.frame === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_15() {\n return LegComponent_getInstance();\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_16(it) {\n return it.leg === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_17() {\n return new OutlinedComponent();\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_18(it) {\n return it.outlined === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_19() {\n return ProppingComponent_instance;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_20(it) {\n return it.propping === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_21() {\n return AlwaysHangDownComponent_instance;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_22(it) {\n return it.alwaysHangDown === true;\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_23() {\n return new UnserializableEntityComponent();\n }\n function ProductSpecificationBuilder$singleBuilders$lambda_24(it) {\n return it.serializeEntity === false;\n }\n function ProductSpecificationBuilder(itemRepository, modelRootURL) {\n modelRootURL = modelRootURL === VOID ? null : modelRootURL;\n this.t4a_1 = modelRootURL;\n var tmp = this;\n var tmp_0 = new AutoAdaptGuestComponentBuilder(itemRepository);\n var tmp_1 = ProductSpecificationBuilder$singleBuilders$lambda;\n var tmp_2 = new BooleanComponentBuilder(tmp_1, ProductSpecificationBuilder$singleBuilders$lambda_0);\n var tmp_3 = ProductSpecificationBuilder$singleBuilders$lambda_1;\n var tmp_4 = new BooleanComponentBuilder(tmp_3, ProductSpecificationBuilder$singleBuilders$lambda_2);\n var tmp_5 = ProductSpecificationBuilder$singleBuilders$lambda_3;\n var tmp_6 = new BooleanComponentBuilder(tmp_5, ProductSpecificationBuilder$singleBuilders$lambda_4);\n var tmp_7 = ProductSpecificationBuilder$singleBuilders$lambda_5;\n var tmp_8 = new BooleanComponentBuilder(tmp_7, ProductSpecificationBuilder$singleBuilders$lambda_6);\n var tmp_9 = ProductSpecificationBuilder$singleBuilders$lambda_7;\n var tmp_10 = new BooleanComponentBuilder(tmp_9, ProductSpecificationBuilder$singleBuilders$lambda_8);\n var tmp_11 = ProductSpecificationBuilder$singleBuilders$lambda_9;\n var tmp_12 = new BooleanComponentBuilder(tmp_11, ProductSpecificationBuilder$singleBuilders$lambda_10);\n var tmp_13 = ProductSpecificationBuilder$singleBuilders$lambda_11;\n var tmp_14 = new BooleanComponentBuilder(tmp_13, ProductSpecificationBuilder$singleBuilders$lambda_12);\n var tmp_15 = ProductSpecificationBuilder$singleBuilders$lambda_13;\n var tmp_16 = new BooleanComponentBuilder(tmp_15, ProductSpecificationBuilder$singleBuilders$lambda_14);\n var tmp_17 = ProductSpecificationBuilder$singleBuilders$lambda_15;\n var tmp_18 = new BooleanComponentBuilder(tmp_17, ProductSpecificationBuilder$singleBuilders$lambda_16);\n var tmp_19 = ProductSpecificationBuilder$singleBuilders$lambda_17;\n var tmp_20 = new BooleanComponentBuilder(tmp_19, ProductSpecificationBuilder$singleBuilders$lambda_18);\n var tmp_21 = ProductSpecificationBuilder$singleBuilders$lambda_19;\n var tmp_22 = new BooleanComponentBuilder(tmp_21, ProductSpecificationBuilder$singleBuilders$lambda_20);\n var tmp_23 = ProductSpecificationBuilder$singleBuilders$lambda_21;\n var tmp_24 = new BooleanComponentBuilder(tmp_23, ProductSpecificationBuilder$singleBuilders$lambda_22);\n var tmp_25 = ProductSpecificationBuilder$singleBuilders$lambda_23;\n tmp.u4a_1 = listOf([tmp_0, tmp_2, tmp_4, tmp_6, tmp_8, tmp_10, tmp_12, tmp_14, tmp_16, tmp_18, tmp_20, tmp_22, tmp_24, new BooleanComponentBuilder(tmp_25, ProductSpecificationBuilder$singleBuilders$lambda_24), new ConnectorsComponentBuilder(), new ModelInfoComponentBuilder(), new ModelTransformComponentBuilder(), new RelativeConnectorsComponentBuilder(), new ColliderShapeComponentBuilder(), new MetaDataComponentBuilder(), new AllowedDoorPairsComponentBuilder(), new AutoAdaptHostComponentBuilder(), new LightComponentBuilder(), new PlacementZoneByHeightComponentBuilder(), new RecommendedInitialPositionFromFloorComponentBuilder(), new VisualLightSourceComponentBuilder(), new DragProjectionPointComponentBuilder(), new FunctionalMarginShapeComponentBuilder(), new FunctionalZonesLocalComponentBuilder(), new ProppingComponentBuilder(), new DragSurfacesComponentBuilder(), new ProductStructureComponentBuilder()]);\n this.v4a_1 = listOf([new RequiredComponentsBuilder(), new AssemblyComponentsBuilder(itemRepository)]);\n }\n protoOf(ProductSpecificationBuilder).buildProductSpecification = function (rangeItem) {\n var productComponent = new ProductComponent(rangeItem.id);\n var components = buildComponents(this, rangeItem);\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = plus(components, productComponent);\n var tmp$ret$0 = copyToArray(this_0);\n return new ProductSpecification(tmp$ret$0);\n };\n function AllowedDoorPairsComponentBuilder() {\n }\n protoOf(AllowedDoorPairsComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.allowedDoorPairs;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.AllowedDoorPairsComponentBuilder.buildSingle.' call\n tmp = AllowedDoorPairsComponentFromArrays(tmp0_safe_receiver);\n }\n return tmp;\n };\n function buildAssemblyComponents($this, rangeItem, components) {\n var tmp0_safe_receiver = rangeItem.parameters;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.parts;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : toMutableList(tmp1_safe_receiver);\n var tmp;\n if (tmp2_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.AssemblyComponentsBuilder.buildAssemblyComponents.' call\n var tmp0_safe_receiver_0 = components.assembly;\n var tmp_0;\n if (tmp0_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.AssemblyComponentsBuilder.buildAssemblyComponents..' call\n tmp_0 = mapPartsToAssemblyStructureChildren($this, tmp2_safe_receiver, tmp0_safe_receiver_0, rangeItem.parameters.size);\n }\n tmp = tmp_0;\n }\n var tmp3_elvis_lhs = tmp;\n var tmp_1;\n if (tmp3_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$4 = [];\n tmp_1 = new Pair(tmp$ret$4, emptyMap());\n } else {\n tmp_1 = tmp3_elvis_lhs;\n }\n var tmp4_container = tmp_1;\n var assemblyParts = tmp4_container.af();\n var partsMap = tmp4_container.bf();\n return listOf([new AssemblyStructureComponent(assemblyParts), new AssemblyPartsComponent(partsMap)]);\n }\n function mapPartsToAssemblyStructureChildren($this, catalogParts, assemblyChildren, catalogSize) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var assemblyParts = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.mutableMapOf' call\n var partsMap = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = assemblyChildren.length;\n while (inductionVariable < last) {\n var element = assemblyChildren[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.builder.component.AssemblyComponentsBuilder.mapPartsToAssemblyStructureChildren.' call\n var tmp$ret$3;\n $l$block: {\n // Inline function 'kotlin.collections.indexOfFirst' call\n var index = 0;\n var tmp0_iterator = catalogParts.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.builder.component.AssemblyComponentsBuilder.mapPartsToAssemblyStructureChildren..' call\n if (item.partKey === element.partKey) {\n tmp$ret$3 = index;\n break $l$block;\n }\n index = index + 1 | 0;\n }\n tmp$ret$3 = -1;\n }\n var partIndex = tmp$ret$3;\n var tmp;\n if (!(element.connector == null) ? !(element.connectorOnHost == null) : false) {\n tmp = new AssemblyPartSnapInfo(element.connectorOnHost, element.connector);\n } else {\n tmp = null;\n }\n var snapInfo = tmp;\n if (partIndex > -1) {\n var part = catalogParts.h1(partIndex);\n var tmp_0;\n if (!(element.children == null)) {\n var tmp0_safe_receiver = $this.w4a_1.findItemDTO(part.id);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.parameters;\n var childCatalogSize = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.size;\n tmp_0 = mapPartsToAssemblyStructureChildren($this, catalogParts, element.children, childCatalogSize);\n } else {\n tmp_0 = new Pair(null, null);\n }\n var tmp2_container = tmp_0;\n var children = tmp2_container.af();\n var childrenParts = tmp2_container.bf();\n if (childrenParts == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n partsMap.s2(childrenParts);\n }\n var tmp_1;\n if (!(element.position == null)) {\n var tmp_2;\n if (!(catalogSize == null)) {\n tmp_2 = element.position.applyToBox(Companion_getInstance_1().fromSize(catalogSize.vector));\n } else {\n tmp_2 = element.position.absoluteTransform;\n }\n tmp_1 = tmp_2;\n } else if (!(element.transform == null)) {\n tmp_1 = new Transform(new Vector(element.transform[0], element.transform[1], element.transform[2]), Companion_getInstance_0().fromEulerDegrees(new Degrees(element.transform[3]), new Degrees(element.transform[4]), new Degrees(element.transform[5])));\n } else {\n tmp_1 = Companion_getInstance().IDENTITY;\n }\n var transform = tmp_1;\n var tmp4_elvis_lhs = element.locked;\n var assemblyPart = new AssemblyPart(element.partKey, transform, snapInfo, children, tmp4_elvis_lhs == null ? true : tmp4_elvis_lhs);\n // Inline function 'kotlin.collections.set' call\n var key = element.partKey;\n var value = part.id;\n partsMap.r2(key, value);\n assemblyParts.q(assemblyPart);\n } else {\n var tmp5_safe_receiver = element.position;\n var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.absoluteTransform;\n var transform_0 = tmp6_elvis_lhs == null ? Companion_getInstance().IDENTITY : tmp6_elvis_lhs;\n var tmp7_elvis_lhs = element.locked;\n var assemblyPart_0 = new AssemblyPart(element.partKey, transform_0, snapInfo, null, tmp7_elvis_lhs == null ? true : tmp7_elvis_lhs);\n // Inline function 'kotlin.collections.set' call\n var key_0 = element.partKey;\n partsMap.r2(key_0, '');\n assemblyParts.q(assemblyPart_0);\n }\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$5 = copyToArray(assemblyParts);\n return new Pair(tmp$ret$5, partsMap);\n }\n function AssemblyComponentsBuilder(itemRepository) {\n this.w4a_1 = itemRepository;\n }\n protoOf(AssemblyComponentsBuilder).buildMulti = function (item, components, commonData) {\n var tmp;\n if (!(components.assembly == null)) {\n tmp = buildAssemblyComponents(this, item, components);\n } else {\n tmp = emptyList();\n }\n return tmp;\n };\n function sam$kotlin_Comparator$0(function_0) {\n this.x4a_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0).u1j = function (a, b) {\n return this.x4a_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function AutoAdaptGuestComponentBuilder$buildSingle$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.AutoAdaptGuestComponentBuilder.buildSingle..' call\n var tmp0_safe_receiver = b.components;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.autoAdaptGroup;\n var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.priority;\n // Inline function 'com.ikea.range.ipex.range.builder.component.AutoAdaptGuestComponentBuilder.buildSingle..' call\n var tmp0_safe_receiver_0 = a.components;\n var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.autoAdaptGroup;\n var tmp$ret$1 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.priority;\n return compareValues(tmp, tmp$ret$1);\n }\n function AutoAdaptGuestComponentBuilder(itemRepository) {\n this.y4a_1 = itemRepository;\n }\n protoOf(AutoAdaptGuestComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.autoAdaptGroup;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.AutoAdaptGuestComponentBuilder.buildSingle.' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.sortedByDescending' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.y4a_1.getAllItemDTOs();\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.builder.component.AutoAdaptGuestComponentBuilder.buildSingle..' call\n var tmp0_safe_receiver_0 = element.components;\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.autoAdaptGroup;\n if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.key) === tmp0_safe_receiver.key) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.comparisons.compareByDescending' call\n var tmp_0 = AutoAdaptGuestComponentBuilder$buildSingle$lambda;\n var tmp$ret$3 = new sam$kotlin_Comparator$0(tmp_0);\n var this_1 = sortedWith(destination, tmp$ret$3);\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));\n var tmp0_iterator = this_1.t();\n while (tmp0_iterator.u()) {\n var item_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.builder.component.AutoAdaptGuestComponentBuilder.buildSingle..' call\n var tmp$ret$5 = item_0.id;\n destination_0.q(tmp$ret$5);\n }\n var variants = copyToArray(destination_0);\n tmp = new AutoAdaptGuestComponent(variants, tmp0_safe_receiver.key);\n }\n return tmp;\n };\n function AutoAdaptHostComponentBuilder() {\n }\n protoOf(AutoAdaptHostComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.autoAdaptHost;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.AutoAdaptHostComponentBuilder.buildSingle.' call\n var tmp0_safe_receiver_0 = item.parameters;\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.size;\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.AutoAdaptHostComponentBuilder.buildSingle..' call\n var tmp3_elvis_lhs = tmp0_safe_receiver.hostZone;\n var tmp_1;\n if (tmp3_elvis_lhs == null) {\n var tmp0_width = tmp1_safe_receiver.s2e_1;\n var tmp1_height = tmp1_safe_receiver.t2e_1;\n var tmp2_depth = tmp1_safe_receiver.u2e_1;\n tmp_1 = new Dimension(VOID, VOID, tmp2_depth, VOID, tmp1_height, VOID, VOID, VOID, tmp0_width);\n } else {\n tmp_1 = tmp3_elvis_lhs;\n }\n var dim = tmp_1;\n tmp_0 = new AutoAdaptHostComponent(dim.getPolyhedronForSize(tmp1_safe_receiver));\n }\n tmp = tmp_0;\n }\n return tmp;\n };\n function BooleanComponentBuilder(builder, selector) {\n this.builder = builder;\n this.selector = selector;\n }\n protoOf(BooleanComponentBuilder).z4a = function () {\n return this.builder;\n };\n protoOf(BooleanComponentBuilder).a4b = function () {\n return this.selector;\n };\n protoOf(BooleanComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp;\n if (this.selector(components)) {\n tmp = this.builder();\n } else {\n tmp = null;\n }\n return tmp;\n };\n function ColliderShapeComponentBuilder() {\n }\n protoOf(ColliderShapeComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.colliders;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0;\n // Inline function 'kotlin.collections.isEmpty' call\n if (tmp0_safe_receiver.length === 0) {\n tmp_0 = null;\n } else {\n var tmp0_safe_receiver_0 = commonData.getColliders(tmp0_safe_receiver);\n var tmp_1;\n if (tmp0_safe_receiver_0 == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.ColliderShapeComponentBuilder.buildSingle..' call\n tmp_1 = new ColliderShapeComponent(tmp0_safe_receiver_0.b4b_1, tmp0_safe_receiver_0.c4b_1);\n }\n return tmp_1;\n }\n return tmp_0;\n }\n return tmp;\n };\n function buildConnector($this, data, item) {\n var tmp0_safe_receiver = item.parameters;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.size;\n var tmp = tmp1_elvis_lhs == null ? new Size() : tmp1_elvis_lhs;\n return data.getConnectorForSize(tmp, ConnectorsComponentBuilder$buildConnector$lambda($this, data, item));\n }\n function addConnectorTags($this, data, item, connector) {\n var tmp0_safe_receiver = data.demands;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.ConnectorsComponentBuilder.addConnectorTags.' call\n var tmp0_safe_receiver_0 = item.parameters;\n connector.setDemands(convertMagicLabels($this, tmp0_safe_receiver, tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.labels).slice());\n }\n var tmp1_safe_receiver = data.offers;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.ConnectorsComponentBuilder.addConnectorTags.' call\n var tmp0_safe_receiver_1 = item.parameters;\n connector.setOffers(convertMagicLabels($this, tmp1_safe_receiver, tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.labels).slice());\n }\n var tmp;\n if (!(data.requireUpwardParent == null)) {\n var tmp_0 = data.requireUpwardParent;\n tmp = (!(tmp_0 == null) ? typeof tmp_0 === 'boolean' : false) ? tmp_0 : THROW_CCE();\n } else {\n tmp = false;\n }\n if (tmp) {\n connector.withTag('requireUpwardParent');\n }\n var tmp_1;\n if (!(data.requireDownwardParent == null)) {\n var tmp_2 = data.requireDownwardParent;\n tmp_1 = (!(tmp_2 == null) ? typeof tmp_2 === 'boolean' : false) ? tmp_2 : THROW_CCE();\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n connector.withTag('requireDownwardParent');\n }\n return connector;\n }\n function convertMagicLabels($this, connectorLabels, parameterLabels) {\n var tmp;\n if (parameterLabels == null) {\n tmp = connectorLabels;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(connectorLabels.length);\n var inductionVariable = 0;\n var last = connectorLabels.length;\n while (inductionVariable < last) {\n var item = connectorLabels[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.builder.component.ConnectorsComponentBuilder.convertMagicLabels.' call\n var tmp_0;\n try {\n var result = '';\n var curParam = null;\n var inductionVariable_0 = 0;\n var last_0 = charSequenceLength(item) - 1 | 0;\n if (inductionVariable_0 <= last_0)\n do {\n var i = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n if (curParam == null ? charSequenceGet(item, i) === _Char___init__impl__6a9atx(123) : false)\n curParam = '';\n else if (!(curParam == null) ? !(charSequenceGet(item, i) === _Char___init__impl__6a9atx(125)) : false)\n curParam = curParam + toString_0(charSequenceGet(item, i));\n else if (!(curParam == null) ? charSequenceGet(item, i) === _Char___init__impl__6a9atx(125) : false) {\n var tmp1_safe_receiver = parameterLabels.b3(curParam);\n var tmp_1;\n if (tmp1_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.ConnectorsComponentBuilder.convertMagicLabels..' call\n tmp_1 = result + tmp1_safe_receiver;\n }\n var tmp2_elvis_lhs = tmp_1;\n var tmp_2;\n if (tmp2_elvis_lhs == null) {\n var message = 'magic failed';\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n tmp_2 = tmp2_elvis_lhs;\n }\n result = tmp_2;\n curParam = null;\n } else\n result = result + toString_0(charSequenceGet(item, i));\n }\n while (inductionVariable_0 <= last_0);\n tmp_0 = result;\n } catch ($p) {\n var tmp_3;\n if ($p instanceof Error_0) {\n var e = $p;\n tmp_3 = item;\n } else {\n throw $p;\n }\n tmp_0 = tmp_3;\n }\n var tmp$ret$2 = tmp_0;\n destination.q(tmp$ret$2);\n }\n tmp = copyToArray(destination);\n }\n return tmp;\n }\n function ConnectorsComponentBuilder$buildConnector$lambda(this$0, $data, $item) {\n return function (it) {\n addConnectorTags(this$0, $data, $item, it);\n return Unit_instance;\n };\n }\n function ConnectorsComponentBuilder() {\n }\n protoOf(ConnectorsComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.connectors;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0;\n // Inline function 'kotlin.collections.isEmpty' call\n if (tmp0_safe_receiver.length === 0) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.ConnectorsComponentBuilder.buildSingle..' call\n var tmp0_safe_receiver_0 = buildConnector(this, element, item);\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver_0);\n }\n }\n var tmp$ret$5 = copyToArray(destination);\n tmp_0 = new ConnectorsComponent(tmp$ret$5);\n }\n return tmp_0;\n }\n return tmp;\n };\n function DragProjectionPointComponentBuilder() {\n }\n protoOf(DragProjectionPointComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = item.parameters;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.size;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.DragProjectionPointComponentBuilder.buildSingle.' call\n var tmp0_safe_receiver_0 = components.dragProjectionPoint;\n var tmp_0;\n if (tmp0_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.DragProjectionPointComponentBuilder.buildSingle..' call\n var point = tmp0_safe_receiver_0.applyToBox(Companion_getInstance_1().fromSize(tmp1_safe_receiver.vector)).position;\n tmp_0 = new DragProjectionPointComponent(point);\n }\n tmp = tmp_0;\n }\n return tmp;\n };\n function generateDragSurface($this, dragData, size, collider) {\n var tmp;\n if (dragData.sameAsCollider) {\n var tmp_0;\n if (collider == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.DragSurfacesComponentBuilder.generateDragSurface.' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = [new DragSurface(collider, null)];\n }\n tmp = tmp_0;\n } else {\n var tmp1_safe_receiver = dragData.surfaces;\n var tmp_1;\n if (tmp1_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.DragSurfacesComponentBuilder.generateDragSurface.' call\n var tmp0_safe_receiver = element.generateDragSurface(size);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n tmp_1 = destination;\n }\n var tmp2_safe_receiver = tmp_1;\n var tmp_2;\n if (tmp2_safe_receiver == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_2 = copyToArray(tmp2_safe_receiver);\n }\n var tmp3_elvis_lhs = tmp_2;\n var tmp_3;\n if (tmp3_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_3 = [];\n } else {\n tmp_3 = tmp3_elvis_lhs;\n }\n var polyhedronForSurfaces = tmp_3;\n var tmp_4;\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(polyhedronForSurfaces.length === 0)) {\n tmp_4 = polyhedronForSurfaces;\n } else {\n tmp_4 = null;\n }\n tmp = tmp_4;\n }\n return tmp;\n }\n function DragSurfacesComponentBuilder() {\n }\n protoOf(DragSurfacesComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = item.parameters;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.size;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.DragSurfacesComponentBuilder.buildSingle.' call\n var tmp0_safe_receiver_0 = components.dragSurfaces;\n var tmp_0;\n if (tmp0_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.DragSurfacesComponentBuilder.buildSingle..' call\n var tmp0_safe_receiver_1 = commonData.getColliders(components.colliders);\n var tmp_1;\n if (tmp0_safe_receiver_1 == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.DragSurfacesComponentBuilder.buildSingle...' call\n var dragSurfaces = generateDragSurface(this, tmp0_safe_receiver_0, tmp1_safe_receiver, tmp0_safe_receiver_1.b4b_1);\n var tmp_2;\n if (dragSurfaces == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.DragSurfacesComponentBuilder.buildSingle....' call\n tmp_2 = new DragSurfacesComponent(dragSurfaces, false);\n }\n tmp_1 = tmp_2;\n }\n tmp_0 = tmp_1;\n }\n tmp = tmp_0;\n }\n return tmp;\n };\n function FunctionalMarginShapeComponentBuilder() {\n }\n protoOf(FunctionalMarginShapeComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.functionalMargin;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.FunctionalMarginShapeComponentBuilder.buildSingle.' call\n tmp = new FunctionalMarginShapeComponent(tmp0_safe_receiver.toMargin());\n }\n return tmp;\n };\n function FunctionalZonesLocalComponentBuilder() {\n }\n protoOf(FunctionalZonesLocalComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = item.parameters;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.size;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.FunctionalZonesLocalComponentBuilder.buildSingle.' call\n var tmp0_safe_receiver_0 = components.functionalZones;\n var tmp_0;\n if (tmp0_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.FunctionalZonesLocalComponentBuilder.buildSingle..' call\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(tmp0_safe_receiver_0.length);\n var inductionVariable = 0;\n var last = tmp0_safe_receiver_0.length;\n while (inductionVariable < last) {\n var item_0 = tmp0_safe_receiver_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.builder.component.FunctionalZonesLocalComponentBuilder.buildSingle...' call\n var tmp$ret$0 = new FunctionalZone(item_0.id, item_0.layer, commonData.getPolyhedronForSize(item_0.dimension, tmp1_safe_receiver));\n destination.q(tmp$ret$0);\n }\n var tmp$ret$3 = copyToArray(destination);\n tmp_0 = new FunctionalZonesLocalComponent(tmp$ret$3);\n }\n tmp = tmp_0;\n }\n return tmp;\n };\n function LightComponentBuilder() {\n }\n protoOf(LightComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp;\n if (components.outerLight === true) {\n tmp = new LightComponent('outer');\n } else if (components.innerLight === true) {\n tmp = new LightComponent('inner');\n } else {\n tmp = null;\n }\n return tmp;\n };\n function MetaDataComponentBuilder() {\n }\n protoOf(MetaDataComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.meta;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.MetaDataComponentBuilder.buildSingle.' call\n tmp = new MetaDataComponent(tmp0_safe_receiver);\n }\n return tmp;\n };\n function ModelInfoComponentBuilder() {\n }\n protoOf(ModelInfoComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.modelURI;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.ModelInfoComponentBuilder.buildSingle.' call\n tmp = new ModelInfoComponent(commonData.modelRootURL, tmp0_safe_receiver, null);\n }\n return tmp;\n };\n function ModelTransformComponentBuilder() {\n }\n protoOf(ModelTransformComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.modelTransform;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.ModelTransformComponentBuilder.buildSingle.' call\n tmp = new ModelTransformComponent(tmp0_safe_receiver);\n }\n return tmp;\n };\n function PlacementZoneByHeightComponentBuilder() {\n }\n protoOf(PlacementZoneByHeightComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.placementZoneByHeight;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.PlacementZoneByHeightComponentBuilder.buildSingle.' call\n tmp = new PlacementZoneByHeightComponent(tmp0_safe_receiver.minY, tmp0_safe_receiver.maxY);\n }\n return tmp;\n };\n function PolyhedronColliderIdsPair(polyhedron, ids) {\n this.b4b_1 = polyhedron;\n this.c4b_1 = ids;\n }\n protoOf(PolyhedronColliderIdsPair).toString = function () {\n return 'PolyhedronColliderIdsPair(polyhedron=' + this.b4b_1 + ', ids=' + toString(this.c4b_1) + ')';\n };\n protoOf(PolyhedronColliderIdsPair).hashCode = function () {\n var result = hashCode(this.b4b_1);\n result = imul(result, 31) + hashCode(this.c4b_1) | 0;\n return result;\n };\n protoOf(PolyhedronColliderIdsPair).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PolyhedronColliderIdsPair))\n return false;\n var tmp0_other_with_cast = other instanceof PolyhedronColliderIdsPair ? other : THROW_CCE();\n if (!equals(this.b4b_1, tmp0_other_with_cast.b4b_1))\n return false;\n if (!equals(this.c4b_1, tmp0_other_with_cast.c4b_1))\n return false;\n return true;\n };\n function buildProductStructureComponent($this, productStructure, sizeAABB, parts) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = productStructure.length;\n while (inductionVariable < last) {\n var element = productStructure[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n var tmp$ret$3;\n $l$block_0: {\n // Inline function 'com.ikea.range.ipex.range.builder.component.ProductStructureComponentBuilder.buildProductStructureComponent.' call\n var tmp;\n if (parts == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_0 = 0;\n var last_0 = parts.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = parts[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.builder.component.ProductStructureComponentBuilder.buildProductStructureComponent..' call\n if (element_0.partKey === element.partKey) {\n tmp$ret$1 = element_0;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp = tmp$ret$1;\n }\n var tmp1_safe_receiver = tmp;\n var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.id;\n var tmp_0;\n if (tmp2_elvis_lhs == null) {\n tmp$ret$3 = null;\n break $l$block_0;\n } else {\n tmp_0 = tmp2_elvis_lhs;\n }\n var productRef = tmp_0;\n var tmp3_safe_receiver = element.snap;\n var tmp_1;\n if (tmp3_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.ProductStructureComponentBuilder.buildProductStructureComponent..' call\n tmp_1 = new ProductStructureConnection(tmp3_safe_receiver.offeringPartKey, tmp3_safe_receiver.demandingConnector, tmp3_safe_receiver.offeringConnector);\n }\n tmp$ret$3 = new ProductStructureItem(element.partKey, productRef, tmp_1, element.transform.applyToBox(sizeAABB));\n }\n var tmp0_safe_receiver = tmp$ret$3;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination.q(tmp0_safe_receiver);\n }\n }\n var tmp$ret$9 = copyToArray(destination);\n return new ProductStructureComponent(tmp$ret$9);\n }\n function ProductStructureComponentBuilder() {\n }\n protoOf(ProductStructureComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.productStructure;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.ProductStructureComponentBuilder.buildSingle.' call\n var tmp0_safe_receiver_0 = item.parameters;\n var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.size;\n var size = tmp1_elvis_lhs == null ? new Size() : tmp1_elvis_lhs;\n var tmp_0 = Companion_getInstance_1().fromSize(size.vector);\n var tmp2_safe_receiver = item.parameters;\n tmp = buildProductStructureComponent(this, tmp0_safe_receiver, tmp_0, tmp2_safe_receiver == null ? null : tmp2_safe_receiver.parts);\n }\n return tmp;\n };\n function ProppingComponentBuilder() {\n }\n protoOf(ProppingComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp;\n if (components.propping === true) {\n tmp = ProppingComponent_instance;\n } else {\n tmp = null;\n }\n return tmp;\n };\n function RecommendedInitialPositionFromFloorComponentBuilder() {\n }\n protoOf(RecommendedInitialPositionFromFloorComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.recommendedInitialPositionFromFloor;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.RecommendedInitialPositionFromFloorComponentBuilder.buildSingle.' call\n tmp = new RecommendedInitialPositionFromFloorComponent(tmp0_safe_receiver);\n }\n return tmp;\n };\n function getRelativeConnectorData($this, item, components) {\n var tmp0_safe_receiver = item.parameters;\n var tmp;\n if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.size) == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp_0;\n // Inline function 'kotlin.collections.isNullOrEmpty' call\n var this_0 = components.connectors;\n // Inline function 'kotlin.contracts.contract' call\n var tmp_1;\n if (this_0 == null) {\n tmp_1 = true;\n } else {\n // Inline function 'kotlin.collections.isEmpty' call\n tmp_1 = this_0.length === 0;\n }\n if (tmp_1) {\n tmp_0 = null;\n } else {\n var tmp0_safe_receiver_0 = components.connectors;\n var tmp_2;\n if (tmp0_safe_receiver_0 == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp0_safe_receiver_0.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.builder.component.RelativeConnectorsComponentBuilder.getRelativeConnectorData..' call\n if (element.isRelativeToBounds()) {\n destination.q(element);\n }\n }\n tmp_2 = destination;\n }\n var tmp1_safe_receiver = tmp_2;\n var tmp_3;\n if (tmp1_safe_receiver == null) {\n tmp_3 = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));\n var tmp0_iterator = tmp1_safe_receiver.t();\n while (tmp0_iterator.u()) {\n var item_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.builder.component.RelativeConnectorsComponentBuilder.getRelativeConnectorData..' call\n var tmp$ret$5 = item_0.createRelativeConnectorData(item.parameters.size);\n destination_0.q(tmp$ret$5);\n }\n tmp_3 = destination_0;\n }\n var tmp2_safe_receiver = tmp_3;\n var tmp_4;\n if (tmp2_safe_receiver == null) {\n tmp_4 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_4 = copyToArray(tmp2_safe_receiver);\n }\n tmp_0 = tmp_4;\n }\n return tmp_0;\n }\n return tmp;\n }\n function RelativeConnectorsComponentBuilder() {\n }\n protoOf(RelativeConnectorsComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = getRelativeConnectorData(this, item, components);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.RelativeConnectorsComponentBuilder.buildSingle.' call\n tmp = new RelativeConnectorsComponent(tmp0_safe_receiver);\n }\n return tmp;\n };\n function RequiredComponentsBuilder() {\n }\n protoOf(RequiredComponentsBuilder).buildMulti = function (item, components, commonData) {\n return listOf([new ConnectionRootComponent(), new DisplayNameComponent(item.description)]);\n };\n function VisualLightSourceComponentBuilder() {\n }\n protoOf(VisualLightSourceComponentBuilder).buildSingle = function (item, components, commonData) {\n var tmp0_safe_receiver = components.visualLightSource;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.builder.component.VisualLightSourceComponentBuilder.buildSingle.' call\n tmp = new VisualLightSourceComponent(tmp0_safe_receiver.type, tmp0_safe_receiver.intensity, tmp0_safe_receiver.colorTemperature);\n }\n return tmp;\n };\n function AmendableCatalog$Companion$jsonParser$lambda($this$Json) {\n $this$Json.f16_1 = true;\n $this$Json.e16_1 = true;\n return Unit_instance;\n }\n function cleanupAndGetItemsAffectedByAmend($this, amendedItems) {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = amendedItems.length;\n while (inductionVariable < last) {\n var element = amendedItems[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.cleanupAndGetItemsAffectedByAmend.' call\n $this.j4b_1.set(element.id, element);\n }\n // Inline function 'kotlin.collections.distinctBy' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = amendedItems.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = amendedItems[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.cleanupAndGetItemsAffectedByAmend.' call\n var list = getItemsAffectedByAmend($this, element_0, $this.j4b_1.getAllItemDTOs());\n addAll(destination, list);\n }\n var set = HashSet_init_$Create$();\n var list_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var e = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.cleanupAndGetItemsAffectedByAmend.' call\n var key = e.id;\n if (set.q(key)) {\n list_0.q(e);\n }\n }\n var itemsToResolve = list_0;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(itemsToResolve, 10));\n var tmp0_iterator_0 = itemsToResolve.t();\n while (tmp0_iterator_0.u()) {\n var item = tmp0_iterator_0.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.cleanupAndGetItemsAffectedByAmend.' call\n var tmp$ret$5 = item.id;\n destination_0.q(tmp$ret$5);\n }\n var itemIdsToResolve = copyToArray(destination_0);\n $this.itemRepository.clear(itemIdsToResolve);\n return toMutableList_0(itemsToResolve);\n }\n function getItemsAffectedByAmend($this, item, items) {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = items.length;\n while (inductionVariable < last) {\n var element = items[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.getItemsAffectedByAmend.' call\n var tmp0_safe_receiver = element.inherits;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : contains(tmp0_safe_receiver, item.id);\n if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.getItemsAffectedByAmend.' call\n var list = getItemsAffectedByAmend($this, element_0, items);\n addAll(destination_0, list);\n }\n return plus(destination_0, item);\n }\n function collectMissingAncestors($this, ri) {\n var tmp0_safe_receiver = ri.inherits;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.collectMissingAncestors.' call\n var tmp0_safe_receiver_0 = $this.j4b_1.findItemDTO(element);\n var tmp_0;\n if (tmp0_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.collectMissingAncestors..' call\n tmp_0 = collectMissingAncestors($this, tmp0_safe_receiver_0);\n }\n var tmp1_elvis_lhs = tmp_0;\n var list = tmp1_elvis_lhs == null ? listOf_0(element) : tmp1_elvis_lhs;\n addAll(destination, list);\n }\n tmp = destination;\n }\n var tmp1_elvis_lhs_0 = tmp;\n var tmp_1;\n if (tmp1_elvis_lhs_0 == null) {\n // Inline function 'kotlin.collections.listOf' call\n tmp_1 = emptyList();\n } else {\n tmp_1 = tmp1_elvis_lhs_0;\n }\n return tmp_1;\n }\n function collectMissingLabels($this, ri) {\n var tmp0_safe_receiver = ri.components;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.connectors;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.collectMissingLabels.' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.collectMissingLabels..' call\n // Inline function 'kotlin.collections.plus' call\n var tmp1_elvis_lhs = element.offers;\n var tmp_0;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = [];\n } else {\n tmp_0 = tmp1_elvis_lhs;\n }\n var this_0 = tmp_0;\n var tmp0_elvis_lhs = element.demands;\n var tmp_1;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp0_elvis_lhs;\n }\n var elements = tmp_1;\n // Inline function 'kotlin.js.asDynamic' call\n var tags = this_0.concat(elements);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination_0 = ArrayList_init_$Create$_0(tags.length);\n var inductionVariable_0 = 0;\n var last_0 = tags.length;\n while (inductionVariable_0 < last_0) {\n var item = tags[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.collectMissingLabels...' call\n var tmp$ret$8 = Regex_init_$Create$('\\\\{.+?\\\\}').a9(item);\n destination_0.q(tmp$ret$8);\n }\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination_1 = ArrayList_init_$Create$();\n var tmp0_iterator = destination_0.t();\n while (tmp0_iterator.u()) {\n var element_0 = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.collectMissingLabels...' call\n var list = map(element_0, AmendableCatalog$collectMissingLabels$lambda);\n addAll_0(destination_1, list);\n }\n var this_1 = distinct(destination_1);\n var o = copyToArray(this_1);\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_2 = ArrayList_init_$Create$();\n var inductionVariable_1 = 0;\n var last_1 = o.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = o[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.collectMissingLabels...' call\n var tmp0_safe_receiver_0 = ri.parameters;\n var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.labels;\n if ((tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.b3(element_1)) == null) {\n destination_2.q(element_1);\n }\n }\n var list_0 = destination_2;\n addAll(destination, list_0);\n }\n tmp = destination;\n }\n var tmp2_elvis_lhs = tmp;\n var tmp_2;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.collections.listOf' call\n tmp_2 = emptyList();\n } else {\n tmp_2 = tmp2_elvis_lhs;\n }\n return tmp_2;\n }\n function Companion() {\n Companion_instance_0 = this;\n var tmp = this;\n tmp.q4b_1 = Json(VOID, AmendableCatalog$Companion$jsonParser$lambda);\n }\n var Companion_instance_0;\n function Companion_getInstance_4() {\n if (Companion_instance_0 == null)\n new Companion();\n return Companion_instance_0;\n }\n function AmendableCatalog$collectMissingLabels$lambda(it) {\n return replace(replace(it.u2(), '{', ''), '}', '');\n }\n function AmendableCatalog(modelRootURL) {\n Companion_getInstance_4();\n modelRootURL = modelRootURL === VOID ? null : modelRootURL;\n IPEXRangeFormatCatalog.call(this, modelRootURL);\n this.j4b_1 = new ItemRepository();\n }\n protoOf(AmendableCatalog).addItem = function (itemJson) {\n var rangeItem = this.parser.parseItem(itemJson, this.customComponentsParsers);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [rangeItem];\n return firstOrNull(this.resolveItems(cleanupAndGetItemsAffectedByAmend(this, tmp$ret$2)));\n };\n protoOf(AmendableCatalog).addItems = function (itemsJson) {\n var rangeItems = toMutableList(this.parser.parseItems(itemsJson, this.customComponentsParsers));\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$0 = copyToArray(rangeItems);\n return this.resolveItems(cleanupAndGetItemsAffectedByAmend(this, tmp$ret$0));\n };\n protoOf(AmendableCatalog).addItemsFromArray = function (items) {\n return this.resolveItems(cleanupAndGetItemsAffectedByAmend(this, items));\n };\n protoOf(AmendableCatalog).getResolvedItem = function (id) {\n var tmp0_safe_receiver = this.itemRepository.findItemDTO(id);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.getResolvedItem.' call\n tmp = Companion_getInstance_4().q4b_1.i15(Companion_getInstance_10().l17(), tmp0_safe_receiver);\n }\n return tmp;\n };\n protoOf(AmendableCatalog).getUnresolvedItem = function (id) {\n var tmp0_safe_receiver = this.j4b_1.findItemDTO(id);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.getUnresolvedItem.' call\n tmp = Companion_getInstance_4().q4b_1.i15(Companion_getInstance_10().l17(), tmp0_safe_receiver);\n }\n return tmp;\n };\n protoOf(AmendableCatalog).validateProductItem = function (id) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var errors = ArrayList_init_$Create$();\n var tmp0_safe_receiver = this.itemRepository.findItemDTO(id);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_safe_receiver_0 = tmp0_safe_receiver.components;\n var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.product;\n if (tmp1_safe_receiver == null)\n null;\n else {\n $l$block: {\n // Inline function 'com.ikea.core.utils.orElse' call\n if (tmp1_safe_receiver == null) {\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.validateProductItem..' call\n errors.q('ITEM_IS_NOT_A_PRODUCT:' + id);\n break $l$block;\n }\n }\n }\n var tmp2_safe_receiver = tmp0_safe_receiver.components;\n if ((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.product) == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.validateProductItem..' call\n var tmp0_safe_receiver_1 = tmp0_safe_receiver.parameters;\n var tmp1_safe_receiver_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.size;\n if (tmp1_safe_receiver_0 == null)\n null;\n else {\n $l$block_0: {\n // Inline function 'com.ikea.core.utils.orElse' call\n if (tmp1_safe_receiver_0 == null) {\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.validateProductItem...' call\n errors.q('ITEM_HAS_NO_SIZE:' + id);\n break $l$block_0;\n }\n }\n }\n var tmp2_safe_receiver_0 = tmp0_safe_receiver.components.modelURI;\n var tmp_0;\n if (tmp2_safe_receiver_0 == null) {\n tmp_0 = null;\n } else {\n var tmp$ret$6;\n $l$block_1: {\n // Inline function 'com.ikea.core.utils.orElse' call\n if (tmp2_safe_receiver_0 == null) {\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.validateProductItem...' call\n tmp$ret$6 = errors.q('ITEM_HAS_NO_MODEL:' + id);\n break $l$block_1;\n }\n tmp$ret$6 = tmp2_safe_receiver_0;\n }\n tmp_0 = tmp$ret$6;\n }\n }\n var tmp0_iterator = collectMissingLabels(this, tmp0_safe_receiver).t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.validateProductItem..' call\n errors.q('MAGIC_LABEL_MISSING_IN_PARAMETERS:' + id + ':' + element);\n }\n tmp = Unit_instance;\n }\n var tmp2_elvis_lhs = tmp;\n var tmp_1;\n if (tmp2_elvis_lhs == null) {\n var tmp1_safe_receiver_1 = this.j4b_1.findItemDTO(id);\n var tmp_2;\n if (tmp1_safe_receiver_1 == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_iterator_0 = collectMissingAncestors(this, tmp1_safe_receiver_1).t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.AmendableCatalog.validateProductItem..' call\n errors.q('PARENT_ITEM_MISSING:' + id + ':' + element_0);\n }\n tmp_2 = Unit_instance;\n }\n tmp_1 = tmp_2;\n } else {\n tmp_1 = tmp2_elvis_lhs;\n }\n if (tmp_1 == null)\n errors.q('MISSING_ITEM:' + id);\n var tmp_3;\n if (errors.n() > 0) {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_3 = copyToArray(errors);\n } else {\n tmp_3 = null;\n }\n return tmp_3;\n };\n protoOf(AmendableCatalog).clearItems = function (itemIds) {\n protoOf(IPEXRangeFormatCatalog).clearItems.call(this, itemIds);\n this.j4b_1.clear(itemIds);\n };\n function resolveInheritanceAndAdd($this, untouchedItem) {\n try {\n var withInheritance = $this.o4b_1.itemWithResolvedInheritance(untouchedItem);\n $this.itemRepository.set(untouchedItem.id, withInheritance);\n return withInheritance;\n } catch ($p) {\n if ($p instanceof Error_0) {\n var e = $p;\n var tmp = Companion_getInstance_5().w4b_1;\n tmp.warn(IPEXRangeFormatCatalog$resolveInheritanceAndAdd$lambda(e));\n } else {\n throw $p;\n }\n }\n return null;\n }\n function Companion_0() {\n Companion_instance_1 = this;\n this.w4b_1 = LoggerState_getInstance().m1m('IPEXRangeFormatCatalog');\n }\n var Companion_instance_1;\n function Companion_getInstance_5() {\n if (Companion_instance_1 == null)\n new Companion_0();\n return Companion_instance_1;\n }\n function IPEXRangeFormatCatalog$productSpecification$lambda($e) {\n return function () {\n return $e.message;\n };\n }\n function IPEXRangeFormatCatalog$resolveItems$lambda(this$0) {\n return function (it) {\n return !(this$0.itemRepository.findItemDTO(it.id) == null);\n };\n }\n function IPEXRangeFormatCatalog$resolveItems$lambda$lambda($e) {\n return function () {\n return 'Failed to resolve item. ' + $e.message;\n };\n }\n function IPEXRangeFormatCatalog$resolveItems$lambda_0($items, this$0, $resolvedItems) {\n return function (item) {\n var tmp;\n try {\n $items.r(item);\n var tmp0_safe_receiver = resolveInheritanceAndAdd(this$0, item);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.catalog.IPEXRangeFormatCatalog.resolveItems..' call\n $resolvedItems.q(tmp0_safe_receiver);\n }\n tmp = Unit_instance;\n } catch ($p) {\n var tmp_0;\n if ($p instanceof Error_0) {\n var e = $p;\n var tmp_1 = Companion_getInstance_5().w4b_1;\n tmp_1.warn(IPEXRangeFormatCatalog$resolveItems$lambda$lambda(e));\n tmp_0 = Unit_instance;\n } else {\n throw $p;\n }\n tmp = tmp_0;\n }\n return Unit_instance;\n };\n }\n function IPEXRangeFormatCatalog$resolveItems$lambda$lambda_0(it) {\n return it.id;\n }\n function IPEXRangeFormatCatalog$resolveItems$lambda_1($items) {\n return function () {\n return 'Inheritance could not be resolved for ' + joinToString($items, VOID, VOID, VOID, VOID, VOID, IPEXRangeFormatCatalog$resolveItems$lambda$lambda_0);\n };\n }\n function IPEXRangeFormatCatalog$resolveInheritanceAndAdd$lambda($e) {\n return function () {\n return toString_1($e.message);\n };\n }\n function ItemRepository$getAllItemDTOs$ref($boundThis) {\n var l = function () {\n return $boundThis.getAllItemDTOs();\n };\n l.callableName = 'getAllItemDTOs';\n return l;\n }\n function IPEXRangeFormatCatalog(modelRootURL) {\n Companion_getInstance_5();\n modelRootURL = modelRootURL === VOID ? null : modelRootURL;\n this.modelRootURL = modelRootURL;\n this.k4b_1 = true;\n this.l4b_1 = 'ipex-range';\n this.m4b_1 = '0';\n this.itemRepository = new ItemRepository();\n this.parser = new ItemParser();\n this.n4b_1 = new ProductSpecificationBuilder(this.itemRepository, this.modelRootURL);\n this.o4b_1 = new InheritanceResolver(this.itemRepository);\n var tmp = this;\n // Inline function 'kotlin.collections.mutableSetOf' call\n tmp.p4b_1 = LinkedHashSet_init_$Create$();\n var tmp_0 = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp_0.customComponentsParsers = ArrayList_init_$Create$();\n var tmp_1 = this;\n tmp_1.getAllItemDTOs = ItemRepository$getAllItemDTOs$ref(this.itemRepository);\n }\n protoOf(IPEXRangeFormatCatalog).f48 = function () {\n return this.modelRootURL;\n };\n protoOf(IPEXRangeFormatCatalog).a1m = function () {\n return this.k4b_1;\n };\n protoOf(IPEXRangeFormatCatalog).rangeId = function () {\n return this.l4b_1;\n };\n protoOf(IPEXRangeFormatCatalog).rangeVersion = function () {\n return this.m4b_1;\n };\n protoOf(IPEXRangeFormatCatalog).s4b = function () {\n return this.itemRepository;\n };\n protoOf(IPEXRangeFormatCatalog).t4b = function () {\n return this.parser;\n };\n protoOf(IPEXRangeFormatCatalog).u4b = function () {\n return this.customComponentsParsers;\n };\n protoOf(IPEXRangeFormatCatalog).addInterceptor = function (interceptor) {\n this.p4b_1.q(interceptor);\n };\n protoOf(IPEXRangeFormatCatalog).removeInterceptor = function (interceptor) {\n this.p4b_1.r(interceptor);\n };\n protoOf(IPEXRangeFormatCatalog).beforeDeserialize = function (json, catalogVersion) {\n var res = json;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.p4b_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.IPEXRangeFormatCatalog.beforeDeserialize.' call\n res = element.beforeDeserialize(res, catalogVersion);\n }\n return res;\n };\n protoOf(IPEXRangeFormatCatalog).beforeBuildingEntities = function (serializableTree, catalogVersion) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.p4b_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.IPEXRangeFormatCatalog.beforeBuildingEntities.' call\n element.beforeBuildingEntities(serializableTree, catalogVersion);\n }\n };\n protoOf(IPEXRangeFormatCatalog).beforeParsingComponents = function (serializableTree, catalogVersion) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.p4b_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.IPEXRangeFormatCatalog.beforeParsingComponents.' call\n element.beforeParsingComponents(serializableTree, catalogVersion);\n }\n };\n protoOf(IPEXRangeFormatCatalog).afterDeserializeComplete = function (root, catalogVersion) {\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = this.p4b_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.IPEXRangeFormatCatalog.afterDeserializeComplete.' call\n element.afterDeserializeComplete(root, catalogVersion);\n }\n };\n protoOf(IPEXRangeFormatCatalog).addCustomComponentParser = function (parser) {\n this.customComponentsParsers.q(parser);\n };\n protoOf(IPEXRangeFormatCatalog).removeCustomComponentParser = function (parser) {\n this.customComponentsParsers.r(parser);\n };\n protoOf(IPEXRangeFormatCatalog).productSpecification = function (productRef) {\n var tmp0_elvis_lhs = this.itemRepository.findItemDTO(productRef);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var item = tmp;\n try {\n return this.n4b_1.buildProductSpecification(item);\n } catch ($p) {\n if ($p instanceof Error_0) {\n var e = $p;\n var tmp_0 = Companion_getInstance_5().w4b_1;\n tmp_0.warn(IPEXRangeFormatCatalog$productSpecification$lambda(e));\n } else {\n throw $p;\n }\n }\n return null;\n };\n protoOf(IPEXRangeFormatCatalog).allProductRefs = function () {\n return this.itemRepository.getAllProductNames();\n };\n protoOf(IPEXRangeFormatCatalog).allRefs = function () {\n return this.itemRepository.getAllNames();\n };\n protoOf(IPEXRangeFormatCatalog).toString = function () {\n return 'IPEX Range Format Catalog';\n };\n protoOf(IPEXRangeFormatCatalog).addItem = function (itemJson) {\n var rangeItem = this.parser.parseItem(itemJson, this.customComponentsParsers);\n return firstOrNull(this.resolveItems(mutableListOf([rangeItem])));\n };\n protoOf(IPEXRangeFormatCatalog).addItems = function (itemsJson) {\n var rangeItems = toMutableList(this.parser.parseItems(itemsJson, this.customComponentsParsers));\n return this.resolveItems(rangeItems);\n };\n protoOf(IPEXRangeFormatCatalog).addItemsFromArray = function (items) {\n return this.resolveItems(toMutableList(items));\n };\n protoOf(IPEXRangeFormatCatalog).resolveItems = function (items) {\n // Inline function 'kotlin.collections.mutableListOf' call\n var resolvedItems = ArrayList_init_$Create$();\n removeAll(items, IPEXRangeFormatCatalog$resolveItems$lambda(this));\n var resolveAndRemoveItem = IPEXRangeFormatCatalog$resolveItems$lambda_0(items, this, resolvedItems);\n $l$loop: while (items.n() > 0) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = items.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.IPEXRangeFormatCatalog.resolveItems.' call\n if (this.o4b_1.inheritanceIsResolvable(element)) {\n destination.q(element);\n }\n }\n var resolvable = destination;\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = resolvable.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.IPEXRangeFormatCatalog.resolveItems.' call\n resolveAndRemoveItem(element_0);\n }\n if (resolvable.b1()) {\n break $l$loop;\n }\n }\n if (items.n() > 0) {\n var tmp = Companion_getInstance_5().w4b_1;\n tmp.warn(IPEXRangeFormatCatalog$resolveItems$lambda_1(items));\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(resolvedItems);\n };\n protoOf(IPEXRangeFormatCatalog).clearItems = function (itemIds) {\n this.itemRepository.clear(itemIds);\n };\n protoOf(IPEXRangeFormatCatalog).v4b = function () {\n return this.getAllItemDTOs;\n };\n function resolve($this, itemDTO) {\n var tmp;\n if (itemDTO.inherits == null) {\n tmp = itemDTO;\n } else {\n var resultingItem = itemDTO;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = reversedArray(itemDTO.inherits);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.catalog.InheritanceResolver.resolve.' call\n var tmp0_elvis_lhs = $this.x4b_1.findItemDTO(element);\n var tmp_0;\n if (tmp0_elvis_lhs == null) {\n throw Exception_init_$Create$(\"Item '\" + itemDTO.id + \"' extends '\" + element + \"' that cannot be found\");\n } else {\n tmp_0 = tmp0_elvis_lhs;\n }\n var parentItem = tmp_0;\n resultingItem = resultingItem.inherit(parentItem);\n }\n tmp = resultingItem;\n }\n return tmp;\n }\n function InheritanceResolver(itemRepository) {\n this.x4b_1 = itemRepository;\n }\n protoOf(InheritanceResolver).itemWithResolvedInheritance = function (itemDTO) {\n return resolve(this, itemDTO);\n };\n protoOf(InheritanceResolver).inheritanceIsResolvable = function (itemDTO) {\n var tmp0_safe_receiver = itemDTO.inherits;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.all' call\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.catalog.InheritanceResolver.inheritanceIsResolvable.' call\n var item = this.x4b_1.findItemDTO(element);\n if (!(!(item == null) ? this.inheritanceIsResolvable(item) : false)) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n tmp = tmp$ret$1;\n }\n var tmp1_elvis_lhs = tmp;\n return tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;\n };\n function ItemRepository() {\n var tmp = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp.y4b_1 = LinkedHashMap_init_$Create$();\n }\n protoOf(ItemRepository).findItemDTO = function (name) {\n return this.y4b_1.b3(name);\n };\n protoOf(ItemRepository).getAllItemDTOs = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.y4b_1.p2();\n return copyToArray(this_0);\n };\n protoOf(ItemRepository).getAllNames = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.y4b_1.o2();\n return copyToArray(this_0);\n };\n protoOf(ItemRepository).getAllProductNames = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.y4b_1;\n var destination = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this_0.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.catalog.ItemRepository.getAllProductNames.' call\n // Inline function 'com.ikea.core.utils.isNotNull' call\n var tmp0_safe_receiver = element.u2().components;\n if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.product) == null)) {\n destination.r2(element.t2(), element.u2());\n }\n }\n var this_1 = destination.o2();\n return copyToArray(this_1);\n };\n protoOf(ItemRepository).z4b = function (itemNames) {\n if (!(itemNames == null)) {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = itemNames.length;\n while (inductionVariable < last) {\n var element = itemNames[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.catalog.ItemRepository.clear.' call\n this.y4b_1.v2(element);\n }\n } else {\n this.y4b_1.z();\n }\n };\n protoOf(ItemRepository).clear = function (itemNames, $super) {\n itemNames = itemNames === VOID ? null : itemNames;\n return this.z4b(itemNames);\n };\n protoOf(ItemRepository).set = function (name, item) {\n // Inline function 'kotlin.collections.set' call\n this.y4b_1.r2(name, item);\n };\n function ReadOnlyItemRepository() {\n }\n function Companion_1() {\n Companion_instance_2 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.a4c_1 = [null, null, null, null, new ReferenceArraySerializer(PrimitiveClasses_getInstance().s7(), DoubleSerializer_getInstance()), null, null];\n }\n protoOf(Companion_1).l17 = function () {\n return $serializer_getInstance_5();\n };\n var Companion_instance_2;\n function Companion_getInstance_6() {\n if (Companion_instance_2 == null)\n new Companion_1();\n return Companion_instance_2;\n }\n function $serializer() {\n $serializer_instance = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.ipex.range.dto.component.AssemblyChildDTO', this, 7);\n tmp0_serialDesc.cv('partKey', false);\n tmp0_serialDesc.cv('connector', true);\n tmp0_serialDesc.cv('connectorOnHost', true);\n tmp0_serialDesc.cv('position', true);\n tmp0_serialDesc.cv('transform', true);\n tmp0_serialDesc.cv('children', true);\n tmp0_serialDesc.cv('locked', true);\n this.b4c_1 = tmp0_serialDesc;\n }\n protoOf($serializer).ok = function () {\n return this.b4c_1;\n };\n protoOf($serializer).rv = function () {\n var tmp0_cached = Companion_getInstance_6().a4c_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(PositionTemplateSerializer_getInstance()), get_nullable(tmp0_cached[4]), get_nullable(new ReferenceArraySerializer(getKClass(AssemblyChildDTO), $serializer_getInstance_5())), get_nullable(BooleanSerializer_getInstance())];\n };\n protoOf($serializer).qk = function (decoder) {\n var tmp0_desc = this.b4c_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_local5 = null;\n var tmp10_local6 = null;\n var tmp11_input = decoder.nn(tmp0_desc);\n var tmp12_cached = Companion_getInstance_6().a4c_1;\n if (tmp11_input.do()) {\n tmp4_local0 = tmp11_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp11_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp11_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp11_input.bo(tmp0_desc, 3, PositionTemplateSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp11_input.bo(tmp0_desc, 4, tmp12_cached[4], tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n tmp9_local5 = tmp11_input.bo(tmp0_desc, 5, new ReferenceArraySerializer(getKClass(AssemblyChildDTO), $serializer_getInstance_5()), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n tmp10_local6 = tmp11_input.bo(tmp0_desc, 6, BooleanSerializer_getInstance(), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp11_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp11_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp11_input.bo(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp11_input.bo(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp11_input.bo(tmp0_desc, 3, PositionTemplateSerializer_getInstance(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp11_input.bo(tmp0_desc, 4, tmp12_cached[4], tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n case 5:\n tmp9_local5 = tmp11_input.bo(tmp0_desc, 5, new ReferenceArraySerializer(getKClass(AssemblyChildDTO), $serializer_getInstance_5()), tmp9_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n break;\n case 6:\n tmp10_local6 = tmp11_input.bo(tmp0_desc, 6, BooleanSerializer_getInstance(), tmp10_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp11_input.on(tmp0_desc);\n return AssemblyChildDTO_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, null);\n };\n protoOf($serializer).c4c = function (encoder, value) {\n var tmp0_desc = this.b4c_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_6().a4c_1;\n tmp1_output.cp(tmp0_desc, 0, value.partKey);\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.connector == null)) {\n tmp1_output.gp(tmp0_desc, 1, StringSerializer_getInstance(), value.connector);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.connectorOnHost == null)) {\n tmp1_output.gp(tmp0_desc, 2, StringSerializer_getInstance(), value.connectorOnHost);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.position == null)) {\n tmp1_output.gp(tmp0_desc, 3, PositionTemplateSerializer_getInstance(), value.position);\n }\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.transform == null)) {\n tmp1_output.gp(tmp0_desc, 4, tmp2_cached[4], value.transform);\n }\n if (tmp1_output.kp(tmp0_desc, 5) ? true : !(value.children == null)) {\n tmp1_output.gp(tmp0_desc, 5, new ReferenceArraySerializer(getKClass(AssemblyChildDTO), $serializer_getInstance_5()), value.children);\n }\n if (tmp1_output.kp(tmp0_desc, 6) ? true : !(value.locked === true)) {\n tmp1_output.gp(tmp0_desc, 6, BooleanSerializer_getInstance(), value.locked);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer).pk = function (encoder, value) {\n return this.c4c(encoder, value instanceof AssemblyChildDTO ? value : THROW_CCE());\n };\n var $serializer_instance;\n function $serializer_getInstance_5() {\n if ($serializer_instance == null)\n new $serializer();\n return $serializer_instance;\n }\n function AssemblyChildDTO_init_$Init$(seen1, partKey, connector, connectorOnHost, position, transform, children, locked, serializationConstructorMarker, $this) {\n if (!(1 === (1 & seen1))) {\n throwMissingFieldException(seen1, 1, $serializer_getInstance_5().b4c_1);\n }\n $this.partKey = partKey;\n if (0 === (seen1 & 2))\n $this.connector = null;\n else\n $this.connector = connector;\n if (0 === (seen1 & 4))\n $this.connectorOnHost = null;\n else\n $this.connectorOnHost = connectorOnHost;\n if (0 === (seen1 & 8))\n $this.position = null;\n else\n $this.position = position;\n if (0 === (seen1 & 16))\n $this.transform = null;\n else\n $this.transform = transform;\n if (0 === (seen1 & 32))\n $this.children = null;\n else\n $this.children = children;\n if (0 === (seen1 & 64))\n $this.locked = true;\n else\n $this.locked = locked;\n return $this;\n }\n function AssemblyChildDTO_init_$Create$(seen1, partKey, connector, connectorOnHost, position, transform, children, locked, serializationConstructorMarker) {\n return AssemblyChildDTO_init_$Init$(seen1, partKey, connector, connectorOnHost, position, transform, children, locked, serializationConstructorMarker, objectCreate(protoOf(AssemblyChildDTO)));\n }\n function AssemblyChildDTO(partKey, connector, connectorOnHost, position, transform, children, locked) {\n Companion_getInstance_6();\n connector = connector === VOID ? null : connector;\n connectorOnHost = connectorOnHost === VOID ? null : connectorOnHost;\n position = position === VOID ? null : position;\n transform = transform === VOID ? null : transform;\n children = children === VOID ? null : children;\n locked = locked === VOID ? true : locked;\n this.partKey = partKey;\n this.connector = connector;\n this.connectorOnHost = connectorOnHost;\n this.position = position;\n this.transform = transform;\n this.children = children;\n this.locked = locked;\n }\n protoOf(AssemblyChildDTO).z1j = function () {\n return this.partKey;\n };\n protoOf(AssemblyChildDTO).n1k = function () {\n return this.connector;\n };\n protoOf(AssemblyChildDTO).m1k = function () {\n return this.connectorOnHost;\n };\n protoOf(AssemblyChildDTO).ct = function () {\n return this.position;\n };\n protoOf(AssemblyChildDTO).d1x = function () {\n return this.transform;\n };\n protoOf(AssemblyChildDTO).c1k = function () {\n return this.children;\n };\n protoOf(AssemblyChildDTO).d1k = function () {\n return this.locked;\n };\n function Companion_2() {\n }\n protoOf(Companion_2).l17 = function () {\n return $serializer_getInstance_6();\n };\n var Companion_instance_3;\n function Companion_getInstance_7() {\n return Companion_instance_3;\n }\n function $serializer_0() {\n $serializer_instance_0 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.ipex.range.dto.component.ColliderDTO', this, 4);\n tmp0_serialDesc.cv('dimension', true);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('layer', true);\n tmp0_serialDesc.cv('sourceTemplateId', true);\n this.d4c_1 = tmp0_serialDesc;\n }\n protoOf($serializer_0).ok = function () {\n return this.d4c_1;\n };\n protoOf($serializer_0).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [get_nullable(Companion_getInstance_2()), StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance()];\n };\n protoOf($serializer_0).qk = function (decoder) {\n var tmp0_desc = this.d4c_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_input = decoder.nn(tmp0_desc);\n if (tmp8_input.do()) {\n tmp4_local0 = tmp8_input.bo(tmp0_desc, 0, Companion_getInstance_2(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp8_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp8_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp8_input.xn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp8_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp8_input.bo(tmp0_desc, 0, Companion_getInstance_2(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp8_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp8_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp8_input.xn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp8_input.on(tmp0_desc);\n return ColliderDTO_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);\n };\n protoOf($serializer_0).e4c = function (encoder, value) {\n var tmp0_desc = this.d4c_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !(value.dimension == null)) {\n tmp1_output.gp(tmp0_desc, 0, Companion_getInstance_2(), value.dimension);\n }\n tmp1_output.cp(tmp0_desc, 1, value.id);\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.layer === 'collision')) {\n tmp1_output.cp(tmp0_desc, 2, value.layer);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.sourceTemplateId === '')) {\n tmp1_output.cp(tmp0_desc, 3, value.sourceTemplateId);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_0).pk = function (encoder, value) {\n return this.e4c(encoder, value instanceof ColliderDTO ? value : THROW_CCE());\n };\n var $serializer_instance_0;\n function $serializer_getInstance_6() {\n if ($serializer_instance_0 == null)\n new $serializer_0();\n return $serializer_instance_0;\n }\n function ColliderDTO_init_$Init$(seen1, dimension, id, layer, sourceTemplateId, serializationConstructorMarker, $this) {\n if (!(2 === (2 & seen1))) {\n throwMissingFieldException(seen1, 2, $serializer_getInstance_6().d4c_1);\n }\n if (0 === (seen1 & 1))\n $this.dimension = null;\n else\n $this.dimension = dimension;\n $this.id = id;\n if (0 === (seen1 & 4))\n $this.layer = 'collision';\n else\n $this.layer = layer;\n if (0 === (seen1 & 8))\n $this.sourceTemplateId = '';\n else\n $this.sourceTemplateId = sourceTemplateId;\n return $this;\n }\n function ColliderDTO_init_$Create$(seen1, dimension, id, layer, sourceTemplateId, serializationConstructorMarker) {\n return ColliderDTO_init_$Init$(seen1, dimension, id, layer, sourceTemplateId, serializationConstructorMarker, objectCreate(protoOf(ColliderDTO)));\n }\n function ColliderDTO(dimension, id, layer, sourceTemplateId) {\n dimension = dimension === VOID ? null : dimension;\n layer = layer === VOID ? 'collision' : layer;\n sourceTemplateId = sourceTemplateId === VOID ? '' : sourceTemplateId;\n this.dimension = dimension;\n this.id = id;\n this.layer = layer;\n this.sourceTemplateId = sourceTemplateId;\n }\n protoOf(ColliderDTO).q43 = function () {\n return this.dimension;\n };\n protoOf(ColliderDTO).s1k = function () {\n return this.id;\n };\n protoOf(ColliderDTO).j3a = function () {\n return this.layer;\n };\n protoOf(ColliderDTO).t43 = function (_set____db54di) {\n this.sourceTemplateId = _set____db54di;\n };\n protoOf(ColliderDTO).u43 = function () {\n return this.sourceTemplateId;\n };\n function CustomSerializer() {\n CustomSerializer_instance = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.ipex.range.dto.component.ProductDTO', null, 3);\n tmp0_serialDesc.cv('dexfItemId', false);\n tmp0_serialDesc.cv('type', true);\n tmp0_serialDesc.cv('partsInPackage', true);\n this.f4c_1 = tmp0_serialDesc;\n }\n protoOf(CustomSerializer).qk = function (decoder) {\n var element = decoder.mn(Companion_instance.l17());\n var tmp;\n if (element instanceof JsonObject) {\n var tmp_0;\n try {\n var tmp_1 = element.o17('dexfItemId');\n var tmp_2 = (tmp_1 instanceof JsonPrimitive ? tmp_1 : THROW_CCE()).p17();\n var tmp_3 = element.o17('type');\n var tmp0_safe_receiver = (tmp_3 == null ? true : tmp_3 instanceof JsonPrimitive) ? tmp_3 : THROW_CCE();\n var tmp_4 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p17();\n var tmp_5 = element.o17('partsInPackage');\n var tmp1_safe_receiver = (tmp_5 == null ? true : tmp_5 instanceof JsonPrimitive) ? tmp_5 : THROW_CCE();\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : get_contentOrNull(tmp1_safe_receiver);\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toIntOrNull(tmp2_safe_receiver);\n tmp_0 = new ProductDTO(tmp_2, tmp_4, tmp3_elvis_lhs == null ? 1 : tmp3_elvis_lhs);\n } catch ($p) {\n var tmp_6;\n if ($p instanceof Exception) {\n var e = $p;\n var message = 'Product component malformed in JSON: ' + element + '. ' + e.message;\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n throw $p;\n }\n }\n tmp = tmp_0;\n } else {\n if (element instanceof JsonPrimitive) {\n tmp = new ProductDTO(element.p17());\n } else {\n var message_0 = 'Product component malformed in JSON: ' + element;\n throw IllegalStateException_init_$Create$(toString(message_0));\n }\n }\n return tmp;\n };\n protoOf(CustomSerializer).ok = function () {\n return this.f4c_1;\n };\n protoOf(CustomSerializer).g4c = function (encoder, value) {\n var tmp0_desc = this.f4c_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.dexfItemId);\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.type == null)) {\n tmp1_output.gp(tmp0_desc, 1, StringSerializer_getInstance(), value.type);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.partsInPackage === 1)) {\n tmp1_output.xo(tmp0_desc, 2, value.partsInPackage);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf(CustomSerializer).pk = function (encoder, value) {\n return this.g4c(encoder, value instanceof ProductDTO ? value : THROW_CCE());\n };\n protoOf(CustomSerializer).l17 = function () {\n return CustomSerializer_getInstance_2();\n };\n var CustomSerializer_instance;\n function CustomSerializer_getInstance_2() {\n if (CustomSerializer_instance == null)\n new CustomSerializer();\n return CustomSerializer_instance;\n }\n function ProductDTO(dexfItemId, type, partsInPackage) {\n CustomSerializer_getInstance_2();\n type = type === VOID ? null : type;\n partsInPackage = partsInPackage === VOID ? 1 : partsInPackage;\n this.dexfItemId = dexfItemId;\n this.type = type;\n this.partsInPackage = partsInPackage;\n }\n protoOf(ProductDTO).h4c = function () {\n return this.dexfItemId;\n };\n protoOf(ProductDTO).a1x = function () {\n return this.type;\n };\n protoOf(ProductDTO).x3x = function () {\n return this.partsInPackage;\n };\n function inheritCustomComponents($this, parentCCBs) {\n var result = toMutableMap($this.customComponents);\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = parentCCBs.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritCustomComponents.' call\n // Inline function 'kotlin.collections.component1' call\n var key = element.t2();\n // Inline function 'kotlin.collections.component2' call\n var parentCCB = element.u2();\n var childCCB = result.b3(key);\n if (!(childCCB == null)) {\n // Inline function 'kotlin.collections.set' call\n var value = childCCB.inherit(parentCCB);\n result.r2(key, value);\n } else {\n // Inline function 'kotlin.collections.set' call\n result.r2(key, parentCCB);\n }\n }\n return result;\n }\n function inheritAssembly($this, assemblyDTO, otherAssemblyDTO) {\n var tmp;\n if (otherAssemblyDTO == null) {\n tmp = assemblyDTO;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = otherAssemblyDTO.length;\n while (inductionVariable < last) {\n var element = otherAssemblyDTO[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritAssembly.' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var inductionVariable_0 = 0;\n var last_0 = assemblyDTO.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = assemblyDTO[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritAssembly..' call\n if (element_0.partKey === element.partKey) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n if (tmp$ret$1) {\n destination.q(element);\n }\n }\n tmp = plus_0(assemblyDTO, destination);\n }\n return tmp;\n }\n function inheritColliders($this, colliderDTO, otherColliderDTO) {\n var tmp;\n if (otherColliderDTO == null) {\n tmp = colliderDTO;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = otherColliderDTO.length;\n while (inductionVariable < last) {\n var element = otherColliderDTO[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritColliders.' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var inductionVariable_0 = 0;\n var last_0 = colliderDTO.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = colliderDTO[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritColliders..' call\n if (element_0.id === element.id) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n if (tmp$ret$1) {\n destination.q(element);\n }\n }\n tmp = plus_0(colliderDTO, destination);\n }\n return tmp;\n }\n function inheritFunctionalZones($this, functionalZones, otherFunctionalZones) {\n var tmp;\n if (otherFunctionalZones == null) {\n tmp = functionalZones;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = otherFunctionalZones.length;\n while (inductionVariable < last) {\n var element = otherFunctionalZones[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritFunctionalZones.' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var inductionVariable_0 = 0;\n var last_0 = functionalZones.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = functionalZones[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritFunctionalZones..' call\n if (element_0.id === element.id) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n if (tmp$ret$1) {\n destination.q(element);\n }\n }\n tmp = plus_0(functionalZones, destination);\n }\n return tmp;\n }\n function inheritConnectors($this, connectorDTO, otherConnectorDTO) {\n var tmp;\n if (otherConnectorDTO == null) {\n tmp = connectorDTO;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = otherConnectorDTO.length;\n while (inductionVariable < last) {\n var element = otherConnectorDTO[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritConnectors.' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var inductionVariable_0 = 0;\n var last_0 = connectorDTO.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = connectorDTO[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritConnectors..' call\n if (element_0.name === element.name) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n if (tmp$ret$1) {\n destination.q(element);\n }\n }\n tmp = plus_0(connectorDTO, destination);\n }\n return tmp;\n }\n function inheritProductStructure($this, productStructureDTO, otherProductStructureDTO) {\n var tmp;\n if (otherProductStructureDTO == null) {\n tmp = productStructureDTO;\n } else {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = otherProductStructureDTO.length;\n while (inductionVariable < last) {\n var element = otherProductStructureDTO[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritProductStructure.' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.none' call\n var inductionVariable_0 = 0;\n var last_0 = productStructureDTO.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = productStructureDTO[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritProductStructure..' call\n if (element_0.partKey === element.partKey) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n if (tmp$ret$1) {\n destination.q(element);\n }\n }\n tmp = plus_0(productStructureDTO, destination);\n }\n return tmp;\n }\n function inheritMeta($this, meta, otherMeta) {\n var tmp;\n if (otherMeta == null) {\n tmp = meta;\n } else {\n return plus_1(otherMeta, meta);\n }\n return tmp;\n }\n function inheritAllowedDoorPairs($this, allowedDoorPairs, otherAllowedDoorPairs) {\n var tmp;\n if (otherAllowedDoorPairs == null) {\n tmp = allowedDoorPairs;\n } else {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var pairs = otherAllowedDoorPairs.concat(allowedDoorPairs);\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = pairs.length;\n while (inductionVariable < last) {\n var element = pairs[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritAllowedDoorPairs.' call\n sort(element);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.distinctBy' call\n var set = HashSet_init_$Create$();\n var list = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = pairs.length;\n while (inductionVariable_0 < last_0) {\n var e = pairs[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inheritAllowedDoorPairs.' call\n var key = joinToString_0(e, '-');\n if (set.q(key)) {\n list.q(e);\n }\n }\n tmp = copyToArray(list);\n }\n return tmp;\n }\n function Companion_3() {\n Companion_instance_4 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n var tmp_0 = new ReferenceArraySerializer(getKClass(AssemblyChildDTO), $serializer_getInstance_5());\n var tmp_1 = new ReferenceArraySerializer(getKClass(ColliderDTO), $serializer_getInstance_6());\n var tmp_2 = new ReferenceArraySerializer(getKClass(ConnectorItemTemplate), Companion_getInstance_3());\n var tmp_3 = new ReferenceArraySerializer(getKClass(ProductStructureItemTemplate), $serializer_getInstance());\n var tmp_4 = new ReferenceArraySerializer(getKClass(ColliderDTO), $serializer_getInstance_6());\n var tmp_5 = new ReferenceArraySerializer(PrimitiveClasses_getInstance().t7(), new ReferenceArraySerializer(PrimitiveClasses_getInstance().q7(), IntSerializer_getInstance()));\n var tmp_6 = new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance());\n var tmp_7 = StringSerializer_getInstance();\n var tmp_8 = getKClass(CustomComponentBuilder);\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [];\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.i4c_1 = [tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, null, null, null, null, null, null, null, tmp_5, null, null, null, null, null, null, null, null, null, null, tmp_6, null, null, null, null, null, null, null, null, null, new LinkedHashMapSerializer(tmp_7, PolymorphicSerializer_init_$Create$(tmp_8, tmp$ret$2))];\n }\n protoOf(Companion_3).l17 = function () {\n return $serializer_getInstance_7();\n };\n var Companion_instance_4;\n function Companion_getInstance_8() {\n if (Companion_instance_4 == null)\n new Companion_3();\n return Companion_instance_4;\n }\n function $serializer_1() {\n $serializer_instance_1 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.ipex.range.dto.item.ItemComponentsDTO', this, 34);\n tmp0_serialDesc.cv('assembly', true);\n tmp0_serialDesc.cv('colliders', true);\n tmp0_serialDesc.cv('connectors', true);\n tmp0_serialDesc.cv('productStructure', true);\n tmp0_serialDesc.cv('functionalZones', true);\n tmp0_serialDesc.cv('autoAdaptGroup', true);\n tmp0_serialDesc.cv('product', true);\n tmp0_serialDesc.cv('modelURI', true);\n tmp0_serialDesc.cv('modelTransform', true);\n tmp0_serialDesc.cv('selectable', true);\n tmp0_serialDesc.cv('outlineable', true);\n tmp0_serialDesc.cv('draggable', true);\n tmp0_serialDesc.cv('allowedDoorPairs', true);\n tmp0_serialDesc.cv('autoAdaptHost', true);\n tmp0_serialDesc.cv('door', true);\n tmp0_serialDesc.cv('doorFront', true);\n tmp0_serialDesc.cv('handle', true);\n tmp0_serialDesc.cv('drawer', true);\n tmp0_serialDesc.cv('frame', true);\n tmp0_serialDesc.cv('leg', true);\n tmp0_serialDesc.cv('innerLight', true);\n tmp0_serialDesc.cv('outerLight', true);\n tmp0_serialDesc.cv('outlined', true);\n tmp0_serialDesc.cv('meta', true);\n tmp0_serialDesc.cv('propping', true);\n tmp0_serialDesc.cv('alwaysHangDown', true);\n tmp0_serialDesc.cv('serializeEntity', true);\n tmp0_serialDesc.cv('placementZoneByHeight', true);\n tmp0_serialDesc.cv('functionalMargin', true);\n tmp0_serialDesc.cv('recommendedInitialPositionFromFloor', true);\n tmp0_serialDesc.cv('visualLightSource', true);\n tmp0_serialDesc.cv('dragSurfaces', true);\n tmp0_serialDesc.cv('dragProjectionPoint', true);\n tmp0_serialDesc.cv('customComponents', true);\n this.j4c_1 = tmp0_serialDesc;\n }\n protoOf($serializer_1).ok = function () {\n return this.j4c_1;\n };\n protoOf($serializer_1).rv = function () {\n var tmp0_cached = Companion_getInstance_8().i4c_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [get_nullable(tmp0_cached[0]), get_nullable(tmp0_cached[1]), get_nullable(tmp0_cached[2]), get_nullable(tmp0_cached[3]), get_nullable(tmp0_cached[4]), get_nullable(CustomSerializer_getInstance()), get_nullable(CustomSerializer_getInstance_2()), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_0()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(tmp0_cached[12]), get_nullable(CustomSerializer_getInstance_0()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(tmp0_cached[23]), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable($serializer_getInstance_1()), get_nullable(MarginTemplateSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable($serializer_getInstance_2()), get_nullable(CustomSerializer_getInstance_1()), get_nullable(PositionTemplateSerializer_getInstance()), tmp0_cached[33]];\n };\n protoOf($serializer_1).qk = function (decoder) {\n var tmp0_desc = this.j4c_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_bitMask1 = 0;\n var tmp5_local0 = null;\n var tmp6_local1 = null;\n var tmp7_local2 = null;\n var tmp8_local3 = null;\n var tmp9_local4 = null;\n var tmp10_local5 = null;\n var tmp11_local6 = null;\n var tmp12_local7 = null;\n var tmp13_local8 = null;\n var tmp14_local9 = null;\n var tmp15_local10 = null;\n var tmp16_local11 = null;\n var tmp17_local12 = null;\n var tmp18_local13 = null;\n var tmp19_local14 = null;\n var tmp20_local15 = null;\n var tmp21_local16 = null;\n var tmp22_local17 = null;\n var tmp23_local18 = null;\n var tmp24_local19 = null;\n var tmp25_local20 = null;\n var tmp26_local21 = null;\n var tmp27_local22 = null;\n var tmp28_local23 = null;\n var tmp29_local24 = null;\n var tmp30_local25 = null;\n var tmp31_local26 = null;\n var tmp32_local27 = null;\n var tmp33_local28 = null;\n var tmp34_local29 = null;\n var tmp35_local30 = null;\n var tmp36_local31 = null;\n var tmp37_local32 = null;\n var tmp38_local33 = null;\n var tmp39_input = decoder.nn(tmp0_desc);\n var tmp40_cached = Companion_getInstance_8().i4c_1;\n if (tmp39_input.do()) {\n tmp5_local0 = tmp39_input.bo(tmp0_desc, 0, tmp40_cached[0], tmp5_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp6_local1 = tmp39_input.bo(tmp0_desc, 1, tmp40_cached[1], tmp6_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp7_local2 = tmp39_input.bo(tmp0_desc, 2, tmp40_cached[2], tmp7_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp8_local3 = tmp39_input.bo(tmp0_desc, 3, tmp40_cached[3], tmp8_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp9_local4 = tmp39_input.bo(tmp0_desc, 4, tmp40_cached[4], tmp9_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n tmp10_local5 = tmp39_input.bo(tmp0_desc, 5, CustomSerializer_getInstance(), tmp10_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n tmp11_local6 = tmp39_input.bo(tmp0_desc, 6, CustomSerializer_getInstance_2(), tmp11_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n tmp12_local7 = tmp39_input.bo(tmp0_desc, 7, StringSerializer_getInstance(), tmp12_local7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n tmp13_local8 = tmp39_input.bo(tmp0_desc, 8, $serializer_getInstance_0(), tmp13_local8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n tmp14_local9 = tmp39_input.bo(tmp0_desc, 9, BooleanSerializer_getInstance(), tmp14_local9);\n tmp3_bitMask0 = tmp3_bitMask0 | 512;\n tmp15_local10 = tmp39_input.bo(tmp0_desc, 10, BooleanSerializer_getInstance(), tmp15_local10);\n tmp3_bitMask0 = tmp3_bitMask0 | 1024;\n tmp16_local11 = tmp39_input.bo(tmp0_desc, 11, BooleanSerializer_getInstance(), tmp16_local11);\n tmp3_bitMask0 = tmp3_bitMask0 | 2048;\n tmp17_local12 = tmp39_input.bo(tmp0_desc, 12, tmp40_cached[12], tmp17_local12);\n tmp3_bitMask0 = tmp3_bitMask0 | 4096;\n tmp18_local13 = tmp39_input.bo(tmp0_desc, 13, CustomSerializer_getInstance_0(), tmp18_local13);\n tmp3_bitMask0 = tmp3_bitMask0 | 8192;\n tmp19_local14 = tmp39_input.bo(tmp0_desc, 14, BooleanSerializer_getInstance(), tmp19_local14);\n tmp3_bitMask0 = tmp3_bitMask0 | 16384;\n tmp20_local15 = tmp39_input.bo(tmp0_desc, 15, BooleanSerializer_getInstance(), tmp20_local15);\n tmp3_bitMask0 = tmp3_bitMask0 | 32768;\n tmp21_local16 = tmp39_input.bo(tmp0_desc, 16, BooleanSerializer_getInstance(), tmp21_local16);\n tmp3_bitMask0 = tmp3_bitMask0 | 65536;\n tmp22_local17 = tmp39_input.bo(tmp0_desc, 17, BooleanSerializer_getInstance(), tmp22_local17);\n tmp3_bitMask0 = tmp3_bitMask0 | 131072;\n tmp23_local18 = tmp39_input.bo(tmp0_desc, 18, BooleanSerializer_getInstance(), tmp23_local18);\n tmp3_bitMask0 = tmp3_bitMask0 | 262144;\n tmp24_local19 = tmp39_input.bo(tmp0_desc, 19, BooleanSerializer_getInstance(), tmp24_local19);\n tmp3_bitMask0 = tmp3_bitMask0 | 524288;\n tmp25_local20 = tmp39_input.bo(tmp0_desc, 20, BooleanSerializer_getInstance(), tmp25_local20);\n tmp3_bitMask0 = tmp3_bitMask0 | 1048576;\n tmp26_local21 = tmp39_input.bo(tmp0_desc, 21, BooleanSerializer_getInstance(), tmp26_local21);\n tmp3_bitMask0 = tmp3_bitMask0 | 2097152;\n tmp27_local22 = tmp39_input.bo(tmp0_desc, 22, BooleanSerializer_getInstance(), tmp27_local22);\n tmp3_bitMask0 = tmp3_bitMask0 | 4194304;\n tmp28_local23 = tmp39_input.bo(tmp0_desc, 23, tmp40_cached[23], tmp28_local23);\n tmp3_bitMask0 = tmp3_bitMask0 | 8388608;\n tmp29_local24 = tmp39_input.bo(tmp0_desc, 24, BooleanSerializer_getInstance(), tmp29_local24);\n tmp3_bitMask0 = tmp3_bitMask0 | 16777216;\n tmp30_local25 = tmp39_input.bo(tmp0_desc, 25, BooleanSerializer_getInstance(), tmp30_local25);\n tmp3_bitMask0 = tmp3_bitMask0 | 33554432;\n tmp31_local26 = tmp39_input.bo(tmp0_desc, 26, BooleanSerializer_getInstance(), tmp31_local26);\n tmp3_bitMask0 = tmp3_bitMask0 | 67108864;\n tmp32_local27 = tmp39_input.bo(tmp0_desc, 27, $serializer_getInstance_1(), tmp32_local27);\n tmp3_bitMask0 = tmp3_bitMask0 | 134217728;\n tmp33_local28 = tmp39_input.bo(tmp0_desc, 28, MarginTemplateSerializer_getInstance(), tmp33_local28);\n tmp3_bitMask0 = tmp3_bitMask0 | 268435456;\n tmp34_local29 = tmp39_input.bo(tmp0_desc, 29, IntSerializer_getInstance(), tmp34_local29);\n tmp3_bitMask0 = tmp3_bitMask0 | 536870912;\n tmp35_local30 = tmp39_input.bo(tmp0_desc, 30, $serializer_getInstance_2(), tmp35_local30);\n tmp3_bitMask0 = tmp3_bitMask0 | 1073741824;\n tmp36_local31 = tmp39_input.bo(tmp0_desc, 31, CustomSerializer_getInstance_1(), tmp36_local31);\n tmp3_bitMask0 = tmp3_bitMask0 | -2147483648;\n tmp37_local32 = tmp39_input.bo(tmp0_desc, 32, PositionTemplateSerializer_getInstance(), tmp37_local32);\n tmp4_bitMask1 = tmp4_bitMask1 | 1;\n tmp38_local33 = tmp39_input.zn(tmp0_desc, 33, tmp40_cached[33], tmp38_local33);\n tmp4_bitMask1 = tmp4_bitMask1 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp39_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp5_local0 = tmp39_input.bo(tmp0_desc, 0, tmp40_cached[0], tmp5_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp6_local1 = tmp39_input.bo(tmp0_desc, 1, tmp40_cached[1], tmp6_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp7_local2 = tmp39_input.bo(tmp0_desc, 2, tmp40_cached[2], tmp7_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp8_local3 = tmp39_input.bo(tmp0_desc, 3, tmp40_cached[3], tmp8_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp9_local4 = tmp39_input.bo(tmp0_desc, 4, tmp40_cached[4], tmp9_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n case 5:\n tmp10_local5 = tmp39_input.bo(tmp0_desc, 5, CustomSerializer_getInstance(), tmp10_local5);\n tmp3_bitMask0 = tmp3_bitMask0 | 32;\n break;\n case 6:\n tmp11_local6 = tmp39_input.bo(tmp0_desc, 6, CustomSerializer_getInstance_2(), tmp11_local6);\n tmp3_bitMask0 = tmp3_bitMask0 | 64;\n break;\n case 7:\n tmp12_local7 = tmp39_input.bo(tmp0_desc, 7, StringSerializer_getInstance(), tmp12_local7);\n tmp3_bitMask0 = tmp3_bitMask0 | 128;\n break;\n case 8:\n tmp13_local8 = tmp39_input.bo(tmp0_desc, 8, $serializer_getInstance_0(), tmp13_local8);\n tmp3_bitMask0 = tmp3_bitMask0 | 256;\n break;\n case 9:\n tmp14_local9 = tmp39_input.bo(tmp0_desc, 9, BooleanSerializer_getInstance(), tmp14_local9);\n tmp3_bitMask0 = tmp3_bitMask0 | 512;\n break;\n case 10:\n tmp15_local10 = tmp39_input.bo(tmp0_desc, 10, BooleanSerializer_getInstance(), tmp15_local10);\n tmp3_bitMask0 = tmp3_bitMask0 | 1024;\n break;\n case 11:\n tmp16_local11 = tmp39_input.bo(tmp0_desc, 11, BooleanSerializer_getInstance(), tmp16_local11);\n tmp3_bitMask0 = tmp3_bitMask0 | 2048;\n break;\n case 12:\n tmp17_local12 = tmp39_input.bo(tmp0_desc, 12, tmp40_cached[12], tmp17_local12);\n tmp3_bitMask0 = tmp3_bitMask0 | 4096;\n break;\n case 13:\n tmp18_local13 = tmp39_input.bo(tmp0_desc, 13, CustomSerializer_getInstance_0(), tmp18_local13);\n tmp3_bitMask0 = tmp3_bitMask0 | 8192;\n break;\n case 14:\n tmp19_local14 = tmp39_input.bo(tmp0_desc, 14, BooleanSerializer_getInstance(), tmp19_local14);\n tmp3_bitMask0 = tmp3_bitMask0 | 16384;\n break;\n case 15:\n tmp20_local15 = tmp39_input.bo(tmp0_desc, 15, BooleanSerializer_getInstance(), tmp20_local15);\n tmp3_bitMask0 = tmp3_bitMask0 | 32768;\n break;\n case 16:\n tmp21_local16 = tmp39_input.bo(tmp0_desc, 16, BooleanSerializer_getInstance(), tmp21_local16);\n tmp3_bitMask0 = tmp3_bitMask0 | 65536;\n break;\n case 17:\n tmp22_local17 = tmp39_input.bo(tmp0_desc, 17, BooleanSerializer_getInstance(), tmp22_local17);\n tmp3_bitMask0 = tmp3_bitMask0 | 131072;\n break;\n case 18:\n tmp23_local18 = tmp39_input.bo(tmp0_desc, 18, BooleanSerializer_getInstance(), tmp23_local18);\n tmp3_bitMask0 = tmp3_bitMask0 | 262144;\n break;\n case 19:\n tmp24_local19 = tmp39_input.bo(tmp0_desc, 19, BooleanSerializer_getInstance(), tmp24_local19);\n tmp3_bitMask0 = tmp3_bitMask0 | 524288;\n break;\n case 20:\n tmp25_local20 = tmp39_input.bo(tmp0_desc, 20, BooleanSerializer_getInstance(), tmp25_local20);\n tmp3_bitMask0 = tmp3_bitMask0 | 1048576;\n break;\n case 21:\n tmp26_local21 = tmp39_input.bo(tmp0_desc, 21, BooleanSerializer_getInstance(), tmp26_local21);\n tmp3_bitMask0 = tmp3_bitMask0 | 2097152;\n break;\n case 22:\n tmp27_local22 = tmp39_input.bo(tmp0_desc, 22, BooleanSerializer_getInstance(), tmp27_local22);\n tmp3_bitMask0 = tmp3_bitMask0 | 4194304;\n break;\n case 23:\n tmp28_local23 = tmp39_input.bo(tmp0_desc, 23, tmp40_cached[23], tmp28_local23);\n tmp3_bitMask0 = tmp3_bitMask0 | 8388608;\n break;\n case 24:\n tmp29_local24 = tmp39_input.bo(tmp0_desc, 24, BooleanSerializer_getInstance(), tmp29_local24);\n tmp3_bitMask0 = tmp3_bitMask0 | 16777216;\n break;\n case 25:\n tmp30_local25 = tmp39_input.bo(tmp0_desc, 25, BooleanSerializer_getInstance(), tmp30_local25);\n tmp3_bitMask0 = tmp3_bitMask0 | 33554432;\n break;\n case 26:\n tmp31_local26 = tmp39_input.bo(tmp0_desc, 26, BooleanSerializer_getInstance(), tmp31_local26);\n tmp3_bitMask0 = tmp3_bitMask0 | 67108864;\n break;\n case 27:\n tmp32_local27 = tmp39_input.bo(tmp0_desc, 27, $serializer_getInstance_1(), tmp32_local27);\n tmp3_bitMask0 = tmp3_bitMask0 | 134217728;\n break;\n case 28:\n tmp33_local28 = tmp39_input.bo(tmp0_desc, 28, MarginTemplateSerializer_getInstance(), tmp33_local28);\n tmp3_bitMask0 = tmp3_bitMask0 | 268435456;\n break;\n case 29:\n tmp34_local29 = tmp39_input.bo(tmp0_desc, 29, IntSerializer_getInstance(), tmp34_local29);\n tmp3_bitMask0 = tmp3_bitMask0 | 536870912;\n break;\n case 30:\n tmp35_local30 = tmp39_input.bo(tmp0_desc, 30, $serializer_getInstance_2(), tmp35_local30);\n tmp3_bitMask0 = tmp3_bitMask0 | 1073741824;\n break;\n case 31:\n tmp36_local31 = tmp39_input.bo(tmp0_desc, 31, CustomSerializer_getInstance_1(), tmp36_local31);\n tmp3_bitMask0 = tmp3_bitMask0 | -2147483648;\n break;\n case 32:\n tmp37_local32 = tmp39_input.bo(tmp0_desc, 32, PositionTemplateSerializer_getInstance(), tmp37_local32);\n tmp4_bitMask1 = tmp4_bitMask1 | 1;\n break;\n case 33:\n tmp38_local33 = tmp39_input.zn(tmp0_desc, 33, tmp40_cached[33], tmp38_local33);\n tmp4_bitMask1 = tmp4_bitMask1 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp39_input.on(tmp0_desc);\n return ItemComponentsDTO_init_$Create$(tmp3_bitMask0, tmp4_bitMask1, tmp5_local0, tmp6_local1, tmp7_local2, tmp8_local3, tmp9_local4, tmp10_local5, tmp11_local6, tmp12_local7, tmp13_local8, tmp14_local9, tmp15_local10, tmp16_local11, tmp17_local12, tmp18_local13, tmp19_local14, tmp20_local15, tmp21_local16, tmp22_local17, tmp23_local18, tmp24_local19, tmp25_local20, tmp26_local21, tmp27_local22, tmp28_local23, tmp29_local24, tmp30_local25, tmp31_local26, tmp32_local27, tmp33_local28, tmp34_local29, tmp35_local30, tmp36_local31, tmp37_local32, tmp38_local33, null);\n };\n protoOf($serializer_1).k4c = function (encoder, value) {\n var tmp0_desc = this.j4c_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_8().i4c_1;\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !(value.assembly == null)) {\n tmp1_output.gp(tmp0_desc, 0, tmp2_cached[0], value.assembly);\n }\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.colliders == null)) {\n tmp1_output.gp(tmp0_desc, 1, tmp2_cached[1], value.colliders);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.connectors == null)) {\n tmp1_output.gp(tmp0_desc, 2, tmp2_cached[2], value.connectors);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.productStructure == null)) {\n tmp1_output.gp(tmp0_desc, 3, tmp2_cached[3], value.productStructure);\n }\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.functionalZones == null)) {\n tmp1_output.gp(tmp0_desc, 4, tmp2_cached[4], value.functionalZones);\n }\n if (tmp1_output.kp(tmp0_desc, 5) ? true : !(value.autoAdaptGroup == null)) {\n tmp1_output.gp(tmp0_desc, 5, CustomSerializer_getInstance(), value.autoAdaptGroup);\n }\n if (tmp1_output.kp(tmp0_desc, 6) ? true : !(value.product == null)) {\n tmp1_output.gp(tmp0_desc, 6, CustomSerializer_getInstance_2(), value.product);\n }\n if (tmp1_output.kp(tmp0_desc, 7) ? true : !(value.modelURI == null)) {\n tmp1_output.gp(tmp0_desc, 7, StringSerializer_getInstance(), value.modelURI);\n }\n if (tmp1_output.kp(tmp0_desc, 8) ? true : !(value.modelTransform == null)) {\n tmp1_output.gp(tmp0_desc, 8, $serializer_getInstance_0(), value.modelTransform);\n }\n if (tmp1_output.kp(tmp0_desc, 9) ? true : !(value.selectable == null)) {\n tmp1_output.gp(tmp0_desc, 9, BooleanSerializer_getInstance(), value.selectable);\n }\n if (tmp1_output.kp(tmp0_desc, 10) ? true : !(value.outlineable == null)) {\n tmp1_output.gp(tmp0_desc, 10, BooleanSerializer_getInstance(), value.outlineable);\n }\n if (tmp1_output.kp(tmp0_desc, 11) ? true : !(value.draggable == null)) {\n tmp1_output.gp(tmp0_desc, 11, BooleanSerializer_getInstance(), value.draggable);\n }\n if (tmp1_output.kp(tmp0_desc, 12) ? true : !(value.allowedDoorPairs == null)) {\n tmp1_output.gp(tmp0_desc, 12, tmp2_cached[12], value.allowedDoorPairs);\n }\n if (tmp1_output.kp(tmp0_desc, 13) ? true : !(value.autoAdaptHost == null)) {\n tmp1_output.gp(tmp0_desc, 13, CustomSerializer_getInstance_0(), value.autoAdaptHost);\n }\n if (tmp1_output.kp(tmp0_desc, 14) ? true : !(value.door == null)) {\n tmp1_output.gp(tmp0_desc, 14, BooleanSerializer_getInstance(), value.door);\n }\n if (tmp1_output.kp(tmp0_desc, 15) ? true : !(value.doorFront == null)) {\n tmp1_output.gp(tmp0_desc, 15, BooleanSerializer_getInstance(), value.doorFront);\n }\n if (tmp1_output.kp(tmp0_desc, 16) ? true : !(value.handle == null)) {\n tmp1_output.gp(tmp0_desc, 16, BooleanSerializer_getInstance(), value.handle);\n }\n if (tmp1_output.kp(tmp0_desc, 17) ? true : !(value.drawer == null)) {\n tmp1_output.gp(tmp0_desc, 17, BooleanSerializer_getInstance(), value.drawer);\n }\n if (tmp1_output.kp(tmp0_desc, 18) ? true : !(value.frame == null)) {\n tmp1_output.gp(tmp0_desc, 18, BooleanSerializer_getInstance(), value.frame);\n }\n if (tmp1_output.kp(tmp0_desc, 19) ? true : !(value.leg == null)) {\n tmp1_output.gp(tmp0_desc, 19, BooleanSerializer_getInstance(), value.leg);\n }\n if (tmp1_output.kp(tmp0_desc, 20) ? true : !(value.innerLight == null)) {\n tmp1_output.gp(tmp0_desc, 20, BooleanSerializer_getInstance(), value.innerLight);\n }\n if (tmp1_output.kp(tmp0_desc, 21) ? true : !(value.outerLight == null)) {\n tmp1_output.gp(tmp0_desc, 21, BooleanSerializer_getInstance(), value.outerLight);\n }\n if (tmp1_output.kp(tmp0_desc, 22) ? true : !(value.outlined == null)) {\n tmp1_output.gp(tmp0_desc, 22, BooleanSerializer_getInstance(), value.outlined);\n }\n if (tmp1_output.kp(tmp0_desc, 23) ? true : !(value.meta == null)) {\n tmp1_output.gp(tmp0_desc, 23, tmp2_cached[23], value.meta);\n }\n if (tmp1_output.kp(tmp0_desc, 24) ? true : !(value.propping == null)) {\n tmp1_output.gp(tmp0_desc, 24, BooleanSerializer_getInstance(), value.propping);\n }\n if (tmp1_output.kp(tmp0_desc, 25) ? true : !(value.alwaysHangDown == null)) {\n tmp1_output.gp(tmp0_desc, 25, BooleanSerializer_getInstance(), value.alwaysHangDown);\n }\n if (tmp1_output.kp(tmp0_desc, 26) ? true : !(value.serializeEntity == null)) {\n tmp1_output.gp(tmp0_desc, 26, BooleanSerializer_getInstance(), value.serializeEntity);\n }\n if (tmp1_output.kp(tmp0_desc, 27) ? true : !(value.placementZoneByHeight == null)) {\n tmp1_output.gp(tmp0_desc, 27, $serializer_getInstance_1(), value.placementZoneByHeight);\n }\n if (tmp1_output.kp(tmp0_desc, 28) ? true : !(value.functionalMargin == null)) {\n tmp1_output.gp(tmp0_desc, 28, MarginTemplateSerializer_getInstance(), value.functionalMargin);\n }\n if (tmp1_output.kp(tmp0_desc, 29) ? true : !(value.recommendedInitialPositionFromFloor == null)) {\n tmp1_output.gp(tmp0_desc, 29, IntSerializer_getInstance(), value.recommendedInitialPositionFromFloor);\n }\n if (tmp1_output.kp(tmp0_desc, 30) ? true : !(value.visualLightSource == null)) {\n tmp1_output.gp(tmp0_desc, 30, $serializer_getInstance_2(), value.visualLightSource);\n }\n if (tmp1_output.kp(tmp0_desc, 31) ? true : !(value.dragSurfaces == null)) {\n tmp1_output.gp(tmp0_desc, 31, CustomSerializer_getInstance_1(), value.dragSurfaces);\n }\n if (tmp1_output.kp(tmp0_desc, 32) ? true : !(value.dragProjectionPoint == null)) {\n tmp1_output.gp(tmp0_desc, 32, PositionTemplateSerializer_getInstance(), value.dragProjectionPoint);\n }\n var tmp;\n if (tmp1_output.kp(tmp0_desc, 33)) {\n tmp = true;\n } else {\n var tmp_0 = value.customComponents;\n // Inline function 'kotlin.collections.mapOf' call\n var tmp$ret$0 = emptyMap();\n tmp = !equals(tmp_0, tmp$ret$0);\n }\n if (tmp) {\n tmp1_output.ep(tmp0_desc, 33, tmp2_cached[33], value.customComponents);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_1).pk = function (encoder, value) {\n return this.k4c(encoder, value instanceof ItemComponentsDTO ? value : THROW_CCE());\n };\n var $serializer_instance_1;\n function $serializer_getInstance_7() {\n if ($serializer_instance_1 == null)\n new $serializer_1();\n return $serializer_instance_1;\n }\n function ItemComponentsDTO_init_$Init$(seen1, seen2, assembly, colliders, connectors, productStructure, functionalZones, autoAdaptGroup, product, modelURI, modelTransform, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, door, doorFront, handle, drawer, frame, leg, innerLight, outerLight, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, dragSurfaces, dragProjectionPoint, customComponents, serializationConstructorMarker, $this) {\n if (!!(!(0 === (0 & seen1)) | !(0 === (0 & seen2)))) {\n // Inline function 'kotlin.intArrayOf' call\n var tmp = new Int32Array([seen1, seen2]);\n // Inline function 'kotlin.intArrayOf' call\n var tmp$ret$1 = new Int32Array([0, 0]);\n throwArrayMissingFieldException(tmp, tmp$ret$1, $serializer_getInstance_7().j4c_1);\n }\n if (0 === (seen1 & 1))\n $this.assembly = null;\n else\n $this.assembly = assembly;\n if (0 === (seen1 & 2))\n $this.colliders = null;\n else\n $this.colliders = colliders;\n if (0 === (seen1 & 4))\n $this.connectors = null;\n else\n $this.connectors = connectors;\n if (0 === (seen1 & 8))\n $this.productStructure = null;\n else\n $this.productStructure = productStructure;\n if (0 === (seen1 & 16))\n $this.functionalZones = null;\n else\n $this.functionalZones = functionalZones;\n if (0 === (seen1 & 32))\n $this.autoAdaptGroup = null;\n else\n $this.autoAdaptGroup = autoAdaptGroup;\n if (0 === (seen1 & 64))\n $this.product = null;\n else\n $this.product = product;\n if (0 === (seen1 & 128))\n $this.modelURI = null;\n else\n $this.modelURI = modelURI;\n if (0 === (seen1 & 256))\n $this.modelTransform = null;\n else\n $this.modelTransform = modelTransform;\n if (0 === (seen1 & 512))\n $this.selectable = null;\n else\n $this.selectable = selectable;\n if (0 === (seen1 & 1024))\n $this.outlineable = null;\n else\n $this.outlineable = outlineable;\n if (0 === (seen1 & 2048))\n $this.draggable = null;\n else\n $this.draggable = draggable;\n if (0 === (seen1 & 4096))\n $this.allowedDoorPairs = null;\n else\n $this.allowedDoorPairs = allowedDoorPairs;\n if (0 === (seen1 & 8192))\n $this.autoAdaptHost = null;\n else\n $this.autoAdaptHost = autoAdaptHost;\n if (0 === (seen1 & 16384))\n $this.door = null;\n else\n $this.door = door;\n if (0 === (seen1 & 32768))\n $this.doorFront = null;\n else\n $this.doorFront = doorFront;\n if (0 === (seen1 & 65536))\n $this.handle = null;\n else\n $this.handle = handle;\n if (0 === (seen1 & 131072))\n $this.drawer = null;\n else\n $this.drawer = drawer;\n if (0 === (seen1 & 262144))\n $this.frame = null;\n else\n $this.frame = frame;\n if (0 === (seen1 & 524288))\n $this.leg = null;\n else\n $this.leg = leg;\n if (0 === (seen1 & 1048576))\n $this.innerLight = null;\n else\n $this.innerLight = innerLight;\n if (0 === (seen1 & 2097152))\n $this.outerLight = null;\n else\n $this.outerLight = outerLight;\n if (0 === (seen1 & 4194304))\n $this.outlined = null;\n else\n $this.outlined = outlined;\n if (0 === (seen1 & 8388608))\n $this.meta = null;\n else\n $this.meta = meta;\n if (0 === (seen1 & 16777216))\n $this.propping = null;\n else\n $this.propping = propping;\n if (0 === (seen1 & 33554432))\n $this.alwaysHangDown = null;\n else\n $this.alwaysHangDown = alwaysHangDown;\n if (0 === (seen1 & 67108864))\n $this.serializeEntity = null;\n else\n $this.serializeEntity = serializeEntity;\n if (0 === (seen1 & 134217728))\n $this.placementZoneByHeight = null;\n else\n $this.placementZoneByHeight = placementZoneByHeight;\n if (0 === (seen1 & 268435456))\n $this.functionalMargin = null;\n else\n $this.functionalMargin = functionalMargin;\n if (0 === (seen1 & 536870912))\n $this.recommendedInitialPositionFromFloor = null;\n else\n $this.recommendedInitialPositionFromFloor = recommendedInitialPositionFromFloor;\n if (0 === (seen1 & 1073741824))\n $this.visualLightSource = null;\n else\n $this.visualLightSource = visualLightSource;\n if (0 === (seen1 & -2147483648))\n $this.dragSurfaces = null;\n else\n $this.dragSurfaces = dragSurfaces;\n if (0 === (seen2 & 1))\n $this.dragProjectionPoint = null;\n else\n $this.dragProjectionPoint = dragProjectionPoint;\n if (0 === (seen2 & 2)) {\n var tmp_0 = $this;\n // Inline function 'kotlin.collections.mapOf' call\n tmp_0.customComponents = emptyMap();\n } else\n $this.customComponents = customComponents;\n return $this;\n }\n function ItemComponentsDTO_init_$Create$(seen1, seen2, assembly, colliders, connectors, productStructure, functionalZones, autoAdaptGroup, product, modelURI, modelTransform, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, door, doorFront, handle, drawer, frame, leg, innerLight, outerLight, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, dragSurfaces, dragProjectionPoint, customComponents, serializationConstructorMarker) {\n return ItemComponentsDTO_init_$Init$(seen1, seen2, assembly, colliders, connectors, productStructure, functionalZones, autoAdaptGroup, product, modelURI, modelTransform, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, door, doorFront, handle, drawer, frame, leg, innerLight, outerLight, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, dragSurfaces, dragProjectionPoint, customComponents, serializationConstructorMarker, objectCreate(protoOf(ItemComponentsDTO)));\n }\n function ItemComponentsDTO(assembly, colliders, connectors, productStructure, functionalZones, autoAdaptGroup, product, modelURI, modelTransform, selectable, outlineable, draggable, allowedDoorPairs, autoAdaptHost, door, doorFront, handle, drawer, frame, leg, innerLight, outerLight, outlined, meta, propping, alwaysHangDown, serializeEntity, placementZoneByHeight, functionalMargin, recommendedInitialPositionFromFloor, visualLightSource, dragSurfaces, dragProjectionPoint, customComponents) {\n Companion_getInstance_8();\n assembly = assembly === VOID ? null : assembly;\n colliders = colliders === VOID ? null : colliders;\n connectors = connectors === VOID ? null : connectors;\n productStructure = productStructure === VOID ? null : productStructure;\n functionalZones = functionalZones === VOID ? null : functionalZones;\n autoAdaptGroup = autoAdaptGroup === VOID ? null : autoAdaptGroup;\n product = product === VOID ? null : product;\n modelURI = modelURI === VOID ? null : modelURI;\n modelTransform = modelTransform === VOID ? null : modelTransform;\n selectable = selectable === VOID ? null : selectable;\n outlineable = outlineable === VOID ? null : outlineable;\n draggable = draggable === VOID ? null : draggable;\n allowedDoorPairs = allowedDoorPairs === VOID ? null : allowedDoorPairs;\n autoAdaptHost = autoAdaptHost === VOID ? null : autoAdaptHost;\n door = door === VOID ? null : door;\n doorFront = doorFront === VOID ? null : doorFront;\n handle = handle === VOID ? null : handle;\n drawer = drawer === VOID ? null : drawer;\n frame = frame === VOID ? null : frame;\n leg = leg === VOID ? null : leg;\n innerLight = innerLight === VOID ? null : innerLight;\n outerLight = outerLight === VOID ? null : outerLight;\n outlined = outlined === VOID ? null : outlined;\n meta = meta === VOID ? null : meta;\n propping = propping === VOID ? null : propping;\n alwaysHangDown = alwaysHangDown === VOID ? null : alwaysHangDown;\n serializeEntity = serializeEntity === VOID ? null : serializeEntity;\n placementZoneByHeight = placementZoneByHeight === VOID ? null : placementZoneByHeight;\n functionalMargin = functionalMargin === VOID ? null : functionalMargin;\n recommendedInitialPositionFromFloor = recommendedInitialPositionFromFloor === VOID ? null : recommendedInitialPositionFromFloor;\n visualLightSource = visualLightSource === VOID ? null : visualLightSource;\n dragSurfaces = dragSurfaces === VOID ? null : dragSurfaces;\n dragProjectionPoint = dragProjectionPoint === VOID ? null : dragProjectionPoint;\n var tmp;\n if (customComponents === VOID) {\n // Inline function 'kotlin.collections.mapOf' call\n tmp = emptyMap();\n } else {\n tmp = customComponents;\n }\n customComponents = tmp;\n this.assembly = assembly;\n this.colliders = colliders;\n this.connectors = connectors;\n this.productStructure = productStructure;\n this.functionalZones = functionalZones;\n this.autoAdaptGroup = autoAdaptGroup;\n this.product = product;\n this.modelURI = modelURI;\n this.modelTransform = modelTransform;\n this.selectable = selectable;\n this.outlineable = outlineable;\n this.draggable = draggable;\n this.allowedDoorPairs = allowedDoorPairs;\n this.autoAdaptHost = autoAdaptHost;\n this.door = door;\n this.doorFront = doorFront;\n this.handle = handle;\n this.drawer = drawer;\n this.frame = frame;\n this.leg = leg;\n this.innerLight = innerLight;\n this.outerLight = outerLight;\n this.outlined = outlined;\n this.meta = meta;\n this.propping = propping;\n this.alwaysHangDown = alwaysHangDown;\n this.serializeEntity = serializeEntity;\n this.placementZoneByHeight = placementZoneByHeight;\n this.functionalMargin = functionalMargin;\n this.recommendedInitialPositionFromFloor = recommendedInitialPositionFromFloor;\n this.visualLightSource = visualLightSource;\n this.dragSurfaces = dragSurfaces;\n this.dragProjectionPoint = dragProjectionPoint;\n this.customComponents = customComponents;\n }\n protoOf(ItemComponentsDTO).l4c = function (_set____db54di) {\n this.assembly = _set____db54di;\n };\n protoOf(ItemComponentsDTO).h44 = function () {\n return this.assembly;\n };\n protoOf(ItemComponentsDTO).m4c = function (_set____db54di) {\n this.colliders = _set____db54di;\n };\n protoOf(ItemComponentsDTO).n4c = function () {\n return this.colliders;\n };\n protoOf(ItemComponentsDTO).f44 = function (_set____db54di) {\n this.connectors = _set____db54di;\n };\n protoOf(ItemComponentsDTO).a1y = function () {\n return this.connectors;\n };\n protoOf(ItemComponentsDTO).f46 = function (_set____db54di) {\n this.productStructure = _set____db54di;\n };\n protoOf(ItemComponentsDTO).g46 = function () {\n return this.productStructure;\n };\n protoOf(ItemComponentsDTO).o4c = function (_set____db54di) {\n this.functionalZones = _set____db54di;\n };\n protoOf(ItemComponentsDTO).e44 = function () {\n return this.functionalZones;\n };\n protoOf(ItemComponentsDTO).y3x = function () {\n return this.autoAdaptGroup;\n };\n protoOf(ItemComponentsDTO).n42 = function () {\n return this.product;\n };\n protoOf(ItemComponentsDTO).t3x = function () {\n return this.modelURI;\n };\n protoOf(ItemComponentsDTO).h40 = function () {\n return this.modelTransform;\n };\n protoOf(ItemComponentsDTO).j44 = function () {\n return this.selectable;\n };\n protoOf(ItemComponentsDTO).k44 = function (_set____db54di) {\n this.outlineable = _set____db54di;\n };\n protoOf(ItemComponentsDTO).l44 = function () {\n return this.outlineable;\n };\n protoOf(ItemComponentsDTO).m44 = function (_set____db54di) {\n this.draggable = _set____db54di;\n };\n protoOf(ItemComponentsDTO).n44 = function () {\n return this.draggable;\n };\n protoOf(ItemComponentsDTO).o44 = function (_set____db54di) {\n this.allowedDoorPairs = _set____db54di;\n };\n protoOf(ItemComponentsDTO).p44 = function () {\n return this.allowedDoorPairs;\n };\n protoOf(ItemComponentsDTO).q44 = function (_set____db54di) {\n this.autoAdaptHost = _set____db54di;\n };\n protoOf(ItemComponentsDTO).r44 = function () {\n return this.autoAdaptHost;\n };\n protoOf(ItemComponentsDTO).u44 = function (_set____db54di) {\n this.door = _set____db54di;\n };\n protoOf(ItemComponentsDTO).v44 = function () {\n return this.door;\n };\n protoOf(ItemComponentsDTO).w44 = function (_set____db54di) {\n this.doorFront = _set____db54di;\n };\n protoOf(ItemComponentsDTO).x44 = function () {\n return this.doorFront;\n };\n protoOf(ItemComponentsDTO).y44 = function (_set____db54di) {\n this.handle = _set____db54di;\n };\n protoOf(ItemComponentsDTO).z44 = function () {\n return this.handle;\n };\n protoOf(ItemComponentsDTO).a45 = function (_set____db54di) {\n this.drawer = _set____db54di;\n };\n protoOf(ItemComponentsDTO).b45 = function () {\n return this.drawer;\n };\n protoOf(ItemComponentsDTO).c45 = function (_set____db54di) {\n this.frame = _set____db54di;\n };\n protoOf(ItemComponentsDTO).d45 = function () {\n return this.frame;\n };\n protoOf(ItemComponentsDTO).e45 = function (_set____db54di) {\n this.leg = _set____db54di;\n };\n protoOf(ItemComponentsDTO).f45 = function () {\n return this.leg;\n };\n protoOf(ItemComponentsDTO).p4c = function (_set____db54di) {\n this.innerLight = _set____db54di;\n };\n protoOf(ItemComponentsDTO).q4c = function () {\n return this.innerLight;\n };\n protoOf(ItemComponentsDTO).r4c = function (_set____db54di) {\n this.outerLight = _set____db54di;\n };\n protoOf(ItemComponentsDTO).s4c = function () {\n return this.outerLight;\n };\n protoOf(ItemComponentsDTO).i45 = function (_set____db54di) {\n this.outlined = _set____db54di;\n };\n protoOf(ItemComponentsDTO).j45 = function () {\n return this.outlined;\n };\n protoOf(ItemComponentsDTO).k45 = function (_set____db54di) {\n this.meta = _set____db54di;\n };\n protoOf(ItemComponentsDTO).z3x = function () {\n return this.meta;\n };\n protoOf(ItemComponentsDTO).l45 = function (_set____db54di) {\n this.propping = _set____db54di;\n };\n protoOf(ItemComponentsDTO).z3e = function () {\n return this.propping;\n };\n protoOf(ItemComponentsDTO).m45 = function (_set____db54di) {\n this.alwaysHangDown = _set____db54di;\n };\n protoOf(ItemComponentsDTO).n45 = function () {\n return this.alwaysHangDown;\n };\n protoOf(ItemComponentsDTO).o45 = function (_set____db54di) {\n this.serializeEntity = _set____db54di;\n };\n protoOf(ItemComponentsDTO).p45 = function () {\n return this.serializeEntity;\n };\n protoOf(ItemComponentsDTO).q45 = function (_set____db54di) {\n this.placementZoneByHeight = _set____db54di;\n };\n protoOf(ItemComponentsDTO).r45 = function () {\n return this.placementZoneByHeight;\n };\n protoOf(ItemComponentsDTO).s45 = function (_set____db54di) {\n this.functionalMargin = _set____db54di;\n };\n protoOf(ItemComponentsDTO).t45 = function () {\n return this.functionalMargin;\n };\n protoOf(ItemComponentsDTO).u45 = function (_set____db54di) {\n this.recommendedInitialPositionFromFloor = _set____db54di;\n };\n protoOf(ItemComponentsDTO).v45 = function () {\n return this.recommendedInitialPositionFromFloor;\n };\n protoOf(ItemComponentsDTO).w45 = function (_set____db54di) {\n this.visualLightSource = _set____db54di;\n };\n protoOf(ItemComponentsDTO).x45 = function () {\n return this.visualLightSource;\n };\n protoOf(ItemComponentsDTO).b46 = function (_set____db54di) {\n this.dragSurfaces = _set____db54di;\n };\n protoOf(ItemComponentsDTO).c46 = function () {\n return this.dragSurfaces;\n };\n protoOf(ItemComponentsDTO).d46 = function (_set____db54di) {\n this.dragProjectionPoint = _set____db54di;\n };\n protoOf(ItemComponentsDTO).e46 = function () {\n return this.dragProjectionPoint;\n };\n protoOf(ItemComponentsDTO).t4c = function (_set____db54di) {\n this.customComponents = _set____db54di;\n };\n protoOf(ItemComponentsDTO).u4c = function () {\n return this.customComponents;\n };\n protoOf(ItemComponentsDTO).inherit = function (parentComponents) {\n var tmp0_safe_receiver = this.assembly;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inherit.' call\n tmp = inheritAssembly(this, tmp0_safe_receiver, parentComponents.assembly);\n }\n var tmp1_elvis_lhs = tmp;\n var tmp40_assembly = tmp1_elvis_lhs == null ? parentComponents.assembly : tmp1_elvis_lhs;\n var tmp2_safe_receiver = this.colliders;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inherit.' call\n tmp_0 = inheritColliders(this, tmp2_safe_receiver, parentComponents.colliders);\n }\n var tmp3_elvis_lhs = tmp_0;\n var tmp41_colliders = tmp3_elvis_lhs == null ? parentComponents.colliders : tmp3_elvis_lhs;\n var tmp4_safe_receiver = this.connectors;\n var tmp_1;\n if (tmp4_safe_receiver == null) {\n tmp_1 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inherit.' call\n tmp_1 = inheritConnectors(this, tmp4_safe_receiver, parentComponents.connectors);\n }\n var tmp5_elvis_lhs = tmp_1;\n var tmp42_connectors = tmp5_elvis_lhs == null ? parentComponents.connectors : tmp5_elvis_lhs;\n var tmp6_safe_receiver = this.productStructure;\n var tmp_2;\n if (tmp6_safe_receiver == null) {\n tmp_2 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inherit.' call\n tmp_2 = inheritProductStructure(this, tmp6_safe_receiver, parentComponents.productStructure);\n }\n var tmp7_elvis_lhs = tmp_2;\n var tmp43_productStructure = tmp7_elvis_lhs == null ? parentComponents.productStructure : tmp7_elvis_lhs;\n var tmp29_safe_receiver = this.meta;\n var tmp_3;\n if (tmp29_safe_receiver == null) {\n tmp_3 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inherit.' call\n tmp_3 = inheritMeta(this, tmp29_safe_receiver, parentComponents.meta);\n }\n var tmp30_elvis_lhs = tmp_3;\n var tmp44_meta = tmp30_elvis_lhs == null ? parentComponents.meta : tmp30_elvis_lhs;\n var tmp17_safe_receiver = this.allowedDoorPairs;\n var tmp_4;\n if (tmp17_safe_receiver == null) {\n tmp_4 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inherit.' call\n tmp_4 = inheritAllowedDoorPairs(this, tmp17_safe_receiver, parentComponents.allowedDoorPairs);\n }\n var tmp18_elvis_lhs = tmp_4;\n var tmp45_allowedDoorPairs = tmp18_elvis_lhs == null ? parentComponents.allowedDoorPairs : tmp18_elvis_lhs;\n var tmp8_safe_receiver = this.functionalZones;\n var tmp_5;\n if (tmp8_safe_receiver == null) {\n tmp_5 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemComponentsDTO.inherit.' call\n tmp_5 = inheritFunctionalZones(this, tmp8_safe_receiver, parentComponents.functionalZones);\n }\n var tmp9_elvis_lhs = tmp_5;\n var tmp46_functionalZones = tmp9_elvis_lhs == null ? parentComponents.functionalZones : tmp9_elvis_lhs;\n var tmp10_elvis_lhs = this.autoAdaptGroup;\n var tmp47_autoAdaptGroup = tmp10_elvis_lhs == null ? parentComponents.autoAdaptGroup : tmp10_elvis_lhs;\n var tmp11_elvis_lhs = this.product;\n var tmp48_product = tmp11_elvis_lhs == null ? parentComponents.product : tmp11_elvis_lhs;\n var tmp12_elvis_lhs = this.modelURI;\n var tmp49_modelURI = tmp12_elvis_lhs == null ? parentComponents.modelURI : tmp12_elvis_lhs;\n var tmp13_elvis_lhs = this.modelTransform;\n var tmp50_modelTransform = tmp13_elvis_lhs == null ? parentComponents.modelTransform : tmp13_elvis_lhs;\n var tmp14_elvis_lhs = this.selectable;\n var tmp51_selectable = tmp14_elvis_lhs == null ? parentComponents.selectable : tmp14_elvis_lhs;\n var tmp15_elvis_lhs = this.outlineable;\n var tmp52_outlineable = tmp15_elvis_lhs == null ? parentComponents.outlineable : tmp15_elvis_lhs;\n var tmp16_elvis_lhs = this.draggable;\n var tmp53_draggable = tmp16_elvis_lhs == null ? parentComponents.draggable : tmp16_elvis_lhs;\n var tmp19_elvis_lhs = this.autoAdaptHost;\n var tmp54_autoAdaptHost = tmp19_elvis_lhs == null ? parentComponents.autoAdaptHost : tmp19_elvis_lhs;\n var tmp20_elvis_lhs = this.door;\n var tmp55_door = tmp20_elvis_lhs == null ? parentComponents.door : tmp20_elvis_lhs;\n var tmp21_elvis_lhs = this.doorFront;\n var tmp56_doorFront = tmp21_elvis_lhs == null ? parentComponents.doorFront : tmp21_elvis_lhs;\n var tmp22_elvis_lhs = this.handle;\n var tmp57_handle = tmp22_elvis_lhs == null ? parentComponents.handle : tmp22_elvis_lhs;\n var tmp23_elvis_lhs = this.drawer;\n var tmp58_drawer = tmp23_elvis_lhs == null ? parentComponents.drawer : tmp23_elvis_lhs;\n var tmp24_elvis_lhs = this.frame;\n var tmp59_frame = tmp24_elvis_lhs == null ? parentComponents.frame : tmp24_elvis_lhs;\n var tmp25_elvis_lhs = this.leg;\n var tmp60_leg = tmp25_elvis_lhs == null ? parentComponents.leg : tmp25_elvis_lhs;\n var tmp26_elvis_lhs = this.innerLight;\n var tmp61_innerLight = tmp26_elvis_lhs == null ? parentComponents.innerLight : tmp26_elvis_lhs;\n var tmp27_elvis_lhs = this.outerLight;\n var tmp62_outerLight = tmp27_elvis_lhs == null ? parentComponents.outerLight : tmp27_elvis_lhs;\n var tmp28_elvis_lhs = this.outlined;\n var tmp63_outlined = tmp28_elvis_lhs == null ? parentComponents.outlined : tmp28_elvis_lhs;\n var tmp31_elvis_lhs = this.propping;\n var tmp64_propping = tmp31_elvis_lhs == null ? parentComponents.propping : tmp31_elvis_lhs;\n var tmp32_elvis_lhs = this.alwaysHangDown;\n var tmp65_alwaysHangDown = tmp32_elvis_lhs == null ? parentComponents.alwaysHangDown : tmp32_elvis_lhs;\n var tmp33_elvis_lhs = this.serializeEntity;\n var tmp66_serializeEntity = tmp33_elvis_lhs == null ? parentComponents.serializeEntity : tmp33_elvis_lhs;\n var tmp34_elvis_lhs = this.placementZoneByHeight;\n var tmp67_placementZoneByHeight = tmp34_elvis_lhs == null ? parentComponents.placementZoneByHeight : tmp34_elvis_lhs;\n var tmp35_elvis_lhs = this.functionalMargin;\n var tmp68_functionalMargin = tmp35_elvis_lhs == null ? parentComponents.functionalMargin : tmp35_elvis_lhs;\n var tmp36_elvis_lhs = this.recommendedInitialPositionFromFloor;\n var tmp69_recommendedInitialPositionFromFloor = tmp36_elvis_lhs == null ? parentComponents.recommendedInitialPositionFromFloor : tmp36_elvis_lhs;\n var tmp37_elvis_lhs = this.visualLightSource;\n var tmp70_visualLightSource = tmp37_elvis_lhs == null ? parentComponents.visualLightSource : tmp37_elvis_lhs;\n var tmp38_elvis_lhs = this.dragSurfaces;\n var tmp71_dragSurfaces = tmp38_elvis_lhs == null ? parentComponents.dragSurfaces : tmp38_elvis_lhs;\n var tmp39_elvis_lhs = this.dragProjectionPoint;\n var tmp72_dragProjectionPoint = tmp39_elvis_lhs == null ? parentComponents.dragProjectionPoint : tmp39_elvis_lhs;\n var tmp73_customComponents = inheritCustomComponents(this, parentComponents.customComponents);\n var item = new ItemComponentsDTO(tmp40_assembly, tmp41_colliders, tmp42_connectors, tmp43_productStructure, tmp46_functionalZones, tmp47_autoAdaptGroup, tmp48_product, tmp49_modelURI, tmp50_modelTransform, tmp51_selectable, tmp52_outlineable, tmp53_draggable, tmp45_allowedDoorPairs, tmp54_autoAdaptHost, tmp55_door, tmp56_doorFront, tmp57_handle, tmp58_drawer, tmp59_frame, tmp60_leg, tmp61_innerLight, tmp62_outerLight, tmp63_outlined, tmp44_meta, tmp64_propping, tmp65_alwaysHangDown, tmp66_serializeEntity, tmp67_placementZoneByHeight, tmp68_functionalMargin, tmp69_recommendedInitialPositionFromFloor, tmp70_visualLightSource, tmp71_dragSurfaces, tmp72_dragProjectionPoint, tmp73_customComponents);\n return item;\n };\n function Companion_4() {\n Companion_instance_5 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.v4c_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new ReferenceArraySerializer(getKClass(Part), $serializer_getInstance_3())];\n }\n protoOf(Companion_4).l17 = function () {\n return $serializer_getInstance_8();\n };\n var Companion_instance_5;\n function Companion_getInstance_9() {\n if (Companion_instance_5 == null)\n new Companion_4();\n return Companion_instance_5;\n }\n function $serializer_2() {\n $serializer_instance_2 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.ipex.range.dto.item.ItemParametersDTO', this, 3);\n tmp0_serialDesc.cv('size', true);\n tmp0_serialDesc.cv('labels', true);\n tmp0_serialDesc.cv('parts', true);\n this.w4c_1 = tmp0_serialDesc;\n }\n protoOf($serializer_2).ok = function () {\n return this.w4c_1;\n };\n protoOf($serializer_2).rv = function () {\n var tmp0_cached = Companion_getInstance_9().v4c_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [get_nullable($serializer_getInstance_4()), get_nullable(tmp0_cached[1]), get_nullable(tmp0_cached[2])];\n };\n protoOf($serializer_2).qk = function (decoder) {\n var tmp0_desc = this.w4c_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n var tmp8_cached = Companion_getInstance_9().v4c_1;\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.bo(tmp0_desc, 0, $serializer_getInstance_4(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.bo(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.bo(tmp0_desc, 0, $serializer_getInstance_4(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.bo(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.bo(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return ItemParametersDTO_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_2).x4c = function (encoder, value) {\n var tmp0_desc = this.w4c_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_9().v4c_1;\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !(value.size == null)) {\n tmp1_output.gp(tmp0_desc, 0, $serializer_getInstance_4(), value.size);\n }\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.labels == null)) {\n tmp1_output.gp(tmp0_desc, 1, tmp2_cached[1], value.labels);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.parts == null)) {\n tmp1_output.gp(tmp0_desc, 2, tmp2_cached[2], value.parts);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_2).pk = function (encoder, value) {\n return this.x4c(encoder, value instanceof ItemParametersDTO ? value : THROW_CCE());\n };\n var $serializer_instance_2;\n function $serializer_getInstance_8() {\n if ($serializer_instance_2 == null)\n new $serializer_2();\n return $serializer_instance_2;\n }\n function ItemParametersDTO_init_$Init$(seen1, size, labels, parts, serializationConstructorMarker, $this) {\n if (!(0 === (0 & seen1))) {\n throwMissingFieldException(seen1, 0, $serializer_getInstance_8().w4c_1);\n }\n if (0 === (seen1 & 1))\n $this.size = null;\n else\n $this.size = size;\n if (0 === (seen1 & 2))\n $this.labels = null;\n else\n $this.labels = labels;\n if (0 === (seen1 & 4))\n $this.parts = null;\n else\n $this.parts = parts;\n return $this;\n }\n function ItemParametersDTO_init_$Create$(seen1, size, labels, parts, serializationConstructorMarker) {\n return ItemParametersDTO_init_$Init$(seen1, size, labels, parts, serializationConstructorMarker, objectCreate(protoOf(ItemParametersDTO)));\n }\n function ItemParametersDTO(size, labels, parts) {\n Companion_getInstance_9();\n size = size === VOID ? null : size;\n labels = labels === VOID ? null : labels;\n parts = parts === VOID ? null : parts;\n this.size = size;\n this.labels = labels;\n this.parts = parts;\n }\n protoOf(ItemParametersDTO).n = function () {\n return this.size;\n };\n protoOf(ItemParametersDTO).y4c = function () {\n return this.labels;\n };\n protoOf(ItemParametersDTO).w1k = function () {\n return this.parts;\n };\n protoOf(ItemParametersDTO).inherit = function (parentParameters) {\n var tmp0_safe_receiver = parentParameters.parts;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.associate' call\n var capacity = coerceAtLeast(mapCapacity(tmp0_safe_receiver.length), 16);\n // Inline function 'kotlin.collections.associateTo' call\n var destination = LinkedHashMap_init_$Create$_0(capacity);\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.plusAssign' call\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemParametersDTO.inherit.' call\n var pair = new Pair(element.partKey, element);\n destination.r2(pair.ye_1, pair.ze_1);\n }\n tmp = destination;\n }\n var tmp1_elvis_lhs = tmp;\n var parentParts = tmp1_elvis_lhs == null ? emptyMap() : tmp1_elvis_lhs;\n var tmp2_safe_receiver = this.parts;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.associate' call\n var capacity_0 = coerceAtLeast(mapCapacity(tmp2_safe_receiver.length), 16);\n // Inline function 'kotlin.collections.associateTo' call\n var destination_0 = LinkedHashMap_init_$Create$_0(capacity_0);\n var inductionVariable_0 = 0;\n var last_0 = tmp2_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = tmp2_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'kotlin.collections.plusAssign' call\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemParametersDTO.inherit.' call\n var pair_0 = new Pair(element_0.partKey, element_0);\n destination_0.r2(pair_0.ye_1, pair_0.ze_1);\n }\n tmp_0 = destination_0;\n }\n var tmp3_elvis_lhs = tmp_0;\n var parts = tmp3_elvis_lhs == null ? emptyMap() : tmp3_elvis_lhs;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = plus_1(parentParts, parts);\n // Inline function 'kotlin.collections.mapTo' call\n var destination_1 = ArrayList_init_$Create$_0(this_0.n());\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this_0.q2().t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.dto.item.ItemParametersDTO.inherit.' call\n var tmp$ret$7 = item.u2();\n destination_1.q(tmp$ret$7);\n }\n var newParts = copyToArray(destination_1);\n var tmp4_elvis_lhs = this.size;\n var tmp_1 = tmp4_elvis_lhs == null ? parentParameters.size : tmp4_elvis_lhs;\n var tmp6_elvis_lhs = parentParameters.labels;\n var tmp_2 = tmp6_elvis_lhs == null ? emptyMap() : tmp6_elvis_lhs;\n var tmp5_elvis_lhs = this.labels;\n return new ItemParametersDTO(tmp_1, plus_1(tmp_2, tmp5_elvis_lhs == null ? emptyMap() : tmp5_elvis_lhs), newParts);\n };\n function Companion_5() {\n Companion_instance_6 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.r4b_1 = [null, null, new ReferenceArraySerializer(PrimitiveClasses_getInstance().u7(), StringSerializer_getInstance()), null, null];\n }\n protoOf(Companion_5).l17 = function () {\n return $serializer_getInstance_9();\n };\n var Companion_instance_6;\n function Companion_getInstance_10() {\n if (Companion_instance_6 == null)\n new Companion_5();\n return Companion_instance_6;\n }\n function $serializer_3() {\n $serializer_instance_3 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.range.ipex.range.dto.item.RangeItemDTO', this, 5);\n tmp0_serialDesc.cv('id', true);\n tmp0_serialDesc.cv('description', true);\n tmp0_serialDesc.cv('inherits', true);\n tmp0_serialDesc.cv('parameters', true);\n tmp0_serialDesc.cv('components', true);\n this.z4c_1 = tmp0_serialDesc;\n }\n protoOf($serializer_3).ok = function () {\n return this.z4c_1;\n };\n protoOf($serializer_3).rv = function () {\n var tmp0_cached = Companion_getInstance_10().r4b_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(tmp0_cached[2]), get_nullable($serializer_getInstance_8()), get_nullable($serializer_getInstance_7())];\n };\n protoOf($serializer_3).qk = function (decoder) {\n var tmp0_desc = this.z4c_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_input = decoder.nn(tmp0_desc);\n var tmp10_cached = Companion_getInstance_10().r4b_1;\n if (tmp9_input.do()) {\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp9_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp9_input.bo(tmp0_desc, 2, tmp10_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp9_input.bo(tmp0_desc, 3, $serializer_getInstance_8(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp9_input.bo(tmp0_desc, 4, $serializer_getInstance_7(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp9_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp9_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp9_input.bo(tmp0_desc, 2, tmp10_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp9_input.bo(tmp0_desc, 3, $serializer_getInstance_8(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp9_input.bo(tmp0_desc, 4, $serializer_getInstance_7(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp9_input.on(tmp0_desc);\n return RangeItemDTO_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);\n };\n protoOf($serializer_3).a4d = function (encoder, value) {\n var tmp0_desc = this.z4c_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_10().r4b_1;\n if (tmp1_output.kp(tmp0_desc, 0) ? true : !(value.id === '')) {\n tmp1_output.cp(tmp0_desc, 0, value.id);\n }\n if (tmp1_output.kp(tmp0_desc, 1) ? true : !(value.description === '')) {\n tmp1_output.cp(tmp0_desc, 1, value.description);\n }\n if (tmp1_output.kp(tmp0_desc, 2) ? true : !(value.inherits == null)) {\n tmp1_output.gp(tmp0_desc, 2, tmp2_cached[2], value.inherits);\n }\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.parameters == null)) {\n tmp1_output.gp(tmp0_desc, 3, $serializer_getInstance_8(), value.parameters);\n }\n if (tmp1_output.kp(tmp0_desc, 4) ? true : !(value.components == null)) {\n tmp1_output.gp(tmp0_desc, 4, $serializer_getInstance_7(), value.components);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_3).pk = function (encoder, value) {\n return this.a4d(encoder, value instanceof RangeItemDTO ? value : THROW_CCE());\n };\n var $serializer_instance_3;\n function $serializer_getInstance_9() {\n if ($serializer_instance_3 == null)\n new $serializer_3();\n return $serializer_instance_3;\n }\n function RangeItemDTO_init_$Init$(seen1, id, description, inherits, parameters, components, serializationConstructorMarker, $this) {\n if (!(0 === (0 & seen1))) {\n throwMissingFieldException(seen1, 0, $serializer_getInstance_9().z4c_1);\n }\n if (0 === (seen1 & 1))\n $this.id = '';\n else\n $this.id = id;\n if (0 === (seen1 & 2))\n $this.description = '';\n else\n $this.description = description;\n if (0 === (seen1 & 4))\n $this.inherits = null;\n else\n $this.inherits = inherits;\n if (0 === (seen1 & 8))\n $this.parameters = null;\n else\n $this.parameters = parameters;\n if (0 === (seen1 & 16))\n $this.components = null;\n else\n $this.components = components;\n return $this;\n }\n function RangeItemDTO_init_$Create$(seen1, id, description, inherits, parameters, components, serializationConstructorMarker) {\n return RangeItemDTO_init_$Init$(seen1, id, description, inherits, parameters, components, serializationConstructorMarker, objectCreate(protoOf(RangeItemDTO)));\n }\n function RangeItemDTO(id, description, inherits, parameters, components) {\n Companion_getInstance_10();\n id = id === VOID ? '' : id;\n description = description === VOID ? '' : description;\n inherits = inherits === VOID ? null : inherits;\n parameters = parameters === VOID ? null : parameters;\n components = components === VOID ? null : components;\n this.id = id;\n this.description = description;\n this.inherits = inherits;\n this.parameters = parameters;\n this.components = components;\n }\n protoOf(RangeItemDTO).s1k = function () {\n return this.id;\n };\n protoOf(RangeItemDTO).u40 = function () {\n return this.description;\n };\n protoOf(RangeItemDTO).p3z = function () {\n return this.inherits;\n };\n protoOf(RangeItemDTO).b4d = function () {\n return this.parameters;\n };\n protoOf(RangeItemDTO).j1m = function () {\n return this.components;\n };\n protoOf(RangeItemDTO).inherit = function (parentItem) {\n var tmp0_safe_receiver = parentItem.components;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.dto.item.RangeItemDTO.inherit.' call\n var tmp0_safe_receiver_0 = this.components;\n var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.inherit(tmp0_safe_receiver);\n tmp = tmp1_elvis_lhs == null ? (new ItemComponentsDTO()).inherit(tmp0_safe_receiver) : tmp1_elvis_lhs;\n }\n var tmp1_elvis_lhs_0 = tmp;\n var newComponents = tmp1_elvis_lhs_0 == null ? this.components : tmp1_elvis_lhs_0;\n var tmp2_safe_receiver = parentItem.parameters;\n var tmp_0;\n if (tmp2_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.range.ipex.range.dto.item.RangeItemDTO.inherit.' call\n var tmp0_safe_receiver_1 = this.parameters;\n var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.inherit(tmp2_safe_receiver);\n tmp_0 = tmp1_elvis_lhs_1 == null ? (new ItemParametersDTO()).inherit(tmp2_safe_receiver) : tmp1_elvis_lhs_1;\n }\n var tmp3_elvis_lhs = tmp_0;\n var newParameters = tmp3_elvis_lhs == null ? this.parameters : tmp3_elvis_lhs;\n return new RangeItemDTO(this.id, this.description, this.inherits, newParameters, newComponents);\n };\n function ItemParser$Companion$jsonParser$lambda($this$Json) {\n $this$Json.f16_1 = true;\n $this$Json.e16_1 = true;\n return Unit_instance;\n }\n function parseCustomComponents($this, item, itemJsonElement, parsers) {\n if (!(parsers == null)) {\n var knownComponentKeys = get_elementNames(Companion_getInstance_8().l17().ok());\n // Inline function 'kotlin.collections.find' call\n var this_0 = get_jsonObject(itemJsonElement).q2();\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.parser.ItemParser.parseCustomComponents.' call\n if (element.t2() === 'components') {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var componentEntries = tmp$ret$1;\n if (componentEntries == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.associate' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_1 = get_jsonObject(componentEntries.u2()).q2();\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator_0 = this_1.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.range.ipex.range.parser.ItemParser.parseCustomComponents..' call\n if (!contains_0(knownComponentKeys, element_0.t2())) {\n destination.q(element_0);\n }\n }\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination, 10)), 16);\n // Inline function 'kotlin.collections.associateTo' call\n var destination_0 = LinkedHashMap_init_$Create$_0(capacity);\n var tmp0_iterator_1 = destination.t();\n while (tmp0_iterator_1.u()) {\n var element_1 = tmp0_iterator_1.w();\n // Inline function 'kotlin.collections.plusAssign' call\n // Inline function 'com.ikea.range.ipex.range.parser.ItemParser.parseCustomComponents..' call\n var pair = to(element_1.t2(), element_1.u2());\n destination_0.r2(pair.ye_1, pair.ze_1);\n }\n var rawCustomComponents = destination_0;\n // Inline function 'kotlin.collections.mapNotNull' call\n // Inline function 'kotlin.collections.mapNotNullTo' call\n var destination_1 = ArrayList_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator_2 = rawCustomComponents.q2().t();\n while (tmp0_iterator_2.u()) {\n var element_2 = tmp0_iterator_2.w();\n // Inline function 'kotlin.collections.mapNotNullTo.' call\n var tmp$ret$14;\n $l$block_1: {\n // Inline function 'com.ikea.range.ipex.range.parser.ItemParser.parseCustomComponents..' call\n // Inline function 'kotlin.collections.component1' call\n var key = element_2.t2();\n // Inline function 'kotlin.collections.component2' call\n var value = element_2.u2();\n var tmp$ret$13;\n $l$block_0: {\n // Inline function 'kotlin.collections.firstNotNullOfOrNull' call\n var tmp0_iterator_3 = parsers.t();\n while (tmp0_iterator_3.u()) {\n var element_3 = tmp0_iterator_3.w();\n // Inline function 'com.ikea.range.ipex.range.parser.ItemParser.parseCustomComponents...' call\n var result = element_3.parse(key, toString(value));\n if (!(result == null)) {\n tmp$ret$13 = result;\n break $l$block_0;\n }\n }\n tmp$ret$13 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$13;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n tmp$ret$14 = null;\n break $l$block_1;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var builder = tmp;\n tmp$ret$14 = to(key, builder);\n }\n var tmp0_safe_receiver = tmp$ret$14;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n destination_1.q(tmp0_safe_receiver);\n }\n }\n var customComponents = toMap(destination_1);\n var tmp0_safe_receiver_0 = item.components;\n var tmp_0;\n if (tmp0_safe_receiver_0 == null) {\n tmp_0 = Unit_instance;\n } else {\n tmp0_safe_receiver_0.customComponents = customComponents;\n tmp_0 = Unit_instance;\n }\n }\n }\n }\n function Companion_6() {\n Companion_instance_7 = this;\n var tmp = this;\n tmp.jsonParser = Json(VOID, ItemParser$Companion$jsonParser$lambda);\n }\n protoOf(Companion_6).q3y = function () {\n return this.jsonParser;\n };\n var Companion_instance_7;\n function Companion_getInstance_11() {\n if (Companion_instance_7 == null)\n new Companion_6();\n return Companion_instance_7;\n }\n function ItemParser() {\n Companion_getInstance_11();\n }\n protoOf(ItemParser).c4d = function (itemJson, parsers) {\n var item = Companion_getInstance_11().jsonParser.j15(Companion_getInstance_10().l17(), itemJson);\n parseCustomComponents(this, item, Companion_getInstance_11().jsonParser.m15(itemJson), parsers);\n return item;\n };\n protoOf(ItemParser).parseItem = function (itemJson, parsers, $super) {\n parsers = parsers === VOID ? null : parsers;\n return this.c4d(itemJson, parsers);\n };\n protoOf(ItemParser).d4d = function (itemsJson, parsers) {\n try {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = get_jsonArray(Companion_getInstance_11().jsonParser.m15(itemsJson));\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.range.ipex.range.parser.ItemParser.parseItems.' call\n var item_0 = Companion_getInstance_11().jsonParser.j15(Companion_getInstance_10().l17(), toString(item));\n parseCustomComponents(this, item_0, item, parsers);\n destination.q(item_0);\n }\n return copyToArray(destination);\n } catch ($p) {\n if ($p instanceof Error_0) {\n var e = $p;\n // Inline function 'kotlin.error' call\n var message = toString_1(e.message);\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n throw $p;\n }\n }\n };\n protoOf(ItemParser).parseItems = function (itemsJson, parsers, $super) {\n parsers = parsers === VOID ? null : parsers;\n return this.d4d(itemsJson, parsers);\n };\n //region block: post-declaration\n protoOf(IPEXRangeFormatCatalog).createCustomAssembly = createCustomAssembly;\n protoOf(IPEXRangeFormatCatalog).createCustomAssemblySpecification = createCustomAssemblySpecification;\n defineProp(protoOf(IPEXRangeFormatCatalog), 'thisClassIsGuaranteedToNotModifyOrQueryCoreState', function () {\n return this.a1m();\n });\n protoOf($serializer).sv = typeParametersSerializers;\n protoOf($serializer_0).sv = typeParametersSerializers;\n protoOf($serializer_1).sv = typeParametersSerializers;\n protoOf($serializer_2).sv = typeParametersSerializers;\n protoOf($serializer_3).sv = typeParametersSerializers;\n //endregion\n //region block: init\n Companion_instance_3 = new Companion_2();\n //endregion\n //region block: exports\n function $jsExportAll$(_) {\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n $com$ikea$range$ipex$range$builder.ComponentsCommonData = ComponentsCommonData;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n $com$ikea$range$ipex$range$builder.ProductSpecificationBuilder = ProductSpecificationBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.AllowedDoorPairsComponentBuilder = AllowedDoorPairsComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.AssemblyComponentsBuilder = AssemblyComponentsBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.AutoAdaptGuestComponentBuilder = AutoAdaptGuestComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.AutoAdaptHostComponentBuilder = AutoAdaptHostComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.BooleanComponentBuilder = BooleanComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.ColliderShapeComponentBuilder = ColliderShapeComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.ConnectorsComponentBuilder = ConnectorsComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.DragProjectionPointComponentBuilder = DragProjectionPointComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.DragSurfacesComponentBuilder = DragSurfacesComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.FunctionalMarginShapeComponentBuilder = FunctionalMarginShapeComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.FunctionalZonesLocalComponentBuilder = FunctionalZonesLocalComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.LightComponentBuilder = LightComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.MetaDataComponentBuilder = MetaDataComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.ModelInfoComponentBuilder = ModelInfoComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.ModelTransformComponentBuilder = ModelTransformComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.PlacementZoneByHeightComponentBuilder = PlacementZoneByHeightComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.ProductStructureComponentBuilder = ProductStructureComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.ProppingComponentBuilder = ProppingComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.RecommendedInitialPositionFromFloorComponentBuilder = RecommendedInitialPositionFromFloorComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.RelativeConnectorsComponentBuilder = RelativeConnectorsComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.RequiredComponentsBuilder = RequiredComponentsBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$builder = $com$ikea$range$ipex$range.builder || ($com$ikea$range$ipex$range.builder = {});\n var $com$ikea$range$ipex$range$builder$component = $com$ikea$range$ipex$range$builder.component || ($com$ikea$range$ipex$range$builder.component = {});\n $com$ikea$range$ipex$range$builder$component.VisualLightSourceComponentBuilder = VisualLightSourceComponentBuilder;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$catalog = $com$ikea$range$ipex$range.catalog || ($com$ikea$range$ipex$range.catalog = {});\n $com$ikea$range$ipex$range$catalog.AmendableCatalog = AmendableCatalog;\n defineProp($com$ikea$range$ipex$range$catalog.AmendableCatalog, 'Companion', Companion_getInstance_4);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$catalog = $com$ikea$range$ipex$range.catalog || ($com$ikea$range$ipex$range.catalog = {});\n $com$ikea$range$ipex$range$catalog.IPEXRangeFormatCatalog = IPEXRangeFormatCatalog;\n defineProp($com$ikea$range$ipex$range$catalog.IPEXRangeFormatCatalog, 'Companion', Companion_getInstance_5);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$catalog = $com$ikea$range$ipex$range.catalog || ($com$ikea$range$ipex$range.catalog = {});\n $com$ikea$range$ipex$range$catalog.InheritanceResolver = InheritanceResolver;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$catalog = $com$ikea$range$ipex$range.catalog || ($com$ikea$range$ipex$range.catalog = {});\n $com$ikea$range$ipex$range$catalog.ItemRepository = ItemRepository;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$catalog = $com$ikea$range$ipex$range.catalog || ($com$ikea$range$ipex$range.catalog = {});\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$dto = $com$ikea$range$ipex$range.dto || ($com$ikea$range$ipex$range.dto = {});\n var $com$ikea$range$ipex$range$dto$component = $com$ikea$range$ipex$range$dto.component || ($com$ikea$range$ipex$range$dto.component = {});\n $com$ikea$range$ipex$range$dto$component.AssemblyChildDTO = AssemblyChildDTO;\n defineProp($com$ikea$range$ipex$range$dto$component.AssemblyChildDTO, 'Companion', Companion_getInstance_6);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$dto = $com$ikea$range$ipex$range.dto || ($com$ikea$range$ipex$range.dto = {});\n var $com$ikea$range$ipex$range$dto$component = $com$ikea$range$ipex$range$dto.component || ($com$ikea$range$ipex$range$dto.component = {});\n $com$ikea$range$ipex$range$dto$component.ColliderDTO = ColliderDTO;\n defineProp($com$ikea$range$ipex$range$dto$component.ColliderDTO, 'Companion', Companion_getInstance_7);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$dto = $com$ikea$range$ipex$range.dto || ($com$ikea$range$ipex$range.dto = {});\n var $com$ikea$range$ipex$range$dto$component = $com$ikea$range$ipex$range$dto.component || ($com$ikea$range$ipex$range$dto.component = {});\n $com$ikea$range$ipex$range$dto$component.ProductDTO = ProductDTO;\n defineProp($com$ikea$range$ipex$range$dto$component.ProductDTO, 'CustomSerializer', CustomSerializer_getInstance_2);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$dto = $com$ikea$range$ipex$range.dto || ($com$ikea$range$ipex$range.dto = {});\n var $com$ikea$range$ipex$range$dto$item = $com$ikea$range$ipex$range$dto.item || ($com$ikea$range$ipex$range$dto.item = {});\n $com$ikea$range$ipex$range$dto$item.ItemComponentsDTO = ItemComponentsDTO;\n defineProp($com$ikea$range$ipex$range$dto$item.ItemComponentsDTO, 'Companion', Companion_getInstance_8);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$dto = $com$ikea$range$ipex$range.dto || ($com$ikea$range$ipex$range.dto = {});\n var $com$ikea$range$ipex$range$dto$item = $com$ikea$range$ipex$range$dto.item || ($com$ikea$range$ipex$range$dto.item = {});\n $com$ikea$range$ipex$range$dto$item.ItemParametersDTO = ItemParametersDTO;\n defineProp($com$ikea$range$ipex$range$dto$item.ItemParametersDTO, 'Companion', Companion_getInstance_9);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$dto = $com$ikea$range$ipex$range.dto || ($com$ikea$range$ipex$range.dto = {});\n var $com$ikea$range$ipex$range$dto$item = $com$ikea$range$ipex$range$dto.item || ($com$ikea$range$ipex$range$dto.item = {});\n $com$ikea$range$ipex$range$dto$item.RangeItemDTO = RangeItemDTO;\n defineProp($com$ikea$range$ipex$range$dto$item.RangeItemDTO, 'Companion', Companion_getInstance_10);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$range = $com$ikea.range || ($com$ikea.range = {});\n var $com$ikea$range$ipex = $com$ikea$range.ipex || ($com$ikea$range.ipex = {});\n var $com$ikea$range$ipex$range = $com$ikea$range$ipex.range || ($com$ikea$range$ipex.range = {});\n var $com$ikea$range$ipex$range$parser = $com$ikea$range$ipex$range.parser || ($com$ikea$range$ipex$range.parser = {});\n $com$ikea$range$ipex$range$parser.ItemParser = ItemParser;\n defineProp($com$ikea$range$ipex$range$parser.ItemParser, 'Companion', Companion_getInstance_11);\n }\n $jsExportAll$(_);\n _.$jsExportAll$ = $jsExportAll$;\n _.$_$ = _.$_$ || {};\n _.$_$.a = StaticComponentBuilder;\n _.$_$.b = AmendableCatalog;\n _.$_$.c = IPEXRangeFormatCatalog;\n _.$_$.d = RangeItemDTO;\n //endregion\n return _;\n}));\n\n//# sourceMappingURL=ipex-range-format.js.map\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd)\n define(['exports', './kotlin-kotlin-stdlib.js', './core-core-api.js'], factory);\n else if (typeof exports === 'object')\n factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./core-core-api.js'));\n else {\n if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-kernel'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'core-core-kernel'.\");\n }\n if (typeof this['core-core-api'] === 'undefined') {\n throw new Error(\"Error loading module 'core-core-kernel'. Its dependency 'core-core-api' was not found. Please, check whether 'core-core-api' is loaded prior to 'core-core-kernel'.\");\n }\n root['core-core-kernel'] = factory(typeof this['core-core-kernel'] === 'undefined' ? {} : this['core-core-kernel'], this['kotlin-kotlin-stdlib'], this['core-core-api']);\n }\n}(this, function (_, kotlin_kotlin, kotlin_core_core_api) {\n 'use strict';\n //region block: imports\n var protoOf = kotlin_kotlin.$_$.u9;\n var CoreFactory = kotlin_core_core_api.$_$.a;\n var classMeta = kotlin_kotlin.$_$.q8;\n var setMetadataFor = kotlin_kotlin.$_$.v9;\n var VOID = kotlin_kotlin.$_$.e;\n var EntityManagerImpl = kotlin_core_core_api.$_$.y2;\n var HierarchySystem = kotlin_core_core_api.$_$.l3;\n var ComponentDeserializerRegistry = kotlin_core_core_api.$_$.h6;\n var JsonSerializer = kotlin_core_core_api.$_$.k6;\n var SnapshotService = kotlin_core_core_api.$_$.f7;\n var CoreServices = kotlin_core_core_api.$_$.c;\n var TransformSystem = kotlin_core_core_api.$_$.h7;\n var WorldColliderUpdateSystem = kotlin_core_core_api.$_$.b1;\n var WorldDragSurfaceUpdateSystem = kotlin_core_core_api.$_$.t2;\n var RenderSystem = kotlin_core_core_api.$_$.r5;\n var ConnectionParentingSystem = kotlin_core_core_api.$_$.k3;\n var UpdateHostConnectionsSystem = kotlin_core_core_api.$_$.o1;\n var SceneGraphSystem = kotlin_core_core_api.$_$.n3;\n var DisableConnectorsSystem = kotlin_core_core_api.$_$.w1;\n var ViewerObjectTransformSystem = kotlin_core_core_api.$_$.v5;\n var ViewerPresenceSystem = kotlin_core_core_api.$_$.x5;\n var ViewerObjectVisibilitySystem = kotlin_core_core_api.$_$.w5;\n var CollisionValidation = kotlin_core_core_api.$_$.a1;\n var Unit_instance = kotlin_kotlin.$_$.x3;\n var LoggerImpl = kotlin_core_core_api.$_$.p4;\n var LoggerState_getInstance = kotlin_core_core_api.$_$.fb;\n var setLogModule = kotlin_core_core_api.$_$.q8;\n var LogLevel_DEBUG_getInstance = kotlin_core_core_api.$_$.a8;\n var LogLevel_INFO_getInstance = kotlin_core_core_api.$_$.c8;\n var LogLevel_WARN_getInstance = kotlin_core_core_api.$_$.d8;\n var LogLevel_ERROR_getInstance = kotlin_core_core_api.$_$.b8;\n var HistoryImpl = kotlin_core_core_api.$_$.l4;\n var addHistoryModule = kotlin_core_core_api.$_$.p8;\n var ViewerComponent = kotlin_core_core_api.$_$.s5;\n var ComponentIds_instance = kotlin_core_core_api.$_$.w9;\n var getCoreVersion = kotlin_core_core_api.$_$.p7;\n var defineProp = kotlin_kotlin.$_$.s8;\n var Core = kotlin_core_core_api.$_$.d;\n var CoreModules = kotlin_core_core_api.$_$.b;\n var asSequence = kotlin_kotlin.$_$.t4;\n var mapNotNull = kotlin_kotlin.$_$.ya;\n var firstOrNull = kotlin_kotlin.$_$.va;\n var ProductComponent = kotlin_core_core_api.$_$.q;\n var SnapRootComponent = kotlin_core_core_api.$_$.z6;\n var get_isConnectionRoot = kotlin_core_core_api.$_$.t1;\n var RelativeConnectorRepositioner_instance = kotlin_core_core_api.$_$.ja;\n var Companion_instance = kotlin_core_core_api.$_$.l9;\n var Companion_getInstance = kotlin_core_core_api.$_$.k9;\n var Companion_instance_0 = kotlin_core_core_api.$_$.j9;\n var Companion_instance_1 = kotlin_core_core_api.$_$.i9;\n var AssemblyPart = kotlin_core_core_api.$_$.h;\n var Companion_instance_2 = kotlin_core_core_api.$_$.q9;\n var Companion_getInstance_0 = kotlin_core_core_api.$_$.p9;\n var equals = kotlin_kotlin.$_$.t8;\n var objectMeta = kotlin_kotlin.$_$.t9;\n var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;\n var copyToArray = kotlin_kotlin.$_$.l5;\n var toString = kotlin_kotlin.$_$.z9;\n var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.f1;\n var createEntity = kotlin_core_core_api.$_$.s8;\n var ChildComponent = kotlin_core_core_api.$_$.j3;\n var createEntityInternal = kotlin_core_core_api.$_$.r8;\n var get_productRef = kotlin_core_core_api.$_$.w;\n var createFromSpecification = kotlin_core_core_api.$_$.u8;\n var createFromSpecificationInternal = kotlin_core_core_api.$_$.t8;\n var ProductManager = kotlin_core_core_api.$_$.r;\n var repeat = kotlin_kotlin.$_$.rb;\n var SystemBase2 = kotlin_core_core_api.$_$.a3;\n var InSceneComponent_instance = kotlin_core_core_api.$_$.ab;\n var Companion_instance_3 = kotlin_core_core_api.$_$.xc;\n var hashCode = kotlin_kotlin.$_$.a9;\n var THROW_CCE = kotlin_kotlin.$_$.ad;\n var get_serializable = kotlin_core_core_api.$_$.w2;\n var Component = kotlin_core_core_api.$_$.x2;\n var DisplayNameComponent = kotlin_core_core_api.$_$.e5;\n var ParentComponent = kotlin_core_core_api.$_$.m3;\n var StaticComponent_getInstance = kotlin_core_core_api.$_$.wa;\n var first = kotlin_kotlin.$_$.w5;\n var HierarchyUtils_instance = kotlin_core_core_api.$_$.za;\n var SceneComponent_instance = kotlin_core_core_api.$_$.bb;\n var get_children = kotlin_core_core_api.$_$.p3;\n var get_parentComponent = kotlin_core_core_api.$_$.g4;\n var get_hierarchy = kotlin_core_core_api.$_$.x3;\n var SceneReloadingComponent_instance = kotlin_core_core_api.$_$.nc;\n var SceneManager = kotlin_core_core_api.$_$.o3;\n var firstOrNull_0 = kotlin_kotlin.$_$.u5;\n var Companion_instance_4 = kotlin_core_core_api.$_$.o9;\n var first_0 = kotlin_kotlin.$_$.v5;\n var get_parent = kotlin_core_core_api.$_$.f4;\n var get_descendants = kotlin_core_core_api.$_$.q3;\n var Companion_getInstance_1 = kotlin_core_core_api.$_$.ad;\n var Companion_getInstance_2 = kotlin_core_core_api.$_$.dd;\n var Companion_getInstance_3 = kotlin_core_core_api.$_$.ta;\n var Companion_getInstance_4 = kotlin_core_core_api.$_$.va;\n var Companion_getInstance_5 = kotlin_core_core_api.$_$.m9;\n var Companion_getInstance_6 = kotlin_core_core_api.$_$.oc;\n var to = kotlin_kotlin.$_$.be;\n var mapOf = kotlin_kotlin.$_$.s6;\n var ComponentDeserializer = kotlin_core_core_api.$_$.i6;\n var collectionSizeOrDefault = kotlin_kotlin.$_$.v4;\n var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.g;\n var checkIndexOverflow = kotlin_kotlin.$_$.u4;\n var lazy = kotlin_kotlin.$_$.wd;\n var ValidationResultType_FAIL_getInstance = kotlin_core_core_api.$_$.n8;\n var filterNotNull = kotlin_kotlin.$_$.s5;\n var KProperty0 = kotlin_kotlin.$_$.ma;\n var THROW_ISE = kotlin_kotlin.$_$.cd;\n var getLocalDelegateReference = kotlin_kotlin.$_$.w8;\n var toMutableList = kotlin_kotlin.$_$.y7;\n var minus = kotlin_kotlin.$_$.t6;\n var validateSnap = kotlin_core_core_api.$_$.a9;\n var toList = kotlin_kotlin.$_$.v7;\n var addAll = kotlin_kotlin.$_$.m4;\n var validateSnaps = kotlin_core_core_api.$_$.z8;\n var validateCurrentState = kotlin_core_core_api.$_$.y8;\n var ValidSnapActionCandidateOrErrors = kotlin_core_core_api.$_$.s7;\n var ValidationResultType_WARNING_getInstance = kotlin_core_core_api.$_$.o8;\n var ensureNotNull = kotlin_kotlin.$_$.qd;\n var lastOrNull = kotlin_kotlin.$_$.k6;\n var getFirstValidSnapAction = kotlin_core_core_api.$_$.x8;\n var evaluateSnapCandidate = kotlin_core_core_api.$_$.w8;\n var evaluateSnapCandidates = kotlin_core_core_api.$_$.v8;\n var ValidationService = kotlin_core_core_api.$_$.x7;\n var Companion_getInstance_7 = kotlin_core_core_api.$_$.tb;\n var ClickEventComponent = kotlin_core_core_api.$_$.e6;\n //endregion\n //region block: pre-declaration\n setMetadataFor(CoreFactoryImpl, 'CoreFactoryImpl', classMeta, VOID, [CoreFactory], CoreFactoryImpl);\n setMetadataFor(CoreImpl, 'CoreImpl', classMeta, VOID, [Core], CoreImpl);\n setMetadataFor(CoreModulesImpl, 'CoreModulesImpl', classMeta, VOID, [CoreModules]);\n setMetadataFor(Companion, 'Companion', objectMeta);\n setMetadataFor(ProductManagerImpl, 'ProductManagerImpl', classMeta, VOID, [ProductManager]);\n setMetadataFor(Companion_0, 'Companion', objectMeta);\n setMetadataFor(SystemGraphViewer, 'SystemGraphViewer', classMeta);\n setMetadataFor(Companion_1, 'Companion', objectMeta);\n setMetadataFor(SceneManagerCacheClearingSystem, 'SceneManagerCacheClearingSystem', classMeta, SystemBase2);\n setMetadataFor(Companion_2, 'Companion', objectMeta);\n setMetadataFor(SceneManagerCacheComponent, 'SceneManagerCacheComponent', classMeta, VOID, [Component]);\n setMetadataFor(SceneManagerEntitiesCache, 'SceneManagerEntitiesCache', classMeta);\n setMetadataFor(Companion_3, 'Companion', objectMeta);\n setMetadataFor(SceneManagerImpl, 'SceneManagerImpl', classMeta, VOID, [SceneManager]);\n setMetadataFor(SceneSerializationUtil, 'SceneSerializationUtil', objectMeta);\n setMetadataFor(CoreComponentDeserializer, 'CoreComponentDeserializer', classMeta, VOID, [ComponentDeserializer], CoreComponentDeserializer);\n setMetadataFor(ValidationServiceImpl, 'ValidationServiceImpl', classMeta, VOID, [ValidationService], ValidationServiceImpl);\n //endregion\n function CoreFactoryImpl() {\n }\n protoOf(CoreFactoryImpl).createNewCoreInstance = function () {\n return new CoreImpl();\n };\n function CoreImpl$lambda($sceneManager) {\n return function () {\n return $sceneManager.scene;\n };\n }\n function CoreImpl(initialSceneManager, validationService, entityManager) {\n initialSceneManager = initialSceneManager === VOID ? null : initialSceneManager;\n validationService = validationService === VOID ? new ValidationServiceImpl() : validationService;\n entityManager = entityManager === VOID ? new EntityManagerImpl() : entityManager;\n entityManager.registerSystem(new HierarchySystem(entityManager));\n var sceneManager = initialSceneManager == null ? new SceneManagerImpl(entityManager) : initialSceneManager;\n this.h2u_1 = new CoreModulesImpl(sceneManager);\n var componentSerializationRegistry = new ComponentDeserializerRegistry();\n var productManager = new ProductManagerImpl(entityManager, CoreImpl$lambda(sceneManager));\n var serializer = new JsonSerializer(productManager);\n var coreFactory = new CoreFactoryImpl();\n var snapshotService = new SnapshotService(entityManager, sceneManager);\n this.g2u_1 = new CoreServices(this.modules, entityManager, sceneManager, componentSerializationRegistry, validationService, serializer, productManager, snapshotService, coreFactory);\n entityManager.registerSystem(new TransformSystem());\n entityManager.registerSystem(new WorldColliderUpdateSystem());\n entityManager.registerSystem(new WorldDragSurfaceUpdateSystem());\n entityManager.registerSystem(new RenderSystem());\n entityManager.registerSystem(new ConnectionParentingSystem());\n entityManager.registerSystem(new UpdateHostConnectionsSystem());\n entityManager.registerSystem(new SceneGraphSystem(sceneManager));\n entityManager.registerSystem(new DisableConnectorsSystem());\n this.g2u_1.componentDeserializerRegistry.register(new CoreComponentDeserializer());\n entityManager.registerSystem(new ViewerObjectTransformSystem());\n entityManager.registerSystem(new ViewerPresenceSystem(entityManager));\n entityManager.registerSystem(new ViewerObjectVisibilitySystem());\n this.addValidation(new CollisionValidation());\n }\n protoOf(CoreImpl).m1i = function () {\n return this.g2u_1;\n };\n protoOf(CoreImpl).n1i = function () {\n return this.h2u_1;\n };\n protoOf(CoreImpl).addValidation = function (validation) {\n this.g2u_1.validations.register(validation);\n };\n protoOf(CoreImpl).removeValidation = function (validation) {\n this.g2u_1.validations.unregister(validation);\n };\n protoOf(CoreImpl).getValidations = function () {\n return this.g2u_1.validations.validations;\n };\n protoOf(CoreImpl).k1i = function (logger, basePackageName) {\n var nonNullLogger = logger == null ? new LoggerImpl() : logger;\n var tmp = LoggerState_getInstance();\n tmp.k2b(nonNullLogger, basePackageName == null ? '' : basePackageName);\n };\n protoOf(CoreImpl).setLogLevel = function (level) {\n // Inline function 'kotlin.text.uppercase' call\n // Inline function 'kotlin.js.asDynamic' call\n switch (level.toUpperCase()) {\n case 'DEBUG':\n LoggerState_getInstance().j2b(LogLevel_DEBUG_getInstance());\n break;\n case 'INFO':\n LoggerState_getInstance().j2b(LogLevel_INFO_getInstance());\n break;\n case 'WARN':\n LoggerState_getInstance().j2b(LogLevel_WARN_getInstance());\n break;\n case 'ERROR':\n LoggerState_getInstance().j2b(LogLevel_ERROR_getInstance());\n break;\n default:\n LoggerState_getInstance().j2b(LogLevel_INFO_getInstance());\n break;\n }\n };\n protoOf(CoreImpl).l1i = function (history, historySize) {\n var nonNullHistory = history == null ? new HistoryImpl(this.g2u_1.entityManager, this.g2u_1.snapshotService, historySize) : history;\n this.h2u_1.setHistory(nonNullHistory);\n return nonNullHistory;\n };\n protoOf(CoreImpl).setViewer = function (viewer) {\n var sceneRoot = this.g2u_1.sceneManager.root;\n if (viewer == null) {\n this.g2u_1.entityManager.removeComponent(sceneRoot, 82);\n } else {\n this.g2u_1.entityManager.addComponent(sceneRoot, new ViewerComponent(viewer));\n }\n };\n protoOf(CoreImpl).version = function () {\n return getCoreVersion();\n };\n function CoreModulesImpl(sceneManager) {\n this.sceneManager = sceneManager;\n this.i2u_1 = null;\n }\n protoOf(CoreModulesImpl).q1i = function () {\n return this.sceneManager;\n };\n protoOf(CoreModulesImpl).history = function () {\n return this.i2u_1;\n };\n protoOf(CoreModulesImpl).viewer = function () {\n var tmp0_safe_receiver = this.sceneManager;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.root;\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n tmp = tmp1_safe_receiver.__getComponentForKotlin(82);\n }\n var tmp2_safe_receiver = tmp;\n return tmp2_safe_receiver == null ? null : tmp2_safe_receiver.viewer;\n };\n protoOf(CoreModulesImpl).setHistory = function (history) {\n this.i2u_1 = history;\n };\n function findProductSpecification($this, productRef) {\n var tmp = asSequence($this.catalogs);\n return firstOrNull(mapNotNull(tmp, ProductManagerImpl$findProductSpecification$lambda(productRef)));\n }\n function createEntityFromSpecification($this, specification, productRef, entityId) {\n var entity = entityId == null ? $this.j2u_1.createEntity() : $this.j2u_1.createEntityInternal(entityId);\n $this.j2u_1.addComponent(entity, new ProductComponent(productRef));\n addComponents($this, entity, specification.components);\n if (get_isConnectionRoot(entity)) {\n addComponent($this, entity, new SnapRootComponent());\n }\n buildAssembly($this, specification, entity, productRef);\n var newRoot = buildHierarchy($this, specification, entity);\n if (!(newRoot == null)) {\n RelativeConnectorRepositioner_instance.repositionRelativeConnectorsFromBounds(newRoot);\n }\n return newRoot;\n }\n function createEntityFromSpecification$default($this, specification, productRef, entityId, $super) {\n entityId = entityId === VOID ? null : entityId;\n return createEntityFromSpecification($this, specification, productRef, entityId);\n }\n function buildAssembly($this, specification, entity, productRef) {\n var structure = specification._findComponentKt(12);\n Companion_getInstance();\n var parts = specification._findComponentKt(43);\n var assemblyEntityIds = specification._findComponentKt(96);\n if (structure == null ? true : parts == null) {\n return Unit_instance;\n }\n addComponent($this, entity, structure);\n Companion_getInstance();\n entity.removeComponent(43);\n Companion_instance_1.buildAssembly(entity, new AssemblyPart(productRef, VOID, VOID, structure.parts), parts.i1l_1, $this, $this.j2u_1, assemblyEntityIds);\n }\n function buildHierarchy($this, specification, entity) {\n var tmp0_elvis_lhs = specification._findComponentKt(Companion_instance_2.id);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return entity;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var structure = tmp;\n var newRoot = Companion_getInstance_0().buildProductStructure(structure, $this, $this.j2u_1);\n if (!equals(newRoot, entity)) {\n $this.j2u_1.disposeEntity(entity);\n }\n return newRoot;\n }\n function addComponent($this, entity, component) {\n if (component == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.catalog.ProductManagerImpl.addComponent.' call\n $this.j2u_1.addComponent(entity, component);\n }\n }\n function addComponents($this, entity, components) {\n if (components == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = components.length;\n while (inductionVariable < last) {\n var element = components[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.catalog.ProductManagerImpl.addComponents.' call\n $this.j2u_1.addComponent(entity, element);\n }\n }\n }\n function Companion() {\n Companion_instance_5 = this;\n this.logger = LoggerState_getInstance().m1m('ProductManagerImpl');\n }\n protoOf(Companion).x1i = function () {\n return this.logger;\n };\n var Companion_instance_5;\n function Companion_getInstance_8() {\n if (Companion_instance_5 == null)\n new Companion();\n return Companion_instance_5;\n }\n function ProductManagerImpl$createEntityInternal$lambda($productRef, this$0) {\n return function () {\n return 'Product ' + $productRef + ' not recognized by any catalog. Catalogs: ' + this$0.catalogs;\n };\n }\n function ProductManagerImpl$findProductSpecification$lambda($productRef) {\n return function (catalog) {\n return catalog.productSpecification($productRef);\n };\n }\n function ProductManagerImpl(entityManager, _defaultParent) {\n Companion_getInstance_8();\n this.j2u_1 = entityManager;\n this.k2u_1 = _defaultParent;\n var tmp = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp.l2u_1 = ArrayList_init_$Create$();\n var tmp_0 = this;\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp_0.m2u_1 = ArrayList_init_$Create$();\n }\n protoOf(ProductManagerImpl).d1m = function () {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.l2u_1;\n return copyToArray(this_0);\n };\n protoOf(ProductManagerImpl).defaultParent = function () {\n return this.k2u_1();\n };\n protoOf(ProductManagerImpl).addCatalog = function (catalog) {\n if (!catalog.thisClassIsGuaranteedToNotModifyOrQueryCoreState) {\n // Inline function 'kotlin.error' call\n var message = \"You haven't read and accepted the class documentation for ProductCatalog for catalog with id: \" + catalog.rangeId();\n throw IllegalStateException_init_$Create$(toString(message));\n }\n this.l2u_1.w1(0, catalog);\n };\n protoOf(ProductManagerImpl).removeCatalog = function (catalog) {\n this.l2u_1.r(catalog);\n };\n protoOf(ProductManagerImpl).e1m = function (productRef, entityId, parent) {\n var entity = this.createEntityInternal(productRef, entityId, parent);\n if (entity == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_iterator = this.m2u_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.catalog.ProductManagerImpl.createEntity..' call\n element(entity, productRef);\n }\n }\n return entity;\n };\n protoOf(ProductManagerImpl).f1m = function (productRef, entityId, parent) {\n var specification = findProductSpecification(this, productRef);\n if (specification == null) {\n var tmp = Companion_getInstance_8().logger;\n tmp.warn(ProductManagerImpl$createEntityInternal$lambda(productRef, this));\n return null;\n }\n var entity = createEntityFromSpecification(this, specification, productRef, entityId);\n if (!(entity == null) ? !(parent == null) : false) {\n entity.addComponent(new ChildComponent(parent));\n }\n return entity;\n };\n protoOf(ProductManagerImpl).notifyCreatedListeners = function (entity) {\n var tmp0_safe_receiver = get_productRef(entity);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_iterator = this.m2u_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.catalog.ProductManagerImpl.notifyCreatedListeners..' call\n element(entity, tmp0_safe_receiver);\n }\n }\n };\n protoOf(ProductManagerImpl).subscribeProductCreated = function (callback) {\n this.m2u_1.q(callback);\n };\n protoOf(ProductManagerImpl).unsubscribeProductCreated = function (callback) {\n this.m2u_1.r(callback);\n };\n protoOf(ProductManagerImpl).productSpecification = function (productRef) {\n return findProductSpecification(this, productRef);\n };\n protoOf(ProductManagerImpl).g1m = function (productRef, specification, entityId) {\n var entity = this.createFromSpecificationInternal(productRef, specification, entityId);\n if (entity == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var tmp0_iterator = this.m2u_1.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.catalog.ProductManagerImpl.createFromSpecification..' call\n element(entity, productRef);\n }\n }\n return entity;\n };\n protoOf(ProductManagerImpl).h1m = function (productRef, specification, entityId) {\n return createEntityFromSpecification(this, specification, productRef, entityId);\n };\n function printMe($this, listener, depth) {\n var indent = repeat(' ', depth);\n if (depth > 20) {\n var tmp = Companion_getInstance_9().n2u_1;\n tmp.info(SystemGraphViewer$printMe$lambda(indent));\n } else {\n printMe$innerPrint(indent, listener, listener.componentId);\n var tmp0_safe_receiver = listener.ownerSystem;\n printMe$traverseOuter($this, listener, depth, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.doingChangesOnComponent);\n }\n }\n function Companion_0() {\n Companion_instance_6 = this;\n this.n2u_1 = LoggerState_getInstance().m1m('SystemGraphViewer');\n }\n var Companion_instance_6;\n function Companion_getInstance_9() {\n if (Companion_instance_6 == null)\n new Companion_0();\n return Companion_instance_6;\n }\n function printMe$innerPrint(indent, $listener, listeningOn) {\n var s = {_v: ''};\n var tmp = s._v;\n var tmp0_safe_receiver = $listener.ownerSystem;\n s._v = tmp + (indent + (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.id) + ' (' + ComponentIds_instance.debugToString(listeningOn) + ') ');\n var tmp1_safe_receiver = $listener.ownerSystem;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.systemsBeforeMe;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = tmp2_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp2_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.entity.SystemGraphViewer.printMe.innerPrint.' call\n s._v = s._v + (' beforeme: ' + element);\n }\n }\n var tmp3_safe_receiver = $listener.ownerSystem;\n var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.systemsAfterMe;\n if (tmp4_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_0 = 0;\n var last_0 = tmp4_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = tmp4_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.entity.SystemGraphViewer.printMe.innerPrint.' call\n s._v = s._v + (' afterme: ' + element_0);\n }\n }\n var tmp_0 = Companion_getInstance_9().n2u_1;\n tmp_0.info(SystemGraphViewer$printMe$innerPrint$lambda(s));\n }\n function printMe$traverseOuter(this$0, $listener, $depth, outgoingComponents) {\n if (outgoingComponents == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = outgoingComponents.length;\n while (inductionVariable < last) {\n var element = outgoingComponents[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.entity.SystemGraphViewer.printMe.traverseOuter.' call\n var tmp0_safe_receiver = this$0.o2u_1.allListeners().b3(element);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable_0 = 0;\n var last_0 = tmp0_safe_receiver.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = tmp0_safe_receiver[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.entity.SystemGraphViewer.printMe.traverseOuter...' call\n var tmp0_safe_receiver_0 = element_0.ownerSystem;\n var tmp = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.id;\n var tmp1_safe_receiver = $listener.ownerSystem;\n if (!(tmp == (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.id))) {\n printMe(this$0, element_0, $depth + 4 | 0);\n }\n }\n }\n }\n }\n }\n function SystemGraphViewer$printFor$lambda($componentId) {\n return function () {\n return 'No systems are listening for ' + $componentId;\n };\n }\n function SystemGraphViewer$printMe$lambda($indent) {\n return function () {\n return $indent + ' stopping here. Too deep';\n };\n }\n function SystemGraphViewer$printMe$innerPrint$lambda($s) {\n return function () {\n return $s._v;\n };\n }\n function SystemGraphViewer(em) {\n Companion_getInstance_9();\n this.o2u_1 = em;\n }\n protoOf(SystemGraphViewer).printFor = function (componentId) {\n var all = this.o2u_1.allListeners();\n var base = all.b3(componentId);\n var tmp;\n if (base == null) {\n tmp = true;\n } else {\n // Inline function 'kotlin.collections.isEmpty' call\n tmp = base.length === 0;\n }\n if (tmp) {\n var tmp_0 = Companion_getInstance_9().n2u_1;\n tmp_0.info(SystemGraphViewer$printFor$lambda(componentId));\n } else {\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = base.length;\n while (inductionVariable < last) {\n var element = base[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.entity.SystemGraphViewer.printFor.' call\n printMe(this, element, 0);\n }\n }\n };\n function Companion_1() {\n this.ID = 'SceneManagerCacheSystem';\n }\n protoOf(Companion_1).u1n = function () {\n return this.ID;\n };\n var Companion_instance_7;\n function Companion_getInstance_10() {\n return Companion_instance_7;\n }\n function SceneManagerCacheClearingSystem(clearCallback) {\n var tmp = InSceneComponent_instance.id;\n SystemBase2.call(this, 'SceneManagerCacheSystem', tmp, 123);\n this.x2u_1 = clearCallback;\n }\n protoOf(SceneManagerCacheClearingSystem).onAddComponent = function (entity, newComponent) {\n this.x2u_1();\n };\n protoOf(SceneManagerCacheClearingSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n };\n protoOf(SceneManagerCacheClearingSystem).onRemoveComponent = function (entity, oldComponent) {\n this.x2u_1();\n };\n protoOf(SceneManagerCacheClearingSystem).onAddComponent2 = function (entity, newComponent) {\n this.x2u_1();\n };\n protoOf(SceneManagerCacheClearingSystem).onUpdateComponent2 = function (entity, oldComponent, newComponent) {\n };\n protoOf(SceneManagerCacheClearingSystem).onRemoveComponent2 = function (entity, oldComponent) {\n };\n function Companion_2() {\n }\n protoOf(Companion_2).s1k = function () {\n return 117;\n };\n var Companion_instance_8;\n function Companion_getInstance_11() {\n return Companion_instance_8;\n }\n function SceneManagerCacheComponent(entitiesInScene) {\n this.entitiesInScene = entitiesInScene;\n this.y2u_1 = false;\n }\n protoOf(SceneManagerCacheComponent).z2u = function () {\n return this.entitiesInScene;\n };\n protoOf(SceneManagerCacheComponent).x1k = function () {\n return Companion_instance_8.id;\n };\n protoOf(SceneManagerCacheComponent).eq = function (other) {\n return false;\n };\n protoOf(SceneManagerCacheComponent).a1l = function () {\n return this.y2u_1;\n };\n protoOf(SceneManagerCacheComponent).af = function () {\n return this.entitiesInScene;\n };\n protoOf(SceneManagerCacheComponent).v29 = function (entitiesInScene) {\n return new SceneManagerCacheComponent(entitiesInScene);\n };\n protoOf(SceneManagerCacheComponent).copy = function (entitiesInScene, $super) {\n entitiesInScene = entitiesInScene === VOID ? this.entitiesInScene : entitiesInScene;\n return this.v29(entitiesInScene);\n };\n protoOf(SceneManagerCacheComponent).toString = function () {\n return 'SceneManagerCacheComponent(entitiesInScene=' + toString(this.entitiesInScene) + ')';\n };\n protoOf(SceneManagerCacheComponent).hashCode = function () {\n return hashCode(this.entitiesInScene);\n };\n protoOf(SceneManagerCacheComponent).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof SceneManagerCacheComponent))\n return false;\n var tmp0_other_with_cast = other instanceof SceneManagerCacheComponent ? other : THROW_CCE();\n if (!equals(this.entitiesInScene, tmp0_other_with_cast.entitiesInScene))\n return false;\n return true;\n };\n function SceneManagerEntitiesCache$clearCache$ref($boundThis) {\n var l = function () {\n $boundThis.clearCache();\n return Unit_instance;\n };\n l.callableName = 'clearCache';\n return l;\n }\n function SceneManagerEntitiesCache(holderEntity, entityManager) {\n this.a2v_1 = holderEntity;\n var tmp = this;\n tmp.b2v_1 = new SceneManagerCacheClearingSystem(SceneManagerEntitiesCache$clearCache$ref(this));\n this.b2v_1.register(entityManager);\n this.b2v_1.enable();\n }\n protoOf(SceneManagerEntitiesCache).getOrSet = function (newValue) {\n var cache = this.a2v_1.__getComponentForKotlin(Companion_instance_8.id);\n var tmp;\n if (cache == null) {\n var entitiesInScene = newValue();\n this.a2v_1.addComponentInternal(new SceneManagerCacheComponent(entitiesInScene));\n tmp = entitiesInScene;\n } else {\n tmp = cache.entitiesInScene;\n }\n return tmp;\n };\n protoOf(SceneManagerEntitiesCache).clearCache = function () {\n this.a2v_1.removeComponentInternal(Companion_instance_8.id);\n };\n function getFromCacheOrHierarchy($this) {\n return $this.f2v_1.getOrSet(SceneManagerImpl$getFromCacheOrHierarchy$lambda($this));\n }\n function replaceScene($this, newScene) {\n if (!$this.d2v_1.isDisposed) {\n $this.c2v_1.disposeEntity($this.d2v_1);\n }\n $this.d2v_1 = newScene;\n }\n function createSpace($this, name) {\n var space = $this.c2v_1.createEntity();\n space.addComponent(new DisplayNameComponent(name));\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n space.addComponent(new ParentComponent(tmp$ret$0));\n space.addComponent(StaticComponent_getInstance());\n return space;\n }\n function loadSceneGraph($this, newRoot, bundle, coreServices) {\n var extractedRoots = (new JsonSerializer(coreServices.productManager)).deserializeToEntityHierarchies(bundle, coreServices);\n if (!(extractedRoots.length === 1))\n return Unit_instance;\n var extractedRoot = first(extractedRoots);\n var newScene = SceneSerializationUtil_instance.findSceneFromDeserializedEntityTrees(extractedRoots);\n if (newScene == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n HierarchyUtils_instance.setParent(newScene, newRoot);\n newScene.addComponent(SceneComponent_instance);\n newScene.addComponent(InSceneComponent_instance);\n newScene.addComponent(StaticComponent_getInstance());\n newScene.addComponent(new DisplayNameComponent('scene'));\n replaceScene($this, newScene);\n }\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_children(extractedRoot);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.SceneManagerImpl.loadSceneGraph.' call\n HierarchyUtils_instance.setParent(element, newRoot);\n }\n var tmp1_safe_receiver = get_parentComponent(newRoot);\n var rootChildren = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.children;\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject_0 = get_hierarchy($this.scene);\n var inductionVariable_0 = 0;\n var last_0 = indexedObject_0.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject_0[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.SceneManagerImpl.loadSceneGraph.' call\n element_0.addComponent(InSceneComponent_instance);\n }\n var tmp;\n if (rootChildren == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.count' call\n var count = 0;\n var inductionVariable_1 = 0;\n var last_1 = rootChildren.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = rootChildren[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.SceneManagerImpl.loadSceneGraph.' call\n if (element_1.hasComponent(SceneComponent_instance.id)) {\n count = count + 1 | 0;\n }\n }\n tmp = count;\n }\n var tmp3_elvis_lhs = tmp;\n var numScenes = tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs;\n if (numScenes > 1) {\n var tmp_0 = Companion_getInstance_12().g2v_1;\n tmp_0.error(SceneManagerImpl$loadSceneGraph$lambda(numScenes));\n }\n if (numScenes === 0) {\n var tmp_1 = Companion_getInstance_12().g2v_1;\n tmp_1.error(SceneManagerImpl$loadSceneGraph$lambda_0);\n }\n }\n function Companion_3() {\n Companion_instance_9 = this;\n this.g2v_1 = LoggerState_getInstance().m1m('SceneGraphImpl');\n }\n var Companion_instance_9;\n function Companion_getInstance_12() {\n if (Companion_instance_9 == null)\n new Companion_3();\n return Companion_instance_9;\n }\n function SceneManagerImpl$getFromCacheOrHierarchy$lambda(this$0) {\n return function () {\n return get_hierarchy(this$0.d2v_1);\n };\n }\n function SceneManagerImpl$loadSceneGraph$lambda($numScenes) {\n return function () {\n return 'found ' + $numScenes + ' scenes, that is most probably an error';\n };\n }\n function SceneManagerImpl$loadSceneGraph$lambda_0() {\n return 'Could not find a scene in deserialized json';\n }\n function SceneManagerImpl(entityManager) {\n Companion_getInstance_12();\n this.c2v_1 = entityManager;\n this.e2v_1 = createSpace(this, 'root');\n this.f2v_1 = new SceneManagerEntitiesCache(this.e2v_1, this.c2v_1);\n var newScene = createSpace(this, 'scene');\n newScene.addComponent(SceneComponent_instance);\n newScene.addComponent(InSceneComponent_instance);\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.hierarchies.SceneManagerImpl.' call\n var spaceRot = this.e2v_1;\n var tmp0_safe_receiver = get_parentComponent(spaceRot);\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.addChild(newScene);\n var tmp;\n if (tmp1_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [newScene];\n tmp = new ParentComponent(tmp$ret$2);\n } else {\n tmp = tmp1_elvis_lhs;\n }\n var newParentComponent = tmp;\n spaceRot.addComponent(newParentComponent);\n newScene.addComponent(new ChildComponent(spaceRot));\n this.d2v_1 = newScene;\n }\n protoOf(SceneManagerImpl).o24 = function () {\n return getFromCacheOrHierarchy(this);\n };\n protoOf(SceneManagerImpl).e2a = function () {\n return this.d2v_1;\n };\n protoOf(SceneManagerImpl).f2a = function () {\n return this.e2v_1;\n };\n protoOf(SceneManagerImpl).save = function (coreServices) {\n var tempRoot = this.c2v_1.createEntity();\n HierarchyUtils_instance.setParent(this.d2v_1, tempRoot);\n try {\n return coreServices.serializer.toJsonString(tempRoot);\n }finally {\n HierarchyUtils_instance.setParent(this.scene, this.e2v_1);\n this.c2v_1.disposeEntity(tempRoot);\n }\n };\n protoOf(SceneManagerImpl).load = function (bundle, coreServices) {\n this.f2v_1.clearCache();\n var tmp0_safe_receiver = coreServices.coreModules.history();\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.clear();\n }\n this.e2v_1.addComponent(SceneReloadingComponent_instance);\n this.clearScene();\n loadSceneGraph(this, this.e2v_1, bundle, coreServices);\n this.e2v_1.removeComponent(SceneReloadingComponent_instance.id);\n };\n protoOf(SceneManagerImpl).clearScene = function () {\n this.f2v_1.clearCache();\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = get_children(this.scene);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.SceneManagerImpl.clearScene.' call\n this.c2v_1.disposeEntity(element);\n }\n };\n protoOf(SceneManagerImpl).findEntity = function (id) {\n if (id === this.e2v_1.id)\n return this.e2v_1;\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var space = this.scene;\n if (id === space.id)\n return space;\n var tmp0_safe_receiver = get_parentComponent(space);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.allDescendants();\n var tmp;\n if (tmp1_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = tmp1_safe_receiver.length;\n while (inductionVariable < last) {\n var element = tmp1_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.SceneManagerImpl.findEntity..' call\n if (element.id === id) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n tmp = tmp$ret$1;\n }\n return tmp;\n };\n function SceneSerializationUtil() {\n }\n protoOf(SceneSerializationUtil).findSceneFromDeserializedEntityTrees = function (roots) {\n var tmp0_elvis_lhs = firstOrNull_0(roots);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var root = tmp;\n var children = get_children(root);\n // Inline function 'kotlin.collections.find' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = children.length;\n while (inductionVariable < last) {\n var element = children[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.SceneSerializationUtil.findSceneFromDeserializedEntityTrees.' call\n if (element.hasComponent(SceneComponent_instance.id)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var entityWithSceneComponent = tmp$ret$1;\n if (!(entityWithSceneComponent == null))\n return entityWithSceneComponent;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = children.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = children[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.SceneSerializationUtil.findSceneFromDeserializedEntityTrees.' call\n if (!element_0.hasComponent(18)) {\n destination.q(element_0);\n }\n }\n var nonProductChildren = destination;\n if (nonProductChildren.n() === 1)\n return first_0(nonProductChildren);\n // Inline function 'kotlin.collections.find' call\n var this_0 = get_hierarchy(root);\n var tmp$ret$7;\n $l$block_0: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable_1 = 0;\n var last_1 = this_0.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = this_0[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.SceneSerializationUtil.findSceneFromDeserializedEntityTrees.' call\n var tmp_0;\n var tmp_1;\n if (element_1.hasComponent(53)) {\n tmp_1 = true;\n } else {\n tmp_1 = element_1.hasComponent(41);\n }\n if (tmp_1) {\n tmp_0 = true;\n } else {\n tmp_0 = element_1.hasComponent(70);\n }\n if (tmp_0) {\n tmp$ret$7 = element_1;\n break $l$block_0;\n }\n }\n tmp$ret$7 = null;\n }\n var room = tmp$ret$7;\n var roomParent = room == null ? null : get_parent(room);\n if (!(roomParent == null))\n return roomParent;\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var tmp0_iterator = nonProductChildren.t();\n while (tmp0_iterator.u()) {\n var element_2 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.hierarchies.SceneSerializationUtil.findSceneFromDeserializedEntityTrees.' call\n var tmp$ret$10;\n $l$block_1: {\n // Inline function 'kotlin.collections.any' call\n var indexedObject = get_descendants(element_2);\n var inductionVariable_2 = 0;\n var last_2 = indexedObject.length;\n while (inductionVariable_2 < last_2) {\n var element_3 = indexedObject[inductionVariable_2];\n inductionVariable_2 = inductionVariable_2 + 1 | 0;\n // Inline function 'com.ikea.core.hierarchies.SceneSerializationUtil.findSceneFromDeserializedEntityTrees..' call\n if (element_3.hasComponent(18)) {\n tmp$ret$10 = true;\n break $l$block_1;\n }\n }\n tmp$ret$10 = false;\n }\n if (tmp$ret$10) {\n destination_0.q(element_2);\n }\n }\n var nonProductChildrenWithProductDescendants = destination_0;\n if (nonProductChildrenWithProductDescendants.n() === 1)\n return first_0(nonProductChildrenWithProductDescendants);\n if (nonProductChildrenWithProductDescendants.n() > 1)\n return null;\n return null;\n };\n var SceneSerializationUtil_instance;\n function SceneSerializationUtil_getInstance() {\n return SceneSerializationUtil_instance;\n }\n function localTransformationComponent($this, json) {\n return Companion_getInstance_1().fromJson(json);\n }\n function worldTransformationComponent($this, json) {\n return Companion_getInstance_2().fromJson(json);\n }\n function assemblyPartsComponent($this, json) {\n return Companion_getInstance().f1l(json);\n }\n function automaticGroupComponent($this, json) {\n return Companion_getInstance_3().fromJson();\n }\n function manualGroupComponent($this, json) {\n return Companion_getInstance_4().fromJson();\n }\n function productPartComponent($this, json) {\n return Companion_getInstance_5().fromJson(json);\n }\n function serializableGuestConnectionsComponent($this, json) {\n return Companion_getInstance_6().fromJson(json);\n }\n function CoreComponentDeserializer$localTransformationComponent$ref($boundThis) {\n var l = function (p0) {\n return localTransformationComponent($boundThis, p0);\n };\n l.callableName = 'localTransformationComponent';\n return l;\n }\n function CoreComponentDeserializer$worldTransformationComponent$ref($boundThis) {\n var l = function (p0) {\n return worldTransformationComponent($boundThis, p0);\n };\n l.callableName = 'worldTransformationComponent';\n return l;\n }\n function CoreComponentDeserializer$automaticGroupComponent$ref($boundThis) {\n var l = function (p0) {\n return automaticGroupComponent($boundThis, p0);\n };\n l.callableName = 'automaticGroupComponent';\n return l;\n }\n function CoreComponentDeserializer$manualGroupComponent$ref($boundThis) {\n var l = function (p0) {\n return manualGroupComponent($boundThis, p0);\n };\n l.callableName = 'manualGroupComponent';\n return l;\n }\n function CoreComponentDeserializer$assemblyPartsComponent$ref($boundThis) {\n var l = function (p0) {\n return assemblyPartsComponent($boundThis, p0);\n };\n l.callableName = 'assemblyPartsComponent';\n return l;\n }\n function CoreComponentDeserializer$productPartComponent$ref($boundThis) {\n var l = function (p0) {\n return productPartComponent($boundThis, p0);\n };\n l.callableName = 'productPartComponent';\n return l;\n }\n function CoreComponentDeserializer$serializableGuestConnectionsComponent$ref($boundThis) {\n var l = function (p0) {\n return serializableGuestConnectionsComponent($boundThis, p0);\n };\n l.callableName = 'serializableGuestConnectionsComponent';\n return l;\n }\n function CoreComponentDeserializer() {\n this.h2v_1 = true;\n var tmp = this;\n Companion_getInstance_1();\n var tmp_0 = to('LocalTransformComponent', CoreComponentDeserializer$localTransformationComponent$ref(this));\n Companion_getInstance_2();\n var tmp_1 = to('WorldTransformComponent', CoreComponentDeserializer$worldTransformationComponent$ref(this));\n Companion_getInstance_3();\n var tmp_2 = to('EntityGroupParentComponent', CoreComponentDeserializer$automaticGroupComponent$ref(this));\n Companion_getInstance_4();\n var tmp_3 = to('ManualGroupComponent', CoreComponentDeserializer$manualGroupComponent$ref(this));\n Companion_getInstance();\n var tmp_4 = to('AssemblyPartsComponent', CoreComponentDeserializer$assemblyPartsComponent$ref(this));\n Companion_getInstance_5();\n var tmp_5 = to('ProductPartComponent', CoreComponentDeserializer$productPartComponent$ref(this));\n Companion_getInstance_6();\n tmp.i2v_1 = mapOf([tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, to('Connections', CoreComponentDeserializer$serializableGuestConnectionsComponent$ref(this))]);\n }\n protoOf(CoreComponentDeserializer).a1m = function () {\n return this.h2v_1;\n };\n protoOf(CoreComponentDeserializer).canHandle = function (serializationKey) {\n return this.i2v_1.y2(serializationKey);\n };\n protoOf(CoreComponentDeserializer).deserialize = function (serializationKey, json) {\n var tmp0_elvis_lhs = this.i2v_1.b3(serializationKey);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n throw IllegalStateException_init_$Create$(toString(''));\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp(json);\n };\n function validateAndCollectResults($this, entity, earlyOut) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapIndexed' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = $this.j2v_1;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.validateAndCollectResults.' call\n if (element.isEnabled) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapIndexedTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));\n var index = 0;\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.validateAndCollectResults.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var i = checkIndexOverflow(tmp1);\n var id$delegate = lazy(ValidationServiceImpl$validateAndCollectResults$lambda(i, item));\n var tmp0_safe_receiver = $this.k2v_1;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.start(validateAndCollectResults$_anonymous_$lambda$0_ahocsf(id$delegate));\n }\n var result = item.validateCurrentState(entity);\n var tmp1_safe_receiver = $this.k2v_1;\n if (tmp1_safe_receiver == null)\n null;\n else {\n tmp1_safe_receiver.stop(validateAndCollectResults$_anonymous_$lambda$0_ahocsf(id$delegate));\n }\n var tmp;\n if (earlyOut) {\n tmp = equals(result == null ? null : result.resultType, ValidationResultType_FAIL_getInstance());\n } else {\n tmp = false;\n }\n if (tmp) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [result];\n }\n destination_0.q(result);\n }\n var this_1 = filterNotNull(destination_0);\n var results = copyToArray(this_1);\n var tmp_0;\n // Inline function 'kotlin.collections.isEmpty' call\n if (results.length === 0) {\n tmp_0 = $this.l2v_1;\n } else {\n tmp_0 = results;\n }\n return tmp_0;\n }\n function validateAndCollectResults_0($this, snapActionCandidate, earlyOut) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.mapIndexed' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = $this.j2v_1;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.validateAndCollectResults.' call\n if (element.isEnabled) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.collections.mapIndexedTo' call\n var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));\n var index = 0;\n var tmp0_iterator = destination.t();\n while (tmp0_iterator.u()) {\n var item = tmp0_iterator.w();\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.validateAndCollectResults.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var i = checkIndexOverflow(tmp1);\n var id$delegate = lazy(ValidationServiceImpl$validateAndCollectResults$lambda_0(i, item));\n var tmp0_safe_receiver = $this.k2v_1;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.start(validateAndCollectResults$_anonymous_$lambda$1_ahocse(id$delegate));\n }\n var result = item.validateSnap(snapActionCandidate);\n var tmp1_safe_receiver = $this.k2v_1;\n if (tmp1_safe_receiver == null)\n null;\n else {\n tmp1_safe_receiver.stop(validateAndCollectResults$_anonymous_$lambda$1_ahocse(id$delegate));\n }\n var tmp;\n if (earlyOut) {\n tmp = equals(result == null ? null : result.resultType, ValidationResultType_FAIL_getInstance());\n } else {\n tmp = false;\n }\n if (tmp) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [result];\n }\n destination_0.q(result);\n }\n var this_1 = filterNotNull(destination_0);\n var results = copyToArray(this_1);\n var tmp_0;\n // Inline function 'kotlin.collections.isEmpty' call\n if (results.length === 0) {\n tmp_0 = $this.l2v_1;\n } else {\n tmp_0 = results;\n }\n return tmp_0;\n }\n function hasNoErrorsInResult($this, results) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable = 0;\n var last = results.length;\n while (inductionVariable < last) {\n var element = results[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.hasNoErrorsInResult.' call\n if (element.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n tmp$ret$1 = true;\n break $l$block;\n }\n }\n tmp$ret$1 = false;\n }\n return !tmp$ret$1;\n }\n function validateAndCollectResults$_anonymous_$lambda$0_ahocsf($id$delegate) {\n // Inline function 'kotlin.getValue' call\n getLocalDelegateReference('id', KProperty0, false, function () {\n return THROW_ISE();\n });\n return $id$delegate.u2();\n }\n function validateAndCollectResults$_anonymous_$lambda$1_ahocse($id$delegate) {\n // Inline function 'kotlin.getValue' call\n getLocalDelegateReference('id', KProperty0, false, function () {\n return THROW_ISE();\n });\n return $id$delegate.u2();\n }\n function ValidationServiceImpl$validateAndCollectResults$lambda($i, $rule) {\n return function () {\n return '' + $i + '. ' + $rule.id;\n };\n }\n function ValidationServiceImpl$validateAndCollectResults$lambda_0($i, $rule) {\n return function () {\n return '' + $i + '. ' + $rule.id;\n };\n }\n function ValidationServiceImpl() {\n var tmp = this;\n // Inline function 'kotlin.emptyArray' call\n tmp.j2v_1 = [];\n this.k2v_1 = null;\n var tmp_0 = this;\n // Inline function 'kotlin.emptyArray' call\n tmp_0.l2v_1 = [];\n }\n protoOf(ValidationServiceImpl).i2t = function (_set____db54di) {\n this.k2v_1 = _set____db54di;\n };\n protoOf(ValidationServiceImpl).j2t = function () {\n return this.k2v_1;\n };\n protoOf(ValidationServiceImpl).s1i = function () {\n return this.j2v_1;\n };\n protoOf(ValidationServiceImpl).register = function (validation) {\n var tmp = this;\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$0 = this.j2v_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [validation];\n tmp.j2v_1 = tmp$ret$0.concat(tmp$ret$3);\n };\n protoOf(ValidationServiceImpl).unregister = function (validation) {\n var tmp = this;\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = minus(toMutableList(this.j2v_1), validation);\n tmp.j2v_1 = copyToArray(this_0);\n };\n protoOf(ValidationServiceImpl).b2u = function (snapActionCandidate, earlyOut) {\n snapActionCandidate.perform();\n var result = validateAndCollectResults_0(this, snapActionCandidate, earlyOut);\n snapActionCandidate.rollback();\n return result;\n };\n protoOf(ValidationServiceImpl).c2u = function (snapActionCandidates, earlyOut) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.flatMap' call\n // Inline function 'kotlin.collections.flatMapTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = snapActionCandidates.length;\n while (inductionVariable < last) {\n var element = snapActionCandidates[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.validateSnaps.' call\n var list = toList(this.validateSnap(element, earlyOut));\n addAll(destination, list);\n }\n return copyToArray(destination);\n };\n protoOf(ValidationServiceImpl).a2u = function (entity, earlyOut) {\n return validateAndCollectResults(this, entity, earlyOut);\n };\n protoOf(ValidationServiceImpl).d2u = function (snapActionCandidates, sortByWarnings) {\n // Inline function 'kotlin.emptyArray' call\n var allErrors = [];\n var firstWarning = null;\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable = 0;\n var last = snapActionCandidates.length;\n while (inductionVariable < last) {\n var element = snapActionCandidates[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.getFirstValidSnapAction.' call\n element.perform();\n var errorsAndWarnings = validateAndCollectResults_0(this, element, true);\n // Inline function 'kotlin.collections.isEmpty' call\n var snapWasGood = errorsAndWarnings.length === 0;\n if (snapWasGood) {\n element.rollback();\n return new ValidSnapActionCandidateOrErrors(element);\n }\n var snapWasOk = hasNoErrorsInResult(this, errorsAndWarnings);\n if (snapWasOk) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = errorsAndWarnings.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = errorsAndWarnings[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.getFirstValidSnapAction..' call\n if (element_0.resultType.equals(ValidationResultType_WARNING_getInstance())) {\n destination.q(element_0);\n }\n }\n var myWarnings = destination;\n var tmp;\n if (firstWarning == null) {\n tmp = true;\n } else {\n // Inline function 'kotlin.collections.count' call\n tmp = ensureNotNull(firstWarning).warnings.length > myWarnings.n();\n }\n if (tmp) {\n if (sortByWarnings) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$6 = copyToArray(myWarnings);\n firstWarning = new ValidSnapActionCandidateOrErrors(element, tmp$ret$6);\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$7 = copyToArray(myWarnings);\n return new ValidSnapActionCandidateOrErrors(element, tmp$ret$7);\n }\n }\n }\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n allErrors = allErrors.concat(errorsAndWarnings);\n }\n var tmp0_safe_receiver = lastOrNull(snapActionCandidates);\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.rollback();\n }\n var tmp1_elvis_lhs = firstWarning;\n return tmp1_elvis_lhs == null ? new ValidSnapActionCandidateOrErrors(null, VOID, allErrors) : tmp1_elvis_lhs;\n };\n protoOf(ValidationServiceImpl).e2u = function (snapActionCandidate, earlyOut) {\n var validationResult = this.validateSnap(snapActionCandidate, earlyOut);\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.all' call\n var inductionVariable = 0;\n var last = validationResult.length;\n while (inductionVariable < last) {\n var element = validationResult[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.evaluateSnapCandidate.' call\n if (!!element.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n var wasValid = tmp$ret$1;\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = validationResult.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = validationResult[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.evaluateSnapCandidate.' call\n if (element_0.resultType.equals(ValidationResultType_WARNING_getInstance())) {\n destination.q(element_0);\n }\n }\n var warnings = copyToArray(destination);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_1 = 0;\n var last_1 = validationResult.length;\n while (inductionVariable_1 < last_1) {\n var element_1 = validationResult[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.evaluateSnapCandidate.' call\n if (element_1.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n destination_0.q(element_1);\n }\n }\n var errors = copyToArray(destination_0);\n var validCandidate = wasValid ? snapActionCandidate : null;\n var result = new ValidSnapActionCandidateOrErrors(validCandidate, warnings, errors);\n return result;\n };\n protoOf(ValidationServiceImpl).f2u = function (snapActionCandidates, earlyOut) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(snapActionCandidates.length);\n var inductionVariable = 0;\n var last = snapActionCandidates.length;\n while (inductionVariable < last) {\n var item = snapActionCandidates[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.system.ValidationServiceImpl.evaluateSnapCandidates.' call\n var tmp$ret$0 = this.evaluateSnapCandidate(item, earlyOut);\n destination.q(tmp$ret$0);\n }\n return copyToArray(destination);\n };\n function simulateClick(_this__u8e3s4, coreServices) {\n var event = new ClickEventComponent(Companion_getInstance_7().ZERO);\n coreServices.entityManager.addComponent(_this__u8e3s4, event);\n coreServices.entityManager.removeComponent(_this__u8e3s4, event.f2m_1);\n }\n //region block: post-declaration\n protoOf(CoreImpl).setLogModule = setLogModule;\n protoOf(CoreImpl).addHistoryModule = addHistoryModule;\n defineProp(protoOf(CoreImpl), 'services', function () {\n return this.m1i();\n });\n defineProp(protoOf(CoreImpl), 'modules', function () {\n return this.n1i();\n });\n protoOf(ProductManagerImpl).createEntity = createEntity;\n protoOf(ProductManagerImpl).createEntityInternal = createEntityInternal;\n protoOf(ProductManagerImpl).createFromSpecification = createFromSpecification;\n protoOf(ProductManagerImpl).createFromSpecificationInternal = createFromSpecificationInternal;\n defineProp(protoOf(ProductManagerImpl), 'catalogs', function () {\n return this.d1m();\n });\n defineProp(protoOf(Companion_2), 'id', protoOf(Companion_2).s1k);\n protoOf(SceneManagerCacheComponent).z1k = get_serializable;\n defineProp(protoOf(SceneManagerCacheComponent), 'typeId', function () {\n return this.x1k();\n });\n defineProp(protoOf(SceneManagerCacheComponent), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n defineProp(protoOf(SceneManagerCacheComponent), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(SceneManagerImpl), 'entities', function () {\n return this.o24();\n });\n defineProp(protoOf(SceneManagerImpl), 'scene', function () {\n return this.e2a();\n });\n defineProp(protoOf(SceneManagerImpl), 'root', function () {\n return this.f2a();\n });\n defineProp(protoOf(CoreComponentDeserializer), 'thisClassIsGuaranteedToNotModifyOrQueryCoreState', function () {\n return this.a1m();\n });\n protoOf(ValidationServiceImpl).validateSnap = validateSnap;\n protoOf(ValidationServiceImpl).validateSnaps = validateSnaps;\n protoOf(ValidationServiceImpl).validateCurrentState = validateCurrentState;\n protoOf(ValidationServiceImpl).getFirstValidSnapAction = getFirstValidSnapAction;\n protoOf(ValidationServiceImpl).evaluateSnapCandidate = evaluateSnapCandidate;\n protoOf(ValidationServiceImpl).evaluateSnapCandidates = evaluateSnapCandidates;\n defineProp(protoOf(ValidationServiceImpl), 'measurer', function () {\n return this.j2t();\n }, function (value) {\n this.i2t(value);\n });\n defineProp(protoOf(ValidationServiceImpl), 'validations', function () {\n return this.s1i();\n });\n //endregion\n //region block: init\n Companion_instance_7 = new Companion_1();\n Companion_instance_8 = new Companion_2();\n SceneSerializationUtil_instance = new SceneSerializationUtil();\n //endregion\n //region block: exports\n function $jsExportAll$(_) {\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n $com$ikea$core.CoreFactoryImpl = CoreFactoryImpl;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n $com$ikea$core.CoreImpl = CoreImpl;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n $com$ikea$core.CoreModulesImpl = CoreModulesImpl;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$catalog = $com$ikea$core.catalog || ($com$ikea$core.catalog = {});\n $com$ikea$core$catalog.ProductManagerImpl = ProductManagerImpl;\n $com$ikea$core$catalog.ProductManagerImpl.createEntityFromSpecification$default = createEntityFromSpecification$default;\n defineProp($com$ikea$core$catalog.ProductManagerImpl, 'Companion', Companion_getInstance_8);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$entity = $com$ikea$core.entity || ($com$ikea$core.entity = {});\n $com$ikea$core$entity.SystemGraphViewer = SystemGraphViewer;\n defineProp($com$ikea$core$entity.SystemGraphViewer, 'Companion', Companion_getInstance_9);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n $com$ikea$core$hierarchies.SceneManagerCacheClearingSystem = SceneManagerCacheClearingSystem;\n defineProp($com$ikea$core$hierarchies.SceneManagerCacheClearingSystem, 'Companion', Companion_getInstance_10);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n $com$ikea$core$hierarchies.SceneManagerCacheComponent = SceneManagerCacheComponent;\n defineProp($com$ikea$core$hierarchies.SceneManagerCacheComponent, 'Companion', Companion_getInstance_11);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n $com$ikea$core$hierarchies.SceneManagerEntitiesCache = SceneManagerEntitiesCache;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n $com$ikea$core$hierarchies.SceneManagerImpl = SceneManagerImpl;\n defineProp($com$ikea$core$hierarchies.SceneManagerImpl, 'Companion', Companion_getInstance_12);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$hierarchies = $com$ikea$core.hierarchies || ($com$ikea$core.hierarchies = {});\n defineProp($com$ikea$core$hierarchies, 'SceneSerializationUtil', SceneSerializationUtil_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$service = $com$ikea$core.service || ($com$ikea$core.service = {});\n $com$ikea$core$service.CoreComponentDeserializer = CoreComponentDeserializer;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$system = $com$ikea$core.system || ($com$ikea$core.system = {});\n $com$ikea$core$system.ValidationServiceImpl = ValidationServiceImpl;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$test = $com$ikea$core.test || ($com$ikea$core.test = {});\n $com$ikea$core$test.simulateClick = simulateClick;\n }\n $jsExportAll$(_);\n _.$jsExportAll$ = $jsExportAll$;\n _.$_$ = _.$_$ || {};\n _.$_$.a = CoreImpl;\n _.$_$.b = SceneSerializationUtil_instance;\n //endregion\n return _;\n}));\n\n//# sourceMappingURL=core-core-kernel.js.map\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd)\n define(['exports', './kotlin-kotlin-stdlib.js', './core-core-api.js', './core-core-stl.js', './kotlinx-serialization-kotlinx-serialization-json.js', './kotlinx-serialization-kotlinx-serialization-core.js'], factory);\n else if (typeof exports === 'object')\n factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./core-core-api.js'), require('./core-core-stl.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'));\n else {\n if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {\n throw new Error(\"Error loading module 'core-test-helpers'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'core-test-helpers'.\");\n }\n if (typeof this['core-core-api'] === 'undefined') {\n throw new Error(\"Error loading module 'core-test-helpers'. Its dependency 'core-core-api' was not found. Please, check whether 'core-core-api' is loaded prior to 'core-test-helpers'.\");\n }\n if (typeof this['core-core-stl'] === 'undefined') {\n throw new Error(\"Error loading module 'core-test-helpers'. Its dependency 'core-core-stl' was not found. Please, check whether 'core-core-stl' is loaded prior to 'core-test-helpers'.\");\n }\n if (typeof this['kotlinx-serialization-kotlinx-serialization-json'] === 'undefined') {\n throw new Error(\"Error loading module 'core-test-helpers'. Its dependency 'kotlinx-serialization-kotlinx-serialization-json' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-json' is loaded prior to 'core-test-helpers'.\");\n }\n if (typeof this['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {\n throw new Error(\"Error loading module 'core-test-helpers'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'core-test-helpers'.\");\n }\n root['core-test-helpers'] = factory(typeof this['core-test-helpers'] === 'undefined' ? {} : this['core-test-helpers'], this['kotlin-kotlin-stdlib'], this['core-core-api'], this['core-core-stl'], this['kotlinx-serialization-kotlinx-serialization-json'], this['kotlinx-serialization-kotlinx-serialization-core']);\n }\n}(this, function (_, kotlin_kotlin, kotlin_core_core_api, kotlin_core_core_stl, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core) {\n 'use strict';\n //region block: imports\n var protoOf = kotlin_kotlin.$_$.u9;\n var VOID = kotlin_kotlin.$_$.e;\n var objectMeta = kotlin_kotlin.$_$.t9;\n var setMetadataFor = kotlin_kotlin.$_$.v9;\n var Unit_instance = kotlin_kotlin.$_$.x3;\n var copyToArray = kotlin_kotlin.$_$.l5;\n var first = kotlin_kotlin.$_$.v5;\n var get_collider = kotlin_core_core_api.$_$.d1;\n var get_worldPosition = kotlin_core_core_api.$_$.l7;\n var toString = kotlin_kotlin.$_$.z9;\n var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.f1;\n var get_displayName = kotlin_core_core_api.$_$.h5;\n var DisplayNameComponent = kotlin_core_core_api.$_$.e5;\n var get_colliderShapeComponent = kotlin_core_core_api.$_$.e1;\n var get_connectorsComponent = kotlin_core_core_api.$_$.h2;\n var emptyList = kotlin_kotlin.$_$.o5;\n var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;\n var sortedWith = kotlin_kotlin.$_$.m7;\n var last = kotlin_kotlin.$_$.l6;\n var Comparator = kotlin_kotlin.$_$.pc;\n var classMeta = kotlin_kotlin.$_$.q8;\n var compareValues = kotlin_kotlin.$_$.d8;\n var defineProp = kotlin_kotlin.$_$.s8;\n var ensureNotNull = kotlin_kotlin.$_$.qd;\n var AutoAdaptHostComponent = kotlin_core_core_stl.$_$.l;\n var get_productRef = kotlin_core_core_api.$_$.w;\n var AutoAdaptGuestComponent = kotlin_core_core_stl.$_$.k;\n var Companion_instance = kotlin_core_core_stl.$_$.e4;\n var contains = kotlin_kotlin.$_$.x4;\n var get_snapRoot = kotlin_core_core_api.$_$.i1;\n var Companion_instance_0 = kotlin_core_core_stl.$_$.m4;\n var Companion_instance_1 = kotlin_core_core_api.$_$.fd;\n var SystemBase = kotlin_core_core_api.$_$.e3;\n var ComponentIds_instance = kotlin_core_core_api.$_$.w9;\n var RoomGeometryData = kotlin_core_core_stl.$_$.x2;\n var RoomPoint3D = kotlin_core_core_stl.$_$.z2;\n var RoomSurface = kotlin_core_core_stl.$_$.c3;\n var RoomEdge = kotlin_core_core_stl.$_$.w2;\n var RoomCorner = kotlin_core_core_stl.$_$.v2;\n var RoomObstacle = kotlin_core_core_stl.$_$.y2;\n var RoomBoundingBox = kotlin_core_core_stl.$_$.t2;\n var RoomTransform = kotlin_core_core_stl.$_$.d3;\n var RoomRotation = kotlin_core_core_stl.$_$.a3;\n var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.h;\n var getKClass = kotlin_kotlin.$_$.d;\n var arrayOf = kotlin_kotlin.$_$.nd;\n var createKType = kotlin_kotlin.$_$.a;\n var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b3;\n var THROW_CCE = kotlin_kotlin.$_$.ad;\n var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t2;\n var isInterface = kotlin_kotlin.$_$.j9;\n var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.g;\n var ReferenceArraySerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i2;\n var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;\n var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x;\n var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d;\n var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b2;\n var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;\n var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o2;\n var objectCreate = kotlin_kotlin.$_$.s9;\n var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;\n var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.n3;\n var DoubleSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r;\n //endregion\n //region block: pre-declaration\n setMetadataFor(ArrangeExtensions, 'ArrangeExtensions', objectMeta);\n setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(AutoAdaptExtensions, 'AutoAdaptExtensions', objectMeta);\n setMetadataFor(PlacementExtensions, 'PlacementExtensions', objectMeta);\n setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\n setMetadataFor(CountSystem, 'CountSystem', classMeta, SystemBase, VOID, CountSystem);\n setMetadataFor(RoomGeneratorUtils$createRoomFromData$1, VOID, classMeta, VOID, [RoomGeometryData]);\n setMetadataFor(RoomGeneratorUtils$point$1, VOID, classMeta, VOID, [RoomPoint3D]);\n setMetadataFor(RoomGeneratorUtils$surfaces$1$1, VOID, classMeta, VOID, [RoomSurface]);\n setMetadataFor(RoomGeneratorUtils$edges$1$1, VOID, classMeta, VOID, [RoomEdge]);\n setMetadataFor(RoomGeneratorUtils$corners$1$1, VOID, classMeta, VOID, [RoomCorner]);\n setMetadataFor(RoomGeneratorUtils$obstacles$1$1, VOID, classMeta, VOID, [RoomObstacle]);\n setMetadataFor(RoomGeneratorUtils$boundingBox$1, VOID, classMeta, VOID, [RoomBoundingBox]);\n setMetadataFor(RoomGeneratorUtils$transform$1, VOID, classMeta, VOID, [RoomTransform]);\n setMetadataFor(RoomGeneratorUtils$rotation$1, VOID, classMeta, VOID, [RoomRotation]);\n setMetadataFor(RoomGeneratorUtils, 'RoomGeneratorUtils', objectMeta);\n setMetadataFor(Companion, 'Companion', objectMeta);\n setMetadataFor($serializer, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomGeometryDataTestImpl, 'RoomGeometryDataTestImpl', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});\n setMetadataFor(Companion_0, 'Companion', objectMeta);\n setMetadataFor($serializer_0, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomSurfaceTestImpl, 'RoomSurfaceTestImpl', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_0});\n setMetadataFor(Companion_1, 'Companion', objectMeta);\n setMetadataFor($serializer_1, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomEdgeTestImpl, 'RoomEdgeTestImpl', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_1});\n setMetadataFor(Companion_2, 'Companion', objectMeta);\n setMetadataFor($serializer_2, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomCornerTestImpl, 'RoomCornerTestImpl', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_2});\n setMetadataFor(Companion_3, 'Companion', objectMeta);\n setMetadataFor($serializer_3, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomPoint3DTestImpl, 'RoomPoint3DTestImpl', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_3});\n setMetadataFor(Companion_4, 'Companion', objectMeta);\n setMetadataFor($serializer_4, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomObstacleTestImpl, 'RoomObstacleTestImpl', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_4});\n setMetadataFor(Companion_5, 'Companion', objectMeta);\n setMetadataFor($serializer_5, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomRotationTestImpl, 'RoomRotationTestImpl', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_5});\n setMetadataFor(Companion_6, 'Companion', objectMeta);\n setMetadataFor($serializer_6, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomBoundingBoxTestImpl, 'RoomBoundingBoxTestImpl', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_6});\n setMetadataFor(Companion_7, 'Companion', objectMeta);\n setMetadataFor($serializer_7, '$serializer', objectMeta, VOID, [GeneratedSerializer]);\n setMetadataFor(RoomTransformTestImpl, 'RoomTransformTestImpl', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_7});\n setMetadataFor(RoomGeometryDataImpl, 'RoomGeometryDataImpl', classMeta, VOID, [RoomGeometryData]);\n setMetadataFor(RoomSurfaceImpl, 'RoomSurfaceImpl', classMeta, VOID, [RoomSurface]);\n setMetadataFor(RoomEdgeImpl, 'RoomEdgeImpl', classMeta, VOID, [RoomEdge]);\n setMetadataFor(RoomCornerImpl, 'RoomCornerImpl', classMeta, VOID, [RoomCorner]);\n setMetadataFor(RoomPoint3DImpl, 'RoomPoint3DImpl', classMeta, VOID, [RoomPoint3D]);\n //endregion\n function ArrangeExtensions() {\n }\n protoOf(ArrangeExtensions).e4d = function (_this__u8e3s4, productRef, numOfProducts, coreServices, doAutoAdapt) {\n return placeHostProductsInLine(_this__u8e3s4, productRef, numOfProducts, coreServices, doAutoAdapt);\n };\n protoOf(ArrangeExtensions).placeHostProductsInLine = function (_this__u8e3s4, productRef, numOfProducts, coreServices, doAutoAdapt, $super) {\n doAutoAdapt = doAutoAdapt === VOID ? true : doAutoAdapt;\n return this.e4d(_this__u8e3s4, productRef, numOfProducts, coreServices, doAutoAdapt);\n };\n var ArrangeExtensions_instance;\n function ArrangeExtensions_getInstance() {\n return ArrangeExtensions_instance;\n }\n function placeHostProductsInLine(_this__u8e3s4, productRef, numOfProducts, coreServices, doAutoAdapt) {\n doAutoAdapt = doAutoAdapt === VOID ? true : doAutoAdapt;\n var inductionVariable = 1;\n if (inductionVariable <= numOfProducts)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var product = createInSceneAndAssert(_this__u8e3s4, productRef, coreServices);\n if (doAutoAdapt) {\n makeAutoAdaptHost(product, coreServices);\n }\n }\n while (!(i === numOfProducts));\n var productsLeftToRight = getProductInOrderLeftToRight(coreServices.sceneManager, productRef);\n assertOrderedXPlacedOnInterval(productsLeftToRight, coreServices);\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(productsLeftToRight);\n }\n function assertOrderedXPlacedOnInterval(orderedLeftToRight, coreServices) {\n var tmp0_safe_receiver = get_collider(first(orderedLeftToRight));\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.worldPolyhedron;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.axisAlignedBoundingBox;\n var width = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.width;\n var alignWidth = getAlignWidth(first(orderedLeftToRight));\n var pos = get_worldPosition(first(orderedLeftToRight)).X;\n var iterator = orderedLeftToRight.t();\n var index = 0;\n while (iterator.u()) {\n var i = index;\n index = index + 1 | 0;\n var product = iterator.w();\n var tmp;\n if (width == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.test.helper.extensions.assertOrderedXPlacedOnInterval.' call\n tmp = pos + width * i;\n }\n var expectedBasedOnCollider = tmp;\n var tmp_0;\n if (alignWidth == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.test.helper.extensions.assertOrderedXPlacedOnInterval.' call\n tmp_0 = pos + alignWidth * i;\n }\n var expectedBasedOnAlignments = tmp_0;\n var actual = get_worldPosition(product).X;\n if (!(expectedBasedOnCollider == null) ? !(expectedBasedOnAlignments == null) : false) {\n // Inline function 'kotlin.math.abs' call\n var x = expectedBasedOnCollider - actual;\n var outcome1 = Math.abs(x) < 0.001;\n // Inline function 'kotlin.math.abs' call\n var x_0 = expectedBasedOnAlignments - actual;\n var outcome2 = Math.abs(x_0) < 0.001;\n if (!outcome1 ? !outcome2 : false) {\n // Inline function 'kotlin.error' call\n var message = 'Expect to be equal. Expected: ' + expectedBasedOnCollider + ' (collider) or ' + expectedBasedOnAlignments + ' (alignments) actual: ' + actual;\n throw IllegalStateException_init_$Create$(toString(message));\n }\n }\n coreServices.entityManager.addComponent(product, new DisplayNameComponent('Product ' + (i + 1 | 0) + ' ' + get_displayName(product)));\n }\n }\n function getAlignWidth(entity) {\n var tmp0_safe_receiver = get_colliderShapeComponent(entity);\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.polyhedron;\n var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.axisAlignedBoundingBox;\n var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.width;\n var width = tmp3_elvis_lhs == null ? 0.0 : tmp3_elvis_lhs;\n var tmp4_safe_receiver = get_connectorsComponent(entity);\n var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.alignmentConnectors;\n var alignmentConnectors = tmp5_elvis_lhs == null ? emptyList() : tmp5_elvis_lhs;\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var tmp0_iterator = alignmentConnectors.t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.test.helper.extensions.getAlignWidth.' call\n // Inline function 'kotlin.math.abs' call\n var x = element.transform.position.X;\n if (Math.abs(x) >= width / 2) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp = getAlignWidth$lambda;\n var tmp$ret$4 = new sam$kotlin_Comparator$0(tmp);\n var fromLeftToRight = sortedWith(destination, tmp$ret$4);\n var tmp_0;\n if (fromLeftToRight.n() >= 2) {\n // Inline function 'kotlin.math.abs' call\n var x_0 = first(fromLeftToRight).transform.position.X - last(fromLeftToRight).transform.position.X;\n tmp_0 = Math.abs(x_0);\n } else {\n tmp_0 = null;\n }\n return tmp_0;\n }\n function sam$kotlin_Comparator$0(function_0) {\n this.f4d_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0).u1j = function (a, b) {\n return this.f4d_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function getAlignWidth$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.test.helper.extensions.getAlignWidth.' call\n var tmp = a.transform.position.X;\n // Inline function 'com.ikea.core.test.helper.extensions.getAlignWidth.' call\n var tmp$ret$1 = b.transform.position.X;\n return compareValues(tmp, tmp$ret$1);\n }\n function AutoAdaptExtensions() {\n }\n protoOf(AutoAdaptExtensions).makeAutoAdaptHost = function (_this__u8e3s4, coreServices) {\n return makeAutoAdaptHost(_this__u8e3s4, coreServices);\n };\n protoOf(AutoAdaptExtensions).makeAutoAdaptable = function (_this__u8e3s4, alternativeProductRefs, coreServices) {\n return makeAutoAdaptable(_this__u8e3s4, alternativeProductRefs, coreServices);\n };\n var AutoAdaptExtensions_instance;\n function AutoAdaptExtensions_getInstance() {\n return AutoAdaptExtensions_instance;\n }\n function makeAutoAdaptHost(_this__u8e3s4, coreServices) {\n coreServices.entityManager.addComponent(_this__u8e3s4, new AutoAdaptHostComponent(ensureNotNull(get_colliderShapeComponent(_this__u8e3s4)).polyhedron));\n }\n function makeAutoAdaptable(_this__u8e3s4, alternativeProductRefs, coreServices) {\n // Inline function 'kotlin.collections.plus' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = [ensureNotNull(get_productRef(_this__u8e3s4))];\n var originalProductRefs = alternativeProductRefs.concat(tmp$ret$3);\n _this__u8e3s4.addComponent(new AutoAdaptGuestComponent(originalProductRefs));\n coreServices.productManager.subscribeProductCreated(makeAutoAdaptable$lambda(originalProductRefs));\n }\n function makeAutoAdaptable$lambda($originalProductRefs) {\n return function (createdEntity, productRef) {\n var tmp;\n var tmp_0;\n if (!createdEntity.hasComponent(126)) {\n tmp_0 = contains($originalProductRefs, productRef);\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n createdEntity.addComponent(new AutoAdaptGuestComponent($originalProductRefs));\n tmp = Unit_instance;\n }\n return Unit_instance;\n };\n }\n function PlacementExtensions() {\n }\n protoOf(PlacementExtensions).createInSceneAndAssert = function (_this__u8e3s4, productRef, coreServices) {\n return createInSceneAndAssert(_this__u8e3s4, productRef, coreServices);\n };\n protoOf(PlacementExtensions).createInHostAndAssert = function (_this__u8e3s4, productRef, host, coreServices) {\n return createInHostAndAssert(_this__u8e3s4, productRef, host, coreServices);\n };\n protoOf(PlacementExtensions).createInScene = function (_this__u8e3s4, productRef, coreServices) {\n return createInScene(_this__u8e3s4, productRef, coreServices);\n };\n protoOf(PlacementExtensions).createInHost = function (_this__u8e3s4, entity, host, coreServices) {\n return createInHost(_this__u8e3s4, entity, host, coreServices);\n };\n protoOf(PlacementExtensions).createAtPosition = function (_this__u8e3s4, entity, position, coreServices) {\n return createAtPosition(_this__u8e3s4, entity, position, coreServices);\n };\n protoOf(PlacementExtensions).createAtPositionAndAssert = function (_this__u8e3s4, productRef, position, coreServices) {\n return createAtPositionAndAssert(_this__u8e3s4, productRef, position, coreServices);\n };\n protoOf(PlacementExtensions).fillHostWithProduct = function (_this__u8e3s4, productRef, host, coreServices) {\n return fillHostWithProduct(_this__u8e3s4, productRef, host, coreServices);\n };\n var PlacementExtensions_instance;\n function PlacementExtensions_getInstance() {\n return PlacementExtensions_instance;\n }\n function createInSceneAndAssert(_this__u8e3s4, productRef, coreServices) {\n var result = createInScene(_this__u8e3s4, productRef, coreServices);\n if (!result.valid) {\n // Inline function 'kotlin.error' call\n var message = 'Could not place product: ' + result;\n throw IllegalStateException_init_$Create$(toString(message));\n }\n var x = ensureNotNull(result.placedEntity);\n var tmp0_elvis_lhs = get_snapRoot(x);\n return tmp0_elvis_lhs == null ? x : tmp0_elvis_lhs;\n }\n function createInHostAndAssert(_this__u8e3s4, productRef, host, coreServices) {\n var result = createInHost(_this__u8e3s4, productRef, host, coreServices);\n if (!result.valid) {\n // Inline function 'kotlin.error' call\n var message = 'Could not place product (' + productRef + ') in host ' + host.id + ': ' + result;\n throw IllegalStateException_init_$Create$(toString(message));\n }\n var x = ensureNotNull(result.placedEntity);\n var tmp0_elvis_lhs = get_snapRoot(x);\n return tmp0_elvis_lhs == null ? x : tmp0_elvis_lhs;\n }\n function createAndAlignToTargetAndAssert(_this__u8e3s4, productRef, alignTarget, entityAlignmentConnectorKey, targetAlignmentConnectorKey, coreServices) {\n var result = createAndSnapToSceneWithAlignment(_this__u8e3s4, productRef, alignTarget, entityAlignmentConnectorKey, targetAlignmentConnectorKey, coreServices);\n if (!result.valid) {\n // Inline function 'kotlin.error' call\n var message = 'Could not place product (' + productRef + ') in host ' + alignTarget.id + ': ' + result;\n throw IllegalStateException_init_$Create$(toString(message));\n }\n var x = ensureNotNull(result.placedEntity);\n var tmp0_elvis_lhs = get_snapRoot(x);\n return tmp0_elvis_lhs == null ? x : tmp0_elvis_lhs;\n }\n function createInScene(_this__u8e3s4, productRef, coreServices) {\n var tmp0_elvis_lhs = coreServices.productManager.createEntity(productRef);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n var message = 'Could not create product ' + productRef;\n throw IllegalStateException_init_$Create$(toString(message));\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var productEntity = tmp;\n return _this__u8e3s4.snapToScene(productEntity);\n }\n function createInHost(_this__u8e3s4, entity, host, coreServices) {\n var productEntity = coreServices.productManager.createEntity(entity);\n var tmp;\n if (productEntity == null) {\n var tmp_0 = Companion_instance_0;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [Companion_instance_1.fail('No product found with ref', entity)];\n tmp = tmp_0.failWithErrors(tmp$ret$2);\n } else {\n return _this__u8e3s4.snapToTarget(productEntity, host);\n }\n return tmp;\n }\n function createAndSnapToSceneWithAlignment(_this__u8e3s4, entity, alignTarget, entityAlignmentConnectorKey, targetAlignmentConnectorKey, coreServices) {\n var productEntity = coreServices.productManager.createEntity(entity);\n var tmp;\n if (productEntity == null) {\n var tmp_0 = Companion_instance_0;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [Companion_instance_1.fail('No product found with ref', entity)];\n tmp = tmp_0.failWithErrors(tmp$ret$2);\n } else {\n return _this__u8e3s4.alignToTargetSpecificConnectors(productEntity, entityAlignmentConnectorKey, alignTarget, targetAlignmentConnectorKey);\n }\n return tmp;\n }\n function createAtPosition(_this__u8e3s4, productRef, position, coreServices) {\n var productEntity = coreServices.productManager.createEntity(productRef);\n var tmp;\n if (productEntity == null) {\n var tmp_0 = Companion_instance_0;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [Companion_instance_1.fail('No product found with ref', productRef)];\n tmp = tmp_0.failWithErrors(tmp$ret$2);\n } else {\n tmp = _this__u8e3s4.snapToPosition(productEntity, position, false);\n }\n return tmp;\n }\n function createAtPositionAllowWarnings(_this__u8e3s4, productRef, position, coreServices) {\n var productEntity = ensureNotNull(coreServices.productManager.createEntity(productRef));\n return _this__u8e3s4.snapToPosition(productEntity, position, true);\n }\n function createAtPositionAndAssert(_this__u8e3s4, productRef, position, coreServices) {\n var result = createAtPosition(_this__u8e3s4, productRef, position, coreServices);\n if (!result.valid) {\n // Inline function 'kotlin.error' call\n var message = 'Could not place product (' + productRef + ') at ' + position + ': ' + result;\n throw IllegalStateException_init_$Create$(toString(message));\n }\n var x = ensureNotNull(result.placedEntity);\n var tmp0_elvis_lhs = get_snapRoot(x);\n return tmp0_elvis_lhs == null ? x : tmp0_elvis_lhs;\n }\n function fillHostWithProduct(_this__u8e3s4, productRef, host, coreServices) {\n var valid = true;\n while (valid) {\n var result = createInHost(_this__u8e3s4, productRef, host, coreServices);\n valid = result.valid;\n }\n }\n function getProductInOrderLeftToRight(_this__u8e3s4, ref) {\n // Inline function 'kotlin.collections.sortedBy' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = _this__u8e3s4.entities;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.test.helper.extensions.getProductInOrderLeftToRight.' call\n if (get_productRef(element) === ref) {\n destination.q(element);\n }\n }\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp = getProductInOrderLeftToRight$lambda;\n var tmp$ret$3 = new sam$kotlin_Comparator$0_0(tmp);\n return sortedWith(destination, tmp$ret$3);\n }\n function sam$kotlin_Comparator$0_0(function_0) {\n this.g4d_1 = function_0;\n }\n protoOf(sam$kotlin_Comparator$0_0).u1j = function (a, b) {\n return this.g4d_1(a, b);\n };\n protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {\n return this.u1j(a, b);\n };\n function getProductInOrderLeftToRight$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'com.ikea.core.test.helper.extensions.getProductInOrderLeftToRight.' call\n var tmp = get_worldPosition(a).X;\n // Inline function 'com.ikea.core.test.helper.extensions.getProductInOrderLeftToRight.' call\n var tmp$ret$1 = get_worldPosition(b).X;\n return compareValues(tmp, tmp$ret$1);\n }\n function CountSystem() {\n SystemBase.call(this, 'CountSystem', 0);\n this.enable();\n this.addCount = 0;\n this.updateCount = 0;\n this.removeCount = 0;\n }\n protoOf(CountSystem).p4d = function (_set____db54di) {\n this.addCount = _set____db54di;\n };\n protoOf(CountSystem).q4d = function () {\n return this.addCount;\n };\n protoOf(CountSystem).r4d = function (_set____db54di) {\n this.updateCount = _set____db54di;\n };\n protoOf(CountSystem).s4d = function () {\n return this.updateCount;\n };\n protoOf(CountSystem).t4d = function (_set____db54di) {\n this.removeCount = _set____db54di;\n };\n protoOf(CountSystem).u4d = function () {\n return this.removeCount;\n };\n protoOf(CountSystem).onAddComponent = function (entity, newComponent) {\n this.addCount = this.addCount + 1 | 0;\n };\n protoOf(CountSystem).onUpdateComponent = function (entity, oldComponent, newComponent) {\n this.updateCount = this.updateCount + 1 | 0;\n };\n protoOf(CountSystem).onRemoveComponent = function (entity, oldComponent) {\n this.removeCount = this.removeCount + 1 | 0;\n };\n protoOf(CountSystem).reset = function () {\n this.addCount = 0;\n this.updateCount = 0;\n this.removeCount = 0;\n };\n protoOf(CountSystem).w1o = function () {\n // Inline function 'kotlin.emptyArray' call\n return [];\n };\n function createRoomFromData($this, data) {\n return new RoomGeneratorUtils$createRoomFromData$1(data);\n }\n function boundingBox($this, boundingBox) {\n return new RoomGeneratorUtils$boundingBox$1(boundingBox);\n }\n function transform($this, transform) {\n return new RoomGeneratorUtils$transform$1(transform);\n }\n function rotation($this, rotation) {\n return new RoomGeneratorUtils$rotation$1(rotation);\n }\n function RoomGeneratorUtils$createRoom$lambda($this$Json) {\n $this$Json.f16_1 = false;\n $this$Json.h16_1 = true;\n return Unit_instance;\n }\n function RoomGeneratorUtils$createRoomFromData$1($data) {\n this.v4d_1 = RoomGeneratorUtils_instance.surfaces($data);\n this.w4d_1 = RoomGeneratorUtils_instance.edges($data);\n this.x4d_1 = RoomGeneratorUtils_instance.corners($data);\n this.y4d_1 = RoomGeneratorUtils_instance.obstacles($data);\n }\n protoOf(RoomGeneratorUtils$createRoomFromData$1).l23 = function () {\n return this.v4d_1;\n };\n protoOf(RoomGeneratorUtils$createRoomFromData$1).n3j = function () {\n return this.w4d_1;\n };\n protoOf(RoomGeneratorUtils$createRoomFromData$1).r3k = function () {\n return this.x4d_1;\n };\n protoOf(RoomGeneratorUtils$createRoomFromData$1).o3j = function () {\n return this.y4d_1;\n };\n function RoomGeneratorUtils$point$1($p) {\n this.z4d_1 = $p.x;\n this.a4e_1 = $p.y;\n this.b4e_1 = $p.z;\n }\n protoOf(RoomGeneratorUtils$point$1).i2d = function () {\n return this.z4d_1;\n };\n protoOf(RoomGeneratorUtils$point$1).j2d = function () {\n return this.a4e_1;\n };\n protoOf(RoomGeneratorUtils$point$1).k2d = function () {\n return this.b4e_1;\n };\n function RoomGeneratorUtils$surfaces$1$1($it) {\n this.c4e_1 = $it.id;\n this.d4e_1 = $it.type;\n this.e4e_1 = RoomGeneratorUtils_instance.vertices($it.vertices);\n }\n protoOf(RoomGeneratorUtils$surfaces$1$1).s1k = function () {\n return this.c4e_1;\n };\n protoOf(RoomGeneratorUtils$surfaces$1$1).a1x = function () {\n return this.d4e_1;\n };\n protoOf(RoomGeneratorUtils$surfaces$1$1).b23 = function () {\n return this.e4e_1;\n };\n function RoomGeneratorUtils$edges$1$1($it) {\n this.f4e_1 = $it.id;\n this.g4e_1 = $it.surface1;\n this.h4e_1 = $it.surface2;\n this.i4e_1 = RoomGeneratorUtils_instance.point($it.vertex1);\n this.j4e_1 = RoomGeneratorUtils_instance.point($it.vertex2);\n }\n protoOf(RoomGeneratorUtils$edges$1$1).s1k = function () {\n return this.f4e_1;\n };\n protoOf(RoomGeneratorUtils$edges$1$1).s3k = function () {\n return this.g4e_1;\n };\n protoOf(RoomGeneratorUtils$edges$1$1).t3k = function () {\n return this.h4e_1;\n };\n protoOf(RoomGeneratorUtils$edges$1$1).u3k = function () {\n return this.i4e_1;\n };\n protoOf(RoomGeneratorUtils$edges$1$1).v3k = function () {\n return this.j4e_1;\n };\n function RoomGeneratorUtils$corners$1$1($it) {\n this.k4e_1 = $it.id;\n this.l4e_1 = RoomGeneratorUtils_instance.point($it.position);\n this.m4e_1 = $it.edges;\n this.n4e_1 = $it.surfaces;\n }\n protoOf(RoomGeneratorUtils$corners$1$1).s1k = function () {\n return this.k4e_1;\n };\n protoOf(RoomGeneratorUtils$corners$1$1).ct = function () {\n return this.l4e_1;\n };\n protoOf(RoomGeneratorUtils$corners$1$1).n3j = function () {\n return this.m4e_1;\n };\n protoOf(RoomGeneratorUtils$corners$1$1).l23 = function () {\n return this.n4e_1;\n };\n function RoomGeneratorUtils$obstacles$1$1($it) {\n this.o4e_1 = $it.id;\n this.p4e_1 = $it.type;\n this.q4e_1 = boundingBox(RoomGeneratorUtils_instance, $it.boundingBox);\n }\n protoOf(RoomGeneratorUtils$obstacles$1$1).s1k = function () {\n return this.o4e_1;\n };\n protoOf(RoomGeneratorUtils$obstacles$1$1).a1x = function () {\n return this.p4e_1;\n };\n protoOf(RoomGeneratorUtils$obstacles$1$1).m3k = function () {\n return this.q4e_1;\n };\n function RoomGeneratorUtils$boundingBox$1($boundingBox) {\n this.r4e_1 = RoomGeneratorUtils_instance.point($boundingBox.size);\n this.s4e_1 = transform(RoomGeneratorUtils_instance, $boundingBox.transform);\n }\n protoOf(RoomGeneratorUtils$boundingBox$1).n = function () {\n return this.r4e_1;\n };\n protoOf(RoomGeneratorUtils$boundingBox$1).d1x = function () {\n return this.s4e_1;\n };\n function RoomGeneratorUtils$transform$1($transform) {\n this.t4e_1 = RoomGeneratorUtils_instance.point($transform.position);\n this.u4e_1 = rotation(RoomGeneratorUtils_instance, $transform.rotation);\n }\n protoOf(RoomGeneratorUtils$transform$1).ct = function () {\n return this.t4e_1;\n };\n protoOf(RoomGeneratorUtils$transform$1).v1k = function () {\n return this.u4e_1;\n };\n function RoomGeneratorUtils$rotation$1($rotation) {\n this.v4e_1 = $rotation.x;\n this.w4e_1 = $rotation.y;\n this.x4e_1 = $rotation.z;\n this.y4e_1 = $rotation.w;\n }\n protoOf(RoomGeneratorUtils$rotation$1).i2d = function () {\n return this.v4e_1;\n };\n protoOf(RoomGeneratorUtils$rotation$1).j2d = function () {\n return this.w4e_1;\n };\n protoOf(RoomGeneratorUtils$rotation$1).k2d = function () {\n return this.x4e_1;\n };\n protoOf(RoomGeneratorUtils$rotation$1).h2d = function () {\n return this.y4e_1;\n };\n function RoomGeneratorUtils() {\n }\n protoOf(RoomGeneratorUtils).createRoom = function (json) {\n var serializer_0 = Json(VOID, RoomGeneratorUtils$createRoom$lambda);\n // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call\n // Inline function 'kotlinx.serialization.serializer' call\n var this_0 = serializer_0.co();\n // Inline function 'kotlinx.serialization.internal.cast' call\n var this_1 = serializer(this_0, createKType(getKClass(RoomGeometryDataTestImpl), arrayOf([]), false));\n var tmp$ret$1 = isInterface(this_1, KSerializer) ? this_1 : THROW_CCE();\n var data = serializer_0.j15(tmp$ret$1, json);\n return createRoomFromData(this, data);\n };\n protoOf(RoomGeneratorUtils).roomPoint3D = function (vector) {\n return new RoomPoint3DImpl(vector.X, vector.Y, vector.Z);\n };\n protoOf(RoomGeneratorUtils).point = function (p) {\n return new RoomGeneratorUtils$point$1(p);\n };\n protoOf(RoomGeneratorUtils).vertices = function (verts) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(verts.length);\n var inductionVariable = 0;\n var last = verts.length;\n while (inductionVariable < last) {\n var item = verts[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var tmp$ret$0 = RoomGeneratorUtils_instance.point(item);\n destination.q(tmp$ret$0);\n }\n return copyToArray(destination);\n };\n protoOf(RoomGeneratorUtils).surfaces = function (room) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = room.surfaces;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.test.helper.utils.RoomGeneratorUtils.surfaces.' call\n var tmp$ret$0 = new RoomGeneratorUtils$surfaces$1$1(item);\n destination.q(tmp$ret$0);\n }\n return copyToArray(destination);\n };\n protoOf(RoomGeneratorUtils).edges = function (room) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = room.edges;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.test.helper.utils.RoomGeneratorUtils.edges.' call\n var tmp$ret$0 = new RoomGeneratorUtils$edges$1$1(item);\n destination.q(tmp$ret$0);\n }\n return copyToArray(destination);\n };\n protoOf(RoomGeneratorUtils).corners = function (room) {\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n var this_0 = room.corners;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(this_0.length);\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var item = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.test.helper.utils.RoomGeneratorUtils.corners.' call\n var tmp$ret$0 = new RoomGeneratorUtils$corners$1$1(item);\n destination.q(tmp$ret$0);\n }\n return copyToArray(destination);\n };\n protoOf(RoomGeneratorUtils).obstacles = function (room) {\n var tmp0_safe_receiver = room.obstacles;\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$_0(tmp0_safe_receiver.length);\n var inductionVariable = 0;\n var last = tmp0_safe_receiver.length;\n while (inductionVariable < last) {\n var item = tmp0_safe_receiver[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.test.helper.utils.RoomGeneratorUtils.obstacles.' call\n var tmp$ret$0 = new RoomGeneratorUtils$obstacles$1$1(item);\n destination.q(tmp$ret$0);\n }\n tmp = destination;\n }\n var tmp1_safe_receiver = tmp;\n var tmp_0;\n if (tmp1_safe_receiver == null) {\n tmp_0 = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp_0 = copyToArray(tmp1_safe_receiver);\n }\n var tmp2_elvis_lhs = tmp_0;\n var tmp_1;\n if (tmp2_elvis_lhs == null) {\n // Inline function 'kotlin.emptyArray' call\n tmp_1 = [];\n } else {\n tmp_1 = tmp2_elvis_lhs;\n }\n return tmp_1;\n };\n var RoomGeneratorUtils_instance;\n function RoomGeneratorUtils_getInstance() {\n return RoomGeneratorUtils_instance;\n }\n function Companion() {\n Companion_instance_2 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.z4e_1 = [new ReferenceArraySerializer(getKClass(RoomSurfaceTestImpl), $serializer_getInstance_0()), new ReferenceArraySerializer(getKClass(RoomEdgeTestImpl), $serializer_getInstance_1()), new ReferenceArraySerializer(getKClass(RoomCornerTestImpl), $serializer_getInstance_2()), new ReferenceArraySerializer(getKClass(RoomObstacleTestImpl), $serializer_getInstance_4())];\n }\n protoOf(Companion).l17 = function () {\n return $serializer_getInstance();\n };\n var Companion_instance_2;\n function Companion_getInstance() {\n if (Companion_instance_2 == null)\n new Companion();\n return Companion_instance_2;\n }\n function $serializer() {\n $serializer_instance = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.test.helper.utils.RoomGeometryDataTestImpl', this, 4);\n tmp0_serialDesc.cv('surfaces', false);\n tmp0_serialDesc.cv('edges', false);\n tmp0_serialDesc.cv('corners', false);\n tmp0_serialDesc.cv('obstacles', true);\n this.a4f_1 = tmp0_serialDesc;\n }\n protoOf($serializer).ok = function () {\n return this.a4f_1;\n };\n protoOf($serializer).rv = function () {\n var tmp0_cached = Companion_getInstance().z4e_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [tmp0_cached[0], tmp0_cached[1], tmp0_cached[2], get_nullable(tmp0_cached[3])];\n };\n protoOf($serializer).qk = function (decoder) {\n var tmp0_desc = this.a4f_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_input = decoder.nn(tmp0_desc);\n var tmp9_cached = Companion_getInstance().z4e_1;\n if (tmp8_input.do()) {\n tmp4_local0 = tmp8_input.zn(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp8_input.zn(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp8_input.zn(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp8_input.bo(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp8_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp8_input.zn(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp8_input.zn(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp8_input.zn(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp8_input.bo(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp8_input.on(tmp0_desc);\n return RoomGeometryDataTestImpl_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);\n };\n protoOf($serializer).b4f = function (encoder, value) {\n var tmp0_desc = this.a4f_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance().z4e_1;\n tmp1_output.ep(tmp0_desc, 0, tmp2_cached[0], value.surfaces);\n tmp1_output.ep(tmp0_desc, 1, tmp2_cached[1], value.edges);\n tmp1_output.ep(tmp0_desc, 2, tmp2_cached[2], value.corners);\n if (tmp1_output.kp(tmp0_desc, 3) ? true : !(value.obstacles == null)) {\n tmp1_output.gp(tmp0_desc, 3, tmp2_cached[3], value.obstacles);\n }\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer).pk = function (encoder, value) {\n return this.b4f(encoder, value instanceof RoomGeometryDataTestImpl ? value : THROW_CCE());\n };\n var $serializer_instance;\n function $serializer_getInstance() {\n if ($serializer_instance == null)\n new $serializer();\n return $serializer_instance;\n }\n function RoomGeometryDataTestImpl_init_$Init$(seen1, surfaces, edges, corners, obstacles, serializationConstructorMarker, $this) {\n if (!(7 === (7 & seen1))) {\n throwMissingFieldException(seen1, 7, $serializer_getInstance().a4f_1);\n }\n $this.surfaces = surfaces;\n $this.edges = edges;\n $this.corners = corners;\n if (0 === (seen1 & 8))\n $this.obstacles = null;\n else\n $this.obstacles = obstacles;\n return $this;\n }\n function RoomGeometryDataTestImpl_init_$Create$(seen1, surfaces, edges, corners, obstacles, serializationConstructorMarker) {\n return RoomGeometryDataTestImpl_init_$Init$(seen1, surfaces, edges, corners, obstacles, serializationConstructorMarker, objectCreate(protoOf(RoomGeometryDataTestImpl)));\n }\n function RoomGeometryDataTestImpl(surfaces, edges, corners, obstacles) {\n Companion_getInstance();\n obstacles = obstacles === VOID ? null : obstacles;\n this.surfaces = surfaces;\n this.edges = edges;\n this.corners = corners;\n this.obstacles = obstacles;\n }\n protoOf(RoomGeometryDataTestImpl).l23 = function () {\n return this.surfaces;\n };\n protoOf(RoomGeometryDataTestImpl).n3j = function () {\n return this.edges;\n };\n protoOf(RoomGeometryDataTestImpl).r3k = function () {\n return this.corners;\n };\n protoOf(RoomGeometryDataTestImpl).o3j = function () {\n return this.obstacles;\n };\n function Companion_0() {\n Companion_instance_3 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.c4f_1 = [null, null, new ReferenceArraySerializer(getKClass(RoomPoint3DTestImpl), $serializer_getInstance_3())];\n }\n protoOf(Companion_0).l17 = function () {\n return $serializer_getInstance_0();\n };\n var Companion_instance_3;\n function Companion_getInstance_0() {\n if (Companion_instance_3 == null)\n new Companion_0();\n return Companion_instance_3;\n }\n function $serializer_0() {\n $serializer_instance_0 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.test.helper.utils.RoomSurfaceTestImpl', this, 3);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('type', false);\n tmp0_serialDesc.cv('vertices', false);\n this.d4f_1 = tmp0_serialDesc;\n }\n protoOf($serializer_0).ok = function () {\n return this.d4f_1;\n };\n protoOf($serializer_0).rv = function () {\n var tmp0_cached = Companion_getInstance_0().c4f_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[2]];\n };\n protoOf($serializer_0).qk = function (decoder) {\n var tmp0_desc = this.d4f_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n var tmp8_cached = Companion_getInstance_0().c4f_1;\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return RoomSurfaceTestImpl_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_0).e4f = function (encoder, value) {\n var tmp0_desc = this.d4f_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_0().c4f_1;\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.cp(tmp0_desc, 1, value.type);\n tmp1_output.ep(tmp0_desc, 2, tmp2_cached[2], value.vertices);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_0).pk = function (encoder, value) {\n return this.e4f(encoder, value instanceof RoomSurfaceTestImpl ? value : THROW_CCE());\n };\n var $serializer_instance_0;\n function $serializer_getInstance_0() {\n if ($serializer_instance_0 == null)\n new $serializer_0();\n return $serializer_instance_0;\n }\n function RoomSurfaceTestImpl_init_$Init$(seen1, id, type, vertices, serializationConstructorMarker, $this) {\n if (!(7 === (7 & seen1))) {\n throwMissingFieldException(seen1, 7, $serializer_getInstance_0().d4f_1);\n }\n $this.id = id;\n $this.type = type;\n $this.vertices = vertices;\n return $this;\n }\n function RoomSurfaceTestImpl_init_$Create$(seen1, id, type, vertices, serializationConstructorMarker) {\n return RoomSurfaceTestImpl_init_$Init$(seen1, id, type, vertices, serializationConstructorMarker, objectCreate(protoOf(RoomSurfaceTestImpl)));\n }\n function RoomSurfaceTestImpl(id, type, vertices) {\n Companion_getInstance_0();\n this.id = id;\n this.type = type;\n this.vertices = vertices;\n }\n protoOf(RoomSurfaceTestImpl).s1k = function () {\n return this.id;\n };\n protoOf(RoomSurfaceTestImpl).a1x = function () {\n return this.type;\n };\n protoOf(RoomSurfaceTestImpl).b23 = function () {\n return this.vertices;\n };\n function Companion_1() {\n }\n protoOf(Companion_1).l17 = function () {\n return $serializer_getInstance_1();\n };\n var Companion_instance_4;\n function Companion_getInstance_1() {\n return Companion_instance_4;\n }\n function $serializer_1() {\n $serializer_instance_1 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.test.helper.utils.RoomEdgeTestImpl', this, 5);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('surface1', false);\n tmp0_serialDesc.cv('surface2', false);\n tmp0_serialDesc.cv('vertex1', false);\n tmp0_serialDesc.cv('vertex2', false);\n this.f4f_1 = tmp0_serialDesc;\n }\n protoOf($serializer_1).ok = function () {\n return this.f4f_1;\n };\n protoOf($serializer_1).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), $serializer_getInstance_3(), $serializer_getInstance_3()];\n };\n protoOf($serializer_1).qk = function (decoder) {\n var tmp0_desc = this.f4f_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_local4 = null;\n var tmp9_input = decoder.nn(tmp0_desc);\n if (tmp9_input.do()) {\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp9_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp9_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp9_input.zn(tmp0_desc, 3, $serializer_getInstance_3(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n tmp8_local4 = tmp9_input.zn(tmp0_desc, 4, $serializer_getInstance_3(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp9_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp9_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp9_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp9_input.xn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp9_input.zn(tmp0_desc, 3, $serializer_getInstance_3(), tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n case 4:\n tmp8_local4 = tmp9_input.zn(tmp0_desc, 4, $serializer_getInstance_3(), tmp8_local4);\n tmp3_bitMask0 = tmp3_bitMask0 | 16;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp9_input.on(tmp0_desc);\n return RoomEdgeTestImpl_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);\n };\n protoOf($serializer_1).g4f = function (encoder, value) {\n var tmp0_desc = this.f4f_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.cp(tmp0_desc, 1, value.surface1);\n tmp1_output.cp(tmp0_desc, 2, value.surface2);\n tmp1_output.ep(tmp0_desc, 3, $serializer_getInstance_3(), value.vertex1);\n tmp1_output.ep(tmp0_desc, 4, $serializer_getInstance_3(), value.vertex2);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_1).pk = function (encoder, value) {\n return this.g4f(encoder, value instanceof RoomEdgeTestImpl ? value : THROW_CCE());\n };\n var $serializer_instance_1;\n function $serializer_getInstance_1() {\n if ($serializer_instance_1 == null)\n new $serializer_1();\n return $serializer_instance_1;\n }\n function RoomEdgeTestImpl_init_$Init$(seen1, id, surface1, surface2, vertex1, vertex2, serializationConstructorMarker, $this) {\n if (!(31 === (31 & seen1))) {\n throwMissingFieldException(seen1, 31, $serializer_getInstance_1().f4f_1);\n }\n $this.id = id;\n $this.surface1 = surface1;\n $this.surface2 = surface2;\n $this.vertex1 = vertex1;\n $this.vertex2 = vertex2;\n return $this;\n }\n function RoomEdgeTestImpl_init_$Create$(seen1, id, surface1, surface2, vertex1, vertex2, serializationConstructorMarker) {\n return RoomEdgeTestImpl_init_$Init$(seen1, id, surface1, surface2, vertex1, vertex2, serializationConstructorMarker, objectCreate(protoOf(RoomEdgeTestImpl)));\n }\n function RoomEdgeTestImpl(id, surface1, surface2, vertex1, vertex2) {\n this.id = id;\n this.surface1 = surface1;\n this.surface2 = surface2;\n this.vertex1 = vertex1;\n this.vertex2 = vertex2;\n }\n protoOf(RoomEdgeTestImpl).s1k = function () {\n return this.id;\n };\n protoOf(RoomEdgeTestImpl).s3k = function () {\n return this.surface1;\n };\n protoOf(RoomEdgeTestImpl).t3k = function () {\n return this.surface2;\n };\n protoOf(RoomEdgeTestImpl).u3k = function () {\n return this.vertex1;\n };\n protoOf(RoomEdgeTestImpl).v3k = function () {\n return this.vertex2;\n };\n function Companion_2() {\n Companion_instance_5 = this;\n var tmp = this;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp.h4f_1 = [null, null, new ReferenceArraySerializer(PrimitiveClasses_getInstance().u7(), StringSerializer_getInstance()), new ReferenceArraySerializer(PrimitiveClasses_getInstance().u7(), StringSerializer_getInstance())];\n }\n protoOf(Companion_2).l17 = function () {\n return $serializer_getInstance_2();\n };\n var Companion_instance_5;\n function Companion_getInstance_2() {\n if (Companion_instance_5 == null)\n new Companion_2();\n return Companion_instance_5;\n }\n function $serializer_2() {\n $serializer_instance_2 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.test.helper.utils.RoomCornerTestImpl', this, 4);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('position', false);\n tmp0_serialDesc.cv('surfaces', false);\n tmp0_serialDesc.cv('edges', false);\n this.i4f_1 = tmp0_serialDesc;\n }\n protoOf($serializer_2).ok = function () {\n return this.i4f_1;\n };\n protoOf($serializer_2).rv = function () {\n var tmp0_cached = Companion_getInstance_2().h4f_1;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), $serializer_getInstance_3(), tmp0_cached[2], tmp0_cached[3]];\n };\n protoOf($serializer_2).qk = function (decoder) {\n var tmp0_desc = this.i4f_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_local3 = null;\n var tmp8_input = decoder.nn(tmp0_desc);\n var tmp9_cached = Companion_getInstance_2().h4f_1;\n if (tmp8_input.do()) {\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp8_input.zn(tmp0_desc, 1, $serializer_getInstance_3(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp8_input.zn(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp8_input.zn(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp8_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp8_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp8_input.zn(tmp0_desc, 1, $serializer_getInstance_3(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp8_input.zn(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp8_input.zn(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp8_input.on(tmp0_desc);\n return RoomCornerTestImpl_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);\n };\n protoOf($serializer_2).j4f = function (encoder, value) {\n var tmp0_desc = this.i4f_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n var tmp2_cached = Companion_getInstance_2().h4f_1;\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance_3(), value.position);\n tmp1_output.ep(tmp0_desc, 2, tmp2_cached[2], value.surfaces);\n tmp1_output.ep(tmp0_desc, 3, tmp2_cached[3], value.edges);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_2).pk = function (encoder, value) {\n return this.j4f(encoder, value instanceof RoomCornerTestImpl ? value : THROW_CCE());\n };\n var $serializer_instance_2;\n function $serializer_getInstance_2() {\n if ($serializer_instance_2 == null)\n new $serializer_2();\n return $serializer_instance_2;\n }\n function RoomCornerTestImpl_init_$Init$(seen1, id, position, surfaces, edges, serializationConstructorMarker, $this) {\n if (!(15 === (15 & seen1))) {\n throwMissingFieldException(seen1, 15, $serializer_getInstance_2().i4f_1);\n }\n $this.id = id;\n $this.position = position;\n $this.surfaces = surfaces;\n $this.edges = edges;\n return $this;\n }\n function RoomCornerTestImpl_init_$Create$(seen1, id, position, surfaces, edges, serializationConstructorMarker) {\n return RoomCornerTestImpl_init_$Init$(seen1, id, position, surfaces, edges, serializationConstructorMarker, objectCreate(protoOf(RoomCornerTestImpl)));\n }\n function RoomCornerTestImpl(id, position, surfaces, edges) {\n Companion_getInstance_2();\n this.id = id;\n this.position = position;\n this.surfaces = surfaces;\n this.edges = edges;\n }\n protoOf(RoomCornerTestImpl).s1k = function () {\n return this.id;\n };\n protoOf(RoomCornerTestImpl).ct = function () {\n return this.position;\n };\n protoOf(RoomCornerTestImpl).l23 = function () {\n return this.surfaces;\n };\n protoOf(RoomCornerTestImpl).n3j = function () {\n return this.edges;\n };\n function Companion_3() {\n }\n protoOf(Companion_3).l17 = function () {\n return $serializer_getInstance_3();\n };\n var Companion_instance_6;\n function Companion_getInstance_3() {\n return Companion_instance_6;\n }\n function $serializer_3() {\n $serializer_instance_3 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.test.helper.utils.RoomPoint3DTestImpl', this, 3);\n tmp0_serialDesc.cv('x', false);\n tmp0_serialDesc.cv('y', false);\n tmp0_serialDesc.cv('z', false);\n this.k4f_1 = tmp0_serialDesc;\n }\n protoOf($serializer_3).ok = function () {\n return this.k4f_1;\n };\n protoOf($serializer_3).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), DoubleSerializer_getInstance()];\n };\n protoOf($serializer_3).qk = function (decoder) {\n var tmp0_desc = this.k4f_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = 0.0;\n var tmp5_local1 = 0.0;\n var tmp6_local2 = 0.0;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return RoomPoint3DTestImpl_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_3).l4f = function (encoder, value) {\n var tmp0_desc = this.k4f_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.ap(tmp0_desc, 0, value.x);\n tmp1_output.ap(tmp0_desc, 1, value.y);\n tmp1_output.ap(tmp0_desc, 2, value.z);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_3).pk = function (encoder, value) {\n return this.l4f(encoder, value instanceof RoomPoint3DTestImpl ? value : THROW_CCE());\n };\n var $serializer_instance_3;\n function $serializer_getInstance_3() {\n if ($serializer_instance_3 == null)\n new $serializer_3();\n return $serializer_instance_3;\n }\n function RoomPoint3DTestImpl_init_$Init$(seen1, x, y, z, serializationConstructorMarker, $this) {\n if (!(7 === (7 & seen1))) {\n throwMissingFieldException(seen1, 7, $serializer_getInstance_3().k4f_1);\n }\n $this.x = x;\n $this.y = y;\n $this.z = z;\n return $this;\n }\n function RoomPoint3DTestImpl_init_$Create$(seen1, x, y, z, serializationConstructorMarker) {\n return RoomPoint3DTestImpl_init_$Init$(seen1, x, y, z, serializationConstructorMarker, objectCreate(protoOf(RoomPoint3DTestImpl)));\n }\n function RoomPoint3DTestImpl(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n protoOf(RoomPoint3DTestImpl).i2d = function () {\n return this.x;\n };\n protoOf(RoomPoint3DTestImpl).j2d = function () {\n return this.y;\n };\n protoOf(RoomPoint3DTestImpl).k2d = function () {\n return this.z;\n };\n function Companion_4() {\n }\n protoOf(Companion_4).l17 = function () {\n return $serializer_getInstance_4();\n };\n var Companion_instance_7;\n function Companion_getInstance_4() {\n return Companion_instance_7;\n }\n function $serializer_4() {\n $serializer_instance_4 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.test.helper.utils.RoomObstacleTestImpl', this, 3);\n tmp0_serialDesc.cv('id', false);\n tmp0_serialDesc.cv('type', false);\n tmp0_serialDesc.cv('boundingBox', false);\n this.m4f_1 = tmp0_serialDesc;\n }\n protoOf($serializer_4).ok = function () {\n return this.m4f_1;\n };\n protoOf($serializer_4).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [StringSerializer_getInstance(), StringSerializer_getInstance(), $serializer_getInstance_6()];\n };\n protoOf($serializer_4).qk = function (decoder) {\n var tmp0_desc = this.m4f_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_local2 = null;\n var tmp7_input = decoder.nn(tmp0_desc);\n if (tmp7_input.do()) {\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp7_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, $serializer_getInstance_6(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp7_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp7_input.xn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp7_input.xn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp7_input.zn(tmp0_desc, 2, $serializer_getInstance_6(), tmp6_local2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp7_input.on(tmp0_desc);\n return RoomObstacleTestImpl_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);\n };\n protoOf($serializer_4).n4f = function (encoder, value) {\n var tmp0_desc = this.m4f_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.cp(tmp0_desc, 0, value.id);\n tmp1_output.cp(tmp0_desc, 1, value.type);\n tmp1_output.ep(tmp0_desc, 2, $serializer_getInstance_6(), value.boundingBox);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_4).pk = function (encoder, value) {\n return this.n4f(encoder, value instanceof RoomObstacleTestImpl ? value : THROW_CCE());\n };\n var $serializer_instance_4;\n function $serializer_getInstance_4() {\n if ($serializer_instance_4 == null)\n new $serializer_4();\n return $serializer_instance_4;\n }\n function RoomObstacleTestImpl_init_$Init$(seen1, id, type, boundingBox, serializationConstructorMarker, $this) {\n if (!(7 === (7 & seen1))) {\n throwMissingFieldException(seen1, 7, $serializer_getInstance_4().m4f_1);\n }\n $this.id = id;\n $this.type = type;\n $this.boundingBox = boundingBox;\n return $this;\n }\n function RoomObstacleTestImpl_init_$Create$(seen1, id, type, boundingBox, serializationConstructorMarker) {\n return RoomObstacleTestImpl_init_$Init$(seen1, id, type, boundingBox, serializationConstructorMarker, objectCreate(protoOf(RoomObstacleTestImpl)));\n }\n function RoomObstacleTestImpl(id, type, boundingBox) {\n this.id = id;\n this.type = type;\n this.boundingBox = boundingBox;\n }\n protoOf(RoomObstacleTestImpl).s1k = function () {\n return this.id;\n };\n protoOf(RoomObstacleTestImpl).a1x = function () {\n return this.type;\n };\n protoOf(RoomObstacleTestImpl).m3k = function () {\n return this.boundingBox;\n };\n function Companion_5() {\n }\n protoOf(Companion_5).l17 = function () {\n return $serializer_getInstance_5();\n };\n var Companion_instance_8;\n function Companion_getInstance_5() {\n return Companion_instance_8;\n }\n function $serializer_5() {\n $serializer_instance_5 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.test.helper.utils.RoomRotationTestImpl', this, 4);\n tmp0_serialDesc.cv('x', false);\n tmp0_serialDesc.cv('y', false);\n tmp0_serialDesc.cv('z', false);\n tmp0_serialDesc.cv('w', false);\n this.o4f_1 = tmp0_serialDesc;\n }\n protoOf($serializer_5).ok = function () {\n return this.o4f_1;\n };\n protoOf($serializer_5).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), DoubleSerializer_getInstance(), DoubleSerializer_getInstance()];\n };\n protoOf($serializer_5).qk = function (decoder) {\n var tmp0_desc = this.o4f_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = 0.0;\n var tmp5_local1 = 0.0;\n var tmp6_local2 = 0.0;\n var tmp7_local3 = 0.0;\n var tmp8_input = decoder.nn(tmp0_desc);\n if (tmp8_input.do()) {\n tmp4_local0 = tmp8_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp8_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n tmp6_local2 = tmp8_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n tmp7_local3 = tmp8_input.vn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp8_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp8_input.vn(tmp0_desc, 0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp8_input.vn(tmp0_desc, 1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n case 2:\n tmp6_local2 = tmp8_input.vn(tmp0_desc, 2);\n tmp3_bitMask0 = tmp3_bitMask0 | 4;\n break;\n case 3:\n tmp7_local3 = tmp8_input.vn(tmp0_desc, 3);\n tmp3_bitMask0 = tmp3_bitMask0 | 8;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp8_input.on(tmp0_desc);\n return RoomRotationTestImpl_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);\n };\n protoOf($serializer_5).p4f = function (encoder, value) {\n var tmp0_desc = this.o4f_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.ap(tmp0_desc, 0, value.x);\n tmp1_output.ap(tmp0_desc, 1, value.y);\n tmp1_output.ap(tmp0_desc, 2, value.z);\n tmp1_output.ap(tmp0_desc, 3, value.w);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_5).pk = function (encoder, value) {\n return this.p4f(encoder, value instanceof RoomRotationTestImpl ? value : THROW_CCE());\n };\n var $serializer_instance_5;\n function $serializer_getInstance_5() {\n if ($serializer_instance_5 == null)\n new $serializer_5();\n return $serializer_instance_5;\n }\n function RoomRotationTestImpl_init_$Init$(seen1, x, y, z, w, serializationConstructorMarker, $this) {\n if (!(15 === (15 & seen1))) {\n throwMissingFieldException(seen1, 15, $serializer_getInstance_5().o4f_1);\n }\n $this.x = x;\n $this.y = y;\n $this.z = z;\n $this.w = w;\n return $this;\n }\n function RoomRotationTestImpl_init_$Create$(seen1, x, y, z, w, serializationConstructorMarker) {\n return RoomRotationTestImpl_init_$Init$(seen1, x, y, z, w, serializationConstructorMarker, objectCreate(protoOf(RoomRotationTestImpl)));\n }\n function RoomRotationTestImpl(x, y, z, w) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n protoOf(RoomRotationTestImpl).i2d = function () {\n return this.x;\n };\n protoOf(RoomRotationTestImpl).j2d = function () {\n return this.y;\n };\n protoOf(RoomRotationTestImpl).k2d = function () {\n return this.z;\n };\n protoOf(RoomRotationTestImpl).h2d = function () {\n return this.w;\n };\n function Companion_6() {\n }\n protoOf(Companion_6).l17 = function () {\n return $serializer_getInstance_6();\n };\n var Companion_instance_9;\n function Companion_getInstance_6() {\n return Companion_instance_9;\n }\n function $serializer_6() {\n $serializer_instance_6 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.test.helper.utils.RoomBoundingBoxTestImpl', this, 2);\n tmp0_serialDesc.cv('size', false);\n tmp0_serialDesc.cv('transform', false);\n this.q4f_1 = tmp0_serialDesc;\n }\n protoOf($serializer_6).ok = function () {\n return this.q4f_1;\n };\n protoOf($serializer_6).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [$serializer_getInstance_3(), $serializer_getInstance_7()];\n };\n protoOf($serializer_6).qk = function (decoder) {\n var tmp0_desc = this.q4f_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_input = decoder.nn(tmp0_desc);\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_7(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_7(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return RoomBoundingBoxTestImpl_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);\n };\n protoOf($serializer_6).r4f = function (encoder, value) {\n var tmp0_desc = this.q4f_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.ep(tmp0_desc, 0, $serializer_getInstance_3(), value.size);\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance_7(), value.transform);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_6).pk = function (encoder, value) {\n return this.r4f(encoder, value instanceof RoomBoundingBoxTestImpl ? value : THROW_CCE());\n };\n var $serializer_instance_6;\n function $serializer_getInstance_6() {\n if ($serializer_instance_6 == null)\n new $serializer_6();\n return $serializer_instance_6;\n }\n function RoomBoundingBoxTestImpl_init_$Init$(seen1, size, transform, serializationConstructorMarker, $this) {\n if (!(3 === (3 & seen1))) {\n throwMissingFieldException(seen1, 3, $serializer_getInstance_6().q4f_1);\n }\n $this.size = size;\n $this.transform = transform;\n return $this;\n }\n function RoomBoundingBoxTestImpl_init_$Create$(seen1, size, transform, serializationConstructorMarker) {\n return RoomBoundingBoxTestImpl_init_$Init$(seen1, size, transform, serializationConstructorMarker, objectCreate(protoOf(RoomBoundingBoxTestImpl)));\n }\n function RoomBoundingBoxTestImpl(size, transform) {\n this.size = size;\n this.transform = transform;\n }\n protoOf(RoomBoundingBoxTestImpl).n = function () {\n return this.size;\n };\n protoOf(RoomBoundingBoxTestImpl).d1x = function () {\n return this.transform;\n };\n function Companion_7() {\n }\n protoOf(Companion_7).l17 = function () {\n return $serializer_getInstance_7();\n };\n var Companion_instance_10;\n function Companion_getInstance_7() {\n return Companion_instance_10;\n }\n function $serializer_7() {\n $serializer_instance_7 = this;\n var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ikea.core.test.helper.utils.RoomTransformTestImpl', this, 2);\n tmp0_serialDesc.cv('position', false);\n tmp0_serialDesc.cv('rotation', false);\n this.s4f_1 = tmp0_serialDesc;\n }\n protoOf($serializer_7).ok = function () {\n return this.s4f_1;\n };\n protoOf($serializer_7).rv = function () {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return [$serializer_getInstance_3(), $serializer_getInstance_5()];\n };\n protoOf($serializer_7).qk = function (decoder) {\n var tmp0_desc = this.s4f_1;\n var tmp1_flag = true;\n var tmp2_index = 0;\n var tmp3_bitMask0 = 0;\n var tmp4_local0 = null;\n var tmp5_local1 = null;\n var tmp6_input = decoder.nn(tmp0_desc);\n if (tmp6_input.do()) {\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_5(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n } else\n while (tmp1_flag) {\n tmp2_index = tmp6_input.eo(tmp0_desc);\n switch (tmp2_index) {\n case -1:\n tmp1_flag = false;\n break;\n case 0:\n tmp4_local0 = tmp6_input.zn(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);\n tmp3_bitMask0 = tmp3_bitMask0 | 1;\n break;\n case 1:\n tmp5_local1 = tmp6_input.zn(tmp0_desc, 1, $serializer_getInstance_5(), tmp5_local1);\n tmp3_bitMask0 = tmp3_bitMask0 | 2;\n break;\n default:\n throw UnknownFieldException_init_$Create$(tmp2_index);\n }\n }\n tmp6_input.on(tmp0_desc);\n return RoomTransformTestImpl_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);\n };\n protoOf($serializer_7).t4f = function (encoder, value) {\n var tmp0_desc = this.s4f_1;\n var tmp1_output = encoder.nn(tmp0_desc);\n tmp1_output.ep(tmp0_desc, 0, $serializer_getInstance_3(), value.position);\n tmp1_output.ep(tmp0_desc, 1, $serializer_getInstance_5(), value.rotation);\n tmp1_output.on(tmp0_desc);\n };\n protoOf($serializer_7).pk = function (encoder, value) {\n return this.t4f(encoder, value instanceof RoomTransformTestImpl ? value : THROW_CCE());\n };\n var $serializer_instance_7;\n function $serializer_getInstance_7() {\n if ($serializer_instance_7 == null)\n new $serializer_7();\n return $serializer_instance_7;\n }\n function RoomTransformTestImpl_init_$Init$(seen1, position, rotation, serializationConstructorMarker, $this) {\n if (!(3 === (3 & seen1))) {\n throwMissingFieldException(seen1, 3, $serializer_getInstance_7().s4f_1);\n }\n $this.position = position;\n $this.rotation = rotation;\n return $this;\n }\n function RoomTransformTestImpl_init_$Create$(seen1, position, rotation, serializationConstructorMarker) {\n return RoomTransformTestImpl_init_$Init$(seen1, position, rotation, serializationConstructorMarker, objectCreate(protoOf(RoomTransformTestImpl)));\n }\n function RoomTransformTestImpl(position, rotation) {\n this.position = position;\n this.rotation = rotation;\n }\n protoOf(RoomTransformTestImpl).ct = function () {\n return this.position;\n };\n protoOf(RoomTransformTestImpl).v1k = function () {\n return this.rotation;\n };\n function RoomGeometryDataImpl(surfaces, edges, corners, obstacles) {\n obstacles = obstacles === VOID ? null : obstacles;\n this.u4f_1 = surfaces;\n this.v4f_1 = edges;\n this.w4f_1 = corners;\n this.x4f_1 = obstacles;\n }\n protoOf(RoomGeometryDataImpl).l23 = function () {\n return this.u4f_1;\n };\n protoOf(RoomGeometryDataImpl).n3j = function () {\n return this.v4f_1;\n };\n protoOf(RoomGeometryDataImpl).r3k = function () {\n return this.w4f_1;\n };\n protoOf(RoomGeometryDataImpl).o3j = function () {\n return this.x4f_1;\n };\n function RoomSurfaceImpl(id, type, vertices) {\n this.y4f_1 = id;\n this.z4f_1 = type;\n this.a4g_1 = vertices;\n }\n protoOf(RoomSurfaceImpl).s1k = function () {\n return this.y4f_1;\n };\n protoOf(RoomSurfaceImpl).a1x = function () {\n return this.z4f_1;\n };\n protoOf(RoomSurfaceImpl).b23 = function () {\n return this.a4g_1;\n };\n function RoomEdgeImpl(id, surface1, surface2, vertex1, vertex2) {\n this.b4g_1 = id;\n this.c4g_1 = surface1;\n this.d4g_1 = surface2;\n this.e4g_1 = vertex1;\n this.f4g_1 = vertex2;\n }\n protoOf(RoomEdgeImpl).s1k = function () {\n return this.b4g_1;\n };\n protoOf(RoomEdgeImpl).s3k = function () {\n return this.c4g_1;\n };\n protoOf(RoomEdgeImpl).t3k = function () {\n return this.d4g_1;\n };\n protoOf(RoomEdgeImpl).u3k = function () {\n return this.e4g_1;\n };\n protoOf(RoomEdgeImpl).v3k = function () {\n return this.f4g_1;\n };\n function RoomCornerImpl(id, position, surfaces, edges) {\n this.g4g_1 = id;\n this.h4g_1 = position;\n this.i4g_1 = surfaces;\n this.j4g_1 = edges;\n }\n protoOf(RoomCornerImpl).s1k = function () {\n return this.g4g_1;\n };\n protoOf(RoomCornerImpl).ct = function () {\n return this.h4g_1;\n };\n protoOf(RoomCornerImpl).l23 = function () {\n return this.i4g_1;\n };\n protoOf(RoomCornerImpl).n3j = function () {\n return this.j4g_1;\n };\n function RoomPoint3DImpl(x, y, z) {\n this.k4g_1 = x;\n this.l4g_1 = y;\n this.m4g_1 = z;\n }\n protoOf(RoomPoint3DImpl).i2d = function () {\n return this.k4g_1;\n };\n protoOf(RoomPoint3DImpl).j2d = function () {\n return this.l4g_1;\n };\n protoOf(RoomPoint3DImpl).k2d = function () {\n return this.m4g_1;\n };\n //region block: post-declaration\n defineProp(protoOf(RoomGeneratorUtils$createRoomFromData$1), 'surfaces', function () {\n return this.l23();\n });\n defineProp(protoOf(RoomGeneratorUtils$createRoomFromData$1), 'edges', function () {\n return this.n3j();\n });\n defineProp(protoOf(RoomGeneratorUtils$createRoomFromData$1), 'corners', function () {\n return this.r3k();\n });\n defineProp(protoOf(RoomGeneratorUtils$createRoomFromData$1), 'obstacles', function () {\n return this.o3j();\n });\n defineProp(protoOf(RoomGeneratorUtils$point$1), 'x', function () {\n return this.i2d();\n });\n defineProp(protoOf(RoomGeneratorUtils$point$1), 'y', function () {\n return this.j2d();\n });\n defineProp(protoOf(RoomGeneratorUtils$point$1), 'z', function () {\n return this.k2d();\n });\n defineProp(protoOf(RoomGeneratorUtils$surfaces$1$1), 'id', function () {\n return this.s1k();\n });\n defineProp(protoOf(RoomGeneratorUtils$surfaces$1$1), 'type', function () {\n return this.a1x();\n });\n defineProp(protoOf(RoomGeneratorUtils$surfaces$1$1), 'vertices', function () {\n return this.b23();\n });\n defineProp(protoOf(RoomGeneratorUtils$edges$1$1), 'id', function () {\n return this.s1k();\n });\n defineProp(protoOf(RoomGeneratorUtils$edges$1$1), 'surface1', function () {\n return this.s3k();\n });\n defineProp(protoOf(RoomGeneratorUtils$edges$1$1), 'surface2', function () {\n return this.t3k();\n });\n defineProp(protoOf(RoomGeneratorUtils$edges$1$1), 'vertex1', function () {\n return this.u3k();\n });\n defineProp(protoOf(RoomGeneratorUtils$edges$1$1), 'vertex2', function () {\n return this.v3k();\n });\n defineProp(protoOf(RoomGeneratorUtils$corners$1$1), 'id', function () {\n return this.s1k();\n });\n defineProp(protoOf(RoomGeneratorUtils$corners$1$1), 'position', function () {\n return this.ct();\n });\n defineProp(protoOf(RoomGeneratorUtils$corners$1$1), 'edges', function () {\n return this.n3j();\n });\n defineProp(protoOf(RoomGeneratorUtils$corners$1$1), 'surfaces', function () {\n return this.l23();\n });\n defineProp(protoOf(RoomGeneratorUtils$obstacles$1$1), 'id', function () {\n return this.s1k();\n });\n defineProp(protoOf(RoomGeneratorUtils$obstacles$1$1), 'type', function () {\n return this.a1x();\n });\n defineProp(protoOf(RoomGeneratorUtils$obstacles$1$1), 'boundingBox', function () {\n return this.m3k();\n });\n defineProp(protoOf(RoomGeneratorUtils$boundingBox$1), 'size', function () {\n return this.n();\n });\n defineProp(protoOf(RoomGeneratorUtils$boundingBox$1), 'transform', function () {\n return this.d1x();\n });\n defineProp(protoOf(RoomGeneratorUtils$transform$1), 'position', function () {\n return this.ct();\n });\n defineProp(protoOf(RoomGeneratorUtils$transform$1), 'rotation', function () {\n return this.v1k();\n });\n defineProp(protoOf(RoomGeneratorUtils$rotation$1), 'x', function () {\n return this.i2d();\n });\n defineProp(protoOf(RoomGeneratorUtils$rotation$1), 'y', function () {\n return this.j2d();\n });\n defineProp(protoOf(RoomGeneratorUtils$rotation$1), 'z', function () {\n return this.k2d();\n });\n defineProp(protoOf(RoomGeneratorUtils$rotation$1), 'w', function () {\n return this.h2d();\n });\n protoOf($serializer).sv = typeParametersSerializers;\n protoOf($serializer_0).sv = typeParametersSerializers;\n protoOf($serializer_1).sv = typeParametersSerializers;\n protoOf($serializer_2).sv = typeParametersSerializers;\n protoOf($serializer_3).sv = typeParametersSerializers;\n protoOf($serializer_4).sv = typeParametersSerializers;\n protoOf($serializer_5).sv = typeParametersSerializers;\n protoOf($serializer_6).sv = typeParametersSerializers;\n protoOf($serializer_7).sv = typeParametersSerializers;\n defineProp(protoOf(RoomGeometryDataImpl), 'surfaces', function () {\n return this.l23();\n });\n defineProp(protoOf(RoomGeometryDataImpl), 'edges', function () {\n return this.n3j();\n });\n defineProp(protoOf(RoomGeometryDataImpl), 'corners', function () {\n return this.r3k();\n });\n defineProp(protoOf(RoomGeometryDataImpl), 'obstacles', function () {\n return this.o3j();\n });\n defineProp(protoOf(RoomSurfaceImpl), 'id', function () {\n return this.s1k();\n });\n defineProp(protoOf(RoomSurfaceImpl), 'type', function () {\n return this.a1x();\n });\n defineProp(protoOf(RoomSurfaceImpl), 'vertices', function () {\n return this.b23();\n });\n defineProp(protoOf(RoomEdgeImpl), 'id', function () {\n return this.s1k();\n });\n defineProp(protoOf(RoomEdgeImpl), 'surface1', function () {\n return this.s3k();\n });\n defineProp(protoOf(RoomEdgeImpl), 'surface2', function () {\n return this.t3k();\n });\n defineProp(protoOf(RoomEdgeImpl), 'vertex1', function () {\n return this.u3k();\n });\n defineProp(protoOf(RoomEdgeImpl), 'vertex2', function () {\n return this.v3k();\n });\n defineProp(protoOf(RoomCornerImpl), 'id', function () {\n return this.s1k();\n });\n defineProp(protoOf(RoomCornerImpl), 'position', function () {\n return this.ct();\n });\n defineProp(protoOf(RoomCornerImpl), 'surfaces', function () {\n return this.l23();\n });\n defineProp(protoOf(RoomCornerImpl), 'edges', function () {\n return this.n3j();\n });\n defineProp(protoOf(RoomPoint3DImpl), 'x', function () {\n return this.i2d();\n });\n defineProp(protoOf(RoomPoint3DImpl), 'y', function () {\n return this.j2d();\n });\n defineProp(protoOf(RoomPoint3DImpl), 'z', function () {\n return this.k2d();\n });\n //endregion\n //region block: init\n ArrangeExtensions_instance = new ArrangeExtensions();\n AutoAdaptExtensions_instance = new AutoAdaptExtensions();\n PlacementExtensions_instance = new PlacementExtensions();\n RoomGeneratorUtils_instance = new RoomGeneratorUtils();\n Companion_instance_4 = new Companion_1();\n Companion_instance_6 = new Companion_3();\n Companion_instance_7 = new Companion_4();\n Companion_instance_8 = new Companion_5();\n Companion_instance_9 = new Companion_6();\n Companion_instance_10 = new Companion_7();\n //endregion\n //region block: exports\n function $jsExportAll$(_) {\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$test = $com$ikea$core.test || ($com$ikea$core.test = {});\n var $com$ikea$core$test$helper = $com$ikea$core$test.helper || ($com$ikea$core$test.helper = {});\n var $com$ikea$core$test$helper$extensions = $com$ikea$core$test$helper.extensions || ($com$ikea$core$test$helper.extensions = {});\n defineProp($com$ikea$core$test$helper$extensions, 'ArrangeExtensions', ArrangeExtensions_getInstance);\n $com$ikea$core$test$helper$extensions.placeHostProductsInLine = placeHostProductsInLine;\n $com$ikea$core$test$helper$extensions.getAlignWidth = getAlignWidth;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$test = $com$ikea$core.test || ($com$ikea$core.test = {});\n var $com$ikea$core$test$helper = $com$ikea$core$test.helper || ($com$ikea$core$test.helper = {});\n var $com$ikea$core$test$helper$extensions = $com$ikea$core$test$helper.extensions || ($com$ikea$core$test$helper.extensions = {});\n defineProp($com$ikea$core$test$helper$extensions, 'AutoAdaptExtensions', AutoAdaptExtensions_getInstance);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$test = $com$ikea$core.test || ($com$ikea$core.test = {});\n var $com$ikea$core$test$helper = $com$ikea$core$test.helper || ($com$ikea$core$test.helper = {});\n var $com$ikea$core$test$helper$extensions = $com$ikea$core$test$helper.extensions || ($com$ikea$core$test$helper.extensions = {});\n defineProp($com$ikea$core$test$helper$extensions, 'PlacementExtensions', PlacementExtensions_getInstance);\n $com$ikea$core$test$helper$extensions.createInSceneAndAssert = createInSceneAndAssert;\n $com$ikea$core$test$helper$extensions.createInHostAndAssert = createInHostAndAssert;\n $com$ikea$core$test$helper$extensions.createAndAlignToTargetAndAssert = createAndAlignToTargetAndAssert;\n $com$ikea$core$test$helper$extensions.createInScene = createInScene;\n $com$ikea$core$test$helper$extensions.createInHost = createInHost;\n $com$ikea$core$test$helper$extensions.createAndSnapToSceneWithAlignment = createAndSnapToSceneWithAlignment;\n $com$ikea$core$test$helper$extensions.createAtPosition = createAtPosition;\n $com$ikea$core$test$helper$extensions.createAtPositionAllowWarnings = createAtPositionAllowWarnings;\n $com$ikea$core$test$helper$extensions.createAtPositionAndAssert = createAtPositionAndAssert;\n $com$ikea$core$test$helper$extensions.fillHostWithProduct = fillHostWithProduct;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$test = $com$ikea$core.test || ($com$ikea$core.test = {});\n var $com$ikea$core$test$helper = $com$ikea$core$test.helper || ($com$ikea$core$test.helper = {});\n var $com$ikea$core$test$helper$extensions = $com$ikea$core$test$helper.extensions || ($com$ikea$core$test$helper.extensions = {});\n $com$ikea$core$test$helper$extensions.getProductInOrderLeftToRight = getProductInOrderLeftToRight;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$test = $com$ikea$core.test || ($com$ikea$core.test = {});\n var $com$ikea$core$test$helper = $com$ikea$core$test.helper || ($com$ikea$core$test.helper = {});\n var $com$ikea$core$test$helper$utils = $com$ikea$core$test$helper.utils || ($com$ikea$core$test$helper.utils = {});\n $com$ikea$core$test$helper$utils.CountSystem = CountSystem;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$test = $com$ikea$core.test || ($com$ikea$core.test = {});\n var $com$ikea$core$test$helper = $com$ikea$core$test.helper || ($com$ikea$core$test.helper = {});\n var $com$ikea$core$test$helper$utils = $com$ikea$core$test$helper.utils || ($com$ikea$core$test$helper.utils = {});\n defineProp($com$ikea$core$test$helper$utils, 'RoomGeneratorUtils', RoomGeneratorUtils_getInstance);\n $com$ikea$core$test$helper$utils.RoomGeometryDataTestImpl = RoomGeometryDataTestImpl;\n defineProp($com$ikea$core$test$helper$utils.RoomGeometryDataTestImpl, 'Companion', Companion_getInstance);\n $com$ikea$core$test$helper$utils.RoomSurfaceTestImpl = RoomSurfaceTestImpl;\n defineProp($com$ikea$core$test$helper$utils.RoomSurfaceTestImpl, 'Companion', Companion_getInstance_0);\n $com$ikea$core$test$helper$utils.RoomEdgeTestImpl = RoomEdgeTestImpl;\n defineProp($com$ikea$core$test$helper$utils.RoomEdgeTestImpl, 'Companion', Companion_getInstance_1);\n $com$ikea$core$test$helper$utils.RoomCornerTestImpl = RoomCornerTestImpl;\n defineProp($com$ikea$core$test$helper$utils.RoomCornerTestImpl, 'Companion', Companion_getInstance_2);\n $com$ikea$core$test$helper$utils.RoomPoint3DTestImpl = RoomPoint3DTestImpl;\n defineProp($com$ikea$core$test$helper$utils.RoomPoint3DTestImpl, 'Companion', Companion_getInstance_3);\n $com$ikea$core$test$helper$utils.RoomObstacleTestImpl = RoomObstacleTestImpl;\n defineProp($com$ikea$core$test$helper$utils.RoomObstacleTestImpl, 'Companion', Companion_getInstance_4);\n $com$ikea$core$test$helper$utils.RoomRotationTestImpl = RoomRotationTestImpl;\n defineProp($com$ikea$core$test$helper$utils.RoomRotationTestImpl, 'Companion', Companion_getInstance_5);\n $com$ikea$core$test$helper$utils.RoomBoundingBoxTestImpl = RoomBoundingBoxTestImpl;\n defineProp($com$ikea$core$test$helper$utils.RoomBoundingBoxTestImpl, 'Companion', Companion_getInstance_6);\n $com$ikea$core$test$helper$utils.RoomTransformTestImpl = RoomTransformTestImpl;\n defineProp($com$ikea$core$test$helper$utils.RoomTransformTestImpl, 'Companion', Companion_getInstance_7);\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$test = $com$ikea$core.test || ($com$ikea$core.test = {});\n var $com$ikea$core$test$helper = $com$ikea$core$test.helper || ($com$ikea$core$test.helper = {});\n var $com$ikea$core$test$helper$utils = $com$ikea$core$test$helper.utils || ($com$ikea$core$test$helper.utils = {});\n $com$ikea$core$test$helper$utils.RoomGeometryDataImpl = RoomGeometryDataImpl;\n $com$ikea$core$test$helper$utils.RoomSurfaceImpl = RoomSurfaceImpl;\n $com$ikea$core$test$helper$utils.RoomEdgeImpl = RoomEdgeImpl;\n $com$ikea$core$test$helper$utils.RoomCornerImpl = RoomCornerImpl;\n $com$ikea$core$test$helper$utils.RoomPoint3DImpl = RoomPoint3DImpl;\n }\n $jsExportAll$(_);\n _.$jsExportAll$ = $jsExportAll$;\n _.$_$ = _.$_$ || {};\n _.$_$.a = CountSystem;\n _.$_$.b = ArrangeExtensions_instance;\n _.$_$.c = AutoAdaptExtensions_instance;\n _.$_$.d = PlacementExtensions_instance;\n _.$_$.e = RoomGeneratorUtils_instance;\n //endregion\n return _;\n}));\n\n//# sourceMappingURL=core-test-helpers.js.map\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd)\n define(['exports', '../core-core-api.js', '../kotlin-kotlin-stdlib.js', '../core-core-stl.js', '../core-core-range-dynamic-range.js', '../core-core-experimental.js', '../ipex-range-format.js', '../core-core-kernel.js', '../core-test-helpers.js'], factory);\n else if (typeof exports === 'object')\n factory(module.exports, require('../core-core-api.js'), require('../kotlin-kotlin-stdlib.js'), require('../core-core-stl.js'), require('../core-core-range-dynamic-range.js'), require('../core-core-experimental.js'), require('../ipex-range-format.js'), require('../core-core-kernel.js'), require('../core-test-helpers.js'));\n else {\n if (typeof this['core-core-api'] === 'undefined') {\n throw new Error(\"Error loading module 'core:core-js'. Its dependency 'core-core-api' was not found. Please, check whether 'core-core-api' is loaded prior to 'core:core-js'.\");\n }\n if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {\n throw new Error(\"Error loading module 'core:core-js'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'core:core-js'.\");\n }\n if (typeof this['core-core-stl'] === 'undefined') {\n throw new Error(\"Error loading module 'core:core-js'. Its dependency 'core-core-stl' was not found. Please, check whether 'core-core-stl' is loaded prior to 'core:core-js'.\");\n }\n if (typeof this['core-core-range-dynamic-range'] === 'undefined') {\n throw new Error(\"Error loading module 'core:core-js'. Its dependency 'core-core-range-dynamic-range' was not found. Please, check whether 'core-core-range-dynamic-range' is loaded prior to 'core:core-js'.\");\n }\n if (typeof this['core-core-experimental'] === 'undefined') {\n throw new Error(\"Error loading module 'core:core-js'. Its dependency 'core-core-experimental' was not found. Please, check whether 'core-core-experimental' is loaded prior to 'core:core-js'.\");\n }\n if (typeof this['ipex-range-format'] === 'undefined') {\n throw new Error(\"Error loading module 'core:core-js'. Its dependency 'ipex-range-format' was not found. Please, check whether 'ipex-range-format' is loaded prior to 'core:core-js'.\");\n }\n if (typeof this['core-core-kernel'] === 'undefined') {\n throw new Error(\"Error loading module 'core:core-js'. Its dependency 'core-core-kernel' was not found. Please, check whether 'core-core-kernel' is loaded prior to 'core:core-js'.\");\n }\n if (typeof this['core-test-helpers'] === 'undefined') {\n throw new Error(\"Error loading module 'core:core-js'. Its dependency 'core-test-helpers' was not found. Please, check whether 'core-test-helpers' is loaded prior to 'core:core-js'.\");\n }\n root['core:core-js'] = factory(typeof this['core:core-js'] === 'undefined' ? {} : this['core:core-js'], this['core-core-api'], this['kotlin-kotlin-stdlib'], this['core-core-stl'], this['core-core-range-dynamic-range'], this['core-core-experimental'], this['ipex-range-format'], this['core-core-kernel'], this['core-test-helpers']);\n }\n}(this, function (_, kotlin_core_core_api, kotlin_kotlin, kotlin_core_core_stl, kotlin_core_core_range_dynamic_range, kotlin_core_core_experimental, kotlin_core_ipex_range_format, kotlin_core_core_kernel, kotlin_core_core_test_test_helpers) {\n 'use strict';\n //region block: imports\n var imul = Math.imul;\n var Companion_getInstance = kotlin_core_core_api.$_$.kb;\n var Degrees = kotlin_core_core_api.$_$.s4;\n var UnserializableEntityComponent = kotlin_core_core_api.$_$.q6;\n var protoOf = kotlin_kotlin.$_$.u9;\n var defineProp = kotlin_kotlin.$_$.s8;\n var classMeta = kotlin_kotlin.$_$.q8;\n var setMetadataFor = kotlin_kotlin.$_$.v9;\n var VOID = kotlin_kotlin.$_$.e;\n var valueOf = kotlin_core_core_api.$_$.p2;\n var LoadedModelInfoComponent = kotlin_core_core_api.$_$.n5;\n var Vector = kotlin_core_core_api.$_$.c5;\n var Margin = kotlin_core_core_api.$_$.t4;\n var Size = kotlin_core_core_api.$_$.a5;\n var ModelTransform = kotlin_core_core_api.$_$.u4;\n var EntityManagerImpl = kotlin_core_core_api.$_$.y2;\n var Ray = kotlin_core_core_api.$_$.m5;\n var Transform = kotlin_core_core_api.$_$.b5;\n var QuaternionFromDouble = kotlin_core_core_api.$_$.c9;\n var Radians = kotlin_core_core_api.$_$.x4;\n var Face = kotlin_core_core_api.$_$.t6;\n var CuboidFromSize = kotlin_core_core_api.$_$.f9;\n var PolyhedronGroup = kotlin_core_core_api.$_$.u6;\n var ConvexPolyhedron = kotlin_core_core_api.$_$.s6;\n var AxisAlignedBox = kotlin_core_core_api.$_$.r6;\n var ProductSpecification = kotlin_core_core_api.$_$.s;\n var ValidationResultFail = kotlin_core_core_api.$_$.u7;\n var ValidationResultWarning = kotlin_core_core_api.$_$.v7;\n var CollisionValidationResult = kotlin_core_core_api.$_$.z;\n var CollisionValidation = kotlin_core_core_api.$_$.a1;\n var PartPair = kotlin_core_core_api.$_$.j;\n var ColliderShapeComponent = kotlin_core_core_api.$_$.y;\n var Polygon = kotlin_core_core_api.$_$.w4;\n var Plane = kotlin_core_core_api.$_$.v4;\n var DebugSurfacesComponent = kotlin_core_core_api.$_$.m2;\n var DisplayNameComponent = kotlin_core_core_api.$_$.e5;\n var DisabledConnectorsComponent = kotlin_core_core_api.$_$.x1;\n var ModelInfoComponent = kotlin_core_core_api.$_$.o5;\n var ModelTransformComponent = kotlin_core_core_api.$_$.p5;\n var RelativeConnectorData = kotlin_core_core_api.$_$.c2;\n var RelationOriginAlongXImpostor_getInstance = kotlin_core_core_api.$_$.mb;\n var RelationOriginAlongYImpostor_getInstance = kotlin_core_core_api.$_$.nb;\n var RelationOriginAlongZImpostor_getInstance = kotlin_core_core_api.$_$.ob;\n var RelationOrigin = kotlin_core_core_api.$_$.y4;\n var RelativeBoxOffset = kotlin_core_core_api.$_$.z4;\n var PointConnector = kotlin_core_core_api.$_$.z1;\n var PointSeriesConnector = kotlin_core_core_api.$_$.a2;\n var PointSeriesSubConnector = kotlin_core_core_api.$_$.b2;\n var EdgeConnector = kotlin_core_core_api.$_$.y1;\n var SurfaceConnector = kotlin_core_core_api.$_$.g2;\n var ViewerDragEventComponent = kotlin_core_core_api.$_$.s2;\n var RaycastResult = kotlin_core_core_api.$_$.l5;\n var GuestConnectionsComponent = kotlin_core_core_api.$_$.m1;\n var HostConnectionsComponent = kotlin_core_core_api.$_$.n1;\n var DragSurfacesComponent = kotlin_core_core_api.$_$.n2;\n var OutlineableComponent = kotlin_core_core_api.$_$.q5;\n var DragSurface = kotlin_core_core_api.$_$.o2;\n var AutomaticGroupBuilderSystem = kotlin_core_core_api.$_$.f3;\n var ManualGroupConnectorValidation = kotlin_core_core_api.$_$.h3;\n var AssemblyStructureComponent = kotlin_core_core_api.$_$.i;\n var RestrictAllowedRequiredHostsComponent = kotlin_core_core_api.$_$.w6;\n var ManualEntityGroupBuilderService = kotlin_core_core_api.$_$.g3;\n var DebugLine = kotlin_core_core_api.$_$.l2;\n var DebugLinesComponent = kotlin_core_core_api.$_$.k2;\n var IsLoadingSnapshotComponent = kotlin_core_core_api.$_$.d7;\n var SnapshotIgnoreComponent = kotlin_core_core_api.$_$.e7;\n var ChildConnectionValidation = kotlin_core_core_api.$_$.j1;\n var ConnectorType_instance = kotlin_core_core_api.$_$.fa;\n var ProductCatalogFunctions_instance = kotlin_core_core_api.$_$.n9;\n var RelativeConnectorRepositioner_instance = kotlin_core_core_api.$_$.ja;\n var MathUtils_getInstance = kotlin_core_core_api.$_$.gb;\n var LogLevelJavascriptImpostor_instance = kotlin_core_core_api.$_$.eb;\n var RotationDegreeOfFreedomImpostor_instance = kotlin_core_core_api.$_$.ka;\n var PolyhedronUtils_getInstance = kotlin_core_core_api.$_$.qc;\n var ApiSystemIds_instance = kotlin_core_core_api.$_$.yc;\n var ValidationResultType_FAIL_getInstance = kotlin_core_core_api.$_$.n8;\n var ValidationResultType_WARNING_getInstance = kotlin_core_core_api.$_$.o8;\n var Companion_getInstance_0 = kotlin_core_core_api.$_$.pc;\n var VectorConstants_getInstance = kotlin_core_core_api.$_$.ub;\n var SelectedComponent_instance = kotlin_core_core_api.$_$.mc;\n var SceneReloadingComponent_instance = kotlin_core_core_api.$_$.nc;\n var RenderedComponent_instance = kotlin_core_core_api.$_$.fc;\n var InSceneComponent_instance = kotlin_core_core_api.$_$.ab;\n var StaticComponent_getInstance = kotlin_core_core_api.$_$.wa;\n var SelectableComponent = kotlin_core_core_api.$_$.f6;\n var DraggableComponent = kotlin_core_core_api.$_$.q2;\n var SnapRootComponent = kotlin_core_core_api.$_$.z6;\n var valueOf_0 = kotlin_core_core_api.$_$.k4;\n var HistoryChangedEventComponent = kotlin_core_core_api.$_$.j4;\n var WorldSpaceDragEventComponent = kotlin_core_core_api.$_$.u2;\n var ClickEventComponent = kotlin_core_core_api.$_$.e6;\n var LocalTransformComponent = kotlin_core_core_api.$_$.g7;\n var ConnectorsComponent = kotlin_core_core_api.$_$.u1;\n var ChildComponent = kotlin_core_core_api.$_$.j3;\n var ParentComponent = kotlin_core_core_api.$_$.m3;\n var ViewerObjectComponent = kotlin_core_core_api.$_$.u5;\n var ConnectionRootComponent = kotlin_core_core_api.$_$.k1;\n var ProductPartComponent = kotlin_core_core_api.$_$.k;\n var WorldTransformComponent = kotlin_core_core_api.$_$.i7;\n var TemplateDataComponent = kotlin_core_core_api.$_$.f5;\n var RelativeConnectorsComponent = kotlin_core_core_api.$_$.d2;\n var AssemblyPartsComponent_init_$Create$ = kotlin_core_core_api.$_$.b9;\n var ViewerComponent = kotlin_core_core_api.$_$.s5;\n var ProductComponent = kotlin_core_core_api.$_$.q;\n var HistoryEvent_instance = kotlin_core_core_api.$_$.db;\n var ComponentIds_instance = kotlin_core_core_api.$_$.w9;\n var ComponentIdSpan_instance = kotlin_core_core_api.$_$.v9;\n var DragSurfaceNormalVisualizationSystem = kotlin_core_core_stl.$_$.j1;\n var DrawDragGhostSystem = kotlin_core_core_stl.$_$.m1;\n var Measurer = kotlin_core_core_api.$_$.o7;\n var MeasuringEntityManagerWatcher = kotlin_core_core_stl.$_$.w;\n var PlacementService = kotlin_core_core_stl.$_$.h2;\n var Unit_instance = kotlin_kotlin.$_$.x3;\n var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.q;\n var DefaultVisualizer = kotlin_core_core_stl.$_$.x3;\n var CoreVisualization = kotlin_core_core_stl.$_$.y3;\n var echoStandardConsole = kotlin_core_core_api.$_$.r4;\n var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;\n var copyToArray = kotlin_kotlin.$_$.l5;\n var get_displayName = kotlin_core_core_api.$_$.h5;\n var LoggingEntityManagerWatcher = kotlin_core_core_stl.$_$.v;\n var SnapUtils_instance = kotlin_core_core_api.$_$.vc;\n var SnapSettings = kotlin_core_core_api.$_$.a7;\n var Pair = kotlin_kotlin.$_$.yc;\n var mutableListOf = kotlin_kotlin.$_$.u6;\n var firstOrNull = kotlin_kotlin.$_$.t5;\n var getKClassFromExpression = kotlin_kotlin.$_$.c;\n var THROW_CCE = kotlin_kotlin.$_$.ad;\n var contentEquals = kotlin_kotlin.$_$.z4;\n var contentHashCode = kotlin_kotlin.$_$.a5;\n var toString = kotlin_kotlin.$_$.z9;\n var ColliderUtils_instance = kotlin_core_core_api.$_$.t9;\n var CollisionUtils_instance = kotlin_core_core_api.$_$.u9;\n var ComponentUtils_instance = kotlin_core_core_api.$_$.x9;\n var ConnectionUtils_instance = kotlin_core_core_api.$_$.aa;\n var ConnectorUtils_instance = kotlin_core_core_api.$_$.ga;\n var EntityGroupUtils_instance = kotlin_core_core_api.$_$.ua;\n var HierarchyUtils_instance = kotlin_core_core_api.$_$.za;\n var MeasurementUtils_getInstance = kotlin_core_core_api.$_$.vb;\n var ModelUtils_getInstance = kotlin_core_core_api.$_$.ec;\n var ProductUtils_instance = kotlin_core_core_api.$_$.wb;\n var RaycastUtils_instance = kotlin_core_core_api.$_$.ac;\n var SnapActionCandidateSortAndSelectStrategies_getInstance = kotlin_core_core_api.$_$.sc;\n var TransformUtils_instance = kotlin_core_core_api.$_$.cd;\n var DoorComponent_getInstance = kotlin_core_core_stl.$_$.q4;\n var FreeMoveComponent_instance = kotlin_core_core_stl.$_$.i4;\n var IsDraggedComponent_instance = kotlin_core_core_stl.$_$.j4;\n var RoomComponent_instance = kotlin_core_core_stl.$_$.y4;\n var OutlinedComponent = kotlin_core_core_stl.$_$.e2;\n var OutlineBlockingComponent = kotlin_core_core_stl.$_$.a2;\n var AutoAdaptHostComponent = kotlin_core_core_stl.$_$.l;\n var AutoAdaptGuestComponent = kotlin_core_core_stl.$_$.k;\n var AutoAdaptVariantComponent = kotlin_core_core_stl.$_$.m;\n var ForceAutoAdaptWhenParentIsDraggedComponent = kotlin_core_core_stl.$_$.n;\n var AllowedDoorPairsComponentFromArrays = kotlin_core_core_stl.$_$.z3;\n var AlignmentConnectionsComponent = kotlin_core_core_stl.$_$.b;\n var LightComponent = kotlin_core_core_stl.$_$.o2;\n var RoomDimensionsComponent = kotlin_core_core_stl.$_$.q2;\n var RoomPartComponent = kotlin_core_core_stl.$_$.r2;\n var Companion_getInstance_1 = kotlin_core_core_range_dynamic_range.$_$.y;\n var PositionValue = kotlin_core_core_range_dynamic_range.$_$.k;\n var OriginRelativeToImpostor_getInstance = kotlin_core_core_range_dynamic_range.$_$.x;\n var OriginTemplate = kotlin_core_core_range_dynamic_range.$_$.r;\n var DynamicProductCatalog = kotlin_core_core_range_dynamic_range.$_$.a;\n var DynamicProduct = kotlin_core_core_range_dynamic_range.$_$.b;\n var ProductTemplate = kotlin_core_core_range_dynamic_range.$_$.c;\n var CatalogTemplateData = kotlin_core_core_range_dynamic_range.$_$.f;\n var Part = kotlin_core_core_range_dynamic_range.$_$.h;\n var ModelRenderInfo = kotlin_core_core_range_dynamic_range.$_$.g;\n var RelativePosition = kotlin_core_core_range_dynamic_range.$_$.l;\n var RelativeTransform = kotlin_core_core_range_dynamic_range.$_$.m;\n var PositionTemplate = kotlin_core_core_range_dynamic_range.$_$.s;\n var VisualLightSourceComponent = kotlin_core_core_range_dynamic_range.$_$.e;\n var TemplateEditorService = kotlin_core_core_range_dynamic_range.$_$.i;\n var BoundItemTemplate = kotlin_core_core_range_dynamic_range.$_$.n;\n var Dimension = kotlin_core_core_range_dynamic_range.$_$.q;\n var Compartment = kotlin_core_core_range_dynamic_range.$_$.o;\n var CatalogGenerator = kotlin_core_core_range_dynamic_range.$_$.t;\n var Companion_getInstance_2 = kotlin_core_core_range_dynamic_range.$_$.e1;\n var PositionTypeImpostor_instance = kotlin_core_core_range_dynamic_range.$_$.z;\n var ExperimentalPlacementService = kotlin_core_core_experimental.$_$.c;\n var LegacyPlacementHelper = kotlin_core_core_experimental.$_$.a;\n var ValidatedSnap = kotlin_core_core_experimental.$_$.b;\n var objectMeta = kotlin_kotlin.$_$.t9;\n var IPEXRangeFormatCatalog = kotlin_core_ipex_range_format.$_$.c;\n var AmendableCatalog = kotlin_core_ipex_range_format.$_$.b;\n var RangeItemDTO = kotlin_core_ipex_range_format.$_$.d;\n var StaticComponentBuilder = kotlin_core_ipex_range_format.$_$.a;\n var println = kotlin_kotlin.$_$.h8;\n var CoreImpl = kotlin_core_core_kernel.$_$.a;\n var SceneSerializationUtil_instance = kotlin_core_core_kernel.$_$.b;\n var ValidDragStrategyResult = kotlin_core_core_stl.$_$.b1;\n var AutoAdaptDragStrategy = kotlin_core_core_stl.$_$.p;\n var HandleRotationSystem = kotlin_core_core_stl.$_$.d;\n var values = kotlin_core_core_api.$_$.m4;\n var DebugLogger = kotlin_core_core_stl.$_$.x1;\n var FunctionalZonesLocalToWorldSystem = kotlin_core_core_stl.$_$.t1;\n var SnapPlacementActor = kotlin_core_core_stl.$_$.k2;\n var ProppingSystem = kotlin_core_core_stl.$_$.m2;\n var ConnectorVisualizationSystem = kotlin_core_core_stl.$_$.s3;\n var ColliderVisualizationSystem = kotlin_core_core_stl.$_$.r3;\n var AutoAdaptHostZoneVisualizationSystem = kotlin_core_core_stl.$_$.n3;\n var FunctionalMarginVisualizationSystem = kotlin_core_core_stl.$_$.p3;\n var FunctionalZoneVisualizationSystem = kotlin_core_core_stl.$_$.q3;\n var DragProjectionPointVisualizationSystem = kotlin_core_core_stl.$_$.o3;\n var DragSystem = kotlin_core_core_stl.$_$.l1;\n var SnapCardinalDirectionsDragStrategy = kotlin_core_core_stl.$_$.y;\n var SnapClosestDragStrategy = kotlin_core_core_stl.$_$.z;\n var SnapClosestWithSubConnectorsDragStrategy = kotlin_core_core_stl.$_$.a1;\n var ResolveCollisionsDragStrategy = kotlin_core_core_stl.$_$.x;\n var DragSurfaceVisualizationSystem = kotlin_core_core_stl.$_$.k1;\n var DebugLineDrawingSystem = kotlin_core_core_stl.$_$.u;\n var StandardSelectionService = kotlin_core_core_stl.$_$.e3;\n var AutoAdaptService = kotlin_core_core_stl.$_$.s;\n var AlignmentConnectionCreationSystem = kotlin_core_core_stl.$_$.a;\n var RoomService = kotlin_core_core_stl.$_$.b3;\n var RoomSystem = kotlin_core_core_stl.$_$.s2;\n var RoomComponentDeserializer = kotlin_core_core_stl.$_$.u2;\n var StandardSelectionSystemFromCoreServices = kotlin_core_core_stl.$_$.c4;\n var OutlineSystem = kotlin_core_core_stl.$_$.d2;\n var OutlineSelectedSystem = kotlin_core_core_stl.$_$.c2;\n var OutlineEntityGroupDeselectSystem = kotlin_core_core_stl.$_$.b2;\n var AllowedDoorPairsValidation = kotlin_core_core_stl.$_$.h;\n var AlignmentPlane = kotlin_core_core_stl.$_$.c;\n var AllowedNumberOfChildrenOfTypeValidation = kotlin_core_core_stl.$_$.f3;\n var DisallowSeparateRequiredHostsValidation = kotlin_core_core_stl.$_$.g3;\n var AssemblyInstructionsServiceImpl = kotlin_core_core_stl.$_$.i;\n var ICFDataService = kotlin_core_core_stl.$_$.v1;\n var PlacementResult = kotlin_core_core_stl.$_$.g2;\n var FunctionalMarginValidation = kotlin_core_core_stl.$_$.r1;\n var PlacementZoneValidation = kotlin_core_core_stl.$_$.h3;\n var AlignmentLinesSystem = kotlin_core_core_stl.$_$.f;\n var FunctionalMarginSystem = kotlin_core_core_stl.$_$.q1;\n var FunctionalMarginShapeComponent = kotlin_core_core_stl.$_$.p1;\n var FunctionalMarginComponent = kotlin_core_core_stl.$_$.o1;\n var RecommendedInitialPositionFromFloorComponent = kotlin_core_core_stl.$_$.j2;\n var PlacementZoneByHeightComponent = kotlin_core_core_stl.$_$.i2;\n var ReplacePartResult = kotlin_core_core_stl.$_$.p2;\n var DragSurfaceOnlyRoomSelector = kotlin_core_core_stl.$_$.f1;\n var AnyDragSurfaceProjectorFromCoreServices = kotlin_core_core_stl.$_$.a4;\n var XYPlaneProjector = kotlin_core_core_stl.$_$.d1;\n var DragSurfaceCanHostSelector = kotlin_core_core_stl.$_$.e1;\n var DragSurfaceCanHostWithAutoAdaptSelector = kotlin_core_core_stl.$_$.q;\n var AutoAdaptProductSpecificationsSystem = kotlin_core_core_stl.$_$.r;\n var LegacyCanvasTo3DDragConverterSystem = kotlin_core_core_stl.$_$.g1;\n var CanvasTo3DDragConverterSystemFromCoreServices = kotlin_core_core_stl.$_$.b4;\n var EntityConnectorVisualizationSystem = kotlin_core_core_stl.$_$.v3;\n var EntityConnectorVisualizationComponent = kotlin_core_core_stl.$_$.m3;\n var Color = kotlin_core_core_stl.$_$.w3;\n var EntityColliderVisualizationSystem = kotlin_core_core_stl.$_$.t3;\n var EntityColliderVisualizationComponent = kotlin_core_core_stl.$_$.l3;\n var EntityCollisionVisualizationSystem = kotlin_core_core_stl.$_$.u3;\n var DecoratorComponent = kotlin_core_core_stl.$_$.k3;\n var ColoredOutlineSystem = kotlin_core_core_stl.$_$.z1;\n var ColoredOutlineComponent = kotlin_core_core_stl.$_$.y1;\n var AutoAdaptSessionComponent = kotlin_core_core_stl.$_$.j;\n var DragProjectionPointComponent = kotlin_core_core_stl.$_$.c1;\n var FunctionalZone = kotlin_core_core_stl.$_$.u1;\n var FunctionalZonesLocalComponent = kotlin_core_core_stl.$_$.s1;\n var DragState = kotlin_core_core_stl.$_$.i1;\n var DragStateComponent = kotlin_core_core_stl.$_$.h1;\n var ReplacedWithAutoAdaptEventComponent = kotlin_core_core_stl.$_$.o;\n var LabelComponent = kotlin_core_core_stl.$_$.w1;\n var HigherPriorityAlignmentPostProcess = kotlin_core_core_stl.$_$.n1;\n var RequiredConnectorsSatisfiedValidation = kotlin_core_core_stl.$_$.i3;\n var HostConnectorRotationValidation = kotlin_core_core_stl.$_$.e;\n var SnapSorterBuilder = kotlin_core_core_stl.$_$.f2;\n var ReplaceUtils_instance = kotlin_core_core_stl.$_$.x4;\n var ReplaceAssemblyPartUtils_getInstance = kotlin_core_core_stl.$_$.w4;\n var RoomConnectorConstants_getInstance = kotlin_core_core_stl.$_$.z4;\n var Companion_instance = kotlin_core_core_stl.$_$.m4;\n var StlSystemIds_instance = kotlin_core_core_stl.$_$.a5;\n var Companion_getInstance_3 = kotlin_core_core_stl.$_$.b5;\n var AutoAdaptFeature_instance = kotlin_core_core_stl.$_$.g4;\n var AutoAdaptUtils_getInstance = kotlin_core_core_stl.$_$.h4;\n var ValidationResultIds_instance = kotlin_core_core_stl.$_$.c5;\n var ValidationRuleIds_instance = kotlin_core_core_stl.$_$.d5;\n var PlacementHelper_getInstance = kotlin_core_core_stl.$_$.l4;\n var SpaceFinderUtils_getInstance = kotlin_core_core_stl.$_$.k4;\n var CountSystem = kotlin_core_core_test_test_helpers.$_$.a;\n var ArrangeExtensions_instance = kotlin_core_core_test_test_helpers.$_$.b;\n var PlacementExtensions_instance = kotlin_core_core_test_test_helpers.$_$.d;\n var AutoAdaptExtensions_instance = kotlin_core_core_test_test_helpers.$_$.c;\n var RoomGeneratorUtils_instance = kotlin_core_core_test_test_helpers.$_$.e;\n //endregion\n //region block: pre-declaration\n setMetadataFor(UnserializableEntityComponent_0, 'UnserializableEntityComponentJS', classMeta, UnserializableEntityComponent, VOID, UnserializableEntityComponent_0);\n setMetadataFor(_CoreDebug, 'CoreDebug', classMeta);\n setMetadataFor(SortedValidationResult, 'SortedValidationResult', classMeta);\n setMetadataFor(getMeta$result$1, VOID, classMeta);\n setMetadataFor(Experimental, 'experimental-js', objectMeta);\n setMetadataFor(ValidDragStrategyResult_0, 'ValidDragStrategyResultJS', classMeta, ValidDragStrategyResult);\n setMetadataFor(AutoAdaptDragStrategy_0, 'AutoAdaptDragStrategyHS', classMeta, AutoAdaptDragStrategy);\n setMetadataFor(FunctionalZonesLocalToWorldSystem_0, 'FunctionalZonesLocalToWorldSystemJs', classMeta, FunctionalZonesLocalToWorldSystem);\n //endregion\n function get_ConnectorType() {\n _init_properties_api_js_kt__ym3iu4();\n return connectorType;\n }\n var connectorType;\n function get_Vector() {\n _init_properties_api_js_kt__ym3iu4();\n return Vector_0;\n }\n var Vector_0;\n function get_Margin() {\n _init_properties_api_js_kt__ym3iu4();\n return Margin_0;\n }\n var Margin_0;\n function get_Size() {\n _init_properties_api_js_kt__ym3iu4();\n return Size_0;\n }\n var Size_0;\n function get_ModelTransform() {\n _init_properties_api_js_kt__ym3iu4();\n return modelTransform;\n }\n var modelTransform;\n function get_EntityManagerImpl() {\n _init_properties_api_js_kt__ym3iu4();\n return entityManagerConstructor;\n }\n var entityManagerConstructor;\n function get_Ray() {\n _init_properties_api_js_kt__ym3iu4();\n return ray;\n }\n var ray;\n function get_Transform() {\n _init_properties_api_js_kt__ym3iu4();\n return Transform_0;\n }\n var Transform_0;\n function get_Quaternion() {\n _init_properties_api_js_kt__ym3iu4();\n return quaternion;\n }\n var quaternion;\n function get_Degrees() {\n _init_properties_api_js_kt__ym3iu4();\n return degrees;\n }\n var degrees;\n function get_Radians() {\n _init_properties_api_js_kt__ym3iu4();\n return radians;\n }\n var radians;\n function get_Face() {\n _init_properties_api_js_kt__ym3iu4();\n return Face_0;\n }\n var Face_0;\n function get_Cuboid() {\n _init_properties_api_js_kt__ym3iu4();\n return Cuboid;\n }\n var Cuboid;\n function get_PolyhedronGroup() {\n _init_properties_api_js_kt__ym3iu4();\n return PolyhedronGroup_0;\n }\n var PolyhedronGroup_0;\n function get_ConvexPolyhedron() {\n _init_properties_api_js_kt__ym3iu4();\n return ConvexPolyhedron_0;\n }\n var ConvexPolyhedron_0;\n function get_AxisAlignedBox() {\n _init_properties_api_js_kt__ym3iu4();\n return axisAlignedBox;\n }\n var axisAlignedBox;\n function get_ProductSpecification() {\n _init_properties_api_js_kt__ym3iu4();\n return ProductSpecification_0;\n }\n var ProductSpecification_0;\n function get_ValidationResultFail() {\n _init_properties_api_js_kt__ym3iu4();\n return ValidationResultFail_0;\n }\n var ValidationResultFail_0;\n function get_ValidationResultWarning() {\n _init_properties_api_js_kt__ym3iu4();\n return ValidationResultWarning_0;\n }\n var ValidationResultWarning_0;\n function get_CollisionValidationResult() {\n _init_properties_api_js_kt__ym3iu4();\n return CollisionValidationResult_0;\n }\n var CollisionValidationResult_0;\n function get_CollisionValidation() {\n _init_properties_api_js_kt__ym3iu4();\n return CollisionValidation_0;\n }\n var CollisionValidation_0;\n function get_PartPair() {\n _init_properties_api_js_kt__ym3iu4();\n return PartPair_0;\n }\n var PartPair_0;\n function get_ProductCatalogFunctions() {\n _init_properties_api_js_kt__ym3iu4();\n return ProductCatalogFunctions;\n }\n var ProductCatalogFunctions;\n function get_ColliderShapeComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return ColliderShapeComponentConstructor;\n }\n var ColliderShapeComponentConstructor;\n function get_Polygon() {\n _init_properties_api_js_kt__ym3iu4();\n return Polygon_0;\n }\n var Polygon_0;\n function get_Plane() {\n _init_properties_api_js_kt__ym3iu4();\n return Plane_0;\n }\n var Plane_0;\n function get_DebugSurfacesComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return DebugSurfacesComponent_0;\n }\n var DebugSurfacesComponent_0;\n function get_DisplayNameComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return DisplayNameComponentConstructor;\n }\n var DisplayNameComponentConstructor;\n function get_DisabledConnectorsComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return DisabledConnectorsComponentConstructor;\n }\n var DisabledConnectorsComponentConstructor;\n function get_ModelInfoComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return modelInfoComponent;\n }\n var modelInfoComponent;\n function get_ModelTransformComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return modelTransformComponent;\n }\n var modelTransformComponent;\n function get_RelativeConnectorRepositioner() {\n _init_properties_api_js_kt__ym3iu4();\n return RelativeConnectorRepositionerRef;\n }\n var RelativeConnectorRepositionerRef;\n function get_RelativeConnectorData() {\n _init_properties_api_js_kt__ym3iu4();\n return relativeConnectorData;\n }\n var relativeConnectorData;\n function get_RelationOriginAlongX() {\n _init_properties_api_js_kt__ym3iu4();\n return relationOriginAlongX;\n }\n var relationOriginAlongX;\n function get_RelationOriginAlongY() {\n _init_properties_api_js_kt__ym3iu4();\n return relationOriginAlongY;\n }\n var relationOriginAlongY;\n function get_RelationOriginAlongZ() {\n _init_properties_api_js_kt__ym3iu4();\n return relationOriginAlongZ;\n }\n var relationOriginAlongZ;\n function get_RelationOrigin() {\n _init_properties_api_js_kt__ym3iu4();\n return relationOrigin;\n }\n var relationOrigin;\n function get_RelativeBoxOffset() {\n _init_properties_api_js_kt__ym3iu4();\n return relativeBoxOffset;\n }\n var relativeBoxOffset;\n function get_PointConnector() {\n _init_properties_api_js_kt__ym3iu4();\n return PointConnector_0;\n }\n var PointConnector_0;\n function get_PointSeriesConnector() {\n _init_properties_api_js_kt__ym3iu4();\n return PointSeriesConnectorConstructor;\n }\n var PointSeriesConnectorConstructor;\n function get_PointSeriesSubConnector() {\n _init_properties_api_js_kt__ym3iu4();\n return PointSeriesSubconnector;\n }\n var PointSeriesSubconnector;\n function get_EdgeConnector() {\n _init_properties_api_js_kt__ym3iu4();\n return EdgeConnector_0;\n }\n var EdgeConnector_0;\n function get_SurfaceConnector() {\n _init_properties_api_js_kt__ym3iu4();\n return SurfaceConnector_0;\n }\n var SurfaceConnector_0;\n function get_MathUtils() {\n _init_properties_api_js_kt__ym3iu4();\n return MathUtilsRef;\n }\n var MathUtilsRef;\n function get_ViewerDragEventComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return ViewerDragEventComponent_0;\n }\n var ViewerDragEventComponent_0;\n function get_LogLevel() {\n _init_properties_api_js_kt__ym3iu4();\n return logLevel;\n }\n var logLevel;\n function get_RotationDegreeOfFreedom() {\n _init_properties_api_js_kt__ym3iu4();\n return rotationDegreeOfFreedom;\n }\n var rotationDegreeOfFreedom;\n function get_PolyhedronUtils() {\n _init_properties_api_js_kt__ym3iu4();\n return PolyhedronUtilsRef;\n }\n var PolyhedronUtilsRef;\n function get_RaycastResult() {\n _init_properties_api_js_kt__ym3iu4();\n return RaycastResult_0;\n }\n var RaycastResult_0;\n function get_ApiSystemIds() {\n _init_properties_api_js_kt__ym3iu4();\n return apiSystemIds;\n }\n var apiSystemIds;\n function get_GuestConnectionsComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return guestConnectionsComponentConstructor;\n }\n var guestConnectionsComponentConstructor;\n function get_HostConnectionsComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return HostConnectionsComponentConstructor;\n }\n var HostConnectionsComponentConstructor;\n function get_DragSurfacesComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return dragSurfacesComponent;\n }\n var dragSurfacesComponent;\n function get_OutlineableComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return outlineable;\n }\n var outlineable;\n function get_DragSurface() {\n _init_properties_api_js_kt__ym3iu4();\n return dragSurface;\n }\n var dragSurface;\n function get_AutomaticGroupBuilderSystem() {\n _init_properties_api_js_kt__ym3iu4();\n return automaticEntityGroupBuilderSystemConstructor;\n }\n var automaticEntityGroupBuilderSystemConstructor;\n function get_ManualGroupConnectorValidation() {\n _init_properties_api_js_kt__ym3iu4();\n return entityGroupConnectorValidation;\n }\n var entityGroupConnectorValidation;\n function get_AssemblyStructureComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return assemblyStructureComponentConstructor;\n }\n var assemblyStructureComponentConstructor;\n function get_RestrictAllowedRequiredHostsComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return RestrictAllowedRequiredHostsComponent_0;\n }\n var RestrictAllowedRequiredHostsComponent_0;\n function get_ManualEntityGroupBuilderService() {\n _init_properties_api_js_kt__ym3iu4();\n return ManualEntityGroupBuilderServiceConstructor;\n }\n var ManualEntityGroupBuilderServiceConstructor;\n function get_DebugLine() {\n _init_properties_api_js_kt__ym3iu4();\n return DebugLine_0;\n }\n var DebugLine_0;\n function get_DebugLinesComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return DebugLinesComponent_0;\n }\n var DebugLinesComponent_0;\n function get_ValidationFail() {\n _init_properties_api_js_kt__ym3iu4();\n return validationFail;\n }\n var validationFail;\n function get_ValidationWarning() {\n _init_properties_api_js_kt__ym3iu4();\n return validationWarning;\n }\n var validationWarning;\n function get_AxisAlignedBoxUtils() {\n _init_properties_api_js_kt__ym3iu4();\n return AxisAlignedBoxUtils;\n }\n var AxisAlignedBoxUtils;\n function get_VectorConstants() {\n _init_properties_api_js_kt__ym3iu4();\n return VectorConstantsRef;\n }\n var VectorConstantsRef;\n function get_IsLoadingSnapshotComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return isLoadingSnapshotComponent;\n }\n var isLoadingSnapshotComponent;\n function get_SnapshotIgnoreComponent() {\n _init_properties_api_js_kt__ym3iu4();\n return snapshotIgnoreComponent;\n }\n var snapshotIgnoreComponent;\n function get_ChildConnectionValidation() {\n _init_properties_api_js_kt__ym3iu4();\n return childConnectionValidation;\n }\n var childConnectionValidation;\n function quaternionFromEuler(x, y, z) {\n _init_properties_api_js_kt__ym3iu4();\n return Companion_getInstance().fromEulerDegrees(new Degrees(x), new Degrees(y), new Degrees(z));\n }\n function UnserializableEntityComponent_0() {\n UnserializableEntityComponent.call(this);\n }\n function createDragType(type) {\n _init_properties_api_js_kt__ym3iu4();\n return valueOf(type);\n }\n function mockLoadedModelInfoComponent(hasFinishedLoading) {\n _init_properties_api_js_kt__ym3iu4();\n return new LoadedModelInfoComponent(hasFinishedLoading);\n }\n function Vector$_init_$ref_b2yate() {\n var l = function (p0, p1, p2) {\n return new Vector(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function Margin$_init_$ref_8haia1() {\n var l = function (p0, p1, p2, p3, p4, p5) {\n return new Margin(p0, p1, p2, p3, p4, p5);\n };\n l.callableName = '';\n return l;\n }\n function Size$_init_$ref_sdxags() {\n var l = function (p0, p1, p2) {\n return new Size(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function ModelTransform$_init_$ref_dirtfi() {\n var l = function (p0, p1, p2) {\n return new ModelTransform(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function EntityManagerImpl$_init_$ref_tnm1nf() {\n var l = function (p0) {\n return new EntityManagerImpl(p0);\n };\n l.callableName = '';\n return l;\n }\n function Ray$_init_$ref_ybpkqj() {\n var l = function (p0, p1) {\n return new Ray(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function Transform$_init_$ref_t8t60p() {\n var l = function (p0, p1) {\n return new Transform(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function Quaternion$_init_$ref_fnu1zb() {\n var l = function (p0, p1, p2, p3) {\n return QuaternionFromDouble(p0, p1, p2, p3);\n };\n l.callableName = '';\n return l;\n }\n function Degrees$_init_$ref_s8ngf6() {\n var l = function (p0) {\n return new Degrees(p0);\n };\n l.callableName = '';\n return l;\n }\n function Radians$_init_$ref_ac71tf() {\n var l = function (p0) {\n return new Radians(p0);\n };\n l.callableName = '';\n return l;\n }\n function Face$_init_$ref_vy87x4() {\n var l = function (p0) {\n return new Face(p0);\n };\n l.callableName = '';\n return l;\n }\n function Cuboid$_init_$ref_z3blhn() {\n var l = function (p0) {\n return CuboidFromSize(p0);\n };\n l.callableName = '';\n return l;\n }\n function PolyhedronGroup$_init_$ref_9q1lgk() {\n var l = function (p0) {\n return new PolyhedronGroup(p0);\n };\n l.callableName = '';\n return l;\n }\n function ConvexPolyhedron$_init_$ref_ukuqx4() {\n var l = function (p0, p1, p2, p3) {\n return new ConvexPolyhedron(p0, p1, p2, p3);\n };\n l.callableName = '';\n return l;\n }\n function AxisAlignedBox$_init_$ref_3ik1el() {\n var l = function (p0, p1) {\n return new AxisAlignedBox(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function ProductSpecification$_init_$ref_co9ifl() {\n var l = function (p0) {\n return new ProductSpecification(p0);\n };\n l.callableName = '';\n return l;\n }\n function ValidationResultFail$_init_$ref_33hbjl() {\n var l = function (p0, p1, p2) {\n return new ValidationResultFail(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function ValidationResultWarning$_init_$ref_ifhc0v() {\n var l = function (p0, p1, p2) {\n return new ValidationResultWarning(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function CollisionValidationResult$_init_$ref_9xprc3() {\n var l = function (p0, p1, p2, p3) {\n return new CollisionValidationResult(p0, p1, p2, p3);\n };\n l.callableName = '';\n return l;\n }\n function CollisionValidation$_init_$ref_6atbwm() {\n var l = function () {\n return new CollisionValidation();\n };\n l.callableName = '';\n return l;\n }\n function PartPair$_init_$ref_5c2u5k() {\n var l = function (p0, p1) {\n return new PartPair(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function ColliderShapeComponent$_init_$ref_8mmz1x() {\n var l = function (p0, p1) {\n return new ColliderShapeComponent(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function Polygon$_init_$ref_gy2pcl() {\n var l = function (p0, p1) {\n return new Polygon(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function Plane$_init_$ref_qgmgjb() {\n var l = function (p0, p1) {\n return new Plane(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function DebugSurfacesComponent$_init_$ref_cixmtd() {\n var l = function (p0) {\n return new DebugSurfacesComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function DisplayNameComponent$_init_$ref_oabmi3() {\n var l = function (p0) {\n return new DisplayNameComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function DisabledConnectorsComponent$_init_$ref_9lx7na() {\n var l = function (p0) {\n return new DisabledConnectorsComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function ModelInfoComponent$_init_$ref_4c9uw1() {\n var l = function (p0, p1, p2) {\n return new ModelInfoComponent(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function ModelTransformComponent$_init_$ref_qm70d1() {\n var l = function (p0) {\n return new ModelTransformComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function RelativeConnectorData$_init_$ref_gl5e92() {\n var l = function (p0, p1) {\n return new RelativeConnectorData(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function relationOrigin$lambda(x, y, z) {\n _init_properties_api_js_kt__ym3iu4();\n return new RelationOrigin(RelationOriginAlongXImpostor_getInstance().toEnum(x), RelationOriginAlongYImpostor_getInstance().toEnum(y), RelationOriginAlongZImpostor_getInstance().toEnum(z));\n }\n function RelativeBoxOffset$_init_$ref_c5ral() {\n var l = function (p0, p1) {\n return new RelativeBoxOffset(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function PointConnector$_init_$ref_zf7wyw() {\n var l = function (p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) {\n return new PointConnector(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);\n };\n l.callableName = '';\n return l;\n }\n function PointSeriesConnector$_init_$ref_nsfidb() {\n var l = function (p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) {\n return new PointSeriesConnector(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);\n };\n l.callableName = '';\n return l;\n }\n function PointSeriesSubConnector$_init_$ref_dzni41() {\n var l = function (p0, p1) {\n return new PointSeriesSubConnector(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function EdgeConnector$_init_$ref_1gnl2j() {\n var l = function (p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) {\n return new EdgeConnector(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);\n };\n l.callableName = '';\n return l;\n }\n function SurfaceConnector$_init_$ref_f5mxff() {\n var l = function (p0, p1, p2, p3, p4, p5, p6, p7, p8, p9) {\n return new SurfaceConnector(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);\n };\n l.callableName = '';\n return l;\n }\n function ViewerDragEventComponent$_init_$ref_frd03o() {\n var l = function (p0, p1, p2, p3) {\n return new ViewerDragEventComponent(p0, p1, p2, p3);\n };\n l.callableName = '';\n return l;\n }\n function RaycastResult$_init_$ref_cau7en() {\n var l = function (p0, p1) {\n return new RaycastResult(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function GuestConnectionsComponent$_init_$ref_fpjczp() {\n var l = function (p0) {\n return new GuestConnectionsComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function HostConnectionsComponent$_init_$ref_klemph() {\n var l = function (p0) {\n return new HostConnectionsComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function DragSurfacesComponent$_init_$ref_vthysi() {\n var l = function (p0, p1) {\n return new DragSurfacesComponent(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function OutlineableComponent$_init_$ref_vzlam4() {\n var l = function () {\n return new OutlineableComponent();\n };\n l.callableName = '';\n return l;\n }\n function DragSurface$_init_$ref_mad784() {\n var l = function (p0, p1) {\n return new DragSurface(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function AutomaticGroupBuilderSystem$_init_$ref_3dadxt() {\n var l = function (p0) {\n return new AutomaticGroupBuilderSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function ManualGroupConnectorValidation$_init_$ref_fsugfs() {\n var l = function (p0, p1) {\n return new ManualGroupConnectorValidation(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function AssemblyStructureComponent$_init_$ref_ghd23v() {\n var l = function (p0) {\n return new AssemblyStructureComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function RestrictAllowedRequiredHostsComponent$_init_$ref_wx7v88() {\n var l = function (p0) {\n return new RestrictAllowedRequiredHostsComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function ManualEntityGroupBuilderService$_init_$ref_e8eyt1() {\n var l = function (p0, p1) {\n return new ManualEntityGroupBuilderService(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function DebugLine$_init_$ref_z9a10i() {\n var l = function (p0, p1, p2, p3) {\n return new DebugLine(p0, p1, p2, p3);\n };\n l.callableName = '';\n return l;\n }\n function DebugLinesComponent$_init_$ref_gfcjdg() {\n var l = function (p0) {\n return new DebugLinesComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function IsLoadingSnapshotComponent$_init_$ref_igs8ou() {\n var l = function () {\n return new IsLoadingSnapshotComponent();\n };\n l.callableName = '';\n return l;\n }\n function SnapshotIgnoreComponent$_init_$ref_uxdxnm() {\n var l = function () {\n return new SnapshotIgnoreComponent();\n };\n l.callableName = '';\n return l;\n }\n function ChildConnectionValidation$_init_$ref_m19sa6() {\n var l = function () {\n return new ChildConnectionValidation();\n };\n l.callableName = '';\n return l;\n }\n var properties_initialized_api_js_kt_m1n5xa;\n function _init_properties_api_js_kt__ym3iu4() {\n if (!properties_initialized_api_js_kt_m1n5xa) {\n properties_initialized_api_js_kt_m1n5xa = true;\n connectorType = ConnectorType_instance;\n Vector_0 = Vector$_init_$ref_b2yate();\n Margin_0 = Margin$_init_$ref_8haia1();\n Size_0 = Size$_init_$ref_sdxags();\n modelTransform = ModelTransform$_init_$ref_dirtfi();\n entityManagerConstructor = EntityManagerImpl$_init_$ref_tnm1nf();\n ray = Ray$_init_$ref_ybpkqj();\n Transform_0 = Transform$_init_$ref_t8t60p();\n quaternion = Quaternion$_init_$ref_fnu1zb();\n degrees = Degrees$_init_$ref_s8ngf6();\n radians = Radians$_init_$ref_ac71tf();\n Face_0 = Face$_init_$ref_vy87x4();\n Cuboid = Cuboid$_init_$ref_z3blhn();\n PolyhedronGroup_0 = PolyhedronGroup$_init_$ref_9q1lgk();\n ConvexPolyhedron_0 = ConvexPolyhedron$_init_$ref_ukuqx4();\n axisAlignedBox = AxisAlignedBox$_init_$ref_3ik1el();\n ProductSpecification_0 = ProductSpecification$_init_$ref_co9ifl();\n ValidationResultFail_0 = ValidationResultFail$_init_$ref_33hbjl();\n ValidationResultWarning_0 = ValidationResultWarning$_init_$ref_ifhc0v();\n CollisionValidationResult_0 = CollisionValidationResult$_init_$ref_9xprc3();\n CollisionValidation_0 = CollisionValidation$_init_$ref_6atbwm();\n PartPair_0 = PartPair$_init_$ref_5c2u5k();\n ProductCatalogFunctions = ProductCatalogFunctions_instance;\n ColliderShapeComponentConstructor = ColliderShapeComponent$_init_$ref_8mmz1x();\n Polygon_0 = Polygon$_init_$ref_gy2pcl();\n Plane_0 = Plane$_init_$ref_qgmgjb();\n DebugSurfacesComponent_0 = DebugSurfacesComponent$_init_$ref_cixmtd();\n DisplayNameComponentConstructor = DisplayNameComponent$_init_$ref_oabmi3();\n DisabledConnectorsComponentConstructor = DisabledConnectorsComponent$_init_$ref_9lx7na();\n modelInfoComponent = ModelInfoComponent$_init_$ref_4c9uw1();\n modelTransformComponent = ModelTransformComponent$_init_$ref_qm70d1();\n RelativeConnectorRepositionerRef = RelativeConnectorRepositioner_instance;\n relativeConnectorData = RelativeConnectorData$_init_$ref_gl5e92();\n relationOriginAlongX = RelationOriginAlongXImpostor_getInstance();\n relationOriginAlongY = RelationOriginAlongYImpostor_getInstance();\n relationOriginAlongZ = RelationOriginAlongZImpostor_getInstance();\n relationOrigin = relationOrigin$lambda;\n relativeBoxOffset = RelativeBoxOffset$_init_$ref_c5ral();\n PointConnector_0 = PointConnector$_init_$ref_zf7wyw();\n PointSeriesConnectorConstructor = PointSeriesConnector$_init_$ref_nsfidb();\n PointSeriesSubconnector = PointSeriesSubConnector$_init_$ref_dzni41();\n EdgeConnector_0 = EdgeConnector$_init_$ref_1gnl2j();\n SurfaceConnector_0 = SurfaceConnector$_init_$ref_f5mxff();\n MathUtilsRef = MathUtils_getInstance();\n ViewerDragEventComponent_0 = ViewerDragEventComponent$_init_$ref_frd03o();\n logLevel = LogLevelJavascriptImpostor_instance;\n rotationDegreeOfFreedom = RotationDegreeOfFreedomImpostor_instance;\n PolyhedronUtilsRef = PolyhedronUtils_getInstance();\n RaycastResult_0 = RaycastResult$_init_$ref_cau7en();\n apiSystemIds = ApiSystemIds_instance;\n guestConnectionsComponentConstructor = GuestConnectionsComponent$_init_$ref_fpjczp();\n HostConnectionsComponentConstructor = HostConnectionsComponent$_init_$ref_klemph();\n dragSurfacesComponent = DragSurfacesComponent$_init_$ref_vthysi();\n outlineable = OutlineableComponent$_init_$ref_vzlam4();\n dragSurface = DragSurface$_init_$ref_mad784();\n automaticEntityGroupBuilderSystemConstructor = AutomaticGroupBuilderSystem$_init_$ref_3dadxt();\n entityGroupConnectorValidation = ManualGroupConnectorValidation$_init_$ref_fsugfs();\n assemblyStructureComponentConstructor = AssemblyStructureComponent$_init_$ref_ghd23v();\n RestrictAllowedRequiredHostsComponent_0 = RestrictAllowedRequiredHostsComponent$_init_$ref_wx7v88();\n ManualEntityGroupBuilderServiceConstructor = ManualEntityGroupBuilderService$_init_$ref_e8eyt1();\n DebugLine_0 = DebugLine$_init_$ref_z9a10i();\n DebugLinesComponent_0 = DebugLinesComponent$_init_$ref_gfcjdg();\n validationFail = ValidationResultType_FAIL_getInstance();\n validationWarning = ValidationResultType_WARNING_getInstance();\n AxisAlignedBoxUtils = Companion_getInstance_0();\n VectorConstantsRef = VectorConstants_getInstance();\n isLoadingSnapshotComponent = IsLoadingSnapshotComponent$_init_$ref_igs8ou();\n snapshotIgnoreComponent = SnapshotIgnoreComponent$_init_$ref_uxdxnm();\n childConnectionValidation = ChildConnectionValidation$_init_$ref_m19sa6();\n }\n }\n function get_SelectableComponent() {\n _init_properties_component_kt__lifbkl();\n return selectable;\n }\n var selectable;\n function get_DraggableComponent() {\n _init_properties_component_kt__lifbkl();\n return draggable;\n }\n var draggable;\n function get_SnapRootComponent() {\n _init_properties_component_kt__lifbkl();\n return snapRootComponent;\n }\n var snapRootComponent;\n function get_HistoryEvent() {\n _init_properties_component_kt__lifbkl();\n return HistoryEvent;\n }\n var HistoryEvent;\n function get_HistoryChangedEventComponent() {\n _init_properties_component_kt__lifbkl();\n return historyChangedEventComponent;\n }\n var historyChangedEventComponent;\n function get_WorldSpaceDragEventComponent() {\n _init_properties_component_kt__lifbkl();\n return worldSpaceDragEventComponent;\n }\n var worldSpaceDragEventComponent;\n function get_ClickEventComponent() {\n _init_properties_component_kt__lifbkl();\n return clickEventComponent;\n }\n var clickEventComponent;\n function get_LocalTransformComponent() {\n _init_properties_component_kt__lifbkl();\n return localTransformation;\n }\n var localTransformation;\n function get_ConnectorsComponent() {\n _init_properties_component_kt__lifbkl();\n return connectorsComponent;\n }\n var connectorsComponent;\n function get_ChildComponent() {\n _init_properties_component_kt__lifbkl();\n return childComponent;\n }\n var childComponent;\n function get_ParentComponent() {\n _init_properties_component_kt__lifbkl();\n return parentComponent;\n }\n var parentComponent;\n function get_ViewerObjectComponent() {\n _init_properties_component_kt__lifbkl();\n return viewerObjectComponent;\n }\n var viewerObjectComponent;\n function get_ConnectionRootComponent() {\n _init_properties_component_kt__lifbkl();\n return connectionRootComponent;\n }\n var connectionRootComponent;\n function get_ProductPartComponent() {\n _init_properties_component_kt__lifbkl();\n return productPartComponent;\n }\n var productPartComponent;\n function get_WorldTransformComponent() {\n _init_properties_component_kt__lifbkl();\n return worldTransformComponent;\n }\n var worldTransformComponent;\n function get_ComponentIds() {\n _init_properties_component_kt__lifbkl();\n return componentIds;\n }\n var componentIds;\n function get_ComponentIdSpan() {\n _init_properties_component_kt__lifbkl();\n return componentIdSpan;\n }\n var componentIdSpan;\n function get_TemplateDataComponent() {\n _init_properties_component_kt__lifbkl();\n return templateDataComponent;\n }\n var templateDataComponent;\n function get_RelativeConnectorsComponent() {\n _init_properties_component_kt__lifbkl();\n return relativeConnectorsComponent;\n }\n var relativeConnectorsComponent;\n function get_AssemblyPartsComponent() {\n _init_properties_component_kt__lifbkl();\n return assemblyPartsComponent;\n }\n var assemblyPartsComponent;\n function get_ViewerComponent() {\n _init_properties_component_kt__lifbkl();\n return viewerComponent;\n }\n var viewerComponent;\n function get_ProductComponent() {\n _init_properties_component_kt__lifbkl();\n return productComponent;\n }\n var productComponent;\n function SelectedComponent() {\n _init_properties_component_kt__lifbkl();\n return SelectedComponent_instance;\n }\n function SceneReloading() {\n _init_properties_component_kt__lifbkl();\n return SceneReloadingComponent_instance;\n }\n function RenderedComponent() {\n _init_properties_component_kt__lifbkl();\n return RenderedComponent_instance;\n }\n function InSceneComponent() {\n _init_properties_component_kt__lifbkl();\n return InSceneComponent_instance;\n }\n function StaticComponent() {\n _init_properties_component_kt__lifbkl();\n return StaticComponent_getInstance();\n }\n function SelectableComponent$_init_$ref_pdu60u() {\n var l = function () {\n return new SelectableComponent();\n };\n l.callableName = '';\n return l;\n }\n function DraggableComponent$_init_$ref_8nu9aj() {\n var l = function () {\n return new DraggableComponent();\n };\n l.callableName = '';\n return l;\n }\n function SnapRootComponent$_init_$ref_u9ilxo() {\n var l = function () {\n return new SnapRootComponent();\n };\n l.callableName = '';\n return l;\n }\n function historyChangedEventComponent$lambda(eventTypeName) {\n _init_properties_component_kt__lifbkl();\n return new HistoryChangedEventComponent(valueOf_0(eventTypeName));\n }\n function WorldSpaceDragEventComponent$_init_$ref_2xqn0m() {\n var l = function (p0, p1) {\n return new WorldSpaceDragEventComponent(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function ClickEventComponent$_init_$ref_kxikre() {\n var l = function (p0) {\n return new ClickEventComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function LocalTransformComponent$_init_$ref_xjesuv() {\n var l = function (p0) {\n return new LocalTransformComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function ConnectorsComponent$_init_$ref_qm59bi() {\n var l = function (p0) {\n return new ConnectorsComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function ChildComponent$_init_$ref_yhw7t0() {\n var l = function (p0) {\n return new ChildComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function ParentComponent$_init_$ref_5hpzki() {\n var l = function (p0) {\n return new ParentComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function ViewerObjectComponent$_init_$ref_ijsie1() {\n var l = function (p0) {\n return new ViewerObjectComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function ConnectionRootComponent$_init_$ref_91dp4o() {\n var l = function () {\n return new ConnectionRootComponent();\n };\n l.callableName = '';\n return l;\n }\n function ProductPartComponent$_init_$ref_ysmpee() {\n var l = function (p0) {\n return new ProductPartComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function WorldTransformComponent$_init_$ref_t6duq() {\n var l = function (p0) {\n return new WorldTransformComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function TemplateDataComponent$_init_$ref_f0kftg() {\n var l = function (p0, p1, p2, p3, p4) {\n return new TemplateDataComponent(p0, p1, p2, p3, p4);\n };\n l.callableName = '';\n return l;\n }\n function RelativeConnectorsComponent$_init_$ref_ovg1ba() {\n var l = function (p0) {\n return new RelativeConnectorsComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function AssemblyPartsComponent$_init_$ref_y1v56q() {\n var l = function (p0) {\n return AssemblyPartsComponent_init_$Create$(p0);\n };\n l.callableName = '';\n return l;\n }\n function ViewerComponent$_init_$ref_b4gcw6() {\n var l = function (p0) {\n return new ViewerComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function ProductComponent$_init_$ref_wrnq5l() {\n var l = function (p0) {\n return new ProductComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n var properties_initialized_component_kt_mmiqdv;\n function _init_properties_component_kt__lifbkl() {\n if (!properties_initialized_component_kt_mmiqdv) {\n properties_initialized_component_kt_mmiqdv = true;\n selectable = SelectableComponent$_init_$ref_pdu60u();\n draggable = DraggableComponent$_init_$ref_8nu9aj();\n snapRootComponent = SnapRootComponent$_init_$ref_u9ilxo();\n HistoryEvent = HistoryEvent_instance;\n historyChangedEventComponent = historyChangedEventComponent$lambda;\n worldSpaceDragEventComponent = WorldSpaceDragEventComponent$_init_$ref_2xqn0m();\n clickEventComponent = ClickEventComponent$_init_$ref_kxikre();\n localTransformation = LocalTransformComponent$_init_$ref_xjesuv();\n connectorsComponent = ConnectorsComponent$_init_$ref_qm59bi();\n childComponent = ChildComponent$_init_$ref_yhw7t0();\n parentComponent = ParentComponent$_init_$ref_5hpzki();\n viewerObjectComponent = ViewerObjectComponent$_init_$ref_ijsie1();\n connectionRootComponent = ConnectionRootComponent$_init_$ref_91dp4o();\n productPartComponent = ProductPartComponent$_init_$ref_ysmpee();\n worldTransformComponent = WorldTransformComponent$_init_$ref_t6duq();\n componentIds = ComponentIds_instance;\n componentIdSpan = ComponentIdSpan_instance;\n templateDataComponent = TemplateDataComponent$_init_$ref_f0kftg();\n relativeConnectorsComponent = RelativeConnectorsComponent$_init_$ref_ovg1ba();\n assemblyPartsComponent = AssemblyPartsComponent$_init_$ref_y1v56q();\n viewerComponent = ViewerComponent$_init_$ref_b4gcw6();\n productComponent = ProductComponent$_init_$ref_wrnq5l();\n }\n }\n function _CoreDebug(core) {\n this.core = core;\n this.coreVisualization = null;\n this.dragSurfaceNormalVisualizationSystem = new DragSurfaceNormalVisualizationSystem(this.core.services);\n this.drawDragGhostSystem = new DrawDragGhostSystem(this.core.services);\n this.validationsMeasurer = new Measurer();\n this.measuringEntityManagerWatcher = new MeasuringEntityManagerWatcher(this.core.services.entityManager);\n this.placementService = new PlacementService(this.core.services);\n this.core.services.entityManager.registerSystem(this.dragSurfaceNormalVisualizationSystem);\n this.dragSurfaceNormalVisualizationSystem.disable();\n this.core.services.entityManager.registerSystem(this.drawDragGhostSystem);\n this.drawDragGhostSystem.disable();\n this.coreVersion = this.core.version();\n var tmp = this;\n // Inline function 'kotlin.collections.mutableMapOf' call\n tmp.n4g_1 = LinkedHashMap_init_$Create$();\n }\n protoOf(_CoreDebug).o4g = function () {\n return this.core;\n };\n protoOf(_CoreDebug).p4g = function (_set____db54di) {\n this.coreVisualization = _set____db54di;\n };\n protoOf(_CoreDebug).q4g = function () {\n return this.coreVisualization;\n };\n protoOf(_CoreDebug).w3q = function () {\n return this.dragSurfaceNormalVisualizationSystem;\n };\n protoOf(_CoreDebug).r4g = function () {\n return this.drawDragGhostSystem;\n };\n protoOf(_CoreDebug).s4g = function () {\n return this.validationsMeasurer;\n };\n protoOf(_CoreDebug).t4g = function () {\n return this.measuringEntityManagerWatcher;\n };\n protoOf(_CoreDebug).u4g = function () {\n return this.placementService;\n };\n protoOf(_CoreDebug).getAllOfCore = function () {\n return _;\n };\n protoOf(_CoreDebug).toggleColliders = function () {\n this.enableVisualization(this.core.services);\n var tmp0_safe_receiver = this.coreVisualization;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.toggleColliders();\n }\n };\n protoOf(_CoreDebug).v4g = function () {\n return this.coreVersion;\n };\n protoOf(_CoreDebug).toggleConnectors = function () {\n this.enableVisualization(this.core.services);\n var tmp0_safe_receiver = this.coreVisualization;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.toggleConnectors();\n }\n };\n protoOf(_CoreDebug).toggleFunctionalMargin = function () {\n this.enableVisualization(this.core.services);\n var tmp0_safe_receiver = this.coreVisualization;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.toggleFunctionalMargin();\n }\n };\n protoOf(_CoreDebug).toggleFunctionalZones = function () {\n this.enableVisualization(this.core.services);\n var tmp0_safe_receiver = this.coreVisualization;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.toggleFunctionalZone();\n }\n };\n protoOf(_CoreDebug).toggleAutoAdaptHostZone = function () {\n this.enableVisualization(this.core.services);\n var tmp0_safe_receiver = this.coreVisualization;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.toggleAutoAdaptHostZone();\n }\n };\n protoOf(_CoreDebug).toggleDragSurfaceVisualization = function () {\n this.enableVisualization(this.core.services);\n var tmp0_safe_receiver = this.coreVisualization;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.toggleDragSurfaces();\n }\n };\n protoOf(_CoreDebug).toggleDragPointVisualization = function () {\n this.enableVisualization(this.core.services);\n var tmp0_safe_receiver = this.coreVisualization;\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.toggleDragProjectionPoint();\n }\n };\n protoOf(_CoreDebug).enableVisualization = function (coreServices) {\n if (this.coreVisualization == null) {\n var visualizer = new DefaultVisualizer(coreServices, new ModelInfoComponent('', 'https://content.dexf.ikea.com/cdn/asset/kvadrat/rt/gojxjez4vka8.glb', ''));\n this.coreVisualization = new CoreVisualization(coreServices, visualizer, visualizer);\n }\n };\n protoOf(_CoreDebug).getEntityById = function (id) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = this.core.services.entityManager.entities;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.getEntityById.' call\n if (element.id === id) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var entity = tmp$ret$1;\n if (entity == null) {\n echoStandardConsole('No entity with given id found');\n }\n return entity;\n };\n protoOf(_CoreDebug).getEntitiesWithComponents = function (componentIds) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = this.core.services.entityManager.entities;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.getEntitiesWithComponents.' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.all' call\n var inductionVariable_0 = 0;\n var last_0 = componentIds.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = componentIds[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.getEntitiesWithComponents..' call\n if (!element.hasComponent(element_0)) {\n tmp$ret$1 = false;\n break $l$block;\n }\n }\n tmp$ret$1 = true;\n }\n if (tmp$ret$1) {\n destination.q(element);\n }\n }\n var entities = destination;\n if (entities.b1()) {\n echoStandardConsole('No entities with given components found');\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(entities);\n };\n protoOf(_CoreDebug).getSelectedEntity = function () {\n return findSelectedEntity(this.core);\n };\n protoOf(_CoreDebug).validateSelectedEntity = function () {\n var tmp0_safe_receiver = findSelectedEntity(this.core);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var result = this.core.services.validations.validateCurrentState(tmp0_safe_receiver, false);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = result.length;\n while (inductionVariable < last) {\n var element = result[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.validateSelectedEntity..' call\n if (element.resultType.equals(ValidationResultType_FAIL_getInstance())) {\n destination.q(element);\n }\n }\n var failed = copyToArray(destination);\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var destination_0 = ArrayList_init_$Create$();\n var inductionVariable_0 = 0;\n var last_0 = result.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = result[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.validateSelectedEntity..' call\n if (element_0.resultType.equals(ValidationResultType_WARNING_getInstance())) {\n destination_0.q(element_0);\n }\n }\n var warning = copyToArray(destination_0);\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(failed.length === 0)) {\n echoStandardConsole('' + get_displayName(tmp0_safe_receiver) + ' validation failed:');\n } else {\n // Inline function 'kotlin.collections.isNotEmpty' call\n // Inline function 'kotlin.collections.isEmpty' call\n if (!(warning.length === 0)) {\n echoStandardConsole('' + get_displayName(tmp0_safe_receiver) + ' validated successfully with warnings');\n } else {\n echoStandardConsole('' + get_displayName(tmp0_safe_receiver) + ' validated successfully');\n }\n }\n return new SortedValidationResult(warning, failed);\n }\n return null;\n };\n protoOf(_CoreDebug).printRegisteredSystems = function () {\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var indexedObject = this.core.services.entityManager.getSystemsRegistered();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var item = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.printRegisteredSystems.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n echoStandardConsole('' + tmp1 + '. ' + item.id + ' enabled: ' + item.isEnabled);\n }\n };\n protoOf(_CoreDebug).printSystemsListeningToComponent = function (componentId) {\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var indexedObject = this.core.services.entityManager.getSystemsRegisteredForComponent(componentId);\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var item = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.printSystemsListeningToComponent.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n echoStandardConsole('' + tmp1 + '. ' + item.id + ' enabled: ' + item.isEnabled);\n }\n };\n protoOf(_CoreDebug).enableSystem = function (i) {\n var tmp0_safe_receiver = getSystem(i, this.core);\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.enable();\n }\n };\n protoOf(_CoreDebug).disableSystem = function (i) {\n var tmp0_safe_receiver = getSystem(i, this.core);\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.disable();\n }\n };\n protoOf(_CoreDebug).printValidationRules = function () {\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var indexedObject = this.core.getValidations();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var item = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.printValidationRules.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n echoStandardConsole('' + tmp1 + '. ' + item.id + ' enabled: ' + item.isEnabled);\n }\n };\n protoOf(_CoreDebug).enableValidationRule = function (i) {\n var tmp0_safe_receiver = getValidationRule(i, this.core);\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.enable();\n }\n };\n protoOf(_CoreDebug).disableValidationRule = function (i) {\n var tmp0_safe_receiver = getValidationRule(i, this.core);\n if (tmp0_safe_receiver == null)\n null;\n else {\n tmp0_safe_receiver.disable();\n }\n };\n protoOf(_CoreDebug).startMeasuringValidationRules = function () {\n var tmp = this.core.services.validations;\n // Inline function 'kotlin.also' call\n var this_0 = this.validationsMeasurer;\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'com.ikea.core.debug.CoreDebug.startMeasuringValidationRules.' call\n this_0.clear();\n tmp.measurer = this_0;\n };\n protoOf(_CoreDebug).stopMeasuringValidationRulesAndPrintResults = function () {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.stopMeasuringValidationRulesAndGetResults();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.stopMeasuringValidationRulesAndPrintResults.' call\n echoStandardConsole(element);\n }\n };\n protoOf(_CoreDebug).stopMeasuringValidationRulesAndGetResults = function () {\n this.core.services.validations.measurer = null;\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.validationsMeasurer.getMeasurementsFormatted();\n return copyToArray(this_0);\n };\n protoOf(_CoreDebug).startMeasuringSystems = function () {\n this.core.services.entityManager.addWatcher(this.measuringEntityManagerWatcher);\n this.measuringEntityManagerWatcher.measurer.clear();\n };\n protoOf(_CoreDebug).stopMeasuringSystemsAndPrintResults = function () {\n // Inline function 'kotlin.collections.forEach' call\n var indexedObject = this.stopMeasuringSystemsAndGetResults();\n var inductionVariable = 0;\n var last = indexedObject.length;\n while (inductionVariable < last) {\n var element = indexedObject[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.stopMeasuringSystemsAndPrintResults.' call\n echoStandardConsole(element);\n }\n };\n protoOf(_CoreDebug).stopMeasuringSystemsAndGetResults = function () {\n this.core.services.entityManager.removeWatcher(this.measuringEntityManagerWatcher);\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = this.measuringEntityManagerWatcher.measurer.getMeasurementsFormatted();\n return copyToArray(this_0);\n };\n protoOf(_CoreDebug).traceComponentChainOnce = function (componentId) {\n new LoggingEntityManagerWatcher(this.core.services.entityManager, componentId);\n };\n protoOf(_CoreDebug).validateSnapsForSelectedEntity = function (hostId) {\n var tmp0_safe_receiver = findSelectedEntity(this.core);\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n this.n4g_1.z();\n // Inline function 'kotlin.collections.find' call\n var this_0 = this.core.services.sceneManager.entities;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.validateSnapsForSelectedEntity..' call\n if (element.id === hostId) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_safe_receiver_0 = tmp$ret$1;\n if (tmp0_safe_receiver_0 == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n var indexedObject = SnapUtils_instance.matchingSnapActionCandidates(tmp0_safe_receiver, tmp0_safe_receiver_0, new SnapSettings(true));\n var inductionVariable_0 = 0;\n var last_0 = indexedObject.length;\n while (inductionVariable_0 < last_0) {\n var element_0 = indexedObject[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.validateSnapsForSelectedEntity...' call\n var snapResult = new Pair(element_0, this.core.services.validations.validateSnap(element_0, false));\n $l$block_0: {\n // Inline function 'com.ikea.core.utils.orElse' call\n var tmp0_safe_receiver_1 = this.n4g_1.b3(element_0.host);\n if ((tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.q(snapResult)) == null) {\n var this_1 = this.n4g_1;\n var key = element_0.host;\n var value = mutableListOf([snapResult]);\n this_1.r2(key, value);\n break $l$block_0;\n }\n }\n }\n }\n var index = 0;\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this.n4g_1.q2().t();\n while (tmp0_iterator.u()) {\n var element_1 = tmp0_iterator.w();\n // Inline function 'com.ikea.core.debug.CoreDebug.validateSnapsForSelectedEntity..' call\n // Inline function 'kotlin.collections.component1' call\n var host = element_1.t2();\n // Inline function 'kotlin.collections.component2' call\n var snapResults = element_1.u2();\n echoStandardConsole('Host ' + get_displayName(host) + ' id: ' + host.id);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = snapResults.t();\n while (tmp0_iterator_0.u()) {\n var element_2 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.debug.CoreDebug.validateSnapsForSelectedEntity...' call\n var snap = element_2.af();\n var result = element_2.bf();\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n var tmp = snap.hostConnector.key;\n var tmp_0 = snap.guestConnector.key;\n var tmp_1 = snap.priority;\n var tmp_2 = snap.inActivationDistance();\n var tmp_3;\n // Inline function 'kotlin.collections.isEmpty' call\n if (result.length === 0) {\n tmp_3 = 'SUCCESS';\n } else {\n tmp_3 = 'FAIL due to:';\n }\n echoStandardConsole('' + tmp0 + '. ' + tmp + ' <--> ' + tmp_0 + ' p=' + tmp_1 + ' iad=' + tmp_2 + ' ' + tmp_3);\n var tmp1_safe_receiver = snap.alignmentInitiatorCandidate;\n if (tmp1_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n echoStandardConsole(' (due to alignment ' + tmp1_safe_receiver.hostConnector.key + ' <--> ' + tmp1_safe_receiver.guestConnector.key + ' p=' + tmp1_safe_receiver.priority + ')');\n }\n // Inline function 'kotlin.collections.forEach' call\n var inductionVariable_1 = 0;\n var last_1 = result.length;\n while (inductionVariable_1 < last_1) {\n var element_3 = result[inductionVariable_1];\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'com.ikea.core.debug.CoreDebug.validateSnapsForSelectedEntity....' call\n echoStandardConsole(element_3);\n }\n }\n echoStandardConsole('---------------------------------');\n }\n echoStandardConsole('Perform a snap by calling:');\n echoStandardConsole('CoreDebug.performValidatedSnap()');\n }\n };\n protoOf(_CoreDebug).performValidatedSnap = function (snapIndex) {\n var index = 0;\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = this.n4g_1.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'com.ikea.core.debug.CoreDebug.performValidatedSnap.' call\n // Inline function 'kotlin.collections.component2' call\n var snapResults = element.u2();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator_0 = snapResults.t();\n while (tmp0_iterator_0.u()) {\n var element_0 = tmp0_iterator_0.w();\n // Inline function 'com.ikea.core.debug.CoreDebug.performValidatedSnap..' call\n var snap = element_0.af();\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n if (tmp0 === snapIndex) {\n snap.perform();\n return Unit_instance;\n }\n }\n }\n echoStandardConsole('No candidate with that index. (validateSnapsForSelectedEntity() must be run first)');\n };\n protoOf(_CoreDebug).help = function () {\n printHelp();\n };\n function findSelectedEntity(core) {\n // Inline function 'kotlin.collections.filter' call\n // Inline function 'kotlin.collections.filterTo' call\n var this_0 = core.services.sceneManager.entities;\n var destination = ArrayList_init_$Create$();\n var inductionVariable = 0;\n var last = this_0.length;\n while (inductionVariable < last) {\n var element = this_0[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'com.ikea.core.debug.findSelectedEntity.' call\n if (element.hasComponent(0)) {\n destination.q(element);\n }\n }\n var selected = destination;\n if (selected.b1()) {\n echoStandardConsole('No entity selected');\n } else if (selected.n() > 1) {\n echoStandardConsole('Several entities selected, returning first');\n }\n return firstOrNull(selected);\n }\n function getSystem(i, core) {\n var systems = core.services.entityManager.getSystemsRegistered();\n if (i < 0 ? true : i > systems.length) {\n echoStandardConsole('Invalid system index');\n return null;\n }\n return systems[i];\n }\n function getValidationRule(i, core) {\n var validationRules = core.getValidations();\n if (i < 0 ? true : i > validationRules.length) {\n echoStandardConsole('Invalid validation rule index');\n return null;\n }\n return validationRules[i];\n }\n function SortedValidationResult(warning, fail) {\n this.w4g_1 = warning;\n this.x4g_1 = fail;\n }\n protoOf(SortedValidationResult).equals = function (other) {\n if (this === other)\n return true;\n if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n return false;\n if (!(other instanceof SortedValidationResult))\n THROW_CCE();\n if (!contentEquals(this.w4g_1, other.w4g_1))\n return false;\n if (!contentEquals(this.x4g_1, other.x4g_1))\n return false;\n return true;\n };\n protoOf(SortedValidationResult).hashCode = function () {\n var result = contentHashCode(this.w4g_1);\n result = imul(31, result) + contentHashCode(this.x4g_1) | 0;\n return result;\n };\n protoOf(SortedValidationResult).toString = function () {\n return 'SortedValidationResult(warning=' + toString(this.w4g_1) + ', fail=' + toString(this.x4g_1) + ')';\n };\n function printHelp() {\n var helpMessage = '###############################\\n\\n Welcome to CoreDebug\\n\\n###############################\\n\\n### CoreDebug Systems\\n\\nCall enable() or disable() on any of the\\nfollowing system to enable/disable it\\n\\n* drawDragGhostSystem\\n\\n### CoreDebug Visualization\\n\\nTo toggle visualization on and off:\\n* toggleColliders()\\n* toggleConnectors()\\n* toggleAutoAdaptHostZone()\\n* toggleFunctionalMargin()\\n* toggleFunctionalZone()\\n\\n### CoreDebug functions:\\n\\n# Get entity with a specific id\\nCoreDebug.getEntityById(id: string)\\n\\n# Get entities that have specific components. Will include detached entities, call with\\n# InSceneComponent id (5) in componentIds array to only get entities that are in scene.\\nCoreDebug.getEntitiesWithComponents(componentIds: number[])\\n\\n# Get selected entity\\nCoreDebug.getSelectedEntity()\\n\\n# Validate selected entity and return results\\nCoreDebug.validateSelectedEntity()\\n\\n# Print registered systems to console (with index)\\nCoreDebug.printRegisteredSystems()\\n\\n# Print systems listening to a component in the order they listen\\nCoreDebug.printSystemsListeningToComponent(componentId: number)\\n\\n# Enable system using index from printRegisteredSystems()\\nCoreDebug.enableSystem(index: number)\\n\\n# Disable system using index from printRegisteredSystems()\\nCoreDebug.disableSystem(index: number)\\n\\n# Print validation rules to console\\nCoreDebug.printValidationRules()\\n\\n# Start measuring number of calls and time spent in each validation rule\\nCoreDebug.startMeasuringValidationRules()\\n\\n# Stop measuring validation rules and print the results to console\\nCoreDebug.stopMeasuringValidationRulesAndPrintResults()\\n\\n# Start measuring number of calls and time spent in each system callback function (add/update/remove per componentId)\\nCoreDebug.startMeasuringSystems()\\n\\n# Stop measuring systems and print the results to console\\nCoreDebug.stopMeasuringSystemsAndPrintResults()\\n\\n# Print a trace for how a component change propagates through systems\\n# It will print the next propagation chain that involves the provided component\\nCoreDebug.traceComponentChainOnce(componentId: number)\\n\\n# Find and validate all possible snaps for the selected entity. Optionally pass an entity id\\n# to only get snaps with with that host. Prints out info about the snap and the validation\\n# results per host entity ordered with an index. This index can be passed to performValidatedSnap()\\n# Snap info: connector keys (host <--> guest), priority (p), if it is in activation\\n# distance (iad) and if it originated from matching alignment connectors\\nCoreDebug.validateSnapsForSelectedEntity(hostId?: string)\\n\\n# Performs the snap with a given index that you get from running validateSnapsForSelectedEntity()\\n# The snap is performed regardless of the validation result\\nCoreDebug.performValidatedSnap(snapIndex: number)\\n\\n# Print this help again\\nCoreDebug.help()\\n\\n###############################';\n echoStandardConsole(helpMessage);\n }\n function get_ColliderUtils() {\n _init_properties_ColliderUtils_kt__buwx7v();\n return ColliderUtils;\n }\n var ColliderUtils;\n function get_CollisionUtils() {\n _init_properties_ColliderUtils_kt__buwx7v();\n return CollisionUtilsObj;\n }\n var CollisionUtilsObj;\n var properties_initialized_ColliderUtils_kt_kh6v71;\n function _init_properties_ColliderUtils_kt__buwx7v() {\n if (!properties_initialized_ColliderUtils_kt_kh6v71) {\n properties_initialized_ColliderUtils_kt_kh6v71 = true;\n ColliderUtils = ColliderUtils_instance;\n CollisionUtilsObj = CollisionUtils_instance;\n }\n }\n function get_ComponentUtils() {\n _init_properties_ComponentUtils_kt__d1ghsk();\n return ComponentUtils;\n }\n var ComponentUtils;\n var properties_initialized_ComponentUtils_kt_pakiie;\n function _init_properties_ComponentUtils_kt__d1ghsk() {\n if (!properties_initialized_ComponentUtils_kt_pakiie) {\n properties_initialized_ComponentUtils_kt_pakiie = true;\n ComponentUtils = ComponentUtils_instance;\n }\n }\n function get_ConnectionUtils() {\n _init_properties_ConnectionUtils_kt__o7o2tb();\n return ConnectionUtils;\n }\n var ConnectionUtils;\n var properties_initialized_ConnectionUtils_kt_jl8lf;\n function _init_properties_ConnectionUtils_kt__o7o2tb() {\n if (!properties_initialized_ConnectionUtils_kt_jl8lf) {\n properties_initialized_ConnectionUtils_kt_jl8lf = true;\n ConnectionUtils = ConnectionUtils_instance;\n }\n }\n function get_ConnectorUtils() {\n _init_properties_ConnectorUtils_kt__thp0w4();\n return ConnectorUtils;\n }\n var ConnectorUtils;\n var properties_initialized_ConnectorUtils_kt_7bcy3e;\n function _init_properties_ConnectorUtils_kt__thp0w4() {\n if (!properties_initialized_ConnectorUtils_kt_7bcy3e) {\n properties_initialized_ConnectorUtils_kt_7bcy3e = true;\n ConnectorUtils = ConnectorUtils_instance;\n }\n }\n function get_EntityGroupUtils() {\n _init_properties_EntityGroupUtils_kt__fa1pyj();\n return EntityGroupUtils;\n }\n var EntityGroupUtils;\n var properties_initialized_EntityGroupUtils_kt_6umwvd;\n function _init_properties_EntityGroupUtils_kt__fa1pyj() {\n if (!properties_initialized_EntityGroupUtils_kt_6umwvd) {\n properties_initialized_EntityGroupUtils_kt_6umwvd = true;\n EntityGroupUtils = EntityGroupUtils_instance;\n }\n }\n function get_HierarchyUtils() {\n _init_properties_HierarchyUtils_kt__r367z0();\n return HierarchyUtils;\n }\n var HierarchyUtils;\n var properties_initialized_HierarchyUtils_kt_1xdqbi;\n function _init_properties_HierarchyUtils_kt__r367z0() {\n if (!properties_initialized_HierarchyUtils_kt_1xdqbi) {\n properties_initialized_HierarchyUtils_kt_1xdqbi = true;\n HierarchyUtils = HierarchyUtils_instance;\n }\n }\n function get_MeasurementUtils() {\n _init_properties_MeasurementUtils_kt__2fjxth();\n return MeasurementUtils;\n }\n var MeasurementUtils;\n var properties_initialized_MeasurementUtils_kt_gl5jyh;\n function _init_properties_MeasurementUtils_kt__2fjxth() {\n if (!properties_initialized_MeasurementUtils_kt_gl5jyh) {\n properties_initialized_MeasurementUtils_kt_gl5jyh = true;\n MeasurementUtils = MeasurementUtils_getInstance();\n }\n }\n function get_ModelUtils() {\n _init_properties_ModelUtils_kt__elp6nc();\n return modelUtils;\n }\n var modelUtils;\n var properties_initialized_ModelUtils_kt_c4z2fe;\n function _init_properties_ModelUtils_kt__elp6nc() {\n if (!properties_initialized_ModelUtils_kt_c4z2fe) {\n properties_initialized_ModelUtils_kt_c4z2fe = true;\n modelUtils = ModelUtils_getInstance();\n }\n }\n function get_ProductUtils() {\n _init_properties_ProductUtils_kt__wn29wi();\n return ProductUtils;\n }\n var ProductUtils;\n var properties_initialized_ProductUtils_kt_fydiis;\n function _init_properties_ProductUtils_kt__wn29wi() {\n if (!properties_initialized_ProductUtils_kt_fydiis) {\n properties_initialized_ProductUtils_kt_fydiis = true;\n ProductUtils = ProductUtils_instance;\n }\n }\n function get_RaycastUtils() {\n _init_properties_RaycastUtils_kt__altj14();\n return RaycastUtils;\n }\n var RaycastUtils;\n var properties_initialized_RaycastUtils_kt_sh5hti;\n function _init_properties_RaycastUtils_kt__altj14() {\n if (!properties_initialized_RaycastUtils_kt_sh5hti) {\n properties_initialized_RaycastUtils_kt_sh5hti = true;\n RaycastUtils = RaycastUtils_instance;\n }\n }\n function get_SnapActionCandidateSortAndSelectStrategies() {\n _init_properties_SnapActionCandidateSortAndSelectStrategy_kt__do0a3f();\n return SnapActionCandidateSortAndSelectStrategies;\n }\n var SnapActionCandidateSortAndSelectStrategies;\n var properties_initialized_SnapActionCandidateSortAndSelectStrategy_kt_q48s6f;\n function _init_properties_SnapActionCandidateSortAndSelectStrategy_kt__do0a3f() {\n if (!properties_initialized_SnapActionCandidateSortAndSelectStrategy_kt_q48s6f) {\n properties_initialized_SnapActionCandidateSortAndSelectStrategy_kt_q48s6f = true;\n SnapActionCandidateSortAndSelectStrategies = SnapActionCandidateSortAndSelectStrategies_getInstance();\n }\n }\n function get_SnapUtils() {\n _init_properties_SnapUtils_kt__24ofor();\n return SnapUtils;\n }\n var SnapUtils;\n var properties_initialized_SnapUtils_kt_y15qfr;\n function _init_properties_SnapUtils_kt__24ofor() {\n if (!properties_initialized_SnapUtils_kt_y15qfr) {\n properties_initialized_SnapUtils_kt_y15qfr = true;\n SnapUtils = SnapUtils_instance;\n }\n }\n function get_TransformUtils() {\n _init_properties_TransformUtils_kt__4zsf3v();\n return TransformUtils;\n }\n var TransformUtils;\n var properties_initialized_TransformUtils_kt_j01ttz;\n function _init_properties_TransformUtils_kt__4zsf3v() {\n if (!properties_initialized_TransformUtils_kt_j01ttz) {\n properties_initialized_TransformUtils_kt_j01ttz = true;\n TransformUtils = TransformUtils_instance;\n }\n }\n function get_OutlinedComponent() {\n _init_properties_components_kt__qkbrje();\n return outlined;\n }\n var outlined;\n function get_OutlineBlockingComponent() {\n _init_properties_components_kt__qkbrje();\n return outlineBlockingComponent;\n }\n var outlineBlockingComponent;\n function get_AutoAdaptHostComponent() {\n _init_properties_components_kt__qkbrje();\n return autoAdaptHost;\n }\n var autoAdaptHost;\n function get_AutoAdaptGuestComponent() {\n _init_properties_components_kt__qkbrje();\n return autoAdaptGuest;\n }\n var autoAdaptGuest;\n function get_AutoAdaptVariantComponent() {\n _init_properties_components_kt__qkbrje();\n return autoAdaptComponent;\n }\n var autoAdaptComponent;\n function get_ForceAutoAdaptWhenParentIsDraggedComponent() {\n _init_properties_components_kt__qkbrje();\n return forceAutoAdaptWhenParentIsDraggedComponent;\n }\n var forceAutoAdaptWhenParentIsDraggedComponent;\n function get_AllowedDoorPairsComponent() {\n _init_properties_components_kt__qkbrje();\n return allowedDoorPairsComponent;\n }\n var allowedDoorPairsComponent;\n function get_AlignmentConnectionsComponent() {\n _init_properties_components_kt__qkbrje();\n return alignmentConnectionsComponent;\n }\n var alignmentConnectionsComponent;\n function get_LightComponent() {\n _init_properties_components_kt__qkbrje();\n return lightComponent;\n }\n var lightComponent;\n function get_RoomDimensionsComponent() {\n _init_properties_components_kt__qkbrje();\n return roomDimensionsComponent;\n }\n var roomDimensionsComponent;\n function get_RoomPartComponent() {\n _init_properties_components_kt__qkbrje();\n return roomPartComponent;\n }\n var roomPartComponent;\n function DoorComponent() {\n _init_properties_components_kt__qkbrje();\n return DoorComponent_getInstance();\n }\n function FreeMoveComponent() {\n _init_properties_components_kt__qkbrje();\n return FreeMoveComponent_instance;\n }\n function IsDraggedComponent() {\n _init_properties_components_kt__qkbrje();\n return IsDraggedComponent_instance;\n }\n function RoomComponent() {\n _init_properties_components_kt__qkbrje();\n return RoomComponent_instance;\n }\n function OutlinedComponent$_init_$ref_h368dy() {\n var l = function () {\n return new OutlinedComponent();\n };\n l.callableName = '';\n return l;\n }\n function OutlineBlockingComponent$_init_$ref_we6k5d() {\n var l = function () {\n return new OutlineBlockingComponent();\n };\n l.callableName = '';\n return l;\n }\n function AutoAdaptHostComponent$_init_$ref_wtzggt() {\n var l = function (p0) {\n return new AutoAdaptHostComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function AutoAdaptGuestComponent$_init_$ref_4n8cfn() {\n var l = function (p0, p1) {\n return new AutoAdaptGuestComponent(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function AutoAdaptVariantComponent$_init_$ref_dn270a() {\n var l = function (p0) {\n return new AutoAdaptVariantComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function ForceAutoAdaptWhenParentIsDraggedComponent$_init_$ref_egmtwc() {\n var l = function () {\n return new ForceAutoAdaptWhenParentIsDraggedComponent();\n };\n l.callableName = '';\n return l;\n }\n function AllowedDoorPairsComponent$_init_$ref_o2qka3() {\n var l = function (p0) {\n return AllowedDoorPairsComponentFromArrays(p0);\n };\n l.callableName = '';\n return l;\n }\n function AlignmentConnectionsComponent$_init_$ref_6s6xm() {\n var l = function (p0) {\n return new AlignmentConnectionsComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function LightComponent$_init_$ref_fuiv0e() {\n var l = function (p0) {\n return new LightComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function RoomDimensionsComponent$_init_$ref_3sq2j4() {\n var l = function (p0) {\n return new RoomDimensionsComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function RoomPartComponent$_init_$ref_2w0hre() {\n var l = function (p0) {\n return new RoomPartComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n var properties_initialized_components_kt_8vt12w;\n function _init_properties_components_kt__qkbrje() {\n if (!properties_initialized_components_kt_8vt12w) {\n properties_initialized_components_kt_8vt12w = true;\n outlined = OutlinedComponent$_init_$ref_h368dy();\n outlineBlockingComponent = OutlineBlockingComponent$_init_$ref_we6k5d();\n autoAdaptHost = AutoAdaptHostComponent$_init_$ref_wtzggt();\n autoAdaptGuest = AutoAdaptGuestComponent$_init_$ref_4n8cfn();\n autoAdaptComponent = AutoAdaptVariantComponent$_init_$ref_dn270a();\n forceAutoAdaptWhenParentIsDraggedComponent = ForceAutoAdaptWhenParentIsDraggedComponent$_init_$ref_egmtwc();\n allowedDoorPairsComponent = AllowedDoorPairsComponent$_init_$ref_o2qka3();\n alignmentConnectionsComponent = AlignmentConnectionsComponent$_init_$ref_6s6xm();\n lightComponent = LightComponent$_init_$ref_fuiv0e();\n roomDimensionsComponent = RoomDimensionsComponent$_init_$ref_3sq2j4();\n roomPartComponent = RoomPartComponent$_init_$ref_2w0hre();\n }\n }\n function get_CoreDebug() {\n _init_properties_core_js_kt__sbuna3();\n return CoreDebug;\n }\n var CoreDebug;\n function CoreDebug$_init_$ref_fht3jl() {\n var l = function (p0) {\n return new _CoreDebug(p0);\n };\n l.callableName = '';\n return l;\n }\n var properties_initialized_core_js_kt_xu6gx3;\n function _init_properties_core_js_kt__sbuna3() {\n if (!properties_initialized_core_js_kt_xu6gx3) {\n properties_initialized_core_js_kt_xu6gx3 = true;\n CoreDebug = CoreDebug$_init_$ref_fht3jl();\n }\n }\n function get_DynamicProductCatalog() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return DynamicProductCatalog_0;\n }\n var DynamicProductCatalog_0;\n function get_DynamicProduct() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return DynamicProduct_0;\n }\n var DynamicProduct_0;\n function get_ProductTemplate() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return ProductTemplate_0;\n }\n var ProductTemplate_0;\n function get_CatalogTemplateData() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return CatalogTemplateData_0;\n }\n var CatalogTemplateData_0;\n function get_Part() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return Part_0;\n }\n var Part_0;\n function get_ModelRenderInfo() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return ModelRenderInfo_0;\n }\n var ModelRenderInfo_0;\n function get_DynamicRangeUtils() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return DynamicRangeUtilsRef;\n }\n var DynamicRangeUtilsRef;\n function get_RelativePosition() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return relativePosition;\n }\n var relativePosition;\n function get_RelativeTransform() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return relativeTransform;\n }\n var relativeTransform;\n function get_PositionTemplate() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return positionTemplate;\n }\n var positionTemplate;\n function get_OriginRelativeTo() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return originRelativeTo;\n }\n var originRelativeTo;\n function get_PositionType() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return positionType;\n }\n var positionType;\n function get_VisualLightSourceComponent() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return visualLightSourceComponent;\n }\n var visualLightSourceComponent;\n function get_TemplateEditorService() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return TemplateEditorService_0;\n }\n var TemplateEditorService_0;\n function get_BoundItemTemplate() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return BoundItemTemplate_0;\n }\n var BoundItemTemplate_0;\n function get_Dimension() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return Dimension_0;\n }\n var Dimension_0;\n function get_Compartment() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return Compartment_0;\n }\n var Compartment_0;\n function get_CatalogGenerator() {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return catalogGenerator;\n }\n var catalogGenerator;\n function PositionValue_0(value, type) {\n _init_properties_dynamic_range_js_kt__omhuxl();\n var tmp = Companion_getInstance_1();\n return new PositionValue(value, tmp.getByValue(type == null ? 0 : type));\n }\n function OriginTemplate_0(relation, relativeTo) {\n _init_properties_dynamic_range_js_kt__omhuxl();\n return new OriginTemplate(relation, OriginRelativeToImpostor_getInstance().toEnum(relativeTo));\n }\n function getMeta(dto) {\n _init_properties_dynamic_range_js_kt__omhuxl();\n var result = new getMeta$result$1();\n var tmp0_safe_receiver = dto.meta;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.collections.forEach' call\n // Inline function 'kotlin.collections.iterator' call\n var tmp0_iterator = tmp0_safe_receiver.q2().t();\n while (tmp0_iterator.u()) {\n var element = tmp0_iterator.w();\n // Inline function 'getMeta.' call\n // Inline function 'kotlin.collections.component1' call\n var key = element.t2();\n // Inline function 'kotlin.collections.component2' call\n var value = element.u2();\n var json = toString(value);\n if (!(json === ''))\n result[key] = JSON.parse(json);\n }\n }\n return result;\n }\n function DynamicProductCatalog$_init_$ref_ja14jo() {\n var l = function (p0, p1, p2) {\n return new DynamicProductCatalog(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function DynamicProduct$_init_$ref_m4augl() {\n var l = function (p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) {\n return new DynamicProduct(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);\n };\n l.callableName = '';\n return l;\n }\n function ProductTemplate$_init_$ref_e7fptw() {\n var l = function (p0, p1, p2, p3) {\n return new ProductTemplate(p0, p1, p2, p3);\n };\n l.callableName = '';\n return l;\n }\n function CatalogTemplateData$_init_$ref_pugk1k() {\n var l = function (p0, p1, p2, p3, p4, p5, p6, p7, p8, p9) {\n return new CatalogTemplateData(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);\n };\n l.callableName = '';\n return l;\n }\n function Part$_init_$ref_yjn15e() {\n var l = function (p0, p1, p2, p3) {\n return new Part(p0, p1, p2, p3);\n };\n l.callableName = '';\n return l;\n }\n function ModelRenderInfo$_init_$ref_p9q3h4() {\n var l = function (p0, p1, p2) {\n return new ModelRenderInfo(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function RelativePosition$_init_$ref_etlu4w() {\n var l = function (p0, p1, p2) {\n return new RelativePosition(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function RelativeTransform$_init_$ref_qjbp7f() {\n var l = function (p0, p1) {\n return new RelativeTransform(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function PositionTemplate$_init_$ref_2pz4ci() {\n var l = function (p0, p1) {\n return new PositionTemplate(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function VisualLightSourceComponent$_init_$ref_bp7zb() {\n var l = function (p0, p1, p2) {\n return new VisualLightSourceComponent(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function TemplateEditorService$_init_$ref_97ywjt() {\n var l = function (p0, p1) {\n return new TemplateEditorService(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function BoundItemTemplate$_init_$ref_xq74au() {\n var l = function (p0, p1, p2, p3, p4, p5, p6, p7) {\n return new BoundItemTemplate(p0, p1, p2, p3, p4, p5, p6, p7);\n };\n l.callableName = '';\n return l;\n }\n function Dimension$_init_$ref_cvmjy7() {\n var l = function (p0, p1, p2, p3, p4, p5, p6, p7, p8) {\n return new Dimension(p0, p1, p2, p3, p4, p5, p6, p7, p8);\n };\n l.callableName = '';\n return l;\n }\n function Compartment$_init_$ref_p4mln7() {\n var l = function (p0, p1) {\n return new Compartment(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function CatalogGenerator$_init_$ref_itw2uj() {\n var l = function () {\n return new CatalogGenerator();\n };\n l.callableName = '';\n return l;\n }\n function getMeta$result$1() {\n }\n var properties_initialized_dynamic_range_js_kt_i07y6v;\n function _init_properties_dynamic_range_js_kt__omhuxl() {\n if (!properties_initialized_dynamic_range_js_kt_i07y6v) {\n properties_initialized_dynamic_range_js_kt_i07y6v = true;\n DynamicProductCatalog_0 = DynamicProductCatalog$_init_$ref_ja14jo();\n DynamicProduct_0 = DynamicProduct$_init_$ref_m4augl();\n ProductTemplate_0 = ProductTemplate$_init_$ref_e7fptw();\n CatalogTemplateData_0 = CatalogTemplateData$_init_$ref_pugk1k();\n Part_0 = Part$_init_$ref_yjn15e();\n ModelRenderInfo_0 = ModelRenderInfo$_init_$ref_p9q3h4();\n DynamicRangeUtilsRef = Companion_getInstance_2();\n relativePosition = RelativePosition$_init_$ref_etlu4w();\n relativeTransform = RelativeTransform$_init_$ref_qjbp7f();\n positionTemplate = PositionTemplate$_init_$ref_2pz4ci();\n originRelativeTo = OriginRelativeToImpostor_getInstance();\n positionType = PositionTypeImpostor_instance;\n visualLightSourceComponent = VisualLightSourceComponent$_init_$ref_bp7zb();\n TemplateEditorService_0 = TemplateEditorService$_init_$ref_97ywjt();\n BoundItemTemplate_0 = BoundItemTemplate$_init_$ref_xq74au();\n Dimension_0 = Dimension$_init_$ref_cvmjy7();\n Compartment_0 = Compartment$_init_$ref_p4mln7();\n catalogGenerator = CatalogGenerator$_init_$ref_itw2uj();\n }\n }\n function ExperimentalPlacementService$_init_$ref_61iroz() {\n var l = function (p0, p1) {\n return new ExperimentalPlacementService(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function LegacyPlacementHelper$_init_$ref_nbi9hh() {\n var l = function (p0, p1) {\n return new LegacyPlacementHelper(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function ValidatedSnap$_init_$ref_b5n0rx() {\n var l = function (p0, p1) {\n return new ValidatedSnap(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function Experimental() {\n experimental_js_instance_f39xui = this;\n var tmp = this;\n tmp.ExperimentalPlacementService = ExperimentalPlacementService$_init_$ref_61iroz();\n var tmp_0 = this;\n tmp_0.LegacyPlacementHelper = LegacyPlacementHelper$_init_$ref_nbi9hh();\n var tmp_1 = this;\n tmp_1.ValidatedSnap = ValidatedSnap$_init_$ref_b5n0rx();\n }\n protoOf(Experimental).y4g = function () {\n return this.ExperimentalPlacementService;\n };\n protoOf(Experimental).z4g = function () {\n return this.LegacyPlacementHelper;\n };\n protoOf(Experimental).a4h = function () {\n return this.ValidatedSnap;\n };\n var experimental_js_instance_f39xui;\n function experimental_js_getInstance_e6vaee() {\n if (experimental_js_instance_f39xui == null)\n new Experimental();\n return experimental_js_instance_f39xui;\n }\n function get_IPEXRangeFormatCatalog() {\n _init_properties_ipex_range_format_js_kt__6qn084();\n return ipexRangeFormatCatalog;\n }\n var ipexRangeFormatCatalog;\n function get_AmendableCatalog() {\n _init_properties_ipex_range_format_js_kt__6qn084();\n return amendableCatalog;\n }\n var amendableCatalog;\n function get_RangeItemDTO() {\n _init_properties_ipex_range_format_js_kt__6qn084();\n return rangeItemDTO;\n }\n var rangeItemDTO;\n function get_StaticComponentBuilder() {\n _init_properties_ipex_range_format_js_kt__6qn084();\n return staticComponentBuilder;\n }\n var staticComponentBuilder;\n function IPEXRangeFormatCatalog$_init_$ref_d52y62() {\n var l = function (p0) {\n return new IPEXRangeFormatCatalog(p0);\n };\n l.callableName = '';\n return l;\n }\n function AmendableCatalog$_init_$ref_rulze3() {\n var l = function (p0) {\n return new AmendableCatalog(p0);\n };\n l.callableName = '';\n return l;\n }\n function RangeItemDTO$_init_$ref_774wmu() {\n var l = function (p0, p1, p2, p3, p4) {\n return new RangeItemDTO(p0, p1, p2, p3, p4);\n };\n l.callableName = '';\n return l;\n }\n function StaticComponentBuilder$_init_$ref_nnm7pj() {\n var l = function (p0) {\n return new StaticComponentBuilder(p0);\n };\n l.callableName = '';\n return l;\n }\n var properties_initialized_ipex_range_format_js_kt_t3r77m;\n function _init_properties_ipex_range_format_js_kt__6qn084() {\n if (!properties_initialized_ipex_range_format_js_kt_t3r77m) {\n properties_initialized_ipex_range_format_js_kt_t3r77m = true;\n ipexRangeFormatCatalog = IPEXRangeFormatCatalog$_init_$ref_d52y62();\n amendableCatalog = AmendableCatalog$_init_$ref_rulze3();\n rangeItemDTO = RangeItemDTO$_init_$ref_774wmu();\n staticComponentBuilder = StaticComponentBuilder$_init_$ref_nnm7pj();\n }\n }\n function get_createCore() {\n _init_properties_kernel_js_kt__p0ka61();\n return createCore;\n }\n var createCore;\n function get_SceneSerializationUtil() {\n _init_properties_kernel_js_kt__p0ka61();\n return sceneSerializationUtil;\n }\n var sceneSerializationUtil;\n function Core() {\n _init_properties_kernel_js_kt__p0ka61();\n println('Using the Core() function to create an instance of Core is deprecated. Please use createCore() instead.');\n return new CoreImpl();\n }\n function CoreImpl$_init_$ref_yi8yhy() {\n var l = function (p0, p1, p2) {\n return new CoreImpl(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n var properties_initialized_kernel_js_kt_yrqi4p;\n function _init_properties_kernel_js_kt__p0ka61() {\n if (!properties_initialized_kernel_js_kt_yrqi4p) {\n properties_initialized_kernel_js_kt_yrqi4p = true;\n createCore = CoreImpl$_init_$ref_yi8yhy();\n sceneSerializationUtil = SceneSerializationUtil_instance;\n }\n }\n function get_PlacementService() {\n _init_properties_stl_js_kt__e1niln();\n return PlacementService_0;\n }\n var PlacementService_0;\n function get_ReplaceUtils() {\n _init_properties_stl_js_kt__e1niln();\n return replaceUtils;\n }\n var replaceUtils;\n function get_ReplaceAssemblyPartUtils() {\n _init_properties_stl_js_kt__e1niln();\n return replaceAssemblyPartUtils;\n }\n var replaceAssemblyPartUtils;\n function get_SnapPlacementActor() {\n _init_properties_stl_js_kt__e1niln();\n return SnapPlacementActor_0;\n }\n var SnapPlacementActor_0;\n function get_ProppingSystem() {\n _init_properties_stl_js_kt__e1niln();\n return ProppingSystem_0;\n }\n var ProppingSystem_0;\n function get_ConnectorVisualizationSystem() {\n _init_properties_stl_js_kt__e1niln();\n return ConnectorVisualizationSystem_0;\n }\n var ConnectorVisualizationSystem_0;\n function get_ColliderVisualizationSystem() {\n _init_properties_stl_js_kt__e1niln();\n return ColliderVisualizationSystem_0;\n }\n var ColliderVisualizationSystem_0;\n function get_AutoAdaptHostZoneVisualizationSystem() {\n _init_properties_stl_js_kt__e1niln();\n return AutoAdaptHostZoneVisualizationSystem_0;\n }\n var AutoAdaptHostZoneVisualizationSystem_0;\n function get_FunctionalMarginVisualizationSystem() {\n _init_properties_stl_js_kt__e1niln();\n return FunctionalMarginVisualizationSystem_0;\n }\n var FunctionalMarginVisualizationSystem_0;\n function get_FunctionalZoneVisualization() {\n _init_properties_stl_js_kt__e1niln();\n return FunctionalZoneVisualization;\n }\n var FunctionalZoneVisualization;\n function get_DragProjectionPointVisualizationSystem() {\n _init_properties_stl_js_kt__e1niln();\n return DragProjectionPointVisualizationSystem_0;\n }\n var DragProjectionPointVisualizationSystem_0;\n function get_DragSystem() {\n _init_properties_stl_js_kt__e1niln();\n return DragSystem_0;\n }\n var DragSystem_0;\n function get_SnapCardinalDirectionsDragStrategy() {\n _init_properties_stl_js_kt__e1niln();\n return snapCardinalDirectionsDragStrategy;\n }\n var snapCardinalDirectionsDragStrategy;\n function get_SnapClosestDragStrategy() {\n _init_properties_stl_js_kt__e1niln();\n return snapClosestDragStrategy;\n }\n var snapClosestDragStrategy;\n function get_SnapClosestWithSubConnectorsDragStrategy() {\n _init_properties_stl_js_kt__e1niln();\n return snapClosestWithSubConnectorsDragStrategy;\n }\n var snapClosestWithSubConnectorsDragStrategy;\n function get_ResolveCollisionsDragStrategy() {\n _init_properties_stl_js_kt__e1niln();\n return resolveCollisionsDragStrategy;\n }\n var resolveCollisionsDragStrategy;\n function get_DrawDragGhostSystem() {\n _init_properties_stl_js_kt__e1niln();\n return drawDragGhostSystem;\n }\n var drawDragGhostSystem;\n function get_DragSurfaceNormalVisualizationSystem() {\n _init_properties_stl_js_kt__e1niln();\n return DragSurfaceNormalVisualizationSystem_0;\n }\n var DragSurfaceNormalVisualizationSystem_0;\n function get_DragSurfaceVisualizationSystem() {\n _init_properties_stl_js_kt__e1niln();\n return DragSurfaceVisualizationSystem_0;\n }\n var DragSurfaceVisualizationSystem_0;\n function get_DebugLineDrawingSystem() {\n _init_properties_stl_js_kt__e1niln();\n return DebugLineDrawingSystem_0;\n }\n var DebugLineDrawingSystem_0;\n function get_StandardSelectionService() {\n _init_properties_stl_js_kt__e1niln();\n return StandardSelectionService_0;\n }\n var StandardSelectionService_0;\n function get_AutoAdaptService() {\n _init_properties_stl_js_kt__e1niln();\n return AutoAdaptService_0;\n }\n var AutoAdaptService_0;\n function get_AlignmentConnectionCreationSystem() {\n _init_properties_stl_js_kt__e1niln();\n return AlignmentConnectionCreationSystem_0;\n }\n var AlignmentConnectionCreationSystem_0;\n function get_RoomService() {\n _init_properties_stl_js_kt__e1niln();\n return RoomService_0;\n }\n var RoomService_0;\n function get_RoomSystem() {\n _init_properties_stl_js_kt__e1niln();\n return RoomSystem_0;\n }\n var RoomSystem_0;\n function get_RoomComponentDeserializer() {\n _init_properties_stl_js_kt__e1niln();\n return roomComponentDeserializer;\n }\n var roomComponentDeserializer;\n function get_RoomConnectorConstants() {\n _init_properties_stl_js_kt__e1niln();\n return roomConnectorConstants;\n }\n var roomConnectorConstants;\n function get_StandardSelectionSystem() {\n _init_properties_stl_js_kt__e1niln();\n return StandardSelectionSystem;\n }\n var StandardSelectionSystem;\n function get_OutlineSystem() {\n _init_properties_stl_js_kt__e1niln();\n return OutlineSystemCtor;\n }\n var OutlineSystemCtor;\n function get_OutlineSelectedSystem() {\n _init_properties_stl_js_kt__e1niln();\n return OutlineSelectedSystemCtor;\n }\n var OutlineSelectedSystemCtor;\n function get_OutlineEntityGroupDeselectSystem() {\n _init_properties_stl_js_kt__e1niln();\n return OutlineEntityGroupDeselectSystem_0;\n }\n var OutlineEntityGroupDeselectSystem_0;\n function get_AllowedDoorPairsValidation() {\n _init_properties_stl_js_kt__e1niln();\n return AllowedDoorPairsValidation_0;\n }\n var AllowedDoorPairsValidation_0;\n function get_AlignmentPlane() {\n _init_properties_stl_js_kt__e1niln();\n return AlignmentPlane_0;\n }\n var AlignmentPlane_0;\n function get_AllowedNumberOfChildrenOfTypeValidation() {\n _init_properties_stl_js_kt__e1niln();\n return AllowedNumberOfChildrenOfTypeValidation_0;\n }\n var AllowedNumberOfChildrenOfTypeValidation_0;\n function get_DisallowSeparateRequiredHostsValidation() {\n _init_properties_stl_js_kt__e1niln();\n return disallowSeparateRequiredHostsValidation;\n }\n var disallowSeparateRequiredHostsValidation;\n function get_AssemblyInstructionsService() {\n _init_properties_stl_js_kt__e1niln();\n return AssemblyInstructionsService;\n }\n var AssemblyInstructionsService;\n function get_ICFDataService() {\n _init_properties_stl_js_kt__e1niln();\n return ICFDataService_0;\n }\n var ICFDataService_0;\n function get_PlacementResult() {\n _init_properties_stl_js_kt__e1niln();\n return PlacementResult_0;\n }\n var PlacementResult_0;\n function get_PlacementResultCompanion() {\n _init_properties_stl_js_kt__e1niln();\n return PlacementResultCompanion;\n }\n var PlacementResultCompanion;\n function get_FunctionalMarginValidation() {\n _init_properties_stl_js_kt__e1niln();\n return FunctionalMarginValidation_0;\n }\n var FunctionalMarginValidation_0;\n function get_PlacementZoneValidation() {\n _init_properties_stl_js_kt__e1niln();\n return placementZoneValidation;\n }\n var placementZoneValidation;\n function get_AlignmentLinesSystem() {\n _init_properties_stl_js_kt__e1niln();\n return ALIGNMENT_LINES_SYSTEM;\n }\n var ALIGNMENT_LINES_SYSTEM;\n function get_FunctionalMarginSystem() {\n _init_properties_stl_js_kt__e1niln();\n return FUNCTIONAL_MARGIN_SYSTEM;\n }\n var FUNCTIONAL_MARGIN_SYSTEM;\n function get_FunctionalMarginShapeComponent() {\n _init_properties_stl_js_kt__e1niln();\n return FunctionalMarginShapeComponent_0;\n }\n var FunctionalMarginShapeComponent_0;\n function get_FunctionalMarginComponent() {\n _init_properties_stl_js_kt__e1niln();\n return FunctionalMarginComponent_0;\n }\n var FunctionalMarginComponent_0;\n function get_RecommendedInitialPositionFromFloorComponent() {\n _init_properties_stl_js_kt__e1niln();\n return RecommendedInitialPositionFromFloorComponent_0;\n }\n var RecommendedInitialPositionFromFloorComponent_0;\n function get_PlacementZoneByHeightComponent() {\n _init_properties_stl_js_kt__e1niln();\n return PlacementZoneByHeightComponent_0;\n }\n var PlacementZoneByHeightComponent_0;\n function get_StlSystemIds() {\n _init_properties_stl_js_kt__e1niln();\n return stlSystemIds;\n }\n var stlSystemIds;\n function get_ReplacePartResult() {\n _init_properties_stl_js_kt__e1niln();\n return replacePartResultConstructor;\n }\n var replacePartResultConstructor;\n function get_AnyDragSurfaceProjector() {\n _init_properties_stl_js_kt__e1niln();\n return anyDragSurfaceProjector;\n }\n var anyDragSurfaceProjector;\n function get_XYPlaneProjector() {\n _init_properties_stl_js_kt__e1niln();\n return XYPlaneProjector_0;\n }\n var XYPlaneProjector_0;\n function get_DragSurfaceCanHostSelector() {\n _init_properties_stl_js_kt__e1niln();\n return DragSurfaceCanHostSelector_0;\n }\n var DragSurfaceCanHostSelector_0;\n function get_DragSurfaceCanHostWithAutoAdaptSelector() {\n _init_properties_stl_js_kt__e1niln();\n return DragSurfaceCanHostWithAutoAdaptSelector_0;\n }\n var DragSurfaceCanHostWithAutoAdaptSelector_0;\n function get_AutoAdaptProductSpecificationsSystem() {\n _init_properties_stl_js_kt__e1niln();\n return AutoAdaptProductSpecificationsSystem_0;\n }\n var AutoAdaptProductSpecificationsSystem_0;\n function get_LegacyCanvasTo3DDragConverterSystem() {\n _init_properties_stl_js_kt__e1niln();\n return LegacyCanvasTo3DDragConverterSystemConstructor;\n }\n var LegacyCanvasTo3DDragConverterSystemConstructor;\n function get_CanvasTo3DDragConverterSystem() {\n _init_properties_stl_js_kt__e1niln();\n return CanvasTo3DDragConverterSystem;\n }\n var CanvasTo3DDragConverterSystem;\n function get_EntityConnectorVisualizationSystem() {\n _init_properties_stl_js_kt__e1niln();\n return EntityConnectorVisualizationSystem_0;\n }\n var EntityConnectorVisualizationSystem_0;\n function get_EntityConnectorVisualizationComponent() {\n _init_properties_stl_js_kt__e1niln();\n return EntityConnectorVisualizationComponent_0;\n }\n var EntityConnectorVisualizationComponent_0;\n function get_Color() {\n _init_properties_stl_js_kt__e1niln();\n return Color_0;\n }\n var Color_0;\n function get_DefaultVisualizer() {\n _init_properties_stl_js_kt__e1niln();\n return DefaultVisualizer_0;\n }\n var DefaultVisualizer_0;\n function get_EntityColliderVisualizationSystem() {\n _init_properties_stl_js_kt__e1niln();\n return EntityColliderVisualizationSystem_0;\n }\n var EntityColliderVisualizationSystem_0;\n function get_EntityColliderVisualizationComponent() {\n _init_properties_stl_js_kt__e1niln();\n return EntityColliderVisualizationComponent_0;\n }\n var EntityColliderVisualizationComponent_0;\n function get_EntityCollisionVisualizationSystem() {\n _init_properties_stl_js_kt__e1niln();\n return EntityCollisionVisualizationSystem_0;\n }\n var EntityCollisionVisualizationSystem_0;\n function get_DecoratorComponent() {\n _init_properties_stl_js_kt__e1niln();\n return DecoratorComponent_0;\n }\n var DecoratorComponent_0;\n function get_CoreVisualization() {\n _init_properties_stl_js_kt__e1niln();\n return CoreVisualization_0;\n }\n var CoreVisualization_0;\n function get_ColoredOutlineSystem() {\n _init_properties_stl_js_kt__e1niln();\n return ColoredOutlineSystemConstructor;\n }\n var ColoredOutlineSystemConstructor;\n function get_ColoredOutlineComponent() {\n _init_properties_stl_js_kt__e1niln();\n return ColoredOutlineComponentConstructor;\n }\n var ColoredOutlineComponentConstructor;\n function get_DragExtensions() {\n _init_properties_stl_js_kt__e1niln();\n return dragExtensions;\n }\n var dragExtensions;\n function get_AutoAdaptFeature() {\n _init_properties_stl_js_kt__e1niln();\n return autoAdaptFeature;\n }\n var autoAdaptFeature;\n function get_AutoAdaptUtils() {\n _init_properties_stl_js_kt__e1niln();\n return autoAdaptUtils;\n }\n var autoAdaptUtils;\n function get_AutoAdaptSessionComponent() {\n _init_properties_stl_js_kt__e1niln();\n return autoAdaptSessionComponent;\n }\n var autoAdaptSessionComponent;\n function get_DragProjectionPointComponent() {\n _init_properties_stl_js_kt__e1niln();\n return dragProjectionPointComponentConstructor;\n }\n var dragProjectionPointComponentConstructor;\n function get_FunctionalZone() {\n _init_properties_stl_js_kt__e1niln();\n return functionalZoneCtor;\n }\n var functionalZoneCtor;\n function get_FunctionalZonesLocalComponent() {\n _init_properties_stl_js_kt__e1niln();\n return FunctionalZonesLocalComponentCtor;\n }\n var FunctionalZonesLocalComponentCtor;\n function get_DragState() {\n _init_properties_stl_js_kt__e1niln();\n return dragStateCtor;\n }\n var dragStateCtor;\n function get_DragStateComponent() {\n _init_properties_stl_js_kt__e1niln();\n return dragStateComponentCtor;\n }\n var dragStateComponentCtor;\n function get_ReplaceEntityEventComponent() {\n _init_properties_stl_js_kt__e1niln();\n return replacedWithAutoAdaptEventComponent;\n }\n var replacedWithAutoAdaptEventComponent;\n function get_LabelComponent() {\n _init_properties_stl_js_kt__e1niln();\n return LabelComponent_0;\n }\n var LabelComponent_0;\n function get_HigherPriorityAlignmentPostProcess() {\n _init_properties_stl_js_kt__e1niln();\n return HigherPriorityAlignmentPostProcessCtor;\n }\n var HigherPriorityAlignmentPostProcessCtor;\n function get_ValidationResultIds() {\n _init_properties_stl_js_kt__e1niln();\n return ValidationResultIdsObj;\n }\n var ValidationResultIdsObj;\n function get_RequiredConnectorsSatisfiedValidation() {\n _init_properties_stl_js_kt__e1niln();\n return RequiredConnectorsSatisfiedValidationCtor;\n }\n var RequiredConnectorsSatisfiedValidationCtor;\n function get_ValidationRuleIds() {\n _init_properties_stl_js_kt__e1niln();\n return ValidationRuleIdsObj;\n }\n var ValidationRuleIdsObj;\n function get_HostConnectorRotationValidation() {\n _init_properties_stl_js_kt__e1niln();\n return hostConnectorRotationValidation;\n }\n var hostConnectorRotationValidation;\n function get_SnapSorterBuilder() {\n _init_properties_stl_js_kt__e1niln();\n return sortBuilderCtor;\n }\n var sortBuilderCtor;\n function get_PlacementHelper() {\n _init_properties_stl_js_kt__e1niln();\n return placementHelperObject;\n }\n var placementHelperObject;\n function get_SpaceFinderUtils() {\n _init_properties_stl_js_kt__e1niln();\n return spaceFinderUtilsObject;\n }\n var spaceFinderUtilsObject;\n function ValidDragStrategyResult_0(entity, snapCandidate, warnings) {\n ValidDragStrategyResult.call(this, entity, snapCandidate, warnings);\n }\n function AutoAdaptDragStrategy_0(coreServices) {\n AutoAdaptDragStrategy.call(this, coreServices);\n }\n function HandleRotationSystem_0(coreServices) {\n _init_properties_stl_js_kt__e1niln();\n return new HandleRotationSystem(coreServices.validations, coreServices.sceneManager);\n }\n function DebugLogger_0(logPriorityLevel, exceptionPriorityLevel) {\n _init_properties_stl_js_kt__e1niln();\n return new DebugLogger(values()[logPriorityLevel], values()[exceptionPriorityLevel]);\n }\n function FunctionalZonesLocalToWorldSystem_0(entityManager) {\n FunctionalZonesLocalToWorldSystem.call(this, entityManager);\n }\n function PlacementService$_init_$ref_4ipsq3() {\n var l = function (p0, p1) {\n return new PlacementService(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function SnapPlacementActor$_init_$ref_h9zo2z() {\n var l = function (p0, p1, p2) {\n return new SnapPlacementActor(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function ProppingSystem$_init_$ref_yjua67() {\n var l = function (p0, p1) {\n return new ProppingSystem(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function ConnectorVisualizationSystem$_init_$ref_bhjn0h() {\n var l = function (p0) {\n return new ConnectorVisualizationSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function ColliderVisualizationSystem$_init_$ref_iz3yxm() {\n var l = function (p0) {\n return new ColliderVisualizationSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function AutoAdaptHostZoneVisualizationSystem$_init_$ref_nexzcp() {\n var l = function (p0) {\n return new AutoAdaptHostZoneVisualizationSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function FunctionalMarginVisualizationSystem$_init_$ref_du8tkt() {\n var l = function (p0) {\n return new FunctionalMarginVisualizationSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function FunctionalZoneVisualizationSystem$_init_$ref_z56su9() {\n var l = function (p0) {\n return new FunctionalZoneVisualizationSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function DragProjectionPointVisualizationSystem$_init_$ref_iy9mhr() {\n var l = function (p0) {\n return new DragProjectionPointVisualizationSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function DragSystem$_init_$ref_z2syyq() {\n var l = function (p0, p1) {\n return new DragSystem(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function SnapCardinalDirectionsDragStrategy$_init_$ref_ouuluo() {\n var l = function (p0) {\n return new SnapCardinalDirectionsDragStrategy(p0);\n };\n l.callableName = '';\n return l;\n }\n function SnapClosestDragStrategy$_init_$ref_un3qp() {\n var l = function (p0) {\n return new SnapClosestDragStrategy(p0);\n };\n l.callableName = '';\n return l;\n }\n function SnapClosestWithSubConnectorsDragStrategy$_init_$ref_20uk5v() {\n var l = function (p0) {\n return new SnapClosestWithSubConnectorsDragStrategy(p0);\n };\n l.callableName = '';\n return l;\n }\n function ResolveCollisionsDragStrategy$_init_$ref_cuay8f() {\n var l = function (p0, p1) {\n return new ResolveCollisionsDragStrategy(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function DrawDragGhostSystem$_init_$ref_www5q7() {\n var l = function (p0, p1, p2, p3, p4) {\n return new DrawDragGhostSystem(p0, p1, p2, p3, p4);\n };\n l.callableName = '';\n return l;\n }\n function DragSurfaceNormalVisualizationSystem$_init_$ref_miyxm6() {\n var l = function (p0) {\n return new DragSurfaceNormalVisualizationSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function DragSurfaceVisualizationSystem$_init_$ref_h43d11() {\n var l = function (p0) {\n return new DragSurfaceVisualizationSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function DebugLineDrawingSystem$_init_$ref_kvzwwv() {\n var l = function (p0) {\n return new DebugLineDrawingSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function StandardSelectionService$_init_$ref_k0v6bl() {\n var l = function (p0) {\n return new StandardSelectionService(p0);\n };\n l.callableName = '';\n return l;\n }\n function AutoAdaptService$_init_$ref_k4m925() {\n var l = function (p0) {\n return new AutoAdaptService(p0);\n };\n l.callableName = '';\n return l;\n }\n function AlignmentConnectionCreationSystem$_init_$ref_ta0hcm() {\n var l = function (p0) {\n return new AlignmentConnectionCreationSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function RoomService$_init_$ref_14lqff() {\n var l = function (p0, p1) {\n return new RoomService(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function RoomSystem$_init_$ref_mxcny3() {\n var l = function (p0, p1) {\n return new RoomSystem(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function RoomComponentDeserializer$_init_$ref_ocu3f4() {\n var l = function () {\n return new RoomComponentDeserializer();\n };\n l.callableName = '';\n return l;\n }\n function StandardSelectionSystem$_init_$ref_nkymih() {\n var l = function (p0) {\n return StandardSelectionSystemFromCoreServices(p0);\n };\n l.callableName = '';\n return l;\n }\n function OutlineSystem$_init_$ref_a0oop8() {\n var l = function () {\n return new OutlineSystem();\n };\n l.callableName = '';\n return l;\n }\n function OutlineSelectedSystem$_init_$ref_b6zwpz() {\n var l = function () {\n return new OutlineSelectedSystem();\n };\n l.callableName = '';\n return l;\n }\n function OutlineEntityGroupDeselectSystem$_init_$ref_jrsydb() {\n var l = function (p0) {\n return new OutlineEntityGroupDeselectSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function AllowedDoorPairsValidation$_init_$ref_tv5wjt() {\n var l = function () {\n return new AllowedDoorPairsValidation();\n };\n l.callableName = '';\n return l;\n }\n function AlignmentPlane$_init_$ref_i3c9l8() {\n var l = function (p0, p1, p2) {\n return new AlignmentPlane(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function AllowedNumberOfChildrenOfTypeValidation$_init_$ref_sj8e0k() {\n var l = function (p0, p1, p2) {\n return new AllowedNumberOfChildrenOfTypeValidation(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function DisallowSeparateRequiredHostsValidation$_init_$ref_9l13xe() {\n var l = function (p0, p1) {\n return new DisallowSeparateRequiredHostsValidation(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function AssemblyInstructionsServiceImpl$_init_$ref_60674r() {\n var l = function () {\n return new AssemblyInstructionsServiceImpl();\n };\n l.callableName = '';\n return l;\n }\n function ICFDataService$_init_$ref_ewcpkq() {\n var l = function (p0) {\n return new ICFDataService(p0);\n };\n l.callableName = '';\n return l;\n }\n function PlacementResult$_init_$ref_vv0umb() {\n var l = function (p0, p1, p2) {\n return new PlacementResult(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function FunctionalMarginValidation$_init_$ref_cl4qmd() {\n var l = function (p0, p1) {\n return new FunctionalMarginValidation(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function PlacementZoneValidation$_init_$ref_xzv9i3() {\n var l = function () {\n return new PlacementZoneValidation();\n };\n l.callableName = '';\n return l;\n }\n function AlignmentLinesSystem$_init_$ref_2vzu7a() {\n var l = function (p0, p1, p2, p3, p4, p5, p6) {\n return new AlignmentLinesSystem(p0, p1, p2, p3, p4, p5, p6);\n };\n l.callableName = '';\n return l;\n }\n function FunctionalMarginSystem$_init_$ref_nm9ef9() {\n var l = function () {\n return new FunctionalMarginSystem();\n };\n l.callableName = '';\n return l;\n }\n function FunctionalMarginShapeComponent$_init_$ref_ukwgzs() {\n var l = function (p0) {\n return new FunctionalMarginShapeComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function FunctionalMarginComponent$_init_$ref_djhkft() {\n var l = function (p0) {\n return new FunctionalMarginComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function RecommendedInitialPositionFromFloorComponent$_init_$ref_dyzfs8() {\n var l = function (p0) {\n return new RecommendedInitialPositionFromFloorComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function PlacementZoneByHeightComponent$_init_$ref_1zq8h5() {\n var l = function (p0, p1) {\n return new PlacementZoneByHeightComponent(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function ReplacePartResult$_init_$ref_snfbmn() {\n var l = function (p0, p1, p2, p3, p4, p5) {\n return new ReplacePartResult(p0, p1, p2, p3, p4, p5);\n };\n l.callableName = '';\n return l;\n }\n function anyDragSurfaceProjector$lambda(coreServices, dragSelector) {\n _init_properties_stl_js_kt__e1niln();\n return AnyDragSurfaceProjectorFromCoreServices(coreServices, dragSelector == null ? new DragSurfaceOnlyRoomSelector() : dragSelector);\n }\n function XYPlaneProjector$_init_$ref_yhqdrw() {\n var l = function () {\n return new XYPlaneProjector();\n };\n l.callableName = '';\n return l;\n }\n function DragSurfaceCanHostSelector$_init_$ref_vj8lw9() {\n var l = function () {\n return new DragSurfaceCanHostSelector();\n };\n l.callableName = '';\n return l;\n }\n function DragSurfaceCanHostWithAutoAdaptSelector$_init_$ref_xz7lxk() {\n var l = function (p0) {\n return new DragSurfaceCanHostWithAutoAdaptSelector(p0);\n };\n l.callableName = '';\n return l;\n }\n function AutoAdaptProductSpecificationsSystem$_init_$ref_vn5aie() {\n var l = function (p0) {\n return new AutoAdaptProductSpecificationsSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function LegacyCanvasTo3DDragConverterSystemConstructor$lambda(coreServices, projector) {\n _init_properties_stl_js_kt__e1niln();\n return new LegacyCanvasTo3DDragConverterSystem(coreServices.entityManager, coreServices.sceneManager, projector);\n }\n function CanvasTo3DDragConverterSystem$_init_$ref_9wy4k2() {\n var l = function (p0, p1) {\n return CanvasTo3DDragConverterSystemFromCoreServices(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function EntityConnectorVisualizationSystem$_init_$ref_5xr5ng() {\n var l = function (p0, p1) {\n return new EntityConnectorVisualizationSystem(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function EntityConnectorVisualizationComponent$_init_$ref_jbgyim() {\n var l = function (p0) {\n return new EntityConnectorVisualizationComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function Color$_init_$ref_hzu4wy() {\n var l = function (p0, p1, p2, p3) {\n return new Color(p0, p1, p2, p3);\n };\n l.callableName = '';\n return l;\n }\n function DefaultVisualizer$_init_$ref_c8298m() {\n var l = function (p0, p1) {\n return new DefaultVisualizer(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function EntityColliderVisualizationSystem$_init_$ref_kjeuy1() {\n var l = function (p0, p1) {\n return new EntityColliderVisualizationSystem(p0, p1);\n };\n l.callableName = '';\n return l;\n }\n function EntityColliderVisualizationComponent$_init_$ref_fnoiaz() {\n var l = function (p0, p1, p2) {\n return new EntityColliderVisualizationComponent(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function EntityCollisionVisualizationSystem$_init_$ref_k8ky2n() {\n var l = function (p0) {\n return new EntityCollisionVisualizationSystem(p0);\n };\n l.callableName = '';\n return l;\n }\n function DecoratorComponent$_init_$ref_j03x2b() {\n var l = function (p0, p1, p2, p3, p4) {\n return new DecoratorComponent(p0, p1, p2, p3, p4);\n };\n l.callableName = '';\n return l;\n }\n function CoreVisualization$_init_$ref_sop7eo() {\n var l = function (p0, p1, p2) {\n return new CoreVisualization(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function ColoredOutlineSystem$_init_$ref_pg9el2() {\n var l = function () {\n return new ColoredOutlineSystem();\n };\n l.callableName = '';\n return l;\n }\n function ColoredOutlineComponent$_init_$ref_7pktoo() {\n var l = function (p0, p1, p2) {\n return new ColoredOutlineComponent(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function AutoAdaptSessionComponent$_init_$ref_wk48zv() {\n var l = function () {\n return new AutoAdaptSessionComponent();\n };\n l.callableName = '';\n return l;\n }\n function DragProjectionPointComponent$_init_$ref_bdpsob() {\n var l = function (p0) {\n return new DragProjectionPointComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function FunctionalZone$_init_$ref_xj34xi() {\n var l = function (p0, p1, p2) {\n return new FunctionalZone(p0, p1, p2);\n };\n l.callableName = '';\n return l;\n }\n function FunctionalZonesLocalComponent$_init_$ref_4xbtox() {\n var l = function (p0) {\n return new FunctionalZonesLocalComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function DragState$_init_$ref_k1ow1k() {\n var l = function (p0, p1, p2, p3, p4, p5, p6, p7) {\n return new DragState(p0, p1, p2, p3, p4, p5, p6, p7);\n };\n l.callableName = '';\n return l;\n }\n function DragStateComponent$_init_$ref_bylfol() {\n var l = function (p0) {\n return new DragStateComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function ReplacedWithAutoAdaptEventComponent$_init_$ref_nm7pmt() {\n var l = function (p0) {\n return new ReplacedWithAutoAdaptEventComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function LabelComponent$_init_$ref_529rj8() {\n var l = function (p0) {\n return new LabelComponent(p0);\n };\n l.callableName = '';\n return l;\n }\n function HigherPriorityAlignmentPostProcess$_init_$ref_fytm9y() {\n var l = function (p0) {\n return new HigherPriorityAlignmentPostProcess(p0);\n };\n l.callableName = '';\n return l;\n }\n function RequiredConnectorsSatisfiedValidation$_init_$ref_dsrkbj() {\n var l = function () {\n return new RequiredConnectorsSatisfiedValidation();\n };\n l.callableName = '';\n return l;\n }\n function HostConnectorRotationValidation$_init_$ref_rmkrhl() {\n var l = function () {\n return new HostConnectorRotationValidation();\n };\n l.callableName = '';\n return l;\n }\n function SnapSorterBuilder$_init_$ref_vyls5d() {\n var l = function () {\n return new SnapSorterBuilder();\n };\n l.callableName = '';\n return l;\n }\n var properties_initialized_stl_js_kt_pepimr;\n function _init_properties_stl_js_kt__e1niln() {\n if (!properties_initialized_stl_js_kt_pepimr) {\n properties_initialized_stl_js_kt_pepimr = true;\n PlacementService_0 = PlacementService$_init_$ref_4ipsq3();\n replaceUtils = ReplaceUtils_instance;\n replaceAssemblyPartUtils = ReplaceAssemblyPartUtils_getInstance();\n SnapPlacementActor_0 = SnapPlacementActor$_init_$ref_h9zo2z();\n ProppingSystem_0 = ProppingSystem$_init_$ref_yjua67();\n ConnectorVisualizationSystem_0 = ConnectorVisualizationSystem$_init_$ref_bhjn0h();\n ColliderVisualizationSystem_0 = ColliderVisualizationSystem$_init_$ref_iz3yxm();\n AutoAdaptHostZoneVisualizationSystem_0 = AutoAdaptHostZoneVisualizationSystem$_init_$ref_nexzcp();\n FunctionalMarginVisualizationSystem_0 = FunctionalMarginVisualizationSystem$_init_$ref_du8tkt();\n FunctionalZoneVisualization = FunctionalZoneVisualizationSystem$_init_$ref_z56su9();\n DragProjectionPointVisualizationSystem_0 = DragProjectionPointVisualizationSystem$_init_$ref_iy9mhr();\n DragSystem_0 = DragSystem$_init_$ref_z2syyq();\n snapCardinalDirectionsDragStrategy = SnapCardinalDirectionsDragStrategy$_init_$ref_ouuluo();\n snapClosestDragStrategy = SnapClosestDragStrategy$_init_$ref_un3qp();\n snapClosestWithSubConnectorsDragStrategy = SnapClosestWithSubConnectorsDragStrategy$_init_$ref_20uk5v();\n resolveCollisionsDragStrategy = ResolveCollisionsDragStrategy$_init_$ref_cuay8f();\n drawDragGhostSystem = DrawDragGhostSystem$_init_$ref_www5q7();\n DragSurfaceNormalVisualizationSystem_0 = DragSurfaceNormalVisualizationSystem$_init_$ref_miyxm6();\n DragSurfaceVisualizationSystem_0 = DragSurfaceVisualizationSystem$_init_$ref_h43d11();\n DebugLineDrawingSystem_0 = DebugLineDrawingSystem$_init_$ref_kvzwwv();\n StandardSelectionService_0 = StandardSelectionService$_init_$ref_k0v6bl();\n AutoAdaptService_0 = AutoAdaptService$_init_$ref_k4m925();\n AlignmentConnectionCreationSystem_0 = AlignmentConnectionCreationSystem$_init_$ref_ta0hcm();\n RoomService_0 = RoomService$_init_$ref_14lqff();\n RoomSystem_0 = RoomSystem$_init_$ref_mxcny3();\n roomComponentDeserializer = RoomComponentDeserializer$_init_$ref_ocu3f4();\n roomConnectorConstants = RoomConnectorConstants_getInstance();\n StandardSelectionSystem = StandardSelectionSystem$_init_$ref_nkymih();\n OutlineSystemCtor = OutlineSystem$_init_$ref_a0oop8();\n OutlineSelectedSystemCtor = OutlineSelectedSystem$_init_$ref_b6zwpz();\n OutlineEntityGroupDeselectSystem_0 = OutlineEntityGroupDeselectSystem$_init_$ref_jrsydb();\n AllowedDoorPairsValidation_0 = AllowedDoorPairsValidation$_init_$ref_tv5wjt();\n AlignmentPlane_0 = AlignmentPlane$_init_$ref_i3c9l8();\n AllowedNumberOfChildrenOfTypeValidation_0 = AllowedNumberOfChildrenOfTypeValidation$_init_$ref_sj8e0k();\n disallowSeparateRequiredHostsValidation = DisallowSeparateRequiredHostsValidation$_init_$ref_9l13xe();\n AssemblyInstructionsService = AssemblyInstructionsServiceImpl$_init_$ref_60674r();\n ICFDataService_0 = ICFDataService$_init_$ref_ewcpkq();\n PlacementResult_0 = PlacementResult$_init_$ref_vv0umb();\n PlacementResultCompanion = Companion_instance;\n FunctionalMarginValidation_0 = FunctionalMarginValidation$_init_$ref_cl4qmd();\n placementZoneValidation = PlacementZoneValidation$_init_$ref_xzv9i3();\n ALIGNMENT_LINES_SYSTEM = AlignmentLinesSystem$_init_$ref_2vzu7a();\n FUNCTIONAL_MARGIN_SYSTEM = FunctionalMarginSystem$_init_$ref_nm9ef9();\n FunctionalMarginShapeComponent_0 = FunctionalMarginShapeComponent$_init_$ref_ukwgzs();\n FunctionalMarginComponent_0 = FunctionalMarginComponent$_init_$ref_djhkft();\n RecommendedInitialPositionFromFloorComponent_0 = RecommendedInitialPositionFromFloorComponent$_init_$ref_dyzfs8();\n PlacementZoneByHeightComponent_0 = PlacementZoneByHeightComponent$_init_$ref_1zq8h5();\n stlSystemIds = StlSystemIds_instance;\n replacePartResultConstructor = ReplacePartResult$_init_$ref_snfbmn();\n anyDragSurfaceProjector = anyDragSurfaceProjector$lambda;\n XYPlaneProjector_0 = XYPlaneProjector$_init_$ref_yhqdrw();\n DragSurfaceCanHostSelector_0 = DragSurfaceCanHostSelector$_init_$ref_vj8lw9();\n DragSurfaceCanHostWithAutoAdaptSelector_0 = DragSurfaceCanHostWithAutoAdaptSelector$_init_$ref_xz7lxk();\n AutoAdaptProductSpecificationsSystem_0 = AutoAdaptProductSpecificationsSystem$_init_$ref_vn5aie();\n LegacyCanvasTo3DDragConverterSystemConstructor = LegacyCanvasTo3DDragConverterSystemConstructor$lambda;\n CanvasTo3DDragConverterSystem = CanvasTo3DDragConverterSystem$_init_$ref_9wy4k2();\n EntityConnectorVisualizationSystem_0 = EntityConnectorVisualizationSystem$_init_$ref_5xr5ng();\n EntityConnectorVisualizationComponent_0 = EntityConnectorVisualizationComponent$_init_$ref_jbgyim();\n Color_0 = Color$_init_$ref_hzu4wy();\n DefaultVisualizer_0 = DefaultVisualizer$_init_$ref_c8298m();\n EntityColliderVisualizationSystem_0 = EntityColliderVisualizationSystem$_init_$ref_kjeuy1();\n EntityColliderVisualizationComponent_0 = EntityColliderVisualizationComponent$_init_$ref_fnoiaz();\n EntityCollisionVisualizationSystem_0 = EntityCollisionVisualizationSystem$_init_$ref_k8ky2n();\n DecoratorComponent_0 = DecoratorComponent$_init_$ref_j03x2b();\n CoreVisualization_0 = CoreVisualization$_init_$ref_sop7eo();\n ColoredOutlineSystemConstructor = ColoredOutlineSystem$_init_$ref_pg9el2();\n ColoredOutlineComponentConstructor = ColoredOutlineComponent$_init_$ref_7pktoo();\n dragExtensions = Companion_getInstance_3();\n autoAdaptFeature = AutoAdaptFeature_instance;\n autoAdaptUtils = AutoAdaptUtils_getInstance();\n autoAdaptSessionComponent = AutoAdaptSessionComponent$_init_$ref_wk48zv();\n dragProjectionPointComponentConstructor = DragProjectionPointComponent$_init_$ref_bdpsob();\n functionalZoneCtor = FunctionalZone$_init_$ref_xj34xi();\n FunctionalZonesLocalComponentCtor = FunctionalZonesLocalComponent$_init_$ref_4xbtox();\n dragStateCtor = DragState$_init_$ref_k1ow1k();\n dragStateComponentCtor = DragStateComponent$_init_$ref_bylfol();\n replacedWithAutoAdaptEventComponent = ReplacedWithAutoAdaptEventComponent$_init_$ref_nm7pmt();\n LabelComponent_0 = LabelComponent$_init_$ref_529rj8();\n HigherPriorityAlignmentPostProcessCtor = HigherPriorityAlignmentPostProcess$_init_$ref_fytm9y();\n ValidationResultIdsObj = ValidationResultIds_instance;\n RequiredConnectorsSatisfiedValidationCtor = RequiredConnectorsSatisfiedValidation$_init_$ref_dsrkbj();\n ValidationRuleIdsObj = ValidationRuleIds_instance;\n hostConnectorRotationValidation = HostConnectorRotationValidation$_init_$ref_rmkrhl();\n sortBuilderCtor = SnapSorterBuilder$_init_$ref_vyls5d();\n placementHelperObject = PlacementHelper_getInstance();\n spaceFinderUtilsObject = SpaceFinderUtils_getInstance();\n }\n }\n function get_arrangeExtensions() {\n _init_properties_test_helpers_js_kt__3l78uy();\n return arrangeExtensions;\n }\n var arrangeExtensions;\n function get_placementExtensions() {\n _init_properties_test_helpers_js_kt__3l78uy();\n return placementExtensions;\n }\n var placementExtensions;\n function get_autoAdaptExtensions() {\n _init_properties_test_helpers_js_kt__3l78uy();\n return autoAdaptExtensions;\n }\n var autoAdaptExtensions;\n function get_CountSystem() {\n _init_properties_test_helpers_js_kt__3l78uy();\n return countSystem;\n }\n var countSystem;\n function get_RoomGeneratorUtils() {\n _init_properties_test_helpers_js_kt__3l78uy();\n return roomGeneratorUtils;\n }\n var roomGeneratorUtils;\n function CountSystem$_init_$ref_315rnd() {\n var l = function () {\n return new CountSystem();\n };\n l.callableName = '';\n return l;\n }\n var properties_initialized_test_helpers_js_kt_u517pg;\n function _init_properties_test_helpers_js_kt__3l78uy() {\n if (!properties_initialized_test_helpers_js_kt_u517pg) {\n properties_initialized_test_helpers_js_kt_u517pg = true;\n arrangeExtensions = ArrangeExtensions_instance;\n placementExtensions = PlacementExtensions_instance;\n autoAdaptExtensions = AutoAdaptExtensions_instance;\n countSystem = CountSystem$_init_$ref_315rnd();\n roomGeneratorUtils = RoomGeneratorUtils_instance;\n }\n }\n //region block: post-declaration\n defineProp(protoOf(UnserializableEntityComponent_0), 'serializable', function () {\n return this.z1k();\n });\n defineProp(protoOf(UnserializableEntityComponent_0), 'doStoreInSnapshot', function () {\n return this.a1l();\n });\n //endregion\n //region block: exports\n function $jsExportAll$(_) {\n defineProp(_, 'ConnectorType', get_ConnectorType);\n defineProp(_, 'Vector', get_Vector);\n defineProp(_, 'Margin', get_Margin);\n defineProp(_, 'Size', get_Size);\n defineProp(_, 'ModelTransform', get_ModelTransform);\n defineProp(_, 'EntityManagerImpl', get_EntityManagerImpl);\n defineProp(_, 'Ray', get_Ray);\n defineProp(_, 'Transform', get_Transform);\n defineProp(_, 'Quaternion', get_Quaternion);\n defineProp(_, 'Degrees', get_Degrees);\n defineProp(_, 'Radians', get_Radians);\n defineProp(_, 'Face', get_Face);\n defineProp(_, 'Cuboid', get_Cuboid);\n defineProp(_, 'PolyhedronGroup', get_PolyhedronGroup);\n defineProp(_, 'ConvexPolyhedron', get_ConvexPolyhedron);\n defineProp(_, 'AxisAlignedBox', get_AxisAlignedBox);\n defineProp(_, 'ProductSpecification', get_ProductSpecification);\n defineProp(_, 'ValidationResultFail', get_ValidationResultFail);\n defineProp(_, 'ValidationResultWarning', get_ValidationResultWarning);\n defineProp(_, 'CollisionValidationResult', get_CollisionValidationResult);\n defineProp(_, 'CollisionValidation', get_CollisionValidation);\n defineProp(_, 'PartPair', get_PartPair);\n defineProp(_, 'ProductCatalogFunctions', get_ProductCatalogFunctions);\n defineProp(_, 'ColliderShapeComponent', get_ColliderShapeComponent);\n defineProp(_, 'Polygon', get_Polygon);\n defineProp(_, 'Plane', get_Plane);\n defineProp(_, 'DebugSurfacesComponent', get_DebugSurfacesComponent);\n defineProp(_, 'DisplayNameComponent', get_DisplayNameComponent);\n defineProp(_, 'DisabledConnectorsComponent', get_DisabledConnectorsComponent);\n defineProp(_, 'ModelInfoComponent', get_ModelInfoComponent);\n defineProp(_, 'ModelTransformComponent', get_ModelTransformComponent);\n defineProp(_, 'RelativeConnectorRepositioner', get_RelativeConnectorRepositioner);\n defineProp(_, 'RelativeConnectorData', get_RelativeConnectorData);\n defineProp(_, 'RelationOriginAlongX', get_RelationOriginAlongX);\n defineProp(_, 'RelationOriginAlongY', get_RelationOriginAlongY);\n defineProp(_, 'RelationOriginAlongZ', get_RelationOriginAlongZ);\n defineProp(_, 'RelationOrigin', get_RelationOrigin);\n defineProp(_, 'RelativeBoxOffset', get_RelativeBoxOffset);\n defineProp(_, 'PointConnector', get_PointConnector);\n defineProp(_, 'PointSeriesConnector', get_PointSeriesConnector);\n defineProp(_, 'PointSeriesSubConnector', get_PointSeriesSubConnector);\n defineProp(_, 'EdgeConnector', get_EdgeConnector);\n defineProp(_, 'SurfaceConnector', get_SurfaceConnector);\n defineProp(_, 'MathUtils', get_MathUtils);\n defineProp(_, 'ViewerDragEventComponent', get_ViewerDragEventComponent);\n defineProp(_, 'LogLevel', get_LogLevel);\n defineProp(_, 'RotationDegreeOfFreedom', get_RotationDegreeOfFreedom);\n defineProp(_, 'PolyhedronUtils', get_PolyhedronUtils);\n defineProp(_, 'RaycastResult', get_RaycastResult);\n defineProp(_, 'ApiSystemIds', get_ApiSystemIds);\n defineProp(_, 'GuestConnectionsComponent', get_GuestConnectionsComponent);\n defineProp(_, 'HostConnectionsComponent', get_HostConnectionsComponent);\n defineProp(_, 'DragSurfacesComponent', get_DragSurfacesComponent);\n defineProp(_, 'OutlineableComponent', get_OutlineableComponent);\n defineProp(_, 'DragSurface', get_DragSurface);\n defineProp(_, 'AutomaticGroupBuilderSystem', get_AutomaticGroupBuilderSystem);\n defineProp(_, 'ManualGroupConnectorValidation', get_ManualGroupConnectorValidation);\n defineProp(_, 'AssemblyStructureComponent', get_AssemblyStructureComponent);\n defineProp(_, 'RestrictAllowedRequiredHostsComponent', get_RestrictAllowedRequiredHostsComponent);\n defineProp(_, 'ManualEntityGroupBuilderService', get_ManualEntityGroupBuilderService);\n defineProp(_, 'DebugLine', get_DebugLine);\n defineProp(_, 'DebugLinesComponent', get_DebugLinesComponent);\n defineProp(_, 'ValidationFail', get_ValidationFail);\n defineProp(_, 'ValidationWarning', get_ValidationWarning);\n defineProp(_, 'AxisAlignedBoxUtils', get_AxisAlignedBoxUtils);\n defineProp(_, 'VectorConstants', get_VectorConstants);\n defineProp(_, 'IsLoadingSnapshotComponent', get_IsLoadingSnapshotComponent);\n defineProp(_, 'SnapshotIgnoreComponent', get_SnapshotIgnoreComponent);\n defineProp(_, 'ChildConnectionValidation', get_ChildConnectionValidation);\n _.quaternionFromEuler = quaternionFromEuler;\n _.UnserializableEntityComponent = UnserializableEntityComponent_0;\n _.createDragType = createDragType;\n _.mockLoadedModelInfoComponent = mockLoadedModelInfoComponent;\n defineProp(_, 'SelectableComponent', get_SelectableComponent);\n defineProp(_, 'DraggableComponent', get_DraggableComponent);\n defineProp(_, 'SnapRootComponent', get_SnapRootComponent);\n defineProp(_, 'HistoryEvent', get_HistoryEvent);\n defineProp(_, 'HistoryChangedEventComponent', get_HistoryChangedEventComponent);\n defineProp(_, 'WorldSpaceDragEventComponent', get_WorldSpaceDragEventComponent);\n defineProp(_, 'ClickEventComponent', get_ClickEventComponent);\n defineProp(_, 'LocalTransformComponent', get_LocalTransformComponent);\n defineProp(_, 'ConnectorsComponent', get_ConnectorsComponent);\n defineProp(_, 'ChildComponent', get_ChildComponent);\n defineProp(_, 'ParentComponent', get_ParentComponent);\n defineProp(_, 'ViewerObjectComponent', get_ViewerObjectComponent);\n defineProp(_, 'ConnectionRootComponent', get_ConnectionRootComponent);\n defineProp(_, 'ProductPartComponent', get_ProductPartComponent);\n defineProp(_, 'WorldTransformComponent', get_WorldTransformComponent);\n defineProp(_, 'ComponentIds', get_ComponentIds);\n defineProp(_, 'ComponentIdSpan', get_ComponentIdSpan);\n defineProp(_, 'TemplateDataComponent', get_TemplateDataComponent);\n defineProp(_, 'RelativeConnectorsComponent', get_RelativeConnectorsComponent);\n defineProp(_, 'AssemblyPartsComponent', get_AssemblyPartsComponent);\n defineProp(_, 'ViewerComponent', get_ViewerComponent);\n defineProp(_, 'ProductComponent', get_ProductComponent);\n _.SelectedComponent = SelectedComponent;\n _.SceneReloading = SceneReloading;\n _.RenderedComponent = RenderedComponent;\n _.InSceneComponent = InSceneComponent;\n _.StaticComponent = StaticComponent;\n var $com = _.com || (_.com = {});\n var $com$ikea = $com.ikea || ($com.ikea = {});\n var $com$ikea$core = $com$ikea.core || ($com$ikea.core = {});\n var $com$ikea$core$debug = $com$ikea$core.debug || ($com$ikea$core.debug = {});\n $com$ikea$core$debug._CoreDebug = _CoreDebug;\n defineProp(_, 'ColliderUtils', get_ColliderUtils);\n defineProp(_, 'CollisionUtils', get_CollisionUtils);\n defineProp(_, 'ComponentUtils', get_ComponentUtils);\n defineProp(_, 'ConnectionUtils', get_ConnectionUtils);\n defineProp(_, 'ConnectorUtils', get_ConnectorUtils);\n defineProp(_, 'EntityGroupUtils', get_EntityGroupUtils);\n defineProp(_, 'HierarchyUtils', get_HierarchyUtils);\n defineProp(_, 'MeasurementUtils', get_MeasurementUtils);\n defineProp(_, 'ModelUtils', get_ModelUtils);\n defineProp(_, 'ProductUtils', get_ProductUtils);\n defineProp(_, 'RaycastUtils', get_RaycastUtils);\n defineProp(_, 'SnapActionCandidateSortAndSelectStrategies', get_SnapActionCandidateSortAndSelectStrategies);\n defineProp(_, 'SnapUtils', get_SnapUtils);\n defineProp(_, 'TransformUtils', get_TransformUtils);\n defineProp(_, 'OutlinedComponent', get_OutlinedComponent);\n defineProp(_, 'OutlineBlockingComponent', get_OutlineBlockingComponent);\n defineProp(_, 'AutoAdaptHostComponent', get_AutoAdaptHostComponent);\n defineProp(_, 'AutoAdaptGuestComponent', get_AutoAdaptGuestComponent);\n defineProp(_, 'AutoAdaptVariantComponent', get_AutoAdaptVariantComponent);\n defineProp(_, 'ForceAutoAdaptWhenParentIsDraggedComponent', get_ForceAutoAdaptWhenParentIsDraggedComponent);\n defineProp(_, 'AllowedDoorPairsComponent', get_AllowedDoorPairsComponent);\n defineProp(_, 'AlignmentConnectionsComponent', get_AlignmentConnectionsComponent);\n defineProp(_, 'LightComponent', get_LightComponent);\n defineProp(_, 'RoomDimensionsComponent', get_RoomDimensionsComponent);\n defineProp(_, 'RoomPartComponent', get_RoomPartComponent);\n _.DoorComponent = DoorComponent;\n _.FreeMoveComponent = FreeMoveComponent;\n _.IsDraggedComponent = IsDraggedComponent;\n _.RoomComponent = RoomComponent;\n defineProp(_, 'CoreDebug', get_CoreDebug);\n defineProp(_, 'DynamicProductCatalog', get_DynamicProductCatalog);\n defineProp(_, 'DynamicProduct', get_DynamicProduct);\n defineProp(_, 'ProductTemplate', get_ProductTemplate);\n defineProp(_, 'CatalogTemplateData', get_CatalogTemplateData);\n defineProp(_, 'Part', get_Part);\n defineProp(_, 'ModelRenderInfo', get_ModelRenderInfo);\n defineProp(_, 'DynamicRangeUtils', get_DynamicRangeUtils);\n defineProp(_, 'RelativePosition', get_RelativePosition);\n defineProp(_, 'RelativeTransform', get_RelativeTransform);\n defineProp(_, 'PositionTemplate', get_PositionTemplate);\n defineProp(_, 'OriginRelativeTo', get_OriginRelativeTo);\n defineProp(_, 'PositionType', get_PositionType);\n defineProp(_, 'VisualLightSourceComponent', get_VisualLightSourceComponent);\n defineProp(_, 'TemplateEditorService', get_TemplateEditorService);\n defineProp(_, 'BoundItemTemplate', get_BoundItemTemplate);\n defineProp(_, 'Dimension', get_Dimension);\n defineProp(_, 'Compartment', get_Compartment);\n defineProp(_, 'CatalogGenerator', get_CatalogGenerator);\n _.PositionValue = PositionValue_0;\n _.OriginTemplate = OriginTemplate_0;\n _.getMeta = getMeta;\n defineProp(_, 'Experimental', experimental_js_getInstance_e6vaee);\n defineProp(_, 'IPEXRangeFormatCatalog', get_IPEXRangeFormatCatalog);\n defineProp(_, 'AmendableCatalog', get_AmendableCatalog);\n defineProp(_, 'RangeItemDTO', get_RangeItemDTO);\n defineProp(_, 'StaticComponentBuilder', get_StaticComponentBuilder);\n defineProp(_, 'createCore', get_createCore);\n defineProp(_, 'SceneSerializationUtil', get_SceneSerializationUtil);\n _.Core = Core;\n defineProp(_, 'PlacementService', get_PlacementService);\n defineProp(_, 'ReplaceUtils', get_ReplaceUtils);\n defineProp(_, 'ReplaceAssemblyPartUtils', get_ReplaceAssemblyPartUtils);\n defineProp(_, 'SnapPlacementActor', get_SnapPlacementActor);\n defineProp(_, 'ProppingSystem', get_ProppingSystem);\n defineProp(_, 'ConnectorVisualizationSystem', get_ConnectorVisualizationSystem);\n defineProp(_, 'ColliderVisualizationSystem', get_ColliderVisualizationSystem);\n defineProp(_, 'AutoAdaptHostZoneVisualizationSystem', get_AutoAdaptHostZoneVisualizationSystem);\n defineProp(_, 'FunctionalMarginVisualizationSystem', get_FunctionalMarginVisualizationSystem);\n defineProp(_, 'FunctionalZoneVisualization', get_FunctionalZoneVisualization);\n defineProp(_, 'DragProjectionPointVisualizationSystem', get_DragProjectionPointVisualizationSystem);\n defineProp(_, 'DragSystem', get_DragSystem);\n defineProp(_, 'SnapCardinalDirectionsDragStrategy', get_SnapCardinalDirectionsDragStrategy);\n defineProp(_, 'SnapClosestDragStrategy', get_SnapClosestDragStrategy);\n defineProp(_, 'SnapClosestWithSubConnectorsDragStrategy', get_SnapClosestWithSubConnectorsDragStrategy);\n defineProp(_, 'ResolveCollisionsDragStrategy', get_ResolveCollisionsDragStrategy);\n defineProp(_, 'DrawDragGhostSystem', get_DrawDragGhostSystem);\n defineProp(_, 'DragSurfaceNormalVisualizationSystem', get_DragSurfaceNormalVisualizationSystem);\n defineProp(_, 'DragSurfaceVisualizationSystem', get_DragSurfaceVisualizationSystem);\n defineProp(_, 'DebugLineDrawingSystem', get_DebugLineDrawingSystem);\n defineProp(_, 'StandardSelectionService', get_StandardSelectionService);\n defineProp(_, 'AutoAdaptService', get_AutoAdaptService);\n defineProp(_, 'AlignmentConnectionCreationSystem', get_AlignmentConnectionCreationSystem);\n defineProp(_, 'RoomService', get_RoomService);\n defineProp(_, 'RoomSystem', get_RoomSystem);\n defineProp(_, 'RoomComponentDeserializer', get_RoomComponentDeserializer);\n defineProp(_, 'RoomConnectorConstants', get_RoomConnectorConstants);\n defineProp(_, 'StandardSelectionSystem', get_StandardSelectionSystem);\n defineProp(_, 'OutlineSystem', get_OutlineSystem);\n defineProp(_, 'OutlineSelectedSystem', get_OutlineSelectedSystem);\n defineProp(_, 'OutlineEntityGroupDeselectSystem', get_OutlineEntityGroupDeselectSystem);\n defineProp(_, 'AllowedDoorPairsValidation', get_AllowedDoorPairsValidation);\n defineProp(_, 'AlignmentPlane', get_AlignmentPlane);\n defineProp(_, 'AllowedNumberOfChildrenOfTypeValidation', get_AllowedNumberOfChildrenOfTypeValidation);\n defineProp(_, 'DisallowSeparateRequiredHostsValidation', get_DisallowSeparateRequiredHostsValidation);\n defineProp(_, 'AssemblyInstructionsService', get_AssemblyInstructionsService);\n defineProp(_, 'ICFDataService', get_ICFDataService);\n defineProp(_, 'PlacementResult', get_PlacementResult);\n defineProp(_, 'PlacementResultCompanion', get_PlacementResultCompanion);\n defineProp(_, 'FunctionalMarginValidation', get_FunctionalMarginValidation);\n defineProp(_, 'PlacementZoneValidation', get_PlacementZoneValidation);\n defineProp(_, 'AlignmentLinesSystem', get_AlignmentLinesSystem);\n defineProp(_, 'FunctionalMarginSystem', get_FunctionalMarginSystem);\n defineProp(_, 'FunctionalMarginShapeComponent', get_FunctionalMarginShapeComponent);\n defineProp(_, 'FunctionalMarginComponent', get_FunctionalMarginComponent);\n defineProp(_, 'RecommendedInitialPositionFromFloorComponent', get_RecommendedInitialPositionFromFloorComponent);\n defineProp(_, 'PlacementZoneByHeightComponent', get_PlacementZoneByHeightComponent);\n defineProp(_, 'StlSystemIds', get_StlSystemIds);\n defineProp(_, 'ReplacePartResult', get_ReplacePartResult);\n defineProp(_, 'AnyDragSurfaceProjector', get_AnyDragSurfaceProjector);\n defineProp(_, 'XYPlaneProjector', get_XYPlaneProjector);\n defineProp(_, 'DragSurfaceCanHostSelector', get_DragSurfaceCanHostSelector);\n defineProp(_, 'DragSurfaceCanHostWithAutoAdaptSelector', get_DragSurfaceCanHostWithAutoAdaptSelector);\n defineProp(_, 'AutoAdaptProductSpecificationsSystem', get_AutoAdaptProductSpecificationsSystem);\n defineProp(_, 'LegacyCanvasTo3DDragConverterSystem', get_LegacyCanvasTo3DDragConverterSystem);\n defineProp(_, 'CanvasTo3DDragConverterSystem', get_CanvasTo3DDragConverterSystem);\n defineProp(_, 'EntityConnectorVisualizationSystem', get_EntityConnectorVisualizationSystem);\n defineProp(_, 'EntityConnectorVisualizationComponent', get_EntityConnectorVisualizationComponent);\n defineProp(_, 'Color', get_Color);\n defineProp(_, 'DefaultVisualizer', get_DefaultVisualizer);\n defineProp(_, 'EntityColliderVisualizationSystem', get_EntityColliderVisualizationSystem);\n defineProp(_, 'EntityColliderVisualizationComponent', get_EntityColliderVisualizationComponent);\n defineProp(_, 'EntityCollisionVisualizationSystem', get_EntityCollisionVisualizationSystem);\n defineProp(_, 'DecoratorComponent', get_DecoratorComponent);\n defineProp(_, 'CoreVisualization', get_CoreVisualization);\n defineProp(_, 'ColoredOutlineSystem', get_ColoredOutlineSystem);\n defineProp(_, 'ColoredOutlineComponent', get_ColoredOutlineComponent);\n defineProp(_, 'DragExtensions', get_DragExtensions);\n defineProp(_, 'AutoAdaptFeature', get_AutoAdaptFeature);\n defineProp(_, 'AutoAdaptUtils', get_AutoAdaptUtils);\n defineProp(_, 'AutoAdaptSessionComponent', get_AutoAdaptSessionComponent);\n defineProp(_, 'DragProjectionPointComponent', get_DragProjectionPointComponent);\n defineProp(_, 'FunctionalZone', get_FunctionalZone);\n defineProp(_, 'FunctionalZonesLocalComponent', get_FunctionalZonesLocalComponent);\n defineProp(_, 'DragState', get_DragState);\n defineProp(_, 'DragStateComponent', get_DragStateComponent);\n defineProp(_, 'ReplaceEntityEventComponent', get_ReplaceEntityEventComponent);\n defineProp(_, 'LabelComponent', get_LabelComponent);\n defineProp(_, 'HigherPriorityAlignmentPostProcess', get_HigherPriorityAlignmentPostProcess);\n defineProp(_, 'ValidationResultIds', get_ValidationResultIds);\n defineProp(_, 'RequiredConnectorsSatisfiedValidation', get_RequiredConnectorsSatisfiedValidation);\n defineProp(_, 'ValidationRuleIds', get_ValidationRuleIds);\n defineProp(_, 'HostConnectorRotationValidation', get_HostConnectorRotationValidation);\n defineProp(_, 'SnapSorterBuilder', get_SnapSorterBuilder);\n defineProp(_, 'PlacementHelper', get_PlacementHelper);\n defineProp(_, 'SpaceFinderUtils', get_SpaceFinderUtils);\n _.ValidDragStrategyResult = ValidDragStrategyResult_0;\n _.AutoAdaptDragStrategy = AutoAdaptDragStrategy_0;\n _.HandleRotationSystem = HandleRotationSystem_0;\n _.DebugLogger = DebugLogger_0;\n _.FunctionalZonesLocalToWorldSystem = FunctionalZonesLocalToWorldSystem_0;\n defineProp(_, 'arrangeExtensions', get_arrangeExtensions);\n defineProp(_, 'placementExtensions', get_placementExtensions);\n defineProp(_, 'autoAdaptExtensions', get_autoAdaptExtensions);\n defineProp(_, 'CountSystem', get_CountSystem);\n defineProp(_, 'RoomGeneratorUtils', get_RoomGeneratorUtils);\n }\n $jsExportAll$(_);\n kotlin_core_core_api.$jsExportAll$(_);\n kotlin_core_core_kernel.$jsExportAll$(_);\n kotlin_core_core_stl.$jsExportAll$(_);\n kotlin_core_core_experimental.$jsExportAll$(_);\n kotlin_core_core_range_dynamic_range.$jsExportAll$(_);\n kotlin_core_ipex_range_format.$jsExportAll$(_);\n kotlin_core_core_test_test_helpers.$jsExportAll$(_);\n //endregion\n return _;\n}));\n\n//# sourceMappingURL=core.js.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoreToolboxComponentIds = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar CoreToolboxComponentIds = /** @class */ (function () {\n function CoreToolboxComponentIds() {\n }\n var _a;\n _a = CoreToolboxComponentIds;\n CoreToolboxComponentIds.BaseId = core_1.ComponentIdSpan.CORE_TOOLBOX_BASE_ID;\n CoreToolboxComponentIds.IpexViewerComponentId = _a.BaseId + 1; // placed this component in ipex-viewer-core-adapter, left the component id here since that package does not have its own range of ids\n CoreToolboxComponentIds.ViewerSurfaceReferenceComponent = _a.BaseId + 2;\n CoreToolboxComponentIds.CanvasComponentId = _a.BaseId + 3; // placed this component in ipex-viewer-core-adapter, left the component id here since that package does not have its own range of ids\n CoreToolboxComponentIds.KvadratVPCComponentId = _a.BaseId + 4;\n return CoreToolboxComponentIds;\n}());\nexports.CoreToolboxComponentIds = CoreToolboxComponentIds;\n//# sourceMappingURL=CoreToolboxComponentIds.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ComponentListenerImpl = void 0;\nvar ComponentListenerImpl = /** @class */ (function () {\n function ComponentListenerImpl(owner, componentId, onComponentAddedRef, onComponentUpdatedRef, onComponentRemovedRef) {\n this.ownerSystem = owner;\n this.componentId = componentId;\n this.onComponentAddedRef = onComponentAddedRef;\n this.onComponentUpdatedRef = onComponentUpdatedRef;\n this.onComponentRemovedRef = onComponentRemovedRef;\n }\n ComponentListenerImpl.prototype.onAdd = function (entity, newComponent) {\n this.onComponentAddedRef(entity, newComponent);\n };\n ComponentListenerImpl.prototype.onUpdate = function (entity, oldComponent, newComponent) {\n this.onComponentUpdatedRef(entity, oldComponent, newComponent);\n };\n ComponentListenerImpl.prototype.onRemove = function (entity, oldComponent) {\n this.onComponentRemovedRef(entity, oldComponent);\n };\n return ComponentListenerImpl;\n}());\nexports.ComponentListenerImpl = ComponentListenerImpl;\n//# sourceMappingURL=ComponentListenerImpl.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SystemBase = void 0;\nvar ComponentListenerImpl_1 = require(\"./ComponentListenerImpl\");\n/**\n * A base class for systems that will listen to one type of component.\n * This system can be enabled or disabled and will then start/stop listening.\n *\n * Note that in order for the system to work it must be registered with the EntityManager\n * and enabled.\n */\nvar SystemBase = /** @class */ (function () {\n function SystemBase(componentId) {\n this.mandatoryComponents = null;\n this.ignoreEntitiesWithComponents = null;\n this._isEnabled = true;\n this.onAddComponent = this.onAddComponent.bind(this);\n this.onUpdateComponent = this.onUpdateComponent.bind(this);\n this.onRemoveComponent = this.onRemoveComponent.bind(this);\n this._componentListeners = [\n new ComponentListenerImpl_1.ComponentListenerImpl(this, componentId, this.onAddComponent, this.onUpdateComponent, this.onRemoveComponent)\n ];\n }\n Object.defineProperty(SystemBase.prototype, \"componentListeners\", {\n get: function () {\n return this._componentListeners;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SystemBase.prototype, \"isEnabled\", {\n get: function () {\n return this._isEnabled;\n },\n enumerable: false,\n configurable: true\n });\n SystemBase.prototype.onAddComponent = function (_entity, _newComponent) { };\n SystemBase.prototype.onUpdateComponent = function (_entity, _oldComponent, _newComponent) { };\n SystemBase.prototype.onRemoveComponent = function (_entity, _oldComponent) { };\n SystemBase.prototype.enable = function () {\n this._isEnabled = true;\n };\n SystemBase.prototype.disable = function () {\n this._isEnabled = false;\n };\n SystemBase.prototype.register = function (entityManager) {\n entityManager.registerSystem(this);\n };\n SystemBase.prototype.unregister = function (entityManager) {\n entityManager.unregisterSystem(this);\n };\n SystemBase.prototype.onRegister = function () {\n // Default implementation\n };\n SystemBase.prototype.onUnregister = function () {\n // Default implementation\n };\n return SystemBase;\n}());\nexports.SystemBase = SystemBase;\n//# sourceMappingURL=SystemBase.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SystemBase2 = void 0;\nvar ComponentListenerImpl_1 = require(\"./ComponentListenerImpl\");\nvar SystemBase_1 = require(\"./SystemBase\");\n/**\n * A type of system listening to two components\n * When implementing a system like this, do consider if you are really separating concerns properly or\n * it should really be two separate systems\n * Sometimes there is a need for a system listening to two different components though, and in that case this\n * class can be inherited to reduce a lot of the boilerplate code\n *\n * Note that in order for the system to work it must be registered with the EntityManager\n * and enabled.\n */\nvar SystemBase2 = /** @class */ (function (_super) {\n __extends(SystemBase2, _super);\n function SystemBase2(component1Id, component2Id) {\n var _this = _super.call(this, component1Id) || this;\n _this.onAddComponent2 = _this.onAddComponent2.bind(_this);\n _this.onUpdateComponent2 = _this.onUpdateComponent2.bind(_this);\n _this.onRemoveComponent2 = _this.onRemoveComponent2.bind(_this);\n _this._componentListeners.push(new ComponentListenerImpl_1.ComponentListenerImpl(_this, component2Id, _this.onAddComponent2, _this.onUpdateComponent2, _this.onRemoveComponent2));\n return _this;\n }\n SystemBase2.prototype.onAddComponent2 = function (_entity, _newComponent) { };\n SystemBase2.prototype.onUpdateComponent2 = function (_entity, _oldComponent, _newComponent) { };\n SystemBase2.prototype.onRemoveComponent2 = function (_entity, _oldComponent) { };\n return SystemBase2;\n}(SystemBase_1.SystemBase));\nexports.SystemBase2 = SystemBase2;\n//# sourceMappingURL=SystemBase2.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SystemBase3 = void 0;\nvar SystemBase2_1 = require(\"./SystemBase2\");\nvar ComponentListenerImpl_1 = require(\"./ComponentListenerImpl\");\n/**\n * A type of system listening to three components\n * When implementing a system like this, do consider if you are really separating concerns properly or\n * it should really be separate systems\n * Sometimes there is a need for a system listening to different components though, and in that case this\n * class can be inherited to reduce a lot of the boilerplate code\n *\n * Note that in order for the system to work it must be registered with the EntityManager\n */\nvar SystemBase3 = /** @class */ (function (_super) {\n __extends(SystemBase3, _super);\n function SystemBase3(component1Id, component2Id, component3Id) {\n var _this = _super.call(this, component1Id, component2Id) || this;\n _this.onAddComponent3 = _this.onAddComponent3.bind(_this);\n _this.onUpdateComponent3 = _this.onUpdateComponent3.bind(_this);\n _this.onRemoveComponent3 = _this.onRemoveComponent3.bind(_this);\n _this._componentListeners.push(new ComponentListenerImpl_1.ComponentListenerImpl(_this, component3Id, _this.onAddComponent3, _this.onUpdateComponent3, _this.onRemoveComponent3));\n return _this;\n }\n SystemBase3.prototype.onAddComponent3 = function (_entity, _newComponent) { };\n SystemBase3.prototype.onUpdateComponent3 = function (_entity, _oldComponent, _newComponent) { };\n SystemBase3.prototype.onRemoveComponent3 = function (_entity, _oldComponent) { };\n return SystemBase3;\n}(SystemBase2_1.SystemBase2));\nexports.SystemBase3 = SystemBase3;\n//# sourceMappingURL=SystemBase3.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SystemBase4 = void 0;\nvar ComponentListenerImpl_1 = require(\"./ComponentListenerImpl\");\nvar SystemBase3_1 = require(\"./SystemBase3\");\n/**\n * A type of system listening to three components\n * When implementing a system like this, do consider if you are really separating concerns properly or\n * it should really be separate systems\n * Sometimes there is a need for a system listening to different components though, and in that case this\n * class can be inherited to reduce a lot of the boilerplate code\n *\n * Note that in order for the system to work it must be registered with the EntityManager\n */\nvar SystemBase4 = /** @class */ (function (_super) {\n __extends(SystemBase4, _super);\n function SystemBase4(component1Id, component2Id, component3Id, component4Id) {\n var _this = _super.call(this, component1Id, component2Id, component3Id) || this;\n _this.onAddComponent4 = _this.onAddComponent4.bind(_this);\n _this.onUpdateComponent4 = _this.onUpdateComponent4.bind(_this);\n _this.onRemoveComponent4 = _this.onRemoveComponent4.bind(_this);\n _this._componentListeners.push(new ComponentListenerImpl_1.ComponentListenerImpl(_this, component4Id, _this.onAddComponent4, _this.onUpdateComponent4, _this.onRemoveComponent4));\n return _this;\n }\n SystemBase4.prototype.onAddComponent4 = function (_entity, _newComponent) { };\n SystemBase4.prototype.onUpdateComponent4 = function (_entity, _oldComponent, _newComponent) { };\n SystemBase4.prototype.onRemoveComponent4 = function (_entity, _oldComponent) { };\n return SystemBase4;\n}(SystemBase3_1.SystemBase3));\nexports.SystemBase4 = SystemBase4;\n//# sourceMappingURL=SystemBase4.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SystemBase5 = void 0;\nvar ComponentListenerImpl_1 = require(\"./ComponentListenerImpl\");\nvar SystemBase4_1 = require(\"./SystemBase4\");\n/**\n * A type of system listening to five components\n * When implementing a system like this, do consider if you are really separating concerns properly or\n * it should really be separate systems\n * Sometimes there is a need for a system listening to different components though, and in that case this\n * class can be inherited to reduce a lot of the boilerplate code\n *\n * Note that in order for the system to work it must be registered with the EntityManager\n */\nvar SystemBase5 = /** @class */ (function (_super) {\n __extends(SystemBase5, _super);\n function SystemBase5(component1Id, component2Id, component3Id, component4Id, component5Id) {\n var _this = _super.call(this, component1Id, component2Id, component3Id, component4Id) || this;\n _this.onAddComponent5 = _this.onAddComponent5.bind(_this);\n _this.onUpdateComponent5 = _this.onUpdateComponent5.bind(_this);\n _this.onRemoveComponent5 = _this.onRemoveComponent5.bind(_this);\n _this._componentListeners.push(new ComponentListenerImpl_1.ComponentListenerImpl(_this, component5Id, _this.onAddComponent5, _this.onUpdateComponent5, _this.onRemoveComponent5));\n return _this;\n }\n SystemBase5.prototype.onAddComponent5 = function (_entity, _newComponent) { };\n SystemBase5.prototype.onUpdateComponent5 = function (_entity, _oldComponent, _newComponent) { };\n SystemBase5.prototype.onRemoveComponent5 = function (_entity, _oldComponent) { };\n return SystemBase5;\n}(SystemBase4_1.SystemBase4));\nexports.SystemBase5 = SystemBase5;\n//# sourceMappingURL=SystemBase5.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidationBase = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar ValidationBase = /** @class */ (function () {\n function ValidationBase() {\n this._isEnabled = true;\n }\n Object.defineProperty(ValidationBase.prototype, \"isEnabled\", {\n get: function () {\n return this._isEnabled;\n },\n enumerable: false,\n configurable: true\n });\n ValidationBase.prototype.enable = function () {\n this._isEnabled = true;\n };\n ValidationBase.prototype.disable = function () {\n this._isEnabled = false;\n };\n ValidationBase.prototype.findRoot = function (snapActionCandidate, entity) {\n var _a;\n var mainEntity = (_a = snapActionCandidate === null || snapActionCandidate === void 0 ? void 0 : snapActionCandidate.host) !== null && _a !== void 0 ? _a : entity;\n return core_1.HierarchyUtils.rootOf(mainEntity);\n };\n return ValidationBase;\n}());\nexports.ValidationBase = ValidationBase;\n//# sourceMappingURL=ValidationBase.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleOutlineSelectedSystem = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar SystemBase2_1 = require(\"../systembase/SystemBase2\");\nvar SimpleOutlineAssemblySystem_1 = require(\"./SimpleOutlineAssemblySystem\");\nvar SimpleOutlineBlockingSystem_1 = require(\"./SimpleOutlineBlockingSystem\");\nvar SimpleOutlineModelSystem_1 = require(\"./SimpleOutlineModelSystem\");\n/**\n * This system handles user interactions, catching changes to outlineable and selected components,\n * marking the entity as outlined whit it is selected.\n *\n * If you want the children or assembly parts to be outlined as well, you can use the\n * {@link SimpleOutlineChildrenSystem} and {@link SimpleOutlineAssemblySystem} respectively.\n * (Or just start everything from {@link OutlineUtils.enableOutlineSystem}.)\n */\nvar SimpleOutlineSelectedSystem = /** @class */ (function (_super) {\n __extends(SimpleOutlineSelectedSystem, _super);\n function SimpleOutlineSelectedSystem() {\n var _this = _super.call(this, core_1.ComponentIds.SELECTED_COMPONENT_ID, core_1.ComponentIds.OUTLINEABLE_COMPONENT_ID) || this;\n _this.id = SimpleOutlineSelectedSystem.systemID;\n _this.doingChangesOnComponent = [];\n _this.systemsAfterMe = [\n SimpleOutlineModelSystem_1.SimpleOutlineModelSystem.systemID,\n SimpleOutlineAssemblySystem_1.SimpleOutlineAssemblySystem.systemID\n ];\n _this.systemsBeforeMe = [\n SimpleOutlineBlockingSystem_1.SimpleOutlineBlockingSystem.systemID,\n core_1.StlSystemIds.STANDARD_SELECTION_SYSTEM_SYSTEM_ID,\n ];\n return _this;\n }\n SimpleOutlineSelectedSystem.prototype.onAddComponent = function (entity, _newComponent) {\n this.addOutlinedIfOutlineable(entity);\n };\n SimpleOutlineSelectedSystem.prototype.onAddComponent2 = function (entity, _newComponent) {\n this.addOutlinedIfSelected(entity);\n };\n SimpleOutlineSelectedSystem.prototype.onRemoveComponent = function (entity, _oldComponent) {\n entity.removeComponent(core_1.ComponentIds.OUTLINED_COMPONENT_ID);\n };\n SimpleOutlineSelectedSystem.prototype.onRemoveComponent2 = function (entity, _oldComponent) {\n entity.removeComponent(core_1.ComponentIds.OUTLINED_COMPONENT_ID);\n };\n SimpleOutlineSelectedSystem.prototype.onUpdateComponent = function (_entity, _oldComponent, _newComponent) {\n // Do nothing\n };\n SimpleOutlineSelectedSystem.prototype.onUpdateComponent2 = function (_entity, _oldComponent, _newComponent) {\n // Do nothing\n };\n SimpleOutlineSelectedSystem.prototype.addOutlinedIfOutlineable = function (entity) {\n if (SimpleOutlineSelectedSystem.isOutlineable(entity)) {\n entity.addComponent(new core_1.OutlinedComponent());\n }\n };\n SimpleOutlineSelectedSystem.prototype.addOutlinedIfSelected = function (entity) {\n if (SimpleOutlineSelectedSystem.isSelected(entity)) {\n entity.addComponent(new core_1.OutlinedComponent());\n }\n };\n SimpleOutlineSelectedSystem.isOutlineable = function (entity) {\n return entity.hasComponent(core_1.ComponentIds.OUTLINEABLE_COMPONENT_ID);\n };\n SimpleOutlineSelectedSystem.isSelected = function (entity) {\n return entity.hasComponent(core_1.ComponentIds.SELECTED_COMPONENT_ID);\n };\n SimpleOutlineSelectedSystem.systemID = 'SimpleOutlineSelectedSystem';\n return SimpleOutlineSelectedSystem;\n}(SystemBase2_1.SystemBase2));\nexports.SimpleOutlineSelectedSystem = SimpleOutlineSelectedSystem;\n//# sourceMappingURL=SimpleOutlineSelectedSystem.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleOutlineBlockingSystem = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar SystemBase2_1 = require(\"../systembase/SystemBase2\");\nvar SimpleOutlineSelectedSystem_1 = require(\"./SimpleOutlineSelectedSystem\");\n/**\n * This system is synchronizing the {@link OutlineBlockingComponent} and {@link ViewerObjectComponent} with\n * the viewer, making sure that outlines will be shown as blocking or not.\n *\n * When enabling it, it won't update already existing entities.\n *\n */\nvar SimpleOutlineBlockingSystem = /** @class */ (function (_super) {\n __extends(SimpleOutlineBlockingSystem, _super);\n function SimpleOutlineBlockingSystem() {\n var _this = _super.call(this, core_1.ComponentIds.VIEWER_OBJECT_COMPONENT_ID, core_1.ComponentIds.OUTLINE_BLOCKING_COMPONENT_ID) || this;\n _this.id = SimpleOutlineBlockingSystem.systemID;\n _this.doingChangesOnComponent = [];\n _this.systemsAfterMe = [SimpleOutlineSelectedSystem_1.SimpleOutlineSelectedSystem.systemID];\n _this.systemsBeforeMe = null;\n _this.mandatoryComponents = [core_1.ComponentIds.LOADED_MODEL_INFO_COMPONENT_ID];\n return _this;\n }\n SimpleOutlineBlockingSystem.prototype.onAddComponent = function (entity, newComponent) {\n if (entity.hasComponent(core_1.ComponentIds.OUTLINE_BLOCKING_COMPONENT_ID)) {\n newComponent.viewerObject.setBlockOutlined(true);\n }\n };\n SimpleOutlineBlockingSystem.prototype.onUpdateComponent = function (entity, _oldComponent, newComponent) {\n if (entity.hasComponent(core_1.ComponentIds.OUTLINE_BLOCKING_COMPONENT_ID)) {\n newComponent.viewerObject.setBlockOutlined(true);\n }\n };\n SimpleOutlineBlockingSystem.prototype.onRemoveComponent = function (_entity, _oldComponent) {\n // Do nothing.\n };\n SimpleOutlineBlockingSystem.prototype.onAddComponent2 = function (entity, _newComponent) {\n var modelComponent = entity.getComponent(core_1.ComponentIds.VIEWER_OBJECT_COMPONENT_ID);\n modelComponent === null || modelComponent === void 0 ? void 0 : modelComponent.viewerObject.setBlockOutlined(true);\n };\n SimpleOutlineBlockingSystem.prototype.onRemoveComponent2 = function (entity, _oldComponent) {\n var modelComponent = entity.getComponent(core_1.ComponentIds.VIEWER_OBJECT_COMPONENT_ID);\n modelComponent === null || modelComponent === void 0 ? void 0 : modelComponent.viewerObject.setBlockOutlined(false);\n };\n SimpleOutlineBlockingSystem.prototype.onUpdateComponent2 = function (_entity, _oldComponent, _newComponent) {\n // Do nothing.\n };\n SimpleOutlineBlockingSystem.systemID = 'SimpleOutlineBlockingSystem';\n return SimpleOutlineBlockingSystem;\n}(SystemBase2_1.SystemBase2));\nexports.SimpleOutlineBlockingSystem = SimpleOutlineBlockingSystem;\n//# sourceMappingURL=SimpleOutlineBlockingSystem.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleOutlineAssemblySystem = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar SystemBase_1 = require(\"../systembase/SystemBase\");\nvar SimpleOutlineBlockingSystem_1 = require(\"./SimpleOutlineBlockingSystem\");\nvar SimpleOutlineModelSystem_1 = require(\"./SimpleOutlineModelSystem\");\n/**\n * This system acts on the outline component state of assembiels, and propagates the outline\n * state down to the parts of the assemblies.\n */\nvar SimpleOutlineAssemblySystem = /** @class */ (function (_super) {\n __extends(SimpleOutlineAssemblySystem, _super);\n function SimpleOutlineAssemblySystem() {\n var _this = _super.call(this, core_1.ComponentIds.OUTLINED_COMPONENT_ID) || this;\n _this.id = SimpleOutlineAssemblySystem.systemID;\n _this.doingChangesOnComponent = [];\n _this.systemsAfterMe = [SimpleOutlineModelSystem_1.SimpleOutlineModelSystem.systemID];\n _this.systemsBeforeMe = [SimpleOutlineBlockingSystem_1.SimpleOutlineBlockingSystem.systemID];\n return _this;\n }\n SimpleOutlineAssemblySystem.prototype.onAddComponent = function (entity, _newComponent) {\n if (core_1.HierarchyUtils.isAssembly(entity)) {\n this.addOutlineToAssemblies(entity);\n }\n };\n SimpleOutlineAssemblySystem.prototype.onRemoveComponent = function (entity, _oldComponent) {\n if (core_1.HierarchyUtils.isAssembly(entity)) {\n this.removeOutlineFromAssemblies(entity);\n }\n };\n SimpleOutlineAssemblySystem.prototype.onUpdateComponent = function (_entity, _oldComponent, _newComponent) {\n // Do nothing.\n };\n SimpleOutlineAssemblySystem.prototype.addOutlineToAssemblies = function (entity) {\n core_1.HierarchyUtils.\n getAssemblyEntities(entity).\n forEach(function (assemblyEntity) {\n assemblyEntity.addComponent(new core_1.OutlinedComponent());\n });\n };\n SimpleOutlineAssemblySystem.prototype.removeOutlineFromAssemblies = function (entity) {\n core_1.HierarchyUtils.\n getAssemblyEntities(entity).\n forEach(function (assemblyEntity) {\n assemblyEntity.removeComponent(core_1.ComponentIds.OUTLINED_COMPONENT_ID);\n });\n };\n SimpleOutlineAssemblySystem.systemID = \"SimpleOutlineAssemblySystem\";\n return SimpleOutlineAssemblySystem;\n}(SystemBase_1.SystemBase));\nexports.SimpleOutlineAssemblySystem = SimpleOutlineAssemblySystem;\n//# sourceMappingURL=SimpleOutlineAssemblySystem.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleOutlineModelSystem = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar SystemBase2_1 = require(\"../systembase/SystemBase2\");\nvar SimpleOutlineAssemblySystem_1 = require(\"./SimpleOutlineAssemblySystem\");\nvar SimpleOutlineSelectedSystem_1 = require(\"./SimpleOutlineSelectedSystem\");\n/**\n * This system processes incoming changes to the model and outlined components, setting the\n * entities to be outlined if it is added or removing outlined if the components are removed.\n */\nvar SimpleOutlineModelSystem = /** @class */ (function (_super) {\n __extends(SimpleOutlineModelSystem, _super);\n function SimpleOutlineModelSystem() {\n var _this = _super.call(this, core_1.ComponentIds.VIEWER_OBJECT_COMPONENT_ID, core_1.ComponentIds.OUTLINED_COMPONENT_ID) || this;\n _this.id = SimpleOutlineModelSystem.systemID;\n _this.doingChangesOnComponent = [];\n _this.systemsAfterMe = null;\n _this.systemsBeforeMe = [\n core_1.ApiSystemIds.MODEL_LOADER_SYSTEM_ID,\n SimpleOutlineSelectedSystem_1.SimpleOutlineSelectedSystem.systemID,\n SimpleOutlineAssemblySystem_1.SimpleOutlineAssemblySystem.systemID\n ];\n return _this;\n }\n SimpleOutlineModelSystem.prototype.getViewerObject = function (entity) {\n var _a;\n return (_a = entity.getComponent(core_1.ComponentIds.VIEWER_OBJECT_COMPONENT_ID)) === null || _a === void 0 ? void 0 : _a.viewerObject;\n };\n SimpleOutlineModelSystem.prototype.onAddComponent = function (entity, newComponent) {\n if (entity.hasComponent(core_1.ComponentIds.OUTLINED_COMPONENT_ID)) {\n newComponent.viewerObject.setOutlined(true);\n }\n };\n SimpleOutlineModelSystem.prototype.onUpdateComponent = function (entity, _oldComponent, newComponent) {\n if (entity.hasComponent(core_1.ComponentIds.OUTLINED_COMPONENT_ID)) {\n newComponent.viewerObject.setOutlined(true);\n }\n };\n SimpleOutlineModelSystem.prototype.onRemoveComponent = function (_entity, _oldComponent) {\n // Do nothing.\n };\n SimpleOutlineModelSystem.prototype.onAddComponent2 = function (entity, _newComponent) {\n var _a;\n (_a = this.getViewerObject((entity))) === null || _a === void 0 ? void 0 : _a.setOutlined(true);\n };\n SimpleOutlineModelSystem.prototype.onRemoveComponent2 = function (entity, _oldComponent) {\n var _a;\n (_a = this.getViewerObject((entity))) === null || _a === void 0 ? void 0 : _a.setOutlined(false);\n };\n SimpleOutlineModelSystem.prototype.onUpdateComponent2 = function (_entity, _oldComponent, _newComponent) {\n // Do nothing.\n };\n SimpleOutlineModelSystem.systemID = 'SimpleOutlineModelSystem';\n return SimpleOutlineModelSystem;\n}(SystemBase2_1.SystemBase2));\nexports.SimpleOutlineModelSystem = SimpleOutlineModelSystem;\n//# sourceMappingURL=SimpleOutlineModelSystem.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleOutlineChildrenSystem = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar SystemBase2_1 = require(\"../systembase/SystemBase2\");\nvar SimpleOutlineBlockingSystem_1 = require(\"./SimpleOutlineBlockingSystem\");\nvar SimpleOutlineModelSystem_1 = require(\"./SimpleOutlineModelSystem\");\nvar SimpleOutlineSelectedSystem_1 = require(\"./SimpleOutlineSelectedSystem\");\n/**\n * This system acts on the outline component, and propagates the outline state to children recursively.\n */\nvar SimpleOutlineChildrenSystem = /** @class */ (function (_super) {\n __extends(SimpleOutlineChildrenSystem, _super);\n function SimpleOutlineChildrenSystem() {\n var _this = _super.call(this, core_1.ComponentIds.OUTLINED_COMPONENT_ID, core_1.ComponentIds.CHILD_COMPONENT_ID) || this;\n _this.id = SimpleOutlineChildrenSystem.systemID;\n _this.doingChangesOnComponent = [];\n _this.systemsAfterMe = [\n SimpleOutlineModelSystem_1.SimpleOutlineModelSystem.systemID,\n ];\n _this.systemsBeforeMe = [\n SimpleOutlineBlockingSystem_1.SimpleOutlineBlockingSystem.systemID,\n SimpleOutlineSelectedSystem_1.SimpleOutlineSelectedSystem.systemID\n ];\n return _this;\n }\n SimpleOutlineChildrenSystem.prototype.onAddComponent = function (entity, _newComponent) {\n if (entity.hasComponent(core_1.ComponentIds.PARENT_COMPONENT_ID)) {\n this.addOutlineToChildren(entity);\n }\n };\n SimpleOutlineChildrenSystem.prototype.onRemoveComponent = function (entity, _oldComponent) {\n if (entity.hasComponent(core_1.ComponentIds.PARENT_COMPONENT_ID)) {\n this.removeOutlineFromChildren(entity);\n }\n };\n SimpleOutlineChildrenSystem.prototype.onUpdateComponent = function (_entity, _oldComponent, _newComponent) {\n // Do nothing.\n };\n SimpleOutlineChildrenSystem.prototype.addOutlineToChildren = function (entity) {\n core_1.HierarchyUtils.children(entity).forEach(function (child) {\n child.addComponent(new core_1.OutlinedComponent());\n });\n };\n SimpleOutlineChildrenSystem.prototype.removeOutlineFromChildren = function (entity) {\n core_1.HierarchyUtils.children(entity).forEach(function (child) {\n child.removeComponent(core_1.ComponentIds.OUTLINED_COMPONENT_ID);\n });\n };\n SimpleOutlineChildrenSystem.prototype.onAddComponent2 = function (entity, _newComponent) {\n this.updateChildren(entity);\n };\n SimpleOutlineChildrenSystem.prototype.onRemoveComponent2 = function (_entity, _oldComponent) {\n // Do nothing.\n };\n SimpleOutlineChildrenSystem.prototype.onUpdateComponent2 = function (entity, _oldComponent, _newComponent) {\n this.updateChildren(entity);\n };\n SimpleOutlineChildrenSystem.prototype.updateChildren = function (entity) {\n if (entity.hasComponent(core_1.ComponentIds.OUTLINEABLE_COMPONENT_ID)) {\n var outlinedParent = core_1.HierarchyUtils.findWithComponentInUpwardsHierarchy(entity, core_1.ComponentIds.OUTLINED_COMPONENT_ID);\n if (outlinedParent) {\n entity.addComponent(new core_1.OutlinedComponent());\n }\n }\n };\n SimpleOutlineChildrenSystem.systemID = 'SimpleOutlineChildrenSystem';\n return SimpleOutlineChildrenSystem;\n}(SystemBase2_1.SystemBase2));\nexports.SimpleOutlineChildrenSystem = SimpleOutlineChildrenSystem;\n//# sourceMappingURL=SimpleOutlineChildrenSystem.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AddBlockingToAllModelsSystem = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar SystemBase_1 = require(\"../systembase/SystemBase\");\nvar SimpleOutlineModelSystem_1 = require(\"./SimpleOutlineModelSystem\");\n/**\n * This system will configure all viewer objects to show block outlines (when the outlines are visible)\n * It acts mainly to preserve the legacy outline blocking behaviour, which set all models to show block\n * outlines.\n *\n * It will only affect viewer object created after the system was enabled.\n */\nvar AddBlockingToAllModelsSystem = /** @class */ (function (_super) {\n __extends(AddBlockingToAllModelsSystem, _super);\n function AddBlockingToAllModelsSystem() {\n var _this = _super.call(this, core_1.ComponentIds.VIEWER_OBJECT_COMPONENT_ID) || this;\n _this.id = AddBlockingToAllModelsSystem.systemID;\n _this.doingChangesOnComponent = [];\n _this.systemsAfterMe = [\"OutlineSystem\", SimpleOutlineModelSystem_1.SimpleOutlineModelSystem.systemID];\n _this.systemsBeforeMe = null;\n _this.mandatoryComponents = [core_1.ComponentIds.LOADED_MODEL_INFO_COMPONENT_ID];\n return _this;\n }\n AddBlockingToAllModelsSystem.prototype.onAddComponent = function (_entity, newComponent) {\n newComponent.viewerObject.setBlockOutlined(true);\n };\n AddBlockingToAllModelsSystem.prototype.onRemoveComponent = function (_entity, _oldComponent) {\n // Do nothing.\n };\n AddBlockingToAllModelsSystem.prototype.onUpdateComponent = function (_entity, _oldComponent, _newComponent) {\n // Do nothing.\n };\n AddBlockingToAllModelsSystem.systemID = \"AddBlockingToAllModelsSystem\";\n return AddBlockingToAllModelsSystem;\n}(SystemBase_1.SystemBase));\nexports.AddBlockingToAllModelsSystem = AddBlockingToAllModelsSystem;\n//# sourceMappingURL=AddBlockingToAllModelsSystem.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleOutlineSnapshotLoadedSystem = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar SystemBase_1 = require(\"../systembase/SystemBase\");\n/**\n * This system updates the outlines of entities when a snapshot has been loaded.\n */\nvar SimpleOutlineSnapshotLoadedSystem = /** @class */ (function (_super) {\n __extends(SimpleOutlineSnapshotLoadedSystem, _super);\n function SimpleOutlineSnapshotLoadedSystem() {\n var _this = _super.call(this, core_1.ComponentIds.IS_LOADING_SNAPSHOT_COMPONENT_ID) || this;\n _this.id = SimpleOutlineSnapshotLoadedSystem.systemID;\n _this.doingChangesOnComponent = [];\n _this.systemsAfterMe = null;\n _this.systemsBeforeMe = [\n core_1.ApiSystemIds.MODEL_LOADER_SYSTEM_ID\n ];\n _this.updateOutline = function (entity) {\n var _a;\n var hasModelLoadedFromInfo = entity.hasComponent(core_1.ComponentIds.LOADED_MODEL_INFO_COMPONENT_ID);\n if (hasModelLoadedFromInfo) {\n var viewerObject = (_a = entity.getComponent(core_1.ComponentIds.VIEWER_OBJECT_COMPONENT_ID)) === null || _a === void 0 ? void 0 : _a.viewerObject;\n viewerObject === null || viewerObject === void 0 ? void 0 : viewerObject.setOutlined(entity.hasComponent(core_1.ComponentIds.OUTLINED_COMPONENT_ID));\n }\n };\n return _this;\n }\n SimpleOutlineSnapshotLoadedSystem.prototype.onAddComponent = function (_entity, _newComponent) {\n // NIL\n };\n SimpleOutlineSnapshotLoadedSystem.prototype.onUpdateComponent = function (_entity, _oldComponent, _newComponent) {\n // NIL\n };\n SimpleOutlineSnapshotLoadedSystem.prototype.onRemoveComponent = function (root, _oldComponent) {\n var _this = this;\n // root is the root of the scene\n // Update the outline of all entities after a snapshot was loaded\n core_1.HierarchyUtils.hierarchy(root).forEach(function (entity) { return _this.updateOutline(entity); });\n };\n SimpleOutlineSnapshotLoadedSystem.systemID = 'SimpleOutlineSnapshotLoadedSystem';\n return SimpleOutlineSnapshotLoadedSystem;\n}(SystemBase_1.SystemBase));\nexports.SimpleOutlineSnapshotLoadedSystem = SimpleOutlineSnapshotLoadedSystem;\n//# sourceMappingURL=SimpleOutlineSnapshotLoadedSystem.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OutlineUtils = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar AddBlockingToAllModelsSystem_1 = require(\"./AddBlockingToAllModelsSystem\");\nvar SimpleOutlineAssemblySystem_1 = require(\"./SimpleOutlineAssemblySystem\");\nvar SimpleOutlineBlockingSystem_1 = require(\"./SimpleOutlineBlockingSystem\");\nvar SimpleOutlineModelSystem_1 = require(\"./SimpleOutlineModelSystem\");\nvar SimpleOutlineSelectedSystem_1 = require(\"./SimpleOutlineSelectedSystem\");\nvar SimpleOutlineSnapshotLoadedSystem_1 = require(\"./SimpleOutlineSnapshotLoadedSystem\");\n/**\n * Util class that helps our users with setting up the outline systems for their required\n * feature sets.\n */\nexports.OutlineUtils = {\n /**\n * Enables all systems necessary for showing outlines on selected entities. It will handle\n * automatically outline parts of assemblies if the assembly itself is outlined.\n *\n * Outlines will be shown as block outlines.\n *\n * @param entityManager The entity manager where the systems should be registered\n */\n enableOutlineSystem: function (entityManager) {\n new SimpleOutlineBlockingSystem_1.SimpleOutlineBlockingSystem().register(entityManager);\n new SimpleOutlineSelectedSystem_1.SimpleOutlineSelectedSystem().register(entityManager);\n new SimpleOutlineAssemblySystem_1.SimpleOutlineAssemblySystem().register(entityManager);\n new SimpleOutlineModelSystem_1.SimpleOutlineModelSystem().register(entityManager);\n new SimpleOutlineSnapshotLoadedSystem_1.SimpleOutlineSnapshotLoadedSystem().register(entityManager);\n },\n /**\n * This is similar to enableOutlineSystem, but assembly parts will not be automatically outlined.\n * @param entityManager\n */\n enableSimpleOutlineSystem: function (entityManager) {\n new SimpleOutlineBlockingSystem_1.SimpleOutlineBlockingSystem().register(entityManager);\n new SimpleOutlineSelectedSystem_1.SimpleOutlineSelectedSystem().register(entityManager);\n new SimpleOutlineModelSystem_1.SimpleOutlineModelSystem().register(entityManager);\n new SimpleOutlineSnapshotLoadedSystem_1.SimpleOutlineSnapshotLoadedSystem().register(entityManager);\n },\n /**\n * @deprecated The old outline system is deprecated, use setupOutlineSystem or setupSimpleOutlineSystem instead.\n */\n enableDeprecatedOutlineSystem: function (entityManager, coreServices) {\n var blockingSystem = new AddBlockingToAllModelsSystem_1.AddBlockingToAllModelsSystem();\n coreServices.entityManager.registerSystem(blockingSystem);\n blockingSystem.enable();\n var outlineSystem = new core_1.OutlineSystem();\n coreServices.entityManager.registerSystem(outlineSystem);\n }\n};\n//# sourceMappingURL=OutlineUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DragUtils = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar DRAG_RELATED_SYSTEM_IDS = [\n core_1.StlSystemIds.DRAG_SYSTEM_ID,\n core_1.StlSystemIds.LEGACY_CANVAS_TO_3D_DRAG_CONVERTER_SYSTEM,\n core_1.StlSystemIds.CANVAS_TO_3D_DRAG_CONVERTER_SYSTEM,\n];\n/**\n * Contains some handy functions for adding and removing dragging functionality to Core.\n */\nexports.DragUtils = {\n /**\n * Creates a drag system with auto-adapt functionality. If you need more control of the drag strategies,\n * you can create your own drag system and add the strategies you need.\n *\n * This function doesn't register the system with the entity manager.\n *\n * @param coreServices Core's services\n * @returns the newly created drag system.\n */\n createAutoAdaptDragSystem: function (coreServices) {\n return new core_1.DragSystem(coreServices, [\n new core_1.AutoAdaptDragStrategy(coreServices),\n new core_1.SnapClosestDragStrategy(coreServices),\n new core_1.SnapClosestWithSubConnectorsDragStrategy(coreServices),\n new core_1.ResolveCollisionsDragStrategy(core_1.ComponentIds.FRAME_COMPONENT_ID, coreServices),\n new core_1.SnapCardinalDirectionsDragStrategy(coreServices),\n ]);\n },\n /**\n * Creates a drag system without auto-adapt functionality. If you need more control of the drag strategies,\n * you can create your own drag system and add the strategies you need.\n *\n * This function doesn't register the system with the entity manager.\n *\n * @param coreServices Core's services\n * @returns the newly created drag system.\n */\n createStandardDragSystem: function (coreServices) {\n return new core_1.DragSystem(coreServices, [\n new core_1.SnapClosestDragStrategy(coreServices),\n new core_1.SnapClosestWithSubConnectorsDragStrategy(coreServices),\n new core_1.ResolveCollisionsDragStrategy(core_1.ComponentIds.FRAME_COMPONENT_ID, coreServices),\n new core_1.SnapCardinalDirectionsDragStrategy(coreServices),\n ]);\n },\n /**\n * Adds drag to Core. This includes creating and registering the drag system and all the drag support systems.\n * Will remove all drag related systems before installing the new ones.\n *\n * @param coreServices Core's services\n * @param withAutoAdapt whether to use auto-adapt functionality\n */\n addDrag: function (coreServices, withAutoAdapt) {\n this.removeDragSystems(coreServices);\n if (withAutoAdapt) {\n var dragSystem = this.createAutoAdaptDragSystem(coreServices);\n coreServices.entityManager.registerSystem(dragSystem);\n startNecessarySystemsForAutoAdapt(coreServices);\n var selector = new core_1.DragSurfaceCanHostWithAutoAdaptSelector(coreServices.entityManager);\n var projector = new core_1.AnyDragSurfaceProjector(coreServices, selector);\n var converterSystem = new core_1.CanvasTo3DDragConverterSystem(coreServices, projector);\n coreServices.entityManager.registerSystem(converterSystem);\n }\n else {\n var dragSystem = this.createStandardDragSystem(coreServices);\n coreServices.entityManager.registerSystem(dragSystem);\n var selector = new core_1.DragSurfaceCanHostSelector();\n var projector = new core_1.AnyDragSurfaceProjector(coreServices, selector);\n var converterSystem = new core_1.CanvasTo3DDragConverterSystem(coreServices, projector);\n coreServices.entityManager.registerSystem(converterSystem);\n }\n },\n /**\n * Adds legacy drag to Core. Will remove all drag related systems before installing the new ones.\n * You probably should move over to {@link addDrag} instead of using this function.\n *\n * @param coreServices Core's services\n * @param withAutoAdapt whether to use auto-adapt functionality\n */\n addLegacyDrag: function (coreServices, withAutoAdapt) {\n this.removeDragSystems(coreServices);\n if (withAutoAdapt) {\n var dragSystem = this.createAutoAdaptDragSystem(coreServices);\n coreServices.entityManager.registerSystem(dragSystem);\n startNecessarySystemsForAutoAdapt(coreServices);\n var selector = new core_1.DragSurfaceCanHostWithAutoAdaptSelector(coreServices.entityManager);\n var projector = new core_1.AnyDragSurfaceProjector(coreServices, selector);\n var converterSystem = new core_1.LegacyCanvasTo3DDragConverterSystem(coreServices, projector);\n coreServices.entityManager.registerSystem(converterSystem);\n }\n else {\n var dragSystem = this.createStandardDragSystem(coreServices);\n coreServices.entityManager.registerSystem(dragSystem);\n var selector = new core_1.DragSurfaceCanHostSelector();\n var projector = new core_1.AnyDragSurfaceProjector(coreServices, selector);\n var converterSystem = new core_1.LegacyCanvasTo3DDragConverterSystem(coreServices, projector);\n coreServices.entityManager.registerSystem(converterSystem);\n }\n },\n /**\n * Remove all drag related systems.\n * @param coreServices Core's services\n */\n removeDragSystems: function (coreServices) {\n var entityManager = coreServices.entityManager;\n entityManager\n .getSystemsRegistered()\n .filter(function (system) { return DRAG_RELATED_SYSTEM_IDS.includes(system.id); })\n .forEach(function (system) { return entityManager.unregisterSystem(system); });\n },\n};\nfunction startNecessarySystemsForAutoAdapt(_a) {\n var entityManager = _a.entityManager, productManager = _a.productManager;\n var system = entityManager\n .getSystemsRegistered()\n .find(function (system) { return system.id === core_1.StlSystemIds.AUTO_ADAPT_PRODUCT_SPECIFICATION_SYSTEM_ID; });\n if (!system) {\n var newSystem = new core_1.AutoAdaptProductSpecificationsSystem(productManager);\n entityManager.registerSystem(newSystem);\n }\n}\n//# sourceMappingURL=DragUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nclass _CodeOrName {\n}\nexports._CodeOrName = _CodeOrName;\nexports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;\nclass Name extends _CodeOrName {\n constructor(s) {\n super();\n if (!exports.IDENTIFIER.test(s))\n throw new Error(\"CodeGen: name must be a valid identifier\");\n this.str = s;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n return false;\n }\n get names() {\n return { [this.str]: 1 };\n }\n}\nexports.Name = Name;\nclass _Code extends _CodeOrName {\n constructor(code) {\n super();\n this._items = typeof code === \"string\" ? [code] : code;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n if (this._items.length > 1)\n return false;\n const item = this._items[0];\n return item === \"\" || item === '\"\"';\n }\n get str() {\n var _a;\n return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, \"\")));\n }\n get names() {\n var _a;\n return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => {\n if (c instanceof Name)\n names[c.str] = (names[c.str] || 0) + 1;\n return names;\n }, {})));\n }\n}\nexports._Code = _Code;\nexports.nil = new _Code(\"\");\nfunction _(strs, ...args) {\n const code = [strs[0]];\n let i = 0;\n while (i < args.length) {\n addCodeArg(code, args[i]);\n code.push(strs[++i]);\n }\n return new _Code(code);\n}\nexports._ = _;\nconst plus = new _Code(\"+\");\nfunction str(strs, ...args) {\n const expr = [safeStringify(strs[0])];\n let i = 0;\n while (i < args.length) {\n expr.push(plus);\n addCodeArg(expr, args[i]);\n expr.push(plus, safeStringify(strs[++i]));\n }\n optimize(expr);\n return new _Code(expr);\n}\nexports.str = str;\nfunction addCodeArg(code, arg) {\n if (arg instanceof _Code)\n code.push(...arg._items);\n else if (arg instanceof Name)\n code.push(arg);\n else\n code.push(interpolate(arg));\n}\nexports.addCodeArg = addCodeArg;\nfunction optimize(expr) {\n let i = 1;\n while (i < expr.length - 1) {\n if (expr[i] === plus) {\n const res = mergeExprItems(expr[i - 1], expr[i + 1]);\n if (res !== undefined) {\n expr.splice(i - 1, 3, res);\n continue;\n }\n expr[i++] = \"+\";\n }\n i++;\n }\n}\nfunction mergeExprItems(a, b) {\n if (b === '\"\"')\n return a;\n if (a === '\"\"')\n return b;\n if (typeof a == \"string\") {\n if (b instanceof Name || a[a.length - 1] !== '\"')\n return;\n if (typeof b != \"string\")\n return `${a.slice(0, -1)}${b}\"`;\n if (b[0] === '\"')\n return a.slice(0, -1) + b.slice(1);\n return;\n }\n if (typeof b == \"string\" && b[0] === '\"' && !(a instanceof Name))\n return `\"${a}${b.slice(1)}`;\n return;\n}\nfunction strConcat(c1, c2) {\n return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;\n}\nexports.strConcat = strConcat;\n// TODO do not allow arrays here\nfunction interpolate(x) {\n return typeof x == \"number\" || typeof x == \"boolean\" || x === null\n ? x\n : safeStringify(Array.isArray(x) ? x.join(\",\") : x);\n}\nfunction stringify(x) {\n return new _Code(safeStringify(x));\n}\nexports.stringify = stringify;\nfunction safeStringify(x) {\n return JSON.stringify(x)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\");\n}\nexports.safeStringify = safeStringify;\nfunction getProperty(key) {\n return typeof key == \"string\" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;\n}\nexports.getProperty = getProperty;\n//Does best effort to format the name properly\nfunction getEsmExportName(key) {\n if (typeof key == \"string\" && exports.IDENTIFIER.test(key)) {\n return new _Code(`${key}`);\n }\n throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);\n}\nexports.getEsmExportName = getEsmExportName;\nfunction regexpCode(rx) {\n return new _Code(rx.toString());\n}\nexports.regexpCode = regexpCode;\n//# sourceMappingURL=code.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;\nconst code_1 = require(\"./code\");\nclass ValueError extends Error {\n constructor(name) {\n super(`CodeGen: \"code\" for ${name} not defined`);\n this.value = name.value;\n }\n}\nvar UsedValueState;\n(function (UsedValueState) {\n UsedValueState[UsedValueState[\"Started\"] = 0] = \"Started\";\n UsedValueState[UsedValueState[\"Completed\"] = 1] = \"Completed\";\n})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));\nexports.varKinds = {\n const: new code_1.Name(\"const\"),\n let: new code_1.Name(\"let\"),\n var: new code_1.Name(\"var\"),\n};\nclass Scope {\n constructor({ prefixes, parent } = {}) {\n this._names = {};\n this._prefixes = prefixes;\n this._parent = parent;\n }\n toName(nameOrPrefix) {\n return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);\n }\n name(prefix) {\n return new code_1.Name(this._newName(prefix));\n }\n _newName(prefix) {\n const ng = this._names[prefix] || this._nameGroup(prefix);\n return `${prefix}${ng.index++}`;\n }\n _nameGroup(prefix) {\n var _a, _b;\n if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || (this._prefixes && !this._prefixes.has(prefix))) {\n throw new Error(`CodeGen: prefix \"${prefix}\" is not allowed in this scope`);\n }\n return (this._names[prefix] = { prefix, index: 0 });\n }\n}\nexports.Scope = Scope;\nclass ValueScopeName extends code_1.Name {\n constructor(prefix, nameStr) {\n super(nameStr);\n this.prefix = prefix;\n }\n setValue(value, { property, itemIndex }) {\n this.value = value;\n this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`;\n }\n}\nexports.ValueScopeName = ValueScopeName;\nconst line = (0, code_1._) `\\n`;\nclass ValueScope extends Scope {\n constructor(opts) {\n super(opts);\n this._values = {};\n this._scope = opts.scope;\n this.opts = { ...opts, _n: opts.lines ? line : code_1.nil };\n }\n get() {\n return this._scope;\n }\n name(prefix) {\n return new ValueScopeName(prefix, this._newName(prefix));\n }\n value(nameOrPrefix, value) {\n var _a;\n if (value.ref === undefined)\n throw new Error(\"CodeGen: ref must be passed in value\");\n const name = this.toName(nameOrPrefix);\n const { prefix } = name;\n const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;\n let vs = this._values[prefix];\n if (vs) {\n const _name = vs.get(valueKey);\n if (_name)\n return _name;\n }\n else {\n vs = this._values[prefix] = new Map();\n }\n vs.set(valueKey, name);\n const s = this._scope[prefix] || (this._scope[prefix] = []);\n const itemIndex = s.length;\n s[itemIndex] = value.ref;\n name.setValue(value, { property: prefix, itemIndex });\n return name;\n }\n getValue(prefix, keyOrRef) {\n const vs = this._values[prefix];\n if (!vs)\n return;\n return vs.get(keyOrRef);\n }\n scopeRefs(scopeName, values = this._values) {\n return this._reduceValues(values, (name) => {\n if (name.scopePath === undefined)\n throw new Error(`CodeGen: name \"${name}\" has no value`);\n return (0, code_1._) `${scopeName}${name.scopePath}`;\n });\n }\n scopeCode(values = this._values, usedValues, getCode) {\n return this._reduceValues(values, (name) => {\n if (name.value === undefined)\n throw new Error(`CodeGen: name \"${name}\" has no value`);\n return name.value.code;\n }, usedValues, getCode);\n }\n _reduceValues(values, valueCode, usedValues = {}, getCode) {\n let code = code_1.nil;\n for (const prefix in values) {\n const vs = values[prefix];\n if (!vs)\n continue;\n const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map());\n vs.forEach((name) => {\n if (nameSet.has(name))\n return;\n nameSet.set(name, UsedValueState.Started);\n let c = valueCode(name);\n if (c) {\n const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;\n code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`;\n }\n else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) {\n code = (0, code_1._) `${code}${c}${this.opts._n}`;\n }\n else {\n throw new ValueError(name);\n }\n nameSet.set(name, UsedValueState.Completed);\n });\n }\n return code;\n }\n}\nexports.ValueScope = ValueScope;\n//# sourceMappingURL=scope.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;\nconst code_1 = require(\"./code\");\nconst scope_1 = require(\"./scope\");\nvar code_2 = require(\"./code\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return code_2._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return code_2.str; } });\nObject.defineProperty(exports, \"strConcat\", { enumerable: true, get: function () { return code_2.strConcat; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return code_2.nil; } });\nObject.defineProperty(exports, \"getProperty\", { enumerable: true, get: function () { return code_2.getProperty; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return code_2.stringify; } });\nObject.defineProperty(exports, \"regexpCode\", { enumerable: true, get: function () { return code_2.regexpCode; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return code_2.Name; } });\nvar scope_2 = require(\"./scope\");\nObject.defineProperty(exports, \"Scope\", { enumerable: true, get: function () { return scope_2.Scope; } });\nObject.defineProperty(exports, \"ValueScope\", { enumerable: true, get: function () { return scope_2.ValueScope; } });\nObject.defineProperty(exports, \"ValueScopeName\", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });\nObject.defineProperty(exports, \"varKinds\", { enumerable: true, get: function () { return scope_2.varKinds; } });\nexports.operators = {\n GT: new code_1._Code(\">\"),\n GTE: new code_1._Code(\">=\"),\n LT: new code_1._Code(\"<\"),\n LTE: new code_1._Code(\"<=\"),\n EQ: new code_1._Code(\"===\"),\n NEQ: new code_1._Code(\"!==\"),\n NOT: new code_1._Code(\"!\"),\n OR: new code_1._Code(\"||\"),\n AND: new code_1._Code(\"&&\"),\n ADD: new code_1._Code(\"+\"),\n};\nclass Node {\n optimizeNodes() {\n return this;\n }\n optimizeNames(_names, _constants) {\n return this;\n }\n}\nclass Def extends Node {\n constructor(varKind, name, rhs) {\n super();\n this.varKind = varKind;\n this.name = name;\n this.rhs = rhs;\n }\n render({ es5, _n }) {\n const varKind = es5 ? scope_1.varKinds.var : this.varKind;\n const rhs = this.rhs === undefined ? \"\" : ` = ${this.rhs}`;\n return `${varKind} ${this.name}${rhs};` + _n;\n }\n optimizeNames(names, constants) {\n if (!names[this.name.str])\n return;\n if (this.rhs)\n this.rhs = optimizeExpr(this.rhs, names, constants);\n return this;\n }\n get names() {\n return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};\n }\n}\nclass Assign extends Node {\n constructor(lhs, rhs, sideEffects) {\n super();\n this.lhs = lhs;\n this.rhs = rhs;\n this.sideEffects = sideEffects;\n }\n render({ _n }) {\n return `${this.lhs} = ${this.rhs};` + _n;\n }\n optimizeNames(names, constants) {\n if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)\n return;\n this.rhs = optimizeExpr(this.rhs, names, constants);\n return this;\n }\n get names() {\n const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };\n return addExprNames(names, this.rhs);\n }\n}\nclass AssignOp extends Assign {\n constructor(lhs, op, rhs, sideEffects) {\n super(lhs, rhs, sideEffects);\n this.op = op;\n }\n render({ _n }) {\n return `${this.lhs} ${this.op}= ${this.rhs};` + _n;\n }\n}\nclass Label extends Node {\n constructor(label) {\n super();\n this.label = label;\n this.names = {};\n }\n render({ _n }) {\n return `${this.label}:` + _n;\n }\n}\nclass Break extends Node {\n constructor(label) {\n super();\n this.label = label;\n this.names = {};\n }\n render({ _n }) {\n const label = this.label ? ` ${this.label}` : \"\";\n return `break${label};` + _n;\n }\n}\nclass Throw extends Node {\n constructor(error) {\n super();\n this.error = error;\n }\n render({ _n }) {\n return `throw ${this.error};` + _n;\n }\n get names() {\n return this.error.names;\n }\n}\nclass AnyCode extends Node {\n constructor(code) {\n super();\n this.code = code;\n }\n render({ _n }) {\n return `${this.code};` + _n;\n }\n optimizeNodes() {\n return `${this.code}` ? this : undefined;\n }\n optimizeNames(names, constants) {\n this.code = optimizeExpr(this.code, names, constants);\n return this;\n }\n get names() {\n return this.code instanceof code_1._CodeOrName ? this.code.names : {};\n }\n}\nclass ParentNode extends Node {\n constructor(nodes = []) {\n super();\n this.nodes = nodes;\n }\n render(opts) {\n return this.nodes.reduce((code, n) => code + n.render(opts), \"\");\n }\n optimizeNodes() {\n const { nodes } = this;\n let i = nodes.length;\n while (i--) {\n const n = nodes[i].optimizeNodes();\n if (Array.isArray(n))\n nodes.splice(i, 1, ...n);\n else if (n)\n nodes[i] = n;\n else\n nodes.splice(i, 1);\n }\n return nodes.length > 0 ? this : undefined;\n }\n optimizeNames(names, constants) {\n const { nodes } = this;\n let i = nodes.length;\n while (i--) {\n // iterating backwards improves 1-pass optimization\n const n = nodes[i];\n if (n.optimizeNames(names, constants))\n continue;\n subtractNames(names, n.names);\n nodes.splice(i, 1);\n }\n return nodes.length > 0 ? this : undefined;\n }\n get names() {\n return this.nodes.reduce((names, n) => addNames(names, n.names), {});\n }\n}\nclass BlockNode extends ParentNode {\n render(opts) {\n return \"{\" + opts._n + super.render(opts) + \"}\" + opts._n;\n }\n}\nclass Root extends ParentNode {\n}\nclass Else extends BlockNode {\n}\nElse.kind = \"else\";\nclass If extends BlockNode {\n constructor(condition, nodes) {\n super(nodes);\n this.condition = condition;\n }\n render(opts) {\n let code = `if(${this.condition})` + super.render(opts);\n if (this.else)\n code += \"else \" + this.else.render(opts);\n return code;\n }\n optimizeNodes() {\n super.optimizeNodes();\n const cond = this.condition;\n if (cond === true)\n return this.nodes; // else is ignored here\n let e = this.else;\n if (e) {\n const ns = e.optimizeNodes();\n e = this.else = Array.isArray(ns) ? new Else(ns) : ns;\n }\n if (e) {\n if (cond === false)\n return e instanceof If ? e : e.nodes;\n if (this.nodes.length)\n return this;\n return new If(not(cond), e instanceof If ? [e] : e.nodes);\n }\n if (cond === false || !this.nodes.length)\n return undefined;\n return this;\n }\n optimizeNames(names, constants) {\n var _a;\n this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n if (!(super.optimizeNames(names, constants) || this.else))\n return;\n this.condition = optimizeExpr(this.condition, names, constants);\n return this;\n }\n get names() {\n const names = super.names;\n addExprNames(names, this.condition);\n if (this.else)\n addNames(names, this.else.names);\n return names;\n }\n}\nIf.kind = \"if\";\nclass For extends BlockNode {\n}\nFor.kind = \"for\";\nclass ForLoop extends For {\n constructor(iteration) {\n super();\n this.iteration = iteration;\n }\n render(opts) {\n return `for(${this.iteration})` + super.render(opts);\n }\n optimizeNames(names, constants) {\n if (!super.optimizeNames(names, constants))\n return;\n this.iteration = optimizeExpr(this.iteration, names, constants);\n return this;\n }\n get names() {\n return addNames(super.names, this.iteration.names);\n }\n}\nclass ForRange extends For {\n constructor(varKind, name, from, to) {\n super();\n this.varKind = varKind;\n this.name = name;\n this.from = from;\n this.to = to;\n }\n render(opts) {\n const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;\n const { name, from, to } = this;\n return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);\n }\n get names() {\n const names = addExprNames(super.names, this.from);\n return addExprNames(names, this.to);\n }\n}\nclass ForIter extends For {\n constructor(loop, varKind, name, iterable) {\n super();\n this.loop = loop;\n this.varKind = varKind;\n this.name = name;\n this.iterable = iterable;\n }\n render(opts) {\n return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);\n }\n optimizeNames(names, constants) {\n if (!super.optimizeNames(names, constants))\n return;\n this.iterable = optimizeExpr(this.iterable, names, constants);\n return this;\n }\n get names() {\n return addNames(super.names, this.iterable.names);\n }\n}\nclass Func extends BlockNode {\n constructor(name, args, async) {\n super();\n this.name = name;\n this.args = args;\n this.async = async;\n }\n render(opts) {\n const _async = this.async ? \"async \" : \"\";\n return `${_async}function ${this.name}(${this.args})` + super.render(opts);\n }\n}\nFunc.kind = \"func\";\nclass Return extends ParentNode {\n render(opts) {\n return \"return \" + super.render(opts);\n }\n}\nReturn.kind = \"return\";\nclass Try extends BlockNode {\n render(opts) {\n let code = \"try\" + super.render(opts);\n if (this.catch)\n code += this.catch.render(opts);\n if (this.finally)\n code += this.finally.render(opts);\n return code;\n }\n optimizeNodes() {\n var _a, _b;\n super.optimizeNodes();\n (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();\n (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();\n return this;\n }\n optimizeNames(names, constants) {\n var _a, _b;\n super.optimizeNames(names, constants);\n (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);\n return this;\n }\n get names() {\n const names = super.names;\n if (this.catch)\n addNames(names, this.catch.names);\n if (this.finally)\n addNames(names, this.finally.names);\n return names;\n }\n}\nclass Catch extends BlockNode {\n constructor(error) {\n super();\n this.error = error;\n }\n render(opts) {\n return `catch(${this.error})` + super.render(opts);\n }\n}\nCatch.kind = \"catch\";\nclass Finally extends BlockNode {\n render(opts) {\n return \"finally\" + super.render(opts);\n }\n}\nFinally.kind = \"finally\";\nclass CodeGen {\n constructor(extScope, opts = {}) {\n this._values = {};\n this._blockStarts = [];\n this._constants = {};\n this.opts = { ...opts, _n: opts.lines ? \"\\n\" : \"\" };\n this._extScope = extScope;\n this._scope = new scope_1.Scope({ parent: extScope });\n this._nodes = [new Root()];\n }\n toString() {\n return this._root.render(this.opts);\n }\n // returns unique name in the internal scope\n name(prefix) {\n return this._scope.name(prefix);\n }\n // reserves unique name in the external scope\n scopeName(prefix) {\n return this._extScope.name(prefix);\n }\n // reserves unique name in the external scope and assigns value to it\n scopeValue(prefixOrName, value) {\n const name = this._extScope.value(prefixOrName, value);\n const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set());\n vs.add(name);\n return name;\n }\n getScopeValue(prefix, keyOrRef) {\n return this._extScope.getValue(prefix, keyOrRef);\n }\n // return code that assigns values in the external scope to the names that are used internally\n // (same names that were returned by gen.scopeName or gen.scopeValue)\n scopeRefs(scopeName) {\n return this._extScope.scopeRefs(scopeName, this._values);\n }\n scopeCode() {\n return this._extScope.scopeCode(this._values);\n }\n _def(varKind, nameOrPrefix, rhs, constant) {\n const name = this._scope.toName(nameOrPrefix);\n if (rhs !== undefined && constant)\n this._constants[name.str] = rhs;\n this._leafNode(new Def(varKind, name, rhs));\n return name;\n }\n // `const` declaration (`var` in es5 mode)\n const(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);\n }\n // `let` declaration with optional assignment (`var` in es5 mode)\n let(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);\n }\n // `var` declaration with optional assignment\n var(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);\n }\n // assignment code\n assign(lhs, rhs, sideEffects) {\n return this._leafNode(new Assign(lhs, rhs, sideEffects));\n }\n // `+=` code\n add(lhs, rhs) {\n return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));\n }\n // appends passed SafeExpr to code or executes Block\n code(c) {\n if (typeof c == \"function\")\n c();\n else if (c !== code_1.nil)\n this._leafNode(new AnyCode(c));\n return this;\n }\n // returns code for object literal for the passed argument list of key-value pairs\n object(...keyValues) {\n const code = [\"{\"];\n for (const [key, value] of keyValues) {\n if (code.length > 1)\n code.push(\",\");\n code.push(key);\n if (key !== value || this.opts.es5) {\n code.push(\":\");\n (0, code_1.addCodeArg)(code, value);\n }\n }\n code.push(\"}\");\n return new code_1._Code(code);\n }\n // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)\n if(condition, thenBody, elseBody) {\n this._blockNode(new If(condition));\n if (thenBody && elseBody) {\n this.code(thenBody).else().code(elseBody).endIf();\n }\n else if (thenBody) {\n this.code(thenBody).endIf();\n }\n else if (elseBody) {\n throw new Error('CodeGen: \"else\" body without \"then\" body');\n }\n return this;\n }\n // `else if` clause - invalid without `if` or after `else` clauses\n elseIf(condition) {\n return this._elseNode(new If(condition));\n }\n // `else` clause - only valid after `if` or `else if` clauses\n else() {\n return this._elseNode(new Else());\n }\n // end `if` statement (needed if gen.if was used only with condition)\n endIf() {\n return this._endBlockNode(If, Else);\n }\n _for(node, forBody) {\n this._blockNode(node);\n if (forBody)\n this.code(forBody).endFor();\n return this;\n }\n // a generic `for` clause (or statement if `forBody` is passed)\n for(iteration, forBody) {\n return this._for(new ForLoop(iteration), forBody);\n }\n // `for` statement for a range of values\n forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {\n const name = this._scope.toName(nameOrPrefix);\n return this._for(new ForRange(varKind, name, from, to), () => forBody(name));\n }\n // `for-of` statement (in es5 mode replace with a normal for loop)\n forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {\n const name = this._scope.toName(nameOrPrefix);\n if (this.opts.es5) {\n const arr = iterable instanceof code_1.Name ? iterable : this.var(\"_arr\", iterable);\n return this.forRange(\"_i\", 0, (0, code_1._) `${arr}.length`, (i) => {\n this.var(name, (0, code_1._) `${arr}[${i}]`);\n forBody(name);\n });\n }\n return this._for(new ForIter(\"of\", varKind, name, iterable), () => forBody(name));\n }\n // `for-in` statement.\n // With option `ownProperties` replaced with a `for-of` loop for object keys\n forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {\n if (this.opts.ownProperties) {\n return this.forOf(nameOrPrefix, (0, code_1._) `Object.keys(${obj})`, forBody);\n }\n const name = this._scope.toName(nameOrPrefix);\n return this._for(new ForIter(\"in\", varKind, name, obj), () => forBody(name));\n }\n // end `for` loop\n endFor() {\n return this._endBlockNode(For);\n }\n // `label` statement\n label(label) {\n return this._leafNode(new Label(label));\n }\n // `break` statement\n break(label) {\n return this._leafNode(new Break(label));\n }\n // `return` statement\n return(value) {\n const node = new Return();\n this._blockNode(node);\n this.code(value);\n if (node.nodes.length !== 1)\n throw new Error('CodeGen: \"return\" should have one node');\n return this._endBlockNode(Return);\n }\n // `try` statement\n try(tryBody, catchCode, finallyCode) {\n if (!catchCode && !finallyCode)\n throw new Error('CodeGen: \"try\" without \"catch\" and \"finally\"');\n const node = new Try();\n this._blockNode(node);\n this.code(tryBody);\n if (catchCode) {\n const error = this.name(\"e\");\n this._currNode = node.catch = new Catch(error);\n catchCode(error);\n }\n if (finallyCode) {\n this._currNode = node.finally = new Finally();\n this.code(finallyCode);\n }\n return this._endBlockNode(Catch, Finally);\n }\n // `throw` statement\n throw(error) {\n return this._leafNode(new Throw(error));\n }\n // start self-balancing block\n block(body, nodeCount) {\n this._blockStarts.push(this._nodes.length);\n if (body)\n this.code(body).endBlock(nodeCount);\n return this;\n }\n // end the current self-balancing block\n endBlock(nodeCount) {\n const len = this._blockStarts.pop();\n if (len === undefined)\n throw new Error(\"CodeGen: not in self-balancing block\");\n const toClose = this._nodes.length - len;\n if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) {\n throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);\n }\n this._nodes.length = len;\n return this;\n }\n // `function` heading (or definition if funcBody is passed)\n func(name, args = code_1.nil, async, funcBody) {\n this._blockNode(new Func(name, args, async));\n if (funcBody)\n this.code(funcBody).endFunc();\n return this;\n }\n // end function definition\n endFunc() {\n return this._endBlockNode(Func);\n }\n optimize(n = 1) {\n while (n-- > 0) {\n this._root.optimizeNodes();\n this._root.optimizeNames(this._root.names, this._constants);\n }\n }\n _leafNode(node) {\n this._currNode.nodes.push(node);\n return this;\n }\n _blockNode(node) {\n this._currNode.nodes.push(node);\n this._nodes.push(node);\n }\n _endBlockNode(N1, N2) {\n const n = this._currNode;\n if (n instanceof N1 || (N2 && n instanceof N2)) {\n this._nodes.pop();\n return this;\n }\n throw new Error(`CodeGen: not in block \"${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}\"`);\n }\n _elseNode(node) {\n const n = this._currNode;\n if (!(n instanceof If)) {\n throw new Error('CodeGen: \"else\" without \"if\"');\n }\n this._currNode = n.else = node;\n return this;\n }\n get _root() {\n return this._nodes[0];\n }\n get _currNode() {\n const ns = this._nodes;\n return ns[ns.length - 1];\n }\n set _currNode(node) {\n const ns = this._nodes;\n ns[ns.length - 1] = node;\n }\n}\nexports.CodeGen = CodeGen;\nfunction addNames(names, from) {\n for (const n in from)\n names[n] = (names[n] || 0) + (from[n] || 0);\n return names;\n}\nfunction addExprNames(names, from) {\n return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;\n}\nfunction optimizeExpr(expr, names, constants) {\n if (expr instanceof code_1.Name)\n return replaceName(expr);\n if (!canOptimize(expr))\n return expr;\n return new code_1._Code(expr._items.reduce((items, c) => {\n if (c instanceof code_1.Name)\n c = replaceName(c);\n if (c instanceof code_1._Code)\n items.push(...c._items);\n else\n items.push(c);\n return items;\n }, []));\n function replaceName(n) {\n const c = constants[n.str];\n if (c === undefined || names[n.str] !== 1)\n return n;\n delete names[n.str];\n return c;\n }\n function canOptimize(e) {\n return (e instanceof code_1._Code &&\n e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined));\n }\n}\nfunction subtractNames(names, from) {\n for (const n in from)\n names[n] = (names[n] || 0) - (from[n] || 0);\n}\nfunction not(x) {\n return typeof x == \"boolean\" || typeof x == \"number\" || x === null ? !x : (0, code_1._) `!${par(x)}`;\n}\nexports.not = not;\nconst andCode = mappend(exports.operators.AND);\n// boolean AND (&&) expression with the passed arguments\nfunction and(...args) {\n return args.reduce(andCode);\n}\nexports.and = and;\nconst orCode = mappend(exports.operators.OR);\n// boolean OR (||) expression with the passed arguments\nfunction or(...args) {\n return args.reduce(orCode);\n}\nexports.or = or;\nfunction mappend(op) {\n return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`);\n}\nfunction par(x) {\n return x instanceof code_1.Name ? x : (0, code_1._) `(${x})`;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;\nconst codegen_1 = require(\"./codegen\");\nconst code_1 = require(\"./codegen/code\");\n// TODO refactor to use Set\nfunction toHash(arr) {\n const hash = {};\n for (const item of arr)\n hash[item] = true;\n return hash;\n}\nexports.toHash = toHash;\nfunction alwaysValidSchema(it, schema) {\n if (typeof schema == \"boolean\")\n return schema;\n if (Object.keys(schema).length === 0)\n return true;\n checkUnknownRules(it, schema);\n return !schemaHasRules(schema, it.self.RULES.all);\n}\nexports.alwaysValidSchema = alwaysValidSchema;\nfunction checkUnknownRules(it, schema = it.schema) {\n const { opts, self } = it;\n if (!opts.strictSchema)\n return;\n if (typeof schema === \"boolean\")\n return;\n const rules = self.RULES.keywords;\n for (const key in schema) {\n if (!rules[key])\n checkStrictMode(it, `unknown keyword: \"${key}\"`);\n }\n}\nexports.checkUnknownRules = checkUnknownRules;\nfunction schemaHasRules(schema, rules) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (rules[key])\n return true;\n return false;\n}\nexports.schemaHasRules = schemaHasRules;\nfunction schemaHasRulesButRef(schema, RULES) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (key !== \"$ref\" && RULES.all[key])\n return true;\n return false;\n}\nexports.schemaHasRulesButRef = schemaHasRulesButRef;\nfunction schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {\n if (!$data) {\n if (typeof schema == \"number\" || typeof schema == \"boolean\")\n return schema;\n if (typeof schema == \"string\")\n return (0, codegen_1._) `${schema}`;\n }\n return (0, codegen_1._) `${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;\n}\nexports.schemaRefOrVal = schemaRefOrVal;\nfunction unescapeFragment(str) {\n return unescapeJsonPointer(decodeURIComponent(str));\n}\nexports.unescapeFragment = unescapeFragment;\nfunction escapeFragment(str) {\n return encodeURIComponent(escapeJsonPointer(str));\n}\nexports.escapeFragment = escapeFragment;\nfunction escapeJsonPointer(str) {\n if (typeof str == \"number\")\n return `${str}`;\n return str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\nexports.escapeJsonPointer = escapeJsonPointer;\nfunction unescapeJsonPointer(str) {\n return str.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n}\nexports.unescapeJsonPointer = unescapeJsonPointer;\nfunction eachItem(xs, f) {\n if (Array.isArray(xs)) {\n for (const x of xs)\n f(x);\n }\n else {\n f(xs);\n }\n}\nexports.eachItem = eachItem;\nfunction makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName, }) {\n return (gen, from, to, toName) => {\n const res = to === undefined\n ? from\n : to instanceof codegen_1.Name\n ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)\n : from instanceof codegen_1.Name\n ? (mergeToName(gen, to, from), from)\n : mergeValues(from, to);\n return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;\n };\n}\nexports.mergeEvaluated = {\n props: makeMergeEvaluated({\n mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => {\n gen.if((0, codegen_1._) `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._) `${to} || {}`).code((0, codegen_1._) `Object.assign(${to}, ${from})`));\n }),\n mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => {\n if (from === true) {\n gen.assign(to, true);\n }\n else {\n gen.assign(to, (0, codegen_1._) `${to} || {}`);\n setEvaluated(gen, to, from);\n }\n }),\n mergeValues: (from, to) => (from === true ? true : { ...from, ...to }),\n resultToName: evaluatedPropsToName,\n }),\n items: makeMergeEvaluated({\n mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._) `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),\n mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._) `${to} > ${from} ? ${to} : ${from}`)),\n mergeValues: (from, to) => (from === true ? true : Math.max(from, to)),\n resultToName: (gen, items) => gen.var(\"items\", items),\n }),\n};\nfunction evaluatedPropsToName(gen, ps) {\n if (ps === true)\n return gen.var(\"props\", true);\n const props = gen.var(\"props\", (0, codegen_1._) `{}`);\n if (ps !== undefined)\n setEvaluated(gen, props, ps);\n return props;\n}\nexports.evaluatedPropsToName = evaluatedPropsToName;\nfunction setEvaluated(gen, props, ps) {\n Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._) `${props}${(0, codegen_1.getProperty)(p)}`, true));\n}\nexports.setEvaluated = setEvaluated;\nconst snippets = {};\nfunction useFunc(gen, f) {\n return gen.scopeValue(\"func\", {\n ref: f,\n code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)),\n });\n}\nexports.useFunc = useFunc;\nvar Type;\n(function (Type) {\n Type[Type[\"Num\"] = 0] = \"Num\";\n Type[Type[\"Str\"] = 1] = \"Str\";\n})(Type || (exports.Type = Type = {}));\nfunction getErrorPath(dataProp, dataPropType, jsPropertySyntax) {\n // let path\n if (dataProp instanceof codegen_1.Name) {\n const isNumber = dataPropType === Type.Num;\n return jsPropertySyntax\n ? isNumber\n ? (0, codegen_1._) `\"[\" + ${dataProp} + \"]\"`\n : (0, codegen_1._) `\"['\" + ${dataProp} + \"']\"`\n : isNumber\n ? (0, codegen_1._) `\"/\" + ${dataProp}`\n : (0, codegen_1._) `\"/\" + ${dataProp}.replace(/~/g, \"~0\").replace(/\\\\//g, \"~1\")`; // TODO maybe use global escapePointer\n }\n return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : \"/\" + escapeJsonPointer(dataProp);\n}\nexports.getErrorPath = getErrorPath;\nfunction checkStrictMode(it, msg, mode = it.opts.strictSchema) {\n if (!mode)\n return;\n msg = `strict mode: ${msg}`;\n if (mode === true)\n throw new Error(msg);\n it.self.logger.warn(msg);\n}\nexports.checkStrictMode = checkStrictMode;\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"./codegen\");\nconst names = {\n // validation function arguments\n data: new codegen_1.Name(\"data\"), // data passed to validation function\n // args passed from referencing schema\n valCxt: new codegen_1.Name(\"valCxt\"), // validation/data context - should not be used directly, it is destructured to the names below\n instancePath: new codegen_1.Name(\"instancePath\"),\n parentData: new codegen_1.Name(\"parentData\"),\n parentDataProperty: new codegen_1.Name(\"parentDataProperty\"),\n rootData: new codegen_1.Name(\"rootData\"), // root data - same as the data passed to the first/top validation function\n dynamicAnchors: new codegen_1.Name(\"dynamicAnchors\"), // used to support recursiveRef and dynamicRef\n // function scoped variables\n vErrors: new codegen_1.Name(\"vErrors\"), // null or array of validation errors\n errors: new codegen_1.Name(\"errors\"), // counter of validation errors\n this: new codegen_1.Name(\"this\"),\n // \"globals\"\n self: new codegen_1.Name(\"self\"),\n scope: new codegen_1.Name(\"scope\"),\n // JTD serialize/parse name for JSON string and position\n json: new codegen_1.Name(\"json\"),\n jsonPos: new codegen_1.Name(\"jsonPos\"),\n jsonLen: new codegen_1.Name(\"jsonLen\"),\n jsonPart: new codegen_1.Name(\"jsonPart\"),\n};\nexports.default = names;\n//# sourceMappingURL=names.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;\nconst codegen_1 = require(\"./codegen\");\nconst util_1 = require(\"./util\");\nconst names_1 = require(\"./names\");\nexports.keywordError = {\n message: ({ keyword }) => (0, codegen_1.str) `must pass \"${keyword}\" keyword validation`,\n};\nexports.keyword$DataError = {\n message: ({ keyword, schemaType }) => schemaType\n ? (0, codegen_1.str) `\"${keyword}\" keyword must be ${schemaType} ($data)`\n : (0, codegen_1.str) `\"${keyword}\" keyword is invalid ($data)`,\n};\nfunction reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {\n const { it } = cxt;\n const { gen, compositeRule, allErrors } = it;\n const errObj = errorObjectCode(cxt, error, errorPaths);\n if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : (compositeRule || allErrors)) {\n addError(gen, errObj);\n }\n else {\n returnErrors(it, (0, codegen_1._) `[${errObj}]`);\n }\n}\nexports.reportError = reportError;\nfunction reportExtraError(cxt, error = exports.keywordError, errorPaths) {\n const { it } = cxt;\n const { gen, compositeRule, allErrors } = it;\n const errObj = errorObjectCode(cxt, error, errorPaths);\n addError(gen, errObj);\n if (!(compositeRule || allErrors)) {\n returnErrors(it, names_1.default.vErrors);\n }\n}\nexports.reportExtraError = reportExtraError;\nfunction resetErrorsCount(gen, errsCount) {\n gen.assign(names_1.default.errors, errsCount);\n gen.if((0, codegen_1._) `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._) `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));\n}\nexports.resetErrorsCount = resetErrorsCount;\nfunction extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) {\n /* istanbul ignore if */\n if (errsCount === undefined)\n throw new Error(\"ajv implementation error\");\n const err = gen.name(\"err\");\n gen.forRange(\"i\", errsCount, names_1.default.errors, (i) => {\n gen.const(err, (0, codegen_1._) `${names_1.default.vErrors}[${i}]`);\n gen.if((0, codegen_1._) `${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._) `${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));\n gen.assign((0, codegen_1._) `${err}.schemaPath`, (0, codegen_1.str) `${it.errSchemaPath}/${keyword}`);\n if (it.opts.verbose) {\n gen.assign((0, codegen_1._) `${err}.schema`, schemaValue);\n gen.assign((0, codegen_1._) `${err}.data`, data);\n }\n });\n}\nexports.extendErrors = extendErrors;\nfunction addError(gen, errObj) {\n const err = gen.const(\"err\", errObj);\n gen.if((0, codegen_1._) `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._) `[${err}]`), (0, codegen_1._) `${names_1.default.vErrors}.push(${err})`);\n gen.code((0, codegen_1._) `${names_1.default.errors}++`);\n}\nfunction returnErrors(it, errs) {\n const { gen, validateName, schemaEnv } = it;\n if (schemaEnv.$async) {\n gen.throw((0, codegen_1._) `new ${it.ValidationError}(${errs})`);\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, errs);\n gen.return(false);\n }\n}\nconst E = {\n keyword: new codegen_1.Name(\"keyword\"),\n schemaPath: new codegen_1.Name(\"schemaPath\"), // also used in JTD errors\n params: new codegen_1.Name(\"params\"),\n propertyName: new codegen_1.Name(\"propertyName\"),\n message: new codegen_1.Name(\"message\"),\n schema: new codegen_1.Name(\"schema\"),\n parentSchema: new codegen_1.Name(\"parentSchema\"),\n};\nfunction errorObjectCode(cxt, error, errorPaths) {\n const { createErrors } = cxt.it;\n if (createErrors === false)\n return (0, codegen_1._) `{}`;\n return errorObject(cxt, error, errorPaths);\n}\nfunction errorObject(cxt, error, errorPaths = {}) {\n const { gen, it } = cxt;\n const keyValues = [\n errorInstancePath(it, errorPaths),\n errorSchemaPath(cxt, errorPaths),\n ];\n extraErrorProps(cxt, error, keyValues);\n return gen.object(...keyValues);\n}\nfunction errorInstancePath({ errorPath }, { instancePath }) {\n const instPath = instancePath\n ? (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}`\n : errorPath;\n return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];\n}\nfunction errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {\n let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str) `${errSchemaPath}/${keyword}`;\n if (schemaPath) {\n schPath = (0, codegen_1.str) `${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;\n }\n return [E.schemaPath, schPath];\n}\nfunction extraErrorProps(cxt, { params, message }, keyValues) {\n const { keyword, data, schemaValue, it } = cxt;\n const { opts, propertyName, topSchemaRef, schemaPath } = it;\n keyValues.push([E.keyword, keyword], [E.params, typeof params == \"function\" ? params(cxt) : params || (0, codegen_1._) `{}`]);\n if (opts.messages) {\n keyValues.push([E.message, typeof message == \"function\" ? message(cxt) : message]);\n }\n if (opts.verbose) {\n keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._) `${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);\n }\n if (propertyName)\n keyValues.push([E.propertyName, propertyName]);\n}\n//# sourceMappingURL=errors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;\nconst errors_1 = require(\"../errors\");\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst boolError = {\n message: \"boolean schema is false\",\n};\nfunction topBoolOrEmptySchema(it) {\n const { gen, schema, validateName } = it;\n if (schema === false) {\n falseSchemaError(it, false);\n }\n else if (typeof schema == \"object\" && schema.$async === true) {\n gen.return(names_1.default.data);\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, null);\n gen.return(true);\n }\n}\nexports.topBoolOrEmptySchema = topBoolOrEmptySchema;\nfunction boolOrEmptySchema(it, valid) {\n const { gen, schema } = it;\n if (schema === false) {\n gen.var(valid, false); // TODO var\n falseSchemaError(it);\n }\n else {\n gen.var(valid, true); // TODO var\n }\n}\nexports.boolOrEmptySchema = boolOrEmptySchema;\nfunction falseSchemaError(it, overrideAllErrors) {\n const { gen, data } = it;\n // TODO maybe some other interface should be used for non-keyword validation errors...\n const cxt = {\n gen,\n keyword: \"false schema\",\n data,\n schema: false,\n schemaCode: false,\n schemaValue: false,\n params: {},\n it,\n };\n (0, errors_1.reportError)(cxt, boolError, undefined, overrideAllErrors);\n}\n//# sourceMappingURL=boolSchema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRules = exports.isJSONType = void 0;\nconst _jsonTypes = [\"string\", \"number\", \"integer\", \"boolean\", \"null\", \"object\", \"array\"];\nconst jsonTypes = new Set(_jsonTypes);\nfunction isJSONType(x) {\n return typeof x == \"string\" && jsonTypes.has(x);\n}\nexports.isJSONType = isJSONType;\nfunction getRules() {\n const groups = {\n number: { type: \"number\", rules: [] },\n string: { type: \"string\", rules: [] },\n array: { type: \"array\", rules: [] },\n object: { type: \"object\", rules: [] },\n };\n return {\n types: { ...groups, integer: true, boolean: true, null: true },\n rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object],\n post: { rules: [] },\n all: {},\n keywords: {},\n };\n}\nexports.getRules = getRules;\n//# sourceMappingURL=rules.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;\nfunction schemaHasRulesForType({ schema, self }, type) {\n const group = self.RULES.types[type];\n return group && group !== true && shouldUseGroup(schema, group);\n}\nexports.schemaHasRulesForType = schemaHasRulesForType;\nfunction shouldUseGroup(schema, group) {\n return group.rules.some((rule) => shouldUseRule(schema, rule));\n}\nexports.shouldUseGroup = shouldUseGroup;\nfunction shouldUseRule(schema, rule) {\n var _a;\n return (schema[rule.keyword] !== undefined ||\n ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined)));\n}\nexports.shouldUseRule = shouldUseRule;\n//# sourceMappingURL=applicability.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;\nconst rules_1 = require(\"../rules\");\nconst applicability_1 = require(\"./applicability\");\nconst errors_1 = require(\"../errors\");\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nvar DataType;\n(function (DataType) {\n DataType[DataType[\"Correct\"] = 0] = \"Correct\";\n DataType[DataType[\"Wrong\"] = 1] = \"Wrong\";\n})(DataType || (exports.DataType = DataType = {}));\nfunction getSchemaTypes(schema) {\n const types = getJSONTypes(schema.type);\n const hasNull = types.includes(\"null\");\n if (hasNull) {\n if (schema.nullable === false)\n throw new Error(\"type: null contradicts nullable: false\");\n }\n else {\n if (!types.length && schema.nullable !== undefined) {\n throw new Error('\"nullable\" cannot be used without \"type\"');\n }\n if (schema.nullable === true)\n types.push(\"null\");\n }\n return types;\n}\nexports.getSchemaTypes = getSchemaTypes;\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nfunction getJSONTypes(ts) {\n const types = Array.isArray(ts) ? ts : ts ? [ts] : [];\n if (types.every(rules_1.isJSONType))\n return types;\n throw new Error(\"type must be JSONType or JSONType[]: \" + types.join(\",\"));\n}\nexports.getJSONTypes = getJSONTypes;\nfunction coerceAndCheckDataType(it, types) {\n const { gen, data, opts } = it;\n const coerceTo = coerceToTypes(types, opts.coerceTypes);\n const checkTypes = types.length > 0 &&\n !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));\n if (checkTypes) {\n const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);\n gen.if(wrongType, () => {\n if (coerceTo.length)\n coerceData(it, types, coerceTo);\n else\n reportTypeError(it);\n });\n }\n return checkTypes;\n}\nexports.coerceAndCheckDataType = coerceAndCheckDataType;\nconst COERCIBLE = new Set([\"string\", \"number\", \"integer\", \"boolean\", \"null\"]);\nfunction coerceToTypes(types, coerceTypes) {\n return coerceTypes\n ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === \"array\" && t === \"array\"))\n : [];\n}\nfunction coerceData(it, types, coerceTo) {\n const { gen, data, opts } = it;\n const dataType = gen.let(\"dataType\", (0, codegen_1._) `typeof ${data}`);\n const coerced = gen.let(\"coerced\", (0, codegen_1._) `undefined`);\n if (opts.coerceTypes === \"array\") {\n gen.if((0, codegen_1._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen\n .assign(data, (0, codegen_1._) `${data}[0]`)\n .assign(dataType, (0, codegen_1._) `typeof ${data}`)\n .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));\n }\n gen.if((0, codegen_1._) `${coerced} !== undefined`);\n for (const t of coerceTo) {\n if (COERCIBLE.has(t) || (t === \"array\" && opts.coerceTypes === \"array\")) {\n coerceSpecificType(t);\n }\n }\n gen.else();\n reportTypeError(it);\n gen.endIf();\n gen.if((0, codegen_1._) `${coerced} !== undefined`, () => {\n gen.assign(data, coerced);\n assignParentData(it, coerced);\n });\n function coerceSpecificType(t) {\n switch (t) {\n case \"string\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"number\" || ${dataType} == \"boolean\"`)\n .assign(coerced, (0, codegen_1._) `\"\" + ${data}`)\n .elseIf((0, codegen_1._) `${data} === null`)\n .assign(coerced, (0, codegen_1._) `\"\"`);\n return;\n case \"number\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"boolean\" || ${data} === null\n || (${dataType} == \"string\" && ${data} && ${data} == +${data})`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"integer\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"boolean\" || ${data} === null\n || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"boolean\":\n gen\n .elseIf((0, codegen_1._) `${data} === \"false\" || ${data} === 0 || ${data} === null`)\n .assign(coerced, false)\n .elseIf((0, codegen_1._) `${data} === \"true\" || ${data} === 1`)\n .assign(coerced, true);\n return;\n case \"null\":\n gen.elseIf((0, codegen_1._) `${data} === \"\" || ${data} === 0 || ${data} === false`);\n gen.assign(coerced, null);\n return;\n case \"array\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"string\" || ${dataType} === \"number\"\n || ${dataType} === \"boolean\" || ${data} === null`)\n .assign(coerced, (0, codegen_1._) `[${data}]`);\n }\n }\n}\nfunction assignParentData({ gen, parentData, parentDataProperty }, expr) {\n // TODO use gen.property\n gen.if((0, codegen_1._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1._) `${parentData}[${parentDataProperty}]`, expr));\n}\nfunction checkDataType(dataType, data, strictNums, correct = DataType.Correct) {\n const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;\n let cond;\n switch (dataType) {\n case \"null\":\n return (0, codegen_1._) `${data} ${EQ} null`;\n case \"array\":\n cond = (0, codegen_1._) `Array.isArray(${data})`;\n break;\n case \"object\":\n cond = (0, codegen_1._) `${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`;\n break;\n case \"integer\":\n cond = numCond((0, codegen_1._) `!(${data} % 1) && !isNaN(${data})`);\n break;\n case \"number\":\n cond = numCond();\n break;\n default:\n return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`;\n }\n return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);\n function numCond(_cond = codegen_1.nil) {\n return (0, codegen_1.and)((0, codegen_1._) `typeof ${data} == \"number\"`, _cond, strictNums ? (0, codegen_1._) `isFinite(${data})` : codegen_1.nil);\n }\n}\nexports.checkDataType = checkDataType;\nfunction checkDataTypes(dataTypes, data, strictNums, correct) {\n if (dataTypes.length === 1) {\n return checkDataType(dataTypes[0], data, strictNums, correct);\n }\n let cond;\n const types = (0, util_1.toHash)(dataTypes);\n if (types.array && types.object) {\n const notObj = (0, codegen_1._) `typeof ${data} != \"object\"`;\n cond = types.null ? notObj : (0, codegen_1._) `!${data} || ${notObj}`;\n delete types.null;\n delete types.array;\n delete types.object;\n }\n else {\n cond = codegen_1.nil;\n }\n if (types.number)\n delete types.integer;\n for (const t in types)\n cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));\n return cond;\n}\nexports.checkDataTypes = checkDataTypes;\nconst typeError = {\n message: ({ schema }) => `must be ${schema}`,\n params: ({ schema, schemaValue }) => typeof schema == \"string\" ? (0, codegen_1._) `{type: ${schema}}` : (0, codegen_1._) `{type: ${schemaValue}}`,\n};\nfunction reportTypeError(it) {\n const cxt = getTypeErrorContext(it);\n (0, errors_1.reportError)(cxt, typeError);\n}\nexports.reportTypeError = reportTypeError;\nfunction getTypeErrorContext(it) {\n const { gen, data, schema } = it;\n const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, \"type\");\n return {\n gen,\n keyword: \"type\",\n data,\n schema: schema.type,\n schemaCode,\n schemaValue: schemaCode,\n parentSchema: schema,\n params: {},\n it,\n };\n}\n//# sourceMappingURL=dataType.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assignDefaults = void 0;\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nfunction assignDefaults(it, ty) {\n const { properties, items } = it.schema;\n if (ty === \"object\" && properties) {\n for (const key in properties) {\n assignDefault(it, key, properties[key].default);\n }\n }\n else if (ty === \"array\" && Array.isArray(items)) {\n items.forEach((sch, i) => assignDefault(it, i, sch.default));\n }\n}\nexports.assignDefaults = assignDefaults;\nfunction assignDefault(it, prop, defaultValue) {\n const { gen, compositeRule, data, opts } = it;\n if (defaultValue === undefined)\n return;\n const childData = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(prop)}`;\n if (compositeRule) {\n (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);\n return;\n }\n let condition = (0, codegen_1._) `${childData} === undefined`;\n if (opts.useDefaults === \"empty\") {\n condition = (0, codegen_1._) `${condition} || ${childData} === null || ${childData} === \"\"`;\n }\n // `${childData} === undefined` +\n // (opts.useDefaults === \"empty\" ? ` || ${childData} === null || ${childData} === \"\"` : \"\")\n gen.if(condition, (0, codegen_1._) `${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);\n}\n//# sourceMappingURL=defaults.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;\nconst codegen_1 = require(\"../compile/codegen\");\nconst util_1 = require(\"../compile/util\");\nconst names_1 = require(\"../compile/names\");\nconst util_2 = require(\"../compile/util\");\nfunction checkReportMissingProp(cxt, prop) {\n const { gen, data, it } = cxt;\n gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {\n cxt.setParams({ missingProperty: (0, codegen_1._) `${prop}` }, true);\n cxt.error();\n });\n}\nexports.checkReportMissingProp = checkReportMissingProp;\nfunction checkMissingProp({ gen, data, it: { opts } }, properties, missing) {\n return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._) `${missing} = ${prop}`)));\n}\nexports.checkMissingProp = checkMissingProp;\nfunction reportMissingProp(cxt, missing) {\n cxt.setParams({ missingProperty: missing }, true);\n cxt.error();\n}\nexports.reportMissingProp = reportMissingProp;\nfunction hasPropFunc(gen) {\n return gen.scopeValue(\"func\", {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ref: Object.prototype.hasOwnProperty,\n code: (0, codegen_1._) `Object.prototype.hasOwnProperty`,\n });\n}\nexports.hasPropFunc = hasPropFunc;\nfunction isOwnProperty(gen, data, property) {\n return (0, codegen_1._) `${hasPropFunc(gen)}.call(${data}, ${property})`;\n}\nexports.isOwnProperty = isOwnProperty;\nfunction propertyInData(gen, data, property, ownProperties) {\n const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} !== undefined`;\n return ownProperties ? (0, codegen_1._) `${cond} && ${isOwnProperty(gen, data, property)}` : cond;\n}\nexports.propertyInData = propertyInData;\nfunction noPropertyInData(gen, data, property, ownProperties) {\n const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} === undefined`;\n return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;\n}\nexports.noPropertyInData = noPropertyInData;\nfunction allSchemaProperties(schemaMap) {\n return schemaMap ? Object.keys(schemaMap).filter((p) => p !== \"__proto__\") : [];\n}\nexports.allSchemaProperties = allSchemaProperties;\nfunction schemaProperties(it, schemaMap) {\n return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));\n}\nexports.schemaProperties = schemaProperties;\nfunction callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {\n const dataAndSchema = passSchema ? (0, codegen_1._) `${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;\n const valCxt = [\n [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],\n [names_1.default.parentData, it.parentData],\n [names_1.default.parentDataProperty, it.parentDataProperty],\n [names_1.default.rootData, names_1.default.rootData],\n ];\n if (it.opts.dynamicRef)\n valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);\n const args = (0, codegen_1._) `${dataAndSchema}, ${gen.object(...valCxt)}`;\n return context !== codegen_1.nil ? (0, codegen_1._) `${func}.call(${context}, ${args})` : (0, codegen_1._) `${func}(${args})`;\n}\nexports.callValidateCode = callValidateCode;\nconst newRegExp = (0, codegen_1._) `new RegExp`;\nfunction usePattern({ gen, it: { opts } }, pattern) {\n const u = opts.unicodeRegExp ? \"u\" : \"\";\n const { regExp } = opts.code;\n const rx = regExp(pattern, u);\n return gen.scopeValue(\"pattern\", {\n key: rx.toString(),\n ref: rx,\n code: (0, codegen_1._) `${regExp.code === \"new RegExp\" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`,\n });\n}\nexports.usePattern = usePattern;\nfunction validateArray(cxt) {\n const { gen, data, keyword, it } = cxt;\n const valid = gen.name(\"valid\");\n if (it.allErrors) {\n const validArr = gen.let(\"valid\", true);\n validateItems(() => gen.assign(validArr, false));\n return validArr;\n }\n gen.var(valid, true);\n validateItems(() => gen.break());\n return valid;\n function validateItems(notValid) {\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema({\n keyword,\n dataProp: i,\n dataPropType: util_1.Type.Num,\n }, valid);\n gen.if((0, codegen_1.not)(valid), notValid);\n });\n }\n}\nexports.validateArray = validateArray;\nfunction validateUnion(cxt) {\n const { gen, schema, keyword, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));\n if (alwaysValid && !it.opts.unevaluated)\n return;\n const valid = gen.let(\"valid\", false);\n const schValid = gen.name(\"_valid\");\n gen.block(() => schema.forEach((_sch, i) => {\n const schCxt = cxt.subschema({\n keyword,\n schemaProp: i,\n compositeRule: true,\n }, schValid);\n gen.assign(valid, (0, codegen_1._) `${valid} || ${schValid}`);\n const merged = cxt.mergeValidEvaluated(schCxt, schValid);\n // can short-circuit if `unevaluatedProperties/Items` not supported (opts.unevaluated !== true)\n // or if all properties and items were evaluated (it.props === true && it.items === true)\n if (!merged)\n gen.if((0, codegen_1.not)(valid));\n }));\n cxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n}\nexports.validateUnion = validateUnion;\n//# sourceMappingURL=code.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst code_1 = require(\"../../vocabularies/code\");\nconst errors_1 = require(\"../errors\");\nfunction macroKeywordCode(cxt, def) {\n const { gen, keyword, schema, parentSchema, it } = cxt;\n const macroSchema = def.macro.call(it.self, schema, parentSchema, it);\n const schemaRef = useKeyword(gen, keyword, macroSchema);\n if (it.opts.validateSchema !== false)\n it.self.validateSchema(macroSchema, true);\n const valid = gen.name(\"valid\");\n cxt.subschema({\n schema: macroSchema,\n schemaPath: codegen_1.nil,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n topSchemaRef: schemaRef,\n compositeRule: true,\n }, valid);\n cxt.pass(valid, () => cxt.error(true));\n}\nexports.macroKeywordCode = macroKeywordCode;\nfunction funcKeywordCode(cxt, def) {\n var _a;\n const { gen, keyword, schema, parentSchema, $data, it } = cxt;\n checkAsyncKeyword(it, def);\n const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;\n const validateRef = useKeyword(gen, keyword, validate);\n const valid = gen.let(\"valid\");\n cxt.block$data(valid, validateKeyword);\n cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);\n function validateKeyword() {\n if (def.errors === false) {\n assignValid();\n if (def.modifying)\n modifyData(cxt);\n reportErrs(() => cxt.error());\n }\n else {\n const ruleErrs = def.async ? validateAsync() : validateSync();\n if (def.modifying)\n modifyData(cxt);\n reportErrs(() => addErrs(cxt, ruleErrs));\n }\n }\n function validateAsync() {\n const ruleErrs = gen.let(\"ruleErrs\", null);\n gen.try(() => assignValid((0, codegen_1._) `await `), (e) => gen.assign(valid, false).if((0, codegen_1._) `${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._) `${e}.errors`), () => gen.throw(e)));\n return ruleErrs;\n }\n function validateSync() {\n const validateErrs = (0, codegen_1._) `${validateRef}.errors`;\n gen.assign(validateErrs, null);\n assignValid(codegen_1.nil);\n return validateErrs;\n }\n function assignValid(_await = def.async ? (0, codegen_1._) `await ` : codegen_1.nil) {\n const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;\n const passSchema = !((\"compile\" in def && !$data) || def.schema === false);\n gen.assign(valid, (0, codegen_1._) `${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);\n }\n function reportErrs(errors) {\n var _a;\n gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== void 0 ? _a : valid), errors);\n }\n}\nexports.funcKeywordCode = funcKeywordCode;\nfunction modifyData(cxt) {\n const { gen, data, it } = cxt;\n gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._) `${it.parentData}[${it.parentDataProperty}]`));\n}\nfunction addErrs(cxt, errs) {\n const { gen } = cxt;\n gen.if((0, codegen_1._) `Array.isArray(${errs})`, () => {\n gen\n .assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`)\n .assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);\n (0, errors_1.extendErrors)(cxt);\n }, () => cxt.error());\n}\nfunction checkAsyncKeyword({ schemaEnv }, def) {\n if (def.async && !schemaEnv.$async)\n throw new Error(\"async keyword in sync schema\");\n}\nfunction useKeyword(gen, keyword, result) {\n if (result === undefined)\n throw new Error(`keyword \"${keyword}\" failed to compile`);\n return gen.scopeValue(\"keyword\", typeof result == \"function\" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });\n}\nfunction validSchemaType(schema, schemaType, allowUndefined = false) {\n // TODO add tests\n return (!schemaType.length ||\n schemaType.some((st) => st === \"array\"\n ? Array.isArray(schema)\n : st === \"object\"\n ? schema && typeof schema == \"object\" && !Array.isArray(schema)\n : typeof schema == st || (allowUndefined && typeof schema == \"undefined\")));\n}\nexports.validSchemaType = validSchemaType;\nfunction validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {\n /* istanbul ignore if */\n if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {\n throw new Error(\"ajv implementation error\");\n }\n const deps = def.dependencies;\n if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {\n throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(\",\")}`);\n }\n if (def.validateSchema) {\n const valid = def.validateSchema(schema[keyword]);\n if (!valid) {\n const msg = `keyword \"${keyword}\" value is invalid at path \"${errSchemaPath}\": ` +\n self.errorsText(def.validateSchema.errors);\n if (opts.validateSchema === \"log\")\n self.logger.error(msg);\n else\n throw new Error(msg);\n }\n }\n}\nexports.validateKeywordUsage = validateKeywordUsage;\n//# sourceMappingURL=keyword.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nfunction getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {\n if (keyword !== undefined && schema !== undefined) {\n throw new Error('both \"keyword\" and \"schema\" passed, only one allowed');\n }\n if (keyword !== undefined) {\n const sch = it.schema[keyword];\n return schemaProp === undefined\n ? {\n schema: sch,\n schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n }\n : {\n schema: sch[schemaProp],\n schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`,\n };\n }\n if (schema !== undefined) {\n if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) {\n throw new Error('\"schemaPath\", \"errSchemaPath\" and \"topSchemaRef\" are required with \"schema\"');\n }\n return {\n schema,\n schemaPath,\n topSchemaRef,\n errSchemaPath,\n };\n }\n throw new Error('either \"keyword\" or \"schema\" must be passed');\n}\nexports.getSubschema = getSubschema;\nfunction extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {\n if (data !== undefined && dataProp !== undefined) {\n throw new Error('both \"data\" and \"dataProp\" passed, only one allowed');\n }\n const { gen } = it;\n if (dataProp !== undefined) {\n const { errorPath, dataPathArr, opts } = it;\n const nextData = gen.let(\"data\", (0, codegen_1._) `${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);\n dataContextProps(nextData);\n subschema.errorPath = (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;\n subschema.parentDataProperty = (0, codegen_1._) `${dataProp}`;\n subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];\n }\n if (data !== undefined) {\n const nextData = data instanceof codegen_1.Name ? data : gen.let(\"data\", data, true); // replaceable if used once?\n dataContextProps(nextData);\n if (propertyName !== undefined)\n subschema.propertyName = propertyName;\n // TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr\n }\n if (dataTypes)\n subschema.dataTypes = dataTypes;\n function dataContextProps(_nextData) {\n subschema.data = _nextData;\n subschema.dataLevel = it.dataLevel + 1;\n subschema.dataTypes = [];\n it.definedProperties = new Set();\n subschema.parentData = it.data;\n subschema.dataNames = [...it.dataNames, _nextData];\n }\n}\nexports.extendSubschemaData = extendSubschemaData;\nfunction extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {\n if (compositeRule !== undefined)\n subschema.compositeRule = compositeRule;\n if (createErrors !== undefined)\n subschema.createErrors = createErrors;\n if (allErrors !== undefined)\n subschema.allErrors = allErrors;\n subschema.jtdDiscriminator = jtdDiscriminator; // not inherited\n subschema.jtdMetadata = jtdMetadata; // not inherited\n}\nexports.extendSubschemaMode = extendSubschemaMode;\n//# sourceMappingURL=subschema.js.map","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","'use strict';\n\nvar traverse = module.exports = function (schema, opts, cb) {\n // Legacy support for v0.3.1 and earlier.\n if (typeof opts == 'function') {\n cb = opts;\n opts = {};\n }\n\n cb = opts.cb || cb;\n var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};\n var post = cb.post || function() {};\n\n _traverse(opts, pre, post, schema, '', schema);\n};\n\n\ntraverse.keywords = {\n additionalItems: true,\n items: true,\n contains: true,\n additionalProperties: true,\n propertyNames: true,\n not: true,\n if: true,\n then: true,\n else: true\n};\n\ntraverse.arrayKeywords = {\n items: true,\n allOf: true,\n anyOf: true,\n oneOf: true\n};\n\ntraverse.propsKeywords = {\n $defs: true,\n definitions: true,\n properties: true,\n patternProperties: true,\n dependencies: true\n};\n\ntraverse.skipKeywords = {\n default: true,\n enum: true,\n const: true,\n required: true,\n maximum: true,\n minimum: true,\n exclusiveMaximum: true,\n exclusiveMinimum: true,\n multipleOf: true,\n maxLength: true,\n minLength: true,\n pattern: true,\n format: true,\n maxItems: true,\n minItems: true,\n uniqueItems: true,\n maxProperties: true,\n minProperties: true\n};\n\n\nfunction _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {\n if (schema && typeof schema == 'object' && !Array.isArray(schema)) {\n pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n for (var key in schema) {\n var sch = schema[key];\n if (Array.isArray(sch)) {\n if (key in traverse.arrayKeywords) {\n for (var i=0; i (count += countKeys(sch)));\n }\n if (count === Infinity)\n return Infinity;\n }\n return count;\n}\nfunction getFullPath(resolver, id = \"\", normalize) {\n if (normalize !== false)\n id = normalizeId(id);\n const p = resolver.parse(id);\n return _getFullPath(resolver, p);\n}\nexports.getFullPath = getFullPath;\nfunction _getFullPath(resolver, p) {\n const serialized = resolver.serialize(p);\n return serialized.split(\"#\")[0] + \"#\";\n}\nexports._getFullPath = _getFullPath;\nconst TRAILING_SLASH_HASH = /#\\/?$/;\nfunction normalizeId(id) {\n return id ? id.replace(TRAILING_SLASH_HASH, \"\") : \"\";\n}\nexports.normalizeId = normalizeId;\nfunction resolveUrl(resolver, baseId, id) {\n id = normalizeId(id);\n return resolver.resolve(baseId, id);\n}\nexports.resolveUrl = resolveUrl;\nconst ANCHOR = /^[a-z_][-a-z0-9._]*$/i;\nfunction getSchemaRefs(schema, baseId) {\n if (typeof schema == \"boolean\")\n return {};\n const { schemaId, uriResolver } = this.opts;\n const schId = normalizeId(schema[schemaId] || baseId);\n const baseIds = { \"\": schId };\n const pathPrefix = getFullPath(uriResolver, schId, false);\n const localRefs = {};\n const schemaRefs = new Set();\n traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {\n if (parentJsonPtr === undefined)\n return;\n const fullPath = pathPrefix + jsonPtr;\n let innerBaseId = baseIds[parentJsonPtr];\n if (typeof sch[schemaId] == \"string\")\n innerBaseId = addRef.call(this, sch[schemaId]);\n addAnchor.call(this, sch.$anchor);\n addAnchor.call(this, sch.$dynamicAnchor);\n baseIds[jsonPtr] = innerBaseId;\n function addRef(ref) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const _resolve = this.opts.uriResolver.resolve;\n ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref);\n if (schemaRefs.has(ref))\n throw ambiguos(ref);\n schemaRefs.add(ref);\n let schOrRef = this.refs[ref];\n if (typeof schOrRef == \"string\")\n schOrRef = this.refs[schOrRef];\n if (typeof schOrRef == \"object\") {\n checkAmbiguosRef(sch, schOrRef.schema, ref);\n }\n else if (ref !== normalizeId(fullPath)) {\n if (ref[0] === \"#\") {\n checkAmbiguosRef(sch, localRefs[ref], ref);\n localRefs[ref] = sch;\n }\n else {\n this.refs[ref] = fullPath;\n }\n }\n return ref;\n }\n function addAnchor(anchor) {\n if (typeof anchor == \"string\") {\n if (!ANCHOR.test(anchor))\n throw new Error(`invalid anchor \"${anchor}\"`);\n addRef.call(this, `#${anchor}`);\n }\n }\n });\n return localRefs;\n function checkAmbiguosRef(sch1, sch2, ref) {\n if (sch2 !== undefined && !equal(sch1, sch2))\n throw ambiguos(ref);\n }\n function ambiguos(ref) {\n return new Error(`reference \"${ref}\" resolves to more than one schema`);\n }\n}\nexports.getSchemaRefs = getSchemaRefs;\n//# sourceMappingURL=resolve.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;\nconst boolSchema_1 = require(\"./boolSchema\");\nconst dataType_1 = require(\"./dataType\");\nconst applicability_1 = require(\"./applicability\");\nconst dataType_2 = require(\"./dataType\");\nconst defaults_1 = require(\"./defaults\");\nconst keyword_1 = require(\"./keyword\");\nconst subschema_1 = require(\"./subschema\");\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst resolve_1 = require(\"../resolve\");\nconst util_1 = require(\"../util\");\nconst errors_1 = require(\"../errors\");\n// schema compilation - generates validation function, subschemaCode (below) is used for subschemas\nfunction validateFunctionCode(it) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n topSchemaObjCode(it);\n return;\n }\n }\n validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));\n}\nexports.validateFunctionCode = validateFunctionCode;\nfunction validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {\n if (opts.code.es5) {\n gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {\n gen.code((0, codegen_1._) `\"use strict\"; ${funcSourceUrl(schema, opts)}`);\n destructureValCxtES5(gen, opts);\n gen.code(body);\n });\n }\n else {\n gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));\n }\n}\nfunction destructureValCxt(opts) {\n return (0, codegen_1._) `{${names_1.default.instancePath}=\"\", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._) `, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;\n}\nfunction destructureValCxtES5(gen, opts) {\n gen.if(names_1.default.valCxt, () => {\n gen.var(names_1.default.instancePath, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.instancePath}`);\n gen.var(names_1.default.parentData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentData}`);\n gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);\n gen.var(names_1.default.rootData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.rootData}`);\n if (opts.dynamicRef)\n gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);\n }, () => {\n gen.var(names_1.default.instancePath, (0, codegen_1._) `\"\"`);\n gen.var(names_1.default.parentData, (0, codegen_1._) `undefined`);\n gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `undefined`);\n gen.var(names_1.default.rootData, names_1.default.data);\n if (opts.dynamicRef)\n gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `{}`);\n });\n}\nfunction topSchemaObjCode(it) {\n const { schema, opts, gen } = it;\n validateFunction(it, () => {\n if (opts.$comment && schema.$comment)\n commentKeyword(it);\n checkNoDefault(it);\n gen.let(names_1.default.vErrors, null);\n gen.let(names_1.default.errors, 0);\n if (opts.unevaluated)\n resetEvaluated(it);\n typeAndKeywords(it);\n returnResults(it);\n });\n return;\n}\nfunction resetEvaluated(it) {\n // TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated\n const { gen, validateName } = it;\n it.evaluated = gen.const(\"evaluated\", (0, codegen_1._) `${validateName}.evaluated`);\n gen.if((0, codegen_1._) `${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._) `${it.evaluated}.props`, (0, codegen_1._) `undefined`));\n gen.if((0, codegen_1._) `${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._) `${it.evaluated}.items`, (0, codegen_1._) `undefined`));\n}\nfunction funcSourceUrl(schema, opts) {\n const schId = typeof schema == \"object\" && schema[opts.schemaId];\n return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._) `/*# sourceURL=${schId} */` : codegen_1.nil;\n}\n// schema compilation - this function is used recursively to generate code for sub-schemas\nfunction subschemaCode(it, valid) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n subSchemaObjCode(it, valid);\n return;\n }\n }\n (0, boolSchema_1.boolOrEmptySchema)(it, valid);\n}\nfunction schemaCxtHasRules({ schema, self }) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (self.RULES.all[key])\n return true;\n return false;\n}\nfunction isSchemaObj(it) {\n return typeof it.schema != \"boolean\";\n}\nfunction subSchemaObjCode(it, valid) {\n const { schema, gen, opts } = it;\n if (opts.$comment && schema.$comment)\n commentKeyword(it);\n updateContext(it);\n checkAsyncSchema(it);\n const errsCount = gen.const(\"_errs\", names_1.default.errors);\n typeAndKeywords(it, errsCount);\n // TODO var\n gen.var(valid, (0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);\n}\nfunction checkKeywords(it) {\n (0, util_1.checkUnknownRules)(it);\n checkRefsAndKeywords(it);\n}\nfunction typeAndKeywords(it, errsCount) {\n if (it.opts.jtd)\n return schemaKeywords(it, [], false, errsCount);\n const types = (0, dataType_1.getSchemaTypes)(it.schema);\n const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types);\n schemaKeywords(it, types, !checkedTypes, errsCount);\n}\nfunction checkRefsAndKeywords(it) {\n const { schema, errSchemaPath, opts, self } = it;\n if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) {\n self.logger.warn(`$ref: keywords ignored in schema at path \"${errSchemaPath}\"`);\n }\n}\nfunction checkNoDefault(it) {\n const { schema, opts } = it;\n if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) {\n (0, util_1.checkStrictMode)(it, \"default is ignored in the schema root\");\n }\n}\nfunction updateContext(it) {\n const schId = it.schema[it.opts.schemaId];\n if (schId)\n it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);\n}\nfunction checkAsyncSchema(it) {\n if (it.schema.$async && !it.schemaEnv.$async)\n throw new Error(\"async schema in sync schema\");\n}\nfunction commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {\n const msg = schema.$comment;\n if (opts.$comment === true) {\n gen.code((0, codegen_1._) `${names_1.default.self}.logger.log(${msg})`);\n }\n else if (typeof opts.$comment == \"function\") {\n const schemaPath = (0, codegen_1.str) `${errSchemaPath}/$comment`;\n const rootName = gen.scopeValue(\"root\", { ref: schemaEnv.root });\n gen.code((0, codegen_1._) `${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);\n }\n}\nfunction returnResults(it) {\n const { gen, schemaEnv, validateName, ValidationError, opts } = it;\n if (schemaEnv.$async) {\n // TODO assign unevaluated\n gen.if((0, codegen_1._) `${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._) `new ${ValidationError}(${names_1.default.vErrors})`));\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, names_1.default.vErrors);\n if (opts.unevaluated)\n assignEvaluated(it);\n gen.return((0, codegen_1._) `${names_1.default.errors} === 0`);\n }\n}\nfunction assignEvaluated({ gen, evaluated, props, items }) {\n if (props instanceof codegen_1.Name)\n gen.assign((0, codegen_1._) `${evaluated}.props`, props);\n if (items instanceof codegen_1.Name)\n gen.assign((0, codegen_1._) `${evaluated}.items`, items);\n}\nfunction schemaKeywords(it, types, typeErrors, errsCount) {\n const { gen, schema, data, allErrors, opts, self } = it;\n const { RULES } = self;\n if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {\n gen.block(() => keywordCode(it, \"$ref\", RULES.all.$ref.definition)); // TODO typecast\n return;\n }\n if (!opts.jtd)\n checkStrictTypes(it, types);\n gen.block(() => {\n for (const group of RULES.rules)\n groupKeywords(group);\n groupKeywords(RULES.post);\n });\n function groupKeywords(group) {\n if (!(0, applicability_1.shouldUseGroup)(schema, group))\n return;\n if (group.type) {\n gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));\n iterateKeywords(it, group);\n if (types.length === 1 && types[0] === group.type && typeErrors) {\n gen.else();\n (0, dataType_2.reportTypeError)(it);\n }\n gen.endIf();\n }\n else {\n iterateKeywords(it, group);\n }\n // TODO make it \"ok\" call?\n if (!allErrors)\n gen.if((0, codegen_1._) `${names_1.default.errors} === ${errsCount || 0}`);\n }\n}\nfunction iterateKeywords(it, group) {\n const { gen, schema, opts: { useDefaults }, } = it;\n if (useDefaults)\n (0, defaults_1.assignDefaults)(it, group.type);\n gen.block(() => {\n for (const rule of group.rules) {\n if ((0, applicability_1.shouldUseRule)(schema, rule)) {\n keywordCode(it, rule.keyword, rule.definition, group.type);\n }\n }\n });\n}\nfunction checkStrictTypes(it, types) {\n if (it.schemaEnv.meta || !it.opts.strictTypes)\n return;\n checkContextTypes(it, types);\n if (!it.opts.allowUnionTypes)\n checkMultipleTypes(it, types);\n checkKeywordTypes(it, it.dataTypes);\n}\nfunction checkContextTypes(it, types) {\n if (!types.length)\n return;\n if (!it.dataTypes.length) {\n it.dataTypes = types;\n return;\n }\n types.forEach((t) => {\n if (!includesType(it.dataTypes, t)) {\n strictTypesError(it, `type \"${t}\" not allowed by context \"${it.dataTypes.join(\",\")}\"`);\n }\n });\n narrowSchemaTypes(it, types);\n}\nfunction checkMultipleTypes(it, ts) {\n if (ts.length > 1 && !(ts.length === 2 && ts.includes(\"null\"))) {\n strictTypesError(it, \"use allowUnionTypes to allow union type keyword\");\n }\n}\nfunction checkKeywordTypes(it, ts) {\n const rules = it.self.RULES.all;\n for (const keyword in rules) {\n const rule = rules[keyword];\n if (typeof rule == \"object\" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {\n const { type } = rule.definition;\n if (type.length && !type.some((t) => hasApplicableType(ts, t))) {\n strictTypesError(it, `missing type \"${type.join(\",\")}\" for keyword \"${keyword}\"`);\n }\n }\n }\n}\nfunction hasApplicableType(schTs, kwdT) {\n return schTs.includes(kwdT) || (kwdT === \"number\" && schTs.includes(\"integer\"));\n}\nfunction includesType(ts, t) {\n return ts.includes(t) || (t === \"integer\" && ts.includes(\"number\"));\n}\nfunction narrowSchemaTypes(it, withTypes) {\n const ts = [];\n for (const t of it.dataTypes) {\n if (includesType(withTypes, t))\n ts.push(t);\n else if (withTypes.includes(\"integer\") && t === \"number\")\n ts.push(\"integer\");\n }\n it.dataTypes = ts;\n}\nfunction strictTypesError(it, msg) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n msg += ` at \"${schemaPath}\" (strictTypes)`;\n (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);\n}\nclass KeywordCxt {\n constructor(it, def, keyword) {\n (0, keyword_1.validateKeywordUsage)(it, def, keyword);\n this.gen = it.gen;\n this.allErrors = it.allErrors;\n this.keyword = keyword;\n this.data = it.data;\n this.schema = it.schema[keyword];\n this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data;\n this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data);\n this.schemaType = def.schemaType;\n this.parentSchema = it.schema;\n this.params = {};\n this.it = it;\n this.def = def;\n if (this.$data) {\n this.schemaCode = it.gen.const(\"vSchema\", getData(this.$data, it));\n }\n else {\n this.schemaCode = this.schemaValue;\n if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) {\n throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);\n }\n }\n if (\"code\" in def ? def.trackErrors : def.errors !== false) {\n this.errsCount = it.gen.const(\"_errs\", names_1.default.errors);\n }\n }\n result(condition, successAction, failAction) {\n this.failResult((0, codegen_1.not)(condition), successAction, failAction);\n }\n failResult(condition, successAction, failAction) {\n this.gen.if(condition);\n if (failAction)\n failAction();\n else\n this.error();\n if (successAction) {\n this.gen.else();\n successAction();\n if (this.allErrors)\n this.gen.endIf();\n }\n else {\n if (this.allErrors)\n this.gen.endIf();\n else\n this.gen.else();\n }\n }\n pass(condition, failAction) {\n this.failResult((0, codegen_1.not)(condition), undefined, failAction);\n }\n fail(condition) {\n if (condition === undefined) {\n this.error();\n if (!this.allErrors)\n this.gen.if(false); // this branch will be removed by gen.optimize\n return;\n }\n this.gen.if(condition);\n this.error();\n if (this.allErrors)\n this.gen.endIf();\n else\n this.gen.else();\n }\n fail$data(condition) {\n if (!this.$data)\n return this.fail(condition);\n const { schemaCode } = this;\n this.fail((0, codegen_1._) `${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);\n }\n error(append, errorParams, errorPaths) {\n if (errorParams) {\n this.setParams(errorParams);\n this._error(append, errorPaths);\n this.setParams({});\n return;\n }\n this._error(append, errorPaths);\n }\n _error(append, errorPaths) {\n ;\n (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);\n }\n $dataError() {\n (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);\n }\n reset() {\n if (this.errsCount === undefined)\n throw new Error('add \"trackErrors\" to keyword definition');\n (0, errors_1.resetErrorsCount)(this.gen, this.errsCount);\n }\n ok(cond) {\n if (!this.allErrors)\n this.gen.if(cond);\n }\n setParams(obj, assign) {\n if (assign)\n Object.assign(this.params, obj);\n else\n this.params = obj;\n }\n block$data(valid, codeBlock, $dataValid = codegen_1.nil) {\n this.gen.block(() => {\n this.check$data(valid, $dataValid);\n codeBlock();\n });\n }\n check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {\n if (!this.$data)\n return;\n const { gen, schemaCode, schemaType, def } = this;\n gen.if((0, codegen_1.or)((0, codegen_1._) `${schemaCode} === undefined`, $dataValid));\n if (valid !== codegen_1.nil)\n gen.assign(valid, true);\n if (schemaType.length || def.validateSchema) {\n gen.elseIf(this.invalid$data());\n this.$dataError();\n if (valid !== codegen_1.nil)\n gen.assign(valid, false);\n }\n gen.else();\n }\n invalid$data() {\n const { gen, schemaCode, schemaType, def, it } = this;\n return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());\n function wrong$DataType() {\n if (schemaType.length) {\n /* istanbul ignore if */\n if (!(schemaCode instanceof codegen_1.Name))\n throw new Error(\"ajv implementation error\");\n const st = Array.isArray(schemaType) ? schemaType : [schemaType];\n return (0, codegen_1._) `${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;\n }\n return codegen_1.nil;\n }\n function invalid$DataSchema() {\n if (def.validateSchema) {\n const validateSchemaRef = gen.scopeValue(\"validate$data\", { ref: def.validateSchema }); // TODO value.code for standalone\n return (0, codegen_1._) `!${validateSchemaRef}(${schemaCode})`;\n }\n return codegen_1.nil;\n }\n }\n subschema(appl, valid) {\n const subschema = (0, subschema_1.getSubschema)(this.it, appl);\n (0, subschema_1.extendSubschemaData)(subschema, this.it, appl);\n (0, subschema_1.extendSubschemaMode)(subschema, appl);\n const nextContext = { ...this.it, ...subschema, items: undefined, props: undefined };\n subschemaCode(nextContext, valid);\n return nextContext;\n }\n mergeEvaluated(schemaCxt, toName) {\n const { it, gen } = this;\n if (!it.opts.unevaluated)\n return;\n if (it.props !== true && schemaCxt.props !== undefined) {\n it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);\n }\n if (it.items !== true && schemaCxt.items !== undefined) {\n it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);\n }\n }\n mergeValidEvaluated(schemaCxt, valid) {\n const { it, gen } = this;\n if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {\n gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));\n return true;\n }\n }\n}\nexports.KeywordCxt = KeywordCxt;\nfunction keywordCode(it, keyword, def, ruleType) {\n const cxt = new KeywordCxt(it, def, keyword);\n if (\"code\" in def) {\n def.code(cxt, ruleType);\n }\n else if (cxt.$data && def.validate) {\n (0, keyword_1.funcKeywordCode)(cxt, def);\n }\n else if (\"macro\" in def) {\n (0, keyword_1.macroKeywordCode)(cxt, def);\n }\n else if (def.compile || def.validate) {\n (0, keyword_1.funcKeywordCode)(cxt, def);\n }\n}\nconst JSON_POINTER = /^\\/(?:[^~]|~0|~1)*$/;\nconst RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\nfunction getData($data, { dataLevel, dataNames, dataPathArr }) {\n let jsonPointer;\n let data;\n if ($data === \"\")\n return names_1.default.rootData;\n if ($data[0] === \"/\") {\n if (!JSON_POINTER.test($data))\n throw new Error(`Invalid JSON-pointer: ${$data}`);\n jsonPointer = $data;\n data = names_1.default.rootData;\n }\n else {\n const matches = RELATIVE_JSON_POINTER.exec($data);\n if (!matches)\n throw new Error(`Invalid JSON-pointer: ${$data}`);\n const up = +matches[1];\n jsonPointer = matches[2];\n if (jsonPointer === \"#\") {\n if (up >= dataLevel)\n throw new Error(errorMsg(\"property/index\", up));\n return dataPathArr[dataLevel - up];\n }\n if (up > dataLevel)\n throw new Error(errorMsg(\"data\", up));\n data = dataNames[dataLevel - up];\n if (!jsonPointer)\n return data;\n }\n let expr = data;\n const segments = jsonPointer.split(\"/\");\n for (const segment of segments) {\n if (segment) {\n data = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;\n expr = (0, codegen_1._) `${expr} && ${data}`;\n }\n }\n return expr;\n function errorMsg(pointerType, up) {\n return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;\n }\n}\nexports.getData = getData;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass ValidationError extends Error {\n constructor(errors) {\n super(\"validation failed\");\n this.errors = errors;\n this.ajv = this.validation = true;\n }\n}\nexports.default = ValidationError;\n//# sourceMappingURL=validation_error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst resolve_1 = require(\"./resolve\");\nclass MissingRefError extends Error {\n constructor(resolver, baseId, ref, msg) {\n super(msg || `can't resolve reference ${ref} from id ${baseId}`);\n this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);\n this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));\n }\n}\nexports.default = MissingRefError;\n//# sourceMappingURL=ref_error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;\nconst codegen_1 = require(\"./codegen\");\nconst validation_error_1 = require(\"../runtime/validation_error\");\nconst names_1 = require(\"./names\");\nconst resolve_1 = require(\"./resolve\");\nconst util_1 = require(\"./util\");\nconst validate_1 = require(\"./validate\");\nclass SchemaEnv {\n constructor(env) {\n var _a;\n this.refs = {};\n this.dynamicAnchors = {};\n let schema;\n if (typeof env.schema == \"object\")\n schema = env.schema;\n this.schema = env.schema;\n this.schemaId = env.schemaId;\n this.root = env.root || this;\n this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || \"$id\"]);\n this.schemaPath = env.schemaPath;\n this.localRefs = env.localRefs;\n this.meta = env.meta;\n this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;\n this.refs = {};\n }\n}\nexports.SchemaEnv = SchemaEnv;\n// let codeSize = 0\n// let nodeCount = 0\n// Compiles schema in SchemaEnv\nfunction compileSchema(sch) {\n // TODO refactor - remove compilations\n const _sch = getCompilingSchema.call(this, sch);\n if (_sch)\n return _sch;\n const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); // TODO if getFullPath removed 1 tests fails\n const { es5, lines } = this.opts.code;\n const { ownProperties } = this.opts;\n const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });\n let _ValidationError;\n if (sch.$async) {\n _ValidationError = gen.scopeValue(\"Error\", {\n ref: validation_error_1.default,\n code: (0, codegen_1._) `require(\"ajv/dist/runtime/validation_error\").default`,\n });\n }\n const validateName = gen.scopeName(\"validate\");\n sch.validateName = validateName;\n const schemaCxt = {\n gen,\n allErrors: this.opts.allErrors,\n data: names_1.default.data,\n parentData: names_1.default.parentData,\n parentDataProperty: names_1.default.parentDataProperty,\n dataNames: [names_1.default.data],\n dataPathArr: [codegen_1.nil], // TODO can its length be used as dataLevel if nil is removed?\n dataLevel: 0,\n dataTypes: [],\n definedProperties: new Set(),\n topSchemaRef: gen.scopeValue(\"schema\", this.opts.code.source === true\n ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) }\n : { ref: sch.schema }),\n validateName,\n ValidationError: _ValidationError,\n schema: sch.schema,\n schemaEnv: sch,\n rootId,\n baseId: sch.baseId || rootId,\n schemaPath: codegen_1.nil,\n errSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n errorPath: (0, codegen_1._) `\"\"`,\n opts: this.opts,\n self: this,\n };\n let sourceCode;\n try {\n this._compilations.add(sch);\n (0, validate_1.validateFunctionCode)(schemaCxt);\n gen.optimize(this.opts.code.optimize);\n // gen.optimize(1)\n const validateCode = gen.toString();\n sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;\n // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))\n if (this.opts.code.process)\n sourceCode = this.opts.code.process(sourceCode, sch);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode)\n const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);\n const validate = makeValidate(this, this.scope.get());\n this.scope.value(validateName, { ref: validate });\n validate.errors = null;\n validate.schema = sch.schema;\n validate.schemaEnv = sch;\n if (sch.$async)\n validate.$async = true;\n if (this.opts.code.source === true) {\n validate.source = { validateName, validateCode, scopeValues: gen._values };\n }\n if (this.opts.unevaluated) {\n const { props, items } = schemaCxt;\n validate.evaluated = {\n props: props instanceof codegen_1.Name ? undefined : props,\n items: items instanceof codegen_1.Name ? undefined : items,\n dynamicProps: props instanceof codegen_1.Name,\n dynamicItems: items instanceof codegen_1.Name,\n };\n if (validate.source)\n validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);\n }\n sch.validate = validate;\n return sch;\n }\n catch (e) {\n delete sch.validate;\n delete sch.validateName;\n if (sourceCode)\n this.logger.error(\"Error compiling schema, function code:\", sourceCode);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode, this.opts)\n throw e;\n }\n finally {\n this._compilations.delete(sch);\n }\n}\nexports.compileSchema = compileSchema;\nfunction resolveRef(root, baseId, ref) {\n var _a;\n ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);\n const schOrFunc = root.refs[ref];\n if (schOrFunc)\n return schOrFunc;\n let _sch = resolve.call(this, root, ref);\n if (_sch === undefined) {\n const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv\n const { schemaId } = this.opts;\n if (schema)\n _sch = new SchemaEnv({ schema, schemaId, root, baseId });\n }\n if (_sch === undefined)\n return;\n return (root.refs[ref] = inlineOrCompile.call(this, _sch));\n}\nexports.resolveRef = resolveRef;\nfunction inlineOrCompile(sch) {\n if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))\n return sch.schema;\n return sch.validate ? sch : compileSchema.call(this, sch);\n}\n// Index of schema compilation in the currently compiled list\nfunction getCompilingSchema(schEnv) {\n for (const sch of this._compilations) {\n if (sameSchemaEnv(sch, schEnv))\n return sch;\n }\n}\nexports.getCompilingSchema = getCompilingSchema;\nfunction sameSchemaEnv(s1, s2) {\n return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;\n}\n// resolve and compile the references ($ref)\n// TODO returns AnySchemaObject (if the schema can be inlined) or validation function\nfunction resolve(root, // information about the root schema for the current schema\nref // reference to resolve\n) {\n let sch;\n while (typeof (sch = this.refs[ref]) == \"string\")\n ref = sch;\n return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);\n}\n// Resolve schema, its root and baseId\nfunction resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it\nref // reference to resolve\n) {\n const p = this.opts.uriResolver.parse(ref);\n const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);\n let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined);\n // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests\n if (Object.keys(root.schema).length > 0 && refPath === baseId) {\n return getJsonPointer.call(this, p, root);\n }\n const id = (0, resolve_1.normalizeId)(refPath);\n const schOrRef = this.refs[id] || this.schemas[id];\n if (typeof schOrRef == \"string\") {\n const sch = resolveSchema.call(this, root, schOrRef);\n if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== \"object\")\n return;\n return getJsonPointer.call(this, p, sch);\n }\n if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== \"object\")\n return;\n if (!schOrRef.validate)\n compileSchema.call(this, schOrRef);\n if (id === (0, resolve_1.normalizeId)(ref)) {\n const { schema } = schOrRef;\n const { schemaId } = this.opts;\n const schId = schema[schemaId];\n if (schId)\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n return new SchemaEnv({ schema, schemaId, root, baseId });\n }\n return getJsonPointer.call(this, p, schOrRef);\n}\nexports.resolveSchema = resolveSchema;\nconst PREVENT_SCOPE_CHANGE = new Set([\n \"properties\",\n \"patternProperties\",\n \"enum\",\n \"dependencies\",\n \"definitions\",\n]);\nfunction getJsonPointer(parsedRef, { baseId, schema, root }) {\n var _a;\n if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== \"/\")\n return;\n for (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n if (typeof schema === \"boolean\")\n return;\n const partSchema = schema[(0, util_1.unescapeFragment)(part)];\n if (partSchema === undefined)\n return;\n schema = partSchema;\n // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?\n const schId = typeof schema === \"object\" && schema[this.opts.schemaId];\n if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n }\n }\n let env;\n if (typeof schema != \"boolean\" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {\n const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);\n env = resolveSchema.call(this, root, $ref);\n }\n // even though resolution failed we need to return SchemaEnv to throw exception\n // so that compileAsync loads missing schema.\n const { schemaId } = this.opts;\n env = env || new SchemaEnv({ schema, schemaId, root, baseId });\n if (env.schema !== env.root.schema)\n return env;\n return undefined;\n}\n//# sourceMappingURL=index.js.map","'use strict'\n\nconst HEX = {\n 0: 0,\n 1: 1,\n 2: 2,\n 3: 3,\n 4: 4,\n 5: 5,\n 6: 6,\n 7: 7,\n 8: 8,\n 9: 9,\n a: 10,\n A: 10,\n b: 11,\n B: 11,\n c: 12,\n C: 12,\n d: 13,\n D: 13,\n e: 14,\n E: 14,\n f: 15,\n F: 15\n}\n\nmodule.exports = {\n HEX\n}\n","'use strict'\n\nconst { HEX } = require('./scopedChars')\n\nfunction normalizeIPv4 (host) {\n if (findToken(host, '.') < 3) { return { host, isIPV4: false } }\n const matches = host.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u) || []\n const [address] = matches\n if (address) {\n return { host: stripLeadingZeros(address, '.'), isIPV4: true }\n } else {\n return { host, isIPV4: false }\n }\n}\n\n/**\n * @param {string[]} input\n * @param {boolean} [keepZero=false]\n * @returns {string|undefined}\n */\nfunction stringArrayToHexStripped (input, keepZero = false) {\n let acc = ''\n let strip = true\n for (const c of input) {\n if (HEX[c] === undefined) return undefined\n if (c !== '0' && strip === true) strip = false\n if (!strip) acc += c\n }\n if (keepZero && acc.length === 0) acc = '0'\n return acc\n}\n\nfunction getIPV6 (input) {\n let tokenCount = 0\n const output = { error: false, address: '', zone: '' }\n const address = []\n const buffer = []\n let isZone = false\n let endipv6Encountered = false\n let endIpv6 = false\n\n function consume () {\n if (buffer.length) {\n if (isZone === false) {\n const hex = stringArrayToHexStripped(buffer)\n if (hex !== undefined) {\n address.push(hex)\n } else {\n output.error = true\n return false\n }\n }\n buffer.length = 0\n }\n return true\n }\n\n for (let i = 0; i < input.length; i++) {\n const cursor = input[i]\n if (cursor === '[' || cursor === ']') { continue }\n if (cursor === ':') {\n if (endipv6Encountered === true) {\n endIpv6 = true\n }\n if (!consume()) { break }\n tokenCount++\n address.push(':')\n if (tokenCount > 7) {\n // not valid\n output.error = true\n break\n }\n if (i - 1 >= 0 && input[i - 1] === ':') {\n endipv6Encountered = true\n }\n continue\n } else if (cursor === '%') {\n if (!consume()) { break }\n // switch to zone detection\n isZone = true\n } else {\n buffer.push(cursor)\n continue\n }\n }\n if (buffer.length) {\n if (isZone) {\n output.zone = buffer.join('')\n } else if (endIpv6) {\n address.push(buffer.join(''))\n } else {\n address.push(stringArrayToHexStripped(buffer))\n }\n }\n output.address = address.join('')\n return output\n}\n\nfunction normalizeIPv6 (host, opts = {}) {\n if (findToken(host, ':') < 2) { return { host, isIPV6: false } }\n const ipv6 = getIPV6(host)\n\n if (!ipv6.error) {\n let newHost = ipv6.address\n let escapedHost = ipv6.address\n if (ipv6.zone) {\n newHost += '%' + ipv6.zone\n escapedHost += '%25' + ipv6.zone\n }\n return { host: newHost, escapedHost, isIPV6: true }\n } else {\n return { host, isIPV6: false }\n }\n}\n\nfunction stripLeadingZeros (str, token) {\n let out = ''\n let skip = true\n const l = str.length\n for (let i = 0; i < l; i++) {\n const c = str[i]\n if (c === '0' && skip) {\n if ((i + 1 <= l && str[i + 1] === token) || i + 1 === l) {\n out += c\n skip = false\n }\n } else {\n if (c === token) {\n skip = true\n } else {\n skip = false\n }\n out += c\n }\n }\n return out\n}\n\nfunction findToken (str, token) {\n let ind = 0\n for (let i = 0; i < str.length; i++) {\n if (str[i] === token) ind++\n }\n return ind\n}\n\nconst RDS1 = /^\\.\\.?\\//u\nconst RDS2 = /^\\/\\.(?:\\/|$)/u\nconst RDS3 = /^\\/\\.\\.(?:\\/|$)/u\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/u\n\nfunction removeDotSegments (input) {\n const output = []\n\n while (input.length) {\n if (input.match(RDS1)) {\n input = input.replace(RDS1, '')\n } else if (input.match(RDS2)) {\n input = input.replace(RDS2, '/')\n } else if (input.match(RDS3)) {\n input = input.replace(RDS3, '/')\n output.pop()\n } else if (input === '.' || input === '..') {\n input = ''\n } else {\n const im = input.match(RDS5)\n if (im) {\n const s = im[0]\n input = input.slice(s.length)\n output.push(s)\n } else {\n throw new Error('Unexpected dot segment condition')\n }\n }\n }\n return output.join('')\n}\n\nfunction normalizeComponentEncoding (components, esc) {\n const func = esc !== true ? escape : unescape\n if (components.scheme !== undefined) {\n components.scheme = func(components.scheme)\n }\n if (components.userinfo !== undefined) {\n components.userinfo = func(components.userinfo)\n }\n if (components.host !== undefined) {\n components.host = func(components.host)\n }\n if (components.path !== undefined) {\n components.path = func(components.path)\n }\n if (components.query !== undefined) {\n components.query = func(components.query)\n }\n if (components.fragment !== undefined) {\n components.fragment = func(components.fragment)\n }\n return components\n}\n\nfunction recomposeAuthority (components, options) {\n const uriTokens = []\n\n if (components.userinfo !== undefined) {\n uriTokens.push(components.userinfo)\n uriTokens.push('@')\n }\n\n if (components.host !== undefined) {\n let host = unescape(components.host)\n const ipV4res = normalizeIPv4(host)\n\n if (ipV4res.isIPV4) {\n host = ipV4res.host\n } else {\n const ipV6res = normalizeIPv6(ipV4res.host, { isIPV4: false })\n if (ipV6res.isIPV6 === true) {\n host = `[${ipV6res.escapedHost}]`\n } else {\n host = components.host\n }\n }\n uriTokens.push(host)\n }\n\n if (typeof components.port === 'number' || typeof components.port === 'string') {\n uriTokens.push(':')\n uriTokens.push(String(components.port))\n }\n\n return uriTokens.length ? uriTokens.join('') : undefined\n};\n\nmodule.exports = {\n recomposeAuthority,\n normalizeComponentEncoding,\n removeDotSegments,\n normalizeIPv4,\n normalizeIPv6,\n stringArrayToHexStripped\n}\n","'use strict'\n\nconst UUID_REG = /^[\\da-f]{8}\\b-[\\da-f]{4}\\b-[\\da-f]{4}\\b-[\\da-f]{4}\\b-[\\da-f]{12}$/iu\nconst URN_REG = /([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-.:;=@]|%[\\da-f]{2})+)/iu\n\nfunction isSecure (wsComponents) {\n return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === 'wss'\n}\n\nfunction httpParse (components) {\n if (!components.host) {\n components.error = components.error || 'HTTP URIs must have a host.'\n }\n\n return components\n}\n\nfunction httpSerialize (components) {\n const secure = String(components.scheme).toLowerCase() === 'https'\n\n // normalize the default port\n if (components.port === (secure ? 443 : 80) || components.port === '') {\n components.port = undefined\n }\n\n // normalize the empty path\n if (!components.path) {\n components.path = '/'\n }\n\n // NOTE: We do not parse query strings for HTTP URIs\n // as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n // and not the HTTP spec.\n\n return components\n}\n\nfunction wsParse (wsComponents) {\n// indicate if the secure flag is set\n wsComponents.secure = isSecure(wsComponents)\n\n // construct resouce name\n wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '')\n wsComponents.path = undefined\n wsComponents.query = undefined\n\n return wsComponents\n}\n\nfunction wsSerialize (wsComponents) {\n// normalize the default port\n if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === '') {\n wsComponents.port = undefined\n }\n\n // ensure scheme matches secure flag\n if (typeof wsComponents.secure === 'boolean') {\n wsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws')\n wsComponents.secure = undefined\n }\n\n // reconstruct path from resource name\n if (wsComponents.resourceName) {\n const [path, query] = wsComponents.resourceName.split('?')\n wsComponents.path = (path && path !== '/' ? path : undefined)\n wsComponents.query = query\n wsComponents.resourceName = undefined\n }\n\n // forbid fragment component\n wsComponents.fragment = undefined\n\n return wsComponents\n}\n\nfunction urnParse (urnComponents, options) {\n if (!urnComponents.path) {\n urnComponents.error = 'URN can not be parsed'\n return urnComponents\n }\n const matches = urnComponents.path.match(URN_REG)\n if (matches) {\n const scheme = options.scheme || urnComponents.scheme || 'urn'\n urnComponents.nid = matches[1].toLowerCase()\n urnComponents.nss = matches[2]\n const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`\n const schemeHandler = SCHEMES[urnScheme]\n urnComponents.path = undefined\n\n if (schemeHandler) {\n urnComponents = schemeHandler.parse(urnComponents, options)\n }\n } else {\n urnComponents.error = urnComponents.error || 'URN can not be parsed.'\n }\n\n return urnComponents\n}\n\nfunction urnSerialize (urnComponents, options) {\n const scheme = options.scheme || urnComponents.scheme || 'urn'\n const nid = urnComponents.nid.toLowerCase()\n const urnScheme = `${scheme}:${options.nid || nid}`\n const schemeHandler = SCHEMES[urnScheme]\n\n if (schemeHandler) {\n urnComponents = schemeHandler.serialize(urnComponents, options)\n }\n\n const uriComponents = urnComponents\n const nss = urnComponents.nss\n uriComponents.path = `${nid || options.nid}:${nss}`\n\n options.skipEscape = true\n return uriComponents\n}\n\nfunction urnuuidParse (urnComponents, options) {\n const uuidComponents = urnComponents\n uuidComponents.uuid = uuidComponents.nss\n uuidComponents.nss = undefined\n\n if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) {\n uuidComponents.error = uuidComponents.error || 'UUID is not valid.'\n }\n\n return uuidComponents\n}\n\nfunction urnuuidSerialize (uuidComponents) {\n const urnComponents = uuidComponents\n // normalize UUID\n urnComponents.nss = (uuidComponents.uuid || '').toLowerCase()\n return urnComponents\n}\n\nconst http = {\n scheme: 'http',\n domainHost: true,\n parse: httpParse,\n serialize: httpSerialize\n}\n\nconst https = {\n scheme: 'https',\n domainHost: http.domainHost,\n parse: httpParse,\n serialize: httpSerialize\n}\n\nconst ws = {\n scheme: 'ws',\n domainHost: true,\n parse: wsParse,\n serialize: wsSerialize\n}\n\nconst wss = {\n scheme: 'wss',\n domainHost: ws.domainHost,\n parse: ws.parse,\n serialize: ws.serialize\n}\n\nconst urn = {\n scheme: 'urn',\n parse: urnParse,\n serialize: urnSerialize,\n skipNormalize: true\n}\n\nconst urnuuid = {\n scheme: 'urn:uuid',\n parse: urnuuidParse,\n serialize: urnuuidSerialize,\n skipNormalize: true\n}\n\nconst SCHEMES = {\n http,\n https,\n ws,\n wss,\n urn,\n 'urn:uuid': urnuuid\n}\n\nmodule.exports = SCHEMES\n","'use strict'\n\nconst { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = require('./lib/utils')\nconst SCHEMES = require('./lib/schemes')\n\nfunction normalize (uri, options) {\n if (typeof uri === 'string') {\n uri = serialize(parse(uri, options), options)\n } else if (typeof uri === 'object') {\n uri = parse(serialize(uri, options), options)\n }\n return uri\n}\n\nfunction resolve (baseURI, relativeURI, options) {\n const schemelessOptions = Object.assign({ scheme: 'null' }, options)\n const resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true)\n return serialize(resolved, { ...schemelessOptions, skipEscape: true })\n}\n\nfunction resolveComponents (base, relative, options, skipNormalization) {\n const target = {}\n if (!skipNormalization) {\n base = parse(serialize(base, options), options) // normalize base components\n relative = parse(serialize(relative, options), options) // normalize relative components\n }\n options = options || {}\n\n if (!options.tolerant && relative.scheme) {\n target.scheme = relative.scheme\n // target.authority = relative.authority;\n target.userinfo = relative.userinfo\n target.host = relative.host\n target.port = relative.port\n target.path = removeDotSegments(relative.path || '')\n target.query = relative.query\n } else {\n if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n // target.authority = relative.authority;\n target.userinfo = relative.userinfo\n target.host = relative.host\n target.port = relative.port\n target.path = removeDotSegments(relative.path || '')\n target.query = relative.query\n } else {\n if (!relative.path) {\n target.path = base.path\n if (relative.query !== undefined) {\n target.query = relative.query\n } else {\n target.query = base.query\n }\n } else {\n if (relative.path.charAt(0) === '/') {\n target.path = removeDotSegments(relative.path)\n } else {\n if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n target.path = '/' + relative.path\n } else if (!base.path) {\n target.path = relative.path\n } else {\n target.path = base.path.slice(0, base.path.lastIndexOf('/') + 1) + relative.path\n }\n target.path = removeDotSegments(target.path)\n }\n target.query = relative.query\n }\n // target.authority = base.authority;\n target.userinfo = base.userinfo\n target.host = base.host\n target.port = base.port\n }\n target.scheme = base.scheme\n }\n\n target.fragment = relative.fragment\n\n return target\n}\n\nfunction equal (uriA, uriB, options) {\n if (typeof uriA === 'string') {\n uriA = unescape(uriA)\n uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), { ...options, skipEscape: true })\n } else if (typeof uriA === 'object') {\n uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true })\n }\n\n if (typeof uriB === 'string') {\n uriB = unescape(uriB)\n uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), { ...options, skipEscape: true })\n } else if (typeof uriB === 'object') {\n uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true })\n }\n\n return uriA.toLowerCase() === uriB.toLowerCase()\n}\n\nfunction serialize (cmpts, opts) {\n const components = {\n host: cmpts.host,\n scheme: cmpts.scheme,\n userinfo: cmpts.userinfo,\n port: cmpts.port,\n path: cmpts.path,\n query: cmpts.query,\n nid: cmpts.nid,\n nss: cmpts.nss,\n uuid: cmpts.uuid,\n fragment: cmpts.fragment,\n reference: cmpts.reference,\n resourceName: cmpts.resourceName,\n secure: cmpts.secure,\n error: ''\n }\n const options = Object.assign({}, opts)\n const uriTokens = []\n\n // find scheme handler\n const schemeHandler = SCHEMES[(options.scheme || components.scheme || '').toLowerCase()]\n\n // perform scheme specific serialization\n if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options)\n\n if (components.path !== undefined) {\n if (!options.skipEscape) {\n components.path = escape(components.path)\n\n if (components.scheme !== undefined) {\n components.path = components.path.split('%3A').join(':')\n }\n } else {\n components.path = unescape(components.path)\n }\n }\n\n if (options.reference !== 'suffix' && components.scheme) {\n uriTokens.push(components.scheme, ':')\n }\n\n const authority = recomposeAuthority(components, options)\n if (authority !== undefined) {\n if (options.reference !== 'suffix') {\n uriTokens.push('//')\n }\n\n uriTokens.push(authority)\n\n if (components.path && components.path.charAt(0) !== '/') {\n uriTokens.push('/')\n }\n }\n if (components.path !== undefined) {\n let s = components.path\n\n if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n s = removeDotSegments(s)\n }\n\n if (authority === undefined) {\n s = s.replace(/^\\/\\//u, '/%2F') // don't allow the path to start with \"//\"\n }\n\n uriTokens.push(s)\n }\n\n if (components.query !== undefined) {\n uriTokens.push('?', components.query)\n }\n\n if (components.fragment !== undefined) {\n uriTokens.push('#', components.fragment)\n }\n return uriTokens.join('')\n}\n\nconst hexLookUp = Array.from({ length: 127 }, (v, k) => /[^!\"$&'()*+,\\-.;=_`a-z{}~]/u.test(String.fromCharCode(k)))\n\nfunction nonSimpleDomain (value) {\n let code = 0\n for (let i = 0, len = value.length; i < len; ++i) {\n code = value.charCodeAt(i)\n if (code > 126 || hexLookUp[code]) {\n return true\n }\n }\n return false\n}\n\nconst URI_PARSE = /^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?/u\n\nfunction parse (uri, opts) {\n const options = Object.assign({}, opts)\n const parsed = {\n scheme: undefined,\n userinfo: undefined,\n host: '',\n port: undefined,\n path: '',\n query: undefined,\n fragment: undefined\n }\n const gotEncoding = uri.indexOf('%') !== -1\n let isIP = false\n if (options.reference === 'suffix') uri = (options.scheme ? options.scheme + ':' : '') + '//' + uri\n\n const matches = uri.match(URI_PARSE)\n\n if (matches) {\n // store each component\n parsed.scheme = matches[1]\n parsed.userinfo = matches[3]\n parsed.host = matches[4]\n parsed.port = parseInt(matches[5], 10)\n parsed.path = matches[6] || ''\n parsed.query = matches[7]\n parsed.fragment = matches[8]\n\n // fix port number\n if (isNaN(parsed.port)) {\n parsed.port = matches[5]\n }\n if (parsed.host) {\n const ipv4result = normalizeIPv4(parsed.host)\n if (ipv4result.isIPV4 === false) {\n const ipv6result = normalizeIPv6(ipv4result.host, { isIPV4: false })\n parsed.host = ipv6result.host.toLowerCase()\n isIP = ipv6result.isIPV6\n } else {\n parsed.host = ipv4result.host\n isIP = true\n }\n }\n if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && !parsed.path && parsed.query === undefined) {\n parsed.reference = 'same-document'\n } else if (parsed.scheme === undefined) {\n parsed.reference = 'relative'\n } else if (parsed.fragment === undefined) {\n parsed.reference = 'absolute'\n } else {\n parsed.reference = 'uri'\n }\n\n // check for reference errors\n if (options.reference && options.reference !== 'suffix' && options.reference !== parsed.reference) {\n parsed.error = parsed.error || 'URI is not a ' + options.reference + ' reference.'\n }\n\n // find scheme handler\n const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || '').toLowerCase()]\n\n // check if scheme can't handle IRIs\n if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n // if host component is a domain name\n if (parsed.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost)) && isIP === false && nonSimpleDomain(parsed.host)) {\n // convert Unicode IDN -> ASCII IDN\n try {\n parsed.host = URL.domainToASCII(parsed.host.toLowerCase())\n } catch (e) {\n parsed.error = parsed.error || \"Host's domain name can not be converted to ASCII: \" + e\n }\n }\n // convert IRI -> URI\n }\n\n if (!schemeHandler || (schemeHandler && !schemeHandler.skipNormalize)) {\n if (gotEncoding && parsed.scheme !== undefined) {\n parsed.scheme = unescape(parsed.scheme)\n }\n if (gotEncoding && parsed.host !== undefined) {\n parsed.host = unescape(parsed.host)\n }\n if (parsed.path !== undefined && parsed.path.length) {\n parsed.path = escape(unescape(parsed.path))\n }\n if (parsed.fragment !== undefined && parsed.fragment.length) {\n parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment))\n }\n }\n\n // perform scheme specific parsing\n if (schemeHandler && schemeHandler.parse) {\n schemeHandler.parse(parsed, options)\n }\n } else {\n parsed.error = parsed.error || 'URI can not be parsed.'\n }\n return parsed\n}\n\nconst fastUri = {\n SCHEMES,\n normalize,\n resolve,\n resolveComponents,\n equal,\n serialize,\n parse\n}\n\nmodule.exports = fastUri\nmodule.exports.default = fastUri\nmodule.exports.fastUri = fastUri\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst uri = require(\"fast-uri\");\nuri.code = 'require(\"ajv/dist/runtime/uri\").default';\nexports.default = uri;\n//# sourceMappingURL=uri.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;\nvar validate_1 = require(\"./compile/validate\");\nObject.defineProperty(exports, \"KeywordCxt\", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });\nvar codegen_1 = require(\"./compile/codegen\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return codegen_1._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return codegen_1.str; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return codegen_1.stringify; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return codegen_1.nil; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return codegen_1.Name; } });\nObject.defineProperty(exports, \"CodeGen\", { enumerable: true, get: function () { return codegen_1.CodeGen; } });\nconst validation_error_1 = require(\"./runtime/validation_error\");\nconst ref_error_1 = require(\"./compile/ref_error\");\nconst rules_1 = require(\"./compile/rules\");\nconst compile_1 = require(\"./compile\");\nconst codegen_2 = require(\"./compile/codegen\");\nconst resolve_1 = require(\"./compile/resolve\");\nconst dataType_1 = require(\"./compile/validate/dataType\");\nconst util_1 = require(\"./compile/util\");\nconst $dataRefSchema = require(\"./refs/data.json\");\nconst uri_1 = require(\"./runtime/uri\");\nconst defaultRegExp = (str, flags) => new RegExp(str, flags);\ndefaultRegExp.code = \"new RegExp\";\nconst META_IGNORE_OPTIONS = [\"removeAdditional\", \"useDefaults\", \"coerceTypes\"];\nconst EXT_SCOPE_NAMES = new Set([\n \"validate\",\n \"serialize\",\n \"parse\",\n \"wrapper\",\n \"root\",\n \"schema\",\n \"keyword\",\n \"pattern\",\n \"formats\",\n \"validate$data\",\n \"func\",\n \"obj\",\n \"Error\",\n]);\nconst removedOptions = {\n errorDataPath: \"\",\n format: \"`validateFormats: false` can be used instead.\",\n nullable: '\"nullable\" keyword is supported by default.',\n jsonPointers: \"Deprecated jsPropertySyntax can be used instead.\",\n extendRefs: \"Deprecated ignoreKeywordsWithRef can be used instead.\",\n missingRefs: \"Pass empty schema with $id that should be ignored to ajv.addSchema.\",\n processCode: \"Use option `code: {process: (code, schemaEnv: object) => string}`\",\n sourceCode: \"Use option `code: {source: true}`\",\n strictDefaults: \"It is default now, see option `strict`.\",\n strictKeywords: \"It is default now, see option `strict`.\",\n uniqueItems: '\"uniqueItems\" keyword is always validated.',\n unknownFormats: \"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).\",\n cache: \"Map is used as cache, schema object as key.\",\n serialize: \"Map is used as cache, schema object as key.\",\n ajvErrors: \"It is default now.\",\n};\nconst deprecatedOptions = {\n ignoreKeywordsWithRef: \"\",\n jsPropertySyntax: \"\",\n unicode: '\"minLength\"/\"maxLength\" account for unicode characters by default.',\n};\nconst MAX_EXPRESSION = 200;\n// eslint-disable-next-line complexity\nfunction requiredOptions(o) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;\n const s = o.strict;\n const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;\n const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0;\n const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;\n const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;\n return {\n strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,\n strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,\n strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : \"log\",\n strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : \"log\",\n strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,\n code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp },\n loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,\n loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,\n meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,\n messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,\n inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,\n schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : \"$id\",\n addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,\n validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,\n validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,\n unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,\n int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,\n uriResolver: uriResolver,\n };\n}\nclass Ajv {\n constructor(opts = {}) {\n this.schemas = {};\n this.refs = {};\n this.formats = {};\n this._compilations = new Set();\n this._loading = {};\n this._cache = new Map();\n opts = this.opts = { ...opts, ...requiredOptions(opts) };\n const { es5, lines } = this.opts.code;\n this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines });\n this.logger = getLogger(opts.logger);\n const formatOpt = opts.validateFormats;\n opts.validateFormats = false;\n this.RULES = (0, rules_1.getRules)();\n checkOptions.call(this, removedOptions, opts, \"NOT SUPPORTED\");\n checkOptions.call(this, deprecatedOptions, opts, \"DEPRECATED\", \"warn\");\n this._metaOpts = getMetaSchemaOptions.call(this);\n if (opts.formats)\n addInitialFormats.call(this);\n this._addVocabularies();\n this._addDefaultMetaSchema();\n if (opts.keywords)\n addInitialKeywords.call(this, opts.keywords);\n if (typeof opts.meta == \"object\")\n this.addMetaSchema(opts.meta);\n addInitialSchemas.call(this);\n opts.validateFormats = formatOpt;\n }\n _addVocabularies() {\n this.addKeyword(\"$async\");\n }\n _addDefaultMetaSchema() {\n const { $data, meta, schemaId } = this.opts;\n let _dataRefSchema = $dataRefSchema;\n if (schemaId === \"id\") {\n _dataRefSchema = { ...$dataRefSchema };\n _dataRefSchema.id = _dataRefSchema.$id;\n delete _dataRefSchema.$id;\n }\n if (meta && $data)\n this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);\n }\n defaultMeta() {\n const { meta, schemaId } = this.opts;\n return (this.opts.defaultMeta = typeof meta == \"object\" ? meta[schemaId] || meta : undefined);\n }\n validate(schemaKeyRef, // key, ref or schema object\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n data // to be validated\n ) {\n let v;\n if (typeof schemaKeyRef == \"string\") {\n v = this.getSchema(schemaKeyRef);\n if (!v)\n throw new Error(`no schema with key or ref \"${schemaKeyRef}\"`);\n }\n else {\n v = this.compile(schemaKeyRef);\n }\n const valid = v(data);\n if (!(\"$async\" in v))\n this.errors = v.errors;\n return valid;\n }\n compile(schema, _meta) {\n const sch = this._addSchema(schema, _meta);\n return (sch.validate || this._compileSchemaEnv(sch));\n }\n compileAsync(schema, meta) {\n if (typeof this.opts.loadSchema != \"function\") {\n throw new Error(\"options.loadSchema should be a function\");\n }\n const { loadSchema } = this.opts;\n return runCompileAsync.call(this, schema, meta);\n async function runCompileAsync(_schema, _meta) {\n await loadMetaSchema.call(this, _schema.$schema);\n const sch = this._addSchema(_schema, _meta);\n return sch.validate || _compileAsync.call(this, sch);\n }\n async function loadMetaSchema($ref) {\n if ($ref && !this.getSchema($ref)) {\n await runCompileAsync.call(this, { $ref }, true);\n }\n }\n async function _compileAsync(sch) {\n try {\n return this._compileSchemaEnv(sch);\n }\n catch (e) {\n if (!(e instanceof ref_error_1.default))\n throw e;\n checkLoaded.call(this, e);\n await loadMissingSchema.call(this, e.missingSchema);\n return _compileAsync.call(this, sch);\n }\n }\n function checkLoaded({ missingSchema: ref, missingRef }) {\n if (this.refs[ref]) {\n throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);\n }\n }\n async function loadMissingSchema(ref) {\n const _schema = await _loadSchema.call(this, ref);\n if (!this.refs[ref])\n await loadMetaSchema.call(this, _schema.$schema);\n if (!this.refs[ref])\n this.addSchema(_schema, ref, meta);\n }\n async function _loadSchema(ref) {\n const p = this._loading[ref];\n if (p)\n return p;\n try {\n return await (this._loading[ref] = loadSchema(ref));\n }\n finally {\n delete this._loading[ref];\n }\n }\n }\n // Adds schema to the instance\n addSchema(schema, // If array is passed, `key` will be ignored\n key, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n _meta, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n _validateSchema = this.opts.validateSchema // false to skip schema validation. Used internally, option validateSchema should be used instead.\n ) {\n if (Array.isArray(schema)) {\n for (const sch of schema)\n this.addSchema(sch, undefined, _meta, _validateSchema);\n return this;\n }\n let id;\n if (typeof schema === \"object\") {\n const { schemaId } = this.opts;\n id = schema[schemaId];\n if (id !== undefined && typeof id != \"string\") {\n throw new Error(`schema ${schemaId} must be string`);\n }\n }\n key = (0, resolve_1.normalizeId)(key || id);\n this._checkUnique(key);\n this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);\n return this;\n }\n // Add schema that will be used to validate other schemas\n // options in META_IGNORE_OPTIONS are alway set to false\n addMetaSchema(schema, key, // schema key\n _validateSchema = this.opts.validateSchema // false to skip schema validation, can be used to override validateSchema option for meta-schema\n ) {\n this.addSchema(schema, key, true, _validateSchema);\n return this;\n }\n // Validate schema against its meta-schema\n validateSchema(schema, throwOrLogError) {\n if (typeof schema == \"boolean\")\n return true;\n let $schema;\n $schema = schema.$schema;\n if ($schema !== undefined && typeof $schema != \"string\") {\n throw new Error(\"$schema must be a string\");\n }\n $schema = $schema || this.opts.defaultMeta || this.defaultMeta();\n if (!$schema) {\n this.logger.warn(\"meta-schema not available\");\n this.errors = null;\n return true;\n }\n const valid = this.validate($schema, schema);\n if (!valid && throwOrLogError) {\n const message = \"schema is invalid: \" + this.errorsText();\n if (this.opts.validateSchema === \"log\")\n this.logger.error(message);\n else\n throw new Error(message);\n }\n return valid;\n }\n // Get compiled schema by `key` or `ref`.\n // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)\n getSchema(keyRef) {\n let sch;\n while (typeof (sch = getSchEnv.call(this, keyRef)) == \"string\")\n keyRef = sch;\n if (sch === undefined) {\n const { schemaId } = this.opts;\n const root = new compile_1.SchemaEnv({ schema: {}, schemaId });\n sch = compile_1.resolveSchema.call(this, root, keyRef);\n if (!sch)\n return;\n this.refs[keyRef] = sch;\n }\n return (sch.validate || this._compileSchemaEnv(sch));\n }\n // Remove cached schema(s).\n // If no parameter is passed all schemas but meta-schemas are removed.\n // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.\n // Even if schema is referenced by other schemas it still can be removed as other schemas have local references.\n removeSchema(schemaKeyRef) {\n if (schemaKeyRef instanceof RegExp) {\n this._removeAllSchemas(this.schemas, schemaKeyRef);\n this._removeAllSchemas(this.refs, schemaKeyRef);\n return this;\n }\n switch (typeof schemaKeyRef) {\n case \"undefined\":\n this._removeAllSchemas(this.schemas);\n this._removeAllSchemas(this.refs);\n this._cache.clear();\n return this;\n case \"string\": {\n const sch = getSchEnv.call(this, schemaKeyRef);\n if (typeof sch == \"object\")\n this._cache.delete(sch.schema);\n delete this.schemas[schemaKeyRef];\n delete this.refs[schemaKeyRef];\n return this;\n }\n case \"object\": {\n const cacheKey = schemaKeyRef;\n this._cache.delete(cacheKey);\n let id = schemaKeyRef[this.opts.schemaId];\n if (id) {\n id = (0, resolve_1.normalizeId)(id);\n delete this.schemas[id];\n delete this.refs[id];\n }\n return this;\n }\n default:\n throw new Error(\"ajv.removeSchema: invalid parameter\");\n }\n }\n // add \"vocabulary\" - a collection of keywords\n addVocabulary(definitions) {\n for (const def of definitions)\n this.addKeyword(def);\n return this;\n }\n addKeyword(kwdOrDef, def // deprecated\n ) {\n let keyword;\n if (typeof kwdOrDef == \"string\") {\n keyword = kwdOrDef;\n if (typeof def == \"object\") {\n this.logger.warn(\"these parameters are deprecated, see docs for addKeyword\");\n def.keyword = keyword;\n }\n }\n else if (typeof kwdOrDef == \"object\" && def === undefined) {\n def = kwdOrDef;\n keyword = def.keyword;\n if (Array.isArray(keyword) && !keyword.length) {\n throw new Error(\"addKeywords: keyword must be string or non-empty array\");\n }\n }\n else {\n throw new Error(\"invalid addKeywords parameters\");\n }\n checkKeyword.call(this, keyword, def);\n if (!def) {\n (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));\n return this;\n }\n keywordMetaschema.call(this, def);\n const definition = {\n ...def,\n type: (0, dataType_1.getJSONTypes)(def.type),\n schemaType: (0, dataType_1.getJSONTypes)(def.schemaType),\n };\n (0, util_1.eachItem)(keyword, definition.type.length === 0\n ? (k) => addRule.call(this, k, definition)\n : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));\n return this;\n }\n getKeyword(keyword) {\n const rule = this.RULES.all[keyword];\n return typeof rule == \"object\" ? rule.definition : !!rule;\n }\n // Remove keyword\n removeKeyword(keyword) {\n // TODO return type should be Ajv\n const { RULES } = this;\n delete RULES.keywords[keyword];\n delete RULES.all[keyword];\n for (const group of RULES.rules) {\n const i = group.rules.findIndex((rule) => rule.keyword === keyword);\n if (i >= 0)\n group.rules.splice(i, 1);\n }\n return this;\n }\n // Add format\n addFormat(name, format) {\n if (typeof format == \"string\")\n format = new RegExp(format);\n this.formats[name] = format;\n return this;\n }\n errorsText(errors = this.errors, // optional array of validation errors\n { separator = \", \", dataVar = \"data\" } = {} // optional options with properties `separator` and `dataVar`\n ) {\n if (!errors || errors.length === 0)\n return \"No errors\";\n return errors\n .map((e) => `${dataVar}${e.instancePath} ${e.message}`)\n .reduce((text, msg) => text + separator + msg);\n }\n $dataMetaSchema(metaSchema, keywordsJsonPointers) {\n const rules = this.RULES.all;\n metaSchema = JSON.parse(JSON.stringify(metaSchema));\n for (const jsonPointer of keywordsJsonPointers) {\n const segments = jsonPointer.split(\"/\").slice(1); // first segment is an empty string\n let keywords = metaSchema;\n for (const seg of segments)\n keywords = keywords[seg];\n for (const key in rules) {\n const rule = rules[key];\n if (typeof rule != \"object\")\n continue;\n const { $data } = rule.definition;\n const schema = keywords[key];\n if ($data && schema)\n keywords[key] = schemaOrData(schema);\n }\n }\n return metaSchema;\n }\n _removeAllSchemas(schemas, regex) {\n for (const keyRef in schemas) {\n const sch = schemas[keyRef];\n if (!regex || regex.test(keyRef)) {\n if (typeof sch == \"string\") {\n delete schemas[keyRef];\n }\n else if (sch && !sch.meta) {\n this._cache.delete(sch.schema);\n delete schemas[keyRef];\n }\n }\n }\n }\n _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {\n let id;\n const { schemaId } = this.opts;\n if (typeof schema == \"object\") {\n id = schema[schemaId];\n }\n else {\n if (this.opts.jtd)\n throw new Error(\"schema must be object\");\n else if (typeof schema != \"boolean\")\n throw new Error(\"schema must be object or boolean\");\n }\n let sch = this._cache.get(schema);\n if (sch !== undefined)\n return sch;\n baseId = (0, resolve_1.normalizeId)(id || baseId);\n const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);\n sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });\n this._cache.set(sch.schema, sch);\n if (addSchema && !baseId.startsWith(\"#\")) {\n // TODO atm it is allowed to overwrite schemas without id (instead of not adding them)\n if (baseId)\n this._checkUnique(baseId);\n this.refs[baseId] = sch;\n }\n if (validateSchema)\n this.validateSchema(schema, true);\n return sch;\n }\n _checkUnique(id) {\n if (this.schemas[id] || this.refs[id]) {\n throw new Error(`schema with key or id \"${id}\" already exists`);\n }\n }\n _compileSchemaEnv(sch) {\n if (sch.meta)\n this._compileMetaSchema(sch);\n else\n compile_1.compileSchema.call(this, sch);\n /* istanbul ignore if */\n if (!sch.validate)\n throw new Error(\"ajv implementation error\");\n return sch.validate;\n }\n _compileMetaSchema(sch) {\n const currentOpts = this.opts;\n this.opts = this._metaOpts;\n try {\n compile_1.compileSchema.call(this, sch);\n }\n finally {\n this.opts = currentOpts;\n }\n }\n}\nAjv.ValidationError = validation_error_1.default;\nAjv.MissingRefError = ref_error_1.default;\nexports.default = Ajv;\nfunction checkOptions(checkOpts, options, msg, log = \"error\") {\n for (const key in checkOpts) {\n const opt = key;\n if (opt in options)\n this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);\n }\n}\nfunction getSchEnv(keyRef) {\n keyRef = (0, resolve_1.normalizeId)(keyRef); // TODO tests fail without this line\n return this.schemas[keyRef] || this.refs[keyRef];\n}\nfunction addInitialSchemas() {\n const optsSchemas = this.opts.schemas;\n if (!optsSchemas)\n return;\n if (Array.isArray(optsSchemas))\n this.addSchema(optsSchemas);\n else\n for (const key in optsSchemas)\n this.addSchema(optsSchemas[key], key);\n}\nfunction addInitialFormats() {\n for (const name in this.opts.formats) {\n const format = this.opts.formats[name];\n if (format)\n this.addFormat(name, format);\n }\n}\nfunction addInitialKeywords(defs) {\n if (Array.isArray(defs)) {\n this.addVocabulary(defs);\n return;\n }\n this.logger.warn(\"keywords option as map is deprecated, pass array\");\n for (const keyword in defs) {\n const def = defs[keyword];\n if (!def.keyword)\n def.keyword = keyword;\n this.addKeyword(def);\n }\n}\nfunction getMetaSchemaOptions() {\n const metaOpts = { ...this.opts };\n for (const opt of META_IGNORE_OPTIONS)\n delete metaOpts[opt];\n return metaOpts;\n}\nconst noLogs = { log() { }, warn() { }, error() { } };\nfunction getLogger(logger) {\n if (logger === false)\n return noLogs;\n if (logger === undefined)\n return console;\n if (logger.log && logger.warn && logger.error)\n return logger;\n throw new Error(\"logger must implement log, warn and error methods\");\n}\nconst KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;\nfunction checkKeyword(keyword, def) {\n const { RULES } = this;\n (0, util_1.eachItem)(keyword, (kwd) => {\n if (RULES.keywords[kwd])\n throw new Error(`Keyword ${kwd} is already defined`);\n if (!KEYWORD_NAME.test(kwd))\n throw new Error(`Keyword ${kwd} has invalid name`);\n });\n if (!def)\n return;\n if (def.$data && !(\"code\" in def || \"validate\" in def)) {\n throw new Error('$data keyword must have \"code\" or \"validate\" function');\n }\n}\nfunction addRule(keyword, definition, dataType) {\n var _a;\n const post = definition === null || definition === void 0 ? void 0 : definition.post;\n if (dataType && post)\n throw new Error('keyword with \"post\" flag cannot have \"type\"');\n const { RULES } = this;\n let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);\n if (!ruleGroup) {\n ruleGroup = { type: dataType, rules: [] };\n RULES.rules.push(ruleGroup);\n }\n RULES.keywords[keyword] = true;\n if (!definition)\n return;\n const rule = {\n keyword,\n definition: {\n ...definition,\n type: (0, dataType_1.getJSONTypes)(definition.type),\n schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType),\n },\n };\n if (definition.before)\n addBeforeRule.call(this, ruleGroup, rule, definition.before);\n else\n ruleGroup.rules.push(rule);\n RULES.all[keyword] = rule;\n (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));\n}\nfunction addBeforeRule(ruleGroup, rule, before) {\n const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);\n if (i >= 0) {\n ruleGroup.rules.splice(i, 0, rule);\n }\n else {\n ruleGroup.rules.push(rule);\n this.logger.warn(`rule ${before} is not defined`);\n }\n}\nfunction keywordMetaschema(def) {\n let { metaSchema } = def;\n if (metaSchema === undefined)\n return;\n if (def.$data && this.opts.$data)\n metaSchema = schemaOrData(metaSchema);\n def.validateSchema = this.compile(metaSchema, true);\n}\nconst $dataRef = {\n $ref: \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n};\nfunction schemaOrData(schema) {\n return { anyOf: [schema, $dataRef] };\n}\n//# sourceMappingURL=core.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst def = {\n keyword: \"id\",\n code() {\n throw new Error('NOT SUPPORTED: keyword \"id\", use \"$id\" for schema ID');\n },\n};\nexports.default = def;\n//# sourceMappingURL=id.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.callRef = exports.getValidate = void 0;\nconst ref_error_1 = require(\"../../compile/ref_error\");\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst compile_1 = require(\"../../compile\");\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"$ref\",\n schemaType: \"string\",\n code(cxt) {\n const { gen, schema: $ref, it } = cxt;\n const { baseId, schemaEnv: env, validateName, opts, self } = it;\n const { root } = env;\n if (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId)\n return callRootRef();\n const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);\n if (schOrEnv === undefined)\n throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);\n if (schOrEnv instanceof compile_1.SchemaEnv)\n return callValidate(schOrEnv);\n return inlineRefSchema(schOrEnv);\n function callRootRef() {\n if (env === root)\n return callRef(cxt, validateName, env, env.$async);\n const rootName = gen.scopeValue(\"root\", { ref: root });\n return callRef(cxt, (0, codegen_1._) `${rootName}.validate`, root, root.$async);\n }\n function callValidate(sch) {\n const v = getValidate(cxt, sch);\n callRef(cxt, v, sch, sch.$async);\n }\n function inlineRefSchema(sch) {\n const schName = gen.scopeValue(\"schema\", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });\n const valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({\n schema: sch,\n dataTypes: [],\n schemaPath: codegen_1.nil,\n topSchemaRef: schName,\n errSchemaPath: $ref,\n }, valid);\n cxt.mergeEvaluated(schCxt);\n cxt.ok(valid);\n }\n },\n};\nfunction getValidate(cxt, sch) {\n const { gen } = cxt;\n return sch.validate\n ? gen.scopeValue(\"validate\", { ref: sch.validate })\n : (0, codegen_1._) `${gen.scopeValue(\"wrapper\", { ref: sch })}.validate`;\n}\nexports.getValidate = getValidate;\nfunction callRef(cxt, v, sch, $async) {\n const { gen, it } = cxt;\n const { allErrors, schemaEnv: env, opts } = it;\n const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;\n if ($async)\n callAsyncRef();\n else\n callSyncRef();\n function callAsyncRef() {\n if (!env.$async)\n throw new Error(\"async schema referenced by sync schema\");\n const valid = gen.let(\"valid\");\n gen.try(() => {\n gen.code((0, codegen_1._) `await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);\n addEvaluatedFrom(v); // TODO will not work with async, it has to be returned with the result\n if (!allErrors)\n gen.assign(valid, true);\n }, (e) => {\n gen.if((0, codegen_1._) `!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));\n addErrorsFrom(e);\n if (!allErrors)\n gen.assign(valid, false);\n });\n cxt.ok(valid);\n }\n function callSyncRef() {\n cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));\n }\n function addErrorsFrom(source) {\n const errs = (0, codegen_1._) `${source}.errors`;\n gen.assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); // TODO tagged\n gen.assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);\n }\n function addEvaluatedFrom(source) {\n var _a;\n if (!it.opts.unevaluated)\n return;\n const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;\n // TODO refactor\n if (it.props !== true) {\n if (schEvaluated && !schEvaluated.dynamicProps) {\n if (schEvaluated.props !== undefined) {\n it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);\n }\n }\n else {\n const props = gen.var(\"props\", (0, codegen_1._) `${source}.evaluated.props`);\n it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);\n }\n }\n if (it.items !== true) {\n if (schEvaluated && !schEvaluated.dynamicItems) {\n if (schEvaluated.items !== undefined) {\n it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);\n }\n }\n else {\n const items = gen.var(\"items\", (0, codegen_1._) `${source}.evaluated.items`);\n it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);\n }\n }\n }\n}\nexports.callRef = callRef;\nexports.default = def;\n//# sourceMappingURL=ref.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst id_1 = require(\"./id\");\nconst ref_1 = require(\"./ref\");\nconst core = [\n \"$schema\",\n \"$id\",\n \"$defs\",\n \"$vocabulary\",\n { keyword: \"$comment\" },\n \"definitions\",\n id_1.default,\n ref_1.default,\n];\nexports.default = core;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst ops = codegen_1.operators;\nconst KWDs = {\n maximum: { okStr: \"<=\", ok: ops.LTE, fail: ops.GT },\n minimum: { okStr: \">=\", ok: ops.GTE, fail: ops.LT },\n exclusiveMaximum: { okStr: \"<\", ok: ops.LT, fail: ops.GTE },\n exclusiveMinimum: { okStr: \">\", ok: ops.GT, fail: ops.LTE },\n};\nconst error = {\n message: ({ keyword, schemaCode }) => (0, codegen_1.str) `must be ${KWDs[keyword].okStr} ${schemaCode}`,\n params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: Object.keys(KWDs),\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n cxt.fail$data((0, codegen_1._) `${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitNumber.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must be multiple of ${schemaCode}`,\n params: ({ schemaCode }) => (0, codegen_1._) `{multipleOf: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"multipleOf\",\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, schemaCode, it } = cxt;\n // const bdt = bad$DataType(schemaCode, def.schemaType, $data)\n const prec = it.opts.multipleOfPrecision;\n const res = gen.let(\"res\");\n const invalid = prec\n ? (0, codegen_1._) `Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}`\n : (0, codegen_1._) `${res} !== parseInt(${res})`;\n cxt.fail$data((0, codegen_1._) `(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=multipleOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// https://mathiasbynens.be/notes/javascript-encoding\n// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode\nfunction ucs2length(str) {\n const len = str.length;\n let length = 0;\n let pos = 0;\n let value;\n while (pos < len) {\n length++;\n value = str.charCodeAt(pos++);\n if (value >= 0xd800 && value <= 0xdbff && pos < len) {\n // high surrogate, and there is a next character\n value = str.charCodeAt(pos);\n if ((value & 0xfc00) === 0xdc00)\n pos++; // low surrogate\n }\n }\n return length;\n}\nexports.default = ucs2length;\nucs2length.code = 'require(\"ajv/dist/runtime/ucs2length\").default';\n//# sourceMappingURL=ucs2length.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst ucs2length_1 = require(\"../../runtime/ucs2length\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxLength\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} characters`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxLength\", \"minLength\"],\n type: \"string\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode, it } = cxt;\n const op = keyword === \"maxLength\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n const len = it.opts.unicode === false ? (0, codegen_1._) `${data}.length` : (0, codegen_1._) `${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;\n cxt.fail$data((0, codegen_1._) `${len} ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitLength.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must match pattern \"${schemaCode}\"`,\n params: ({ schemaCode }) => (0, codegen_1._) `{pattern: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"pattern\",\n type: \"string\",\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt) {\n const { data, $data, schema, schemaCode, it } = cxt;\n // TODO regexp should be wrapped in try/catchs\n const u = it.opts.unicodeRegExp ? \"u\" : \"\";\n const regExp = $data ? (0, codegen_1._) `(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema);\n cxt.fail$data((0, codegen_1._) `!${regExp}.test(${data})`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=pattern.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxProperties\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} properties`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxProperties\", \"minProperties\"],\n type: \"object\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n const op = keyword === \"maxProperties\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n cxt.fail$data((0, codegen_1._) `Object.keys(${data}).length ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { missingProperty } }) => (0, codegen_1.str) `must have required property '${missingProperty}'`,\n params: ({ params: { missingProperty } }) => (0, codegen_1._) `{missingProperty: ${missingProperty}}`,\n};\nconst def = {\n keyword: \"required\",\n type: \"object\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt) {\n const { gen, schema, schemaCode, data, $data, it } = cxt;\n const { opts } = it;\n if (!$data && schema.length === 0)\n return;\n const useLoop = schema.length >= opts.loopRequired;\n if (it.allErrors)\n allErrorsMode();\n else\n exitOnErrorMode();\n if (opts.strictRequired) {\n const props = cxt.parentSchema.properties;\n const { definedProperties } = cxt.it;\n for (const requiredKey of schema) {\n if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === undefined && !definedProperties.has(requiredKey)) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n const msg = `required property \"${requiredKey}\" is not defined at \"${schemaPath}\" (strictRequired)`;\n (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);\n }\n }\n }\n function allErrorsMode() {\n if (useLoop || $data) {\n cxt.block$data(codegen_1.nil, loopAllRequired);\n }\n else {\n for (const prop of schema) {\n (0, code_1.checkReportMissingProp)(cxt, prop);\n }\n }\n }\n function exitOnErrorMode() {\n const missing = gen.let(\"missing\");\n if (useLoop || $data) {\n const valid = gen.let(\"valid\", true);\n cxt.block$data(valid, () => loopUntilMissing(missing, valid));\n cxt.ok(valid);\n }\n else {\n gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));\n (0, code_1.reportMissingProp)(cxt, missing);\n gen.else();\n }\n }\n function loopAllRequired() {\n gen.forOf(\"prop\", schemaCode, (prop) => {\n cxt.setParams({ missingProperty: prop });\n gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());\n });\n }\n function loopUntilMissing(missing, valid) {\n cxt.setParams({ missingProperty: missing });\n gen.forOf(missing, schemaCode, () => {\n gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.error();\n gen.break();\n });\n }, codegen_1.nil);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=required.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxItems\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} items`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxItems\", \"minItems\"],\n type: \"array\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n const op = keyword === \"maxItems\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n cxt.fail$data((0, codegen_1._) `${data}.length ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// https://github.com/ajv-validator/ajv/issues/889\nconst equal = require(\"fast-deep-equal\");\nequal.code = 'require(\"ajv/dist/runtime/equal\").default';\nexports.default = equal;\n//# sourceMappingURL=equal.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dataType_1 = require(\"../../compile/validate/dataType\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: ({ params: { i, j } }) => (0, codegen_1.str) `must NOT have duplicate items (items ## ${j} and ${i} are identical)`,\n params: ({ params: { i, j } }) => (0, codegen_1._) `{i: ${i}, j: ${j}}`,\n};\nconst def = {\n keyword: \"uniqueItems\",\n type: \"array\",\n schemaType: \"boolean\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;\n if (!$data && !schema)\n return;\n const valid = gen.let(\"valid\");\n const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];\n cxt.block$data(valid, validateUniqueItems, (0, codegen_1._) `${schemaCode} === false`);\n cxt.ok(valid);\n function validateUniqueItems() {\n const i = gen.let(\"i\", (0, codegen_1._) `${data}.length`);\n const j = gen.let(\"j\");\n cxt.setParams({ i, j });\n gen.assign(valid, true);\n gen.if((0, codegen_1._) `${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));\n }\n function canOptimize() {\n return itemTypes.length > 0 && !itemTypes.some((t) => t === \"object\" || t === \"array\");\n }\n function loopN(i, j) {\n const item = gen.name(\"item\");\n const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);\n const indices = gen.const(\"indices\", (0, codegen_1._) `{}`);\n gen.for((0, codegen_1._) `;${i}--;`, () => {\n gen.let(item, (0, codegen_1._) `${data}[${i}]`);\n gen.if(wrongType, (0, codegen_1._) `continue`);\n if (itemTypes.length > 1)\n gen.if((0, codegen_1._) `typeof ${item} == \"string\"`, (0, codegen_1._) `${item} += \"_\"`);\n gen\n .if((0, codegen_1._) `typeof ${indices}[${item}] == \"number\"`, () => {\n gen.assign(j, (0, codegen_1._) `${indices}[${item}]`);\n cxt.error();\n gen.assign(valid, false).break();\n })\n .code((0, codegen_1._) `${indices}[${item}] = ${i}`);\n });\n }\n function loopN2(i, j) {\n const eql = (0, util_1.useFunc)(gen, equal_1.default);\n const outer = gen.name(\"outer\");\n gen.label(outer).for((0, codegen_1._) `;${i}--;`, () => gen.for((0, codegen_1._) `${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._) `${eql}(${data}[${i}], ${data}[${j}])`, () => {\n cxt.error();\n gen.assign(valid, false).break(outer);\n })));\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=uniqueItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: \"must be equal to constant\",\n params: ({ schemaCode }) => (0, codegen_1._) `{allowedValue: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"const\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schemaCode, schema } = cxt;\n if ($data || (schema && typeof schema == \"object\")) {\n cxt.fail$data((0, codegen_1._) `!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);\n }\n else {\n cxt.fail((0, codegen_1._) `${schema} !== ${data}`);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=const.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: \"must be equal to one of the allowed values\",\n params: ({ schemaCode }) => (0, codegen_1._) `{allowedValues: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"enum\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schema, schemaCode, it } = cxt;\n if (!$data && schema.length === 0)\n throw new Error(\"enum must have non-empty array\");\n const useLoop = schema.length >= it.opts.loopEnum;\n let eql;\n const getEql = () => (eql !== null && eql !== void 0 ? eql : (eql = (0, util_1.useFunc)(gen, equal_1.default)));\n let valid;\n if (useLoop || $data) {\n valid = gen.let(\"valid\");\n cxt.block$data(valid, loopEnum);\n }\n else {\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const vSchema = gen.const(\"vSchema\", schemaCode);\n valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));\n }\n cxt.pass(valid);\n function loopEnum() {\n gen.assign(valid, false);\n gen.forOf(\"v\", schemaCode, (v) => gen.if((0, codegen_1._) `${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));\n }\n function equalCode(vSchema, i) {\n const sch = schema[i];\n return typeof sch === \"object\" && sch !== null\n ? (0, codegen_1._) `${getEql()}(${data}, ${vSchema}[${i}])`\n : (0, codegen_1._) `${data} === ${sch}`;\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=enum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst limitNumber_1 = require(\"./limitNumber\");\nconst multipleOf_1 = require(\"./multipleOf\");\nconst limitLength_1 = require(\"./limitLength\");\nconst pattern_1 = require(\"./pattern\");\nconst limitProperties_1 = require(\"./limitProperties\");\nconst required_1 = require(\"./required\");\nconst limitItems_1 = require(\"./limitItems\");\nconst uniqueItems_1 = require(\"./uniqueItems\");\nconst const_1 = require(\"./const\");\nconst enum_1 = require(\"./enum\");\nconst validation = [\n // number\n limitNumber_1.default,\n multipleOf_1.default,\n // string\n limitLength_1.default,\n pattern_1.default,\n // object\n limitProperties_1.default,\n required_1.default,\n // array\n limitItems_1.default,\n uniqueItems_1.default,\n // any\n { keyword: \"type\", schemaType: [\"string\", \"array\"] },\n { keyword: \"nullable\", schemaType: \"boolean\" },\n const_1.default,\n enum_1.default,\n];\nexports.default = validation;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateAdditionalItems = void 0;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`,\n params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`,\n};\nconst def = {\n keyword: \"additionalItems\",\n type: \"array\",\n schemaType: [\"boolean\", \"object\"],\n before: \"uniqueItems\",\n error,\n code(cxt) {\n const { parentSchema, it } = cxt;\n const { items } = parentSchema;\n if (!Array.isArray(items)) {\n (0, util_1.checkStrictMode)(it, '\"additionalItems\" is ignored when \"items\" is not an array of schemas');\n return;\n }\n validateAdditionalItems(cxt, items);\n },\n};\nfunction validateAdditionalItems(cxt, items) {\n const { gen, schema, data, keyword, it } = cxt;\n it.items = true;\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n if (schema === false) {\n cxt.setParams({ len: items.length });\n cxt.pass((0, codegen_1._) `${len} <= ${items.length}`);\n }\n else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen.var(\"valid\", (0, codegen_1._) `${len} <= ${items.length}`); // TODO var\n gen.if((0, codegen_1.not)(valid), () => validateItems(valid));\n cxt.ok(valid);\n }\n function validateItems(valid) {\n gen.forRange(\"i\", items.length, len, (i) => {\n cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid);\n if (!it.allErrors)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n });\n }\n}\nexports.validateAdditionalItems = validateAdditionalItems;\nexports.default = def;\n//# sourceMappingURL=additionalItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateTuple = void 0;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nconst def = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"array\", \"boolean\"],\n before: \"uniqueItems\",\n code(cxt) {\n const { schema, it } = cxt;\n if (Array.isArray(schema))\n return validateTuple(cxt, \"additionalItems\", schema);\n it.items = true;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n cxt.ok((0, code_1.validateArray)(cxt));\n },\n};\nfunction validateTuple(cxt, extraItems, schArr = cxt.schema) {\n const { gen, parentSchema, data, keyword, it } = cxt;\n checkStrictTuple(parentSchema);\n if (it.opts.unevaluated && schArr.length && it.items !== true) {\n it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);\n }\n const valid = gen.name(\"valid\");\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n schArr.forEach((sch, i) => {\n if ((0, util_1.alwaysValidSchema)(it, sch))\n return;\n gen.if((0, codegen_1._) `${len} > ${i}`, () => cxt.subschema({\n keyword,\n schemaProp: i,\n dataProp: i,\n }, valid));\n cxt.ok(valid);\n });\n function checkStrictTuple(sch) {\n const { opts, errSchemaPath } = it;\n const l = schArr.length;\n const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);\n if (opts.strictTuples && !fullTuple) {\n const msg = `\"${keyword}\" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path \"${errSchemaPath}\"`;\n (0, util_1.checkStrictMode)(it, msg, opts.strictTuples);\n }\n }\n}\nexports.validateTuple = validateTuple;\nexports.default = def;\n//# sourceMappingURL=items.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst items_1 = require(\"./items\");\nconst def = {\n keyword: \"prefixItems\",\n type: \"array\",\n schemaType: [\"array\"],\n before: \"uniqueItems\",\n code: (cxt) => (0, items_1.validateTuple)(cxt, \"items\"),\n};\nexports.default = def;\n//# sourceMappingURL=prefixItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nconst additionalItems_1 = require(\"./additionalItems\");\nconst error = {\n message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`,\n params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`,\n};\nconst def = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n error,\n code(cxt) {\n const { schema, parentSchema, it } = cxt;\n const { prefixItems } = parentSchema;\n it.items = true;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n if (prefixItems)\n (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);\n else\n cxt.ok((0, code_1.validateArray)(cxt));\n },\n};\nexports.default = def;\n//# sourceMappingURL=items2020.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { min, max } }) => max === undefined\n ? (0, codegen_1.str) `must contain at least ${min} valid item(s)`\n : (0, codegen_1.str) `must contain at least ${min} and no more than ${max} valid item(s)`,\n params: ({ params: { min, max } }) => max === undefined ? (0, codegen_1._) `{minContains: ${min}}` : (0, codegen_1._) `{minContains: ${min}, maxContains: ${max}}`,\n};\nconst def = {\n keyword: \"contains\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema, parentSchema, data, it } = cxt;\n let min;\n let max;\n const { minContains, maxContains } = parentSchema;\n if (it.opts.next) {\n min = minContains === undefined ? 1 : minContains;\n max = maxContains;\n }\n else {\n min = 1;\n }\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n cxt.setParams({ min, max });\n if (max === undefined && min === 0) {\n (0, util_1.checkStrictMode)(it, `\"minContains\" == 0 without \"maxContains\": \"contains\" keyword ignored`);\n return;\n }\n if (max !== undefined && min > max) {\n (0, util_1.checkStrictMode)(it, `\"minContains\" > \"maxContains\" is always invalid`);\n cxt.fail();\n return;\n }\n if ((0, util_1.alwaysValidSchema)(it, schema)) {\n let cond = (0, codegen_1._) `${len} >= ${min}`;\n if (max !== undefined)\n cond = (0, codegen_1._) `${cond} && ${len} <= ${max}`;\n cxt.pass(cond);\n return;\n }\n it.items = true;\n const valid = gen.name(\"valid\");\n if (max === undefined && min === 1) {\n validateItems(valid, () => gen.if(valid, () => gen.break()));\n }\n else if (min === 0) {\n gen.let(valid, true);\n if (max !== undefined)\n gen.if((0, codegen_1._) `${data}.length > 0`, validateItemsWithCount);\n }\n else {\n gen.let(valid, false);\n validateItemsWithCount();\n }\n cxt.result(valid, () => cxt.reset());\n function validateItemsWithCount() {\n const schValid = gen.name(\"_valid\");\n const count = gen.let(\"count\", 0);\n validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));\n }\n function validateItems(_valid, block) {\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema({\n keyword: \"contains\",\n dataProp: i,\n dataPropType: util_1.Type.Num,\n compositeRule: true,\n }, _valid);\n block();\n });\n }\n function checkLimits(count) {\n gen.code((0, codegen_1._) `${count}++`);\n if (max === undefined) {\n gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true).break());\n }\n else {\n gen.if((0, codegen_1._) `${count} > ${max}`, () => gen.assign(valid, false).break());\n if (min === 1)\n gen.assign(valid, true);\n else\n gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true));\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=contains.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nexports.error = {\n message: ({ params: { property, depsCount, deps } }) => {\n const property_ies = depsCount === 1 ? \"property\" : \"properties\";\n return (0, codegen_1.str) `must have ${property_ies} ${deps} when property ${property} is present`;\n },\n params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._) `{property: ${property},\n missingProperty: ${missingProperty},\n depsCount: ${depsCount},\n deps: ${deps}}`, // TODO change to reference\n};\nconst def = {\n keyword: \"dependencies\",\n type: \"object\",\n schemaType: \"object\",\n error: exports.error,\n code(cxt) {\n const [propDeps, schDeps] = splitDependencies(cxt);\n validatePropertyDeps(cxt, propDeps);\n validateSchemaDeps(cxt, schDeps);\n },\n};\nfunction splitDependencies({ schema }) {\n const propertyDeps = {};\n const schemaDeps = {};\n for (const key in schema) {\n if (key === \"__proto__\")\n continue;\n const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;\n deps[key] = schema[key];\n }\n return [propertyDeps, schemaDeps];\n}\nfunction validatePropertyDeps(cxt, propertyDeps = cxt.schema) {\n const { gen, data, it } = cxt;\n if (Object.keys(propertyDeps).length === 0)\n return;\n const missing = gen.let(\"missing\");\n for (const prop in propertyDeps) {\n const deps = propertyDeps[prop];\n if (deps.length === 0)\n continue;\n const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties);\n cxt.setParams({\n property: prop,\n depsCount: deps.length,\n deps: deps.join(\", \"),\n });\n if (it.allErrors) {\n gen.if(hasProperty, () => {\n for (const depProp of deps) {\n (0, code_1.checkReportMissingProp)(cxt, depProp);\n }\n });\n }\n else {\n gen.if((0, codegen_1._) `${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);\n (0, code_1.reportMissingProp)(cxt, missing);\n gen.else();\n }\n }\n}\nexports.validatePropertyDeps = validatePropertyDeps;\nfunction validateSchemaDeps(cxt, schemaDeps = cxt.schema) {\n const { gen, data, keyword, it } = cxt;\n const valid = gen.name(\"valid\");\n for (const prop in schemaDeps) {\n if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))\n continue;\n gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => {\n const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid);\n cxt.mergeValidEvaluated(schCxt, valid);\n }, () => gen.var(valid, true) // TODO var\n );\n cxt.ok(valid);\n }\n}\nexports.validateSchemaDeps = validateSchemaDeps;\nexports.default = def;\n//# sourceMappingURL=dependencies.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"property name must be valid\",\n params: ({ params }) => (0, codegen_1._) `{propertyName: ${params.propertyName}}`,\n};\nconst def = {\n keyword: \"propertyNames\",\n type: \"object\",\n schemaType: [\"object\", \"boolean\"],\n error,\n code(cxt) {\n const { gen, schema, data, it } = cxt;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n const valid = gen.name(\"valid\");\n gen.forIn(\"key\", data, (key) => {\n cxt.setParams({ propertyName: key });\n cxt.subschema({\n keyword: \"propertyNames\",\n data: key,\n dataTypes: [\"string\"],\n propertyName: key,\n compositeRule: true,\n }, valid);\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.error(true);\n if (!it.allErrors)\n gen.break();\n });\n });\n cxt.ok(valid);\n },\n};\nexports.default = def;\n//# sourceMappingURL=propertyNames.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"must NOT have additional properties\",\n params: ({ params }) => (0, codegen_1._) `{additionalProperty: ${params.additionalProperty}}`,\n};\nconst def = {\n keyword: \"additionalProperties\",\n type: [\"object\"],\n schemaType: [\"boolean\", \"object\"],\n allowUndefined: true,\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema, parentSchema, data, errsCount, it } = cxt;\n /* istanbul ignore if */\n if (!errsCount)\n throw new Error(\"ajv implementation error\");\n const { allErrors, opts } = it;\n it.props = true;\n if (opts.removeAdditional !== \"all\" && (0, util_1.alwaysValidSchema)(it, schema))\n return;\n const props = (0, code_1.allSchemaProperties)(parentSchema.properties);\n const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);\n checkAdditionalProperties();\n cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);\n function checkAdditionalProperties() {\n gen.forIn(\"key\", data, (key) => {\n if (!props.length && !patProps.length)\n additionalPropertyCode(key);\n else\n gen.if(isAdditional(key), () => additionalPropertyCode(key));\n });\n }\n function isAdditional(key) {\n let definedProp;\n if (props.length > 8) {\n // TODO maybe an option instead of hard-coded 8?\n const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, \"properties\");\n definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);\n }\n else if (props.length) {\n definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._) `${key} === ${p}`));\n }\n else {\n definedProp = codegen_1.nil;\n }\n if (patProps.length) {\n definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._) `${(0, code_1.usePattern)(cxt, p)}.test(${key})`));\n }\n return (0, codegen_1.not)(definedProp);\n }\n function deleteAdditional(key) {\n gen.code((0, codegen_1._) `delete ${data}[${key}]`);\n }\n function additionalPropertyCode(key) {\n if (opts.removeAdditional === \"all\" || (opts.removeAdditional && schema === false)) {\n deleteAdditional(key);\n return;\n }\n if (schema === false) {\n cxt.setParams({ additionalProperty: key });\n cxt.error();\n if (!allErrors)\n gen.break();\n return;\n }\n if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen.name(\"valid\");\n if (opts.removeAdditional === \"failing\") {\n applyAdditionalSchema(key, valid, false);\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.reset();\n deleteAdditional(key);\n });\n }\n else {\n applyAdditionalSchema(key, valid);\n if (!allErrors)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n }\n }\n }\n function applyAdditionalSchema(key, valid, errors) {\n const subschema = {\n keyword: \"additionalProperties\",\n dataProp: key,\n dataPropType: util_1.Type.Str,\n };\n if (errors === false) {\n Object.assign(subschema, {\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n });\n }\n cxt.subschema(subschema, valid);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=additionalProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst validate_1 = require(\"../../compile/validate\");\nconst code_1 = require(\"../code\");\nconst util_1 = require(\"../../compile/util\");\nconst additionalProperties_1 = require(\"./additionalProperties\");\nconst def = {\n keyword: \"properties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt) {\n const { gen, schema, parentSchema, data, it } = cxt;\n if (it.opts.removeAdditional === \"all\" && parentSchema.additionalProperties === undefined) {\n additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, \"additionalProperties\"));\n }\n const allProps = (0, code_1.allSchemaProperties)(schema);\n for (const prop of allProps) {\n it.definedProperties.add(prop);\n }\n if (it.opts.unevaluated && allProps.length && it.props !== true) {\n it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);\n }\n const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));\n if (properties.length === 0)\n return;\n const valid = gen.name(\"valid\");\n for (const prop of properties) {\n if (hasDefault(prop)) {\n applyPropertySchema(prop);\n }\n else {\n gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));\n applyPropertySchema(prop);\n if (!it.allErrors)\n gen.else().var(valid, true);\n gen.endIf();\n }\n cxt.it.definedProperties.add(prop);\n cxt.ok(valid);\n }\n function hasDefault(prop) {\n return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined;\n }\n function applyPropertySchema(prop) {\n cxt.subschema({\n keyword: \"properties\",\n schemaProp: prop,\n dataProp: prop,\n }, valid);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=properties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst util_2 = require(\"../../compile/util\");\nconst def = {\n keyword: \"patternProperties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt) {\n const { gen, schema, data, parentSchema, it } = cxt;\n const { opts } = it;\n const patterns = (0, code_1.allSchemaProperties)(schema);\n const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));\n if (patterns.length === 0 ||\n (alwaysValidPatterns.length === patterns.length &&\n (!it.opts.unevaluated || it.props === true))) {\n return;\n }\n const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;\n const valid = gen.name(\"valid\");\n if (it.props !== true && !(it.props instanceof codegen_1.Name)) {\n it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);\n }\n const { props } = it;\n validatePatternProperties();\n function validatePatternProperties() {\n for (const pat of patterns) {\n if (checkProperties)\n checkMatchingProperties(pat);\n if (it.allErrors) {\n validateProperties(pat);\n }\n else {\n gen.var(valid, true); // TODO var\n validateProperties(pat);\n gen.if(valid);\n }\n }\n }\n function checkMatchingProperties(pat) {\n for (const prop in checkProperties) {\n if (new RegExp(pat).test(prop)) {\n (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);\n }\n }\n }\n function validateProperties(pat) {\n gen.forIn(\"key\", data, (key) => {\n gen.if((0, codegen_1._) `${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {\n const alwaysValid = alwaysValidPatterns.includes(pat);\n if (!alwaysValid) {\n cxt.subschema({\n keyword: \"patternProperties\",\n schemaProp: pat,\n dataProp: key,\n dataPropType: util_2.Type.Str,\n }, valid);\n }\n if (it.opts.unevaluated && props !== true) {\n gen.assign((0, codegen_1._) `${props}[${key}]`, true);\n }\n else if (!alwaysValid && !it.allErrors) {\n // can short-circuit if `unevaluatedProperties` is not supported (opts.next === false)\n // or if all properties were evaluated (props === true)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n }\n });\n });\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=patternProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"not\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n code(cxt) {\n const { gen, schema, it } = cxt;\n if ((0, util_1.alwaysValidSchema)(it, schema)) {\n cxt.fail();\n return;\n }\n const valid = gen.name(\"valid\");\n cxt.subschema({\n keyword: \"not\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n }, valid);\n cxt.failResult(valid, () => cxt.reset(), () => cxt.error());\n },\n error: { message: \"must NOT be valid\" },\n};\nexports.default = def;\n//# sourceMappingURL=not.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst def = {\n keyword: \"anyOf\",\n schemaType: \"array\",\n trackErrors: true,\n code: code_1.validateUnion,\n error: { message: \"must match a schema in anyOf\" },\n};\nexports.default = def;\n//# sourceMappingURL=anyOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"must match exactly one schema in oneOf\",\n params: ({ params }) => (0, codegen_1._) `{passingSchemas: ${params.passing}}`,\n};\nconst def = {\n keyword: \"oneOf\",\n schemaType: \"array\",\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema, parentSchema, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n if (it.opts.discriminator && parentSchema.discriminator)\n return;\n const schArr = schema;\n const valid = gen.let(\"valid\", false);\n const passing = gen.let(\"passing\", null);\n const schValid = gen.name(\"_valid\");\n cxt.setParams({ passing });\n // TODO possibly fail straight away (with warning or exception) if there are two empty always valid schemas\n gen.block(validateOneOf);\n cxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n function validateOneOf() {\n schArr.forEach((sch, i) => {\n let schCxt;\n if ((0, util_1.alwaysValidSchema)(it, sch)) {\n gen.var(schValid, true);\n }\n else {\n schCxt = cxt.subschema({\n keyword: \"oneOf\",\n schemaProp: i,\n compositeRule: true,\n }, schValid);\n }\n if (i > 0) {\n gen\n .if((0, codegen_1._) `${schValid} && ${valid}`)\n .assign(valid, false)\n .assign(passing, (0, codegen_1._) `[${passing}, ${i}]`)\n .else();\n }\n gen.if(schValid, () => {\n gen.assign(valid, true);\n gen.assign(passing, i);\n if (schCxt)\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n });\n });\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=oneOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"allOf\",\n schemaType: \"array\",\n code(cxt) {\n const { gen, schema, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const valid = gen.name(\"valid\");\n schema.forEach((sch, i) => {\n if ((0, util_1.alwaysValidSchema)(it, sch))\n return;\n const schCxt = cxt.subschema({ keyword: \"allOf\", schemaProp: i }, valid);\n cxt.ok(valid);\n cxt.mergeEvaluated(schCxt);\n });\n },\n};\nexports.default = def;\n//# sourceMappingURL=allOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params }) => (0, codegen_1.str) `must match \"${params.ifClause}\" schema`,\n params: ({ params }) => (0, codegen_1._) `{failingKeyword: ${params.ifClause}}`,\n};\nconst def = {\n keyword: \"if\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, parentSchema, it } = cxt;\n if (parentSchema.then === undefined && parentSchema.else === undefined) {\n (0, util_1.checkStrictMode)(it, '\"if\" without \"then\" and \"else\" is ignored');\n }\n const hasThen = hasSchema(it, \"then\");\n const hasElse = hasSchema(it, \"else\");\n if (!hasThen && !hasElse)\n return;\n const valid = gen.let(\"valid\", true);\n const schValid = gen.name(\"_valid\");\n validateIf();\n cxt.reset();\n if (hasThen && hasElse) {\n const ifClause = gen.let(\"ifClause\");\n cxt.setParams({ ifClause });\n gen.if(schValid, validateClause(\"then\", ifClause), validateClause(\"else\", ifClause));\n }\n else if (hasThen) {\n gen.if(schValid, validateClause(\"then\"));\n }\n else {\n gen.if((0, codegen_1.not)(schValid), validateClause(\"else\"));\n }\n cxt.pass(valid, () => cxt.error(true));\n function validateIf() {\n const schCxt = cxt.subschema({\n keyword: \"if\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n }, schValid);\n cxt.mergeEvaluated(schCxt);\n }\n function validateClause(keyword, ifClause) {\n return () => {\n const schCxt = cxt.subschema({ keyword }, schValid);\n gen.assign(valid, schValid);\n cxt.mergeValidEvaluated(schCxt, valid);\n if (ifClause)\n gen.assign(ifClause, (0, codegen_1._) `${keyword}`);\n else\n cxt.setParams({ ifClause: keyword });\n };\n }\n },\n};\nfunction hasSchema(it, keyword) {\n const schema = it.schema[keyword];\n return schema !== undefined && !(0, util_1.alwaysValidSchema)(it, schema);\n}\nexports.default = def;\n//# sourceMappingURL=if.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: [\"then\", \"else\"],\n schemaType: [\"object\", \"boolean\"],\n code({ keyword, parentSchema, it }) {\n if (parentSchema.if === undefined)\n (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"if\" is ignored`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=thenElse.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst additionalItems_1 = require(\"./additionalItems\");\nconst prefixItems_1 = require(\"./prefixItems\");\nconst items_1 = require(\"./items\");\nconst items2020_1 = require(\"./items2020\");\nconst contains_1 = require(\"./contains\");\nconst dependencies_1 = require(\"./dependencies\");\nconst propertyNames_1 = require(\"./propertyNames\");\nconst additionalProperties_1 = require(\"./additionalProperties\");\nconst properties_1 = require(\"./properties\");\nconst patternProperties_1 = require(\"./patternProperties\");\nconst not_1 = require(\"./not\");\nconst anyOf_1 = require(\"./anyOf\");\nconst oneOf_1 = require(\"./oneOf\");\nconst allOf_1 = require(\"./allOf\");\nconst if_1 = require(\"./if\");\nconst thenElse_1 = require(\"./thenElse\");\nfunction getApplicator(draft2020 = false) {\n const applicator = [\n // any\n not_1.default,\n anyOf_1.default,\n oneOf_1.default,\n allOf_1.default,\n if_1.default,\n thenElse_1.default,\n // object\n propertyNames_1.default,\n additionalProperties_1.default,\n dependencies_1.default,\n properties_1.default,\n patternProperties_1.default,\n ];\n // array\n if (draft2020)\n applicator.push(prefixItems_1.default, items2020_1.default);\n else\n applicator.push(additionalItems_1.default, items_1.default);\n applicator.push(contains_1.default);\n return applicator;\n}\nexports.default = getApplicator;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must match format \"${schemaCode}\"`,\n params: ({ schemaCode }) => (0, codegen_1._) `{format: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"format\",\n type: [\"number\", \"string\"],\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt, ruleType) {\n const { gen, data, $data, schema, schemaCode, it } = cxt;\n const { opts, errSchemaPath, schemaEnv, self } = it;\n if (!opts.validateFormats)\n return;\n if ($data)\n validate$DataFormat();\n else\n validateFormat();\n function validate$DataFormat() {\n const fmts = gen.scopeValue(\"formats\", {\n ref: self.formats,\n code: opts.code.formats,\n });\n const fDef = gen.const(\"fDef\", (0, codegen_1._) `${fmts}[${schemaCode}]`);\n const fType = gen.let(\"fType\");\n const format = gen.let(\"format\");\n // TODO simplify\n gen.if((0, codegen_1._) `typeof ${fDef} == \"object\" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._) `${fDef}.type || \"string\"`).assign(format, (0, codegen_1._) `${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._) `\"string\"`).assign(format, fDef));\n cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));\n function unknownFmt() {\n if (opts.strictSchema === false)\n return codegen_1.nil;\n return (0, codegen_1._) `${schemaCode} && !${format}`;\n }\n function invalidFmt() {\n const callFormat = schemaEnv.$async\n ? (0, codegen_1._) `(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))`\n : (0, codegen_1._) `${format}(${data})`;\n const validData = (0, codegen_1._) `(typeof ${format} == \"function\" ? ${callFormat} : ${format}.test(${data}))`;\n return (0, codegen_1._) `${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;\n }\n }\n function validateFormat() {\n const formatDef = self.formats[schema];\n if (!formatDef) {\n unknownFormat();\n return;\n }\n if (formatDef === true)\n return;\n const [fmtType, format, fmtRef] = getFormat(formatDef);\n if (fmtType === ruleType)\n cxt.pass(validCondition());\n function unknownFormat() {\n if (opts.strictSchema === false) {\n self.logger.warn(unknownMsg());\n return;\n }\n throw new Error(unknownMsg());\n function unknownMsg() {\n return `unknown format \"${schema}\" ignored in schema at path \"${errSchemaPath}\"`;\n }\n }\n function getFormat(fmtDef) {\n const code = fmtDef instanceof RegExp\n ? (0, codegen_1.regexpCode)(fmtDef)\n : opts.code.formats\n ? (0, codegen_1._) `${opts.code.formats}${(0, codegen_1.getProperty)(schema)}`\n : undefined;\n const fmt = gen.scopeValue(\"formats\", { key: schema, ref: fmtDef, code });\n if (typeof fmtDef == \"object\" && !(fmtDef instanceof RegExp)) {\n return [fmtDef.type || \"string\", fmtDef.validate, (0, codegen_1._) `${fmt}.validate`];\n }\n return [\"string\", fmtDef, fmt];\n }\n function validCondition() {\n if (typeof formatDef == \"object\" && !(formatDef instanceof RegExp) && formatDef.async) {\n if (!schemaEnv.$async)\n throw new Error(\"async format in sync schema\");\n return (0, codegen_1._) `await ${fmtRef}(${data})`;\n }\n return typeof format == \"function\" ? (0, codegen_1._) `${fmtRef}(${data})` : (0, codegen_1._) `${fmtRef}.test(${data})`;\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=format.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst format_1 = require(\"./format\");\nconst format = [format_1.default];\nexports.default = format;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.contentVocabulary = exports.metadataVocabulary = void 0;\nexports.metadataVocabulary = [\n \"title\",\n \"description\",\n \"default\",\n \"deprecated\",\n \"readOnly\",\n \"writeOnly\",\n \"examples\",\n];\nexports.contentVocabulary = [\n \"contentMediaType\",\n \"contentEncoding\",\n \"contentSchema\",\n];\n//# sourceMappingURL=metadata.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core_1 = require(\"./core\");\nconst validation_1 = require(\"./validation\");\nconst applicator_1 = require(\"./applicator\");\nconst format_1 = require(\"./format\");\nconst metadata_1 = require(\"./metadata\");\nconst draft7Vocabularies = [\n core_1.default,\n validation_1.default,\n (0, applicator_1.default)(),\n format_1.default,\n metadata_1.metadataVocabulary,\n metadata_1.contentVocabulary,\n];\nexports.default = draft7Vocabularies;\n//# sourceMappingURL=draft7.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiscrError = void 0;\nvar DiscrError;\n(function (DiscrError) {\n DiscrError[\"Tag\"] = \"tag\";\n DiscrError[\"Mapping\"] = \"mapping\";\n})(DiscrError || (exports.DiscrError = DiscrError = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst types_1 = require(\"../discriminator/types\");\nconst compile_1 = require(\"../../compile\");\nconst ref_error_1 = require(\"../../compile/ref_error\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag\n ? `tag \"${tagName}\" must be string`\n : `value of tag \"${tagName}\" must be in oneOf`,\n params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._) `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`,\n};\nconst def = {\n keyword: \"discriminator\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code(cxt) {\n const { gen, data, schema, parentSchema, it } = cxt;\n const { oneOf } = parentSchema;\n if (!it.opts.discriminator) {\n throw new Error(\"discriminator: requires discriminator option\");\n }\n const tagName = schema.propertyName;\n if (typeof tagName != \"string\")\n throw new Error(\"discriminator: requires propertyName\");\n if (schema.mapping)\n throw new Error(\"discriminator: mapping is not supported\");\n if (!oneOf)\n throw new Error(\"discriminator: requires oneOf keyword\");\n const valid = gen.let(\"valid\", false);\n const tag = gen.const(\"tag\", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(tagName)}`);\n gen.if((0, codegen_1._) `typeof ${tag} == \"string\"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));\n cxt.ok(valid);\n function validateMapping() {\n const mapping = getMapping();\n gen.if(false);\n for (const tagValue in mapping) {\n gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`);\n gen.assign(valid, applyTagSchema(mapping[tagValue]));\n }\n gen.else();\n cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });\n gen.endIf();\n }\n function applyTagSchema(schemaProp) {\n const _valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({ keyword: \"oneOf\", schemaProp }, _valid);\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n return _valid;\n }\n function getMapping() {\n var _a;\n const oneOfMapping = {};\n const topRequired = hasRequired(parentSchema);\n let tagRequired = true;\n for (let i = 0; i < oneOf.length; i++) {\n let sch = oneOf[i];\n if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {\n const ref = sch.$ref;\n sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);\n if (sch instanceof compile_1.SchemaEnv)\n sch = sch.schema;\n if (sch === undefined)\n throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);\n }\n const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];\n if (typeof propSch != \"object\") {\n throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have \"properties/${tagName}\"`);\n }\n tagRequired = tagRequired && (topRequired || hasRequired(sch));\n addMappings(propSch, i);\n }\n if (!tagRequired)\n throw new Error(`discriminator: \"${tagName}\" must be required`);\n return oneOfMapping;\n function hasRequired({ required }) {\n return Array.isArray(required) && required.includes(tagName);\n }\n function addMappings(sch, i) {\n if (sch.const) {\n addMapping(sch.const, i);\n }\n else if (sch.enum) {\n for (const tagValue of sch.enum) {\n addMapping(tagValue, i);\n }\n }\n else {\n throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`);\n }\n }\n function addMapping(tagValue, i) {\n if (typeof tagValue != \"string\" || tagValue in oneOfMapping) {\n throw new Error(`discriminator: \"${tagName}\" values must be unique strings`);\n }\n oneOfMapping[tagValue] = i;\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;\nconst core_1 = require(\"./core\");\nconst draft7_1 = require(\"./vocabularies/draft7\");\nconst discriminator_1 = require(\"./vocabularies/discriminator\");\nconst draft7MetaSchema = require(\"./refs/json-schema-draft-07.json\");\nconst META_SUPPORT_DATA = [\"/properties\"];\nconst META_SCHEMA_ID = \"http://json-schema.org/draft-07/schema\";\nclass Ajv extends core_1.default {\n _addVocabularies() {\n super._addVocabularies();\n draft7_1.default.forEach((v) => this.addVocabulary(v));\n if (this.opts.discriminator)\n this.addKeyword(discriminator_1.default);\n }\n _addDefaultMetaSchema() {\n super._addDefaultMetaSchema();\n if (!this.opts.meta)\n return;\n const metaSchema = this.opts.$data\n ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA)\n : draft7MetaSchema;\n this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);\n this.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n }\n defaultMeta() {\n return (this.opts.defaultMeta =\n super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));\n }\n}\nexports.Ajv = Ajv;\nmodule.exports = exports = Ajv;\nmodule.exports.Ajv = Ajv;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = Ajv;\nvar validate_1 = require(\"./compile/validate\");\nObject.defineProperty(exports, \"KeywordCxt\", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });\nvar codegen_1 = require(\"./compile/codegen\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return codegen_1._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return codegen_1.str; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return codegen_1.stringify; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return codegen_1.nil; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return codegen_1.Name; } });\nObject.defineProperty(exports, \"CodeGen\", { enumerable: true, get: function () { return codegen_1.CodeGen; } });\nvar validation_error_1 = require(\"./runtime/validation_error\");\nObject.defineProperty(exports, \"ValidationError\", { enumerable: true, get: function () { return validation_error_1.default; } });\nvar ref_error_1 = require(\"./compile/ref_error\");\nObject.defineProperty(exports, \"MissingRefError\", { enumerable: true, get: function () { return ref_error_1.default; } });\n//# sourceMappingURL=ajv.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ajv_1 = __importDefault(require(\"ajv\"));\nvar index_1 = require(\"./index\");\nvar DynamicRangeValidator = /** @class */ (function () {\n function DynamicRangeValidator() {\n this.ajv = new ajv_1.default();\n this.templateValidator = this.ajv\n .addSchema(index_1.DynamicRangeTemplateSchemas.dependencies)\n .compile(index_1.DynamicRangeTemplateSchemas.mainSchema);\n this.catalogValidator = this.ajv\n .addSchema(index_1.DynamicRangeCatalogSchemas.dependencies)\n .compile(index_1.DynamicRangeCatalogSchemas.mainSchema);\n }\n DynamicRangeValidator.prototype.validate = function (catalog, template) {\n var templateData = JSON.parse(template);\n var templateIsValid = this.templateValidator(templateData);\n var catalogData = JSON.parse(catalog);\n var catalogIsValid = this.catalogValidator(catalogData);\n return {\n valid: templateIsValid && catalogIsValid,\n catalog: {\n valid: catalogIsValid,\n errors: this.catalogValidator.errors\n },\n template: {\n valid: templateIsValid,\n errors: this.templateValidator.errors\n }\n };\n };\n DynamicRangeValidator.prototype.validateCatalog = function (catalog) {\n var catalogData = JSON.parse(catalog);\n var catalogIsValid = this.catalogValidator(catalogData);\n return {\n valid: catalogIsValid,\n errors: this.catalogValidator.errors\n };\n };\n DynamicRangeValidator.prototype.validateTemplate = function (template) {\n var tempalteData = JSON.parse(template);\n var templateIsValid = this.templateValidator(tempalteData);\n return {\n valid: templateIsValid,\n errors: this.templateValidator.errors\n };\n };\n return DynamicRangeValidator;\n}());\nexports.default = DynamicRangeValidator;\n//# sourceMappingURL=DynamicRangeValidator.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DynamicRangeValidator = exports.DynamicRangeTemplateSchemas = exports.DynamicRangeCatalogSchemas = exports.IPEXRangeFormatCatalogSchemas = void 0;\nvar ipex_range_format_json_1 = __importDefault(require(\"./ipex-range-format.json\"));\nvar ipex_range_format_catalog_json_1 = __importDefault(require(\"./ipex-range-format-catalog.json\"));\nvar catalog_file_json_1 = __importDefault(require(\"./catalog-file.json\"));\nvar catalog_item_json_1 = __importDefault(require(\"./catalog-item.json\"));\nvar templates_file_json_1 = __importDefault(require(\"./templates-file.json\"));\nvar template_item_json_1 = __importDefault(require(\"./template-item.json\"));\nvar template_defs_json_1 = __importDefault(require(\"./template-defs.json\"));\nvar template_box_json_1 = __importDefault(require(\"./template-box.json\"));\nvar template_bound_json_1 = __importDefault(require(\"./template-bound.json\"));\nvar template_connector_json_1 = __importDefault(require(\"./template-connector.json\"));\nvar template_product_structure_json_1 = __importDefault(require(\"./template-product-structure.json\"));\nvar DynamicRangeValidator_1 = __importDefault(require(\"./DynamicRangeValidator\"));\nexports.DynamicRangeValidator = DynamicRangeValidator_1.default;\nvar IPEXRangeFormatCatalogSchemas = {\n mainSchema: ipex_range_format_catalog_json_1.default,\n dependencies: [\n template_bound_json_1.default,\n template_box_json_1.default,\n template_connector_json_1.default,\n template_defs_json_1.default,\n template_product_structure_json_1.default,\n ipex_range_format_json_1.default\n ]\n};\nexports.IPEXRangeFormatCatalogSchemas = IPEXRangeFormatCatalogSchemas;\nvar DynamicRangeCatalogSchemas = {\n mainSchema: catalog_file_json_1.default,\n dependencies: [catalog_item_json_1.default]\n};\nexports.DynamicRangeCatalogSchemas = DynamicRangeCatalogSchemas;\nvar DynamicRangeTemplateSchemas = {\n mainSchema: templates_file_json_1.default,\n dependencies: [\n template_bound_json_1.default,\n template_box_json_1.default,\n template_connector_json_1.default,\n template_defs_json_1.default,\n template_product_structure_json_1.default,\n template_item_json_1.default\n ]\n};\nexports.DynamicRangeTemplateSchemas = DynamicRangeTemplateSchemas;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createCore = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar core_2 = require(\"@inter-ikea-core/core\");\nvar core_3 = require(\"@inter-ikea-core/core\");\nvar DragUtils_1 = require(\"../drag/DragUtils\");\nvar createCore = function (withRoom, withAutoAdapt, withHistory) {\n if (withRoom === void 0) { withRoom = true; }\n if (withAutoAdapt === void 0) { withAutoAdapt = false; }\n if (withHistory === void 0) { withHistory = false; }\n var core = (0, core_1.createCore)();\n core.addValidation(new core_3.RequiredConnectorsSatisfiedValidation());\n if (withHistory) {\n core.addHistoryModule();\n }\n var autoAdaptService = null;\n if (withAutoAdapt) {\n autoAdaptService = new core_3.AutoAdaptService(core.services);\n core_1.AutoAdaptFeature.start(core.services);\n }\n DragUtils_1.DragUtils.addLegacyDrag(core.services, withAutoAdapt);\n var placementService = new core_3.PlacementService(core.services, autoAdaptService);\n var room = null;\n var roomService = new core_3.RoomService(core.services.entityManager, core.services.sceneManager);\n if (withRoom) {\n var roomSystem = new core_3.RoomSystem(roomService, core.services);\n core.services.entityManager.registerSystem(roomSystem);\n room = roomService.createOrUpdateRectangularRoom(new core_2.Vector(10000, 5000, 10000));\n }\n return {\n core: core,\n placementService: placementService,\n autoAdaptService: autoAdaptService,\n room: room,\n roomService: roomService\n };\n};\nexports.createCore = createCore;\n//# sourceMappingURL=core_creator.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FunctionalZoneValidationBase = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar ValidationBase_1 = require(\"../validation/ValidationBase\");\n/**\n * A base for validating zones that iterates the hierarchy of the validated entity itself against the hierarchy of what it is\n * snapping to (or in the case of validating in place, the hierarchy it is placed in).\n *\n * You create your own validation by subclassing it and overriding the `checkZoneIntersectionOfOwnHierarchy` method.\n */\nvar FunctionalZoneValidationBase = /** @class */ (function (_super) {\n __extends(FunctionalZoneValidationBase, _super);\n function FunctionalZoneValidationBase() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FunctionalZoneValidationBase.prototype.validateCurrentState = function (entity) {\n return this.validate(entity);\n };\n FunctionalZoneValidationBase.prototype.validateSnap = function (snapActionCandidate) {\n return this.validate(snapActionCandidate.guestRoot, snapActionCandidate);\n };\n FunctionalZoneValidationBase.prototype.potentialParentIsAncestor = function (other, parentOfEntityToValidate) {\n if (parentOfEntityToValidate // We can't have a common ancestor if we have no parent\n && core_1.HierarchyUtils.findInHierarchy(other, function (it) { return it.id == parentOfEntityToValidate.id; })) // Parent is not an ancestor\n return true;\n return false;\n };\n FunctionalZoneValidationBase.prototype.getSnapRootHierarchy = function (entity) {\n var snapRoot = core_1.ComponentUtils.snapRoot(entity);\n if (snapRoot) {\n return core_1.HierarchyUtils.hierarchy(snapRoot);\n }\n else {\n return core_1.HierarchyUtils.hierarchy(entity);\n }\n };\n FunctionalZoneValidationBase.prototype.validate = function (entity, snapActionCandidate) {\n var _a;\n // Find the root of the scene or, in case of snapping, the root of the tree the entity tries\n // to snap to\n var root = this.findRoot(snapActionCandidate, entity);\n // We need to check the snapping entity and all its descendants\n var hierarchy = this.getSnapRootHierarchy(entity);\n // In case we're snapping to a new parent, then we use that. If we're not snapping, use current parent\n var snapParent = (_a = snapActionCandidate === null || snapActionCandidate === void 0 ? void 0 : snapActionCandidate.host) !== null && _a !== void 0 ? _a : core_1.HierarchyUtils.parent(entity);\n var rootHierarchy = core_1.HierarchyUtils.hierarchy(root);\n var result = null;\n var myHierarchyIndex = 0;\n var finishedAll = false;\n // Loop over all entities in the entity's hierarchy\n while (!finishedAll) {\n var currentEntity = hierarchy[myHierarchyIndex];\n var rootHierarchyIndex = 0;\n // Loop over all entities in the root hierarchy (i.e. scene or whatever hierarchy we evaluate against)\n var finishedCurrent = false;\n while (!finishedCurrent) {\n var other = rootHierarchy[rootHierarchyIndex];\n result = this.checkZoneIntersectionOfOwnHierarchy(hierarchy, currentEntity, other, snapParent);\n rootHierarchyIndex++;\n // If we found a warning or searched the entire hierarchy, then we're finished\n finishedCurrent = !(result == null && rootHierarchyIndex < rootHierarchy.length);\n }\n myHierarchyIndex++;\n finishedAll = !(result == null && myHierarchyIndex < hierarchy.length);\n }\n return result;\n };\n return FunctionalZoneValidationBase;\n}(ValidationBase_1.ValidationBase));\nexports.FunctionalZoneValidationBase = FunctionalZoneValidationBase;\n//# sourceMappingURL=FunctionalZoneValidationBase.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ZoneVsZoneValidationResult = void 0;\n/**\n * The result of a ZoneVsZoneRule validation containing information about which function zones collided and which\n * entities they belong to.\n */\nvar ZoneVsZoneValidationResult = /** @class */ (function () {\n function ZoneVsZoneValidationResult(resultType, failedRule, entityWithZone1, intersectingZone1, entityWithZone2, intersectingZone2) {\n this.resultType = resultType;\n this.failedRule = failedRule;\n this.entityWithZone1 = entityWithZone1;\n this.intersectingZone1 = intersectingZone1;\n this.entityWithZone2 = entityWithZone2;\n this.intersectingZone2 = intersectingZone2;\n this.id = 'ZoneVsZoneValidationResult';\n }\n return ZoneVsZoneValidationResult;\n}());\nexports.ZoneVsZoneValidationResult = ZoneVsZoneValidationResult;\n//# sourceMappingURL=ZoneVsZoneValidationResult.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ZoneVsZoneRule = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar FunctionalZoneValidationBase_1 = require(\"./FunctionalZoneValidationBase\");\nvar ZoneVsZoneValidationResult_1 = require(\"./ZoneVsZoneValidationResult\");\n/**\n * A validation that can react on intersections between functional zones.\n *\n * An example could be a toaster that has an electrical zone and a shower that has a water zone. Then you could\n * add this to generate validation errors whenever the electrical zone and the water zone intersect, preventing\n * the toaster to be placed in the shower.\n */\nvar ZoneVsZoneRule = /** @class */ (function (_super) {\n __extends(ZoneVsZoneRule, _super);\n function ZoneVsZoneRule(restrictedLayer1, restrictedLayer2, severity, includeAncestors) {\n var _this = _super.call(this) || this;\n _this.restrictedLayer1 = restrictedLayer1;\n _this.restrictedLayer2 = restrictedLayer2;\n _this.severity = severity;\n _this.includeAncestors = includeAncestors;\n _this.id = \"ZoneVsZoneRule layers:\".concat(restrictedLayer1, \" vs \").concat(restrictedLayer2);\n return _this;\n }\n ZoneVsZoneRule.prototype.checkIntersectingZones = function (entity, other) {\n var _this = this;\n var result = null;\n if (other.hasComponent(core_1.ComponentIds.FUNCTIONAL_ZONES_WORLD_COMPONENT_ID)\n && entity.hasComponent(core_1.ComponentIds.FUNCTIONAL_ZONES_WORLD_COMPONENT_ID)) {\n var myZones = entity.getComponentUnsafe(core_1.ComponentIds.FUNCTIONAL_ZONES_WORLD_COMPONENT_ID).zones;\n var otherZones_1 = other.getComponentUnsafe(core_1.ComponentIds.FUNCTIONAL_ZONES_WORLD_COMPONENT_ID).zones;\n myZones.forEach(function (myZone) {\n return otherZones_1.forEach(function (otherZone) {\n var bothZonesIncludedInRestrictedLayers = _this.restrictedLayer1 === myZone.layer && _this.restrictedLayer2 === otherZone.layer;\n if (bothZonesIncludedInRestrictedLayers && myZone.polyhedron.penetration(otherZone.polyhedron)) {\n result = new ZoneVsZoneValidationResult_1.ZoneVsZoneValidationResult(_this.severity, _this, other, otherZone, entity, myZone);\n return;\n }\n });\n });\n }\n return result;\n };\n /**\n * Checks zone vs zone intersection of the hierarchy of the entity against another specified entity.\n * In case the other entity is part of the own hierarchy then it is excluded from testing.\n * In case the other entity is an ancestor then the property includeAncestors of the rule determines\n * if it should be included in testing or not.\n */\n ZoneVsZoneRule.prototype.checkZoneIntersectionOfOwnHierarchy = function (snapRootHierarchy, entity, other, parentOfEntityToValidate) {\n if (snapRootHierarchy.some(function (e) { return e.id === other.id; })) // Don't check against entities in our own hierarchy\n return null;\n // Either generate warnings even for ancestor or make sure it isn't an ancestor\n if (!this.includeAncestors && this.potentialParentIsAncestor(other, parentOfEntityToValidate))\n return null;\n var result = this.checkIntersectingZones(entity, other);\n if (result)\n return result;\n // In case the layers we test are not the same then we need to test it the other way around as well (if they were the same then we already tested this...)\n if (this.restrictedLayer1 !== this.restrictedLayer2) {\n var resultOtherWay = this.checkIntersectingZones(other, entity);\n if (resultOtherWay)\n return resultOtherWay;\n }\n return null;\n };\n return ZoneVsZoneRule;\n}(FunctionalZoneValidationBase_1.FunctionalZoneValidationBase));\nexports.ZoneVsZoneRule = ZoneVsZoneRule;\n//# sourceMappingURL=ZoneVsZoneRule.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ZoneVsColliderValidationResult = void 0;\n/**\n * The result of a ZoneVsColliderRule validation containing information about which function zone collided with which collider\n * and the owner entities.\n */\nvar ZoneVsColliderValidationResult = /** @class */ (function () {\n function ZoneVsColliderValidationResult(resultType, failedRule, entityWithZone, intersectingZone, entityWithCollider, intersectingCollider) {\n this.resultType = resultType;\n this.failedRule = failedRule;\n this.entityWithZone = entityWithZone;\n this.intersectingZone = intersectingZone;\n this.entityWithCollider = entityWithCollider;\n this.intersectingCollider = intersectingCollider;\n this.id = 'ZoneVsColliderValidationResult';\n }\n return ZoneVsColliderValidationResult;\n}());\nexports.ZoneVsColliderValidationResult = ZoneVsColliderValidationResult;\n//# sourceMappingURL=ZoneVsColliderValidationResult.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ZoneVsColliderRule = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar FunctionalZoneValidationBase_1 = require(\"./FunctionalZoneValidationBase\");\nvar ZoneVsColliderValidationResult_1 = require(\"./ZoneVsColliderValidationResult\");\n/**\n * A validation that fails if a functional zone with a specified layer intersects with a collider of another entity.\n *\n * An example use case is a door. It could specify a functional zone that represents the area where the door can be opened.\n * Then you could use this rule to make sure that the door doesn't collide with anything when it is opened.\n */\nvar ZoneVsColliderRule = /** @class */ (function (_super) {\n __extends(ZoneVsColliderRule, _super);\n /**\n * creates a new ZoneVsColliderRule. It will check for intersections between the functional zones that belong to the\n * specified layer and colliders of other entities.\n *\n * @param restrictedLayer the layer of the functional zones that should be checked for intersections\n * @param severity the severity of the validation result, WARNING or ERROR\n * @param includeAncestors if false, the rule will ignore collisions with the colliders of the entity's ancestors.\n */\n function ZoneVsColliderRule(restrictedLayer, severity, includeAncestors) {\n var _this = _super.call(this) || this;\n _this.restrictedLayer = restrictedLayer;\n _this.severity = severity;\n _this.includeAncestors = includeAncestors;\n _this.id = \"ZoneVsColliderRule layer:\".concat(restrictedLayer, \" vs colliders\");\n return _this;\n }\n /**\n * Explicitly tests zones on two entities, and only on them, no hierarchies iterated\n */\n ZoneVsColliderRule.prototype.checkIntersectingZones = function (entity, other) {\n var _this = this;\n if (other.hasComponent(core_1.ComponentIds.FUNCTIONAL_ZONES_WORLD_COMPONENT_ID)\n && entity.hasComponent(core_1.ComponentIds.COLLIDER_COMPONENT_ID)) {\n var myColliderPolyhedron_1 = entity.getComponentUnsafe(core_1.ComponentIds.COLLIDER_COMPONENT_ID).worldPolyhedron;\n var otherZones = other.getComponentUnsafe(core_1.ComponentIds.FUNCTIONAL_ZONES_WORLD_COMPONENT_ID).zones;\n var intersectingZone = otherZones.find(function (zone) { return zone.layer === _this.restrictedLayer && zone.polyhedron.penetration(myColliderPolyhedron_1); });\n if (intersectingZone)\n return new ZoneVsColliderValidationResult_1.ZoneVsColliderValidationResult(this.severity, this, other, intersectingZone, entity, myColliderPolyhedron_1);\n }\n return null;\n };\n /**\n * Checks zone vs collider intersection of the hierarchy of the entity against another specified entity.\n * In case the other entity is part of the own hierarchy then it is excluded from testing.\n * In case the other entity is an ancestor then the property includeAncestors of the rule determines\n * if it should be included in testing or not.\n */\n ZoneVsColliderRule.prototype.checkZoneIntersectionOfOwnHierarchy = function (snapRootHierarchy, entity, other, parentOfEntityToValidate) {\n if (snapRootHierarchy.includes(other)) // Don't check against entities in our own hierarchy\n return null;\n // Either generate warnings even for ancestor or make sure it isn't an ancestor\n if (!this.includeAncestors && this.potentialParentIsAncestor(other, parentOfEntityToValidate))\n return null;\n // Check results both ways, zone vs collider and collider vs zone\n var result = this.checkIntersectingZones(entity, other);\n if (result)\n return result;\n var resultOtherWay = this.checkIntersectingZones(other, entity);\n if (resultOtherWay)\n return resultOtherWay;\n return null;\n };\n return ZoneVsColliderRule;\n}(FunctionalZoneValidationBase_1.FunctionalZoneValidationBase));\nexports.ZoneVsColliderRule = ZoneVsColliderRule;\n//# sourceMappingURL=ZoneVsColliderRule.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ZoneVsColliderExceptSomeThingsRule = void 0;\nvar ZoneVsColliderRule_1 = require(\"./ZoneVsColliderRule\");\n/**\n * An example how to extend the ZoneVsColliderRule to ignore some items. Consider a shower where products are not allowed to be placed\n * in general, but in case the product being placed has an IAmActuallyAllowedToBeInAShowerComponent then the rule should not apply\n */\nvar ZoneVsColliderExceptSomeThingsRule = /** @class */ (function (_super) {\n __extends(ZoneVsColliderExceptSomeThingsRule, _super);\n function ZoneVsColliderExceptSomeThingsRule(componentIdToExclude, restrictedLayer, severity, includeAncestors) {\n var _this = _super.call(this, restrictedLayer, severity, includeAncestors) || this;\n _this.componentIdToExclude = componentIdToExclude;\n return _this;\n }\n ZoneVsColliderExceptSomeThingsRule.prototype.checkIntersectingZones = function (entity, other) {\n if (entity.hasComponent(this.componentIdToExclude) || other.hasComponent(this.componentIdToExclude))\n return null;\n return _super.prototype.checkIntersectingZones.call(this, entity, other);\n };\n return ZoneVsColliderExceptSomeThingsRule;\n}(ZoneVsColliderRule_1.ZoneVsColliderRule));\nexports.ZoneVsColliderExceptSomeThingsRule = ZoneVsColliderExceptSomeThingsRule;\n// end::snippet-custom-functional-zones-validation\n//# sourceMappingURL=ZoneVsColliderExceptSomeThingsRule.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ViewerSurfaceReferenceComponent = void 0;\nvar CoreToolboxComponentIds_1 = require(\"../CoreToolboxComponentIds\");\n/**\n * Used by the DebugSurface systems to hold a reference to the viewer objects\n * that are created when drawing debug surfaces.\n */\nvar ViewerSurfaceReferenceComponent = /** @class */ (function () {\n function ViewerSurfaceReferenceComponent(viewerObjects) {\n this.viewerObjects = viewerObjects;\n this.typeId = ViewerSurfaceReferenceComponent.ID;\n this.doStoreInSnapshot = false;\n }\n ViewerSurfaceReferenceComponent.prototype.eq = function (other) {\n var theOther = other;\n // If they're not equal length, they're not the same.\n if (this.viewerObjects.length !== theOther.viewerObjects.length) {\n return false;\n }\n // If they are the same length...\n for (var i = 0; i < this.viewerObjects.length; i++) {\n // But do not contain the same ID\n var thisId = this.viewerObjects[i].getViewerObjectId();\n var otherId = theOther.viewerObjects[i].getViewerObjectId();\n if (thisId !== otherId) {\n return false;\n }\n }\n return true;\n };\n ViewerSurfaceReferenceComponent.ID = CoreToolboxComponentIds_1.CoreToolboxComponentIds.ViewerSurfaceReferenceComponent;\n return ViewerSurfaceReferenceComponent;\n}());\nexports.ViewerSurfaceReferenceComponent = ViewerSurfaceReferenceComponent;\n//# sourceMappingURL=ViewerSurfaceReferenceComponent.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DebugSurfaceCleanupSystem = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar SystemBase2_1 = require(\"../systembase/SystemBase2\");\nvar ViewerSurfaceReferenceComponent_1 = require(\"./ViewerSurfaceReferenceComponent\");\n/*\n * Companion to the DebugSurfaceDrawingSystem, is responsible for cleaning up the viewer objects created when adding or\n * updating DebugSurfaces.\n */\nvar DebugSurfaceCleanupSystem = /** @class */ (function (_super) {\n __extends(DebugSurfaceCleanupSystem, _super);\n function DebugSurfaceCleanupSystem(entityManager) {\n var _this = _super.call(this, ViewerSurfaceReferenceComponent_1.ViewerSurfaceReferenceComponent.ID, core_1.ComponentIds.UPDATED_FROM_SNAPSHOT_EVENT_COMPONENT_ID) || this;\n _this.systemsAfterMe = null;\n _this.systemsBeforeMe = [\"DebugSurfaceDrawingSystem\"];\n _this.doingChangesOnComponent = [];\n _this.id = DebugSurfaceCleanupSystem.ID;\n _this.entityManager = entityManager;\n return _this;\n }\n DebugSurfaceCleanupSystem.prototype.onAddComponent = function (_entity, _newComponent) {\n // Do nothing\n };\n DebugSurfaceCleanupSystem.prototype.onRemoveComponent = function (entity, oldComponent) {\n DebugSurfaceCleanupSystem.removeOldObjects(oldComponent);\n };\n DebugSurfaceCleanupSystem.prototype.onUpdateComponent = function (entity, oldComponent, _newComponent) {\n DebugSurfaceCleanupSystem.removeOldObjects(oldComponent);\n };\n DebugSurfaceCleanupSystem.removeOldObjects = function (oldComponent) {\n oldComponent.viewerObjects.forEach(function (it) {\n it.deleteObject();\n });\n };\n DebugSurfaceCleanupSystem.prototype.onAddComponent2 = function (_entity, newComponent) {\n var _a;\n var oldViewerSurfaceReferenceComponent = (_a = newComponent.entityStateBeforeLoadingSnapshot) === null || _a === void 0 ? void 0 : _a.getComponent(ViewerSurfaceReferenceComponent_1.ViewerSurfaceReferenceComponent.ID);\n if (oldViewerSurfaceReferenceComponent) {\n DebugSurfaceCleanupSystem.removeOldObjects(oldViewerSurfaceReferenceComponent);\n }\n };\n DebugSurfaceCleanupSystem.prototype.onRemoveComponent2 = function (_entity, _oldComponent) {\n //NIL\n };\n DebugSurfaceCleanupSystem.prototype.onUpdateComponent2 = function (_entity, _oldComponent, _newComponent) {\n //NIL\n };\n DebugSurfaceCleanupSystem.ID = \"DebugSurfaceCleanupSystem\";\n return DebugSurfaceCleanupSystem;\n}(SystemBase2_1.SystemBase2));\nexports.DebugSurfaceCleanupSystem = DebugSurfaceCleanupSystem;\n//# sourceMappingURL=DebugSurfaceCleanupSystem.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DebugSurfaceDrawingSystem = void 0;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar SystemBase2_1 = require(\"../systembase/SystemBase2\");\nvar DebugSurfaceCleanupSystem_1 = require(\"./DebugSurfaceCleanupSystem\");\nvar ViewerSurfaceReferenceComponent_1 = require(\"./ViewerSurfaceReferenceComponent\");\n/*\n * Small system that draws debug surfaces using the IPEXViewerCoreAdapter.\n */\nvar DebugSurfaceDrawingSystem = /** @class */ (function (_super) {\n __extends(DebugSurfaceDrawingSystem, _super);\n function DebugSurfaceDrawingSystem(viewer, entityManager) {\n var _this = _super.call(this, core_1.ComponentIds.DEBUG_SURFACES_COMPONENT, core_1.ComponentIds.UPDATED_FROM_SNAPSHOT_EVENT_COMPONENT_ID) || this;\n _this.doingChangesOnComponent = [];\n _this.id = DebugSurfaceDrawingSystem.ID;\n _this.systemsAfterMe = [DebugSurfaceCleanupSystem_1.DebugSurfaceCleanupSystem.ID];\n _this.systemsBeforeMe = null;\n _this.entityManager = entityManager;\n _this.viewer = viewer;\n return _this;\n }\n DebugSurfaceDrawingSystem.prototype.onAddComponent = function (entity, _newComponent) {\n this.updateSurfaces(entity);\n };\n DebugSurfaceDrawingSystem.prototype.onRemoveComponent = function (entity, _oldComponent) {\n if (entity.hasComponent(ViewerSurfaceReferenceComponent_1.ViewerSurfaceReferenceComponent.ID)) {\n entity.removeComponent(ViewerSurfaceReferenceComponent_1.ViewerSurfaceReferenceComponent.ID);\n }\n };\n DebugSurfaceDrawingSystem.prototype.onUpdateComponent = function (entity, _oldComponent, _newComponent) {\n this.updateSurfaces(entity);\n };\n DebugSurfaceDrawingSystem.prototype.onAddComponent2 = function (_entity, _newComponent) {\n // Do nothing\n };\n DebugSurfaceDrawingSystem.prototype.onUpdateComponent2 = function (_entity, _oldComponent, _newComponent) {\n // Do nothing\n };\n DebugSurfaceDrawingSystem.prototype.onRemoveComponent2 = function (_entity, oldComponent) {\n // Run this on onRemove so that the cleanup in DebugSurfaceCleanupSystem has run before this.\n if (oldComponent.entity) {\n this.updateSurfaces(oldComponent.entity);\n }\n };\n DebugSurfaceDrawingSystem.prototype.updateSurfaces = function (entity) {\n var _this = this;\n var viewerSurfaceReferenceComponent = entity.getComponent(ViewerSurfaceReferenceComponent_1.ViewerSurfaceReferenceComponent.ID);\n if (viewerSurfaceReferenceComponent) {\n entity.removeComponent(ViewerSurfaceReferenceComponent_1.ViewerSurfaceReferenceComponent.ID);\n }\n var debugSurfaceComponent = entity.getComponent(core_1.ComponentIds.DEBUG_SURFACES_COMPONENT);\n var surfaceObjects = debugSurfaceComponent === null || debugSurfaceComponent === void 0 ? void 0 : debugSurfaceComponent.surfaces;\n var viewerObjects = [];\n surfaceObjects === null || surfaceObjects === void 0 ? void 0 : surfaceObjects.forEach(function (surface) {\n var viewerObject = _this.viewer.createSurface(surface.vertices, surface.normal, entity);\n viewerObject.setVisible(true);\n viewerObjects.push(viewerObject);\n });\n this.entityManager.addComponent(entity, new ViewerSurfaceReferenceComponent_1.ViewerSurfaceReferenceComponent(viewerObjects));\n };\n DebugSurfaceDrawingSystem.ID = \"debugSurfaceDrawingSystem\";\n return DebugSurfaceDrawingSystem;\n}(SystemBase2_1.SystemBase2));\nexports.DebugSurfaceDrawingSystem = DebugSurfaceDrawingSystem;\n//# sourceMappingURL=DebugSurfaceDrawingSystem.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DebugSurfaceUtils = void 0;\nvar DebugSurfaceCleanupSystem_1 = require(\"./DebugSurfaceCleanupSystem\");\nvar DebugSurfaceDrawingSystem_1 = require(\"./DebugSurfaceDrawingSystem\");\n/**\n * Helper class that helps the user set up DebugSurface drawing.\n */\nvar DebugSurfaceUtils = /** @class */ (function () {\n function DebugSurfaceUtils() {\n }\n /**\n * Enables all systems needed for DebugSurface drawing. This will create and register the needed system.\n * There is no check if the systems are already available. If you want to dispose of the viewer or just\n * disable the systems again, call {@link disableDebugSurfaceDrawing}\n * @param viewer\n * @param entityManager\n */\n DebugSurfaceUtils.enableDebugSurfaceDrawing = function (viewer, entityManager) {\n var drawingSystem = new DebugSurfaceDrawingSystem_1.DebugSurfaceDrawingSystem(viewer, entityManager);\n entityManager.registerSystem(drawingSystem);\n var cleanupSystem = new DebugSurfaceCleanupSystem_1.DebugSurfaceCleanupSystem(entityManager);\n entityManager.registerSystem(cleanupSystem);\n };\n /**\n * Disables and unregisters the systems needed for DebugSurface drawing. If the systems aren't registered,\n * nothing will happen.\n */\n DebugSurfaceUtils.disableDebugSurfaceDrawing = function (entityManager) {\n this.disableSystem(DebugSurfaceDrawingSystem_1.DebugSurfaceDrawingSystem.ID, entityManager);\n this.disableSystem(DebugSurfaceCleanupSystem_1.DebugSurfaceCleanupSystem.ID, entityManager);\n };\n DebugSurfaceUtils.disableSystem = function (systemID, entityManager) {\n var system = entityManager.getSystemsRegistered().find(function (it) {\n return it.id === systemID;\n });\n if (system) {\n entityManager.unregisterSystem(system);\n }\n };\n return DebugSurfaceUtils;\n}());\nexports.DebugSurfaceUtils = DebugSurfaceUtils;\n//# sourceMappingURL=DebugSurfaceUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CanvasComponent = void 0;\nvar CoreToolboxComponentIds_1 = require(\"../CoreToolboxComponentIds\");\n/**\n * Stores a reference to the canvas that the viewer draws to.\n * Recommended is to add this component to the SceneManager.root\n * (not the scene, as that will be replaced when loading)\n *\n * It is up to the planner to create this component. Don't forget to remove it\n * if the canvas is disposed of.\n */\nvar CanvasComponent = /** @class */ (function () {\n function CanvasComponent(canvas) {\n this.canvas = canvas;\n this.typeId = CanvasComponent.ID;\n // Since viewers may change between snapshots we must recreate this\n this.doStoreInSnapshot = false;\n }\n CanvasComponent.prototype.eq = function (other) {\n return other.canvas === this.canvas;\n };\n CanvasComponent.ID = CoreToolboxComponentIds_1.CoreToolboxComponentIds.CanvasComponentId;\n return CanvasComponent;\n}());\nexports.CanvasComponent = CanvasComponent;\n//# sourceMappingURL=CanvasComponent.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SnapBackResultType = void 0;\nexports.snapEntitiesToClosestPlace = snapEntitiesToClosestPlace;\nvar core_1 = require(\"@inter-ikea-core/core\");\nvar SnapBackResultType;\n(function (SnapBackResultType) {\n SnapBackResultType[SnapBackResultType[\"VALID_SNAP_WITH_NO_MOVEMENT\"] = 0] = \"VALID_SNAP_WITH_NO_MOVEMENT\";\n SnapBackResultType[SnapBackResultType[\"VALID_SNAP_WITH_MOVEMENT\"] = 1] = \"VALID_SNAP_WITH_MOVEMENT\";\n SnapBackResultType[SnapBackResultType[\"INVALID_SNAP\"] = 2] = \"INVALID_SNAP\";\n SnapBackResultType[SnapBackResultType[\"NO_SNAP_FOUND\"] = 3] = \"NO_SNAP_FOUND\";\n SnapBackResultType[SnapBackResultType[\"HAS_NO_CONNECTOR\"] = 4] = \"HAS_NO_CONNECTOR\";\n})(SnapBackResultType || (exports.SnapBackResultType = SnapBackResultType = {}));\n/**\n * When snapping back things, we accept that the entity has moved a little bit. This is the\n * minimum distance that we consider as movement.\n */\nvar MIN_DISTANCE_COUNTED_AS_MOVEMENT = 0.1;\n/**\n * Snaps entities to the closest place in the scene. If no snap is found, the entity is attached to the scene. A valid snap\n * will be performed before an invalid snap. If multiple snaps are valid the one with the shortest movement will be performed\n * first. If multiple invalid snaps are found the one with the shortest movement will be performed first. Sort order:\n * 1. Valid snap with no movement\n * 2. Valid snap with movement\n * 3. Snap with failing validation\n * 4. No snap found or has no connector\n *\n * @param entities\n * @param sceneManager\n * @param validationService\n * @returns a result for each entity hierarchy that tells if it was snapped, if it was invalid, if it found no matching\n * snap or has no connector.\n */\nfunction snapEntitiesToClosestPlace(entities, sceneManager, validationService) {\n var bestSnapForEachEntity = entities.map(function (entity) {\n return findClosestValidatedSnap(entity, sceneManager, validationService);\n });\n sortByValidAndDistance(bestSnapForEachEntity);\n var result = bestSnapForEachEntity.map(function (snap) {\n if (snap.validSnap) {\n var requiredMovement = snap.validSnap.movement.size;\n snap.validSnap.createAction().perform();\n if (requiredMovement < MIN_DISTANCE_COUNTED_AS_MOVEMENT) {\n return {\n result: SnapBackResultType.VALID_SNAP_WITH_NO_MOVEMENT,\n entity: snap.entity\n };\n }\n else {\n return {\n result: SnapBackResultType.VALID_SNAP_WITH_MOVEMENT,\n entity: snap.entity\n };\n }\n }\n else if (snap.invalidSnap) {\n // We need to snap to something even if we can't find a valid snap\n snap.invalidSnap.createAction().perform();\n return { result: SnapBackResultType.INVALID_SNAP, entity: snap.entity };\n }\n else {\n // Has no snap, just attach it to the scene\n core_1.HierarchyUtils.setParentMaintainTransform(snap.entity, sceneManager.scene);\n if (snap.hasConnector) {\n return { result: SnapBackResultType.NO_SNAP_FOUND, entity: snap.entity };\n }\n else {\n return { result: SnapBackResultType.HAS_NO_CONNECTOR, entity: snap.entity };\n }\n }\n });\n return result;\n}\nfunction findClosestValidatedSnap(entity, sceneManager, validationService) {\n // Find all possible snaps sorted by distance\n var candidates = core_1.SnapActionCandidateSortAndSelectStrategies.SORT_BY_DISTANCE.sortAndSelect(core_1.SnapUtils.matchingSnapActionCandidatesInScene(entity, sceneManager, {\n includeAllSubConnectors: true,\n includeInternalConnectors: true,\n includeHostAssemblyParts: false,\n includeAlignmentConnectorsOutsideActivationDistance: true\n }));\n if (candidates.length > 0) {\n // Take the first valid and ignore warnings (false as third param)\n var validatedCandidate = validationService.getFirstValidSnapAction(candidates, false);\n var validCandidate = validatedCandidate.snapActionCandidate;\n if (validCandidate != null) {\n return { validSnap: validCandidate, entity: entity, hasConnector: true };\n }\n else {\n return { invalidSnap: candidates[0], entity: entity, hasConnector: true };\n }\n }\n else {\n if (core_1.ConnectorUtils.snappingEntitiesArray(entity).length === 0) {\n return { entity: entity, hasConnector: false };\n }\n return { entity: entity, hasConnector: true };\n }\n}\n/**\n * Sort by valid with the shortest movement and then invalid with the shortest movement\n * @param bestSnapForEachEntity\n */\nfunction sortByValidAndDistance(bestSnapForEachEntity) {\n bestSnapForEachEntity.sort(function (a, b) {\n // If a is valid and b is not, a should come first (return -1))\n if (a.validSnap && !b.validSnap) {\n return -1;\n }\n // If b is valid and a is not, b should come first (return 1)\n if (!a.validSnap && b.validSnap) {\n return 1;\n }\n // If both are valid, the one with the shortest movement should come first\n if (a.validSnap && b.validSnap) {\n return a.validSnap.movement.size - b.validSnap.movement.size;\n }\n // If we come this far, none of the candidates has a valid snap. Let's pick the best invalid one.\n // If a has an invalid snap and b does not, a should come first (return -1)\n if (a.invalidSnap && !b.invalidSnap) {\n return -1;\n }\n // If b has an invalid snap and a does not, b should come first (return 1)\n if (!a.invalidSnap && b.invalidSnap) {\n return 1;\n }\n // If both are invalid, the one with the shortest movement should come first\n if (a.invalidSnap && b.invalidSnap) {\n return a.invalidSnap.movement.size - b.invalidSnap.movement.size;\n }\n return 0;\n });\n}\n//# sourceMappingURL=SnapBackUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRoomDimensionsFromLegacyComponents = getRoomDimensionsFromLegacyComponents;\nexports.getChildrenOfRoomAndScene = getChildrenOfRoomAndScene;\nvar core_1 = require(\"@inter-ikea-core/core\");\n/**\n * Tries to find the dimensions of a room using either RoomGeometryComponent or\n * RoomDimensionsComponent. It will use the result from the first one it finds, if any.\n *\n * @param roots entities that are returned from serialization\n * @returns the dimensions of the room if it is found, otherwise null\n */\nfunction getRoomDimensionsFromLegacyComponents(roots) {\n for (var i = 0; i < roots.length; i++) {\n var root = roots[i];\n var roomWithGeometry = core_1.HierarchyUtils.getDescendantWithComponent(root, core_1.ComponentIds.ROOM_GEOMETRY_COMPONENT_ID);\n if (roomWithGeometry) {\n var geometry = roomWithGeometry.getComponent(core_1.ComponentIds.ROOM_GEOMETRY_COMPONENT_ID);\n if (geometry) {\n return geometry === null || geometry === void 0 ? void 0 : geometry.dimensions;\n }\n }\n var roomWithDimensions = core_1.HierarchyUtils.getDescendantWithComponent(root, core_1.ComponentIds.ROOM_DIMENSIONS_COMPONENT_ID);\n if (roomWithDimensions) {\n var dimensionsComponent = roomWithDimensions.getComponent(core_1.ComponentIds.ROOM_DIMENSIONS_COMPONENT_ID);\n if (dimensionsComponent) {\n // At the time when RoomDimensionsComponent was used, origo was placed\n // at the back wall. This is why the Z-coordinate of the center looks\n // like it does.\n return {\n width: dimensionsComponent.dimensions.X,\n height: dimensionsComponent.dimensions.Y,\n depth: dimensionsComponent.dimensions.Z,\n center: new core_1.Vector(0, dimensionsComponent.dimensions.Y / 2, dimensionsComponent.dimensions.Z / 2)\n };\n }\n }\n }\n return null;\n}\n/**\n * Returns all entities that are direct children of the room or that are non-room children\n * of the scene. It's meant to be used on the roots that are returned from deserialization.\n * It assumes that the room is marked with a `RoomComponent`.\n * This function has support for multi-entity rooms (where walls, windows, doors, etc.\n * are separate entities).\n *\n * @param roots entities returned from serialization\n * @returns all entities that are direct children of the room\n */\nfunction getChildrenOfRoomAndScene(roots) {\n return roots.flatMap(function (root) {\n var room = findRoom(root);\n if (!room) {\n return [root];\n }\n else {\n var newRoots = [];\n var scene = core_1.HierarchyUtils.parent(room);\n if (scene) {\n var nonRoomChildren = core_1.HierarchyUtils.children(scene).filter(function (child) { return !child.hasComponent(core_1.ComponentIds.ROOM_COMPONENT_ID); });\n newRoots.push.apply(newRoots, nonRoomChildren);\n }\n var roomDescendants = findAllNonRoomPartDescendants(room);\n newRoots.push.apply(newRoots, roomDescendants);\n return newRoots;\n }\n });\n}\nfunction findRoom(scene) {\n return core_1.HierarchyUtils.getDescendantWithComponent(scene, core_1.ComponentIds.ROOM_COMPONENT_ID);\n}\nfunction isRoomEntity(entity) {\n return (entity.hasComponent(core_1.ComponentIds.ROOM_PART_COMPONENT_ID) ||\n entity.hasComponent(core_1.ComponentIds.ROOM_COMPONENT_ID));\n}\nfunction findAllNonRoomPartDescendants(roomPart) {\n if (isRoomEntity(roomPart)) {\n return core_1.HierarchyUtils.children(roomPart).flatMap(function (child) {\n return findAllNonRoomPartDescendants(child);\n });\n }\n else {\n return [roomPart];\n }\n}\n//# sourceMappingURL=RoomHierarchyUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SerializationUtils = void 0;\nvar RoomHierarchyUtils_1 = require(\"./RoomHierarchyUtils\");\nvar SnapBackUtils_1 = require(\"./SnapBackUtils\");\n/**\n * Contains utility functions that can be used to handle room related things\n * when serializing and deserializing the core state.\n */\nexports.SerializationUtils = {\n getRoomDimensionsFromLegacyComponents: RoomHierarchyUtils_1.getRoomDimensionsFromLegacyComponents,\n getChildrenOfRoomAndScene: RoomHierarchyUtils_1.getChildrenOfRoomAndScene,\n snapEntitiesToClosestPlace: SnapBackUtils_1.snapEntitiesToClosestPlace,\n};\n//# sourceMappingURL=SerializationUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.KvadratVPCComponentSerializer = exports.KvadratVPCComponent = void 0;\nvar CoreToolboxComponentIds_1 = require(\"../CoreToolboxComponentIds\");\n/**\n * KvadratVPCComponent is a component for holding the VPC code of a Kvadrat room.\n * The purpose is to hold the Kvadrat VPC code when the scene is saved, so that it can be restored when\n * the solution is read.\n *\n * For Core to be able to deserialize this component, you need to register the {@link KvadratVPCComponentSerializer}.\n */\nvar KvadratVPCComponent = /** @class */ (function () {\n function KvadratVPCComponent(vpc) {\n this.typeId = KvadratVPCComponent.id;\n this.doStoreInSnapshot = false;\n this.serializable = true;\n this.vpc = vpc;\n }\n KvadratVPCComponent.prototype.serializationKey = function () {\n return KvadratVPCComponent.KEY;\n };\n KvadratVPCComponent.prototype.toJson = function (parse) {\n return parse(JSON.stringify(this.vpc));\n };\n KvadratVPCComponent.prototype.eq = function (_other) {\n return _other instanceof KvadratVPCComponent && _other.vpc === this.vpc;\n };\n KvadratVPCComponent.id = CoreToolboxComponentIds_1.CoreToolboxComponentIds.KvadratVPCComponentId;\n KvadratVPCComponent.KEY = 'kvadrat_vpc_code';\n return KvadratVPCComponent;\n}());\nexports.KvadratVPCComponent = KvadratVPCComponent;\n/**\n * THe KvadratVPCComponentSerializer is needed if you want to deserialize the {@link KvadratVPCComponent}.\n * Register it with the `Core.services.componentSerializerRegistry`.\n */\nvar KvadratVPCComponentSerializer = /** @class */ (function () {\n function KvadratVPCComponentSerializer() {\n this.thisClassIsGuaranteedToNotModifyOrQueryCoreState = true;\n }\n KvadratVPCComponentSerializer.prototype.canHandle = function (serializationKey) {\n return serializationKey == KvadratVPCComponent.KEY;\n };\n KvadratVPCComponentSerializer.prototype.deserialize = function (serializationKey, json) {\n if (serializationKey == KvadratVPCComponent.KEY) {\n var vpc = JSON.parse(json.toString());\n return new KvadratVPCComponent(vpc);\n }\n return null;\n };\n return KvadratVPCComponentSerializer;\n}());\nexports.KvadratVPCComponentSerializer = KvadratVPCComponentSerializer;\n//# sourceMappingURL=KvadratVPCComponent.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.KvadratVPCComponentSerializer = exports.KvadratVPCComponent = exports.SerializationUtils = exports.SnapBackResultType = exports.CanvasComponent = exports.DebugSurfaceCleanupSystem = exports.DebugSurfaceDrawingSystem = exports.DebugSurfaceUtils = exports.ZoneVsColliderExceptSomeThingsRule = exports.ZoneVsColliderValidationResult = exports.ZoneVsColliderRule = exports.ZoneVsZoneValidationResult = exports.ZoneVsZoneRule = exports.FunctionalZoneValidationBase = exports.createCore = exports.DynamicRangeValidator = exports.DynamicRangeTemplateSchemas = exports.DynamicRangeCatalogSchemas = exports.DragUtils = exports.AddBlockingToAllModelsSystem = exports.OutlineUtils = exports.SimpleOutlineChildrenSystem = exports.SimpleOutlineSelectedSystem = exports.SimpleOutlineAssemblySystem = exports.SimpleOutlineModelSystem = exports.ValidationBase = exports.ComponentListenerImpl = exports.SystemBase5 = exports.SystemBase4 = exports.SystemBase3 = exports.SystemBase2 = exports.SystemBase = exports.CoreToolboxComponentIds = void 0;\n// Components\nvar CoreToolboxComponentIds_1 = require(\"./CoreToolboxComponentIds\");\nObject.defineProperty(exports, \"CoreToolboxComponentIds\", { enumerable: true, get: function () { return CoreToolboxComponentIds_1.CoreToolboxComponentIds; } });\n// Base things to inherit from\nvar SystemBase_1 = require(\"./systembase/SystemBase\");\nObject.defineProperty(exports, \"SystemBase\", { enumerable: true, get: function () { return SystemBase_1.SystemBase; } });\nvar SystemBase2_1 = require(\"./systembase/SystemBase2\");\nObject.defineProperty(exports, \"SystemBase2\", { enumerable: true, get: function () { return SystemBase2_1.SystemBase2; } });\nvar SystemBase3_1 = require(\"./systembase/SystemBase3\");\nObject.defineProperty(exports, \"SystemBase3\", { enumerable: true, get: function () { return SystemBase3_1.SystemBase3; } });\nvar SystemBase4_1 = require(\"./systembase/SystemBase4\");\nObject.defineProperty(exports, \"SystemBase4\", { enumerable: true, get: function () { return SystemBase4_1.SystemBase4; } });\nvar SystemBase5_1 = require(\"./systembase/SystemBase5\");\nObject.defineProperty(exports, \"SystemBase5\", { enumerable: true, get: function () { return SystemBase5_1.SystemBase5; } });\nvar ComponentListenerImpl_1 = require(\"./systembase/ComponentListenerImpl\");\nObject.defineProperty(exports, \"ComponentListenerImpl\", { enumerable: true, get: function () { return ComponentListenerImpl_1.ComponentListenerImpl; } });\nvar ValidationBase_1 = require(\"./validation/ValidationBase\");\nObject.defineProperty(exports, \"ValidationBase\", { enumerable: true, get: function () { return ValidationBase_1.ValidationBase; } });\n// Outline systems\nvar SimpleOutlineModelSystem_1 = require(\"./outlineSystem/SimpleOutlineModelSystem\");\nObject.defineProperty(exports, \"SimpleOutlineModelSystem\", { enumerable: true, get: function () { return SimpleOutlineModelSystem_1.SimpleOutlineModelSystem; } });\nvar SimpleOutlineAssemblySystem_1 = require(\"./outlineSystem/SimpleOutlineAssemblySystem\");\nObject.defineProperty(exports, \"SimpleOutlineAssemblySystem\", { enumerable: true, get: function () { return SimpleOutlineAssemblySystem_1.SimpleOutlineAssemblySystem; } });\nvar SimpleOutlineSelectedSystem_1 = require(\"./outlineSystem/SimpleOutlineSelectedSystem\");\nObject.defineProperty(exports, \"SimpleOutlineSelectedSystem\", { enumerable: true, get: function () { return SimpleOutlineSelectedSystem_1.SimpleOutlineSelectedSystem; } });\nvar SimpleOutlineChildrenSystem_1 = require(\"./outlineSystem/SimpleOutlineChildrenSystem\");\nObject.defineProperty(exports, \"SimpleOutlineChildrenSystem\", { enumerable: true, get: function () { return SimpleOutlineChildrenSystem_1.SimpleOutlineChildrenSystem; } });\nvar OutlineUtils_1 = require(\"./outlineSystem/OutlineUtils\");\nObject.defineProperty(exports, \"OutlineUtils\", { enumerable: true, get: function () { return OutlineUtils_1.OutlineUtils; } });\nvar AddBlockingToAllModelsSystem_1 = require(\"./outlineSystem/AddBlockingToAllModelsSystem\");\nObject.defineProperty(exports, \"AddBlockingToAllModelsSystem\", { enumerable: true, get: function () { return AddBlockingToAllModelsSystem_1.AddBlockingToAllModelsSystem; } });\n// Dragging\nvar DragUtils_1 = require(\"./drag/DragUtils\");\nObject.defineProperty(exports, \"DragUtils\", { enumerable: true, get: function () { return DragUtils_1.DragUtils; } });\n// Dynamic range schemas\nvar index_1 = require(\"./schema/index\");\nObject.defineProperty(exports, \"DynamicRangeCatalogSchemas\", { enumerable: true, get: function () { return index_1.DynamicRangeCatalogSchemas; } });\nObject.defineProperty(exports, \"DynamicRangeTemplateSchemas\", { enumerable: true, get: function () { return index_1.DynamicRangeTemplateSchemas; } });\nObject.defineProperty(exports, \"DynamicRangeValidator\", { enumerable: true, get: function () { return index_1.DynamicRangeValidator; } });\n// Test utils\nvar core_creator_1 = require(\"./testUtils/core_creator\");\nObject.defineProperty(exports, \"createCore\", { enumerable: true, get: function () { return core_creator_1.createCore; } });\n// Functional zones\nvar FunctionalZoneValidationBase_1 = require(\"./functionalZones/FunctionalZoneValidationBase\");\nObject.defineProperty(exports, \"FunctionalZoneValidationBase\", { enumerable: true, get: function () { return FunctionalZoneValidationBase_1.FunctionalZoneValidationBase; } });\nvar ZoneVsZoneRule_1 = require(\"./functionalZones/ZoneVsZoneRule\");\nObject.defineProperty(exports, \"ZoneVsZoneRule\", { enumerable: true, get: function () { return ZoneVsZoneRule_1.ZoneVsZoneRule; } });\nvar ZoneVsZoneValidationResult_1 = require(\"./functionalZones/ZoneVsZoneValidationResult\");\nObject.defineProperty(exports, \"ZoneVsZoneValidationResult\", { enumerable: true, get: function () { return ZoneVsZoneValidationResult_1.ZoneVsZoneValidationResult; } });\nvar ZoneVsColliderRule_1 = require(\"./functionalZones/ZoneVsColliderRule\");\nObject.defineProperty(exports, \"ZoneVsColliderRule\", { enumerable: true, get: function () { return ZoneVsColliderRule_1.ZoneVsColliderRule; } });\nvar ZoneVsColliderValidationResult_1 = require(\"./functionalZones/ZoneVsColliderValidationResult\");\nObject.defineProperty(exports, \"ZoneVsColliderValidationResult\", { enumerable: true, get: function () { return ZoneVsColliderValidationResult_1.ZoneVsColliderValidationResult; } });\nvar ZoneVsColliderExceptSomeThingsRule_1 = require(\"./functionalZones/ZoneVsColliderExceptSomeThingsRule\");\nObject.defineProperty(exports, \"ZoneVsColliderExceptSomeThingsRule\", { enumerable: true, get: function () { return ZoneVsColliderExceptSomeThingsRule_1.ZoneVsColliderExceptSomeThingsRule; } });\n// DebugSurfaceDrawing system\nvar DebugSurfaceUtils_1 = require(\"./debugSurfaceDrawingSystem/DebugSurfaceUtils\");\nObject.defineProperty(exports, \"DebugSurfaceUtils\", { enumerable: true, get: function () { return DebugSurfaceUtils_1.DebugSurfaceUtils; } });\nvar DebugSurfaceDrawingSystem_1 = require(\"./debugSurfaceDrawingSystem/DebugSurfaceDrawingSystem\");\nObject.defineProperty(exports, \"DebugSurfaceDrawingSystem\", { enumerable: true, get: function () { return DebugSurfaceDrawingSystem_1.DebugSurfaceDrawingSystem; } });\nvar DebugSurfaceCleanupSystem_1 = require(\"./debugSurfaceDrawingSystem/DebugSurfaceCleanupSystem\");\nObject.defineProperty(exports, \"DebugSurfaceCleanupSystem\", { enumerable: true, get: function () { return DebugSurfaceCleanupSystem_1.DebugSurfaceCleanupSystem; } });\n// Canvas\nvar CanvasComponent_1 = require(\"./htmlInteraction/CanvasComponent\");\nObject.defineProperty(exports, \"CanvasComponent\", { enumerable: true, get: function () { return CanvasComponent_1.CanvasComponent; } });\nvar SnapBackUtils_1 = require(\"./serialization/SnapBackUtils\");\nObject.defineProperty(exports, \"SnapBackResultType\", { enumerable: true, get: function () { return SnapBackUtils_1.SnapBackResultType; } });\nvar SerializationUtils_1 = require(\"./serialization/SerializationUtils\");\nObject.defineProperty(exports, \"SerializationUtils\", { enumerable: true, get: function () { return SerializationUtils_1.SerializationUtils; } });\nvar KvadratVPCComponent_1 = require(\"./serialization/KvadratVPCComponent\");\nObject.defineProperty(exports, \"KvadratVPCComponent\", { enumerable: true, get: function () { return KvadratVPCComponent_1.KvadratVPCComponent; } });\nObject.defineProperty(exports, \"KvadratVPCComponentSerializer\", { enumerable: true, get: function () { return KvadratVPCComponent_1.KvadratVPCComponentSerializer; } });\n//# sourceMappingURL=index.js.map","import { CoreToolboxComponentIds } from \"@inter-ikea-core/core-toolbox\";\n/**\n * Stores a reference to the IPEX viewer (not to be confused with the ViewerComponent\n * which stores a reference to the Viewer interface used internally by Core).\n *\n * This is the one you want to use in a planner as the IViewer interface contains all functionality\n * offered by the IPEX viewer which Core's internal Viewer-interface only has the functionality\n * necessary internally for Core to work.\n */\nexport class IpexViewerComponent {\n viewer;\n static ID = CoreToolboxComponentIds.IpexViewerComponentId;\n typeId = IpexViewerComponent.ID;\n // Since viewers may change between snapshots we must recreate this\n doStoreInSnapshot = false;\n constructor(viewer) {\n this.viewer = viewer;\n }\n eq(other) {\n return other.viewer === this.viewer;\n }\n}\n//# sourceMappingURL=IpexViewerComponent.js.map","import { Vector } from \"@inter-ikea-core/core\";\nimport { IpexViewerComponent } from \"./IpexViewerComponent\";\nexport function getCanvasCoordinates(event) {\n return new Vector(event.canvas_x, event.canvas_y, 0);\n}\nexport function fromMeters(x) {\n return x * 1000;\n}\nexport function toMeters(x) {\n return x / 1000;\n}\nexport function toVectorUnscaled(vector) {\n const { x, y } = vector;\n const z = 'z' in vector ? vector.z : 0;\n return new Vector(x, y, z);\n}\nexport function toVector(vector) {\n const { x, y } = vector;\n const z = 'z' in vector ? vector.z : 0;\n return new Vector(fromMeters(x), fromMeters(y), fromMeters(z));\n}\nexport function toIVector3(vector) {\n return {\n x: toMeters(vector.X),\n y: toMeters(vector.Y),\n z: toMeters(vector.Z),\n };\n}\nexport function rgb(r, g, b) {\n return { r, g, b };\n}\n/**\n * Gets the @IpexViewerComponent stored on @SceneManager .root\n * Note that you need to place it there first yourself, once you have access to the viewer.\n *\n * @param sceneManager\n * @returns\n */\nexport function getIpexViewer(sceneManager) {\n return sceneManager.root.getComponent(IpexViewerComponent.ID)?.viewer;\n}\nexport function setIpexViewer(sceneManager, entityManager, viewer) {\n if (viewer)\n sceneManager.root.addComponent(new IpexViewerComponent(viewer));\n else\n sceneManager.root.removeComponent(IpexViewerComponent.ID);\n}\n//# sourceMappingURL=util.js.map","import { ClickEventComponent, ComponentIds, ComponentUtils, MathUtils, Vector, ViewerDragEventComponent, } from \"@inter-ikea-core/core\";\nimport { rgb, toVector, toMeters } from \"../util\";\nexport class IPEXViewerObject {\n id;\n viewer;\n entityManager;\n entity;\n get hasRegisteredInputEvents() {\n return this._hasRegisteredInputEvents;\n }\n _hasRegisteredInputEvents = false;\n advancedViewer;\n constructor(id, viewer, entityManager, entity) {\n this.id = id;\n this.viewer = viewer;\n this.entityManager = entityManager;\n this.entity = entity;\n this.advancedViewer = viewer;\n viewer.set_visible(id, false, true);\n }\n deleteObject() {\n if (this.viewer.object_exists(this.id)) {\n return this.viewer.delete_object(this.id, true);\n }\n return false;\n }\n getViewerObjectId() {\n return this.id;\n }\n setPosition(v) {\n this.viewer.set_position(this.id, toMeters(v.X), toMeters(v.Y), toMeters(v.Z));\n return this;\n }\n getPosition() {\n return toVector(this.viewer.get_position(this.id));\n }\n setRotation(q) {\n const v = q.toEuler();\n this.viewer.set_rotation(this.id, v.X, v.Y, v.Z);\n return this;\n }\n getRotation() {\n const viewerRotation = this.viewer.get_rotation(this.id);\n return MathUtils.quaternionFromEulerRadians(viewerRotation.x, viewerRotation.y, viewerRotation.z);\n }\n setRotationEulerAngleDegrees(v) {\n this.viewer.set_rotation(this.id, (v.X * Math.PI) / 180, (v.Y * Math.PI) / 180, (v.Z * Math.PI) / 180);\n return this;\n }\n setScale(x, y, z) {\n this.viewer.set_scale(this.id, x, y, z);\n return this;\n }\n setScaleV(scale) {\n return this.setScale(scale.X, scale.Y, scale.Z);\n }\n getScale() {\n const scale = this.viewer.get_scale(this.id);\n return new Vector(scale.x, scale.y, scale.z);\n }\n setOutlined(enable) {\n this.viewer.set_outline(this.id, enable, true);\n return this;\n }\n setBlockOutlined(enabled) {\n this.viewer.set_outline_block(this.id, enabled, true);\n return this;\n }\n setBaseColor(r, g, b) {\n const color = rgb(r, g, b);\n this.viewer.get_children(this.id, false, true).forEach((childId) => {\n const materialId = this.viewer.get_material(childId);\n if (materialId != -1) {\n this.viewer.set_base_color(materialId, color);\n }\n });\n return this;\n }\n setTransparency(alpha) {\n this.viewer.set_opacity(this.viewer.get_material(this.id), alpha);\n return this;\n }\n setReceiveShadows(receiveShadows) {\n this.viewer.set_receive_shadow(this.id, receiveShadows, true);\n return this;\n }\n setCastShadows(castShadows) {\n this.viewer.set_cast_shadow(this.id, castShadows, true);\n return this;\n }\n setVisible(visible) {\n this.viewer.set_visible(this.id, visible, true);\n return this;\n }\n getVisible() {\n return this.viewer.get_visible(this.id);\n }\n setEnabled(enabled) {\n this.advancedViewer.set_enabled(this.id, enabled);\n }\n isEnabled() {\n return this.advancedViewer.get_enabled(this.id);\n }\n setParent(parentViewerObject) {\n const parentId = parentViewerObject instanceof IPEXViewerObject\n ? parentViewerObject.getViewerObjectId()\n : null;\n this.viewer.set_parent(this.id, parentId);\n return this;\n }\n sendDragEvent = (_objectId, event) => {\n const entity = this.entity;\n if (!entity)\n return;\n const draggedEntity = ComponentUtils.draggableRootEntity(entity) || entity;\n const planePoint = toVector(event.plane_point);\n const planeNormal = new Vector(event.plane_normal.x, event.plane_normal.y, event.plane_normal.z);\n const delta = toVector(event.world_delta);\n const cameraPosition = toVector(this.viewer.get_active_camera()?.position || { x: 0, y: 0, z: 0 });\n const component = new ViewerDragEventComponent(planePoint, planeNormal, delta, cameraPosition);\n this.entityManager.addComponent(draggedEntity, component);\n };\n sendDragEndEvent = () => {\n const entity = this.entity;\n if (!entity)\n return;\n const draggedEntity = ComponentUtils.draggableRootEntity(entity) || entity;\n this.entityManager.removeComponent(draggedEntity, ComponentIds.VIEWER_DRAG_EVENT_COMPONENT_ID);\n };\n sendClickEvent = (_senderId, event) => {\n const entity = this.entity;\n if (!entity)\n return;\n const screenCoords = new Vector(event.canvas_x, event.canvas_y, 0);\n const component = new ClickEventComponent(screenCoords);\n this.entityManager.addComponent(entity, component);\n this.entityManager.removeComponent(entity, ComponentIds.CLICK_EVENT_COMPONENT_ID);\n };\n observers = [];\n /**\n * Will register both drag and click events for this object and all its descendants.\n *\n * Note that if you change the hierarchy and want to update the observers, you need to\n * first unregister the old ones by calling {@link unregisterInputEvents} and then call\n * this method again.\n */\n registerInputEvents() {\n // We can't send events about this object if it doesn't correspond to an entity.\n if (!this.entity)\n return;\n if (this._hasRegisteredInputEvents)\n return;\n this.observers = this.viewer.get_children(this.id, false, true).flatMap((childId) => [\n this.viewer.get_object_click_observable(childId).add(this.sendClickEvent),\n this.viewer.get_object_drag_begin_observable(childId).add(this.sendDragEvent),\n this.viewer.get_object_drag_observable(childId).add(this.sendDragEvent),\n this.viewer.get_object_drag_end_observable(childId).add(this.sendDragEndEvent),\n ]);\n this._hasRegisteredInputEvents = true;\n }\n /**\n * Enables consumers to avoid triggering input events. Note that if you just remove DraggableComponent\n * or SelectableComponent event components will still be generated and will \"bubble up\" in the hierarchy\n * until it finds one of these components. So in case what you actually want to do is just not get\n * input events then the new method is the recommended way.\n */\n unregisterInputEvents() {\n // We can't send events about this object if it doesn't correspond to an entity.\n if (!this.entity)\n return;\n if (!this._hasRegisteredInputEvents)\n return;\n this.observers.forEach((observer) => observer.dispose());\n this.observers = [];\n this._hasRegisteredInputEvents = false;\n }\n makeClickable(onClick) {\n this.viewer.get_object_click_observable(this.id).add(onClick);\n }\n setOutlinedObjectColor(r, g, b) {\n this.viewer.set_object_outline_color(this.id, rgb(r, g, b));\n return this;\n }\n removeOutlinedObjectColor() {\n this.viewer.set_object_outline_color(this.id, null);\n return this;\n }\n}\n//# sourceMappingURL=IPEXViewerObject.js.map","'use strict';\n\nmodule.exports = earcut;\nmodule.exports.default = earcut;\n\nfunction earcut(data, holeIndices, dim) {\n\n dim = dim || 2;\n\n var hasHoles = holeIndices && holeIndices.length,\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n outerNode = linkedList(data, 0, outerLen, dim, true),\n triangles = [];\n\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\n var minX, minY, maxX, maxY, x, y, invSize;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (var i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 32767 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n var i, last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n var p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n var stop = ear,\n prev, next;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim | 0);\n triangles.push(ear.i / dim | 0);\n triangles.push(next.i / dim | 0);\n\n removeNode(ear);\n\n // skipping the next vertex leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(filterPoints(ear), triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n // triangle bbox; min & max are calculated like this for speed\n var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),\n y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),\n x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),\n y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);\n\n var p = c.next;\n while (p !== a) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&\n pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n // triangle bbox; min & max are calculated like this for speed\n var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),\n y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),\n x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),\n y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);\n\n // z-order range for the current triangle bbox;\n var minZ = zOrder(x0, y0, minX, minY, invSize),\n maxZ = zOrder(x1, y1, minX, minY, invSize);\n\n var p = ear.prevZ,\n n = ear.nextZ;\n\n // look for points inside the triangle in both directions\n while (p && p.z >= minZ && n && n.z <= maxZ) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n // look for remaining points in decreasing z-order\n while (p && p.z >= minZ) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n // look for remaining points in increasing z-order\n while (n && n.z <= maxZ) {\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n var p = start;\n do {\n var a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i / dim | 0);\n triangles.push(p.i / dim | 0);\n triangles.push(b.i / dim | 0);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return filterPoints(p);\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n var a = start;\n do {\n var b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n var c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, invSize, 0);\n earcutLinked(c, triangles, dim, minX, minY, invSize, 0);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n var queue = [],\n i, len, start, end, list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n // process holes from left to right\n for (i = 0; i < queue.length; i++) {\n outerNode = eliminateHole(queue[i], outerNode);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n var bridge = findHoleBridge(hole, outerNode);\n if (!bridge) {\n return outerNode;\n }\n\n var bridgeReverse = splitPolygon(bridge, hole);\n\n // filter collinear points around the cuts\n filterPoints(bridgeReverse, bridgeReverse.next);\n return filterPoints(bridge, bridge.next);\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n var p = outerNode,\n hx = hole.x,\n hy = hole.y,\n qx = -Infinity,\n m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n m = p.x < p.next.x ? p : p.next;\n if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n var stop = m,\n mx = m.x,\n my = m.y,\n tanMin = Infinity,\n tan;\n\n p = m;\n\n do {\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if (locallyInside(p, hole) &&\n (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n\n return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n var p = start;\n do {\n if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n var i, p, q, e, tail, numMerges, pSize, qSize,\n inSize = 1;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = (x - minX) * invSize | 0;\n y = (y - minY) * invSize | 0;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n var p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) >= (ax - px) * (cy - py) &&\n (ax - px) * (by - py) >= (bx - px) * (ay - py) &&\n (bx - px) * (cy - py) >= (cx - px) * (by - py);\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n var o1 = sign(area(p1, q1, p2));\n var o2 = sign(area(p1, q1, q2));\n var o3 = sign(area(p2, q2, p1));\n var o4 = sign(area(p2, q2, q1));\n\n if (o1 !== o2 && o3 !== o4) return true; // general case\n\n if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\nfunction sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n var p = a,\n inside = false,\n px = (a.x + b.x) / 2,\n py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n var a2 = new Node(a.i, a.x, a.y),\n b2 = new Node(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n var p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n // vertex index in coordinates array\n this.i = i;\n\n // vertex coordinates\n this.x = x;\n this.y = y;\n\n // previous and next vertex nodes in a polygon ring\n this.prev = null;\n this.next = null;\n\n // z-order curve value\n this.z = 0;\n\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n\n // indicates whether this is a steiner point\n this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n var hasHoles = holeIndices && holeIndices.length;\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (var i = 0, len = holeIndices.length; i < len; i++) {\n var start = holeIndices[i] * dim;\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n var trianglesArea = 0;\n for (i = 0; i < triangles.length; i += 3) {\n var a = triangles[i] * dim;\n var b = triangles[i + 1] * dim;\n var c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n var sum = 0;\n for (var i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n var dim = data[0][0].length,\n result = {vertices: [], holes: [], dimensions: dim},\n holeIndex = 0;\n\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].length; j++) {\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n return result;\n};\n","import { IVector3 } from '../api.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { assert } from '../babylon/utility/Assert.js';\nimport { lerp_float } from '../Math.js';\nimport { PrimitiveBuilder } from './PrimitiveBuilder/PrimitiveBuilder.js';\nconst p1 = new BABYLON_Vector3(1, 1, 1);\nconst p2 = new BABYLON_Vector3(1, 1, -1.0);\nconst p3 = new BABYLON_Vector3(-1, 1, -1.0);\nconst p4 = new BABYLON_Vector3(-1, 1, 1.0);\nconst p5 = new BABYLON_Vector3(1, -1, 1.0);\nconst p6 = new BABYLON_Vector3(1, -1, -1.0);\nconst p7 = new BABYLON_Vector3(-1, -1, -1.0);\nconst p8 = new BABYLON_Vector3(-1, -1, 1.0);\nconst edges = [];\n// The order of the verts is important because of backface culling\nconst edge1 = { p1: p1, p2: p2 };\nconst edge2 = { p1: p2, p2: p3 };\nconst edge3 = { p1: p3, p2: p4 };\nconst edge4 = { p1: p1, p2: p4 };\nedges.push(edge1);\nedges.push(edge2);\nedges.push(edge3);\nedges.push(edge4);\nconst edge5 = { p1: p5, p2: p6 };\nconst edge6 = { p1: p6, p2: p7 };\nconst edge7 = { p1: p7, p2: p8 };\nconst edge8 = { p1: p5, p2: p8 };\nedges.push(edge5);\nedges.push(edge6);\nedges.push(edge7);\nedges.push(edge8);\nconst edge9 = { p1: p1, p2: p5 };\nconst edge10 = { p1: p2, p2: p6 };\nconst edge11 = { p1: p3, p2: p7 };\nconst edge12 = { p1: p4, p2: p8 };\nedges.push(edge9);\nedges.push(edge10);\nedges.push(edge11);\nedges.push(edge12);\nfunction color(r = 1, g = 1, b = 1) {\n return { r: r, g: g, b: b };\n}\n/*\n * A class that creates a transparent box with specified size and position that will be visible once a url is choosen to be loaded, and which will then fade out and disappear (both visually and from the scene graph)\n */\nexport class ProxyLoader {\n create_preview_material() {\n const viewer = this._viewer;\n const id = viewer.create_material('ProxyLoader_Material');\n viewer.set_base_color(id, color(0.5, 0.5, 0.5));\n viewer.set_roughness(id, 0.7);\n viewer.set_metallic(id, 0.0);\n viewer.set_opacity(id, ProxyLoader._base_opacity);\n return id;\n }\n constructor(viewer, url, size, center, model_transform) {\n this._preview_material = null;\n this._started_loading = false;\n this._disposed = false;\n this.animation_complete = new Promise((resolve, reject) => {\n this._loading_resolve = resolve;\n this._loading_reject = reject;\n });\n this._object_loading_id = null;\n this._viewer = viewer;\n this._size = size;\n this._url = url;\n this._model_transform = model_transform !== null && model_transform !== void 0 ? model_transform : null;\n if (ProxyLoader._shared_preview_material === null) {\n ProxyLoader._shared_preview_material = this.create_preview_material();\n viewer.get_viewer_dispose_observable().add_once(() => {\n ProxyLoader._shared_preview_material = null;\n });\n }\n if (ProxyLoader._shared_preview_outline_material === null) {\n ProxyLoader._shared_preview_outline_material = viewer.create_material('ProxyLoader_Material');\n viewer.set_unlit(ProxyLoader._shared_preview_outline_material, true);\n viewer.get_viewer_dispose_observable().add_once(() => {\n ProxyLoader._shared_preview_outline_material = null;\n });\n }\n const advanced_viewer = viewer;\n // Create a box with the provided size and parent it to the model that is loading, hide it until the model is being loaded though\n const primitive_builder = new PrimitiveBuilder(viewer);\n this._preview_box = primitive_builder.create_box(size.x, size.y, size.z, { material: ProxyLoader._shared_preview_material });\n this._viewer.set_position(this._preview_box, center.x, center.y, center.z);\n advanced_viewer.set_enabled(this._preview_box, false);\n // Create the outline lines\n const outline_positions = this.create_outline_positions(new BABYLON_Vector3(center.x, center.y, center.z));\n const outline_indices = new Uint16Array(outline_positions.length / 3);\n for (let i = 0; i < outline_indices.length; i++) {\n outline_indices[i] = i;\n }\n this._preview_outline = this._viewer.create_custom_mesh({\n positions: outline_positions,\n indices: outline_indices\n }, ProxyLoader._shared_preview_outline_material);\n advanced_viewer.set_enabled(this._preview_outline, false);\n }\n dispose() {\n this._disposed = true;\n // There was a bug where Core removed all children including preview box before this callback was called\n // Check if object still exists before removing it\n if (this._viewer.object_exists(this._preview_box)) {\n this._viewer.delete_object(this._preview_box); // this will not remove material assigned to object\n }\n // Same as above\n if (this._viewer.object_exists(this._preview_outline)) {\n this._viewer.delete_object(this._preview_outline); // this will not remove material assigned to object\n }\n // Cleanup material\n if (this._preview_material !== null) {\n this._viewer.delete_material(this._preview_material);\n }\n }\n *object_is_loading(reject) {\n while (!this._disposed) {\n if (!this._viewer.object_exists(this._object_loading_id)) {\n reject(`object id ${this._object_loading_id} deleted before loaded`);\n }\n yield undefined;\n }\n return undefined;\n }\n *animate_opacity(on_complete) {\n let elapsed_time = 0;\n if (this._disposed)\n return undefined;\n if (this._preview_material === null) {\n // Create a unique material for us when we are starting the animation\n this._preview_material = this.create_preview_material();\n this._viewer.set_material(this._preview_box, this._preview_material);\n }\n while (elapsed_time < ProxyLoader._animation_duration) {\n // yield here receives DeltaTime object with information for this frame\n const delta = yield;\n if (this._disposed)\n return undefined; // We don't do anything after a dispose so we might as well just return here\n elapsed_time += delta.seconds;\n const opacity = lerp_float(ProxyLoader._base_opacity, 0, elapsed_time / ProxyLoader._animation_duration);\n this._viewer.set_opacity(this._preview_material, opacity);\n }\n if (!this._disposed) {\n this._viewer.set_opacity(this._preview_material, 0);\n on_complete();\n }\n return undefined;\n }\n create_outline_positions(center) {\n const triangle_floats = [];\n const resolution = 4;\n const border_relative_size = 0.0025;\n const radius = border_relative_size *\n new BABYLON_Vector3(this._size.x, this._size.y, this._size.z).length();\n const normal_scales = new Array(resolution)\n .fill(undefined)\n .map((v, i) => Math.cos(Math.PI * 0.25 + 2.0 * Math.PI * (i / resolution)));\n const binormal_scales = new Array(resolution)\n .fill(undefined)\n .map((v, i) => Math.sin(Math.PI * 0.25 + 2.0 * Math.PI * (i / resolution)));\n const half_size = new BABYLON_Vector3(this._size.x * 0.5, this._size.y * 0.5, this._size.z * 0.5);\n edges.forEach((edge) => {\n const p1 = center.add(edge.p1.multiply(half_size));\n const p2 = center.add(edge.p2.multiply(half_size));\n const p1p2 = p1.subtract(p2).normalize();\n const perp = IVector3.perpendicular(p1p2);\n const normal = new BABYLON_Vector3(perp.x, perp.y, perp.z);\n const binormal = p1p2.cross(normal);\n const edge_shift = Math.cos(Math.PI / 4.0) * radius;\n p1.addInPlace(p1p2.scale(edge_shift));\n p2.subtractInPlace(p1p2.scale(edge_shift));\n for (let i = 0; i < resolution; i++) {\n const offset_vector1 = normal\n .scale(normal_scales[i])\n .addInPlace(binormal.scale(binormal_scales[i]))\n .scaleInPlace(radius);\n const cylinder_point1 = p1.add(offset_vector1);\n const cylinder_point2 = p2.add(offset_vector1);\n const offset_vector2 = normal\n .scale(normal_scales[(i + 1) % resolution])\n .addInPlace(binormal.scale(binormal_scales[(i + 1) % resolution]))\n .scaleInPlace(radius);\n const cylinder_point3 = p1.add(offset_vector2);\n const cylinder_point4 = p2.add(offset_vector2);\n // Add our quads. Note that we let the viewer triangulate into triangles.\n const points = [\n cylinder_point1,\n cylinder_point2,\n cylinder_point4,\n cylinder_point1,\n cylinder_point4,\n cylinder_point3\n ];\n // cylinder_point\n points.forEach((point) => {\n triangle_floats.push(point.x);\n triangle_floats.push(point.y);\n triangle_floats.push(point.z);\n });\n }\n });\n return new Float32Array(triangle_floats);\n }\n /**\n * Starts to load the object and sets the loading box to visible, once the object has loaded the loading box will fade out and then be removed from the scene\n */\n load_model_with_box_proxy() {\n if (this._started_loading) {\n throw new Error('Model has already started to load');\n }\n // Load model\n const id = this._viewer.load_model(this._url, undefined, this._model_transform === null ? undefined : this._model_transform);\n this._object_loading_id = id;\n // Make the box enabled\n this._viewer.set_parent(this._preview_box, this._object_loading_id);\n this._viewer.set_parent(this._preview_outline, this._object_loading_id);\n const advanced_viewer = this._viewer;\n advanced_viewer.set_enabled(this._preview_box, true);\n advanced_viewer.set_enabled(this._preview_outline, true);\n let animation_resolve = null;\n let animation_reject = null;\n const internal_animation_promise = new Promise((resolve, reject) => {\n animation_resolve = resolve;\n animation_reject = reject;\n });\n assert(animation_resolve !== null, 'ProxyLoader failed to initialize animation promise chain');\n assert(animation_reject !== null, 'ProxyLoader failed to initialize animation promise chain');\n // When the model is ready we can start the opacity animation which when ended removes the box\n this._viewer.start_coroutine(this.object_is_loading(animation_reject)); // Start the function that checks if to reject the animation if the object the animation is for is deleted\n this._viewer.object_ready(id).then(() => {\n this._viewer.start_coroutine(this.animate_opacity(animation_resolve)); // Start the animate opacity loop\n }).catch((err) => {\n this._loading_reject(err);\n });\n internal_animation_promise.then(() => {\n this.dispose();\n this._loading_resolve();\n }, (err) => {\n this.dispose();\n this._loading_reject(err);\n });\n // Catch the error so we don't have uncaught in promise if user doesn't catch it\n this.animation_complete.catch(() => { });\n this._started_loading = true;\n return this._object_loading_id;\n }\n}\nProxyLoader._animation_duration = 0.3; // default to 0.3 sec\nProxyLoader._base_opacity = 0.75;\nProxyLoader._shared_preview_material = null;\nProxyLoader._shared_preview_outline_material = null;\n//# sourceMappingURL=ProxyLoader.js.map","import { dot, LineType, normalize, rotate } from \"@inter-ikea-betrakta/viewer\";\nimport { ClickEventComponent, Vector } from \"@inter-ikea-core/core\";\nimport { rgb, toIVector3, toMeters, toVector } from \"../util\";\nimport { IPEXViewerObject } from \"./IPEXViewerObject\";\nimport earcut from \"earcut\";\nimport { ProxyLoader } from \"@inter-ikea-betrakta/viewer/dist/modules/ProxyLoader\";\nexport class IPEXViewerCoreAdapter {\n ipexViewer;\n entityManager;\n sceneManager;\n advancedViewer;\n constructor(ipexViewer, entityManager, sceneManager) {\n this.ipexViewer = ipexViewer;\n this.entityManager = entityManager;\n this.sceneManager = sceneManager;\n this.advancedViewer = ipexViewer;\n ipexViewer.get_click_void_observable().add((sender, event) => {\n const coords = new Vector(event.canvas_x, event.canvas_y, 0);\n const clickComponent = new ClickEventComponent(coords);\n const scene = sceneManager.scene;\n entityManager.addComponent(scene, clickComponent);\n entityManager.removeComponent(scene, clickComponent.typeId);\n });\n }\n uiLineAlwaysVisible(isAlwaysVisible) {\n throw new Error(\"Method not implemented.\");\n }\n resize() {\n this.ipexViewer.resize();\n }\n loadModel(entity, modelUrl, textureFile, modelLoaded, modelLoadFailed, loadingBoxSize, loadingBoxCenter) {\n let objectId = -1;\n if (loadingBoxSize && loadingBoxCenter) {\n const proxyLoader = new ProxyLoader(this.ipexViewer, modelUrl, toIVector3(loadingBoxSize), toIVector3(loadingBoxCenter));\n objectId = proxyLoader.load_model_with_box_proxy();\n }\n else {\n objectId = this.ipexViewer.load_model(modelUrl);\n }\n const viewerObject = new IPEXViewerObject(objectId, this.ipexViewer, this.entityManager, entity);\n viewerObject.setReceiveShadows(true);\n viewerObject.registerInputEvents();\n this.ipexViewer\n .object_ready(objectId)\n .then(() => { if (modelLoaded)\n modelLoaded(viewerObject); })\n .catch(() => {\n if (modelLoadFailed)\n modelLoadFailed(viewerObject);\n });\n return viewerObject;\n }\n existsModel(objId) {\n return this.ipexViewer.object_exists(objId);\n }\n worldCoordToCanvas(x, y, z) {\n const result = this.ipexViewer.project_world_position_to_canvas(toMeters(x), toMeters(y), toMeters(z));\n if (result) {\n return new Vector(result.x, result.y, 0);\n }\n return null;\n }\n raycast(x, y) {\n const visibleObjects = this.ipexViewer\n .get_all_objects()\n .filter((id) => this.ipexViewer.get_visible(id));\n const result = this.ipexViewer.raycast_using_canvas_coordinate(x, y, visibleObjects);\n if (result) {\n return toVector(result.world_position);\n }\n return null;\n }\n groupMeshes(meshes, entity) {\n const parent = this.ipexViewer.create_empty_object();\n const meanPos = meshes\n .map((m) => m.getPosition())\n .reduce((prev, curr) => prev.plus(curr), new Vector(0, 0, 0))\n .times(1.0 / meshes.length);\n const viewerPos = toIVector3(meanPos);\n this.ipexViewer.set_position(parent, viewerPos.x, viewerPos.y, viewerPos.z);\n meshes.forEach((mesh) => {\n this.ipexViewer.set_parent(mesh.getViewerObjectId(), parent);\n const currentPos = mesh.getPosition();\n const newPos = currentPos.minus(meanPos);\n const newViewerPos = toIVector3(newPos);\n this.ipexViewer.set_position(mesh.getViewerObjectId(), newViewerPos.x, newViewerPos.y, newViewerPos.z);\n });\n return new IPEXViewerObject(parent, this.ipexViewer, this.entityManager, entity);\n }\n debug(_enable) {\n console.warn('If you want debug support for the ipex viewer, you need to talk directly to the viewer apis');\n }\n createSphere(radius, entity) {\n const viewerRadius = toMeters(radius);\n // segments is a value of sphere \"roundness\", higher value means a smoother sphere, but probably\n // lower performance.\n const segments = 10;\n const material = this.ipexViewer.create_material();\n this.ipexViewer.set_roughness(material, 1);\n this.ipexViewer.set_metallic(material, 0);\n this.ipexViewer.set_base_color(material, rgb(1, 0, 0));\n const sphereId = this.ipexViewer.create_sphere(segments, 2 * viewerRadius, material);\n this.ipexViewer.set_material(sphereId, material);\n return new IPEXViewerObject(sphereId, this.ipexViewer, this.entityManager, entity);\n }\n createBox(width, height, depth, entity) {\n const material = this.ipexViewer.create_material();\n this.ipexViewer.set_roughness(material, 1);\n this.ipexViewer.set_metallic(material, 0);\n this.ipexViewer.set_base_color(material, rgb(0.955, 0.637, 0.538));\n const boxId = this.ipexViewer.create_box(toMeters(width), toMeters(height), toMeters(depth), material);\n this.ipexViewer.set_material(boxId, material);\n const vo = new IPEXViewerObject(boxId, this.ipexViewer, this.entityManager, entity);\n return vo;\n }\n cloneObject(vo, entity) {\n const objId = this.ipexViewer.clone_object(vo.getViewerObjectId());\n return new IPEXViewerObject(objId, this.ipexViewer, this.entityManager, entity);\n }\n createEmpty(entity) {\n const nodeId = this.ipexViewer.create_empty_object();\n return new IPEXViewerObject(nodeId, this.ipexViewer, this.entityManager, entity);\n }\n createPlane(width, depth, entity) {\n const planeId = this.ipexViewer.create_plane(toMeters(width), toMeters(depth));\n const planeMaterial = this.ipexViewer.create_material();\n this.ipexViewer.set_material(planeId, planeMaterial);\n this.ipexViewer.set_roughness(planeMaterial, 1);\n this.ipexViewer.set_metallic(planeMaterial, 0);\n this.ipexViewer.set_base_color(planeMaterial, rgb(0.66, 0.58, 0.49));\n return new IPEXViewerObject(planeId, this.ipexViewer, this.entityManager, entity || undefined);\n }\n //\\left(u_2v_3-u_3v_2,\\:u_3v_1-u_1v_3,\\:u_1v_2-u_2v_1\\right)\n vectorCross(u, v) {\n return toIVector3(new Vector(u.y * v.z - u.z * v.y, u.z * v.x - u.x * v.z, u.x * v.y - u.y * v.x));\n }\n createSurface(vertices, normal, entity) {\n // To use earcut the points must be on the aligned on the same z depth.\n // Because of this I need to rotate all the points so they align to (0,0,1)\n // I use the zNormal and do a cross to rotate all the points so they are on the same z\n const zNormal = normalize(toIVector3(new Vector(0, 0, 1)));\n const iNormal = normalize(toIVector3(normal));\n // Had to create my own cross function since the viewer cross seems to calcuate wrong in some cases.\n const rotateAroundVector = this.vectorCross(zNormal, iNormal);\n const dotProd = dot(zNormal, iNormal);\n // No need to divide by vector length since theye ar normilized\n const degreeToRotate = Math.acos(dotProd);\n const vertices_aligned_to_z = vertices\n .map((v) => {\n const rotated = rotate(toIVector3(v), -degreeToRotate, rotateAroundVector);\n return [rotated.x, rotated.y, rotated.z];\n })\n .flat();\n // Earcutting the polygon\n // returns a list of the vertices for each triangle.\n const trianglesVertices = earcut(vertices_aligned_to_z, undefined, 3);\n // Adding some offset so the surface is not at the exact same location as the object plane.\n // This leads to flicker (offsetting by 5 mm)\n const offset = 0.005;\n const triangles = vertices\n .map((v) => {\n return [\n toMeters(v.X) + iNormal.x * offset,\n toMeters(v.Y) + iNormal.y * offset,\n toMeters(v.Z) + iNormal.z * offset,\n ];\n })\n .flat();\n // Special case when normal of wall is aligned with zNormal.\n // In this case the drawing of the triangles need to be reversed (clockwise)\n if (normal.X === 0 && normal.Y === 0 && normal.Z === -1) {\n for (let k = 0; k < trianglesVertices.length; k += 3) {\n const swapped = trianglesVertices[k];\n trianglesVertices[k] = trianglesVertices[k + 2];\n trianglesVertices[k + 2] = swapped;\n }\n }\n // Creates a custom mesh\n const planeId = this.ipexViewer.create_custom_mesh({\n positions: new Float32Array(triangles),\n indices: new Uint32Array(trianglesVertices)\n });\n const planeMaterial = this.ipexViewer.create_material();\n this.ipexViewer.set_material(planeId, planeMaterial);\n this.ipexViewer.set_metallic(planeMaterial, 0);\n this.ipexViewer.set_opacity(planeMaterial, 0.25);\n this.ipexViewer.set_base_color(planeMaterial, rgb(0, 0, 0.6));\n return new IPEXViewerObject(planeId, this.ipexViewer, this.entityManager, entity || undefined);\n }\n createUiLine(start, end, color, thickness) {\n const lineId = this.ipexViewer.create_ui_line(LineType.SOLID, toIVector3(start), toIVector3(end), rgb(color.X, color.Y, color.Z), toMeters(thickness));\n return lineId;\n }\n createUiDashedLine(start, end, color, thickness) {\n const lineId = this.ipexViewer.create_ui_line(LineType.DASHED, toIVector3(start), toIVector3(end), rgb(color.X, color.Y, color.Z), toMeters(thickness));\n return lineId;\n }\n updateUiLine(id, start, end, color, thickness) {\n this.ipexViewer.update_ui_line(id, toIVector3(start), toIVector3(end), rgb(color.X, color.Y, color.Z), toMeters(thickness));\n }\n removeUiLine(id) {\n this.ipexViewer.delete_ui_line(id);\n }\n uiLineExists(id) {\n return this.ipexViewer.ui_line_exists(id);\n }\n createGhostModel(modelUrl, modelLoaded, r = 0, g = 0, b = 1, alpha = 0.5) {\n const id = this.ipexViewer.load_model(modelUrl);\n this.ipexViewer.object_ready(id)\n .then(() => {\n const newMaterial = this.ipexViewer.create_material();\n this.ipexViewer.set_opacity(newMaterial, alpha);\n this.ipexViewer.set_base_color(newMaterial, rgb(r, g, b));\n this.ipexViewer.set_roughness(newMaterial, 0);\n this.ipexViewer.set_metallic(newMaterial, 0);\n this.ipexViewer.set_material(id, newMaterial);\n this.ipexViewer.set_outline_block(id, false, true);\n this.ipexViewer.set_cast_shadow(id, false, true);\n this.ipexViewer.set_receive_shadow(id, false, true);\n this.ipexViewer.set_visible(id, true, true);\n const viewerObject = new IPEXViewerObject(id, this.ipexViewer, this.entityManager);\n modelLoaded(viewerObject);\n }).catch(() => {\n console.log(`Failed to load ghost ${modelUrl}`);\n });\n }\n}\n//# sourceMappingURL=IPEXViewerCoreAdapter.js.map","import { ComponentIds } from \"@inter-ikea-core/core\";\nexport class CameraComponent {\n static ID = ComponentIds.CAMERA_COMPONENT_ID;\n typeId = CameraComponent.ID;\n doStoreInSnapshot = true;\n eq(_other) {\n return true;\n }\n}\n//# sourceMappingURL=CameraComponent.js.map","// src/utils/formatProdErrorMessage.ts\nfunction formatProdErrorMessage(code) {\n return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;\n}\n\n// src/utils/symbol-observable.ts\nvar $$observable = /* @__PURE__ */ (() => typeof Symbol === \"function\" && Symbol.observable || \"@@observable\")();\nvar symbol_observable_default = $$observable;\n\n// src/utils/actionTypes.ts\nvar randomString = () => Math.random().toString(36).substring(7).split(\"\").join(\".\");\nvar ActionTypes = {\n INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,\n REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,\n PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`\n};\nvar actionTypes_default = ActionTypes;\n\n// src/utils/isPlainObject.ts\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" || obj === null)\n return false;\n let proto = obj;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;\n}\n\n// src/utils/kindOf.ts\nfunction miniKindOf(val) {\n if (val === void 0)\n return \"undefined\";\n if (val === null)\n return \"null\";\n const type = typeof val;\n switch (type) {\n case \"boolean\":\n case \"string\":\n case \"number\":\n case \"symbol\":\n case \"function\": {\n return type;\n }\n }\n if (Array.isArray(val))\n return \"array\";\n if (isDate(val))\n return \"date\";\n if (isError(val))\n return \"error\";\n const constructorName = ctorName(val);\n switch (constructorName) {\n case \"Symbol\":\n case \"Promise\":\n case \"WeakMap\":\n case \"WeakSet\":\n case \"Map\":\n case \"Set\":\n return constructorName;\n }\n return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\\s/g, \"\");\n}\nfunction ctorName(val) {\n return typeof val.constructor === \"function\" ? val.constructor.name : null;\n}\nfunction isError(val) {\n return val instanceof Error || typeof val.message === \"string\" && val.constructor && typeof val.constructor.stackTraceLimit === \"number\";\n}\nfunction isDate(val) {\n if (val instanceof Date)\n return true;\n return typeof val.toDateString === \"function\" && typeof val.getDate === \"function\" && typeof val.setDate === \"function\";\n}\nfunction kindOf(val) {\n let typeOfVal = typeof val;\n if (process.env.NODE_ENV !== \"production\") {\n typeOfVal = miniKindOf(val);\n }\n return typeOfVal;\n}\n\n// src/createStore.ts\nfunction createStore(reducer, preloadedState, enhancer) {\n if (typeof reducer !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(2) : `Expected the root reducer to be a function. Instead, received: '${kindOf(reducer)}'`);\n }\n if (typeof preloadedState === \"function\" && typeof enhancer === \"function\" || typeof enhancer === \"function\" && typeof arguments[3] === \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(0) : \"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.\");\n }\n if (typeof preloadedState === \"function\" && typeof enhancer === \"undefined\") {\n enhancer = preloadedState;\n preloadedState = void 0;\n }\n if (typeof enhancer !== \"undefined\") {\n if (typeof enhancer !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(1) : `Expected the enhancer to be a function. Instead, received: '${kindOf(enhancer)}'`);\n }\n return enhancer(createStore)(reducer, preloadedState);\n }\n let currentReducer = reducer;\n let currentState = preloadedState;\n let currentListeners = /* @__PURE__ */ new Map();\n let nextListeners = currentListeners;\n let listenerIdCounter = 0;\n let isDispatching = false;\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = /* @__PURE__ */ new Map();\n currentListeners.forEach((listener, key) => {\n nextListeners.set(key, listener);\n });\n }\n }\n function getState() {\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(3) : \"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.\");\n }\n return currentState;\n }\n function subscribe(listener) {\n if (typeof listener !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(4) : `Expected the listener to be a function. Instead, received: '${kindOf(listener)}'`);\n }\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(5) : \"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.\");\n }\n let isSubscribed = true;\n ensureCanMutateNextListeners();\n const listenerId = listenerIdCounter++;\n nextListeners.set(listenerId, listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(6) : \"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.\");\n }\n isSubscribed = false;\n ensureCanMutateNextListeners();\n nextListeners.delete(listenerId);\n currentListeners = null;\n };\n }\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(7) : `Actions must be plain objects. Instead, the actual type was: '${kindOf(action)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);\n }\n if (typeof action.type === \"undefined\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(8) : 'Actions may not have an undefined \"type\" property. You may have misspelled an action type string constant.');\n }\n if (typeof action.type !== \"string\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(17) : `Action \"type\" property must be a string. Instead, the actual type was: '${kindOf(action.type)}'. Value was: '${action.type}' (stringified)`);\n }\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(9) : \"Reducers may not dispatch actions.\");\n }\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n const listeners = currentListeners = nextListeners;\n listeners.forEach((listener) => {\n listener();\n });\n return action;\n }\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(10) : `Expected the nextReducer to be a function. Instead, received: '${kindOf(nextReducer)}`);\n }\n currentReducer = nextReducer;\n dispatch({\n type: actionTypes_default.REPLACE\n });\n }\n function observable() {\n const outerSubscribe = subscribe;\n return {\n /**\n * The minimal observable subscription method.\n * @param observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe(observer) {\n if (typeof observer !== \"object\" || observer === null) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(11) : `Expected the observer to be an object. Instead, received: '${kindOf(observer)}'`);\n }\n function observeState() {\n const observerAsObserver = observer;\n if (observerAsObserver.next) {\n observerAsObserver.next(getState());\n }\n }\n observeState();\n const unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe\n };\n },\n [symbol_observable_default]() {\n return this;\n }\n };\n }\n dispatch({\n type: actionTypes_default.INIT\n });\n const store = {\n dispatch,\n subscribe,\n getState,\n replaceReducer,\n [symbol_observable_default]: observable\n };\n return store;\n}\nfunction legacy_createStore(reducer, preloadedState, enhancer) {\n return createStore(reducer, preloadedState, enhancer);\n}\n\n// src/utils/warning.ts\nfunction warning(message) {\n if (typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(message);\n }\n try {\n throw new Error(message);\n } catch (e) {\n }\n}\n\n// src/combineReducers.ts\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n const reducerKeys = Object.keys(reducers);\n const argumentName = action && action.type === actionTypes_default.INIT ? \"preloadedState argument passed to createStore\" : \"previous state received by the reducer\";\n if (reducerKeys.length === 0) {\n return \"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.\";\n }\n if (!isPlainObject(inputState)) {\n return `The ${argumentName} has unexpected type of \"${kindOf(inputState)}\". Expected argument to be an object with the following keys: \"${reducerKeys.join('\", \"')}\"`;\n }\n const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);\n unexpectedKeys.forEach((key) => {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === actionTypes_default.REPLACE)\n return;\n if (unexpectedKeys.length > 0) {\n return `Unexpected ${unexpectedKeys.length > 1 ? \"keys\" : \"key\"} \"${unexpectedKeys.join('\", \"')}\" found in ${argumentName}. Expected to find one of the known reducer keys instead: \"${reducerKeys.join('\", \"')}\". Unexpected keys will be ignored.`;\n }\n}\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach((key) => {\n const reducer = reducers[key];\n const initialState = reducer(void 0, {\n type: actionTypes_default.INIT\n });\n if (typeof initialState === \"undefined\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(12) : `The slice reducer for key \"${key}\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);\n }\n if (typeof reducer(void 0, {\n type: actionTypes_default.PROBE_UNKNOWN_ACTION()\n }) === \"undefined\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(13) : `The slice reducer for key \"${key}\" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in \"redux/*\" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`);\n }\n });\n}\nfunction combineReducers(reducers) {\n const reducerKeys = Object.keys(reducers);\n const finalReducers = {};\n for (let i = 0; i < reducerKeys.length; i++) {\n const key = reducerKeys[i];\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof reducers[key] === \"undefined\") {\n warning(`No reducer provided for key \"${key}\"`);\n }\n }\n if (typeof reducers[key] === \"function\") {\n finalReducers[key] = reducers[key];\n }\n }\n const finalReducerKeys = Object.keys(finalReducers);\n let unexpectedKeyCache;\n if (process.env.NODE_ENV !== \"production\") {\n unexpectedKeyCache = {};\n }\n let shapeAssertionError;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n return function combination(state = {}, action) {\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n if (process.env.NODE_ENV !== \"production\") {\n const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n let hasChanged = false;\n const nextState = {};\n for (let i = 0; i < finalReducerKeys.length; i++) {\n const key = finalReducerKeys[i];\n const reducer = finalReducers[key];\n const previousStateForKey = state[key];\n const nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === \"undefined\") {\n const actionType = action && action.type;\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(14) : `When called with an action of type ${actionType ? `\"${String(actionType)}\"` : \"(unknown type)\"}, the slice reducer for key \"${key}\" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`);\n }\n nextState[key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\n// src/bindActionCreators.ts\nfunction bindActionCreator(actionCreator, dispatch) {\n return function(...args) {\n return dispatch(actionCreator.apply(this, args));\n };\n}\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === \"function\") {\n return bindActionCreator(actionCreators, dispatch);\n }\n if (typeof actionCreators !== \"object\" || actionCreators === null) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(16) : `bindActionCreators expected an object or a function, but instead received: '${kindOf(actionCreators)}'. Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?`);\n }\n const boundActionCreators = {};\n for (const key in actionCreators) {\n const actionCreator = actionCreators[key];\n if (typeof actionCreator === \"function\") {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n// src/compose.ts\nfunction compose(...funcs) {\n if (funcs.length === 0) {\n return (arg) => arg;\n }\n if (funcs.length === 1) {\n return funcs[0];\n }\n return funcs.reduce((a, b) => (...args) => a(b(...args)));\n}\n\n// src/applyMiddleware.ts\nfunction applyMiddleware(...middlewares) {\n return (createStore2) => (reducer, preloadedState) => {\n const store = createStore2(reducer, preloadedState);\n let dispatch = () => {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(15) : \"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.\");\n };\n const middlewareAPI = {\n getState: store.getState,\n dispatch: (action, ...args) => dispatch(action, ...args)\n };\n const chain = middlewares.map((middleware) => middleware(middlewareAPI));\n dispatch = compose(...chain)(store.dispatch);\n return {\n ...store,\n dispatch\n };\n };\n}\n\n// src/utils/isAction.ts\nfunction isAction(action) {\n return isPlainObject(action) && \"type\" in action && typeof action.type === \"string\";\n}\nexport {\n actionTypes_default as __DO_NOT_USE__ActionTypes,\n applyMiddleware,\n bindActionCreators,\n combineReducers,\n compose,\n createStore,\n isAction,\n isPlainObject,\n legacy_createStore\n};\n//# sourceMappingURL=redux.mjs.map","// src/utils/env.ts\nvar NOTHING = Symbol.for(\"immer-nothing\");\nvar DRAFTABLE = Symbol.for(\"immer-draftable\");\nvar DRAFT_STATE = Symbol.for(\"immer-state\");\n\n// src/utils/errors.ts\nvar errors = process.env.NODE_ENV !== \"production\" ? [\n // All error codes, starting by 0:\n function(plugin) {\n return `The plugin for '${plugin}' has not been loaded into Immer. To enable the plugin, import and call \\`enable${plugin}()\\` when initializing your application.`;\n },\n function(thing) {\n return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${thing}'`;\n },\n \"This object has been frozen and should not be mutated\",\n function(data) {\n return \"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \" + data;\n },\n \"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\",\n \"Immer forbids circular references\",\n \"The first or second argument to `produce` must be a function\",\n \"The third argument to `produce` must be a function or undefined\",\n \"First argument to `createDraft` must be a plain object, an array, or an immerable object\",\n \"First argument to `finishDraft` must be a draft returned by `createDraft`\",\n function(thing) {\n return `'current' expects a draft, got: ${thing}`;\n },\n \"Object.defineProperty() cannot be used on an Immer draft\",\n \"Object.setPrototypeOf() cannot be used on an Immer draft\",\n \"Immer only supports deleting array indices\",\n \"Immer only supports setting array indices and the 'length' property\",\n function(thing) {\n return `'original' expects a draft, got: ${thing}`;\n }\n // Note: if more errors are added, the errorOffset in Patches.ts should be increased\n // See Patches.ts for additional errors\n] : [];\nfunction die(error, ...args) {\n if (process.env.NODE_ENV !== \"production\") {\n const e = errors[error];\n const msg = typeof e === \"function\" ? e.apply(null, args) : e;\n throw new Error(`[Immer] ${msg}`);\n }\n throw new Error(\n `[Immer] minified error nr: ${error}. Full error at: https://bit.ly/3cXEKWf`\n );\n}\n\n// src/utils/common.ts\nvar getPrototypeOf = Object.getPrototypeOf;\nfunction isDraft(value) {\n return !!value && !!value[DRAFT_STATE];\n}\nfunction isDraftable(value) {\n if (!value)\n return false;\n return isPlainObject(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!value.constructor?.[DRAFTABLE] || isMap(value) || isSet(value);\n}\nvar objectCtorString = Object.prototype.constructor.toString();\nfunction isPlainObject(value) {\n if (!value || typeof value !== \"object\")\n return false;\n const proto = getPrototypeOf(value);\n if (proto === null) {\n return true;\n }\n const Ctor = Object.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n if (Ctor === Object)\n return true;\n return typeof Ctor == \"function\" && Function.toString.call(Ctor) === objectCtorString;\n}\nfunction original(value) {\n if (!isDraft(value))\n die(15, value);\n return value[DRAFT_STATE].base_;\n}\nfunction each(obj, iter) {\n if (getArchtype(obj) === 0 /* Object */) {\n Reflect.ownKeys(obj).forEach((key) => {\n iter(key, obj[key], obj);\n });\n } else {\n obj.forEach((entry, index) => iter(index, entry, obj));\n }\n}\nfunction getArchtype(thing) {\n const state = thing[DRAFT_STATE];\n return state ? state.type_ : Array.isArray(thing) ? 1 /* Array */ : isMap(thing) ? 2 /* Map */ : isSet(thing) ? 3 /* Set */ : 0 /* Object */;\n}\nfunction has(thing, prop) {\n return getArchtype(thing) === 2 /* Map */ ? thing.has(prop) : Object.prototype.hasOwnProperty.call(thing, prop);\n}\nfunction get(thing, prop) {\n return getArchtype(thing) === 2 /* Map */ ? thing.get(prop) : thing[prop];\n}\nfunction set(thing, propOrOldValue, value) {\n const t = getArchtype(thing);\n if (t === 2 /* Map */)\n thing.set(propOrOldValue, value);\n else if (t === 3 /* Set */) {\n thing.add(value);\n } else\n thing[propOrOldValue] = value;\n}\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\nfunction isMap(target) {\n return target instanceof Map;\n}\nfunction isSet(target) {\n return target instanceof Set;\n}\nfunction latest(state) {\n return state.copy_ || state.base_;\n}\nfunction shallowCopy(base, strict) {\n if (isMap(base)) {\n return new Map(base);\n }\n if (isSet(base)) {\n return new Set(base);\n }\n if (Array.isArray(base))\n return Array.prototype.slice.call(base);\n const isPlain = isPlainObject(base);\n if (strict === true || strict === \"class_only\" && !isPlain) {\n const descriptors = Object.getOwnPropertyDescriptors(base);\n delete descriptors[DRAFT_STATE];\n let keys = Reflect.ownKeys(descriptors);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const desc = descriptors[key];\n if (desc.writable === false) {\n desc.writable = true;\n desc.configurable = true;\n }\n if (desc.get || desc.set)\n descriptors[key] = {\n configurable: true,\n writable: true,\n // could live with !!desc.set as well here...\n enumerable: desc.enumerable,\n value: base[key]\n };\n }\n return Object.create(getPrototypeOf(base), descriptors);\n } else {\n const proto = getPrototypeOf(base);\n if (proto !== null && isPlain) {\n return { ...base };\n }\n const obj = Object.create(proto);\n return Object.assign(obj, base);\n }\n}\nfunction freeze(obj, deep = false) {\n if (isFrozen(obj) || isDraft(obj) || !isDraftable(obj))\n return obj;\n if (getArchtype(obj) > 1) {\n obj.set = obj.add = obj.clear = obj.delete = dontMutateFrozenCollections;\n }\n Object.freeze(obj);\n if (deep)\n Object.entries(obj).forEach(([key, value]) => freeze(value, true));\n return obj;\n}\nfunction dontMutateFrozenCollections() {\n die(2);\n}\nfunction isFrozen(obj) {\n return Object.isFrozen(obj);\n}\n\n// src/utils/plugins.ts\nvar plugins = {};\nfunction getPlugin(pluginKey) {\n const plugin = plugins[pluginKey];\n if (!plugin) {\n die(0, pluginKey);\n }\n return plugin;\n}\nfunction loadPlugin(pluginKey, implementation) {\n if (!plugins[pluginKey])\n plugins[pluginKey] = implementation;\n}\n\n// src/core/scope.ts\nvar currentScope;\nfunction getCurrentScope() {\n return currentScope;\n}\nfunction createScope(parent_, immer_) {\n return {\n drafts_: [],\n parent_,\n immer_,\n // Whenever the modified draft contains a draft from another scope, we\n // need to prevent auto-freezing so the unowned draft can be finalized.\n canAutoFreeze_: true,\n unfinalizedDrafts_: 0\n };\n}\nfunction usePatchesInScope(scope, patchListener) {\n if (patchListener) {\n getPlugin(\"Patches\");\n scope.patches_ = [];\n scope.inversePatches_ = [];\n scope.patchListener_ = patchListener;\n }\n}\nfunction revokeScope(scope) {\n leaveScope(scope);\n scope.drafts_.forEach(revokeDraft);\n scope.drafts_ = null;\n}\nfunction leaveScope(scope) {\n if (scope === currentScope) {\n currentScope = scope.parent_;\n }\n}\nfunction enterScope(immer2) {\n return currentScope = createScope(currentScope, immer2);\n}\nfunction revokeDraft(draft) {\n const state = draft[DRAFT_STATE];\n if (state.type_ === 0 /* Object */ || state.type_ === 1 /* Array */)\n state.revoke_();\n else\n state.revoked_ = true;\n}\n\n// src/core/finalize.ts\nfunction processResult(result, scope) {\n scope.unfinalizedDrafts_ = scope.drafts_.length;\n const baseDraft = scope.drafts_[0];\n const isReplaced = result !== void 0 && result !== baseDraft;\n if (isReplaced) {\n if (baseDraft[DRAFT_STATE].modified_) {\n revokeScope(scope);\n die(4);\n }\n if (isDraftable(result)) {\n result = finalize(scope, result);\n if (!scope.parent_)\n maybeFreeze(scope, result);\n }\n if (scope.patches_) {\n getPlugin(\"Patches\").generateReplacementPatches_(\n baseDraft[DRAFT_STATE].base_,\n result,\n scope.patches_,\n scope.inversePatches_\n );\n }\n } else {\n result = finalize(scope, baseDraft, []);\n }\n revokeScope(scope);\n if (scope.patches_) {\n scope.patchListener_(scope.patches_, scope.inversePatches_);\n }\n return result !== NOTHING ? result : void 0;\n}\nfunction finalize(rootScope, value, path) {\n if (isFrozen(value))\n return value;\n const state = value[DRAFT_STATE];\n if (!state) {\n each(\n value,\n (key, childValue) => finalizeProperty(rootScope, state, value, key, childValue, path)\n );\n return value;\n }\n if (state.scope_ !== rootScope)\n return value;\n if (!state.modified_) {\n maybeFreeze(rootScope, state.base_, true);\n return state.base_;\n }\n if (!state.finalized_) {\n state.finalized_ = true;\n state.scope_.unfinalizedDrafts_--;\n const result = state.copy_;\n let resultEach = result;\n let isSet2 = false;\n if (state.type_ === 3 /* Set */) {\n resultEach = new Set(result);\n result.clear();\n isSet2 = true;\n }\n each(\n resultEach,\n (key, childValue) => finalizeProperty(rootScope, state, result, key, childValue, path, isSet2)\n );\n maybeFreeze(rootScope, result, false);\n if (path && rootScope.patches_) {\n getPlugin(\"Patches\").generatePatches_(\n state,\n path,\n rootScope.patches_,\n rootScope.inversePatches_\n );\n }\n }\n return state.copy_;\n}\nfunction finalizeProperty(rootScope, parentState, targetObject, prop, childValue, rootPath, targetIsSet) {\n if (process.env.NODE_ENV !== \"production\" && childValue === targetObject)\n die(5);\n if (isDraft(childValue)) {\n const path = rootPath && parentState && parentState.type_ !== 3 /* Set */ && // Set objects are atomic since they have no keys.\n !has(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;\n const res = finalize(rootScope, childValue, path);\n set(targetObject, prop, res);\n if (isDraft(res)) {\n rootScope.canAutoFreeze_ = false;\n } else\n return;\n } else if (targetIsSet) {\n targetObject.add(childValue);\n }\n if (isDraftable(childValue) && !isFrozen(childValue)) {\n if (!rootScope.immer_.autoFreeze_ && rootScope.unfinalizedDrafts_ < 1) {\n return;\n }\n finalize(rootScope, childValue);\n if ((!parentState || !parentState.scope_.parent_) && typeof prop !== \"symbol\" && Object.prototype.propertyIsEnumerable.call(targetObject, prop))\n maybeFreeze(rootScope, childValue);\n }\n}\nfunction maybeFreeze(scope, value, deep = false) {\n if (!scope.parent_ && scope.immer_.autoFreeze_ && scope.canAutoFreeze_) {\n freeze(value, deep);\n }\n}\n\n// src/core/proxy.ts\nfunction createProxyProxy(base, parent) {\n const isArray = Array.isArray(base);\n const state = {\n type_: isArray ? 1 /* Array */ : 0 /* Object */,\n // Track which produce call this is associated with.\n scope_: parent ? parent.scope_ : getCurrentScope(),\n // True for both shallow and deep changes.\n modified_: false,\n // Used during finalization.\n finalized_: false,\n // Track which properties have been assigned (true) or deleted (false).\n assigned_: {},\n // The parent draft state.\n parent_: parent,\n // The base state.\n base_: base,\n // The base proxy.\n draft_: null,\n // set below\n // The base copy with any updated values.\n copy_: null,\n // Called by the `produce` function.\n revoke_: null,\n isManual_: false\n };\n let target = state;\n let traps = objectTraps;\n if (isArray) {\n target = [state];\n traps = arrayTraps;\n }\n const { revoke, proxy } = Proxy.revocable(target, traps);\n state.draft_ = proxy;\n state.revoke_ = revoke;\n return proxy;\n}\nvar objectTraps = {\n get(state, prop) {\n if (prop === DRAFT_STATE)\n return state;\n const source = latest(state);\n if (!has(source, prop)) {\n return readPropFromProto(state, source, prop);\n }\n const value = source[prop];\n if (state.finalized_ || !isDraftable(value)) {\n return value;\n }\n if (value === peek(state.base_, prop)) {\n prepareCopy(state);\n return state.copy_[prop] = createProxy(value, state);\n }\n return value;\n },\n has(state, prop) {\n return prop in latest(state);\n },\n ownKeys(state) {\n return Reflect.ownKeys(latest(state));\n },\n set(state, prop, value) {\n const desc = getDescriptorFromProto(latest(state), prop);\n if (desc?.set) {\n desc.set.call(state.draft_, value);\n return true;\n }\n if (!state.modified_) {\n const current2 = peek(latest(state), prop);\n const currentState = current2?.[DRAFT_STATE];\n if (currentState && currentState.base_ === value) {\n state.copy_[prop] = value;\n state.assigned_[prop] = false;\n return true;\n }\n if (is(value, current2) && (value !== void 0 || has(state.base_, prop)))\n return true;\n prepareCopy(state);\n markChanged(state);\n }\n if (state.copy_[prop] === value && // special case: handle new props with value 'undefined'\n (value !== void 0 || prop in state.copy_) || // special case: NaN\n Number.isNaN(value) && Number.isNaN(state.copy_[prop]))\n return true;\n state.copy_[prop] = value;\n state.assigned_[prop] = true;\n return true;\n },\n deleteProperty(state, prop) {\n if (peek(state.base_, prop) !== void 0 || prop in state.base_) {\n state.assigned_[prop] = false;\n prepareCopy(state);\n markChanged(state);\n } else {\n delete state.assigned_[prop];\n }\n if (state.copy_) {\n delete state.copy_[prop];\n }\n return true;\n },\n // Note: We never coerce `desc.value` into an Immer draft, because we can't make\n // the same guarantee in ES5 mode.\n getOwnPropertyDescriptor(state, prop) {\n const owner = latest(state);\n const desc = Reflect.getOwnPropertyDescriptor(owner, prop);\n if (!desc)\n return desc;\n return {\n writable: true,\n configurable: state.type_ !== 1 /* Array */ || prop !== \"length\",\n enumerable: desc.enumerable,\n value: owner[prop]\n };\n },\n defineProperty() {\n die(11);\n },\n getPrototypeOf(state) {\n return getPrototypeOf(state.base_);\n },\n setPrototypeOf() {\n die(12);\n }\n};\nvar arrayTraps = {};\neach(objectTraps, (key, fn) => {\n arrayTraps[key] = function() {\n arguments[0] = arguments[0][0];\n return fn.apply(this, arguments);\n };\n});\narrayTraps.deleteProperty = function(state, prop) {\n if (process.env.NODE_ENV !== \"production\" && isNaN(parseInt(prop)))\n die(13);\n return arrayTraps.set.call(this, state, prop, void 0);\n};\narrayTraps.set = function(state, prop, value) {\n if (process.env.NODE_ENV !== \"production\" && prop !== \"length\" && isNaN(parseInt(prop)))\n die(14);\n return objectTraps.set.call(this, state[0], prop, value, state[0]);\n};\nfunction peek(draft, prop) {\n const state = draft[DRAFT_STATE];\n const source = state ? latest(state) : draft;\n return source[prop];\n}\nfunction readPropFromProto(state, source, prop) {\n const desc = getDescriptorFromProto(source, prop);\n return desc ? `value` in desc ? desc.value : (\n // This is a very special case, if the prop is a getter defined by the\n // prototype, we should invoke it with the draft as context!\n desc.get?.call(state.draft_)\n ) : void 0;\n}\nfunction getDescriptorFromProto(source, prop) {\n if (!(prop in source))\n return void 0;\n let proto = getPrototypeOf(source);\n while (proto) {\n const desc = Object.getOwnPropertyDescriptor(proto, prop);\n if (desc)\n return desc;\n proto = getPrototypeOf(proto);\n }\n return void 0;\n}\nfunction markChanged(state) {\n if (!state.modified_) {\n state.modified_ = true;\n if (state.parent_) {\n markChanged(state.parent_);\n }\n }\n}\nfunction prepareCopy(state) {\n if (!state.copy_) {\n state.copy_ = shallowCopy(\n state.base_,\n state.scope_.immer_.useStrictShallowCopy_\n );\n }\n}\n\n// src/core/immerClass.ts\nvar Immer2 = class {\n constructor(config) {\n this.autoFreeze_ = true;\n this.useStrictShallowCopy_ = false;\n /**\n * The `produce` function takes a value and a \"recipe function\" (whose\n * return value often depends on the base state). The recipe function is\n * free to mutate its first argument however it wants. All mutations are\n * only ever applied to a __copy__ of the base state.\n *\n * Pass only a function to create a \"curried producer\" which relieves you\n * from passing the recipe function every time.\n *\n * Only plain objects and arrays are made mutable. All other objects are\n * considered uncopyable.\n *\n * Note: This function is __bound__ to its `Immer` instance.\n *\n * @param {any} base - the initial state\n * @param {Function} recipe - function that receives a proxy of the base state as first argument and which can be freely modified\n * @param {Function} patchListener - optional function that will be called with all the patches produced here\n * @returns {any} a new state, or the initial state if nothing was modified\n */\n this.produce = (base, recipe, patchListener) => {\n if (typeof base === \"function\" && typeof recipe !== \"function\") {\n const defaultBase = recipe;\n recipe = base;\n const self = this;\n return function curriedProduce(base2 = defaultBase, ...args) {\n return self.produce(base2, (draft) => recipe.call(this, draft, ...args));\n };\n }\n if (typeof recipe !== \"function\")\n die(6);\n if (patchListener !== void 0 && typeof patchListener !== \"function\")\n die(7);\n let result;\n if (isDraftable(base)) {\n const scope = enterScope(this);\n const proxy = createProxy(base, void 0);\n let hasError = true;\n try {\n result = recipe(proxy);\n hasError = false;\n } finally {\n if (hasError)\n revokeScope(scope);\n else\n leaveScope(scope);\n }\n usePatchesInScope(scope, patchListener);\n return processResult(result, scope);\n } else if (!base || typeof base !== \"object\") {\n result = recipe(base);\n if (result === void 0)\n result = base;\n if (result === NOTHING)\n result = void 0;\n if (this.autoFreeze_)\n freeze(result, true);\n if (patchListener) {\n const p = [];\n const ip = [];\n getPlugin(\"Patches\").generateReplacementPatches_(base, result, p, ip);\n patchListener(p, ip);\n }\n return result;\n } else\n die(1, base);\n };\n this.produceWithPatches = (base, recipe) => {\n if (typeof base === \"function\") {\n return (state, ...args) => this.produceWithPatches(state, (draft) => base(draft, ...args));\n }\n let patches, inversePatches;\n const result = this.produce(base, recipe, (p, ip) => {\n patches = p;\n inversePatches = ip;\n });\n return [result, patches, inversePatches];\n };\n if (typeof config?.autoFreeze === \"boolean\")\n this.setAutoFreeze(config.autoFreeze);\n if (typeof config?.useStrictShallowCopy === \"boolean\")\n this.setUseStrictShallowCopy(config.useStrictShallowCopy);\n }\n createDraft(base) {\n if (!isDraftable(base))\n die(8);\n if (isDraft(base))\n base = current(base);\n const scope = enterScope(this);\n const proxy = createProxy(base, void 0);\n proxy[DRAFT_STATE].isManual_ = true;\n leaveScope(scope);\n return proxy;\n }\n finishDraft(draft, patchListener) {\n const state = draft && draft[DRAFT_STATE];\n if (!state || !state.isManual_)\n die(9);\n const { scope_: scope } = state;\n usePatchesInScope(scope, patchListener);\n return processResult(void 0, scope);\n }\n /**\n * Pass true to automatically freeze all copies created by Immer.\n *\n * By default, auto-freezing is enabled.\n */\n setAutoFreeze(value) {\n this.autoFreeze_ = value;\n }\n /**\n * Pass true to enable strict shallow copy.\n *\n * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.\n */\n setUseStrictShallowCopy(value) {\n this.useStrictShallowCopy_ = value;\n }\n applyPatches(base, patches) {\n let i;\n for (i = patches.length - 1; i >= 0; i--) {\n const patch = patches[i];\n if (patch.path.length === 0 && patch.op === \"replace\") {\n base = patch.value;\n break;\n }\n }\n if (i > -1) {\n patches = patches.slice(i + 1);\n }\n const applyPatchesImpl = getPlugin(\"Patches\").applyPatches_;\n if (isDraft(base)) {\n return applyPatchesImpl(base, patches);\n }\n return this.produce(\n base,\n (draft) => applyPatchesImpl(draft, patches)\n );\n }\n};\nfunction createProxy(value, parent) {\n const draft = isMap(value) ? getPlugin(\"MapSet\").proxyMap_(value, parent) : isSet(value) ? getPlugin(\"MapSet\").proxySet_(value, parent) : createProxyProxy(value, parent);\n const scope = parent ? parent.scope_ : getCurrentScope();\n scope.drafts_.push(draft);\n return draft;\n}\n\n// src/core/current.ts\nfunction current(value) {\n if (!isDraft(value))\n die(10, value);\n return currentImpl(value);\n}\nfunction currentImpl(value) {\n if (!isDraftable(value) || isFrozen(value))\n return value;\n const state = value[DRAFT_STATE];\n let copy;\n if (state) {\n if (!state.modified_)\n return state.base_;\n state.finalized_ = true;\n copy = shallowCopy(value, state.scope_.immer_.useStrictShallowCopy_);\n } else {\n copy = shallowCopy(value, true);\n }\n each(copy, (key, childValue) => {\n set(copy, key, currentImpl(childValue));\n });\n if (state) {\n state.finalized_ = false;\n }\n return copy;\n}\n\n// src/plugins/patches.ts\nfunction enablePatches() {\n const errorOffset = 16;\n if (process.env.NODE_ENV !== \"production\") {\n errors.push(\n 'Sets cannot have \"replace\" patches.',\n function(op) {\n return \"Unsupported patch operation: \" + op;\n },\n function(path) {\n return \"Cannot apply patch, path doesn't resolve: \" + path;\n },\n \"Patching reserved attributes like __proto__, prototype and constructor is not allowed\"\n );\n }\n const REPLACE = \"replace\";\n const ADD = \"add\";\n const REMOVE = \"remove\";\n function generatePatches_(state, basePath, patches, inversePatches) {\n switch (state.type_) {\n case 0 /* Object */:\n case 2 /* Map */:\n return generatePatchesFromAssigned(\n state,\n basePath,\n patches,\n inversePatches\n );\n case 1 /* Array */:\n return generateArrayPatches(state, basePath, patches, inversePatches);\n case 3 /* Set */:\n return generateSetPatches(\n state,\n basePath,\n patches,\n inversePatches\n );\n }\n }\n function generateArrayPatches(state, basePath, patches, inversePatches) {\n let { base_, assigned_ } = state;\n let copy_ = state.copy_;\n if (copy_.length < base_.length) {\n ;\n [base_, copy_] = [copy_, base_];\n [patches, inversePatches] = [inversePatches, patches];\n }\n for (let i = 0; i < base_.length; i++) {\n if (assigned_[i] && copy_[i] !== base_[i]) {\n const path = basePath.concat([i]);\n patches.push({\n op: REPLACE,\n path,\n // Need to maybe clone it, as it can in fact be the original value\n // due to the base/copy inversion at the start of this function\n value: clonePatchValueIfNeeded(copy_[i])\n });\n inversePatches.push({\n op: REPLACE,\n path,\n value: clonePatchValueIfNeeded(base_[i])\n });\n }\n }\n for (let i = base_.length; i < copy_.length; i++) {\n const path = basePath.concat([i]);\n patches.push({\n op: ADD,\n path,\n // Need to maybe clone it, as it can in fact be the original value\n // due to the base/copy inversion at the start of this function\n value: clonePatchValueIfNeeded(copy_[i])\n });\n }\n for (let i = copy_.length - 1; base_.length <= i; --i) {\n const path = basePath.concat([i]);\n inversePatches.push({\n op: REMOVE,\n path\n });\n }\n }\n function generatePatchesFromAssigned(state, basePath, patches, inversePatches) {\n const { base_, copy_ } = state;\n each(state.assigned_, (key, assignedValue) => {\n const origValue = get(base_, key);\n const value = get(copy_, key);\n const op = !assignedValue ? REMOVE : has(base_, key) ? REPLACE : ADD;\n if (origValue === value && op === REPLACE)\n return;\n const path = basePath.concat(key);\n patches.push(op === REMOVE ? { op, path } : { op, path, value });\n inversePatches.push(\n op === ADD ? { op: REMOVE, path } : op === REMOVE ? { op: ADD, path, value: clonePatchValueIfNeeded(origValue) } : { op: REPLACE, path, value: clonePatchValueIfNeeded(origValue) }\n );\n });\n }\n function generateSetPatches(state, basePath, patches, inversePatches) {\n let { base_, copy_ } = state;\n let i = 0;\n base_.forEach((value) => {\n if (!copy_.has(value)) {\n const path = basePath.concat([i]);\n patches.push({\n op: REMOVE,\n path,\n value\n });\n inversePatches.unshift({\n op: ADD,\n path,\n value\n });\n }\n i++;\n });\n i = 0;\n copy_.forEach((value) => {\n if (!base_.has(value)) {\n const path = basePath.concat([i]);\n patches.push({\n op: ADD,\n path,\n value\n });\n inversePatches.unshift({\n op: REMOVE,\n path,\n value\n });\n }\n i++;\n });\n }\n function generateReplacementPatches_(baseValue, replacement, patches, inversePatches) {\n patches.push({\n op: REPLACE,\n path: [],\n value: replacement === NOTHING ? void 0 : replacement\n });\n inversePatches.push({\n op: REPLACE,\n path: [],\n value: baseValue\n });\n }\n function applyPatches_(draft, patches) {\n patches.forEach((patch) => {\n const { path, op } = patch;\n let base = draft;\n for (let i = 0; i < path.length - 1; i++) {\n const parentType = getArchtype(base);\n let p = path[i];\n if (typeof p !== \"string\" && typeof p !== \"number\") {\n p = \"\" + p;\n }\n if ((parentType === 0 /* Object */ || parentType === 1 /* Array */) && (p === \"__proto__\" || p === \"constructor\"))\n die(errorOffset + 3);\n if (typeof base === \"function\" && p === \"prototype\")\n die(errorOffset + 3);\n base = get(base, p);\n if (typeof base !== \"object\")\n die(errorOffset + 2, path.join(\"/\"));\n }\n const type = getArchtype(base);\n const value = deepClonePatchValue(patch.value);\n const key = path[path.length - 1];\n switch (op) {\n case REPLACE:\n switch (type) {\n case 2 /* Map */:\n return base.set(key, value);\n case 3 /* Set */:\n die(errorOffset);\n default:\n return base[key] = value;\n }\n case ADD:\n switch (type) {\n case 1 /* Array */:\n return key === \"-\" ? base.push(value) : base.splice(key, 0, value);\n case 2 /* Map */:\n return base.set(key, value);\n case 3 /* Set */:\n return base.add(value);\n default:\n return base[key] = value;\n }\n case REMOVE:\n switch (type) {\n case 1 /* Array */:\n return base.splice(key, 1);\n case 2 /* Map */:\n return base.delete(key);\n case 3 /* Set */:\n return base.delete(patch.value);\n default:\n return delete base[key];\n }\n default:\n die(errorOffset + 1, op);\n }\n });\n return draft;\n }\n function deepClonePatchValue(obj) {\n if (!isDraftable(obj))\n return obj;\n if (Array.isArray(obj))\n return obj.map(deepClonePatchValue);\n if (isMap(obj))\n return new Map(\n Array.from(obj.entries()).map(([k, v]) => [k, deepClonePatchValue(v)])\n );\n if (isSet(obj))\n return new Set(Array.from(obj).map(deepClonePatchValue));\n const cloned = Object.create(getPrototypeOf(obj));\n for (const key in obj)\n cloned[key] = deepClonePatchValue(obj[key]);\n if (has(obj, DRAFTABLE))\n cloned[DRAFTABLE] = obj[DRAFTABLE];\n return cloned;\n }\n function clonePatchValueIfNeeded(obj) {\n if (isDraft(obj)) {\n return deepClonePatchValue(obj);\n } else\n return obj;\n }\n loadPlugin(\"Patches\", {\n applyPatches_,\n generatePatches_,\n generateReplacementPatches_\n });\n}\n\n// src/plugins/mapset.ts\nfunction enableMapSet() {\n class DraftMap extends Map {\n constructor(target, parent) {\n super();\n this[DRAFT_STATE] = {\n type_: 2 /* Map */,\n parent_: parent,\n scope_: parent ? parent.scope_ : getCurrentScope(),\n modified_: false,\n finalized_: false,\n copy_: void 0,\n assigned_: void 0,\n base_: target,\n draft_: this,\n isManual_: false,\n revoked_: false\n };\n }\n get size() {\n return latest(this[DRAFT_STATE]).size;\n }\n has(key) {\n return latest(this[DRAFT_STATE]).has(key);\n }\n set(key, value) {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n if (!latest(state).has(key) || latest(state).get(key) !== value) {\n prepareMapCopy(state);\n markChanged(state);\n state.assigned_.set(key, true);\n state.copy_.set(key, value);\n state.assigned_.set(key, true);\n }\n return this;\n }\n delete(key) {\n if (!this.has(key)) {\n return false;\n }\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n prepareMapCopy(state);\n markChanged(state);\n if (state.base_.has(key)) {\n state.assigned_.set(key, false);\n } else {\n state.assigned_.delete(key);\n }\n state.copy_.delete(key);\n return true;\n }\n clear() {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n if (latest(state).size) {\n prepareMapCopy(state);\n markChanged(state);\n state.assigned_ = /* @__PURE__ */ new Map();\n each(state.base_, (key) => {\n state.assigned_.set(key, false);\n });\n state.copy_.clear();\n }\n }\n forEach(cb, thisArg) {\n const state = this[DRAFT_STATE];\n latest(state).forEach((_value, key, _map) => {\n cb.call(thisArg, this.get(key), key, this);\n });\n }\n get(key) {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n const value = latest(state).get(key);\n if (state.finalized_ || !isDraftable(value)) {\n return value;\n }\n if (value !== state.base_.get(key)) {\n return value;\n }\n const draft = createProxy(value, state);\n prepareMapCopy(state);\n state.copy_.set(key, draft);\n return draft;\n }\n keys() {\n return latest(this[DRAFT_STATE]).keys();\n }\n values() {\n const iterator = this.keys();\n return {\n [Symbol.iterator]: () => this.values(),\n next: () => {\n const r = iterator.next();\n if (r.done)\n return r;\n const value = this.get(r.value);\n return {\n done: false,\n value\n };\n }\n };\n }\n entries() {\n const iterator = this.keys();\n return {\n [Symbol.iterator]: () => this.entries(),\n next: () => {\n const r = iterator.next();\n if (r.done)\n return r;\n const value = this.get(r.value);\n return {\n done: false,\n value: [r.value, value]\n };\n }\n };\n }\n [(DRAFT_STATE, Symbol.iterator)]() {\n return this.entries();\n }\n }\n function proxyMap_(target, parent) {\n return new DraftMap(target, parent);\n }\n function prepareMapCopy(state) {\n if (!state.copy_) {\n state.assigned_ = /* @__PURE__ */ new Map();\n state.copy_ = new Map(state.base_);\n }\n }\n class DraftSet extends Set {\n constructor(target, parent) {\n super();\n this[DRAFT_STATE] = {\n type_: 3 /* Set */,\n parent_: parent,\n scope_: parent ? parent.scope_ : getCurrentScope(),\n modified_: false,\n finalized_: false,\n copy_: void 0,\n base_: target,\n draft_: this,\n drafts_: /* @__PURE__ */ new Map(),\n revoked_: false,\n isManual_: false\n };\n }\n get size() {\n return latest(this[DRAFT_STATE]).size;\n }\n has(value) {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n if (!state.copy_) {\n return state.base_.has(value);\n }\n if (state.copy_.has(value))\n return true;\n if (state.drafts_.has(value) && state.copy_.has(state.drafts_.get(value)))\n return true;\n return false;\n }\n add(value) {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n if (!this.has(value)) {\n prepareSetCopy(state);\n markChanged(state);\n state.copy_.add(value);\n }\n return this;\n }\n delete(value) {\n if (!this.has(value)) {\n return false;\n }\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n prepareSetCopy(state);\n markChanged(state);\n return state.copy_.delete(value) || (state.drafts_.has(value) ? state.copy_.delete(state.drafts_.get(value)) : (\n /* istanbul ignore next */\n false\n ));\n }\n clear() {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n if (latest(state).size) {\n prepareSetCopy(state);\n markChanged(state);\n state.copy_.clear();\n }\n }\n values() {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n prepareSetCopy(state);\n return state.copy_.values();\n }\n entries() {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n prepareSetCopy(state);\n return state.copy_.entries();\n }\n keys() {\n return this.values();\n }\n [(DRAFT_STATE, Symbol.iterator)]() {\n return this.values();\n }\n forEach(cb, thisArg) {\n const iterator = this.values();\n let result = iterator.next();\n while (!result.done) {\n cb.call(thisArg, result.value, result.value, this);\n result = iterator.next();\n }\n }\n }\n function proxySet_(target, parent) {\n return new DraftSet(target, parent);\n }\n function prepareSetCopy(state) {\n if (!state.copy_) {\n state.copy_ = /* @__PURE__ */ new Set();\n state.base_.forEach((value) => {\n if (isDraftable(value)) {\n const draft = createProxy(value, state);\n state.drafts_.set(value, draft);\n state.copy_.add(draft);\n } else {\n state.copy_.add(value);\n }\n });\n }\n }\n function assertUnrevoked(state) {\n if (state.revoked_)\n die(3, JSON.stringify(latest(state)));\n }\n loadPlugin(\"MapSet\", { proxyMap_, proxySet_ });\n}\n\n// src/immer.ts\nvar immer = new Immer2();\nvar produce = immer.produce;\nvar produceWithPatches = immer.produceWithPatches.bind(\n immer\n);\nvar setAutoFreeze = immer.setAutoFreeze.bind(immer);\nvar setUseStrictShallowCopy = immer.setUseStrictShallowCopy.bind(immer);\nvar applyPatches = immer.applyPatches.bind(immer);\nvar createDraft = immer.createDraft.bind(immer);\nvar finishDraft = immer.finishDraft.bind(immer);\nfunction castDraft(value) {\n return value;\n}\nfunction castImmutable(value) {\n return value;\n}\nexport {\n Immer2 as Immer,\n applyPatches,\n castDraft,\n castImmutable,\n createDraft,\n current,\n enableMapSet,\n enablePatches,\n finishDraft,\n freeze,\n DRAFTABLE as immerable,\n isDraft,\n isDraftable,\n NOTHING as nothing,\n original,\n produce,\n produceWithPatches,\n setAutoFreeze,\n setUseStrictShallowCopy\n};\n//# sourceMappingURL=immer.mjs.map","// src/index.ts\nfunction createThunkMiddleware(extraArgument) {\n const middleware = ({ dispatch, getState }) => (next) => (action) => {\n if (typeof action === \"function\") {\n return action(dispatch, getState, extraArgument);\n }\n return next(action);\n };\n return middleware;\n}\nvar thunk = createThunkMiddleware();\nvar withExtraArgument = createThunkMiddleware;\nexport {\n thunk,\n withExtraArgument\n};\n","// src/index.ts\nexport * from \"redux\";\nimport { produce, current as current3, freeze, original as original2, isDraft as isDraft5 } from \"immer\";\nimport { createSelector, createSelectorCreator as createSelectorCreator2, lruMemoize, weakMapMemoize as weakMapMemoize2 } from \"reselect\";\n\n// src/createDraftSafeSelector.ts\nimport { current, isDraft } from \"immer\";\nimport { createSelectorCreator, weakMapMemoize } from \"reselect\";\nvar createDraftSafeSelectorCreator = (...args) => {\n const createSelector2 = createSelectorCreator(...args);\n const createDraftSafeSelector2 = Object.assign((...args2) => {\n const selector = createSelector2(...args2);\n const wrappedSelector = (value, ...rest) => selector(isDraft(value) ? current(value) : value, ...rest);\n Object.assign(wrappedSelector, selector);\n return wrappedSelector;\n }, {\n withTypes: () => createDraftSafeSelector2\n });\n return createDraftSafeSelector2;\n};\nvar createDraftSafeSelector = /* @__PURE__ */ createDraftSafeSelectorCreator(weakMapMemoize);\n\n// src/configureStore.ts\nimport { applyMiddleware, createStore, compose as compose2, combineReducers, isPlainObject as isPlainObject2 } from \"redux\";\n\n// src/devtoolsExtension.ts\nimport { compose } from \"redux\";\nvar composeWithDevTools = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {\n if (arguments.length === 0) return void 0;\n if (typeof arguments[0] === \"object\") return compose;\n return compose.apply(null, arguments);\n};\nvar devToolsEnhancer = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function() {\n return function(noop3) {\n return noop3;\n };\n};\n\n// src/getDefaultMiddleware.ts\nimport { thunk as thunkMiddleware, withExtraArgument } from \"redux-thunk\";\n\n// src/createAction.ts\nimport { isAction } from \"redux\";\n\n// src/tsHelpers.ts\nvar hasMatchFunction = (v) => {\n return v && typeof v.match === \"function\";\n};\n\n// src/createAction.ts\nfunction createAction(type, prepareAction) {\n function actionCreator(...args) {\n if (prepareAction) {\n let prepared = prepareAction(...args);\n if (!prepared) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(0) : \"prepareAction did not return an object\");\n }\n return {\n type,\n payload: prepared.payload,\n ...\"meta\" in prepared && {\n meta: prepared.meta\n },\n ...\"error\" in prepared && {\n error: prepared.error\n }\n };\n }\n return {\n type,\n payload: args[0]\n };\n }\n actionCreator.toString = () => `${type}`;\n actionCreator.type = type;\n actionCreator.match = (action) => isAction(action) && action.type === type;\n return actionCreator;\n}\nfunction isActionCreator(action) {\n return typeof action === \"function\" && \"type\" in action && // hasMatchFunction only wants Matchers but I don't see the point in rewriting it\n hasMatchFunction(action);\n}\nfunction isFSA(action) {\n return isAction(action) && Object.keys(action).every(isValidKey);\n}\nfunction isValidKey(key) {\n return [\"type\", \"payload\", \"error\", \"meta\"].indexOf(key) > -1;\n}\n\n// src/actionCreatorInvariantMiddleware.ts\nfunction getMessage(type) {\n const splitType = type ? `${type}`.split(\"/\") : [];\n const actionName = splitType[splitType.length - 1] || \"actionCreator\";\n return `Detected an action creator with type \"${type || \"unknown\"}\" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. \\`dispatch(${actionName}())\\` instead of \\`dispatch(${actionName})\\`. This is necessary even if the action has no payload.`;\n}\nfunction createActionCreatorInvariantMiddleware(options = {}) {\n if (process.env.NODE_ENV === \"production\") {\n return () => (next) => (action) => next(action);\n }\n const {\n isActionCreator: isActionCreator2 = isActionCreator\n } = options;\n return () => (next) => (action) => {\n if (isActionCreator2(action)) {\n console.warn(getMessage(action.type));\n }\n return next(action);\n };\n}\n\n// src/utils.ts\nimport { produce as createNextState, isDraftable } from \"immer\";\nfunction getTimeMeasureUtils(maxDelay, fnName) {\n let elapsed = 0;\n return {\n measureTime(fn) {\n const started = Date.now();\n try {\n return fn();\n } finally {\n const finished = Date.now();\n elapsed += finished - started;\n }\n },\n warnIfExceeded() {\n if (elapsed > maxDelay) {\n console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`);\n }\n }\n };\n}\nvar Tuple = class _Tuple extends Array {\n constructor(...items) {\n super(...items);\n Object.setPrototypeOf(this, _Tuple.prototype);\n }\n static get [Symbol.species]() {\n return _Tuple;\n }\n concat(...arr) {\n return super.concat.apply(this, arr);\n }\n prepend(...arr) {\n if (arr.length === 1 && Array.isArray(arr[0])) {\n return new _Tuple(...arr[0].concat(this));\n }\n return new _Tuple(...arr.concat(this));\n }\n};\nfunction freezeDraftable(val) {\n return isDraftable(val) ? createNextState(val, () => {\n }) : val;\n}\nfunction getOrInsertComputed(map, key, compute) {\n if (map.has(key)) return map.get(key);\n return map.set(key, compute(key)).get(key);\n}\n\n// src/immutableStateInvariantMiddleware.ts\nfunction isImmutableDefault(value) {\n return typeof value !== \"object\" || value == null || Object.isFrozen(value);\n}\nfunction trackForMutations(isImmutable, ignorePaths, obj) {\n const trackedProperties = trackProperties(isImmutable, ignorePaths, obj);\n return {\n detectMutations() {\n return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);\n }\n };\n}\nfunction trackProperties(isImmutable, ignorePaths = [], obj, path = \"\", checkedObjects = /* @__PURE__ */ new Set()) {\n const tracked = {\n value: obj\n };\n if (!isImmutable(obj) && !checkedObjects.has(obj)) {\n checkedObjects.add(obj);\n tracked.children = {};\n for (const key in obj) {\n const childPath = path ? path + \".\" + key : key;\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\n continue;\n }\n tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);\n }\n }\n return tracked;\n}\nfunction detectMutations(isImmutable, ignoredPaths = [], trackedProperty, obj, sameParentRef = false, path = \"\") {\n const prevObj = trackedProperty ? trackedProperty.value : void 0;\n const sameRef = prevObj === obj;\n if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\n return {\n wasMutated: true,\n path\n };\n }\n if (isImmutable(prevObj) || isImmutable(obj)) {\n return {\n wasMutated: false\n };\n }\n const keysToDetect = {};\n for (let key in trackedProperty.children) {\n keysToDetect[key] = true;\n }\n for (let key in obj) {\n keysToDetect[key] = true;\n }\n const hasIgnoredPaths = ignoredPaths.length > 0;\n for (let key in keysToDetect) {\n const nestedPath = path ? path + \".\" + key : key;\n if (hasIgnoredPaths) {\n const hasMatches = ignoredPaths.some((ignored) => {\n if (ignored instanceof RegExp) {\n return ignored.test(nestedPath);\n }\n return nestedPath === ignored;\n });\n if (hasMatches) {\n continue;\n }\n }\n const result = detectMutations(isImmutable, ignoredPaths, trackedProperty.children[key], obj[key], sameRef, nestedPath);\n if (result.wasMutated) {\n return result;\n }\n }\n return {\n wasMutated: false\n };\n}\nfunction createImmutableStateInvariantMiddleware(options = {}) {\n if (process.env.NODE_ENV === \"production\") {\n return () => (next) => (action) => next(action);\n } else {\n let stringify2 = function(obj, serializer, indent, decycler) {\n return JSON.stringify(obj, getSerialize2(serializer, decycler), indent);\n }, getSerialize2 = function(serializer, decycler) {\n let stack = [], keys = [];\n if (!decycler) decycler = function(_, value) {\n if (stack[0] === value) return \"[Circular ~]\";\n return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\";\n };\n return function(key, value) {\n if (stack.length > 0) {\n var thisPos = stack.indexOf(this);\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\n if (~stack.indexOf(value)) value = decycler.call(this, key, value);\n } else stack.push(value);\n return serializer == null ? value : serializer.call(this, key, value);\n };\n };\n var stringify = stringify2, getSerialize = getSerialize2;\n let {\n isImmutable = isImmutableDefault,\n ignoredPaths,\n warnAfter = 32\n } = options;\n const track = trackForMutations.bind(null, isImmutable, ignoredPaths);\n return ({\n getState\n }) => {\n let state = getState();\n let tracker = track(state);\n let result;\n return (next) => (action) => {\n const measureUtils = getTimeMeasureUtils(warnAfter, \"ImmutableStateInvariantMiddleware\");\n measureUtils.measureTime(() => {\n state = getState();\n result = tracker.detectMutations();\n tracker = track(state);\n if (result.wasMutated) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(19) : `A state mutation was detected between dispatches, in the path '${result.path || \"\"}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);\n }\n });\n const dispatchedAction = next(action);\n measureUtils.measureTime(() => {\n state = getState();\n result = tracker.detectMutations();\n tracker = track(state);\n if (result.wasMutated) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(20) : `A state mutation was detected inside a dispatch, in the path: ${result.path || \"\"}. Take a look at the reducer(s) handling the action ${stringify2(action)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);\n }\n });\n measureUtils.warnIfExceeded();\n return dispatchedAction;\n };\n };\n }\n}\n\n// src/serializableStateInvariantMiddleware.ts\nimport { isAction as isAction2, isPlainObject } from \"redux\";\nfunction isPlain(val) {\n const type = typeof val;\n return val == null || type === \"string\" || type === \"boolean\" || type === \"number\" || Array.isArray(val) || isPlainObject(val);\n}\nfunction findNonSerializableValue(value, path = \"\", isSerializable = isPlain, getEntries, ignoredPaths = [], cache) {\n let foundNestedSerializable;\n if (!isSerializable(value)) {\n return {\n keyPath: path || \"\",\n value\n };\n }\n if (typeof value !== \"object\" || value === null) {\n return false;\n }\n if (cache?.has(value)) return false;\n const entries = getEntries != null ? getEntries(value) : Object.entries(value);\n const hasIgnoredPaths = ignoredPaths.length > 0;\n for (const [key, nestedValue] of entries) {\n const nestedPath = path ? path + \".\" + key : key;\n if (hasIgnoredPaths) {\n const hasMatches = ignoredPaths.some((ignored) => {\n if (ignored instanceof RegExp) {\n return ignored.test(nestedPath);\n }\n return nestedPath === ignored;\n });\n if (hasMatches) {\n continue;\n }\n }\n if (!isSerializable(nestedValue)) {\n return {\n keyPath: nestedPath,\n value: nestedValue\n };\n }\n if (typeof nestedValue === \"object\") {\n foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths, cache);\n if (foundNestedSerializable) {\n return foundNestedSerializable;\n }\n }\n }\n if (cache && isNestedFrozen(value)) cache.add(value);\n return false;\n}\nfunction isNestedFrozen(value) {\n if (!Object.isFrozen(value)) return false;\n for (const nestedValue of Object.values(value)) {\n if (typeof nestedValue !== \"object\" || nestedValue === null) continue;\n if (!isNestedFrozen(nestedValue)) return false;\n }\n return true;\n}\nfunction createSerializableStateInvariantMiddleware(options = {}) {\n if (process.env.NODE_ENV === \"production\") {\n return () => (next) => (action) => next(action);\n } else {\n const {\n isSerializable = isPlain,\n getEntries,\n ignoredActions = [],\n ignoredActionPaths = [\"meta.arg\", \"meta.baseQueryMeta\"],\n ignoredPaths = [],\n warnAfter = 32,\n ignoreState = false,\n ignoreActions = false,\n disableCache = false\n } = options;\n const cache = !disableCache && WeakSet ? /* @__PURE__ */ new WeakSet() : void 0;\n return (storeAPI) => (next) => (action) => {\n if (!isAction2(action)) {\n return next(action);\n }\n const result = next(action);\n const measureUtils = getTimeMeasureUtils(warnAfter, \"SerializableStateInvariantMiddleware\");\n if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) {\n measureUtils.measureTime(() => {\n const foundActionNonSerializableValue = findNonSerializableValue(action, \"\", isSerializable, getEntries, ignoredActionPaths, cache);\n if (foundActionNonSerializableValue) {\n const {\n keyPath,\n value\n } = foundActionNonSerializableValue;\n console.error(`A non-serializable value was detected in an action, in the path: \\`${keyPath}\\`. Value:`, value, \"\\nTake a look at the logic that dispatched this action: \", action, \"\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)\", \"\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)\");\n }\n });\n }\n if (!ignoreState) {\n measureUtils.measureTime(() => {\n const state = storeAPI.getState();\n const foundStateNonSerializableValue = findNonSerializableValue(state, \"\", isSerializable, getEntries, ignoredPaths, cache);\n if (foundStateNonSerializableValue) {\n const {\n keyPath,\n value\n } = foundStateNonSerializableValue;\n console.error(`A non-serializable value was detected in the state, in the path: \\`${keyPath}\\`. Value:`, value, `\nTake a look at the reducer(s) handling this action type: ${action.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`);\n }\n });\n measureUtils.warnIfExceeded();\n }\n return result;\n };\n }\n}\n\n// src/getDefaultMiddleware.ts\nfunction isBoolean(x) {\n return typeof x === \"boolean\";\n}\nvar buildGetDefaultMiddleware = () => function getDefaultMiddleware(options) {\n const {\n thunk = true,\n immutableCheck = true,\n serializableCheck = true,\n actionCreatorCheck = true\n } = options ?? {};\n let middlewareArray = new Tuple();\n if (thunk) {\n if (isBoolean(thunk)) {\n middlewareArray.push(thunkMiddleware);\n } else {\n middlewareArray.push(withExtraArgument(thunk.extraArgument));\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n if (immutableCheck) {\n let immutableOptions = {};\n if (!isBoolean(immutableCheck)) {\n immutableOptions = immutableCheck;\n }\n middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));\n }\n if (serializableCheck) {\n let serializableOptions = {};\n if (!isBoolean(serializableCheck)) {\n serializableOptions = serializableCheck;\n }\n middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));\n }\n if (actionCreatorCheck) {\n let actionCreatorOptions = {};\n if (!isBoolean(actionCreatorCheck)) {\n actionCreatorOptions = actionCreatorCheck;\n }\n middlewareArray.unshift(createActionCreatorInvariantMiddleware(actionCreatorOptions));\n }\n }\n return middlewareArray;\n};\n\n// src/autoBatchEnhancer.ts\nvar SHOULD_AUTOBATCH = \"RTK_autoBatch\";\nvar prepareAutoBatched = () => (payload) => ({\n payload,\n meta: {\n [SHOULD_AUTOBATCH]: true\n }\n});\nvar createQueueWithTimer = (timeout) => {\n return (notify) => {\n setTimeout(notify, timeout);\n };\n};\nvar autoBatchEnhancer = (options = {\n type: \"raf\"\n}) => (next) => (...args) => {\n const store = next(...args);\n let notifying = true;\n let shouldNotifyAtEndOfTick = false;\n let notificationQueued = false;\n const listeners = /* @__PURE__ */ new Set();\n const queueCallback = options.type === \"tick\" ? queueMicrotask : options.type === \"raf\" ? (\n // requestAnimationFrame won't exist in SSR environments. Fall back to a vague approximation just to keep from erroring.\n typeof window !== \"undefined\" && window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10)\n ) : options.type === \"callback\" ? options.queueNotification : createQueueWithTimer(options.timeout);\n const notifyListeners = () => {\n notificationQueued = false;\n if (shouldNotifyAtEndOfTick) {\n shouldNotifyAtEndOfTick = false;\n listeners.forEach((l) => l());\n }\n };\n return Object.assign({}, store, {\n // Override the base `store.subscribe` method to keep original listeners\n // from running if we're delaying notifications\n subscribe(listener2) {\n const wrappedListener = () => notifying && listener2();\n const unsubscribe = store.subscribe(wrappedListener);\n listeners.add(listener2);\n return () => {\n unsubscribe();\n listeners.delete(listener2);\n };\n },\n // Override the base `store.dispatch` method so that we can check actions\n // for the `shouldAutoBatch` flag and determine if batching is active\n dispatch(action) {\n try {\n notifying = !action?.meta?.[SHOULD_AUTOBATCH];\n shouldNotifyAtEndOfTick = !notifying;\n if (shouldNotifyAtEndOfTick) {\n if (!notificationQueued) {\n notificationQueued = true;\n queueCallback(notifyListeners);\n }\n }\n return store.dispatch(action);\n } finally {\n notifying = true;\n }\n }\n });\n};\n\n// src/getDefaultEnhancers.ts\nvar buildGetDefaultEnhancers = (middlewareEnhancer) => function getDefaultEnhancers(options) {\n const {\n autoBatch = true\n } = options ?? {};\n let enhancerArray = new Tuple(middlewareEnhancer);\n if (autoBatch) {\n enhancerArray.push(autoBatchEnhancer(typeof autoBatch === \"object\" ? autoBatch : void 0));\n }\n return enhancerArray;\n};\n\n// src/configureStore.ts\nfunction configureStore(options) {\n const getDefaultMiddleware = buildGetDefaultMiddleware();\n const {\n reducer = void 0,\n middleware,\n devTools = true,\n preloadedState = void 0,\n enhancers = void 0\n } = options || {};\n let rootReducer;\n if (typeof reducer === \"function\") {\n rootReducer = reducer;\n } else if (isPlainObject2(reducer)) {\n rootReducer = combineReducers(reducer);\n } else {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(1) : \"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers\");\n }\n if (process.env.NODE_ENV !== \"production\" && middleware && typeof middleware !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(2) : \"`middleware` field must be a callback\");\n }\n let finalMiddleware;\n if (typeof middleware === \"function\") {\n finalMiddleware = middleware(getDefaultMiddleware);\n if (process.env.NODE_ENV !== \"production\" && !Array.isArray(finalMiddleware)) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(3) : \"when using a middleware builder function, an array of middleware must be returned\");\n }\n } else {\n finalMiddleware = getDefaultMiddleware();\n }\n if (process.env.NODE_ENV !== \"production\" && finalMiddleware.some((item) => typeof item !== \"function\")) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(4) : \"each middleware provided to configureStore must be a function\");\n }\n let finalCompose = compose2;\n if (devTools) {\n finalCompose = composeWithDevTools({\n // Enable capture of stack traces for dispatched Redux actions\n trace: process.env.NODE_ENV !== \"production\",\n ...typeof devTools === \"object\" && devTools\n });\n }\n const middlewareEnhancer = applyMiddleware(...finalMiddleware);\n const getDefaultEnhancers = buildGetDefaultEnhancers(middlewareEnhancer);\n if (process.env.NODE_ENV !== \"production\" && enhancers && typeof enhancers !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(5) : \"`enhancers` field must be a callback\");\n }\n let storeEnhancers = typeof enhancers === \"function\" ? enhancers(getDefaultEnhancers) : getDefaultEnhancers();\n if (process.env.NODE_ENV !== \"production\" && !Array.isArray(storeEnhancers)) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(6) : \"`enhancers` callback must return an array\");\n }\n if (process.env.NODE_ENV !== \"production\" && storeEnhancers.some((item) => typeof item !== \"function\")) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(7) : \"each enhancer provided to configureStore must be a function\");\n }\n if (process.env.NODE_ENV !== \"production\" && finalMiddleware.length && !storeEnhancers.includes(middlewareEnhancer)) {\n console.error(\"middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`\");\n }\n const composedEnhancer = finalCompose(...storeEnhancers);\n return createStore(rootReducer, preloadedState, composedEnhancer);\n}\n\n// src/createReducer.ts\nimport { produce as createNextState2, isDraft as isDraft2, isDraftable as isDraftable2 } from \"immer\";\n\n// src/mapBuilders.ts\nfunction executeReducerBuilderCallback(builderCallback) {\n const actionsMap = {};\n const actionMatchers = [];\n let defaultCaseReducer;\n const builder = {\n addCase(typeOrActionCreator, reducer) {\n if (process.env.NODE_ENV !== \"production\") {\n if (actionMatchers.length > 0) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(26) : \"`builder.addCase` should only be called before calling `builder.addMatcher`\");\n }\n if (defaultCaseReducer) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(27) : \"`builder.addCase` should only be called before calling `builder.addDefaultCase`\");\n }\n }\n const type = typeof typeOrActionCreator === \"string\" ? typeOrActionCreator : typeOrActionCreator.type;\n if (!type) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(28) : \"`builder.addCase` cannot be called with an empty action type\");\n }\n if (type in actionsMap) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(29) : `\\`builder.addCase\\` cannot be called with two reducers for the same action type '${type}'`);\n }\n actionsMap[type] = reducer;\n return builder;\n },\n addMatcher(matcher, reducer) {\n if (process.env.NODE_ENV !== \"production\") {\n if (defaultCaseReducer) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(30) : \"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`\");\n }\n }\n actionMatchers.push({\n matcher,\n reducer\n });\n return builder;\n },\n addDefaultCase(reducer) {\n if (process.env.NODE_ENV !== \"production\") {\n if (defaultCaseReducer) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(31) : \"`builder.addDefaultCase` can only be called once\");\n }\n }\n defaultCaseReducer = reducer;\n return builder;\n }\n };\n builderCallback(builder);\n return [actionsMap, actionMatchers, defaultCaseReducer];\n}\n\n// src/createReducer.ts\nfunction isStateFunction(x) {\n return typeof x === \"function\";\n}\nfunction createReducer(initialState, mapOrBuilderCallback) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof mapOrBuilderCallback === \"object\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(8) : \"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer\");\n }\n }\n let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] = executeReducerBuilderCallback(mapOrBuilderCallback);\n let getInitialState;\n if (isStateFunction(initialState)) {\n getInitialState = () => freezeDraftable(initialState());\n } else {\n const frozenInitialState = freezeDraftable(initialState);\n getInitialState = () => frozenInitialState;\n }\n function reducer(state = getInitialState(), action) {\n let caseReducers = [actionsMap[action.type], ...finalActionMatchers.filter(({\n matcher\n }) => matcher(action)).map(({\n reducer: reducer2\n }) => reducer2)];\n if (caseReducers.filter((cr) => !!cr).length === 0) {\n caseReducers = [finalDefaultCaseReducer];\n }\n return caseReducers.reduce((previousState, caseReducer) => {\n if (caseReducer) {\n if (isDraft2(previousState)) {\n const draft = previousState;\n const result = caseReducer(draft, action);\n if (result === void 0) {\n return previousState;\n }\n return result;\n } else if (!isDraftable2(previousState)) {\n const result = caseReducer(previousState, action);\n if (result === void 0) {\n if (previousState === null) {\n return previousState;\n }\n throw Error(\"A case reducer on a non-draftable value must not return undefined\");\n }\n return result;\n } else {\n return createNextState2(previousState, (draft) => {\n return caseReducer(draft, action);\n });\n }\n }\n return previousState;\n }, state);\n }\n reducer.getInitialState = getInitialState;\n return reducer;\n}\n\n// src/matchers.ts\nvar matches = (matcher, action) => {\n if (hasMatchFunction(matcher)) {\n return matcher.match(action);\n } else {\n return matcher(action);\n }\n};\nfunction isAnyOf(...matchers) {\n return (action) => {\n return matchers.some((matcher) => matches(matcher, action));\n };\n}\nfunction isAllOf(...matchers) {\n return (action) => {\n return matchers.every((matcher) => matches(matcher, action));\n };\n}\nfunction hasExpectedRequestMetadata(action, validStatus) {\n if (!action || !action.meta) return false;\n const hasValidRequestId = typeof action.meta.requestId === \"string\";\n const hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;\n return hasValidRequestId && hasValidRequestStatus;\n}\nfunction isAsyncThunkArray(a) {\n return typeof a[0] === \"function\" && \"pending\" in a[0] && \"fulfilled\" in a[0] && \"rejected\" in a[0];\n}\nfunction isPending(...asyncThunks) {\n if (asyncThunks.length === 0) {\n return (action) => hasExpectedRequestMetadata(action, [\"pending\"]);\n }\n if (!isAsyncThunkArray(asyncThunks)) {\n return isPending()(asyncThunks[0]);\n }\n return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.pending));\n}\nfunction isRejected(...asyncThunks) {\n if (asyncThunks.length === 0) {\n return (action) => hasExpectedRequestMetadata(action, [\"rejected\"]);\n }\n if (!isAsyncThunkArray(asyncThunks)) {\n return isRejected()(asyncThunks[0]);\n }\n return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.rejected));\n}\nfunction isRejectedWithValue(...asyncThunks) {\n const hasFlag = (action) => {\n return action && action.meta && action.meta.rejectedWithValue;\n };\n if (asyncThunks.length === 0) {\n return isAllOf(isRejected(...asyncThunks), hasFlag);\n }\n if (!isAsyncThunkArray(asyncThunks)) {\n return isRejectedWithValue()(asyncThunks[0]);\n }\n return isAllOf(isRejected(...asyncThunks), hasFlag);\n}\nfunction isFulfilled(...asyncThunks) {\n if (asyncThunks.length === 0) {\n return (action) => hasExpectedRequestMetadata(action, [\"fulfilled\"]);\n }\n if (!isAsyncThunkArray(asyncThunks)) {\n return isFulfilled()(asyncThunks[0]);\n }\n return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.fulfilled));\n}\nfunction isAsyncThunkAction(...asyncThunks) {\n if (asyncThunks.length === 0) {\n return (action) => hasExpectedRequestMetadata(action, [\"pending\", \"fulfilled\", \"rejected\"]);\n }\n if (!isAsyncThunkArray(asyncThunks)) {\n return isAsyncThunkAction()(asyncThunks[0]);\n }\n return isAnyOf(...asyncThunks.flatMap((asyncThunk) => [asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled]));\n}\n\n// src/nanoid.ts\nvar urlAlphabet = \"ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW\";\nvar nanoid = (size = 21) => {\n let id = \"\";\n let i = size;\n while (i--) {\n id += urlAlphabet[Math.random() * 64 | 0];\n }\n return id;\n};\n\n// src/createAsyncThunk.ts\nvar commonProperties = [\"name\", \"message\", \"stack\", \"code\"];\nvar RejectWithValue = class {\n constructor(payload, meta) {\n this.payload = payload;\n this.meta = meta;\n }\n /*\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\n does not exist at runtime\n */\n _type;\n};\nvar FulfillWithMeta = class {\n constructor(payload, meta) {\n this.payload = payload;\n this.meta = meta;\n }\n /*\n type-only property to distinguish between RejectWithValue and FulfillWithMeta\n does not exist at runtime\n */\n _type;\n};\nvar miniSerializeError = (value) => {\n if (typeof value === \"object\" && value !== null) {\n const simpleError = {};\n for (const property of commonProperties) {\n if (typeof value[property] === \"string\") {\n simpleError[property] = value[property];\n }\n }\n return simpleError;\n }\n return {\n message: String(value)\n };\n};\nvar createAsyncThunk = /* @__PURE__ */ (() => {\n function createAsyncThunk2(typePrefix, payloadCreator, options) {\n const fulfilled = createAction(typePrefix + \"/fulfilled\", (payload, requestId, arg, meta) => ({\n payload,\n meta: {\n ...meta || {},\n arg,\n requestId,\n requestStatus: \"fulfilled\"\n }\n }));\n const pending = createAction(typePrefix + \"/pending\", (requestId, arg, meta) => ({\n payload: void 0,\n meta: {\n ...meta || {},\n arg,\n requestId,\n requestStatus: \"pending\"\n }\n }));\n const rejected = createAction(typePrefix + \"/rejected\", (error, requestId, arg, payload, meta) => ({\n payload,\n error: (options && options.serializeError || miniSerializeError)(error || \"Rejected\"),\n meta: {\n ...meta || {},\n arg,\n requestId,\n rejectedWithValue: !!payload,\n requestStatus: \"rejected\",\n aborted: error?.name === \"AbortError\",\n condition: error?.name === \"ConditionError\"\n }\n }));\n function actionCreator(arg) {\n return (dispatch, getState, extra) => {\n const requestId = options?.idGenerator ? options.idGenerator(arg) : nanoid();\n const abortController = new AbortController();\n let abortHandler;\n let abortReason;\n function abort(reason) {\n abortReason = reason;\n abortController.abort();\n }\n const promise = async function() {\n let finalAction;\n try {\n let conditionResult = options?.condition?.(arg, {\n getState,\n extra\n });\n if (isThenable(conditionResult)) {\n conditionResult = await conditionResult;\n }\n if (conditionResult === false || abortController.signal.aborted) {\n throw {\n name: \"ConditionError\",\n message: \"Aborted due to condition callback returning false.\"\n };\n }\n const abortedPromise = new Promise((_, reject) => {\n abortHandler = () => {\n reject({\n name: \"AbortError\",\n message: abortReason || \"Aborted\"\n });\n };\n abortController.signal.addEventListener(\"abort\", abortHandler);\n });\n dispatch(pending(requestId, arg, options?.getPendingMeta?.({\n requestId,\n arg\n }, {\n getState,\n extra\n })));\n finalAction = await Promise.race([abortedPromise, Promise.resolve(payloadCreator(arg, {\n dispatch,\n getState,\n extra,\n requestId,\n signal: abortController.signal,\n abort,\n rejectWithValue: (value, meta) => {\n return new RejectWithValue(value, meta);\n },\n fulfillWithValue: (value, meta) => {\n return new FulfillWithMeta(value, meta);\n }\n })).then((result) => {\n if (result instanceof RejectWithValue) {\n throw result;\n }\n if (result instanceof FulfillWithMeta) {\n return fulfilled(result.payload, requestId, arg, result.meta);\n }\n return fulfilled(result, requestId, arg);\n })]);\n } catch (err) {\n finalAction = err instanceof RejectWithValue ? rejected(null, requestId, arg, err.payload, err.meta) : rejected(err, requestId, arg);\n } finally {\n if (abortHandler) {\n abortController.signal.removeEventListener(\"abort\", abortHandler);\n }\n }\n const skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;\n if (!skipDispatch) {\n dispatch(finalAction);\n }\n return finalAction;\n }();\n return Object.assign(promise, {\n abort,\n requestId,\n arg,\n unwrap() {\n return promise.then(unwrapResult);\n }\n });\n };\n }\n return Object.assign(actionCreator, {\n pending,\n rejected,\n fulfilled,\n settled: isAnyOf(rejected, fulfilled),\n typePrefix\n });\n }\n createAsyncThunk2.withTypes = () => createAsyncThunk2;\n return createAsyncThunk2;\n})();\nfunction unwrapResult(action) {\n if (action.meta && action.meta.rejectedWithValue) {\n throw action.payload;\n }\n if (action.error) {\n throw action.error;\n }\n return action.payload;\n}\nfunction isThenable(value) {\n return value !== null && typeof value === \"object\" && typeof value.then === \"function\";\n}\n\n// src/createSlice.ts\nvar asyncThunkSymbol = /* @__PURE__ */ Symbol.for(\"rtk-slice-createasyncthunk\");\nvar asyncThunkCreator = {\n [asyncThunkSymbol]: createAsyncThunk\n};\nvar ReducerType = /* @__PURE__ */ ((ReducerType2) => {\n ReducerType2[\"reducer\"] = \"reducer\";\n ReducerType2[\"reducerWithPrepare\"] = \"reducerWithPrepare\";\n ReducerType2[\"asyncThunk\"] = \"asyncThunk\";\n return ReducerType2;\n})(ReducerType || {});\nfunction getType(slice, actionKey) {\n return `${slice}/${actionKey}`;\n}\nfunction buildCreateSlice({\n creators\n} = {}) {\n const cAT = creators?.asyncThunk?.[asyncThunkSymbol];\n return function createSlice2(options) {\n const {\n name,\n reducerPath = name\n } = options;\n if (!name) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(11) : \"`name` is a required option for createSlice\");\n }\n if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\") {\n if (options.initialState === void 0) {\n console.error(\"You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`\");\n }\n }\n const reducers = (typeof options.reducers === \"function\" ? options.reducers(buildReducerCreators()) : options.reducers) || {};\n const reducerNames = Object.keys(reducers);\n const context = {\n sliceCaseReducersByName: {},\n sliceCaseReducersByType: {},\n actionCreators: {},\n sliceMatchers: []\n };\n const contextMethods = {\n addCase(typeOrActionCreator, reducer2) {\n const type = typeof typeOrActionCreator === \"string\" ? typeOrActionCreator : typeOrActionCreator.type;\n if (!type) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(12) : \"`context.addCase` cannot be called with an empty action type\");\n }\n if (type in context.sliceCaseReducersByType) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(13) : \"`context.addCase` cannot be called with two reducers for the same action type: \" + type);\n }\n context.sliceCaseReducersByType[type] = reducer2;\n return contextMethods;\n },\n addMatcher(matcher, reducer2) {\n context.sliceMatchers.push({\n matcher,\n reducer: reducer2\n });\n return contextMethods;\n },\n exposeAction(name2, actionCreator) {\n context.actionCreators[name2] = actionCreator;\n return contextMethods;\n },\n exposeCaseReducer(name2, reducer2) {\n context.sliceCaseReducersByName[name2] = reducer2;\n return contextMethods;\n }\n };\n reducerNames.forEach((reducerName) => {\n const reducerDefinition = reducers[reducerName];\n const reducerDetails = {\n reducerName,\n type: getType(name, reducerName),\n createNotation: typeof options.reducers === \"function\"\n };\n if (isAsyncThunkSliceReducerDefinition(reducerDefinition)) {\n handleThunkCaseReducerDefinition(reducerDetails, reducerDefinition, contextMethods, cAT);\n } else {\n handleNormalReducerDefinition(reducerDetails, reducerDefinition, contextMethods);\n }\n });\n function buildReducer() {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof options.extraReducers === \"object\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(14) : \"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice\");\n }\n }\n const [extraReducers = {}, actionMatchers = [], defaultCaseReducer = void 0] = typeof options.extraReducers === \"function\" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers];\n const finalCaseReducers = {\n ...extraReducers,\n ...context.sliceCaseReducersByType\n };\n return createReducer(options.initialState, (builder) => {\n for (let key in finalCaseReducers) {\n builder.addCase(key, finalCaseReducers[key]);\n }\n for (let sM of context.sliceMatchers) {\n builder.addMatcher(sM.matcher, sM.reducer);\n }\n for (let m of actionMatchers) {\n builder.addMatcher(m.matcher, m.reducer);\n }\n if (defaultCaseReducer) {\n builder.addDefaultCase(defaultCaseReducer);\n }\n });\n }\n const selectSelf = (state) => state;\n const injectedSelectorCache = /* @__PURE__ */ new Map();\n let _reducer;\n function reducer(state, action) {\n if (!_reducer) _reducer = buildReducer();\n return _reducer(state, action);\n }\n function getInitialState() {\n if (!_reducer) _reducer = buildReducer();\n return _reducer.getInitialState();\n }\n function makeSelectorProps(reducerPath2, injected = false) {\n function selectSlice(state) {\n let sliceState = state[reducerPath2];\n if (typeof sliceState === \"undefined\") {\n if (injected) {\n sliceState = getInitialState();\n } else if (process.env.NODE_ENV !== \"production\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(15) : \"selectSlice returned undefined for an uninjected slice reducer\");\n }\n }\n return sliceState;\n }\n function getSelectors(selectState = selectSelf) {\n const selectorCache = getOrInsertComputed(injectedSelectorCache, injected, () => /* @__PURE__ */ new WeakMap());\n return getOrInsertComputed(selectorCache, selectState, () => {\n const map = {};\n for (const [name2, selector] of Object.entries(options.selectors ?? {})) {\n map[name2] = wrapSelector(selector, selectState, getInitialState, injected);\n }\n return map;\n });\n }\n return {\n reducerPath: reducerPath2,\n getSelectors,\n get selectors() {\n return getSelectors(selectSlice);\n },\n selectSlice\n };\n }\n const slice = {\n name,\n reducer,\n actions: context.actionCreators,\n caseReducers: context.sliceCaseReducersByName,\n getInitialState,\n ...makeSelectorProps(reducerPath),\n injectInto(injectable, {\n reducerPath: pathOpt,\n ...config\n } = {}) {\n const newReducerPath = pathOpt ?? reducerPath;\n injectable.inject({\n reducerPath: newReducerPath,\n reducer\n }, config);\n return {\n ...slice,\n ...makeSelectorProps(newReducerPath, true)\n };\n }\n };\n return slice;\n };\n}\nfunction wrapSelector(selector, selectState, getInitialState, injected) {\n function wrapper(rootState, ...args) {\n let sliceState = selectState(rootState);\n if (typeof sliceState === \"undefined\") {\n if (injected) {\n sliceState = getInitialState();\n } else if (process.env.NODE_ENV !== \"production\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(16) : \"selectState returned undefined for an uninjected slice reducer\");\n }\n }\n return selector(sliceState, ...args);\n }\n wrapper.unwrapped = selector;\n return wrapper;\n}\nvar createSlice = /* @__PURE__ */ buildCreateSlice();\nfunction buildReducerCreators() {\n function asyncThunk(payloadCreator, config) {\n return {\n _reducerDefinitionType: \"asyncThunk\" /* asyncThunk */,\n payloadCreator,\n ...config\n };\n }\n asyncThunk.withTypes = () => asyncThunk;\n return {\n reducer(caseReducer) {\n return Object.assign({\n // hack so the wrapping function has the same name as the original\n // we need to create a wrapper so the `reducerDefinitionType` is not assigned to the original\n [caseReducer.name](...args) {\n return caseReducer(...args);\n }\n }[caseReducer.name], {\n _reducerDefinitionType: \"reducer\" /* reducer */\n });\n },\n preparedReducer(prepare, reducer) {\n return {\n _reducerDefinitionType: \"reducerWithPrepare\" /* reducerWithPrepare */,\n prepare,\n reducer\n };\n },\n asyncThunk\n };\n}\nfunction handleNormalReducerDefinition({\n type,\n reducerName,\n createNotation\n}, maybeReducerWithPrepare, context) {\n let caseReducer;\n let prepareCallback;\n if (\"reducer\" in maybeReducerWithPrepare) {\n if (createNotation && !isCaseReducerWithPrepareDefinition(maybeReducerWithPrepare)) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(17) : \"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.\");\n }\n caseReducer = maybeReducerWithPrepare.reducer;\n prepareCallback = maybeReducerWithPrepare.prepare;\n } else {\n caseReducer = maybeReducerWithPrepare;\n }\n context.addCase(type, caseReducer).exposeCaseReducer(reducerName, caseReducer).exposeAction(reducerName, prepareCallback ? createAction(type, prepareCallback) : createAction(type));\n}\nfunction isAsyncThunkSliceReducerDefinition(reducerDefinition) {\n return reducerDefinition._reducerDefinitionType === \"asyncThunk\" /* asyncThunk */;\n}\nfunction isCaseReducerWithPrepareDefinition(reducerDefinition) {\n return reducerDefinition._reducerDefinitionType === \"reducerWithPrepare\" /* reducerWithPrepare */;\n}\nfunction handleThunkCaseReducerDefinition({\n type,\n reducerName\n}, reducerDefinition, context, cAT) {\n if (!cAT) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(18) : \"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.\");\n }\n const {\n payloadCreator,\n fulfilled,\n pending,\n rejected,\n settled,\n options\n } = reducerDefinition;\n const thunk = cAT(type, payloadCreator, options);\n context.exposeAction(reducerName, thunk);\n if (fulfilled) {\n context.addCase(thunk.fulfilled, fulfilled);\n }\n if (pending) {\n context.addCase(thunk.pending, pending);\n }\n if (rejected) {\n context.addCase(thunk.rejected, rejected);\n }\n if (settled) {\n context.addMatcher(thunk.settled, settled);\n }\n context.exposeCaseReducer(reducerName, {\n fulfilled: fulfilled || noop,\n pending: pending || noop,\n rejected: rejected || noop,\n settled: settled || noop\n });\n}\nfunction noop() {\n}\n\n// src/entities/entity_state.ts\nfunction getInitialEntityState() {\n return {\n ids: [],\n entities: {}\n };\n}\nfunction createInitialStateFactory(stateAdapter) {\n function getInitialState(additionalState = {}, entities) {\n const state = Object.assign(getInitialEntityState(), additionalState);\n return entities ? stateAdapter.setAll(state, entities) : state;\n }\n return {\n getInitialState\n };\n}\n\n// src/entities/state_selectors.ts\nfunction createSelectorsFactory() {\n function getSelectors(selectState, options = {}) {\n const {\n createSelector: createSelector2 = createDraftSafeSelector\n } = options;\n const selectIds = (state) => state.ids;\n const selectEntities = (state) => state.entities;\n const selectAll = createSelector2(selectIds, selectEntities, (ids, entities) => ids.map((id) => entities[id]));\n const selectId = (_, id) => id;\n const selectById = (entities, id) => entities[id];\n const selectTotal = createSelector2(selectIds, (ids) => ids.length);\n if (!selectState) {\n return {\n selectIds,\n selectEntities,\n selectAll,\n selectTotal,\n selectById: createSelector2(selectEntities, selectId, selectById)\n };\n }\n const selectGlobalizedEntities = createSelector2(selectState, selectEntities);\n return {\n selectIds: createSelector2(selectState, selectIds),\n selectEntities: selectGlobalizedEntities,\n selectAll: createSelector2(selectState, selectAll),\n selectTotal: createSelector2(selectState, selectTotal),\n selectById: createSelector2(selectGlobalizedEntities, selectId, selectById)\n };\n }\n return {\n getSelectors\n };\n}\n\n// src/entities/state_adapter.ts\nimport { produce as createNextState3, isDraft as isDraft3 } from \"immer\";\nvar isDraftTyped = isDraft3;\nfunction createSingleArgumentStateOperator(mutator) {\n const operator = createStateOperator((_, state) => mutator(state));\n return function operation(state) {\n return operator(state, void 0);\n };\n}\nfunction createStateOperator(mutator) {\n return function operation(state, arg) {\n function isPayloadActionArgument(arg2) {\n return isFSA(arg2);\n }\n const runMutator = (draft) => {\n if (isPayloadActionArgument(arg)) {\n mutator(arg.payload, draft);\n } else {\n mutator(arg, draft);\n }\n };\n if (isDraftTyped(state)) {\n runMutator(state);\n return state;\n }\n return createNextState3(state, runMutator);\n };\n}\n\n// src/entities/utils.ts\nimport { current as current2, isDraft as isDraft4 } from \"immer\";\nfunction selectIdValue(entity, selectId) {\n const key = selectId(entity);\n if (process.env.NODE_ENV !== \"production\" && key === void 0) {\n console.warn(\"The entity passed to the `selectId` implementation returned undefined.\", \"You should probably provide your own `selectId` implementation.\", \"The entity that was passed:\", entity, \"The `selectId` implementation:\", selectId.toString());\n }\n return key;\n}\nfunction ensureEntitiesArray(entities) {\n if (!Array.isArray(entities)) {\n entities = Object.values(entities);\n }\n return entities;\n}\nfunction getCurrent(value) {\n return isDraft4(value) ? current2(value) : value;\n}\nfunction splitAddedUpdatedEntities(newEntities, selectId, state) {\n newEntities = ensureEntitiesArray(newEntities);\n const existingIdsArray = getCurrent(state.ids);\n const existingIds = new Set(existingIdsArray);\n const added = [];\n const updated = [];\n for (const entity of newEntities) {\n const id = selectIdValue(entity, selectId);\n if (existingIds.has(id)) {\n updated.push({\n id,\n changes: entity\n });\n } else {\n added.push(entity);\n }\n }\n return [added, updated, existingIdsArray];\n}\n\n// src/entities/unsorted_state_adapter.ts\nfunction createUnsortedStateAdapter(selectId) {\n function addOneMutably(entity, state) {\n const key = selectIdValue(entity, selectId);\n if (key in state.entities) {\n return;\n }\n state.ids.push(key);\n state.entities[key] = entity;\n }\n function addManyMutably(newEntities, state) {\n newEntities = ensureEntitiesArray(newEntities);\n for (const entity of newEntities) {\n addOneMutably(entity, state);\n }\n }\n function setOneMutably(entity, state) {\n const key = selectIdValue(entity, selectId);\n if (!(key in state.entities)) {\n state.ids.push(key);\n }\n ;\n state.entities[key] = entity;\n }\n function setManyMutably(newEntities, state) {\n newEntities = ensureEntitiesArray(newEntities);\n for (const entity of newEntities) {\n setOneMutably(entity, state);\n }\n }\n function setAllMutably(newEntities, state) {\n newEntities = ensureEntitiesArray(newEntities);\n state.ids = [];\n state.entities = {};\n addManyMutably(newEntities, state);\n }\n function removeOneMutably(key, state) {\n return removeManyMutably([key], state);\n }\n function removeManyMutably(keys, state) {\n let didMutate = false;\n keys.forEach((key) => {\n if (key in state.entities) {\n delete state.entities[key];\n didMutate = true;\n }\n });\n if (didMutate) {\n state.ids = state.ids.filter((id) => id in state.entities);\n }\n }\n function removeAllMutably(state) {\n Object.assign(state, {\n ids: [],\n entities: {}\n });\n }\n function takeNewKey(keys, update, state) {\n const original3 = state.entities[update.id];\n if (original3 === void 0) {\n return false;\n }\n const updated = Object.assign({}, original3, update.changes);\n const newKey = selectIdValue(updated, selectId);\n const hasNewKey = newKey !== update.id;\n if (hasNewKey) {\n keys[update.id] = newKey;\n delete state.entities[update.id];\n }\n ;\n state.entities[newKey] = updated;\n return hasNewKey;\n }\n function updateOneMutably(update, state) {\n return updateManyMutably([update], state);\n }\n function updateManyMutably(updates, state) {\n const newKeys = {};\n const updatesPerEntity = {};\n updates.forEach((update) => {\n if (update.id in state.entities) {\n updatesPerEntity[update.id] = {\n id: update.id,\n // Spreads ignore falsy values, so this works even if there isn't\n // an existing update already at this key\n changes: {\n ...updatesPerEntity[update.id]?.changes,\n ...update.changes\n }\n };\n }\n });\n updates = Object.values(updatesPerEntity);\n const didMutateEntities = updates.length > 0;\n if (didMutateEntities) {\n const didMutateIds = updates.filter((update) => takeNewKey(newKeys, update, state)).length > 0;\n if (didMutateIds) {\n state.ids = Object.values(state.entities).map((e) => selectIdValue(e, selectId));\n }\n }\n }\n function upsertOneMutably(entity, state) {\n return upsertManyMutably([entity], state);\n }\n function upsertManyMutably(newEntities, state) {\n const [added, updated] = splitAddedUpdatedEntities(newEntities, selectId, state);\n updateManyMutably(updated, state);\n addManyMutably(added, state);\n }\n return {\n removeAll: createSingleArgumentStateOperator(removeAllMutably),\n addOne: createStateOperator(addOneMutably),\n addMany: createStateOperator(addManyMutably),\n setOne: createStateOperator(setOneMutably),\n setMany: createStateOperator(setManyMutably),\n setAll: createStateOperator(setAllMutably),\n updateOne: createStateOperator(updateOneMutably),\n updateMany: createStateOperator(updateManyMutably),\n upsertOne: createStateOperator(upsertOneMutably),\n upsertMany: createStateOperator(upsertManyMutably),\n removeOne: createStateOperator(removeOneMutably),\n removeMany: createStateOperator(removeManyMutably)\n };\n}\n\n// src/entities/sorted_state_adapter.ts\nfunction findInsertIndex(sortedItems, item, comparisonFunction) {\n let lowIndex = 0;\n let highIndex = sortedItems.length;\n while (lowIndex < highIndex) {\n let middleIndex = lowIndex + highIndex >>> 1;\n const currentItem = sortedItems[middleIndex];\n const res = comparisonFunction(item, currentItem);\n if (res >= 0) {\n lowIndex = middleIndex + 1;\n } else {\n highIndex = middleIndex;\n }\n }\n return lowIndex;\n}\nfunction insert(sortedItems, item, comparisonFunction) {\n const insertAtIndex = findInsertIndex(sortedItems, item, comparisonFunction);\n sortedItems.splice(insertAtIndex, 0, item);\n return sortedItems;\n}\nfunction createSortedStateAdapter(selectId, comparer) {\n const {\n removeOne,\n removeMany,\n removeAll\n } = createUnsortedStateAdapter(selectId);\n function addOneMutably(entity, state) {\n return addManyMutably([entity], state);\n }\n function addManyMutably(newEntities, state, existingIds) {\n newEntities = ensureEntitiesArray(newEntities);\n const existingKeys = new Set(existingIds ?? getCurrent(state.ids));\n const models = newEntities.filter((model) => !existingKeys.has(selectIdValue(model, selectId)));\n if (models.length !== 0) {\n mergeFunction(state, models);\n }\n }\n function setOneMutably(entity, state) {\n return setManyMutably([entity], state);\n }\n function setManyMutably(newEntities, state) {\n newEntities = ensureEntitiesArray(newEntities);\n if (newEntities.length !== 0) {\n for (const item of newEntities) {\n delete state.entities[selectId(item)];\n }\n mergeFunction(state, newEntities);\n }\n }\n function setAllMutably(newEntities, state) {\n newEntities = ensureEntitiesArray(newEntities);\n state.entities = {};\n state.ids = [];\n addManyMutably(newEntities, state, []);\n }\n function updateOneMutably(update, state) {\n return updateManyMutably([update], state);\n }\n function updateManyMutably(updates, state) {\n let appliedUpdates = false;\n let replacedIds = false;\n for (let update of updates) {\n const entity = state.entities[update.id];\n if (!entity) {\n continue;\n }\n appliedUpdates = true;\n Object.assign(entity, update.changes);\n const newId = selectId(entity);\n if (update.id !== newId) {\n replacedIds = true;\n delete state.entities[update.id];\n const oldIndex = state.ids.indexOf(update.id);\n state.ids[oldIndex] = newId;\n state.entities[newId] = entity;\n }\n }\n if (appliedUpdates) {\n mergeFunction(state, [], appliedUpdates, replacedIds);\n }\n }\n function upsertOneMutably(entity, state) {\n return upsertManyMutably([entity], state);\n }\n function upsertManyMutably(newEntities, state) {\n const [added, updated, existingIdsArray] = splitAddedUpdatedEntities(newEntities, selectId, state);\n if (updated.length) {\n updateManyMutably(updated, state);\n }\n if (added.length) {\n addManyMutably(added, state, existingIdsArray);\n }\n }\n function areArraysEqual(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] === b[i]) {\n continue;\n }\n return false;\n }\n return true;\n }\n const mergeFunction = (state, addedItems, appliedUpdates, replacedIds) => {\n const currentEntities = getCurrent(state.entities);\n const currentIds = getCurrent(state.ids);\n const stateEntities = state.entities;\n let ids = currentIds;\n if (replacedIds) {\n ids = new Set(currentIds);\n }\n let sortedEntities = [];\n for (const id of ids) {\n const entity = currentEntities[id];\n if (entity) {\n sortedEntities.push(entity);\n }\n }\n const wasPreviouslyEmpty = sortedEntities.length === 0;\n for (const item of addedItems) {\n stateEntities[selectId(item)] = item;\n if (!wasPreviouslyEmpty) {\n insert(sortedEntities, item, comparer);\n }\n }\n if (wasPreviouslyEmpty) {\n sortedEntities = addedItems.slice().sort(comparer);\n } else if (appliedUpdates) {\n sortedEntities.sort(comparer);\n }\n const newSortedIds = sortedEntities.map(selectId);\n if (!areArraysEqual(currentIds, newSortedIds)) {\n state.ids = newSortedIds;\n }\n };\n return {\n removeOne,\n removeMany,\n removeAll,\n addOne: createStateOperator(addOneMutably),\n updateOne: createStateOperator(updateOneMutably),\n upsertOne: createStateOperator(upsertOneMutably),\n setOne: createStateOperator(setOneMutably),\n setMany: createStateOperator(setManyMutably),\n setAll: createStateOperator(setAllMutably),\n addMany: createStateOperator(addManyMutably),\n updateMany: createStateOperator(updateManyMutably),\n upsertMany: createStateOperator(upsertManyMutably)\n };\n}\n\n// src/entities/create_adapter.ts\nfunction createEntityAdapter(options = {}) {\n const {\n selectId,\n sortComparer\n } = {\n sortComparer: false,\n selectId: (instance) => instance.id,\n ...options\n };\n const stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);\n const stateFactory = createInitialStateFactory(stateAdapter);\n const selectorsFactory = createSelectorsFactory();\n return {\n selectId,\n sortComparer,\n ...stateFactory,\n ...selectorsFactory,\n ...stateAdapter\n };\n}\n\n// src/listenerMiddleware/index.ts\nimport { isAction as isAction3 } from \"redux\";\n\n// src/listenerMiddleware/exceptions.ts\nvar task = \"task\";\nvar listener = \"listener\";\nvar completed = \"completed\";\nvar cancelled = \"cancelled\";\nvar taskCancelled = `task-${cancelled}`;\nvar taskCompleted = `task-${completed}`;\nvar listenerCancelled = `${listener}-${cancelled}`;\nvar listenerCompleted = `${listener}-${completed}`;\nvar TaskAbortError = class {\n constructor(code) {\n this.code = code;\n this.message = `${task} ${cancelled} (reason: ${code})`;\n }\n name = \"TaskAbortError\";\n message;\n};\n\n// src/listenerMiddleware/utils.ts\nvar assertFunction = (func, expected) => {\n if (typeof func !== \"function\") {\n throw new TypeError(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(32) : `${expected} is not a function`);\n }\n};\nvar noop2 = () => {\n};\nvar catchRejection = (promise, onError = noop2) => {\n promise.catch(onError);\n return promise;\n};\nvar addAbortSignalListener = (abortSignal, callback) => {\n abortSignal.addEventListener(\"abort\", callback, {\n once: true\n });\n return () => abortSignal.removeEventListener(\"abort\", callback);\n};\nvar abortControllerWithReason = (abortController, reason) => {\n const signal = abortController.signal;\n if (signal.aborted) {\n return;\n }\n if (!(\"reason\" in signal)) {\n Object.defineProperty(signal, \"reason\", {\n enumerable: true,\n value: reason,\n configurable: true,\n writable: true\n });\n }\n ;\n abortController.abort(reason);\n};\n\n// src/listenerMiddleware/task.ts\nvar validateActive = (signal) => {\n if (signal.aborted) {\n const {\n reason\n } = signal;\n throw new TaskAbortError(reason);\n }\n};\nfunction raceWithSignal(signal, promise) {\n let cleanup = noop2;\n return new Promise((resolve, reject) => {\n const notifyRejection = () => reject(new TaskAbortError(signal.reason));\n if (signal.aborted) {\n notifyRejection();\n return;\n }\n cleanup = addAbortSignalListener(signal, notifyRejection);\n promise.finally(() => cleanup()).then(resolve, reject);\n }).finally(() => {\n cleanup = noop2;\n });\n}\nvar runTask = async (task2, cleanUp) => {\n try {\n await Promise.resolve();\n const value = await task2();\n return {\n status: \"ok\",\n value\n };\n } catch (error) {\n return {\n status: error instanceof TaskAbortError ? \"cancelled\" : \"rejected\",\n error\n };\n } finally {\n cleanUp?.();\n }\n};\nvar createPause = (signal) => {\n return (promise) => {\n return catchRejection(raceWithSignal(signal, promise).then((output) => {\n validateActive(signal);\n return output;\n }));\n };\n};\nvar createDelay = (signal) => {\n const pause = createPause(signal);\n return (timeoutMs) => {\n return pause(new Promise((resolve) => setTimeout(resolve, timeoutMs)));\n };\n};\n\n// src/listenerMiddleware/index.ts\nvar {\n assign\n} = Object;\nvar INTERNAL_NIL_TOKEN = {};\nvar alm = \"listenerMiddleware\";\nvar createFork = (parentAbortSignal, parentBlockingPromises) => {\n const linkControllers = (controller) => addAbortSignalListener(parentAbortSignal, () => abortControllerWithReason(controller, parentAbortSignal.reason));\n return (taskExecutor, opts) => {\n assertFunction(taskExecutor, \"taskExecutor\");\n const childAbortController = new AbortController();\n linkControllers(childAbortController);\n const result = runTask(async () => {\n validateActive(parentAbortSignal);\n validateActive(childAbortController.signal);\n const result2 = await taskExecutor({\n pause: createPause(childAbortController.signal),\n delay: createDelay(childAbortController.signal),\n signal: childAbortController.signal\n });\n validateActive(childAbortController.signal);\n return result2;\n }, () => abortControllerWithReason(childAbortController, taskCompleted));\n if (opts?.autoJoin) {\n parentBlockingPromises.push(result.catch(noop2));\n }\n return {\n result: createPause(parentAbortSignal)(result),\n cancel() {\n abortControllerWithReason(childAbortController, taskCancelled);\n }\n };\n };\n};\nvar createTakePattern = (startListening, signal) => {\n const take = async (predicate, timeout) => {\n validateActive(signal);\n let unsubscribe = () => {\n };\n const tuplePromise = new Promise((resolve, reject) => {\n let stopListening = startListening({\n predicate,\n effect: (action, listenerApi) => {\n listenerApi.unsubscribe();\n resolve([action, listenerApi.getState(), listenerApi.getOriginalState()]);\n }\n });\n unsubscribe = () => {\n stopListening();\n reject();\n };\n });\n const promises = [tuplePromise];\n if (timeout != null) {\n promises.push(new Promise((resolve) => setTimeout(resolve, timeout, null)));\n }\n try {\n const output = await raceWithSignal(signal, Promise.race(promises));\n validateActive(signal);\n return output;\n } finally {\n unsubscribe();\n }\n };\n return (predicate, timeout) => catchRejection(take(predicate, timeout));\n};\nvar getListenerEntryPropsFrom = (options) => {\n let {\n type,\n actionCreator,\n matcher,\n predicate,\n effect\n } = options;\n if (type) {\n predicate = createAction(type).match;\n } else if (actionCreator) {\n type = actionCreator.type;\n predicate = actionCreator.match;\n } else if (matcher) {\n predicate = matcher;\n } else if (predicate) {\n } else {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(21) : \"Creating or removing a listener requires one of the known fields for matching an action\");\n }\n assertFunction(effect, \"options.listener\");\n return {\n predicate,\n type,\n effect\n };\n};\nvar createListenerEntry = /* @__PURE__ */ assign((options) => {\n const {\n type,\n predicate,\n effect\n } = getListenerEntryPropsFrom(options);\n const entry = {\n id: nanoid(),\n effect,\n type,\n predicate,\n pending: /* @__PURE__ */ new Set(),\n unsubscribe: () => {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(22) : \"Unsubscribe not initialized\");\n }\n };\n return entry;\n}, {\n withTypes: () => createListenerEntry\n});\nvar findListenerEntry = (listenerMap, options) => {\n const {\n type,\n effect,\n predicate\n } = getListenerEntryPropsFrom(options);\n return Array.from(listenerMap.values()).find((entry) => {\n const matchPredicateOrType = typeof type === \"string\" ? entry.type === type : entry.predicate === predicate;\n return matchPredicateOrType && entry.effect === effect;\n });\n};\nvar cancelActiveListeners = (entry) => {\n entry.pending.forEach((controller) => {\n abortControllerWithReason(controller, listenerCancelled);\n });\n};\nvar createClearListenerMiddleware = (listenerMap) => {\n return () => {\n listenerMap.forEach(cancelActiveListeners);\n listenerMap.clear();\n };\n};\nvar safelyNotifyError = (errorHandler, errorToNotify, errorInfo) => {\n try {\n errorHandler(errorToNotify, errorInfo);\n } catch (errorHandlerError) {\n setTimeout(() => {\n throw errorHandlerError;\n }, 0);\n }\n};\nvar addListener = /* @__PURE__ */ assign(/* @__PURE__ */ createAction(`${alm}/add`), {\n withTypes: () => addListener\n});\nvar clearAllListeners = /* @__PURE__ */ createAction(`${alm}/removeAll`);\nvar removeListener = /* @__PURE__ */ assign(/* @__PURE__ */ createAction(`${alm}/remove`), {\n withTypes: () => removeListener\n});\nvar defaultErrorHandler = (...args) => {\n console.error(`${alm}/error`, ...args);\n};\nvar createListenerMiddleware = (middlewareOptions = {}) => {\n const listenerMap = /* @__PURE__ */ new Map();\n const {\n extra,\n onError = defaultErrorHandler\n } = middlewareOptions;\n assertFunction(onError, \"onError\");\n const insertEntry = (entry) => {\n entry.unsubscribe = () => listenerMap.delete(entry.id);\n listenerMap.set(entry.id, entry);\n return (cancelOptions) => {\n entry.unsubscribe();\n if (cancelOptions?.cancelActive) {\n cancelActiveListeners(entry);\n }\n };\n };\n const startListening = (options) => {\n const entry = findListenerEntry(listenerMap, options) ?? createListenerEntry(options);\n return insertEntry(entry);\n };\n assign(startListening, {\n withTypes: () => startListening\n });\n const stopListening = (options) => {\n const entry = findListenerEntry(listenerMap, options);\n if (entry) {\n entry.unsubscribe();\n if (options.cancelActive) {\n cancelActiveListeners(entry);\n }\n }\n return !!entry;\n };\n assign(stopListening, {\n withTypes: () => stopListening\n });\n const notifyListener = async (entry, action, api, getOriginalState) => {\n const internalTaskController = new AbortController();\n const take = createTakePattern(startListening, internalTaskController.signal);\n const autoJoinPromises = [];\n try {\n entry.pending.add(internalTaskController);\n await Promise.resolve(entry.effect(\n action,\n // Use assign() rather than ... to avoid extra helper functions added to bundle\n assign({}, api, {\n getOriginalState,\n condition: (predicate, timeout) => take(predicate, timeout).then(Boolean),\n take,\n delay: createDelay(internalTaskController.signal),\n pause: createPause(internalTaskController.signal),\n extra,\n signal: internalTaskController.signal,\n fork: createFork(internalTaskController.signal, autoJoinPromises),\n unsubscribe: entry.unsubscribe,\n subscribe: () => {\n listenerMap.set(entry.id, entry);\n },\n cancelActiveListeners: () => {\n entry.pending.forEach((controller, _, set) => {\n if (controller !== internalTaskController) {\n abortControllerWithReason(controller, listenerCancelled);\n set.delete(controller);\n }\n });\n },\n cancel: () => {\n abortControllerWithReason(internalTaskController, listenerCancelled);\n entry.pending.delete(internalTaskController);\n },\n throwIfCancelled: () => {\n validateActive(internalTaskController.signal);\n }\n })\n ));\n } catch (listenerError) {\n if (!(listenerError instanceof TaskAbortError)) {\n safelyNotifyError(onError, listenerError, {\n raisedBy: \"effect\"\n });\n }\n } finally {\n await Promise.all(autoJoinPromises);\n abortControllerWithReason(internalTaskController, listenerCompleted);\n entry.pending.delete(internalTaskController);\n }\n };\n const clearListenerMiddleware = createClearListenerMiddleware(listenerMap);\n const middleware = (api) => (next) => (action) => {\n if (!isAction3(action)) {\n return next(action);\n }\n if (addListener.match(action)) {\n return startListening(action.payload);\n }\n if (clearAllListeners.match(action)) {\n clearListenerMiddleware();\n return;\n }\n if (removeListener.match(action)) {\n return stopListening(action.payload);\n }\n let originalState = api.getState();\n const getOriginalState = () => {\n if (originalState === INTERNAL_NIL_TOKEN) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(23) : `${alm}: getOriginalState can only be called synchronously`);\n }\n return originalState;\n };\n let result;\n try {\n result = next(action);\n if (listenerMap.size > 0) {\n const currentState = api.getState();\n const listenerEntries = Array.from(listenerMap.values());\n for (const entry of listenerEntries) {\n let runListener = false;\n try {\n runListener = entry.predicate(action, currentState, originalState);\n } catch (predicateError) {\n runListener = false;\n safelyNotifyError(onError, predicateError, {\n raisedBy: \"predicate\"\n });\n }\n if (!runListener) {\n continue;\n }\n notifyListener(entry, action, api, getOriginalState);\n }\n }\n } finally {\n originalState = INTERNAL_NIL_TOKEN;\n }\n return result;\n };\n return {\n middleware,\n startListening,\n stopListening,\n clearListeners: clearListenerMiddleware\n };\n};\n\n// src/dynamicMiddleware/index.ts\nimport { compose as compose3 } from \"redux\";\nvar createMiddlewareEntry = (middleware) => ({\n middleware,\n applied: /* @__PURE__ */ new Map()\n});\nvar matchInstance = (instanceId) => (action) => action?.meta?.instanceId === instanceId;\nvar createDynamicMiddleware = () => {\n const instanceId = nanoid();\n const middlewareMap = /* @__PURE__ */ new Map();\n const withMiddleware = Object.assign(createAction(\"dynamicMiddleware/add\", (...middlewares) => ({\n payload: middlewares,\n meta: {\n instanceId\n }\n })), {\n withTypes: () => withMiddleware\n });\n const addMiddleware = Object.assign(function addMiddleware2(...middlewares) {\n middlewares.forEach((middleware2) => {\n getOrInsertComputed(middlewareMap, middleware2, createMiddlewareEntry);\n });\n }, {\n withTypes: () => addMiddleware\n });\n const getFinalMiddleware = (api) => {\n const appliedMiddleware = Array.from(middlewareMap.values()).map((entry) => getOrInsertComputed(entry.applied, api, entry.middleware));\n return compose3(...appliedMiddleware);\n };\n const isWithMiddleware = isAllOf(withMiddleware, matchInstance(instanceId));\n const middleware = (api) => (next) => (action) => {\n if (isWithMiddleware(action)) {\n addMiddleware(...action.payload);\n return api.dispatch;\n }\n return getFinalMiddleware(api)(next)(action);\n };\n return {\n middleware,\n addMiddleware,\n withMiddleware,\n instanceId\n };\n};\n\n// src/combineSlices.ts\nimport { combineReducers as combineReducers2 } from \"redux\";\nvar isSliceLike = (maybeSliceLike) => \"reducerPath\" in maybeSliceLike && typeof maybeSliceLike.reducerPath === \"string\";\nvar getReducers = (slices) => slices.flatMap((sliceOrMap) => isSliceLike(sliceOrMap) ? [[sliceOrMap.reducerPath, sliceOrMap.reducer]] : Object.entries(sliceOrMap));\nvar ORIGINAL_STATE = Symbol.for(\"rtk-state-proxy-original\");\nvar isStateProxy = (value) => !!value && !!value[ORIGINAL_STATE];\nvar stateProxyMap = /* @__PURE__ */ new WeakMap();\nvar createStateProxy = (state, reducerMap) => getOrInsertComputed(stateProxyMap, state, () => new Proxy(state, {\n get: (target, prop, receiver) => {\n if (prop === ORIGINAL_STATE) return target;\n const result = Reflect.get(target, prop, receiver);\n if (typeof result === \"undefined\") {\n const reducer = reducerMap[prop.toString()];\n if (reducer) {\n const reducerResult = reducer(void 0, {\n type: nanoid()\n });\n if (typeof reducerResult === \"undefined\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(24) : `The slice reducer for key \"${prop.toString()}\" returned undefined when called for selector(). If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);\n }\n return reducerResult;\n }\n }\n return result;\n }\n}));\nvar original = (state) => {\n if (!isStateProxy(state)) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(25) : \"original must be used on state Proxy\");\n }\n return state[ORIGINAL_STATE];\n};\nvar noopReducer = (state = {}) => state;\nfunction combineSlices(...slices) {\n const reducerMap = Object.fromEntries(getReducers(slices));\n const getReducer = () => Object.keys(reducerMap).length ? combineReducers2(reducerMap) : noopReducer;\n let reducer = getReducer();\n function combinedReducer(state, action) {\n return reducer(state, action);\n }\n combinedReducer.withLazyLoadedSlices = () => combinedReducer;\n const inject = (slice, config = {}) => {\n const {\n reducerPath,\n reducer: reducerToInject\n } = slice;\n const currentReducer = reducerMap[reducerPath];\n if (!config.overrideExisting && currentReducer && currentReducer !== reducerToInject) {\n if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\") {\n console.error(`called \\`inject\\` to override already-existing reducer ${reducerPath} without specifying \\`overrideExisting: true\\``);\n }\n return combinedReducer;\n }\n reducerMap[reducerPath] = reducerToInject;\n reducer = getReducer();\n return combinedReducer;\n };\n const selector = Object.assign(function makeSelector(selectorFn, selectState) {\n return function selector2(state, ...args) {\n return selectorFn(createStateProxy(selectState ? selectState(state, ...args) : state, reducerMap), ...args);\n };\n }, {\n original\n });\n return Object.assign(combinedReducer, {\n inject,\n selector\n });\n}\n\n// src/formatProdErrorMessage.ts\nfunction formatProdErrorMessage(code) {\n return `Minified Redux Toolkit error #${code}; visit https://redux-toolkit.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;\n}\nexport {\n ReducerType,\n SHOULD_AUTOBATCH,\n TaskAbortError,\n Tuple,\n addListener,\n asyncThunkCreator,\n autoBatchEnhancer,\n buildCreateSlice,\n clearAllListeners,\n combineSlices,\n configureStore,\n createAction,\n createActionCreatorInvariantMiddleware,\n createAsyncThunk,\n createDraftSafeSelector,\n createDraftSafeSelectorCreator,\n createDynamicMiddleware,\n createEntityAdapter,\n createImmutableStateInvariantMiddleware,\n createListenerMiddleware,\n produce as createNextState,\n createReducer,\n createSelector,\n createSelectorCreator2 as createSelectorCreator,\n createSerializableStateInvariantMiddleware,\n createSlice,\n current3 as current,\n findNonSerializableValue,\n formatProdErrorMessage,\n freeze,\n isActionCreator,\n isAllOf,\n isAnyOf,\n isAsyncThunkAction,\n isDraft5 as isDraft,\n isFSA as isFluxStandardAction,\n isFulfilled,\n isImmutableDefault,\n isPending,\n isPlain,\n isRejected,\n isRejectedWithValue,\n lruMemoize,\n miniSerializeError,\n nanoid,\n original2 as original,\n prepareAutoBatched,\n removeListener,\n unwrapResult,\n weakMapMemoize2 as weakMapMemoize\n};\n//# sourceMappingURL=redux-toolkit.modern.mjs.map","export const isShallowIdentical = (currentStateValue: any, payload: any) => {\n return JSON.stringify(currentStateValue) === JSON.stringify(payload);\n};\n","import { createSlice, current, PayloadAction } from '@reduxjs/toolkit';\nimport { isShallowIdentical } from 'utils/isShallowIdentical';\n\nexport type SceneState = {\n doorsOpened: boolean;\n hasAllSelectedModelsLoaded: boolean;\n hasShownIntroAnimation: boolean;\n measurementsVisible: boolean;\n // two measurement states here. We need to differentiate between what the user want and what we can control on our side.\n userWantsMeasurementVisible: boolean;\n};\n\nconst initialState: SceneState = {\n doorsOpened: false,\n hasAllSelectedModelsLoaded: false,\n hasShownIntroAnimation: false,\n measurementsVisible: false,\n userWantsMeasurementVisible: true\n};\n\nexport const { reducer: sceneReducer, actions: sceneAction } = createSlice({\n name: 'scene',\n initialState,\n reducers: {\n setMeasurementsVisible: (\n state,\n { payload: measurementsVisible }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).measurementsVisible, measurementsVisible)) {\n return;\n }\n\n return { ...state, measurementsVisible };\n },\n setUserWantsMeasurementVisible: (\n state,\n {\n payload: userWantsMeasurementVisible\n }: PayloadAction\n ) => {\n if (\n isShallowIdentical(current(state).userWantsMeasurementVisible, userWantsMeasurementVisible)\n ) {\n return;\n }\n\n return { ...state, userWantsMeasurementVisible };\n },\n setHasShownIntroAnimation: (\n state,\n { payload: hasShownIntroAnimation }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).hasShownIntroAnimation, hasShownIntroAnimation)) {\n return;\n }\n\n return { ...state, hasShownIntroAnimation };\n },\n setHasAllSelectedModelsLoaded: (\n state,\n {\n payload: hasAllSelectedModelsLoaded\n }: PayloadAction\n ) => {\n if (\n isShallowIdentical(current(state).hasAllSelectedModelsLoaded, hasAllSelectedModelsLoaded)\n ) {\n return;\n }\n\n return { ...state, hasAllSelectedModelsLoaded };\n },\n setDoorsOpened: (state, { payload: doorsOpened }: PayloadAction) => {\n if (isShallowIdentical(current(state).doorsOpened, doorsOpened)) {\n return;\n }\n\n return { ...state, doorsOpened };\n }\n }\n});\n","// NOTE: this list must be up-to-date with browsers listed in\n// test/acceptance/useragentstrings.yml\nexport const BROWSER_ALIASES_MAP = {\n 'Amazon Silk': 'amazon_silk',\n 'Android Browser': 'android',\n Bada: 'bada',\n BlackBerry: 'blackberry',\n Chrome: 'chrome',\n Chromium: 'chromium',\n Electron: 'electron',\n Epiphany: 'epiphany',\n Firefox: 'firefox',\n Focus: 'focus',\n Generic: 'generic',\n 'Google Search': 'google_search',\n Googlebot: 'googlebot',\n 'Internet Explorer': 'ie',\n 'K-Meleon': 'k_meleon',\n Maxthon: 'maxthon',\n 'Microsoft Edge': 'edge',\n 'MZ Browser': 'mz',\n 'NAVER Whale Browser': 'naver',\n Opera: 'opera',\n 'Opera Coast': 'opera_coast',\n PhantomJS: 'phantomjs',\n Puffin: 'puffin',\n QupZilla: 'qupzilla',\n QQ: 'qq',\n QQLite: 'qqlite',\n Safari: 'safari',\n Sailfish: 'sailfish',\n 'Samsung Internet for Android': 'samsung_internet',\n SeaMonkey: 'seamonkey',\n Sleipnir: 'sleipnir',\n Swing: 'swing',\n Tizen: 'tizen',\n 'UC Browser': 'uc',\n Vivaldi: 'vivaldi',\n 'WebOS Browser': 'webos',\n WeChat: 'wechat',\n 'Yandex Browser': 'yandex',\n Roku: 'roku',\n};\n\nexport const BROWSER_MAP = {\n amazon_silk: 'Amazon Silk',\n android: 'Android Browser',\n bada: 'Bada',\n blackberry: 'BlackBerry',\n chrome: 'Chrome',\n chromium: 'Chromium',\n electron: 'Electron',\n epiphany: 'Epiphany',\n firefox: 'Firefox',\n focus: 'Focus',\n generic: 'Generic',\n googlebot: 'Googlebot',\n google_search: 'Google Search',\n ie: 'Internet Explorer',\n k_meleon: 'K-Meleon',\n maxthon: 'Maxthon',\n edge: 'Microsoft Edge',\n mz: 'MZ Browser',\n naver: 'NAVER Whale Browser',\n opera: 'Opera',\n opera_coast: 'Opera Coast',\n phantomjs: 'PhantomJS',\n puffin: 'Puffin',\n qupzilla: 'QupZilla',\n qq: 'QQ Browser',\n qqlite: 'QQ Browser Lite',\n safari: 'Safari',\n sailfish: 'Sailfish',\n samsung_internet: 'Samsung Internet for Android',\n seamonkey: 'SeaMonkey',\n sleipnir: 'Sleipnir',\n swing: 'Swing',\n tizen: 'Tizen',\n uc: 'UC Browser',\n vivaldi: 'Vivaldi',\n webos: 'WebOS Browser',\n wechat: 'WeChat',\n yandex: 'Yandex Browser',\n};\n\nexport const PLATFORMS_MAP = {\n tablet: 'tablet',\n mobile: 'mobile',\n desktop: 'desktop',\n tv: 'tv',\n};\n\nexport const OS_MAP = {\n WindowsPhone: 'Windows Phone',\n Windows: 'Windows',\n MacOS: 'macOS',\n iOS: 'iOS',\n Android: 'Android',\n WebOS: 'WebOS',\n BlackBerry: 'BlackBerry',\n Bada: 'Bada',\n Tizen: 'Tizen',\n Linux: 'Linux',\n ChromeOS: 'Chrome OS',\n PlayStation4: 'PlayStation 4',\n Roku: 'Roku',\n};\n\nexport const ENGINE_MAP = {\n EdgeHTML: 'EdgeHTML',\n Blink: 'Blink',\n Trident: 'Trident',\n Presto: 'Presto',\n Gecko: 'Gecko',\n WebKit: 'WebKit',\n};\n","import { BROWSER_MAP, BROWSER_ALIASES_MAP } from './constants.js';\n\nexport default class Utils {\n /**\n * Get first matched item for a string\n * @param {RegExp} regexp\n * @param {String} ua\n * @return {Array|{index: number, input: string}|*|boolean|string}\n */\n static getFirstMatch(regexp, ua) {\n const match = ua.match(regexp);\n return (match && match.length > 0 && match[1]) || '';\n }\n\n /**\n * Get second matched item for a string\n * @param regexp\n * @param {String} ua\n * @return {Array|{index: number, input: string}|*|boolean|string}\n */\n static getSecondMatch(regexp, ua) {\n const match = ua.match(regexp);\n return (match && match.length > 1 && match[2]) || '';\n }\n\n /**\n * Match a regexp and return a constant or undefined\n * @param {RegExp} regexp\n * @param {String} ua\n * @param {*} _const Any const that will be returned if regexp matches the string\n * @return {*}\n */\n static matchAndReturnConst(regexp, ua, _const) {\n if (regexp.test(ua)) {\n return _const;\n }\n return void (0);\n }\n\n static getWindowsVersionName(version) {\n switch (version) {\n case 'NT': return 'NT';\n case 'XP': return 'XP';\n case 'NT 5.0': return '2000';\n case 'NT 5.1': return 'XP';\n case 'NT 5.2': return '2003';\n case 'NT 6.0': return 'Vista';\n case 'NT 6.1': return '7';\n case 'NT 6.2': return '8';\n case 'NT 6.3': return '8.1';\n case 'NT 10.0': return '10';\n default: return undefined;\n }\n }\n\n /**\n * Get macOS version name\n * 10.5 - Leopard\n * 10.6 - Snow Leopard\n * 10.7 - Lion\n * 10.8 - Mountain Lion\n * 10.9 - Mavericks\n * 10.10 - Yosemite\n * 10.11 - El Capitan\n * 10.12 - Sierra\n * 10.13 - High Sierra\n * 10.14 - Mojave\n * 10.15 - Catalina\n *\n * @example\n * getMacOSVersionName(\"10.14\") // 'Mojave'\n *\n * @param {string} version\n * @return {string} versionName\n */\n static getMacOSVersionName(version) {\n const v = version.split('.').splice(0, 2).map(s => parseInt(s, 10) || 0);\n v.push(0);\n if (v[0] !== 10) return undefined;\n switch (v[1]) {\n case 5: return 'Leopard';\n case 6: return 'Snow Leopard';\n case 7: return 'Lion';\n case 8: return 'Mountain Lion';\n case 9: return 'Mavericks';\n case 10: return 'Yosemite';\n case 11: return 'El Capitan';\n case 12: return 'Sierra';\n case 13: return 'High Sierra';\n case 14: return 'Mojave';\n case 15: return 'Catalina';\n default: return undefined;\n }\n }\n\n /**\n * Get Android version name\n * 1.5 - Cupcake\n * 1.6 - Donut\n * 2.0 - Eclair\n * 2.1 - Eclair\n * 2.2 - Froyo\n * 2.x - Gingerbread\n * 3.x - Honeycomb\n * 4.0 - Ice Cream Sandwich\n * 4.1 - Jelly Bean\n * 4.4 - KitKat\n * 5.x - Lollipop\n * 6.x - Marshmallow\n * 7.x - Nougat\n * 8.x - Oreo\n * 9.x - Pie\n *\n * @example\n * getAndroidVersionName(\"7.0\") // 'Nougat'\n *\n * @param {string} version\n * @return {string} versionName\n */\n static getAndroidVersionName(version) {\n const v = version.split('.').splice(0, 2).map(s => parseInt(s, 10) || 0);\n v.push(0);\n if (v[0] === 1 && v[1] < 5) return undefined;\n if (v[0] === 1 && v[1] < 6) return 'Cupcake';\n if (v[0] === 1 && v[1] >= 6) return 'Donut';\n if (v[0] === 2 && v[1] < 2) return 'Eclair';\n if (v[0] === 2 && v[1] === 2) return 'Froyo';\n if (v[0] === 2 && v[1] > 2) return 'Gingerbread';\n if (v[0] === 3) return 'Honeycomb';\n if (v[0] === 4 && v[1] < 1) return 'Ice Cream Sandwich';\n if (v[0] === 4 && v[1] < 4) return 'Jelly Bean';\n if (v[0] === 4 && v[1] >= 4) return 'KitKat';\n if (v[0] === 5) return 'Lollipop';\n if (v[0] === 6) return 'Marshmallow';\n if (v[0] === 7) return 'Nougat';\n if (v[0] === 8) return 'Oreo';\n if (v[0] === 9) return 'Pie';\n return undefined;\n }\n\n /**\n * Get version precisions count\n *\n * @example\n * getVersionPrecision(\"1.10.3\") // 3\n *\n * @param {string} version\n * @return {number}\n */\n static getVersionPrecision(version) {\n return version.split('.').length;\n }\n\n /**\n * Calculate browser version weight\n *\n * @example\n * compareVersions('1.10.2.1', '1.8.2.1.90') // 1\n * compareVersions('1.010.2.1', '1.09.2.1.90'); // 1\n * compareVersions('1.10.2.1', '1.10.2.1'); // 0\n * compareVersions('1.10.2.1', '1.0800.2'); // -1\n * compareVersions('1.10.2.1', '1.10', true); // 0\n *\n * @param {String} versionA versions versions to compare\n * @param {String} versionB versions versions to compare\n * @param {boolean} [isLoose] enable loose comparison\n * @return {Number} comparison result: -1 when versionA is lower,\n * 1 when versionA is bigger, 0 when both equal\n */\n /* eslint consistent-return: 1 */\n static compareVersions(versionA, versionB, isLoose = false) {\n // 1) get common precision for both versions, for example for \"10.0\" and \"9\" it should be 2\n const versionAPrecision = Utils.getVersionPrecision(versionA);\n const versionBPrecision = Utils.getVersionPrecision(versionB);\n\n let precision = Math.max(versionAPrecision, versionBPrecision);\n let lastPrecision = 0;\n\n const chunks = Utils.map([versionA, versionB], (version) => {\n const delta = precision - Utils.getVersionPrecision(version);\n\n // 2) \"9\" -> \"9.0\" (for precision = 2)\n const _version = version + new Array(delta + 1).join('.0');\n\n // 3) \"9.0\" -> [\"000000000\"\", \"000000009\"]\n return Utils.map(_version.split('.'), chunk => new Array(20 - chunk.length).join('0') + chunk).reverse();\n });\n\n // adjust precision for loose comparison\n if (isLoose) {\n lastPrecision = precision - Math.min(versionAPrecision, versionBPrecision);\n }\n\n // iterate in reverse order by reversed chunks array\n precision -= 1;\n while (precision >= lastPrecision) {\n // 4) compare: \"000000009\" > \"000000010\" = false (but \"9\" > \"10\" = true)\n if (chunks[0][precision] > chunks[1][precision]) {\n return 1;\n }\n\n if (chunks[0][precision] === chunks[1][precision]) {\n if (precision === lastPrecision) {\n // all version chunks are same\n return 0;\n }\n\n precision -= 1;\n } else if (chunks[0][precision] < chunks[1][precision]) {\n return -1;\n }\n }\n\n return undefined;\n }\n\n /**\n * Array::map polyfill\n *\n * @param {Array} arr\n * @param {Function} iterator\n * @return {Array}\n */\n static map(arr, iterator) {\n const result = [];\n let i;\n if (Array.prototype.map) {\n return Array.prototype.map.call(arr, iterator);\n }\n for (i = 0; i < arr.length; i += 1) {\n result.push(iterator(arr[i]));\n }\n return result;\n }\n\n /**\n * Array::find polyfill\n *\n * @param {Array} arr\n * @param {Function} predicate\n * @return {Array}\n */\n static find(arr, predicate) {\n let i;\n let l;\n if (Array.prototype.find) {\n return Array.prototype.find.call(arr, predicate);\n }\n for (i = 0, l = arr.length; i < l; i += 1) {\n const value = arr[i];\n if (predicate(value, i)) {\n return value;\n }\n }\n return undefined;\n }\n\n /**\n * Object::assign polyfill\n *\n * @param {Object} obj\n * @param {Object} ...objs\n * @return {Object}\n */\n static assign(obj, ...assigners) {\n const result = obj;\n let i;\n let l;\n if (Object.assign) {\n return Object.assign(obj, ...assigners);\n }\n for (i = 0, l = assigners.length; i < l; i += 1) {\n const assigner = assigners[i];\n if (typeof assigner === 'object' && assigner !== null) {\n const keys = Object.keys(assigner);\n keys.forEach((key) => {\n result[key] = assigner[key];\n });\n }\n }\n return obj;\n }\n\n /**\n * Get short version/alias for a browser name\n *\n * @example\n * getBrowserAlias('Microsoft Edge') // edge\n *\n * @param {string} browserName\n * @return {string}\n */\n static getBrowserAlias(browserName) {\n return BROWSER_ALIASES_MAP[browserName];\n }\n\n /**\n * Get short version/alias for a browser name\n *\n * @example\n * getBrowserAlias('edge') // Microsoft Edge\n *\n * @param {string} browserAlias\n * @return {string}\n */\n static getBrowserTypeByAlias(browserAlias) {\n return BROWSER_MAP[browserAlias] || '';\n }\n}\n","/**\n * Browsers' descriptors\n *\n * The idea of descriptors is simple. You should know about them two simple things:\n * 1. Every descriptor has a method or property called `test` and a `describe` method.\n * 2. Order of descriptors is important.\n *\n * More details:\n * 1. Method or property `test` serves as a way to detect whether the UA string\n * matches some certain browser or not. The `describe` method helps to make a result\n * object with params that show some browser-specific things: name, version, etc.\n * 2. Order of descriptors is important because a Parser goes through them one by one\n * in course. For example, if you insert Chrome's descriptor as the first one,\n * more then a half of browsers will be described as Chrome, because they will pass\n * the Chrome descriptor's test.\n *\n * Descriptor's `test` could be a property with an array of RegExps, where every RegExp\n * will be applied to a UA string to test it whether it matches or not.\n * If a descriptor has two or more regexps in the `test` array it tests them one by one\n * with a logical sum operation. Parser stops if it has found any RegExp that matches the UA.\n *\n * Or `test` could be a method. In that case it gets a Parser instance and should\n * return true/false to get the Parser know if this browser descriptor matches the UA or not.\n */\n\nimport Utils from './utils.js';\n\nconst commonVersionIdentifier = /version\\/(\\d+(\\.?_?\\d+)+)/i;\n\nconst browsersList = [\n /* Googlebot */\n {\n test: [/googlebot/i],\n describe(ua) {\n const browser = {\n name: 'Googlebot',\n };\n const version = Utils.getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n\n /* Opera < 13.0 */\n {\n test: [/opera/i],\n describe(ua) {\n const browser = {\n name: 'Opera',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:opera)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n\n /* Opera > 13.0 */\n {\n test: [/opr\\/|opios/i],\n describe(ua) {\n const browser = {\n name: 'Opera',\n };\n const version = Utils.getFirstMatch(/(?:opr|opios)[\\s/](\\S+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/SamsungBrowser/i],\n describe(ua) {\n const browser = {\n name: 'Samsung Internet for Android',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:SamsungBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/Whale/i],\n describe(ua) {\n const browser = {\n name: 'NAVER Whale Browser',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:whale)[\\s/](\\d+(?:\\.\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/MZBrowser/i],\n describe(ua) {\n const browser = {\n name: 'MZ Browser',\n };\n const version = Utils.getFirstMatch(/(?:MZBrowser)[\\s/](\\d+(?:\\.\\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/focus/i],\n describe(ua) {\n const browser = {\n name: 'Focus',\n };\n const version = Utils.getFirstMatch(/(?:focus)[\\s/](\\d+(?:\\.\\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/swing/i],\n describe(ua) {\n const browser = {\n name: 'Swing',\n };\n const version = Utils.getFirstMatch(/(?:swing)[\\s/](\\d+(?:\\.\\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/coast/i],\n describe(ua) {\n const browser = {\n name: 'Opera Coast',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:coast)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/opt\\/\\d+(?:.?_?\\d+)+/i],\n describe(ua) {\n const browser = {\n name: 'Opera Touch',\n };\n const version = Utils.getFirstMatch(/(?:opt)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/yabrowser/i],\n describe(ua) {\n const browser = {\n name: 'Yandex Browser',\n };\n const version = Utils.getFirstMatch(/(?:yabrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/ucbrowser/i],\n describe(ua) {\n const browser = {\n name: 'UC Browser',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:ucbrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/Maxthon|mxios/i],\n describe(ua) {\n const browser = {\n name: 'Maxthon',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:Maxthon|mxios)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/epiphany/i],\n describe(ua) {\n const browser = {\n name: 'Epiphany',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:epiphany)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/puffin/i],\n describe(ua) {\n const browser = {\n name: 'Puffin',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:puffin)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/sleipnir/i],\n describe(ua) {\n const browser = {\n name: 'Sleipnir',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:sleipnir)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/k-meleon/i],\n describe(ua) {\n const browser = {\n name: 'K-Meleon',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:k-meleon)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/micromessenger/i],\n describe(ua) {\n const browser = {\n name: 'WeChat',\n };\n const version = Utils.getFirstMatch(/(?:micromessenger)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/qqbrowser/i],\n describe(ua) {\n const browser = {\n name: (/qqbrowserlite/i).test(ua) ? 'QQ Browser Lite' : 'QQ Browser',\n };\n const version = Utils.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\\d+(\\.?_?\\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/msie|trident/i],\n describe(ua) {\n const browser = {\n name: 'Internet Explorer',\n };\n const version = Utils.getFirstMatch(/(?:msie |rv:)(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/\\sedg\\//i],\n describe(ua) {\n const browser = {\n name: 'Microsoft Edge',\n };\n\n const version = Utils.getFirstMatch(/\\sedg\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/edg([ea]|ios)/i],\n describe(ua) {\n const browser = {\n name: 'Microsoft Edge',\n };\n\n const version = Utils.getSecondMatch(/edg([ea]|ios)\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/vivaldi/i],\n describe(ua) {\n const browser = {\n name: 'Vivaldi',\n };\n const version = Utils.getFirstMatch(/vivaldi\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/seamonkey/i],\n describe(ua) {\n const browser = {\n name: 'SeaMonkey',\n };\n const version = Utils.getFirstMatch(/seamonkey\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/sailfish/i],\n describe(ua) {\n const browser = {\n name: 'Sailfish',\n };\n\n const version = Utils.getFirstMatch(/sailfish\\s?browser\\/(\\d+(\\.\\d+)?)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/silk/i],\n describe(ua) {\n const browser = {\n name: 'Amazon Silk',\n };\n const version = Utils.getFirstMatch(/silk\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/phantom/i],\n describe(ua) {\n const browser = {\n name: 'PhantomJS',\n };\n const version = Utils.getFirstMatch(/phantomjs\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/slimerjs/i],\n describe(ua) {\n const browser = {\n name: 'SlimerJS',\n };\n const version = Utils.getFirstMatch(/slimerjs\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/blackberry|\\bbb\\d+/i, /rim\\stablet/i],\n describe(ua) {\n const browser = {\n name: 'BlackBerry',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/blackberry[\\d]+\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/(web|hpw)[o0]s/i],\n describe(ua) {\n const browser = {\n name: 'WebOS Browser',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/w(?:eb)?[o0]sbrowser\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/bada/i],\n describe(ua) {\n const browser = {\n name: 'Bada',\n };\n const version = Utils.getFirstMatch(/dolfin\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/tizen/i],\n describe(ua) {\n const browser = {\n name: 'Tizen',\n };\n const version = Utils.getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.?_?\\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/qupzilla/i],\n describe(ua) {\n const browser = {\n name: 'QupZilla',\n };\n const version = Utils.getFirstMatch(/(?:qupzilla)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/firefox|iceweasel|fxios/i],\n describe(ua) {\n const browser = {\n name: 'Firefox',\n };\n const version = Utils.getFirstMatch(/(?:firefox|iceweasel|fxios)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/electron/i],\n describe(ua) {\n const browser = {\n name: 'Electron',\n };\n const version = Utils.getFirstMatch(/(?:electron)\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/MiuiBrowser/i],\n describe(ua) {\n const browser = {\n name: 'Miui',\n };\n const version = Utils.getFirstMatch(/(?:MiuiBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/chromium/i],\n describe(ua) {\n const browser = {\n name: 'Chromium',\n };\n const version = Utils.getFirstMatch(/(?:chromium)[\\s/](\\d+(\\.?_?\\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/chrome|crios|crmo/i],\n describe(ua) {\n const browser = {\n name: 'Chrome',\n };\n const version = Utils.getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n {\n test: [/GSA/i],\n describe(ua) {\n const browser = {\n name: 'Google Search',\n };\n const version = Utils.getFirstMatch(/(?:GSA)\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n\n /* Android Browser */\n {\n test(parser) {\n const notLikeAndroid = !parser.test(/like android/i);\n const butAndroid = parser.test(/android/i);\n return notLikeAndroid && butAndroid;\n },\n describe(ua) {\n const browser = {\n name: 'Android Browser',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n\n /* PlayStation 4 */\n {\n test: [/playstation 4/i],\n describe(ua) {\n const browser = {\n name: 'PlayStation 4',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n\n /* Safari */\n {\n test: [/safari|applewebkit/i],\n describe(ua) {\n const browser = {\n name: 'Safari',\n };\n const version = Utils.getFirstMatch(commonVersionIdentifier, ua);\n\n if (version) {\n browser.version = version;\n }\n\n return browser;\n },\n },\n\n /* Something else */\n {\n test: [/.*/i],\n describe(ua) {\n /* Here we try to make sure that there are explicit details about the device\n * in order to decide what regexp exactly we want to apply\n * (as there is a specific decision based on that conclusion)\n */\n const regexpWithoutDeviceSpec = /^(.*)\\/(.*) /;\n const regexpWithDeviceSpec = /^(.*)\\/(.*)[ \\t]\\((.*)/;\n const hasDeviceSpec = ua.search('\\\\(') !== -1;\n const regexp = hasDeviceSpec ? regexpWithDeviceSpec : regexpWithoutDeviceSpec;\n return {\n name: Utils.getFirstMatch(regexp, ua),\n version: Utils.getSecondMatch(regexp, ua),\n };\n },\n },\n];\n\nexport default browsersList;\n","import Utils from './utils.js';\nimport { OS_MAP } from './constants.js';\n\nexport default [\n /* Roku */\n {\n test: [/Roku\\/DVP/],\n describe(ua) {\n const version = Utils.getFirstMatch(/Roku\\/DVP-(\\d+\\.\\d+)/i, ua);\n return {\n name: OS_MAP.Roku,\n version,\n };\n },\n },\n\n /* Windows Phone */\n {\n test: [/windows phone/i],\n describe(ua) {\n const version = Utils.getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i, ua);\n return {\n name: OS_MAP.WindowsPhone,\n version,\n };\n },\n },\n\n /* Windows */\n {\n test: [/windows /i],\n describe(ua) {\n const version = Utils.getFirstMatch(/Windows ((NT|XP)( \\d\\d?.\\d)?)/i, ua);\n const versionName = Utils.getWindowsVersionName(version);\n\n return {\n name: OS_MAP.Windows,\n version,\n versionName,\n };\n },\n },\n\n /* Firefox on iPad */\n {\n test: [/Macintosh(.*?) FxiOS(.*?)\\//],\n describe(ua) {\n const result = {\n name: OS_MAP.iOS,\n };\n const version = Utils.getSecondMatch(/(Version\\/)(\\d[\\d.]+)/, ua);\n if (version) {\n result.version = version;\n }\n return result;\n },\n },\n\n /* macOS */\n {\n test: [/macintosh/i],\n describe(ua) {\n const version = Utils.getFirstMatch(/mac os x (\\d+(\\.?_?\\d+)+)/i, ua).replace(/[_\\s]/g, '.');\n const versionName = Utils.getMacOSVersionName(version);\n\n const os = {\n name: OS_MAP.MacOS,\n version,\n };\n if (versionName) {\n os.versionName = versionName;\n }\n return os;\n },\n },\n\n /* iOS */\n {\n test: [/(ipod|iphone|ipad)/i],\n describe(ua) {\n const version = Utils.getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i, ua).replace(/[_\\s]/g, '.');\n\n return {\n name: OS_MAP.iOS,\n version,\n };\n },\n },\n\n /* Android */\n {\n test(parser) {\n const notLikeAndroid = !parser.test(/like android/i);\n const butAndroid = parser.test(/android/i);\n return notLikeAndroid && butAndroid;\n },\n describe(ua) {\n const version = Utils.getFirstMatch(/android[\\s/-](\\d+(\\.\\d+)*)/i, ua);\n const versionName = Utils.getAndroidVersionName(version);\n const os = {\n name: OS_MAP.Android,\n version,\n };\n if (versionName) {\n os.versionName = versionName;\n }\n return os;\n },\n },\n\n /* WebOS */\n {\n test: [/(web|hpw)[o0]s/i],\n describe(ua) {\n const version = Utils.getFirstMatch(/(?:web|hpw)[o0]s\\/(\\d+(\\.\\d+)*)/i, ua);\n const os = {\n name: OS_MAP.WebOS,\n };\n\n if (version && version.length) {\n os.version = version;\n }\n return os;\n },\n },\n\n /* BlackBerry */\n {\n test: [/blackberry|\\bbb\\d+/i, /rim\\stablet/i],\n describe(ua) {\n const version = Utils.getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i, ua)\n || Utils.getFirstMatch(/blackberry\\d+\\/(\\d+([_\\s]\\d+)*)/i, ua)\n || Utils.getFirstMatch(/\\bbb(\\d+)/i, ua);\n\n return {\n name: OS_MAP.BlackBerry,\n version,\n };\n },\n },\n\n /* Bada */\n {\n test: [/bada/i],\n describe(ua) {\n const version = Utils.getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i, ua);\n\n return {\n name: OS_MAP.Bada,\n version,\n };\n },\n },\n\n /* Tizen */\n {\n test: [/tizen/i],\n describe(ua) {\n const version = Utils.getFirstMatch(/tizen[/\\s](\\d+(\\.\\d+)*)/i, ua);\n\n return {\n name: OS_MAP.Tizen,\n version,\n };\n },\n },\n\n /* Linux */\n {\n test: [/linux/i],\n describe() {\n return {\n name: OS_MAP.Linux,\n };\n },\n },\n\n /* Chrome OS */\n {\n test: [/CrOS/],\n describe() {\n return {\n name: OS_MAP.ChromeOS,\n };\n },\n },\n\n /* Playstation 4 */\n {\n test: [/PlayStation 4/],\n describe(ua) {\n const version = Utils.getFirstMatch(/PlayStation 4[/\\s](\\d+(\\.\\d+)*)/i, ua);\n return {\n name: OS_MAP.PlayStation4,\n version,\n };\n },\n },\n];\n","import Utils from './utils.js';\nimport { PLATFORMS_MAP } from './constants.js';\n\n/*\n * Tablets go first since usually they have more specific\n * signs to detect.\n */\n\nexport default [\n /* Googlebot */\n {\n test: [/googlebot/i],\n describe() {\n return {\n type: 'bot',\n vendor: 'Google',\n };\n },\n },\n\n /* Huawei */\n {\n test: [/huawei/i],\n describe(ua) {\n const model = Utils.getFirstMatch(/(can-l01)/i, ua) && 'Nova';\n const platform = {\n type: PLATFORMS_MAP.mobile,\n vendor: 'Huawei',\n };\n if (model) {\n platform.model = model;\n }\n return platform;\n },\n },\n\n /* Nexus Tablet */\n {\n test: [/nexus\\s*(?:7|8|9|10).*/i],\n describe() {\n return {\n type: PLATFORMS_MAP.tablet,\n vendor: 'Nexus',\n };\n },\n },\n\n /* iPad */\n {\n test: [/ipad/i],\n describe() {\n return {\n type: PLATFORMS_MAP.tablet,\n vendor: 'Apple',\n model: 'iPad',\n };\n },\n },\n\n /* Firefox on iPad */\n {\n test: [/Macintosh(.*?) FxiOS(.*?)\\//],\n describe() {\n return {\n type: PLATFORMS_MAP.tablet,\n vendor: 'Apple',\n model: 'iPad',\n };\n },\n },\n\n /* Amazon Kindle Fire */\n {\n test: [/kftt build/i],\n describe() {\n return {\n type: PLATFORMS_MAP.tablet,\n vendor: 'Amazon',\n model: 'Kindle Fire HD 7',\n };\n },\n },\n\n /* Another Amazon Tablet with Silk */\n {\n test: [/silk/i],\n describe() {\n return {\n type: PLATFORMS_MAP.tablet,\n vendor: 'Amazon',\n };\n },\n },\n\n /* Tablet */\n {\n test: [/tablet(?! pc)/i],\n describe() {\n return {\n type: PLATFORMS_MAP.tablet,\n };\n },\n },\n\n /* iPod/iPhone */\n {\n test(parser) {\n const iDevice = parser.test(/ipod|iphone/i);\n const likeIDevice = parser.test(/like (ipod|iphone)/i);\n return iDevice && !likeIDevice;\n },\n describe(ua) {\n const model = Utils.getFirstMatch(/(ipod|iphone)/i, ua);\n return {\n type: PLATFORMS_MAP.mobile,\n vendor: 'Apple',\n model,\n };\n },\n },\n\n /* Nexus Mobile */\n {\n test: [/nexus\\s*[0-6].*/i, /galaxy nexus/i],\n describe() {\n return {\n type: PLATFORMS_MAP.mobile,\n vendor: 'Nexus',\n };\n },\n },\n\n /* Mobile */\n {\n test: [/[^-]mobi/i],\n describe() {\n return {\n type: PLATFORMS_MAP.mobile,\n };\n },\n },\n\n /* BlackBerry */\n {\n test(parser) {\n return parser.getBrowserName(true) === 'blackberry';\n },\n describe() {\n return {\n type: PLATFORMS_MAP.mobile,\n vendor: 'BlackBerry',\n };\n },\n },\n\n /* Bada */\n {\n test(parser) {\n return parser.getBrowserName(true) === 'bada';\n },\n describe() {\n return {\n type: PLATFORMS_MAP.mobile,\n };\n },\n },\n\n /* Windows Phone */\n {\n test(parser) {\n return parser.getBrowserName() === 'windows phone';\n },\n describe() {\n return {\n type: PLATFORMS_MAP.mobile,\n vendor: 'Microsoft',\n };\n },\n },\n\n /* Android Tablet */\n {\n test(parser) {\n const osMajorVersion = Number(String(parser.getOSVersion()).split('.')[0]);\n return parser.getOSName(true) === 'android' && (osMajorVersion >= 3);\n },\n describe() {\n return {\n type: PLATFORMS_MAP.tablet,\n };\n },\n },\n\n /* Android Mobile */\n {\n test(parser) {\n return parser.getOSName(true) === 'android';\n },\n describe() {\n return {\n type: PLATFORMS_MAP.mobile,\n };\n },\n },\n\n /* desktop */\n {\n test(parser) {\n return parser.getOSName(true) === 'macos';\n },\n describe() {\n return {\n type: PLATFORMS_MAP.desktop,\n vendor: 'Apple',\n };\n },\n },\n\n /* Windows */\n {\n test(parser) {\n return parser.getOSName(true) === 'windows';\n },\n describe() {\n return {\n type: PLATFORMS_MAP.desktop,\n };\n },\n },\n\n /* Linux */\n {\n test(parser) {\n return parser.getOSName(true) === 'linux';\n },\n describe() {\n return {\n type: PLATFORMS_MAP.desktop,\n };\n },\n },\n\n /* PlayStation 4 */\n {\n test(parser) {\n return parser.getOSName(true) === 'playstation 4';\n },\n describe() {\n return {\n type: PLATFORMS_MAP.tv,\n };\n },\n },\n\n /* Roku */\n {\n test(parser) {\n return parser.getOSName(true) === 'roku';\n },\n describe() {\n return {\n type: PLATFORMS_MAP.tv,\n };\n },\n },\n];\n","import Utils from './utils.js';\nimport { ENGINE_MAP } from './constants.js';\n\n/*\n * More specific goes first\n */\nexport default [\n /* EdgeHTML */\n {\n test(parser) {\n return parser.getBrowserName(true) === 'microsoft edge';\n },\n describe(ua) {\n const isBlinkBased = /\\sedg\\//i.test(ua);\n\n // return blink if it's blink-based one\n if (isBlinkBased) {\n return {\n name: ENGINE_MAP.Blink,\n };\n }\n\n // otherwise match the version and return EdgeHTML\n const version = Utils.getFirstMatch(/edge\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n return {\n name: ENGINE_MAP.EdgeHTML,\n version,\n };\n },\n },\n\n /* Trident */\n {\n test: [/trident/i],\n describe(ua) {\n const engine = {\n name: ENGINE_MAP.Trident,\n };\n\n const version = Utils.getFirstMatch(/trident\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n engine.version = version;\n }\n\n return engine;\n },\n },\n\n /* Presto */\n {\n test(parser) {\n return parser.test(/presto/i);\n },\n describe(ua) {\n const engine = {\n name: ENGINE_MAP.Presto,\n };\n\n const version = Utils.getFirstMatch(/presto\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n engine.version = version;\n }\n\n return engine;\n },\n },\n\n /* Gecko */\n {\n test(parser) {\n const isGecko = parser.test(/gecko/i);\n const likeGecko = parser.test(/like gecko/i);\n return isGecko && !likeGecko;\n },\n describe(ua) {\n const engine = {\n name: ENGINE_MAP.Gecko,\n };\n\n const version = Utils.getFirstMatch(/gecko\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n engine.version = version;\n }\n\n return engine;\n },\n },\n\n /* Blink */\n {\n test: [/(apple)?webkit\\/537\\.36/i],\n describe() {\n return {\n name: ENGINE_MAP.Blink,\n };\n },\n },\n\n /* WebKit */\n {\n test: [/(apple)?webkit/i],\n describe(ua) {\n const engine = {\n name: ENGINE_MAP.WebKit,\n };\n\n const version = Utils.getFirstMatch(/webkit\\/(\\d+(\\.?_?\\d+)+)/i, ua);\n\n if (version) {\n engine.version = version;\n }\n\n return engine;\n },\n },\n];\n","import browserParsersList from './parser-browsers.js';\nimport osParsersList from './parser-os.js';\nimport platformParsersList from './parser-platforms.js';\nimport enginesParsersList from './parser-engines.js';\nimport Utils from './utils.js';\n\n/**\n * The main class that arranges the whole parsing process.\n */\nclass Parser {\n /**\n * Create instance of Parser\n *\n * @param {String} UA User-Agent string\n * @param {Boolean} [skipParsing=false] parser can skip parsing in purpose of performance\n * improvements if you need to make a more particular parsing\n * like {@link Parser#parseBrowser} or {@link Parser#parsePlatform}\n *\n * @throw {Error} in case of empty UA String\n *\n * @constructor\n */\n constructor(UA, skipParsing = false) {\n if (UA === void (0) || UA === null || UA === '') {\n throw new Error(\"UserAgent parameter can't be empty\");\n }\n\n this._ua = UA;\n\n /**\n * @typedef ParsedResult\n * @property {Object} browser\n * @property {String|undefined} [browser.name]\n * Browser name, like `\"Chrome\"` or `\"Internet Explorer\"`\n * @property {String|undefined} [browser.version] Browser version as a String `\"12.01.45334.10\"`\n * @property {Object} os\n * @property {String|undefined} [os.name] OS name, like `\"Windows\"` or `\"macOS\"`\n * @property {String|undefined} [os.version] OS version, like `\"NT 5.1\"` or `\"10.11.1\"`\n * @property {String|undefined} [os.versionName] OS name, like `\"XP\"` or `\"High Sierra\"`\n * @property {Object} platform\n * @property {String|undefined} [platform.type]\n * platform type, can be either `\"desktop\"`, `\"tablet\"` or `\"mobile\"`\n * @property {String|undefined} [platform.vendor] Vendor of the device,\n * like `\"Apple\"` or `\"Samsung\"`\n * @property {String|undefined} [platform.model] Device model,\n * like `\"iPhone\"` or `\"Kindle Fire HD 7\"`\n * @property {Object} engine\n * @property {String|undefined} [engine.name]\n * Can be any of this: `WebKit`, `Blink`, `Gecko`, `Trident`, `Presto`, `EdgeHTML`\n * @property {String|undefined} [engine.version] String version of the engine\n */\n this.parsedResult = {};\n\n if (skipParsing !== true) {\n this.parse();\n }\n }\n\n /**\n * Get UserAgent string of current Parser instance\n * @return {String} User-Agent String of the current object\n *\n * @public\n */\n getUA() {\n return this._ua;\n }\n\n /**\n * Test a UA string for a regexp\n * @param {RegExp} regex\n * @return {Boolean}\n */\n test(regex) {\n return regex.test(this._ua);\n }\n\n /**\n * Get parsed browser object\n * @return {Object}\n */\n parseBrowser() {\n this.parsedResult.browser = {};\n\n const browserDescriptor = Utils.find(browserParsersList, (_browser) => {\n if (typeof _browser.test === 'function') {\n return _browser.test(this);\n }\n\n if (_browser.test instanceof Array) {\n return _browser.test.some(condition => this.test(condition));\n }\n\n throw new Error(\"Browser's test function is not valid\");\n });\n\n if (browserDescriptor) {\n this.parsedResult.browser = browserDescriptor.describe(this.getUA());\n }\n\n return this.parsedResult.browser;\n }\n\n /**\n * Get parsed browser object\n * @return {Object}\n *\n * @public\n */\n getBrowser() {\n if (this.parsedResult.browser) {\n return this.parsedResult.browser;\n }\n\n return this.parseBrowser();\n }\n\n /**\n * Get browser's name\n * @return {String} Browser's name or an empty string\n *\n * @public\n */\n getBrowserName(toLowerCase) {\n if (toLowerCase) {\n return String(this.getBrowser().name).toLowerCase() || '';\n }\n return this.getBrowser().name || '';\n }\n\n\n /**\n * Get browser's version\n * @return {String} version of browser\n *\n * @public\n */\n getBrowserVersion() {\n return this.getBrowser().version;\n }\n\n /**\n * Get OS\n * @return {Object}\n *\n * @example\n * this.getOS();\n * {\n * name: 'macOS',\n * version: '10.11.12'\n * }\n */\n getOS() {\n if (this.parsedResult.os) {\n return this.parsedResult.os;\n }\n\n return this.parseOS();\n }\n\n /**\n * Parse OS and save it to this.parsedResult.os\n * @return {*|{}}\n */\n parseOS() {\n this.parsedResult.os = {};\n\n const os = Utils.find(osParsersList, (_os) => {\n if (typeof _os.test === 'function') {\n return _os.test(this);\n }\n\n if (_os.test instanceof Array) {\n return _os.test.some(condition => this.test(condition));\n }\n\n throw new Error(\"Browser's test function is not valid\");\n });\n\n if (os) {\n this.parsedResult.os = os.describe(this.getUA());\n }\n\n return this.parsedResult.os;\n }\n\n /**\n * Get OS name\n * @param {Boolean} [toLowerCase] return lower-cased value\n * @return {String} name of the OS — macOS, Windows, Linux, etc.\n */\n getOSName(toLowerCase) {\n const { name } = this.getOS();\n\n if (toLowerCase) {\n return String(name).toLowerCase() || '';\n }\n\n return name || '';\n }\n\n /**\n * Get OS version\n * @return {String} full version with dots ('10.11.12', '5.6', etc)\n */\n getOSVersion() {\n return this.getOS().version;\n }\n\n /**\n * Get parsed platform\n * @return {{}}\n */\n getPlatform() {\n if (this.parsedResult.platform) {\n return this.parsedResult.platform;\n }\n\n return this.parsePlatform();\n }\n\n /**\n * Get platform name\n * @param {Boolean} [toLowerCase=false]\n * @return {*}\n */\n getPlatformType(toLowerCase = false) {\n const { type } = this.getPlatform();\n\n if (toLowerCase) {\n return String(type).toLowerCase() || '';\n }\n\n return type || '';\n }\n\n /**\n * Get parsed platform\n * @return {{}}\n */\n parsePlatform() {\n this.parsedResult.platform = {};\n\n const platform = Utils.find(platformParsersList, (_platform) => {\n if (typeof _platform.test === 'function') {\n return _platform.test(this);\n }\n\n if (_platform.test instanceof Array) {\n return _platform.test.some(condition => this.test(condition));\n }\n\n throw new Error(\"Browser's test function is not valid\");\n });\n\n if (platform) {\n this.parsedResult.platform = platform.describe(this.getUA());\n }\n\n return this.parsedResult.platform;\n }\n\n /**\n * Get parsed engine\n * @return {{}}\n */\n getEngine() {\n if (this.parsedResult.engine) {\n return this.parsedResult.engine;\n }\n\n return this.parseEngine();\n }\n\n /**\n * Get engines's name\n * @return {String} Engines's name or an empty string\n *\n * @public\n */\n getEngineName(toLowerCase) {\n if (toLowerCase) {\n return String(this.getEngine().name).toLowerCase() || '';\n }\n return this.getEngine().name || '';\n }\n\n /**\n * Get parsed platform\n * @return {{}}\n */\n parseEngine() {\n this.parsedResult.engine = {};\n\n const engine = Utils.find(enginesParsersList, (_engine) => {\n if (typeof _engine.test === 'function') {\n return _engine.test(this);\n }\n\n if (_engine.test instanceof Array) {\n return _engine.test.some(condition => this.test(condition));\n }\n\n throw new Error(\"Browser's test function is not valid\");\n });\n\n if (engine) {\n this.parsedResult.engine = engine.describe(this.getUA());\n }\n\n return this.parsedResult.engine;\n }\n\n /**\n * Parse full information about the browser\n * @returns {Parser}\n */\n parse() {\n this.parseBrowser();\n this.parseOS();\n this.parsePlatform();\n this.parseEngine();\n\n return this;\n }\n\n /**\n * Get parsed result\n * @return {ParsedResult}\n */\n getResult() {\n return Utils.assign({}, this.parsedResult);\n }\n\n /**\n * Check if parsed browser matches certain conditions\n *\n * @param {Object} checkTree It's one or two layered object,\n * which can include a platform or an OS on the first layer\n * and should have browsers specs on the bottom-laying layer\n *\n * @returns {Boolean|undefined} Whether the browser satisfies the set conditions or not.\n * Returns `undefined` when the browser is no described in the checkTree object.\n *\n * @example\n * const browser = Bowser.getParser(window.navigator.userAgent);\n * if (browser.satisfies({chrome: '>118.01.1322' }))\n * // or with os\n * if (browser.satisfies({windows: { chrome: '>118.01.1322' } }))\n * // or with platforms\n * if (browser.satisfies({desktop: { chrome: '>118.01.1322' } }))\n */\n satisfies(checkTree) {\n const platformsAndOSes = {};\n let platformsAndOSCounter = 0;\n const browsers = {};\n let browsersCounter = 0;\n\n const allDefinitions = Object.keys(checkTree);\n\n allDefinitions.forEach((key) => {\n const currentDefinition = checkTree[key];\n if (typeof currentDefinition === 'string') {\n browsers[key] = currentDefinition;\n browsersCounter += 1;\n } else if (typeof currentDefinition === 'object') {\n platformsAndOSes[key] = currentDefinition;\n platformsAndOSCounter += 1;\n }\n });\n\n if (platformsAndOSCounter > 0) {\n const platformsAndOSNames = Object.keys(platformsAndOSes);\n const OSMatchingDefinition = Utils.find(platformsAndOSNames, name => (this.isOS(name)));\n\n if (OSMatchingDefinition) {\n const osResult = this.satisfies(platformsAndOSes[OSMatchingDefinition]);\n\n if (osResult !== void 0) {\n return osResult;\n }\n }\n\n const platformMatchingDefinition = Utils.find(\n platformsAndOSNames,\n name => (this.isPlatform(name)),\n );\n if (platformMatchingDefinition) {\n const platformResult = this.satisfies(platformsAndOSes[platformMatchingDefinition]);\n\n if (platformResult !== void 0) {\n return platformResult;\n }\n }\n }\n\n if (browsersCounter > 0) {\n const browserNames = Object.keys(browsers);\n const matchingDefinition = Utils.find(browserNames, name => (this.isBrowser(name, true)));\n\n if (matchingDefinition !== void 0) {\n return this.compareVersion(browsers[matchingDefinition]);\n }\n }\n\n return undefined;\n }\n\n /**\n * Check if the browser name equals the passed string\n * @param browserName The string to compare with the browser name\n * @param [includingAlias=false] The flag showing whether alias will be included into comparison\n * @returns {boolean}\n */\n isBrowser(browserName, includingAlias = false) {\n const defaultBrowserName = this.getBrowserName().toLowerCase();\n let browserNameLower = browserName.toLowerCase();\n const alias = Utils.getBrowserTypeByAlias(browserNameLower);\n\n if (includingAlias && alias) {\n browserNameLower = alias.toLowerCase();\n }\n return browserNameLower === defaultBrowserName;\n }\n\n compareVersion(version) {\n let expectedResults = [0];\n let comparableVersion = version;\n let isLoose = false;\n\n const currentBrowserVersion = this.getBrowserVersion();\n\n if (typeof currentBrowserVersion !== 'string') {\n return void 0;\n }\n\n if (version[0] === '>' || version[0] === '<') {\n comparableVersion = version.substr(1);\n if (version[1] === '=') {\n isLoose = true;\n comparableVersion = version.substr(2);\n } else {\n expectedResults = [];\n }\n if (version[0] === '>') {\n expectedResults.push(1);\n } else {\n expectedResults.push(-1);\n }\n } else if (version[0] === '=') {\n comparableVersion = version.substr(1);\n } else if (version[0] === '~') {\n isLoose = true;\n comparableVersion = version.substr(1);\n }\n\n return expectedResults.indexOf(\n Utils.compareVersions(currentBrowserVersion, comparableVersion, isLoose),\n ) > -1;\n }\n\n isOS(osName) {\n return this.getOSName(true) === String(osName).toLowerCase();\n }\n\n isPlatform(platformType) {\n return this.getPlatformType(true) === String(platformType).toLowerCase();\n }\n\n isEngine(engineName) {\n return this.getEngineName(true) === String(engineName).toLowerCase();\n }\n\n /**\n * Is anything? Check if the browser is called \"anything\",\n * the OS called \"anything\" or the platform called \"anything\"\n * @param {String} anything\n * @param [includingAlias=false] The flag showing whether alias will be included into comparison\n * @returns {Boolean}\n */\n is(anything, includingAlias = false) {\n return this.isBrowser(anything, includingAlias) || this.isOS(anything)\n || this.isPlatform(anything);\n }\n\n /**\n * Check if any of the given values satisfies this.is(anything)\n * @param {String[]} anythings\n * @returns {Boolean}\n */\n some(anythings = []) {\n return anythings.some(anything => this.is(anything));\n }\n}\n\nexport default Parser;\n","/*!\n * Bowser - a browser detector\n * https://github.com/lancedikson/bowser\n * MIT License | (c) Dustin Diaz 2012-2015\n * MIT License | (c) Denis Demchenko 2015-2019\n */\nimport Parser from './parser.js';\nimport {\n BROWSER_MAP,\n ENGINE_MAP,\n OS_MAP,\n PLATFORMS_MAP,\n} from './constants.js';\n\n/**\n * Bowser class.\n * Keep it simple as much as it can be.\n * It's supposed to work with collections of {@link Parser} instances\n * rather then solve one-instance problems.\n * All the one-instance stuff is located in Parser class.\n *\n * @class\n * @classdesc Bowser is a static object, that provides an API to the Parsers\n * @hideconstructor\n */\nclass Bowser {\n /**\n * Creates a {@link Parser} instance\n *\n * @param {String} UA UserAgent string\n * @param {Boolean} [skipParsing=false] Will make the Parser postpone parsing until you ask it\n * explicitly. Same as `skipParsing` for {@link Parser}.\n * @returns {Parser}\n * @throws {Error} when UA is not a String\n *\n * @example\n * const parser = Bowser.getParser(window.navigator.userAgent);\n * const result = parser.getResult();\n */\n static getParser(UA, skipParsing = false) {\n if (typeof UA !== 'string') {\n throw new Error('UserAgent should be a string');\n }\n return new Parser(UA, skipParsing);\n }\n\n /**\n * Creates a {@link Parser} instance and runs {@link Parser.getResult} immediately\n *\n * @param UA\n * @return {ParsedResult}\n *\n * @example\n * const result = Bowser.parse(window.navigator.userAgent);\n */\n static parse(UA) {\n return (new Parser(UA)).getResult();\n }\n\n static get BROWSER_MAP() {\n return BROWSER_MAP;\n }\n\n static get ENGINE_MAP() {\n return ENGINE_MAP;\n }\n\n static get OS_MAP() {\n return OS_MAP;\n }\n\n static get PLATFORMS_MAP() {\n return PLATFORMS_MAP;\n }\n}\n\nexport default Bowser;\n","/** @deprecated Skapa has a boolean called \"small\". Use this to set \"medium\" or \"small\" size for buttons. */\nvar ButtonSizeEnum;\n(function (ButtonSizeEnum) {\n ButtonSizeEnum[\"small\"] = \"small\";\n ButtonSizeEnum[\"medium\"] = \"medium\";\n})(ButtonSizeEnum || (ButtonSizeEnum = {}));\nexport default ButtonSizeEnum;\n//# sourceMappingURL=ButtonSizeEnum.js.map","var IconButtonSizeEnum;\n(function (IconButtonSizeEnum) {\n IconButtonSizeEnum[\"xsmall\"] = \"xsmall\";\n IconButtonSizeEnum[\"small\"] = \"small\";\n IconButtonSizeEnum[\"medium\"] = \"medium\";\n})(IconButtonSizeEnum || (IconButtonSizeEnum = {}));\nexport default IconButtonSizeEnum;\n//# sourceMappingURL=IconButtonSizeEnum.js.map","import { IColor4 } from '@inter-ikea-betrakta/viewer';\nimport { ButtonSizeEnum } from '@inter-ikea-kompis/component-button';\nimport { IconButtonSizeEnum } from '@inter-ikea-kompis/component-icon-button';\nimport { SkapaTheme } from '@inter-ikea-kompis/themes/lib';\nimport { IShoppingProduct } from '@inter-ikea-kompis/types';\nimport { IUnitValues } from 'i18n/parse';\nimport { AppRoutesEnum } from 'routes';\nimport { getTheme } from 'utils/getTheme';\n\nexport const IKEA_GLOBAL_HOME = 'https://www.ikea.com/';\n\nexport const QUERY_PARAMS = {\n COMPUTER_ID: 'computerId',\n KIOSK_ID: 'kioskId',\n STORE_ID: 'storeId',\n FORCE_VARIATION: 'forceVariation',\n DESIGN_CODE: 'designCode',\n UI_PLATFORM: 'uiPlatform',\n IPEX_GALLERY: 'ipexGallery',\n IDLE_TIME: 'idleTime',\n VPC_SOURCE: 'vpcSource',\n LOCALE: 'locale',\n LIGHTHOUSE: 'lighthouse',\n VERBOSE_SENTRY: 'verboseSentry',\n UNSAFE: 'unsafe',\n FUTURE_TOKEN: 'futureToken',\n FUTURE_DATE: 'futureDate',\n STORAGE_DESIGN_CODE: 'storageDesignCode',\n TEST_LOCALE: 'testLocale',\n ENABLE_VIRTUAL_KEYBOARD: 'enableVirtualKeyboard',\n FORCE_RTL: 'forceRtl',\n FORCE_PRODUCTION: 'forceProduction',\n ORIGIN: 'origin'\n};\n\nexport const PLATFORMS = {\n WEB: 'web',\n KIOSK: 'kiosk'\n};\n\n/**\n * Don't forget to add the VPC to the sprs in the dexf application service.\n * We need this map to handle SPR redirects when a user enters from a page with a SPR ID,\n * DEXF application service is not initiated at that time.\n */\nenum SprCodesEnum {\n S09422736 = 'QL4FGJ',\n S09422741 = 'TGJNPG',\n S09477917 = 'QTCFL9',\n S09575847 = 'QTJ396',\n S09575908 = 'QTJ6N3',\n S09575913 = 'QTJ4GN',\n S19424042 = 'QL4GFV',\n S19499570 = 'QTHZKD',\n S19575861 = 'QTC22S',\n S69575905 = 'QTCDZQ',\n S19575903 = 'SG796P',\n S19575917 = 'QL4FVM',\n S29422735 = 'QTCBJ9',\n S29422740 = 'QTCDKJ',\n S29424051 = 'TGBNF8',\n S29499584 = 'RMMKPY',\n S29575851 = 'QTJ6C9',\n S29575926 = 'QTJ56M',\n S29575931 = 'QTJ73D',\n S39424041 = 'QTCB7K',\n S39499574 = 'QTJ22P',\n S39575855 = 'QTBZLP',\n S39575916 = 'QL4G4M',\n S49424050 = 'TGJNZW',\n S49575906 = 'QTJ6SC',\n S49575911 = 'QTJ45F',\n S59422734 = 'QTC9CZ',\n S59575859 = 'QTC2FQ',\n S69422738 = 'RMMKLB',\n S69422743 = 'QL4GKG',\n S69424049 = 'QTCDBB',\n S69477919 = 'QTCFZB',\n S69499582 = 'RMMKRS',\n S69575849 = 'QTJ2YN',\n S79575924 = 'QTJ5NK',\n S89424048 = 'QL4FBP',\n S89499576 = 'QTHZW5',\n S89575853 = 'QTJ65Q',\n S89575928 = 'QTJ7D8',\n S99499571 = 'QTHZ7D',\n S99575857 = 'QL4GZ4',\n S19575922 = 'TGBNPS',\n S39575921 = 'TGJP8R',\n S39575935 = 'SG77YK',\n S69575934 = 'SG78BD'\n}\n\nexport const SprCodes: IStringMap = SprCodesEnum;\n\nexport type IStringMap = Record;\n\nexport type INumberMap = Record;\n\nexport type IElementMap = Record;\n\nexport type IUnitValuesMap = Record;\n\nexport type IUnknownMap = Record;\n\nexport type IShoppingProductsMap = Record;\n\nexport type ISceneColors = Record;\n\nexport type IStorageBehindMaterials = Record<\n string,\n {\n parent: number;\n default: number;\n }\n>;\n\nexport type IVisibleProducts = Record;\n\nexport const LOCAL_STORAGE_PREFIX = 'SKYTTA__';\nexport const LOCAL_STORAGE_CORE_CONFIG = `${LOCAL_STORAGE_PREFIX}CORE_CONFIG`;\nexport const SCREENSHOT_ERROR_MESSAGE = 'Failed to capture screenshot';\nexport const SPR_REGEX = /(?:#S)?(\\d{8})(?=[&?]|$)/; // Matches format #S29422740\nexport const VPC_REGEX = /#([A-Z0-9]{6,})/; // Matches format #7TQYYV\n\nexport enum InsightsEventsEnum {\n ArrivedWithSpr = 'arrived_with_spr',\n PanelPatternsOpened = 'open_pattern_section',\n StoragebehindOpened = 'storage_behind_sheet_opened'\n}\n\nexport const CORE_TO_VIEWER_SCALE = 1000;\nexport const MM_PER_CM = 10;\nexport const PANELS_PER_DOOR_FRAME = 4;\n\nexport enum SheetEnum {\n HamburgerMenu = 'hamburgerMenu',\n OpenGuide = 'openGuide',\n OpenDesign = 'openDesign',\n ShareDesign = 'shareDesign',\n FAQ = 'faq',\n CustomizeSkytta = 'customizeSkytta',\n CuttingDoorsCta = 'cuttingDoorsCta',\n DistancePiecesCta = 'distancePiecesCta',\n WhatsIncluded = 'whatsIncluded',\n ProductDetails = 'productDetails',\n Help = 'help',\n BookAMeeting = 'BookAMeeting',\n StartFromScratch = 'startFromScratch',\n HomeDelivery = 'homeDelivery',\n StoreSelector = 'storeSelector',\n LanguageSelector = 'languageSelector',\n StorageBehind = 'storageBehind',\n StorageBehindGallery = 'storageBehindGallery',\n StorageBehindImported = 'storageBehindImported',\n UnusedPanels = 'unusedPanels',\n // CustomizeMenu sheets\n CustomizeMeasurements = 'customizeMeasurements',\n CustomizeDoorLayouts = 'customizeDoorLayouts',\n CustomizeFrames = 'customizeFrames',\n CustomizePanels = 'customizePanels',\n CustomizePanelPatterns = 'customizePanelsPatterns',\n CustomizeChr = 'customizeChr',\n CustomizeStopbars = 'customizeStopbars',\n CustomizeDoorHeights = 'customizeDoorHeights'\n}\n\nexport enum RangeFamilyEnum {\n Panels = 'sliding_door_panels',\n Skytta = 'skytta'\n}\n\nexport enum AreaEnum {\n MainNavigation = 'mainNavigation',\n Faq = 'faq'\n}\n\nexport enum SheetSectionsEnum {\n Content = 'content',\n Footer = 'footer'\n}\n\nexport enum NavigationSectionsEnum {\n Measurements = 'measurements',\n DoorLayouts = 'doorLayouts',\n DoorHeights = 'doorHeights',\n Frames = 'frames',\n Panels = 'panels',\n Patterns = 'patterns',\n Chr = 'chr',\n StopBars = 'stopBars',\n StorageBehind = 'storageBehind',\n StorageBehindGallery = 'storageBehindGallery',\n StorageBehindImported = 'storageBehindImported'\n}\n\nexport enum AppStateEnum {\n Initial = 'initial',\n /**\n * When app has loaded product data and localized information\n */\n Ready = 'ready',\n ErrorPage = 'errorPage'\n}\n\nexport const defaultViewerCalculations = {\n /**\n * Values in X,Y,Z\n */\n positionXYZ: {\n x: 0,\n y: 1.6,\n z: 12\n },\n /**\n * Values in X,Y,Z\n */\n targetXYZ: {\n x: 0,\n y: 1.2,\n z: 2.5\n },\n /**\n * Min distance and max distance\n */\n limitsMinMax: { min: 8, max: 30 },\n preIntroAnimationX: 3,\n\n /**\n * field of view\n */\n fieldOfView: 20\n};\n\n/**\n * Sizes\n */\n\nexport const mobileNavigationBarHeight = 87;\n\nconst theme = getTheme(SkapaTheme);\nconst largestSkapaBreakpoint = theme.breakpoint.xxlarge.width;\n\nconst getBreakpoint = () => {\n const currentWidth = window.innerWidth;\n\n const breakpoint = Object.values(theme.breakpoint).reduce((previousValue, currentValue) => {\n return Math.abs(currentValue.width - currentWidth) <\n Math.abs(previousValue.width - currentWidth)\n ? currentValue\n : previousValue;\n });\n\n return breakpoint;\n};\n\nconst isLargestBreakpoint = getBreakpoint().width === largestSkapaBreakpoint;\n\nconst selectButtonSize = isLargestBreakpoint ? ButtonSizeEnum.medium : ButtonSizeEnum.small;\n\nexport const shouldUseSmallButtonSize = selectButtonSize === ButtonSizeEnum.small;\n\nconst selectIconButtonSize = isLargestBreakpoint\n ? IconButtonSizeEnum.medium\n : IconButtonSizeEnum.small;\n\nexport const shouldUseSmallIconButtons = selectIconButtonSize === IconButtonSizeEnum.small;\n\nexport const selectGutterSize = getBreakpoint().gridSpacing.gutter;\n\nexport const constantOuterMargin = selectGutterSize * 2;\n\nexport const selectGutterHalfSize = selectGutterSize * 0.5;\n\n// Based on summaryPage\nexport const constantMaxWidth = '100rem';\n\nexport const constantCustomizeMenuWidth = '30rem';\n\nexport interface IMobile {\n $isMobile: boolean;\n $height?: number;\n}\n\nexport interface IRtl {\n $isRtl: boolean;\n}\n\nexport const validateUrl = (link: string) => {\n if (!link) {\n return false;\n }\n\n const https = 'https://';\n\n const httpsLink = link.startsWith(https) ? link : `${https}${link}`;\n\n try {\n return new URL(httpsLink);\n } catch {\n return false;\n }\n};\n\nexport const VIEWER_DEFAULT_ALPHA_INDEX = 10000;\n\nexport const NR_OF_SUGGESTIONS_TO_SHOW_BEFORE_SHOW_MORE = 4;\n\n/**\n * Some stores doesn't have a way to write, so sharing will be disabled.\n */\nexport const disabledStoresForSharing = ['705'];\n\nexport enum CriticalCatalogsEnum {\n paxPanels = 'pax-panels',\n skytta = 'skytta'\n}\n\n/**\n * Sentry Tags\n */\nexport enum SentryTags {\n appState = 'appState',\n orientation = 'orientation',\n screenResolution = 'screenResolution',\n screenHeightPixels = 'screenHeightPixels',\n screenWidthPixels = 'screenWidthPixels',\n browserTheme = 'browserTheme',\n insightsConnected = 'insightsConnected',\n isUpptacka = 'isUpptacka',\n isIpexGallery = 'isIpexGallery',\n webpSupport = 'webpSupport',\n coreVersion = 'coreVersion',\n betraktaVersion = 'betraktaVersion',\n kompisVersion = 'kompisVersion',\n insightsVersion = 'insightsVersion',\n abTest = 'abTest',\n abVariation = 'abVariation',\n verboseSentry = 'verboseSentry',\n deviceType = 'deviceType',\n webglContext = 'webglContext',\n insightsIpexId = 'insightsIpexId',\n insightsLongTermId = 'insightsLongTermId',\n insightsSessionId = 'insightsSessionId'\n}\n\nexport enum WebGLContext {\n Lost = 'Lost',\n Restored = 'Restored',\n CreationError = 'CreationError',\n Normal = 'Normal',\n None = 'None'\n}\n\n/**\n * Screenshot directions\n */\nexport enum ScreenshotDirectionsEnum {\n Front = 'front',\n Left = 'left',\n Right = 'right',\n Behind = 'behind'\n}\n\nexport const getDataIdByPathname = (pathname: AppRoutesEnum) => {\n return pathname.split('/').slice(-1).pop();\n};\n\nexport const icfVersion = '1.2';\n\nexport enum NavigationOriginEnum {\n Scene = 'scene',\n CustomizeMenu = 'customizeMenu'\n}\n","const useQuery = (param: string) => {\n return new URLSearchParams(window.location.search).get(param);\n};\n\nexport default useQuery;\n","import { DexfSettingsFilterSegmentEnum } from '@inter-ikea-kompis/enums';\nimport Bowser from 'bowser';\nimport { PLATFORMS, QUERY_PARAMS } from './constants';\nimport useQuery from './useQuery';\n\nexport enum EnvironmentEnum {\n PRODUCTION = 'PRODUCTION',\n STAGE = 'STAGE',\n LOCAL = 'LOCAL'\n}\n\nexport type UserAgent = {\n orientation: OrientationTypeEnum;\n deviceType: DeviceTypeEnum;\n};\n\ntype Mobile = {\n isMobile: boolean;\n};\n\nexport type UserAgentWithMobile = UserAgent & Mobile;\n\n// derived from Bowser#PLATFORMS_MAP\nexport enum DeviceTypeEnum {\n Desktop = 'desktop',\n Mobile = 'mobile',\n Tablet = 'tablet',\n Tv = 'tv'\n}\n\nexport enum OrientationTypeEnum {\n Landscape = 'landscape',\n Portrait = 'portrait'\n}\n\nexport const getEnvironment = () => {\n return import.meta.env.VITE_ENVIRONMENT || EnvironmentEnum.LOCAL;\n};\n\nexport const isLocalEnvironment = (): boolean => {\n return getEnvironment() === EnvironmentEnum.LOCAL;\n};\n\nexport const isProduction = (): boolean => {\n return getEnvironment() === EnvironmentEnum.PRODUCTION;\n};\n\nconst isCteEnv = (): boolean => {\n return getEnvironment() === EnvironmentEnum.STAGE;\n};\n\nexport const getDexfSegment = (): DexfSettingsFilterSegmentEnum => {\n const environment = getEnvironment();\n\n switch (environment) {\n case EnvironmentEnum.PRODUCTION: {\n return DexfSettingsFilterSegmentEnum.production;\n }\n case EnvironmentEnum.STAGE: {\n return DexfSettingsFilterSegmentEnum.verification;\n }\n default: {\n return DexfSettingsFilterSegmentEnum.development;\n }\n }\n};\n\nexport const getAppName = (): string => {\n return import.meta.env.VITE_NPM_PACKAGE_NAME || 'skytta';\n};\n\nexport const getAppVersion = (): string => {\n return import.meta.env.VITE_APP_VERSION || import.meta.env.VITE_NPM_PACKAGE_VERSION || '0.0.1';\n};\n\n/**\n * Usually used to disable things if tests is running, also redux isn't working well with unit tests so this check could solve that.\n */\nexport const isRunningTest = import.meta.env.VITEST_WORKER_ID !== undefined;\n\nexport const isE2eTest = (): boolean => {\n return !!window.Cypress || import.meta.env.CYPRESS;\n};\n\nexport const isE2eOrUnitTest = (): boolean => {\n return isE2eTest() || isRunningTest;\n};\n\nexport const getAddonAppPath = (): string => {\n return isProduction() || isCteEnv()\n ? `${window.location.origin}/addon-app`\n : 'https://www.ikea.com/addon-app';\n};\n\nexport const getNonVersionedAssetsPath = (): string => {\n return `${getAddonAppPath()}/skytta/assets`;\n};\n\nexport const isKiosk = (): boolean => {\n return useQuery(QUERY_PARAMS.UI_PLATFORM)?.toLocaleLowerCase() === PLATFORMS.KIOSK;\n};\n\nexport const isForcedProduction = (): boolean => {\n return useQuery(QUERY_PARAMS.FORCE_PRODUCTION) === 'true';\n};\n\nconst isTouchDevice = (): boolean => {\n return 'ontouchstart' in window || navigator.maxTouchPoints > 0;\n};\n\nexport const isUpptacka = (): boolean => {\n return useQuery(QUERY_PARAMS.ORIGIN)?.toLocaleLowerCase() === 'upptacka' && isKiosk();\n};\n\nexport const isIpexGallery = (): boolean => {\n return useQuery(QUERY_PARAMS.IPEX_GALLERY)?.toLocaleLowerCase() === 'true' && isKiosk();\n};\n\nexport const isIpexGalleryOrUpptacka = (): boolean => {\n return isIpexGallery() || isUpptacka();\n};\n\n/**\n * https://i-p-e-x.atlassian.net/wiki/spaces/KP/pages/36559355999/Planner+implementation\n * Upptäcka and IPEX Gallery can be implemented in the same way with the same utility. By selecting a different platform or letting the utility handle the state it self.\n *\n * Good to know\n * There is no need for a screensaver from the planner application\n * There is no need for a countdown banner from the planner application\n * There is no need for a virtual keyboard from the planner application\n */\nexport const useIdleKioskHandler = (): boolean => {\n return isKiosk() && !isIpexGalleryOrUpptacka();\n};\n\nexport const showLanguageSelector = (): boolean => {\n return isKiosk() && !isUpptacka();\n};\n\nexport const usesVirtualKeyboard = (): boolean => {\n return (\n useQuery(QUERY_PARAMS.ENABLE_VIRTUAL_KEYBOARD) === 'true' ||\n (isTouchDevice() && isKiosk() && !isUpptacka())\n );\n};\n\nexport const isLighthouse = () => {\n return useQuery(QUERY_PARAMS.LIGHTHOUSE)?.toLocaleLowerCase() === 'true';\n};\n\nexport const getIdleTime = (): number => {\n const idleTimeString = useQuery(QUERY_PARAMS.IDLE_TIME);\n if (idleTimeString !== null) {\n const idleTime = parseInt(idleTimeString, 10);\n return idleTime;\n }\n return 60;\n};\n\nexport const getDeviceType = (): DeviceTypeEnum => {\n return Bowser.getParser(window.navigator.userAgent).getPlatformType(true);\n};\n\nexport const isTablet = () => {\n return (\n getDeviceType() === DeviceTypeEnum.Tablet ||\n ['iPad Simulator', 'iPad'].includes(navigator?.platform) ||\n // iPad on iOS 13 detection\n (navigator.userAgent.includes('Mac') && 'ontouchend' in document)\n );\n};\n\nconst getOrientation = (): OrientationTypeEnum => {\n return window.innerWidth > window.innerHeight\n ? OrientationTypeEnum.Landscape\n : OrientationTypeEnum.Portrait;\n};\n\nexport const getUserAgent = () => {\n const orientation = getOrientation();\n const deviceType = getDeviceType();\n\n return { orientation, deviceType };\n};\n","import IMediaItem from '@inter-ikea-kompis/component-media-carousel/lib/types/IMediaItem';\nimport { IVpcConfiguration } from '@inter-ikea-kompis/types';\nimport { createSlice, current, PayloadAction } from '@reduxjs/toolkit';\nimport { ICFArticle } from 'ICF/interfaces';\nimport { ICatalog } from 'range/interface/catalog';\nimport { isShallowIdentical } from 'utils/isShallowIdentical';\nimport { StorageBehindApplicationsEnum } from 'utils/storageBehind';\n\nexport interface IPanelStyle {\n index: number;\n isFlipped: boolean;\n}\n\nexport interface IPanelPatternStyles {\n primaryPanelStyle: IPanelStyle;\n secondaryPanelStyle?: IPanelStyle;\n}\n\nexport interface IStorageBehindVpcConfiguration extends IVpcConfiguration {\n application: StorageBehindApplicationsEnum;\n icfArticles: ICFArticle[];\n}\nexport type Configuration = {\n showAppLoadingScreen: boolean;\n defaultPanelStyles: IPanelStyle[];\n selectedPanelStyles: IPanelStyle[][];\n selectedPanelPatternStyles: IPanelPatternStyles;\n selectedDoor?: number;\n storageBehindVisible: boolean;\n storageBehind: IStorageBehindVpcConfiguration | null;\n unsupportedStorageBehind: IStorageBehindVpcConfiguration | null;\n activeStorageBehindGallery: StorageBehindApplicationsEnum | null;\n skyttaCatalogData: ICatalog | null;\n paxPanelsCatalogData: ICatalog | null;\n showErrorPage: boolean;\n showLoadingSummaryButton: boolean;\n showSceneLoadingScreen: boolean;\n hasUnsavedChanges: boolean;\n screenshot: IMediaItem | null;\n arrivedFromQrCode: boolean;\n readyToSaveCoreState: boolean;\n sceneReady: boolean;\n};\n\nconst initialState: Configuration = {\n showAppLoadingScreen: true,\n defaultPanelStyles: [],\n selectedPanelStyles: [[{ index: 0, isFlipped: false }]],\n selectedPanelPatternStyles: { primaryPanelStyle: { index: 0, isFlipped: false } },\n selectedDoor: undefined,\n storageBehindVisible: false,\n storageBehind: null,\n unsupportedStorageBehind: null,\n activeStorageBehindGallery: null,\n skyttaCatalogData: null,\n paxPanelsCatalogData: null,\n showErrorPage: false,\n showLoadingSummaryButton: false,\n showSceneLoadingScreen: false,\n hasUnsavedChanges: false,\n screenshot: null,\n arrivedFromQrCode: false,\n readyToSaveCoreState: false,\n sceneReady: false\n};\n\nexport const { actions: configurationAction, reducer: configurationReducer } = createSlice({\n name: 'configuration',\n initialState,\n reducers: {\n setShowAppLoadingScreen: (\n state,\n { payload: showAppLoadingScreen }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).showAppLoadingScreen, showAppLoadingScreen)) {\n return;\n }\n\n return { ...state, showAppLoadingScreen };\n },\n setDefaultPanelStyles: (\n state,\n { payload: defaultPanelStyles }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).defaultPanelStyles, defaultPanelStyles)) {\n return;\n }\n\n return { ...state, defaultPanelStyles };\n },\n setSelectedPanelStyles: (\n state,\n { payload: selectedPanelStyles }: PayloadAction\n ) => {\n if (!selectedPanelStyles.length) {\n return;\n }\n\n if (isShallowIdentical(current(state).selectedPanelStyles, selectedPanelStyles)) {\n return;\n }\n\n return { ...state, selectedPanelStyles };\n },\n setSelectedPanelPatternStyles: (\n state,\n {\n payload: selectedPanelPatternStyles\n }: PayloadAction\n ) => {\n if (\n isShallowIdentical(current(state).selectedPanelPatternStyles, selectedPanelPatternStyles)\n ) {\n return;\n }\n\n return { ...state, selectedPanelPatternStyles };\n },\n setSelectedDoor: (\n state,\n { payload: selectedDoor }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).selectedDoor, selectedDoor)) {\n return;\n }\n\n return { ...state, selectedDoor };\n },\n setStorageBehindVisible: (\n state,\n { payload: storageBehindVisible }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).storageBehindVisible, storageBehindVisible)) {\n return;\n }\n\n return { ...state, storageBehindVisible };\n },\n setStorageBehind: (\n state,\n { payload: storageBehind }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).storageBehind, storageBehind)) {\n return;\n }\n\n return { ...state, storageBehind };\n },\n setUnsupportedStorageBehind: (\n state,\n {\n payload: unsupportedStorageBehind\n }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).unsupportedStorageBehind, unsupportedStorageBehind)) {\n return;\n }\n\n return { ...state, unsupportedStorageBehind };\n },\n setActiveStorageBehindGallery: (\n state,\n {\n payload: activeStorageBehindGallery\n }: PayloadAction\n ) => {\n if (\n isShallowIdentical(current(state).activeStorageBehindGallery, activeStorageBehindGallery)\n ) {\n return;\n }\n\n return { ...state, activeStorageBehindGallery };\n },\n setSkyttaCatalogData: (\n state,\n { payload: skyttaCatalogData }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).skyttaCatalogData, skyttaCatalogData)) {\n return;\n }\n\n return { ...state, skyttaCatalogData };\n },\n setPaxPanelsCatalogData: (\n state,\n { payload: paxPanelsCatalogData }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).paxPanelsCatalogData, paxPanelsCatalogData)) {\n return;\n }\n\n return { ...state, paxPanelsCatalogData };\n },\n setShowErrorPage: (\n state,\n { payload: showErrorPage }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).showErrorPage, showErrorPage)) {\n return;\n }\n\n return { ...state, showErrorPage };\n },\n setShowLoadingSummaryButton: (\n state,\n {\n payload: showLoadingSummaryButton\n }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).showLoadingSummaryButton, showLoadingSummaryButton)) {\n return;\n }\n\n return { ...state, showLoadingSummaryButton };\n },\n setShowLoadingSceneScreen: (\n state,\n { payload: showSceneLoadingScreen }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).showSceneLoadingScreen, showSceneLoadingScreen)) {\n return;\n }\n\n return { ...state, showSceneLoadingScreen };\n },\n setHasUnsavedChanges: (\n state,\n { payload: hasUnsavedChanges }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).hasUnsavedChanges, hasUnsavedChanges)) {\n return;\n }\n\n return { ...state, hasUnsavedChanges };\n },\n setScreenshot: (state, { payload: screenshot }: PayloadAction) => {\n if (isShallowIdentical(current(state).screenshot, screenshot)) {\n return;\n }\n\n return { ...state, screenshot };\n },\n setArrivedFromQrCode: (\n state,\n { payload: arrivedFromQrCode }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).arrivedFromQrCode, arrivedFromQrCode)) {\n return;\n }\n\n return { ...state, arrivedFromQrCode };\n },\n setReadyToSaveCoreState: (\n state,\n { payload: readyToSaveCoreState }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).readyToSaveCoreState, readyToSaveCoreState)) {\n return;\n }\n\n return { ...state, readyToSaveCoreState };\n },\n setSceneReady: (state, { payload: sceneReady }: PayloadAction) => {\n if (isShallowIdentical(current(state).sceneReady, sceneReady)) {\n return;\n }\n\n return { ...state, sceneReady };\n }\n }\n});\n","export const paths = [{ \"tag\": \"path\", \"att\": { \"fill-rule\": \"evenodd\", \"clip-rule\": \"evenodd\", \"d\": \"m20.0008 12.0001-8-8.001-1.4143 1.414L16.1727 11H4v2h12.1723l-5.5868 5.5866 1.4141 1.4142 8.0012-8.0007z\" } }];\nexport const iconName = 'arrow-right';\nexport const arrowRight = { iconName, paths };\nexport default paths;\n","export const paths = [{ \"tag\": \"path\", \"att\": { \"fill-rule\": \"evenodd\", \"clip-rule\": \"evenodd\", \"d\": \"m15.5996 12.0007-5.785 5.7857-1.4143-1.4141 4.3711-4.3716L8.4003 7.629l1.4143-1.4142 5.785 5.7859z\" } }];\nexport const iconName = 'chevron-right-small';\nexport const chevronRightSmall = { iconName, paths };\nexport default paths;\n","export const paths = [{ \"tag\": \"path\", \"att\": { \"fill-rule\": \"evenodd\", \"clip-rule\": \"evenodd\", \"d\": \"m16.415 12.0011-8.0012 8.0007-1.4141-1.4143 6.587-6.5866-6.586-6.5868L8.415 4l8 8.0011z\" } }];\nexport const iconName = 'chevron-right';\nexport const chevronRight = { iconName, paths };\nexport default paths;\n","export const paths = [{ \"tag\": \"path\", \"att\": { \"d\": \"M21 3H8v4h2V5h9v9h-2v2h4V3z\" } }, { \"tag\": \"path\", \"att\": { \"fill-rule\": \"evenodd\", \"clip-rule\": \"evenodd\", \"d\": \"M16 8H3v13h13V8zM5 19v-9h9v9H5z\" } }];\nexport const iconName = 'copy';\nexport const copy = { iconName, paths };\nexport default paths;\n","export const paths = [{ \"tag\": \"path\", \"att\": { \"fill-rule\": \"evenodd\", \"clip-rule\": \"evenodd\", \"d\": \"m2.1213 2.121 19.7989 19.7991-1.4141 1.4142-3.3345-3.3345H3.0002V5.8284L.7071 3.5353 2.1213 2.121zm13.0503 15.8788-2-2H6.5002l2.6685-4.0029-4.1685-4.1685v10.1714h10.1714z\" } }, { \"tag\": \"path\", \"att\": { \"d\": \"m6.8284 3.9998 2 2h10.1718v10.1718l2 2V3.9998H6.8284z\" } }, { \"tag\": \"path\", \"att\": { \"d\": \"M14.0002 9.4998c0 .8284.6716 1.5 1.5 1.5s1.5-.6716 1.5-1.5c0-.8285-.6716-1.5-1.5-1.5s-1.5.6715-1.5 1.5z\" } }];\nexport const iconName = 'image-strikethrough';\nexport const imageStrikethrough = { iconName, paths };\nexport default paths;\n","export const paths = [{ \"tag\": \"path\", \"att\": { \"d\": \"M15.5 11c-.8284 0-1.5-.6716-1.5-1.5S14.6716 8 15.5 8s1.5.6716 1.5 1.5-.6716 1.5-1.5 1.5zM13 15.25l-3-4.5L6.5 16h11L15 12.25l-2 3z\" } }, { \"tag\": \"path\", \"att\": { \"fill-rule\": \"evenodd\", \"clip-rule\": \"evenodd\", \"d\": \"M3 4v16h18V4H3zm2 14V6h14v12H5z\" } }];\nexport const iconName = 'image';\nexport const image = { iconName, paths };\nexport default paths;\n","export const paths = [{ \"tag\": \"path\", \"att\": { \"fill-rule\": \"evenodd\", \"clip-rule\": \"evenodd\", \"d\": \"M19.9989 4.9961v-1h-1l-4.9969.0001v2h2.5827l-5.296 5.2962 1.4143 1.4141 5.2959-5.2961v2.5887h2V4.996zM4.0019 19.9993v-16h8.0001v2H6.0019v12H18.002v-6h2v8H4.0019z\" } }];\nexport const iconName = 'link-out';\nexport const linkOut = { iconName, paths };\nexport default paths;\n","export const paths = [{ \"tag\": \"path\", \"att\": { \"fill-rule\": \"evenodd\", \"clip-rule\": \"evenodd\", \"d\": \"M12 5c-.8493 0-1.7028.251-2.3395.908-.6338.654-.9168 1.57-.9168 2.6245 0 .9997.2954 1.8874.9141 2.5308C10.2787 11.7089 11.1213 12 12 12c.8875 0 1.7272-.3034 2.3413-.9521.6103-.6446.9024-1.5286.9024-2.5154 0-.9858-.2911-1.8774-.8895-2.534C13.7489 5.3343 12.909 5 12 5zm-1.2563 3.5325c0-.7118.1876-1.062.353-1.2326C11.2593 7.132 11.534 7 12 7c.4064 0 .6883.1397.876.3457.1946.2135.3677.588.3677 1.1868 0 .5975-.172.9473-.3548 1.1404C12.71 9.8619 12.4278 10 12 10c-.4367 0-.7221-.1374-.9006-.323-.1806-.1878-.3557-.5339-.3557-1.1445z\" } }, { \"tag\": \"path\", \"att\": { \"d\": \"M8.29 16.0857c.1793-.3255.4365-.583.7979-.7794.3516-.1874.8273-.3063 1.4692-.3063h2.8858c.6419 0 1.1176.1189 1.4692.3063.3614.1964.6186.4539.7979.7794.1839.3339.29.7403.29 1.2476V18h2v-.6667c0-.797-.1699-1.5439-.5382-2.2125-.3724-.6762-.9144-1.2032-1.5994-1.5743l-.0049-.0027c-.71-.3795-1.529-.5438-2.4146-.5438h-2.8858c-.8856 0-1.7047.1643-2.4146.5438l-.0049.0027c-.685.3711-1.227.8981-1.5994 1.5743C6.1699 15.7894 6 16.5363 6 17.3333V18h2v-.6667c0-.5073.1061-.9137.29-1.2476z\" } }];\nexport const iconName = 'person-small';\nexport const personSmall = { iconName, paths };\nexport default paths;\n","export const paths = [{ \"tag\": \"path\", \"att\": { \"fill-rule\": \"evenodd\", \"clip-rule\": \"evenodd\", \"d\": \"M10.6724 6.4678c.2734-.2812.6804-.4707 1.3493-.4707.3971 0 .705.0838.9529.2225.241.1348.4379.3311.5934.6193l.0033.006c.1394.2541.237.6185.237 1.1403 0 .7856-.2046 1.2451-.4796 1.5278l-.0048.005c-.2759.2876-.679.4764-1.334.4764-.3857 0-.6962-.082-.956-.2241-.2388-.1344-.4342-.3293-.5888-.6147-.1454-.275-.2419-.652-.2419-1.1704 0-.7902.2035-1.2442.4692-1.5174zm1.3493-2.4717c-1.0834 0-2.054.3262-2.7838 1.0766-.7376.7583-1.0358 1.781-1.0358 2.9125 0 .7656.1431 1.483.4773 2.112l.0031.0058c.3249.602.785 1.084 1.3777 1.4154l.0062.0035c.5874.323 1.2368.4736 1.9235.4736 1.0818 0 2.0484-.3333 2.7755-1.0896.7406-.7627 1.044-1.786 1.044-2.9207 0-.7629-.1421-1.4784-.482-2.0996-.3247-.6006-.7844-1.0815-1.376-1.4125-.5858-.3276-1.2388-.477-1.9297-.477zM6.4691 16.8582c.2983-.5803.7228-1.0273 1.29-1.3572.5582-.3191 1.2834-.5049 2.2209-.5049h4.04c.9375 0 1.6626.1858 2.2209.5049.5672.3299.9917.7769 1.29 1.3572.3031.5896.4691 1.2936.4691 2.1379v1h2v-1c0-1.1122-.2205-2.1384-.6904-3.0523a5.3218 5.3218 0 0 0-2.0722-2.1769c-.9279-.5315-2.0157-.7708-3.2174-.7708H9.98c-1.1145 0-2.2483.212-3.2225.7737-.8982.5215-1.5928 1.2515-2.0671 2.174C4.2205 16.8577 4 17.8839 4 18.9961v1h2v-1c0-.8443.166-1.5483.4691-2.1379z\" } }];\nexport const iconName = 'person';\nexport const person = { iconName, paths };\nexport default paths;\n","var ShareDesignCardStateEnum;\n(function (ShareDesignCardStateEnum) {\n ShareDesignCardStateEnum[\"default\"] = \"default\";\n ShareDesignCardStateEnum[\"sendByEmail\"] = \"sendByEmail\";\n ShareDesignCardStateEnum[\"getDesignCode\"] = \"getDesignCode\";\n ShareDesignCardStateEnum[\"getLink\"] = \"getLink\";\n ShareDesignCardStateEnum[\"qrCode\"] = \"qrCode\";\n})(ShareDesignCardStateEnum || (ShareDesignCardStateEnum = {}));\nexport default ShareDesignCardStateEnum;\n//# sourceMappingURL=ShareDesignCardStateEnum.js.map","import { ShareDesignCardStateEnum } from '@inter-ikea-kompis/component-share-design-card';\nimport { ZipInCardStateEnum } from '@inter-ikea-kompis/component-zip-in';\nimport { IStore, IZipAvailability } from '@inter-ikea-kompis/types';\nimport { createSlice, current, PayloadAction } from '@reduxjs/toolkit';\nimport { isShallowIdentical } from 'utils/isShallowIdentical';\n\ntype IZip = {\n zipCode?: string;\n zipAvailabilities?: IZipAvailability[];\n zipInCardState?: ZipInCardStateEnum;\n};\n\ntype KompisStates = {\n storeId?: string;\n stores?: IStore[];\n shareDesignCardState: ShareDesignCardStateEnum;\n zip: IZip;\n};\n\nconst initialState: KompisStates = {\n storeId: undefined,\n stores: undefined,\n shareDesignCardState: ShareDesignCardStateEnum.default,\n zip: {\n zipCode: undefined,\n zipAvailabilities: undefined,\n zipInCardState: undefined\n }\n};\n\nexport const { reducer: kompisStatesReducer, actions: kompisStatesAction } = createSlice({\n name: 'kompisStates',\n initialState,\n reducers: {\n setStoreId: (state, { payload: storeId }: PayloadAction) => {\n if (isShallowIdentical(current(state).storeId, storeId)) {\n return;\n }\n\n return { ...state, storeId };\n },\n setStores: (state, { payload: stores }: PayloadAction) => {\n if (isShallowIdentical(current(state).stores, stores)) {\n return;\n }\n\n return { ...state, stores };\n },\n setShareDesignCardState: (\n state,\n { payload: shareDesignCardState }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).shareDesignCardState, shareDesignCardState)) {\n return;\n }\n\n return { ...state, shareDesignCardState };\n },\n setZipCode: (state, { payload: zipCode }: PayloadAction) => {\n if (isShallowIdentical(current(state).zip.zipCode, zipCode)) {\n return;\n }\n\n const zip = { ...state.zip, zipCode };\n return { ...state, zip };\n },\n setZipAvailabilities: (\n state,\n { payload: zipAvailabilities }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).zip.zipAvailabilities, zipAvailabilities)) {\n return;\n }\n\n const zip = { ...state.zip, zipAvailabilities };\n return { ...state, zip };\n },\n setZipInState: (\n state,\n { payload: zipInCardState }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).zip.zipInCardState, zipInCardState)) {\n return;\n }\n\n const zip = { ...state.zip, zipInCardState };\n return { ...state, zip };\n }\n }\n});\n","import { SheetAlignmentEnum } from '@inter-ikea-kompis/enums';\nimport { PayloadAction, createSlice, current } from '@reduxjs/toolkit';\nimport { AppRoutesEnum } from 'routes';\nimport { AreaEnum, NavigationSectionsEnum, SheetEnum } from 'utils/constants';\nimport { isShallowIdentical } from 'utils/isShallowIdentical';\n\nexport type Navigation = {\n activeArea: {\n [AreaEnum.MainNavigation]: {\n current: string;\n previous: string;\n };\n [AreaEnum.Faq]: {\n current: string;\n previous: string;\n };\n };\n pageLoaded: boolean;\n sheets: {\n [sheetName: string]: {\n fullyOpen: boolean;\n };\n };\n activeSheets: string[];\n showExitPrompt: boolean;\n visibleMenuModal: any;\n sheetAlignment?: SheetAlignmentEnum;\n lastNavigation?: AppRoutesEnum;\n};\n\nconst {\n CuttingDoorsCta,\n DistancePiecesCta,\n CustomizeSkytta,\n OpenGuide,\n OpenDesign,\n ShareDesign,\n FAQ,\n HamburgerMenu,\n WhatsIncluded,\n ProductDetails,\n Help,\n BookAMeeting,\n StartFromScratch,\n HomeDelivery,\n StoreSelector,\n LanguageSelector,\n StorageBehind,\n StorageBehindGallery,\n StorageBehindImported,\n UnusedPanels,\n // CustomizeMenu sheets\n CustomizeMeasurements,\n CustomizeDoorLayouts,\n CustomizeFrames,\n CustomizePanels,\n CustomizePanelPatterns,\n CustomizeChr,\n CustomizeStopbars,\n CustomizeDoorHeights\n} = SheetEnum;\n\nexport const initialSheets = {\n [CustomizeSkytta]: {\n fullyOpen: false\n },\n [CuttingDoorsCta]: {\n fullyOpen: false\n },\n [DistancePiecesCta]: {\n fullyOpen: false\n },\n [HamburgerMenu]: {\n fullyOpen: false\n },\n [Help]: {\n fullyOpen: false\n },\n [OpenDesign]: {\n fullyOpen: false\n },\n [ShareDesign]: {\n fullyOpen: false\n },\n [FAQ]: {\n fullyOpen: false\n },\n [WhatsIncluded]: {\n fullyOpen: false\n },\n [ProductDetails]: {\n fullyOpen: false\n },\n [OpenGuide]: {\n fullyOpen: false\n },\n [BookAMeeting]: {\n fullyOpen: false\n },\n [StartFromScratch]: {\n fullyOpen: false\n },\n [HomeDelivery]: {\n fullyOpen: false\n },\n [StoreSelector]: {\n fullyOpen: false\n },\n [LanguageSelector]: {\n fullyOpen: false\n },\n [StorageBehind]: {\n fullyOpen: false\n },\n [StorageBehindGallery]: {\n fullyOpen: false\n },\n [StorageBehindImported]: {\n fullyOpen: false\n },\n [UnusedPanels]: {\n fullyOpen: false\n },\n [CustomizeMeasurements]: {\n fullyOpen: false\n },\n [CustomizeDoorLayouts]: {\n fullyOpen: false\n },\n [CustomizeFrames]: {\n fullyOpen: false\n },\n [CustomizePanels]: {\n fullyOpen: false\n },\n [CustomizePanelPatterns]: {\n fullyOpen: false\n },\n [CustomizeChr]: {\n fullyOpen: false\n },\n [CustomizeStopbars]: {\n fullyOpen: false\n },\n [CustomizeDoorHeights]: {\n fullyOpen: false\n }\n};\n\nexport const initialActiveAreas: Navigation['activeArea'] = {\n [AreaEnum.MainNavigation]: {\n current: NavigationSectionsEnum.Measurements,\n previous: ''\n },\n [AreaEnum.Faq]: {\n current: '',\n previous: ''\n }\n};\n\nconst initialState: Navigation = {\n activeArea: initialActiveAreas,\n pageLoaded: false,\n sheets: initialSheets,\n activeSheets: [],\n sheetAlignment: undefined,\n visibleMenuModal: null,\n showExitPrompt: false,\n lastNavigation: undefined\n};\n\nexport const { reducer: navigationReducer, actions: navigationAction } = createSlice({\n name: 'navigation',\n initialState,\n reducers: {\n setAllActiveAreas: (\n state,\n { payload: activeArea }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).activeArea, activeArea)) {\n return;\n }\n\n return { ...state, activeArea };\n },\n /* Makes sure that the first view is mounted before hiding the loading screen */\n setPageLoaded: (state, { payload: pageLoaded }: PayloadAction) => {\n if (isShallowIdentical(current(state).pageLoaded, pageLoaded)) {\n return;\n }\n\n return { ...state, pageLoaded };\n },\n setSheets: (state, { payload: sheets }: PayloadAction) => {\n if (isShallowIdentical(current(state).sheets, sheets)) {\n return;\n }\n\n return { ...state, sheets };\n },\n /**\n *\n * Active sheets in order.\n * Last sheet is the active one and the parent is the next last one.\n */\n setAllActiveSheets: (\n state,\n { payload: activeSheets }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).activeSheets, activeSheets)) {\n return;\n }\n\n return { ...state, activeSheets };\n },\n setShowExitPrompt: (\n state,\n { payload: showExitPrompt }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).showExitPrompt, showExitPrompt)) {\n return;\n }\n\n return { ...state, showExitPrompt };\n },\n setSheetAlignment: (\n state,\n { payload: sheetAlignment }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).sheetAlignment, sheetAlignment)) {\n return;\n }\n\n return { ...state, sheetAlignment };\n },\n setVisibleMenuModal: (\n state,\n { payload: visibleMenuModal }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).visibleMenuModal, visibleMenuModal)) {\n return;\n }\n\n return { ...state, visibleMenuModal };\n },\n setLastNavigation: (\n state,\n { payload: lastNavigation }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).lastNavigation, lastNavigation)) {\n return;\n }\n\n return { ...state, lastNavigation };\n }\n }\n});\n","export const VOID = -1;\nexport const PRIMITIVE = 0;\nexport const ARRAY = 1;\nexport const OBJECT = 2;\nexport const DATE = 3;\nexport const REGEXP = 4;\nexport const MAP = 5;\nexport const SET = 6;\nexport const ERROR = 7;\nexport const BIGINT = 8;\n// export const SYMBOL = 9;\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst env = typeof self === 'object' ? self : globalThis;\n\nconst deserializer = ($, _) => {\n const as = (out, index) => {\n $.set(index, out);\n return out;\n };\n\n const unpair = index => {\n if ($.has(index))\n return $.get(index);\n\n const [type, value] = _[index];\n switch (type) {\n case PRIMITIVE:\n case VOID:\n return as(value, index);\n case ARRAY: {\n const arr = as([], index);\n for (const index of value)\n arr.push(unpair(index));\n return arr;\n }\n case OBJECT: {\n const object = as({}, index);\n for (const [key, index] of value)\n object[unpair(key)] = unpair(index);\n return object;\n }\n case DATE:\n return as(new Date(value), index);\n case REGEXP: {\n const {source, flags} = value;\n return as(new RegExp(source, flags), index);\n }\n case MAP: {\n const map = as(new Map, index);\n for (const [key, index] of value)\n map.set(unpair(key), unpair(index));\n return map;\n }\n case SET: {\n const set = as(new Set, index);\n for (const index of value)\n set.add(unpair(index));\n return set;\n }\n case ERROR: {\n const {name, message} = value;\n return as(new env[name](message), index);\n }\n case BIGINT:\n return as(BigInt(value), index);\n case 'BigInt':\n return as(Object(BigInt(value)), index);\n case 'ArrayBuffer':\n return as(new Uint8Array(value).buffer, value);\n case 'DataView': {\n const { buffer } = new Uint8Array(value);\n return as(new DataView(buffer), value);\n }\n }\n return as(new env[type](value), index);\n };\n\n return unpair;\n};\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns a deserialized value from a serialized array of Records.\n * @param {Record[]} serialized a previously serialized value.\n * @returns {any}\n */\nexport const deserialize = serialized => deserializer(new Map, serialized)(0);\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst EMPTY = '';\n\nconst {toString} = {};\nconst {keys} = Object;\n\nconst typeOf = value => {\n const type = typeof value;\n if (type !== 'object' || !value)\n return [PRIMITIVE, type];\n\n const asString = toString.call(value).slice(8, -1);\n switch (asString) {\n case 'Array':\n return [ARRAY, EMPTY];\n case 'Object':\n return [OBJECT, EMPTY];\n case 'Date':\n return [DATE, EMPTY];\n case 'RegExp':\n return [REGEXP, EMPTY];\n case 'Map':\n return [MAP, EMPTY];\n case 'Set':\n return [SET, EMPTY];\n case 'DataView':\n return [ARRAY, asString];\n }\n\n if (asString.includes('Array'))\n return [ARRAY, asString];\n\n if (asString.includes('Error'))\n return [ERROR, asString];\n\n return [OBJECT, asString];\n};\n\nconst shouldSkip = ([TYPE, type]) => (\n TYPE === PRIMITIVE &&\n (type === 'function' || type === 'symbol')\n);\n\nconst serializer = (strict, json, $, _) => {\n\n const as = (out, value) => {\n const index = _.push(out) - 1;\n $.set(value, index);\n return index;\n };\n\n const pair = value => {\n if ($.has(value))\n return $.get(value);\n\n let [TYPE, type] = typeOf(value);\n switch (TYPE) {\n case PRIMITIVE: {\n let entry = value;\n switch (type) {\n case 'bigint':\n TYPE = BIGINT;\n entry = value.toString();\n break;\n case 'function':\n case 'symbol':\n if (strict)\n throw new TypeError('unable to serialize ' + type);\n entry = null;\n break;\n case 'undefined':\n return as([VOID], value);\n }\n return as([TYPE, entry], value);\n }\n case ARRAY: {\n if (type) {\n let spread = value;\n if (type === 'DataView') {\n spread = new Uint8Array(value.buffer);\n }\n else if (type === 'ArrayBuffer') {\n spread = new Uint8Array(value);\n }\n return as([type, [...spread]], value);\n }\n\n const arr = [];\n const index = as([TYPE, arr], value);\n for (const entry of value)\n arr.push(pair(entry));\n return index;\n }\n case OBJECT: {\n if (type) {\n switch (type) {\n case 'BigInt':\n return as([type, value.toString()], value);\n case 'Boolean':\n case 'Number':\n case 'String':\n return as([type, value.valueOf()], value);\n }\n }\n\n if (json && ('toJSON' in value))\n return pair(value.toJSON());\n\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const key of keys(value)) {\n if (strict || !shouldSkip(typeOf(value[key])))\n entries.push([pair(key), pair(value[key])]);\n }\n return index;\n }\n case DATE:\n return as([TYPE, value.toISOString()], value);\n case REGEXP: {\n const {source, flags} = value;\n return as([TYPE, {source, flags}], value);\n }\n case MAP: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const [key, entry] of value) {\n if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))\n entries.push([pair(key), pair(entry)]);\n }\n return index;\n }\n case SET: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const entry of value) {\n if (strict || !shouldSkip(typeOf(entry)))\n entries.push(pair(entry));\n }\n return index;\n }\n }\n\n const {message} = value;\n return as([TYPE, {name: type, message}], value);\n };\n\n return pair;\n};\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} value a serializable value.\n * @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,\n * if `true`, will not throw errors on incompatible types, and behave more\n * like JSON stringify would behave. Symbol and Function will be discarded.\n * @returns {Record[]}\n */\n export const serialize = (value, {json, lossy} = {}) => {\n const _ = [];\n return serializer(!(json || lossy), !!json, new Map, _)(value), _;\n};\n","import {deserialize} from './deserialize.js';\nimport {serialize} from './serialize.js';\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} any a serializable value.\n * @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with\n * a transfer option (ignored when polyfilled) and/or non standard fields that\n * fallback to the polyfill if present.\n * @returns {Record[]}\n */\nexport default typeof structuredClone === \"function\" ?\n /* c8 ignore start */\n (any, options) => (\n options && ('json' in options || 'lossy' in options) ?\n deserialize(serialize(any, options)) : structuredClone(any)\n ) :\n (any, options) => deserialize(serialize(any, options));\n /* c8 ignore stop */\n\nexport {deserialize, serialize};\n","export enum DoorHeightEnum {\n Low,\n High,\n None\n}\n","import { DoorHeightEnum } from 'CoreAPI/Components/DoorHeightEnum';\nimport { DoorWidthEnum } from 'CoreAPI/Components/DoorWidthEnum';\nimport { IMissingSkyttaProducts } from 'redux-store/products/products.store';\n\nconst MAX_TOLERANCES = 12; // +/- 6mm\n\nconst TOTAL_SKYTTA_HEIGHT_LOW_FRAME = 2045;\nexport const MIN_SKYTTA_HEIGHT_LOW_FRAME = TOTAL_SKYTTA_HEIGHT_LOW_FRAME - MAX_TOLERANCES / 2;\nexport const MAX_SKYTTA_HEIGHT_LOW_FRAME = TOTAL_SKYTTA_HEIGHT_LOW_FRAME + MAX_TOLERANCES / 2;\n\nconst TOTAL_SKYTTA_HEIGHT_HIGH_FRAME = 2397;\nexport const MIN_SKYTTA_HEIGHT_HIGH_FRAME = TOTAL_SKYTTA_HEIGHT_HIGH_FRAME - MAX_TOLERANCES / 2;\nexport const MAX_SKYTTA_HEIGHT_HIGH_FRAME = TOTAL_SKYTTA_HEIGHT_HIGH_FRAME + MAX_TOLERANCES / 2;\n\nconst ALL_DOOR_FRAMES = [\n [\n [\n '60497733', // SKYTTA slid door frm 102x196 aluminium\n '40497734', // SKYTTA slid door frm 102x196 black\n '10497735' // SKYTTA slid door frm 102x196 white\n ],\n [\n '90497736', // SKYTTA slid door frm 102x231 aluminium\n '70497737', // SKYTTA slid door frm 102x231 black\n '50497738' // SKYTTA slid door frm 102x231 white\n ]\n ],\n [\n [\n '00497726', // SKYTTA slid door frm 77x196 aluminium\n '80497727', // SKYTTA slid door frm 77x196 black\n '60497728' // SKYTTA slid door frm 77x196 white\n ],\n [\n '40497729', // SKYTTA slid door frm 77x231 aluminium\n '80497732', // SKYTTA slid door frm 77x231 black\n '00497731' // SKYTTA slid door frm 77x231 white\n ]\n ]\n];\n\nexport enum DoorFrameColorEnum {\n Aluminium,\n Black,\n White\n}\n\nconst DEFAULT_DOOR_FRAME_COLOR = DoorFrameColorEnum.Black;\n\nexport const getDoorFrameProductRef = (\n width: DoorWidthEnum,\n height: DoorHeightEnum,\n color: DoorFrameColorEnum\n) => {\n return ALL_DOOR_FRAMES[width][height][color];\n};\n\nexport const getDoorFrameProductReferences = (width: DoorWidthEnum, height: DoorHeightEnum) => {\n return ALL_DOOR_FRAMES[width][height];\n};\n\nexport const getDoorFrameSize = (productRef: string) => {\n let widthType: DoorWidthEnum = 0;\n let heightType: DoorHeightEnum = 0;\n let colorType: DoorFrameColorEnum = 0;\n\n ALL_DOOR_FRAMES.forEach((width, widthIndex) => {\n width.forEach((height, heightIndex) => {\n height.forEach((art, colorIndex) => {\n if (art === productRef) {\n widthType = widthIndex;\n heightType = heightIndex;\n colorType = colorIndex;\n }\n });\n });\n });\n return {\n width: widthType,\n height: heightType,\n color: colorType\n };\n};\n\nexport const isProductADoorFrame = (productRef: string) => {\n return ALL_DOOR_FRAMES.flat(2).some(id => {\n return id === productRef;\n });\n};\n\nexport const isValidSkyttaColor = (\n missingSkyttaProducts: IMissingSkyttaProducts,\n doorHeightOptionsAvailable: DoorHeightEnum[],\n color: DoorFrameColorEnum\n) => {\n const { railColors, lowDoorColors, highDoorColors } = missingSkyttaProducts;\n\n const missingColors = [...railColors];\n\n if (doorHeightOptionsAvailable.includes(DoorHeightEnum.Low)) {\n missingColors.push(...lowDoorColors);\n }\n\n if (doorHeightOptionsAvailable.includes(DoorHeightEnum.High)) {\n missingColors.push(...highDoorColors);\n }\n\n return !missingColors.includes(color);\n};\n\nexport const getDefaultDoorFrameColorIndex = (\n missingSkyttaProducts: IMissingSkyttaProducts,\n doorHeightOptionsAvailable: DoorHeightEnum[]\n) => {\n const isDefaultColorValid = isValidSkyttaColor(\n missingSkyttaProducts,\n doorHeightOptionsAvailable,\n DEFAULT_DOOR_FRAME_COLOR\n );\n\n if (isDefaultColorValid) {\n return DEFAULT_DOOR_FRAME_COLOR;\n }\n\n const fallback = Object.keys(DoorFrameColorEnum)\n .filter(v => {\n return !Number.isNaN(Number(v));\n })\n .find(value => {\n return isValidSkyttaColor(missingSkyttaProducts, doorHeightOptionsAvailable, +value);\n });\n\n return fallback ? +fallback : DEFAULT_DOOR_FRAME_COLOR;\n};\n","export enum RailTrackEnum {\n Back,\n Middle,\n Front\n}\n","export enum RailTrackTypeEnum {\n TwoTrack,\n ThreeTrack\n}\n","import { RailTrackEnum } from 'CoreAPI/Components/RailTrackEnum';\nimport { RailTrackTypeEnum } from 'CoreAPI/Components/RailTrackTypeEnum';\nimport { RailTypeEnum } from 'CoreAPI/Components/RailTypeEnum';\nimport { DoorFrameColorEnum } from './doorframes';\n\nexport const ORIGINAL_RAIL_LENGTH = 2000;\nconst RAIL_DEPTH_TWO_TRACK = 81;\nconst RAIL_DEPTH_THREE_TRACK = 122;\n\nconst ALL_TRACKS = [\n [\n // Tops\n [\n '30500063-top', // Alu, two track\n '20512641-top', // Black, two track\n '40512640-top' // White, two track\n ],\n [\n '70467085-top', // Alu, three track\n '80512643-top', // Black, three track\n '00512642-top' // White, three track\n ]\n ],\n [\n // Bottoms\n [\n '30500063-bottom', // Alu, two track\n '20512641-bottom', // Black, two track\n '40512640-bottom' // White, two track\n ],\n [\n '70467085-bottom', // Alu, three track\n '80512643-bottom', // Black, three track\n '00512642-bottom' // White, three track\n ]\n ]\n];\n\nexport const getRailProductRef = (\n railType: RailTypeEnum,\n trackType: RailTrackTypeEnum,\n color: DoorFrameColorEnum\n) => {\n return ALL_TRACKS[railType][trackType][color];\n};\n\nexport const isProductARail = (productRef: string) => {\n return ALL_TRACKS.flat(2).some(id => {\n return id.split('-')[0] === productRef;\n });\n};\n\nexport const getRailSize = (productRef: string) => {\n let trackType: RailTrackTypeEnum = 0;\n let colorType: DoorFrameColorEnum = 0;\n\n // Top and bottom rail are the same article so we don't need to check for both\n ALL_TRACKS.forEach(rail => {\n rail.forEach((track, trackIndex) => {\n track.forEach((art, colorIndex) => {\n if (art.split('-')[0] === productRef) {\n trackType = trackIndex;\n colorType = colorIndex;\n }\n });\n });\n });\n return {\n track: trackType,\n color: colorType\n };\n};\n\nexport const getRailDepth = (trackType: RailTrackTypeEnum) => {\n return trackType === RailTrackTypeEnum.TwoTrack ? RAIL_DEPTH_TWO_TRACK : RAIL_DEPTH_THREE_TRACK;\n};\n\n/**\n * Convert index to work for two tracks\n * Useful in some cases where some functions returns an array with only two tracks\n */\nexport const getRailTrack = (railTrackIndex: RailTrackEnum, trackType: RailTrackTypeEnum) => {\n if (railTrackIndex === RailTrackEnum.Middle && trackType === RailTrackTypeEnum.TwoTrack) {\n return RailTrackEnum.Front;\n }\n\n return railTrackIndex;\n};\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport { QUERY_PARAMS } from 'utils/constants';\n\n/**\n * Parses the locale from the query parameter and returns it if it exists.\n */\nexport const getLocale = (): string => {\n const searchParams = new URLSearchParams(window.location.search);\n const locale = searchParams.get(QUERY_PARAMS.LOCALE);\n if (locale) {\n return parseLocale(locale);\n }\n\n const fallbackLocale = import.meta.env.VITE_LOCALE_FALLBACK || 'en-GB';\n\n return fallbackLocale;\n};\n\nexport const getLanguage = (locale: string): string => {\n const split = locale.split('-')?.[0];\n if (!split) {\n // Let error handler handle this.\n return locale;\n }\n return locale.split('-')?.[0];\n};\n\nexport const getCountry = (locale: string): string => {\n const split = locale.split('-')?.[1];\n if (!split) {\n // Let error handler handle this.\n return locale;\n }\n return locale.split('-')?.[1];\n};\n\nconst parseLocale = (locale: string) => {\n const language = getLanguage(locale).toLowerCase();\n const country = getCountry(locale).toUpperCase();\n\n return `${language}-${country}`;\n};\n","import { ITranslations } from '@inter-ikea-kompis/types';\n\n/**\n * Placeholder to be able to add translations similar to how they will work when they are added to https://github.com/inter-ikea/ipex-skytta-translations\n * You can keep keys here during development but remember to push them to the translations repo before merging.\n */\nexport interface ITranslationsToAdd {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n toAdd: {};\n}\n\nexport const translationsToAdd: ITranslationsToAdd = {\n toAdd: {}\n};\n\nexport default interface ISkyttaTranslations extends ITranslations {\n skytta: {\n actionAddChr: string;\n actionAddStopbars: string;\n actionChangeChr: string;\n actionChangeDoorLayout: string;\n actionChangeFrames: string;\n actionChangePanels: string;\n actionChangeStopbars: string;\n added: string;\n addedStorageDesign: string;\n backToIntro: string;\n bookAMeeting: string;\n bookAMeetingBody: string;\n bookAMeetingButtonLabel: string;\n bookAMeetingLinkText: string;\n bookAMeetingTitle: string;\n buttonBackToPlanner: string;\n buttonBackToTop: string;\n buttonEnterPlanner: string;\n buttonRangeIntroGuide: string;\n buttonStartPlanning: string;\n captionChrAndCoverPanels: string;\n captionFramesAndRails: string;\n captionPanels: string;\n captionStopbars: string;\n cardContinuePlanningBody: string;\n cardContinuePlanningTitle: string;\n cardNewDesignBody: string;\n cardNewDesignTitle: string;\n centimeters: string;\n chrAddCtaNo: string;\n chrAddCtaYes: string;\n chrAlertCta: string;\n chrAlertMessageBody: string;\n chrAlertMessageTitle: string;\n chrCtaQuestion: string;\n chrHeading: string;\n chrInfoMessage: string;\n chrIntro: string;\n chrSection1: string;\n chrSection2: string;\n chrSuccessMessage: string;\n chrTitle: string;\n chrVideoDescription: string;\n colorAluminium: string;\n colorBlack: string;\n colorWhite: string;\n ctaDescWhatsIncluded: string;\n ctaTitleWhatsIncluded: string;\n customizeYourSkytta: string;\n cuttingAddCtaYes: string;\n cuttingAlertCta: string;\n cuttingAlertMessageBody: string;\n cuttingAlertMessageTitle: string;\n cuttingHeading: string;\n cuttingIntro: string;\n cuttingNotPossibleAlertCta: string;\n cuttingNotPossibleAlertMessageBody: string;\n cuttingNotPossibleAlertMessageTitle: string;\n cuttingSection1: string;\n cuttingSection2: string;\n cuttingTitle: string;\n depth: string;\n distancesAddCtaYes: string;\n distancesAlertCta: string;\n distancesAlertMessageBody: string;\n distancesAlertMessageTitle: string;\n distancesHeading: string;\n distancesIntro: string;\n distancesSection1: string;\n distancesTitle: string;\n doorHeightsAlternativesTitle: string;\n doorHeightsHeading: string;\n doorHeightsIntro: string;\n doorHeightsTitle: string;\n doorHeightSuccessMessage: string;\n doorLayout: string;\n doorLayoutHeading: string;\n doorLayoutIntro: string;\n doorLayoutTitle: string;\n errorPageButton: string;\n errorPageDescription: string;\n errorPageImageAlt: string;\n errorPageTitle: string;\n exitPlannerBody: string;\n exitPlannerTitle: string;\n faqChrSection1Image1Alt: string;\n faqChrSection1Paragraph1: string;\n faqChrSection1Paragraph2: string;\n faqChrSection1Paragraph3: string;\n faqChrSection1Title1: string;\n faqChrTitle: string;\n faqCutDoorsSection1Image1Alt: string;\n faqCutDoorsSection1Paragraph1: string;\n faqCutDoorsSection1Paragraph2: string;\n faqCutDoorsSection1Paragraph3: string;\n faqCutDoorsSection1Title1: string;\n faqCutDoorsSection2Paragraph1: string;\n faqCutDoorsSection2Title1: string;\n faqCutDoorsSection3Image1Alt: string;\n faqCutDoorsSection3Paragraph1: string;\n faqCutDoorsSection3Title1: string;\n faqCutDoorsSection4Image1Alt: string;\n faqCutDoorsSection4Paragraph1: string;\n faqCutDoorsSection4Title1: string;\n faqCutDoorsSection5Image1Alt: string;\n faqCutDoorsSection5Paragraph1: string;\n faqCutDoorsSection5Title1: string;\n faqCutDoorsTitle: string;\n faqDescription: string;\n faqDistancePiecesSection1Image1Alt: string;\n faqDistancePiecesSection1Paragraph1: string;\n faqDistancePiecesSection1Paragraph2: string;\n faqDistancePiecesSection1Title1: string;\n faqDistancePiecesTitle: string;\n faqHeading: string;\n faqOpeningsSection1Image1Alt: string;\n faqOpeningsSection1Paragraph1: string;\n faqOpeningsSection1Paragraph2: string;\n faqOpeningsSection1Title1: string;\n faqOpeningsSection2Image1Alt: string;\n faqOpeningsSection2Paragraph1: string;\n faqOpeningsSection2Paragraph2: string;\n faqOpeningsSection2Paragraph3: string;\n faqOpeningsSection2Paragraph4: string;\n faqOpeningsSection2Title1: string;\n faqOpeningsTitle: string;\n faqOverlapSection1Image1Alt: string;\n faqOverlapSection1Paragraph1: string;\n faqOverlapSection1Paragraph2: string;\n faqOverlapSection1Title1: string;\n faqOverlapSection2Image1Alt: string;\n faqOverlapSection2Paragraph1: string;\n faqOverlapSection2Title1: string;\n faqOverlapSection3Image1Alt: string;\n faqOverlapSection3Paragraph1: string;\n faqOverlapSection3Title1: string;\n faqOverlapTitle: string;\n faqPanelsSection1Image1Alt: string;\n faqPanelsSection1Paragraph1: string;\n faqPanelsSection1Paragraph2: string;\n faqPanelsSection1Title1: string;\n faqPanelsSection2Image1Alt: string;\n faqPanelsSection2Paragraph1: string;\n faqPanelsSection2Paragraph2: string;\n faqPanelsSection2Title1: string;\n faqPanelsSection3Image1Alt: string;\n faqPanelsSection3Paragraph1: string;\n faqPanelsSection3Paragraph2: string;\n faqPanelsSection3Title1: string;\n faqPanelsSection4Image1Alt: string;\n faqPanelsSection4Paragraph1: string;\n faqPanelsSection4Paragraph2: string;\n faqPanelsSection4Title1: string;\n faqPanelsTitle: string;\n faqRailsSection1Paragraph1: string;\n faqRailsSection1Paragraph2: string;\n faqRailsSection1Paragraph3: string;\n faqRailsSection1Title1: string;\n faqRailsSection2Image1Alt: string;\n faqRailsSection2ImageSubtitle1: string;\n faqRailsSection2ImageTitle1: string;\n faqRailsSection2Title1: string;\n faqRailsSection3Image1Alt: string;\n faqRailsSection3ImageSubtitle1: string;\n faqRailsSection3ImageTitle1: string;\n faqRailsSection4Image1Alt: string;\n faqRailsSection4ImageSubtitle1: string;\n faqRailsSection4ImageTitle1: string;\n faqRailsSection5Image1Alt: string;\n faqRailsSection5ImageSubtitle1: string;\n faqRailsSection5ImageTitle1: string;\n faqRailsTitle: string;\n faqStopbarsSection1Image1Alt: string;\n faqStopbarsSection1Paragraph1: string;\n faqStopbarsSection1Paragraph2: string;\n faqStopbarsSection1Paragraph3: string;\n faqStopbarsSection1Title1: string;\n faqStopbarsSection2Image1Alt: string;\n faqStopbarsSection2Paragraph1: string;\n faqStopbarsSection2Title1: string;\n faqStopbarsSection3Image1Alt: string;\n faqStopbarsSection3Paragraph1: string;\n faqStopbarsSection3Paragraph2: string;\n faqStopbarsSection3Title1: string;\n faqStopbarsTitle: string;\n faqSurfaceSection1Image1Alt: string;\n faqSurfaceSection1Paragraph1: string;\n faqSurfaceSection1Title1: string;\n faqSurfaceSection2Image1Alt: string;\n faqSurfaceSection2Paragraph1: string;\n faqSurfaceSection2Title1: string;\n faqSurfaceTitle: string;\n framesRailsDescription: string;\n framesRailsHeading: string;\n framesRailsIntro: string;\n framesRailsTitle: string;\n frontViewTitle: string;\n galleryHeader: string;\n guideDoors1Desc: string;\n guideDoors1ImageAlt: string;\n guideDoors1Title: string;\n guideDoors2Desc: string;\n guideDoors3Desc: string;\n guideDoors4Desc: string;\n guideMeasure1Desc: string;\n guideMeasure1ImageAlt: string;\n guideMeasure1Title: string;\n guideMeasure2Desc: string;\n guideMeasure3Desc: string;\n guideRailDepth1Desc: string;\n guideRailDepth1ImageAlt: string;\n guideRailDepth1Title: string;\n guideRailDepth2Desc: string;\n height: string;\n help: string;\n helpDesc: string;\n helpImageAlt: string;\n helpTitle: string;\n highDoorsLabel: string;\n importStorageText: string;\n importStorageTitle: string;\n inches: string;\n introHeader: string;\n keepInMind: string;\n labelChooseDoors: string;\n labelConsiderLargeOverlap: string;\n labelConsiderOverlap: string;\n labelConsiderSmallOpening: string;\n labelConsiderSmallOverlap: string;\n labelDoors: string;\n labelExploreStorageOptions: string;\n labelGoodFit: string;\n labelHeight: string;\n labelMaxOpening: string;\n labelOther: string;\n labelOverlaps: string;\n labelRails: string;\n labelReachIn: string;\n labelRecommended: string;\n labelRecommendedIfStopbarsAdded: string;\n labelRecommendedStopbarsAdded: string;\n labelRoomDivider: string;\n labelRoomIsTooLarge: string;\n labelSelectStyle: string;\n labelStopbarsInfo: string;\n labelUnavailable: string;\n labelWalkIn: string;\n labelWorksWith: string;\n lowDoorsLabel: string;\n maxOpening: string;\n measurementsBody: string;\n measurementsHeader: string;\n measurementTitle: string;\n menu: string;\n miniConfigurationSummaryDisabledTooltip: string;\n minimumRecommendedDepth: string;\n mobileVersionUnderDevelopmentContent: string;\n mobileVersionUnderDevelopmentTitle: string;\n notAdded: string;\n notAvailable: string;\n openGuide: string;\n openMenu: string;\n openStorageDesign: string;\n overlaps: string;\n pagesGuide: string;\n pagesIntro: string;\n pagesPlanner: string;\n pagesSummary: string;\n panelsFlipButton: string;\n panelsFlipDescription: string;\n panelsHeading: string;\n panelsIntro: string;\n panelsTitle: string;\n panelWithIndex: string;\n patternsDescription: string;\n patternsHeading: string;\n patternsTitle: string;\n planner3dScene: string;\n plannerBannerMessageBody: string;\n plannerBannerMessageBodyKiosk: string;\n plannerBannerMessageTitle: string;\n plannerBannerMessageTitleKiosk: string;\n plannerSceneDescription: string;\n previewImageOf: string;\n printoutMainTitle: string;\n productInformation: string;\n productsUnavailableHeading: string;\n railsTitle: string;\n railsTracks: string;\n rangeIntro: string;\n rangeIntroReachInAltText: string;\n rangeIntroRoomDividerAltText: string;\n rangeIntroWalkInAltText: string;\n rangeName: string;\n rangeTagline: string;\n readLess: string;\n readMore: string;\n roomHeight: string;\n roomTypeTitle: string;\n roomWidth: string;\n save: string;\n saveCombination: string;\n sceneActionsDoorsClose: string;\n sceneActionsDoorsOpen: string;\n sceneActionsMeasurementsHide: string;\n sceneActionsMeasurementsShow: string;\n schematics: string;\n schematicsMeasurementDisplay: string;\n setHeight: string;\n setWidth: string;\n showMore: string;\n sidebarMainHeading: string;\n sidebarSubheading: string;\n skyttaDetails: string;\n sliderIsValidNumber: string;\n sliderIsWithinRange: string;\n sliderSelectedValue: string;\n solutionDetails: string;\n solutionIsTooLargeButton: string;\n solutionIsTooLargeText: string;\n solutionIsTooLargeTitle: string;\n solve: string;\n stageSummaryTooltipTitle: string;\n startFromScratch: string;\n stopbarsCtaQuestion: string;\n stopbarsInfoAddCtaNo: string;\n stopbarsInfoAddCtaYes: string;\n stopbarsInfoHeading: string;\n stopbarsInfoIntro: string;\n stopbarsInfoSection1: string;\n stopbarsInfoSection2: string;\n stopbarsInfoTitle: string;\n storageBehindCardAlt: string;\n storageBehindCardBody: string;\n storageBehindCardTitle: string;\n storageBehindDepthLabel: string;\n storageBehindDesignExamplesHeading: string;\n storageBehindExamplesError: string;\n storageBehindExamplesInfo: string;\n storageBehindExamplesTitle: string;\n storageBehindFaqLinkText: string;\n storageBehindFaqLinkTitle: string;\n storageBehindGalleryIntroText: string;\n storageBehindHeading: string;\n storageBehindImportedDesignHeading: string;\n storageBehindImportedDesignImageAltText: string;\n storageBehindImportedDesignIntroText: string;\n storageBehindIntroText: string;\n storageBehindRangeHeading: string;\n storageGalleryIntroText: string;\n styleTitle: string;\n toastMessagePanelSelection: string;\n toggleMeasurements: string;\n topDownViewClosedTitle: string;\n topDownViewOpenTitle: string;\n unavailableProductsBody: string;\n unavailableProductsTitle: string;\n unavailableProductsWarning: string;\n unsupportedDesignText: string;\n unsupportedDesignTitle: string;\n unusedPanelsDescription: string;\n unusedPanelsDescriptionShort: string;\n unusedPanelsTitle: string;\n warningMessagePanelsCanNotBeCut: string;\n warningMessagePanelsCanNotBeCutShort: string;\n warningMessageProductsUnavailable: string;\n width: string;\n moreThanTwoPanelsHasBeenSelected: string;\n mobileRotateDevice: string;\n };\n}\n","import { captureMessage } from '@sentry/react';\nimport { IUnitValuesMap } from 'utils/constants';\nimport { isRunningTest } from 'utils/platform';\nimport { translateString } from './translateString';\n\nexport enum UnitEnumHardCoded {\n CM = 'cm',\n IN = 'in',\n IN_SYMBOL = '\"',\n INCHES = 'inches'\n}\n\nexport enum UnitEnumTranslationKeys {\n CM = 'measureValueCm'\n}\n\nexport interface IUnitValues {\n metric: string;\n imperial: string;\n}\n\nexport const getValueWithUnit = (value: IUnitValues, useMetric?: boolean) => {\n const localizedValue = useMetric ? value.metric : value.imperial;\n\n // If last character is a number we add the default unit ( cm or in )\n const showUnit = useMetric !== null && !Number.isNaN(Number(localizedValue.slice(-1)));\n const cm = isRunningTest ? UnitEnumHardCoded.CM : translateString(UnitEnumTranslationKeys.CM);\n const unitExtension = useMetric ? ` ${cm}` : UnitEnumHardCoded.IN_SYMBOL;\n\n return showUnit ? localizedValue + unitExtension : localizedValue;\n};\n\nexport const replaceValuesInString = (\n translatedText: string,\n placeholderValues: IUnitValuesMap,\n useMetric?: boolean\n) => {\n return Object.entries(placeholderValues).reduce((originalString, [placeholderKey, value]) => {\n // Use regex to allow for multiple replacement of same key\n const regex = new RegExp(`\\\\{\\\\{${placeholderKey}}}`, 'g');\n\n // Use original value or convert it to include unit extension if it is of type IUnitValues\n const formattedValue = typeof value !== 'object' ? value : getValueWithUnit(value, useMetric);\n\n // Check whether the returned value is the same as the original string to determine if there were no matches found.\n const newString = originalString.replace(regex, formattedValue);\n\n // Return originalString if no match was found\n if (newString === originalString) {\n captureMessage('No placeholder key for translation found.', scope => {\n scope.setExtra('key', placeholderKey);\n return scope;\n });\n return originalString;\n }\n\n return newString;\n }, translatedText);\n};\n","import { ITranslations } from '@inter-ikea-kompis/types';\nimport { captureException } from '@sentry/react';\nimport store from 'redux-store/store';\nimport ISkyttaTranslations, {\n ITranslationsToAdd,\n translationsToAdd\n} from 'redux-store/translations/ISkyttaTranslations';\nimport { IUnitValuesMap } from 'utils/constants';\nimport { replaceValuesInString } from './parse';\n\nexport interface ITranslateStringProps {\n textKey: SkyttaTranslationKey;\n placeholderValues?: IUnitValuesMap;\n useMetric?: boolean;\n}\n\nexport type SkyttaTranslationKey = keyof ISkyttaTranslations['skytta'];\ntype KompisTranslationKey = keyof ITranslations['kompis'];\nexport type ITranslationsToAddKey = keyof ITranslationsToAdd['toAdd'];\n\nexport const translateString = (\n key: SkyttaTranslationKey | KompisTranslationKey | ITranslationsToAddKey,\n placeholderValues?: IUnitValuesMap,\n useMetric?: boolean\n): string => {\n /**\n * Since we access the translations thunks/actions sometimes we cant use hooks such as useSelector.\n * Accessing the store directly solves that.\n */\n\n const { translations } = store.getState().translations;\n const translation: string =\n translations?.skytta[key as SkyttaTranslationKey] ||\n translations?.kompis[key as KompisTranslationKey] ||\n translationsToAdd.toAdd[key as ITranslationsToAddKey] ||\n '';\n\n if (!translation) {\n captureException(new Error('Missing translation'), scope => {\n scope.setExtra('key', key);\n return scope;\n });\n console.error(key);\n\n return translation;\n }\n\n if (!placeholderValues) {\n return translation;\n }\n\n return replaceValuesInString(translation, placeholderValues, useMetric);\n};\n","import { translateString } from 'i18n/translateString';\n\nexport enum AppRoutesEnum {\n HOME = '/',\n /** Deprecated route, still used to redirect old bookmarks to new guide in sheet */\n GUIDE = '/guide',\n SUMMARY = '/summary',\n ERROR = '/error',\n PLANNER = '/planner',\n PLANNER_MEASUREMENTS = '/planner/measurements',\n PLANNER_LAYOUTS = '/planner/layouts',\n PLANNER_FRAMES = '/planner/frames',\n PLANNER_PANELS = '/planner/panels',\n PLANNER_PANEL_PATTERNS = '/planner/panels/patterns',\n PLANNER_DOOR_HEIGHTS = '/planner/door-heights',\n PLANNER_CHR = '/planner/chr',\n PLANNER_CUTTING = '/planner/cutting',\n PLANNER_DISTANCES = '/planner/distances',\n PLANNER_STOPBARS = '/planner/stopbars',\n PLANNER_LIST = '/planner/list',\n PLANNER_STORAGE_BEHIND = '/planner/storage-behind',\n PLANNER_STORAGE_BEHIND_GALLERY = '/planner/storage-behind/gallery',\n PLANNER_STORAGE_BEHIND_IMPORTED = '/planner/storage-behind/imported',\n NO_MATCH = '/*'\n}\n\nexport enum ViewIds {\n HOME = 'intro',\n GUIDE = 'guide',\n SUMMARY = 'summary',\n PLANNER = 'planner',\n ERROR = 'error'\n}\n\nexport const getViewIdAriaLabel = (id: string) => {\n switch (id) {\n case ViewIds.HOME:\n return translateString('pagesIntro');\n case ViewIds.PLANNER:\n return translateString('pagesPlanner');\n case ViewIds.GUIDE:\n return translateString('pagesGuide');\n case ViewIds.SUMMARY:\n return translateString('pagesSummary');\n default:\n return id;\n }\n};\n","import { DesignSourceEnum } from '@insights/insights-data-provider';\nimport { captureMessage } from '@sentry/react';\nimport { getLocale } from 'i18n/i18nUtils';\nimport { AppRoutesEnum } from 'routes';\nimport { QUERY_PARAMS, SPR_REGEX, SprCodes, VPC_REGEX } from 'utils/constants';\nimport { isLighthouse, isUpptacka } from 'utils/platform';\nimport useQuery from 'utils/useQuery';\n\nconst getVpcId = (hash: string) => {\n const vpcId = hash.match(VPC_REGEX)?.[1];\n return vpcId && vpcId.length === 6 ? vpcId : undefined;\n};\n\nexport const getSprId = (hash: string) => {\n const sprId = hash.match(SPR_REGEX)?.[1];\n return sprId && sprId.length === 8 ? `S${sprId}` : undefined;\n};\n\nexport const getUrl = (url: string) => {\n return new URL(url, window.location.href).href;\n};\n\nexport const isValidUrl = (oldUrl: URL, newUrlString: string): boolean => {\n return newUrlString.startsWith(oldUrl.origin);\n};\n\n/**\n * Handle app redirects, will be used when redirecting hash ids like sprs, vpcs etc.\n */\nexport const redirects = () => {\n const url = new URL(window.location.href);\n\n const designCodeFromQuery = useQuery(QUERY_PARAMS.DESIGN_CODE);\n\n const storageDesignCodeFromQuery = useQuery(QUERY_PARAMS.STORAGE_DESIGN_CODE);\n\n const { hash } = url;\n\n const vpcId = getVpcId(hash);\n\n const sprId = getSprId(hash);\n\n const validId = vpcId || (sprId && SprCodes[sprId]);\n\n if (sprId && !SprCodes[sprId]) {\n captureMessage('Incompatible SPR ID', scope => {\n scope.setExtra('SPR', sprId);\n return scope;\n });\n }\n\n /**\n * Has ID from hash such as spr or vpc.\n */\n if (validId) {\n // VPC http://localhost:3000/?uiPlatform=web&locale=sv-SE#RJ45FP\n // SPR http://localhost:3000/?uiPlatform=web&locale=sv-SE#S19424042\n // designCode http://localhost:3000/?uiPlatform=web&locale=sv-SE&designCode=RJ45FP\n // storageDesignCode http://localhost:3000/?uiPlatform=web&locale=sv-SE&storageDesignCode=KPR4M7\n\n // Should it actually be searchBar for all other cases when not SPR?\n const designSource = sprId ? DesignSourceEnum.spr : DesignSourceEnum.searchBar;\n url.searchParams.set(QUERY_PARAMS.DESIGN_CODE, validId);\n url.searchParams.set(QUERY_PARAMS.VPC_SOURCE, designSource);\n const { search } = url;\n const newUrlString = getUrl(`${search}#${AppRoutesEnum.PLANNER}`);\n if (isValidUrl(url, newUrlString)) {\n if (!sprId) {\n captureMessage('Arrived from shortUrl', scope => {\n scope.setExtras({ modifiedUrl: newUrlString, originalUrl: window.location.href });\n return scope;\n });\n }\n window.location.href = newUrlString;\n }\n /**\n * Has no valid hash ID but has query param.\n */\n } else if (\n !validId &&\n (designCodeFromQuery || storageDesignCodeFromQuery) &&\n !window.location.href.includes(AppRoutesEnum.PLANNER) &&\n !window.location.href.includes(AppRoutesEnum.SUMMARY)\n ) {\n const { search } = url;\n const newUrlString = getUrl(`${search}#${AppRoutesEnum.PLANNER}`);\n if (isValidUrl(url, newUrlString)) {\n window.location.href = newUrlString;\n }\n }\n\n const lighthouse = isLighthouse();\n if (lighthouse) {\n const { search } = url;\n const newUrlString = getUrl(`${search}#${AppRoutesEnum.PLANNER}`);\n if (isValidUrl(url, newUrlString)) {\n window.location.href = newUrlString;\n }\n }\n};\n\nexport const redirectToNewLocale = (locale: string) => {\n const isUpptackaSession = isUpptacka();\n const currentLocale = getLocale();\n\n if (isUpptackaSession || locale === currentLocale) {\n return;\n }\n\n const url = new URL(window.location.href);\n\n url.searchParams.set(QUERY_PARAMS.LOCALE, locale);\n window.location.href = url.href;\n};\n","import { ImageSizeTypeEnum, ImageTypeNameEnum } from '@inter-ikea-kompis/enums';\nimport {\n IProduct,\n IProductContent,\n IProductItem,\n IShoppingItem,\n IShoppingProduct\n} from '@inter-ikea-kompis/types';\nimport { captureException } from '@sentry/react';\nimport { DoorHeightEnum } from 'CoreAPI/Components/DoorHeightEnum';\nimport { DoorFrameColorEnum, getDoorFrameSize, isProductADoorFrame } from 'products/doorframes';\nimport { getRailSize, isProductARail } from 'products/rails';\nimport { getSprId } from 'redirects';\nimport { IShoppingProductsMap, IStringMap, IVisibleProducts, SprCodes } from 'utils/constants';\n\nconst productId2ShoppingItem = (productId: string): IShoppingItem => {\n const [type, id] = productId.split('-');\n return {\n type,\n id,\n quantity: 1\n };\n};\n\nexport const product2ShoppingProduct = (product: IProduct): IShoppingProduct => {\n return {\n quantity: 1,\n product\n };\n};\n\nexport const shoppingProduct2Product = (product: IShoppingProduct): IProduct => {\n return product.product;\n};\n\nexport const shoppingProduct2ProductItem = (product: IShoppingProduct): IProductItem => {\n const [type, id] = product.product.itemId.split('-');\n return {\n type,\n id\n };\n};\n\nexport const shoppingProduct2ShoppingItem = (product: IShoppingProduct): IShoppingItem => {\n const type = product.product.content?.ruItemType;\n const id = product.product.content?.ruItemNo;\n if (type && id) {\n return {\n type,\n id,\n quantity: product.quantity\n };\n }\n\n return productId2ShoppingItem(product.product.itemId);\n};\n\nexport const shoppingItem2ProductId = ({ id, type }: IShoppingItem): string => {\n return `${type}-${id}`;\n};\n\nexport const productId2ShoppingProduct = (products: IShoppingProductsMap) => {\n return (id: string) => {\n return products[id];\n };\n};\n\nexport const getVpcForSpr = (product: IProduct) => {\n const sprId = getSprId(product.itemId);\n\n return sprId && SprCodes[sprId];\n};\n\nconst DexfTypes: IStringMap = {\n '37246': 'CHR',\n '37247': 'CHR',\n '37254': 'Fitting',\n '37253': 'Fitting',\n '37252': 'Fitting',\n '37245': 'Frame',\n '30904': 'Panel',\n '37879': 'StopBar',\n '37878': 'StopBar',\n '37267': 'Track'\n};\n\nexport const getDexfType = (typeCode: string) => {\n return DexfTypes[typeCode] || 'Unknown';\n};\n\nexport const shoppingProducts2NormalizedTypes = (shoppingProducts: IShoppingProduct[]) => {\n return shoppingProducts.reduce((acc, value) => {\n const type = getDexfType(value.product.content?.typeCode as string);\n\n const product = {\n quantity: value.quantity,\n id: value.product.itemId\n };\n\n if (acc[type]) {\n acc[type] = [...acc[type], ...[product]];\n } else {\n acc[type] = [product];\n }\n\n return acc;\n }, {});\n};\n\nconst MANDATORY_PRODUCTS = [\n // FITTING PACKAGES\n 'ART-10500064', // SKYTTA fitt pack f 2 trck rail\n 'ART-60500066', // SKYTTA fitt pack f middle dr\n 'ART-80500065', // SKYTTA fitt pack f 3 trck rail\n\n // CHR\n 'ART-40500067', // SKYTTA ceiling height reducer 2 tracks\n 'ART-00511096', // SKYTTA ceiling height reducer 3 tracks\n 'ART-20500068', // SKYTTA top cover panel paintable beige\n\n // STOPBARS\n 'ART-00513236', // SKYTTA stop bar 2 tracks s2 white\n 'ART-80513237' // SKYTTA stop bar 3 tracks s2 white\n];\n\n// FRAMES AND RAILS\nconst TOTAL_NR_OF_COLORS = 3;\nconst REQUIRED_NUMBER_OF_COLORS_AVAILABLE = 2;\n\nexport const getMandatoryProductsData = (allProducts: IShoppingProductsMap) => {\n const validationData = Object.values(allProducts).reduce(\n (acc, shoppingProduct) => {\n const { valid, itemId } = shoppingProduct.product;\n const { lowDoorColors, highDoorColors, railColors } = acc.missingSkyttaProducts;\n\n if (!valid) {\n // MANDATORY_PRODUCTS\n const invalidProductIsMandatory = MANDATORY_PRODUCTS.find(id => {\n return id === itemId;\n });\n\n if (invalidProductIsMandatory) {\n acc.invalidMandatories.push(shoppingProduct);\n }\n\n // Probably [, currentId] if its index 1 but it feels prone to errors\n // eslint-disable-next-line prefer-destructuring\n const currentId = itemId.split('ART-')[1];\n\n // FRAMES\n if (isProductADoorFrame(currentId)) {\n const { color, height } = getDoorFrameSize(currentId);\n\n if (height === DoorHeightEnum.Low) {\n if (lowDoorColors.indexOf(color) === -1) {\n lowDoorColors.push(color);\n }\n } else if (height === DoorHeightEnum.High) {\n if (highDoorColors.indexOf(color) === -1) {\n highDoorColors.push(color);\n }\n }\n }\n\n // RAILS\n if (isProductARail(currentId)) {\n const { color } = getRailSize(currentId);\n\n if (railColors.indexOf(color) === -1) {\n railColors.push(color);\n }\n }\n }\n\n return acc;\n },\n {\n invalidMandatories: [] as IShoppingProduct[],\n missingSkyttaProducts: {\n railColors: [] as DoorFrameColorEnum[],\n lowDoorColors: [] as DoorFrameColorEnum[],\n highDoorColors: [] as DoorFrameColorEnum[]\n }\n }\n );\n\n const { invalidMandatories, missingSkyttaProducts } = validationData;\n\n // Log errors\n const haveMissingMandatoryProducts = !!invalidMandatories.length;\n if (haveMissingMandatoryProducts) {\n const missingString = invalidMandatories.map(art => {\n return art.product.itemId;\n });\n\n captureException(new Error('Mandatory products are missing'), scope => {\n scope.setExtra('id', missingString);\n return scope;\n });\n }\n\n const numberOfRailsAvailable = TOTAL_NR_OF_COLORS - missingSkyttaProducts.railColors.length;\n\n const haveLessRailColorsThanRequired =\n numberOfRailsAvailable < REQUIRED_NUMBER_OF_COLORS_AVAILABLE;\n\n if (haveLessRailColorsThanRequired) {\n const missingString = missingSkyttaProducts.railColors.map(color => {\n return DoorFrameColorEnum[color];\n });\n\n captureException(new Error('Missing more SKYTTA rails colors than the required'), scope => {\n scope.setExtras({\n RequiredNumberOfColorsAvailable: REQUIRED_NUMBER_OF_COLORS_AVAILABLE,\n color: missingString\n });\n return scope;\n });\n }\n\n const doorHeightOptionsAvailable: DoorHeightEnum[] = [];\n\n const lowDoorColorsAvailable = TOTAL_NR_OF_COLORS - missingSkyttaProducts.lowDoorColors.length;\n if (lowDoorColorsAvailable >= REQUIRED_NUMBER_OF_COLORS_AVAILABLE) {\n doorHeightOptionsAvailable.push(DoorHeightEnum.Low);\n }\n\n const highDoorColorsAvailable = TOTAL_NR_OF_COLORS - missingSkyttaProducts.highDoorColors.length;\n if (highDoorColorsAvailable >= REQUIRED_NUMBER_OF_COLORS_AVAILABLE) {\n doorHeightOptionsAvailable.push(DoorHeightEnum.High);\n }\n\n const noDoorHeightOptionsAvailable = doorHeightOptionsAvailable.length === 0;\n\n const hasMandatoryProductsMissing =\n haveMissingMandatoryProducts || haveLessRailColorsThanRequired || noDoorHeightOptionsAvailable;\n\n return {\n hasMandatoryProductsMissing,\n missingSkyttaProducts,\n doorHeightOptionsAvailable\n };\n};\n\nexport const verifyProduct = (product: IShoppingProduct, defaultProducts: string[]) => {\n if (!product?.product?.valid) {\n return false;\n }\n\n return defaultProducts.includes(product.product.itemId.split('ART-')[1]);\n};\n\nexport const prependArt = (id: string) => {\n return `ART-${id}`;\n};\n\nexport const prependSpr = (id: string) => {\n return `SPR-${id}`;\n};\n\n// Temp solution until kompis fixes the product card image component we do best in handle this on our end\n// https://i-p-e-x.slack.com/archives/CEY6PNS0Y/p1724832579489649\nexport const getProductImage = (\n product: IProduct,\n imageType: ImageTypeNameEnum,\n imageSize: ImageSizeTypeEnum\n) => {\n const images =\n product.content && product.content.image\n ? product.content.image.find(image => {\n return image.typeName === imageType && image.size === imageSize;\n })\n : undefined;\n\n return images;\n};\n\nexport const getSolutionDescription = (\n productContent?: IProductContent | null\n): string | undefined => {\n return `${productContent?.name}, ${productContent?.validDesignText}`;\n};\n","import { DexfSettingsEnvironmentEnum } from '@inter-ikea-kompis/enums';\nimport { getLocale } from 'i18n/i18nUtils';\nimport { icfVersion } from '.';\n\nconst dexfApiKey = import.meta.env.VITE_DEXF_API_KEY as string;\n\nexport const serviceSettings = {\n // Using StorageOne consumer here since no\n // new consumers will be created in IOWS due to forthcoming decommissioning\n consumer: 'StorageOne',\n contract: '42079',\n applicationName: 'SKYTTA',\n localizationPrefixApplication: 'SKYTTA',\n locale: getLocale(),\n // Transition to DEXF Settings and Phrase\n // https://i-p-e-x.atlassian.net/wiki/spaces/KOMPIS/blog/2023/11/01/36548706305/Transition+to+DEXF+Settings+and+Phrase#A-new-way-for-applications-to-interact-with-Kompis-Services\n //\n // The apps should always use the DEXF Settings Prod environment,\n // even when running in the QA environment for the app.\n // Only the segment should change.\n //\n // The app should be able to use the QA DEXF-API-KEY to fetch settings from the prod environment,\n // this is to prevent apps from having to switch between api-keys when calling different services.\n dexfApplicationId: 'skytta',\n dexfApiKey,\n dexfEnvironment: DexfSettingsEnvironmentEnum.production,\n // SKYT-1261: Update to version 1.1 that we have already created but maybe just forgot to change here\n dexfConfigurationVersion: '1.0',\n // This version HAS to be the same as the 'icf_version' property set in the actual ICF, otherwise dexf will silently ignore the ICF.\n dexfIcfVersion: icfVersion\n};\n\nexport const translationEndpoints = [\n '/addon-app/translations/kompis/en-XZ.json',\n '/addon-app/translations/kompis/{language}-{country}.json',\n `/addon-app/skytta/translations/en-XZ.json`,\n `/addon-app/skytta/translations/{language}-{country}.json`\n];\n","import store from 'redux-store/store';\nimport { serviceSettings } from './constants/serviceSettings';\n\nexport const getServiceSettings = () => {\n const { appSettings } = store.getState().settings;\n const settings = appSettings && Object.keys(appSettings).length ? appSettings : undefined;\n\n return {\n ...serviceSettings,\n settings\n };\n};\n","import {\n DexfSettingsFilterSegmentEnum,\n ProductOptionalFieldNameEnum\n} from '@inter-ikea-kompis/enums';\nimport { ProductService } from '@inter-ikea-kompis/services';\nimport { IProduct } from '@inter-ikea-kompis/types';\nimport { product2ShoppingProduct } from 'redux-store/products/products.utils';\nimport { IShoppingProductsMap, LOCAL_STORAGE_PREFIX, QUERY_PARAMS } from 'utils/constants';\nimport { getServiceSettings } from 'utils/getServiceSettings';\nimport { isProduction } from 'utils/platform';\nimport useQuery from 'utils/useQuery';\n\nlet service: ProductService;\n\nconst getService = () => {\n if (!service) {\n service = new ProductService(getServiceSettings());\n }\n\n return service;\n};\n\nconst getOptionalParams = () => {\n const futureDate = (!isProduction() && useQuery(QUERY_PARAMS.FUTURE_DATE)) || '';\n const segment = isProduction()\n ? DexfSettingsFilterSegmentEnum.production\n : DexfSettingsFilterSegmentEnum.development;\n\n return {\n customParams: {\n timestamp: futureDate,\n 'filter.segment': segment\n }\n };\n};\n\nconst getProductsData: () => Promise = () => {\n if (!isProduction()) {\n const fakeData = JSON.parse(\n window.sessionStorage.getItem(`${LOCAL_STORAGE_PREFIX}fakeData`) as string\n );\n\n if (fakeData) {\n return fakeData;\n }\n }\n\n return getService().getApplicationProducts(\n [...Object.values(ProductOptionalFieldNameEnum)],\n getOptionalParams()\n );\n};\n\nconst normalizedObject = (products: IProduct[]) => {\n return products.reduce((acc, product) => {\n acc[product.itemId] = product2ShoppingProduct(product);\n return acc;\n }, {});\n};\n\nexport const getProducts = async () => {\n const products = await getProductsData();\n\n return normalizedObject(products);\n};\n","const randomizeList = (items: any[]) => {\n return items.slice().sort(() => {\n return Math.random() - 0.5;\n });\n};\n\nexport default randomizeList;\n","import { ImageTypeNameEnum, ItemTypeEnum } from '@inter-ikea-kompis/enums';\nimport { IProductAsset, IShoppingProduct } from '@inter-ikea-kompis/types/lib';\nimport { createAsyncThunk } from '@reduxjs/toolkit';\nimport { captureMessage } from '@sentry/react';\nimport structuredClone from '@ungap/structured-clone';\nimport paxPanelsCatalog from 'range/catalog_pax-panels.json';\nimport skyttaMainCatalog from 'range/catalog_skytta.json';\nimport { ICatalog } from 'range/interface/catalog';\nimport { configurationAction } from 'redux-store/configuration/configuration.store';\nimport { AppDispatch, IThunkApi } from 'redux-store/store';\nimport { getProducts } from 'services/products/products.service';\nimport { IShoppingProductsMap, RangeFamilyEnum } from 'utils/constants';\nimport randomizeList from 'utils/randomizeList';\nimport { productAction } from './products.store';\nimport { getVpcForSpr, shoppingProducts2NormalizedTypes } from './products.utils';\n\ninterface IProductAssetModified extends IProductAsset {\n rangeFamily: string;\n}\n\nconst mapCatalogProducts = (\n allProducts: IShoppingProductsMap,\n catalogData: ICatalog,\n missingIds: string[],\n customRangeFamily?: string\n) => {\n return [...catalogData.products].map(product => {\n if (!product.dexf) {\n return product;\n }\n\n const isValid = allProducts[product.dexf]?.product.valid;\n const dexfAssets = allProducts[product.dexf]?.product.content?.asset as\n | IProductAssetModified[]\n | null\n | undefined;\n\n if (isValid && !dexfAssets) {\n missingIds.push(product.dexf);\n }\n\n if (!isValid || !dexfAssets?.length) {\n /*\n By leaving modelURI as empty string when no asset is found\n Core will not add a ModelInfoComponent to the entity,\n but still allow for the Entity to be created.\n */\n product.modelURI = '';\n return product;\n }\n\n const assets = dexfAssets.filter(value => {\n if (\n customRangeFamily ||\n Object.values(RangeFamilyEnum).includes(value.rangeFamily as RangeFamilyEnum)\n ) {\n return `${value.name}.glb` === product.modelURI;\n }\n return null;\n });\n\n /*\n If there are assets we expect to fetch the latest asset for that product\n which is expected to be found at the end of the array.\n */\n const asset = assets?.[assets.length - 1];\n\n if (!asset) {\n return product;\n }\n\n product.modelURI = asset.url;\n return product;\n });\n};\n\nconst parsedDexfModels = (\n allProducts: IShoppingProductsMap,\n catalogData: any,\n customRangeFamily?: string\n) => {\n const missingIds: string[] = [];\n const catalogProducts = mapCatalogProducts(\n allProducts,\n catalogData,\n missingIds,\n customRangeFamily\n );\n if (missingIds.length) {\n captureMessage('No asset found from dexf', scope => {\n scope.setExtra('dexfIds', missingIds);\n return scope;\n });\n }\n\n catalogData.products = catalogProducts;\n return catalogData;\n};\n\n/**\n * Using dexf for the models, we need to get the url from the productData and replace it with the modelUrl inside the catalogs.\n */\nexport const dexfLinkedCatalogs = (productData: IShoppingProductsMap, dispatch: AppDispatch) => {\n const deepCopiedSkyttaMainCatalog: ICatalog = structuredClone(skyttaMainCatalog);\n const deepCopiedPaxPanelsCatalog: ICatalog = structuredClone(paxPanelsCatalog);\n\n const dexfLinkedSkyttaCatalog = parsedDexfModels(productData, deepCopiedSkyttaMainCatalog);\n const dexfLinkedPaxPanelsCatalog = parsedDexfModels(productData, deepCopiedPaxPanelsCatalog);\n\n dispatch(configurationAction.setSkyttaCatalogData(dexfLinkedSkyttaCatalog));\n dispatch(configurationAction.setPaxPanelsCatalogData(dexfLinkedPaxPanelsCatalog));\n\n return { dexfLinkedSkyttaCatalog, dexfLinkedPaxPanelsCatalog };\n};\n\nexport const fetchProductsData = createAsyncThunk(\n 'products/setProducts',\n async (_, { dispatch }) => {\n const productData = await getProducts();\n dispatch(productAction.setProducts(productData));\n\n const allValidSPRs = Object.values(productData).filter(item => {\n const { valid, content } = item.product;\n\n const isSpr = content?.itemType === ItemTypeEnum.spr;\n\n const hasContextProductPicture = !!content?.image?.find(img => {\n return img.typeName === ImageTypeNameEnum.contextProductPicture;\n });\n\n const vpcCode = getVpcForSpr(item.product);\n\n return valid && isSpr && hasContextProductPicture && vpcCode;\n });\n\n const sortedSPRs = randomizeList(allValidSPRs);\n\n dispatch(productAction.setAllValidSPRs(sortedSPRs));\n\n return productData;\n }\n);\n\nexport const handleVisibleProducts = createAsyncThunk(\n 'products/setVisibleProducts',\n async (visibleProducts, { dispatch }) => {\n const toTypes = shoppingProducts2NormalizedTypes(visibleProducts);\n\n dispatch(productAction.setVisibleProducts(toTypes));\n }\n);\n","import { IShoppingProduct } from '@inter-ikea-kompis/types';\nimport { createSlice, current, PayloadAction } from '@reduxjs/toolkit';\nimport { captureException } from '@sentry/react';\nimport { DoorHeightEnum } from 'CoreAPI/Components/DoorHeightEnum';\nimport { DoorFrameColorEnum } from 'products/doorframes';\nimport { IShoppingProductsMap, IVisibleProducts } from 'utils/constants';\nimport { isShallowIdentical } from 'utils/isShallowIdentical';\nimport { fetchProductsData } from './products.thunks';\n\nexport interface IMissingSkyttaProducts {\n railColors: DoorFrameColorEnum[];\n lowDoorColors: DoorFrameColorEnum[];\n highDoorColors: DoorFrameColorEnum[];\n}\n\ntype State = {\n allProducts: IShoppingProductsMap;\n allValidSPRs: IShoppingProduct[];\n visibleProducts: IVisibleProducts;\n missingSkyttaProducts: IMissingSkyttaProducts;\n doorHeightOptionsAvailable: DoorHeightEnum[];\n activeProductId?: string;\n};\n\nconst initialState: State = {\n allProducts: {},\n allValidSPRs: [],\n visibleProducts: {},\n missingSkyttaProducts: {\n railColors: [],\n lowDoorColors: [],\n highDoorColors: []\n },\n doorHeightOptionsAvailable: [],\n activeProductId: undefined\n};\n\nexport const { reducer: productsReducer, actions: productAction } = createSlice({\n name: 'products',\n initialState,\n extraReducers: builder => {\n builder.addCase(fetchProductsData.rejected, (state, action) => {\n const error = new Error();\n error.name = 'Failed to fetch product data';\n error.message = action.error.message || '';\n\n captureException(error, scope => {\n scope.setExtra('state', state);\n scope.setExtra('action', action);\n return scope;\n });\n });\n },\n reducers: {\n setProducts: (state, { payload: allProducts }: PayloadAction) => {\n if (isShallowIdentical(current(state).allProducts, allProducts)) {\n return;\n }\n\n return {\n ...state,\n allProducts\n };\n },\n setAllValidSPRs: (state, { payload: allValidSPRs }: PayloadAction) => {\n if (isShallowIdentical(current(state).allValidSPRs, allValidSPRs)) {\n return;\n }\n\n return {\n ...state,\n allValidSPRs\n };\n },\n setVisibleProducts: (\n state,\n { payload: visibleProducts }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).visibleProducts, visibleProducts)) {\n return;\n }\n\n return { ...state, visibleProducts };\n },\n setActiveProductId: (\n state,\n { payload: activeProductId }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).activeProductId, activeProductId)) {\n return;\n }\n\n return { ...state, activeProductId };\n },\n setMissingSkyttaProducts: (\n state,\n { payload: missingSkyttaProducts }: PayloadAction\n ) => {\n if (isShallowIdentical(current(state).missingSkyttaProducts, missingSkyttaProducts)) {\n return;\n }\n\n return { ...state, missingSkyttaProducts };\n },\n setDoorHeightOptionsAvailable: (\n state,\n { payload: doorHeightOptionsAvailable }: PayloadAction\n ) => {\n if (\n isShallowIdentical(current(state).doorHeightOptionsAvailable, doorHeightOptionsAvailable)\n ) {\n return;\n }\n\n return { ...state, doorHeightOptionsAvailable };\n }\n }\n});\n","import { CookieConsentDataSourceEnum } from '@inter-ikea-kompis/enums';\nimport { SettingsService } from '@inter-ikea-kompis/services';\nimport { getCountry, getLocale } from 'i18n/i18nUtils';\nimport { TAppSettings } from 'redux-store/settings/settings.store';\nimport { QUERY_PARAMS } from 'utils/constants';\nimport { getServiceSettings } from 'utils/getServiceSettings';\nimport { getDexfSegment, isLocalEnvironment, isProduction } from 'utils/platform';\nimport useQuery from 'utils/useQuery';\n\nlet service: SettingsService;\n\nconst getEndpointsOverrides = () => {\n const futureToken = !isProduction() && useQuery(QUERY_PARAMS.FUTURE_TOKEN);\n const testLocale = !isProduction() && useQuery(QUERY_PARAMS.TEST_LOCALE);\n\n const locale = getLocale();\n\n const retailUnit = getCountry(locale);\n\n if (futureToken) {\n return {\n dexfWebplannerService: `https://api.dexf.ikea.com/webplanner/v1/proxy/${futureToken}/items/retailunit/${retailUnit}/locale/${locale}`\n };\n }\n if (testLocale) {\n return {\n dexfWebplannerService: `https://api.dexf.ikea.com/webplanner/v1/query/items/retailunit/${retailUnit}/locale/${locale}`\n };\n }\n};\n\nconst getService = () => {\n const options = getServiceSettings();\n\n if (!options.dexfApiKey) {\n throw new Error('No Dexf Api Key available.');\n }\n\n if (!service) {\n service = new SettingsService(options);\n }\n\n return service;\n};\n\nexport const getSettings = async () => {\n const segment = getDexfSegment(); // Filter for which segment you are querying the setting configuration. If not provided it defaults to 'production'.\n\n let result: TAppSettings | null = null;\n\n result = await (getService().getApplicationSettings(segment) as Promise);\n\n const cookieConsentOverride = isLocalEnvironment()\n ? { cookieConsentDataSource: CookieConsentDataSourceEnum.disabled }\n : {};\n\n return {\n ...result,\n kompis: {\n ...result.kompis,\n endpoints: {\n ...result.kompis.endpoints,\n ...getEndpointsOverrides()\n },\n serviceSettings: {\n ...result.kompis.serviceSettings,\n ...cookieConsentOverride\n }\n }\n };\n};\n","import { createAsyncThunk } from '@reduxjs/toolkit';\nimport { IThunkApi } from 'redux-store/store';\nimport { getSettings } from 'services/settingsService/settingsService.service';\nimport { IAppSettings } from './settings.store';\n\nexport const fetchSettings = createAsyncThunk(\n 'settings/fetchSettings',\n async () => {\n return getSettings();\n }\n);\n","import { IDexfSettings } from '@inter-ikea-kompis/types/lib';\nimport { createSlice, current } from '@reduxjs/toolkit';\nimport { captureException } from '@sentry/react';\nimport { isShallowIdentical } from 'utils/isShallowIdentical';\nimport { fetchSettings } from './settings.thunks';\n\ntype SkyttaSettings = {\n plannerBannerMessageType: string;\n plannerBannerMessageTypeKiosk: string;\n plannerBannerMessageEnabled: boolean;\n plannerBannerMessageEnabledKiosk: boolean;\n skyttaSupportBookingEnabled: boolean;\n};\n\nexport interface IAppSettings extends IDexfSettings {\n vpc: any;\n skytta: SkyttaSettings;\n}\n\nexport type TAppSettings = IAppSettings;\n\ntype SettingsStates = {\n appSettings: IAppSettings | null;\n};\n\nconst initialState: SettingsStates = {\n appSettings: null\n};\n\nexport const { reducer: settingsReducer } = createSlice({\n name: 'settings',\n initialState,\n extraReducers: builder => {\n builder\n .addCase(fetchSettings.fulfilled, (state, { payload: appSettings }) => {\n if (isShallowIdentical(current(state).appSettings, appSettings)) {\n return;\n }\n\n return {\n ...state,\n appSettings\n };\n })\n .addCase(fetchSettings.rejected, (state, action) => {\n const error = new Error();\n error.name = 'Failed to fetch settings data';\n error.message = action.error.message || '';\n\n captureException(error, scope => {\n scope.setExtra('state', state);\n scope.setExtra('action', action);\n return scope;\n });\n });\n },\n reducers: {}\n});\n","import { TranslationsService } from '@inter-ikea-kompis/services';\nimport { createAsyncThunk } from '@reduxjs/toolkit';\nimport { getLocale } from 'i18n/i18nUtils';\nimport { IThunkApi } from 'redux-store/store';\nimport { translationEndpoints } from 'utils/constants/serviceSettings';\nimport ISkyttaTranslations from './ISkyttaTranslations';\n\nlet service: TranslationsService;\n\nconst getService = () => {\n if (!service) {\n service = new TranslationsService({\n locale: getLocale(),\n translationEndpoints\n });\n }\n\n return service;\n};\n\nexport const fetchTranslations = createAsyncThunk(\n 'translations/fetchTranslationsStatus',\n async () => {\n return getService().getTranslations();\n }\n);\n","import { createSlice, current } from '@reduxjs/toolkit';\nimport { captureException } from '@sentry/react';\nimport { isShallowIdentical } from 'utils/isShallowIdentical';\nimport ISkyttaTranslations from './ISkyttaTranslations';\nimport { fetchTranslations } from './translations.thunks';\n\ntype TranslationsState = {\n translations: ISkyttaTranslations | null;\n};\n\nconst initialState: TranslationsState = {\n translations: null\n};\n\nexport const { reducer: translationsReducer } = createSlice({\n name: 'translations',\n initialState,\n reducers: {},\n extraReducers: builder => {\n builder\n .addCase(fetchTranslations.fulfilled, (state, { payload: translations }) => {\n if (isShallowIdentical(current(state).translations, translations)) {\n return;\n }\n\n return {\n ...state,\n translations\n };\n })\n .addCase(fetchTranslations.rejected, (state, action) => {\n const error = new Error();\n error.name = 'Failed to fetch translations data';\n error.message = action.error.message || '';\n\n captureException(error, scope => {\n scope.setExtra('state', state);\n scope.setExtra('action', action);\n return scope;\n });\n });\n }\n});\n","import { createSlice, current, PayloadAction } from '@reduxjs/toolkit';\nimport { isShallowIdentical } from 'utils/isShallowIdentical';\nimport {\n DeviceTypeEnum,\n OrientationTypeEnum,\n UserAgent,\n UserAgentWithMobile\n} from 'utils/platform';\n\nconst initialState: UserAgentWithMobile = {\n orientation: OrientationTypeEnum.Landscape,\n deviceType: DeviceTypeEnum.Desktop,\n isMobile: false\n};\n\nexport const { reducer: userAgentReducer, actions: userAgentActions } = createSlice({\n name: 'userAgent',\n initialState,\n reducers: {\n setUserAgent: (state, { payload }: PayloadAction) => {\n const { orientation, deviceType } = payload;\n\n if (\n isShallowIdentical(current(state).orientation, orientation) &&\n isShallowIdentical(current(state).deviceType, deviceType)\n ) {\n return;\n }\n\n return { ...state, ...{ orientation, deviceType } };\n },\n setIsMobile: (state, { payload: isMobile }: PayloadAction) => {\n if (isShallowIdentical(current(state).isMobile, isMobile)) {\n return;\n }\n\n return { ...state, isMobile };\n }\n }\n});\n","import { combineReducers } from '@reduxjs/toolkit';\nimport { OrientationTypeEnum } from 'utils/platform';\nimport { configurationReducer } from './configuration/configuration.store';\nimport { kompisStatesReducer } from './kompisStates/kompisStates.store';\nimport { navigationReducer } from './navigation/navigation.store';\nimport { productsReducer } from './products/products.store';\nimport { productId2ShoppingProduct, shoppingProduct2Product } from './products/products.utils';\nimport { sceneReducer } from './scene/scene.store';\nimport { settingsReducer } from './settings/settings.store';\nimport store from './store';\nimport { translationsReducer } from './translations/translations.store';\nimport { userAgentReducer } from './userAgent/userAgent.store';\n\nconst rootReducer = combineReducers({\n products: productsReducer,\n navigation: navigationReducer,\n configuration: configurationReducer,\n scene: sceneReducer,\n settings: settingsReducer,\n translations: translationsReducer,\n userAgent: userAgentReducer,\n kompisStates: kompisStatesReducer\n});\n\nexport type RootState = ReturnType;\nexport default rootReducer;\n\n// create a generic type called AppSelector\ntype AppSelector = (state: RootState) => Return;\n// create a custom `createSelector` that uses the type above\nconst createAppSelector = (selector: AppSelector): AppSelector => {\n return selector;\n};\n\n// Products states\nexport const selectProducts = createAppSelector(state => {\n const { products } = state;\n return products.allProducts;\n});\n\nexport const selectValidSPRs = createAppSelector(state => {\n const { products } = state;\n return products.allValidSPRs;\n});\n\nconst getShoppingProductsByIds = (ids: string[]) => {\n const states = store.getState();\n return createAppSelector(state => {\n const { products } = state;\n return ids.map(productId2ShoppingProduct(products.allProducts));\n })(states);\n};\n\nexport const getProductItemsByIds = (ids: string[]) => {\n const states = store.getState();\n const shoppingProducts = getShoppingProductsByIds(ids).filter(Boolean);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n return createAppSelector(_state => {\n return shoppingProducts.map(value => {\n return shoppingProduct2Product(value);\n });\n })(states);\n};\n\nexport const selectVisibleProducts = createAppSelector(state => {\n const { products } = state;\n return products.visibleProducts;\n});\nexport const selectMissingSkyttaProducts = createAppSelector(state => {\n const { products } = state;\n return products.missingSkyttaProducts;\n});\nexport const selectDoorHeightOptionsAvailable = createAppSelector(state => {\n const { products } = state;\n return products.doorHeightOptionsAvailable;\n});\nexport const selectActiveProductId = createAppSelector(state => {\n const { products } = state;\n return products.activeProductId;\n});\n\n// Navigation states\nexport const selectActiveArea = createAppSelector(state => {\n const { navigation } = state;\n return navigation.activeArea;\n});\nexport const selectShowExitPrompt = createAppSelector(state => {\n const { navigation } = state;\n return navigation.showExitPrompt;\n});\nexport const selectSheets = createAppSelector(state => {\n const { navigation } = state;\n return navigation.sheets;\n});\nexport const selectActiveSheetIds = createAppSelector(state => {\n const { navigation } = state;\n return navigation.activeSheets;\n});\nexport const selectActiveSheet = createAppSelector(state => {\n const { navigation } = state;\n return navigation.activeSheets.slice().pop();\n});\nexport const selectSheetAlignment = createAppSelector(state => {\n const { navigation } = state;\n return navigation.sheetAlignment;\n});\nexport const selectVisibleMenuModal = createAppSelector(state => {\n const { navigation } = state;\n return navigation.visibleMenuModal;\n});\nexport const selectLastNavigation = createAppSelector(state => {\n const {\n navigation: { lastNavigation }\n } = state;\n return lastNavigation;\n});\n\n// Configuration states\nexport const selectSelectedDoor = createAppSelector(state => {\n const { configuration } = state;\n return configuration.selectedDoor;\n});\nexport const selectStorageBehindIsVisible = createAppSelector(state => {\n const { configuration } = state;\n return configuration.storageBehindVisible;\n});\nexport const selectStorageBehind = createAppSelector(state => {\n const { configuration } = state;\n return configuration.storageBehind;\n});\nexport const selectUnsupportedStorageBehind = createAppSelector(state => {\n const { configuration } = state;\n return configuration.unsupportedStorageBehind;\n});\nexport const selectActiveStorageBehindGallery = createAppSelector(state => {\n const { configuration } = state;\n return configuration.activeStorageBehindGallery;\n});\nexport const selectShowErrorPage = createAppSelector(state => {\n const { configuration } = state;\n return configuration.showErrorPage;\n});\nexport const selectShowAppLoadingScreen = createAppSelector(state => {\n const { configuration } = state;\n return configuration.showAppLoadingScreen;\n});\nexport const selectShowLoadingSummaryButton = createAppSelector(state => {\n const { configuration } = state;\n return configuration.showLoadingSummaryButton;\n});\nexport const selectShowSceneLoadingScreen = createAppSelector(state => {\n const { configuration } = state;\n return configuration.showSceneLoadingScreen;\n});\nexport const selectHasUnsavedChanges = createAppSelector(state => {\n const { configuration } = state;\n return configuration.hasUnsavedChanges;\n});\nexport const selectArrivedFromQrCode = createAppSelector(state => {\n const { configuration } = state;\n return configuration.arrivedFromQrCode;\n});\nexport const selectPanelPatternStyles = createAppSelector(state => {\n const { configuration } = state;\n return configuration.selectedPanelPatternStyles;\n});\nexport const selectSelectedPanelStyles = createAppSelector(state => {\n const { configuration } = state;\n return configuration.selectedPanelStyles;\n});\nexport const selectDefaultPanelStyles = createAppSelector(state => {\n const { configuration } = state;\n return configuration.defaultPanelStyles;\n});\nexport const selectReadyToSaveCoreState = createAppSelector(state => {\n const { configuration } = state;\n return configuration.readyToSaveCoreState;\n});\nexport const selectSceneReady = createAppSelector(state => {\n const { configuration } = state;\n return configuration.sceneReady;\n});\n\n// kompis states\nexport const selectStoreId = createAppSelector(state => {\n const { kompisStates } = state;\n return kompisStates.storeId;\n});\nexport const selectZip = createAppSelector(state => {\n const {\n kompisStates: { zip }\n } = state;\n return zip;\n});\nexport const selectStores = createAppSelector(state => {\n const { kompisStates } = state;\n return kompisStates.stores;\n});\nexport const selectShareDesignCardState = createAppSelector(state => {\n const { kompisStates } = state;\n return kompisStates.shareDesignCardState;\n});\n\n// Scene states\nexport const selectIsMeasurementsVisible = createAppSelector(state => {\n const { scene } = state;\n\n return scene.measurementsVisible;\n});\nexport const selectUserWantsMeasurementVisible = createAppSelector(state => {\n const { scene } = state;\n\n return scene.userWantsMeasurementVisible;\n});\nexport const selectHasShownIntroAnimation = createAppSelector(state => {\n const { scene } = state;\n\n return scene.hasShownIntroAnimation;\n});\nexport const selectHasAllSelectedModelsLoaded = createAppSelector(state => {\n const { scene } = state;\n\n return scene.hasAllSelectedModelsLoaded;\n});\nexport const selectIsDoorsOpened = createAppSelector(state => {\n const { scene } = state;\n\n return scene.doorsOpened;\n});\n\n/**\n * Translations states\n */\nexport const selectTranslations = createAppSelector(state => {\n const { translations } = state;\n return translations.translations;\n});\n\n/**\n * Settings states\n */\nexport const selectAppSettings = createAppSelector(state => {\n const { settings } = state;\n return settings.appSettings;\n});\n\n// UserAgent states\nexport const selectShouldUseMobileLayout = createAppSelector(state => {\n const { userAgent } = state;\n return userAgent.isMobile;\n});\n\nexport const selectOrientation = createAppSelector(state => {\n const { userAgent } = state;\n return userAgent.orientation;\n});\n\nexport const selectIsLandscapeMobile = createAppSelector(state => {\n const {\n userAgent: { orientation, isMobile }\n } = state;\n return isMobile && orientation === OrientationTypeEnum.Landscape;\n});\n\n// All states\nexport const selectIsSceneLoadingScreenVisible = createAppSelector(states => {\n const { navigation, scene, configuration } = states;\n\n return (\n configuration.showSceneLoadingScreen ||\n configuration.showLoadingSummaryButton ||\n !(scene.hasAllSelectedModelsLoaded && navigation.pageLoaded)\n );\n});\n\nexport const selectIsCustomizeSheetOpen = createAppSelector(states => {\n const {\n navigation: { activeSheets },\n userAgent: { isMobile }\n } = states;\n\n return (\n activeSheets.some(value => {\n return value.includes('customize') || value.includes('storageBehind');\n }) && isMobile\n );\n});\n","import { Store, ThunkDispatch, UnknownAction, configureStore } from '@reduxjs/toolkit';\n\nimport { createReduxEnhancer } from '@sentry/react';\nimport { isProduction } from 'utils/platform';\nimport rootReducer, { RootState } from './rootReducer';\n\nconst sentryReduxEnhancer = createReduxEnhancer({\n attachReduxState: false\n});\n\ntype AppThunkDispatch = ThunkDispatch;\ntype AppStore = Omit, 'dispatch'> & {\n dispatch: AppThunkDispatch;\n};\n\nconst store: AppStore = configureStore({\n devTools: !isProduction(),\n reducer: rootReducer,\n enhancers: getDefaultEnhancers => {\n return getDefaultEnhancers().concat(sentryReduxEnhancer);\n }\n});\n\nexport default store;\n\nexport type AppDispatch = typeof store.dispatch;\n\nexport interface IThunkApi {\n dispatch: AppDispatch;\n state: RootState;\n}\n","/* SKYTTA */\nexport const CUSTOMIZE_MENU_BACK_BUTTON = 'customizeMenuBackButton';\nexport const CUSTOMIZE_MENU_SKYTTA_TITLE = 'customizeMenuSkyttaTitle';\nexport const ADD_STOPBARS_LABEL = 'add-stopbars-label';\nexport const ADD_STOPBARS_SWITCH = 'add-stopbars-switch';\nexport const DOOR_LAYOUT_MESSAGE_LABEL = 'door-layout-message-label';\nexport const RAILS_LABEL = 'rails-label';\nexport const FAQ_LINK_LABEL = 'faq-link-label';\nexport const RECOMMENDED_DEPTH_LABEL = 'recommended-depth-label';\nexport const CUSTOMIZE_MENU_CONTENT = 'customizeMenuContent';\n\n/**\n * Active accordion\n */\nexport const ACTIVE_ACCORDION_ITEM = '.accordion__item--active';\n\n/**\n * Scene\n */\nexport const RENDER_CANVAS = 'renderCanvas';\n\n/* Cypress */\nexport enum DataTestIdEnum {\n DoorLayoutsTitle = 'door-layouts-title',\n OpenDesignButton = 'open-design-button',\n StartPlannerButton = 'start-planner-button',\n ReachIn = 'ReachIn',\n WalkIn = 'WalkIn',\n RoomDivider = 'RoomDivider',\n MobileNavigation = 'mobile-navigation',\n LoadingScreen = 'loading-screen',\n ProductCardGrid = 'product-card-grid',\n ImportedStorageImage = 'importedStorageImage',\n StorageBehindRecommendation = 'storageBehindRecommendation',\n StorageBehindShowMoreButton = 'storageBehindShowMoreButton',\n BuyStorageBehindButton = 'buyStorageBehindButton',\n MeasurementWidgets = 'measurementWidgets',\n ContinuePlanningCard = 'continuePlanningCard',\n StartNewDesignCard = 'startNewDesignCard',\n StorageBehindCard = 'storageBehindCard'\n}\n\nexport enum Lists {\n CustomizeMenuList = 'customizeMenuList',\n FaqAccordionList = 'faqAccordionList',\n Debug = 'debug',\n Menu = 'MenuSheetContent',\n DoorHeights = 'doorHeightsList'\n}\n","const delay = (time: number) => {\n return new Promise(resolve => {\n return setTimeout(resolve, time);\n });\n};\n\nexport default delay;\n","import { isLocalEnvironment } from './platform';\n\ntype Path = `./${string}`;\n\n/**\n * Outputs the correct link when using builds, make sure to use example format: \"./images/image.png\"\n * */\nconst getAssetsPath = (path: Path) => {\n // If we use local ( SSR ) we should use regular vite linking instead since its not supported with method below.\n if (isLocalEnvironment()) {\n return `assets/${path}`;\n }\n\n return new URL(path, import.meta.url).href;\n};\n\nexport default getAssetsPath;\n","const aspectRatio = 1.25;\n\nconst margin = 0.1;\n\nconst precise = false;\n\nconst canvasSizeFallback = { x: 1920, y: 1080 };\n\nexport default {\n aspectRatio,\n margin,\n precise,\n canvasSizeFallback\n};\n","import { IPadding, IVector3, ScreenshotMimeType } from '@inter-ikea-betrakta/viewer';\n\ninterface IDirections {\n front: IVector3;\n left: IVector3;\n right: IVector3;\n behind: IVector3;\n}\n\nconst directions: IDirections = {\n front: { x: 0, y: 0, z: -1 },\n left: { x: -0.48, y: 0, z: -0.35 },\n right: { x: 0.48, y: 0, z: -0.35 },\n behind: { x: 0, y: 0, z: 1 }\n};\n\n// 30 rem customizeMenu width\nconst customizeMenuWidthInPx = 30 * parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst screenshotDesktopHeightOverride = 600;\n\nlet windowHeight = window.innerHeight;\nlet windowWidth = window.innerWidth;\n\nif (windowHeight < 1 || windowWidth < 1) {\n windowHeight = 1920;\n windowHeight = 1080;\n}\n\nconst params = {\n size: {\n desktop: {\n x: windowWidth - customizeMenuWidthInPx,\n y: windowHeight\n },\n mobile: {\n x: windowWidth,\n y: windowHeight\n }\n }\n};\n\nconst padding: IPadding = {\n top: 60,\n right: 60,\n bottom: 60,\n left: 60\n};\n\nconst imageSettings = {\n ao_settings: { enabled: true },\n mime_type: ScreenshotMimeType.JPEG,\n image_compression: 0.9\n};\n\nconst aspectRatio = 1.25;\n\nexport default {\n directions,\n params,\n padding,\n screenshotDesktopHeightOverride,\n imageSettings,\n aspectRatio\n};\n","import { Vector4 as BABYLON_Vector4 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nclass Row {\n constructor(offset_x, height, offset_y) {\n this.offset_x = offset_x;\n this.height = height;\n this.offset_y = offset_y;\n }\n}\nexport class Rectangle {\n constructor(width, height) {\n this.width = width;\n this.height = height;\n this.rotate = false;\n this.placement = BABYLON_Vector4.Zero();\n }\n}\nexport class RectangleAtlas {\n constructor(desired_texels_per_unit) {\n this._rectangles = [];\n this._resolution_x = 256;\n this._resolution_y = 256;\n this._padding = 2;\n this._desired_texels_per_unit = desired_texels_per_unit;\n }\n increase_resolution_x() {\n // Double the resolution, alternating between x and y to keep aspect ratios sane.\n // I.e. the resolution will increase as follows: 1x1 -> 2x1 -> 2x2 -> 4x2 -> 4x4 -> 8x4...\n if (this._resolution_x >= 16384) {\n throw new Error('UV-atlasing failed, exceeded maximum texture width.');\n }\n this._resolution_x *= 2;\n this._rectangles.forEach((r) => {\n r.placement.x /= 2;\n r.placement.z /= 2;\n });\n }\n increase_resolution_y() {\n if (this._resolution_y >= 16384) {\n throw new Error('UV-atlasing failed, exceeded maximum texture height.');\n }\n this._resolution_y *= 2;\n this._rectangles.forEach((r) => {\n r.placement.y /= 2;\n r.placement.w /= 2;\n });\n }\n // Add a atlasing job, return ID of job\n add_rectangle(width, height) {\n const w = Math.max(2, Math.ceil(width * this._desired_texels_per_unit));\n const h = Math.max(2, Math.ceil(height * this._desired_texels_per_unit));\n const rectangle = new Rectangle(w, h);\n this._rectangles.push(rectangle);\n return rectangle;\n }\n get_resolution() {\n return {\n width: this._resolution_x,\n height: this._resolution_y\n };\n }\n atlas() {\n // Rectangles with most height first\n this._rectangles.sort(function (a, b) {\n const d = b.height - a.height;\n if (d !== 0)\n return d;\n return b.width - a.width;\n });\n let next_start_y = 0;\n const rows = [];\n this._rectangles.forEach((r) => {\n while (r.width > this._resolution_x) {\n this.increase_resolution_x();\n }\n // Find a row where we can fit. Otherwise create a new row\n let placed_row = -1;\n let best_row = -1;\n let best_row_offset = Infinity;\n const num_rows = rows.length;\n for (let i = 0; i < num_rows; i++) {\n const row = rows[i];\n if (row.height < r.height) {\n // TODO: We could expand last row but due to sorting this shouldn't happen\n continue;\n }\n if (row.offset_x + r.width + 2 * this._padding >= this._resolution_x) {\n // Can't fit in row due to width\n if (row.offset_x < best_row_offset) {\n best_row = i;\n best_row_offset = row.offset_x;\n }\n continue;\n }\n // If geometry is low compared to row we could split row heightwise. We know following pieces will be no higher than this one\n placed_row = i;\n break;\n }\n if (placed_row === -1) {\n const new_start_y = next_start_y + r.height + this._padding;\n if (this._resolution_y > this._resolution_x &&\n new_start_y > this._resolution_y) {\n while (rows[best_row].offset_x + r.width + this._padding >=\n this._resolution_x) {\n this.increase_resolution_x();\n }\n placed_row = best_row;\n }\n else {\n while (new_start_y > this._resolution_y) {\n this.increase_resolution_y();\n }\n const row = new Row(0, r.height, next_start_y);\n placed_row = rows.length;\n rows.push(row);\n next_start_y = new_start_y;\n }\n }\n // Place rectangle into row with index placed_row\n const row = rows[placed_row];\n if (!r.rotate) {\n const p = this._padding;\n const x0 = (row.offset_x + p) / this._resolution_x;\n const y0 = (row.offset_y + p) / this._resolution_y;\n r.placement = new BABYLON_Vector4(x0, y0, x0 + r.width / this._resolution_x, y0 + r.height / this._resolution_y);\n }\n else {\n // TODO: Add support for rotation\n }\n if (r.height < 0.9 * row.height) {\n rows.splice(placed_row + 1, 0, new Row(row.offset_x, row.height - r.height - this._padding, row.offset_y + r.height + this._padding));\n row.height = r.height;\n }\n row.offset_x += r.width + this._padding;\n });\n }\n}\n//# sourceMappingURL=RectangleAtlas.js.map","import { IVector3 } from '../api.js';\nimport { vector3_pool } from '../Math.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nexport class TriangleCustomMesh {\n constructor(positions = null, indices = null, colors = null, normals = null, tangents = null, uv0 = null, uv1 = null) {\n this.positions = positions;\n this.indices = indices;\n this.colors = colors;\n this.normals = normals;\n this.tangents = tangents;\n this.uv0 = uv0;\n this.uv1 = uv1;\n this.verts_per_face = 3;\n }\n create_mesh(viewer, material) {\n return viewer.create_custom_mesh(this.get_mesh_description(), material);\n }\n get_mesh_description() {\n if (this.positions === null || this.indices === null) {\n throw Error('TriangleCustomMesh: mesh description can not be generated for meshes without positions and indices');\n }\n if (this.verts_per_face !== 3) {\n throw Error('get_mesh_description needs to be overridden with a solution that triangulates if verts_per_face is not 3');\n }\n return {\n positions: this.positions,\n indices: this.indices,\n colors: this.colors,\n normals: this.normals,\n tangents: this.tangents,\n uv0: this.uv0,\n uv1: this.uv1\n };\n }\n generate_simple_index_buffer() {\n var _a, _b;\n const num_indices = ((_b = (_a = this.positions) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) / 3;\n const indices = num_indices > 65535 ? new Uint32Array(num_indices) : new Uint16Array(num_indices);\n for (let i = 0; i < num_indices; i++) {\n indices[i] = i;\n }\n this.indices = indices;\n }\n generate_vertex_normals() {\n if (this.indices === null || this.indices.length < 3) {\n console.error('Only meshes with indices can generate normals');\n return false;\n }\n if (this.positions === null) {\n console.error('Mesh does not have any positions to generate normals from');\n return false;\n }\n if (this.normals === null) {\n this.normals = new Float32Array(this.positions.length);\n }\n for (let i = 0; i < this.normals.length; i++) {\n this.normals[i] = 0.0;\n }\n const vertex0 = vector3_pool.fetch();\n const vertex1 = vector3_pool.fetch();\n const vertex2 = vector3_pool.fetch();\n const edge0 = vector3_pool.fetch();\n const edge1 = vector3_pool.fetch();\n const normal = vector3_pool.fetch();\n for (let i = 0; i < this.indices.length; i += this.verts_per_face) {\n vertex0.copyFromFloats(this.positions[this.indices[i + 0] * 3 + 0], this.positions[this.indices[i + 0] * 3 + 1], this.positions[this.indices[i + 0] * 3 + 2]);\n vertex1.copyFromFloats(this.positions[this.indices[i + 1] * 3 + 0], this.positions[this.indices[i + 1] * 3 + 1], this.positions[this.indices[i + 1] * 3 + 2]);\n vertex2.copyFromFloats(this.positions[this.indices[i + 2] * 3 + 0], this.positions[this.indices[i + 2] * 3 + 1], this.positions[this.indices[i + 2] * 3 + 2]);\n vertex0.subtractToRef(vertex1, edge0);\n vertex0.subtractToRef(vertex2, edge1);\n BABYLON_Vector3.CrossToRef(edge0, edge1, normal);\n normal.normalize();\n const weights = [\n Math.acos(IVector3.dot(vertex1.subtractToRef(vertex0, edge0).normalize(), vertex2.subtractToRef(vertex0, edge1).normalize())),\n Math.acos(IVector3.dot(vertex0.subtractToRef(vertex1, edge0).normalize(), vertex2.subtractToRef(vertex1, edge1).normalize())),\n Math.acos(IVector3.dot(vertex0.subtractToRef(vertex2, edge0).normalize(), vertex1.subtractToRef(vertex2, edge1).normalize()))\n ];\n for (let j = 0; j < 3; j++) {\n this.normals[this.indices[i + j] * 3 + 0] += normal.x * weights[j];\n this.normals[this.indices[i + j] * 3 + 1] += normal.y * weights[j];\n this.normals[this.indices[i + j] * 3 + 2] += normal.z * weights[j];\n }\n }\n vector3_pool.return(vertex0, vertex1, vertex2, edge0, edge1, normal);\n for (let i = 0; i < this.normals.length; i += 3) {\n const length = Math.sqrt(this.normals[i + 0] * this.normals[i + 0] +\n this.normals[i + 1] * this.normals[i + 1] +\n this.normals[i + 2] * this.normals[i + 2]);\n this.normals[i + 0] /= length;\n this.normals[i + 1] /= length;\n this.normals[i + 2] /= length;\n }\n return true;\n }\n generate_face_normals() {\n if (this.indices === null || this.indices.length < 3) {\n console.error('Only meshes with indices can generate normals');\n return false;\n }\n if (this.positions === null) {\n console.error('Mesh does not have any positions to generate normals from');\n return false;\n }\n const num_faces = Math.floor(this.indices.length / this.verts_per_face);\n const num_verts = num_faces * this.verts_per_face;\n const new_indices = this.indices.slice();\n // Here we remove tangents, since we are generating normals, tangents won't match anyway\n this.tangents = null;\n const new_positions = new Float32Array(num_verts * 3); // 3 values per vert, XYZ\n const new_normals = new Float32Array(num_verts * 3); // 3 values per vert, XYZ\n const new_colors = this.colors ? new Float32Array(num_verts * 4) : null; // 4 values per vert, RGBA\n const new_uv0 = this.uv0 ? new Float32Array(num_verts * 2) : null; // 2 values per vert, UV\n const new_uv1 = this.uv1 ? new Float32Array(num_verts * 2) : null; // 2 values per vert, UV\n let index_counter = 0;\n const vertex0 = vector3_pool.fetch();\n const vertex1 = vector3_pool.fetch();\n const vertex2 = vector3_pool.fetch();\n const edge0 = vector3_pool.fetch();\n const edge1 = vector3_pool.fetch();\n const normal = vector3_pool.fetch();\n const copy_buffer_data = (dest, src, dest_offset, src_indices, src_index, num_values) => {\n // Number of values per field i.e. 3 per position or 2 per uv\n for (let i = 0; i < num_values; i++) {\n // We always copy for each triangle\n for (let j = 0; j < this.verts_per_face; j++) {\n dest[(dest_offset + j) * num_values + i] = src[src_indices[src_index + j] * num_values + i];\n }\n }\n };\n for (let i = 0; i < this.indices.length; i += this.verts_per_face) {\n vertex0.copyFromFloats(this.positions[this.indices[i + 0] * 3 + 0], this.positions[this.indices[i + 0] * 3 + 1], this.positions[this.indices[i + 0] * 3 + 2]);\n vertex1.copyFromFloats(this.positions[this.indices[i + 1] * 3 + 0], this.positions[this.indices[i + 1] * 3 + 1], this.positions[this.indices[i + 1] * 3 + 2]);\n vertex2.copyFromFloats(this.positions[this.indices[i + 2] * 3 + 0], this.positions[this.indices[i + 2] * 3 + 1], this.positions[this.indices[i + 2] * 3 + 2]);\n vertex0.subtractToRef(vertex1, edge0);\n vertex0.subtractToRef(vertex2, edge1);\n BABYLON_Vector3.CrossToRef(edge0, edge1, normal);\n normal.normalize();\n const new_index = index_counter;\n index_counter += 3;\n new_indices[i + 0] = new_index + 0;\n new_indices[i + 1] = new_index + 1;\n new_indices[i + 2] = new_index + 2;\n for (let j = 0; j < this.verts_per_face; j++) {\n new_normals[(new_index + j) * 3 + 0] = normal.x;\n new_normals[(new_index + j) * 3 + 1] = normal.y;\n new_normals[(new_index + j) * 3 + 2] = normal.z;\n }\n // Expand old data buffers\n copy_buffer_data(new_positions, this.positions, new_index, this.indices, i, 3);\n if (new_colors) {\n copy_buffer_data(new_colors, this.colors, new_index, this.indices, i, 4);\n }\n if (new_uv0) {\n copy_buffer_data(new_uv0, this.uv0, new_index, this.indices, i, 2);\n }\n if (new_uv1) {\n copy_buffer_data(new_uv1, this.uv1, new_index, this.indices, i, 2);\n }\n }\n this.positions = new_positions;\n this.indices = new_indices;\n this.colors = new_colors;\n this.normals = new_normals;\n this.uv0 = new_uv0;\n this.uv1 = new_uv1;\n vector3_pool.return(vertex0, vertex1, vertex2, edge0, edge1, normal);\n return true;\n }\n}\nexport class QuadCustomMesh {\n constructor(positions = null, indices = null, colors = null, normals = null, tangents = null, uv0 = null, uv1 = null) {\n this.positions = positions;\n this.indices = indices;\n this.colors = colors;\n this.normals = normals;\n this.tangents = tangents;\n this.uv0 = uv0;\n this.uv1 = uv1;\n this.verts_per_face = 4;\n }\n generate_simple_index_buffer() {\n var _a, _b;\n const num_indices = ((_b = (_a = this.positions) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) / 3;\n const indices = num_indices > 65535 ? new Uint32Array(num_indices) : new Uint16Array(num_indices);\n for (let i = 0; i < num_indices; i++) {\n indices[i] = i;\n }\n this.indices = indices;\n }\n create_mesh(viewer, material) {\n return viewer.create_custom_mesh(this.get_mesh_description(), material);\n }\n get_mesh_description() {\n if (this.positions === null || this.indices === null) {\n throw Error('QuadCustomMesh: mesh description can not be generated for meshes without positions and indices');\n }\n if (this.indices === null) {\n this.generate_simple_index_buffer();\n }\n // indices are not null here\n const quad_indices = this.indices;\n const triangle_indices = quad_indices instanceof Uint16Array\n ? new Uint16Array(quad_indices.length * 1.5)\n : new Uint32Array(quad_indices.length * 1.5);\n for (let i = 0; i < quad_indices.length / 4; i++) {\n triangle_indices[i * 6 + 0] = quad_indices[i * 4 + 0];\n triangle_indices[i * 6 + 1] = quad_indices[i * 4 + 1];\n triangle_indices[i * 6 + 2] = quad_indices[i * 4 + 2];\n triangle_indices[i * 6 + 3] = quad_indices[i * 4 + 0];\n triangle_indices[i * 6 + 4] = quad_indices[i * 4 + 2];\n triangle_indices[i * 6 + 5] = quad_indices[i * 4 + 3];\n }\n return {\n positions: this.positions,\n indices: triangle_indices,\n colors: this.colors,\n normals: this.normals,\n tangents: this.tangents,\n uv0: this.uv0,\n uv1: this.uv1\n };\n }\n generate_face_normals() {\n if (this.indices === null || this.indices.length < 3) {\n console.error('Only meshes with indices can generate normals');\n return false;\n }\n if (this.positions === null) {\n console.error('Mesh does not have any positions to generate normals from');\n return false;\n }\n const num_faces = Math.floor(this.indices.length / this.verts_per_face);\n const num_verts = num_faces * this.verts_per_face;\n const new_indices = this.indices.slice();\n // Here we remove tangents, since we are generating normals, tangents won't match anyway\n this.tangents = null;\n const new_positions = new Float32Array(num_verts * 3); // 3 values per vert\n const new_normals = new Float32Array(num_verts * 3); // 3 values per vert\n const new_colors = this.colors ? new Float32Array(num_verts * 4) : null; // 4 values per vert, RGBA\n const new_uv0 = this.uv0 ? new Float32Array(num_verts * 2) : null; // 2 values per vert\n const new_uv1 = this.uv1 ? new Float32Array(num_verts * 2) : null; // 2 values per vert\n let index_counter = 0;\n const vertex0 = vector3_pool.fetch();\n const vertex1 = vector3_pool.fetch();\n const vertex2 = vector3_pool.fetch();\n const vertex3 = vector3_pool.fetch();\n const edge0 = vector3_pool.fetch();\n const edge1 = vector3_pool.fetch();\n const normal = vector3_pool.fetch();\n const copy_buffer_data = (dest, src, dest_offset, src_indices, src_index, num_values) => {\n // Number of values per field i.e. 3 per position or 2 per uv\n for (let i = 0; i < num_values; i++) {\n // We always copy for each quad\n for (let j = 0; j < this.verts_per_face; j++) {\n dest[(dest_offset + j) * num_values + i] = src[src_indices[src_index + j] * num_values + i];\n }\n }\n };\n for (let i = 0; i < this.indices.length; i += this.verts_per_face) {\n vertex0.copyFromFloats(this.positions[this.indices[i + 0] * 3 + 0], this.positions[this.indices[i + 0] * 3 + 1], this.positions[this.indices[i + 0] * 3 + 2]);\n vertex1.copyFromFloats(this.positions[this.indices[i + 1] * 3 + 0], this.positions[this.indices[i + 1] * 3 + 1], this.positions[this.indices[i + 1] * 3 + 2]);\n vertex2.copyFromFloats(this.positions[this.indices[i + 2] * 3 + 0], this.positions[this.indices[i + 2] * 3 + 1], this.positions[this.indices[i + 2] * 3 + 2]);\n vertex3.copyFromFloats(this.positions[this.indices[i + 3] * 3 + 0], this.positions[this.indices[i + 3] * 3 + 1], this.positions[this.indices[i + 3] * 3 + 2]);\n vertex0.subtractToRef(vertex2, edge0);\n vertex3.subtractToRef(vertex1, edge1);\n BABYLON_Vector3.CrossToRef(edge0, edge1, normal);\n normal.normalize();\n const new_index = index_counter;\n index_counter += 3;\n new_indices[i + 0] = new_index + 0;\n new_indices[i + 1] = new_index + 1;\n new_indices[i + 2] = new_index + 2;\n for (let j = 0; j < 4; j++) {\n new_normals[(new_index + j) * 3 + 0] = normal.x;\n new_normals[(new_index + j) * 3 + 1] = normal.y;\n new_normals[(new_index + j) * 3 + 2] = normal.z;\n }\n // Expand old data buffers\n copy_buffer_data(new_positions, this.positions, new_index, this.indices, i, 3);\n if (new_colors) {\n copy_buffer_data(new_colors, this.colors, new_index, this.indices, i, 4);\n }\n if (new_uv0) {\n copy_buffer_data(new_uv0, this.uv0, new_index, this.indices, i, 2);\n }\n if (new_uv1) {\n copy_buffer_data(new_uv1, this.uv1, new_index, this.indices, i, 2);\n }\n }\n this.positions = new_positions;\n this.indices = new_indices;\n this.colors = new_colors;\n this.normals = new_normals;\n this.uv0 = new_uv0;\n this.uv1 = new_uv1;\n vector3_pool.return(vertex0, vertex1, vertex2, vertex3, edge0, edge1, normal);\n return true;\n }\n}\nexport function generate_index_buffer(num_indices) {\n const indices = num_indices > 65535 ? new Uint32Array(num_indices) : new Uint16Array(num_indices);\n for (let i = 0; i < num_indices; i++) {\n indices[i] = i;\n }\n return indices;\n}\n/**\n * Generic method for slicing a buffer from start and length while keeping narrow types\n * It will clamp start and len so that slice is not out of bounds\n * @param buffer the buffer to get slice from\n * @param start the first index on @buffer to use\n * @param length the number of elements from @start for the slice, shorter slice is given if out of bounds.\n * @returns New array of same type as @buffer with the slice specified from @start and @length\n */\nfunction get_buffer_slice(buffer, start, length) {\n // Slice handles out of bounds gracefully but we still clamp negative values\n start = start >= 0 ? start : 0;\n length = length >= 0 ? length : buffer.length;\n return buffer.slice(start, start + length);\n}\nfunction generate_submesh_buffers(indices, positions, colors, normals, tangents, uv0, uv1) {\n // Make a copy of the same size\n const new_indices = indices.slice();\n const old_index_to_new_index = new Map();\n let new_index = 0;\n for (let i = 0; i < indices.length; i++) {\n const old_index = indices[i];\n if (!old_index_to_new_index.has(old_index)) {\n old_index_to_new_index.set(old_index, new_index);\n new_index++;\n }\n new_indices[i] = old_index_to_new_index.get(old_index);\n }\n const new_positions = new Float32Array(old_index_to_new_index.size * 3);\n const new_colors = colors ? new Float32Array(old_index_to_new_index.size * 4) : null;\n const new_normals = normals ? new Float32Array(old_index_to_new_index.size * 3) : null;\n const new_tangents = tangents ? new Float32Array(old_index_to_new_index.size * 3) : null;\n const new_uv0 = uv0 ? new Float32Array(old_index_to_new_index.size * 2) : null;\n const new_uv1 = uv1 ? new Float32Array(old_index_to_new_index.size * 2) : null;\n for (const [old_index, new_index] of old_index_to_new_index) {\n new_positions[new_index * 3 + 0] = positions[old_index * 3 + 0];\n new_positions[new_index * 3 + 1] = positions[old_index * 3 + 1];\n new_positions[new_index * 3 + 2] = positions[old_index * 3 + 2];\n if (new_colors && colors) {\n new_colors[new_index * 4 + 0] = colors[old_index * 4 + 0];\n new_colors[new_index * 4 + 1] = colors[old_index * 4 + 1];\n new_colors[new_index * 4 + 2] = colors[old_index * 4 + 2];\n new_colors[new_index * 4 + 3] = colors[old_index * 4 + 3];\n }\n if (new_normals && normals) {\n new_normals[new_index * 3 + 0] = normals[old_index * 3 + 0];\n new_normals[new_index * 3 + 1] = normals[old_index * 3 + 1];\n new_normals[new_index * 3 + 2] = normals[old_index * 3 + 2];\n }\n if (new_tangents && tangents) {\n new_tangents[new_index * 3 + 0] = tangents[old_index * 3 + 0];\n new_tangents[new_index * 3 + 1] = tangents[old_index * 3 + 1];\n new_tangents[new_index * 3 + 2] = tangents[old_index * 3 + 2];\n }\n if (new_uv0 && uv0) {\n new_uv0[new_index * 2 + 0] = uv0[old_index * 2 + 0];\n new_uv0[new_index * 2 + 1] = uv0[old_index * 2 + 1];\n }\n if (new_uv1 && uv1) {\n new_uv1[new_index * 2 + 0] = uv1[old_index * 2 + 0];\n new_uv1[new_index * 2 + 1] = uv1[old_index * 2 + 1];\n }\n }\n const vertex_data = {\n indices: new_indices,\n colors: new_colors,\n positions: new_positions,\n normals: new_normals,\n tangents: new_tangents,\n uv0: new_uv0,\n uv1: new_uv1\n };\n return vertex_data;\n}\nexport function split_mesh_on_material(mesh_description, material_ranges) {\n const objects = [];\n for (let i = 0; i < material_ranges.length; i++) {\n const material_range = material_ranges[i];\n objects.push({\n mesh_description: generate_submesh_buffers(get_buffer_slice(mesh_description.indices, material_range.first_index, material_range.num_indices), mesh_description.positions, mesh_description.colors, mesh_description.normals, mesh_description.tangents, mesh_description.uv0, mesh_description.uv1),\n material: material_range.material\n });\n }\n return objects;\n}\n//# sourceMappingURL=CustomMesh.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { IVector3 } from '../api.js';\nimport { ObjectHandle } from '../common.js';\nimport { RectangleAtlas } from './RectangleAtlas.js';\nimport { Vector3 as BABYLON_Vector3 } from '@inter-ikea-betrakta-babylonjs/core/Maths/math.vector.js';\nimport { RENDER_LAYER_FORWARD } from '../babylon/RenderLayer.js';\nimport { TriangleCustomMesh } from './CustomMesh.js';\nimport { Deprecated } from '../utils/Deprecated.js';\nfunction mod(n, m) {\n return ((n % m) + m) % m;\n}\nconst SKIRTING_HEIGHT = 0.056;\nconst SKIRTING_DEPTH = 0.012;\nexport class BakeSettings {\n constructor(samples_per_frame, samples, texture_dimensions) {\n this.samples_per_frame = samples_per_frame || 8;\n this.samples = samples || 512;\n this.texture_height = texture_dimensions || 1024;\n this.texture_width = texture_dimensions || 1024;\n }\n}\nfunction calculate_skirting_segments(wall_length, doors) {\n let cap_start = false;\n const segments = [];\n let offset = 0;\n for (const door of doors) {\n // Each skirting segments runs from the current offset to the start of the next door.\n segments.push({\n start_offset: offset,\n end_offset: door.offset,\n cap_start: cap_start,\n cap_end: true\n });\n // The start of the next skirting segment is the other side of the door.\n offset = door.offset + door.size.x;\n cap_start = true;\n }\n segments.push({\n start_offset: offset,\n end_offset: wall_length,\n cap_start: cap_start,\n cap_end: false\n });\n return segments;\n}\nfunction intersects(a, b, c, d) {\n const a1 = a.y - b.y;\n const b1 = b.x - a.x;\n const c1 = a.x * b.y - b.x * a.y;\n const a2 = c.y - d.y;\n const b2 = d.x - c.x;\n const c2 = c.x * d.y - d.x * c.y;\n const det = a1 * b2 - a2 * b1;\n if (det === 0) {\n return undefined;\n }\n const x = (b2 * c1 - b1 * c2) / -det; // (b2*a1 - b1*a2)\n const y = (a2 * c1 - a1 * c2) / det; // (a2*b1 - a1*b2)\n const minx = Math.min(c.x, d.x) - 0.00001;\n const maxx = Math.max(c.x, d.x) + 0.00001;\n const miny = Math.min(c.y, d.y) - 0.00001;\n const maxy = Math.max(c.y, d.y) + 0.00001;\n if (x > maxx || x < minx || y > maxy || y < miny)\n return undefined;\n const distance = -(x - a.x);\n if (distance <= 0)\n return undefined;\n return { x: x, y: y, distance: distance };\n}\nfunction insert_hole_vertices(vertices, hole_vertices) {\n // Build a list of all line segments in the outer polygon as well as the hole.\n const segments = vertices.map((v, i) => {\n return {\n a: v,\n b: vertices[mod(i + 1, vertices.length)]\n };\n });\n const left_ray = {\n a: hole_vertices[0],\n b: { x: hole_vertices[0].x - 1, y: hole_vertices[0].y }\n };\n let closest_distance = Infinity;\n let closest_index = -1;\n let v = vertices[0]; // dummy value\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n const res = intersects(left_ray.a, left_ray.b, segment.a, segment.b);\n if (res !== undefined) {\n if (res.distance < closest_distance) {\n closest_distance = res.distance;\n closest_index = i;\n v = { x: res.x, y: res.y };\n }\n }\n }\n const closest_a = vertices[closest_index];\n const closest_b = vertices[mod(closest_index + 1, vertices.length)];\n // When we hit the closest segment at one of the vertices, we don't want to insert an extra vertex splitting that segment.\n if (Math.abs(v.x - closest_a.x) < 0.01 &&\n Math.abs(v.y - closest_a.y) < 0.01) {\n // If we intersect the segment at the first index, go from that vertex, to our hole vertices, and back\n vertices.splice(closest_index + 1, 0, ...hole_vertices, closest_a);\n }\n else if (Math.abs(v.x - closest_b.x) < 0.01 &&\n Math.abs(v.y - closest_b.y) < 0.01) {\n // If we intersect the second vertex of the segment, insert the whole vertices in connection to that vertex.\n vertices.splice(closest_index + 2, 0, ...hole_vertices, closest_b);\n }\n else {\n // If we intersect the segment somewhere in the middle, we split the segment at our intersection point and connect the new vertex with the hole.\n vertices.splice(closest_index + 1, 0, v, ...hole_vertices, v);\n }\n}\nfunction insert_hole_for_windows(w, wall_vertices) {\n const pos = w.position;\n const size = w.size;\n const vertices = [\n { x: pos.x, y: pos.y + size.y },\n { x: pos.x + size.x, y: pos.y + size.y },\n { x: pos.x + size.x, y: pos.y },\n { x: pos.x, y: pos.y },\n { x: pos.x, y: pos.y + size.y }\n ];\n insert_hole_vertices(wall_vertices, vertices);\n}\nfunction get_materials(object_ids, viewer) {\n const material_id_set = new Set(object_ids.map((id) => viewer.get_material(id)));\n return [...material_id_set];\n}\nexport class Room {\n constructor(viewer, schema, _wall_material = null, _wallskirt_material = null, _floor_material = null, _ceiling_material = null) {\n this.schema = schema;\n this._wall_material = _wall_material;\n this._wallskirt_material = _wallskirt_material;\n this._floor_material = _floor_material;\n this._ceiling_material = _ceiling_material;\n // room geometry\n this._walls = [];\n this._shadow_walls = [];\n this._wallskirts = [];\n this._ceiling = -1;\n this._shadow_ceiling = -1;\n this._floor = -1;\n this.wall_segments_normals = new Array(); // Will hold normals for each wall segment\n this.wall_segments_center_points = new Array(); // Worldspace position of each wall segments center\n this.wall_corners_point = new Array(); // World space position of each corner\n this.wall_corners_normal = new Array(); // World space normal of each corner\n this.wall_corners_tangent = new Array(); // World space tangent of each corner\n this._door_transforms = [];\n this._window_transforms = [];\n this._room_min = { x: 0, y: 0, z: 0 };\n this._room_max = { x: 0, y: 0, z: 0 };\n this._area_lights = [];\n this._atlas_width = -1;\n this._atlas_height = -1;\n this._async_calculate_lighting_job = Promise.resolve();\n this._viewer = viewer;\n this.generate_geometry();\n // Calculate normal and center for every wall segment to be able to calculate visibility (or rather which side faces the camera) later on\n for (let i = 0; i < schema.wall_vertices.length; i++) {\n const coord1 = schema.wall_vertices[i];\n const coord2 = schema.wall_vertices[(i + 1) % schema.wall_vertices.length];\n this.wall_corners_point.push(coord1);\n // Calculate the wall normal from the two points that corresponds to its start and end\n const dx = coord2.x - coord1.x;\n const dz = coord2.z - coord1.z;\n const normal = { x: -dz, y: 0, z: dx };\n // Normalize it\n const normal_length = Math.sqrt(Math.pow(normal.x, 2.0) + Math.pow(normal.z, 2.0));\n normal.x /= normal_length;\n normal.z /= normal_length;\n this.wall_segments_normals.push(normal);\n // Calculate the wall segments center point, this is where we'll put the walls frame, offset by the wall segment normal\n const center = {\n x: (coord1.x + coord2.x) * 0.5,\n y: 0,\n z: (coord1.z + coord2.z) * 0.5\n };\n this.wall_segments_center_points.push(center);\n }\n const vector3_up = { x: 0, y: 1, z: 0 };\n for (let i = 0; i < this.wall_segments_normals.length; i++) {\n const num_walls = this.wall_segments_normals.length;\n this.wall_corners_normal.push(IVector3.normalize(IVector3.add(this.wall_segments_normals[i], this.wall_segments_normals[(i - 1 + num_walls) % num_walls])));\n this.wall_corners_tangent.push(IVector3.cross(this.wall_corners_normal[i], vector3_up));\n }\n }\n generate_geometry() {\n const atlas = new RectangleAtlas(30);\n const min = this.schema.wall_vertices.reduce((acc, v) => {\n return {\n x: Math.min(acc.x, v.x),\n y: Math.min(acc.y, v.y),\n z: Math.min(acc.z, v.z),\n w: Math.min(acc.w, v.w)\n };\n }, {\n x: Number.POSITIVE_INFINITY,\n y: Number.POSITIVE_INFINITY,\n z: Number.POSITIVE_INFINITY,\n w: Number.POSITIVE_INFINITY\n });\n const max = this.schema.wall_vertices.reduce((acc, v) => {\n return {\n x: Math.max(acc.x, v.x),\n y: Math.max(acc.y, v.y),\n z: Math.max(acc.z, v.z),\n w: Math.max(acc.w, v.w)\n };\n }, {\n x: Number.NEGATIVE_INFINITY,\n y: Number.NEGATIVE_INFINITY,\n z: Number.NEGATIVE_INFINITY,\n w: Number.NEGATIVE_INFINITY\n });\n this._room_min = { x: min.x, y: min.y, z: min.z };\n this._room_max = { x: max.x, y: max.y + max.w, z: max.z };\n const floorsize_x = max.x - min.x;\n const floorsize_z = max.z - min.z;\n const floor_vertices = this.schema.wall_vertices.map((v) => ({\n x: v.x,\n y: v.z\n }));\n const floor_atlas = atlas.add_rectangle(floorsize_x, floorsize_z);\n const ceiling_atlas = atlas.add_rectangle(floorsize_x, floorsize_z);\n const wall_atlas = [];\n const window_table = {};\n const window_table_for_shadow_wall = {};\n this.schema.windows.forEach((window) => {\n window_table[window.wall_index] = window_table[window.wall_index] || [];\n window_table[window.wall_index].push(window);\n window_table_for_shadow_wall[window.wall_index] = window_table_for_shadow_wall[window.wall_index] || [];\n window_table_for_shadow_wall[window.wall_index].push(window);\n });\n const door_table = {};\n this.schema.doors.forEach((door) => {\n door_table[door.wall_index] = door_table[door.wall_index] || [];\n door_table[door.wall_index].push(door);\n });\n Object.values(door_table).forEach((doors) => {\n doors.sort((a, b) => {\n return a.offset - b.offset;\n });\n });\n // The angle between the walls on the inside of the room.\n const angles = [];\n for (let i = 0; i < floor_vertices.length; i++) {\n angles.push(inner_angle(floor_vertices[i], floor_vertices[mod(i + 1, floor_vertices.length)], floor_vertices[mod(i - 1, floor_vertices.length)]));\n }\n const skirting_joint_corrections = angles.map((a) => {\n // cot(a) = tan(PI/2 - a)\n // cot(a) = cos(a) / sin(a)\n const h = (Math.PI - a) / 2;\n return Math.tan(h) * SKIRTING_DEPTH;\n });\n let max_wall_height = 0.0;\n const skirting_uvs = [];\n const wall_skirting_infos = [];\n const skirting_positions = []; // new Float32Array(this.schema.wall_vertices.length * 8 * 3)\n const skirting_uv1 = []; // = new Float32Array(this.schema.wall_vertices.length * 8 * 2)\n // Setup walls and skirtings\n for (let i = 0; i < this.schema.wall_vertices.length; i++) {\n const prev = mod(i - 1, this.schema.wall_vertices.length);\n const v0 = new BABYLON_Vector3(this.schema.wall_vertices[prev].x, 0, this.schema.wall_vertices[prev].z);\n const v1 = new BABYLON_Vector3(this.schema.wall_vertices[i].x, 0, this.schema.wall_vertices[i].z);\n const wall_length = v0.subtract(v1).length();\n wall_skirting_infos.push(calculate_skirting_segments(wall_length, door_table[i] || []));\n const wall_height = Math.max(this.schema.wall_vertices[prev].w, this.schema.wall_vertices[i].w);\n wall_atlas.push(atlas.add_rectangle(wall_length, wall_height));\n max_wall_height = Math.max(wall_height, max_wall_height);\n skirting_uvs.push(wall_skirting_infos[i].map((info) => {\n const length = info.end_offset - info.start_offset;\n return {\n top: atlas.add_rectangle(length, SKIRTING_DEPTH),\n side: atlas.add_rectangle(length +\n (Number(info.cap_start) + Number(info.cap_end)) *\n SKIRTING_DEPTH, SKIRTING_HEIGHT)\n };\n }));\n }\n atlas.atlas();\n {\n const { width, height } = atlas.get_resolution();\n this._atlas_width = width;\n this._atlas_height = height;\n }\n this._floor = tesselate_polygon_with_ear_clipping(this._viewer, floor_vertices, floor_atlas, { x: 1, y: 0, z: 0 }, { x: 0, y: 0, z: 1 }, false, this._floor_material);\n const floor = new ObjectHandle(this._floor, this._viewer);\n floor.cast_shadow = false;\n floor.receive_shadow = true;\n floor.scale.y = -1;\n // create two ceilings, the purpose for the second one is to cast shadow\n for (let i = 0; i < 2; i++) {\n const ceiling_id = tesselate_polygon_with_ear_clipping(this._viewer, floor_vertices, ceiling_atlas, { x: 1, y: 0, z: 0 }, { x: 0, y: 0, z: 1 }, i === 1, // false when i = 0; true when i = 1 which means that only cast shadow\n this._ceiling_material);\n this._viewer.set_cast_shadow(ceiling_id, false);\n this._viewer.set_receive_shadow(ceiling_id, true);\n const ceiling = new ObjectHandle(ceiling_id, this._viewer);\n ceiling.position.y = max_wall_height; // This is a fudge factor to make ceiling water-tight.\n ceiling.cast_shadow = false;\n ceiling.receive_shadow = true;\n if (i === 1) {\n this._shadow_ceiling = ceiling_id;\n }\n else {\n this._ceiling = ceiling_id;\n }\n }\n const indices = [];\n // Ceiling area light\n this._area_lights.push({\n intensity: this.schema.ceiling_light_intensity !== undefined\n ? this.schema.ceiling_light_intensity\n : 0.8,\n roty: Math.PI * 0.5,\n rotz: Math.PI * 0.5,\n center: {\n x: (min.x + max.x) / 2,\n y: max_wall_height,\n z: (min.z + max.z) / 2\n },\n size: { x: floorsize_z, y: floorsize_x },\n color: this.schema.ceiling_light_color !== undefined\n ? this.schema.ceiling_light_color\n : { r: 1.0, g: 1.0, b: 0.9 }\n });\n // Floor area light\n this._area_lights.push({\n intensity: this.schema.floor_light_intensity !== undefined\n ? this.schema.floor_light_intensity\n : 0.4,\n roty: Math.PI * 0.5,\n rotz: -Math.PI * 0.5,\n center: {\n x: (min.x + max.x) / 2,\n y: 0,\n z: (min.z + max.z) / 2\n },\n size: { x: floorsize_z, y: floorsize_x },\n color: this.schema.floor_light_color !== undefined\n ? this.schema.floor_light_color\n : { r: 0.95, g: 0.95, b: 1.0 }\n });\n // Set double-side for the wall plane, enable to case shadow for walls\n // Index i from 0 to this.schema.wall_vertices.length - 1 are walls with normal toward inside the room.\n // Index i from this.schema.wall_vertices.length to this.schema.wall_vertices.length * 2 - 1 are walls with normal toward outside the room.\n for (let i = 0; i < this.schema.wall_vertices.length * 2; i++) {\n const prev = mod(i - 1, this.schema.wall_vertices.length);\n const wall_index = mod(i, this.schema.wall_vertices.length);\n const v0 = new BABYLON_Vector3(this.schema.wall_vertices[prev].x, 0, this.schema.wall_vertices[prev].z);\n const v1 = new BABYLON_Vector3(this.schema.wall_vertices[wall_index].x, 0, this.schema.wall_vertices[wall_index].z);\n let shadow_wall = false;\n // set wall invisible to keep see through functionality\n if (i >= this.schema.wall_vertices.length) {\n shadow_wall = true;\n }\n const wall_delta = v1.subtract(v0);\n const wall_length = wall_delta.length();\n wall_delta.normalizeFromLength(wall_length);\n const wall_height = Math.max(this.schema.wall_vertices[prev].w, this.schema.wall_vertices[wall_index].w);\n const doors = door_table[wall_index];\n const door_vertices = [];\n if (doors && !shadow_wall) {\n doors.forEach((door) => {\n if (door.offset + door.size.x > wall_length || door.offset < 0) {\n throw new Error('Invalid door placement.');\n }\n door_vertices.push({ x: door.offset, y: 0 });\n door_vertices.push({ x: door.offset, y: door.size.y });\n door_vertices.push({ x: door.offset + door.size.x, y: door.size.y });\n door_vertices.push({ x: door.offset + door.size.x, y: 0 });\n const area_light = {\n intensity: 1.0,\n roty: Math.atan2(wall_delta.x, wall_delta.z) + Math.PI * 0.5,\n rotz: 0.0,\n center: v0.add(wall_delta.scale(door.offset + door.size.x * 0.5)),\n size: door.size\n };\n this._area_lights.push(area_light);\n this._door_transforms.push({\n worldposition: area_light.center,\n rotation: { x: 0, y: area_light.roty, z: 0 }\n });\n });\n }\n const wall_vertices = [\n { x: 0.0, y: 0.0 },\n ...door_vertices,\n { x: wall_length, y: 0.0 },\n { x: wall_length, y: wall_height },\n { x: 0.0, y: wall_height }\n ];\n const windows = window_table[wall_index];\n const shadow_windows = shadow_wall ? window_table_for_shadow_wall[wall_index] : undefined;\n if (windows) {\n windows.sort();\n windows.forEach((w) => {\n insert_hole_for_windows(w, wall_vertices);\n const window_center = v0.add(wall_delta.scale(w.position.x + w.size.x * 0.5));\n window_center.addInPlaceFromFloats(0, w.position.y + w.size.y * 0.5, 0);\n const area_light = {\n intensity: 5.0,\n roty: Math.atan2(wall_delta.x, wall_delta.z) + Math.PI * 0.5,\n rotz: 0.0,\n center: window_center,\n size: w.size\n };\n this._area_lights.push(area_light);\n this._window_transforms.push({\n worldposition: area_light.center,\n rotation: { x: 0, y: area_light.roty, z: 0 }\n });\n });\n }\n else if (shadow_windows) {\n shadow_windows.sort();\n shadow_windows.forEach((w) => {\n insert_hole_for_windows(w, wall_vertices);\n });\n }\n const wall_id = tesselate_polygon_with_ear_clipping(this._viewer, wall_vertices, wall_atlas[wall_index], wall_delta, { x: 0, y: 1, z: 0 }, shadow_wall, this._wall_material);\n this._viewer.set_cast_shadow(wall_id, false);\n this._viewer.set_receive_shadow(wall_id, true);\n const wall = new ObjectHandle(wall_id, this._viewer);\n wall.position.x = v0.x;\n wall.position.z = v0.z;\n if (shadow_wall) {\n this._shadow_walls.push(wall_id);\n }\n else {\n this._walls.push(wall_id);\n }\n const wall_normal = BABYLON_Vector3.Cross(wall_delta, BABYLON_Vector3.Up()).normalize();\n if (this.schema.generate_skirting && !shadow_wall) {\n // Skirting diagram from the side.\n //\n // # v3 v2\n // # | |\n // # v v\n // # +-----+ <-- v1\n // # |\n // # |\n // # |\n // # |\n // # |\n // # + <-- v0\n // =============================\n const tx = wall_delta.x; // Wall tangent x\n const tz = wall_delta.z; // Wall tangent z\n for (let skirting_index = 0; skirting_index < wall_skirting_infos[i].length; skirting_index++) {\n const skirting = wall_skirting_infos[i][skirting_index];\n const ax = this.schema.wall_vertices[prev].x + skirting.start_offset * tx;\n const ay = this.schema.wall_vertices[prev].y;\n const az = this.schema.wall_vertices[prev].z + skirting.start_offset * tz;\n const bx = this.schema.wall_vertices[prev].x + skirting.end_offset * tx;\n const by = this.schema.wall_vertices[prev].y;\n const bz = this.schema.wall_vertices[prev].z + skirting.end_offset * tz;\n const side_uv = skirting_uvs[i][skirting_index].side.placement;\n const top_uv = skirting_uvs[i][skirting_index].top.placement;\n const skirting_joint_offset_a = skirting_joint_corrections[prev];\n const skirting_joint_offset_b = skirting_joint_corrections[i];\n let adx = wall_normal.x * SKIRTING_DEPTH;\n let adz = wall_normal.z * SKIRTING_DEPTH;\n let bdx = adx;\n let bdz = adz;\n const u_size = skirting.end_offset -\n skirting.start_offset +\n (Number(skirting.cap_start) + Number(skirting.cap_end)) *\n SKIRTING_DEPTH;\n const skirting_cap_uv_length = SKIRTING_DEPTH / u_size;\n const side_min_u = side_uv.x + (skirting.cap_start ? skirting_cap_uv_length : 0);\n const side_max_u = side_uv.z - (skirting.cap_end ? skirting_cap_uv_length : 0);\n // Correct for corners at the start and end of the wall!\n if (skirting_index === 0) {\n adx += tx * skirting_joint_offset_a;\n adz += tz * skirting_joint_offset_a;\n }\n if (skirting_index === wall_skirting_infos[i].length - 1) {\n bdx -= tx * skirting_joint_offset_b;\n bdz -= tz * skirting_joint_offset_b;\n }\n const index_offset = skirting_uv1.length / 2;\n // Start of wall - Side\n skirting_positions.push(ax + adx, ay, az + adz);\n skirting_uv1.push(side_min_u, side_uv.y);\n skirting_positions.push(ax + adx, ay + SKIRTING_HEIGHT, az + adz);\n skirting_uv1.push(side_min_u, side_uv.w);\n // End of wall - Side\n skirting_positions.push(bx + bdx, by, bz + bdz);\n skirting_uv1.push(side_max_u, side_uv.y);\n skirting_positions.push(bx + bdx, by + SKIRTING_HEIGHT, bz + bdz);\n skirting_uv1.push(side_max_u, side_uv.w);\n // Start of wall - Top\n skirting_positions.push(ax + adx, ay + SKIRTING_HEIGHT, az + adz);\n skirting_uv1.push(top_uv.x, top_uv.y);\n skirting_positions.push(ax, ay + SKIRTING_HEIGHT, az);\n skirting_uv1.push(top_uv.x, top_uv.w);\n // End of wall - Top\n skirting_positions.push(bx + bdx, by + SKIRTING_HEIGHT, bz + bdz);\n skirting_uv1.push(top_uv.z, top_uv.y);\n skirting_positions.push(bx, by + SKIRTING_HEIGHT, bz);\n skirting_uv1.push(top_uv.z, top_uv.w);\n indices.push(...[0, 2, 3, 0, 3, 1, 4, 6, 7, 4, 7, 5].map((n) => n + index_offset));\n if (skirting.cap_start) {\n skirting_positions.push(ax, ay, az);\n skirting_uv1.push(side_uv.x, side_uv.y);\n skirting_positions.push(ax, ay + SKIRTING_HEIGHT, az);\n skirting_uv1.push(side_uv.x, side_uv.w);\n indices.push(...[8, 0, 1, 8, 1, 9].map((n) => n + index_offset));\n }\n if (skirting.cap_end) {\n skirting_positions.push(bx, by, bz);\n skirting_uv1.push(side_uv.z, side_uv.y);\n skirting_positions.push(bx, by + SKIRTING_HEIGHT, bz);\n skirting_uv1.push(side_uv.z, side_uv.w);\n const index_a = 8 + (skirting.cap_start ? 2 : 0);\n const index_b = 9 + (skirting.cap_start ? 2 : 0);\n indices.push(...[2, index_a, index_b, 2, index_b, 3].map((n) => n + index_offset));\n }\n }\n }\n if (skirting_positions.length > 0) {\n const skirtings = this._viewer.create_custom_mesh({\n positions: new Float32Array(skirting_positions),\n indices: new Uint32Array(indices),\n uv1: new Float32Array(skirting_uv1)\n }, this._wallskirt_material);\n this._wallskirts.push(skirtings);\n }\n }\n }\n set_material(wall_material, wallskirt_material, floor_material, ceiling_material) {\n this._wall_material = wall_material;\n this._wallskirt_material = wallskirt_material;\n this._floor_material = floor_material;\n this._ceiling_material = ceiling_material;\n const promises = [];\n promises.push(this._viewer.set_material(this._ceiling, ceiling_material));\n promises.push(this._viewer.set_material(this._floor, floor_material));\n this._walls.forEach((wall_id) => {\n promises.push(this._viewer.set_material(wall_id, wall_material));\n });\n this._wallskirts.forEach((wallskirt_id) => {\n promises.push(this._viewer.set_material(wallskirt_id, wallskirt_material));\n });\n // Some ugly workaround since void !== void[] :(, whatever a void array is ╭〈≖_≖〝〉╮\n return Promise.all(promises).then(() => Promise.resolve());\n }\n create_room_bake_job() {\n return {\n texture_width: this._atlas_width,\n texture_height: this._atlas_height,\n uvset: 1,\n targets: [this.get_floor(), this.get_ceiling()]\n .concat(this.get_walls())\n .concat(this.get_wallskirts()),\n area_lights: this._area_lights\n };\n }\n /**\n * Get materials assigned to the room\n * @returns Array of MaterialIDs. No duplicates\n */\n get_room_materials() {\n return get_materials(this.get_room_objects(), this._viewer);\n }\n dispose_active_lightmaps() {\n const lightmaps = new Set();\n this.get_room_materials().forEach((material_id) => {\n const texture_id = this._viewer.get_lightmap_texture(material_id);\n if (texture_id !== null) {\n lightmaps.add(texture_id);\n this._viewer.set_lightmap_texture(material_id, null);\n }\n });\n lightmaps.forEach((texture_id) => {\n this._viewer.delete_texture(texture_id);\n });\n }\n set_targets_to_have_baked_lightmap(job, lightmap) {\n get_materials(job.targets, this._viewer).forEach((material_id) => {\n this._viewer.set_lightmap_texture(material_id, lightmap);\n });\n }\n calculate_lighting() {\n const job = this.create_room_bake_job();\n const lightmap = this._viewer.add_bake_job_progressive(job);\n this.dispose_active_lightmaps();\n this.set_targets_to_have_baked_lightmap(job, lightmap);\n }\n async_calculate_lighting() {\n const job = this.create_room_bake_job();\n this._async_calculate_lighting_job = this._viewer\n .add_bake_job_async(job)\n .then((lightmap) => {\n this.dispose_active_lightmaps();\n this.set_targets_to_have_baked_lightmap(job, lightmap);\n }, () => {\n console.warn('Lightmap texture is not set properly.');\n });\n }\n get_bounds() {\n return { min: this._room_min, max: this._room_max };\n }\n get_center() {\n return {\n x: (this._room_max.x + this._room_min.x) * 0.5,\n y: (this._room_min.y + this._room_max.y) * 0.5,\n z: (this._room_max.z + this._room_min.z) * 0.5\n };\n }\n get_walls() {\n return this._walls;\n }\n get_shadow_walls() {\n return this._shadow_walls;\n }\n get_door_transform(door_index) {\n return this._door_transforms[door_index];\n }\n get_window_transform(windo_index) {\n return this._window_transforms[windo_index];\n }\n get_wallskirts() {\n return this._wallskirts;\n }\n get_ceiling() {\n return this._ceiling;\n }\n get_shadow_ceiling() {\n return this._shadow_ceiling;\n }\n get_floor() {\n return this._floor;\n }\n get_room_objects() {\n return [this._floor, this._ceiling].concat(this._walls, this._wallskirts);\n }\n dispose() {\n this._async_calculate_lighting_job.catch(() => {\n // if room is disposed while calculating light, catch the error \"LightBaker was stopped before completion\"\n });\n this.dispose_active_lightmaps();\n // dispose all objects\n this.get_room_objects().forEach((id) => {\n this._viewer.delete_object(id, false);\n });\n this.get_shadow_walls().forEach((wall_id) => {\n this._viewer.delete_object(wall_id, false);\n });\n this._viewer.delete_object(this._shadow_ceiling, false);\n }\n wall_visible_from_position(position) {\n const walls_visible = new Array();\n for (let i = 0; i < this._walls.length; i++) {\n const wall_center_point = this.wall_segments_center_points[i];\n const normal = this.wall_segments_normals[i];\n // Calculate if the camera is behind the wall the frame belongs to, by taking any point on the wall (in this case the planes center) and checking the sign of the dot product between the walls normal and the vector from the cameras position to the point on the wall\n const to_plane = {\n x: wall_center_point.x - position.x,\n y: wall_center_point.y,\n z: wall_center_point.z - position.z\n };\n const dot_product = normal.x * to_plane.x + normal.y * to_plane.y + normal.z * to_plane.z;\n const wall_visible = dot_product < 0;\n walls_visible.push(wall_visible);\n }\n return walls_visible;\n }\n}\n__decorate([\n Deprecated({ new: 'async_calculate_lighting' })\n], Room.prototype, \"calculate_lighting\", null);\nfunction inner_angle(vertex, previous, next) {\n const x1 = previous.x - vertex.x;\n const y1 = previous.y - vertex.y;\n const x2 = next.x - vertex.x;\n const y2 = next.y - vertex.y;\n let angle = Math.atan2(x1 * y2 - y1 * x2, x1 * x2 + y1 * y2);\n if (angle < 0) {\n angle += Math.PI * 2;\n }\n return angle;\n}\nfunction sign(p, v0, v1) {\n return (p.x - v1.x) * (v0.y - v1.y) - (v0.x - v1.x) * (p.y - v1.y);\n}\n// Test is p is inside the triangle v0v1v2.\nfunction point_in_2d_triangle(p, v0, v1, v2) {\n // Inlude points that lie on the edges, i.e. sign = 0\n const s1 = sign(p, v0, v1);\n if (s1 < 0)\n return false;\n const s2 = sign(p, v1, v2);\n if (s2 < 0)\n return false;\n const s3 = sign(p, v2, v0);\n if (s3 < 0)\n return false;\n // Exclude points that lie on a vertex, i.e. sign = 0 for several edges.\n const zeroes = (s1 === 0 ? 1 : 0) + (s2 === 0 ? 1 : 0) + (s3 === 0 ? 1 : 0);\n if (zeroes > 1)\n return false;\n return true;\n}\nfunction tesselate_polygon_with_ear_clipping(viewer, vertices, atlas, base_u, base_v, shadow_only, material) {\n const positions = new Float32Array(vertices.length * 3);\n vertices.forEach((v, i) => {\n positions[i * 3 + 0] = v.x * base_u.x + v.y * base_v.x;\n positions[i * 3 + 1] = v.x * base_u.y + v.y * base_v.y;\n positions[i * 3 + 2] = v.x * base_u.z + v.y * base_v.z;\n });\n const angles = [];\n for (let i = 0; i < vertices.length; i++) {\n angles.push({\n angle: inner_angle(vertices[i], vertices[mod(i + 1, vertices.length)], vertices[mod(i - 1, vertices.length)]),\n vertex: i\n });\n }\n const indices = [];\n while (angles.length > 2) {\n const min = angles.reduce((prev, current, index) => {\n const is_ear = () => {\n if (current.angle > Math.PI)\n return false;\n const curr = angles[index];\n const prev_index = mod(index - 1, angles.length);\n const next_index = mod(index + 1, angles.length);\n const prev = angles[prev_index];\n const next = angles[next_index];\n const v0 = vertices[curr.vertex];\n const v1 = vertices[next.vertex];\n const v2 = vertices[prev.vertex];\n for (let i = 0; i < angles.length; i++) {\n if (i === prev_index || i === index || i === next_index)\n continue;\n if (point_in_2d_triangle(vertices[angles[i].vertex], v0, v1, v2)) {\n return false;\n }\n }\n return true;\n };\n if (current.angle < prev.angle && is_ear()) {\n return Object.assign(Object.assign({}, current), { index: index });\n }\n else {\n return Object.assign(Object.assign({}, prev), { index: prev.index });\n }\n }, { angle: Infinity, vertex: -1, index: -1 });\n const prev = angles[mod(min.index - 1, angles.length)];\n const next = angles[mod(min.index + 1, angles.length)];\n if (shadow_only) {\n // inversed normal\n indices.push(min.vertex, prev.vertex, next.vertex);\n }\n else {\n indices.push(min.vertex, next.vertex, prev.vertex);\n }\n const prevprev = angles[mod(min.index - 2, angles.length)];\n const nextnext = angles[mod(min.index + 2, angles.length)];\n prev.angle = inner_angle(vertices[prev.vertex], vertices[next.vertex], vertices[prevprev.vertex]);\n next.angle = inner_angle(vertices[next.vertex], vertices[nextnext.vertex], vertices[prev.vertex]);\n angles.splice(min.index, 1);\n }\n const uv0 = new Float32Array(vertices.length * 2);\n const uv1 = new Float32Array(vertices.length * 2);\n let xmin = Infinity;\n let xmax = -Infinity;\n let ymin = Infinity;\n let ymax = -Infinity;\n for (let i = 0; i < vertices.length; i++) {\n uv0[i * 2] = vertices[i].x;\n uv0[i * 2 + 1] = vertices[i].y;\n xmax = Math.max(xmax, vertices[i].x);\n ymax = Math.max(ymax, vertices[i].y);\n xmin = Math.min(xmin, vertices[i].x);\n ymin = Math.min(ymin, vertices[i].y);\n }\n const x_size = xmax - xmin;\n const y_size = ymax - ymin;\n for (let i = 0; i < vertices.length; i++) {\n uv1[i * 2 + 0] =\n atlas.placement.x +\n ((vertices[i].x - xmin) / x_size) *\n (atlas.placement.z - atlas.placement.x);\n uv1[i * 2 + 1] =\n atlas.placement.y +\n ((vertices[i].y - ymin) / y_size) *\n (atlas.placement.w - atlas.placement.y);\n }\n const mesh = new TriangleCustomMesh(positions, new Uint32Array(indices), null, null, null, uv0, uv1);\n mesh.generate_face_normals();\n const custom_mesh = viewer.create_custom_mesh(mesh.get_mesh_description(), material);\n viewer.set_cast_shadow(custom_mesh, shadow_only !== null && shadow_only !== void 0 ? shadow_only : false, false);\n shadow_only && viewer.remove_from_layer(custom_mesh, RENDER_LAYER_FORWARD);\n return custom_mesh;\n}\n//# sourceMappingURL=Room.js.map","import { ComponentIdSpan } from '@inter-ikea-core/core';\n\n/**\n * The ID:s of the components specific to the SKYTTA range.\n */\nexport class SkyttaComponentIds {\n public static readonly ViewerRoomComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID;\n public static readonly RailAttachmentPointComponentId =\n ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 1;\n public static readonly SlidingDoorFrameComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 2;\n public static readonly PanelComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 3;\n public static readonly SkyttaSizeComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 4;\n public static readonly RailTrackComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 5;\n public static readonly RailComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 6;\n public static readonly ScaledProductComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 7;\n public static readonly CeilingHeightReducerFrameComponentId =\n ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 8;\n public static readonly StopBarComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 9;\n public static readonly UserSelectionComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 10;\n public static readonly RailTrackTypeOptionsComponentId =\n ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 11;\n public static readonly DoorHeightOptionsComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 12;\n public static readonly PanelStyleOptionsComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 13;\n public static readonly DoorFrameColorOptionsComponentId =\n ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 14;\n public static readonly CeilingHeightReducerOptionsComponentId =\n ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 15;\n public static readonly StopBarOptionsComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 16;\n public static readonly RoomDimensionOptionsComponentId =\n ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 17;\n public static readonly DoorLayoutOptionsComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 18;\n public static readonly AnimationComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 19;\n public static readonly PreferredDoorHeightOptionsComponentId =\n ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 20;\n public static readonly CustomOutlineComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 21;\n public static readonly StorageBehindComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 22;\n public static readonly RoomTypeOptionsComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 23;\n public static readonly PanelPatternsComponentId = ComponentIdSpan.SKYTTA_PLANNER_BASE_ID + 24;\n}\n","import { ComponentDeserializer, JsonElement, SerializableComponent } from '@inter-ikea-core/core';\nimport { SkyttaComponentIds } from './SkyttaComponentIds';\n\nconst componentSerializationKey = 'CustomOutlineComponent';\n\nexport class CustomOutlineComponentDeserializer implements ComponentDeserializer {\n thisClassIsGuaranteedToNotModifyOrQueryCoreState = true;\n canHandle(serializationKey: string) {\n return serializationKey === componentSerializationKey;\n }\n\n deserialize(serializationKey: string, json: any) {\n const data: CustomOutlineComponent = JSON.parse(json.toString());\n\n switch (serializationKey) {\n case componentSerializationKey:\n return new CustomOutlineComponent(data.viewerId);\n }\n return null;\n }\n}\n\n/**\n * Placed on all entities that are panels\n */\n\nexport class CustomOutlineComponent implements SerializableComponent {\n /**\n *\n */\n public readonly typeId: number = SkyttaComponentIds.CustomOutlineComponentId;\n public readonly serializable: boolean = true;\n public readonly doStoreInSnapshot: boolean = true;\n public readonly viewerId: number;\n\n constructor(viewerId: number) {\n this.viewerId = viewerId;\n }\n\n serializationKey(): string {\n return componentSerializationKey;\n }\n\n toJson(parse: (json: string) => JsonElement): JsonElement {\n return parse(JSON.stringify(this));\n }\n\n /**\n * Comparison for entity manager.\n * @param _other\n * @returns\n */\n public eq(other: CustomOutlineComponent): boolean {\n return this.viewerId === other.viewerId;\n }\n}\n","export enum RailTypeEnum {\n TopRail,\n BottomRail\n}\n","export enum DoorWidthEnum {\n Wide,\n Thin\n}\n","import { RailTrackTypeEnum } from 'CoreAPI/Components/RailTrackTypeEnum';\n\nconst STOP_BAR_2_TRACKS_PRODUCT_REF = '00513236';\nconst STOP_BAR_3_TRACKS_PRODUCT_REF = '80513237';\n\nexport const STOP_BAR_WIDTH = 18;\nexport const STOP_BAR_HEIGHT = 2400;\n\nexport const getStopBarProductRef = (railTrackType: RailTrackTypeEnum) => {\n switch (railTrackType) {\n case RailTrackTypeEnum.TwoTrack:\n return STOP_BAR_2_TRACKS_PRODUCT_REF;\n case RailTrackTypeEnum.ThreeTrack:\n return STOP_BAR_3_TRACKS_PRODUCT_REF;\n default:\n throw Error(`${railTrackType} not implemented`);\n }\n};\n","/**\n * @author Kvadrat and Skytta\n * This file is a copy form\n * https://github.com/inter-ikea/cbf-re-ipex-kvadrat\n *\n * The sortNumbers function was later added by the SKYTTA team\n */\n\n/**\n * @param num The number to round\n * @param decimalPlaces The number of decimal places to preserve\n */\nfunction round(num: number, decimalPlaces: number): number {\n const decimal = 10 ** decimalPlaces;\n return Math.round(num * decimal) / decimal;\n}\n\nexport enum SortOrderEnum {\n Ascending,\n Descending\n}\n\nfunction sortNumbers(\n a: number,\n b: number,\n sortOrder: SortOrderEnum = SortOrderEnum.Ascending\n): number {\n return sortOrder === SortOrderEnum.Ascending ? a - b : b - a;\n}\n\nfunction sumArray(arr: number[]) {\n return arr.reduce((sum, num) => {\n return sum + num;\n }, 0);\n}\n\nexport { round, sortNumbers, sumArray };\n","import { DoorHeightEnum } from 'CoreAPI/Components/DoorHeightEnum';\nimport { RailTrackTypeEnum } from 'CoreAPI/Components/RailTrackTypeEnum';\nimport {\n MAX_SKYTTA_HEIGHT_HIGH_FRAME,\n MAX_SKYTTA_HEIGHT_LOW_FRAME,\n MIN_SKYTTA_HEIGHT_HIGH_FRAME,\n MIN_SKYTTA_HEIGHT_LOW_FRAME\n} from 'products/doorframes';\n\nexport class RailCalculations {\n public static getRailTrackType(numberOfDoors: number) {\n if (numberOfDoors === 2 || numberOfDoors === 4) return RailTrackTypeEnum.TwoTrack;\n return RailTrackTypeEnum.ThreeTrack;\n }\n\n public static doUseThreeTrack(numberOfDoors: number) {\n return this.getRailTrackType(numberOfDoors) === RailTrackTypeEnum.ThreeTrack;\n }\n\n public static getUpperRailAttachmentHeight(doorHeightType: DoorHeightEnum, roomHeight: number) {\n switch (doorHeightType) {\n case DoorHeightEnum.Low:\n if (roomHeight < MIN_SKYTTA_HEIGHT_LOW_FRAME) {\n return MIN_SKYTTA_HEIGHT_LOW_FRAME;\n } else if (roomHeight > MAX_SKYTTA_HEIGHT_LOW_FRAME) {\n return MAX_SKYTTA_HEIGHT_LOW_FRAME;\n }\n return roomHeight;\n case DoorHeightEnum.High:\n if (roomHeight < MIN_SKYTTA_HEIGHT_HIGH_FRAME) {\n return MIN_SKYTTA_HEIGHT_HIGH_FRAME;\n } else if (roomHeight > MAX_SKYTTA_HEIGHT_HIGH_FRAME) {\n return MAX_SKYTTA_HEIGHT_HIGH_FRAME;\n }\n return roomHeight;\n default:\n throw Error(doorHeightType + ' not implemented');\n }\n }\n}\n","import { DoorWidthEnum } from 'CoreAPI/Components/DoorWidthEnum';\nimport { RailTrackTypeEnum } from 'CoreAPI/Components/RailTrackTypeEnum';\nimport { STOP_BAR_WIDTH } from 'products/stopbarproducts';\nimport { MM_PER_CM } from 'utils/constants';\nimport { sortNumbers, sumArray } from 'utils/mathUtil';\nimport { RailCalculations } from './RailCalculations';\n\nexport const DEFAULT_DOOR_LAYOUT_INDEX = 2;\n\nexport enum DoorLayoutStatusEnum {\n Recommended,\n GoodFit,\n IsRecommendedWithStopbars,\n CanBeRecommendedWithStopbars,\n ConsiderOpening,\n ConsiderLargeOverlap,\n ConsiderSmallOverlap,\n RoomIsTooLarge,\n OneDoorTooMany,\n Unknown\n}\n\n/**\n * Business logic that calculates number of doors.\n *\n * Planning rules:\n * - Plan, if possible, with same door widths.\n * - Plan, if possible, doors in pairs.\n * - Put the widest door in the back, to access them easily.\n *\n */\nexport interface IDoorLayout {\n numThin: number;\n numWide: number;\n maxWidth: number;\n}\n\nexport interface IPossibleDoorLayout extends IDoorLayout {\n index: number;\n opening: number;\n totalOverlap: number;\n isBest: boolean;\n types: DoorLayoutStatusEnum[];\n railTrack: RailTrackTypeEnum;\n}\n\nconst DEFAULT_FILTER: DoorLayoutStatusEnum[] = [\n DoorLayoutStatusEnum.Recommended,\n DoorLayoutStatusEnum.CanBeRecommendedWithStopbars,\n DoorLayoutStatusEnum.IsRecommendedWithStopbars,\n DoorLayoutStatusEnum.ConsiderLargeOverlap,\n DoorLayoutStatusEnum.ConsiderOpening\n];\n\nconst EXCLUDE_FILTER: DoorLayoutStatusEnum[] = [\n DoorLayoutStatusEnum.Unknown,\n DoorLayoutStatusEnum.RoomIsTooLarge,\n DoorLayoutStatusEnum.OneDoorTooMany\n];\n\nexport abstract class DoorCalculations {\n public static readonly thinDoorWidthMm = 771;\n public static readonly wideDoorWidthMm = 1021;\n public static readonly minimumOverlap = 25;\n public static readonly minimumGoodOverlapPerDoor = 150;\n public static readonly minimumGoodOpening = 700;\n\n public static getDoorTypeWidthInMm(widthType: DoorWidthEnum) {\n switch (widthType) {\n case DoorWidthEnum.Thin:\n return DoorCalculations.thinDoorWidthMm;\n case DoorWidthEnum.Wide:\n return DoorCalculations.wideDoorWidthMm;\n }\n }\n\n public static getDoorTypeFromWidthInMm(widthTypeWidthInMm: number) {\n return widthTypeWidthInMm === DoorCalculations.thinDoorWidthMm\n ? DoorWidthEnum.Thin\n : DoorWidthEnum.Wide;\n }\n\n // There must probably be a better way to solve this than having to recalculate this every time...\n public static getAllDoorLayouts() {\n const layouts: IDoorLayout[] = [];\n const minNrOfDoors = 2;\n const maxNrOfDoors = 6;\n for (var numThin = 0; numThin <= maxNrOfDoors; numThin++) {\n for (var numWide = 0; numWide <= maxNrOfDoors; numWide++) {\n const totalNrOfDoors = numThin + numWide;\n const totalMinimumOverlap = (totalNrOfDoors - 1) * DoorCalculations.minimumOverlap;\n const totalWidth =\n numThin * DoorCalculations.thinDoorWidthMm + numWide * DoorCalculations.wideDoorWidthMm;\n const maxWidth = totalWidth - totalMinimumOverlap;\n if (totalNrOfDoors >= minNrOfDoors && totalNrOfDoors <= maxNrOfDoors) {\n layouts.push({\n numThin,\n numWide,\n maxWidth\n });\n }\n }\n }\n // Sort them\n layouts.sort((a, b) => {\n return a.maxWidth - b.maxWidth;\n });\n return layouts;\n }\n\n private static getStatusType(\n layout: IDoorLayout,\n roomWidth: number,\n selectedStopBar: boolean,\n maxOpening: number\n ) {\n const overlapPerDoor = Math.round(\n DoorCalculations.getOverlapPerDoor(\n roomWidth,\n layout.numThin,\n layout.numWide,\n undefined,\n selectedStopBar\n )\n );\n\n const totalNrOfDoors = layout.numThin + layout.numWide;\n const stopbarWidth = selectedStopBar ? STOP_BAR_WIDTH * 2 : 0;\n\n const totalMinimumOverlap = (totalNrOfDoors - 1) * DoorCalculations.minimumOverlap;\n\n const considerLargeOverlap = overlapPerDoor > DoorCalculations.minimumGoodOverlapPerDoor;\n\n const roomIsTooLarge = roomWidth > layout.maxWidth + totalMinimumOverlap + stopbarWidth;\n\n const considerSmallOverlap =\n overlapPerDoor <= DoorCalculations.minimumOverlap && !roomIsTooLarge;\n\n const canBeRecommended =\n roomWidth >= layout.maxWidth && roomWidth <= layout.maxWidth + STOP_BAR_WIDTH * 2;\n\n const recommended = roomWidth <= layout.maxWidth + stopbarWidth && !considerLargeOverlap;\n\n const totalDoorWidth =\n layout.numWide * DoorCalculations.getDoorTypeWidthInMm(DoorWidthEnum.Wide) +\n layout.numThin * DoorCalculations.getDoorTypeWidthInMm(DoorWidthEnum.Thin);\n\n const thinnestDoor =\n layout.numThin > 0\n ? DoorCalculations.getDoorTypeWidthInMm(DoorWidthEnum.Thin)\n : DoorCalculations.getDoorTypeWidthInMm(DoorWidthEnum.Wide);\n\n const oneDoorTooMany = totalDoorWidth - thinnestDoor > roomWidth;\n const considerOpening = maxOpening < DoorCalculations.minimumGoodOpening;\n\n const types: DoorLayoutStatusEnum[] = [];\n\n if (recommended) {\n types.push(\n canBeRecommended\n ? DoorLayoutStatusEnum.IsRecommendedWithStopbars\n : DoorLayoutStatusEnum.Recommended\n );\n } else if (canBeRecommended) {\n types.push(DoorLayoutStatusEnum.CanBeRecommendedWithStopbars);\n } else if (considerSmallOverlap) {\n types.push(DoorLayoutStatusEnum.ConsiderSmallOverlap);\n } else if (roomIsTooLarge) {\n types.push(DoorLayoutStatusEnum.RoomIsTooLarge);\n }\n\n if (considerLargeOverlap) {\n types.push(DoorLayoutStatusEnum.ConsiderLargeOverlap);\n }\n\n if (considerOpening) {\n types.push(DoorLayoutStatusEnum.ConsiderOpening);\n }\n\n if (oneDoorTooMany) {\n types.push(DoorLayoutStatusEnum.OneDoorTooMany);\n }\n\n return { types };\n }\n\n public static getDoorSetupForMaxOpening(layout: IDoorLayout, railTrackType: RailTrackTypeEnum) {\n const nrOfTracks = railTrackType === RailTrackTypeEnum.ThreeTrack ? 3 : 2;\n\n const tracks = Array.from({ length: nrOfTracks }, () => [0]);\n\n const { numThin, numWide } = layout;\n const wideDoorWidth = DoorCalculations.getDoorTypeWidthInMm(DoorWidthEnum.Wide);\n const thinDoorWidth = DoorCalculations.getDoorTypeWidthInMm(DoorWidthEnum.Thin);\n\n const doorWidths: number[] = new Array(numThin + numWide);\n doorWidths.fill(wideDoorWidth, 0, numWide);\n doorWidths.fill(thinDoorWidth, numWide, numWide + numThin);\n\n const filledTracks = doorWidths.reduce((newTracks, doorWidth) => {\n const tracksSorted = newTracks.sort((aTrack, bTrack) => {\n return sortNumbers(\n aTrack.reduce((a, b) => a + b, 0),\n bTrack.reduce((a, b) => a + b, 0)\n );\n });\n\n tracksSorted[0].push(doorWidth);\n\n return tracksSorted;\n }, tracks);\n\n return filledTracks\n .map(track => track.filter(Boolean))\n .sort((a, b) => {\n // sort tracks based on total door width on each track\n return sumArray(a) - sumArray(b);\n });\n }\n\n public static getMaxOpening(\n layout: IDoorLayout,\n roomWidth: number,\n railTrackType: RailTrackTypeEnum\n ) {\n const { numThin, numWide } = layout;\n const nrOfTracks = railTrackType === RailTrackTypeEnum.ThreeTrack ? 3 : 2;\n\n const wideDoorWidth = DoorCalculations.getDoorTypeWidthInMm(DoorWidthEnum.Wide);\n const thinDoorWidth = DoorCalculations.getDoorTypeWidthInMm(DoorWidthEnum.Thin);\n\n const tracks: number[] = new Array(nrOfTracks);\n tracks.fill(0);\n\n const doorWidths: number[] = new Array(numThin + numWide);\n doorWidths.fill(wideDoorWidth, 0, numWide);\n doorWidths.fill(thinDoorWidth, numWide, numWide + numThin);\n\n const tracksWithDoors = doorWidths.reduce((newTracks, doorWidth) => {\n newTracks.sort(sortNumbers)[0] += doorWidth;\n\n return newTracks;\n }, tracks);\n\n const widestTrack = tracksWithDoors.sort(sortNumbers)[tracksWithDoors.length - 1];\n\n return roomWidth - widestTrack;\n }\n\n public static getPossibleLayouts(\n roomWidth: number,\n selectedStopBar: boolean,\n selectedIndex?: number,\n selectedTrackType?: RailTrackTypeEnum\n ) {\n const allLayouts = this.getAllDoorLayouts();\n let bestLayoutIndex: number | undefined;\n\n const possibleLayouts: IPossibleDoorLayout[] = allLayouts\n .map((layout, index) => {\n const stopbarWidth = selectedStopBar ? STOP_BAR_WIDTH * 2 : 0;\n const widthToFill = roomWidth - stopbarWidth;\n const isBest = bestLayoutIndex === undefined && layout.maxWidth >= widthToFill;\n if (isBest) {\n bestLayoutIndex = index;\n }\n\n const totalOverlap = this.getTotalOverlap(\n layout.numThin,\n layout.numWide,\n roomWidth,\n selectedStopBar\n );\n\n const railTrackType: RailTrackTypeEnum =\n index === selectedIndex && selectedTrackType !== undefined\n ? selectedTrackType\n : RailCalculations.getRailTrackType(layout.numThin + layout.numWide);\n const maxOpening = this.getMaxOpening(layout, roomWidth, railTrackType);\n\n const { types } = this.getStatusType(layout, roomWidth, selectedStopBar, maxOpening);\n\n const possibleLayout: IPossibleDoorLayout = {\n ...layout,\n index: index,\n isBest: isBest,\n totalOverlap: totalOverlap,\n opening: maxOpening,\n types: types,\n railTrack: railTrackType\n };\n\n return possibleLayout;\n })\n // \"Remove\" unwanted suggestions here\n .filter(\n layout =>\n (layout.index === selectedIndex ||\n layout.isBest ||\n DEFAULT_FILTER.length === 0 ||\n layout.types.some(type => DEFAULT_FILTER.includes(type))) &&\n !layout.types.some(type => EXCLUDE_FILTER.includes(type))\n );\n\n return possibleLayouts;\n }\n\n // The layout that is closest do the room width is considered the best\n public static getBestLayoutIndex(roomWidth: number, considerStopbars?: boolean) {\n const allLayouts = this.getAllDoorLayouts();\n const widthToFill = considerStopbars ? roomWidth - STOP_BAR_WIDTH * 2 : roomWidth;\n return allLayouts.findIndex(layout => layout.maxWidth >= widthToFill);\n }\n\n public static getDoorLayout(index: number) {\n const allLayouts = this.getAllDoorLayouts();\n return allLayouts[index];\n }\n\n public static calculateNumberOfDoors(roomWidth: number, considerStopbars?: boolean) {\n const bestLayoutIndex = this.getBestLayoutIndex(roomWidth, considerStopbars);\n const bestLayout = this.getDoorLayout(bestLayoutIndex);\n\n return {\n thin: bestLayout.numThin,\n wide: bestLayout.numWide\n };\n }\n\n /**\n * Calculates the overlap per door based on room width and the number of\n * doors that would be required to fill that gap.\n *\n * @param roomWidth\n * @returns Overlap in mm.\n */\n public static getOverlapPerDoor(\n roomWidth: number,\n numThinDoors: number,\n numWideDoors: number,\n numberOfInvalidOverlaps: number = 0,\n haveStopbars?: boolean\n ) {\n const numberOfOverlaps = numThinDoors + numWideDoors - 1 - numberOfInvalidOverlaps;\n if (numberOfOverlaps === 0) {\n return 0;\n }\n\n const totalOverlap = this.getTotalOverlap(numThinDoors, numWideDoors, roomWidth, haveStopbars);\n const overlapPerDoor = totalOverlap / numberOfOverlaps;\n\n return overlapPerDoor;\n }\n\n private static getTotalOverlap(\n numThinDoors: number,\n numWideDoors: number,\n roomWidth: number,\n haveStopbars?: boolean\n ) {\n const totalDoorWidth =\n numThinDoors * DoorCalculations.thinDoorWidthMm +\n numWideDoors * DoorCalculations.wideDoorWidthMm;\n const stopBarWidth = haveStopbars ? STOP_BAR_WIDTH * 2 : 0;\n return totalDoorWidth - roomWidth + stopBarWidth;\n }\n\n public static logAllDoorLayoutsOptions() {\n const widthRange = { min: 150, max: 600 };\n for (let roomWidth = widthRange.min; roomWidth <= widthRange.max; roomWidth++) {\n const layouts = this.getPossibleLayouts(roomWidth * MM_PER_CM, false);\n\n console.log(\n roomWidth,\n layouts.length,\n layouts.filter(layout => layout.types.includes(DoorLayoutStatusEnum.Recommended)).length\n );\n }\n }\n}\n","// A type guard function that checks if a given value is not null or undefined.\nexport const nonNullable = (value: T): value is NonNullable => {\n return value != null;\n};\n","import { DoorHeightEnum } from 'CoreAPI/Components/DoorHeightEnum';\nimport { DoorWidthEnum } from 'CoreAPI/Components/DoorWidthEnum';\nimport { prependArt, verifyProduct } from 'redux-store/products/products.utils';\nimport { IShoppingProductsMap } from 'utils/constants';\nimport { nonNullable } from 'utils/nonNullable';\n\nexport const DEFAULT_PANEL_STYLE_INDEX = [6, 10]; // MEHAMN dark grey and MEHAMN white oak, goes by order as priority.\n\nexport const PANELS_THAT_CAN_NOT_BE_CUT = [0, 1, 2, 3, 11, 13, 15]; // AULI x 2, BJÖRNÖYA, FÄRVIK, SEKKEN, SVARTISDAL & TJÖRHOM\nconst PANELS_THAT_CAN_BE_FLIPPED = [6, 7, 8, 9, 10, 14]; // MEHAMN, TJODALYNG\n\nconst ALL_PANELS = [\n [\n // wide\n [\n // low\n '10211276', //\tAULI 4 pnls f sldng dr frm 100x201 mirror glass\n '00587741', // AULI NEW 2024 4 pnls f sldng dr frm 100x201 mirror glass\n '10480749', //\tBJÖRNÖYA 4 pnls f sd fr 100x201 gry tint eff\n '20250314', //\tFÄRVIK 4 pnls f sldng dr frm 100x201 white glass\n '00373801', //\tHOKKSUND 4 pnls f sldng dr frm 100x201 hi-gl lbeig\n '60382341', //\tHOKKSUND 4 pnls f sldng dr frm 100x201 hi-gl lgrey\n '80510903', // MEHAMN 4 pnls f sldng dr frm 100x201 dgrey/bei\n '30575572', // MEHAMN 4 pnls f sldng dr frm 100x201 lblue/lgrn\n '20421189', //\tMEHAMN 4 pnls f sd frm 100x201 bbsa eff/bsa eff\n '00445252', //\tMEHAMN 4 pnls f sldng dr frm 100x201 oak eff/lgrey\n '00421185', //\tMEHAMN 4 pnls f sldng dr frm 100x201 wso eff/wh\n '20442342', //\tSEKKEN N 4 pnls f sldng dr frm 100x201 frst gls, Not available in app config\n '20483177', //\tSTORFOSNA 4 pnls f sldng dr frm 100x201 lgrey felt, Not available in app config\n '20473569', // SVARTISDAL 100x201 cm\n '10481070', //\tTJODALYNG 4 pnls f sldng dr frm 100x201 lgr/dbl, Not available in app config\n '20480678' // TJÖRHOM 4 pnls f sldng dr frm 100x201 white\n ],\n [\n // high\n '90211277', //\tAULI 4 pnls f sldng dr frm 100x236 mirror glass\n '60587743', // AULI NEW 2024 4 pnls f sldng dr frm 100x236 mirror glass\n '70480751', //\tBJÖRNÖYA 4 pnls f sd dr fr 100x236 gry tint eff\n '70250316', //\tFÄRVIK 4 pnls f sldng dr frm 100x236 white glass\n '80373802', //\tHOKKSUND 4 pnls f sldng dr frm 100x236 hi-gl lbeig\n '00382344', //\tHOKKSUND 4 pnls f sldng dr frm 100x236 hi-gl lgrey\n '30510905', // MEHAMN 4 pnls f sldng dr frm 100x236 dgrey/bei\n '90575574', // MEHAMN 4 pnls f sldng dr frm 100x236 lblue/lgrn\n '00421190', //\tMEHAMN 4 pnls f sd frm 100x236 bbsa eff/bsa eff, Not available in app config\n '80445253', //\tMEHAMN 4 pnls f sldng dr frm 100x236 oak eff/lgrey, Not available in app config\n '80421186', //\tMEHAMN 4 pnls f sldng dr frm 100x236 wso eff/wh\n '50442345', //\tSEKKEN N 4 pnls f sldng dr frm 100x236 frst gls, Not available in app config\n '80483179', //\tSTORFOSNA 4 pnls f sldng dr frm 100x236 lgrey felt, Not available in app config\n '60473572', // SVARTISDAL 100x236 cm\n '70481072', //\tTJODALYNG 4 pnls f sldng dr frm 100x236 lg/dbl, Not available in app config\n '60480681' // TJÖRHOM 4 pnls f sldng dr frm 100x236 white\n ]\n ],\n [\n // thin\n [\n // low\n '60211274', //\tAULI 4 pnls f sldng dr frm 75x201 mirror glass\n '10587745', // AULI NEW 2024 4 pnls f sldng dr frm 75x201 mirror glass\n '10480754', //\tBJÖRNÖYA 4 pnls f sd dr fr 75x201 gry tint eff\n '60250312', //\tFÄRVIK 4 pnls f sldng dr frm 75x201 white glass\n '60373803', //\tHOKKSUND 4 pnls f sldng dr frm 75x201 hi-gl lbeige\n '30382347', //\tHOKKSUND 4 pnls f sldng dr frm 75x201 hi-gl lgrey\n '70510908', // MEHAMN 4 pnls f sldng dr frm 75x201 dgrey/bei\n '90575569', // MEHAMN 4 pnls f sldng dr frm 75x201 lblue/lgrn\n '80421191', //\tMEHAMN 4 pnls f sd frm 75x201 bbsa eff/bsa eff, Not available in app config\n '60445254', //\tMEHAMN 4 pnls f sldng dr frm 75x201 oak eff/lgrey, Not available in app config\n '90421195', //\tMEHAMN 4 pnls f sldng dr frm 75x201 wso eff/wh\n '90442348', //\tSEKKEN N 4 pnls f sldng dr frm 75x201 frst gls, Not available in app config\n '40483181', //\tSTORFOSNA 4 pnls f sldng dr frm 75x201 lgrey felt, Not available in app config\n '90473575', // SVARTISDAL 75x201 cm\n '30481074', //\tTJODALYNG 4 pnls f sldng dr frm 75x201 lgrn/dbl, Not available in app config\n '20480683' //\t TJÖRHOM 4 pnls f sldng dr frm 75x201 white\n ],\n [\n // high\n '30211275', //\tAULI 4 pnls f sldng dr frm 75x236 mirror glass\n '70587747', // AULI NEW 2024 4 pnls f sldng dr frm 75x236 mirror glass\n '60480756', //\tBJÖRNÖYA 4 pnls f sd fr 75x236 gry tint eff\n '20250333', //\tFÄRVIK 4 pnls f sldng dr frm 75x236 white glass\n '40373804', //\tHOKKSUND 4 pnls f sldng dr frm 75x236 hi-gl lbeige\n '70382350', //\tHOKKSUND 4 pnls f sldng dr frm 75x236 hi-gl lgrey\n '30510910', // MEHAMN 4 pnls f sldng dr frm 75x236 dgrey/beige\n '50575571', // MEHAMN 4 pnls f sldng dr frm 75x236 lblue/lgrn\n '60421192', //\tMEHAMN 4 pnls f sd frm 75x236 bbsa eff/bsa eff, Not available in app config\n '30445255', //\tMEHAMN 4 pnls f sldng dr frm 75x236 oak eff/lgrey, Not available in app config\n '40421188', //\tMEHAMN 4 pnls f sldng dr frm 75x236 wso eff/wh\n '10442352', //\tSEKKEN N 4 pnls f sldng dr frm 75x236 frst gls, Not available in app config\n '00483183', //\tSTORFOSNA 4 pnls f sldng dr frm 75x236 lgrey felt, Not available in app config\n '30473578', // SVARTISDAL 75x236 cm\n '80481076', //\tTJODALYNG 4 pnls f sldng dr frm 75x236 lgrn/dbl, Not available in app config\n '70480685' //\t TJÖRHOM 4 pnls f sldng dr frm 75x236 white\n ]\n ]\n];\n\nexport const getDefaultPanels = (doorHeightOptionsAvailable: DoorHeightEnum[]) => {\n const doorHeight = doorHeightOptionsAvailable.includes(DoorHeightEnum.High)\n ? DoorHeightEnum.High\n : DoorHeightEnum.Low;\n\n return ALL_PANELS[DoorWidthEnum.Wide][doorHeight];\n};\n\nconst ALL_PANELS_FLATTENED = ALL_PANELS.flat(2);\n\nexport const getPanelProductReference = (\n styleIndex: number,\n width: DoorWidthEnum,\n height: DoorHeightEnum\n) => {\n return ALL_PANELS[width][height][styleIndex];\n};\n\nexport const getPanelProductReferences = (width: DoorWidthEnum, height: DoorHeightEnum) => {\n return ALL_PANELS[width][height];\n};\n\nexport const isPanelPossibleToCut = (index: number) => {\n return !PANELS_THAT_CAN_NOT_BE_CUT.includes(index);\n};\n\nexport const isPanelPossibleToFlip = (index: number) => {\n return PANELS_THAT_CAN_BE_FLIPPED.includes(index);\n};\n\nexport const getPanelStyleIndex = (panelArticleId: string) => {\n return (\n ALL_PANELS_FLATTENED.findIndex(id => {\n return id === panelArticleId;\n }) % ALL_PANELS[0][0].length\n );\n};\n\n/**\n * Gets first panel in this order:\n * 1. Get global fallback if valid.\n * 2. Get first panel in list that is valid.\n *\n */\nexport const getDefaultPanel = (productData: IShoppingProductsMap, defaultPanels: string[]) => {\n const globalDefaultPanels = DEFAULT_PANEL_STYLE_INDEX.map(value => {\n const articleId = prependArt(defaultPanels[value]);\n const globalDefaultPanelData = verifyProduct(productData[articleId], defaultPanels)\n ? productData[articleId]\n : undefined;\n return globalDefaultPanelData;\n }).filter(nonNullable);\n\n if (globalDefaultPanels.length > 0) {\n return globalDefaultPanels[0];\n }\n\n const validPanels = defaultPanels.filter(value => {\n return verifyProduct(productData[prependArt(value)], defaultPanels);\n });\n\n return productData[prependArt(validPanels[0])];\n};\n","import { IProduct } from '@inter-ikea-kompis/types/lib';\nimport { TotalPriceCalculator } from '@inter-ikea-kompis/utilities/lib';\nimport { product2ShoppingProduct } from 'redux-store/products/products.utils';\nimport { IAppSettings } from 'redux-store/settings/settings.store';\n\nexport const getTotalAmountForProducts = (products: IProduct[], settings: IAppSettings): number => {\n const totalPricesDualCurrency = TotalPriceCalculator.calculateMultiple(\n products.map(product2ShoppingProduct),\n settings.localisation.dateFormat\n );\n\n return totalPricesDualCurrency[0].inclTax;\n};\n","export enum PanelPattern {\n Solid,\n Columns,\n Checkerboard,\n HorizontalBand,\n Rows,\n Quarters,\n HorizontalSplit,\n Unknown\n}\n","import {\n ComponentIds,\n Core,\n Entity,\n HierarchyUtils,\n LocalTransformComponent\n} from '@inter-ikea-core/core';\nimport { IProduct } from '@inter-ikea-kompis/types';\nimport structuredClone from '@ungap/structured-clone';\nimport { DoorWidthEnum } from 'CoreAPI/Components/DoorWidthEnum';\nimport { PanelComponent } from 'CoreAPI/Components/PanelComponent';\nimport { SkyttaComponentIds } from 'CoreAPI/Components/SkyttaComponentIds';\nimport SkyttaSizeComponent from 'CoreAPI/Components/SkyttaSizeComponent';\nimport CoreAPI from 'CoreAPI/coreApi';\nimport { getDoorsFramesInScene, getSelectedEntities } from 'CoreAPI/coreSceneQueries';\nimport { DoorCalculations } from 'businessLogic/DoorCalculations';\nimport { ICombinedProduct } from 'components/CustomizeMenu';\nimport {\n getPanelProductReferences,\n getPanelStyleIndex,\n isPanelPossibleToCut,\n isPanelPossibleToFlip\n} from 'products/panels';\nimport { IPanelStyle } from 'redux-store/configuration/configuration.store';\nimport { shoppingItem2ProductId } from 'redux-store/products/products.utils';\nimport { getProductItemsByIds } from 'redux-store/rootReducer';\nimport { IAppSettings } from 'redux-store/settings/settings.store';\nimport { NavigationSectionsEnum } from 'utils/constants';\nimport { getTotalAmountForProducts } from 'utils/getTotalAmountForProducts';\nimport { nonNullable } from 'utils/nonNullable';\nimport { PanelPattern } from '../Patterns/types/PanelPattern';\n\nexport enum PanelsChangedEventType {\n PANELS_CHANGED = 'panels_changed',\n PANELS_FLIPPED = 'panels_flipped'\n}\n\nexport interface IPanelItem {\n key: string;\n disabled: boolean;\n product: IProduct;\n productVariations: IProduct[] | undefined;\n panelCanBeFlipped: boolean;\n panelStyleIndex: number;\n panelStyle: IPanelStyle;\n price: number;\n}\n\ninterface ICombinedPanelProduct extends ICombinedProduct {\n panelStyleIndex: number;\n}\n\nconst getThinPanels = (coreApi: CoreAPI) => {\n const { selectedDoorLayoutIndex, selectedDoorHeight } =\n coreApi.productPlacementUtil.userSelections;\n const selectedLayout = DoorCalculations.getDoorLayout(selectedDoorLayoutIndex);\n\n if (selectedLayout.numThin > 0) {\n const thinItems: string[] = getPanelProductReferences(\n DoorWidthEnum.Thin,\n selectedDoorHeight\n ).map(art => {\n return shoppingItem2ProductId({ id: art, type: 'ART', quantity: 1 });\n });\n return thinItems;\n }\n\n return [];\n};\n\nconst getWidePanels = (coreApi: CoreAPI) => {\n const { selectedDoorLayoutIndex, selectedDoorHeight } =\n coreApi.productPlacementUtil.userSelections;\n const selectedLayout = DoorCalculations.getDoorLayout(selectedDoorLayoutIndex);\n\n if (selectedLayout.numWide > 0) {\n const wideItems: string[] = getPanelProductReferences(\n DoorWidthEnum.Wide,\n selectedDoorHeight\n ).map(art => {\n return shoppingItem2ProductId({ id: art, type: 'ART', quantity: 1 });\n });\n return wideItems;\n }\n\n return [];\n};\n\nconst getActivePanelItemsByDoorLayout = (coreApi: CoreAPI) => {\n const thinItems = getThinPanels(coreApi);\n const wideItems = getWidePanels(coreApi);\n\n const items: string[] = [...thinItems, ...wideItems];\n\n return { items, thinItems, wideItems };\n};\n\nexport const getProductsForPanels = (coreApi: CoreAPI) => {\n const { items, thinItems, wideItems } = getActivePanelItemsByDoorLayout(coreApi);\n\n const productData = getProductItemsByIds(items);\n\n const thinProducts = getProductItemsByIds(thinItems);\n const wideProducts = getProductItemsByIds(wideItems);\n\n return productData\n .map((_product, index) => {\n const bothAreValidDraft: boolean =\n (!thinItems.length || thinProducts[index]?.valid) &&\n (!wideItems.length || wideProducts[index]?.valid);\n\n const panelStyleIndex = getPanelStyleIndex(\n (thinProducts[index]?.itemId ?? wideProducts[index]?.itemId)?.split('ART-')[1]\n );\n\n if (bothAreValidDraft) {\n return {\n panelStyleIndex,\n thinProduct: thinProducts[index] || undefined,\n wideProduct: wideProducts[index] || undefined\n };\n }\n return false;\n })\n .filter(Boolean) as ICombinedPanelProduct[];\n};\n\nconst sortPanels = (allPanelItems: IPanelItem[]) => {\n const filterAndSortDisabled = allPanelItems\n .filter(value => {\n return value.disabled;\n })\n .sort((a, b) => {\n return a.price - b.price;\n });\n const filterAndSortActive = allPanelItems\n .filter(value => {\n return !value.disabled;\n })\n .sort((a, b) => {\n return a.price - b.price;\n });\n\n return [...filterAndSortActive, ...filterAndSortDisabled];\n};\n\nexport const getDoorsInScope = (core: Core): Entity[] => {\n const selectedEntities = getSelectedEntities(core);\n return selectedEntities.length ? selectedEntities : getDoorsFramesInScene(core);\n};\n\nexport const getDoorWidths = (doorsInScope: Entity[]): DoorWidthEnum[] => {\n return doorsInScope.reduce((widths: DoorWidthEnum[], door: Entity) => {\n const sizeComponent = door.getComponent(\n SkyttaComponentIds.SkyttaSizeComponentId\n );\n\n if (sizeComponent) {\n widths.push(sizeComponent.width);\n }\n\n return widths;\n }, []);\n};\n\nexport const getPanelStyleFromEntity = (panel: Entity) => {\n const index = panel.getComponent(SkyttaComponentIds.PanelComponentId)?.styleIndex;\n\n const localRotation = panel.getComponent(\n ComponentIds.LOCAL_TRANSFORM_COMPONENT_ID\n )?.transform.rotation;\n\n const isFlipped = localRotation?.y === 1 || localRotation?.y === -1;\n\n if (!index) {\n return null;\n }\n\n return {\n index,\n isFlipped\n };\n};\n\nexport const comparePanelStyles = (p1: IPanelStyle, p2: IPanelStyle): boolean => {\n return p1.index === p2.index && p1.isFlipped === p2.isFlipped;\n};\n\nexport const replacePanelsInScope = (coreApi: CoreAPI, panelStyle: IPanelStyle) => {\n coreApi.productPlacementUtil.userSelections.selectedPanelPattern = PanelPattern.Unknown;\n\n // When a door is selected, only change the panels on that door\n const selectedEntities = getSelectedEntities(coreApi.core);\n if (selectedEntities.length > 0) {\n selectedEntities.forEach(entity => {\n if (entity.hasComponent(SkyttaComponentIds.SlidingDoorFrameComponentId)) {\n coreApi.productPlacementUtil.replacePanelsInDoor(entity, panelStyle);\n }\n });\n return;\n }\n\n coreApi.productPlacementUtil.removeAllPanels();\n coreApi.productPlacementUtil.addUniformPanels(panelStyle);\n};\n\nexport const getPanelsInScopeStyleIndexes = (doorsInScope: Entity[]) => {\n return doorsInScope.flatMap(doorFrame => {\n return HierarchyUtils.children(doorFrame).map(child => {\n return child.getComponent(SkyttaComponentIds.PanelComponentId)?.styleIndex;\n });\n });\n};\n\nexport const getPanelsInScope = (selectedEntities: Entity[]): IPanelStyle[] => {\n const panels: Entity[] = selectedEntities.reduce((acc: Entity[], entity) => {\n if (entity.hasComponent(SkyttaComponentIds.PanelComponentId)) {\n acc.push(entity);\n }\n\n if (entity.hasComponent(SkyttaComponentIds.SlidingDoorFrameComponentId)) {\n HierarchyUtils.children(entity).map(panel => {\n return acc.push(panel);\n });\n }\n\n return acc;\n }, []);\n\n return panels\n .map(panel => {\n return getPanelStyleFromEntity(panel);\n })\n .filter(nonNullable);\n};\n\nexport const getDataForPanelItems = (\n validProducts: ICombinedPanelProduct[],\n coreApi: CoreAPI,\n settings: IAppSettings\n) => {\n const panelItems: IPanelItem[] = validProducts.reduce(\n (panels: IPanelItem[], combinedProduct: ICombinedPanelProduct) => {\n const { thinProduct, wideProduct, panelStyleIndex } = combinedProduct;\n\n const product = thinProduct || wideProduct;\n\n if (product && product.content) {\n const bothAreValid: boolean =\n (!thinProduct || thinProduct?.valid) && (!wideProduct || wideProduct?.valid);\n\n const selectedPanelsCanNotBeCut = !isPanelPossibleToCut(panelStyleIndex);\n const howMuchToCut = coreApi.productPlacementUtil.howMuchToCut();\n\n const disableDoorsThatCanNotBeCut = howMuchToCut > 0 && selectedPanelsCanNotBeCut;\n const disabled = !bothAreValid || disableDoorsThatCanNotBeCut;\n\n const panelCanBeFlipped = isPanelPossibleToFlip(combinedProduct.panelStyleIndex);\n\n const productVariants: IProduct[] = [];\n if (thinProduct) productVariants.push(thinProduct);\n if (wideProduct) productVariants.push(wideProduct);\n const productVariations = productVariants.length > 1 ? productVariants : undefined;\n\n const key = `${NavigationSectionsEnum.Panels}-${panelStyleIndex}`;\n\n const price = getTotalAmountForProducts(productVariants, settings);\n\n const panel: IPanelItem = {\n key,\n product,\n productVariations,\n panelStyleIndex,\n panelStyle: { index: panelStyleIndex, isFlipped: false },\n panelCanBeFlipped,\n disabled,\n price\n };\n\n panels.push(panel);\n\n if (panelCanBeFlipped) {\n // Temp fix to get correct image\n // Ongoing discussion with Kompis if this can be solved better\n // https://i-p-e-x.slack.com/archives/CEY6PNS0Y/p1713439094601039\n const backSideProduct = structuredClone(product);\n if (panelCanBeFlipped && backSideProduct.content) {\n backSideProduct.content?.image?.splice(backSideProduct.content.image.length - 2, 1);\n }\n\n panels.push({\n ...panel,\n key: `${key}-backside`,\n product: backSideProduct,\n panelStyle: { index: panelStyleIndex, isFlipped: true }\n });\n }\n }\n return panels;\n },\n [] as IPanelItem[]\n );\n\n return sortPanels(panelItems);\n};\n\n/**\n * Reverses order since panels are placed from bottom to top in core\n */\nexport const getPanelsInDoorFrameSortedFromTopToBottom = (doorFrame: Entity) => {\n return HierarchyUtils.children(doorFrame).sort((a, b) => {\n return (\n b.getComponentUnsafe(SkyttaComponentIds.PanelComponentId)\n .verticalPositionInDoorFrame -\n a.getComponentUnsafe(SkyttaComponentIds.PanelComponentId)\n .verticalPositionInDoorFrame\n );\n });\n};\n","import { Vector } from '@inter-ikea-core/core';\nimport { DoorHeightEnum } from 'CoreAPI/Components/DoorHeightEnum';\nimport store from 'redux-store/store';\nimport { isRunningTest } from 'utils/platform';\n\nexport const DefaultRoomSettings = {\n ROOM_WIDTH_M: 2.0,\n ROOM_HEIGHT_M: 2.4,\n ROOM_HEIGHT_LOW_DOORS_ONLY_M: 2.04,\n ROOM_DEPTH_M: 5\n};\n\nexport const getDefaultRoomHeight = () => {\n if (isRunningTest) {\n return DefaultRoomSettings.ROOM_HEIGHT_M;\n }\n\n if (!store.getState().products.doorHeightOptionsAvailable.length) {\n return DefaultRoomSettings.ROOM_HEIGHT_M;\n }\n\n return store.getState().products.doorHeightOptionsAvailable.includes(DoorHeightEnum.High)\n ? DefaultRoomSettings.ROOM_HEIGHT_M\n : DefaultRoomSettings.ROOM_HEIGHT_LOW_DOORS_ONLY_M;\n};\n\nexport const defaultRoomSize = new Vector(\n DefaultRoomSettings.ROOM_WIDTH_M * 1000,\n getDefaultRoomHeight() * 1000,\n DefaultRoomSettings.ROOM_DEPTH_M * 1000\n);\n","import {\n ComponentIds,\n Core,\n Entity,\n ProductComponent,\n RoomGeometryComponent,\n WorldTransformComponent\n} from '@inter-ikea-core/core';\nimport {\n comparePanelStyles,\n getPanelsInDoorFrameSortedFromTopToBottom,\n getPanelStyleFromEntity\n} from 'components/Panels/helpers/panels';\nimport { PANELS_THAT_CAN_NOT_BE_CUT } from 'products/panels';\nimport { IPanelStyle } from 'redux-store/configuration/configuration.store';\nimport { PANELS_PER_DOOR_FRAME } from 'utils/constants';\nimport { nonNullable } from 'utils/nonNullable';\nimport { PanelComponent } from './Components/PanelComponent';\nimport { RailComponent } from './Components/RailComponent';\nimport { RailTypeEnum } from './Components/RailTypeEnum';\nimport { SkyttaComponentIds } from './Components/SkyttaComponentIds';\nimport { SlidingDoorFrameComponent } from './Components/SlidingDoorFrameComponent';\nimport { RoomDimensionOptionsComponent } from './Components/UserChoicesComponents/RoomDimensionOptionsComponent';\nimport { DefaultRoomSettings } from './helpers/room';\n\n/**\n * @param core\n * @returns The selected entity if one is selected\n */\nexport const getSelectedEntity = (core: Core) => {\n return (\n core.services.sceneManager.entities.find((entity: Entity) =>\n entity.hasComponent(ComponentIds.SELECTED_COMPONENT_ID)\n ) ?? null\n );\n};\n\n/**\n * @param core\n * @returns The selected entity if more is selected\n */\nexport const getSelectedEntities = (core: Core) => {\n const selected: Entity[] = [];\n\n core.services.sceneManager.entities.forEach((entity: Entity) => {\n if (entity.hasComponent(ComponentIds.SELECTED_COMPONENT_ID)) {\n selected.push(entity);\n }\n });\n\n return selected;\n};\n\n/**\n * Gets all panels in the scene\n * @param core\n * @returns\n */\nexport const getPanelsInScene = (core: Core) => {\n return core.services.sceneManager.entities.filter((entity: Entity) =>\n entity.hasComponent(SkyttaComponentIds.PanelComponentId)\n );\n};\n\n/**\n * Gets all rails in scene (both top and bottom)\n * @param core\n * @returns\n */\nexport const getRailsInScene = (core: Core) => {\n return core.services.sceneManager.entities.filter((entity: Entity) =>\n entity.hasComponent(SkyttaComponentIds.RailComponentId)\n );\n};\n\nexport const getBottomRailsInScene = (core: Core) => {\n return core.services.sceneManager.entities.filter(\n it =>\n it.getComponent(SkyttaComponentIds.RailComponentId)?.railType ===\n RailTypeEnum.BottomRail\n );\n};\n\nexport const getTopRailsInScene = (core: Core) => {\n return core.services.sceneManager.entities.filter(\n it =>\n it.getComponent(SkyttaComponentIds.RailComponentId)?.railType ===\n RailTypeEnum.TopRail\n );\n};\n\nexport const getStopBarsInScene = (core: Core) => {\n return core.services.sceneManager.entities.filter(it =>\n it.hasComponent(SkyttaComponentIds.StopBarComponentId)\n );\n};\n\nexport const getChrFramesInScene = (core: Core) => {\n return core.services.sceneManager.entities.filter(it =>\n it.hasComponent(SkyttaComponentIds.CeilingHeightReducerFrameComponentId)\n );\n};\n\n/**\n * Gets all door frames in scene\n * @param core\n * @returns\n */\nexport const getDoorsFramesInScene = (core: Core) => {\n return core.services.sceneManager.entities.filter((entity: Entity) =>\n entity.hasComponent(SkyttaComponentIds.SlidingDoorFrameComponentId)\n );\n};\n\n/**\n * Gets all door frames in scene sorted on lowest X to highest\n * @param core\n * @returns\n */\nexport const getDoorsFramesInSceneSortedLeftToRight = (core: Core) => {\n const sortDoorFrames = (a: Entity, b: Entity) => {\n return (\n (a.getComponent(ComponentIds.WORLD_TRANSFORM_COMPONENT_ID)?.transform\n ?.position?.X || 0) -\n (b.getComponent(ComponentIds.WORLD_TRANSFORM_COMPONENT_ID)?.transform\n ?.position?.X || 0)\n );\n };\n\n return getDoorsFramesInScene(core).sort(sortDoorFrames);\n};\n\nconst sortDoorsByRailTrack = (a: Entity, b: Entity) => {\n const aTrack = a.getComponentUnsafe(\n SkyttaComponentIds.SlidingDoorFrameComponentId\n )?.railTrack;\n\n const bTrack = b.getComponentUnsafe(\n SkyttaComponentIds.SlidingDoorFrameComponentId\n )?.railTrack;\n\n if (aTrack === undefined || bTrack === undefined) {\n throw new Error('No rail track set on door');\n }\n\n return aTrack - bTrack;\n};\n\nconst groupByRailTrack = (railTrackGroups: Entity[][], door: Entity) => {\n const railTrack = door.getComponent(\n SkyttaComponentIds.SlidingDoorFrameComponentId\n )?.railTrack;\n\n if (railTrack === undefined) {\n return railTrackGroups;\n }\n\n if (railTrackGroups[railTrack]) {\n railTrackGroups[railTrack].push(door);\n } else {\n if (railTrackGroups.length && !railTrackGroups[railTrack - 1]) {\n railTrackGroups.push([]);\n }\n railTrackGroups.push([door]);\n }\n\n return railTrackGroups;\n};\n\nexport const getDoorsByRailTrack = (core: Core) => {\n return getDoorsFramesInSceneSortedLeftToRight(core)\n .sort(sortDoorsByRailTrack)\n .reduce(groupByRailTrack, []);\n};\n\n/**\n * Putting the doors in correct order of placement\n * First we put one door for each track from left to right until we reach the end of tracks,\n * then put them one by one in reversed order.\n * This will make sure the doors in the middle will end up next to each other.\n *\n * Special cases:\n * - If there are 4 doors we want the middle doors to be placed on the front track, all other will start with the one to the left being in front.\n * - If there are more than 3 doors on each track (ie 5 or 6 doors on a 2 tracks) we alternate them instead so no door end up next to each other.\n */\nexport const getDoorsInOrderOfPlacement = (doorsByRailTrack: Entity[][] | number[][]) => {\n const doors: Array = [];\n\n // Get the maximum number of doors on each track\n const maxDoorsOnTrack = Math.max(...doorsByRailTrack.map(subArr => subArr.length));\n\n // If there are more than 3 doors on any track we should alternate the doors instead\n const shouldAlternateDoors = maxDoorsOnTrack > 2;\n\n const totalNrOfDoors = doorsByRailTrack.flat().length;\n\n for (let doorIndex = 0; doorIndex < maxDoorsOnTrack; doorIndex++) {\n // Start by putting even doors to the first track, unless there are 4 doors\n const isEvenDoor = doorIndex % 2 === 0;\n const ascendingOrder = totalNrOfDoors === 4 ? isEvenDoor : !isEvenDoor;\n\n if (ascendingOrder && !shouldAlternateDoors) {\n // Ascending order\n for (let trackIndex = 0; trackIndex < doorsByRailTrack.length; trackIndex++) {\n const door = doorsByRailTrack[trackIndex][doorIndex];\n if (door !== undefined) {\n doors.push(door);\n }\n }\n } else {\n // Descending direction\n for (let trackIndex = doorsByRailTrack.length - 1; trackIndex >= 0; trackIndex--) {\n const door = doorsByRailTrack[trackIndex][doorIndex];\n if (door !== undefined) {\n doors.push(door);\n }\n }\n }\n }\n\n return doors;\n};\n\n/**\n * Gets the room dimensions along X-axis\n * @param core\n * @returns\n */\nexport const getRoomWidth = (core: Core): number => {\n const room = core.services.sceneManager.entities.find(it =>\n it.hasComponent(ComponentIds.ROOM_GEOMETRY_COMPONENT_ID)\n );\n const width =\n room?.getComponent(ComponentIds.ROOM_GEOMETRY_COMPONENT_ID)?.dimensions\n .size.X ?? DefaultRoomSettings.ROOM_WIDTH_M * 1000;\n return width;\n};\n\nexport const getRoomHeight = (core: Core): number => {\n const room = core.services.sceneManager.entities.find(it =>\n it.hasComponent(ComponentIds.ROOM_GEOMETRY_COMPONENT_ID)\n );\n const height =\n room?.getComponent(ComponentIds.ROOM_GEOMETRY_COMPONENT_ID)?.dimensions\n .size.Y ?? DefaultRoomSettings.ROOM_HEIGHT_M * 1000;\n return height;\n};\n\nexport const getUserRoomHeight = (core: Core): number => {\n const roomDimensions = core.services.sceneManager.entities.find(it =>\n it.hasComponent(SkyttaComponentIds.RoomDimensionOptionsComponentId)\n );\n\n const height =\n roomDimensions?.getComponent(\n SkyttaComponentIds.RoomDimensionOptionsComponentId\n )?.height ?? DefaultRoomSettings.ROOM_HEIGHT_M * 1000;\n return height;\n};\n\nexport const getUniquePanelStyles = (panels: IPanelStyle[]) => {\n return panels.reduce((acc: IPanelStyle[], panel) => {\n if (!acc.find(i => comparePanelStyles(i, panel))) {\n acc.push(panel);\n }\n\n return acc;\n }, []);\n};\n\nexport const getPanelStyles = (core: Core): IPanelStyle[][] => {\n const allDoors = getDoorsInOrderOfPlacement(getDoorsByRailTrack(core)) as Entity[];\n return allDoors.map(doorFrame =>\n getPanelsInDoorFrameSortedFromTopToBottom(doorFrame)\n .map(panel => getPanelStyleFromEntity(panel))\n .filter(nonNullable)\n );\n};\n\nexport const isSkyttaEntityWithViewerObject = (entity: Entity) => {\n return (\n entity.hasComponent(ComponentIds.VIEWER_OBJECT_COMPONENT_ID) &&\n !entity.hasComponent(SkyttaComponentIds.StorageBehindComponentId) &&\n !entity.hasComponent(ComponentIds.PROPPING_COMPONENT_ID)\n );\n};\n\nexport const isSelectedPanelsPossibleToCut = (core: Core) => {\n const panelStyleIndexes = core.services.sceneManager.entities\n .filter(e => {\n // Only look at the top panel\n return (\n e.getComponent(SkyttaComponentIds.PanelComponentId)\n ?.verticalPositionInDoorFrame === PANELS_PER_DOOR_FRAME\n );\n })\n .map(e => {\n return e.getComponent(SkyttaComponentIds.PanelComponentId)?.styleIndex;\n });\n\n return !panelStyleIndexes.some(panelStyleIndex =>\n PANELS_THAT_CAN_NOT_BE_CUT.includes(panelStyleIndex ?? -1)\n );\n};\n\nexport const haveUnusedPanels = (core: Core) => {\n const allPanels = getPanelsInScene(core);\n\n // Count nr productRefs in the scene\n const prodRefs = allPanels.reduce((countMap: Record, panel: Entity) => {\n const productRef = panel.getComponent(\n ComponentIds.PRODUCT_COMPONENT_ID\n )?.productRef;\n\n if (productRef) {\n countMap[productRef] = (countMap[productRef] || 0) + 1;\n }\n\n return countMap;\n }, {});\n\n // Check if any have more or less than expected number of panels in one door.\n return Object.values(prodRefs).some(nrOfPanels => nrOfPanels % PANELS_PER_DOOR_FRAME !== 0);\n};\n","import { Component, ComponentListener, EcsSystem, Entity } from '@inter-ikea-core/core';\n\ntype OnAddFn = (entity: Entity, newComponent: Comp) => void;\n\ntype OnUpdateFn = (\n entity: Entity,\n oldComponent: Comp,\n newComponent: Comp\n) => void;\n\ntype OnRemoveFn = (entity: Entity, oldComponent: Comp) => void;\n\nexport class ComponentListenerImpl implements ComponentListener {\n readonly ownerSystem: EcsSystem | null;\n readonly componentId: number;\n private onComponentAddedRef: OnAddFn;\n private onComponentUpdatedRef: OnUpdateFn;\n private onComponentRemovedRef: OnRemoveFn;\n\n constructor(\n owner: EcsSystem | null,\n componentId: number,\n onComponentAddedRef: OnAddFn,\n onComponentUpdatedRef: OnUpdateFn,\n onComponentRemovedRef: OnRemoveFn\n ) {\n this.ownerSystem = owner;\n this.componentId = componentId;\n this.onComponentAddedRef = onComponentAddedRef;\n this.onComponentUpdatedRef = onComponentUpdatedRef;\n this.onComponentRemovedRef = onComponentRemovedRef;\n }\n\n onAdd(entity: Entity, newComponent: TComponent): void {\n this.onComponentAddedRef(entity, newComponent);\n }\n onUpdate(entity: Entity, oldComponent: TComponent, newComponent: TComponent): void {\n this.onComponentUpdatedRef(entity, oldComponent, newComponent);\n }\n onRemove(entity: Entity, oldComponent: TComponent): void {\n this.onComponentRemovedRef(entity, oldComponent);\n }\n}\n","// snippet::snippet-systembase[TS]\nimport { Component, ComponentListener, EcsSystem, Entity } from '@inter-ikea-core/core';\nimport { ComponentListenerImpl } from './ComponentListenerImpl';\n\n/**\n * A base class for systems that will listen to one type of component.\n * This system can be enabled or disabled and will then start/stop listening.\n *\n * Note that in order for the system to work it must be registered with the EntityManager\n * and enabled.\n */\nexport abstract class SystemBase implements EcsSystem {\n protected _componentListeners: ComponentListener[];\n public get componentListeners(): ComponentListener[] {\n return this._componentListeners;\n }\n abstract readonly doingChangesOnComponent: number[];\n abstract readonly systemsBeforeMe: string[] | null;\n abstract readonly systemsAfterMe: string[] | null;\n readonly mandatoryComponents: number[] | null = null;\n readonly ignoreEntitiesWithComponents: number[] | null = null;\n\n private _isEnabled: boolean;\n public get isEnabled(): boolean {\n return this._isEnabled;\n }\n abstract readonly id: string;\n\n constructor(componentId: number) {\n this._isEnabled = true;\n\n this.onAddComponent = this.onAddComponent.bind(this);\n this.onUpdateComponent = this.onUpdateComponent.bind(this);\n this.onRemoveComponent = this.onRemoveComponent.bind(this);\n\n this._componentListeners = [\n new ComponentListenerImpl(\n this,\n componentId,\n this.onAddComponent,\n this.onUpdateComponent,\n this.onRemoveComponent\n )\n ];\n }\n\n protected abstract onAddComponent(entity: Entity, newComponent: TComponent): void;\n protected abstract onUpdateComponent(\n entity: Entity,\n oldComponent: TComponent,\n newComponent: TComponent\n ): void;\n protected abstract onRemoveComponent(entity: Entity, oldComponent: TComponent): void;\n\n enable(): void {\n this._isEnabled = true;\n }\n\n disable(): void {\n this._isEnabled = false;\n }\n\n onRegister(): void {}\n onUnregister(): void {}\n}\n// end::snippet-systembase\n","// snippet::snippet-systembase2[TS]\nimport { Component, Entity } from '@inter-ikea-core/core';\nimport { ComponentListenerImpl } from './ComponentListenerImpl';\nimport { SystemBase } from './SystemBase';\n\n/**\n * A type of system listening to two components\n * When implementing a system like this, do consider if you are really separating concerns properly or\n * it should really be two separate systems\n * Sometimes there is a need for a system listening to two different components though, and in that case this\n * class can be inherited to reduce a lot of the boilerplate code\n *\n * Note that in order for the system to work it must be registered with the EntityManager\n * and enabled.\n */\nexport abstract class SystemBase2<\n TComponent1 extends Component,\n TComponent2 extends Component\n> extends SystemBase {\n constructor(component1Id: number, component2Id: number) {\n super(component1Id);\n\n this.onAddComponent2 = this.onAddComponent2.bind(this);\n this.onUpdateComponent2 = this.onUpdateComponent2.bind(this);\n\n this.onRemoveComponent2 = this.onRemoveComponent2.bind(this);\n\n this._componentListeners.push(\n new ComponentListenerImpl(\n this,\n component2Id,\n this.onAddComponent2,\n this.onUpdateComponent2,\n this.onRemoveComponent2\n )\n );\n }\n\n protected abstract onAddComponent2(entity: Entity, newComponent: TComponent2): void;\n protected abstract onUpdateComponent2(\n entity: Entity,\n oldComponent: TComponent2,\n newComponent: TComponent2\n ): void;\n protected abstract onRemoveComponent2(entity: Entity, oldComponent: TComponent2): void;\n}\n// end::snippet-systembase2\n","// snippet::snippet-systembase3[TS]\nimport { Component, Entity } from '@inter-ikea-core/core';\nimport { ComponentListenerImpl } from './ComponentListenerImpl';\nimport { SystemBase2 } from './SystemBase2';\n\n/**\n * A type of system listening to three components\n * When implementing a system like this, do consider if you are really separating concerns properly or\n * it should really be separate systems\n * Sometimes there is a need for a system listening to different components though, and in that case this\n * class can be inherited to reduce a lot of the boilerplate code\n *\n * Note that in order for the system to work it must be registered with the EntityManager\n */\nexport abstract class SystemBase3<\n TComponent1 extends Component,\n TComponent2 extends Component,\n TComponent3 extends Component\n> extends SystemBase2 {\n constructor(component1Id: number, component2Id: number, component3Id: number) {\n super(component1Id, component2Id);\n\n this.onAddComponent3 = this.onAddComponent3.bind(this);\n this.onUpdateComponent3 = this.onUpdateComponent3.bind(this);\n this.onRemoveComponent3 = this.onRemoveComponent3.bind(this);\n this._componentListeners.push(\n new ComponentListenerImpl(\n this,\n component3Id,\n this.onAddComponent3,\n this.onUpdateComponent3,\n this.onRemoveComponent3\n )\n );\n }\n\n protected abstract onAddComponent3(entity: Entity, newComponent: TComponent3): void;\n protected abstract onUpdateComponent3(\n entity: Entity,\n oldComponent: TComponent3,\n newComponent: TComponent3\n ): void;\n protected abstract onRemoveComponent3(entity: Entity, oldComponent: TComponent3): void;\n}\n// end::snippet-systembase3\n","export const remToPixels = (rem: string) => {\n return parseFloat(rem) * parseFloat(getComputedStyle(document.documentElement).fontSize);\n};\n","import { IColor, IViewer } from '@inter-ikea-betrakta/viewer';\nimport { ComponentIds, Entity, ViewerObjectComponent } from '@inter-ikea-core/core';\nimport { captureException } from '@sentry/react';\nimport { CustomOutlineComponent } from 'CoreAPI/Components/CustomOutlineComponent';\nimport { SkyttaComponentIds } from 'CoreAPI/Components/SkyttaComponentIds';\nimport CoreAPI from 'CoreAPI/coreApi';\nimport { getCamera, getViewer } from 'CoreAPI/viewerSetup';\nimport store from 'redux-store/store';\nimport { constantCustomizeMenuWidth } from 'utils/constants';\nimport { OutlineColor } from 'utils/constants/colors';\nimport { nonNullable } from 'utils/nonNullable';\nimport { remToPixels } from 'utils/remToPixels';\n\nconst mapModelUris = (catalogData: any) => {\n return [\n ...new Set(\n catalogData.products\n .map((product: { modelURI: string }) => {\n return product.modelURI;\n })\n .filter(Boolean)\n )\n ];\n};\n\nexport const preloadAllModels = async () => {\n const { skyttaCatalogData, paxPanelsCatalogData } = store.getState().configuration;\n const combineModelArrays = [\n ...mapModelUris(skyttaCatalogData),\n ...mapModelUris(paxPanelsCatalogData)\n ] as string[];\n return getViewer()?.persistent_load_models(combineModelArrays);\n};\n\nexport const getViewerId = (entity: Entity) => {\n return entity\n .getComponent(ComponentIds.VIEWER_OBJECT_COMPONENT_ID)\n ?.viewerObject.getViewerObjectId();\n};\n\nconst hasEnteredObject = async (\n event: MouseEvent,\n viewerId: number,\n viewer: IViewer,\n isRtl: boolean\n) => {\n const ltlMousePosX = event.clientX;\n const rtlMousePosX = ltlMousePosX - remToPixels(constantCustomizeMenuWidth);\n const mousePosX = isRtl ? rtlMousePosX : ltlMousePosX;\n const mousePosY = event.clientY;\n const bounds = await viewer.get_object_bounds_world(viewerId);\n const { max, min } = bounds;\n\n const canvasBoundsMax = viewer.project_world_position_to_canvas(max.x, max.y, max.z);\n const canvasBoundsMin = viewer.project_world_position_to_canvas(min.x, min.y, min.z);\n\n let enteredObject = false;\n\n const isCameraBehindDoors = getCamera().position.z < 0;\n\n if (canvasBoundsMax && canvasBoundsMin) {\n const enteredObjectX = isCameraBehindDoors\n ? mousePosX < canvasBoundsMin.x && mousePosX > canvasBoundsMax.x\n : mousePosX < canvasBoundsMax.x && mousePosX > canvasBoundsMin.x;\n const enteredObjectY = mousePosY > canvasBoundsMax.y && mousePosY < canvasBoundsMin.y;\n enteredObject = enteredObjectX && enteredObjectY;\n }\n\n return enteredObject;\n};\n\n/**\n * Since the objects is coordinates, we can get multiple objects hovered at the same time. For example when two doors overlaps.\n */\nconst isCurrentlyHovered = async (\n event: MouseEvent,\n viewerIds: number[],\n viewer: IViewer,\n isRtl: boolean\n) => {\n const currentlyHovered = await Promise.all(\n viewerIds.map(async value => {\n const parentId = viewer.get_parent(value);\n if (parentId && (await hasEnteredObject(event, parentId, viewer, isRtl))) {\n return value;\n }\n return null;\n })\n );\n const filteredCurrentlyHovered = currentlyHovered.filter(nonNullable);\n return filteredCurrentlyHovered;\n};\n\n/**\n * Get closest object\n */\nconst isClosestObjectByDepth = (viewerIds: number[], viewer: IViewer) => {\n const outlineObjectsByDepth = viewerIds\n .map((value: number) => {\n const parentId = viewer.get_parent(value);\n\n if (!parentId) {\n captureException(new Error(`Failed to get viewerId from isClosestObjectByDepth`));\n return null;\n }\n\n const position = viewer.get_position(parentId);\n const depth = position.z;\n\n return { id: value, depth };\n })\n .filter(nonNullable);\n\n const closestObject = Math.max(\n ...outlineObjectsByDepth.map(value => {\n return value.depth;\n })\n );\n\n return outlineObjectsByDepth.filter(value => {\n return value.depth === closestObject;\n })[0];\n};\n\nconst isSelect = (currentColor: IColor) => {\n const { select } = OutlineColor;\n return select.r === currentColor.r && select.g === currentColor.g && select.b === currentColor.b;\n};\n\n/**\n * This checks if you clicked outside our objects, eg. when no object is clicked.\n */\nconst clickedOutsideAllObjects = async (\n event: MouseEvent,\n viewer: IViewer,\n outlineObjectIds: number[],\n isRtl: boolean\n) => {\n const hasEnteredAnyObject = Promise.all(\n outlineObjectIds.map(async value => {\n const clickedInside = await hasEnteredObject(event, value, viewer, isRtl);\n return clickedInside;\n })\n );\n\n const clickedInsideAnyObject = (await hasEnteredAnyObject).some(value => {\n return value;\n });\n\n return !clickedInsideAnyObject;\n};\n\nconst setOutlineColor = (viewer: IViewer, id: number) => {\n const closestObjectCurrentColor = viewer.get_object_outline_color(id);\n\n viewer.set_outline(id, true, false);\n\n if (isSelect(closestObjectCurrentColor)) {\n viewer.set_object_outline_color(id, OutlineColor.select);\n }\n\n return viewer.get_parent(id);\n};\n\nexport const isModelHovered = async (\n event: MouseEvent,\n outlineId: number,\n viewer: IViewer,\n outlineObjectIds: number[],\n coreApi: CoreAPI,\n isRtl: boolean\n) => {\n if (await clickedOutsideAllObjects(event, viewer, outlineObjectIds, isRtl)) {\n document.body.classList.remove('hovered');\n } else {\n document.body.classList.add('hovered');\n }\n\n const currentColor = viewer.get_object_outline_color(outlineId);\n\n const hoveredObjects = await isCurrentlyHovered(event, outlineObjectIds, viewer, isRtl);\n\n const draggedDoorOutlineId = coreApi.core.services.entityManager.entities\n .find(entity => {\n return entity.hasComponent(ComponentIds.IS_DRAGGED_COMPONENT_ID);\n })\n ?.getComponent(SkyttaComponentIds.CustomOutlineComponentId)?.viewerId;\n\n if (draggedDoorOutlineId) {\n return setOutlineColor(viewer, draggedDoorOutlineId);\n }\n\n const isClosestObjectHovered = isClosestObjectByDepth(hoveredObjects, viewer);\n\n if (isClosestObjectHovered && isClosestObjectHovered.id === outlineId) {\n return setOutlineColor(viewer, outlineId);\n }\n if (isSelect(currentColor)) {\n return false;\n }\n\n viewer.set_outline(outlineId, false, false);\n return false;\n};\n","import { IViewer, ObjectHandle, RENDER_LAYER_IGNORE_RAYCAST } from '@inter-ikea-betrakta/viewer';\nimport { PrimitiveBuilder } from '@inter-ikea-betrakta/viewer/dist/modules/PrimitiveBuilder';\nimport { Room } from '@inter-ikea-betrakta/viewer/dist/modules/Room';\nimport {\n Component,\n ComponentIds,\n Core,\n CoreServices,\n Entity,\n LoadedModelInfoComponent,\n MeasurementUtils,\n RoomGeometryComponent,\n TransformUtils,\n Vector,\n ViewerObjectComponent\n} from '@inter-ikea-core/core';\nimport { captureException } from '@sentry/react';\nimport { CustomOutlineComponent } from 'CoreAPI/Components/CustomOutlineComponent';\nimport { PanelComponent } from 'CoreAPI/Components/PanelComponent';\nimport { RailComponent } from 'CoreAPI/Components/RailComponent';\nimport { RailTypeEnum } from 'CoreAPI/Components/RailTypeEnum';\nimport { SkyttaComponentIds } from 'CoreAPI/Components/SkyttaComponentIds';\nimport { RoomDimensionOptionsComponent } from 'CoreAPI/Components/UserChoicesComponents/RoomDimensionOptionsComponent';\nimport { isSelectedPanelsPossibleToCut } from 'CoreAPI/coreSceneQueries';\nimport { SystemBase3 } from 'CoreAPI/systembases/SystemBase3';\nimport { getCamera } from 'CoreAPI/viewerSetup';\nimport { getViewerId } from 'components/Scene/helpers/scene';\nimport { configurationAction } from 'redux-store/configuration/configuration.store';\nimport store from 'redux-store/store';\nimport { PANELS_PER_DOOR_FRAME, VIEWER_DEFAULT_ALPHA_INDEX } from 'utils/constants';\nimport { SCENE_COLORS } from 'utils/constants/colors';\nimport getAssetsPath from 'utils/getAssetsPath';\n\nexport class ViewerRoomComponent implements Component {\n public static ID = SkyttaComponentIds.ViewerRoomComponentId;\n public readonly typeId = ViewerRoomComponent.ID;\n public readonly viewerRoom: Room;\n public readonly doStoreInSnapshot: boolean = true;\n public readonly ignoreEntitiesWithComponents: number[] | null = null;\n\n constructor(room: Room) {\n this.viewerRoom = room;\n }\n\n public eq(_other: Component) {\n return false;\n }\n}\n\nconst invisibleMaterial = (viewer: IViewer) => {\n const outlineObjectMaterial = viewer.create_material();\n viewer.set_opacity(outlineObjectMaterial, 0);\n viewer.set_roughness(outlineObjectMaterial, 0);\n viewer.set_metallic(outlineObjectMaterial, 0);\n viewer.set_unlit(outlineObjectMaterial, true);\n\n return outlineObjectMaterial;\n};\n\nexport class RoomRenderingSystem extends SystemBase3<\n RoomDimensionOptionsComponent,\n ViewerRoomComponent,\n LoadedModelInfoComponent\n> {\n public readonly id: string = 'RoomRenderingSystem';\n public readonly systemsBeforeMe: string[] | null = null;\n public readonly systemsAfterMe: string[] | null = null;\n public readonly doingChangesOnComponent: number[] = [ViewerRoomComponent.ID];\n public boxIds: number[] = [];\n public viewerRoom: Room | undefined;\n\n private core: Core;\n private coreServices: CoreServices;\n private viewer: IViewer;\n private outlineObjectMaterial: number;\n private primitiveBuilder: PrimitiveBuilder;\n\n constructor(core: Core, viewer: IViewer) {\n super(\n SkyttaComponentIds.RoomDimensionOptionsComponentId,\n ViewerRoomComponent.ID,\n ComponentIds.LOADED_MODEL_INFO_COMPONENT_ID\n );\n this.core = core;\n this.coreServices = this.core.services;\n this.viewer = viewer;\n this.recreateRoom();\n this.boxIds = [];\n this.outlineObjectMaterial = invisibleMaterial(this.viewer);\n this.primitiveBuilder = new PrimitiveBuilder(this.viewer);\n }\n\n public recreateRoom() {\n const room = this.coreServices.sceneManager.entities.find(e =>\n e.hasComponent(ComponentIds.ROOM_GEOMETRY_COMPONENT_ID)\n );\n if (room && this.viewer) {\n const roomGeometry = room.getComponent(\n ComponentIds.ROOM_GEOMETRY_COMPONENT_ID\n )!;\n\n // We need to get the dimensions from RoomDimensionOptionsComponent so that we update the room with the user input instead of core value.\n // This is so that the ceiling height will render lower than the actually room is in core, if the room is lower than the doors are.\n const roomDimensions = this.coreServices.sceneManager.entities\n .find(e => e.hasComponent(SkyttaComponentIds.RoomDimensionOptionsComponentId))\n ?.getComponent(\n SkyttaComponentIds.RoomDimensionOptionsComponentId\n );\n\n const roomSize = new Vector(\n roomDimensions?.width ?? roomGeometry.dimensions.size.X,\n roomDimensions?.height ?? roomGeometry.dimensions.size.Y,\n roomGeometry.dimensions.size.Z\n );\n\n this.updateRoom(room, roomSize);\n }\n }\n\n public onAddComponent(_entity: Entity, roomDimensions: RoomDimensionOptionsComponent): void {\n const roomSize = new Vector(roomDimensions.width, roomDimensions.height, roomDimensions.depth);\n const room = this.coreServices.sceneManager.entities.find(e =>\n e.hasComponent(ComponentIds.ROOM_GEOMETRY_COMPONENT_ID)\n );\n if (room) {\n this.updateRoom(room, roomSize);\n }\n }\n\n public onUpdateComponent(\n _entity: Entity,\n _oldSize: RoomDimensionOptionsComponent,\n newSize: RoomDimensionOptionsComponent\n ): void {\n const roomSize = new Vector(newSize.width, newSize.height, newSize.depth);\n const room = this.coreServices.sceneManager.entities.find(e =>\n e.hasComponent(ComponentIds.ROOM_GEOMETRY_COMPONENT_ID)\n );\n if (room) {\n this.updateRoom(room, roomSize);\n }\n }\n\n public onRemoveComponent(_entity: Entity, _roomDimensions: RoomDimensionOptionsComponent): void {}\n\n protected onAddComponent2(_entity: Entity, _newComponent: ViewerRoomComponent): void {}\n protected onUpdateComponent2(\n _entity: Entity,\n _oldComponent: ViewerRoomComponent,\n _newComponent: ViewerRoomComponent\n ): void {}\n protected onRemoveComponent2(_room: Entity, oldComponent: ViewerRoomComponent): void {\n this.disposeRoom(oldComponent);\n }\n\n private createOutlineObject = async (parentId: number, viewer: IViewer) => {\n const bounds = await viewer.get_object_bounds_world(parentId);\n\n const { max, min } = bounds;\n\n const dimension = {\n width: max.x - min.x,\n height: max.y - min.y,\n depth: max.z - min.z\n };\n\n const outlineObjectId = this.primitiveBuilder.create_box(\n dimension.width,\n dimension.height,\n dimension.depth,\n { material: this.outlineObjectMaterial }\n );\n\n viewer.add_to_layer(outlineObjectId, RENDER_LAYER_IGNORE_RAYCAST);\n\n viewer.set_parent(outlineObjectId, parentId);\n\n return outlineObjectId;\n };\n\n protected onAddComponent3(): void {}\n\n private doRailUpdate(entity: Entity) {\n const railComponent = entity.getComponent(SkyttaComponentIds.RailComponentId);\n if (railComponent?.railType === RailTypeEnum.TopRail) {\n this.moveTopRail(entity);\n }\n }\n\n private async doDoorFrameUpdate(entity: Entity) {\n this.addBox(entity);\n\n const viewerId = getViewerId(entity);\n\n if (!viewerId) {\n return;\n }\n\n const outlineId = await this.createOutlineObject(viewerId, this.viewer);\n\n entity.addComponent(new CustomOutlineComponent(outlineId));\n }\n\n private doTopPanelUpdate() {\n const doorFrames = this.coreServices.sceneManager.entities.filter((entity: Entity) =>\n entity.hasComponent(SkyttaComponentIds.SlidingDoorFrameComponentId)\n );\n doorFrames.forEach(doorFrame => {\n this.addBox(doorFrame);\n });\n }\n\n protected async onUpdateComponent3(\n entity: Entity,\n _oldComponent: LoadedModelInfoComponent,\n newComponent: LoadedModelInfoComponent\n ): Promise {\n if (!newComponent.hasFinishedLoading) {\n return;\n }\n\n if (entity.hasComponent(SkyttaComponentIds.RailComponentId)) {\n this.doRailUpdate(entity);\n return;\n }\n\n if (entity.hasComponent(SkyttaComponentIds.SlidingDoorFrameComponentId)) {\n this.doDoorFrameUpdate(entity);\n return;\n }\n\n if (\n entity.getComponent(SkyttaComponentIds.PanelComponentId)\n ?.verticalPositionInDoorFrame === PANELS_PER_DOOR_FRAME\n ) {\n this.doTopPanelUpdate();\n return;\n }\n }\n\n protected onRemoveComponent3(entity: Entity): void {\n const isDoorFrameUpdate = entity.hasComponent(SkyttaComponentIds.SlidingDoorFrameComponentId);\n if (isDoorFrameUpdate) {\n entity.removeComponent(SkyttaComponentIds.CustomOutlineComponentId);\n }\n }\n\n private howMuchToCut() {\n const roomGeometry = this.coreServices.sceneManager.entities\n .find(e => e.hasComponent(ComponentIds.ROOM_GEOMETRY_COMPONENT_ID))\n ?.getComponent(ComponentIds.ROOM_GEOMETRY_COMPONENT_ID);\n\n const roomDimensions = this.coreServices.sceneManager.entities\n .find(e => e.hasComponent(SkyttaComponentIds.RoomDimensionOptionsComponentId))\n ?.getComponent(\n SkyttaComponentIds.RoomDimensionOptionsComponentId\n );\n\n if (!roomGeometry || !roomDimensions) {\n return; // no need to move\n }\n\n const diff = roomGeometry.dimensions.size.Y - roomDimensions.height;\n\n if (diff <= 0) {\n return; // no need to cut\n }\n\n return diff;\n }\n\n private moveTopRail(entity: Entity) {\n const diff = this.howMuchToCut();\n\n if (!diff) return;\n\n const oldRailPosition = TransformUtils.worldPosition(entity);\n const newRailPosition = oldRailPosition.plus(new Vector(0, -diff, 0));\n const model = entity.getComponent(\n ComponentIds.VIEWER_OBJECT_COMPONENT_ID\n )?.viewerObject;\n model?.setPosition(newRailPosition);\n }\n\n private addBox(doorFrameEntity: Entity) {\n const diff = this.howMuchToCut();\n if (!diff) return;\n\n const doorFrameSize = MeasurementUtils.getOutsideMeasurementSingle(doorFrameEntity);\n\n if (!doorFrameSize) return;\n\n const model = doorFrameEntity.getComponent(\n ComponentIds.VIEWER_OBJECT_COMPONENT_ID\n )?.viewerObject;\n const model_id = model?.getViewerObjectId();\n\n if (!model_id) return;\n\n // Delete old boxes.\n this.viewer.get_children(model_id).forEach(child => {\n if (this.boxIds.includes(child)) {\n this.viewer.delete_object(child);\n this.boxIds = this.boxIds.filter(value => value !== child);\n }\n });\n\n // Create box!\n const transparent_material = this.viewer.create_material();\n\n const { blue, red } = SCENE_COLORS;\n\n const color = isSelectedPanelsPossibleToCut(this.core) ? blue : red;\n\n this.viewer.set_base_color(transparent_material, color);\n this.viewer.set_roughness(transparent_material, 0.7);\n this.viewer.set_metallic(transparent_material, 0.0);\n this.viewer.set_opacity(transparent_material, 0.5);\n\n const oversize = 12;\n\n const size = {\n X: (doorFrameSize.width + oversize) / 1000,\n Y: (diff + oversize) / 1000,\n Z: (doorFrameSize.depth + oversize) / 1000\n };\n\n const box_handle = new ObjectHandle(\n this.primitiveBuilder.create_box(size.X, size.Y, size.Z, { material: transparent_material }),\n this.viewer\n );\n\n this.boxIds.push(box_handle.id);\n\n this.viewer.set_receive_shadow(box_handle.id, false);\n this.viewer.set_cast_shadow(box_handle.id, false);\n this.viewer.set_parent(box_handle.id, model_id);\n\n const boxPosition = {\n X: 0,\n Y: doorFrameSize.height / 1000 / 2 - diff / 1000 / 2 + oversize / 2 / 1000,\n Z: 0\n };\n\n this.viewer.set_position(box_handle.id, boxPosition.X, boxPosition.Y, boxPosition.Z);\n\n const isCameraBehindDoors = getCamera().position.z < 0;\n\n this.viewer.set_alpha_sorting_index(\n box_handle.id,\n VIEWER_DEFAULT_ALPHA_INDEX + (isCameraBehindDoors ? -1 : 1)\n );\n }\n\n private updateRoom(roomEntity: Entity, roomSize: Vector): void {\n // Check that this really is a room in the scene\n if (!roomEntity.hasComponent(ComponentIds.IN_SCENE_COMPONENT_ID)) {\n return;\n }\n if (!this.viewer) {\n return;\n }\n\n const { X, Y, Z } = roomSize;\n\n const roomComponent = roomEntity.getComponent(ViewerRoomComponent.ID);\n if (roomComponent) {\n this.disposeRoom(roomComponent);\n }\n const room = this.createRoomInViewer(this.viewer, X / 1000, Y / 1000, Z / 1000);\n this.coreServices.entityManager.addComponent(roomEntity, new ViewerRoomComponent(room));\n }\n\n private disposeRoom(roomComponent: ViewerRoomComponent) {\n roomComponent.viewerRoom.dispose();\n }\n\n /**\n * Assumes all measurements in meters\n */\n private createRoomInViewer(viewer: IViewer, width: number, height: number, depth: number): Room {\n // Create IPEX viewer wall vertices for the core room.\n const wall_vertices = [\n { x: -width / 2, y: 0, z: 0, w: height },\n { x: width / 2, y: 0, z: 0, w: height },\n { x: width / 2, y: 0, z: depth, w: height },\n { x: -width / 2, y: 0, z: depth, w: height }\n ];\n\n this.viewerRoom = new Room(viewer, {\n wall_vertices,\n windows: [],\n doors: [],\n ceiling_light_color: { r: 1.0, g: 1.0, b: 1.0 },\n ceiling_light_intensity: 2,\n floor_light_color: { r: 1.0, g: 1.0, b: 1.0 },\n floor_light_intensity: 3\n });\n\n // Define transparent material\n const ceilingMaterial = viewer.create_material();\n viewer.set_base_color(ceilingMaterial, { r: 1, g: 1, b: 1 });\n viewer.set_roughness(ceilingMaterial, 0.7);\n viewer.set_metallic(ceilingMaterial, 0.0);\n viewer.set_opacity(ceilingMaterial, 0.0);\n\n const roomMaterials = [\n {\n url: getAssetsPath('./room/wall/wall_lowres.gltf'),\n material: viewer.load_material(getAssetsPath('./room/wall/wall_lowres.gltf'))\n },\n {\n url: getAssetsPath('./room/skirting/skirting.gltf'),\n material: viewer.load_material(getAssetsPath('./room/skirting/skirting.gltf'))\n },\n {\n url: getAssetsPath('./room/floor/floor-embeded_lowres.glb'),\n material: viewer.load_material(getAssetsPath('./room/floor/floor-embeded_lowres.glb'))\n }\n ];\n\n const [wallMaterial, skirtingMaterial, floorMaterial] = roomMaterials;\n\n this.viewerRoom.set_material(\n wallMaterial.material,\n skirtingMaterial.material,\n floorMaterial.material,\n // viewer.load_material(getAssetsPath(\"./room/ceiling/ceiling_new.gltf\"))\n // we use this instead to make the ceiling transparent\n ceilingMaterial\n );\n\n const { dispatch } = store;\n\n roomMaterials.forEach(value => {\n viewer.material_ready(value.material).catch(() => {\n captureException(new Error('Failed to load critical room material.'), scope => {\n return scope.setExtra('materialUrl', value.url);\n });\n dispatch(configurationAction.setShowErrorPage(true));\n });\n });\n\n this.viewerRoom.get_room_objects().forEach(value => {\n viewer.set_receive_shadow(value, true);\n });\n this.viewerRoom.async_calculate_lighting();\n return this.viewerRoom;\n }\n}\n","import {\n CameraTransitionPreset,\n Coroutine,\n DracoDecoderSource,\n IAdvancedViewer,\n IDirectionalLight,\n IExperimentalViewer,\n IVector3,\n IViewer,\n LightType,\n create_viewer\n} from '@inter-ikea-betrakta/viewer';\nimport { smooth_step } from '@inter-ikea-betrakta/viewer/dist/index';\nimport { InputGatherer } from '@inter-ikea-betrakta/viewer/dist/modules/InputGatherer';\nimport { OrbitPlannerCamera } from '@inter-ikea-betrakta/viewer/dist/modules/cameras/OrbitPlannerCamera';\nimport { ComponentIds, Core, Entity, Viewer } from '@inter-ikea-core/core';\nimport { IPEXViewerCoreAdapter } from '@inter-ikea-core/ipex-betrakta-core-adapter';\nimport { captureException } from '@sentry/react';\nimport { sceneAction } from 'redux-store/scene/scene.store';\nimport store from 'redux-store/store';\nimport { defaultViewerCalculations } from 'utils/constants';\nimport { OutlineColor } from 'utils/constants/colors';\nimport { RENDER_CANVAS } from 'utils/constants/elements';\nimport delay from 'utils/delay';\nimport getAssetsPath from 'utils/getAssetsPath';\nimport { isE2eTest, isKiosk, isRunningTest } from 'utils/platform';\nimport cameraSettings from './cameraSettings';\nimport ProductPlacementUtil from './productPlacementUtil';\nimport screenshotSettings from './screenshotSettings';\nimport { RoomRenderingSystem, ViewerRoomComponent } from './systems/RoomRenderingSystem';\n\nlet orbitCamera: OrbitPlannerCamera;\nlet orbitCameraScreenshot: OrbitPlannerCamera;\nlet ipexViewer: IViewer;\nlet directionalLight: IDirectionalLight;\nexport let roomRenderingSystem: RoomRenderingSystem | undefined;\nlet productPlacementUtil: ProductPlacementUtil | undefined;\nlet core: Core | undefined;\n\ninterface ICameraAnimationParams {\n duration: number;\n position: IVector3;\n camera: OrbitPlannerCamera;\n}\n\nexport const getBetraktaCrashReport = () => {\n const viewer = ipexViewer as IViewer & IExperimentalViewer & IAdvancedViewer;\n\n if (!viewer) {\n return;\n }\n\n // Create report only for kiosks for now [SKYT-1547]\n const canCreateReport = isKiosk() && !isE2eTest();\n if (canCreateReport) {\n const memory_tracker = viewer.get_webgl_memory_tracker();\n const memory_tracker_report = !memory_tracker\n ? 'null'\n : memory_tracker.get_memory_usage_report();\n\n //@ts-expect-error\n const effects = viewer._engine._compiledEffects;\n\n let babylon_shader_cache_count = 0;\n let babylon_shader_cache_waste_bytes = 0;\n\n try {\n const keys = Object.keys(effects);\n babylon_shader_cache_count = 0;\n keys.forEach(key => {\n const effect = effects[key];\n babylon_shader_cache_count++;\n babylon_shader_cache_waste_bytes += key.length;\n babylon_shader_cache_waste_bytes += effect._fragmentSourceCode.length;\n babylon_shader_cache_waste_bytes += effect._vertexSourceCode.length;\n babylon_shader_cache_waste_bytes += effect.fragmentSourceCodeBeforeMigration.length;\n babylon_shader_cache_waste_bytes += effect.vertexSourceCodeBeforeMigration.length;\n\n babylon_shader_cache_waste_bytes += effect._fragmentSourceCodeOverride.length;\n babylon_shader_cache_waste_bytes += effect._vertexSourceCodeOverride.length;\n });\n } catch {\n } finally {\n const report = {\n webgl_usage: memory_tracker_report,\n babylon_shader_cache_count: babylon_shader_cache_count,\n babylon_shader_cache_waste_bytes: babylon_shader_cache_waste_bytes\n };\n\n return report;\n }\n }\n return null;\n};\n\n// coroutine function\nexport function* rotateOnAngleCoroutine(\n cameraParams: ICameraAnimationParams,\n on_done: () => void\n): Coroutine {\n const { duration, position, camera } = cameraParams;\n const startPos = IVector3.copy(position);\n const endPos = cameraCoordinates().position;\n let elapsedTime = 0;\n const cameraZPos = IVector3.copy(camera.position).z;\n\n while (elapsedTime < duration) {\n const delta = yield;\n elapsedTime += delta.milliseconds;\n const clampedTime = Math.min(1, elapsedTime / duration);\n const easedTime = smooth_step(clampedTime);\n\n const newX = startPos.x + (endPos.x - startPos.x) * easedTime;\n const newY = startPos.y + (endPos.y - startPos.y) * easedTime;\n const newZ = cameraZPos + (startPos.z - cameraZPos) * easedTime;\n\n camera.look_at({ x: newX, y: newY, z: newZ }, cameraCoordinates().target);\n }\n\n on_done();\n return undefined;\n}\n\nexport const getViewer = () => {\n if (!ipexViewer) {\n const canvas = document.getElementById('renderCanvas') as HTMLCanvasElement | null;\n\n if (!canvas) {\n captureException(new Error('No canvas was ready to assign viewer with.'));\n return undefined;\n }\n\n let dracoSource: DracoDecoderSource = DracoDecoderSource.UNIVERSAL;\n\n const isIkeaCom =\n window.location.host.startsWith('www.ikea.com') ||\n window.location.host.startsWith('ikea.com');\n\n if (isIkeaCom && !isKiosk()) {\n dracoSource = DracoDecoderSource.IKEA_COM;\n }\n\n ipexViewer = create_viewer(canvas, dracoSource, {\n headless: isRunningTest || isE2eTest() ? true : undefined,\n enable_webgl_memory_tracker: isKiosk() ? true : undefined\n });\n }\n\n return ipexViewer;\n};\n\nexport const getScreenshotCamera = () => {\n if (!orbitCameraScreenshot) {\n orbitCameraScreenshot = new OrbitPlannerCamera(\n cameraCoordinates().position,\n cameraCoordinates().target,\n ipexViewer\n );\n orbitCameraScreenshot.field_of_view_degrees = defaultViewerCalculations.fieldOfView;\n orbitCameraScreenshot.update_aspect_ratio(screenshotSettings.aspectRatio);\n }\n return orbitCameraScreenshot;\n};\n\nexport const getCamera = () => {\n if (!orbitCamera) {\n orbitCamera = new OrbitPlannerCamera(\n cameraCoordinates().position,\n cameraCoordinates().target,\n ipexViewer\n );\n orbitCamera.field_of_view_degrees = defaultViewerCalculations.fieldOfView;\n ipexViewer.replace_camera(orbitCamera, CameraTransitionPreset.NONE);\n }\n return orbitCamera;\n};\n\nexport const restrictCameraMovement = () => {\n const activeCamera = getCamera();\n const camTarget = activeCamera.target;\n // Will lock camera to one position, so we do not allow panning\n activeCamera.set_pan_limits({ min: camTarget, max: camTarget });\n // Will lock camera zoom to not be too close nor too far away\n activeCamera.set_zoom_limits({\n near: defaultViewerCalculations.limitsMinMax.min,\n far: defaultViewerCalculations.limitsMinMax.max\n });\n};\n\nexport const onResize = () => {\n const canvas = document.getElementById('renderCanvas') as HTMLCanvasElement | null;\n if (!canvas) {\n return;\n }\n\n const { width: canvasWidth, height: canvasHeight } = canvas.getBoundingClientRect();\n let renderWidth = canvasWidth;\n let renderHeight = canvasHeight;\n\n if (renderWidth < 1 || renderHeight < 1) {\n const isMobile = store.getState().userAgent.isMobile;\n if (isMobile) {\n renderWidth = screenshotSettings.params.size.mobile.x;\n renderHeight = screenshotSettings.params.size.mobile.y;\n } else {\n renderWidth = screenshotSettings.params.size.desktop.x;\n renderHeight = screenshotSettings.params.size.desktop.y;\n }\n }\n\n if (renderWidth < 1 || renderHeight < 1) {\n renderWidth = 1920;\n renderHeight = 1080;\n }\n\n ipexViewer.resize(renderWidth, renderHeight);\n};\n\nexport const addAmbientOcclusion = (enabled: boolean) => {\n ipexViewer.enable_temporal_effects(enabled);\n};\n\nexport const createViewerDefaultSetup = (\n importedCore: Core,\n importedProductPlacementUtil: ProductPlacementUtil\n) => {\n productPlacementUtil = importedProductPlacementUtil;\n core = importedCore;\n const canvas = document.getElementById(RENDER_CANVAS) as unknown as HTMLCanvasElement; // TS requires to first convert to unknown\n\n ipexViewer = getViewer() as IViewer;\n const inputGatherer = new InputGatherer(canvas, ipexViewer);\n ipexViewer.get_viewer_dispose_observable().add_once(() => {\n return inputGatherer.dispose();\n });\n getCamera();\n restrictCameraMovement();\n setupEnvironmentMap();\n setupLight();\n addAmbientOcclusion(true);\n const coreViewer: Viewer = setupCoreViewerBridge(importedCore);\n overrideInitialTabIndex();\n\n ipexViewer.set_global_outline_color(OutlineColor.hover);\n ipexViewer.set_global_outline_width(0.3);\n return { ipexViewer, coreViewer };\n};\n\nexport const awaitVisibleModelsOnScene = async () => {\n if (!ipexViewer) {\n return false;\n }\n\n return ipexViewer.on_current_scene_ready().then(async () => {\n /**\n * Making sure all loading boxes are gone before confirming models are loaded\n * This is needed for the screenshotUtil to not risk capturing boxes when going straight to summary from url\n *\n * loadingBoxAnimationDuration is taken from here:\n * https://github.com/inter-ikea/CBF-RE-IPEX-VIEWER/blob/main/package/viewer/src/modules/ProxyLoader.ts#L61\n */\n const loadingBoxAnimationDuration = 300;\n const objectIds = ipexViewer.get_all_objects();\n const promises: Array> = [];\n objectIds.forEach(id => {\n promises.push(ipexViewer.object_ready(id));\n });\n await Promise.all(promises);\n await delay(loadingBoxAnimationDuration);\n onResize();\n store.dispatch(sceneAction.setHasAllSelectedModelsLoaded(true));\n return true;\n });\n};\n\nconst setupCoreViewerBridge = (core: Core) => {\n const coreViewer: Viewer = new IPEXViewerCoreAdapter(\n ipexViewer,\n core.services.entityManager,\n core.services.sceneManager\n );\n core.setViewer(coreViewer);\n\n roomRenderingSystem = new RoomRenderingSystem(core, ipexViewer);\n core.services.entityManager.registerSystem(roomRenderingSystem);\n\n return coreViewer;\n};\n\nconst overrideInitialTabIndex = () => {\n // It seems Babylon requires tabIndex on the canvas to be 1 to allow keyboard inputs so maybe this is a bad idea,\n // but it is needed for a11y reasons so the tab order makes sense.\n // https://forum.babylonjs.com/t/canvas-tabindex-1/8052\n ipexViewer.set_canvas_tab_index(-1);\n};\n\nconst centeredRoomDepthTarget = () => {\n const fromMMtoM = (value: number) => {\n return value / 1000;\n };\n\n const roomDepth = productPlacementUtil?.userSelections.selectedRoomDepth;\n return roomDepth ? fromMMtoM(roomDepth) / 2 : defaultViewerCalculations.targetXYZ.z;\n};\n\nexport const cameraCoordinates = () => {\n return {\n initialPosition: new IVector3(\n defaultViewerCalculations.preIntroAnimationX,\n defaultViewerCalculations.positionXYZ.y,\n defaultViewerCalculations.positionXYZ.z\n ),\n position: new IVector3(\n defaultViewerCalculations.positionXYZ.x,\n defaultViewerCalculations.positionXYZ.y,\n defaultViewerCalculations.positionXYZ.z\n ),\n target: new IVector3(\n defaultViewerCalculations.targetXYZ.x,\n defaultViewerCalculations.targetXYZ.y,\n centeredRoomDepthTarget()\n )\n };\n};\n\nconst cameraDirection = () => {\n const position = new IVector3(\n defaultViewerCalculations.positionXYZ.x,\n defaultViewerCalculations.positionXYZ.y,\n defaultViewerCalculations.positionXYZ.z\n );\n const target = new IVector3(\n defaultViewerCalculations.targetXYZ.x,\n defaultViewerCalculations.targetXYZ.y,\n centeredRoomDepthTarget()\n );\n\n const subtractedPosTar = IVector3.subtract(target, position);\n const direction = IVector3.normalize(subtractedPosTar);\n return direction;\n};\n\nconst frameObjects = (camera: OrbitPlannerCamera, direction: IVector3) => {\n let cameraTargets: number[] = [];\n\n if (core) {\n const { entities } = core.services.entityManager;\n\n const testRoomEntity = entities.find(\n (entity: Entity) =>\n entity.hasComponent(ComponentIds.ROOM_GEOMETRY_COMPONENT_ID) &&\n entity.hasComponent(ViewerRoomComponent.ID)\n );\n\n if (testRoomEntity) {\n const roomComponent = testRoomEntity.getComponent(\n ViewerRoomComponent.ID\n );\n const viewerObjects = roomComponent?.viewerRoom.get_room_objects();\n\n if (viewerObjects?.length) {\n cameraTargets = viewerObjects;\n }\n }\n }\n\n if (!cameraTargets.length) {\n return;\n }\n\n return camera.frame_objects(\n cameraTargets,\n cameraSettings.precise,\n cameraSettings.margin,\n direction,\n cameraSettings.aspectRatio\n );\n};\n\nexport const setCameraRelativeToRoom = async (\n direction?: IVector3,\n camera?: OrbitPlannerCamera,\n noAnimate?: boolean,\n dontAwaitModels?: boolean\n) => {\n if (!ipexViewer) {\n return;\n }\n\n onResize();\n\n if (!dontAwaitModels) {\n const {\n scene: { hasAllSelectedModelsLoaded }\n } = store.getState();\n\n const allModelsVisible = await awaitVisibleModelsOnScene();\n\n if (!hasAllSelectedModelsLoaded && allModelsVisible) {\n store.dispatch(sceneAction.setHasAllSelectedModelsLoaded(true));\n }\n }\n\n direction = direction || cameraDirection();\n\n const activeCamera = camera || getCamera();\n if (noAnimate) {\n await frameObjects(activeCamera, direction);\n } else {\n const tempCamera = activeCamera.clone();\n\n await frameObjects(tempCamera, direction);\n\n await new Promise(resolve => {\n ipexViewer.start_coroutine(\n rotateOnAngleCoroutine(\n { duration: 750, position: tempCamera.position, camera: getCamera() },\n () => {\n return resolve();\n }\n )\n );\n });\n\n tempCamera.dispose();\n }\n\n restrictCameraMovement();\n};\n\nconst setupLight = () => {\n directionalLight = ipexViewer.create_light(LightType.DIRECTIONAL_LIGHT);\n setLightPosition();\n directionalLight.target = new IVector3(0, 0, 0);\n directionalLight.intensity = 3;\n directionalLight.shadow.enable_shadows = true;\n directionalLight.shadow.shadow_near = 1;\n directionalLight.shadow.shadow_far = 25.0;\n directionalLight.shadow.shadow_resolution = 2048;\n};\n\nconst setLightPosition = (direction?: IVector3) => {\n const xCoord = 5.8;\n const YCoord = 10;\n const defaultZCoord = 3;\n let zCoord;\n\n if (direction) {\n zCoord = direction.z > 0 ? -defaultZCoord : defaultZCoord;\n } else {\n zCoord = getCamera().position.z < 0 ? -defaultZCoord : defaultZCoord;\n }\n\n directionalLight.position = new IVector3(xCoord, YCoord, zCoord);\n};\n\nexport const setShadows = (status: boolean) => {\n directionalLight.shadow.enable_shadows = status;\n};\n\nconst setupEnvironmentMap = () => {\n ipexViewer.set_environment_map(getAssetsPath('./210609_pax_env_lowres_2.env'));\n ipexViewer.set_environment_map_rotation_radians(29.9);\n ipexViewer.set_environment_map_local_mode({\n size: { x: 4.5, y: 5, z: 5.5 },\n position: { x: 0, y: 1.5, z: 2 }\n });\n ipexViewer.set_environment_map_intensity(0.95);\n};\n","import { CookieConsentService } from '@inter-ikea-kompis/services';\nimport { CookieConsentLevelsEnum } from 'utils/constants/consentLevels';\nimport { getServiceSettings } from 'utils/getServiceSettings';\n\nlet service: CookieConsentService;\n\nconst getService = () => {\n if (!service) {\n service = new CookieConsentService({ ...getServiceSettings() });\n }\n\n return service;\n};\n\nexport const hasCookieConsent = (consentLevel: CookieConsentLevelsEnum) => {\n return getService().hasCookieConsent(consentLevel);\n};\n","import { InsightsApi } from '@insights/insights-data-provider';\n\nlet service: InsightsApi;\n\nexport const insightsApiService = () => {\n if (!service) {\n service = new InsightsApi();\n }\n\n return service;\n};\n","export const AB_TEST_PREFIX = 'ab_';\n\nexport const A_VERSION = 'A';\nexport const B_VERSION = 'B';\n\nexport const CURRENT_RUNNING_TEST = undefined;\n","export enum CookieConsentLevelsEnum {\n /** Technical cookies help to make a website usable by enabling basic\n * functions like page navigation and access to secure areas of the website.\n * The website cannot function properly without these cookies. */\n TECHNICAL = 1,\n /** Analytics cookies help website owners to understand how visitors\n * interact with websites by collecting and reporting information anonymously. */\n ANALYTICAL = 2,\n /** Preference cookies enable a website to remember information that changes\n * the way the website behaves or looks, like your preferred language or the\n * region that you are in. */\n PREFERENCE = 3,\n /** Marketing cookies are used to track visitors across websites. The intention\n * is to display ads that are relevant and engaging for the individual user and\n * thereby more valuable for publishers and third party advertisers.\n * */\n MARKETING = 4\n}\n","export const flowName = 'new-landing-page';\nexport enum StepName {\n // Step 1\n Intro = 'Intro',\n\n // Step 2\n PlanNewDesign = 'Plan new design',\n PlanWithSPR = 'Plan with SPR',\n\n // Step 3\n ContinuedPlanning = 'Continued planning',\n PlanFomVPC = 'Plan from VPC',\n PlanWithStorageBehind = 'Plan with StorageBehind',\n\n // Step 4\n Summary = 'Summary'\n}\n\nexport const getStepLevel = (stepName: StepName) => {\n switch (stepName) {\n case StepName.Intro:\n return 1;\n case StepName.PlanNewDesign:\n case StepName.PlanWithSPR:\n return 2;\n case StepName.ContinuedPlanning:\n case StepName.PlanFomVPC:\n case StepName.PlanWithStorageBehind:\n return 3;\n case StepName.Summary:\n return 4;\n default:\n return 0;\n }\n};\n","/**\n * @license React\n * use-sync-external-store-with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = React.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/use-sync-external-store-with-selector.production.js');\n} else {\n module.exports = require('./cjs/use-sync-external-store-with-selector.development.js');\n}\n","// src/utils/react.ts\nimport * as React from \"react\";\n\n// src/utils/react-is.ts\nvar IS_REACT_19 = /* @__PURE__ */ React.version.startsWith(\"19\");\nvar REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for(\n IS_REACT_19 ? \"react.transitional.element\" : \"react.element\"\n);\nvar REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for(\"react.portal\");\nvar REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for(\"react.fragment\");\nvar REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for(\"react.strict_mode\");\nvar REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for(\"react.profiler\");\nvar REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for(\"react.consumer\");\nvar REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for(\"react.context\");\nvar REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for(\"react.forward_ref\");\nvar REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for(\"react.suspense\");\nvar REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for(\n \"react.suspense_list\"\n);\nvar REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for(\"react.memo\");\nvar REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for(\"react.lazy\");\nvar REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for(\"react.offscreen\");\nvar REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for(\n \"react.client.reference\"\n);\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nfunction isValidElementType(type) {\n return typeof type === \"string\" || typeof type === \"function\" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || typeof type === \"object\" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== void 0) ? true : false;\n}\nfunction typeOf(object) {\n if (typeof object === \"object\" && object !== null) {\n const { $$typeof } = object;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n switch (object = object.type, object) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return object;\n default:\n switch (object = object && object.$$typeof, object) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return object;\n case REACT_CONSUMER_TYPE:\n return object;\n default:\n return $$typeof;\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n}\nfunction isContextConsumer(object) {\n return IS_REACT_19 ? typeOf(object) === REACT_CONSUMER_TYPE : typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\n\n// src/utils/warning.ts\nfunction warning(message) {\n if (typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(message);\n }\n try {\n throw new Error(message);\n } catch (e) {\n }\n}\n\n// src/connect/verifySubselectors.ts\nfunction verify(selector, methodName) {\n if (!selector) {\n throw new Error(`Unexpected value for ${methodName} in connect.`);\n } else if (methodName === \"mapStateToProps\" || methodName === \"mapDispatchToProps\") {\n if (!Object.prototype.hasOwnProperty.call(selector, \"dependsOnOwnProps\")) {\n warning(\n `The selector for ${methodName} of connect did not specify a value for dependsOnOwnProps.`\n );\n }\n }\n}\nfunction verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps) {\n verify(mapStateToProps, \"mapStateToProps\");\n verify(mapDispatchToProps, \"mapDispatchToProps\");\n verify(mergeProps, \"mergeProps\");\n}\n\n// src/connect/selectorFactory.ts\nfunction pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, {\n areStatesEqual,\n areOwnPropsEqual,\n areStatePropsEqual\n}) {\n let hasRunAtLeastOnce = false;\n let state;\n let ownProps;\n let stateProps;\n let dispatchProps;\n let mergedProps;\n function handleFirstCall(firstState, firstOwnProps) {\n state = firstState;\n ownProps = firstOwnProps;\n stateProps = mapStateToProps(state, ownProps);\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n hasRunAtLeastOnce = true;\n return mergedProps;\n }\n function handleNewPropsAndNewState() {\n stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps)\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n function handleNewProps() {\n if (mapStateToProps.dependsOnOwnProps)\n stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps)\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n function handleNewState() {\n const nextStateProps = mapStateToProps(state, ownProps);\n const statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n stateProps = nextStateProps;\n if (statePropsChanged)\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n function handleSubsequentCalls(nextState, nextOwnProps) {\n const propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n const stateChanged = !areStatesEqual(\n nextState,\n state,\n nextOwnProps,\n ownProps\n );\n state = nextState;\n ownProps = nextOwnProps;\n if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n if (propsChanged) return handleNewProps();\n if (stateChanged) return handleNewState();\n return mergedProps;\n }\n return function pureFinalPropsSelector(nextState, nextOwnProps) {\n return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n };\n}\nfunction finalPropsSelectorFactory(dispatch, {\n initMapStateToProps,\n initMapDispatchToProps,\n initMergeProps,\n ...options\n}) {\n const mapStateToProps = initMapStateToProps(dispatch, options);\n const mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n const mergeProps = initMergeProps(dispatch, options);\n if (process.env.NODE_ENV !== \"production\") {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps);\n }\n return pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}\n\n// src/utils/bindActionCreators.ts\nfunction bindActionCreators(actionCreators, dispatch) {\n const boundActionCreators = {};\n for (const key in actionCreators) {\n const actionCreator = actionCreators[key];\n if (typeof actionCreator === \"function\") {\n boundActionCreators[key] = (...args) => dispatch(actionCreator(...args));\n }\n }\n return boundActionCreators;\n}\n\n// src/utils/isPlainObject.ts\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" || obj === null) return false;\n const proto = Object.getPrototypeOf(obj);\n if (proto === null) return true;\n let baseProto = proto;\n while (Object.getPrototypeOf(baseProto) !== null) {\n baseProto = Object.getPrototypeOf(baseProto);\n }\n return proto === baseProto;\n}\n\n// src/utils/verifyPlainObject.ts\nfunction verifyPlainObject(value, displayName, methodName) {\n if (!isPlainObject(value)) {\n warning(\n `${methodName}() in ${displayName} must return a plain object. Instead received ${value}.`\n );\n }\n}\n\n// src/connect/wrapMapToProps.ts\nfunction wrapMapToPropsConstant(getConstant) {\n return function initConstantSelector(dispatch) {\n const constant = getConstant(dispatch);\n function constantSelector() {\n return constant;\n }\n constantSelector.dependsOnOwnProps = false;\n return constantSelector;\n };\n}\nfunction getDependsOnOwnProps(mapToProps) {\n return mapToProps.dependsOnOwnProps ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n}\nfunction wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, { displayName }) {\n const proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch, void 0);\n };\n proxy.dependsOnOwnProps = true;\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n let props = proxy(stateOrDispatch, ownProps);\n if (typeof props === \"function\") {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n if (process.env.NODE_ENV !== \"production\")\n verifyPlainObject(props, displayName, methodName);\n return props;\n };\n return proxy;\n };\n}\n\n// src/connect/invalidArgFactory.ts\nfunction createInvalidArgFactory(arg, name) {\n return (dispatch, options) => {\n throw new Error(\n `Invalid value of type ${typeof arg} for ${name} argument when connecting component ${options.wrappedComponentName}.`\n );\n };\n}\n\n// src/connect/mapDispatchToProps.ts\nfunction mapDispatchToPropsFactory(mapDispatchToProps) {\n return mapDispatchToProps && typeof mapDispatchToProps === \"object\" ? wrapMapToPropsConstant(\n (dispatch) => (\n // @ts-ignore\n bindActionCreators(mapDispatchToProps, dispatch)\n )\n ) : !mapDispatchToProps ? wrapMapToPropsConstant((dispatch) => ({\n dispatch\n })) : typeof mapDispatchToProps === \"function\" ? (\n // @ts-ignore\n wrapMapToPropsFunc(mapDispatchToProps, \"mapDispatchToProps\")\n ) : createInvalidArgFactory(mapDispatchToProps, \"mapDispatchToProps\");\n}\n\n// src/connect/mapStateToProps.ts\nfunction mapStateToPropsFactory(mapStateToProps) {\n return !mapStateToProps ? wrapMapToPropsConstant(() => ({})) : typeof mapStateToProps === \"function\" ? (\n // @ts-ignore\n wrapMapToPropsFunc(mapStateToProps, \"mapStateToProps\")\n ) : createInvalidArgFactory(mapStateToProps, \"mapStateToProps\");\n}\n\n// src/connect/mergeProps.ts\nfunction defaultMergeProps(stateProps, dispatchProps, ownProps) {\n return { ...ownProps, ...stateProps, ...dispatchProps };\n}\nfunction wrapMergePropsFunc(mergeProps) {\n return function initMergePropsProxy(dispatch, { displayName, areMergedPropsEqual }) {\n let hasRunOnce = false;\n let mergedProps;\n return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n const nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n if (hasRunOnce) {\n if (!areMergedPropsEqual(nextMergedProps, mergedProps))\n mergedProps = nextMergedProps;\n } else {\n hasRunOnce = true;\n mergedProps = nextMergedProps;\n if (process.env.NODE_ENV !== \"production\")\n verifyPlainObject(mergedProps, displayName, \"mergeProps\");\n }\n return mergedProps;\n };\n };\n}\nfunction mergePropsFactory(mergeProps) {\n return !mergeProps ? () => defaultMergeProps : typeof mergeProps === \"function\" ? wrapMergePropsFunc(mergeProps) : createInvalidArgFactory(mergeProps, \"mergeProps\");\n}\n\n// src/utils/batch.ts\nfunction defaultNoopBatch(callback) {\n callback();\n}\n\n// src/utils/Subscription.ts\nfunction createListenerCollection() {\n let first = null;\n let last = null;\n return {\n clear() {\n first = null;\n last = null;\n },\n notify() {\n defaultNoopBatch(() => {\n let listener = first;\n while (listener) {\n listener.callback();\n listener = listener.next;\n }\n });\n },\n get() {\n const listeners = [];\n let listener = first;\n while (listener) {\n listeners.push(listener);\n listener = listener.next;\n }\n return listeners;\n },\n subscribe(callback) {\n let isSubscribed = true;\n const listener = last = {\n callback,\n next: null,\n prev: last\n };\n if (listener.prev) {\n listener.prev.next = listener;\n } else {\n first = listener;\n }\n return function unsubscribe() {\n if (!isSubscribed || first === null) return;\n isSubscribed = false;\n if (listener.next) {\n listener.next.prev = listener.prev;\n } else {\n last = listener.prev;\n }\n if (listener.prev) {\n listener.prev.next = listener.next;\n } else {\n first = listener.next;\n }\n };\n }\n };\n}\nvar nullListeners = {\n notify() {\n },\n get: () => []\n};\nfunction createSubscription(store, parentSub) {\n let unsubscribe;\n let listeners = nullListeners;\n let subscriptionsAmount = 0;\n let selfSubscribed = false;\n function addNestedSub(listener) {\n trySubscribe();\n const cleanupListener = listeners.subscribe(listener);\n let removed = false;\n return () => {\n if (!removed) {\n removed = true;\n cleanupListener();\n tryUnsubscribe();\n }\n };\n }\n function notifyNestedSubs() {\n listeners.notify();\n }\n function handleChangeWrapper() {\n if (subscription.onStateChange) {\n subscription.onStateChange();\n }\n }\n function isSubscribed() {\n return selfSubscribed;\n }\n function trySubscribe() {\n subscriptionsAmount++;\n if (!unsubscribe) {\n unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper);\n listeners = createListenerCollection();\n }\n }\n function tryUnsubscribe() {\n subscriptionsAmount--;\n if (unsubscribe && subscriptionsAmount === 0) {\n unsubscribe();\n unsubscribe = void 0;\n listeners.clear();\n listeners = nullListeners;\n }\n }\n function trySubscribeSelf() {\n if (!selfSubscribed) {\n selfSubscribed = true;\n trySubscribe();\n }\n }\n function tryUnsubscribeSelf() {\n if (selfSubscribed) {\n selfSubscribed = false;\n tryUnsubscribe();\n }\n }\n const subscription = {\n addNestedSub,\n notifyNestedSubs,\n handleChangeWrapper,\n isSubscribed,\n trySubscribe: trySubscribeSelf,\n tryUnsubscribe: tryUnsubscribeSelf,\n getListeners: () => listeners\n };\n return subscription;\n}\n\n// src/utils/useIsomorphicLayoutEffect.ts\nvar canUseDOM = () => !!(typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\");\nvar isDOM = /* @__PURE__ */ canUseDOM();\nvar isRunningInReactNative = () => typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\";\nvar isReactNative = /* @__PURE__ */ isRunningInReactNative();\nvar getUseIsomorphicLayoutEffect = () => isDOM || isReactNative ? React.useLayoutEffect : React.useEffect;\nvar useIsomorphicLayoutEffect = /* @__PURE__ */ getUseIsomorphicLayoutEffect();\n\n// src/utils/shallowEqual.ts\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n if (typeof objA !== \"object\" || objA === null || typeof objB !== \"object\" || objB === null) {\n return false;\n }\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n for (let i = 0; i < keysA.length; i++) {\n if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n return true;\n}\n\n// src/utils/hoistStatics.ts\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n $$typeof: true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n $$typeof: true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {\n [ForwardRef]: FORWARD_REF_STATICS,\n [Memo]: MEMO_STATICS\n};\nfunction getStatics(component) {\n if (isMemo(component)) {\n return MEMO_STATICS;\n }\n return TYPE_STATICS[component[\"$$typeof\"]] || REACT_STATICS;\n}\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent) {\n if (typeof sourceComponent !== \"string\") {\n if (objectPrototype) {\n const inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent);\n }\n }\n let keys = getOwnPropertyNames(sourceComponent);\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n const targetStatics = getStatics(targetComponent);\n const sourceStatics = getStatics(sourceComponent);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (!KNOWN_STATICS[key] && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n const descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try {\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {\n }\n }\n }\n }\n return targetComponent;\n}\n\n// src/components/Context.ts\nvar ContextKey = /* @__PURE__ */ Symbol.for(`react-redux-context`);\nvar gT = typeof globalThis !== \"undefined\" ? globalThis : (\n /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */\n {}\n);\nfunction getContext() {\n if (!React.createContext) return {};\n const contextMap = gT[ContextKey] ??= /* @__PURE__ */ new Map();\n let realContext = contextMap.get(React.createContext);\n if (!realContext) {\n realContext = React.createContext(\n null\n );\n if (process.env.NODE_ENV !== \"production\") {\n realContext.displayName = \"ReactRedux\";\n }\n contextMap.set(React.createContext, realContext);\n }\n return realContext;\n}\nvar ReactReduxContext = /* @__PURE__ */ getContext();\n\n// src/components/connect.tsx\nvar NO_SUBSCRIPTION_ARRAY = [null, null];\nvar stringifyComponent = (Comp) => {\n try {\n return JSON.stringify(Comp);\n } catch (err) {\n return String(Comp);\n }\n};\nfunction useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) {\n useIsomorphicLayoutEffect(() => effectFunc(...effectArgs), dependencies);\n}\nfunction captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs) {\n lastWrapperProps.current = wrapperProps;\n renderIsScheduled.current = false;\n if (childPropsFromStoreUpdate.current) {\n childPropsFromStoreUpdate.current = null;\n notifyNestedSubs();\n }\n}\nfunction subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, additionalSubscribeListener) {\n if (!shouldHandleStateChanges) return () => {\n };\n let didUnsubscribe = false;\n let lastThrownError = null;\n const checkForUpdates = () => {\n if (didUnsubscribe || !isMounted.current) {\n return;\n }\n const latestStoreState = store.getState();\n let newChildProps, error;\n try {\n newChildProps = childPropsSelector(\n latestStoreState,\n lastWrapperProps.current\n );\n } catch (e) {\n error = e;\n lastThrownError = e;\n }\n if (!error) {\n lastThrownError = null;\n }\n if (newChildProps === lastChildProps.current) {\n if (!renderIsScheduled.current) {\n notifyNestedSubs();\n }\n } else {\n lastChildProps.current = newChildProps;\n childPropsFromStoreUpdate.current = newChildProps;\n renderIsScheduled.current = true;\n additionalSubscribeListener();\n }\n };\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe();\n checkForUpdates();\n const unsubscribeWrapper = () => {\n didUnsubscribe = true;\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n if (lastThrownError) {\n throw lastThrownError;\n }\n };\n return unsubscribeWrapper;\n}\nfunction strictEqual(a, b) {\n return a === b;\n}\nvar hasWarnedAboutDeprecatedPureOption = false;\nfunction connect(mapStateToProps, mapDispatchToProps, mergeProps, {\n // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence.\n // @ts-ignore\n pure,\n areStatesEqual = strictEqual,\n areOwnPropsEqual = shallowEqual,\n areStatePropsEqual = shallowEqual,\n areMergedPropsEqual = shallowEqual,\n // use React's forwardRef to expose a ref of the wrapped component\n forwardRef = false,\n // the context consumer to use\n context = ReactReduxContext\n} = {}) {\n if (process.env.NODE_ENV !== \"production\") {\n if (pure !== void 0 && !hasWarnedAboutDeprecatedPureOption) {\n hasWarnedAboutDeprecatedPureOption = true;\n warning(\n 'The `pure` option has been removed. `connect` is now always a \"pure/memoized\" component'\n );\n }\n }\n const Context = context;\n const initMapStateToProps = mapStateToPropsFactory(mapStateToProps);\n const initMapDispatchToProps = mapDispatchToPropsFactory(mapDispatchToProps);\n const initMergeProps = mergePropsFactory(mergeProps);\n const shouldHandleStateChanges = Boolean(mapStateToProps);\n const wrapWithConnect = (WrappedComponent) => {\n if (process.env.NODE_ENV !== \"production\") {\n const isValid = /* @__PURE__ */ isValidElementType(WrappedComponent);\n if (!isValid)\n throw new Error(\n `You must pass a component to the function returned by connect. Instead received ${stringifyComponent(\n WrappedComponent\n )}`\n );\n }\n const wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || \"Component\";\n const displayName = `Connect(${wrappedComponentName})`;\n const selectorFactoryOptions = {\n shouldHandleStateChanges,\n displayName,\n wrappedComponentName,\n WrappedComponent,\n // @ts-ignore\n initMapStateToProps,\n initMapDispatchToProps,\n initMergeProps,\n areStatesEqual,\n areStatePropsEqual,\n areOwnPropsEqual,\n areMergedPropsEqual\n };\n function ConnectFunction(props) {\n const [propsContext, reactReduxForwardedRef, wrapperProps] = React.useMemo(() => {\n const { reactReduxForwardedRef: reactReduxForwardedRef2, ...wrapperProps2 } = props;\n return [props.context, reactReduxForwardedRef2, wrapperProps2];\n }, [props]);\n const ContextToUse = React.useMemo(() => {\n let ResultContext = Context;\n if (propsContext?.Consumer) {\n if (process.env.NODE_ENV !== \"production\") {\n const isValid = /* @__PURE__ */ isContextConsumer(\n // @ts-ignore\n /* @__PURE__ */ React.createElement(propsContext.Consumer, null)\n );\n if (!isValid) {\n throw new Error(\n \"You must pass a valid React context consumer as `props.context`\"\n );\n }\n ResultContext = propsContext;\n }\n }\n return ResultContext;\n }, [propsContext, Context]);\n const contextValue = React.useContext(ContextToUse);\n const didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch);\n const didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store);\n if (process.env.NODE_ENV !== \"production\" && !didStoreComeFromProps && !didStoreComeFromContext) {\n throw new Error(\n `Could not find \"store\" in the context of \"${displayName}\". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to ${displayName} in connect options.`\n );\n }\n const store = didStoreComeFromProps ? props.store : contextValue.store;\n const getServerState = didStoreComeFromContext ? contextValue.getServerState : store.getState;\n const childPropsSelector = React.useMemo(() => {\n return finalPropsSelectorFactory(store.dispatch, selectorFactoryOptions);\n }, [store]);\n const [subscription, notifyNestedSubs] = React.useMemo(() => {\n if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY;\n const subscription2 = createSubscription(\n store,\n didStoreComeFromProps ? void 0 : contextValue.subscription\n );\n const notifyNestedSubs2 = subscription2.notifyNestedSubs.bind(subscription2);\n return [subscription2, notifyNestedSubs2];\n }, [store, didStoreComeFromProps, contextValue]);\n const overriddenContextValue = React.useMemo(() => {\n if (didStoreComeFromProps) {\n return contextValue;\n }\n return {\n ...contextValue,\n subscription\n };\n }, [didStoreComeFromProps, contextValue, subscription]);\n const lastChildProps = React.useRef(void 0);\n const lastWrapperProps = React.useRef(wrapperProps);\n const childPropsFromStoreUpdate = React.useRef(void 0);\n const renderIsScheduled = React.useRef(false);\n const isMounted = React.useRef(false);\n const latestSubscriptionCallbackError = React.useRef(\n void 0\n );\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n const actualChildPropsSelector = React.useMemo(() => {\n const selector = () => {\n if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) {\n return childPropsFromStoreUpdate.current;\n }\n return childPropsSelector(store.getState(), wrapperProps);\n };\n return selector;\n }, [store, wrapperProps]);\n const subscribeForReact = React.useMemo(() => {\n const subscribe = (reactListener) => {\n if (!subscription) {\n return () => {\n };\n }\n return subscribeUpdates(\n shouldHandleStateChanges,\n store,\n subscription,\n // @ts-ignore\n childPropsSelector,\n lastWrapperProps,\n lastChildProps,\n renderIsScheduled,\n isMounted,\n childPropsFromStoreUpdate,\n notifyNestedSubs,\n reactListener\n );\n };\n return subscribe;\n }, [subscription]);\n useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [\n lastWrapperProps,\n lastChildProps,\n renderIsScheduled,\n wrapperProps,\n childPropsFromStoreUpdate,\n notifyNestedSubs\n ]);\n let actualChildProps;\n try {\n actualChildProps = React.useSyncExternalStore(\n // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing\n subscribeForReact,\n // TODO This is incredibly hacky. We've already processed the store update and calculated new child props,\n // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`.\n actualChildPropsSelector,\n getServerState ? () => childPropsSelector(getServerState(), wrapperProps) : actualChildPropsSelector\n );\n } catch (err) {\n if (latestSubscriptionCallbackError.current) {\n ;\n err.message += `\nThe error may be correlated with this previous error:\n${latestSubscriptionCallbackError.current.stack}\n\n`;\n }\n throw err;\n }\n useIsomorphicLayoutEffect(() => {\n latestSubscriptionCallbackError.current = void 0;\n childPropsFromStoreUpdate.current = void 0;\n lastChildProps.current = actualChildProps;\n });\n const renderedWrappedComponent = React.useMemo(() => {\n return (\n // @ts-ignore\n /* @__PURE__ */ React.createElement(\n WrappedComponent,\n {\n ...actualChildProps,\n ref: reactReduxForwardedRef\n }\n )\n );\n }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]);\n const renderedChild = React.useMemo(() => {\n if (shouldHandleStateChanges) {\n return /* @__PURE__ */ React.createElement(ContextToUse.Provider, { value: overriddenContextValue }, renderedWrappedComponent);\n }\n return renderedWrappedComponent;\n }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]);\n return renderedChild;\n }\n const _Connect = React.memo(ConnectFunction);\n const Connect = _Connect;\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = ConnectFunction.displayName = displayName;\n if (forwardRef) {\n const _forwarded = React.forwardRef(\n function forwardConnectRef(props, ref) {\n return /* @__PURE__ */ React.createElement(Connect, { ...props, reactReduxForwardedRef: ref });\n }\n );\n const forwarded = _forwarded;\n forwarded.displayName = displayName;\n forwarded.WrappedComponent = WrappedComponent;\n return /* @__PURE__ */ hoistNonReactStatics(forwarded, WrappedComponent);\n }\n return /* @__PURE__ */ hoistNonReactStatics(Connect, WrappedComponent);\n };\n return wrapWithConnect;\n}\nvar connect_default = connect;\n\n// src/components/Provider.tsx\nfunction Provider(providerProps) {\n const { children, context, serverState, store } = providerProps;\n const contextValue = React.useMemo(() => {\n const subscription = createSubscription(store);\n const baseContextValue = {\n store,\n subscription,\n getServerState: serverState ? () => serverState : void 0\n };\n if (process.env.NODE_ENV === \"production\") {\n return baseContextValue;\n } else {\n const { identityFunctionCheck = \"once\", stabilityCheck = \"once\" } = providerProps;\n return /* @__PURE__ */ Object.assign(baseContextValue, {\n stabilityCheck,\n identityFunctionCheck\n });\n }\n }, [store, serverState]);\n const previousState = React.useMemo(() => store.getState(), [store]);\n useIsomorphicLayoutEffect(() => {\n const { subscription } = contextValue;\n subscription.onStateChange = subscription.notifyNestedSubs;\n subscription.trySubscribe();\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n return () => {\n subscription.tryUnsubscribe();\n subscription.onStateChange = void 0;\n };\n }, [contextValue, previousState]);\n const Context = context || ReactReduxContext;\n return /* @__PURE__ */ React.createElement(Context.Provider, { value: contextValue }, children);\n}\nvar Provider_default = Provider;\n\n// src/hooks/useReduxContext.ts\nfunction createReduxContextHook(context = ReactReduxContext) {\n return function useReduxContext2() {\n const contextValue = React.useContext(context);\n if (process.env.NODE_ENV !== \"production\" && !contextValue) {\n throw new Error(\n \"could not find react-redux context value; please ensure the component is wrapped in a \"\n );\n }\n return contextValue;\n };\n}\nvar useReduxContext = /* @__PURE__ */ createReduxContextHook();\n\n// src/hooks/useStore.ts\nfunction createStoreHook(context = ReactReduxContext) {\n const useReduxContext2 = context === ReactReduxContext ? useReduxContext : (\n // @ts-ignore\n createReduxContextHook(context)\n );\n const useStore2 = () => {\n const { store } = useReduxContext2();\n return store;\n };\n Object.assign(useStore2, {\n withTypes: () => useStore2\n });\n return useStore2;\n}\nvar useStore = /* @__PURE__ */ createStoreHook();\n\n// src/hooks/useDispatch.ts\nfunction createDispatchHook(context = ReactReduxContext) {\n const useStore2 = context === ReactReduxContext ? useStore : createStoreHook(context);\n const useDispatch2 = () => {\n const store = useStore2();\n return store.dispatch;\n };\n Object.assign(useDispatch2, {\n withTypes: () => useDispatch2\n });\n return useDispatch2;\n}\nvar useDispatch = /* @__PURE__ */ createDispatchHook();\n\n// src/hooks/useSelector.ts\nimport { useSyncExternalStoreWithSelector } from \"use-sync-external-store/with-selector.js\";\nvar refEquality = (a, b) => a === b;\nfunction createSelectorHook(context = ReactReduxContext) {\n const useReduxContext2 = context === ReactReduxContext ? useReduxContext : createReduxContextHook(context);\n const useSelector2 = (selector, equalityFnOrOptions = {}) => {\n const { equalityFn = refEquality } = typeof equalityFnOrOptions === \"function\" ? { equalityFn: equalityFnOrOptions } : equalityFnOrOptions;\n if (process.env.NODE_ENV !== \"production\") {\n if (!selector) {\n throw new Error(`You must pass a selector to useSelector`);\n }\n if (typeof selector !== \"function\") {\n throw new Error(`You must pass a function as a selector to useSelector`);\n }\n if (typeof equalityFn !== \"function\") {\n throw new Error(\n `You must pass a function as an equality function to useSelector`\n );\n }\n }\n const reduxContext = useReduxContext2();\n const { store, subscription, getServerState } = reduxContext;\n const firstRun = React.useRef(true);\n const wrappedSelector = React.useCallback(\n {\n [selector.name](state) {\n const selected = selector(state);\n if (process.env.NODE_ENV !== \"production\") {\n const { devModeChecks = {} } = typeof equalityFnOrOptions === \"function\" ? {} : equalityFnOrOptions;\n const { identityFunctionCheck, stabilityCheck } = reduxContext;\n const {\n identityFunctionCheck: finalIdentityFunctionCheck,\n stabilityCheck: finalStabilityCheck\n } = {\n stabilityCheck,\n identityFunctionCheck,\n ...devModeChecks\n };\n if (finalStabilityCheck === \"always\" || finalStabilityCheck === \"once\" && firstRun.current) {\n const toCompare = selector(state);\n if (!equalityFn(selected, toCompare)) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"Selector \" + (selector.name || \"unknown\") + \" returned a different result when called with the same parameters. This can lead to unnecessary rerenders.\\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization\",\n {\n state,\n selected,\n selected2: toCompare,\n stack\n }\n );\n }\n }\n if (finalIdentityFunctionCheck === \"always\" || finalIdentityFunctionCheck === \"once\" && firstRun.current) {\n if (selected === state) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"Selector \" + (selector.name || \"unknown\") + \" returned the root state when called. This can lead to unnecessary rerenders.\\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.\",\n { stack }\n );\n }\n }\n if (firstRun.current) firstRun.current = false;\n }\n return selected;\n }\n }[selector.name],\n [selector]\n );\n const selectedState = useSyncExternalStoreWithSelector(\n subscription.addNestedSub,\n store.getState,\n getServerState || store.getState,\n wrappedSelector,\n equalityFn\n );\n React.useDebugValue(selectedState);\n return selectedState;\n };\n Object.assign(useSelector2, {\n withTypes: () => useSelector2\n });\n return useSelector2;\n}\nvar useSelector = /* @__PURE__ */ createSelectorHook();\n\n// src/exports.ts\nvar batch = defaultNoopBatch;\nexport {\n Provider_default as Provider,\n ReactReduxContext,\n batch,\n connect_default as connect,\n createDispatchHook,\n createSelectorHook,\n createStoreHook,\n shallowEqual,\n useDispatch,\n useSelector,\n useStore\n};\n//# sourceMappingURL=react-redux.mjs.map","import { useDispatch, useSelector } from 'react-redux';\nimport { RootState } from 'redux-store/rootReducer';\nimport { AppDispatch } from 'redux-store/store';\n\n// Use throughout your app instead of plain `useDispatch` and `useSelector`\nexport const useAppDispatch = useDispatch.withTypes();\nexport const useAppSelector = useSelector.withTypes();\n","import { SkapaTheme } from '@inter-ikea-kompis/themes';\nimport { ITheme } from '@inter-ikea-kompis/types/lib';\nimport React, { FunctionComponent, useMemo } from 'react';\nimport { useAppSelector } from 'redux-store/hooks';\nimport { selectAppSettings, selectTranslations } from 'redux-store/rootReducer';\nimport { IAppSettings } from 'redux-store/settings/settings.store';\nimport ISkyttaTranslations from 'redux-store/translations/ISkyttaTranslations';\nimport { getTheme } from 'utils/getTheme';\n\ninterface IContextProps {\n theme: ITheme;\n settings: IAppSettings;\n translations: ISkyttaTranslations;\n useMetric: boolean;\n}\n\nconst theme = getTheme(SkapaTheme);\nconst KompisContext = React.createContext({} as IContextProps);\n\nexport const useKompis = () => {\n return React.useContext(KompisContext);\n};\n\nexport const KompisProvider: FunctionComponent> = ({\n children\n}) => {\n const settings = useAppSelector(selectAppSettings);\n const translations = useAppSelector(selectTranslations);\n\n const memoValues = useMemo(() => {\n if (!settings || !translations) {\n return null;\n }\n\n const useMetric = settings.localisation.useMetricMeasures;\n\n return {\n theme,\n settings,\n translations,\n useMetric\n };\n }, [theme, settings, translations]);\n\n if (!memoValues) {\n return null;\n }\n\n return {children};\n};\n","import { v4 as uuidv4 } from 'uuid';\n\nimport {\n DesignSourceEnum,\n ICustomData,\n InsightsApi,\n IpexMomentEnum,\n ModuleClient,\n PlatformEnum\n} from '@insights/insights-data-provider';\nimport { AnalyticsManager } from '@inter-ikea-kompis/analytics';\nimport { EcommerceCartDataSourceEnum } from '@inter-ikea-kompis/enums';\nimport { captureException, setUser } from '@sentry/react';\nimport { getViewer } from 'CoreAPI/viewerSetup';\nimport { getCountry, getLanguage, getLocale } from 'i18n/i18nUtils';\nimport React, { FunctionComponent, useContext, useEffect, useMemo, useState } from 'react';\nimport { hasCookieConsent } from 'services/cookieConsentService/CookieConsentService.service';\nimport { insightsApiService } from 'services/insightsService/insights.service';\nimport { InsightsEventsEnum, LOCAL_STORAGE_PREFIX, QUERY_PARAMS, SPR_REGEX } from 'utils/constants';\nimport {\n A_VERSION,\n AB_TEST_PREFIX,\n B_VERSION,\n CURRENT_RUNNING_TEST\n} from 'utils/constants/abTestSettings';\nimport { CookieConsentLevelsEnum } from 'utils/constants/consentLevels';\nimport { flowName, getStepLevel, StepName } from 'utils/constants/insightsFlow';\nimport { getAppName, getAppVersion, isKiosk, isProduction } from 'utils/platform';\nimport useQuery from 'utils/useQuery';\nimport { useKompis } from './kompis';\n\nconst INSIGHTS_LONG_TERM_ID_KEY = 'long_term_id';\n\nconst insightsApi = insightsApiService();\nAnalyticsManager.setInsightsApi(insightsApi);\n\nexport interface ISendEvent {\n (insightsEvent: ICustomData, module?: ModuleClient | null): void;\n}\n\ninterface ISendUserFlowStep {\n (stepName: StepName): void;\n}\n\ninterface IInitPanningSession {\n (designId: string, source: DesignSourceEnum, payload?: object, spr?: string): void;\n}\n\ninterface IKompisAnalytics {\n dev: boolean;\n locale: string;\n ab: boolean;\n}\n\ninterface IContextProps {\n insightsApi: InsightsApi;\n betraktaModule: ModuleClient | null;\n connected: boolean;\n sprId: string;\n kompisAnalytics: IKompisAnalytics | null;\n initPlanningSession: IInitPanningSession;\n sendEvent: ISendEvent;\n sendUserFlowStep: ISendUserFlowStep;\n}\n\nconst InsightsContext = React.createContext({} as IContextProps);\n\nexport const useInsights = (): IContextProps => {\n return useContext(InsightsContext);\n};\n\n/**\n * @see https://i-p-e-x.atlassian.net/wiki/spaces/IPEX/pages/2252210269/Session+logic+flow\n */\nconst getLongTermId = (): string | null => {\n const value = localStorage.getItem(INSIGHTS_LONG_TERM_ID_KEY);\n\n if (!value) {\n return null;\n }\n\n const { id } = JSON.parse(value);\n return id;\n};\n\nexport const InsightsProvider: FunctionComponent> = ({\n children\n}) => {\n const [connected, setConnected] = useState(false);\n const [isPlanningSessionInitialised, setIsPlanningSessionInitialised] = useState(false);\n const [sprId, setSprId] = useState('');\n const [kompisAnalytics, setKompisAnalytics] = useState(null);\n const [betraktaModule, setBetraktaModule] = useState(null);\n\n const computerId = useQuery(QUERY_PARAMS.COMPUTER_ID);\n const kioskId = useQuery(QUERY_PARAMS.KIOSK_ID);\n const storeId = useQuery(QUERY_PARAMS.STORE_ID);\n const forceVariation = useQuery(QUERY_PARAMS.FORCE_VARIATION);\n const { settings } = useKompis();\n\n const checkConsent = async () => {\n // If we are in dev mode or using a kiosk we don't care about the consent levels and should use insights\n if (!isProduction() || isKiosk()) {\n return true;\n }\n\n try {\n const consentLevel = CookieConsentLevelsEnum.ANALYTICAL;\n const hasConsent = await hasCookieConsent(consentLevel);\n return hasConsent;\n } catch {\n console.warn('Cant fetch consent, assume no consent');\n return false;\n }\n };\n\n const setABVersionByPercentage = (feat: string | undefined, percentage: number) => {\n if (\n forceVariation &&\n [A_VERSION, B_VERSION].some(version => {\n return version === forceVariation;\n })\n ) {\n localStorage.setItem(`${LOCAL_STORAGE_PREFIX}${AB_TEST_PREFIX}${feat}`, forceVariation);\n } else if (!localStorage.getItem(`${LOCAL_STORAGE_PREFIX}${AB_TEST_PREFIX}${feat}`)) {\n const version = Math.random() >= percentage ? A_VERSION : B_VERSION;\n localStorage.setItem(`${LOCAL_STORAGE_PREFIX}${AB_TEST_PREFIX}${feat}`, version);\n }\n };\n\n const initABTesting = () => {\n if (!CURRENT_RUNNING_TEST) {\n return;\n }\n\n setABVersionByPercentage(CURRENT_RUNNING_TEST, 0.5);\n };\n\n const getABVersion = (feat: string | undefined) => {\n return localStorage.getItem(`${LOCAL_STORAGE_PREFIX}${AB_TEST_PREFIX}${feat}`) || undefined;\n };\n\n const getABVersionVariationString = () => {\n return `${CURRENT_RUNNING_TEST}_${getABVersion(CURRENT_RUNNING_TEST)}`;\n };\n\n const connectApplication = async () => {\n const hasConsent = await checkConsent();\n let isConnected = false;\n const locale = getLocale();\n\n if (!connected && hasConsent) {\n if (!isKiosk() && CURRENT_RUNNING_TEST) {\n initABTesting();\n }\n\n /**\n * Kiosk Settings\n */\n\n const validStoreId = storeId && !Number.isNaN(Number(storeId));\n\n const variableComputerId = isKiosk() && computerId ? computerId : undefined;\n\n const variableKioskId = isKiosk() && kioskId ? kioskId : undefined;\n\n const idKiosk = variableComputerId || variableKioskId;\n\n const idStore = isKiosk() && validStoreId ? storeId : undefined;\n\n /**\n * AB TESTS\n */\n\n const activeAbTest = !isKiosk() && !!CURRENT_RUNNING_TEST;\n\n const abVersionName = activeAbTest ? CURRENT_RUNNING_TEST : undefined;\n\n const abVersionVariation = activeAbTest ? getABVersionVariationString() : undefined;\n\n const isIngkaMarket =\n settings.kompis.serviceSettings.eCommerceCartDataSource ===\n EcommerceCartDataSourceEnum.cartApi;\n\n await insightsApi\n .connectApplication({\n applicationId: getAppName(),\n applicationVersion: getAppVersion(),\n platform: isKiosk() ? PlatformEnum.kiosk : PlatformEnum.owfe,\n countryCode: getCountry(locale).toLowerCase(),\n languageCode: getLanguage(locale).toLowerCase(),\n kiosk: isKiosk(),\n dev: !isProduction(), // Use dev: true while testing to send data to qa env\n isPlanner: true, // Should be true if the application is a planner\n enableGa: isIngkaMarket, // Set to true if GA tracking should be enabled. Required for planners with INGKA market.\n kioskId: idKiosk,\n storeId: idStore,\n abVersionName,\n abVersionVariation\n })\n .then(() => {\n isConnected = true;\n })\n .catch(error => {\n captureException(new Error('Failed to initialize IPEX insights'), scope => {\n return scope.setExtra('error', error);\n });\n isConnected = false;\n });\n } else {\n isConnected = false;\n }\n\n if (connected && !hasConsent) {\n insightsApi.disconnect();\n isConnected = false;\n }\n\n setConnected(isConnected);\n };\n\n const sendEvent: ISendEvent = (insightEvent: ICustomData, module?: ModuleClient | null) => {\n if (!connected) {\n return;\n }\n\n if (module) {\n module.sendEvent(insightEvent);\n return;\n }\n\n insightsApi.sendEvent(insightEvent);\n };\n\n const sendUserFlowStep: ISendUserFlowStep = (stepName: StepName) => {\n if (!connected) {\n return;\n }\n\n insightsApi.sendUserFlowStep(flowName, stepName, getStepLevel(stepName));\n };\n\n /**\n * This method handles that the event is only triggered once\n */\n const initPlanningSession: IInitPanningSession = (designId, source) => {\n if (connected && !isPlanningSessionInitialised) {\n // Send init planner event\n insightsApi.initPlanningSession(\n designId, // VPC code\n source // VPC source\n );\n\n setIsPlanningSessionInitialised(true);\n }\n };\n\n useEffect(() => {\n if (sprId) {\n sendEvent({\n ipexMoment: IpexMomentEnum.nonInteraction,\n event: InsightsEventsEnum.ArrivedWithSpr,\n payload: {\n productId: sprId\n }\n });\n }\n }, [connected]);\n\n useEffect(() => {\n (async () => {\n const url = new URL(window.location.href);\n const sprInHashResults = url.hash.match(SPR_REGEX);\n\n if (sprInHashResults) {\n setSprId(sprInHashResults[1]);\n }\n\n await connectApplication();\n setUser({ id: getLongTermId() || uuidv4() });\n })();\n }, []);\n\n useEffect(() => {\n if (!connected) {\n setKompisAnalytics(null);\n setBetraktaModule(null);\n\n return;\n }\n\n setKompisAnalytics({\n dev: !isProduction(),\n locale: getLocale(),\n ab: true\n });\n\n setBetraktaModule(\n insightsApi.moduleClient({\n moduleId: 'betrakta',\n moduleVersion: getViewer()?.get_version() || '0.1',\n dev: !isProduction()\n })\n );\n }, [connected]);\n\n const memoValues = useMemo(() => {\n if (connected === undefined) {\n return null;\n }\n\n return {\n insightsApi,\n connected,\n sprId,\n kompisAnalytics,\n initPlanningSession,\n sendEvent,\n sendUserFlowStep,\n betraktaModule\n };\n }, [\n insightsApi,\n connected,\n sprId,\n kompisAnalytics,\n initPlanningSession,\n sendEvent,\n sendUserFlowStep,\n betraktaModule\n ]);\n\n if (connected === undefined || !memoValues) {\n return null; // Loading...\n }\n\n return {children};\n};\n","// Do not make edits in this file!\n// This file is automatically generated and any changes will be overwritten.\n// To fetch new design tokens check the design-system/README.md\n/**\n * 0.625rem\n */\nexport const fontSize20 = '0.625rem';\n/**\n * 0.6875rem\n */\nexport const fontSize25 = '0.6875rem';\n/**\n * 0.75rem\n */\nexport const fontSize50 = '0.75rem';\n/**\n * 0.875rem\n */\nexport const fontSize75 = '0.875rem';\n/**\n * 1rem\n */\nexport const fontSize100 = '1rem';\n/**\n * 1.125rem\n */\nexport const fontSize200 = '1.125rem';\n/**\n * 1.25rem\n */\nexport const fontSize300 = '1.25rem';\n/**\n * 1.375rem\n */\nexport const fontSize400 = '1.375rem';\n/**\n * 1.5rem\n */\nexport const fontSize500 = '1.5rem';\n/**\n * 1.75rem\n */\nexport const fontSize600 = '1.75rem';\n/**\n * 2rem\n */\nexport const fontSize700 = '2rem';\n/**\n * 2.25rem\n */\nexport const fontSize800 = '2.25rem';\n/**\n * 2.5rem\n */\nexport const fontSize900 = '2.5rem';\n/**\n * 3rem\n */\nexport const fontSize1000 = '3rem';\n/**\n * 3.25rem\n */\nexport const fontSize1100 = '3.25rem';\n/**\n * 3.5rem\n */\nexport const fontSize1200 = '3.5rem';\n/**\n * 4rem\n */\nexport const fontSize1300 = '4rem';\n/**\n * 4.5rem\n */\nexport const fontSize1400 = '4.5rem';\n/**\n * 5rem\n */\nexport const fontSize1500 = '5rem';\n/**\n * 6rem\n */\nexport const fontSize1600 = '6rem';\n/**\n * 700\n */\nexport const fontWeightBold = 700;\n/**\n * 400\n */\nexport const fontWeightRegular = 400;\n/**\n * 1px\n */\nexport const thicknessThin = '1px';\n/**\n * 2px\n */\nexport const thicknessThick = '2px';\n/**\n * 0px\n */\nexport const radiusNone = '0px';\n/**\n * 2px\n */\nexport const radiusXs = '2px';\n/**\n * 4px\n */\nexport const radiusS = '4px';\n/**\n * 8px\n */\nexport const radiusM = '8px';\n/**\n * 12px\n */\nexport const radiusL = '12px';\n/**\n * 20px\n */\nexport const radiusXl = '20px';\n/**\n * 64px\n */\nexport const radiusCap = '64px';\n/**\n * 0.25rem\n */\nexport const space25 = '0.25rem';\n/**\n * 0.5rem\n */\nexport const space50 = '0.5rem';\n/**\n * 0.75rem\n */\nexport const space75 = '0.75rem';\n/**\n * 1rem\n */\nexport const space100 = '1rem';\n/**\n * 1.25rem\n */\nexport const space125 = '1.25rem';\n/**\n * 1.5rem\n */\nexport const space150 = '1.5rem';\n/**\n * 2rem\n */\nexport const space200 = '2rem';\n/**\n * 2.5rem\n */\nexport const space250 = '2.5rem';\n/**\n * 3rem\n */\nexport const space300 = '3rem';\n/**\n * 4rem\n */\nexport const space400 = '4rem';\n/**\n * 5.5rem\n */\nexport const space550 = '5.5rem';\n/**\n * 7.5rem\n */\nexport const space750 = '7.5rem';\n/**\n * 10rem\n */\nexport const space1000 = '10rem';\n/**\n * 13.5rem\n */\nexport const space1350 = '13.5rem';\n/**\n * 0px 4px 16px rgba(0, 0, 0, 0.1)\n */\nexport const shadowSizeDefault = '0px 4px 16px rgba(0, 0, 0, 0.1)';\n/**\n * 800ms\n */\nexport const durationSlowXlScreen = '800ms';\n/**\n * 400ms\n */\nexport const durationSlowMobileNative = '400ms';\n/**\n * 250ms\n */\nexport const durationSlowWeb = '250ms';\n/**\n * 600ms\n */\nexport const durationStandardXlScreen = '600ms';\n/**\n * 300ms\n */\nexport const durationStandardMobileNative = '300ms';\n/**\n * 200ms\n */\nexport const durationStandardWeb = '200ms';\n/**\n * 300ms\n */\nexport const durationQuickXlScreen = '300ms';\n/**\n * 150ms\n */\nexport const durationQuickMobileNative = '150ms';\n/**\n * 100ms\n */\nexport const durationQuickWeb = '100ms';\n/**\n * 0\n */\nexport const durationInstantXlScreen = 0;\n/**\n * 0\n */\nexport const durationInstantMobileNative = 0;\n/**\n * 0\n */\nexport const durationInstantWeb = 0;\n/**\n * cubic-bezier(0,0,1,1)\n */\nexport const easeLinear = 'cubic-bezier(0,0,1,1)';\n/**\n * cubic-bezier(0.45, 1.45, 0.65, 1.0)\n */\nexport const easeBob = 'cubic-bezier(0.45, 1.45, 0.65, 1.0)';\n/**\n * cubic-bezier(0.9, 0.0, 1.0, 1.0)\n */\nexport const easeExit = 'cubic-bezier(0.9, 0.0, 1.0, 1.0)';\n/**\n * cubic-bezier(0.0, 0.0, 0.1, 1.0)\n */\nexport const easeEnter = 'cubic-bezier(0.0, 0.0, 0.1, 1.0)';\n/**\n * cubic-bezier(0.8, 0.0, 0.0, 1.0)\n */\nexport const easeExpressive = 'cubic-bezier(0.8, 0.0, 0.0, 1.0)';\n/**\n * cubic-bezier(0.4, 0.0, 0.4, 1.0)\n */\nexport const easeEasy = 'cubic-bezier(0.4, 0.0, 0.4, 1.0)';\n/**\n * 150ms\n */\nexport const delayEmphasised = '150ms';\n/**\n * 100ms\n */\nexport const delayStandard = '100ms';\n/**\n * 33ms\n */\nexport const delayTight = '33ms';\n/**\n * 75em\n */\nexport const breakpointXl = '75em';\n/**\n * 56.25em\n */\nexport const breakpointL = '56.25em';\n/**\n * 37.5em\n */\nexport const breakpointM = '37.5em';\n/**\n * 1.400\n */\nexport const lineHeight20Short = '1.400';\n/**\n * 1.400\n */\nexport const lineHeight20Long = '1.400';\n/**\n * 1.450\n */\nexport const lineHeight25Short = '1.450';\n/**\n * 1.450\n */\nexport const lineHeight25Long = '1.450';\n/**\n * 1.500\n */\nexport const lineHeight50Short = '1.500';\n/**\n * 1.500\n */\nexport const lineHeight50Long = '1.500';\n/**\n * 1.571\n */\nexport const lineHeight75Short = '1.571';\n/**\n * 1.571\n */\nexport const lineHeight75Long = '1.571';\n/**\n * 1.500\n */\nexport const lineHeight100Short = '1.500';\n/**\n * 1.625\n */\nexport const lineHeight100Long = '1.625';\n/**\n * 1.444\n */\nexport const lineHeight200Short = '1.444';\n/**\n * 1.555\n */\nexport const lineHeight200Long = '1.555';\n/**\n * 1.400\n */\nexport const lineHeight300Short = '1.400';\n/**\n * 1.600\n */\nexport const lineHeight300Long = '1.600';\n/**\n * 1.364\n */\nexport const lineHeight400Short = '1.364';\n/**\n * 1.545\n */\nexport const lineHeight400Long = '1.545';\n/**\n * 1.450\n */\nexport const lineHeight500Short = '1.450';\n/**\n * 1.670\n */\nexport const lineHeight500Long = '1.670';\n/**\n * 1.357\n */\nexport const lineHeight600Short = '1.357';\n/**\n * 1.570\n */\nexport const lineHeight600Long = '1.570';\n/**\n * 1.375\n */\nexport const lineHeight700Short = '1.375';\n/**\n * 1.500\n */\nexport const lineHeight700Long = '1.500';\n/**\n * 1.333\n */\nexport const lineHeight800Short = '1.333';\n/**\n * 1.500\n */\nexport const lineHeight800Long = '1.500';\n/**\n * 1.300\n */\nexport const lineHeight900Short = '1.300';\n/**\n * 1.500\n */\nexport const lineHeight900Long = '1.500';\n/**\n * 1.300\n */\nexport const lineHeight1000Short = '1.300';\n/**\n * 1.460\n */\nexport const lineHeight1000Long = '1.460';\n/**\n * 1.320\n */\nexport const lineHeight1100Short = '1.320';\n/**\n * 1.520\n */\nexport const lineHeight1100Long = '1.520';\n/**\n * 1.357\n */\nexport const lineHeight1200Short = '1.357';\n/**\n * 1.500\n */\nexport const lineHeight1200Long = '1.500';\n/**\n * 1.300\n */\nexport const lineHeight1300Short = '1.300';\n/**\n * 1.500\n */\nexport const lineHeight1300Long = '1.500';\n/**\n * 1.280\n */\nexport const lineHeight1400Short = '1.280';\n/**\n * 1.500\n */\nexport const lineHeight1400Long = '1.500';\n/**\n * 1.300\n */\nexport const lineHeight1500Short = '1.300';\n/**\n * 1.500\n */\nexport const lineHeight1500Long = '1.500';\n/**\n * 1.290\n */\nexport const lineHeight1600Short = '1.290';\n/**\n * 1.500\n */\nexport const lineHeight1600Long = '1.500';\n/**\n * 0em\n */\nexport const letterSpacing20 = '0em';\n/**\n * 0em\n */\nexport const letterSpacing25 = '0em';\n/**\n * 0em\n */\nexport const letterSpacing50 = '0em';\n/**\n * 0em\n */\nexport const letterSpacing75 = '0em';\n/**\n * 0em\n */\nexport const letterSpacing100 = '0em';\n/**\n * 0em\n */\nexport const letterSpacing200 = '0em';\n/**\n * 0em\n */\nexport const letterSpacing300 = '0em';\n/**\n * -0.0039em\n */\nexport const letterSpacing400 = '-0.0039em';\n/**\n * -0.0042em\n */\nexport const letterSpacing500 = '-0.0042em';\n/**\n * -0.0049em\n */\nexport const letterSpacing600 = '-0.0049em';\n/**\n * -0.0056em\n */\nexport const letterSpacing700 = '-0.0056em';\n/**\n * -0.0063em\n */\nexport const letterSpacing800 = '-0.0063em';\n/**\n * -0.007em\n */\nexport const letterSpacing900 = '-0.007em';\n/**\n * -0.0084em\n */\nexport const letterSpacing1000 = '-0.0084em';\n/**\n * -0.0091em\n */\nexport const letterSpacing1100 = '-0.0091em';\n/**\n * -0.0098em\n */\nexport const letterSpacing1200 = '-0.0098em';\n/**\n * -0.011em\n */\nexport const letterSpacing1300 = '-0.011em';\n/**\n * -0.0124em\n */\nexport const letterSpacing1400 = '-0.0124em';\n/**\n * -0.014em\n */\nexport const letterSpacing1500 = '-0.014em';\n/**\n * -0.0168em\n */\nexport const letterSpacing1600 = '-0.0168em';\nexport default {\n fontSize20,\n fontSize25,\n fontSize50,\n fontSize75,\n fontSize100,\n fontSize200,\n fontSize300,\n fontSize400,\n fontSize500,\n fontSize600,\n fontSize700,\n fontSize800,\n fontSize900,\n fontSize1000,\n fontSize1100,\n fontSize1200,\n fontSize1300,\n fontSize1400,\n fontSize1500,\n fontSize1600,\n fontWeightBold,\n fontWeightRegular,\n thicknessThin,\n thicknessThick,\n radiusNone,\n radiusXs,\n radiusS,\n radiusM,\n radiusL,\n radiusXl,\n radiusCap,\n space25,\n space50,\n space75,\n space100,\n space125,\n space150,\n space200,\n space250,\n space300,\n space400,\n space550,\n space750,\n space1000,\n space1350,\n shadowSizeDefault,\n durationSlowXlScreen,\n durationSlowMobileNative,\n durationSlowWeb,\n durationStandardXlScreen,\n durationStandardMobileNative,\n durationStandardWeb,\n durationQuickXlScreen,\n durationQuickMobileNative,\n durationQuickWeb,\n durationInstantXlScreen,\n durationInstantMobileNative,\n durationInstantWeb,\n easeLinear,\n easeBob,\n easeExit,\n easeEnter,\n easeExpressive,\n easeEasy,\n delayEmphasised,\n delayStandard,\n delayTight,\n breakpointXl,\n breakpointL,\n breakpointM,\n lineHeight20Short,\n lineHeight20Long,\n lineHeight25Short,\n lineHeight25Long,\n lineHeight50Short,\n lineHeight50Long,\n lineHeight75Short,\n lineHeight75Long,\n lineHeight100Short,\n lineHeight100Long,\n lineHeight200Short,\n lineHeight200Long,\n lineHeight300Short,\n lineHeight300Long,\n lineHeight400Short,\n lineHeight400Long,\n lineHeight500Short,\n lineHeight500Long,\n lineHeight600Short,\n lineHeight600Long,\n lineHeight700Short,\n lineHeight700Long,\n lineHeight800Short,\n lineHeight800Long,\n lineHeight900Short,\n lineHeight900Long,\n lineHeight1000Short,\n lineHeight1000Long,\n lineHeight1100Short,\n lineHeight1100Long,\n lineHeight1200Short,\n lineHeight1200Long,\n lineHeight1300Short,\n lineHeight1300Long,\n lineHeight1400Short,\n lineHeight1400Long,\n lineHeight1500Short,\n lineHeight1500Long,\n lineHeight1600Short,\n lineHeight1600Long,\n letterSpacing20,\n letterSpacing25,\n letterSpacing50,\n letterSpacing75,\n letterSpacing100,\n letterSpacing200,\n letterSpacing300,\n letterSpacing400,\n letterSpacing500,\n letterSpacing600,\n letterSpacing700,\n letterSpacing800,\n letterSpacing900,\n letterSpacing1000,\n letterSpacing1100,\n letterSpacing1200,\n letterSpacing1300,\n letterSpacing1400,\n letterSpacing1500,\n letterSpacing1600,\n};\n","const debounceAnimationFrame: (...args: any[]) => any = any>(\n fn: F\n) => {\n let timeout: number;\n const debouncedFn = (...args: Parameters) => {\n cancelAnimationFrame(timeout);\n return new Promise>(resolve => {\n timeout = requestAnimationFrame(() => {\n const result: ReturnType = fn(...args);\n resolve(result);\n });\n });\n };\n return debouncedFn;\n};\n\nexport default debounceAnimationFrame;\n","import { useEffect, useState } from 'react';\nimport debounceAnimationFrame from 'utils/debounceAnimationFrame';\n\nconst getWindowDimensions = () => {\n const { innerWidth: width, innerHeight: height } = window;\n return {\n width,\n height\n };\n};\n\nconst useWindowDimensions = () => {\n const [windowDimensions, setWindowDimensions] = useState(getWindowDimensions());\n\n useEffect(() => {\n const handleResize = debounceAnimationFrame(() => {\n setWindowDimensions(getWindowDimensions());\n });\n\n window.addEventListener('resize', handleResize);\n return () => {\n return window.removeEventListener('resize', handleResize);\n };\n }, []);\n\n return windowDimensions;\n};\n\nexport default useWindowDimensions;\n","import designTokens from '@ingka/variables/design-tokens';\nimport { useEffect } from 'react';\nimport { useAppDispatch } from 'redux-store/hooks';\nimport store from 'redux-store/store';\nimport { userAgentActions } from 'redux-store/userAgent/userAgent.store';\nimport { fontSize } from 'utils/constants/style';\nimport { DeviceTypeEnum, OrientationTypeEnum, getUserAgent } from 'utils/platform';\nimport useWindowDimensions from './useWindowDimensions';\n\nconst useUpdateUserAgent = () => {\n const dispatch = useAppDispatch();\n const windowDimensions = useWindowDimensions();\n\n useEffect(() => {\n dispatch(userAgentActions.setUserAgent(getUserAgent()));\n const { breakpointL } = designTokens;\n const state = store.getState();\n const valueWithoutEm = breakpointL.replace('em', '');\n const breakpointInPixels = Number(valueWithoutEm) * fontSize;\n\n const { innerWidth } = window;\n\n const tabletPortraitBreakpoint =\n innerWidth < breakpointInPixels &&\n state.userAgent.orientation === OrientationTypeEnum.Portrait;\n\n const mobileAndTabletPortrait =\n tabletPortraitBreakpoint || state.userAgent.deviceType === DeviceTypeEnum.Mobile;\n\n dispatch(userAgentActions.setIsMobile(mobileAndTabletPortrait));\n }, [windowDimensions]);\n};\n\nexport default useUpdateUserAgent;\n","import { captureMessage } from '@sentry/react';\n\nexport const supportsWebgl = () => {\n const canvas = document.querySelector('#webglContext') as HTMLCanvasElement | null;\n const context = canvas?.getContext('webgl') || canvas?.getContext('webgl2');\n\n if (!context) {\n captureMessage('WebGL is not supported.', scope => {\n scope.setExtra('canvas', canvas);\n return scope;\n });\n }\n\n return !!context;\n};\n","export const supportsWebp = async () => {\n return new Promise(resolve => {\n const image = new Image();\n image.addEventListener(\n 'error',\n function resolveValue() {\n resolve(false);\n },\n { once: true }\n );\n image.addEventListener(\n 'load',\n function resolveValue() {\n resolve(image.width === 1);\n },\n { once: true }\n );\n image.src =\n 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=';\n }).catch(() => {\n return false;\n });\n};\n","import { setTag, withProfiler } from '@sentry/react';\nimport GlobalStyles from 'GlobalStyles';\nimport { InsightsProvider } from 'contexts/insights';\nimport { KompisProvider } from 'contexts/kompis';\nimport useUpdateUserAgent from 'hooks/useUpdateUserAgent';\nimport { getDefaultPanel, getDefaultPanels } from 'products/panels';\nimport { FunctionComponent, lazy, Suspense, useEffect, useState } from 'react';\nimport { configurationAction, IPanelStyle } from 'redux-store/configuration/configuration.store';\nimport { useAppDispatch, useAppSelector } from 'redux-store/hooks';\nimport { productAction } from 'redux-store/products/products.store';\nimport { dexfLinkedCatalogs, fetchProductsData } from 'redux-store/products/products.thunks';\nimport { getMandatoryProductsData } from 'redux-store/products/products.utils';\nimport {\n selectAppSettings,\n selectDefaultPanelStyles,\n selectDoorHeightOptionsAvailable,\n selectPanelPatternStyles,\n selectProducts,\n selectSelectedPanelStyles,\n selectShowErrorPage,\n selectTranslations\n} from 'redux-store/rootReducer';\nimport { fetchSettings } from 'redux-store/settings/settings.thunks';\nimport store from 'redux-store/store';\nimport { fetchTranslations } from 'redux-store/translations/translations.thunks';\nimport { AppStateEnum, IShoppingProductsMap, QUERY_PARAMS, SentryTags } from 'utils/constants';\nimport { isProduction } from 'utils/platform';\nimport { supportsWebgl } from 'utils/supportsWebgl';\nimport { supportsWebp } from 'utils/supportsWebp';\nimport useQuery from 'utils/useQuery';\n\n// Core is already initiated in their providers and since we import them,\n// the code for coreDefaultSetup is already initiated.\n// We need to postpone it to make sure the critical dexf data is obtained.\nconst App = lazy(() => {\n return import('App');\n});\n\nconst ErrorPage = lazy(() => {\n return import('views/ErrorPage');\n});\n\nconst handleShowErrorPage = async (hasMandatoryProductsMissing: boolean) => {\n const unsafeMode = useQuery(QUERY_PARAMS.UNSAFE) === 'true' && !isProduction();\n const showErrorPageForInvalidProducts = hasMandatoryProductsMissing && !unsafeMode;\n\n const webpBrowser = await supportsWebp();\n const webglBrowser = supportsWebgl();\n const showErrorPageForUnsupportedBrowser = !webpBrowser || !webglBrowser;\n\n store.dispatch(\n configurationAction.setShowErrorPage(\n showErrorPageForInvalidProducts || showErrorPageForUnsupportedBrowser\n )\n );\n};\n\nconst PreApp: FunctionComponent = () => {\n const [appReady, setAppReady] = useState(false);\n const [initError, setInitError] = useState<'string' | undefined>();\n const [processedData, setProcessedData] = useState(false);\n const dispatch = useAppDispatch();\n const errorPageVisible = useAppSelector(selectShowErrorPage);\n const translations = useAppSelector(selectTranslations);\n const settings = useAppSelector(selectAppSettings);\n const allProductData = useAppSelector(selectProducts);\n const doorHeightOptionsAvailable = useAppSelector(selectDoorHeightOptionsAvailable);\n const selectedPanelStyles = useAppSelector(selectSelectedPanelStyles);\n const panelPatternStyles = useAppSelector(selectPanelPatternStyles);\n const defaultPanelStyles = useAppSelector(selectDefaultPanelStyles);\n\n useUpdateUserAgent();\n\n const processData = async (productData: IShoppingProductsMap) => {\n const { hasMandatoryProductsMissing, missingSkyttaProducts, doorHeightOptionsAvailable } =\n getMandatoryProductsData(productData);\n await handleShowErrorPage(hasMandatoryProductsMissing);\n\n dispatch(productAction.setMissingSkyttaProducts(missingSkyttaProducts));\n dispatch(productAction.setDoorHeightOptionsAvailable(doorHeightOptionsAvailable));\n\n const defaultPanels = getDefaultPanels(doorHeightOptionsAvailable);\n const validPanel = getDefaultPanel(productData, defaultPanels);\n\n const index = defaultPanels.indexOf(validPanel.product.itemId.split('ART-')[1]);\n const defaultPanel: IPanelStyle = { index, isFlipped: false };\n\n dispatch(configurationAction.setDefaultPanelStyles([defaultPanel]));\n dispatch(configurationAction.setSelectedPanelStyles([[defaultPanel]]));\n dispatch(\n configurationAction.setSelectedPanelPatternStyles({\n primaryPanelStyle: defaultPanel\n })\n );\n };\n\n const validatePayload = async (result: Promise) => {\n const awaitedResult = await result;\n if (awaitedResult?.payload) {\n return result;\n }\n\n const message = awaitedResult?.error?.message;\n if (message) {\n dispatch(configurationAction.setShowAppLoadingScreen(false));\n setInitError(message);\n }\n return false;\n };\n\n useEffect(() => {\n (async () => {\n /**\n * We had a issue on sentry where users got crashes, it was hard to find but apparently using setLocalization with reducer instead of fetchLocalization with extra reducer seems to be the issue here.\n * We can still not find the solution to it.\n * If you're trying to refactor it, please test it on sentry with a silent release and watch for connectionProblemException.\n */\n\n // Waiting for settings is needed to get correct endpoints for fetching product data\n const settingsResult = await validatePayload(dispatch(fetchSettings()));\n if (!settingsResult) {\n return;\n }\n const translationsResult = await validatePayload(dispatch(fetchTranslations()));\n if (!translationsResult) {\n return;\n }\n validatePayload(dispatch(fetchProductsData()));\n })();\n }, []);\n\n /**\n * Process solution data after critical data has been loaded.\n */\n useEffect(() => {\n (async () => {\n if (!appReady && !processedData) {\n const hasSettings = settings && Object.keys(settings).length;\n const hasTranslations = translations && Object.keys(translations).length;\n const hasProducts = allProductData && Object.keys(allProductData).length;\n\n if (hasSettings && hasTranslations && hasProducts) {\n dexfLinkedCatalogs(allProductData, dispatch);\n\n await processData(allProductData);\n setProcessedData(true);\n }\n }\n })();\n }, [settings, translations, allProductData]);\n\n /**\n * Set appReady if all needed data is available\n */\n useEffect(() => {\n const hasPanelPatternStyles = panelPatternStyles && Object.keys(panelPatternStyles).length;\n const hasDoorHeightOptionsAvailable = doorHeightOptionsAvailable.length;\n const hasSelectedPanelStyles = selectedPanelStyles.length;\n const hasDefaultPanelStyles = defaultPanelStyles.length;\n\n (async () => {\n if (\n !appReady &&\n processedData &&\n hasDoorHeightOptionsAvailable &&\n hasSelectedPanelStyles &&\n hasPanelPatternStyles &&\n hasDefaultPanelStyles\n ) {\n setTag(SentryTags.appState, AppStateEnum.Ready);\n\n setAppReady(true);\n }\n })();\n }, [\n panelPatternStyles,\n doorHeightOptionsAvailable,\n selectedPanelStyles,\n defaultPanelStyles,\n processedData\n ]);\n\n if (initError) {\n return

{initError}

;\n }\n\n if (errorPageVisible) {\n return (\n \n \n \n \n \n \n \n \n );\n }\n\n if (!appReady) {\n return null;\n }\n\n return (\n \n \n \n );\n};\n\nexport default withProfiler(PreApp, { includeUpdates: false });\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import { jsx } from \"react/jsx-runtime\";\nimport React, { Children, cloneElement, forwardRef } from \"react\";\nimport cx from \"classnames\";\nconst ListView = forwardRef(\n (props, ref) => {\n const {\n children,\n prefix = \"\",\n id,\n className,\n size = \"medium\",\n showDivider = true,\n ...otherProps\n } = props;\n const classes = cx(\n `${prefix}list-view`,\n `${prefix}list-view--${size}`,\n className\n );\n return /* @__PURE__ */ jsx(\"ul\", { id, ref, role: \"list\", className: classes, ...otherProps, children: Children.map(children, (child, i) => {\n if (React.isValidElement(child)) {\n return cloneElement(child, {\n id: child.props.id ? child.props.id : `${prefix}${id}-${i}`,\n name: child.props.name ? child.props.name : `${prefix}${id}`,\n showDivider,\n size\n });\n }\n return child;\n }) });\n }\n);\nListView.displayName = \"ListView\";\nvar ListView_default = ListView;\nexport {\n ListView_default as default\n};\n","import { createElement } from \"react\";\nfunction kebabToCamelCase(str) {\n return str.replace(/-([a-z])/g, (_, $1) => $1.toUpperCase());\n}\nfunction reactAttributes(obj) {\n return Object.entries(obj).reduce((acc, [key, value]) => {\n if (key === \"style\" && typeof value === \"string\") {\n acc.style = value.split(\";\").reduce((styleAcc, item) => {\n const [styleKey, styleValue] = item.split(\":\");\n if (styleKey && styleValue) {\n styleAcc[kebabToCamelCase(styleKey.trim())] = styleValue.trim();\n }\n return styleAcc;\n }, {});\n } else {\n acc[kebabToCamelCase(key)] = value;\n }\n return acc;\n }, {});\n}\nfunction renderPaths(nodes) {\n if (!nodes) return;\n return nodes.map(\n (node) => createElement(node.tag, reactAttributes(node.att), renderPaths(node.nds))\n );\n}\nexport {\n renderPaths\n};\n","import paths from \"@ingka/icons-shared/paths/chevron-right-small\";\nimport { renderPaths } from \"../renderPaths.mjs\";\nvar chevron_right_small_default = () => renderPaths(paths);\nexport {\n chevron_right_small_default as default\n};\n","import paths from \"@ingka/icons-shared/paths/chevron-right\";\nimport { renderPaths } from \"../renderPaths.mjs\";\nvar chevron_right_default = () => renderPaths(paths);\nexport {\n chevron_right_default as default\n};\n","import paths from \"@ingka/icons-shared/paths/arrow-right\";\nimport { renderPaths } from \"../renderPaths.mjs\";\nvar arrow_right_default = () => renderPaths(paths);\nexport {\n arrow_right_default as default\n};\n","import paths from \"@ingka/icons-shared/paths/link-out\";\nimport { renderPaths } from \"../renderPaths.mjs\";\nvar link_out_default = () => renderPaths(paths);\nexport {\n link_out_default as default\n};\n","import paths from \"@ingka/icons-shared/paths/copy\";\nimport { renderPaths } from \"../renderPaths.mjs\";\nvar copy_default = () => renderPaths(paths);\nexport {\n copy_default as default\n};\n","import { jsxs } from \"react/jsx-runtime\";\nconst Label = (props) => {\n const {\n prefix = \"\",\n label = \"Label\",\n reqText,\n htmlFor,\n className,\n ...otherProps\n } = props;\n return /* @__PURE__ */ jsxs(\"label\", { htmlFor, className, ...otherProps, children: [\n label,\n reqText && /* @__PURE__ */ jsxs(\"em\", { className: `${prefix}required`, children: [\n \" \",\n reqText\n ] })\n ] });\n};\nvar Label_default = Label;\nexport {\n Label_default as default\n};\n","import Label from \"./Label.mjs\";\nexport * from \"./Label.mjs\";\nvar lib_default = Label;\nexport {\n lib_default as default\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { createContext } from \"react\";\nconst FormFieldContext = createContext({});\nconst FormFieldProvider = ({\n children,\n shouldValidate,\n setCharacterCount,\n valid\n}) => {\n return /* @__PURE__ */ jsx(\n FormFieldContext.Provider,\n {\n value: {\n shouldValidate,\n setCharacterCount,\n valid\n },\n children\n }\n );\n};\nvar FormFieldContext_default = FormFieldContext;\nexport {\n FormFieldContext,\n FormFieldProvider,\n FormFieldContext_default as default\n};\n","import { jsx } from \"react/jsx-runtime\";\nconst IconBaseElement = ({\n prefix = \"\",\n className,\n viewBox = \"0 0 24 24\",\n ariaHidden = true,\n children,\n ...other\n}) => {\n return /* @__PURE__ */ jsx(\n \"svg\",\n {\n viewBox,\n focusable: \"false\",\n width: \"24\",\n height: \"24\",\n ...other,\n \"aria-hidden\": ariaHidden,\n className: `${prefix}svg-icon${className ? ` ${className}` : \"\"}`,\n children\n }\n );\n};\nexport {\n IconBaseElement\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport React from \"react\";\nimport cx from \"classnames\";\nimport { IconBaseElement } from \"./IconBase.mjs\";\nconst SSRIcon = (props) => {\n const {\n prefix = \"\",\n viewBox = \"0 0 24 24\",\n paths,\n className,\n modifier,\n ariaHidden = true,\n ...otherProps\n } = props;\n const cssStyles = cx(className, modifier && `${prefix}svg-icon--${modifier}`);\n return paths ? /* @__PURE__ */ jsx(\n IconBaseElement,\n {\n viewBox,\n prefix,\n ...otherProps,\n className: cssStyles,\n ariaHidden,\n children: paths().map((path, id) => {\n return React.cloneElement(path, { key: id });\n })\n }\n ) : null;\n};\nvar SSRIcon_default = SSRIcon;\nexport {\n SSRIcon_default as default\n};\n","import SSRIcon from \"./SSRIcon.mjs\";\nexport * from \"./SSRIcon.mjs\";\nvar lib_default = SSRIcon;\nexport {\n lib_default as default\n};\n","\"use client\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport React, { forwardRef, useContext } from \"react\";\nimport Label from \"@ingka/label\";\nimport cx from \"classnames\";\nimport { FormFieldContext } from \"@ingka/form-field\";\nconst Checkbox = forwardRef(\n (props, publicRef) => {\n const {\n className,\n prefix = \"\",\n id,\n label = \"\",\n caption = \"\",\n name = \"checkboxname\",\n value,\n onChange,\n disabled = false,\n describedById,\n required = false,\n subtle = false,\n indeterminate = false,\n ...other\n } = props;\n const classes = cx(\n subtle && `${prefix}checkbox--subtle`,\n `${prefix}checkbox`,\n className\n );\n const { shouldValidate, valid } = useContext(FormFieldContext);\n const checkboxRef = publicRef || React.useRef(null);\n React.useEffect(() => {\n const ref = checkboxRef;\n if (typeof indeterminate !== \"undefined\" && ref.current) {\n ref.current.indeterminate = Boolean(indeterminate);\n }\n }, [indeterminate]);\n return /* @__PURE__ */ jsxs(\"span\", { className: classes, children: [\n /* @__PURE__ */ jsx(\n \"input\",\n {\n ref: checkboxRef,\n type: \"checkbox\",\n value,\n name,\n id,\n disabled,\n onChange,\n \"aria-describedby\": describedById,\n required,\n \"aria-invalid\": shouldValidate ? !valid : void 0,\n ...other\n }\n ),\n /* @__PURE__ */ jsx(\"span\", { className: `${prefix}checkbox__symbol` }),\n label && /* @__PURE__ */ jsxs(\"span\", { className: `${prefix}checkbox__label`, children: [\n /* @__PURE__ */ jsx(Label, { prefix, htmlFor: id, label }),\n Boolean(caption) && /* @__PURE__ */ jsx(\"span\", { className: `${prefix}checkbox__caption`, children: /* @__PURE__ */ jsx(Label, { prefix, htmlFor: id, label: caption }) })\n ] })\n ] });\n }\n);\nCheckbox.displayName = \"Checkbox\";\nvar Checkbox_default = Checkbox;\nexport {\n Checkbox,\n Checkbox_default as default\n};\n","import Checkbox from \"./Checkbox.mjs\";\nexport * from \"./Checkbox.mjs\";\nexport * from \"./IndeterminateCheckboxGroup.mjs\";\nvar lib_default = Checkbox;\nexport {\n lib_default as default\n};\n","\"use client\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport Label from \"@ingka/label\";\nimport cx from \"classnames\";\nconst RadioButton = forwardRef(\n (props, publicRef) => {\n const {\n className,\n prefix = \"\",\n id,\n label,\n caption,\n name = \"radioname\",\n value,\n onChange,\n disabled = false,\n describedById,\n required,\n subtle = false,\n ...other\n } = props;\n const classes = cx(\n className,\n `${prefix}radio`,\n subtle && `${prefix}radio--subtle`\n );\n return /* @__PURE__ */ jsxs(\"span\", { className: classes, children: [\n /* @__PURE__ */ jsx(\n \"input\",\n {\n type: \"radio\",\n value,\n name,\n id,\n ref: publicRef,\n disabled,\n onChange: disabled ? void 0 : onChange,\n \"aria-describedby\": describedById,\n required,\n ...other\n }\n ),\n /* @__PURE__ */ jsx(\"span\", { className: `${prefix}radio__symbol` }),\n label && /* @__PURE__ */ jsxs(\"span\", { className: `${prefix}radio__label`, children: [\n /* @__PURE__ */ jsx(Label, { prefix, htmlFor: id, label }),\n caption && /* @__PURE__ */ jsx(\"span\", { className: `${prefix}radio__caption`, children: /* @__PURE__ */ jsx(Label, { prefix, htmlFor: id, label: caption }) })\n ] })\n ] });\n }\n);\nRadioButton.displayName = \"RadioButton\";\nvar RadioButton_default = RadioButton;\nexport {\n RadioButton_default as default\n};\n","import RadioButton from \"./RadioButton.mjs\";\nexport * from \"./RadioButton.mjs\";\nvar lib_default = RadioButton;\nexport {\n lib_default as default\n};\n","import { jsx, jsxs } from \"react/jsx-runtime\";\nimport cx from \"classnames\";\nimport Label from \"@ingka/label\";\nconst Switch = (props) => {\n const {\n id,\n prefix = \"\",\n describedById,\n value,\n name = \"switchname\",\n className,\n onChange,\n label,\n subtle = false,\n ...other\n } = props;\n const classes = cx(\n subtle && `${prefix}switch--subtle`,\n `${prefix}switch`,\n className\n );\n return /* @__PURE__ */ jsxs(\"span\", { className: classes, children: [\n /* @__PURE__ */ jsx(\n \"input\",\n {\n id,\n type: \"checkbox\",\n name,\n value,\n className: `${prefix}switch__checkbox`,\n \"aria-describedby\": describedById,\n onChange,\n ...other\n }\n ),\n /* @__PURE__ */ jsx(\"span\", { className: `${prefix}switch__toggle`, children: /* @__PURE__ */ jsx(\"span\", { className: `${prefix}switch__button`, children: /* @__PURE__ */ jsx(\"span\", { className: `${prefix}switch__symbol` }) }) }),\n label && /* @__PURE__ */ jsx(\n Label,\n {\n prefix,\n htmlFor: id,\n label,\n id: describedById,\n className: `${prefix}switch__label`\n }\n )\n ] });\n};\nvar Switch_default = Switch;\nexport {\n Switch_default as default\n};\n","import Switch from \"./Switch.mjs\";\nexport * from \"./Switch.mjs\";\nvar lib_default = Switch;\nexport {\n lib_default as default\n};\n","import paths from \"@ingka/icons-shared/paths/image-strikethrough\";\nimport { renderPaths } from \"../renderPaths.mjs\";\nvar image_strikethrough_default = () => renderPaths(paths);\nexport {\n image_strikethrough_default as default\n};\n","import paths from \"@ingka/icons-shared/paths/image\";\nimport { renderPaths } from \"../renderPaths.mjs\";\nvar image_default = () => renderPaths(paths);\nexport {\n image_default as default\n};\n","\"use client\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useState, useEffect, useRef } from \"react\";\nimport SSRIcon from \"@ingka/ssr-icon\";\nimport imageStrikethrough from \"@ingka/ssr-icon/paths/image-strikethrough\";\nimport imageFallback from \"@ingka/ssr-icon/paths/image\";\nimport cx from \"classnames\";\nconst Image = (props) => {\n const {\n src,\n alt,\n className,\n prefix = \"\",\n srcSet,\n sizes,\n loading = \"lazy\",\n fallback = false,\n ...otherProps\n } = props;\n const [error, setError] = useState(false);\n const [loaded, setLoaded] = useState(false);\n const imageRef = useRef(null);\n const classes = cx(\n `${prefix}image`,\n (error || fallback) && `${prefix}image--fallback`,\n className\n );\n const onError = (errorEvent) => {\n if (!imageRef.current) return;\n setError(true);\n if (otherProps.onError) otherProps.onError(errorEvent);\n };\n const onLoad = (loadEvent) => {\n if (!imageRef.current) return;\n setLoaded(true);\n if (otherProps.onLoad) otherProps.onLoad(loadEvent);\n };\n useEffect(() => {\n if (src) {\n setError(false);\n }\n }, [src]);\n useEffect(() => {\n if (imageRef.current && !(loaded || error)) {\n if (imageRef.current.complete) {\n if (imageRef.current.naturalHeight) {\n const artificialLoadEvent = new Event(\"load\");\n imageRef.current.dispatchEvent(artificialLoadEvent);\n } else {\n const artificialErrorEvent = new Event(\"error\");\n imageRef.current.dispatchEvent(artificialErrorEvent);\n }\n }\n }\n }, []);\n let paths = imageFallback;\n if (error) {\n paths = imageStrikethrough;\n }\n const image = /* @__PURE__ */ jsx(\n \"img\",\n {\n ref: imageRef,\n className: !error && !fallback ? classes : void 0,\n onError,\n onLoad,\n alt,\n src,\n srcSet,\n sizes,\n loading,\n ...otherProps\n }\n );\n return error || fallback ? /* @__PURE__ */ jsxs(\"span\", { className: classes, children: [\n /* @__PURE__ */ jsx(\n SSRIcon,\n {\n paths,\n className: `${prefix}image__icon`,\n prefix\n }\n ),\n image\n ] }) : image;\n};\nvar Image_default = Image;\nconst Something = /* @__PURE__ */ jsx(Image, { src: \"my-image.png\", fetchPriority: \"high\" });\nexport {\n Image_default as default\n};\n","import Image from \"./Image.mjs\";\nexport * from \"./Image.mjs\";\nvar lib_default = Image;\nexport {\n lib_default as default\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport cx from \"classnames\";\nconst AspectRatioBox = (props) => {\n const {\n tagType = \"span\",\n prefix = \"\",\n className,\n ratio = \"standard\",\n children,\n ...others\n } = props;\n const classes = cx(\n `${prefix}aspect-ratio-box`,\n ratio && `${prefix}aspect-ratio-box--${ratio.replace(\":\", \"-\")}`,\n className\n );\n const SpanOrDiv = tagType;\n return /* @__PURE__ */ jsx(SpanOrDiv, { className: `${classes}`, ...others, children });\n};\nvar AspectRatioBox_default = AspectRatioBox;\nexport {\n AspectRatioBox_default as default\n};\n","import AspectRatioBox from \"./AspectRatioBox.mjs\";\nexport * from \"./AspectRatioBox.mjs\";\nvar lib_default = AspectRatioBox;\nexport {\n lib_default as default\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport cx from \"classnames\";\nconst PaymentLogo = (props) => {\n const { src, alt, size, className, prefix = \"\", ...otherProps } = props;\n const classes = cx(\n className,\n `${prefix}payment-logo`,\n size && `${prefix}payment-logo--${size}`\n );\n if (!src) {\n return null;\n }\n return /* @__PURE__ */ jsx(\"span\", { ...otherProps, className: classes, children: /* @__PURE__ */ jsx(\"img\", { className: `${prefix}payment-logo__img`, src, alt }) });\n};\nvar PaymentLogo_default = PaymentLogo;\nexport {\n PaymentLogo_default as default\n};\n","import PaymentLogo from \"./PaymentLogo.mjs\";\nexport * from \"./PaymentLogo.mjs\";\nvar lib_default = PaymentLogo;\nexport {\n lib_default as default\n};\n","import paths from \"@ingka/icons-shared/paths/person\";\nimport { renderPaths } from \"../renderPaths.mjs\";\nvar person_default = () => renderPaths(paths);\nexport {\n person_default as default\n};\n","import paths from \"@ingka/icons-shared/paths/person-small\";\nimport { renderPaths } from \"../renderPaths.mjs\";\nvar person_small_default = () => renderPaths(paths);\nexport {\n person_small_default as default\n};\n","import { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport AspectRatioBox from \"@ingka/aspect-ratio-box\";\nimport Image from \"@ingka/image\";\nimport SSRIcon from \"@ingka/ssr-icon\";\nimport person from \"@ingka/ssr-icon/paths/person\";\nimport personSmall from \"@ingka/ssr-icon/paths/person-small\";\nimport cx from \"classnames\";\nconst Avatar = (props) => {\n const {\n size = \"medium\",\n prefix = \"\",\n withIcon,\n text,\n imageProps,\n variant = \"primary\",\n className,\n onClick,\n disabled,\n staticColour,\n screenReaderText,\n ...other\n } = props;\n let contentType;\n if (imageProps) {\n contentType = \"image\";\n } else if (withIcon) {\n contentType = \"icon\";\n } else {\n contentType = \"text\";\n }\n const baseClass = `${prefix}avatar`;\n const classes = cx(\n baseClass,\n onClick && `${baseClass}--btn`,\n `${baseClass}--${size}`,\n `${baseClass}--${variant}`,\n `${baseClass}--${contentType}`,\n staticColour && `${baseClass}--static`,\n className\n );\n const avatarContent = /* @__PURE__ */ jsxs(Fragment, { children: [\n contentType === \"icon\" && /* @__PURE__ */ jsx(\n SSRIcon,\n {\n className: cx(`${baseClass}__icon`),\n prefix,\n paths: size === \"xsmall\" ? personSmall : person\n }\n ),\n contentType === \"image\" && /* @__PURE__ */ jsx(AspectRatioBox, { ratio: \"square\", prefix, children: /* @__PURE__ */ jsx(\n Image,\n {\n className: `${baseClass}__image`,\n prefix,\n ...imageProps\n }\n ) }),\n contentType === \"text\" && /* @__PURE__ */ jsx(\"span\", { className: cx(`${baseClass}__text`), children: text }),\n /* @__PURE__ */ jsx(\"span\", { className: cx(`${baseClass}__sr-text`), children: screenReaderText })\n ] });\n return onClick ? /* @__PURE__ */ jsx(\n \"button\",\n {\n className: classes,\n onClick,\n disabled,\n ...other,\n children: avatarContent\n }\n ) : /* @__PURE__ */ jsx(\n \"span\",\n {\n className: classes,\n ...other,\n children: avatarContent\n }\n );\n};\nAvatar.displayName = \"Avatar\";\nvar Avatar_default = Avatar;\nexport {\n Avatar_default as default\n};\n","import Avatar from \"./Avatar.mjs\";\nexport * from \"./Avatar.mjs\";\nvar lib_default = Avatar;\nexport {\n lib_default as default\n};\n","import { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport chevronRightSmall from \"@ingka/ssr-icon/paths/chevron-right-small\";\nimport chevronRight from \"@ingka/ssr-icon/paths/chevron-right\";\nimport arrowRight from \"@ingka/ssr-icon/paths/arrow-right\";\nimport linkOut from \"@ingka/ssr-icon/paths/link-out\";\nimport copy from \"@ingka/ssr-icon/paths/copy\";\nimport Checkbox from \"@ingka/checkbox\";\nimport RadioButton from \"@ingka/radio-button\";\nimport Switch from \"@ingka/switch\";\nimport SSRIcon from \"@ingka/ssr-icon\";\nimport Image from \"@ingka/image\";\nimport AspectRatioBox from \"@ingka/aspect-ratio-box\";\nimport PaymentLogo from \"@ingka/payment-logo\";\nimport { forwardRef } from \"react\";\nimport cx from \"classnames\";\nimport Avatar from \"@ingka/avatar\";\nconst ListViewItem = forwardRef(\n (props, ref) => {\n const {\n avatarProps,\n prefix = \"\",\n id,\n control = \"default\",\n name,\n onClick,\n onChange,\n title,\n description,\n addOn,\n leadingIcon,\n image,\n imageAltText = \"\",\n paymentLogo,\n size = \"medium\",\n inset,\n emphasised,\n disabled,\n className,\n controlProps,\n imageProps,\n quantityLabel,\n href,\n newWindow,\n controlIcon = \"linkOut\",\n leadingIconPosition = \"center\",\n showDivider = true,\n ...otherProps\n } = props;\n const baseClass = `${prefix}list-view-item`;\n const controlId = id + \"__control\";\n const controlTypes = {\n DEFAULT: \"default\",\n CHECKBOX: \"checkbox\",\n RADIOBUTTON: \"radiobutton\",\n SWITCH: \"switch\",\n NAVIGATIONAL: \"navigational\",\n LINK: \"link\"\n };\n const classes = cx(\n baseClass,\n disabled && control !== controlTypes.DEFAULT && `${baseClass}--disabled`,\n !showDivider && `${baseClass}__no-divider`,\n className\n );\n const itemClasses = cx(\n control === controlTypes.DEFAULT ? `${baseClass}__default` : `${baseClass}__action`,\n inset && `${baseClass}__inset`,\n image && `${baseClass}__with-image`\n );\n const trailingIcon = {\n chevronRight,\n chevronRightSmall,\n arrowRight,\n linkOut,\n copy\n };\n const TrailingIcon = (control === \"navigational\" || control === \"link\") && controlIcon ? trailingIcon[controlIcon] && /* @__PURE__ */ jsx(\"span\", { className: `${baseClass}__control-icon`, children: /* @__PURE__ */ jsx(SSRIcon, { prefix, paths: trailingIcon[controlIcon] }) }) : null;\n const formComponentProps = {\n subtle: true,\n id: controlId,\n name,\n disabled,\n onChange,\n prefix,\n ...controlProps,\n value: controlProps?.value || \"\"\n };\n let FormControl;\n if (control === \"checkbox\") {\n FormControl = /* @__PURE__ */ jsx(Checkbox, { ...formComponentProps });\n } else if (control === \"radiobutton\") {\n FormControl = /* @__PURE__ */ jsx(RadioButton, { ...formComponentProps });\n } else if (control === \"switch\") {\n FormControl = /* @__PURE__ */ jsx(Switch, { ...formComponentProps });\n }\n let avatarSize = \"small\";\n if (size === \"large\") {\n avatarSize = \"medium\";\n } else if (size === \"small\") {\n avatarSize = \"xsmall\";\n }\n const leadingOptsMap = {\n [\"image\"]: /* @__PURE__ */ jsx(\"span\", { className: `${baseClass}__image`, children: /* @__PURE__ */ jsx(AspectRatioBox, { prefix, ratio: \"square\", children: /* @__PURE__ */ jsx(\n Image,\n {\n src: image,\n prefix,\n alt: imageAltText,\n ...imageProps\n }\n ) }) }),\n [\"icon\"]: /* @__PURE__ */ jsx(\n SSRIcon,\n {\n prefix,\n className: `${baseClass}__icon-${leadingIconPosition}`,\n paths: leadingIcon\n }\n ),\n [\"paymentLogo\"]: /* @__PURE__ */ jsx(\n PaymentLogo,\n {\n prefix,\n className: `${baseClass}__payment-logo`,\n size: size === \"small\" ? \"small\" : \"medium\",\n ...paymentLogo\n }\n ),\n [\"avatar\"]: avatarProps?.screenReaderText ? /* @__PURE__ */ jsx(\n Avatar,\n {\n className: `${baseClass}__avatar`,\n prefix,\n ...avatarProps,\n size: avatarSize,\n onClick: void 0\n }\n ) : null\n };\n let leadingMedia = null;\n if (image) {\n leadingMedia = leadingOptsMap.image;\n } else if (paymentLogo && !image) {\n leadingMedia = leadingOptsMap.paymentLogo;\n } else if (leadingIcon && !image && !paymentLogo) {\n leadingMedia = leadingOptsMap.icon;\n } else if (avatarProps) {\n leadingMedia = leadingOptsMap.avatar;\n }\n const content = /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsxs(\"span\", { className: `${baseClass}__wrapper`, children: [\n leadingMedia,\n /* @__PURE__ */ jsxs(\"span\", { className: `${baseClass}__label-container`, children: [\n /* @__PURE__ */ jsx(\n \"span\",\n {\n className: cx(\n `${baseClass}__title`,\n emphasised && `${baseClass}__title--emphasised`\n ),\n children: title\n }\n ),\n description && size !== \"small\" && /* @__PURE__ */ jsx(\"span\", { className: `${baseClass}__description`, children: description }),\n addOn && size !== \"small\" && /* @__PURE__ */ jsx(\"span\", { className: `${baseClass}__addon`, children: addOn })\n ] })\n ] }),\n quantityLabel !== null && quantityLabel !== void 0 && /* @__PURE__ */ jsx(\"span\", { className: `${baseClass}__quantity-label`, children: quantityLabel }),\n TrailingIcon ? TrailingIcon : FormControl\n ] });\n return /* @__PURE__ */ jsx(\"li\", {\n id,\n ref,\n className: classes,\n /* eslint-disable no-nested-ternary */\n children: control === controlTypes.NAVIGATIONAL ? /* @__PURE__ */ jsx(\n \"button\",\n {\n className: itemClasses,\n onClick: !disabled ? onClick : void 0,\n ...otherProps,\n disabled,\n children: content\n }\n ) : control === controlTypes.LINK ? /* @__PURE__ */ jsx(\n \"a\",\n {\n className: itemClasses,\n href: href && !disabled ? href : void 0,\n target: href && newWindow && !disabled ? newWindow : void 0,\n onClick: !disabled ? onClick : void 0,\n ...otherProps,\n children: content\n }\n ) : control === controlTypes.DEFAULT ? /* @__PURE__ */ jsx(\"span\", { className: itemClasses, ...otherProps, children: content }) : /* @__PURE__ */ jsx(\"label\", { className: itemClasses, ...otherProps, children: content })\n });\n }\n);\nListViewItem.displayName = \"ListViewItem\";\nvar ListViewItem_default = ListViewItem;\nexport {\n ListViewItem,\n ListViewItem_default as default\n};\n","import ListView from \"./ListView.mjs\";\nexport * from \"./ListView.mjs\";\nexport * from \"./ListViewItem.mjs\";\nvar lib_default = ListView;\nexport {\n lib_default as default\n};\n","\"use client\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport React, { useEffect, useState, cloneElement } from \"react\";\nimport cx from \"classnames\";\nconst Loading = (props) => {\n const {\n className,\n prefix = \"\",\n children: child,\n text = \"Loading\\u2026\",\n labelTransitions = false,\n labelPosition = \"center\",\n ...otherProps\n } = props;\n const baseClass = `${prefix}loading`;\n const [displayText, setDisplayText] = useState(text);\n const [fadeOut, setFadeOut] = useState(false);\n const [fadeIn, setFadeIn] = useState(false);\n useEffect(() => {\n let fadeOutTimer;\n let fadeInTimer;\n if (labelTransitions && text !== displayText) {\n setFadeIn(false);\n setFadeOut(true);\n fadeOutTimer = setTimeout(() => {\n setFadeOut(false);\n fadeInTimer = setTimeout(() => {\n setFadeIn(true);\n setDisplayText(text);\n }, 100);\n }, 100);\n } else {\n setFadeIn(true);\n setDisplayText(text);\n }\n return () => {\n clearTimeout(fadeOutTimer);\n clearTimeout(fadeInTimer);\n };\n }, [text]);\n const loadingClass = cx(\n baseClass,\n `${baseClass}--label-${labelPosition}`,\n className\n );\n const loadingTextClasses = cx(\n `${baseClass}__text`,\n fadeOut && `${baseClass}__text--fade-out`,\n fadeIn && `${baseClass}__text--fade-in`\n );\n const shouldRenderLabel = child && React.isValidElement(child) && !child.props.size || child && React.isValidElement(child) && child.props.size === \"large\";\n return /* @__PURE__ */ jsxs(\"span\", { ...otherProps, className: loadingClass, \"aria-live\": \"polite\", children: [\n child && React.isValidElement(child) && cloneElement(child, { prefix }),\n shouldRenderLabel && /* @__PURE__ */ jsx(\"span\", { \"aria-hidden\": true, className: loadingTextClasses, children: displayText }),\n /* @__PURE__ */ jsx(\"span\", { className: `${baseClass}__sr-only-text`, children: text })\n ] });\n};\nvar Loading_default = Loading;\nexport {\n Loading_default as default\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport cx from \"classnames\";\nconst LoadingBall = (props) => {\n const {\n className,\n prefix = \"\",\n size = \"large\",\n color = \"emphasised\",\n ...otherProps\n } = props;\n const baseClass = `${prefix}loading__ball`;\n const loadingBallClass = cx(\n baseClass,\n `${baseClass}--${size}`,\n `${baseClass}--${color}`,\n className\n );\n return /* @__PURE__ */ jsx(\"span\", { ...otherProps, className: loadingBallClass, \"aria-hidden\": true });\n};\nvar LoadingBall_default = LoadingBall;\nexport {\n LoadingBall_default as default\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport cx from \"classnames\";\nconst Skeleton = (props) => {\n const {\n /* Prefix all classes in every element with this string */\n prefix = \"\",\n /* Can be used to add classes to base HTML element. */\n className,\n /* Set skeleton width with inline style */\n width = \"100%\",\n /* Set skeleton height with inline style */\n height,\n inlineBlock,\n tagName = \"div\",\n ...other\n } = props;\n const classes = cx(\n `${prefix}skeleton`,\n inlineBlock && `${prefix}skeleton--inline-block`,\n className\n );\n const TagName = tagName;\n return /* @__PURE__ */ jsx(TagName, { style: { width, height }, className: classes, ...other });\n};\nvar Skeleton_default = Skeleton;\nexport {\n Skeleton_default as default\n};\n","import Skeleton from \"./Skeleton.mjs\";\nexport * from \"./Skeleton.mjs\";\nvar lib_default = Skeleton;\nexport {\n lib_default as default\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport cx from \"classnames\";\nconst Text = (props) => {\n const {\n prefix = \"\",\n className,\n tagName = \"div\",\n headingSize,\n bodySize = \"m\",\n children,\n ...other\n } = props;\n const baseClass = `${prefix}text`;\n const classes = cx(\n baseClass,\n headingSize && `${baseClass}--heading-${headingSize}`,\n !headingSize && bodySize && `${baseClass}--body-${bodySize}`,\n className\n );\n const Tag = tagName || \"div\";\n return /* @__PURE__ */ jsx(Tag, { ...other, className: classes, children });\n};\nvar Text_default = Text;\nexport {\n Text_default as default\n};\n","import Text from \"./Text.mjs\";\nexport * from \"./Text.mjs\";\nvar lib_default = Text;\nexport {\n lib_default as default\n};\n","import SkapaText, { TextProps } from '@ingka/text';\nimport styled from 'styled-components';\n\ntype TTextProps = {\n $marginBottom?: boolean;\n};\n\ntype AllTextProps = TTextProps & TextProps;\n\nexport const Text = styled(SkapaText)`\n margin-block-end: ${props => {\n return props.$marginBottom ? '1rem' : '';\n }};\n`;\n\nexport const Title = styled(Text)`\n margin-block-end: 1.5rem;\n`;\n","export const Z_INDEXES = {\n CUSTOMIZE_MENU_HEADER: 2,\n ERROR_WRAPPER: 100,\n PLANNER_MESSAGE_WRAPPER: 100,\n DRAW_FLIP_PANEL_BUTTON: 2000,\n COUNTDOWN_BANNER_WRAPPER: 9999,\n LOADING_SCREEN_CONTAINER: 99999\n};\n","import ListView, { ListViewItem } from '@ingka/list-view';\nimport Loading, { LoadingBall } from '@ingka/loading';\nimport Skeleton, { SkeletonProps } from '@ingka/skeleton';\nimport { translateString } from 'i18n/translateString';\nimport { FunctionComponent } from 'react';\nimport { useAppSelector } from 'redux-store/hooks';\nimport {\n selectIsSceneLoadingScreenVisible,\n selectShowAppLoadingScreen\n} from 'redux-store/rootReducer';\nimport styled from 'styled-components';\nimport { Text } from 'ui/Text';\nimport { COLORS } from 'utils/constants/colors';\nimport { DataTestIdEnum } from 'utils/constants/elements';\nimport { Z_INDEXES } from 'utils/constants/zIndex';\n\ninterface IProps {\n $isScene: boolean;\n}\n\nconst LoadingScreenContainer = styled.div`\n position: ${({ $isScene }) => {\n return $isScene ? 'absolute' : 'fixed';\n }};\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ${({ $isScene }) => {\n return $isScene ? `` : `${Z_INDEXES.LOADING_SCREEN_CONTAINER}`;\n }};\n display: flex;\n justify-content: center;\n align-items: center;\n background: ${({ $isScene }) => {\n return $isScene ? `${COLORS.BACKGROUND_SCENE}` : `${COLORS.BACKGROUND_WHITE}`;\n }};\n width: ${({ $isScene }) => {\n return $isScene ? '' : '100%';\n }};\n height: ${({ $isScene }) => {\n return $isScene ? '' : '100%';\n }};\n`;\n\nconst LoadingScreenWrapper: FunctionComponent = props => {\n const { $isScene } = props;\n\n return (\n \n \n \n \n \n );\n};\n\nexport const LoadingScreenScene: FunctionComponent = () => {\n const showSceneLoadingScreen = useAppSelector(selectIsSceneLoadingScreenVisible);\n\n if (!showSceneLoadingScreen) {\n return null;\n }\n\n return ;\n};\n\nexport const LoadingScreenApp: FunctionComponent = () => {\n const isVisible = useAppSelector(selectShowAppLoadingScreen);\n\n if (!isVisible) {\n return null;\n }\n\n return ;\n};\n\nconst listSkeletonProps: SkeletonProps = {\n width: '240px',\n height: '18px'\n};\n\nexport const ShareDesignLoadingSkeleton: FunctionComponent = () => {\n return (\n <>\n \n {translateString('shareDesignCardDefaultTitle')}\n \n \n } />\n } />\n } />\n } />\n \n \n );\n};\n\nexport const CustomizeMenuLoadingSkeleton = () => {\n return (\n \n } />\n } />\n } />\n } />\n } />\n } />\n \n );\n};\n\nconst DesignCodeWrapper = styled.div`\n display: flex;\n align-items: center;\n\n .text {\n margin-inline-end: 0.25rem;\n }\n`;\n\nexport const CopyDesignLoadingSkeleton: FunctionComponent = () => {\n return (\n \n {translateString('designCodeTitle')}\n \n \n );\n};\n","/**\n * @license React\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';function f(a,b){var c=a.length;a.push(b);a:for(;0>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&Ng(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=Lg(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Tg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Rg(f.type,f.key,f.props,null,a.mode,h),h.ref=Lg(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Sg(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);Mg(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=Qg(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Ug=Og(!0),Vg=Og(!1),Wg=Uf(null),Xg=null,Yg=null,Zg=null;function $g(){Zg=Yg=Xg=null}function ah(a){var b=Wg.current;E(Wg);a._currentValue=b}function bh(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}}\nfunction ch(a,b){Xg=a;Zg=Yg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(dh=!0),a.firstContext=null)}function eh(a){var b=a._currentValue;if(Zg!==a)if(a={context:a,memoizedValue:b,next:null},null===Yg){if(null===Xg)throw Error(p(308));Yg=a;Xg.dependencies={lanes:0,firstContext:a}}else Yg=Yg.next=a;return b}var fh=null;function gh(a){null===fh?fh=[a]:fh.push(a)}\nfunction hh(a,b,c,d){var e=b.interleaved;null===e?(c.next=c,gh(b)):(c.next=e.next,e.next=c);b.interleaved=c;return ih(a,d)}function ih(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}var jh=!1;function kh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}\nfunction lh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function mh(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}\nfunction nh(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(K&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;return ih(a,c)}e=d.interleaved;null===e?(b.next=b,gh(d)):(b.next=e.next,e.next=b);d.interleaved=b;return ih(a,c)}function oh(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&4194240))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nfunction ph(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=\nb;c.lastBaseUpdate=b}\nfunction qh(a,b,c,d){var e=a.updateQueue;jh=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var m=a.alternate;null!==m&&(m=m.updateQueue,h=m.lastBaseUpdate,h!==g&&(null===h?m.firstBaseUpdate=l:h.next=l,m.lastBaseUpdate=k))}if(null!==f){var q=e.baseState;g=0;m=l=k=null;h=f;do{var r=h.lane,y=h.eventTime;if((d&r)===r){null!==m&&(m=m.next={eventTime:y,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,\nnext:null});a:{var n=a,t=h;r=b;y=c;switch(t.tag){case 1:n=t.payload;if(\"function\"===typeof n){q=n.call(y,q,r);break a}q=n;break a;case 3:n.flags=n.flags&-65537|128;case 0:n=t.payload;r=\"function\"===typeof n?n.call(y,q,r):n;if(null===r||void 0===r)break a;q=A({},q,r);break a;case 2:jh=!0}}null!==h.callback&&0!==h.lane&&(a.flags|=64,r=e.effects,null===r?e.effects=[h]:r.push(h))}else y={eventTime:y,lane:r,tag:h.tag,payload:h.payload,callback:h.callback,next:null},null===m?(l=m=y,k=q):m=m.next=y,g|=r;\nh=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else r=h,h=r.next,r.next=null,e.lastBaseUpdate=r,e.shared.pending=null}while(1);null===m&&(k=q);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=m;b=e.shared.interleaved;if(null!==b){e=b;do g|=e.lane,e=e.next;while(e!==b)}else null===f&&(e.shared.lanes=0);rh|=g;a.lanes=g;a.memoizedState=q}}\nfunction sh(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;bc?c:4;a(!0);var d=Gh.transition;Gh.transition={};try{a(!1),b()}finally{C=c,Gh.transition=d}}function wi(){return Uh().memoizedState}\nfunction xi(a,b,c){var d=yi(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(zi(a))Ai(b,c);else if(c=hh(a,b,c,d),null!==c){var e=R();gi(c,a,d,e);Bi(c,b,d)}}\nfunction ii(a,b,c){var d=yi(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(zi(a))Ai(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,gh(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=hh(a,b,e,d);null!==c&&(e=R(),gi(c,a,d,e),Bi(c,b,d))}}\nfunction zi(a){var b=a.alternate;return a===M||null!==b&&b===M}function Ai(a,b){Jh=Ih=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Bi(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar Rh={readContext:eh,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P,unstable_isNewReconciler:!1},Oh={readContext:eh,useCallback:function(a,b){Th().memoizedState=[a,void 0===b?null:b];return a},useContext:eh,useEffect:mi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ki(4194308,\n4,pi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ki(4194308,4,a,b)},useInsertionEffect:function(a,b){return ki(4,2,a,b)},useMemo:function(a,b){var c=Th();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Th();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=xi.bind(null,M,a);return[d.memoizedState,a]},useRef:function(a){var b=\nTh();a={current:a};return b.memoizedState=a},useState:hi,useDebugValue:ri,useDeferredValue:function(a){return Th().memoizedState=a},useTransition:function(){var a=hi(!1),b=a[0];a=vi.bind(null,a[1]);Th().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=M,e=Th();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===Q)throw Error(p(349));0!==(Hh&30)||di(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;mi(ai.bind(null,d,\nf,a),[a]);d.flags|=2048;bi(9,ci.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Th(),b=Q.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Kh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;zj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eGj&&(b.flags|=128,d=!0,Dj(f,!1),b.lanes=4194304)}else{if(!d)if(a=Ch(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Dj(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Gj&&1073741824!==c&&(b.flags|=128,d=!0,Dj(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=L.current,G(L,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Hj(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(fj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Ij(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return zh(),E(Wf),E(H),Eh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Bh(b),null;case 13:E(L);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(L),null;case 4:return zh(),null;case 10:return ah(b.type._context),null;case 22:case 23:return Hj(),\nnull;case 24:return null;default:return null}}var Jj=!1,U=!1,Kj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Lj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Mj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Nj=!1;\nfunction Oj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Ci(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Nj;Nj=!1;return n}\nfunction Pj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Mj(b,c,f)}e=e.next}while(e!==d)}}function Qj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Rj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Sj(a){var b=a.alternate;null!==b&&(a.alternate=null,Sj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Tj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Uj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Tj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Vj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Vj(a,b,c),a=a.sibling;null!==a;)Vj(a,b,c),a=a.sibling}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}var X=null,Xj=!1;function Yj(a,b,c){for(c=c.child;null!==c;)Zj(a,b,c),c=c.sibling}\nfunction Zj(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Lj(c,b);case 6:var d=X,e=Xj;X=null;Yj(a,b,c);X=d;Xj=e;null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Xj;X=c.stateNode.containerInfo;Xj=!0;\nYj(a,b,c);X=d;Xj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Mj(c,b,g):0!==(f&4)&&Mj(c,b,g));e=e.next}while(e!==d)}Yj(a,b,c);break;case 1:if(!U&&(Lj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Yj(a,b,c);break;case 21:Yj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Yj(a,b,c),U=d):Yj(a,b,c);break;default:Yj(a,b,c)}}function ak(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Kj);b.forEach(function(b){var d=bk.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction ck(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*lk(d/1960))-d;if(10a?16:a;if(null===wk)var d=!1;else{a=wk;wk=null;xk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-fk?Kk(a,0):rk|=c);Dk(a,b)}function Yk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=R();a=ih(a,b);null!==a&&(Ac(a,b,c),Dk(a,c))}function uj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Yk(a,c)}\nfunction bk(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Yk(a,c)}var Vk;\nVk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)dh=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return dh=!1,yj(a,b,c);dh=0!==(a.flags&131072)?!0:!1}else dh=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;ij(a,b);a=b.pendingProps;var e=Yf(b,H.current);ch(b,c);e=Nh(null,b,d,a,e,c);var f=Sh();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,kh(b),e.updater=Ei,b.stateNode=e,e._reactInternals=b,Ii(b,d,a,c),b=jj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Xi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{ij(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=Zk(d);a=Ci(d,a);switch(e){case 0:b=cj(null,b,d,a,c);break a;case 1:b=hj(null,b,d,a,c);break a;case 11:b=Yi(null,b,d,a,c);break a;case 14:b=$i(null,b,d,Ci(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),cj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),hj(a,b,d,e,c);case 3:a:{kj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;lh(a,b);qh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ji(Error(p(423)),b);b=lj(a,b,d,c,e);break a}else if(d!==e){e=Ji(Error(p(424)),b);b=lj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Vg(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=Zi(a,b,c);break a}Xi(a,b,d,c)}b=b.child}return b;case 5:return Ah(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\ngj(a,b),Xi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return oj(a,b,c);case 4:return yh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Ug(b,null,d,c):Xi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),Yi(a,b,d,e,c);case 7:return Xi(a,b,b.pendingProps,c),b.child;case 8:return Xi(a,b,b.pendingProps.children,c),b.child;case 12:return Xi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Wg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=Zi(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=mh(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);bh(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);bh(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Xi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,ch(b,c),e=eh(e),d=d(e),b.flags|=1,Xi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Ci(d,b.pendingProps),e=Ci(d.type,e),$i(a,b,d,e,c);case 15:return bj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),ij(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,ch(b,c),Gi(b,d,e),Ii(b,d,e,c),jj(null,b,d,!0,a,c);case 19:return xj(a,b,c);case 22:return dj(a,b,c)}throw Error(p(156,b.tag));};function Fk(a,b){return ac(a,b)}\nfunction $k(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new $k(a,b,c,d)}function aj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction Zk(a){if(\"function\"===typeof a)return aj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction Pg(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction Rg(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)aj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Tg(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return pj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Tg(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function pj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function Qg(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction Sg(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction al(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function bl(a,b,c,d,e,f,g,h,k){a=new al(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};kh(f);return a}function cl(a,b,c){var d=3 &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n // START: Modifications:\n // Apply guards for `Object.create(null)` handling. See:\n // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n // END: Modifications\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","// src/index.tsx\nimport React3, { Component as Component3 } from \"react\";\nimport fastCompare from \"react-fast-compare\";\nimport invariant from \"invariant\";\n\n// src/Provider.tsx\nimport React2, { Component } from \"react\";\n\n// src/server.ts\nimport React from \"react\";\n\n// src/constants.ts\nvar TAG_NAMES = /* @__PURE__ */ ((TAG_NAMES2) => {\n TAG_NAMES2[\"BASE\"] = \"base\";\n TAG_NAMES2[\"BODY\"] = \"body\";\n TAG_NAMES2[\"HEAD\"] = \"head\";\n TAG_NAMES2[\"HTML\"] = \"html\";\n TAG_NAMES2[\"LINK\"] = \"link\";\n TAG_NAMES2[\"META\"] = \"meta\";\n TAG_NAMES2[\"NOSCRIPT\"] = \"noscript\";\n TAG_NAMES2[\"SCRIPT\"] = \"script\";\n TAG_NAMES2[\"STYLE\"] = \"style\";\n TAG_NAMES2[\"TITLE\"] = \"title\";\n TAG_NAMES2[\"FRAGMENT\"] = \"Symbol(react.fragment)\";\n return TAG_NAMES2;\n})(TAG_NAMES || {});\nvar SEO_PRIORITY_TAGS = {\n link: { rel: [\"amphtml\", \"canonical\", \"alternate\"] },\n script: { type: [\"application/ld+json\"] },\n meta: {\n charset: \"\",\n name: [\"generator\", \"robots\", \"description\"],\n property: [\n \"og:type\",\n \"og:title\",\n \"og:url\",\n \"og:image\",\n \"og:image:alt\",\n \"og:description\",\n \"twitter:url\",\n \"twitter:title\",\n \"twitter:description\",\n \"twitter:image\",\n \"twitter:image:alt\",\n \"twitter:card\",\n \"twitter:site\"\n ]\n }\n};\nvar VALID_TAG_NAMES = Object.values(TAG_NAMES);\nvar REACT_TAG_MAP = {\n accesskey: \"accessKey\",\n charset: \"charSet\",\n class: \"className\",\n contenteditable: \"contentEditable\",\n contextmenu: \"contextMenu\",\n \"http-equiv\": \"httpEquiv\",\n itemprop: \"itemProp\",\n tabindex: \"tabIndex\"\n};\nvar HTML_TAG_MAP = Object.entries(REACT_TAG_MAP).reduce(\n (carry, [key, value]) => {\n carry[value] = key;\n return carry;\n },\n {}\n);\nvar HELMET_ATTRIBUTE = \"data-rh\";\n\n// src/utils.ts\nvar HELMET_PROPS = {\n DEFAULT_TITLE: \"defaultTitle\",\n DEFER: \"defer\",\n ENCODE_SPECIAL_CHARACTERS: \"encodeSpecialCharacters\",\n ON_CHANGE_CLIENT_STATE: \"onChangeClientState\",\n TITLE_TEMPLATE: \"titleTemplate\",\n PRIORITIZE_SEO_TAGS: \"prioritizeSeoTags\"\n};\nvar getInnermostProperty = (propsList, property) => {\n for (let i = propsList.length - 1; i >= 0; i -= 1) {\n const props = propsList[i];\n if (Object.prototype.hasOwnProperty.call(props, property)) {\n return props[property];\n }\n }\n return null;\n};\nvar getTitleFromPropsList = (propsList) => {\n let innermostTitle = getInnermostProperty(propsList, \"title\" /* TITLE */);\n const innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);\n if (Array.isArray(innermostTitle)) {\n innermostTitle = innermostTitle.join(\"\");\n }\n if (innermostTemplate && innermostTitle) {\n return innermostTemplate.replace(/%s/g, () => innermostTitle);\n }\n const innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);\n return innermostTitle || innermostDefaultTitle || void 0;\n};\nvar getOnChangeClientState = (propsList) => getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || (() => {\n});\nvar getAttributesFromPropsList = (tagType, propsList) => propsList.filter((props) => typeof props[tagType] !== \"undefined\").map((props) => props[tagType]).reduce((tagAttrs, current) => ({ ...tagAttrs, ...current }), {});\nvar getBaseTagFromPropsList = (primaryAttributes, propsList) => propsList.filter((props) => typeof props[\"base\" /* BASE */] !== \"undefined\").map((props) => props[\"base\" /* BASE */]).reverse().reduce((innermostBaseTag, tag) => {\n if (!innermostBaseTag.length) {\n const keys = Object.keys(tag);\n for (let i = 0; i < keys.length; i += 1) {\n const attributeKey = keys[i];\n const lowerCaseAttributeKey = attributeKey.toLowerCase();\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {\n return innermostBaseTag.concat(tag);\n }\n }\n }\n return innermostBaseTag;\n}, []);\nvar warn = (msg) => console && typeof console.warn === \"function\" && console.warn(msg);\nvar getTagsFromPropsList = (tagName, primaryAttributes, propsList) => {\n const approvedSeenTags = {};\n return propsList.filter((props) => {\n if (Array.isArray(props[tagName])) {\n return true;\n }\n if (typeof props[tagName] !== \"undefined\") {\n warn(\n `Helmet: ${tagName} should be of type \"Array\". Instead found type \"${typeof props[tagName]}\"`\n );\n }\n return false;\n }).map((props) => props[tagName]).reverse().reduce((approvedTags, instanceTags) => {\n const instanceSeenTags = {};\n instanceTags.filter((tag) => {\n let primaryAttributeKey;\n const keys2 = Object.keys(tag);\n for (let i = 0; i < keys2.length; i += 1) {\n const attributeKey = keys2[i];\n const lowerCaseAttributeKey = attributeKey.toLowerCase();\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === \"rel\" /* REL */ && tag[primaryAttributeKey].toLowerCase() === \"canonical\") && !(lowerCaseAttributeKey === \"rel\" /* REL */ && tag[lowerCaseAttributeKey].toLowerCase() === \"stylesheet\")) {\n primaryAttributeKey = lowerCaseAttributeKey;\n }\n if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === \"innerHTML\" /* INNER_HTML */ || attributeKey === \"cssText\" /* CSS_TEXT */ || attributeKey === \"itemprop\" /* ITEM_PROP */)) {\n primaryAttributeKey = attributeKey;\n }\n }\n if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n return false;\n }\n const value = tag[primaryAttributeKey].toLowerCase();\n if (!approvedSeenTags[primaryAttributeKey]) {\n approvedSeenTags[primaryAttributeKey] = {};\n }\n if (!instanceSeenTags[primaryAttributeKey]) {\n instanceSeenTags[primaryAttributeKey] = {};\n }\n if (!approvedSeenTags[primaryAttributeKey][value]) {\n instanceSeenTags[primaryAttributeKey][value] = true;\n return true;\n }\n return false;\n }).reverse().forEach((tag) => approvedTags.push(tag));\n const keys = Object.keys(instanceSeenTags);\n for (let i = 0; i < keys.length; i += 1) {\n const attributeKey = keys[i];\n const tagUnion = {\n ...approvedSeenTags[attributeKey],\n ...instanceSeenTags[attributeKey]\n };\n approvedSeenTags[attributeKey] = tagUnion;\n }\n return approvedTags;\n }, []).reverse();\n};\nvar getAnyTrueFromPropsList = (propsList, checkedTag) => {\n if (Array.isArray(propsList) && propsList.length) {\n for (let index = 0; index < propsList.length; index += 1) {\n const prop = propsList[index];\n if (prop[checkedTag]) {\n return true;\n }\n }\n }\n return false;\n};\nvar reducePropsToState = (propsList) => ({\n baseTag: getBaseTagFromPropsList([\"href\" /* HREF */], propsList),\n bodyAttributes: getAttributesFromPropsList(\"bodyAttributes\" /* BODY */, propsList),\n defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),\n encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n htmlAttributes: getAttributesFromPropsList(\"htmlAttributes\" /* HTML */, propsList),\n linkTags: getTagsFromPropsList(\n \"link\" /* LINK */,\n [\"rel\" /* REL */, \"href\" /* HREF */],\n propsList\n ),\n metaTags: getTagsFromPropsList(\n \"meta\" /* META */,\n [\n \"name\" /* NAME */,\n \"charset\" /* CHARSET */,\n \"http-equiv\" /* HTTPEQUIV */,\n \"property\" /* PROPERTY */,\n \"itemprop\" /* ITEM_PROP */\n ],\n propsList\n ),\n noscriptTags: getTagsFromPropsList(\"noscript\" /* NOSCRIPT */, [\"innerHTML\" /* INNER_HTML */], propsList),\n onChangeClientState: getOnChangeClientState(propsList),\n scriptTags: getTagsFromPropsList(\n \"script\" /* SCRIPT */,\n [\"src\" /* SRC */, \"innerHTML\" /* INNER_HTML */],\n propsList\n ),\n styleTags: getTagsFromPropsList(\"style\" /* STYLE */, [\"cssText\" /* CSS_TEXT */], propsList),\n title: getTitleFromPropsList(propsList),\n titleAttributes: getAttributesFromPropsList(\"titleAttributes\" /* TITLE */, propsList),\n prioritizeSeoTags: getAnyTrueFromPropsList(propsList, HELMET_PROPS.PRIORITIZE_SEO_TAGS)\n});\nvar flattenArray = (possibleArray) => Array.isArray(possibleArray) ? possibleArray.join(\"\") : possibleArray;\nvar checkIfPropsMatch = (props, toMatch) => {\n const keys = Object.keys(props);\n for (let i = 0; i < keys.length; i += 1) {\n if (toMatch[keys[i]] && toMatch[keys[i]].includes(props[keys[i]])) {\n return true;\n }\n }\n return false;\n};\nvar prioritizer = (elementsList, propsToMatch) => {\n if (Array.isArray(elementsList)) {\n return elementsList.reduce(\n (acc, elementAttrs) => {\n if (checkIfPropsMatch(elementAttrs, propsToMatch)) {\n acc.priority.push(elementAttrs);\n } else {\n acc.default.push(elementAttrs);\n }\n return acc;\n },\n { priority: [], default: [] }\n );\n }\n return { default: elementsList, priority: [] };\n};\nvar without = (obj, key) => {\n return {\n ...obj,\n [key]: void 0\n };\n};\n\n// src/server.ts\nvar SELF_CLOSING_TAGS = [\"noscript\" /* NOSCRIPT */, \"script\" /* SCRIPT */, \"style\" /* STYLE */];\nvar encodeSpecialCharacters = (str, encode = true) => {\n if (encode === false) {\n return String(str);\n }\n return String(str).replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\");\n};\nvar generateElementAttributesAsString = (attributes) => Object.keys(attributes).reduce((str, key) => {\n const attr = typeof attributes[key] !== \"undefined\" ? `${key}=\"${attributes[key]}\"` : `${key}`;\n return str ? `${str} ${attr}` : attr;\n}, \"\");\nvar generateTitleAsString = (type, title, attributes, encode) => {\n const attributeString = generateElementAttributesAsString(attributes);\n const flattenedTitle = flattenArray(title);\n return attributeString ? `<${type} ${HELMET_ATTRIBUTE}=\"true\" ${attributeString}>${encodeSpecialCharacters(\n flattenedTitle,\n encode\n )}` : `<${type} ${HELMET_ATTRIBUTE}=\"true\">${encodeSpecialCharacters(\n flattenedTitle,\n encode\n )}`;\n};\nvar generateTagsAsString = (type, tags, encode = true) => tags.reduce((str, t) => {\n const tag = t;\n const attributeHtml = Object.keys(tag).filter(\n (attribute) => !(attribute === \"innerHTML\" /* INNER_HTML */ || attribute === \"cssText\" /* CSS_TEXT */)\n ).reduce((string, attribute) => {\n const attr = typeof tag[attribute] === \"undefined\" ? attribute : `${attribute}=\"${encodeSpecialCharacters(tag[attribute], encode)}\"`;\n return string ? `${string} ${attr}` : attr;\n }, \"\");\n const tagContent = tag.innerHTML || tag.cssText || \"\";\n const isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;\n return `${str}<${type} ${HELMET_ATTRIBUTE}=\"true\" ${attributeHtml}${isSelfClosing ? `/>` : `>${tagContent}`}`;\n}, \"\");\nvar convertElementAttributesToReactProps = (attributes, initProps = {}) => Object.keys(attributes).reduce((obj, key) => {\n const mapped = REACT_TAG_MAP[key];\n obj[mapped || key] = attributes[key];\n return obj;\n}, initProps);\nvar generateTitleAsReactComponent = (_type, title, attributes) => {\n const initProps = {\n key: title,\n [HELMET_ATTRIBUTE]: true\n };\n const props = convertElementAttributesToReactProps(attributes, initProps);\n return [React.createElement(\"title\" /* TITLE */, props, title)];\n};\nvar generateTagsAsReactComponent = (type, tags) => tags.map((tag, i) => {\n const mappedTag = {\n key: i,\n [HELMET_ATTRIBUTE]: true\n };\n Object.keys(tag).forEach((attribute) => {\n const mapped = REACT_TAG_MAP[attribute];\n const mappedAttribute = mapped || attribute;\n if (mappedAttribute === \"innerHTML\" /* INNER_HTML */ || mappedAttribute === \"cssText\" /* CSS_TEXT */) {\n const content = tag.innerHTML || tag.cssText;\n mappedTag.dangerouslySetInnerHTML = { __html: content };\n } else {\n mappedTag[mappedAttribute] = tag[attribute];\n }\n });\n return React.createElement(type, mappedTag);\n});\nvar getMethodsForTag = (type, tags, encode = true) => {\n switch (type) {\n case \"title\" /* TITLE */:\n return {\n toComponent: () => generateTitleAsReactComponent(type, tags.title, tags.titleAttributes),\n toString: () => generateTitleAsString(type, tags.title, tags.titleAttributes, encode)\n };\n case \"bodyAttributes\" /* BODY */:\n case \"htmlAttributes\" /* HTML */:\n return {\n toComponent: () => convertElementAttributesToReactProps(tags),\n toString: () => generateElementAttributesAsString(tags)\n };\n default:\n return {\n toComponent: () => generateTagsAsReactComponent(type, tags),\n toString: () => generateTagsAsString(type, tags, encode)\n };\n }\n};\nvar getPriorityMethods = ({ metaTags, linkTags, scriptTags, encode }) => {\n const meta = prioritizer(metaTags, SEO_PRIORITY_TAGS.meta);\n const link = prioritizer(linkTags, SEO_PRIORITY_TAGS.link);\n const script = prioritizer(scriptTags, SEO_PRIORITY_TAGS.script);\n const priorityMethods = {\n toComponent: () => [\n ...generateTagsAsReactComponent(\"meta\" /* META */, meta.priority),\n ...generateTagsAsReactComponent(\"link\" /* LINK */, link.priority),\n ...generateTagsAsReactComponent(\"script\" /* SCRIPT */, script.priority)\n ],\n toString: () => (\n // generate all the tags as strings and concatenate them\n `${getMethodsForTag(\"meta\" /* META */, meta.priority, encode)} ${getMethodsForTag(\n \"link\" /* LINK */,\n link.priority,\n encode\n )} ${getMethodsForTag(\"script\" /* SCRIPT */, script.priority, encode)}`\n )\n };\n return {\n priorityMethods,\n metaTags: meta.default,\n linkTags: link.default,\n scriptTags: script.default\n };\n};\nvar mapStateOnServer = (props) => {\n const {\n baseTag,\n bodyAttributes,\n encode = true,\n htmlAttributes,\n noscriptTags,\n styleTags,\n title = \"\",\n titleAttributes,\n prioritizeSeoTags\n } = props;\n let { linkTags, metaTags, scriptTags } = props;\n let priorityMethods = {\n toComponent: () => {\n },\n toString: () => \"\"\n };\n if (prioritizeSeoTags) {\n ({ priorityMethods, linkTags, metaTags, scriptTags } = getPriorityMethods(props));\n }\n return {\n priority: priorityMethods,\n base: getMethodsForTag(\"base\" /* BASE */, baseTag, encode),\n bodyAttributes: getMethodsForTag(\"bodyAttributes\" /* BODY */, bodyAttributes, encode),\n htmlAttributes: getMethodsForTag(\"htmlAttributes\" /* HTML */, htmlAttributes, encode),\n link: getMethodsForTag(\"link\" /* LINK */, linkTags, encode),\n meta: getMethodsForTag(\"meta\" /* META */, metaTags, encode),\n noscript: getMethodsForTag(\"noscript\" /* NOSCRIPT */, noscriptTags, encode),\n script: getMethodsForTag(\"script\" /* SCRIPT */, scriptTags, encode),\n style: getMethodsForTag(\"style\" /* STYLE */, styleTags, encode),\n title: getMethodsForTag(\"title\" /* TITLE */, { title, titleAttributes }, encode)\n };\n};\nvar server_default = mapStateOnServer;\n\n// src/HelmetData.ts\nvar instances = [];\nvar isDocument = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar HelmetData = class {\n instances = [];\n canUseDOM = isDocument;\n context;\n value = {\n setHelmet: (serverState) => {\n this.context.helmet = serverState;\n },\n helmetInstances: {\n get: () => this.canUseDOM ? instances : this.instances,\n add: (instance) => {\n (this.canUseDOM ? instances : this.instances).push(instance);\n },\n remove: (instance) => {\n const index = (this.canUseDOM ? instances : this.instances).indexOf(instance);\n (this.canUseDOM ? instances : this.instances).splice(index, 1);\n }\n }\n };\n constructor(context, canUseDOM) {\n this.context = context;\n this.canUseDOM = canUseDOM || false;\n if (!canUseDOM) {\n context.helmet = server_default({\n baseTag: [],\n bodyAttributes: {},\n encodeSpecialCharacters: true,\n htmlAttributes: {},\n linkTags: [],\n metaTags: [],\n noscriptTags: [],\n scriptTags: [],\n styleTags: [],\n title: \"\",\n titleAttributes: {}\n });\n }\n }\n};\n\n// src/Provider.tsx\nvar defaultValue = {};\nvar Context = React2.createContext(defaultValue);\nvar HelmetProvider = class _HelmetProvider extends Component {\n static canUseDOM = isDocument;\n helmetData;\n constructor(props) {\n super(props);\n this.helmetData = new HelmetData(this.props.context || {}, _HelmetProvider.canUseDOM);\n }\n render() {\n return /* @__PURE__ */ React2.createElement(Context.Provider, { value: this.helmetData.value }, this.props.children);\n }\n};\n\n// src/Dispatcher.tsx\nimport { Component as Component2 } from \"react\";\nimport shallowEqual from \"shallowequal\";\n\n// src/client.ts\nvar updateTags = (type, tags) => {\n const headElement = document.head || document.querySelector(\"head\" /* HEAD */);\n const tagNodes = headElement.querySelectorAll(`${type}[${HELMET_ATTRIBUTE}]`);\n const oldTags = [].slice.call(tagNodes);\n const newTags = [];\n let indexToDelete;\n if (tags && tags.length) {\n tags.forEach((tag) => {\n const newElement = document.createElement(type);\n for (const attribute in tag) {\n if (Object.prototype.hasOwnProperty.call(tag, attribute)) {\n if (attribute === \"innerHTML\" /* INNER_HTML */) {\n newElement.innerHTML = tag.innerHTML;\n } else if (attribute === \"cssText\" /* CSS_TEXT */) {\n if (newElement.styleSheet) {\n newElement.styleSheet.cssText = tag.cssText;\n } else {\n newElement.appendChild(document.createTextNode(tag.cssText));\n }\n } else {\n const attr = attribute;\n const value = typeof tag[attr] === \"undefined\" ? \"\" : tag[attr];\n newElement.setAttribute(attribute, value);\n }\n }\n }\n newElement.setAttribute(HELMET_ATTRIBUTE, \"true\");\n if (oldTags.some((existingTag, index) => {\n indexToDelete = index;\n return newElement.isEqualNode(existingTag);\n })) {\n oldTags.splice(indexToDelete, 1);\n } else {\n newTags.push(newElement);\n }\n });\n }\n oldTags.forEach((tag) => tag.parentNode?.removeChild(tag));\n newTags.forEach((tag) => headElement.appendChild(tag));\n return {\n oldTags,\n newTags\n };\n};\nvar updateAttributes = (tagName, attributes) => {\n const elementTag = document.getElementsByTagName(tagName)[0];\n if (!elementTag) {\n return;\n }\n const helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);\n const helmetAttributes = helmetAttributeString ? helmetAttributeString.split(\",\") : [];\n const attributesToRemove = [...helmetAttributes];\n const attributeKeys = Object.keys(attributes);\n for (const attribute of attributeKeys) {\n const value = attributes[attribute] || \"\";\n if (elementTag.getAttribute(attribute) !== value) {\n elementTag.setAttribute(attribute, value);\n }\n if (helmetAttributes.indexOf(attribute) === -1) {\n helmetAttributes.push(attribute);\n }\n const indexToSave = attributesToRemove.indexOf(attribute);\n if (indexToSave !== -1) {\n attributesToRemove.splice(indexToSave, 1);\n }\n }\n for (let i = attributesToRemove.length - 1; i >= 0; i -= 1) {\n elementTag.removeAttribute(attributesToRemove[i]);\n }\n if (helmetAttributes.length === attributesToRemove.length) {\n elementTag.removeAttribute(HELMET_ATTRIBUTE);\n } else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(\",\")) {\n elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(\",\"));\n }\n};\nvar updateTitle = (title, attributes) => {\n if (typeof title !== \"undefined\" && document.title !== title) {\n document.title = flattenArray(title);\n }\n updateAttributes(\"title\" /* TITLE */, attributes);\n};\nvar commitTagChanges = (newState, cb) => {\n const {\n baseTag,\n bodyAttributes,\n htmlAttributes,\n linkTags,\n metaTags,\n noscriptTags,\n onChangeClientState,\n scriptTags,\n styleTags,\n title,\n titleAttributes\n } = newState;\n updateAttributes(\"body\" /* BODY */, bodyAttributes);\n updateAttributes(\"html\" /* HTML */, htmlAttributes);\n updateTitle(title, titleAttributes);\n const tagUpdates = {\n baseTag: updateTags(\"base\" /* BASE */, baseTag),\n linkTags: updateTags(\"link\" /* LINK */, linkTags),\n metaTags: updateTags(\"meta\" /* META */, metaTags),\n noscriptTags: updateTags(\"noscript\" /* NOSCRIPT */, noscriptTags),\n scriptTags: updateTags(\"script\" /* SCRIPT */, scriptTags),\n styleTags: updateTags(\"style\" /* STYLE */, styleTags)\n };\n const addedTags = {};\n const removedTags = {};\n Object.keys(tagUpdates).forEach((tagType) => {\n const { newTags, oldTags } = tagUpdates[tagType];\n if (newTags.length) {\n addedTags[tagType] = newTags;\n }\n if (oldTags.length) {\n removedTags[tagType] = tagUpdates[tagType].oldTags;\n }\n });\n if (cb) {\n cb();\n }\n onChangeClientState(newState, addedTags, removedTags);\n};\nvar _helmetCallback = null;\nvar handleStateChangeOnClient = (newState) => {\n if (_helmetCallback) {\n cancelAnimationFrame(_helmetCallback);\n }\n if (newState.defer) {\n _helmetCallback = requestAnimationFrame(() => {\n commitTagChanges(newState, () => {\n _helmetCallback = null;\n });\n });\n } else {\n commitTagChanges(newState);\n _helmetCallback = null;\n }\n};\nvar client_default = handleStateChangeOnClient;\n\n// src/Dispatcher.tsx\nvar HelmetDispatcher = class extends Component2 {\n rendered = false;\n shouldComponentUpdate(nextProps) {\n return !shallowEqual(nextProps, this.props);\n }\n componentDidUpdate() {\n this.emitChange();\n }\n componentWillUnmount() {\n const { helmetInstances } = this.props.context;\n helmetInstances.remove(this);\n this.emitChange();\n }\n emitChange() {\n const { helmetInstances, setHelmet } = this.props.context;\n let serverState = null;\n const state = reducePropsToState(\n helmetInstances.get().map((instance) => {\n const props = { ...instance.props };\n delete props.context;\n return props;\n })\n );\n if (HelmetProvider.canUseDOM) {\n client_default(state);\n } else if (server_default) {\n serverState = server_default(state);\n }\n setHelmet(serverState);\n }\n // componentWillMount will be deprecated\n // for SSR, initialize on first render\n // constructor is also unsafe in StrictMode\n init() {\n if (this.rendered) {\n return;\n }\n this.rendered = true;\n const { helmetInstances } = this.props.context;\n helmetInstances.add(this);\n this.emitChange();\n }\n render() {\n this.init();\n return null;\n }\n};\n\n// src/index.tsx\nvar Helmet = class extends Component3 {\n static defaultProps = {\n defer: true,\n encodeSpecialCharacters: true,\n prioritizeSeoTags: false\n };\n shouldComponentUpdate(nextProps) {\n return !fastCompare(without(this.props, \"helmetData\"), without(nextProps, \"helmetData\"));\n }\n mapNestedChildrenToProps(child, nestedChildren) {\n if (!nestedChildren) {\n return null;\n }\n switch (child.type) {\n case \"script\" /* SCRIPT */:\n case \"noscript\" /* NOSCRIPT */:\n return {\n innerHTML: nestedChildren\n };\n case \"style\" /* STYLE */:\n return {\n cssText: nestedChildren\n };\n default:\n throw new Error(\n `<${child.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`\n );\n }\n }\n flattenArrayTypeChildren(child, arrayTypeChildren, newChildProps, nestedChildren) {\n return {\n ...arrayTypeChildren,\n [child.type]: [\n ...arrayTypeChildren[child.type] || [],\n {\n ...newChildProps,\n ...this.mapNestedChildrenToProps(child, nestedChildren)\n }\n ]\n };\n }\n mapObjectTypeChildren(child, newProps, newChildProps, nestedChildren) {\n switch (child.type) {\n case \"title\" /* TITLE */:\n return {\n ...newProps,\n [child.type]: nestedChildren,\n titleAttributes: { ...newChildProps }\n };\n case \"body\" /* BODY */:\n return {\n ...newProps,\n bodyAttributes: { ...newChildProps }\n };\n case \"html\" /* HTML */:\n return {\n ...newProps,\n htmlAttributes: { ...newChildProps }\n };\n default:\n return {\n ...newProps,\n [child.type]: { ...newChildProps }\n };\n }\n }\n mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n let newFlattenedProps = { ...newProps };\n Object.keys(arrayTypeChildren).forEach((arrayChildName) => {\n newFlattenedProps = {\n ...newFlattenedProps,\n [arrayChildName]: arrayTypeChildren[arrayChildName]\n };\n });\n return newFlattenedProps;\n }\n warnOnInvalidChildren(child, nestedChildren) {\n invariant(\n VALID_TAG_NAMES.some((name) => child.type === name),\n typeof child.type === \"function\" ? `You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.` : `Only elements types ${VALID_TAG_NAMES.join(\n \", \"\n )} are allowed. Helmet does not support rendering <${child.type}> elements. Refer to our API for more information.`\n );\n invariant(\n !nestedChildren || typeof nestedChildren === \"string\" || Array.isArray(nestedChildren) && !nestedChildren.some((nestedChild) => typeof nestedChild !== \"string\"),\n `Helmet expects a string as a child of <${child.type}>. Did you forget to wrap your children in braces? ( <${child.type}>{\\`\\`} ) Refer to our API for more information.`\n );\n return true;\n }\n mapChildrenToProps(children, newProps) {\n let arrayTypeChildren = {};\n React3.Children.forEach(children, (child) => {\n if (!child || !child.props) {\n return;\n }\n const { children: nestedChildren, ...childProps } = child.props;\n const newChildProps = Object.keys(childProps).reduce((obj, key) => {\n obj[HTML_TAG_MAP[key] || key] = childProps[key];\n return obj;\n }, {});\n let { type } = child;\n if (typeof type === \"symbol\") {\n type = type.toString();\n } else {\n this.warnOnInvalidChildren(child, nestedChildren);\n }\n switch (type) {\n case \"Symbol(react.fragment)\" /* FRAGMENT */:\n newProps = this.mapChildrenToProps(nestedChildren, newProps);\n break;\n case \"link\" /* LINK */:\n case \"meta\" /* META */:\n case \"noscript\" /* NOSCRIPT */:\n case \"script\" /* SCRIPT */:\n case \"style\" /* STYLE */:\n arrayTypeChildren = this.flattenArrayTypeChildren(\n child,\n arrayTypeChildren,\n newChildProps,\n nestedChildren\n );\n break;\n default:\n newProps = this.mapObjectTypeChildren(child, newProps, newChildProps, nestedChildren);\n break;\n }\n });\n return this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n }\n render() {\n const { children, ...props } = this.props;\n let newProps = { ...props };\n let { helmetData } = props;\n if (children) {\n newProps = this.mapChildrenToProps(children, newProps);\n }\n if (helmetData && !(helmetData instanceof HelmetData)) {\n const data = helmetData;\n helmetData = new HelmetData(data.context, true);\n delete newProps.helmetData;\n }\n return helmetData ? /* @__PURE__ */ React3.createElement(HelmetDispatcher, { ...newProps, context: helmetData.value }) : /* @__PURE__ */ React3.createElement(Context.Consumer, null, (context) => /* @__PURE__ */ React3.createElement(HelmetDispatcher, { ...newProps, context }));\n }\n};\nexport {\n Helmet,\n HelmetData,\n HelmetProvider\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parse = parse;\nexports.serialize = serialize;\n/**\n * RegExp to match cookie-name in RFC 6265 sec 4.1.1\n * This refers out to the obsoleted definition of token in RFC 2616 sec 2.2\n * which has been replaced by the token definition in RFC 7230 appendix B.\n *\n * cookie-name = token\n * token = 1*tchar\n * tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" /\n * \"*\" / \"+\" / \"-\" / \".\" / \"^\" / \"_\" /\n * \"`\" / \"|\" / \"~\" / DIGIT / ALPHA\n *\n * Note: Allowing more characters - https://github.com/jshttp/cookie/issues/191\n * Allow same range as cookie value, except `=`, which delimits end of name.\n */\nconst cookieNameRegExp = /^[\\u0021-\\u003A\\u003C\\u003E-\\u007E]+$/;\n/**\n * RegExp to match cookie-value in RFC 6265 sec 4.1.1\n *\n * cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n * ; US-ASCII characters excluding CTLs,\n * ; whitespace DQUOTE, comma, semicolon,\n * ; and backslash\n *\n * Allowing more characters: https://github.com/jshttp/cookie/issues/191\n * Comma, backslash, and DQUOTE are not part of the parsing algorithm.\n */\nconst cookieValueRegExp = /^[\\u0021-\\u003A\\u003C-\\u007E]*$/;\n/**\n * RegExp to match domain-value in RFC 6265 sec 4.1.1\n *\n * domain-value = \n * ; defined in [RFC1034], Section 3.5, as\n * ; enhanced by [RFC1123], Section 2.1\n * =